@ranger-testing/ranger-cli 2.1.8 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/stitchWebmFiles.js +1 -0
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/package.json +1 -1
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x38675b=_0x2e0d;(function(_0x153058,_0x58bf7c){const _0x5e1295=_0x2e0d,_0x77dcc4=_0x153058();while(!![]){try{const _0x5b1e3a=-parseInt(_0x5e1295(0x197))/0x1+parseInt(_0x5e1295(0x194))/0x2*(-parseInt(_0x5e1295(0x1a6))/0x3)+-parseInt(_0x5e1295(0x1ab))/0x4+parseInt(_0x5e1295(0x19d))/0x5+parseInt(_0x5e1295(0x199))/0x6+-parseInt(_0x5e1295(0x19c))/0x7*(parseInt(_0x5e1295(0x192))/0x8)+parseInt(_0x5e1295(0x195))/0x9*(parseInt(_0x5e1295(0x1ad))/0xa);if(_0x5b1e3a===_0x58bf7c)break;else _0x77dcc4['push'](_0x77dcc4['shift']());}catch(_0x36a734){_0x77dcc4['push'](_0x77dcc4['shift']());}}}(_0x21a8,0x44628));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';import{readActiveProfileName}from'./utils/activeProfile.js';function _0x21a8(){const _0x314db3=['133XqFtbO','1180935mTPoDD','sessions','environmentDetails','\x0aProfiles:','bug-bashes','reports','.txt','log','endsWith','5628sdeWrW','includes','VugDC','baseUrl','\x20\x20\x20\x20\x20\x20Details:\x20','1968620epBmKw','SFSdr','5618190PEevka','local','RdAZV','GYsRQ','push','46960gyloqs','Run:\x20ranger\x20profile\x20add\x20<profile-name>','50TyuCcd','9ohwrfj','legacy','301975PWxmRJ','\x0aNo\x20profiles\x20found.','2607948Qfsupb','hZEQm','settings.json'];_0x21a8=function(){return _0x314db3;};return _0x21a8();}function _0x2e0d(_0x339e67,_0xaff419){_0x339e67=_0x339e67-0x191;const _0x21a8f2=_0x21a8();let _0x2e0d16=_0x21a8f2[_0x339e67];return _0x2e0d16;}const NON_ENV_DIRS=[_0x38675b(0x19e),_0x38675b(0x1a1),_0x38675b(0x1a2),_0x38675b(0x1ae),'ci'];export async function getEnvNames(){const _0x332a29=_0x38675b,_0x1c8322={'DhCrN':function(_0x6a9e9f){return _0x6a9e9f();},'UlqFD':function(_0xcdcc94,_0x503a8e){return _0xcdcc94(_0x503a8e);},'SFSdr':function(_0x265939,_0x15d7bf,_0x3637bc){return _0x265939(_0x15d7bf,_0x3637bc);},'NaCpn':function(_0x2b3684,_0x330e64){return _0x2b3684(_0x330e64);},'BfvdB':function(_0x15f8dd,_0x1822db){return _0x15f8dd(_0x1822db);},'RdAZV':_0x332a29(0x19b),'hZEQm':_0x332a29(0x196)},_0x2b0eff=getRangerDir();if(!existsSync(_0x2b0eff))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x4c756=await _0x1c8322['DhCrN'](readActiveProfileName),_0x3c2fb7=[],_0x28aa5={},_0xc7eb79=join(_0x2b0eff,'local');if(_0x1c8322['UlqFD'](existsSync,_0xc7eb79)){const _0x1e7685=await readdir(_0xc7eb79);for(const _0x2f7e5d of _0x1e7685){const _0x1706b3=join(_0xc7eb79,_0x2f7e5d),_0x2d05bf=await _0x1c8322['UlqFD'](stat,_0x1706b3);_0x2d05bf['isDirectory']()&&(_0x3c2fb7['push'](_0x2f7e5d),_0x28aa5[_0x2f7e5d]=_0x332a29(0x1ae));}}const _0x22c840=_0x1c8322[_0x332a29(0x1ac)](join,_0x2b0eff,'ci');if(existsSync(_0x22c840)){const _0x21f667=await _0x1c8322['UlqFD'](readdir,_0x22c840);for(const _0x49bdd2 of _0x21f667){const _0x39ef7f=_0x1c8322['SFSdr'](join,_0x22c840,_0x49bdd2),_0x31d9db=await stat(_0x39ef7f);_0x31d9db['isDirectory']()&&(_0x3c2fb7[_0x332a29(0x191)](_0x49bdd2),_0x28aa5[_0x49bdd2]='ci');}}const _0x10de5d=await readdir(_0x2b0eff);for(const _0x7b7ac7 of _0x10de5d){if(NON_ENV_DIRS[_0x332a29(0x1a7)](_0x7b7ac7))continue;if(_0x7b7ac7['startsWith']('.'))continue;if(_0x7b7ac7[_0x332a29(0x1a5)](_0x332a29(0x1a3)))continue;const _0x54679b=join(_0x2b0eff,_0x7b7ac7),_0x15512f=await _0x1c8322['NaCpn'](stat,_0x54679b);_0x15512f['isDirectory']()&&_0x1c8322['BfvdB'](existsSync,join(_0x54679b,_0x1c8322[_0x332a29(0x1af)]))&&(!_0x3c2fb7['includes'](_0x7b7ac7)&&(_0x3c2fb7[_0x332a29(0x191)](_0x7b7ac7),_0x28aa5[_0x7b7ac7]=_0x1c8322[_0x332a29(0x19a)]));}return{'envNames':_0x3c2fb7,'activeEnv':_0x4c756,'envTypes':_0x28aa5};}export async function envList(){const _0x5a2bb6=_0x38675b,_0x50a5a2={'OFQHz':function(_0x2a8fe6){return _0x2a8fe6();},'GYsRQ':function(_0x18a504,_0x2ec2d4){return _0x18a504===_0x2ec2d4;},'hksWX':_0x5a2bb6(0x198),'xkFce':function(_0x2fdeac,_0x121020){return _0x2fdeac===_0x121020;},'VugDC':_0x5a2bb6(0x1ae)},{envNames:_0x171a17,activeEnv:_0x5ee1c4,envTypes:_0x5673bd}=await _0x50a5a2['OFQHz'](getEnvNames);if(_0x50a5a2[_0x5a2bb6(0x1b0)](_0x171a17['length'],0x0)){console['log'](_0x50a5a2['hksWX']),console[_0x5a2bb6(0x1a4)](_0x5a2bb6(0x193));return;}console['log'](_0x5a2bb6(0x1a0));for(const _0x187d48 of _0x171a17['sort']()){const _0x89ecff=_0x50a5a2['xkFce'](_0x187d48,_0x5ee1c4),_0x4e7a98=_0x5673bd[_0x187d48]||_0x50a5a2[_0x5a2bb6(0x1a8)],_0x33c95a=await loadSettings(_0x187d48),_0x1c0a08=_0x4e7a98===_0x5a2bb6(0x196)?'':'\x20['+_0x4e7a98+']';console[_0x5a2bb6(0x1a4)]('\x20\x20'+(_0x89ecff?'*\x20':'\x20\x20')+_0x187d48+_0x1c0a08),_0x33c95a[_0x5a2bb6(0x1a9)]&&console[_0x5a2bb6(0x1a4)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x33c95a[_0x5a2bb6(0x1a9)]),_0x33c95a[_0x5a2bb6(0x19f)]&&console[_0x5a2bb6(0x1a4)](_0x5a2bb6(0x1aa)+_0x33c95a[_0x5a2bb6(0x19f)]);}_0x5ee1c4&&console[_0x5a2bb6(0x1a4)]('\x0a*\x20=\x20active\x20profile');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2c0418=_0x4321;(function(_0x2d6654,_0x288619){const _0x3f5d31=_0x4321,_0x2d0001=_0x2d6654();while(!![]){try{const _0x28367e=parseInt(_0x3f5d31(0x119))/0x1*(-parseInt(_0x3f5d31(0x14a))/0x2)+parseInt(_0x3f5d31(0x13d))/0x3+parseInt(_0x3f5d31(0x10e))/0x4*(-parseInt(_0x3f5d31(0x133))/0x5)+-parseInt(_0x3f5d31(0x16f))/0x6*(parseInt(_0x3f5d31(0xd4))/0x7)+parseInt(_0x3f5d31(0xe7))/0x8*(parseInt(_0x3f5d31(0x12f))/0x9)+-parseInt(_0x3f5d31(0x17b))/0xa+parseInt(_0x3f5d31(0x134))/0xb;if(_0x28367e===_0x288619)break;else _0x2d0001['push'](_0x2d0001['shift']());}catch(_0x56dbbb){_0x2d0001['push'](_0x2d0001['shift']());}}}(_0x2c30,0x859ac));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x34319d 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';function _0x4321(_0x39044c,_0x2b3afa){_0x39044c=_0x39044c-0xcd;const _0x2c30a1=_0x2c30();let _0x4321ab=_0x2c30a1[_0x39044c];return _0x4321ab;}import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';const ACTIVE_FEATURE_FILE='active-feature.txt',bold=_0x31606f=>_0x2c0418(0x11d)+_0x31606f+_0x2c0418(0x173);function getGitRepoUrl(){const _0x25453c=_0x2c0418,_0x126328={'bYgKS':function(_0x5412a6,_0x4a0687,_0x1db043){return _0x5412a6(_0x4a0687,_0x1db043);},'zgUEV':'utf-8','BFHUT':'pipe'};try{const _0x186691=_0x126328[_0x25453c(0xdf)](execSync,_0x25453c(0x150),{'encoding':_0x126328[_0x25453c(0xde)],'stdio':[_0x126328[_0x25453c(0x124)],_0x126328['BFHUT'],_0x25453c(0x163)]})['trim']();return _0x186691[_0x25453c(0xe6)](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')[_0x25453c(0xe6)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x7e9ae1=_0x2c0418,_0x30d058={'vHapu':function(_0x375dad,_0x4e791d,_0x25820a){return _0x375dad(_0x4e791d,_0x25820a);},'QRtQv':_0x7e9ae1(0xfd),'KzwVq':'pipe'};try{return _0x30d058[_0x7e9ae1(0x171)](execSync,_0x30d058[_0x7e9ae1(0x147)],{'encoding':_0x7e9ae1(0x18a),'stdio':[_0x7e9ae1(0x163),_0x7e9ae1(0x163),_0x30d058['KzwVq']]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x1c6e61=_0x2c0418,_0x5613ee={'wCFUj':function(_0x376459){return _0x376459();},'CKWSa':function(_0x2c4030,_0x55cc7c){return _0x2c4030(_0x55cc7c);},'Iivrq':function(_0x477b66,_0x3ee9d1,_0x4b64c0){return _0x477b66(_0x3ee9d1,_0x4b64c0);}},_0x36e179=join(_0x5613ee[_0x1c6e61(0xf6)](getRangerDir),ACTIVE_FEATURE_FILE);if(!_0x5613ee[_0x1c6e61(0xf3)](existsSync,_0x36e179))return null;try{const _0x53a02f=await _0x5613ee['Iivrq'](readFile,_0x36e179,_0x1c6e61(0x18a));return _0x53a02f['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x52d7a8){const _0x5adcff=_0x2c0418,_0x285a1e={'NXiFZ':function(_0x32fd3e){return _0x32fd3e();},'QJXpN':function(_0x256bac,_0x21d36d,_0x363285){return _0x256bac(_0x21d36d,_0x363285);},'pMosW':function(_0x1fa8fa,_0x20c654){return _0x1fa8fa(_0x20c654);}},_0x4d89ac=_0x285a1e['NXiFZ'](getRangerDir),_0x542624=_0x285a1e['QJXpN'](join,_0x4d89ac,ACTIVE_FEATURE_FILE);!_0x285a1e[_0x5adcff(0x105)](existsSync,_0x4d89ac)&&await mkdir(_0x4d89ac,{'recursive':!![]}),await writeFile(_0x542624,_0x52d7a8,'utf-8');}function getProgressDisplay(_0x35172b){const _0x103cfc=_0x2c0418,_0xebce64={'oScpl':function(_0x3c081b,_0x4a3b85){return _0x3c081b+_0x4a3b85;},'iHykS':function(_0x5c6ff1,_0x5ac280){return _0x5c6ff1+_0x5ac280;},'nRTLC':function(_0x531c54,_0x73bd54){return _0x531c54+_0x73bd54;},'flVqI':function(_0x33a121,_0x2cdae6){return _0x33a121-_0x2cdae6;},'bDaXe':function(_0xcd1ac9,_0x49861b){return _0xcd1ac9>_0x49861b;},'sIDkP':function(_0x1f8eba,_0x2a64df){return _0x1f8eba>_0x2a64df;},'IsRWy':function(_0x530272,_0x159126){return _0x530272>_0x159126;}},_0x119fea=_0x35172b[_0x103cfc(0x125)]||0x0,_0x1c79c7=_0x35172b[_0x103cfc(0xcd)]||0x0,_0x51ecb0=_0x35172b[_0x103cfc(0xdc)]||0x0,_0x3a1ff7=_0x35172b['incompleteItems']||0x0,_0x4bcb7f=_0x35172b[_0x103cfc(0x10a)]||0x0,_0x230feb=_0xebce64[_0x103cfc(0x152)](_0xebce64['iHykS'](_0xebce64[_0x103cfc(0x13e)](_0x119fea,_0x1c79c7),_0x51ecb0),_0x3a1ff7)+_0x4bcb7f;if(_0x230feb===0x0)return'-';const _0x1fe2a6=0xa,_0x16b6c7=Math['round'](_0x119fea/_0x230feb*_0x1fe2a6),_0x29db55=_0xebce64[_0x103cfc(0x13e)]('█'[_0x103cfc(0x121)](_0x16b6c7),'░'['repeat'](_0xebce64[_0x103cfc(0xd7)](_0x1fe2a6,_0x16b6c7))),_0x1d25fc=[];if(_0xebce64['bDaXe'](_0x51ecb0,0x0))_0x1d25fc['push'](_0x51ecb0+_0x103cfc(0x18f));if(_0xebce64[_0x103cfc(0x176)](_0x3a1ff7,0x0))_0x1d25fc[_0x103cfc(0x185)](_0x3a1ff7+_0x103cfc(0xf0));if(_0xebce64[_0x103cfc(0x15e)](_0x1c79c7,0x0))_0x1d25fc['push'](_0x1c79c7+_0x103cfc(0xe5));const _0x46b355=_0xebce64[_0x103cfc(0x12b)](_0x1d25fc['length'],0x0)?'\x20('+_0x1d25fc[_0x103cfc(0x108)](',\x20')+')':'';return _0x29db55+'\x20'+_0x119fea+'/'+_0x230feb+_0x103cfc(0x113)+_0x46b355;}function getCurrentSessionItems(_0x76c821,_0x22de81){const _0x70ca3a=_0x2c0418;if(!_0x76c821['currentSessionId'])return _0x22de81['filter'](_0x520115=>!_0x520115['sessionId'])['sort']((_0xa84d3e,_0x3880b4)=>_0xa84d3e[_0x70ca3a(0x166)]-_0x3880b4['position']);return _0x22de81['filter'](_0x1247d8=>_0x1247d8[_0x70ca3a(0x153)]===_0x76c821['currentSessionId']||!_0x1247d8['sessionId'])[_0x70ca3a(0xd3)]((_0x210cde,_0x5252e3)=>_0x210cde[_0x70ca3a(0x166)]-_0x5252e3['position']);}function displayFeature(_0x123734,_0x4655fa){const _0x36dfca=_0x2c0418,_0x573db3={'yVtDf':function(_0x1b4dc6,_0x98f794){return _0x1b4dc6===_0x98f794;},'CEHFP':_0x36dfca(0x167),'pqaxB':function(_0x3e76af,_0x2194c9){return _0x3e76af===_0x2194c9;},'TZtJf':function(_0x1705c4,_0x176c80){return _0x1705c4===_0x176c80;},'aAsWq':'closed','LKVff':_0x36dfca(0xfc),'ialBG':function(_0x33e6f2,_0x3cb079){return _0x33e6f2>_0x3cb079;},'BLHhK':function(_0x1e4db9,_0x4d07c4){return _0x1e4db9!==_0x4d07c4;},'KwEBJ':'verified','lEUTi':'blocked','IXhnk':function(_0x4ac4e9,_0x2d36cb){return _0x4ac4e9===_0x2d36cb;},'dHqQU':function(_0x222758,_0x254e47){return _0x222758===_0x254e47;}};console['log']('\x0a'+_0x123734['name']+'\x20('+_0x123734['dashboardUrl']+')');_0x123734['stats']&&console['log']('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x123734['stats']));_0x123734['description']&&console[_0x36dfca(0x103)]('\x20\x20\x20Description:\x20'+_0x123734[_0x36dfca(0x13b)]);_0x123734[_0x36dfca(0x16e)]&&console['log'](_0x36dfca(0x14e)+_0x123734[_0x36dfca(0x16e)]);_0x123734[_0x36dfca(0x12e)]&&console[_0x36dfca(0x103)](_0x36dfca(0x102)+_0x123734[_0x36dfca(0x12e)]);console[_0x36dfca(0x103)](_0x36dfca(0xf5)+new Date(_0x123734[_0x36dfca(0x16c)])['toLocaleString']());_0x123734[_0x36dfca(0x178)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x123734['completedAt'])['toLocaleString']());if(_0x4655fa&&_0x4655fa['length']>0x0){console['log'](_0x36dfca(0x180));for(let _0x1c8848=0x0;_0x1c8848<_0x4655fa[_0x36dfca(0x198)];_0x1c8848++){const _0xf33a8d=_0x4655fa[_0x1c8848];let _0x59b2ec;if(_0xf33a8d['status']===_0x36dfca(0x11f)&&_0x573db3[_0x36dfca(0xf9)](_0xf33a8d[_0x36dfca(0x10c)],_0x36dfca(0x17f)))_0x59b2ec='✅';else{if(_0xf33a8d['status']==='verified')_0x59b2ec='🟢';else{if(_0x573db3['yVtDf'](_0xf33a8d['status'],_0x573db3[_0x36dfca(0x15c)]))_0x59b2ec='🟠';else{if(_0x573db3['pqaxB'](_0xf33a8d['status'],_0x36dfca(0x141)))_0x59b2ec='🛑';else{if(_0x573db3[_0x36dfca(0x149)](_0xf33a8d[_0x36dfca(0x114)],_0x573db3['aAsWq']))_0x59b2ec='⛔';else _0x573db3[_0x36dfca(0x149)](_0xf33a8d['status'],_0x573db3['LKVff'])?_0x59b2ec='⏳':_0x59b2ec='⬜';}}}}const _0x45ffce=_0x573db3[_0x36dfca(0x199)](_0xf33a8d[_0x36dfca(0x135)],0x1)?_0x36dfca(0x154)+_0xf33a8d['version']+')':'',_0x3a24da=_0xf33a8d[_0x36dfca(0x135)]>0x1&&_0xf33a8d['parentItemId']&&_0x573db3[_0x36dfca(0x169)](_0xf33a8d['status'],'closed')&&_0xf33a8d[_0x36dfca(0x114)]!==_0x573db3[_0x36dfca(0x111)]?'\x20[has\x20reviewer\x20feedback]':'';console['log']('\x20\x20\x20'+(_0x1c8848+0x1)+'.\x20'+_0x59b2ec+'\x20'+_0xf33a8d[_0x36dfca(0x13b)]+_0x45ffce+_0x3a24da);_0xf33a8d[_0x36dfca(0x114)]===_0x573db3['lEUTi']&&_0xf33a8d['blockedReason']&&console[_0x36dfca(0x103)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0xf33a8d[_0x36dfca(0x14c)]);_0x573db3[_0x36dfca(0xf9)](_0xf33a8d['status'],_0x36dfca(0x167))&&_0xf33a8d['incompleteReason']&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0xf33a8d['incompleteReason']);if(_0x573db3[_0x36dfca(0x17c)](_0xf33a8d['status'],'closed')&&_0x573db3[_0x36dfca(0x118)](_0xf33a8d['terminalReason'],_0x36dfca(0x17f)))console[_0x36dfca(0x103)](_0x36dfca(0x192));else _0x573db3[_0x36dfca(0xf9)](_0xf33a8d[_0x36dfca(0x114)],_0x36dfca(0x11f))&&_0xf33a8d['canceledReason']&&console[_0x36dfca(0x103)]('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0xf33a8d['canceledReason']);}}}export async function featureCreate(_0x13643b,_0x5c15f9){const _0x8e5fd=_0x2c0418,_0xaf71e2={'aiaNi':function(_0x17fb9f,_0x3d826b){return _0x17fb9f(_0x3d826b);},'wdtzj':function(_0x19f32c){return _0x19f32c();},'MRpuH':function(_0xd5e4ac,_0x52986c,_0x20ecf4){return _0xd5e4ac(_0x52986c,_0x20ecf4);}},{envNames:_0x156e04}=await getEnvNames();_0x156e04[_0x8e5fd(0x198)]===0x0&&console[_0x8e5fd(0xff)]('\x0a'+_0xaf71e2['aiaNi'](formatProfileRequiredMessage,_0x43f945=>bold(_0x43f945)));const _0x831e36=_0x5c15f9[_0x8e5fd(0x104)]?_0x5c15f9['scenarios'][_0x8e5fd(0x13f)](_0x1e079e=>_0x1e079e[_0x8e5fd(0x106)]()):[],_0xfe28f=_0xaf71e2[_0x8e5fd(0xe2)](getGitRepoUrl),_0x5e277e=getGitBranch();console[_0x8e5fd(0x103)](_0x8e5fd(0x146));const _0x3a88d1=await createFeature({'name':_0x13643b,'description':_0x5c15f9[_0x8e5fd(0x13b)],'checklist':_0x831e36,'gitRepoUrl':_0xfe28f,'gitBranch':_0x5e277e});await setActiveFeatureId(_0x3a88d1['id']),await tryStartCurrentSession(_0x3a88d1['id']);const _0x4f70e5=process[_0x8e5fd(0x110)][_0x8e5fd(0xef)];_0x4f70e5&®isterSession(_0x4f70e5,_0x3a88d1['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x3a88d1['id']),_0xaf71e2[_0x8e5fd(0x17e)](displayFeature,_0x3a88d1,_0x3a88d1['checklistItems']),console['log']('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0xdfd01b){const _0x139bfa=_0x2c0418,_0x3fd3c0={'KZQei':function(_0x5c3de7){return _0x5c3de7();},'HetSE':function(_0x4d5d7d,_0x5a4455){return _0x4d5d7d(_0x5a4455);},'hdwhm':function(_0x1c6c58,_0x48bc9d){return _0x1c6c58+_0x48bc9d;},'fvUze':function(_0x52dd6a,_0x165912){return _0x52dd6a<_0x165912;},'eAymx':_0x139bfa(0x177)},_0x37a320={'limit':_0xdfd01b[_0x139bfa(0x159)]??0xa,'offset':_0xdfd01b[_0x139bfa(0xd2)]??0x0,'includeDeleted':_0xdfd01b['includeDeleted']};_0xdfd01b[_0x139bfa(0x196)]&&(_0x37a320[_0x139bfa(0x16e)]=_0x3fd3c0['KZQei'](getGitRepoUrl),_0x37a320[_0x139bfa(0x12e)]=_0x3fd3c0['KZQei'](getGitBranch));const _0x1bb5fd=await _0x3fd3c0['HetSE'](listFeatures,_0x37a320);if(_0x1bb5fd[_0x139bfa(0x142)]['length']===0x0){console['log'](_0x139bfa(0xf2));return;}const _0x5bd1f6=_0x1bb5fd[_0x139bfa(0x138)]>_0x1bb5fd['items'][_0x139bfa(0x198)]?_0x139bfa(0xf7)+_0x1bb5fd[_0x139bfa(0x142)]['length']+_0x139bfa(0x13c)+_0x1bb5fd[_0x139bfa(0x138)]:_0x1bb5fd['totalCount']+_0x139bfa(0x137);console['log']('\x0a'+_0x5bd1f6+':\x0a');for(const _0x1fa9d9 of _0x1bb5fd['items']){console['log'](''+_0x1fa9d9['name']),console['log'](_0x139bfa(0x14f)+_0x1fa9d9['id']),_0x1fa9d9['stats']&&console['log'](_0x139bfa(0x16d)+_0x3fd3c0[_0x139bfa(0x14d)](getProgressDisplay,_0x1fa9d9[_0x139bfa(0xf1)])),_0x1fa9d9[_0x139bfa(0x12e)]&&console[_0x139bfa(0x103)](_0x139bfa(0x102)+_0x1fa9d9['gitBranch']),console[_0x139bfa(0x103)](_0x139bfa(0xf5)+new Date(_0x1fa9d9[_0x139bfa(0x16c)])['toLocaleDateString']()),console[_0x139bfa(0x103)]('');}const _0x33ac8d=_0x37a320['limit']??0xa,_0x2d1161=_0x3fd3c0[_0x139bfa(0x129)](_0x37a320[_0x139bfa(0xd2)]??0x0,_0x1bb5fd['items'][_0x139bfa(0x198)]);if(_0x3fd3c0['fvUze'](_0x2d1161,_0x1bb5fd['totalCount'])){const _0x1b8ad6=_0x33ac8d!==0xa?_0x139bfa(0xe0)+_0x33ac8d:'',_0x3c1981=_0xdfd01b['currentBranch']?_0x3fd3c0[_0x139bfa(0x188)]:'',_0x3b4062=_0xdfd01b['includeDeleted']?_0x139bfa(0xfe):'';console['log']('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x2d1161+_0x1b8ad6+_0x3c1981+_0x3b4062);}}export async function featureShow(_0x39fbd0){const _0x50841d={'FAdDj':function(_0x415557){return _0x415557();},'JAnsg':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','FBQCy':function(_0xccf0d6,_0x37af8a){return _0xccf0d6(_0x37af8a);}},_0x3a59fc=_0x39fbd0||await _0x50841d['FAdDj'](getActiveFeatureId);if(!_0x3a59fc)throw new Error(_0x50841d['JAnsg']);const _0x67c30a=await _0x50841d['FBQCy'](getFeature,_0x3a59fc);displayFeature(_0x67c30a,_0x67c30a['checklistItems']);}export async function featureResume(_0x3cae6a){const _0x3f227f=_0x2c0418,_0x49d75f={'nmZaG':function(_0x5a33e4,_0xbb673a){return _0x5a33e4(_0xbb673a);},'mzGXN':function(_0x5aa2b4){return _0x5aa2b4();},'CLWos':'Not\x20in\x20a\x20git\x20repository.','KNmhO':function(_0x2a1fc0,_0x530d87){return _0x2a1fc0||_0x530d87;},'NbSQN':_0x3f227f(0x148),'PIimC':function(_0x31aad7,_0x343006){return _0x31aad7===_0x343006;},'gNDjh':'\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','adotK':_0x3f227f(0x115),'hIEmM':function(_0x540b1e,_0x47bb14){return _0x540b1e!==_0x47bb14;},'Nsorf':function(_0xcb62a5,_0x4276d2){return _0xcb62a5(_0x4276d2);},'pzUGG':function(_0x8b41ef,_0x79b89d,_0x5280f6){return _0x8b41ef(_0x79b89d,_0x5280f6);}};if(_0x3cae6a){const _0x214a48=await getFeature(_0x3cae6a);await _0x49d75f[_0x3f227f(0x101)](setActiveFeatureId,_0x214a48['id']);const _0x410555=_0x49d75f['mzGXN'](getGitBranch);_0x410555&&_0x410555!==_0x214a48['gitBranch']&&(await updateFeature(_0x214a48['id'],{'gitBranch':_0x410555}),console['log'](_0x3f227f(0x191)+_0x410555));console[_0x3f227f(0x103)]('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x214a48['name']+'\x20('+_0x214a48['id']+')'),await tryStartCurrentSession(_0x214a48['id']);const _0x24dd22=process['env']['CLAUDE_SESSION_ID'];_0x24dd22&®isterSession(_0x24dd22,_0x214a48['id']);displayFeature(_0x214a48,_0x214a48[_0x3f227f(0xfb)]),await _0x49d75f[_0x3f227f(0x101)](printFeedbackNudge,_0x214a48['id']);return;}const _0x2fe660=getGitRepoUrl(),_0x41fcf=getGitBranch();if(!_0x2fe660&&!_0x41fcf)throw new Error(_0x49d75f['CLWos']);console['log'](_0x3f227f(0x122)+_0x49d75f['KNmhO'](_0x2fe660,_0x49d75f['NbSQN'])+'\x20/\x20'+(_0x41fcf||_0x3f227f(0x148))+_0x3f227f(0xf8));const _0x3f5aee=await listFeatures({'gitRepoUrl':_0x2fe660,'gitBranch':_0x41fcf}),_0x15deff=_0x3f5aee['items'][_0x3f227f(0xdd)](_0x2bbc35=>!_0x2bbc35[_0x3f227f(0x178)]);if(_0x49d75f['PIimC'](_0x15deff[_0x3f227f(0x198)],0x0)){console['log'](_0x49d75f[_0x3f227f(0x12d)]),console['log'](_0x3f227f(0x182));return;}let _0x239c2b;if(_0x15deff[_0x3f227f(0x198)]===0x1)_0x239c2b=_0x15deff[0x0];else{const _0x41548a=process['stdin']['isTTY']&&process['stdout']['isTTY'];if(!_0x41548a){console[_0x3f227f(0x103)]('\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:');for(const _0x584e08 of _0x15deff){console['log']('\x20\x20'+_0x584e08[_0x3f227f(0xce)]),console[_0x3f227f(0x103)]('\x20\x20\x20\x20\x20ID:\x20'+_0x584e08['id']),_0x584e08['stats']&&console[_0x3f227f(0x103)](_0x3f227f(0xda)+_0x49d75f[_0x3f227f(0x101)](getProgressDisplay,_0x584e08[_0x3f227f(0xf1)])),_0x584e08['gitBranch']&&console['log'](_0x3f227f(0xea)+_0x584e08[_0x3f227f(0x12e)]);}throw new Error(_0x3f227f(0xd5));}const {selected:_0x3141fe}=await _0x34319d['prompt']([{'type':'list','name':_0x49d75f[_0x3f227f(0x156)],'message':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','choices':_0x15deff['map'](_0x1d04de=>({'name':_0x1d04de['name']+'\x20('+_0x1d04de['id']+')','value':_0x1d04de['id']}))}]);_0x239c2b=_0x15deff['find'](_0x412a3d=>_0x412a3d['id']===_0x3141fe);}await setActiveFeatureId(_0x239c2b['id']);_0x41fcf&&_0x49d75f['hIEmM'](_0x41fcf,_0x239c2b[_0x3f227f(0x12e)])&&(await updateFeature(_0x239c2b['id'],{'gitBranch':_0x41fcf}),console[_0x3f227f(0x103)]('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x41fcf));console['log'](_0x3f227f(0x175)+_0x239c2b['name']+'\x20('+_0x239c2b['id']+')'),await _0x49d75f[_0x3f227f(0x101)](tryStartCurrentSession,_0x239c2b['id']);const _0x1c4429=await _0x49d75f['Nsorf'](getFeature,_0x239c2b['id']),_0x3bcca6=process['env']['CLAUDE_SESSION_ID'];_0x3bcca6&®isterSession(_0x3bcca6,_0x1c4429['id']),_0x49d75f[_0x3f227f(0x120)](displayFeature,_0x1c4429,_0x1c4429[_0x3f227f(0xfb)]),await printFeedbackNudge(_0x1c4429['id']);}async function printFeedbackNudge(_0x51fa6b){const _0x5d7f5e=_0x2c0418,_0x2375e4={'LcxOj':function(_0x330eb7,_0x5b71af){return _0x330eb7>_0x5b71af;},'JTWrJ':'\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'};try{const {items:_0x2c78c7}=await getActionItems(_0x51fa6b);let _0x2307e0=0x0,_0x526ec1=0x0;for(const _0x2f8d09 of _0x2c78c7){const _0x77b1f5=await getItemFeedback(_0x51fa6b,_0x2f8d09['id']);_0x77b1f5['unaddressedComments']['length']>0x0&&(_0x2307e0+=_0x77b1f5[_0x5d7f5e(0x128)][_0x5d7f5e(0x198)],_0x526ec1++);}_0x2375e4['LcxOj'](_0x2307e0,0x0)&&(console['log'](_0x5d7f5e(0xe3)+_0x2307e0+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0x526ec1+_0x5d7f5e(0x162)),console['log'](_0x2375e4[_0x5d7f5e(0x15b)]));}catch{}}async function tryStartCurrentSession(_0x1ebff9){const _0x569298=_0x2c0418,_0x480668={'amNwh':function(_0x5f1cc8,_0x5eed26){return _0x5f1cc8(_0x5eed26);},'LaVWf':function(_0x84e1a8,_0x45308e,_0x3be099){return _0x84e1a8(_0x45308e,_0x3be099);}};try{const {sessions:_0x44b77e}=await _0x480668[_0x569298(0x116)](listFeatureSessions,_0x1ebff9),_0x43b404=_0x44b77e['find'](_0x348668=>_0x348668[_0x569298(0x114)]===_0x569298(0xd1));_0x43b404&&(await _0x480668[_0x569298(0x183)](startSession,_0x1ebff9,_0x43b404['id']),console[_0x569298(0x103)](_0x569298(0x10f)+_0x43b404[_0x569298(0x127)]));}catch{}}export async function featureReport(_0x16d2a7,_0x469298){const _0x4d3a8b=_0x2c0418,_0x56f0fa={'jFsNK':_0x4d3a8b(0x13a),'cPXGA':function(_0x2247b5,_0x54b121,_0x33cf43,_0x367c37){return _0x2247b5(_0x54b121,_0x33cf43,_0x367c37);},'euKjK':function(_0x2d0024){return _0x2d0024();},'RfzuZ':function(_0x1db58d,_0x2801e3,_0x48f649){return _0x1db58d(_0x2801e3,_0x48f649);},'QOPYQ':function(_0x26b53a,_0x591a82){return _0x26b53a(_0x591a82);},'qCROZ':'utf-8'},_0x2a3790=_0x16d2a7||await getActiveFeatureId();if(!_0x2a3790)throw new Error(_0x56f0fa[_0x4d3a8b(0x145)]);console[_0x4d3a8b(0x103)]('\x0aGenerating\x20report...');const _0x2b03f7=await getFeatureReportMarkdown(_0x2a3790,{'style':_0x469298['style']}),_0x136c69=_0x469298['output']||_0x56f0fa[_0x4d3a8b(0x179)](join,_0x56f0fa[_0x4d3a8b(0x187)](getRangerDir),_0x4d3a8b(0xd9),_0x2a3790+'.md'),_0x3fc7d3=_0x56f0fa['RfzuZ'](join,_0x136c69,'..');!_0x56f0fa[_0x4d3a8b(0x10b)](existsSync,_0x3fc7d3)&&await mkdir(_0x3fc7d3,{'recursive':!![]}),await writeFile(_0x136c69,_0x2b03f7,_0x56f0fa['qCROZ']),console[_0x4d3a8b(0x103)]('\x0a✅\x20Report\x20generated:\x20'+_0x136c69);}export async function featureReportPrDescription(_0x1e6b77,_0x1d548d){const _0x276bdb=_0x2c0418,_0x240839={'NDxjk':function(_0x370b2a,_0xbda8a9){return _0x370b2a(_0xbda8a9);},'GtKfX':_0x276bdb(0x109),'zmdBD':function(_0x212723,_0x29babb){return _0x212723>_0x29babb;},'HkrZw':'\x0a❌\x20All\x20scenarios\x20were\x20excluded.'},_0x153bf0=_0x1e6b77||await getActiveFeatureId();if(!_0x153bf0)throw new Error(_0x276bdb(0x13a));const _0x2ddbd7=await _0x240839['NDxjk'](getFeature,_0x153bf0),_0x4ee375=_0x2ddbd7[_0x276bdb(0xfb)]||[],_0xc9d1c9=getCurrentSessionItems(_0x2ddbd7,_0x4ee375);_0xc9d1c9[_0x276bdb(0x198)]===0x0&&(console[_0x276bdb(0x112)](_0x240839[_0x276bdb(0x197)]),process['exit'](0x1));const _0x49174e=_0x1d548d['excludeScenarios']??[],_0x4f386e=_0x49174e['filter'](_0x4d4fcd=>!Number['isInteger'](_0x4d4fcd)||_0x4d4fcd<0x1||_0x4d4fcd>_0xc9d1c9['length']);if(_0x240839[_0x276bdb(0x18e)](_0x4f386e[_0x276bdb(0x198)],0x0)){console['error'](_0x276bdb(0x155)+_0x4f386e[_0x276bdb(0x108)](',\x20')),console[_0x276bdb(0x103)]('\x0aAvailable\x20scenarios:');for(let _0x4aa0c0=0x0;_0x4aa0c0<_0xc9d1c9[_0x276bdb(0x198)];_0x4aa0c0++){console['log']('\x20\x20'+(_0x4aa0c0+0x1)+'.\x20'+_0xc9d1c9[_0x4aa0c0][_0x276bdb(0x13b)]);}process['exit'](0x1);}const _0x322e0e=new Set(_0x49174e['map'](_0x562bc0=>_0x562bc0-0x1)),_0x26193f=_0xc9d1c9['filter']((_0x3eaf67,_0x4b8c15)=>!_0x322e0e['has'](_0x4b8c15));_0x26193f['length']===0x0&&(console[_0x276bdb(0x112)](_0x240839['HkrZw']),process['exit'](0x1));const _0x17d45d=await getFeatureReportMarkdown(_0x153bf0,{'itemIds':_0x26193f['map'](_0x1af980=>_0x1af980['id'])});process[_0x276bdb(0x164)][_0x276bdb(0x172)](_0x17d45d[_0x276bdb(0x158)]()+'\x0a');}export async function featureConcludeSession(_0x398451){const _0x5a416a=_0x2c0418,_0x31af71={'totTN':function(_0x557e29){return _0x557e29();},'tubGo':_0x5a416a(0x140),'aGQZG':function(_0x1df0c6,_0x28fbfe){return _0x1df0c6(_0x28fbfe);},'CSliF':_0x5a416a(0x11e),'teiTG':function(_0x50e283,_0x29ba40){return _0x50e283!==_0x29ba40;},'WDdwY':_0x5a416a(0x194),'dVBDh':function(_0x446282,_0x173739,_0x5424de){return _0x446282(_0x173739,_0x5424de);}},_0xbef03=_0x398451||await _0x31af71[_0x5a416a(0x161)](getActiveFeatureId);if(!_0xbef03)throw new Error(_0x31af71[_0x5a416a(0x168)]);const _0x1eb644=await getFeature(_0xbef03);if(!_0x1eb644[_0x5a416a(0x144)])throw new Error(_0x5a416a(0x123));const {sessions:_0x4d815e}=await _0x31af71['aGQZG'](listFeatureSessions,_0xbef03),_0x31439e=_0x4d815e[_0x5a416a(0xeb)](_0x49c4ee=>_0x49c4ee['id']===_0x1eb644[_0x5a416a(0x144)]);if(!_0x31439e)throw new Error(_0x31af71['CSliF']);if(_0x31439e['status']==='completed'){console[_0x5a416a(0x103)]('\x0a✅\x20Session\x20is\x20already\x20completed.');return;}if(_0x31af71['teiTG'](_0x31439e['status'],_0x31af71[_0x5a416a(0x12a)]))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x31439e[_0x5a416a(0x114)]);console['log'](_0x5a416a(0x165)),await _0x31af71[_0x5a416a(0x11b)](concludeSession,_0xbef03,_0x1eb644[_0x5a416a(0x144)]),console[_0x5a416a(0x103)](_0x5a416a(0xd8)+_0x31439e['iteration']+_0x5a416a(0x18d)),console['log'](_0x5a416a(0x131));}export async function featureSessions(_0x14c53e){const _0xc264a5=_0x2c0418,_0xc6500a={'BjSOV':function(_0x203625){return _0x203625();},'XSuJW':function(_0x33a14d,_0x2a1117){return _0x33a14d(_0x2a1117);},'CUGEN':function(_0xa45107,_0xd84d19){return _0xa45107===_0xd84d19;},'puoOe':'No\x20sessions\x20found.','ZNtCM':'completed','aOgHZ':'in_progress'},_0xeb5050=_0x14c53e||await _0xc6500a['BjSOV'](getActiveFeatureId);if(!_0xeb5050)throw new Error(_0xc264a5(0x13a));const _0x3e5e59=await _0xc6500a[_0xc264a5(0xe8)](getFeature,_0xeb5050);console[_0xc264a5(0x103)](_0xc264a5(0xe1)+_0x3e5e59[_0xc264a5(0xce)]+'\x0a');const {sessions:_0x2600e5}=await listFeatureSessions(_0xeb5050);if(_0xc6500a['CUGEN'](_0x2600e5['length'],0x0)){console[_0xc264a5(0x103)](_0xc6500a['puoOe']);return;}for(const _0x4859b4 of _0x2600e5){const _0x236d93=_0x4859b4['status']===_0xc6500a['ZNtCM']?'✅':_0x4859b4['status']===_0xc6500a['aOgHZ']?'🔄':'▶️';console['log'](_0x236d93+_0xc264a5(0x186)+_0x4859b4['iteration']+'\x20('+_0x4859b4['id']+')'),console['log'](_0xc264a5(0x170)+_0x4859b4['status']),console['log'](_0xc264a5(0xf5)+new Date(_0x4859b4['createdAt'])['toLocaleString']()),_0x4859b4[_0xc264a5(0x178)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x4859b4['completedAt'])['toLocaleString']()),console['log']('');}}export async function featureAddScenario(_0x322fde,_0x50ddc2){const _0x33ace0=_0x2c0418,_0x1e46a7={'NPiXf':function(_0x2c6697,_0x28b74d){return _0x2c6697(_0x28b74d);}},_0x5a4bdd=_0x50ddc2||await getActiveFeatureId();if(!_0x5a4bdd)throw new Error(_0x33ace0(0x140));const _0x48f9b4=await getFeature(_0x5a4bdd);if(_0x48f9b4[_0x33ace0(0x143)]&&!_0x48f9b4[_0x33ace0(0x143)]['submittedAt'])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x48f9b4[_0x33ace0(0xcf)]);await createChecklistItem(_0x5a4bdd,_0x322fde);const _0x2dc803=await _0x1e46a7['NPiXf'](getFeature,_0x5a4bdd);console['log']('\x0a✅\x20Scenario\x20added'),displayFeature(_0x2dc803,_0x2dc803[_0x33ace0(0xfb)]);}export async function featureEditScenario(_0x30671e,_0x4a0d0b){const _0x5c38a3=_0x2c0418,_0x92e7f3={'VykDJ':function(_0x2a51fa){return _0x2a51fa();},'ONvNL':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','YQzyb':'\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','sBgVS':'Please\x20finish\x20your\x20review\x20first:','qSpYR':_0x5c38a3(0x12c),'ioHnb':function(_0xdb2aab,_0xda60a2){return _0xdb2aab<_0xda60a2;},'QIRwW':function(_0x5d7be8,_0x14d553){return _0x5d7be8+_0x14d553;},'poDHx':function(_0x108603,_0x16e8c6){return _0x108603-_0x16e8c6;},'OKrgg':function(_0x5a45ed,_0x2efba0){return _0x5a45ed>=_0x2efba0;},'SnvzO':function(_0x273077,_0x2b5036,_0x3fd4e9,_0x343861){return _0x273077(_0x2b5036,_0x3fd4e9,_0x343861);}},_0x296ed3=_0x4a0d0b['id']||await _0x92e7f3['VykDJ'](getActiveFeatureId);!_0x296ed3&&(console['error'](_0x92e7f3[_0x5c38a3(0x136)]),console[_0x5c38a3(0x112)]('Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review'),process['exit'](0x1));const _0x46b08c=await getFeature(_0x296ed3);_0x46b08c[_0x5c38a3(0x143)]&&!_0x46b08c[_0x5c38a3(0x143)]['submittedAt']&&(console['error'](_0x92e7f3['YQzyb']),console['error'](_0x92e7f3['sBgVS']),console[_0x5c38a3(0x112)]('\x20\x20'+_0x46b08c['dashboardUrl']),process[_0x5c38a3(0x195)](0x1));const _0x249041=_0x46b08c['checklistItems']||[];_0x249041[_0x5c38a3(0x198)]===0x0&&(console['error'](_0x5c38a3(0x16a)),process[_0x5c38a3(0x195)](0x1));if(_0x4a0d0b['scenario']===undefined){console[_0x5c38a3(0x112)](_0x92e7f3[_0x5c38a3(0x181)]),console[_0x5c38a3(0x103)](_0x5c38a3(0xd6));for(let _0x2a1cda=0x0;_0x92e7f3['ioHnb'](_0x2a1cda,_0x249041[_0x5c38a3(0x198)]);_0x2a1cda++){console[_0x5c38a3(0x103)]('\x20\x20'+_0x92e7f3['QIRwW'](_0x2a1cda,0x1)+'.\x20'+_0x249041[_0x2a1cda]['description']);}process['exit'](0x1);}const _0x5a17b4=_0x92e7f3[_0x5c38a3(0x107)](_0x4a0d0b[_0x5c38a3(0x190)],0x1);if(_0x5a17b4<0x0||_0x92e7f3[_0x5c38a3(0x160)](_0x5a17b4,_0x249041[_0x5c38a3(0x198)])){console['error']('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x4a0d0b['scenario']+'.\x20Feature\x20review\x20has\x20'+_0x249041[_0x5c38a3(0x198)]+_0x5c38a3(0x151)),console['log'](_0x5c38a3(0xd6));for(let _0x5ea0ad=0x0;_0x5ea0ad<_0x249041['length'];_0x5ea0ad++){console['log']('\x20\x20'+_0x92e7f3['QIRwW'](_0x5ea0ad,0x1)+'.\x20'+_0x249041[_0x5ea0ad][_0x5c38a3(0x13b)]);}process['exit'](0x1);}const _0x2dca99=_0x249041[_0x5a17b4];await _0x92e7f3['SnvzO'](updateChecklistItem,_0x296ed3,_0x2dca99['id'],{'description':_0x30671e});const _0x3ca8e3=await getFeature(_0x296ed3);console[_0x5c38a3(0x103)]('\x0a✅\x20Scenario\x20updated'),displayFeature(_0x3ca8e3,_0x3ca8e3['checklistItems']);}function _0x2c30(){const _0x167424=['textContent','\x20in\x20progress','replace','79504KyRSNe','XSuJW','):\x20\x22','\x20\x20\x20\x20\x20Branch:\x20','find','\x20\x20💬\x20','type','pop','CLAUDE_SESSION_ID','\x20incomplete','stats','\x0aNo\x20feature\x20reviews\x20found.','CKWSa','No\x20scenarios\x20found.','\x20\x20\x20Created:\x20','wCFUj','Showing\x20','...','yVtDf','qYpva','checklistItems','verification_in_progress','git\x20rev-parse\x20--abbrev-ref\x20HEAD','\x20--include-deleted','warn','eJBCB','nmZaG','\x20\x20\x20Branch:\x20','log','scenarios','pMosW','trim','poDHx','join','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','pendingItems','QOPYQ','terminalReason','short','12rLHbPX','\x20\x20\x20▶️\x20Started\x20session\x20','env','KwEBJ','error','\x20verified','status','selected','amNwh','from','dHqQU','1NPFrgx','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','dVBDh','split','\x1b[1m','Current\x20session\x20not\x20found.','closed','pzUGG','repeat','\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20','No\x20active\x20session\x20for\x20this\x20feature\x20review.','BFHUT','verifiedItems','\x20\x20✅\x20No\x20feedback\x20to\x20address','iteration','unaddressedComments','hdwhm','WDdwY','bDaXe','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','gNDjh','gitBranch','315JFomcG','domRef','\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.','toFixed','677085QyehsL','20387092ynbOru','version','ONvNL','\x20feature\x20review(s)\x20found','totalCount','Unknown','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','description','\x20of\x20','3071898QMnlrH','nRTLC','map','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','blocked','items','latestReview','currentSessionId','jFsNK','\x0aCreating\x20feature\x20review...','QRtQv','any','TZtJf','1266718lqqpnf','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','blockedReason','HetSE','\x20\x20\x20Repository:\x20','\x20\x20\x20ID:\x20','git\x20remote\x20get-url\x20origin','\x20scenarios.','oScpl','sessionId','\x20(v','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','adotK','\x0a✅\x20Restored\x20feature\x20review:\x20','trimEnd','limit','dhrWb','JTWrJ','CEHFP','\x20\x20\x20\x20\x20📋\x20Selector:\x20','IsRWy','feedback-images','OKrgg','totTN','\x20scenario(s).','pipe','stdout','\x0aConcluding\x20session...','position','incomplete','tubGo','BLHhK','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','\x20>\x20','createdAt','\x20\x20\x20Progress:\x20','gitRepoUrl','12lmxdNr','\x20\x20\x20Status:\x20','vHapu','write','\x1b[0m','.png','\x0a✅\x20Resumed\x20feature\x20review:\x20','sIDkP','\x20--current-branch','completedAt','cPXGA','KESiA','8504520TyYNew','IXhnk','BxLzi','MRpuH','approved','\x0a\x20\x20\x20Scenarios:','qSpYR','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','LaVWf','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','push','\x20Session\x20','euKjK','eAymx','en-US','utf-8','\x20unaddressed\x20comment(s)','OOCaB','\x20concluded.','zmdBD','\x20blocked','scenario','\x20\x20\x20Updated\x20branch\x20to:\x20','\x20\x20\x20\x20\x20\x20Approved','selector','in_progress','exit','currentBranch','GtKfX','length','ialBG','verificationInProgressItems','name','dashboardUrl','numeric','ready','offset','sort','2757517StisUk','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','\x0aAvailable\x20scenarios:','flVqI','\x0a✅\x20Session\x20','reports','\x20\x20\x20\x20\x20Progress:\x20','Scenario\x20','blockedItems','filter','zgUEV','bYgKS','\x20--limit\x20','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','wdtzj','\x0a⚠️\x20\x20'];_0x2c30=function(){return _0x167424;};return _0x2c30();}async function downloadFeedbackImage(_0x32a2cb,_0x390593){const _0x2a1683=_0x2c0418,_0x1860ae={'vSowg':function(_0x375580,_0x47eb2b,_0x5af17f){return _0x375580(_0x47eb2b,_0x5af17f);},'OOCaB':function(_0x9d0c22){return _0x9d0c22();},'BxLzi':_0x2a1683(0x15f),'KESiA':function(_0x161228,_0x699926){return _0x161228(_0x699926);}};try{const _0x4761d7=_0x1860ae['vSowg'](join,_0x1860ae[_0x2a1683(0x18c)](getRangerDir),_0x1860ae[_0x2a1683(0x17d)]);await _0x1860ae['vSowg'](mkdir,_0x4761d7,{'recursive':!![]});const _0x1b3591=join(_0x4761d7,'comment_'+_0x390593+_0x2a1683(0x174)),_0x26afd8=await _0x1860ae[_0x2a1683(0x17a)](fetch,_0x32a2cb);if(!_0x26afd8['ok'])return null;const _0x6b7d6c=Buffer[_0x2a1683(0x117)](await _0x26afd8['arrayBuffer']());return await writeFile(_0x1b3591,_0x6b7d6c),_0x1b3591;}catch{return null;}}export async function featureGetReview(_0x43bb5f){const _0x2c52df=_0x2c0418,_0x4b2b69={'eJBCB':function(_0x4c979c){return _0x4c979c();},'rdGhE':function(_0x59b6f6,_0x2a3c2f){return _0x59b6f6(_0x2a3c2f);},'cGghH':function(_0x404244,_0x3f2a06){return _0x404244===_0x3f2a06;},'UeruT':function(_0x464ece,_0x281979){return _0x464ece<_0x281979;},'XJhdM':function(_0x39c812,_0x282e6d){return _0x39c812>_0x282e6d;},'qYpva':function(_0x446024,_0x31bd6e,_0x272b51){return _0x446024(_0x31bd6e,_0x272b51);},'rwBfQ':function(_0x5593d5,_0x3dfa19){return _0x5593d5>_0x3dfa19;},'dhrWb':function(_0x387d83,_0x40c53b,_0x35800d){return _0x387d83(_0x40c53b,_0x35800d);},'Oypdc':function(_0x306425,_0x4a38a5){return _0x306425===_0x4a38a5;}},_0x177e19=_0x43bb5f||await _0x4b2b69[_0x2c52df(0x100)](getActiveFeatureId);if(!_0x177e19)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 _0x5ab50b=await getFeature(_0x177e19),{items:_0x1ca20f}=await _0x4b2b69['rdGhE'](getActionItems,_0x177e19);console[_0x2c52df(0x103)]('\x0a📋\x20Feedback\x20for:\x20'+_0x5ab50b['name']+'\x20('+_0x5ab50b['id']+')\x0a');if(_0x4b2b69['cGghH'](_0x1ca20f[_0x2c52df(0x198)],0x0)){console[_0x2c52df(0x103)](_0x2c52df(0xf4));return;}for(let _0x4b0a17=0x0;_0x4b2b69['UeruT'](_0x4b0a17,_0x1ca20f['length']);_0x4b0a17++){const _0x5b9184=_0x1ca20f[_0x4b0a17],_0x2bc608=_0x4b2b69['XJhdM'](_0x5b9184['version'],0x1)?_0x2c52df(0x154)+_0x5b9184['version']+')':'',_0x2c19dd=await _0x4b2b69[_0x2c52df(0xfa)](getItemFeedback,_0x177e19,_0x5b9184['id']);if(_0x4b2b69['rwBfQ'](_0x2c19dd[_0x2c52df(0x128)][_0x2c52df(0x198)],0x0)){console[_0x2c52df(0x103)](_0x2c52df(0xdb)+(_0x4b0a17+0x1)+':\x20\x22'+_0x5b9184[_0x2c52df(0x13b)]+'\x22'+_0x2bc608+'\x20—\x20'+_0x2c19dd[_0x2c52df(0x128)][_0x2c52df(0x198)]+_0x2c52df(0x18b));for(const _0xe1518c of _0x2c19dd['unaddressedComments']){const _0x46f403=new Date(_0xe1518c['createdAt'])['toLocaleDateString'](_0x2c52df(0x189),{'month':_0x2c52df(0x10d),'day':_0x2c52df(0xd0)}),_0x18642c=_0xe1518c['authorName']||_0xe1518c['authorEmail']||_0x2c52df(0x139);console[_0x2c52df(0x103)](_0x2c52df(0xec)+_0x18642c+'\x20('+_0x46f403+_0x2c52df(0xe9)+_0xe1518c['content']+'\x22');if(_0xe1518c['assetUrl']){const _0x3aa070=await _0x4b2b69[_0x2c52df(0x15a)](downloadFeedbackImage,_0xe1518c['assetUrl'],_0xe1518c['id']);_0x3aa070&&console['log'](_0x2c52df(0x14b)+_0x3aa070);}if(_0xe1518c['domRef']){const _0x3c073d=_0xe1518c[_0x2c52df(0x130)][_0x2c52df(0x193)][_0x2c52df(0x11c)](_0x2c52df(0x16b))[_0x2c52df(0xee)]()?.[_0x2c52df(0x11c)](':')[0x0]||'element',_0x4dece7=_0xe1518c[_0x2c52df(0x130)]['textContent']?'\x20\x22'+_0xe1518c[_0x2c52df(0x130)][_0x2c52df(0xe4)]['slice'](0x0,0x3c)+'\x22':'';console['log'](_0x2c52df(0x184)+_0x3c073d+'>'+_0x4dece7),console[_0x2c52df(0x103)](_0x2c52df(0x15d)+_0xe1518c['domRef'][_0x2c52df(0x193)]);}else{if(_0xe1518c['spatial']){const _0x2cdae8=_0xe1518c['spatial']['coordinates'];_0x4b2b69['Oypdc'](_0xe1518c['spatial'][_0x2c52df(0xed)],'point')&&_0x2cdae8[_0x2c52df(0x198)]>=0x2?console[_0x2c52df(0x103)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x2cdae8[0x0][_0x2c52df(0x132)](0x2)+',\x20'+_0x2cdae8[0x1]['toFixed'](0x2)+')'):console[_0x2c52df(0x103)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0xe1518c['spatial'][_0x2c52df(0xed)]+'\x20at\x20['+_0x2cdae8[_0x2c52df(0x13f)](_0x5cae34=>_0x5cae34['toFixed'](0x2))['join'](',\x20')+']');}}}if(_0x2c19dd['canonicalFlow']){console['log']('\x20\x20Expected\x20flow:');for(const _0x26b5e9 of _0x2c19dd['canonicalFlow']['split']('\x0a')){console['log']('\x20\x20\x20\x20'+_0x26b5e9);}}}else console[_0x2c52df(0x103)]('Scenario\x20'+(_0x4b0a17+0x1)+':\x20\x22'+_0x5b9184['description']+'\x22'+_0x2bc608+'\x20—\x20no\x20comments'),console[_0x2c52df(0x103)](_0x2c52df(0x126));console['log']('');}}export async function featureDelete(_0x35e9d7){const _0x63d651=_0x2c0418,_0x15b8c0={'MVeEG':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','gEXmJ':function(_0x902a3f,_0x51f7cd){return _0x902a3f+_0x51f7cd;}},_0x1aeba1=_0x35e9d7||await getActiveFeatureId();if(!_0x1aeba1)throw new Error(_0x15b8c0['MVeEG']);const _0x1d39e3=await getFeature(_0x1aeba1);await softDeleteFeature(_0x1aeba1),console['log'](_0x63d651(0x11a)+_0x1d39e3['name']+'\x20('+_0x1aeba1+')'),console['log'](_0x15b8c0['gEXmJ']('\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20',_0x1aeba1));}export async function featureRestore(_0x2b16d1){const _0x40739f=_0x2c0418,_0x19427a={'ZcAtT':function(_0x27b0a8,_0x4af5ff,_0x2bee06){return _0x27b0a8(_0x4af5ff,_0x2bee06);}};await restoreFeature(_0x2b16d1);const _0x36e76d=await getFeature(_0x2b16d1);console[_0x40739f(0x103)](_0x40739f(0x157)+_0x36e76d['name']+'\x20('+_0x2b16d1+')'),_0x19427a['ZcAtT'](displayFeature,_0x36e76d,_0x36e76d['checklistItems']);}
|
|
1
|
+
const _0x4f9439=_0x4fb4;(function(_0x3b8fff,_0x5bf276){const _0x466f03=_0x4fb4,_0x206872=_0x3b8fff();while(!![]){try{const _0x542b4f=parseInt(_0x466f03(0x255))/0x1+-parseInt(_0x466f03(0x20d))/0x2*(-parseInt(_0x466f03(0x1ca))/0x3)+-parseInt(_0x466f03(0x213))/0x4*(-parseInt(_0x466f03(0x267))/0x5)+-parseInt(_0x466f03(0x244))/0x6*(-parseInt(_0x466f03(0x250))/0x7)+-parseInt(_0x466f03(0x21f))/0x8+parseInt(_0x466f03(0x1d7))/0x9+parseInt(_0x466f03(0x20c))/0xa*(-parseInt(_0x466f03(0x21e))/0xb);if(_0x542b4f===_0x5bf276)break;else _0x206872['push'](_0x206872['shift']());}catch(_0x243ad5){_0x206872['push'](_0x206872['shift']());}}}(_0x39d4,0xbba9a));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x4db099 from'inquirer';function _0x39d4(){const _0x19f3ba=['qdMNd','xPwiP','toLocaleString','version','\x20[has\x20reviewer\x20feedback]','\x20\x20\x20\x20\x20ID:\x20','push','incomplete','join','QCWBQ','UiNdL','repeat','dTWOd','KhXRT','any','\x20feature\x20review(s)\x20found','RftvU','\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20','parentItemId','\x20\x20\x20Updated\x20branch\x20to:\x20','\x20\x20\x20\x20\x20Progress:\x20','DLjOO','\x1b[1m','\x0aAvailable\x20scenarios:','yTJLz','find','textContent','\x0aCreating\x20feature\x20review...','jNmWI','\x1b[0m','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','\x20\x20\x20Created:\x20','terminalReason','\x20\x20\x20','content','TWknS','currentSessionId','ONddS','unaddressedComments','ucjQD','status','UcAAP','iteration','\x20\x20\x20Progress:\x20','cXXvm','\x0aNo\x20feature\x20reviews\x20found.','Current\x20session\x20not\x20found.','13004650WyROty','202EThuEi','\x0a📋\x20Feedback\x20for:\x20','2|3|4|1|0|5','verificationInProgressItems','\x0a✅\x20Session\x20','\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','28hMJkjX','submittedAt','cLEeg','canceledReason','tzNpz','XQQUB','Next\x20page:\x20ranger\x20list\x20--offset\x20','\x20concluded.','filter','\x20\x20\x20Branch:\x20','closed','11UCpEvD','7350000TNDHCu','completedAt','crloK','OIRyE','SkRaG','\x20incomplete','warn','domRef','\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.','utf-8','UyTha','error','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','No\x20active\x20session\x20for\x20this\x20feature\x20review.','wthpR','approved','hblKc','.md','completed','\x20verified','tARgX','selector','lfpxj','CLAUDE_SESSION_ID','\x20scenario(s).','RBlZv','gFmuG','includeDeleted','latestReview','\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.','JoaKE','\x20--include-deleted','isTTY','quZfa','verifiedItems','scenario','mqElM','6kmzVQM','geKiO','createdAt','vLZqt','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','\x0a⚠️\x20\x20','arrayBuffer','wcPUZ','JFNdD','\x20\x20\x20\x20','incompleteReason','point','3113579fVkoyo','OdaIg','canonicalFlow','PmDof','gitBranch','914267nBQGoy','\x0a✅\x20Report\x20generated:\x20','description','IEkak','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','totalCount','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','exit','spatial','No\x20sessions\x20found.','type','pipe','\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','split','map','yJXHK','\x0a\x20\x20\x20Scenarios:','...','760065PbkHbz','iyhZq','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','github.com/','Scenario\x20','\x0a✅\x20Scenario\x20added','MqJEq',':\x20\x22','checklistItems','Cannot\x20conclude\x20session\x20with\x20status:\x20','\x20\x20\x20\x20\x20Branch:\x20','\x20\x20\x20Description:\x20','toFixed','items','stdin','\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.','bbqAx','dkxHJ','dashboardUrl','\x20\x20\x20Completed:\x20','sessionId','env','verification_in_progress','SFDvp','limit','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','numeric','trim','authorName','stats','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','Please\x20finish\x20your\x20review\x20first:','pop','\x20\x20Expected\x20flow:','DIxsX','length','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','zlcvM','vamgU','verified','13470MzrwsE','PkHzs','replace','log','\x20blocked','\x20scenarios.','currentBranch','stdout','\x20\x20\x20\x20\x20\x20Incomplete:\x20','tHBTN','AFzBv','name','qjBsw','1001124WXnoiu','\x0aGenerating\x20report...','style','\x20--limit\x20','mcgUd','BnLYr'];_0x39d4=function(){return _0x19f3ba;};return _0x39d4();}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='active-feature.txt',bold=_0x1b62f6=>_0x4f9439(0x1f3)+_0x1b62f6+_0x4f9439(0x1fa);function getGitRepoUrl(){const _0x5335b0=_0x4f9439,_0xcf8f1a={'FjJGv':'git\x20remote\x20get-url\x20origin','zlcvM':'utf-8','PmDof':'pipe','DlHMU':_0x5335b0(0x1a4)};try{const _0x280cb4=execSync(_0xcf8f1a['FjJGv'],{'encoding':_0xcf8f1a[_0x5335b0(0x1c7)],'stdio':[_0xcf8f1a[_0x5335b0(0x253)],_0x5335b0(0x260),_0xcf8f1a['PmDof']]})[_0x5335b0(0x1bd)]();return _0x280cb4[_0x5335b0(0x1cc)](/\.git$/,'')[_0x5335b0(0x1cc)](/^git@github\.com:/,_0xcf8f1a['DlHMU'])[_0x5335b0(0x1cc)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x3cde8b=_0x4f9439,_0x578d31={'BgaVn':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','hblKc':_0x3cde8b(0x260)};try{return execSync(_0x578d31['BgaVn'],{'encoding':_0x3cde8b(0x228),'stdio':[_0x578d31[_0x3cde8b(0x22f)],_0x3cde8b(0x260),'pipe']})[_0x3cde8b(0x1bd)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x514d5e=_0x4f9439,_0x134375={'wcPUZ':function(_0x4fcdaa){return _0x4fcdaa();}},_0x581743=join(_0x134375[_0x514d5e(0x24b)](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0x581743))return null;try{const _0x43a004=await readFile(_0x581743,_0x514d5e(0x228));return _0x43a004[_0x514d5e(0x1bd)]()||null;}catch{return null;}}async function setActiveFeatureId(_0x1e669e){const _0x279102=_0x4f9439,_0x4847ce={'wthpR':function(_0x9f9d47,_0x31fc58){return _0x9f9d47(_0x31fc58);}},_0x517c67=getRangerDir(),_0x52fb23=join(_0x517c67,ACTIVE_FEATURE_FILE);!_0x4847ce[_0x279102(0x22d)](existsSync,_0x517c67)&&await mkdir(_0x517c67,{'recursive':!![]}),await writeFile(_0x52fb23,_0x1e669e,_0x279102(0x228));}function getProgressDisplay(_0x5bd683){const _0x4dcb6e=_0x4f9439,_0x2c651a={'imDqT':function(_0x36e85e,_0x2dffd7){return _0x36e85e+_0x2dffd7;},'mcgUd':function(_0x1efe78,_0x140574){return _0x1efe78+_0x140574;},'quZfa':function(_0x26cd8a,_0x28ff7a){return _0x26cd8a/_0x28ff7a;}},_0x2425a7=_0x5bd683[_0x4dcb6e(0x241)]||0x0,_0xe9d7f9=_0x5bd683[_0x4dcb6e(0x210)]||0x0,_0x34a42f=_0x5bd683['blockedItems']||0x0,_0x5577f8=_0x5bd683['incompleteItems']||0x0,_0x55fbd1=_0x5bd683['pendingItems']||0x0,_0x3d6c5b=_0x2c651a['imDqT'](_0x2c651a[_0x4dcb6e(0x1db)](_0x2425a7,_0xe9d7f9)+_0x34a42f,_0x5577f8)+_0x55fbd1;if(_0x3d6c5b===0x0)return'-';const _0x84fb9a=0xa,_0x4bc2d5=Math['round'](_0x2c651a[_0x4dcb6e(0x240)](_0x2425a7,_0x3d6c5b)*_0x84fb9a),_0x20b866='█'[_0x4dcb6e(0x1e8)](_0x4bc2d5)+'░'[_0x4dcb6e(0x1e8)](_0x84fb9a-_0x4bc2d5),_0x40a260=[];if(_0x34a42f>0x0)_0x40a260['push'](_0x34a42f+_0x4dcb6e(0x1ce));if(_0x5577f8>0x0)_0x40a260[_0x4dcb6e(0x1e3)](_0x5577f8+_0x4dcb6e(0x224));if(_0xe9d7f9>0x0)_0x40a260['push'](_0xe9d7f9+'\x20in\x20progress');const _0x2d154c=_0x40a260[_0x4dcb6e(0x1c5)]>0x0?'\x20('+_0x40a260[_0x4dcb6e(0x1e5)](',\x20')+')':'';return _0x20b866+'\x20'+_0x2425a7+'/'+_0x3d6c5b+_0x4dcb6e(0x232)+_0x2d154c;}function getCurrentSessionItems(_0x536700,_0x34ffe7){const _0x3a35c2=_0x4f9439;if(!_0x536700['currentSessionId'])return _0x34ffe7[_0x3a35c2(0x21b)](_0x5c3282=>!_0x5c3282[_0x3a35c2(0x1b5)]);return _0x34ffe7[_0x3a35c2(0x21b)](_0x492e68=>_0x492e68[_0x3a35c2(0x1b5)]===_0x536700[_0x3a35c2(0x201)]||!_0x492e68['sessionId']);}function _0x4fb4(_0x3fc1c1,_0x5f14b6){_0x3fc1c1=_0x3fc1c1-0x1a4;const _0x39d4e7=_0x39d4();let _0x4fb43e=_0x39d4e7[_0x3fc1c1];return _0x4fb43e;}function displayFeature(_0x524e9a,_0x3cd828){const _0x5e4588=_0x4f9439,_0x26eac9={'fXhwh':function(_0x14e6d6,_0x512298){return _0x14e6d6>_0x512298;},'SexcB':function(_0x58c1c6,_0x1262d1){return _0x58c1c6===_0x1262d1;},'IEkak':'closed','iyhZq':function(_0x404842,_0x4e3f72){return _0x404842===_0x4e3f72;},'UczXT':_0x5e4588(0x1e4),'BozkK':function(_0x2bda61,_0x52a6e9){return _0x2bda61===_0x52a6e9;},'UcAAP':function(_0xd2ab4f,_0x3d5e6e){return _0xd2ab4f===_0x3d5e6e;},'BnLYr':_0x5e4588(0x1b7),'dcrpO':function(_0x36d176,_0x1e8cc3){return _0x36d176>_0x1e8cc3;},'geKiO':function(_0x5c0618,_0x13bdc0){return _0x5c0618>_0x13bdc0;},'HReoL':function(_0x2d9fc5,_0xddb177){return _0x2d9fc5+_0xddb177;},'rKTDC':function(_0x206c86,_0x253fe0){return _0x206c86===_0x253fe0;},'CVVSj':'blocked','MqJEq':function(_0x1b220f,_0x5b2c9e){return _0x1b220f===_0x5b2c9e;}};console[_0x5e4588(0x1cd)]('\x0a'+_0x524e9a[_0x5e4588(0x1d5)]+'\x20('+_0x524e9a[_0x5e4588(0x1b3)]+')');_0x524e9a['stats']&&console[_0x5e4588(0x1cd)](_0x5e4588(0x208)+getProgressDisplay(_0x524e9a[_0x5e4588(0x1bf)]));_0x524e9a[_0x5e4588(0x257)]&&console['log'](_0x5e4588(0x1ac)+_0x524e9a[_0x5e4588(0x257)]);_0x524e9a['gitRepoUrl']&&console[_0x5e4588(0x1cd)]('\x20\x20\x20Repository:\x20'+_0x524e9a['gitRepoUrl']);_0x524e9a[_0x5e4588(0x254)]&&console[_0x5e4588(0x1cd)](_0x5e4588(0x21c)+_0x524e9a['gitBranch']);console[_0x5e4588(0x1cd)](_0x5e4588(0x1fc)+new Date(_0x524e9a[_0x5e4588(0x246)])['toLocaleString']());_0x524e9a['completedAt']&&console[_0x5e4588(0x1cd)](_0x5e4588(0x1b4)+new Date(_0x524e9a['completedAt'])[_0x5e4588(0x1df)]());if(_0x3cd828&&_0x26eac9['fXhwh'](_0x3cd828[_0x5e4588(0x1c5)],0x0)){console[_0x5e4588(0x1cd)](_0x5e4588(0x265));for(let _0x3b6996=0x0;_0x3b6996<_0x3cd828['length'];_0x3b6996++){const _0x547985=_0x3cd828[_0x3b6996];let _0x2e7fc4;if(_0x26eac9['SexcB'](_0x547985[_0x5e4588(0x205)],_0x26eac9['IEkak'])&&_0x26eac9[_0x5e4588(0x268)](_0x547985[_0x5e4588(0x1fd)],_0x5e4588(0x22e)))_0x2e7fc4='✅';else{if(_0x26eac9['iyhZq'](_0x547985[_0x5e4588(0x205)],'verified'))_0x2e7fc4='🟢';else{if(_0x547985['status']===_0x26eac9['UczXT'])_0x2e7fc4='🟠';else{if(_0x26eac9['BozkK'](_0x547985[_0x5e4588(0x205)],'blocked'))_0x2e7fc4='🛑';else{if(_0x26eac9[_0x5e4588(0x206)](_0x547985[_0x5e4588(0x205)],_0x5e4588(0x21d)))_0x2e7fc4='⛔';else _0x547985[_0x5e4588(0x205)]===_0x26eac9[_0x5e4588(0x1dc)]?_0x2e7fc4='⏳':_0x2e7fc4='⬜';}}}}const _0x507276=_0x26eac9['dcrpO'](_0x547985[_0x5e4588(0x1e0)],0x1)?'\x20(v'+_0x547985[_0x5e4588(0x1e0)]+')':'',_0x525ecc=_0x26eac9[_0x5e4588(0x245)](_0x547985[_0x5e4588(0x1e0)],0x1)&&_0x547985[_0x5e4588(0x1ef)]&&_0x547985[_0x5e4588(0x205)]!==_0x26eac9[_0x5e4588(0x258)]&&_0x547985[_0x5e4588(0x205)]!==_0x5e4588(0x1c9)?_0x5e4588(0x1e1):'';console['log'](_0x5e4588(0x1fe)+_0x26eac9['HReoL'](_0x3b6996,0x1)+'.\x20'+_0x2e7fc4+'\x20'+_0x547985[_0x5e4588(0x257)]+_0x507276+_0x525ecc);_0x26eac9['rKTDC'](_0x547985[_0x5e4588(0x205)],_0x26eac9['CVVSj'])&&_0x547985['blockedReason']&&console[_0x5e4588(0x1cd)]('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x547985['blockedReason']);_0x26eac9[_0x5e4588(0x1a7)](_0x547985[_0x5e4588(0x205)],_0x5e4588(0x1e4))&&_0x547985[_0x5e4588(0x24e)]&&console['log'](_0x5e4588(0x1d2)+_0x547985['incompleteReason']);if(_0x547985['status']===_0x26eac9[_0x5e4588(0x258)]&&_0x26eac9[_0x5e4588(0x206)](_0x547985[_0x5e4588(0x1fd)],'approved'))console[_0x5e4588(0x1cd)]('\x20\x20\x20\x20\x20\x20Approved');else _0x547985['status']===_0x5e4588(0x21d)&&_0x547985[_0x5e4588(0x216)]&&console[_0x5e4588(0x1cd)]('\x20\x20\x20\x20\x20\x20Cancelled:\x20'+_0x547985['canceledReason']);}}}export async function featureCreate(_0x3e95e9,_0x2c16dd){const _0x3adddb=_0x4f9439,_0x14e89c={'XoDlA':function(_0x12b624,_0x563172){return _0x12b624===_0x563172;},'jIXzl':function(_0x46edb7,_0x549cc9){return _0x46edb7(_0x549cc9);},'UiNdL':function(_0x36ab16){return _0x36ab16();},'yTJLz':function(_0x4a017e,_0x435a80){return _0x4a017e(_0x435a80);},'LzxNm':function(_0x521c37,_0x3f8240,_0x547c4d){return _0x521c37(_0x3f8240,_0x547c4d);}},{envNames:_0x2a4c24}=await getEnvNames();_0x14e89c['XoDlA'](_0x2a4c24['length'],0x0)&&console[_0x3adddb(0x225)]('\x0a'+_0x14e89c['jIXzl'](formatProfileRequiredMessage,_0x4e48fe=>bold(_0x4e48fe)));const _0x3aa22a=_0x2c16dd['scenarios']?_0x2c16dd['scenarios'][_0x3adddb(0x263)](_0x240949=>_0x240949['trim']()):[],_0x1f7c4d=_0x14e89c[_0x3adddb(0x1e7)](getGitRepoUrl),_0x554d7c=_0x14e89c[_0x3adddb(0x1e7)](getGitBranch);console['log'](_0x3adddb(0x1f8));const _0x18cbf5=await _0x14e89c['jIXzl'](createFeature,{'name':_0x3e95e9,'description':_0x2c16dd[_0x3adddb(0x257)],'checklist':_0x3aa22a,'gitRepoUrl':_0x1f7c4d,'gitBranch':_0x554d7c});await setActiveFeatureId(_0x18cbf5['id']),await _0x14e89c[_0x3adddb(0x1f5)](tryStartCurrentSession,_0x18cbf5['id']);const _0x5f3dc6=process[_0x3adddb(0x1b6)]['CLAUDE_SESSION_ID'];_0x5f3dc6&®isterSession(_0x5f3dc6,_0x18cbf5['id']),console[_0x3adddb(0x1cd)]('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x18cbf5['id']),_0x14e89c['LzxNm'](displayFeature,_0x18cbf5,_0x18cbf5['checklistItems']),console[_0x3adddb(0x1cd)]('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0x51184a){const _0x58792a=_0x4f9439,_0x31e680={'UyTha':_0x58792a(0x20a),'gFmuG':function(_0x1d1b4c,_0xbbca56){return _0x1d1b4c>_0xbbca56;},'ASgeE':_0x58792a(0x20f),'IYMga':_0x58792a(0x23e)},_0xbfeca9={'limit':_0x51184a['limit']??0xa,'offset':_0x51184a['offset']??0x0,'includeDeleted':_0x51184a[_0x58792a(0x23a)]};_0x51184a[_0x58792a(0x1d0)]&&(_0xbfeca9['gitRepoUrl']=getGitRepoUrl(),_0xbfeca9['gitBranch']=getGitBranch());const _0x2841cd=await listFeatures(_0xbfeca9);if(_0x2841cd['items'][_0x58792a(0x1c5)]===0x0){console['log'](_0x31e680[_0x58792a(0x229)]);return;}const _0x259d55=_0x31e680[_0x58792a(0x239)](_0x2841cd['totalCount'],_0x2841cd[_0x58792a(0x1ae)]['length'])?'Showing\x20'+_0x2841cd[_0x58792a(0x1ae)][_0x58792a(0x1c5)]+'\x20of\x20'+_0x2841cd['totalCount']:_0x2841cd['totalCount']+_0x58792a(0x1ec);console[_0x58792a(0x1cd)]('\x0a'+_0x259d55+':\x0a');for(const _0x1f6906 of _0x2841cd['items']){const _0x47db9d=_0x31e680['ASgeE']['split']('|');let _0x312dc8=0x0;while(!![]){switch(_0x47db9d[_0x312dc8++]){case'0':console[_0x58792a(0x1cd)](_0x58792a(0x1fc)+new Date(_0x1f6906[_0x58792a(0x246)])['toLocaleDateString']());continue;case'1':_0x1f6906[_0x58792a(0x254)]&&console['log'](_0x58792a(0x21c)+_0x1f6906['gitBranch']);continue;case'2':console['log'](''+_0x1f6906[_0x58792a(0x1d5)]);continue;case'3':console['log']('\x20\x20\x20ID:\x20'+_0x1f6906['id']);continue;case'4':_0x1f6906[_0x58792a(0x1bf)]&&console[_0x58792a(0x1cd)]('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x1f6906[_0x58792a(0x1bf)]));continue;case'5':console['log']('');continue;}break;}}const _0x4f1f6f=_0xbfeca9[_0x58792a(0x1b9)]??0xa,_0xa25fd5=(_0xbfeca9['offset']??0x0)+_0x2841cd['items']['length'];if(_0xa25fd5<_0x2841cd[_0x58792a(0x25a)]){const _0x3964e3=_0x4f1f6f!==0xa?_0x58792a(0x1da)+_0x4f1f6f:'',_0x5af591=_0x51184a['currentBranch']?'\x20--current-branch':'',_0x3d4ec0=_0x51184a['includeDeleted']?_0x31e680['IYMga']:'';console[_0x58792a(0x1cd)](_0x58792a(0x219)+_0xa25fd5+_0x3964e3+_0x5af591+_0x3d4ec0);}}export async function featureShow(_0xdb16b1){const _0x412073=_0x4f9439,_0x38a6c0={'dTWOd':function(_0x340531){return _0x340531();},'lfpxj':_0x412073(0x259)},_0x3d182e=_0xdb16b1||await _0x38a6c0[_0x412073(0x1e9)](getActiveFeatureId);if(!_0x3d182e)throw new Error(_0x38a6c0[_0x412073(0x235)]);const _0x1f1df6=await getFeature(_0x3d182e);displayFeature(_0x1f1df6,_0x1f1df6[_0x412073(0x1a9)]);}export async function featureResume(_0x2ad3bd){const _0x5ec08f=_0x4f9439,_0xd0bbe5={'OdaIg':function(_0x22d677,_0x349e8f){return _0x22d677!==_0x349e8f;},'IYoBQ':function(_0x3b29ec){return _0x3b29ec();},'KhXRT':function(_0x86bb45,_0x35680e){return _0x86bb45||_0x35680e;},'bbqAx':'any','SFDvp':function(_0x52b193,_0x23b577){return _0x52b193===_0x23b577;},'gMILl':'\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','nRvuz':_0x5ec08f(0x269),'jsINE':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','tHBTN':'Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','OAxcV':'list','RRsIM':'selected','JFNdD':function(_0x20ddd7,_0x50ea6b){return _0x20ddd7(_0x50ea6b);},'tZJhV':function(_0x112757,_0x4e20f9,_0x2e7e55){return _0x112757(_0x4e20f9,_0x2e7e55);},'fNCea':function(_0x2651e5,_0x4e8668,_0x3c34c7){return _0x2651e5(_0x4e8668,_0x3c34c7);}};if(_0x2ad3bd){const _0x11a339=await getFeature(_0x2ad3bd);await setActiveFeatureId(_0x11a339['id']);const _0x3bffa7=getGitBranch();_0x3bffa7&&_0xd0bbe5[_0x5ec08f(0x251)](_0x3bffa7,_0x11a339['gitBranch'])&&(await updateFeature(_0x11a339['id'],{'gitBranch':_0x3bffa7}),console[_0x5ec08f(0x1cd)](_0x5ec08f(0x1f0)+_0x3bffa7));console[_0x5ec08f(0x1cd)]('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x11a339[_0x5ec08f(0x1d5)]+'\x20('+_0x11a339['id']+')'),await tryStartCurrentSession(_0x11a339['id']);const _0x39e13d=process['env'][_0x5ec08f(0x236)];_0x39e13d&®isterSession(_0x39e13d,_0x11a339['id']);displayFeature(_0x11a339,_0x11a339['checklistItems']),await printFeedbackNudge(_0x11a339['id']);return;}const _0x160143=_0xd0bbe5['IYoBQ'](getGitRepoUrl),_0x398859=getGitBranch();if(!_0x160143&&!_0x398859)throw new Error('Not\x20in\x20a\x20git\x20repository.');console[_0x5ec08f(0x1cd)]('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+_0xd0bbe5[_0x5ec08f(0x1ea)](_0x160143,_0x5ec08f(0x1eb))+'\x20/\x20'+_0xd0bbe5[_0x5ec08f(0x1ea)](_0x398859,_0xd0bbe5[_0x5ec08f(0x1b1)])+_0x5ec08f(0x266));const _0x311c71=await listFeatures({'gitRepoUrl':_0x160143,'gitBranch':_0x398859}),_0x36fab0=_0x311c71[_0x5ec08f(0x1ae)]['filter'](_0x450eba=>!_0x450eba[_0x5ec08f(0x220)]);if(_0xd0bbe5[_0x5ec08f(0x1b8)](_0x36fab0['length'],0x0)){console['log'](_0xd0bbe5['gMILl']),console['log'](_0xd0bbe5['nRvuz']);return;}let _0x381ac6;if(_0x36fab0['length']===0x1)_0x381ac6=_0x36fab0[0x0];else{const _0x3a2193=process[_0x5ec08f(0x1af)][_0x5ec08f(0x23f)]&&process['stdout']['isTTY'];if(!_0x3a2193){console['log'](_0xd0bbe5['jsINE']);for(const _0xa5e99d of _0x36fab0){console[_0x5ec08f(0x1cd)]('\x20\x20'+_0xa5e99d['name']),console['log'](_0x5ec08f(0x1e2)+_0xa5e99d['id']),_0xa5e99d['stats']&&console['log'](_0x5ec08f(0x1f1)+getProgressDisplay(_0xa5e99d[_0x5ec08f(0x1bf)])),_0xa5e99d['gitBranch']&&console[_0x5ec08f(0x1cd)](_0x5ec08f(0x1ab)+_0xa5e99d['gitBranch']);}throw new Error(_0xd0bbe5[_0x5ec08f(0x1d3)]);}const {selected:_0x14fcbf}=await _0x4db099['prompt']([{'type':_0xd0bbe5['OAxcV'],'name':_0xd0bbe5['RRsIM'],'message':_0x5ec08f(0x1bb),'choices':_0x36fab0['map'](_0x10d7e9=>({'name':_0x10d7e9[_0x5ec08f(0x1d5)]+'\x20('+_0x10d7e9['id']+')','value':_0x10d7e9['id']}))}]);_0x381ac6=_0x36fab0['find'](_0x4e3d89=>_0x4e3d89['id']===_0x14fcbf);}await _0xd0bbe5['JFNdD'](setActiveFeatureId,_0x381ac6['id']);_0x398859&&_0xd0bbe5['OdaIg'](_0x398859,_0x381ac6['gitBranch'])&&(await _0xd0bbe5['tZJhV'](updateFeature,_0x381ac6['id'],{'gitBranch':_0x398859}),console[_0x5ec08f(0x1cd)]('\x20\x20\x20Updated\x20branch\x20to:\x20'+_0x398859));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x381ac6[_0x5ec08f(0x1d5)]+'\x20('+_0x381ac6['id']+')'),await _0xd0bbe5[_0x5ec08f(0x24c)](tryStartCurrentSession,_0x381ac6['id']);const _0x5ea0e9=await getFeature(_0x381ac6['id']),_0x348252=process[_0x5ec08f(0x1b6)]['CLAUDE_SESSION_ID'];_0x348252&®isterSession(_0x348252,_0x5ea0e9['id']),_0xd0bbe5['fNCea'](displayFeature,_0x5ea0e9,_0x5ea0e9['checklistItems']),await _0xd0bbe5['JFNdD'](printFeedbackNudge,_0x5ea0e9['id']);}async function printFeedbackNudge(_0x4cc236){const _0x4faa27=_0x4f9439,_0x56f754={'GBxXf':function(_0x53c357,_0x50ea6e,_0x5e2f49){return _0x53c357(_0x50ea6e,_0x5e2f49);},'vLZqt':_0x4faa27(0x1b0)};try{const {items:_0x306022}=await getActionItems(_0x4cc236);let _0x23b426=0x0,_0x1e5e09=0x0;for(const _0x3cac4e of _0x306022){const _0x731e58=await _0x56f754['GBxXf'](getItemFeedback,_0x4cc236,_0x3cac4e['id']);_0x731e58['unaddressedComments'][_0x4faa27(0x1c5)]>0x0&&(_0x23b426+=_0x731e58[_0x4faa27(0x203)]['length'],_0x1e5e09++);}_0x23b426>0x0&&(console[_0x4faa27(0x1cd)](_0x4faa27(0x249)+_0x23b426+_0x4faa27(0x1ee)+_0x1e5e09+_0x4faa27(0x237)),console[_0x4faa27(0x1cd)](_0x56f754[_0x4faa27(0x247)]));}catch{}}async function tryStartCurrentSession(_0x4dab73){const _0x2fef5d=_0x4f9439,_0x156cae={'PkHzs':function(_0x2a4090,_0x57debd,_0x13f0cf){return _0x2a4090(_0x57debd,_0x13f0cf);}};try{const {sessions:_0x25d5f3}=await listFeatureSessions(_0x4dab73),_0x69d6ed=_0x25d5f3[_0x2fef5d(0x1f6)](_0x352bc8=>_0x352bc8['status']==='ready');_0x69d6ed&&(await _0x156cae[_0x2fef5d(0x1cb)](startSession,_0x4dab73,_0x69d6ed['id']),console['log']('\x20\x20\x20▶️\x20Started\x20session\x20'+_0x69d6ed[_0x2fef5d(0x207)]));}catch{}}export async function featureReport(_0x21cf8e,_0x275c5f){const _0x5d506c=_0x4f9439,_0x2ae008={'GGhrM':'reports','yJXHK':function(_0x4ebb80,_0x296187,_0x51d211){return _0x4ebb80(_0x296187,_0x51d211);},'hcneu':function(_0x516df1,_0x573edc,_0x32fbba,_0x46be71){return _0x516df1(_0x573edc,_0x32fbba,_0x46be71);}},_0x36527d=_0x21cf8e||await getActiveFeatureId();if(!_0x36527d)throw new Error(_0x5d506c(0x1c6));console['log'](_0x5d506c(0x1d8));const _0x33d740=await getFeatureReportMarkdown(_0x36527d,{'style':_0x275c5f[_0x5d506c(0x1d9)]}),_0x9343d1=_0x275c5f['output']||join(getRangerDir(),_0x2ae008['GGhrM'],_0x36527d+_0x5d506c(0x230)),_0x4c501c=join(_0x9343d1,'..');!existsSync(_0x4c501c)&&await _0x2ae008[_0x5d506c(0x264)](mkdir,_0x4c501c,{'recursive':!![]}),await _0x2ae008['hcneu'](writeFile,_0x9343d1,_0x33d740,_0x5d506c(0x228)),console['log'](_0x5d506c(0x256)+_0x9343d1);}export async function featureReportPrDescription(_0xad95a3,_0x4eeeeb){const _0xba943c=_0x4f9439,_0xf2d357={'CpSiY':function(_0x131838,_0x547b6a,_0x3b8aca){return _0x131838(_0x547b6a,_0x3b8aca);},'RftvU':function(_0x975e41,_0x473c46){return _0x975e41+_0x473c46;},'cXXvm':_0xba943c(0x1ba)},_0x56a363=_0xad95a3||await getActiveFeatureId();if(!_0x56a363)throw new Error(_0xba943c(0x1c6));const _0xf47bf4=await getFeature(_0x56a363),_0x3094a8=_0xf47bf4[_0xba943c(0x1a9)]||[],_0x488f90=_0xf2d357['CpSiY'](getCurrentSessionItems,_0xf47bf4,_0x3094a8);_0x488f90['length']===0x0&&(console['error'](_0xba943c(0x261)),process[_0xba943c(0x25c)](0x1));const _0x3d52f3=_0x4eeeeb['excludeScenarios']??[],_0x5ea63d=_0x3d52f3['filter'](_0x422b69=>!Number['isInteger'](_0x422b69)||_0x422b69<0x1||_0x422b69>_0x488f90[_0xba943c(0x1c5)]);if(_0x5ea63d[_0xba943c(0x1c5)]>0x0){console['error']('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x5ea63d[_0xba943c(0x1e5)](',\x20')),console[_0xba943c(0x1cd)]('\x0aAvailable\x20scenarios:');for(let _0x537c7c=0x0;_0x537c7c<_0x488f90['length'];_0x537c7c++){console['log']('\x20\x20'+_0xf2d357[_0xba943c(0x1ed)](_0x537c7c,0x1)+'.\x20'+_0x488f90[_0x537c7c][_0xba943c(0x257)]);}process['exit'](0x1);}const _0x4a81c5=new Set(_0x3d52f3[_0xba943c(0x263)](_0x1685de=>_0x1685de-0x1)),_0x45e60a=_0x488f90['filter']((_0x434384,_0x76b049)=>!_0x4a81c5['has'](_0x76b049));_0x45e60a[_0xba943c(0x1c5)]===0x0&&(console[_0xba943c(0x22a)](_0xf2d357[_0xba943c(0x209)]),process[_0xba943c(0x25c)](0x1));const _0x4fce39=await getFeatureReportMarkdown(_0x56a363,{'itemIds':_0x45e60a[_0xba943c(0x263)](_0x4a5f7e=>_0x4a5f7e['id'])});process[_0xba943c(0x1d1)]['write'](_0x4fce39['trimEnd']()+'\x0a');}export async function featureConcludeSession(_0x329188){const _0x998a8=_0x4f9439,_0x32ec6e={'MEYDr':function(_0x358678){return _0x358678();},'dkxHJ':_0x998a8(0x22c),'hGujA':function(_0x1a9505,_0x386d81){return _0x1a9505(_0x386d81);},'uyUwX':function(_0x4b71c7,_0x756b79){return _0x4b71c7===_0x756b79;},'SDwPS':'\x0a✅\x20Session\x20is\x20already\x20completed.','ucjQD':function(_0x5a2209,_0x4f3d6b){return _0x5a2209!==_0x4f3d6b;},'cLEeg':function(_0x340d18,_0x3c2e88,_0xcdb08f){return _0x340d18(_0x3c2e88,_0xcdb08f);}},_0x3fd04e=_0x329188||await _0x32ec6e['MEYDr'](getActiveFeatureId);if(!_0x3fd04e)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 _0xab5655=await getFeature(_0x3fd04e);if(!_0xab5655[_0x998a8(0x201)])throw new Error(_0x32ec6e[_0x998a8(0x1b2)]);const {sessions:_0x124627}=await _0x32ec6e['hGujA'](listFeatureSessions,_0x3fd04e),_0x21afe1=_0x124627['find'](_0xa2a497=>_0xa2a497['id']===_0xab5655[_0x998a8(0x201)]);if(!_0x21afe1)throw new Error(_0x998a8(0x20b));if(_0x32ec6e['uyUwX'](_0x21afe1[_0x998a8(0x205)],_0x998a8(0x231))){console[_0x998a8(0x1cd)](_0x32ec6e['SDwPS']);return;}if(_0x32ec6e[_0x998a8(0x204)](_0x21afe1['status'],'in_progress'))throw new Error(_0x998a8(0x1aa)+_0x21afe1[_0x998a8(0x205)]);console['log']('\x0aConcluding\x20session...'),await _0x32ec6e[_0x998a8(0x215)](concludeSession,_0x3fd04e,_0xab5655[_0x998a8(0x201)]),console['log'](_0x998a8(0x211)+_0x21afe1['iteration']+_0x998a8(0x21a)),console['log'](_0x998a8(0x23c));}export async function featureSessions(_0x582058){const _0x3827f4=_0x4f9439,_0x527d3b={'vamgU':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','ngPDy':function(_0x5486b1,_0x4ca7b8){return _0x5486b1(_0x4ca7b8);},'oQKtF':function(_0x2d1a61,_0x1b2ace){return _0x2d1a61===_0x1b2ace;},'yKtwU':function(_0x37a3e3,_0x5978d1){return _0x37a3e3===_0x5978d1;},'tnwIg':function(_0x49fa8a,_0x4b2c77){return _0x49fa8a===_0x4b2c77;}},_0x50f456=_0x582058||await getActiveFeatureId();if(!_0x50f456)throw new Error(_0x527d3b[_0x3827f4(0x1c8)]);const _0x26b2e4=await _0x527d3b['ngPDy'](getFeature,_0x50f456);console['log'](_0x3827f4(0x248)+_0x26b2e4['name']+'\x0a');const {sessions:_0xde1efc}=await listFeatureSessions(_0x50f456);if(_0x527d3b['oQKtF'](_0xde1efc[_0x3827f4(0x1c5)],0x0)){console[_0x3827f4(0x1cd)](_0x3827f4(0x25e));return;}for(const _0x46367c of _0xde1efc){const _0x3c2b52=_0x527d3b['yKtwU'](_0x46367c[_0x3827f4(0x205)],_0x3827f4(0x231))?'✅':_0x527d3b['tnwIg'](_0x46367c[_0x3827f4(0x205)],'in_progress')?'🔄':'▶️';console[_0x3827f4(0x1cd)](_0x3c2b52+'\x20Session\x20'+_0x46367c[_0x3827f4(0x207)]+'\x20('+_0x46367c['id']+')'),console['log']('\x20\x20\x20Status:\x20'+_0x46367c['status']),console[_0x3827f4(0x1cd)]('\x20\x20\x20Created:\x20'+new Date(_0x46367c[_0x3827f4(0x246)])['toLocaleString']()),_0x46367c['completedAt']&&console['log'](_0x3827f4(0x1b4)+new Date(_0x46367c[_0x3827f4(0x220)])[_0x3827f4(0x1df)]()),console['log']('');}}export async function featureAddScenario(_0x282b5e,_0x487ad7){const _0x27fde2=_0x4f9439,_0x1283cb={'rzGpr':_0x27fde2(0x259)},_0x51ecac=_0x487ad7||await getActiveFeatureId();if(!_0x51ecac)throw new Error(_0x1283cb['rzGpr']);const _0x22320e=await getFeature(_0x51ecac);if(_0x22320e[_0x27fde2(0x23b)]&&!_0x22320e['latestReview'][_0x27fde2(0x214)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x22320e[_0x27fde2(0x1b3)]);await createChecklistItem(_0x51ecac,_0x282b5e);const _0x3e302f=await getFeature(_0x51ecac);console['log'](_0x27fde2(0x1a6)),displayFeature(_0x3e302f,_0x3e302f[_0x27fde2(0x1a9)]);}export async function featureEditScenario(_0x492b64,_0x1de5ee){const _0x19cea9=_0x4f9439,_0x207a2e={'evQUV':_0x19cea9(0x1c1),'lWtKb':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','qdMNd':function(_0x510651,_0x5d4697){return _0x510651===_0x5d4697;},'NhfxR':_0x19cea9(0x212),'SkRaG':'\x0aAvailable\x20scenarios:','ZGcty':function(_0x1dad3b,_0x3f14be){return _0x1dad3b+_0x3f14be;},'DIxsX':function(_0x220433,_0x18ffcb){return _0x220433-_0x18ffcb;},'QCWBQ':function(_0x5096b6,_0x5e6103){return _0x5096b6<_0x5e6103;},'DLjOO':function(_0x54a80e,_0x4f52f3){return _0x54a80e<_0x4f52f3;},'crloK':function(_0x113f77,_0x41dbd3,_0x5ee074,_0x552f71){return _0x113f77(_0x41dbd3,_0x5ee074,_0x552f71);},'VvjCr':function(_0x2c0a0f,_0x20f0e5){return _0x2c0a0f(_0x20f0e5);},'QLDec':function(_0x2209ff,_0x4880a4,_0x304d6b){return _0x2209ff(_0x4880a4,_0x304d6b);}},_0x5bce7e=_0x1de5ee['id']||await getActiveFeatureId();!_0x5bce7e&&(console[_0x19cea9(0x22a)]('\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.'),console[_0x19cea9(0x22a)](_0x19cea9(0x1c0)),process['exit'](0x1));const _0x422244=await getFeature(_0x5bce7e);_0x422244[_0x19cea9(0x23b)]&&!_0x422244[_0x19cea9(0x23b)]['submittedAt']&&(console[_0x19cea9(0x22a)](_0x19cea9(0x227)),console['error'](_0x207a2e['evQUV']),console[_0x19cea9(0x22a)]('\x20\x20'+_0x422244[_0x19cea9(0x1b3)]),process[_0x19cea9(0x25c)](0x1));const _0x2edde8=_0x422244['checklistItems']||[];_0x2edde8['length']===0x0&&(console[_0x19cea9(0x22a)](_0x207a2e['lWtKb']),process['exit'](0x1));if(_0x207a2e[_0x19cea9(0x1dd)](_0x1de5ee[_0x19cea9(0x242)],undefined)){console[_0x19cea9(0x22a)](_0x207a2e['NhfxR']),console['log'](_0x207a2e[_0x19cea9(0x223)]);for(let _0x3233d4=0x0;_0x3233d4<_0x2edde8[_0x19cea9(0x1c5)];_0x3233d4++){console['log']('\x20\x20'+_0x207a2e['ZGcty'](_0x3233d4,0x1)+'.\x20'+_0x2edde8[_0x3233d4][_0x19cea9(0x257)]);}process['exit'](0x1);}const _0x2e93ab=_0x207a2e[_0x19cea9(0x1c4)](_0x1de5ee['scenario'],0x1);if(_0x207a2e[_0x19cea9(0x1e6)](_0x2e93ab,0x0)||_0x2e93ab>=_0x2edde8[_0x19cea9(0x1c5)]){console['error']('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x1de5ee[_0x19cea9(0x242)]+'.\x20Feature\x20review\x20has\x20'+_0x2edde8[_0x19cea9(0x1c5)]+_0x19cea9(0x1cf)),console['log'](_0x19cea9(0x1f4));for(let _0x5d3eff=0x0;_0x207a2e[_0x19cea9(0x1f2)](_0x5d3eff,_0x2edde8['length']);_0x5d3eff++){console['log']('\x20\x20'+(_0x5d3eff+0x1)+'.\x20'+_0x2edde8[_0x5d3eff][_0x19cea9(0x257)]);}process[_0x19cea9(0x25c)](0x1);}const _0x271442=_0x2edde8[_0x2e93ab];await _0x207a2e[_0x19cea9(0x221)](updateChecklistItem,_0x5bce7e,_0x271442['id'],{'description':_0x492b64});const _0x2001af=await _0x207a2e['VvjCr'](getFeature,_0x5bce7e);console['log']('\x0a✅\x20Scenario\x20updated'),_0x207a2e['QLDec'](displayFeature,_0x2001af,_0x2001af[_0x19cea9(0x1a9)]);}async function downloadFeedbackImage(_0x5d9d95,_0x449181){const _0x1f0ff1=_0x4f9439,_0x16175f={'pLylh':function(_0x3dd1ee,_0x17ba81,_0x1a60d3){return _0x3dd1ee(_0x17ba81,_0x1a60d3);},'tzNpz':function(_0x26b1e1){return _0x26b1e1();},'ONddS':'feedback-images','jNmWI':function(_0x2e0131,_0x4048dc){return _0x2e0131(_0x4048dc);}};try{const _0xb14865=_0x16175f['pLylh'](join,_0x16175f[_0x1f0ff1(0x217)](getRangerDir),_0x16175f[_0x1f0ff1(0x202)]);await mkdir(_0xb14865,{'recursive':!![]});const _0x479414=join(_0xb14865,'comment_'+_0x449181+'.png'),_0x4c27d1=await _0x16175f[_0x1f0ff1(0x1f9)](fetch,_0x5d9d95);if(!_0x4c27d1['ok'])return null;const _0x36599a=Buffer['from'](await _0x4c27d1[_0x1f0ff1(0x24a)]());return await writeFile(_0x479414,_0x36599a),_0x479414;}catch{return null;}}export async function featureGetReview(_0x2949a5){const _0x559240=_0x4f9439,_0x37db35={'AFzBv':function(_0x1bf49c){return _0x1bf49c();},'mqElM':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','fzJqM':function(_0x5ba69b,_0x18dac9){return _0x5ba69b(_0x18dac9);},'lkIKu':function(_0x2c8a01,_0x47f479){return _0x2c8a01===_0x47f479;},'XQQUB':'No\x20scenarios\x20found.','VuNQU':function(_0x4b55aa,_0x538345){return _0x4b55aa<_0x538345;},'JoaKE':function(_0x201bf3,_0x1c6222){return _0x201bf3>_0x1c6222;},'pVsKN':function(_0x50d561,_0x5ae124,_0xff94ee){return _0x50d561(_0x5ae124,_0xff94ee);},'OIRyE':function(_0x46a9fd,_0x3b807f){return _0x46a9fd>_0x3b807f;},'IzIHu':function(_0x3eb6c4,_0x578732){return _0x3eb6c4+_0x578732;},'qjBsw':'short','xPwiP':'element','cpzjz':function(_0x16a60d,_0x366cd0){return _0x16a60d===_0x366cd0;},'RBlZv':_0x559240(0x24f),'tARgX':function(_0x3a8733,_0x2bb245){return _0x3a8733>=_0x2bb245;},'qcSTQ':function(_0x291e55,_0x342e1a){return _0x291e55+_0x342e1a;}},_0x419f28=_0x2949a5||await _0x37db35[_0x559240(0x1d4)](getActiveFeatureId);if(!_0x419f28)throw new Error(_0x37db35[_0x559240(0x243)]);const _0x4677e2=await _0x37db35['fzJqM'](getFeature,_0x419f28),{items:_0x1c485a}=await getActionItems(_0x419f28);console['log'](_0x559240(0x20e)+_0x4677e2[_0x559240(0x1d5)]+'\x20('+_0x4677e2['id']+')\x0a');if(_0x37db35['lkIKu'](_0x1c485a[_0x559240(0x1c5)],0x0)){console['log'](_0x37db35[_0x559240(0x218)]);return;}for(let _0x38ae52=0x0;_0x37db35['VuNQU'](_0x38ae52,_0x1c485a[_0x559240(0x1c5)]);_0x38ae52++){const _0x23d4c0=_0x1c485a[_0x38ae52],_0x2bf7ed=_0x37db35[_0x559240(0x23d)](_0x23d4c0['version'],0x1)?'\x20(v'+_0x23d4c0['version']+')':'',_0x8858f8=await _0x37db35['pVsKN'](getItemFeedback,_0x419f28,_0x23d4c0['id']);if(_0x37db35[_0x559240(0x222)](_0x8858f8[_0x559240(0x203)]['length'],0x0)){console['log']('Scenario\x20'+_0x37db35['IzIHu'](_0x38ae52,0x1)+_0x559240(0x1a8)+_0x23d4c0[_0x559240(0x257)]+'\x22'+_0x2bf7ed+'\x20—\x20'+_0x8858f8[_0x559240(0x203)][_0x559240(0x1c5)]+'\x20unaddressed\x20comment(s)');for(const _0x58f6f5 of _0x8858f8['unaddressedComments']){const _0x4576c2=new Date(_0x58f6f5[_0x559240(0x246)])['toLocaleDateString']('en-US',{'month':_0x37db35[_0x559240(0x1d6)],'day':_0x559240(0x1bc)}),_0x2f6bd5=_0x58f6f5[_0x559240(0x1be)]||_0x58f6f5['authorEmail']||'Unknown';console[_0x559240(0x1cd)]('\x20\x20💬\x20'+_0x2f6bd5+'\x20('+_0x4576c2+'):\x20\x22'+_0x58f6f5[_0x559240(0x1ff)]+'\x22');if(_0x58f6f5['assetUrl']){const _0x39a114=await downloadFeedbackImage(_0x58f6f5['assetUrl'],_0x58f6f5['id']);_0x39a114&&console['log']('\x20\x20\x20\x20\x20📷\x20Screenshot:\x20'+_0x39a114);}if(_0x58f6f5[_0x559240(0x226)]){const _0x558c80=_0x58f6f5[_0x559240(0x226)]['selector']['split']('\x20>\x20')[_0x559240(0x1c2)]()?.[_0x559240(0x262)](':')[0x0]||_0x37db35[_0x559240(0x1de)],_0x3ca816=_0x58f6f5['domRef'][_0x559240(0x1f7)]?'\x20\x22'+_0x58f6f5['domRef'][_0x559240(0x1f7)]['slice'](0x0,0x3c)+'\x22':'';console['log'](_0x559240(0x1fb)+_0x558c80+'>'+_0x3ca816),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x58f6f5[_0x559240(0x226)][_0x559240(0x234)]);}else{if(_0x58f6f5['spatial']){const _0x2f1dd5=_0x58f6f5[_0x559240(0x25d)]['coordinates'];_0x37db35['cpzjz'](_0x58f6f5['spatial'][_0x559240(0x25f)],_0x37db35[_0x559240(0x238)])&&_0x37db35[_0x559240(0x233)](_0x2f1dd5[_0x559240(0x1c5)],0x2)?console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x2f1dd5[0x0][_0x559240(0x1ad)](0x2)+',\x20'+_0x2f1dd5[0x1][_0x559240(0x1ad)](0x2)+')'):console[_0x559240(0x1cd)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x58f6f5[_0x559240(0x25d)]['type']+'\x20at\x20['+_0x2f1dd5['map'](_0x1f12b7=>_0x1f12b7['toFixed'](0x2))[_0x559240(0x1e5)](',\x20')+']');}}}if(_0x8858f8[_0x559240(0x252)]){console['log'](_0x559240(0x1c3));for(const _0x2b64b6 of _0x8858f8['canonicalFlow'][_0x559240(0x262)]('\x0a')){console['log'](_0x559240(0x24d)+_0x2b64b6);}}}else console['log'](_0x559240(0x1a5)+_0x37db35['qcSTQ'](_0x38ae52,0x1)+':\x20\x22'+_0x23d4c0[_0x559240(0x257)]+'\x22'+_0x2bf7ed+'\x20—\x20no\x20comments'),console['log']('\x20\x20✅\x20No\x20feedback\x20to\x20address');console[_0x559240(0x1cd)]('');}}export async function featureDelete(_0xfbb3c6){const _0x305c3a=_0x4f9439,_0x2b2b4e={'TWknS':_0x305c3a(0x259),'OZMmv':function(_0x20e1a3,_0x517989){return _0x20e1a3(_0x517989);},'iIEed':_0x305c3a(0x25b)},_0x2bc8a1=_0xfbb3c6||await getActiveFeatureId();if(!_0x2bc8a1)throw new Error(_0x2b2b4e[_0x305c3a(0x200)]);const _0x32f053=await _0x2b2b4e['OZMmv'](getFeature,_0x2bc8a1);await _0x2b2b4e['OZMmv'](softDeleteFeature,_0x2bc8a1),console['log'](_0x305c3a(0x22b)+_0x32f053[_0x305c3a(0x1d5)]+'\x20('+_0x2bc8a1+')'),console['log'](_0x2b2b4e['iIEed']+_0x2bc8a1);}export async function featureRestore(_0x277ddd){const _0x40e82d=_0x4f9439,_0x420363={'ViNNM':function(_0x5280c6,_0x4bc44d){return _0x5280c6(_0x4bc44d);}};await _0x420363['ViNNM'](restoreFeature,_0x277ddd);const _0x3a7887=await _0x420363['ViNNM'](getFeature,_0x277ddd);console[_0x40e82d(0x1cd)]('\x0a✅\x20Restored\x20feature\x20review:\x20'+_0x3a7887[_0x40e82d(0x1d5)]+'\x20('+_0x277ddd+')'),displayFeature(_0x3a7887,_0x3a7887['checklistItems']);}
|
package/build/commands/hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x858422,_0x299918){const _0x1fef73=_0x3545,_0x556f2a=_0x858422();while(!![]){try{const _0x3916c9=parseInt(_0x1fef73(0x115))/0x1+parseInt(_0x1fef73(0x112))/0x2+-parseInt(_0x1fef73(0x111))/0x3*(-parseInt(_0x1fef73(0x119))/0x4)+parseInt(_0x1fef73(0x11d))/0x5*(parseInt(_0x1fef73(0x11a))/0x6)+parseInt(_0x1fef73(0x113))/0x7*(parseInt(_0x1fef73(0x114))/0x8)+-parseInt(_0x1fef73(0x117))/0x9*(-parseInt(_0x1fef73(0x11b))/0xa)+-parseInt(_0x1fef73(0x118))/0xb;if(_0x3916c9===_0x299918)break;else _0x556f2a['push'](_0x556f2a['shift']());}catch(_0x1d1541){_0x556f2a['push'](_0x556f2a['shift']());}}}(_0x4677,0xd4c71));function _0x4677(){const _0x4432c7=['10592771knaOzp','8nqDNAm','378611AsGFKr','error','110241jOazPh','35052809AKRpGb','4ffksCf','756gJGwqM','20JrNBLg','Unknown\x20hook:\x20','55295GzhtZF','keys','1921635OjmffD','215630KyoeGy'];_0x4677=function(){return _0x4432c7;};return _0x4677();}function _0x3545(_0x574a77,_0xa7f045){_0x574a77=_0x574a77-0x111;const _0x467738=_0x4677();let _0x354585=_0x467738[_0x574a77];return _0x354585;}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};export async function hook(_0xd2ec6d,_0xa60320){const _0x18944c=_0x3545,_0x36c653={'bfAPR':function(_0x10859a,_0x74906a){return _0x10859a(_0x74906a);}},_0x27420e=HOOKS[_0xd2ec6d];if(!_0x27420e){const _0x45a685=Object[_0x18944c(0x11e)](HOOKS)['join'](',\x20');console[_0x18944c(0x116)](_0x18944c(0x11c)+_0xd2ec6d),console[_0x18944c(0x116)]('Valid\x20hooks:\x20'+_0x45a685),process['exit'](0x1);}await _0x36c653['bfAPR'](_0x27420e,_0xa60320);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ed8b6,_0x284608){const _0x5710ba=_0x509f,_0x360555=_0x4ed8b6();while(!![]){try{const _0x39f6cb=parseInt(_0x5710ba(0xc3))/0x1*(parseInt(_0x5710ba(0xbe))/0x2)+-parseInt(_0x5710ba(0xc6))/0x3*(parseInt(_0x5710ba(0xc8))/0x4)+-parseInt(_0x5710ba(0xc9))/0x5*(parseInt(_0x5710ba(0xbc))/0x6)+-parseInt(_0x5710ba(0xc0))/0x7*(parseInt(_0x5710ba(0xc4))/0x8)+parseInt(_0x5710ba(0xbd))/0x9*(-parseInt(_0x5710ba(0xc1))/0xa)+parseInt(_0x5710ba(0xc7))/0xb+-parseInt(_0x5710ba(0xbf))/0xc*(-parseInt(_0x5710ba(0xc5))/0xd);if(_0x39f6cb===_0x284608)break;else _0x360555['push'](_0x360555['shift']());}catch(_0x435cc1){_0x360555['push'](_0x360555['shift']());}}}(_0x5f0c,0xa9190));import{readHookInput}from'./output.js';import{isSessionEnabled,hasSessionBeenPrompted,markSessionPrompted}from'../utils/sessionCache.js';function _0x509f(_0x1f2fc1,_0x39cf9f){_0x1f2fc1=_0x1f2fc1-0xbc;const _0x5f0c32=_0x5f0c();let _0x509f2e=_0x5f0c32[_0x1f2fc1];return _0x509f2e;}const AUTO_PROMPT_TEXT='\x0a🚨\x20🚨\x20[ACTION\x20REQUIRED]\x20🚨\x20🚨\x0aBefore\x20responding\x20to\x20the\x20user\x27s\x20message,\x20consider\x20whether\x20this\x20task\x20will\x20involve\x20ANY\x20frontend,\x20UI,\x20or\x20browser\x20work.\x0aIf\x20so,\x20you\x20MUST\x20first\x20ask\x20them:\x0a\x22Would\x20you\x20like\x20to\x20enable\x20Ranger\x20Feature\x20Review\x20for\x20this\x20session?\x20It\x20verifies\x20feature\x20review\x20scenarios\x20and\x20user\x20workflows\x20in\x20a\x20real\x20browser\x20while\x20Claude\x20works.\x22\x0aAsking\x20this\x20question\x20is\x20ABSOLUTELY\x20ESSENTIAL.\x20DO\x20NOT\x20SKIP\x20THIS\x20STEP.\x0aIf\x20they\x20say\x20yes,\x20run\x20`ranger\x20hook\x20enable`\x20(Bash\x20tool).\x0aIf\x20they\x20say\x20no,\x20say\x20\x22Sounds\x20good.\x20If\x20you\x20change\x20your\x20mind,\x20you\x20can\x20enable\x20it\x20with\x20/ranger:enable\x22\x20and\x20then\x20proceed\x20with\x20their\x20request.\x0aThis\x20is\x20mandatory\x20—\x20do\x20not\x20skip\x20this\x20step.';function _0x5f0c(){const _0xaf8b61=['evLHO','1ZbXjzE','840776HfuDJu','7237165fWujYx','6IRVDAT','14249961TKqEKy','2228356qSATHr','4440sKWEod','3996YAWLKX','36wUchJN','2310800oZRuwt','24aNeljg','21kOqHMV','2126900jYMDiT'];_0x5f0c=function(){return _0xaf8b61;};return _0x5f0c();}export async function autoPrompt(){const _0x3aa994=_0x509f,_0x22cb65={'evLHO':function(_0x4246af,_0x32f2d9){return _0x4246af(_0x32f2d9);}},_0x3d75d1=await readHookInput(),_0x28535f=_0x3d75d1?.['session_id'];if(!_0x28535f)return;if(_0x22cb65['evLHO'](isSessionEnabled,_0x28535f)||_0x22cb65[_0x3aa994(0xc2)](hasSessionBeenPrompted,_0x28535f))return;markSessionPrompted(_0x28535f),console['log'](AUTO_PROMPT_TEXT);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x27590b,_0x550a1f){const _0xe7bf6a=_0x1a09,_0x5c0736=_0x27590b();while(!![]){try{const _0x529537=-parseInt(_0xe7bf6a(0x1a8))/0x1+-parseInt(_0xe7bf6a(0x19e))/0x2*(-parseInt(_0xe7bf6a(0x1a4))/0x3)+parseInt(_0xe7bf6a(0x1a2))/0x4+-parseInt(_0xe7bf6a(0x1ad))/0x5*(parseInt(_0xe7bf6a(0x1a3))/0x6)+-parseInt(_0xe7bf6a(0x19f))/0x7*(-parseInt(_0xe7bf6a(0x1a5))/0x8)+parseInt(_0xe7bf6a(0x1ab))/0x9*(-parseInt(_0xe7bf6a(0x1a6))/0xa)+parseInt(_0xe7bf6a(0x1a9))/0xb;if(_0x529537===_0x550a1f)break;else _0x5c0736['push'](_0x5c0736['shift']());}catch(_0x3c6b4c){_0x5c0736['push'](_0x5c0736['shift']());}}}(_0xd507,0xb36a4));import{disableSession,disableBranch,getCurrentBranch}from'../utils/sessionCache.js';function _0x1a09(_0x69dba0,_0x54b85a){_0x69dba0=_0x69dba0-0x19d;const _0xd507f3=_0xd507();let _0x1a0951=_0xd507f3[_0x69dba0];return _0x1a0951;}import{printBlock}from'./output.js';function _0xd507(){const _0x1cd379=['ZgaGs','4058eneGrf','7SasoWw','NQOOu','exit','4283776mcEvBb','1296TEQGnK','1413FgLYZb','2696232lGMgkY','10UzJeal','master','657236KvZvzI','11780934NwNhjF','cFBVh','8133786ceWaRn','fhrTY','26360LEyFaI','\x20and\x20branch\x20\x27'];_0xd507=function(){return _0x1cd379;};return _0xd507();}export async function disable(_0x2cf31c){const _0x3a5942=_0x1a09,_0x1b2d40={'ZgaGs':'Provide\x20--session-id\x20or\x20ensure\x20CLAUDE_SESSION_ID\x20is\x20set.','FlqDf':function(_0xf0a305,_0x5c37f9){return _0xf0a305(_0x5c37f9);},'NQOOu':function(_0x26f721){return _0x26f721();},'fhrTY':function(_0x8568ef,_0x69208b){return _0x8568ef!==_0x69208b;},'cFBVh':'main','dQscU':function(_0xc0d55f,_0x20bf27){return _0xc0d55f(_0x20bf27);}},_0xcb2b6a=_0x2cf31c||process['env']['CLAUDE_SESSION_ID']||'';!_0xcb2b6a&&(console['error']('Error:\x20No\x20session\x20ID\x20available.'),console['error'](_0x1b2d40[_0x3a5942(0x19d)]),process[_0x3a5942(0x1a1)](0x1));_0x1b2d40['FlqDf'](disableSession,_0xcb2b6a);const _0x2a027e=_0x1b2d40[_0x3a5942(0x1a0)](getCurrentBranch);_0x2a027e&&_0x1b2d40[_0x3a5942(0x1ac)](_0x2a027e,_0x1b2d40['cFBVh'])&&_0x2a027e!==_0x3a5942(0x1a7)&&_0x1b2d40['dQscU'](disableBranch,_0x2a027e),printBlock('#\x20RANGER\x20DISABLED\x0a\x0aThe\x20user\x20has\x20expressly\x20disabled\x20Ranger\x20hooks\x20for\x20this\x20session'+(_0x2a027e&&_0x2a027e!==_0x1b2d40[_0x3a5942(0x1aa)]&&_0x2a027e!==_0x3a5942(0x1a7)?_0x3a5942(0x1ae)+_0x2a027e+'\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(_0x42cc83,_0x202fd9){const _0x33fe84=_0x4334,_0x633248=_0x42cc83();while(!![]){try{const _0x428f28=-parseInt(_0x33fe84(0x209))/0x1+parseInt(_0x33fe84(0x1fb))/0x2*(parseInt(_0x33fe84(0x1fa))/0x3)+parseInt(_0x33fe84(0x201))/0x4+parseInt(_0x33fe84(0x1f8))/0x5*(-parseInt(_0x33fe84(0x1f5))/0x6)+-parseInt(_0x33fe84(0x1fe))/0x7+parseInt(_0x33fe84(0x1fc))/0x8+parseInt(_0x33fe84(0x1f7))/0x9;if(_0x428f28===_0x202fd9)break;else _0x633248['push'](_0x633248['shift']());}catch(_0x3a8fff){_0x633248['push'](_0x633248['shift']());}}}(_0x492c,0x91ac6));import{enableSession,getCurrentBranch}from'../utils/sessionCache.js';function _0x4334(_0x4d9616,_0xd56764){_0x4d9616=_0x4d9616-0x1f3;const _0x492c0e=_0x492c();let _0x4334f2=_0x492c0e[_0x4d9616];return _0x4334f2;}function _0x492c(){const _0x2fcffd=['Cngev','7209419YhQiPu','Provide\x20--session-id\x20or\x20ensure\x20CLAUDE_SESSION_ID\x20is\x20set.','`\x0a\x0aA\x20browser\x20will\x20open\x20for\x20authentication.\x20A\x20human\x20needs\x20to\x20complete\x20the\x20login.\x0a','4282892iaIcil','\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`.','JyRKo','Error:\x20No\x20session\x20ID\x20available.','cCPBY','main','\x0a\x0a**For\x20ANY\x20UI\x20work,\x20you\x20MUST\x20use\x20the\x20/ranger\x20skill.**\x0a\x0a','exit','64579IZyVVL','qXMPy','vwnoL','5181012yByJWc','fbVUF','820575sLsBgb','5gxeFPF','ranger\x20setup','111TDmOhG','41684ijNAfQ','4972992WXJSOc'];_0x492c=function(){return _0x2fcffd;};return _0x492c();}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(_0x166744){const _0x4ebb76=_0x4334,_0x285363={'JyRKo':_0x4ebb76(0x1ff),'cCPBY':function(_0x27dfac,_0x507a4d){return _0x27dfac(_0x507a4d);},'AHaZK':'Restart\x20your\x20Claude\x20Code\x20session\x20after\x20setup.','vwnoL':function(_0x4d517e){return _0x4d517e();},'qXMPy':function(_0x27f81e){return _0x27f81e();},'tkXrU':function(_0x1f9a2c,_0x38050f){return _0x1f9a2c!==_0x38050f;},'Cngev':_0x4ebb76(0x206),'fbVUF':function(_0x42e750,_0x36114c){return _0x42e750!==_0x36114c;}},_0x18d1e4=_0x166744||process['env']['CLAUDE_SESSION_ID']||'';!_0x18d1e4&&(console['error'](_0x4ebb76(0x204)),console['error'](_0x285363[_0x4ebb76(0x203)]),process[_0x4ebb76(0x208)](0x1));const _0x31efea=_0x285363[_0x4ebb76(0x205)](Boolean,_0x166744),_0x457235=await getToken();if(!_0x457235){const _0x1fdc11=_0x31efea?'ranger\x20setup\x20--opencode':_0x4ebb76(0x1f9),_0x50523a=_0x31efea?'Restart\x20your\x20OpenCode\x20session\x20after\x20setup.':_0x285363['AHaZK'];printBlock('#\x20RANGER\x20SETUP\x20REQUIRED\x0a\x0aThe\x20Ranger\x20CLI\x20is\x20not\x20configured.\x20To\x20get\x20started:\x0a\x0a1.\x20Install:\x20`npm\x20install\x20-g\x20@ranger-testing/ranger-cli`\x0a2.\x20Run:\x20`'+_0x1fdc11+_0x4ebb76(0x200)+_0x50523a);return;}try{await _0x285363[_0x4ebb76(0x1f4)](update);}catch{}enableSession(_0x18d1e4);const _0x12f227=_0x285363[_0x4ebb76(0x1f3)](getCurrentBranch),_0x126d51=_0x12f227&&_0x285363['tkXrU'](_0x12f227,_0x285363[_0x4ebb76(0x1fd)])&&_0x285363[_0x4ebb76(0x1f6)](_0x12f227,'master')?'\x0a\x0a**Branch\x20\x27'+_0x12f227+'\x27\x20is\x20now\x20enabled**\x20-\x20Ranger\x20will\x20stay\x20active\x20on\x20this\x20branch\x20across\x20sessions.':'',_0x2bc079=getRangerSkillContent();printBlock('#\x20RANGER\x20ENABLED'+_0x126d51+_0x4ebb76(0x207)+_0x2bc079+_0x4ebb76(0x202));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x45c0(){const _0x1ba095=['28344XBHVFk','11UaTGDO','ekstN','9825GoZnbf','25265FZBSqe','26708748WIEgyJ','17372ajGGTG','1878tIQlEe','174UiYCbk','812fRqIaT','2709ADcBcl','2502650xFFAAJ','10886031AzMyjc'];_0x45c0=function(){return _0x1ba095;};return _0x45c0();}(function(_0x4fba2a,_0x4f5e52){const _0x5d8392=_0x1aa4,_0x245627=_0x4fba2a();while(!![]){try{const _0x5cd236=-parseInt(_0x5d8392(0x1df))/0x1*(parseInt(_0x5d8392(0x1e1))/0x2)+-parseInt(_0x5d8392(0x1dc))/0x3*(parseInt(_0x5d8392(0x1e2))/0x4)+parseInt(_0x5d8392(0x1dd))/0x5*(-parseInt(_0x5d8392(0x1e0))/0x6)+parseInt(_0x5d8392(0x1e3))/0x7*(parseInt(_0x5d8392(0x1d9))/0x8)+parseInt(_0x5d8392(0x1d8))/0x9+-parseInt(_0x5d8392(0x1d7))/0xa+-parseInt(_0x5d8392(0x1da))/0xb*(-parseInt(_0x5d8392(0x1de))/0xc);if(_0x5cd236===_0x4f5e52)break;else _0x245627['push'](_0x245627['shift']());}catch(_0x3cfe24){_0x245627['push'](_0x245627['shift']());}}}(_0x45c0,0xc2eb2));function _0x1aa4(_0x4ac644,_0x4bf922){_0x4ac644=_0x4ac644-0x1d7;const _0x45c07c=_0x45c0();let _0x1aa40d=_0x45c07c[_0x4ac644];return _0x1aa40d;}import{printBlock,getEnabledSessionId}from'./output.js';export async function exitPlanMode(_0x3d5f58){const _0x349117=_0x1aa4,_0xf30066={'ekstN':function(_0x3243a1,_0x981ab){return _0x3243a1(_0x981ab);}},_0x576804=await getEnabledSessionId(_0x3d5f58);if(!_0x576804)return;_0xf30066[_0x349117(0x1db)](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
|
-
|
|
1
|
+
(function(_0x184400,_0x529633){var _0x54b911=_0x1e45,_0x33bac9=_0x184400();while(!![]){try{var _0x250aaa=-parseInt(_0x54b911(0xdb))/0x1*(parseInt(_0x54b911(0xd6))/0x2)+-parseInt(_0x54b911(0xd3))/0x3+parseInt(_0x54b911(0xd4))/0x4+parseInt(_0x54b911(0xd7))/0x5+parseInt(_0x54b911(0xd8))/0x6*(-parseInt(_0x54b911(0xda))/0x7)+-parseInt(_0x54b911(0xd5))/0x8+parseInt(_0x54b911(0xd9))/0x9;if(_0x250aaa===_0x529633)break;else _0x33bac9['push'](_0x33bac9['shift']());}catch(_0x33426d){_0x33bac9['push'](_0x33bac9['shift']());}}}(_0x46c2,0x59c5b));export{sessionStart}from'./sessionStart.js';export{sessionEnd}from'./sessionEnd.js';export{preCompact}from'./preCompact.js';export{postEdit}from'./postEdit.js';function _0x46c2(){var _0x3f676d=['1920840DtELbk','5807808cCbFnM','226LYlFfk','966575bGOrNc','6ByPZvs','10485864xdwNQp','3737489xrkhjX','1829VrNkvn','13002ZCeDXB'];_0x46c2=function(){return _0x3f676d;};return _0x46c2();}export{planStart}from'./planStart.js';export{planReminder}from'./planReminder.js';export{exitPlanMode}from'./exitPlanMode.js';function _0x1e45(_0x2ac247,_0x3d4466){_0x2ac247=_0x2ac247-0xd3;var _0x46c2a4=_0x46c2();var _0x1e4525=_0x46c2a4[_0x2ac247];return _0x1e4525;}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(_0x4b3c59,_0x53f8ab){const _0x248ceb=_0x1d4b,_0x420525=_0x4b3c59();while(!![]){try{const _0x5c9ed6=-parseInt(_0x248ceb(0x1d5))/0x1*(parseInt(_0x248ceb(0x1d3))/0x2)+parseInt(_0x248ceb(0x1d4))/0x3*(parseInt(_0x248ceb(0x1d0))/0x4)+parseInt(_0x248ceb(0x1cb))/0x5+parseInt(_0x248ceb(0x1cf))/0x6*(-parseInt(_0x248ceb(0x1ce))/0x7)+parseInt(_0x248ceb(0x1d2))/0x8*(parseInt(_0x248ceb(0x1d7))/0x9)+-parseInt(_0x248ceb(0x1cd))/0xa+-parseInt(_0x248ceb(0x1d1))/0xb*(parseInt(_0x248ceb(0x1cc))/0xc);if(_0x5c9ed6===_0x53f8ab)break;else _0x420525['push'](_0x420525['shift']());}catch(_0xdabb6e){_0x420525['push'](_0x420525['shift']());}}}(_0x4ac0,0xabca0));import{isSessionEnabled}from'../utils/sessionCache.js';export function printBlock(_0x4d1118){console['log'](_0x4d1118);}function _0x1d4b(_0x25076c,_0x177536){_0x25076c=_0x25076c-0x1cb;const _0x4ac010=_0x4ac0();let _0x1d4b61=_0x4ac010[_0x25076c];return _0x1d4b61;}export async function readHookInput(){let _0xed1dfd='';for await(const _0x41e65b of process['stdin']){_0xed1dfd+=_0x41e65b;}try{return JSON['parse'](_0xed1dfd);}catch{return null;}}function _0x4ac0(){const _0x4652c9=['10939437QQNhfc','6104525UYiSlC','297444VCYhTT','6764950tVnlRw','77BmKlvu','93666hZvrMu','40PGSHKQ','858bTPVOc','8iSKshj','2gKJHzl','370509kWRhmE','186178TssNiD','session_id'];_0x4ac0=function(){return _0x4652c9;};return _0x4ac0();}export async function getEnabledSessionId(_0x5a6166){const _0x50b6db=_0x1d4b,_0x578829={'kftme':function(_0x10399a,_0x36567f){return _0x10399a(_0x36567f);},'oDXLj':function(_0x2e1fa8){return _0x2e1fa8();}};if(_0x5a6166)return _0x578829['kftme'](isSessionEnabled,_0x5a6166)?_0x5a6166:null;const _0x47abca=await _0x578829['oDXLj'](readHookInput),_0x175d4b=_0x47abca?.[_0x50b6db(0x1d6)];if(!_0x175d4b||!isSessionEnabled(_0x175d4b))return null;return _0x175d4b;}export async function getEnabledHookContext(_0x368163){if(_0x368163){if(!isSessionEnabled(_0x368163))return null;return{'sessionId':_0x368163,'input':{'session_id':_0x368163}};}const _0x441b06=await readHookInput(),_0x8d6e5a=_0x441b06?.['session_id'];if(!_0x8d6e5a||!isSessionEnabled(_0x8d6e5a))return null;return{'sessionId':_0x8d6e5a,'input':_0x441b06};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x44c8(){const _0x33e225=['58617XklcKw','2129883kfZopC','722936MnemJS','1382hsrfRC','477670EEIqOg','781cEIYjV','200RELuVX','sessionId','1250575zbfaId','3sNZMYf','input','7130346YiziXF','971THrcoJ'];_0x44c8=function(){return _0x33e225;};return _0x44c8();}function _0x1b58(_0x4e1b0d,_0x46b3ca){_0x4e1b0d=_0x4e1b0d-0x102;const _0x44c8a0=_0x44c8();let _0x1b582f=_0x44c8a0[_0x4e1b0d];return _0x1b582f;}(function(_0xad4208,_0x2f4700){const _0x76c798=_0x1b58,_0x4119ac=_0xad4208();while(!![]){try{const _0x39fdad=parseInt(_0x76c798(0x10e))/0x1*(-parseInt(_0x76c798(0x105))/0x2)+-parseInt(_0x76c798(0x10b))/0x3*(parseInt(_0x76c798(0x104))/0x4)+-parseInt(_0x76c798(0x10a))/0x5+-parseInt(_0x76c798(0x10d))/0x6+-parseInt(_0x76c798(0x103))/0x7+-parseInt(_0x76c798(0x108))/0x8*(parseInt(_0x76c798(0x102))/0x9)+-parseInt(_0x76c798(0x106))/0xa*(-parseInt(_0x76c798(0x107))/0xb);if(_0x39fdad===_0x2f4700)break;else _0x4119ac['push'](_0x4119ac['shift']());}catch(_0xf483b2){_0x4119ac['push'](_0x4119ac['shift']());}}}(_0x44c8,0x9ad32));import{printBlock,getEnabledHookContext}from'./output.js';import{shouldShowPlanReminder}from'../utils/sessionCache.js';export async function planReminder(_0x2369aa){const _0x23dc03=_0x1b58,_0x4351a4=await getEnabledHookContext(_0x2369aa);if(!_0x4351a4)return;if(_0x4351a4[_0x23dc03(0x10c)]['permission_mode']!=='plan')return;if(!shouldShowPlanReminder(_0x4351a4[_0x23dc03(0x109)]))return;printBlock('===\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===');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0xc67c(){const _0x24fb29=['1477716fuwwqK','1951056QqVKRw','8LLuwlB','3282jDuPqL','===\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===','445kBKVzT','1493064pujHib','751594BdZDtv','287837pTIVjn','3424981idaQEC'];_0xc67c=function(){return _0x24fb29;};return _0xc67c();}(function(_0x49a4fb,_0x3921b0){const _0x472ba1=_0x2e01,_0x3db526=_0x49a4fb();while(!![]){try{const _0x211bc0=-parseInt(_0x472ba1(0x17f))/0x1+parseInt(_0x472ba1(0x17e))/0x2+parseInt(_0x472ba1(0x181))/0x3+parseInt(_0x472ba1(0x17d))/0x4+parseInt(_0x472ba1(0x17c))/0x5*(parseInt(_0x472ba1(0x17a))/0x6)+parseInt(_0x472ba1(0x180))/0x7*(-parseInt(_0x472ba1(0x179))/0x8)+-parseInt(_0x472ba1(0x178))/0x9;if(_0x211bc0===_0x3921b0)break;else _0x3db526['push'](_0x3db526['shift']());}catch(_0x1901ce){_0x3db526['push'](_0x3db526['shift']());}}}(_0xc67c,0x485de));function _0x2e01(_0x4bc75e,_0x5d4246){_0x4bc75e=_0x4bc75e-0x178;const _0xc67c94=_0xc67c();let _0x2e01ed=_0xc67c94[_0x4bc75e];return _0x2e01ed;}import{printBlock,getEnabledSessionId}from'./output.js';export async function planStart(_0xccc246){const _0x10678d=_0x2e01,_0x12880d=await getEnabledSessionId(_0xccc246);if(!_0x12880d)return;printBlock(_0x10678d(0x17b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f6b6b,_0x45853e){const _0x41b756=_0x4a7f,_0x4c94b3=_0x3f6b6b();while(!![]){try{const _0xb68abe=-parseInt(_0x41b756(0x9e))/0x1+parseInt(_0x41b756(0xa2))/0x2*(-parseInt(_0x41b756(0x9d))/0x3)+parseInt(_0x41b756(0x9b))/0x4*(parseInt(_0x41b756(0xa0))/0x5)+parseInt(_0x41b756(0x99))/0x6*(parseInt(_0x41b756(0x9f))/0x7)+parseInt(_0x41b756(0x97))/0x8+parseInt(_0x41b756(0x98))/0x9+parseInt(_0x41b756(0x9c))/0xa;if(_0xb68abe===_0x45853e)break;else _0x4c94b3['push'](_0x4c94b3['shift']());}catch(_0x2b99a5){_0x4c94b3['push'](_0x4c94b3['shift']());}}}(_0x37c1,0x98be8));import{getSessionEntry,updateBranchTracking}from'../utils/sessionCache.js';function _0x4a7f(_0x4b0129,_0x52e123){_0x4b0129=_0x4b0129-0x97;const _0x37c1f4=_0x37c1();let _0x4a7f0a=_0x37c1f4[_0x4b0129];return _0x4a7f0a;}import{getToken}from'../utils/keychain.js';import{getEnabledSessionId}from'./output.js';function _0x37c1(){const _0x308e33=['4960392EijBGi','3741552sVZhwl','306210VPlWHr','XuXHb','28qRiPIR','4835490VBUsrn','34821ioICsp','277824GBLAIH','49szkgyt','17925WJClPQ','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.','172xOItmM'];_0x37c1=function(){return _0x308e33;};return _0x37c1();}export async function postEdit(_0x2544f5){const _0x968bda=_0x4a7f,_0x2ba319={'XuXHb':function(_0x44c5d6){return _0x44c5d6();},'falOL':function(_0x5ada8b,_0x1ac1f8){return _0x5ada8b(_0x1ac1f8);},'usrsF':'PostToolUse'},_0x29172e=await getEnabledSessionId(_0x2544f5);if(!_0x29172e)return;updateBranchTracking(_0x29172e);const _0x15cb0d=await _0x2ba319[_0x968bda(0x9a)](getToken);if(!_0x15cb0d)return;const _0x29077f=_0x2ba319['falOL'](getSessionEntry,_0x29172e);if(_0x29077f){const _0x2ac86e={'hookSpecificOutput':{'hookEventName':'PostToolUse','additionalContext':'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).'}};console['log'](JSON['stringify'](_0x2ac86e));return;}const _0x584c67={'hookSpecificOutput':{'hookEventName':_0x2ba319['usrsF'],'additionalContext':_0x968bda(0xa1)}};console['log'](JSON['stringify'](_0x584c67));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1057(_0x132ee1,_0x45aa03){_0x132ee1=_0x132ee1-0x177;const _0x534a7e=_0x534a();let _0x105747=_0x534a7e[_0x132ee1];return _0x105747;}(function(_0x26fbcd,_0x50d0d3){const _0x5c5554=_0x1057,_0x105284=_0x26fbcd();while(!![]){try{const _0x96e835=parseInt(_0x5c5554(0x17a))/0x1+-parseInt(_0x5c5554(0x17b))/0x2*(parseInt(_0x5c5554(0x180))/0x3)+-parseInt(_0x5c5554(0x177))/0x4*(-parseInt(_0x5c5554(0x17d))/0x5)+parseInt(_0x5c5554(0x181))/0x6+-parseInt(_0x5c5554(0x17c))/0x7*(-parseInt(_0x5c5554(0x17f))/0x8)+-parseInt(_0x5c5554(0x179))/0x9*(parseInt(_0x5c5554(0x17e))/0xa)+-parseInt(_0x5c5554(0x178))/0xb*(parseInt(_0x5c5554(0x182))/0xc);if(_0x96e835===_0x50d0d3)break;else _0x105284['push'](_0x105284['shift']());}catch(_0x10182d){_0x105284['push'](_0x105284['shift']());}}}(_0x534a,0xd6d4e));import{getToken}from'../utils/keychain.js';function _0x534a(){const _0x276eda=['283497kQSdGV','7820964PwNrQZ','12AfBNrl','===\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`.','4396TBEvuu','5981305mmxAPQ','99ZQoEec','576281SaeSEz','22kECRUc','7LRIZgs','1245qdGXMQ','518650GeJzRM','7042264VRwLjX'];_0x534a=function(){return _0x276eda;};return _0x534a();}import{printBlock,getEnabledSessionId}from'./output.js';export async function preCompact(_0x2a8a68){const _0x3703e1=_0x1057,_0x2f4f53=await getEnabledSessionId(_0x2a8a68);if(!_0x2f4f53)return;try{const _0x4ad725=await getToken();if(!_0x4ad725)return;printBlock(_0x3703e1(0x183));}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x791de7,_0x270416){const _0x31cf82=_0x35a7,_0x52fa38=_0x791de7();while(!![]){try{const _0x48f736=-parseInt(_0x31cf82(0x1c6))/0x1*(-parseInt(_0x31cf82(0x1ce))/0x2)+-parseInt(_0x31cf82(0x1cc))/0x3+-parseInt(_0x31cf82(0x1c7))/0x4+-parseInt(_0x31cf82(0x1c3))/0x5+parseInt(_0x31cf82(0x1c4))/0x6*(-parseInt(_0x31cf82(0x1cb))/0x7)+-parseInt(_0x31cf82(0x1cd))/0x8+-parseInt(_0x31cf82(0x1c1))/0x9*(-parseInt(_0x31cf82(0x1c5))/0xa);if(_0x48f736===_0x270416)break;else _0x52fa38['push'](_0x52fa38['shift']());}catch(_0x32f96e){_0x52fa38['push'](_0x52fa38['shift']());}}}(_0x1587,0xc6c8f));import{recordEnabledSessionCleared}from'../utils/sessionCache.js';function _0x35a7(_0x37fa83,_0x183fec){_0x37fa83=_0x37fa83-0x1c1;const _0x1587ff=_0x1587();let _0x35a78a=_0x1587ff[_0x37fa83];return _0x35a78a;}function _0x1587(){const _0x47a335=['9BhGHQz','firXY','1025645YShdOR','6GoenKi','55775220JucgGg','985143IlAmQa','3874660TXAPgD','session_id','clear','zIewP','11019113Kaydrt','4847259NBOmtb','11077888QpnFBc','2HUmGqj'];_0x1587=function(){return _0x47a335;};return _0x1587();}import{readHookInput}from'./output.js';export async function sessionEnd(_0x5043e7){const _0x390963=_0x35a7,_0x112f3a={'firXY':function(_0x1d6508){return _0x1d6508();},'avZkB':function(_0x4b9694,_0x57d06e){return _0x4b9694===_0x57d06e;},'zIewP':function(_0x2be805,_0x445065){return _0x2be805(_0x445065);}};let _0x42b1c2=_0x5043e7,_0x245447;if(!_0x5043e7){const _0x2b1613=await _0x112f3a[_0x390963(0x1c2)](readHookInput);_0x42b1c2=_0x2b1613?.[_0x390963(0x1c8)],_0x245447=_0x2b1613?.['reason'];}if(!_0x42b1c2)return;_0x112f3a['avZkB'](_0x245447,_0x390963(0x1c9))&&_0x112f3a[_0x390963(0x1ca)](recordEnabledSessionCleared,_0x42b1c2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2b0868,_0x4b222a){const _0x5c3ad5=_0x5d7c,_0x459583=_0x2b0868();while(!![]){try{const _0x530425=parseInt(_0x5c3ad5(0xfb))/0x1*(-parseInt(_0x5c3ad5(0xfc))/0x2)+parseInt(_0x5c3ad5(0xf7))/0x3+-parseInt(_0x5c3ad5(0xfe))/0x4+parseInt(_0x5c3ad5(0xfa))/0x5+-parseInt(_0x5c3ad5(0xf4))/0x6*(parseInt(_0x5c3ad5(0xf3))/0x7)+parseInt(_0x5c3ad5(0xf8))/0x8+-parseInt(_0x5c3ad5(0x100))/0x9*(parseInt(_0x5c3ad5(0xf9))/0xa);if(_0x530425===_0x4b222a)break;else _0x459583['push'](_0x459583['shift']());}catch(_0x1ec155){_0x459583['push'](_0x459583['shift']());}}}(_0x38db,0x7eefc));import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';const RANGER_AUTO_ENABLED_PROMPT='=================================================================\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=================================================================';function _0x38db(){const _0x379bf3=['7127184BhuhJj','1219820iFEIPK','4765740BlCMLu','81COwWVP','634FpKYSi','AmGTZ','4018304pMKAPA','parse','72jjNIVV','master','trackCommandStart','log','env','833gjrzIK','1572PqiEyw','stringify','kKmxf','2139519uQBvGu'];_0x38db=function(){return _0x379bf3;};return _0x38db();}function _0x5d7c(_0x47040d,_0x1b0300){_0x47040d=_0x47040d-0xf2;const _0x38db39=_0x38db();let _0x5d7c36=_0x38db39[_0x47040d];return _0x5d7c36;}export async function sessionStart(_0x44d10e){const _0x14ac80=_0x5d7c,_0x5b437a={'YrypQ':'session_id','KEDoT':'source','kKmxf':function(_0x2a4371,_0x75e8e7){return _0x2a4371(_0x75e8e7);},'MdrGA':'hook:session-start','AvTgO':'success','ucZfu':function(_0x53e862){return _0x53e862();},'AmGTZ':function(_0x2932ad,_0x3f7b2b){return _0x2932ad!==_0x3f7b2b;},'hZlnW':'main','sxclB':_0x14ac80(0x101),'EMZxK':'SessionStart'};let _0x47f770=_0x44d10e||'',_0x11a1c9;if(!_0x44d10e){let _0x2d9a80='';for await(const _0x436a32 of process['stdin']){_0x2d9a80+=_0x436a32;}try{const _0x462211=JSON[_0x14ac80(0xff)](_0x2d9a80);_0x47f770=_0x462211[_0x5b437a['YrypQ']]||'',_0x11a1c9=_0x462211[_0x5b437a['KEDoT']];}catch{}const _0xd4cc20=process[_0x14ac80(0xf2)]['CLAUDE_ENV_FILE'];if(_0xd4cc20&&_0x47f770)try{await appendFile(_0xd4cc20,'export\x20CLAUDE_SESSION_ID=\x22'+_0x47f770+'\x22\x0a');}catch{}}if(_0x47f770){shouldAutoEnableAfterClear(_0x11a1c9)&&autoEnableAfterClear(_0x47f770);_0x5b437a[_0x14ac80(0xf6)](initBranchTracking,_0x47f770);const _0x4d2b00=isSessionEnabled(_0x47f770);try{const _0x20db4b=createTelemetryCollector(_0x5b437a['MdrGA']);await _0x20db4b[_0x14ac80(0x102)]({'sessionId':_0x47f770,'hooksEnabled':_0x4d2b00}),await _0x20db4b['trackCommandEnd'](_0x5b437a['AvTgO']);}catch{}if(_0x4d2b00){const _0x217d80=_0x5b437a['ucZfu'](getCurrentBranch),_0x489bc1=_0x217d80&&_0x5b437a[_0x14ac80(0xfd)](_0x217d80,_0x5b437a['hZlnW'])&&_0x217d80!==_0x5b437a['sxclB']?'\x20(Branch:\x20'+_0x217d80+')':'',_0x4a9b58={'hookSpecificOutput':{'hookEventName':_0x5b437a['EMZxK'],'additionalContext':RANGER_AUTO_ENABLED_PROMPT+_0x489bc1}};console[_0x14ac80(0x103)](JSON[_0x14ac80(0xf5)](_0x4a9b58));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e18d2,_0x537b09){const _0x422dea=_0x4390,_0x440ee3=_0x4e18d2();while(!![]){try{const _0x47207a=parseInt(_0x422dea(0x15c))/0x1+parseInt(_0x422dea(0x152))/0x2+-parseInt(_0x422dea(0x14f))/0x3+parseInt(_0x422dea(0x159))/0x4+parseInt(_0x422dea(0x15e))/0x5+parseInt(_0x422dea(0x160))/0x6+-parseInt(_0x422dea(0x15f))/0x7*(parseInt(_0x422dea(0x14a))/0x8);if(_0x47207a===_0x537b09)break;else _0x440ee3['push'](_0x440ee3['shift']());}catch(_0x271de6){_0x440ee3['push'](_0x440ee3['shift']());}}}(_0x90e6,0x74ee7));import{open}from'fs/promises';function _0x90e6(){const _0x166505=['stop_hook_active','string','input','1899657AAVJPK','success','log','764768umSSZy','min','stringify','featureId','read','hook:stop','\x20for\x20\x22','1272832cTMQcw','\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(',')\x20and\x20the\x20token\x20`','606488rDfaxu','includes','44165vFrCZP','59213cNmmcJ','1772028pmzMdt','size','sDKUZ',':\x0a\x0a','kiCrL','472fUvZel','bDCmo'];_0x90e6=function(){return _0x166505;};return _0x90e6();}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';export async function stopHook(_0x5bc1ce){const _0x289e8a=_0x4390,_0x2d5907={'bDCmo':function(_0xc29ce2,_0x194179){return _0xc29ce2(_0x194179);},'sYuIM':function(_0x5e914f,_0x3fa6bb){return _0x5e914f(_0x3fa6bb);},'sDKUZ':_0x289e8a(0x14d),'xzYvL':function(_0x206ba4,_0x43ff5c,_0x6ce086){return _0x206ba4(_0x43ff5c,_0x6ce086);},'cuCBV':function(_0x5493dd,_0x1926c7){return _0x5493dd&&_0x1926c7;},'VCyGf':function(_0x4c6708,_0x2c3ca3,_0x29e096,_0x4e1a22){return _0x4c6708(_0x2c3ca3,_0x29e096,_0x4e1a22);},'hTQIt':function(_0x7faeae,_0x2a8d96,_0x1f1949,_0x321d55){return _0x7faeae(_0x2a8d96,_0x1f1949,_0x321d55);}},_0x4f0b17=await _0x2d5907['bDCmo'](getEnabledHookContext,_0x5bc1ce),_0x3b9d3c=_0x4f0b17?.['sessionId']??null,_0x23ac1f=_0x2d5907['sYuIM'](Boolean,_0x4f0b17?.[_0x289e8a(0x14e)]?.[_0x289e8a(0x14c)]),_0x10085c=typeof _0x4f0b17?.['input']?.['transcript_path']===_0x2d5907[_0x289e8a(0x162)]?_0x4f0b17[_0x289e8a(0x14e)]['transcript_path']:null;let _0x528675=!![];if(!_0x3b9d3c){await trackStop(_0x3b9d3c,![],_0x528675);return;}try{const _0x2c745e=getSessionEntry(_0x3b9d3c);if(!_0x2c745e){await trackStop(_0x3b9d3c,!![],_0x528675);return;}const _0xd65a95='https://dashboard.ranger.net/features/'+_0x2c745e['featureId'],_0x214def='RANGER_SKIP_VERIFICATION',_0x8ce4ce=await getToken(),_0x515956=!_0x23ac1f;let _0x2b57d5=null,_0x4658fe=null;const _0x59fb7d=_0x23ac1f&&await transcriptHasToken(_0x10085c,_0x214def),_0x4e75cd=await _0x2d5907['xzYvL'](transcriptHasToken,_0x10085c,_0xd65a95);if(_0x8ce4ce)try{const _0x50474a=await _0x2d5907[_0x289e8a(0x14b)](getFeature,_0x2c745e['featureId']);_0x2b57d5=_0x50474a['name']??null,_0x4658fe=_0x50474a['currentSessionId']??null;}catch{}if(_0x2d5907['cuCBV'](_0x8ce4ce,_0x4658fe))try{await _0x2d5907['xzYvL'](concludeSession,_0x2c745e[_0x289e8a(0x155)],_0x4658fe);}catch(_0x881060){if(_0x59fb7d){await _0x2d5907['VCyGf'](trackStop,_0x3b9d3c,!![],_0x528675);return;}_0x528675=![];const _0x19aa98=_0x881060 instanceof Error?_0x881060['message']:String(_0x881060),_0x4e3d18={'decision':'block','reason':'Failed\x20to\x20conclude\x20Ranger\x20feature\x20review\x20session'+(_0x2b57d5?_0x289e8a(0x158)+_0x2b57d5+'\x22':'')+_0x289e8a(0x163)+_0x19aa98+_0x289e8a(0x15a)+_0xd65a95+_0x289e8a(0x15b)+_0x214def+'`,\x20then\x20run\x20/exit\x20again.'};console[_0x289e8a(0x151)](JSON[_0x289e8a(0x154)](_0x4e3d18)),await trackStop(_0x3b9d3c,!![],_0x528675);return;}await _0x2d5907['hTQIt'](trackStop,_0x3b9d3c,!![],_0x528675);return;}catch{await trackStop(_0x3b9d3c,!![],_0x528675);return;}}function _0x4390(_0x2c9a03,_0x1df461){_0x2c9a03=_0x2c9a03-0x149;const _0x90e605=_0x90e6();let _0x439021=_0x90e605[_0x2c9a03];return _0x439021;}async function trackStop(_0x1f894c,_0x6750da,_0x215506){const _0x5e23a0=_0x4390,_0x868d75={'UjckC':function(_0x3527cb,_0x5650e8){return _0x3527cb(_0x5650e8);},'JYwsa':function(_0x4e3670,_0x513181){return _0x4e3670??_0x513181;}};try{const _0x1f8439=_0x868d75['UjckC'](createTelemetryCollector,_0x5e23a0(0x157));await _0x1f8439['trackCommandStart']({'sessionId':_0x868d75['JYwsa'](_0x1f894c,undefined),'hooksEnabled':_0x6750da,'stopAllowed':_0x215506}),await _0x1f8439['trackCommandEnd'](_0x5e23a0(0x150));}catch{}}async function transcriptHasToken(_0x1bf547,_0x49ee17){const _0x22141b=_0x4390;if(!_0x1bf547)return![];const _0x20e256=await readTranscriptTail(_0x1bf547,0x30d40);return _0x20e256?_0x20e256[_0x22141b(0x15d)](_0x49ee17):![];}async function readTranscriptTail(_0x430f4c,_0x32c7fd){const _0xb69349=_0x4390,_0x4af476={'NQRKx':function(_0x573731,_0x3dd44c){return _0x573731-_0x3dd44c;},'kiCrL':'utf8'};let _0x271b22=null;try{_0x271b22=await open(_0x430f4c,'r');const _0x13deba=await _0x271b22['stat'](),_0x177a85=Math[_0xb69349(0x153)](_0x13deba['size'],_0x32c7fd);if(_0x177a85<=0x0)return'';const _0x21e353=Buffer['alloc'](_0x177a85);return await _0x271b22[_0xb69349(0x156)](_0x21e353,0x0,_0x177a85,_0x4af476['NQRKx'](_0x13deba[_0xb69349(0x161)],_0x177a85)),_0x21e353['toString'](_0x4af476[_0xb69349(0x149)]);}catch{return null;}finally{try{await _0x271b22?.['close']();}catch{}}}
|