@uipath/delegate-cli 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x523476=_0x4fb4;(function(_0x4a9df4,_0x1a61dc){const _0x43c923=_0x4fb4,_0x4d05cc=_0x4a9df4();while(!![]){try{const _0x23affc=-parseInt(_0x43c923(0x203))/0x1*(parseInt(_0x43c923(0x1c6))/0x2)+-parseInt(_0x43c923(0x189))/0x3*(parseInt(_0x43c923(0x1f9))/0x4)+parseInt(_0x43c923(0x186))/0x5*(parseInt(_0x43c923(0x223))/0x6)+parseInt(_0x43c923(0x18b))/0x7+parseInt(_0x43c923(0x19d))/0x8*(-parseInt(_0x43c923(0x1be))/0x9)+parseInt(_0x43c923(0x197))/0xa*(parseInt(_0x43c923(0x216))/0xb)+parseInt(_0x43c923(0x1db))/0xc*(parseInt(_0x43c923(0x21b))/0xd);if(_0x23affc===_0x1a61dc)break;else _0x4d05cc['push'](_0x4d05cc['shift']());}catch(_0x1b9ecc){_0x4d05cc['push'](_0x4d05cc['shift']());}}}(_0xa112,0xeca86));const __dirname=import.meta.dirname;import _0x17f61b from'fs';import _0x199536 from'path';import{DelegateAgent as _0x15eccf,InteropProcess as _0x55b41c,buildDelegateServiceUrl as _0x3665f8,getAuthFilePath as _0x3e68f1,loadAndRefreshAuth as _0x1fa4aa,runHostCommand as _0x5c8bcb,runLoginFlow as _0x3ec3de}from'@uipath/delegate-sdk';var I={'alpha':'https://alpha.uipath.com','staging':_0x523476(0x19c),'production':_0x523476(0x1ea)},R=['login','models',_0x523476(0x1e6),_0x523476(0x202),'whoami'];function O(_0x314d7f){const _0x3561ae=_0x523476;let _0x4e8ea2={'subcommand':'','prompt':'','keepAlive':!0x1,'cleanup':!0x1,'headless':!0x1,'noConnections':!0x1,'noSecurity':!0x1,'quiet':!0x1,'preloadSkills':[],'help':!0x1,'version':!0x1};R[_0x3561ae(0x1b7)](_0x314d7f[0x0])&&(_0x4e8ea2['subcommand']=_0x314d7f[0x0],_0x314d7f=_0x314d7f[_0x3561ae(0x1c0)](0x1));let _0x242c64=[];for(let _0x2e563e=0x0;_0x2e563e<_0x314d7f[_0x3561ae(0x205)];_0x2e563e++){let _0x5bc77d=_0x314d7f[_0x2e563e];switch(_0x5bc77d){case _0x3561ae(0x1e9):_0x4e8ea2[_0x3561ae(0x1ab)]=!0x0;break;case _0x3561ae(0x1f5):_0x4e8ea2[_0x3561ae(0x1ed)]=!0x0;break;case _0x3561ae(0x182):_0x4e8ea2[_0x3561ae(0x196)]=!0x0;break;case _0x3561ae(0x20f):_0x4e8ea2[_0x3561ae(0x1ce)]=!0x0;break;case _0x3561ae(0x1e2):_0x4e8ea2[_0x3561ae(0x1dd)]=!0x0;break;case _0x3561ae(0x1b8):case'-q':_0x4e8ea2[_0x3561ae(0x18a)]=!0x0;break;case _0x3561ae(0x190):_0x4e8ea2[_0x3561ae(0x199)]=_0x314d7f[++_0x2e563e];break;case'--model':_0x4e8ea2['model']=_0x314d7f[++_0x2e563e];break;case _0x3561ae(0x1bb):_0x4e8ea2[_0x3561ae(0x214)]=_0x314d7f[++_0x2e563e];break;case _0x3561ae(0x1d7):_0x4e8ea2[_0x3561ae(0x1a3)]=_0x314d7f[++_0x2e563e];break;case _0x3561ae(0x19f):_0x4e8ea2[_0x3561ae(0x1dc)]=_0x314d7f[++_0x2e563e];break;case'--preload-skill':{let _0x173747=_0x314d7f[++_0x2e563e];(!_0x173747||_0x173747[_0x3561ae(0x1eb)]('--'))&&(console[_0x3561ae(0x1fc)](_0x3561ae(0x1c7)),process['exit'](0x2)),_0x4e8ea2[_0x3561ae(0x1f1)][_0x3561ae(0x1b3)](_0x173747);break;}case _0x3561ae(0x1a1):{let _0x153c08=_0x314d7f[++_0x2e563e];['alpha',_0x3561ae(0x20c),_0x3561ae(0x193),_0x3561ae(0x21c)][_0x3561ae(0x1b7)](_0x153c08)||(console['error'](_0x3561ae(0x1fe)+_0x153c08+_0x3561ae(0x1a2)),process[_0x3561ae(0x1fa)](0x2)),_0x4e8ea2[_0x3561ae(0x21a)]=_0x153c08;break;}case'-h':case _0x3561ae(0x1cf):_0x4e8ea2[_0x3561ae(0x1de)]=!0x0;break;case'-v':case _0x3561ae(0x1a8):_0x4e8ea2['version']=!0x0;break;default:_0x5bc77d['startsWith']('--')&&(console['error'](_0x3561ae(0x1e3)+_0x5bc77d),process[_0x3561ae(0x1fa)](0x2)),_0x242c64[_0x3561ae(0x1b3)](_0x5bc77d);}}return _0x4e8ea2[_0x3561ae(0x208)]=_0x242c64[_0x3561ae(0x19a)]('\x20'),_0x4e8ea2;}function w(_0x42e9a5,_0x1536ed,_0x36c2a9){const _0x66847d=_0x523476;if(_0x36c2a9)return _0x36c2a9;if(process.env.BACKEND_URL)return process.env.BACKEND_URL;if(!_0x42e9a5){if(_0x1536ed?.[_0x66847d(0x1b2)]&&_0x1536ed?.[_0x66847d(0x1a5)]&&_0x1536ed?.[_0x66847d(0x207)])return _0x3665f8(_0x1536ed[_0x66847d(0x1b2)],_0x1536ed['orgLogicalName'],_0x1536ed[_0x66847d(0x207)]);throw new Error('No\x20backend\x20selected.\x20Run\x20`delegate-cli\x20login\x20--env\x20<env>`\x20first\x20(commands\x20then\x20default\x20to\x20that\x20cloud),\x20or\x20pass\x20--env\x20<alpha|staging|production|localhost>\x20or\x20--backend\x20<url>\x20(or\x20set\x20BACKEND_URL).');}if(_0x42e9a5===_0x66847d(0x21c))return _0x66847d(0x1d6);let _0x32ac01=I[_0x42e9a5],_0x1d9990=_0x1536ed?.[_0x66847d(0x1a5)],_0x3b9c90=_0x1536ed?.['tenantName'];if(!_0x1d9990||!_0x3b9c90)throw new Error(_0x66847d(0x21e)+_0x42e9a5+_0x66847d(0x1b1)+_0x42e9a5+_0x66847d(0x210));return _0x3665f8(_0x32ac01,_0x1d9990,_0x3b9c90);}function C(){let _0x20971b='\x0adelegate-cli\x20—\x20Delegate\x20agent\x20CLI\x0a\x0aUsage:\x0a\x20\x20delegate-cli\x20[flags]\x20\x22<prompt>\x22\x20\x20\x20\x20\x20\x20Send\x20prompt\x20to\x20the\x20agent\x0a\x20\x20delegate-cli\x20[flags]\x20-\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Read\x20the\x20prompt\x20from\x20stdin\x20(also\x20implied\x20when\x20stdin\x20is\x20piped)\x0a\x20\x20delegate-cli\x20login\x20[--env\x20NAME]\x20\x20\x20\x20\x20\x20OAuth\x20browser\x20login\x20→\x20~/.aria/sdk-auth.json.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20required\x20on\x20FIRST\x20login;\x20afterwards\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20defaults\x20to\x20the\x20saved\x20login\x27s\x20cloud\x0a\x20\x20delegate-cli\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Remove\x20the\x20saved\x20CLI\x20login\x0a\x20\x20delegate-cli\x20whoami\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20the\x20current\x20login\x20(org,\x20tenant,\x20token\x20expiry)\x0a\x20\x20delegate-cli\x20models\x20[--env\x20NAME]\x20\x20\x20\x20\x20List\x20available\x20LLM\x20models\x20for\x20the\x20current\x20tenant\x0a\x20\x20delegate-cli\x20host\x20[flags]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20this\x20PC\x20as\x20a\x20remote\x20worker\x20until\x20Ctrl+C\x0a\x20\x20delegate-cli\x20host\x20install\x20[flags]\x20\x20\x20\x20Auto-start\x20the\x20host\x20at\x20login\x20(macOS\x20LaunchAgent\x20/\x20Windows\x20Scheduled\x20Task)\x0a\x20\x20delegate-cli\x20host\x20uninstall\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Remove\x20auto-start\x0a\x20\x20delegate-cli\x20host\x20status\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20auto-start\x20state\x0a\x20\x20delegate-cli\x20--cleanup\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Stop\x20running\x20interop\x0a\x0aFlags:\x0a\x20\x20--env\x20NAME\x20\x20\x20\x20\x20\x20\x20\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Composes\x20backend\x20URL\x20from\x20saved\x20auth\x20(org/tenant\x20slugs).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Omitted\x20→\x20the\x20cloud\x20you\x20logged\x20into\x20(delegate-cli\x20login).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20localhost\x20→\x20http://localhost:5002.\x20No\x20saved\x20login\x20and\x20no\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env/--backend/BACKEND_URL\x20is\x20an\x20error\x20—\x20never\x20a\x20guess.\x0a\x20\x20--backend\x20URL\x20\x20\x20\x20\x20Full\x20backend\x20URL\x20—\x20escape\x20hatch\x20overrides\x20--env\x0a\x20\x20--model\x20NAME\x20\x20\x20\x20\x20\x20LLM\x20model\x20id\x20(e.g.\x20claude_sonnet_5,\x20kimi_k2_7_code).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20gemini_3_6_flash.\x20Also\x20settable\x20via\x20MODEL\x20env\x20var.\x0a\x20\x20--keep-alive\x20\x20\x20\x20\x20\x20Reuse/leave\x20interop\x20running\x20across\x20invocations\x0a\x20\x20--headless\x20\x20\x20\x20\x20\x20\x20\x20Skip\x20interop\x20(text-only\x20prompts)\x0a\x20\x20--no-connections\x20\x20Disable\x20orchestrator\x20ConnectionService\x20(silences\x20404\x20warnings)\x0a\x20\x20--no-security\x20\x20\x20\x20\x20Disable\x20tool\x20security\x20wrapper\x20(use\x20only\x20for\x20debugging)\x0a\x20\x20--preload-skill\x20NAME\x20\x20Preload\x20a\x20skill\x20into\x20the\x20session\x20(repeatable).\x20The\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20skill\x27s\x20content\x20is\x20attached\x20before\x20the\x20first\x20model\x20turn\x20—\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20same\x20mechanism\x20as\x20project\x20preloaded\x20skills\x20in\x20the\x20app\x0a\x20\x20--runner-url\x20URL\x20\x20(host)\x20Runner\x20worker\x20WS\x20URL.\x20Required;\x20or\x20CONTROL_PLANE_WS_URL\x20env\x0a\x20\x20--interop\x20PATH\x20\x20\x20\x20(host)\x20Interop\x20binary\x20path;\x20or\x20INTEROP_EXECUTABLE_PATH\x20env.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Absent\x20→\x20registration/discovery\x20only,\x20tool\x20execution\x20disabled\x0a\x20\x20--worker-id\x20ID\x20\x20\x20\x20(host)\x20Stable\x20worker\x20identity;\x20or\x20WORKER_ID\x20env.\x20Default:\x20hostname\x0a\x20\x20-q,\x20--quiet\x20\x20\x20\x20\x20\x20\x20Suppress\x20🤔\x20thinking\x20output\x20to\x20stderr\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Print\x20the\x20installed\x20CLI\x20version\x0a\x0aAuth:\x20prompts\x20auto-retry\x20on\x20401\x20by\x20opening\x20the\x20browser\x20to\x20re-login\x20(TTY\x20only).\x0a'['trim']();console['log'](_0x20971b);}function P(){const _0x2f12f4=_0x523476;try{return JSON[_0x2f12f4(0x1b9)](_0x17f61b['readFileSync'](_0x199536[_0x2f12f4(0x19a)](__dirname,'..','package.json'),'utf-8'))[_0x2f12f4(0x219)]||_0x2f12f4(0x1d3);}catch{return _0x2f12f4(0x1d3);}}var $=0x7d0;function _0x4fb4(_0xabab2f,_0x7afe14){_0xabab2f=_0xabab2f-0x182;const _0xa11204=_0xa112();let _0x4fb4d6=_0xa11204[_0xabab2f];return _0x4fb4d6;}async function m(_0x136139,_0x304bf){const _0x30cf79=_0x523476;let _0x109a1d=_0x304bf?[_0x304bf]:[];for await(let _0xff92ee of _0x136139)_0x109a1d['push'](Buffer[_0x30cf79(0x221)](_0xff92ee));return Buffer[_0x30cf79(0x222)](_0x109a1d)[_0x30cf79(0x20e)](_0x30cf79(0x1d9))[_0x30cf79(0x1b0)]();}function _0xa112(){const _0x32ad81=['Missing\x20prompt.\x20Pass\x20it\x20as\x20an\x20argument,\x20pipe\x20it\x20via\x20stdin,\x20or\x20run\x20`delegate-cli\x20--help`.','subcommand','951339EIKbYa','quiet','3916997naIegD','Organization:\x20','existsSync','statusText','799f56b8-4aed-4a0f-8640-659dae4a9e0e','--backend','resume','isArray','production','\x20—\x20sign\x20out\x20in\x20the\x20Delegate\x20app\x20to\x20clear\x20that.','auth.json','headless','2510NSQNhq','✓\x20Done\x0a','backendUrl','join','content','https://staging.uipath.com','8eBLVCD','expiresAt','--worker-id','name','--env','.\x20Use\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost.','interopPath','First\x20login\x20requires\x20--env.\x20Usage:\x20delegate-cli\x20login\x20--env\x20<alpha|staging|production>','orgLogicalName','No\x20models\x20available\x20for\x20this\x20product/tenant.\x0a','unknown\x20slug','--version','response','done','keepAlive','thinking','type','organizationId','test','trim','\x20needs\x20org/tenant\x20slugs.\x20Either:\x0a\x20\x20-\x20run\x20`delegate-cli\x20login\x20--env\x20','baseUrl','push','No\x20CLI\x20login\x20found.\x20Note:\x20the\x20CLI\x20is\x20currently\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','isTTY','lastType','includes','--quiet','parse','data','--runner-url','end','description','3340179EJMKXY','status','slice','\x20\x20\x20\x20','Tenant:\x20\x20\x20\x20\x20\x20\x20','Base\x20URL:\x20\x20\x20\x20\x20','No\x20CLI\x20login\x20found\x20—\x20nothing\x20to\x20remove.','Interop\x20stopped\x20(if\x20it\x20was\x20running).','362MWpsdk','--preload-skill\x20requires\x20a\x20skill\x20name.','tool','\x0a🤔\x20','off','finally','Token:\x20\x20\x20\x20\x20\x20\x20\x20expires\x20','now','noConnections','--help','destroy','Removed\x20','floor','unknown','model','rmSync','http://localhost:5002','--interop','login','utf-8','MODELS','48OJSvRD','workerId','noSecurity','help','\x0aStopping…\x20(Ctrl+C\x20again\x20to\x20force\x20exit)\x0a','isDesktopFallback','toolName','--no-security','Unknown\x20flag:\x20','onEvent','tenantId','host','write','models','--keep-alive','https://cloud.uipath.com','startsWith','stack','cleanup','entries','catch','accessToken','preloadSkills','once','round','[saved\x20login]\x20Backend\x20URL:\x20','--cleanup','/v1/config','object','tool_call','20fzXKCk','exit','log','error','sendMessage','Invalid\x20--env:\x20','stderr','map','readFileSync','logout','9935IlGBTV','GET\x20','length','SIGINT','tenantName','prompt','No\x20auth\x20found.\x20Set\x20AUTH_TOKEN/TENANT_ID/ORG_ID\x20env\x20vars,\x20or\x20run\x20`delegate-cli\x20login\x20--env\x20<alpha|staging|production>`\x20(interactive\x20browser\x20OAuth)\x20first.','message','environment\x20variables\x20(AUTH_TOKEN/TENANT_ID/ORG_ID)','staging','file','toString','--no-connections','`\x20(writes\x20slugs\x20to\x20~/.aria/sdk-auth.json),\x20or\x0a\x20\x20-\x20set\x20ORG_SLUG\x20and\x20TENANT_SLUG\x20env\x20vars\x20alongside\x20ORG_ID/TENANT_ID,\x20or\x0a\x20\x20-\x20pass\x20the\x20full\x20URL\x20via\x20--backend\x20(overrides\x20--env).','\x20(Delegate\x20desktop\x20app\x20fallback)','argv','\x0aUse\x20with:\x20delegate-cli\x20--model\x20<id>\x20\x22<prompt>\x22\x0a','runnerUrl','toISOString','6182jlmLDY','\x20min)','X-Uipath-Tenantid','version','env','11855740CllpDV','localhost','auth','--env\x20','[env=','stdin','from','concat','138TfCrUQ','stdout','\x0aAvailable\x20models\x20(','\x20(in\x20','--headless','Source:\x20\x20\x20\x20\x20\x20\x20','Bearer\x20','.aria','81680UEPJyy'];_0xa112=function(){return _0x32ad81;};return _0xa112();}function x(_0x41ae7e,_0xa51d46){return new Promise(_0x1f2354=>{const _0x34134a=_0x4fb4;let _0x2f495b=_0x4cb69b=>{const _0x1eef79=_0x4fb4;clearTimeout(_0x270ce7),_0x41ae7e[_0x1eef79(0x1ca)](_0x1eef79(0x1ba),_0x104d04),_0x41ae7e['off']('end',_0x39a007),_0x41ae7e[_0x1eef79(0x1ca)](_0x1eef79(0x1fc),_0x39a007),_0x41ae7e['pause'](),_0x1f2354(_0x4cb69b);},_0x104d04=_0x912fe8=>_0x2f495b(Buffer[_0x34134a(0x221)](_0x912fe8)),_0x39a007=()=>_0x2f495b(null),_0x270ce7=setTimeout(()=>_0x2f495b(null),_0xa51d46);_0x41ae7e['on']('data',_0x104d04),_0x41ae7e['on'](_0x34134a(0x1bc),_0x39a007),_0x41ae7e['on'](_0x34134a(0x1fc),_0x39a007),_0x41ae7e[_0x34134a(0x191)]();});}async function M(_0x47ff06,_0x3115d9,_0x1edbfd=$){const _0x236daf=_0x523476;let _0x9dee83=_0x47ff06==='-';if(!_0x9dee83&&_0x47ff06)return _0x47ff06;if(!_0x9dee83&&_0x3115d9[_0x236daf(0x1b5)])return'';if(_0x9dee83)return m(_0x3115d9,null);let _0x67a8a5=await x(_0x3115d9,_0x1edbfd);return _0x67a8a5?m(_0x3115d9,_0x67a8a5):'';}function S(){const _0x220d07=_0x523476;return _0x199536['join'](process.env.HOME||process.env.USERPROFILE||'',_0x220d07(0x185),_0x220d07(0x195));}function A(_0x43c6fc){const _0x5ec325=_0x523476;try{let _0x381b25=JSON[_0x5ec325(0x1b9)](_0x17f61b[_0x5ec325(0x201)](_0x43c6fc,_0x5ec325(0x1d9)));return!_0x381b25[_0x5ec325(0x1f0)]||!_0x381b25[_0x5ec325(0x1e5)]||!_0x381b25[_0x5ec325(0x1ae)]?null:_0x381b25;}catch{return null;}}function y(){const _0x4f6898=_0x523476;let _0xb35ac9=[{'file':_0x3e68f1(),'isDesktopFallback':!0x1},{'file':S(),'isDesktopFallback':!0x0}];for(let _0x26f84c of _0xb35ac9){let _0x57ef23=A(_0x26f84c[_0x4f6898(0x20d)]);if(_0x57ef23)return{..._0x26f84c,'auth':_0x57ef23};}return null;}async function B(){const _0x3924e1=_0x523476;let _0x3a5d2c=_0x3e68f1();if(!_0x17f61b[_0x3924e1(0x18d)](_0x3a5d2c)){let _0x2634a7=S();console[_0x3924e1(0x1fb)](A(_0x2634a7)?_0x3924e1(0x1b4)+_0x2634a7+_0x3924e1(0x194):_0x3924e1(0x1c4));return;}_0x17f61b[_0x3924e1(0x1d5)](_0x3a5d2c),console[_0x3924e1(0x1fb)](_0x3924e1(0x1d1)+_0x3a5d2c);}async function F(){const _0x149dd3=_0x523476;let _0x29ca99=E(),_0x44651b,_0x4eec02;if(_0x29ca99)_0x44651b=_0x29ca99,_0x4eec02=_0x149dd3(0x20b);else{let _0x174c4d=y();if(!_0x174c4d)throw new Error(T);_0x44651b=_0x174c4d[_0x149dd3(0x21d)],_0x4eec02=_0x174c4d[_0x149dd3(0x1e0)]?_0x174c4d['file']+_0x149dd3(0x211):_0x174c4d['file'];}let _0x4727b1=[_0x149dd3(0x183)+_0x4eec02,_0x149dd3(0x1c3)+(_0x44651b[_0x149dd3(0x1b2)]??_0x149dd3(0x1d3)),_0x149dd3(0x18c)+(_0x44651b[_0x149dd3(0x1a5)]??_0x149dd3(0x1a7))+'\x20('+_0x44651b['organizationId']+')',_0x149dd3(0x1c2)+(_0x44651b['tenantName']??_0x149dd3(0x1a7))+'\x20('+_0x44651b[_0x149dd3(0x1e5)]+')'];if(_0x44651b[_0x149dd3(0x19e)]){let _0x439e9c=_0x44651b[_0x149dd3(0x19e)]-Math[_0x149dd3(0x1d2)](Date[_0x149dd3(0x1cd)]()/0x3e8),_0x2575ed=new Date(_0x44651b['expiresAt']*0x3e8)[_0x149dd3(0x215)]();_0x4727b1['push'](_0x439e9c>0x0?_0x149dd3(0x1cc)+_0x2575ed+_0x149dd3(0x226)+Math[_0x149dd3(0x1f3)](_0x439e9c/0x3c)+_0x149dd3(0x217):'Token:\x20\x20\x20\x20\x20\x20\x20\x20expired\x20'+_0x2575ed);}process[_0x149dd3(0x224)][_0x149dd3(0x1e7)](_0x4727b1[_0x149dd3(0x19a)]('\x0a')+'\x0a');}var T=_0x523476(0x209);function E(){return process.env.AUTH_TOKEN&&process.env.TENANT_ID&&process.env.ORG_ID?{'accessToken':process.env.AUTH_TOKEN,'tenantId':process.env.TENANT_ID,'organizationId':process.env.ORG_ID,'orgLogicalName':process.env.ORG_SLUG,'tenantName':process.env.TENANT_SLUG,'baseUrl':process.env.UIPATH_BASE_URL}:null;}async function U(){let _0x1c8cab=E();if(_0x1c8cab)return _0x1c8cab;let _0x3dd225=await _0x1fa4aa();if(_0x3dd225)return _0x3dd225;throw new Error(T);}async function q(){const _0xd32871=_0x523476;await new _0x55b41c()['stop']({'force':!0x0}),console['log'](_0xd32871(0x1c5));}var G=_0x523476(0x18f);function N(_0x3faf41,_0x28a32d,_0x3ca8ae){const _0x2bb805=_0x523476;_0x3faf41?process['stderr'][_0x2bb805(0x1e7)](_0x2bb805(0x21f)+_0x3faf41+']\x20Backend\x20URL:\x20'+_0x3ca8ae+'\x0a'):!_0x28a32d&&!process.env.BACKEND_URL&&process[_0x2bb805(0x1ff)][_0x2bb805(0x1e7)](_0x2bb805(0x1f4)+_0x3ca8ae+'\x0a');}async function j(_0x586b46){const _0x5a16b3=_0x523476;let _0x214ac4=await U(),_0x2db32a=w(_0x586b46['env'],_0x214ac4,_0x586b46['backendUrl']);N(_0x586b46[_0x5a16b3(0x21a)],_0x586b46[_0x5a16b3(0x199)],_0x2db32a);let _0x3d8fb3=_0x2db32a+_0x5a16b3(0x1f6),_0x54aa2a={'Authorization':_0x5a16b3(0x184)+_0x214ac4[_0x5a16b3(0x1f0)],'X-UiPath-ConsumingProductId':G};_0x214ac4[_0x5a16b3(0x1e5)]&&(_0x54aa2a[_0x5a16b3(0x218)]=_0x214ac4[_0x5a16b3(0x1e5)]),_0x214ac4['organizationId']&&(_0x54aa2a['X-Uipath-Organizationid']=_0x214ac4[_0x5a16b3(0x1ae)]);let _0x2a5069=await fetch(_0x3d8fb3,{'headers':_0x54aa2a});if(!_0x2a5069['ok'])throw new Error(_0x5a16b3(0x204)+_0x3d8fb3+'\x20→\x20'+_0x2a5069[_0x5a16b3(0x1bf)]+'\x20'+_0x2a5069[_0x5a16b3(0x18e)]);let _0x5f2a9c=(await _0x2a5069['json']())?.[_0x5a16b3(0x1da)],_0x558ce5=Array[_0x5a16b3(0x192)](_0x5f2a9c)?_0x5f2a9c:_0x5f2a9c&&typeof _0x5f2a9c==_0x5a16b3(0x1f7)?Object[_0x5a16b3(0x1ee)](_0x5f2a9c)[_0x5a16b3(0x200)](([_0x2c41d6,_0x5a7801])=>({'id':_0x2c41d6,'name':_0x5a7801})):[];if(_0x558ce5[_0x5a16b3(0x205)]===0x0){process['stderr'][_0x5a16b3(0x1e7)](_0x5a16b3(0x1a6));return;}process[_0x5a16b3(0x224)]['write'](_0x5a16b3(0x225)+_0x558ce5['length']+'):\x0a\x0a');for(let _0x1e3c0c of _0x558ce5){let _0x54a463=_0x1e3c0c[_0x5a16b3(0x1a0)]&&_0x1e3c0c[_0x5a16b3(0x1a0)]!==_0x1e3c0c['id']?'\x20('+_0x1e3c0c[_0x5a16b3(0x1a0)]+')':'';process[_0x5a16b3(0x224)][_0x5a16b3(0x1e7)]('\x20\x20'+_0x1e3c0c['id']+_0x54a463+'\x0a'),_0x1e3c0c['description']&&process[_0x5a16b3(0x224)][_0x5a16b3(0x1e7)](_0x5a16b3(0x1c1)+_0x1e3c0c[_0x5a16b3(0x1bd)]+'\x0a');}process['stdout'][_0x5a16b3(0x1e7)](_0x5a16b3(0x213));}async function z(_0x42fdfd){const _0x4e8910=_0x523476;if(_0x42fdfd[_0x4e8910(0x21a)]===_0x4e8910(0x21c)&&(console['error']('--env\x20localhost\x20has\x20no\x20OAuth\x20flow;\x20pick\x20alpha,\x20staging,\x20or\x20production.'),process[_0x4e8910(0x1fa)](0x2)),_0x42fdfd[_0x4e8910(0x21a)]){await _0x3ec3de({'env':_0x42fdfd['env']});return;}let _0x2b0622=y();if(_0x2b0622?.['auth'][_0x4e8910(0x1b2)]){await _0x3ec3de({'baseUrl':_0x2b0622[_0x4e8910(0x21d)][_0x4e8910(0x1b2)]});return;}console[_0x4e8910(0x1fc)](_0x4e8910(0x1a4)),process['exit'](0x2);}function K(_0x310107){const _0x2eab0a=_0x523476;return _0x310107?.[_0x2eab0a(0x1a9)]?.[_0x2eab0a(0x1bf)]===0x191||/401/[_0x2eab0a(0x1af)](String(_0x310107?.[_0x2eab0a(0x20a)]??''));}var a={'lastType':null,'quiet':!0x1},k=_0x26e0ee=>{const _0x38a1db=_0x523476;switch(_0x26e0ee[_0x38a1db(0x1ad)]){case _0x38a1db(0x1ac):_0x26e0ee[_0x38a1db(0x19b)]&&!a[_0x38a1db(0x18a)]&&(a['lastType']!==_0x38a1db(0x1ac)&&process[_0x38a1db(0x1ff)][_0x38a1db(0x1e7)](_0x38a1db(0x1c9)),process[_0x38a1db(0x1ff)]['write'](_0x26e0ee['content']),a[_0x38a1db(0x1b6)]=_0x38a1db(0x1ac));break;case _0x38a1db(0x1f8):a[_0x38a1db(0x1b6)]!==null&&process[_0x38a1db(0x1ff)][_0x38a1db(0x1e7)]('\x0a'),process[_0x38a1db(0x1ff)][_0x38a1db(0x1e7)]('🔧\x20'+(_0x26e0ee[_0x38a1db(0x1e1)]??_0x38a1db(0x1c8))+'\x0a'),a[_0x38a1db(0x1b6)]=_0x38a1db(0x1f8);break;case _0x38a1db(0x20a):_0x26e0ee[_0x38a1db(0x19b)]&&(a[_0x38a1db(0x1b6)]!==_0x38a1db(0x20a)&&a[_0x38a1db(0x1b6)]!==null&&process[_0x38a1db(0x224)]['write']('\x0a'),process['stdout'][_0x38a1db(0x1e7)](_0x26e0ee[_0x38a1db(0x19b)]),a[_0x38a1db(0x1b6)]=_0x38a1db(0x20a));break;case _0x38a1db(0x1fc):a[_0x38a1db(0x1b6)]!==null&&process[_0x38a1db(0x1ff)][_0x38a1db(0x1e7)]('\x0a'),process['stderr'][_0x38a1db(0x1e7)]('✗\x20'+(_0x26e0ee['error']??_0x26e0ee[_0x38a1db(0x20a)]??_0x38a1db(0x1fc))+'\x0a'),a['lastType']=_0x38a1db(0x1fc);break;case _0x38a1db(0x1aa):(a[_0x38a1db(0x1b6)]===_0x38a1db(0x20a)||a[_0x38a1db(0x1b6)]===_0x38a1db(0x1ac))&&process[_0x38a1db(0x224)][_0x38a1db(0x1e7)]('\x0a'),process[_0x38a1db(0x1ff)]['write'](_0x38a1db(0x198)),a[_0x38a1db(0x1b6)]=_0x38a1db(0x1aa);break;}};async function H(_0x483ad4){const _0x5cee8b=_0x523476;let _0x1e9d5=await M(_0x483ad4[_0x5cee8b(0x208)],process[_0x5cee8b(0x220)]);_0x1e9d5||(console['error'](_0x5cee8b(0x187)),process[_0x5cee8b(0x1fa)](0x2)),a['quiet']=_0x483ad4['quiet'];let _0x15c1ec=await U(),_0x37e8e7=new _0x15eccf();_0x37e8e7[_0x5cee8b(0x1e4)](k);let _0x2d6b9e=w(_0x483ad4[_0x5cee8b(0x21a)],_0x15c1ec,_0x483ad4['backendUrl']);N(_0x483ad4['env'],_0x483ad4[_0x5cee8b(0x199)],_0x2d6b9e);let _0xbb49e5={'backendUrl':_0x2d6b9e,'auth':_0x15c1ec,'enableComputerUse':!_0x483ad4[_0x5cee8b(0x196)],'autoSpawnInterop':!_0x483ad4['headless'],'enableConnections':!_0x483ad4[_0x5cee8b(0x1ce)],'enableSecurity':!_0x483ad4[_0x5cee8b(0x1dd)],'keepInteropAlive':_0x483ad4[_0x5cee8b(0x1ab)],..._0x483ad4['preloadSkills'][_0x5cee8b(0x205)]>0x0?{'preloadSkills':_0x483ad4[_0x5cee8b(0x1f1)]}:{},..._0x483ad4[_0x5cee8b(0x1d4)]||process.env.MODEL?{'model':_0x483ad4[_0x5cee8b(0x1d4)]||process.env.MODEL}:{}},_0x2a7b70=!0x1,_0x29b30f=!0x1,_0x4083c0=()=>{const _0x1d4258=_0x5cee8b;_0x29b30f&&process[_0x1d4258(0x1fa)](0x82),_0x29b30f=!0x0,process[_0x1d4258(0x1ff)][_0x1d4258(0x1e7)](_0x1d4258(0x1df)),_0x2a7b70?_0x37e8e7[_0x1d4258(0x1d0)]()[_0x1d4258(0x1cb)](()=>process['exit'](0x82)):process[_0x1d4258(0x1fa)](0x82);};process[_0x5cee8b(0x1f2)](_0x5cee8b(0x206),_0x4083c0),await _0x37e8e7['initialize'](_0xbb49e5),_0x2a7b70=!0x0;try{await _0x37e8e7[_0x5cee8b(0x1fd)](_0x1e9d5);}catch(_0x5321d7){if(K(_0x5321d7)&&process[_0x5cee8b(0x220)][_0x5cee8b(0x1b5)]&&_0x483ad4[_0x5cee8b(0x21a)]!==_0x5cee8b(0x21c)&&(_0x483ad4[_0x5cee8b(0x21a)]||_0x15c1ec['baseUrl'])){process['stderr'][_0x5cee8b(0x1e7)]('\x0a⚠️\x20\x20Auth\x20expired.\x20Opening\x20browser\x20to\x20re-login…\x0a');let _0x54c4bd=await _0x3ec3de(_0x483ad4[_0x5cee8b(0x21a)]?{'env':_0x483ad4[_0x5cee8b(0x21a)]}:{'baseUrl':_0x15c1ec[_0x5cee8b(0x1b2)]});await _0x37e8e7['destroy'](),_0x37e8e7=new _0x15eccf(),_0x37e8e7['onEvent'](k),await _0x37e8e7['initialize']({..._0xbb49e5,'auth':_0x54c4bd}),await _0x37e8e7[_0x5cee8b(0x1fd)](_0x1e9d5);}else throw _0x5321d7;}finally{process['off'](_0x5cee8b(0x206),_0x4083c0),await _0x37e8e7[_0x5cee8b(0x1d0)]();}}async function W(){const _0x1e6b38=_0x523476;let _0x452b72=O(process[_0x1e6b38(0x212)]['slice'](0x2));if(_0x452b72[_0x1e6b38(0x1de)]){C();return;}if(_0x452b72[_0x1e6b38(0x219)]){console[_0x1e6b38(0x1fb)](P());return;}if(_0x452b72[_0x1e6b38(0x188)]===_0x1e6b38(0x1d8)){await z(_0x452b72);return;}if(_0x452b72[_0x1e6b38(0x188)]==='logout'){await B();return;}if(_0x452b72[_0x1e6b38(0x188)]==='whoami'){await F();return;}if(_0x452b72[_0x1e6b38(0x188)]===_0x1e6b38(0x1e8)){await j(_0x452b72);return;}if(_0x452b72[_0x1e6b38(0x188)]==='host'){await _0x5c8bcb(_0x452b72['prompt'],{'runnerUrl':_0x452b72[_0x1e6b38(0x214)],'backendUrl':_0x452b72[_0x1e6b38(0x199)],'interopPath':_0x452b72[_0x1e6b38(0x1a3)],'workerId':_0x452b72[_0x1e6b38(0x1dc)]});return;}if(_0x452b72['cleanup']){await q();return;}await H(_0x452b72);}var J=process.env.NODE_ENV==='test'||!!process.env.JEST_WORKER_ID;J||W()[_0x523476(0x1ef)](_0x34502d=>{const _0x2c0815=_0x523476;console[_0x2c0815(0x1fc)](_0x34502d[_0x2c0815(0x1ec)]||_0x34502d[_0x2c0815(0x20a)]||_0x34502d),process[_0x2c0815(0x1fa)](0x1);});export{$ as IMPLICIT_STDIN_IDLE_MS,W as main,O as parseArgs,P as readCliVersion,M as resolvePrompt};
2
+ const _0x5e831e=_0x4ccc;(function(_0x7085e0,_0x49a028){const _0x46f243=_0x4ccc,_0xb76975=_0x7085e0();while(!![]){try{const _0x3d2f7b=-parseInt(_0x46f243(0x241))/0x1+parseInt(_0x46f243(0x1ce))/0x2*(parseInt(_0x46f243(0x20b))/0x3)+-parseInt(_0x46f243(0x1f1))/0x4+parseInt(_0x46f243(0x1b7))/0x5+-parseInt(_0x46f243(0x238))/0x6*(-parseInt(_0x46f243(0x1d1))/0x7)+parseInt(_0x46f243(0x1c5))/0x8+parseInt(_0x46f243(0x1c1))/0x9*(parseInt(_0x46f243(0x1ee))/0xa);if(_0x3d2f7b===_0x49a028)break;else _0xb76975['push'](_0xb76975['shift']());}catch(_0x5e54c5){_0xb76975['push'](_0xb76975['shift']());}}}(_0x133a,0x2c521));const __dirname=import.meta.dirname;import _0x3f9d9d from'fs';import _0xdef57f from'path';import{DelegateAgent as _0x1bc9cd,InteropProcess as _0x53f6c9,buildDelegateServiceUrl as _0x37080f,getAuthFilePath as _0x256658,loadAndRefreshAuth as _0x2d38e7,runHostCommand as _0x528f54,runLoginFlow as _0x588e5c}from'@uipath/delegate-sdk';var I={'alpha':'https://alpha.uipath.com','staging':_0x5e831e(0x1bc),'production':_0x5e831e(0x1c2)},R=['login',_0x5e831e(0x246),_0x5e831e(0x20e),_0x5e831e(0x230),_0x5e831e(0x1d3)];function O(_0x2de314){const _0x2df3fc=_0x5e831e;let _0x2c95ef={'subcommand':'','prompt':'','keepAlive':!0x1,'cleanup':!0x1,'headless':!0x1,'noConnections':!0x1,'noSecurity':!0x1,'quiet':!0x1,'preloadSkills':[],'help':!0x1,'version':!0x1};R['includes'](_0x2de314[0x0])&&(_0x2c95ef[_0x2df3fc(0x1ef)]=_0x2de314[0x0],_0x2de314=_0x2de314[_0x2df3fc(0x1da)](0x1));let _0x1a8c45=[];for(let _0x42e3c0=0x0;_0x42e3c0<_0x2de314[_0x2df3fc(0x1ea)];_0x42e3c0++){let _0x5366aa=_0x2de314[_0x42e3c0];switch(_0x5366aa){case _0x2df3fc(0x1cb):_0x2c95ef[_0x2df3fc(0x1fa)]=!0x0;break;case _0x2df3fc(0x21c):_0x2c95ef['cleanup']=!0x0;break;case _0x2df3fc(0x233):_0x2c95ef['headless']=!0x0;break;case _0x2df3fc(0x20f):_0x2c95ef[_0x2df3fc(0x201)]=!0x0;break;case _0x2df3fc(0x1be):_0x2c95ef[_0x2df3fc(0x1dc)]=!0x0;break;case _0x2df3fc(0x1fd):case'-q':_0x2c95ef[_0x2df3fc(0x23e)]=!0x0;break;case _0x2df3fc(0x1b9):_0x2c95ef[_0x2df3fc(0x1c9)]=_0x2de314[++_0x42e3c0];break;case _0x2df3fc(0x1f3):_0x2c95ef[_0x2df3fc(0x22a)]=_0x2de314[++_0x42e3c0];break;case _0x2df3fc(0x216):_0x2c95ef[_0x2df3fc(0x1f8)]=_0x2de314[++_0x42e3c0];break;case _0x2df3fc(0x20d):_0x2c95ef[_0x2df3fc(0x1e2)]=_0x2de314[++_0x42e3c0];break;case _0x2df3fc(0x221):_0x2c95ef[_0x2df3fc(0x231)]=_0x2de314[++_0x42e3c0];break;case _0x2df3fc(0x23a):{let _0x23ba4b=_0x2de314[++_0x42e3c0];(!_0x23ba4b||_0x23ba4b[_0x2df3fc(0x218)]('--'))&&(console[_0x2df3fc(0x1df)](_0x2df3fc(0x1e4)),process[_0x2df3fc(0x207)](0x2)),_0x2c95ef[_0x2df3fc(0x1d7)][_0x2df3fc(0x24e)](_0x23ba4b);break;}case'--env':{let _0x274c44=_0x2de314[++_0x42e3c0];[_0x2df3fc(0x243),'staging',_0x2df3fc(0x204),_0x2df3fc(0x213)][_0x2df3fc(0x1ff)](_0x274c44)||(console['error'](_0x2df3fc(0x236)+_0x274c44+_0x2df3fc(0x1fb)),process[_0x2df3fc(0x207)](0x2)),_0x2c95ef['env']=_0x274c44;break;}case'-h':case _0x2df3fc(0x212):_0x2c95ef[_0x2df3fc(0x200)]=!0x0;break;case'-v':case'--version':_0x2c95ef[_0x2df3fc(0x1cc)]=!0x0;break;default:_0x5366aa['startsWith']('--')&&(console['error'](_0x2df3fc(0x22d)+_0x5366aa),process[_0x2df3fc(0x207)](0x2)),_0x1a8c45['push'](_0x5366aa);}}return _0x2c95ef[_0x2df3fc(0x225)]=_0x1a8c45['join']('\x20'),_0x2c95ef;}function w(_0xe9d7af,_0x3fe9ad,_0x1c0bc0){const _0x209108=_0x5e831e;if(_0x1c0bc0)return _0x1c0bc0;if(process.env.BACKEND_URL)return process.env.BACKEND_URL;if(!_0xe9d7af){if(_0x3fe9ad?.['baseUrl']&&_0x3fe9ad?.[_0x209108(0x1eb)]&&_0x3fe9ad?.['tenantName'])return _0x37080f(_0x3fe9ad[_0x209108(0x249)],_0x3fe9ad[_0x209108(0x1eb)],_0x3fe9ad['tenantName']);throw new Error(_0x209108(0x222));}if(_0xe9d7af===_0x209108(0x213))return'http://localhost:5002';let _0x23c9d6=I[_0xe9d7af],_0x16f468=_0x3fe9ad?.['orgLogicalName'],_0x446791=_0x3fe9ad?.[_0x209108(0x235)];if(!_0x16f468||!_0x446791)throw new Error('--env\x20'+_0xe9d7af+_0x209108(0x22b)+_0xe9d7af+_0x209108(0x215));return _0x37080f(_0x23c9d6,_0x16f468,_0x446791);}function C(){const _0x271683=_0x5e831e;let _0x3764a1=_0x271683(0x1e3)[_0x271683(0x210)]();console[_0x271683(0x1e9)](_0x3764a1);}function P(){const _0x38fa06=_0x5e831e;try{return JSON[_0x38fa06(0x1c8)](_0x3f9d9d['readFileSync'](_0xdef57f[_0x38fa06(0x21a)](__dirname,'..','package.json'),'utf-8'))['version']||'unknown';}catch{return _0x38fa06(0x226);}}var $=0x7d0;async function m(_0x2b147a,_0x3fa6fe){const _0x1f9a5b=_0x5e831e;let _0x48f448=_0x3fa6fe?[_0x3fa6fe]:[];for await(let _0x217fd4 of _0x2b147a)_0x48f448[_0x1f9a5b(0x24e)](Buffer[_0x1f9a5b(0x21e)](_0x217fd4));return Buffer[_0x1f9a5b(0x24f)](_0x48f448)[_0x1f9a5b(0x206)](_0x1f9a5b(0x1fe))['trim']();}function x(_0x2b824f,_0xd391d8){return new Promise(_0x5d786a=>{const _0x65a0ce=_0x4ccc;let _0x33ff8d=_0x3972bb=>{const _0x3e6bbc=_0x4ccc;clearTimeout(_0x14e360),_0x2b824f[_0x3e6bbc(0x1c0)](_0x3e6bbc(0x1b1),_0x2f88f3),_0x2b824f[_0x3e6bbc(0x1c0)](_0x3e6bbc(0x1ca),_0x4608fc),_0x2b824f[_0x3e6bbc(0x1c0)](_0x3e6bbc(0x1df),_0x4608fc),_0x2b824f['pause'](),_0x5d786a(_0x3972bb);},_0x2f88f3=_0x52489a=>_0x33ff8d(Buffer['from'](_0x52489a)),_0x4608fc=()=>_0x33ff8d(null),_0x14e360=setTimeout(()=>_0x33ff8d(null),_0xd391d8);_0x2b824f['on'](_0x65a0ce(0x1b1),_0x2f88f3),_0x2b824f['on'](_0x65a0ce(0x1ca),_0x4608fc),_0x2b824f['on']('error',_0x4608fc),_0x2b824f[_0x65a0ce(0x1e8)]();});}async function M(_0x5ca221,_0xe90ff,_0x3d2363=$){const _0x4401f3=_0x5e831e;let _0x5cd784=_0x5ca221==='-';if(!_0x5cd784&&_0x5ca221)return _0x5ca221;if(!_0x5cd784&&_0xe90ff[_0x4401f3(0x1e7)])return'';if(_0x5cd784)return m(_0xe90ff,null);let _0x5920b2=await x(_0xe90ff,_0x3d2363);return _0x5920b2?m(_0xe90ff,_0x5920b2):'';}function S(){const _0x409fc3=_0x5e831e;return _0xdef57f['join'](process.env.HOME||process.env.USERPROFILE||'',_0x409fc3(0x21b),_0x409fc3(0x23f));}function A(_0x1da4db){const _0x80f1b=_0x5e831e;try{let _0x3cbe30=JSON[_0x80f1b(0x1c8)](_0x3f9d9d[_0x80f1b(0x20c)](_0x1da4db,_0x80f1b(0x1fe)));return!_0x3cbe30[_0x80f1b(0x250)]||!_0x3cbe30[_0x80f1b(0x1ba)]||!_0x3cbe30[_0x80f1b(0x1b5)]?null:_0x3cbe30;}catch{return null;}}function y(){const _0x2e2925=_0x5e831e;let _0x3f697a=[{'file':_0x256658(),'isDesktopFallback':!0x1},{'file':S(),'isDesktopFallback':!0x0}];for(let _0x518e75 of _0x3f697a){let _0x3300e0=A(_0x518e75[_0x2e2925(0x219)]);if(_0x3300e0)return{..._0x518e75,'auth':_0x3300e0};}return null;}function _0x4ccc(_0x15c61d,_0x57c375){_0x15c61d=_0x15c61d-0x1b1;const _0x133a3c=_0x133a();let _0x4cccd4=_0x133a3c[_0x15c61d];return _0x4cccd4;}async function B(){const _0x4dfc47=_0x5e831e;let _0x1258f4=_0x256658();if(!_0x3f9d9d[_0x4dfc47(0x1d5)](_0x1258f4)){let _0x336935=S();console[_0x4dfc47(0x1e9)](A(_0x336935)?_0x4dfc47(0x1f2)+_0x336935+_0x4dfc47(0x220):_0x4dfc47(0x234));return;}_0x3f9d9d[_0x4dfc47(0x22e)](_0x1258f4),console['log'](_0x4dfc47(0x239)+_0x1258f4);}async function F(){const _0x169d27=_0x5e831e;let _0x4f863a=E(),_0x48773e,_0x507043;if(_0x4f863a)_0x48773e=_0x4f863a,_0x507043=_0x169d27(0x1b2);else{let _0x3fc57b=y();if(!_0x3fc57b)throw new Error(T);_0x48773e=_0x3fc57b[_0x169d27(0x1fc)],_0x507043=_0x3fc57b[_0x169d27(0x1cf)]?_0x3fc57b[_0x169d27(0x219)]+_0x169d27(0x1b3):_0x3fc57b['file'];}let _0x3df001=[_0x169d27(0x1d9)+_0x507043,_0x169d27(0x1d4)+(_0x48773e[_0x169d27(0x249)]??_0x169d27(0x226)),_0x169d27(0x248)+(_0x48773e[_0x169d27(0x1eb)]??'unknown\x20slug')+'\x20('+_0x48773e[_0x169d27(0x1b5)]+')',_0x169d27(0x240)+(_0x48773e['tenantName']??'unknown\x20slug')+'\x20('+_0x48773e['tenantId']+')'];if(_0x48773e[_0x169d27(0x1ed)]){let _0x298285=_0x48773e[_0x169d27(0x1ed)]-Math['floor'](Date[_0x169d27(0x227)]()/0x3e8),_0x142b01=new Date(_0x48773e[_0x169d27(0x1ed)]*0x3e8)[_0x169d27(0x24b)]();_0x3df001[_0x169d27(0x24e)](_0x298285>0x0?_0x169d27(0x1bd)+_0x142b01+_0x169d27(0x214)+Math[_0x169d27(0x21f)](_0x298285/0x3c)+_0x169d27(0x247):_0x169d27(0x24d)+_0x142b01);}process[_0x169d27(0x211)][_0x169d27(0x217)](_0x3df001['join']('\x0a')+'\x0a');}var T=_0x5e831e(0x1b6);function E(){return process.env.AUTH_TOKEN&&process.env.TENANT_ID&&process.env.ORG_ID?{'accessToken':process.env.AUTH_TOKEN,'tenantId':process.env.TENANT_ID,'organizationId':process.env.ORG_ID,'orgLogicalName':process.env.ORG_SLUG,'tenantName':process.env.TENANT_SLUG,'baseUrl':process.env.UIPATH_BASE_URL}:null;}async function U(){let _0x1d3b9b=E();if(_0x1d3b9b)return _0x1d3b9b;let _0x2eaf96=await _0x2d38e7();if(_0x2eaf96)return _0x2eaf96;throw new Error(T);}async function q(){const _0x39dded=_0x5e831e;await new _0x53f6c9()[_0x39dded(0x1d6)]({'force':!0x0}),console[_0x39dded(0x1e9)](_0x39dded(0x1f5));}var G=_0x5e831e(0x1ec);function N(_0x2cc2ec,_0x20d4e8,_0x39aecc){const _0x43613a=_0x5e831e;_0x2cc2ec?process[_0x43613a(0x1f7)][_0x43613a(0x217)]('[env='+_0x2cc2ec+']\x20Backend\x20URL:\x20'+_0x39aecc+'\x0a'):!_0x20d4e8&&!process.env.BACKEND_URL&&process[_0x43613a(0x1f7)][_0x43613a(0x217)](_0x43613a(0x1f9)+_0x39aecc+'\x0a');}async function j(_0x317944){const _0x10c081=_0x5e831e;let _0x302223=await U(),_0x4328ea=w(_0x317944['env'],_0x302223,_0x317944[_0x10c081(0x1c9)]);N(_0x317944[_0x10c081(0x1d0)],_0x317944[_0x10c081(0x1c9)],_0x4328ea);let _0x24fd40=_0x4328ea+_0x10c081(0x1dd),_0x420a5d={'Authorization':_0x10c081(0x224)+_0x302223[_0x10c081(0x250)],'X-UiPath-ConsumingProductId':G};_0x302223[_0x10c081(0x1ba)]&&(_0x420a5d['X-Uipath-Tenantid']=_0x302223[_0x10c081(0x1ba)]),_0x302223[_0x10c081(0x1b5)]&&(_0x420a5d[_0x10c081(0x24a)]=_0x302223[_0x10c081(0x1b5)]);let _0x59b59d=await fetch(_0x24fd40,{'headers':_0x420a5d});if(!_0x59b59d['ok'])throw new Error(_0x10c081(0x1d2)+_0x24fd40+_0x10c081(0x1e5)+_0x59b59d[_0x10c081(0x245)]+'\x20'+_0x59b59d[_0x10c081(0x205)]);let _0x214a04=(await _0x59b59d['json']())?.[_0x10c081(0x1db)],_0xf64aa7=Array[_0x10c081(0x21d)](_0x214a04)?_0x214a04:_0x214a04&&typeof _0x214a04==_0x10c081(0x1d8)?Object[_0x10c081(0x1bf)](_0x214a04)[_0x10c081(0x22f)](([_0x536fdc,_0x558903])=>({'id':_0x536fdc,'name':_0x558903})):[];if(_0xf64aa7[_0x10c081(0x1ea)]===0x0){process[_0x10c081(0x1f7)][_0x10c081(0x217)](_0x10c081(0x244));return;}process[_0x10c081(0x211)][_0x10c081(0x217)](_0x10c081(0x1f6)+_0xf64aa7['length']+_0x10c081(0x209));for(let _0x3898c2 of _0xf64aa7){let _0x19fdf9=_0x3898c2[_0x10c081(0x1c3)]&&_0x3898c2[_0x10c081(0x1c3)]!==_0x3898c2['id']?'\x20('+_0x3898c2[_0x10c081(0x1c3)]+')':'';process[_0x10c081(0x211)][_0x10c081(0x217)]('\x20\x20'+_0x3898c2['id']+_0x19fdf9+'\x0a'),_0x3898c2[_0x10c081(0x228)]&&process[_0x10c081(0x211)][_0x10c081(0x217)](_0x10c081(0x229)+_0x3898c2[_0x10c081(0x228)]+'\x0a');}process['stdout'][_0x10c081(0x217)](_0x10c081(0x1b4));}async function z(_0xa24de4){const _0x2cc6f1=_0x5e831e;if(_0xa24de4[_0x2cc6f1(0x1d0)]===_0x2cc6f1(0x213)&&(console[_0x2cc6f1(0x1df)]('--env\x20localhost\x20has\x20no\x20OAuth\x20flow;\x20pick\x20alpha,\x20staging,\x20or\x20production.'),process[_0x2cc6f1(0x207)](0x2)),_0xa24de4[_0x2cc6f1(0x1d0)]){await _0x588e5c({'env':_0xa24de4[_0x2cc6f1(0x1d0)]});return;}let _0x1162c7=y();if(_0x1162c7?.[_0x2cc6f1(0x1fc)]['baseUrl']){await _0x588e5c({'baseUrl':_0x1162c7[_0x2cc6f1(0x1fc)]['baseUrl']});return;}console['error']('First\x20login\x20requires\x20--env.\x20Usage:\x20delegate-cli\x20login\x20--env\x20<alpha|staging|production>'),process[_0x2cc6f1(0x207)](0x2);}function K(_0x3b2358){const _0x568768=_0x5e831e;return _0x3b2358?.[_0x568768(0x1e0)]?.[_0x568768(0x245)]===0x191||/401/[_0x568768(0x1c4)](String(_0x3b2358?.[_0x568768(0x23c)]??''));}var a={'lastType':null,'quiet':!0x1},k=_0x33f1ac=>{const _0x4f0b89=_0x5e831e;switch(_0x33f1ac[_0x4f0b89(0x1c6)]){case _0x4f0b89(0x202):_0x33f1ac[_0x4f0b89(0x232)]&&!a['quiet']&&(a[_0x4f0b89(0x242)]!==_0x4f0b89(0x202)&&process[_0x4f0b89(0x1f7)]['write'](_0x4f0b89(0x1bb)),process['stderr'][_0x4f0b89(0x217)](_0x33f1ac[_0x4f0b89(0x232)]),a[_0x4f0b89(0x242)]=_0x4f0b89(0x202));break;case'tool_call':a[_0x4f0b89(0x242)]!==null&&process['stderr']['write']('\x0a'),process[_0x4f0b89(0x1f7)]['write'](_0x4f0b89(0x208)+(_0x33f1ac[_0x4f0b89(0x1b8)]??'tool')+'\x0a'),a[_0x4f0b89(0x242)]=_0x4f0b89(0x1e6);break;case _0x4f0b89(0x23c):_0x33f1ac[_0x4f0b89(0x232)]&&(a[_0x4f0b89(0x242)]!=='message'&&a[_0x4f0b89(0x242)]!==null&&process[_0x4f0b89(0x211)][_0x4f0b89(0x217)]('\x0a'),process[_0x4f0b89(0x211)]['write'](_0x33f1ac[_0x4f0b89(0x232)]),a[_0x4f0b89(0x242)]=_0x4f0b89(0x23c));break;case'error':a[_0x4f0b89(0x242)]!==null&&process[_0x4f0b89(0x1f7)][_0x4f0b89(0x217)]('\x0a'),process[_0x4f0b89(0x1f7)][_0x4f0b89(0x217)]('✗\x20'+(_0x33f1ac[_0x4f0b89(0x1df)]??_0x33f1ac[_0x4f0b89(0x23c)]??'error')+'\x0a'),a['lastType']=_0x4f0b89(0x1df);break;case'done':(a[_0x4f0b89(0x242)]==='message'||a[_0x4f0b89(0x242)]===_0x4f0b89(0x202))&&process[_0x4f0b89(0x211)][_0x4f0b89(0x217)]('\x0a'),process['stderr']['write'](_0x4f0b89(0x1cd)),a['lastType']='done';break;}};async function H(_0x4803ad){const _0x4d3eb9=_0x5e831e;let _0x2aae30=await M(_0x4803ad[_0x4d3eb9(0x225)],process[_0x4d3eb9(0x22c)]);_0x2aae30||(console['error'](_0x4d3eb9(0x23d)),process[_0x4d3eb9(0x207)](0x2)),a[_0x4d3eb9(0x23e)]=_0x4803ad['quiet'];let _0x301731=await U(),_0x365ae9=new _0x1bc9cd();_0x365ae9[_0x4d3eb9(0x23b)](k);let _0x5f0157=w(_0x4803ad['env'],_0x301731,_0x4803ad['backendUrl']);N(_0x4803ad['env'],_0x4803ad[_0x4d3eb9(0x1c9)],_0x5f0157);let _0x1938c4={'backendUrl':_0x5f0157,'auth':_0x301731,'enableComputerUse':!_0x4803ad[_0x4d3eb9(0x1de)],'autoSpawnInterop':!_0x4803ad[_0x4d3eb9(0x1de)],'enableConnections':!_0x4803ad[_0x4d3eb9(0x201)],'enableSecurity':!_0x4803ad[_0x4d3eb9(0x1dc)],'keepInteropAlive':_0x4803ad[_0x4d3eb9(0x1fa)],..._0x4803ad[_0x4d3eb9(0x1d7)][_0x4d3eb9(0x1ea)]>0x0?{'preloadSkills':_0x4803ad[_0x4d3eb9(0x1d7)]}:{},..._0x4803ad[_0x4d3eb9(0x22a)]||process.env.MODEL?{'model':_0x4803ad['model']||process.env.MODEL}:{}},_0x1062ed=!0x1,_0xcedb91=!0x1,_0x24890f=()=>{const _0x950213=_0x4d3eb9;_0xcedb91&&process[_0x950213(0x207)](0x82),_0xcedb91=!0x0,process['stderr']['write'](_0x950213(0x1c7)),_0x1062ed?_0x365ae9[_0x950213(0x20a)]()['finally'](()=>process[_0x950213(0x207)](0x82)):process[_0x950213(0x207)](0x82);};process['once'](_0x4d3eb9(0x223),_0x24890f),await _0x365ae9[_0x4d3eb9(0x1f4)](_0x1938c4),_0x1062ed=!0x0;try{await _0x365ae9['sendMessage'](_0x2aae30);}catch(_0xa6132b){if(K(_0xa6132b)&&process[_0x4d3eb9(0x22c)]['isTTY']&&_0x4803ad[_0x4d3eb9(0x1d0)]!=='localhost'&&(_0x4803ad['env']||_0x301731['baseUrl'])){process[_0x4d3eb9(0x1f7)][_0x4d3eb9(0x217)](_0x4d3eb9(0x203));let _0xec19ba=await _0x588e5c(_0x4803ad[_0x4d3eb9(0x1d0)]?{'env':_0x4803ad[_0x4d3eb9(0x1d0)]}:{'baseUrl':_0x301731['baseUrl']});await _0x365ae9[_0x4d3eb9(0x20a)](),_0x365ae9=new _0x1bc9cd(),_0x365ae9[_0x4d3eb9(0x23b)](k),await _0x365ae9[_0x4d3eb9(0x1f4)]({..._0x1938c4,'auth':_0xec19ba}),await _0x365ae9['sendMessage'](_0x2aae30);}else throw _0xa6132b;}finally{process['off'](_0x4d3eb9(0x223),_0x24890f),await _0x365ae9[_0x4d3eb9(0x20a)]();}}async function W(){const _0x54bc2a=_0x5e831e;let _0x471f22=O(process[_0x54bc2a(0x1e1)][_0x54bc2a(0x1da)](0x2));if(_0x471f22[_0x54bc2a(0x200)]){C();return;}if(_0x471f22['version']){console['log'](P());return;}if(_0x471f22['subcommand']===_0x54bc2a(0x1f0)){await z(_0x471f22);return;}if(_0x471f22[_0x54bc2a(0x1ef)]===_0x54bc2a(0x230)){await B();return;}if(_0x471f22[_0x54bc2a(0x1ef)]===_0x54bc2a(0x1d3)){await F();return;}if(_0x471f22[_0x54bc2a(0x1ef)]===_0x54bc2a(0x246)){await j(_0x471f22);return;}if(_0x471f22[_0x54bc2a(0x1ef)]===_0x54bc2a(0x20e)){await _0x528f54(_0x471f22[_0x54bc2a(0x225)],{'runnerUrl':_0x471f22[_0x54bc2a(0x1f8)],'backendUrl':_0x471f22['backendUrl'],'interopPath':_0x471f22[_0x54bc2a(0x1e2)],'workerId':_0x471f22[_0x54bc2a(0x231)]});return;}if(_0x471f22['cleanup']){await q();return;}await H(_0x471f22);}var J=process.env.NODE_ENV==='test'||!!process.env.JEST_WORKER_ID;function _0x133a(){const _0x187d32=['stack','Token:\x20\x20\x20\x20\x20\x20\x20\x20expired\x20','push','concat','accessToken','data','environment\x20variables\x20(AUTH_TOKEN/TENANT_ID/ORG_ID)','\x20(Delegate\x20desktop\x20app\x20fallback)','\x0aUse\x20with:\x20delegate-cli\x20--model\x20<id>\x20\x22<prompt>\x22\x0a','organizationId','No\x20auth\x20found.\x20Set\x20AUTH_TOKEN/TENANT_ID/ORG_ID\x20env\x20vars,\x20or\x20run\x20`delegate-cli\x20login\x20--env\x20<alpha|staging|production>`\x20(interactive\x20browser\x20OAuth)\x20first.','1125395FVnPPL','toolName','--backend','tenantId','\x0a🤔\x20','https://staging.uipath.com','Token:\x20\x20\x20\x20\x20\x20\x20\x20expires\x20','--no-security','entries','off','3672qxpUXZ','https://cloud.uipath.com','name','test','81056mUhQCj','type','\x0aStopping…\x20(Ctrl+C\x20again\x20to\x20force\x20exit)\x0a','parse','backendUrl','end','--keep-alive','version','✓\x20Done\x0a','530dumclu','isDesktopFallback','env','4711uZIVrB','GET\x20','whoami','Base\x20URL:\x20\x20\x20\x20\x20','existsSync','stop','preloadSkills','object','Source:\x20\x20\x20\x20\x20\x20\x20','slice','MODELS','noSecurity','/v1/config','headless','error','response','argv','interopPath','\x0adelegate-cli\x20—\x20Delegate\x20agent\x20CLI\x0a\x0aUsage:\x0a\x20\x20delegate-cli\x20[flags]\x20\x22<prompt>\x22\x20\x20\x20\x20\x20\x20Send\x20prompt\x20to\x20the\x20agent\x0a\x20\x20delegate-cli\x20[flags]\x20-\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Read\x20the\x20prompt\x20from\x20stdin\x20(also\x20implied\x20when\x20stdin\x20is\x20piped)\x0a\x20\x20delegate-cli\x20login\x20[--env\x20NAME]\x20\x20\x20\x20\x20\x20OAuth\x20browser\x20login\x20→\x20~/.aria/sdk-auth.json.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20required\x20on\x20FIRST\x20login;\x20afterwards\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20defaults\x20to\x20the\x20saved\x20login\x27s\x20cloud\x0a\x20\x20delegate-cli\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Remove\x20the\x20saved\x20CLI\x20login\x0a\x20\x20delegate-cli\x20whoami\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20the\x20current\x20login\x20(org,\x20tenant,\x20token\x20expiry)\x0a\x20\x20delegate-cli\x20models\x20[--env\x20NAME]\x20\x20\x20\x20\x20List\x20available\x20LLM\x20models\x20for\x20the\x20current\x20tenant\x0a\x20\x20delegate-cli\x20host\x20[flags]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20this\x20PC\x20as\x20a\x20remote\x20worker\x20until\x20Ctrl+C\x0a\x20\x20delegate-cli\x20host\x20install\x20[flags]\x20\x20\x20\x20Auto-start\x20the\x20host\x20at\x20login\x20(macOS\x20LaunchAgent\x20/\x20Windows\x20Scheduled\x20Task)\x0a\x20\x20delegate-cli\x20host\x20uninstall\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Remove\x20auto-start\x0a\x20\x20delegate-cli\x20host\x20status\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20auto-start\x20state\x0a\x20\x20delegate-cli\x20--cleanup\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Stop\x20running\x20interop\x0a\x0aFlags:\x0a\x20\x20--env\x20NAME\x20\x20\x20\x20\x20\x20\x20\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Composes\x20backend\x20URL\x20from\x20saved\x20auth\x20(org/tenant\x20slugs).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Omitted\x20→\x20the\x20cloud\x20you\x20logged\x20into\x20(delegate-cli\x20login).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20localhost\x20→\x20http://localhost:5002.\x20No\x20saved\x20login\x20and\x20no\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env/--backend/BACKEND_URL\x20is\x20an\x20error\x20—\x20never\x20a\x20guess.\x0a\x20\x20--backend\x20URL\x20\x20\x20\x20\x20Full\x20backend\x20URL\x20—\x20escape\x20hatch\x20overrides\x20--env\x0a\x20\x20--model\x20NAME\x20\x20\x20\x20\x20\x20LLM\x20model\x20id\x20(e.g.\x20claude_sonnet_5,\x20kimi_k2_7_code).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20gemini_3_6_flash.\x20Also\x20settable\x20via\x20MODEL\x20env\x20var.\x0a\x20\x20--keep-alive\x20\x20\x20\x20\x20\x20Reuse/leave\x20interop\x20running\x20across\x20invocations\x0a\x20\x20--headless\x20\x20\x20\x20\x20\x20\x20\x20Skip\x20interop\x20(text-only\x20prompts)\x0a\x20\x20--no-connections\x20\x20Disable\x20orchestrator\x20ConnectionService\x20(silences\x20404\x20warnings)\x0a\x20\x20--no-security\x20\x20\x20\x20\x20Disable\x20tool\x20security\x20wrapper\x20(use\x20only\x20for\x20debugging)\x0a\x20\x20--preload-skill\x20NAME\x20\x20Preload\x20a\x20skill\x20into\x20the\x20session\x20(repeatable).\x20The\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20skill\x27s\x20content\x20is\x20attached\x20before\x20the\x20first\x20model\x20turn\x20—\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20same\x20mechanism\x20as\x20project\x20preloaded\x20skills\x20in\x20the\x20app\x0a\x20\x20--runner-url\x20URL\x20\x20(host)\x20Runner\x20worker\x20WS\x20URL.\x20Required;\x20or\x20CONTROL_PLANE_WS_URL\x20env\x0a\x20\x20--interop\x20PATH\x20\x20\x20\x20(host)\x20Interop\x20binary\x20path;\x20or\x20INTEROP_EXECUTABLE_PATH\x20env.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Absent\x20→\x20registration/discovery\x20only,\x20tool\x20execution\x20disabled\x0a\x20\x20--worker-id\x20ID\x20\x20\x20\x20(host)\x20Stable\x20worker\x20identity;\x20or\x20WORKER_ID\x20env.\x20Default:\x20hostname\x0a\x20\x20-q,\x20--quiet\x20\x20\x20\x20\x20\x20\x20Suppress\x20🤔\x20thinking\x20output\x20to\x20stderr\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Print\x20the\x20installed\x20CLI\x20version\x0a\x0aAuth:\x20prompts\x20auto-retry\x20on\x20401\x20by\x20opening\x20the\x20browser\x20to\x20re-login\x20(TTY\x20only).\x0a','--preload-skill\x20requires\x20a\x20skill\x20name.','\x20→\x20','tool_call','isTTY','resume','log','length','orgLogicalName','799f56b8-4aed-4a0f-8640-659dae4a9e0e','expiresAt','1020zVdvWt','subcommand','login','618392eXHvJr','No\x20CLI\x20login\x20found.\x20Note:\x20the\x20CLI\x20is\x20currently\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','--model','initialize','Interop\x20stopped\x20(if\x20it\x20was\x20running).','\x0aAvailable\x20models\x20(','stderr','runnerUrl','[saved\x20login]\x20Backend\x20URL:\x20','keepAlive','.\x20Use\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost.','auth','--quiet','utf-8','includes','help','noConnections','thinking','\x0a⚠️\x20\x20Auth\x20expired.\x20Opening\x20browser\x20to\x20re-login…\x0a','production','statusText','toString','exit','🔧\x20','):\x0a\x0a','destroy','2787nqIagz','readFileSync','--interop','host','--no-connections','trim','stdout','--help','localhost','\x20(in\x20','`\x20(writes\x20slugs\x20to\x20~/.aria/sdk-auth.json),\x20or\x0a\x20\x20-\x20set\x20ORG_SLUG\x20and\x20TENANT_SLUG\x20env\x20vars\x20alongside\x20ORG_ID/TENANT_ID,\x20or\x0a\x20\x20-\x20pass\x20the\x20full\x20URL\x20via\x20--backend\x20(overrides\x20--env).','--runner-url','write','startsWith','file','join','.aria','--cleanup','isArray','from','round','\x20—\x20sign\x20out\x20in\x20the\x20Delegate\x20app\x20to\x20clear\x20that.','--worker-id','No\x20backend\x20selected.\x20Run\x20`delegate-cli\x20login\x20--env\x20<env>`\x20first\x20(commands\x20then\x20default\x20to\x20that\x20cloud),\x20or\x20pass\x20--env\x20<alpha|staging|production|localhost>\x20or\x20--backend\x20<url>\x20(or\x20set\x20BACKEND_URL).','SIGINT','Bearer\x20','prompt','unknown','now','description','\x20\x20\x20\x20','model','\x20needs\x20org/tenant\x20slugs.\x20Either:\x0a\x20\x20-\x20run\x20`delegate-cli\x20login\x20--env\x20','stdin','Unknown\x20flag:\x20','rmSync','map','logout','workerId','content','--headless','No\x20CLI\x20login\x20found\x20—\x20nothing\x20to\x20remove.','tenantName','Invalid\x20--env:\x20','catch','768GMeMQk','Removed\x20','--preload-skill','onEvent','message','Missing\x20prompt.\x20Pass\x20it\x20as\x20an\x20argument,\x20pipe\x20it\x20via\x20stdin,\x20or\x20run\x20`delegate-cli\x20--help`.','quiet','auth.json','Tenant:\x20\x20\x20\x20\x20\x20\x20','273021plMMvr','lastType','alpha','No\x20models\x20available\x20for\x20this\x20product/tenant.\x0a','status','models','\x20min)','Organization:\x20','baseUrl','X-Uipath-Organizationid','toISOString'];_0x133a=function(){return _0x187d32;};return _0x133a();}J||W()[_0x5e831e(0x237)](_0xa384e6=>{const _0x103b90=_0x5e831e;console[_0x103b90(0x1df)](_0xa384e6[_0x103b90(0x24c)]||_0xa384e6[_0x103b90(0x23c)]||_0xa384e6),process[_0x103b90(0x207)](0x1);});export{$ as IMPLICIT_STDIN_IDLE_MS,W as main,O as parseArgs,P as readCliVersion,M as resolvePrompt};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/delegate-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "UiPath Delegate CLI - drive the Delegate agent from the terminal. Wraps @uipath/delegate-sdk; installing this package pulls the SDK in — no separate install.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -22,7 +22,7 @@
22
22
  "publish:npmjs": "npm publish --@uipath:registry=https://registry.npmjs.org/ --access public --ignore-scripts"
23
23
  },
24
24
  "dependencies": {
25
- "@uipath/delegate-sdk": "0.1.2"
25
+ "@uipath/delegate-sdk": "0.1.4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.0.0",