@treasuredata/tdx 0.1.12 → 0.1.14
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/README.md +229 -11
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/cdp-client.d.ts +48 -6
- package/dist/client/cdp-client.d.ts.map +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/cdp-client.js.map +1 -1
- package/dist/client/http-client.d.ts +4 -2
- package/dist/client/http-client.d.ts.map +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/http-client.js.map +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/llm-client.js.map +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.d.ts +24 -9
- package/dist/client/td-client.d.ts.map +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/td-client.js.map +1 -1
- package/dist/client/trino-client.d.ts +16 -0
- package/dist/client/trino-client.d.ts.map +1 -1
- package/dist/client/trino-client.js +1 -1
- package/dist/client/trino-client.js.map +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/client/workflow-client.js.map +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.d.ts +45 -0
- package/dist/commands/job-command.d.ts.map +1 -0
- package/dist/commands/job-command.js +1 -0
- package/dist/commands/job-command.js.map +1 -0
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.d.ts.map +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/llm-proxy.js.map +1 -1
- package/dist/commands/parent-segment-command.d.ts +25 -0
- package/dist/commands/parent-segment-command.d.ts.map +1 -0
- package/dist/commands/parent-segment-command.js +1 -0
- package/dist/commands/parent-segment-command.js.map +1 -0
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.d.ts.map +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/query-command.js.map +1 -1
- package/dist/commands/segment-command.d.ts +10 -0
- package/dist/commands/segment-command.d.ts.map +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-command.js.map +1 -1
- package/dist/commands/segment-create-command.d.ts +15 -0
- package/dist/commands/segment-create-command.d.ts.map +1 -0
- package/dist/commands/segment-create-command.js +1 -0
- package/dist/commands/segment-create-command.js.map +1 -0
- package/dist/commands/segment-fields-command.d.ts +15 -0
- package/dist/commands/segment-fields-command.d.ts.map +1 -0
- package/dist/commands/segment-fields-command.js +1 -0
- package/dist/commands/segment-fields-command.js.map +1 -0
- package/dist/commands/segment-update-command.d.ts +15 -0
- package/dist/commands/segment-update-command.d.ts.map +1 -0
- package/dist/commands/segment-update-command.js +1 -0
- package/dist/commands/segment-update-command.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/commands/workflow-command.js.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.d.ts +8 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/job.d.ts +55 -0
- package/dist/sdk/job.d.ts.map +1 -0
- package/dist/sdk/job.js +1 -0
- package/dist/sdk/job.js.map +1 -0
- package/dist/sdk/llm.d.ts.map +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/llm.js.map +1 -1
- package/dist/sdk/query.d.ts +5 -3
- package/dist/sdk/query.d.ts.map +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.d.ts +213 -1
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/cdp.d.ts +504 -0
- package/dist/types/cdp.d.ts.map +1 -0
- package/dist/types/cdp.js +1 -0
- package/dist/types/cdp.js.map +1 -0
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.d.ts +30 -168
- package/dist/types/index.d.ts.map +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.d.ts +7 -0
- package/dist/utils/command-output.d.ts.map +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/command-output.js.map +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.d.ts +14 -0
- package/dist/utils/formatters.d.ts.map +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/formatters.js.map +1 -1
- package/dist/utils/json-loader.d.ts +36 -0
- package/dist/utils/json-loader.d.ts.map +1 -0
- package/dist/utils/json-loader.js +1 -0
- package/dist/utils/json-loader.js.map +1 -0
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.d.ts +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/port.js.map +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.d.ts +11 -0
- package/dist/utils/prompt.d.ts.map +1 -0
- package/dist/utils/prompt.js +1 -0
- package/dist/utils/prompt.js.map +1 -0
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.d.ts +1 -1
- package/dist/utils/spinner.d.ts.map +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/spinner.js.map +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/workflow-utils.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -459,11 +459,83 @@ tdx query "SELECT * FROM users" -d mydb
|
|
|
459
459
|
|
|
460
460
|
### Job Commands
|
|
461
461
|
|
|
462
|
-
|
|
462
|
+
Manage and execute Treasure Data jobs (queries).
|
|
463
463
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
464
|
+
**List jobs**:
|
|
465
|
+
```bash
|
|
466
|
+
# List jobs (default: 40 jobs)
|
|
467
|
+
tdx jobs
|
|
468
|
+
|
|
469
|
+
# List more jobs with --limit
|
|
470
|
+
tdx jobs --limit 100
|
|
471
|
+
|
|
472
|
+
# Filter by status
|
|
473
|
+
tdx jobs --status running
|
|
474
|
+
tdx jobs --status success
|
|
475
|
+
tdx jobs --status error
|
|
476
|
+
tdx jobs --status queued
|
|
477
|
+
|
|
478
|
+
# Combine filters
|
|
479
|
+
tdx jobs --status running --limit 50
|
|
480
|
+
|
|
481
|
+
# Output as JSON
|
|
482
|
+
tdx jobs --format json
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
**Show job details**:
|
|
486
|
+
```bash
|
|
487
|
+
# Show job details
|
|
488
|
+
tdx job show <job-id>
|
|
489
|
+
|
|
490
|
+
# Show job as JSON
|
|
491
|
+
tdx job show <job-id> --format json
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
**Kill a job**:
|
|
495
|
+
```bash
|
|
496
|
+
# Kill a job (with confirmation)
|
|
497
|
+
tdx job kill <job-id>
|
|
498
|
+
|
|
499
|
+
# Skip confirmation prompt
|
|
500
|
+
tdx job kill <job-id> --yes
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
**Submit jobs**:
|
|
504
|
+
```bash
|
|
505
|
+
# Submit Trino query (default)
|
|
506
|
+
tdx job submit "SELECT * FROM mydb.table LIMIT 10"
|
|
507
|
+
|
|
508
|
+
# Submit with specific database
|
|
509
|
+
tdx job submit "SELECT * FROM table" --database mydb
|
|
510
|
+
|
|
511
|
+
# Submit Hive query from file
|
|
512
|
+
tdx job submit --job-type hive -f query.sql --database mydb
|
|
513
|
+
|
|
514
|
+
# Submit without specifying database (uses information_schema by default)
|
|
515
|
+
tdx job submit "SELECT 1"
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
**Get job results**:
|
|
519
|
+
```bash
|
|
520
|
+
# Get job results (table format)
|
|
521
|
+
tdx job result <job-id>
|
|
522
|
+
|
|
523
|
+
# Get results as JSON
|
|
524
|
+
tdx job result <job-id> --format json
|
|
525
|
+
|
|
526
|
+
# Save results to file
|
|
527
|
+
tdx job result <job-id> --output results.json
|
|
528
|
+
|
|
529
|
+
# Get results as TSV
|
|
530
|
+
tdx job result <job-id> --format tsv
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
**Job Command Options**:
|
|
534
|
+
- `--job-type <type>`: Job type - `trino` (default) or `hive`
|
|
535
|
+
- `-f, --file <path>`: Read query from file
|
|
536
|
+
- `--database <name>`: Database name (default: `information_schema`)
|
|
537
|
+
- `--status <status>`: Filter by job status - `queued`, `running`, `success`, or `error` (for `jobs` list)
|
|
538
|
+
- `--limit <number>`: Maximum number of jobs to list (default: 40, for `jobs` list)
|
|
467
539
|
|
|
468
540
|
### Segment Commands (CDP)
|
|
469
541
|
|
|
@@ -478,17 +550,31 @@ CDP (Customer Data Platform) segment management for audiences and activations.
|
|
|
478
550
|
- Pattern: Commands accept `(parent_name)(/child_name)?` format
|
|
479
551
|
- **Note**: Names are case-sensitive
|
|
480
552
|
|
|
553
|
+
#### Discovery Commands
|
|
554
|
+
|
|
481
555
|
| Command | Description | Example |
|
|
482
556
|
|---------|-------------|---------|
|
|
483
557
|
| `segments` | List all parent segments | `tdx segments` |
|
|
484
558
|
| `segments <parent_name>` | List child segments under parent | `tdx segments "My Audience"` |
|
|
485
|
-
| `segment describe <name>` (alias: `desc`) | Show parent or child segment details | `tdx segment describe "My Audience"`
|
|
486
|
-
| `segment show <name>` | Execute segment SQL query and show results | `tdx segment show "My Audience
|
|
487
|
-
| `segment sql <name>` | Get SQL query for segment | `tdx segment sql "My Audience"`
|
|
559
|
+
| `segment describe <name>` (alias: `desc`) | Show parent or child segment details | `tdx segment describe "My Audience"` |
|
|
560
|
+
| `segment show <name>` | Execute segment SQL query and show results | `tdx segment show "My Audience/Premium Users" --limit 100` |
|
|
561
|
+
| `segment sql <name>` | Get SQL query for segment | `tdx segment sql "My Audience"` |
|
|
562
|
+
| `segment fields <parent_name>` | List available fields for segmentation | `tdx segment fields "My Audience"` |
|
|
488
563
|
| `segment folders <parent_name>` | List folders under parent | `tdx segment folders "My Audience"` |
|
|
489
|
-
| `segment folder show <
|
|
564
|
+
| `segment folder show <parent/folder>` | Show folder details | `tdx segment folder show "My Audience/Marketing"` |
|
|
565
|
+
|
|
566
|
+
#### Management Commands
|
|
567
|
+
|
|
568
|
+
| Command | Description | Example |
|
|
569
|
+
|---------|-------------|---------|
|
|
570
|
+
| `segment parent create <name>` | Create new parent segment (audience) | `tdx segment parent create "Customer 360" --database mydb --table customers` |
|
|
571
|
+
| `segment parent update <name>` | Update existing parent segment | `tdx segment parent update "Customer 360" --description "Updated"` |
|
|
572
|
+
| `segment create <parent/child>` | Create child segment with filtering | `tdx segment create "My Audience/High Value" --rule-file rule.json` |
|
|
573
|
+
| `segment update <parent/child>` | Update child segment | `tdx segment update "My Audience/High Value" --name "Super High"` |
|
|
574
|
+
| `segment folder create <parent> <folder>` | Create segment folder | `tdx segment folder create "My Audience" "Q1 2024"` |
|
|
575
|
+
|
|
576
|
+
#### Discovery Examples
|
|
490
577
|
|
|
491
|
-
**Examples**:
|
|
492
578
|
```bash
|
|
493
579
|
# List all parent segments
|
|
494
580
|
tdx segments --format json
|
|
@@ -498,8 +584,7 @@ tdx segments "My Audience"
|
|
|
498
584
|
|
|
499
585
|
# Show parent segment metadata
|
|
500
586
|
tdx segment describe "My Audience"
|
|
501
|
-
|
|
502
|
-
tdx segment desc "My Audience"
|
|
587
|
+
tdx segment desc "My Audience" # alias
|
|
503
588
|
|
|
504
589
|
# Show child segment metadata (slash notation)
|
|
505
590
|
tdx segment describe "My Audience/High Value Users"
|
|
@@ -519,6 +604,12 @@ tdx segment sql "My Audience" > parent-query.sql
|
|
|
519
604
|
# Get SQL for child segment with filtering (slash notation)
|
|
520
605
|
tdx segment sql "My Audience/High Value Users" > child-query.sql
|
|
521
606
|
|
|
607
|
+
# List available fields for creating filtered segments
|
|
608
|
+
tdx segment fields "My Audience"
|
|
609
|
+
|
|
610
|
+
# List available fields with column details (JSON format)
|
|
611
|
+
tdx segment fields "My Audience" --json
|
|
612
|
+
|
|
522
613
|
# List folders under parent
|
|
523
614
|
tdx segment folders "My Audience"
|
|
524
615
|
|
|
@@ -526,6 +617,133 @@ tdx segment folders "My Audience"
|
|
|
526
617
|
tdx segment folder show "My Audience/Marketing"
|
|
527
618
|
```
|
|
528
619
|
|
|
620
|
+
#### Management Examples
|
|
621
|
+
|
|
622
|
+
**Create Parent Segment (Audience):**
|
|
623
|
+
|
|
624
|
+
```bash
|
|
625
|
+
# Create minimal parent segment
|
|
626
|
+
tdx segment parent create "Customer 360" \
|
|
627
|
+
--database customer_data \
|
|
628
|
+
--table customers \
|
|
629
|
+
--description "Complete customer view"
|
|
630
|
+
|
|
631
|
+
# Create with attributes from file
|
|
632
|
+
tdx segment parent create "Customer 360" \
|
|
633
|
+
--database customer_data \
|
|
634
|
+
--table customers \
|
|
635
|
+
--attributes-file examples/parent-segment-attributes.json \
|
|
636
|
+
--behaviors-file examples/parent-segment-behaviors.json
|
|
637
|
+
|
|
638
|
+
# Create with scheduling
|
|
639
|
+
tdx segment parent create "Customer 360" \
|
|
640
|
+
--database customer_data \
|
|
641
|
+
--table customers \
|
|
642
|
+
--schedule-type daily \
|
|
643
|
+
--schedule-option "03:00" \
|
|
644
|
+
--timezone "America/Los_Angeles"
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
**Update Parent Segment:**
|
|
648
|
+
|
|
649
|
+
```bash
|
|
650
|
+
# Update description
|
|
651
|
+
tdx segment parent update "Customer 360" \
|
|
652
|
+
--description "Updated customer view"
|
|
653
|
+
|
|
654
|
+
# Add new attributes
|
|
655
|
+
tdx segment parent update "Customer 360" \
|
|
656
|
+
--add-attributes-file new-attributes.json
|
|
657
|
+
|
|
658
|
+
# Update schedule
|
|
659
|
+
tdx segment parent update "Customer 360" \
|
|
660
|
+
--schedule-type weekly \
|
|
661
|
+
--schedule-option "0" # Sunday
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
**Create Child Segment with Filtering:**
|
|
665
|
+
|
|
666
|
+
```bash
|
|
667
|
+
# Create segment with simple rule (inline JSON)
|
|
668
|
+
tdx segment create "My Audience/High Value" \
|
|
669
|
+
--description "Customers with LTV > $1000" \
|
|
670
|
+
--rule '{"type":"And","conditions":[{"type":"Value","leftValue":{"name":"Lifetime Value"},"operator":{"type":"Greater","rightValue":1000}}]}'
|
|
671
|
+
|
|
672
|
+
# Create segment with complex rule (from file)
|
|
673
|
+
tdx segment create "My Audience/High Value US" \
|
|
674
|
+
--description "High value US customers" \
|
|
675
|
+
--rule-file examples/segment-rule-complex.json
|
|
676
|
+
|
|
677
|
+
# Create segment in folder
|
|
678
|
+
tdx segment create "My Audience/Premium" \
|
|
679
|
+
--rule-file examples/segment-rule-simple.json \
|
|
680
|
+
--folder "Geographic Segments"
|
|
681
|
+
|
|
682
|
+
# Create realtime segment
|
|
683
|
+
tdx segment create "My Audience/Realtime Active" \
|
|
684
|
+
--rule-file rule.json \
|
|
685
|
+
--kind 1 # 0=batch, 1=realtime, 2=funnel_stage
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
**Update Child Segment:**
|
|
689
|
+
|
|
690
|
+
```bash
|
|
691
|
+
# Update segment name
|
|
692
|
+
tdx segment update "My Audience/High Value" \
|
|
693
|
+
--name "Super High Value"
|
|
694
|
+
|
|
695
|
+
# Update segment rule
|
|
696
|
+
tdx segment update "My Audience/High Value" \
|
|
697
|
+
--description "Updated criteria" \
|
|
698
|
+
--rule-file updated-rule.json
|
|
699
|
+
|
|
700
|
+
# Move segment to folder
|
|
701
|
+
tdx segment update "My Audience/High Value" \
|
|
702
|
+
--folder "Premium Customers"
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
**Create Folders:**
|
|
706
|
+
|
|
707
|
+
```bash
|
|
708
|
+
# Create top-level folder
|
|
709
|
+
tdx segment folder create "My Audience" "Q1 2024 Campaigns" \
|
|
710
|
+
--description "Campaign segments for Q1"
|
|
711
|
+
|
|
712
|
+
# Create nested folder
|
|
713
|
+
tdx segment folder create "My Audience" "West Region" \
|
|
714
|
+
--parent-folder "Geographic Segments"
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
**Segment Rule Syntax:**
|
|
718
|
+
|
|
719
|
+
See `examples/segment-rule-simple.json` and `examples/segment-rule-complex.json` for rule examples.
|
|
720
|
+
|
|
721
|
+
Supported operators:
|
|
722
|
+
- **Comparison**: Equal, NotEqual, Greater, GreaterEqual, Less, LessEqual
|
|
723
|
+
- **Set**: In, NotIn
|
|
724
|
+
- **Text**: Contains, StartsWith, EndsWith
|
|
725
|
+
- **Pattern**: Regex
|
|
726
|
+
- **Time**: TimeWithinPast
|
|
727
|
+
|
|
728
|
+
Example rule structure:
|
|
729
|
+
```json
|
|
730
|
+
{
|
|
731
|
+
"type": "And",
|
|
732
|
+
"conditions": [
|
|
733
|
+
{
|
|
734
|
+
"type": "Value",
|
|
735
|
+
"leftValue": {"name": "Lifetime Value"},
|
|
736
|
+
"operator": {"type": "Greater", "rightValue": 1000}
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"type": "Value",
|
|
740
|
+
"leftValue": {"name": "Country"},
|
|
741
|
+
"operator": {"type": "In", "rightValues": ["US", "UK", "CA"]}
|
|
742
|
+
}
|
|
743
|
+
]
|
|
744
|
+
}
|
|
745
|
+
```
|
|
746
|
+
|
|
529
747
|
### Activation Commands (CDP)
|
|
530
748
|
|
|
531
749
|
Manage CDP activations (syndications) for segments.
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const a0_0x1566f7=a0_0x3def;(function(_0x17cc8f,_0x57b78a){const _0x69a722=a0_0x3def,_0x213b2b=_0x17cc8f();while(!![]){try{const _0x58eb7b=parseInt(_0x69a722(0x202))/0x1*(-parseInt(_0x69a722(0x242))/0x2)+parseInt(_0x69a722(0x1cc))/0x3+parseInt(_0x69a722(0x233))/0x4*(parseInt(_0x69a722(0x232))/0x5)+parseInt(_0x69a722(0x18b))/0x6+parseInt(_0x69a722(0x1a8))/0x7+parseInt(_0x69a722(0x1df))/0x8+-parseInt(_0x69a722(0x198))/0x9;if(_0x58eb7b===_0x57b78a)break;else _0x213b2b['push'](_0x213b2b['shift']());}catch(_0x2790cc){_0x213b2b['push'](_0x213b2b['shift']());}}}(a0_0x2883,0xd0ff0));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';function a0_0x2883(){const _0x5c7ad5=['map','port','hidden','Database\x20to\x20use\x20(overrides\x20context)','--catalog\x20<catalog>','--verbose','Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','version','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','0.7','Include\x20subtasks\x20in\x20the\x20output','format','optionDescription','commandDescription','length','LLM\x20project\x20to\x20use\x20(overrides\x20context)','LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','Enable\x20verbose\x20logging','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','kill\x20<attempt-id>','--debug','Reason\x20for\x20killing\x20the\x20attempt','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','addHelpText','workflows\x20[project]','Start\x20a\x20new\x20chat\x20session','attempts\x20[project]','delete\x20<project-name-or-id>','--agent\x20<name>','show\x20[table]','push\x20[project-name-or-dir]','Model\x20name\x20(default:\x20claude-4.5-sonnet)','List\x20segment\x20folders\x20under\x20a\x20parent\x20segment','summary','apiKey','Describe\x20table\x20schema','../package.json','tasks\x20<attempt-id>','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','parse','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)','Maximum\x20tool\x20iterations\x20(default:\x204)','1259255CNjuGs','8FnlLSW','workflow','-d,\x20--database\x20<name>','segments\x20[parent_name]','tsv','--site\x20<site>','required','project','command','name','-f,\x20--file\x20<path>','padEnd','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','--prompt\x20<text>','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','34LZfYNA','delete\x20<agent-name>','Run\x20Trino\x20query\x20with\x20streaming\x20results','Alias\x20for\x20--database\x20(natural\x20language\x20style)','verbose','--port\x20<number>','AI-native\x20CLI\x20for\x20Treasure\x20Data','projects\x20[pattern]','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','tables\x20[pattern]','Trino\x20catalog\x20(default:\x20td)','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy','subcommandTerm','List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)','folders\x20<parent_name>','--parent-segment\x20<name>','sql\x20<segment_name>','run','Update\x20an\x20existing\x20agent','--max-tool-iterations\x20<n>','profiles','utf-8','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','databases\x20[pattern]','Agent\x20description','Set\x20operation\x20timeout\x20in\x20seconds','Options:','use\x20<project-name>','show\x20<segment_name>','create\x20<name>','use\x20[resource]\x20[value]','Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)','Agent\x20reference\x20(project-name/agent-name)','join','Request\x20body\x20as\x20JSON\x20string','sessions\x20[project]','desc','sonnet','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','List\x20parent\x20segments\x20or\x20child\x20segments\x20under\x20a\x20parent','Show\x20logs\x20for\x20a\x20specific\x20task','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','option','--params\x20<json>','--include-retried','--type\x20<api_type>','log','-y,\x20--yes','LLM\x20project\x20management','--dry-run','jsonl','--name\x20<text>','Segment\x20folder\x20management','API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','commands','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','Temperature\x20(0.0-2.0,\x20default:\x200.7)','describe\x20<segment_name>','Starting\x20offset\x20for\x20logs\x20(default:\x200)','TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02,\x20ap03,\x20dev-us01,\x20dev-eu01,\x20stg-us01,\x20stg-jp01,\x20stg-ap03;\x20aliases:\x20us,\x20jp,\x20aws,\x20dev,\x20stg)','Read\x20SQL\x20query\x20from\x20file','Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)','repeat','4079070RIOskp','--json','List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','opts','--output\x20<file>','after','argv','Starter\x20message','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','Revision\x20name\x20(default:\x20timestamp)','Job\x20management\x20commands','--limit\x20<rows>','Create\x20a\x20new\x20LLM\x20project','20623320iOkHgo','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','configureHelp','outputHelp','List\x20workflows\x20(optionally\x20filtered\x20by\x20project)','--revision\x20<revision>','--temperature\x20<n>','-v,\x20--version','--from\x20<timestamp>','registeredArguments','claude','exit','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','List\x20all\x20available\x20profiles','Override\x20project\x20name','database','9594459UNoEsS','Commands:','--model\x20<name>','--status\x20<status>','--timeout\x20<seconds>','aliases','Show\x20context\x20with\x20sources\x20(for\x20debugging)','Show\x20current\x20resolved\x20context','Enable\x20debug\x20mode\x20(logs\x20proxy\x20request/response\x20to\x20stderr)','segment','--starter-message\x20<text>','--system-prompt\x20<text>','action','proxy','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','-d,\x20--database\x20<database>','--format\x20<format>','--description\x20<text>','Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)','List\x20available\x20LLM\x20models','Show\x20tasks\x20for\x20an\x20attempt','Skip\x20confirmation\x20prompts','Agent\x20name','injectIntoOptions','argumentTerm','download\x20<project-name>\x20[output-dir]','attempt\x20<attempt-id>','slice','Start\x20time\x20filter\x20(ISO\x208601\x20format)','--agent\x20<ref>','push','List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)','Database\x20to\x20query\x20(default:\x20information_schema)','filter','job','Clear\x20session\x20context','4589883OWWQKx','List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)','--reason\x20<text>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)','url','Delete\x20an\x20LLM\x20project','agent','Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','--color','history\x20[chat-id]','4000','Workflow\x20(Digdag)\x20management\x20commands','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','--skip-validation','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration','End\x20time\x20filter\x20(ISO\x208601\x20format)','766480DemPib','Model\x20type\x20(default:\x20claude-4.5-sonnet)','--name\x20<name>','agents\x20[pattern]','Enable\x20debug\x20mode\x20(logs\x20request/response\x20to\x20stderr)','--project\x20<name>','delete\x20<name>','update\x20<agent-name>','Create\x20a\x20new\x20agent\x20in\x20current\x20project','Read\x20request\x20body\x20from\x20file','--resume-from\x20<task>','--tsv','tdx','api\x20[endpoint]','-X,\x20--method\x20<method>','query\x20[sql]','commandUsage','--new','hook','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','--from-task\x20<task>','show\x20<agent-name>','json','--in\x20<database>','CDP\x20segment\x20management\x20commands','optionTerm','Job\x20commands\x20-\x20coming\x20soon','Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)','output\x20the\x20version\x20number','padWidth','--session\x20<id>','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)','describe\x20[table]','context','--no-color','60731mevneq','preAction','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','alias','description'];a0_0x2883=function(){return _0x5c7ad5;};return a0_0x2883();}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}from'./commands/segment-command.js';import{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';const __filename=fileURLToPath(import.meta[a0_0x1566f7(0x1d2)]),__dirname=dirname(__filename),packageJson=JSON['parse'](readFileSync(join(__dirname,a0_0x1566f7(0x22c)),a0_0x1566f7(0x257))),program=new Command();program['name'](a0_0x1566f7(0x1eb))[a0_0x1566f7(0x206)](a0_0x1566f7(0x248))[a0_0x1566f7(0x20f)](packageJson[a0_0x1566f7(0x20f)],a0_0x1566f7(0x19f),a0_0x1566f7(0x1fb)),program[a0_0x1566f7(0x176)](a0_0x1566f7(0x238),a0_0x1566f7(0x187),'us01')['option'](a0_0x1566f7(0x1b8),a0_0x1566f7(0x1fa))[a0_0x1566f7(0x176)](a0_0x1566f7(0x18c),a0_0x1566f7(0x22e))['option']('--jsonl',a0_0x1566f7(0x24a))['option'](a0_0x1566f7(0x1ea),a0_0x1566f7(0x1d5))['option'](a0_0x1566f7(0x18f),'Save\x20output\x20to\x20file')[a0_0x1566f7(0x176)](a0_0x1566f7(0x196),a0_0x1566f7(0x1db),'40')['option'](a0_0x1566f7(0x1d7),a0_0x1566f7(0x1a4),![])[a0_0x1566f7(0x176)](a0_0x1566f7(0x201),a0_0x1566f7(0x1ce),![])[a0_0x1566f7(0x176)](a0_0x1566f7(0x20c),a0_0x1566f7(0x219),![])[a0_0x1566f7(0x176)](a0_0x1566f7(0x1ac),a0_0x1566f7(0x25b),'30')[a0_0x1566f7(0x176)](a0_0x1566f7(0x17d),'Preview\x20operation\x20without\x20executing',![])[a0_0x1566f7(0x176)](a0_0x1566f7(0x17b),a0_0x1566f7(0x1bd),![])['option'](a0_0x1566f7(0x1fd),a0_0x1566f7(0x1cf))[a0_0x1566f7(0x176)]('--profile\x20<name>','Profile\x20to\x20use\x20(overrides\x20active\x20profile)')[a0_0x1566f7(0x176)](a0_0x1566f7(0x235),a0_0x1566f7(0x20a))[a0_0x1566f7(0x176)]('--in\x20<name>',a0_0x1566f7(0x245))['option'](a0_0x1566f7(0x251),a0_0x1566f7(0x175))['option']('--llm-project\x20<name>',a0_0x1566f7(0x217)),program[a0_0x1566f7(0x19a)]({'formatHelp':(_0x497acd,_0x4bf25e)=>{const _0x3ddfa8=a0_0x1566f7,_0x1c4ce5=_0x4bf25e[_0x3ddfa8(0x1fc)](_0x497acd,_0x4bf25e),_0x164c4b=0x2,_0x356581=0x2;function _0x17f8af(_0x305789){const _0x508239=_0x3ddfa8;return!!_0x305789[_0x508239(0x209)];}function _0x1aaaf1(_0x1f0737,_0x3ab0fb){const _0x41641d=_0x3ddfa8;if(_0x3ab0fb){const _0x4c2680=''+_0x1f0737[_0x41641d(0x23e)](_0x1c4ce5+_0x356581)+_0x3ab0fb;return _0x4c2680;}return _0x1f0737;}function _0x3f1fbb(_0x66b390){const _0x30448e=_0x3ddfa8;return _0x66b390[_0x30448e(0x263)]('\x0a')['replace'](/^/gm,'\x20'[_0x30448e(0x18a)](_0x164c4b));}const _0x47292d=[];_0x47292d[_0x3ddfa8(0x1c6)]('Usage:\x20'+_0x4bf25e[_0x3ddfa8(0x1ef)](_0x497acd));const _0x59615a=_0x4bf25e[_0x3ddfa8(0x215)](_0x497acd);_0x59615a&&(_0x47292d[_0x3ddfa8(0x1c6)](''),_0x47292d[_0x3ddfa8(0x1c6)](_0x59615a));const _0x5e4fd5=_0x497acd[_0x3ddfa8(0x182)][_0x3ddfa8(0x1c9)](_0x15c2c2=>!_0x17f8af(_0x15c2c2));if(_0x5e4fd5['length']>0x0){const _0x456bd6=_0x5e4fd5[_0x3ddfa8(0x207)](_0x153311=>{const _0x1b9cf5=_0x3ddfa8,_0x932d3f=_0x4bf25e[_0x1b9cf5(0x24e)](_0x153311),_0x3fc789=_0x4bf25e['subcommandDescription'](_0x153311);return _0x1aaaf1(_0x932d3f,_0x3fc789);});_0x47292d[_0x3ddfa8(0x1c6)](''),_0x47292d[_0x3ddfa8(0x1c6)](_0x3ddfa8(0x1a9)),_0x47292d['push'](_0x3f1fbb(_0x456bd6));}const _0xa43530=_0x497acd['options'][_0x3ddfa8(0x1c9)](_0x2e8253=>!_0x17f8af(_0x2e8253));if(_0xa43530['length']>0x0){const _0x529c81=_0xa43530[_0x3ddfa8(0x207)](_0x5ef26e=>{const _0x2771ca=_0x3ddfa8,_0x435393=_0x4bf25e[_0x2771ca(0x1f8)](_0x5ef26e),_0xf5eba7=_0x4bf25e[_0x2771ca(0x214)](_0x5ef26e);return _0x1aaaf1(_0x435393,_0xf5eba7);});_0x47292d[_0x3ddfa8(0x1c6)](''),_0x47292d['push'](_0x3ddfa8(0x25c)),_0x47292d[_0x3ddfa8(0x1c6)](_0x3f1fbb(_0x529c81));}const _0x16e095=(_0x497acd[_0x3ddfa8(0x1a1)]||[])[_0x3ddfa8(0x1c9)](_0x1c7057=>!_0x17f8af(_0x1c7057));if(_0x16e095['length']>0x0){const _0x259a43=_0x16e095[_0x3ddfa8(0x207)](_0x40e57b=>{const _0x965048=_0x3ddfa8,_0x4339f9=_0x4bf25e[_0x965048(0x1c0)](_0x40e57b),_0x529972=_0x4bf25e['argumentDescription'](_0x40e57b);return _0x1aaaf1(_0x4339f9,_0x529972);});_0x47292d[_0x3ddfa8(0x1c6)](''),_0x47292d[_0x3ddfa8(0x1c6)]('Arguments:'),_0x47292d['push'](_0x3f1fbb(_0x259a43));}return _0x47292d[_0x3ddfa8(0x263)]('\x0a');},'subcommandTerm':_0x50a44c=>{const _0x4b9641=a0_0x1566f7,_0x10c4c8=(_0x50a44c[_0x4b9641(0x1a1)]||[])[_0x4b9641(0x207)](_0x436bf8=>_0x436bf8[_0x4b9641(0x239)]?'<'+_0x436bf8[_0x4b9641(0x23c)]()+'>':'['+_0x436bf8['name']()+']')[_0x4b9641(0x263)]('\x20'),_0x4e0c6e=_0x50a44c[_0x4b9641(0x1ad)](),_0x1b9d71=_0x4e0c6e[_0x4b9641(0x216)]>0x0?_0x50a44c[_0x4b9641(0x23c)]()+',\x20'+_0x4e0c6e[_0x4b9641(0x263)](',\x20'):_0x50a44c[_0x4b9641(0x23c)]();return _0x10c4c8?_0x1b9d71+'\x20'+_0x10c4c8:_0x1b9d71;}}),program[a0_0x1566f7(0x1f1)](a0_0x1566f7(0x203),_0x260161=>{const _0x36c7c9=a0_0x1566f7,_0x144ad8=_0x260161[_0x36c7c9(0x18e)]();if(!_0x144ad8[_0x36c7c9(0x213)]){if(_0x144ad8['json'])_0x144ad8[_0x36c7c9(0x213)]=_0x36c7c9(0x1f5);else{if(_0x144ad8['jsonl'])_0x144ad8[_0x36c7c9(0x213)]=_0x36c7c9(0x17e);else _0x144ad8[_0x36c7c9(0x237)]&&(_0x144ad8[_0x36c7c9(0x213)]=_0x36c7c9(0x237));}}_0x144ad8['in']&&!_0x144ad8['database']&&(_0x144ad8[_0x36c7c9(0x1a7)]=_0x144ad8['in']);});function createTDXInstance(_0x13a52c){const _0x5e2649=a0_0x1566f7,_0x46d3d3=new GlobalContext(_0x13a52c);_0x46d3d3[_0x5e2649(0x1bf)](_0x13a52c);const _0x8829eb={'site':_0x46d3d3['site'],'apiKey':_0x46d3d3[_0x5e2649(0x22a)],'verbose':_0x46d3d3[_0x5e2649(0x246)]};return new TDX(_0x8829eb);}program['command'](a0_0x1566f7(0x259))[a0_0x1566f7(0x206)](a0_0x1566f7(0x18d))['action'](async(_0x3c506f,_0x2dda4f)=>{const _0x5cf1f7=a0_0x1566f7,_0x517f51=new DatabasesCommand(),_0x2e8605=program[_0x5cf1f7(0x18e)](),_0x416ba0=createTDXInstance(_0x2e8605),_0x540103=await _0x517f51['run']({'options':{..._0x2e8605,..._0x2dda4f},'args':_0x3c506f?[_0x3c506f]:[],'tdx':_0x416ba0});process['exit'](_0x540103);}),program[a0_0x1566f7(0x23b)]('chat\x20[message...]')[a0_0x1566f7(0x206)](a0_0x1566f7(0x1fe))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1c5),a0_0x1566f7(0x262))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1aa),a0_0x1566f7(0x227))[a0_0x1566f7(0x176)](a0_0x1566f7(0x19e),a0_0x1566f7(0x184))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1f0),a0_0x1566f7(0x221))[a0_0x1566f7(0x1b4)](async(_0x1a76fa,_0x5a9bb)=>{const _0x5663e4=a0_0x1566f7,_0xe4b9fd=new ChatCommand(),_0x5065aa=program[_0x5663e4(0x18e)](),_0x6b6c01=createTDXInstance(_0x5065aa),_0x159585=await _0xe4b9fd['run']({'options':{..._0x5065aa,..._0x5a9bb},'args':_0x1a76fa,'tdx':_0x6b6c01});process['exit'](_0x159585);});function a0_0x3def(_0x1418c9,_0x1d2d51){const _0x28832b=a0_0x2883();return a0_0x3def=function(_0x288313,_0x3def81){_0x288313=_0x288313-0x16f;let _0x23021c=_0x28832b[_0x288313];return _0x23021c;},a0_0x3def(_0x1418c9,_0x1d2d51);}const apiCmd=program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1ec))[a0_0x1566f7(0x229)](a0_0x1566f7(0x1d6))[a0_0x1566f7(0x21f)](a0_0x1566f7(0x190),'\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_0x1566f7(0x176)](a0_0x1566f7(0x1ed),'HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','GET')[a0_0x1566f7(0x176)]('--data\x20<data>',a0_0x1566f7(0x264))['option']('-f,\x20--file\x20<path>',a0_0x1566f7(0x1e8))['option']('-H,\x20--header\x20<header>',a0_0x1566f7(0x1ba),(_0x173668,_0x56ae72)=>{return _0x56ae72?[..._0x56ae72,_0x173668]:[_0x173668];})[a0_0x1566f7(0x176)](a0_0x1566f7(0x179),a0_0x1566f7(0x181),'td')[a0_0x1566f7(0x1b4)](async(_0x5b8a13,_0x53e912)=>{const _0x17ac17=a0_0x1566f7;if(!_0x5b8a13){apiCmd['help']();return;}const _0x3bfa1c=new ApiCommand(),_0x4af02c=program[_0x17ac17(0x18e)](),_0x38e8fc=createTDXInstance(_0x4af02c),_0xea47f4=await _0x3bfa1c[_0x17ac17(0x253)]({'options':{..._0x4af02c,..._0x53e912},'args':[_0x5b8a13],'tdx':_0x38e8fc});process[_0x17ac17(0x1a3)](_0xea47f4);});program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x24b))[a0_0x1566f7(0x206)](a0_0x1566f7(0x210))[a0_0x1566f7(0x176)]('-d,\x20--database\x20<database>',a0_0x1566f7(0x1d1))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1f6),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x1566f7(0x1b4)](async(_0x10dd93,_0x145a40)=>{const _0x47117d=a0_0x1566f7,_0x46bd46=new TablesCommand(),_0x6edd16=program[_0x47117d(0x18e)](),_0x160a3e=createTDXInstance(_0x6edd16);_0x145a40['in']&&(_0x145a40[_0x47117d(0x1a7)]=_0x145a40['in']);const _0x5e2222=await _0x46bd46['run']({'options':{..._0x6edd16,..._0x145a40},'args':_0x10dd93?[_0x10dd93]:[],'tdx':_0x160a3e});process[_0x47117d(0x1a3)](_0x5e2222);}),program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x225))['description'](a0_0x1566f7(0x21a))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1b7),a0_0x1566f7(0x174))[a0_0x1566f7(0x176)]('--in\x20<database>','Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x1566f7(0x1b4)](async(_0x4ec167,_0x35d02)=>{const _0x445b2e=a0_0x1566f7,_0x2f5fff=new ShowCommand(),_0x3c0a3b=program[_0x445b2e(0x18e)](),_0x360053=createTDXInstance(_0x3c0a3b);_0x35d02['in']&&(_0x35d02[_0x445b2e(0x1a7)]=_0x35d02['in']);const _0x28eb77=await _0x2f5fff[_0x445b2e(0x253)]({'options':{..._0x3c0a3b,..._0x35d02},'args':_0x4ec167?[_0x4ec167]:[],'tdx':_0x360053});process[_0x445b2e(0x1a3)](_0x28eb77);}),program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1ff))['alias'](a0_0x1566f7(0x16f))[a0_0x1566f7(0x206)](a0_0x1566f7(0x22b))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1b7),a0_0x1566f7(0x174))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1f6),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x1566f7(0x1b4)](async(_0x2a7788,_0x4c63f0)=>{const _0xc611b8=a0_0x1566f7,_0x2ae5df=new DescribeCommand(),_0x13649f=program[_0xc611b8(0x18e)](),_0x49635c=createTDXInstance(_0x13649f);_0x4c63f0['in']&&(_0x4c63f0[_0xc611b8(0x1a7)]=_0x4c63f0['in']);const _0x59d87c=await _0x2ae5df[_0xc611b8(0x253)]({'options':{..._0x13649f,..._0x4c63f0},'args':_0x2a7788?[_0x2a7788]:[],'tdx':_0x49635c});process[_0xc611b8(0x1a3)](_0x59d87c);}),program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1ee))['description'](a0_0x1566f7(0x244))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1b7),a0_0x1566f7(0x1c8))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1f6),a0_0x1566f7(0x245))[a0_0x1566f7(0x176)](a0_0x1566f7(0x20b),a0_0x1566f7(0x24c))['option'](a0_0x1566f7(0x23d),a0_0x1566f7(0x188))[a0_0x1566f7(0x176)](a0_0x1566f7(0x196),a0_0x1566f7(0x1db),'40')['action'](async(_0x38b619,_0x41c895)=>{const _0x4bd881=a0_0x1566f7,_0x42b40d=new QueryCommand(),_0x4b9fb8=program['opts'](),_0x5d1733=createTDXInstance(_0x4b9fb8);_0x41c895['in']&&(_0x41c895[_0x4bd881(0x1a7)]=_0x41c895['in']);const _0xfc5f09=await _0x42b40d['run']({'options':{..._0x4b9fb8,..._0x41c895},'args':_0x38b619?[_0x38b619]:[],'tdx':_0x5d1733});process[_0x4bd881(0x1a3)](_0xfc5f09);}),program['command'](a0_0x1566f7(0x1ca))['description'](a0_0x1566f7(0x195))[a0_0x1566f7(0x1b4)](()=>{const _0x320d02=a0_0x1566f7;console[_0x320d02(0x17a)](_0x320d02(0x1f9));}),program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x236))['description'](a0_0x1566f7(0x172))[a0_0x1566f7(0x1b4)](async(_0xe41124,_0x231e51)=>{const _0x1400fe=a0_0x1566f7,_0x56a199=new SegmentsCommand(),_0x1ac198=program[_0x1400fe(0x18e)](),_0x42a22d=createTDXInstance(_0x1ac198),_0x7d42e4=await _0x56a199[_0x1400fe(0x253)]({'options':{..._0x1ac198,..._0x231e51},'args':_0xe41124?[_0xe41124]:[],'tdx':_0x42a22d});process[_0x1400fe(0x1a3)](_0x7d42e4);});const segmentCmd=program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1b1))[a0_0x1566f7(0x206)](a0_0x1566f7(0x1f7));segmentCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x185))[a0_0x1566f7(0x205)](a0_0x1566f7(0x16f))[a0_0x1566f7(0x206)](a0_0x1566f7(0x230))['action'](async(_0x5db4f8,_0x2b0ff2)=>{const _0x142e34=a0_0x1566f7,_0x31378a=new SegmentDescribeCommand(),_0x4b45a6=program[_0x142e34(0x18e)](),_0x8020a=createTDXInstance(_0x4b45a6),_0x5e8f2a=await _0x31378a['run']({'options':{..._0x4b45a6,..._0x2b0ff2},'args':[_0x5db4f8],'tdx':_0x8020a});process[_0x142e34(0x1a3)](_0x5e8f2a);}),segmentCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x25e))[a0_0x1566f7(0x206)]('Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)')[a0_0x1566f7(0x1b4)](async(_0x3b319a,_0x687fc3)=>{const _0x1b549a=a0_0x1566f7,_0x36af5b=new SegmentShowCommand(),_0x30b403=program[_0x1b549a(0x18e)](),_0x45d510=createTDXInstance(_0x30b403),_0x27e90c=await _0x36af5b[_0x1b549a(0x253)]({'options':{..._0x30b403,..._0x687fc3},'args':[_0x3b319a],'tdx':_0x45d510});process[_0x1b549a(0x1a3)](_0x27e90c);}),segmentCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x250))['description'](a0_0x1566f7(0x228))['action'](async(_0x360cc2,_0x3a2502)=>{const _0x581b62=a0_0x1566f7,_0xf8c69d=new SegmentFolderListCommand(),_0x113159=program[_0x581b62(0x18e)](),_0x1ce269=createTDXInstance(_0x113159),_0x3622ab=await _0xf8c69d[_0x581b62(0x253)]({'options':{..._0x113159,..._0x3a2502},'args':[_0x360cc2],'tdx':_0x1ce269});process[_0x581b62(0x1a3)](_0x3622ab);});const folderCmd=segmentCmd[a0_0x1566f7(0x23b)]('folder')[a0_0x1566f7(0x206)](a0_0x1566f7(0x180));folderCmd['command']('show\x20<folder_ref>')['description']('Show\x20folder\x20details\x20(use\x20parent_name/folder_name)')[a0_0x1566f7(0x1b4)](async(_0x1fc8a6,_0x73756a)=>{const _0x3a16fa=a0_0x1566f7,_0x1aaf69=new SegmentFolderShowCommand(),_0x34ef8f=program[_0x3a16fa(0x18e)](),_0x3a41ff=createTDXInstance(_0x34ef8f),_0x3be5cf=await _0x1aaf69['run']({'options':{..._0x34ef8f,..._0x73756a},'args':[_0x1fc8a6],'tdx':_0x3a41ff});process[_0x3a16fa(0x1a3)](_0x3be5cf);}),segmentCmd['command'](a0_0x1566f7(0x252))[a0_0x1566f7(0x206)]('Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)')[a0_0x1566f7(0x1b4)](async(_0x2fb718,_0x17cf54)=>{const _0x16b109=a0_0x1566f7,_0x53383e=new SegmentSQLCommand(),_0x222d62=program[_0x16b109(0x18e)](),_0x5f3747=createTDXInstance(_0x222d62),_0x364b4f=await _0x53383e[_0x16b109(0x253)]({'options':{..._0x222d62,..._0x17cf54},'args':[_0x2fb718],'tdx':_0x5f3747});process[_0x16b109(0x1a3)](_0x364b4f);}),program[a0_0x1566f7(0x23b)]('activations\x20<segment_name>')[a0_0x1566f7(0x206)](a0_0x1566f7(0x23f))[a0_0x1566f7(0x1b4)](async(_0x4cf36d,_0x37b3ef)=>{const _0x86d93c=a0_0x1566f7,_0x215515=new ActivationsCommand(),_0x54bf38=program[_0x86d93c(0x18e)](),_0x446135=createTDXInstance(_0x54bf38),_0x23563d=await _0x215515[_0x86d93c(0x253)]({'options':{..._0x54bf38,..._0x37b3ef},'args':[_0x4cf36d],'tdx':_0x446135});process[_0x86d93c(0x1a3)](_0x23563d);});const workflowCmd=program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x234))[a0_0x1566f7(0x205)]('wf')[a0_0x1566f7(0x206)](a0_0x1566f7(0x1da));workflowCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x249))[a0_0x1566f7(0x206)](a0_0x1566f7(0x1cd))['action'](async(_0x367a56,_0x2ceb39)=>{const _0x3729dc=a0_0x1566f7,_0x557ff2=new WorkflowProjectsCommand(),_0xa48348=program[_0x3729dc(0x18e)](),_0x9116af=createTDXInstance(_0xa48348),_0x110bcc=await _0x557ff2[_0x3729dc(0x253)]({'options':{..._0xa48348,..._0x2ceb39},'args':_0x367a56?[_0x367a56]:[],'tdx':_0x9116af});process[_0x3729dc(0x1a3)](_0x110bcc);}),workflowCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x220))[a0_0x1566f7(0x205)]('ls')[a0_0x1566f7(0x206)](a0_0x1566f7(0x19c))[a0_0x1566f7(0x1b4)](async(_0x37cb33,_0x39e87c)=>{const _0x407261=a0_0x1566f7,_0x5e9d1a=new WorkflowWorkflowsCommand(),_0x289041=program['opts'](),_0x3ce94d=createTDXInstance(_0x289041),_0x31d514=await _0x5e9d1a[_0x407261(0x253)]({'options':{..._0x289041,..._0x39e87c},'args':_0x37cb33?[_0x37cb33]:[],'tdx':_0x3ce94d});process[_0x407261(0x1a3)](_0x31d514);}),workflowCmd['command'](a0_0x1566f7(0x265))['description']('List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)')['option'](a0_0x1566f7(0x1ab),a0_0x1566f7(0x199))['option'](a0_0x1566f7(0x1a0),a0_0x1566f7(0x1c4))[a0_0x1566f7(0x176)]('--to\x20<timestamp>',a0_0x1566f7(0x1de))[a0_0x1566f7(0x1b4)](async(_0x4dcf9a,_0xd0e1b4)=>{const _0x2f5244=a0_0x1566f7,_0x311c6d=new WorkflowSessionsCommand(),_0x19ac8e=program[_0x2f5244(0x18e)](),_0x408937=createTDXInstance(_0x19ac8e),_0x163431=await _0x311c6d[_0x2f5244(0x253)]({'options':{..._0x19ac8e,..._0xd0e1b4},'args':_0x4dcf9a?[_0x4dcf9a]:[],'tdx':_0x408937});process[_0x2f5244(0x1a3)](_0x163431);}),workflowCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x222))[a0_0x1566f7(0x206)](a0_0x1566f7(0x24f))[a0_0x1566f7(0x176)](a0_0x1566f7(0x178),'Include\x20retried\x20attempts')[a0_0x1566f7(0x1b4)](async(_0x310f0b,_0x9dd0e5)=>{const _0x4a74cd=a0_0x1566f7,_0x1de575=new WorkflowAttemptsCommand(),_0x493142=program[_0x4a74cd(0x18e)](),_0x39bc18=createTDXInstance(_0x493142),_0x41dc77=await _0x1de575[_0x4a74cd(0x253)]({'options':{..._0x493142,..._0x9dd0e5},'args':_0x310f0b?[_0x310f0b]:[],'tdx':_0x39bc18});process['exit'](_0x41dc77);}),workflowCmd['command'](a0_0x1566f7(0x1c2))[a0_0x1566f7(0x206)]('Show\x20specific\x20attempt\x20details')[a0_0x1566f7(0x1b4)](async(_0x20933f,_0x486d3f)=>{const _0x184f8c=a0_0x1566f7,_0x5bf782=new WorkflowAttemptCommand(),_0x3f507d=program['opts'](),_0x150675=createTDXInstance(_0x3f507d),_0x154c75=await _0x5bf782[_0x184f8c(0x253)]({'options':{..._0x3f507d,..._0x486d3f},'args':[_0x20933f],'tdx':_0x150675});process['exit'](_0x154c75);}),workflowCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x22d))['description'](a0_0x1566f7(0x1bc))[a0_0x1566f7(0x176)]('--include-subtasks',a0_0x1566f7(0x212))[a0_0x1566f7(0x1b4)](async(_0x2fc5cf,_0x572cb)=>{const _0x354feb=a0_0x1566f7,_0x3817ff=new WorkflowTasksCommand(),_0x55cf92=program[_0x354feb(0x18e)](),_0x184b98=createTDXInstance(_0x55cf92),_0xebc7e6=await _0x3817ff[_0x354feb(0x253)]({'options':{..._0x55cf92,..._0x572cb},'args':[_0x2fc5cf],'tdx':_0x184b98});process['exit'](_0xebc7e6);}),workflowCmd[a0_0x1566f7(0x23b)]('logs\x20<attempt-id>\x20<task-name>')[a0_0x1566f7(0x206)](a0_0x1566f7(0x173))[a0_0x1566f7(0x176)]('--offset\x20<number>',a0_0x1566f7(0x186),_0x42a6a5=>parseInt(_0x42a6a5,0xa),0x0)['action'](async(_0x3b9379,_0x130cbd,_0x421a56)=>{const _0x24b134=a0_0x1566f7,_0x3c34fc=new WorkflowLogsCommand(),_0x679ff8=program[_0x24b134(0x18e)](),_0x4a6470=createTDXInstance(_0x679ff8),_0xadafd2=await _0x3c34fc['run']({'options':{..._0x679ff8,..._0x421a56},'args':[_0x3b9379,_0x130cbd],'tdx':_0x4a6470});process['exit'](_0xadafd2);}),workflowCmd['command'](a0_0x1566f7(0x21b))['description']('Kill\x20a\x20running\x20attempt')[a0_0x1566f7(0x176)](a0_0x1566f7(0x1d0),a0_0x1566f7(0x21d))[a0_0x1566f7(0x1b4)](async(_0x4d6c35,_0x4c4a9b)=>{const _0x1e2328=a0_0x1566f7,_0x9ba03e=new WorkflowKillCommand(),_0x59275b=program[_0x1e2328(0x18e)](),_0x24aa2a=createTDXInstance(_0x59275b),_0x28e69f=await _0x9ba03e['run']({'options':{..._0x59275b,..._0x4c4a9b},'args':[_0x4d6c35],'tdx':_0x24aa2a});process['exit'](_0x28e69f);}),workflowCmd[a0_0x1566f7(0x23b)]('retry\x20<session-id|attempt-id>')['description'](a0_0x1566f7(0x1b6))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1f3),a0_0x1566f7(0x21e))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1e9),a0_0x1566f7(0x20d))['option'](a0_0x1566f7(0x177),a0_0x1566f7(0x1f2))[a0_0x1566f7(0x176)]('--force',a0_0x1566f7(0x261))['action'](async(_0x226617,_0x336ecc)=>{const _0x4b8290=a0_0x1566f7,_0x789b8b=new WorkflowRetryCommand(),_0x9006a2=program[_0x4b8290(0x18e)](),_0x4be865=createTDXInstance(_0x9006a2),_0x3c6b74=await _0x789b8b[_0x4b8290(0x253)]({'options':{..._0x9006a2,..._0x336ecc},'args':[_0x226617],'tdx':_0x4be865});process[_0x4b8290(0x1a3)](_0x3c6b74);}),workflowCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1c1))[a0_0x1566f7(0x206)]('Download\x20workflow\x20project\x20from\x20Treasure\x20Data')[a0_0x1566f7(0x176)](a0_0x1566f7(0x19d),'Specific\x20revision\x20to\x20download\x20(default:\x20latest)')[a0_0x1566f7(0x1b4)](async(_0x2eb8d6,_0x13cdad,_0x2b04b4)=>{const _0x3d38cd=a0_0x1566f7,_0x5e5f4c=new WorkflowDownloadCommand(),_0x244421=program[_0x3d38cd(0x18e)](),_0x4aa60d=createTDXInstance(_0x244421),_0x395121=await _0x5e5f4c['run']({'options':{..._0x244421,..._0x2b04b4},'args':[_0x2eb8d6,_0x13cdad||'.'],'tdx':_0x4aa60d});process[_0x3d38cd(0x1a3)](_0x395121);}),workflowCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x226))[a0_0x1566f7(0x206)](a0_0x1566f7(0x189))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1e1),a0_0x1566f7(0x1a6))[a0_0x1566f7(0x176)](a0_0x1566f7(0x19d),a0_0x1566f7(0x194))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1dc),'Skip\x20validation\x20of\x20.dig\x20files')[a0_0x1566f7(0x1b4)](async(_0x5cd2d7,_0x420a23)=>{const _0x4f8683=a0_0x1566f7,_0x2c6f43=new WorkflowPushCommand(),_0x1fe8e6=program['opts'](),_0xe1e2a8=createTDXInstance(_0x1fe8e6),_0x36872f=await _0x2c6f43[_0x4f8683(0x253)]({'options':{..._0x1fe8e6,..._0x420a23},'args':_0x5cd2d7?[_0x5cd2d7]:[],'tdx':_0xe1e2a8});process['exit'](_0x36872f);}),workflowCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x223))['description']('Delete\x20workflow\x20project\x20from\x20Treasure\x20Data')[a0_0x1566f7(0x1b4)](async(_0x2530cc,_0x4ee7ad)=>{const _0x18a1c6=a0_0x1566f7,_0x484ada=new WorkflowDeleteCommand(),_0x174a64=program['opts'](),_0x294fd1=createTDXInstance(_0x174a64),_0x246516=await _0x484ada[_0x18a1c6(0x253)]({'options':{..._0x174a64,..._0x4ee7ad},'args':[_0x2530cc],'tdx':_0x294fd1});process['exit'](_0x246516);});const llmCmd=program[a0_0x1566f7(0x23b)]('llm')[a0_0x1566f7(0x206)](a0_0x1566f7(0x20e));llmCmd['command'](a0_0x1566f7(0x25d))[a0_0x1566f7(0x206)](a0_0x1566f7(0x183))[a0_0x1566f7(0x1b4)](async(_0x72118,_0xe19648)=>{const _0x2be063=a0_0x1566f7,_0x36b494=new LLMUseCommand(),_0x47568a=program['opts'](),_0xdabc4f=createTDXInstance(_0x47568a),_0x547660=await _0x36b494[_0x2be063(0x253)]({'options':{..._0x47568a,..._0xe19648},'args':[_0x72118],'tdx':_0xdabc4f});process[_0x2be063(0x1a3)](_0x547660);}),llmCmd[a0_0x1566f7(0x23b)]('models')[a0_0x1566f7(0x206)](a0_0x1566f7(0x1bb))[a0_0x1566f7(0x1b4)](async _0x2a6640=>{const _0x2bce4b=a0_0x1566f7,_0x85042=new LLMModelsCommand(),_0x9de4d6=program['opts'](),_0x2c0cb1=createTDXInstance(_0x9de4d6),_0x4fabce=await _0x85042[_0x2bce4b(0x253)]({'options':{..._0x9de4d6,..._0x2a6640},'args':[],'tdx':_0x2c0cb1});process[_0x2bce4b(0x1a3)](_0x4fabce);}),llmCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x249))[a0_0x1566f7(0x206)](a0_0x1566f7(0x241))[a0_0x1566f7(0x1b4)](async(_0x3c05ff,_0x2656dd)=>{const _0x21a5be=a0_0x1566f7,_0x44a30d=new LLMProjectsCommand(),_0x23cca0=program[_0x21a5be(0x18e)](),_0x563337=createTDXInstance(_0x23cca0),_0x59d7c5=await _0x44a30d['run']({'options':{..._0x23cca0,..._0x2656dd},'args':_0x3c05ff?[_0x3c05ff]:[],'tdx':_0x563337});process[_0x21a5be(0x1a3)](_0x59d7c5);});const projectCmd=llmCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x23a))['description'](a0_0x1566f7(0x17c));projectCmd[a0_0x1566f7(0x23b)]('create\x20<name>')[a0_0x1566f7(0x206)](a0_0x1566f7(0x197))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1b9),'Project\x20description')[a0_0x1566f7(0x1b4)](async(_0x8c0340,_0x5c5fb7)=>{const _0x1e3cd9=a0_0x1566f7,_0x54579e=new LLMProjectCreateCommand(),_0xbb90bc=program[_0x1e3cd9(0x18e)](),_0x244243=createTDXInstance(_0xbb90bc),_0x1bf8df=await _0x54579e[_0x1e3cd9(0x253)]({'options':{..._0xbb90bc,..._0x5c5fb7},'args':[_0x8c0340],'tdx':_0x244243});process[_0x1e3cd9(0x1a3)](_0x1bf8df);}),projectCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1e5))[a0_0x1566f7(0x206)](a0_0x1566f7(0x1d3))[a0_0x1566f7(0x1b4)](async(_0x3d8970,_0x70ef3)=>{const _0x3800cc=a0_0x1566f7,_0x194227=new LLMProjectDeleteCommand(),_0x49c54d=program[_0x3800cc(0x18e)](),_0x1463d6=createTDXInstance(_0x49c54d),_0x106012=await _0x194227[_0x3800cc(0x253)]({'options':{..._0x49c54d,..._0x70ef3},'args':[_0x3d8970],'tdx':_0x1463d6});process[_0x3800cc(0x1a3)](_0x106012);}),llmCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1e2))[a0_0x1566f7(0x206)](a0_0x1566f7(0x1c7))[a0_0x1566f7(0x1b4)](async(_0x11c7d8,_0x1416db)=>{const _0x33ee09=a0_0x1566f7,_0x411a4d=new LLMAgentsCommand(),_0xb1bd7a=program['opts'](),_0x9ff03e=createTDXInstance(_0xb1bd7a),_0x3a0558=await _0x411a4d[_0x33ee09(0x253)]({'options':{..._0xb1bd7a,..._0x1416db},'args':_0x11c7d8?[_0x11c7d8]:[],'tdx':_0x9ff03e});process[_0x33ee09(0x1a3)](_0x3a0558);});const agentCmd=llmCmd['command'](a0_0x1566f7(0x1d4))['description']('LLM\x20agent\x20management');agentCmd['command'](a0_0x1566f7(0x1f4))[a0_0x1566f7(0x206)]('Show\x20agent\x20details')[a0_0x1566f7(0x1b4)](async(_0xf5ff38,_0x1a7513)=>{const _0x175910=a0_0x1566f7,_0x45faf7=new LLMAgentShowCommand(),_0x54406b=program[_0x175910(0x18e)](),_0x142a02=createTDXInstance(_0x54406b),_0x5c3b9c=await _0x45faf7[_0x175910(0x253)]({'options':{..._0x54406b,..._0x1a7513},'args':[_0xf5ff38],'tdx':_0x142a02});process[_0x175910(0x1a3)](_0x5c3b9c);}),agentCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x25f))[a0_0x1566f7(0x206)](a0_0x1566f7(0x1e7))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1b3),'System\x20prompt/instructions\x20(default:\x20empty)')[a0_0x1566f7(0x176)](a0_0x1566f7(0x1aa),a0_0x1566f7(0x1e0),'claude-4.5-sonnet')[a0_0x1566f7(0x176)](a0_0x1566f7(0x1b2),a0_0x1566f7(0x192))[a0_0x1566f7(0x176)](a0_0x1566f7(0x255),a0_0x1566f7(0x231),'4')[a0_0x1566f7(0x176)](a0_0x1566f7(0x19e),a0_0x1566f7(0x184),a0_0x1566f7(0x211))[a0_0x1566f7(0x1b4)](async(_0x585f41,_0x36f1af)=>{const _0x4c8bd1=a0_0x1566f7,_0x252737=new LLMAgentCreateCommand(),_0x1f7ee8=program[_0x4c8bd1(0x18e)](),_0x223454=createTDXInstance(_0x1f7ee8),_0x140c60=await _0x252737[_0x4c8bd1(0x253)]({'options':{..._0x1f7ee8,..._0x36f1af},'args':[_0x585f41],'tdx':_0x223454});process[_0x4c8bd1(0x1a3)](_0x140c60);}),agentCmd['command'](a0_0x1566f7(0x1e6))[a0_0x1566f7(0x206)](a0_0x1566f7(0x254))['option'](a0_0x1566f7(0x17f),a0_0x1566f7(0x1be))['option'](a0_0x1566f7(0x240),'Agent\x20prompt/instructions')[a0_0x1566f7(0x176)](a0_0x1566f7(0x1b9),a0_0x1566f7(0x25a))['option'](a0_0x1566f7(0x1b2),a0_0x1566f7(0x192))[a0_0x1566f7(0x1b4)](async(_0x9633b7,_0x1d8d83)=>{const _0x384962=a0_0x1566f7,_0x37f01b=new LLMAgentUpdateCommand(),_0x46e1d4=program[_0x384962(0x18e)](),_0x4c01b9=createTDXInstance(_0x46e1d4),_0x43684b=await _0x37f01b[_0x384962(0x253)]({'options':{..._0x46e1d4,..._0x1d8d83},'args':[_0x9633b7],'tdx':_0x4c01b9});process[_0x384962(0x1a3)](_0x43684b);}),agentCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x243))[a0_0x1566f7(0x206)]('Delete\x20an\x20agent')['action'](async(_0x26a274,_0x7a1cb)=>{const _0x2bee54=a0_0x1566f7,_0x4ae25b=new LLMAgentDeleteCommand(),_0xd9105f=program['opts'](),_0x1627f3=createTDXInstance(_0xd9105f),_0x2e7723=await _0x4ae25b[_0x2bee54(0x253)]({'options':{..._0xd9105f,..._0x7a1cb},'args':[_0x26a274],'tdx':_0x1627f3});process[_0x2bee54(0x1a3)](_0x2e7723);}),llmCmd['command'](a0_0x1566f7(0x1d8))[a0_0x1566f7(0x206)](a0_0x1566f7(0x204))[a0_0x1566f7(0x1b4)](async(_0x2ed434,_0x1c2cd6)=>{const _0x29bba1=a0_0x1566f7,_0x34f9a1=new LLMHistoryCommand(),_0x2096f1=program[_0x29bba1(0x18e)](),_0x595a0c=createTDXInstance(_0x2096f1),_0x11da3b=await _0x34f9a1['run']({'options':{..._0x2096f1,..._0x1c2cd6},'args':_0x2ed434?[_0x2ed434]:[],'tdx':_0x595a0c});process['exit'](_0x11da3b);}),llmCmd[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1b5))[a0_0x1566f7(0x206)](a0_0x1566f7(0x1dd))[a0_0x1566f7(0x176)](a0_0x1566f7(0x247),a0_0x1566f7(0x193),a0_0x1566f7(0x1d9))[a0_0x1566f7(0x176)](a0_0x1566f7(0x1e4),a0_0x1566f7(0x218))['option'](a0_0x1566f7(0x224),a0_0x1566f7(0x171))['option'](a0_0x1566f7(0x21c),a0_0x1566f7(0x1e3))[a0_0x1566f7(0x1b4)](async _0x1e7bec=>{const _0x5ddf6e=a0_0x1566f7,_0x48a361=new LLMProxyCommand(),_0x57a083=program[_0x5ddf6e(0x18e)](),_0x5e8b04=createTDXInstance(_0x57a083),_0x23695a={..._0x1e7bec,'port':_0x1e7bec[_0x5ddf6e(0x208)]?parseInt(_0x1e7bec[_0x5ddf6e(0x208)],0xa):undefined},_0x22f82a=await _0x48a361['run']({'options':{..._0x57a083,..._0x23695a},'args':[],'tdx':_0x5e8b04});process[_0x5ddf6e(0x1a3)](_0x22f82a);}),program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x1a2))[a0_0x1566f7(0x206)](a0_0x1566f7(0x24d))[a0_0x1566f7(0x176)]('--model\x20<name>','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)',a0_0x1566f7(0x170))[a0_0x1566f7(0x176)](a0_0x1566f7(0x21c),a0_0x1566f7(0x1b0))[a0_0x1566f7(0x1b4)](async _0x4de96d=>{const _0x56486e=a0_0x1566f7,_0xd130dc=new ClaudeCommand(),_0x4e5a4e=program[_0x56486e(0x18e)](),_0x5de171=createTDXInstance(_0x4e5a4e),_0x168cf3=await _0xd130dc[_0x56486e(0x253)]({'options':{..._0x4e5a4e,..._0x4de96d},'args':[],'tdx':_0x5de171});process[_0x56486e(0x1a3)](_0x168cf3);}),program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x200))['description'](a0_0x1566f7(0x1af))[a0_0x1566f7(0x176)](a0_0x1566f7(0x21c),a0_0x1566f7(0x1ae))[a0_0x1566f7(0x176)]('--clear',a0_0x1566f7(0x1cb))['action'](async _0x55c860=>{const _0x3504e4=a0_0x1566f7,_0xa1fb38=new ContextCommand(),_0x26357e=program[_0x3504e4(0x18e)](),_0x418aeb=await _0xa1fb38[_0x3504e4(0x253)]({'options':{..._0x26357e,..._0x55c860},'args':[],'tdx':null});process[_0x3504e4(0x1a3)](_0x418aeb);}),program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x260))[a0_0x1566f7(0x206)](a0_0x1566f7(0x258))[a0_0x1566f7(0x1b4)](async(_0x4a755e,_0x1ac38c,_0x33ce83)=>{const _0x315134=a0_0x1566f7,_0x3ecf2f=new UseCommand(),_0x24c0a3=program['opts'](),_0x430cb9=[];if(_0x4a755e)_0x430cb9[_0x315134(0x1c6)](_0x4a755e);if(_0x1ac38c)_0x430cb9[_0x315134(0x1c6)](_0x1ac38c);const _0x2d7f3b=await _0x3ecf2f[_0x315134(0x253)]({'options':{..._0x24c0a3,..._0x33ce83},'args':_0x430cb9,'tdx':null});process[_0x315134(0x1a3)](_0x2d7f3b);}),program[a0_0x1566f7(0x23b)](a0_0x1566f7(0x256))[a0_0x1566f7(0x206)](a0_0x1566f7(0x1a5))[a0_0x1566f7(0x1b4)](async _0xa06f0f=>{const _0x2ca06c=a0_0x1566f7,_0x1dc152=new ProfilesCommand(),_0x3d9bc4=program['opts'](),_0x366277=await _0x1dc152[_0x2ca06c(0x253)]({'options':{..._0x3d9bc4,..._0xa06f0f},'args':[],'tdx':null});process['exit'](_0x366277);}),program[a0_0x1566f7(0x22f)](process[a0_0x1566f7(0x191)]);!process['argv'][a0_0x1566f7(0x1c3)](0x2)[a0_0x1566f7(0x216)]&&program[a0_0x1566f7(0x19b)]();
|
|
2
|
+
const a0_0x450eb4=a0_0x281d;(function(_0x117fea,_0x55e6a4){const _0x10a007=a0_0x281d,_0x3e3df7=_0x117fea();while(!![]){try{const _0x275530=-parseInt(_0x10a007(0x208))/0x1*(-parseInt(_0x10a007(0x23b))/0x2)+parseInt(_0x10a007(0x2f5))/0x3*(parseInt(_0x10a007(0x24f))/0x4)+parseInt(_0x10a007(0x2dd))/0x5+parseInt(_0x10a007(0x2c6))/0x6+-parseInt(_0x10a007(0x26b))/0x7+-parseInt(_0x10a007(0x1f0))/0x8*(-parseInt(_0x10a007(0x2bc))/0x9)+-parseInt(_0x10a007(0x25c))/0xa;if(_0x275530===_0x55e6a4)break;else _0x3e3df7['push'](_0x3e3df7['shift']());}catch(_0x28a499){_0x3e3df7['push'](_0x3e3df7['shift']());}}}(a0_0x570d,0xa85eb));import{Command}from'commander';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{TDX}from'./sdk/index.js';import{GlobalContext}from'./core/global-context.js';import{QueryCommand}from'./commands/query-command.js';import{ChatCommand}from'./commands/chat-command.js';import{ApiCommand}from'./commands/api-command.js';import{DatabasesCommand}from'./commands/databases.js';import{TablesCommand}from'./commands/tables.js';import{SegmentsCommand}from'./commands/segments.js';import{ActivationsCommand}from'./commands/activations.js';import{ShowCommand}from'./commands/show.js';import{DescribeCommand}from'./commands/describe.js';import{SegmentDescribeCommand,SegmentShowCommand,SegmentFolderListCommand,SegmentFolderShowCommand,SegmentSQLCommand,SegmentFolderCreateCommand}from'./commands/segment-command.js';function a0_0x570d(){const _0x45179c=['name','folder','tables\x20[pattern]','Read\x20request\x20body\x20from\x20file','action','argumentDescription','context','subcommandDescription','GET','fields\x20<parent_name>','--project\x20<name>','List\x20workflow\x20execution\x20sessions\x20(filter\x20by\x20project\x20or\x20project.workflow)','subcommandTerm','push\x20[project-name-or-dir]','commandDescription','tdx','Set\x20session-level\x20context\x20(resources:\x20database,\x20parent_segment,\x20llm_project,\x20llm_agent,\x20profile)','commands','--in\x20<database>','Updated\x20timezone','models','Model\x20name\x20(default:\x20claude-4.5-sonnet)','System\x20prompt/instructions\x20(default:\x20empty)','outputHelp','delete\x20<name>','AI-native\x20CLI\x20for\x20Treasure\x20Data','show\x20[table]','--description\x20<text>','List\x20available\x20fields\x20for\x20segmentation','Parent\x20segment\x20description','Master\x20table\x20name','Updated\x20schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','update\x20<name>','push','Run\x20Trino\x20query\x20with\x20streaming\x20results','--new','alias','--resume-from\x20<task>','List\x20workflow\x20attempts\x20(filter\x20by\x20project\x20or\x20project.workflow)','List\x20all\x20workflow\x20projects\x20(optionally\x20filtered\x20by\x20glob\x20pattern)','--profile\x20<name>','kill\x20<attempt-id>','--schedule-type\x20<type>','update\x20<segment_name>','Parent\x20segment\x20(audience)\x20management','show\x20<segment_name>','--temperature\x20<n>','exit','Move\x20to\x20folder','Create\x20segment\x20folder','Start\x20a\x20new\x20chat\x20session','Skip\x20population\x20counting','--revision\x20<revision>','--name\x20<name>','\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','HTTP\x20method\x20(GET,\x20POST,\x20PUT,\x20DELETE,\x20PATCH)','--jsonl','Add\x20behaviors\x20from\x20JSON\x20file','Force\x20ANSI\x20color\x20output\x20(overrides\x20TTY\x20detection)','--limit\x20<rows>','Attributes\x20from\x20JSON\x20file','repeat','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20pattern)','requiredOption','filter','Behaviors\x20from\x20JSON\x20file','Filter\x20by\x20job\x20status\x20(queued,\x20running,\x20success,\x20error)','Create\x20a\x20new\x20LLM\x20project','show\x20<job-id>','Enable\x20verbose\x20logging','Updated\x20schedule\x20option','List\x20activations\x20for\x20a\x20segment\x20(use\x20parent_name/child_name)','map','Customer\x20group\x20from\x20JSON\x20file','use\x20<project-name>','Output\x20in\x20JSON\x20Lines\x20format\x20(shorthand\x20for\x20--format\x20jsonl)','Database\x20to\x20use\x20(overrides\x20context)','--from-task\x20<task>','9LLBTiS','argumentTerm','../package.json','--output\x20<file>','Add\x20attributes\x20from\x20JSON\x20file','padWidth','Agent\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)','retry\x20<session-id|attempt-id>','attempt\x20<attempt-id>','--site\x20<site>','4908078XouCLW','--from\x20<timestamp>','Maximum\x20rows\x20to\x20display\x20in\x20table\x20format\x20(default:\x2040)','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','registeredArguments','--verbose','proxy','sonnet','--reason\x20<text>','Timezone\x20(e.g.,\x20America/Los_Angeles)','--max-tool-iterations\x20<n>','Create\x20child\x20segment\x20(use\x20parent_name/child_name)','--llm-project\x20<name>','Update\x20an\x20existing\x20agent','Model\x20to\x20use\x20(haiku,\x20sonnet,\x20opus)','--name\x20<text>','preAction','--customer-group-file\x20<file>','description','llm','slice','Profile\x20to\x20use\x20(overrides\x20active\x20profile)','Override\x20project\x20name','152845qOtWHX','Starter\x20message','Segment\x20description','Show\x20logs\x20for\x20a\x20specific\x20task','--tsv','history\x20[chat-id]','Agent\x20description','Folder\x20name\x20for\x20organization','Submit\x20a\x20job','--name\x20<new_name>','Master\x20database\x20name','Trino\x20catalog\x20(default:\x20td)','--timezone\x20<tz>','Schedule\x20type:\x20none,\x20daily,\x20weekly,\x20monthly','Update\x20child\x20segment\x20(use\x20parent_name/child_name)','Override\x20parameters\x20(JSON\x20string\x20or\x20@file.json)','--table\x20<table>','Show\x20job\x20details','--session\x20<id>','Agent\x20prompt/instructions','Customer\x20group\x20as\x20JSON\x20string','Set\x20current\x20project\x20context\x20for\x20agent\x20operations','Reason\x20for\x20killing\x20the\x20attempt','Job\x20type:\x20trino\x20or\x20hive\x20(default:\x20trino)','984zMWvsG','--no-count-population','Port\x20to\x20run\x20the\x20proxy\x20server\x20on','--color','url','us01','Model\x20type\x20(default:\x20claude-4.5-sonnet)','tasks\x20<attempt-id>','CDP\x20segment\x20management\x20commands','--behaviors\x20<json>','Execute\x20segment\x20SQL\x20query\x20and\x20show\x20results\x20(use\x20parent_name\x20or\x20parent_name/child_name)','activations\x20<segment_name>','Make\x20segment\x20invisible\x20(default:\x20visible)','List\x20tables\x20(e.g.,\x20mydb,\x20mydb.*,\x20*.user*,\x20mydb.user*)','Updated\x20description','Enable\x20debug\x20mode\x20(logs\x20proxy\x20request/response\x20to\x20stderr)','Show\x20folder\x20details\x20(use\x20parent_name/folder_name)','create\x20<name>','Parent\x20folder\x20name\x20for\x20nested\x20folders','Agent\x20reference\x20(project-name/agent-name)','length','--timeout\x20<seconds>','-H,\x20--header\x20<header>','--dry-run','--debug','tsv','Folder\x20description','--schedule-option\x20<value>','--starter-message\x20<text>','output\x20the\x20version\x20number','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','create\x20<parent_name>\x20<folder_name>','delete\x20<project-name-or-id>','--status\x20<status>','Maximum\x20tool\x20iterations\x20(default:\x204)','--database\x20<db>','project','Updated\x20filtering\x20rule\x20from\x20JSON\x20file','aliases','Enable\x20debug\x20mode\x20(logs\x20request/response\x20to\x20stderr)','trino','--invisible','sql\x20<segment_name>','List\x20available\x20LLM\x20models','create\x20<segment_name>','run','Commands:','Disable\x20ANSI\x20color\x20output\x20(also\x20respects\x20NO_COLOR\x20env\x20var)','api\x20[endpoint]','2833176WpZtXJ','verbose','-f,\x20--file\x20<path>','summary','hook','projects\x20[pattern]','desc','update\x20<agent-name>','--port\x20<number>','--folder\x20<name>','apiKey','--attributes\x20<json>','--parent-folder\x20<name>','join','Include\x20subtasks\x20in\x20the\x20output','Filtering\x20rule\x20as\x20JSON\x20string','configureHelp','--skip-validation','Project\x20description','Get\x20job\x20results','4000','claude','workflow','Create\x20parent\x20segment\x20(audience)','935911fmfSxr','injectIntoOptions','show\x20<folder_ref>','padEnd','Attributes\x20as\x20JSON\x20string','Kill\x20a\x20running\x20attempt','Skip\x20validation\x20of\x20.dig\x20files','Get\x20SQL\x20query\x20for\x20segment\x20(use\x20parent_name\x20or\x20parent_name/child_name)','--agent\x20<name>','--kind\x20<type>','Job\x20management\x20commands','Retry\x20a\x20session\x20or\x20attempt\x20(prefix\x20with\x20session:\x20or\x20attempt:)','after','--rule\x20<json>','use\x20[resource]\x20[value]','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','jobs','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy','Start\x20time\x20filter\x20(ISO\x208601\x20format)','Show\x20context\x20with\x20sources\x20(for\x20debugging)','0.7','json','Temperature\x20(0.0-2.0,\x20default:\x200.7)','LLM\x20agent\x20management','Segment\x20kind:\x200=batch,\x201=realtime,\x202=funnel_stage','--job-type\x20<type>','--clear','Show\x20current\x20resolved\x20context','Show\x20chat\x20history\x20(or\x20list\x20all\x20sessions\x20if\x20no\x20ID\x20provided)','Schedule\x20option\x20(time\x20for\x20daily,\x20day\x20for\x20weekly/monthly)','port','database','command','parse','Updated\x20filtering\x20rule\x20as\x20JSON\x20string','Revision\x20name\x20(default:\x20timestamp)','Read\x20SQL\x20query\x20from\x20file','Arguments:','Preview\x20operation\x20without\x20executing','--to\x20<timestamp>','workflows\x20[project]','chat\x20[message...]','site','opts','option','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Filter\x20by\x20status\x20(running,\x20success,\x20error,\x20blocked,\x20all)','jsonl','--model\x20<name>','-d,\x20--database\x20<database>','Output\x20in\x20JSON\x20format\x20(shorthand\x20for\x20--format\x20json)','2prSQED','--format\x20<format>','sessions\x20[project]','-d,\x20--database\x20<name>','-v,\x20--version','result\x20<job-id>','Filtering\x20rule\x20from\x20JSON\x20file','Force\x20retry\x20even\x20if\x20not\x20failed\x20(attempt\x20retry\x20only)','Segment\x20folder\x20management','Options:','Show\x20agent\x20details','Show\x20tasks\x20for\x20an\x20attempt','Workflow\x20(Digdag)\x20management\x20commands','List\x20parent\x20segments\x20or\x20child\x20segments\x20under\x20a\x20parent','End\x20time\x20filter\x20(ISO\x208601\x20format)','LLM\x20operations\x20(models,\x20projects,\x20agents,\x20chat)','Kill\x20a\x20job','Resume\x20from\x20specific\x20task\x20(session\x20retry\x20only)','profiles','--type\x20<api_type>','1252PCKRBK','--customer-group\x20<json>','Session\x20ID\x20to\x20use\x20(defaults\x20to\x20parent\x20PID,\x20allows\x20sharing\x20sessions\x20across\x20processes)','List\x20all\x20LLM\x20projects\x20(optionally\x20filtered\x20by\x20pattern)','LLM\x20project\x20to\x20use\x20(overrides\x20context)','--in\x20<name>','commandUsage','Parent\x20segment\x20to\x20use\x20(overrides\x20context)','format','Alias\x20for\x20--database\x20(natural\x20language\x20style)','Output\x20format\x20(table,\x20json,\x20jsonl,\x20tsv)','claude-4.5-sonnet','job','14604650EoUYuB','required','options','parent','hidden','--force','List\x20all\x20available\x20profiles','replace','version','Skip\x20confirmation\x20prompts','--database\x20<name>','--add-attributes-file\x20<file>','Database\x20name\x20(used\x20when\x20not\x20specified\x20in\x20table\x20pattern)','Show\x20specific\x20attempt\x20details','Save\x20output\x20to\x20file','638372rhepSI','argv','Show\x20segment\x20details\x20(use\x20parent_name\x20or\x20parent_name/child_name)'];a0_0x570d=function(){return _0x45179c;};return a0_0x570d();}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{WorkflowProjectsCommand,WorkflowWorkflowsCommand,WorkflowSessionsCommand,WorkflowAttemptsCommand,WorkflowAttemptCommand,WorkflowTasksCommand,WorkflowLogsCommand,WorkflowKillCommand,WorkflowRetryCommand,WorkflowDownloadCommand,WorkflowPushCommand,WorkflowDeleteCommand}from'./commands/workflow-command.js';import{JobListCommand,JobShowCommand,JobKillCommand,JobSubmitCommand,JobResultCommand}from'./commands/job-command.js';import{LLMModelsCommand,LLMProjectsCommand,LLMAgentsCommand,LLMAgentShowCommand,LLMAgentCreateCommand,LLMAgentUpdateCommand,LLMAgentDeleteCommand,LLMHistoryCommand,LLMUseCommand,LLMProjectCreateCommand,LLMProjectDeleteCommand}from'./commands/llm-command.js';import{LLMProxyCommand}from'./commands/llm-proxy.js';import{ClaudeCommand}from'./commands/claude-command.js';import{ContextCommand}from'./commands/context-command.js';import{UseCommand}from'./commands/use-command.js';import{ProfilesCommand}from'./commands/profiles-command.js';const __filename=fileURLToPath(import.meta[a0_0x450eb4(0x1c3)]),__dirname=dirname(__filename),packageJson=JSON[a0_0x450eb4(0x229)](readFileSync(join(__dirname,a0_0x450eb4(0x2be)),'utf-8')),program=new Command();program[a0_0x450eb4(0x26e)](a0_0x450eb4(0x27d))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x287))[a0_0x450eb4(0x264)](packageJson[a0_0x450eb4(0x264)],a0_0x450eb4(0x23f),a0_0x450eb4(0x1dc)),program['option'](a0_0x450eb4(0x2c5),'TD\x20site/region\x20(us01,\x20jp01,\x20eu01,\x20ap02,\x20ap03,\x20dev-us01,\x20dev-eu01,\x20stg-us01,\x20stg-jp01,\x20stg-ap03;\x20aliases:\x20us,\x20jp,\x20aws,\x20dev,\x20stg)',a0_0x450eb4(0x1c4))[a0_0x450eb4(0x234)](a0_0x450eb4(0x23c),a0_0x450eb4(0x259))['option']('--json',a0_0x450eb4(0x23a))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2a6),a0_0x450eb4(0x2b9))['option'](a0_0x450eb4(0x2e1),'Output\x20in\x20TSV\x20format\x20(shorthand\x20for\x20--format\x20tsv)')[a0_0x450eb4(0x234)](a0_0x450eb4(0x2bf),a0_0x450eb4(0x26a))[a0_0x450eb4(0x234)]('--limit\x20<rows>',a0_0x450eb4(0x2c8),'40')[a0_0x450eb4(0x234)](a0_0x450eb4(0x1c2),a0_0x450eb4(0x2a8),![])[a0_0x450eb4(0x234)]('--no-color',a0_0x450eb4(0x1ee),![])[a0_0x450eb4(0x234)](a0_0x450eb4(0x2cb),a0_0x450eb4(0x2b3),![])['option'](a0_0x450eb4(0x1d4),'Set\x20operation\x20timeout\x20in\x20seconds','30')['option'](a0_0x450eb4(0x1d6),a0_0x450eb4(0x22e),![])[a0_0x450eb4(0x234)]('-y,\x20--yes',a0_0x450eb4(0x265),![])['option'](a0_0x450eb4(0x2ef),a0_0x450eb4(0x251))[a0_0x450eb4(0x234)](a0_0x450eb4(0x296),a0_0x450eb4(0x2db))['option'](a0_0x450eb4(0x23e),a0_0x450eb4(0x2ba))['option'](a0_0x450eb4(0x254),a0_0x450eb4(0x258))['option']('--parent-segment\x20<name>',a0_0x450eb4(0x256))['option'](a0_0x450eb4(0x2d2),a0_0x450eb4(0x253)),program[a0_0x450eb4(0x200)]({'formatHelp':(_0x25fe87,_0x3c1361)=>{const _0x414a44=a0_0x450eb4,_0x52d32d=_0x3c1361[_0x414a44(0x2c1)](_0x25fe87,_0x3c1361),_0x3400ce=0x2,_0x3dfa43=0x2;function _0x5abc00(_0x593f20){const _0x2a429a=_0x414a44;return!!_0x593f20[_0x2a429a(0x260)];}function _0x468e79(_0x1c0c58,_0x52d6ca){const _0x5e6496=_0x414a44;if(_0x52d6ca){const _0x5dd28d=''+_0x1c0c58[_0x5e6496(0x20b)](_0x52d32d+_0x3dfa43)+_0x52d6ca;return _0x5dd28d;}return _0x1c0c58;}function _0x11046c(_0x186c22){const _0xc8f7d9=_0x414a44;return _0x186c22[_0xc8f7d9(0x1fd)]('\x0a')[_0xc8f7d9(0x263)](/^/gm,'\x20'[_0xc8f7d9(0x2ab)](_0x3400ce));}const _0x515c6d=[];_0x515c6d[_0x414a44(0x28f)]('Usage:\x20'+_0x3c1361[_0x414a44(0x255)](_0x25fe87));const _0x5e98c0=_0x3c1361[_0x414a44(0x27c)](_0x25fe87);_0x5e98c0&&(_0x515c6d[_0x414a44(0x28f)](''),_0x515c6d[_0x414a44(0x28f)](_0x5e98c0));const _0x1dbc38=_0x25fe87[_0x414a44(0x27f)][_0x414a44(0x2ae)](_0x97609d=>!_0x5abc00(_0x97609d));if(_0x1dbc38[_0x414a44(0x1d3)]>0x0){const _0x5e5c81=_0x1dbc38[_0x414a44(0x2b6)](_0x3856fd=>{const _0x5ef8db=_0x414a44,_0x52c225=_0x3c1361[_0x5ef8db(0x27a)](_0x3856fd),_0x146423=_0x3c1361[_0x5ef8db(0x275)](_0x3856fd);return _0x468e79(_0x52c225,_0x146423);});_0x515c6d[_0x414a44(0x28f)](''),_0x515c6d[_0x414a44(0x28f)](_0x414a44(0x1ed)),_0x515c6d[_0x414a44(0x28f)](_0x11046c(_0x5e5c81));}const _0x27b7d6=_0x25fe87[_0x414a44(0x25e)][_0x414a44(0x2ae)](_0x274abe=>!_0x5abc00(_0x274abe));if(_0x27b7d6[_0x414a44(0x1d3)]>0x0){const _0x41f766=_0x27b7d6[_0x414a44(0x2b6)](_0x29af78=>{const _0x25d0f1=_0x3c1361['optionTerm'](_0x29af78),_0x5c3567=_0x3c1361['optionDescription'](_0x29af78);return _0x468e79(_0x25d0f1,_0x5c3567);});_0x515c6d['push'](''),_0x515c6d[_0x414a44(0x28f)](_0x414a44(0x244)),_0x515c6d[_0x414a44(0x28f)](_0x11046c(_0x41f766));}const _0x63a4b5=(_0x25fe87[_0x414a44(0x2ca)]||[])[_0x414a44(0x2ae)](_0x1b594f=>!_0x5abc00(_0x1b594f));if(_0x63a4b5['length']>0x0){const _0x31ee02=_0x63a4b5[_0x414a44(0x2b6)](_0x15c8ac=>{const _0x13f303=_0x414a44,_0x3f2211=_0x3c1361[_0x13f303(0x2bd)](_0x15c8ac),_0x5cdeaf=_0x3c1361[_0x13f303(0x273)](_0x15c8ac);return _0x468e79(_0x3f2211,_0x5cdeaf);});_0x515c6d[_0x414a44(0x28f)](''),_0x515c6d['push'](_0x414a44(0x22d)),_0x515c6d[_0x414a44(0x28f)](_0x11046c(_0x31ee02));}return _0x515c6d['join']('\x0a');},'subcommandTerm':_0x3e5d2c=>{const _0x4a6192=a0_0x450eb4,_0x2b1d44=(_0x3e5d2c[_0x4a6192(0x2ca)]||[])[_0x4a6192(0x2b6)](_0x33e1c2=>_0x33e1c2[_0x4a6192(0x25d)]?'<'+_0x33e1c2[_0x4a6192(0x26e)]()+'>':'['+_0x33e1c2[_0x4a6192(0x26e)]()+']')['join']('\x20'),_0x444054=_0x3e5d2c[_0x4a6192(0x1e5)](),_0x25d52a=_0x444054[_0x4a6192(0x1d3)]>0x0?_0x3e5d2c['name']()+',\x20'+_0x444054[_0x4a6192(0x1fd)](',\x20'):_0x3e5d2c[_0x4a6192(0x26e)]();return _0x2b1d44?_0x25d52a+'\x20'+_0x2b1d44:_0x25d52a;}}),program[a0_0x450eb4(0x1f4)](a0_0x450eb4(0x2d6),_0xa623bc=>{const _0x177ec8=a0_0x450eb4,_0x4c3225=_0xa623bc[_0x177ec8(0x233)]();if(!_0x4c3225['format']){if(_0x4c3225[_0x177ec8(0x21d)])_0x4c3225['format']='json';else{if(_0x4c3225['jsonl'])_0x4c3225[_0x177ec8(0x257)]=_0x177ec8(0x237);else _0x4c3225['tsv']&&(_0x4c3225[_0x177ec8(0x257)]=_0x177ec8(0x1d8));}}_0x4c3225['in']&&!_0x4c3225['database']&&(_0x4c3225['database']=_0x4c3225['in']);});function createTDXInstance(_0x506e81){const _0x3b85c6=a0_0x450eb4,_0x2da4f7=new GlobalContext(_0x506e81);_0x2da4f7[_0x3b85c6(0x209)](_0x506e81);const _0x53a2c3={'site':_0x2da4f7[_0x3b85c6(0x232)],'apiKey':_0x2da4f7[_0x3b85c6(0x1fa)],'verbose':_0x2da4f7[_0x3b85c6(0x1f1)]};return new TDX(_0x53a2c3);}program['command']('databases\x20[pattern]')[a0_0x450eb4(0x2d8)]('List\x20all\x20databases\x20(optionally\x20filtered\x20by\x20glob\x20pattern)')['action'](async(_0x1ae07a,_0xcad953)=>{const _0x43d9e7=a0_0x450eb4,_0x3f9bcb=new DatabasesCommand(),_0x3932ae=program['opts'](),_0x4432ee=createTDXInstance(_0x3932ae),_0x5e22c8=await _0x3f9bcb[_0x43d9e7(0x1ec)]({'options':{..._0x3932ae,..._0xcad953},'args':_0x1ae07a?[_0x1ae07a]:[],'tdx':_0x4432ee});process[_0x43d9e7(0x29d)](_0x5e22c8);}),program[a0_0x450eb4(0x228)](a0_0x450eb4(0x231))[a0_0x450eb4(0x2d8)]('Chat\x20with\x20an\x20LLM\x20agent\x20(simplified\x20interface)')[a0_0x450eb4(0x234)]('--agent\x20<ref>',a0_0x450eb4(0x1d2))[a0_0x450eb4(0x234)](a0_0x450eb4(0x238),a0_0x450eb4(0x283))['option'](a0_0x450eb4(0x29c),a0_0x450eb4(0x21e))['option'](a0_0x450eb4(0x291),a0_0x450eb4(0x2a0))['action'](async(_0x56a1db,_0x29dd9f)=>{const _0x4ed0f8=a0_0x450eb4,_0x4793c2=new ChatCommand(),_0x16e52e=program[_0x4ed0f8(0x233)](),_0x2f27e0=createTDXInstance(_0x16e52e),_0x1e96a5=await _0x4793c2[_0x4ed0f8(0x1ec)]({'options':{..._0x16e52e,..._0x29dd9f},'args':_0x56a1db,'tdx':_0x2f27e0});process[_0x4ed0f8(0x29d)](_0x1e96a5);});const apiCmd=program[a0_0x450eb4(0x228)](a0_0x450eb4(0x1ef))[a0_0x450eb4(0x1f3)](a0_0x450eb4(0x2c9))['addHelpText'](a0_0x450eb4(0x214),a0_0x450eb4(0x2a4))[a0_0x450eb4(0x234)]('-X,\x20--method\x20<method>',a0_0x450eb4(0x2a5),a0_0x450eb4(0x276))[a0_0x450eb4(0x234)]('--data\x20<data>','Request\x20body\x20as\x20JSON\x20string')[a0_0x450eb4(0x234)](a0_0x450eb4(0x1f2),a0_0x450eb4(0x271))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1d5),'Custom\x20header\x20(format:\x20\x22Key:\x20Value\x22,\x20repeatable)',(_0x3d975b,_0x873533)=>{return _0x873533?[..._0x873533,_0x3d975b]:[_0x3d975b];})[a0_0x450eb4(0x234)](a0_0x450eb4(0x24e),'API\x20type\x20(td,\x20cdp,\x20workflow,\x20trino,\x20llm)','td')[a0_0x450eb4(0x272)](async(_0x4ce983,_0x119ec0)=>{const _0x38f440=a0_0x450eb4;if(!_0x4ce983){apiCmd['help']();return;}const _0x326867=new ApiCommand(),_0x13037c=program[_0x38f440(0x233)](),_0x57d5b1=createTDXInstance(_0x13037c),_0x389410=await _0x326867['run']({'options':{..._0x13037c,..._0x119ec0},'args':[_0x4ce983],'tdx':_0x57d5b1});process[_0x38f440(0x29d)](_0x389410);});program[a0_0x450eb4(0x228)](a0_0x450eb4(0x270))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x1cc))[a0_0x450eb4(0x234)](a0_0x450eb4(0x239),a0_0x450eb4(0x2ac))[a0_0x450eb4(0x234)](a0_0x450eb4(0x280),a0_0x450eb4(0x258))[a0_0x450eb4(0x272)](async(_0x5c3ebe,_0x260f90)=>{const _0x4eda16=a0_0x450eb4,_0x3fc5c6=new TablesCommand(),_0x4532f0=program[_0x4eda16(0x233)](),_0x3a8bf5=createTDXInstance(_0x4532f0);_0x260f90['in']&&(_0x260f90[_0x4eda16(0x227)]=_0x260f90['in']);const _0x1d4e0f=await _0x3fc5c6[_0x4eda16(0x1ec)]({'options':{..._0x4532f0,..._0x260f90},'args':_0x5c3ebe?[_0x5c3ebe]:[],'tdx':_0x3a8bf5});process[_0x4eda16(0x29d)](_0x1d4e0f);}),program[a0_0x450eb4(0x228)](a0_0x450eb4(0x288))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x1dd))[a0_0x450eb4(0x234)](a0_0x450eb4(0x239),a0_0x450eb4(0x268))[a0_0x450eb4(0x234)](a0_0x450eb4(0x280),a0_0x450eb4(0x258))['action'](async(_0x13cc3e,_0x24cc82)=>{const _0x1dc68f=a0_0x450eb4,_0xd80d76=new ShowCommand(),_0x3179bc=program[_0x1dc68f(0x233)](),_0x3db405=createTDXInstance(_0x3179bc);_0x24cc82['in']&&(_0x24cc82[_0x1dc68f(0x227)]=_0x24cc82['in']);const _0x58a1bd=await _0xd80d76[_0x1dc68f(0x1ec)]({'options':{..._0x3179bc,..._0x24cc82},'args':_0x13cc3e?[_0x13cc3e]:[],'tdx':_0x3db405});process['exit'](_0x58a1bd);}),program['command']('describe\x20[table]')[a0_0x450eb4(0x292)]('desc')['description']('Describe\x20table\x20schema')[a0_0x450eb4(0x234)](a0_0x450eb4(0x239),a0_0x450eb4(0x268))[a0_0x450eb4(0x234)]('--in\x20<database>','Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x450eb4(0x272)](async(_0x2ae77d,_0x4e6be8)=>{const _0x429db2=a0_0x450eb4,_0x24392a=new DescribeCommand(),_0x338df1=program[_0x429db2(0x233)](),_0x3d1605=createTDXInstance(_0x338df1);_0x4e6be8['in']&&(_0x4e6be8[_0x429db2(0x227)]=_0x4e6be8['in']);const _0x1ecb2a=await _0x24392a[_0x429db2(0x1ec)]({'options':{..._0x338df1,..._0x4e6be8},'args':_0x2ae77d?[_0x2ae77d]:[],'tdx':_0x3d1605});process[_0x429db2(0x29d)](_0x1ecb2a);}),program[a0_0x450eb4(0x228)]('query\x20[sql]')['description'](a0_0x450eb4(0x290))[a0_0x450eb4(0x234)](a0_0x450eb4(0x239),'Database\x20to\x20query\x20(default:\x20information_schema)')[a0_0x450eb4(0x234)](a0_0x450eb4(0x280),'Alias\x20for\x20--database\x20(natural\x20language\x20style)')[a0_0x450eb4(0x234)]('--catalog\x20<catalog>',a0_0x450eb4(0x2e8))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1f2),a0_0x450eb4(0x22c))['option'](a0_0x450eb4(0x2a9),a0_0x450eb4(0x2c8),'40')[a0_0x450eb4(0x272)](async(_0xd656c5,_0x95fcaf)=>{const _0x25c340=a0_0x450eb4,_0x4d41b9=new QueryCommand(),_0x54e761=program[_0x25c340(0x233)](),_0x56268a=createTDXInstance(_0x54e761);_0x95fcaf['in']&&(_0x95fcaf[_0x25c340(0x227)]=_0x95fcaf['in']);const _0x2b7188=await _0x4d41b9[_0x25c340(0x1ec)]({'options':{..._0x54e761,..._0x95fcaf},'args':_0xd656c5?[_0xd656c5]:[],'tdx':_0x56268a});process[_0x25c340(0x29d)](_0x2b7188);}),program[a0_0x450eb4(0x228)]('segments\x20[parent_name]')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x248))['action'](async(_0x4d27ee,_0x3ebae3)=>{const _0x3228f5=a0_0x450eb4,_0x3b5dce=new SegmentsCommand(),_0x28e42b=program['opts'](),_0x13f20a=createTDXInstance(_0x28e42b),_0x54b368=await _0x3b5dce[_0x3228f5(0x1ec)]({'options':{..._0x28e42b,..._0x3ebae3},'args':_0x4d27ee?[_0x4d27ee]:[],'tdx':_0x13f20a});process[_0x3228f5(0x29d)](_0x54b368);});const segmentCmd=program[a0_0x450eb4(0x228)]('segment')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x1c7));segmentCmd[a0_0x450eb4(0x228)]('describe\x20<segment_name>')[a0_0x450eb4(0x292)](a0_0x450eb4(0x1f6))['description'](a0_0x450eb4(0x26d))[a0_0x450eb4(0x272)](async(_0x5d1f73,_0x2076de)=>{const _0x54f3cc=a0_0x450eb4,_0x156bde=new SegmentDescribeCommand(),_0x384939=program[_0x54f3cc(0x233)](),_0x2b24db=createTDXInstance(_0x384939),_0x30c133=await _0x156bde[_0x54f3cc(0x1ec)]({'options':{..._0x384939,..._0x2076de},'args':[_0x5d1f73],'tdx':_0x2b24db});process[_0x54f3cc(0x29d)](_0x30c133);}),segmentCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x29b))['description'](a0_0x450eb4(0x1c9))['action'](async(_0x1531e5,_0x3f57ac)=>{const _0x2ee3fb=a0_0x450eb4,_0xfb8007=new SegmentShowCommand(),_0x1c7eb8=program['opts'](),_0xfe6632=createTDXInstance(_0x1c7eb8),_0x270fcb=await _0xfb8007[_0x2ee3fb(0x1ec)]({'options':{..._0x1c7eb8,..._0x3f57ac},'args':[_0x1531e5],'tdx':_0xfe6632});process[_0x2ee3fb(0x29d)](_0x270fcb);}),segmentCmd[a0_0x450eb4(0x228)]('folders\x20<parent_name>')[a0_0x450eb4(0x2d8)]('List\x20segment\x20folders\x20under\x20a\x20parent\x20segment')[a0_0x450eb4(0x272)](async(_0x7ab8c0,_0x5eb322)=>{const _0xfb9ee3=a0_0x450eb4,_0x49359a=new SegmentFolderListCommand(),_0xceec97=program[_0xfb9ee3(0x233)](),_0x375418=createTDXInstance(_0xceec97),_0x48e9a7=await _0x49359a[_0xfb9ee3(0x1ec)]({'options':{..._0xceec97,..._0x5eb322},'args':[_0x7ab8c0],'tdx':_0x375418});process['exit'](_0x48e9a7);});const folderCmd=segmentCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x26f))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x243));folderCmd['command'](a0_0x450eb4(0x20a))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x1cf))[a0_0x450eb4(0x272)](async(_0xfcef90,_0x43d3de)=>{const _0x41c173=a0_0x450eb4,_0x46b3c1=new SegmentFolderShowCommand(),_0x19ab42=program[_0x41c173(0x233)](),_0x2bb7a4=createTDXInstance(_0x19ab42),_0x3738e8=await _0x46b3c1[_0x41c173(0x1ec)]({'options':{..._0x19ab42,..._0x43d3de},'args':[_0xfcef90],'tdx':_0x2bb7a4});process[_0x41c173(0x29d)](_0x3738e8);}),segmentCmd['command'](a0_0x450eb4(0x1e9))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x20f))['action'](async(_0x1c9d90,_0x53362a)=>{const _0x418ccf=a0_0x450eb4,_0x959055=new SegmentSQLCommand(),_0x2ce8d5=program[_0x418ccf(0x233)](),_0x51aba1=createTDXInstance(_0x2ce8d5),_0x4a0ef4=await _0x959055[_0x418ccf(0x1ec)]({'options':{..._0x2ce8d5,..._0x53362a},'args':[_0x1c9d90],'tdx':_0x51aba1});process['exit'](_0x4a0ef4);}),segmentCmd['command'](a0_0x450eb4(0x277))['description'](a0_0x450eb4(0x28a))[a0_0x450eb4(0x272)](async(_0x1b7ccf,_0x4a8c29)=>{const _0x240145=a0_0x450eb4,_0x51290b=new SegmentFieldsCommand(),_0x8066e3=program[_0x240145(0x233)](),_0x422acf=createTDXInstance(_0x8066e3),_0x1e8ace=await _0x51290b[_0x240145(0x1ec)]({'options':{..._0x8066e3,..._0x4a8c29},'args':[_0x1b7ccf],'tdx':_0x422acf});process[_0x240145(0x29d)](_0x1e8ace);}),segmentCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1eb))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2d1))[a0_0x450eb4(0x234)](a0_0x450eb4(0x289),a0_0x450eb4(0x2df))[a0_0x450eb4(0x234)](a0_0x450eb4(0x215),a0_0x450eb4(0x1ff))[a0_0x450eb4(0x234)]('--rule-file\x20<file>',a0_0x450eb4(0x241))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1f9),a0_0x450eb4(0x2e4))[a0_0x450eb4(0x234)](a0_0x450eb4(0x211),a0_0x450eb4(0x220))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1e8),a0_0x450eb4(0x1cb))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2f6),a0_0x450eb4(0x2a1))[a0_0x450eb4(0x272)](async(_0xb22d25,_0x448cbc)=>{const _0x1c56fd=a0_0x450eb4,_0x411646=new SegmentCreateCommand(),_0x49e7e4=program['opts'](),_0x27a755=createTDXInstance(_0x49e7e4),_0x291cba=await _0x411646['run']({'options':{..._0x49e7e4,..._0x448cbc},'args':[_0xb22d25],'tdx':_0x27a755});process[_0x1c56fd(0x29d)](_0x291cba);}),segmentCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x299))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2eb))['option'](a0_0x450eb4(0x2e6),'New\x20segment\x20name')[a0_0x450eb4(0x234)](a0_0x450eb4(0x289),a0_0x450eb4(0x1cd))[a0_0x450eb4(0x234)](a0_0x450eb4(0x215),a0_0x450eb4(0x22a))['option']('--rule-file\x20<file>',a0_0x450eb4(0x1e4))['option'](a0_0x450eb4(0x1f9),a0_0x450eb4(0x29e))[a0_0x450eb4(0x234)]('--kind\x20<type>',a0_0x450eb4(0x220))['action'](async(_0xe38cab,_0x10ee18)=>{const _0x4a8e86=a0_0x450eb4,_0x41dc1f=new SegmentUpdateCommand(),_0x7dd219=program[_0x4a8e86(0x233)](),_0x8f8470=createTDXInstance(_0x7dd219),_0x379e00=await _0x41dc1f['run']({'options':{..._0x7dd219,..._0x10ee18},'args':[_0xe38cab],'tdx':_0x8f8470});process[_0x4a8e86(0x29d)](_0x379e00);});const parentCmd=segmentCmd['command'](a0_0x450eb4(0x25f))['description'](a0_0x450eb4(0x29a));function a0_0x281d(_0x194c33,_0x261584){const _0x570d14=a0_0x570d();return a0_0x281d=function(_0x281de9,_0x4e6726){_0x281de9=_0x281de9-0x1c1;let _0x42592a=_0x570d14[_0x281de9];return _0x42592a;},a0_0x281d(_0x194c33,_0x261584);}parentCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1d0))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x207))['requiredOption'](a0_0x450eb4(0x1e2),a0_0x450eb4(0x2e7))[a0_0x450eb4(0x2ad)](a0_0x450eb4(0x2ed),a0_0x450eb4(0x28c))[a0_0x450eb4(0x234)](a0_0x450eb4(0x289),a0_0x450eb4(0x28b))[a0_0x450eb4(0x234)]('--schedule-type\x20<type>',a0_0x450eb4(0x2ea))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1da),a0_0x450eb4(0x225))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2e9),a0_0x450eb4(0x2cf))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1fb),a0_0x450eb4(0x20c))[a0_0x450eb4(0x234)]('--attributes-file\x20<file>',a0_0x450eb4(0x2aa))['option'](a0_0x450eb4(0x1c8),'Behaviors\x20as\x20JSON\x20string')[a0_0x450eb4(0x234)]('--behaviors-file\x20<file>',a0_0x450eb4(0x2af))['option'](a0_0x450eb4(0x250),a0_0x450eb4(0x2f1))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2d7),a0_0x450eb4(0x2b7))[a0_0x450eb4(0x272)](async(_0x1f37d5,_0x12512b)=>{const _0x3ed4ff=a0_0x450eb4,_0x3d8963=new ParentSegmentCreateCommand(),_0x91e3b0=program['opts'](),_0x461204=createTDXInstance(_0x91e3b0),_0x533e37=await _0x3d8963[_0x3ed4ff(0x1ec)]({'options':{..._0x91e3b0,..._0x12512b},'args':[_0x1f37d5],'tdx':_0x461204});process['exit'](_0x533e37);}),parentCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x28e))[a0_0x450eb4(0x2d8)]('Update\x20parent\x20segment\x20(audience)')[a0_0x450eb4(0x234)](a0_0x450eb4(0x289),'Updated\x20description')[a0_0x450eb4(0x234)](a0_0x450eb4(0x298),a0_0x450eb4(0x28d))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1da),a0_0x450eb4(0x2b4))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2e9),a0_0x450eb4(0x281))['option']('--add-attributes\x20<json>','Add\x20attributes\x20as\x20JSON\x20string')[a0_0x450eb4(0x234)](a0_0x450eb4(0x267),a0_0x450eb4(0x2c0))[a0_0x450eb4(0x234)]('--add-behaviors\x20<json>','Add\x20behaviors\x20as\x20JSON\x20string')[a0_0x450eb4(0x234)]('--add-behaviors-file\x20<file>',a0_0x450eb4(0x2a7))['action'](async(_0x2164ab,_0x5379d4)=>{const _0x433ba0=a0_0x450eb4,_0x5aec34=new ParentSegmentUpdateCommand(),_0x5b3ee3=program[_0x433ba0(0x233)](),_0x2e9b63=createTDXInstance(_0x5b3ee3),_0x317f6a=await _0x5aec34[_0x433ba0(0x1ec)]({'options':{..._0x5b3ee3,..._0x5379d4},'args':[_0x2164ab],'tdx':_0x2e9b63});process[_0x433ba0(0x29d)](_0x317f6a);}),folderCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1de))['description'](a0_0x450eb4(0x29f))[a0_0x450eb4(0x234)](a0_0x450eb4(0x289),a0_0x450eb4(0x1d9))['option'](a0_0x450eb4(0x1fc),a0_0x450eb4(0x1d1))[a0_0x450eb4(0x272)](async(_0x5da3c5,_0xd501b6,_0xd92b7c)=>{const _0x4f16e0=a0_0x450eb4,_0x431970=new SegmentFolderCreateCommand(),_0x9d8465=program[_0x4f16e0(0x233)](),_0x1f8f0d=createTDXInstance(_0x9d8465),_0x8b632b=await _0x431970[_0x4f16e0(0x1ec)]({'options':{..._0x9d8465,..._0xd92b7c},'args':[_0x5da3c5,_0xd501b6],'tdx':_0x1f8f0d});process['exit'](_0x8b632b);}),program[a0_0x450eb4(0x228)](a0_0x450eb4(0x1ca))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2b5))[a0_0x450eb4(0x272)](async(_0x1925d9,_0x5a8871)=>{const _0x33be75=a0_0x450eb4,_0x487219=new ActivationsCommand(),_0x302558=program[_0x33be75(0x233)](),_0x3faab5=createTDXInstance(_0x302558),_0x1b6670=await _0x487219[_0x33be75(0x1ec)]({'options':{..._0x302558,..._0x5a8871},'args':[_0x1925d9],'tdx':_0x3faab5});process[_0x33be75(0x29d)](_0x1b6670);});const workflowCmd=program[a0_0x450eb4(0x228)](a0_0x450eb4(0x206))['alias']('wf')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x247));workflowCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1f5))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x295))[a0_0x450eb4(0x272)](async(_0x221851,_0x39bec3)=>{const _0x2a5b7c=a0_0x450eb4,_0x5812f6=new WorkflowProjectsCommand(),_0x333874=program[_0x2a5b7c(0x233)](),_0x5d93bf=createTDXInstance(_0x333874),_0x1e8543=await _0x5812f6[_0x2a5b7c(0x1ec)]({'options':{..._0x333874,..._0x39bec3},'args':_0x221851?[_0x221851]:[],'tdx':_0x5d93bf});process['exit'](_0x1e8543);}),workflowCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x230))[a0_0x450eb4(0x292)]('ls')['description']('List\x20workflows\x20(optionally\x20filtered\x20by\x20project)')[a0_0x450eb4(0x272)](async(_0x35c0ca,_0x235a45)=>{const _0x4943bd=a0_0x450eb4,_0x431206=new WorkflowWorkflowsCommand(),_0x450c1b=program[_0x4943bd(0x233)](),_0x4d09f5=createTDXInstance(_0x450c1b),_0x25786e=await _0x431206['run']({'options':{..._0x450c1b,..._0x235a45},'args':_0x35c0ca?[_0x35c0ca]:[],'tdx':_0x4d09f5});process['exit'](_0x25786e);}),workflowCmd['command'](a0_0x450eb4(0x23d))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x279))[a0_0x450eb4(0x234)]('--status\x20<status>',a0_0x450eb4(0x236))['option'](a0_0x450eb4(0x2c7),a0_0x450eb4(0x21a))['option'](a0_0x450eb4(0x22f),a0_0x450eb4(0x249))[a0_0x450eb4(0x272)](async(_0x349249,_0x1fffa0)=>{const _0x5ee99a=a0_0x450eb4,_0x2fdbb2=new WorkflowSessionsCommand(),_0x10162a=program[_0x5ee99a(0x233)](),_0x286887=createTDXInstance(_0x10162a),_0x164ba0=await _0x2fdbb2['run']({'options':{..._0x10162a,..._0x1fffa0},'args':_0x349249?[_0x349249]:[],'tdx':_0x286887});process[_0x5ee99a(0x29d)](_0x164ba0);}),workflowCmd[a0_0x450eb4(0x228)]('attempts\x20[project]')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x294))[a0_0x450eb4(0x234)]('--include-retried','Include\x20retried\x20attempts')[a0_0x450eb4(0x272)](async(_0x37bb8c,_0x4ba02b)=>{const _0x146d0d=a0_0x450eb4,_0xa1c03f=new WorkflowAttemptsCommand(),_0x4536ef=program[_0x146d0d(0x233)](),_0x38da49=createTDXInstance(_0x4536ef),_0x24f0a0=await _0xa1c03f[_0x146d0d(0x1ec)]({'options':{..._0x4536ef,..._0x4ba02b},'args':_0x37bb8c?[_0x37bb8c]:[],'tdx':_0x38da49});process[_0x146d0d(0x29d)](_0x24f0a0);}),workflowCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x2c4))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x269))[a0_0x450eb4(0x272)](async(_0x39ec86,_0x192c7e)=>{const _0x35a943=a0_0x450eb4,_0x42e825=new WorkflowAttemptCommand(),_0x1a2af3=program[_0x35a943(0x233)](),_0x448658=createTDXInstance(_0x1a2af3),_0x48c2e4=await _0x42e825['run']({'options':{..._0x1a2af3,..._0x192c7e},'args':[_0x39ec86],'tdx':_0x448658});process['exit'](_0x48c2e4);}),workflowCmd['command'](a0_0x450eb4(0x1c6))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x246))[a0_0x450eb4(0x234)]('--include-subtasks',a0_0x450eb4(0x1fe))['action'](async(_0xc3be72,_0x2d552f)=>{const _0x48836c=a0_0x450eb4,_0x2f9499=new WorkflowTasksCommand(),_0x576915=program[_0x48836c(0x233)](),_0x41fa42=createTDXInstance(_0x576915),_0x4f1dc3=await _0x2f9499[_0x48836c(0x1ec)]({'options':{..._0x576915,..._0x2d552f},'args':[_0xc3be72],'tdx':_0x41fa42});process[_0x48836c(0x29d)](_0x4f1dc3);}),workflowCmd[a0_0x450eb4(0x228)]('logs\x20<attempt-id>\x20<task-name>')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2e0))['option']('--offset\x20<number>','Starting\x20offset\x20for\x20logs\x20(default:\x200)',_0x3aec6e=>parseInt(_0x3aec6e,0xa),0x0)['action'](async(_0x1d286c,_0x110c55,_0x330592)=>{const _0x4b43c5=a0_0x450eb4,_0x6960ac=new WorkflowLogsCommand(),_0x5ef795=program[_0x4b43c5(0x233)](),_0x46b8d1=createTDXInstance(_0x5ef795),_0x16a7f6=await _0x6960ac[_0x4b43c5(0x1ec)]({'options':{..._0x5ef795,..._0x330592},'args':[_0x1d286c,_0x110c55],'tdx':_0x46b8d1});process[_0x4b43c5(0x29d)](_0x16a7f6);}),workflowCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x297))['description'](a0_0x450eb4(0x20d))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2ce),a0_0x450eb4(0x2f3))['action'](async(_0xf93f01,_0x4fc4c8)=>{const _0x51ff0b=a0_0x450eb4,_0x50f2a4=new WorkflowKillCommand(),_0x2130b2=program['opts'](),_0x4afc19=createTDXInstance(_0x2130b2),_0x4db83=await _0x50f2a4[_0x51ff0b(0x1ec)]({'options':{..._0x2130b2,..._0x4fc4c8},'args':[_0xf93f01],'tdx':_0x4afc19});process[_0x51ff0b(0x29d)](_0x4db83);}),workflowCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x2c3))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x213))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2bb),a0_0x450eb4(0x24c))['option'](a0_0x450eb4(0x293),'Resume\x20from\x20specific\x20task\x20(attempt\x20retry\x20only)')[a0_0x450eb4(0x234)]('--params\x20<json>',a0_0x450eb4(0x2ec))[a0_0x450eb4(0x234)](a0_0x450eb4(0x261),a0_0x450eb4(0x242))['action'](async(_0x2722ef,_0x40fe18)=>{const _0x34dd30=a0_0x450eb4,_0x50fe1f=new WorkflowRetryCommand(),_0x3d0866=program[_0x34dd30(0x233)](),_0x1f1639=createTDXInstance(_0x3d0866),_0x49e8d0=await _0x50fe1f['run']({'options':{..._0x3d0866,..._0x40fe18},'args':[_0x2722ef],'tdx':_0x1f1639});process['exit'](_0x49e8d0);}),workflowCmd[a0_0x450eb4(0x228)]('download\x20<project-name>\x20[output-dir]')['description'](a0_0x450eb4(0x217))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2a2),'Specific\x20revision\x20to\x20download\x20(default:\x20latest)')['action'](async(_0xdf197d,_0x50a6c8,_0x1f4610)=>{const _0x59e115=a0_0x450eb4,_0x42889f=new WorkflowDownloadCommand(),_0x12bedb=program[_0x59e115(0x233)](),_0x42c0f3=createTDXInstance(_0x12bedb),_0xbab44f=await _0x42889f[_0x59e115(0x1ec)]({'options':{..._0x12bedb,..._0x1f4610},'args':[_0xdf197d,_0x50a6c8||'.'],'tdx':_0x42c0f3});process['exit'](_0xbab44f);}),workflowCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x27b))[a0_0x450eb4(0x2d8)]('Push\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style:\x20cd\x20into\x20project,\x20then\x20push\x20<name>)')['option'](a0_0x450eb4(0x2a3),a0_0x450eb4(0x2dc))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2a2),a0_0x450eb4(0x22b))['option'](a0_0x450eb4(0x201),a0_0x450eb4(0x20e))['action'](async(_0x381f55,_0x2bb22a)=>{const _0x17dfcd=a0_0x450eb4,_0x5d8649=new WorkflowPushCommand(),_0xefb802=program[_0x17dfcd(0x233)](),_0x5b7a32=createTDXInstance(_0xefb802),_0x222fd2=await _0x5d8649[_0x17dfcd(0x1ec)]({'options':{..._0xefb802,..._0x2bb22a},'args':_0x381f55?[_0x381f55]:[],'tdx':_0x5b7a32});process['exit'](_0x222fd2);}),workflowCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1df))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x235))[a0_0x450eb4(0x272)](async(_0x2760d0,_0x105d3c)=>{const _0x14bba3=a0_0x450eb4,_0xe96926=new WorkflowDeleteCommand(),_0x213939=program[_0x14bba3(0x233)](),_0x4c6f3a=createTDXInstance(_0x213939),_0x5a3732=await _0xe96926[_0x14bba3(0x1ec)]({'options':{..._0x213939,..._0x105d3c},'args':[_0x2760d0],'tdx':_0x4c6f3a});process[_0x14bba3(0x29d)](_0x5a3732);}),program[a0_0x450eb4(0x228)](a0_0x450eb4(0x218))[a0_0x450eb4(0x2d8)]('List\x20jobs')[a0_0x450eb4(0x234)](a0_0x450eb4(0x1e0),a0_0x450eb4(0x2b0))['action'](async _0x1209d1=>{const _0x1c6336=a0_0x450eb4,_0x2947c3=new JobListCommand(),_0x374741=program[_0x1c6336(0x233)](),_0x5749da=createTDXInstance(_0x374741),_0xe4ed77=await _0x2947c3[_0x1c6336(0x1ec)]({'options':{..._0x374741,..._0x1209d1},'args':[],'tdx':_0x5749da});process[_0x1c6336(0x29d)](_0xe4ed77);});const jobCmd=program[a0_0x450eb4(0x228)](a0_0x450eb4(0x25b))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x212));jobCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x2b2))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2ee))[a0_0x450eb4(0x272)](async(_0x72b12a,_0xa141a0)=>{const _0x50145b=a0_0x450eb4,_0xf7d2be=new JobShowCommand(),_0x25055a=program[_0x50145b(0x233)](),_0x58138f=createTDXInstance(_0x25055a),_0x2f67db=await _0xf7d2be['run']({'options':{..._0x25055a,..._0xa141a0},'args':[_0x72b12a],'tdx':_0x58138f});process['exit'](_0x2f67db);}),jobCmd['command']('kill\x20<job-id>')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x24b))['action'](async(_0x1c7936,_0x50f63e)=>{const _0x5ddb6e=a0_0x450eb4,_0x4cf3c7=new JobKillCommand(),_0x5ceeb2=program['opts'](),_0x19e8ed=createTDXInstance(_0x5ceeb2),_0x3d78b1=await _0x4cf3c7[_0x5ddb6e(0x1ec)]({'options':{..._0x5ceeb2,..._0x50f63e},'args':[_0x1c7936],'tdx':_0x19e8ed});process[_0x5ddb6e(0x29d)](_0x3d78b1);}),jobCmd[a0_0x450eb4(0x228)]('submit\x20[query]')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2e5))[a0_0x450eb4(0x234)](a0_0x450eb4(0x221),a0_0x450eb4(0x2f4),a0_0x450eb4(0x1e7))['option']('-f,\x20--file\x20<path>','Read\x20query\x20from\x20file')[a0_0x450eb4(0x234)](a0_0x450eb4(0x266),'Database\x20name\x20(default:\x20information_schema)','information_schema')['action'](async(_0x3e6d0e,_0xe9020c)=>{const _0x357427=a0_0x450eb4,_0x3985b9=new JobSubmitCommand(),_0x2f34b9=program[_0x357427(0x233)](),_0x170a21=createTDXInstance(_0x2f34b9),_0x264801=await _0x3985b9[_0x357427(0x1ec)]({'options':{..._0x2f34b9,..._0xe9020c},'args':_0x3e6d0e?[_0x3e6d0e]:[],'tdx':_0x170a21});process[_0x357427(0x29d)](_0x264801);}),jobCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x240))['description'](a0_0x450eb4(0x203))['action'](async(_0x3ba5ac,_0x34cd85)=>{const _0x5ac809=a0_0x450eb4,_0x212b0b=new JobResultCommand(),_0x35685c=program[_0x5ac809(0x233)](),_0x5948a3=createTDXInstance(_0x35685c),_0x1024a4=await _0x212b0b[_0x5ac809(0x1ec)]({'options':{..._0x35685c,..._0x34cd85},'args':[_0x3ba5ac],'tdx':_0x5948a3});process[_0x5ac809(0x29d)](_0x1024a4);});const llmCmd=program['command'](a0_0x450eb4(0x2d9))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x24a));llmCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x2b8))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2f2))[a0_0x450eb4(0x272)](async(_0x411c40,_0x3686ab)=>{const _0x58ad3e=a0_0x450eb4,_0x29086d=new LLMUseCommand(),_0x7d0194=program[_0x58ad3e(0x233)](),_0x35fb21=createTDXInstance(_0x7d0194),_0x43a8d4=await _0x29086d[_0x58ad3e(0x1ec)]({'options':{..._0x7d0194,..._0x3686ab},'args':[_0x411c40],'tdx':_0x35fb21});process['exit'](_0x43a8d4);}),llmCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x282))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x1ea))[a0_0x450eb4(0x272)](async _0x2810b6=>{const _0x4c0b00=a0_0x450eb4,_0x5807dc=new LLMModelsCommand(),_0x144419=program[_0x4c0b00(0x233)](),_0x3c68ca=createTDXInstance(_0x144419),_0x599415=await _0x5807dc[_0x4c0b00(0x1ec)]({'options':{..._0x144419,..._0x2810b6},'args':[],'tdx':_0x3c68ca});process[_0x4c0b00(0x29d)](_0x599415);}),llmCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1f5))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x252))[a0_0x450eb4(0x272)](async(_0x23516a,_0x160493)=>{const _0x4c77c4=a0_0x450eb4,_0x838ace=new LLMProjectsCommand(),_0x5e566a=program[_0x4c77c4(0x233)](),_0x815a82=createTDXInstance(_0x5e566a),_0x4b468c=await _0x838ace[_0x4c77c4(0x1ec)]({'options':{..._0x5e566a,..._0x160493},'args':_0x23516a?[_0x23516a]:[],'tdx':_0x815a82});process[_0x4c77c4(0x29d)](_0x4b468c);});const projectCmd=llmCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1e3))['description']('LLM\x20project\x20management');projectCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1d0))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2b1))['option'](a0_0x450eb4(0x289),a0_0x450eb4(0x202))[a0_0x450eb4(0x272)](async(_0x1fc37f,_0x204f95)=>{const _0x5774a0=a0_0x450eb4,_0x396cff=new LLMProjectCreateCommand(),_0x4f46bf=program['opts'](),_0x3825fe=createTDXInstance(_0x4f46bf),_0x1fe4b1=await _0x396cff['run']({'options':{..._0x4f46bf,..._0x204f95},'args':[_0x1fc37f],'tdx':_0x3825fe});process[_0x5774a0(0x29d)](_0x1fe4b1);}),projectCmd['command'](a0_0x450eb4(0x286))[a0_0x450eb4(0x2d8)]('Delete\x20an\x20LLM\x20project')[a0_0x450eb4(0x272)](async(_0x310fea,_0x121dd7)=>{const _0x58df7b=a0_0x450eb4,_0x10ceb7=new LLMProjectDeleteCommand(),_0x4ee6d4=program[_0x58df7b(0x233)](),_0x316643=createTDXInstance(_0x4ee6d4),_0x461c0c=await _0x10ceb7[_0x58df7b(0x1ec)]({'options':{..._0x4ee6d4,..._0x121dd7},'args':[_0x310fea],'tdx':_0x316643});process[_0x58df7b(0x29d)](_0x461c0c);}),llmCmd[a0_0x450eb4(0x228)]('agents\x20[pattern]')[a0_0x450eb4(0x2d8)]('List\x20agents\x20in\x20current\x20project\x20(optionally\x20filtered\x20by\x20pattern)')[a0_0x450eb4(0x272)](async(_0x5994a8,_0x1d95f5)=>{const _0x1162d5=a0_0x450eb4,_0x54ed49=new LLMAgentsCommand(),_0x29a567=program['opts'](),_0x1f1df1=createTDXInstance(_0x29a567),_0x3744fb=await _0x54ed49[_0x1162d5(0x1ec)]({'options':{..._0x29a567,..._0x1d95f5},'args':_0x5994a8?[_0x5994a8]:[],'tdx':_0x1f1df1});process[_0x1162d5(0x29d)](_0x3744fb);});const agentCmd=llmCmd[a0_0x450eb4(0x228)]('agent')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x21f));agentCmd[a0_0x450eb4(0x228)]('show\x20<agent-name>')[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x245))[a0_0x450eb4(0x272)](async(_0x20d1f7,_0x1c8706)=>{const _0x4af5bf=a0_0x450eb4,_0x2bb544=new LLMAgentShowCommand(),_0x1219c5=program[_0x4af5bf(0x233)](),_0x305729=createTDXInstance(_0x1219c5),_0x16bcf8=await _0x2bb544[_0x4af5bf(0x1ec)]({'options':{..._0x1219c5,..._0x1c8706},'args':[_0x20d1f7],'tdx':_0x305729});process[_0x4af5bf(0x29d)](_0x16bcf8);}),agentCmd['command']('create\x20<name>')[a0_0x450eb4(0x2d8)]('Create\x20a\x20new\x20agent\x20in\x20current\x20project')[a0_0x450eb4(0x234)]('--system-prompt\x20<text>',a0_0x450eb4(0x284))[a0_0x450eb4(0x234)](a0_0x450eb4(0x238),a0_0x450eb4(0x1c5),a0_0x450eb4(0x25a))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1db),a0_0x450eb4(0x2de))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2d0),a0_0x450eb4(0x1e1),'4')[a0_0x450eb4(0x234)]('--temperature\x20<n>','Temperature\x20(0.0-2.0,\x20default:\x200.7)',a0_0x450eb4(0x21c))['action'](async(_0x50852d,_0x913293)=>{const _0x158a7=a0_0x450eb4,_0x2761d7=new LLMAgentCreateCommand(),_0x132319=program[_0x158a7(0x233)](),_0x2d9ffc=createTDXInstance(_0x132319),_0x4ca050=await _0x2761d7[_0x158a7(0x1ec)]({'options':{..._0x132319,..._0x913293},'args':[_0x50852d],'tdx':_0x2d9ffc});process[_0x158a7(0x29d)](_0x4ca050);}),agentCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x1f7))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x2d3))[a0_0x450eb4(0x234)](a0_0x450eb4(0x2d5),'Agent\x20name')['option']('--prompt\x20<text>',a0_0x450eb4(0x2f0))[a0_0x450eb4(0x234)](a0_0x450eb4(0x289),a0_0x450eb4(0x2e3))['option'](a0_0x450eb4(0x1db),a0_0x450eb4(0x2de))[a0_0x450eb4(0x272)](async(_0x1cd781,_0x1efe50)=>{const _0x30b7e4=a0_0x450eb4,_0x1766c0=new LLMAgentUpdateCommand(),_0x46fc0d=program[_0x30b7e4(0x233)](),_0x1249a6=createTDXInstance(_0x46fc0d),_0x2319ef=await _0x1766c0['run']({'options':{..._0x46fc0d,..._0x1efe50},'args':[_0x1cd781],'tdx':_0x1249a6});process[_0x30b7e4(0x29d)](_0x2319ef);}),agentCmd[a0_0x450eb4(0x228)]('delete\x20<agent-name>')[a0_0x450eb4(0x2d8)]('Delete\x20an\x20agent')[a0_0x450eb4(0x272)](async(_0x1bace6,_0x3d93e0)=>{const _0x178d5b=a0_0x450eb4,_0xc39775=new LLMAgentDeleteCommand(),_0x59812a=program[_0x178d5b(0x233)](),_0x9e1bec=createTDXInstance(_0x59812a),_0x3cf4eb=await _0xc39775[_0x178d5b(0x1ec)]({'options':{..._0x59812a,..._0x3d93e0},'args':[_0x1bace6],'tdx':_0x9e1bec});process[_0x178d5b(0x29d)](_0x3cf4eb);}),llmCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x2e2))['description'](a0_0x450eb4(0x224))[a0_0x450eb4(0x272)](async(_0x55c2b9,_0x41b625)=>{const _0xf1e18c=a0_0x450eb4,_0x384d21=new LLMHistoryCommand(),_0x25393d=program['opts'](),_0x3e5633=createTDXInstance(_0x25393d),_0x17dbc8=await _0x384d21[_0xf1e18c(0x1ec)]({'options':{..._0x25393d,..._0x41b625},'args':_0x55c2b9?[_0x55c2b9]:[],'tdx':_0x3e5633});process['exit'](_0x17dbc8);}),llmCmd[a0_0x450eb4(0x228)](a0_0x450eb4(0x2cc))[a0_0x450eb4(0x2d8)]('[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration')[a0_0x450eb4(0x234)](a0_0x450eb4(0x1f8),a0_0x450eb4(0x1c1),a0_0x450eb4(0x204))['option'](a0_0x450eb4(0x278),'LLM\x20project\x20name\x20(uses\x20context\x20or\x20default\x20if\x20not\x20specified)')[a0_0x450eb4(0x234)](a0_0x450eb4(0x210),a0_0x450eb4(0x2c2))[a0_0x450eb4(0x234)](a0_0x450eb4(0x1d7),a0_0x450eb4(0x1e6))[a0_0x450eb4(0x272)](async _0x1bb7af=>{const _0x1a4a29=a0_0x450eb4,_0x3bf98b=new LLMProxyCommand(),_0xa35d68=program['opts'](),_0x18fac6=createTDXInstance(_0xa35d68),_0x1f71d8={..._0x1bb7af,'port':_0x1bb7af[_0x1a4a29(0x226)]?parseInt(_0x1bb7af['port'],0xa):undefined},_0x703e1f=await _0x3bf98b[_0x1a4a29(0x1ec)]({'options':{..._0xa35d68,..._0x1f71d8},'args':[],'tdx':_0x18fac6});process[_0x1a4a29(0x29d)](_0x703e1f);}),program[a0_0x450eb4(0x228)](a0_0x450eb4(0x205))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x219))['option'](a0_0x450eb4(0x238),a0_0x450eb4(0x2d4),a0_0x450eb4(0x2cd))[a0_0x450eb4(0x234)]('--debug',a0_0x450eb4(0x1ce))[a0_0x450eb4(0x272)](async _0x11765c=>{const _0xa85614=a0_0x450eb4,_0x17ee3b=new ClaudeCommand(),_0x312e8c=program[_0xa85614(0x233)](),_0x421b75=createTDXInstance(_0x312e8c),_0x1f6612=await _0x17ee3b[_0xa85614(0x1ec)]({'options':{..._0x312e8c,..._0x11765c},'args':[],'tdx':_0x421b75});process[_0xa85614(0x29d)](_0x1f6612);}),program[a0_0x450eb4(0x228)](a0_0x450eb4(0x274))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x223))[a0_0x450eb4(0x234)]('--debug',a0_0x450eb4(0x21b))[a0_0x450eb4(0x234)](a0_0x450eb4(0x222),'Clear\x20session\x20context')[a0_0x450eb4(0x272)](async _0x59b9ce=>{const _0x869574=a0_0x450eb4,_0xd67049=new ContextCommand(),_0xd5c0d4=program[_0x869574(0x233)](),_0x316032=await _0xd67049[_0x869574(0x1ec)]({'options':{..._0xd5c0d4,..._0x59b9ce},'args':[],'tdx':null});process[_0x869574(0x29d)](_0x316032);}),program['command'](a0_0x450eb4(0x216))['description'](a0_0x450eb4(0x27e))[a0_0x450eb4(0x272)](async(_0x2af735,_0x40a45e,_0xd32ccb)=>{const _0x11822d=a0_0x450eb4,_0x338359=new UseCommand(),_0x410426=program[_0x11822d(0x233)](),_0x507348=[];if(_0x2af735)_0x507348[_0x11822d(0x28f)](_0x2af735);if(_0x40a45e)_0x507348['push'](_0x40a45e);const _0x6e84eb=await _0x338359[_0x11822d(0x1ec)]({'options':{..._0x410426,..._0xd32ccb},'args':_0x507348,'tdx':null});process[_0x11822d(0x29d)](_0x6e84eb);}),program[a0_0x450eb4(0x228)](a0_0x450eb4(0x24d))[a0_0x450eb4(0x2d8)](a0_0x450eb4(0x262))[a0_0x450eb4(0x272)](async _0x4666eb=>{const _0x11f85=a0_0x450eb4,_0x52bb28=new ProfilesCommand(),_0xc53506=program[_0x11f85(0x233)](),_0x1f0177=await _0x52bb28['run']({'options':{..._0xc53506,..._0x4666eb},'args':[],'tdx':null});process[_0x11f85(0x29d)](_0x1f0177);}),program[a0_0x450eb4(0x229)](process[a0_0x450eb4(0x26c)]);!process[a0_0x450eb4(0x26c)][a0_0x450eb4(0x2da)](0x2)['length']&&program[a0_0x450eb4(0x285)]();
|