@treasuredata/tdx 0.2.4 → 0.2.5
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_0x55e4f6=a0_0x1bfe;(function(_0x4694ac,_0x1d341b){const _0x4698bb=a0_0x1bfe,_0x2bce13=_0x4694ac();while(!![]){try{const _0x10e878=parseInt(_0x4698bb(0x2ba))/0x1*(parseInt(_0x4698bb(0x22e))/0x2)+parseInt(_0x4698bb(0x288))/0x3+-parseInt(_0x4698bb(0x1c6))/0x4+-parseInt(_0x4698bb(0x27a))/0x5*(parseInt(_0x4698bb(0x211))/0x6)+-parseInt(_0x4698bb(0x22c))/0x7*(parseInt(_0x4698bb(0x27d))/0x8)+parseInt(_0x4698bb(0x21a))/0x9*(-parseInt(_0x4698bb(0x23e))/0xa)+-parseInt(_0x4698bb(0x290))/0xb*(-parseInt(_0x4698bb(0x1a5))/0xc);if(_0x10e878===_0x1d341b)break;else _0x2bce13['push'](_0x2bce13['shift']());}catch(_0x2b1af0){_0x2bce13['push'](_0x2bce13['shift']());}}}(a0_0x22ee,0x813fe));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_0x55e4f6(0x289)]),__dirname=dirname(__filename),packageJson=JSON[a0_0x55e4f6(0x1d2)](readFileSync(join(__dirname,a0_0x55e4f6(0x278)),a0_0x55e4f6(0x28a)));function a0_0x22ee(){const _0x1b745f=['--output\x20<file>','Segment\x20description','Model\x20name\x20(default:\x20claude-4.5-sonnet)','LLM\x20project\x20to\x20use\x20(overrides\x20context)','repeat','--port\x20<number>','--from-task\x20<task>','Parent\x20segment\x20description','Workflow\x20(Digdag)\x20management\x20commands','download\x20<project-name>\x20[output-dir]','--add-behaviors-file\x20<file>','buildTime','Usage:\x20','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Add\x20attributes\x20from\x20JSON\x20file','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Create\x20parent\x20segment\x20(audience)','show\x20<segment_name>','--add-attributes-file\x20<file>','tasks\x20<attempt-id>','allowExcessArguments','.dev','context','36048708REerEr','folders\x20<parent_name>','run','--name\x20<new_name>','aliases','Temperature\x20(0.0-2.0,\x20default:\x200.7)','build-info.json','tables\x20[pattern]','injectIntoOptions','Trino\x20catalog\x20(default:\x20td)','gitRevision','--invisible','Options:','alias','Database\x20to\x20use\x20(overrides\x20context)','AI-native\x20CLI\x20for\x20Treasure\x20Data','TRACE','show\x20<agent-name>','--attributes-file\x20<file>','registeredArguments','Agent\x20name','--attributes\x20<json>','Starting\x20offset\x20for\x20logs\x20(default:\x200)','Filtering\x20rule\x20as\x20JSON\x20string','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','--system-prompt\x20<text>','--in\x20<name>','--new','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','List\x20available\x20LLM\x20models','query\x20[sql]','models','2118588MfxOuJ','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','workflow','exit','Folder\x20description','workflows\x20[project]','--reason\x20<text>','--in\x20<database>','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)','Preview\x20operation\x20without\x20executing','pwd','proxy','parse','Maximum\x20tool\x20iterations\x20(default:\x204)','--skip-validation','-r,\x20--recursive','Create\x20a\x20new\x20LLM\x20project','--add-behaviors\x20<json>','preAction','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','use\x20<project-name>','--include-subtasks','configureHelp','--catalog\x20<catalog>','--llm-project\x20<name>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','Master\x20database\x20name','segment','Skip\x20population\x20counting','--starter-message\x20<text>','--trace','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)','Timezone\x20(e.g.,\x20America/Los_Angeles)','tdx','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','database','System\x20prompt/instructions\x20(default:\x20empty)','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','--job-type\x20<type>','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','profiles','describe\x20<segment_name>','Project\x20description','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','claude-4.5-sonnet','--no-color','--offset\x20<number>','Behaviors\x20from\x20JSON\x20file','Read\x20request\x20body\x20from\x20file','Agent\x20prompt/instructions','--tsv','Enable\x20verbose\x20logging','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','catch','create\x20<name>','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)','--status\x20<status>','--type\x20<api_type>','create\x20<parent_name>\x20<folder_name>','after','Behaviors\x20as\x20JSON\x20string','information_schema','show\x20<job-id>','--version','result\x20<job-id>','show\x20<folder_ref>','--customer-group-file\x20<file>','Show\x20agent\x20details','sessions\x20[project]','LLM\x20agent\x20management','--timeout\x20<seconds>','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','llm','subcommandDescription','282AeFTsD','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','--customer-group\x20<json>','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','filter','4000','option','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','create\x20<segment_name>','9gLNsYX','Create\x20segment\x20folder','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','kill\x20<attempt-id>','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','optionTerm','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','\x20-\x20built\x20','Delete\x20an\x20LLM\x20project','Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)','--debug','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','hidden','Describe\x20table\x20schema','history\x20[chat-id]','addHelpText','requiredOption','7EKXGXS','--clear','2AoYGZr','--schedule-option\x20<value>','Attributes\x20from\x20JSON\x20file','length','Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)','json','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','map','--parent-folder\x20<name>','argv','Start\x20a\x20new\x20chat\x20session','--session\x20<id>','--json','options','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','New\x20segment\x20name','7821790cSKPdA','List\x20workflows\x20(optionally\x20filtered\x20by\x20project)','padWidth','format','Updated\x20schedule\x20option','Model\x20type\x20(default:\x20claude-4.5-sonnet)','replace','site','Alias\x20for\x20--database\x20(natural\x20language\x20style)','--format\x20<format>','--no-count-population','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','optionDescription','Skip\x20validation\x20of\x20.dig\x20files','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','version','--database\x20<db>','Updated\x20timezone','--name\x20<name>','Move\x20to\x20folder','--schedule-type\x20<type>','Agent\x20reference\x20(project-name/agent-name)','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','List\x20available\x20fields\x20for\x20segmentation','--profile\x20<name>','description','trace','Arguments:','agent','--timezone\x20<tz>','Delete\x20an\x20agent',',\x20version\x20','--to\x20<timestamp>','chat\x20[message...]','--name\x20<text>','sonnet','--max-tool-iterations\x20<n>','api\x20[endpoint]','desc','commandUsage','Updated\x20description','Add\x20behaviors\x20from\x20JSON\x20file','--last','delete\x20<name>','List\x20all\x20available\x20profiles','sql\x20<segment_name>','List\x20jobs','--dry-run','includes','claude\x20[args...]','-d,\x20--database\x20<database>','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','--behaviors\x20<json>','--from\x20<timestamp>','--model\x20<name>','--agent\x20<ref>','logs\x20<attempt-id>\x20<task-name>','--prompt\x20<text>','../package.json','opts','102535aeCLbZ','--revision\x20<revision>','Segment\x20folder\x20management','6208376jdYOEb','Starter\x20message','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','--behaviors-file\x20<file>','Make\x20segment\x20invisible\x20(default:\x20visible)','Update\x20child\x20segment\x20(use\x20parent_name/child_name)','padEnd','kill\x20<job-id>','Run\x20Trino\x20query\x20with\x20streaming\x20results','apiKey','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','418530VyDhat','url','utf-8','--agent\x20<name>','--rule-file\x20<file>','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','action','11BWjuSm','--limit\x20<number>','LLM\x20project\x20management','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','Revision\x20name\x20(default:\x20timestamp)','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','jsonl','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)','command','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','Agent\x20description','folder','-X,\x20--method\x20<method>','show\x20[table]','Attributes\x20as\x20JSON\x20string','-H,\x20--header\x20<header>','--database\x20<name>','Include\x20retried\x20attempts','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','join','attempts\x20[project]','submit\x20[query]','--color','summary','Update\x20an\x20existing\x20agent','Skip\x20confirmation\x20prompts','Add\x20attributes\x20as\x20JSON\x20string','-y,\x20--yes','name','trino','GET','debug','--kind\x20<type>','--rule\x20<json>','help','commands','argumentDescription','--include-retried','activations\x20<segment_name>','push','outputHelp','437539FyzYBe','Read\x20SQL\x20query\x20from\x20file','isArray','projects\x20[pattern]','push\x20[project-name-or-dir]','port','Read\x20query\x20from\x20file','Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)','-f,\x20--file\x20<path>','Save\x20output\x20to\x20file','Kill\x20a\x20running\x20attempt','--limit\x20<rows>','--description\x20<text>','update\x20<name>','Request\x20body\x20as\x20JSON\x20string','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','--force','--data\x20<data>','--site\x20<site>','Add\x20behaviors\x20as\x20JSON\x20string','Create\x20a\x20new\x20agent\x20in\x20current\x20project','tsv','Profile\x20to\x20use\x20(overrides\x20active\x20profile)','--jsonl','delete\x20<agent-name>','--max-depth\x20<depth>','logLevel','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Filtering\x20rule\x20from\x20JSON\x20file','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','DEBUG','slice','Master\x20table\x20name'];a0_0x22ee=function(){return _0x1b745f;};return a0_0x22ee();}function a0_0x1bfe(_0x1bf3d1,_0x299e54){const _0x22ee38=a0_0x22ee();return a0_0x1bfe=function(_0x1bfe51,_0x9e83c7){_0x1bfe51=_0x1bfe51-0x19f;let _0x34833e=_0x22ee38[_0x1bfe51];return _0x34833e;},a0_0x1bfe(_0x1bf3d1,_0x299e54);}let buildInfo={};try{buildInfo=JSON[a0_0x55e4f6(0x1d2)](readFileSync(join(__dirname,a0_0x55e4f6(0x1ab)),a0_0x55e4f6(0x28a)));}catch{}if(process[a0_0x55e4f6(0x237)][a0_0x55e4f6(0x26e)](a0_0x55e4f6(0x206))){let versionOutput='tdx\x20'+packageJson[a0_0x55e4f6(0x24d)];buildInfo[a0_0x55e4f6(0x1af)]&&(versionOutput+='\x20('+buildInfo['gitRevision']+')'),buildInfo[a0_0x55e4f6(0x2e6)]&&(versionOutput+=a0_0x55e4f6(0x221)+buildInfo['buildTime']),console['log'](versionOutput),process[a0_0x55e4f6(0x1c9)](0x0);}const program=new Command();let description=a0_0x55e4f6(0x1b4);buildInfo[a0_0x55e4f6(0x1af)]?description+=a0_0x55e4f6(0x25d)+packageJson[a0_0x55e4f6(0x24d)]+'\x20('+buildInfo[a0_0x55e4f6(0x1af)]+')':description+=',\x20version\x20'+packageJson[a0_0x55e4f6(0x24d)];program[a0_0x55e4f6(0x2ad)](a0_0x55e4f6(0x1e7))[a0_0x55e4f6(0x257)](description),program[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2cc),'TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)','us01')['option'](a0_0x55e4f6(0x247),'Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x23a),a0_0x55e4f6(0x20e))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2d1),a0_0x55e4f6(0x1e8))['option'](a0_0x55e4f6(0x1f9),a0_0x55e4f6(0x1c2))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2db),a0_0x55e4f6(0x2c3))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x291),'Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2a7),'Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)',![])['option'](a0_0x55e4f6(0x1f4),'Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)',![])['option']('-v,\x20--verbose',a0_0x55e4f6(0x1fa),![])[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x225),'Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1e4),a0_0x55e4f6(0x214))['option'](a0_0x55e4f6(0x20d),'Set\x20operation\x20timeout\x20in\x20seconds','30')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x26d),a0_0x55e4f6(0x1cf),![])[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2ac),a0_0x55e4f6(0x2aa),![])[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x239),a0_0x55e4f6(0x1ce))['option'](a0_0x55e4f6(0x256),a0_0x55e4f6(0x2d0))[a0_0x55e4f6(0x217)]('-d,\x20--database\x20<name>',a0_0x55e4f6(0x1b3))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1bf),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x55e4f6(0x217)]('--parent-segment\x20<name>','Parent\x20segment\x20to\x20use\x20(overrides\x20context)')['option'](a0_0x55e4f6(0x1de),a0_0x55e4f6(0x2de)),program[a0_0x55e4f6(0x1dc)]({'formatHelp':(_0x584371,_0x28c019)=>{const _0x2b5a6c=a0_0x55e4f6,_0xb3d61f=_0x28c019[_0x2b5a6c(0x240)](_0x584371,_0x28c019),_0x521cad=0x2,_0x12cbca=0x2;function _0xa51e5e(_0x14862a){const _0x2e9329=_0x2b5a6c;return!!_0x14862a[_0x2e9329(0x227)];}function _0x478dfc(_0x11b4e6,_0x311ce6){const _0xd25cf9=_0x2b5a6c;if(_0x311ce6){const _0x54de35=''+_0x11b4e6[_0xd25cf9(0x283)](_0xb3d61f+_0x12cbca)+_0x311ce6;return _0x54de35;}return _0x11b4e6;}function _0x1c1f10(_0x17db8a){const _0x295ad4=_0x2b5a6c;return _0x17db8a['join']('\x0a')[_0x295ad4(0x244)](/^/gm,'\x20'[_0x295ad4(0x2df)](_0x521cad));}const _0xce175e=[];_0xce175e[_0x2b5a6c(0x2b8)](_0x2b5a6c(0x2e7)+_0x28c019[_0x2b5a6c(0x265)](_0x584371));const _0x144a86=_0x28c019['commandDescription'](_0x584371);_0x144a86&&(_0xce175e[_0x2b5a6c(0x2b8)](''),_0xce175e[_0x2b5a6c(0x2b8)](_0x144a86));const _0x8e7035=_0x584371[_0x2b5a6c(0x2b4)][_0x2b5a6c(0x215)](_0x12be7a=>!_0xa51e5e(_0x12be7a));if(_0x8e7035[_0x2b5a6c(0x231)]>0x0){const _0x4c4c6e=_0x8e7035[_0x2b5a6c(0x235)](_0x148bce=>{const _0x4b4ea6=_0x2b5a6c,_0x1ef415=_0x28c019['subcommandTerm'](_0x148bce),_0x43ff2f=_0x28c019[_0x4b4ea6(0x210)](_0x148bce);return _0x478dfc(_0x1ef415,_0x43ff2f);});_0xce175e[_0x2b5a6c(0x2b8)](''),_0xce175e[_0x2b5a6c(0x2b8)]('Commands:'),_0xce175e[_0x2b5a6c(0x2b8)](_0x1c1f10(_0x4c4c6e));}const _0x49d411=_0x584371[_0x2b5a6c(0x23b)]['filter'](_0x2ad594=>!_0xa51e5e(_0x2ad594));if(_0x49d411['length']>0x0){const _0x3e9c2e=_0x49d411['map'](_0x3532ca=>{const _0x16c4b3=_0x2b5a6c,_0x44e526=_0x28c019[_0x16c4b3(0x21f)](_0x3532ca),_0x52abe7=_0x28c019[_0x16c4b3(0x24a)](_0x3532ca);return _0x478dfc(_0x44e526,_0x52abe7);});_0xce175e[_0x2b5a6c(0x2b8)](''),_0xce175e[_0x2b5a6c(0x2b8)](_0x2b5a6c(0x1b1)),_0xce175e[_0x2b5a6c(0x2b8)](_0x1c1f10(_0x3e9c2e));}const _0x446e72=(_0x584371[_0x2b5a6c(0x1b8)]||[])[_0x2b5a6c(0x215)](_0x2846eb=>!_0xa51e5e(_0x2846eb));if(_0x446e72[_0x2b5a6c(0x231)]>0x0){const _0x16409e=_0x446e72[_0x2b5a6c(0x235)](_0x5b8b36=>{const _0x391ec6=_0x2b5a6c,_0x59256b=_0x28c019['argumentTerm'](_0x5b8b36),_0x138137=_0x28c019[_0x391ec6(0x2b5)](_0x5b8b36);return _0x478dfc(_0x59256b,_0x138137);});_0xce175e['push'](''),_0xce175e[_0x2b5a6c(0x2b8)](_0x2b5a6c(0x259)),_0xce175e[_0x2b5a6c(0x2b8)](_0x1c1f10(_0x16409e));}return _0xce175e[_0x2b5a6c(0x2a4)]('\x0a');},'subcommandTerm':_0x5519d0=>{const _0x1f2d46=a0_0x55e4f6,_0xe0a68=(_0x5519d0['registeredArguments']||[])['map'](_0x4463e6=>_0x4463e6['required']?'<'+_0x4463e6[_0x1f2d46(0x2ad)]()+'>':'['+_0x4463e6['name']()+']')['join']('\x20'),_0x2758db=_0x5519d0[_0x1f2d46(0x1a9)](),_0x17bc63=_0x2758db[_0x1f2d46(0x231)]>0x0?_0x5519d0[_0x1f2d46(0x2ad)]()+',\x20'+_0x2758db['join'](',\x20'):_0x5519d0[_0x1f2d46(0x2ad)]();return _0xe0a68?_0x17bc63+'\x20'+_0xe0a68:_0x17bc63;}}),program['hook'](a0_0x55e4f6(0x1d8),_0x3ae2f2=>{const _0x39c391=a0_0x55e4f6,_0x5ecd72=_0x3ae2f2['opts']();if(!_0x5ecd72[_0x39c391(0x241)]){if(_0x5ecd72['json'])_0x5ecd72[_0x39c391(0x241)]=_0x39c391(0x233);else{if(_0x5ecd72[_0x39c391(0x296)])_0x5ecd72[_0x39c391(0x241)]=_0x39c391(0x296);else _0x5ecd72[_0x39c391(0x2cf)]&&(_0x5ecd72[_0x39c391(0x241)]='tsv');}}_0x5ecd72['in']&&!_0x5ecd72[_0x39c391(0x1e9)]&&(_0x5ecd72['database']=_0x5ecd72['in']);if(_0x5ecd72[_0x39c391(0x258)])_0x5ecd72['logLevel']=LogLevel[_0x39c391(0x1b5)];else{if(_0x5ecd72[_0x39c391(0x2b0)])_0x5ecd72[_0x39c391(0x2d4)]=LogLevel[_0x39c391(0x2d8)];else _0x5ecd72['logLevel']===undefined&&(_0x5ecd72[_0x39c391(0x2d4)]=LogLevel['INFO']);}});function createTDXInstance(_0x29771b){const _0x2cfae9=a0_0x55e4f6,_0x37742c=new GlobalContext(_0x29771b);_0x37742c[_0x2cfae9(0x1ad)](_0x29771b);const _0x501a10={'site':_0x37742c[_0x2cfae9(0x245)],'apiKey':_0x37742c[_0x2cfae9(0x286)],'logLevel':_0x37742c['logLevel']};return new TDX(_0x501a10);}program[a0_0x55e4f6(0x298)]('databases\x20[pattern]')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1bd))[a0_0x55e4f6(0x28f)](async(_0x43bab3,_0xb51fb2)=>{const _0x3b7a70=a0_0x55e4f6,_0x2df543=new DatabasesCommand(),_0xd7a199=program[_0x3b7a70(0x279)](),_0x385ff5=createTDXInstance(_0xd7a199),_0x892ba2=await _0x2df543['run']({'options':{..._0xd7a199,..._0xb51fb2},'args':_0x43bab3?[_0x43bab3]:[],'tdx':_0x385ff5});process[_0x3b7a70(0x1c9)](_0x892ba2);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x25f))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x297))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x275),a0_0x55e4f6(0x253))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x274),a0_0x55e4f6(0x2dd))[a0_0x55e4f6(0x217)]('--temperature\x20<n>',a0_0x55e4f6(0x1aa))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1c0),a0_0x55e4f6(0x238))[a0_0x55e4f6(0x28f)](async(_0x4ad559,_0x319748)=>{const _0x4e5899=a0_0x55e4f6,_0x1696fd=new ChatCommand(),_0x532f6a=program['opts'](),_0x53620a=createTDXInstance(_0x532f6a),_0x2b5d7e=await _0x1696fd[_0x4e5899(0x1a7)]({'options':{..._0x532f6a,..._0x319748},'args':_0x4ad559,'tdx':_0x53620a});process[_0x4e5899(0x1c9)](_0x2b5d7e);});const apiCmd=program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x263))[a0_0x55e4f6(0x2a8)](a0_0x55e4f6(0x271))[a0_0x55e4f6(0x22a)](a0_0x55e4f6(0x202),'\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')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x29d),a0_0x55e4f6(0x1df),a0_0x55e4f6(0x2af))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2cb),a0_0x55e4f6(0x2c8))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c2),a0_0x55e4f6(0x1f7))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2a0),'Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)',(_0x1202c2,_0x1cd1de)=>{return _0x1cd1de?[..._0x1cd1de,_0x1202c2]:[_0x1202c2];})[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x200),'API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','td')[a0_0x55e4f6(0x28f)](async(_0x3802e0,_0x259fa5)=>{const _0x2cd127=a0_0x55e4f6;if(!_0x3802e0){apiCmd[_0x2cd127(0x2b3)]();return;}const _0x4e756c=new ApiCommand(),_0x215f2a=program['opts'](),_0x67ec71=createTDXInstance(_0x215f2a),_0x5da2bb=await _0x4e756c['run']({'options':{..._0x215f2a,..._0x259fa5},'args':[_0x3802e0],'tdx':_0x67ec71});process['exit'](_0x5da2bb);});program['command'](a0_0x55e4f6(0x1ac))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x295))[a0_0x55e4f6(0x217)]('-d,\x20--database\x20<database>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1cd),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x55e4f6(0x28f)](async(_0x4dbc48,_0x294b4b)=>{const _0x23b77a=a0_0x55e4f6,_0x147b43=new TablesCommand(),_0x29534f=program[_0x23b77a(0x279)](),_0x19572d=createTDXInstance(_0x29534f);_0x294b4b['in']&&(_0x294b4b['database']=_0x294b4b['in']);const _0x237c60=await _0x147b43['run']({'options':{..._0x29534f,..._0x294b4b},'args':_0x4dbc48?[_0x4dbc48]:[],'tdx':_0x19572d});process[_0x23b77a(0x1c9)](_0x237c60);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x29e))[a0_0x55e4f6(0x257)]('Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x270),a0_0x55e4f6(0x1ec))[a0_0x55e4f6(0x217)]('--in\x20<database>',a0_0x55e4f6(0x246))['action'](async(_0x4d1d46,_0x488b71)=>{const _0x26a97a=a0_0x55e4f6,_0x13450a=new ShowCommand(),_0x494d69=program[_0x26a97a(0x279)](),_0x5678ba=createTDXInstance(_0x494d69);_0x488b71['in']&&(_0x488b71[_0x26a97a(0x1e9)]=_0x488b71['in']);const _0x9e1ca0=await _0x13450a[_0x26a97a(0x1a7)]({'options':{..._0x494d69,..._0x488b71},'args':_0x4d1d46?[_0x4d1d46]:[],'tdx':_0x5678ba});process[_0x26a97a(0x1c9)](_0x9e1ca0);}),program[a0_0x55e4f6(0x298)]('describe\x20[table]')[a0_0x55e4f6(0x1b2)]('desc')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x228))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x270),a0_0x55e4f6(0x1ec))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1cd),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')['action'](async(_0x37acd4,_0x8cb953)=>{const _0x5307d2=a0_0x55e4f6,_0x448720=new DescribeCommand(),_0xe8a727=program['opts'](),_0x4e384a=createTDXInstance(_0xe8a727);_0x8cb953['in']&&(_0x8cb953['database']=_0x8cb953['in']);const _0x4bfd17=await _0x448720[_0x5307d2(0x1a7)]({'options':{..._0xe8a727,..._0x8cb953},'args':_0x37acd4?[_0x37acd4]:[],'tdx':_0x4e384a});process['exit'](_0x4bfd17);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1c4))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x285))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x270),'Database\x20to\x20query\x20(default:\x20information_schema)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1cd),a0_0x55e4f6(0x246))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1dd),a0_0x55e4f6(0x1ae))[a0_0x55e4f6(0x217)]('-f,\x20--file\x20<path>',a0_0x55e4f6(0x2bb))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c5),a0_0x55e4f6(0x2e8),'40')[a0_0x55e4f6(0x28f)](async(_0x6d3643,_0x1895f7)=>{const _0x2b1f6b=a0_0x55e4f6,_0x33b9df=new QueryCommand(),_0x2bd8aa=program[_0x2b1f6b(0x279)](),_0x3cdb41=createTDXInstance(_0x2bd8aa);_0x1895f7['in']&&(_0x1895f7[_0x2b1f6b(0x1e9)]=_0x1895f7['in']);const _0xe7911f=await _0x33b9df[_0x2b1f6b(0x1a7)]({'options':{..._0x2bd8aa,..._0x1895f7},'args':_0x6d3643?[_0x6d3643]:[],'tdx':_0x3cdb41});process[_0x2b1f6b(0x1c9)](_0xe7911f);}),program['command']('segments\x20[path]')['description']('List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1d5),a0_0x55e4f6(0x220))['option'](a0_0x55e4f6(0x2d3),'Maximum\x20recursion\x20depth\x20(default:\x2010)','10')[a0_0x55e4f6(0x28f)](async(_0x4b8f14,_0x543c46)=>{const _0x17ceb0=a0_0x55e4f6,_0x563862=new SegmentsCommand(),_0xd4e748=program[_0x17ceb0(0x279)](),_0x3ddb9b=createTDXInstance(_0xd4e748),_0x3f1efe=await _0x563862['run']({'options':{..._0xd4e748,..._0x543c46},'args':_0x4b8f14?[_0x4b8f14]:[],'tdx':_0x3ddb9b});process[_0x17ceb0(0x1c9)](_0x3f1efe);});const segmentCmd=program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1e1))[a0_0x55e4f6(0x257)]('CDP\x20segment\x20management\x20commands');segmentCmd[a0_0x55e4f6(0x298)]('use\x20<path>')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1ee))[a0_0x55e4f6(0x28f)](async(_0x5d9f42,_0x44fb85)=>{const _0x347a18=a0_0x55e4f6,_0x16b548=new SegmentUseCommand(),_0x2ee087=program['opts'](),_0x3aa6d8=createTDXInstance(_0x2ee087),_0x2a9493=await _0x16b548[_0x347a18(0x1a7)]({'options':{..._0x2ee087,..._0x44fb85},'args':[_0x5d9f42],'tdx':_0x3aa6d8});process[_0x347a18(0x1c9)](_0x2a9493);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1d0))[a0_0x55e4f6(0x257)]('Show\x20current\x20segment/folder\x20context')['action'](async _0xccc346=>{const _0x19f713=a0_0x55e4f6,_0x445880=new SegmentPwdCommand(),_0xbaf012=program['opts'](),_0x2f5cbf=createTDXInstance(_0xbaf012),_0x40e0bc=await _0x445880[_0x19f713(0x1a7)]({'options':{..._0xbaf012,..._0xccc346},'args':[],'tdx':_0x2f5cbf});process[_0x19f713(0x1c9)](_0x40e0bc);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1f0))[a0_0x55e4f6(0x1b2)](a0_0x55e4f6(0x264))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1eb))[a0_0x55e4f6(0x28f)](async(_0x37b46c,_0x152a76)=>{const _0x156cf8=a0_0x55e4f6,_0xea8516=new SegmentDescribeCommand(),_0x2d1f87=program[_0x156cf8(0x279)](),_0x480fcc=createTDXInstance(_0x2d1f87),_0x29315d=await _0xea8516[_0x156cf8(0x1a7)]({'options':{..._0x2d1f87,..._0x152a76},'args':[_0x37b46c],'tdx':_0x480fcc});process[_0x156cf8(0x1c9)](_0x29315d);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x19f))['description'](a0_0x55e4f6(0x2eb))[a0_0x55e4f6(0x28f)](async(_0x21dedc,_0x78b3a9)=>{const _0x308aa1=a0_0x55e4f6,_0x44a308=new SegmentShowCommand(),_0x417afa=program[_0x308aa1(0x279)](),_0x4c5b9f=createTDXInstance(_0x417afa),_0x457dc1=await _0x44a308[_0x308aa1(0x1a7)]({'options':{..._0x417afa,..._0x78b3a9},'args':[_0x21dedc],'tdx':_0x4c5b9f});process[_0x308aa1(0x1c9)](_0x457dc1);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1a6))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1d9))['action'](async(_0x283eb3,_0x42e95a)=>{const _0x1c5ee8=a0_0x55e4f6,_0xe3cb00=new SegmentFolderListCommand(),_0x280ac8=program['opts'](),_0x537d54=createTDXInstance(_0x280ac8),_0x21dc54=await _0xe3cb00[_0x1c5ee8(0x1a7)]({'options':{..._0x280ac8,..._0x42e95a},'args':[_0x283eb3],'tdx':_0x537d54});process['exit'](_0x21dc54);});const folderCmd=segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x29c))['description'](a0_0x55e4f6(0x27c));folderCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x208))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1c7))[a0_0x55e4f6(0x28f)](async(_0x36d31b,_0xd0fbec)=>{const _0x477252=a0_0x55e4f6,_0x2dcc80=new SegmentFolderShowCommand(),_0x5788d7=program[_0x477252(0x279)](),_0x55e4f4=createTDXInstance(_0x5788d7),_0xe06736=await _0x2dcc80['run']({'options':{..._0x5788d7,..._0xd0fbec},'args':[_0x36d31b],'tdx':_0x55e4f4});process[_0x477252(0x1c9)](_0xe06736);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x26b))['description'](a0_0x55e4f6(0x23c))['action'](async(_0x106d88,_0x2b5b18)=>{const _0x371539=a0_0x55e4f6,_0x35d495=new SegmentSQLCommand(),_0x2a578e=program[_0x371539(0x279)](),_0x21e77d=createTDXInstance(_0x2a578e),_0x113700=await _0x35d495['run']({'options':{..._0x2a578e,..._0x2b5b18},'args':[_0x106d88],'tdx':_0x21e77d});process[_0x371539(0x1c9)](_0x113700);}),segmentCmd[a0_0x55e4f6(0x298)]('fields\x20<parent_name>')['description'](a0_0x55e4f6(0x255))[a0_0x55e4f6(0x28f)](async(_0x43a0a4,_0x4c4e56)=>{const _0x2e1dc1=a0_0x55e4f6,_0x5cfcf2=new SegmentFieldsCommand(),_0x1dfb00=program[_0x2e1dc1(0x279)](),_0x269948=createTDXInstance(_0x1dfb00),_0x1892ca=await _0x5cfcf2[_0x2e1dc1(0x1a7)]({'options':{..._0x1dfb00,..._0x4c4e56},'args':[_0x43a0a4],'tdx':_0x269948});process[_0x2e1dc1(0x1c9)](_0x1892ca);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x219))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x29a))[a0_0x55e4f6(0x217)]('--description\x20<text>',a0_0x55e4f6(0x2dc))[a0_0x55e4f6(0x217)]('--rule\x20<json>',a0_0x55e4f6(0x1bc))[a0_0x55e4f6(0x217)]('--rule-file\x20<file>',a0_0x55e4f6(0x2d6))[a0_0x55e4f6(0x217)]('--folder\x20<name>','Folder\x20name\x20for\x20organization')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2b1),a0_0x55e4f6(0x27f))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1b0),a0_0x55e4f6(0x281))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x248),a0_0x55e4f6(0x1e2))[a0_0x55e4f6(0x28f)](async(_0x3cabb4,_0x4a927c)=>{const _0x5d9604=a0_0x55e4f6,_0x46bafc=new SegmentCreateCommand(),_0x25a48d=program['opts'](),_0x1dff97=createTDXInstance(_0x25a48d),_0x592c3f=await _0x46bafc[_0x5d9604(0x1a7)]({'options':{..._0x25a48d,..._0x4a927c},'args':[_0x3cabb4],'tdx':_0x1dff97});process[_0x5d9604(0x1c9)](_0x592c3f);}),segmentCmd[a0_0x55e4f6(0x298)]('update\x20<segment_name>')['description'](a0_0x55e4f6(0x282))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1a8),a0_0x55e4f6(0x23d))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x266))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2b2),a0_0x55e4f6(0x2a3))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x28c),'Updated\x20filtering\x20rule\x20from\x20JSON\x20file')[a0_0x55e4f6(0x217)]('--folder\x20<name>',a0_0x55e4f6(0x251))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2b1),a0_0x55e4f6(0x27f))['action'](async(_0x2da0e4,_0x199db8)=>{const _0x59fde1=a0_0x55e4f6,_0x5f5491=new SegmentUpdateCommand(),_0x489f26=program[_0x59fde1(0x279)](),_0x3eab4e=createTDXInstance(_0x489f26),_0x3eb04b=await _0x5f5491[_0x59fde1(0x1a7)]({'options':{..._0x489f26,..._0x199db8},'args':[_0x2da0e4],'tdx':_0x3eab4e});process['exit'](_0x3eb04b);});const parentCmd=segmentCmd['command']('parent')[a0_0x55e4f6(0x257)]('Parent\x20segment\x20(audience)\x20management');parentCmd['command'](a0_0x55e4f6(0x1fd))['description'](a0_0x55e4f6(0x2ec))[a0_0x55e4f6(0x22b)](a0_0x55e4f6(0x24e),a0_0x55e4f6(0x1e0))['requiredOption']('--table\x20<table>',a0_0x55e4f6(0x2da))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x2e2))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x252),a0_0x55e4f6(0x2e9))['option']('--schedule-option\x20<value>',a0_0x55e4f6(0x293))['option'](a0_0x55e4f6(0x25b),a0_0x55e4f6(0x1e6))['option'](a0_0x55e4f6(0x1ba),a0_0x55e4f6(0x29f))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1b7),a0_0x55e4f6(0x230))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x272),a0_0x55e4f6(0x203))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x280),a0_0x55e4f6(0x1f6))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x213),'Customer\x20group\x20as\x20JSON\x20string')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x209),'Customer\x20group\x20from\x20JSON\x20file')[a0_0x55e4f6(0x28f)](async(_0x45ea16,_0xd690ae)=>{const _0x29a730=a0_0x55e4f6,_0x26ca33=new ParentSegmentCreateCommand(),_0x41c519=program[_0x29a730(0x279)](),_0x4ae164=createTDXInstance(_0x41c519),_0x3432cc=await _0x26ca33[_0x29a730(0x1a7)]({'options':{..._0x41c519,..._0xd690ae},'args':[_0x45ea16],'tdx':_0x4ae164});process['exit'](_0x3432cc);}),parentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2c7))['description']('Update\x20parent\x20segment\x20(audience)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x266))['option'](a0_0x55e4f6(0x252),'Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x22f),a0_0x55e4f6(0x242))[a0_0x55e4f6(0x217)]('--timezone\x20<tz>',a0_0x55e4f6(0x24f))[a0_0x55e4f6(0x217)]('--add-attributes\x20<json>',a0_0x55e4f6(0x2ab))['option'](a0_0x55e4f6(0x1a0),a0_0x55e4f6(0x2ea))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1d7),a0_0x55e4f6(0x2cd))['option'](a0_0x55e4f6(0x2e5),a0_0x55e4f6(0x267))[a0_0x55e4f6(0x28f)](async(_0x10d18,_0x2facd2)=>{const _0x18c59b=a0_0x55e4f6,_0x3073db=new ParentSegmentUpdateCommand(),_0x20da00=program[_0x18c59b(0x279)](),_0x26bc4a=createTDXInstance(_0x20da00),_0xfbd450=await _0x3073db[_0x18c59b(0x1a7)]({'options':{..._0x20da00,..._0x2facd2},'args':[_0x10d18],'tdx':_0x26bc4a});process[_0x18c59b(0x1c9)](_0xfbd450);}),folderCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x201))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x21b))['option'](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x1ca))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x236),'Parent\x20folder\x20name\x20for\x20nested\x20folders')[a0_0x55e4f6(0x28f)](async(_0x284e36,_0x558932,_0x2821f3)=>{const _0x35234a=a0_0x55e4f6,_0x1eee69=new SegmentFolderCreateCommand(),_0x317b58=program[_0x35234a(0x279)](),_0x3a4d49=createTDXInstance(_0x317b58),_0x463e84=await _0x1eee69[_0x35234a(0x1a7)]({'options':{..._0x317b58,..._0x2821f3},'args':[_0x284e36,_0x558932],'tdx':_0x3a4d49});process[_0x35234a(0x1c9)](_0x463e84);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2b7))['description'](a0_0x55e4f6(0x212))['action'](async(_0x3f2be4,_0x315ebf)=>{const _0x5f5ce2=a0_0x55e4f6,_0x197a7f=new ActivationsCommand(),_0x462273=program['opts'](),_0x196350=createTDXInstance(_0x462273),_0x457b9f=await _0x197a7f[_0x5f5ce2(0x1a7)]({'options':{..._0x462273,..._0x315ebf},'args':[_0x3f2be4],'tdx':_0x196350});process['exit'](_0x457b9f);});const workflowCmd=program['command'](a0_0x55e4f6(0x1c8))['alias']('wf')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2e3));workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2bd))[a0_0x55e4f6(0x257)]('List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)')[a0_0x55e4f6(0x28f)](async(_0x1db941,_0x19a6bc)=>{const _0x30b115=a0_0x55e4f6,_0x198393=new WorkflowProjectsCommand(),_0x3517d3=program[_0x30b115(0x279)](),_0x3c66dc=createTDXInstance(_0x3517d3),_0x45421f=await _0x198393[_0x30b115(0x1a7)]({'options':{..._0x3517d3,..._0x19a6bc},'args':_0x1db941?[_0x1db941]:[],'tdx':_0x3c66dc});process[_0x30b115(0x1c9)](_0x45421f);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1cb))[a0_0x55e4f6(0x1b2)]('ls')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x23f))[a0_0x55e4f6(0x28f)](async(_0x2fb15d,_0xae4435)=>{const _0x5e25c9=a0_0x55e4f6,_0x3cc62d=new WorkflowWorkflowsCommand(),_0x3858d0=program['opts'](),_0x1619e4=createTDXInstance(_0x3858d0),_0x260e7c=await _0x3cc62d['run']({'options':{..._0x3858d0,..._0xae4435},'args':_0x2fb15d?[_0x2fb15d]:[],'tdx':_0x1619e4});process[_0x5e25c9(0x1c9)](_0x260e7c);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x20b))['description'](a0_0x55e4f6(0x1fb))[a0_0x55e4f6(0x217)]('--status\x20<status>',a0_0x55e4f6(0x226))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x273),'Start\x20time\x20filter\x20(ISO\x208601\x20format)')['option'](a0_0x55e4f6(0x25e),'End\x20time\x20filter\x20(ISO\x208601\x20format)')[a0_0x55e4f6(0x28f)](async(_0x584c3a,_0x573995)=>{const _0x12d369=a0_0x55e4f6,_0x5cbe20=new WorkflowSessionsCommand(),_0x1cf8fd=program[_0x12d369(0x279)](),_0x2ed682=createTDXInstance(_0x1cf8fd),_0x3dad5f=await _0x5cbe20[_0x12d369(0x1a7)]({'options':{..._0x1cf8fd,..._0x573995},'args':_0x584c3a?[_0x584c3a]:[],'tdx':_0x2ed682});process[_0x12d369(0x1c9)](_0x3dad5f);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2a5))[a0_0x55e4f6(0x257)]('List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2b6),a0_0x55e4f6(0x2a2))[a0_0x55e4f6(0x28f)](async(_0x204d44,_0x583d12)=>{const _0x5043b0=new WorkflowAttemptsCommand(),_0x4dc582=program['opts'](),_0x18b000=createTDXInstance(_0x4dc582),_0x1d5ee3=await _0x5043b0['run']({'options':{..._0x4dc582,..._0x583d12},'args':_0x204d44?[_0x204d44]:[],'tdx':_0x18b000});process['exit'](_0x1d5ee3);}),workflowCmd[a0_0x55e4f6(0x298)]('attempt\x20<attempt-id>')[a0_0x55e4f6(0x257)]('Show\x20specific\x20attempt\x20details')[a0_0x55e4f6(0x28f)](async(_0x5a7b98,_0x2483cb)=>{const _0x531bbd=a0_0x55e4f6,_0x267930=new WorkflowAttemptCommand(),_0x56c012=program[_0x531bbd(0x279)](),_0x4b6325=createTDXInstance(_0x56c012),_0x19be0b=await _0x267930[_0x531bbd(0x1a7)]({'options':{..._0x56c012,..._0x2483cb},'args':[_0x5a7b98],'tdx':_0x4b6325});process[_0x531bbd(0x1c9)](_0x19be0b);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1a1))['description']('Show\x20tasks\x20for\x20an\x20attempt')['option'](a0_0x55e4f6(0x1db),'Include\x20subtasks\x20in\x20the\x20output')['action'](async(_0x463896,_0x2af076)=>{const _0x4ae409=a0_0x55e4f6,_0x350d50=new WorkflowTasksCommand(),_0x34afa9=program[_0x4ae409(0x279)](),_0x4d25a6=createTDXInstance(_0x34afa9),_0x49838e=await _0x350d50[_0x4ae409(0x1a7)]({'options':{..._0x34afa9,..._0x2af076},'args':[_0x463896],'tdx':_0x4d25a6});process[_0x4ae409(0x1c9)](_0x49838e);}),workflowCmd['command'](a0_0x55e4f6(0x276))[a0_0x55e4f6(0x257)]('Show\x20logs\x20for\x20a\x20specific\x20task')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1f5),a0_0x55e4f6(0x1bb),_0x8ecd2d=>parseInt(_0x8ecd2d,0xa),0x0)['action'](async(_0x4120a7,_0x50c0d8,_0x3b05d6)=>{const _0x9788a=a0_0x55e4f6,_0x285cb1=new WorkflowLogsCommand(),_0x144e25=program['opts'](),_0xa59296=createTDXInstance(_0x144e25),_0x3ff6e7=await _0x285cb1[_0x9788a(0x1a7)]({'options':{..._0x144e25,..._0x3b05d6},'args':[_0x4120a7,_0x50c0d8],'tdx':_0xa59296});process[_0x9788a(0x1c9)](_0x3ff6e7);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x21d))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2c4))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1cc),'Reason\x20for\x20killing\x20the\x20attempt')[a0_0x55e4f6(0x28f)](async(_0x2327f7,_0x315bfb)=>{const _0x251ebe=a0_0x55e4f6,_0x189b5e=new WorkflowKillCommand(),_0x34ce3f=program[_0x251ebe(0x279)](),_0x13abb6=createTDXInstance(_0x34ce3f),_0x35bb47=await _0x189b5e['run']({'options':{..._0x34ce3f,..._0x315bfb},'args':[_0x2327f7],'tdx':_0x13abb6});process[_0x251ebe(0x1c9)](_0x35bb47);}),workflowCmd['command']('retry\x20<session-id|attempt-id>')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x234))['option'](a0_0x55e4f6(0x2e1),a0_0x55e4f6(0x1c1))['option']('--resume-from\x20<task>',a0_0x55e4f6(0x24c))['option']('--params\x20<json>',a0_0x55e4f6(0x254))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2ca),'Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)')[a0_0x55e4f6(0x28f)](async(_0x38c316,_0x290bc4)=>{const _0x36c024=a0_0x55e4f6,_0x1aecb0=new WorkflowRetryCommand(),_0x2ab654=program['opts'](),_0x3690b6=createTDXInstance(_0x2ab654),_0xc1715c=await _0x1aecb0['run']({'options':{..._0x2ab654,..._0x290bc4},'args':[_0x38c316],'tdx':_0x3690b6});process[_0x36c024(0x1c9)](_0xc1715c);}),workflowCmd['command'](a0_0x55e4f6(0x2e4))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x21e))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x27b),a0_0x55e4f6(0x299))[a0_0x55e4f6(0x28f)](async(_0x2875c5,_0x564da9,_0x8ca175)=>{const _0xacfeb4=a0_0x55e4f6,_0x40fa1a=new WorkflowDownloadCommand(),_0x5893a6=program[_0xacfeb4(0x279)](),_0x5af993=createTDXInstance(_0x5893a6),_0x17061a=await _0x40fa1a[_0xacfeb4(0x1a7)]({'options':{..._0x5893a6,..._0x8ca175},'args':[_0x2875c5,_0x564da9||'.'],'tdx':_0x5af993});process[_0xacfeb4(0x1c9)](_0x17061a);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2be))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x232))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x250),'Override\x20project\x20name')[a0_0x55e4f6(0x217)]('--revision\x20<revision>',a0_0x55e4f6(0x294))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1d4),a0_0x55e4f6(0x24b))[a0_0x55e4f6(0x28f)](async(_0x285374,_0x272846)=>{const _0x52540f=a0_0x55e4f6,_0x35e7b6=new WorkflowPushCommand(),_0x4061aa=program[_0x52540f(0x279)](),_0x3c3be3=createTDXInstance(_0x4061aa),_0x36c85=await _0x35e7b6[_0x52540f(0x1a7)]({'options':{..._0x4061aa,..._0x272846},'args':_0x285374?[_0x285374]:[],'tdx':_0x3c3be3});process[_0x52540f(0x1c9)](_0x36c85);}),workflowCmd[a0_0x55e4f6(0x298)]('delete\x20<project-name-or-id>')['description']('Delete\x20workflow\x20project\x20from\x20Treasure\x20Data')[a0_0x55e4f6(0x28f)](async(_0x74a59f,_0x144e6d)=>{const _0x2ba9a4=a0_0x55e4f6,_0x412b44=new WorkflowDeleteCommand(),_0xd6e61c=program[_0x2ba9a4(0x279)](),_0x317d09=createTDXInstance(_0xd6e61c),_0x112aca=await _0x412b44[_0x2ba9a4(0x1a7)]({'options':{..._0xd6e61c,..._0x144e6d},'args':[_0x74a59f],'tdx':_0x317d09});process[_0x2ba9a4(0x1c9)](_0x112aca);}),program[a0_0x55e4f6(0x298)]('jobs')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x26c))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1ff),a0_0x55e4f6(0x28e))[a0_0x55e4f6(0x28f)](async _0x43d1eb=>{const _0x3a41d0=a0_0x55e4f6,_0x28b438=new JobListCommand(),_0x468210=program[_0x3a41d0(0x279)](),_0x199564=createTDXInstance(_0x468210),_0x1ba1d2=await _0x28b438[_0x3a41d0(0x1a7)]({'options':{..._0x468210,..._0x43d1eb},'args':[],'tdx':_0x199564});process[_0x3a41d0(0x1c9)](_0x1ba1d2);});const jobCmd=program['command']('job')[a0_0x55e4f6(0x257)]('Job\x20management\x20commands');jobCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x205))[a0_0x55e4f6(0x257)]('Show\x20job\x20details')[a0_0x55e4f6(0x28f)](async(_0x493747,_0x350e29)=>{const _0x1f98eb=a0_0x55e4f6,_0x1b428a=new JobShowCommand(),_0x39d363=program['opts'](),_0xc9630e=createTDXInstance(_0x39d363),_0x7e2035=await _0x1b428a[_0x1f98eb(0x1a7)]({'options':{..._0x39d363,..._0x350e29},'args':[_0x493747],'tdx':_0xc9630e});process[_0x1f98eb(0x1c9)](_0x7e2035);}),jobCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x284))[a0_0x55e4f6(0x257)]('Kill\x20a\x20job')['action'](async(_0x4f3942,_0x30737a)=>{const _0x117f9a=a0_0x55e4f6,_0x18a138=new JobKillCommand(),_0x4663af=program[_0x117f9a(0x279)](),_0xcb2c38=createTDXInstance(_0x4663af),_0x3d08d1=await _0x18a138[_0x117f9a(0x1a7)]({'options':{..._0x4663af,..._0x30737a},'args':[_0x4f3942],'tdx':_0xcb2c38});process[_0x117f9a(0x1c9)](_0x3d08d1);}),jobCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2a6))[a0_0x55e4f6(0x257)]('Submit\x20a\x20job')['option'](a0_0x55e4f6(0x1ed),a0_0x55e4f6(0x1fe),a0_0x55e4f6(0x2ae))['option'](a0_0x55e4f6(0x2c2),a0_0x55e4f6(0x2c0))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2a1),'Database\x20name\x20(default:\x20information_schema)',a0_0x55e4f6(0x204))['action'](async(_0x269cd9,_0x1c423d)=>{const _0x54c341=a0_0x55e4f6,_0x43276d=new JobSubmitCommand(),_0x41d993=program[_0x54c341(0x279)](),_0x20d3fe=createTDXInstance(_0x41d993),_0x47e468=await _0x43276d[_0x54c341(0x1a7)]({'options':{..._0x41d993,..._0x1c423d},'args':_0x269cd9?[_0x269cd9]:[],'tdx':_0x20d3fe});process[_0x54c341(0x1c9)](_0x47e468);}),jobCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x207))[a0_0x55e4f6(0x257)]('Get\x20job\x20results')[a0_0x55e4f6(0x28f)](async(_0x1959a2,_0x4958b9)=>{const _0x3092d8=a0_0x55e4f6,_0x155e00=new JobResultCommand(),_0x158bf1=program['opts'](),_0x5a56fe=createTDXInstance(_0x158bf1),_0x311c87=await _0x155e00['run']({'options':{..._0x158bf1,..._0x4958b9},'args':[_0x1959a2],'tdx':_0x5a56fe});process[_0x3092d8(0x1c9)](_0x311c87);});const llmCmd=program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x20f))['description'](a0_0x55e4f6(0x218));llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1da))['description'](a0_0x55e4f6(0x2c9))[a0_0x55e4f6(0x28f)](async(_0x356e43,_0x589a7e)=>{const _0x3cb777=a0_0x55e4f6,_0x516f81=new LLMUseCommand(),_0x1567fe=program[_0x3cb777(0x279)](),_0x52feb0=createTDXInstance(_0x1567fe),_0x58de44=await _0x516f81[_0x3cb777(0x1a7)]({'options':{..._0x1567fe,..._0x589a7e},'args':[_0x356e43],'tdx':_0x52feb0});process[_0x3cb777(0x1c9)](_0x58de44);}),llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1c5))['description'](a0_0x55e4f6(0x1c3))[a0_0x55e4f6(0x28f)](async _0x472644=>{const _0x2a591b=a0_0x55e4f6,_0x16e9b4=new LLMModelsCommand(),_0x3782d7=program[_0x2a591b(0x279)](),_0x12a7a8=createTDXInstance(_0x3782d7),_0x57e9da=await _0x16e9b4[_0x2a591b(0x1a7)]({'options':{..._0x3782d7,..._0x472644},'args':[],'tdx':_0x12a7a8});process[_0x2a591b(0x1c9)](_0x57e9da);}),llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2bd))['description'](a0_0x55e4f6(0x287))['action'](async(_0x131447,_0xc7ac26)=>{const _0x5f2982=a0_0x55e4f6,_0x3c84c3=new LLMProjectsCommand(),_0xf37809=program['opts'](),_0x536696=createTDXInstance(_0xf37809),_0x26af6a=await _0x3c84c3[_0x5f2982(0x1a7)]({'options':{..._0xf37809,..._0xc7ac26},'args':_0x131447?[_0x131447]:[],'tdx':_0x536696});process[_0x5f2982(0x1c9)](_0x26af6a);});const projectCmd=llmCmd['command']('project')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x292));projectCmd['command'](a0_0x55e4f6(0x1fd))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1d6))['option'](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x1f1))[a0_0x55e4f6(0x28f)](async(_0x43f188,_0x43fbfb)=>{const _0x48f8a4=a0_0x55e4f6,_0x48bd70=new LLMProjectCreateCommand(),_0x1550d=program['opts'](),_0x554cf8=createTDXInstance(_0x1550d),_0x1b7115=await _0x48bd70[_0x48f8a4(0x1a7)]({'options':{..._0x1550d,..._0x43fbfb},'args':[_0x43f188],'tdx':_0x554cf8});process[_0x48f8a4(0x1c9)](_0x1b7115);}),projectCmd['command'](a0_0x55e4f6(0x269))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x222))[a0_0x55e4f6(0x28f)](async(_0xc8bc08,_0xc0b0e3)=>{const _0x4767d4=a0_0x55e4f6,_0x1719cc=new LLMProjectDeleteCommand(),_0x170c88=program[_0x4767d4(0x279)](),_0x2a25ad=createTDXInstance(_0x170c88),_0x11b34e=await _0x1719cc[_0x4767d4(0x1a7)]({'options':{..._0x170c88,..._0xc0b0e3},'args':[_0xc8bc08],'tdx':_0x2a25ad});process[_0x4767d4(0x1c9)](_0x11b34e);}),llmCmd['command']('agents\x20[pattern]')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2d7))[a0_0x55e4f6(0x28f)](async(_0x10fd78,_0x1354bc)=>{const _0x4a36d6=a0_0x55e4f6,_0x44edc2=new LLMAgentsCommand(),_0x360f93=program[_0x4a36d6(0x279)](),_0xd7ff79=createTDXInstance(_0x360f93),_0x2ff7a9=await _0x44edc2['run']({'options':{..._0x360f93,..._0x1354bc},'args':_0x10fd78?[_0x10fd78]:[],'tdx':_0xd7ff79});process['exit'](_0x2ff7a9);});const agentCmd=llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x25a))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x20c));agentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1b6))['description'](a0_0x55e4f6(0x20a))[a0_0x55e4f6(0x28f)](async(_0x3394e0,_0x1c01b8)=>{const _0x32b49e=a0_0x55e4f6,_0x3dba21=new LLMAgentShowCommand(),_0x5ddcfa=program[_0x32b49e(0x279)](),_0x25cc88=createTDXInstance(_0x5ddcfa),_0x130abd=await _0x3dba21[_0x32b49e(0x1a7)]({'options':{..._0x5ddcfa,..._0x1c01b8},'args':[_0x3394e0],'tdx':_0x25cc88});process[_0x32b49e(0x1c9)](_0x130abd);}),agentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1fd))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2ce))['option'](a0_0x55e4f6(0x1be),a0_0x55e4f6(0x1ea))['option'](a0_0x55e4f6(0x274),a0_0x55e4f6(0x243),a0_0x55e4f6(0x1f3))[a0_0x55e4f6(0x217)]('--starter-message\x20<text>',a0_0x55e4f6(0x27e))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x262),a0_0x55e4f6(0x1d3),'4')[a0_0x55e4f6(0x217)]('--temperature\x20<n>',a0_0x55e4f6(0x1aa),'0.7')['action'](async(_0xfbf2c6,_0x1f2416)=>{const _0x279d90=a0_0x55e4f6,_0x56435a=new LLMAgentCreateCommand(),_0x22c298=program[_0x279d90(0x279)](),_0xc80673=createTDXInstance(_0x22c298),_0x40f6df=await _0x56435a['run']({'options':{..._0x22c298,..._0x1f2416},'args':[_0xfbf2c6],'tdx':_0xc80673});process[_0x279d90(0x1c9)](_0x40f6df);}),agentCmd[a0_0x55e4f6(0x298)]('update\x20<agent-name>')['description'](a0_0x55e4f6(0x2a9))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x260),a0_0x55e4f6(0x1b9))['option'](a0_0x55e4f6(0x277),a0_0x55e4f6(0x1f8))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x29b))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1e3),a0_0x55e4f6(0x27e))[a0_0x55e4f6(0x28f)](async(_0x56fdeb,_0x565fd2)=>{const _0x2c4fdb=a0_0x55e4f6,_0x2c5505=new LLMAgentUpdateCommand(),_0x158ced=program[_0x2c4fdb(0x279)](),_0x23a520=createTDXInstance(_0x158ced),_0x372e20=await _0x2c5505[_0x2c4fdb(0x1a7)]({'options':{..._0x158ced,..._0x565fd2},'args':[_0x56fdeb],'tdx':_0x23a520});process[_0x2c4fdb(0x1c9)](_0x372e20);}),agentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2d2))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x25c))[a0_0x55e4f6(0x28f)](async(_0x4cd2e5,_0x306ae8)=>{const _0x8f96c0=a0_0x55e4f6,_0x16b3e1=new LLMAgentDeleteCommand(),_0xd3cc24=program['opts'](),_0x40fc40=createTDXInstance(_0xd3cc24),_0x25eed6=await _0x16b3e1['run']({'options':{..._0xd3cc24,..._0x306ae8},'args':[_0x4cd2e5],'tdx':_0x40fc40});process[_0x8f96c0(0x1c9)](_0x25eed6);}),llmCmd['command'](a0_0x55e4f6(0x229))[a0_0x55e4f6(0x257)]('Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)')['option'](a0_0x55e4f6(0x268),a0_0x55e4f6(0x223))[a0_0x55e4f6(0x28f)](async(_0x469068,_0x17673f)=>{const _0x1afa8b=a0_0x55e4f6,_0xe4acf=new LLMHistoryCommand(),_0x334a8a=program[_0x1afa8b(0x279)](),_0x24ccce=createTDXInstance(_0x334a8a),_0x4e5a9d=await _0xe4acf[_0x1afa8b(0x1a7)]({'options':{..._0x334a8a,..._0x17673f},'args':_0x469068?[_0x469068]:[],'tdx':_0x24ccce});process[_0x1afa8b(0x1c9)](_0x4e5a9d);}),llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1d1))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x224))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2e0),a0_0x55e4f6(0x1f2),a0_0x55e4f6(0x216))['option']('--project\x20<name>',a0_0x55e4f6(0x28d))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x28b),a0_0x55e4f6(0x2d5))[a0_0x55e4f6(0x28f)](async _0xbaa1de=>{const _0x4ddc50=a0_0x55e4f6,_0x268a9a=new LLMProxyCommand(),_0x51000f=program[_0x4ddc50(0x279)](),_0x4b4f5a=createTDXInstance(_0x51000f),_0x3ed567={..._0xbaa1de,'port':_0xbaa1de[_0x4ddc50(0x2bf)]?parseInt(_0xbaa1de['port'],0xa):undefined},_0x3e4112=await _0x268a9a[_0x4ddc50(0x1a7)]({'options':{..._0x51000f,..._0x3ed567},'args':[],'tdx':_0x4b4f5a});process[_0x4ddc50(0x1c9)](_0x3e4112);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x26f))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1e5))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x274),a0_0x55e4f6(0x21c),a0_0x55e4f6(0x261))['allowUnknownOption']()[a0_0x55e4f6(0x1a2)](!![])[a0_0x55e4f6(0x28f)](async(_0x478c67,_0x1a4be9)=>{const _0x47a867=a0_0x55e4f6,_0x4a2844=new ClaudeCommand(),_0xfab7fa=program['opts'](),_0x2384fc=createTDXInstance(_0xfab7fa),_0x51d1d3=Array[_0x47a867(0x2bc)](_0x478c67)?_0x478c67:[],_0x200876=await _0x4a2844[_0x47a867(0x1a7)]({'options':{..._0xfab7fa,..._0x1a4be9},'args':_0x51d1d3,'tdx':_0x2384fc});process[_0x47a867(0x1c9)](_0x200876);}),program['command'](a0_0x55e4f6(0x1a4))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2c1))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x22d),'Clear\x20session\x20context')[a0_0x55e4f6(0x28f)](async _0x292ed6=>{const _0x13a899=a0_0x55e4f6,_0x489231=new ContextCommand(),_0x59d8da=program['opts'](),_0x1cf066=await _0x489231[_0x13a899(0x1a7)]({'options':{..._0x59d8da,..._0x292ed6},'args':[],'tdx':null});process[_0x13a899(0x1c9)](_0x1cf066);}),program['command']('use\x20[resource]\x20[value]')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x249))[a0_0x55e4f6(0x28f)](async(_0x36002a,_0x146915,_0x1fb5a7)=>{const _0x2e7197=a0_0x55e4f6,_0x3c5579=new UseCommand(),_0x40af07=program['opts'](),_0x1a831a=[];if(_0x36002a)_0x1a831a[_0x2e7197(0x2b8)](_0x36002a);if(_0x146915)_0x1a831a[_0x2e7197(0x2b8)](_0x146915);const _0x2babcb=await _0x3c5579[_0x2e7197(0x1a7)]({'options':{..._0x40af07,..._0x1fb5a7},'args':_0x1a831a,'tdx':null});process['exit'](_0x2babcb);}),program['command'](a0_0x55e4f6(0x1ef))['description'](a0_0x55e4f6(0x26a))[a0_0x55e4f6(0x28f)](async _0x5b276d=>{const _0x3b2d72=a0_0x55e4f6,_0x418bce=new ProfilesCommand(),_0x15d2df=program[_0x3b2d72(0x279)](),_0x404bb1=await _0x418bce['run']({'options':{..._0x15d2df,..._0x5b276d},'args':[],'tdx':null});process[_0x3b2d72(0x1c9)](_0x404bb1);}),program['parse'](process[a0_0x55e4f6(0x237)]);!process[a0_0x55e4f6(0x237)][a0_0x55e4f6(0x2d9)](0x2)[a0_0x55e4f6(0x231)]&&program[a0_0x55e4f6(0x2b9)]();const currentVersion=packageJson['version'];process['stderr']['isTTY']&&process[a0_0x55e4f6(0x237)][a0_0x55e4f6(0x231)]>0x2&&!currentVersion[a0_0x55e4f6(0x26e)](a0_0x55e4f6(0x1a3))&&checkForUpdate(currentVersion)['then'](_0x45b02a=>{_0x45b02a&&displayUpdateNotification(_0x45b02a);})[a0_0x55e4f6(0x1fc)](()=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a1_0x5d3167=a1_0xd5c2;function a1_0xd5c2(_0x1d6953,_0x3b78e4){const _0x4e8c84=a1_0x4e8c();return a1_0xd5c2=function(_0xd5c263,_0x4c1932){_0xd5c263=_0xd5c263-0x82;let _0x40231e=_0x4e8c84[_0xd5c263];return _0x40231e;},a1_0xd5c2(_0x1d6953,_0x3b78e4);}function a1_0x4e8c(){const _0x41a679=['getSegmentFolder','query','/segments/','/entities/folders/','GET','3531SXwbjK','listParentSegments','481928FohfbX','createParentSegment','11829790WTuoRm','createSegmentFolder','getParentSegmentFull','data','isArray','4069296ykuYFD','/segments/query','/entities/parent_segments/','getSegment','audienceId','428aKarAs','/segments','rule','/entities/parent_segments','createSegment','getParentSegment','listSegmentFolders','7303770ELbwwY','updateParentSegment','listActivations','description','application/vnd.treasuredata.v1+json','name','/syndications','338RsbwMj','httpClient','sql','application/json','getSegmentSQL','updateSegment','558300DUVtxM','site','getParentSegmentSQL','POST','7uFunHC','1510agIFvk','PUT','/folders','/audiences','request','authHeaders','listSegments','/audiences/','updatedAt'];a1_0x4e8c=function(){return _0x41a679;};return a1_0x4e8c();}(function(_0x1cbb67,_0x446476){const _0x4d0e66=a1_0xd5c2,_0x1812fa=_0x1cbb67();while(!![]){try{const _0x2460b5=-parseInt(_0x4d0e66(0xa0))/0x1*(parseInt(_0x4d0e66(0x95))/0x2)+-parseInt(_0x4d0e66(0xae))/0x3*(parseInt(_0x4d0e66(0x87))/0x4)+-parseInt(_0x4d0e66(0x9b))/0x5+parseInt(_0x4d0e66(0x82))/0x6+-parseInt(_0x4d0e66(0x9f))/0x7*(parseInt(_0x4d0e66(0xb0))/0x8)+-parseInt(_0x4d0e66(0x8e))/0x9+parseInt(_0x4d0e66(0xb2))/0xa;if(_0x2460b5===_0x446476)break;else _0x1812fa['push'](_0x1812fa['shift']());}catch(_0x4a217f){_0x1812fa['push'](_0x1812fa['shift']());}}}(a1_0x4e8c,0x793fb));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class CDPClient{[a1_0x5d3167(0x96)];[a1_0x5d3167(0xa5)];constructor(_0x23fc9b,_0x514ec8){const _0x19e586=a1_0x5d3167,_0x4a8d70=getEndpoint(_0x23fc9b['site'],'cdp');this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x23fc9b[_0x19e586(0x9c)],_0x23fc9b['apiKey'])),this['httpClient']=new HTTPClient(_0x4a8d70,{...this[_0x19e586(0xa5)],'Accept':'application/vnd.treasuredata.v1+json','Content-Type':_0x19e586(0x98)},_0x514ec8);}async[a1_0x5d3167(0xaf)](){const _0x16fd61=a1_0x5d3167,_0x1b4ad1=_0x16fd61(0x8a),_0x387936=await this[_0x16fd61(0x96)][_0x16fd61(0xa4)](_0x16fd61(0xad),_0x1b4ad1);return Array[_0x16fd61(0xb6)](_0x387936)?_0x387936:_0x387936[_0x16fd61(0xb5)];}async[a1_0x5d3167(0x8c)](_0x57ef46){const _0x28d2f9=a1_0x5d3167,_0x220caa=_0x28d2f9(0x84)+_0x57ef46,_0x54b3bf=await this['httpClient'][_0x28d2f9(0xa4)](_0x28d2f9(0xad),_0x220caa);return _0x28d2f9(0xb5)in _0x54b3bf?_0x54b3bf[_0x28d2f9(0xb5)]:_0x54b3bf;}async[a1_0x5d3167(0xa6)](_0x167280){const _0x36c78b=a1_0x5d3167,_0x1cb936=_0x36c78b(0xa7)+_0x167280+_0x36c78b(0x88),_0xd0436e=await this[_0x36c78b(0x96)][_0x36c78b(0xa4)](_0x36c78b(0xad),_0x1cb936);return Array[_0x36c78b(0xb6)](_0xd0436e)?_0xd0436e:_0xd0436e[_0x36c78b(0xb5)];}async[a1_0x5d3167(0x85)](_0x40d4ee,_0xea5dee){const _0x1d6c88=a1_0x5d3167,_0x1ebe4d=_0x1d6c88(0xa7)+_0x40d4ee+_0x1d6c88(0xab)+_0xea5dee,_0x24cad6=await this[_0x1d6c88(0x96)][_0x1d6c88(0xa4)](_0x1d6c88(0xad),_0x1ebe4d);return'data'in _0x24cad6?_0x24cad6['data']:_0x24cad6;}async[a1_0x5d3167(0x8d)](_0x3c64d9){const _0x781c55=a1_0x5d3167,_0x5467ec=_0x781c55(0xa7)+_0x3c64d9+_0x781c55(0xa2),_0x52d1e4=await this['httpClient'][_0x781c55(0xa4)](_0x781c55(0xad),_0x5467ec);return Array[_0x781c55(0xb6)](_0x52d1e4)?_0x52d1e4:_0x52d1e4['data'];}async[a1_0x5d3167(0xa9)](_0x5c3adc){const _0x1403e3=a1_0x5d3167,_0x1d129e=_0x1403e3(0xac)+_0x5c3adc,_0x25e1c6=await this['httpClient'][_0x1403e3(0xa4)](_0x1403e3(0xad),_0x1d129e);return _0x1403e3(0xb5)in _0x25e1c6?_0x25e1c6['data']:_0x25e1c6;}async[a1_0x5d3167(0x90)](_0x4a99b1,_0x180225){const _0x372504=a1_0x5d3167,_0x54fbc6='/audiences/'+_0x4a99b1+_0x372504(0xab)+_0x180225+_0x372504(0x94),_0x319e2c=await this['httpClient'][_0x372504(0xa4)](_0x372504(0xad),_0x54fbc6);return Array[_0x372504(0xb6)](_0x319e2c)?_0x319e2c:_0x319e2c[_0x372504(0xb5)];}async[a1_0x5d3167(0x9d)](_0x514e5a){const _0x4864a4=a1_0x5d3167,_0x559115=_0x4864a4(0xa7)+_0x514e5a+_0x4864a4(0x83),_0x24ba77=await this[_0x4864a4(0x96)][_0x4864a4(0xa4)]('POST',_0x559115,{'body':{'format':_0x4864a4(0x97)}});return _0x24ba77['sql']||_0x24ba77[_0x4864a4(0xaa)]||'';}async[a1_0x5d3167(0x99)](_0x118301,_0x23a9ce){const _0x28756d=a1_0x5d3167,_0x41a376=await this[_0x28756d(0x85)](_0x118301,_0x23a9ce),_0x23b3d3={'format':'sql'};_0x28756d(0x89)in _0x41a376&&_0x41a376['rule']&&(_0x23b3d3[_0x28756d(0x89)]=_0x41a376['rule']);const _0x315f4f=_0x28756d(0xa7)+_0x118301+_0x28756d(0x83),_0x51b46a=await this[_0x28756d(0x96)]['request']('POST',_0x315f4f,{'body':_0x23b3d3});return _0x51b46a[_0x28756d(0x97)]||_0x51b46a[_0x28756d(0xaa)]||'';}async[a1_0x5d3167(0xb1)](_0x961a08){const _0x479914=a1_0x5d3167,_0x3dff1d=_0x479914(0xa3),_0x2b4bfb=await this[_0x479914(0x96)][_0x479914(0xa4)](_0x479914(0x9e),_0x3dff1d,{'body':_0x961a08,'headers':{'Content-Type':_0x479914(0x92)}});return _0x2b4bfb;}async[a1_0x5d3167(0x8f)](_0x149c1f,_0x59b037){const _0x751fe0=a1_0x5d3167,_0x425bb4='/audiences/'+_0x149c1f,_0x528e87=await this['httpClient']['request'](_0x751fe0(0xa1),_0x425bb4,{'body':_0x59b037,'headers':{'Content-Type':_0x751fe0(0x92)}});return _0x528e87;}async[a1_0x5d3167(0xb4)](_0x9f2c10){const _0x13155c=a1_0x5d3167,_0x93022=_0x13155c(0xa7)+_0x9f2c10,_0x5a55e8=await this['httpClient'][_0x13155c(0xa4)](_0x13155c(0xad),_0x93022,{'headers':{'Accept':_0x13155c(0x92)}});return _0x5a55e8;}async[a1_0x5d3167(0x8b)](_0x2d25af,_0x3632f0){const _0x5a74d7=a1_0x5d3167,_0x241e57='/audiences/'+_0x2d25af+_0x5a74d7(0x88),_0x208631=await this[_0x5a74d7(0x96)][_0x5a74d7(0xa4)]('POST',_0x241e57,{'body':_0x3632f0});return _0x208631;}async[a1_0x5d3167(0x9a)](_0x2c3afe,_0x3a75f0,_0xe45325){const _0x155f33=a1_0x5d3167,_0x7075bf=_0x155f33(0xa7)+_0x2c3afe+_0x155f33(0xab)+_0x3a75f0,_0x165143=await this[_0x155f33(0x96)]['request'](_0x155f33(0xa1),_0x7075bf,{'body':_0xe45325});return _0x165143;}async[a1_0x5d3167(0xb3)](_0x43b14f,_0x9cd750){const _0x144363=a1_0x5d3167,_0x209f4c='/audiences/'+_0x43b14f+_0x144363(0xa2),_0x46a522=await this[_0x144363(0x96)][_0x144363(0xa4)](_0x144363(0x9e),_0x209f4c,{'body':_0x9cd750});if('data'in _0x46a522&&_0x46a522[_0x144363(0xb5)]){const _0x1b8b9e=_0x46a522[_0x144363(0xb5)];return{'id':_0x1b8b9e['id'],'name':_0x1b8b9e[_0x144363(0x93)],'description':_0x1b8b9e[_0x144363(0x91)],'audienceId':_0x1b8b9e[_0x144363(0x86)]||String(_0x43b14f),'parentFolderId':_0x1b8b9e['parentFolderId'],'createdAt':_0x1b8b9e['createdAt'],'updatedAt':_0x1b8b9e[_0x144363(0xa8)]};}return _0x46a522;}}
|
|
@@ -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
|
+
function a2_0x4d7b(_0x405f21,_0x56baa9){const _0xd833e1=a2_0xd833();return a2_0x4d7b=function(_0x4d7b78,_0x1cdec4){_0x4d7b78=_0x4d7b78-0x77;let _0x51ae7d=_0xd833e1[_0x4d7b78];return _0x51ae7d;},a2_0x4d7b(_0x405f21,_0x56baa9);}const a2_0x3d3e76=a2_0x4d7b;(function(_0x51f37,_0x5b02ea){const _0x3d3dfe=a2_0x4d7b,_0x17d6c7=_0x51f37();while(!![]){try{const _0x5dd87a=-parseInt(_0x3d3dfe(0x8f))/0x1+parseInt(_0x3d3dfe(0xa4))/0x2*(parseInt(_0x3d3dfe(0x80))/0x3)+parseInt(_0x3d3dfe(0xbb))/0x4+-parseInt(_0x3d3dfe(0xbf))/0x5*(parseInt(_0x3d3dfe(0x94))/0x6)+parseInt(_0x3d3dfe(0xa7))/0x7*(-parseInt(_0x3d3dfe(0x86))/0x8)+-parseInt(_0x3d3dfe(0xb7))/0x9+parseInt(_0x3d3dfe(0xbc))/0xa;if(_0x5dd87a===_0x5b02ea)break;else _0x17d6c7['push'](_0x17d6c7['shift']());}catch(_0x590d28){_0x17d6c7['push'](_0x17d6c7['shift']());}}}(a2_0xd833,0xd7fc4));import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x35f449 from'json-bigint';const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function isRetryableError(_0x2bf334){return _0x2bf334>=0x1f4||_0x2bf334===0x1ad;}function getRetryDelay(_0x55a647,_0x37371c){const _0x500738=a2_0x4d7b,_0xdd9756=Math[_0x500738(0xba)](_0x37371c[_0x500738(0xb2)]*Math['pow'](0x2,_0x55a647),_0x37371c[_0x500738(0x90)]);return Math[_0x500738(0xc1)]()*_0xdd9756;}function a2_0xd833(){const _0x53b206=['\x0a\x20\x20URL:\x20','trace','body','arraybuffer','name','NOT_FOUND','maxRetries','warn','118968wDkuPj','An\x20error\x20occurred','get','6209cRakmB','sleep','status','Request\x20to\x20','from','abort','instance','message','HTTPClientError','application/json','AbortError','baseDelay','baseUrl','parseProblemDetails','json','headers','8980290rNbxUH','arrayBuffer','string','min','2893180MporXb','34448050kLFcea','defaultHeaders','statusText','8755Aruqyl','stringify','random','PERMISSION_DENIED','[Retry\x20','aborted',']\x20Request\x20failed\x20with\x20','text','\x0a\x20\x20Details:\x20','debug','signal','UNAVAILABLE','\x20failed:\x20','code','parse','36xhFtZe','HTTP\x20','ms...',']\x20Request\x20failed\x20with\x20HTTP\x20',']:\x20','detail','8920ETnddV','RATE_LIMITED','INTERNAL','safeParseJSON','round','forEach','retrying\x20in\x20','Error','addEventListener','1746016VrlYyH','maxDelay','retryConfig','object','about:blank','906jsMSxC','HTTP_REQUEST_FAILURE','combineSignals','type','Content-Type','logger','INVALID_ARGUMENT','Request\x20cancelled\x20by\x20user'];a2_0xd833=function(){return _0x53b206;};return a2_0xd833();}function statusCodeToErrorCode(_0x1d9754){const _0x28345e=a2_0x4d7b;if(_0x1d9754===0x191)return ErrorCode['UNAUTHENTICATED'];else{if(_0x1d9754===0x193)return ErrorCode[_0x28345e(0xc2)];else{if(_0x1d9754===0x194)return ErrorCode[_0x28345e(0xa1)];else{if(_0x1d9754===0x1ad)return ErrorCode[_0x28345e(0x87)];else return _0x1d9754>=0x1f4?ErrorCode[_0x28345e(0x7c)]:ErrorCode[_0x28345e(0x9a)];}}}}export class HTTPClientError extends Error{['status'];['problemDetails'];['code'];constructor(_0x387941,_0x15117e,_0x4340b7){const _0x5022f0=a2_0x4d7b,_0x6af438=statusCodeToErrorCode(_0x15117e);super('['+_0x6af438+']\x20'+_0x387941),this[_0x5022f0(0xa9)]=_0x15117e,this['problemDetails']=_0x4340b7,this[_0x5022f0(0xa0)]=_0x5022f0(0xaf),this[_0x5022f0(0x7e)]=_0x6af438;}}export class HTTPClient{[a2_0x3d3e76(0x91)];[a2_0x3d3e76(0xb3)];[a2_0x3d3e76(0xbd)];['logger'];constructor(_0x193d88,_0xcde853,_0x318f07,_0x401bf3){const _0x404784=a2_0x3d3e76;this['baseUrl']=_0x193d88,this[_0x404784(0xbd)]=_0xcde853,this[_0x404784(0x91)]={...DEFAULT_RETRY_CONFIG,..._0x401bf3},this['logger']=_0x318f07;}async['request'](_0x27838e,_0x46182d,_0x592ded={}){const _0x3cdf66=a2_0x3d3e76,{headers:headers={},body:_0x21e7c9,timeout:timeout=0x7530,retries:retries=this[_0x3cdf66(0x91)][_0x3cdf66(0xa2)],signal:_0x4fd3e4,includeHeaders:includeHeaders=![],responseType:responseType=_0x3cdf66(0xb5)}=_0x592ded,_0x4b8e84=''+this['baseUrl']+_0x46182d;this[_0x3cdf66(0x99)]['info']('Request:\x20'+_0x27838e+'\x20'+_0x4b8e84);const _0x551244={...this[_0x3cdf66(0xbd)],...headers};if(_0x21e7c9&&!_0x551244[_0x3cdf66(0x98)]){if(_0x21e7c9 instanceof Buffer){}else _0x551244['Content-Type']=_0x3cdf66(0xb0);}let _0x394a99;_0x21e7c9&&(_0x21e7c9 instanceof Buffer?_0x394a99=_0x21e7c9:_0x394a99=typeof _0x21e7c9===_0x3cdf66(0xb9)?_0x21e7c9:JSON['stringify'](_0x21e7c9));let _0x160bbc=null;for(let _0x265fef=0x0;_0x265fef<=retries;_0x265fef++){try{const _0x9baeb=new AbortController(),_0x1bd7a5=setTimeout(()=>_0x9baeb[_0x3cdf66(0xac)](),timeout);if(_0x4fd3e4){if(_0x4fd3e4[_0x3cdf66(0xc4)])throw new Error(_0x3cdf66(0x9b));_0x4fd3e4[_0x3cdf66(0x8e)](_0x3cdf66(0xac),()=>_0x9baeb[_0x3cdf66(0xac)](),{'once':!![]});}const _0x45c82d=await fetch(_0x4b8e84,{'method':_0x27838e,'headers':_0x551244,'body':_0x394a99,'signal':_0x9baeb[_0x3cdf66(0x7b)]});clearTimeout(_0x1bd7a5);if(_0x265fef<retries&&isRetryableError(_0x45c82d[_0x3cdf66(0xa9)])){const _0x768062=_0x45c82d[_0x3cdf66(0xb6)][_0x3cdf66(0xa6)]('Retry-After'),_0x4f39a2=_0x768062?parseInt(_0x768062,0xa)*0x3e8:getRetryDelay(_0x265fef,this[_0x3cdf66(0x91)]);console[_0x3cdf66(0xa3)](_0x3cdf66(0xc3)+(_0x265fef+0x1)+'/'+retries+_0x3cdf66(0x77)+_0x45c82d[_0x3cdf66(0xa9)]+',\x20'+('retrying\x20in\x20'+Math['round'](_0x4f39a2)+_0x3cdf66(0x82))),await this[_0x3cdf66(0xa8)](_0x4f39a2);continue;}if(!_0x45c82d['ok']){const _0x195039=await this['safeParseJSON'](_0x45c82d),_0x3b815a=this[_0x3cdf66(0xb4)](_0x195039,_0x45c82d['status']);let _0x540b35;if(_0x45c82d[_0x3cdf66(0xa9)]===0x191)_0x540b35=_0x3cdf66(0x81)+_0x45c82d[_0x3cdf66(0xa9)]+':\x20'+_0x45c82d[_0x3cdf66(0xbe)]+_0x3cdf66(0x9c)+_0x4b8e84;else{if(_0x3b815a?.[_0x3cdf66(0x85)])_0x540b35=_0x3b815a[_0x3cdf66(0x85)];else{if(_0x195039){const _0x292b7d=JSON['stringify'](_0x195039);_0x540b35='HTTP\x20'+_0x45c82d[_0x3cdf66(0xa9)]+':\x20'+_0x45c82d[_0x3cdf66(0xbe)]+'\x0a\x20\x20Details:\x20'+_0x292b7d;}else _0x540b35=_0x3cdf66(0x81)+_0x45c82d[_0x3cdf66(0xa9)]+':\x20'+_0x45c82d[_0x3cdf66(0xbe)];}}throw new HTTPClientError(_0x540b35,_0x45c82d[_0x3cdf66(0xa9)],_0x3b815a);}let _0x29db0f;if(responseType===_0x3cdf66(0x9f)){const _0x4c2ef1=await _0x45c82d[_0x3cdf66(0xb8)]();_0x29db0f=Buffer[_0x3cdf66(0xab)](_0x4c2ef1);}else responseType===_0x3cdf66(0x78)?_0x29db0f=await _0x45c82d[_0x3cdf66(0x78)]():_0x29db0f=await this[_0x3cdf66(0x89)](_0x45c82d);this[_0x3cdf66(0x99)][_0x3cdf66(0x7a)]('Response\x20['+_0x45c82d[_0x3cdf66(0xa9)]+_0x3cdf66(0x84)+_0x27838e+'\x20'+_0x46182d),this[_0x3cdf66(0x99)][_0x3cdf66(0x9d)](JSON[_0x3cdf66(0xc0)](_0x29db0f,null,0x2));if(includeHeaders){const _0x43d7e5={};return _0x45c82d[_0x3cdf66(0xb6)][_0x3cdf66(0x8b)]((_0x457206,_0x2a0c32)=>{_0x43d7e5[_0x2a0c32]=_0x457206;}),{'data':_0x29db0f,'status':_0x45c82d[_0x3cdf66(0xa9)],'headers':_0x43d7e5};}return _0x29db0f;}catch(_0x22c1f8){_0x160bbc=_0x22c1f8 instanceof Error?_0x22c1f8:new Error(String(_0x22c1f8));if(_0x22c1f8 instanceof HTTPClientError&&!isRetryableError(_0x22c1f8['status']))throw _0x22c1f8;if(_0x265fef>=retries)throw _0x160bbc;const _0x4a3621=getRetryDelay(_0x265fef,this['retryConfig']);let _0x1c3e97;_0x160bbc instanceof HTTPClientError?_0x1c3e97=_0x3cdf66(0xc3)+(_0x265fef+0x1)+'/'+retries+_0x3cdf66(0x83)+_0x160bbc[_0x3cdf66(0xa9)]+':\x20'+_0x160bbc[_0x3cdf66(0xae)]+',\x20'+(_0x3cdf66(0x8c)+Math[_0x3cdf66(0x8a)](_0x4a3621)+_0x3cdf66(0x82)):_0x1c3e97=_0x3cdf66(0xc3)+(_0x265fef+0x1)+'/'+retries+']\x20Request\x20to\x20'+_0x4b8e84+_0x3cdf66(0x7d)+_0x160bbc[_0x3cdf66(0xae)]+',\x20'+(_0x3cdf66(0x8c)+Math['round'](_0x4a3621)+_0x3cdf66(0x82)),console[_0x3cdf66(0xa3)](_0x1c3e97),await this['sleep'](_0x4a3621);}}if(_0x160bbc&&!(_0x160bbc instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x3cdf66(0x95)],_0x3cdf66(0xaa)+_0x4b8e84+'\x20failed:\x20'+_0x160bbc[_0x3cdf66(0xae)],_0x160bbc);throw _0x160bbc||new SDKError(ErrorCode[_0x3cdf66(0x88)],'Request\x20failed\x20after\x20retries');}async['safeParseJSON'](_0x246289){const _0x1e9d54=a2_0x3d3e76,_0x5a72bd=await _0x246289[_0x1e9d54(0x78)]();if(!_0x5a72bd)return null;try{const _0xf18140=a2_0x35f449({'storeAsString':!![]});return _0xf18140[_0x1e9d54(0x7f)](_0x5a72bd);}catch{return{'body':_0x5a72bd};}}[a2_0x3d3e76(0xb4)](_0x4ad1fd,_0x17279e){const _0x24ea66=a2_0x3d3e76;if(!_0x4ad1fd||typeof _0x4ad1fd!==_0x24ea66(0x92))return undefined;const _0x282073=_0x4ad1fd;if(_0x282073[_0x24ea66(0x97)]||_0x282073['title']||_0x282073[_0x24ea66(0x85)])return{'type':_0x282073[_0x24ea66(0x97)]||_0x24ea66(0x93),'title':_0x282073['title']||_0x24ea66(0x8d),'status':_0x282073[_0x24ea66(0xa9)]||_0x17279e,'detail':_0x282073[_0x24ea66(0x85)]||_0x24ea66(0xa5),'instance':_0x282073[_0x24ea66(0xad)]||'',..._0x282073};return undefined;}[a2_0x3d3e76(0xa8)](_0x532223){return new Promise(_0x26dc12=>setTimeout(_0x26dc12,_0x532223));}async['requestSSE'](_0x5d06e6,_0x398fc3,_0x3f80ba={}){const _0x3febb7=a2_0x3d3e76,{headers:headers={},body:_0x55b172,timeout:timeout=0x7530,signal:_0x594e77}=_0x3f80ba,_0x3c4659=''+this[_0x3febb7(0xb3)]+_0x398fc3,_0x46926d={...this['defaultHeaders'],...headers},_0x51a3e9=new AbortController(),_0x476d81=setTimeout(()=>_0x51a3e9['abort'](),timeout),_0x12044c=_0x594e77?[_0x51a3e9['signal'],_0x594e77]:[_0x51a3e9[_0x3febb7(0x7b)]],_0x2e1fb8=this[_0x3febb7(0x96)](_0x12044c);try{const _0x57b749={'method':_0x5d06e6,'headers':_0x46926d,'signal':_0x2e1fb8};if(_0x55b172){if(typeof _0x55b172===_0x3febb7(0xb9))_0x57b749['body']=_0x55b172;else _0x55b172 instanceof Buffer?_0x57b749[_0x3febb7(0x9e)]=_0x55b172:_0x57b749[_0x3febb7(0x9e)]=JSON[_0x3febb7(0xc0)](_0x55b172);}const _0x5584ab=await fetch(_0x3c4659,_0x57b749);clearTimeout(_0x476d81);if(!_0x5584ab['ok']){const _0x56b446=await this[_0x3febb7(0x89)](_0x5584ab),_0x5beca1=this[_0x3febb7(0xb4)](_0x56b446,_0x5584ab[_0x3febb7(0xa9)]);let _0x28469f;if(_0x5584ab[_0x3febb7(0xa9)]===0x191)_0x28469f=_0x3febb7(0x81)+_0x5584ab[_0x3febb7(0xa9)]+':\x20'+_0x5584ab['statusText']+_0x3febb7(0x9c)+_0x3c4659;else{if(_0x5beca1?.[_0x3febb7(0x85)])_0x28469f=_0x5beca1[_0x3febb7(0x85)];else{if(_0x56b446){const _0x9c337e=JSON[_0x3febb7(0xc0)](_0x56b446);_0x28469f=_0x3febb7(0x81)+_0x5584ab['status']+':\x20'+_0x5584ab['statusText']+_0x3febb7(0x79)+_0x9c337e;}else _0x28469f=_0x3febb7(0x81)+_0x5584ab[_0x3febb7(0xa9)]+':\x20'+_0x5584ab[_0x3febb7(0xbe)];}}throw new HTTPClientError(_0x28469f,_0x5584ab[_0x3febb7(0xa9)],_0x5beca1);}return _0x5584ab;}catch(_0x1f782d){clearTimeout(_0x476d81);if(_0x1f782d instanceof HTTPClientError)throw _0x1f782d;if(_0x1f782d[_0x3febb7(0xa0)]===_0x3febb7(0xb1))throw new Error(_0x3febb7(0x9b));throw _0x1f782d;}}[a2_0x3d3e76(0x96)](_0x2f8bd9){const _0x164988=a2_0x3d3e76,_0x42ac8c=new AbortController();for(const _0x13902c of _0x2f8bd9){if(_0x13902c['aborted'])return _0x42ac8c[_0x164988(0xac)](),_0x42ac8c[_0x164988(0x7b)];_0x13902c[_0x164988(0x8e)](_0x164988(0xac),()=>_0x42ac8c[_0x164988(0xac)](),{'once':!![]});}return _0x42ac8c[_0x164988(0x7b)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x28e859=a3_0x3a40;(function(_0x3c9322,_0x2063a5){const _0x30e783=a3_0x3a40,_0x216c48=_0x3c9322();while(!![]){try{const _0x5a6f5b=-parseInt(_0x30e783(0xe3))/0x1+-parseInt(_0x30e783(0x106))/0x2+parseInt(_0x30e783(0xeb))/0x3+-parseInt(_0x30e783(0xd9))/0x4+parseInt(_0x30e783(0xdd))/0x5*(parseInt(_0x30e783(0xcd))/0x6)+-parseInt(_0x30e783(0xfc))/0x7+parseInt(_0x30e783(0x107))/0x8;if(_0x5a6f5b===_0x2063a5)break;else _0x216c48['push'](_0x216c48['shift']());}catch(_0x483af0){_0x216c48['push'](_0x216c48['shift']());}}}(a3_0x48cd,0x2b14d));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a3_0x3a40(_0x2a9748,_0x3a0658){const _0x48cd0f=a3_0x48cd();return a3_0x3a40=function(_0x3a406c,_0x3f986b){_0x3a406c=_0x3a406c-0xbd;let _0x1d5a6c=_0x48cd0f[_0x3a406c];return _0x1d5a6c;},a3_0x3a40(_0x2a9748,_0x3a0658);}import{parseSSEStream}from'../utils/sse-parser.js';import{ErrorCode,SDKError}from'../sdk/errors.js';export class LLMClient{['httpClient'];[a3_0x28e859(0xbd)];[a3_0x28e859(0xc0)];[a3_0x28e859(0xdb)];constructor(_0x465a64,_0x2d80b5){const _0x1212cb=a3_0x28e859;this['baseUrl']=getEndpoint(_0x465a64[_0x1212cb(0xfb)],_0x1212cb(0x100)),this[_0x1212cb(0xc0)]=toHeaderRecord(getAuthHeaders(_0x465a64[_0x1212cb(0xfb)],_0x465a64['apiKey'])),this[_0x1212cb(0xdb)]=_0x2d80b5,this[_0x1212cb(0xc7)]=new HTTPClient(this[_0x1212cb(0xbd)],this[_0x1212cb(0xc0)],_0x2d80b5);}async[a3_0x28e859(0xe5)](){const _0x453684=a3_0x28e859;return await this['httpClient']['request'](_0x453684(0xd4),_0x453684(0xd6));}async[a3_0x28e859(0xe4)](_0x2a303d){const _0x3e3065=a3_0x28e859,_0x13def4={'data':{'type':_0x3e3065(0xf1),'attributes':{'name':_0x2a303d[_0x3e3065(0xbf)],..._0x2a303d[_0x3e3065(0xe2)]&&{'description':_0x2a303d[_0x3e3065(0xe2)]}}}},_0x4b969e=await this[_0x3e3065(0xc7)]['request'](_0x3e3065(0xc8),_0x3e3065(0xd7),{'headers':{'Content-Type':'application/vnd.api+json','Accept':_0x3e3065(0xca)},'body':_0x13def4});return _0x4b969e[_0x3e3065(0xe0)];}async[a3_0x28e859(0x101)](_0x158503){const _0x1435f5=a3_0x28e859,_0x9e725c=_0x1435f5(0xcb)+encodeURIComponent(_0x158503);await this['httpClient'][_0x1435f5(0x10c)]('DELETE',_0x9e725c);}async[a3_0x28e859(0xc2)](_0x55cf64=0x32){const _0x1527af=a3_0x28e859,_0x352ce3=[];let _0x8358dd=_0x1527af(0x104)+_0x55cf64;while(_0x8358dd){const _0x1a8f28=await this[_0x1527af(0xc7)][_0x1527af(0x10c)](_0x1527af(0xd4),_0x8358dd);_0x1a8f28[_0x1527af(0xe0)]&&_0x352ce3[_0x1527af(0x10d)](..._0x1a8f28[_0x1527af(0xe0)]);_0x8358dd=_0x1a8f28[_0x1527af(0xf6)]?.[_0x1527af(0xe1)];if(_0x8358dd&&_0x8358dd[_0x1527af(0xcf)](_0x1527af(0xce))){const _0x2434ac=new URL(_0x8358dd);_0x8358dd=_0x2434ac['pathname']+_0x2434ac[_0x1527af(0x103)];}}return _0x352ce3;}async[a3_0x28e859(0x109)](_0x13ada0){const _0x34d728=a3_0x28e859;let _0x561060='/api/agents';_0x13ada0&&(_0x561060+=_0x34d728(0xc6)+encodeURIComponent(_0x13ada0));const _0x1a16e1=await this[_0x34d728(0xc7)][_0x34d728(0x10c)](_0x34d728(0xd4),_0x561060);return _0x1a16e1[_0x34d728(0xe0)]||[];}async[a3_0x28e859(0xf9)](_0x42fc49){const _0xbd3537=a3_0x28e859,_0x818561=_0xbd3537(0xff)+encodeURIComponent(_0x42fc49),_0x14dd68=await this['httpClient']['request'](_0xbd3537(0xd4),_0x818561);return _0x14dd68[_0xbd3537(0xe0)];}async[a3_0x28e859(0x102)](_0x498f02){const _0x56f62e=a3_0x28e859,_0x1149ac={'name':_0x498f02[_0x56f62e(0xbf)],'projectId':_0x498f02[_0x56f62e(0xc1)],'modelType':_0x498f02['modelType'],'maxToolIterations':_0x498f02['maxToolIterations']??0x4,'temperature':_0x498f02[_0x56f62e(0x10a)]??0.7};_0x498f02[_0x56f62e(0xfd)]!==undefined&&(_0x1149ac[_0x56f62e(0xfd)]=_0x498f02[_0x56f62e(0xfd)]);_0x498f02[_0x56f62e(0xd2)]&&(_0x1149ac[_0x56f62e(0xd2)]=_0x498f02[_0x56f62e(0xd2)]);const _0x5b8b44={'data':{'type':_0x56f62e(0xd0),'attributes':_0x1149ac}},_0x30bd53=await this[_0x56f62e(0xc7)][_0x56f62e(0x10c)](_0x56f62e(0xc8),_0x56f62e(0xc9),{'headers':{'Content-Type':_0x56f62e(0xca),'Accept':'application/vnd.api+json'},'body':_0x5b8b44});return _0x30bd53[_0x56f62e(0xe0)];}async[a3_0x28e859(0xf5)](_0x379abe,_0x4f1b05){const _0x4c4217=a3_0x28e859,_0x11c1bf={'data':{'type':_0x4c4217(0xd0),'id':_0x379abe,'attributes':{..._0x4f1b05[_0x4c4217(0xbf)]&&{'name':_0x4f1b05[_0x4c4217(0xbf)]},..._0x4f1b05['description']&&{'description':_0x4f1b05[_0x4c4217(0xe2)]},..._0x4f1b05[_0x4c4217(0xdc)]&&{'prompt':_0x4f1b05['prompt']},..._0x4f1b05[_0x4c4217(0xd2)]&&{'starter_message':_0x4f1b05[_0x4c4217(0xd2)]}}}},_0x4c41d=_0x4c4217(0xff)+encodeURIComponent(_0x379abe),_0x10f05c=await this[_0x4c4217(0xc7)][_0x4c4217(0x10c)](_0x4c4217(0xfe),_0x4c41d,{'body':_0x11c1bf});return _0x10f05c[_0x4c4217(0xe0)];}async[a3_0x28e859(0xd1)](_0x34bcdc){const _0x152460=a3_0x28e859,_0x51dab1=_0x152460(0xff)+encodeURIComponent(_0x34bcdc);await this[_0x152460(0xc7)][_0x152460(0x10c)](_0x152460(0xbe),_0x51dab1);}async[a3_0x28e859(0xc5)](_0x5750b1=0x32){const _0x434f82=a3_0x28e859,_0x4bc83e=new URLSearchParams();_0x4bc83e[_0x434f82(0xde)](_0x434f82(0xf7),String(_0x5750b1)),_0x4bc83e[_0x434f82(0xde)]('sort','-last_conversation_at');const _0x1236d4=_0x434f82(0xf3)+_0x4bc83e['toString'](),_0x574f0a=await this[_0x434f82(0xc7)][_0x434f82(0x10c)](_0x434f82(0xd4),_0x1236d4);return _0x574f0a[_0x434f82(0xe0)]||[];}async[a3_0x28e859(0xed)](_0x1f36dc){const _0x19d57c=a3_0x28e859,_0x211f7e=_0x19d57c(0xc4)+encodeURIComponent(_0x1f36dc),_0x460484=await this[_0x19d57c(0xc7)][_0x19d57c(0x10c)]('GET',_0x211f7e);return _0x460484[_0x19d57c(0xe0)];}async['getChatHistory'](_0x59652f){const _0xcee580=a3_0x28e859,_0x4881d9='/api/chats/'+encodeURIComponent(_0x59652f)+'/history';return await this[_0xcee580(0xc7)][_0xcee580(0x10c)](_0xcee580(0xd4),_0x4881d9);}async[a3_0x28e859(0xea)](_0x366186){const _0x32c2e6=a3_0x28e859,_0x3b7324={'data':{'type':_0x32c2e6(0x10b),'attributes':{'agentId':_0x366186[_0x32c2e6(0xdf)]}}},_0x41a30b=0x3,_0x64cbb9=[0x3e8,0x7d0,0xfa0];for(let _0x306e80=0x0;_0x306e80<=_0x41a30b;_0x306e80++){const _0x42c7d5=await this[_0x32c2e6(0xc7)]['request'](_0x32c2e6(0xc8),_0x32c2e6(0xe7),{'headers':{'Content-Type':_0x32c2e6(0xca),'Accept':'application/vnd.api+json'},'body':_0x3b7324});if(_0x42c7d5['data']&&_0x42c7d5['data']['id'])return _0x42c7d5[_0x32c2e6(0xe0)];if(_0x306e80>=_0x41a30b)throw new SDKError(ErrorCode[_0x32c2e6(0xda)],'Failed\x20to\x20create\x20chat\x20after\x20'+(_0x41a30b+0x1)+'\x20attempts:\x20API\x20returned\x20empty\x20chat\x20ID');const _0x33d312=_0x64cbb9[_0x306e80];console['warn'](_0x32c2e6(0xee)+(_0x306e80+0x1)+'/'+_0x41a30b+_0x32c2e6(0xf0)+_0x33d312+_0x32c2e6(0xf4)),await new Promise(_0x23d621=>setTimeout(_0x23d621,_0x33d312));}throw new SDKError(ErrorCode[_0x32c2e6(0xda)],'Failed\x20to\x20create\x20chat:\x20unexpected\x20error');}async*[a3_0x28e859(0xc3)](_0x5ed9f3,_0x5b3035,_0x46b855){const _0x5cec5f=a3_0x28e859,_0x1782c3=_0x5b3035['trim']();if(!_0x1782c3)throw new SDKError(ErrorCode[_0x5cec5f(0xef)],_0x5cec5f(0xd5),undefined,{'helpText':'Please\x20provide\x20a\x20non-empty\x20message\x20to\x20continue\x20the\x20chat.'});this['logger'][_0x5cec5f(0xf8)](_0x5cec5f(0xec)+_0x5ed9f3+'\x20with\x20message\x20size:\x20'+_0x5b3035[_0x5cec5f(0xd8)]+'\x20characters');const _0x274e1d=_0x5cec5f(0xc4)+encodeURIComponent(_0x5ed9f3)+_0x5cec5f(0xcc),_0x396955={'input':_0x5b3035};try{const _0x4c09b5=await this[_0x5cec5f(0xc7)][_0x5cec5f(0xf2)](_0x5cec5f(0xc8),_0x274e1d,{'headers':{'Content-Type':_0x5cec5f(0x108),'Accept':_0x5cec5f(0xe9)},'body':_0x396955,'signal':_0x46b855});this[_0x5cec5f(0xdb)][_0x5cec5f(0xe6)]('['+_0x4c09b5[_0x5cec5f(0xd3)]+_0x5cec5f(0x105)+_0x5ed9f3),yield*parseSSEStream(_0x4c09b5);}catch(_0x577545){throw new SDKError(ErrorCode['LLM_STREAM_ERROR'],_0x5cec5f(0xfa)+_0x5ed9f3+_0x5cec5f(0xe8)+_0x5b3035['length']+')',_0x577545);}}}function a3_0x48cd(){const _0x5a4177=['532710hvalcE','Continuing\x20chat\x20','getChatInfo','[Retry\x20','LLM_EMPTY_MESSAGE',']\x20Chat\x20creation\x20returned\x20empty\x20ID,\x20retrying\x20in\x20','projects','requestSSE','/api/chats?','ms...','updateAgent','links','page[limit]','info','getAgent','Failed\x20to\x20continue\x20chat\x20(chatId:\x20','site','1035608kgVFRC','systemPrompt','PATCH','/api/agents/','llm','deleteProject','createAgent','search','/api/projects?page[limit]=',']\x20Streaming\x20SSE\x20stream\x20for\x20chatId:\x20','610076ICxrMV','6730928UPpAoj','application/json','listAgents','temperature','chats','request','push','baseUrl','DELETE','name','authHeaders','projectId','listProjects','continueChat','/api/chats/','listChats','?filter[project_id]=','httpClient','POST','/api/agents','application/vnd.api+json','/api/projects/','/continue','252mbknOY','http','startsWith','agents','deleteAgent','starterMessage','status','GET','Message\x20cannot\x20be\x20empty\x20or\x20whitespace\x20only','/api/users/current_settings','/api/projects','length','583232LwCgRh','LLM_CHAT_CREATION_FAILURE','logger','prompt','915wGdMlD','append','agentId','data','next','description','251371FLHqgJ','createProject','getUserSettings','debug','/api/chats',',\x20message\x20length:\x20','text/event-stream','startChat'];a3_0x48cd=function(){return _0x5a4177;};return a3_0x48cd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x462071=a4_0x1c0a;(function(_0x48d4d7,_0x2127e1){const _0x5d8f0c=a4_0x1c0a,_0x2e395e=_0x48d4d7();while(!![]){try{const _0x244dee=-parseInt(_0x5d8f0c(0xb0))/0x1*(parseInt(_0x5d8f0c(0xc0))/0x2)+parseInt(_0x5d8f0c(0xc2))/0x3*(parseInt(_0x5d8f0c(0xc3))/0x4)+-parseInt(_0x5d8f0c(0xaf))/0x5+parseInt(_0x5d8f0c(0xb1))/0x6*(-parseInt(_0x5d8f0c(0xb4))/0x7)+-parseInt(_0x5d8f0c(0xb7))/0x8+parseInt(_0x5d8f0c(0xb3))/0x9+parseInt(_0x5d8f0c(0xc6))/0xa*(parseInt(_0x5d8f0c(0xbf))/0xb);if(_0x244dee===_0x2127e1)break;else _0x2e395e['push'](_0x2e395e['shift']());}catch(_0x460086){_0x2e395e['push'](_0x2e395e['shift']());}}}(a4_0x4e9a,0xd0e43));export class RateLimiter{[a4_0x462071(0xc4)];[a4_0x462071(0xc1)];[a4_0x462071(0xb9)];[a4_0x462071(0xb6)];constructor(_0x385aed){const _0x3fd26d=a4_0x462071;this[_0x3fd26d(0xb9)]=_0x385aed[_0x3fd26d(0xbb)],this[_0x3fd26d(0xc4)]=_0x385aed[_0x3fd26d(0xbb)],this[_0x3fd26d(0xc1)]=Date[_0x3fd26d(0xb8)](),this['refillRate']=_0x385aed[_0x3fd26d(0xbb)]/_0x385aed[_0x3fd26d(0xc5)];}async[a4_0x462071(0xb2)](){const _0x311128=a4_0x462071;while(!![]){this[_0x311128(0xbd)]();if(this['tokens']>=0x1){this[_0x311128(0xc4)]-=0x1;return;}const _0x3ab295=Math[_0x311128(0xbc)](0x1,Math[_0x311128(0xad)](0x1/this[_0x311128(0xb6)]));await this[_0x311128(0xbe)](_0x3ab295);}}[a4_0x462071(0xae)](){const _0x2c8c89=a4_0x462071;this[_0x2c8c89(0xbd)]();if(this[_0x2c8c89(0xc4)]>=0x1)return this['tokens']-=0x1,!![];return![];}[a4_0x462071(0xbd)](){const _0x318902=a4_0x462071,_0x47e12b=Date[_0x318902(0xb8)](),_0x49a183=_0x47e12b-this['lastRefill'];if(_0x49a183>0x0){const _0xf5ac28=_0x49a183*this[_0x318902(0xb6)];this[_0x318902(0xc4)]=Math[_0x318902(0xb5)](this[_0x318902(0xb9)],this[_0x318902(0xc4)]+_0xf5ac28),this[_0x318902(0xc1)]=_0x47e12b;}}[a4_0x462071(0xab)](){const _0x1902ef=a4_0x462071;return this[_0x1902ef(0xbd)](),Math[_0x1902ef(0xba)](this[_0x1902ef(0xc4)]);}[a4_0x462071(0xac)](){const _0x245cc1=a4_0x462071;this[_0x245cc1(0xc4)]=this[_0x245cc1(0xb9)],this[_0x245cc1(0xc1)]=Date[_0x245cc1(0xb8)]();}[a4_0x462071(0xbe)](_0x28d89f){return new Promise(_0x2bd0c3=>setTimeout(_0x2bd0c3,_0x28d89f));}}function a4_0x1c0a(_0x5ae4ac,_0x130237){const _0x4e9a4e=a4_0x4e9a();return a4_0x1c0a=function(_0x1c0ac5,_0x3bf786){_0x1c0ac5=_0x1c0ac5-0xab;let _0x43fdd4=_0x4e9a4e[_0x1c0ac5];return _0x43fdd4;},a4_0x1c0a(_0x5ae4ac,_0x130237);}export const defaultRateLimiter=new RateLimiter({'maxRequests':0x64,'windowMs':0xea60});function a4_0x4e9a(){const _0x140d37=['refillRate','10413368nKvNEh','now','maxTokens','floor','maxRequests','max','refill','sleep','11Oclsvj','1819826XQQnFV','lastRefill','1541919mWCWzS','12fkVCsP','tokens','windowMs','24631550yCeqTI','getAvailableTokens','reset','ceil','tryAcquire','1978235zuoFzd','1BxDdJh','6CjFtQJ','acquire','6529428StTaUj','8874012JueNjj','min'];a4_0x4e9a=function(){return _0x140d37;};return a4_0x4e9a();}
|