@ranger-testing/ranger-cli 2.1.1 → 2.1.2
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/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/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- 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/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- 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/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- 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/telemetry.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/verifyInBrowser.js +1 -1
- package/package.json +1 -1
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xfe4386=_0x319a;(function(_0x5e4a2e,_0x3f95ca){const _0x4f8bb1=_0x319a,_0x4ec1c7=_0x5e4a2e();while(!![]){try{const _0x30c178=parseInt(_0x4f8bb1(0x1a4))/0x1*(-parseInt(_0x4f8bb1(0x1a2))/0x2)+-parseInt(_0x4f8bb1(0x19f))/0x3*(parseInt(_0x4f8bb1(0x1a1))/0x4)+parseInt(_0x4f8bb1(0x1ad))/0x5*(parseInt(_0x4f8bb1(0x19e))/0x6)+parseInt(_0x4f8bb1(0x1b5))/0x7*(-parseInt(_0x4f8bb1(0x1b0))/0x8)+-parseInt(_0x4f8bb1(0x1a7))/0x9+parseInt(_0x4f8bb1(0x1ab))/0xa+parseInt(_0x4f8bb1(0x19a))/0xb;if(_0x30c178===_0x3f95ca)break;else _0x4ec1c7['push'](_0x4ec1c7['shift']());}catch(_0x55239d){_0x4ec1c7['push'](_0x4ec1c7['shift']());}}}(_0xd3f8,0xaef42));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';import{loadSettings}from'./utils/settings.js';function _0x319a(_0x547794,_0x204237){_0x547794=_0x547794-0x199;const _0xd3f895=_0xd3f8();let _0x319a4e=_0xd3f895[_0x547794];return _0x319a4e;}import{readActiveProfileName}from'./utils/activeProfile.js';const NON_ENV_DIRS=[_0xfe4386(0x1b8),_0xfe4386(0x1a3),'reports','local','ci'];function _0xd3f8(){const _0x2264c4=['.txt','includes','BdghI','86420ciruXm','iQtmV','5chHXjP','log','environmentDetails','1984bPoDAM','\x20\x20\x20\x20\x20\x20Details:\x20','baseUrl','push','AceXP','27958KtqDLz','MyYUS','length','sessions','local','23777061gzIvWj','AKOdp','\x0aProfiles:','sort','4015620HxFhBo','2079762pSuUAF','isDirectory','4TKTPKs','2domlzU','bug-bashes','360239cVglXv','\x0aNo\x20profiles\x20found.','endsWith','709632MMFwyo'];_0xd3f8=function(){return _0x2264c4;};return _0xd3f8();}export async function getEnvNames(){const _0x677198=_0xfe4386,_0x50a6af={'MyYUS':function(_0x3ac25f){return _0x3ac25f();},'AceXP':function(_0xa9ba0d,_0x543d2b){return _0xa9ba0d(_0x543d2b);},'AKOdp':function(_0xf60c82,_0x3033ce,_0x27a8f5){return _0xf60c82(_0x3033ce,_0x27a8f5);},'FGbfz':function(_0x130cea,_0x1952c1){return _0x130cea(_0x1952c1);},'BdghI':function(_0xbbd27c,_0x4e2f52){return _0xbbd27c(_0x4e2f52);},'ekcMO':function(_0xcc7f48,_0x37e101){return _0xcc7f48(_0x37e101);},'djIGq':'settings.json'},_0x2e1368=getRangerDir();if(!existsSync(_0x2e1368))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x1398cb=await _0x50a6af[_0x677198(0x1b6)](readActiveProfileName),_0x2378f3=[],_0x370708={},_0x1f7a19=join(_0x2e1368,_0x677198(0x199));if(_0x50a6af[_0x677198(0x1b4)](existsSync,_0x1f7a19)){const _0x1b72e9=await readdir(_0x1f7a19);for(const _0x276d1c of _0x1b72e9){const _0x419b2d=_0x50a6af[_0x677198(0x19b)](join,_0x1f7a19,_0x276d1c),_0x58129b=await _0x50a6af['FGbfz'](stat,_0x419b2d);_0x58129b['isDirectory']()&&(_0x2378f3['push'](_0x276d1c),_0x370708[_0x276d1c]=_0x677198(0x199));}}const _0x4df35a=_0x50a6af[_0x677198(0x19b)](join,_0x2e1368,'ci');if(existsSync(_0x4df35a)){const _0x121ba0=await _0x50a6af['AceXP'](readdir,_0x4df35a);for(const _0x104181 of _0x121ba0){const _0x18a1bd=_0x50a6af[_0x677198(0x19b)](join,_0x4df35a,_0x104181),_0x7cd7f6=await _0x50a6af['BdghI'](stat,_0x18a1bd);_0x7cd7f6[_0x677198(0x1a0)]()&&(_0x2378f3[_0x677198(0x1b3)](_0x104181),_0x370708[_0x104181]='ci');}}const _0x2439e2=await _0x50a6af['ekcMO'](readdir,_0x2e1368);for(const _0x5ba897 of _0x2439e2){if(NON_ENV_DIRS[_0x677198(0x1a9)](_0x5ba897))continue;if(_0x5ba897['startsWith']('.'))continue;if(_0x5ba897[_0x677198(0x1a6)](_0x677198(0x1a8)))continue;const _0x344cfe=join(_0x2e1368,_0x5ba897),_0x3b69f4=await _0x50a6af['BdghI'](stat,_0x344cfe);_0x3b69f4[_0x677198(0x1a0)]()&&_0x50a6af[_0x677198(0x1aa)](existsSync,join(_0x344cfe,_0x50a6af['djIGq']))&&(!_0x2378f3['includes'](_0x5ba897)&&(_0x2378f3['push'](_0x5ba897),_0x370708[_0x5ba897]='legacy'));}return{'envNames':_0x2378f3,'activeEnv':_0x1398cb,'envTypes':_0x370708};}export async function envList(){const _0x35c2e6=_0xfe4386,_0x4c49e1={'iQtmV':function(_0x867dae,_0x20f07a){return _0x867dae(_0x20f07a);},'mMZOi':function(_0x5612ba,_0x2b20ed){return _0x5612ba===_0x2b20ed;}},{envNames:_0x362674,activeEnv:_0xf9fbc4,envTypes:_0x5340b4}=await getEnvNames();if(_0x362674[_0x35c2e6(0x1b7)]===0x0){console[_0x35c2e6(0x1ae)](_0x35c2e6(0x1a5)),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}console[_0x35c2e6(0x1ae)](_0x35c2e6(0x19c));for(const _0x540d9f of _0x362674[_0x35c2e6(0x19d)]()){const _0x115b0f=_0x540d9f===_0xf9fbc4,_0x3cf74f=_0x5340b4[_0x540d9f]||'local',_0x43696a=await _0x4c49e1[_0x35c2e6(0x1ac)](loadSettings,_0x540d9f),_0x3e6b01=_0x4c49e1['mMZOi'](_0x3cf74f,'legacy')?'':'\x20['+_0x3cf74f+']';console[_0x35c2e6(0x1ae)]('\x20\x20'+(_0x115b0f?'*\x20':'\x20\x20')+_0x540d9f+_0x3e6b01),_0x43696a[_0x35c2e6(0x1b2)]&&console['log']('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x43696a['baseUrl']),_0x43696a[_0x35c2e6(0x1af)]&&console[_0x35c2e6(0x1ae)](_0x35c2e6(0x1b1)+_0x43696a['environmentDetails']);}_0xf9fbc4&&console['log']('\x0a*\x20=\x20active\x20profile');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1f47f2=_0x3ee2;(function(_0xad3983,_0x1aab56){const _0x1e9d57=_0x3ee2,_0x2d5350=_0xad3983();while(!![]){try{const _0x315755=-parseInt(_0x1e9d57(0x196))/0x1*(-parseInt(_0x1e9d57(0x146))/0x2)+parseInt(_0x1e9d57(0x1b9))/0x3+parseInt(_0x1e9d57(0x155))/0x4*(parseInt(_0x1e9d57(0x1bc))/0x5)+parseInt(_0x1e9d57(0x129))/0x6+parseInt(_0x1e9d57(0x15e))/0x7*(-parseInt(_0x1e9d57(0x151))/0x8)+-parseInt(_0x1e9d57(0x11e))/0x9+-parseInt(_0x1e9d57(0x159))/0xa*(-parseInt(_0x1e9d57(0x19c))/0xb);if(_0x315755===_0x1aab56)break;else _0x2d5350['push'](_0x2d5350['shift']());}catch(_0x532ce4){_0x2d5350['push'](_0x2d5350['shift']());}}}(_0x30e4,0xdba51));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x124359 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.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=_0x1f47f2(0x194),bold=_0x5816b3=>'\x1b[1m'+_0x5816b3+_0x1f47f2(0x16d);function getGitRepoUrl(){const _0x29a5f8=_0x1f47f2,_0x2105e8={'zFbIx':'pipe','SYchw':'github.com/'};try{const _0x5157b4=execSync(_0x29a5f8(0x14a),{'encoding':'utf-8','stdio':[_0x2105e8['zFbIx'],'pipe',_0x29a5f8(0x123)]})[_0x29a5f8(0x1b6)]();return _0x5157b4[_0x29a5f8(0x128)](/\.git$/,'')[_0x29a5f8(0x128)](/^git@github\.com:/,_0x2105e8['SYchw'])[_0x29a5f8(0x128)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x267660=_0x1f47f2,_0xfcbecf={'WEviS':function(_0x37aa40,_0x59394a,_0x3be4e4){return _0x37aa40(_0x59394a,_0x3be4e4);},'mbtxX':_0x267660(0x13f),'QkrEg':'utf-8','cVdIw':'pipe'};try{return _0xfcbecf['WEviS'](execSync,_0xfcbecf[_0x267660(0x195)],{'encoding':_0xfcbecf[_0x267660(0x157)],'stdio':[_0x267660(0x123),'pipe',_0xfcbecf[_0x267660(0xff)]]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x2ef994=_0x1f47f2,_0x45609a={'hazrP':function(_0x31c2bc,_0x2a66fc,_0x422cca){return _0x31c2bc(_0x2a66fc,_0x422cca);},'IjSCr':'utf-8'},_0x4fea00=_0x45609a['hazrP'](join,getRangerDir(),ACTIVE_FEATURE_FILE);if(!existsSync(_0x4fea00))return null;try{const _0x8e315c=await readFile(_0x4fea00,_0x45609a[_0x2ef994(0x163)]);return _0x8e315c['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x2491bc){const _0x30e2ef=_0x1f47f2,_0x1dea1a={'pQBXC':function(_0x322643,_0x3b2af6){return _0x322643(_0x3b2af6);},'EognC':function(_0x4de311,_0x311580,_0x5c4748){return _0x4de311(_0x311580,_0x5c4748);},'QQLtF':'utf-8'},_0x355eb6=getRangerDir(),_0x1fc3df=join(_0x355eb6,ACTIVE_FEATURE_FILE);!_0x1dea1a['pQBXC'](existsSync,_0x355eb6)&&await _0x1dea1a[_0x30e2ef(0x142)](mkdir,_0x355eb6,{'recursive':!![]}),await writeFile(_0x1fc3df,_0x2491bc,_0x1dea1a['QQLtF']);}function getProgressDisplay(_0x12062e){const _0x3e4737=_0x1f47f2,_0x17651e={'aurND':function(_0xc6cecc,_0x2930c6){return _0xc6cecc+_0x2930c6;},'YbhbX':function(_0xf3506c,_0x470f75){return _0xf3506c+_0x470f75;},'RXrfX':function(_0x176756,_0x1ee5e9){return _0x176756===_0x1ee5e9;},'PnBru':function(_0x47aa50,_0x4a33b6){return _0x47aa50*_0x4a33b6;},'RSHWo':function(_0x3ee630,_0x30b6d1){return _0x3ee630-_0x30b6d1;},'HmgFS':function(_0x318baa,_0x1ce39d){return _0x318baa>_0x1ce39d;},'XpOJq':function(_0x15b67d,_0x2a10c9){return _0x15b67d>_0x2a10c9;}},_0x2b4857=_0x12062e[_0x3e4737(0x12b)]||0x0,_0x3b70ab=_0x12062e['verificationInProgressItems']||0x0,_0x1f8e67=_0x12062e['blockedItems']||0x0,_0x2f6139=_0x12062e['incompleteItems']||0x0,_0x448e0f=_0x12062e[_0x3e4737(0x119)]||0x0,_0xe7c78c=_0x17651e['aurND'](_0x17651e[_0x3e4737(0x126)](_0x2b4857+_0x3b70ab,_0x1f8e67),_0x2f6139)+_0x448e0f;if(_0x17651e[_0x3e4737(0x1c1)](_0xe7c78c,0x0))return'-';const _0x206eff=0xa,_0x504837=Math[_0x3e4737(0x185)](_0x17651e[_0x3e4737(0x121)](_0x2b4857/_0xe7c78c,_0x206eff)),_0x2f7bda='█'[_0x3e4737(0x15c)](_0x504837)+'░'[_0x3e4737(0x15c)](_0x17651e['RSHWo'](_0x206eff,_0x504837)),_0x307117=[];if(_0x1f8e67>0x0)_0x307117[_0x3e4737(0x130)](_0x1f8e67+_0x3e4737(0x117));if(_0x17651e[_0x3e4737(0x145)](_0x2f6139,0x0))_0x307117[_0x3e4737(0x130)](_0x2f6139+_0x3e4737(0x18b));if(_0x3b70ab>0x0)_0x307117[_0x3e4737(0x130)](_0x3b70ab+'\x20in\x20progress');const _0x112cb4=_0x17651e[_0x3e4737(0x178)](_0x307117['length'],0x0)?'\x20('+_0x307117['join'](',\x20')+')':'';return _0x2f7bda+'\x20'+_0x2b4857+'/'+_0xe7c78c+'\x20verified'+_0x112cb4;}function getCurrentSessionItems(_0x1022c9,_0x4b1d96){const _0x2a5dfc=_0x1f47f2;if(!_0x1022c9[_0x2a5dfc(0x198)])return _0x4b1d96[_0x2a5dfc(0x104)](_0x115aaf=>!_0x115aaf['sessionId'])['sort']((_0x1d606f,_0x5662ea)=>_0x1d606f['position']-_0x5662ea['position']);return _0x4b1d96['filter'](_0x294356=>_0x294356[_0x2a5dfc(0x109)]===_0x1022c9['currentSessionId']||!_0x294356['sessionId'])['sort']((_0xa93648,_0x101aea)=>_0xa93648['position']-_0x101aea[_0x2a5dfc(0x120)]);}function displayFeature(_0x3cfec2,_0x37203e){const _0x52c12d=_0x1f47f2,_0x3e01a0={'msffk':function(_0x15e009,_0x9210e8){return _0x15e009(_0x9210e8);},'raaFh':function(_0x1fbfb2,_0xc0a0ac){return _0x1fbfb2>_0xc0a0ac;},'ZtEQO':function(_0x3d0ee6,_0x36ff51){return _0x3d0ee6===_0x36ff51;},'yHnGL':'closed','ExhsR':'verified','MaCzx':function(_0x452607,_0xd62a17){return _0x452607===_0xd62a17;},'GqIED':_0x52c12d(0xfd),'GZTeq':function(_0x22a791,_0x2a6925){return _0x22a791===_0x2a6925;},'nUgxq':'blocked','dWhKB':function(_0x2b0cbc,_0x20ebc0){return _0x2b0cbc!==_0x20ebc0;},'SHVwJ':function(_0x117696,_0x35649d){return _0x117696!==_0x35649d;},'CBrSY':function(_0x393cbc,_0xb9d773){return _0x393cbc+_0xb9d773;},'LPbEx':function(_0x371359,_0x521354){return _0x371359===_0x521354;}};console['log']('\x0a'+_0x3cfec2[_0x52c12d(0x191)]+'\x20('+_0x3cfec2[_0x52c12d(0x134)]+')');_0x3cfec2['stats']&&console[_0x52c12d(0x11c)]('\x20\x20\x20Progress:\x20'+_0x3e01a0[_0x52c12d(0x14f)](getProgressDisplay,_0x3cfec2[_0x52c12d(0x160)]));_0x3cfec2['description']&&console['log']('\x20\x20\x20Description:\x20'+_0x3cfec2['description']);_0x3cfec2['gitRepoUrl']&&console[_0x52c12d(0x11c)]('\x20\x20\x20Repository:\x20'+_0x3cfec2['gitRepoUrl']);_0x3cfec2['gitBranch']&&console[_0x52c12d(0x11c)](_0x52c12d(0x167)+_0x3cfec2[_0x52c12d(0x13c)]);console['log']('\x20\x20\x20Created:\x20'+new Date(_0x3cfec2[_0x52c12d(0x132)])[_0x52c12d(0xfe)]());_0x3cfec2[_0x52c12d(0x168)]&&console[_0x52c12d(0x11c)](_0x52c12d(0x1a7)+new Date(_0x3cfec2['completedAt'])['toLocaleString']());if(_0x37203e&&_0x3e01a0[_0x52c12d(0x189)](_0x37203e[_0x52c12d(0x1a0)],0x0)){console['log']('\x0a\x20\x20\x20Scenarios:');for(let _0x391efc=0x0;_0x391efc<_0x37203e['length'];_0x391efc++){const _0x18cc93=_0x37203e[_0x391efc];let _0x3438d3;if(_0x3e01a0[_0x52c12d(0x105)](_0x18cc93['status'],_0x3e01a0['yHnGL'])&&_0x18cc93['terminalReason']===_0x52c12d(0x1ad))_0x3438d3='✅';else{if(_0x18cc93[_0x52c12d(0x169)]===_0x3e01a0[_0x52c12d(0x125)])_0x3438d3='🟢';else{if(_0x3e01a0['MaCzx'](_0x18cc93['status'],_0x3e01a0['GqIED']))_0x3438d3='🟠';else{if(_0x3e01a0['GZTeq'](_0x18cc93['status'],_0x3e01a0[_0x52c12d(0x1bf)]))_0x3438d3='🛑';else{if(_0x18cc93['status']===_0x52c12d(0x153))_0x3438d3='⛔';else _0x3e01a0['GZTeq'](_0x18cc93['status'],_0x52c12d(0x148))?_0x3438d3='⏳':_0x3438d3='⬜';}}}}const _0x4d8143=_0x3e01a0['raaFh'](_0x18cc93['version'],0x1)?'\x20(v'+_0x18cc93['version']+')':'',_0x7ad377=_0x3e01a0[_0x52c12d(0x189)](_0x18cc93['version'],0x1)&&_0x18cc93['parentItemId']&&_0x3e01a0['dWhKB'](_0x18cc93['status'],_0x3e01a0['yHnGL'])&&_0x3e01a0['SHVwJ'](_0x18cc93[_0x52c12d(0x169)],_0x3e01a0['ExhsR'])?_0x52c12d(0x12f):'';console[_0x52c12d(0x11c)]('\x20\x20\x20'+_0x3e01a0[_0x52c12d(0x17a)](_0x391efc,0x1)+'.\x20'+_0x3438d3+'\x20'+_0x18cc93[_0x52c12d(0x124)]+_0x4d8143+_0x7ad377);_0x18cc93['status']===_0x52c12d(0x13e)&&_0x18cc93['blockedReason']&&console['log'](_0x52c12d(0x115)+_0x18cc93[_0x52c12d(0x1a6)]);_0x3e01a0[_0x52c12d(0x105)](_0x18cc93[_0x52c12d(0x169)],_0x52c12d(0xfd))&&_0x18cc93[_0x52c12d(0x17b)]&&console[_0x52c12d(0x11c)](_0x52c12d(0x13d)+_0x18cc93[_0x52c12d(0x17b)]);if(_0x3e01a0[_0x52c12d(0x114)](_0x18cc93[_0x52c12d(0x169)],'closed')&&_0x18cc93['terminalReason']===_0x52c12d(0x1ad))console['log'](_0x52c12d(0x197));else _0x18cc93['status']==='closed'&&_0x18cc93['canceledReason']&&console['log']('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x18cc93[_0x52c12d(0x137)]);}}}export async function featureCreate(_0x5f2afc,_0x4f44ba){const _0x3bde65=_0x1f47f2,_0x48efa8={'vIcED':function(_0x51b142){return _0x51b142();},'mTfAu':function(_0x2115dd){return _0x2115dd();},'oxzXc':function(_0x4a56ff,_0x22c6df){return _0x4a56ff(_0x22c6df);}},{envNames:_0x29d792}=await getEnvNames();_0x29d792[_0x3bde65(0x1a0)]===0x0&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x207fa3=>bold(_0x207fa3)));const _0x10375e=_0x4f44ba[_0x3bde65(0x141)]?_0x4f44ba['scenarios']['map'](_0x281100=>_0x281100[_0x3bde65(0x1b6)]()):[],_0x4ae6e2=_0x48efa8['vIcED'](getGitRepoUrl),_0x5ca54d=_0x48efa8[_0x3bde65(0x1b3)](getGitBranch);console['log']('\x0aCreating\x20feature\x20review...');const _0x12e18a=await _0x48efa8[_0x3bde65(0x181)](createFeature,{'name':_0x5f2afc,'description':_0x4f44ba[_0x3bde65(0x124)],'checklist':_0x10375e,'gitRepoUrl':_0x4ae6e2,'gitBranch':_0x5ca54d});await setActiveFeatureId(_0x12e18a['id']),await tryStartCurrentSession(_0x12e18a['id']);const _0xf27142=process['env']['CLAUDE_SESSION_ID'];_0xf27142&®isterSession(_0xf27142,_0x12e18a['id']),console[_0x3bde65(0x11c)](_0x3bde65(0x10f)+_0x12e18a['id']),displayFeature(_0x12e18a,_0x12e18a[_0x3bde65(0x16f)]),console[_0x3bde65(0x11c)]('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0x5cdc5c){const _0x379129=_0x1f47f2,_0x488a24={'iNYaZ':function(_0x35140b){return _0x35140b();},'aBUSi':function(_0x5e508a,_0x28b723){return _0x5e508a(_0x28b723);},'FORbq':'\x0aNo\x20feature\x20reviews\x20found.','lmeYf':function(_0x493903,_0x2d495e){return _0x493903>_0x2d495e;},'ExnAr':function(_0x5294c8,_0xe72f6){return _0x5294c8!==_0xe72f6;},'EwlMr':_0x379129(0x1ae)},_0x29bf01={'limit':_0x5cdc5c['limit']??0xa,'offset':_0x5cdc5c['offset']??0x0,'includeDeleted':_0x5cdc5c['includeDeleted']};_0x5cdc5c['currentBranch']&&(_0x29bf01['gitRepoUrl']=getGitRepoUrl(),_0x29bf01[_0x379129(0x13c)]=_0x488a24[_0x379129(0x102)](getGitBranch));const _0xd01f62=await _0x488a24[_0x379129(0x1a2)](listFeatures,_0x29bf01);if(_0xd01f62[_0x379129(0x1bd)][_0x379129(0x1a0)]===0x0){console[_0x379129(0x11c)](_0x488a24[_0x379129(0x1a9)]);return;}const _0x57fbab=_0x488a24[_0x379129(0x150)](_0xd01f62[_0x379129(0x17c)],_0xd01f62[_0x379129(0x1bd)][_0x379129(0x1a0)])?'Showing\x20'+_0xd01f62[_0x379129(0x1bd)]['length']+'\x20of\x20'+_0xd01f62['totalCount']:_0xd01f62[_0x379129(0x17c)]+_0x379129(0x18a);console[_0x379129(0x11c)]('\x0a'+_0x57fbab+':\x0a');for(const _0x3247e2 of _0xd01f62[_0x379129(0x1bd)]){console[_0x379129(0x11c)](''+_0x3247e2[_0x379129(0x191)]),console['log'](_0x379129(0x184)+_0x3247e2['id']),_0x3247e2[_0x379129(0x160)]&&console['log']('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x3247e2['stats'])),_0x3247e2[_0x379129(0x13c)]&&console[_0x379129(0x11c)](_0x379129(0x167)+_0x3247e2['gitBranch']),console['log'](_0x379129(0x10a)+new Date(_0x3247e2[_0x379129(0x132)])['toLocaleDateString']()),console['log']('');}const _0x74f188=_0x29bf01['limit']??0xa,_0x147fc2=(_0x29bf01[_0x379129(0x143)]??0x0)+_0xd01f62['items'][_0x379129(0x1a0)];if(_0x147fc2<_0xd01f62[_0x379129(0x17c)]){const _0x8793=_0x488a24[_0x379129(0x170)](_0x74f188,0xa)?'\x20--limit\x20'+_0x74f188:'',_0x1a387e=_0x5cdc5c[_0x379129(0x17e)]?_0x488a24['EwlMr']:'',_0x135a33=_0x5cdc5c[_0x379129(0x11b)]?'\x20--include-deleted':'';console[_0x379129(0x11c)](_0x379129(0x15a)+_0x147fc2+_0x8793+_0x1a387e+_0x135a33);}}function _0x3ee2(_0x53f851,_0x5bd614){_0x53f851=_0x53f851-0xfc;const _0x30e4f3=_0x30e4();let _0x3ee2e7=_0x30e4f3[_0x53f851];return _0x3ee2e7;}export async function featureShow(_0x4b7bfe){const _0xaec392=_0x1f47f2,_0x162c46={'SyNuk':function(_0x1868ca){return _0x1868ca();},'qIpjo':_0xaec392(0x179),'dAgNN':function(_0x536eb7,_0x37ad30){return _0x536eb7(_0x37ad30);},'TSRoe':function(_0x3d5cc6,_0x2984ce,_0x343b5f){return _0x3d5cc6(_0x2984ce,_0x343b5f);}},_0x203aba=_0x4b7bfe||await _0x162c46['SyNuk'](getActiveFeatureId);if(!_0x203aba)throw new Error(_0x162c46['qIpjo']);const _0x1842e1=await _0x162c46['dAgNN'](getFeature,_0x203aba);_0x162c46['TSRoe'](displayFeature,_0x1842e1,_0x1842e1[_0xaec392(0x16f)]);}export async function featureResume(_0x2542c8){const _0x5b4d37=_0x1f47f2,_0x40e9dc={'mdgcV':function(_0x262938,_0x10d269){return _0x262938(_0x10d269);},'WwwOV':function(_0x40c574,_0x5454f0){return _0x40c574!==_0x5454f0;},'BhrPt':function(_0xb07598,_0x2d9daa,_0x454cfe){return _0xb07598(_0x2d9daa,_0x454cfe);},'tSHrI':function(_0x51d7c0,_0x320450){return _0x51d7c0&&_0x320450;},'KHrFs':_0x5b4d37(0x10b),'SKIks':'any','ohahS':function(_0x3b1c11,_0x576177){return _0x3b1c11===_0x576177;},'dTlTn':_0x5b4d37(0x15b),'IvAMv':_0x5b4d37(0x177),'gscFv':function(_0x58236c,_0x3fac38){return _0x58236c(_0x3fac38);},'pKEdV':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','WsvCp':'list','UeXCb':function(_0x19d17a,_0x5901e6){return _0x19d17a(_0x5901e6);}};if(_0x2542c8){const _0xe46071=await getFeature(_0x2542c8);await _0x40e9dc['mdgcV'](setActiveFeatureId,_0xe46071['id']);const _0x524840=getGitBranch();_0x524840&&_0x40e9dc['WwwOV'](_0x524840,_0xe46071[_0x5b4d37(0x13c)])&&(await _0x40e9dc['BhrPt'](updateFeature,_0xe46071['id'],{'gitBranch':_0x524840}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x524840));console['log'](_0x5b4d37(0x18e)+_0xe46071[_0x5b4d37(0x191)]+'\x20('+_0xe46071['id']+')'),await _0x40e9dc[_0x5b4d37(0x175)](tryStartCurrentSession,_0xe46071['id']);const _0x4e2fda=process[_0x5b4d37(0x15f)]['CLAUDE_SESSION_ID'];_0x4e2fda&®isterSession(_0x4e2fda,_0xe46071['id']);_0x40e9dc[_0x5b4d37(0x158)](displayFeature,_0xe46071,_0xe46071['checklistItems']),await _0x40e9dc[_0x5b4d37(0x175)](printFeedbackNudge,_0xe46071['id']);return;}const _0xee4d5=getGitRepoUrl(),_0x592ff7=getGitBranch();if(_0x40e9dc[_0x5b4d37(0x188)](!_0xee4d5,!_0x592ff7))throw new Error(_0x40e9dc[_0x5b4d37(0x1a3)]);console['log'](_0x5b4d37(0x152)+(_0xee4d5||_0x40e9dc['SKIks'])+'\x20/\x20'+(_0x592ff7||_0x5b4d37(0x1be))+'...');const _0x2a6714=await _0x40e9dc['mdgcV'](listFeatures,{'gitRepoUrl':_0xee4d5,'gitBranch':_0x592ff7}),_0x2c4ff6=_0x2a6714[_0x5b4d37(0x1bd)]['filter'](_0x311118=>!_0x311118['completedAt']);if(_0x40e9dc['ohahS'](_0x2c4ff6[_0x5b4d37(0x1a0)],0x0)){console[_0x5b4d37(0x11c)](_0x40e9dc['dTlTn']),console[_0x5b4d37(0x11c)]('Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review');return;}let _0x4ab623;if(_0x2c4ff6['length']===0x1)_0x4ab623=_0x2c4ff6[0x0];else{const _0x1077f3=process[_0x5b4d37(0x14c)][_0x5b4d37(0x10d)]&&process['stdout']['isTTY'];if(!_0x1077f3){console[_0x5b4d37(0x11c)](_0x40e9dc[_0x5b4d37(0x106)]);for(const _0x97502e of _0x2c4ff6){console[_0x5b4d37(0x11c)]('\x20\x20'+_0x97502e['name']),console['log']('\x20\x20\x20\x20\x20ID:\x20'+_0x97502e['id']),_0x97502e['stats']&&console['log'](_0x5b4d37(0x10e)+_0x40e9dc[_0x5b4d37(0x1ba)](getProgressDisplay,_0x97502e[_0x5b4d37(0x160)])),_0x97502e[_0x5b4d37(0x13c)]&&console['log']('\x20\x20\x20\x20\x20Branch:\x20'+_0x97502e['gitBranch']);}throw new Error(_0x40e9dc[_0x5b4d37(0x190)]);}const {selected:_0x29ff14}=await _0x124359['prompt']([{'type':_0x40e9dc['WsvCp'],'name':'selected','message':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','choices':_0x2c4ff6[_0x5b4d37(0x12d)](_0xa7f941=>({'name':_0xa7f941['name']+'\x20('+_0xa7f941['id']+')','value':_0xa7f941['id']}))}]);_0x4ab623=_0x2c4ff6[_0x5b4d37(0x16a)](_0x47da3c=>_0x47da3c['id']===_0x29ff14);}await setActiveFeatureId(_0x4ab623['id']);_0x592ff7&&_0x40e9dc['WwwOV'](_0x592ff7,_0x4ab623[_0x5b4d37(0x13c)])&&(await updateFeature(_0x4ab623['id'],{'gitBranch':_0x592ff7}),console['log'](_0x5b4d37(0x14d)+_0x592ff7));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x4ab623['name']+'\x20('+_0x4ab623['id']+')'),await _0x40e9dc[_0x5b4d37(0x175)](tryStartCurrentSession,_0x4ab623['id']);const _0x560375=await _0x40e9dc[_0x5b4d37(0x164)](getFeature,_0x4ab623['id']),_0x846bb6=process['env']['CLAUDE_SESSION_ID'];_0x846bb6&®isterSession(_0x846bb6,_0x560375['id']),displayFeature(_0x560375,_0x560375['checklistItems']),await _0x40e9dc[_0x5b4d37(0x175)](printFeedbackNudge,_0x560375['id']);}async function printFeedbackNudge(_0x1c1b57){const _0x577d28=_0x1f47f2,_0x5513f2={'tHXEZ':function(_0xb2d9ca,_0x2a5ec4,_0x3c2024){return _0xb2d9ca(_0x2a5ec4,_0x3c2024);},'YLqdV':function(_0x54ff45,_0x3ef93a){return _0x54ff45>_0x3ef93a;}};try{const {items:_0x32cbf9}=await getActionItems(_0x1c1b57);let _0x5536b2=0x0,_0x47d7e4=0x0;for(const _0x3977fb of _0x32cbf9){const _0x51eb0e=await _0x5513f2['tHXEZ'](getItemFeedback,_0x1c1b57,_0x3977fb['id']);_0x51eb0e[_0x577d28(0x1b8)][_0x577d28(0x1a0)]>0x0&&(_0x5536b2+=_0x51eb0e['unaddressedComments'][_0x577d28(0x1a0)],_0x47d7e4++);}_0x5513f2[_0x577d28(0x12c)](_0x5536b2,0x0)&&(console['log'](_0x577d28(0x1ab)+_0x5536b2+_0x577d28(0x11d)+_0x47d7e4+'\x20scenario(s).'),console['log']('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x13231f){const _0x534f25=_0x1f47f2;try{const {sessions:_0x2ab4ab}=await listFeatureSessions(_0x13231f),_0xfc1de1=_0x2ab4ab[_0x534f25(0x16a)](_0x4f39f0=>_0x4f39f0['status']==='ready');_0xfc1de1&&(await startSession(_0x13231f,_0xfc1de1['id']),console[_0x534f25(0x11c)](_0x534f25(0x101)+_0xfc1de1['iteration']));}catch{}}export async function featureReport(_0x362616,_0x54445b){const _0xebd1bf=_0x1f47f2,_0x184979={'AJDhr':_0xebd1bf(0x15d),'fRGBM':function(_0x4816b3,_0x4d90e7,_0x161b84){return _0x4816b3(_0x4d90e7,_0x161b84);},'yJdkN':function(_0xc2b0f3,_0x553c0e,_0x11aff2,_0x210c5){return _0xc2b0f3(_0x553c0e,_0x11aff2,_0x210c5);},'yeblg':function(_0x193ed7){return _0x193ed7();},'TOehz':'reports','OdRCQ':function(_0x462645,_0x4c60fb){return _0x462645(_0x4c60fb);}},_0x86da38=_0x362616||await getActiveFeatureId();if(!_0x86da38)throw new Error(_0xebd1bf(0xfc));console[_0xebd1bf(0x11c)](_0x184979['AJDhr']);const _0x34baea=await _0x184979['fRGBM'](getFeatureReportMarkdown,_0x86da38,{'style':_0x54445b[_0xebd1bf(0x1b2)]}),_0x120f8f=_0x54445b['output']||_0x184979[_0xebd1bf(0x1c2)](join,_0x184979['yeblg'](getRangerDir),_0x184979[_0xebd1bf(0x1a8)],_0x86da38+_0xebd1bf(0x1ac)),_0x478d3b=_0x184979['fRGBM'](join,_0x120f8f,'..');!_0x184979[_0xebd1bf(0x182)](existsSync,_0x478d3b)&&await mkdir(_0x478d3b,{'recursive':!![]}),await _0x184979[_0xebd1bf(0x1c2)](writeFile,_0x120f8f,_0x34baea,'utf-8'),console['log'](_0xebd1bf(0x17f)+_0x120f8f);}export async function featureReportPrDescription(_0x17458b,_0x3807bc){const _0x4cca90=_0x1f47f2,_0x1bc54e={'sbYrW':function(_0x50334c,_0xe1fa12){return _0x50334c(_0xe1fa12);},'HwhVi':function(_0x4c163d,_0x589f55){return _0x4c163d===_0x589f55;},'BvYDb':_0x4cca90(0x1a1),'FxuRx':_0x4cca90(0x14b),'BbUDK':function(_0x4b76e7,_0x261fb0){return _0x4b76e7+_0x261fb0;},'OXaXD':function(_0x56e715,_0xbbc18c,_0x8ca905){return _0x56e715(_0xbbc18c,_0x8ca905);}},_0x190348=_0x17458b||await getActiveFeatureId();if(!_0x190348)throw new Error(_0x4cca90(0xfc));const _0x1cfee3=await _0x1bc54e['sbYrW'](getFeature,_0x190348),_0x427b5c=_0x1cfee3[_0x4cca90(0x16f)]||[],_0x49b69c=getCurrentSessionItems(_0x1cfee3,_0x427b5c);_0x1bc54e['HwhVi'](_0x49b69c[_0x4cca90(0x1a0)],0x0)&&(console['error'](_0x1bc54e[_0x4cca90(0x172)]),process[_0x4cca90(0x12a)](0x1));const _0x2229e1=_0x3807bc[_0x4cca90(0x13a)]??[],_0x58b516=_0x2229e1[_0x4cca90(0x104)](_0x3bc1d3=>!Number['isInteger'](_0x3bc1d3)||_0x3bc1d3<0x1||_0x3bc1d3>_0x49b69c[_0x4cca90(0x1a0)]);if(_0x58b516['length']>0x0){console['error'](_0x4cca90(0x16b)+_0x58b516[_0x4cca90(0x187)](',\x20')),console[_0x4cca90(0x11c)](_0x1bc54e[_0x4cca90(0x11a)]);for(let _0x35f0e7=0x0;_0x35f0e7<_0x49b69c[_0x4cca90(0x1a0)];_0x35f0e7++){console['log']('\x20\x20'+_0x1bc54e['BbUDK'](_0x35f0e7,0x1)+'.\x20'+_0x49b69c[_0x35f0e7]['description']);}process['exit'](0x1);}const _0x2f05b0=new Set(_0x2229e1[_0x4cca90(0x12d)](_0x373591=>_0x373591-0x1)),_0x29d276=_0x49b69c['filter']((_0x51709d,_0x3e6890)=>!_0x2f05b0['has'](_0x3e6890));_0x29d276['length']===0x0&&(console[_0x4cca90(0x18f)](_0x4cca90(0x110)),process[_0x4cca90(0x12a)](0x1));const _0x3c164b=await _0x1bc54e['OXaXD'](getFeatureReportMarkdown,_0x190348,{'itemIds':_0x29d276['map'](_0x46e17b=>_0x46e17b['id'])});process['stdout']['write'](_0x3c164b['trimEnd']()+'\x0a');}export async function featureConcludeSession(_0x5f1e70){const _0x518013=_0x1f47f2,_0x1ea17c={'SPmQx':function(_0x5eaa67){return _0x5eaa67();},'nldXH':function(_0x29fd50,_0x1cb143){return _0x29fd50(_0x1cb143);},'Hcxza':_0x518013(0x144),'HiiKJ':function(_0x332b1c,_0x23f90c){return _0x332b1c===_0x23f90c;},'KsIIB':_0x518013(0x1bb),'hwfbm':_0x518013(0x154)},_0x21ef80=_0x5f1e70||await _0x1ea17c['SPmQx'](getActiveFeatureId);if(!_0x21ef80)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 _0x2fca8d=await _0x1ea17c['nldXH'](getFeature,_0x21ef80);if(!_0x2fca8d[_0x518013(0x198)])throw new Error(_0x1ea17c['Hcxza']);const {sessions:_0x42226f}=await _0x1ea17c[_0x518013(0x12e)](listFeatureSessions,_0x21ef80),_0x88591c=_0x42226f['find'](_0x1cb062=>_0x1cb062['id']===_0x2fca8d[_0x518013(0x198)]);if(!_0x88591c)throw new Error('Current\x20session\x20not\x20found.');if(_0x1ea17c['HiiKJ'](_0x88591c[_0x518013(0x169)],_0x518013(0x199))){console['log'](_0x1ea17c['KsIIB']);return;}if(_0x88591c[_0x518013(0x169)]!==_0x518013(0x176))throw new Error(_0x518013(0x133)+_0x88591c['status']);console['log'](_0x1ea17c[_0x518013(0x19e)]),await concludeSession(_0x21ef80,_0x2fca8d['currentSessionId']),console[_0x518013(0x11c)](_0x518013(0x135)+_0x88591c['iteration']+_0x518013(0x17d)),console[_0x518013(0x11c)](_0x518013(0x122));}export async function featureSessions(_0x4f94cd){const _0x48152f=_0x1f47f2,_0x1dbb35={'TDkaj':function(_0x1984b3){return _0x1984b3();},'GnuxQ':function(_0x433362,_0x555423){return _0x433362(_0x555423);},'nDOYp':'No\x20sessions\x20found.','ovHNl':_0x48152f(0x199),'FUHvE':function(_0x478a9a,_0x17dcb9){return _0x478a9a===_0x17dcb9;}},_0x2716e1=_0x4f94cd||await _0x1dbb35[_0x48152f(0x139)](getActiveFeatureId);if(!_0x2716e1)throw new Error(_0x48152f(0xfc));const _0x286aae=await _0x1dbb35['GnuxQ'](getFeature,_0x2716e1);console[_0x48152f(0x11c)]('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x286aae[_0x48152f(0x191)]+'\x0a');const {sessions:_0x20a296}=await listFeatureSessions(_0x2716e1);if(_0x20a296[_0x48152f(0x1a0)]===0x0){console['log'](_0x1dbb35['nDOYp']);return;}for(const _0x5d8c74 of _0x20a296){const _0x39143a=_0x5d8c74[_0x48152f(0x169)]===_0x1dbb35['ovHNl']?'✅':_0x1dbb35[_0x48152f(0x127)](_0x5d8c74['status'],_0x48152f(0x176))?'🔄':'▶️';console[_0x48152f(0x11c)](_0x39143a+'\x20Session\x20'+_0x5d8c74[_0x48152f(0x19d)]+'\x20('+_0x5d8c74['id']+')'),console['log'](_0x48152f(0x1aa)+_0x5d8c74['status']),console[_0x48152f(0x11c)]('\x20\x20\x20Created:\x20'+new Date(_0x5d8c74[_0x48152f(0x132)])[_0x48152f(0xfe)]()),_0x5d8c74[_0x48152f(0x168)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x5d8c74['completedAt'])[_0x48152f(0xfe)]()),console[_0x48152f(0x11c)]('');}}export async function featureAddScenario(_0x41e099,_0x56545c){const _0x134b47=_0x1f47f2,_0x334a2d={'qpjzg':function(_0x27abb0,_0x46e93c){return _0x27abb0(_0x46e93c);},'XLkgA':function(_0xf8a037,_0x316afc){return _0xf8a037(_0x316afc);},'kIkYI':function(_0x5c8c62,_0x462f08,_0x4755e7){return _0x5c8c62(_0x462f08,_0x4755e7);}},_0x302ceb=_0x56545c||await getActiveFeatureId();if(!_0x302ceb)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 _0x3cebb8=await _0x334a2d[_0x134b47(0x18c)](getFeature,_0x302ceb);if(_0x3cebb8[_0x134b47(0x112)]&&!_0x3cebb8['latestReview']['submittedAt'])throw new Error(_0x134b47(0x165)+_0x3cebb8['dashboardUrl']);await createChecklistItem(_0x302ceb,_0x41e099);const _0x5d5831=await _0x334a2d[_0x134b47(0x147)](getFeature,_0x302ceb);console[_0x134b47(0x11c)](_0x134b47(0x180)),_0x334a2d[_0x134b47(0x140)](displayFeature,_0x5d5831,_0x5d5831[_0x134b47(0x16f)]);}export async function featureEditScenario(_0x5d3e62,_0x4feefc){const _0x431afa=_0x1f47f2,_0x3f3669={'btzgE':_0x431afa(0x149),'xKitQ':'Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','YbNiZ':function(_0x2fb42c,_0x4938f7){return _0x2fb42c(_0x4938f7);},'xUhdX':'\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','acHgw':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','TypXz':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','LZMuW':_0x431afa(0x14b),'sLsAa':function(_0x32c3d6,_0x587a36){return _0x32c3d6<_0x587a36;},'LZTaQ':function(_0x1752fd,_0x6490db){return _0x1752fd+_0x6490db;},'UUItz':function(_0x2d3d0b,_0x10a52a){return _0x2d3d0b<_0x10a52a;},'HmuPS':function(_0x492345,_0x50dd54){return _0x492345>=_0x50dd54;},'MRvLt':function(_0x20367f,_0x457053){return _0x20367f(_0x457053);}},_0x413ea3=_0x4feefc['id']||await getActiveFeatureId();!_0x413ea3&&(console[_0x431afa(0x18f)](_0x3f3669[_0x431afa(0x1b4)]),console['error'](_0x3f3669[_0x431afa(0x13b)]),process['exit'](0x1));const _0x285453=await _0x3f3669['YbNiZ'](getFeature,_0x413ea3);_0x285453['latestReview']&&!_0x285453[_0x431afa(0x112)][_0x431afa(0x116)]&&(console[_0x431afa(0x18f)](_0x3f3669['xUhdX']),console[_0x431afa(0x18f)](_0x431afa(0x10c)),console['error']('\x20\x20'+_0x285453['dashboardUrl']),process[_0x431afa(0x12a)](0x1));const _0x176450=_0x285453['checklistItems']||[];_0x176450[_0x431afa(0x1a0)]===0x0&&(console['error'](_0x3f3669[_0x431afa(0x166)]),process['exit'](0x1));if(_0x4feefc['scenario']===undefined){console['error'](_0x3f3669[_0x431afa(0x193)]),console[_0x431afa(0x11c)](_0x3f3669['LZMuW']);for(let _0x2d0262=0x0;_0x3f3669['sLsAa'](_0x2d0262,_0x176450[_0x431afa(0x1a0)]);_0x2d0262++){console['log']('\x20\x20'+_0x3f3669[_0x431afa(0x19f)](_0x2d0262,0x1)+'.\x20'+_0x176450[_0x2d0262]['description']);}process['exit'](0x1);}const _0x79586=_0x4feefc['scenario']-0x1;if(_0x3f3669[_0x431afa(0x11f)](_0x79586,0x0)||_0x3f3669[_0x431afa(0x107)](_0x79586,_0x176450[_0x431afa(0x1a0)])){console[_0x431afa(0x18f)]('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x4feefc['scenario']+'.\x20Feature\x20review\x20has\x20'+_0x176450[_0x431afa(0x1a0)]+_0x431afa(0x113)),console[_0x431afa(0x11c)](_0x431afa(0x14b));for(let _0xb1b16c=0x0;_0xb1b16c<_0x176450[_0x431afa(0x1a0)];_0xb1b16c++){console[_0x431afa(0x11c)]('\x20\x20'+_0x3f3669[_0x431afa(0x19f)](_0xb1b16c,0x1)+'.\x20'+_0x176450[_0xb1b16c][_0x431afa(0x124)]);}process[_0x431afa(0x12a)](0x1);}const _0x42e099=_0x176450[_0x79586];await updateChecklistItem(_0x413ea3,_0x42e099['id'],{'description':_0x5d3e62});const _0xa95896=await _0x3f3669[_0x431afa(0x171)](getFeature,_0x413ea3);console[_0x431afa(0x11c)](_0x431afa(0x131)),displayFeature(_0xa95896,_0xa95896['checklistItems']);}async function downloadFeedbackImage(_0x28ab34,_0x243f0f){const _0x2b0ed4=_0x1f47f2,_0x54266c={'PvHYg':function(_0xc5097c,_0x285e2c,_0x431dff){return _0xc5097c(_0x285e2c,_0x431dff);},'Gliyw':function(_0x50801c){return _0x50801c();},'yosdr':function(_0x8f58bc,_0x44b44e){return _0x8f58bc(_0x44b44e);}};try{const _0x16afe2=_0x54266c['PvHYg'](join,_0x54266c['Gliyw'](getRangerDir),_0x2b0ed4(0x173));await _0x54266c['PvHYg'](mkdir,_0x16afe2,{'recursive':!![]});const _0xcbf5fd=join(_0x16afe2,_0x2b0ed4(0x174)+_0x243f0f+_0x2b0ed4(0x19a)),_0x19adeb=await _0x54266c[_0x2b0ed4(0x19b)](fetch,_0x28ab34);if(!_0x19adeb['ok'])return null;const _0x64a5de=Buffer['from'](await _0x19adeb['arrayBuffer']());return await writeFile(_0xcbf5fd,_0x64a5de),_0xcbf5fd;}catch{return null;}}export async function featureGetReview(_0x59abb0){const _0x30dde2=_0x1f47f2,_0x44bb02={'FOWuw':function(_0x29f4c3){return _0x29f4c3();},'iZxJj':_0x30dde2(0x179),'wngjX':function(_0x2d87d9,_0xe4f32f){return _0x2d87d9(_0xe4f32f);},'KTCkZ':function(_0x59e696,_0x32f691){return _0x59e696===_0x32f691;},'zqZuc':_0x30dde2(0x111),'MSAkV':function(_0x222f47,_0xbcec14,_0x33fd14){return _0x222f47(_0xbcec14,_0x33fd14);},'qJmZQ':function(_0x6aed,_0x131de6){return _0x6aed>_0x131de6;},'IVdaH':_0x30dde2(0x16e),'CNhAI':'point','ZVaaK':function(_0x56e5b8,_0xdaa6ac){return _0x56e5b8+_0xdaa6ac;}},_0x1f5329=_0x59abb0||await _0x44bb02['FOWuw'](getActiveFeatureId);if(!_0x1f5329)throw new Error(_0x44bb02['iZxJj']);const _0x576c67=await getFeature(_0x1f5329),{items:_0x46fb58}=await _0x44bb02[_0x30dde2(0x14e)](getActionItems,_0x1f5329);console['log']('\x0a📋\x20Feedback\x20for:\x20'+_0x576c67[_0x30dde2(0x191)]+'\x20('+_0x576c67['id']+')\x0a');if(_0x44bb02['KTCkZ'](_0x46fb58['length'],0x0)){console[_0x30dde2(0x11c)](_0x44bb02['zqZuc']);return;}for(let _0x3eec9c=0x0;_0x3eec9c<_0x46fb58[_0x30dde2(0x1a0)];_0x3eec9c++){const _0x376813=_0x46fb58[_0x3eec9c],_0x2217e1=_0x376813['version']>0x1?'\x20(v'+_0x376813[_0x30dde2(0x18d)]+')':'',_0x2a4ba2=await _0x44bb02[_0x30dde2(0x192)](getItemFeedback,_0x1f5329,_0x376813['id']);if(_0x44bb02['qJmZQ'](_0x2a4ba2[_0x30dde2(0x1b8)][_0x30dde2(0x1a0)],0x0)){console['log'](_0x30dde2(0x1b1)+(_0x3eec9c+0x1)+':\x20\x22'+_0x376813[_0x30dde2(0x124)]+'\x22'+_0x2217e1+_0x30dde2(0x161)+_0x2a4ba2['unaddressedComments']['length']+'\x20unaddressed\x20comment(s)');for(const _0x30a805 of _0x2a4ba2['unaddressedComments']){const _0x4cb25f=new Date(_0x30a805['createdAt'])[_0x30dde2(0x16c)](_0x30dde2(0x1a4),{'month':_0x44bb02[_0x30dde2(0x118)],'day':'numeric'}),_0x2d78d5=_0x30a805['authorName']||_0x30a805['authorEmail']||'Unknown';console['log']('\x20\x20💬\x20'+_0x2d78d5+'\x20('+_0x4cb25f+_0x30dde2(0x100)+_0x30a805['content']+'\x22');if(_0x30a805['assetUrl']){const _0x8994f2=await downloadFeedbackImage(_0x30a805['assetUrl'],_0x30a805['id']);_0x8994f2&&console['log'](_0x30dde2(0x103)+_0x8994f2);}if(_0x30a805[_0x30dde2(0x162)]){const _0x20b3f5=_0x30a805['spatial'][_0x30dde2(0x138)];_0x30a805['spatial'][_0x30dde2(0x1a5)]===_0x44bb02[_0x30dde2(0x1c0)]&&_0x20b3f5['length']>=0x2?console[_0x30dde2(0x11c)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x20b3f5[0x0][_0x30dde2(0x108)](0x2)+',\x20'+_0x20b3f5[0x1][_0x30dde2(0x108)](0x2)+')'):console['log'](_0x30dde2(0x156)+_0x30a805[_0x30dde2(0x162)]['type']+_0x30dde2(0x1b0)+_0x20b3f5[_0x30dde2(0x12d)](_0x37185d=>_0x37185d['toFixed'](0x2))['join'](',\x20')+']');}}if(_0x2a4ba2['canonicalFlow']){console['log']('\x20\x20Expected\x20flow:');for(const _0x21bff0 of _0x2a4ba2[_0x30dde2(0x1b5)][_0x30dde2(0x186)]('\x0a')){console['log']('\x20\x20\x20\x20'+_0x21bff0);}}}else console[_0x30dde2(0x11c)](_0x30dde2(0x1b1)+_0x44bb02['ZVaaK'](_0x3eec9c,0x1)+':\x20\x22'+_0x376813['description']+'\x22'+_0x2217e1+_0x30dde2(0x136)),console[_0x30dde2(0x11c)]('\x20\x20✅\x20No\x20feedback\x20to\x20address');console['log']('');}}export async function featureDelete(_0x1138c5){const _0x514048=_0x1f47f2,_0x1ca2b0={'ammax':function(_0x30ab4f){return _0x30ab4f();},'eQugD':_0x514048(0x179),'OsUFq':function(_0x326221,_0x5231ec){return _0x326221(_0x5231ec);},'FaQSm':'\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20'},_0x157f13=_0x1138c5||await _0x1ca2b0[_0x514048(0x1af)](getActiveFeatureId);if(!_0x157f13)throw new Error(_0x1ca2b0['eQugD']);const _0x9973b1=await getFeature(_0x157f13);await _0x1ca2b0['OsUFq'](softDeleteFeature,_0x157f13),console[_0x514048(0x11c)]('\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20'+_0x9973b1['name']+'\x20('+_0x157f13+')'),console[_0x514048(0x11c)](_0x1ca2b0[_0x514048(0x1b7)]+_0x157f13);}export async function featureRestore(_0x58c5ba){const _0x1e1fa8=_0x1f47f2,_0x311ebd={'gnteX':function(_0x29299b,_0x8fdeca){return _0x29299b(_0x8fdeca);},'FHjHn':function(_0x277d7d,_0x4f97f4,_0x245f21){return _0x277d7d(_0x4f97f4,_0x245f21);}};await restoreFeature(_0x58c5ba);const _0x2d5162=await _0x311ebd['gnteX'](getFeature,_0x58c5ba);console[_0x1e1fa8(0x11c)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x2d5162[_0x1e1fa8(0x191)]+'\x20('+_0x58c5ba+')'),_0x311ebd[_0x1e1fa8(0x183)](displayFeature,_0x2d5162,_0x2d5162[_0x1e1fa8(0x16f)]);}function _0x30e4(){const _0x3bd3cb=['map','nldXH','\x20[has\x20reviewer\x20feedback]','push','\x0a✅\x20Scenario\x20updated','createdAt','Cannot\x20conclude\x20session\x20with\x20status:\x20','dashboardUrl','\x0a✅\x20Session\x20','\x20—\x20no\x20comments','canceledReason','coordinates','TDkaj','excludeScenarios','xKitQ','gitBranch','\x20\x20\x20\x20\x20\x20Incomplete:\x20','blocked','git\x20rev-parse\x20--abbrev-ref\x20HEAD','kIkYI','scenarios','EognC','offset','No\x20active\x20session\x20for\x20this\x20feature\x20review.','HmgFS','17342TvtbYB','XLkgA','verification_in_progress','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','git\x20remote\x20get-url\x20origin','\x0aAvailable\x20scenarios:','stdin','\x20\x20\x20Updated\x20branch\x20to:\x20','wngjX','msffk','lmeYf','8OIaqAe','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','closed','\x0aConcluding\x20session...','4604uuEkuW','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','QkrEg','BhrPt','2510ywonIl','Next\x20page:\x20ranger\x20list\x20--offset\x20','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','repeat','\x0aGenerating\x20report...','11263959fHbjPr','env','stats','\x20—\x20','spatial','IjSCr','UeXCb','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','acHgw','\x20\x20\x20Branch:\x20','completedAt','status','find','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','toLocaleDateString','\x1b[0m','short','checklistItems','ExnAr','MRvLt','BvYDb','feedback-images','comment_','mdgcV','in_progress','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','XpOJq','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','CBrSY','incompleteReason','totalCount','\x20concluded.','currentBranch','\x0a✅\x20Report\x20generated:\x20','\x0a✅\x20Scenario\x20added','oxzXc','OdRCQ','FHjHn','\x20\x20\x20ID:\x20','round','split','join','tSHrI','raaFh','\x20feature\x20review(s)\x20found','\x20incomplete','qpjzg','version','\x0a✅\x20Resumed\x20feature\x20review:\x20','error','pKEdV','name','MSAkV','TypXz','active-feature.txt','mbtxX','46xEnkvE','\x20\x20\x20\x20\x20\x20Approved','currentSessionId','completed','.png','yosdr','45265seYTmm','iteration','hwfbm','LZTaQ','length','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','aBUSi','KHrFs','en-US','type','blockedReason','\x20\x20\x20Completed:\x20','TOehz','FORbq','\x20\x20\x20Status:\x20','\x0a⚠️\x20\x20','.md','approved','\x20--current-branch','ammax','\x20at\x20[','Scenario\x20','style','mTfAu','btzgE','canonicalFlow','trim','FaQSm','unaddressedComments','1780035nEuqSn','gscFv','\x0a✅\x20Session\x20is\x20already\x20completed.','2060yQHOTB','items','any','nUgxq','CNhAI','RXrfX','yJdkN','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','incomplete','toLocaleString','cVdIw','):\x20\x22','\x20\x20\x20▶️\x20Started\x20session\x20','iNYaZ','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','filter','ZtEQO','IvAMv','HmuPS','toFixed','sessionId','\x20\x20\x20Created:\x20','Not\x20in\x20a\x20git\x20repository.','Please\x20finish\x20your\x20review\x20first:','isTTY','\x20\x20\x20\x20\x20Progress:\x20','\x0a✅\x20Feature\x20review\x20created:\x20','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','No\x20scenarios\x20found.','latestReview','\x20scenarios.','LPbEx','\x20\x20\x20\x20\x20\x20Blocked:\x20','submittedAt','\x20blocked','IVdaH','pendingItems','FxuRx','includeDeleted','log','\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20','12625164Lnvhkh','UUItz','position','PnBru','\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.','pipe','description','ExhsR','YbhbX','FUHvE','replace','8473860lPNMwJ','exit','verifiedItems','YLqdV'];_0x30e4=function(){return _0x3bd3cb;};return _0x30e4();}
|
|
1
|
+
const _0x3ab331=_0x3119;(function(_0x344f0c,_0x5e853d){const _0x4831eb=_0x3119,_0x3ef3ad=_0x344f0c();while(!![]){try{const _0x193a8d=parseInt(_0x4831eb(0xbe))/0x1*(parseInt(_0x4831eb(0x117))/0x2)+parseInt(_0x4831eb(0x110))/0x3*(parseInt(_0x4831eb(0xe9))/0x4)+-parseInt(_0x4831eb(0x129))/0x5+parseInt(_0x4831eb(0xaf))/0x6+parseInt(_0x4831eb(0x122))/0x7+parseInt(_0x4831eb(0xa3))/0x8*(-parseInt(_0x4831eb(0x145))/0x9)+-parseInt(_0x4831eb(0x131))/0xa;if(_0x193a8d===_0x5e853d)break;else _0x3ef3ad['push'](_0x3ef3ad['shift']());}catch(_0xe9f815){_0x3ef3ad['push'](_0x3ef3ad['shift']());}}}(_0x54a8,0xbfcd0));import{readFile,writeFile,mkdir}from'fs/promises';function _0x54a8(){const _0x24f483=['xrvnH','filter','push','\x20scenario(s).','tJrXt','Iabeq','latestReview','join','fOnKo','unaddressedComments','closed','\x20\x20\x20\x20\x20\x20Approved','completed','\x20\x20\x20Updated\x20branch\x20to:\x20','limit','canceledReason','completedAt','AUfUU','pCsDA','\x20\x20\x20\x20\x20\x20Cancelled:\x20','isInteger','NHLaI','includeDeleted','exit','incompleteReason','2340939PwWmUp','en-US','toFixed','dnGvT','NYNpq','write','approved','7610NutrIh','checklistItems','scenario','qeCOK','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','Scenario\x20','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','assetUrl','wxYIM','\x20Session\x20','5102041bhKWEp','VfMuS','AoVUc','\x0aAvailable\x20scenarios:','verified','\x0a✅\x20Resumed\x20feature\x20review:\x20','stats','2368900VWIdej','bRYxc','\x20of\x20','JGWKx','ready','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','ZFJhx','items','24242310BFqBzo','EhYai','\x0a✅\x20Session\x20','\x0a✅\x20Restored\x20feature\x20review:\x20','HlUjE','trim','\x20\x20\x20Repository:\x20','mnovU','name','xSUmk','\x1b[0m','WtjEY','incomplete','spatial','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','BIOym','GrRSw','log','dashboardUrl','Current\x20session\x20not\x20found.','63KVUWFx','FqPzj','map','AOyAc','Please\x20finish\x20your\x20review\x20first:','kXKfN','FIOXO','DRljW','split','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','\x20\x20Expected\x20flow:','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','\x20(v','ekRsw','No\x20sessions\x20found.','xZbqi','find','isTTY','142808IwEcAe','status','utf-8','terminalReason','\x20\x20\x20\x20\x20\x20Incomplete:\x20','in_progress','\x0a\x20\x20\x20Scenarios:','arrayBuffer','QKDIz','\x20\x20\x20','\x20\x20\x20Progress:\x20','feedback-images','9091740VhTbaL','RQbkL','\x20\x20\x20\x20','):\x20\x22','\x20--include-deleted','incompleteItems','\x20--current-branch','description','numeric','ctbch','\x0a✅\x20Scenario\x20updated','length','.\x20Feature\x20review\x20has\x20','type','submittedAt','1YOTVId','currentSessionId','HqvAI','\x20at\x20[','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','\x20\x20\x20\x20\x20Progress:\x20','sort','2|0|1|5|4|3','FYasT','SgZkQ','ZGZNU','bLOVm','excludeScenarios','blockedReason','short','gitRepoUrl','toLocaleString','NUdJf','psuDe','pipe','\x20\x20\x20Created:\x20','OJSGw','HucdW','active-feature.txt','env','yoUDM','tjMgW','position','YoqUA','GtgbT','output','blocked','CLAUDE_SESSION_ID','BCoql','version','stdin','stdout','comment_','\x20\x20\x20Branch:\x20','gJPeo','AcUNi','Cannot\x20conclude\x20session\x20with\x20status:\x20','gitBranch','8bXlXug','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.','replace','PkPqd','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','blockedItems','kTrFm','error','scenarios','PVbVQ','totalCount','\x20\x20\x20Completed:\x20','repeat'];_0x54a8=function(){return _0x24f483;};return _0x54a8();}import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x24c657 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.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=_0x3ab331(0xd5),bold=_0x2bdca5=>'\x1b[1m'+_0x2bdca5+_0x3ab331(0x13b);function getGitRepoUrl(){const _0x36ee89=_0x3ab331,_0x57ddd9={'AOyAc':'utf-8','EDLoy':_0x36ee89(0xd1)};try{const _0x29cbd0=execSync('git\x20remote\x20get-url\x20origin',{'encoding':_0x57ddd9[_0x36ee89(0x148)],'stdio':[_0x57ddd9['EDLoy'],'pipe','pipe']})['trim']();return _0x29cbd0['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')[_0x36ee89(0xec)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x188320=_0x3ab331,_0xce28fd={'HlviY':function(_0xfd9dce,_0x398fbf,_0x4e37ce){return _0xfd9dce(_0x398fbf,_0x4e37ce);},'tjMgW':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','AoVUc':'pipe'};try{return _0xce28fd['HlviY'](execSync,_0xce28fd[_0x188320(0xd8)],{'encoding':_0x188320(0xa5),'stdio':[_0xce28fd[_0x188320(0x124)],_0xce28fd[_0x188320(0x124)],'pipe']})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x100f29=_0x3ab331,_0x3677b0={'RQbkL':function(_0x377d2f,_0x513b98,_0x1bc625){return _0x377d2f(_0x513b98,_0x1bc625);},'ZFJhx':function(_0x3dd623){return _0x3dd623();},'UVuld':'utf-8'},_0x244f1a=_0x3677b0['RQbkL'](join,_0x3677b0[_0x100f29(0x12f)](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x244f1a))return null;try{const _0x392ef8=await _0x3677b0[_0x100f29(0xb0)](readFile,_0x244f1a,_0x3677b0['UVuld']);return _0x392ef8[_0x100f29(0x136)]()||null;}catch{return null;}}async function setActiveFeatureId(_0x3c3df8){const _0x38f09f=_0x3ab331,_0x5079db={'AUfUU':function(_0x5444ba,_0x47aaa5){return _0x5444ba(_0x47aaa5);},'dmODR':'utf-8'},_0x5a718a=getRangerDir(),_0xda6be2=join(_0x5a718a,ACTIVE_FEATURE_FILE);!_0x5079db[_0x38f09f(0x108)](existsSync,_0x5a718a)&&await mkdir(_0x5a718a,{'recursive':!![]}),await writeFile(_0xda6be2,_0x3c3df8,_0x5079db['dmODR']);}function getProgressDisplay(_0x267620){const _0x41954f=_0x3ab331,_0x2c6c73={'AGydJ':function(_0xfba2bc,_0x413c10){return _0xfba2bc===_0x413c10;},'FIOXO':function(_0x509bd1,_0x371db7){return _0x509bd1*_0x371db7;},'AwQUA':function(_0x482998,_0x42b972){return _0x482998/_0x42b972;},'OJSGw':function(_0x366ba4,_0x470da3){return _0x366ba4>_0x470da3;},'WSWLz':function(_0x39aa9a,_0x562e88){return _0x39aa9a>_0x562e88;}},_0xaaff1f=_0x267620['verifiedItems']||0x0,_0xcfcc69=_0x267620['verificationInProgressItems']||0x0,_0x112aa3=_0x267620[_0x41954f(0xef)]||0x0,_0x2fa34f=_0x267620[_0x41954f(0xb4)]||0x0,_0x4b5000=_0x267620['pendingItems']||0x0,_0x34d3a5=_0xaaff1f+_0xcfcc69+_0x112aa3+_0x2fa34f+_0x4b5000;if(_0x2c6c73['AGydJ'](_0x34d3a5,0x0))return'-';const _0x25004a=0xa,_0x2ba206=Math['round'](_0x2c6c73[_0x41954f(0x14b)](_0x2c6c73['AwQUA'](_0xaaff1f,_0x34d3a5),_0x25004a)),_0xf638de='█'[_0x41954f(0xf6)](_0x2ba206)+'░'[_0x41954f(0xf6)](_0x25004a-_0x2ba206),_0x3d8a48=[];if(_0x112aa3>0x0)_0x3d8a48['push'](_0x112aa3+'\x20blocked');if(_0x2c6c73['OJSGw'](_0x2fa34f,0x0))_0x3d8a48['push'](_0x2fa34f+'\x20incomplete');if(_0x2c6c73['WSWLz'](_0xcfcc69,0x0))_0x3d8a48[_0x41954f(0xf9)](_0xcfcc69+'\x20in\x20progress');const _0x3d3138=_0x2c6c73[_0x41954f(0xd3)](_0x3d8a48[_0x41954f(0xba)],0x0)?'\x20('+_0x3d8a48['join'](',\x20')+')':'';return _0xf638de+'\x20'+_0xaaff1f+'/'+_0x34d3a5+'\x20verified'+_0x3d3138;}function getCurrentSessionItems(_0x13efd2,_0x4117f1){const _0x29c6a2=_0x3ab331;if(!_0x13efd2[_0x29c6a2(0xbf)])return _0x4117f1[_0x29c6a2(0xf8)](_0x2956ce=>!_0x2956ce['sessionId'])[_0x29c6a2(0xc4)]((_0x17142c,_0x1550f2)=>_0x17142c[_0x29c6a2(0xd9)]-_0x1550f2[_0x29c6a2(0xd9)]);return _0x4117f1['filter'](_0x53691f=>_0x53691f['sessionId']===_0x13efd2['currentSessionId']||!_0x53691f['sessionId'])['sort']((_0x49d174,_0x190afa)=>_0x49d174['position']-_0x190afa['position']);}function displayFeature(_0x3da905,_0x17b11e){const _0x2ca17a=_0x3ab331,_0x4854d3={'yPzeW':function(_0x314665,_0x1eaa68){return _0x314665<_0x1eaa68;},'grrAo':function(_0x4ca862,_0x22630b){return _0x4ca862===_0x22630b;},'PkPqd':_0x2ca17a(0x101),'FqPzj':function(_0x114608,_0x212d04){return _0x114608===_0x212d04;},'GtgbT':function(_0x17b8bf,_0x5c5f94){return _0x17b8bf===_0x5c5f94;},'xZbqi':_0x2ca17a(0x13d),'Betho':function(_0x203f46,_0x105a4c){return _0x203f46>_0x105a4c;},'MMJKQ':function(_0x1f53ca,_0x35f5d4){return _0x1f53ca>_0x35f5d4;},'oBOpE':function(_0x22cf61,_0xe36e6e){return _0x22cf61+_0xe36e6e;},'fczoP':_0x2ca17a(0xdd),'FYasT':_0x2ca17a(0x116),'gJPeo':function(_0x1ab25e,_0x296e6c){return _0x1ab25e===_0x296e6c;}};console['log']('\x0a'+_0x3da905['name']+'\x20('+_0x3da905[_0x2ca17a(0x143)]+')');_0x3da905[_0x2ca17a(0x128)]&&console[_0x2ca17a(0x142)]('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x3da905['stats']));_0x3da905['description']&&console[_0x2ca17a(0x142)]('\x20\x20\x20Description:\x20'+_0x3da905['description']);_0x3da905[_0x2ca17a(0xcd)]&&console['log'](_0x2ca17a(0x137)+_0x3da905[_0x2ca17a(0xcd)]);_0x3da905[_0x2ca17a(0xe8)]&&console['log'](_0x2ca17a(0xe4)+_0x3da905[_0x2ca17a(0xe8)]);console['log']('\x20\x20\x20Created:\x20'+new Date(_0x3da905['createdAt'])[_0x2ca17a(0xce)]());_0x3da905[_0x2ca17a(0x107)]&&console['log'](_0x2ca17a(0xf5)+new Date(_0x3da905['completedAt'])['toLocaleString']());if(_0x17b11e&&_0x17b11e[_0x2ca17a(0xba)]>0x0){console['log'](_0x2ca17a(0xa9));for(let _0x385fae=0x0;_0x4854d3['yPzeW'](_0x385fae,_0x17b11e[_0x2ca17a(0xba)]);_0x385fae++){const _0x52f35c=_0x17b11e[_0x385fae];let _0x16feb4;if(_0x4854d3['grrAo'](_0x52f35c[_0x2ca17a(0xa4)],_0x4854d3['PkPqd'])&&_0x4854d3[_0x2ca17a(0x146)](_0x52f35c['terminalReason'],'approved'))_0x16feb4='✅';else{if(_0x52f35c['status']===_0x2ca17a(0x126))_0x16feb4='🟢';else{if(_0x4854d3['GtgbT'](_0x52f35c[_0x2ca17a(0xa4)],_0x4854d3[_0x2ca17a(0xa0)]))_0x16feb4='🟠';else{if(_0x52f35c['status']==='blocked')_0x16feb4='🛑';else{if(_0x4854d3['grrAo'](_0x52f35c['status'],'closed'))_0x16feb4='⛔';else _0x4854d3[_0x2ca17a(0xdb)](_0x52f35c[_0x2ca17a(0xa4)],'verification_in_progress')?_0x16feb4='⏳':_0x16feb4='⬜';}}}}const _0x5dacc7=_0x4854d3['Betho'](_0x52f35c['version'],0x1)?'\x20(v'+_0x52f35c[_0x2ca17a(0xe0)]+')':'',_0x18571d=_0x4854d3['MMJKQ'](_0x52f35c[_0x2ca17a(0xe0)],0x1)&&_0x52f35c['parentItemId']&&_0x52f35c[_0x2ca17a(0xa4)]!==_0x4854d3[_0x2ca17a(0xed)]&&_0x52f35c['status']!==_0x2ca17a(0x126)?'\x20[has\x20reviewer\x20feedback]':'';console[_0x2ca17a(0x142)](_0x2ca17a(0xac)+_0x4854d3['oBOpE'](_0x385fae,0x1)+'.\x20'+_0x16feb4+'\x20'+_0x52f35c[_0x2ca17a(0xb6)]+_0x5dacc7+_0x18571d);_0x52f35c[_0x2ca17a(0xa4)]===_0x4854d3['fczoP']&&_0x52f35c['blockedReason']&&console['log']('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x52f35c[_0x2ca17a(0xcb)]);_0x4854d3['FqPzj'](_0x52f35c[_0x2ca17a(0xa4)],_0x4854d3['xZbqi'])&&_0x52f35c[_0x2ca17a(0x10f)]&&console['log'](_0x2ca17a(0xa7)+_0x52f35c[_0x2ca17a(0x10f)]);if(_0x52f35c[_0x2ca17a(0xa4)]===_0x4854d3[_0x2ca17a(0xed)]&&_0x52f35c[_0x2ca17a(0xa6)]===_0x4854d3[_0x2ca17a(0xc6)])console[_0x2ca17a(0x142)](_0x2ca17a(0x102));else _0x4854d3[_0x2ca17a(0xe5)](_0x52f35c['status'],_0x2ca17a(0x101))&&_0x52f35c[_0x2ca17a(0x106)]&&console['log'](_0x2ca17a(0x10a)+_0x52f35c['canceledReason']);}}}export async function featureCreate(_0x47b55e,_0x1fd0c9){const _0x4c9815=_0x3ab331,_0xb5552={'rFmsi':function(_0x16f2c1){return _0x16f2c1();},'xFvUi':'\x0aCreating\x20feature\x20review...','NHLaI':function(_0xe43346,_0x1f37d4){return _0xe43346(_0x1f37d4);},'jSmZx':function(_0x3583bd,_0x456f9e){return _0x3583bd(_0x456f9e);},'bLOVm':function(_0x2eeff1,_0xffd87b,_0x1082d2){return _0x2eeff1(_0xffd87b,_0x1082d2);}},{envNames:_0xf4cc08}=await _0xb5552['rFmsi'](getEnvNames);_0xf4cc08['length']===0x0&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x1b17cc=>bold(_0x1b17cc)));const _0x47081f=_0x1fd0c9[_0x4c9815(0xf2)]?_0x1fd0c9[_0x4c9815(0xf2)]['map'](_0x28e3ff=>_0x28e3ff['trim']()):[],_0x5c3f0b=getGitRepoUrl(),_0x42cd56=getGitBranch();console[_0x4c9815(0x142)](_0xb5552['xFvUi']);const _0x161487=await createFeature({'name':_0x47b55e,'description':_0x1fd0c9['description'],'checklist':_0x47081f,'gitRepoUrl':_0x5c3f0b,'gitBranch':_0x42cd56});await _0xb5552[_0x4c9815(0x10c)](setActiveFeatureId,_0x161487['id']),await _0xb5552['jSmZx'](tryStartCurrentSession,_0x161487['id']);const _0x529613=process['env'][_0x4c9815(0xde)];_0x529613&&_0xb5552['bLOVm'](registerSession,_0x529613,_0x161487['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x161487['id']),_0xb5552[_0x4c9815(0xc9)](displayFeature,_0x161487,_0x161487['checklistItems']),console['log'](_0x4c9815(0xea));}export async function featureList(_0x3d4d26){const _0x411b2a=_0x3ab331,_0x3caf26={'GrRSw':function(_0x57aae7){return _0x57aae7();},'QEuUw':'\x0aNo\x20feature\x20reviews\x20found.','fOnKo':function(_0x28f0b0,_0x3f2724){return _0x28f0b0>_0x3f2724;},'KISIU':_0x411b2a(0xc5),'BIOym':function(_0x4d7c4e,_0x3ca0aa){return _0x4d7c4e(_0x3ca0aa);},'rhWAd':function(_0x6d99b2,_0x5197e5){return _0x6d99b2+_0x5197e5;},'VfMuS':function(_0x210bac,_0x1517fa){return _0x210bac<_0x1517fa;},'ctbch':_0x411b2a(0xb5)},_0x1564a1={'limit':_0x3d4d26[_0x411b2a(0x105)]??0xa,'offset':_0x3d4d26['offset']??0x0,'includeDeleted':_0x3d4d26[_0x411b2a(0x10d)]};_0x3d4d26['currentBranch']&&(_0x1564a1['gitRepoUrl']=getGitRepoUrl(),_0x1564a1['gitBranch']=_0x3caf26[_0x411b2a(0x141)](getGitBranch));const _0x2ac9da=await listFeatures(_0x1564a1);if(_0x2ac9da['items']['length']===0x0){console['log'](_0x3caf26['QEuUw']);return;}const _0x56de45=_0x3caf26[_0x411b2a(0xff)](_0x2ac9da['totalCount'],_0x2ac9da['items'][_0x411b2a(0xba)])?'Showing\x20'+_0x2ac9da['items'][_0x411b2a(0xba)]+_0x411b2a(0x12b)+_0x2ac9da[_0x411b2a(0xf4)]:_0x2ac9da['totalCount']+'\x20feature\x20review(s)\x20found';console[_0x411b2a(0x142)]('\x0a'+_0x56de45+':\x0a');for(const _0x30c948 of _0x2ac9da['items']){const _0x5b19d3=_0x3caf26['KISIU'][_0x411b2a(0x14d)]('|');let _0x37220b=0x0;while(!![]){switch(_0x5b19d3[_0x37220b++]){case'0':console[_0x411b2a(0x142)]('\x20\x20\x20ID:\x20'+_0x30c948['id']);continue;case'1':_0x30c948[_0x411b2a(0x128)]&&console[_0x411b2a(0x142)](_0x411b2a(0xad)+_0x3caf26[_0x411b2a(0x140)](getProgressDisplay,_0x30c948[_0x411b2a(0x128)]));continue;case'2':console['log'](''+_0x30c948[_0x411b2a(0x139)]);continue;case'3':console[_0x411b2a(0x142)]('');continue;case'4':console[_0x411b2a(0x142)]('\x20\x20\x20Created:\x20'+new Date(_0x30c948['createdAt'])['toLocaleDateString']());continue;case'5':_0x30c948[_0x411b2a(0xe8)]&&console['log'](_0x411b2a(0xe4)+_0x30c948['gitBranch']);continue;}break;}}const _0x2af51f=_0x1564a1['limit']??0xa,_0x1df6ba=_0x3caf26['rhWAd'](_0x1564a1['offset']??0x0,_0x2ac9da[_0x411b2a(0x130)][_0x411b2a(0xba)]);if(_0x3caf26[_0x411b2a(0x123)](_0x1df6ba,_0x2ac9da[_0x411b2a(0xf4)])){const _0x191da5=_0x2af51f!==0xa?'\x20--limit\x20'+_0x2af51f:'',_0x3089e=_0x3d4d26['currentBranch']?_0x3caf26[_0x411b2a(0xb8)]:'',_0x510f18=_0x3d4d26['includeDeleted']?_0x411b2a(0xb3):'';console['log']('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x1df6ba+_0x191da5+_0x3089e+_0x510f18);}}export async function featureShow(_0x2ae4fe){const _0xc8f94d={'Pblve':function(_0x5bf6a9){return _0x5bf6a9();},'nVLhW':function(_0x1b53c,_0x47c73b){return _0x1b53c(_0x47c73b);}},_0x4c140d=_0x2ae4fe||await _0xc8f94d['Pblve'](getActiveFeatureId);if(!_0x4c140d)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 _0x495819=await _0xc8f94d['nVLhW'](getFeature,_0x4c140d);displayFeature(_0x495819,_0x495819['checklistItems']);}export async function featureResume(_0x5cd41e){const _0x1cf7ae=_0x3ab331,_0xf22736={'wxYIM':function(_0x2997c9,_0x284597){return _0x2997c9(_0x284597);},'SgZkQ':function(_0x227c0f,_0x2c15c9){return _0x227c0f!==_0x2c15c9;},'HlUjE':function(_0x121a25,_0x501206,_0x1ec0b9){return _0x121a25(_0x501206,_0x1ec0b9);},'HucdW':function(_0x3aa8cf,_0x456339){return _0x3aa8cf(_0x456339);},'fAipr':function(_0x35ac48,_0x257e52){return _0x35ac48&&_0x257e52;},'xcbUD':'Not\x20in\x20a\x20git\x20repository.','JGWKx':'any','cXUAx':'Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','sCNEZ':_0x1cf7ae(0x14f),'AcUNi':function(_0x4eaabb,_0x38f518){return _0x4eaabb(_0x38f518);},'yoUDM':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','OYSvH':'list','bRYxc':'selected','BCoql':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:'};if(_0x5cd41e){const _0xac24fb=await _0xf22736[_0x1cf7ae(0x120)](getFeature,_0x5cd41e);await setActiveFeatureId(_0xac24fb['id']);const _0x1e5483=getGitBranch();_0x1e5483&&_0xf22736[_0x1cf7ae(0xc7)](_0x1e5483,_0xac24fb[_0x1cf7ae(0xe8)])&&(await _0xf22736[_0x1cf7ae(0x135)](updateFeature,_0xac24fb['id'],{'gitBranch':_0x1e5483}),console[_0x1cf7ae(0x142)](_0x1cf7ae(0x104)+_0x1e5483));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0xac24fb['name']+'\x20('+_0xac24fb['id']+')'),await _0xf22736['wxYIM'](tryStartCurrentSession,_0xac24fb['id']);const _0x5a0b63=process[_0x1cf7ae(0xd6)][_0x1cf7ae(0xde)];_0x5a0b63&&_0xf22736['HlUjE'](registerSession,_0x5a0b63,_0xac24fb['id']);displayFeature(_0xac24fb,_0xac24fb['checklistItems']),await _0xf22736[_0x1cf7ae(0xd4)](printFeedbackNudge,_0xac24fb['id']);return;}const _0x30fa23=getGitRepoUrl(),_0xe9859a=getGitBranch();if(_0xf22736['fAipr'](!_0x30fa23,!_0xe9859a))throw new Error(_0xf22736['xcbUD']);console['log'](_0x1cf7ae(0x11b)+(_0x30fa23||'any')+'\x20/\x20'+(_0xe9859a||_0xf22736[_0x1cf7ae(0x12c)])+'...');const _0x311eb4=await listFeatures({'gitRepoUrl':_0x30fa23,'gitBranch':_0xe9859a}),_0x5a6396=_0x311eb4[_0x1cf7ae(0x130)]['filter'](_0x122c18=>!_0x122c18['completedAt']);if(_0x5a6396['length']===0x0){console['log']('\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.'),console['log'](_0xf22736['cXUAx']);return;}let _0x1990c2;if(_0x5a6396['length']===0x1)_0x1990c2=_0x5a6396[0x0];else{const _0x4c3603=process[_0x1cf7ae(0xe1)]['isTTY']&&process[_0x1cf7ae(0xe2)][_0x1cf7ae(0xa2)];if(!_0x4c3603){console['log'](_0xf22736['sCNEZ']);for(const _0x21689e of _0x5a6396){console[_0x1cf7ae(0x142)]('\x20\x20'+_0x21689e['name']),console['log']('\x20\x20\x20\x20\x20ID:\x20'+_0x21689e['id']),_0x21689e[_0x1cf7ae(0x128)]&&console['log'](_0x1cf7ae(0xc3)+_0xf22736[_0x1cf7ae(0xe6)](getProgressDisplay,_0x21689e[_0x1cf7ae(0x128)])),_0x21689e[_0x1cf7ae(0xe8)]&&console['log']('\x20\x20\x20\x20\x20Branch:\x20'+_0x21689e[_0x1cf7ae(0xe8)]);}throw new Error(_0xf22736[_0x1cf7ae(0xd7)]);}const {selected:_0x493b25}=await _0x24c657['prompt']([{'type':_0xf22736['OYSvH'],'name':_0xf22736[_0x1cf7ae(0x12a)],'message':_0xf22736[_0x1cf7ae(0xdf)],'choices':_0x5a6396['map'](_0x53abcd=>({'name':_0x53abcd['name']+'\x20('+_0x53abcd['id']+')','value':_0x53abcd['id']}))}]);_0x1990c2=_0x5a6396['find'](_0x35b993=>_0x35b993['id']===_0x493b25);}await _0xf22736[_0x1cf7ae(0xd4)](setActiveFeatureId,_0x1990c2['id']);_0xe9859a&&_0xf22736['SgZkQ'](_0xe9859a,_0x1990c2[_0x1cf7ae(0xe8)])&&(await updateFeature(_0x1990c2['id'],{'gitBranch':_0xe9859a}),console['log']('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0xe9859a));console[_0x1cf7ae(0x142)](_0x1cf7ae(0x127)+_0x1990c2[_0x1cf7ae(0x139)]+'\x20('+_0x1990c2['id']+')'),await _0xf22736[_0x1cf7ae(0x120)](tryStartCurrentSession,_0x1990c2['id']);const _0x547cd5=await _0xf22736[_0x1cf7ae(0x120)](getFeature,_0x1990c2['id']),_0x3f6e69=process[_0x1cf7ae(0xd6)][_0x1cf7ae(0xde)];_0x3f6e69&®isterSession(_0x3f6e69,_0x547cd5['id']),displayFeature(_0x547cd5,_0x547cd5['checklistItems']),await printFeedbackNudge(_0x547cd5['id']);}async function printFeedbackNudge(_0x46b78a){const _0xd4e448=_0x3ab331,_0x3d5841={'HalcS':function(_0x6da95a,_0x3dcefb,_0x41018c){return _0x6da95a(_0x3dcefb,_0x41018c);},'zvUZx':function(_0x1fbcda,_0x309052){return _0x1fbcda>_0x309052;}};try{const {items:_0x3d4da1}=await getActionItems(_0x46b78a);let _0x1d939d=0x0,_0x419482=0x0;for(const _0x33a032 of _0x3d4da1){const _0x52dd21=await _0x3d5841['HalcS'](getItemFeedback,_0x46b78a,_0x33a032['id']);_0x3d5841['zvUZx'](_0x52dd21['unaddressedComments'][_0xd4e448(0xba)],0x0)&&(_0x1d939d+=_0x52dd21['unaddressedComments']['length'],_0x419482++);}_0x1d939d>0x0&&(console['log']('\x0a⚠️\x20\x20'+_0x1d939d+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x419482+_0xd4e448(0xfa)),console[_0xd4e448(0x142)]('\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'));}catch{}}async function tryStartCurrentSession(_0x2971ec){const _0xeab23=_0x3ab331,_0x3fe3c7={'hWUJW':function(_0x49656e,_0x1624f0,_0x1d8f19){return _0x49656e(_0x1624f0,_0x1d8f19);}};try{const {sessions:_0x3066d7}=await listFeatureSessions(_0x2971ec),_0x37d917=_0x3066d7[_0xeab23(0xa1)](_0x1c9753=>_0x1c9753[_0xeab23(0xa4)]===_0xeab23(0x12d));_0x37d917&&(await _0x3fe3c7['hWUJW'](startSession,_0x2971ec,_0x37d917['id']),console[_0xeab23(0x142)]('\x20\x20\x20▶️\x20Started\x20session\x20'+_0x37d917['iteration']));}catch{}}export async function featureReport(_0x1396c4,_0x592169){const _0x2538be=_0x3ab331,_0x3c4273={'xSUmk':function(_0x97ed18,_0x2720a,_0x299d2a){return _0x97ed18(_0x2720a,_0x299d2a);},'xrvnH':'reports','HDVft':function(_0x4468e4,_0x185ad0,_0x5ae311,_0x46636a){return _0x4468e4(_0x185ad0,_0x5ae311,_0x46636a);}},_0x36aec3=_0x1396c4||await getActiveFeatureId();if(!_0x36aec3)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');console[_0x2538be(0x142)]('\x0aGenerating\x20report...');const _0x16ef27=await _0x3c4273[_0x2538be(0x13a)](getFeatureReportMarkdown,_0x36aec3,{'style':_0x592169['style']}),_0x572102=_0x592169[_0x2538be(0xdc)]||join(getRangerDir(),_0x3c4273[_0x2538be(0xf7)],_0x36aec3+'.md'),_0x1175e7=join(_0x572102,'..');!existsSync(_0x1175e7)&&await mkdir(_0x1175e7,{'recursive':!![]}),await _0x3c4273['HDVft'](writeFile,_0x572102,_0x16ef27,'utf-8'),console['log']('\x0a✅\x20Report\x20generated:\x20'+_0x572102);}function _0x3119(_0x2e0fbb,_0x1a0eaa){_0x2e0fbb=_0x2e0fbb-0x9e;const _0x54a8ff=_0x54a8();let _0x311984=_0x54a8ff[_0x2e0fbb];return _0x311984;}export async function featureReportPrDescription(_0x403c13,_0x570985){const _0x530dc0=_0x3ab331,_0x59c611={'occbM':function(_0x14d350){return _0x14d350();},'Iabeq':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','HqvAI':function(_0x2ba298,_0x44b58a){return _0x2ba298(_0x44b58a);},'FTSrb':function(_0x486e5f,_0x4343e8,_0x5a7025){return _0x486e5f(_0x4343e8,_0x5a7025);},'mnovU':function(_0x391c93,_0x208dc9){return _0x391c93===_0x208dc9;},'wBJfw':function(_0x49837b,_0xc999e1){return _0x49837b<_0xc999e1;},'GYPJl':function(_0xa2831a,_0x5bd7cc){return _0xa2831a===_0x5bd7cc;}},_0x2c9c51=_0x403c13||await _0x59c611['occbM'](getActiveFeatureId);if(!_0x2c9c51)throw new Error(_0x59c611[_0x530dc0(0xfc)]);const _0x12f676=await _0x59c611[_0x530dc0(0xc0)](getFeature,_0x2c9c51),_0x452898=_0x12f676['checklistItems']||[],_0x180c9e=_0x59c611['FTSrb'](getCurrentSessionItems,_0x12f676,_0x452898);_0x59c611[_0x530dc0(0x138)](_0x180c9e[_0x530dc0(0xba)],0x0)&&(console[_0x530dc0(0xf1)](_0x530dc0(0xc2)),process[_0x530dc0(0x10e)](0x1));const _0x6e16bf=_0x570985[_0x530dc0(0xca)]??[],_0xf8c350=_0x6e16bf[_0x530dc0(0xf8)](_0x54c2ca=>!Number[_0x530dc0(0x10b)](_0x54c2ca)||_0x54c2ca<0x1||_0x54c2ca>_0x180c9e[_0x530dc0(0xba)]);if(_0xf8c350['length']>0x0){console[_0x530dc0(0xf1)]('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0xf8c350[_0x530dc0(0xfe)](',\x20')),console['log'](_0x530dc0(0x125));for(let _0x39a1a9=0x0;_0x59c611['wBJfw'](_0x39a1a9,_0x180c9e[_0x530dc0(0xba)]);_0x39a1a9++){console['log']('\x20\x20'+(_0x39a1a9+0x1)+'.\x20'+_0x180c9e[_0x39a1a9][_0x530dc0(0xb6)]);}process['exit'](0x1);}const _0x1ef2a8=new Set(_0x6e16bf['map'](_0xfcfe67=>_0xfcfe67-0x1)),_0x2dfc28=_0x180c9e[_0x530dc0(0xf8)]((_0x4e1a44,_0x29d7a3)=>!_0x1ef2a8['has'](_0x29d7a3));_0x59c611['GYPJl'](_0x2dfc28[_0x530dc0(0xba)],0x0)&&(console['error']('\x0a❌\x20All\x20scenarios\x20were\x20excluded.'),process[_0x530dc0(0x10e)](0x1));const _0x53520e=await getFeatureReportMarkdown(_0x2c9c51,{'itemIds':_0x2dfc28[_0x530dc0(0x147)](_0x58b85d=>_0x58b85d['id'])});process[_0x530dc0(0xe2)][_0x530dc0(0x115)](_0x53520e['trimEnd']()+'\x0a');}export async function featureConcludeSession(_0x28c415){const _0x397356=_0x3ab331,_0x45365c={'ozonU':_0x397356(0x151),'ryXgI':function(_0x1326d1,_0x42e23b){return _0x1326d1(_0x42e23b);},'dnGvT':_0x397356(0x144),'nmTCh':function(_0xe1366b,_0x20341a){return _0xe1366b===_0x20341a;},'iwopK':'\x0a✅\x20Session\x20is\x20already\x20completed.'},_0x3ed26f=_0x28c415||await getActiveFeatureId();if(!_0x3ed26f)throw new Error(_0x45365c['ozonU']);const _0x4cb4bb=await _0x45365c['ryXgI'](getFeature,_0x3ed26f);if(!_0x4cb4bb[_0x397356(0xbf)])throw new Error('No\x20active\x20session\x20for\x20this\x20feature\x20review.');const {sessions:_0x4d7baa}=await listFeatureSessions(_0x3ed26f),_0x2bcdae=_0x4d7baa[_0x397356(0xa1)](_0xc9a5ed=>_0xc9a5ed['id']===_0x4cb4bb['currentSessionId']);if(!_0x2bcdae)throw new Error(_0x45365c[_0x397356(0x113)]);if(_0x45365c['nmTCh'](_0x2bcdae['status'],_0x397356(0x103))){console[_0x397356(0x142)](_0x45365c['iwopK']);return;}if(_0x2bcdae['status']!==_0x397356(0xa8))throw new Error(_0x397356(0xe7)+_0x2bcdae[_0x397356(0xa4)]);console['log']('\x0aConcluding\x20session...'),await concludeSession(_0x3ed26f,_0x4cb4bb[_0x397356(0xbf)]),console[_0x397356(0x142)](_0x397356(0x133)+_0x2bcdae['iteration']+'\x20concluded.'),console[_0x397356(0x142)](_0x397356(0xeb));}export async function featureSessions(_0x414a4a){const _0x51a219=_0x3ab331,_0x193a70={'ekRsw':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','NUdJf':function(_0x3df985,_0x34703a){return _0x3df985(_0x34703a);},'yxCSP':function(_0x5bd301,_0x5d4aad){return _0x5bd301===_0x5d4aad;},'AAwKw':_0x51a219(0xa8)},_0x1cae6f=_0x414a4a||await getActiveFeatureId();if(!_0x1cae6f)throw new Error(_0x193a70[_0x51a219(0x9e)]);const _0x530979=await _0x193a70[_0x51a219(0xcf)](getFeature,_0x1cae6f);console['log']('\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20'+_0x530979['name']+'\x0a');const {sessions:_0x3d80ac}=await listFeatureSessions(_0x1cae6f);if(_0x3d80ac[_0x51a219(0xba)]===0x0){console[_0x51a219(0x142)](_0x51a219(0x9f));return;}for(const _0x2bbdf9 of _0x3d80ac){const _0x519291=_0x2bbdf9['status']==='completed'?'✅':_0x193a70['yxCSP'](_0x2bbdf9[_0x51a219(0xa4)],_0x193a70['AAwKw'])?'🔄':'▶️';console[_0x51a219(0x142)](_0x519291+_0x51a219(0x121)+_0x2bbdf9['iteration']+'\x20('+_0x2bbdf9['id']+')'),console[_0x51a219(0x142)]('\x20\x20\x20Status:\x20'+_0x2bbdf9[_0x51a219(0xa4)]),console[_0x51a219(0x142)](_0x51a219(0xd2)+new Date(_0x2bbdf9['createdAt'])[_0x51a219(0xce)]()),_0x2bbdf9['completedAt']&&console[_0x51a219(0x142)]('\x20\x20\x20Completed:\x20'+new Date(_0x2bbdf9['completedAt'])[_0x51a219(0xce)]()),console[_0x51a219(0x142)]('');}}export async function featureAddScenario(_0x199355,_0x1d7d93){const _0x20eb83=_0x3ab331,_0x562942={'gcNwI':function(_0x5972dd){return _0x5972dd();},'QKDIz':_0x20eb83(0x151),'ZGZNU':function(_0x42df89,_0x1c09d0){return _0x42df89(_0x1c09d0);},'PVbVQ':function(_0x5f2477,_0xc4bd34,_0x4e8eaf){return _0x5f2477(_0xc4bd34,_0x4e8eaf);}},_0x3d5994=_0x1d7d93||await _0x562942['gcNwI'](getActiveFeatureId);if(!_0x3d5994)throw new Error(_0x562942[_0x20eb83(0xab)]);const _0xc1dc52=await _0x562942[_0x20eb83(0xc8)](getFeature,_0x3d5994);if(_0xc1dc52['latestReview']&&!_0xc1dc52['latestReview'][_0x20eb83(0xbd)])throw new Error(_0x20eb83(0x11e)+_0xc1dc52[_0x20eb83(0x143)]);await createChecklistItem(_0x3d5994,_0x199355);const _0x28c4c9=await _0x562942[_0x20eb83(0xc8)](getFeature,_0x3d5994);console['log']('\x0a✅\x20Scenario\x20added'),_0x562942[_0x20eb83(0xf3)](displayFeature,_0x28c4c9,_0x28c4c9['checklistItems']);}export async function featureEditScenario(_0xf70517,_0x561b68){const _0x54035b=_0x3ab331,_0x16d49f={'mdywp':_0x54035b(0x12e),'qeCOK':'Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','zxVTv':_0x54035b(0xee),'kFijS':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','WtjEY':function(_0x3584b8,_0x5af342){return _0x3584b8+_0x5af342;},'qmFSG':function(_0x182195,_0xd1477c){return _0x182195-_0xd1477c;},'kXKfN':_0x54035b(0x125),'nNFMm':function(_0x141439,_0x367d10){return _0x141439(_0x367d10);},'vrqDg':function(_0xcaa38b,_0xddc6d2,_0x14ea14){return _0xcaa38b(_0xddc6d2,_0x14ea14);}},_0x48fd9c=_0x561b68['id']||await getActiveFeatureId();!_0x48fd9c&&(console[_0x54035b(0xf1)](_0x16d49f['mdywp']),console['error'](_0x16d49f[_0x54035b(0x11a)]),process['exit'](0x1));const _0x1311d3=await getFeature(_0x48fd9c);_0x1311d3[_0x54035b(0xfd)]&&!_0x1311d3['latestReview']['submittedAt']&&(console[_0x54035b(0xf1)](_0x16d49f['zxVTv']),console[_0x54035b(0xf1)](_0x54035b(0x149)),console['error']('\x20\x20'+_0x1311d3['dashboardUrl']),process['exit'](0x1));const _0xb2a77e=_0x1311d3['checklistItems']||[];_0xb2a77e['length']===0x0&&(console[_0x54035b(0xf1)](_0x16d49f['kFijS']),process['exit'](0x1));if(_0x561b68['scenario']===undefined){console['error'](_0x54035b(0x13f)),console['log'](_0x54035b(0x125));for(let _0x521fe5=0x0;_0x521fe5<_0xb2a77e['length'];_0x521fe5++){console[_0x54035b(0x142)]('\x20\x20'+_0x16d49f[_0x54035b(0x13c)](_0x521fe5,0x1)+'.\x20'+_0xb2a77e[_0x521fe5]['description']);}process[_0x54035b(0x10e)](0x1);}const _0x141506=_0x16d49f['qmFSG'](_0x561b68[_0x54035b(0x119)],0x1);if(_0x141506<0x0||_0x141506>=_0xb2a77e['length']){console[_0x54035b(0xf1)]('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x561b68[_0x54035b(0x119)]+_0x54035b(0xbb)+_0xb2a77e[_0x54035b(0xba)]+'\x20scenarios.'),console[_0x54035b(0x142)](_0x16d49f[_0x54035b(0x14a)]);for(let _0xe712c=0x0;_0xe712c<_0xb2a77e['length'];_0xe712c++){console['log']('\x20\x20'+(_0xe712c+0x1)+'.\x20'+_0xb2a77e[_0xe712c]['description']);}process[_0x54035b(0x10e)](0x1);}const _0x5affb2=_0xb2a77e[_0x141506];await updateChecklistItem(_0x48fd9c,_0x5affb2['id'],{'description':_0xf70517});const _0x47c49e=await _0x16d49f['nNFMm'](getFeature,_0x48fd9c);console['log'](_0x54035b(0xb9)),_0x16d49f['vrqDg'](displayFeature,_0x47c49e,_0x47c49e['checklistItems']);}async function downloadFeedbackImage(_0x5bc70f,_0x56a6d1){const _0x1666d4=_0x3ab331,_0x42b53b={'psuDe':function(_0x468a65,_0x4a2c13,_0x4dfdfa){return _0x468a65(_0x4a2c13,_0x4dfdfa);},'pCsDA':function(_0x2a7703){return _0x2a7703();},'kEiAH':function(_0x4a8cc1,_0x3e1f79,_0x4495c4){return _0x4a8cc1(_0x3e1f79,_0x4495c4);},'NYNpq':function(_0x399bd6,_0x1ade64,_0x4e3959){return _0x399bd6(_0x1ade64,_0x4e3959);}};try{const _0x580e14=_0x42b53b['psuDe'](join,_0x42b53b[_0x1666d4(0x109)](getRangerDir),_0x1666d4(0xae));await _0x42b53b['kEiAH'](mkdir,_0x580e14,{'recursive':!![]});const _0x4673b5=_0x42b53b[_0x1666d4(0x114)](join,_0x580e14,_0x1666d4(0xe3)+_0x56a6d1+'.png'),_0x5b49a0=await fetch(_0x5bc70f);if(!_0x5b49a0['ok'])return null;const _0x11a1d9=Buffer['from'](await _0x5b49a0[_0x1666d4(0xaa)]());return await _0x42b53b[_0x1666d4(0xd0)](writeFile,_0x4673b5,_0x11a1d9),_0x4673b5;}catch{return null;}}export async function featureGetReview(_0x28f63f){const _0x2cf6ef=_0x3ab331,_0x192cbb={'xVbyw':function(_0x5044a3){return _0x5044a3();},'jShrk':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','tjbYl':function(_0x48d62c,_0xf87d43){return _0x48d62c===_0xf87d43;},'VCFVo':function(_0x4da04f,_0x5714a1){return _0x4da04f<_0x5714a1;},'DRljW':function(_0x3b4abc,_0x5a3fbd){return _0x3b4abc>_0x5a3fbd;},'YoqUA':function(_0x271c86,_0x15dcad){return _0x271c86+_0x15dcad;},'kpiIq':_0x2cf6ef(0xcc),'EhYai':'point'},_0x5949c9=_0x28f63f||await _0x192cbb['xVbyw'](getActiveFeatureId);if(!_0x5949c9)throw new Error(_0x192cbb['jShrk']);const _0x46fce8=await getFeature(_0x5949c9),{items:_0x2f968e}=await getActionItems(_0x5949c9);console['log']('\x0a📋\x20Feedback\x20for:\x20'+_0x46fce8['name']+'\x20('+_0x46fce8['id']+')\x0a');if(_0x192cbb['tjbYl'](_0x2f968e['length'],0x0)){console['log']('No\x20scenarios\x20found.');return;}for(let _0x150e44=0x0;_0x192cbb['VCFVo'](_0x150e44,_0x2f968e['length']);_0x150e44++){const _0x363a45=_0x2f968e[_0x150e44],_0x1fdf13=_0x363a45[_0x2cf6ef(0xe0)]>0x1?_0x2cf6ef(0x152)+_0x363a45[_0x2cf6ef(0xe0)]+')':'',_0x5248f6=await getItemFeedback(_0x5949c9,_0x363a45['id']);if(_0x192cbb[_0x2cf6ef(0x14c)](_0x5248f6['unaddressedComments'][_0x2cf6ef(0xba)],0x0)){console[_0x2cf6ef(0x142)](_0x2cf6ef(0x11c)+_0x192cbb[_0x2cf6ef(0xda)](_0x150e44,0x1)+':\x20\x22'+_0x363a45[_0x2cf6ef(0xb6)]+'\x22'+_0x1fdf13+'\x20—\x20'+_0x5248f6[_0x2cf6ef(0x100)][_0x2cf6ef(0xba)]+'\x20unaddressed\x20comment(s)');for(const _0x8290ff of _0x5248f6['unaddressedComments']){const _0x519a5d=new Date(_0x8290ff['createdAt'])['toLocaleDateString'](_0x2cf6ef(0x111),{'month':_0x192cbb['kpiIq'],'day':_0x2cf6ef(0xb7)}),_0x5cb1f8=_0x8290ff['authorName']||_0x8290ff['authorEmail']||'Unknown';console[_0x2cf6ef(0x142)]('\x20\x20💬\x20'+_0x5cb1f8+'\x20('+_0x519a5d+_0x2cf6ef(0xb2)+_0x8290ff['content']+'\x22');if(_0x8290ff[_0x2cf6ef(0x11f)]){const _0x4938d0=await downloadFeedbackImage(_0x8290ff['assetUrl'],_0x8290ff['id']);_0x4938d0&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x4938d0);}if(_0x8290ff['spatial']){const _0x1cca6e=_0x8290ff['spatial']['coordinates'];_0x192cbb['tjbYl'](_0x8290ff['spatial'][_0x2cf6ef(0xbc)],_0x192cbb[_0x2cf6ef(0x132)])&&_0x1cca6e['length']>=0x2?console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x1cca6e[0x0]['toFixed'](0x2)+',\x20'+_0x1cca6e[0x1][_0x2cf6ef(0x112)](0x2)+')'):console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x8290ff[_0x2cf6ef(0x13e)]['type']+_0x2cf6ef(0xc1)+_0x1cca6e[_0x2cf6ef(0x147)](_0x1587e0=>_0x1587e0[_0x2cf6ef(0x112)](0x2))[_0x2cf6ef(0xfe)](',\x20')+']');}}if(_0x5248f6['canonicalFlow']){console['log'](_0x2cf6ef(0x150));for(const _0x3b8ec3 of _0x5248f6['canonicalFlow'][_0x2cf6ef(0x14d)]('\x0a')){console[_0x2cf6ef(0x142)](_0x2cf6ef(0xb1)+_0x3b8ec3);}}}else console[_0x2cf6ef(0x142)]('Scenario\x20'+_0x192cbb[_0x2cf6ef(0xda)](_0x150e44,0x1)+':\x20\x22'+_0x363a45['description']+'\x22'+_0x1fdf13+'\x20—\x20no\x20comments'),console[_0x2cf6ef(0x142)]('\x20\x20✅\x20No\x20feedback\x20to\x20address');console['log']('');}}export async function featureDelete(_0x33db32){const _0x1e133f=_0x3ab331,_0x181d76={'tJrXt':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','rfKGF':function(_0x49198b,_0x2fdc72){return _0x49198b(_0x2fdc72);}},_0x19e454=_0x33db32||await getActiveFeatureId();if(!_0x19e454)throw new Error(_0x181d76[_0x1e133f(0xfb)]);const _0x3f5e2d=await _0x181d76['rfKGF'](getFeature,_0x19e454);await _0x181d76['rfKGF'](softDeleteFeature,_0x19e454),console['log'](_0x1e133f(0x11d)+_0x3f5e2d['name']+'\x20('+_0x19e454+')'),console[_0x1e133f(0x142)](_0x1e133f(0x14e)+_0x19e454);}export async function featureRestore(_0x12cfd6){const _0x6dc48=_0x3ab331,_0x589972={'kTrFm':function(_0x4c96c9,_0xa117ea){return _0x4c96c9(_0xa117ea);}};await restoreFeature(_0x12cfd6);const _0x50c150=await _0x589972[_0x6dc48(0xf0)](getFeature,_0x12cfd6);console['log'](_0x6dc48(0x134)+_0x50c150[_0x6dc48(0x139)]+'\x20('+_0x12cfd6+')'),displayFeature(_0x50c150,_0x50c150[_0x6dc48(0x118)]);}
|
package/build/commands/hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x4a95(_0x59b302,_0xd36add){_0x59b302=_0x59b302-0x110;const _0x2ec4e8=_0x2ec4();let _0x4a95ef=_0x2ec4e8[_0x59b302];return _0x4a95ef;}(function(_0x5ce50e,_0x13fe24){const _0x2e4825=_0x4a95,_0x2918a2=_0x5ce50e();while(!![]){try{const _0x498e1d=-parseInt(_0x2e4825(0x11d))/0x1*(-parseInt(_0x2e4825(0x110))/0x2)+parseInt(_0x2e4825(0x111))/0x3+parseInt(_0x2e4825(0x117))/0x4*(-parseInt(_0x2e4825(0x116))/0x5)+parseInt(_0x2e4825(0x119))/0x6*(-parseInt(_0x2e4825(0x113))/0x7)+parseInt(_0x2e4825(0x112))/0x8+-parseInt(_0x2e4825(0x11e))/0x9*(-parseInt(_0x2e4825(0x11c))/0xa)+parseInt(_0x2e4825(0x11b))/0xb*(-parseInt(_0x2e4825(0x114))/0xc);if(_0x498e1d===_0x13fe24)break;else _0x2918a2['push'](_0x2918a2['shift']());}catch(_0x2a2649){_0x2918a2['push'](_0x2918a2['shift']());}}}(_0x2ec4,0xeddfc));import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';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};function _0x2ec4(){const _0x2201d1=['312tvsFmj','exit','24GIWaMp','keys','11bARZgA','580100SQMhXM','1QwenpL','153JsQKgd','1845362khmrbP','2044269ZYITsr','8298456xTUccH','948353NLzTFv','15493956eAaPcg','error','52575baAZlh'];_0x2ec4=function(){return _0x2201d1;};return _0x2ec4();}export async function hook(_0xbe92b6,_0x163ae5){const _0x5c080e=_0x4a95,_0x2c5beb={'pTYpS':function(_0x4f8f25,_0x5d973b){return _0x4f8f25(_0x5d973b);}},_0x307cbf=HOOKS[_0xbe92b6];if(!_0x307cbf){const _0x4a5d08=Object[_0x5c080e(0x11a)](HOOKS)['join'](',\x20');console[_0x5c080e(0x115)]('Unknown\x20hook:\x20'+_0xbe92b6),console['error']('Valid\x20hooks:\x20'+_0x4a5d08),process[_0x5c080e(0x118)](0x1);}await _0x2c5beb['pTYpS'](_0x307cbf,_0x163ae5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x1c1823=_0x35b7;(function(_0x7e85d,_0x376069){const _0x12aa7e=_0x35b7,_0x1cb880=_0x7e85d();while(!![]){try{const _0x547d68=parseInt(_0x12aa7e(0x130))/0x1+parseInt(_0x12aa7e(0x136))/0x2*(parseInt(_0x12aa7e(0x129))/0x3)+parseInt(_0x12aa7e(0x12e))/0x4*(parseInt(_0x12aa7e(0x132))/0x5)+-parseInt(_0x12aa7e(0x12c))/0x6*(parseInt(_0x12aa7e(0x12f))/0x7)+parseInt(_0x12aa7e(0x127))/0x8*(-parseInt(_0x12aa7e(0x135))/0x9)+-parseInt(_0x12aa7e(0x133))/0xa+-parseInt(_0x12aa7e(0x128))/0xb;if(_0x547d68===_0x376069)break;else _0x1cb880['push'](_0x1cb880['shift']());}catch(_0x2f8580){_0x1cb880['push'](_0x1cb880['shift']());}}}(_0x25dd,0xc39b9));import{readHookInput}from'./output.js';import{isSessionEnabled,hasSessionBeenPrompted,markSessionPrompted}from'../utils/sessionCache.js';function _0x25dd(){const _0x291e03=['log','4388247cQYZrx','2oNQadj','8nmpmhN','21802649WvgSoa','2702409AnPlhr','\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.','rClIL','49770DyrbtE','RtyTD','48oieJvo','14BqCzre','1476129plIunp','xSZxH','553205owkfSE','4171830GcfGao'];_0x25dd=function(){return _0x291e03;};return _0x25dd();}function _0x35b7(_0x2ae1a7,_0x5d8b32){_0x2ae1a7=_0x2ae1a7-0x127;const _0x25ddd9=_0x25dd();let _0x35b7a0=_0x25ddd9[_0x2ae1a7];return _0x35b7a0;}const AUTO_PROMPT_TEXT=_0x1c1823(0x12a);export async function autoPrompt(){const _0x4fab8a=_0x1c1823,_0x3b64b5={'RtyTD':function(_0x11f056){return _0x11f056();},'rClIL':function(_0x4b1673,_0x4b2c78){return _0x4b1673(_0x4b2c78);},'xSZxH':function(_0x1299ab,_0x3504e8){return _0x1299ab(_0x3504e8);}},_0x1d2519=await _0x3b64b5[_0x4fab8a(0x12d)](readHookInput),_0x5276d4=_0x1d2519?.['session_id'];if(!_0x5276d4)return;if(_0x3b64b5['rClIL'](isSessionEnabled,_0x5276d4)||_0x3b64b5[_0x4fab8a(0x12b)](hasSessionBeenPrompted,_0x5276d4))return;_0x3b64b5[_0x4fab8a(0x131)](markSessionPrompted,_0x5276d4),console[_0x4fab8a(0x134)](AUTO_PROMPT_TEXT);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x307082,_0x9c93f0){const _0x2e4efe=_0x1f14,_0x268bc8=_0x307082();while(!![]){try{const _0x559316=parseInt(_0x2e4efe(0x129))/0x1+-parseInt(_0x2e4efe(0x123))/0x2*(parseInt(_0x2e4efe(0x12d))/0x3)+parseInt(_0x2e4efe(0x125))/0x4*(parseInt(_0x2e4efe(0x12a))/0x5)+-parseInt(_0x2e4efe(0x122))/0x6+-parseInt(_0x2e4efe(0x124))/0x7+-parseInt(_0x2e4efe(0x12e))/0x8+parseInt(_0x2e4efe(0x130))/0x9;if(_0x559316===_0x9c93f0)break;else _0x268bc8['push'](_0x268bc8['shift']());}catch(_0x2d9fa7){_0x268bc8['push'](_0x268bc8['shift']());}}}(_0x2e65,0xb9c43));import{disableSession,disableBranch,getCurrentBranch}from'../utils/sessionCache.js';import{printBlock}from'./output.js';function _0x2e65(){const _0x40946c=['kTTXM','21PZoOPa','11382448Tvrgyc','Provide\x20--session-id\x20or\x20ensure\x20CLAUDE_SESSION_ID\x20is\x20set.','28964448WKNcom','master','4580190kfKJEU','208180FNoodh','7590436CCajJv','28hTmYoK','Error:\x20No\x20session\x20ID\x20available.','env','error','77376ALaMmM','1046000sLTNTk','yehrg'];_0x2e65=function(){return _0x40946c;};return _0x2e65();}function _0x1f14(_0x26f3af,_0x24f96a){_0x26f3af=_0x26f3af-0x121;const _0x2e6596=_0x2e65();let _0x1f14f0=_0x2e6596[_0x26f3af];return _0x1f14f0;}export async function disable(_0x37d7bb){const _0x1ff2e8=_0x1f14,_0x5acc71={'yehrg':_0x1ff2e8(0x126),'hsywm':function(_0x489d1a,_0x4d0757){return _0x489d1a!==_0x4d0757;},'kTTXM':function(_0x2f0f7c,_0x5cc494){return _0x2f0f7c(_0x5cc494);},'FrNzH':_0x1ff2e8(0x121)},_0x1e4b34=_0x37d7bb||process[_0x1ff2e8(0x127)]['CLAUDE_SESSION_ID']||'';!_0x1e4b34&&(console['error'](_0x5acc71[_0x1ff2e8(0x12b)]),console[_0x1ff2e8(0x128)](_0x1ff2e8(0x12f)),process['exit'](0x1));disableSession(_0x1e4b34);const _0x120baf=getCurrentBranch();_0x120baf&&_0x5acc71['hsywm'](_0x120baf,'main')&&_0x120baf!=='master'&&disableBranch(_0x120baf),_0x5acc71[_0x1ff2e8(0x12c)](printBlock,'#\x20RANGER\x20DISABLED\x0a\x0aThe\x20user\x20has\x20expressly\x20disabled\x20Ranger\x20hooks\x20for\x20this\x20session'+(_0x120baf&&_0x120baf!=='main'&&_0x5acc71['hsywm'](_0x120baf,_0x5acc71['FrNzH'])?'\x20and\x20branch\x20\x27'+_0x120baf+'\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
|
-
(function(
|
|
1
|
+
(function(_0x130c8f,_0x111b27){const _0x57a8e0=_0x184c,_0x369421=_0x130c8f();while(!![]){try{const _0x1d1492=-parseInt(_0x57a8e0(0x184))/0x1+parseInt(_0x57a8e0(0x186))/0x2*(parseInt(_0x57a8e0(0x18d))/0x3)+-parseInt(_0x57a8e0(0x199))/0x4+-parseInt(_0x57a8e0(0x183))/0x5*(-parseInt(_0x57a8e0(0x195))/0x6)+-parseInt(_0x57a8e0(0x18e))/0x7+parseInt(_0x57a8e0(0x18f))/0x8+-parseInt(_0x57a8e0(0x182))/0x9*(parseInt(_0x57a8e0(0x185))/0xa);if(_0x1d1492===_0x111b27)break;else _0x369421['push'](_0x369421['shift']());}catch(_0x4dc409){_0x369421['push'](_0x369421['shift']());}}}(_0xf3d0,0xbba29));function _0xf3d0(){const _0x106afa=['Error:\x20No\x20session\x20ID\x20available.','161709wvnHcl','4957246EiwFCB','10370880wFOfoL','`\x0a\x0aA\x20browser\x20will\x20open\x20for\x20authentication.\x20A\x20human\x20needs\x20to\x20complete\x20the\x20login.\x0a','ranger\x20setup','gBrxR','\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`.','#\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`','7236FBUVAC','weOql','jKYhV','master','3628908cDtuHa','93753VTaCrB','1865FkOTlI','226506LQBEoK','50hYAwkG','34NqKjnY','error','CLAUDE_SESSION_ID','Restart\x20your\x20OpenCode\x20session\x20after\x20setup.','env','\x27\x20is\x20now\x20enabled**\x20-\x20Ranger\x20will\x20stay\x20active\x20on\x20this\x20branch\x20across\x20sessions.'];_0xf3d0=function(){return _0x106afa;};return _0xf3d0();}import{enableSession,getCurrentBranch}from'../utils/sessionCache.js';function _0x184c(_0x465f77,_0x20ef3c){_0x465f77=_0x465f77-0x182;const _0xf3d06=_0xf3d0();let _0x184c9c=_0xf3d06[_0x465f77];return _0x184c9c;}import{getToken}from'../utils/keychain.js';import{getRangerSkillContent}from'../utils/skillContent.js';import{printBlock}from'./output.js';import{update}from'../update.js';export async function enable(_0x2a87bf){const _0x4dbbe9=_0x184c,_0x2d6a56={'jKYhV':'Provide\x20--session-id\x20or\x20ensure\x20CLAUDE_SESSION_ID\x20is\x20set.','BnMrS':function(_0x1a8289,_0x3c3700){return _0x1a8289(_0x3c3700);},'gznxn':'ranger\x20setup\x20--opencode','fTbzy':_0x4dbbe9(0x191),'CovJd':'Restart\x20your\x20Claude\x20Code\x20session\x20after\x20setup.','weOql':function(_0x526f1c,_0x25f870){return _0x526f1c(_0x25f870);},'NIuKh':function(_0x4b0c3a){return _0x4b0c3a();},'gBrxR':'main','ruCga':_0x4dbbe9(0x198),'pkJyA':function(_0x313758,_0x4e45fe){return _0x313758(_0x4e45fe);}},_0x2c7d91=_0x2a87bf||process[_0x4dbbe9(0x18a)][_0x4dbbe9(0x188)]||'';!_0x2c7d91&&(console['error'](_0x4dbbe9(0x18c)),console[_0x4dbbe9(0x187)](_0x2d6a56[_0x4dbbe9(0x197)]),process['exit'](0x1));const _0x25db65=_0x2d6a56['BnMrS'](Boolean,_0x2a87bf),_0x16f68c=await getToken();if(!_0x16f68c){const _0x27870f=_0x25db65?_0x2d6a56['gznxn']:_0x2d6a56['fTbzy'],_0x3af089=_0x25db65?_0x4dbbe9(0x189):_0x2d6a56['CovJd'];_0x2d6a56[_0x4dbbe9(0x196)](printBlock,_0x4dbbe9(0x194)+_0x27870f+_0x4dbbe9(0x190)+_0x3af089);return;}try{await update();}catch{}enableSession(_0x2c7d91);const _0xb8acd0=_0x2d6a56['NIuKh'](getCurrentBranch),_0x3316b4=_0xb8acd0&&_0xb8acd0!==_0x2d6a56[_0x4dbbe9(0x192)]&&_0xb8acd0!==_0x2d6a56['ruCga']?'\x0a\x0a**Branch\x20\x27'+_0xb8acd0+_0x4dbbe9(0x18b):'',_0x356593=getRangerSkillContent();_0x2d6a56['pkJyA'](printBlock,'#\x20RANGER\x20ENABLED'+_0x3316b4+'\x0a\x0a**For\x20ANY\x20UI\x20work,\x20you\x20MUST\x20use\x20the\x20/ranger\x20skill.**\x0a\x0a'+_0x356593+_0x4dbbe9(0x193));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x16f229,_0x56b0e8){const _0x396e11=_0x3b05,_0x199128=_0x16f229();while(!![]){try{const _0x18d375=-parseInt(_0x396e11(0x110))/0x1*(parseInt(_0x396e11(0x10a))/0x2)+parseInt(_0x396e11(0x10d))/0x3+parseInt(_0x396e11(0x113))/0x4+-parseInt(_0x396e11(0x10c))/0x5+-parseInt(_0x396e11(0x10e))/0x6*(parseInt(_0x396e11(0x111))/0x7)+parseInt(_0x396e11(0x10f))/0x8+parseInt(_0x396e11(0x112))/0x9*(parseInt(_0x396e11(0x10b))/0xa);if(_0x18d375===_0x56b0e8)break;else _0x199128['push'](_0x199128['shift']());}catch(_0x4c1230){_0x199128['push'](_0x199128['shift']());}}}(_0xccac,0xb91e2));function _0x3b05(_0x4293f7,_0x20b21d){_0x4293f7=_0x4293f7-0x10a;const _0xccaca5=_0xccac();let _0x3b052a=_0xccaca5[_0x4293f7];return _0x3b052a;}import{printBlock,getEnabledSessionId}from'./output.js';function _0xccac(){const _0x3264b3=['1Cbypjm','414631MxHQel','9nabaRh','2197928KBWaLR','1412102ScWePD','13643930HFzPjy','2385525KDPisC','1708446Pgcgje','108OrzyMq','4193880VctqDK'];_0xccac=function(){return _0x3264b3;};return _0xccac();}export async function exitPlanMode(_0x3b701f){const _0x406ba3={'qlwiz':function(_0x266b5f,_0x47afe6){return _0x266b5f(_0x47afe6);}},_0x27c843=await _0x406ba3['qlwiz'](getEnabledSessionId,_0x3b701f);if(!_0x27c843)return;_0x406ba3['qlwiz'](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===');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d27a1,_0x4c5381){var _0x28ecb2=_0x1c81,_0x1608a8=_0x4d27a1();while(!![]){try{var _0x447f3e=-parseInt(_0x28ecb2(0x1ec))/0x1*(parseInt(_0x28ecb2(0x1f1))/0x2)+-parseInt(_0x28ecb2(0x1e9))/0x3*(parseInt(_0x28ecb2(0x1eb))/0x4)+-parseInt(_0x28ecb2(0x1ef))/0x5+parseInt(_0x28ecb2(0x1e8))/0x6*(-parseInt(_0x28ecb2(0x1ed))/0x7)+-parseInt(_0x28ecb2(0x1ee))/0x8+-parseInt(_0x28ecb2(0x1ea))/0x9+parseInt(_0x28ecb2(0x1f0))/0xa;if(_0x447f3e===_0x4c5381)break;else _0x1608a8['push'](_0x1608a8['shift']());}catch(_0x113499){_0x1608a8['push'](_0x1608a8['shift']());}}}(_0x4510,0x33503));export{sessionStart}from'./sessionStart.js';function _0x4510(){var _0x4f67e1=['5869HZUJfq','28DimlzD','34472JbmdpL','791860vVdznJ','8088730kOuVoT','8oKgnDI','520908Cjuyxy','2760UmcCdn','107145ExeLQb','232MFljbR'];_0x4510=function(){return _0x4f67e1;};return _0x4510();}export{sessionEnd}from'./sessionEnd.js';export{preCompact}from'./preCompact.js';function _0x1c81(_0x1cc7d5,_0x80bb37){_0x1cc7d5=_0x1cc7d5-0x1e8;var _0x4510fd=_0x4510();var _0x1c8184=_0x4510fd[_0x1cc7d5];return _0x1c8184;}export{postEdit}from'./postEdit.js';export{planStart}from'./planStart.js';export{planReminder}from'./planReminder.js';export{exitPlanMode}from'./exitPlanMode.js';export{stopHook}from'./stopHook.js';export{enable}from'./enable.js';export{disable}from'./disable.js';export{autoPrompt}from'./autoPrompt.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b36dc,_0x18aa39){const _0xbd1a98=_0x3708,_0x423bc6=_0x5b36dc();while(!![]){try{const _0x1d07b5=parseInt(_0xbd1a98(0x125))/0x1*(-parseInt(_0xbd1a98(0x12c))/0x2)+parseInt(_0xbd1a98(0x128))/0x3+-parseInt(_0xbd1a98(0x123))/0x4+-parseInt(_0xbd1a98(0x126))/0x5*(parseInt(_0xbd1a98(0x129))/0x6)+parseInt(_0xbd1a98(0x127))/0x7+parseInt(_0xbd1a98(0x12a))/0x8*(-parseInt(_0xbd1a98(0x12f))/0x9)+parseInt(_0xbd1a98(0x124))/0xa;if(_0x1d07b5===_0x18aa39)break;else _0x423bc6['push'](_0x423bc6['shift']());}catch(_0x15c1cd){_0x423bc6['push'](_0x423bc6['shift']());}}}(_0x5397,0xae1ba));function _0x5397(){const _0x3a6c59=['1203564uNOkQI','11457820umWqjj','12qNmbbZ','5NTSxkl','6421002ueigRa','3115239ubcLQK','8525346PBhEez','50408ksERWu','log','9226UlhAVI','session_id','Fvvaj','873aKfsKb'];_0x5397=function(){return _0x3a6c59;};return _0x5397();}import{isSessionEnabled}from'../utils/sessionCache.js';export function printBlock(_0x538ccb){const _0x5e7b08=_0x3708;console[_0x5e7b08(0x12b)](_0x538ccb);}export async function readHookInput(){let _0x133e81='';for await(const _0x427717 of process['stdin']){_0x133e81+=_0x427717;}try{return JSON['parse'](_0x133e81);}catch{return null;}}function _0x3708(_0x1a8371,_0x4df8ec){_0x1a8371=_0x1a8371-0x123;const _0x5397b7=_0x5397();let _0x3708f5=_0x5397b7[_0x1a8371];return _0x3708f5;}export async function getEnabledSessionId(_0x38f8bd){const _0x568877=_0x3708,_0x238cc7={'gKfhE':function(_0xfe31b5,_0x5f3957){return _0xfe31b5(_0x5f3957);}};if(_0x38f8bd)return _0x238cc7['gKfhE'](isSessionEnabled,_0x38f8bd)?_0x38f8bd:null;const _0x4baae3=await readHookInput(),_0x505c38=_0x4baae3?.[_0x568877(0x12d)];if(!_0x505c38||!isSessionEnabled(_0x505c38))return null;return _0x505c38;}export async function getEnabledHookContext(_0x55b830){const _0x3b62eb=_0x3708,_0x533098={'Fvvaj':function(_0x392078){return _0x392078();}};if(_0x55b830){if(!isSessionEnabled(_0x55b830))return null;return{'sessionId':_0x55b830,'input':{'session_id':_0x55b830}};}const _0x3713f4=await _0x533098[_0x3b62eb(0x12e)](readHookInput),_0xf9dcf5=_0x3713f4?.['session_id'];if(!_0xf9dcf5||!isSessionEnabled(_0xf9dcf5))return null;return{'sessionId':_0xf9dcf5,'input':_0x3713f4};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1473c0,_0x23c35c){const _0x2ccd36=_0x1e12,_0x478b88=_0x1473c0();while(!![]){try{const _0x4bddad=-parseInt(_0x2ccd36(0x18f))/0x1+parseInt(_0x2ccd36(0x192))/0x2*(parseInt(_0x2ccd36(0x190))/0x3)+parseInt(_0x2ccd36(0x193))/0x4*(-parseInt(_0x2ccd36(0x19c))/0x5)+-parseInt(_0x2ccd36(0x195))/0x6+-parseInt(_0x2ccd36(0x191))/0x7*(parseInt(_0x2ccd36(0x196))/0x8)+parseInt(_0x2ccd36(0x197))/0x9*(-parseInt(_0x2ccd36(0x199))/0xa)+parseInt(_0x2ccd36(0x198))/0xb;if(_0x4bddad===_0x23c35c)break;else _0x478b88['push'](_0x478b88['shift']());}catch(_0x949e32){_0x478b88['push'](_0x478b88['shift']());}}}(_0x37d4,0x5a23b));function _0x1e12(_0x9a9a36,_0x2bc4fb){_0x9a9a36=_0x9a9a36-0x18f;const _0x37d443=_0x37d4();let _0x1e1266=_0x37d443[_0x9a9a36];return _0x1e1266;}import{printBlock,getEnabledHookContext}from'./output.js';function _0x37d4(){const _0x2d69da=['BwWwd','sessionId','84670MJnPHI','permission_mode','490358nJYniN','36shAXUy','338891VyaEKN','56026airomO','116PYzitU','===\x20RANGER:\x20ACTION\x20REQUIRED\x20===\x0a\x0aIf\x20this\x20plan\x20involves\x20ANY\x20UI\x20changes,\x20you\x20MUST:\x0a\x0a1.\x20**READ\x20/ranger\x20skill\x20NOW**\x20-\x20specifically\x20the\x20create.md\x20instructions\x0a2.\x20**Add\x20a\x20Ranger\x20Feature\x20Review\x20Specification**\x20to\x20the\x20end\x20of\x20your\x20plan\x0a\x0aDO\x20NOT\x20write\x20scenarios\x20without\x20reading\x20create.md\x20first.\x0aScenarios\x20are\x20E2E\x20test\x20flows,\x20NOT\x20implementation\x20tasks.\x0a\x0aYour\x20plan\x20must\x20end\x20with:\x0a```\x0a###\x20Ranger\x20Feature\x20Review\x20Specification\x20(create\x20this\x20first\x20with\x20`ranger\x20create`)\x0aFeature\x20Review\x20Name:\x20<name>\x0aDescription:\x20<description>\x0aScenarios:\x0a1.\x20<E2E\x20user\x20flow\x20that\x20can\x20be\x20verified\x20in\x20browser>\x0a2.\x20<another\x20E2E\x20user\x20flow\x20if\x20needed>\x0a```\x0a\x0aThen\x20run:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario1>\x22\x20-c\x20\x22<scenario2>\x22`\x0a\x0a===\x20END\x20===','2181336xdbTfT','56kQMzzU','288jQXuJt','22655622iPOrne','107080iyzKOi'];_0x37d4=function(){return _0x2d69da;};return _0x37d4();}import{shouldShowPlanReminder}from'../utils/sessionCache.js';export async function planReminder(_0x12bdf5){const _0x3c93a0=_0x1e12,_0x157239={'dnbVQ':function(_0x3e9389,_0x18ed4b){return _0x3e9389(_0x18ed4b);},'TsLhH':'plan','BwWwd':function(_0xe915b0,_0x109314){return _0xe915b0(_0x109314);}},_0x2f1d44=await _0x157239['dnbVQ'](getEnabledHookContext,_0x12bdf5);if(!_0x2f1d44)return;if(_0x2f1d44['input'][_0x3c93a0(0x19d)]!==_0x157239['TsLhH'])return;if(!_0x157239['dnbVQ'](shouldShowPlanReminder,_0x2f1d44[_0x3c93a0(0x19b)]))return;_0x157239[_0x3c93a0(0x19a)](printBlock,_0x3c93a0(0x194));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x479443,_0x3bb3d0){const _0x1bb9ae=_0x5cdc,_0x32d778=_0x479443();while(!![]){try{const _0x18089d=parseInt(_0x1bb9ae(0x1ea))/0x1+-parseInt(_0x1bb9ae(0x1e6))/0x2+parseInt(_0x1bb9ae(0x1ee))/0x3*(-parseInt(_0x1bb9ae(0x1eb))/0x4)+parseInt(_0x1bb9ae(0x1e9))/0x5+parseInt(_0x1bb9ae(0x1ec))/0x6+-parseInt(_0x1bb9ae(0x1e8))/0x7+parseInt(_0x1bb9ae(0x1e7))/0x8;if(_0x18089d===_0x3bb3d0)break;else _0x32d778['push'](_0x32d778['shift']());}catch(_0x281e79){_0x32d778['push'](_0x32d778['shift']());}}}(_0x5af9,0xdb7bb));function _0x5af9(){const _0x3eacc9=['5074495JLfMpH','739369xSxzbC','3752jxWhnK','7465740yQByzt','AJAoe','3093lyZsFt','3423348ZFnEdb','13069816aoffNw','7381710KZLOzS'];_0x5af9=function(){return _0x3eacc9;};return _0x5af9();}import{printBlock,getEnabledSessionId}from'./output.js';function _0x5cdc(_0x3a42b4,_0x31863d){_0x3a42b4=_0x3a42b4-0x1e6;const _0x5af9ae=_0x5af9();let _0x5cdc83=_0x5af9ae[_0x3a42b4];return _0x5cdc83;}export async function planStart(_0x1b5f9a){const _0x4742fe=_0x5cdc,_0x4516c3={'AJAoe':function(_0x368b1f,_0x473e78){return _0x368b1f(_0x473e78);}},_0x741a4d=await _0x4516c3[_0x4742fe(0x1ed)](getEnabledSessionId,_0x1b5f9a);if(!_0x741a4d)return;_0x4516c3[_0x4742fe(0x1ed)](printBlock,'===\x20RANGER:\x20ACTION\x20REQUIRED\x20===\x0a\x0aIf\x20this\x20plan\x20involves\x20UI\x20changes,\x20you\x20MUST:\x0a\x0a1.\x20**READ\x20/ranger\x20skill**\x20-\x20specifically\x20create.md\x0a2.\x20**Add\x20a\x20Ranger\x20Feature\x20Review\x20Specification**\x20at\x20the\x20end\x20of\x20your\x20plan\x0a\x0aScenarios\x20are\x20E2E\x20test\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\x22Button\x20is\x20visible\x22\x0a\x0aAfter\x20planning,\x20run:\x0a`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<E2E\x20flow\x201>\x22\x20-c\x20\x22<E2E\x20flow\x202>\x22`\x0a\x0a===\x20END\x20===');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x6a96(){const _0x5222b3=['285930rwkJTs','30280QGFkMp','255908JYBomM','RANGER:\x20If\x20this\x20change\x20expands\x20the\x20scope\x20of\x20the\x20active\x20feature\x20review,\x20you\x20may\x20need\x20to\x20add\x20a\x20scenario.\x20See\x20Workflow\x201\x20in\x20/ranger.\x20If\x20you\x20decide\x20to\x20add\x20a\x20scenario,\x20you\x20MUST\x20read\x20Workflow\x201\x20IN\x20DETAIL\x20first.\x20Remember:\x20when\x20you\x20finish\x20your\x20work,\x20your\x20final\x20message\x20to\x20the\x20user\x20must\x20direct\x20them\x20to\x20the\x20Ranger\x20feature\x20review\x20dashboard\x20to\x20review\x20(e.g.\x20\x22Go\x20to\x20the\x20Ranger\x20feature\x20dashboard\x20to\x20review:\x20https://dashboard.ranger.net/features/{feature_id}\x22).','log','56gYdNHB','68576oAJVTx','stringify','3vIudbz','3520ZWRPsx','55zlbYiK','229429tBoEwl','3358953ZkwRhx','PostToolUse','271676unVjzT','YBrZV','NoMdP'];_0x6a96=function(){return _0x5222b3;};return _0x6a96();}(function(_0x59f00f,_0x39b5c6){const _0x46fcd5=_0x509d,_0x1631b7=_0x59f00f();while(!![]){try{const _0x10bd69=parseInt(_0x46fcd5(0x1da))/0x1+parseInt(_0x46fcd5(0x1e2))/0x2*(parseInt(_0x46fcd5(0x1e8))/0x3)+parseInt(_0x46fcd5(0x1dd))/0x4+-parseInt(_0x46fcd5(0x1d9))/0x5*(-parseInt(_0x46fcd5(0x1e0))/0x6)+-parseInt(_0x46fcd5(0x1e5))/0x7*(parseInt(_0x46fcd5(0x1e6))/0x8)+parseInt(_0x46fcd5(0x1db))/0x9+parseInt(_0x46fcd5(0x1e1))/0xa*(-parseInt(_0x46fcd5(0x1d8))/0xb);if(_0x10bd69===_0x39b5c6)break;else _0x1631b7['push'](_0x1631b7['shift']());}catch(_0x2abc25){_0x1631b7['push'](_0x1631b7['shift']());}}}(_0x6a96,0x45a04));import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';function _0x509d(_0xce6e57,_0xb7f093){_0xce6e57=_0xce6e57-0x1d8;const _0x6a9620=_0x6a96();let _0x509d5f=_0x6a9620[_0xce6e57];return _0x509d5f;}import{getToken}from'../utils/keychain.js';import{getEnabledSessionId}from'./output.js';export async function postEdit(_0x49d8d6){const _0x53613e=_0x509d,_0x1e491b={'fBXlP':function(_0x3be240,_0x5d0d99){return _0x3be240(_0x5d0d99);},'YBrZV':function(_0x3eb7bc){return _0x3eb7bc();},'TfAuh':function(_0x8407b9,_0x213ebc){return _0x8407b9(_0x213ebc);},'NoMdP':_0x53613e(0x1dc)},_0x28209c=await getEnabledSessionId(_0x49d8d6);if(!_0x28209c)return;_0x1e491b['fBXlP'](updateBranchTracking,_0x28209c);const _0xfddecc=await _0x1e491b[_0x53613e(0x1de)](getToken);if(!_0xfddecc)return;const _0x2c442e=_0x1e491b['TfAuh'](getSessionEntry,_0x28209c);if(_0x2c442e){const _0x4ec09f={'hookSpecificOutput':{'hookEventName':_0x1e491b[_0x53613e(0x1df)],'additionalContext':_0x53613e(0x1e3)}};console['log'](JSON[_0x53613e(0x1e7)](_0x4ec09f));return;}const _0x51e4f2={'hookSpecificOutput':{'hookEventName':_0x1e491b['NoMdP'],'additionalContext':'RANGER:\x20If\x20this\x20is\x20for\x20a\x20UI\x20feature,\x20you\x20MUST\x20use\x20/ranger\x20to\x20either\x20create\x20a\x20new\x20feature\x20review\x20or\x20resume\x20an\x20existing\x20one.'}};console[_0x53613e(0x1e4)](JSON[_0x53613e(0x1e7)](_0x51e4f2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3149c2,_0x51e29b){const _0x164750=_0x4b31,_0x1ce17e=_0x3149c2();while(!![]){try{const _0x1635f0=-parseInt(_0x164750(0xe9))/0x1+-parseInt(_0x164750(0xf0))/0x2*(parseInt(_0x164750(0xec))/0x3)+parseInt(_0x164750(0xf3))/0x4+-parseInt(_0x164750(0xea))/0x5*(-parseInt(_0x164750(0xeb))/0x6)+parseInt(_0x164750(0xed))/0x7*(-parseInt(_0x164750(0xef))/0x8)+-parseInt(_0x164750(0xf2))/0x9+-parseInt(_0x164750(0xe8))/0xa*(-parseInt(_0x164750(0xf1))/0xb);if(_0x1635f0===_0x51e29b)break;else _0x1ce17e['push'](_0x1ce17e['shift']());}catch(_0x10e1c8){_0x1ce17e['push'](_0x1ce17e['shift']());}}}(_0x544b,0xaddef));import{getToken}from'../utils/keychain.js';import{printBlock,getEnabledSessionId}from'./output.js';function _0x4b31(_0x3108db,_0x55c429){_0x3108db=_0x3108db-0xe8;const _0x544ba7=_0x544b();let _0x4b3142=_0x544ba7[_0x3108db];return _0x4b3142;}function _0x544b(){const _0x27f253=['2004YkuSyG','296569ODnJUN','===\x20RANGER:\x20PRESERVE\x20IN\x20COMPACTION\x20===\x0a\x0aIf\x20you\x20created\x20a\x20plan\x20with\x20a\x20**Ranger\x20Feature\x20Review\x20Specification**,\x20you\x20MUST\x20preserve\x20it\x20in\x20the\x20compaction\x20summary.\x0a\x0aThe\x20specification\x20contains\x20scenarios\x20that\x20will\x20be\x20used\x20with\x20`ranger\x20create`.','8XMXZVX','2358Xzasnv','77XMvvEu','11602341dGiCZY','3157780SivcdR','3555390uZjnhA','1145758dFBQex','35rHLpbQ','598974jnJfoC'];_0x544b=function(){return _0x27f253;};return _0x544b();}export async function preCompact(_0x3c4160){const _0x717a89=_0x4b31,_0x5e38ba={'aPOGB':function(_0x418e74,_0x5bb14c){return _0x418e74(_0x5bb14c);}},_0x4534c0=await _0x5e38ba['aPOGB'](getEnabledSessionId,_0x3c4160);if(!_0x4534c0)return;try{const _0x3e996e=await getToken();if(!_0x3e996e)return;printBlock(_0x717a89(0xee));}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x187a(_0x368027,_0x269048){_0x368027=_0x368027-0x6d;const _0x230e49=_0x230e();let _0x187a53=_0x230e49[_0x368027];return _0x187a53;}(function(_0x1ff490,_0x300589){const _0x509491=_0x187a,_0x1789eb=_0x1ff490();while(!![]){try{const _0x5c89bd=-parseInt(_0x509491(0x73))/0x1*(-parseInt(_0x509491(0x79))/0x2)+parseInt(_0x509491(0x74))/0x3*(-parseInt(_0x509491(0x75))/0x4)+parseInt(_0x509491(0x71))/0x5+-parseInt(_0x509491(0x6e))/0x6*(-parseInt(_0x509491(0x77))/0x7)+-parseInt(_0x509491(0x72))/0x8+-parseInt(_0x509491(0x76))/0x9*(-parseInt(_0x509491(0x6f))/0xa)+-parseInt(_0x509491(0x70))/0xb*(-parseInt(_0x509491(0x6d))/0xc);if(_0x5c89bd===_0x300589)break;else _0x1789eb['push'](_0x1789eb['shift']());}catch(_0x414f20){_0x1789eb['push'](_0x1789eb['shift']());}}}(_0x230e,0x7bffd));import{recordEnabledSessionCleared}from'../utils/sessionCache.js';function _0x230e(){const _0x6128c5=['578455ISAGqj','2797648JmDhBM','675419KfGNYQ','3wrYKZY','4047772vGIcIZ','2390517OXucBj','7tzXcQt','EDDlE','2eMrIiG','136416vllKrm','2285058YKwjuW','10yhkjuS','418UCyOMZ'];_0x230e=function(){return _0x6128c5;};return _0x230e();}import{readHookInput}from'./output.js';export async function sessionEnd(_0x2327d0){const _0x2047f9=_0x187a,_0x4fe0fa={'EDDlE':function(_0x553862,_0x533f29){return _0x553862(_0x533f29);}};let _0x52a337=_0x2327d0,_0x1799d;if(!_0x2327d0){const _0x226fe0=await readHookInput();_0x52a337=_0x226fe0?.['session_id'],_0x1799d=_0x226fe0?.['reason'];}if(!_0x52a337)return;_0x1799d==='clear'&&_0x4fe0fa[_0x2047f9(0x78)](recordEnabledSessionCleared,_0x52a337);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2424a8=_0x4a2c;(function(_0x5f225e,_0x3cc5d7){const _0x3fa30c=_0x4a2c,_0x1f8c7b=_0x5f225e();while(!![]){try{const _0x144908=parseInt(_0x3fa30c(0x1f4))/0x1*(-parseInt(_0x3fa30c(0x1f5))/0x2)+parseInt(_0x3fa30c(0x1fa))/0x3*(parseInt(_0x3fa30c(0x1f9))/0x4)+parseInt(_0x3fa30c(0x202))/0x5*(-parseInt(_0x3fa30c(0x1fe))/0x6)+-parseInt(_0x3fa30c(0x1ef))/0x7*(-parseInt(_0x3fa30c(0x201))/0x8)+-parseInt(_0x3fa30c(0x1f6))/0x9+-parseInt(_0x3fa30c(0x203))/0xa+parseInt(_0x3fa30c(0x204))/0xb*(parseInt(_0x3fa30c(0x1f1))/0xc);if(_0x144908===_0x3cc5d7)break;else _0x1f8c7b['push'](_0x1f8c7b['shift']());}catch(_0x172dea){_0x1f8c7b['push'](_0x1f8c7b['shift']());}}}(_0x2d2d,0x5b5c8));import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';function _0x2d2d(){const _0x2398bb=['526EhEGna','2969280eaTCql','parse','source','124PwWhVO','44655pYGOBP','qJhvA','env','trackCommandEnd','1506BUoEaX','ZdLgN','swtZT','7640zoxXoH','11090qLdbuQ','4594630NVzjqf','7942nmYSJX','hook:session-start','success','CLAUDE_ENV_FILE','5110nPnDrt','export\x20CLAUDE_SESSION_ID=\x22','11076sioKfZ','=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================','trackCommandStart','398auZXux'];_0x2d2d=function(){return _0x2398bb;};return _0x2d2d();}import{createTelemetryCollector}from'../utils/telemetry.js';const RANGER_AUTO_ENABLED_PROMPT=_0x2424a8(0x1f2);function _0x4a2c(_0x2132e5,_0x1be683){_0x2132e5=_0x2132e5-0x1ee;const _0x2d2d34=_0x2d2d();let _0x4a2cca=_0x2d2d34[_0x2132e5];return _0x4a2cca;}export async function sessionStart(_0x24e96f){const _0x17b53b=_0x2424a8,_0x311e8b={'qJhvA':function(_0xe498c5,_0x5bcf9d){return _0xe498c5||_0x5bcf9d;},'ZdLgN':function(_0x2f22ac,_0x4e9f81){return _0x2f22ac(_0x4e9f81);},'scjRL':_0x17b53b(0x205),'kCKRx':_0x17b53b(0x206),'JtYto':function(_0x45007b,_0x26028b){return _0x45007b!==_0x26028b;},'swtZT':function(_0x59ff39,_0x4f7af8){return _0x59ff39!==_0x4f7af8;},'OddAt':'SessionStart','fKATA':function(_0x34e57d,_0x243209){return _0x34e57d+_0x243209;}};let _0x1e1d2e=_0x311e8b[_0x17b53b(0x1fb)](_0x24e96f,''),_0xdb9e5c;if(!_0x24e96f){let _0x3c95d5='';for await(const _0x4a8e56 of process['stdin']){_0x3c95d5+=_0x4a8e56;}try{const _0x2c69e7=JSON[_0x17b53b(0x1f7)](_0x3c95d5);_0x1e1d2e=_0x2c69e7['session_id']||'',_0xdb9e5c=_0x2c69e7[_0x17b53b(0x1f8)];}catch{}const _0x43139f=process[_0x17b53b(0x1fc)][_0x17b53b(0x1ee)];if(_0x43139f&&_0x1e1d2e)try{await appendFile(_0x43139f,_0x17b53b(0x1f0)+_0x1e1d2e+'\x22\x0a');}catch{}}if(_0x1e1d2e){shouldAutoEnableAfterClear(_0xdb9e5c)&&_0x311e8b[_0x17b53b(0x1ff)](autoEnableAfterClear,_0x1e1d2e);_0x311e8b[_0x17b53b(0x1ff)](initBranchTracking,_0x1e1d2e);const _0x52b8ec=_0x311e8b[_0x17b53b(0x1ff)](isSessionEnabled,_0x1e1d2e);try{const _0x3d7e98=createTelemetryCollector(_0x311e8b['scjRL']);await _0x3d7e98[_0x17b53b(0x1f3)]({'sessionId':_0x1e1d2e,'hooksEnabled':_0x52b8ec}),await _0x3d7e98[_0x17b53b(0x1fd)](_0x311e8b['kCKRx']);}catch{}if(_0x52b8ec){const _0xd87e27=getCurrentBranch(),_0xe42574=_0xd87e27&&_0x311e8b['JtYto'](_0xd87e27,'main')&&_0x311e8b[_0x17b53b(0x200)](_0xd87e27,'master')?'\x20(Branch:\x20'+_0xd87e27+')':'',_0x37df64={'hookSpecificOutput':{'hookEventName':_0x311e8b['OddAt'],'additionalContext':_0x311e8b['fKATA'](RANGER_AUTO_ENABLED_PROMPT,_0xe42574)}};console['log'](JSON['stringify'](_0x37df64));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23f625,_0x4f0219){const _0x2d7160=_0x28d8,_0x51d335=_0x23f625();while(!![]){try{const _0x4723b9=-parseInt(_0x2d7160(0x14b))/0x1*(parseInt(_0x2d7160(0x134))/0x2)+-parseInt(_0x2d7160(0x135))/0x3*(-parseInt(_0x2d7160(0x14d))/0x4)+-parseInt(_0x2d7160(0x139))/0x5+-parseInt(_0x2d7160(0x136))/0x6*(-parseInt(_0x2d7160(0x149))/0x7)+-parseInt(_0x2d7160(0x140))/0x8+parseInt(_0x2d7160(0x14c))/0x9+-parseInt(_0x2d7160(0x14e))/0xa*(-parseInt(_0x2d7160(0x141))/0xb);if(_0x4723b9===_0x4f0219)break;else _0x51d335['push'](_0x51d335['shift']());}catch(_0x45ff8f){_0x51d335['push'](_0x51d335['shift']());}}}(_0x14c5,0x587fe));import{open}from'fs/promises';import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x14c5(){const _0x43fd48=['1177dOsfDr','https://dashboard.ranger.net/features/','\x20for\x20\x22','input','alloc','message','mshBK','KSgNE','105obhTyH','hook:stop','2AQHIaJ','5966010mxCgjS','622852NCuqOS','290oCYtvs','transcript_path','min','stop_hook_active','currentSessionId','stringify','469462LtcTUt','12EQCxaA','97386pDrmMU','toString',':\x0a\x0a','73510nGQCQE','SfHJn','sessionId','FZqQN','pNReW','includes','RANGER_SKIP_VERIFICATION','5485216UgTrEF'];_0x14c5=function(){return _0x43fd48;};return _0x14c5();}export async function stopHook(_0x5cccb7){const _0x4843a2=_0x28d8,_0x2ee6d7={'SBpIv':function(_0x48ba31,_0x4f1b71){return _0x48ba31(_0x4f1b71);},'DpPpP':function(_0x49b6cb,_0x53ce08){return _0x49b6cb===_0x53ce08;},'SfHJn':function(_0x4b766c,_0x4a3bc0,_0x4aa458,_0x2f0c4f){return _0x4b766c(_0x4a3bc0,_0x4aa458,_0x2f0c4f);},'KSgNE':function(_0x4f9191,_0x396efe){return _0x4f9191(_0x396efe);},'GfqtQ':_0x4843a2(0x13f),'llfNP':function(_0xceb00,_0x113859,_0x28aaf3){return _0xceb00(_0x113859,_0x28aaf3);},'pNReW':function(_0x5627fb,_0xb6b3d5){return _0x5627fb instanceof _0xb6b3d5;},'FZqQN':function(_0x191db1,_0x5ae985,_0x5328c2,_0x3f644d){return _0x191db1(_0x5ae985,_0x5328c2,_0x3f644d);}},_0x33a146=await getEnabledHookContext(_0x5cccb7),_0x13ed73=_0x33a146?.[_0x4843a2(0x13b)]??null,_0x239d24=_0x2ee6d7['SBpIv'](Boolean,_0x33a146?.['input']?.[_0x4843a2(0x151)]),_0x3341e2=_0x2ee6d7['DpPpP'](typeof _0x33a146?.[_0x4843a2(0x144)]?.[_0x4843a2(0x14f)],'string')?_0x33a146[_0x4843a2(0x144)][_0x4843a2(0x14f)]:null;let _0x1138b2=!![];if(!_0x13ed73){await _0x2ee6d7['SfHJn'](trackStop,_0x13ed73,![],_0x1138b2);return;}try{const _0x4dcb81=_0x2ee6d7['KSgNE'](getSessionEntry,_0x13ed73);if(!_0x4dcb81){await trackStop(_0x13ed73,!![],_0x1138b2);return;}const _0x329c29=_0x4843a2(0x142)+_0x4dcb81['featureId'],_0x3f9857=_0x2ee6d7['GfqtQ'],_0x3c6fd6=await getToken(),_0x5c5acb=!_0x239d24;let _0x2bce61=null,_0x5672ca=null;const _0x4f0d48=_0x239d24&&await _0x2ee6d7['llfNP'](transcriptHasToken,_0x3341e2,_0x3f9857),_0x5d93=await transcriptHasToken(_0x3341e2,_0x329c29);if(_0x3c6fd6)try{const _0x384158=await getFeature(_0x4dcb81['featureId']);_0x2bce61=_0x384158['name']??null,_0x5672ca=_0x384158[_0x4843a2(0x152)]??null;}catch{}if(_0x3c6fd6&&_0x5672ca)try{await concludeSession(_0x4dcb81['featureId'],_0x5672ca);}catch(_0x160e79){if(_0x4f0d48){await trackStop(_0x13ed73,!![],_0x1138b2);return;}_0x1138b2=![];const _0x457e20=_0x2ee6d7[_0x4843a2(0x13d)](_0x160e79,Error)?_0x160e79[_0x4843a2(0x146)]:_0x2ee6d7[_0x4843a2(0x148)](String,_0x160e79),_0x489694={'decision':'block','reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x2bce61?_0x4843a2(0x143)+_0x2bce61+'\x22':'')+_0x4843a2(0x138)+_0x457e20+'\x0a\x0aThis\x20is\x20most\x20likely\x20due\x20to\x20pending\x20scenarios\x20that\x20need\x20to\x20be\x20verified.\x20Please\x20resolve\x20the\x20issue\x20or\x20resume\x20later\x20with:\x0a\x20\x20ranger\x20resume\x0a\x0aIf\x20you\x20are\x20extremely\x20sure\x20this\x20is\x20the\x20user\x27s\x20requirement\x20and\x20want\x20to\x20skip\x20verification\x20for\x20now,\x20send\x20a\x20final\x20message\x20that\x20includes\x20the\x20feature\x20review\x20link\x20('+_0x329c29+')\x20and\x20the\x20token\x20`'+_0x3f9857+'`,\x20then\x20run\x20/exit\x20again.'};console['log'](JSON[_0x4843a2(0x133)](_0x489694)),await trackStop(_0x13ed73,!![],_0x1138b2);return;}await _0x2ee6d7[_0x4843a2(0x13a)](trackStop,_0x13ed73,!![],_0x1138b2);return;}catch{await _0x2ee6d7[_0x4843a2(0x13c)](trackStop,_0x13ed73,!![],_0x1138b2);return;}}async function trackStop(_0x2186ec,_0x50da9d,_0x2e69c9){const _0x77f761=_0x28d8,_0x4cf74a={'zfKMv':'success'};try{const _0x3fbac1=createTelemetryCollector(_0x77f761(0x14a));await _0x3fbac1['trackCommandStart']({'sessionId':_0x2186ec??undefined,'hooksEnabled':_0x50da9d,'stopAllowed':_0x2e69c9}),await _0x3fbac1['trackCommandEnd'](_0x4cf74a['zfKMv']);}catch{}}function _0x28d8(_0x5880f1,_0x27421e){_0x5880f1=_0x5880f1-0x133;const _0x14c5a5=_0x14c5();let _0x28d849=_0x14c5a5[_0x5880f1];return _0x28d849;}async function transcriptHasToken(_0x39f08f,_0x4fd480){const _0x23605f=_0x28d8;if(!_0x39f08f)return![];const _0x5a3811=await readTranscriptTail(_0x39f08f,0x30d40);return _0x5a3811?_0x5a3811[_0x23605f(0x13e)](_0x4fd480):![];}async function readTranscriptTail(_0x48b51b,_0x3f6cbe){const _0x2ddfa5=_0x28d8,_0x433840={'ziqCv':function(_0x1bdd95,_0x432c61){return _0x1bdd95<=_0x432c61;},'LdouO':function(_0x3eac61,_0x5da465){return _0x3eac61-_0x5da465;},'mshBK':'utf8'};let _0x31833=null;try{_0x31833=await open(_0x48b51b,'r');const _0x4121e9=await _0x31833['stat'](),_0x206e4c=Math[_0x2ddfa5(0x150)](_0x4121e9['size'],_0x3f6cbe);if(_0x433840['ziqCv'](_0x206e4c,0x0))return'';const _0x3e8fad=Buffer[_0x2ddfa5(0x145)](_0x206e4c);return await _0x31833['read'](_0x3e8fad,0x0,_0x206e4c,_0x433840['LdouO'](_0x4121e9['size'],_0x206e4c)),_0x3e8fad[_0x2ddfa5(0x137)](_0x433840[_0x2ddfa5(0x147)]);}catch{return null;}finally{try{await _0x31833?.['close']();}catch{}}}
|