trimprompt 1.0.33 → 1.0.34
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/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 +79 -8
- package/mcp.js +1 -1
- package/package.json +1 -1
- 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/hooks/claude-hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var a0_0x7c96f7=a0_0x28ac;(function(_0x301f63,_0xafecc8){var _0xb67752=a0_0x28ac,_0x18a4b9=_0x301f63();while(!![]){try{var _0x474df9=-parseInt(_0xb67752(0x121))/0x1*(parseInt(_0xb67752(0x122))/0x2)+-parseInt(_0xb67752(0x115))/0x3+parseInt(_0xb67752(0x113))/0x4*(-parseInt(_0xb67752(0x116))/0x5)+parseInt(_0xb67752(0x11c))/0x6*(-parseInt(_0xb67752(0x107))/0x7)+parseInt(_0xb67752(0x111))/0x8+-parseInt(_0xb67752(0x10c))/0x9*(parseInt(_0xb67752(0x11d))/0xa)+-parseInt(_0xb67752(0x10e))/0xb*(-parseInt(_0xb67752(0x118))/0xc);if(_0x474df9===_0xafecc8)break;else _0x18a4b9['push'](_0x18a4b9['shift']());}catch(_0x2ea1b1){_0x18a4b9['push'](_0x18a4b9['shift']());}}}(a0_0x418c,0xdc513));function a0_0x418c(){var _0x3d6f13=['9CzsPuR','utf8','227436Ardihw','__importStar','default','5035432AcGvOP','.claude','284gNuXIz','writeFileSync','714291QKDpie','9245NBlxzG','getOwnPropertyDescriptor','1824GZlZts','getOwnPropertyNames','configurable','path','1902LYaWDS','10622510XvQlcA','hooks','get','hasOwnProperty','42869uVgzIC','66mbkZzp','writable','mkdirSync','installClaudeHooks','__esModule','__createBinding','518RdwkQf','length','create','join','//\x20TrimPrompt\x20Native\x20PostToolUse\x20Hook\x20for\x20Claude\x20Code\x0aconst\x20fs\x20=\x20require(\x27fs\x27);\x0aconst\x20path\x20=\x20require(\x27path\x27);\x0aconst\x20os\x20=\x20require(\x27os\x27);\x0a\x0amodule.exports\x20=\x20async\x20function\x20postToolUse(event)\x20{\x0a\x20\x20try\x20{\x0a\x20\x20\x20\x20if\x20(!event\x20||\x20!event.result)\x20return\x20event;\x0a\x20\x20\x20\x20let\x20contentStr\x20=\x20typeof\x20event.result\x20===\x20\x27string\x27\x20?\x20event.result\x20:\x20JSON.stringify(event.result);\x0a\x20\x20\x20\x20if\x20(contentStr.length\x20>\x20500)\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20cacheDir\x20=\x20path.join(os.homedir(),\x20\x27.trimprompt\x27,\x20\x27cache\x27);\x0a\x20\x20\x20\x20\x20\x20if\x20(!fs.existsSync(cacheDir))\x20fs.mkdirSync(cacheDir,\x20{\x20recursive:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20const\x20chunkId\x20=\x20\x27chunk_\x27\x20+\x20Math.random().toString(36).substring(2,\x2011);\x0a\x20\x20\x20\x20\x20\x20fs.writeFileSync(path.join(cacheDir,\x20chunkId\x20+\x20\x27.json\x27),\x20JSON.stringify({\x20raw_payload:\x20contentStr,\x20timestamp:\x20new\x20Date().toISOString()\x20}));\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20snippet\x20=\x20contentStr.substring(0,\x20200).replace(/\x5cn/g,\x20\x27\x20\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20replacement\x20=\x20`>\x20[!NOTE]\x5cn>\x20**[TrimPrompt\x20Context\x20Offloaded]**\x20Raw\x20tool\x20output\x20(${contentStr.length.toLocaleString()}\x20chars)\x20side-cached\x20locally.\x5cn>\x20Preview:\x20${snippet}...\x5cn>\x20Retrieve\x20raw:\x20`trim\x20retrieve\x20${chunkId}``;\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20if\x20(typeof\x20event.result\x20===\x20\x27string\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(event.result\x20&&\x20typeof\x20event.result\x20===\x20\x27object\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result.content\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20return\x20event;\x0a};\x0a'];a0_0x418c=function(){return _0x3d6f13;};return a0_0x418c();}function a0_0x28ac(_0x2a7760,_0x5c2c02){var _0x418c93=a0_0x418c();return a0_0x28ac=function(_0x28acc7,_0x39be35){_0x28acc7=_0x28acc7-0x103;var _0x2c6be2=_0x418c93[_0x28acc7];return _0x2c6be2;},a0_0x28ac(_0x2a7760,_0x5c2c02);}var __createBinding=this&&this[a0_0x7c96f7(0x106)]||(Object[a0_0x7c96f7(0x109)]?function(_0xb64f9c,_0x108a05,_0x35ac34,_0x36b0eb){var _0x3145a5=a0_0x7c96f7;if(_0x36b0eb===undefined)_0x36b0eb=_0x35ac34;var _0x2d0aae=Object[_0x3145a5(0x117)](_0x108a05,_0x35ac34);(!_0x2d0aae||(_0x3145a5(0x11f)in _0x2d0aae?!_0x108a05[_0x3145a5(0x105)]:_0x2d0aae[_0x3145a5(0x123)]||_0x2d0aae[_0x3145a5(0x11a)]))&&(_0x2d0aae={'enumerable':!![],'get':function(){return _0x108a05[_0x35ac34];}}),Object['defineProperty'](_0xb64f9c,_0x36b0eb,_0x2d0aae);}:function(_0x3388a2,_0x40bcc3,_0x135f2a,_0x2290de){if(_0x2290de===undefined)_0x2290de=_0x135f2a;_0x3388a2[_0x2290de]=_0x40bcc3[_0x135f2a];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x7c96f7(0x109)]?function(_0x3cdbe1,_0x29258b){var _0x35109a=a0_0x7c96f7;Object['defineProperty'](_0x3cdbe1,_0x35109a(0x110),{'enumerable':!![],'value':_0x29258b});}:function(_0x181182,_0x51a3e4){var _0x37e02b=a0_0x7c96f7;_0x181182[_0x37e02b(0x110)]=_0x51a3e4;}),__importStar=this&&this[a0_0x7c96f7(0x10f)]||(function(){var _0x83a32e=function(_0x49ce8d){var _0x404f76=a0_0x28ac;return _0x83a32e=Object[_0x404f76(0x119)]||function(_0x129c01){var _0x343b3c=_0x404f76,_0x4ae22b=[];for(var _0x591107 in _0x129c01)if(Object['prototype'][_0x343b3c(0x120)]['call'](_0x129c01,_0x591107))_0x4ae22b[_0x4ae22b['length']]=_0x591107;return _0x4ae22b;},_0x83a32e(_0x49ce8d);};return function(_0x4f4bc1){var _0x3bd7a7=a0_0x28ac;if(_0x4f4bc1&&_0x4f4bc1[_0x3bd7a7(0x105)])return _0x4f4bc1;var _0x1251ca={};if(_0x4f4bc1!=null){for(var _0x36f46f=_0x83a32e(_0x4f4bc1),_0x24b361=0x0;_0x24b361<_0x36f46f[_0x3bd7a7(0x108)];_0x24b361++)if(_0x36f46f[_0x24b361]!==_0x3bd7a7(0x110))__createBinding(_0x1251ca,_0x4f4bc1,_0x36f46f[_0x24b361]);}return __setModuleDefault(_0x1251ca,_0x4f4bc1),_0x1251ca;};}());Object['defineProperty'](exports,a0_0x7c96f7(0x105),{'value':!![]}),exports[a0_0x7c96f7(0x104)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x7c96f7(0x11b))),os=__importStar(require('os'));function installClaudeHooks(){var _0x4b11da=a0_0x7c96f7;try{const _0x3e21dd=path[_0x4b11da(0x10a)](os['homedir'](),_0x4b11da(0x112),_0x4b11da(0x11e));!fs['existsSync'](_0x3e21dd)&&fs[_0x4b11da(0x103)](_0x3e21dd,{'recursive':!![]});const _0x101266=path[_0x4b11da(0x10a)](_0x3e21dd,'post_tool_use.js'),_0x2e00e6=_0x4b11da(0x10b);fs[_0x4b11da(0x114)](_0x101266,_0x2e00e6,_0x4b11da(0x10d));}catch(_0x3f10a0){}}
|
|
1
|
+
'use strict';var a0_0x3479f1=a0_0x5a07;(function(_0x1f4917,_0x1751ab){var _0x13b1fb=a0_0x5a07,_0x161237=_0x1f4917();while(!![]){try{var _0x437bb6=-parseInt(_0x13b1fb(0x11e))/0x1*(parseInt(_0x13b1fb(0x130))/0x2)+parseInt(_0x13b1fb(0x123))/0x3+parseInt(_0x13b1fb(0x121))/0x4+parseInt(_0x13b1fb(0x126))/0x5*(parseInt(_0x13b1fb(0x115))/0x6)+parseInt(_0x13b1fb(0x117))/0x7+-parseInt(_0x13b1fb(0x120))/0x8+-parseInt(_0x13b1fb(0x11c))/0x9*(parseInt(_0x13b1fb(0x112))/0xa);if(_0x437bb6===_0x1751ab)break;else _0x161237['push'](_0x161237['shift']());}catch(_0x413e03){_0x161237['push'](_0x161237['shift']());}}}(a0_0x1624,0x5add4));var __createBinding=this&&this[a0_0x3479f1(0x114)]||(Object[a0_0x3479f1(0x11d)]?function(_0x5c4fbc,_0x5aab44,_0x4a1423,_0x466dff){var _0x153bf8=a0_0x3479f1;if(_0x466dff===undefined)_0x466dff=_0x4a1423;var _0x4acefd=Object['getOwnPropertyDescriptor'](_0x5aab44,_0x4a1423);(!_0x4acefd||('get'in _0x4acefd?!_0x5aab44[_0x153bf8(0x125)]:_0x4acefd[_0x153bf8(0x11a)]||_0x4acefd[_0x153bf8(0x119)]))&&(_0x4acefd={'enumerable':!![],'get':function(){return _0x5aab44[_0x4a1423];}}),Object[_0x153bf8(0x118)](_0x5c4fbc,_0x466dff,_0x4acefd);}:function(_0x5a3c96,_0x4fae42,_0x2b172f,_0x262f21){if(_0x262f21===undefined)_0x262f21=_0x2b172f;_0x5a3c96[_0x262f21]=_0x4fae42[_0x2b172f];}),__setModuleDefault=this&&this[a0_0x3479f1(0x12e)]||(Object[a0_0x3479f1(0x11d)]?function(_0x498505,_0x5e550d){var _0xa9f05a=a0_0x3479f1;Object[_0xa9f05a(0x118)](_0x498505,_0xa9f05a(0x113),{'enumerable':!![],'value':_0x5e550d});}:function(_0x4ea14d,_0xd8cbbb){var _0x1f04ac=a0_0x3479f1;_0x4ea14d[_0x1f04ac(0x113)]=_0xd8cbbb;}),__importStar=this&&this['__importStar']||(function(){var _0x5d1b11=function(_0x163fbf){var _0x4c6bd8=a0_0x5a07;return _0x5d1b11=Object[_0x4c6bd8(0x12f)]||function(_0x426718){var _0x38c72c=_0x4c6bd8,_0x37ffd3=[];for(var _0x52c2ad in _0x426718)if(Object[_0x38c72c(0x127)][_0x38c72c(0x11f)][_0x38c72c(0x122)](_0x426718,_0x52c2ad))_0x37ffd3[_0x37ffd3['length']]=_0x52c2ad;return _0x37ffd3;},_0x5d1b11(_0x163fbf);};return function(_0x2a7fc5){var _0x572bc9=a0_0x5a07;if(_0x2a7fc5&&_0x2a7fc5[_0x572bc9(0x125)])return _0x2a7fc5;var _0x4e96f2={};if(_0x2a7fc5!=null){for(var _0x34976d=_0x5d1b11(_0x2a7fc5),_0x31d23f=0x0;_0x31d23f<_0x34976d[_0x572bc9(0x12b)];_0x31d23f++)if(_0x34976d[_0x31d23f]!==_0x572bc9(0x113))__createBinding(_0x4e96f2,_0x2a7fc5,_0x34976d[_0x31d23f]);}return __setModuleDefault(_0x4e96f2,_0x2a7fc5),_0x4e96f2;};}());Object[a0_0x3479f1(0x118)](exports,a0_0x3479f1(0x125),{'value':!![]}),exports[a0_0x3479f1(0x12a)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3479f1(0x129))),os=__importStar(require('os'));function a0_0x5a07(_0xa1cc00,_0x38799b){_0xa1cc00=_0xa1cc00-0x111;var _0x1624db=a0_0x1624();var _0x5a075f=_0x1624db[_0xa1cc00];return _0x5a075f;}function a0_0x1624(){var _0x4d4626=['240txmSUZ','prototype','mkdirSync','path','installClaudeHooks','length','//\x20TrimPrompt\x20Native\x20PostToolUse\x20Hook\x20for\x20Claude\x20Code\x0aconst\x20fs\x20=\x20require(\x27fs\x27);\x0aconst\x20path\x20=\x20require(\x27path\x27);\x0aconst\x20os\x20=\x20require(\x27os\x27);\x0a\x0amodule.exports\x20=\x20async\x20function\x20postToolUse(event)\x20{\x0a\x20\x20try\x20{\x0a\x20\x20\x20\x20if\x20(!event\x20||\x20!event.result)\x20return\x20event;\x0a\x20\x20\x20\x20let\x20contentStr\x20=\x20typeof\x20event.result\x20===\x20\x27string\x27\x20?\x20event.result\x20:\x20JSON.stringify(event.result);\x0a\x20\x20\x20\x20if\x20(contentStr.length\x20>\x20500)\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20baseDir\x20=\x20path.join(os.homedir(),\x20\x27.trimprompt\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20cacheDir\x20=\x20path.join(baseDir,\x20\x27cache\x27);\x0a\x20\x20\x20\x20\x20\x20if\x20(!fs.existsSync(cacheDir))\x20fs.mkdirSync(cacheDir,\x20{\x20recursive:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20const\x20chunkId\x20=\x20\x27chunk_\x27\x20+\x20Math.random().toString(36).substring(2,\x2011);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20rawTokens\x20=\x20Math.ceil(contentStr.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20snippet\x20=\x20contentStr.substring(0,\x20200).replace(/\x5cn/g,\x20\x27\x20\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20replacement\x20=\x20`>\x20[!NOTE]\x5cn>\x20**[TrimPrompt\x20Context\x20Offloaded]**\x20Raw\x20tool\x20output\x20(${contentStr.length.toLocaleString()}\x20chars)\x20side-cached\x20locally.\x5cn>\x20Preview:\x20${snippet}...\x5cn>\x20Retrieve\x20raw:\x20\x5c`trim\x20retrieve\x20${chunkId}\x5c``;\x0a\x20\x20\x20\x20\x20\x20const\x20compressedTokens\x20=\x20Math.ceil(replacement.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20const\x20savedTokens\x20=\x20Math.max(0,\x20rawTokens\x20-\x20compressedTokens);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20fs.writeFileSync(path.join(cacheDir,\x20chunkId\x20+\x20\x27.json\x27),\x20JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20chunk_id:\x20chunkId,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_tokens:\x20rawTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20compressed_tokens:\x20compressedTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20last_accessed_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20summary:\x20`Summary:\x20Tool\x20result\x20offloaded\x20(${rawTokens}\x20tokens).`,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_payload:\x20contentStr\x0a\x20\x20\x20\x20\x20\x20},\x20null,\x202));\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(typeof\x20event.result\x20===\x20\x27string\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(event.result\x20&&\x20typeof\x20event.result\x20===\x20\x27object\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result.content\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Update\x20sessions_state.json\x20with\x20hook\x20savings\x0a\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20statePath\x20=\x20path.join(baseDir,\x20\x27sessions_state.json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20state\x20=\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(statePath))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20state\x20=\x20JSON.parse(fs.readFileSync(statePath,\x20\x27utf8\x27))\x20||\x20{};\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Find\x20latest\x20session\x20file\x20for\x20\x27claude\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20claudeDirs\x20=\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27projects\x27),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27history\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20];\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestFullPath\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestTime\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20dir\x20of\x20claudeDirs)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(dir))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20scanDir\x20=\x20(currentDir,\x20depth\x20=\x200)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(depth\x20>\x206)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entries\x20=\x20fs.readdirSync(currentDir,\x20{\x20withFileTypes:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20entry\x20of\x20entries)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20full\x20=\x20path.join(currentDir,\x20entry.name);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.isDirectory())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(full,\x20depth\x20+\x201);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(entry.isFile()\x20&&\x20!entry.name.startsWith(\x27.\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.name.endsWith(\x27.jsonl\x27)\x20||\x20entry.name.endsWith(\x27.json1\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20stat\x20=\x20fs.statSync(full);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(stat.mtimeMs\x20>\x20latestTime)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestTime\x20=\x20stat.mtimeMs;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestFullPath\x20=\x20full;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(dir);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(latestFullPath)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20state[latestFullPath]\x20||\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20prevHook\x20=\x20existing.hookSavedTokens\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20newHook\x20=\x20prevHook\x20+\x20savedTokens;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalOfficial\x20=\x20existing.officialCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalAuto\x20=\x20existing.autoCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20state[latestFullPath]\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20lineCount:\x20existing.lineCount\x20||\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20activeSavedTokens:\x20finalOfficial\x20+\x20finalAuto\x20+\x20newHook,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sideCacheSaved:\x20existing.sideCacheSaved\x20||\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20officialCompactSaved:\x20finalOfficial,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoCompactSaved:\x20finalAuto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hookSavedTokens:\x20newHook\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fs.writeFileSync(statePath,\x20JSON.stringify(state,\x20null,\x202),\x20\x27utf8\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20return\x20event;\x0a};\x0a','join','__setModuleDefault','getOwnPropertyNames','30hRGaeK','.claude','10gWJzEp','default','__createBinding','51924DEtpKr','existsSync','2970562mZNIlx','defineProperty','configurable','writable','homedir','1745433lpxhNg','create','12484cLwTyj','hasOwnProperty','5240032XaxdiN','591588ZwuKHR','call','1262178CHnIZW','post_tool_use.js','__esModule'];a0_0x1624=function(){return _0x4d4626;};return a0_0x1624();}function installClaudeHooks(){var _0x4b4731=a0_0x3479f1;try{const _0x561393=path[_0x4b4731(0x12d)](os[_0x4b4731(0x11b)](),_0x4b4731(0x111),'hooks');!fs[_0x4b4731(0x116)](_0x561393)&&fs[_0x4b4731(0x128)](_0x561393,{'recursive':!![]});const _0x211129=path['join'](_0x561393,_0x4b4731(0x124)),_0x4d0002=_0x4b4731(0x12c);fs['writeFileSync'](_0x211129,_0x4d0002,'utf8');}catch(_0xfa3c){}}
|
package/index.html
CHANGED
|
@@ -1042,7 +1042,6 @@
|
|
|
1042
1042
|
setTimeout(() => { btn.innerText = origText; btn.disabled = false; }, 2000);
|
|
1043
1043
|
loadStats();
|
|
1044
1044
|
} else {
|
|
1045
|
-
alert(res.message || 'Compaction finished');
|
|
1046
1045
|
btn.innerText = origText;
|
|
1047
1046
|
btn.disabled = false;
|
|
1048
1047
|
}
|
|
@@ -1292,7 +1291,47 @@
|
|
|
1292
1291
|
// Group logs by command name
|
|
1293
1292
|
const groups = {};
|
|
1294
1293
|
displayLogs.forEach(l => {
|
|
1295
|
-
|
|
1294
|
+
let key = l.command || 'unknown';
|
|
1295
|
+
const lowerKey = key.toLowerCase();
|
|
1296
|
+
if (
|
|
1297
|
+
lowerKey.includes('conv:') ||
|
|
1298
|
+
lowerKey.includes('compact:') ||
|
|
1299
|
+
lowerKey.includes('optimization') ||
|
|
1300
|
+
lowerKey.includes('compaction') ||
|
|
1301
|
+
lowerKey.includes('chat') ||
|
|
1302
|
+
lowerKey.includes('cache update') ||
|
|
1303
|
+
lowerKey.includes('turn') ||
|
|
1304
|
+
lowerKey.includes('message') ||
|
|
1305
|
+
lowerKey.includes('sync')
|
|
1306
|
+
) {
|
|
1307
|
+
let agent = 'claude';
|
|
1308
|
+
if (lowerKey.includes('gemini') || lowerKey.includes('antigravity')) {
|
|
1309
|
+
agent = 'gemini';
|
|
1310
|
+
} else if (lowerKey.includes('cursor')) {
|
|
1311
|
+
agent = 'cursor';
|
|
1312
|
+
} else if (lowerKey.includes('codex')) {
|
|
1313
|
+
agent = 'codex';
|
|
1314
|
+
}
|
|
1315
|
+
const capitalized = agent.charAt(0).toUpperCase() + agent.slice(1);
|
|
1316
|
+
key = capitalized;
|
|
1317
|
+
} else if (key.startsWith('antigravity-gemini-')) {
|
|
1318
|
+
const cleanKey = key.substring('antigravity-gemini-'.length);
|
|
1319
|
+
if (
|
|
1320
|
+
cleanKey.includes('compact:') ||
|
|
1321
|
+
cleanKey.includes('Compact:') ||
|
|
1322
|
+
cleanKey.includes('Optimization') ||
|
|
1323
|
+
cleanKey.includes('Compaction') ||
|
|
1324
|
+
cleanKey.includes('Chat') ||
|
|
1325
|
+
cleanKey.includes('Cache') ||
|
|
1326
|
+
cleanKey.includes('Turn') ||
|
|
1327
|
+
cleanKey.includes('Message') ||
|
|
1328
|
+
cleanKey.includes('Sync')
|
|
1329
|
+
) {
|
|
1330
|
+
key = 'Gemini';
|
|
1331
|
+
} else {
|
|
1332
|
+
key = cleanKey;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1296
1335
|
if (!groups[key]) groups[key] = [];
|
|
1297
1336
|
groups[key].push(l);
|
|
1298
1337
|
});
|
|
@@ -1312,7 +1351,7 @@
|
|
|
1312
1351
|
const latestTime = new Date(latestLog.timestamp).toLocaleTimeString();
|
|
1313
1352
|
|
|
1314
1353
|
let grpRaw = 0, grpComp = 0, grpSaved = 0, grpSecrets = 0;
|
|
1315
|
-
const isLiveConvGroup =
|
|
1354
|
+
const isLiveConvGroup = ['Claude', 'Gemini', 'Cursor', 'Codex'].includes(cmdKey) || (latestLog.features && latestLog.features.includes('live-conv'));
|
|
1316
1355
|
if (isLiveConvGroup) {
|
|
1317
1356
|
grpRaw = latestLog.estimated_raw_tokens || 0;
|
|
1318
1357
|
grpComp = latestLog.estimated_compressed_tokens || 0;
|
|
@@ -1347,7 +1386,7 @@
|
|
|
1347
1386
|
if (chev) chev.style.transform = isHidden ? 'rotate(90deg)' : 'rotate(0deg)';
|
|
1348
1387
|
};
|
|
1349
1388
|
|
|
1350
|
-
const displayCmd = formatCommandName(
|
|
1389
|
+
const displayCmd = ['Claude', 'Gemini', 'Cursor', 'Codex'].includes(cmdKey) ? cmdKey : formatCommandName(cmdKey);
|
|
1351
1390
|
|
|
1352
1391
|
trHead.innerHTML = `
|
|
1353
1392
|
<td style="font-size:12px;color:#94A3B8;white-space:nowrap;"><span id="chev-${groupId}" style="display:inline-block;transition:transform 0.2s;margin-right:6px;font-size:10px;transform:${isGroupExpanded ? 'rotate(90deg)' : 'rotate(0deg)'}">▶</span>${latestTime}</td>
|
|
@@ -1412,11 +1451,43 @@
|
|
|
1412
1451
|
|
|
1413
1452
|
function formatCommandName(cmd) {
|
|
1414
1453
|
if (!cmd) return 'unknown';
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1454
|
+
let clean = cmd;
|
|
1455
|
+
const lower = clean.toLowerCase();
|
|
1456
|
+
|
|
1457
|
+
if (
|
|
1458
|
+
lower.includes('compact:') ||
|
|
1459
|
+
lower.includes('compact') ||
|
|
1460
|
+
lower.includes('optimization') ||
|
|
1461
|
+
lower.includes('compaction') ||
|
|
1462
|
+
lower.includes('cache update') ||
|
|
1463
|
+
lower.includes('sync')
|
|
1464
|
+
) {
|
|
1465
|
+
let agent = 'claude';
|
|
1466
|
+
if (lower.includes('gemini') || lower.includes('antigravity')) agent = 'gemini';
|
|
1467
|
+
else if (lower.includes('cursor')) agent = 'cursor';
|
|
1468
|
+
else if (lower.includes('codex')) agent = 'codex';
|
|
1469
|
+
const capitalized = agent.charAt(0).toUpperCase() + agent.slice(1);
|
|
1470
|
+
return `${capitalized} Sync`;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
if (
|
|
1474
|
+
lower.includes('conv:') ||
|
|
1475
|
+
lower.includes('chat') ||
|
|
1476
|
+
lower.includes('turn') ||
|
|
1477
|
+
lower.includes('message')
|
|
1478
|
+
) {
|
|
1479
|
+
let agent = 'claude';
|
|
1480
|
+
if (lower.includes('gemini') || lower.includes('antigravity')) agent = 'gemini';
|
|
1481
|
+
else if (lower.includes('cursor')) agent = 'cursor';
|
|
1482
|
+
else if (lower.includes('codex')) agent = 'codex';
|
|
1483
|
+
const capitalized = agent.charAt(0).toUpperCase() + agent.slice(1);
|
|
1484
|
+
return `${capitalized} Message`;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
if (clean.startsWith('antigravity-gemini-')) {
|
|
1488
|
+
clean = clean.substring('antigravity-gemini-'.length);
|
|
1418
1489
|
}
|
|
1419
|
-
return
|
|
1490
|
+
return clean;
|
|
1420
1491
|
}
|
|
1421
1492
|
|
|
1422
1493
|
// Human-friendly labels for redactor rule types (see redactor.ts)
|
package/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x175abc=a0_0x3934;(function(_0x190c94,_0x2dbcc9){const _0x320fda=a0_0x3934,_0x496012=_0x190c94();while(!![]){try{const _0x55cf4d=-parseInt(_0x320fda(0x139))/0x1*(-parseInt(_0x320fda(0x171))/0x2)+parseInt(_0x320fda(0x169))/0x3+-parseInt(_0x320fda(0x13d))/0x4*(parseInt(_0x320fda(0x16d))/0x5)+parseInt(_0x320fda(0x177))/0x6+-parseInt(_0x320fda(0x162))/0x7*(parseInt(_0x320fda(0x15a))/0x8)+parseInt(_0x320fda(0x15d))/0x9+-parseInt(_0x320fda(0x146))/0xa;if(_0x55cf4d===_0x2dbcc9)break;else _0x496012['push'](_0x496012['shift']());}catch(_0x5e268e){_0x496012['push'](_0x496012['shift']());}}}(a0_0x26c9,0x662c7));var __createBinding=this&&this[a0_0x175abc(0x163)]||(Object[a0_0x175abc(0x16e)]?function(_0x408fa7,_0x26f077,_0x2cf5dd,_0x380626){const _0x288eec=a0_0x175abc;if(_0x380626===undefined)_0x380626=_0x2cf5dd;var _0x228f4b=Object[_0x288eec(0x172)](_0x26f077,_0x2cf5dd);(!_0x228f4b||(_0x288eec(0x14c)in _0x228f4b?!_0x26f077['__esModule']:_0x228f4b[_0x288eec(0x160)]||_0x228f4b[_0x288eec(0x13b)]))&&(_0x228f4b={'enumerable':!![],'get':function(){return _0x26f077[_0x2cf5dd];}}),Object[_0x288eec(0x16c)](_0x408fa7,_0x380626,_0x228f4b);}:function(_0x32d6a9,_0x5250dd,_0xa8687f,_0x1c3060){if(_0x1c3060===undefined)_0x1c3060=_0xa8687f;_0x32d6a9[_0x1c3060]=_0x5250dd[_0xa8687f];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x2d1714,_0x4441b8){const _0xe5bda3=a0_0x175abc;Object[_0xe5bda3(0x16c)](_0x2d1714,_0xe5bda3(0x151),{'enumerable':!![],'value':_0x4441b8});}:function(_0x5cdd1a,_0x5cc24f){const _0x4e26cd=a0_0x175abc;_0x5cdd1a[_0x4e26cd(0x151)]=_0x5cc24f;}),__importStar=this&&this[a0_0x175abc(0x16b)]||(function(){var _0x5dfc95=function(_0x148004){const _0x10a53e=a0_0x3934;return _0x5dfc95=Object[_0x10a53e(0x158)]||function(_0x13266d){const _0x4593e9=_0x10a53e;var _0x2479b8=[];for(var _0x3fe727 in _0x13266d)if(Object['prototype'][_0x4593e9(0x13e)][_0x4593e9(0x14e)](_0x13266d,_0x3fe727))_0x2479b8[_0x2479b8[_0x4593e9(0x174)]]=_0x3fe727;return _0x2479b8;},_0x5dfc95(_0x148004);};return function(_0x562433){const _0x30b8ae=a0_0x3934;if(_0x562433&&_0x562433[_0x30b8ae(0x159)])return _0x562433;var _0x2d1828={};if(_0x562433!=null){for(var _0x55f891=_0x5dfc95(_0x562433),_0x1207b6=0x0;_0x1207b6<_0x55f891[_0x30b8ae(0x174)];_0x1207b6++)if(_0x55f891[_0x1207b6]!=='default')__createBinding(_0x2d1828,_0x562433,_0x55f891[_0x1207b6]);}return __setModuleDefault(_0x2d1828,_0x562433),_0x2d1828;};}());Object[a0_0x175abc(0x16c)](exports,a0_0x175abc(0x159),{'value':!![]}),exports[a0_0x175abc(0x15c)]=runMcpProxy;function a0_0x3934(_0x1786c7,_0xb33b25){_0x1786c7=_0x1786c7-0x139;const _0x26c9ab=a0_0x26c9();let _0x3934c5=_0x26c9ab[_0x1786c7];return _0x3934c5;}function a0_0x26c9(){const _0x31ae29=['4049658hBSVwz','child_process','jsonrpc','createInterface','pipe','logExecution','21071XLXWZo','complexity','configurable','trim','32ZKWZdV','hasOwnProperty','content','stdin','exit','resp_optimize','redaction_enabled','conv_compress','./filters','6750580uRJVsx','max_tokens','end','messages','spawn','max_tokens:\x20','get','savedTokens','call','mcp\x20tool\x20(id:\x20','string','default','text','trimmedCount','message','params','mcp-tool-call','\x20messages\x20(','getOwnPropertyNames','__esModule','29304ZgWxnp','error','runMcpProxy','6178203tQRDIA','optimizeMaxTokens','compressConversation','writable','\x20messages','56iXlHDA','__createBinding','result','parse','write','close','line','1367664pZanxN','type','__importStar','defineProperty','447190PgPOoI','create','stringify','stdout','2GAMdka','getOwnPropertyDescriptor','tracker','length','isArray','readline'];a0_0x26c9=function(){return _0x31ae29;};return a0_0x26c9();}const child_process_1=require(a0_0x175abc(0x178)),readline=__importStar(require(a0_0x175abc(0x176))),filters_1=require(a0_0x175abc(0x145)),tracker_1=require('./tracker'),proxy_conv_1=require('./proxy-conv'),proxy_resp_1=require('./proxy-resp');function runMcpProxy(_0x5facab,_0x458771){const _0x4a5acb=a0_0x175abc,_0x5896c5=(0x0,child_process_1[_0x4a5acb(0x14a)])(_0x5facab,_0x458771,{'stdio':[_0x4a5acb(0x17b),_0x4a5acb(0x17b),'inherit']}),_0x2cffe2=tracker_1[_0x4a5acb(0x173)]['getConfig'](),_0x815461=_0x2cffe2['features_enabled']||{},_0x231be8=_0x815461[_0x4a5acb(0x144)]!==![],_0x2d8f59=_0x815461[_0x4a5acb(0x142)]!==![],_0x1fdc21=readline[_0x4a5acb(0x17a)]({'input':process[_0x4a5acb(0x140)],'terminal':![]});_0x1fdc21['on']('line',_0x4e2fce=>{const _0xc180e4=_0x4a5acb;try{const _0x571767=JSON['parse'](_0x4e2fce);if(_0x571767&&_0x571767[_0xc180e4(0x179)]==='2.0'&&_0x571767['method']&&_0x571767[_0xc180e4(0x155)]){const _0x493a1a=_0x571767[_0xc180e4(0x155)];if(Array['isArray'](_0x493a1a[_0xc180e4(0x149)])&&_0x493a1a[_0xc180e4(0x149)][_0xc180e4(0x174)]>0x0){if(_0x231be8){const _0x1bbe29=(0x0,proxy_conv_1[_0xc180e4(0x15f)])(_0x493a1a[_0xc180e4(0x149)]);(_0x1bbe29[_0xc180e4(0x153)]>0x0||_0x1bbe29['savedTokens']>0x0)&&(_0x493a1a[_0xc180e4(0x149)]=_0x1bbe29[_0xc180e4(0x149)],tracker_1[_0xc180e4(0x173)][_0xc180e4(0x17c)]('proxy:conv-compress',_0x1bbe29[_0xc180e4(0x153)]+_0x1bbe29[_0xc180e4(0x149)][_0xc180e4(0x174)]+_0xc180e4(0x161),_0x1bbe29[_0xc180e4(0x149)][_0xc180e4(0x174)]+_0xc180e4(0x157)+_0x1bbe29['trimmedCount']+'\x20trimmed,\x20~'+_0x1bbe29[_0xc180e4(0x14d)]+'\x20tokens\x20saved)',0x0,undefined,[_0xc180e4(0x144)]));}if(_0x2d8f59){const _0x37992e=(0x0,proxy_resp_1[_0xc180e4(0x15e)])(_0x493a1a[_0xc180e4(0x149)],_0x493a1a['max_tokens']);if(_0x37992e){const _0x554f45=_0x493a1a[_0xc180e4(0x147)]||_0xc180e4(0x151);_0x493a1a[_0xc180e4(0x147)]=_0x37992e['max_tokens'],tracker_1['tracker'][_0xc180e4(0x17c)]('proxy:resp-optimize',_0xc180e4(0x14b)+_0x554f45,_0xc180e4(0x14b)+_0x37992e[_0xc180e4(0x147)]+'\x20('+_0x37992e[_0xc180e4(0x13a)]+')',0x0,undefined,[_0xc180e4(0x142)]);}}}_0x5896c5[_0xc180e4(0x140)][_0xc180e4(0x166)](JSON[_0xc180e4(0x16f)](_0x571767)+'\x0a');}else _0x5896c5[_0xc180e4(0x140)][_0xc180e4(0x166)](_0x4e2fce+'\x0a');}catch{_0x5896c5[_0xc180e4(0x140)][_0xc180e4(0x166)](_0x4e2fce+'\x0a');}}),_0x1fdc21['on'](_0x4a5acb(0x167),()=>{const _0xba819f=_0x4a5acb;try{_0x5896c5['stdin'][_0xba819f(0x148)]();}catch{}});const _0x172ade=readline[_0x4a5acb(0x17a)]({'input':_0x5896c5[_0x4a5acb(0x170)],'terminal':![]});_0x172ade['on'](_0x4a5acb(0x168),_0x5840aa=>{const _0x2f92f3=_0x4a5acb;try{const _0x1d4021=JSON[_0x2f92f3(0x165)](_0x5840aa);if(_0x1d4021&&_0x1d4021[_0x2f92f3(0x179)]==='2.0'&&_0x1d4021['id']!==undefined&&_0x1d4021[_0x2f92f3(0x164)]&&Array[_0x2f92f3(0x175)](_0x1d4021[_0x2f92f3(0x164)][_0x2f92f3(0x13f)])){let _0x3bd0ec=![];for(const _0x22db16 of _0x1d4021[_0x2f92f3(0x164)]['content']){if(_0x22db16[_0x2f92f3(0x16a)]==='text'&&typeof _0x22db16[_0x2f92f3(0x152)]===_0x2f92f3(0x150)&&_0x22db16[_0x2f92f3(0x152)][_0x2f92f3(0x13c)]()['length']>0x0){const _0x40fcd1=_0x22db16[_0x2f92f3(0x152)],_0x479074=(0x0,filters_1['compressOutput'])(_0x2f92f3(0x156),_0x40fcd1,'',tracker_1[_0x2f92f3(0x173)]['getConfig']()[_0x2f92f3(0x143)]);tracker_1[_0x2f92f3(0x173)]['logExecution'](_0x2f92f3(0x14f)+_0x1d4021['id']+')',_0x40fcd1,_0x479074,0x0),_0x22db16['text']=_0x479074,_0x3bd0ec=!![];}}_0x3bd0ec?process[_0x2f92f3(0x170)]['write'](JSON[_0x2f92f3(0x16f)](_0x1d4021)+'\x0a'):process[_0x2f92f3(0x170)][_0x2f92f3(0x166)](_0x5840aa+'\x0a');}else process[_0x2f92f3(0x170)][_0x2f92f3(0x166)](_0x5840aa+'\x0a');}catch{process[_0x2f92f3(0x170)][_0x2f92f3(0x166)](_0x5840aa+'\x0a');}}),_0x5896c5['on']('close',_0x17d4b5=>{process['exit'](_0x17d4b5||0x0);}),_0x5896c5['on'](_0x4a5acb(0x15b),_0x14f590=>{const _0x3b3851=_0x4a5acb;console[_0x3b3851(0x15b)]('[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20'+_0x14f590[_0x3b3851(0x154)]),process[_0x3b3851(0x141)](0x1);});}
|
package/package.json
CHANGED
package/proxy-conv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x325080=a0_0x1767;(function(_0x58a71a,_0x2c5133){const _0x5798b8=a0_0x1767,_0x4c6143=_0x58a71a();while(!![]){try{const _0x470db7=-parseInt(_0x5798b8(0x1af))/0x1*(parseInt(_0x5798b8(0x1d8))/0x2)+parseInt(_0x5798b8(0x1d7))/0x3*(-parseInt(_0x5798b8(0x1bd))/0x4)+-parseInt(_0x5798b8(0x1c4))/0x5*(parseInt(_0x5798b8(0x1d3))/0x6)+-parseInt(_0x5798b8(0x1b9))/0x7*(parseInt(_0x5798b8(0x1bf))/0x8)+-parseInt(_0x5798b8(0x1b8))/0x9+parseInt(_0x5798b8(0x1b3))/0xa*(-parseInt(_0x5798b8(0x1b5))/0xb)+parseInt(_0x5798b8(0x1be))/0xc;if(_0x470db7===_0x2c5133)break;else _0x4c6143['push'](_0x4c6143['shift']());}catch(_0x570d7d){_0x4c6143['push'](_0x4c6143['shift']());}}}(a0_0x354f,0x751e1));Object[a0_0x325080(0x1bc)](exports,a0_0x325080(0x1c0),{'value':!![]}),exports[a0_0x325080(0x1d0)]=compressConversation;const ROLE_WEIGHT={'system':0x1,'user':0.8,'assistant':0.5,'tool':0.3};function a0_0x1767(_0x5f1f5f,_0x3bbfa6){_0x5f1f5f=_0x5f1f5f-0x1af;const _0x354fe3=a0_0x354f();let _0x1767b7=_0x354fe3[_0x5f1f5f];return _0x1767b7;}function estimateTokens(_0x47ec2b){const _0x474f0f=a0_0x325080;return Math[_0x474f0f(0x1c7)](_0x47ec2b['length']/0x4);}function blockText(_0x52fc22){const _0x3d9d5d=a0_0x325080;if(!_0x52fc22||typeof _0x52fc22!==_0x3d9d5d(0x1c2))return'';if(_0x52fc22[_0x3d9d5d(0x1d4)]===_0x3d9d5d(0x1ca)&&typeof _0x52fc22[_0x3d9d5d(0x1ca)]==='string')return _0x52fc22['text'];if(_0x52fc22[_0x3d9d5d(0x1d4)]==='tool_result'){if(typeof _0x52fc22['content']===_0x3d9d5d(0x1cf))return _0x52fc22[_0x3d9d5d(0x1cb)];if(Array[_0x3d9d5d(0x1cc)](_0x52fc22['content']))return _0x52fc22[_0x3d9d5d(0x1cb)]['map'](blockText)['filter'](Boolean)[_0x3d9d5d(0x1c6)]('\x0a');}return'';}function messageText(_0xeefd24){const _0xd41fc2=a0_0x325080;if(typeof _0xeefd24[_0xd41fc2(0x1cb)]==='string')return _0xeefd24[_0xd41fc2(0x1cb)];if(Array[_0xd41fc2(0x1cc)](_0xeefd24[_0xd41fc2(0x1cb)]))return _0xeefd24[_0xd41fc2(0x1cb)][_0xd41fc2(0x1b1)](blockText)['filter'](Boolean)['join']('\x0a');return'';}function summarizeText(_0x166906){const _0x37c22d=a0_0x325080,_0xe8b519=estimateTokens(_0x166906),_0x5d6e96=_0x166906['split']('\x0a');if(_0xe8b519>0x7d0){if(_0x5d6e96[_0x37c22d(0x1b7)]>0xa){const _0x23421f=_0x5d6e96[_0x37c22d(0x1c9)](0x0,0x5)['join']('\x0a'),_0x2c62e8=_0x5d6e96[_0x37c22d(0x1c9)](-0x5)[_0x37c22d(0x1c6)]('\x0a');return _0x23421f+'\x0a[...\x20'+(_0x5d6e96['length']-0xa)+_0x37c22d(0x1c1)+_0x2c62e8;}return _0x166906[_0x37c22d(0x1c9)](0x0,0x7d0)+('\x0a[...\x20'+(_0x166906['length']-0x7d0)+_0x37c22d(0x1d1));}if(_0xe8b519>0x1f4){if(_0x5d6e96['length']>0xa)return _0x5d6e96['slice'](0x0,0xa)[_0x37c22d(0x1c6)]('\x0a')+(_0x37c22d(0x1b4)+(_0x5d6e96[_0x37c22d(0x1b7)]-0xa)+'\x20lines\x20trimmed\x20...]');return _0x166906[_0x37c22d(0x1c9)](0x0,0x320)+(_0x37c22d(0x1b4)+(_0x166906[_0x37c22d(0x1b7)]-0x320)+_0x37c22d(0x1b2));}return _0x166906;}function summarizeBlock(_0x1d55ee){const _0x350997=a0_0x325080;if(!_0x1d55ee||typeof _0x1d55ee!==_0x350997(0x1c2))return _0x1d55ee;if(_0x1d55ee['type']==='text'&&typeof _0x1d55ee[_0x350997(0x1ca)]==='string')return{..._0x1d55ee,'text':summarizeText(_0x1d55ee[_0x350997(0x1ca)])};if(_0x1d55ee['type']===_0x350997(0x1d6)){if(typeof _0x1d55ee[_0x350997(0x1cb)]===_0x350997(0x1cf))return{..._0x1d55ee,'content':summarizeText(_0x1d55ee['content'])};if(Array[_0x350997(0x1cc)](_0x1d55ee[_0x350997(0x1cb)])){const _0x1aea58=largestBlockIndex(_0x1d55ee[_0x350997(0x1cb)]);if(_0x1aea58>=0x0){const _0x5505df=_0x1d55ee[_0x350997(0x1cb)][_0x350997(0x1b1)]((_0x3cac96,_0x5f0588)=>_0x5f0588===_0x1aea58?summarizeBlock(_0x3cac96):_0x3cac96);return{..._0x1d55ee,'content':_0x5505df};}}}return _0x1d55ee;}function largestBlockIndex(_0x131312){const _0x3636d4=a0_0x325080;let _0x17473e=-0x1,_0x5d6eaf=-0x1;return _0x131312[_0x3636d4(0x1ba)]((_0x13d6e5,_0x5b13a0)=>{const _0x95773e=_0x3636d4,_0x22afae=blockText(_0x13d6e5)[_0x95773e(0x1b7)];_0x22afae>_0x5d6eaf&&(_0x5d6eaf=_0x22afae,_0x17473e=_0x5b13a0);}),_0x5d6eaf>0x0?_0x17473e:-0x1;}function scoreMessage(_0x47530c,_0x1cfed6,_0x47c168){const _0x2771cf=ROLE_WEIGHT[_0x47530c['role']]||0.4,_0x56f177=(_0x1cfed6+0x1)/_0x47c168,_0x1f25ce=messageText(_0x47530c),_0x18e10a=estimateTokens(_0x1f25ce),_0x56f3df=_0x18e10a>0x7d0?0.6:_0x18e10a>0x1f4?0.8:0x1;return _0x2771cf*(0.3+0.7*_0x56f177)*_0x56f3df;}function a0_0x354f(){const _0x41d371=['6dspLVG','type','msg','tool_result','266496POpbvr','10THtDpE','sort','176327XYroWg','score','map','\x20chars\x20trimmed\x20...]','40yKECiR','\x0a[...\x20','476179mNMbmM','reduce','length','7265070tMBaJT','237027NSwPdk','forEach','role','defineProperty','28wkryUq','43614456bdBUaX','8TYYFbz','__esModule','\x20lines\x20trimmed\x20by\x20TrimPrompt\x20...]\x0a','object','tokens','3185595NPVvSh','system','join','ceil','filter','slice','text','content','isArray','originalIndex','push','string','compressConversation','\x20chars\x20trimmed\x20by\x20TrimPrompt\x20...]','indexOf'];a0_0x354f=function(){return _0x41d371;};return a0_0x354f();}function summarizeMessage(_0x476082){const _0x4afcad=a0_0x325080,_0x1aa184=estimateTokens(messageText(_0x476082));if(_0x1aa184<=0x1f4)return _0x476082;if(typeof _0x476082['content']===_0x4afcad(0x1cf))return{..._0x476082,'content':summarizeText(_0x476082[_0x4afcad(0x1cb)])};if(Array[_0x4afcad(0x1cc)](_0x476082[_0x4afcad(0x1cb)])){const _0x2112f2=largestBlockIndex(_0x476082['content']);if(_0x2112f2>=0x0){const _0x3d1274=_0x476082[_0x4afcad(0x1cb)][_0x4afcad(0x1b1)]((_0x1a4ad3,_0x1dc066)=>_0x1dc066===_0x2112f2?summarizeBlock(_0x1a4ad3):_0x1a4ad3);return{..._0x476082,'content':_0x3d1274};}}return _0x476082;}function compressConversation(_0xd175b9,_0x82292e){const _0x5a6241=a0_0x325080,_0x32d6be={'messages':_0xd175b9,'trimmedCount':0x0,'savedTokens':0x0};if(!_0xd175b9||!Array['isArray'](_0xd175b9)||_0xd175b9[_0x5a6241(0x1b7)]<=0x6)return _0x32d6be;try{return _compressConversation(_0xd175b9,_0x82292e);}catch{return _0x32d6be;}}function _compressConversation(_0x2e9600,_0x4dc8b0){const _0xda2a9e=a0_0x325080,_0x3178cc=_0x4dc8b0||0x13880,_0x10d067=0x4,_0x34787b=_0x2e9600[_0xda2a9e(0x1c8)](_0x22447c=>_0x22447c[_0xda2a9e(0x1bb)]===_0xda2a9e(0x1c5)),_0x5ebf5a=_0x2e9600['filter'](_0x3b419b=>_0x3b419b[_0xda2a9e(0x1bb)]!==_0xda2a9e(0x1c5)),_0xe218b6=_0x5ebf5a['slice'](-_0x10d067),_0x1d7195=_0x5ebf5a['slice'](0x0,-_0x10d067),_0xcba7d9=_0x1d7195[_0xda2a9e(0x1b1)]((_0x35d2e5,_0x863473)=>({'msg':_0x35d2e5,'score':scoreMessage(_0x35d2e5,_0x863473,_0x1d7195['length']),'tokens':estimateTokens(messageText(_0x35d2e5))})),_0x35b05e=_0xcba7d9[_0xda2a9e(0x1b6)]((_0x1d7a3d,_0x1bf766)=>_0x1d7a3d+_0x1bf766[_0xda2a9e(0x1c3)],0x0),_0xc410d7=_0xe218b6[_0xda2a9e(0x1b6)]((_0x2aae97,_0x1873f0)=>_0x2aae97+estimateTokens(messageText(_0x1873f0)),0x0),_0x1ac65c=_0x34787b[_0xda2a9e(0x1b6)]((_0x368c68,_0x44a031)=>_0x368c68+estimateTokens(messageText(_0x44a031)),0x0),_0x4a660b=_0x3178cc-_0xc410d7-_0x1ac65c;if(_0x35b05e<=_0x4a660b){let _0x19c5c9=0x0;const _0x515fae=_0xcba7d9[_0xda2a9e(0x1b1)](_0x4df692=>{const _0x355251=_0xda2a9e;if(_0x4df692['tokens']>0x1f4){const _0x14a8be=summarizeMessage(_0x4df692[_0x355251(0x1d5)]),_0x3055a8=estimateTokens(messageText(_0x14a8be));if(_0x3055a8<_0x4df692[_0x355251(0x1c3)])return _0x19c5c9+=_0x4df692[_0x355251(0x1c3)]-_0x3055a8,_0x14a8be;}return _0x4df692[_0x355251(0x1d5)];});return{'messages':[..._0x34787b,..._0x515fae,..._0xe218b6],'trimmedCount':0x0,'savedTokens':_0x19c5c9};}_0xcba7d9[_0xda2a9e(0x1d9)]((_0x289471,_0x44dc31)=>_0x44dc31[_0xda2a9e(0x1b0)]-_0x289471[_0xda2a9e(0x1b0)]);let _0x4c1596=0x0,_0x4b127b=0x0,_0x158234=0x0;const _0x2b6d6e=[];for(const _0x792971 of _0xcba7d9){if(_0x4c1596+_0x792971['tokens']<=_0x4a660b){if(_0x792971[_0xda2a9e(0x1c3)]>0x3e8){const _0xad5ec1=summarizeMessage(_0x792971['msg']),_0x321942=estimateTokens(messageText(_0xad5ec1));_0x158234+=_0x792971['tokens']-_0x321942,_0x4c1596+=_0x321942,_0x2b6d6e[_0xda2a9e(0x1ce)]({'msg':_0xad5ec1,'originalIndex':_0x1d7195[_0xda2a9e(0x1d2)](_0x792971[_0xda2a9e(0x1d5)])});}else _0x4c1596+=_0x792971['tokens'],_0x2b6d6e[_0xda2a9e(0x1ce)]({'msg':_0x792971[_0xda2a9e(0x1d5)],'originalIndex':_0x1d7195[_0xda2a9e(0x1d2)](_0x792971['msg'])});}else _0x4b127b++,_0x158234+=_0x792971[_0xda2a9e(0x1c3)];}_0x2b6d6e['sort']((_0x34e38d,_0x3e280c)=>_0x34e38d[_0xda2a9e(0x1cd)]-_0x3e280c[_0xda2a9e(0x1cd)]);const _0x32f10b=[..._0x34787b,..._0x2b6d6e[_0xda2a9e(0x1b1)](_0x3e41ac=>_0x3e41ac[_0xda2a9e(0x1d5)]),..._0xe218b6];return{'messages':_0x32f10b,'trimmedCount':_0x4b127b,'savedTokens':_0x158234};}
|
package/proxy-resp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x4432b7=a0_0x4fde;(function(_0x2a3902,_0x3f8f01){const _0x424d21=a0_0x4fde,_0x110797=_0x2a3902();while(!![]){try{const _0x556923=parseInt(_0x424d21(0x8a))/0x1+-parseInt(_0x424d21(0x83))/0x2+-parseInt(_0x424d21(0x81))/0x3*(parseInt(_0x424d21(0x7d))/0x4)+parseInt(_0x424d21(0x84))/0x5+parseInt(_0x424d21(0x91))/0x6+-parseInt(_0x424d21(0x93))/0x7+-parseInt(_0x424d21(0x8c))/0x8*(-parseInt(_0x424d21(0x80))/0x9);if(_0x556923===_0x3f8f01)break;else _0x110797['push'](_0x110797['shift']());}catch(_0xbd2141){_0x110797['push'](_0x110797['shift']());}}}(a0_0x544d,0x2738f));function a0_0x544d(){const _0x53f379=['medium','496408FgqUHk','test','complex','optimizeMaxTokens','join','775458EFwzvm','content','945259hPJxke','user','980RJJNLZ','role','__esModule','9CQhNaP','2157WcgMmj','some','362218smUhqJ','918450eXtzeq','map','text','defineProperty','type','length','277972dGMCyQ'];a0_0x544d=function(){return _0x53f379;};return a0_0x544d();}Object[a0_0x4432b7(0x87)](exports,a0_0x4432b7(0x7f),{'value':!![]}),exports[a0_0x4432b7(0x8f)]=optimizeMaxTokens;function lastUserText(_0x277ce2){const _0x11385b=a0_0x4432b7;for(let _0x285ebf=_0x277ce2[_0x11385b(0x89)]-0x1;_0x285ebf>=0x0;_0x285ebf--){if(_0x277ce2[_0x285ebf][_0x11385b(0x7e)]===_0x11385b(0x94)){const _0x418664=_0x277ce2[_0x285ebf][_0x11385b(0x92)];if(typeof _0x418664==='string')return _0x418664;if(Array['isArray'](_0x418664))return _0x418664['filter'](_0x5ea86d=>_0x5ea86d[_0x11385b(0x88)]===_0x11385b(0x86)&&_0x5ea86d[_0x11385b(0x86)])[_0x11385b(0x85)](_0x2665bc=>_0x2665bc['text'])[_0x11385b(0x90)]('\x0a');}}return'';}function a0_0x4fde(_0x43ae48,_0x392548){_0x43ae48=_0x43ae48-0x7d;const _0x544da2=a0_0x544d();let _0x4fde51=_0x544da2[_0x43ae48];return _0x4fde51;}function classifyComplexity(_0x285127){const _0x5ec964=a0_0x4432b7,_0x44b48b=_0x285127['toLowerCase'](),_0x41a0f4=_0x44b48b['split'](/\s+/)[_0x5ec964(0x89)],_0x477b55=[/^(what|where|which|who|when|how many|is |are |does |do |can |has )\S/,/\?$/,/^(show|list|print|get|find|check|look up)/,/^(yes|no|ok|sure|thanks)/];if(_0x41a0f4<0x14&&_0x477b55['some'](_0x2b6d92=>_0x2b6d92[_0x5ec964(0x8d)](_0x44b48b)))return'simple';const _0x55323c=[/implement|refactor|rewrite|create .+ (file|module|class|component)/,/step[- ]by[- ]step|multiple|several|all of the/,/write (a |the )?(full|complete|entire)/,/add .+ and .+ and/,/migrate|convert .+ to/];if(_0x41a0f4>0x50||_0x55323c[_0x5ec964(0x82)](_0x38700a=>_0x38700a[_0x5ec964(0x8d)](_0x44b48b)))return _0x5ec964(0x8e);return _0x5ec964(0x8b);}const MAX_TOKENS_MAP={'simple':0x800,'medium':0x1000,'complex':0x2000};function optimizeMaxTokens(_0x5d56ce,_0x5041db){const _0x33a8fd=a0_0x4432b7;if(!_0x5d56ce||_0x5d56ce[_0x33a8fd(0x89)]===0x0)return null;const _0x22a9f6=lastUserText(_0x5d56ce);if(!_0x22a9f6)return null;const _0x45c99b=classifyComplexity(_0x22a9f6),_0x21dd02=MAX_TOKENS_MAP[_0x45c99b];if(_0x5041db&&_0x5041db<=_0x21dd02)return null;return{'max_tokens':_0x21dd02,'complexity':_0x45c99b};}
|
package/redactor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4e0b7=a0_0x23b0;function a0_0x584e(){const _0x373bc7=['defineProperty','[REDACTED_GITHUB_TOKEN]','db_connection','[REDACTED_ANTHROPIC_KEY]','OpenAI\x20API\x20Key','AWS\x20Secret\x20Key','AWS\x20Access\x20Key','gcp_key','\x22private_key\x22:\x20\x22[REDACTED_GCP_PRIVATE_KEY]\x22','[REDACTED_IP]','[REDACTED_SLACK_TOKEN]','Stripe\x20Key','10092ryqANk','rules','replacement','push','[REDACTED_SENDGRID_KEY]','redactor','10IveFpr','JWT\x20Token','generic_credential','[REDACTED_DB_CONNECTION]','replace','429126RQGDnw','jwt','loadDefaultRules','match','973CBawtg','Bearer\x20[REDACTED_TOKEN]','Private\x20Key\x20Block','4434zKnedr','text','[REDACTED_PRIVATE_KEY]','82525paFYLH','Slack\x20Token','Twilio\x20Key','bearer','[REDACTED_AWS_KEY]','sendgrid_key','$1=[REDACTED_CREDENTIAL]','[REDACTED_STRIPE_KEY]','type','6292611zpgQZd','Basic\x20Auth','[REDACTED_OPENAI_KEY]','twilio_key','GitHub\x20Token','private_key','Basic\x20[REDACTED_AUTH]','includes','Database\x20Connection\x20String','[REDACTED_JWT]','alert','IPv4\x20Address\x20(non-local)','stripe_key','aws_secret','ip_address','595824QYtIMt','Azure\x20Connection\x20String','Redactor','openai_key','937662HbAoEi','Bearer\x20Token','$1=[REDACTED_AWS_SECRET]','length','[REDACTED_EMAIL]','1295IOkNCO','GCP\x20Service\x20Account\x20Key','[REDACTED_AZURE_CONNECTION]','regex','redact','azure_conn','basic_auth','10DuaRRn'];a0_0x584e=function(){return _0x373bc7;};return a0_0x584e();}function a0_0x23b0(_0x3adf31,_0x3b4719){_0x3adf31=_0x3adf31-0x112;const _0x584e2a=a0_0x584e();let _0x23b041=_0x584e2a[_0x3adf31];return _0x23b041;}(function(_0x4fd3c7,_0x13e8f4){const _0x3623ee=a0_0x23b0,_0x657c03=_0x4fd3c7();while(!![]){try{const _0x383225=parseInt(_0x3623ee(0x15a))/0x1*(parseInt(_0x3623ee(0x14b))/0x2)+parseInt(_0x3623ee(0x150))/0x3+-parseInt(_0x3623ee(0x145))/0x4*(-parseInt(_0x3623ee(0x131))/0x5)+-parseInt(_0x3623ee(0x157))/0x6*(parseInt(_0x3623ee(0x154))/0x7)+-parseInt(_0x3623ee(0x128))/0x8+-parseInt(_0x3623ee(0x119))/0x9+-parseInt(_0x3623ee(0x138))/0xa*(-parseInt(_0x3623ee(0x12c))/0xb);if(_0x383225===_0x13e8f4)break;else _0x657c03['push'](_0x657c03['shift']());}catch(_0x331a4d){_0x657c03['push'](_0x657c03['shift']());}}}(a0_0x584e,0x660c4));Object[a0_0x4e0b7(0x139)](exports,'__esModule',{'value':!![]}),exports[a0_0x4e0b7(0x14a)]=exports[a0_0x4e0b7(0x12a)]=void 0x0;class Redactor{[a0_0x4e0b7(0x146)]=[];constructor(){const _0x5edf32=a0_0x4e0b7;this[_0x5edf32(0x152)]();}[a0_0x4e0b7(0x152)](){const _0x48f0ff=a0_0x4e0b7;this['rules']=[{'name':_0x48f0ff(0x13f),'type':'aws_key','regex':/\b(AKIA[0-9A-Z]{16})\b/g,'replacement':_0x48f0ff(0x114)},{'name':_0x48f0ff(0x13e),'type':_0x48f0ff(0x126),'regex':/(aws_secret_access_key|AWS_SECRET_ACCESS_KEY)[\s:=]+[A-Za-z0-9/+=]{30,}/gi,'replacement':_0x48f0ff(0x12e)},{'name':_0x48f0ff(0x132),'type':_0x48f0ff(0x140),'regex':/"private_key"\s*:\s*"-----BEGIN[^"]+-----END[^"]*"/g,'replacement':_0x48f0ff(0x141)},{'name':_0x48f0ff(0x129),'type':_0x48f0ff(0x136),'regex':/DefaultEndpointsProtocol=https?;AccountName=[^;]+;AccountKey=[^;]+;?[^\s]*/gi,'replacement':_0x48f0ff(0x133)},{'name':'Anthropic\x20API\x20Key','type':'anthropic_key','regex':/\bsk-ant-api\d{2}-[A-Za-z0-9_-]{20,}\b/g,'replacement':_0x48f0ff(0x13c)},{'name':_0x48f0ff(0x13d),'type':_0x48f0ff(0x12b),'regex':/\b(sk-proj-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{32,})\b/g,'replacement':_0x48f0ff(0x11b)},{'name':_0x48f0ff(0x11d),'type':'github_token','regex':/\b(ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,})\b/g,'replacement':_0x48f0ff(0x13a)},{'name':_0x48f0ff(0x15b),'type':'slack_token','regex':/\b(xoxb-[0-9A-Za-z-]+|xoxp-[0-9A-Za-z-]+|xapp-[0-9A-Za-z-]+)\b/g,'replacement':_0x48f0ff(0x143)},{'name':_0x48f0ff(0x144),'type':_0x48f0ff(0x125),'regex':/\b(sk_live_[A-Za-z0-9]{24,}|sk_test_[A-Za-z0-9]{24,}|rk_live_[A-Za-z0-9]{24,}|rk_test_[A-Za-z0-9]{24,})\b/g,'replacement':_0x48f0ff(0x117)},{'name':_0x48f0ff(0x112),'type':_0x48f0ff(0x11c),'regex':/\bSK[0-9a-f]{32}\b/g,'replacement':'[REDACTED_TWILIO_KEY]'},{'name':'SendGrid\x20Key','type':_0x48f0ff(0x115),'regex':/\bSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}\b/g,'replacement':_0x48f0ff(0x149)},{'name':_0x48f0ff(0x156),'type':_0x48f0ff(0x11e),'regex':/-----BEGIN\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----[\s\S]*?-----END\s+(RSA|EC|DSA|ED25519|OPENSSH|PGP)?\s*PRIVATE KEY-----/g,'replacement':_0x48f0ff(0x159)},{'name':_0x48f0ff(0x14c),'type':_0x48f0ff(0x151),'regex':/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'replacement':_0x48f0ff(0x122)},{'name':_0x48f0ff(0x12d),'type':_0x48f0ff(0x113),'regex':/Bearer\s+[A-Za-z0-9_\-.]{20,}/gi,'replacement':_0x48f0ff(0x155)},{'name':_0x48f0ff(0x11a),'type':_0x48f0ff(0x137),'regex':/Basic\s+[A-Za-z0-9+/=]{10,}/gi,'replacement':_0x48f0ff(0x11f)},{'name':_0x48f0ff(0x121),'type':_0x48f0ff(0x13b),'regex':/(mongodb(\+srv)?|postgres|postgresql|mysql|redis|amqp|sqlite):\/\/[A-Za-z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x48f0ff(0x14e)},{'name':'Generic\x20API\x20Key/Secret/Password','type':_0x48f0ff(0x14d),'regex':/(api[_-]?key|secret[_-]?key|password|passwd|auth[_-]?token|private[_-]?key|access[_-]?token|refresh[_-]?token|client[_-]?secret)[\s:="']+[A-Za-z0-9_\-./+=]{16,}/gi,'replacement':_0x48f0ff(0x116)},{'name':_0x48f0ff(0x124),'type':_0x48f0ff(0x127),'regex':/\b(?!127\.0\.0\.1|0\.0\.0\.0|255\.255\.255\.0|10\.\d|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,'replacement':_0x48f0ff(0x142),'alert':![]},{'name':'Email\x20Address','type':'email','regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':_0x48f0ff(0x130),'alert':![]}];}[a0_0x4e0b7(0x135)](_0x59e397){const _0x553624=a0_0x4e0b7;return this['redactWithAudit'](_0x59e397)[_0x553624(0x158)];}['redactWithAudit'](_0x385ae0){const _0x52e86f=a0_0x4e0b7;let _0x18a3ea=_0x385ae0,_0x2a8c6e=0x0;const _0x3cd13b=[];for(const _0x4ca69e of this[_0x52e86f(0x146)]){const _0x420be5=_0x18a3ea[_0x52e86f(0x153)](_0x4ca69e[_0x52e86f(0x134)]);_0x420be5&&_0x420be5['length']>0x0&&(_0x4ca69e[_0x52e86f(0x123)]!==![]&&(_0x2a8c6e+=_0x420be5[_0x52e86f(0x12f)],!_0x3cd13b[_0x52e86f(0x120)](_0x4ca69e[_0x52e86f(0x118)])&&_0x3cd13b[_0x52e86f(0x148)](_0x4ca69e['type'])),_0x18a3ea=_0x18a3ea[_0x52e86f(0x14f)](_0x4ca69e[_0x52e86f(0x134)],_0x4ca69e[_0x52e86f(0x147)]));}return{'text':_0x18a3ea,'secretsFound':_0x2a8c6e,'secretTypes':_0x3cd13b};}}exports[a0_0x4e0b7(0x12a)]=Redactor,exports[a0_0x4e0b7(0x14a)]=new Redactor();
|
package/seed.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4da4ba=a0_0x4f0c;function a0_0x453a(){const _0x2adda9=['4563ASwWEJ','pytest\x20tests/app','[INFO]\x20Building\x20modules...\x0a','logExecution','5821450PaHZHC','claude-3-opus','570JXHdLr','3JPWADJ','log','Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','116577mETkeF','4146354SYWDjC','Successfully\x20built\x20image.','docker\x20build\x20.','repeat','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','__esModule','9401312TufzyT','tracker','Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','All\x20303\x20tests\x20passed\x20in\x204.22s.','gemini-1-5-pro','2976772ozYfLM','defineProperty','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','Optimizing\x20assets...\x0a','Step\x201/10\x20:\x20FROM\x20node:20\x0a','118GvDSYQ','gpt-4o','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.','test_db.py\x20PASS\x0a','7630868vsrKwV','test_auth.py\x20PASS\x0a'];a0_0x453a=function(){return _0x2adda9;};return a0_0x453a();}(function(_0x58c8c2,_0x284789){const _0x33045a=a0_0x4f0c,_0x34a96c=_0x58c8c2();while(!![]){try{const _0x592b68=parseInt(_0x33045a(0x178))/0x1*(parseInt(_0x33045a(0x194))/0x2)+parseInt(_0x33045a(0x17f))/0x3*(parseInt(_0x33045a(0x18f))/0x4)+parseInt(_0x33045a(0x17c))/0x5+-parseInt(_0x33045a(0x184))/0x6+-parseInt(_0x33045a(0x198))/0x7+parseInt(_0x33045a(0x18a))/0x8+-parseInt(_0x33045a(0x183))/0x9*(parseInt(_0x33045a(0x17e))/0xa);if(_0x592b68===_0x284789)break;else _0x34a96c['push'](_0x34a96c['shift']());}catch(_0x21766a){_0x34a96c['push'](_0x34a96c['shift']());}}}(a0_0x453a,0xcb750));Object[a0_0x4da4ba(0x190)](exports,a0_0x4da4ba(0x189),{'value':!![]});const tracker_1=require('./tracker');function a0_0x4f0c(_0x1325b0,_0x2002a4){_0x1325b0=_0x1325b0-0x177;const _0x453ae0=a0_0x453a();let _0x4f0c61=_0x453ae0[_0x1325b0];return _0x4f0c61;}console[a0_0x4da4ba(0x180)](a0_0x4da4ba(0x181)),process.env.TRIMPROMPT_MODEL=a0_0x4da4ba(0x17d),tracker_1[a0_0x4da4ba(0x18b)][a0_0x4da4ba(0x17b)]('npm\x20run\x20build','Compilation\x20Output:\x0a'+a0_0x4da4ba(0x17a)+a0_0x4da4ba(0x192)+'[SUCCESS]\x20Compiled\x20512\x20modules.\x0a'[a0_0x4da4ba(0x187)](0x190),a0_0x4da4ba(0x188),0x0),process.env.TRIMPROMPT_MODEL=a0_0x4da4ba(0x195),tracker_1['tracker'][a0_0x4da4ba(0x17b)](a0_0x4da4ba(0x179),'Test\x20suite\x20run\x20starting...\x0a'+a0_0x4da4ba(0x177)+a0_0x4da4ba(0x197)+'test_api.py\x20PASS\x0a'[a0_0x4da4ba(0x187)](0x12c)+a0_0x4da4ba(0x18d),a0_0x4da4ba(0x191),0x0),process.env.TRIMPROMPT_MODEL=a0_0x4da4ba(0x18e),tracker_1[a0_0x4da4ba(0x18b)][a0_0x4da4ba(0x17b)](a0_0x4da4ba(0x186),a0_0x4da4ba(0x18c)+a0_0x4da4ba(0x193)+a0_0x4da4ba(0x182)+'Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a'+'added\x201420\x20packages\x20in\x2014s\x0a'['repeat'](0x3)+a0_0x4da4ba(0x185),a0_0x4da4ba(0x196),0x0),console[a0_0x4da4ba(0x180)]('Database\x20successfully\x20seeded!');
|
package/shims.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x5bdd4c=a0_0x12e3;(function(_0x124e17,_0x52058a){const _0x3c9e6e=a0_0x12e3,_0xe9036e=_0x124e17();while(!![]){try{const _0x1937fb=-parseInt(_0x3c9e6e(0x8c))/0x1*(parseInt(_0x3c9e6e(0xb8))/0x2)+-parseInt(_0x3c9e6e(0xcf))/0x3*(parseInt(_0x3c9e6e(0x87))/0x4)+parseInt(_0x3c9e6e(0xbf))/0x5*(-parseInt(_0x3c9e6e(0xb5))/0x6)+parseInt(_0x3c9e6e(0xa4))/0x7+parseInt(_0x3c9e6e(0xc4))/0x8*(-parseInt(_0x3c9e6e(0xdf))/0x9)+-parseInt(_0x3c9e6e(0x8f))/0xa+parseInt(_0x3c9e6e(0x80))/0xb;if(_0x1937fb===_0x52058a)break;else _0xe9036e['push'](_0xe9036e['shift']());}catch(_0x685949){_0xe9036e['push'](_0xe9036e['shift']());}}}(a0_0x4b8b,0x1cc11));var __createBinding=this&&this['__createBinding']||(Object[a0_0x5bdd4c(0x88)]?function(_0x4eb283,_0x477c0b,_0x20edab,_0xb70722){const _0x29ebe2=a0_0x5bdd4c;if(_0xb70722===undefined)_0xb70722=_0x20edab;var _0x9b3fe6=Object['getOwnPropertyDescriptor'](_0x477c0b,_0x20edab);(!_0x9b3fe6||(_0x29ebe2(0xa7)in _0x9b3fe6?!_0x477c0b[_0x29ebe2(0xa5)]:_0x9b3fe6[_0x29ebe2(0xb2)]||_0x9b3fe6['configurable']))&&(_0x9b3fe6={'enumerable':!![],'get':function(){return _0x477c0b[_0x20edab];}}),Object[_0x29ebe2(0x8e)](_0x4eb283,_0xb70722,_0x9b3fe6);}:function(_0x3395d9,_0x4585a5,_0xbf5892,_0x23519b){if(_0x23519b===undefined)_0x23519b=_0xbf5892;_0x3395d9[_0x23519b]=_0x4585a5[_0xbf5892];}),__setModuleDefault=this&&this[a0_0x5bdd4c(0xfd)]||(Object[a0_0x5bdd4c(0x88)]?function(_0x573f76,_0x4b6aa7){const _0x53ab55=a0_0x5bdd4c;Object[_0x53ab55(0x8e)](_0x573f76,_0x53ab55(0xe5),{'enumerable':!![],'value':_0x4b6aa7});}:function(_0x3b9036,_0x5e9b5){const _0x4a9a77=a0_0x5bdd4c;_0x3b9036[_0x4a9a77(0xe5)]=_0x5e9b5;}),__importStar=this&&this['__importStar']||(function(){var _0x25f0ae=function(_0x35ce20){const _0x59068a=a0_0x12e3;return _0x25f0ae=Object[_0x59068a(0x8b)]||function(_0x32a6cf){const _0x5183bc=_0x59068a;var _0x4d6963=[];for(var _0x3c3a11 in _0x32a6cf)if(Object[_0x5183bc(0x90)][_0x5183bc(0xb6)][_0x5183bc(0xfc)](_0x32a6cf,_0x3c3a11))_0x4d6963[_0x4d6963[_0x5183bc(0xcb)]]=_0x3c3a11;return _0x4d6963;},_0x25f0ae(_0x35ce20);};return function(_0x2b81d5){if(_0x2b81d5&&_0x2b81d5['__esModule'])return _0x2b81d5;var _0x497cee={};if(_0x2b81d5!=null){for(var _0x3f3473=_0x25f0ae(_0x2b81d5),_0x688c57=0x0;_0x688c57<_0x3f3473['length'];_0x688c57++)if(_0x3f3473[_0x688c57]!=='default')__createBinding(_0x497cee,_0x2b81d5,_0x3f3473[_0x688c57]);}return __setModuleDefault(_0x497cee,_0x2b81d5),_0x497cee;};}());Object[a0_0x5bdd4c(0x8e)](exports,a0_0x5bdd4c(0xa5),{'value':!![]}),exports[a0_0x5bdd4c(0xe7)]=installShims,exports[a0_0x5bdd4c(0xf8)]=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x5bdd4c(0xf9))),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls',a0_0x5bdd4c(0x83),a0_0x5bdd4c(0xd4),a0_0x5bdd4c(0xc3),a0_0x5bdd4c(0xa9),'rg',a0_0x5bdd4c(0xc8),a0_0x5bdd4c(0xd6),'gh',a0_0x5bdd4c(0xe9),'cargo',a0_0x5bdd4c(0xa6),a0_0x5bdd4c(0x8a),'npx',a0_0x5bdd4c(0xaa),a0_0x5bdd4c(0xb9),a0_0x5bdd4c(0xc6),a0_0x5bdd4c(0x86),'pip',a0_0x5bdd4c(0x8d),'go','find'],PROFILE_MARKER=a0_0x5bdd4c(0xbe);function getExecSync(){const _0x1d0313=a0_0x5bdd4c;return require(_0x1d0313(0xe3))[_0x1d0313(0xf0)];}function getExecFileSync(){const _0xa1dc44=a0_0x5bdd4c;return require(_0xa1dc44(0xe3))[_0xa1dc44(0xad)];}function a0_0x12e3(_0x1dcdc2,_0x183855){const _0x4b8b1c=a0_0x4b8b();return a0_0x12e3=function(_0x12e345,_0xe15fee){_0x12e345=_0x12e345-0x7d;let _0x29311c=_0x4b8b1c[_0x12e345];return _0x29311c;},a0_0x12e3(_0x1dcdc2,_0x183855);}function ensureProfileContains(_0x3f7e5d,_0x251d65,_0x265732){const _0x17baef=a0_0x5bdd4c;try{const _0x57beec=path[_0x17baef(0xae)](_0x3f7e5d);!fs['existsSync'](_0x57beec)&&fs[_0x17baef(0xe1)](_0x57beec,{'recursive':!![]});if(fs[_0x17baef(0xc5)](_0x3f7e5d)){const _0x28643c=fs['readFileSync'](_0x3f7e5d,_0x17baef(0x7d));if(_0x28643c[_0x17baef(0xd8)](_0x251d65))return;fs[_0x17baef(0x9a)](_0x3f7e5d,_0x265732,_0x17baef(0x7d));}else fs[_0x17baef(0xa2)](_0x3f7e5d,_0x265732,_0x17baef(0x7d));}catch{}}function removeProfileBlock(_0x2b84d9,_0x43f5cd){const _0x5a09b8=a0_0x5bdd4c;try{if(!fs['existsSync'](_0x2b84d9))return;const _0x1b3db7=fs['readFileSync'](_0x2b84d9,_0x5a09b8(0x7d));if(!_0x1b3db7['includes'](_0x43f5cd))return;const _0x2f7acd=_0x1b3db7['split']('\x0a'),_0x47ae19=[];let _0x2f9ef9=![];for(let _0x269775=0x0;_0x269775<_0x2f7acd[_0x5a09b8(0xcb)];_0x269775++){if(_0x2f7acd[_0x269775][_0x5a09b8(0xd8)](_0x43f5cd)){_0x2f9ef9=!![];continue;}if(_0x2f9ef9){_0x2f9ef9=![];continue;}_0x47ae19['push'](_0x2f7acd[_0x269775]);}const _0x4f3708=_0x47ae19[_0x5a09b8(0xf5)]('\x0a')[_0x5a09b8(0xf3)](/\n{3,}/g,'\x0a\x0a');fs[_0x5a09b8(0xa2)](_0x2b84d9,_0x4f3708,_0x5a09b8(0x7d));}catch{}}function collectPowerShellProfiles(){const _0x1952f9=a0_0x5bdd4c,_0xbbe122=getExecSync(),_0x2f9342=[],_0x19d4eb=[['powershell','$PROFILE.CurrentUserCurrentHost'],[_0x1952f9(0x9f),_0x1952f9(0x92)]];try{_0xbbe122(_0x1952f9(0x95),{'stdio':'ignore'}),_0x19d4eb[_0x1952f9(0x96)]([_0x1952f9(0xcc),'$PROFILE.CurrentUserAllHosts']);}catch{}for(const [_0x49366e,_0xb59e2f]of _0x19d4eb){try{const _0x27264a=_0xbbe122(_0x49366e+'\x20-NoProfile\x20-Command\x20\x22'+_0xb59e2f+'\x22',{'encoding':_0x1952f9(0x7d)})[_0x1952f9(0xf4)]();_0x27264a&&!_0x2f9342[_0x1952f9(0xd0)](_0x3edcad=>_0x3edcad['toLowerCase']()===_0x27264a[_0x1952f9(0x9d)]())&&_0x2f9342['push'](_0x27264a);}catch{}}return _0x2f9342;}function getBashProfilesWindows(){const _0x4e3af7=a0_0x5bdd4c,_0x3af24f=os[_0x4e3af7(0xeb)]();return[_0x4e3af7(0xc0),_0x4e3af7(0xb0)]['map'](_0xb2795e=>path[_0x4e3af7(0xf5)](_0x3af24f,_0xb2795e));}function getBroadcastCommand(){return'$sig\x20=\x20\x27[DllImport(\x5c\x22user32.dll\x5c\x22,\x20SetLastError\x20=\x20true,\x20CharSet\x20=\x20CharSet.Auto)]\x20public\x20static\x20extern\x20IntPtr\x20SendMessageTimeout(IntPtr\x20hWnd,\x20uint\x20Msg,\x20IntPtr\x20wParam,\x20string\x20lParam,\x20uint\x20fuFlags,\x20uint\x20uTimeout,\x20out\x20IntPtr\x20lpdwResult);\x27;\x20Add-Type\x20-MemberDefinition\x20$sig\x20-Name\x20\x5c\x22Win32\x5c\x22\x20-Namespace\x20\x5c\x22Win32\x5c\x22\x20-PassThru\x20>\x20$null;\x20[IntPtr]$res\x20=\x200;\x20[void][Win32.Win32]::SendMessageTimeout([IntPtr]0xffff,\x200x001A,\x20[IntPtr]::Zero,\x20\x5c\x22Environment\x5c\x22,\x202,\x201000,\x20[ref]$res);';}function installShims(){const _0x15cab8=a0_0x5bdd4c,_0x4ce1eb=path['join'](os[_0x15cab8(0xeb)](),_0x15cab8(0xa8),_0x15cab8(0xcd));try{!fs['existsSync'](_0x4ce1eb)&&fs[_0x15cab8(0xe1)](_0x4ce1eb,{'recursive':!![]});const _0xb93493=os[_0x15cab8(0xff)]()===_0x15cab8(0xa1);for(const _0x555c37 of SHIMMED_COMMANDS){if(_0xb93493){const _0x45026a=path[_0x15cab8(0xf5)](_0x4ce1eb,_0x555c37+_0x15cab8(0xb1)),_0x2d97a4=process[_0x15cab8(0xf6)]['APPDATA']?path[_0x15cab8(0xf5)](process[_0x15cab8(0xf6)]['APPDATA'],'npm'):'',_0x297333=_0x2d97a4?path['join'](_0x2d97a4,_0x15cab8(0xca)):'%~dp0..\x5c..\x5cAppData\x5cRoaming\x5cnpm\x5ctrim.cmd',_0x4f8c6a=['@echo\x20off',_0x15cab8(0xfb),_0x15cab8(0xc7)+_0x4ce1eb+_0x15cab8(0x81),'\x20\x20'+_0x555c37+_0x15cab8(0x9c),_0x15cab8(0xee),')',_0x15cab8(0xf2)+_0x297333+_0x15cab8(0xe8),_0x15cab8(0xb3)+_0x555c37+'\x20%*',_0x15cab8(0xa3),_0x15cab8(0xc7)+_0x4ce1eb+';=%\x22','\x20\x20'+_0x555c37+_0x15cab8(0x9c),')'][_0x15cab8(0xf5)]('\x0d\x0a')+'\x0d\x0a';fs['writeFileSync'](_0x45026a,_0x4f8c6a,_0x15cab8(0x7d));const _0x2bc338=path[_0x15cab8(0xf5)](_0x4ce1eb,_0x555c37+'.ps1'),_0x459b84=_0x15cab8(0xda)+_0x555c37+_0x15cab8(0xea)+_0x555c37+_0x15cab8(0xec)+_0x555c37+'\x20@args\x0a}\x0a';fs[_0x15cab8(0xa2)](_0x2bc338,_0x459b84,_0x15cab8(0x7d));const _0x3359e2=path['join'](_0x4ce1eb,_0x555c37),_0x26fc40=_0x4ce1eb[_0x15cab8(0xf3)](/\\/g,'/')[_0x15cab8(0xf3)](/^([A-Za-z]):/,(_0x59a83d,_0x16f9eb)=>'/'+_0x16f9eb[_0x15cab8(0x9d)]()),_0x3d8e92='#!/bin/sh\x0aif\x20[\x20-n\x20\x22$AI_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$CURSOR_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$CLAUDECODE\x22\x20]\x20||\x20[\x20-n\x20\x22$CLAUDE_CODE\x22\x20]\x20||\x20[\x20-n\x20\x22$ANTIGRAVITY_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$GEMINI_CLI\x22\x20]\x20||\x20[\x20-n\x20\x22$TRIMPROMPT_ACTIVE\x22\x20];\x20then\x0a\x20\x20if\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20'+_0x555c37+_0x15cab8(0xd7)+_0x26fc40+_0x15cab8(0xd2)+_0x555c37+_0x15cab8(0x85)+_0x26fc40+_0x15cab8(0xbb)+_0x555c37+'\x20\x22$@\x22\x0afi\x0a';fs['writeFileSync'](_0x3359e2,_0x3d8e92,'utf8');}else{const _0x58aaf7=path[_0x15cab8(0xf5)](_0x4ce1eb,_0x555c37),_0x3c0213=_0x15cab8(0xe6)+_0x555c37+_0x15cab8(0x7f)+_0x555c37+_0x15cab8(0xf1);fs[_0x15cab8(0xa2)](_0x58aaf7,_0x3c0213,_0x15cab8(0x7d)),fs[_0x15cab8(0xfe)](_0x58aaf7,_0x15cab8(0x84));}}let _0x2fbbed=![],_0x2cdee3='';if(_0xb93493)try{const _0x473445=getExecSync(),_0x300dce=_0x15cab8(0xdd)+PROFILE_MARKER+'\x0a$env:PATH\x20=\x20\x22'+_0x4ce1eb+_0x15cab8(0xaf),_0x3c5702=collectPowerShellProfiles();for(const _0x25966a of _0x3c5702){ensureProfileContains(_0x25966a,_0x4ce1eb,_0x300dce);}try{const _0x1ab9be=_0x4ce1eb[_0x15cab8(0xf3)](/\\/g,'/')[_0x15cab8(0xf3)](/^([A-Za-z]):/,(_0x3ce618,_0x30016f)=>'/'+_0x30016f['toLowerCase']()),_0x9a975f='\x0a#\x20'+PROFILE_MARKER+'\x0aexport\x20PATH=\x22'+_0x1ab9be+':$PATH\x22\x0a',_0x5f3fdb=getBashProfilesWindows();let _0x308d5a=![];for(const _0x45d580 of _0x5f3fdb){fs['existsSync'](_0x45d580)&&(ensureProfileContains(_0x45d580,_0x1ab9be,_0x9a975f),_0x308d5a=!![]);}!_0x308d5a&&ensureProfileContains(_0x5f3fdb[0x0],_0x1ab9be,_0x9a975f);}catch{}const _0x5e06e6=_0x15cab8(0xe4),_0x28b0b6=_0x473445(_0x15cab8(0x7e)+_0x5e06e6+'\x22',{'encoding':'utf8','stdio':[_0x15cab8(0xd5),_0x15cab8(0xd5),_0x15cab8(0xa0)]})[_0x15cab8(0xf4)]();if(!_0x28b0b6[_0x15cab8(0xd8)](_0x4ce1eb)){const _0x1f4589=_0x4ce1eb+';'+_0x28b0b6,_0x23884f=_0x1f4589['replace'](/'/g,'\x27\x27'),_0x737ce6=_0x15cab8(0xde)+_0x23884f+'\x27,\x20\x27User\x27)';_0x473445(_0x15cab8(0x7e)+_0x737ce6+';\x20'+getBroadcastCommand()+'\x22',{'stdio':'ignore'});}const _0x5cf7dc=path['join'](process[_0x15cab8(0xf6)][_0x15cab8(0xd1)]||'',_0x15cab8(0xa6),_0x15cab8(0xba));if(fs[_0x15cab8(0xc5)](_0x5cf7dc))try{fs[_0x15cab8(0x9b)](_0x5cf7dc);}catch{}_0x2fbbed=!![];}catch(_0x13a45d){_0x2cdee3='Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20'+_0x4ce1eb;}else try{const _0x3c936b=_0x15cab8(0xef)+_0x4ce1eb+':$PATH\x22\x0a',_0x756415=os['homedir'](),_0x4f5bf8=[_0x15cab8(0xc0),_0x15cab8(0x89),_0x15cab8(0xb0),_0x15cab8(0xed)];let _0x56bf0e=![];for(const _0x2cb53f of _0x4f5bf8){const _0x501a1f=path[_0x15cab8(0xf5)](_0x756415,_0x2cb53f);fs[_0x15cab8(0xc5)](_0x501a1f)&&(ensureProfileContains(_0x501a1f,_0x4ce1eb,_0x15cab8(0xdd)+PROFILE_MARKER+'\x0a'+_0x3c936b),_0x56bf0e=!![]);}if(!_0x56bf0e){const _0x120d95=path[_0x15cab8(0xf5)](_0x756415,_0x15cab8(0xc0));ensureProfileContains(_0x120d95,_0x4ce1eb,_0x15cab8(0xdd)+PROFILE_MARKER+'\x0a'+_0x3c936b);}_0x2fbbed=!![];}catch(_0x1c8f2d){_0x2cdee3=_0x15cab8(0xd3)+_0x4ce1eb+_0x15cab8(0xdb);}const _0x45631a=['================================================================================',_0x15cab8(0xdc),'================================================================================',_0x15cab8(0x93),_0x15cab8(0xbd),_0x15cab8(0xfa)][_0x15cab8(0xf5)]('\x0a'),_0x1effcc=_0x2fbbed?_0x45631a:_0x15cab8(0x97)+SHIMMED_COMMANDS[_0x15cab8(0xcb)]+_0x15cab8(0xe2)+_0x2cdee3;return{'success':!![],'pathDir':_0x4ce1eb,'message':_0x1effcc};}catch(_0x1ac753){return{'success':![],'pathDir':_0x4ce1eb,'message':_0x15cab8(0xb4)+_0x1ac753['message']};}}function a0_0x4b8b(){const _0x36918c=['\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x27s|[^:]*\x5c.trimprompt/shims:||g\x27);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','6528566NZrLTK',';=%\x22','\x27,\x20\x27User\x27)','tree','755','\x20\x22$@\x22;\x20fi\x0aelse\x0a\x20\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','pytest','5804MVDhgA','create','.zshrc','pnpm','getOwnPropertyNames','307PnplhV','pip3','defineProperty','928620iYCKcN','prototype','Set-ItemProperty\x20-Path\x20\x27','$PROFILE.CurrentUserAllHosts','\x20\x20\x20👉\x20Please\x20restart\x20your\x20terminal\x20window\x20or\x20AI\x20editor\x20(Cursor/Claude)','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}','pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22','push','TrimPrompt\x20successfully\x20installed\x20for\x20','\x20&\x20','readdirSync','appendFileSync','unlinkSync','\x20%*','toLowerCase','\x27\x20-Name\x20AutoRun\x20-Value\x20\x27','powershell','ignore','win32','writeFileSync',')\x20else\x20(','1519665QnVwDf','__esModule','npm','get','.trimprompt','grep','yarn','filter','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue','execFileSync','dirname',';\x22\x20+\x20$env:PATH\x0a','.bash_profile','.cmd','writable','\x20\x20trim\x20','Failed\x20to\x20install\x20shims:\x20','366WIKyWn','hasOwnProperty','powershell.exe','746kGqvyw','kubectl','trim.ps1',':||g\x22)\x0a\x20\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor','\x20\x20\x20\x20\x20\x20for\x20the\x20installation\x20to\x20take\x20effect.','TrimPrompt\x20Shims\x20PATH','14880MCgTsx','.bashrc','-Command','message','read','8qfMXiN','existsSync','docker','\x20\x20set\x20\x22PATH=%PATH:','ruff','split','trim.cmd','length','pwsh','shims','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','477UrdMvb','some','APPDATA',':||g\x22);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22','cat','pipe','git','\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','includes','Failed\x20to\x20uninstall\x20shims:\x20','if\x20($env:AI_AGENT\x20-or\x20$env:CURSOR_AGENT\x20-or\x20$env:CLAUDECODE\x20-or\x20$env:CLAUDE_CODE\x20-or\x20$env:ANTIGRAVITY_AGENT\x20-or\x20$env:GEMINI_CLI\x20-or\x20$env:TRIMPROMPT_ACTIVE)\x20{\x0a\x20\x20if\x20(Get-Command\x20trim\x20-ErrorAction\x20SilentlyContinue)\x20{\x20&\x20trim\x20',':$PATH\x22','\x20\x20\x20\x20\x20\x20[IMPORTANT]\x20TrimPrompt\x20successfully\x20installed!','\x0a#\x20','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','658854VyaSLT','-NoProfile','mkdirSync','\x20commands.\x0a\x0a[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20','child_process','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','default','#!/bin/sh\x0aif\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','installShims','\x22\x20(','glab','\x20@args\x20}\x20else\x20{\x20&\x20','homedir','\x20@args\x20}\x0a}\x20else\x20{\x0a\x20\x20&\x20','.profile','\x20\x20exit\x20/b\x20%ERRORLEVEL%','export\x20PATH=\x22','execSync','\x20\x22$@\x22;\x20fi\x0a','if\x20exist\x20\x22','replace','trim','join','env','try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27','uninstallShims','path','================================================================================','if\x20\x22%AI_AGENT%\x22==\x22\x22\x20if\x20\x22%CURSOR_AGENT%\x22==\x22\x22\x20if\x20\x22%CLAUDECODE%\x22==\x22\x22\x20if\x20\x22%CLAUDE_CODE%\x22==\x22\x22\x20if\x20\x22%ANTIGRAVITY_AGENT%\x22==\x22\x22\x20if\x20\x22%GEMINI_CLI%\x22==\x22\x22\x20if\x20\x22%TRIMPROMPT_ACTIVE%\x22==\x22\x22\x20(','call','__setModuleDefault','chmodSync','platform','utf8','powershell\x20-NoProfile\x20-Command\x20\x22'];a0_0x4b8b=function(){return _0x36918c;};return a0_0x4b8b();}function uninstallShims(){const _0x23cd10=a0_0x5bdd4c,_0x4d6eff=path[_0x23cd10(0xf5)](os[_0x23cd10(0xeb)](),_0x23cd10(0xa8),_0x23cd10(0xcd)),_0x9db429=os[_0x23cd10(0xff)]()===_0x23cd10(0xa1);try{if(_0x9db429){const _0x1de086=getExecSync();try{const _0x2711cb=getExecFileSync(),_0x42c03a=_0x23cd10(0xbc),_0x157005=_0x23cd10(0xf7)+_0x42c03a+_0x23cd10(0x94),_0x1d47ec=_0x2711cb(_0x23cd10(0xb7),[_0x23cd10(0xe0),_0x23cd10(0xc1),_0x157005],{'encoding':_0x23cd10(0x7d),'stdio':[_0x23cd10(0xd5),_0x23cd10(0xd5),_0x23cd10(0xa0)]})['trim']();if(_0x1d47ec['includes'](_0x4d6eff)){const _0x1363ac=_0x1d47ec[_0x23cd10(0xc9)](_0x23cd10(0x98))[_0x23cd10(0xab)](_0x12287e=>!_0x12287e[_0x23cd10(0xd8)](_0x4d6eff));if(_0x1363ac[_0x23cd10(0xcb)]===0x0){const _0x3925fc='Remove-ItemProperty\x20-Path\x20\x27'+_0x42c03a+_0x23cd10(0xac);_0x2711cb(_0x23cd10(0xb7),['-NoProfile',_0x23cd10(0xc1),_0x3925fc],{'stdio':'ignore'});}else{const _0x65c083=_0x1363ac[_0x23cd10(0xf5)]('\x20&\x20'),_0x46a336=_0x23cd10(0x91)+_0x42c03a+_0x23cd10(0x9e)+_0x65c083+'\x27';_0x2711cb('powershell.exe',[_0x23cd10(0xe0),'-Command',_0x46a336],{'stdio':'ignore'});}}}catch{}try{const _0x3df8ee=collectPowerShellProfiles();for(const _0x42e8ae of _0x3df8ee){removeProfileBlock(_0x42e8ae,PROFILE_MARKER);}}catch{}try{for(const _0x2a5865 of getBashProfilesWindows()){removeProfileBlock(_0x2a5865,PROFILE_MARKER);}}catch{}try{const _0x520ed1=_0x23cd10(0xe4),_0x46316d=_0x1de086(_0x23cd10(0x7e)+_0x520ed1+'\x22',{'encoding':_0x23cd10(0x7d),'stdio':[_0x23cd10(0xd5),_0x23cd10(0xd5),_0x23cd10(0xa0)]})['trim']();if(_0x46316d['includes'](_0x4d6eff)){const _0x214f34=_0x46316d[_0x23cd10(0xc9)](';')['filter'](_0x235799=>_0x235799[_0x23cd10(0xf4)]()[_0x23cd10(0x9d)]()!==_0x4d6eff[_0x23cd10(0x9d)]())['join'](';'),_0x40b7c3=_0x214f34[_0x23cd10(0xf3)](/'/g,'\x27\x27'),_0x39cf8b='[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27'+_0x40b7c3+_0x23cd10(0x82);_0x1de086(_0x23cd10(0x7e)+_0x39cf8b+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x23cd10(0xa0)});}}catch{}}else{const _0x5d14f0=os[_0x23cd10(0xeb)](),_0x582b08=[_0x23cd10(0xc0),_0x23cd10(0x89),_0x23cd10(0xb0),'.profile'];for(const _0x246dc3 of _0x582b08){removeProfileBlock(path[_0x23cd10(0xf5)](_0x5d14f0,_0x246dc3),PROFILE_MARKER);}}if(fs['existsSync'](_0x4d6eff)){const _0x28c3fa=fs[_0x23cd10(0x99)](_0x4d6eff);for(const _0x5e0992 of _0x28c3fa){fs['unlinkSync'](path[_0x23cd10(0xf5)](_0x4d6eff,_0x5e0992));}fs['rmdirSync'](_0x4d6eff);}return{'success':!![],'message':_0x23cd10(0xce)};}catch(_0x27faaa){return{'success':![],'message':_0x23cd10(0xd9)+_0x27faaa[_0x23cd10(0xc2)]};}}
|
|
1
|
+
'use strict';function a0_0x2982(_0x23d98d,_0x25985b){_0x23d98d=_0x23d98d-0x105;const _0x4621be=a0_0x4621();let _0x2982f6=_0x4621be[_0x23d98d];return _0x2982f6;}const a0_0x4b2bba=a0_0x2982;function a0_0x4621(){const _0x5ac55b=['get','\x27\x20-Name\x20AutoRun\x20-Value\x20\x27','.trimprompt','1474gTyNPh',':||g\x22);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','1081156XRreRK','create','execSync','7894350HFyRcS',';=%\x22','\x20@args\x20}\x0a}\x20else\x20{\x0a\x20\x20&\x20','shims','readFileSync','#!/bin/sh\x0aif\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20','2SCvNZW','getOwnPropertyDescriptor','hasOwnProperty','[Environment]::SetEnvironmentVariable(\x27PATH\x27,\x20\x27','split','\x20commands.\x0a\x0a[WARNING]\x20Could\x20not\x20automatically\x20update\x20your\x20system\x20PATH.\x20',':$PATH\x22','export\x20PATH=\x22','.bashrc','================================================================================','trim.cmd','\x20\x22$@\x22;\x20fi\x0a',':||g\x22)\x0a\x20\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','__esModule','TrimPrompt\x20shims\x20fully\x20uninstalled.\x20All\x20PATH\x20modifications,\x20shell\x20profiles,\x20and\x20registry\x20entries\x20have\x20been\x20cleaned\x20up.','unlinkSync','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20SilentlyContinue','cargo','.zshrc','Remove-ItemProperty\x20-Path\x20\x27','writeFileSync','execFileSync','\x27,\x20\x27User\x27)','2367198aFIafR','.cmd','pipe','\x20%*','[Environment]::GetEnvironmentVariable(\x27PATH\x27,\x20\x27User\x27)','message','homedir','kubectl','5677qBcuYc','if\x20exist\x20\x22','284CygXnc','8zzOpXM','Please\x20add\x20this\x20to\x20your\x20shell\x20profile\x20(~/.bashrc,\x20~/.zshrc)\x20manually:\x0a\x20\x20export\x20PATH=\x22','\x20&\x20','child_process','git','includes','__setModuleDefault','tree',';\x22\x20+\x20$env:PATH\x0a','\x20@args\x20}\x20else\x20{\x20&\x20','trim.ps1','filter','ruff','yarn','77172gTLBbj','uninstallShims','find','pytest','423255wfWapm','platform','push','\x27\x20-Name\x20AutoRun\x20-ErrorAction\x20Stop).AutoRun\x20}\x20catch\x20{\x20\x27\x27\x20}','powershell.exe','powershell\x20-NoProfile\x20-Command\x20\x22','-NoProfile','npx','pip','-Command','ignore','\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x27s|[^:]*\x5c.trimprompt/shims:||g\x27);\x20exec\x20env\x20PATH=\x22$CLEAN_PATH\x22\x20','755','\x20\x20set\x20\x22PATH=%PATH:','prototype','Failed\x20to\x20install\x20shims:\x20','call','npm','utf8','\x20\x20trim\x20','docker','Please\x20add\x20the\x20following\x20path\x20to\x20the\x20front\x20of\x20your\x20User\x20PATH\x20environment\x20variable\x20manually:\x0a\x20\x20','\x20\x20\x20\x20\x20\x20for\x20the\x20installation\x20to\x20take\x20effect.','configurable','powershell','replace','\x20-NoProfile\x20-Command\x20\x22','getOwnPropertyNames','default','win32','\x0a$env:PATH\x20=\x20\x22','\x0a#\x20','rmdirSync','__createBinding','7446spHZnk','trim','__importStar','.bash_profile','44115SjctLN','\x20\x22$@\x22;\x20fi\x0aelse\x0a\x20\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','map','$sig\x20=\x20\x27[DllImport(\x5c\x22user32.dll\x5c\x22,\x20SetLastError\x20=\x20true,\x20CharSet\x20=\x20CharSet.Auto)]\x20public\x20static\x20extern\x20IntPtr\x20SendMessageTimeout(IntPtr\x20hWnd,\x20uint\x20Msg,\x20IntPtr\x20wParam,\x20string\x20lParam,\x20uint\x20fuFlags,\x20uint\x20uTimeout,\x20out\x20IntPtr\x20lpdwResult);\x27;\x20Add-Type\x20-MemberDefinition\x20$sig\x20-Name\x20\x5c\x22Win32\x5c\x22\x20-Namespace\x20\x5c\x22Win32\x5c\x22\x20-PassThru\x20>\x20$null;\x20[IntPtr]$res\x20=\x200;\x20[void][Win32.Win32]::SendMessageTimeout([IntPtr]0xffff,\x200x001A,\x20[IntPtr]::Zero,\x20\x5c\x22Environment\x5c\x22,\x202,\x201000,\x20[ref]$res);','length','\x20\x20\x20\x20\x20\x20[IMPORTANT]\x20TrimPrompt\x20successfully\x20installed!','Set-ItemProperty\x20-Path\x20\x27','defineProperty','TrimPrompt\x20successfully\x20installed\x20for\x20','\x22\x20(','\x20\x22$@\x22;\x20else\x20CLEAN_PATH=$(echo\x20\x22$PATH\x22\x20|\x20sed\x20\x22s|','.profile','existsSync','\x20\x20exit\x20/b\x20%ERRORLEVEL%','@echo\x20off','join','writable','toLowerCase','dirname','grep',':$PATH\x22\x0a','mkdirSync','if\x20\x22%AI_AGENT%\x22==\x22\x22\x20if\x20\x22%CURSOR_AGENT%\x22==\x22\x22\x20if\x20\x22%CLAUDECODE%\x22==\x22\x22\x20if\x20\x22%CLAUDE_CODE%\x22==\x22\x22\x20if\x20\x22%ANTIGRAVITY_AGENT%\x22==\x22\x22\x20if\x20\x22%GEMINI_CLI%\x22==\x22\x22\x20if\x20\x22%TRIMPROMPT_ACTIVE%\x22==\x22\x22\x20(',')\x20else\x20(','installShims'];a0_0x4621=function(){return _0x5ac55b;};return a0_0x4621();}(function(_0x3d5a5c,_0x221b43){const _0x427d94=a0_0x2982,_0x14c229=_0x3d5a5c();while(!![]){try{const _0x3de467=parseInt(_0x427d94(0x11c))/0x1*(-parseInt(_0x427d94(0x125))/0x2)+-parseInt(_0x427d94(0x17f))/0x3*(-parseInt(_0x427d94(0x146))/0x4)+parseInt(_0x427d94(0x159))/0x5+parseInt(_0x427d94(0x17b))/0x6*(parseInt(_0x427d94(0x144))/0x7)+parseInt(_0x427d94(0x147))/0x8*(-parseInt(_0x427d94(0x13c))/0x9)+parseInt(_0x427d94(0x11f))/0xa+-parseInt(_0x427d94(0x11a))/0xb*(parseInt(_0x427d94(0x155))/0xc);if(_0x3de467===_0x221b43)break;else _0x14c229['push'](_0x14c229['shift']());}catch(_0x1c4d10){_0x14c229['push'](_0x14c229['shift']());}}}(a0_0x4621,0xaf744));var __createBinding=this&&this[a0_0x4b2bba(0x17a)]||(Object[a0_0x4b2bba(0x11d)]?function(_0x549e62,_0x29a38a,_0x5da463,_0x521780){const _0x3d8911=a0_0x4b2bba;if(_0x521780===undefined)_0x521780=_0x5da463;var _0x1965ec=Object[_0x3d8911(0x126)](_0x29a38a,_0x5da463);(!_0x1965ec||(_0x3d8911(0x117)in _0x1965ec?!_0x29a38a[_0x3d8911(0x132)]:_0x1965ec[_0x3d8911(0x10e)]||_0x1965ec[_0x3d8911(0x170)]))&&(_0x1965ec={'enumerable':!![],'get':function(){return _0x29a38a[_0x5da463];}}),Object['defineProperty'](_0x549e62,_0x521780,_0x1965ec);}:function(_0x3e4488,_0x306a8d,_0xd427d3,_0xad986f){if(_0xad986f===undefined)_0xad986f=_0xd427d3;_0x3e4488[_0xad986f]=_0x306a8d[_0xd427d3];}),__setModuleDefault=this&&this[a0_0x4b2bba(0x14d)]||(Object['create']?function(_0x40e312,_0x2d7fb9){const _0x1de8ee=a0_0x4b2bba;Object[_0x1de8ee(0x105)](_0x40e312,_0x1de8ee(0x175),{'enumerable':!![],'value':_0x2d7fb9});}:function(_0x16ff3a,_0x5e351a){_0x16ff3a['default']=_0x5e351a;}),__importStar=this&&this[a0_0x4b2bba(0x17d)]||(function(){var _0x1c3147=function(_0x525776){const _0x462f08=a0_0x2982;return _0x1c3147=Object[_0x462f08(0x174)]||function(_0x459575){const _0x1a7240=_0x462f08;var _0x4a2ef6=[];for(var _0x763b82 in _0x459575)if(Object[_0x1a7240(0x167)][_0x1a7240(0x127)][_0x1a7240(0x169)](_0x459575,_0x763b82))_0x4a2ef6[_0x4a2ef6['length']]=_0x763b82;return _0x4a2ef6;},_0x1c3147(_0x525776);};return function(_0x5aa7c1){const _0x594921=a0_0x2982;if(_0x5aa7c1&&_0x5aa7c1['__esModule'])return _0x5aa7c1;var _0x2b6df9={};if(_0x5aa7c1!=null){for(var _0x3f1d5a=_0x1c3147(_0x5aa7c1),_0x4224bd=0x0;_0x4224bd<_0x3f1d5a['length'];_0x4224bd++)if(_0x3f1d5a[_0x4224bd]!==_0x594921(0x175))__createBinding(_0x2b6df9,_0x5aa7c1,_0x3f1d5a[_0x4224bd]);}return __setModuleDefault(_0x2b6df9,_0x5aa7c1),_0x2b6df9;};}());Object[a0_0x4b2bba(0x105)](exports,a0_0x4b2bba(0x132),{'value':!![]}),exports[a0_0x4b2bba(0x116)]=installShims,exports[a0_0x4b2bba(0x156)]=uninstallShims;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),SHIMMED_COMMANDS=['ls',a0_0x4b2bba(0x14e),'cat','read',a0_0x4b2bba(0x111),'rg',a0_0x4b2bba(0x153),a0_0x4b2bba(0x14b),'gh','glab',a0_0x4b2bba(0x136),a0_0x4b2bba(0x16a),'pnpm',a0_0x4b2bba(0x160),a0_0x4b2bba(0x154),a0_0x4b2bba(0x143),a0_0x4b2bba(0x16d),a0_0x4b2bba(0x158),a0_0x4b2bba(0x161),'pip3','go',a0_0x4b2bba(0x157)],PROFILE_MARKER='TrimPrompt\x20Shims\x20PATH';function getExecSync(){const _0x24dc6e=a0_0x4b2bba;return require('child_process')[_0x24dc6e(0x11e)];}function getExecFileSync(){const _0xd87ca8=a0_0x4b2bba;return require(_0xd87ca8(0x14a))[_0xd87ca8(0x13a)];}function ensureProfileContains(_0xa6ad6e,_0x460819,_0x22d00a){const _0x38d3b2=a0_0x4b2bba;try{const _0x3ed6bf=path[_0x38d3b2(0x110)](_0xa6ad6e);!fs['existsSync'](_0x3ed6bf)&&fs['mkdirSync'](_0x3ed6bf,{'recursive':!![]});if(fs[_0x38d3b2(0x10a)](_0xa6ad6e)){const _0x497280=fs[_0x38d3b2(0x123)](_0xa6ad6e,'utf8');if(_0x497280['includes'](_0x460819))return;fs['appendFileSync'](_0xa6ad6e,_0x22d00a,_0x38d3b2(0x16b));}else fs['writeFileSync'](_0xa6ad6e,_0x22d00a,_0x38d3b2(0x16b));}catch{}}function removeProfileBlock(_0x1e4809,_0xf1565a){const _0x5c0d08=a0_0x4b2bba;try{if(!fs[_0x5c0d08(0x10a)](_0x1e4809))return;const _0x802920=fs[_0x5c0d08(0x123)](_0x1e4809,_0x5c0d08(0x16b));if(!_0x802920[_0x5c0d08(0x14c)](_0xf1565a))return;const _0x1f868f=_0x802920['split']('\x0a'),_0x35c446=[];let _0x37e22f=![];for(let _0x464fbd=0x0;_0x464fbd<_0x1f868f[_0x5c0d08(0x183)];_0x464fbd++){if(_0x1f868f[_0x464fbd][_0x5c0d08(0x14c)](_0xf1565a)){_0x37e22f=!![];continue;}if(_0x37e22f){_0x37e22f=![];continue;}_0x35c446[_0x5c0d08(0x15b)](_0x1f868f[_0x464fbd]);}const _0xcd5214=_0x35c446[_0x5c0d08(0x10d)]('\x0a')[_0x5c0d08(0x172)](/\n{3,}/g,'\x0a\x0a');fs[_0x5c0d08(0x139)](_0x1e4809,_0xcd5214,_0x5c0d08(0x16b));}catch{}}function collectPowerShellProfiles(){const _0x1ad654=a0_0x4b2bba,_0x13a0e3=getExecSync(),_0x292bcc=[],_0x36523a=[[_0x1ad654(0x171),'$PROFILE.CurrentUserCurrentHost'],['powershell','$PROFILE.CurrentUserAllHosts']];try{_0x13a0e3('pwsh\x20-NoProfile\x20-Command\x20\x22exit\x200\x22',{'stdio':_0x1ad654(0x163)}),_0x36523a[_0x1ad654(0x15b)](['pwsh','$PROFILE.CurrentUserAllHosts']);}catch{}for(const [_0x4eeea8,_0x4968c3]of _0x36523a){try{const _0x3c8744=_0x13a0e3(_0x4eeea8+_0x1ad654(0x173)+_0x4968c3+'\x22',{'encoding':'utf8'})[_0x1ad654(0x17c)]();_0x3c8744&&!_0x292bcc['some'](_0xf109ec=>_0xf109ec['toLowerCase']()===_0x3c8744['toLowerCase']())&&_0x292bcc['push'](_0x3c8744);}catch{}}return _0x292bcc;}function getBashProfilesWindows(){const _0x2f0389=a0_0x4b2bba,_0x2ba83a=os[_0x2f0389(0x142)]();return[_0x2f0389(0x12d),_0x2f0389(0x17e)][_0x2f0389(0x181)](_0x5868a0=>path[_0x2f0389(0x10d)](_0x2ba83a,_0x5868a0));}function getBroadcastCommand(){const _0x2bf333=a0_0x4b2bba;return _0x2bf333(0x182);}function installShims(){const _0x3ebdb8=a0_0x4b2bba,_0x1fdd64=path[_0x3ebdb8(0x10d)](os['homedir'](),_0x3ebdb8(0x119),_0x3ebdb8(0x122));try{!fs[_0x3ebdb8(0x10a)](_0x1fdd64)&&fs[_0x3ebdb8(0x113)](_0x1fdd64,{'recursive':!![]});const _0xb854bb=os['platform']()==='win32';for(const _0x149f16 of SHIMMED_COMMANDS){if(_0xb854bb){const _0x40d850=path[_0x3ebdb8(0x10d)](_0x1fdd64,_0x149f16+_0x3ebdb8(0x13d)),_0x1e705f=process.env.APPDATA?path[_0x3ebdb8(0x10d)](process.env.APPDATA,_0x3ebdb8(0x16a)):'',_0x591329=_0x1e705f?path[_0x3ebdb8(0x10d)](_0x1e705f,_0x3ebdb8(0x12f)):'%~dp0..\x5c..\x5cAppData\x5cRoaming\x5cnpm\x5ctrim.cmd',_0x215042=[_0x3ebdb8(0x10c),_0x3ebdb8(0x114),_0x3ebdb8(0x166)+_0x1fdd64+';=%\x22','\x20\x20'+_0x149f16+'\x20%*',_0x3ebdb8(0x10b),')',_0x3ebdb8(0x145)+_0x591329+_0x3ebdb8(0x107),_0x3ebdb8(0x16c)+_0x149f16+_0x3ebdb8(0x13f),_0x3ebdb8(0x115),_0x3ebdb8(0x166)+_0x1fdd64+_0x3ebdb8(0x120),'\x20\x20'+_0x149f16+_0x3ebdb8(0x13f),')'][_0x3ebdb8(0x10d)]('\x0d\x0a')+'\x0d\x0a';fs[_0x3ebdb8(0x139)](_0x40d850,_0x215042,'utf8');const _0x224556=path[_0x3ebdb8(0x10d)](_0x1fdd64,_0x149f16+'.ps1'),_0x144076='if\x20($env:AI_AGENT\x20-or\x20$env:CURSOR_AGENT\x20-or\x20$env:CLAUDECODE\x20-or\x20$env:CLAUDE_CODE\x20-or\x20$env:ANTIGRAVITY_AGENT\x20-or\x20$env:GEMINI_CLI\x20-or\x20$env:TRIMPROMPT_ACTIVE)\x20{\x0a\x20\x20if\x20(Get-Command\x20trim\x20-ErrorAction\x20SilentlyContinue)\x20{\x20&\x20trim\x20'+_0x149f16+_0x3ebdb8(0x150)+_0x149f16+_0x3ebdb8(0x121)+_0x149f16+'\x20@args\x0a}\x0a';fs[_0x3ebdb8(0x139)](_0x224556,_0x144076,_0x3ebdb8(0x16b));const _0x5c1d8d=path[_0x3ebdb8(0x10d)](_0x1fdd64,_0x149f16),_0x3f3b1e=_0x1fdd64[_0x3ebdb8(0x172)](/\\/g,'/')[_0x3ebdb8(0x172)](/^([A-Za-z]):/,(_0x8ac187,_0xae0731)=>'/'+_0xae0731['toLowerCase']()),_0x3976a9='#!/bin/sh\x0aif\x20[\x20-n\x20\x22$AI_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$CURSOR_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$CLAUDECODE\x22\x20]\x20||\x20[\x20-n\x20\x22$CLAUDE_CODE\x22\x20]\x20||\x20[\x20-n\x20\x22$ANTIGRAVITY_AGENT\x22\x20]\x20||\x20[\x20-n\x20\x22$GEMINI_CLI\x22\x20]\x20||\x20[\x20-n\x20\x22$TRIMPROMPT_ACTIVE\x22\x20];\x20then\x0a\x20\x20if\x20command\x20-v\x20trim\x20>/dev/null\x202>&1;\x20then\x20exec\x20trim\x20'+_0x149f16+_0x3ebdb8(0x108)+_0x3f3b1e+_0x3ebdb8(0x11b)+_0x149f16+_0x3ebdb8(0x180)+_0x3f3b1e+_0x3ebdb8(0x131)+_0x149f16+'\x20\x22$@\x22\x0afi\x0a';fs[_0x3ebdb8(0x139)](_0x5c1d8d,_0x3976a9,_0x3ebdb8(0x16b));}else{const _0xc7eb4b=path[_0x3ebdb8(0x10d)](_0x1fdd64,_0x149f16),_0x1fc0d6=_0x3ebdb8(0x124)+_0x149f16+_0x3ebdb8(0x164)+_0x149f16+_0x3ebdb8(0x130);fs['writeFileSync'](_0xc7eb4b,_0x1fc0d6,'utf8'),fs['chmodSync'](_0xc7eb4b,_0x3ebdb8(0x165));}}let _0x4d5080=![],_0x19c678='';if(_0xb854bb)try{const _0x2bbc04=getExecSync(),_0x49720c=_0x3ebdb8(0x178)+PROFILE_MARKER+_0x3ebdb8(0x177)+_0x1fdd64+_0x3ebdb8(0x14f),_0x205948=collectPowerShellProfiles();for(const _0x2d14c8 of _0x205948){ensureProfileContains(_0x2d14c8,_0x1fdd64,_0x49720c);}try{const _0x167b81=_0x1fdd64[_0x3ebdb8(0x172)](/\\/g,'/')[_0x3ebdb8(0x172)](/^([A-Za-z]):/,(_0x29070b,_0x19d78)=>'/'+_0x19d78[_0x3ebdb8(0x10f)]()),_0x40a597=_0x3ebdb8(0x178)+PROFILE_MARKER+'\x0aexport\x20PATH=\x22'+_0x167b81+':$PATH\x22\x0a',_0x297152=getBashProfilesWindows();let _0x89c161=![];for(const _0x2c1bca of _0x297152){fs[_0x3ebdb8(0x10a)](_0x2c1bca)&&(ensureProfileContains(_0x2c1bca,_0x167b81,_0x40a597),_0x89c161=!![]);}!_0x89c161&&ensureProfileContains(_0x297152[0x0],_0x167b81,_0x40a597);}catch{}const _0x30ad9d=_0x3ebdb8(0x140),_0x37a3ef=_0x2bbc04(_0x3ebdb8(0x15e)+_0x30ad9d+'\x22',{'encoding':'utf8','stdio':[_0x3ebdb8(0x13e),_0x3ebdb8(0x13e),'ignore']})[_0x3ebdb8(0x17c)]();if(!_0x37a3ef[_0x3ebdb8(0x14c)](_0x1fdd64)){const _0x10e4f9=_0x1fdd64+';'+_0x37a3ef,_0x42422a=_0x10e4f9[_0x3ebdb8(0x172)](/'/g,'\x27\x27'),_0x3ae37b=_0x3ebdb8(0x128)+_0x42422a+_0x3ebdb8(0x13b);_0x2bbc04(_0x3ebdb8(0x15e)+_0x3ae37b+';\x20'+getBroadcastCommand()+'\x22',{'stdio':_0x3ebdb8(0x163)});}const _0x57b5c=path[_0x3ebdb8(0x10d)](process.env.APPDATA||'',_0x3ebdb8(0x16a),_0x3ebdb8(0x151));if(fs[_0x3ebdb8(0x10a)](_0x57b5c))try{fs[_0x3ebdb8(0x134)](_0x57b5c);}catch{}_0x4d5080=!![];}catch(_0xf4454e){_0x19c678=_0x3ebdb8(0x16e)+_0x1fdd64;}else try{const _0x23bfaf=_0x3ebdb8(0x12c)+_0x1fdd64+_0x3ebdb8(0x112),_0x2c49cb=os[_0x3ebdb8(0x142)](),_0x5cb1df=['.bashrc',_0x3ebdb8(0x137),_0x3ebdb8(0x17e),_0x3ebdb8(0x109)];let _0x264ac7=![];for(const _0x136859 of _0x5cb1df){const _0x9641b3=path['join'](_0x2c49cb,_0x136859);fs[_0x3ebdb8(0x10a)](_0x9641b3)&&(ensureProfileContains(_0x9641b3,_0x1fdd64,_0x3ebdb8(0x178)+PROFILE_MARKER+'\x0a'+_0x23bfaf),_0x264ac7=!![]);}if(!_0x264ac7){const _0x40b817=path['join'](_0x2c49cb,_0x3ebdb8(0x12d));ensureProfileContains(_0x40b817,_0x1fdd64,_0x3ebdb8(0x178)+PROFILE_MARKER+'\x0a'+_0x23bfaf);}_0x4d5080=!![];}catch(_0x2c75a6){_0x19c678=_0x3ebdb8(0x148)+_0x1fdd64+_0x3ebdb8(0x12b);}const _0x4d7992=[_0x3ebdb8(0x12e),_0x3ebdb8(0x184),_0x3ebdb8(0x12e),'\x20\x20\x20👉\x20Please\x20restart\x20your\x20terminal\x20window\x20or\x20AI\x20editor\x20(Cursor/Claude)',_0x3ebdb8(0x16f),_0x3ebdb8(0x12e)][_0x3ebdb8(0x10d)]('\x0a'),_0x2539c4=_0x4d5080?_0x4d7992:_0x3ebdb8(0x106)+SHIMMED_COMMANDS[_0x3ebdb8(0x183)]+_0x3ebdb8(0x12a)+_0x19c678;return{'success':!![],'pathDir':_0x1fdd64,'message':_0x2539c4};}catch(_0x4776aa){return{'success':![],'pathDir':_0x1fdd64,'message':_0x3ebdb8(0x168)+_0x4776aa[_0x3ebdb8(0x141)]};}}function uninstallShims(){const _0x5ba4a2=a0_0x4b2bba,_0xa7df0a=path[_0x5ba4a2(0x10d)](os[_0x5ba4a2(0x142)](),_0x5ba4a2(0x119),_0x5ba4a2(0x122)),_0xfd5ec2=os[_0x5ba4a2(0x15a)]()===_0x5ba4a2(0x176);try{if(_0xfd5ec2){const _0x55dc92=getExecSync();try{const _0x475c22=getExecFileSync(),_0x200c39='HKCU:\x5cSoftware\x5cMicrosoft\x5cCommand\x20Processor',_0x5ac363='try\x20{\x20(Get-ItemProperty\x20-Path\x20\x27'+_0x200c39+_0x5ba4a2(0x15c),_0x4b969b=_0x475c22(_0x5ba4a2(0x15d),[_0x5ba4a2(0x15f),_0x5ba4a2(0x162),_0x5ac363],{'encoding':_0x5ba4a2(0x16b),'stdio':[_0x5ba4a2(0x13e),_0x5ba4a2(0x13e),_0x5ba4a2(0x163)]})[_0x5ba4a2(0x17c)]();if(_0x4b969b[_0x5ba4a2(0x14c)](_0xa7df0a)){const _0x22a824=_0x4b969b[_0x5ba4a2(0x129)](_0x5ba4a2(0x149))[_0x5ba4a2(0x152)](_0x15f1c5=>!_0x15f1c5[_0x5ba4a2(0x14c)](_0xa7df0a));if(_0x22a824['length']===0x0){const _0x4bdb5e=_0x5ba4a2(0x138)+_0x200c39+_0x5ba4a2(0x135);_0x475c22(_0x5ba4a2(0x15d),['-NoProfile',_0x5ba4a2(0x162),_0x4bdb5e],{'stdio':'ignore'});}else{const _0x2c7255=_0x22a824[_0x5ba4a2(0x10d)](_0x5ba4a2(0x149)),_0x14a5c8=_0x5ba4a2(0x185)+_0x200c39+_0x5ba4a2(0x118)+_0x2c7255+'\x27';_0x475c22(_0x5ba4a2(0x15d),[_0x5ba4a2(0x15f),_0x5ba4a2(0x162),_0x14a5c8],{'stdio':_0x5ba4a2(0x163)});}}}catch{}try{const _0x536d0d=collectPowerShellProfiles();for(const _0x47506a of _0x536d0d){removeProfileBlock(_0x47506a,PROFILE_MARKER);}}catch{}try{for(const _0x351db3 of getBashProfilesWindows()){removeProfileBlock(_0x351db3,PROFILE_MARKER);}}catch{}try{const _0x37ab76=_0x5ba4a2(0x140),_0x1690ec=_0x55dc92(_0x5ba4a2(0x15e)+_0x37ab76+'\x22',{'encoding':_0x5ba4a2(0x16b),'stdio':[_0x5ba4a2(0x13e),_0x5ba4a2(0x13e),_0x5ba4a2(0x163)]})[_0x5ba4a2(0x17c)]();if(_0x1690ec[_0x5ba4a2(0x14c)](_0xa7df0a)){const _0x199fee=_0x1690ec[_0x5ba4a2(0x129)](';')[_0x5ba4a2(0x152)](_0x509c0a=>_0x509c0a[_0x5ba4a2(0x17c)]()['toLowerCase']()!==_0xa7df0a[_0x5ba4a2(0x10f)]())['join'](';'),_0x4e3330=_0x199fee[_0x5ba4a2(0x172)](/'/g,'\x27\x27'),_0x29c8a4=_0x5ba4a2(0x128)+_0x4e3330+_0x5ba4a2(0x13b);_0x55dc92('powershell\x20-NoProfile\x20-Command\x20\x22'+_0x29c8a4+';\x20'+getBroadcastCommand()+'\x22',{'stdio':'ignore'});}}catch{}}else{const _0x2a9cfa=os[_0x5ba4a2(0x142)](),_0x7aa34d=['.bashrc',_0x5ba4a2(0x137),_0x5ba4a2(0x17e),_0x5ba4a2(0x109)];for(const _0x2f3e2c of _0x7aa34d){removeProfileBlock(path[_0x5ba4a2(0x10d)](_0x2a9cfa,_0x2f3e2c),PROFILE_MARKER);}}if(fs[_0x5ba4a2(0x10a)](_0xa7df0a)){const _0x109426=fs['readdirSync'](_0xa7df0a);for(const _0x37209c of _0x109426){fs['unlinkSync'](path[_0x5ba4a2(0x10d)](_0xa7df0a,_0x37209c));}fs[_0x5ba4a2(0x179)](_0xa7df0a);}return{'success':!![],'message':_0x5ba4a2(0x133)};}catch(_0x159d9f){return{'success':![],'message':'Failed\x20to\x20uninstall\x20shims:\x20'+_0x159d9f['message']};}}
|
package/simulate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4c3610=a0_0x314e;function a0_0x2347(){const _0x4505bd=['path','14LBCFgK','2183928pfWdIl','aws\x20s3\x20sync:\x203\x20assets\x20uploaded\x20successfully.','114poagLc','pip\x20install\x20tensorflow\x20pandas\x20numpy','toISOString','commit\x20f6e5d4c3b2a1\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2013:30:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20fix:\x20adjust\x20margins\x20on\x20visual\x20graph','log','utf8','tracker','running\x2045\x20tests\x0atest\x20tests::db_connection\x20...\x20ok\x0atest\x20tests::auth_handler\x20...\x20ok\x0a','3756492nNmaog','__esModule','32285TADwWw','repeat','found\x200\x20vulnerabilities\x0a','timestamp','length','writeFileSync','Collecting\x20tensorflow\x0a\x20\x20Downloading\x20tensorflow-2.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\x20(475.2\x20MB)\x0a','cargo\x20test','git\x20log:\x205\x20commits\x20(feat:\x20add\x20dynamic\x20token\x20costs,\x20fix:\x20adjust\x20margins...)','claude-3-5-sonnet','npm\x20install:\x20added\x2084\x20packages,\x20audited\x2096\x20packages.\x200\x20vulnerabilities.','Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3\x0a','kubectl\x20get\x20pods\x20-n\x20production','gemini-1-5-flash','aws\x20s3\x20sync\x20dist/\x20s3://trimprompt-assets','now','267449blQLJR','cmd','test\x20tests::test_case_','upload:\x20dist/cli.js\x20to\x20s3://trimprompt-assets/cli.js\x0a','homedir','diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x20(50\x20insertions,\x200\x20deletions)','random','join','cargo\x20test:\x2045\x20passed,\x200\x20failed.','54770FXykao','Completed\x203\x20of\x203\x20assets\x20successfully.','68LbqFHB','gpt-4o','git\x20diff\x20main','commit\x20a1b2c3d4e5f6\x0aAuthor:\x20Developer\x20<dev@trimprompt.ai>\x0aDate:\x20\x20\x20Tue\x20Jun\x2016\x2014:00:00\x202026\x20+0300\x0a\x0a\x20\x20\x20\x20feat:\x20add\x20dynamic\x20token\x20costs\x0a\x0a','raw','comp','\x20\x20Installing\x20build\x20dependencies\x20...\x20done\x0a','redis-master-0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2012d\x0a','152501EHJWvE','src/tracker.ts:45:9\x20-\x20warning:\x20console.log\x20should\x20be\x20removed\x0a','git\x20log\x20-n\x205','upload:\x20dist/hub-index.html\x20to\x20s3://trimprompt-assets/hub-index.html\x0a','exitCode','1570GsAHiN','kubectl\x20get\x20pods:\x20trimprompt-api\x20(Running),\x20trimprompt-sync\x20(Running),\x20redis-master\x20(Running),\x20postgres-db\x20(Running)','floor','Starting\x20simulation\x20of\x20developer\x20workflow\x20activity...','defineProperty','1595691DmZdqA','trimprompt-api-567fdb7d6-x8w9q\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x204d\x0a','pip\x20install:\x20Successfully\x20installed\x20tensorflow-2.15.0\x20numpy-1.26.2\x20pandas-2.1.3','npm\x20run\x20lint:\x20✖\x202\x20warnings'];a0_0x2347=function(){return _0x4505bd;};return a0_0x2347();}(function(_0x2d6612,_0x3c5b8e){const _0x4f4333=a0_0x314e,_0x372be3=_0x2d6612();while(!![]){try{const _0x5b3ac5=parseInt(_0x4f4333(0x1cf))/0x1*(-parseInt(_0x4f4333(0x1de))/0x2)+parseInt(_0x4f4333(0x1e9))/0x3+-parseInt(_0x4f4333(0x206))/0x4*(-parseInt(_0x4f4333(0x204))/0x5)+-parseInt(_0x4f4333(0x1e1))/0x6*(-parseInt(_0x4f4333(0x1fb))/0x7)+parseInt(_0x4f4333(0x1df))/0x8+-parseInt(_0x4f4333(0x1d9))/0x9+parseInt(_0x4f4333(0x1d4))/0xa*(-parseInt(_0x4f4333(0x1eb))/0xb);if(_0x5b3ac5===_0x3c5b8e)break;else _0x372be3['push'](_0x372be3['shift']());}catch(_0xf8ae60){_0x372be3['push'](_0x372be3['shift']());}}}(a0_0x2347,0xb2a39));function a0_0x314e(_0x167613,_0x4a495e){_0x167613=_0x167613-0x1cf;const _0x23478d=a0_0x2347();let _0x314e13=_0x23478d[_0x167613];return _0x314e13;}Object[a0_0x4c3610(0x1d8)](exports,a0_0x4c3610(0x1ea),{'value':!![]});const tracker_1=require('./tracker');console[a0_0x4c3610(0x1e5)](a0_0x4c3610(0x1d7));const models=[a0_0x4c3610(0x1f4),a0_0x4c3610(0x207),'gpt-4o-mini','gemini-1-5-pro',a0_0x4c3610(0x1f8),'claude-3-opus'],commands=[{'cmd':a0_0x4c3610(0x208),'raw':'diff\x20--git\x20a/src/cli.ts\x20b/src/cli.ts\x0aindex\x201234..5678\x20100644\x0a---\x20a/src/cli.ts\x0a+++\x20b/src/cli.ts\x0a@@\x20-10,6\x20+10,12\x20@@\x0a+\x20//\x20Added\x20new\x20telemetry\x20features\x0a+\x20console.log(\x22Initializing\x20sync\x20daemon...\x22);\x0a+\x20startSync();\x0a'[a0_0x4c3610(0x1ec)](0x32),'comp':a0_0x4c3610(0x200),'exitCode':0x0},{'cmd':a0_0x4c3610(0x1f2),'raw':a0_0x4c3610(0x1e8)+a0_0x4c3610(0x1fd)[a0_0x4c3610(0x1ec)](0x28)+'\x20...\x20ok\x0atest\x20result:\x20ok.\x2045\x20passed;\x200\x20failed;\x200\x20ignored;\x200\x20measured;\x200\x20filtered\x20out','comp':a0_0x4c3610(0x203),'exitCode':0x0},{'cmd':'npm\x20install\x20lodash\x20express\x20uuid\x20react','raw':'npm\x20warn\x20deprecated\x20uuid@3.4.0:\x20Please\x20upgrade...\x0a'+'added\x2084\x20packages,\x20changed\x2012\x20packages,\x20and\x20audited\x2096\x20packages\x20in\x203s\x0a'+a0_0x4c3610(0x1ed),'comp':a0_0x4c3610(0x1f5),'exitCode':0x0},{'cmd':a0_0x4c3610(0x1f9),'raw':'upload:\x20dist/index.html\x20to\x20s3://trimprompt-assets/index.html\x0a'+a0_0x4c3610(0x1d2)+a0_0x4c3610(0x1fe)+a0_0x4c3610(0x205),'comp':a0_0x4c3610(0x1e0),'exitCode':0x0},{'cmd':a0_0x4c3610(0x1f7),'raw':'NAME\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20READY\x20\x20\x20STATUS\x20\x20\x20\x20RESTARTS\x20\x20\x20AGE\x0a'+a0_0x4c3610(0x1da)+'trimprompt-sync-324db87d1-p8q2e\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x204d\x0a'+a0_0x4c3610(0x20d)+'postgres-db-0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201/1\x20\x20\x20\x20\x20Running\x20\x20\x200\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2012d\x0a','comp':a0_0x4c3610(0x1d5),'exitCode':0x0},{'cmd':a0_0x4c3610(0x1e2),'raw':a0_0x4c3610(0x1f1)+a0_0x4c3610(0x20c)+a0_0x4c3610(0x1f6),'comp':a0_0x4c3610(0x1db),'exitCode':0x0},{'cmd':a0_0x4c3610(0x1d1),'raw':a0_0x4c3610(0x209)+a0_0x4c3610(0x1e4),'comp':a0_0x4c3610(0x1f3),'exitCode':0x0},{'cmd':'npm\x20run\x20lint','raw':'src/cli.ts:12:3\x20-\x20warning:\x20unused\x20import\x0a'+a0_0x4c3610(0x1d0)+'✖\x202\x20problems\x20(0\x20errors,\x202\x20warnings)\x0a','comp':a0_0x4c3610(0x1dc),'exitCode':0x0}],startTime=Date[a0_0x4c3610(0x1fa)]()-0x36ee80;for(let i=0x0;i<0xc;i++){const model=models[i%models[a0_0x4c3610(0x1ef)]],commandItem=commands[Math[a0_0x4c3610(0x1d6)](Math[a0_0x4c3610(0x201)]()*commands[a0_0x4c3610(0x1ef)])];process.env.TRIMPROMPT_MODEL=model;const timestamp=new Date(startTime+i*0x3d090)[a0_0x4c3610(0x1e3)](),log=tracker_1[a0_0x4c3610(0x1e7)]['logExecution'](commandItem[a0_0x4c3610(0x1fc)],commandItem[a0_0x4c3610(0x20a)],commandItem[a0_0x4c3610(0x20b)],commandItem[a0_0x4c3610(0x1d3)]),logs=tracker_1[a0_0x4c3610(0x1e7)]['getLogs']();logs['length']>0x0&&(logs[logs['length']-0x1][a0_0x4c3610(0x1ee)]=timestamp,require('fs')[a0_0x4c3610(0x1f0)](require(a0_0x4c3610(0x1dd))[a0_0x4c3610(0x202)](require('os')[a0_0x4c3610(0x1ff)](),'.trimprompt','stats.json'),JSON['stringify'](logs,null,0x2),a0_0x4c3610(0x1e6)));}console[a0_0x4c3610(0x1e5)]('workflow\x20simulation\x20complete!\x2012\x20additional\x20commands\x20logged.');
|