@uipath/delegate-cli 0.1.5 → 0.1.6

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 _0x49cf1e=_0x254e;(function(_0x52d314,_0x125f95){const _0x31ee13=_0x254e,_0x437dcb=_0x52d314();while(!![]){try{const _0x19703e=parseInt(_0x31ee13(0x1c3))/0x1*(parseInt(_0x31ee13(0x197))/0x2)+-parseInt(_0x31ee13(0x1a4))/0x3*(parseInt(_0x31ee13(0x1b8))/0x4)+-parseInt(_0x31ee13(0x1ab))/0x5*(-parseInt(_0x31ee13(0x1f7))/0x6)+parseInt(_0x31ee13(0x185))/0x7*(parseInt(_0x31ee13(0x1ed))/0x8)+-parseInt(_0x31ee13(0x183))/0x9+parseInt(_0x31ee13(0x1fd))/0xa*(parseInt(_0x31ee13(0x1df))/0xb)+-parseInt(_0x31ee13(0x203))/0xc*(parseInt(_0x31ee13(0x1d1))/0xd);if(_0x19703e===_0x125f95)break;else _0x437dcb['push'](_0x437dcb['shift']());}catch(_0x2a5d98){_0x437dcb['push'](_0x437dcb['shift']());}}}(_0x55d1,0x98c58));const __dirname=import.meta.dirname;import _0x3014ad from'fs';import _0x32396f from'path';import{DelegateAgent as _0x1cd5bb,InteropProcess as _0x3e47ad,buildDelegateServiceUrl as _0x5e1b6b,getAuthFilePath as _0x4799a3,loadAndRefreshAuth as _0x3b77a6,runHostCommand as _0xecfd96,runLoginFlow as _0x2c7266}from'@uipath/delegate-sdk';var I={'alpha':'https://alpha.uipath.com','staging':_0x49cf1e(0x1dc),'production':_0x49cf1e(0x1da)},R=[_0x49cf1e(0x189),'models','host','logout',_0x49cf1e(0x1aa)];function O(_0x11ae69){const _0x5a12d1=_0x49cf1e;let _0xcc1db9={'subcommand':'','prompt':'','keepAlive':!0x1,'cleanup':!0x1,'headless':!0x1,'noConnections':!0x1,'noSecurity':!0x1,'quiet':!0x1,'preloadSkills':[],'help':!0x1,'version':!0x1};R[_0x5a12d1(0x202)](_0x11ae69[0x0])&&(_0xcc1db9[_0x5a12d1(0x200)]=_0x11ae69[0x0],_0x11ae69=_0x11ae69[_0x5a12d1(0x19c)](0x1));let _0x58036=[];for(let _0x585477=0x0;_0x585477<_0x11ae69[_0x5a12d1(0x1b3)];_0x585477++){let _0x3bcfc5=_0x11ae69[_0x585477];switch(_0x3bcfc5){case'--keep-alive':_0xcc1db9['keepAlive']=!0x0;break;case'--cleanup':_0xcc1db9[_0x5a12d1(0x1c4)]=!0x0;break;case'--headless':_0xcc1db9[_0x5a12d1(0x205)]=!0x0;break;case _0x5a12d1(0x1d8):_0xcc1db9[_0x5a12d1(0x18e)]=!0x0;break;case _0x5a12d1(0x1bb):_0xcc1db9['noSecurity']=!0x0;break;case _0x5a12d1(0x1f6):case'-q':_0xcc1db9[_0x5a12d1(0x1ef)]=!0x0;break;case _0x5a12d1(0x174):_0xcc1db9['backendUrl']=_0x11ae69[++_0x585477];break;case _0x5a12d1(0x1c8):_0xcc1db9[_0x5a12d1(0x1f8)]=_0x11ae69[++_0x585477];break;case _0x5a12d1(0x1db):_0xcc1db9[_0x5a12d1(0x1fb)]=_0x11ae69[++_0x585477];break;case _0x5a12d1(0x1ad):_0xcc1db9[_0x5a12d1(0x198)]=_0x11ae69[++_0x585477];break;case _0x5a12d1(0x184):_0xcc1db9[_0x5a12d1(0x188)]=_0x11ae69[++_0x585477];break;case _0x5a12d1(0x18d):{let _0x1784dd=_0x11ae69[++_0x585477];(!_0x1784dd||_0x1784dd[_0x5a12d1(0x19a)]('--'))&&(console['error']('--preload-skill\x20requires\x20a\x20skill\x20name.'),process[_0x5a12d1(0x1d9)](0x2)),_0xcc1db9[_0x5a12d1(0x1b6)]['push'](_0x1784dd);break;}case _0x5a12d1(0x1cb):{let _0x173105=_0x11ae69[++_0x585477];['alpha',_0x5a12d1(0x1e0),'production',_0x5a12d1(0x179)]['includes'](_0x173105)||(console[_0x5a12d1(0x1e8)](_0x5a12d1(0x1c2)+_0x173105+_0x5a12d1(0x187)),process[_0x5a12d1(0x1d9)](0x2)),_0xcc1db9[_0x5a12d1(0x1a2)]=_0x173105;break;}case'-h':case _0x5a12d1(0x1b9):_0xcc1db9[_0x5a12d1(0x1e5)]=!0x0;break;case'-v':case'--version':_0xcc1db9[_0x5a12d1(0x1eb)]=!0x0;break;default:_0x3bcfc5[_0x5a12d1(0x19a)]('--')&&(console[_0x5a12d1(0x1e8)]('Unknown\x20flag:\x20'+_0x3bcfc5),process[_0x5a12d1(0x1d9)](0x2)),_0x58036[_0x5a12d1(0x1f5)](_0x3bcfc5);}}return _0xcc1db9[_0x5a12d1(0x18c)]=_0x58036['join']('\x20'),_0xcc1db9;}function w(_0x35f98d,_0x30a305,_0x5292ca){const _0x9bfd70=_0x49cf1e;if(_0x5292ca)return _0x5292ca;if(process.env.BACKEND_URL)return process.env.BACKEND_URL;if(!_0x35f98d){if(_0x30a305?.[_0x9bfd70(0x1b5)]&&_0x30a305?.[_0x9bfd70(0x1a0)]&&_0x30a305?.[_0x9bfd70(0x182)])return _0x5e1b6b(_0x30a305['baseUrl'],_0x30a305[_0x9bfd70(0x1a0)],_0x30a305['tenantName']);throw new Error(_0x9bfd70(0x1d5));}if(_0x35f98d==='localhost')return'http://localhost:5002';let _0x149cb8=I[_0x35f98d],_0x22a746=_0x30a305?.[_0x9bfd70(0x1a0)],_0x2130ff=_0x30a305?.['tenantName'];if(!_0x22a746||!_0x2130ff)throw new Error(_0x9bfd70(0x175)+_0x35f98d+_0x9bfd70(0x1be)+_0x35f98d+_0x9bfd70(0x1af));return _0x5e1b6b(_0x149cb8,_0x22a746,_0x2130ff);}function C(){const _0xa524ef=_0x49cf1e;let _0x1a48a5=_0xa524ef(0x1ae)[_0xa524ef(0x1a5)]();console[_0xa524ef(0x1f3)](_0x1a48a5);}function P(){const _0x619a1d=_0x49cf1e;try{return JSON[_0x619a1d(0x1bd)](_0x3014ad[_0x619a1d(0x1fc)](_0x32396f[_0x619a1d(0x1bf)](__dirname,'..','package.json'),_0x619a1d(0x199)))[_0x619a1d(0x1eb)]||_0x619a1d(0x1d4);}catch{return'unknown';}}var $=0x7d0;async function m(_0x538507,_0x4a81a2){const _0x467213=_0x49cf1e;let _0x13567=_0x4a81a2?[_0x4a81a2]:[];for await(let _0x418d23 of _0x538507)_0x13567['push'](Buffer['from'](_0x418d23));return Buffer['concat'](_0x13567)['toString'](_0x467213(0x199))['trim']();}function x(_0xcf2b4a,_0x358343){return new Promise(_0x4ef1b6=>{const _0x2c6bab=_0x254e;let _0x29697f=_0x5ca3ee=>{const _0x3bd0a2=_0x254e;clearTimeout(_0x2d3c12),_0xcf2b4a['off'](_0x3bd0a2(0x17e),_0x403d80),_0xcf2b4a[_0x3bd0a2(0x1e7)](_0x3bd0a2(0x17c),_0x8d190f),_0xcf2b4a[_0x3bd0a2(0x1e7)](_0x3bd0a2(0x1e8),_0x8d190f),_0xcf2b4a[_0x3bd0a2(0x1ec)](),_0x4ef1b6(_0x5ca3ee);},_0x403d80=_0x547ca4=>_0x29697f(Buffer[_0x2c6bab(0x1f2)](_0x547ca4)),_0x8d190f=()=>_0x29697f(null),_0x2d3c12=setTimeout(()=>_0x29697f(null),_0x358343);_0xcf2b4a['on'](_0x2c6bab(0x17e),_0x403d80),_0xcf2b4a['on'](_0x2c6bab(0x17c),_0x8d190f),_0xcf2b4a['on'](_0x2c6bab(0x1e8),_0x8d190f),_0xcf2b4a[_0x2c6bab(0x17a)]();});}async function M(_0x481666,_0x2037bf,_0x389223=$){const _0x12b25f=_0x49cf1e;let _0xeb6396=_0x481666==='-';if(!_0xeb6396&&_0x481666)return _0x481666;if(!_0xeb6396&&_0x2037bf[_0x12b25f(0x1de)])return'';if(_0xeb6396)return m(_0x2037bf,null);let _0x46fd24=await x(_0x2037bf,_0x389223);return _0x46fd24?m(_0x2037bf,_0x46fd24):'';}function S(){const _0x19ecf0=_0x49cf1e;return _0x32396f[_0x19ecf0(0x1bf)](process.env.HOME||process.env.USERPROFILE||'',_0x19ecf0(0x206),_0x19ecf0(0x1e2));}function A(_0x49644a){const _0x52f5f1=_0x49cf1e;try{let _0x379ece=JSON['parse'](_0x3014ad[_0x52f5f1(0x1fc)](_0x49644a,_0x52f5f1(0x199)));return!_0x379ece[_0x52f5f1(0x1cf)]||!_0x379ece['tenantId']||!_0x379ece[_0x52f5f1(0x207)]?null:_0x379ece;}catch{return null;}}function y(){let _0x1cd725=[{'file':_0x4799a3(),'isDesktopFallback':!0x1},{'file':S(),'isDesktopFallback':!0x0}];for(let _0xff4ec4 of _0x1cd725){let _0xd25816=A(_0xff4ec4['file']);if(_0xd25816)return{..._0xff4ec4,'auth':_0xd25816};}return null;}async function B(){const _0xb69d4a=_0x49cf1e;let _0x1d74d1=_0x4799a3();if(!_0x3014ad['existsSync'](_0x1d74d1)){let _0x2df4f4=S();console['log'](A(_0x2df4f4)?_0xb69d4a(0x1b4)+_0x2df4f4+_0xb69d4a(0x1e1):_0xb69d4a(0x186));return;}_0x3014ad[_0xb69d4a(0x1b1)](_0x1d74d1),console[_0xb69d4a(0x1f3)]('Removed\x20'+_0x1d74d1);}function _0x55d1(){const _0x4a9212=['✓\x20Done\x0a','content','catch','keepAlive','--backend','--env\x20','\x0aUse\x20with:\x20delegate-cli\x20--model\x20<id>\x20\x22<prompt>\x22\x0a','SIGINT','file','localhost','resume','status','end','sendMessage','data','MODELS','lastType','No\x20models\x20available\x20for\x20this\x20product/tenant.\x0a','tenantName','273510yUMsef','--worker-id','3321038DQiSxH','No\x20CLI\x20login\x20found\x20—\x20nothing\x20to\x20remove.','.\x20Use\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost.','workerId','login','Missing\x20prompt.\x20Pass\x20it\x20as\x20an\x20argument,\x20pipe\x20it\x20via\x20stdin,\x20or\x20run\x20`delegate-cli\x20--help`.','finally','prompt','--preload-skill','noConnections','stdout','\x20(Delegate\x20desktop\x20app\x20fallback)','expiresAt','object','stop','tenantId','Base\x20URL:\x20\x20\x20\x20\x20','map','499384TLGYng','interopPath','utf-8','startsWith','write','slice','stderr','backendUrl','tool','orgLogicalName','isDesktopFallback','env','tool_call','435QBkVYE','trim','toolName','X-Uipath-Tenantid','isArray','floor','whoami','23905UvchQl','host','--interop','\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','`\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).','entries','rmSync','🔧\x20','length','No\x20CLI\x20login\x20found.\x20Note:\x20the\x20CLI\x20is\x20currently\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','baseUrl','preloadSkills','799f56b8-4aed-4a0f-8640-659dae4a9e0e','26008TMqnIj','--help','description','--no-security','\x0a🤔\x20','parse','\x20needs\x20org/tenant\x20slugs.\x20Either:\x0a\x20\x20-\x20run\x20`delegate-cli\x20login\x20--env\x20','join','type','):\x0a\x0a','Invalid\x20--env:\x20','2MIpiVE','cleanup','round','toISOString','Interop\x20stopped\x20(if\x20it\x20was\x20running).','--model','done','--env\x20localhost\x20has\x20no\x20OAuth\x20flow;\x20pick\x20alpha,\x20staging,\x20or\x20production.','--env','\x20→\x20','name','destroy','accessToken','\x0aStopping…\x20(Ctrl+C\x20again\x20to\x20force\x20exit)\x0a','11858587HLeVym',']\x20Backend\x20URL:\x20','GET\x20','unknown','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).','\x20\x20\x20\x20','argv','--no-connections','exit','https://cloud.uipath.com','--runner-url','https://staging.uipath.com','message','isTTY','6064432FApwJb','staging','\x20—\x20sign\x20out\x20in\x20the\x20Delegate\x20app\x20to\x20clear\x20that.','auth.json','Source:\x20\x20\x20\x20\x20\x20\x20','initialize','help','Tenant:\x20\x20\x20\x20\x20\x20\x20','off','error','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.','once','version','pause','16TubwaH','[saved\x20login]\x20Backend\x20URL:\x20','quiet','\x20(in\x20','onEvent','from','log','logout','push','--quiet','642jBsTvt','model','test','/v1/config','runnerUrl','readFileSync','10egMPgS','stdin','thinking','subcommand','Token:\x20\x20\x20\x20\x20\x20\x20\x20expired\x20','includes','12XnyvxJ','First\x20login\x20requires\x20--env.\x20Usage:\x20delegate-cli\x20login\x20--env\x20<alpha|staging|production>','headless','.aria','organizationId'];_0x55d1=function(){return _0x4a9212;};return _0x55d1();}async function F(){const _0x4c1b5d=_0x49cf1e;let _0xb7119d=E(),_0x44e835,_0x53bee0;if(_0xb7119d)_0x44e835=_0xb7119d,_0x53bee0='environment\x20variables\x20(AUTH_TOKEN/TENANT_ID/ORG_ID)';else{let _0x312840=y();if(!_0x312840)throw new Error(T);_0x44e835=_0x312840['auth'],_0x53bee0=_0x312840[_0x4c1b5d(0x1a1)]?_0x312840[_0x4c1b5d(0x178)]+_0x4c1b5d(0x190):_0x312840[_0x4c1b5d(0x178)];}let _0x5e7559=[_0x4c1b5d(0x1e3)+_0x53bee0,_0x4c1b5d(0x195)+(_0x44e835[_0x4c1b5d(0x1b5)]??_0x4c1b5d(0x1d4)),'Organization:\x20'+(_0x44e835[_0x4c1b5d(0x1a0)]??'unknown\x20slug')+'\x20('+_0x44e835['organizationId']+')',_0x4c1b5d(0x1e6)+(_0x44e835[_0x4c1b5d(0x182)]??'unknown\x20slug')+'\x20('+_0x44e835['tenantId']+')'];if(_0x44e835[_0x4c1b5d(0x191)]){let _0x3a31b3=_0x44e835[_0x4c1b5d(0x191)]-Math[_0x4c1b5d(0x1a9)](Date['now']()/0x3e8),_0x47bf06=new Date(_0x44e835['expiresAt']*0x3e8)[_0x4c1b5d(0x1c6)]();_0x5e7559[_0x4c1b5d(0x1f5)](_0x3a31b3>0x0?'Token:\x20\x20\x20\x20\x20\x20\x20\x20expires\x20'+_0x47bf06+_0x4c1b5d(0x1f0)+Math[_0x4c1b5d(0x1c5)](_0x3a31b3/0x3c)+'\x20min)':_0x4c1b5d(0x201)+_0x47bf06);}process[_0x4c1b5d(0x18f)][_0x4c1b5d(0x19b)](_0x5e7559[_0x4c1b5d(0x1bf)]('\x0a')+'\x0a');}var T=_0x49cf1e(0x1e9);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 _0x3f315d=E();if(_0x3f315d)return _0x3f315d;let _0x377b58=await _0x3b77a6();if(_0x377b58)return _0x377b58;throw new Error(T);}async function q(){const _0x4baaab=_0x49cf1e;await new _0x3e47ad()[_0x4baaab(0x193)]({'force':!0x0}),console[_0x4baaab(0x1f3)](_0x4baaab(0x1c7));}var G=_0x49cf1e(0x1b7);function N(_0xe0458d,_0x1059ef,_0x1adb23){const _0x6c3640=_0x49cf1e;_0xe0458d?process[_0x6c3640(0x19d)][_0x6c3640(0x19b)]('[env='+_0xe0458d+_0x6c3640(0x1d2)+_0x1adb23+'\x0a'):!_0x1059ef&&!process.env.BACKEND_URL&&process[_0x6c3640(0x19d)]['write'](_0x6c3640(0x1ee)+_0x1adb23+'\x0a');}async function j(_0x47d6cc){const _0x4e8f5a=_0x49cf1e;let _0x436ff4=await U(),_0x16ee4b=w(_0x47d6cc[_0x4e8f5a(0x1a2)],_0x436ff4,_0x47d6cc[_0x4e8f5a(0x19e)]);N(_0x47d6cc[_0x4e8f5a(0x1a2)],_0x47d6cc[_0x4e8f5a(0x19e)],_0x16ee4b);let _0x1d23c5=_0x16ee4b+_0x4e8f5a(0x1fa),_0x31fe74={'Authorization':'Bearer\x20'+_0x436ff4[_0x4e8f5a(0x1cf)],'X-UiPath-ConsumingProductId':G};_0x436ff4[_0x4e8f5a(0x194)]&&(_0x31fe74[_0x4e8f5a(0x1a7)]=_0x436ff4[_0x4e8f5a(0x194)]),_0x436ff4[_0x4e8f5a(0x207)]&&(_0x31fe74['X-Uipath-Organizationid']=_0x436ff4[_0x4e8f5a(0x207)]);let _0x9abbe0=await fetch(_0x1d23c5,{'headers':_0x31fe74});if(!_0x9abbe0['ok'])throw new Error(_0x4e8f5a(0x1d3)+_0x1d23c5+_0x4e8f5a(0x1cc)+_0x9abbe0[_0x4e8f5a(0x17b)]+'\x20'+_0x9abbe0['statusText']);let _0x24b463=(await _0x9abbe0['json']())?.[_0x4e8f5a(0x17f)],_0x45a9a9=Array[_0x4e8f5a(0x1a8)](_0x24b463)?_0x24b463:_0x24b463&&typeof _0x24b463==_0x4e8f5a(0x192)?Object[_0x4e8f5a(0x1b0)](_0x24b463)[_0x4e8f5a(0x196)](([_0x1db8a4,_0x1eac8d])=>({'id':_0x1db8a4,'name':_0x1eac8d})):[];if(_0x45a9a9['length']===0x0){process[_0x4e8f5a(0x19d)][_0x4e8f5a(0x19b)](_0x4e8f5a(0x181));return;}process[_0x4e8f5a(0x18f)][_0x4e8f5a(0x19b)]('\x0aAvailable\x20models\x20('+_0x45a9a9[_0x4e8f5a(0x1b3)]+_0x4e8f5a(0x1c1));for(let _0x3dd9ab of _0x45a9a9){let _0x40d4e2=_0x3dd9ab['name']&&_0x3dd9ab[_0x4e8f5a(0x1cd)]!==_0x3dd9ab['id']?'\x20('+_0x3dd9ab[_0x4e8f5a(0x1cd)]+')':'';process[_0x4e8f5a(0x18f)][_0x4e8f5a(0x19b)]('\x20\x20'+_0x3dd9ab['id']+_0x40d4e2+'\x0a'),_0x3dd9ab['description']&&process[_0x4e8f5a(0x18f)][_0x4e8f5a(0x19b)](_0x4e8f5a(0x1d6)+_0x3dd9ab[_0x4e8f5a(0x1ba)]+'\x0a');}process['stdout'][_0x4e8f5a(0x19b)](_0x4e8f5a(0x176));}async function z(_0x355f9d){const _0x2c76f8=_0x49cf1e;if(_0x355f9d['env']===_0x2c76f8(0x179)&&(console[_0x2c76f8(0x1e8)](_0x2c76f8(0x1ca)),process['exit'](0x2)),_0x355f9d[_0x2c76f8(0x1a2)]){await _0x2c7266({'env':_0x355f9d[_0x2c76f8(0x1a2)]});return;}let _0x21f778=y();if(_0x21f778?.['auth']['baseUrl']){await _0x2c7266({'baseUrl':_0x21f778['auth'][_0x2c76f8(0x1b5)]});return;}console[_0x2c76f8(0x1e8)](_0x2c76f8(0x204)),process['exit'](0x2);}function K(_0x137a06){const _0x1f2120=_0x49cf1e;return _0x137a06?.['response']?.['status']===0x191||/401/['test'](String(_0x137a06?.[_0x1f2120(0x1dd)]??''));}var a={'lastType':null,'quiet':!0x1},k=_0x121839=>{const _0x5b5057=_0x49cf1e;switch(_0x121839[_0x5b5057(0x1c0)]){case _0x5b5057(0x1ff):_0x121839[_0x5b5057(0x209)]&&!a[_0x5b5057(0x1ef)]&&(a['lastType']!==_0x5b5057(0x1ff)&&process[_0x5b5057(0x19d)][_0x5b5057(0x19b)](_0x5b5057(0x1bc)),process['stderr']['write'](_0x121839[_0x5b5057(0x209)]),a[_0x5b5057(0x180)]=_0x5b5057(0x1ff));break;case _0x5b5057(0x1a3):a['lastType']!==null&&process[_0x5b5057(0x19d)]['write']('\x0a'),process[_0x5b5057(0x19d)][_0x5b5057(0x19b)](_0x5b5057(0x1b2)+(_0x121839[_0x5b5057(0x1a6)]??_0x5b5057(0x19f))+'\x0a'),a[_0x5b5057(0x180)]=_0x5b5057(0x1a3);break;case _0x5b5057(0x1dd):_0x121839[_0x5b5057(0x209)]&&(a[_0x5b5057(0x180)]!==_0x5b5057(0x1dd)&&a[_0x5b5057(0x180)]!==null&&process['stdout']['write']('\x0a'),process[_0x5b5057(0x18f)][_0x5b5057(0x19b)](_0x121839['content']),a[_0x5b5057(0x180)]='message');break;case _0x5b5057(0x1e8):a['lastType']!==null&&process[_0x5b5057(0x19d)][_0x5b5057(0x19b)]('\x0a'),process[_0x5b5057(0x19d)][_0x5b5057(0x19b)]('✗\x20'+(_0x121839['error']??_0x121839[_0x5b5057(0x1dd)]??_0x5b5057(0x1e8))+'\x0a'),a['lastType']='error';break;case _0x5b5057(0x1c9):(a[_0x5b5057(0x180)]==='message'||a[_0x5b5057(0x180)]===_0x5b5057(0x1ff))&&process['stdout'][_0x5b5057(0x19b)]('\x0a'),process[_0x5b5057(0x19d)][_0x5b5057(0x19b)](_0x5b5057(0x208)),a[_0x5b5057(0x180)]=_0x5b5057(0x1c9);break;}};function _0x254e(_0x5ad5f5,_0x2165c2){_0x5ad5f5=_0x5ad5f5-0x172;const _0x55d133=_0x55d1();let _0x254e27=_0x55d133[_0x5ad5f5];return _0x254e27;}async function H(_0x57f281){const _0x3774a6=_0x49cf1e;let _0x486f84=await M(_0x57f281[_0x3774a6(0x18c)],process[_0x3774a6(0x1fe)]);_0x486f84||(console[_0x3774a6(0x1e8)](_0x3774a6(0x18a)),process['exit'](0x2)),a[_0x3774a6(0x1ef)]=_0x57f281[_0x3774a6(0x1ef)];let _0x5107cf=await U(),_0xaff493=new _0x1cd5bb();_0xaff493[_0x3774a6(0x1f1)](k);let _0x4916a4=w(_0x57f281['env'],_0x5107cf,_0x57f281[_0x3774a6(0x19e)]);N(_0x57f281['env'],_0x57f281[_0x3774a6(0x19e)],_0x4916a4);let _0x4a0e3f={'backendUrl':_0x4916a4,'auth':_0x5107cf,'enableComputerUse':!_0x57f281['headless'],'autoSpawnInterop':!_0x57f281['headless'],'enableConnections':!_0x57f281[_0x3774a6(0x18e)],'enableSecurity':!_0x57f281['noSecurity'],'keepInteropAlive':_0x57f281[_0x3774a6(0x173)],..._0x57f281[_0x3774a6(0x1b6)][_0x3774a6(0x1b3)]>0x0?{'preloadSkills':_0x57f281[_0x3774a6(0x1b6)]}:{},..._0x57f281[_0x3774a6(0x1f8)]||process.env.MODEL?{'model':_0x57f281['model']||process.env.MODEL}:{}},_0xf42d40=!0x1,_0x16f1d0=!0x1,_0x8dd9c9=()=>{const _0x4990de=_0x3774a6;_0x16f1d0&&process[_0x4990de(0x1d9)](0x82),_0x16f1d0=!0x0,process[_0x4990de(0x19d)][_0x4990de(0x19b)](_0x4990de(0x1d0)),_0xf42d40?_0xaff493[_0x4990de(0x1ce)]()[_0x4990de(0x18b)](()=>process['exit'](0x82)):process[_0x4990de(0x1d9)](0x82);};process[_0x3774a6(0x1ea)](_0x3774a6(0x177),_0x8dd9c9),await _0xaff493[_0x3774a6(0x1e4)](_0x4a0e3f),_0xf42d40=!0x0;try{await _0xaff493['sendMessage'](_0x486f84);}catch(_0x38745f){if(K(_0x38745f)&&process[_0x3774a6(0x1fe)]['isTTY']&&_0x57f281[_0x3774a6(0x1a2)]!=='localhost'&&(_0x57f281['env']||_0x5107cf[_0x3774a6(0x1b5)])){process[_0x3774a6(0x19d)][_0x3774a6(0x19b)]('\x0a⚠️\x20\x20Auth\x20expired.\x20Opening\x20browser\x20to\x20re-login…\x0a');let _0x3510a6=await _0x2c7266(_0x57f281[_0x3774a6(0x1a2)]?{'env':_0x57f281[_0x3774a6(0x1a2)]}:{'baseUrl':_0x5107cf[_0x3774a6(0x1b5)]});await _0xaff493[_0x3774a6(0x1ce)](),_0xaff493=new _0x1cd5bb(),_0xaff493[_0x3774a6(0x1f1)](k),await _0xaff493[_0x3774a6(0x1e4)]({..._0x4a0e3f,'auth':_0x3510a6}),await _0xaff493[_0x3774a6(0x17d)](_0x486f84);}else throw _0x38745f;}finally{process[_0x3774a6(0x1e7)](_0x3774a6(0x177),_0x8dd9c9),await _0xaff493[_0x3774a6(0x1ce)]();}}async function W(){const _0x120557=_0x49cf1e;let _0xe8c8f9=O(process[_0x120557(0x1d7)][_0x120557(0x19c)](0x2));if(_0xe8c8f9[_0x120557(0x1e5)]){C();return;}if(_0xe8c8f9['version']){console['log'](P());return;}if(_0xe8c8f9[_0x120557(0x200)]===_0x120557(0x189)){await z(_0xe8c8f9);return;}if(_0xe8c8f9[_0x120557(0x200)]===_0x120557(0x1f4)){await B();return;}if(_0xe8c8f9['subcommand']===_0x120557(0x1aa)){await F();return;}if(_0xe8c8f9[_0x120557(0x200)]==='models'){await j(_0xe8c8f9);return;}if(_0xe8c8f9['subcommand']===_0x120557(0x1ac)){await _0xecfd96(_0xe8c8f9[_0x120557(0x18c)],{'runnerUrl':_0xe8c8f9['runnerUrl'],'backendUrl':_0xe8c8f9[_0x120557(0x19e)],'interopPath':_0xe8c8f9[_0x120557(0x198)],'workerId':_0xe8c8f9[_0x120557(0x188)]});return;}if(_0xe8c8f9[_0x120557(0x1c4)]){await q();return;}await H(_0xe8c8f9);}var J=process.env.NODE_ENV===_0x49cf1e(0x1f9)||!!process.env.JEST_WORKER_ID;J||W()[_0x49cf1e(0x172)](_0x12b5b9=>{const _0x17b691=_0x49cf1e;console[_0x17b691(0x1e8)](_0x12b5b9['stack']||_0x12b5b9['message']||_0x12b5b9),process[_0x17b691(0x1d9)](0x1);});export{$ as IMPLICIT_STDIN_IDLE_MS,W as main,O as parseArgs,P as readCliVersion,M as resolvePrompt};
2
+ const _0x2f0b42=_0x52d9;(function(_0x1ad841,_0x979da7){const _0x145c7a=_0x52d9,_0x76ed51=_0x1ad841();while(!![]){try{const _0x87d2fc=-parseInt(_0x145c7a(0x229))/0x1+parseInt(_0x145c7a(0x1c0))/0x2+-parseInt(_0x145c7a(0x1e4))/0x3+-parseInt(_0x145c7a(0x1ca))/0x4*(-parseInt(_0x145c7a(0x236))/0x5)+-parseInt(_0x145c7a(0x1f9))/0x6*(-parseInt(_0x145c7a(0x1f6))/0x7)+-parseInt(_0x145c7a(0x215))/0x8+-parseInt(_0x145c7a(0x1ec))/0x9*(-parseInt(_0x145c7a(0x1d9))/0xa);if(_0x87d2fc===_0x979da7)break;else _0x76ed51['push'](_0x76ed51['shift']());}catch(_0x3da134){_0x76ed51['push'](_0x76ed51['shift']());}}}(_0x4c16,0xbf9a0));const __dirname=import.meta.dirname;import _0x19202a from'fs';import _0x33fcfd from'path';import{DelegateAgent as _0x2bb8b8,InteropProcess as _0x3c4eec,buildDelegateServiceUrl as _0x52483c,getAuthFilePath as _0x556aeb,loadAndRefreshAuth as _0x191ceb,runHostCommand as _0x562e79,runLoginFlow as _0x2ee80d}from'@uipath/delegate-sdk';var I={'alpha':_0x2f0b42(0x211),'staging':'https://staging.uipath.com','production':_0x2f0b42(0x213)},R=['login',_0x2f0b42(0x24f),_0x2f0b42(0x230),_0x2f0b42(0x217),_0x2f0b42(0x203)];function O(_0x523f15){const _0x26c0aa=_0x2f0b42;let _0x34e719={'subcommand':'','prompt':'','keepAlive':!0x1,'cleanup':!0x1,'headless':!0x1,'noConnections':!0x1,'noSecurity':!0x1,'quiet':!0x1,'preloadSkills':[],'help':!0x1,'version':!0x1};R[_0x26c0aa(0x24b)](_0x523f15[0x0])&&(_0x34e719[_0x26c0aa(0x1fd)]=_0x523f15[0x0],_0x523f15=_0x523f15[_0x26c0aa(0x207)](0x1));let _0x3caa2a=[];for(let _0x2d784b=0x0;_0x2d784b<_0x523f15[_0x26c0aa(0x204)];_0x2d784b++){let _0x5c4b3f=_0x523f15[_0x2d784b];switch(_0x5c4b3f){case'--keep-alive':_0x34e719[_0x26c0aa(0x1e8)]=!0x0;break;case'--cleanup':_0x34e719[_0x26c0aa(0x22d)]=!0x0;break;case'--headless':_0x34e719[_0x26c0aa(0x1de)]=!0x0;break;case _0x26c0aa(0x237):_0x34e719[_0x26c0aa(0x228)]=!0x0;break;case _0x26c0aa(0x205):_0x34e719[_0x26c0aa(0x242)]=!0x0;break;case _0x26c0aa(0x233):case'-q':_0x34e719[_0x26c0aa(0x21e)]=!0x0;break;case'--backend':_0x34e719[_0x26c0aa(0x247)]=_0x523f15[++_0x2d784b];break;case _0x26c0aa(0x202):_0x34e719[_0x26c0aa(0x20d)]=_0x523f15[++_0x2d784b];break;case'--runner-url':_0x34e719[_0x26c0aa(0x235)]=_0x523f15[++_0x2d784b];break;case _0x26c0aa(0x21d):_0x34e719[_0x26c0aa(0x1f1)]=_0x523f15[++_0x2d784b];break;case'--worker-id':_0x34e719[_0x26c0aa(0x1c2)]=_0x523f15[++_0x2d784b];break;case'--preload-skill':{let _0x1d6d05=_0x523f15[++_0x2d784b];(!_0x1d6d05||_0x1d6d05['startsWith']('--'))&&(console['error'](_0x26c0aa(0x1bc)),process[_0x26c0aa(0x1ef)](0x2)),_0x34e719[_0x26c0aa(0x1d2)][_0x26c0aa(0x206)](_0x1d6d05);break;}case _0x26c0aa(0x218):{let _0x2d699b=_0x523f15[++_0x2d784b];['alpha',_0x26c0aa(0x20e),_0x26c0aa(0x1c5),_0x26c0aa(0x1e1)]['includes'](_0x2d699b)||(console[_0x26c0aa(0x212)]('Invalid\x20--env:\x20'+_0x2d699b+_0x26c0aa(0x249)),process[_0x26c0aa(0x1ef)](0x2)),_0x34e719['env']=_0x2d699b;break;}case'-h':case _0x26c0aa(0x1da):_0x34e719[_0x26c0aa(0x24c)]=!0x0;break;case'-v':case'--version':_0x34e719[_0x26c0aa(0x1e5)]=!0x0;break;default:_0x5c4b3f[_0x26c0aa(0x1c3)]('--')&&(console[_0x26c0aa(0x212)](_0x26c0aa(0x20f)+_0x5c4b3f),process[_0x26c0aa(0x1ef)](0x2)),_0x3caa2a[_0x26c0aa(0x206)](_0x5c4b3f);}}return _0x34e719[_0x26c0aa(0x22e)]=_0x3caa2a[_0x26c0aa(0x22b)]('\x20'),_0x34e719;}function w(_0x1000c6,_0x174fff,_0x457515){const _0xfce530=_0x2f0b42;if(_0x457515)return _0x457515;if(process.env.BACKEND_URL)return process.env.BACKEND_URL;if(!_0x1000c6){if(_0x174fff?.[_0xfce530(0x1ed)]&&_0x174fff?.[_0xfce530(0x1d0)]&&_0x174fff?.[_0xfce530(0x1cc)])return _0x52483c(_0x174fff[_0xfce530(0x1ed)],_0x174fff[_0xfce530(0x1d0)],_0x174fff[_0xfce530(0x1cc)]);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(_0x1000c6==='localhost')return _0xfce530(0x1db);let _0x113a7a=I[_0x1000c6],_0x3aec1c=_0x174fff?.['orgLogicalName'],_0x8d426=_0x174fff?.[_0xfce530(0x1cc)];if(!_0x3aec1c||!_0x8d426)throw new Error('--env\x20'+_0x1000c6+'\x20needs\x20org/tenant\x20slugs.\x20Either:\x0a\x20\x20-\x20run\x20`delegate-cli\x20login\x20--env\x20'+_0x1000c6+_0xfce530(0x22f));return _0x52483c(_0x113a7a,_0x3aec1c,_0x8d426);}function C(){const _0x3a7767=_0x2f0b42;let _0x5f057d='\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'[_0x3a7767(0x1e6)]();console[_0x3a7767(0x227)](_0x5f057d);}function P(){const _0x5794b0=_0x2f0b42;try{return JSON[_0x5794b0(0x1bd)](_0x19202a[_0x5794b0(0x1cf)](_0x33fcfd[_0x5794b0(0x22b)](__dirname,'..','package.json'),_0x5794b0(0x1c1)))['version']||_0x5794b0(0x224);}catch{return _0x5794b0(0x224);}}var $=0x7d0;async function m(_0xced5a0,_0x26ef51){const _0x1b54a2=_0x2f0b42;let _0x2b29e7=_0x26ef51?[_0x26ef51]:[];for await(let _0x4f61e0 of _0xced5a0)_0x2b29e7[_0x1b54a2(0x206)](Buffer[_0x1b54a2(0x241)](_0x4f61e0));return Buffer[_0x1b54a2(0x1d3)](_0x2b29e7)[_0x1b54a2(0x214)](_0x1b54a2(0x1c1))[_0x1b54a2(0x1e6)]();}function x(_0x206a2c,_0x1bfb9f){return new Promise(_0xad8ab6=>{const _0x402d4c=_0x52d9;let _0x2a366d=_0x31e8c1=>{const _0xabc40=_0x52d9;clearTimeout(_0x2f6f26),_0x206a2c[_0xabc40(0x1f4)](_0xabc40(0x1dd),_0xc1436b),_0x206a2c['off'](_0xabc40(0x201),_0x5921ac),_0x206a2c['off'](_0xabc40(0x212),_0x5921ac),_0x206a2c[_0xabc40(0x1fc)](),_0xad8ab6(_0x31e8c1);},_0xc1436b=_0x149695=>_0x2a366d(Buffer[_0x402d4c(0x241)](_0x149695)),_0x5921ac=()=>_0x2a366d(null),_0x2f6f26=setTimeout(()=>_0x2a366d(null),_0x1bfb9f);_0x206a2c['on'](_0x402d4c(0x1dd),_0xc1436b),_0x206a2c['on'](_0x402d4c(0x201),_0x5921ac),_0x206a2c['on'](_0x402d4c(0x212),_0x5921ac),_0x206a2c[_0x402d4c(0x1f2)]();});}async function M(_0x37fe59,_0x538bf6,_0x1be6af=$){let _0x24b923=_0x37fe59==='-';if(!_0x24b923&&_0x37fe59)return _0x37fe59;if(!_0x24b923&&_0x538bf6['isTTY'])return'';if(_0x24b923)return m(_0x538bf6,null);let _0x37feae=await x(_0x538bf6,_0x1be6af);return _0x37feae?m(_0x538bf6,_0x37feae):'';}function S(){const _0x293780=_0x2f0b42;return _0x33fcfd['join'](process.env.HOME||process.env.USERPROFILE||'',_0x293780(0x200),'auth.json');}function A(_0x211b6a){const _0x8718be=_0x2f0b42;try{let _0x3364d9=JSON['parse'](_0x19202a[_0x8718be(0x1cf)](_0x211b6a,'utf-8'));return!_0x3364d9[_0x8718be(0x1c8)]||!_0x3364d9[_0x8718be(0x1e9)]||!_0x3364d9[_0x8718be(0x23b)]?null:_0x3364d9;}catch{return null;}}function y(){const _0x441bb9=_0x2f0b42;let _0x44b04c=[{'file':_0x556aeb(),'isDesktopFallback':!0x1},{'file':S(),'isDesktopFallback':!0x0}];for(let _0x2ae511 of _0x44b04c){let _0x353a77=A(_0x2ae511[_0x441bb9(0x24e)]);if(_0x353a77)return{..._0x2ae511,'auth':_0x353a77};}return null;}async function B(){const _0x4f7266=_0x2f0b42;let _0x46466b=_0x556aeb();if(!_0x19202a[_0x4f7266(0x1bf)](_0x46466b)){let _0x5988b2=S();console['log'](A(_0x5988b2)?_0x4f7266(0x20b)+_0x5988b2+'\x20—\x20sign\x20out\x20in\x20the\x20Delegate\x20app\x20to\x20clear\x20that.':_0x4f7266(0x1d5));return;}_0x19202a[_0x4f7266(0x1c6)](_0x46466b),console[_0x4f7266(0x227)](_0x4f7266(0x1cd)+_0x46466b);}async function F(){const _0x31fbb9=_0x2f0b42;let _0x57ec12=E(),_0x329faf,_0x2173b8;if(_0x57ec12)_0x329faf=_0x57ec12,_0x2173b8=_0x31fbb9(0x234);else{let _0x289c33=y();if(!_0x289c33)throw new Error(T);_0x329faf=_0x289c33[_0x31fbb9(0x1dc)],_0x2173b8=_0x289c33[_0x31fbb9(0x210)]?_0x289c33[_0x31fbb9(0x24e)]+_0x31fbb9(0x1eb):_0x289c33[_0x31fbb9(0x24e)];}let _0x2a2266=['Source:\x20\x20\x20\x20\x20\x20\x20'+_0x2173b8,_0x31fbb9(0x21f)+(_0x329faf[_0x31fbb9(0x1ed)]??'unknown'),_0x31fbb9(0x1d1)+(_0x329faf[_0x31fbb9(0x1d0)]??_0x31fbb9(0x23a))+'\x20('+_0x329faf[_0x31fbb9(0x23b)]+')',_0x31fbb9(0x1ee)+(_0x329faf['tenantName']??_0x31fbb9(0x23a))+'\x20('+_0x329faf[_0x31fbb9(0x1e9)]+')'];if(_0x329faf[_0x31fbb9(0x231)]){let _0x20b23f=_0x329faf[_0x31fbb9(0x231)]-Math[_0x31fbb9(0x243)](Date[_0x31fbb9(0x1ff)]()/0x3e8),_0x5484ae=new Date(_0x329faf['expiresAt']*0x3e8)[_0x31fbb9(0x1f3)]();_0x2a2266[_0x31fbb9(0x206)](_0x20b23f>0x0?_0x31fbb9(0x1f8)+_0x5484ae+_0x31fbb9(0x1d8)+Math[_0x31fbb9(0x23c)](_0x20b23f/0x3c)+_0x31fbb9(0x245):_0x31fbb9(0x20a)+_0x5484ae);}process[_0x31fbb9(0x1f7)][_0x31fbb9(0x1df)](_0x2a2266[_0x31fbb9(0x22b)]('\x0a')+'\x0a');}var T=_0x2f0b42(0x220);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;}function _0x52d9(_0x3a2fd2,_0x10f17f){_0x3a2fd2=_0x3a2fd2-0x1bc;const _0x4c1636=_0x4c16();let _0x52d9e1=_0x4c1636[_0x3a2fd2];return _0x52d9e1;}async function U(){let _0x46b00e=E();if(_0x46b00e)return _0x46b00e;let _0x5aac32=await _0x191ceb();if(_0x5aac32)return _0x5aac32;throw new Error(T);}async function q(){const _0x1823c7=_0x2f0b42;await new _0x3c4eec()[_0x1823c7(0x1d4)]({'force':!0x0}),console[_0x1823c7(0x227)](_0x1823c7(0x1fe));}var G=_0x2f0b42(0x1d6);function N(_0x30a260,_0x1fcfec,_0x166e3e){const _0x40d736=_0x2f0b42;_0x30a260?process[_0x40d736(0x1d7)]['write']('[env='+_0x30a260+_0x40d736(0x1ea)+_0x166e3e+'\x0a'):!_0x1fcfec&&!process.env.BACKEND_URL&&process['stderr'][_0x40d736(0x1df)](_0x40d736(0x24a)+_0x166e3e+'\x0a');}function _0x4c16(){const _0x3515d9=['object','accessToken','thinking','159848UgGlig','sendMessage','tenantName','Removed\x20','SIGINT','readFileSync','orgLogicalName','Organization:\x20','preloadSkills','concat','stop','No\x20CLI\x20login\x20found\x20—\x20nothing\x20to\x20remove.','799f56b8-4aed-4a0f-8640-659dae4a9e0e','stderr','\x20(in\x20','8920910nlCySk','--help','http://localhost:5002','auth','data','headless','write','✓\x20Done\x0a','localhost','entries','--env\x20localhost\x20has\x20no\x20OAuth\x20flow;\x20pick\x20alpha,\x20staging,\x20or\x20production.','4051956yImnNe','version','trim','name','keepAlive','tenantId',']\x20Backend\x20URL:\x20','\x20(Delegate\x20desktop\x20app\x20fallback)','9gHAFxr','baseUrl','Tenant:\x20\x20\x20\x20\x20\x20\x20','exit','env','interopPath','resume','toISOString','off','onEvent','26292qGZLIX','stdout','Token:\x20\x20\x20\x20\x20\x20\x20\x20expires\x20','774tbQDBp','tool','message','pause','subcommand','Interop\x20stopped\x20(if\x20it\x20was\x20running).','now','.aria','end','--model','whoami','length','--no-security','push','slice','\x0a⚠️\x20\x20Auth\x20expired.\x20Opening\x20browser\x20to\x20re-login…\x0a','toolName','Token:\x20\x20\x20\x20\x20\x20\x20\x20expired\x20','No\x20CLI\x20login\x20found.\x20Note:\x20the\x20CLI\x20is\x20currently\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','type','model','staging','Unknown\x20flag:\x20','isDesktopFallback','https://alpha.uipath.com','error','https://cloud.uipath.com','toString','210944MdRraE','catch','logout','--env','response','initialize','test','/v1/config','--interop','quiet','Base\x20URL:\x20\x20\x20\x20\x20','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.','isArray','GET\x20','isTTY','unknown','description','MODELS','log','noConnections','801752xzyJGn','\x0aStopping…\x20(Ctrl+C\x20again\x20to\x20force\x20exit)\x0a','join','content','cleanup','prompt','`\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).','host','expiresAt','done','--quiet','environment\x20variables\x20(AUTH_TOKEN/TENANT_ID/ORG_ID)','runnerUrl','40pZjGbA','--no-connections','lastType','stdin','unknown\x20slug','organizationId','round','X-Uipath-Tenantid','\x20\x20\x20\x20','\x20→\x20','map','from','noSecurity','floor','\x0aUse\x20with:\x20delegate-cli\x20--model\x20<id>\x20\x22<prompt>\x22\x0a','\x20min)','status','backendUrl','login','.\x20Use\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost.','[saved\x20login]\x20Backend\x20URL:\x20','includes','help','tool_call','file','models','No\x20models\x20available\x20for\x20this\x20product/tenant.\x0a','--preload-skill\x20requires\x20a\x20skill\x20name.','parse','destroy','existsSync','2534522EexutM','utf-8','workerId','startsWith','finally','production','rmSync'];_0x4c16=function(){return _0x3515d9;};return _0x4c16();}async function j(_0x4b86da){const _0x4ffdf3=_0x2f0b42;let _0x533ba2=await U(),_0x1ba0a9=w(_0x4b86da['env'],_0x533ba2,_0x4b86da['backendUrl']);N(_0x4b86da['env'],_0x4b86da['backendUrl'],_0x1ba0a9);let _0xd065be=_0x1ba0a9+_0x4ffdf3(0x21c),_0x565de1={'Authorization':'Bearer\x20'+_0x533ba2[_0x4ffdf3(0x1c8)],'X-UiPath-ConsumingProductId':G};_0x533ba2[_0x4ffdf3(0x1e9)]&&(_0x565de1[_0x4ffdf3(0x23d)]=_0x533ba2[_0x4ffdf3(0x1e9)]),_0x533ba2[_0x4ffdf3(0x23b)]&&(_0x565de1['X-Uipath-Organizationid']=_0x533ba2[_0x4ffdf3(0x23b)]);let _0x5aab0e=await fetch(_0xd065be,{'headers':_0x565de1});if(!_0x5aab0e['ok'])throw new Error(_0x4ffdf3(0x222)+_0xd065be+_0x4ffdf3(0x23f)+_0x5aab0e[_0x4ffdf3(0x246)]+'\x20'+_0x5aab0e['statusText']);let _0x15c983=(await _0x5aab0e['json']())?.[_0x4ffdf3(0x226)],_0x2fe9c8=Array[_0x4ffdf3(0x221)](_0x15c983)?_0x15c983:_0x15c983&&typeof _0x15c983==_0x4ffdf3(0x1c7)?Object[_0x4ffdf3(0x1e2)](_0x15c983)[_0x4ffdf3(0x240)](([_0x211377,_0x383194])=>({'id':_0x211377,'name':_0x383194})):[];if(_0x2fe9c8[_0x4ffdf3(0x204)]===0x0){process[_0x4ffdf3(0x1d7)]['write'](_0x4ffdf3(0x250));return;}process[_0x4ffdf3(0x1f7)]['write']('\x0aAvailable\x20models\x20('+_0x2fe9c8[_0x4ffdf3(0x204)]+'):\x0a\x0a');for(let _0x56ee22 of _0x2fe9c8){let _0x55e57=_0x56ee22[_0x4ffdf3(0x1e7)]&&_0x56ee22['name']!==_0x56ee22['id']?'\x20('+_0x56ee22[_0x4ffdf3(0x1e7)]+')':'';process['stdout'][_0x4ffdf3(0x1df)]('\x20\x20'+_0x56ee22['id']+_0x55e57+'\x0a'),_0x56ee22[_0x4ffdf3(0x225)]&&process['stdout'][_0x4ffdf3(0x1df)](_0x4ffdf3(0x23e)+_0x56ee22['description']+'\x0a');}process[_0x4ffdf3(0x1f7)][_0x4ffdf3(0x1df)](_0x4ffdf3(0x244));}async function z(_0x2e0471){const _0x2c51b3=_0x2f0b42;if(_0x2e0471[_0x2c51b3(0x1f0)]==='localhost'&&(console[_0x2c51b3(0x212)](_0x2c51b3(0x1e3)),process[_0x2c51b3(0x1ef)](0x2)),_0x2e0471[_0x2c51b3(0x1f0)]){await _0x2ee80d({'env':_0x2e0471[_0x2c51b3(0x1f0)]});return;}let _0x1ae881=y();if(_0x1ae881?.[_0x2c51b3(0x1dc)][_0x2c51b3(0x1ed)]){await _0x2ee80d({'baseUrl':_0x1ae881[_0x2c51b3(0x1dc)][_0x2c51b3(0x1ed)]});return;}console[_0x2c51b3(0x212)]('First\x20login\x20requires\x20--env.\x20Usage:\x20delegate-cli\x20login\x20--env\x20<alpha|staging|production>'),process[_0x2c51b3(0x1ef)](0x2);}function K(_0x682db7){const _0x5e9449=_0x2f0b42;return _0x682db7?.[_0x5e9449(0x219)]?.[_0x5e9449(0x246)]===0x191||/401/[_0x5e9449(0x21b)](String(_0x682db7?.[_0x5e9449(0x1fb)]??''));}var a={'lastType':null,'quiet':!0x1},k=_0x22511c=>{const _0x1e9334=_0x2f0b42;switch(_0x22511c[_0x1e9334(0x20c)]){case'thinking':_0x22511c[_0x1e9334(0x22c)]&&!a['quiet']&&(a[_0x1e9334(0x238)]!==_0x1e9334(0x1c9)&&process[_0x1e9334(0x1d7)]['write']('\x0a🤔\x20'),process[_0x1e9334(0x1d7)][_0x1e9334(0x1df)](_0x22511c[_0x1e9334(0x22c)]),a[_0x1e9334(0x238)]=_0x1e9334(0x1c9));break;case'tool_call':a[_0x1e9334(0x238)]!==null&&process[_0x1e9334(0x1d7)][_0x1e9334(0x1df)]('\x0a'),process['stderr'][_0x1e9334(0x1df)]('🔧\x20'+(_0x22511c[_0x1e9334(0x209)]??_0x1e9334(0x1fa))+'\x0a'),a[_0x1e9334(0x238)]=_0x1e9334(0x24d);break;case'message':_0x22511c[_0x1e9334(0x22c)]&&(a['lastType']!==_0x1e9334(0x1fb)&&a[_0x1e9334(0x238)]!==null&&process[_0x1e9334(0x1f7)]['write']('\x0a'),process['stdout'][_0x1e9334(0x1df)](_0x22511c['content']),a['lastType']=_0x1e9334(0x1fb));break;case'error':a[_0x1e9334(0x238)]!==null&&process[_0x1e9334(0x1d7)]['write']('\x0a'),process[_0x1e9334(0x1d7)][_0x1e9334(0x1df)]('✗\x20'+(_0x22511c[_0x1e9334(0x212)]??_0x22511c['message']??_0x1e9334(0x212))+'\x0a'),a[_0x1e9334(0x238)]=_0x1e9334(0x212);break;case _0x1e9334(0x232):(a[_0x1e9334(0x238)]===_0x1e9334(0x1fb)||a[_0x1e9334(0x238)]===_0x1e9334(0x1c9))&&process['stdout'][_0x1e9334(0x1df)]('\x0a'),process['stderr'][_0x1e9334(0x1df)](_0x1e9334(0x1e0)),a[_0x1e9334(0x238)]=_0x1e9334(0x232);break;}};async function H(_0x982cc){const _0x1ca080=_0x2f0b42;let _0x3a9809=await M(_0x982cc[_0x1ca080(0x22e)],process[_0x1ca080(0x239)]);_0x3a9809||(console['error']('Missing\x20prompt.\x20Pass\x20it\x20as\x20an\x20argument,\x20pipe\x20it\x20via\x20stdin,\x20or\x20run\x20`delegate-cli\x20--help`.'),process[_0x1ca080(0x1ef)](0x2)),a[_0x1ca080(0x21e)]=_0x982cc[_0x1ca080(0x21e)];let _0x5e2784=await U(),_0x16cbbe=new _0x2bb8b8();_0x16cbbe[_0x1ca080(0x1f5)](k);let _0x5d9431=w(_0x982cc[_0x1ca080(0x1f0)],_0x5e2784,_0x982cc[_0x1ca080(0x247)]);N(_0x982cc[_0x1ca080(0x1f0)],_0x982cc[_0x1ca080(0x247)],_0x5d9431);let _0x5b450e={'backendUrl':_0x5d9431,'auth':_0x5e2784,'enableComputerUse':!_0x982cc[_0x1ca080(0x1de)],'autoSpawnInterop':!_0x982cc[_0x1ca080(0x1de)],'enableConnections':!_0x982cc[_0x1ca080(0x228)],'enableSecurity':!_0x982cc[_0x1ca080(0x242)],'keepInteropAlive':_0x982cc[_0x1ca080(0x1e8)],..._0x982cc['preloadSkills']['length']>0x0?{'preloadSkills':_0x982cc['preloadSkills']}:{},..._0x982cc[_0x1ca080(0x20d)]||process.env.MODEL?{'model':_0x982cc['model']||process.env.MODEL}:{}},_0x1a3999=!0x1,_0x2e8ee3=!0x1,_0x4fa62a=()=>{const _0x41f371=_0x1ca080;_0x2e8ee3&&process['exit'](0x82),_0x2e8ee3=!0x0,process[_0x41f371(0x1d7)][_0x41f371(0x1df)](_0x41f371(0x22a)),_0x1a3999?_0x16cbbe[_0x41f371(0x1be)]()[_0x41f371(0x1c4)](()=>process['exit'](0x82)):process[_0x41f371(0x1ef)](0x82);};process['once'](_0x1ca080(0x1ce),_0x4fa62a),await _0x16cbbe[_0x1ca080(0x21a)](_0x5b450e),_0x1a3999=!0x0;try{await _0x16cbbe['sendMessage'](_0x3a9809);}catch(_0x30cb66){if(K(_0x30cb66)&&process['stdin'][_0x1ca080(0x223)]&&_0x982cc['env']!==_0x1ca080(0x1e1)&&(_0x982cc[_0x1ca080(0x1f0)]||_0x5e2784[_0x1ca080(0x1ed)])){process[_0x1ca080(0x1d7)]['write'](_0x1ca080(0x208));let _0x309eac=await _0x2ee80d(_0x982cc[_0x1ca080(0x1f0)]?{'env':_0x982cc[_0x1ca080(0x1f0)]}:{'baseUrl':_0x5e2784[_0x1ca080(0x1ed)]});await _0x16cbbe['destroy'](),_0x16cbbe=new _0x2bb8b8(),_0x16cbbe[_0x1ca080(0x1f5)](k),await _0x16cbbe['initialize']({..._0x5b450e,'auth':_0x309eac}),await _0x16cbbe[_0x1ca080(0x1cb)](_0x3a9809);}else throw _0x30cb66;}finally{process[_0x1ca080(0x1f4)](_0x1ca080(0x1ce),_0x4fa62a),await _0x16cbbe[_0x1ca080(0x1be)]();}}async function W(){const _0x5c2bf5=_0x2f0b42;let _0x40341f=O(process['argv'][_0x5c2bf5(0x207)](0x2));if(_0x40341f[_0x5c2bf5(0x24c)]){C();return;}if(_0x40341f[_0x5c2bf5(0x1e5)]){console['log'](P());return;}if(_0x40341f[_0x5c2bf5(0x1fd)]===_0x5c2bf5(0x248)){await z(_0x40341f);return;}if(_0x40341f[_0x5c2bf5(0x1fd)]==='logout'){await B();return;}if(_0x40341f['subcommand']===_0x5c2bf5(0x203)){await F();return;}if(_0x40341f['subcommand']===_0x5c2bf5(0x24f)){await j(_0x40341f);return;}if(_0x40341f[_0x5c2bf5(0x1fd)]===_0x5c2bf5(0x230)){await _0x562e79(_0x40341f['prompt'],{'runnerUrl':_0x40341f[_0x5c2bf5(0x235)],'backendUrl':_0x40341f['backendUrl'],'interopPath':_0x40341f['interopPath'],'workerId':_0x40341f[_0x5c2bf5(0x1c2)]});return;}if(_0x40341f['cleanup']){await q();return;}await H(_0x40341f);}var J=process.env.NODE_ENV===_0x2f0b42(0x21b)||!!process.env.JEST_WORKER_ID;J||W()[_0x2f0b42(0x216)](_0x20f977=>{const _0x132015=_0x2f0b42;console[_0x132015(0x212)](_0x20f977['stack']||_0x20f977[_0x132015(0x1fb)]||_0x20f977),process[_0x132015(0x1ef)](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.5",
3
+ "version": "0.1.6",
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.5"
25
+ "@uipath/delegate-sdk": "0.1.6"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.0.0",