@treasuredata/tdx 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/trino-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pwd-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const a0_0x55e4f6=a0_0x1bfe;(function(_0x4694ac,_0x1d341b){const _0x4698bb=a0_0x1bfe,_0x2bce13=_0x4694ac();while(!![]){try{const _0x10e878=parseInt(_0x4698bb(0x2ba))/0x1*(parseInt(_0x4698bb(0x22e))/0x2)+parseInt(_0x4698bb(0x288))/0x3+-parseInt(_0x4698bb(0x1c6))/0x4+-parseInt(_0x4698bb(0x27a))/0x5*(parseInt(_0x4698bb(0x211))/0x6)+-parseInt(_0x4698bb(0x22c))/0x7*(parseInt(_0x4698bb(0x27d))/0x8)+parseInt(_0x4698bb(0x21a))/0x9*(-parseInt(_0x4698bb(0x23e))/0xa)+-parseInt(_0x4698bb(0x290))/0xb*(-parseInt(_0x4698bb(0x1a5))/0xc);if(_0x10e878===_0x1d341b)break;else _0x2bce13['push'](_0x2bce13['shift']());}catch(_0x2b1af0){_0x2bce13['push'](_0x2bce13['shift']());}}}(a0_0x22ee,0x813fe));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{LogLevel}from'./utils/tdx-logger.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';import{SegmentFieldsCommand}from'./commands/segment-fields-command.js';import{ParentSegmentCreateCommand,ParentSegmentUpdateCommand}from'./commands/parent-segment-command.js';import{SegmentCreateCommand}from'./commands/segment-create-command.js';import{SegmentUpdateCommand}from'./commands/segment-update-command.js';import{SegmentUseCommand}from'./commands/segment-use-command.js';import{SegmentPwdCommand}from'./commands/segment-pwd-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';import{checkForUpdate,displayUpdateNotification}from'./utils/version-check.js';const __filename=fileURLToPath(import.meta[a0_0x55e4f6(0x289)]),__dirname=dirname(__filename),packageJson=JSON[a0_0x55e4f6(0x1d2)](readFileSync(join(__dirname,a0_0x55e4f6(0x278)),a0_0x55e4f6(0x28a)));function a0_0x22ee(){const _0x1b745f=['--output\x20<file>','Segment\x20description','Model\x20name\x20(default:\x20claude-4.5-sonnet)','LLM\x20project\x20to\x20use\x20(overrides\x20context)','repeat','--port\x20<number>','--from-task\x20<task>','Parent\x20segment\x20description','Workflow\x20(Digdag)\x20management\x20commands','download\x20<project-name>\x20[output-dir]','--add-behaviors-file\x20<file>','buildTime','Usage:\x20','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Add\x20attributes\x20from\x20JSON\x20file','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Create\x20parent\x20segment\x20(audience)','show\x20<segment_name>','--add-attributes-file\x20<file>','tasks\x20<attempt-id>','allowExcessArguments','.dev','context','36048708REerEr','folders\x20<parent_name>','run','--name\x20<new_name>','aliases','Temperature\x20(0.0-2.0,\x20default:\x200.7)','build-info.json','tables\x20[pattern]','injectIntoOptions','Trino\x20catalog\x20(default:\x20td)','gitRevision','--invisible','Options:','alias','Database\x20to\x20use\x20(overrides\x20context)','AI-native\x20CLI\x20for\x20Treasure\x20Data','TRACE','show\x20<agent-name>','--attributes-file\x20<file>','registeredArguments','Agent\x20name','--attributes\x20<json>','Starting\x20offset\x20for\x20logs\x20(default:\x200)','Filtering\x20rule\x20as\x20JSON\x20string','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','--system-prompt\x20<text>','--in\x20<name>','--new','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','List\x20available\x20LLM\x20models','query\x20[sql]','models','2118588MfxOuJ','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','workflow','exit','Folder\x20description','workflows\x20[project]','--reason\x20<text>','--in\x20<database>','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)','Preview\x20operation\x20without\x20executing','pwd','proxy','parse','Maximum\x20tool\x20iterations\x20(default:\x204)','--skip-validation','-r,\x20--recursive','Create\x20a\x20new\x20LLM\x20project','--add-behaviors\x20<json>','preAction','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','use\x20<project-name>','--include-subtasks','configureHelp','--catalog\x20<catalog>','--llm-project\x20<name>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','Master\x20database\x20name','segment','Skip\x20population\x20counting','--starter-message\x20<text>','--trace','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)','Timezone\x20(e.g.,\x20America/Los_Angeles)','tdx','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','database','System\x20prompt/instructions\x20(default:\x20empty)','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','--job-type\x20<type>','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','profiles','describe\x20<segment_name>','Project\x20description','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','claude-4.5-sonnet','--no-color','--offset\x20<number>','Behaviors\x20from\x20JSON\x20file','Read\x20request\x20body\x20from\x20file','Agent\x20prompt/instructions','--tsv','Enable\x20verbose\x20logging','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','catch','create\x20<name>','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)','--status\x20<status>','--type\x20<api_type>','create\x20<parent_name>\x20<folder_name>','after','Behaviors\x20as\x20JSON\x20string','information_schema','show\x20<job-id>','--version','result\x20<job-id>','show\x20<folder_ref>','--customer-group-file\x20<file>','Show\x20agent\x20details','sessions\x20[project]','LLM\x20agent\x20management','--timeout\x20<seconds>','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','llm','subcommandDescription','282AeFTsD','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','--customer-group\x20<json>','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','filter','4000','option','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','create\x20<segment_name>','9gLNsYX','Create\x20segment\x20folder','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','kill\x20<attempt-id>','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','optionTerm','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','\x20-\x20built\x20','Delete\x20an\x20LLM\x20project','Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)','--debug','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','hidden','Describe\x20table\x20schema','history\x20[chat-id]','addHelpText','requiredOption','7EKXGXS','--clear','2AoYGZr','--schedule-option\x20<value>','Attributes\x20from\x20JSON\x20file','length','Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)','json','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','map','--parent-folder\x20<name>','argv','Start\x20a\x20new\x20chat\x20session','--session\x20<id>','--json','options','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','New\x20segment\x20name','7821790cSKPdA','List\x20workflows\x20(optionally\x20filtered\x20by\x20project)','padWidth','format','Updated\x20schedule\x20option','Model\x20type\x20(default:\x20claude-4.5-sonnet)','replace','site','Alias\x20for\x20--database\x20(natural\x20language\x20style)','--format\x20<format>','--no-count-population','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','optionDescription','Skip\x20validation\x20of\x20.dig\x20files','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','version','--database\x20<db>','Updated\x20timezone','--name\x20<name>','Move\x20to\x20folder','--schedule-type\x20<type>','Agent\x20reference\x20(project-name/agent-name)','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','List\x20available\x20fields\x20for\x20segmentation','--profile\x20<name>','description','trace','Arguments:','agent','--timezone\x20<tz>','Delete\x20an\x20agent',',\x20version\x20','--to\x20<timestamp>','chat\x20[message...]','--name\x20<text>','sonnet','--max-tool-iterations\x20<n>','api\x20[endpoint]','desc','commandUsage','Updated\x20description','Add\x20behaviors\x20from\x20JSON\x20file','--last','delete\x20<name>','List\x20all\x20available\x20profiles','sql\x20<segment_name>','List\x20jobs','--dry-run','includes','claude\x20[args...]','-d,\x20--database\x20<database>','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','--behaviors\x20<json>','--from\x20<timestamp>','--model\x20<name>','--agent\x20<ref>','logs\x20<attempt-id>\x20<task-name>','--prompt\x20<text>','../package.json','opts','102535aeCLbZ','--revision\x20<revision>','Segment\x20folder\x20management','6208376jdYOEb','Starter\x20message','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','--behaviors-file\x20<file>','Make\x20segment\x20invisible\x20(default:\x20visible)','Update\x20child\x20segment\x20(use\x20parent_name/child_name)','padEnd','kill\x20<job-id>','Run\x20Trino\x20query\x20with\x20streaming\x20results','apiKey','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','418530VyDhat','url','utf-8','--agent\x20<name>','--rule-file\x20<file>','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','action','11BWjuSm','--limit\x20<number>','LLM\x20project\x20management','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','Revision\x20name\x20(default:\x20timestamp)','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','jsonl','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)','command','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','Agent\x20description','folder','-X,\x20--method\x20<method>','show\x20[table]','Attributes\x20as\x20JSON\x20string','-H,\x20--header\x20<header>','--database\x20<name>','Include\x20retried\x20attempts','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','join','attempts\x20[project]','submit\x20[query]','--color','summary','Update\x20an\x20existing\x20agent','Skip\x20confirmation\x20prompts','Add\x20attributes\x20as\x20JSON\x20string','-y,\x20--yes','name','trino','GET','debug','--kind\x20<type>','--rule\x20<json>','help','commands','argumentDescription','--include-retried','activations\x20<segment_name>','push','outputHelp','437539FyzYBe','Read\x20SQL\x20query\x20from\x20file','isArray','projects\x20[pattern]','push\x20[project-name-or-dir]','port','Read\x20query\x20from\x20file','Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)','-f,\x20--file\x20<path>','Save\x20output\x20to\x20file','Kill\x20a\x20running\x20attempt','--limit\x20<rows>','--description\x20<text>','update\x20<name>','Request\x20body\x20as\x20JSON\x20string','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','--force','--data\x20<data>','--site\x20<site>','Add\x20behaviors\x20as\x20JSON\x20string','Create\x20a\x20new\x20agent\x20in\x20current\x20project','tsv','Profile\x20to\x20use\x20(overrides\x20active\x20profile)','--jsonl','delete\x20<agent-name>','--max-depth\x20<depth>','logLevel','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Filtering\x20rule\x20from\x20JSON\x20file','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','DEBUG','slice','Master\x20table\x20name'];a0_0x22ee=function(){return _0x1b745f;};return a0_0x22ee();}function a0_0x1bfe(_0x1bf3d1,_0x299e54){const _0x22ee38=a0_0x22ee();return a0_0x1bfe=function(_0x1bfe51,_0x9e83c7){_0x1bfe51=_0x1bfe51-0x19f;let _0x34833e=_0x22ee38[_0x1bfe51];return _0x34833e;},a0_0x1bfe(_0x1bf3d1,_0x299e54);}let buildInfo={};try{buildInfo=JSON[a0_0x55e4f6(0x1d2)](readFileSync(join(__dirname,a0_0x55e4f6(0x1ab)),a0_0x55e4f6(0x28a)));}catch{}if(process[a0_0x55e4f6(0x237)][a0_0x55e4f6(0x26e)](a0_0x55e4f6(0x206))){let versionOutput='tdx\x20'+packageJson[a0_0x55e4f6(0x24d)];buildInfo[a0_0x55e4f6(0x1af)]&&(versionOutput+='\x20('+buildInfo['gitRevision']+')'),buildInfo[a0_0x55e4f6(0x2e6)]&&(versionOutput+=a0_0x55e4f6(0x221)+buildInfo['buildTime']),console['log'](versionOutput),process[a0_0x55e4f6(0x1c9)](0x0);}const program=new Command();let description=a0_0x55e4f6(0x1b4);buildInfo[a0_0x55e4f6(0x1af)]?description+=a0_0x55e4f6(0x25d)+packageJson[a0_0x55e4f6(0x24d)]+'\x20('+buildInfo[a0_0x55e4f6(0x1af)]+')':description+=',\x20version\x20'+packageJson[a0_0x55e4f6(0x24d)];program[a0_0x55e4f6(0x2ad)](a0_0x55e4f6(0x1e7))[a0_0x55e4f6(0x257)](description),program[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2cc),'TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)','us01')['option'](a0_0x55e4f6(0x247),'Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x23a),a0_0x55e4f6(0x20e))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2d1),a0_0x55e4f6(0x1e8))['option'](a0_0x55e4f6(0x1f9),a0_0x55e4f6(0x1c2))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2db),a0_0x55e4f6(0x2c3))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x291),'Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2a7),'Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)',![])['option'](a0_0x55e4f6(0x1f4),'Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)',![])['option']('-v,\x20--verbose',a0_0x55e4f6(0x1fa),![])[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x225),'Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1e4),a0_0x55e4f6(0x214))['option'](a0_0x55e4f6(0x20d),'Set\x20operation\x20timeout\x20in\x20seconds','30')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x26d),a0_0x55e4f6(0x1cf),![])[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2ac),a0_0x55e4f6(0x2aa),![])[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x239),a0_0x55e4f6(0x1ce))['option'](a0_0x55e4f6(0x256),a0_0x55e4f6(0x2d0))[a0_0x55e4f6(0x217)]('-d,\x20--database\x20<name>',a0_0x55e4f6(0x1b3))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1bf),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x55e4f6(0x217)]('--parent-segment\x20<name>','Parent\x20segment\x20to\x20use\x20(overrides\x20context)')['option'](a0_0x55e4f6(0x1de),a0_0x55e4f6(0x2de)),program[a0_0x55e4f6(0x1dc)]({'formatHelp':(_0x584371,_0x28c019)=>{const _0x2b5a6c=a0_0x55e4f6,_0xb3d61f=_0x28c019[_0x2b5a6c(0x240)](_0x584371,_0x28c019),_0x521cad=0x2,_0x12cbca=0x2;function _0xa51e5e(_0x14862a){const _0x2e9329=_0x2b5a6c;return!!_0x14862a[_0x2e9329(0x227)];}function _0x478dfc(_0x11b4e6,_0x311ce6){const _0xd25cf9=_0x2b5a6c;if(_0x311ce6){const _0x54de35=''+_0x11b4e6[_0xd25cf9(0x283)](_0xb3d61f+_0x12cbca)+_0x311ce6;return _0x54de35;}return _0x11b4e6;}function _0x1c1f10(_0x17db8a){const _0x295ad4=_0x2b5a6c;return _0x17db8a['join']('\x0a')[_0x295ad4(0x244)](/^/gm,'\x20'[_0x295ad4(0x2df)](_0x521cad));}const _0xce175e=[];_0xce175e[_0x2b5a6c(0x2b8)](_0x2b5a6c(0x2e7)+_0x28c019[_0x2b5a6c(0x265)](_0x584371));const _0x144a86=_0x28c019['commandDescription'](_0x584371);_0x144a86&&(_0xce175e[_0x2b5a6c(0x2b8)](''),_0xce175e[_0x2b5a6c(0x2b8)](_0x144a86));const _0x8e7035=_0x584371[_0x2b5a6c(0x2b4)][_0x2b5a6c(0x215)](_0x12be7a=>!_0xa51e5e(_0x12be7a));if(_0x8e7035[_0x2b5a6c(0x231)]>0x0){const _0x4c4c6e=_0x8e7035[_0x2b5a6c(0x235)](_0x148bce=>{const _0x4b4ea6=_0x2b5a6c,_0x1ef415=_0x28c019['subcommandTerm'](_0x148bce),_0x43ff2f=_0x28c019[_0x4b4ea6(0x210)](_0x148bce);return _0x478dfc(_0x1ef415,_0x43ff2f);});_0xce175e[_0x2b5a6c(0x2b8)](''),_0xce175e[_0x2b5a6c(0x2b8)]('Commands:'),_0xce175e[_0x2b5a6c(0x2b8)](_0x1c1f10(_0x4c4c6e));}const _0x49d411=_0x584371[_0x2b5a6c(0x23b)]['filter'](_0x2ad594=>!_0xa51e5e(_0x2ad594));if(_0x49d411['length']>0x0){const _0x3e9c2e=_0x49d411['map'](_0x3532ca=>{const _0x16c4b3=_0x2b5a6c,_0x44e526=_0x28c019[_0x16c4b3(0x21f)](_0x3532ca),_0x52abe7=_0x28c019[_0x16c4b3(0x24a)](_0x3532ca);return _0x478dfc(_0x44e526,_0x52abe7);});_0xce175e[_0x2b5a6c(0x2b8)](''),_0xce175e[_0x2b5a6c(0x2b8)](_0x2b5a6c(0x1b1)),_0xce175e[_0x2b5a6c(0x2b8)](_0x1c1f10(_0x3e9c2e));}const _0x446e72=(_0x584371[_0x2b5a6c(0x1b8)]||[])[_0x2b5a6c(0x215)](_0x2846eb=>!_0xa51e5e(_0x2846eb));if(_0x446e72[_0x2b5a6c(0x231)]>0x0){const _0x16409e=_0x446e72[_0x2b5a6c(0x235)](_0x5b8b36=>{const _0x391ec6=_0x2b5a6c,_0x59256b=_0x28c019['argumentTerm'](_0x5b8b36),_0x138137=_0x28c019[_0x391ec6(0x2b5)](_0x5b8b36);return _0x478dfc(_0x59256b,_0x138137);});_0xce175e['push'](''),_0xce175e[_0x2b5a6c(0x2b8)](_0x2b5a6c(0x259)),_0xce175e[_0x2b5a6c(0x2b8)](_0x1c1f10(_0x16409e));}return _0xce175e[_0x2b5a6c(0x2a4)]('\x0a');},'subcommandTerm':_0x5519d0=>{const _0x1f2d46=a0_0x55e4f6,_0xe0a68=(_0x5519d0['registeredArguments']||[])['map'](_0x4463e6=>_0x4463e6['required']?'<'+_0x4463e6[_0x1f2d46(0x2ad)]()+'>':'['+_0x4463e6['name']()+']')['join']('\x20'),_0x2758db=_0x5519d0[_0x1f2d46(0x1a9)](),_0x17bc63=_0x2758db[_0x1f2d46(0x231)]>0x0?_0x5519d0[_0x1f2d46(0x2ad)]()+',\x20'+_0x2758db['join'](',\x20'):_0x5519d0[_0x1f2d46(0x2ad)]();return _0xe0a68?_0x17bc63+'\x20'+_0xe0a68:_0x17bc63;}}),program['hook'](a0_0x55e4f6(0x1d8),_0x3ae2f2=>{const _0x39c391=a0_0x55e4f6,_0x5ecd72=_0x3ae2f2['opts']();if(!_0x5ecd72[_0x39c391(0x241)]){if(_0x5ecd72['json'])_0x5ecd72[_0x39c391(0x241)]=_0x39c391(0x233);else{if(_0x5ecd72[_0x39c391(0x296)])_0x5ecd72[_0x39c391(0x241)]=_0x39c391(0x296);else _0x5ecd72[_0x39c391(0x2cf)]&&(_0x5ecd72[_0x39c391(0x241)]='tsv');}}_0x5ecd72['in']&&!_0x5ecd72[_0x39c391(0x1e9)]&&(_0x5ecd72['database']=_0x5ecd72['in']);if(_0x5ecd72[_0x39c391(0x258)])_0x5ecd72['logLevel']=LogLevel[_0x39c391(0x1b5)];else{if(_0x5ecd72[_0x39c391(0x2b0)])_0x5ecd72[_0x39c391(0x2d4)]=LogLevel[_0x39c391(0x2d8)];else _0x5ecd72['logLevel']===undefined&&(_0x5ecd72[_0x39c391(0x2d4)]=LogLevel['INFO']);}});function createTDXInstance(_0x29771b){const _0x2cfae9=a0_0x55e4f6,_0x37742c=new GlobalContext(_0x29771b);_0x37742c[_0x2cfae9(0x1ad)](_0x29771b);const _0x501a10={'site':_0x37742c[_0x2cfae9(0x245)],'apiKey':_0x37742c[_0x2cfae9(0x286)],'logLevel':_0x37742c['logLevel']};return new TDX(_0x501a10);}program[a0_0x55e4f6(0x298)]('databases\x20[pattern]')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1bd))[a0_0x55e4f6(0x28f)](async(_0x43bab3,_0xb51fb2)=>{const _0x3b7a70=a0_0x55e4f6,_0x2df543=new DatabasesCommand(),_0xd7a199=program[_0x3b7a70(0x279)](),_0x385ff5=createTDXInstance(_0xd7a199),_0x892ba2=await _0x2df543['run']({'options':{..._0xd7a199,..._0xb51fb2},'args':_0x43bab3?[_0x43bab3]:[],'tdx':_0x385ff5});process[_0x3b7a70(0x1c9)](_0x892ba2);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x25f))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x297))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x275),a0_0x55e4f6(0x253))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x274),a0_0x55e4f6(0x2dd))[a0_0x55e4f6(0x217)]('--temperature\x20<n>',a0_0x55e4f6(0x1aa))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1c0),a0_0x55e4f6(0x238))[a0_0x55e4f6(0x28f)](async(_0x4ad559,_0x319748)=>{const _0x4e5899=a0_0x55e4f6,_0x1696fd=new ChatCommand(),_0x532f6a=program['opts'](),_0x53620a=createTDXInstance(_0x532f6a),_0x2b5d7e=await _0x1696fd[_0x4e5899(0x1a7)]({'options':{..._0x532f6a,..._0x319748},'args':_0x4ad559,'tdx':_0x53620a});process[_0x4e5899(0x1c9)](_0x2b5d7e);});const apiCmd=program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x263))[a0_0x55e4f6(0x2a8)](a0_0x55e4f6(0x271))[a0_0x55e4f6(0x22a)](a0_0x55e4f6(0x202),'\x0aExamples:\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/list\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/show/mydb\x0a\x20\x20$\x20tdx\x20api\x20-X\x20POST\x20--data\x20\x27{\x22query\x22:\x22SELECT\x201\x22}\x27\x20/v3/job/issue/hive/mydb\x0a\x20\x20$\x20tdx\x20api\x20/entities/parent_segments\x20--type\x20cdp\x0a\x20\x20$\x20tdx\x20api\x20/api/workflows\x20--type\x20workflow\x0a')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x29d),a0_0x55e4f6(0x1df),a0_0x55e4f6(0x2af))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2cb),a0_0x55e4f6(0x2c8))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c2),a0_0x55e4f6(0x1f7))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2a0),'Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)',(_0x1202c2,_0x1cd1de)=>{return _0x1cd1de?[..._0x1cd1de,_0x1202c2]:[_0x1202c2];})[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x200),'API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','td')[a0_0x55e4f6(0x28f)](async(_0x3802e0,_0x259fa5)=>{const _0x2cd127=a0_0x55e4f6;if(!_0x3802e0){apiCmd[_0x2cd127(0x2b3)]();return;}const _0x4e756c=new ApiCommand(),_0x215f2a=program['opts'](),_0x67ec71=createTDXInstance(_0x215f2a),_0x5da2bb=await _0x4e756c['run']({'options':{..._0x215f2a,..._0x259fa5},'args':[_0x3802e0],'tdx':_0x67ec71});process['exit'](_0x5da2bb);});program['command'](a0_0x55e4f6(0x1ac))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x295))[a0_0x55e4f6(0x217)]('-d,\x20--database\x20<database>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1cd),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x55e4f6(0x28f)](async(_0x4dbc48,_0x294b4b)=>{const _0x23b77a=a0_0x55e4f6,_0x147b43=new TablesCommand(),_0x29534f=program[_0x23b77a(0x279)](),_0x19572d=createTDXInstance(_0x29534f);_0x294b4b['in']&&(_0x294b4b['database']=_0x294b4b['in']);const _0x237c60=await _0x147b43['run']({'options':{..._0x29534f,..._0x294b4b},'args':_0x4dbc48?[_0x4dbc48]:[],'tdx':_0x19572d});process[_0x23b77a(0x1c9)](_0x237c60);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x29e))[a0_0x55e4f6(0x257)]('Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x270),a0_0x55e4f6(0x1ec))[a0_0x55e4f6(0x217)]('--in\x20<database>',a0_0x55e4f6(0x246))['action'](async(_0x4d1d46,_0x488b71)=>{const _0x26a97a=a0_0x55e4f6,_0x13450a=new ShowCommand(),_0x494d69=program[_0x26a97a(0x279)](),_0x5678ba=createTDXInstance(_0x494d69);_0x488b71['in']&&(_0x488b71[_0x26a97a(0x1e9)]=_0x488b71['in']);const _0x9e1ca0=await _0x13450a[_0x26a97a(0x1a7)]({'options':{..._0x494d69,..._0x488b71},'args':_0x4d1d46?[_0x4d1d46]:[],'tdx':_0x5678ba});process[_0x26a97a(0x1c9)](_0x9e1ca0);}),program[a0_0x55e4f6(0x298)]('describe\x20[table]')[a0_0x55e4f6(0x1b2)]('desc')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x228))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x270),a0_0x55e4f6(0x1ec))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1cd),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')['action'](async(_0x37acd4,_0x8cb953)=>{const _0x5307d2=a0_0x55e4f6,_0x448720=new DescribeCommand(),_0xe8a727=program['opts'](),_0x4e384a=createTDXInstance(_0xe8a727);_0x8cb953['in']&&(_0x8cb953['database']=_0x8cb953['in']);const _0x4bfd17=await _0x448720[_0x5307d2(0x1a7)]({'options':{..._0xe8a727,..._0x8cb953},'args':_0x37acd4?[_0x37acd4]:[],'tdx':_0x4e384a});process['exit'](_0x4bfd17);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1c4))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x285))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x270),'Database\x20to\x20query\x20(default:\x20information_schema)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1cd),a0_0x55e4f6(0x246))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1dd),a0_0x55e4f6(0x1ae))[a0_0x55e4f6(0x217)]('-f,\x20--file\x20<path>',a0_0x55e4f6(0x2bb))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c5),a0_0x55e4f6(0x2e8),'40')[a0_0x55e4f6(0x28f)](async(_0x6d3643,_0x1895f7)=>{const _0x2b1f6b=a0_0x55e4f6,_0x33b9df=new QueryCommand(),_0x2bd8aa=program[_0x2b1f6b(0x279)](),_0x3cdb41=createTDXInstance(_0x2bd8aa);_0x1895f7['in']&&(_0x1895f7[_0x2b1f6b(0x1e9)]=_0x1895f7['in']);const _0xe7911f=await _0x33b9df[_0x2b1f6b(0x1a7)]({'options':{..._0x2bd8aa,..._0x1895f7},'args':_0x6d3643?[_0x6d3643]:[],'tdx':_0x3cdb41});process[_0x2b1f6b(0x1c9)](_0xe7911f);}),program['command']('segments\x20[path]')['description']('List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1d5),a0_0x55e4f6(0x220))['option'](a0_0x55e4f6(0x2d3),'Maximum\x20recursion\x20depth\x20(default:\x2010)','10')[a0_0x55e4f6(0x28f)](async(_0x4b8f14,_0x543c46)=>{const _0x17ceb0=a0_0x55e4f6,_0x563862=new SegmentsCommand(),_0xd4e748=program[_0x17ceb0(0x279)](),_0x3ddb9b=createTDXInstance(_0xd4e748),_0x3f1efe=await _0x563862['run']({'options':{..._0xd4e748,..._0x543c46},'args':_0x4b8f14?[_0x4b8f14]:[],'tdx':_0x3ddb9b});process[_0x17ceb0(0x1c9)](_0x3f1efe);});const segmentCmd=program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1e1))[a0_0x55e4f6(0x257)]('CDP\x20segment\x20management\x20commands');segmentCmd[a0_0x55e4f6(0x298)]('use\x20<path>')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1ee))[a0_0x55e4f6(0x28f)](async(_0x5d9f42,_0x44fb85)=>{const _0x347a18=a0_0x55e4f6,_0x16b548=new SegmentUseCommand(),_0x2ee087=program['opts'](),_0x3aa6d8=createTDXInstance(_0x2ee087),_0x2a9493=await _0x16b548[_0x347a18(0x1a7)]({'options':{..._0x2ee087,..._0x44fb85},'args':[_0x5d9f42],'tdx':_0x3aa6d8});process[_0x347a18(0x1c9)](_0x2a9493);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1d0))[a0_0x55e4f6(0x257)]('Show\x20current\x20segment/folder\x20context')['action'](async _0xccc346=>{const _0x19f713=a0_0x55e4f6,_0x445880=new SegmentPwdCommand(),_0xbaf012=program['opts'](),_0x2f5cbf=createTDXInstance(_0xbaf012),_0x40e0bc=await _0x445880[_0x19f713(0x1a7)]({'options':{..._0xbaf012,..._0xccc346},'args':[],'tdx':_0x2f5cbf});process[_0x19f713(0x1c9)](_0x40e0bc);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1f0))[a0_0x55e4f6(0x1b2)](a0_0x55e4f6(0x264))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1eb))[a0_0x55e4f6(0x28f)](async(_0x37b46c,_0x152a76)=>{const _0x156cf8=a0_0x55e4f6,_0xea8516=new SegmentDescribeCommand(),_0x2d1f87=program[_0x156cf8(0x279)](),_0x480fcc=createTDXInstance(_0x2d1f87),_0x29315d=await _0xea8516[_0x156cf8(0x1a7)]({'options':{..._0x2d1f87,..._0x152a76},'args':[_0x37b46c],'tdx':_0x480fcc});process[_0x156cf8(0x1c9)](_0x29315d);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x19f))['description'](a0_0x55e4f6(0x2eb))[a0_0x55e4f6(0x28f)](async(_0x21dedc,_0x78b3a9)=>{const _0x308aa1=a0_0x55e4f6,_0x44a308=new SegmentShowCommand(),_0x417afa=program[_0x308aa1(0x279)](),_0x4c5b9f=createTDXInstance(_0x417afa),_0x457dc1=await _0x44a308[_0x308aa1(0x1a7)]({'options':{..._0x417afa,..._0x78b3a9},'args':[_0x21dedc],'tdx':_0x4c5b9f});process[_0x308aa1(0x1c9)](_0x457dc1);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1a6))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1d9))['action'](async(_0x283eb3,_0x42e95a)=>{const _0x1c5ee8=a0_0x55e4f6,_0xe3cb00=new SegmentFolderListCommand(),_0x280ac8=program['opts'](),_0x537d54=createTDXInstance(_0x280ac8),_0x21dc54=await _0xe3cb00[_0x1c5ee8(0x1a7)]({'options':{..._0x280ac8,..._0x42e95a},'args':[_0x283eb3],'tdx':_0x537d54});process['exit'](_0x21dc54);});const folderCmd=segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x29c))['description'](a0_0x55e4f6(0x27c));folderCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x208))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1c7))[a0_0x55e4f6(0x28f)](async(_0x36d31b,_0xd0fbec)=>{const _0x477252=a0_0x55e4f6,_0x2dcc80=new SegmentFolderShowCommand(),_0x5788d7=program[_0x477252(0x279)](),_0x55e4f4=createTDXInstance(_0x5788d7),_0xe06736=await _0x2dcc80['run']({'options':{..._0x5788d7,..._0xd0fbec},'args':[_0x36d31b],'tdx':_0x55e4f4});process[_0x477252(0x1c9)](_0xe06736);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x26b))['description'](a0_0x55e4f6(0x23c))['action'](async(_0x106d88,_0x2b5b18)=>{const _0x371539=a0_0x55e4f6,_0x35d495=new SegmentSQLCommand(),_0x2a578e=program[_0x371539(0x279)](),_0x21e77d=createTDXInstance(_0x2a578e),_0x113700=await _0x35d495['run']({'options':{..._0x2a578e,..._0x2b5b18},'args':[_0x106d88],'tdx':_0x21e77d});process[_0x371539(0x1c9)](_0x113700);}),segmentCmd[a0_0x55e4f6(0x298)]('fields\x20<parent_name>')['description'](a0_0x55e4f6(0x255))[a0_0x55e4f6(0x28f)](async(_0x43a0a4,_0x4c4e56)=>{const _0x2e1dc1=a0_0x55e4f6,_0x5cfcf2=new SegmentFieldsCommand(),_0x1dfb00=program[_0x2e1dc1(0x279)](),_0x269948=createTDXInstance(_0x1dfb00),_0x1892ca=await _0x5cfcf2[_0x2e1dc1(0x1a7)]({'options':{..._0x1dfb00,..._0x4c4e56},'args':[_0x43a0a4],'tdx':_0x269948});process[_0x2e1dc1(0x1c9)](_0x1892ca);}),segmentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x219))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x29a))[a0_0x55e4f6(0x217)]('--description\x20<text>',a0_0x55e4f6(0x2dc))[a0_0x55e4f6(0x217)]('--rule\x20<json>',a0_0x55e4f6(0x1bc))[a0_0x55e4f6(0x217)]('--rule-file\x20<file>',a0_0x55e4f6(0x2d6))[a0_0x55e4f6(0x217)]('--folder\x20<name>','Folder\x20name\x20for\x20organization')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2b1),a0_0x55e4f6(0x27f))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1b0),a0_0x55e4f6(0x281))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x248),a0_0x55e4f6(0x1e2))[a0_0x55e4f6(0x28f)](async(_0x3cabb4,_0x4a927c)=>{const _0x5d9604=a0_0x55e4f6,_0x46bafc=new SegmentCreateCommand(),_0x25a48d=program['opts'](),_0x1dff97=createTDXInstance(_0x25a48d),_0x592c3f=await _0x46bafc[_0x5d9604(0x1a7)]({'options':{..._0x25a48d,..._0x4a927c},'args':[_0x3cabb4],'tdx':_0x1dff97});process[_0x5d9604(0x1c9)](_0x592c3f);}),segmentCmd[a0_0x55e4f6(0x298)]('update\x20<segment_name>')['description'](a0_0x55e4f6(0x282))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1a8),a0_0x55e4f6(0x23d))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x266))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2b2),a0_0x55e4f6(0x2a3))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x28c),'Updated\x20filtering\x20rule\x20from\x20JSON\x20file')[a0_0x55e4f6(0x217)]('--folder\x20<name>',a0_0x55e4f6(0x251))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2b1),a0_0x55e4f6(0x27f))['action'](async(_0x2da0e4,_0x199db8)=>{const _0x59fde1=a0_0x55e4f6,_0x5f5491=new SegmentUpdateCommand(),_0x489f26=program[_0x59fde1(0x279)](),_0x3eab4e=createTDXInstance(_0x489f26),_0x3eb04b=await _0x5f5491[_0x59fde1(0x1a7)]({'options':{..._0x489f26,..._0x199db8},'args':[_0x2da0e4],'tdx':_0x3eab4e});process['exit'](_0x3eb04b);});const parentCmd=segmentCmd['command']('parent')[a0_0x55e4f6(0x257)]('Parent\x20segment\x20(audience)\x20management');parentCmd['command'](a0_0x55e4f6(0x1fd))['description'](a0_0x55e4f6(0x2ec))[a0_0x55e4f6(0x22b)](a0_0x55e4f6(0x24e),a0_0x55e4f6(0x1e0))['requiredOption']('--table\x20<table>',a0_0x55e4f6(0x2da))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x2e2))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x252),a0_0x55e4f6(0x2e9))['option']('--schedule-option\x20<value>',a0_0x55e4f6(0x293))['option'](a0_0x55e4f6(0x25b),a0_0x55e4f6(0x1e6))['option'](a0_0x55e4f6(0x1ba),a0_0x55e4f6(0x29f))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1b7),a0_0x55e4f6(0x230))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x272),a0_0x55e4f6(0x203))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x280),a0_0x55e4f6(0x1f6))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x213),'Customer\x20group\x20as\x20JSON\x20string')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x209),'Customer\x20group\x20from\x20JSON\x20file')[a0_0x55e4f6(0x28f)](async(_0x45ea16,_0xd690ae)=>{const _0x29a730=a0_0x55e4f6,_0x26ca33=new ParentSegmentCreateCommand(),_0x41c519=program[_0x29a730(0x279)](),_0x4ae164=createTDXInstance(_0x41c519),_0x3432cc=await _0x26ca33[_0x29a730(0x1a7)]({'options':{..._0x41c519,..._0xd690ae},'args':[_0x45ea16],'tdx':_0x4ae164});process['exit'](_0x3432cc);}),parentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2c7))['description']('Update\x20parent\x20segment\x20(audience)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x266))['option'](a0_0x55e4f6(0x252),'Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x22f),a0_0x55e4f6(0x242))[a0_0x55e4f6(0x217)]('--timezone\x20<tz>',a0_0x55e4f6(0x24f))[a0_0x55e4f6(0x217)]('--add-attributes\x20<json>',a0_0x55e4f6(0x2ab))['option'](a0_0x55e4f6(0x1a0),a0_0x55e4f6(0x2ea))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1d7),a0_0x55e4f6(0x2cd))['option'](a0_0x55e4f6(0x2e5),a0_0x55e4f6(0x267))[a0_0x55e4f6(0x28f)](async(_0x10d18,_0x2facd2)=>{const _0x18c59b=a0_0x55e4f6,_0x3073db=new ParentSegmentUpdateCommand(),_0x20da00=program[_0x18c59b(0x279)](),_0x26bc4a=createTDXInstance(_0x20da00),_0xfbd450=await _0x3073db[_0x18c59b(0x1a7)]({'options':{..._0x20da00,..._0x2facd2},'args':[_0x10d18],'tdx':_0x26bc4a});process[_0x18c59b(0x1c9)](_0xfbd450);}),folderCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x201))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x21b))['option'](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x1ca))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x236),'Parent\x20folder\x20name\x20for\x20nested\x20folders')[a0_0x55e4f6(0x28f)](async(_0x284e36,_0x558932,_0x2821f3)=>{const _0x35234a=a0_0x55e4f6,_0x1eee69=new SegmentFolderCreateCommand(),_0x317b58=program[_0x35234a(0x279)](),_0x3a4d49=createTDXInstance(_0x317b58),_0x463e84=await _0x1eee69[_0x35234a(0x1a7)]({'options':{..._0x317b58,..._0x2821f3},'args':[_0x284e36,_0x558932],'tdx':_0x3a4d49});process[_0x35234a(0x1c9)](_0x463e84);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2b7))['description'](a0_0x55e4f6(0x212))['action'](async(_0x3f2be4,_0x315ebf)=>{const _0x5f5ce2=a0_0x55e4f6,_0x197a7f=new ActivationsCommand(),_0x462273=program['opts'](),_0x196350=createTDXInstance(_0x462273),_0x457b9f=await _0x197a7f[_0x5f5ce2(0x1a7)]({'options':{..._0x462273,..._0x315ebf},'args':[_0x3f2be4],'tdx':_0x196350});process['exit'](_0x457b9f);});const workflowCmd=program['command'](a0_0x55e4f6(0x1c8))['alias']('wf')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2e3));workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2bd))[a0_0x55e4f6(0x257)]('List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)')[a0_0x55e4f6(0x28f)](async(_0x1db941,_0x19a6bc)=>{const _0x30b115=a0_0x55e4f6,_0x198393=new WorkflowProjectsCommand(),_0x3517d3=program[_0x30b115(0x279)](),_0x3c66dc=createTDXInstance(_0x3517d3),_0x45421f=await _0x198393[_0x30b115(0x1a7)]({'options':{..._0x3517d3,..._0x19a6bc},'args':_0x1db941?[_0x1db941]:[],'tdx':_0x3c66dc});process[_0x30b115(0x1c9)](_0x45421f);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1cb))[a0_0x55e4f6(0x1b2)]('ls')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x23f))[a0_0x55e4f6(0x28f)](async(_0x2fb15d,_0xae4435)=>{const _0x5e25c9=a0_0x55e4f6,_0x3cc62d=new WorkflowWorkflowsCommand(),_0x3858d0=program['opts'](),_0x1619e4=createTDXInstance(_0x3858d0),_0x260e7c=await _0x3cc62d['run']({'options':{..._0x3858d0,..._0xae4435},'args':_0x2fb15d?[_0x2fb15d]:[],'tdx':_0x1619e4});process[_0x5e25c9(0x1c9)](_0x260e7c);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x20b))['description'](a0_0x55e4f6(0x1fb))[a0_0x55e4f6(0x217)]('--status\x20<status>',a0_0x55e4f6(0x226))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x273),'Start\x20time\x20filter\x20(ISO\x208601\x20format)')['option'](a0_0x55e4f6(0x25e),'End\x20time\x20filter\x20(ISO\x208601\x20format)')[a0_0x55e4f6(0x28f)](async(_0x584c3a,_0x573995)=>{const _0x12d369=a0_0x55e4f6,_0x5cbe20=new WorkflowSessionsCommand(),_0x1cf8fd=program[_0x12d369(0x279)](),_0x2ed682=createTDXInstance(_0x1cf8fd),_0x3dad5f=await _0x5cbe20[_0x12d369(0x1a7)]({'options':{..._0x1cf8fd,..._0x573995},'args':_0x584c3a?[_0x584c3a]:[],'tdx':_0x2ed682});process[_0x12d369(0x1c9)](_0x3dad5f);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2a5))[a0_0x55e4f6(0x257)]('List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2b6),a0_0x55e4f6(0x2a2))[a0_0x55e4f6(0x28f)](async(_0x204d44,_0x583d12)=>{const _0x5043b0=new WorkflowAttemptsCommand(),_0x4dc582=program['opts'](),_0x18b000=createTDXInstance(_0x4dc582),_0x1d5ee3=await _0x5043b0['run']({'options':{..._0x4dc582,..._0x583d12},'args':_0x204d44?[_0x204d44]:[],'tdx':_0x18b000});process['exit'](_0x1d5ee3);}),workflowCmd[a0_0x55e4f6(0x298)]('attempt\x20<attempt-id>')[a0_0x55e4f6(0x257)]('Show\x20specific\x20attempt\x20details')[a0_0x55e4f6(0x28f)](async(_0x5a7b98,_0x2483cb)=>{const _0x531bbd=a0_0x55e4f6,_0x267930=new WorkflowAttemptCommand(),_0x56c012=program[_0x531bbd(0x279)](),_0x4b6325=createTDXInstance(_0x56c012),_0x19be0b=await _0x267930[_0x531bbd(0x1a7)]({'options':{..._0x56c012,..._0x2483cb},'args':[_0x5a7b98],'tdx':_0x4b6325});process[_0x531bbd(0x1c9)](_0x19be0b);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1a1))['description']('Show\x20tasks\x20for\x20an\x20attempt')['option'](a0_0x55e4f6(0x1db),'Include\x20subtasks\x20in\x20the\x20output')['action'](async(_0x463896,_0x2af076)=>{const _0x4ae409=a0_0x55e4f6,_0x350d50=new WorkflowTasksCommand(),_0x34afa9=program[_0x4ae409(0x279)](),_0x4d25a6=createTDXInstance(_0x34afa9),_0x49838e=await _0x350d50[_0x4ae409(0x1a7)]({'options':{..._0x34afa9,..._0x2af076},'args':[_0x463896],'tdx':_0x4d25a6});process[_0x4ae409(0x1c9)](_0x49838e);}),workflowCmd['command'](a0_0x55e4f6(0x276))[a0_0x55e4f6(0x257)]('Show\x20logs\x20for\x20a\x20specific\x20task')[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1f5),a0_0x55e4f6(0x1bb),_0x8ecd2d=>parseInt(_0x8ecd2d,0xa),0x0)['action'](async(_0x4120a7,_0x50c0d8,_0x3b05d6)=>{const _0x9788a=a0_0x55e4f6,_0x285cb1=new WorkflowLogsCommand(),_0x144e25=program['opts'](),_0xa59296=createTDXInstance(_0x144e25),_0x3ff6e7=await _0x285cb1[_0x9788a(0x1a7)]({'options':{..._0x144e25,..._0x3b05d6},'args':[_0x4120a7,_0x50c0d8],'tdx':_0xa59296});process[_0x9788a(0x1c9)](_0x3ff6e7);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x21d))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2c4))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1cc),'Reason\x20for\x20killing\x20the\x20attempt')[a0_0x55e4f6(0x28f)](async(_0x2327f7,_0x315bfb)=>{const _0x251ebe=a0_0x55e4f6,_0x189b5e=new WorkflowKillCommand(),_0x34ce3f=program[_0x251ebe(0x279)](),_0x13abb6=createTDXInstance(_0x34ce3f),_0x35bb47=await _0x189b5e['run']({'options':{..._0x34ce3f,..._0x315bfb},'args':[_0x2327f7],'tdx':_0x13abb6});process[_0x251ebe(0x1c9)](_0x35bb47);}),workflowCmd['command']('retry\x20<session-id|attempt-id>')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x234))['option'](a0_0x55e4f6(0x2e1),a0_0x55e4f6(0x1c1))['option']('--resume-from\x20<task>',a0_0x55e4f6(0x24c))['option']('--params\x20<json>',a0_0x55e4f6(0x254))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2ca),'Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)')[a0_0x55e4f6(0x28f)](async(_0x38c316,_0x290bc4)=>{const _0x36c024=a0_0x55e4f6,_0x1aecb0=new WorkflowRetryCommand(),_0x2ab654=program['opts'](),_0x3690b6=createTDXInstance(_0x2ab654),_0xc1715c=await _0x1aecb0['run']({'options':{..._0x2ab654,..._0x290bc4},'args':[_0x38c316],'tdx':_0x3690b6});process[_0x36c024(0x1c9)](_0xc1715c);}),workflowCmd['command'](a0_0x55e4f6(0x2e4))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x21e))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x27b),a0_0x55e4f6(0x299))[a0_0x55e4f6(0x28f)](async(_0x2875c5,_0x564da9,_0x8ca175)=>{const _0xacfeb4=a0_0x55e4f6,_0x40fa1a=new WorkflowDownloadCommand(),_0x5893a6=program[_0xacfeb4(0x279)](),_0x5af993=createTDXInstance(_0x5893a6),_0x17061a=await _0x40fa1a[_0xacfeb4(0x1a7)]({'options':{..._0x5893a6,..._0x8ca175},'args':[_0x2875c5,_0x564da9||'.'],'tdx':_0x5af993});process[_0xacfeb4(0x1c9)](_0x17061a);}),workflowCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2be))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x232))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x250),'Override\x20project\x20name')[a0_0x55e4f6(0x217)]('--revision\x20<revision>',a0_0x55e4f6(0x294))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1d4),a0_0x55e4f6(0x24b))[a0_0x55e4f6(0x28f)](async(_0x285374,_0x272846)=>{const _0x52540f=a0_0x55e4f6,_0x35e7b6=new WorkflowPushCommand(),_0x4061aa=program[_0x52540f(0x279)](),_0x3c3be3=createTDXInstance(_0x4061aa),_0x36c85=await _0x35e7b6[_0x52540f(0x1a7)]({'options':{..._0x4061aa,..._0x272846},'args':_0x285374?[_0x285374]:[],'tdx':_0x3c3be3});process[_0x52540f(0x1c9)](_0x36c85);}),workflowCmd[a0_0x55e4f6(0x298)]('delete\x20<project-name-or-id>')['description']('Delete\x20workflow\x20project\x20from\x20Treasure\x20Data')[a0_0x55e4f6(0x28f)](async(_0x74a59f,_0x144e6d)=>{const _0x2ba9a4=a0_0x55e4f6,_0x412b44=new WorkflowDeleteCommand(),_0xd6e61c=program[_0x2ba9a4(0x279)](),_0x317d09=createTDXInstance(_0xd6e61c),_0x112aca=await _0x412b44[_0x2ba9a4(0x1a7)]({'options':{..._0xd6e61c,..._0x144e6d},'args':[_0x74a59f],'tdx':_0x317d09});process[_0x2ba9a4(0x1c9)](_0x112aca);}),program[a0_0x55e4f6(0x298)]('jobs')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x26c))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1ff),a0_0x55e4f6(0x28e))[a0_0x55e4f6(0x28f)](async _0x43d1eb=>{const _0x3a41d0=a0_0x55e4f6,_0x28b438=new JobListCommand(),_0x468210=program[_0x3a41d0(0x279)](),_0x199564=createTDXInstance(_0x468210),_0x1ba1d2=await _0x28b438[_0x3a41d0(0x1a7)]({'options':{..._0x468210,..._0x43d1eb},'args':[],'tdx':_0x199564});process[_0x3a41d0(0x1c9)](_0x1ba1d2);});const jobCmd=program['command']('job')[a0_0x55e4f6(0x257)]('Job\x20management\x20commands');jobCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x205))[a0_0x55e4f6(0x257)]('Show\x20job\x20details')[a0_0x55e4f6(0x28f)](async(_0x493747,_0x350e29)=>{const _0x1f98eb=a0_0x55e4f6,_0x1b428a=new JobShowCommand(),_0x39d363=program['opts'](),_0xc9630e=createTDXInstance(_0x39d363),_0x7e2035=await _0x1b428a[_0x1f98eb(0x1a7)]({'options':{..._0x39d363,..._0x350e29},'args':[_0x493747],'tdx':_0xc9630e});process[_0x1f98eb(0x1c9)](_0x7e2035);}),jobCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x284))[a0_0x55e4f6(0x257)]('Kill\x20a\x20job')['action'](async(_0x4f3942,_0x30737a)=>{const _0x117f9a=a0_0x55e4f6,_0x18a138=new JobKillCommand(),_0x4663af=program[_0x117f9a(0x279)](),_0xcb2c38=createTDXInstance(_0x4663af),_0x3d08d1=await _0x18a138[_0x117f9a(0x1a7)]({'options':{..._0x4663af,..._0x30737a},'args':[_0x4f3942],'tdx':_0xcb2c38});process[_0x117f9a(0x1c9)](_0x3d08d1);}),jobCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2a6))[a0_0x55e4f6(0x257)]('Submit\x20a\x20job')['option'](a0_0x55e4f6(0x1ed),a0_0x55e4f6(0x1fe),a0_0x55e4f6(0x2ae))['option'](a0_0x55e4f6(0x2c2),a0_0x55e4f6(0x2c0))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2a1),'Database\x20name\x20(default:\x20information_schema)',a0_0x55e4f6(0x204))['action'](async(_0x269cd9,_0x1c423d)=>{const _0x54c341=a0_0x55e4f6,_0x43276d=new JobSubmitCommand(),_0x41d993=program[_0x54c341(0x279)](),_0x20d3fe=createTDXInstance(_0x41d993),_0x47e468=await _0x43276d[_0x54c341(0x1a7)]({'options':{..._0x41d993,..._0x1c423d},'args':_0x269cd9?[_0x269cd9]:[],'tdx':_0x20d3fe});process[_0x54c341(0x1c9)](_0x47e468);}),jobCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x207))[a0_0x55e4f6(0x257)]('Get\x20job\x20results')[a0_0x55e4f6(0x28f)](async(_0x1959a2,_0x4958b9)=>{const _0x3092d8=a0_0x55e4f6,_0x155e00=new JobResultCommand(),_0x158bf1=program['opts'](),_0x5a56fe=createTDXInstance(_0x158bf1),_0x311c87=await _0x155e00['run']({'options':{..._0x158bf1,..._0x4958b9},'args':[_0x1959a2],'tdx':_0x5a56fe});process[_0x3092d8(0x1c9)](_0x311c87);});const llmCmd=program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x20f))['description'](a0_0x55e4f6(0x218));llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1da))['description'](a0_0x55e4f6(0x2c9))[a0_0x55e4f6(0x28f)](async(_0x356e43,_0x589a7e)=>{const _0x3cb777=a0_0x55e4f6,_0x516f81=new LLMUseCommand(),_0x1567fe=program[_0x3cb777(0x279)](),_0x52feb0=createTDXInstance(_0x1567fe),_0x58de44=await _0x516f81[_0x3cb777(0x1a7)]({'options':{..._0x1567fe,..._0x589a7e},'args':[_0x356e43],'tdx':_0x52feb0});process[_0x3cb777(0x1c9)](_0x58de44);}),llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1c5))['description'](a0_0x55e4f6(0x1c3))[a0_0x55e4f6(0x28f)](async _0x472644=>{const _0x2a591b=a0_0x55e4f6,_0x16e9b4=new LLMModelsCommand(),_0x3782d7=program[_0x2a591b(0x279)](),_0x12a7a8=createTDXInstance(_0x3782d7),_0x57e9da=await _0x16e9b4[_0x2a591b(0x1a7)]({'options':{..._0x3782d7,..._0x472644},'args':[],'tdx':_0x12a7a8});process[_0x2a591b(0x1c9)](_0x57e9da);}),llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2bd))['description'](a0_0x55e4f6(0x287))['action'](async(_0x131447,_0xc7ac26)=>{const _0x5f2982=a0_0x55e4f6,_0x3c84c3=new LLMProjectsCommand(),_0xf37809=program['opts'](),_0x536696=createTDXInstance(_0xf37809),_0x26af6a=await _0x3c84c3[_0x5f2982(0x1a7)]({'options':{..._0xf37809,..._0xc7ac26},'args':_0x131447?[_0x131447]:[],'tdx':_0x536696});process[_0x5f2982(0x1c9)](_0x26af6a);});const projectCmd=llmCmd['command']('project')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x292));projectCmd['command'](a0_0x55e4f6(0x1fd))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1d6))['option'](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x1f1))[a0_0x55e4f6(0x28f)](async(_0x43f188,_0x43fbfb)=>{const _0x48f8a4=a0_0x55e4f6,_0x48bd70=new LLMProjectCreateCommand(),_0x1550d=program['opts'](),_0x554cf8=createTDXInstance(_0x1550d),_0x1b7115=await _0x48bd70[_0x48f8a4(0x1a7)]({'options':{..._0x1550d,..._0x43fbfb},'args':[_0x43f188],'tdx':_0x554cf8});process[_0x48f8a4(0x1c9)](_0x1b7115);}),projectCmd['command'](a0_0x55e4f6(0x269))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x222))[a0_0x55e4f6(0x28f)](async(_0xc8bc08,_0xc0b0e3)=>{const _0x4767d4=a0_0x55e4f6,_0x1719cc=new LLMProjectDeleteCommand(),_0x170c88=program[_0x4767d4(0x279)](),_0x2a25ad=createTDXInstance(_0x170c88),_0x11b34e=await _0x1719cc[_0x4767d4(0x1a7)]({'options':{..._0x170c88,..._0xc0b0e3},'args':[_0xc8bc08],'tdx':_0x2a25ad});process[_0x4767d4(0x1c9)](_0x11b34e);}),llmCmd['command']('agents\x20[pattern]')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2d7))[a0_0x55e4f6(0x28f)](async(_0x10fd78,_0x1354bc)=>{const _0x4a36d6=a0_0x55e4f6,_0x44edc2=new LLMAgentsCommand(),_0x360f93=program[_0x4a36d6(0x279)](),_0xd7ff79=createTDXInstance(_0x360f93),_0x2ff7a9=await _0x44edc2['run']({'options':{..._0x360f93,..._0x1354bc},'args':_0x10fd78?[_0x10fd78]:[],'tdx':_0xd7ff79});process['exit'](_0x2ff7a9);});const agentCmd=llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x25a))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x20c));agentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1b6))['description'](a0_0x55e4f6(0x20a))[a0_0x55e4f6(0x28f)](async(_0x3394e0,_0x1c01b8)=>{const _0x32b49e=a0_0x55e4f6,_0x3dba21=new LLMAgentShowCommand(),_0x5ddcfa=program[_0x32b49e(0x279)](),_0x25cc88=createTDXInstance(_0x5ddcfa),_0x130abd=await _0x3dba21[_0x32b49e(0x1a7)]({'options':{..._0x5ddcfa,..._0x1c01b8},'args':[_0x3394e0],'tdx':_0x25cc88});process[_0x32b49e(0x1c9)](_0x130abd);}),agentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1fd))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2ce))['option'](a0_0x55e4f6(0x1be),a0_0x55e4f6(0x1ea))['option'](a0_0x55e4f6(0x274),a0_0x55e4f6(0x243),a0_0x55e4f6(0x1f3))[a0_0x55e4f6(0x217)]('--starter-message\x20<text>',a0_0x55e4f6(0x27e))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x262),a0_0x55e4f6(0x1d3),'4')[a0_0x55e4f6(0x217)]('--temperature\x20<n>',a0_0x55e4f6(0x1aa),'0.7')['action'](async(_0xfbf2c6,_0x1f2416)=>{const _0x279d90=a0_0x55e4f6,_0x56435a=new LLMAgentCreateCommand(),_0x22c298=program[_0x279d90(0x279)](),_0xc80673=createTDXInstance(_0x22c298),_0x40f6df=await _0x56435a['run']({'options':{..._0x22c298,..._0x1f2416},'args':[_0xfbf2c6],'tdx':_0xc80673});process[_0x279d90(0x1c9)](_0x40f6df);}),agentCmd[a0_0x55e4f6(0x298)]('update\x20<agent-name>')['description'](a0_0x55e4f6(0x2a9))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x260),a0_0x55e4f6(0x1b9))['option'](a0_0x55e4f6(0x277),a0_0x55e4f6(0x1f8))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2c6),a0_0x55e4f6(0x29b))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x1e3),a0_0x55e4f6(0x27e))[a0_0x55e4f6(0x28f)](async(_0x56fdeb,_0x565fd2)=>{const _0x2c4fdb=a0_0x55e4f6,_0x2c5505=new LLMAgentUpdateCommand(),_0x158ced=program[_0x2c4fdb(0x279)](),_0x23a520=createTDXInstance(_0x158ced),_0x372e20=await _0x2c5505[_0x2c4fdb(0x1a7)]({'options':{..._0x158ced,..._0x565fd2},'args':[_0x56fdeb],'tdx':_0x23a520});process[_0x2c4fdb(0x1c9)](_0x372e20);}),agentCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x2d2))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x25c))[a0_0x55e4f6(0x28f)](async(_0x4cd2e5,_0x306ae8)=>{const _0x8f96c0=a0_0x55e4f6,_0x16b3e1=new LLMAgentDeleteCommand(),_0xd3cc24=program['opts'](),_0x40fc40=createTDXInstance(_0xd3cc24),_0x25eed6=await _0x16b3e1['run']({'options':{..._0xd3cc24,..._0x306ae8},'args':[_0x4cd2e5],'tdx':_0x40fc40});process[_0x8f96c0(0x1c9)](_0x25eed6);}),llmCmd['command'](a0_0x55e4f6(0x229))[a0_0x55e4f6(0x257)]('Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)')['option'](a0_0x55e4f6(0x268),a0_0x55e4f6(0x223))[a0_0x55e4f6(0x28f)](async(_0x469068,_0x17673f)=>{const _0x1afa8b=a0_0x55e4f6,_0xe4acf=new LLMHistoryCommand(),_0x334a8a=program[_0x1afa8b(0x279)](),_0x24ccce=createTDXInstance(_0x334a8a),_0x4e5a9d=await _0xe4acf[_0x1afa8b(0x1a7)]({'options':{..._0x334a8a,..._0x17673f},'args':_0x469068?[_0x469068]:[],'tdx':_0x24ccce});process[_0x1afa8b(0x1c9)](_0x4e5a9d);}),llmCmd[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x1d1))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x224))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x2e0),a0_0x55e4f6(0x1f2),a0_0x55e4f6(0x216))['option']('--project\x20<name>',a0_0x55e4f6(0x28d))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x28b),a0_0x55e4f6(0x2d5))[a0_0x55e4f6(0x28f)](async _0xbaa1de=>{const _0x4ddc50=a0_0x55e4f6,_0x268a9a=new LLMProxyCommand(),_0x51000f=program[_0x4ddc50(0x279)](),_0x4b4f5a=createTDXInstance(_0x51000f),_0x3ed567={..._0xbaa1de,'port':_0xbaa1de[_0x4ddc50(0x2bf)]?parseInt(_0xbaa1de['port'],0xa):undefined},_0x3e4112=await _0x268a9a[_0x4ddc50(0x1a7)]({'options':{..._0x51000f,..._0x3ed567},'args':[],'tdx':_0x4b4f5a});process[_0x4ddc50(0x1c9)](_0x3e4112);}),program[a0_0x55e4f6(0x298)](a0_0x55e4f6(0x26f))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x1e5))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x274),a0_0x55e4f6(0x21c),a0_0x55e4f6(0x261))['allowUnknownOption']()[a0_0x55e4f6(0x1a2)](!![])[a0_0x55e4f6(0x28f)](async(_0x478c67,_0x1a4be9)=>{const _0x47a867=a0_0x55e4f6,_0x4a2844=new ClaudeCommand(),_0xfab7fa=program['opts'](),_0x2384fc=createTDXInstance(_0xfab7fa),_0x51d1d3=Array[_0x47a867(0x2bc)](_0x478c67)?_0x478c67:[],_0x200876=await _0x4a2844[_0x47a867(0x1a7)]({'options':{..._0xfab7fa,..._0x1a4be9},'args':_0x51d1d3,'tdx':_0x2384fc});process[_0x47a867(0x1c9)](_0x200876);}),program['command'](a0_0x55e4f6(0x1a4))[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x2c1))[a0_0x55e4f6(0x217)](a0_0x55e4f6(0x22d),'Clear\x20session\x20context')[a0_0x55e4f6(0x28f)](async _0x292ed6=>{const _0x13a899=a0_0x55e4f6,_0x489231=new ContextCommand(),_0x59d8da=program['opts'](),_0x1cf066=await _0x489231[_0x13a899(0x1a7)]({'options':{..._0x59d8da,..._0x292ed6},'args':[],'tdx':null});process[_0x13a899(0x1c9)](_0x1cf066);}),program['command']('use\x20[resource]\x20[value]')[a0_0x55e4f6(0x257)](a0_0x55e4f6(0x249))[a0_0x55e4f6(0x28f)](async(_0x36002a,_0x146915,_0x1fb5a7)=>{const _0x2e7197=a0_0x55e4f6,_0x3c5579=new UseCommand(),_0x40af07=program['opts'](),_0x1a831a=[];if(_0x36002a)_0x1a831a[_0x2e7197(0x2b8)](_0x36002a);if(_0x146915)_0x1a831a[_0x2e7197(0x2b8)](_0x146915);const _0x2babcb=await _0x3c5579[_0x2e7197(0x1a7)]({'options':{..._0x40af07,..._0x1fb5a7},'args':_0x1a831a,'tdx':null});process['exit'](_0x2babcb);}),program['command'](a0_0x55e4f6(0x1ef))['description'](a0_0x55e4f6(0x26a))[a0_0x55e4f6(0x28f)](async _0x5b276d=>{const _0x3b2d72=a0_0x55e4f6,_0x418bce=new ProfilesCommand(),_0x15d2df=program[_0x3b2d72(0x279)](),_0x404bb1=await _0x418bce['run']({'options':{..._0x15d2df,..._0x5b276d},'args':[],'tdx':null});process[_0x3b2d72(0x1c9)](_0x404bb1);}),program['parse'](process[a0_0x55e4f6(0x237)]);!process[a0_0x55e4f6(0x237)][a0_0x55e4f6(0x2d9)](0x2)[a0_0x55e4f6(0x231)]&&program[a0_0x55e4f6(0x2b9)]();const currentVersion=packageJson['version'];process['stderr']['isTTY']&&process[a0_0x55e4f6(0x237)][a0_0x55e4f6(0x231)]>0x2&&!currentVersion[a0_0x55e4f6(0x26e)](a0_0x55e4f6(0x1a3))&&checkForUpdate(currentVersion)['then'](_0x45b02a=>{_0x45b02a&&displayUpdateNotification(_0x45b02a);})[a0_0x55e4f6(0x1fc)](()=>{});
|
|
2
|
+
const a0_0x29b596=a0_0x10c7;(function(_0x479197,_0x46c080){const _0x16963c=a0_0x10c7,_0x33a68f=_0x479197();while(!![]){try{const _0x1e2dc2=-parseInt(_0x16963c(0x1e4))/0x1*(-parseInt(_0x16963c(0x198))/0x2)+parseInt(_0x16963c(0x18e))/0x3+parseInt(_0x16963c(0x18b))/0x4*(-parseInt(_0x16963c(0x1cd))/0x5)+-parseInt(_0x16963c(0x10e))/0x6+parseInt(_0x16963c(0x194))/0x7*(parseInt(_0x16963c(0x1fd))/0x8)+-parseInt(_0x16963c(0x220))/0x9*(parseInt(_0x16963c(0x1c6))/0xa)+parseInt(_0x16963c(0x142))/0xb;if(_0x1e2dc2===_0x46c080)break;else _0x33a68f['push'](_0x33a68f['shift']());}catch(_0x257b9f){_0x33a68f['push'](_0x33a68f['shift']());}}}(a0_0x3ba6,0x8258f));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{LogLevel}from'./utils/tdx-logger.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';function a0_0x10c7(_0xfb1a74,_0x5ce63c){const _0x3ba63e=a0_0x3ba6();return a0_0x10c7=function(_0x10c7d1,_0x3ae8d4){_0x10c7d1=_0x10c7d1-0x106;let _0x249b41=_0x3ba63e[_0x10c7d1];return _0x249b41;},a0_0x10c7(_0xfb1a74,_0x5ce63c);}import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';import{SegmentFieldsCommand}from'./commands/segment-fields-command.js';import{ParentSegmentCreateCommand,ParentSegmentUpdateCommand}from'./commands/parent-segment-command.js';import{SegmentCreateCommand}from'./commands/segment-create-command.js';import{SegmentUpdateCommand}from'./commands/segment-update-command.js';import{SegmentUseCommand}from'./commands/segment-use-command.js';import{SegmentPwdCommand}from'./commands/segment-pwd-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';function a0_0x3ba6(){const _0x24d1f0=['segments\x20[path]','Enable\x20verbose\x20logging','hook','List\x20jobs','parse','Start\x20a\x20new\x20chat\x20session','--format\x20<format>','150fGlhhe','--starter-message\x20<text>','Customer\x20group\x20from\x20JSON\x20file','profiles','required','show\x20<segment_name>','-y,\x20--yes','490JCnZUT','allowExcessArguments','describe\x20<segment_name>','--attributes-file\x20<file>','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','agents\x20[pattern]','tables\x20[pattern]','Model\x20type\x20(default:\x20claude-4.5-sonnet)','Agent\x20name','kill\x20<job-id>','command','Start\x20time\x20filter\x20(ISO\x208601\x20format)','--no-count-population','Clear\x20session\x20context','Job\x20management\x20commands','Show\x20job\x20details','Commands:','.dev','Arguments:','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','api\x20[endpoint]','--add-attributes-file\x20<file>','34489OhNFGd','Master\x20database\x20name','activations\x20<segment_name>','--limit\x20<rows>','--catalog\x20<catalog>','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','--schedule-option\x20<value>','Enable\x20debug\x20logging\x20(shows\x20HTTP\x20requests/responses)','Update\x20an\x20existing\x20agent','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','claude-4.5-sonnet','delete\x20<name>','push\x20[project-name-or-dir]','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','json','tasks\x20<attempt-id>','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','submit\x20[query]','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','name','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Include\x20retried\x20attempts','--project\x20<name>','Run\x20Trino\x20query\x20with\x20streaming\x20results','1096QHcLjX','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Add\x20attributes\x20from\x20JSON\x20file','-d,\x20--database\x20<database>','--revision\x20<revision>','us01','--to\x20<timestamp>','Behaviors\x20as\x20JSON\x20string','Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)','Starter\x20message','List\x20available\x20fields\x20for\x20segmentation','\x20-\x20built\x20','aliases','workflow','--add-attributes\x20<json>','Enable\x20trace\x20logging\x20(ultra-verbose,\x20all\x20internal\x20operations)','--in\x20<name>','--version','optionTerm','utf-8',',\x20version\x20','Parent\x20segment\x20description','Temperature\x20(0.0-2.0,\x20default:\x200.7)','run','-f,\x20--file\x20<path>','show\x20<agent-name>','argumentTerm','--model\x20<name>','--customer-group\x20<json>','attempt\x20<attempt-id>','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','trino','join','agent','591912qSdXhF','--add-behaviors-file\x20<file>','Alias\x20for\x20--database\x20(natural\x20language\x20style)','Show\x20logs\x20for\x20a\x20specific\x20task','length','--offset\x20<number>','--add-behaviors\x20<json>','injectIntoOptions','--trace','help','result\x20<job-id>','slice','--jsonl','create\x20<segment_name>','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)','Updated\x20schedule\x20option','--attributes\x20<json>','options','--timeout\x20<seconds>','--tsv','--skip-validation','fields\x20<parent_name>','Show\x20current\x20segment/folder\x20context','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','logs\x20<attempt-id>\x20<task-name>','Agent\x20prompt/instructions','database','--rule-file\x20<file>','List\x20workflows\x20(optionally\x20filtered\x20by\x20project)','\x0aExamples:\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/list\x0a\x20\x20$\x20tdx\x20api\x20/v3/database/show/mydb\x0a\x20\x20$\x20tdx\x20api\x20-X\x20POST\x20--data\x20\x27{\x22query\x22:\x22SELECT\x201\x22}\x27\x20/v3/job/issue/hive/mydb\x0a\x20\x20$\x20tdx\x20api\x20/entities/parent_segments\x20--type\x20cdp\x0a\x20\x20$\x20tdx\x20api\x20/api/workflows\x20--type\x20workflow\x0a','New\x20segment\x20name','subcommandDescription','use\x20<path>','Segment\x20folder\x20management','filter','build-info.json','Database\x20name\x20(default:\x20information_schema)','--include-retried','--in\x20<database>','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','segment','--description\x20<text>','Attributes\x20as\x20JSON\x20string','--system-prompt\x20<text>','projects\x20[pattern]','Skip\x20population\x20counting','delete\x20<agent-name>','Reason\x20for\x20killing\x20the\x20attempt','Segment\x20description','Show\x20agent\x20details','Revision\x20name\x20(default:\x20timestamp)','--schedule-type\x20<type>','tdx\x20','3914142hQWkpK','apiKey','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','Show\x20current\x20resolved\x20context\x20(use\x20--debug\x20to\x20show\x20sources)','--customer-group-file\x20<file>','Filtering\x20rule\x20from\x20JSON\x20file','site','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','--agent\x20<name>','use\x20[resource]\x20[value]','LLM\x20project\x20to\x20use\x20(overrides\x20context)','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','List\x20folders\x20and\x20segments\x20at\x20path\x20or\x20in\x20current\x20context','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','--force','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','action','Model\x20name\x20(default:\x20claude-4.5-sonnet)','--llm-project\x20<name>','jobs','Behaviors\x20from\x20JSON\x20file','outputHelp','Updated\x20description','exit','addHelpText','isArray','opts','Skip\x20validation\x20of\x20.dig\x20files','Agent\x20description','folder','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','Show\x20specific\x20attempt\x20details','hidden','Maximum\x20recursion\x20depth\x20(default:\x2010)','--params\x20<json>','--no-color','Skip\x20confirmation\x20prompts','Create\x20segment\x20folder','desc','AI-native\x20CLI\x20for\x20Treasure\x20Data','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','preAction','Project\x20description','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','System\x20prompt/instructions\x20(default:\x20empty)','Trino\x20catalog\x20(default:\x20td)','List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','0.7','--table\x20<table>','--max-tool-iterations\x20<n>','Read\x20SQL\x20query\x20from\x20file','9675457BBaubn','debug','map','List\x20recursively\x20(show\x20full\x20hierarchy\x20tree)','requiredOption','update\x20<agent-name>','url','Save\x20output\x20to\x20file','argv','parent','Create\x20a\x20new\x20LLM\x20project','Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)','--dry-run','Make\x20segment\x20invisible\x20(default:\x20visible)','--kind\x20<type>','commandDescription','after','version','Options:','commands','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','--debug','claude\x20[args...]','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Read\x20request\x20body\x20from\x20file','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','create\x20<parent_name>\x20<folder_name>','GET','includes','-H,\x20--header\x20<header>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','pwd','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','-v,\x20--verbose','show\x20<folder_ref>','Set\x20operation\x20timeout\x20in\x20seconds','padWidth','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy\x20(use\x20--\x20to\x20pass\x20options\x20to\x20Claude\x20Code)','Parent\x20segment\x20(audience)\x20management','tsv','Kill\x20a\x20job','proxy','subcommandTerm','--max-depth\x20<depth>','Specific\x20revision\x20to\x20download\x20(default:\x20latest)','--data\x20<data>','--rule\x20<json>','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','TRACE','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration\x20(use\x20global\x20--debug/--trace\x20for\x20logging)','context','--from\x20<timestamp>','gitRevision','attempts\x20[project]','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','history\x20[chat-id]','Update\x20child\x20segment\x20(use\x20parent_name/child_name)','describe\x20[table]','databases\x20[pattern]','Filtering\x20rule\x20as\x20JSON\x20string','Describe\x20table\x20schema','../package.json','Customer\x20group\x20as\x20JSON\x20string','logLevel','--include-subtasks','jsonl','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','Starting\x20offset\x20for\x20logs\x20(default:\x200)','Move\x20to\x20folder','Create\x20parent\x20segment\x20(audience)','680yWiNVn','--from-task\x20<task>','Submit\x20a\x20job','2867229AZtSPQ','--database\x20<name>','Attributes\x20from\x20JSON\x20file','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','--invisible','chat\x20[message...]','16331mOuiXo','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','llm','Parent\x20folder\x20name\x20for\x20nested\x20folders','2tfSpOm','allowUnknownOption','port','commandUsage','--temperature\x20<n>','--status\x20<status>','End\x20time\x20filter\x20(ISO\x208601\x20format)','format','Master\x20table\x20name','retry\x20<session-id|attempt-id>','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','models','then','trace','push','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','Updated\x20timezone','Add\x20behaviors\x20as\x20JSON\x20string','--site\x20<site>','--prompt\x20<text>','folders\x20<parent_name>','--limit\x20<number>','option','Preview\x20operation\x20without\x20executing','List\x20available\x20LLM\x20models','List\x20all\x20available\x20profiles','Request\x20body\x20as\x20JSON\x20string','description','create\x20<name>','Add\x20behaviors\x20from\x20JSON\x20file','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','Maximum\x20tool\x20iterations\x20(default:\x204)','Folder\x20description','Add\x20attributes\x20as\x20JSON\x20string','--behaviors\x20<json>','4000','configureHelp','alias','--folder\x20<name>'];a0_0x3ba6=function(){return _0x24d1f0;};return a0_0x3ba6();}import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';import{checkForUpdate,displayUpdateNotification}from'./utils/version-check.js';const __filename=fileURLToPath(import.meta[a0_0x29b596(0x148)]),__dirname=dirname(__filename),packageJson=JSON['parse'](readFileSync(join(__dirname,a0_0x29b596(0x182)),'utf-8'));let buildInfo={};try{buildInfo=JSON[a0_0x29b596(0x1c3)](readFileSync(join(__dirname,a0_0x29b596(0x243)),a0_0x29b596(0x211)));}catch{}if(process[a0_0x29b596(0x14a)][a0_0x29b596(0x15f)](a0_0x29b596(0x20f))){let versionOutput=a0_0x29b596(0x10d)+packageJson[a0_0x29b596(0x153)];buildInfo[a0_0x29b596(0x179)]&&(versionOutput+='\x20('+buildInfo[a0_0x29b596(0x179)]+')'),buildInfo['buildTime']&&(versionOutput+=a0_0x29b596(0x209)+buildInfo['buildTime']),console['log'](versionOutput),process[a0_0x29b596(0x125)](0x0);}const program=new Command();let description=a0_0x29b596(0x135);buildInfo[a0_0x29b596(0x179)]?description+=a0_0x29b596(0x212)+packageJson['version']+'\x20('+buildInfo[a0_0x29b596(0x179)]+')':description+=a0_0x29b596(0x212)+packageJson[a0_0x29b596(0x153)];program[a0_0x29b596(0x1f8)]('tdx')[a0_0x29b596(0x1b3)](description),program[a0_0x29b596(0x1ae)](a0_0x29b596(0x1aa),'TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02;\x20aliases:\x20us,\x20jp,\x20aws)',a0_0x29b596(0x203))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1c5),a0_0x29b596(0x14d))[a0_0x29b596(0x1ae)]('--json',a0_0x29b596(0x1ea))[a0_0x29b596(0x1ae)](a0_0x29b596(0x22c),a0_0x29b596(0x1d1))[a0_0x29b596(0x1ae)](a0_0x29b596(0x233),a0_0x29b596(0x11b))[a0_0x29b596(0x1ae)]('--output\x20<file>',a0_0x29b596(0x149))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1ad),'Maximum\x20number\x20of\x20items\x20to\x20return\x20(default\x20varies\x20by\x20command)')[a0_0x29b596(0x1ae)]('--color',a0_0x29b596(0x12c),![])['option'](a0_0x29b596(0x131),a0_0x29b596(0x1e9),![])[a0_0x29b596(0x1ae)](a0_0x29b596(0x166),a0_0x29b596(0x1c0),![])[a0_0x29b596(0x1ae)](a0_0x29b596(0x157),a0_0x29b596(0x1ec))['option'](a0_0x29b596(0x228),a0_0x29b596(0x20d))[a0_0x29b596(0x1ae)](a0_0x29b596(0x232),a0_0x29b596(0x168),'30')[a0_0x29b596(0x1ae)](a0_0x29b596(0x14e),a0_0x29b596(0x1af),![])[a0_0x29b596(0x1ae)](a0_0x29b596(0x1cc),a0_0x29b596(0x132),![])[a0_0x29b596(0x1ae)]('--session\x20<id>','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)')[a0_0x29b596(0x1ae)]('--profile\x20<name>','Profile\x20to\x20use\x20(overrides\x20active\x20profile)')['option']('-d,\x20--database\x20<name>','Database\x20to\x20use\x20(overrides\x20context)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x20e),a0_0x29b596(0x222))[a0_0x29b596(0x1ae)]('--parent-segment\x20<name>','Parent\x20segment\x20to\x20use\x20(overrides\x20context)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x120),a0_0x29b596(0x118)),program[a0_0x29b596(0x1bc)]({'formatHelp':(_0x4ba951,_0x302cbe)=>{const _0x5e697c=a0_0x29b596,_0x30b2c6=_0x302cbe[_0x5e697c(0x169)](_0x4ba951,_0x302cbe),_0x3ca235=0x2,_0x1abf31=0x2;function _0x9a6aba(_0x471525){const _0x340431=_0x5e697c;return!!_0x471525[_0x340431(0x12e)];}function _0x234888(_0x420ec5,_0x1c5ba3){if(_0x1c5ba3){const _0x49a4b5=''+_0x420ec5['padEnd'](_0x30b2c6+_0x1abf31)+_0x1c5ba3;return _0x49a4b5;}return _0x420ec5;}function _0x2f85d9(_0x5c85e4){const _0x24ab71=_0x5e697c;return _0x5c85e4[_0x24ab71(0x21e)]('\x0a')['replace'](/^/gm,'\x20'['repeat'](_0x3ca235));}const _0x5c5122=[];_0x5c5122[_0x5e697c(0x1a6)]('Usage:\x20'+_0x302cbe[_0x5e697c(0x19b)](_0x4ba951));const _0xd3da6d=_0x302cbe[_0x5e697c(0x151)](_0x4ba951);_0xd3da6d&&(_0x5c5122['push'](''),_0x5c5122['push'](_0xd3da6d));const _0x3b47d7=_0x4ba951[_0x5e697c(0x155)]['filter'](_0x5f267d=>!_0x9a6aba(_0x5f267d));if(_0x3b47d7[_0x5e697c(0x224)]>0x0){const _0x2be782=_0x3b47d7['map'](_0x5bada9=>{const _0xafed6e=_0x5e697c,_0x12ffb9=_0x302cbe[_0xafed6e(0x16f)](_0x5bada9),_0x3e4ae7=_0x302cbe[_0xafed6e(0x23f)](_0x5bada9);return _0x234888(_0x12ffb9,_0x3e4ae7);});_0x5c5122[_0x5e697c(0x1a6)](''),_0x5c5122[_0x5e697c(0x1a6)](_0x5e697c(0x1dd)),_0x5c5122['push'](_0x2f85d9(_0x2be782));}const _0x4c617f=_0x4ba951[_0x5e697c(0x231)][_0x5e697c(0x242)](_0x3786ea=>!_0x9a6aba(_0x3786ea));if(_0x4c617f[_0x5e697c(0x224)]>0x0){const _0x3ce154=_0x4c617f['map'](_0x2d7b97=>{const _0x2a45ab=_0x5e697c,_0x56900d=_0x302cbe[_0x2a45ab(0x210)](_0x2d7b97),_0x3affd3=_0x302cbe['optionDescription'](_0x2d7b97);return _0x234888(_0x56900d,_0x3affd3);});_0x5c5122[_0x5e697c(0x1a6)](''),_0x5c5122['push'](_0x5e697c(0x154)),_0x5c5122['push'](_0x2f85d9(_0x3ce154));}const _0x5dee30=(_0x4ba951['registeredArguments']||[])['filter'](_0x313bd1=>!_0x9a6aba(_0x313bd1));if(_0x5dee30[_0x5e697c(0x224)]>0x0){const _0x4f2045=_0x5dee30[_0x5e697c(0x144)](_0x1441d8=>{const _0x293b72=_0x5e697c,_0x2560ee=_0x302cbe[_0x293b72(0x218)](_0x1441d8),_0x372c98=_0x302cbe['argumentDescription'](_0x1441d8);return _0x234888(_0x2560ee,_0x372c98);});_0x5c5122[_0x5e697c(0x1a6)](''),_0x5c5122[_0x5e697c(0x1a6)](_0x5e697c(0x1df)),_0x5c5122['push'](_0x2f85d9(_0x4f2045));}return _0x5c5122['join']('\x0a');},'subcommandTerm':_0x2151d4=>{const _0xd8379c=a0_0x29b596,_0x4f2850=(_0x2151d4['registeredArguments']||[])[_0xd8379c(0x144)](_0x336dac=>_0x336dac[_0xd8379c(0x1ca)]?'<'+_0x336dac[_0xd8379c(0x1f8)]()+'>':'['+_0x336dac['name']()+']')[_0xd8379c(0x21e)]('\x20'),_0x3a7ecb=_0x2151d4[_0xd8379c(0x20a)](),_0x3e7c6c=_0x3a7ecb['length']>0x0?_0x2151d4[_0xd8379c(0x1f8)]()+',\x20'+_0x3a7ecb[_0xd8379c(0x21e)](',\x20'):_0x2151d4[_0xd8379c(0x1f8)]();return _0x4f2850?_0x3e7c6c+'\x20'+_0x4f2850:_0x3e7c6c;}}),program[a0_0x29b596(0x1c1)](a0_0x29b596(0x138),_0x7b9b16=>{const _0x40d46e=a0_0x29b596,_0x1ffafe=_0x7b9b16[_0x40d46e(0x128)]();if(!_0x1ffafe['format']){if(_0x1ffafe[_0x40d46e(0x1f3)])_0x1ffafe['format']='json';else{if(_0x1ffafe[_0x40d46e(0x186)])_0x1ffafe['format']=_0x40d46e(0x186);else _0x1ffafe[_0x40d46e(0x16c)]&&(_0x1ffafe[_0x40d46e(0x19f)]=_0x40d46e(0x16c));}}_0x1ffafe['in']&&!_0x1ffafe[_0x40d46e(0x23a)]&&(_0x1ffafe[_0x40d46e(0x23a)]=_0x1ffafe['in']);if(_0x1ffafe[_0x40d46e(0x1a5)])_0x1ffafe['logLevel']=LogLevel[_0x40d46e(0x175)];else{if(_0x1ffafe[_0x40d46e(0x143)])_0x1ffafe[_0x40d46e(0x184)]=LogLevel['DEBUG'];else _0x1ffafe['logLevel']===undefined&&(_0x1ffafe[_0x40d46e(0x184)]=LogLevel['INFO']);}});function createTDXInstance(_0x4e3d38){const _0x486e62=a0_0x29b596,_0x4eef56=new GlobalContext(_0x4e3d38);_0x4eef56[_0x486e62(0x227)](_0x4e3d38);const _0x53ffe2={'site':_0x4eef56[_0x486e62(0x114)],'apiKey':_0x4eef56[_0x486e62(0x10f)],'logLevel':_0x4eef56['logLevel']};return new TDX(_0x53ffe2);}program['command'](a0_0x29b596(0x17f))[a0_0x29b596(0x1b3)](a0_0x29b596(0x247))[a0_0x29b596(0x11e)](async(_0x3c6a04,_0x4c6448)=>{const _0x40e8a7=a0_0x29b596,_0x21822f=new DatabasesCommand(),_0x26c929=program[_0x40e8a7(0x128)](),_0x298610=createTDXInstance(_0x26c929),_0x73eb90=await _0x21822f['run']({'options':{..._0x26c929,..._0x4c6448},'args':_0x3c6a04?[_0x3c6a04]:[],'tdx':_0x298610});process['exit'](_0x73eb90);}),program['command'](a0_0x29b596(0x193))[a0_0x29b596(0x1b3)](a0_0x29b596(0x22e))[a0_0x29b596(0x1ae)]('--agent\x20<ref>','Agent\x20reference\x20(project-name/agent-name)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x219),a0_0x29b596(0x11f))['option'](a0_0x29b596(0x19c),a0_0x29b596(0x214))[a0_0x29b596(0x1ae)]('--new',a0_0x29b596(0x1c4))[a0_0x29b596(0x11e)](async(_0x16a9a5,_0x2dda0a)=>{const _0x1e8c6e=a0_0x29b596,_0x413249=new ChatCommand(),_0x35bc99=program['opts'](),_0x544b75=createTDXInstance(_0x35bc99),_0x30516e=await _0x413249[_0x1e8c6e(0x215)]({'options':{..._0x35bc99,..._0x2dda0a},'args':_0x16a9a5,'tdx':_0x544b75});process[_0x1e8c6e(0x125)](_0x30516e);});const apiCmd=program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1e2))['summary'](a0_0x29b596(0x1b6))[a0_0x29b596(0x126)](a0_0x29b596(0x152),a0_0x29b596(0x23d))[a0_0x29b596(0x1ae)]('-X,\x20--method\x20<method>','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)',a0_0x29b596(0x15e))[a0_0x29b596(0x1ae)](a0_0x29b596(0x172),a0_0x29b596(0x1b2))['option'](a0_0x29b596(0x216),a0_0x29b596(0x15b))['option'](a0_0x29b596(0x160),a0_0x29b596(0x1a2),(_0x532e5e,_0x52812f)=>{return _0x52812f?[..._0x52812f,_0x532e5e]:[_0x532e5e];})[a0_0x29b596(0x1ae)]('--type\x20<api_type>',a0_0x29b596(0x21c),'td')[a0_0x29b596(0x11e)](async(_0x1a821e,_0x1ffba6)=>{const _0x20f7cc=a0_0x29b596;if(!_0x1a821e){apiCmd[_0x20f7cc(0x229)]();return;}const _0xdb7aa8=new ApiCommand(),_0x4a6b66=program[_0x20f7cc(0x128)](),_0x58b6b1=createTDXInstance(_0x4a6b66),_0x48d1c1=await _0xdb7aa8[_0x20f7cc(0x215)]({'options':{..._0x4a6b66,..._0x1ffba6},'args':[_0x1a821e],'tdx':_0x58b6b1});process['exit'](_0x48d1c1);});program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1d3))[a0_0x29b596(0x1b3)]('List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)')['option'](a0_0x29b596(0x201),'Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)')['option']('--in\x20<database>',a0_0x29b596(0x222))[a0_0x29b596(0x11e)](async(_0x3006a9,_0x3580e7)=>{const _0x5e4137=a0_0x29b596,_0x11ed18=new TablesCommand(),_0x1d2b29=program[_0x5e4137(0x128)](),_0x3fc820=createTDXInstance(_0x1d2b29);_0x3580e7['in']&&(_0x3580e7['database']=_0x3580e7['in']);const _0x244651=await _0x11ed18[_0x5e4137(0x215)]({'options':{..._0x1d2b29,..._0x3580e7},'args':_0x3006a9?[_0x3006a9]:[],'tdx':_0x3fc820});process[_0x5e4137(0x125)](_0x244651);}),program[a0_0x29b596(0x1d7)]('show\x20[table]')[a0_0x29b596(0x1b3)](a0_0x29b596(0x119))[a0_0x29b596(0x1ae)](a0_0x29b596(0x201),'Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x246),a0_0x29b596(0x222))['action'](async(_0x1ac09c,_0x2ff65b)=>{const _0x3195c5=a0_0x29b596,_0x49e497=new ShowCommand(),_0x197204=program[_0x3195c5(0x128)](),_0x3eb64e=createTDXInstance(_0x197204);_0x2ff65b['in']&&(_0x2ff65b[_0x3195c5(0x23a)]=_0x2ff65b['in']);const _0x15a6b6=await _0x49e497['run']({'options':{..._0x197204,..._0x2ff65b},'args':_0x1ac09c?[_0x1ac09c]:[],'tdx':_0x3eb64e});process[_0x3195c5(0x125)](_0x15a6b6);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x17e))[a0_0x29b596(0x1bd)](a0_0x29b596(0x134))[a0_0x29b596(0x1b3)](a0_0x29b596(0x181))['option'](a0_0x29b596(0x201),a0_0x29b596(0x161))[a0_0x29b596(0x1ae)](a0_0x29b596(0x246),a0_0x29b596(0x222))[a0_0x29b596(0x11e)](async(_0x51a9f8,_0x2aeacb)=>{const _0x563e4f=a0_0x29b596,_0x3bf980=new DescribeCommand(),_0x41250e=program[_0x563e4f(0x128)](),_0x39beed=createTDXInstance(_0x41250e);_0x2aeacb['in']&&(_0x2aeacb['database']=_0x2aeacb['in']);const _0x517150=await _0x3bf980[_0x563e4f(0x215)]({'options':{..._0x41250e,..._0x2aeacb},'args':_0x51a9f8?[_0x51a9f8]:[],'tdx':_0x39beed});process[_0x563e4f(0x125)](_0x517150);}),program[a0_0x29b596(0x1d7)]('query\x20[sql]')[a0_0x29b596(0x1b3)](a0_0x29b596(0x1fc))[a0_0x29b596(0x1ae)](a0_0x29b596(0x201),'Database\x20to\x20query\x20(default:\x20information_schema)')[a0_0x29b596(0x1ae)]('--in\x20<database>',a0_0x29b596(0x222))['option'](a0_0x29b596(0x1e8),a0_0x29b596(0x13c))[a0_0x29b596(0x1ae)](a0_0x29b596(0x216),a0_0x29b596(0x141))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1e7),a0_0x29b596(0x187),'40')['action'](async(_0x36da2d,_0x40f090)=>{const _0x2c9524=a0_0x29b596,_0x1c3fb1=new QueryCommand(),_0x141c74=program['opts'](),_0x30e1da=createTDXInstance(_0x141c74);_0x40f090['in']&&(_0x40f090[_0x2c9524(0x23a)]=_0x40f090['in']);const _0x567c2c=await _0x1c3fb1[_0x2c9524(0x215)]({'options':{..._0x141c74,..._0x40f090},'args':_0x36da2d?[_0x36da2d]:[],'tdx':_0x30e1da});process[_0x2c9524(0x125)](_0x567c2c);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1bf))[a0_0x29b596(0x1b3)](a0_0x29b596(0x11a))['option']('-r,\x20--recursive',a0_0x29b596(0x145))['option'](a0_0x29b596(0x170),a0_0x29b596(0x12f),'10')['action'](async(_0x1b2906,_0x5d4f62)=>{const _0x29a665=a0_0x29b596,_0x280b7d=new SegmentsCommand(),_0x4b5f41=program[_0x29a665(0x128)](),_0x193f16=createTDXInstance(_0x4b5f41),_0x15de74=await _0x280b7d[_0x29a665(0x215)]({'options':{..._0x4b5f41,..._0x5d4f62},'args':_0x1b2906?[_0x1b2906]:[],'tdx':_0x193f16});process[_0x29a665(0x125)](_0x15de74);});const segmentCmd=program['command'](a0_0x29b596(0x248))[a0_0x29b596(0x1b3)]('CDP\x20segment\x20management\x20commands');segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x240))[a0_0x29b596(0x1b3)](a0_0x29b596(0x162))[a0_0x29b596(0x11e)](async(_0x2443c3,_0x4f3bc8)=>{const _0x464fc4=a0_0x29b596,_0x4f1c75=new SegmentUseCommand(),_0x2dfa59=program['opts'](),_0x22efbe=createTDXInstance(_0x2dfa59),_0x3faa0e=await _0x4f1c75[_0x464fc4(0x215)]({'options':{..._0x2dfa59,..._0x4f3bc8},'args':[_0x2443c3],'tdx':_0x22efbe});process[_0x464fc4(0x125)](_0x3faa0e);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x163))[a0_0x29b596(0x1b3)](a0_0x29b596(0x236))[a0_0x29b596(0x11e)](async _0x4a1796=>{const _0x44b649=a0_0x29b596,_0x11f51d=new SegmentPwdCommand(),_0x5144d9=program[_0x44b649(0x128)](),_0x3cfa56=createTDXInstance(_0x5144d9),_0xdd8475=await _0x11f51d['run']({'options':{..._0x5144d9,..._0x4a1796},'args':[],'tdx':_0x3cfa56});process['exit'](_0xdd8475);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1cf))[a0_0x29b596(0x1bd)](a0_0x29b596(0x134))[a0_0x29b596(0x1b3)](a0_0x29b596(0x195))[a0_0x29b596(0x11e)](async(_0x1f54aa,_0x384b69)=>{const _0x2d4fa4=a0_0x29b596,_0x31384f=new SegmentDescribeCommand(),_0x490844=program[_0x2d4fa4(0x128)](),_0x532966=createTDXInstance(_0x490844),_0x453304=await _0x31384f[_0x2d4fa4(0x215)]({'options':{..._0x490844,..._0x384b69},'args':[_0x1f54aa],'tdx':_0x532966});process['exit'](_0x453304);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1cb))[a0_0x29b596(0x1b3)](a0_0x29b596(0x165))['action'](async(_0x106027,_0x540084)=>{const _0x5af8c2=a0_0x29b596,_0x2f4704=new SegmentShowCommand(),_0x2d820b=program[_0x5af8c2(0x128)](),_0x1ef8a3=createTDXInstance(_0x2d820b),_0x172b69=await _0x2f4704[_0x5af8c2(0x215)]({'options':{..._0x2d820b,..._0x540084},'args':[_0x106027],'tdx':_0x1ef8a3});process['exit'](_0x172b69);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1ac))[a0_0x29b596(0x1b3)]('List\x20segment\x20folders\x20under\x20a\x20parent\x20segment')[a0_0x29b596(0x11e)](async(_0x54ab5d,_0x29e2e2)=>{const _0x544919=a0_0x29b596,_0x76f782=new SegmentFolderListCommand(),_0x23eb2f=program['opts'](),_0x235f86=createTDXInstance(_0x23eb2f),_0x3e7e14=await _0x76f782['run']({'options':{..._0x23eb2f,..._0x29e2e2},'args':[_0x54ab5d],'tdx':_0x235f86});process[_0x544919(0x125)](_0x3e7e14);});const folderCmd=segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x12b))['description'](a0_0x29b596(0x241));folderCmd['command'](a0_0x29b596(0x167))[a0_0x29b596(0x1b3)](a0_0x29b596(0x137))[a0_0x29b596(0x11e)](async(_0x2d33de,_0x12b93a)=>{const _0x24ab70=a0_0x29b596,_0x3dc26c=new SegmentFolderShowCommand(),_0x2fac15=program[_0x24ab70(0x128)](),_0x397c77=createTDXInstance(_0x2fac15),_0x81ea06=await _0x3dc26c[_0x24ab70(0x215)]({'options':{..._0x2fac15,..._0x12b93a},'args':[_0x2d33de],'tdx':_0x397c77});process[_0x24ab70(0x125)](_0x81ea06);}),segmentCmd['command']('sql\x20<segment_name>')[a0_0x29b596(0x1b3)](a0_0x29b596(0x159))[a0_0x29b596(0x11e)](async(_0x415ba1,_0x3026da)=>{const _0x4038a5=a0_0x29b596,_0x397e86=new SegmentSQLCommand(),_0xaa2915=program[_0x4038a5(0x128)](),_0x216d20=createTDXInstance(_0xaa2915),_0x3e2cbe=await _0x397e86[_0x4038a5(0x215)]({'options':{..._0xaa2915,..._0x3026da},'args':[_0x415ba1],'tdx':_0x216d20});process[_0x4038a5(0x125)](_0x3e2cbe);}),segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x235))[a0_0x29b596(0x1b3)](a0_0x29b596(0x208))[a0_0x29b596(0x11e)](async(_0xcac249,_0x3b062a)=>{const _0x551ad7=a0_0x29b596,_0x582922=new SegmentFieldsCommand(),_0x2462fb=program['opts'](),_0x2fc943=createTDXInstance(_0x2462fb),_0x156a6e=await _0x582922[_0x551ad7(0x215)]({'options':{..._0x2462fb,..._0x3b062a},'args':[_0xcac249],'tdx':_0x2fc943});process[_0x551ad7(0x125)](_0x156a6e);}),segmentCmd['command'](a0_0x29b596(0x22d))[a0_0x29b596(0x1b3)](a0_0x29b596(0x164))[a0_0x29b596(0x1ae)](a0_0x29b596(0x249),a0_0x29b596(0x109))[a0_0x29b596(0x1ae)](a0_0x29b596(0x173),a0_0x29b596(0x180))['option'](a0_0x29b596(0x23b),a0_0x29b596(0x113))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1be),'Folder\x20name\x20for\x20organization')['option']('--kind\x20<type>',a0_0x29b596(0x1a7))[a0_0x29b596(0x1ae)](a0_0x29b596(0x192),a0_0x29b596(0x14f))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1d9),a0_0x29b596(0x106))[a0_0x29b596(0x11e)](async(_0x5b70a1,_0x5cb96e)=>{const _0x98d7b3=a0_0x29b596,_0x2aec1d=new SegmentCreateCommand(),_0x58147d=program['opts'](),_0x2e798b=createTDXInstance(_0x58147d),_0x3570ae=await _0x2aec1d[_0x98d7b3(0x215)]({'options':{..._0x58147d,..._0x5cb96e},'args':[_0x5b70a1],'tdx':_0x2e798b});process[_0x98d7b3(0x125)](_0x3570ae);}),segmentCmd[a0_0x29b596(0x1d7)]('update\x20<segment_name>')['description'](a0_0x29b596(0x17d))[a0_0x29b596(0x1ae)]('--name\x20<new_name>',a0_0x29b596(0x23e))['option']('--description\x20<text>',a0_0x29b596(0x124))[a0_0x29b596(0x1ae)]('--rule\x20<json>',a0_0x29b596(0x115))['option'](a0_0x29b596(0x23b),'Updated\x20filtering\x20rule\x20from\x20JSON\x20file')[a0_0x29b596(0x1ae)]('--folder\x20<name>',a0_0x29b596(0x189))[a0_0x29b596(0x1ae)](a0_0x29b596(0x150),a0_0x29b596(0x1a7))[a0_0x29b596(0x11e)](async(_0x39b5d5,_0x9029f2)=>{const _0x4a26f4=a0_0x29b596,_0x8d1f83=new SegmentUpdateCommand(),_0x3bd9eb=program['opts'](),_0x261ad4=createTDXInstance(_0x3bd9eb),_0x505485=await _0x8d1f83[_0x4a26f4(0x215)]({'options':{..._0x3bd9eb,..._0x9029f2},'args':[_0x39b5d5],'tdx':_0x261ad4});process[_0x4a26f4(0x125)](_0x505485);});const parentCmd=segmentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x14b))[a0_0x29b596(0x1b3)](a0_0x29b596(0x16b));parentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1b4))[a0_0x29b596(0x1b3)](a0_0x29b596(0x18a))[a0_0x29b596(0x146)]('--database\x20<db>',a0_0x29b596(0x1e5))[a0_0x29b596(0x146)](a0_0x29b596(0x13f),a0_0x29b596(0x1a0))['option'](a0_0x29b596(0x249),a0_0x29b596(0x213))[a0_0x29b596(0x1ae)](a0_0x29b596(0x10c),a0_0x29b596(0x1f7))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1eb),a0_0x29b596(0x174))[a0_0x29b596(0x1ae)]('--timezone\x20<tz>','Timezone\x20(e.g.,\x20America/Los_Angeles)')['option'](a0_0x29b596(0x230),a0_0x29b596(0x24a))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1d0),a0_0x29b596(0x190))['option'](a0_0x29b596(0x1ba),a0_0x29b596(0x205))[a0_0x29b596(0x1ae)]('--behaviors-file\x20<file>',a0_0x29b596(0x122))[a0_0x29b596(0x1ae)](a0_0x29b596(0x21a),a0_0x29b596(0x183))[a0_0x29b596(0x1ae)](a0_0x29b596(0x112),a0_0x29b596(0x1c8))[a0_0x29b596(0x11e)](async(_0x53c793,_0x35758b)=>{const _0x78efc6=a0_0x29b596,_0x45572d=new ParentSegmentCreateCommand(),_0x3f4d76=program['opts'](),_0x1e0d26=createTDXInstance(_0x3f4d76),_0x580e4b=await _0x45572d[_0x78efc6(0x215)]({'options':{..._0x3f4d76,..._0x35758b},'args':[_0x53c793],'tdx':_0x1e0d26});process['exit'](_0x580e4b);}),parentCmd[a0_0x29b596(0x1d7)]('update\x20<name>')[a0_0x29b596(0x1b3)]('Update\x20parent\x20segment\x20(audience)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x249),a0_0x29b596(0x124))['option']('--schedule-type\x20<type>',a0_0x29b596(0x1f9))[a0_0x29b596(0x1ae)]('--schedule-option\x20<value>',a0_0x29b596(0x22f))[a0_0x29b596(0x1ae)]('--timezone\x20<tz>',a0_0x29b596(0x1a8))[a0_0x29b596(0x1ae)](a0_0x29b596(0x20c),a0_0x29b596(0x1b9))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1e3),a0_0x29b596(0x200))['option'](a0_0x29b596(0x226),a0_0x29b596(0x1a9))[a0_0x29b596(0x1ae)](a0_0x29b596(0x221),a0_0x29b596(0x1b5))[a0_0x29b596(0x11e)](async(_0xfe3cdc,_0x1a3c65)=>{const _0x22f852=a0_0x29b596,_0x26a522=new ParentSegmentUpdateCommand(),_0x3a9406=program[_0x22f852(0x128)](),_0xf6a1a3=createTDXInstance(_0x3a9406),_0x4ff443=await _0x26a522[_0x22f852(0x215)]({'options':{..._0x3a9406,..._0x1a3c65},'args':[_0xfe3cdc],'tdx':_0xf6a1a3});process[_0x22f852(0x125)](_0x4ff443);}),folderCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x15d))['description'](a0_0x29b596(0x133))[a0_0x29b596(0x1ae)]('--description\x20<text>',a0_0x29b596(0x1b8))[a0_0x29b596(0x1ae)]('--parent-folder\x20<name>',a0_0x29b596(0x197))[a0_0x29b596(0x11e)](async(_0x1245e5,_0xa0d348,_0x2fc3ba)=>{const _0x56a664=a0_0x29b596,_0x121abc=new SegmentFolderCreateCommand(),_0x3a7e45=program['opts'](),_0x59aa32=createTDXInstance(_0x3a7e45),_0x56570c=await _0x121abc[_0x56a664(0x215)]({'options':{..._0x3a7e45,..._0x2fc3ba},'args':[_0x1245e5,_0xa0d348],'tdx':_0x59aa32});process['exit'](_0x56570c);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1e6))['description'](a0_0x29b596(0x191))['action'](async(_0x1cfc59,_0x2e893e)=>{const _0x578794=a0_0x29b596,_0x3f0e7d=new ActivationsCommand(),_0xe73031=program[_0x578794(0x128)](),_0x13bb79=createTDXInstance(_0xe73031),_0xac5895=await _0x3f0e7d[_0x578794(0x215)]({'options':{..._0xe73031,..._0x2e893e},'args':[_0x1cfc59],'tdx':_0x13bb79});process['exit'](_0xac5895);});const workflowCmd=program[a0_0x29b596(0x1d7)](a0_0x29b596(0x20b))[a0_0x29b596(0x1bd)]('wf')[a0_0x29b596(0x1b3)]('Workflow\x20(Digdag)\x20management\x20commands');workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x24c))[a0_0x29b596(0x1b3)](a0_0x29b596(0x13d))[a0_0x29b596(0x11e)](async(_0x265192,_0x228d43)=>{const _0x3e356a=a0_0x29b596,_0x13e57f=new WorkflowProjectsCommand(),_0x5ad3ae=program[_0x3e356a(0x128)](),_0x4fb073=createTDXInstance(_0x5ad3ae),_0x474006=await _0x13e57f['run']({'options':{..._0x5ad3ae,..._0x228d43},'args':_0x265192?[_0x265192]:[],'tdx':_0x4fb073});process['exit'](_0x474006);}),workflowCmd[a0_0x29b596(0x1d7)]('workflows\x20[project]')[a0_0x29b596(0x1bd)]('ls')[a0_0x29b596(0x1b3)](a0_0x29b596(0x23c))[a0_0x29b596(0x11e)](async(_0x35936f,_0x5ef066)=>{const _0x220007=a0_0x29b596,_0x2d6eb1=new WorkflowWorkflowsCommand(),_0x2b03da=program[_0x220007(0x128)](),_0x3b971e=createTDXInstance(_0x2b03da),_0x178241=await _0x2d6eb1['run']({'options':{..._0x2b03da,..._0x5ef066},'args':_0x35936f?[_0x35936f]:[],'tdx':_0x3b971e});process['exit'](_0x178241);}),workflowCmd[a0_0x29b596(0x1d7)]('sessions\x20[project]')[a0_0x29b596(0x1b3)](a0_0x29b596(0x13a))['option']('--status\x20<status>',a0_0x29b596(0x110))['option'](a0_0x29b596(0x178),a0_0x29b596(0x1d8))['option'](a0_0x29b596(0x204),a0_0x29b596(0x19e))['action'](async(_0x1b9e7f,_0x458414)=>{const _0x25b97c=a0_0x29b596,_0x159b89=new WorkflowSessionsCommand(),_0x59b12a=program[_0x25b97c(0x128)](),_0x5a42b0=createTDXInstance(_0x59b12a),_0x342ae8=await _0x159b89[_0x25b97c(0x215)]({'options':{..._0x59b12a,..._0x458414},'args':_0x1b9e7f?[_0x1b9e7f]:[],'tdx':_0x5a42b0});process[_0x25b97c(0x125)](_0x342ae8);}),workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x17a))[a0_0x29b596(0x1b3)]('List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)')[a0_0x29b596(0x1ae)](a0_0x29b596(0x245),a0_0x29b596(0x1fa))['action'](async(_0x51b9b6,_0x407312)=>{const _0x4582a6=a0_0x29b596,_0xf63ac6=new WorkflowAttemptsCommand(),_0x593cb6=program[_0x4582a6(0x128)](),_0x4f0816=createTDXInstance(_0x593cb6),_0xc91e8f=await _0xf63ac6['run']({'options':{..._0x593cb6,..._0x407312},'args':_0x51b9b6?[_0x51b9b6]:[],'tdx':_0x4f0816});process['exit'](_0xc91e8f);}),workflowCmd['command'](a0_0x29b596(0x21b))['description'](a0_0x29b596(0x12d))['action'](async(_0x3a3764,_0x59726b)=>{const _0x3a4af8=a0_0x29b596,_0x3f8593=new WorkflowAttemptCommand(),_0x34a5e4=program['opts'](),_0x3a92d7=createTDXInstance(_0x34a5e4),_0x184407=await _0x3f8593[_0x3a4af8(0x215)]({'options':{..._0x34a5e4,..._0x59726b},'args':[_0x3a3764],'tdx':_0x3a92d7});process[_0x3a4af8(0x125)](_0x184407);}),workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1f4))[a0_0x29b596(0x1b3)]('Show\x20tasks\x20for\x20an\x20attempt')['option'](a0_0x29b596(0x185),'Include\x20subtasks\x20in\x20the\x20output')['action'](async(_0x5ce8b5,_0x2003d4)=>{const _0x40e3a7=a0_0x29b596,_0x3700d7=new WorkflowTasksCommand(),_0x3f887b=program[_0x40e3a7(0x128)](),_0x2bacba=createTDXInstance(_0x3f887b),_0x18cea6=await _0x3700d7[_0x40e3a7(0x215)]({'options':{..._0x3f887b,..._0x2003d4},'args':[_0x5ce8b5],'tdx':_0x2bacba});process[_0x40e3a7(0x125)](_0x18cea6);}),workflowCmd['command'](a0_0x29b596(0x238))[a0_0x29b596(0x1b3)](a0_0x29b596(0x223))[a0_0x29b596(0x1ae)](a0_0x29b596(0x225),a0_0x29b596(0x188),_0x557889=>parseInt(_0x557889,0xa),0x0)[a0_0x29b596(0x11e)](async(_0x39829f,_0x3d2e0f,_0x138ab4)=>{const _0x398f59=a0_0x29b596,_0x47317e=new WorkflowLogsCommand(),_0xc8d288=program[_0x398f59(0x128)](),_0x5819b5=createTDXInstance(_0xc8d288),_0x3a965e=await _0x47317e[_0x398f59(0x215)]({'options':{..._0xc8d288,..._0x138ab4},'args':[_0x39829f,_0x3d2e0f],'tdx':_0x5819b5});process[_0x398f59(0x125)](_0x3a965e);}),workflowCmd[a0_0x29b596(0x1d7)]('kill\x20<attempt-id>')[a0_0x29b596(0x1b3)]('Kill\x20a\x20running\x20attempt')['option']('--reason\x20<text>',a0_0x29b596(0x108))[a0_0x29b596(0x11e)](async(_0x53f648,_0x33afff)=>{const _0x2c111f=a0_0x29b596,_0x29f938=new WorkflowKillCommand(),_0x281969=program[_0x2c111f(0x128)](),_0x3b0ac1=createTDXInstance(_0x281969),_0x28271a=await _0x29f938[_0x2c111f(0x215)]({'options':{..._0x281969,..._0x33afff},'args':[_0x53f648],'tdx':_0x3b0ac1});process[_0x2c111f(0x125)](_0x28271a);}),workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1a1))['description'](a0_0x29b596(0x1ee))['option'](a0_0x29b596(0x18c),a0_0x29b596(0x237))['option']('--resume-from\x20<task>',a0_0x29b596(0x1fe))[a0_0x29b596(0x1ae)](a0_0x29b596(0x130),a0_0x29b596(0x1e1))[a0_0x29b596(0x1ae)](a0_0x29b596(0x11c),a0_0x29b596(0x206))[a0_0x29b596(0x11e)](async(_0x2b993d,_0xe82283)=>{const _0x3e7f5d=a0_0x29b596,_0x567a83=new WorkflowRetryCommand(),_0x336881=program[_0x3e7f5d(0x128)](),_0x299ab4=createTDXInstance(_0x336881),_0x4337a4=await _0x567a83[_0x3e7f5d(0x215)]({'options':{..._0x336881,..._0xe82283},'args':[_0x2b993d],'tdx':_0x299ab4});process['exit'](_0x4337a4);}),workflowCmd[a0_0x29b596(0x1d7)]('download\x20<project-name>\x20[output-dir]')[a0_0x29b596(0x1b3)](a0_0x29b596(0x1ff))[a0_0x29b596(0x1ae)]('--revision\x20<revision>',a0_0x29b596(0x171))[a0_0x29b596(0x11e)](async(_0x535fff,_0xd609da,_0x49deaf)=>{const _0x5bbb88=a0_0x29b596,_0x12356c=new WorkflowDownloadCommand(),_0x2c112e=program[_0x5bbb88(0x128)](),_0x153f27=createTDXInstance(_0x2c112e),_0x583dda=await _0x12356c['run']({'options':{..._0x2c112e,..._0x49deaf},'args':[_0x535fff,_0xd609da||'.'],'tdx':_0x153f27});process[_0x5bbb88(0x125)](_0x583dda);}),workflowCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1f1))['description']('Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)')[a0_0x29b596(0x1ae)]('--name\x20<name>','Override\x20project\x20name')[a0_0x29b596(0x1ae)](a0_0x29b596(0x202),a0_0x29b596(0x10b))[a0_0x29b596(0x1ae)](a0_0x29b596(0x234),a0_0x29b596(0x129))[a0_0x29b596(0x11e)](async(_0xa06d19,_0x4e1d9c)=>{const _0x6b59f1=new WorkflowPushCommand(),_0x317278=program['opts'](),_0x2474b7=createTDXInstance(_0x317278),_0x477dce=await _0x6b59f1['run']({'options':{..._0x317278,..._0x4e1d9c},'args':_0xa06d19?[_0xa06d19]:[],'tdx':_0x2474b7});process['exit'](_0x477dce);}),workflowCmd['command']('delete\x20<project-name-or-id>')[a0_0x29b596(0x1b3)](a0_0x29b596(0x17b))['action'](async(_0x180b9f,_0x293baf)=>{const _0x33b1f5=a0_0x29b596,_0x111537=new WorkflowDeleteCommand(),_0x4d5f88=program['opts'](),_0x431414=createTDXInstance(_0x4d5f88),_0x2aa3ae=await _0x111537[_0x33b1f5(0x215)]({'options':{..._0x4d5f88,..._0x293baf},'args':[_0x180b9f],'tdx':_0x431414});process[_0x33b1f5(0x125)](_0x2aa3ae);}),program['command'](a0_0x29b596(0x121))[a0_0x29b596(0x1b3)](a0_0x29b596(0x1c2))['option'](a0_0x29b596(0x19d),a0_0x29b596(0x1e0))[a0_0x29b596(0x11e)](async _0xc1e814=>{const _0x186b08=a0_0x29b596,_0x427b2b=new JobListCommand(),_0x2b08b5=program[_0x186b08(0x128)](),_0x216efa=createTDXInstance(_0x2b08b5),_0x394235=await _0x427b2b[_0x186b08(0x215)]({'options':{..._0x2b08b5,..._0xc1e814},'args':[],'tdx':_0x216efa});process[_0x186b08(0x125)](_0x394235);});const jobCmd=program[a0_0x29b596(0x1d7)]('job')[a0_0x29b596(0x1b3)](a0_0x29b596(0x1db));jobCmd['command']('show\x20<job-id>')['description'](a0_0x29b596(0x1dc))[a0_0x29b596(0x11e)](async(_0xc3982a,_0x514adf)=>{const _0x25b39b=a0_0x29b596,_0x13d547=new JobShowCommand(),_0x40f660=program[_0x25b39b(0x128)](),_0x6cc20e=createTDXInstance(_0x40f660),_0x3eeef4=await _0x13d547['run']({'options':{..._0x40f660,..._0x514adf},'args':[_0xc3982a],'tdx':_0x6cc20e});process[_0x25b39b(0x125)](_0x3eeef4);}),jobCmd['command'](a0_0x29b596(0x1d6))['description'](a0_0x29b596(0x16d))[a0_0x29b596(0x11e)](async(_0x42d7e3,_0x4e5acb)=>{const _0x2e53ca=a0_0x29b596,_0x5595fa=new JobKillCommand(),_0x1274f4=program[_0x2e53ca(0x128)](),_0x4aacdb=createTDXInstance(_0x1274f4),_0x820a25=await _0x5595fa['run']({'options':{..._0x1274f4,..._0x4e5acb},'args':[_0x42d7e3],'tdx':_0x4aacdb});process[_0x2e53ca(0x125)](_0x820a25);}),jobCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1f6))['description'](a0_0x29b596(0x18d))[a0_0x29b596(0x1ae)]('--job-type\x20<type>','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)',a0_0x29b596(0x21d))[a0_0x29b596(0x1ae)]('-f,\x20--file\x20<path>','Read\x20query\x20from\x20file')['option'](a0_0x29b596(0x18f),a0_0x29b596(0x244),'information_schema')[a0_0x29b596(0x11e)](async(_0x9a8cd1,_0xf89b7c)=>{const _0x23eb0a=a0_0x29b596,_0xef28f4=new JobSubmitCommand(),_0x2babf3=program[_0x23eb0a(0x128)](),_0x1ea24d=createTDXInstance(_0x2babf3),_0x23b169=await _0xef28f4[_0x23eb0a(0x215)]({'options':{..._0x2babf3,..._0xf89b7c},'args':_0x9a8cd1?[_0x9a8cd1]:[],'tdx':_0x1ea24d});process[_0x23eb0a(0x125)](_0x23b169);}),jobCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x22a))[a0_0x29b596(0x1b3)]('Get\x20job\x20results')['action'](async(_0x1667ff,_0x1372e7)=>{const _0x42052c=a0_0x29b596,_0x4c7826=new JobResultCommand(),_0x276202=program['opts'](),_0x412bc6=createTDXInstance(_0x276202),_0x5693c5=await _0x4c7826[_0x42052c(0x215)]({'options':{..._0x276202,..._0x1372e7},'args':[_0x1667ff],'tdx':_0x412bc6});process[_0x42052c(0x125)](_0x5693c5);});const llmCmd=program[a0_0x29b596(0x1d7)](a0_0x29b596(0x196))[a0_0x29b596(0x1b3)](a0_0x29b596(0x1f2));llmCmd['command']('use\x20<project-name>')[a0_0x29b596(0x1b3)](a0_0x29b596(0x136))['action'](async(_0x3e5250,_0x175ddc)=>{const _0x378680=new LLMUseCommand(),_0x2cb510=program['opts'](),_0x20db02=createTDXInstance(_0x2cb510),_0x26a029=await _0x378680['run']({'options':{..._0x2cb510,..._0x175ddc},'args':[_0x3e5250],'tdx':_0x20db02});process['exit'](_0x26a029);}),llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1a3))[a0_0x29b596(0x1b3)](a0_0x29b596(0x1b0))[a0_0x29b596(0x11e)](async _0x4e7bfc=>{const _0x17d5c5=a0_0x29b596,_0x189f11=new LLMModelsCommand(),_0x51dd3b=program['opts'](),_0x4f5753=createTDXInstance(_0x51dd3b),_0x46d5f2=await _0x189f11[_0x17d5c5(0x215)]({'options':{..._0x51dd3b,..._0x4e7bfc},'args':[],'tdx':_0x4f5753});process[_0x17d5c5(0x125)](_0x46d5f2);}),llmCmd[a0_0x29b596(0x1d7)]('projects\x20[pattern]')[a0_0x29b596(0x1b3)]('List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)')[a0_0x29b596(0x11e)](async(_0x2ab550,_0x140689)=>{const _0x56a87e=a0_0x29b596,_0x4ac536=new LLMProjectsCommand(),_0x4a8e6f=program[_0x56a87e(0x128)](),_0x3bd0c9=createTDXInstance(_0x4a8e6f),_0x44167a=await _0x4ac536[_0x56a87e(0x215)]({'options':{..._0x4a8e6f,..._0x140689},'args':_0x2ab550?[_0x2ab550]:[],'tdx':_0x3bd0c9});process[_0x56a87e(0x125)](_0x44167a);});const projectCmd=llmCmd[a0_0x29b596(0x1d7)]('project')[a0_0x29b596(0x1b3)]('LLM\x20project\x20management');projectCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1b4))[a0_0x29b596(0x1b3)](a0_0x29b596(0x14c))['option']('--description\x20<text>',a0_0x29b596(0x139))[a0_0x29b596(0x11e)](async(_0x109e64,_0x1833f6)=>{const _0x128219=a0_0x29b596,_0x492ca5=new LLMProjectCreateCommand(),_0x4f7780=program[_0x128219(0x128)](),_0xf6037a=createTDXInstance(_0x4f7780),_0x2d0f77=await _0x492ca5[_0x128219(0x215)]({'options':{..._0x4f7780,..._0x1833f6},'args':[_0x109e64],'tdx':_0xf6037a});process[_0x128219(0x125)](_0x2d0f77);}),projectCmd['command'](a0_0x29b596(0x1f0))['description']('Delete\x20an\x20LLM\x20project')[a0_0x29b596(0x11e)](async(_0x117b95,_0x3b7dd2)=>{const _0x50e5c1=a0_0x29b596,_0x41ca46=new LLMProjectDeleteCommand(),_0x3325c5=program[_0x50e5c1(0x128)](),_0x3769bc=createTDXInstance(_0x3325c5),_0x185fd2=await _0x41ca46[_0x50e5c1(0x215)]({'options':{..._0x3325c5,..._0x3b7dd2},'args':[_0x117b95],'tdx':_0x3769bc});process[_0x50e5c1(0x125)](_0x185fd2);}),llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x1d2))[a0_0x29b596(0x1b3)]('List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)')[a0_0x29b596(0x11e)](async(_0x40498a,_0x23ad32)=>{const _0x49afff=a0_0x29b596,_0x272a35=new LLMAgentsCommand(),_0x7e7433=program[_0x49afff(0x128)](),_0x5ceacb=createTDXInstance(_0x7e7433),_0xc8ccf5=await _0x272a35['run']({'options':{..._0x7e7433,..._0x23ad32},'args':_0x40498a?[_0x40498a]:[],'tdx':_0x5ceacb});process[_0x49afff(0x125)](_0xc8ccf5);});const agentCmd=llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x21f))[a0_0x29b596(0x1b3)]('LLM\x20agent\x20management');agentCmd['command'](a0_0x29b596(0x217))[a0_0x29b596(0x1b3)](a0_0x29b596(0x10a))[a0_0x29b596(0x11e)](async(_0x57f34c,_0x4859ab)=>{const _0x3ecedf=a0_0x29b596,_0x3ce399=new LLMAgentShowCommand(),_0xf0f3d6=program[_0x3ecedf(0x128)](),_0x5cb885=createTDXInstance(_0xf0f3d6),_0x4ea2b5=await _0x3ce399[_0x3ecedf(0x215)]({'options':{..._0xf0f3d6,..._0x4859ab},'args':[_0x57f34c],'tdx':_0x5cb885});process[_0x3ecedf(0x125)](_0x4ea2b5);}),agentCmd[a0_0x29b596(0x1d7)]('create\x20<name>')[a0_0x29b596(0x1b3)]('Create\x20a\x20new\x20agent\x20in\x20current\x20project')[a0_0x29b596(0x1ae)](a0_0x29b596(0x24b),a0_0x29b596(0x13b))[a0_0x29b596(0x1ae)](a0_0x29b596(0x219),a0_0x29b596(0x1d4),a0_0x29b596(0x1ef))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1c7),a0_0x29b596(0x207))[a0_0x29b596(0x1ae)](a0_0x29b596(0x140),a0_0x29b596(0x1b7),'4')[a0_0x29b596(0x1ae)](a0_0x29b596(0x19c),a0_0x29b596(0x214),a0_0x29b596(0x13e))[a0_0x29b596(0x11e)](async(_0x2723bc,_0x3d30be)=>{const _0x4384b5=a0_0x29b596,_0x3983e8=new LLMAgentCreateCommand(),_0x5e1073=program[_0x4384b5(0x128)](),_0x1c45c3=createTDXInstance(_0x5e1073),_0xaacc29=await _0x3983e8[_0x4384b5(0x215)]({'options':{..._0x5e1073,..._0x3d30be},'args':[_0x2723bc],'tdx':_0x1c45c3});process[_0x4384b5(0x125)](_0xaacc29);}),agentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x147))[a0_0x29b596(0x1b3)](a0_0x29b596(0x1ed))[a0_0x29b596(0x1ae)]('--name\x20<text>',a0_0x29b596(0x1d5))['option'](a0_0x29b596(0x1ab),a0_0x29b596(0x239))[a0_0x29b596(0x1ae)]('--description\x20<text>',a0_0x29b596(0x12a))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1c7),a0_0x29b596(0x207))[a0_0x29b596(0x11e)](async(_0x3e1452,_0x2da971)=>{const _0x21ae00=a0_0x29b596,_0x360de4=new LLMAgentUpdateCommand(),_0x4dd75d=program[_0x21ae00(0x128)](),_0x255211=createTDXInstance(_0x4dd75d),_0x4d7fba=await _0x360de4[_0x21ae00(0x215)]({'options':{..._0x4dd75d,..._0x2da971},'args':[_0x3e1452],'tdx':_0x255211});process[_0x21ae00(0x125)](_0x4d7fba);}),agentCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x107))['description']('Delete\x20an\x20agent')[a0_0x29b596(0x11e)](async(_0x59d6ea,_0x116e06)=>{const _0x3caa98=a0_0x29b596,_0x11a017=new LLMAgentDeleteCommand(),_0x4c109d=program[_0x3caa98(0x128)](),_0x4b7ed5=createTDXInstance(_0x4c109d),_0x5afe16=await _0x11a017[_0x3caa98(0x215)]({'options':{..._0x4c109d,..._0x116e06},'args':[_0x59d6ea],'tdx':_0x4b7ed5});process[_0x3caa98(0x125)](_0x5afe16);}),llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x17c))[a0_0x29b596(0x1b3)](a0_0x29b596(0x156))[a0_0x29b596(0x1ae)]('--last','Show\x20history\x20of\x20the\x20most\x20recent\x20chat\x20session')[a0_0x29b596(0x11e)](async(_0x2778bc,_0x38dcb2)=>{const _0x256bcb=a0_0x29b596,_0x597e2c=new LLMHistoryCommand(),_0x233e3a=program['opts'](),_0x486b32=createTDXInstance(_0x233e3a),_0x223272=await _0x597e2c[_0x256bcb(0x215)]({'options':{..._0x233e3a,..._0x38dcb2},'args':_0x2778bc?[_0x2778bc]:[],'tdx':_0x486b32});process[_0x256bcb(0x125)](_0x223272);}),llmCmd[a0_0x29b596(0x1d7)](a0_0x29b596(0x16e))['description'](a0_0x29b596(0x176))[a0_0x29b596(0x1ae)]('--port\x20<number>',a0_0x29b596(0x15c),a0_0x29b596(0x1bb))[a0_0x29b596(0x1ae)](a0_0x29b596(0x1fb),a0_0x29b596(0x15a))['option'](a0_0x29b596(0x116),'Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)')[a0_0x29b596(0x11e)](async _0xc31f4a=>{const _0x3cc5b3=a0_0x29b596,_0x2faf98=new LLMProxyCommand(),_0x4bbdc6=program[_0x3cc5b3(0x128)](),_0x8edf52=createTDXInstance(_0x4bbdc6),_0x452b59={..._0xc31f4a,'port':_0xc31f4a[_0x3cc5b3(0x19a)]?parseInt(_0xc31f4a[_0x3cc5b3(0x19a)],0xa):undefined},_0x17b695=await _0x2faf98[_0x3cc5b3(0x215)]({'options':{..._0x4bbdc6,..._0x452b59},'args':[],'tdx':_0x8edf52});process['exit'](_0x17b695);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x158))[a0_0x29b596(0x1b3)](a0_0x29b596(0x16a))[a0_0x29b596(0x1ae)](a0_0x29b596(0x219),a0_0x29b596(0x11d),'sonnet')[a0_0x29b596(0x199)]()[a0_0x29b596(0x1ce)](!![])[a0_0x29b596(0x11e)](async(_0x361b6e,_0x55c3ff)=>{const _0x14ed6c=a0_0x29b596,_0x2f7aa0=new ClaudeCommand(),_0xc42441=program['opts'](),_0x53aa5a=createTDXInstance(_0xc42441),_0x54f2be=Array[_0x14ed6c(0x127)](_0x361b6e)?_0x361b6e:[],_0x59faad=await _0x2f7aa0[_0x14ed6c(0x215)]({'options':{..._0xc42441,..._0x55c3ff},'args':_0x54f2be,'tdx':_0x53aa5a});process['exit'](_0x59faad);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x177))[a0_0x29b596(0x1b3)](a0_0x29b596(0x111))[a0_0x29b596(0x1ae)]('--clear',a0_0x29b596(0x1da))[a0_0x29b596(0x11e)](async _0x4fb423=>{const _0x5aff68=a0_0x29b596,_0x5d5f6d=new ContextCommand(),_0x274a72=program['opts'](),_0x312f9c=await _0x5d5f6d[_0x5aff68(0x215)]({'options':{..._0x274a72,..._0x4fb423},'args':[],'tdx':null});process[_0x5aff68(0x125)](_0x312f9c);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x117))['description'](a0_0x29b596(0x1f5))[a0_0x29b596(0x11e)](async(_0x3a9eff,_0x96b397,_0x3a5ee3)=>{const _0x4b8d82=a0_0x29b596,_0x34bcee=new UseCommand(),_0x2a3a9a=program[_0x4b8d82(0x128)](),_0x5c5433=[];if(_0x3a9eff)_0x5c5433['push'](_0x3a9eff);if(_0x96b397)_0x5c5433[_0x4b8d82(0x1a6)](_0x96b397);const _0x128aa4=await _0x34bcee[_0x4b8d82(0x215)]({'options':{..._0x2a3a9a,..._0x3a5ee3},'args':_0x5c5433,'tdx':null});process['exit'](_0x128aa4);}),program[a0_0x29b596(0x1d7)](a0_0x29b596(0x1c9))['description'](a0_0x29b596(0x1b1))[a0_0x29b596(0x11e)](async _0x12069a=>{const _0x36a13b=a0_0x29b596,_0x434002=new ProfilesCommand(),_0x550fd1=program[_0x36a13b(0x128)](),_0x5baf72=await _0x434002[_0x36a13b(0x215)]({'options':{..._0x550fd1,..._0x12069a},'args':[],'tdx':null});process[_0x36a13b(0x125)](_0x5baf72);}),program['parse'](process[a0_0x29b596(0x14a)]);!process['argv'][a0_0x29b596(0x22b)](0x2)['length']&&program[a0_0x29b596(0x123)]();const currentVersion=packageJson['version'];process['stderr']['isTTY']&&process[a0_0x29b596(0x14a)][a0_0x29b596(0x224)]>0x2&&!currentVersion[a0_0x29b596(0x15f)](a0_0x29b596(0x1de))&&checkForUpdate(currentVersion)[a0_0x29b596(0x1a4)](_0x27254b=>{_0x27254b&&displayUpdateNotification(_0x27254b);})['catch'](()=>{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a1_0x4c5c(){const _0x293a10=['listParentSegments','/segments/query','name','updateSegment','authHeaders','529jaTzDO','data','/segments','getParentSegmentSQL','createSegmentFolder','site','listActivations','2099238nIIyNC','apiKey','/entities/parent_segments/','rule','createdAt','/audiences','updatedAt','2670eLJMDZ','parentFolderId','45dmpvmC','/entities/parent_segments','createSegment','application/vnd.treasuredata.v1+json','GET','/entities/folders/','request','7325170lCTXSP','122392POZNJQ','query','POST','PUT','application/json','getSegmentFolder','isArray','/segments/','description','/audiences/','/folders','getSegment','httpClient','updateParentSegment','sql','1793820spiRjm','/syndications','10122yDJMjA','2611WgEdPw','87904rbaNdx','getSegmentSQL'];a1_0x4c5c=function(){return _0x293a10;};return a1_0x4c5c();}const a1_0x302579=a1_0x54d8;function a1_0x54d8(_0x3e06a6,_0x5b5357){const _0x4c5ced=a1_0x4c5c();return a1_0x54d8=function(_0x54d892,_0x5d2395){_0x54d892=_0x54d892-0x1ca;let _0x32a7d6=_0x4c5ced[_0x54d892];return _0x32a7d6;},a1_0x54d8(_0x3e06a6,_0x5b5357);}(function(_0x5d12c6,_0xb6d9d4){const _0x56cafd=a1_0x54d8,_0x58f031=_0x5d12c6();while(!![]){try{const _0x10af7f=-parseInt(_0x56cafd(0x1dc))/0x1*(parseInt(_0x56cafd(0x1ea))/0x2)+parseInt(_0x56cafd(0x1e3))/0x3+-parseInt(_0x56cafd(0x1d5))/0x4+parseInt(_0x56cafd(0x1d1))/0x5+-parseInt(_0x56cafd(0x1d3))/0x6*(parseInt(_0x56cafd(0x1d4))/0x7)+parseInt(_0x56cafd(0x1f4))/0x8*(-parseInt(_0x56cafd(0x1ec))/0x9)+parseInt(_0x56cafd(0x1f3))/0xa;if(_0x10af7f===_0xb6d9d4)break;else _0x58f031['push'](_0x58f031['shift']());}catch(_0x13193e){_0x58f031['push'](_0x58f031['shift']());}}}(a1_0x4c5c,0x572e2));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class CDPClient{[a1_0x302579(0x1ce)];[a1_0x302579(0x1db)];constructor(_0x48bb01,_0x3de6f3){const _0x3d99d8=a1_0x302579,_0x144b69=getEndpoint(_0x48bb01['site'],'cdp');this[_0x3d99d8(0x1db)]=toHeaderRecord(getAuthHeaders(_0x48bb01[_0x3d99d8(0x1e1)],_0x48bb01[_0x3d99d8(0x1e4)])),this[_0x3d99d8(0x1ce)]=new HTTPClient(_0x144b69,{...this[_0x3d99d8(0x1db)],'Accept':_0x3d99d8(0x1ef),'Content-Type':_0x3d99d8(0x1f8)},_0x3de6f3);}async[a1_0x302579(0x1d7)](){const _0x2a5680=a1_0x302579,_0x5599ba=_0x2a5680(0x1ed),_0x4e1a7f=await this[_0x2a5680(0x1ce)][_0x2a5680(0x1f2)]('GET',_0x5599ba);return Array['isArray'](_0x4e1a7f)?_0x4e1a7f:_0x4e1a7f[_0x2a5680(0x1dd)];}async['getParentSegment'](_0x3bf48a){const _0x1dc6fa=a1_0x302579,_0x2744d0=_0x1dc6fa(0x1e5)+_0x3bf48a,_0x52b203=await this[_0x1dc6fa(0x1ce)]['request'](_0x1dc6fa(0x1f0),_0x2744d0);return _0x1dc6fa(0x1dd)in _0x52b203?_0x52b203[_0x1dc6fa(0x1dd)]:_0x52b203;}async['listSegments'](_0x11c93d){const _0x3af855=a1_0x302579,_0x5c1b22=_0x3af855(0x1cb)+_0x11c93d+_0x3af855(0x1de),_0x11c074=await this[_0x3af855(0x1ce)]['request'](_0x3af855(0x1f0),_0x5c1b22);return Array[_0x3af855(0x1fa)](_0x11c074)?_0x11c074:_0x11c074[_0x3af855(0x1dd)];}async[a1_0x302579(0x1cd)](_0x329e33,_0xc3c7c){const _0x48b413=a1_0x302579,_0x4c521e='/audiences/'+_0x329e33+_0x48b413(0x1fb)+_0xc3c7c,_0x575d65=await this[_0x48b413(0x1ce)]['request'](_0x48b413(0x1f0),_0x4c521e);return _0x48b413(0x1dd)in _0x575d65?_0x575d65[_0x48b413(0x1dd)]:_0x575d65;}async['listSegmentFolders'](_0x2bee52){const _0x1576e4=a1_0x302579,_0x40c2cc='/audiences/'+_0x2bee52+_0x1576e4(0x1cc),_0x542f71=await this[_0x1576e4(0x1ce)][_0x1576e4(0x1f2)](_0x1576e4(0x1f0),_0x40c2cc);return Array[_0x1576e4(0x1fa)](_0x542f71)?_0x542f71:_0x542f71[_0x1576e4(0x1dd)];}async[a1_0x302579(0x1f9)](_0x4a2504){const _0x29722a=a1_0x302579,_0x30b4f0=_0x29722a(0x1f1)+_0x4a2504,_0x29c9d1=await this['httpClient']['request'](_0x29722a(0x1f0),_0x30b4f0);return _0x29722a(0x1dd)in _0x29c9d1?_0x29c9d1['data']:_0x29c9d1;}async[a1_0x302579(0x1e2)](_0x3bbb5b,_0x3803ae){const _0x3026a9=a1_0x302579,_0xe24d9f=_0x3026a9(0x1cb)+_0x3bbb5b+_0x3026a9(0x1fb)+_0x3803ae+_0x3026a9(0x1d2),_0x22de0e=await this[_0x3026a9(0x1ce)][_0x3026a9(0x1f2)](_0x3026a9(0x1f0),_0xe24d9f);return Array[_0x3026a9(0x1fa)](_0x22de0e)?_0x22de0e:_0x22de0e[_0x3026a9(0x1dd)];}async[a1_0x302579(0x1df)](_0x4ee6f2){const _0x38d85b=a1_0x302579,_0x2a41aa=_0x38d85b(0x1cb)+_0x4ee6f2+_0x38d85b(0x1d8),_0x3cf58d=await this['httpClient'][_0x38d85b(0x1f2)]('POST',_0x2a41aa,{'body':{'format':_0x38d85b(0x1d0)}});return _0x3cf58d['sql']||_0x3cf58d[_0x38d85b(0x1f5)]||'';}async[a1_0x302579(0x1d6)](_0x24eaca,_0x248ea3){const _0x523b3b=a1_0x302579,_0x111533=await this[_0x523b3b(0x1cd)](_0x24eaca,_0x248ea3),_0x48c7ae={'format':_0x523b3b(0x1d0)};'rule'in _0x111533&&_0x111533[_0x523b3b(0x1e6)]&&(_0x48c7ae[_0x523b3b(0x1e6)]=_0x111533[_0x523b3b(0x1e6)]);const _0x74853b='/audiences/'+_0x24eaca+_0x523b3b(0x1d8),_0x6388c=await this[_0x523b3b(0x1ce)][_0x523b3b(0x1f2)]('POST',_0x74853b,{'body':_0x48c7ae});return _0x6388c[_0x523b3b(0x1d0)]||_0x6388c['query']||'';}async['createParentSegment'](_0x2c4692){const _0x4abdfa=a1_0x302579,_0x3544e9=_0x4abdfa(0x1e8),_0x2f4cc1=await this[_0x4abdfa(0x1ce)][_0x4abdfa(0x1f2)](_0x4abdfa(0x1f6),_0x3544e9,{'body':_0x2c4692,'headers':{'Content-Type':_0x4abdfa(0x1ef)}});return _0x2f4cc1;}async[a1_0x302579(0x1cf)](_0x115145,_0x8113ff){const _0x133177=a1_0x302579,_0x15974f=_0x133177(0x1cb)+_0x115145,_0x58c221=await this[_0x133177(0x1ce)][_0x133177(0x1f2)](_0x133177(0x1f7),_0x15974f,{'body':_0x8113ff,'headers':{'Content-Type':_0x133177(0x1ef)}});return _0x58c221;}async['getParentSegmentFull'](_0x1fc7d5){const _0x9c4980=a1_0x302579,_0x2204c0='/audiences/'+_0x1fc7d5,_0x34cc45=await this[_0x9c4980(0x1ce)][_0x9c4980(0x1f2)](_0x9c4980(0x1f0),_0x2204c0,{'headers':{'Accept':_0x9c4980(0x1ef)}});return _0x34cc45;}async[a1_0x302579(0x1ee)](_0x302f45,_0xb97225){const _0x37ab4a=a1_0x302579,_0x3af49d=_0x37ab4a(0x1cb)+_0x302f45+_0x37ab4a(0x1de),_0x2730c4=await this['httpClient'][_0x37ab4a(0x1f2)](_0x37ab4a(0x1f6),_0x3af49d,{'body':_0xb97225});return _0x2730c4;}async[a1_0x302579(0x1da)](_0xe73576,_0x1d4bc4,_0x3739df){const _0x5e29b0=a1_0x302579,_0x322a18=_0x5e29b0(0x1cb)+_0xe73576+'/segments/'+_0x1d4bc4,_0x196e7a=await this[_0x5e29b0(0x1ce)][_0x5e29b0(0x1f2)]('PUT',_0x322a18,{'body':_0x3739df});return _0x196e7a;}async[a1_0x302579(0x1e0)](_0x1e1ba6,_0x83425a){const _0x4f5961=a1_0x302579,_0x5e05a3=_0x4f5961(0x1cb)+_0x1e1ba6+_0x4f5961(0x1cc),_0xee2fc7=await this['httpClient'][_0x4f5961(0x1f2)](_0x4f5961(0x1f6),_0x5e05a3,{'body':_0x83425a});if(_0x4f5961(0x1dd)in _0xee2fc7&&_0xee2fc7[_0x4f5961(0x1dd)]){const _0x471277=_0xee2fc7[_0x4f5961(0x1dd)];return{'id':_0x471277['id'],'name':_0x471277[_0x4f5961(0x1d9)],'description':_0x471277[_0x4f5961(0x1ca)],'audienceId':_0x471277['audienceId']||String(_0x1e1ba6),'parentFolderId':_0x471277[_0x4f5961(0x1eb)],'createdAt':_0x471277[_0x4f5961(0x1e7)],'updatedAt':_0x471277[_0x4f5961(0x1e9)]};}return _0xee2fc7;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a2_0x4d7b(_0x405f21,_0x56baa9){const _0xd833e1=a2_0xd833();return a2_0x4d7b=function(_0x4d7b78,_0x1cdec4){_0x4d7b78=_0x4d7b78-0x77;let _0x51ae7d=_0xd833e1[_0x4d7b78];return _0x51ae7d;},a2_0x4d7b(_0x405f21,_0x56baa9);}const a2_0x3d3e76=a2_0x4d7b;(function(_0x51f37,_0x5b02ea){const _0x3d3dfe=a2_0x4d7b,_0x17d6c7=_0x51f37();while(!![]){try{const _0x5dd87a=-parseInt(_0x3d3dfe(0x8f))/0x1+parseInt(_0x3d3dfe(0xa4))/0x2*(parseInt(_0x3d3dfe(0x80))/0x3)+parseInt(_0x3d3dfe(0xbb))/0x4+-parseInt(_0x3d3dfe(0xbf))/0x5*(parseInt(_0x3d3dfe(0x94))/0x6)+parseInt(_0x3d3dfe(0xa7))/0x7*(-parseInt(_0x3d3dfe(0x86))/0x8)+-parseInt(_0x3d3dfe(0xb7))/0x9+parseInt(_0x3d3dfe(0xbc))/0xa;if(_0x5dd87a===_0x5b02ea)break;else _0x17d6c7['push'](_0x17d6c7['shift']());}catch(_0x590d28){_0x17d6c7['push'](_0x17d6c7['shift']());}}}(a2_0xd833,0xd7fc4));import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x35f449 from'json-bigint';const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function isRetryableError(_0x2bf334){return _0x2bf334>=0x1f4||_0x2bf334===0x1ad;}function getRetryDelay(_0x55a647,_0x37371c){const _0x500738=a2_0x4d7b,_0xdd9756=Math[_0x500738(0xba)](_0x37371c[_0x500738(0xb2)]*Math['pow'](0x2,_0x55a647),_0x37371c[_0x500738(0x90)]);return Math[_0x500738(0xc1)]()*_0xdd9756;}function a2_0xd833(){const _0x53b206=['\x0a\x20\x20URL:\x20','trace','body','arraybuffer','name','NOT_FOUND','maxRetries','warn','118968wDkuPj','An\x20error\x20occurred','get','6209cRakmB','sleep','status','Request\x20to\x20','from','abort','instance','message','HTTPClientError','application/json','AbortError','baseDelay','baseUrl','parseProblemDetails','json','headers','8980290rNbxUH','arrayBuffer','string','min','2893180MporXb','34448050kLFcea','defaultHeaders','statusText','8755Aruqyl','stringify','random','PERMISSION_DENIED','[Retry\x20','aborted',']\x20Request\x20failed\x20with\x20','text','\x0a\x20\x20Details:\x20','debug','signal','UNAVAILABLE','\x20failed:\x20','code','parse','36xhFtZe','HTTP\x20','ms...',']\x20Request\x20failed\x20with\x20HTTP\x20',']:\x20','detail','8920ETnddV','RATE_LIMITED','INTERNAL','safeParseJSON','round','forEach','retrying\x20in\x20','Error','addEventListener','1746016VrlYyH','maxDelay','retryConfig','object','about:blank','906jsMSxC','HTTP_REQUEST_FAILURE','combineSignals','type','Content-Type','logger','INVALID_ARGUMENT','Request\x20cancelled\x20by\x20user'];a2_0xd833=function(){return _0x53b206;};return a2_0xd833();}function statusCodeToErrorCode(_0x1d9754){const _0x28345e=a2_0x4d7b;if(_0x1d9754===0x191)return ErrorCode['UNAUTHENTICATED'];else{if(_0x1d9754===0x193)return ErrorCode[_0x28345e(0xc2)];else{if(_0x1d9754===0x194)return ErrorCode[_0x28345e(0xa1)];else{if(_0x1d9754===0x1ad)return ErrorCode[_0x28345e(0x87)];else return _0x1d9754>=0x1f4?ErrorCode[_0x28345e(0x7c)]:ErrorCode[_0x28345e(0x9a)];}}}}export class HTTPClientError extends Error{['status'];['problemDetails'];['code'];constructor(_0x387941,_0x15117e,_0x4340b7){const _0x5022f0=a2_0x4d7b,_0x6af438=statusCodeToErrorCode(_0x15117e);super('['+_0x6af438+']\x20'+_0x387941),this[_0x5022f0(0xa9)]=_0x15117e,this['problemDetails']=_0x4340b7,this[_0x5022f0(0xa0)]=_0x5022f0(0xaf),this[_0x5022f0(0x7e)]=_0x6af438;}}export class HTTPClient{[a2_0x3d3e76(0x91)];[a2_0x3d3e76(0xb3)];[a2_0x3d3e76(0xbd)];['logger'];constructor(_0x193d88,_0xcde853,_0x318f07,_0x401bf3){const _0x404784=a2_0x3d3e76;this['baseUrl']=_0x193d88,this[_0x404784(0xbd)]=_0xcde853,this[_0x404784(0x91)]={...DEFAULT_RETRY_CONFIG,..._0x401bf3},this['logger']=_0x318f07;}async['request'](_0x27838e,_0x46182d,_0x592ded={}){const _0x3cdf66=a2_0x3d3e76,{headers:headers={},body:_0x21e7c9,timeout:timeout=0x7530,retries:retries=this[_0x3cdf66(0x91)][_0x3cdf66(0xa2)],signal:_0x4fd3e4,includeHeaders:includeHeaders=![],responseType:responseType=_0x3cdf66(0xb5)}=_0x592ded,_0x4b8e84=''+this['baseUrl']+_0x46182d;this[_0x3cdf66(0x99)]['info']('Request:\x20'+_0x27838e+'\x20'+_0x4b8e84);const _0x551244={...this[_0x3cdf66(0xbd)],...headers};if(_0x21e7c9&&!_0x551244[_0x3cdf66(0x98)]){if(_0x21e7c9 instanceof Buffer){}else _0x551244['Content-Type']=_0x3cdf66(0xb0);}let _0x394a99;_0x21e7c9&&(_0x21e7c9 instanceof Buffer?_0x394a99=_0x21e7c9:_0x394a99=typeof _0x21e7c9===_0x3cdf66(0xb9)?_0x21e7c9:JSON['stringify'](_0x21e7c9));let _0x160bbc=null;for(let _0x265fef=0x0;_0x265fef<=retries;_0x265fef++){try{const _0x9baeb=new AbortController(),_0x1bd7a5=setTimeout(()=>_0x9baeb[_0x3cdf66(0xac)](),timeout);if(_0x4fd3e4){if(_0x4fd3e4[_0x3cdf66(0xc4)])throw new Error(_0x3cdf66(0x9b));_0x4fd3e4[_0x3cdf66(0x8e)](_0x3cdf66(0xac),()=>_0x9baeb[_0x3cdf66(0xac)](),{'once':!![]});}const _0x45c82d=await fetch(_0x4b8e84,{'method':_0x27838e,'headers':_0x551244,'body':_0x394a99,'signal':_0x9baeb[_0x3cdf66(0x7b)]});clearTimeout(_0x1bd7a5);if(_0x265fef<retries&&isRetryableError(_0x45c82d[_0x3cdf66(0xa9)])){const _0x768062=_0x45c82d[_0x3cdf66(0xb6)][_0x3cdf66(0xa6)]('Retry-After'),_0x4f39a2=_0x768062?parseInt(_0x768062,0xa)*0x3e8:getRetryDelay(_0x265fef,this[_0x3cdf66(0x91)]);console[_0x3cdf66(0xa3)](_0x3cdf66(0xc3)+(_0x265fef+0x1)+'/'+retries+_0x3cdf66(0x77)+_0x45c82d[_0x3cdf66(0xa9)]+',\x20'+('retrying\x20in\x20'+Math['round'](_0x4f39a2)+_0x3cdf66(0x82))),await this[_0x3cdf66(0xa8)](_0x4f39a2);continue;}if(!_0x45c82d['ok']){const _0x195039=await this['safeParseJSON'](_0x45c82d),_0x3b815a=this[_0x3cdf66(0xb4)](_0x195039,_0x45c82d['status']);let _0x540b35;if(_0x45c82d[_0x3cdf66(0xa9)]===0x191)_0x540b35=_0x3cdf66(0x81)+_0x45c82d[_0x3cdf66(0xa9)]+':\x20'+_0x45c82d[_0x3cdf66(0xbe)]+_0x3cdf66(0x9c)+_0x4b8e84;else{if(_0x3b815a?.[_0x3cdf66(0x85)])_0x540b35=_0x3b815a[_0x3cdf66(0x85)];else{if(_0x195039){const _0x292b7d=JSON['stringify'](_0x195039);_0x540b35='HTTP\x20'+_0x45c82d[_0x3cdf66(0xa9)]+':\x20'+_0x45c82d[_0x3cdf66(0xbe)]+'\x0a\x20\x20Details:\x20'+_0x292b7d;}else _0x540b35=_0x3cdf66(0x81)+_0x45c82d[_0x3cdf66(0xa9)]+':\x20'+_0x45c82d[_0x3cdf66(0xbe)];}}throw new HTTPClientError(_0x540b35,_0x45c82d[_0x3cdf66(0xa9)],_0x3b815a);}let _0x29db0f;if(responseType===_0x3cdf66(0x9f)){const _0x4c2ef1=await _0x45c82d[_0x3cdf66(0xb8)]();_0x29db0f=Buffer[_0x3cdf66(0xab)](_0x4c2ef1);}else responseType===_0x3cdf66(0x78)?_0x29db0f=await _0x45c82d[_0x3cdf66(0x78)]():_0x29db0f=await this[_0x3cdf66(0x89)](_0x45c82d);this[_0x3cdf66(0x99)][_0x3cdf66(0x7a)]('Response\x20['+_0x45c82d[_0x3cdf66(0xa9)]+_0x3cdf66(0x84)+_0x27838e+'\x20'+_0x46182d),this[_0x3cdf66(0x99)][_0x3cdf66(0x9d)](JSON[_0x3cdf66(0xc0)](_0x29db0f,null,0x2));if(includeHeaders){const _0x43d7e5={};return _0x45c82d[_0x3cdf66(0xb6)][_0x3cdf66(0x8b)]((_0x457206,_0x2a0c32)=>{_0x43d7e5[_0x2a0c32]=_0x457206;}),{'data':_0x29db0f,'status':_0x45c82d[_0x3cdf66(0xa9)],'headers':_0x43d7e5};}return _0x29db0f;}catch(_0x22c1f8){_0x160bbc=_0x22c1f8 instanceof Error?_0x22c1f8:new Error(String(_0x22c1f8));if(_0x22c1f8 instanceof HTTPClientError&&!isRetryableError(_0x22c1f8['status']))throw _0x22c1f8;if(_0x265fef>=retries)throw _0x160bbc;const _0x4a3621=getRetryDelay(_0x265fef,this['retryConfig']);let _0x1c3e97;_0x160bbc instanceof HTTPClientError?_0x1c3e97=_0x3cdf66(0xc3)+(_0x265fef+0x1)+'/'+retries+_0x3cdf66(0x83)+_0x160bbc[_0x3cdf66(0xa9)]+':\x20'+_0x160bbc[_0x3cdf66(0xae)]+',\x20'+(_0x3cdf66(0x8c)+Math[_0x3cdf66(0x8a)](_0x4a3621)+_0x3cdf66(0x82)):_0x1c3e97=_0x3cdf66(0xc3)+(_0x265fef+0x1)+'/'+retries+']\x20Request\x20to\x20'+_0x4b8e84+_0x3cdf66(0x7d)+_0x160bbc[_0x3cdf66(0xae)]+',\x20'+(_0x3cdf66(0x8c)+Math['round'](_0x4a3621)+_0x3cdf66(0x82)),console[_0x3cdf66(0xa3)](_0x1c3e97),await this['sleep'](_0x4a3621);}}if(_0x160bbc&&!(_0x160bbc instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x3cdf66(0x95)],_0x3cdf66(0xaa)+_0x4b8e84+'\x20failed:\x20'+_0x160bbc[_0x3cdf66(0xae)],_0x160bbc);throw _0x160bbc||new SDKError(ErrorCode[_0x3cdf66(0x88)],'Request\x20failed\x20after\x20retries');}async['safeParseJSON'](_0x246289){const _0x1e9d54=a2_0x3d3e76,_0x5a72bd=await _0x246289[_0x1e9d54(0x78)]();if(!_0x5a72bd)return null;try{const _0xf18140=a2_0x35f449({'storeAsString':!![]});return _0xf18140[_0x1e9d54(0x7f)](_0x5a72bd);}catch{return{'body':_0x5a72bd};}}[a2_0x3d3e76(0xb4)](_0x4ad1fd,_0x17279e){const _0x24ea66=a2_0x3d3e76;if(!_0x4ad1fd||typeof _0x4ad1fd!==_0x24ea66(0x92))return undefined;const _0x282073=_0x4ad1fd;if(_0x282073[_0x24ea66(0x97)]||_0x282073['title']||_0x282073[_0x24ea66(0x85)])return{'type':_0x282073[_0x24ea66(0x97)]||_0x24ea66(0x93),'title':_0x282073['title']||_0x24ea66(0x8d),'status':_0x282073[_0x24ea66(0xa9)]||_0x17279e,'detail':_0x282073[_0x24ea66(0x85)]||_0x24ea66(0xa5),'instance':_0x282073[_0x24ea66(0xad)]||'',..._0x282073};return undefined;}[a2_0x3d3e76(0xa8)](_0x532223){return new Promise(_0x26dc12=>setTimeout(_0x26dc12,_0x532223));}async['requestSSE'](_0x5d06e6,_0x398fc3,_0x3f80ba={}){const _0x3febb7=a2_0x3d3e76,{headers:headers={},body:_0x55b172,timeout:timeout=0x7530,signal:_0x594e77}=_0x3f80ba,_0x3c4659=''+this[_0x3febb7(0xb3)]+_0x398fc3,_0x46926d={...this['defaultHeaders'],...headers},_0x51a3e9=new AbortController(),_0x476d81=setTimeout(()=>_0x51a3e9['abort'](),timeout),_0x12044c=_0x594e77?[_0x51a3e9['signal'],_0x594e77]:[_0x51a3e9[_0x3febb7(0x7b)]],_0x2e1fb8=this[_0x3febb7(0x96)](_0x12044c);try{const _0x57b749={'method':_0x5d06e6,'headers':_0x46926d,'signal':_0x2e1fb8};if(_0x55b172){if(typeof _0x55b172===_0x3febb7(0xb9))_0x57b749['body']=_0x55b172;else _0x55b172 instanceof Buffer?_0x57b749[_0x3febb7(0x9e)]=_0x55b172:_0x57b749[_0x3febb7(0x9e)]=JSON[_0x3febb7(0xc0)](_0x55b172);}const _0x5584ab=await fetch(_0x3c4659,_0x57b749);clearTimeout(_0x476d81);if(!_0x5584ab['ok']){const _0x56b446=await this[_0x3febb7(0x89)](_0x5584ab),_0x5beca1=this[_0x3febb7(0xb4)](_0x56b446,_0x5584ab[_0x3febb7(0xa9)]);let _0x28469f;if(_0x5584ab[_0x3febb7(0xa9)]===0x191)_0x28469f=_0x3febb7(0x81)+_0x5584ab[_0x3febb7(0xa9)]+':\x20'+_0x5584ab['statusText']+_0x3febb7(0x9c)+_0x3c4659;else{if(_0x5beca1?.[_0x3febb7(0x85)])_0x28469f=_0x5beca1[_0x3febb7(0x85)];else{if(_0x56b446){const _0x9c337e=JSON[_0x3febb7(0xc0)](_0x56b446);_0x28469f=_0x3febb7(0x81)+_0x5584ab['status']+':\x20'+_0x5584ab['statusText']+_0x3febb7(0x79)+_0x9c337e;}else _0x28469f=_0x3febb7(0x81)+_0x5584ab[_0x3febb7(0xa9)]+':\x20'+_0x5584ab[_0x3febb7(0xbe)];}}throw new HTTPClientError(_0x28469f,_0x5584ab[_0x3febb7(0xa9)],_0x5beca1);}return _0x5584ab;}catch(_0x1f782d){clearTimeout(_0x476d81);if(_0x1f782d instanceof HTTPClientError)throw _0x1f782d;if(_0x1f782d[_0x3febb7(0xa0)]===_0x3febb7(0xb1))throw new Error(_0x3febb7(0x9b));throw _0x1f782d;}}[a2_0x3d3e76(0x96)](_0x2f8bd9){const _0x164988=a2_0x3d3e76,_0x42ac8c=new AbortController();for(const _0x13902c of _0x2f8bd9){if(_0x13902c['aborted'])return _0x42ac8c[_0x164988(0xac)](),_0x42ac8c[_0x164988(0x7b)];_0x13902c[_0x164988(0x8e)](_0x164988(0xac),()=>_0x42ac8c[_0x164988(0xac)](),{'once':!![]});}return _0x42ac8c[_0x164988(0x7b)];}}
|
|
1
|
+
const a2_0xd0012e=a2_0x5e6a;(function(_0x3f0c03,_0x1be56a){const _0x597f9f=a2_0x5e6a,_0x50dc42=_0x3f0c03();while(!![]){try{const _0x10b054=parseInt(_0x597f9f(0x174))/0x1+parseInt(_0x597f9f(0x137))/0x2*(parseInt(_0x597f9f(0x152))/0x3)+parseInt(_0x597f9f(0x145))/0x4+-parseInt(_0x597f9f(0x16a))/0x5*(parseInt(_0x597f9f(0x177))/0x6)+parseInt(_0x597f9f(0x135))/0x7*(-parseInt(_0x597f9f(0x17e))/0x8)+parseInt(_0x597f9f(0x173))/0x9*(parseInt(_0x597f9f(0x13d))/0xa)+-parseInt(_0x597f9f(0x16e))/0xb*(-parseInt(_0x597f9f(0x164))/0xc);if(_0x10b054===_0x1be56a)break;else _0x50dc42['push'](_0x50dc42['shift']());}catch(_0x521ac9){_0x50dc42['push'](_0x50dc42['shift']());}}}(a2_0x2cfc,0x4cb29));import{ErrorCode,SDKError}from'../sdk/errors.js';import a2_0x56f06d from'json-bigint';function a2_0x5e6a(_0x9b7448,_0x111fef){const _0x2cfc8f=a2_0x2cfc();return a2_0x5e6a=function(_0x5e6a42,_0x219024){_0x5e6a42=_0x5e6a42-0x135;let _0x4ea9a0=_0x2cfc8f[_0x5e6a42];return _0x4ea9a0;},a2_0x5e6a(_0x9b7448,_0x111fef);}const DEFAULT_RETRY_CONFIG={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1f40};function isRetryableError(_0x5d32c7){return _0x5d32c7>=0x1f4||_0x5d32c7===0x1ad;}function getRetryDelay(_0xf9d6ab,_0x420a48){const _0x5430cd=a2_0x5e6a,_0x4d831d=Math[_0x5430cd(0x149)](_0x420a48[_0x5430cd(0x175)]*Math['pow'](0x2,_0xf9d6ab),_0x420a48[_0x5430cd(0x147)]);return Math[_0x5430cd(0x156)]()*_0x4d831d;}function a2_0x2cfc(){const _0x4ee0ed=['body','14qlZTiv','name','json','defaultHeaders','arraybuffer','parseProblemDetails','653680fGDTid','HTTPClientError','combineSignals','AbortError','INVALID_ARGUMENT',']\x20Request\x20failed\x20with\x20','from','retryConfig','474072MkMqkl','\x20failed:\x20','maxDelay','title','min','detail','baseUrl','logger','addEventListener','Retry-After','HTTP_REQUEST_FAILURE','string','aborted','70377OxxzaK','get','ms...','about:blank','random','HTTP\x20','stringify','Request\x20to\x20','safeParseJSON','An\x20error\x20occurred',']\x20Request\x20to\x20','abort','headers','problemDetails','signal',']\x20Request\x20failed\x20with\x20HTTP\x20','RATE_LIMITED','maxRetries','1764708jQILAb','\x0a\x20\x20URL:\x20','request','UNAUTHENTICATED','Error','Content-Type','240WSTYwZ','statusText','trace','instance','33vlyzPo','message','retrying\x20in\x20','type','forEach','27HWDFdh','33980TPievW','baseDelay','Request\x20failed\x20after\x20retries','54852JoVUZu','Request\x20cancelled\x20by\x20user','[Retry\x20','sleep','code','text','round','39224sjZPLn','PERMISSION_DENIED','status','287LWCLsr'];a2_0x2cfc=function(){return _0x4ee0ed;};return a2_0x2cfc();}function statusCodeToErrorCode(_0x2b28e6){const _0x51c080=a2_0x5e6a;if(_0x2b28e6===0x191)return ErrorCode[_0x51c080(0x167)];else{if(_0x2b28e6===0x193)return ErrorCode[_0x51c080(0x17f)];else{if(_0x2b28e6===0x194)return ErrorCode['NOT_FOUND'];else{if(_0x2b28e6===0x1ad)return ErrorCode[_0x51c080(0x162)];else return _0x2b28e6>=0x1f4?ErrorCode['UNAVAILABLE']:ErrorCode[_0x51c080(0x141)];}}}}export class HTTPClientError extends Error{[a2_0xd0012e(0x180)];[a2_0xd0012e(0x15f)];['code'];constructor(_0x25cffe,_0x43e3eb,_0x3dfc0d){const _0x46ea2d=a2_0xd0012e,_0x25e251=statusCodeToErrorCode(_0x43e3eb);super('['+_0x25e251+']\x20'+_0x25cffe),this[_0x46ea2d(0x180)]=_0x43e3eb,this[_0x46ea2d(0x15f)]=_0x3dfc0d,this['name']=_0x46ea2d(0x13e),this[_0x46ea2d(0x17b)]=_0x25e251;}}export class HTTPClient{[a2_0xd0012e(0x144)];['baseUrl'];[a2_0xd0012e(0x13a)];[a2_0xd0012e(0x14c)];constructor(_0x4b8690,_0x58a40c,_0x2b8155,_0x220523){const _0x3440a9=a2_0xd0012e;this[_0x3440a9(0x14b)]=_0x4b8690,this[_0x3440a9(0x13a)]=_0x58a40c,this[_0x3440a9(0x144)]={...DEFAULT_RETRY_CONFIG,..._0x220523},this[_0x3440a9(0x14c)]=_0x2b8155;}async[a2_0xd0012e(0x166)](_0x3a15cc,_0x45ae47,_0x6e8caa={}){const _0x1d9f7b=a2_0xd0012e,{headers:headers={},body:_0x21e11a,timeout:timeout=0x7530,retries:retries=this['retryConfig'][_0x1d9f7b(0x163)],signal:_0x582058,includeHeaders:includeHeaders=![],responseType:responseType=_0x1d9f7b(0x139)}=_0x6e8caa,_0x1870bc=''+this[_0x1d9f7b(0x14b)]+_0x45ae47;this[_0x1d9f7b(0x14c)]['info']('Request:\x20'+_0x3a15cc+'\x20'+_0x1870bc);const _0x2d9586={...this['defaultHeaders'],...headers};if(_0x21e11a&&!_0x2d9586[_0x1d9f7b(0x169)]){if(_0x21e11a instanceof Buffer){}else _0x2d9586[_0x1d9f7b(0x169)]='application/json';}let _0x39d525;_0x21e11a&&(_0x21e11a instanceof Buffer?_0x39d525=_0x21e11a:_0x39d525=typeof _0x21e11a===_0x1d9f7b(0x150)?_0x21e11a:JSON[_0x1d9f7b(0x158)](_0x21e11a));let _0x48364f=null;for(let _0x4586aa=0x0;_0x4586aa<=retries;_0x4586aa++){try{const _0x405a97=new AbortController(),_0x3d78e6=setTimeout(()=>_0x405a97[_0x1d9f7b(0x15d)](),timeout);if(_0x582058){if(_0x582058[_0x1d9f7b(0x151)])throw new Error(_0x1d9f7b(0x178));_0x582058[_0x1d9f7b(0x14d)]('abort',()=>_0x405a97['abort'](),{'once':!![]});}const _0x5ad7ae=await fetch(_0x1870bc,{'method':_0x3a15cc,'headers':_0x2d9586,'body':_0x39d525,'signal':_0x405a97[_0x1d9f7b(0x160)]});clearTimeout(_0x3d78e6);if(_0x4586aa<retries&&isRetryableError(_0x5ad7ae[_0x1d9f7b(0x180)])){const _0x1d01f8=_0x5ad7ae[_0x1d9f7b(0x15e)][_0x1d9f7b(0x153)](_0x1d9f7b(0x14e)),_0x3a418b=_0x1d01f8?parseInt(_0x1d01f8,0xa)*0x3e8:getRetryDelay(_0x4586aa,this['retryConfig']);console['warn'](_0x1d9f7b(0x179)+(_0x4586aa+0x1)+'/'+retries+_0x1d9f7b(0x142)+_0x5ad7ae[_0x1d9f7b(0x180)]+',\x20'+(_0x1d9f7b(0x170)+Math['round'](_0x3a418b)+_0x1d9f7b(0x154))),await this[_0x1d9f7b(0x17a)](_0x3a418b);continue;}if(!_0x5ad7ae['ok']){const _0x19fc54=await this[_0x1d9f7b(0x15a)](_0x5ad7ae),_0xc05864=this['parseProblemDetails'](_0x19fc54,_0x5ad7ae['status']);let _0x2497d3;if(_0x5ad7ae[_0x1d9f7b(0x180)]===0x191)_0x2497d3=_0x1d9f7b(0x157)+_0x5ad7ae[_0x1d9f7b(0x180)]+':\x20'+_0x5ad7ae[_0x1d9f7b(0x16b)]+_0x1d9f7b(0x165)+_0x1870bc;else{if(_0xc05864?.[_0x1d9f7b(0x14a)])_0x2497d3=_0xc05864[_0x1d9f7b(0x14a)];else{if(_0x19fc54){const _0x3a77dd=JSON[_0x1d9f7b(0x158)](_0x19fc54);_0x2497d3=_0x1d9f7b(0x157)+_0x5ad7ae[_0x1d9f7b(0x180)]+':\x20'+_0x5ad7ae[_0x1d9f7b(0x16b)]+'\x0a\x20\x20Details:\x20'+_0x3a77dd;}else _0x2497d3='HTTP\x20'+_0x5ad7ae[_0x1d9f7b(0x180)]+':\x20'+_0x5ad7ae[_0x1d9f7b(0x16b)];}}throw new HTTPClientError(_0x2497d3,_0x5ad7ae[_0x1d9f7b(0x180)],_0xc05864);}let _0x3a3427;if(responseType===_0x1d9f7b(0x13b)){const _0x3cb32b=await _0x5ad7ae['arrayBuffer']();_0x3a3427=Buffer[_0x1d9f7b(0x143)](_0x3cb32b);}else responseType==='text'?_0x3a3427=await _0x5ad7ae[_0x1d9f7b(0x17c)]():_0x3a3427=await this[_0x1d9f7b(0x15a)](_0x5ad7ae);this[_0x1d9f7b(0x14c)]['debug']('Response\x20['+_0x5ad7ae['status']+']:\x20'+_0x3a15cc+'\x20'+_0x45ae47),this[_0x1d9f7b(0x14c)][_0x1d9f7b(0x16c)](JSON['stringify'](_0x3a3427,null,0x2));if(includeHeaders){const _0x18439f={};return _0x5ad7ae[_0x1d9f7b(0x15e)][_0x1d9f7b(0x172)]((_0x517a6e,_0x33ffa0)=>{_0x18439f[_0x33ffa0]=_0x517a6e;}),{'data':_0x3a3427,'status':_0x5ad7ae['status'],'headers':_0x18439f};}return _0x3a3427;}catch(_0x58d76b){_0x48364f=_0x58d76b instanceof Error?_0x58d76b:new Error(String(_0x58d76b));if(_0x58d76b instanceof HTTPClientError&&!isRetryableError(_0x58d76b[_0x1d9f7b(0x180)]))throw _0x58d76b;if(_0x4586aa>=retries)throw _0x48364f;const _0x63589b=getRetryDelay(_0x4586aa,this[_0x1d9f7b(0x144)]);let _0x8095b3;_0x48364f instanceof HTTPClientError?_0x8095b3=_0x1d9f7b(0x179)+(_0x4586aa+0x1)+'/'+retries+_0x1d9f7b(0x161)+_0x48364f[_0x1d9f7b(0x180)]+':\x20'+_0x48364f[_0x1d9f7b(0x16f)]+',\x20'+(_0x1d9f7b(0x170)+Math[_0x1d9f7b(0x17d)](_0x63589b)+_0x1d9f7b(0x154)):_0x8095b3='[Retry\x20'+(_0x4586aa+0x1)+'/'+retries+_0x1d9f7b(0x15c)+_0x1870bc+_0x1d9f7b(0x146)+_0x48364f[_0x1d9f7b(0x16f)]+',\x20'+('retrying\x20in\x20'+Math[_0x1d9f7b(0x17d)](_0x63589b)+_0x1d9f7b(0x154)),console['warn'](_0x8095b3),await this[_0x1d9f7b(0x17a)](_0x63589b);}}if(_0x48364f&&!(_0x48364f instanceof HTTPClientError))throw new SDKError(ErrorCode[_0x1d9f7b(0x14f)],_0x1d9f7b(0x159)+_0x1870bc+_0x1d9f7b(0x146)+_0x48364f[_0x1d9f7b(0x16f)],_0x48364f);throw _0x48364f||new SDKError(ErrorCode['INTERNAL'],_0x1d9f7b(0x176));}async[a2_0xd0012e(0x15a)](_0x36ead9){const _0x2b72dc=a2_0xd0012e,_0x58ed21=await _0x36ead9[_0x2b72dc(0x17c)]();if(!_0x58ed21)return null;try{const _0x592711=a2_0x56f06d({'storeAsString':!![]});return _0x592711['parse'](_0x58ed21);}catch{return{'body':_0x58ed21};}}[a2_0xd0012e(0x13c)](_0x20e5ab,_0x4f32ce){const _0x2876d1=a2_0xd0012e;if(!_0x20e5ab||typeof _0x20e5ab!=='object')return undefined;const _0x507346=_0x20e5ab;if(_0x507346[_0x2876d1(0x171)]||_0x507346[_0x2876d1(0x148)]||_0x507346[_0x2876d1(0x14a)])return{'type':_0x507346[_0x2876d1(0x171)]||_0x2876d1(0x155),'title':_0x507346[_0x2876d1(0x148)]||_0x2876d1(0x168),'status':_0x507346[_0x2876d1(0x180)]||_0x4f32ce,'detail':_0x507346[_0x2876d1(0x14a)]||_0x2876d1(0x15b),'instance':_0x507346[_0x2876d1(0x16d)]||'',..._0x507346};return undefined;}[a2_0xd0012e(0x17a)](_0x59d0e5){return new Promise(_0x228bb5=>setTimeout(_0x228bb5,_0x59d0e5));}async['requestSSE'](_0x285a4a,_0x553dc4,_0x47a628={}){const _0x4d7c=a2_0xd0012e,{headers:headers={},body:_0x367c63,timeout:timeout=0x7530,signal:_0x17766b}=_0x47a628,_0x4d8ddc=''+this[_0x4d7c(0x14b)]+_0x553dc4,_0x226c10={...this[_0x4d7c(0x13a)],...headers},_0x5cc6d9=new AbortController(),_0x885e22=setTimeout(()=>_0x5cc6d9[_0x4d7c(0x15d)](),timeout),_0x181d39=_0x17766b?[_0x5cc6d9['signal'],_0x17766b]:[_0x5cc6d9['signal']],_0x3ecb65=this[_0x4d7c(0x13f)](_0x181d39);try{const _0x246b27={'method':_0x285a4a,'headers':_0x226c10,'signal':_0x3ecb65};if(_0x367c63){if(typeof _0x367c63==='string')_0x246b27[_0x4d7c(0x136)]=_0x367c63;else _0x367c63 instanceof Buffer?_0x246b27[_0x4d7c(0x136)]=_0x367c63:_0x246b27[_0x4d7c(0x136)]=JSON[_0x4d7c(0x158)](_0x367c63);}const _0x34d3f9=await fetch(_0x4d8ddc,_0x246b27);clearTimeout(_0x885e22);if(!_0x34d3f9['ok']){const _0x75a9a3=await this[_0x4d7c(0x15a)](_0x34d3f9),_0x12532b=this[_0x4d7c(0x13c)](_0x75a9a3,_0x34d3f9[_0x4d7c(0x180)]);let _0x259cd3;if(_0x34d3f9[_0x4d7c(0x180)]===0x191)_0x259cd3='HTTP\x20'+_0x34d3f9[_0x4d7c(0x180)]+':\x20'+_0x34d3f9['statusText']+_0x4d7c(0x165)+_0x4d8ddc;else{if(_0x12532b?.[_0x4d7c(0x14a)])_0x259cd3=_0x12532b[_0x4d7c(0x14a)];else{if(_0x75a9a3){const _0x1f8c54=JSON[_0x4d7c(0x158)](_0x75a9a3);_0x259cd3=_0x4d7c(0x157)+_0x34d3f9['status']+':\x20'+_0x34d3f9[_0x4d7c(0x16b)]+'\x0a\x20\x20Details:\x20'+_0x1f8c54;}else _0x259cd3=_0x4d7c(0x157)+_0x34d3f9['status']+':\x20'+_0x34d3f9[_0x4d7c(0x16b)];}}throw new HTTPClientError(_0x259cd3,_0x34d3f9[_0x4d7c(0x180)],_0x12532b);}return _0x34d3f9;}catch(_0x5cd5ad){clearTimeout(_0x885e22);if(_0x5cd5ad instanceof HTTPClientError)throw _0x5cd5ad;if(_0x5cd5ad[_0x4d7c(0x138)]===_0x4d7c(0x140))throw new Error('Request\x20cancelled\x20by\x20user');throw _0x5cd5ad;}}[a2_0xd0012e(0x13f)](_0x2f0bd3){const _0x3d59fc=a2_0xd0012e,_0x2f8369=new AbortController();for(const _0x15848f of _0x2f0bd3){if(_0x15848f[_0x3d59fc(0x151)])return _0x2f8369[_0x3d59fc(0x15d)](),_0x2f8369['signal'];_0x15848f[_0x3d59fc(0x14d)](_0x3d59fc(0x15d),()=>_0x2f8369[_0x3d59fc(0x15d)](),{'once':!![]});}return _0x2f8369[_0x3d59fc(0x160)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x4624be=a3_0x1fe1;function a3_0x1fe1(_0x436301,_0x5eb66c){const _0x55ebfb=a3_0x55eb();return a3_0x1fe1=function(_0x1fe1d1,_0x1f84d9){_0x1fe1d1=_0x1fe1d1-0xd7;let _0x321516=_0x55ebfb[_0x1fe1d1];return _0x321516;},a3_0x1fe1(_0x436301,_0x5eb66c);}(function(_0x1a034f,_0x9f0f3f){const _0x4e5ca3=a3_0x1fe1,_0x5b908c=_0x1a034f();while(!![]){try{const _0x2a0cba=parseInt(_0x4e5ca3(0xdd))/0x1+parseInt(_0x4e5ca3(0xe6))/0x2*(-parseInt(_0x4e5ca3(0xe2))/0x3)+-parseInt(_0x4e5ca3(0xda))/0x4+parseInt(_0x4e5ca3(0xe4))/0x5+-parseInt(_0x4e5ca3(0xf1))/0x6+-parseInt(_0x4e5ca3(0x112))/0x7*(parseInt(_0x4e5ca3(0xe9))/0x8)+parseInt(_0x4e5ca3(0xf3))/0x9*(parseInt(_0x4e5ca3(0x11a))/0xa);if(_0x2a0cba===_0x9f0f3f)break;else _0x5b908c['push'](_0x5b908c['shift']());}catch(_0x2416ea){_0x5b908c['push'](_0x5b908c['shift']());}}}(a3_0x55eb,0x4efae));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{parseSSEStream}from'../utils/sse-parser.js';import{ErrorCode,SDKError}from'../sdk/errors.js';export class LLMClient{['httpClient'];[a3_0x4624be(0xf5)];[a3_0x4624be(0xe5)];[a3_0x4624be(0xfd)];constructor(_0x4c8a94,_0x4656fd){const _0x2ae510=a3_0x4624be;this[_0x2ae510(0xf5)]=getEndpoint(_0x4c8a94[_0x2ae510(0xf0)],_0x2ae510(0x109)),this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x4c8a94[_0x2ae510(0xf0)],_0x4c8a94['apiKey'])),this[_0x2ae510(0xfd)]=_0x4656fd,this[_0x2ae510(0x118)]=new HTTPClient(this['baseUrl'],this['authHeaders'],_0x4656fd);}async[a3_0x4624be(0xf9)](){const _0x55e140=a3_0x4624be;return await this['httpClient'][_0x55e140(0xf6)]('GET','/api/users/current_settings');}async[a3_0x4624be(0x10b)](_0x53b99a){const _0x2a71c3=a3_0x4624be,_0x588cba={'data':{'type':_0x2a71c3(0xeb),'attributes':{'name':_0x53b99a[_0x2a71c3(0x10f)],..._0x53b99a['description']&&{'description':_0x53b99a[_0x2a71c3(0x124)]}}}},_0x157075=await this['httpClient'][_0x2a71c3(0xf6)](_0x2a71c3(0x119),_0x2a71c3(0xfa),{'headers':{'Content-Type':'application/vnd.api+json','Accept':_0x2a71c3(0xf2)},'body':_0x588cba});return _0x157075[_0x2a71c3(0xdc)];}async[a3_0x4624be(0xf7)](_0x322a59){const _0x4d8e26=a3_0x4624be,_0x55e091=_0x4d8e26(0xe8)+encodeURIComponent(_0x322a59);await this['httpClient'][_0x4d8e26(0xf6)](_0x4d8e26(0xef),_0x55e091);}async[a3_0x4624be(0x113)](_0x5c1b93=0x32){const _0x309618=a3_0x4624be,_0x160627=[];let _0x1c4b39=_0x309618(0xd9)+_0x5c1b93;while(_0x1c4b39){const _0x183fea=await this[_0x309618(0x118)][_0x309618(0xf6)]('GET',_0x1c4b39);_0x183fea[_0x309618(0xdc)]&&_0x160627[_0x309618(0xe7)](..._0x183fea['data']);_0x1c4b39=_0x183fea[_0x309618(0xfe)]?.[_0x309618(0x115)];if(_0x1c4b39&&_0x1c4b39[_0x309618(0x121)]('http')){const _0x19627d=new URL(_0x1c4b39);_0x1c4b39=_0x19627d['pathname']+_0x19627d[_0x309618(0x10d)];}}return _0x160627;}async[a3_0x4624be(0xfb)](_0x26a916){const _0x434195=a3_0x4624be;let _0x5d9693='/api/agents';_0x26a916&&(_0x5d9693+=_0x434195(0x116)+encodeURIComponent(_0x26a916));const _0x3e027b=await this[_0x434195(0x118)][_0x434195(0xf6)](_0x434195(0x10e),_0x5d9693);return _0x3e027b[_0x434195(0xdc)]||[];}async[a3_0x4624be(0xe3)](_0x4234a3){const _0x1f500f=a3_0x4624be,_0x101fd1=_0x1f500f(0xec)+encodeURIComponent(_0x4234a3),_0x3fe892=await this[_0x1f500f(0x118)][_0x1f500f(0xf6)]('GET',_0x101fd1);return _0x3fe892['data'];}async['createAgent'](_0x3da9c4){const _0x210eea=a3_0x4624be,_0x55938d={'name':_0x3da9c4[_0x210eea(0x10f)],'projectId':_0x3da9c4[_0x210eea(0x125)],'modelType':_0x3da9c4[_0x210eea(0x110)],'maxToolIterations':_0x3da9c4['maxToolIterations']??0x4,'temperature':_0x3da9c4[_0x210eea(0x11d)]??0.7};_0x3da9c4[_0x210eea(0xe0)]!==undefined&&(_0x55938d[_0x210eea(0xe0)]=_0x3da9c4[_0x210eea(0xe0)]);_0x3da9c4[_0x210eea(0xf4)]&&(_0x55938d[_0x210eea(0xf4)]=_0x3da9c4[_0x210eea(0xf4)]);const _0x4f039a={'data':{'type':_0x210eea(0x11b),'attributes':_0x55938d}},_0x32886a=await this['httpClient'][_0x210eea(0xf6)](_0x210eea(0x119),'/api/agents',{'headers':{'Content-Type':_0x210eea(0xf2),'Accept':_0x210eea(0xf2)},'body':_0x4f039a});return _0x32886a[_0x210eea(0xdc)];}async['updateAgent'](_0x492f4f,_0x443beb){const _0x5cb51f=a3_0x4624be,_0x4ba068={'data':{'type':_0x5cb51f(0x11b),'id':_0x492f4f,'attributes':{..._0x443beb['name']&&{'name':_0x443beb[_0x5cb51f(0x10f)]},..._0x443beb['description']&&{'description':_0x443beb[_0x5cb51f(0x124)]},..._0x443beb[_0x5cb51f(0x123)]&&{'prompt':_0x443beb['prompt']},..._0x443beb[_0x5cb51f(0xf4)]&&{'starter_message':_0x443beb[_0x5cb51f(0xf4)]}}}},_0x37bb88=_0x5cb51f(0xec)+encodeURIComponent(_0x492f4f),_0x5714b5=await this[_0x5cb51f(0x118)][_0x5cb51f(0xf6)](_0x5cb51f(0x100),_0x37bb88,{'body':_0x4ba068});return _0x5714b5[_0x5cb51f(0xdc)];}async['deleteAgent'](_0x5af54e){const _0x51a9ac=a3_0x4624be,_0x300299=_0x51a9ac(0xec)+encodeURIComponent(_0x5af54e);await this[_0x51a9ac(0x118)][_0x51a9ac(0xf6)](_0x51a9ac(0xef),_0x300299);}async['listChats'](_0x21046f=0x32){const _0x15b946=a3_0x4624be,_0x164828=new URLSearchParams();_0x164828[_0x15b946(0x101)](_0x15b946(0x120),String(_0x21046f)),_0x164828[_0x15b946(0x101)](_0x15b946(0xf8),'-last_conversation_at');const _0x1cb156=_0x15b946(0xde)+_0x164828[_0x15b946(0x117)](),_0x3efcc5=await this[_0x15b946(0x118)]['request'](_0x15b946(0x10e),_0x1cb156);return _0x3efcc5['data']||[];}async[a3_0x4624be(0x114)](_0x33da8d){const _0x3509d6=a3_0x4624be,_0x385606='/api/chats/'+encodeURIComponent(_0x33da8d),_0x5c70c4=await this['httpClient'][_0x3509d6(0xf6)](_0x3509d6(0x10e),_0x385606);return _0x5c70c4[_0x3509d6(0xdc)];}async[a3_0x4624be(0x11f)](_0x3a688c){const _0x38d130=a3_0x4624be,_0x412a9a=_0x38d130(0x11c)+encodeURIComponent(_0x3a688c)+_0x38d130(0xdb);return await this[_0x38d130(0x118)][_0x38d130(0xf6)](_0x38d130(0x10e),_0x412a9a);}async[a3_0x4624be(0xdf)](_0x675a23){const _0x24670b=a3_0x4624be,_0x4852a8={'data':{'type':_0x24670b(0x126),'attributes':{'agentId':_0x675a23['agentId']}}},_0x5d2fad=0x3,_0x1f5eb7=[0x3e8,0x7d0,0xfa0];for(let _0x529753=0x0;_0x529753<=_0x5d2fad;_0x529753++){const _0x3d33bd=await this[_0x24670b(0x118)]['request'](_0x24670b(0x119),_0x24670b(0x111),{'headers':{'Content-Type':_0x24670b(0xf2),'Accept':_0x24670b(0xf2)},'body':_0x4852a8});if(_0x3d33bd['data']&&_0x3d33bd[_0x24670b(0xdc)]['id'])return _0x3d33bd[_0x24670b(0xdc)];if(_0x529753>=_0x5d2fad)throw new SDKError(ErrorCode[_0x24670b(0xed)],'Failed\x20to\x20create\x20chat\x20after\x20'+(_0x5d2fad+0x1)+_0x24670b(0xd8));const _0x338a83=_0x1f5eb7[_0x529753];console[_0x24670b(0xff)]('[Retry\x20'+(_0x529753+0x1)+'/'+_0x5d2fad+_0x24670b(0x103)+_0x338a83+_0x24670b(0x107)),await new Promise(_0x1d3e4f=>setTimeout(_0x1d3e4f,_0x338a83));}throw new SDKError(ErrorCode[_0x24670b(0xed)],_0x24670b(0x106));}async*['continueChat'](_0x3cd986,_0x4289c9,_0x561cf0){const _0x2bd1fc=a3_0x4624be,_0xdfd79f=_0x4289c9[_0x2bd1fc(0x102)]();if(!_0xdfd79f)throw new SDKError(ErrorCode[_0x2bd1fc(0xd7)],_0x2bd1fc(0x127),undefined,{'helpText':_0x2bd1fc(0x11e)});this[_0x2bd1fc(0xfd)][_0x2bd1fc(0x104)]('Continuing\x20chat\x20'+_0x3cd986+_0x2bd1fc(0x10c)+_0x4289c9[_0x2bd1fc(0xea)]+_0x2bd1fc(0xee));const _0x1858ea='/api/chats/'+encodeURIComponent(_0x3cd986)+'/continue',_0x4d2740={'input':_0x4289c9};try{const _0xcf5518=await this[_0x2bd1fc(0x118)]['requestSSE']('POST',_0x1858ea,{'headers':{'Content-Type':_0x2bd1fc(0x105),'Accept':_0x2bd1fc(0x122)},'body':_0x4d2740,'signal':_0x561cf0});this[_0x2bd1fc(0xfd)]['debug']('['+_0xcf5518['status']+_0x2bd1fc(0x108)+_0x3cd986),yield*parseSSEStream(_0xcf5518);}catch(_0x1008f7){throw new SDKError(ErrorCode[_0x2bd1fc(0xfc)],_0x2bd1fc(0xe1)+_0x3cd986+_0x2bd1fc(0x10a)+_0x4289c9[_0x2bd1fc(0xea)]+')',_0x1008f7);}}}function a3_0x55eb(){const _0x2ee641=['agents','/api/chats/','temperature','Please\x20provide\x20a\x20non-empty\x20message\x20to\x20continue\x20the\x20chat.','getChatHistory','page[limit]','startsWith','text/event-stream','prompt','description','projectId','chats','Message\x20cannot\x20be\x20empty\x20or\x20whitespace\x20only','LLM_EMPTY_MESSAGE','\x20attempts:\x20API\x20returned\x20empty\x20chat\x20ID','/api/projects?page[limit]=','212400TCgiwy','/history','data','53919eXxCUV','/api/chats?','startChat','systemPrompt','Failed\x20to\x20continue\x20chat\x20(chatId:\x20','17274nTzOGv','getAgent','2709555PdpUfI','authHeaders','100JgRJDq','push','/api/projects/','11344ppuwAc','length','projects','/api/agents/','LLM_CHAT_CREATION_FAILURE','\x20characters','DELETE','site','642936PxjxVn','application/vnd.api+json','14166wKceGy','starterMessage','baseUrl','request','deleteProject','sort','getUserSettings','/api/projects','listAgents','LLM_STREAM_ERROR','logger','links','warn','PATCH','append','trim',']\x20Chat\x20creation\x20returned\x20empty\x20ID,\x20retrying\x20in\x20','info','application/json','Failed\x20to\x20create\x20chat:\x20unexpected\x20error','ms...',']\x20Streaming\x20SSE\x20stream\x20for\x20chatId:\x20','llm',',\x20message\x20length:\x20','createProject','\x20with\x20message\x20size:\x20','search','GET','name','modelType','/api/chats','3087dRiNbj','listProjects','getChatInfo','next','?filter[project_id]=','toString','httpClient','POST','5090UrShnk'];a3_0x55eb=function(){return _0x2ee641;};return a3_0x55eb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x1c59d9=a4_0x56d1;(function(_0x41ea88,_0x20554f){const _0x2eadf9=a4_0x56d1,_0x5bef5c=_0x41ea88();while(!![]){try{const _0x4b70b7=-parseInt(_0x2eadf9(0x1b9))/0x1+-parseInt(_0x2eadf9(0x1bb))/0x2+parseInt(_0x2eadf9(0x1b8))/0x3+parseInt(_0x2eadf9(0x1b0))/0x4*(-parseInt(_0x2eadf9(0x1b4))/0x5)+parseInt(_0x2eadf9(0x1b1))/0x6*(-parseInt(_0x2eadf9(0x1ba))/0x7)+parseInt(_0x2eadf9(0x1a8))/0x8*(-parseInt(_0x2eadf9(0x1ab))/0x9)+parseInt(_0x2eadf9(0x1ac))/0xa;if(_0x4b70b7===_0x20554f)break;else _0x5bef5c['push'](_0x5bef5c['shift']());}catch(_0x53bf1f){_0x5bef5c['push'](_0x5bef5c['shift']());}}}(a4_0x5e9e,0x2f300));function a4_0x56d1(_0x1953ac,_0x57dc2a){const _0x5e9e58=a4_0x5e9e();return a4_0x56d1=function(_0x56d1a3,_0x56ebb2){_0x56d1a3=_0x56d1a3-0x1a7;let _0x42f1ba=_0x5e9e58[_0x56d1a3];return _0x42f1ba;},a4_0x56d1(_0x1953ac,_0x57dc2a);}function a4_0x5e9e(){const _0x4d6396=['982709hUgwaj','453132RlQJet','maxRequests','now','8YVRnGu','refillRate','reset','2777049WIsWpF','9626710vOCLsP','maxTokens','tryAcquire','refill','12jNhHVo','6XVedoF','lastRefill','max','147655CyZmEt','windowMs','tokens','sleep','1041810zgTQYl','352554iSwVEy'];a4_0x5e9e=function(){return _0x4d6396;};return a4_0x5e9e();}export class RateLimiter{['tokens'];['lastRefill'];[a4_0x1c59d9(0x1ad)];[a4_0x1c59d9(0x1a9)];constructor(_0x1d2347){const _0x145c4b=a4_0x1c59d9;this[_0x145c4b(0x1ad)]=_0x1d2347[_0x145c4b(0x1bc)],this[_0x145c4b(0x1b6)]=_0x1d2347[_0x145c4b(0x1bc)],this[_0x145c4b(0x1b2)]=Date[_0x145c4b(0x1a7)](),this[_0x145c4b(0x1a9)]=_0x1d2347[_0x145c4b(0x1bc)]/_0x1d2347[_0x145c4b(0x1b5)];}async['acquire'](){const _0xcab9d2=a4_0x1c59d9;while(!![]){this['refill']();if(this[_0xcab9d2(0x1b6)]>=0x1){this[_0xcab9d2(0x1b6)]-=0x1;return;}const _0x4a1dff=Math[_0xcab9d2(0x1b3)](0x1,Math['ceil'](0x1/this[_0xcab9d2(0x1a9)]));await this[_0xcab9d2(0x1b7)](_0x4a1dff);}}[a4_0x1c59d9(0x1ae)](){const _0x29fc82=a4_0x1c59d9;this[_0x29fc82(0x1af)]();if(this[_0x29fc82(0x1b6)]>=0x1)return this[_0x29fc82(0x1b6)]-=0x1,!![];return![];}[a4_0x1c59d9(0x1af)](){const _0x429ffd=a4_0x1c59d9,_0x106e55=Date['now'](),_0x5654b1=_0x106e55-this[_0x429ffd(0x1b2)];if(_0x5654b1>0x0){const _0x4971e7=_0x5654b1*this['refillRate'];this[_0x429ffd(0x1b6)]=Math['min'](this[_0x429ffd(0x1ad)],this[_0x429ffd(0x1b6)]+_0x4971e7),this[_0x429ffd(0x1b2)]=_0x106e55;}}['getAvailableTokens'](){const _0x18f6ea=a4_0x1c59d9;return this[_0x18f6ea(0x1af)](),Math['floor'](this[_0x18f6ea(0x1b6)]);}[a4_0x1c59d9(0x1aa)](){const _0x4b314c=a4_0x1c59d9;this[_0x4b314c(0x1b6)]=this[_0x4b314c(0x1ad)],this['lastRefill']=Date[_0x4b314c(0x1a7)]();}[a4_0x1c59d9(0x1b7)](_0x571b3a){return new Promise(_0xb9695e=>setTimeout(_0xb9695e,_0x571b3a));}}export const defaultRateLimiter=new RateLimiter({'maxRequests':0x64,'windowMs':0xea60});
|