@treasuredata/tdx 0.1.17 → 0.1.18
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/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/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/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/tree-formatter.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const a0_0x4d5596=a0_0x5744;(function(_0x5415b2,_0x217450){const _0x430305=a0_0x5744,_0x365cc8=_0x5415b2();while(!![]){try{const _0xe2f7e4=parseInt(_0x430305(0x28c))/0x1+-parseInt(_0x430305(0x248))/0x2+-parseInt(_0x430305(0x2ae))/0x3*(-parseInt(_0x430305(0x26b))/0x4)+parseInt(_0x430305(0x22c))/0x5*(parseInt(_0x430305(0x2a5))/0x6)+parseInt(_0x430305(0x223))/0x7*(-parseInt(_0x430305(0x1f1))/0x8)+parseInt(_0x430305(0x27f))/0x9+-parseInt(_0x430305(0x294))/0xa*(parseInt(_0x430305(0x1a0))/0xb);if(_0xe2f7e4===_0x217450)break;else _0x365cc8['push'](_0x365cc8['shift']());}catch(_0x65f895){_0x365cc8['push'](_0x365cc8['shift']());}}}(a0_0x2732,0x7fda0));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{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';function a0_0x5744(_0x302897,_0x497100){const _0x273260=a0_0x2732();return a0_0x5744=function(_0x57447f,_0x35d8b5){_0x57447f=_0x57447f-0x177;let _0x255a65=_0x273260[_0x57447f];return _0x255a65;},a0_0x5744(_0x302897,_0x497100);}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';const __filename=fileURLToPath(import.meta[a0_0x4d5596(0x1bd)]),__dirname=dirname(__filename),packageJson=JSON[a0_0x4d5596(0x289)](readFileSync(join(__dirname,a0_0x4d5596(0x226)),a0_0x4d5596(0x177))),program=new Command();program[a0_0x4d5596(0x1a9)]('tdx')['description'](a0_0x4d5596(0x1fe))[a0_0x4d5596(0x1f9)](packageJson[a0_0x4d5596(0x1f9)],'-v,\x20--version',a0_0x4d5596(0x230)),program['option'](a0_0x4d5596(0x1ea),a0_0x4d5596(0x183),a0_0x4d5596(0x266))[a0_0x4d5596(0x250)](a0_0x4d5596(0x191),'Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)')[a0_0x4d5596(0x250)](a0_0x4d5596(0x208),'Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)')['option'](a0_0x4d5596(0x290),a0_0x4d5596(0x2b2))['option']('--tsv',a0_0x4d5596(0x22e))[a0_0x4d5596(0x250)](a0_0x4d5596(0x19c),a0_0x4d5596(0x29a))[a0_0x4d5596(0x250)](a0_0x4d5596(0x233),a0_0x4d5596(0x17d),'40')[a0_0x4d5596(0x250)]('--color',a0_0x4d5596(0x18e),![])[a0_0x4d5596(0x250)]('--no-color',a0_0x4d5596(0x239),![])[a0_0x4d5596(0x250)]('--verbose',a0_0x4d5596(0x25d),![])[a0_0x4d5596(0x250)](a0_0x4d5596(0x1a8),'Set\x20operation\x20timeout\x20in\x20seconds','30')[a0_0x4d5596(0x250)]('--dry-run',a0_0x4d5596(0x1d6),![])[a0_0x4d5596(0x250)](a0_0x4d5596(0x1d9),a0_0x4d5596(0x190),![])[a0_0x4d5596(0x250)](a0_0x4d5596(0x28d),'Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)')['option']('--profile\x20<name>',a0_0x4d5596(0x1a1))[a0_0x4d5596(0x250)](a0_0x4d5596(0x286),a0_0x4d5596(0x29e))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1e9),a0_0x4d5596(0x285))['option'](a0_0x4d5596(0x270),a0_0x4d5596(0x221))[a0_0x4d5596(0x250)](a0_0x4d5596(0x21f),'LLM\x20project\x20to\x20use\x20(overrides\x20context)'),program[a0_0x4d5596(0x24d)]({'formatHelp':(_0x5689bb,_0xf5db08)=>{const _0x24d4da=a0_0x4d5596,_0x596243=_0xf5db08['padWidth'](_0x5689bb,_0xf5db08),_0x5d2ced=0x2,_0x16b532=0x2;function _0x5752a4(_0x1e4d4d){return!!_0x1e4d4d['hidden'];}function _0x419725(_0x364707,_0x3b921a){const _0x3ed776=a0_0x5744;if(_0x3b921a){const _0x12f608=''+_0x364707[_0x3ed776(0x21c)](_0x596243+_0x16b532)+_0x3b921a;return _0x12f608;}return _0x364707;}function _0x4ab843(_0x399047){const _0xf344de=a0_0x5744;return _0x399047[_0xf344de(0x1ec)]('\x0a')[_0xf344de(0x1c3)](/^/gm,'\x20'[_0xf344de(0x19b)](_0x5d2ced));}const _0x1e7168=[];_0x1e7168[_0x24d4da(0x24c)]('Usage:\x20'+_0xf5db08[_0x24d4da(0x287)](_0x5689bb));const _0x3d7aeb=_0xf5db08['commandDescription'](_0x5689bb);_0x3d7aeb&&(_0x1e7168[_0x24d4da(0x24c)](''),_0x1e7168[_0x24d4da(0x24c)](_0x3d7aeb));const _0x67a07a=_0x5689bb[_0x24d4da(0x1ee)][_0x24d4da(0x2af)](_0x24e358=>!_0x5752a4(_0x24e358));if(_0x67a07a[_0x24d4da(0x263)]>0x0){const _0x177876=_0x67a07a['map'](_0x371405=>{const _0x3c0704=_0x24d4da,_0x1aee36=_0xf5db08[_0x3c0704(0x224)](_0x371405),_0x4eba72=_0xf5db08[_0x3c0704(0x1f7)](_0x371405);return _0x419725(_0x1aee36,_0x4eba72);});_0x1e7168['push'](''),_0x1e7168['push'](_0x24d4da(0x244)),_0x1e7168[_0x24d4da(0x24c)](_0x4ab843(_0x177876));}const _0x45e441=_0x5689bb[_0x24d4da(0x29c)]['filter'](_0x496688=>!_0x5752a4(_0x496688));if(_0x45e441[_0x24d4da(0x263)]>0x0){const _0x13fc44=_0x45e441['map'](_0x4ae2bf=>{const _0x5937d9=_0x24d4da,_0x24802d=_0xf5db08[_0x5937d9(0x1e6)](_0x4ae2bf),_0x715574=_0xf5db08[_0x5937d9(0x1d5)](_0x4ae2bf);return _0x419725(_0x24802d,_0x715574);});_0x1e7168[_0x24d4da(0x24c)](''),_0x1e7168[_0x24d4da(0x24c)](_0x24d4da(0x26f)),_0x1e7168['push'](_0x4ab843(_0x13fc44));}const _0x412086=(_0x5689bb[_0x24d4da(0x2b0)]||[])[_0x24d4da(0x2af)](_0x317c35=>!_0x5752a4(_0x317c35));if(_0x412086['length']>0x0){const _0x225360=_0x412086[_0x24d4da(0x1a3)](_0x5326c9=>{const _0x218c98=_0x24d4da,_0x1e39e2=_0xf5db08[_0x218c98(0x28b)](_0x5326c9),_0x30be2a=_0xf5db08[_0x218c98(0x210)](_0x5326c9);return _0x419725(_0x1e39e2,_0x30be2a);});_0x1e7168[_0x24d4da(0x24c)](''),_0x1e7168[_0x24d4da(0x24c)](_0x24d4da(0x28a)),_0x1e7168[_0x24d4da(0x24c)](_0x4ab843(_0x225360));}return _0x1e7168[_0x24d4da(0x1ec)]('\x0a');},'subcommandTerm':_0x5400c3=>{const _0x4d5349=a0_0x4d5596,_0x5159a2=(_0x5400c3[_0x4d5349(0x2b0)]||[])[_0x4d5349(0x1a3)](_0x3b84ef=>_0x3b84ef[_0x4d5349(0x218)]?'<'+_0x3b84ef[_0x4d5349(0x1a9)]()+'>':'['+_0x3b84ef['name']()+']')[_0x4d5349(0x1ec)]('\x20'),_0xec09d8=_0x5400c3[_0x4d5349(0x27c)](),_0x43dd8b=_0xec09d8[_0x4d5349(0x263)]>0x0?_0x5400c3[_0x4d5349(0x1a9)]()+',\x20'+_0xec09d8[_0x4d5349(0x1ec)](',\x20'):_0x5400c3[_0x4d5349(0x1a9)]();return _0x5159a2?_0x43dd8b+'\x20'+_0x5159a2:_0x43dd8b;}}),program[a0_0x4d5596(0x1bf)](a0_0x4d5596(0x238),_0x579d8e=>{const _0x57d595=a0_0x4d5596,_0x46545d=_0x579d8e['opts']();if(!_0x46545d[_0x57d595(0x1aa)]){if(_0x46545d[_0x57d595(0x1cc)])_0x46545d[_0x57d595(0x1aa)]=_0x57d595(0x1cc);else{if(_0x46545d[_0x57d595(0x1e7)])_0x46545d[_0x57d595(0x1aa)]='jsonl';else _0x46545d[_0x57d595(0x26c)]&&(_0x46545d[_0x57d595(0x1aa)]=_0x57d595(0x26c));}}_0x46545d['in']&&!_0x46545d[_0x57d595(0x20d)]&&(_0x46545d['database']=_0x46545d['in']);});function createTDXInstance(_0x360901){const _0x3566f7=a0_0x4d5596,_0x36b3f4=new GlobalContext(_0x360901);_0x36b3f4[_0x3566f7(0x27b)](_0x360901);const _0x4a7492={'site':_0x36b3f4['site'],'apiKey':_0x36b3f4['apiKey'],'verbose':_0x36b3f4['verbose']};return new TDX(_0x4a7492);}program[a0_0x4d5596(0x1bb)]('databases\x20[pattern]')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x18c))['action'](async(_0x263473,_0x59db31)=>{const _0x18a0ce=a0_0x4d5596,_0x2627f9=new DatabasesCommand(),_0x1fbc34=program[_0x18a0ce(0x268)](),_0x2c55cb=createTDXInstance(_0x1fbc34),_0x2743f5=await _0x2627f9[_0x18a0ce(0x1b6)]({'options':{..._0x1fbc34,..._0x59db31},'args':_0x263473?[_0x263473]:[],'tdx':_0x2c55cb});process[_0x18a0ce(0x25f)](_0x2743f5);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x228))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x214))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1dd),a0_0x4d5596(0x229))[a0_0x4d5596(0x250)](a0_0x4d5596(0x211),a0_0x4d5596(0x201))[a0_0x4d5596(0x250)](a0_0x4d5596(0x253),'Temperature\x20(0.0-2.0,\x20default:\x200.7)')[a0_0x4d5596(0x250)](a0_0x4d5596(0x255),a0_0x4d5596(0x1c4))[a0_0x4d5596(0x1d2)](async(_0x28c2b5,_0x5a81f4)=>{const _0x1c5d29=a0_0x4d5596,_0x25b053=new ChatCommand(),_0x1c61b6=program[_0x1c5d29(0x268)](),_0x547fb4=createTDXInstance(_0x1c61b6),_0x117e25=await _0x25b053[_0x1c5d29(0x1b6)]({'options':{..._0x1c61b6,..._0x5a81f4},'args':_0x28c2b5,'tdx':_0x547fb4});process[_0x1c5d29(0x25f)](_0x117e25);});function a0_0x2732(){const _0x178d63=['Model\x20type\x20(default:\x20claude-4.5-sonnet)','226640srxtdG','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','Request\x20body\x20as\x20JSON\x20string','output\x20the\x20version\x20number','requiredOption','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','--limit\x20<rows>','--resume-from\x20<task>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','--status\x20<status>','preAction','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','--revision\x20<revision>','Agent\x20description','Master\x20table\x20name','--schedule-option\x20<value>','Create\x20a\x20new\x20LLM\x20project','Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)','argv','profiles','Segment\x20description','segments\x20[path]','Commands:','job','show\x20<folder_ref>','Project\x20description','842940GchqHg','Folder\x20name\x20for\x20organization','slice','Filtering\x20rule\x20from\x20JSON\x20file','push','configureHelp','attempts\x20[project]','Read\x20request\x20body\x20from\x20file','option','Trino\x20catalog\x20(default:\x20td)','--agent\x20<name>','--temperature\x20<n>','show\x20<job-id>','--new','-H,\x20--header\x20<header>','--database\x20<db>','List\x20available\x20fields\x20for\x20segmentation','--max-tool-iterations\x20<n>','Show\x20current\x20resolved\x20context','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','llm','Enable\x20verbose\x20logging','Behaviors\x20from\x20JSON\x20file','exit','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','download\x20<project-name>\x20[output-dir]','delete\x20<name>','length','Starting\x20offset\x20for\x20logs\x20(default:\x200)','--reason\x20<text>','us01','Add\x20behaviors\x20from\x20JSON\x20file','opts','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','12cKehJg','tsv','allowUnknownOption','Show\x20logs\x20for\x20a\x20specific\x20task','Options:','--parent-segment\x20<name>','GET','--add-behaviors-file\x20<file>','--parent-folder\x20<name>','--no-count-population','Temperature\x20(0.0-2.0,\x20default:\x200.7)','List\x20workflows\x20(optionally\x20filtered\x20by\x20project)','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','Reason\x20for\x20killing\x20the\x20attempt','--rule\x20<json>','agents\x20[pattern]','injectIntoOptions','aliases','-d,\x20--database\x20<database>','4000','7693137OHGMgx','summary','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','Updated\x20description','show\x20<segment_name>','api\x20[endpoint]','Alias\x20for\x20--database\x20(natural\x20language\x20style)','-d,\x20--database\x20<name>','commandUsage','\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','parse','Arguments:','argumentTerm','579958cmhnIX','--session\x20<id>','--attributes\x20<json>','Job\x20management\x20commands','--jsonl','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','--behaviors-file\x20<file>','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','930uMwJvc','port','Enable\x20debug\x20mode\x20(logs\x20proxy\x20request/response\x20to\x20stderr)','Show\x20job\x20details','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','--type\x20<api_type>','Save\x20output\x20to\x20file','Update\x20an\x20existing\x20agent','options','create\x20<segment_name>','Database\x20to\x20use\x20(overrides\x20context)','Parent\x20segment\x20(audience)\x20management','List\x20jobs','--folder\x20<name>','--table\x20<table>','-f,\x20--file\x20<path>','Master\x20database\x20name','60EPmScm','--in\x20<database>','--data\x20<data>','sonnet','use\x20<path>','Attributes\x20as\x20JSON\x20string','show\x20[table]','--customer-group\x20<json>','Kill\x20a\x20running\x20attempt','1018953OPljMB','filter','registeredArguments','--to\x20<timestamp>','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','--add-attributes-file\x20<file>','claude','proxy','Get\x20job\x20results','Workflow\x20(Digdag)\x20management\x20commands','utf-8','show\x20<agent-name>','delete\x20<agent-name>','Override\x20project\x20name','Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)','Filtering\x20rule\x20as\x20JSON\x20string','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','--attributes-file\x20<file>','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','--name\x20<text>','folders\x20<parent_name>','Parent\x20folder\x20name\x20for\x20nested\x20folders','TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02,\x20ap03,\x20dev-us01,\x20dev-eu01,\x20stg-us01,\x20stg-jp01,\x20stg-ap03;\x20aliases:\x20us,\x20jp,\x20aws,\x20dev,\x20stg)','tables\x20[pattern]','Create\x20parent\x20segment\x20(audience)','--project\x20<name>','update\x20<agent-name>','Agent\x20prompt/instructions','fields\x20<parent_name>','--skip-validation','create\x20<parent_name>\x20<folder_name>','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','agent','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','retry\x20<session-id|attempt-id>','Skip\x20confirmation\x20prompts','--format\x20<format>','--description\x20<text>','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)','--database\x20<name>','0.7','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','--invisible','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','repeat','--output\x20<file>','--include-subtasks','Behaviors\x20as\x20JSON\x20string','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','216634OqhOxc','Profile\x20to\x20use\x20(overrides\x20active\x20profile)','--rule-file\x20<file>','map','CDP\x20segment\x20management\x20commands','desc','Include\x20retried\x20attempts','workflows\x20[project]','--timeout\x20<seconds>','name','format','Skip\x20validation\x20of\x20.dig\x20files','List\x20all\x20available\x20profiles','trino','Create\x20a\x20new\x20agent\x20in\x20current\x20project','Show\x20agent\x20details','Agent\x20name','Add\x20behaviors\x20as\x20JSON\x20string','update\x20<name>','push\x20[project-name-or-dir]','--max-depth\x20<depth>','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','run','--behaviors\x20<json>','--add-attributes\x20<json>','--catalog\x20<catalog>','Move\x20to\x20folder','command','outputHelp','url','Show\x20context\x20with\x20sources\x20(for\x20debugging)','hook','kill\x20<job-id>','workflow','Show\x20tasks\x20for\x20an\x20attempt','replace','Start\x20a\x20new\x20chat\x20session','Starter\x20message','alias','Maximum\x20recursion\x20depth\x20(default:\x2010)','--timezone\x20<tz>','System\x20prompt/instructions\x20(default:\x20empty)','Update\x20child\x20segment\x20(use\x20parent_name/child_name)','--offset\x20<number>','json','--from\x20<timestamp>','Add\x20attributes\x20from\x20JSON\x20file','addHelpText','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','history\x20[chat-id]','action','List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','optionDescription','Preview\x20operation\x20without\x20executing','logs\x20<attempt-id>\x20<task-name>','sql\x20<segment_name>','-y,\x20--yes','-r,\x20--recursive','--debug','help','--agent\x20<ref>','--schedule-type\x20<type>','create\x20<name>','context','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','--params\x20<json>','update\x20<segment_name>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)','jobs','optionTerm','jsonl','Delete\x20an\x20agent','--in\x20<name>','--site\x20<site>','Updated\x20filtering\x20rule\x20from\x20JSON\x20file','join','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','commands','Customer\x20group\x20as\x20JSON\x20string','result\x20<job-id>','8qzMqzg','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','attempt\x20<attempt-id>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','--clear','subcommandDescription','--job-type\x20<type>','version','LLM\x20agent\x20management','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Show\x20current\x20segment/folder\x20context','Parent\x20segment\x20description','AI-native\x20CLI\x20for\x20Treasure\x20Data','Timezone\x20(e.g.,\x20America/Los_Angeles)','delete\x20<project-name-or-id>','Model\x20name\x20(default:\x20claude-4.5-sonnet)','Run\x20Trino\x20query\x20with\x20streaming\x20results','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','projects\x20[pattern]','Show\x20specific\x20attempt\x20details','Create\x20segment\x20folder','activations\x20<segment_name>','--json','--name\x20<name>','query\x20[sql]','Submit\x20a\x20job','--prompt\x20<text>','database','use\x20[resource]\x20[value]','Folder\x20description','argumentDescription','--model\x20<name>','Start\x20time\x20filter\x20(ISO\x208601\x20format)','--customer-group-file\x20<file>','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)','List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context','Delete\x20an\x20LLM\x20project','LLM\x20project\x20management','required','Updated\x20schedule\x20option','Updated\x20timezone','description','padEnd','--kind\x20<type>','--name\x20<new_name>','--llm-project\x20<name>','--from-task\x20<task>','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','Read\x20SQL\x20query\x20from\x20file','912044qQMfcm','subcommandTerm','Revision\x20name\x20(default:\x20timestamp)','../package.json','--force','chat\x20[message...]','Agent\x20reference\x20(project-name/agent-name)','Make\x20segment\x20invisible\x20(default:\x20visible)'];a0_0x2732=function(){return _0x178d63;};return a0_0x2732();}const apiCmd=program['command'](a0_0x4d5596(0x284))[a0_0x4d5596(0x280)](a0_0x4d5596(0x293))[a0_0x4d5596(0x1cf)]('after',a0_0x4d5596(0x288))['option']('-X,\x20--method\x20<method>',a0_0x4d5596(0x235),a0_0x4d5596(0x271))['option'](a0_0x4d5596(0x2a7),a0_0x4d5596(0x22f))[a0_0x4d5596(0x250)]('-f,\x20--file\x20<path>',a0_0x4d5596(0x24f))[a0_0x4d5596(0x250)](a0_0x4d5596(0x256),a0_0x4d5596(0x193),(_0x562beb,_0x181e3b)=>{return _0x181e3b?[..._0x181e3b,_0x562beb]:[_0x562beb];})[a0_0x4d5596(0x250)](a0_0x4d5596(0x299),a0_0x4d5596(0x1e1),'td')[a0_0x4d5596(0x1d2)](async(_0x76be68,_0x3ffafd)=>{const _0x5bd99e=a0_0x4d5596;if(!_0x76be68){apiCmd[_0x5bd99e(0x1dc)]();return;}const _0x13a113=new ApiCommand(),_0x37d8a8=program[_0x5bd99e(0x268)](),_0x4d6322=createTDXInstance(_0x37d8a8),_0x3ba342=await _0x13a113[_0x5bd99e(0x1b6)]({'options':{..._0x37d8a8,..._0x3ffafd},'args':[_0x76be68],'tdx':_0x4d6322});process[_0x5bd99e(0x25f)](_0x3ba342);});program['command'](a0_0x4d5596(0x184))['description'](a0_0x4d5596(0x260))['option'](a0_0x4d5596(0x27d),a0_0x4d5596(0x1e4))[a0_0x4d5596(0x250)](a0_0x4d5596(0x2a6),a0_0x4d5596(0x285))[a0_0x4d5596(0x1d2)](async(_0x48690e,_0x50c833)=>{const _0x23ee67=a0_0x4d5596,_0x30f44f=new TablesCommand(),_0x5cd7e4=program[_0x23ee67(0x268)](),_0xbcb6dc=createTDXInstance(_0x5cd7e4);_0x50c833['in']&&(_0x50c833[_0x23ee67(0x20d)]=_0x50c833['in']);const _0x33886a=await _0x30f44f[_0x23ee67(0x1b6)]({'options':{..._0x5cd7e4,..._0x50c833},'args':_0x48690e?[_0x48690e]:[],'tdx':_0xbcb6dc});process['exit'](_0x33886a);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x2ab))[a0_0x4d5596(0x21b)]('Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)')['option'](a0_0x4d5596(0x27d),a0_0x4d5596(0x1f4))[a0_0x4d5596(0x250)](a0_0x4d5596(0x2a6),a0_0x4d5596(0x285))[a0_0x4d5596(0x1d2)](async(_0x5c5df0,_0x2bdd2c)=>{const _0x193f24=a0_0x4d5596,_0x160093=new ShowCommand(),_0x16845b=program['opts'](),_0xc182c9=createTDXInstance(_0x16845b);_0x2bdd2c['in']&&(_0x2bdd2c['database']=_0x2bdd2c['in']);const _0x1dd639=await _0x160093[_0x193f24(0x1b6)]({'options':{..._0x16845b,..._0x2bdd2c},'args':_0x5c5df0?[_0x5c5df0]:[],'tdx':_0xc182c9});process[_0x193f24(0x25f)](_0x1dd639);}),program[a0_0x4d5596(0x1bb)]('describe\x20[table]')[a0_0x4d5596(0x1c6)](a0_0x4d5596(0x1a5))['description']('Describe\x20table\x20schema')[a0_0x4d5596(0x250)]('-d,\x20--database\x20<database>',a0_0x4d5596(0x1f4))['option'](a0_0x4d5596(0x2a6),a0_0x4d5596(0x285))[a0_0x4d5596(0x1d2)](async(_0x122f0d,_0x41d468)=>{const _0x4cd6ed=a0_0x4d5596,_0x54b0ba=new DescribeCommand(),_0x5ccf14=program[_0x4cd6ed(0x268)](),_0x5915c4=createTDXInstance(_0x5ccf14);_0x41d468['in']&&(_0x41d468[_0x4cd6ed(0x20d)]=_0x41d468['in']);const _0x27ed8e=await _0x54b0ba[_0x4cd6ed(0x1b6)]({'options':{..._0x5ccf14,..._0x41d468},'args':_0x122f0d?[_0x122f0d]:[],'tdx':_0x5915c4});process[_0x4cd6ed(0x25f)](_0x27ed8e);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x20a))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x202))[a0_0x4d5596(0x250)](a0_0x4d5596(0x27d),'Database\x20to\x20query\x20(default:\x20information_schema)')[a0_0x4d5596(0x250)](a0_0x4d5596(0x2a6),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x4d5596(0x250)](a0_0x4d5596(0x1b9),a0_0x4d5596(0x251))[a0_0x4d5596(0x250)](a0_0x4d5596(0x2a3),a0_0x4d5596(0x222))[a0_0x4d5596(0x250)](a0_0x4d5596(0x233),'Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','40')['action'](async(_0x40b90e,_0x28f5ab)=>{const _0x45a9d0=a0_0x4d5596,_0x58b5d7=new QueryCommand(),_0x345261=program['opts'](),_0x54d9ce=createTDXInstance(_0x345261);_0x28f5ab['in']&&(_0x28f5ab[_0x45a9d0(0x20d)]=_0x28f5ab['in']);const _0x1fffa7=await _0x58b5d7['run']({'options':{..._0x345261,..._0x28f5ab},'args':_0x40b90e?[_0x40b90e]:[],'tdx':_0x54d9ce});process[_0x45a9d0(0x25f)](_0x1fffa7);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x243))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x215))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1da),a0_0x4d5596(0x19a))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1b4),a0_0x4d5596(0x1c7),'10')['action'](async(_0x1b6bea,_0x1ea858)=>{const _0x25fe34=a0_0x4d5596,_0x1fe077=new SegmentsCommand(),_0xca0385=program[_0x25fe34(0x268)](),_0x31b296=createTDXInstance(_0xca0385),_0x5cfcc7=await _0x1fe077['run']({'options':{..._0xca0385,..._0x1ea858},'args':_0x1b6bea?[_0x1b6bea]:[],'tdx':_0x31b296});process[_0x25fe34(0x25f)](_0x5cfcc7);});const segmentCmd=program[a0_0x4d5596(0x1bb)]('segment')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1a4));segmentCmd['command'](a0_0x4d5596(0x2a9))['description'](a0_0x4d5596(0x26a))[a0_0x4d5596(0x1d2)](async(_0x15154b,_0x345f3e)=>{const _0x22f68c=a0_0x4d5596,_0x69668e=new SegmentUseCommand(),_0x195ca0=program[_0x22f68c(0x268)](),_0x15cbf5=createTDXInstance(_0x195ca0),_0x5c1f02=await _0x69668e[_0x22f68c(0x1b6)]({'options':{..._0x195ca0,..._0x345f3e},'args':[_0x15154b],'tdx':_0x15cbf5});process[_0x22f68c(0x25f)](_0x5c1f02);}),segmentCmd['command']('pwd')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1fc))[a0_0x4d5596(0x1d2)](async _0x99a16d=>{const _0xfdd2e1=a0_0x4d5596,_0x46d1c3=new SegmentPwdCommand(),_0x550cb0=program['opts'](),_0x4149f4=createTDXInstance(_0x550cb0),_0x46efc6=await _0x46d1c3[_0xfdd2e1(0x1b6)]({'options':{..._0x550cb0,..._0x99a16d},'args':[],'tdx':_0x4149f4});process[_0xfdd2e1(0x25f)](_0x46efc6);}),segmentCmd[a0_0x4d5596(0x1bb)]('describe\x20<segment_name>')['alias'](a0_0x4d5596(0x1a5))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x194))[a0_0x4d5596(0x1d2)](async(_0x159009,_0x2e8adc)=>{const _0x616229=a0_0x4d5596,_0x12dfd3=new SegmentDescribeCommand(),_0x42b4db=program[_0x616229(0x268)](),_0x4e146c=createTDXInstance(_0x42b4db),_0x3b68af=await _0x12dfd3['run']({'options':{..._0x42b4db,..._0x2e8adc},'args':[_0x159009],'tdx':_0x4e146c});process[_0x616229(0x25f)](_0x3b68af);}),segmentCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x283))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x291))[a0_0x4d5596(0x1d2)](async(_0x5e4b97,_0x910b34)=>{const _0x45a6e2=a0_0x4d5596,_0x41063c=new SegmentShowCommand(),_0x19ecfe=program[_0x45a6e2(0x268)](),_0x396894=createTDXInstance(_0x19ecfe),_0x3d19e6=await _0x41063c[_0x45a6e2(0x1b6)]({'options':{..._0x19ecfe,..._0x910b34},'args':[_0x5e4b97],'tdx':_0x396894});process[_0x45a6e2(0x25f)](_0x3d19e6);}),segmentCmd['command'](a0_0x4d5596(0x181))[a0_0x4d5596(0x21b)]('List\x20segment\x20folders\x20under\x20a\x20parent\x20segment')[a0_0x4d5596(0x1d2)](async(_0x5427ef,_0x3614ca)=>{const _0x311583=a0_0x4d5596,_0xd0be7c=new SegmentFolderListCommand(),_0x5216dc=program[_0x311583(0x268)](),_0x2717a7=createTDXInstance(_0x5216dc),_0x4b1977=await _0xd0be7c[_0x311583(0x1b6)]({'options':{..._0x5216dc,..._0x3614ca},'args':[_0x5427ef],'tdx':_0x2717a7});process['exit'](_0x4b1977);});const folderCmd=segmentCmd[a0_0x4d5596(0x1bb)]('folder')[a0_0x4d5596(0x21b)]('Segment\x20folder\x20management');folderCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x246))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x298))['action'](async(_0x5a0a12,_0x1cf3ad)=>{const _0x50bd42=a0_0x4d5596,_0x42a9a5=new SegmentFolderShowCommand(),_0x5cdc5a=program['opts'](),_0x2db359=createTDXInstance(_0x5cdc5a),_0x175a09=await _0x42a9a5[_0x50bd42(0x1b6)]({'options':{..._0x5cdc5a,..._0x1cf3ad},'args':[_0x5a0a12],'tdx':_0x2db359});process['exit'](_0x175a09);}),segmentCmd['command'](a0_0x4d5596(0x1d8))[a0_0x4d5596(0x21b)]('Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)')[a0_0x4d5596(0x1d2)](async(_0x1ea896,_0x560b8c)=>{const _0x23dae2=a0_0x4d5596,_0x2fea51=new SegmentSQLCommand(),_0x543b7f=program[_0x23dae2(0x268)](),_0x1fc5d6=createTDXInstance(_0x543b7f),_0x5eb57f=await _0x2fea51['run']({'options':{..._0x543b7f,..._0x560b8c},'args':[_0x1ea896],'tdx':_0x1fc5d6});process['exit'](_0x5eb57f);}),segmentCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x189))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x258))[a0_0x4d5596(0x1d2)](async(_0xf46881,_0x2a24c2)=>{const _0x2ec5b5=a0_0x4d5596,_0x22cc40=new SegmentFieldsCommand(),_0x335c75=program[_0x2ec5b5(0x268)](),_0x9b5cb4=createTDXInstance(_0x335c75),_0x16d305=await _0x22cc40['run']({'options':{..._0x335c75,..._0x2a24c2},'args':[_0xf46881],'tdx':_0x9b5cb4});process[_0x2ec5b5(0x25f)](_0x16d305);}),segmentCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x29d))[a0_0x4d5596(0x21b)]('Create\x20child\x20segment\x20(use\x20parent_name/child_name)')[a0_0x4d5596(0x250)](a0_0x4d5596(0x192),a0_0x4d5596(0x242))[a0_0x4d5596(0x250)](a0_0x4d5596(0x279),a0_0x4d5596(0x17c))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1a2),a0_0x4d5596(0x24b))[a0_0x4d5596(0x250)](a0_0x4d5596(0x2a1),a0_0x4d5596(0x249))[a0_0x4d5596(0x250)](a0_0x4d5596(0x21d),a0_0x4d5596(0x1f5))[a0_0x4d5596(0x250)](a0_0x4d5596(0x199),a0_0x4d5596(0x22a))[a0_0x4d5596(0x250)](a0_0x4d5596(0x274),'Skip\x20population\x20counting')[a0_0x4d5596(0x1d2)](async(_0x102234,_0x4a0d30)=>{const _0x2dbbd9=a0_0x4d5596,_0x2b21a9=new SegmentCreateCommand(),_0x48e958=program[_0x2dbbd9(0x268)](),_0x5b0501=createTDXInstance(_0x48e958),_0x1b7021=await _0x2b21a9[_0x2dbbd9(0x1b6)]({'options':{..._0x48e958,..._0x4a0d30},'args':[_0x102234],'tdx':_0x5b0501});process['exit'](_0x1b7021);}),segmentCmd['command'](a0_0x4d5596(0x1e3))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1ca))[a0_0x4d5596(0x250)](a0_0x4d5596(0x21e),'New\x20segment\x20name')[a0_0x4d5596(0x250)](a0_0x4d5596(0x192),a0_0x4d5596(0x282))['option'](a0_0x4d5596(0x279),'Updated\x20filtering\x20rule\x20as\x20JSON\x20string')[a0_0x4d5596(0x250)](a0_0x4d5596(0x1a2),a0_0x4d5596(0x1eb))['option'](a0_0x4d5596(0x2a1),a0_0x4d5596(0x1ba))['option'](a0_0x4d5596(0x21d),a0_0x4d5596(0x1f5))['action'](async(_0x28096c,_0x1bb0b2)=>{const _0x35ed7c=a0_0x4d5596,_0x4d8199=new SegmentUpdateCommand(),_0x362c40=program[_0x35ed7c(0x268)](),_0x3c4a3b=createTDXInstance(_0x362c40),_0x3dbfde=await _0x4d8199[_0x35ed7c(0x1b6)]({'options':{..._0x362c40,..._0x1bb0b2},'args':[_0x28096c],'tdx':_0x3c4a3b});process['exit'](_0x3dbfde);});const parentCmd=segmentCmd[a0_0x4d5596(0x1bb)]('parent')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x29f));parentCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1df))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x185))[a0_0x4d5596(0x231)](a0_0x4d5596(0x257),a0_0x4d5596(0x2a4))['requiredOption'](a0_0x4d5596(0x2a2),a0_0x4d5596(0x23c))[a0_0x4d5596(0x250)](a0_0x4d5596(0x192),a0_0x4d5596(0x1fd))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1de),'Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly')[a0_0x4d5596(0x250)](a0_0x4d5596(0x23d),a0_0x4d5596(0x22d))['option'](a0_0x4d5596(0x1c8),a0_0x4d5596(0x1ff))[a0_0x4d5596(0x250)](a0_0x4d5596(0x28e),a0_0x4d5596(0x2aa))['option'](a0_0x4d5596(0x17e),'Attributes\x20from\x20JSON\x20file')[a0_0x4d5596(0x250)](a0_0x4d5596(0x1b7),a0_0x4d5596(0x19e))[a0_0x4d5596(0x250)](a0_0x4d5596(0x292),a0_0x4d5596(0x25e))[a0_0x4d5596(0x250)](a0_0x4d5596(0x2ac),a0_0x4d5596(0x1ef))[a0_0x4d5596(0x250)](a0_0x4d5596(0x213),'Customer\x20group\x20from\x20JSON\x20file')[a0_0x4d5596(0x1d2)](async(_0x197456,_0x5a7b7f)=>{const _0x40cb8c=a0_0x4d5596,_0x39a4df=new ParentSegmentCreateCommand(),_0x3dc544=program[_0x40cb8c(0x268)](),_0x58d251=createTDXInstance(_0x3dc544),_0x1c3df6=await _0x39a4df[_0x40cb8c(0x1b6)]({'options':{..._0x3dc544,..._0x5a7b7f},'args':[_0x197456],'tdx':_0x58d251});process[_0x40cb8c(0x25f)](_0x1c3df6);}),parentCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1b2))['description']('Update\x20parent\x20segment\x20(audience)')['option'](a0_0x4d5596(0x192),a0_0x4d5596(0x282))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1de),a0_0x4d5596(0x17f))[a0_0x4d5596(0x250)](a0_0x4d5596(0x23d),a0_0x4d5596(0x219))[a0_0x4d5596(0x250)]('--timezone\x20<tz>',a0_0x4d5596(0x21a))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1b8),'Add\x20attributes\x20as\x20JSON\x20string')[a0_0x4d5596(0x250)](a0_0x4d5596(0x2b3),a0_0x4d5596(0x1ce))[a0_0x4d5596(0x250)]('--add-behaviors\x20<json>',a0_0x4d5596(0x1b1))[a0_0x4d5596(0x250)](a0_0x4d5596(0x272),a0_0x4d5596(0x267))[a0_0x4d5596(0x1d2)](async(_0x2eefd3,_0x43e618)=>{const _0x2b13c0=a0_0x4d5596,_0x51a68a=new ParentSegmentUpdateCommand(),_0x5bf5f6=program[_0x2b13c0(0x268)](),_0x1bab7e=createTDXInstance(_0x5bf5f6),_0xf9e0cb=await _0x51a68a['run']({'options':{..._0x5bf5f6,..._0x43e618},'args':[_0x2eefd3],'tdx':_0x1bab7e});process[_0x2b13c0(0x25f)](_0xf9e0cb);}),folderCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x18b))['description'](a0_0x4d5596(0x206))[a0_0x4d5596(0x250)]('--description\x20<text>',a0_0x4d5596(0x20f))[a0_0x4d5596(0x250)](a0_0x4d5596(0x273),a0_0x4d5596(0x182))[a0_0x4d5596(0x1d2)](async(_0x209c1c,_0x530140,_0x191e90)=>{const _0x2a936b=a0_0x4d5596,_0x2febf0=new SegmentFolderCreateCommand(),_0x2ad52e=program[_0x2a936b(0x268)](),_0x380027=createTDXInstance(_0x2ad52e),_0xa69729=await _0x2febf0[_0x2a936b(0x1b6)]({'options':{..._0x2ad52e,..._0x191e90},'args':[_0x209c1c,_0x530140],'tdx':_0x380027});process[_0x2a936b(0x25f)](_0xa69729);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x207))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1d4))[a0_0x4d5596(0x1d2)](async(_0x52e4c0,_0x2ca9f8)=>{const _0x3005b1=a0_0x4d5596,_0x2f7d69=new ActivationsCommand(),_0x5adf8c=program[_0x3005b1(0x268)](),_0x32f01d=createTDXInstance(_0x5adf8c),_0x351929=await _0x2f7d69[_0x3005b1(0x1b6)]({'options':{..._0x5adf8c,..._0x2ca9f8},'args':[_0x52e4c0],'tdx':_0x32f01d});process['exit'](_0x351929);});const workflowCmd=program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1c1))[a0_0x4d5596(0x1c6)]('wf')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x2b7));workflowCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x204))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1d3))[a0_0x4d5596(0x1d2)](async(_0x93b342,_0x5f3867)=>{const _0x424044=a0_0x4d5596,_0x2fb515=new WorkflowProjectsCommand(),_0x2de7ef=program[_0x424044(0x268)](),_0x9e0e5a=createTDXInstance(_0x2de7ef),_0x25e31e=await _0x2fb515[_0x424044(0x1b6)]({'options':{..._0x2de7ef,..._0x5f3867},'args':_0x93b342?[_0x93b342]:[],'tdx':_0x9e0e5a});process[_0x424044(0x25f)](_0x25e31e);}),workflowCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1a7))[a0_0x4d5596(0x1c6)]('ls')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x276))[a0_0x4d5596(0x1d2)](async(_0x417d26,_0x403e24)=>{const _0x2c5e39=a0_0x4d5596,_0x4cfe99=new WorkflowWorkflowsCommand(),_0x4b942a=program[_0x2c5e39(0x268)](),_0x1f9c27=createTDXInstance(_0x4b942a),_0x3d7dac=await _0x4cfe99[_0x2c5e39(0x1b6)]({'options':{..._0x4b942a,..._0x403e24},'args':_0x417d26?[_0x417d26]:[],'tdx':_0x1f9c27});process[_0x2c5e39(0x25f)](_0x3d7dac);}),workflowCmd[a0_0x4d5596(0x1bb)]('sessions\x20[project]')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1b5))[a0_0x4d5596(0x250)](a0_0x4d5596(0x237),a0_0x4d5596(0x281))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1cd),a0_0x4d5596(0x212))['option'](a0_0x4d5596(0x2b1),'End\x20time\x20filter\x20(ISO\x208601\x20format)')[a0_0x4d5596(0x1d2)](async(_0x41d39f,_0x43802a)=>{const _0x245e36=a0_0x4d5596,_0x5efd00=new WorkflowSessionsCommand(),_0x1ee632=program[_0x245e36(0x268)](),_0x1747d1=createTDXInstance(_0x1ee632),_0x2bf91f=await _0x5efd00[_0x245e36(0x1b6)]({'options':{..._0x1ee632,..._0x43802a},'args':_0x41d39f?[_0x41d39f]:[],'tdx':_0x1747d1});process[_0x245e36(0x25f)](_0x2bf91f);}),workflowCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x24e))[a0_0x4d5596(0x21b)]('List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)')[a0_0x4d5596(0x250)]('--include-retried',a0_0x4d5596(0x1a6))[a0_0x4d5596(0x1d2)](async(_0xeba14b,_0x143b29)=>{const _0x28e7ab=a0_0x4d5596,_0x41345f=new WorkflowAttemptsCommand(),_0x25098c=program[_0x28e7ab(0x268)](),_0x35e1b6=createTDXInstance(_0x25098c),_0x5f56e7=await _0x41345f[_0x28e7ab(0x1b6)]({'options':{..._0x25098c,..._0x143b29},'args':_0xeba14b?[_0xeba14b]:[],'tdx':_0x35e1b6});process['exit'](_0x5f56e7);}),workflowCmd['command'](a0_0x4d5596(0x1f3))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x205))[a0_0x4d5596(0x1d2)](async(_0xaf8a6f,_0x310416)=>{const _0x5e28ca=a0_0x4d5596,_0x218abb=new WorkflowAttemptCommand(),_0x38118e=program[_0x5e28ca(0x268)](),_0x125560=createTDXInstance(_0x38118e),_0xa47e4d=await _0x218abb[_0x5e28ca(0x1b6)]({'options':{..._0x38118e,..._0x310416},'args':[_0xaf8a6f],'tdx':_0x125560});process['exit'](_0xa47e4d);}),workflowCmd[a0_0x4d5596(0x1bb)]('tasks\x20<attempt-id>')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1c2))[a0_0x4d5596(0x250)](a0_0x4d5596(0x19d),'Include\x20subtasks\x20in\x20the\x20output')[a0_0x4d5596(0x1d2)](async(_0x2ec2d8,_0x31f0a9)=>{const _0x1467f7=a0_0x4d5596,_0x1c0328=new WorkflowTasksCommand(),_0xa2d4f0=program[_0x1467f7(0x268)](),_0x360b60=createTDXInstance(_0xa2d4f0),_0x2c7208=await _0x1c0328[_0x1467f7(0x1b6)]({'options':{..._0xa2d4f0,..._0x31f0a9},'args':[_0x2ec2d8],'tdx':_0x360b60});process['exit'](_0x2c7208);}),workflowCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1d7))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x26e))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1cb),a0_0x4d5596(0x264),_0xea083=>parseInt(_0xea083,0xa),0x0)[a0_0x4d5596(0x1d2)](async(_0x598d60,_0x2a0001,_0x2e0b78)=>{const _0x4fe19b=a0_0x4d5596,_0x356ebf=new WorkflowLogsCommand(),_0x136e76=program[_0x4fe19b(0x268)](),_0x401123=createTDXInstance(_0x136e76),_0x2b3e1b=await _0x356ebf[_0x4fe19b(0x1b6)]({'options':{..._0x136e76,..._0x2e0b78},'args':[_0x598d60,_0x2a0001],'tdx':_0x401123});process[_0x4fe19b(0x25f)](_0x2b3e1b);}),workflowCmd[a0_0x4d5596(0x1bb)]('kill\x20<attempt-id>')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x2ad))[a0_0x4d5596(0x250)](a0_0x4d5596(0x265),a0_0x4d5596(0x278))[a0_0x4d5596(0x1d2)](async(_0x516ed1,_0x42c1bb)=>{const _0x2b8f66=a0_0x4d5596,_0x5a236e=new WorkflowKillCommand(),_0x27db08=program[_0x2b8f66(0x268)](),_0x58bb65=createTDXInstance(_0x27db08),_0x4e70f6=await _0x5a236e['run']({'options':{..._0x27db08,..._0x42c1bb},'args':[_0x516ed1],'tdx':_0x58bb65});process[_0x2b8f66(0x25f)](_0x4e70f6);}),workflowCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x18f))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x25b))[a0_0x4d5596(0x250)](a0_0x4d5596(0x220),'Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)')[a0_0x4d5596(0x250)](a0_0x4d5596(0x234),a0_0x4d5596(0x1d0))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1e2),a0_0x4d5596(0x269))[a0_0x4d5596(0x250)](a0_0x4d5596(0x227),a0_0x4d5596(0x23f))[a0_0x4d5596(0x1d2)](async(_0x2ca53c,_0x37fdb2)=>{const _0x4a8e8f=a0_0x4d5596,_0x571289=new WorkflowRetryCommand(),_0x374283=program[_0x4a8e8f(0x268)](),_0x5de8c6=createTDXInstance(_0x374283),_0x63e515=await _0x571289['run']({'options':{..._0x374283,..._0x37fdb2},'args':[_0x2ca53c],'tdx':_0x5de8c6});process['exit'](_0x63e515);}),workflowCmd['command'](a0_0x4d5596(0x261))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1ed))[a0_0x4d5596(0x250)](a0_0x4d5596(0x23a),a0_0x4d5596(0x277))[a0_0x4d5596(0x1d2)](async(_0x1212da,_0x1d0065,_0x1274b6)=>{const _0x39e2fe=a0_0x4d5596,_0x4776ea=new WorkflowDownloadCommand(),_0x2775fb=program[_0x39e2fe(0x268)](),_0x1656ed=createTDXInstance(_0x2775fb),_0x4bcb4b=await _0x4776ea[_0x39e2fe(0x1b6)]({'options':{..._0x2775fb,..._0x1274b6},'args':[_0x1212da,_0x1d0065||'.'],'tdx':_0x1656ed});process[_0x39e2fe(0x25f)](_0x4bcb4b);}),workflowCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1b3))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x17b))[a0_0x4d5596(0x250)](a0_0x4d5596(0x209),a0_0x4d5596(0x17a))['option'](a0_0x4d5596(0x23a),a0_0x4d5596(0x225))[a0_0x4d5596(0x250)](a0_0x4d5596(0x18a),a0_0x4d5596(0x1ab))[a0_0x4d5596(0x1d2)](async(_0x2c6c00,_0x184c55)=>{const _0xf7ad96=a0_0x4d5596,_0x2fae16=new WorkflowPushCommand(),_0xd47f32=program[_0xf7ad96(0x268)](),_0x3f07f1=createTDXInstance(_0xd47f32),_0x51447f=await _0x2fae16[_0xf7ad96(0x1b6)]({'options':{..._0xd47f32,..._0x184c55},'args':_0x2c6c00?[_0x2c6c00]:[],'tdx':_0x3f07f1});process[_0xf7ad96(0x25f)](_0x51447f);}),workflowCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x200))[a0_0x4d5596(0x21b)]('Delete\x20workflow\x20project\x20from\x20Treasure\x20Data')['action'](async(_0x333cf6,_0x5378c1)=>{const _0x41712e=a0_0x4d5596,_0x10d1fa=new WorkflowDeleteCommand(),_0x400e36=program['opts'](),_0xb3cfe0=createTDXInstance(_0x400e36),_0x3b8fa9=await _0x10d1fa[_0x41712e(0x1b6)]({'options':{..._0x400e36,..._0x5378c1},'args':[_0x333cf6],'tdx':_0xb3cfe0});process[_0x41712e(0x25f)](_0x3b8fa9);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1e5))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x2a0))[a0_0x4d5596(0x250)]('--status\x20<status>',a0_0x4d5596(0x236))[a0_0x4d5596(0x1d2)](async _0x3760b6=>{const _0x5a2f2d=a0_0x4d5596,_0xbcfbca=new JobListCommand(),_0x13997f=program['opts'](),_0x3258e4=createTDXInstance(_0x13997f),_0x279924=await _0xbcfbca[_0x5a2f2d(0x1b6)]({'options':{..._0x13997f,..._0x3760b6},'args':[],'tdx':_0x3258e4});process[_0x5a2f2d(0x25f)](_0x279924);});const jobCmd=program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x245))['description'](a0_0x4d5596(0x28f));jobCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x254))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x297))[a0_0x4d5596(0x1d2)](async(_0x3f43bf,_0x3d67a2)=>{const _0x5123d0=a0_0x4d5596,_0x39c8a2=new JobShowCommand(),_0x412c17=program[_0x5123d0(0x268)](),_0xad359c=createTDXInstance(_0x412c17),_0x3b214f=await _0x39c8a2[_0x5123d0(0x1b6)]({'options':{..._0x412c17,..._0x3d67a2},'args':[_0x3f43bf],'tdx':_0xad359c});process['exit'](_0x3b214f);}),jobCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1c0))['description']('Kill\x20a\x20job')[a0_0x4d5596(0x1d2)](async(_0x9c6ed3,_0xfe71c3)=>{const _0x2cdf67=a0_0x4d5596,_0x5ec34e=new JobKillCommand(),_0x2d05e9=program[_0x2cdf67(0x268)](),_0x346cc5=createTDXInstance(_0x2d05e9),_0xc168fd=await _0x5ec34e[_0x2cdf67(0x1b6)]({'options':{..._0x2d05e9,..._0xfe71c3},'args':[_0x9c6ed3],'tdx':_0x346cc5});process[_0x2cdf67(0x25f)](_0xc168fd);}),jobCmd['command']('submit\x20[query]')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x20b))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1f8),a0_0x4d5596(0x195),a0_0x4d5596(0x1ad))[a0_0x4d5596(0x250)](a0_0x4d5596(0x2a3),'Read\x20query\x20from\x20file')[a0_0x4d5596(0x250)](a0_0x4d5596(0x196),'Database\x20name\x20(default:\x20information_schema)','information_schema')['action'](async(_0x2e18d6,_0x415dca)=>{const _0x10d3e7=a0_0x4d5596,_0x1accf9=new JobSubmitCommand(),_0x35d565=program[_0x10d3e7(0x268)](),_0x37da3a=createTDXInstance(_0x35d565),_0xb2b45b=await _0x1accf9[_0x10d3e7(0x1b6)]({'options':{..._0x35d565,..._0x415dca},'args':_0x2e18d6?[_0x2e18d6]:[],'tdx':_0x37da3a});process[_0x10d3e7(0x25f)](_0xb2b45b);}),jobCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1f0))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x2b6))[a0_0x4d5596(0x1d2)](async(_0x42527a,_0x678f2)=>{const _0x4edf7a=a0_0x4d5596,_0x9804e3=new JobResultCommand(),_0x17ef02=program[_0x4edf7a(0x268)](),_0x35a0ae=createTDXInstance(_0x17ef02),_0x54be5f=await _0x9804e3['run']({'options':{..._0x17ef02,..._0x678f2},'args':[_0x42527a],'tdx':_0x35a0ae});process['exit'](_0x54be5f);});const llmCmd=program['command'](a0_0x4d5596(0x25c))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1f2));llmCmd[a0_0x4d5596(0x1bb)]('use\x20<project-name>')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x19f))['action'](async(_0x8f5c91,_0x50bafe)=>{const _0x1d0319=a0_0x4d5596,_0x3a4c6e=new LLMUseCommand(),_0xee156e=program['opts'](),_0x35d746=createTDXInstance(_0xee156e),_0x53d263=await _0x3a4c6e[_0x1d0319(0x1b6)]({'options':{..._0xee156e,..._0x50bafe},'args':[_0x8f5c91],'tdx':_0x35d746});process['exit'](_0x53d263);}),llmCmd[a0_0x4d5596(0x1bb)]('models')[a0_0x4d5596(0x21b)]('List\x20available\x20LLM\x20models')[a0_0x4d5596(0x1d2)](async _0x4267fa=>{const _0x357863=a0_0x4d5596,_0x109b73=new LLMModelsCommand(),_0x45f4a8=program['opts'](),_0x5802a6=createTDXInstance(_0x45f4a8),_0x30f985=await _0x109b73[_0x357863(0x1b6)]({'options':{..._0x45f4a8,..._0x4267fa},'args':[],'tdx':_0x5802a6});process[_0x357863(0x25f)](_0x30f985);}),llmCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x204))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x198))[a0_0x4d5596(0x1d2)](async(_0x30ed75,_0x189648)=>{const _0x415ab1=a0_0x4d5596,_0x1d5b53=new LLMProjectsCommand(),_0x76c743=program[_0x415ab1(0x268)](),_0x372d0c=createTDXInstance(_0x76c743),_0x30f740=await _0x1d5b53[_0x415ab1(0x1b6)]({'options':{..._0x76c743,..._0x189648},'args':_0x30ed75?[_0x30ed75]:[],'tdx':_0x372d0c});process['exit'](_0x30f740);});const projectCmd=llmCmd[a0_0x4d5596(0x1bb)]('project')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x217));projectCmd[a0_0x4d5596(0x1bb)]('create\x20<name>')[a0_0x4d5596(0x21b)](a0_0x4d5596(0x23e))[a0_0x4d5596(0x250)](a0_0x4d5596(0x192),a0_0x4d5596(0x247))[a0_0x4d5596(0x1d2)](async(_0x186e6b,_0x496b9e)=>{const _0x48659d=a0_0x4d5596,_0x2a1ec5=new LLMProjectCreateCommand(),_0x53316e=program[_0x48659d(0x268)](),_0x1e5c0d=createTDXInstance(_0x53316e),_0x19126b=await _0x2a1ec5[_0x48659d(0x1b6)]({'options':{..._0x53316e,..._0x496b9e},'args':[_0x186e6b],'tdx':_0x1e5c0d});process[_0x48659d(0x25f)](_0x19126b);}),projectCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x262))['description'](a0_0x4d5596(0x216))['action'](async(_0x196008,_0x4196a3)=>{const _0x5a27cc=a0_0x4d5596,_0x252660=new LLMProjectDeleteCommand(),_0x2584c8=program[_0x5a27cc(0x268)](),_0x4f6f40=createTDXInstance(_0x2584c8),_0x27cace=await _0x252660['run']({'options':{..._0x2584c8,..._0x4196a3},'args':[_0x196008],'tdx':_0x4f6f40});process[_0x5a27cc(0x25f)](_0x27cace);}),llmCmd['command'](a0_0x4d5596(0x27a))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x232))[a0_0x4d5596(0x1d2)](async(_0x56ce82,_0x272399)=>{const _0xa5f629=a0_0x4d5596,_0x4c03fe=new LLMAgentsCommand(),_0x432653=program[_0xa5f629(0x268)](),_0x522236=createTDXInstance(_0x432653),_0x475230=await _0x4c03fe[_0xa5f629(0x1b6)]({'options':{..._0x432653,..._0x272399},'args':_0x56ce82?[_0x56ce82]:[],'tdx':_0x522236});process[_0xa5f629(0x25f)](_0x475230);});const agentCmd=llmCmd['command'](a0_0x4d5596(0x18d))['description'](a0_0x4d5596(0x1fa));agentCmd['command'](a0_0x4d5596(0x178))['description'](a0_0x4d5596(0x1af))[a0_0x4d5596(0x1d2)](async(_0xe07a27,_0x5a929c)=>{const _0x3f18ba=a0_0x4d5596,_0x26afd1=new LLMAgentShowCommand(),_0xd200db=program[_0x3f18ba(0x268)](),_0x5a7c3e=createTDXInstance(_0xd200db),_0x4f4c97=await _0x26afd1[_0x3f18ba(0x1b6)]({'options':{..._0xd200db,..._0x5a929c},'args':[_0xe07a27],'tdx':_0x5a7c3e});process[_0x3f18ba(0x25f)](_0x4f4c97);}),agentCmd['command'](a0_0x4d5596(0x1df))['description'](a0_0x4d5596(0x1ae))[a0_0x4d5596(0x250)]('--system-prompt\x20<text>',a0_0x4d5596(0x1c9))['option']('--model\x20<name>',a0_0x4d5596(0x22b),'claude-4.5-sonnet')['option']('--starter-message\x20<text>',a0_0x4d5596(0x1c5))['option'](a0_0x4d5596(0x259),'Maximum\x20tool\x20iterations\x20(default:\x204)','4')[a0_0x4d5596(0x250)](a0_0x4d5596(0x253),a0_0x4d5596(0x275),a0_0x4d5596(0x197))[a0_0x4d5596(0x1d2)](async(_0xe9b988,_0x1fb46e)=>{const _0x353514=a0_0x4d5596,_0x1cecbe=new LLMAgentCreateCommand(),_0x161533=program[_0x353514(0x268)](),_0x20e0ba=createTDXInstance(_0x161533),_0x10f8e3=await _0x1cecbe[_0x353514(0x1b6)]({'options':{..._0x161533,..._0x1fb46e},'args':[_0xe9b988],'tdx':_0x20e0ba});process[_0x353514(0x25f)](_0x10f8e3);}),agentCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x187))['description'](a0_0x4d5596(0x29b))[a0_0x4d5596(0x250)](a0_0x4d5596(0x180),a0_0x4d5596(0x1b0))[a0_0x4d5596(0x250)](a0_0x4d5596(0x20c),a0_0x4d5596(0x188))[a0_0x4d5596(0x250)](a0_0x4d5596(0x192),a0_0x4d5596(0x23b))[a0_0x4d5596(0x250)]('--starter-message\x20<text>','Starter\x20message')[a0_0x4d5596(0x1d2)](async(_0x36c80e,_0x29bbe6)=>{const _0x4554d8=a0_0x4d5596,_0x5f16ad=new LLMAgentUpdateCommand(),_0x42da43=program[_0x4554d8(0x268)](),_0x3b7d81=createTDXInstance(_0x42da43),_0x129614=await _0x5f16ad['run']({'options':{..._0x42da43,..._0x29bbe6},'args':[_0x36c80e],'tdx':_0x3b7d81});process[_0x4554d8(0x25f)](_0x129614);}),agentCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x179))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1e8))[a0_0x4d5596(0x1d2)](async(_0x1b4f89,_0x418d28)=>{const _0x1eccb3=a0_0x4d5596,_0x173408=new LLMAgentDeleteCommand(),_0x1f9857=program[_0x1eccb3(0x268)](),_0x192556=createTDXInstance(_0x1f9857),_0x177d1e=await _0x173408[_0x1eccb3(0x1b6)]({'options':{..._0x1f9857,..._0x418d28},'args':[_0x1b4f89],'tdx':_0x192556});process[_0x1eccb3(0x25f)](_0x177d1e);}),llmCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x1d1))[a0_0x4d5596(0x21b)]('Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)')[a0_0x4d5596(0x1d2)](async(_0x5c60c1,_0x553d0f)=>{const _0xe3de1b=a0_0x4d5596,_0x19010c=new LLMHistoryCommand(),_0x2d71d8=program[_0xe3de1b(0x268)](),_0x2adf04=createTDXInstance(_0x2d71d8),_0x445f52=await _0x19010c['run']({'options':{..._0x2d71d8,..._0x553d0f},'args':_0x5c60c1?[_0x5c60c1]:[],'tdx':_0x2adf04});process['exit'](_0x445f52);}),llmCmd[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x2b5))[a0_0x4d5596(0x21b)]('[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration')[a0_0x4d5596(0x250)]('--port\x20<number>','Port\x20to\x20run\x20the\x20proxy\x20server\x20on',a0_0x4d5596(0x27e))[a0_0x4d5596(0x250)](a0_0x4d5596(0x186),'LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)')['option'](a0_0x4d5596(0x252),a0_0x4d5596(0x1fb))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1db),'Enable\x20debug\x20mode\x20(logs\x20request/response\x20to\x20stderr)')[a0_0x4d5596(0x1d2)](async _0x2a3b1d=>{const _0xe8cb20=a0_0x4d5596,_0x1efc61=new LLMProxyCommand(),_0x5ae329=program[_0xe8cb20(0x268)](),_0x5a94aa=createTDXInstance(_0x5ae329),_0x12110b={..._0x2a3b1d,'port':_0x2a3b1d[_0xe8cb20(0x295)]?parseInt(_0x2a3b1d['port'],0xa):undefined},_0x5bcdfa=await _0x1efc61[_0xe8cb20(0x1b6)]({'options':{..._0x5ae329,..._0x12110b},'args':[],'tdx':_0x5a94aa});process['exit'](_0x5bcdfa);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x2b4))[a0_0x4d5596(0x21b)]('Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)')['option'](a0_0x4d5596(0x211),a0_0x4d5596(0x203),a0_0x4d5596(0x2a8))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1db),a0_0x4d5596(0x296))[a0_0x4d5596(0x26d)]()['action'](async _0x1458ae=>{const _0x32a7e3=a0_0x4d5596,_0x267aef=new ClaudeCommand(),_0x11349=program[_0x32a7e3(0x268)](),_0x513436=createTDXInstance(_0x11349),_0x276792=process['argv'],_0x28b519=_0x276792['indexOf']('--'),_0x26ec79=_0x28b519>=0x0?_0x276792[_0x32a7e3(0x24a)](_0x28b519+0x1):[],_0x515596=await _0x267aef['run']({'options':{..._0x11349,..._0x1458ae},'args':_0x26ec79,'tdx':_0x513436});process[_0x32a7e3(0x25f)](_0x515596);}),program['command'](a0_0x4d5596(0x1e0))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x25a))['option'](a0_0x4d5596(0x1db),a0_0x4d5596(0x1be))[a0_0x4d5596(0x250)](a0_0x4d5596(0x1f6),'Clear\x20session\x20context')['action'](async _0x5b0371=>{const _0x28bf5b=a0_0x4d5596,_0x1f51fa=new ContextCommand(),_0x30d9ec=program['opts'](),_0x21e4c2=await _0x1f51fa[_0x28bf5b(0x1b6)]({'options':{..._0x30d9ec,..._0x5b0371},'args':[],'tdx':null});process[_0x28bf5b(0x25f)](_0x21e4c2);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x20e))[a0_0x4d5596(0x21b)]('Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)')[a0_0x4d5596(0x1d2)](async(_0x45d272,_0x22fc28,_0x3e70f7)=>{const _0x3efe91=a0_0x4d5596,_0x25de65=new UseCommand(),_0x1d7705=program['opts'](),_0x2eb26f=[];if(_0x45d272)_0x2eb26f[_0x3efe91(0x24c)](_0x45d272);if(_0x22fc28)_0x2eb26f[_0x3efe91(0x24c)](_0x22fc28);const _0x324262=await _0x25de65[_0x3efe91(0x1b6)]({'options':{..._0x1d7705,..._0x3e70f7},'args':_0x2eb26f,'tdx':null});process[_0x3efe91(0x25f)](_0x324262);}),program[a0_0x4d5596(0x1bb)](a0_0x4d5596(0x241))[a0_0x4d5596(0x21b)](a0_0x4d5596(0x1ac))[a0_0x4d5596(0x1d2)](async _0x4bc241=>{const _0x51e2db=a0_0x4d5596,_0x5ec264=new ProfilesCommand(),_0x5f4c0a=program[_0x51e2db(0x268)](),_0x4ad41e=await _0x5ec264[_0x51e2db(0x1b6)]({'options':{..._0x5f4c0a,..._0x4bc241},'args':[],'tdx':null});process['exit'](_0x4ad41e);}),program[a0_0x4d5596(0x289)](process[a0_0x4d5596(0x240)]);!process[a0_0x4d5596(0x240)][a0_0x4d5596(0x24a)](0x2)[a0_0x4d5596(0x263)]&&program[a0_0x4d5596(0x1bc)]();
|
|
2
|
+
const a0_0x5b215f=a0_0x29e5;(function(_0x420297,_0x334d90){const _0x918bda=a0_0x29e5,_0x17ed64=_0x420297();while(!![]){try{const _0x269cf3=-parseInt(_0x918bda(0x171))/0x1+-parseInt(_0x918bda(0x1ad))/0x2+-parseInt(_0x918bda(0x222))/0x3+parseInt(_0x918bda(0x179))/0x4*(parseInt(_0x918bda(0x263))/0x5)+parseInt(_0x918bda(0x1f3))/0x6*(parseInt(_0x918bda(0x1ef))/0x7)+parseInt(_0x918bda(0x22f))/0x8+-parseInt(_0x918bda(0x1b7))/0x9*(-parseInt(_0x918bda(0x21e))/0xa);if(_0x269cf3===_0x334d90)break;else _0x17ed64['push'](_0x17ed64['shift']());}catch(_0x3566bc){_0x17ed64['push'](_0x17ed64['shift']());}}}(a0_0x38a9,0x1d9bc));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{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';function a0_0x38a9(){const _0x2c2d85=['Show\x20specific\x20attempt\x20details','-X,\x20--method\x20<method>','--timeout\x20<seconds>','workflows\x20[project]','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','List\x20all\x20available\x20profiles','List\x20available\x20LLM\x20models','commandUsage','help','filter','--limit\x20<rows>','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','Job\x20management\x20commands','required','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','after','List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','database','query\x20[sql]','Create\x20segment\x20folder','apiKey','agent','json','segments\x20[path]','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','-H,\x20--header\x20<header>','subcommandDescription','llm','show\x20<folder_ref>','name','Timezone\x20(e.g.,\x20America/Los_Angeles)','--format\x20<format>','description','116553tzRpTo','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','Update\x20child\x20segment\x20(use\x20parent_name/child_name)','--attributes\x20<json>','-f,\x20--file\x20<path>','Kill\x20a\x20job','action','delete\x20<name>','44CezvQF','Show\x20logs\x20for\x20a\x20specific\x20task','Parent\x20segment\x20(audience)\x20management','Agent\x20description','Model\x20name\x20(default:\x20claude-4.5-sonnet)','jsonl','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)','--temperature\x20<n>','alias','Enable\x20debug\x20mode\x20(logs\x20request/response\x20to\x20stderr)','slice','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','Behaviors\x20from\x20JSON\x20file','kill\x20<attempt-id>','--llm-project\x20<name>','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','--color','Agent\x20name','--starter-message\x20<text>','4000','Model\x20type\x20(default:\x20claude-4.5-sonnet)','--parent-segment\x20<name>','Describe\x20table\x20schema','--session\x20<id>','Set\x20operation\x20timeout\x20in\x20seconds','--port\x20<number>','use\x20<path>','optionDescription','Segment\x20folder\x20management','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','-y,\x20--yes','optionTerm','tasks\x20<attempt-id>','--debug','hidden','--database\x20<db>','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','--revision\x20<revision>','port','-v,\x20--version','Add\x20attributes\x20as\x20JSON\x20string','repeat','indexOf','--no-count-population','Show\x20job\x20details','fields\x20<parent_name>','--schedule-type\x20<type>','Revision\x20name\x20(default:\x20timestamp)','--prompt\x20<text>','Starting\x20offset\x20for\x20logs\x20(default:\x200)','--type\x20<api_type>','requiredOption','330884ytupQu','Include\x20subtasks\x20in\x20the\x20output','push\x20[project-name-or-dir]','--name\x20<new_name>','registeredArguments','commandDescription','Updated\x20filtering\x20rule\x20from\x20JSON\x20file','Database\x20name\x20(default:\x20information_schema)','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','context','719235hwfJzR','folder','--max-depth\x20<depth>','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','allowUnknownOption','claude-4.5-sonnet','tables\x20[pattern]','Master\x20database\x20name','claude','Temperature\x20(0.0-2.0,\x20default:\x200.7)','--no-color','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','Reason\x20for\x20killing\x20the\x20attempt','Customer\x20group\x20as\x20JSON\x20string','Run\x20Trino\x20query\x20with\x20streaming\x20results','--include-subtasks','List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Database\x20to\x20use\x20(overrides\x20context)','command','--behaviors-file\x20<file>','Updated\x20description','GET','--clear','--verbose','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','--timezone\x20<tz>','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)','Database\x20to\x20query\x20(default:\x20information_schema)','logs\x20<attempt-id>\x20<task-name>','Attributes\x20as\x20JSON\x20string','Read\x20query\x20from\x20file','Parent\x20folder\x20name\x20for\x20nested\x20folders','--data\x20<data>','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)','--customer-group\x20<json>','List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context','show\x20<segment_name>','kill\x20<job-id>','--params\x20<json>','argv','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Alias\x20for\x20--database\x20(natural\x20language\x20style)','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','Start\x20a\x20new\x20chat\x20session','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','AI-native\x20CLI\x20for\x20Treasure\x20Data','trino','option','models','sonnet','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','--in\x20<database>','Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)','14AhyFOB','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','--behaviors\x20<json>','Skip\x20population\x20counting','542838fMnVti','Add\x20behaviors\x20from\x20JSON\x20file','Commands:','summary','Segment\x20description','run','Filtering\x20rule\x20from\x20JSON\x20file','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)','--include-retried','List\x20available\x20fields\x20for\x20segmentation','argumentDescription','us01','--name\x20<text>','activations\x20<segment_name>','Delete\x20an\x20agent','project','--rule-file\x20<file>','parse','CDP\x20segment\x20management\x20commands','--folder\x20<name>','--tsv','--schedule-option\x20<value>','tsv','aliases','join','Usage:\x20','Trino\x20catalog\x20(default:\x20td)','--json','-d,\x20--database\x20<database>','Agent\x20reference\x20(project-name/agent-name)','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','Create\x20a\x20new\x20agent\x20in\x20current\x20project','--add-attributes-file\x20<file>','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','../package.json','Read\x20SQL\x20query\x20from\x20file','--invisible','LLM\x20agent\x20management','pwd','--status\x20<status>','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)','10CmgoCE','format','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','--catalog\x20<catalog>','91779bpKmdK','push','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','--new','Updated\x20schedule\x20option','Maximum\x20recursion\x20depth\x20(default:\x2010)','history\x20[chat-id]','map','projects\x20[pattern]','desc','Enable\x20verbose\x20logging','--reason\x20<text>','--offset\x20<number>','1064672uKwjWE','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','attempt\x20<attempt-id>','Add\x20behaviors\x20as\x20JSON\x20string','Read\x20request\x20body\x20from\x20file','Move\x20to\x20folder','Filtering\x20rule\x20as\x20JSON\x20string','chat\x20[message...]','--max-tool-iterations\x20<n>','Updated\x20timezone','Submit\x20a\x20job','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','create\x20<parent_name>\x20<folder_name>','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','--description\x20<text>','Save\x20output\x20to\x20file','--skip-validation','Starter\x20message','agents\x20[pattern]','--kind\x20<type>','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02,\x20ap03,\x20dev-us01,\x20dev-eu01,\x20stg-us01,\x20stg-jp01,\x20stg-ap03;\x20aliases:\x20us,\x20jp,\x20aws,\x20dev,\x20stg)','--site\x20<site>','create\x20<name>','LLM\x20project\x20to\x20use\x20(overrides\x20context)','padEnd','submit\x20[query]','options','0.7','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Arguments:','Master\x20table\x20name','Delete\x20an\x20LLM\x20project','update\x20<name>','sessions\x20[project]','Behaviors\x20as\x20JSON\x20string','download\x20<project-name>\x20[output-dir]','exit','information_schema','site','Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)','Show\x20context\x20with\x20sources\x20(for\x20debugging)','--in\x20<name>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','Parent\x20segment\x20description','Agent\x20prompt/instructions','commands','argumentTerm','--add-behaviors\x20<json>','18145ZdcaFa','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','databases\x20[pattern]','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','Enable\x20debug\x20mode\x20(logs\x20proxy\x20request/response\x20to\x20stderr)','Preview\x20operation\x20without\x20executing','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','folders\x20<parent_name>','opts','describe\x20[table]','Folder\x20name\x20for\x20organization','--model\x20<name>','--add-behaviors-file\x20<file>','--job-type\x20<type>','Request\x20body\x20as\x20JSON\x20string','Include\x20retried\x20attempts','Kill\x20a\x20running\x20attempt','segment','End\x20time\x20filter\x20(ISO\x208601\x20format)','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','preAction','LLM\x20project\x20management','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','version','--rule\x20<json>','job','url','Create\x20a\x20new\x20LLM\x20project','length','output\x20the\x20version\x20number','--table\x20<table>','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','--project\x20<name>'];a0_0x38a9=function(){return _0x2c2d85;};return a0_0x38a9();}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';function a0_0x29e5(_0x97ed36,_0x1b42ab){const _0x38a9e5=a0_0x38a9();return a0_0x29e5=function(_0x29e563,_0x5c9f14){_0x29e563=_0x29e563-0x14a;let _0x2a4e2e=_0x38a9e5[_0x29e563];return _0x2a4e2e;},a0_0x29e5(_0x97ed36,_0x1b42ab);}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';const __filename=fileURLToPath(import.meta[a0_0x5b215f(0x27e)]),__dirname=dirname(__filename),packageJson=JSON[a0_0x5b215f(0x205)](readFileSync(join(__dirname,a0_0x5b215f(0x216)),'utf-8')),program=new Command();program[a0_0x5b215f(0x16d)]('tdx')[a0_0x5b215f(0x170)](a0_0x5b215f(0x1e6))[a0_0x5b215f(0x27b)](packageJson[a0_0x5b215f(0x27b)],a0_0x5b215f(0x1a0),a0_0x5b215f(0x14c)),program[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x245),a0_0x5b215f(0x244),a0_0x5b215f(0x1ff))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x16f),a0_0x5b215f(0x258))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x20f),a0_0x5b215f(0x215))[a0_0x5b215f(0x1e8)]('--jsonl',a0_0x5b215f(0x1e4))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x208),a0_0x5b215f(0x266))['option']('--output\x20<file>',a0_0x5b215f(0x23e))['option'](a0_0x5b215f(0x15a),a0_0x5b215f(0x243),'40')['option'](a0_0x5b215f(0x189),a0_0x5b215f(0x21c),![])[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1c1),'Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)',![])[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1cf),a0_0x5b215f(0x22c),![])[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x152),a0_0x5b215f(0x191),'30')[a0_0x5b215f(0x1e8)]('--dry-run',a0_0x5b215f(0x268),![])['option'](a0_0x5b215f(0x197),'Skip\x20confirmation\x20prompts',![])[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x190),a0_0x5b215f(0x1d2))[a0_0x5b215f(0x1e8)]('--profile\x20<name>','Profile\x20to\x20use\x20(overrides\x20active\x20profile)')[a0_0x5b215f(0x1e8)]('-d,\x20--database\x20<name>',a0_0x5b215f(0x1c9))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x25a),a0_0x5b215f(0x1e1))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x18e),a0_0x5b215f(0x1e5))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x187),a0_0x5b215f(0x247)),program['configureHelp']({'formatHelp':(_0x407e7b,_0x221b53)=>{const _0x5537ee=a0_0x5b215f,_0xf56956=_0x221b53['padWidth'](_0x407e7b,_0x221b53),_0x446629=0x2,_0x46d691=0x2;function _0x5a5c14(_0x1eed5b){const _0x21fbd5=a0_0x29e5;return!!_0x1eed5b[_0x21fbd5(0x19b)];}function _0x487047(_0x2647e8,_0x26a236){const _0x3ef127=a0_0x29e5;if(_0x26a236){const _0x303330=''+_0x2647e8[_0x3ef127(0x248)](_0xf56956+_0x46d691)+_0x26a236;return _0x303330;}return _0x2647e8;}function _0x532cef(_0x440057){const _0x48c4e0=a0_0x29e5;return _0x440057[_0x48c4e0(0x20c)]('\x0a')['replace'](/^/gm,'\x20'[_0x48c4e0(0x1a2)](_0x446629));}const _0x44b0e1=[];_0x44b0e1[_0x5537ee(0x223)](_0x5537ee(0x20d)+_0x221b53[_0x5537ee(0x157)](_0x407e7b));const _0x57f6c5=_0x221b53[_0x5537ee(0x1b2)](_0x407e7b);_0x57f6c5&&(_0x44b0e1[_0x5537ee(0x223)](''),_0x44b0e1['push'](_0x57f6c5));const _0x195b08=_0x407e7b[_0x5537ee(0x260)]['filter'](_0xec7fe7=>!_0x5a5c14(_0xec7fe7));if(_0x195b08['length']>0x0){const _0xcd9d3a=_0x195b08[_0x5537ee(0x229)](_0x9792d4=>{const _0x3a21a6=_0x5537ee,_0x53efa4=_0x221b53['subcommandTerm'](_0x9792d4),_0x30590d=_0x221b53[_0x3a21a6(0x16a)](_0x9792d4);return _0x487047(_0x53efa4,_0x30590d);});_0x44b0e1[_0x5537ee(0x223)](''),_0x44b0e1['push'](_0x5537ee(0x1f5)),_0x44b0e1[_0x5537ee(0x223)](_0x532cef(_0xcd9d3a));}const _0x33d229=_0x407e7b[_0x5537ee(0x24a)][_0x5537ee(0x159)](_0x2d8cb6=>!_0x5a5c14(_0x2d8cb6));if(_0x33d229[_0x5537ee(0x14b)]>0x0){const _0x4b6eaf=_0x33d229[_0x5537ee(0x229)](_0x8fbc1b=>{const _0x58c550=_0x5537ee,_0x23d0a4=_0x221b53[_0x58c550(0x198)](_0x8fbc1b),_0x375cb8=_0x221b53[_0x58c550(0x194)](_0x8fbc1b);return _0x487047(_0x23d0a4,_0x375cb8);});_0x44b0e1[_0x5537ee(0x223)](''),_0x44b0e1[_0x5537ee(0x223)]('Options:'),_0x44b0e1[_0x5537ee(0x223)](_0x532cef(_0x4b6eaf));}const _0x5b4f10=(_0x407e7b[_0x5537ee(0x1b1)]||[])['filter'](_0x3b1faa=>!_0x5a5c14(_0x3b1faa));if(_0x5b4f10[_0x5537ee(0x14b)]>0x0){const _0x39f854=_0x5b4f10['map'](_0x5ecf52=>{const _0x4e46a5=_0x5537ee,_0x164d25=_0x221b53[_0x4e46a5(0x261)](_0x5ecf52),_0x55eb6e=_0x221b53[_0x4e46a5(0x1fe)](_0x5ecf52);return _0x487047(_0x164d25,_0x55eb6e);});_0x44b0e1[_0x5537ee(0x223)](''),_0x44b0e1[_0x5537ee(0x223)](_0x5537ee(0x24e)),_0x44b0e1['push'](_0x532cef(_0x39f854));}return _0x44b0e1[_0x5537ee(0x20c)]('\x0a');},'subcommandTerm':_0x3ac1ce=>{const _0x43c4a5=a0_0x5b215f,_0x528c29=(_0x3ac1ce[_0x43c4a5(0x1b1)]||[])[_0x43c4a5(0x229)](_0xb5bafb=>_0xb5bafb[_0x43c4a5(0x15d)]?'<'+_0xb5bafb[_0x43c4a5(0x16d)]()+'>':'['+_0xb5bafb[_0x43c4a5(0x16d)]()+']')['join']('\x20'),_0x27f60d=_0x3ac1ce[_0x43c4a5(0x20b)](),_0x466392=_0x27f60d['length']>0x0?_0x3ac1ce[_0x43c4a5(0x16d)]()+',\x20'+_0x27f60d[_0x43c4a5(0x20c)](',\x20'):_0x3ac1ce[_0x43c4a5(0x16d)]();return _0x528c29?_0x466392+'\x20'+_0x528c29:_0x466392;}}),program['hook'](a0_0x5b215f(0x278),_0x49214e=>{const _0x1d42ec=a0_0x5b215f,_0x6b1bba=_0x49214e[_0x1d42ec(0x26b)]();if(!_0x6b1bba[_0x1d42ec(0x21f)]){if(_0x6b1bba['json'])_0x6b1bba[_0x1d42ec(0x21f)]=_0x1d42ec(0x166);else{if(_0x6b1bba[_0x1d42ec(0x17e)])_0x6b1bba[_0x1d42ec(0x21f)]=_0x1d42ec(0x17e);else _0x6b1bba[_0x1d42ec(0x20a)]&&(_0x6b1bba['format']=_0x1d42ec(0x20a));}}_0x6b1bba['in']&&!_0x6b1bba['database']&&(_0x6b1bba[_0x1d42ec(0x161)]=_0x6b1bba['in']);});function createTDXInstance(_0x59b384){const _0x37f634=a0_0x5b215f,_0x296c97=new GlobalContext(_0x59b384);_0x296c97['injectIntoOptions'](_0x59b384);const _0x6e496c={'site':_0x296c97[_0x37f634(0x257)],'apiKey':_0x296c97[_0x37f634(0x164)],'verbose':_0x296c97['verbose']};return new TDX(_0x6e496c);}program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x265))[a0_0x5b215f(0x170)](a0_0x5b215f(0x24c))['action'](async(_0x4a6f58,_0x46597e)=>{const _0x4ab41d=a0_0x5b215f,_0x912aff=new DatabasesCommand(),_0x2c63dd=program[_0x4ab41d(0x26b)](),_0x53db84=createTDXInstance(_0x2c63dd),_0x4e7618=await _0x912aff['run']({'options':{..._0x2c63dd,..._0x46597e},'args':_0x4a6f58?[_0x4a6f58]:[],'tdx':_0x53db84});process[_0x4ab41d(0x255)](_0x4e7618);}),program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x236))[a0_0x5b215f(0x170)](a0_0x5b215f(0x1d9))[a0_0x5b215f(0x1e8)]('--agent\x20<ref>',a0_0x5b215f(0x211))['option'](a0_0x5b215f(0x26e),a0_0x5b215f(0x17d))['option'](a0_0x5b215f(0x180),a0_0x5b215f(0x1c0))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x225),a0_0x5b215f(0x1e3))['action'](async(_0x874b07,_0x17a4b5)=>{const _0x5c3d4b=a0_0x5b215f,_0x8bbba=new ChatCommand(),_0x1a8f52=program[_0x5c3d4b(0x26b)](),_0x788baa=createTDXInstance(_0x1a8f52),_0x277639=await _0x8bbba[_0x5c3d4b(0x1f8)]({'options':{..._0x1a8f52,..._0x17a4b5},'args':_0x874b07,'tdx':_0x788baa});process[_0x5c3d4b(0x255)](_0x277639);});const apiCmd=program[a0_0x5b215f(0x1ca)]('api\x20[endpoint]')[a0_0x5b215f(0x1f6)](a0_0x5b215f(0x154))['addHelpText'](a0_0x5b215f(0x15f),'\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_0x5b215f(0x1e8)](a0_0x5b215f(0x151),a0_0x5b215f(0x25b),a0_0x5b215f(0x1cd))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1d8),a0_0x5b215f(0x271))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x175),a0_0x5b215f(0x233))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x169),'Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)',(_0x5df044,_0x1ff4e5)=>{return _0x1ff4e5?[..._0x1ff4e5,_0x5df044]:[_0x5df044];})[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1ab),a0_0x5b215f(0x230),'td')[a0_0x5b215f(0x177)](async(_0x14f29b,_0x222fae)=>{const _0x1d0dfe=a0_0x5b215f;if(!_0x14f29b){apiCmd[_0x1d0dfe(0x158)]();return;}const _0x24b873=new ApiCommand(),_0x502151=program[_0x1d0dfe(0x26b)](),_0x3c3799=createTDXInstance(_0x502151),_0x2b7b61=await _0x24b873[_0x1d0dfe(0x1f8)]({'options':{..._0x502151,..._0x222fae},'args':[_0x14f29b],'tdx':_0x3c3799});process[_0x1d0dfe(0x255)](_0x2b7b61);});program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1bd))[a0_0x5b215f(0x170)](a0_0x5b215f(0x1b5))['option'](a0_0x5b215f(0x210),a0_0x5b215f(0x17f))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1ed),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')['action'](async(_0x5c9555,_0x25cf08)=>{const _0x243d04=a0_0x5b215f,_0x3959a7=new TablesCommand(),_0xf74d4f=program[_0x243d04(0x26b)](),_0x2ee992=createTDXInstance(_0xf74d4f);_0x25cf08['in']&&(_0x25cf08[_0x243d04(0x161)]=_0x25cf08['in']);const _0xbfdd56=await _0x3959a7[_0x243d04(0x1f8)]({'options':{..._0xf74d4f,..._0x25cf08},'args':_0x5c9555?[_0x5c9555]:[],'tdx':_0x2ee992});process[_0x243d04(0x255)](_0xbfdd56);}),program[a0_0x5b215f(0x1ca)]('show\x20[table]')[a0_0x5b215f(0x170)](a0_0x5b215f(0x264))['option'](a0_0x5b215f(0x210),a0_0x5b215f(0x23a))['option'](a0_0x5b215f(0x1ed),a0_0x5b215f(0x1e1))[a0_0x5b215f(0x177)](async(_0x517dbf,_0xa0edd9)=>{const _0x558ebe=a0_0x5b215f,_0x53886f=new ShowCommand(),_0xf946f7=program[_0x558ebe(0x26b)](),_0x2c9b36=createTDXInstance(_0xf946f7);_0xa0edd9['in']&&(_0xa0edd9[_0x558ebe(0x161)]=_0xa0edd9['in']);const _0x83240e=await _0x53886f[_0x558ebe(0x1f8)]({'options':{..._0xf946f7,..._0xa0edd9},'args':_0x517dbf?[_0x517dbf]:[],'tdx':_0x2c9b36});process[_0x558ebe(0x255)](_0x83240e);}),program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x26c))[a0_0x5b215f(0x181)](a0_0x5b215f(0x22b))[a0_0x5b215f(0x170)](a0_0x5b215f(0x18f))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x210),a0_0x5b215f(0x23a))['option'](a0_0x5b215f(0x1ed),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x5b215f(0x177)](async(_0x50afbe,_0x4643fe)=>{const _0x3940e8=a0_0x5b215f,_0x1abb15=new DescribeCommand(),_0x2a7205=program[_0x3940e8(0x26b)](),_0x61a1dd=createTDXInstance(_0x2a7205);_0x4643fe['in']&&(_0x4643fe[_0x3940e8(0x161)]=_0x4643fe['in']);const _0x57ad92=await _0x1abb15['run']({'options':{..._0x2a7205,..._0x4643fe},'args':_0x50afbe?[_0x50afbe]:[],'tdx':_0x61a1dd});process[_0x3940e8(0x255)](_0x57ad92);}),program['command'](a0_0x5b215f(0x162))['description'](a0_0x5b215f(0x1c5))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x210),a0_0x5b215f(0x1d3))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1ed),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x221),a0_0x5b215f(0x20e))['option'](a0_0x5b215f(0x175),a0_0x5b215f(0x217))['option'](a0_0x5b215f(0x15a),a0_0x5b215f(0x243),'40')[a0_0x5b215f(0x177)](async(_0x308db8,_0x47e965)=>{const _0x218183=new QueryCommand(),_0x446e3a=program['opts'](),_0x28f795=createTDXInstance(_0x446e3a);_0x47e965['in']&&(_0x47e965['database']=_0x47e965['in']);const _0x3a6424=await _0x218183['run']({'options':{..._0x446e3a,..._0x47e965},'args':_0x308db8?[_0x308db8]:[],'tdx':_0x28f795});process['exit'](_0x3a6424);}),program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x167))['description'](a0_0x5b215f(0x1db))['option']('-r,\x20--recursive',a0_0x5b215f(0x1ec))['option'](a0_0x5b215f(0x1b9),a0_0x5b215f(0x227),'10')[a0_0x5b215f(0x177)](async(_0x1a8615,_0x15171d)=>{const _0x29aaa0=a0_0x5b215f,_0x24524a=new SegmentsCommand(),_0x82c705=program[_0x29aaa0(0x26b)](),_0x326e70=createTDXInstance(_0x82c705),_0x17a640=await _0x24524a[_0x29aaa0(0x1f8)]({'options':{..._0x82c705,..._0x15171d},'args':_0x1a8615?[_0x1a8615]:[],'tdx':_0x326e70});process['exit'](_0x17a640);});const segmentCmd=program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x274))[a0_0x5b215f(0x170)](a0_0x5b215f(0x206));segmentCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x193))[a0_0x5b215f(0x170)](a0_0x5b215f(0x1ba))['action'](async(_0x58a77a,_0x49d966)=>{const _0x180251=a0_0x5b215f,_0x1fd17a=new SegmentUseCommand(),_0x24fc29=program[_0x180251(0x26b)](),_0x271fc1=createTDXInstance(_0x24fc29),_0x4457c0=await _0x1fd17a[_0x180251(0x1f8)]({'options':{..._0x24fc29,..._0x49d966},'args':[_0x58a77a],'tdx':_0x271fc1});process[_0x180251(0x255)](_0x4457c0);}),segmentCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x21a))[a0_0x5b215f(0x170)]('Show\x20current\x20segment/folder\x20context')[a0_0x5b215f(0x177)](async _0x3cf12e=>{const _0x21e642=a0_0x5b215f,_0xb8899d=new SegmentPwdCommand(),_0x135669=program[_0x21e642(0x26b)](),_0x359fde=createTDXInstance(_0x135669),_0x458374=await _0xb8899d[_0x21e642(0x1f8)]({'options':{..._0x135669,..._0x3cf12e},'args':[],'tdx':_0x359fde});process[_0x21e642(0x255)](_0x458374);}),segmentCmd[a0_0x5b215f(0x1ca)]('describe\x20<segment_name>')[a0_0x5b215f(0x181)](a0_0x5b215f(0x22b))['description'](a0_0x5b215f(0x24d))[a0_0x5b215f(0x177)](async(_0x17a7de,_0x10477c)=>{const _0x3321f6=a0_0x5b215f,_0x4bfca5=new SegmentDescribeCommand(),_0x257012=program[_0x3321f6(0x26b)](),_0x19bbad=createTDXInstance(_0x257012),_0x420c1b=await _0x4bfca5['run']({'options':{..._0x257012,..._0x10477c},'args':[_0x17a7de],'tdx':_0x19bbad});process[_0x3321f6(0x255)](_0x420c1b);}),segmentCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1dc))[a0_0x5b215f(0x170)](a0_0x5b215f(0x168))['action'](async(_0x232033,_0x34c643)=>{const _0x47f7be=a0_0x5b215f,_0x23a204=new SegmentShowCommand(),_0x1d0fc4=program[_0x47f7be(0x26b)](),_0x237736=createTDXInstance(_0x1d0fc4),_0x34c0a1=await _0x23a204[_0x47f7be(0x1f8)]({'options':{..._0x1d0fc4,..._0x34c643},'args':[_0x232033],'tdx':_0x237736});process[_0x47f7be(0x255)](_0x34c0a1);}),segmentCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x26a))['description'](a0_0x5b215f(0x224))['action'](async(_0x4802c1,_0x8fa22e)=>{const _0x896a81=a0_0x5b215f,_0x55cd70=new SegmentFolderListCommand(),_0x42f14f=program['opts'](),_0x276ea7=createTDXInstance(_0x42f14f),_0x451910=await _0x55cd70[_0x896a81(0x1f8)]({'options':{..._0x42f14f,..._0x8fa22e},'args':[_0x4802c1],'tdx':_0x276ea7});process[_0x896a81(0x255)](_0x451910);});const folderCmd=segmentCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1b8))[a0_0x5b215f(0x170)](a0_0x5b215f(0x195));folderCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x16c))[a0_0x5b215f(0x170)](a0_0x5b215f(0x220))['action'](async(_0x4463c7,_0x3ba400)=>{const _0x1a6561=a0_0x5b215f,_0x32c310=new SegmentFolderShowCommand(),_0xf3c774=program[_0x1a6561(0x26b)](),_0x128356=createTDXInstance(_0xf3c774),_0x3a81b1=await _0x32c310['run']({'options':{..._0xf3c774,..._0x3ba400},'args':[_0x4463c7],'tdx':_0x128356});process[_0x1a6561(0x255)](_0x3a81b1);}),segmentCmd[a0_0x5b215f(0x1ca)]('sql\x20<segment_name>')[a0_0x5b215f(0x170)](a0_0x5b215f(0x1c8))[a0_0x5b215f(0x177)](async(_0x286fee,_0x27689c)=>{const _0x1b8350=a0_0x5b215f,_0x3d0908=new SegmentSQLCommand(),_0x22c5f2=program[_0x1b8350(0x26b)](),_0x49f1d0=createTDXInstance(_0x22c5f2),_0x1bb153=await _0x3d0908[_0x1b8350(0x1f8)]({'options':{..._0x22c5f2,..._0x27689c},'args':[_0x286fee],'tdx':_0x49f1d0});process['exit'](_0x1bb153);}),segmentCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1a6))[a0_0x5b215f(0x170)](a0_0x5b215f(0x1fd))[a0_0x5b215f(0x177)](async(_0x19bdd8,_0x395dd4)=>{const _0x518b8c=a0_0x5b215f,_0x433ff2=new SegmentFieldsCommand(),_0x1d37d5=program[_0x518b8c(0x26b)](),_0x42abd4=createTDXInstance(_0x1d37d5),_0x1bef2f=await _0x433ff2[_0x518b8c(0x1f8)]({'options':{..._0x1d37d5,..._0x395dd4},'args':[_0x19bdd8],'tdx':_0x42abd4});process[_0x518b8c(0x255)](_0x1bef2f);}),segmentCmd[a0_0x5b215f(0x1ca)]('create\x20<segment_name>')[a0_0x5b215f(0x170)](a0_0x5b215f(0x196))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x23d),a0_0x5b215f(0x1f7))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x27c),a0_0x5b215f(0x235))['option'](a0_0x5b215f(0x204),a0_0x5b215f(0x1f9))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x207),a0_0x5b215f(0x26d))[a0_0x5b215f(0x1e8)]('--kind\x20<type>','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage')[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x218),'Make\x20segment\x20invisible\x20(default:\x20visible)')[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1a4),a0_0x5b215f(0x1f2))[a0_0x5b215f(0x177)](async(_0x743404,_0x281d9a)=>{const _0x16c266=a0_0x5b215f,_0x1c81dc=new SegmentCreateCommand(),_0x4b59fc=program[_0x16c266(0x26b)](),_0x205313=createTDXInstance(_0x4b59fc),_0x41f2ca=await _0x1c81dc[_0x16c266(0x1f8)]({'options':{..._0x4b59fc,..._0x281d9a},'args':[_0x743404],'tdx':_0x205313});process[_0x16c266(0x255)](_0x41f2ca);}),segmentCmd['command']('update\x20<segment_name>')[a0_0x5b215f(0x170)](a0_0x5b215f(0x173))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1b0),'New\x20segment\x20name')['option'](a0_0x5b215f(0x23d),a0_0x5b215f(0x1cc))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x27c),'Updated\x20filtering\x20rule\x20as\x20JSON\x20string')[a0_0x5b215f(0x1e8)]('--rule-file\x20<file>',a0_0x5b215f(0x1b3))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x207),a0_0x5b215f(0x234))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x242),'Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage')['action'](async(_0x39c351,_0x473819)=>{const _0x148c13=a0_0x5b215f,_0x131c62=new SegmentUpdateCommand(),_0x4ef410=program['opts'](),_0x9d63ff=createTDXInstance(_0x4ef410),_0x17dfbb=await _0x131c62['run']({'options':{..._0x4ef410,..._0x473819},'args':[_0x39c351],'tdx':_0x9d63ff});process[_0x148c13(0x255)](_0x17dfbb);});const parentCmd=segmentCmd[a0_0x5b215f(0x1ca)]('parent')[a0_0x5b215f(0x170)](a0_0x5b215f(0x17b));parentCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x246))[a0_0x5b215f(0x170)]('Create\x20parent\x20segment\x20(audience)')[a0_0x5b215f(0x1ac)](a0_0x5b215f(0x19c),a0_0x5b215f(0x1be))[a0_0x5b215f(0x1ac)](a0_0x5b215f(0x14d),a0_0x5b215f(0x24f))['option'](a0_0x5b215f(0x23d),a0_0x5b215f(0x25e))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1a7),'Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly')['option'](a0_0x5b215f(0x209),a0_0x5b215f(0x277))['option']('--timezone\x20<tz>',a0_0x5b215f(0x16e))['option'](a0_0x5b215f(0x174),a0_0x5b215f(0x1d5))[a0_0x5b215f(0x1e8)]('--attributes-file\x20<file>','Attributes\x20from\x20JSON\x20file')['option'](a0_0x5b215f(0x1f1),a0_0x5b215f(0x253))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1cb),a0_0x5b215f(0x185))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1da),a0_0x5b215f(0x1c4))[a0_0x5b215f(0x1e8)]('--customer-group-file\x20<file>','Customer\x20group\x20from\x20JSON\x20file')['action'](async(_0x5c0749,_0x3a65be)=>{const _0x34790e=a0_0x5b215f,_0x1b67e2=new ParentSegmentCreateCommand(),_0x18bf3c=program[_0x34790e(0x26b)](),_0x5cbc0e=createTDXInstance(_0x18bf3c),_0x52c9b7=await _0x1b67e2[_0x34790e(0x1f8)]({'options':{..._0x18bf3c,..._0x3a65be},'args':[_0x5c0749],'tdx':_0x5cbc0e});process[_0x34790e(0x255)](_0x52c9b7);}),parentCmd['command'](a0_0x5b215f(0x251))[a0_0x5b215f(0x170)]('Update\x20parent\x20segment\x20(audience)')['option'](a0_0x5b215f(0x23d),a0_0x5b215f(0x1cc))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1a7),a0_0x5b215f(0x14e))[a0_0x5b215f(0x1e8)]('--schedule-option\x20<value>',a0_0x5b215f(0x226))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1d1),a0_0x5b215f(0x238))[a0_0x5b215f(0x1e8)]('--add-attributes\x20<json>',a0_0x5b215f(0x1a1))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x214),'Add\x20attributes\x20from\x20JSON\x20file')['option'](a0_0x5b215f(0x262),a0_0x5b215f(0x232))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x26f),a0_0x5b215f(0x1f4))['action'](async(_0x534ca3,_0x5b8b66)=>{const _0x10e6fd=a0_0x5b215f,_0x3b851c=new ParentSegmentUpdateCommand(),_0x259fca=program[_0x10e6fd(0x26b)](),_0x41c399=createTDXInstance(_0x259fca),_0x183b67=await _0x3b851c['run']({'options':{..._0x259fca,..._0x5b8b66},'args':[_0x534ca3],'tdx':_0x41c399});process[_0x10e6fd(0x255)](_0x183b67);}),folderCmd['command'](a0_0x5b215f(0x23b))['description'](a0_0x5b215f(0x163))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x23d),'Folder\x20description')[a0_0x5b215f(0x1e8)]('--parent-folder\x20<name>',a0_0x5b215f(0x1d7))[a0_0x5b215f(0x177)](async(_0x39c5a8,_0x2cfdae,_0x49745d)=>{const _0x3ceb5b=a0_0x5b215f,_0x2c505e=new SegmentFolderCreateCommand(),_0x972f1f=program['opts'](),_0x4e356a=createTDXInstance(_0x972f1f),_0x4a861f=await _0x2c505e[_0x3ceb5b(0x1f8)]({'options':{..._0x972f1f,..._0x49745d},'args':[_0x39c5a8,_0x2cfdae],'tdx':_0x4e356a});process[_0x3ceb5b(0x255)](_0x4a861f);}),program['command'](a0_0x5b215f(0x201))['description'](a0_0x5b215f(0x184))[a0_0x5b215f(0x177)](async(_0x3c1c47,_0x5c8294)=>{const _0x1ed11a=a0_0x5b215f,_0x5eaba5=new ActivationsCommand(),_0x375896=program[_0x1ed11a(0x26b)](),_0x3437ca=createTDXInstance(_0x375896),_0x1034ba=await _0x5eaba5[_0x1ed11a(0x1f8)]({'options':{..._0x375896,..._0x5c8294},'args':[_0x3c1c47],'tdx':_0x3437ca});process[_0x1ed11a(0x255)](_0x1034ba);});const workflowCmd=program[a0_0x5b215f(0x1ca)]('workflow')[a0_0x5b215f(0x181)]('wf')[a0_0x5b215f(0x170)]('Workflow\x20(Digdag)\x20management\x20commands');workflowCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x22a))['description'](a0_0x5b215f(0x160))[a0_0x5b215f(0x177)](async(_0x29905b,_0x4563a8)=>{const _0x4547c6=a0_0x5b215f,_0x503d20=new WorkflowProjectsCommand(),_0x2a49ce=program[_0x4547c6(0x26b)](),_0x14cc53=createTDXInstance(_0x2a49ce),_0x3e58c9=await _0x503d20[_0x4547c6(0x1f8)]({'options':{..._0x2a49ce,..._0x4563a8},'args':_0x29905b?[_0x29905b]:[],'tdx':_0x14cc53});process[_0x4547c6(0x255)](_0x3e58c9);}),workflowCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x153))[a0_0x5b215f(0x181)]('ls')['description']('List\x20workflows\x20(optionally\x20filtered\x20by\x20project)')[a0_0x5b215f(0x177)](async(_0x158ff7,_0x53a9f)=>{const _0x531374=a0_0x5b215f,_0x2ed399=new WorkflowWorkflowsCommand(),_0x5c422f=program[_0x531374(0x26b)](),_0x51dbd0=createTDXInstance(_0x5c422f),_0x885aae=await _0x2ed399['run']({'options':{..._0x5c422f,..._0x53a9f},'args':_0x158ff7?[_0x158ff7]:[],'tdx':_0x51dbd0});process[_0x531374(0x255)](_0x885aae);}),workflowCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x252))['description'](a0_0x5b215f(0x25d))['option'](a0_0x5b215f(0x21b),a0_0x5b215f(0x19d))['option']('--from\x20<timestamp>','Start\x20time\x20filter\x20(ISO\x208601\x20format)')[a0_0x5b215f(0x1e8)]('--to\x20<timestamp>',a0_0x5b215f(0x275))[a0_0x5b215f(0x177)](async(_0x2b7223,_0x5e0cc5)=>{const _0xac1ba7=a0_0x5b215f,_0x2810c8=new WorkflowSessionsCommand(),_0x4b0769=program['opts'](),_0x33a2f0=createTDXInstance(_0x4b0769),_0x5e99f2=await _0x2810c8[_0xac1ba7(0x1f8)]({'options':{..._0x4b0769,..._0x5e0cc5},'args':_0x2b7223?[_0x2b7223]:[],'tdx':_0x33a2f0});process['exit'](_0x5e99f2);}),workflowCmd[a0_0x5b215f(0x1ca)]('attempts\x20[project]')[a0_0x5b215f(0x170)](a0_0x5b215f(0x1c7))['option'](a0_0x5b215f(0x1fc),a0_0x5b215f(0x272))[a0_0x5b215f(0x177)](async(_0x250a94,_0x4d2959)=>{const _0x4f98b7=a0_0x5b215f,_0x4c30a2=new WorkflowAttemptsCommand(),_0x5f3257=program[_0x4f98b7(0x26b)](),_0x1a5b5a=createTDXInstance(_0x5f3257),_0x3b679f=await _0x4c30a2[_0x4f98b7(0x1f8)]({'options':{..._0x5f3257,..._0x4d2959},'args':_0x250a94?[_0x250a94]:[],'tdx':_0x1a5b5a});process[_0x4f98b7(0x255)](_0x3b679f);}),workflowCmd['command'](a0_0x5b215f(0x231))[a0_0x5b215f(0x170)](a0_0x5b215f(0x150))[a0_0x5b215f(0x177)](async(_0x47f50a,_0x2da1b7)=>{const _0xd3ced8=a0_0x5b215f,_0x48cf2a=new WorkflowAttemptCommand(),_0x5389f1=program[_0xd3ced8(0x26b)](),_0x57d452=createTDXInstance(_0x5389f1),_0x53af6a=await _0x48cf2a[_0xd3ced8(0x1f8)]({'options':{..._0x5389f1,..._0x2da1b7},'args':[_0x47f50a],'tdx':_0x57d452});process[_0xd3ced8(0x255)](_0x53af6a);}),workflowCmd['command'](a0_0x5b215f(0x199))[a0_0x5b215f(0x170)]('Show\x20tasks\x20for\x20an\x20attempt')[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1c6),a0_0x5b215f(0x1ae))[a0_0x5b215f(0x177)](async(_0x37b6cc,_0x30df8f)=>{const _0x466932=a0_0x5b215f,_0x46e943=new WorkflowTasksCommand(),_0xaf8fc4=program['opts'](),_0x3f565b=createTDXInstance(_0xaf8fc4),_0x5d63a7=await _0x46e943[_0x466932(0x1f8)]({'options':{..._0xaf8fc4,..._0x30df8f},'args':[_0x37b6cc],'tdx':_0x3f565b});process[_0x466932(0x255)](_0x5d63a7);}),workflowCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1d4))[a0_0x5b215f(0x170)](a0_0x5b215f(0x17a))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x22e),a0_0x5b215f(0x1aa),_0x433686=>parseInt(_0x433686,0xa),0x0)[a0_0x5b215f(0x177)](async(_0x573305,_0x1151a1,_0x3f1981)=>{const _0x1c457e=a0_0x5b215f,_0x304d4b=new WorkflowLogsCommand(),_0x1aa3c6=program[_0x1c457e(0x26b)](),_0x355996=createTDXInstance(_0x1aa3c6),_0x2a5dbd=await _0x304d4b['run']({'options':{..._0x1aa3c6,..._0x3f1981},'args':[_0x573305,_0x1151a1],'tdx':_0x355996});process[_0x1c457e(0x255)](_0x2a5dbd);}),workflowCmd['command'](a0_0x5b215f(0x186))[a0_0x5b215f(0x170)](a0_0x5b215f(0x273))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x22d),a0_0x5b215f(0x1c3))['action'](async(_0x319b98,_0x332888)=>{const _0x5e24b1=a0_0x5b215f,_0x53ff1e=new WorkflowKillCommand(),_0x54ea18=program[_0x5e24b1(0x26b)](),_0x1276bd=createTDXInstance(_0x54ea18),_0x3d997c=await _0x53ff1e[_0x5e24b1(0x1f8)]({'options':{..._0x54ea18,..._0x332888},'args':[_0x319b98],'tdx':_0x1276bd});process['exit'](_0x3d997c);}),workflowCmd['command']('retry\x20<session-id|attempt-id>')[a0_0x5b215f(0x170)](a0_0x5b215f(0x1fa))[a0_0x5b215f(0x1e8)]('--from-task\x20<task>',a0_0x5b215f(0x23c))['option']('--resume-from\x20<task>','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)')['option'](a0_0x5b215f(0x1de),a0_0x5b215f(0x276))[a0_0x5b215f(0x1e8)]('--force',a0_0x5b215f(0x1ee))[a0_0x5b215f(0x177)](async(_0x40d2e1,_0x2456b4)=>{const _0x3572be=a0_0x5b215f,_0x442862=new WorkflowRetryCommand(),_0x268b7a=program['opts'](),_0xc945da=createTDXInstance(_0x268b7a),_0x58b571=await _0x442862['run']({'options':{..._0x268b7a,..._0x2456b4},'args':[_0x40d2e1],'tdx':_0xc945da});process[_0x3572be(0x255)](_0x58b571);}),workflowCmd['command'](a0_0x5b215f(0x254))[a0_0x5b215f(0x170)](a0_0x5b215f(0x1e0))[a0_0x5b215f(0x1e8)]('--revision\x20<revision>',a0_0x5b215f(0x27a))['action'](async(_0x454259,_0x5b1b54,_0x82b0b5)=>{const _0x159c47=a0_0x5b215f,_0x1ff904=new WorkflowDownloadCommand(),_0x1980b7=program[_0x159c47(0x26b)](),_0x235ca9=createTDXInstance(_0x1980b7),_0x2a292d=await _0x1ff904[_0x159c47(0x1f8)]({'options':{..._0x1980b7,..._0x82b0b5},'args':[_0x454259,_0x5b1b54||'.'],'tdx':_0x235ca9});process[_0x159c47(0x255)](_0x2a292d);}),workflowCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1af))[a0_0x5b215f(0x170)]('Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)')[a0_0x5b215f(0x1e8)]('--name\x20<name>','Override\x20project\x20name')[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x19e),a0_0x5b215f(0x1a8))['option'](a0_0x5b215f(0x23f),'Skip\x20validation\x20of\x20.dig\x20files')[a0_0x5b215f(0x177)](async(_0x527d87,_0x5b0687)=>{const _0xdbdf08=a0_0x5b215f,_0x3b47ea=new WorkflowPushCommand(),_0x428993=program['opts'](),_0x1600dd=createTDXInstance(_0x428993),_0x2c106a=await _0x3b47ea[_0xdbdf08(0x1f8)]({'options':{..._0x428993,..._0x5b0687},'args':_0x527d87?[_0x527d87]:[],'tdx':_0x1600dd});process[_0xdbdf08(0x255)](_0x2c106a);}),workflowCmd[a0_0x5b215f(0x1ca)]('delete\x20<project-name-or-id>')[a0_0x5b215f(0x170)](a0_0x5b215f(0x1f0))[a0_0x5b215f(0x177)](async(_0x299b20,_0x401e9c)=>{const _0x1ba13a=a0_0x5b215f,_0x5b8193=new WorkflowDeleteCommand(),_0x5cf70c=program[_0x1ba13a(0x26b)](),_0x3e0463=createTDXInstance(_0x5cf70c),_0x58e822=await _0x5b8193['run']({'options':{..._0x5cf70c,..._0x401e9c},'args':[_0x299b20],'tdx':_0x3e0463});process[_0x1ba13a(0x255)](_0x58e822);}),program[a0_0x5b215f(0x1ca)]('jobs')['description']('List\x20jobs')['option']('--status\x20<status>',a0_0x5b215f(0x212))[a0_0x5b215f(0x177)](async _0x104a9d=>{const _0xc229a=a0_0x5b215f,_0x5c0b2c=new JobListCommand(),_0x20291e=program[_0xc229a(0x26b)](),_0x5680aa=createTDXInstance(_0x20291e),_0x5c96d2=await _0x5c0b2c['run']({'options':{..._0x20291e,..._0x104a9d},'args':[],'tdx':_0x5680aa});process[_0xc229a(0x255)](_0x5c96d2);});const jobCmd=program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x27d))[a0_0x5b215f(0x170)](a0_0x5b215f(0x15c));jobCmd[a0_0x5b215f(0x1ca)]('show\x20<job-id>')[a0_0x5b215f(0x170)](a0_0x5b215f(0x1a5))[a0_0x5b215f(0x177)](async(_0x5a3f00,_0x331aa9)=>{const _0x5f5960=a0_0x5b215f,_0x1f2f38=new JobShowCommand(),_0x337386=program[_0x5f5960(0x26b)](),_0x47289a=createTDXInstance(_0x337386),_0x341273=await _0x1f2f38[_0x5f5960(0x1f8)]({'options':{..._0x337386,..._0x331aa9},'args':[_0x5a3f00],'tdx':_0x47289a});process['exit'](_0x341273);}),jobCmd['command'](a0_0x5b215f(0x1dd))['description'](a0_0x5b215f(0x176))[a0_0x5b215f(0x177)](async(_0x51e1e3,_0x5d655c)=>{const _0x50c744=a0_0x5b215f,_0x34f5e5=new JobKillCommand(),_0x2a3d12=program[_0x50c744(0x26b)](),_0x119831=createTDXInstance(_0x2a3d12),_0x11bb70=await _0x34f5e5[_0x50c744(0x1f8)]({'options':{..._0x2a3d12,..._0x5d655c},'args':[_0x51e1e3],'tdx':_0x119831});process['exit'](_0x11bb70);}),jobCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x249))[a0_0x5b215f(0x170)](a0_0x5b215f(0x239))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x270),a0_0x5b215f(0x1fb),a0_0x5b215f(0x1e7))[a0_0x5b215f(0x1e8)]('-f,\x20--file\x20<path>',a0_0x5b215f(0x1d6))[a0_0x5b215f(0x1e8)]('--database\x20<name>',a0_0x5b215f(0x1b4),a0_0x5b215f(0x256))['action'](async(_0x3318c9,_0x268e0b)=>{const _0x3a063b=a0_0x5b215f,_0x66f486=new JobSubmitCommand(),_0x584c97=program[_0x3a063b(0x26b)](),_0x40bf3b=createTDXInstance(_0x584c97),_0x50b1b9=await _0x66f486[_0x3a063b(0x1f8)]({'options':{..._0x584c97,..._0x268e0b},'args':_0x3318c9?[_0x3318c9]:[],'tdx':_0x40bf3b});process['exit'](_0x50b1b9);}),jobCmd['command']('result\x20<job-id>')[a0_0x5b215f(0x170)]('Get\x20job\x20results')[a0_0x5b215f(0x177)](async(_0x595e19,_0x461078)=>{const _0x261e83=a0_0x5b215f,_0x4a1361=new JobResultCommand(),_0x7ea017=program[_0x261e83(0x26b)](),_0x368fda=createTDXInstance(_0x7ea017),_0x1571af=await _0x4a1361['run']({'options':{..._0x7ea017,..._0x461078},'args':[_0x595e19],'tdx':_0x368fda});process[_0x261e83(0x255)](_0x1571af);});const llmCmd=program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x16b))[a0_0x5b215f(0x170)](a0_0x5b215f(0x1eb));llmCmd['command']('use\x20<project-name>')[a0_0x5b215f(0x170)](a0_0x5b215f(0x1c2))[a0_0x5b215f(0x177)](async(_0xadc731,_0x3b3f04)=>{const _0x425263=a0_0x5b215f,_0x5e7924=new LLMUseCommand(),_0xf286a2=program[_0x425263(0x26b)](),_0x3b8e4d=createTDXInstance(_0xf286a2),_0x2c9b6a=await _0x5e7924[_0x425263(0x1f8)]({'options':{..._0xf286a2,..._0x3b3f04},'args':[_0xadc731],'tdx':_0x3b8e4d});process[_0x425263(0x255)](_0x2c9b6a);}),llmCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1e9))[a0_0x5b215f(0x170)](a0_0x5b215f(0x156))[a0_0x5b215f(0x177)](async _0x18b794=>{const _0x546500=a0_0x5b215f,_0x5f3cf2=new LLMModelsCommand(),_0x21a090=program[_0x546500(0x26b)](),_0x46ae9a=createTDXInstance(_0x21a090),_0x97395e=await _0x5f3cf2[_0x546500(0x1f8)]({'options':{..._0x21a090,..._0x18b794},'args':[],'tdx':_0x46ae9a});process[_0x546500(0x255)](_0x97395e);}),llmCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x22a))[a0_0x5b215f(0x170)](a0_0x5b215f(0x172))['action'](async(_0x1d45cc,_0x238cad)=>{const _0x2bea48=a0_0x5b215f,_0x226d5d=new LLMProjectsCommand(),_0x44898d=program['opts'](),_0x36815c=createTDXInstance(_0x44898d),_0x1b7591=await _0x226d5d[_0x2bea48(0x1f8)]({'options':{..._0x44898d,..._0x238cad},'args':_0x1d45cc?[_0x1d45cc]:[],'tdx':_0x36815c});process[_0x2bea48(0x255)](_0x1b7591);});const projectCmd=llmCmd['command'](a0_0x5b215f(0x203))[a0_0x5b215f(0x170)](a0_0x5b215f(0x279));projectCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x246))['description'](a0_0x5b215f(0x14a))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x23d),'Project\x20description')[a0_0x5b215f(0x177)](async(_0xbe46d2,_0xfacea1)=>{const _0x4be5cf=a0_0x5b215f,_0x382a6b=new LLMProjectCreateCommand(),_0x4978a7=program['opts'](),_0x3932a3=createTDXInstance(_0x4978a7),_0x51027a=await _0x382a6b[_0x4be5cf(0x1f8)]({'options':{..._0x4978a7,..._0xfacea1},'args':[_0xbe46d2],'tdx':_0x3932a3});process[_0x4be5cf(0x255)](_0x51027a);}),projectCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x178))['description'](a0_0x5b215f(0x250))[a0_0x5b215f(0x177)](async(_0x31c2e0,_0x3f06cf)=>{const _0x3ed9b1=a0_0x5b215f,_0x59b516=new LLMProjectDeleteCommand(),_0x1ac7ae=program[_0x3ed9b1(0x26b)](),_0x1223d8=createTDXInstance(_0x1ac7ae),_0xfb0bb9=await _0x59b516[_0x3ed9b1(0x1f8)]({'options':{..._0x1ac7ae,..._0x3f06cf},'args':[_0x31c2e0],'tdx':_0x1223d8});process[_0x3ed9b1(0x255)](_0xfb0bb9);}),llmCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x241))[a0_0x5b215f(0x170)](a0_0x5b215f(0x1e2))[a0_0x5b215f(0x177)](async(_0x2ec9d9,_0x4fd10e)=>{const _0x537c00=a0_0x5b215f,_0x3fe1ff=new LLMAgentsCommand(),_0x460eb2=program[_0x537c00(0x26b)](),_0x465bb4=createTDXInstance(_0x460eb2),_0x1ad864=await _0x3fe1ff[_0x537c00(0x1f8)]({'options':{..._0x460eb2,..._0x4fd10e},'args':_0x2ec9d9?[_0x2ec9d9]:[],'tdx':_0x465bb4});process[_0x537c00(0x255)](_0x1ad864);});const agentCmd=llmCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x165))['description'](a0_0x5b215f(0x219));agentCmd['command']('show\x20<agent-name>')['description']('Show\x20agent\x20details')[a0_0x5b215f(0x177)](async(_0x5035d8,_0x17f407)=>{const _0x373174=a0_0x5b215f,_0x25e986=new LLMAgentShowCommand(),_0x2abaf4=program[_0x373174(0x26b)](),_0x5a7c21=createTDXInstance(_0x2abaf4),_0x41fe1f=await _0x25e986[_0x373174(0x1f8)]({'options':{..._0x2abaf4,..._0x17f407},'args':[_0x5035d8],'tdx':_0x5a7c21});process[_0x373174(0x255)](_0x41fe1f);}),agentCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x246))[a0_0x5b215f(0x170)](a0_0x5b215f(0x213))[a0_0x5b215f(0x1e8)]('--system-prompt\x20<text>','System\x20prompt/instructions\x20(default:\x20empty)')[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x26e),a0_0x5b215f(0x18d),a0_0x5b215f(0x1bc))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x18b),a0_0x5b215f(0x240))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x237),'Maximum\x20tool\x20iterations\x20(default:\x204)','4')[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x180),a0_0x5b215f(0x1c0),a0_0x5b215f(0x24b))[a0_0x5b215f(0x177)](async(_0x93bef3,_0x25f11a)=>{const _0x436722=a0_0x5b215f,_0x525785=new LLMAgentCreateCommand(),_0x185057=program[_0x436722(0x26b)](),_0xd5134=createTDXInstance(_0x185057),_0x179672=await _0x525785[_0x436722(0x1f8)]({'options':{..._0x185057,..._0x25f11a},'args':[_0x93bef3],'tdx':_0xd5134});process['exit'](_0x179672);}),agentCmd[a0_0x5b215f(0x1ca)]('update\x20<agent-name>')[a0_0x5b215f(0x170)]('Update\x20an\x20existing\x20agent')['option'](a0_0x5b215f(0x200),a0_0x5b215f(0x18a))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1a9),a0_0x5b215f(0x25f))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x23d),a0_0x5b215f(0x17c))['option'](a0_0x5b215f(0x18b),a0_0x5b215f(0x240))[a0_0x5b215f(0x177)](async(_0x5d4b46,_0x17460c)=>{const _0x1353ec=a0_0x5b215f,_0x2b5913=new LLMAgentUpdateCommand(),_0xda01bf=program[_0x1353ec(0x26b)](),_0x54d2ad=createTDXInstance(_0xda01bf),_0x47cf9d=await _0x2b5913[_0x1353ec(0x1f8)]({'options':{..._0xda01bf,..._0x17460c},'args':[_0x5d4b46],'tdx':_0x54d2ad});process['exit'](_0x47cf9d);}),agentCmd[a0_0x5b215f(0x1ca)]('delete\x20<agent-name>')[a0_0x5b215f(0x170)](a0_0x5b215f(0x202))[a0_0x5b215f(0x177)](async(_0x46c938,_0x16915a)=>{const _0x3c3aa1=a0_0x5b215f,_0x173a06=new LLMAgentDeleteCommand(),_0x27b021=program[_0x3c3aa1(0x26b)](),_0x1f1f84=createTDXInstance(_0x27b021),_0x106359=await _0x173a06[_0x3c3aa1(0x1f8)]({'options':{..._0x27b021,..._0x16915a},'args':[_0x46c938],'tdx':_0x1f1f84});process[_0x3c3aa1(0x255)](_0x106359);}),llmCmd[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x228))[a0_0x5b215f(0x170)](a0_0x5b215f(0x15b))[a0_0x5b215f(0x177)](async(_0x4ccaf1,_0x26aa77)=>{const _0x49ac7c=a0_0x5b215f,_0x11804c=new LLMHistoryCommand(),_0x3bb583=program['opts'](),_0x36857f=createTDXInstance(_0x3bb583),_0x528e60=await _0x11804c[_0x49ac7c(0x1f8)]({'options':{..._0x3bb583,..._0x26aa77},'args':_0x4ccaf1?[_0x4ccaf1]:[],'tdx':_0x36857f});process[_0x49ac7c(0x255)](_0x528e60);}),llmCmd[a0_0x5b215f(0x1ca)]('proxy')['description']('[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration')[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x192),a0_0x5b215f(0x1d0),a0_0x5b215f(0x18c))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x14f),a0_0x5b215f(0x25c))[a0_0x5b215f(0x1e8)]('--agent\x20<name>',a0_0x5b215f(0x188))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x19a),a0_0x5b215f(0x182))[a0_0x5b215f(0x177)](async _0x4c5724=>{const _0x1e9f5e=a0_0x5b215f,_0x26337a=new LLMProxyCommand(),_0x563526=program['opts'](),_0x238e18=createTDXInstance(_0x563526),_0x2cfc65={..._0x4c5724,'port':_0x4c5724[_0x1e9f5e(0x19f)]?parseInt(_0x4c5724[_0x1e9f5e(0x19f)],0xa):undefined},_0x15d094=await _0x26337a[_0x1e9f5e(0x1f8)]({'options':{..._0x563526,..._0x2cfc65},'args':[],'tdx':_0x238e18});process[_0x1e9f5e(0x255)](_0x15d094);}),program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1bf))[a0_0x5b215f(0x170)](a0_0x5b215f(0x21d))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x26e),a0_0x5b215f(0x15e),a0_0x5b215f(0x1ea))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x19a),a0_0x5b215f(0x267))[a0_0x5b215f(0x1bb)]()[a0_0x5b215f(0x177)](async _0x321015=>{const _0x19d880=a0_0x5b215f,_0x49b81c=new ClaudeCommand(),_0x5c8c06=program[_0x19d880(0x26b)](),_0x390559=createTDXInstance(_0x5c8c06),_0x4259f2=process['argv'],_0xb5d12a=_0x4259f2[_0x19d880(0x1a3)]('--'),_0x2f0b59=_0xb5d12a>=0x0?_0x4259f2[_0x19d880(0x183)](_0xb5d12a+0x1):[],_0x3e94cc=await _0x49b81c[_0x19d880(0x1f8)]({'options':{..._0x5c8c06,..._0x321015},'args':_0x2f0b59,'tdx':_0x390559});process[_0x19d880(0x255)](_0x3e94cc);}),program[a0_0x5b215f(0x1ca)](a0_0x5b215f(0x1b6))[a0_0x5b215f(0x170)]('Show\x20current\x20resolved\x20context')[a0_0x5b215f(0x1e8)]('--debug',a0_0x5b215f(0x259))[a0_0x5b215f(0x1e8)](a0_0x5b215f(0x1ce),'Clear\x20session\x20context')['action'](async _0x485acc=>{const _0x35f240=a0_0x5b215f,_0x326c78=new ContextCommand(),_0xb4e100=program[_0x35f240(0x26b)](),_0x495400=await _0x326c78[_0x35f240(0x1f8)]({'options':{..._0xb4e100,..._0x485acc},'args':[],'tdx':null});process[_0x35f240(0x255)](_0x495400);}),program[a0_0x5b215f(0x1ca)]('use\x20[resource]\x20[value]')[a0_0x5b215f(0x170)](a0_0x5b215f(0x269))[a0_0x5b215f(0x177)](async(_0x3f805e,_0x2572a9,_0x52f310)=>{const _0x30b9e6=a0_0x5b215f,_0x561b95=new UseCommand(),_0x3c0dc6=program['opts'](),_0x49fe72=[];if(_0x3f805e)_0x49fe72[_0x30b9e6(0x223)](_0x3f805e);if(_0x2572a9)_0x49fe72[_0x30b9e6(0x223)](_0x2572a9);const _0x2e7653=await _0x561b95[_0x30b9e6(0x1f8)]({'options':{..._0x3c0dc6,..._0x52f310},'args':_0x49fe72,'tdx':null});process['exit'](_0x2e7653);}),program['command']('profiles')[a0_0x5b215f(0x170)](a0_0x5b215f(0x155))[a0_0x5b215f(0x177)](async _0x4be25a=>{const _0x20797b=a0_0x5b215f,_0x468938=new ProfilesCommand(),_0x370192=program['opts'](),_0x1ad5aa=await _0x468938[_0x20797b(0x1f8)]({'options':{..._0x370192,..._0x4be25a},'args':[],'tdx':null});process[_0x20797b(0x255)](_0x1ad5aa);}),program[a0_0x5b215f(0x205)](process[a0_0x5b215f(0x1df)]);!process[a0_0x5b215f(0x1df)]['slice'](0x2)[a0_0x5b215f(0x14b)]&&program['outputHelp']();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x2bf367=a1_0x4eac;function a1_0x4eac(_0x3541b0,_0x8889e){const _0x1e4ff2=a1_0x1e4f();return a1_0x4eac=function(_0x4eac55,_0x429e10){_0x4eac55=_0x4eac55-0x96;let _0x228418=_0x1e4ff2[_0x4eac55];return _0x228418;},a1_0x4eac(_0x3541b0,_0x8889e);}(function(_0x60543b,_0x32cdfb){const _0xe0a3c5=a1_0x4eac,_0x145d89=_0x60543b();while(!![]){try{const _0x26e72f=-parseInt(_0xe0a3c5(0x9a))/0x1+parseInt(_0xe0a3c5(0xa0))/0x2+parseInt(_0xe0a3c5(0xc3))/0x3+-parseInt(_0xe0a3c5(0xb1))/0x4*(parseInt(_0xe0a3c5(0xa3))/0x5)+parseInt(_0xe0a3c5(0xba))/0x6*(-parseInt(_0xe0a3c5(0xbb))/0x7)+parseInt(_0xe0a3c5(0xc2))/0x8*(-parseInt(_0xe0a3c5(0x96))/0x9)+-parseInt(_0xe0a3c5(0xb2))/0xa*(-parseInt(_0xe0a3c5(0x99))/0xb);if(_0x26e72f===_0x32cdfb)break;else _0x145d89['push'](_0x145d89['shift']());}catch(_0x3bc192){_0x145d89['push'](_0x145d89['shift']());}}}(a1_0x1e4f,0x21a5f));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a1_0x1e4f(){const _0x4cb36c=['310IAWqol','listSegmentFolders','/segments','isArray','query','PUT','site','listActivations','6kIFTDn','1763209XdbRbQ','/entities/parent_segments','authHeaders','/folders','/entities/parent_segments/','cdp','/audiences/','696824BlPZlM','686898ULAZha','listSegments','createdAt','/segments/','9fLqZNq','POST','createSegment','216557YrUlLI','220479DzuyNd','rule','data','updateSegment','createSegmentFolder','audienceId','260862KrXvVY','/segments/query','updatedAt','1362010tyQalG','/syndications','application/vnd.treasuredata.v1+json','httpClient','request','getSegment','/audiences','GET','application/json','sql','getSegmentSQL','getParentSegmentSQL','apiKey','updateParentSegment','4nlsXnS'];a1_0x1e4f=function(){return _0x4cb36c;};return a1_0x1e4f();}export class CDPClient{[a1_0x2bf367(0xa6)];[a1_0x2bf367(0xbd)];constructor(_0x38cae2){const _0x5b40b7=a1_0x2bf367,_0x5f0d7c=getEndpoint(_0x38cae2[_0x5b40b7(0xb8)],_0x5b40b7(0xc0));this[_0x5b40b7(0xbd)]=toHeaderRecord(getAuthHeaders(_0x38cae2[_0x5b40b7(0xb8)],_0x38cae2[_0x5b40b7(0xaf)])),this['httpClient']=new HTTPClient(_0x5f0d7c,{...this[_0x5b40b7(0xbd)],'Accept':'application/vnd.treasuredata.v1+json','Content-Type':_0x5b40b7(0xab)},undefined,_0x38cae2['verbose']);}async['listParentSegments'](){const _0x5691a6=a1_0x2bf367,_0xf55de3=_0x5691a6(0xbc),_0x19b08e=await this[_0x5691a6(0xa6)][_0x5691a6(0xa7)](_0x5691a6(0xaa),_0xf55de3);return Array['isArray'](_0x19b08e)?_0x19b08e:_0x19b08e[_0x5691a6(0x9c)];}async['getParentSegment'](_0xf8081f){const _0x382248=a1_0x2bf367,_0x3f815a=_0x382248(0xbf)+_0xf8081f,_0x116a18=await this[_0x382248(0xa6)][_0x382248(0xa7)](_0x382248(0xaa),_0x3f815a);return'data'in _0x116a18?_0x116a18['data']:_0x116a18;}async[a1_0x2bf367(0xc4)](_0x41f3a1){const _0x14436f=a1_0x2bf367,_0x2863a4=_0x14436f(0xc1)+_0x41f3a1+_0x14436f(0xb4),_0x4915ae=await this[_0x14436f(0xa6)][_0x14436f(0xa7)]('GET',_0x2863a4);return Array[_0x14436f(0xb5)](_0x4915ae)?_0x4915ae:_0x4915ae[_0x14436f(0x9c)];}async[a1_0x2bf367(0xa8)](_0x4ab8a5,_0xff8f51){const _0x3ed60b=a1_0x2bf367,_0x273b4d=_0x3ed60b(0xc1)+_0x4ab8a5+_0x3ed60b(0xc6)+_0xff8f51,_0x403b42=await this[_0x3ed60b(0xa6)][_0x3ed60b(0xa7)](_0x3ed60b(0xaa),_0x273b4d);return _0x3ed60b(0x9c)in _0x403b42?_0x403b42['data']:_0x403b42;}async[a1_0x2bf367(0xb3)](_0x1d46b6){const _0x1450dd=a1_0x2bf367,_0x3b898e='/audiences/'+_0x1d46b6+_0x1450dd(0xbe),_0xa56a96=await this[_0x1450dd(0xa6)][_0x1450dd(0xa7)]('GET',_0x3b898e);return Array['isArray'](_0xa56a96)?_0xa56a96:_0xa56a96[_0x1450dd(0x9c)];}async['getSegmentFolder'](_0x47ee85){const _0x4772e9=a1_0x2bf367,_0x3b6bd6='/entities/folders/'+_0x47ee85,_0x2c0994=await this[_0x4772e9(0xa6)][_0x4772e9(0xa7)]('GET',_0x3b6bd6);return _0x4772e9(0x9c)in _0x2c0994?_0x2c0994[_0x4772e9(0x9c)]:_0x2c0994;}async[a1_0x2bf367(0xb9)](_0x191893,_0x2f1809){const _0x2a2ba9=a1_0x2bf367,_0x3f911a=_0x2a2ba9(0xc1)+_0x191893+_0x2a2ba9(0xc6)+_0x2f1809+_0x2a2ba9(0xa4),_0x23df0a=await this[_0x2a2ba9(0xa6)][_0x2a2ba9(0xa7)]('GET',_0x3f911a);return Array['isArray'](_0x23df0a)?_0x23df0a:_0x23df0a['data'];}async[a1_0x2bf367(0xae)](_0x82a6c5){const _0x459ff9=a1_0x2bf367,_0x139294='/audiences/'+_0x82a6c5+_0x459ff9(0xa1),_0x5e7c90=await this[_0x459ff9(0xa6)][_0x459ff9(0xa7)](_0x459ff9(0x97),_0x139294,{'body':{'format':'sql'}});return _0x5e7c90['sql']||_0x5e7c90[_0x459ff9(0xb6)]||'';}async[a1_0x2bf367(0xad)](_0x5dca81,_0x373b37){const _0x4a185d=a1_0x2bf367,_0x4f0f29=await this[_0x4a185d(0xa8)](_0x5dca81,_0x373b37),_0x2c49f3={'format':_0x4a185d(0xac)};_0x4a185d(0x9b)in _0x4f0f29&&_0x4f0f29[_0x4a185d(0x9b)]&&(_0x2c49f3['rule']=_0x4f0f29['rule']);const _0x6c5c0c=_0x4a185d(0xc1)+_0x5dca81+'/segments/query',_0x366443=await this[_0x4a185d(0xa6)]['request'](_0x4a185d(0x97),_0x6c5c0c,{'body':_0x2c49f3});return _0x366443[_0x4a185d(0xac)]||_0x366443[_0x4a185d(0xb6)]||'';}async['createParentSegment'](_0x4d54ab){const _0x1d9cea=a1_0x2bf367,_0x33e24c=_0x1d9cea(0xa9),_0x337938=await this['httpClient'][_0x1d9cea(0xa7)](_0x1d9cea(0x97),_0x33e24c,{'body':_0x4d54ab,'headers':{'Content-Type':_0x1d9cea(0xa5)}});return _0x337938;}async[a1_0x2bf367(0xb0)](_0x3b11ae,_0x40f454){const _0x4f3b18=a1_0x2bf367,_0x56e461=_0x4f3b18(0xc1)+_0x3b11ae,_0x1b4676=await this['httpClient']['request'](_0x4f3b18(0xb7),_0x56e461,{'body':_0x40f454,'headers':{'Content-Type':_0x4f3b18(0xa5)}});return _0x1b4676;}async['getParentSegmentFull'](_0x67f5cf){const _0x32556c=a1_0x2bf367,_0x33fc1b=_0x32556c(0xc1)+_0x67f5cf,_0xcd7242=await this['httpClient'][_0x32556c(0xa7)](_0x32556c(0xaa),_0x33fc1b,{'headers':{'Accept':_0x32556c(0xa5)}});return _0xcd7242;}async[a1_0x2bf367(0x98)](_0x72a0c8,_0x45e4ef){const _0x55a6d7=a1_0x2bf367,_0x479eb9='/audiences/'+_0x72a0c8+'/segments',_0x25ce33=await this['httpClient']['request'](_0x55a6d7(0x97),_0x479eb9,{'body':_0x45e4ef});return _0x25ce33;}async[a1_0x2bf367(0x9d)](_0x2df4df,_0x5a03a7,_0x509eb7){const _0x2a59d8=a1_0x2bf367,_0x4f810b=_0x2a59d8(0xc1)+_0x2df4df+'/segments/'+_0x5a03a7,_0x58c33f=await this[_0x2a59d8(0xa6)][_0x2a59d8(0xa7)](_0x2a59d8(0xb7),_0x4f810b,{'body':_0x509eb7});return _0x58c33f;}async[a1_0x2bf367(0x9e)](_0x330d7c,_0x516d6c){const _0x2c9caa=a1_0x2bf367,_0x436132=_0x2c9caa(0xc1)+_0x330d7c+_0x2c9caa(0xbe),_0x41e604=await this['httpClient'][_0x2c9caa(0xa7)](_0x2c9caa(0x97),_0x436132,{'body':_0x516d6c});if(_0x2c9caa(0x9c)in _0x41e604&&_0x41e604[_0x2c9caa(0x9c)]){const _0x3b5923=_0x41e604['data'];return{'id':_0x3b5923['id'],'name':_0x3b5923['name'],'description':_0x3b5923['description'],'audienceId':_0x3b5923[_0x2c9caa(0x9f)]||String(_0x330d7c),'parentFolderId':_0x3b5923['parentFolderId'],'createdAt':_0x3b5923[_0x2c9caa(0xc5)],'updatedAt':_0x3b5923[_0x2c9caa(0xa2)]};}return _0x41e604;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x5d5241=a2_0x5087;(function(_0x2165fe,_0x3304ed){const _0x2c57b4=a2_0x5087,_0x215655=_0x2165fe();while(!![]){try{const _0x53d8ec=parseInt(_0x2c57b4(0x122))/0x1+-parseInt(_0x2c57b4(0x13e))/0x2*(parseInt(_0x2c57b4(0x112))/0x3)+parseInt(_0x2c57b4(0x144))/0x4+parseInt(_0x2c57b4(0x12e))/0x5*(parseInt(_0x2c57b4(0x118))/0x6)+-parseInt(_0x2c57b4(0x138))/0x7+parseInt(_0x2c57b4(0x139))/0x8*(parseInt(_0x2c57b4(0x113))/0x9)+-parseInt(_0x2c57b4(0x105))/0xa*(-parseInt(_0x2c57b4(0x12c))/0xb);if(_0x53d8ec===_0x3304ed)break;else _0x215655['push'](_0x215655['shift']());}catch(_0x25b2d3){_0x215655['push'](_0x215655['shift']());}}}(a2_0x642c,0x4a5ec));function a2_0x642c(){const _0x4a6297=['API:\x20','Content-Type','ms...','statusText','638928AkGxyF','\x0a\x20\x20URL:\x20','verbose','sleep','request','NOT_FOUND','RATE_LIMITED','Retry-After','HTTP\x20','INVALID_ARGUMENT','safeParseJSON','380Leuzmz','baseDelay','INTERNAL','arrayBuffer','AbortError','arraybuffer','[Retry\x20','Response:\x20','defaultHeaders','Request\x20cancelled\x20by\x20user','abort','retrying\x20in\x20','retryConfig','108RbkEQy','99WZwmRt','signal',']\x20Request\x20to\x20','name','pow','6seruAn','title','type','message','problemDetails','error','headers','maxDelay','An\x20error\x20occurred','string','536539ZqLKFQ','get','status','parse','\x0a\x20\x20Details:\x20','min','text','object','random','warn','119581oXqgpz','\x20failed:\x20','762415KHYRvJ','json','PERMISSION_DENIED','body','addEventListener','from','detail','stringify','round','application/json','4039959KiyHeU','125432MRDoqh','parseProblemDetails','baseUrl',']\x20Request\x20failed\x20with\x20HTTP\x20','aborted','30698leJEvB','code'];a2_0x642c=function(){return _0x4a6297;};return a2_0x642c();}import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x521432 from'json-bigint';const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function isRetryableError(_0x4f6d82){return _0x4f6d82>=0x1f4||_0x4f6d82===0x1ad;}function getRetryDelay(_0x401544,_0x1d3f1c){const _0x291d18=a2_0x5087,_0x585442=Math[_0x291d18(0x127)](_0x1d3f1c[_0x291d18(0x106)]*Math[_0x291d18(0x117)](0x2,_0x401544),_0x1d3f1c[_0x291d18(0x11f)]);return Math[_0x291d18(0x12a)]()*_0x585442;}function statusCodeToErrorCode(_0x7a5add){const _0x5da88e=a2_0x5087;if(_0x7a5add===0x191)return ErrorCode['UNAUTHENTICATED'];else{if(_0x7a5add===0x193)return ErrorCode[_0x5da88e(0x130)];else{if(_0x7a5add===0x194)return ErrorCode[_0x5da88e(0x149)];else{if(_0x7a5add===0x1ad)return ErrorCode[_0x5da88e(0x14a)];else return _0x7a5add>=0x1f4?ErrorCode['UNAVAILABLE']:ErrorCode[_0x5da88e(0x14d)];}}}}export class HTTPClientError extends Error{[a2_0x5d5241(0x124)];[a2_0x5d5241(0x11c)];[a2_0x5d5241(0x13f)];constructor(_0xab14f7,_0x2926ba,_0x3ec64e){const _0x5cdfd7=a2_0x5d5241,_0x568c6d=statusCodeToErrorCode(_0x2926ba);super('['+_0x568c6d+']\x20'+_0xab14f7),this[_0x5cdfd7(0x124)]=_0x2926ba,this[_0x5cdfd7(0x11c)]=_0x3ec64e,this[_0x5cdfd7(0x116)]='HTTPClientError',this[_0x5cdfd7(0x13f)]=_0x568c6d;}}function a2_0x5087(_0x4d7002,_0x4f5ace){const _0x642c92=a2_0x642c();return a2_0x5087=function(_0x50871f,_0x2a9529){_0x50871f=_0x50871f-0x104;let _0x5983b4=_0x642c92[_0x50871f];return _0x5983b4;},a2_0x5087(_0x4d7002,_0x4f5ace);}export class HTTPClient{[a2_0x5d5241(0x111)];[a2_0x5d5241(0x13b)];[a2_0x5d5241(0x10d)];['verbose'];constructor(_0x2c74e9,_0x18a0da={},_0x5554a4,_0xfbab90=![]){const _0x431ec5=a2_0x5d5241;this[_0x431ec5(0x13b)]=_0x2c74e9,this[_0x431ec5(0x10d)]=_0x18a0da,this[_0x431ec5(0x111)]={...DEFAULT_RETRY_CONFIG,..._0x5554a4},this[_0x431ec5(0x146)]=_0xfbab90;}async[a2_0x5d5241(0x148)](_0x54da2d,_0xfc47c,_0x3318c5={}){const _0x43bc8b=a2_0x5d5241,{headers:headers={},body:_0x5ac2fd,timeout:timeout=0x7530,retries:retries=this[_0x43bc8b(0x111)]['maxRetries'],signal:_0x59b282,includeHeaders:includeHeaders=![],responseType:responseType=_0x43bc8b(0x12f)}=_0x3318c5,_0x495073=''+this['baseUrl']+_0xfc47c;this[_0x43bc8b(0x146)]&&console[_0x43bc8b(0x11d)](_0x43bc8b(0x140)+_0x54da2d+'\x20'+_0x495073);const _0x41e5d2={...this[_0x43bc8b(0x10d)],...headers};if(_0x5ac2fd&&!_0x41e5d2[_0x43bc8b(0x141)]){if(_0x5ac2fd instanceof Buffer){}else _0x41e5d2[_0x43bc8b(0x141)]=_0x43bc8b(0x137);}let _0x40505e;_0x5ac2fd&&(_0x5ac2fd instanceof Buffer?_0x40505e=_0x5ac2fd:_0x40505e=typeof _0x5ac2fd===_0x43bc8b(0x121)?_0x5ac2fd:JSON[_0x43bc8b(0x135)](_0x5ac2fd));let _0x547d61=null;for(let _0x17236c=0x0;_0x17236c<=retries;_0x17236c++){try{const _0x3c6c07=new AbortController(),_0xa74707=setTimeout(()=>_0x3c6c07['abort'](),timeout);if(_0x59b282){if(_0x59b282[_0x43bc8b(0x13d)])throw new Error('Request\x20cancelled\x20by\x20user');_0x59b282[_0x43bc8b(0x132)](_0x43bc8b(0x10f),()=>_0x3c6c07[_0x43bc8b(0x10f)](),{'once':!![]});}const _0x289c9f=await fetch(_0x495073,{'method':_0x54da2d,'headers':_0x41e5d2,'body':_0x40505e,'signal':_0x3c6c07[_0x43bc8b(0x114)]});clearTimeout(_0xa74707);if(_0x17236c<retries&&isRetryableError(_0x289c9f[_0x43bc8b(0x124)])){const _0x2a5cfb=_0x289c9f['headers'][_0x43bc8b(0x123)](_0x43bc8b(0x14b)),_0x1bc62f=_0x2a5cfb?parseInt(_0x2a5cfb,0xa)*0x3e8:getRetryDelay(_0x17236c,this['retryConfig']);console['warn'](_0x43bc8b(0x10b)+(_0x17236c+0x1)+'/'+retries+']\x20Request\x20failed\x20with\x20'+_0x289c9f[_0x43bc8b(0x124)]+',\x20'+(_0x43bc8b(0x110)+Math[_0x43bc8b(0x136)](_0x1bc62f)+_0x43bc8b(0x142))),await this['sleep'](_0x1bc62f);continue;}if(!_0x289c9f['ok']){const _0x30b732=await this['safeParseJSON'](_0x289c9f),_0x5558c8=this[_0x43bc8b(0x13a)](_0x30b732,_0x289c9f[_0x43bc8b(0x124)]);let _0x27bae5;if(_0x289c9f[_0x43bc8b(0x124)]===0x191)_0x27bae5='HTTP\x20'+_0x289c9f[_0x43bc8b(0x124)]+':\x20'+_0x289c9f['statusText']+_0x43bc8b(0x145)+_0x495073;else{if(_0x5558c8?.[_0x43bc8b(0x134)])_0x27bae5=_0x5558c8[_0x43bc8b(0x134)];else{if(_0x30b732){const _0x43b152=JSON[_0x43bc8b(0x135)](_0x30b732);_0x27bae5=_0x43bc8b(0x14c)+_0x289c9f[_0x43bc8b(0x124)]+':\x20'+_0x289c9f[_0x43bc8b(0x143)]+_0x43bc8b(0x126)+_0x43b152;}else _0x27bae5=_0x43bc8b(0x14c)+_0x289c9f[_0x43bc8b(0x124)]+':\x20'+_0x289c9f[_0x43bc8b(0x143)];}}throw new HTTPClientError(_0x27bae5,_0x289c9f['status'],_0x5558c8);}let _0x3ce6a4;if(responseType===_0x43bc8b(0x10a)){const _0xf61902=await _0x289c9f[_0x43bc8b(0x108)]();_0x3ce6a4=Buffer[_0x43bc8b(0x133)](_0xf61902);}else responseType===_0x43bc8b(0x128)?_0x3ce6a4=await _0x289c9f[_0x43bc8b(0x128)]():_0x3ce6a4=await this[_0x43bc8b(0x104)](_0x289c9f);this[_0x43bc8b(0x146)]&&(console['error'](_0x43bc8b(0x10c)+_0x54da2d+'\x20'+_0xfc47c),console['error'](JSON[_0x43bc8b(0x135)](_0x3ce6a4,null,0x2)));if(includeHeaders){const _0x219cf9={};return _0x289c9f[_0x43bc8b(0x11e)]['forEach']((_0x54271f,_0x5507c4)=>{_0x219cf9[_0x5507c4]=_0x54271f;}),{'data':_0x3ce6a4,'status':_0x289c9f[_0x43bc8b(0x124)],'headers':_0x219cf9};}return _0x3ce6a4;}catch(_0x103f7a){_0x547d61=_0x103f7a instanceof Error?_0x103f7a:new Error(String(_0x103f7a));if(_0x103f7a instanceof HTTPClientError&&!isRetryableError(_0x103f7a[_0x43bc8b(0x124)]))throw _0x103f7a;if(_0x17236c>=retries)throw _0x547d61;const _0x714437=getRetryDelay(_0x17236c,this['retryConfig']);let _0x3fd478;_0x547d61 instanceof HTTPClientError?_0x3fd478=_0x43bc8b(0x10b)+(_0x17236c+0x1)+'/'+retries+_0x43bc8b(0x13c)+_0x547d61[_0x43bc8b(0x124)]+':\x20'+_0x547d61[_0x43bc8b(0x11b)]+',\x20'+(_0x43bc8b(0x110)+Math['round'](_0x714437)+'ms...'):_0x3fd478=_0x43bc8b(0x10b)+(_0x17236c+0x1)+'/'+retries+_0x43bc8b(0x115)+_0x495073+'\x20failed:\x20'+_0x547d61['message']+',\x20'+('retrying\x20in\x20'+Math[_0x43bc8b(0x136)](_0x714437)+_0x43bc8b(0x142)),console[_0x43bc8b(0x12b)](_0x3fd478),await this['sleep'](_0x714437);}}if(_0x547d61&&!(_0x547d61 instanceof HTTPClientError))throw new SDKError(ErrorCode['HTTP_REQUEST_FAILURE'],'Request\x20to\x20'+_0x495073+_0x43bc8b(0x12d)+_0x547d61['message'],_0x547d61);throw _0x547d61||new SDKError(ErrorCode[_0x43bc8b(0x107)],'Request\x20failed\x20after\x20retries');}async['safeParseJSON'](_0x456750){const _0x47a324=a2_0x5d5241,_0x43e53b=await _0x456750[_0x47a324(0x128)]();if(!_0x43e53b)return null;try{const _0x2a1f02=a2_0x521432({'storeAsString':!![]});return _0x2a1f02[_0x47a324(0x125)](_0x43e53b);}catch{return{'body':_0x43e53b};}}['parseProblemDetails'](_0x28fc9a,_0x547bdf){const _0x592c6f=a2_0x5d5241;if(!_0x28fc9a||typeof _0x28fc9a!==_0x592c6f(0x129))return undefined;const _0x2d25e3=_0x28fc9a;if(_0x2d25e3[_0x592c6f(0x11a)]||_0x2d25e3['title']||_0x2d25e3['detail'])return{'type':_0x2d25e3[_0x592c6f(0x11a)]||'about:blank','title':_0x2d25e3[_0x592c6f(0x119)]||'Error','status':_0x2d25e3[_0x592c6f(0x124)]||_0x547bdf,'detail':_0x2d25e3[_0x592c6f(0x134)]||_0x592c6f(0x120),'instance':_0x2d25e3['instance']||'',..._0x2d25e3};return undefined;}[a2_0x5d5241(0x147)](_0xb0e2a6){return new Promise(_0x202f44=>setTimeout(_0x202f44,_0xb0e2a6));}async['requestSSE'](_0x19a3b9,_0x68759,_0x4371ac={}){const _0x264c60=a2_0x5d5241,{headers:headers={},body:_0x424ec7,timeout:timeout=0x7530,signal:_0x25ed99}=_0x4371ac,_0x1c6ed4=''+this[_0x264c60(0x13b)]+_0x68759,_0x40011d={...this[_0x264c60(0x10d)],...headers},_0x5447ce=new AbortController(),_0x5de095=setTimeout(()=>_0x5447ce['abort'](),timeout),_0x1e4522=_0x25ed99?[_0x5447ce[_0x264c60(0x114)],_0x25ed99]:[_0x5447ce[_0x264c60(0x114)]],_0x55509d=this['combineSignals'](_0x1e4522);try{const _0x4db6c9={'method':_0x19a3b9,'headers':_0x40011d,'signal':_0x55509d};if(_0x424ec7){if(typeof _0x424ec7==='string')_0x4db6c9[_0x264c60(0x131)]=_0x424ec7;else _0x424ec7 instanceof Buffer?_0x4db6c9[_0x264c60(0x131)]=_0x424ec7:_0x4db6c9[_0x264c60(0x131)]=JSON[_0x264c60(0x135)](_0x424ec7);}const _0x5cc5c0=await fetch(_0x1c6ed4,_0x4db6c9);clearTimeout(_0x5de095);if(!_0x5cc5c0['ok']){const _0x1b7c44=await this[_0x264c60(0x104)](_0x5cc5c0),_0x3f5cae=this['parseProblemDetails'](_0x1b7c44,_0x5cc5c0[_0x264c60(0x124)]);let _0x245c3f;if(_0x5cc5c0['status']===0x191)_0x245c3f=_0x264c60(0x14c)+_0x5cc5c0[_0x264c60(0x124)]+':\x20'+_0x5cc5c0[_0x264c60(0x143)]+_0x264c60(0x145)+_0x1c6ed4;else{if(_0x3f5cae?.[_0x264c60(0x134)])_0x245c3f=_0x3f5cae[_0x264c60(0x134)];else{if(_0x1b7c44){const _0x538770=JSON[_0x264c60(0x135)](_0x1b7c44);_0x245c3f=_0x264c60(0x14c)+_0x5cc5c0['status']+':\x20'+_0x5cc5c0[_0x264c60(0x143)]+_0x264c60(0x126)+_0x538770;}else _0x245c3f='HTTP\x20'+_0x5cc5c0[_0x264c60(0x124)]+':\x20'+_0x5cc5c0[_0x264c60(0x143)];}}throw new HTTPClientError(_0x245c3f,_0x5cc5c0['status'],_0x3f5cae);}return _0x5cc5c0;}catch(_0x58e6a){clearTimeout(_0x5de095);if(_0x58e6a instanceof HTTPClientError)throw _0x58e6a;if(_0x58e6a[_0x264c60(0x116)]===_0x264c60(0x109))throw new Error(_0x264c60(0x10e));throw _0x58e6a;}}['combineSignals'](_0x281c30){const _0x3af3d5=a2_0x5d5241,_0x5dd785=new AbortController();for(const _0x332640 of _0x281c30){if(_0x332640[_0x3af3d5(0x13d)])return _0x5dd785[_0x3af3d5(0x10f)](),_0x5dd785['signal'];_0x332640[_0x3af3d5(0x132)](_0x3af3d5(0x10f),()=>_0x5dd785[_0x3af3d5(0x10f)](),{'once':!![]});}return _0x5dd785[_0x3af3d5(0x114)];}}
|
|
1
|
+
const a2_0x2a15f9=a2_0x1652;(function(_0x2de390,_0x51b7f0){const _0x5dd5b4=a2_0x1652,_0x4f34fd=_0x2de390();while(!![]){try{const _0x3a842f=-parseInt(_0x5dd5b4(0x108))/0x1*(parseInt(_0x5dd5b4(0x101))/0x2)+parseInt(_0x5dd5b4(0xe6))/0x3+-parseInt(_0x5dd5b4(0xfb))/0x4*(-parseInt(_0x5dd5b4(0xe8))/0x5)+-parseInt(_0x5dd5b4(0x10a))/0x6+parseInt(_0x5dd5b4(0xfc))/0x7+parseInt(_0x5dd5b4(0xef))/0x8*(parseInt(_0x5dd5b4(0xe5))/0x9)+-parseInt(_0x5dd5b4(0x11e))/0xa;if(_0x3a842f===_0x51b7f0)break;else _0x4f34fd['push'](_0x4f34fd['shift']());}catch(_0x10133e){_0x4f34fd['push'](_0x4f34fd['shift']());}}}(a2_0x2ff5,0xe06ac));function a2_0x2ff5(){const _0xf86aa6=['235DbyXeG','get','round','PERMISSION_DENIED','forEach','abort','\x0a\x20\x20Details:\x20','10864nQUXbM','defaultHeaders','An\x20error\x20occurred',']\x20Request\x20failed\x20with\x20','Request\x20to\x20','baseDelay','instance','about:blank','maxRetries','headers','arrayBuffer','string','144116AdLZBb','5930722afXkAm','verbose','INTERNAL','body','name','6vhgBIQ','stringify','error','[Retry\x20',']\x20Request\x20failed\x20with\x20HTTP\x20','Content-Type','object','366877oXmugg','addEventListener','6052692kYuvxs','pow','ms...','baseUrl','arraybuffer','statusText','retryConfig','HTTP_REQUEST_FAILURE','detail','sleep','text','INVALID_ARGUMENT','combineSignals','parse','parseProblemDetails','Request\x20cancelled\x20by\x20user','from','aborted','HTTP\x20','retrying\x20in\x20','26313500EPFqje','message','HTTPClientError','title','problemDetails','code','status','min','API:\x20','random','Response:\x20','signal','request','AbortError','safeParseJSON','warn','\x0a\x20\x20URL:\x20','Error','type','Request\x20failed\x20after\x20retries','8658IQxImQ','5438910PPaoPD','json'];a2_0x2ff5=function(){return _0xf86aa6;};return a2_0x2ff5();}import{ErrorCode,SDKError}from'../sdk/errors.js';function a2_0x1652(_0x23aa0f,_0x5998fe){const _0x2ff544=a2_0x2ff5();return a2_0x1652=function(_0x1652ff,_0x2e8790){_0x1652ff=_0x1652ff-0xe0;let _0x496089=_0x2ff544[_0x1652ff];return _0x496089;},a2_0x1652(_0x23aa0f,_0x5998fe);}import a2_0xd539c7 from'json-bigint';const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function isRetryableError(_0x1229de){return _0x1229de>=0x1f4||_0x1229de===0x1ad;}function getRetryDelay(_0x185128,_0x3cd43f){const _0x17c487=a2_0x1652,_0x42b859=Math[_0x17c487(0x125)](_0x3cd43f[_0x17c487(0xf4)]*Math[_0x17c487(0x10b)](0x2,_0x185128),_0x3cd43f['maxDelay']);return Math[_0x17c487(0x127)]()*_0x42b859;}function statusCodeToErrorCode(_0x1fac09){const _0x1fb81d=a2_0x1652;if(_0x1fac09===0x191)return ErrorCode['UNAUTHENTICATED'];else{if(_0x1fac09===0x193)return ErrorCode[_0x1fb81d(0xeb)];else{if(_0x1fac09===0x194)return ErrorCode['NOT_FOUND'];else{if(_0x1fac09===0x1ad)return ErrorCode['RATE_LIMITED'];else return _0x1fac09>=0x1f4?ErrorCode['UNAVAILABLE']:ErrorCode[_0x1fb81d(0x115)];}}}}export class HTTPClientError extends Error{['status'];[a2_0x2a15f9(0x122)];[a2_0x2a15f9(0x123)];constructor(_0x127350,_0x672aae,_0x3733df){const _0x2cc832=a2_0x2a15f9,_0x11cebc=statusCodeToErrorCode(_0x672aae);super('['+_0x11cebc+']\x20'+_0x127350),this[_0x2cc832(0x124)]=_0x672aae,this[_0x2cc832(0x122)]=_0x3733df,this[_0x2cc832(0x100)]=_0x2cc832(0x120),this['code']=_0x11cebc;}}export class HTTPClient{[a2_0x2a15f9(0x110)];['baseUrl'];[a2_0x2a15f9(0xf0)];['verbose'];constructor(_0x82f061,_0x5d7c4b={},_0x3d30f1,_0x5b3333=![]){const _0x40df8e=a2_0x2a15f9;this[_0x40df8e(0x10d)]=_0x82f061,this[_0x40df8e(0xf0)]=_0x5d7c4b,this[_0x40df8e(0x110)]={...DEFAULT_RETRY_CONFIG,..._0x3d30f1},this[_0x40df8e(0xfd)]=_0x5b3333;}async[a2_0x2a15f9(0x12a)](_0x2a007c,_0x3c857b,_0x5ce106={}){const _0x35b62b=a2_0x2a15f9,{headers:headers={},body:_0x5d277f,timeout:timeout=0x7530,retries:retries=this[_0x35b62b(0x110)][_0x35b62b(0xf7)],signal:_0x57a364,includeHeaders:includeHeaders=![],responseType:responseType=_0x35b62b(0xe7)}=_0x5ce106,_0x435ff5=''+this[_0x35b62b(0x10d)]+_0x3c857b;this[_0x35b62b(0xfd)]&&console[_0x35b62b(0x103)](_0x35b62b(0x126)+_0x2a007c+'\x20'+_0x435ff5);const _0x52609f={...this['defaultHeaders'],...headers};if(_0x5d277f&&!_0x52609f['Content-Type']){if(_0x5d277f instanceof Buffer){}else _0x52609f[_0x35b62b(0x106)]='application/json';}let _0x55ce24;_0x5d277f&&(_0x5d277f instanceof Buffer?_0x55ce24=_0x5d277f:_0x55ce24=typeof _0x5d277f===_0x35b62b(0xfa)?_0x5d277f:JSON['stringify'](_0x5d277f));let _0x5ef0d9=null;for(let _0x23434e=0x0;_0x23434e<=retries;_0x23434e++){try{const _0x5cc509=new AbortController(),_0x174b21=setTimeout(()=>_0x5cc509['abort'](),timeout);if(_0x57a364){if(_0x57a364['aborted'])throw new Error(_0x35b62b(0x119));_0x57a364[_0x35b62b(0x109)](_0x35b62b(0xed),()=>_0x5cc509[_0x35b62b(0xed)](),{'once':!![]});}const _0x123b72=await fetch(_0x435ff5,{'method':_0x2a007c,'headers':_0x52609f,'body':_0x55ce24,'signal':_0x5cc509[_0x35b62b(0x129)]});clearTimeout(_0x174b21);if(_0x23434e<retries&&isRetryableError(_0x123b72['status'])){const _0xc35df9=_0x123b72[_0x35b62b(0xf8)][_0x35b62b(0xe9)]('Retry-After'),_0x524b99=_0xc35df9?parseInt(_0xc35df9,0xa)*0x3e8:getRetryDelay(_0x23434e,this[_0x35b62b(0x110)]);console['warn'](_0x35b62b(0x104)+(_0x23434e+0x1)+'/'+retries+_0x35b62b(0xf2)+_0x123b72[_0x35b62b(0x124)]+',\x20'+(_0x35b62b(0x11d)+Math['round'](_0x524b99)+_0x35b62b(0x10c))),await this['sleep'](_0x524b99);continue;}if(!_0x123b72['ok']){const _0x31263b=await this['safeParseJSON'](_0x123b72),_0x1a8190=this['parseProblemDetails'](_0x31263b,_0x123b72[_0x35b62b(0x124)]);let _0x7ff54a;if(_0x123b72[_0x35b62b(0x124)]===0x191)_0x7ff54a=_0x35b62b(0x11c)+_0x123b72[_0x35b62b(0x124)]+':\x20'+_0x123b72[_0x35b62b(0x10f)]+_0x35b62b(0xe1)+_0x435ff5;else{if(_0x1a8190?.[_0x35b62b(0x112)])_0x7ff54a=_0x1a8190[_0x35b62b(0x112)];else{if(_0x31263b){const _0x45bba8=JSON['stringify'](_0x31263b);_0x7ff54a=_0x35b62b(0x11c)+_0x123b72[_0x35b62b(0x124)]+':\x20'+_0x123b72[_0x35b62b(0x10f)]+'\x0a\x20\x20Details:\x20'+_0x45bba8;}else _0x7ff54a=_0x35b62b(0x11c)+_0x123b72[_0x35b62b(0x124)]+':\x20'+_0x123b72[_0x35b62b(0x10f)];}}throw new HTTPClientError(_0x7ff54a,_0x123b72['status'],_0x1a8190);}let _0x2a5ab5;if(responseType===_0x35b62b(0x10e)){const _0x1573c3=await _0x123b72[_0x35b62b(0xf9)]();_0x2a5ab5=Buffer[_0x35b62b(0x11a)](_0x1573c3);}else responseType===_0x35b62b(0x114)?_0x2a5ab5=await _0x123b72['text']():_0x2a5ab5=await this['safeParseJSON'](_0x123b72);this['verbose']&&(console[_0x35b62b(0x103)](_0x35b62b(0x128)+_0x2a007c+'\x20'+_0x3c857b),console[_0x35b62b(0x103)](JSON['stringify'](_0x2a5ab5,null,0x2)));if(includeHeaders){const _0xbbb57d={};return _0x123b72[_0x35b62b(0xf8)][_0x35b62b(0xec)]((_0x543875,_0x403030)=>{_0xbbb57d[_0x403030]=_0x543875;}),{'data':_0x2a5ab5,'status':_0x123b72['status'],'headers':_0xbbb57d};}return _0x2a5ab5;}catch(_0x1ce656){_0x5ef0d9=_0x1ce656 instanceof Error?_0x1ce656:new Error(String(_0x1ce656));if(_0x1ce656 instanceof HTTPClientError&&!isRetryableError(_0x1ce656[_0x35b62b(0x124)]))throw _0x1ce656;if(_0x23434e>=retries)throw _0x5ef0d9;const _0x28bf78=getRetryDelay(_0x23434e,this[_0x35b62b(0x110)]);let _0x4c3e09;_0x5ef0d9 instanceof HTTPClientError?_0x4c3e09='[Retry\x20'+(_0x23434e+0x1)+'/'+retries+_0x35b62b(0x105)+_0x5ef0d9[_0x35b62b(0x124)]+':\x20'+_0x5ef0d9[_0x35b62b(0x11f)]+',\x20'+('retrying\x20in\x20'+Math[_0x35b62b(0xea)](_0x28bf78)+_0x35b62b(0x10c)):_0x4c3e09='[Retry\x20'+(_0x23434e+0x1)+'/'+retries+']\x20Request\x20to\x20'+_0x435ff5+'\x20failed:\x20'+_0x5ef0d9[_0x35b62b(0x11f)]+',\x20'+(_0x35b62b(0x11d)+Math['round'](_0x28bf78)+_0x35b62b(0x10c)),console[_0x35b62b(0xe0)](_0x4c3e09),await this[_0x35b62b(0x113)](_0x28bf78);}}if(_0x5ef0d9&&!(_0x5ef0d9 instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x35b62b(0x111)],_0x35b62b(0xf3)+_0x435ff5+'\x20failed:\x20'+_0x5ef0d9[_0x35b62b(0x11f)],_0x5ef0d9);throw _0x5ef0d9||new SDKError(ErrorCode[_0x35b62b(0xfe)],_0x35b62b(0xe4));}async[a2_0x2a15f9(0x12c)](_0x3baef7){const _0x1d24d8=a2_0x2a15f9,_0x296997=await _0x3baef7['text']();if(!_0x296997)return null;try{const _0x4db9e0=a2_0xd539c7({'storeAsString':!![]});return _0x4db9e0[_0x1d24d8(0x117)](_0x296997);}catch{return{'body':_0x296997};}}['parseProblemDetails'](_0x54d1c9,_0x50ba4b){const _0x16cf4a=a2_0x2a15f9;if(!_0x54d1c9||typeof _0x54d1c9!==_0x16cf4a(0x107))return undefined;const _0x363f68=_0x54d1c9;if(_0x363f68[_0x16cf4a(0xe3)]||_0x363f68[_0x16cf4a(0x121)]||_0x363f68[_0x16cf4a(0x112)])return{'type':_0x363f68[_0x16cf4a(0xe3)]||_0x16cf4a(0xf6),'title':_0x363f68['title']||_0x16cf4a(0xe2),'status':_0x363f68[_0x16cf4a(0x124)]||_0x50ba4b,'detail':_0x363f68['detail']||_0x16cf4a(0xf1),'instance':_0x363f68[_0x16cf4a(0xf5)]||'',..._0x363f68};return undefined;}[a2_0x2a15f9(0x113)](_0x45c6a8){return new Promise(_0x41db7f=>setTimeout(_0x41db7f,_0x45c6a8));}async['requestSSE'](_0x8f321f,_0x2bf648,_0x41eddb={}){const _0x3ce389=a2_0x2a15f9,{headers:headers={},body:_0x4f6323,timeout:timeout=0x7530,signal:_0x4bf64d}=_0x41eddb,_0xb8c51d=''+this['baseUrl']+_0x2bf648,_0x476e1d={...this['defaultHeaders'],...headers},_0x307e3a=new AbortController(),_0x573347=setTimeout(()=>_0x307e3a[_0x3ce389(0xed)](),timeout),_0xba5797=_0x4bf64d?[_0x307e3a[_0x3ce389(0x129)],_0x4bf64d]:[_0x307e3a[_0x3ce389(0x129)]],_0x198840=this[_0x3ce389(0x116)](_0xba5797);try{const _0x3375cd={'method':_0x8f321f,'headers':_0x476e1d,'signal':_0x198840};if(_0x4f6323){if(typeof _0x4f6323==='string')_0x3375cd[_0x3ce389(0xff)]=_0x4f6323;else _0x4f6323 instanceof Buffer?_0x3375cd['body']=_0x4f6323:_0x3375cd['body']=JSON['stringify'](_0x4f6323);}const _0x293989=await fetch(_0xb8c51d,_0x3375cd);clearTimeout(_0x573347);if(!_0x293989['ok']){const _0x368ce2=await this[_0x3ce389(0x12c)](_0x293989),_0x26a97a=this[_0x3ce389(0x118)](_0x368ce2,_0x293989[_0x3ce389(0x124)]);let _0x3188b3;if(_0x293989['status']===0x191)_0x3188b3='HTTP\x20'+_0x293989['status']+':\x20'+_0x293989[_0x3ce389(0x10f)]+'\x0a\x20\x20URL:\x20'+_0xb8c51d;else{if(_0x26a97a?.[_0x3ce389(0x112)])_0x3188b3=_0x26a97a[_0x3ce389(0x112)];else{if(_0x368ce2){const _0x4c482b=JSON[_0x3ce389(0x102)](_0x368ce2);_0x3188b3=_0x3ce389(0x11c)+_0x293989['status']+':\x20'+_0x293989[_0x3ce389(0x10f)]+_0x3ce389(0xee)+_0x4c482b;}else _0x3188b3=_0x3ce389(0x11c)+_0x293989['status']+':\x20'+_0x293989[_0x3ce389(0x10f)];}}throw new HTTPClientError(_0x3188b3,_0x293989[_0x3ce389(0x124)],_0x26a97a);}return _0x293989;}catch(_0x3915ba){clearTimeout(_0x573347);if(_0x3915ba instanceof HTTPClientError)throw _0x3915ba;if(_0x3915ba[_0x3ce389(0x100)]===_0x3ce389(0x12b))throw new Error('Request\x20cancelled\x20by\x20user');throw _0x3915ba;}}[a2_0x2a15f9(0x116)](_0x2ff193){const _0x3225b6=a2_0x2a15f9,_0x4e9fac=new AbortController();for(const _0x1fca23 of _0x2ff193){if(_0x1fca23[_0x3225b6(0x11b)])return _0x4e9fac[_0x3225b6(0xed)](),_0x4e9fac[_0x3225b6(0x129)];_0x1fca23[_0x3225b6(0x109)]('abort',()=>_0x4e9fac[_0x3225b6(0xed)](),{'once':!![]});}return _0x4e9fac[_0x3225b6(0x129)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x479275=a3_0x2110;(function(_0x61312e,_0x1a584a){const _0x2a075a=a3_0x2110,_0x273900=_0x61312e();while(!![]){try{const _0x477815=-parseInt(_0x2a075a(0x17f))/0x1+parseInt(_0x2a075a(0x16e))/0x2+-parseInt(_0x2a075a(0x159))/0x3+-parseInt(_0x2a075a(0x14c))/0x4+-parseInt(_0x2a075a(0x164))/0x5*(parseInt(_0x2a075a(0x167))/0x6)+-parseInt(_0x2a075a(0x143))/0x7*(parseInt(_0x2a075a(0x183))/0x8)+-parseInt(_0x2a075a(0x160))/0x9*(-parseInt(_0x2a075a(0x15c))/0xa);if(_0x477815===_0x1a584a)break;else _0x273900['push'](_0x273900['shift']());}catch(_0x1682a5){_0x273900['push'](_0x273900['shift']());}}}(a3_0x2a5f,0xf38cd));function a3_0x2110(_0x3153db,_0xb01015){const _0x2a5feb=a3_0x2a5f();return a3_0x2110=function(_0x211099,_0x3fa81b){_0x211099=_0x211099-0x142;let _0x5ecf50=_0x2a5feb[_0x211099];return _0x5ecf50;},a3_0x2110(_0x3153db,_0xb01015);}import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';function a3_0x2a5f(){const _0x49ab35=['/api/chats?','/history','maxToolIterations','listProjects','1219677luwUTu','next','/api/agents','systemPrompt','584dyLUel','request','pathname','143339FmPwpN','starterMessage','text/event-stream','prompt','apiKey','chats','listAgents','application/vnd.api+json','PATCH','3694584ATlJlk','-last_conversation_at','listChats','baseUrl','getUserSettings','?filter[project_id]=','deleteAgent','/api/projects','/continue','temperature','links','getAgent','requestSSE','240711otlsbt','description','agents','100cbdfSm','name','/api/chats/','toString','4424049NOEKVf','authHeaders','projects','modelType','5AMhckR','llm','http','10171446xuPVDB','append','/api/agents/','projectId','data','createAgent','DELETE','2991186QbHBaC','site','httpClient','GET','getChatInfo','/api/projects/','/api/projects?page[limit]=','createProject','verbose','push','sort','startChat','POST'];a3_0x2a5f=function(){return _0x49ab35;};return a3_0x2a5f();}import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{parseSSEStream}from'../utils/sse-parser.js';export class LLMClient{[a3_0x479275(0x170)];[a3_0x479275(0x14f)];[a3_0x479275(0x161)];constructor(_0x2d663f){const _0x38e934=a3_0x479275;this[_0x38e934(0x14f)]=getEndpoint(_0x2d663f[_0x38e934(0x16f)],_0x38e934(0x165)),this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x2d663f[_0x38e934(0x16f)],_0x2d663f[_0x38e934(0x147)])),this[_0x38e934(0x170)]=new HTTPClient(this[_0x38e934(0x14f)],this[_0x38e934(0x161)],undefined,_0x2d663f[_0x38e934(0x176)]);}async[a3_0x479275(0x150)](){const _0x533058=a3_0x479275;return await this['httpClient'][_0x533058(0x184)](_0x533058(0x171),'/api/users/current_settings');}async[a3_0x479275(0x175)](_0x52db48){const _0x2c9ad4=a3_0x479275,_0x3284cc={'data':{'type':_0x2c9ad4(0x162),'attributes':{'name':_0x52db48[_0x2c9ad4(0x15d)],..._0x52db48[_0x2c9ad4(0x15a)]&&{'description':_0x52db48[_0x2c9ad4(0x15a)]}}}},_0x3c8e41=await this['httpClient']['request'](_0x2c9ad4(0x17a),_0x2c9ad4(0x153),{'headers':{'Content-Type':'application/vnd.api+json','Accept':_0x2c9ad4(0x14a)},'body':_0x3284cc});return _0x3c8e41[_0x2c9ad4(0x16b)];}async['deleteProject'](_0x67a08e){const _0x4a2ea1=a3_0x479275,_0x35175d=_0x4a2ea1(0x173)+encodeURIComponent(_0x67a08e);await this['httpClient']['request'](_0x4a2ea1(0x16d),_0x35175d);}async[a3_0x479275(0x17e)](_0x53d3f9=0x32){const _0x5e66d6=a3_0x479275,_0x89d587=[];let _0x37e905=_0x5e66d6(0x174)+_0x53d3f9;while(_0x37e905){const _0x1561b2=await this[_0x5e66d6(0x170)][_0x5e66d6(0x184)]('GET',_0x37e905);_0x1561b2[_0x5e66d6(0x16b)]&&_0x89d587[_0x5e66d6(0x177)](..._0x1561b2[_0x5e66d6(0x16b)]);_0x37e905=_0x1561b2[_0x5e66d6(0x156)]?.[_0x5e66d6(0x180)];if(_0x37e905&&_0x37e905['startsWith'](_0x5e66d6(0x166))){const _0x5a8845=new URL(_0x37e905);_0x37e905=_0x5a8845[_0x5e66d6(0x142)]+_0x5a8845['search'];}}return _0x89d587;}async[a3_0x479275(0x149)](_0x3144b4){const _0xdd96c=a3_0x479275;let _0x265d54=_0xdd96c(0x181);_0x3144b4&&(_0x265d54+=_0xdd96c(0x151)+encodeURIComponent(_0x3144b4));const _0x4ad7b9=await this['httpClient'][_0xdd96c(0x184)](_0xdd96c(0x171),_0x265d54);return _0x4ad7b9[_0xdd96c(0x16b)]||[];}async[a3_0x479275(0x157)](_0x37debc){const _0x4b88a1=a3_0x479275,_0x228986=_0x4b88a1(0x169)+encodeURIComponent(_0x37debc),_0x356f7d=await this[_0x4b88a1(0x170)]['request'](_0x4b88a1(0x171),_0x228986);return _0x356f7d[_0x4b88a1(0x16b)];}async[a3_0x479275(0x16c)](_0x53cc90){const _0x470e41=a3_0x479275,_0x4a3de3={'name':_0x53cc90[_0x470e41(0x15d)],'projectId':_0x53cc90[_0x470e41(0x16a)],'modelType':_0x53cc90[_0x470e41(0x163)],'maxToolIterations':_0x53cc90[_0x470e41(0x17d)]??0x4,'temperature':_0x53cc90[_0x470e41(0x155)]??0.7};_0x53cc90[_0x470e41(0x182)]!==undefined&&(_0x4a3de3[_0x470e41(0x182)]=_0x53cc90[_0x470e41(0x182)]);_0x53cc90[_0x470e41(0x144)]&&(_0x4a3de3['starterMessage']=_0x53cc90[_0x470e41(0x144)]);const _0x4db679={'data':{'type':'agents','attributes':_0x4a3de3}},_0x2bfb50=await this['httpClient'][_0x470e41(0x184)](_0x470e41(0x17a),_0x470e41(0x181),{'headers':{'Content-Type':_0x470e41(0x14a),'Accept':'application/vnd.api+json'},'body':_0x4db679});return _0x2bfb50[_0x470e41(0x16b)];}async['updateAgent'](_0x195bba,_0x213223){const _0x4d6b38=a3_0x479275,_0x24e416={'data':{'type':_0x4d6b38(0x15b),'id':_0x195bba,'attributes':{..._0x213223['name']&&{'name':_0x213223[_0x4d6b38(0x15d)]},..._0x213223[_0x4d6b38(0x15a)]&&{'description':_0x213223['description']},..._0x213223[_0x4d6b38(0x146)]&&{'prompt':_0x213223[_0x4d6b38(0x146)]},..._0x213223[_0x4d6b38(0x144)]&&{'starter_message':_0x213223['starterMessage']}}}},_0x2df313='/api/agents/'+encodeURIComponent(_0x195bba),_0x43b2ac=await this[_0x4d6b38(0x170)][_0x4d6b38(0x184)](_0x4d6b38(0x14b),_0x2df313,{'body':_0x24e416});return _0x43b2ac[_0x4d6b38(0x16b)];}async[a3_0x479275(0x152)](_0x50a04a){const _0x485422=a3_0x479275,_0x2e6d52=_0x485422(0x169)+encodeURIComponent(_0x50a04a);await this[_0x485422(0x170)][_0x485422(0x184)](_0x485422(0x16d),_0x2e6d52);}async[a3_0x479275(0x14e)](_0x741dde=0x32){const _0x136808=a3_0x479275,_0x22ba00=new URLSearchParams();_0x22ba00[_0x136808(0x168)]('page[limit]',String(_0x741dde)),_0x22ba00['append'](_0x136808(0x178),_0x136808(0x14d));const _0xa45a83=_0x136808(0x17b)+_0x22ba00[_0x136808(0x15f)](),_0x2d3d73=await this[_0x136808(0x170)][_0x136808(0x184)](_0x136808(0x171),_0xa45a83);return _0x2d3d73[_0x136808(0x16b)]||[];}async[a3_0x479275(0x172)](_0xb5a2d8){const _0x2ec232=a3_0x479275,_0x4ab419=_0x2ec232(0x15e)+encodeURIComponent(_0xb5a2d8),_0x1b64a1=await this[_0x2ec232(0x170)][_0x2ec232(0x184)](_0x2ec232(0x171),_0x4ab419);return _0x1b64a1[_0x2ec232(0x16b)];}async['getChatHistory'](_0x44b572){const _0xf16330=a3_0x479275,_0xbca5c5='/api/chats/'+encodeURIComponent(_0x44b572)+_0xf16330(0x17c);return await this[_0xf16330(0x170)]['request'](_0xf16330(0x171),_0xbca5c5);}async[a3_0x479275(0x179)](_0x3fb45c){const _0x2519f9=a3_0x479275,_0x148acb={'data':{'type':_0x2519f9(0x148),'attributes':{'agentId':_0x3fb45c['agentId']}}},_0x34ecc2=await this[_0x2519f9(0x170)][_0x2519f9(0x184)](_0x2519f9(0x17a),'/api/chats',{'headers':{'Content-Type':_0x2519f9(0x14a),'Accept':_0x2519f9(0x14a)},'body':_0x148acb});return _0x34ecc2['data'];}async*['continueChat'](_0x47ce83,_0x371474,_0x1485d0){const _0x5621fc=a3_0x479275,_0x13832f=_0x5621fc(0x15e)+encodeURIComponent(_0x47ce83)+_0x5621fc(0x154),_0x40fc9c={'input':_0x371474},_0x468dce=await this[_0x5621fc(0x170)][_0x5621fc(0x158)](_0x5621fc(0x17a),_0x13832f,{'headers':{'Content-Type':'application/json','Accept':_0x5621fc(0x145)},'body':_0x40fc9c,'signal':_0x1485d0});yield*parseSSEStream(_0x468dce);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a4_0x1a0b(){const _0xecc97a=['10CixBky','maxRequests','138UBwWLB','40eXGOpH','7814sBgXHz','min','tryAcquire','max','20YRofos','1808080KWmGnk','acquire','refill','windowMs','sleep','123473qJBsEo','floor','reset','now','ceil','lastRefill','325699WjusRy','1455212VjajVu','3YeMPCW','973854BJjLvw','6687036WaQjzh','refillRate','tokens','maxTokens'];a4_0x1a0b=function(){return _0xecc97a;};return a4_0x1a0b();}const a4_0x4ec8d1=a4_0x4a6f;(function(_0xd98d24,_0x1a4013){const _0x4604ff=a4_0x4a6f,_0x2ecdc9=_0xd98d24();while(!![]){try{const _0x2ae5de=parseInt(_0x4604ff(0x8e))/0x1*(-parseInt(_0x4604ff(0x8a))/0x2)+parseInt(_0x4604ff(0x84))/0x3*(-parseInt(_0x4604ff(0x83))/0x4)+parseInt(_0x4604ff(0x93))/0x5+parseInt(_0x4604ff(0x8c))/0x6*(parseInt(_0x4604ff(0x98))/0x7)+parseInt(_0x4604ff(0x8d))/0x8*(parseInt(_0x4604ff(0x85))/0x9)+parseInt(_0x4604ff(0x92))/0xa*(-parseInt(_0x4604ff(0x82))/0xb)+-parseInt(_0x4604ff(0x86))/0xc;if(_0x2ae5de===_0x1a4013)break;else _0x2ecdc9['push'](_0x2ecdc9['shift']());}catch(_0x6110e7){_0x2ecdc9['push'](_0x2ecdc9['shift']());}}}(a4_0x1a0b,0x468e7));export class RateLimiter{[a4_0x4ec8d1(0x88)];[a4_0x4ec8d1(0x81)];[a4_0x4ec8d1(0x89)];[a4_0x4ec8d1(0x87)];constructor(_0x50c0c8){const _0x143c74=a4_0x4ec8d1;this[_0x143c74(0x89)]=_0x50c0c8[_0x143c74(0x8b)],this[_0x143c74(0x88)]=_0x50c0c8[_0x143c74(0x8b)],this[_0x143c74(0x81)]=Date[_0x143c74(0x7f)](),this[_0x143c74(0x87)]=_0x50c0c8['maxRequests']/_0x50c0c8[_0x143c74(0x96)];}async[a4_0x4ec8d1(0x94)](){const _0x2defd2=a4_0x4ec8d1;while(!![]){this['refill']();if(this[_0x2defd2(0x88)]>=0x1){this['tokens']-=0x1;return;}const _0x34dbac=Math[_0x2defd2(0x91)](0x1,Math[_0x2defd2(0x80)](0x1/this['refillRate']));await this['sleep'](_0x34dbac);}}[a4_0x4ec8d1(0x90)](){const _0x16c24b=a4_0x4ec8d1;this['refill']();if(this[_0x16c24b(0x88)]>=0x1)return this[_0x16c24b(0x88)]-=0x1,!![];return![];}[a4_0x4ec8d1(0x95)](){const _0x4e4d0c=a4_0x4ec8d1,_0x4f4b73=Date[_0x4e4d0c(0x7f)](),_0x5ba6b1=_0x4f4b73-this['lastRefill'];if(_0x5ba6b1>0x0){const _0x37ded6=_0x5ba6b1*this[_0x4e4d0c(0x87)];this[_0x4e4d0c(0x88)]=Math[_0x4e4d0c(0x8f)](this[_0x4e4d0c(0x89)],this[_0x4e4d0c(0x88)]+_0x37ded6),this['lastRefill']=_0x4f4b73;}}['getAvailableTokens'](){const _0x52202b=a4_0x4ec8d1;return this[_0x52202b(0x95)](),Math[_0x52202b(0x99)](this[_0x52202b(0x88)]);}[a4_0x4ec8d1(0x7e)](){const _0xe541ea=a4_0x4ec8d1;this[_0xe541ea(0x88)]=this[_0xe541ea(0x89)],this[_0xe541ea(0x81)]=Date[_0xe541ea(0x7f)]();}[a4_0x4ec8d1(0x97)](_0x1070ec){return new Promise(_0x337448=>setTimeout(_0x337448,_0x1070ec));}}function a4_0x4a6f(_0x20d5fc,_0x521c38){const _0x1a0b39=a4_0x1a0b();return a4_0x4a6f=function(_0x4a6fc7,_0x216519){_0x4a6fc7=_0x4a6fc7-0x7e;let _0x6b8c8c=_0x1a0b39[_0x4a6fc7];return _0x6b8c8c;},a4_0x4a6f(_0x20d5fc,_0x521c38);}export const defaultRateLimiter=new RateLimiter({'maxRequests':0x64,'windowMs':0xea60});
|
package/dist/client/td-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a5_0x4376f1=a5_0x325d;function a5_0x325d(_0x40ace9,_0x224499){const _0x10328=a5_0x1032();return a5_0x325d=function(_0x325d38,_0xbd58e5){_0x325d38=_0x325d38-0xd1;let _0xe8a03e=_0x10328[_0x325d38];return _0xe8a03e;},a5_0x325d(_0x40ace9,_0x224499);}(function(_0x86ca0b,_0x44169a){const _0x550994=a5_0x325d,_0x250fb2=_0x86ca0b();while(!![]){try{const _0x35887d=parseInt(_0x550994(0xee))/0x1*(parseInt(_0x550994(0xf1))/0x2)+parseInt(_0x550994(0xf8))/0x3*(-parseInt(_0x550994(0x103))/0x4)+-parseInt(_0x550994(0xef))/0x5+-parseInt(_0x550994(0xd7))/0x6*(parseInt(_0x550994(0xd1))/0x7)+parseInt(_0x550994(0x106))/0x8+parseInt(_0x550994(0xf5))/0x9*(parseInt(_0x550994(0xd4))/0xa)+parseInt(_0x550994(0x109))/0xb;if(_0x35887d===_0x44169a)break;else _0x250fb2['push'](_0x250fb2['shift']());}catch(_0x33abb0){_0x250fb2['push'](_0x250fb2['shift']());}}}(a5_0x1032,0x6328a));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class TDClient{[a5_0x4376f1(0xd2)];[a5_0x4376f1(0xf9)];constructor(_0x10a321){const _0x4d2820=a5_0x4376f1,_0xb554b8=getEndpoint(_0x10a321['site'],'td');this[_0x4d2820(0xf9)]=toHeaderRecord(getAuthHeaders(_0x10a321[_0x4d2820(0xdc)],_0x10a321[_0x4d2820(0xf7)])),this[_0x4d2820(0xd2)]=new HTTPClient(_0xb554b8,this[_0x4d2820(0xf9)],undefined,_0x10a321[_0x4d2820(0xd6)]);}async[a5_0x4376f1(0xeb)](){const _0x2a82a5=a5_0x4376f1,_0x728754=await this[_0x2a82a5(0xd2)][_0x2a82a5(0xe4)](_0x2a82a5(0xff),_0x2a82a5(0xe9));return _0x728754[_0x2a82a5(0x101)];}async[a5_0x4376f1(0x104)](_0x152afc){const _0x12b75f=a5_0x4376f1,_0x4e5274=await this[_0x12b75f(0xd2)][_0x12b75f(0xe4)]('GET',_0x12b75f(0xfc)+encodeURIComponent(_0x152afc));return _0x4e5274;}async[a5_0x4376f1(0xf0)](_0x1fe700){const _0x347884=a5_0x4376f1;await this[_0x347884(0xd2)][_0x347884(0xe4)]('POST','/v3/database/create/'+encodeURIComponent(_0x1fe700));}async[a5_0x4376f1(0x105)](_0x26b969){const _0x40abae=a5_0x4376f1;await this['httpClient'][_0x40abae(0xe4)](_0x40abae(0xea),_0x40abae(0xe7)+encodeURIComponent(_0x26b969));}async[a5_0x4376f1(0xd3)](_0x40ae6f){const _0x471458=a5_0x4376f1,_0x5d4766=await this['httpClient'][_0x471458(0xe4)](_0x471458(0xff),_0x471458(0xf6)+encodeURIComponent(_0x40ae6f));return _0x5d4766['tables'];}async['showTable'](_0xcaee5c,_0x18079e){const _0x2d6051=a5_0x4376f1,_0x23b7f3=await this[_0x2d6051(0xd2)][_0x2d6051(0xe4)](_0x2d6051(0xff),_0x2d6051(0x100)+encodeURIComponent(_0xcaee5c)+'/'+encodeURIComponent(_0x18079e));return _0x23b7f3;}async[a5_0x4376f1(0xfe)](_0x428e79,_0x37c705){const _0x4079fa=a5_0x4376f1;await this[_0x4079fa(0xd2)]['request'](_0x4079fa(0xea),_0x4079fa(0xd5)+encodeURIComponent(_0x428e79)+'/'+encodeURIComponent(_0x37c705));}async[a5_0x4376f1(0xde)](_0x233be7,_0x5bc14f){const _0x5668d7=a5_0x4376f1;await this['httpClient'][_0x5668d7(0xe4)](_0x5668d7(0xea),_0x5668d7(0x107)+encodeURIComponent(_0x233be7)+'/'+encodeURIComponent(_0x5bc14f));}async[a5_0x4376f1(0xfb)](_0x21594f,_0x21293d){const _0x401deb=a5_0x4376f1,_0x2f59a7=await this['httpClient'][_0x401deb(0xe4)](_0x401deb(0xea),'/v3/job/issue/hive/'+encodeURIComponent(_0x21594f),{'body':{'query':_0x21293d}});return _0x2f59a7;}async['submitPrestoJob'](_0x155ca4,_0x54a3b7){const _0x1ef5d4=a5_0x4376f1,_0x23701a=await this[_0x1ef5d4(0xd2)][_0x1ef5d4(0xe4)]('POST',_0x1ef5d4(0xf3)+encodeURIComponent(_0x155ca4),{'body':{'query':_0x54a3b7}});return _0x23701a;}async[a5_0x4376f1(0xd9)](_0x3403aa){const _0x1514a9=a5_0x4376f1,_0x117a9e=new URLSearchParams();if(_0x3403aa?.[_0x1514a9(0x108)]!==undefined)_0x117a9e[_0x1514a9(0xdb)](_0x1514a9(0x108),_0x3403aa[_0x1514a9(0x108)]['toString']());if(_0x3403aa?.['to']!==undefined)_0x117a9e[_0x1514a9(0xdb)]('to',_0x3403aa['to'][_0x1514a9(0xe0)]());if(_0x3403aa?.[_0x1514a9(0xfa)])_0x117a9e['append'](_0x1514a9(0xfa),_0x3403aa['status']);const _0x35480d=_0x117a9e[_0x1514a9(0xe0)](),_0x2bcb36=_0x35480d?_0x1514a9(0xec)+_0x35480d:_0x1514a9(0xe2),_0x34009d=await this[_0x1514a9(0xd2)][_0x1514a9(0xe4)]('GET',_0x2bcb36);return _0x34009d[_0x1514a9(0xe3)];}async['showJob'](_0x21670e){const _0xca56bb=a5_0x4376f1,_0x53f389=await this[_0xca56bb(0xd2)][_0xca56bb(0xe4)]('GET','/v3/job/show/'+encodeURIComponent(_0x21670e));return _0x53f389;}async[a5_0x4376f1(0xe8)](_0x3d816d){const _0x54408a=a5_0x4376f1;await this['httpClient'][_0x54408a(0xe4)]('POST','/v3/job/kill/'+encodeURIComponent(_0x3d816d));}async[a5_0x4376f1(0xdd)](_0x39431a){const _0x20c23c=a5_0x4376f1,_0x4fd60b=await this[_0x20c23c(0xd2)][_0x20c23c(0xe4)](_0x20c23c(0xff),_0x20c23c(0xd8)+encodeURIComponent(_0x39431a)+_0x20c23c(0xed),{'headers':{'Accept':'application/json'},'responseType':'text'});if(typeof _0x4fd60b===_0x20c23c(0xf2)){const _0x1efdae=_0x4fd60b['split']('\x0a')[_0x20c23c(0xe1)](_0x4610c2=>_0x4610c2[_0x20c23c(0x102)]());if(_0x1efdae[_0x20c23c(0xe6)]===0x0)return[];let _0x4cceb4;try{_0x4cceb4=JSON[_0x20c23c(0xe5)](_0x1efdae[0x0]);}catch(_0x15c713){return console[_0x20c23c(0xf4)]('Failed\x20to\x20parse\x20column\x20names:\x20'+(_0x15c713 instanceof Error?_0x15c713[_0x20c23c(0xda)]:String(_0x15c713))),[];}const _0x225dae=[];for(let _0x49dca8=0x1;_0x49dca8<_0x1efdae[_0x20c23c(0xe6)];_0x49dca8++){const _0x363177=_0x1efdae[_0x49dca8]['trim']();if(!_0x363177)continue;try{const _0xee3067=JSON[_0x20c23c(0xe5)](_0x363177),_0x369303={};_0x4cceb4[_0x20c23c(0xdf)]((_0x1785d8,_0x34fa2f)=>{_0x369303[_0x1785d8]=_0xee3067[_0x34fa2f];}),_0x225dae['push'](_0x369303);}catch(_0x28ee80){console[_0x20c23c(0xf4)](_0x20c23c(0xfd)+(_0x49dca8+0x1)+':\x20'+(_0x28ee80 instanceof Error?_0x28ee80[_0x20c23c(0xda)]:String(_0x28ee80)));}}return _0x225dae;}return[];}}export function createTDClient(_0x37108f){return new TDClient(_0x37108f);}function a5_0x1032(){const _0x57a68b=['length','/v3/database/delete/','cancelJob','/v3/database/list','POST','listDatabases','/v3/job/list?','?header=true','71pwwZWS','1738065JDmTPY','createDatabase','15294owDkzB','string','/v3/job/issue/presto/','warn','14193uJGtIV','/v3/table/list/','apiKey','841941atOzyw','authHeaders','status','submitHiveJob','/v3/database/show/','Failed\x20to\x20parse\x20NDJSON\x20line\x20','createTable','GET','/v3/table/show/','databases','trim','4cxKkXe','showDatabase','deleteDatabase','1380912GFqRhx','/v3/table/delete/','from','5474788CLfwbu','217XkZhBl','httpClient','listTables','3890YxWHvu','/v3/table/create/','verbose','153348lnJGwD','/v3/job/result/','listJobs','message','append','site','getJobResult','deleteTable','forEach','toString','filter','/v3/job/list','jobs','request','parse'];a5_0x1032=function(){return _0x57a68b;};return a5_0x1032();}
|