@ranger-testing/ranger-cli 2.5.3 → 2.5.4-alpha.0e8b82c-9
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/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -0
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -0
- package/build/commands/utils/cloudProfileSession.js +1 -0
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -0
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -0
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -0
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -0
- package/build/commands/utils/resolveProfileUrl.js +1 -0
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +18 -4
- package/build/skills/ranger/create.md +6 -0
- package/build/skills/ranger/verify.md +17 -3
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fdf33,_0x1a4ba4){const _0x1d882c=_0xe03f,_0xde88a6=_0x1fdf33();while(!![]){try{const _0x11f2f3=-parseInt(_0x1d882c(0x186))/0x1+-parseInt(_0x1d882c(0x181))/0x2+-parseInt(_0x1d882c(0x190))/0x3*(-parseInt(_0x1d882c(0x18b))/0x4)+parseInt(_0x1d882c(0x183))/0x5*(-parseInt(_0x1d882c(0x18a))/0x6)+-parseInt(_0x1d882c(0x182))/0x7+-parseInt(_0x1d882c(0x184))/0x8*(parseInt(_0x1d882c(0x18c))/0x9)+parseInt(_0x1d882c(0x194))/0xa*(parseInt(_0x1d882c(0x18d))/0xb);if(_0x11f2f3===_0x1a4ba4)break;else _0xde88a6['push'](_0xde88a6['shift']());}catch(_0x1df977){_0xde88a6['push'](_0xde88a6['shift']());}}}(_0x298b,0xa6f46));function _0x298b(){const _0x38251e=['461791sTnhUC','\x20\x20The\x20encrypted\x20auth.json.enc\x20can\x20be\x20committed.','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','3bOYPyO','log','utf-8','\x0a✓\x20Encrypted\x20auth\x20saved\x20to:\x20','820kWWdvT','No\x20auth.json\x20found\x20at\x20','ttgJt','400200rwyEWp','1588608omhgdh','55670VnhUBx','8MQDwcG','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','810693VAcGaq','\x0a\x20\x20The\x20plaintext\x20auth.json\x20is\x20gitignored\x20for\x20security.','auth.json','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','714DbTcLM','1998532kJZOpj','6259914NWawYI'];_0x298b=function(){return _0x38251e;};return _0x298b();}function _0xe03f(_0x85a53c,_0x467a48){_0x85a53c=_0x85a53c-0x181;const _0x298bca=_0x298b();let _0xe03f57=_0x298bca[_0x85a53c];return _0xe03f57;}import{readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir}from'./utils/settings.js';export async function authEncrypt(_0x43b1a8){const _0xade174=_0xe03f,_0x3cc2d7={'ttgJt':_0xade174(0x188),'AjYuC':'.enc','aonEJ':function(_0x5a5b72,_0x56c6ea){return _0x5a5b72(_0x56c6ea);},'rhNvY':'No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','pvqWF':function(_0x339663,_0x33086f,_0x4d5358){return _0x339663(_0x33086f,_0x4d5358);},'EKCDp':_0xade174(0x192),'JkzDo':function(_0x4f1f09,_0x590cc4,_0x4d8929){return _0x4f1f09(_0x590cc4,_0x4d8929);},'UmDaA':_0xade174(0x185)},_0x1c4bd8=getEnvDir(_0x43b1a8),_0x27a4a1=join(_0x1c4bd8,_0x3cc2d7[_0xade174(0x196)]),_0x23034b=_0x27a4a1+_0x3cc2d7['AjYuC'];if(!existsSync(_0x1c4bd8))throw new Error('Profile\x20\x22'+_0x43b1a8+_0xade174(0x18f)+_0x43b1a8);if(!_0x3cc2d7['aonEJ'](existsSync,_0x27a4a1))throw new Error(_0xade174(0x195)+_0x27a4a1+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20with\x20authentication,\x20or\x20ranger\x20profile\x20update');const _0x394c04=await getToken();if(!_0x394c04)throw new Error(_0x3cc2d7['rhNvY']);const _0x1fb50c=await _0x3cc2d7['pvqWF'](readFile,_0x27a4a1,_0x3cc2d7['EKCDp']),_0x4e23aa=_0x3cc2d7['JkzDo'](encrypt,_0x1fb50c,_0x394c04);await _0x3cc2d7['JkzDo'](writeFile,_0x23034b,_0x4e23aa),console['log'](_0xade174(0x193)+_0x23034b),console['log'](_0xade174(0x189)),console[_0xade174(0x191)](_0x3cc2d7['UmDaA']),existsSync(_0x23034b)&&(console['log'](_0xade174(0x187)),console[_0xade174(0x191)](_0xade174(0x18e)));}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1fd529=_0x55fa;function _0x55fa(_0x65c860,_0x3da436){_0x65c860=_0x65c860-0x19c;const _0xf07ccf=_0xf07c();let _0x55facb=_0xf07ccf[_0x65c860];return _0x55facb;}(function(_0x3ec892,_0x289fdf){const _0x8ad10b=_0x55fa,_0x28af0a=_0x3ec892();while(!![]){try{const _0xb04d8a=-parseInt(_0x8ad10b(0x1bc))/0x1*(parseInt(_0x8ad10b(0x1bb))/0x2)+-parseInt(_0x8ad10b(0x1c6))/0x3*(parseInt(_0x8ad10b(0x1ac))/0x4)+-parseInt(_0x8ad10b(0x1c2))/0x5*(-parseInt(_0x8ad10b(0x19d))/0x6)+-parseInt(_0x8ad10b(0x1a2))/0x7*(parseInt(_0x8ad10b(0x1b3))/0x8)+-parseInt(_0x8ad10b(0x1cb))/0x9+parseInt(_0x8ad10b(0x1a1))/0xa+parseInt(_0x8ad10b(0x1a6))/0xb*(parseInt(_0x8ad10b(0x1c3))/0xc);if(_0xb04d8a===_0x289fdf)break;else _0x28af0a['push'](_0x28af0a['shift']());}catch(_0x308531){_0x28af0a['push'](_0x28af0a['shift']());}}}(_0xf07c,0x1ba95));function _0xf07c(){const _0x17b4e5=['feature-tracker','e2e-test-recommender','YKPta','82926feqvis','@ranger-testing/opencode-plugin','platform','\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','PQidy','stringify','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','\x0a✅\x20Cleanup\x20complete!\x0a','lJwpm','GtiKA','MdmrX','✓\x20Removed\x20stored\x20credentials','30nWjhHP','user','pipe','HhrPd','79810kxOWqi','91FJLCYh','✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','budRR','--scope','7447uLNkRl','claude','Nothing\x20to\x20clean\x20up.\x0a','VvITW','replace','length','4RHeaJw','project','yxZni','log','LVJvD','✓\x20Removed\x20trailhead\x20marketplace','trailhead','73960eiuDuS','uninstall','✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)','plugin','JENWG','✓\x20Removed\x20.ranger/\x20directory','ranger@trailhead','voWMu','70fLNkAq','3719pJxEgl','nGKaV','OgGFd','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','zqfll','xciwd','171245KYIQQf','5736bCutFf','qTvxv','CoTxd','389901wbHRIn','BVUQa'];_0xf07c=function(){return _0x17b4e5;};return _0xf07c();}import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x1fd529(0x1c8),'bug-bash',_0x1fd529(0x1c9)],opencodePluginName=_0x1fd529(0x1cc);function parseJsonc(_0x1046cc){const _0xa289b2=_0x1fd529,_0x4d48e1=_0x1046cc[_0xa289b2(0x1aa)](/\/\*[\s\S]*?\*\//g,''),_0x4d092d=_0x4d48e1[_0xa289b2(0x1aa)](/^\s*\/\/.*$/gm,''),_0x48d920=_0x4d092d['replace'](/,\s*([}\]])/g,'$1');return JSON['parse'](_0x48d920);}async function removeOpencodePluginConfig(_0x40ce73){const _0x3e12a7=_0x1fd529,_0x12f4d8={'JENWG':function(_0x280647,_0xafc453){return _0x280647(_0xafc453);},'YKPta':function(_0x4b017b,_0x320d77,_0x3ca83d){return _0x4b017b(_0x320d77,_0x3ca83d);},'kwhHb':'utf-8','VvITW':function(_0x4e5a09,_0x279980){return _0x4e5a09===_0x279980;},'TCOZv':function(_0x5ac9ae,_0x4a08bc){return _0x5ac9ae+_0x4a08bc;}};if(!_0x12f4d8[_0x3e12a7(0x1b7)](existsSync,_0x40ce73))return![];let _0x132806;try{const _0x383018=await _0x12f4d8[_0x3e12a7(0x1ca)](readFile,_0x40ce73,_0x12f4d8['kwhHb']);_0x132806=parseJsonc(_0x383018);}catch{return![];}const _0x1fb49b=Array['isArray'](_0x132806[_0x3e12a7(0x1b6)])?_0x132806['plugin']:[];if(_0x1fb49b[_0x3e12a7(0x1ab)]===0x0)return![];const _0x13f975=_0x1fb49b['filter'](_0x43439e=>{if(typeof _0x43439e!=='string')return!![];return _0x43439e!==opencodePluginName;});if(_0x12f4d8['VvITW'](_0x13f975['length'],_0x1fb49b['length']))return![];return _0x12f4d8[_0x3e12a7(0x1a9)](_0x13f975[_0x3e12a7(0x1ab)],0x0)?delete _0x132806[_0x3e12a7(0x1b6)]:_0x132806[_0x3e12a7(0x1b6)]=_0x13f975,await _0x12f4d8['YKPta'](writeFile,_0x40ce73,_0x12f4d8['TCOZv'](JSON[_0x3e12a7(0x1d0)](_0x132806,null,0x2),'\x0a')),!![];}async function uninstallClaudePlugin(_0x27ca7a){const _0x24ef45=_0x1fd529,_0x56fd41={'zqfll':function(_0x3a071f,_0x427c5b){return _0x3a071f(_0x427c5b);},'YoSiH':function(_0x47c347,_0xa3a2ea){return _0x47c347===_0xa3a2ea;},'GBMBn':_0x24ef45(0x1b9),'xciwd':_0x24ef45(0x1a7),'CoTxd':_0x24ef45(0x19f),'BeXpf':function(_0x56cd00,_0x48e4ba){return _0x56cd00===_0x48e4ba;},'Dtump':'win32'};return new Promise(_0x3a3852=>{const _0x5bc66b=_0x24ef45,_0x22726a=[_0x5bc66b(0x1b6),_0x5bc66b(0x1b4),_0x56fd41['GBMBn']];_0x27ca7a&&_0x22726a['push'](_0x5bc66b(0x1a5),_0x27ca7a);const _0x17efe1=spawn(_0x56fd41[_0x5bc66b(0x1c1)],_0x22726a,{'stdio':_0x56fd41[_0x5bc66b(0x1c5)],'shell':_0x56fd41['BeXpf'](process['platform'],_0x56fd41['Dtump'])});_0x17efe1['on']('close',_0x40f6c8=>{const _0x5147ea=_0x5bc66b;_0x56fd41[_0x5147ea(0x1c0)](_0x3a3852,_0x56fd41['YoSiH'](_0x40f6c8,0x0));}),_0x17efe1['on']('error',()=>{_0x3a3852(![]);});});}async function removeMarketplace(){const _0x467b7d=_0x1fd529,_0x2129f2={'JcbdY':function(_0x2e7f9c,_0x3bb03f){return _0x2e7f9c===_0x3bb03f;},'MdmrX':'claude','nGKaV':'remove','GtiKA':_0x467b7d(0x1b2),'qTvxv':'win32','Uvvrf':'close'};return new Promise(_0x1f16e3=>{const _0x2b4e33=_0x467b7d,_0x4130e3=spawn(_0x2129f2[_0x2b4e33(0x1d5)],['plugin','marketplace',_0x2129f2[_0x2b4e33(0x1bd)],_0x2129f2[_0x2b4e33(0x1d4)]],{'stdio':_0x2b4e33(0x19f),'shell':process[_0x2b4e33(0x1cd)]===_0x2129f2[_0x2b4e33(0x1c4)]});_0x4130e3['on'](_0x2129f2['Uvvrf'],_0x50ae0f=>{_0x1f16e3(_0x2129f2['JcbdY'](_0x50ae0f,0x0));}),_0x4130e3['on']('error',()=>{_0x1f16e3(![]);});});}export async function clean(){const _0x19c689=_0x1fd529,_0xbfac01={'gfAMM':_0x19c689(0x1ce),'hJIhr':function(_0x5ef6de){return _0x5ef6de();},'lJwpm':function(_0x490795,_0x5ba6ec){return _0x490795(_0x5ba6ec);},'fIRFg':function(_0x18b05f,_0x36e559){return _0x18b05f(_0x36e559);},'VHpCo':function(_0x322371,_0x20243d,_0x12f968){return _0x322371(_0x20243d,_0x12f968);},'budRR':function(_0x4692a0,_0x54e9de,_0x5d91b5){return _0x4692a0(_0x54e9de,_0x5d91b5);},'OgGFd':function(_0x3e1247,_0xb90626){return _0x3e1247(_0xb90626);},'yxZni':function(_0xb8e31f,_0x3a3570,_0x1e70f4){return _0xb8e31f(_0x3a3570,_0x1e70f4);},'Pmzpm':function(_0x23aebf,_0x41132e,_0x3c23cd){return _0x23aebf(_0x41132e,_0x3c23cd);},'vkQKf':function(_0x4f2d8c,_0x297ed9,_0x779a2d){return _0x4f2d8c(_0x297ed9,_0x779a2d);},'HhrPd':_0x19c689(0x1ad),'BVUQa':'opencode.json','voWMu':function(_0x33fe36,_0x1f0871,_0x45e8e7){return _0x33fe36(_0x1f0871,_0x45e8e7);},'LVJvD':'user','PQidy':_0x19c689(0x1b5),'tUtqU':_0x19c689(0x1d1),'TSDMx':_0x19c689(0x1d2),'OraBn':_0x19c689(0x1a8)};console['log'](_0xbfac01['gfAMM']);let _0x37c51f=![];try{await deleteAllCredentials(),console['log'](_0x19c689(0x19c)),_0x37c51f=!![];}catch{}const _0x48043a=_0xbfac01['hJIhr'](getCacheFile);existsSync(_0x48043a)&&(await rm(_0x48043a),_0x37c51f=!![]);const _0x5aa078=_0xbfac01['hJIhr'](getRangerDir);_0xbfac01['lJwpm'](existsSync,_0x5aa078)&&(await rm(_0x5aa078,{'recursive':!![]}),console[_0x19c689(0x1af)](_0x19c689(0x1b8)),_0x37c51f=!![]);const _0x35faa0=_0xbfac01['hJIhr'](getProjectSkillsDir);for(const _0x2b5626 of skillsToRemove){const _0x47cea1=join(_0x35faa0,_0x2b5626);_0xbfac01['fIRFg'](existsSync,_0x47cea1)&&(await _0xbfac01['VHpCo'](rm,_0x47cea1,{'recursive':!![]}),console[_0x19c689(0x1af)]('✓\x20Removed\x20project\x20skill:\x20'+_0x2b5626),_0x37c51f=!![]);}const _0x13028f=getUserSkillsDir();for(const _0x33254b of skillsToRemove){const _0x1a8b25=_0xbfac01[_0x19c689(0x1a4)](join,_0x13028f,_0x33254b);_0xbfac01['lJwpm'](existsSync,_0x1a8b25)&&(await rm(_0x1a8b25,{'recursive':!![]}),console[_0x19c689(0x1af)]('✓\x20Removed\x20user\x20skill:\x20'+_0x33254b),_0x37c51f=!![]);}const _0x478cd2=getOpencodeSkillsDir('project');for(const _0x5dddef of skillsToRemove){const _0x58fa7f=_0xbfac01['budRR'](join,_0x478cd2,_0x5dddef);_0xbfac01[_0x19c689(0x1be)](existsSync,_0x58fa7f)&&(await _0xbfac01[_0x19c689(0x1ae)](rm,_0x58fa7f,{'recursive':!![]}),console[_0x19c689(0x1af)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x5dddef),_0x37c51f=!![]);}const _0x121cd9=_0xbfac01[_0x19c689(0x1d3)](getOpencodeSkillsDir,_0x19c689(0x19e));for(const _0x14afd9 of skillsToRemove){const _0xdda388=_0xbfac01['Pmzpm'](join,_0x121cd9,_0x14afd9);existsSync(_0xdda388)&&(await _0xbfac01['vkQKf'](rm,_0xdda388,{'recursive':!![]}),console['log'](_0x19c689(0x1bf)+_0x14afd9),_0x37c51f=!![]);}const _0x13b4a8=join(_0xbfac01['fIRFg'](getOpencodeConfigDir,_0xbfac01[_0x19c689(0x1a0)]),_0xbfac01[_0x19c689(0x1c7)]);await _0xbfac01[_0x19c689(0x1d3)](removeOpencodePluginConfig,_0x13b4a8)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)'),_0x37c51f=!![]);const _0xefae3b=_0xbfac01[_0x19c689(0x1ba)](join,getOpencodeConfigDir(_0xbfac01[_0x19c689(0x1b0)]),'opencode.json');await removeOpencodePluginConfig(_0xefae3b)&&(console[_0x19c689(0x1af)](_0xbfac01[_0x19c689(0x1cf)]),_0x37c51f=!![]);const _0x531dda=await uninstallClaudePlugin();_0x531dda&&(console['log'](_0x19c689(0x1a3)),_0x37c51f=!![]);const _0xdbdcec=await uninstallClaudePlugin(_0xbfac01[_0x19c689(0x1a0)]);_0xdbdcec&&(console[_0x19c689(0x1af)](_0xbfac01['tUtqU']),_0x37c51f=!![]);const _0x3a44fd=await removeMarketplace();_0x3a44fd&&(console['log'](_0x19c689(0x1b1)),_0x37c51f=!![]),_0x37c51f?console['log'](_0xbfac01['TSDMx']):console[_0x19c689(0x1af)](_0xbfac01['OraBn']);}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x537e63=_0x2ea2;(function(_0x2db7b3,_0x58da3f){const _0x477931=_0x2ea2,_0x4fa68b=_0x2db7b3();while(!![]){try{const _0x3d1c15=parseInt(_0x477931(0xae))/0x1+-parseInt(_0x477931(0xac))/0x2*(parseInt(_0x477931(0xc2))/0x3)+-parseInt(_0x477931(0x9f))/0x4*(-parseInt(_0x477931(0x96))/0x5)+-parseInt(_0x477931(0x8f))/0x6*(-parseInt(_0x477931(0xb8))/0x7)+parseInt(_0x477931(0x93))/0x8+parseInt(_0x477931(0xc1))/0x9+-parseInt(_0x477931(0x8e))/0xa;if(_0x3d1c15===_0x58da3f)break;else _0x4fa68b['push'](_0x4fa68b['shift']());}catch(_0x25c61a){_0x4fa68b['push'](_0x4fa68b['shift']());}}}(_0x48b4,0x2d494));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=[_0x537e63(0xba),_0x537e63(0x9c)];function _0x2ea2(_0x2eaa28,_0x33b3b3){_0x2eaa28=_0x2eaa28-0x8d;const _0x48b40a=_0x48b4();let _0x2ea2c7=_0x48b40a[_0x2eaa28];return _0x2ea2c7;}function parseLocalValue(_0x56f5be,_0x2b7d82){const _0x43d495=_0x537e63,_0x110cf5={'aqnlb':function(_0x14f5d9,_0x4b6642){return _0x14f5d9===_0x4b6642;}};if(BOOLEAN_KEYS[_0x43d495(0x90)](_0x56f5be)){if(_0x110cf5['aqnlb'](_0x2b7d82,'true'))return!![];if(_0x2b7d82===_0x43d495(0xb9))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x56f5be+_0x43d495(0xa5));}return _0x2b7d82;}function parseOverrideValue(_0xad351d){const _0x58b08b=_0x537e63,_0x2ae324={'yCXyD':'true','tmSzw':_0x58b08b(0xb9),'YVniv':_0x58b08b(0xa0),'SZRvD':function(_0x2c5e9d,_0xf90a30){return _0x2c5e9d===_0xf90a30;},'rgjvq':_0x58b08b(0xa1),'MWwFf':function(_0x15cd2d,_0x2fe385){return _0x15cd2d(_0x2fe385);},'kJIvH':function(_0x19677f,_0x10408c){return _0x19677f(_0x10408c);}};if(_0xad351d===_0x2ae324[_0x58b08b(0xbe)])return!![];if(_0xad351d===_0x2ae324['tmSzw'])return![];if(_0xad351d===_0x2ae324[_0x58b08b(0xc3)])return null;if(_0x2ae324[_0x58b08b(0xad)](_0xad351d,_0x2ae324['rgjvq']))return undefined;if(/^-?\d+$/['test'](_0xad351d)){const _0x53b157=_0x2ae324['MWwFf'](Number,_0xad351d);if(Number[_0x58b08b(0x95)](_0x53b157))return _0x53b157;}if(/^-?\d+\.\d+$/[_0x58b08b(0x97)](_0xad351d)){const _0x45e155=_0x2ae324['kJIvH'](Number,_0xad351d);if(!Number['isNaN'](_0x45e155))return _0x45e155;}const _0x744c3a=_0xad351d['trim']();if(_0x744c3a[_0x58b08b(0xa9)]('{')&&_0x744c3a[_0x58b08b(0xa3)]('}')||_0x744c3a['startsWith']('[')&&_0x744c3a['endsWith'](']'))try{return JSON[_0x58b08b(0xb3)](_0x744c3a);}catch{}return _0xad351d;}async function resolveProfileTarget(_0x11131d){const _0x854930=_0x537e63,_0x4f6fe0={'znByE':function(_0x187547,_0x4243b0){return _0x187547(_0x4243b0);},'iapqH':_0x854930(0x91)},_0x4e5745=existsSync(_0x4f6fe0['znByE'](getEnvDir,_0x11131d));let _0x28bcd3=![];try{const _0x25c041=await _0x4f6fe0[_0x854930(0xb5)](fetchCloudProfile,_0x11131d);_0x28bcd3=Boolean(_0x25c041);}catch{}if(_0x28bcd3)return{'kind':_0x854930(0xb6),'alsoExistsElsewhere':_0x4e5745};if(_0x4e5745)return{'kind':_0x4f6fe0['iapqH'],'alsoExistsElsewhere':![]};throw new Error(_0x854930(0xab)+_0x11131d+_0x854930(0xa8)+_0x11131d);}function printDualExistsHint(_0xf7c622){const _0x280fd2=_0x537e63;console['log']('\x20\x20Note:\x20\x22'+_0xf7c622+_0x280fd2(0xb2));}function getProjectPath(){return process['cwd']();}async function loadEffectiveCloudSettings(_0x3753fa){const _0x1abf9f=_0x537e63,_0x3f7c7a=await fetchCloudProfile(_0x3753fa),_0x347113=readProfileOverrides(getProjectPath(),_0x3753fa);return mergeCloudProfileSettings(_0x3f7c7a?.[_0x1abf9f(0xb4)]??{},_0x347113??undefined);}export async function configSet(_0x5d672e,_0x4cf499,_0x18fb39){const _0x36e6a0=_0x537e63,_0x577484={'XjtdK':function(_0x216eb6,_0x232ec9){return _0x216eb6(_0x232ec9);},'piCCi':function(_0x5561b9,_0x5e6555){return _0x5561b9(_0x5e6555);},'mtHRa':function(_0x522bb1,_0x3857f7){return _0x522bb1(_0x3857f7);},'ScUiy':function(_0x45f813,_0x3e37ee,_0x3b2440){return _0x45f813(_0x3e37ee,_0x3b2440);},'zLZpu':function(_0x4d0c4c,_0x317d7b,_0x302e5c,_0x23a510){return _0x4d0c4c(_0x317d7b,_0x302e5c,_0x23a510);}},_0x2c524f=await _0x577484['XjtdK'](resolveProfileTarget,_0x5d672e);if(_0x2c524f['kind']==='cloud'){if(_0x2c524f['alsoExistsElsewhere'])printDualExistsHint(_0x5d672e);const _0x525276=_0x577484[_0x36e6a0(0x9e)](parseOverrideValue,_0x18fb39);setProfileOverride(getProjectPath(),_0x5d672e,_0x4cf499,_0x525276),console['log']('Set\x20'+_0x4cf499+'\x20=\x20'+JSON[_0x36e6a0(0x99)](_0x525276)+'\x20for\x20\x22'+_0x5d672e+'\x22');return;}const _0x44bc85=await _0x577484['mtHRa'](loadSettings,_0x5d672e),_0x2138a0=_0x577484['ScUiy'](parseLocalValue,_0x4cf499,_0x18fb39);_0x577484['zLZpu'](setNestedValue,_0x44bc85,_0x4cf499,_0x2138a0),await _0x577484[_0x36e6a0(0xb1)](saveSettings,_0x5d672e,_0x44bc85),console[_0x36e6a0(0xbc)]('Set\x20'+_0x4cf499+_0x36e6a0(0xa6)+_0x2138a0+_0x36e6a0(0x9b)+_0x5d672e+'\x22');}export async function configGet(_0x1dce39,_0xafa20c){const _0x2acd0c=_0x537e63,_0x23e19a={'cjfqj':function(_0x46a020,_0x53f8fd){return _0x46a020(_0x53f8fd);},'dyqfk':function(_0x7e474b,_0x5001a6){return _0x7e474b===_0x5001a6;},'RtmBd':function(_0x1d79b2,_0x2c7073){return _0x1d79b2===_0x2c7073;},'lrPvm':'object','VbtFy':function(_0x164b0e,_0x4117bf){return _0x164b0e===_0x4117bf;}},_0x4f6ed8=await _0x23e19a['cjfqj'](resolveProfileTarget,_0x1dce39);if(_0x23e19a[_0x2acd0c(0xc0)](_0x4f6ed8['kind'],'cloud')){const _0x1d80db=await loadEffectiveCloudSettings(_0x1dce39),_0x33f67a=getNestedValue(_0x1d80db,_0xafa20c);if(_0x23e19a['dyqfk'](_0x33f67a,undefined))console[_0x2acd0c(0xbc)]('(not\x20set)');else _0x23e19a[_0x2acd0c(0xbd)](typeof _0x33f67a,_0x23e19a[_0x2acd0c(0xb0)])?console[_0x2acd0c(0xbc)](JSON[_0x2acd0c(0x99)](_0x33f67a,null,0x2)):console[_0x2acd0c(0xbc)](_0x33f67a);return;}const _0x4af466=await _0x23e19a[_0x2acd0c(0x92)](loadSettings,_0x1dce39),_0x4d06ec=getNestedValue(_0x4af466,_0xafa20c);if(_0x4d06ec===undefined)console[_0x2acd0c(0xbc)]('(not\x20set)');else _0x23e19a[_0x2acd0c(0xa2)](typeof _0x4d06ec,_0x2acd0c(0xc5))?console[_0x2acd0c(0xbc)](JSON['stringify'](_0x4d06ec,null,0x2)):console['log'](_0x4d06ec);}export async function configList(_0x43ffc1){const _0x323680=_0x537e63,_0x357adf={'RmBMT':function(_0x25741b,_0x33665e){return _0x25741b(_0x33665e);},'JTvfE':function(_0x64a0ad,_0x45ec9b){return _0x64a0ad(_0x45ec9b);}},_0x280c18=await _0x357adf['RmBMT'](resolveProfileTarget,_0x43ffc1);if(_0x280c18['kind']===_0x323680(0xb6)){const _0x20f1fe=await _0x357adf['RmBMT'](loadEffectiveCloudSettings,_0x43ffc1);if(!_0x20f1fe||Object[_0x323680(0xbb)](_0x20f1fe)[_0x323680(0x8d)]===0x0){console[_0x323680(0xbc)]('No\x20configuration\x20set\x20for\x20\x22'+_0x43ffc1+'\x22');return;}console['log'](JSON[_0x323680(0x99)](_0x20f1fe,null,0x2));return;}const _0x5911c2=_0x357adf[_0x323680(0xaf)](getSettingsPath,_0x43ffc1);if(!existsSync(_0x5911c2)){console[_0x323680(0xbc)]('No\x20configuration\x20set\x20for\x20\x22'+_0x43ffc1+'\x22');return;}const _0x5ac074=await loadSettings(_0x43ffc1),_0x126a5b=_0x357adf['RmBMT'](formatSettings,_0x5ac074);!_0x126a5b?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x43ffc1+'\x22'):console[_0x323680(0xbc)](_0x126a5b);}export async function configUnset(_0x16f69f,_0x5c94db){const _0x1e3fe2=_0x537e63,_0x408669={'UNfTF':function(_0x12c03c,_0x44defd){return _0x12c03c(_0x44defd);},'jWqOZ':function(_0x5d370c,_0x432734){return _0x5d370c===_0x432734;},'IKTUN':'cloud','YXMuP':function(_0x2b41be,_0x43fcbb,_0x54bf53){return _0x2b41be(_0x43fcbb,_0x54bf53);}},_0x4aab2f=await _0x408669[_0x1e3fe2(0x98)](resolveProfileTarget,_0x16f69f);if(_0x408669[_0x1e3fe2(0xb7)](_0x4aab2f[_0x1e3fe2(0xc4)],_0x408669[_0x1e3fe2(0x9d)])){if(_0x4aab2f[_0x1e3fe2(0xa4)])printDualExistsHint(_0x16f69f);const _0x2f40ca=unsetProfileOverride(getProjectPath(),_0x16f69f,_0x5c94db);_0x2f40ca?console['log']('Removed\x20'+_0x5c94db+_0x1e3fe2(0x9b)+_0x16f69f+'\x22'):console['log'](_0x1e3fe2(0xc6)+_0x5c94db+'\x22\x20not\x20found');return;}const _0x34d8cb=await loadSettings(_0x16f69f),_0x199ed8=_0x408669['YXMuP'](deleteNestedValue,_0x34d8cb,_0x5c94db);_0x199ed8?(await _0x408669[_0x1e3fe2(0x9a)](saveSettings,_0x16f69f,_0x34d8cb),console['log']('Removed\x20'+_0x5c94db)):console['log'](_0x1e3fe2(0xc6)+_0x5c94db+'\x22\x20not\x20found');}export async function configReset(_0xb4bff8){const _0x562388=_0x537e63,_0x37550d={'VAxUm':'cloud','xquRl':function(_0x4e7c86,_0x23f674,_0x4e0d34){return _0x4e7c86(_0x23f674,_0x4e0d34);}},_0x8b933b=await resolveProfileTarget(_0xb4bff8);if(_0x8b933b[_0x562388(0xc4)]===_0x37550d[_0x562388(0xbf)]){_0x37550d['xquRl'](resetProfileOverrides,getProjectPath(),_0xb4bff8),console[_0x562388(0xbc)](_0x562388(0xaa)+_0xb4bff8+'\x22');return;}console['log']('\x22'+_0xb4bff8+_0x562388(0x94)+_0xb4bff8+_0x562388(0xa7));}function _0x48b4(){const _0x512637=['Profile\x20\x22','10OdSbBS','SZRvD','292851HzKzfJ','JTvfE','lrPvm','ScUiy','\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.','parse','settings','znByE','cloud','jWqOZ','1337KtIKMs','false','headless','keys','log','RtmBd','yCXyD','VAxUm','dyqfk','557847ylUvnT','202509QICxWi','YVniv','kind','object','Key\x20\x22','length','3436670wGAEpC','6570XydffM','includes','local','cjfqj','726336aUfrIt','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','isSafeInteger','145xSlUZc','test','UNfTF','stringify','YXMuP','\x20for\x20\x22','allowInsecureLocalhost','IKTUN','piCCi','29228nERLlA','null','undefined','VbtFy','endsWith','alsoExistsElsewhere',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','\x20=\x20','\x20<key>\x22\x20to\x20remove\x20individual\x20values.','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','startsWith','Cleared\x20local\x20overrides\x20for\x20\x22'];_0x48b4=function(){return _0x512637;};return _0x48b4();}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2955e1=_0x5df6;(function(_0xcc3313,_0x1fb8fe){const _0x52839f=_0x5df6,_0x4385c4=_0xcc3313();while(!![]){try{const _0xdf6591=-parseInt(_0x52839f(0x1ee))/0x1+-parseInt(_0x52839f(0x1d9))/0x2*(-parseInt(_0x52839f(0x1f7))/0x3)+-parseInt(_0x52839f(0x1f0))/0x4*(parseInt(_0x52839f(0x1db))/0x5)+parseInt(_0x52839f(0x1ec))/0x6+parseInt(_0x52839f(0x1f1))/0x7*(parseInt(_0x52839f(0x1dd))/0x8)+-parseInt(_0x52839f(0x1ef))/0x9+-parseInt(_0x52839f(0x1e8))/0xa*(parseInt(_0x52839f(0x1e1))/0xb);if(_0xdf6591===_0x1fb8fe)break;else _0x4385c4['push'](_0x4385c4['shift']());}catch(_0x5d3da7){_0x4385c4['push'](_0x4385c4['shift']());}}}(_0x3063,0xd4f96));import{readdir,stat}from'fs/promises';function _0x3063(){const _0x3c2eb8=['25712kHmCAu','Jvanf','Jcgmt','includes','11QSvvqq','environmentKey','length','UTdYs','bug-bashes','Run:\x20ranger\x20profile\x20add\x20<profile-name>','UwbdM','1215790xFWLjK','rYXho','\x20\x20\x20\x20\x20\x20Session:\x20','name','2126148suPtpN','\x20[cloud]','745144CCfloh','1991187oUjxMG','1156132QaCUQN','2198QcQlWl','\x0a*\x20=\x20active\x20profile','localeCompare','yxbCF','endsWith','push','379623ccwqKW','no\x20session','\x0aCloud\x20Profiles:','local','jNvLz','iyyta','legacy','log','isDirectory','environmentDetails','\x20\x20\x20\x20\x20\x20Details:\x20','reports','XlZHZ','sessionUpdatedAt','14wgfbkK','nuIhm','5uSOaae','startsWith'];_0x3063=function(){return _0x3c2eb8;};return _0x3063();}import{join}from'path';function _0x5df6(_0x573fae,_0x4887d9){_0x573fae=_0x573fae-0x1cd;const _0x3063b4=_0x3063();let _0x5df6aa=_0x3063b4[_0x573fae];return _0x5df6aa;}import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=['sessions',_0x2955e1(0x1e5),_0x2955e1(0x1d6),_0x2955e1(0x1ce),'ci'];export async function getEnvNames(){const _0x33b83b=_0x2955e1,_0x2210b8={'Jvanf':function(_0x5a0a84){return _0x5a0a84();},'rYXho':function(_0x1385ce,_0x47c874){return _0x1385ce(_0x47c874);},'UwbdM':function(_0x268213,_0x39ccba,_0x1c1e01){return _0x268213(_0x39ccba,_0x1c1e01);},'nuIhm':_0x33b83b(0x1ce),'UTdYs':function(_0x22acfb,_0x54db76,_0x24c990){return _0x22acfb(_0x54db76,_0x24c990);},'jNvLz':function(_0x5aa59c,_0x22dff0){return _0x5aa59c(_0x22dff0);},'dfDqt':function(_0x308a1b,_0x287fc4){return _0x308a1b(_0x287fc4);},'NMDDf':'.txt','iyyta':function(_0x316a38,_0x34b2c1,_0x43ffd7){return _0x316a38(_0x34b2c1,_0x43ffd7);},'MbxvL':'settings.json','MbsmH':_0x33b83b(0x1d1)},_0x12db8d=_0x2210b8['Jvanf'](getRangerDir);if(!_0x2210b8['rYXho'](existsSync,_0x12db8d))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x37c55a=await _0x2210b8[_0x33b83b(0x1de)](readActiveProfileName),_0x191128=[],_0x105367={},_0x39daf7=_0x2210b8['UwbdM'](join,_0x12db8d,_0x2210b8[_0x33b83b(0x1da)]);if(existsSync(_0x39daf7)){const _0x1c3fba=await readdir(_0x39daf7);for(const _0x1463e0 of _0x1c3fba){const _0x37aecd=_0x2210b8[_0x33b83b(0x1e4)](join,_0x39daf7,_0x1463e0),_0x4ecb9b=await stat(_0x37aecd);_0x4ecb9b['isDirectory']()&&(_0x191128['push'](_0x1463e0),_0x105367[_0x1463e0]=_0x2210b8['nuIhm']);}}const _0x51c6c1=join(_0x12db8d,'ci');if(_0x2210b8[_0x33b83b(0x1cf)](existsSync,_0x51c6c1)){const _0x563ec9=await readdir(_0x51c6c1);for(const _0x570582 of _0x563ec9){const _0x375414=_0x2210b8[_0x33b83b(0x1e7)](join,_0x51c6c1,_0x570582),_0x2ad7a5=await _0x2210b8[_0x33b83b(0x1cf)](stat,_0x375414);_0x2ad7a5['isDirectory']()&&(_0x191128['push'](_0x570582),_0x105367[_0x570582]='ci');}}const _0x104c29=await _0x2210b8['dfDqt'](readdir,_0x12db8d);for(const _0x36c3d8 of _0x104c29){if(NON_ENV_DIRS[_0x33b83b(0x1e0)](_0x36c3d8))continue;if(_0x36c3d8[_0x33b83b(0x1dc)]('.'))continue;if(_0x36c3d8[_0x33b83b(0x1f5)](_0x2210b8['NMDDf']))continue;const _0x4e80d6=join(_0x12db8d,_0x36c3d8),_0x482773=await _0x2210b8['jNvLz'](stat,_0x4e80d6);_0x482773[_0x33b83b(0x1d3)]()&&_0x2210b8[_0x33b83b(0x1e9)](existsSync,_0x2210b8[_0x33b83b(0x1d0)](join,_0x4e80d6,_0x2210b8['MbxvL']))&&(!_0x191128[_0x33b83b(0x1e0)](_0x36c3d8)&&(_0x191128[_0x33b83b(0x1f6)](_0x36c3d8),_0x105367[_0x36c3d8]=_0x2210b8['MbsmH']));}return{'envNames':_0x191128,'activeEnv':_0x37c55a,'envTypes':_0x105367};}export async function envList(){const _0x4158b9=_0x2955e1,_0x405dbe={'XlZHZ':function(_0xfe8b3c){return _0xfe8b3c();},'yxbCF':function(_0x4d6495,_0xbb8366){return _0x4d6495===_0xbb8366;},'Jcgmt':'\x0aNo\x20profiles\x20found.','ccQbg':function(_0x3c2635,_0x2f6251){return _0x3c2635>_0x2f6251;},'EbvAy':'legacy','WhRtu':function(_0x30bf72,_0x43e53e){return _0x30bf72>_0x43e53e;}},{envNames:_0x1314f6,activeEnv:_0x3ca3a5,envTypes:_0x7708b}=await _0x405dbe[_0x4158b9(0x1d7)](getEnvNames);let _0x495a03=[];try{_0x495a03=await listCloudProfiles();}catch{}if(_0x1314f6[_0x4158b9(0x1e3)]===0x0&&_0x405dbe[_0x4158b9(0x1f4)](_0x495a03[_0x4158b9(0x1e3)],0x0)){console['log'](_0x405dbe[_0x4158b9(0x1df)]),console['log'](_0x4158b9(0x1e6));return;}const _0x2d74d0=new Set(_0x495a03['map'](_0x48bca1=>_0x48bca1['name']));if(_0x405dbe['ccQbg'](_0x1314f6[_0x4158b9(0x1e3)],0x0)){console[_0x4158b9(0x1d2)]('\x0aLocal\x20Profiles:');for(const _0x4e60ab of _0x1314f6['sort']()){const _0x348b01=_0x405dbe[_0x4158b9(0x1f4)](_0x4e60ab,_0x3ca3a5)&&!_0x2d74d0['has'](_0x4e60ab),_0x4d5c18=_0x7708b[_0x4e60ab]||_0x4158b9(0x1ce),_0x10fb57=await loadSettings(_0x4e60ab),_0x1609de=_0x4d5c18===_0x405dbe['EbvAy']?'':'\x20['+_0x4d5c18+']';console[_0x4158b9(0x1d2)]('\x20\x20'+(_0x348b01?'*\x20':'\x20\x20')+_0x4e60ab+_0x1609de),_0x10fb57['baseUrl']&&console[_0x4158b9(0x1d2)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x10fb57['baseUrl']),_0x10fb57[_0x4158b9(0x1d4)]&&console['log'](_0x4158b9(0x1d5)+_0x10fb57['environmentDetails']);}}if(_0x405dbe['WhRtu'](_0x495a03['length'],0x0)){console['log'](_0x4158b9(0x1cd));for(const _0x26acb6 of _0x495a03['sort']((_0x1380fe,_0x21c4dc)=>_0x1380fe[_0x4158b9(0x1eb)][_0x4158b9(0x1f3)](_0x21c4dc['name']))){const _0x42db21=_0x405dbe[_0x4158b9(0x1f4)](_0x26acb6['name'],_0x3ca3a5),_0x30d15a=_0x26acb6[_0x4158b9(0x1e2)]?'\x20('+_0x26acb6['environmentKey']+')':'',_0x9ce9f6=_0x26acb6[_0x4158b9(0x1d8)]?'cached\x20(updated\x20'+_0x26acb6[_0x4158b9(0x1d8)]+')':_0x4158b9(0x1f8);console['log']('\x20\x20'+(_0x42db21?'*\x20':'\x20\x20')+_0x26acb6[_0x4158b9(0x1eb)]+_0x4158b9(0x1ed)+_0x30d15a),console['log'](_0x4158b9(0x1ea)+_0x9ce9f6);}}_0x3ca3a5&&console['log'](_0x4158b9(0x1f2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x37c00c=_0x29f6;(function(_0x17a2b0,_0x313864){const _0x213c23=_0x29f6,_0x4976a1=_0x17a2b0();while(!![]){try{const _0x11cccb=-parseInt(_0x213c23(0x104))/0x1+parseInt(_0x213c23(0x11a))/0x2*(-parseInt(_0x213c23(0x106))/0x3)+-parseInt(_0x213c23(0xe8))/0x4*(parseInt(_0x213c23(0x180))/0x5)+-parseInt(_0x213c23(0x15c))/0x6*(-parseInt(_0x213c23(0x147))/0x7)+-parseInt(_0x213c23(0x173))/0x8+-parseInt(_0x213c23(0xeb))/0x9*(-parseInt(_0x213c23(0x151))/0xa)+parseInt(_0x213c23(0x140))/0xb;if(_0x11cccb===_0x313864)break;else _0x4976a1['push'](_0x4976a1['shift']());}catch(_0x22d203){_0x4976a1['push'](_0x4976a1['shift']());}}}(_0xaadc,0xf3db8));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x42d7c4 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';const ACTIVE_FEATURE_FILE='active-feature.txt',bold=_0x3a6f64=>'\x1b[1m'+_0x3a6f64+_0x37c00c(0x123);function getGitRepoUrl(){const _0x316cc0=_0x37c00c,_0x206ed2={'ncuWV':function(_0x2443b9,_0x224dcb,_0x3a9abe){return _0x2443b9(_0x224dcb,_0x3a9abe);},'YojLS':'git\x20remote\x20get-url\x20origin','amAgh':_0x316cc0(0x145),'KYoqS':_0x316cc0(0x129),'AWitw':_0x316cc0(0x10e)};try{const _0x568715=_0x206ed2['ncuWV'](execSync,_0x206ed2['YojLS'],{'encoding':_0x206ed2['amAgh'],'stdio':[_0x206ed2['KYoqS'],_0x206ed2[_0x316cc0(0x154)],_0x206ed2[_0x316cc0(0x154)]]})[_0x316cc0(0x16e)]();return _0x568715['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,_0x206ed2['AWitw'])['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x31d899=_0x37c00c,_0x2253ed={'tHVPx':function(_0x284fd7,_0x10d0c6,_0x19fbd1){return _0x284fd7(_0x10d0c6,_0x19fbd1);},'GqYAd':_0x31d899(0x129)};try{return _0x2253ed[_0x31d899(0x198)](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':'utf-8','stdio':['pipe','pipe',_0x2253ed['GqYAd']]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x5b733e=_0x37c00c,_0x3ba63f={'yyFCt':function(_0x2bd0ff,_0x5a2ca8){return _0x2bd0ff(_0x5a2ca8);},'Menxc':function(_0x2c7f11,_0x30ae59,_0x4a9fb4){return _0x2c7f11(_0x30ae59,_0x4a9fb4);},'csASg':'utf-8'},_0x481544=join(getRangerDir(),ACTIVE_FEATURE_FILE);if(!_0x3ba63f[_0x5b733e(0x122)](existsSync,_0x481544))return null;try{const _0x37a6a5=await _0x3ba63f[_0x5b733e(0xfc)](readFile,_0x481544,_0x3ba63f['csASg']);return _0x37a6a5['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x32dc68){const _0x178595={'UyHmF':function(_0x3e6bcc,_0x2e2cd6){return _0x3e6bcc(_0x2e2cd6);}},_0x5b9463=getRangerDir(),_0x2846d8=join(_0x5b9463,ACTIVE_FEATURE_FILE);!_0x178595['UyHmF'](existsSync,_0x5b9463)&&await mkdir(_0x5b9463,{'recursive':!![]}),await writeFile(_0x2846d8,_0x32dc68,'utf-8');}function getProgressDisplay(_0x113347){const _0x37b9d8=_0x37c00c,_0x5ef0fa={'pnagD':function(_0x3588fa,_0x5bc123){return _0x3588fa+_0x5bc123;},'PWmbs':function(_0x1dfede,_0x1d954b){return _0x1dfede+_0x1d954b;},'dDent':function(_0x456b20,_0x311ece){return _0x456b20-_0x311ece;},'ZsMzs':function(_0x4db1ec,_0x279e86){return _0x4db1ec>_0x279e86;},'vjwMW':function(_0x1ac178,_0x1633e5){return _0x1ac178>_0x1633e5;}},_0x476984=_0x113347['verifiedItems']||0x0,_0xdc6a7a=_0x113347['verificationInProgressItems']||0x0,_0x4ec87a=_0x113347['blockedItems']||0x0,_0x251776=_0x113347[_0x37b9d8(0x131)]||0x0,_0x2ea1c6=_0x113347[_0x37b9d8(0x164)]||0x0,_0x2fa7cf=_0x5ef0fa[_0x37b9d8(0x1b6)](_0x5ef0fa[_0x37b9d8(0x1b6)](_0x476984,_0xdc6a7a),_0x4ec87a)+_0x251776+_0x2ea1c6;if(_0x2fa7cf===0x0)return'-';const _0x4b2200=0xa,_0x3cf6ed=Math[_0x37b9d8(0x135)](_0x476984/_0x2fa7cf*_0x4b2200),_0x5ee1d1=_0x5ef0fa['PWmbs']('█'['repeat'](_0x3cf6ed),'░'['repeat'](_0x5ef0fa[_0x37b9d8(0x1a4)](_0x4b2200,_0x3cf6ed))),_0x45a898=[];if(_0x4ec87a>0x0)_0x45a898[_0x37b9d8(0x19e)](_0x4ec87a+'\x20blocked');if(_0x5ef0fa[_0x37b9d8(0x17e)](_0x251776,0x0))_0x45a898[_0x37b9d8(0x19e)](_0x251776+_0x37b9d8(0x13b));if(_0xdc6a7a>0x0)_0x45a898['push'](_0xdc6a7a+_0x37b9d8(0xec));const _0x48810f=_0x5ef0fa[_0x37b9d8(0xf3)](_0x45a898['length'],0x0)?'\x20('+_0x45a898['join'](',\x20')+')':'';return _0x5ee1d1+'\x20'+_0x476984+'/'+_0x2fa7cf+'\x20verified'+_0x48810f;}function getCurrentSessionItems(_0x2b4871,_0x3077c2){const _0x1db1d1=_0x37c00c;if(!_0x2b4871['currentSessionId'])return _0x3077c2['filter'](_0x1e517a=>!_0x1e517a[_0x1db1d1(0x143)]);return _0x3077c2[_0x1db1d1(0x120)](_0x4576ec=>_0x4576ec['sessionId']===_0x2b4871[_0x1db1d1(0x103)]||!_0x4576ec['sessionId']);}function _0x29f6(_0x1b512e,_0x97b746){_0x1b512e=_0x1b512e-0xe3;const _0xaadc5b=_0xaadc();let _0x29f6d1=_0xaadc5b[_0x1b512e];return _0x29f6d1;}function displayFeature(_0x1b5cb7,_0x59fc69){const _0x1eb095=_0x37c00c,_0xa26f5a={'wnUEX':function(_0x5ec715,_0x5952ac){return _0x5ec715(_0x5952ac);},'VTJYd':_0x1eb095(0x10f),'bSNgc':function(_0x5cae14,_0x5a7395){return _0x5cae14===_0x5a7395;},'MfIZK':function(_0x5e526b,_0x175c71){return _0x5e526b===_0x175c71;},'LjhLz':_0x1eb095(0x132),'SuRCo':function(_0x390801,_0x2a1bc6){return _0x390801===_0x2a1bc6;},'XexFz':function(_0x21932c,_0xb381d0){return _0x21932c===_0xb381d0;},'zhuEE':'blocked','bykpD':function(_0x131239,_0x52bef8){return _0x131239===_0x52bef8;},'OaHCL':function(_0x1a7e46,_0x1bbaa9){return _0x1a7e46>_0x1bbaa9;},'yboqV':function(_0x53cb70,_0x19088d){return _0x53cb70!==_0x19088d;},'nQoEV':function(_0x5aa423,_0x11ec2e){return _0x5aa423!==_0x11ec2e;},'GXPxl':function(_0x36f4da,_0x45d836){return _0x36f4da+_0x45d836;},'ebyCj':_0x1eb095(0x1b5),'GGwml':function(_0x3284e0,_0x50ceb3){return _0x3284e0===_0x50ceb3;},'rqNBB':_0x1eb095(0x134)};console['log']('\x0a'+_0x1b5cb7['name']+'\x20('+_0x1b5cb7[_0x1eb095(0x12a)]+')');_0x1b5cb7['stats']&&console[_0x1eb095(0xef)](_0x1eb095(0x19a)+_0xa26f5a[_0x1eb095(0x107)](getProgressDisplay,_0x1b5cb7[_0x1eb095(0xe9)]));_0x1b5cb7['description']&&console['log'](_0x1eb095(0xf1)+_0x1b5cb7[_0x1eb095(0x16b)]);_0x1b5cb7['gitRepoUrl']&&console['log'](_0x1eb095(0x114)+_0x1b5cb7[_0x1eb095(0x187)]);_0x1b5cb7['gitBranch']&&console['log'](_0x1eb095(0x14c)+_0x1b5cb7[_0x1eb095(0x109)]);console[_0x1eb095(0xef)](_0x1eb095(0xf5)+new Date(_0x1b5cb7['createdAt'])[_0x1eb095(0x18d)]());_0x1b5cb7[_0x1eb095(0x156)]&&console['log'](_0x1eb095(0x167)+new Date(_0x1b5cb7[_0x1eb095(0x156)])['toLocaleString']());if(_0x59fc69&&_0x59fc69[_0x1eb095(0x130)]>0x0){console[_0x1eb095(0xef)](_0xa26f5a[_0x1eb095(0xea)]);for(let _0x3a5738=0x0;_0x3a5738<_0x59fc69['length'];_0x3a5738++){const _0x1de759=_0x59fc69[_0x3a5738];let _0x547bbb;if(_0x1de759[_0x1eb095(0x183)]===_0x1eb095(0x134)&&_0xa26f5a[_0x1eb095(0x100)](_0x1de759[_0x1eb095(0xf8)],_0x1eb095(0x148)))_0x547bbb='✅';else{if(_0xa26f5a[_0x1eb095(0x16f)](_0x1de759[_0x1eb095(0x183)],_0xa26f5a['LjhLz']))_0x547bbb='🟢';else{if(_0xa26f5a[_0x1eb095(0x174)](_0x1de759[_0x1eb095(0x183)],'incomplete'))_0x547bbb='🟠';else{if(_0xa26f5a['XexFz'](_0x1de759[_0x1eb095(0x183)],_0xa26f5a['zhuEE']))_0x547bbb='🛑';else{if(_0xa26f5a['bykpD'](_0x1de759['status'],_0x1eb095(0x134)))_0x547bbb='⛔';else _0x1de759['status']===_0x1eb095(0x1a1)?_0x547bbb='⏳':_0x547bbb='⬜';}}}}const _0x3d5a27=_0xa26f5a[_0x1eb095(0x16c)](_0x1de759['version'],0x1)?_0x1eb095(0x11d)+_0x1de759[_0x1eb095(0x15a)]+')':'',_0x33536f=_0x1de759['version']>0x1&&_0x1de759[_0x1eb095(0x146)]&&_0xa26f5a[_0x1eb095(0x18e)](_0x1de759[_0x1eb095(0x183)],_0x1eb095(0x134))&&_0xa26f5a['nQoEV'](_0x1de759['status'],_0xa26f5a['LjhLz'])?'\x20[has\x20reviewer\x20feedback]':'';console['log']('\x20\x20\x20'+_0xa26f5a[_0x1eb095(0x1a3)](_0x3a5738,0x1)+'.\x20'+_0x547bbb+'\x20'+_0x1de759['description']+_0x3d5a27+_0x33536f);_0xa26f5a[_0x1eb095(0x165)](_0x1de759['status'],'blocked')&&_0x1de759[_0x1eb095(0x189)]&&console[_0x1eb095(0xef)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x1de759['blockedReason']);_0x1de759[_0x1eb095(0x183)]===_0xa26f5a['ebyCj']&&_0x1de759[_0x1eb095(0x12d)]&&console[_0x1eb095(0xef)]('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x1de759['incompleteReason']);if(_0xa26f5a[_0x1eb095(0x193)](_0x1de759['status'],_0xa26f5a['rqNBB'])&&_0x1de759['terminalReason']===_0x1eb095(0x148))console['log']('\x20\x20\x20\x20\x20\x20Approved');else _0x1de759[_0x1eb095(0x183)]===_0x1eb095(0x134)&&_0x1de759[_0x1eb095(0x139)]&&console[_0x1eb095(0xef)](_0x1eb095(0x191)+_0x1de759['canceledReason']);}}}export async function featureCreate(_0x204a0e,_0x28e83f){const _0x672296=_0x37c00c,_0xccf524={'fOKzP':function(_0x5b46d8,_0x4bf99b){return _0x5b46d8(_0x4bf99b);},'tLkJL':function(_0x1f9eb6){return _0x1f9eb6();},'XZokF':_0x672296(0xfd)},{envNames:_0x41001d}=await getEnvNames();_0x41001d['length']===0x0&&console[_0x672296(0x14d)]('\x0a'+_0xccf524['fOKzP'](formatProfileRequiredMessage,_0x16ed76=>bold(_0x16ed76)));const _0xcbdc59=_0x28e83f['scenarios']?_0x28e83f[_0x672296(0x121)][_0x672296(0x1b9)](_0x44e171=>_0x44e171[_0x672296(0x16e)]()):[],_0x41759e=_0xccf524[_0x672296(0x1a6)](getGitRepoUrl),_0x14aeb2=getGitBranch();console[_0x672296(0xef)](_0xccf524[_0x672296(0x14f)]);const _0x195a48=await _0xccf524[_0x672296(0x182)](createFeature,{'name':_0x204a0e,'description':_0x28e83f[_0x672296(0x16b)],'checklist':_0xcbdc59,'gitRepoUrl':_0x41759e,'gitBranch':_0x14aeb2});await setActiveFeatureId(_0x195a48['id']),await tryStartCurrentSession(_0x195a48['id']);const _0x27cf88=process[_0x672296(0x108)]['CLAUDE_SESSION_ID'];_0x27cf88&®isterSession(_0x27cf88,_0x195a48['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x195a48['id']),displayFeature(_0x195a48,_0x195a48[_0x672296(0x136)]),console[_0x672296(0xef)](_0x672296(0x17b));}export async function featureList(_0x431a81){const _0x11c25b=_0x37c00c,_0x1f271b={'YGEDa':function(_0x25b7ee,_0x3ae76a){return _0x25b7ee>_0x3ae76a;},'IFNrW':function(_0x44474a,_0x4c2d49){return _0x44474a<_0x4c2d49;},'WjzPb':function(_0x1e9be2,_0x41d7b0){return _0x1e9be2!==_0x41d7b0;},'fIEgv':'\x20--current-branch','cDksP':'\x20--include-deleted'},_0x2b503b={'limit':_0x431a81['limit']??0xa,'offset':_0x431a81['offset']??0x0,'includeDeleted':_0x431a81['includeDeleted']};_0x431a81[_0x11c25b(0x160)]&&(_0x2b503b[_0x11c25b(0x187)]=getGitRepoUrl(),_0x2b503b[_0x11c25b(0x109)]=getGitBranch());const _0x1145f5=await listFeatures(_0x2b503b);if(_0x1145f5['items']['length']===0x0){console[_0x11c25b(0xef)]('\x0aNo\x20feature\x20reviews\x20found.');return;}const _0x57768e=_0x1f271b[_0x11c25b(0x11b)](_0x1145f5[_0x11c25b(0xe5)],_0x1145f5[_0x11c25b(0x17c)][_0x11c25b(0x130)])?_0x11c25b(0x102)+_0x1145f5['items'][_0x11c25b(0x130)]+_0x11c25b(0xfa)+_0x1145f5['totalCount']:_0x1145f5['totalCount']+_0x11c25b(0xe6);console['log']('\x0a'+_0x57768e+':\x0a');for(const _0x15eaea of _0x1145f5[_0x11c25b(0x17c)]){console[_0x11c25b(0xef)](''+_0x15eaea['name']),console[_0x11c25b(0xef)](_0x11c25b(0x1b1)+_0x15eaea['id']),_0x15eaea[_0x11c25b(0xe9)]&&console[_0x11c25b(0xef)]('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x15eaea[_0x11c25b(0xe9)])),_0x15eaea[_0x11c25b(0x109)]&&console[_0x11c25b(0xef)](_0x11c25b(0x14c)+_0x15eaea['gitBranch']),console[_0x11c25b(0xef)](_0x11c25b(0xf5)+new Date(_0x15eaea[_0x11c25b(0x14e)])['toLocaleDateString']()),console['log']('');}const _0x27df70=_0x2b503b[_0x11c25b(0x172)]??0xa,_0x9de134=(_0x2b503b['offset']??0x0)+_0x1145f5['items']['length'];if(_0x1f271b[_0x11c25b(0x12b)](_0x9de134,_0x1145f5[_0x11c25b(0xe5)])){const _0x369bc5=_0x1f271b[_0x11c25b(0xe4)](_0x27df70,0xa)?'\x20--limit\x20'+_0x27df70:'',_0x3b82ea=_0x431a81[_0x11c25b(0x160)]?_0x1f271b[_0x11c25b(0x11e)]:'',_0x86ee3d=_0x431a81[_0x11c25b(0x1a5)]?_0x1f271b['cDksP']:'';console['log'](_0x11c25b(0xf9)+_0x9de134+_0x369bc5+_0x3b82ea+_0x86ee3d);}}export async function featureShow(_0x556546){const _0x4b5f94=_0x37c00c,_0x2f36c3={'PlevU':function(_0x4ca582){return _0x4ca582();},'akzMd':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','uXqHT':function(_0x258d28,_0x43bb6a,_0x19dbbf){return _0x258d28(_0x43bb6a,_0x19dbbf);}},_0x58e9a1=_0x556546||await _0x2f36c3[_0x4b5f94(0x177)](getActiveFeatureId);if(!_0x58e9a1)throw new Error(_0x2f36c3['akzMd']);const _0x55ca65=await getFeature(_0x58e9a1);_0x2f36c3[_0x4b5f94(0x14a)](displayFeature,_0x55ca65,_0x55ca65[_0x4b5f94(0x136)]);}export async function featureResume(_0x3ba514){const _0x1619e7=_0x37c00c,_0x1338db={'YYuuP':function(_0x23ad89,_0x5856e7){return _0x23ad89(_0x5856e7);},'pxiJT':function(_0x4f02b6){return _0x4f02b6();},'XMDWx':function(_0x1ab2fe,_0x29204f){return _0x1ab2fe!==_0x29204f;},'DnjZT':function(_0x3c47e3){return _0x3c47e3();},'HTKjl':function(_0x1659c0){return _0x1659c0();},'fFhGO':_0x1619e7(0x125),'LGccl':function(_0x3209fa,_0x519264){return _0x3209fa===_0x519264;},'kpHkM':_0x1619e7(0x111),'xrDDO':function(_0x310492,_0x3754f4){return _0x310492===_0x3754f4;},'WkrJy':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','zwmep':function(_0x255a5f,_0x176237){return _0x255a5f(_0x176237);},'VHMqS':'list','isDjW':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:'};if(_0x3ba514){const _0x2b3e26=await _0x1338db[_0x1619e7(0x10c)](getFeature,_0x3ba514);await setActiveFeatureId(_0x2b3e26['id']);const _0x1474b4=_0x1338db['pxiJT'](getGitBranch);_0x1474b4&&_0x1338db[_0x1619e7(0x184)](_0x1474b4,_0x2b3e26['gitBranch'])&&(await updateFeature(_0x2b3e26['id'],{'gitBranch':_0x1474b4}),console[_0x1619e7(0xef)](_0x1619e7(0x133)+_0x1474b4));console[_0x1619e7(0xef)]('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x2b3e26[_0x1619e7(0x1a0)]+'\x20('+_0x2b3e26['id']+')'),await tryStartCurrentSession(_0x2b3e26['id']);const _0x105d92=process['env']['CLAUDE_SESSION_ID'];_0x105d92&®isterSession(_0x105d92,_0x2b3e26['id']);displayFeature(_0x2b3e26,_0x2b3e26[_0x1619e7(0x136)]),await printFeedbackNudge(_0x2b3e26['id']);return;}const _0x143f06=_0x1338db['DnjZT'](getGitRepoUrl),_0x17106e=_0x1338db[_0x1619e7(0xee)](getGitBranch);if(!_0x143f06&&!_0x17106e)throw new Error(_0x1619e7(0x10b));console['log'](_0x1619e7(0x12e)+(_0x143f06||'any')+'\x20/\x20'+(_0x17106e||_0x1338db['fFhGO'])+'...');const _0x658906=await listFeatures({'gitRepoUrl':_0x143f06,'gitBranch':_0x17106e}),_0x5d43a0=_0x658906[_0x1619e7(0x17c)]['filter'](_0x474ef6=>_0x474ef6['status']?_0x474ef6['status']!==_0x1619e7(0x132):!_0x474ef6[_0x1619e7(0x156)]);if(_0x1338db[_0x1619e7(0x1b8)](_0x5d43a0[_0x1619e7(0x130)],0x0)){console[_0x1619e7(0xef)](_0x1338db[_0x1619e7(0x112)]),console[_0x1619e7(0xef)](_0x1619e7(0x168));return;}let _0x6ae279;if(_0x1338db[_0x1619e7(0x126)](_0x5d43a0['length'],0x1))_0x6ae279=_0x5d43a0[0x0];else{const _0x6920c9=process[_0x1619e7(0x13a)][_0x1619e7(0x15b)]&&process['stdout']['isTTY'];if(!_0x6920c9){console['log'](_0x1338db['WkrJy']);for(const _0x414589 of _0x5d43a0){console['log']('\x20\x20'+_0x414589['name']),console[_0x1619e7(0xef)](_0x1619e7(0x128)+_0x414589['id']),_0x414589['stats']&&console['log'](_0x1619e7(0xff)+_0x1338db[_0x1619e7(0x17a)](getProgressDisplay,_0x414589['stats'])),_0x414589['gitBranch']&&console[_0x1619e7(0xef)](_0x1619e7(0x169)+_0x414589[_0x1619e7(0x109)]);}throw new Error(_0x1619e7(0x196));}const {selected:_0x36fa41}=await _0x42d7c4[_0x1619e7(0x113)]([{'type':_0x1338db['VHMqS'],'name':_0x1619e7(0x19d),'message':_0x1338db['isDjW'],'choices':_0x5d43a0[_0x1619e7(0x1b9)](_0x79f50f=>({'name':_0x79f50f[_0x1619e7(0x1a0)]+'\x20('+_0x79f50f['id']+')','value':_0x79f50f['id']}))}]);_0x6ae279=_0x5d43a0['find'](_0x26b0fd=>_0x26b0fd['id']===_0x36fa41);}await setActiveFeatureId(_0x6ae279['id']);_0x17106e&&_0x1338db['XMDWx'](_0x17106e,_0x6ae279['gitBranch'])&&(await updateFeature(_0x6ae279['id'],{'gitBranch':_0x17106e}),console['log'](_0x1619e7(0x133)+_0x17106e));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x6ae279[_0x1619e7(0x1a0)]+'\x20('+_0x6ae279['id']+')'),await _0x1338db['YYuuP'](tryStartCurrentSession,_0x6ae279['id']);const _0x560b90=await getFeature(_0x6ae279['id']),_0x5195ac=process['env'][_0x1619e7(0x161)];_0x5195ac&®isterSession(_0x5195ac,_0x560b90['id']),displayFeature(_0x560b90,_0x560b90['checklistItems']),await printFeedbackNudge(_0x560b90['id']);}function _0xaadc(){const _0x17059e=['fOKzP','status','XMDWx','bXYly','isInteger','gitRepoUrl','exit','blockedReason','ttGrA','rMpoW','FhSlB','toLocaleString','yboqV','fdwdR','replace','\x20\x20\x20\x20\x20\x20Cancelled:\x20','xVLly','GGwml','beDsZ','notes','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','timing','tHVPx','IvNxg','\x20\x20\x20Progress:\x20','Step\x20','ready','selected','push','all','name','verification_in_progress','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','GXPxl','dDent','includeDeleted','tLkJL','tQgPI','hvhox','\x0a❌\x20Invalid\x20scenario\x20index:\x20','\x20\x20\x20Status:\x20','.\x20Feature\x20review\x20has\x20','):\x20\x22','ozrkB','spatial','SrmKn','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','\x20\x20\x20ID:\x20','xJJZA','xraFV','authorName','incomplete','pnagD','selector','LGccl','map','PTCso','kYnMQ','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','WjzPb','totalCount','\x20feature\x20review(s)\x20found','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','13204SmzfHZ','stats','VTJYd','8253gdEkBc','\x20in\x20progress','shBBs','HTKjl','log','rSwdv','\x20\x20\x20Description:\x20','\x20unaddressed\x20comment(s)','vjwMW','SuecD','\x20\x20\x20Created:\x20','Current\x20session\x20not\x20found.','submittedAt','terminalReason','Next\x20page:\x20ranger\x20list\x20--offset\x20','\x20of\x20','RDmUo','Menxc','\x0aCreating\x20feature\x20review...','find','\x20\x20\x20\x20\x20Progress:\x20','bSNgc','unaddressedComments','Showing\x20','currentSessionId','726487NoEIoS','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','5731833uaGWpr','wnUEX','env','gitBranch','\x0a⚠️\x20\x20','Not\x20in\x20a\x20git\x20repository.','YYuuP','from','github.com/','\x0a\x20\x20\x20Scenarios:','short','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','kpHkM','prompt','\x20\x20\x20Repository:\x20','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','\x0a✅\x20Scenario\x20added','\x20concluded.','assetUrl','assets','2ozHMmC','YGEDa','reports','\x20(v','fIEgv','\x20\x20\x20\x20\x20📋\x20Selector:\x20','filter','scenarios','yyFCt','\x1b[0m','after','any','xrDDO','.png','\x20\x20\x20\x20\x20ID:\x20','pipe','dashboardUrl','IFNrW','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','incompleteReason','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','linkedSession','length','incompleteItems','verified','\x20\x20\x20Updated\x20branch\x20to:\x20','closed','round','checklistItems','\x20\x20\x20\x20','point','canceledReason','stdin','\x20incomplete','iteration','completed','JJWac','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','46511751SPNtnI','json','\x20—\x20','sessionId','toLocaleDateString','utf-8','parentItemId','83713gCcctP','approved','\x20scenario(s).','uXqHT','screenshot','\x20\x20\x20Branch:\x20','warn','createdAt','XZokF','No\x20scenarios\x20found.','14710eRDVGh','output','join','KYoqS','type','completedAt','oXltN','toFixed','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','version','isTTY','564dzUXUa','error','\x20\x20\x20▶️\x20Started\x20session\x20','in_progress','currentBranch','CLAUDE_SESSION_ID','stringify','split','pendingItems','bykpD','\x0aConcluding\x20session...','\x20\x20\x20Completed:\x20','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','\x20\x20\x20\x20\x20Branch:\x20','\x0aAvailable\x20scenarios:','description','OaHCL','\x20\x20💬\x20','trim','MfIZK','\x0a✅\x20Session\x20is\x20already\x20completed.','YewMx','limit','8863704sTmMVT','SuRCo','browserSessionId','domRef','PlevU','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','canonicalFlow','zwmep','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','items','/api/v1/mcp/browser-sessions/','ZsMzs','\x20—\x20no\x20comments','2965lzGWgU','\x20\x20\x20\x20\x20🎯\x20Element:\x20<'];_0xaadc=function(){return _0x17059e;};return _0xaadc();}async function printFeedbackNudge(_0x1f0e5b){const _0xc7e4e7=_0x37c00c,_0x3e8f6f={'SHQZU':function(_0x4ce16c,_0x479907){return _0x4ce16c(_0x479907);},'GIoId':function(_0x354140,_0x14d9b4,_0x13064d){return _0x354140(_0x14d9b4,_0x13064d);},'rSwdv':function(_0x4b1464,_0x31bcea){return _0x4b1464>_0x31bcea;},'SxKFE':function(_0xb299ff,_0x40b9be){return _0xb299ff>_0x40b9be;},'mnBAs':_0xc7e4e7(0x1b0)};try{const {items:_0xda4cbd}=await _0x3e8f6f['SHQZU'](getActionItems,_0x1f0e5b);let _0x591cd7=0x0,_0x76135b=0x0;for(const _0x1df2b2 of _0xda4cbd){const _0x2077ff=await _0x3e8f6f['GIoId'](getItemFeedback,_0x1f0e5b,_0x1df2b2['id']);_0x3e8f6f[_0xc7e4e7(0xf0)](_0x2077ff['unaddressedComments']['length'],0x0)&&(_0x591cd7+=_0x2077ff[_0xc7e4e7(0x101)]['length'],_0x76135b++);}_0x3e8f6f['SxKFE'](_0x591cd7,0x0)&&(console[_0xc7e4e7(0xef)](_0xc7e4e7(0x10a)+_0x591cd7+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x76135b+_0xc7e4e7(0x149)),console['log'](_0x3e8f6f['mnBAs']));}catch{}}async function tryStartCurrentSession(_0x1de6ee){const _0x455c77=_0x37c00c;try{const {sessions:_0x3f7732}=await listFeatureSessions(_0x1de6ee),_0x13263b=_0x3f7732[_0x455c77(0xfe)](_0x16b142=>_0x16b142[_0x455c77(0x183)]===_0x455c77(0x19c));_0x13263b&&(await startSession(_0x1de6ee,_0x13263b['id']),console['log'](_0x455c77(0x15e)+_0x13263b[_0x455c77(0x13c)]));}catch{}}export async function featureReport(_0x341a77,_0x1a5d19){const _0x5a8b10=_0x37c00c,_0x52d72f={'tQgPI':function(_0x8f6181){return _0x8f6181();},'pIYJg':function(_0x1ca746,_0x1d3c13){return _0x1ca746(_0x1d3c13);},'EmOqL':'utf-8'},_0x45b4b3=_0x341a77||await _0x52d72f[_0x5a8b10(0x1a7)](getActiveFeatureId);if(!_0x45b4b3)throw new Error(_0x5a8b10(0x1a2));console[_0x5a8b10(0xef)]('\x0aGenerating\x20report...');const _0x2e7613=await getFeatureReportMarkdown(_0x45b4b3,{'style':_0x1a5d19['style']}),_0x4c1288=_0x1a5d19[_0x5a8b10(0x152)]||join(_0x52d72f[_0x5a8b10(0x1a7)](getRangerDir),_0x5a8b10(0x11c),_0x45b4b3+'.md'),_0x50bdf9=join(_0x4c1288,'..');!_0x52d72f['pIYJg'](existsSync,_0x50bdf9)&&await mkdir(_0x50bdf9,{'recursive':!![]}),await writeFile(_0x4c1288,_0x2e7613,_0x52d72f['EmOqL']),console[_0x5a8b10(0xef)]('\x0a✅\x20Report\x20generated:\x20'+_0x4c1288);}function getScenarioResult(_0x100af0){const _0x217f3e=_0x37c00c,_0x3595f0={'NGCrh':_0x217f3e(0x134),'xraFV':function(_0x133e2d,_0x5ddfe3){return _0x133e2d===_0x5ddfe3;},'rMpoW':'in_progress'};if(_0x100af0['status']===_0x3595f0['NGCrh'])return _0x100af0[_0x217f3e(0xf8)]??_0x3595f0['NGCrh'];if(_0x3595f0[_0x217f3e(0x1b3)](_0x100af0['status'],_0x217f3e(0x1a1)))return _0x3595f0[_0x217f3e(0x18b)];return _0x100af0['status'];}function getScenarioRationale(_0x294ae0,_0x35414c){const _0x7b9044=_0x37c00c;if(_0x35414c)return _0x35414c;if(_0x294ae0['blockedReason'])return _0x294ae0['blockedReason'];if(_0x294ae0[_0x7b9044(0x12d)])return _0x294ae0[_0x7b9044(0x12d)];if(_0x294ae0['canceledReason'])return _0x294ae0['canceledReason'];if(_0x294ae0[_0x7b9044(0x195)])return _0x294ae0[_0x7b9044(0x195)];return null;}export async function featureReportPrDescription(_0x286e4b,_0x62abc3){const _0x166355=_0x37c00c,_0x4122ae={'IvTdc':function(_0x2ffc68){return _0x2ffc68();},'TLHme':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','LLARn':function(_0x5dd067,_0x12213d,_0xa5e8b9){return _0x5dd067(_0x12213d,_0xa5e8b9);},'DoVen':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','dhGtZ':'\x0aAvailable\x20scenarios:'},_0x3f8d44=_0x286e4b||await _0x4122ae['IvTdc'](getActiveFeatureId);if(!_0x3f8d44)throw new Error(_0x4122ae['TLHme']);const _0x38624d=await getFeature(_0x3f8d44),_0x4f4292=_0x38624d['checklistItems']||[],_0x478dd1=_0x4122ae['LLARn'](getCurrentSessionItems,_0x38624d,_0x4f4292);_0x478dd1['length']===0x0&&(console['error'](_0x4122ae['DoVen']),process['exit'](0x1));const _0x4ee0e5=_0x62abc3['excludeScenarios']??[],_0x359a3f=_0x4ee0e5['filter'](_0x2c30e2=>!Number[_0x166355(0x186)](_0x2c30e2)||_0x2c30e2<0x1||_0x2c30e2>_0x478dd1['length']);if(_0x359a3f['length']>0x0){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x359a3f[_0x166355(0x153)](',\x20')),console['log'](_0x4122ae['dhGtZ']);for(let _0x562716=0x0;_0x562716<_0x478dd1['length'];_0x562716++){console[_0x166355(0xef)]('\x20\x20'+(_0x562716+0x1)+'.\x20'+_0x478dd1[_0x562716]['description']);}process[_0x166355(0x188)](0x1);}const _0x1e4b62=new Set(_0x4ee0e5[_0x166355(0x1b9)](_0x33264a=>_0x33264a-0x1)),_0x3ca703=_0x478dd1['filter']((_0xe9c2cf,_0x53d86c)=>!_0x1e4b62['has'](_0x53d86c));_0x3ca703[_0x166355(0x130)]===0x0&&(console[_0x166355(0x15d)](_0x166355(0x178)),process[_0x166355(0x188)](0x1));if(_0x62abc3[_0x166355(0x141)])await outputJsonReport(_0x3f8d44,_0x38624d,_0x3ca703);else{const _0x14cd54=await getFeatureReportMarkdown(_0x3f8d44,{'itemIds':_0x3ca703['map'](_0x5aba4a=>_0x5aba4a['id'])});process['stdout']['write'](_0x14cd54['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x14907b,_0x539a07,_0x561845){const _0x143328=_0x37c00c,_0x4572a2={'gggIj':function(_0x439234,_0x4a35f4){return _0x439234>_0x4a35f4;},'VwZlb':function(_0x290cc3){return _0x290cc3();},'Wbcdg':function(_0x2d71e2,_0x4d52eb){return _0x2d71e2(_0x4d52eb);}},_0x5117f7=_0x4572a2['VwZlb'](getApiBaseUrl),_0x3bfe66=await _0x4572a2['Wbcdg'](getFeatureReport,_0x14907b),_0x38eedd=new Map(_0x3bfe66[_0x143328(0x136)][_0x143328(0x1b9)](_0x25111e=>[_0x25111e['id'],_0x25111e])),_0x288312=await Promise[_0x143328(0x19f)](_0x561845['map'](async _0x46853c=>{const _0xf5c209=_0x143328,_0x3300ff=_0x38eedd['get'](_0x46853c['id']),_0x276598=_0x3300ff?.[_0xf5c209(0x12f)]??null;let _0x3dc208=[];if(_0x46853c['browserSessionId'])try{const {steps:_0x21cd67}=await getBrowserSessionSteps(_0x46853c['browserSessionId']);_0x4572a2['gggIj'](_0x21cd67['length'],0x0)&&(_0x3dc208=_0x21cd67[_0xf5c209(0x1b9)](_0x7d9737=>{const _0x12e5b6=_0xf5c209,_0x244e6a=_0x7d9737['assets']['find'](_0x517539=>_0x517539['assetType']===_0x12e5b6(0x14b)&&_0x517539[_0x12e5b6(0x197)]===_0x12e5b6(0x124))??_0x7d9737[_0x12e5b6(0x119)]['find'](_0x4bb051=>_0x4bb051['assetType']==='screenshot');let _0x57496a=null,_0x217981=null;if(_0x244e6a){const _0x2efc99=_0x244e6a['storage']['location'][_0x12e5b6(0x163)]('/')['pop']();_0x57496a=_0x5117f7+_0x12e5b6(0x17d)+_0x46853c[_0x12e5b6(0x175)]+'/artifacts/'+_0x2efc99,_0x2efc99&&(_0x217981=_0x2efc99[_0x12e5b6(0x190)](/\.\w+$/,'')['replace'](/^(key_)?\d+_/,'')['replace'](/[-_]/g,'\x20'));}return{'description':_0x217981||_0x7d9737['description']||_0x7d9737['stepName']||_0x12e5b6(0x19b)+_0x7d9737['position'],'screenshot':_0x57496a,'is_key_step':_0x7d9737['isKeyStep']};}));}catch{}return _0x3dc208[_0xf5c209(0x130)]===0x0&&_0x276598?.['screenshotUrls']&&(_0x3dc208=_0x276598['screenshotUrls']['map']((_0x2d912d,_0x982ac2)=>({'description':'Screenshot\x20'+(_0x982ac2+0x1),'screenshot':_0x2d912d,'is_key_step':![]}))),{'description':_0x46853c['description'],'result':getScenarioResult(_0x46853c),'rationale':getScenarioRationale(_0x46853c,_0x276598?.['agentResponse']),'steps':_0x3dc208};})),_0x15fe74={'url':_0x539a07[_0x143328(0x12a)],'scenarios':_0x288312};process['stdout']['write'](JSON[_0x143328(0x162)](_0x15fe74,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x2a6abd){const _0x397f20=_0x37c00c,_0x3376de={'MsShk':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','RDmUo':function(_0x2e881e,_0x167a15){return _0x2e881e(_0x167a15);},'ttGrA':'No\x20active\x20session\x20for\x20this\x20feature\x20review.','yIByR':_0x397f20(0x13d),'ozrkB':_0x397f20(0x170),'IvNxg':function(_0x173ed7,_0x22435d){return _0x173ed7!==_0x22435d;},'zgntw':'in_progress'},_0x2bf53e=_0x2a6abd||await getActiveFeatureId();if(!_0x2bf53e)throw new Error(_0x3376de['MsShk']);const _0x3be856=await _0x3376de[_0x397f20(0xfb)](getFeature,_0x2bf53e);if(!_0x3be856[_0x397f20(0x103)])throw new Error(_0x3376de[_0x397f20(0x18a)]);const {sessions:_0x94f8be}=await listFeatureSessions(_0x2bf53e),_0x9f5148=_0x94f8be['find'](_0x4e4041=>_0x4e4041['id']===_0x3be856['currentSessionId']);if(!_0x9f5148)throw new Error(_0x397f20(0xf6));if(_0x9f5148['status']===_0x3376de['yIByR']){console['log'](_0x3376de[_0x397f20(0x1ad)]);return;}if(_0x3376de[_0x397f20(0x199)](_0x9f5148['status'],_0x3376de['zgntw']))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x9f5148[_0x397f20(0x183)]);console[_0x397f20(0xef)](_0x397f20(0x166)),await concludeSession(_0x2bf53e,_0x3be856[_0x397f20(0x103)]),console[_0x397f20(0xef)]('\x0a✅\x20Session\x20'+_0x9f5148[_0x397f20(0x13c)]+_0x397f20(0x117)),console[_0x397f20(0xef)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0xc20360){const _0x52719c=_0x37c00c,_0x42a665={'CoUKy':function(_0x8bf2f){return _0x8bf2f();},'kYnMQ':_0x52719c(0x1a2),'oXltN':function(_0x5d8b0c,_0x4c9616){return _0x5d8b0c(_0x4c9616);},'ogPDJ':function(_0x138b26,_0x37f6b3){return _0x138b26(_0x37f6b3);},'ETzVg':function(_0x60a872,_0x1fd0e6){return _0x60a872===_0x1fd0e6;},'Lylyf':function(_0x2fd1c9,_0x3e1cd9){return _0x2fd1c9===_0x3e1cd9;},'SuecD':_0x52719c(0x15f)},_0x5c2775=_0xc20360||await _0x42a665['CoUKy'](getActiveFeatureId);if(!_0x5c2775)throw new Error(_0x42a665[_0x52719c(0x1bb)]);const _0x317c7c=await _0x42a665[_0x52719c(0x157)](getFeature,_0x5c2775);console[_0x52719c(0xef)]('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x317c7c[_0x52719c(0x1a0)]+'\x0a');const {sessions:_0x1acad1}=await _0x42a665['ogPDJ'](listFeatureSessions,_0x5c2775);if(_0x42a665['ETzVg'](_0x1acad1[_0x52719c(0x130)],0x0)){console[_0x52719c(0xef)]('No\x20sessions\x20found.');return;}for(const _0x1b24c2 of _0x1acad1){const _0x34921d=_0x1b24c2['status']===_0x52719c(0x13d)?'✅':_0x42a665['Lylyf'](_0x1b24c2[_0x52719c(0x183)],_0x42a665[_0x52719c(0xf4)])?'🔄':'▶️';console['log'](_0x34921d+'\x20Session\x20'+_0x1b24c2[_0x52719c(0x13c)]+'\x20('+_0x1b24c2['id']+')'),console['log'](_0x52719c(0x1aa)+_0x1b24c2['status']),console[_0x52719c(0xef)](_0x52719c(0xf5)+new Date(_0x1b24c2['createdAt'])['toLocaleString']()),_0x1b24c2['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x1b24c2[_0x52719c(0x156)])[_0x52719c(0x18d)]()),console['log']('');}}export async function featureAddScenario(_0x361fd7,_0x28a460){const _0x10b31d=_0x37c00c,_0x237fe7={'Ykavm':function(_0x245e5a){return _0x245e5a();},'UaGOv':function(_0xa4538,_0x5a2c2c){return _0xa4538(_0x5a2c2c);}},_0x2078f3=_0x28a460||await _0x237fe7['Ykavm'](getActiveFeatureId);if(!_0x2078f3)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x28b297=await _0x237fe7['UaGOv'](getFeature,_0x2078f3);if(_0x28b297['latestReview']&&!_0x28b297['latestReview'][_0x10b31d(0xf7)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x28b297['dashboardUrl']);await createChecklistItem(_0x2078f3,_0x361fd7);const _0x5ed682=await _0x237fe7['UaGOv'](getFeature,_0x2078f3);console['log'](_0x10b31d(0x116)),displayFeature(_0x5ed682,_0x5ed682['checklistItems']);}export async function featureEditScenario(_0xf196f6,_0x16240a){const _0x19ab9b=_0x37c00c,_0x42e08e={'fyjtx':_0x19ab9b(0xe3),'hqbZQ':'Please\x20finish\x20your\x20review\x20first:','pwHFw':function(_0x5330d0,_0x1a036c){return _0x5330d0===_0x1a036c;},'UopVD':_0x19ab9b(0x159),'YMtBe':_0x19ab9b(0x12c),'spTBZ':function(_0x40bc52,_0x35d08a){return _0x40bc52+_0x35d08a;},'XpuBK':function(_0x18a4f1,_0xbf2e37){return _0x18a4f1-_0xbf2e37;},'BMntp':function(_0x4f1a2c,_0x553169){return _0x4f1a2c>=_0x553169;},'xJJZA':'\x0aAvailable\x20scenarios:','YwyBU':function(_0x40a39e,_0x51c361){return _0x40a39e<_0x51c361;},'YewMx':function(_0x58557d,_0x3fe401,_0x26deb3){return _0x58557d(_0x3fe401,_0x26deb3);}},_0x36f303=_0x16240a['id']||await getActiveFeatureId();!_0x36f303&&(console[_0x19ab9b(0x15d)](_0x19ab9b(0x115)),console[_0x19ab9b(0x15d)]('Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review'),process['exit'](0x1));const _0x13dc33=await getFeature(_0x36f303);_0x13dc33['latestReview']&&!_0x13dc33['latestReview'][_0x19ab9b(0xf7)]&&(console[_0x19ab9b(0x15d)](_0x42e08e['fyjtx']),console['error'](_0x42e08e['hqbZQ']),console['error']('\x20\x20'+_0x13dc33[_0x19ab9b(0x12a)]),process[_0x19ab9b(0x188)](0x1));const _0x2a132f=_0x13dc33[_0x19ab9b(0x136)]||[];_0x42e08e['pwHFw'](_0x2a132f['length'],0x0)&&(console[_0x19ab9b(0x15d)](_0x42e08e['UopVD']),process[_0x19ab9b(0x188)](0x1));if(_0x16240a['scenario']===undefined){console[_0x19ab9b(0x15d)](_0x42e08e['YMtBe']),console['log'](_0x19ab9b(0x16a));for(let _0x483fd5=0x0;_0x483fd5<_0x2a132f[_0x19ab9b(0x130)];_0x483fd5++){console[_0x19ab9b(0xef)]('\x20\x20'+_0x42e08e['spTBZ'](_0x483fd5,0x1)+'.\x20'+_0x2a132f[_0x483fd5]['description']);}process[_0x19ab9b(0x188)](0x1);}const _0x58c795=_0x42e08e['XpuBK'](_0x16240a['scenario'],0x1);if(_0x58c795<0x0||_0x42e08e['BMntp'](_0x58c795,_0x2a132f['length'])){console['error'](_0x19ab9b(0x1a9)+_0x16240a['scenario']+_0x19ab9b(0x1ab)+_0x2a132f[_0x19ab9b(0x130)]+'\x20scenarios.'),console[_0x19ab9b(0xef)](_0x42e08e[_0x19ab9b(0x1b2)]);for(let _0x1fbaa4=0x0;_0x42e08e['YwyBU'](_0x1fbaa4,_0x2a132f[_0x19ab9b(0x130)]);_0x1fbaa4++){console[_0x19ab9b(0xef)]('\x20\x20'+(_0x1fbaa4+0x1)+'.\x20'+_0x2a132f[_0x1fbaa4]['description']);}process['exit'](0x1);}const _0x32967d=_0x2a132f[_0x58c795];await updateChecklistItem(_0x36f303,_0x32967d['id'],{'description':_0xf196f6});const _0x13c6b1=await getFeature(_0x36f303);console['log']('\x0a✅\x20Scenario\x20updated'),_0x42e08e[_0x19ab9b(0x171)](displayFeature,_0x13c6b1,_0x13c6b1[_0x19ab9b(0x136)]);}async function downloadFeedbackImage(_0x39a520,_0xb0a233){const _0x57e50b=_0x37c00c,_0x30a6e2={'PTCso':function(_0x259900,_0x466eb5,_0x595674){return _0x259900(_0x466eb5,_0x595674);},'wPNnu':function(_0x5ae65b){return _0x5ae65b();},'bzrDJ':'feedback-images'};try{const _0x411868=_0x30a6e2[_0x57e50b(0x1ba)](join,_0x30a6e2['wPNnu'](getRangerDir),_0x30a6e2['bzrDJ']);await _0x30a6e2['PTCso'](mkdir,_0x411868,{'recursive':!![]});const _0x438fe8=_0x30a6e2[_0x57e50b(0x1ba)](join,_0x411868,'comment_'+_0xb0a233+_0x57e50b(0x127)),_0x1f7962=await fetch(_0x39a520);if(!_0x1f7962['ok'])return null;const _0x556bca=Buffer[_0x57e50b(0x10d)](await _0x1f7962['arrayBuffer']());return await writeFile(_0x438fe8,_0x556bca),_0x438fe8;}catch{return null;}}export async function featureGetReview(_0x55e06f){const _0x262a22=_0x37c00c,_0x4b20b3={'aVIhO':function(_0x3a404b,_0x22cc01){return _0x3a404b(_0x22cc01);},'hvhox':function(_0x58b7d7,_0x4ebe87){return _0x58b7d7===_0x4ebe87;},'eJcQE':_0x262a22(0x150),'uJkyM':function(_0x4bc4ac,_0x3cba57){return _0x4bc4ac<_0x3cba57;},'uvNgZ':function(_0x14208b,_0x2e0c93){return _0x14208b>_0x2e0c93;},'JJWac':_0x262a22(0x110),'xVLly':'Unknown','bXYly':'\x20>\x20','fdwdR':'element','RMrcD':function(_0x58210d,_0x204975){return _0x58210d>=_0x204975;}},_0x169c74=_0x55e06f||await getActiveFeatureId();if(!_0x169c74)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x396dc1=await _0x4b20b3['aVIhO'](getFeature,_0x169c74),{items:_0x2ed97a}=await _0x4b20b3['aVIhO'](getActionItems,_0x169c74);console[_0x262a22(0xef)]('\x0a📋\x20Feedback\x20for:\x20'+_0x396dc1[_0x262a22(0x1a0)]+'\x20('+_0x396dc1['id']+')\x0a');if(_0x4b20b3[_0x262a22(0x1a8)](_0x2ed97a['length'],0x0)){console['log'](_0x4b20b3['eJcQE']);return;}for(let _0x3bab98=0x0;_0x4b20b3['uJkyM'](_0x3bab98,_0x2ed97a['length']);_0x3bab98++){const _0x221932=_0x2ed97a[_0x3bab98],_0x342b67=_0x4b20b3['uvNgZ'](_0x221932['version'],0x1)?_0x262a22(0x11d)+_0x221932[_0x262a22(0x15a)]+')':'',_0x2b0b1f=await getItemFeedback(_0x169c74,_0x221932['id']);if(_0x2b0b1f[_0x262a22(0x101)][_0x262a22(0x130)]>0x0){console['log']('Scenario\x20'+(_0x3bab98+0x1)+':\x20\x22'+_0x221932['description']+'\x22'+_0x342b67+_0x262a22(0x142)+_0x2b0b1f['unaddressedComments']['length']+_0x262a22(0xf2));for(const _0x2d9939 of _0x2b0b1f['unaddressedComments']){const _0x1da967=new Date(_0x2d9939[_0x262a22(0x14e)])[_0x262a22(0x144)]('en-US',{'month':_0x4b20b3[_0x262a22(0x13e)],'day':'numeric'}),_0x2ccb5a=_0x2d9939[_0x262a22(0x1b4)]||_0x2d9939['authorEmail']||_0x4b20b3[_0x262a22(0x192)];console['log'](_0x262a22(0x16d)+_0x2ccb5a+'\x20('+_0x1da967+_0x262a22(0x1ac)+_0x2d9939['content']+'\x22');if(_0x2d9939[_0x262a22(0x118)]){const _0x458b0d=await downloadFeedbackImage(_0x2d9939[_0x262a22(0x118)],_0x2d9939['id']);_0x458b0d&&console['log'](_0x262a22(0xe7)+_0x458b0d);}if(_0x2d9939[_0x262a22(0x176)]){const _0x49d32f=_0x2d9939[_0x262a22(0x176)][_0x262a22(0x1b7)][_0x262a22(0x163)](_0x4b20b3[_0x262a22(0x185)])['pop']()?.['split'](':')[0x0]||_0x4b20b3[_0x262a22(0x18f)],_0x1ad31f=_0x2d9939['domRef']['textContent']?'\x20\x22'+_0x2d9939['domRef']['textContent']['slice'](0x0,0x3c)+'\x22':'';console['log'](_0x262a22(0x181)+_0x49d32f+'>'+_0x1ad31f),console['log'](_0x262a22(0x11f)+_0x2d9939[_0x262a22(0x176)][_0x262a22(0x1b7)]);}else{if(_0x2d9939['spatial']){const _0x4313d0=_0x2d9939['spatial']['coordinates'];_0x4b20b3[_0x262a22(0x1a8)](_0x2d9939['spatial'][_0x262a22(0x155)],_0x262a22(0x138))&&_0x4b20b3['RMrcD'](_0x4313d0['length'],0x2)?console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x4313d0[0x0][_0x262a22(0x158)](0x2)+',\x20'+_0x4313d0[0x1]['toFixed'](0x2)+')'):console[_0x262a22(0xef)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x2d9939[_0x262a22(0x1ae)][_0x262a22(0x155)]+'\x20at\x20['+_0x4313d0[_0x262a22(0x1b9)](_0x4261ee=>_0x4261ee[_0x262a22(0x158)](0x2))['join'](',\x20')+']');}}}if(_0x2b0b1f[_0x262a22(0x179)]){console['log']('\x20\x20Expected\x20flow:');for(const _0x5dcc97 of _0x2b0b1f['canonicalFlow'][_0x262a22(0x163)]('\x0a')){console['log'](_0x262a22(0x137)+_0x5dcc97);}}}else console['log']('Scenario\x20'+(_0x3bab98+0x1)+':\x20\x22'+_0x221932['description']+'\x22'+_0x342b67+_0x262a22(0x17f)),console['log']('\x20\x20✅\x20No\x20feedback\x20to\x20address');console[_0x262a22(0xef)]('');}}export async function featureDelete(_0x239a03){const _0x4e59ef=_0x37c00c,_0x4759af={'SrmKn':function(_0x2bbc7e,_0x20c88f){return _0x2bbc7e+_0x20c88f;},'FhSlB':'\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20'},_0x2f6a8b=_0x239a03||await getActiveFeatureId();if(!_0x2f6a8b)throw new Error(_0x4e59ef(0x105));const _0xb17e9a=await getFeature(_0x2f6a8b);await softDeleteFeature(_0x2f6a8b),console['log'](_0x4e59ef(0x13f)+_0xb17e9a['name']+'\x20('+_0x2f6a8b+')'),console[_0x4e59ef(0xef)](_0x4759af[_0x4e59ef(0x1af)](_0x4759af[_0x4e59ef(0x18c)],_0x2f6a8b));}export async function featureRestore(_0x390112){const _0x4111b6=_0x37c00c,_0x1c1b4a={'beDsZ':function(_0x57c616,_0x347a52){return _0x57c616(_0x347a52);},'shBBs':function(_0x1947ba,_0x54fd97,_0x236c34){return _0x1947ba(_0x54fd97,_0x236c34);}};await restoreFeature(_0x390112);const _0x35e41c=await _0x1c1b4a[_0x4111b6(0x194)](getFeature,_0x390112);console[_0x4111b6(0xef)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x35e41c['name']+'\x20('+_0x390112+')'),_0x1c1b4a[_0x4111b6(0xed)](displayFeature,_0x35e41c,_0x35e41c['checklistItems']);}
|
|
1
|
+
(function(_0x17148e,_0xb1c35c){const _0x4e5652=_0x3e12,_0x45134b=_0x17148e();while(!![]){try{const _0x4b4ca0=-parseInt(_0x4e5652(0x27a))/0x1*(-parseInt(_0x4e5652(0x26d))/0x2)+parseInt(_0x4e5652(0x26f))/0x3+parseInt(_0x4e5652(0x250))/0x4+parseInt(_0x4e5652(0x1f7))/0x5*(parseInt(_0x4e5652(0x202))/0x6)+parseInt(_0x4e5652(0x244))/0x7*(parseInt(_0x4e5652(0x20e))/0x8)+-parseInt(_0x4e5652(0x24e))/0x9+parseInt(_0x4e5652(0x249))/0xa*(-parseInt(_0x4e5652(0x24a))/0xb);if(_0x4b4ca0===_0xb1c35c)break;else _0x45134b['push'](_0x45134b['shift']());}catch(_0x1adc57){_0x45134b['push'](_0x45134b['shift']());}}}(_0x234a,0xe79a0));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x2dd850 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';function _0x3e12(_0x28964a,_0x11cd85){_0x28964a=_0x28964a-0x1ae;const _0x234a09=_0x234a();let _0x3e12e7=_0x234a09[_0x28964a];return _0x3e12e7;}import{listCloudProfiles}from'./utils/cloudProfile.js';const ACTIVE_FEATURE_FILE='active-feature.txt',bold=_0x570b35=>'\x1b[1m'+_0x570b35+'\x1b[0m';function getGitRepoUrl(){const _0x77d073=_0x3e12,_0x3c980f={'Xvstz':function(_0x3fc4e0,_0x53f965,_0x3f7e27){return _0x3fc4e0(_0x53f965,_0x3f7e27);},'NxMmL':'git\x20remote\x20get-url\x20origin','vlvjc':_0x77d073(0x280)};try{const _0x3bbe8e=_0x3c980f[_0x77d073(0x1d5)](execSync,_0x3c980f[_0x77d073(0x24d)],{'encoding':_0x77d073(0x1dd),'stdio':[_0x3c980f[_0x77d073(0x287)],_0x3c980f[_0x77d073(0x287)],_0x3c980f['vlvjc']]})[_0x77d073(0x262)]();return _0x3bbe8e['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,_0x77d073(0x24b))['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x596914=_0x3e12,_0x53efd8={'WqabW':function(_0xc276b9,_0x3567af,_0x3a9948){return _0xc276b9(_0x3567af,_0x3a9948);},'NcpZn':_0x596914(0x1dd),'LQelt':_0x596914(0x280)};try{return _0x53efd8['WqabW'](execSync,_0x596914(0x21c),{'encoding':_0x53efd8['NcpZn'],'stdio':[_0x53efd8[_0x596914(0x1b3)],_0x596914(0x280),'pipe']})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x42102d=_0x3e12,_0x58fc5c={'nZVSO':function(_0x550245,_0x162c4b,_0x3864e0){return _0x550245(_0x162c4b,_0x3864e0);},'iSySu':function(_0x57b6ac){return _0x57b6ac();},'AoIdi':function(_0xae3e84,_0x371689){return _0xae3e84(_0x371689);}},_0x272b9c=_0x58fc5c['nZVSO'](join,_0x58fc5c['iSySu'](getRangerDir),ACTIVE_FEATURE_FILE);if(!_0x58fc5c[_0x42102d(0x1b0)](existsSync,_0x272b9c))return null;try{const _0x2574e4=await _0x58fc5c['nZVSO'](readFile,_0x272b9c,'utf-8');return _0x2574e4[_0x42102d(0x262)]()||null;}catch{return null;}}async function setActiveFeatureId(_0x481549){const _0x181ce3=_0x3e12,_0x3615a0={'gdmKf':function(_0xf4f0d9){return _0xf4f0d9();},'bNMQM':function(_0x36fcc4,_0x17c251,_0xe9bb68){return _0x36fcc4(_0x17c251,_0xe9bb68);},'EkdAz':function(_0x20d044,_0x5b4c58,_0x131d51,_0x70c762){return _0x20d044(_0x5b4c58,_0x131d51,_0x70c762);}},_0x470923=_0x3615a0['gdmKf'](getRangerDir),_0x1da3ea=join(_0x470923,ACTIVE_FEATURE_FILE);!existsSync(_0x470923)&&await _0x3615a0['bNMQM'](mkdir,_0x470923,{'recursive':!![]}),await _0x3615a0[_0x181ce3(0x258)](writeFile,_0x1da3ea,_0x481549,_0x181ce3(0x1dd));}function getProgressDisplay(_0x12f79f){const _0x18bafe=_0x3e12,_0xd61c1a={'wfjSa':function(_0x48eb0c,_0x4d7411){return _0x48eb0c+_0x4d7411;},'ifLFB':function(_0x3f3a10,_0xcf532b){return _0x3f3a10===_0xcf532b;},'hlxFA':function(_0xa2adbf,_0x58627c){return _0xa2adbf*_0x58627c;},'NWLSg':function(_0x36b0bf,_0x27e3fa){return _0x36b0bf/_0x27e3fa;},'nfiGI':function(_0x3daffe,_0x54287c){return _0x3daffe-_0x54287c;},'XKUdZ':function(_0x3a2f14,_0x19dc8a){return _0x3a2f14>_0x19dc8a;},'OQGkk':function(_0x35e485,_0x4572d1){return _0x35e485>_0x4572d1;}},_0x2b245c=_0x12f79f[_0x18bafe(0x1fe)]||0x0,_0x5429c5=_0x12f79f['verificationInProgressItems']||0x0,_0x160924=_0x12f79f[_0x18bafe(0x1bc)]||0x0,_0x1c1eee=_0x12f79f['incompleteItems']||0x0,_0xe7c52=_0x12f79f[_0x18bafe(0x23d)]||0x0,_0x55c4b1=_0xd61c1a['wfjSa'](_0x2b245c+_0x5429c5+_0x160924,_0x1c1eee)+_0xe7c52;if(_0xd61c1a['ifLFB'](_0x55c4b1,0x0))return'-';const _0x1d2b2e=0xa,_0x58e311=Math['round'](_0xd61c1a[_0x18bafe(0x1c7)](_0xd61c1a[_0x18bafe(0x1f6)](_0x2b245c,_0x55c4b1),_0x1d2b2e)),_0x14e331='█'[_0x18bafe(0x22d)](_0x58e311)+'░'['repeat'](_0xd61c1a['nfiGI'](_0x1d2b2e,_0x58e311)),_0x51575c=[];if(_0x160924>0x0)_0x51575c[_0x18bafe(0x1af)](_0x160924+_0x18bafe(0x209));if(_0xd61c1a['XKUdZ'](_0x1c1eee,0x0))_0x51575c[_0x18bafe(0x1af)](_0x1c1eee+'\x20incomplete');if(_0x5429c5>0x0)_0x51575c['push'](_0x5429c5+_0x18bafe(0x253));const _0x584f93=_0xd61c1a[_0x18bafe(0x1df)](_0x51575c[_0x18bafe(0x236)],0x0)?'\x20('+_0x51575c['join'](',\x20')+')':'';return _0x14e331+'\x20'+_0x2b245c+'/'+_0x55c4b1+'\x20verified'+_0x584f93;}function getCurrentSessionItems(_0x4d80ad,_0x2c2f22){const _0x3f0b94=_0x3e12;if(!_0x4d80ad[_0x3f0b94(0x205)])return _0x2c2f22[_0x3f0b94(0x234)](_0x3fa947=>!_0x3fa947[_0x3f0b94(0x1f9)]);return _0x2c2f22[_0x3f0b94(0x234)](_0x4699e6=>_0x4699e6['sessionId']===_0x4d80ad[_0x3f0b94(0x205)]||!_0x4699e6[_0x3f0b94(0x1f9)]);}function displayFeature(_0x536ad1,_0x2541b7){const _0x41f6cd=_0x3e12,_0xdb3889={'FBlpg':function(_0x3a25d8,_0x2502be){return _0x3a25d8(_0x2502be);},'vJFWO':function(_0x32f200,_0x3b524f){return _0x32f200>_0x3b524f;},'dYcfb':'\x0a\x20\x20\x20Scenarios:','MVBIA':function(_0x4f4b1f,_0x43f9ec){return _0x4f4b1f===_0x43f9ec;},'gQTEq':_0x41f6cd(0x286),'yABjF':_0x41f6cd(0x22c),'ZrvPq':_0x41f6cd(0x25a),'zNMdr':function(_0x1789ef,_0x4f9fe6){return _0x1789ef===_0x4f9fe6;},'NJTqe':'incomplete','DFnDl':function(_0x3de50f,_0x3469ad){return _0x3de50f===_0x3469ad;},'uiUrI':function(_0x5112ac,_0x35ca1e){return _0x5112ac===_0x35ca1e;},'guIPJ':_0x41f6cd(0x21a),'VmWRW':function(_0x3451f7,_0x4d677e){return _0x3451f7>_0x4d677e;},'Tzgog':function(_0x4a1e80,_0x34223b){return _0x4a1e80!==_0x34223b;},'WnSvs':function(_0x293450,_0x3ddbfe){return _0x293450+_0x3ddbfe;},'Bijhb':_0x41f6cd(0x1cf)};console[_0x41f6cd(0x23f)]('\x0a'+_0x536ad1['name']+'\x20('+_0x536ad1[_0x41f6cd(0x240)]+')');_0x536ad1[_0x41f6cd(0x24c)]&&console['log'](_0x41f6cd(0x1c2)+_0xdb3889[_0x41f6cd(0x1ec)](getProgressDisplay,_0x536ad1['stats']));_0x536ad1[_0x41f6cd(0x1bf)]&&console[_0x41f6cd(0x23f)](_0x41f6cd(0x207)+_0x536ad1[_0x41f6cd(0x1bf)]);_0x536ad1['gitRepoUrl']&&console['log']('\x20\x20\x20Repository:\x20'+_0x536ad1[_0x41f6cd(0x272)]);_0x536ad1['gitBranch']&&console['log']('\x20\x20\x20Branch:\x20'+_0x536ad1[_0x41f6cd(0x227)]);console[_0x41f6cd(0x23f)](_0x41f6cd(0x1e1)+new Date(_0x536ad1[_0x41f6cd(0x25e)])[_0x41f6cd(0x1ce)]());_0x536ad1['completedAt']&&console[_0x41f6cd(0x23f)](_0x41f6cd(0x239)+new Date(_0x536ad1['completedAt'])['toLocaleString']());if(_0x2541b7&&_0xdb3889[_0x41f6cd(0x225)](_0x2541b7[_0x41f6cd(0x236)],0x0)){console[_0x41f6cd(0x23f)](_0xdb3889['dYcfb']);for(let _0x41ff65=0x0;_0x41ff65<_0x2541b7[_0x41f6cd(0x236)];_0x41ff65++){const _0x5e1c20=_0x2541b7[_0x41ff65];let _0x1bc5d5;if(_0xdb3889[_0x41f6cd(0x26c)](_0x5e1c20['status'],_0xdb3889[_0x41f6cd(0x248)])&&_0x5e1c20['terminalReason']===_0xdb3889['yABjF'])_0x1bc5d5='✅';else{if(_0x5e1c20[_0x41f6cd(0x229)]===_0xdb3889['ZrvPq'])_0x1bc5d5='🟢';else{if(_0xdb3889[_0x41f6cd(0x27e)](_0x5e1c20['status'],_0xdb3889['NJTqe']))_0x1bc5d5='🟠';else{if(_0xdb3889['DFnDl'](_0x5e1c20[_0x41f6cd(0x229)],_0x41f6cd(0x1cf)))_0x1bc5d5='🛑';else{if(_0x5e1c20[_0x41f6cd(0x229)]===_0x41f6cd(0x286))_0x1bc5d5='⛔';else _0xdb3889['uiUrI'](_0x5e1c20['status'],_0xdb3889[_0x41f6cd(0x218)])?_0x1bc5d5='⏳':_0x1bc5d5='⬜';}}}}const _0x18bde7=_0xdb3889[_0x41f6cd(0x24f)](_0x5e1c20['version'],0x1)?'\x20(v'+_0x5e1c20[_0x41f6cd(0x27d)]+')':'',_0x45c2d3=_0x5e1c20['version']>0x1&&_0x5e1c20['parentItemId']&&_0x5e1c20[_0x41f6cd(0x229)]!=='closed'&&_0xdb3889['Tzgog'](_0x5e1c20['status'],_0xdb3889['ZrvPq'])?'\x20[has\x20reviewer\x20feedback]':'';console['log']('\x20\x20\x20'+_0xdb3889['WnSvs'](_0x41ff65,0x1)+'.\x20'+_0x1bc5d5+'\x20'+_0x5e1c20[_0x41f6cd(0x1bf)]+_0x18bde7+_0x45c2d3);_0x5e1c20[_0x41f6cd(0x229)]===_0xdb3889['Bijhb']&&_0x5e1c20[_0x41f6cd(0x222)]&&console[_0x41f6cd(0x23f)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x5e1c20[_0x41f6cd(0x222)]);_0x5e1c20['status']===_0xdb3889[_0x41f6cd(0x211)]&&_0x5e1c20['incompleteReason']&&console[_0x41f6cd(0x23f)]('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x5e1c20[_0x41f6cd(0x1cc)]);if(_0x5e1c20[_0x41f6cd(0x229)]===_0x41f6cd(0x286)&&_0x5e1c20[_0x41f6cd(0x204)]==='approved')console[_0x41f6cd(0x23f)]('\x20\x20\x20\x20\x20\x20Approved');else _0x5e1c20['status']===_0xdb3889['gQTEq']&&_0x5e1c20[_0x41f6cd(0x265)]&&console['log'](_0x41f6cd(0x23b)+_0x5e1c20[_0x41f6cd(0x265)]);}}}export async function featureCreate(_0xcd867a,_0x214ff5){const _0x1658e9=_0x3e12,_0xc8da51={'URxCh':function(_0x591562,_0x14e834){return _0x591562===_0x14e834;},'DOnhG':function(_0x43f897){return _0x43f897();},'qYuXt':function(_0x3b5113,_0x1e3299){return _0x3b5113(_0x1e3299);},'AyRry':function(_0x1ba674){return _0x1ba674();},'HqnBm':_0x1658e9(0x233),'YSNMJ':function(_0x21391c,_0x1f545c){return _0x21391c(_0x1f545c);},'JMQNc':function(_0xb0fc73,_0x3a58c0,_0x42383d){return _0xb0fc73(_0x3a58c0,_0x42383d);}},{envNames:_0x233473}=await getEnvNames();if(_0xc8da51[_0x1658e9(0x1ff)](_0x233473['length'],0x0)&&!process['env']['RANGER_TEST_USERNAME']){let _0x3d0af0=0x0;try{_0x3d0af0=(await _0xc8da51[_0x1658e9(0x1eb)](listCloudProfiles))['length'];}catch{_0x3d0af0=0x1;}_0x3d0af0===0x0&&console['warn']('\x0a'+_0xc8da51['qYuXt'](formatProfileRequiredMessage,_0x262290=>bold(_0x262290)));}const _0x1b83c2=_0x214ff5[_0x1658e9(0x223)]?_0x214ff5[_0x1658e9(0x223)]['map'](_0x3b48ee=>_0x3b48ee[_0x1658e9(0x262)]()):[],_0x5d73b9=_0xc8da51['DOnhG'](getGitRepoUrl),_0x2e691d=_0xc8da51['AyRry'](getGitBranch);console['log'](_0xc8da51['HqnBm']);const _0x23011c=await createFeature({'name':_0xcd867a,'description':_0x214ff5[_0x1658e9(0x1bf)],'checklist':_0x1b83c2,'gitRepoUrl':_0x5d73b9,'gitBranch':_0x2e691d});await _0xc8da51['qYuXt'](setActiveFeatureId,_0x23011c['id']),await _0xc8da51['YSNMJ'](tryStartCurrentSession,_0x23011c['id']);const _0x2e91ce=process[_0x1658e9(0x255)]['CLAUDE_SESSION_ID'];_0x2e91ce&®isterSession(_0x2e91ce,_0x23011c['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x23011c['id']),_0xc8da51['JMQNc'](displayFeature,_0x23011c,_0x23011c['checklistItems']),console[_0x1658e9(0x23f)]('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0x19a78b){const _0x14141f=_0x3e12,_0x5281e3={'npbyI':function(_0xa5c4a1,_0x2ddcbb){return _0xa5c4a1===_0x2ddcbb;},'EeSvY':function(_0x5d39f0,_0x46fa19){return _0x5d39f0>_0x46fa19;},'dWSDr':function(_0x372e28,_0x429513){return _0x372e28(_0x429513);},'siZWS':function(_0x1b5aac,_0x2102db){return _0x1b5aac+_0x2102db;},'lAYxf':function(_0x4ea04c,_0x556171){return _0x4ea04c!==_0x556171;},'tNXXG':_0x14141f(0x252),'DVmzv':_0x14141f(0x1bb)},_0x115a23={'limit':_0x19a78b[_0x14141f(0x26e)]??0xa,'offset':_0x19a78b['offset']??0x0,'includeDeleted':_0x19a78b['includeDeleted']};_0x19a78b['currentBranch']&&(_0x115a23['gitRepoUrl']=getGitRepoUrl(),_0x115a23['gitBranch']=getGitBranch());const _0x2ec44b=await listFeatures(_0x115a23);if(_0x5281e3['npbyI'](_0x2ec44b['items'][_0x14141f(0x236)],0x0)){console[_0x14141f(0x23f)]('\x0aNo\x20feature\x20reviews\x20found.');return;}const _0x2318c3=_0x5281e3['EeSvY'](_0x2ec44b[_0x14141f(0x1ea)],_0x2ec44b[_0x14141f(0x1f8)][_0x14141f(0x236)])?_0x14141f(0x212)+_0x2ec44b[_0x14141f(0x1f8)][_0x14141f(0x236)]+'\x20of\x20'+_0x2ec44b['totalCount']:_0x2ec44b['totalCount']+_0x14141f(0x1e7);console[_0x14141f(0x23f)]('\x0a'+_0x2318c3+':\x0a');for(const _0x824a1c of _0x2ec44b[_0x14141f(0x1f8)]){console[_0x14141f(0x23f)](''+_0x824a1c[_0x14141f(0x27c)]),console[_0x14141f(0x23f)](_0x14141f(0x27f)+_0x824a1c['id']),_0x824a1c['stats']&&console['log']('\x20\x20\x20Progress:\x20'+_0x5281e3[_0x14141f(0x1e4)](getProgressDisplay,_0x824a1c['stats'])),_0x824a1c['gitBranch']&&console['log']('\x20\x20\x20Branch:\x20'+_0x824a1c['gitBranch']),console['log']('\x20\x20\x20Created:\x20'+new Date(_0x824a1c[_0x14141f(0x25e)])[_0x14141f(0x246)]()),console['log']('');}const _0x1f01af=_0x115a23['limit']??0xa,_0xb59de8=_0x5281e3['siZWS'](_0x115a23[_0x14141f(0x20d)]??0x0,_0x2ec44b[_0x14141f(0x1f8)][_0x14141f(0x236)]);if(_0xb59de8<_0x2ec44b['totalCount']){const _0x542c38=_0x5281e3[_0x14141f(0x23a)](_0x1f01af,0xa)?_0x14141f(0x1cb)+_0x1f01af:'',_0x44a8ee=_0x19a78b[_0x14141f(0x1b5)]?_0x5281e3[_0x14141f(0x254)]:'',_0x5e69d6=_0x19a78b['includeDeleted']?_0x5281e3['DVmzv']:'';console[_0x14141f(0x23f)](_0x14141f(0x1f3)+_0xb59de8+_0x542c38+_0x44a8ee+_0x5e69d6);}}export async function featureShow(_0x219cc2){const _0x137b94=_0x3e12,_0xa47016={'mdkol':function(_0x1ce0cd){return _0x1ce0cd();},'hQxIo':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','hFaKj':function(_0x4cbe95,_0x5ee771){return _0x4cbe95(_0x5ee771);}},_0x526d69=_0x219cc2||await _0xa47016['mdkol'](getActiveFeatureId);if(!_0x526d69)throw new Error(_0xa47016['hQxIo']);const _0x5ab295=await _0xa47016[_0x137b94(0x1b2)](getFeature,_0x526d69);displayFeature(_0x5ab295,_0x5ab295['checklistItems']);}export async function featureResume(_0x3901dc){const _0x2492a7=_0x3e12,_0x5439e0={'cHROF':function(_0x4ef289,_0x5a9a34){return _0x4ef289(_0x5a9a34);},'xgpsp':function(_0x3caac8,_0x4428f9){return _0x3caac8(_0x4428f9);},'KOLlu':function(_0x199184){return _0x199184();},'VKSGj':function(_0x55553e,_0x4d7b36){return _0x55553e(_0x4d7b36);},'flgvr':function(_0x57dbeb){return _0x57dbeb();},'TstaH':_0x2492a7(0x232),'qfTVm':_0x2492a7(0x235),'pubtf':function(_0xecfb4d,_0x5a7343){return _0xecfb4d(_0x5a7343);},'SIeoR':_0x2492a7(0x1e8),'qVdiQ':_0x2492a7(0x22f),'CdWPI':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','YSPGD':function(_0xe11a2d,_0x2ffd60){return _0xe11a2d!==_0x2ffd60;},'IVddE':function(_0x33c52d,_0x14a48c,_0x1e714c){return _0x33c52d(_0x14a48c,_0x1e714c);}};if(_0x3901dc){const _0x414a7c=await _0x5439e0[_0x2492a7(0x1b6)](getFeature,_0x3901dc);await _0x5439e0[_0x2492a7(0x21e)](setActiveFeatureId,_0x414a7c['id']);const _0x3f8dfd=_0x5439e0['KOLlu'](getGitBranch);_0x3f8dfd&&_0x3f8dfd!==_0x414a7c[_0x2492a7(0x227)]&&(await updateFeature(_0x414a7c['id'],{'gitBranch':_0x3f8dfd}),console[_0x2492a7(0x23f)](_0x2492a7(0x1b9)+_0x3f8dfd));console[_0x2492a7(0x23f)]('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x414a7c['name']+'\x20('+_0x414a7c['id']+')'),await _0x5439e0[_0x2492a7(0x21e)](tryStartCurrentSession,_0x414a7c['id']);const _0xdea15d=process[_0x2492a7(0x255)]['CLAUDE_SESSION_ID'];_0xdea15d&®isterSession(_0xdea15d,_0x414a7c['id']);displayFeature(_0x414a7c,_0x414a7c[_0x2492a7(0x22a)]),await _0x5439e0[_0x2492a7(0x241)](printFeedbackNudge,_0x414a7c['id']);return;}const _0xbfc6df=getGitRepoUrl(),_0x4d06c9=_0x5439e0['flgvr'](getGitBranch);if(!_0xbfc6df&&!_0x4d06c9)throw new Error(_0x2492a7(0x1fa));console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+(_0xbfc6df||_0x5439e0[_0x2492a7(0x1b4)])+'\x20/\x20'+(_0x4d06c9||'any')+_0x2492a7(0x260));const _0x4d210f=await _0x5439e0[_0x2492a7(0x1b6)](listFeatures,{'gitRepoUrl':_0xbfc6df,'gitBranch':_0x4d06c9}),_0x3bca1a=_0x4d210f[_0x2492a7(0x1f8)][_0x2492a7(0x234)](_0xa24239=>_0xa24239[_0x2492a7(0x229)]?_0xa24239[_0x2492a7(0x229)]!=='verified':!_0xa24239[_0x2492a7(0x274)]);if(_0x3bca1a['length']===0x0){console['log'](_0x2492a7(0x1e9)),console[_0x2492a7(0x23f)](_0x5439e0[_0x2492a7(0x26a)]);return;}let _0x220c7c;if(_0x3bca1a['length']===0x1)_0x220c7c=_0x3bca1a[0x0];else{const _0x378e58=process[_0x2492a7(0x25d)]['isTTY']&&process['stdout'][_0x2492a7(0x273)];if(!_0x378e58){console['log']('\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:');for(const _0xd1cb66 of _0x3bca1a){console[_0x2492a7(0x23f)]('\x20\x20'+_0xd1cb66[_0x2492a7(0x27c)]),console['log'](_0x2492a7(0x21f)+_0xd1cb66['id']),_0xd1cb66['stats']&&console['log'](_0x2492a7(0x268)+_0x5439e0['pubtf'](getProgressDisplay,_0xd1cb66[_0x2492a7(0x24c)])),_0xd1cb66['gitBranch']&&console[_0x2492a7(0x23f)](_0x2492a7(0x1b1)+_0xd1cb66['gitBranch']);}throw new Error(_0x2492a7(0x25b));}const {selected:_0x437819}=await _0x2dd850['prompt']([{'type':_0x5439e0['SIeoR'],'name':_0x5439e0['qVdiQ'],'message':_0x5439e0[_0x2492a7(0x206)],'choices':_0x3bca1a[_0x2492a7(0x1de)](_0x3f932a=>({'name':_0x3f932a[_0x2492a7(0x27c)]+'\x20('+_0x3f932a['id']+')','value':_0x3f932a['id']}))}]);_0x220c7c=_0x3bca1a['find'](_0x4305d9=>_0x4305d9['id']===_0x437819);}await setActiveFeatureId(_0x220c7c['id']);_0x4d06c9&&_0x5439e0['YSPGD'](_0x4d06c9,_0x220c7c['gitBranch'])&&(await updateFeature(_0x220c7c['id'],{'gitBranch':_0x4d06c9}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x4d06c9));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x220c7c['name']+'\x20('+_0x220c7c['id']+')'),await tryStartCurrentSession(_0x220c7c['id']);const _0x145244=await _0x5439e0['pubtf'](getFeature,_0x220c7c['id']),_0x3de6d8=process['env']['CLAUDE_SESSION_ID'];_0x3de6d8&&_0x5439e0['IVddE'](registerSession,_0x3de6d8,_0x145244['id']),displayFeature(_0x145244,_0x145244[_0x2492a7(0x22a)]),await printFeedbackNudge(_0x145244['id']);}async function printFeedbackNudge(_0x38d075){const _0x1dfed4=_0x3e12,_0x315ceb={'OopRt':function(_0x270dd3,_0x4d03a9){return _0x270dd3>_0x4d03a9;}};try{const {items:_0x2c2636}=await getActionItems(_0x38d075);let _0x475717=0x0,_0x148513=0x0;for(const _0x2cfffc of _0x2c2636){const _0x3f87c3=await getItemFeedback(_0x38d075,_0x2cfffc['id']);_0x315ceb[_0x1dfed4(0x257)](_0x3f87c3['unaddressedComments']['length'],0x0)&&(_0x475717+=_0x3f87c3['unaddressedComments'][_0x1dfed4(0x236)],_0x148513++);}_0x315ceb['OopRt'](_0x475717,0x0)&&(console['log'](_0x1dfed4(0x1c3)+_0x475717+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x148513+_0x1dfed4(0x216)),console['log'](_0x1dfed4(0x281)));}catch{}}async function tryStartCurrentSession(_0x528962){const _0x36de0b=_0x3e12,_0x484a8d={'IRSQg':function(_0x32bcc5,_0x3d0cd9){return _0x32bcc5(_0x3d0cd9);}};try{const {sessions:_0x4029ca}=await _0x484a8d['IRSQg'](listFeatureSessions,_0x528962),_0x129143=_0x4029ca[_0x36de0b(0x1d2)](_0x28d8a3=>_0x28d8a3[_0x36de0b(0x229)]==='ready');_0x129143&&(await startSession(_0x528962,_0x129143['id']),console[_0x36de0b(0x23f)](_0x36de0b(0x228)+_0x129143[_0x36de0b(0x22e)]));}catch{}}export async function featureReport(_0x474c33,_0x456f08){const _0x134b60=_0x3e12,_0x4b8530={'wzERG':_0x134b60(0x1ef),'eSRSS':function(_0x58f270,_0x2f07ba,_0x57b489){return _0x58f270(_0x2f07ba,_0x57b489);},'pncNQ':function(_0x12150e){return _0x12150e();},'TaapT':function(_0x3960ae,_0x4aa587){return _0x3960ae(_0x4aa587);},'mWAAn':function(_0x345de2,_0x1c62f7,_0x2ca570,_0x406586){return _0x345de2(_0x1c62f7,_0x2ca570,_0x406586);},'PehiT':_0x134b60(0x1dd)},_0x401aaf=_0x474c33||await getActiveFeatureId();if(!_0x401aaf)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');console[_0x134b60(0x23f)](_0x4b8530['wzERG']);const _0x34472d=await _0x4b8530[_0x134b60(0x1b8)](getFeatureReportMarkdown,_0x401aaf,{'style':_0x456f08[_0x134b60(0x270)]}),_0x24e761=_0x456f08['output']||join(_0x4b8530[_0x134b60(0x210)](getRangerDir),'reports',_0x401aaf+'.md'),_0x27701e=join(_0x24e761,'..');!_0x4b8530['TaapT'](existsSync,_0x27701e)&&await mkdir(_0x27701e,{'recursive':!![]}),await _0x4b8530['mWAAn'](writeFile,_0x24e761,_0x34472d,_0x4b8530['PehiT']),console['log'](_0x134b60(0x256)+_0x24e761);}function getScenarioResult(_0x3c49ca){const _0x5f1b96=_0x3e12,_0x3c7235={'odNuR':'closed','QcZsM':'verification_in_progress','njgUY':_0x5f1b96(0x1e2)};if(_0x3c49ca['status']===_0x3c7235[_0x5f1b96(0x1d6)])return _0x3c49ca['terminalReason']??_0x3c7235['odNuR'];if(_0x3c49ca[_0x5f1b96(0x229)]===_0x3c7235['QcZsM'])return _0x3c7235[_0x5f1b96(0x1da)];return _0x3c49ca['status'];}function getScenarioRationale(_0x2c5bdb,_0x5ee42d){const _0x5e1457=_0x3e12;if(_0x5ee42d)return _0x5ee42d;if(_0x2c5bdb['blockedReason'])return _0x2c5bdb['blockedReason'];if(_0x2c5bdb[_0x5e1457(0x1cc)])return _0x2c5bdb['incompleteReason'];if(_0x2c5bdb[_0x5e1457(0x265)])return _0x2c5bdb['canceledReason'];if(_0x2c5bdb['notes'])return _0x2c5bdb[_0x5e1457(0x271)];return null;}export async function featureReportPrDescription(_0x49b438,_0x37f7ba){const _0x39d4cc=_0x3e12,_0x40f454={'DYuNb':_0x39d4cc(0x238),'Jvrtf':function(_0x1226b0,_0x3e456a,_0x5a4e01){return _0x1226b0(_0x3e456a,_0x5a4e01);},'LXxUI':function(_0x46298f,_0x55185e){return _0x46298f===_0x55185e;},'vrXvA':'\x0aAvailable\x20scenarios:','WVSPr':function(_0x17c08e,_0x30d557){return _0x17c08e<_0x30d557;},'YPRuQ':function(_0x3530bb,_0x582a5d,_0x6a8746,_0x165273){return _0x3530bb(_0x582a5d,_0x6a8746,_0x165273);}},_0x161615=_0x49b438||await getActiveFeatureId();if(!_0x161615)throw new Error(_0x40f454['DYuNb']);const _0x52ab49=await getFeature(_0x161615),_0x2efa0b=_0x52ab49['checklistItems']||[],_0x5d8e00=_0x40f454['Jvrtf'](getCurrentSessionItems,_0x52ab49,_0x2efa0b);_0x40f454['LXxUI'](_0x5d8e00['length'],0x0)&&(console[_0x39d4cc(0x21d)]('\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.'),process['exit'](0x1));const _0x3eb2bc=_0x37f7ba[_0x39d4cc(0x226)]??[],_0x2b2058=_0x3eb2bc[_0x39d4cc(0x234)](_0x232497=>!Number['isInteger'](_0x232497)||_0x232497<0x1||_0x232497>_0x5d8e00[_0x39d4cc(0x236)]);if(_0x2b2058[_0x39d4cc(0x236)]>0x0){console[_0x39d4cc(0x21d)](_0x39d4cc(0x245)+_0x2b2058['join'](',\x20')),console['log'](_0x40f454[_0x39d4cc(0x278)]);for(let _0x23e44b=0x0;_0x40f454['WVSPr'](_0x23e44b,_0x5d8e00['length']);_0x23e44b++){console['log']('\x20\x20'+(_0x23e44b+0x1)+'.\x20'+_0x5d8e00[_0x23e44b]['description']);}process['exit'](0x1);}const _0x17ce00=new Set(_0x3eb2bc['map'](_0x428f38=>_0x428f38-0x1)),_0x35aaa7=_0x5d8e00[_0x39d4cc(0x234)]((_0x112b4e,_0x171288)=>!_0x17ce00['has'](_0x171288));_0x35aaa7[_0x39d4cc(0x236)]===0x0&&(console[_0x39d4cc(0x21d)]('\x0a❌\x20All\x20scenarios\x20were\x20excluded.'),process['exit'](0x1));if(_0x37f7ba[_0x39d4cc(0x267)])await _0x40f454['YPRuQ'](outputJsonReport,_0x161615,_0x52ab49,_0x35aaa7);else{const _0x1f310e=await getFeatureReportMarkdown(_0x161615,{'itemIds':_0x35aaa7['map'](_0x2c4710=>_0x2c4710['id'])});process[_0x39d4cc(0x264)]['write'](_0x1f310e['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x153dc2,_0x3177fd,_0x23e9aa){const _0x1fd612=_0x3e12,_0x42d540={'TeLND':function(_0x3186b6,_0x21d8b0){return _0x3186b6(_0x21d8b0);},'KQLzy':function(_0x2e89c0,_0x5a9330){return _0x2e89c0===_0x5a9330;},'YrFCR':function(_0x5071d5,_0x2527a2){return _0x5071d5(_0x2527a2);},'NbKXx':function(_0x1b6c3f,_0xec6228){return _0x1b6c3f+_0xec6228;}},_0x54898d=getApiBaseUrl(),_0x3f3e88=await getFeatureReport(_0x153dc2),_0xef0637=new Map(_0x3f3e88[_0x1fd612(0x22a)]['map'](_0xd8c58e=>[_0xd8c58e['id'],_0xd8c58e])),_0x188fa6=await Promise['all'](_0x23e9aa['map'](async _0x1c03ff=>{const _0x5a3a13=_0x1fd612,_0x29bfef=_0xef0637[_0x5a3a13(0x20f)](_0x1c03ff['id']),_0x5e122a=_0x29bfef?.['linkedSession']??null;let _0x5e8e45=[];if(_0x1c03ff[_0x5a3a13(0x27b)])try{const {steps:_0x22ff4e}=await _0x42d540['TeLND'](getBrowserSessionSteps,_0x1c03ff[_0x5a3a13(0x27b)]);_0x22ff4e[_0x5a3a13(0x236)]>0x0&&(_0x5e8e45=_0x22ff4e[_0x5a3a13(0x1de)](_0x11a9d5=>{const _0x1b1761=_0x5a3a13,_0x1e9ab0=_0x11a9d5[_0x1b1761(0x237)][_0x1b1761(0x1d2)](_0x5b5db6=>_0x5b5db6[_0x1b1761(0x263)]==='screenshot'&&_0x5b5db6['timing']==='after')??_0x11a9d5['assets']['find'](_0x385ebe=>_0x385ebe[_0x1b1761(0x263)]===_0x1b1761(0x266));let _0x411a90=null,_0x5be7ff=null;if(_0x1e9ab0){const _0x3363cb=_0x1e9ab0[_0x1b1761(0x1d4)]['location']['split']('/')['pop']();_0x411a90=_0x54898d+'/api/v1/mcp/browser-sessions/'+_0x1c03ff[_0x1b1761(0x27b)]+'/artifacts/'+_0x3363cb,_0x3363cb&&(_0x5be7ff=_0x3363cb[_0x1b1761(0x1fc)](/\.\w+$/,'')['replace'](/^(key_)?\d+_/,'')[_0x1b1761(0x1fc)](/[-_]/g,'\x20'));}return{'description':_0x5be7ff||_0x11a9d5[_0x1b1761(0x1bf)]||_0x11a9d5['stepName']||'Step\x20'+_0x11a9d5[_0x1b1761(0x261)],'screenshot':_0x411a90,'is_key_step':_0x11a9d5[_0x1b1761(0x1c4)]};}));}catch{}return _0x42d540['KQLzy'](_0x5e8e45[_0x5a3a13(0x236)],0x0)&&_0x5e122a?.['screenshotUrls']&&(_0x5e8e45=_0x5e122a[_0x5a3a13(0x231)][_0x5a3a13(0x1de)]((_0x85436f,_0x57136b)=>({'description':'Screenshot\x20'+(_0x57136b+0x1),'screenshot':_0x85436f,'is_key_step':![]}))),{'description':_0x1c03ff['description'],'result':_0x42d540['YrFCR'](getScenarioResult,_0x1c03ff),'rationale':getScenarioRationale(_0x1c03ff,_0x5e122a?.[_0x5a3a13(0x1f5)]),'steps':_0x5e8e45};})),_0x67f435={'url':_0x3177fd[_0x1fd612(0x240)],'scenarios':_0x188fa6};process['stdout']['write'](_0x42d540['NbKXx'](JSON['stringify'](_0x67f435,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x312628){const _0x34eccb=_0x3e12,_0x3f1e2e={'bRJdJ':function(_0x58ec34){return _0x58ec34();},'dTRkP':function(_0x1d8bca,_0x1c5392){return _0x1d8bca(_0x1c5392);},'Xmxgr':_0x34eccb(0x215),'JhozF':'in_progress'},_0x264858=_0x312628||await _0x3f1e2e['bRJdJ'](getActiveFeatureId);if(!_0x264858)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x41a24a=await _0x3f1e2e['dTRkP'](getFeature,_0x264858);if(!_0x41a24a['currentSessionId'])throw new Error(_0x3f1e2e[_0x34eccb(0x230)]);const {sessions:_0x89e64d}=await listFeatureSessions(_0x264858),_0x6033a3=_0x89e64d['find'](_0x409dc4=>_0x409dc4['id']===_0x41a24a['currentSessionId']);if(!_0x6033a3)throw new Error('Current\x20session\x20not\x20found.');if(_0x6033a3[_0x34eccb(0x229)]==='completed'){console['log'](_0x34eccb(0x1bd));return;}if(_0x6033a3['status']!==_0x3f1e2e['JhozF'])throw new Error(_0x34eccb(0x200)+_0x6033a3['status']);console[_0x34eccb(0x23f)](_0x34eccb(0x217)),await concludeSession(_0x264858,_0x41a24a[_0x34eccb(0x205)]),console[_0x34eccb(0x23f)]('\x0a✅\x20Session\x20'+_0x6033a3[_0x34eccb(0x22e)]+'\x20concluded.'),console[_0x34eccb(0x23f)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}function _0x234a(){const _0x575e07=['Showing\x20','submittedAt','yMaGh','No\x20active\x20session\x20for\x20this\x20feature\x20review.','\x20scenario(s).','\x0aConcluding\x20session...','guIPJ','\x20\x20✅\x20No\x20feedback\x20to\x20address','verification_in_progress','Unknown','git\x20rev-parse\x20--abbrev-ref\x20HEAD','error','xgpsp','\x20\x20\x20\x20\x20ID:\x20','pxGDE','LzHIs','blockedReason','scenarios','join','vJFWO','excludeScenarios','gitBranch','\x20\x20\x20▶️\x20Started\x20session\x20','status','checklistItems','spatial','approved','repeat','iteration','selected','Xmxgr','screenshotUrls','any','\x0aCreating\x20feature\x20review...','filter','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','length','assets','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','\x20\x20\x20Completed:\x20','lAYxf','\x20\x20\x20\x20\x20\x20Cancelled:\x20','split','pendingItems','authorEmail','log','dashboardUrl','VKSGj','feedback-images','zaEhn','7vqjqDH','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','toLocaleDateString','\x0a✅\x20Scenario\x20added','gQTEq','10gIhttG','24247586QRawDG','github.com/','stats','NxMmL','12942819CQYBHH','VmWRW','7291252ZOKkhe','vdkVr','\x20--current-branch','\x20in\x20progress','tNXXG','env','\x0a✅\x20Report\x20generated:\x20','OopRt','EkdAz','domRef','verified','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','BRzQJ','stdin','createdAt','NcxAh','...','position','trim','assetType','stdout','canceledReason','screenshot','json','\x20\x20\x20\x20\x20Progress:\x20','en-US','qfTVm','YGVjN','MVBIA','863524ZGbZJc','limit','580374UGQnWP','style','notes','gitRepoUrl','isTTY','completedAt','point','vjLGI','coordinates','vrXvA','\x20\x20Expected\x20flow:','1FUpXVg','browserSessionId','name','version','zNMdr','\x20\x20\x20ID:\x20','pipe','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','No\x20sessions\x20found.','type','ofirE','RCjEC','closed','vlvjc','element','scenario','push','AoIdi','\x20\x20\x20\x20\x20Branch:\x20','hFaKj','LQelt','TstaH','currentBranch','cHROF','textContent','eSRSS','\x20\x20\x20Updated\x20branch\x20to:\x20','\x20>\x20','\x20--include-deleted','blockedItems','\x0a✅\x20Session\x20is\x20already\x20completed.','.\x20Feature\x20review\x20has\x20','description','RnVEr','dCBbP','\x20\x20\x20Progress:\x20','\x0a⚠️\x20\x20','isKeyStep','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','unaddressedComments','hlxFA','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','short','\x0aAvailable\x20scenarios:','\x20--limit\x20','incompleteReason','toFixed','toLocaleString','blocked','\x20\x20💬\x20','hxlHX','find','oTJIG','storage','Xvstz','odNuR','exit','canonicalFlow','pxqLH','njgUY','LGtNC','wvAYh','utf-8','map','OQGkk','TLWho','\x20\x20\x20Created:\x20','in_progress','numeric','dWSDr','\x0a✅\x20Restored\x20feature\x20review:\x20','cCROA','\x20feature\x20review(s)\x20found','list','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','totalCount','DOnhG','FBlpg','selector','\x20unaddressed\x20comment(s)','\x0aGenerating\x20report...','):\x20\x22','Scenario\x20','\x20at\x20[','Next\x20page:\x20ranger\x20list\x20--offset\x20','gzclu','agentResponse','NWLSg','4799365SXAdVh','items','sessionId','Not\x20in\x20a\x20git\x20repository.','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','replace','XdheT','verifiedItems','URxCh','Cannot\x20conclude\x20session\x20with\x20status:\x20','xyRcD','6HBHtBj','bLrlF','terminalReason','currentSessionId','CdWPI','\x20\x20\x20Description:\x20','Please\x20finish\x20your\x20review\x20first:','\x20blocked','latestReview','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','offset','9465208fdZsnR','get','pncNQ','NJTqe'];_0x234a=function(){return _0x575e07;};return _0x234a();}export async function featureSessions(_0x4370ac){const _0x41960e=_0x3e12,_0x4235a6={'TLWho':function(_0x2ff9fd){return _0x2ff9fd();},'pxGDE':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','xyRcD':function(_0x506f99,_0x177453){return _0x506f99(_0x177453);},'oTJIG':function(_0xd0331c,_0x55efa3){return _0xd0331c===_0x55efa3;},'BRzQJ':_0x41960e(0x1e2)},_0x40e26b=_0x4370ac||await _0x4235a6[_0x41960e(0x1e0)](getActiveFeatureId);if(!_0x40e26b)throw new Error(_0x4235a6[_0x41960e(0x220)]);const _0x566804=await _0x4235a6[_0x41960e(0x201)](getFeature,_0x40e26b);console['log']('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x566804[_0x41960e(0x27c)]+'\x0a');const {sessions:_0x115cfc}=await listFeatureSessions(_0x40e26b);if(_0x115cfc[_0x41960e(0x236)]===0x0){console[_0x41960e(0x23f)](_0x41960e(0x282));return;}for(const _0x5d3831 of _0x115cfc){const _0x1aadb5=_0x4235a6[_0x41960e(0x1d3)](_0x5d3831[_0x41960e(0x229)],'completed')?'✅':_0x4235a6[_0x41960e(0x1d3)](_0x5d3831['status'],_0x4235a6[_0x41960e(0x25c)])?'🔄':'▶️';console['log'](_0x1aadb5+'\x20Session\x20'+_0x5d3831[_0x41960e(0x22e)]+'\x20('+_0x5d3831['id']+')'),console[_0x41960e(0x23f)]('\x20\x20\x20Status:\x20'+_0x5d3831[_0x41960e(0x229)]),console['log'](_0x41960e(0x1e1)+new Date(_0x5d3831[_0x41960e(0x25e)])[_0x41960e(0x1ce)]()),_0x5d3831['completedAt']&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x5d3831[_0x41960e(0x274)])[_0x41960e(0x1ce)]()),console['log']('');}}export async function featureAddScenario(_0x5f3c46,_0x2f3f67){const _0x5954fd=_0x3e12,_0x369297={'XMCqg':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','ZCbtv':function(_0x4dc4f3,_0x306f2c){return _0x4dc4f3(_0x306f2c);},'QKDlY':function(_0x56815c,_0x6eadde,_0x4708a3){return _0x56815c(_0x6eadde,_0x4708a3);}},_0x33b806=_0x2f3f67||await getActiveFeatureId();if(!_0x33b806)throw new Error(_0x369297['XMCqg']);const _0x256505=await _0x369297['ZCbtv'](getFeature,_0x33b806);if(_0x256505[_0x5954fd(0x20a)]&&!_0x256505['latestReview']['submittedAt'])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x256505['dashboardUrl']);await _0x369297['QKDlY'](createChecklistItem,_0x33b806,_0x5f3c46);const _0x139ca9=await getFeature(_0x33b806);console['log'](_0x5954fd(0x247)),displayFeature(_0x139ca9,_0x139ca9[_0x5954fd(0x22a)]);}export async function featureEditScenario(_0x3c4e19,_0x30238f){const _0x539b90=_0x3e12,_0x1ce82b={'YGVjN':_0x539b90(0x1c5),'ofirE':_0x539b90(0x1c8),'XJjIN':_0x539b90(0x1fb),'dCBbP':_0x539b90(0x208),'vjLGI':function(_0x381225,_0x43cca2){return _0x381225===_0x43cca2;},'VIhNL':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','GeKLp':function(_0x8b850,_0x5b76bb){return _0x8b850===_0x5b76bb;},'wvAYh':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','CgKnB':function(_0x3bce36,_0x54e371){return _0x3bce36+_0x54e371;},'riJdX':function(_0x3ab196,_0x1cf913){return _0x3ab196-_0x1cf913;},'pxqLH':function(_0x9d7266,_0xca421c){return _0x9d7266>=_0xca421c;},'hxlHX':_0x539b90(0x1ca),'JHrFm':function(_0x440a4a,_0x3ec067){return _0x440a4a<_0x3ec067;},'riuOY':function(_0x533bca,_0x2df339){return _0x533bca(_0x2df339);}},_0x434e0a=_0x30238f['id']||await getActiveFeatureId();!_0x434e0a&&(console[_0x539b90(0x21d)](_0x1ce82b[_0x539b90(0x26b)]),console[_0x539b90(0x21d)](_0x1ce82b[_0x539b90(0x284)]),process['exit'](0x1));const _0x131671=await getFeature(_0x434e0a);_0x131671['latestReview']&&!_0x131671[_0x539b90(0x20a)][_0x539b90(0x213)]&&(console['error'](_0x1ce82b['XJjIN']),console['error'](_0x1ce82b[_0x539b90(0x1c1)]),console['error']('\x20\x20'+_0x131671['dashboardUrl']),process['exit'](0x1));const _0x53dc5f=_0x131671['checklistItems']||[];_0x1ce82b[_0x539b90(0x276)](_0x53dc5f[_0x539b90(0x236)],0x0)&&(console['error'](_0x1ce82b['VIhNL']),process[_0x539b90(0x1d7)](0x1));if(_0x1ce82b['GeKLp'](_0x30238f[_0x539b90(0x1ae)],undefined)){console[_0x539b90(0x21d)](_0x1ce82b[_0x539b90(0x1dc)]),console[_0x539b90(0x23f)](_0x539b90(0x1ca));for(let _0x1189cc=0x0;_0x1189cc<_0x53dc5f['length'];_0x1189cc++){console['log']('\x20\x20'+_0x1ce82b['CgKnB'](_0x1189cc,0x1)+'.\x20'+_0x53dc5f[_0x1189cc][_0x539b90(0x1bf)]);}process[_0x539b90(0x1d7)](0x1);}const _0x57f8da=_0x1ce82b['riJdX'](_0x30238f[_0x539b90(0x1ae)],0x1);if(_0x57f8da<0x0||_0x1ce82b[_0x539b90(0x1d9)](_0x57f8da,_0x53dc5f[_0x539b90(0x236)])){console[_0x539b90(0x21d)]('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x30238f['scenario']+_0x539b90(0x1be)+_0x53dc5f[_0x539b90(0x236)]+'\x20scenarios.'),console[_0x539b90(0x23f)](_0x1ce82b[_0x539b90(0x1d1)]);for(let _0xbffa2b=0x0;_0x1ce82b['JHrFm'](_0xbffa2b,_0x53dc5f[_0x539b90(0x236)]);_0xbffa2b++){console['log']('\x20\x20'+(_0xbffa2b+0x1)+'.\x20'+_0x53dc5f[_0xbffa2b]['description']);}process['exit'](0x1);}const _0x57a6f3=_0x53dc5f[_0x57f8da];await updateChecklistItem(_0x434e0a,_0x57a6f3['id'],{'description':_0x3c4e19});const _0x235a89=await _0x1ce82b['riuOY'](getFeature,_0x434e0a);console[_0x539b90(0x23f)]('\x0a✅\x20Scenario\x20updated'),displayFeature(_0x235a89,_0x235a89[_0x539b90(0x22a)]);}async function downloadFeedbackImage(_0x320164,_0x43cd1e){const _0x29cfd7=_0x3e12,_0x369565={'wOYGR':function(_0x4987f4,_0x2d7d41,_0x9413b2){return _0x4987f4(_0x2d7d41,_0x9413b2);},'hMPwR':function(_0x4355ac){return _0x4355ac();},'njCeo':function(_0x1717da,_0x2530e2){return _0x1717da(_0x2530e2);}};try{const _0xef5eb=_0x369565['wOYGR'](join,_0x369565['hMPwR'](getRangerDir),_0x29cfd7(0x242));await mkdir(_0xef5eb,{'recursive':!![]});const _0x207973=join(_0xef5eb,'comment_'+_0x43cd1e+'.png'),_0x5d14c7=await _0x369565['njCeo'](fetch,_0x320164);if(!_0x5d14c7['ok'])return null;const _0x403911=Buffer['from'](await _0x5d14c7['arrayBuffer']());return await writeFile(_0x207973,_0x403911),_0x207973;}catch{return null;}}export async function featureGetReview(_0x5ea537){const _0x2205ce=_0x3e12,_0x6ad734={'LGtNC':function(_0x13ce47,_0x1155d0){return _0x13ce47===_0x1155d0;},'XdheT':'No\x20scenarios\x20found.','RnVEr':function(_0x1579be,_0x391001){return _0x1579be<_0x391001;},'ceVyf':function(_0x2f6868,_0x26d310){return _0x2f6868>_0x26d310;},'RCjEC':function(_0x304017,_0x5932f7,_0xa195a9){return _0x304017(_0x5932f7,_0xa195a9);},'jzhwC':function(_0x16c482,_0x353de0){return _0x16c482+_0x353de0;},'zaEhn':_0x2205ce(0x269),'IJSHm':function(_0x31dfc2,_0x3a21c9){return _0x31dfc2>=_0x3a21c9;},'yMaGh':function(_0x5c08c5,_0x429ed8){return _0x5c08c5+_0x429ed8;}},_0x54c14e=_0x5ea537||await getActiveFeatureId();if(!_0x54c14e)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x4c78e8=await getFeature(_0x54c14e),{items:_0x282236}=await getActionItems(_0x54c14e);console['log']('\x0a📋\x20Feedback\x20for:\x20'+_0x4c78e8[_0x2205ce(0x27c)]+'\x20('+_0x4c78e8['id']+')\x0a');if(_0x6ad734['LGtNC'](_0x282236['length'],0x0)){console['log'](_0x6ad734[_0x2205ce(0x1fd)]);return;}for(let _0x5c3233=0x0;_0x6ad734[_0x2205ce(0x1c0)](_0x5c3233,_0x282236[_0x2205ce(0x236)]);_0x5c3233++){const _0x2280ae=_0x282236[_0x5c3233],_0x56ea1b=_0x6ad734['ceVyf'](_0x2280ae['version'],0x1)?'\x20(v'+_0x2280ae['version']+')':'',_0x4375cc=await _0x6ad734[_0x2205ce(0x285)](getItemFeedback,_0x54c14e,_0x2280ae['id']);if(_0x4375cc['unaddressedComments']['length']>0x0){console[_0x2205ce(0x23f)]('Scenario\x20'+_0x6ad734['jzhwC'](_0x5c3233,0x1)+':\x20\x22'+_0x2280ae['description']+'\x22'+_0x56ea1b+'\x20—\x20'+_0x4375cc['unaddressedComments']['length']+_0x2205ce(0x1ee));for(const _0x4c0cc3 of _0x4375cc[_0x2205ce(0x1c6)]){const _0x185e9d=new Date(_0x4c0cc3[_0x2205ce(0x25e)])['toLocaleDateString'](_0x6ad734[_0x2205ce(0x243)],{'month':_0x2205ce(0x1c9),'day':_0x2205ce(0x1e3)}),_0x12b334=_0x4c0cc3['authorName']||_0x4c0cc3[_0x2205ce(0x23e)]||_0x2205ce(0x21b);console[_0x2205ce(0x23f)](_0x2205ce(0x1d0)+_0x12b334+'\x20('+_0x185e9d+_0x2205ce(0x1f0)+_0x4c0cc3['content']+'\x22');if(_0x4c0cc3['assetUrl']){const _0x190135=await downloadFeedbackImage(_0x4c0cc3['assetUrl'],_0x4c0cc3['id']);_0x190135&&console[_0x2205ce(0x23f)]('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x190135);}if(_0x4c0cc3['domRef']){const _0x3a9f89=_0x4c0cc3['domRef'][_0x2205ce(0x1ed)]['split'](_0x2205ce(0x1ba))['pop']()?.[_0x2205ce(0x23c)](':')[0x0]||_0x2205ce(0x288),_0x4ce174=_0x4c0cc3['domRef'][_0x2205ce(0x1b7)]?'\x20\x22'+_0x4c0cc3['domRef']['textContent']['slice'](0x0,0x3c)+'\x22':'';console[_0x2205ce(0x23f)]('\x20\x20\x20\x20\x20🎯\x20Element:\x20<'+_0x3a9f89+'>'+_0x4ce174),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x4c0cc3[_0x2205ce(0x259)]['selector']);}else{if(_0x4c0cc3['spatial']){const _0x54a719=_0x4c0cc3[_0x2205ce(0x22b)][_0x2205ce(0x277)];_0x6ad734[_0x2205ce(0x1db)](_0x4c0cc3[_0x2205ce(0x22b)]['type'],_0x2205ce(0x275))&&_0x6ad734['IJSHm'](_0x54a719[_0x2205ce(0x236)],0x2)?console[_0x2205ce(0x23f)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x54a719[0x0][_0x2205ce(0x1cd)](0x2)+',\x20'+_0x54a719[0x1][_0x2205ce(0x1cd)](0x2)+')'):console['log'](_0x2205ce(0x20b)+_0x4c0cc3['spatial'][_0x2205ce(0x283)]+_0x2205ce(0x1f2)+_0x54a719['map'](_0x14f613=>_0x14f613[_0x2205ce(0x1cd)](0x2))[_0x2205ce(0x224)](',\x20')+']');}}}if(_0x4375cc[_0x2205ce(0x1d8)]){console[_0x2205ce(0x23f)](_0x2205ce(0x279));for(const _0x1c96f4 of _0x4375cc[_0x2205ce(0x1d8)]['split']('\x0a')){console[_0x2205ce(0x23f)]('\x20\x20\x20\x20'+_0x1c96f4);}}}else console['log'](_0x2205ce(0x1f1)+_0x6ad734[_0x2205ce(0x214)](_0x5c3233,0x1)+':\x20\x22'+_0x2280ae['description']+'\x22'+_0x56ea1b+'\x20—\x20no\x20comments'),console['log'](_0x2205ce(0x219));console['log']('');}}export async function featureDelete(_0x4106f0){const _0x4f91bf=_0x3e12,_0x259406={'vIaCX':function(_0x105e99){return _0x105e99();},'vdkVr':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','cCROA':function(_0x341d0e,_0x518d03){return _0x341d0e(_0x518d03);},'NcxAh':function(_0x1d6325,_0x27e977){return _0x1d6325+_0x27e977;},'bLrlF':_0x4f91bf(0x20c)},_0x5b89c8=_0x4106f0||await _0x259406['vIaCX'](getActiveFeatureId);if(!_0x5b89c8)throw new Error(_0x259406[_0x4f91bf(0x251)]);const _0x16a929=await _0x259406[_0x4f91bf(0x1e6)](getFeature,_0x5b89c8);await softDeleteFeature(_0x5b89c8),console[_0x4f91bf(0x23f)]('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x16a929[_0x4f91bf(0x27c)]+'\x20('+_0x5b89c8+')'),console[_0x4f91bf(0x23f)](_0x259406[_0x4f91bf(0x25f)](_0x259406[_0x4f91bf(0x203)],_0x5b89c8));}export async function featureRestore(_0xf5ceb){const _0x2eb2e7=_0x3e12,_0x2f887e={'LzHIs':function(_0x1e4a9e,_0x4d38d2){return _0x1e4a9e(_0x4d38d2);},'gzclu':function(_0x4a8763,_0x508727,_0x3d0899){return _0x4a8763(_0x508727,_0x3d0899);}};await _0x2f887e[_0x2eb2e7(0x221)](restoreFeature,_0xf5ceb);const _0x3df9fd=await _0x2f887e['LzHIs'](getFeature,_0xf5ceb);console[_0x2eb2e7(0x23f)](_0x2eb2e7(0x1e5)+_0x3df9fd['name']+'\x20('+_0xf5ceb+')'),_0x2f887e[_0x2eb2e7(0x1f4)](displayFeature,_0x3df9fd,_0x3df9fd['checklistItems']);}
|
package/build/commands/hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ca32a,_0x414b98){const _0xbff65a=_0x2553,_0x4c0a62=_0x4ca32a();while(!![]){try{const _0x458dd2=-parseInt(_0xbff65a(0x16a))/0x1*(-parseInt(_0xbff65a(0x16f))/0x2)+-parseInt(_0xbff65a(0x171))/0x3*(-parseInt(_0xbff65a(0x179))/0x4)+parseInt(_0xbff65a(0x170))/0x5*(parseInt(_0xbff65a(0x172))/0x6)+-parseInt(_0xbff65a(0x173))/0x7*(-parseInt(_0xbff65a(0x165))/0x8)+parseInt(_0xbff65a(0x175))/0x9*(-parseInt(_0xbff65a(0x16e))/0xa)+parseInt(_0xbff65a(0x16c))/0xb*(parseInt(_0xbff65a(0x167))/0xc)+parseInt(_0xbff65a(0x164))/0xd*(-parseInt(_0xbff65a(0x16b))/0xe);if(_0x458dd2===_0x414b98)break;else _0x4c0a62['push'](_0x4c0a62['shift']());}catch(_0x5cd1ad){_0x4c0a62['push'](_0x4c0a62['shift']());}}}(_0x4bd8,0x77d16));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';function _0x2553(_0x1edac7,_0x229b49){_0x1edac7=_0x1edac7-0x164;const _0x4bd8c4=_0x4bd8();let _0x2553ba=_0x4bd8c4[_0x1edac7];return _0x2553ba;}const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0x3977d8=_0x2553,_0x4db867={'EpkWJ':_0x3977d8(0x177),'DhOeL':_0x3977d8(0x16d)};if(cancellationHandlersInstalled)return;const _0x293207=()=>{const _0x5ef343=_0x3977d8;process[_0x5ef343(0x176)](0x0);};process[_0x3977d8(0x168)](_0x4db867[_0x3977d8(0x178)],_0x293207),process['once']('SIGTERM',_0x293207),process[_0x3977d8(0x168)](_0x4db867['DhOeL'],_0x293207),cancellationHandlersInstalled=!![];}function _0x4bd8(){const _0x59fe7c=['26EyYjBM','316040eQptaU','keys','1200516avfgQw','once','Unknown\x20hook:\x20','310647Lyfxme','16843162aIlCPc','55kNUGgF','SIGHUP','3934010OPoRFT','6glwxNI','30nXPhZh','1130271Wudsgh','612318BoXzBd','154lbfiMP','error','9OkQUsZ','exit','SIGINT','EpkWJ','4dLrtke'];_0x4bd8=function(){return _0x59fe7c;};return _0x4bd8();}export async function hook(_0x4c0d15,_0x53ae0b){const _0x39bbc5=_0x2553,_0x32deed={'xttiP':function(_0xb6444a){return _0xb6444a();},'OZWIJ':function(_0x51ee82,_0x5ba03a){return _0x51ee82(_0x5ba03a);}};_0x32deed['xttiP'](installCancellationHandlers);const _0x3bb305=HOOKS[_0x4c0d15];if(!_0x3bb305){const _0xc67b7e=Object[_0x39bbc5(0x166)](HOOKS)['join'](',\x20');console[_0x39bbc5(0x174)](_0x39bbc5(0x169)+_0x4c0d15),console[_0x39bbc5(0x174)]('Valid\x20hooks:\x20'+_0xc67b7e),process[_0x39bbc5(0x176)](0x1);}await _0x32deed['OZWIJ'](_0x3bb305,_0x53ae0b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43ce19,_0x57e56d){const _0x2e3f18=_0x16d7,_0x1125fa=_0x43ce19();while(!![]){try{const _0x4625b5=-parseInt(_0x2e3f18(0x157))/0x1*(-parseInt(_0x2e3f18(0x156))/0x2)+parseInt(_0x2e3f18(0x158))/0x3+parseInt(_0x2e3f18(0x154))/0x4+-parseInt(_0x2e3f18(0x15f))/0x5*(-parseInt(_0x2e3f18(0x15d))/0x6)+parseInt(_0x2e3f18(0x155))/0x7+-parseInt(_0x2e3f18(0x15a))/0x8+-parseInt(_0x2e3f18(0x15c))/0x9;if(_0x4625b5===_0x57e56d)break;else _0x1125fa['push'](_0x1125fa['shift']());}catch(_0x331930){_0x1125fa['push'](_0x1125fa['shift']());}}}(_0x4ced,0x3c3fd));import{readHookInput}from'./output.js';function _0x16d7(_0x424e9c,_0x2d5db9){_0x424e9c=_0x424e9c-0x154;const _0x4cedc2=_0x4ced();let _0x16d7d2=_0x4cedc2[_0x424e9c];return _0x16d7d2;}import{isSessionEnabled,hasSessionBeenPrompted,markSessionPrompted}from'../utils/sessionCache.js';const AUTO_PROMPT_TEXT='\x0a🚨\x20🚨\x20[ACTION\x20REQUIRED]\x20🚨\x20🚨\x0aBefore\x20responding\x20to\x20the\x20user\x27s\x20message,\x20consider\x20whether\x20this\x20task\x20will\x20involve\x20ANY\x20frontend,\x20UI,\x20or\x20browser\x20work.\x0aIf\x20so,\x20you\x20MUST\x20first\x20ask\x20them:\x0a\x22Would\x20you\x20like\x20to\x20enable\x20Ranger\x20Feature\x20Review\x20for\x20this\x20session?\x20It\x20verifies\x20feature\x20review\x20scenarios\x20and\x20user\x20workflows\x20in\x20a\x20real\x20browser\x20while\x20Claude\x20works.\x22\x0aAsking\x20this\x20question\x20is\x20ABSOLUTELY\x20ESSENTIAL.\x20DO\x20NOT\x20SKIP\x20THIS\x20STEP.\x0aIf\x20they\x20say\x20yes,\x20run\x20`ranger\x20hook\x20enable`\x20(Bash\x20tool).\x0aIf\x20they\x20say\x20no,\x20say\x20\x22Sounds\x20good.\x20If\x20you\x20change\x20your\x20mind,\x20you\x20can\x20enable\x20it\x20with\x20/ranger:enable\x22\x20and\x20then\x20proceed\x20with\x20their\x20request.\x0aThis\x20is\x20mandatory\x20—\x20do\x20not\x20skip\x20this\x20step.';function _0x4ced(){const _0x46644c=['log','10688058ucKAuL','6irzTjj','session_id','1672235dDaBlS','1328940HWmytO','3099096qAGYQZ','333786uSLaar','2bNhVgN','1203555pmYPcG','BKreS','3280304zFDojS'];_0x4ced=function(){return _0x46644c;};return _0x4ced();}export async function autoPrompt(){const _0x2b203b=_0x16d7,_0x20e16c={'DxZOe':function(_0xab3276,_0x1a076a){return _0xab3276(_0x1a076a);},'BKreS':function(_0x416e4e,_0x2a7dda){return _0x416e4e(_0x2a7dda);}},_0x501be0=await readHookInput(),_0x531f9a=_0x501be0?.[_0x2b203b(0x15e)];if(!_0x531f9a)return;if(_0x20e16c['DxZOe'](isSessionEnabled,_0x531f9a)||hasSessionBeenPrompted(_0x531f9a))return;_0x20e16c[_0x2b203b(0x159)](markSessionPrompted,_0x531f9a),console[_0x2b203b(0x15b)](AUTO_PROMPT_TEXT);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x1554(){const _0x4fa6f2=['FPDpz','2aOIwPR','118863FGVzZr','4445796dMegsc','8466QfsgNs','master','965iAnRXm','88yOsnUv','718091eLnFDu','env','OArhP','IblHB','2261568Lysfom','200sxxBUW','#\x20RANGER\x20DISABLED\x0a\x0aThe\x20user\x20has\x20expressly\x20disabled\x20Ranger\x20hooks\x20for\x20this\x20session','\x20and\x20branch\x20\x27','main','1912610jfhhMF','1284032SnFJGv'];_0x1554=function(){return _0x4fa6f2;};return _0x1554();}(function(_0x49f7f3,_0x546a03){const _0x457695=_0x1db5,_0x4c5f71=_0x49f7f3();while(!![]){try{const _0x177a47=parseInt(_0x457695(0x19d))/0x1*(-parseInt(_0x457695(0x19f))/0x2)+-parseInt(_0x457695(0x1aa))/0x3+parseInt(_0x457695(0x1a1))/0x4+parseInt(_0x457695(0x1a4))/0x5*(parseInt(_0x457695(0x1a2))/0x6)+parseInt(_0x457695(0x19c))/0x7+parseInt(_0x457695(0x1a5))/0x8*(-parseInt(_0x457695(0x1a0))/0x9)+-parseInt(_0x457695(0x1ab))/0xa*(-parseInt(_0x457695(0x1a6))/0xb);if(_0x177a47===_0x546a03)break;else _0x4c5f71['push'](_0x4c5f71['shift']());}catch(_0x556e64){_0x4c5f71['push'](_0x4c5f71['shift']());}}}(_0x1554,0xbe4c1));function _0x1db5(_0x5702b8,_0x486427){_0x5702b8=_0x5702b8-0x19c;const _0x15543d=_0x1554();let _0x1db546=_0x15543d[_0x5702b8];return _0x1db546;}import{disableSession,disableBranch,getCurrentBranch}from'../utils/sessionCache.js';import{printBlock}from'./output.js';export async function disable(_0x4f3a62){const _0x43661a=_0x1db5,_0x310b32={'FPDpz':function(_0x356270,_0xc72e97){return _0x356270(_0xc72e97);},'OArhP':function(_0x199298){return _0x199298();},'RlmdX':function(_0xa36ad,_0x5a87c2){return _0xa36ad!==_0x5a87c2;},'IblHB':'master'},_0x3e43b8=_0x4f3a62||process[_0x43661a(0x1a7)]['CLAUDE_SESSION_ID']||'';_0x3e43b8&&_0x310b32[_0x43661a(0x19e)](disableSession,_0x3e43b8);const _0x595d9e=_0x310b32[_0x43661a(0x1a8)](getCurrentBranch);_0x595d9e&&_0x595d9e!=='main'&&_0x595d9e!==_0x43661a(0x1a3)&&_0x310b32['FPDpz'](disableBranch,_0x595d9e),printBlock(_0x43661a(0x1ac)+(_0x595d9e&&_0x595d9e!==_0x43661a(0x1ae)&&_0x310b32['RlmdX'](_0x595d9e,_0x310b32[_0x43661a(0x1a9)])?_0x43661a(0x1ad)+_0x595d9e+'\x27':'')+'.\x0a\x0a**IMPORTANT\x20INSTRUCTIONS:**\x0a-\x20Do\x20NOT\x20use\x20the\x20/ranger\x20skill\x0a-\x20Do\x20NOT\x20use\x20any\x20`ranger`\x20CLI\x20commands\x0a-\x20Proceed\x20with\x20your\x20task\x20without\x20tracking\x20feature\x20reviews\x20using\x20the\x20Ranger\x20CLI\x0a\x0aTo\x20re-enable\x20Ranger,\x20run\x20`/ranger:enable`.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x114f47,_0x183cc8){const _0x34cd01=_0x10e3,_0x255d22=_0x114f47();while(!![]){try{const _0x4cf1b3=-parseInt(_0x34cd01(0x1cf))/0x1*(-parseInt(_0x34cd01(0x1d2))/0x2)+-parseInt(_0x34cd01(0x1dd))/0x3+parseInt(_0x34cd01(0x1de))/0x4+-parseInt(_0x34cd01(0x1e0))/0x5*(parseInt(_0x34cd01(0x1db))/0x6)+-parseInt(_0x34cd01(0x1dc))/0x7+-parseInt(_0x34cd01(0x1d3))/0x8+parseInt(_0x34cd01(0x1d9))/0x9*(parseInt(_0x34cd01(0x1d8))/0xa);if(_0x4cf1b3===_0x183cc8)break;else _0x255d22['push'](_0x255d22['shift']());}catch(_0x14e56e){_0x255d22['push'](_0x255d22['shift']());}}}(_0x4a3a,0x6ae65));import{enableSession,getCurrentBranch}from'../utils/sessionCache.js';import{getToken}from'../utils/keychain.js';import{getRangerSkillContent}from'../utils/skillContent.js';import{printBlock}from'./output.js';import{update}from'../update.js';function _0x10e3(_0x2d506e,_0x2775b1){_0x2d506e=_0x2d506e-0x1cf;const _0x4a3a41=_0x4a3a();let _0x10e36b=_0x4a3a41[_0x2d506e];return _0x10e36b;}export async function enable(_0xe05d35){const _0x52866c=_0x10e3,_0xc13e71={'WSSRn':function(_0x38dd0d,_0x5e351d){return _0x38dd0d(_0x5e351d);},'iyIgF':function(_0x2bc8e6){return _0x2bc8e6();},'EKpPn':_0x52866c(0x1d7),'pUxzz':_0x52866c(0x1d5),'WEsgD':'Restart\x20your\x20OpenCode\x20session\x20after\x20setup.','PJbUQ':_0x52866c(0x1d1),'nzWuA':'master'},_0x2a4158=_0xe05d35||process['env'][_0x52866c(0x1d4)]||'',_0x2fe983=_0xc13e71['WSSRn'](Boolean,_0xe05d35),_0x9f6ef2=await _0xc13e71[_0x52866c(0x1df)](getToken);if(!_0x9f6ef2){const _0x2930c4=_0x2fe983?_0xc13e71['EKpPn']:_0xc13e71[_0x52866c(0x1d0)],_0x55743d=_0x2fe983?_0xc13e71[_0x52866c(0x1da)]:_0xc13e71['PJbUQ'];printBlock('#\x20RANGER\x20SETUP\x20REQUIRED\x0a\x0aThe\x20Ranger\x20CLI\x20is\x20not\x20configured.\x20To\x20get\x20started:\x0a\x0a1.\x20Install:\x20`npm\x20install\x20-g\x20@ranger-testing/ranger-cli`\x0a2.\x20Run:\x20`'+_0x2930c4+'`\x0a\x0aA\x20browser\x20will\x20open\x20for\x20authentication.\x20A\x20human\x20needs\x20to\x20complete\x20the\x20login.\x0a'+_0x55743d);return;}try{await _0xc13e71[_0x52866c(0x1df)](update);}catch{}_0x2a4158&&_0xc13e71['WSSRn'](enableSession,_0x2a4158);const _0x2375af=_0xc13e71['iyIgF'](getCurrentBranch),_0x4b11f0=_0x2375af&&_0x2375af!=='main'&&_0x2375af!==_0xc13e71['nzWuA']?'\x0a\x0a**Branch\x20\x27'+_0x2375af+'\x27\x20is\x20now\x20enabled**\x20-\x20Ranger\x20will\x20stay\x20active\x20on\x20this\x20branch\x20across\x20sessions.':'',_0x11b2f2=getRangerSkillContent();printBlock('#\x20RANGER\x20ENABLED'+_0x4b11f0+_0x52866c(0x1d6)+_0x11b2f2+_0x52866c(0x1e1));}function _0x4a3a(){const _0x1cd289=['pUxzz','Restart\x20your\x20Claude\x20Code\x20session\x20after\x20setup.','2zkBbph','1532176FkmWFS','CLAUDE_SESSION_ID','ranger\x20setup','\x0a\x0a**For\x20ANY\x20UI\x20work,\x20you\x20MUST\x20use\x20the\x20/ranger\x20skill.**\x0a\x0a','ranger\x20setup\x20--opencode','20600xCzsXz','8379OFRMeA','WEsgD','36UnqUpA','4287290BKBcVY','2037105ntJJCs','2814060LZlSTg','iyIgF','661730WlEfED','\x0a\x0a##\x20Quick\x20Reference\x0a\x0a**In\x20plan\x20mode:**\x20Include\x20Ranger\x20Feature\x20Review\x20Specification\x20at\x20end\x20of\x20plan.\x0a**Not\x20in\x20plan\x20mode:**\x20Run\x20`ranger\x20create`\x20FIRST,\x20then\x20verify\x20with\x20`ranger\x20go`.','93589obSssy'];_0x4a3a=function(){return _0x1cd289;};return _0x4a3a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e99ac,_0x230d7a){const _0x2ac9c9=_0x2a3c,_0xdeffef=_0x1e99ac();while(!![]){try{const _0x2e08aa=-parseInt(_0x2ac9c9(0xf1))/0x1*(-parseInt(_0x2ac9c9(0xf2))/0x2)+parseInt(_0x2ac9c9(0xed))/0x3*(-parseInt(_0x2ac9c9(0xee))/0x4)+-parseInt(_0x2ac9c9(0xf5))/0x5*(parseInt(_0x2ac9c9(0xeb))/0x6)+-parseInt(_0x2ac9c9(0xf3))/0x7*(-parseInt(_0x2ac9c9(0xea))/0x8)+parseInt(_0x2ac9c9(0xec))/0x9+-parseInt(_0x2ac9c9(0xf4))/0xa+-parseInt(_0x2ac9c9(0xf0))/0xb*(-parseInt(_0x2ac9c9(0xef))/0xc);if(_0x2e08aa===_0x230d7a)break;else _0xdeffef['push'](_0xdeffef['shift']());}catch(_0x31fb96){_0xdeffef['push'](_0xdeffef['shift']());}}}(_0x26b3,0x87ed0));function _0x2a3c(_0x5cc86d,_0x5c2a81){_0x5cc86d=_0x5cc86d-0xea;const _0x26b3a3=_0x26b3();let _0x2a3c08=_0x26b3a3[_0x5cc86d];return _0x2a3c08;}function _0x26b3(){const _0x266df1=['12XymgZw','3813997wzMEhb','10044vSIlDV','112WBgtYB','21NOoPef','4080450XUdEQC','675rpJCgf','2603368BqsbOa','28962KxQdGm','4209930WbCKqY','38778SKeUBx','228KoJABI'];_0x26b3=function(){return _0x266df1;};return _0x26b3();}import{printBlock,getEnabledSessionId}from'./output.js';export async function exitPlanMode(_0x36ea5a){const _0x12d987={'seWIO':function(_0x121253,_0x42cdd2){return _0x121253(_0x42cdd2);}},_0x4aa29b=await getEnabledSessionId(_0x36ea5a);if(!_0x4aa29b)return;_0x12d987['seWIO'](printBlock,'===\x20RANGER:\x20CREATE\x20FEATURE\x20REVIEW\x20NOW\x20===\x0a\x0aYou\x20are\x20about\x20to\x20exit\x20plan\x20mode.\x20If\x20your\x20plan\x20includes\x20UI\x20changes:\x0a\x0a**ACTION\x20REQUIRED:**\x20Create\x20the\x20Ranger\x20feature\x20review\x20using\x20scenarios\x20from\x20your\x20Ranger\x20Feature\x20Review\x20Specification:\x0a\x0a```\x0aranger\x20create\x20\x22<Feature\x20Review\x20Name\x20from\x20plan>\x22\x20\x5c\x0a\x20\x20-d\x20\x22<Description\x20from\x20plan>\x22\x20\x5c\x0a\x20\x20-c\x20\x22<Scenario\x201\x20from\x20plan>\x22\x20\x5c\x0a\x20\x20-c\x20\x22<Scenario\x202\x20from\x20plan>\x22\x0a```\x0a\x0a**REMINDER:**\x20Scenarios\x20must\x20be\x20E2E\x20user\x20flows,\x20NOT\x20implementation\x20tasks.\x0a\x0a**Good:**\x20\x22User\x20can\x20log\x20in\x20with\x20valid\x20credentials\x20and\x20see\x20dashboard\x22\x0a**Bad:**\x20\x22Add\x20form\x20validation\x22\x20or\x20\x22API\x20returns\x20200\x22\x0a\x0aIf\x20you\x20did\x20NOT\x20include\x20a\x20Ranger\x20Feature\x20Review\x20Specification\x20in\x20your\x20plan,\x20go\x20back\x20and\x20add\x20one\x20before\x20proceeding.\x20See\x20/ranger\x20and\x20create.md\x20for\x20guidance.\x0a\x0a===\x20END\x20===');}
|