@treasuredata/tdx 0.2.4 → 0.2.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.
- package/dist/build-info.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/trino-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pwd-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const a0_0x4bd715=a0_0x361b;(function(_0x26afe9,_0x303213){const _0xba1ee1=a0_0x361b,_0x1745bb=_0x26afe9();while(!![]){try{const _0x2ca0a1=-parseInt(_0xba1ee1(0x27e))/0x1*(-parseInt(_0xba1ee1(0x2fa))/0x2)+-parseInt(_0xba1ee1(0x304))/0x3+-parseInt(_0xba1ee1(0x23e))/0x4+-parseInt(_0xba1ee1(0x274))/0x5+-parseInt(_0xba1ee1(0x25d))/0x6+parseInt(_0xba1ee1(0x222))/0x7+parseInt(_0xba1ee1(0x2e9))/0x8;if(_0x2ca0a1===_0x303213)break;else _0x1745bb['push'](_0x1745bb['shift']());}catch(_0x4729b1){_0x1745bb['push'](_0x1745bb['shift']());}}}(a0_0x5a99,0x8793f));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{LogLevel}from'./utils/tdx-logger.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';import{SegmentFieldsCommand}from'./commands/segment-fields-command.js';import{ParentSegmentCreateCommand,ParentSegmentUpdateCommand}from'./commands/parent-segment-command.js';import{SegmentCreateCommand}from'./commands/segment-create-command.js';import{SegmentUpdateCommand}from'./commands/segment-update-command.js';import{SegmentUseCommand}from'./commands/segment-use-command.js';import{SegmentPwdCommand}from'./commands/segment-pwd-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';import{checkForUpdate,displayUpdateNotification}from'./utils/version-check.js';const __filename=fileURLToPath(import.meta[a0_0x4bd715(0x20b)]),__dirname=dirname(__filename),packageJson=JSON[a0_0x4bd715(0x319)](readFileSync(join(__dirname,a0_0x4bd715(0x2cb)),a0_0x4bd715(0x2ac)));let buildInfo={};try{buildInfo=JSON[a0_0x4bd715(0x319)](readFileSync(join(__dirname,a0_0x4bd715(0x28c)),'utf-8'));}catch{}function a0_0x361b(_0x56b2e9,_0x24a2fc){const _0x5a99f0=a0_0x5a99();return a0_0x361b=function(_0x361b79,_0x3d6c5e){_0x361b79=_0x361b79-0x1ee;let _0x3ac591=_0x5a99f0[_0x361b79];return _0x3ac591;},a0_0x361b(_0x56b2e9,_0x24a2fc);}if(process[a0_0x4bd715(0x2c4)][a0_0x4bd715(0x308)](a0_0x4bd715(0x2ed))){let versionOutput=a0_0x4bd715(0x334)+packageJson[a0_0x4bd715(0x2fb)];buildInfo[a0_0x4bd715(0x20e)]&&(versionOutput+='\x20('+buildInfo[a0_0x4bd715(0x20e)]+')'),buildInfo[a0_0x4bd715(0x2f0)]&&(versionOutput+='\x20-\x20built\x20'+buildInfo['buildTime']),console['log'](versionOutput),process[a0_0x4bd715(0x2a1)](0x0);}const program=new Command();let description=a0_0x4bd715(0x2e4);buildInfo[a0_0x4bd715(0x20e)]?description+=a0_0x4bd715(0x2a2)+packageJson[a0_0x4bd715(0x2fb)]+'\x20('+buildInfo[a0_0x4bd715(0x20e)]+')':description+=a0_0x4bd715(0x2a2)+packageJson[a0_0x4bd715(0x2fb)];program[a0_0x4bd715(0x30b)](a0_0x4bd715(0x240))[a0_0x4bd715(0x2e8)](description),program[a0_0x4bd715(0x221)](a0_0x4bd715(0x224),a0_0x4bd715(0x238),a0_0x4bd715(0x2bc))[a0_0x4bd715(0x221)](a0_0x4bd715(0x247),a0_0x4bd715(0x2ea))[a0_0x4bd715(0x221)](a0_0x4bd715(0x285),a0_0x4bd715(0x307))[a0_0x4bd715(0x221)](a0_0x4bd715(0x218),'Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)')[a0_0x4bd715(0x221)]('--tsv','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)')[a0_0x4bd715(0x221)](a0_0x4bd715(0x311),a0_0x4bd715(0x30a))[a0_0x4bd715(0x221)](a0_0x4bd715(0x231),a0_0x4bd715(0x315))[a0_0x4bd715(0x221)]('--color',a0_0x4bd715(0x1f9),![])[a0_0x4bd715(0x221)](a0_0x4bd715(0x2f8),a0_0x4bd715(0x281),![])['option']('-v,\x20--verbose',a0_0x4bd715(0x324),![])[a0_0x4bd715(0x221)](a0_0x4bd715(0x230),a0_0x4bd715(0x233))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2d3),a0_0x4bd715(0x253))[a0_0x4bd715(0x221)]('--timeout\x20<seconds>','Set\x20operation\x20timeout\x20in\x20seconds','30')[a0_0x4bd715(0x221)](a0_0x4bd715(0x314),a0_0x4bd715(0x330),![])[a0_0x4bd715(0x221)](a0_0x4bd715(0x2d6),a0_0x4bd715(0x26e),![])[a0_0x4bd715(0x221)](a0_0x4bd715(0x2e0),a0_0x4bd715(0x265))[a0_0x4bd715(0x221)](a0_0x4bd715(0x1fb),a0_0x4bd715(0x21d))[a0_0x4bd715(0x221)](a0_0x4bd715(0x32b),a0_0x4bd715(0x270))[a0_0x4bd715(0x221)](a0_0x4bd715(0x31d),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')['option']('--parent-segment\x20<name>',a0_0x4bd715(0x291))['option'](a0_0x4bd715(0x28f),'LLM\x20project\x20to\x20use\x20(overrides\x20context)'),program['configureHelp']({'formatHelp':(_0x2ce5da,_0x18ceee)=>{const _0x6c45db=a0_0x4bd715,_0x4a2368=_0x18ceee[_0x6c45db(0x298)](_0x2ce5da,_0x18ceee),_0x4d499b=0x2,_0x1c0334=0x2;function _0x197aeb(_0x5cdad3){const _0x1edb31=_0x6c45db;return!!_0x5cdad3[_0x1edb31(0x20a)];}function _0x5accc2(_0x1d858a,_0xa0d4db){const _0x1d3618=_0x6c45db;if(_0xa0d4db){const _0x17c97c=''+_0x1d858a[_0x1d3618(0x282)](_0x4a2368+_0x1c0334)+_0xa0d4db;return _0x17c97c;}return _0x1d858a;}function _0x1089a6(_0x50dd38){const _0x4f6ea6=_0x6c45db;return _0x50dd38[_0x4f6ea6(0x2b9)]('\x0a')[_0x4f6ea6(0x32c)](/^/gm,'\x20'[_0x4f6ea6(0x28e)](_0x4d499b));}const _0x35fd9c=[];_0x35fd9c['push'](_0x6c45db(0x228)+_0x18ceee[_0x6c45db(0x320)](_0x2ce5da));const _0x121bf6=_0x18ceee[_0x6c45db(0x2de)](_0x2ce5da);_0x121bf6&&(_0x35fd9c[_0x6c45db(0x318)](''),_0x35fd9c[_0x6c45db(0x318)](_0x121bf6));const _0x3a1939=_0x2ce5da['commands'][_0x6c45db(0x24c)](_0x543aea=>!_0x197aeb(_0x543aea));if(_0x3a1939['length']>0x0){const _0x77bfcb=_0x3a1939['map'](_0x2bb378=>{const _0x5aac7c=_0x6c45db,_0x2cf8ac=_0x18ceee['subcommandTerm'](_0x2bb378),_0xb97daf=_0x18ceee[_0x5aac7c(0x296)](_0x2bb378);return _0x5accc2(_0x2cf8ac,_0xb97daf);});_0x35fd9c[_0x6c45db(0x318)](''),_0x35fd9c[_0x6c45db(0x318)](_0x6c45db(0x30e)),_0x35fd9c['push'](_0x1089a6(_0x77bfcb));}const _0x294041=_0x2ce5da[_0x6c45db(0x2bb)][_0x6c45db(0x24c)](_0x4496d9=>!_0x197aeb(_0x4496d9));if(_0x294041[_0x6c45db(0x23d)]>0x0){const _0x10b7ff=_0x294041[_0x6c45db(0x202)](_0x26bde7=>{const _0x371ff4=_0x6c45db,_0x516661=_0x18ceee[_0x371ff4(0x20c)](_0x26bde7),_0x3c3642=_0x18ceee['optionDescription'](_0x26bde7);return _0x5accc2(_0x516661,_0x3c3642);});_0x35fd9c[_0x6c45db(0x318)](''),_0x35fd9c['push'](_0x6c45db(0x2ce)),_0x35fd9c['push'](_0x1089a6(_0x10b7ff));}const _0x33b0fd=(_0x2ce5da[_0x6c45db(0x29a)]||[])[_0x6c45db(0x24c)](_0x1c39dc=>!_0x197aeb(_0x1c39dc));if(_0x33b0fd[_0x6c45db(0x23d)]>0x0){const _0x1545a8=_0x33b0fd[_0x6c45db(0x202)](_0x452788=>{const _0x102930=_0x6c45db,_0x183a85=_0x18ceee[_0x102930(0x245)](_0x452788),_0x1aef9b=_0x18ceee[_0x102930(0x24a)](_0x452788);return _0x5accc2(_0x183a85,_0x1aef9b);});_0x35fd9c[_0x6c45db(0x318)](''),_0x35fd9c[_0x6c45db(0x318)]('Arguments:'),_0x35fd9c['push'](_0x1089a6(_0x1545a8));}return _0x35fd9c[_0x6c45db(0x2b9)]('\x0a');},'subcommandTerm':_0x391f29=>{const _0x3c9da2=a0_0x4bd715,_0x3c9cfc=(_0x391f29[_0x3c9da2(0x29a)]||[])[_0x3c9da2(0x202)](_0xabd558=>_0xabd558[_0x3c9da2(0x327)]?'<'+_0xabd558['name']()+'>':'['+_0xabd558[_0x3c9da2(0x30b)]()+']')[_0x3c9da2(0x2b9)]('\x20'),_0x5db3fe=_0x391f29[_0x3c9da2(0x21a)](),_0x1eb7a3=_0x5db3fe[_0x3c9da2(0x23d)]>0x0?_0x391f29[_0x3c9da2(0x30b)]()+',\x20'+_0x5db3fe[_0x3c9da2(0x2b9)](',\x20'):_0x391f29[_0x3c9da2(0x30b)]();return _0x3c9cfc?_0x1eb7a3+'\x20'+_0x3c9cfc:_0x1eb7a3;}}),program[a0_0x4bd715(0x310)](a0_0x4bd715(0x30c),_0x48845f=>{const _0x19aeb6=a0_0x4bd715,_0x235464=_0x48845f[_0x19aeb6(0x244)]();if(!_0x235464[_0x19aeb6(0x2f9)]){if(_0x235464[_0x19aeb6(0x29b)])_0x235464['format']=_0x19aeb6(0x29b);else{if(_0x235464['jsonl'])_0x235464[_0x19aeb6(0x2f9)]='jsonl';else _0x235464['tsv']&&(_0x235464[_0x19aeb6(0x2f9)]='tsv');}}_0x235464['in']&&!_0x235464[_0x19aeb6(0x2fc)]&&(_0x235464['database']=_0x235464['in']);if(_0x235464[_0x19aeb6(0x223)])_0x235464['logLevel']=LogLevel[_0x19aeb6(0x277)];else{if(_0x235464['debug'])_0x235464[_0x19aeb6(0x293)]=LogLevel[_0x19aeb6(0x32d)];else _0x235464[_0x19aeb6(0x293)]===undefined&&(_0x235464['logLevel']=LogLevel[_0x19aeb6(0x2a4)]);}});function createTDXInstance(_0x5f5d6e){const _0x3f9f1=a0_0x4bd715,_0x4a2192=new GlobalContext(_0x5f5d6e);_0x4a2192[_0x3f9f1(0x335)](_0x5f5d6e);const _0x56e4f5={'site':_0x4a2192[_0x3f9f1(0x268)],'apiKey':_0x4a2192[_0x3f9f1(0x338)],'logLevel':_0x4a2192['logLevel']};return new TDX(_0x56e4f5);}program[a0_0x4bd715(0x207)](a0_0x4bd715(0x271))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2f2))[a0_0x4bd715(0x2d0)](async(_0x480219,_0x26e064)=>{const _0x3bf52b=a0_0x4bd715,_0x2601ab=new DatabasesCommand(),_0x4def60=program[_0x3bf52b(0x244)](),_0x36bedb=createTDXInstance(_0x4def60),_0x44eca4=await _0x2601ab[_0x3bf52b(0x2d5)]({'options':{..._0x4def60,..._0x26e064},'args':_0x480219?[_0x480219]:[],'tdx':_0x36bedb});process[_0x3bf52b(0x2a1)](_0x44eca4);}),program[a0_0x4bd715(0x207)]('chat\x20[message...]')[a0_0x4bd715(0x2e8)]('Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)')[a0_0x4bd715(0x221)](a0_0x4bd715(0x256),'Agent\x20reference\x20(project-name/agent-name)')[a0_0x4bd715(0x221)](a0_0x4bd715(0x262),a0_0x4bd715(0x2ae))[a0_0x4bd715(0x221)]('--temperature\x20<n>',a0_0x4bd715(0x2dd))[a0_0x4bd715(0x221)](a0_0x4bd715(0x242),a0_0x4bd715(0x259))['action'](async(_0x439ad3,_0x38a828)=>{const _0x5422a8=a0_0x4bd715,_0x1388c5=new ChatCommand(),_0x18a72b=program['opts'](),_0x40f651=createTDXInstance(_0x18a72b),_0x372afe=await _0x1388c5[_0x5422a8(0x2d5)]({'options':{..._0x18a72b,..._0x38a828},'args':_0x439ad3,'tdx':_0x40f651});process['exit'](_0x372afe);});const apiCmd=program[a0_0x4bd715(0x207)](a0_0x4bd715(0x234))['summary'](a0_0x4bd715(0x300))[a0_0x4bd715(0x2b1)](a0_0x4bd715(0x258),a0_0x4bd715(0x2cc))[a0_0x4bd715(0x221)](a0_0x4bd715(0x1f3),a0_0x4bd715(0x2b4),a0_0x4bd715(0x1fe))[a0_0x4bd715(0x221)](a0_0x4bd715(0x250),a0_0x4bd715(0x2a6))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2ef),a0_0x4bd715(0x2f5))[a0_0x4bd715(0x221)](a0_0x4bd715(0x301),a0_0x4bd715(0x2c8),(_0x3eb268,_0x59c6ee)=>{return _0x59c6ee?[..._0x59c6ee,_0x3eb268]:[_0x3eb268];})['option'](a0_0x4bd715(0x2c6),a0_0x4bd715(0x257),'td')['action'](async(_0x1b5907,_0x462e57)=>{const _0x4ba2e7=a0_0x4bd715;if(!_0x1b5907){apiCmd[_0x4ba2e7(0x210)]();return;}const _0x4aa55e=new ApiCommand(),_0x38996a=program['opts'](),_0x3ff8c7=createTDXInstance(_0x38996a),_0x5780e6=await _0x4aa55e[_0x4ba2e7(0x2d5)]({'options':{..._0x38996a,..._0x462e57},'args':[_0x1b5907],'tdx':_0x3ff8c7});process[_0x4ba2e7(0x2a1)](_0x5780e6);});program[a0_0x4bd715(0x207)]('tables\x20[pattern]')[a0_0x4bd715(0x2e8)]('List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)')[a0_0x4bd715(0x221)](a0_0x4bd715(0x269),a0_0x4bd715(0x2a9))[a0_0x4bd715(0x221)](a0_0x4bd715(0x219),a0_0x4bd715(0x1f1))[a0_0x4bd715(0x2d0)](async(_0x47d557,_0x3a0642)=>{const _0x1d68bc=a0_0x4bd715,_0x56cfc7=new TablesCommand(),_0x493fbf=program[_0x1d68bc(0x244)](),_0x5d8e61=createTDXInstance(_0x493fbf);_0x3a0642['in']&&(_0x3a0642[_0x1d68bc(0x2fc)]=_0x3a0642['in']);const _0x23f65e=await _0x56cfc7['run']({'options':{..._0x493fbf,..._0x3a0642},'args':_0x47d557?[_0x47d557]:[],'tdx':_0x5d8e61});process['exit'](_0x23f65e);}),program[a0_0x4bd715(0x207)]('show\x20[table]')[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x249))[a0_0x4bd715(0x221)](a0_0x4bd715(0x269),a0_0x4bd715(0x20f))[a0_0x4bd715(0x221)](a0_0x4bd715(0x219),a0_0x4bd715(0x1f1))['action'](async(_0x2d8282,_0xeb7ee3)=>{const _0x455a99=a0_0x4bd715,_0x22fb59=new ShowCommand(),_0x521320=program['opts'](),_0x5dbbe6=createTDXInstance(_0x521320);_0xeb7ee3['in']&&(_0xeb7ee3[_0x455a99(0x2fc)]=_0xeb7ee3['in']);const _0x2c1c13=await _0x22fb59[_0x455a99(0x2d5)]({'options':{..._0x521320,..._0xeb7ee3},'args':_0x2d8282?[_0x2d8282]:[],'tdx':_0x5dbbe6});process['exit'](_0x2c1c13);}),program[a0_0x4bd715(0x207)](a0_0x4bd715(0x206))[a0_0x4bd715(0x2b7)](a0_0x4bd715(0x2da))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x212))[a0_0x4bd715(0x221)]('-d,\x20--database\x20<database>',a0_0x4bd715(0x20f))[a0_0x4bd715(0x221)](a0_0x4bd715(0x219),a0_0x4bd715(0x1f1))['action'](async(_0xa55518,_0x144de4)=>{const _0xbebc31=a0_0x4bd715,_0x34992f=new DescribeCommand(),_0x3310fd=program[_0xbebc31(0x244)](),_0x505fcd=createTDXInstance(_0x3310fd);_0x144de4['in']&&(_0x144de4[_0xbebc31(0x2fc)]=_0x144de4['in']);const _0x1f484a=await _0x34992f['run']({'options':{..._0x3310fd,..._0x144de4},'args':_0xa55518?[_0xa55518]:[],'tdx':_0x505fcd});process[_0xbebc31(0x2a1)](_0x1f484a);}),program[a0_0x4bd715(0x207)](a0_0x4bd715(0x264))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2ab))[a0_0x4bd715(0x221)](a0_0x4bd715(0x269),a0_0x4bd715(0x241))[a0_0x4bd715(0x221)](a0_0x4bd715(0x219),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')['option'](a0_0x4bd715(0x1fa),a0_0x4bd715(0x32f))['option']('-f,\x20--file\x20<path>',a0_0x4bd715(0x246))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2ff),a0_0x4bd715(0x22a),'40')[a0_0x4bd715(0x2d0)](async(_0x12af00,_0xe8e576)=>{const _0x20332a=a0_0x4bd715,_0x1ab8bb=new QueryCommand(),_0x1de248=program[_0x20332a(0x244)](),_0x3fa9d7=createTDXInstance(_0x1de248);_0xe8e576['in']&&(_0xe8e576[_0x20332a(0x2fc)]=_0xe8e576['in']);const _0x24868c=await _0x1ab8bb[_0x20332a(0x2d5)]({'options':{..._0x1de248,..._0xe8e576},'args':_0x12af00?[_0x12af00]:[],'tdx':_0x3fa9d7});process[_0x20332a(0x2a1)](_0x24868c);}),program['command'](a0_0x4bd715(0x220))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x27f))[a0_0x4bd715(0x221)](a0_0x4bd715(0x1fc),a0_0x4bd715(0x248))[a0_0x4bd715(0x221)]('--max-depth\x20<depth>',a0_0x4bd715(0x2aa),'10')[a0_0x4bd715(0x2d0)](async(_0x50cb19,_0x2c17c1)=>{const _0x4ecc04=a0_0x4bd715,_0x554e92=new SegmentsCommand(),_0x70759f=program[_0x4ecc04(0x244)](),_0x110a9c=createTDXInstance(_0x70759f),_0x49a1dc=await _0x554e92[_0x4ecc04(0x2d5)]({'options':{..._0x70759f,..._0x2c17c1},'args':_0x50cb19?[_0x50cb19]:[],'tdx':_0x110a9c});process[_0x4ecc04(0x2a1)](_0x49a1dc);});const segmentCmd=program[a0_0x4bd715(0x207)](a0_0x4bd715(0x215))['description'](a0_0x4bd715(0x2c7));segmentCmd[a0_0x4bd715(0x207)]('use\x20<path>')[a0_0x4bd715(0x2e8)]('Set\x20current\x20segment/folder\x20context\x20for\x20navigation')[a0_0x4bd715(0x2d0)](async(_0x2970cf,_0x25e300)=>{const _0x328232=a0_0x4bd715,_0xa28350=new SegmentUseCommand(),_0x2af95a=program[_0x328232(0x244)](),_0x5638a1=createTDXInstance(_0x2af95a),_0x225356=await _0xa28350[_0x328232(0x2d5)]({'options':{..._0x2af95a,..._0x25e300},'args':[_0x2970cf],'tdx':_0x5638a1});process[_0x328232(0x2a1)](_0x225356);}),segmentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x252))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x22c))['action'](async _0x3aa716=>{const _0x2fe672=a0_0x4bd715,_0x2e0f28=new SegmentPwdCommand(),_0x59d510=program[_0x2fe672(0x244)](),_0x20f3a2=createTDXInstance(_0x59d510),_0x2fef86=await _0x2e0f28['run']({'options':{..._0x59d510,..._0x3aa716},'args':[],'tdx':_0x20f3a2});process[_0x2fe672(0x2a1)](_0x2fef86);}),segmentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x273))['alias'](a0_0x4bd715(0x2da))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x23f))['action'](async(_0x3de03d,_0x203706)=>{const _0x220634=a0_0x4bd715,_0x5d2eb6=new SegmentDescribeCommand(),_0xc725ee=program[_0x220634(0x244)](),_0x514d44=createTDXInstance(_0xc725ee),_0x4d897b=await _0x5d2eb6[_0x220634(0x2d5)]({'options':{..._0xc725ee,..._0x203706},'args':[_0x3de03d],'tdx':_0x514d44});process[_0x220634(0x2a1)](_0x4d897b);}),segmentCmd[a0_0x4bd715(0x207)]('show\x20<segment_name>')[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x1f7))[a0_0x4bd715(0x2d0)](async(_0x247300,_0x5d37a1)=>{const _0x3ad1f7=a0_0x4bd715,_0x20f19d=new SegmentShowCommand(),_0x431bc1=program[_0x3ad1f7(0x244)](),_0x42be0b=createTDXInstance(_0x431bc1),_0x14c3d5=await _0x20f19d[_0x3ad1f7(0x2d5)]({'options':{..._0x431bc1,..._0x5d37a1},'args':[_0x247300],'tdx':_0x42be0b});process['exit'](_0x14c3d5);}),segmentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x29f))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x21e))[a0_0x4bd715(0x2d0)](async(_0x3959e8,_0x373338)=>{const _0x309381=a0_0x4bd715,_0x13194a=new SegmentFolderListCommand(),_0x49caa6=program[_0x309381(0x244)](),_0xec6f8e=createTDXInstance(_0x49caa6),_0x1b8256=await _0x13194a[_0x309381(0x2d5)]({'options':{..._0x49caa6,..._0x373338},'args':[_0x3959e8],'tdx':_0xec6f8e});process[_0x309381(0x2a1)](_0x1b8256);});const folderCmd=segmentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x255))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x32a));folderCmd[a0_0x4bd715(0x207)]('show\x20<folder_ref>')[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2df))[a0_0x4bd715(0x2d0)](async(_0x19c23f,_0x2ab449)=>{const _0x422b1d=a0_0x4bd715,_0x53bb1a=new SegmentFolderShowCommand(),_0x56649b=program['opts'](),_0x252359=createTDXInstance(_0x56649b),_0x726a2f=await _0x53bb1a[_0x422b1d(0x2d5)]({'options':{..._0x56649b,..._0x2ab449},'args':[_0x19c23f],'tdx':_0x252359});process['exit'](_0x726a2f);}),segmentCmd['command']('sql\x20<segment_name>')['description'](a0_0x4bd715(0x322))[a0_0x4bd715(0x2d0)](async(_0x304e68,_0x70d12c)=>{const _0x45d128=a0_0x4bd715,_0x30a9c3=new SegmentSQLCommand(),_0x5f5118=program[_0x45d128(0x244)](),_0x2e997d=createTDXInstance(_0x5f5118),_0x1d33e3=await _0x30a9c3[_0x45d128(0x2d5)]({'options':{..._0x5f5118,..._0x70d12c},'args':[_0x304e68],'tdx':_0x2e997d});process[_0x45d128(0x2a1)](_0x1d33e3);}),segmentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x303))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x209))[a0_0x4bd715(0x2d0)](async(_0x1f4639,_0x2b2cc4)=>{const _0x2428b2=a0_0x4bd715,_0x450a83=new SegmentFieldsCommand(),_0xb09f22=program[_0x2428b2(0x244)](),_0x1ca29c=createTDXInstance(_0xb09f22),_0x4aef8e=await _0x450a83['run']({'options':{..._0xb09f22,..._0x2b2cc4},'args':[_0x1f4639],'tdx':_0x1ca29c});process['exit'](_0x4aef8e);}),segmentCmd[a0_0x4bd715(0x207)]('create\x20<segment_name>')[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2fd))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2f7),'Segment\x20description')[a0_0x4bd715(0x221)](a0_0x4bd715(0x321),a0_0x4bd715(0x2f1))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2c1),a0_0x4bd715(0x23c))['option'](a0_0x4bd715(0x2be),'Folder\x20name\x20for\x20organization')[a0_0x4bd715(0x221)](a0_0x4bd715(0x22f),a0_0x4bd715(0x2e5))[a0_0x4bd715(0x221)](a0_0x4bd715(0x204),a0_0x4bd715(0x31a))[a0_0x4bd715(0x221)](a0_0x4bd715(0x337),'Skip\x20population\x20counting')[a0_0x4bd715(0x2d0)](async(_0x10bc8a,_0x2663f7)=>{const _0x1029c0=a0_0x4bd715,_0x3f9eef=new SegmentCreateCommand(),_0x11a702=program[_0x1029c0(0x244)](),_0x7e8c9f=createTDXInstance(_0x11a702),_0xc1fac3=await _0x3f9eef[_0x1029c0(0x2d5)]({'options':{..._0x11a702,..._0x2663f7},'args':[_0x10bc8a],'tdx':_0x7e8c9f});process['exit'](_0xc1fac3);}),segmentCmd[a0_0x4bd715(0x207)]('update\x20<segment_name>')[a0_0x4bd715(0x2e8)]('Update\x20child\x20segment\x20(use\x20parent_name/child_name)')[a0_0x4bd715(0x221)]('--name\x20<new_name>',a0_0x4bd715(0x216))['option'](a0_0x4bd715(0x2f7),a0_0x4bd715(0x290))[a0_0x4bd715(0x221)]('--rule\x20<json>',a0_0x4bd715(0x1f8))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2c1),a0_0x4bd715(0x297))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2be),a0_0x4bd715(0x2c3))[a0_0x4bd715(0x221)]('--kind\x20<type>',a0_0x4bd715(0x2e5))[a0_0x4bd715(0x2d0)](async(_0x40e8c1,_0x4e2ff9)=>{const _0x4bc634=a0_0x4bd715,_0x36f9fd=new SegmentUpdateCommand(),_0x53ef63=program[_0x4bc634(0x244)](),_0x104203=createTDXInstance(_0x53ef63),_0x3c981d=await _0x36f9fd['run']({'options':{..._0x53ef63,..._0x4e2ff9},'args':[_0x40e8c1],'tdx':_0x104203});process[_0x4bc634(0x2a1)](_0x3c981d);});const parentCmd=segmentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x2a7))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x1f5));parentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x2b5))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x326))[a0_0x4bd715(0x283)](a0_0x4bd715(0x2b3),a0_0x4bd715(0x24e))[a0_0x4bd715(0x283)](a0_0x4bd715(0x229),a0_0x4bd715(0x2a5))['option']('--description\x20<text>',a0_0x4bd715(0x2c0))[a0_0x4bd715(0x221)](a0_0x4bd715(0x1f0),a0_0x4bd715(0x2eb))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2b6),a0_0x4bd715(0x323))['option']('--timezone\x20<tz>','Timezone\x20(e.g.,\x20America/Los_Angeles)')[a0_0x4bd715(0x221)](a0_0x4bd715(0x31b),a0_0x4bd715(0x312))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2e7),a0_0x4bd715(0x2e1))[a0_0x4bd715(0x221)](a0_0x4bd715(0x225),a0_0x4bd715(0x333))[a0_0x4bd715(0x221)](a0_0x4bd715(0x29c),'Behaviors\x20from\x20JSON\x20file')['option'](a0_0x4bd715(0x28a),a0_0x4bd715(0x2fe))[a0_0x4bd715(0x221)]('--customer-group-file\x20<file>',a0_0x4bd715(0x20d))[a0_0x4bd715(0x2d0)](async(_0x2433ae,_0x19e639)=>{const _0x43ba97=a0_0x4bd715,_0x260243=new ParentSegmentCreateCommand(),_0x14d59b=program[_0x43ba97(0x244)](),_0x3c2432=createTDXInstance(_0x14d59b),_0x19b2ba=await _0x260243['run']({'options':{..._0x14d59b,..._0x19e639},'args':[_0x2433ae],'tdx':_0x3c2432});process['exit'](_0x19b2ba);}),parentCmd['command'](a0_0x4bd715(0x2ad))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x332))['option']('--description\x20<text>',a0_0x4bd715(0x290))['option']('--schedule-type\x20<type>','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly')[a0_0x4bd715(0x221)]('--schedule-option\x20<value>',a0_0x4bd715(0x292))[a0_0x4bd715(0x221)](a0_0x4bd715(0x28d),a0_0x4bd715(0x24d))[a0_0x4bd715(0x221)]('--add-attributes\x20<json>',a0_0x4bd715(0x306))['option'](a0_0x4bd715(0x2a0),a0_0x4bd715(0x2cd))[a0_0x4bd715(0x221)]('--add-behaviors\x20<json>',a0_0x4bd715(0x302))[a0_0x4bd715(0x221)]('--add-behaviors-file\x20<file>',a0_0x4bd715(0x2a8))[a0_0x4bd715(0x2d0)](async(_0x2227e2,_0x5ad064)=>{const _0x344eff=a0_0x4bd715,_0x1e0d29=new ParentSegmentUpdateCommand(),_0x449ec4=program[_0x344eff(0x244)](),_0x33eb8e=createTDXInstance(_0x449ec4),_0xfece7c=await _0x1e0d29[_0x344eff(0x2d5)]({'options':{..._0x449ec4,..._0x5ad064},'args':[_0x2227e2],'tdx':_0x33eb8e});process['exit'](_0xfece7c);}),folderCmd['command'](a0_0x4bd715(0x2d7))['description'](a0_0x4bd715(0x27d))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2f7),'Folder\x20description')[a0_0x4bd715(0x221)](a0_0x4bd715(0x28b),a0_0x4bd715(0x2e3))[a0_0x4bd715(0x2d0)](async(_0x16ea26,_0x360758,_0x1ad2ae)=>{const _0x3c7448=a0_0x4bd715,_0x20bbcb=new SegmentFolderCreateCommand(),_0x1e168d=program[_0x3c7448(0x244)](),_0x4bafdd=createTDXInstance(_0x1e168d),_0x5b2065=await _0x20bbcb[_0x3c7448(0x2d5)]({'options':{..._0x1e168d,..._0x1ad2ae},'args':[_0x16ea26,_0x360758],'tdx':_0x4bafdd});process[_0x3c7448(0x2a1)](_0x5b2065);}),program[a0_0x4bd715(0x207)](a0_0x4bd715(0x201))['description'](a0_0x4bd715(0x280))[a0_0x4bd715(0x2d0)](async(_0x2c16a0,_0x5c3b62)=>{const _0x40f1ff=a0_0x4bd715,_0x3136ef=new ActivationsCommand(),_0x31c679=program['opts'](),_0x13f84b=createTDXInstance(_0x31c679),_0x307fd1=await _0x3136ef['run']({'options':{..._0x31c679,..._0x5c3b62},'args':[_0x2c16a0],'tdx':_0x13f84b});process[_0x40f1ff(0x2a1)](_0x307fd1);});const workflowCmd=program['command'](a0_0x4bd715(0x2b0))['alias']('wf')[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x26c));workflowCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x275))['description'](a0_0x4bd715(0x272))['action'](async(_0x4feb86,_0x167a7b)=>{const _0x1acc03=a0_0x4bd715,_0x3fd46d=new WorkflowProjectsCommand(),_0x5d26c1=program[_0x1acc03(0x244)](),_0x50a577=createTDXInstance(_0x5d26c1),_0x46df99=await _0x3fd46d[_0x1acc03(0x2d5)]({'options':{..._0x5d26c1,..._0x167a7b},'args':_0x4feb86?[_0x4feb86]:[],'tdx':_0x50a577});process[_0x1acc03(0x2a1)](_0x46df99);}),workflowCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x226))[a0_0x4bd715(0x2b7)]('ls')[a0_0x4bd715(0x2e8)]('List\x20workflows\x20(optionally\x20filtered\x20by\x20project)')[a0_0x4bd715(0x2d0)](async(_0x4655eb,_0x12d026)=>{const _0x48919e=a0_0x4bd715,_0x3d64d4=new WorkflowWorkflowsCommand(),_0x40388a=program[_0x48919e(0x244)](),_0x12fb8f=createTDXInstance(_0x40388a),_0x2aa028=await _0x3d64d4[_0x48919e(0x2d5)]({'options':{..._0x40388a,..._0x12d026},'args':_0x4655eb?[_0x4655eb]:[],'tdx':_0x12fb8f});process[_0x48919e(0x2a1)](_0x2aa028);}),workflowCmd['command']('sessions\x20[project]')[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2db))[a0_0x4bd715(0x221)](a0_0x4bd715(0x21c),a0_0x4bd715(0x2e6))[a0_0x4bd715(0x221)]('--from\x20<timestamp>','Start\x20time\x20filter\x20(ISO\x208601\x20format)')[a0_0x4bd715(0x221)](a0_0x4bd715(0x263),'End\x20time\x20filter\x20(ISO\x208601\x20format)')[a0_0x4bd715(0x2d0)](async(_0xac7efa,_0x348cfb)=>{const _0x134119=a0_0x4bd715,_0x423e58=new WorkflowSessionsCommand(),_0x482287=program[_0x134119(0x244)](),_0x4c1c5e=createTDXInstance(_0x482287),_0x14ebc1=await _0x423e58['run']({'options':{..._0x482287,..._0x348cfb},'args':_0xac7efa?[_0xac7efa]:[],'tdx':_0x4c1c5e});process[_0x134119(0x2a1)](_0x14ebc1);}),workflowCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x299))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x236))[a0_0x4bd715(0x221)](a0_0x4bd715(0x21b),a0_0x4bd715(0x232))['action'](async(_0x3e26a2,_0x4514a0)=>{const _0x260256=a0_0x4bd715,_0x16c12f=new WorkflowAttemptsCommand(),_0x12d7fb=program[_0x260256(0x244)](),_0x1018d3=createTDXInstance(_0x12d7fb),_0x2bc998=await _0x16c12f[_0x260256(0x2d5)]({'options':{..._0x12d7fb,..._0x4514a0},'args':_0x3e26a2?[_0x3e26a2]:[],'tdx':_0x1018d3});process[_0x260256(0x2a1)](_0x2bc998);}),workflowCmd['command'](a0_0x4bd715(0x2d8))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2bf))['action'](async(_0x66cff6,_0x1f45a1)=>{const _0x27cac8=a0_0x4bd715,_0x582d96=new WorkflowAttemptCommand(),_0xb8a075=program['opts'](),_0x1dee82=createTDXInstance(_0xb8a075),_0x2d69df=await _0x582d96[_0x27cac8(0x2d5)]({'options':{..._0xb8a075,..._0x1f45a1},'args':[_0x66cff6],'tdx':_0x1dee82});process[_0x27cac8(0x2a1)](_0x2d69df);}),workflowCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x1ee))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x23a))['option']('--include-subtasks',a0_0x4bd715(0x2dc))[a0_0x4bd715(0x2d0)](async(_0x186f75,_0x451a0a)=>{const _0x34b4c7=a0_0x4bd715,_0x1cfe3a=new WorkflowTasksCommand(),_0x52483d=program[_0x34b4c7(0x244)](),_0x3dde10=createTDXInstance(_0x52483d),_0x5109d9=await _0x1cfe3a['run']({'options':{..._0x52483d,..._0x451a0a},'args':[_0x186f75],'tdx':_0x3dde10});process['exit'](_0x5109d9);}),workflowCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x25f))['description'](a0_0x4bd715(0x260))[a0_0x4bd715(0x221)](a0_0x4bd715(0x1ef),a0_0x4bd715(0x1f4),_0x513975=>parseInt(_0x513975,0xa),0x0)['action'](async(_0x6277e3,_0x2af4b2,_0xd016b4)=>{const _0x28db42=a0_0x4bd715,_0x1cbdee=new WorkflowLogsCommand(),_0x41aed5=program[_0x28db42(0x244)](),_0xfe5c10=createTDXInstance(_0x41aed5),_0x3f76ec=await _0x1cbdee[_0x28db42(0x2d5)]({'options':{..._0x41aed5,..._0xd016b4},'args':[_0x6277e3,_0x2af4b2],'tdx':_0xfe5c10});process[_0x28db42(0x2a1)](_0x3f76ec);}),workflowCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x243))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x26a))[a0_0x4bd715(0x221)](a0_0x4bd715(0x279),a0_0x4bd715(0x316))[a0_0x4bd715(0x2d0)](async(_0x5dd839,_0x217df9)=>{const _0xdba3a0=a0_0x4bd715,_0x10b852=new WorkflowKillCommand(),_0x8c198d=program[_0xdba3a0(0x244)](),_0x2ce0d7=createTDXInstance(_0x8c198d),_0x28be1d=await _0x10b852[_0xdba3a0(0x2d5)]({'options':{..._0x8c198d,..._0x217df9},'args':[_0x5dd839],'tdx':_0x2ce0d7});process['exit'](_0x28be1d);}),workflowCmd['command'](a0_0x4bd715(0x2d1))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2f4))[a0_0x4bd715(0x221)]('--from-task\x20<task>',a0_0x4bd715(0x22b))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2ba),a0_0x4bd715(0x2d4))['option'](a0_0x4bd715(0x2b8),a0_0x4bd715(0x309))[a0_0x4bd715(0x221)](a0_0x4bd715(0x27a),'Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)')[a0_0x4bd715(0x2d0)](async(_0x4580f8,_0x1ecfdb)=>{const _0x2b4dba=a0_0x4bd715,_0x505594=new WorkflowRetryCommand(),_0x50b63c=program[_0x2b4dba(0x244)](),_0xe426c=createTDXInstance(_0x50b63c),_0x57b46f=await _0x505594['run']({'options':{..._0x50b63c,..._0x1ecfdb},'args':[_0x4580f8],'tdx':_0xe426c});process['exit'](_0x57b46f);}),workflowCmd[a0_0x4bd715(0x207)]('download\x20<project-name>\x20[output-dir]')[a0_0x4bd715(0x2e8)]('Download\x20workflow\x20project\x20from\x20Treasure\x20Data')[a0_0x4bd715(0x221)]('--revision\x20<revision>',a0_0x4bd715(0x2a3))[a0_0x4bd715(0x2d0)](async(_0x111184,_0x306b6e,_0x15c4aa)=>{const _0x54cf00=a0_0x4bd715,_0x31dc46=new WorkflowDownloadCommand(),_0x2dcac1=program[_0x54cf00(0x244)](),_0x4e06ce=createTDXInstance(_0x2dcac1),_0x258938=await _0x31dc46['run']({'options':{..._0x2dcac1,..._0x15c4aa},'args':[_0x111184,_0x306b6e||'.'],'tdx':_0x4e06ce});process['exit'](_0x258938);}),workflowCmd['command'](a0_0x4bd715(0x25a))[a0_0x4bd715(0x2e8)]('Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)')['option'](a0_0x4bd715(0x23b),a0_0x4bd715(0x200))['option'](a0_0x4bd715(0x2c9),a0_0x4bd715(0x1fd))[a0_0x4bd715(0x221)](a0_0x4bd715(0x276),a0_0x4bd715(0x266))[a0_0x4bd715(0x2d0)](async(_0x582317,_0x47e509)=>{const _0x469367=a0_0x4bd715,_0x542d02=new WorkflowPushCommand(),_0x4a16ef=program[_0x469367(0x244)](),_0x2d2209=createTDXInstance(_0x4a16ef),_0x4e3b00=await _0x542d02[_0x469367(0x2d5)]({'options':{..._0x4a16ef,..._0x47e509},'args':_0x582317?[_0x582317]:[],'tdx':_0x2d2209});process[_0x469367(0x2a1)](_0x4e3b00);}),workflowCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x32e))[a0_0x4bd715(0x2e8)]('Delete\x20workflow\x20project\x20from\x20Treasure\x20Data')[a0_0x4bd715(0x2d0)](async(_0x1b613a,_0xafafca)=>{const _0x4ae3c8=a0_0x4bd715,_0x4d91da=new WorkflowDeleteCommand(),_0x12b994=program[_0x4ae3c8(0x244)](),_0x927f95=createTDXInstance(_0x12b994),_0x28cebd=await _0x4d91da[_0x4ae3c8(0x2d5)]({'options':{..._0x12b994,..._0xafafca},'args':[_0x1b613a],'tdx':_0x927f95});process[_0x4ae3c8(0x2a1)](_0x28cebd);}),program[a0_0x4bd715(0x207)](a0_0x4bd715(0x29e))['description'](a0_0x4bd715(0x325))['option'](a0_0x4bd715(0x21c),a0_0x4bd715(0x2bd))['action'](async _0x2894af=>{const _0x25a035=a0_0x4bd715,_0x2c0b1e=new JobListCommand(),_0x5adbc5=program[_0x25a035(0x244)](),_0x15632f=createTDXInstance(_0x5adbc5),_0x569052=await _0x2c0b1e[_0x25a035(0x2d5)]({'options':{..._0x5adbc5,..._0x2894af},'args':[],'tdx':_0x15632f});process[_0x25a035(0x2a1)](_0x569052);});const jobCmd=program[a0_0x4bd715(0x207)](a0_0x4bd715(0x317))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x205));jobCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x22d))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x203))[a0_0x4bd715(0x2d0)](async(_0x2cc8b0,_0x23049a)=>{const _0xfe2793=a0_0x4bd715,_0x3fe28d=new JobShowCommand(),_0x238c8b=program[_0xfe2793(0x244)](),_0x34373f=createTDXInstance(_0x238c8b),_0xd850a5=await _0x3fe28d['run']({'options':{..._0x238c8b,..._0x23049a},'args':[_0x2cc8b0],'tdx':_0x34373f});process[_0xfe2793(0x2a1)](_0xd850a5);}),jobCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x237))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x30f))[a0_0x4bd715(0x2d0)](async(_0x3ef5a3,_0x1c1a37)=>{const _0x378112=a0_0x4bd715,_0x126c2d=new JobKillCommand(),_0x403950=program[_0x378112(0x244)](),_0x496536=createTDXInstance(_0x403950),_0x5c41c5=await _0x126c2d['run']({'options':{..._0x403950,..._0x1c1a37},'args':[_0x3ef5a3],'tdx':_0x496536});process[_0x378112(0x2a1)](_0x5c41c5);}),jobCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x1f2))['description'](a0_0x4bd715(0x289))[a0_0x4bd715(0x221)](a0_0x4bd715(0x25b),a0_0x4bd715(0x261),a0_0x4bd715(0x287))[a0_0x4bd715(0x221)]('-f,\x20--file\x20<path>',a0_0x4bd715(0x313))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2cf),a0_0x4bd715(0x29d),'information_schema')[a0_0x4bd715(0x2d0)](async(_0x4b8199,_0x521f6f)=>{const _0x474d76=a0_0x4bd715,_0x51ddff=new JobSubmitCommand(),_0x416671=program[_0x474d76(0x244)](),_0x54a139=createTDXInstance(_0x416671),_0x76fa0f=await _0x51ddff[_0x474d76(0x2d5)]({'options':{..._0x416671,..._0x521f6f},'args':_0x4b8199?[_0x4b8199]:[],'tdx':_0x54a139});process['exit'](_0x76fa0f);}),jobCmd['command'](a0_0x4bd715(0x227))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x30d))[a0_0x4bd715(0x2d0)](async(_0x28781d,_0x142d8e)=>{const _0x11805a=a0_0x4bd715,_0x13cf9d=new JobResultCommand(),_0x23c704=program[_0x11805a(0x244)](),_0x46266a=createTDXInstance(_0x23c704),_0x214f8e=await _0x13cf9d[_0x11805a(0x2d5)]({'options':{..._0x23c704,..._0x142d8e},'args':[_0x28781d],'tdx':_0x46266a});process['exit'](_0x214f8e);});const llmCmd=program[a0_0x4bd715(0x207)](a0_0x4bd715(0x239))[a0_0x4bd715(0x2e8)]('LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)');llmCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x2f3))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2c5))[a0_0x4bd715(0x2d0)](async(_0x3254c6,_0x29139c)=>{const _0x55947f=a0_0x4bd715,_0x5a6ce5=new LLMUseCommand(),_0x3b198b=program[_0x55947f(0x244)](),_0x436364=createTDXInstance(_0x3b198b),_0x47f7c9=await _0x5a6ce5[_0x55947f(0x2d5)]({'options':{..._0x3b198b,..._0x29139c},'args':[_0x3254c6],'tdx':_0x436364});process[_0x55947f(0x2a1)](_0x47f7c9);}),llmCmd[a0_0x4bd715(0x207)]('models')['description'](a0_0x4bd715(0x278))[a0_0x4bd715(0x2d0)](async _0xe3e9f0=>{const _0x1ab9d2=a0_0x4bd715,_0x12ffbe=new LLMModelsCommand(),_0x4aa6fd=program[_0x1ab9d2(0x244)](),_0x45e458=createTDXInstance(_0x4aa6fd),_0x2b37b8=await _0x12ffbe[_0x1ab9d2(0x2d5)]({'options':{..._0x4aa6fd,..._0xe3e9f0},'args':[],'tdx':_0x45e458});process[_0x1ab9d2(0x2a1)](_0x2b37b8);}),llmCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x275))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x26d))[a0_0x4bd715(0x2d0)](async(_0x4a516f,_0x4a9deb)=>{const _0x5d153e=a0_0x4bd715,_0x3756dd=new LLMProjectsCommand(),_0x59d880=program[_0x5d153e(0x244)](),_0xa6b72d=createTDXInstance(_0x59d880),_0x9ab688=await _0x3756dd[_0x5d153e(0x2d5)]({'options':{..._0x59d880,..._0x4a9deb},'args':_0x4a516f?[_0x4a516f]:[],'tdx':_0xa6b72d});process[_0x5d153e(0x2a1)](_0x9ab688);});const projectCmd=llmCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x211))[a0_0x4bd715(0x2e8)]('LLM\x20project\x20management');projectCmd[a0_0x4bd715(0x207)]('create\x20<name>')[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x21f))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2f7),a0_0x4bd715(0x2f6))[a0_0x4bd715(0x2d0)](async(_0x2e0e44,_0x3ff995)=>{const _0x37a363=a0_0x4bd715,_0xbd472e=new LLMProjectCreateCommand(),_0x997645=program[_0x37a363(0x244)](),_0x53d928=createTDXInstance(_0x997645),_0x4a708c=await _0xbd472e[_0x37a363(0x2d5)]({'options':{..._0x997645,..._0x3ff995},'args':[_0x2e0e44],'tdx':_0x53d928});process[_0x37a363(0x2a1)](_0x4a708c);}),projectCmd['command']('delete\x20<name>')[a0_0x4bd715(0x2e8)]('Delete\x20an\x20LLM\x20project')[a0_0x4bd715(0x2d0)](async(_0x3c0e7b,_0x2f3d68)=>{const _0x154b95=a0_0x4bd715,_0x1898ed=new LLMProjectDeleteCommand(),_0x2c978f=program[_0x154b95(0x244)](),_0x11880a=createTDXInstance(_0x2c978f),_0x1251de=await _0x1898ed[_0x154b95(0x2d5)]({'options':{..._0x2c978f,..._0x2f3d68},'args':[_0x3c0e7b],'tdx':_0x11880a});process[_0x154b95(0x2a1)](_0x1251de);}),llmCmd['command'](a0_0x4bd715(0x1f6))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2ee))[a0_0x4bd715(0x2d0)](async(_0x186d54,_0x2191b9)=>{const _0x99eadb=a0_0x4bd715,_0x41220f=new LLMAgentsCommand(),_0x13670a=program[_0x99eadb(0x244)](),_0x1f6448=createTDXInstance(_0x13670a),_0x3ec3e9=await _0x41220f[_0x99eadb(0x2d5)]({'options':{..._0x13670a,..._0x2191b9},'args':_0x186d54?[_0x186d54]:[],'tdx':_0x1f6448});process['exit'](_0x3ec3e9);});const agentCmd=llmCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x286))[a0_0x4bd715(0x2e8)]('LLM\x20agent\x20management');agentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x2d2))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2ec))[a0_0x4bd715(0x2d0)](async(_0x1e9eec,_0x20148f)=>{const _0x1994fb=a0_0x4bd715,_0x2c06c8=new LLMAgentShowCommand(),_0x2e469b=program['opts'](),_0x3592f3=createTDXInstance(_0x2e469b),_0x148f29=await _0x2c06c8[_0x1994fb(0x2d5)]({'options':{..._0x2e469b,..._0x20148f},'args':[_0x1e9eec],'tdx':_0x3592f3});process[_0x1994fb(0x2a1)](_0x148f29);}),agentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x2b5))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x1ff))[a0_0x4bd715(0x221)](a0_0x4bd715(0x31e),'System\x20prompt/instructions\x20(default:\x20empty)')[a0_0x4bd715(0x221)](a0_0x4bd715(0x262),'Model\x20type\x20(default:\x20claude-4.5-sonnet)','claude-4.5-sonnet')[a0_0x4bd715(0x221)](a0_0x4bd715(0x2ca),a0_0x4bd715(0x27b))['option'](a0_0x4bd715(0x251),a0_0x4bd715(0x254),'4')[a0_0x4bd715(0x221)](a0_0x4bd715(0x2d9),a0_0x4bd715(0x2dd),a0_0x4bd715(0x213))['action'](async(_0x4dc4aa,_0x3e0afc)=>{const _0x4d0a80=a0_0x4bd715,_0x5b4ef2=new LLMAgentCreateCommand(),_0x269646=program['opts'](),_0x5a474d=createTDXInstance(_0x269646),_0x110501=await _0x5b4ef2[_0x4d0a80(0x2d5)]({'options':{..._0x269646,..._0x3e0afc},'args':[_0x4dc4aa],'tdx':_0x5a474d});process['exit'](_0x110501);}),agentCmd[a0_0x4bd715(0x207)](a0_0x4bd715(0x27c))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x2c2))['option'](a0_0x4bd715(0x295),a0_0x4bd715(0x24f))[a0_0x4bd715(0x221)](a0_0x4bd715(0x214),a0_0x4bd715(0x208))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2f7),'Agent\x20description')[a0_0x4bd715(0x221)](a0_0x4bd715(0x2ca),a0_0x4bd715(0x27b))['action'](async(_0x51bf25,_0x48dddf)=>{const _0x83d78=a0_0x4bd715,_0x202515=new LLMAgentUpdateCommand(),_0xa677dd=program['opts'](),_0x19e264=createTDXInstance(_0xa677dd),_0x26685d=await _0x202515['run']({'options':{..._0xa677dd,..._0x48dddf},'args':[_0x51bf25],'tdx':_0x19e264});process[_0x83d78(0x2a1)](_0x26685d);}),agentCmd[a0_0x4bd715(0x207)]('delete\x20<agent-name>')[a0_0x4bd715(0x2e8)]('Delete\x20an\x20agent')[a0_0x4bd715(0x2d0)](async(_0x290b21,_0x310dc5)=>{const _0x34f2ee=a0_0x4bd715,_0x3d4ad0=new LLMAgentDeleteCommand(),_0x5e6281=program['opts'](),_0x50f4a7=createTDXInstance(_0x5e6281),_0x45b02e=await _0x3d4ad0[_0x34f2ee(0x2d5)]({'options':{..._0x5e6281,..._0x310dc5},'args':[_0x290b21],'tdx':_0x50f4a7});process[_0x34f2ee(0x2a1)](_0x45b02e);}),llmCmd['command'](a0_0x4bd715(0x22e))['description'](a0_0x4bd715(0x31c))[a0_0x4bd715(0x221)](a0_0x4bd715(0x288),'Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session')[a0_0x4bd715(0x2d0)](async(_0xbc74d2,_0x468415)=>{const _0x4aabb0=a0_0x4bd715,_0x2b8d21=new LLMHistoryCommand(),_0x2e8593=program[_0x4aabb0(0x244)](),_0x13d568=createTDXInstance(_0x2e8593),_0x42fd50=await _0x2b8d21['run']({'options':{..._0x2e8593,..._0x468415},'args':_0xbc74d2?[_0xbc74d2]:[],'tdx':_0x13d568});process[_0x4aabb0(0x2a1)](_0x42fd50);}),llmCmd[a0_0x4bd715(0x207)]('proxy')['description'](a0_0x4bd715(0x336))[a0_0x4bd715(0x221)](a0_0x4bd715(0x329),a0_0x4bd715(0x25c),'4000')[a0_0x4bd715(0x221)](a0_0x4bd715(0x31f),a0_0x4bd715(0x24b))[a0_0x4bd715(0x221)](a0_0x4bd715(0x2af),a0_0x4bd715(0x25e))[a0_0x4bd715(0x2d0)](async _0x144de7=>{const _0x5595cf=a0_0x4bd715,_0x369576=new LLMProxyCommand(),_0x2aa20f=program['opts'](),_0x36981c=createTDXInstance(_0x2aa20f),_0x4fefa7={..._0x144de7,'port':_0x144de7[_0x5595cf(0x284)]?parseInt(_0x144de7[_0x5595cf(0x284)],0xa):undefined},_0x15d6a5=await _0x369576[_0x5595cf(0x2d5)]({'options':{..._0x2aa20f,..._0x4fefa7},'args':[],'tdx':_0x36981c});process[_0x5595cf(0x2a1)](_0x15d6a5);}),program[a0_0x4bd715(0x207)]('claude\x20[args...]')['description']('Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)')[a0_0x4bd715(0x221)](a0_0x4bd715(0x262),a0_0x4bd715(0x2b2),'sonnet')['allowUnknownOption']()[a0_0x4bd715(0x305)](!![])[a0_0x4bd715(0x2d0)](async(_0x9c6dce,_0x28d0e9)=>{const _0x27e230=a0_0x4bd715,_0x58854e=new ClaudeCommand(),_0x17b319=program[_0x27e230(0x244)](),_0xa328ba=createTDXInstance(_0x17b319),_0x3499c8=Array[_0x27e230(0x267)](_0x9c6dce)?_0x9c6dce:[],_0x11667e=await _0x58854e[_0x27e230(0x2d5)]({'options':{..._0x17b319,..._0x28d0e9},'args':_0x3499c8,'tdx':_0xa328ba});process[_0x27e230(0x2a1)](_0x11667e);}),program[a0_0x4bd715(0x207)]('context')[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x331))[a0_0x4bd715(0x221)]('--clear',a0_0x4bd715(0x26f))[a0_0x4bd715(0x2d0)](async _0x283635=>{const _0x1364c9=a0_0x4bd715,_0x4dc668=new ContextCommand(),_0x10e86b=program['opts'](),_0x367a91=await _0x4dc668[_0x1364c9(0x2d5)]({'options':{..._0x10e86b,..._0x283635},'args':[],'tdx':null});process[_0x1364c9(0x2a1)](_0x367a91);}),program[a0_0x4bd715(0x207)](a0_0x4bd715(0x339))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x328))[a0_0x4bd715(0x2d0)](async(_0x321fe1,_0x3db867,_0x585ab0)=>{const _0x28715c=a0_0x4bd715,_0x3587bd=new UseCommand(),_0x5c22be=program[_0x28715c(0x244)](),_0xe0687f=[];if(_0x321fe1)_0xe0687f['push'](_0x321fe1);if(_0x3db867)_0xe0687f[_0x28715c(0x318)](_0x3db867);const _0x2e92c2=await _0x3587bd[_0x28715c(0x2d5)]({'options':{..._0x5c22be,..._0x585ab0},'args':_0xe0687f,'tdx':null});process[_0x28715c(0x2a1)](_0x2e92c2);}),program[a0_0x4bd715(0x207)](a0_0x4bd715(0x294))[a0_0x4bd715(0x2e8)](a0_0x4bd715(0x217))['action'](async _0xda3470=>{const _0x4bc1b6=a0_0x4bd715,_0x196e92=new ProfilesCommand(),_0x44e193=program['opts'](),_0x394837=await _0x196e92[_0x4bc1b6(0x2d5)]({'options':{..._0x44e193,..._0xda3470},'args':[],'tdx':null});process[_0x4bc1b6(0x2a1)](_0x394837);}),program['parse'](process[a0_0x4bd715(0x2c4)]);function a0_0x5a99(){const _0x401aa3=['segment','New\x20segment\x20name','List\x20all\x20available\x20profiles','--jsonl','--in\x20<database>','aliases','--include-retried','--status\x20<status>','Profile\x20to\x20use\x20(overrides\x20active\x20profile)','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','Create\x20a\x20new\x20LLM\x20project','segments\x20[path]','option','279580IddlWa','trace','--site\x20<site>','--behaviors\x20<json>','workflows\x20[project]','result\x20<job-id>','Usage:\x20','--table\x20<table>','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','Show\x20current\x20segment/folder\x20context','show\x20<job-id>','history\x20[chat-id]','--kind\x20<type>','--debug','--limit\x20<number>','Include\x20retried\x20attempts','Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)','api\x20[endpoint]','slice','List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)','kill\x20<job-id>','TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)','llm','Show\x20tasks\x20for\x20an\x20attempt','--name\x20<name>','Filtering\x20rule\x20from\x20JSON\x20file','length','884704vGrgCc','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','tdx','Database\x20to\x20query\x20(default:\x20information_schema)','--new','kill\x20<attempt-id>','opts','argumentTerm','Read\x20SQL\x20query\x20from\x20file','--format\x20<format>','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','argumentDescription','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','filter','Updated\x20timezone','Master\x20database\x20name','Agent\x20name','--data\x20<data>','--max-tool-iterations\x20<n>','pwd','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','Maximum\x20tool\x20iterations\x20(default:\x204)','folder','--agent\x20<ref>','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','after','Start\x20a\x20new\x20chat\x20session','push\x20[project-name-or-dir]','--job-type\x20<type>','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','6082392rOsMhu','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','logs\x20<attempt-id>\x20<task-name>','Show\x20logs\x20for\x20a\x20specific\x20task','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)','--model\x20<name>','--to\x20<timestamp>','query\x20[sql]','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)','Skip\x20validation\x20of\x20.dig\x20files','isArray','site','-d,\x20--database\x20<database>','Kill\x20a\x20running\x20attempt','isTTY','Workflow\x20(Digdag)\x20management\x20commands','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','Skip\x20confirmation\x20prompts','Clear\x20session\x20context','Database\x20to\x20use\x20(overrides\x20context)','databases\x20[pattern]','List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','describe\x20<segment_name>','1167395YEsyGz','projects\x20[pattern]','--skip-validation','TRACE','List\x20available\x20LLM\x20models','--reason\x20<text>','--force','Starter\x20message','update\x20<agent-name>','Create\x20segment\x20folder','132463JrpgrL','List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','padEnd','requiredOption','port','--json','agent','trino','--last','Submit\x20a\x20job','--customer-group\x20<json>','--parent-folder\x20<name>','build-info.json','--timezone\x20<tz>','repeat','--llm-project\x20<name>','Updated\x20description','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','Updated\x20schedule\x20option','logLevel','profiles','--name\x20<text>','subcommandDescription','Updated\x20filtering\x20rule\x20from\x20JSON\x20file','padWidth','attempts\x20[project]','registeredArguments','json','--behaviors-file\x20<file>','Database\x20name\x20(default:\x20information_schema)','jobs','folders\x20<parent_name>','--add-attributes-file\x20<file>','exit',',\x20version\x20','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','INFO','Master\x20table\x20name','Request\x20body\x20as\x20JSON\x20string','parent','Add\x20behaviors\x20from\x20JSON\x20file','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)','Maximum\x20recursion\x20depth\x20(default:\x2010)','Run\x20Trino\x20query\x20with\x20streaming\x20results','utf-8','update\x20<name>','Model\x20name\x20(default:\x20claude-4.5-sonnet)','--agent\x20<name>','workflow','addHelpText','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','--database\x20<db>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','create\x20<name>','--schedule-option\x20<value>','alias','--params\x20<json>','join','--resume-from\x20<task>','options','us01','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','--folder\x20<name>','Show\x20specific\x20attempt\x20details','Parent\x20segment\x20description','--rule-file\x20<file>','Update\x20an\x20existing\x20agent','Move\x20to\x20folder','argv','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','--type\x20<api_type>','CDP\x20segment\x20management\x20commands','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','--revision\x20<revision>','--starter-message\x20<text>','../package.json','\x0aExamples:\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/list\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/show/mydb\x0a\x20\x20$\x20tdx\x20api\x20-X\x20POST\x20--data\x20\x27{\x22query\x22:\x22SELECT\x201\x22}\x27\x20/v3/job/issue/hive/mydb\x0a\x20\x20$\x20tdx\x20api\x20/entities/parent_segments\x20--type\x20cdp\x0a\x20\x20$\x20tdx\x20api\x20/api/workflows\x20--type\x20workflow\x0a','Add\x20attributes\x20from\x20JSON\x20file','Options:','--database\x20<name>','action','retry\x20<session-id|attempt-id>','show\x20<agent-name>','--trace','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','run','-y,\x20--yes','create\x20<parent_name>\x20<folder_name>','attempt\x20<attempt-id>','--temperature\x20<n>','desc','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','Include\x20subtasks\x20in\x20the\x20output','Temperature\x20(0.0-2.0,\x20default:\x200.7)','commandDescription','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','--session\x20<id>','Attributes\x20from\x20JSON\x20file','.dev','Parent\x20folder\x20name\x20for\x20nested\x20folders','AI-native\x20CLI\x20for\x20Treasure\x20Data','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','--attributes-file\x20<file>','description','15954096XptPiz','Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Show\x20agent\x20details','--version','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','-f,\x20--file\x20<path>','buildTime','Filtering\x20rule\x20as\x20JSON\x20string','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','use\x20<project-name>','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','Read\x20request\x20body\x20from\x20file','Project\x20description','--description\x20<text>','--no-color','format','2BWiffh','version','database','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','Customer\x20group\x20as\x20JSON\x20string','--limit\x20<rows>','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','-H,\x20--header\x20<header>','Add\x20behaviors\x20as\x20JSON\x20string','fields\x20<parent_name>','428853jWZDxd','allowExcessArguments','Add\x20attributes\x20as\x20JSON\x20string','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','includes','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','Save\x20output\x20to\x20file','name','preAction','Get\x20job\x20results','Commands:','Kill\x20a\x20job','hook','--output\x20<file>','Attributes\x20as\x20JSON\x20string','Read\x20query\x20from\x20file','--dry-run','Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)','Reason\x20for\x20killing\x20the\x20attempt','job','push','parse','Make\x20segment\x20invisible\x20(default:\x20visible)','--attributes\x20<json>','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','--in\x20<name>','--system-prompt\x20<text>','--project\x20<name>','commandUsage','--rule\x20<json>','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','Enable\x20verbose\x20logging','List\x20jobs','Create\x20parent\x20segment\x20(audience)','required','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','--port\x20<number>','Segment\x20folder\x20management','-d,\x20--database\x20<name>','replace','DEBUG','delete\x20<project-name-or-id>','Trino\x20catalog\x20(default:\x20td)','Preview\x20operation\x20without\x20executing','Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)','Update\x20parent\x20segment\x20(audience)','Behaviors\x20as\x20JSON\x20string','tdx\x20','injectIntoOptions','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)','--no-count-population','apiKey','use\x20[resource]\x20[value]','tasks\x20<attempt-id>','--offset\x20<number>','--schedule-type\x20<type>','Alias\x20for\x20--database\x20(natural\x20language\x20style)','submit\x20[query]','-X,\x20--method\x20<method>','Starting\x20offset\x20for\x20logs\x20(default:\x200)','Parent\x20segment\x20(audience)\x20management','agents\x20[pattern]','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','--catalog\x20<catalog>','--profile\x20<name>','-r,\x20--recursive','Revision\x20name\x20(default:\x20timestamp)','GET','Create\x20a\x20new\x20agent\x20in\x20current\x20project','Override\x20project\x20name','activations\x20<segment_name>','map','Show\x20job\x20details','--invisible','Job\x20management\x20commands','describe\x20[table]','command','Agent\x20prompt/instructions','List\x20available\x20fields\x20for\x20segmentation','hidden','url','optionTerm','Customer\x20group\x20from\x20JSON\x20file','gitRevision','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','help','project','Describe\x20table\x20schema','0.7','--prompt\x20<text>'];a0_0x5a99=function(){return _0x401aa3;};return a0_0x5a99();}!process['argv'][a0_0x4bd715(0x235)](0x2)['length']&&program['outputHelp']();const currentVersion=packageJson[a0_0x4bd715(0x2fb)];process['stderr'][a0_0x4bd715(0x26b)]&&process[a0_0x4bd715(0x2c4)]['length']>0x2&&!currentVersion[a0_0x4bd715(0x308)](a0_0x4bd715(0x2e2))&&checkForUpdate(currentVersion)['then'](_0x1f3e5c=>{_0x1f3e5c&&displayUpdateNotification(_0x1f3e5c);})['catch'](()=>{});
|
|
2
|
+
const a0_0x29b596=a0_0x10c7;(function(_0x479197,_0x46c080){const _0x16963c=a0_0x10c7,_0x33a68f=_0x479197();while(!![]){try{const _0x1e2dc2=-parseInt(_0x16963c(0x1e4))/0x1*(-parseInt(_0x16963c(0x198))/0x2)+parseInt(_0x16963c(0x18e))/0x3+parseInt(_0x16963c(0x18b))/0x4*(-parseInt(_0x16963c(0x1cd))/0x5)+-parseInt(_0x16963c(0x10e))/0x6+parseInt(_0x16963c(0x194))/0x7*(parseInt(_0x16963c(0x1fd))/0x8)+-parseInt(_0x16963c(0x220))/0x9*(parseInt(_0x16963c(0x1c6))/0xa)+parseInt(_0x16963c(0x142))/0xb;if(_0x1e2dc2===_0x46c080)break;else _0x33a68f['push'](_0x33a68f['shift']());}catch(_0x257b9f){_0x33a68f['push'](_0x33a68f['shift']());}}}(a0_0x3ba6,0x8258f));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{LogLevel}from'./utils/tdx-logger.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';function a0_0x10c7(_0xfb1a74,_0x5ce63c){const _0x3ba63e=a0_0x3ba6();return a0_0x10c7=function(_0x10c7d1,_0x3ae8d4){_0x10c7d1=_0x10c7d1-0x106;let _0x249b41=_0x3ba63e[_0x10c7d1];return _0x249b41;},a0_0x10c7(_0xfb1a74,_0x5ce63c);}import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';import{SegmentFieldsCommand}from'./commands/segment-fields-command.js';import{ParentSegmentCreateCommand,ParentSegmentUpdateCommand}from'./commands/parent-segment-command.js';import{SegmentCreateCommand}from'./commands/segment-create-command.js';import{SegmentUpdateCommand}from'./commands/segment-update-command.js';import{SegmentUseCommand}from'./commands/segment-use-command.js';import{SegmentPwdCommand}from'./commands/segment-pwd-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';function a0_0x3ba6(){const _0x24d1f0=['segments\x20[path]','Enable\x20verbose\x20logging','hook','List\x20jobs','parse','Start\x20a\x20new\x20chat\x20session','--format\x20<format>','150fGlhhe','--starter-message\x20<text>','Customer\x20group\x20from\x20JSON\x20file','profiles','required','show\x20<segment_name>','-y,\x20--yes','490JCnZUT','allowExcessArguments','describe\x20<segment_name>','--attributes-file\x20<file>','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','agents\x20[pattern]','tables\x20[pattern]','Model\x20type\x20(default:\x20claude-4.5-sonnet)','Agent\x20name','kill\x20<job-id>','command','Start\x20time\x20filter\x20(ISO\x208601\x20format)','--no-count-population','Clear\x20session\x20context','Job\x20management\x20commands','Show\x20job\x20details','Commands:','.dev','Arguments:','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','api\x20[endpoint]','--add-attributes-file\x20<file>','34489OhNFGd','Master\x20database\x20name','activations\x20<segment_name>','--limit\x20<rows>','--catalog\x20<catalog>','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','--schedule-option\x20<value>','Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)','Update\x20an\x20existing\x20agent','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','claude-4.5-sonnet','delete\x20<name>','push\x20[project-name-or-dir]','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','json','tasks\x20<attempt-id>','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','submit\x20[query]','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','name','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Include\x20retried\x20attempts','--project\x20<name>','Run\x20Trino\x20query\x20with\x20streaming\x20results','1096QHcLjX','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Add\x20attributes\x20from\x20JSON\x20file','-d,\x20--database\x20<database>','--revision\x20<revision>','us01','--to\x20<timestamp>','Behaviors\x20as\x20JSON\x20string','Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)','Starter\x20message','List\x20available\x20fields\x20for\x20segmentation','\x20-\x20built\x20','aliases','workflow','--add-attributes\x20<json>','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','--in\x20<name>','--version','optionTerm','utf-8',',\x20version\x20','Parent\x20segment\x20description','Temperature\x20(0.0-2.0,\x20default:\x200.7)','run','-f,\x20--file\x20<path>','show\x20<agent-name>','argumentTerm','--model\x20<name>','--customer-group\x20<json>','attempt\x20<attempt-id>','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','trino','join','agent','591912qSdXhF','--add-behaviors-file\x20<file>','Alias\x20for\x20--database\x20(natural\x20language\x20style)','Show\x20logs\x20for\x20a\x20specific\x20task','length','--offset\x20<number>','--add-behaviors\x20<json>','injectIntoOptions','--trace','help','result\x20<job-id>','slice','--jsonl','create\x20<segment_name>','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)','Updated\x20schedule\x20option','--attributes\x20<json>','options','--timeout\x20<seconds>','--tsv','--skip-validation','fields\x20<parent_name>','Show\x20current\x20segment/folder\x20context','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','logs\x20<attempt-id>\x20<task-name>','Agent\x20prompt/instructions','database','--rule-file\x20<file>','List\x20workflows\x20(optionally\x20filtered\x20by\x20project)','\x0aExamples:\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/list\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/show/mydb\x0a\x20\x20$\x20tdx\x20api\x20-X\x20POST\x20--data\x20\x27{\x22query\x22:\x22SELECT\x201\x22}\x27\x20/v3/job/issue/hive/mydb\x0a\x20\x20$\x20tdx\x20api\x20/entities/parent_segments\x20--type\x20cdp\x0a\x20\x20$\x20tdx\x20api\x20/api/workflows\x20--type\x20workflow\x0a','New\x20segment\x20name','subcommandDescription','use\x20<path>','Segment\x20folder\x20management','filter','build-info.json','Database\x20name\x20(default:\x20information_schema)','--include-retried','--in\x20<database>','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','segment','--description\x20<text>','Attributes\x20as\x20JSON\x20string','--system-prompt\x20<text>','projects\x20[pattern]','Skip\x20population\x20counting','delete\x20<agent-name>','Reason\x20for\x20killing\x20the\x20attempt','Segment\x20description','Show\x20agent\x20details','Revision\x20name\x20(default:\x20timestamp)','--schedule-type\x20<type>','tdx\x20','3914142hQWkpK','apiKey','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)','--customer-group-file\x20<file>','Filtering\x20rule\x20from\x20JSON\x20file','site','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','--agent\x20<name>','use\x20[resource]\x20[value]','LLM\x20project\x20to\x20use\x20(overrides\x20context)','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','--force','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','action','Model\x20name\x20(default:\x20claude-4.5-sonnet)','--llm-project\x20<name>','jobs','Behaviors\x20from\x20JSON\x20file','outputHelp','Updated\x20description','exit','addHelpText','isArray','opts','Skip\x20validation\x20of\x20.dig\x20files','Agent\x20description','folder','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','Show\x20specific\x20attempt\x20details','hidden','Maximum\x20recursion\x20depth\x20(default:\x2010)','--params\x20<json>','--no-color','Skip\x20confirmation\x20prompts','Create\x20segment\x20folder','desc','AI-native\x20CLI\x20for\x20Treasure\x20Data','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','preAction','Project\x20description','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','System\x20prompt/instructions\x20(default:\x20empty)','Trino\x20catalog\x20(default:\x20td)','List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','0.7','--table\x20<table>','--max-tool-iterations\x20<n>','Read\x20SQL\x20query\x20from\x20file','9675457BBaubn','debug','map','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','requiredOption','update\x20<agent-name>','url','Save\x20output\x20to\x20file','argv','parent','Create\x20a\x20new\x20LLM\x20project','Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)','--dry-run','Make\x20segment\x20invisible\x20(default:\x20visible)','--kind\x20<type>','commandDescription','after','version','Options:','commands','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','--debug','claude\x20[args...]','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Read\x20request\x20body\x20from\x20file','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','create\x20<parent_name>\x20<folder_name>','GET','includes','-H,\x20--header\x20<header>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','pwd','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','-v,\x20--verbose','show\x20<folder_ref>','Set\x20operation\x20timeout\x20in\x20seconds','padWidth','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)','Parent\x20segment\x20(audience)\x20management','tsv','Kill\x20a\x20job','proxy','subcommandTerm','--max-depth\x20<depth>','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','--data\x20<data>','--rule\x20<json>','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','TRACE','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)','context','--from\x20<timestamp>','gitRevision','attempts\x20[project]','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','history\x20[chat-id]','Update\x20child\x20segment\x20(use\x20parent_name/child_name)','describe\x20[table]','databases\x20[pattern]','Filtering\x20rule\x20as\x20JSON\x20string','Describe\x20table\x20schema','../package.json','Customer\x20group\x20as\x20JSON\x20string','logLevel','--include-subtasks','jsonl','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','Starting\x20offset\x20for\x20logs\x20(default:\x200)','Move\x20to\x20folder','Create\x20parent\x20segment\x20(audience)','680yWiNVn','--from-task\x20<task>','Submit\x20a\x20job','2867229AZtSPQ','--database\x20<name>','Attributes\x20from\x20JSON\x20file','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','--invisible','chat\x20[message...]','16331mOuiXo','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','llm','Parent\x20folder\x20name\x20for\x20nested\x20folders','2tfSpOm','allowUnknownOption','port','commandUsage','--temperature\x20<n>','--status\x20<status>','End\x20time\x20filter\x20(ISO\x208601\x20format)','format','Master\x20table\x20name','retry\x20<session-id|attempt-id>','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','models','then','trace','push','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','Updated\x20timezone','Add\x20behaviors\x20as\x20JSON\x20string','--site\x20<site>','--prompt\x20<text>','folders\x20<parent_name>','--limit\x20<number>','option','Preview\x20operation\x20without\x20executing','List\x20available\x20LLM\x20models','List\x20all\x20available\x20profiles','Request\x20body\x20as\x20JSON\x20string','description','create\x20<name>','Add\x20behaviors\x20from\x20JSON\x20file','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','Maximum\x20tool\x20iterations\x20(default:\x204)','Folder\x20description','Add\x20attributes\x20as\x20JSON\x20string','--behaviors\x20<json>','4000','configureHelp','alias','--folder\x20<name>'];a0_0x3ba6=function(){return _0x24d1f0;};return a0_0x3ba6();}import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';import{checkForUpdate,displayUpdateNotification}from'./utils/version-check.js';const __filename=fileURLToPath(import.meta[a0_0x29b596(0x148)]),__dirname=dirname(__filename),packageJson=JSON['parse'](readFileSync(join(__dirname,a0_0x29b596(0x182)),'utf-8'));let buildInfo={};try{buildInfo=JSON[a0_0x29b596(0x1c3)](readFileSync(join(__dirname,a0_0x29b596(0x243)),a0_0x29b596(0x211)));}catch{}if(process[a0_0x29b596(0x14a)][a0_0x29b596(0x15f)](a0_0x29b596(0x20f))){let versionOutput=a0_0x29b596(0x10d)+packageJson[a0_0x29b596(0x153)];buildInfo[a0_0x29b596(0x179)]&&(versionOutput+='\x20('+buildInfo[a0_0x29b596(0x179)]+')'),buildInfo['buildTime']&&(versionOutput+=a0_0x29b596(0x209)+buildInfo['buildTime']),console['log'](versionOutput),process[a0_0x29b596(0x125)](0x0);}const program=new Command();let description=a0_0x29b596(0x135);buildInfo[a0_0x29b596(0x179)]?description+=a0_0x29b596(0x212)+packageJson['version']+'\x20('+buildInfo[a0_0x29b596(0x179)]+')':description+=a0_0x29b596(0x212)+packageJson[a0_0x29b596(0x153)];program[a0_0x29b596(0x1f8)]('tdx')[a0_0x29b596(0x1b3)](description),program[a0_0x29b596(0x1ae)](a0_0x29b596(0x1aa),'TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)',a0_0x29b596(0x203))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1c5),a0_0x29b596(0x14d))[a0_0x29b596(0x1ae)]('--json',a0_0x29b596(0x1ea))[a0_0x29b596(0x1ae)](a0_0x29b596(0x22c),a0_0x29b596(0x1d1))[a0_0x29b596(0x1ae)](a0_0x29b596(0x233),a0_0x29b596(0x11b))[a0_0x29b596(0x1ae)]('--output\x20<file>',a0_0x29b596(0x149))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1ad),'Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)')[a0_0x29b596(0x1ae)]('--color',a0_0x29b596(0x12c),![])['option'](a0_0x29b596(0x131),a0_0x29b596(0x1e9),![])[a0_0x29b596(0x1ae)](a0_0x29b596(0x166),a0_0x29b596(0x1c0),![])[a0_0x29b596(0x1ae)](a0_0x29b596(0x157),a0_0x29b596(0x1ec))['option'](a0_0x29b596(0x228),a0_0x29b596(0x20d))[a0_0x29b596(0x1ae)](a0_0x29b596(0x232),a0_0x29b596(0x168),'30')[a0_0x29b596(0x1ae)](a0_0x29b596(0x14e),a0_0x29b596(0x1af),![])[a0_0x29b596(0x1ae)](a0_0x29b596(0x1cc),a0_0x29b596(0x132),![])[a0_0x29b596(0x1ae)]('--session\x20<id>','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)')[a0_0x29b596(0x1ae)]('--profile\x20<name>','Profile\x20to\x20use\x20(overrides\x20active\x20profile)')['option']('-d,\x20--database\x20<name>','Database\x20to\x20use\x20(overrides\x20context)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x20e),a0_0x29b596(0x222))[a0_0x29b596(0x1ae)]('--parent-segment\x20<name>','Parent\x20segment\x20to\x20use\x20(overrides\x20context)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x120),a0_0x29b596(0x118)),program[a0_0x29b596(0x1bc)]({'formatHelp':(_0x4ba951,_0x302cbe)=>{const _0x5e697c=a0_0x29b596,_0x30b2c6=_0x302cbe[_0x5e697c(0x169)](_0x4ba951,_0x302cbe),_0x3ca235=0x2,_0x1abf31=0x2;function _0x9a6aba(_0x471525){const _0x340431=_0x5e697c;return!!_0x471525[_0x340431(0x12e)];}function _0x234888(_0x420ec5,_0x1c5ba3){if(_0x1c5ba3){const _0x49a4b5=''+_0x420ec5['padEnd'](_0x30b2c6+_0x1abf31)+_0x1c5ba3;return _0x49a4b5;}return _0x420ec5;}function _0x2f85d9(_0x5c85e4){const _0x24ab71=_0x5e697c;return _0x5c85e4[_0x24ab71(0x21e)]('\x0a')['replace'](/^/gm,'\x20'['repeat'](_0x3ca235));}const _0x5c5122=[];_0x5c5122[_0x5e697c(0x1a6)]('Usage:\x20'+_0x302cbe[_0x5e697c(0x19b)](_0x4ba951));const _0xd3da6d=_0x302cbe[_0x5e697c(0x151)](_0x4ba951);_0xd3da6d&&(_0x5c5122['push'](''),_0x5c5122['push'](_0xd3da6d));const _0x3b47d7=_0x4ba951[_0x5e697c(0x155)]['filter'](_0x5f267d=>!_0x9a6aba(_0x5f267d));if(_0x3b47d7[_0x5e697c(0x224)]>0x0){const _0x2be782=_0x3b47d7['map'](_0x5bada9=>{const _0xafed6e=_0x5e697c,_0x12ffb9=_0x302cbe[_0xafed6e(0x16f)](_0x5bada9),_0x3e4ae7=_0x302cbe[_0xafed6e(0x23f)](_0x5bada9);return _0x234888(_0x12ffb9,_0x3e4ae7);});_0x5c5122[_0x5e697c(0x1a6)](''),_0x5c5122[_0x5e697c(0x1a6)](_0x5e697c(0x1dd)),_0x5c5122['push'](_0x2f85d9(_0x2be782));}const _0x4c617f=_0x4ba951[_0x5e697c(0x231)][_0x5e697c(0x242)](_0x3786ea=>!_0x9a6aba(_0x3786ea));if(_0x4c617f[_0x5e697c(0x224)]>0x0){const _0x3ce154=_0x4c617f['map'](_0x2d7b97=>{const _0x2a45ab=_0x5e697c,_0x56900d=_0x302cbe[_0x2a45ab(0x210)](_0x2d7b97),_0x3affd3=_0x302cbe['optionDescription'](_0x2d7b97);return _0x234888(_0x56900d,_0x3affd3);});_0x5c5122[_0x5e697c(0x1a6)](''),_0x5c5122['push'](_0x5e697c(0x154)),_0x5c5122['push'](_0x2f85d9(_0x3ce154));}const _0x5dee30=(_0x4ba951['registeredArguments']||[])['filter'](_0x313bd1=>!_0x9a6aba(_0x313bd1));if(_0x5dee30[_0x5e697c(0x224)]>0x0){const _0x4f2045=_0x5dee30[_0x5e697c(0x144)](_0x1441d8=>{const _0x293b72=_0x5e697c,_0x2560ee=_0x302cbe[_0x293b72(0x218)](_0x1441d8),_0x372c98=_0x302cbe['argumentDescription'](_0x1441d8);return _0x234888(_0x2560ee,_0x372c98);});_0x5c5122[_0x5e697c(0x1a6)](''),_0x5c5122[_0x5e697c(0x1a6)](_0x5e697c(0x1df)),_0x5c5122['push'](_0x2f85d9(_0x4f2045));}return _0x5c5122['join']('\x0a');},'subcommandTerm':_0x2151d4=>{const _0xd8379c=a0_0x29b596,_0x4f2850=(_0x2151d4['registeredArguments']||[])[_0xd8379c(0x144)](_0x336dac=>_0x336dac[_0xd8379c(0x1ca)]?'<'+_0x336dac[_0xd8379c(0x1f8)]()+'>':'['+_0x336dac['name']()+']')[_0xd8379c(0x21e)]('\x20'),_0x3a7ecb=_0x2151d4[_0xd8379c(0x20a)](),_0x3e7c6c=_0x3a7ecb['length']>0x0?_0x2151d4[_0xd8379c(0x1f8)]()+',\x20'+_0x3a7ecb[_0xd8379c(0x21e)](',\x20'):_0x2151d4[_0xd8379c(0x1f8)]();return _0x4f2850?_0x3e7c6c+'\x20'+_0x4f2850:_0x3e7c6c;}}),program[a0_0x29b596(0x1c1)](a0_0x29b596(0x138),_0x7b9b16=>{const _0x40d46e=a0_0x29b596,_0x1ffafe=_0x7b9b16[_0x40d46e(0x128)]();if(!_0x1ffafe['format']){if(_0x1ffafe[_0x40d46e(0x1f3)])_0x1ffafe['format']='json';else{if(_0x1ffafe[_0x40d46e(0x186)])_0x1ffafe['format']=_0x40d46e(0x186);else _0x1ffafe[_0x40d46e(0x16c)]&&(_0x1ffafe[_0x40d46e(0x19f)]=_0x40d46e(0x16c));}}_0x1ffafe['in']&&!_0x1ffafe[_0x40d46e(0x23a)]&&(_0x1ffafe[_0x40d46e(0x23a)]=_0x1ffafe['in']);if(_0x1ffafe[_0x40d46e(0x1a5)])_0x1ffafe['logLevel']=LogLevel[_0x40d46e(0x175)];else{if(_0x1ffafe[_0x40d46e(0x143)])_0x1ffafe[_0x40d46e(0x184)]=LogLevel['DEBUG'];else _0x1ffafe['logLevel']===undefined&&(_0x1ffafe[_0x40d46e(0x184)]=LogLevel['INFO']);}});function createTDXInstance(_0x4e3d38){const _0x486e62=a0_0x29b596,_0x4eef56=new GlobalContext(_0x4e3d38);_0x4eef56[_0x486e62(0x227)](_0x4e3d38);const _0x53ffe2={'site':_0x4eef56[_0x486e62(0x114)],'apiKey':_0x4eef56[_0x486e62(0x10f)],'logLevel':_0x4eef56['logLevel']};return new TDX(_0x53ffe2);}program['command'](a0_0x29b596(0x17f))[a0_0x29b596(0x1b3)](a0_0x29b596(0x247))[a0_0x29b596(0x11e)](async(_0x3c6a04,_0x4c6448)=>{const _0x40e8a7=a0_0x29b596,_0x21822f=new DatabasesCommand(),_0x26c929=program[_0x40e8a7(0x128)](),_0x298610=createTDXInstance(_0x26c929),_0x73eb90=await _0x21822f['run']({'options':{..._0x26c929,..._0x4c6448},'args':_0x3c6a04?[_0x3c6a04]:[],'tdx':_0x298610});process['exit'](_0x73eb90);}),program['command'](a0_0x29b596(0x193))[a0_0x29b596(0x1b3)](a0_0x29b596(0x22e))[a0_0x29b596(0x1ae)]('--agent\x20<ref>','Agent\x20reference\x20(project-name/agent-name)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x219),a0_0x29b596(0x11f))['option'](a0_0x29b596(0x19c),a0_0x29b596(0x214))[a0_0x29b596(0x1ae)]('--new',a0_0x29b596(0x1c4))[a0_0x29b596(0x11e)](async(_0x16a9a5,_0x2dda0a)=>{const _0x1e8c6e=a0_0x29b596,_0x413249=new ChatCommand(),_0x35bc99=program['opts'](),_0x544b75=createTDXInstance(_0x35bc99),_0x30516e=await _0x413249[_0x1e8c6e(0x215)]({'options':{..._0x35bc99,..._0x2dda0a},'args':_0x16a9a5,'tdx':_0x544b75});process[_0x1e8c6e(0x125)](_0x30516e);});const apiCmd=program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1e2))['summary'](a0_0x29b596(0x1b6))[a0_0x29b596(0x126)](a0_0x29b596(0x152),a0_0x29b596(0x23d))[a0_0x29b596(0x1ae)]('-X,\x20--method\x20<method>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)',a0_0x29b596(0x15e))[a0_0x29b596(0x1ae)](a0_0x29b596(0x172),a0_0x29b596(0x1b2))['option'](a0_0x29b596(0x216),a0_0x29b596(0x15b))['option'](a0_0x29b596(0x160),a0_0x29b596(0x1a2),(_0x532e5e,_0x52812f)=>{return _0x52812f?[..._0x52812f,_0x532e5e]:[_0x532e5e];})[a0_0x29b596(0x1ae)]('--type\x20<api_type>',a0_0x29b596(0x21c),'td')[a0_0x29b596(0x11e)](async(_0x1a821e,_0x1ffba6)=>{const _0x20f7cc=a0_0x29b596;if(!_0x1a821e){apiCmd[_0x20f7cc(0x229)]();return;}const _0xdb7aa8=new ApiCommand(),_0x4a6b66=program[_0x20f7cc(0x128)](),_0x58b6b1=createTDXInstance(_0x4a6b66),_0x48d1c1=await _0xdb7aa8[_0x20f7cc(0x215)]({'options':{..._0x4a6b66,..._0x1ffba6},'args':[_0x1a821e],'tdx':_0x58b6b1});process['exit'](_0x48d1c1);});program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1d3))[a0_0x29b596(0x1b3)]('List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)')['option'](a0_0x29b596(0x201),'Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)')['option']('--in\x20<database>',a0_0x29b596(0x222))[a0_0x29b596(0x11e)](async(_0x3006a9,_0x3580e7)=>{const _0x5e4137=a0_0x29b596,_0x11ed18=new TablesCommand(),_0x1d2b29=program[_0x5e4137(0x128)](),_0x3fc820=createTDXInstance(_0x1d2b29);_0x3580e7['in']&&(_0x3580e7['database']=_0x3580e7['in']);const _0x244651=await _0x11ed18[_0x5e4137(0x215)]({'options':{..._0x1d2b29,..._0x3580e7},'args':_0x3006a9?[_0x3006a9]:[],'tdx':_0x3fc820});process[_0x5e4137(0x125)](_0x244651);}),program[a0_0x29b596(0x1d7)]('show\x20[table]')[a0_0x29b596(0x1b3)](a0_0x29b596(0x119))[a0_0x29b596(0x1ae)](a0_0x29b596(0x201),'Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x246),a0_0x29b596(0x222))['action'](async(_0x1ac09c,_0x2ff65b)=>{const _0x3195c5=a0_0x29b596,_0x49e497=new ShowCommand(),_0x197204=program[_0x3195c5(0x128)](),_0x3eb64e=createTDXInstance(_0x197204);_0x2ff65b['in']&&(_0x2ff65b[_0x3195c5(0x23a)]=_0x2ff65b['in']);const _0x15a6b6=await _0x49e497['run']({'options':{..._0x197204,..._0x2ff65b},'args':_0x1ac09c?[_0x1ac09c]:[],'tdx':_0x3eb64e});process[_0x3195c5(0x125)](_0x15a6b6);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x17e))[a0_0x29b596(0x1bd)](a0_0x29b596(0x134))[a0_0x29b596(0x1b3)](a0_0x29b596(0x181))['option'](a0_0x29b596(0x201),a0_0x29b596(0x161))[a0_0x29b596(0x1ae)](a0_0x29b596(0x246),a0_0x29b596(0x222))[a0_0x29b596(0x11e)](async(_0x51a9f8,_0x2aeacb)=>{const _0x563e4f=a0_0x29b596,_0x3bf980=new DescribeCommand(),_0x41250e=program[_0x563e4f(0x128)](),_0x39beed=createTDXInstance(_0x41250e);_0x2aeacb['in']&&(_0x2aeacb['database']=_0x2aeacb['in']);const _0x517150=await _0x3bf980[_0x563e4f(0x215)]({'options':{..._0x41250e,..._0x2aeacb},'args':_0x51a9f8?[_0x51a9f8]:[],'tdx':_0x39beed});process[_0x563e4f(0x125)](_0x517150);}),program[a0_0x29b596(0x1d7)]('query\x20[sql]')[a0_0x29b596(0x1b3)](a0_0x29b596(0x1fc))[a0_0x29b596(0x1ae)](a0_0x29b596(0x201),'Database\x20to\x20query\x20(default:\x20information_schema)')[a0_0x29b596(0x1ae)]('--in\x20<database>',a0_0x29b596(0x222))['option'](a0_0x29b596(0x1e8),a0_0x29b596(0x13c))[a0_0x29b596(0x1ae)](a0_0x29b596(0x216),a0_0x29b596(0x141))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1e7),a0_0x29b596(0x187),'40')['action'](async(_0x36da2d,_0x40f090)=>{const _0x2c9524=a0_0x29b596,_0x1c3fb1=new QueryCommand(),_0x141c74=program['opts'](),_0x30e1da=createTDXInstance(_0x141c74);_0x40f090['in']&&(_0x40f090[_0x2c9524(0x23a)]=_0x40f090['in']);const _0x567c2c=await _0x1c3fb1[_0x2c9524(0x215)]({'options':{..._0x141c74,..._0x40f090},'args':_0x36da2d?[_0x36da2d]:[],'tdx':_0x30e1da});process[_0x2c9524(0x125)](_0x567c2c);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1bf))[a0_0x29b596(0x1b3)](a0_0x29b596(0x11a))['option']('-r,\x20--recursive',a0_0x29b596(0x145))['option'](a0_0x29b596(0x170),a0_0x29b596(0x12f),'10')['action'](async(_0x1b2906,_0x5d4f62)=>{const _0x29a665=a0_0x29b596,_0x280b7d=new SegmentsCommand(),_0x4b5f41=program[_0x29a665(0x128)](),_0x193f16=createTDXInstance(_0x4b5f41),_0x15de74=await _0x280b7d[_0x29a665(0x215)]({'options':{..._0x4b5f41,..._0x5d4f62},'args':_0x1b2906?[_0x1b2906]:[],'tdx':_0x193f16});process[_0x29a665(0x125)](_0x15de74);});const segmentCmd=program['command'](a0_0x29b596(0x248))[a0_0x29b596(0x1b3)]('CDP\x20segment\x20management\x20commands');segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x240))[a0_0x29b596(0x1b3)](a0_0x29b596(0x162))[a0_0x29b596(0x11e)](async(_0x2443c3,_0x4f3bc8)=>{const _0x464fc4=a0_0x29b596,_0x4f1c75=new SegmentUseCommand(),_0x2dfa59=program['opts'](),_0x22efbe=createTDXInstance(_0x2dfa59),_0x3faa0e=await _0x4f1c75[_0x464fc4(0x215)]({'options':{..._0x2dfa59,..._0x4f3bc8},'args':[_0x2443c3],'tdx':_0x22efbe});process[_0x464fc4(0x125)](_0x3faa0e);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x163))[a0_0x29b596(0x1b3)](a0_0x29b596(0x236))[a0_0x29b596(0x11e)](async _0x4a1796=>{const _0x44b649=a0_0x29b596,_0x11f51d=new SegmentPwdCommand(),_0x5144d9=program[_0x44b649(0x128)](),_0x3cfa56=createTDXInstance(_0x5144d9),_0xdd8475=await _0x11f51d['run']({'options':{..._0x5144d9,..._0x4a1796},'args':[],'tdx':_0x3cfa56});process['exit'](_0xdd8475);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1cf))[a0_0x29b596(0x1bd)](a0_0x29b596(0x134))[a0_0x29b596(0x1b3)](a0_0x29b596(0x195))[a0_0x29b596(0x11e)](async(_0x1f54aa,_0x384b69)=>{const _0x2d4fa4=a0_0x29b596,_0x31384f=new SegmentDescribeCommand(),_0x490844=program[_0x2d4fa4(0x128)](),_0x532966=createTDXInstance(_0x490844),_0x453304=await _0x31384f[_0x2d4fa4(0x215)]({'options':{..._0x490844,..._0x384b69},'args':[_0x1f54aa],'tdx':_0x532966});process['exit'](_0x453304);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1cb))[a0_0x29b596(0x1b3)](a0_0x29b596(0x165))['action'](async(_0x106027,_0x540084)=>{const _0x5af8c2=a0_0x29b596,_0x2f4704=new SegmentShowCommand(),_0x2d820b=program[_0x5af8c2(0x128)](),_0x1ef8a3=createTDXInstance(_0x2d820b),_0x172b69=await _0x2f4704[_0x5af8c2(0x215)]({'options':{..._0x2d820b,..._0x540084},'args':[_0x106027],'tdx':_0x1ef8a3});process['exit'](_0x172b69);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1ac))[a0_0x29b596(0x1b3)]('List\x20segment\x20folders\x20under\x20a\x20parent\x20segment')[a0_0x29b596(0x11e)](async(_0x54ab5d,_0x29e2e2)=>{const _0x544919=a0_0x29b596,_0x76f782=new SegmentFolderListCommand(),_0x23eb2f=program['opts'](),_0x235f86=createTDXInstance(_0x23eb2f),_0x3e7e14=await _0x76f782['run']({'options':{..._0x23eb2f,..._0x29e2e2},'args':[_0x54ab5d],'tdx':_0x235f86});process[_0x544919(0x125)](_0x3e7e14);});const folderCmd=segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x12b))['description'](a0_0x29b596(0x241));folderCmd['command'](a0_0x29b596(0x167))[a0_0x29b596(0x1b3)](a0_0x29b596(0x137))[a0_0x29b596(0x11e)](async(_0x2d33de,_0x12b93a)=>{const _0x24ab70=a0_0x29b596,_0x3dc26c=new SegmentFolderShowCommand(),_0x2fac15=program[_0x24ab70(0x128)](),_0x397c77=createTDXInstance(_0x2fac15),_0x81ea06=await _0x3dc26c[_0x24ab70(0x215)]({'options':{..._0x2fac15,..._0x12b93a},'args':[_0x2d33de],'tdx':_0x397c77});process[_0x24ab70(0x125)](_0x81ea06);}),segmentCmd['command']('sql\x20<segment_name>')[a0_0x29b596(0x1b3)](a0_0x29b596(0x159))[a0_0x29b596(0x11e)](async(_0x415ba1,_0x3026da)=>{const _0x4038a5=a0_0x29b596,_0x397e86=new SegmentSQLCommand(),_0xaa2915=program[_0x4038a5(0x128)](),_0x216d20=createTDXInstance(_0xaa2915),_0x3e2cbe=await _0x397e86[_0x4038a5(0x215)]({'options':{..._0xaa2915,..._0x3026da},'args':[_0x415ba1],'tdx':_0x216d20});process[_0x4038a5(0x125)](_0x3e2cbe);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x235))[a0_0x29b596(0x1b3)](a0_0x29b596(0x208))[a0_0x29b596(0x11e)](async(_0xcac249,_0x3b062a)=>{const _0x551ad7=a0_0x29b596,_0x582922=new SegmentFieldsCommand(),_0x2462fb=program['opts'](),_0x2fc943=createTDXInstance(_0x2462fb),_0x156a6e=await _0x582922[_0x551ad7(0x215)]({'options':{..._0x2462fb,..._0x3b062a},'args':[_0xcac249],'tdx':_0x2fc943});process[_0x551ad7(0x125)](_0x156a6e);}),segmentCmd['command'](a0_0x29b596(0x22d))[a0_0x29b596(0x1b3)](a0_0x29b596(0x164))[a0_0x29b596(0x1ae)](a0_0x29b596(0x249),a0_0x29b596(0x109))[a0_0x29b596(0x1ae)](a0_0x29b596(0x173),a0_0x29b596(0x180))['option'](a0_0x29b596(0x23b),a0_0x29b596(0x113))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1be),'Folder\x20name\x20for\x20organization')['option']('--kind\x20<type>',a0_0x29b596(0x1a7))[a0_0x29b596(0x1ae)](a0_0x29b596(0x192),a0_0x29b596(0x14f))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1d9),a0_0x29b596(0x106))[a0_0x29b596(0x11e)](async(_0x5b70a1,_0x5cb96e)=>{const _0x98d7b3=a0_0x29b596,_0x2aec1d=new SegmentCreateCommand(),_0x58147d=program['opts'](),_0x2e798b=createTDXInstance(_0x58147d),_0x3570ae=await _0x2aec1d[_0x98d7b3(0x215)]({'options':{..._0x58147d,..._0x5cb96e},'args':[_0x5b70a1],'tdx':_0x2e798b});process[_0x98d7b3(0x125)](_0x3570ae);}),segmentCmd[a0_0x29b596(0x1d7)]('update\x20<segment_name>')['description'](a0_0x29b596(0x17d))[a0_0x29b596(0x1ae)]('--name\x20<new_name>',a0_0x29b596(0x23e))['option']('--description\x20<text>',a0_0x29b596(0x124))[a0_0x29b596(0x1ae)]('--rule\x20<json>',a0_0x29b596(0x115))['option'](a0_0x29b596(0x23b),'Updated\x20filtering\x20rule\x20from\x20JSON\x20file')[a0_0x29b596(0x1ae)]('--folder\x20<name>',a0_0x29b596(0x189))[a0_0x29b596(0x1ae)](a0_0x29b596(0x150),a0_0x29b596(0x1a7))[a0_0x29b596(0x11e)](async(_0x39b5d5,_0x9029f2)=>{const _0x4a26f4=a0_0x29b596,_0x8d1f83=new SegmentUpdateCommand(),_0x3bd9eb=program['opts'](),_0x261ad4=createTDXInstance(_0x3bd9eb),_0x505485=await _0x8d1f83[_0x4a26f4(0x215)]({'options':{..._0x3bd9eb,..._0x9029f2},'args':[_0x39b5d5],'tdx':_0x261ad4});process[_0x4a26f4(0x125)](_0x505485);});const parentCmd=segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x14b))[a0_0x29b596(0x1b3)](a0_0x29b596(0x16b));parentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1b4))[a0_0x29b596(0x1b3)](a0_0x29b596(0x18a))[a0_0x29b596(0x146)]('--database\x20<db>',a0_0x29b596(0x1e5))[a0_0x29b596(0x146)](a0_0x29b596(0x13f),a0_0x29b596(0x1a0))['option'](a0_0x29b596(0x249),a0_0x29b596(0x213))[a0_0x29b596(0x1ae)](a0_0x29b596(0x10c),a0_0x29b596(0x1f7))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1eb),a0_0x29b596(0x174))[a0_0x29b596(0x1ae)]('--timezone\x20<tz>','Timezone\x20(e.g.,\x20America/Los_Angeles)')['option'](a0_0x29b596(0x230),a0_0x29b596(0x24a))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1d0),a0_0x29b596(0x190))['option'](a0_0x29b596(0x1ba),a0_0x29b596(0x205))[a0_0x29b596(0x1ae)]('--behaviors-file\x20<file>',a0_0x29b596(0x122))[a0_0x29b596(0x1ae)](a0_0x29b596(0x21a),a0_0x29b596(0x183))[a0_0x29b596(0x1ae)](a0_0x29b596(0x112),a0_0x29b596(0x1c8))[a0_0x29b596(0x11e)](async(_0x53c793,_0x35758b)=>{const _0x78efc6=a0_0x29b596,_0x45572d=new ParentSegmentCreateCommand(),_0x3f4d76=program['opts'](),_0x1e0d26=createTDXInstance(_0x3f4d76),_0x580e4b=await _0x45572d[_0x78efc6(0x215)]({'options':{..._0x3f4d76,..._0x35758b},'args':[_0x53c793],'tdx':_0x1e0d26});process['exit'](_0x580e4b);}),parentCmd[a0_0x29b596(0x1d7)]('update\x20<name>')[a0_0x29b596(0x1b3)]('Update\x20parent\x20segment\x20(audience)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x249),a0_0x29b596(0x124))['option']('--schedule-type\x20<type>',a0_0x29b596(0x1f9))[a0_0x29b596(0x1ae)]('--schedule-option\x20<value>',a0_0x29b596(0x22f))[a0_0x29b596(0x1ae)]('--timezone\x20<tz>',a0_0x29b596(0x1a8))[a0_0x29b596(0x1ae)](a0_0x29b596(0x20c),a0_0x29b596(0x1b9))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1e3),a0_0x29b596(0x200))['option'](a0_0x29b596(0x226),a0_0x29b596(0x1a9))[a0_0x29b596(0x1ae)](a0_0x29b596(0x221),a0_0x29b596(0x1b5))[a0_0x29b596(0x11e)](async(_0xfe3cdc,_0x1a3c65)=>{const _0x22f852=a0_0x29b596,_0x26a522=new ParentSegmentUpdateCommand(),_0x3a9406=program[_0x22f852(0x128)](),_0xf6a1a3=createTDXInstance(_0x3a9406),_0x4ff443=await _0x26a522[_0x22f852(0x215)]({'options':{..._0x3a9406,..._0x1a3c65},'args':[_0xfe3cdc],'tdx':_0xf6a1a3});process[_0x22f852(0x125)](_0x4ff443);}),folderCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x15d))['description'](a0_0x29b596(0x133))[a0_0x29b596(0x1ae)]('--description\x20<text>',a0_0x29b596(0x1b8))[a0_0x29b596(0x1ae)]('--parent-folder\x20<name>',a0_0x29b596(0x197))[a0_0x29b596(0x11e)](async(_0x1245e5,_0xa0d348,_0x2fc3ba)=>{const _0x56a664=a0_0x29b596,_0x121abc=new SegmentFolderCreateCommand(),_0x3a7e45=program['opts'](),_0x59aa32=createTDXInstance(_0x3a7e45),_0x56570c=await _0x121abc[_0x56a664(0x215)]({'options':{..._0x3a7e45,..._0x2fc3ba},'args':[_0x1245e5,_0xa0d348],'tdx':_0x59aa32});process['exit'](_0x56570c);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1e6))['description'](a0_0x29b596(0x191))['action'](async(_0x1cfc59,_0x2e893e)=>{const _0x578794=a0_0x29b596,_0x3f0e7d=new ActivationsCommand(),_0xe73031=program[_0x578794(0x128)](),_0x13bb79=createTDXInstance(_0xe73031),_0xac5895=await _0x3f0e7d[_0x578794(0x215)]({'options':{..._0xe73031,..._0x2e893e},'args':[_0x1cfc59],'tdx':_0x13bb79});process['exit'](_0xac5895);});const workflowCmd=program[a0_0x29b596(0x1d7)](a0_0x29b596(0x20b))[a0_0x29b596(0x1bd)]('wf')[a0_0x29b596(0x1b3)]('Workflow\x20(Digdag)\x20management\x20commands');workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x24c))[a0_0x29b596(0x1b3)](a0_0x29b596(0x13d))[a0_0x29b596(0x11e)](async(_0x265192,_0x228d43)=>{const _0x3e356a=a0_0x29b596,_0x13e57f=new WorkflowProjectsCommand(),_0x5ad3ae=program[_0x3e356a(0x128)](),_0x4fb073=createTDXInstance(_0x5ad3ae),_0x474006=await _0x13e57f['run']({'options':{..._0x5ad3ae,..._0x228d43},'args':_0x265192?[_0x265192]:[],'tdx':_0x4fb073});process['exit'](_0x474006);}),workflowCmd[a0_0x29b596(0x1d7)]('workflows\x20[project]')[a0_0x29b596(0x1bd)]('ls')[a0_0x29b596(0x1b3)](a0_0x29b596(0x23c))[a0_0x29b596(0x11e)](async(_0x35936f,_0x5ef066)=>{const _0x220007=a0_0x29b596,_0x2d6eb1=new WorkflowWorkflowsCommand(),_0x2b03da=program[_0x220007(0x128)](),_0x3b971e=createTDXInstance(_0x2b03da),_0x178241=await _0x2d6eb1['run']({'options':{..._0x2b03da,..._0x5ef066},'args':_0x35936f?[_0x35936f]:[],'tdx':_0x3b971e});process['exit'](_0x178241);}),workflowCmd[a0_0x29b596(0x1d7)]('sessions\x20[project]')[a0_0x29b596(0x1b3)](a0_0x29b596(0x13a))['option']('--status\x20<status>',a0_0x29b596(0x110))['option'](a0_0x29b596(0x178),a0_0x29b596(0x1d8))['option'](a0_0x29b596(0x204),a0_0x29b596(0x19e))['action'](async(_0x1b9e7f,_0x458414)=>{const _0x25b97c=a0_0x29b596,_0x159b89=new WorkflowSessionsCommand(),_0x59b12a=program[_0x25b97c(0x128)](),_0x5a42b0=createTDXInstance(_0x59b12a),_0x342ae8=await _0x159b89[_0x25b97c(0x215)]({'options':{..._0x59b12a,..._0x458414},'args':_0x1b9e7f?[_0x1b9e7f]:[],'tdx':_0x5a42b0});process[_0x25b97c(0x125)](_0x342ae8);}),workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x17a))[a0_0x29b596(0x1b3)]('List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x245),a0_0x29b596(0x1fa))['action'](async(_0x51b9b6,_0x407312)=>{const _0x4582a6=a0_0x29b596,_0xf63ac6=new WorkflowAttemptsCommand(),_0x593cb6=program[_0x4582a6(0x128)](),_0x4f0816=createTDXInstance(_0x593cb6),_0xc91e8f=await _0xf63ac6['run']({'options':{..._0x593cb6,..._0x407312},'args':_0x51b9b6?[_0x51b9b6]:[],'tdx':_0x4f0816});process['exit'](_0xc91e8f);}),workflowCmd['command'](a0_0x29b596(0x21b))['description'](a0_0x29b596(0x12d))['action'](async(_0x3a3764,_0x59726b)=>{const _0x3a4af8=a0_0x29b596,_0x3f8593=new WorkflowAttemptCommand(),_0x34a5e4=program['opts'](),_0x3a92d7=createTDXInstance(_0x34a5e4),_0x184407=await _0x3f8593[_0x3a4af8(0x215)]({'options':{..._0x34a5e4,..._0x59726b},'args':[_0x3a3764],'tdx':_0x3a92d7});process[_0x3a4af8(0x125)](_0x184407);}),workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1f4))[a0_0x29b596(0x1b3)]('Show\x20tasks\x20for\x20an\x20attempt')['option'](a0_0x29b596(0x185),'Include\x20subtasks\x20in\x20the\x20output')['action'](async(_0x5ce8b5,_0x2003d4)=>{const _0x40e3a7=a0_0x29b596,_0x3700d7=new WorkflowTasksCommand(),_0x3f887b=program[_0x40e3a7(0x128)](),_0x2bacba=createTDXInstance(_0x3f887b),_0x18cea6=await _0x3700d7[_0x40e3a7(0x215)]({'options':{..._0x3f887b,..._0x2003d4},'args':[_0x5ce8b5],'tdx':_0x2bacba});process[_0x40e3a7(0x125)](_0x18cea6);}),workflowCmd['command'](a0_0x29b596(0x238))[a0_0x29b596(0x1b3)](a0_0x29b596(0x223))[a0_0x29b596(0x1ae)](a0_0x29b596(0x225),a0_0x29b596(0x188),_0x557889=>parseInt(_0x557889,0xa),0x0)[a0_0x29b596(0x11e)](async(_0x39829f,_0x3d2e0f,_0x138ab4)=>{const _0x398f59=a0_0x29b596,_0x47317e=new WorkflowLogsCommand(),_0xc8d288=program[_0x398f59(0x128)](),_0x5819b5=createTDXInstance(_0xc8d288),_0x3a965e=await _0x47317e[_0x398f59(0x215)]({'options':{..._0xc8d288,..._0x138ab4},'args':[_0x39829f,_0x3d2e0f],'tdx':_0x5819b5});process[_0x398f59(0x125)](_0x3a965e);}),workflowCmd[a0_0x29b596(0x1d7)]('kill\x20<attempt-id>')[a0_0x29b596(0x1b3)]('Kill\x20a\x20running\x20attempt')['option']('--reason\x20<text>',a0_0x29b596(0x108))[a0_0x29b596(0x11e)](async(_0x53f648,_0x33afff)=>{const _0x2c111f=a0_0x29b596,_0x29f938=new WorkflowKillCommand(),_0x281969=program[_0x2c111f(0x128)](),_0x3b0ac1=createTDXInstance(_0x281969),_0x28271a=await _0x29f938[_0x2c111f(0x215)]({'options':{..._0x281969,..._0x33afff},'args':[_0x53f648],'tdx':_0x3b0ac1});process[_0x2c111f(0x125)](_0x28271a);}),workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1a1))['description'](a0_0x29b596(0x1ee))['option'](a0_0x29b596(0x18c),a0_0x29b596(0x237))['option']('--resume-from\x20<task>',a0_0x29b596(0x1fe))[a0_0x29b596(0x1ae)](a0_0x29b596(0x130),a0_0x29b596(0x1e1))[a0_0x29b596(0x1ae)](a0_0x29b596(0x11c),a0_0x29b596(0x206))[a0_0x29b596(0x11e)](async(_0x2b993d,_0xe82283)=>{const _0x3e7f5d=a0_0x29b596,_0x567a83=new WorkflowRetryCommand(),_0x336881=program[_0x3e7f5d(0x128)](),_0x299ab4=createTDXInstance(_0x336881),_0x4337a4=await _0x567a83[_0x3e7f5d(0x215)]({'options':{..._0x336881,..._0xe82283},'args':[_0x2b993d],'tdx':_0x299ab4});process['exit'](_0x4337a4);}),workflowCmd[a0_0x29b596(0x1d7)]('download\x20<project-name>\x20[output-dir]')[a0_0x29b596(0x1b3)](a0_0x29b596(0x1ff))[a0_0x29b596(0x1ae)]('--revision\x20<revision>',a0_0x29b596(0x171))[a0_0x29b596(0x11e)](async(_0x535fff,_0xd609da,_0x49deaf)=>{const _0x5bbb88=a0_0x29b596,_0x12356c=new WorkflowDownloadCommand(),_0x2c112e=program[_0x5bbb88(0x128)](),_0x153f27=createTDXInstance(_0x2c112e),_0x583dda=await _0x12356c['run']({'options':{..._0x2c112e,..._0x49deaf},'args':[_0x535fff,_0xd609da||'.'],'tdx':_0x153f27});process[_0x5bbb88(0x125)](_0x583dda);}),workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1f1))['description']('Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)')[a0_0x29b596(0x1ae)]('--name\x20<name>','Override\x20project\x20name')[a0_0x29b596(0x1ae)](a0_0x29b596(0x202),a0_0x29b596(0x10b))[a0_0x29b596(0x1ae)](a0_0x29b596(0x234),a0_0x29b596(0x129))[a0_0x29b596(0x11e)](async(_0xa06d19,_0x4e1d9c)=>{const _0x6b59f1=new WorkflowPushCommand(),_0x317278=program['opts'](),_0x2474b7=createTDXInstance(_0x317278),_0x477dce=await _0x6b59f1['run']({'options':{..._0x317278,..._0x4e1d9c},'args':_0xa06d19?[_0xa06d19]:[],'tdx':_0x2474b7});process['exit'](_0x477dce);}),workflowCmd['command']('delete\x20<project-name-or-id>')[a0_0x29b596(0x1b3)](a0_0x29b596(0x17b))['action'](async(_0x180b9f,_0x293baf)=>{const _0x33b1f5=a0_0x29b596,_0x111537=new WorkflowDeleteCommand(),_0x4d5f88=program['opts'](),_0x431414=createTDXInstance(_0x4d5f88),_0x2aa3ae=await _0x111537[_0x33b1f5(0x215)]({'options':{..._0x4d5f88,..._0x293baf},'args':[_0x180b9f],'tdx':_0x431414});process[_0x33b1f5(0x125)](_0x2aa3ae);}),program['command'](a0_0x29b596(0x121))[a0_0x29b596(0x1b3)](a0_0x29b596(0x1c2))['option'](a0_0x29b596(0x19d),a0_0x29b596(0x1e0))[a0_0x29b596(0x11e)](async _0xc1e814=>{const _0x186b08=a0_0x29b596,_0x427b2b=new JobListCommand(),_0x2b08b5=program[_0x186b08(0x128)](),_0x216efa=createTDXInstance(_0x2b08b5),_0x394235=await _0x427b2b[_0x186b08(0x215)]({'options':{..._0x2b08b5,..._0xc1e814},'args':[],'tdx':_0x216efa});process[_0x186b08(0x125)](_0x394235);});const jobCmd=program[a0_0x29b596(0x1d7)]('job')[a0_0x29b596(0x1b3)](a0_0x29b596(0x1db));jobCmd['command']('show\x20<job-id>')['description'](a0_0x29b596(0x1dc))[a0_0x29b596(0x11e)](async(_0xc3982a,_0x514adf)=>{const _0x25b39b=a0_0x29b596,_0x13d547=new JobShowCommand(),_0x40f660=program[_0x25b39b(0x128)](),_0x6cc20e=createTDXInstance(_0x40f660),_0x3eeef4=await _0x13d547['run']({'options':{..._0x40f660,..._0x514adf},'args':[_0xc3982a],'tdx':_0x6cc20e});process[_0x25b39b(0x125)](_0x3eeef4);}),jobCmd['command'](a0_0x29b596(0x1d6))['description'](a0_0x29b596(0x16d))[a0_0x29b596(0x11e)](async(_0x42d7e3,_0x4e5acb)=>{const _0x2e53ca=a0_0x29b596,_0x5595fa=new JobKillCommand(),_0x1274f4=program[_0x2e53ca(0x128)](),_0x4aacdb=createTDXInstance(_0x1274f4),_0x820a25=await _0x5595fa['run']({'options':{..._0x1274f4,..._0x4e5acb},'args':[_0x42d7e3],'tdx':_0x4aacdb});process[_0x2e53ca(0x125)](_0x820a25);}),jobCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1f6))['description'](a0_0x29b596(0x18d))[a0_0x29b596(0x1ae)]('--job-type\x20<type>','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)',a0_0x29b596(0x21d))[a0_0x29b596(0x1ae)]('-f,\x20--file\x20<path>','Read\x20query\x20from\x20file')['option'](a0_0x29b596(0x18f),a0_0x29b596(0x244),'information_schema')[a0_0x29b596(0x11e)](async(_0x9a8cd1,_0xf89b7c)=>{const _0x23eb0a=a0_0x29b596,_0xef28f4=new JobSubmitCommand(),_0x2babf3=program[_0x23eb0a(0x128)](),_0x1ea24d=createTDXInstance(_0x2babf3),_0x23b169=await _0xef28f4[_0x23eb0a(0x215)]({'options':{..._0x2babf3,..._0xf89b7c},'args':_0x9a8cd1?[_0x9a8cd1]:[],'tdx':_0x1ea24d});process[_0x23eb0a(0x125)](_0x23b169);}),jobCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x22a))[a0_0x29b596(0x1b3)]('Get\x20job\x20results')['action'](async(_0x1667ff,_0x1372e7)=>{const _0x42052c=a0_0x29b596,_0x4c7826=new JobResultCommand(),_0x276202=program['opts'](),_0x412bc6=createTDXInstance(_0x276202),_0x5693c5=await _0x4c7826[_0x42052c(0x215)]({'options':{..._0x276202,..._0x1372e7},'args':[_0x1667ff],'tdx':_0x412bc6});process[_0x42052c(0x125)](_0x5693c5);});const llmCmd=program[a0_0x29b596(0x1d7)](a0_0x29b596(0x196))[a0_0x29b596(0x1b3)](a0_0x29b596(0x1f2));llmCmd['command']('use\x20<project-name>')[a0_0x29b596(0x1b3)](a0_0x29b596(0x136))['action'](async(_0x3e5250,_0x175ddc)=>{const _0x378680=new LLMUseCommand(),_0x2cb510=program['opts'](),_0x20db02=createTDXInstance(_0x2cb510),_0x26a029=await _0x378680['run']({'options':{..._0x2cb510,..._0x175ddc},'args':[_0x3e5250],'tdx':_0x20db02});process['exit'](_0x26a029);}),llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1a3))[a0_0x29b596(0x1b3)](a0_0x29b596(0x1b0))[a0_0x29b596(0x11e)](async _0x4e7bfc=>{const _0x17d5c5=a0_0x29b596,_0x189f11=new LLMModelsCommand(),_0x51dd3b=program['opts'](),_0x4f5753=createTDXInstance(_0x51dd3b),_0x46d5f2=await _0x189f11[_0x17d5c5(0x215)]({'options':{..._0x51dd3b,..._0x4e7bfc},'args':[],'tdx':_0x4f5753});process[_0x17d5c5(0x125)](_0x46d5f2);}),llmCmd[a0_0x29b596(0x1d7)]('projects\x20[pattern]')[a0_0x29b596(0x1b3)]('List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)')[a0_0x29b596(0x11e)](async(_0x2ab550,_0x140689)=>{const _0x56a87e=a0_0x29b596,_0x4ac536=new LLMProjectsCommand(),_0x4a8e6f=program[_0x56a87e(0x128)](),_0x3bd0c9=createTDXInstance(_0x4a8e6f),_0x44167a=await _0x4ac536[_0x56a87e(0x215)]({'options':{..._0x4a8e6f,..._0x140689},'args':_0x2ab550?[_0x2ab550]:[],'tdx':_0x3bd0c9});process[_0x56a87e(0x125)](_0x44167a);});const projectCmd=llmCmd[a0_0x29b596(0x1d7)]('project')[a0_0x29b596(0x1b3)]('LLM\x20project\x20management');projectCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1b4))[a0_0x29b596(0x1b3)](a0_0x29b596(0x14c))['option']('--description\x20<text>',a0_0x29b596(0x139))[a0_0x29b596(0x11e)](async(_0x109e64,_0x1833f6)=>{const _0x128219=a0_0x29b596,_0x492ca5=new LLMProjectCreateCommand(),_0x4f7780=program[_0x128219(0x128)](),_0xf6037a=createTDXInstance(_0x4f7780),_0x2d0f77=await _0x492ca5[_0x128219(0x215)]({'options':{..._0x4f7780,..._0x1833f6},'args':[_0x109e64],'tdx':_0xf6037a});process[_0x128219(0x125)](_0x2d0f77);}),projectCmd['command'](a0_0x29b596(0x1f0))['description']('Delete\x20an\x20LLM\x20project')[a0_0x29b596(0x11e)](async(_0x117b95,_0x3b7dd2)=>{const _0x50e5c1=a0_0x29b596,_0x41ca46=new LLMProjectDeleteCommand(),_0x3325c5=program[_0x50e5c1(0x128)](),_0x3769bc=createTDXInstance(_0x3325c5),_0x185fd2=await _0x41ca46[_0x50e5c1(0x215)]({'options':{..._0x3325c5,..._0x3b7dd2},'args':[_0x117b95],'tdx':_0x3769bc});process[_0x50e5c1(0x125)](_0x185fd2);}),llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1d2))[a0_0x29b596(0x1b3)]('List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)')[a0_0x29b596(0x11e)](async(_0x40498a,_0x23ad32)=>{const _0x49afff=a0_0x29b596,_0x272a35=new LLMAgentsCommand(),_0x7e7433=program[_0x49afff(0x128)](),_0x5ceacb=createTDXInstance(_0x7e7433),_0xc8ccf5=await _0x272a35['run']({'options':{..._0x7e7433,..._0x23ad32},'args':_0x40498a?[_0x40498a]:[],'tdx':_0x5ceacb});process[_0x49afff(0x125)](_0xc8ccf5);});const agentCmd=llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x21f))[a0_0x29b596(0x1b3)]('LLM\x20agent\x20management');agentCmd['command'](a0_0x29b596(0x217))[a0_0x29b596(0x1b3)](a0_0x29b596(0x10a))[a0_0x29b596(0x11e)](async(_0x57f34c,_0x4859ab)=>{const _0x3ecedf=a0_0x29b596,_0x3ce399=new LLMAgentShowCommand(),_0xf0f3d6=program[_0x3ecedf(0x128)](),_0x5cb885=createTDXInstance(_0xf0f3d6),_0x4ea2b5=await _0x3ce399[_0x3ecedf(0x215)]({'options':{..._0xf0f3d6,..._0x4859ab},'args':[_0x57f34c],'tdx':_0x5cb885});process[_0x3ecedf(0x125)](_0x4ea2b5);}),agentCmd[a0_0x29b596(0x1d7)]('create\x20<name>')[a0_0x29b596(0x1b3)]('Create\x20a\x20new\x20agent\x20in\x20current\x20project')[a0_0x29b596(0x1ae)](a0_0x29b596(0x24b),a0_0x29b596(0x13b))[a0_0x29b596(0x1ae)](a0_0x29b596(0x219),a0_0x29b596(0x1d4),a0_0x29b596(0x1ef))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1c7),a0_0x29b596(0x207))[a0_0x29b596(0x1ae)](a0_0x29b596(0x140),a0_0x29b596(0x1b7),'4')[a0_0x29b596(0x1ae)](a0_0x29b596(0x19c),a0_0x29b596(0x214),a0_0x29b596(0x13e))[a0_0x29b596(0x11e)](async(_0x2723bc,_0x3d30be)=>{const _0x4384b5=a0_0x29b596,_0x3983e8=new LLMAgentCreateCommand(),_0x5e1073=program[_0x4384b5(0x128)](),_0x1c45c3=createTDXInstance(_0x5e1073),_0xaacc29=await _0x3983e8[_0x4384b5(0x215)]({'options':{..._0x5e1073,..._0x3d30be},'args':[_0x2723bc],'tdx':_0x1c45c3});process[_0x4384b5(0x125)](_0xaacc29);}),agentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x147))[a0_0x29b596(0x1b3)](a0_0x29b596(0x1ed))[a0_0x29b596(0x1ae)]('--name\x20<text>',a0_0x29b596(0x1d5))['option'](a0_0x29b596(0x1ab),a0_0x29b596(0x239))[a0_0x29b596(0x1ae)]('--description\x20<text>',a0_0x29b596(0x12a))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1c7),a0_0x29b596(0x207))[a0_0x29b596(0x11e)](async(_0x3e1452,_0x2da971)=>{const _0x21ae00=a0_0x29b596,_0x360de4=new LLMAgentUpdateCommand(),_0x4dd75d=program[_0x21ae00(0x128)](),_0x255211=createTDXInstance(_0x4dd75d),_0x4d7fba=await _0x360de4[_0x21ae00(0x215)]({'options':{..._0x4dd75d,..._0x2da971},'args':[_0x3e1452],'tdx':_0x255211});process[_0x21ae00(0x125)](_0x4d7fba);}),agentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x107))['description']('Delete\x20an\x20agent')[a0_0x29b596(0x11e)](async(_0x59d6ea,_0x116e06)=>{const _0x3caa98=a0_0x29b596,_0x11a017=new LLMAgentDeleteCommand(),_0x4c109d=program[_0x3caa98(0x128)](),_0x4b7ed5=createTDXInstance(_0x4c109d),_0x5afe16=await _0x11a017[_0x3caa98(0x215)]({'options':{..._0x4c109d,..._0x116e06},'args':[_0x59d6ea],'tdx':_0x4b7ed5});process[_0x3caa98(0x125)](_0x5afe16);}),llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x17c))[a0_0x29b596(0x1b3)](a0_0x29b596(0x156))[a0_0x29b596(0x1ae)]('--last','Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session')[a0_0x29b596(0x11e)](async(_0x2778bc,_0x38dcb2)=>{const _0x256bcb=a0_0x29b596,_0x597e2c=new LLMHistoryCommand(),_0x233e3a=program['opts'](),_0x486b32=createTDXInstance(_0x233e3a),_0x223272=await _0x597e2c[_0x256bcb(0x215)]({'options':{..._0x233e3a,..._0x38dcb2},'args':_0x2778bc?[_0x2778bc]:[],'tdx':_0x486b32});process[_0x256bcb(0x125)](_0x223272);}),llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x16e))['description'](a0_0x29b596(0x176))[a0_0x29b596(0x1ae)]('--port\x20<number>',a0_0x29b596(0x15c),a0_0x29b596(0x1bb))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1fb),a0_0x29b596(0x15a))['option'](a0_0x29b596(0x116),'Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)')[a0_0x29b596(0x11e)](async _0xc31f4a=>{const _0x3cc5b3=a0_0x29b596,_0x2faf98=new LLMProxyCommand(),_0x4bbdc6=program[_0x3cc5b3(0x128)](),_0x8edf52=createTDXInstance(_0x4bbdc6),_0x452b59={..._0xc31f4a,'port':_0xc31f4a[_0x3cc5b3(0x19a)]?parseInt(_0xc31f4a[_0x3cc5b3(0x19a)],0xa):undefined},_0x17b695=await _0x2faf98[_0x3cc5b3(0x215)]({'options':{..._0x4bbdc6,..._0x452b59},'args':[],'tdx':_0x8edf52});process['exit'](_0x17b695);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x158))[a0_0x29b596(0x1b3)](a0_0x29b596(0x16a))[a0_0x29b596(0x1ae)](a0_0x29b596(0x219),a0_0x29b596(0x11d),'sonnet')[a0_0x29b596(0x199)]()[a0_0x29b596(0x1ce)](!![])[a0_0x29b596(0x11e)](async(_0x361b6e,_0x55c3ff)=>{const _0x14ed6c=a0_0x29b596,_0x2f7aa0=new ClaudeCommand(),_0xc42441=program['opts'](),_0x53aa5a=createTDXInstance(_0xc42441),_0x54f2be=Array[_0x14ed6c(0x127)](_0x361b6e)?_0x361b6e:[],_0x59faad=await _0x2f7aa0[_0x14ed6c(0x215)]({'options':{..._0xc42441,..._0x55c3ff},'args':_0x54f2be,'tdx':_0x53aa5a});process['exit'](_0x59faad);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x177))[a0_0x29b596(0x1b3)](a0_0x29b596(0x111))[a0_0x29b596(0x1ae)]('--clear',a0_0x29b596(0x1da))[a0_0x29b596(0x11e)](async _0x4fb423=>{const _0x5aff68=a0_0x29b596,_0x5d5f6d=new ContextCommand(),_0x274a72=program['opts'](),_0x312f9c=await _0x5d5f6d[_0x5aff68(0x215)]({'options':{..._0x274a72,..._0x4fb423},'args':[],'tdx':null});process[_0x5aff68(0x125)](_0x312f9c);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x117))['description'](a0_0x29b596(0x1f5))[a0_0x29b596(0x11e)](async(_0x3a9eff,_0x96b397,_0x3a5ee3)=>{const _0x4b8d82=a0_0x29b596,_0x34bcee=new UseCommand(),_0x2a3a9a=program[_0x4b8d82(0x128)](),_0x5c5433=[];if(_0x3a9eff)_0x5c5433['push'](_0x3a9eff);if(_0x96b397)_0x5c5433[_0x4b8d82(0x1a6)](_0x96b397);const _0x128aa4=await _0x34bcee[_0x4b8d82(0x215)]({'options':{..._0x2a3a9a,..._0x3a5ee3},'args':_0x5c5433,'tdx':null});process['exit'](_0x128aa4);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1c9))['description'](a0_0x29b596(0x1b1))[a0_0x29b596(0x11e)](async _0x12069a=>{const _0x36a13b=a0_0x29b596,_0x434002=new ProfilesCommand(),_0x550fd1=program[_0x36a13b(0x128)](),_0x5baf72=await _0x434002[_0x36a13b(0x215)]({'options':{..._0x550fd1,..._0x12069a},'args':[],'tdx':null});process[_0x36a13b(0x125)](_0x5baf72);}),program['parse'](process[a0_0x29b596(0x14a)]);!process['argv'][a0_0x29b596(0x22b)](0x2)['length']&&program[a0_0x29b596(0x123)]();const currentVersion=packageJson['version'];process['stderr']['isTTY']&&process[a0_0x29b596(0x14a)][a0_0x29b596(0x224)]>0x2&&!currentVersion[a0_0x29b596(0x15f)](a0_0x29b596(0x1de))&&checkForUpdate(currentVersion)[a0_0x29b596(0x1a4)](_0x27254b=>{_0x27254b&&displayUpdateNotification(_0x27254b);})['catch'](()=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a1_0x4c5c(){const _0x293a10=['listParentSegments','/segments/query','name','updateSegment','authHeaders','529jaTzDO','data','/segments','getParentSegmentSQL','createSegmentFolder','site','listActivations','2099238nIIyNC','apiKey','/entities/parent_segments/','rule','createdAt','/audiences','updatedAt','2670eLJMDZ','parentFolderId','45dmpvmC','/entities/parent_segments','createSegment','application/vnd.treasuredata.v1+json','GET','/entities/folders/','request','7325170lCTXSP','122392POZNJQ','query','POST','PUT','application/json','getSegmentFolder','isArray','/segments/','description','/audiences/','/folders','getSegment','httpClient','updateParentSegment','sql','1793820spiRjm','/syndications','10122yDJMjA','2611WgEdPw','87904rbaNdx','getSegmentSQL'];a1_0x4c5c=function(){return _0x293a10;};return a1_0x4c5c();}const a1_0x302579=a1_0x54d8;function a1_0x54d8(_0x3e06a6,_0x5b5357){const _0x4c5ced=a1_0x4c5c();return a1_0x54d8=function(_0x54d892,_0x5d2395){_0x54d892=_0x54d892-0x1ca;let _0x32a7d6=_0x4c5ced[_0x54d892];return _0x32a7d6;},a1_0x54d8(_0x3e06a6,_0x5b5357);}(function(_0x5d12c6,_0xb6d9d4){const _0x56cafd=a1_0x54d8,_0x58f031=_0x5d12c6();while(!![]){try{const _0x10af7f=-parseInt(_0x56cafd(0x1dc))/0x1*(parseInt(_0x56cafd(0x1ea))/0x2)+parseInt(_0x56cafd(0x1e3))/0x3+-parseInt(_0x56cafd(0x1d5))/0x4+parseInt(_0x56cafd(0x1d1))/0x5+-parseInt(_0x56cafd(0x1d3))/0x6*(parseInt(_0x56cafd(0x1d4))/0x7)+parseInt(_0x56cafd(0x1f4))/0x8*(-parseInt(_0x56cafd(0x1ec))/0x9)+parseInt(_0x56cafd(0x1f3))/0xa;if(_0x10af7f===_0xb6d9d4)break;else _0x58f031['push'](_0x58f031['shift']());}catch(_0x13193e){_0x58f031['push'](_0x58f031['shift']());}}}(a1_0x4c5c,0x572e2));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class CDPClient{[a1_0x302579(0x1ce)];[a1_0x302579(0x1db)];constructor(_0x48bb01,_0x3de6f3){const _0x3d99d8=a1_0x302579,_0x144b69=getEndpoint(_0x48bb01['site'],'cdp');this[_0x3d99d8(0x1db)]=toHeaderRecord(getAuthHeaders(_0x48bb01[_0x3d99d8(0x1e1)],_0x48bb01[_0x3d99d8(0x1e4)])),this[_0x3d99d8(0x1ce)]=new HTTPClient(_0x144b69,{...this[_0x3d99d8(0x1db)],'Accept':_0x3d99d8(0x1ef),'Content-Type':_0x3d99d8(0x1f8)},_0x3de6f3);}async[a1_0x302579(0x1d7)](){const _0x2a5680=a1_0x302579,_0x5599ba=_0x2a5680(0x1ed),_0x4e1a7f=await this[_0x2a5680(0x1ce)][_0x2a5680(0x1f2)]('GET',_0x5599ba);return Array['isArray'](_0x4e1a7f)?_0x4e1a7f:_0x4e1a7f[_0x2a5680(0x1dd)];}async['getParentSegment'](_0x3bf48a){const _0x1dc6fa=a1_0x302579,_0x2744d0=_0x1dc6fa(0x1e5)+_0x3bf48a,_0x52b203=await this[_0x1dc6fa(0x1ce)]['request'](_0x1dc6fa(0x1f0),_0x2744d0);return _0x1dc6fa(0x1dd)in _0x52b203?_0x52b203[_0x1dc6fa(0x1dd)]:_0x52b203;}async['listSegments'](_0x11c93d){const _0x3af855=a1_0x302579,_0x5c1b22=_0x3af855(0x1cb)+_0x11c93d+_0x3af855(0x1de),_0x11c074=await this[_0x3af855(0x1ce)]['request'](_0x3af855(0x1f0),_0x5c1b22);return Array[_0x3af855(0x1fa)](_0x11c074)?_0x11c074:_0x11c074[_0x3af855(0x1dd)];}async[a1_0x302579(0x1cd)](_0x329e33,_0xc3c7c){const _0x48b413=a1_0x302579,_0x4c521e='/audiences/'+_0x329e33+_0x48b413(0x1fb)+_0xc3c7c,_0x575d65=await this[_0x48b413(0x1ce)]['request'](_0x48b413(0x1f0),_0x4c521e);return _0x48b413(0x1dd)in _0x575d65?_0x575d65[_0x48b413(0x1dd)]:_0x575d65;}async['listSegmentFolders'](_0x2bee52){const _0x1576e4=a1_0x302579,_0x40c2cc='/audiences/'+_0x2bee52+_0x1576e4(0x1cc),_0x542f71=await this[_0x1576e4(0x1ce)][_0x1576e4(0x1f2)](_0x1576e4(0x1f0),_0x40c2cc);return Array[_0x1576e4(0x1fa)](_0x542f71)?_0x542f71:_0x542f71[_0x1576e4(0x1dd)];}async[a1_0x302579(0x1f9)](_0x4a2504){const _0x29722a=a1_0x302579,_0x30b4f0=_0x29722a(0x1f1)+_0x4a2504,_0x29c9d1=await this['httpClient']['request'](_0x29722a(0x1f0),_0x30b4f0);return _0x29722a(0x1dd)in _0x29c9d1?_0x29c9d1['data']:_0x29c9d1;}async[a1_0x302579(0x1e2)](_0x3bbb5b,_0x3803ae){const _0x3026a9=a1_0x302579,_0xe24d9f=_0x3026a9(0x1cb)+_0x3bbb5b+_0x3026a9(0x1fb)+_0x3803ae+_0x3026a9(0x1d2),_0x22de0e=await this[_0x3026a9(0x1ce)][_0x3026a9(0x1f2)](_0x3026a9(0x1f0),_0xe24d9f);return Array[_0x3026a9(0x1fa)](_0x22de0e)?_0x22de0e:_0x22de0e[_0x3026a9(0x1dd)];}async[a1_0x302579(0x1df)](_0x4ee6f2){const _0x38d85b=a1_0x302579,_0x2a41aa=_0x38d85b(0x1cb)+_0x4ee6f2+_0x38d85b(0x1d8),_0x3cf58d=await this['httpClient'][_0x38d85b(0x1f2)]('POST',_0x2a41aa,{'body':{'format':_0x38d85b(0x1d0)}});return _0x3cf58d['sql']||_0x3cf58d[_0x38d85b(0x1f5)]||'';}async[a1_0x302579(0x1d6)](_0x24eaca,_0x248ea3){const _0x523b3b=a1_0x302579,_0x111533=await this[_0x523b3b(0x1cd)](_0x24eaca,_0x248ea3),_0x48c7ae={'format':_0x523b3b(0x1d0)};'rule'in _0x111533&&_0x111533[_0x523b3b(0x1e6)]&&(_0x48c7ae[_0x523b3b(0x1e6)]=_0x111533[_0x523b3b(0x1e6)]);const _0x74853b='/audiences/'+_0x24eaca+_0x523b3b(0x1d8),_0x6388c=await this[_0x523b3b(0x1ce)][_0x523b3b(0x1f2)]('POST',_0x74853b,{'body':_0x48c7ae});return _0x6388c[_0x523b3b(0x1d0)]||_0x6388c['query']||'';}async['createParentSegment'](_0x2c4692){const _0x4abdfa=a1_0x302579,_0x3544e9=_0x4abdfa(0x1e8),_0x2f4cc1=await this[_0x4abdfa(0x1ce)][_0x4abdfa(0x1f2)](_0x4abdfa(0x1f6),_0x3544e9,{'body':_0x2c4692,'headers':{'Content-Type':_0x4abdfa(0x1ef)}});return _0x2f4cc1;}async[a1_0x302579(0x1cf)](_0x115145,_0x8113ff){const _0x133177=a1_0x302579,_0x15974f=_0x133177(0x1cb)+_0x115145,_0x58c221=await this[_0x133177(0x1ce)][_0x133177(0x1f2)](_0x133177(0x1f7),_0x15974f,{'body':_0x8113ff,'headers':{'Content-Type':_0x133177(0x1ef)}});return _0x58c221;}async['getParentSegmentFull'](_0x1fc7d5){const _0x9c4980=a1_0x302579,_0x2204c0='/audiences/'+_0x1fc7d5,_0x34cc45=await this[_0x9c4980(0x1ce)][_0x9c4980(0x1f2)](_0x9c4980(0x1f0),_0x2204c0,{'headers':{'Accept':_0x9c4980(0x1ef)}});return _0x34cc45;}async[a1_0x302579(0x1ee)](_0x302f45,_0xb97225){const _0x37ab4a=a1_0x302579,_0x3af49d=_0x37ab4a(0x1cb)+_0x302f45+_0x37ab4a(0x1de),_0x2730c4=await this['httpClient'][_0x37ab4a(0x1f2)](_0x37ab4a(0x1f6),_0x3af49d,{'body':_0xb97225});return _0x2730c4;}async[a1_0x302579(0x1da)](_0xe73576,_0x1d4bc4,_0x3739df){const _0x5e29b0=a1_0x302579,_0x322a18=_0x5e29b0(0x1cb)+_0xe73576+'/segments/'+_0x1d4bc4,_0x196e7a=await this[_0x5e29b0(0x1ce)][_0x5e29b0(0x1f2)]('PUT',_0x322a18,{'body':_0x3739df});return _0x196e7a;}async[a1_0x302579(0x1e0)](_0x1e1ba6,_0x83425a){const _0x4f5961=a1_0x302579,_0x5e05a3=_0x4f5961(0x1cb)+_0x1e1ba6+_0x4f5961(0x1cc),_0xee2fc7=await this['httpClient'][_0x4f5961(0x1f2)](_0x4f5961(0x1f6),_0x5e05a3,{'body':_0x83425a});if(_0x4f5961(0x1dd)in _0xee2fc7&&_0xee2fc7[_0x4f5961(0x1dd)]){const _0x471277=_0xee2fc7[_0x4f5961(0x1dd)];return{'id':_0x471277['id'],'name':_0x471277[_0x4f5961(0x1d9)],'description':_0x471277[_0x4f5961(0x1ca)],'audienceId':_0x471277['audienceId']||String(_0x1e1ba6),'parentFolderId':_0x471277[_0x4f5961(0x1eb)],'createdAt':_0x471277[_0x4f5961(0x1e7)],'updatedAt':_0x471277[_0x4f5961(0x1e9)]};}return _0xee2fc7;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x126442=a2_0x229e;(function(_0x54f162,_0x4e7080){const _0x4e54ea=a2_0x229e,_0x192211=_0x54f162();while(!![]){try{const _0x56b037=parseInt(_0x4e54ea(0xd0))/0x1+parseInt(_0x4e54ea(0xad))/0x2+-parseInt(_0x4e54ea(0xd7))/0x3*(parseInt(_0x4e54ea(0xea))/0x4)+parseInt(_0x4e54ea(0xb8))/0x5*(-parseInt(_0x4e54ea(0xcd))/0x6)+parseInt(_0x4e54ea(0xe9))/0x7+-parseInt(_0x4e54ea(0xaa))/0x8*(parseInt(_0x4e54ea(0xc2))/0x9)+parseInt(_0x4e54ea(0xc4))/0xa;if(_0x56b037===_0x4e7080)break;else _0x192211['push'](_0x192211['shift']());}catch(_0x4d7414){_0x192211['push'](_0x192211['shift']());}}}(a2_0x1f35,0x3b36a));import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x3346d3 from'json-bigint';const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function a2_0x1f35(){const _0x57e599=['status','\x0a\x20\x20URL:\x20','535176NLprrr','arraybuffer','Retry-After','30506gxoMJV','Request\x20cancelled\x20by\x20user','detail','stringify','aborted','arrayBuffer','statusText','code','parseProblemDetails','warn','name','309300GvUwvp','trace','AbortError',']\x20Request\x20failed\x20with\x20HTTP\x20','logger','object','addEventListener','parse','retrying\x20in\x20','info','9SUtRBU','sleep','3210680TXUznW','INTERNAL','title','request','debug','application/json','[Retry\x20','get','Request\x20to\x20','36yympHh','body','PERMISSION_DENIED','311186BSQfyh',']\x20Request\x20failed\x20with\x20','baseDelay','Content-Type','Request\x20failed\x20after\x20retries','min','HTTP\x20','21PXZdFe','requestSSE','Request:\x20','\x20failed:\x20','message','abort','forEach','UNAUTHENTICATED','maxRetries','type','Error','headers','baseUrl','UNAVAILABLE','ms...','retryConfig','\x0a\x20\x20Details:\x20','INVALID_ARGUMENT','1474599lNDtZU','101468vtmXzf','string','defaultHeaders','HTTPClientError','problemDetails','maxDelay','combineSignals','Response\x20[','safeParseJSON','signal','pow','text'];a2_0x1f35=function(){return _0x57e599;};return a2_0x1f35();}function isRetryableError(_0x506a57){return _0x506a57>=0x1f4||_0x506a57===0x1ad;}function getRetryDelay(_0x131630,_0xc3f770){const _0x128957=a2_0x229e,_0x36e276=Math[_0x128957(0xd5)](_0xc3f770[_0x128957(0xd2)]*Math[_0x128957(0xa6)](0x2,_0x131630),_0xc3f770[_0x128957(0xa1)]);return Math['random']()*_0x36e276;}function statusCodeToErrorCode(_0x105351){const _0x383fcb=a2_0x229e;if(_0x105351===0x191)return ErrorCode[_0x383fcb(0xde)];else{if(_0x105351===0x193)return ErrorCode[_0x383fcb(0xcf)];else{if(_0x105351===0x194)return ErrorCode['NOT_FOUND'];else{if(_0x105351===0x1ad)return ErrorCode['RATE_LIMITED'];else return _0x105351>=0x1f4?ErrorCode[_0x383fcb(0xe4)]:ErrorCode[_0x383fcb(0xe8)];}}}}export class HTTPClientError extends Error{[a2_0x126442(0xa8)];[a2_0x126442(0xa0)];[a2_0x126442(0xb4)];constructor(_0x3d63b2,_0xd8371c,_0x1034b0){const _0xf0f81d=a2_0x126442,_0x54ce3a=statusCodeToErrorCode(_0xd8371c);super('['+_0x54ce3a+']\x20'+_0x3d63b2),this[_0xf0f81d(0xa8)]=_0xd8371c,this['problemDetails']=_0x1034b0,this[_0xf0f81d(0xb7)]=_0xf0f81d(0x9f),this[_0xf0f81d(0xb4)]=_0x54ce3a;}}function a2_0x229e(_0x51585a,_0x2fc150){const _0x1f3574=a2_0x1f35();return a2_0x229e=function(_0x229e63,_0x39353b){_0x229e63=_0x229e63-0x9d;let _0x551010=_0x1f3574[_0x229e63];return _0x551010;},a2_0x229e(_0x51585a,_0x2fc150);}export class HTTPClient{[a2_0x126442(0xe6)];['baseUrl'];[a2_0x126442(0x9e)];[a2_0x126442(0xbc)];constructor(_0x35ea18,_0x56e09d,_0x3c4d17,_0x215218){const _0x3d04b2=a2_0x126442;this[_0x3d04b2(0xe3)]=_0x35ea18,this[_0x3d04b2(0x9e)]=_0x56e09d,this['retryConfig']={...DEFAULT_RETRY_CONFIG,..._0x215218},this[_0x3d04b2(0xbc)]=_0x3c4d17;}async[a2_0x126442(0xc7)](_0x429a5e,_0x4ada39,_0x4f8ccd={}){const _0x184a40=a2_0x126442,{headers:headers={},body:_0x516fa7,timeout:timeout=0x7530,retries:retries=this[_0x184a40(0xe6)][_0x184a40(0xdf)],signal:_0x44fe64,includeHeaders:includeHeaders=![],responseType:responseType='json'}=_0x4f8ccd,_0x4acaf7=''+this[_0x184a40(0xe3)]+_0x4ada39;this['logger'][_0x184a40(0xc1)](_0x184a40(0xd9)+_0x429a5e+'\x20'+_0x4acaf7);const _0x1b1d5f={...this['defaultHeaders'],...headers};if(_0x516fa7&&!_0x1b1d5f[_0x184a40(0xd3)]){if(_0x516fa7 instanceof Buffer){}else _0x1b1d5f[_0x184a40(0xd3)]=_0x184a40(0xc9);}let _0x458fc8;_0x516fa7&&(_0x516fa7 instanceof Buffer?_0x458fc8=_0x516fa7:_0x458fc8=typeof _0x516fa7===_0x184a40(0x9d)?_0x516fa7:JSON[_0x184a40(0xb0)](_0x516fa7));let _0x5f3052=null;for(let _0x13e4ea=0x0;_0x13e4ea<=retries;_0x13e4ea++){try{const _0x12db3=new AbortController(),_0x230c3f=setTimeout(()=>_0x12db3[_0x184a40(0xdc)](),timeout);if(_0x44fe64){if(_0x44fe64[_0x184a40(0xb1)])throw new Error(_0x184a40(0xae));_0x44fe64[_0x184a40(0xbe)](_0x184a40(0xdc),()=>_0x12db3[_0x184a40(0xdc)](),{'once':!![]});}const _0x527e20=await fetch(_0x4acaf7,{'method':_0x429a5e,'headers':_0x1b1d5f,'body':_0x458fc8,'signal':_0x12db3['signal']});clearTimeout(_0x230c3f);if(_0x13e4ea<retries&&isRetryableError(_0x527e20[_0x184a40(0xa8)])){const _0x50515f=_0x527e20['headers'][_0x184a40(0xcb)](_0x184a40(0xac)),_0x5acdc9=_0x50515f?parseInt(_0x50515f,0xa)*0x3e8:getRetryDelay(_0x13e4ea,this[_0x184a40(0xe6)]);console['warn']('[Retry\x20'+(_0x13e4ea+0x1)+'/'+retries+_0x184a40(0xd1)+_0x527e20[_0x184a40(0xa8)]+',\x20'+('retrying\x20in\x20'+Math['round'](_0x5acdc9)+_0x184a40(0xe5))),await this['sleep'](_0x5acdc9);continue;}if(!_0x527e20['ok']){const _0x5098bd=await this[_0x184a40(0xa4)](_0x527e20),_0x3238c0=this[_0x184a40(0xb5)](_0x5098bd,_0x527e20[_0x184a40(0xa8)]);let _0x45f7b0;if(_0x527e20['status']===0x191)_0x45f7b0=_0x184a40(0xd6)+_0x527e20[_0x184a40(0xa8)]+':\x20'+_0x527e20['statusText']+_0x184a40(0xa9)+_0x4acaf7;else{if(_0x3238c0?.['detail'])_0x45f7b0=_0x3238c0[_0x184a40(0xaf)];else{if(_0x5098bd){const _0x83748f=JSON[_0x184a40(0xb0)](_0x5098bd);_0x45f7b0='HTTP\x20'+_0x527e20['status']+':\x20'+_0x527e20['statusText']+'\x0a\x20\x20Details:\x20'+_0x83748f;}else _0x45f7b0=_0x184a40(0xd6)+_0x527e20['status']+':\x20'+_0x527e20[_0x184a40(0xb3)];}}throw new HTTPClientError(_0x45f7b0,_0x527e20[_0x184a40(0xa8)],_0x3238c0);}let _0x435a38;if(responseType===_0x184a40(0xab)){const _0xcd979b=await _0x527e20[_0x184a40(0xb2)]();_0x435a38=Buffer['from'](_0xcd979b);}else responseType==='text'?_0x435a38=await _0x527e20['text']():_0x435a38=await this[_0x184a40(0xa4)](_0x527e20);this[_0x184a40(0xbc)][_0x184a40(0xc8)](_0x184a40(0xa3)+_0x527e20['status']+']:\x20'+_0x429a5e+'\x20'+_0x4ada39),this[_0x184a40(0xbc)][_0x184a40(0xb9)](JSON[_0x184a40(0xb0)](_0x435a38,null,0x2));if(includeHeaders){const _0x3f18cc={};return _0x527e20[_0x184a40(0xe2)][_0x184a40(0xdd)]((_0x137136,_0x2fe0b6)=>{_0x3f18cc[_0x2fe0b6]=_0x137136;}),{'data':_0x435a38,'status':_0x527e20[_0x184a40(0xa8)],'headers':_0x3f18cc};}return _0x435a38;}catch(_0x9226a5){_0x5f3052=_0x9226a5 instanceof Error?_0x9226a5:new Error(String(_0x9226a5));if(_0x9226a5 instanceof HTTPClientError&&!isRetryableError(_0x9226a5[_0x184a40(0xa8)]))throw _0x9226a5;if(_0x13e4ea>=retries)throw _0x5f3052;const _0x550d99=getRetryDelay(_0x13e4ea,this[_0x184a40(0xe6)]);let _0x128564;_0x5f3052 instanceof HTTPClientError?_0x128564=_0x184a40(0xca)+(_0x13e4ea+0x1)+'/'+retries+_0x184a40(0xbb)+_0x5f3052['status']+':\x20'+_0x5f3052[_0x184a40(0xdb)]+',\x20'+(_0x184a40(0xc0)+Math['round'](_0x550d99)+_0x184a40(0xe5)):_0x128564='[Retry\x20'+(_0x13e4ea+0x1)+'/'+retries+']\x20Request\x20to\x20'+_0x4acaf7+_0x184a40(0xda)+_0x5f3052[_0x184a40(0xdb)]+',\x20'+(_0x184a40(0xc0)+Math['round'](_0x550d99)+'ms...'),console[_0x184a40(0xb6)](_0x128564),await this[_0x184a40(0xc3)](_0x550d99);}}if(_0x5f3052&&!(_0x5f3052 instanceof HTTPClientError))throw new SDKError(ErrorCode['HTTP_REQUEST_FAILURE'],_0x184a40(0xcc)+_0x4acaf7+_0x184a40(0xda)+_0x5f3052[_0x184a40(0xdb)],_0x5f3052);throw _0x5f3052||new SDKError(ErrorCode[_0x184a40(0xc5)],_0x184a40(0xd4));}async['safeParseJSON'](_0x595ad3){const _0x4fe97c=a2_0x126442,_0x4c6074=await _0x595ad3[_0x4fe97c(0xa7)]();if(!_0x4c6074)return null;try{const _0xe5af17=a2_0x3346d3({'storeAsString':!![]});return _0xe5af17[_0x4fe97c(0xbf)](_0x4c6074);}catch{return{'body':_0x4c6074};}}[a2_0x126442(0xb5)](_0x281d62,_0x2333ab){const _0x1c7278=a2_0x126442;if(!_0x281d62||typeof _0x281d62!==_0x1c7278(0xbd))return undefined;const _0x5d7c9c=_0x281d62;if(_0x5d7c9c[_0x1c7278(0xe0)]||_0x5d7c9c['title']||_0x5d7c9c['detail'])return{'type':_0x5d7c9c['type']||'about:blank','title':_0x5d7c9c[_0x1c7278(0xc6)]||_0x1c7278(0xe1),'status':_0x5d7c9c[_0x1c7278(0xa8)]||_0x2333ab,'detail':_0x5d7c9c[_0x1c7278(0xaf)]||'An\x20error\x20occurred','instance':_0x5d7c9c['instance']||'',..._0x5d7c9c};return undefined;}[a2_0x126442(0xc3)](_0x3cc931){return new Promise(_0x6e49c4=>setTimeout(_0x6e49c4,_0x3cc931));}async[a2_0x126442(0xd8)](_0x5126d5,_0x142052,_0x24e85b={}){const _0x2192e3=a2_0x126442,{headers:headers={},body:_0x40943c,timeout:timeout=0x7530,signal:_0x582d95}=_0x24e85b,_0x39651f=''+this['baseUrl']+_0x142052,_0x239862={...this[_0x2192e3(0x9e)],...headers},_0x797d9d=new AbortController(),_0x2dd003=setTimeout(()=>_0x797d9d[_0x2192e3(0xdc)](),timeout),_0x4a40ac=_0x582d95?[_0x797d9d[_0x2192e3(0xa5)],_0x582d95]:[_0x797d9d[_0x2192e3(0xa5)]],_0x16270c=this[_0x2192e3(0xa2)](_0x4a40ac);try{const _0x339161={'method':_0x5126d5,'headers':_0x239862,'signal':_0x16270c};if(_0x40943c){if(typeof _0x40943c===_0x2192e3(0x9d))_0x339161[_0x2192e3(0xce)]=_0x40943c;else _0x40943c instanceof Buffer?_0x339161[_0x2192e3(0xce)]=_0x40943c:_0x339161[_0x2192e3(0xce)]=JSON[_0x2192e3(0xb0)](_0x40943c);}const _0xdba305=await fetch(_0x39651f,_0x339161);clearTimeout(_0x2dd003);if(!_0xdba305['ok']){const _0x3ecf26=await this[_0x2192e3(0xa4)](_0xdba305),_0x4a7985=this[_0x2192e3(0xb5)](_0x3ecf26,_0xdba305[_0x2192e3(0xa8)]);let _0x3282aa;if(_0xdba305['status']===0x191)_0x3282aa='HTTP\x20'+_0xdba305['status']+':\x20'+_0xdba305[_0x2192e3(0xb3)]+'\x0a\x20\x20URL:\x20'+_0x39651f;else{if(_0x4a7985?.[_0x2192e3(0xaf)])_0x3282aa=_0x4a7985['detail'];else{if(_0x3ecf26){const _0x367d3e=JSON['stringify'](_0x3ecf26);_0x3282aa=_0x2192e3(0xd6)+_0xdba305[_0x2192e3(0xa8)]+':\x20'+_0xdba305['statusText']+_0x2192e3(0xe7)+_0x367d3e;}else _0x3282aa='HTTP\x20'+_0xdba305['status']+':\x20'+_0xdba305[_0x2192e3(0xb3)];}}throw new HTTPClientError(_0x3282aa,_0xdba305[_0x2192e3(0xa8)],_0x4a7985);}return _0xdba305;}catch(_0x29528b){clearTimeout(_0x2dd003);if(_0x29528b instanceof HTTPClientError)throw _0x29528b;if(_0x29528b[_0x2192e3(0xb7)]===_0x2192e3(0xba))throw new Error(_0x2192e3(0xae));throw _0x29528b;}}['combineSignals'](_0x475116){const _0x22e003=a2_0x126442,_0x57b00c=new AbortController();for(const _0x441d75 of _0x475116){if(_0x441d75[_0x22e003(0xb1)])return _0x57b00c[_0x22e003(0xdc)](),_0x57b00c['signal'];_0x441d75[_0x22e003(0xbe)](_0x22e003(0xdc),()=>_0x57b00c[_0x22e003(0xdc)](),{'once':!![]});}return _0x57b00c[_0x22e003(0xa5)];}}
|
|
1
|
+
const a2_0xd0012e=a2_0x5e6a;(function(_0x3f0c03,_0x1be56a){const _0x597f9f=a2_0x5e6a,_0x50dc42=_0x3f0c03();while(!![]){try{const _0x10b054=parseInt(_0x597f9f(0x174))/0x1+parseInt(_0x597f9f(0x137))/0x2*(parseInt(_0x597f9f(0x152))/0x3)+parseInt(_0x597f9f(0x145))/0x4+-parseInt(_0x597f9f(0x16a))/0x5*(parseInt(_0x597f9f(0x177))/0x6)+parseInt(_0x597f9f(0x135))/0x7*(-parseInt(_0x597f9f(0x17e))/0x8)+parseInt(_0x597f9f(0x173))/0x9*(parseInt(_0x597f9f(0x13d))/0xa)+-parseInt(_0x597f9f(0x16e))/0xb*(-parseInt(_0x597f9f(0x164))/0xc);if(_0x10b054===_0x1be56a)break;else _0x50dc42['push'](_0x50dc42['shift']());}catch(_0x521ac9){_0x50dc42['push'](_0x50dc42['shift']());}}}(a2_0x2cfc,0x4cb29));import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x56f06d from'json-bigint';function a2_0x5e6a(_0x9b7448,_0x111fef){const _0x2cfc8f=a2_0x2cfc();return a2_0x5e6a=function(_0x5e6a42,_0x219024){_0x5e6a42=_0x5e6a42-0x135;let _0x4ea9a0=_0x2cfc8f[_0x5e6a42];return _0x4ea9a0;},a2_0x5e6a(_0x9b7448,_0x111fef);}const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function isRetryableError(_0x5d32c7){return _0x5d32c7>=0x1f4||_0x5d32c7===0x1ad;}function getRetryDelay(_0xf9d6ab,_0x420a48){const _0x5430cd=a2_0x5e6a,_0x4d831d=Math[_0x5430cd(0x149)](_0x420a48[_0x5430cd(0x175)]*Math['pow'](0x2,_0xf9d6ab),_0x420a48[_0x5430cd(0x147)]);return Math[_0x5430cd(0x156)]()*_0x4d831d;}function a2_0x2cfc(){const _0x4ee0ed=['body','14qlZTiv','name','json','defaultHeaders','arraybuffer','parseProblemDetails','653680fGDTid','HTTPClientError','combineSignals','AbortError','INVALID_ARGUMENT',']\x20Request\x20failed\x20with\x20','from','retryConfig','474072MkMqkl','\x20failed:\x20','maxDelay','title','min','detail','baseUrl','logger','addEventListener','Retry-After','HTTP_REQUEST_FAILURE','string','aborted','70377OxxzaK','get','ms...','about:blank','random','HTTP\x20','stringify','Request\x20to\x20','safeParseJSON','An\x20error\x20occurred',']\x20Request\x20to\x20','abort','headers','problemDetails','signal',']\x20Request\x20failed\x20with\x20HTTP\x20','RATE_LIMITED','maxRetries','1764708jQILAb','\x0a\x20\x20URL:\x20','request','UNAUTHENTICATED','Error','Content-Type','240WSTYwZ','statusText','trace','instance','33vlyzPo','message','retrying\x20in\x20','type','forEach','27HWDFdh','33980TPievW','baseDelay','Request\x20failed\x20after\x20retries','54852JoVUZu','Request\x20cancelled\x20by\x20user','[Retry\x20','sleep','code','text','round','39224sjZPLn','PERMISSION_DENIED','status','287LWCLsr'];a2_0x2cfc=function(){return _0x4ee0ed;};return a2_0x2cfc();}function statusCodeToErrorCode(_0x2b28e6){const _0x51c080=a2_0x5e6a;if(_0x2b28e6===0x191)return ErrorCode[_0x51c080(0x167)];else{if(_0x2b28e6===0x193)return ErrorCode[_0x51c080(0x17f)];else{if(_0x2b28e6===0x194)return ErrorCode['NOT_FOUND'];else{if(_0x2b28e6===0x1ad)return ErrorCode[_0x51c080(0x162)];else return _0x2b28e6>=0x1f4?ErrorCode['UNAVAILABLE']:ErrorCode[_0x51c080(0x141)];}}}}export class HTTPClientError extends Error{[a2_0xd0012e(0x180)];[a2_0xd0012e(0x15f)];['code'];constructor(_0x25cffe,_0x43e3eb,_0x3dfc0d){const _0x46ea2d=a2_0xd0012e,_0x25e251=statusCodeToErrorCode(_0x43e3eb);super('['+_0x25e251+']\x20'+_0x25cffe),this[_0x46ea2d(0x180)]=_0x43e3eb,this[_0x46ea2d(0x15f)]=_0x3dfc0d,this['name']=_0x46ea2d(0x13e),this[_0x46ea2d(0x17b)]=_0x25e251;}}export class HTTPClient{[a2_0xd0012e(0x144)];['baseUrl'];[a2_0xd0012e(0x13a)];[a2_0xd0012e(0x14c)];constructor(_0x4b8690,_0x58a40c,_0x2b8155,_0x220523){const _0x3440a9=a2_0xd0012e;this[_0x3440a9(0x14b)]=_0x4b8690,this[_0x3440a9(0x13a)]=_0x58a40c,this[_0x3440a9(0x144)]={...DEFAULT_RETRY_CONFIG,..._0x220523},this[_0x3440a9(0x14c)]=_0x2b8155;}async[a2_0xd0012e(0x166)](_0x3a15cc,_0x45ae47,_0x6e8caa={}){const _0x1d9f7b=a2_0xd0012e,{headers:headers={},body:_0x21e11a,timeout:timeout=0x7530,retries:retries=this['retryConfig'][_0x1d9f7b(0x163)],signal:_0x582058,includeHeaders:includeHeaders=![],responseType:responseType=_0x1d9f7b(0x139)}=_0x6e8caa,_0x1870bc=''+this[_0x1d9f7b(0x14b)]+_0x45ae47;this[_0x1d9f7b(0x14c)]['info']('Request:\x20'+_0x3a15cc+'\x20'+_0x1870bc);const _0x2d9586={...this['defaultHeaders'],...headers};if(_0x21e11a&&!_0x2d9586[_0x1d9f7b(0x169)]){if(_0x21e11a instanceof Buffer){}else _0x2d9586[_0x1d9f7b(0x169)]='application/json';}let _0x39d525;_0x21e11a&&(_0x21e11a instanceof Buffer?_0x39d525=_0x21e11a:_0x39d525=typeof _0x21e11a===_0x1d9f7b(0x150)?_0x21e11a:JSON[_0x1d9f7b(0x158)](_0x21e11a));let _0x48364f=null;for(let _0x4586aa=0x0;_0x4586aa<=retries;_0x4586aa++){try{const _0x405a97=new AbortController(),_0x3d78e6=setTimeout(()=>_0x405a97[_0x1d9f7b(0x15d)](),timeout);if(_0x582058){if(_0x582058[_0x1d9f7b(0x151)])throw new Error(_0x1d9f7b(0x178));_0x582058[_0x1d9f7b(0x14d)]('abort',()=>_0x405a97['abort'](),{'once':!![]});}const _0x5ad7ae=await fetch(_0x1870bc,{'method':_0x3a15cc,'headers':_0x2d9586,'body':_0x39d525,'signal':_0x405a97[_0x1d9f7b(0x160)]});clearTimeout(_0x3d78e6);if(_0x4586aa<retries&&isRetryableError(_0x5ad7ae[_0x1d9f7b(0x180)])){const _0x1d01f8=_0x5ad7ae[_0x1d9f7b(0x15e)][_0x1d9f7b(0x153)](_0x1d9f7b(0x14e)),_0x3a418b=_0x1d01f8?parseInt(_0x1d01f8,0xa)*0x3e8:getRetryDelay(_0x4586aa,this['retryConfig']);console['warn'](_0x1d9f7b(0x179)+(_0x4586aa+0x1)+'/'+retries+_0x1d9f7b(0x142)+_0x5ad7ae[_0x1d9f7b(0x180)]+',\x20'+(_0x1d9f7b(0x170)+Math['round'](_0x3a418b)+_0x1d9f7b(0x154))),await this[_0x1d9f7b(0x17a)](_0x3a418b);continue;}if(!_0x5ad7ae['ok']){const _0x19fc54=await this[_0x1d9f7b(0x15a)](_0x5ad7ae),_0xc05864=this['parseProblemDetails'](_0x19fc54,_0x5ad7ae['status']);let _0x2497d3;if(_0x5ad7ae[_0x1d9f7b(0x180)]===0x191)_0x2497d3=_0x1d9f7b(0x157)+_0x5ad7ae[_0x1d9f7b(0x180)]+':\x20'+_0x5ad7ae[_0x1d9f7b(0x16b)]+_0x1d9f7b(0x165)+_0x1870bc;else{if(_0xc05864?.[_0x1d9f7b(0x14a)])_0x2497d3=_0xc05864[_0x1d9f7b(0x14a)];else{if(_0x19fc54){const _0x3a77dd=JSON[_0x1d9f7b(0x158)](_0x19fc54);_0x2497d3=_0x1d9f7b(0x157)+_0x5ad7ae[_0x1d9f7b(0x180)]+':\x20'+_0x5ad7ae[_0x1d9f7b(0x16b)]+'\x0a\x20\x20Details:\x20'+_0x3a77dd;}else _0x2497d3='HTTP\x20'+_0x5ad7ae[_0x1d9f7b(0x180)]+':\x20'+_0x5ad7ae[_0x1d9f7b(0x16b)];}}throw new HTTPClientError(_0x2497d3,_0x5ad7ae[_0x1d9f7b(0x180)],_0xc05864);}let _0x3a3427;if(responseType===_0x1d9f7b(0x13b)){const _0x3cb32b=await _0x5ad7ae['arrayBuffer']();_0x3a3427=Buffer[_0x1d9f7b(0x143)](_0x3cb32b);}else responseType==='text'?_0x3a3427=await _0x5ad7ae[_0x1d9f7b(0x17c)]():_0x3a3427=await this[_0x1d9f7b(0x15a)](_0x5ad7ae);this[_0x1d9f7b(0x14c)]['debug']('Response\x20['+_0x5ad7ae['status']+']:\x20'+_0x3a15cc+'\x20'+_0x45ae47),this[_0x1d9f7b(0x14c)][_0x1d9f7b(0x16c)](JSON['stringify'](_0x3a3427,null,0x2));if(includeHeaders){const _0x18439f={};return _0x5ad7ae[_0x1d9f7b(0x15e)][_0x1d9f7b(0x172)]((_0x517a6e,_0x33ffa0)=>{_0x18439f[_0x33ffa0]=_0x517a6e;}),{'data':_0x3a3427,'status':_0x5ad7ae['status'],'headers':_0x18439f};}return _0x3a3427;}catch(_0x58d76b){_0x48364f=_0x58d76b instanceof Error?_0x58d76b:new Error(String(_0x58d76b));if(_0x58d76b instanceof HTTPClientError&&!isRetryableError(_0x58d76b[_0x1d9f7b(0x180)]))throw _0x58d76b;if(_0x4586aa>=retries)throw _0x48364f;const _0x63589b=getRetryDelay(_0x4586aa,this[_0x1d9f7b(0x144)]);let _0x8095b3;_0x48364f instanceof HTTPClientError?_0x8095b3=_0x1d9f7b(0x179)+(_0x4586aa+0x1)+'/'+retries+_0x1d9f7b(0x161)+_0x48364f[_0x1d9f7b(0x180)]+':\x20'+_0x48364f[_0x1d9f7b(0x16f)]+',\x20'+(_0x1d9f7b(0x170)+Math[_0x1d9f7b(0x17d)](_0x63589b)+_0x1d9f7b(0x154)):_0x8095b3='[Retry\x20'+(_0x4586aa+0x1)+'/'+retries+_0x1d9f7b(0x15c)+_0x1870bc+_0x1d9f7b(0x146)+_0x48364f[_0x1d9f7b(0x16f)]+',\x20'+('retrying\x20in\x20'+Math[_0x1d9f7b(0x17d)](_0x63589b)+_0x1d9f7b(0x154)),console['warn'](_0x8095b3),await this[_0x1d9f7b(0x17a)](_0x63589b);}}if(_0x48364f&&!(_0x48364f instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x1d9f7b(0x14f)],_0x1d9f7b(0x159)+_0x1870bc+_0x1d9f7b(0x146)+_0x48364f[_0x1d9f7b(0x16f)],_0x48364f);throw _0x48364f||new SDKError(ErrorCode['INTERNAL'],_0x1d9f7b(0x176));}async[a2_0xd0012e(0x15a)](_0x36ead9){const _0x2b72dc=a2_0xd0012e,_0x58ed21=await _0x36ead9[_0x2b72dc(0x17c)]();if(!_0x58ed21)return null;try{const _0x592711=a2_0x56f06d({'storeAsString':!![]});return _0x592711['parse'](_0x58ed21);}catch{return{'body':_0x58ed21};}}[a2_0xd0012e(0x13c)](_0x20e5ab,_0x4f32ce){const _0x2876d1=a2_0xd0012e;if(!_0x20e5ab||typeof _0x20e5ab!=='object')return undefined;const _0x507346=_0x20e5ab;if(_0x507346[_0x2876d1(0x171)]||_0x507346[_0x2876d1(0x148)]||_0x507346[_0x2876d1(0x14a)])return{'type':_0x507346[_0x2876d1(0x171)]||_0x2876d1(0x155),'title':_0x507346[_0x2876d1(0x148)]||_0x2876d1(0x168),'status':_0x507346[_0x2876d1(0x180)]||_0x4f32ce,'detail':_0x507346[_0x2876d1(0x14a)]||_0x2876d1(0x15b),'instance':_0x507346[_0x2876d1(0x16d)]||'',..._0x507346};return undefined;}[a2_0xd0012e(0x17a)](_0x59d0e5){return new Promise(_0x228bb5=>setTimeout(_0x228bb5,_0x59d0e5));}async['requestSSE'](_0x285a4a,_0x553dc4,_0x47a628={}){const _0x4d7c=a2_0xd0012e,{headers:headers={},body:_0x367c63,timeout:timeout=0x7530,signal:_0x17766b}=_0x47a628,_0x4d8ddc=''+this[_0x4d7c(0x14b)]+_0x553dc4,_0x226c10={...this[_0x4d7c(0x13a)],...headers},_0x5cc6d9=new AbortController(),_0x885e22=setTimeout(()=>_0x5cc6d9[_0x4d7c(0x15d)](),timeout),_0x181d39=_0x17766b?[_0x5cc6d9['signal'],_0x17766b]:[_0x5cc6d9['signal']],_0x3ecb65=this[_0x4d7c(0x13f)](_0x181d39);try{const _0x246b27={'method':_0x285a4a,'headers':_0x226c10,'signal':_0x3ecb65};if(_0x367c63){if(typeof _0x367c63==='string')_0x246b27[_0x4d7c(0x136)]=_0x367c63;else _0x367c63 instanceof Buffer?_0x246b27[_0x4d7c(0x136)]=_0x367c63:_0x246b27[_0x4d7c(0x136)]=JSON[_0x4d7c(0x158)](_0x367c63);}const _0x34d3f9=await fetch(_0x4d8ddc,_0x246b27);clearTimeout(_0x885e22);if(!_0x34d3f9['ok']){const _0x75a9a3=await this[_0x4d7c(0x15a)](_0x34d3f9),_0x12532b=this[_0x4d7c(0x13c)](_0x75a9a3,_0x34d3f9[_0x4d7c(0x180)]);let _0x259cd3;if(_0x34d3f9[_0x4d7c(0x180)]===0x191)_0x259cd3='HTTP\x20'+_0x34d3f9[_0x4d7c(0x180)]+':\x20'+_0x34d3f9['statusText']+_0x4d7c(0x165)+_0x4d8ddc;else{if(_0x12532b?.[_0x4d7c(0x14a)])_0x259cd3=_0x12532b[_0x4d7c(0x14a)];else{if(_0x75a9a3){const _0x1f8c54=JSON[_0x4d7c(0x158)](_0x75a9a3);_0x259cd3=_0x4d7c(0x157)+_0x34d3f9['status']+':\x20'+_0x34d3f9[_0x4d7c(0x16b)]+'\x0a\x20\x20Details:\x20'+_0x1f8c54;}else _0x259cd3=_0x4d7c(0x157)+_0x34d3f9['status']+':\x20'+_0x34d3f9[_0x4d7c(0x16b)];}}throw new HTTPClientError(_0x259cd3,_0x34d3f9[_0x4d7c(0x180)],_0x12532b);}return _0x34d3f9;}catch(_0x5cd5ad){clearTimeout(_0x885e22);if(_0x5cd5ad instanceof HTTPClientError)throw _0x5cd5ad;if(_0x5cd5ad[_0x4d7c(0x138)]===_0x4d7c(0x140))throw new Error('Request\x20cancelled\x20by\x20user');throw _0x5cd5ad;}}[a2_0xd0012e(0x13f)](_0x2f0bd3){const _0x3d59fc=a2_0xd0012e,_0x2f8369=new AbortController();for(const _0x15848f of _0x2f0bd3){if(_0x15848f[_0x3d59fc(0x151)])return _0x2f8369[_0x3d59fc(0x15d)](),_0x2f8369['signal'];_0x15848f[_0x3d59fc(0x14d)](_0x3d59fc(0x15d),()=>_0x2f8369[_0x3d59fc(0x15d)](),{'once':!![]});}return _0x2f8369[_0x3d59fc(0x160)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x4624be=a3_0x1fe1;function a3_0x1fe1(_0x436301,_0x5eb66c){const _0x55ebfb=a3_0x55eb();return a3_0x1fe1=function(_0x1fe1d1,_0x1f84d9){_0x1fe1d1=_0x1fe1d1-0xd7;let _0x321516=_0x55ebfb[_0x1fe1d1];return _0x321516;},a3_0x1fe1(_0x436301,_0x5eb66c);}(function(_0x1a034f,_0x9f0f3f){const _0x4e5ca3=a3_0x1fe1,_0x5b908c=_0x1a034f();while(!![]){try{const _0x2a0cba=parseInt(_0x4e5ca3(0xdd))/0x1+parseInt(_0x4e5ca3(0xe6))/0x2*(-parseInt(_0x4e5ca3(0xe2))/0x3)+-parseInt(_0x4e5ca3(0xda))/0x4+parseInt(_0x4e5ca3(0xe4))/0x5+-parseInt(_0x4e5ca3(0xf1))/0x6+-parseInt(_0x4e5ca3(0x112))/0x7*(parseInt(_0x4e5ca3(0xe9))/0x8)+parseInt(_0x4e5ca3(0xf3))/0x9*(parseInt(_0x4e5ca3(0x11a))/0xa);if(_0x2a0cba===_0x9f0f3f)break;else _0x5b908c['push'](_0x5b908c['shift']());}catch(_0x2416ea){_0x5b908c['push'](_0x5b908c['shift']());}}}(a3_0x55eb,0x4efae));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{parseSSEStream}from'../utils/sse-parser.js';import{ErrorCode,SDKError}from'../sdk/errors.js';export class LLMClient{['httpClient'];[a3_0x4624be(0xf5)];[a3_0x4624be(0xe5)];[a3_0x4624be(0xfd)];constructor(_0x4c8a94,_0x4656fd){const _0x2ae510=a3_0x4624be;this[_0x2ae510(0xf5)]=getEndpoint(_0x4c8a94[_0x2ae510(0xf0)],_0x2ae510(0x109)),this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x4c8a94[_0x2ae510(0xf0)],_0x4c8a94['apiKey'])),this[_0x2ae510(0xfd)]=_0x4656fd,this[_0x2ae510(0x118)]=new HTTPClient(this['baseUrl'],this['authHeaders'],_0x4656fd);}async[a3_0x4624be(0xf9)](){const _0x55e140=a3_0x4624be;return await this['httpClient'][_0x55e140(0xf6)]('GET','/api/users/current_settings');}async[a3_0x4624be(0x10b)](_0x53b99a){const _0x2a71c3=a3_0x4624be,_0x588cba={'data':{'type':_0x2a71c3(0xeb),'attributes':{'name':_0x53b99a[_0x2a71c3(0x10f)],..._0x53b99a['description']&&{'description':_0x53b99a[_0x2a71c3(0x124)]}}}},_0x157075=await this['httpClient'][_0x2a71c3(0xf6)](_0x2a71c3(0x119),_0x2a71c3(0xfa),{'headers':{'Content-Type':'application/vnd.api+json','Accept':_0x2a71c3(0xf2)},'body':_0x588cba});return _0x157075[_0x2a71c3(0xdc)];}async[a3_0x4624be(0xf7)](_0x322a59){const _0x4d8e26=a3_0x4624be,_0x55e091=_0x4d8e26(0xe8)+encodeURIComponent(_0x322a59);await this['httpClient'][_0x4d8e26(0xf6)](_0x4d8e26(0xef),_0x55e091);}async[a3_0x4624be(0x113)](_0x5c1b93=0x32){const _0x309618=a3_0x4624be,_0x160627=[];let _0x1c4b39=_0x309618(0xd9)+_0x5c1b93;while(_0x1c4b39){const _0x183fea=await this[_0x309618(0x118)][_0x309618(0xf6)]('GET',_0x1c4b39);_0x183fea[_0x309618(0xdc)]&&_0x160627[_0x309618(0xe7)](..._0x183fea['data']);_0x1c4b39=_0x183fea[_0x309618(0xfe)]?.[_0x309618(0x115)];if(_0x1c4b39&&_0x1c4b39[_0x309618(0x121)]('http')){const _0x19627d=new URL(_0x1c4b39);_0x1c4b39=_0x19627d['pathname']+_0x19627d[_0x309618(0x10d)];}}return _0x160627;}async[a3_0x4624be(0xfb)](_0x26a916){const _0x434195=a3_0x4624be;let _0x5d9693='/api/agents';_0x26a916&&(_0x5d9693+=_0x434195(0x116)+encodeURIComponent(_0x26a916));const _0x3e027b=await this[_0x434195(0x118)][_0x434195(0xf6)](_0x434195(0x10e),_0x5d9693);return _0x3e027b[_0x434195(0xdc)]||[];}async[a3_0x4624be(0xe3)](_0x4234a3){const _0x1f500f=a3_0x4624be,_0x101fd1=_0x1f500f(0xec)+encodeURIComponent(_0x4234a3),_0x3fe892=await this[_0x1f500f(0x118)][_0x1f500f(0xf6)]('GET',_0x101fd1);return _0x3fe892['data'];}async['createAgent'](_0x3da9c4){const _0x210eea=a3_0x4624be,_0x55938d={'name':_0x3da9c4[_0x210eea(0x10f)],'projectId':_0x3da9c4[_0x210eea(0x125)],'modelType':_0x3da9c4[_0x210eea(0x110)],'maxToolIterations':_0x3da9c4['maxToolIterations']??0x4,'temperature':_0x3da9c4[_0x210eea(0x11d)]??0.7};_0x3da9c4[_0x210eea(0xe0)]!==undefined&&(_0x55938d[_0x210eea(0xe0)]=_0x3da9c4[_0x210eea(0xe0)]);_0x3da9c4[_0x210eea(0xf4)]&&(_0x55938d[_0x210eea(0xf4)]=_0x3da9c4[_0x210eea(0xf4)]);const _0x4f039a={'data':{'type':_0x210eea(0x11b),'attributes':_0x55938d}},_0x32886a=await this['httpClient'][_0x210eea(0xf6)](_0x210eea(0x119),'/api/agents',{'headers':{'Content-Type':_0x210eea(0xf2),'Accept':_0x210eea(0xf2)},'body':_0x4f039a});return _0x32886a[_0x210eea(0xdc)];}async['updateAgent'](_0x492f4f,_0x443beb){const _0x5cb51f=a3_0x4624be,_0x4ba068={'data':{'type':_0x5cb51f(0x11b),'id':_0x492f4f,'attributes':{..._0x443beb['name']&&{'name':_0x443beb[_0x5cb51f(0x10f)]},..._0x443beb['description']&&{'description':_0x443beb[_0x5cb51f(0x124)]},..._0x443beb[_0x5cb51f(0x123)]&&{'prompt':_0x443beb['prompt']},..._0x443beb[_0x5cb51f(0xf4)]&&{'starter_message':_0x443beb[_0x5cb51f(0xf4)]}}}},_0x37bb88=_0x5cb51f(0xec)+encodeURIComponent(_0x492f4f),_0x5714b5=await this[_0x5cb51f(0x118)][_0x5cb51f(0xf6)](_0x5cb51f(0x100),_0x37bb88,{'body':_0x4ba068});return _0x5714b5[_0x5cb51f(0xdc)];}async['deleteAgent'](_0x5af54e){const _0x51a9ac=a3_0x4624be,_0x300299=_0x51a9ac(0xec)+encodeURIComponent(_0x5af54e);await this[_0x51a9ac(0x118)][_0x51a9ac(0xf6)](_0x51a9ac(0xef),_0x300299);}async['listChats'](_0x21046f=0x32){const _0x15b946=a3_0x4624be,_0x164828=new URLSearchParams();_0x164828[_0x15b946(0x101)](_0x15b946(0x120),String(_0x21046f)),_0x164828[_0x15b946(0x101)](_0x15b946(0xf8),'-last_conversation_at');const _0x1cb156=_0x15b946(0xde)+_0x164828[_0x15b946(0x117)](),_0x3efcc5=await this[_0x15b946(0x118)]['request'](_0x15b946(0x10e),_0x1cb156);return _0x3efcc5['data']||[];}async[a3_0x4624be(0x114)](_0x33da8d){const _0x3509d6=a3_0x4624be,_0x385606='/api/chats/'+encodeURIComponent(_0x33da8d),_0x5c70c4=await this['httpClient'][_0x3509d6(0xf6)](_0x3509d6(0x10e),_0x385606);return _0x5c70c4[_0x3509d6(0xdc)];}async[a3_0x4624be(0x11f)](_0x3a688c){const _0x38d130=a3_0x4624be,_0x412a9a=_0x38d130(0x11c)+encodeURIComponent(_0x3a688c)+_0x38d130(0xdb);return await this[_0x38d130(0x118)][_0x38d130(0xf6)](_0x38d130(0x10e),_0x412a9a);}async[a3_0x4624be(0xdf)](_0x675a23){const _0x24670b=a3_0x4624be,_0x4852a8={'data':{'type':_0x24670b(0x126),'attributes':{'agentId':_0x675a23['agentId']}}},_0x5d2fad=0x3,_0x1f5eb7=[0x3e8,0x7d0,0xfa0];for(let _0x529753=0x0;_0x529753<=_0x5d2fad;_0x529753++){const _0x3d33bd=await this[_0x24670b(0x118)]['request'](_0x24670b(0x119),_0x24670b(0x111),{'headers':{'Content-Type':_0x24670b(0xf2),'Accept':_0x24670b(0xf2)},'body':_0x4852a8});if(_0x3d33bd['data']&&_0x3d33bd[_0x24670b(0xdc)]['id'])return _0x3d33bd[_0x24670b(0xdc)];if(_0x529753>=_0x5d2fad)throw new SDKError(ErrorCode[_0x24670b(0xed)],'Failed\x20to\x20create\x20chat\x20after\x20'+(_0x5d2fad+0x1)+_0x24670b(0xd8));const _0x338a83=_0x1f5eb7[_0x529753];console[_0x24670b(0xff)]('[Retry\x20'+(_0x529753+0x1)+'/'+_0x5d2fad+_0x24670b(0x103)+_0x338a83+_0x24670b(0x107)),await new Promise(_0x1d3e4f=>setTimeout(_0x1d3e4f,_0x338a83));}throw new SDKError(ErrorCode[_0x24670b(0xed)],_0x24670b(0x106));}async*['continueChat'](_0x3cd986,_0x4289c9,_0x561cf0){const _0x2bd1fc=a3_0x4624be,_0xdfd79f=_0x4289c9[_0x2bd1fc(0x102)]();if(!_0xdfd79f)throw new SDKError(ErrorCode[_0x2bd1fc(0xd7)],_0x2bd1fc(0x127),undefined,{'helpText':_0x2bd1fc(0x11e)});this[_0x2bd1fc(0xfd)][_0x2bd1fc(0x104)]('Continuing\x20chat\x20'+_0x3cd986+_0x2bd1fc(0x10c)+_0x4289c9[_0x2bd1fc(0xea)]+_0x2bd1fc(0xee));const _0x1858ea='/api/chats/'+encodeURIComponent(_0x3cd986)+'/continue',_0x4d2740={'input':_0x4289c9};try{const _0xcf5518=await this[_0x2bd1fc(0x118)]['requestSSE']('POST',_0x1858ea,{'headers':{'Content-Type':_0x2bd1fc(0x105),'Accept':_0x2bd1fc(0x122)},'body':_0x4d2740,'signal':_0x561cf0});this[_0x2bd1fc(0xfd)]['debug']('['+_0xcf5518['status']+_0x2bd1fc(0x108)+_0x3cd986),yield*parseSSEStream(_0xcf5518);}catch(_0x1008f7){throw new SDKError(ErrorCode[_0x2bd1fc(0xfc)],_0x2bd1fc(0xe1)+_0x3cd986+_0x2bd1fc(0x10a)+_0x4289c9[_0x2bd1fc(0xea)]+')',_0x1008f7);}}}function a3_0x55eb(){const _0x2ee641=['agents','/api/chats/','temperature','Please\x20provide\x20a\x20non-empty\x20message\x20to\x20continue\x20the\x20chat.','getChatHistory','page[limit]','startsWith','text/event-stream','prompt','description','projectId','chats','Message\x20cannot\x20be\x20empty\x20or\x20whitespace\x20only','LLM_EMPTY_MESSAGE','\x20attempts:\x20API\x20returned\x20empty\x20chat\x20ID','/api/projects?page[limit]=','212400TCgiwy','/history','data','53919eXxCUV','/api/chats?','startChat','systemPrompt','Failed\x20to\x20continue\x20chat\x20(chatId:\x20','17274nTzOGv','getAgent','2709555PdpUfI','authHeaders','100JgRJDq','push','/api/projects/','11344ppuwAc','length','projects','/api/agents/','LLM_CHAT_CREATION_FAILURE','\x20characters','DELETE','site','642936PxjxVn','application/vnd.api+json','14166wKceGy','starterMessage','baseUrl','request','deleteProject','sort','getUserSettings','/api/projects','listAgents','LLM_STREAM_ERROR','logger','links','warn','PATCH','append','trim',']\x20Chat\x20creation\x20returned\x20empty\x20ID,\x20retrying\x20in\x20','info','application/json','Failed\x20to\x20create\x20chat:\x20unexpected\x20error','ms...',']\x20Streaming\x20SSE\x20stream\x20for\x20chatId:\x20','llm',',\x20message\x20length:\x20','createProject','\x20with\x20message\x20size:\x20','search','GET','name','modelType','/api/chats','3087dRiNbj','listProjects','getChatInfo','next','?filter[project_id]=','toString','httpClient','POST','5090UrShnk'];a3_0x55eb=function(){return _0x2ee641;};return a3_0x55eb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x1c59d9=a4_0x56d1;(function(_0x41ea88,_0x20554f){const _0x2eadf9=a4_0x56d1,_0x5bef5c=_0x41ea88();while(!![]){try{const _0x4b70b7=-parseInt(_0x2eadf9(0x1b9))/0x1+-parseInt(_0x2eadf9(0x1bb))/0x2+parseInt(_0x2eadf9(0x1b8))/0x3+parseInt(_0x2eadf9(0x1b0))/0x4*(-parseInt(_0x2eadf9(0x1b4))/0x5)+parseInt(_0x2eadf9(0x1b1))/0x6*(-parseInt(_0x2eadf9(0x1ba))/0x7)+parseInt(_0x2eadf9(0x1a8))/0x8*(-parseInt(_0x2eadf9(0x1ab))/0x9)+parseInt(_0x2eadf9(0x1ac))/0xa;if(_0x4b70b7===_0x20554f)break;else _0x5bef5c['push'](_0x5bef5c['shift']());}catch(_0x53bf1f){_0x5bef5c['push'](_0x5bef5c['shift']());}}}(a4_0x5e9e,0x2f300));function a4_0x56d1(_0x1953ac,_0x57dc2a){const _0x5e9e58=a4_0x5e9e();return a4_0x56d1=function(_0x56d1a3,_0x56ebb2){_0x56d1a3=_0x56d1a3-0x1a7;let _0x42f1ba=_0x5e9e58[_0x56d1a3];return _0x42f1ba;},a4_0x56d1(_0x1953ac,_0x57dc2a);}function a4_0x5e9e(){const _0x4d6396=['982709hUgwaj','453132RlQJet','maxRequests','now','8YVRnGu','refillRate','reset','2777049WIsWpF','9626710vOCLsP','maxTokens','tryAcquire','refill','12jNhHVo','6XVedoF','lastRefill','max','147655CyZmEt','windowMs','tokens','sleep','1041810zgTQYl','352554iSwVEy'];a4_0x5e9e=function(){return _0x4d6396;};return a4_0x5e9e();}export class RateLimiter{['tokens'];['lastRefill'];[a4_0x1c59d9(0x1ad)];[a4_0x1c59d9(0x1a9)];constructor(_0x1d2347){const _0x145c4b=a4_0x1c59d9;this[_0x145c4b(0x1ad)]=_0x1d2347[_0x145c4b(0x1bc)],this[_0x145c4b(0x1b6)]=_0x1d2347[_0x145c4b(0x1bc)],this[_0x145c4b(0x1b2)]=Date[_0x145c4b(0x1a7)](),this[_0x145c4b(0x1a9)]=_0x1d2347[_0x145c4b(0x1bc)]/_0x1d2347[_0x145c4b(0x1b5)];}async['acquire'](){const _0xcab9d2=a4_0x1c59d9;while(!![]){this['refill']();if(this[_0xcab9d2(0x1b6)]>=0x1){this[_0xcab9d2(0x1b6)]-=0x1;return;}const _0x4a1dff=Math[_0xcab9d2(0x1b3)](0x1,Math['ceil'](0x1/this[_0xcab9d2(0x1a9)]));await this[_0xcab9d2(0x1b7)](_0x4a1dff);}}[a4_0x1c59d9(0x1ae)](){const _0x29fc82=a4_0x1c59d9;this[_0x29fc82(0x1af)]();if(this[_0x29fc82(0x1b6)]>=0x1)return this[_0x29fc82(0x1b6)]-=0x1,!![];return![];}[a4_0x1c59d9(0x1af)](){const _0x429ffd=a4_0x1c59d9,_0x106e55=Date['now'](),_0x5654b1=_0x106e55-this[_0x429ffd(0x1b2)];if(_0x5654b1>0x0){const _0x4971e7=_0x5654b1*this['refillRate'];this[_0x429ffd(0x1b6)]=Math['min'](this[_0x429ffd(0x1ad)],this[_0x429ffd(0x1b6)]+_0x4971e7),this[_0x429ffd(0x1b2)]=_0x106e55;}}['getAvailableTokens'](){const _0x18f6ea=a4_0x1c59d9;return this[_0x18f6ea(0x1af)](),Math['floor'](this[_0x18f6ea(0x1b6)]);}[a4_0x1c59d9(0x1aa)](){const _0x4b314c=a4_0x1c59d9;this[_0x4b314c(0x1b6)]=this[_0x4b314c(0x1ad)],this['lastRefill']=Date[_0x4b314c(0x1a7)]();}[a4_0x1c59d9(0x1b7)](_0x571b3a){return new Promise(_0xb9695e=>setTimeout(_0xb9695e,_0x571b3a));}}export const defaultRateLimiter=new RateLimiter({'maxRequests':0x64,'windowMs':0xea60});
|