@treasuredata/tdx 2026.3.23 → 2026.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a52_0x378e60=a52_0x4922;(function(_0x28e151,_0x4012b2){const _0xf76dd4=a52_0x4922,_0x3dec48=_0x28e151();while(!![]){try{const _0x3ba342=parseInt(_0xf76dd4(0x2c8))/0x1+parseInt(_0xf76dd4(0x27e))/0x2*(parseInt(_0xf76dd4(0x1b7))/0x3)+-parseInt(_0xf76dd4(0x22c))/0x4*(parseInt(_0xf76dd4(0x12a))/0x5)+parseInt(_0xf76dd4(0x26e))/0x6+-parseInt(_0xf76dd4(0x248))/0x7*(parseInt(_0xf76dd4(0x1a0))/0x8)+-parseInt(_0xf76dd4(0x1bb))/0x9+parseInt(_0xf76dd4(0x217))/0xa;if(_0x3ba342===_0x4012b2)break;else _0x3dec48['push'](_0x3dec48['shift']());}catch(_0x109f74){_0x3dec48['push'](_0x3dec48['shift']());}}}(a52_0x2e64,0x1f638));import a52_0x4a9921 from'chalk';import{existsSync}from'fs';import a52_0x5594c9 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';function a52_0x2e64(){const _0x144f83=['No\x20sessions\x20with\x20timing\x20information','summary','✔\x20Project:\x20','Warning:','GUTTER','\x20deleted','done','renderSessionsTimeline','(use\x20--limit\x20to\x20see\x20more)','Session\x20time:\x20','\x0a✔\x20Already\x20up\x20to\x20date','yellow','msPerChar','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','name','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Validation:\x20skipped','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','some','createdAt','map','List\x20all\x20workflow\x20projects','split','Pull\x20workflow\x20project\x20to\x20local\x20folder','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','workflow:push','Select\x20a\x20workflow\x20to\x20run','New\x20project\x20name:\x20','\x20to\x20see\x20detailed\x20logs','sessionTime','ICON_SPACING','\x20attempt','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','projectName','now','Project\x20name\x20is\x20required','isDirectory','✔\x20Found\x20','attempt:','site','tdx\x20wf\x20attempt\x20','startedAt','✔\x20Retry\x20started','ICON_WIDTH','Project\x20name:\x20','Kill\x20a\x20running\x20attempt','finishedAt','includes','workflow:secrets:delete','MIN_TIMELINE_WIDTH','Loading\x20workflows...','workflow:clone','executePushProject','stdout','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Session\x20context\x20set\x20to:\x20','\x20task','Total:\x20','pullProject','fill','Writing\x20files...','find','applyPullProject','→\x20New\x20project:\x20','Cancelled','error','✔\x20Workflow\x20run\x20started','\x20(system)','LABEL_MIN_SPACING','sessions','workflow:upload','\x20new','projects','renderSingleTimeline','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','log','padStart','\x27...','240ctpBDm','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','tasks','parseProjectWorkflowPattern','Pushing\x20workflow\x20project...','Killing\x20attempt...','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x20\x20Project:\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20\x20New\x20attempt\x20ID:\x20','✔\x20Deleted\x20project\x20','Filter:\x20','retryAttempt','running','revision:\x20','💡\x20Tip:\x20Use\x20','showWorkflowConsoleUrl','Retrying\x20session...','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Include\x20retried:\x20yes','\x20has\x20no\x20attempts','retryAttemptName','12795RoQENV','workflowProject','Project:\x20','List\x20workflows','219339oDwXYU','cwd','\x20(use\x20--limit\x20to\x20show\x20more)','Error:\x20Secret\x20key\x20is\x20required','getMonth','\x20unchanged','indexOf','⚠\x20Showing\x20first\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','pollTimeline','download','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','new','Usage:\x20workflow:delete\x20<project-name-or-id>','\x0aUpdate\x20existing\x20project\x20\x22','\x0aPush\x20these\x20changes?','📁\x20','\x20\x20Target:\x20','workflowName','workflow:timeline','resumeFrom','deleteSecret','utf-8','resolveProjectId','repeat','workflow:retry','\x20\x20Console:\x20','workflow:secrets:list','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','project','sessionId','select','format','\x20\x20Revision:\x20','resolve','group_error','newProjectName','title','reason','\x20logs','\x20of\x20','projectId','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x20\x20Attempt\x20ID:\x20','✔\x20Secret\x20\x27','isTTY','revision','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','\x20from\x20session\x20','MAX_TIMELINE_WIDTH','Show\x20logs\x20for\x20a\x20workflow\x20attempt','✔\x20Downloaded\x20','\x20\x20Project\x20ID:\x20','\x20tasks','all','getFullYear','replace','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','length','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20\x20Workflow:\x20','Downloading\x20project\x20','localeCompare','Select\x20a\x20task\x20to\x20view\x20logs:','MAX_TASKS_DISPLAY','Getting\x20attempt\x20tasks...','value','No\x20projects\x20match\x20pattern:\x20','LABEL_WIDTH_DIVISOR','Pattern:\x20','substring','key','Key:\x20','floor','readFile','startTime','Task\x20name:\x20','attemptId','logs','planned','(unknown)','No\x20sessions\x20found\x20for:\x20','Listing\x20workflow\x20projects...','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Params:\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','duration','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','params','green','Output\x20directory:\x20','\x20modified','370670xUmnmn','keys','\x0a⚠\x20Project\x20\x22','No\x20sessions\x20found','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Error:\x20Invalid\x20JSON\x20in\x20--params','context','\x20\x20Session\x20ID:\x20','startsWith','workflow:tasks','\x20-\x20','\x20\x20Location:\x20','Session\x20not\x20found:\x20','set','columns','\x20workflow','No\x20workflows\x20found','\x20project','sourceProjectName','min','✔\x20Pull\x20complete','1204uXBDlu','has',',\x20Workflow:\x20','deleted','Loading\x20sessions...','session_id','Revision:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','---\x20','Retrying\x20attempt...','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Session\x20','pending','workflow:secrets:set','Expected\x20format:\x20--param\x20key=value','start','No\x20attempts\x20found\x20in\x20project:\x20','from','...','Error:\x20Attempt\x20ID\x20is\x20required','No\x20workflow\x20tdx.json\x20found','Listing\x20workflow\x20attempts...','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','No\x20log\x20content\x20found','toISOString','delete','renderTimeline','push','35693liiEtP','List\x20workflow\x20attempts','No\x20workflows\x20found\x20in\x20project:\x20','Key\x20cannot\x20be\x20empty','\x0aDry\x20run\x20-\x20nothing\x20pushed','fullName','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','rows','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Loading\x20session...','workflow','tdx.json','Updating\x20','canceling','message','Error:\x20Project\x20name\x20is\x20required','resolveProject','metadata','table','lastAttempt','Error:','Files\x20to\x20upload:\x20','Setting\x20secret...','state','Fetching\x20log\x20files...','Error:\x20Invalid\x20parameter\x20format:\x20','sys','\x20\x20Source:\x20','No\x20workflow\x20projects\x20found','POLL_INTERVAL_MS','No\x20attempts\x20found\x20for:\x20','index','\x20secret','max','✔\x20Clone\x20complete','Downloading\x20logs...','buildTimelineData','text','584616ZEUVNx','blue','Source\x20directory:\x20','cyan','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','session','output','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','workflow:use','\x22\x20already\x20exists\x20(ID:\x20','prepareCloneProject','isNewProject','write','Resolving\x20project\x20\x27','execute','\x1b[1A\x1b[2K','82MZCzVF','\x20session','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','\x0aApply\x20these\x20changes?','workflow:delete','dim','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','diff','json','✔\x20Workflow\x20project\x20set\x20to:\x20','Pushing\x20project...','Analyzing\x20project...','\x0a✔\x20No\x20changes\x20to\x20push','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Show\x20tasks\x20for\x20an\x20attempt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','✔\x20Push\x20complete','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Getting\x20attempt\x20details...','\x22\x20with\x20new\x20revision?','\x20\x20Changes:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x0aFailed\x20to\x20fetch\x20attempt\x20data','filesExtracted','parse','targetDir','Analyzing\x20changes...','requireProject','workflow:run','preparePushProject','workflows','Filter:\x20project=','displayLine','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','toLowerCase','targetExists','param','type','skipValidation','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','jsonl','white','.\x20Expected\x20format:\x20KEY=VALUE','Resume\x20from:\x20','yes','\x27\x20from\x20project\x20\x27','success','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','description','Failed\x20to\x20fetch\x20attempt\x20data','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','setSecrets','modified','fromTask','unchanged','workflow:download','relative','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','sort','TASK_NAME_WIDTH','\x20sessions\x20','red','limit','🔄\x20','run','Cloning\x20to\x20','workflow:sessions','trim','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','MIN_LABEL_COUNT','\x0aError:','\x20secrets\x20set\x20for\x20project\x20\x27','\x0aDry\x20run\x20-\x20no\x20files\x20written','131690xaXVJp','Target:\x20','Dry\x20run:\x20yes','Deleting\x20secret...','Setting\x20','updatedAt','includeSubtasks','splice','unknown','list','fileCount','attempts','session:','\x20\x20tdx\x20wf\x20use\x20<project>','Attempt\x20ID:\x20','task','join','getDate','trimEnd','Status:\x20','dryRun','Start\x20a\x20workflow\x20run','data','2245VgStrh','changes','verbose','No\x20sessions\x20found\x20in\x20project:\x20','newProjectId','Using\x20attempt\x20','MAX_POLL_ITERATIONS','window','end','Including\x20subtasks:\x20yes','kill','get','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Parameters:\x20','workflow:pull','Project\x20filter:\x20','match','\x20secrets...','follow','-\x20nothing\x20pushed','total','\x0a✔\x20Attempt\x20complete','No\x20matching\x20sessions\x20found','icon','slice','getTime','✔\x20Showing\x20','hasChanges','attempt','generateSessionTimelineRows','Auto-selected\x20latest\x20session:\x20','Tip:\x20cd\x20to\x20workflows/','Starting\x20workflow\x20run...','/app/workflows/','filter','Attempt:\x20','From\x20task:\x20','taskName','Secrets\x20to\x20set:\x20','fileSize'];a52_0x2e64=function(){return _0x144f83;};return a52_0x2e64();}import a52_0x2e09b8 from'prompts';function getAttemptStatusDisplay(_0x41f8ec){const _0x119faf=a52_0x4922;if(!_0x41f8ec)return{'icon':'⏳','text':''};const {done:_0x122c0d,success:_0x32f180,cancelRequested:_0x3e39c5}=_0x41f8ec;if(!_0x122c0d)return _0x3e39c5?{'icon':'🛑','text':a52_0x4a9921[_0x119faf(0x15d)]('canceling')}:{'icon':'🔄','text':a52_0x4a9921[_0x119faf(0x26f)](_0x119faf(0x1ae))};if(_0x32f180)return{'icon':'✅','text':a52_0x4a9921[_0x119faf(0x214)](_0x119faf(0x2ad))};return{'icon':'❌','text':a52_0x4a9921[_0x119faf(0x2bc)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a52_0x378e60(0x258)](_0x5c67df,_0x235467,_0x35b5f9=0x0){const _0x4b49b1=a52_0x378e60;return _0x5c67df[_0x35b5f9]||_0x235467[_0x4b49b1(0x1b8)];}['requireProject'](_0x4857dd,_0x1a07f1,_0x241184=0x0){const _0xd5700a=a52_0x378e60,_0x2a2ddd=this[_0xd5700a(0x258)](_0x4857dd,_0x1a07f1,_0x241184);if(!_0x2a2ddd)return console[_0xd5700a(0x193)](a52_0x4a9921[_0xd5700a(0x2bc)](_0xd5700a(0x25c)),_0xd5700a(0x175)),console['error'](a52_0x4a9921['dim'](_0xd5700a(0x1c3))),null;return _0x2a2ddd;}['parseProjectWorkflowPattern'](_0x8dc514,_0x387f9b){const _0x31deb7=a52_0x378e60;if(_0x8dc514[0x0]){const _0x403648=_0x8dc514[0x0]['split']('.');if(_0x403648[_0x31deb7(0x1f5)]===0x1)return{'projectName':_0x403648[0x0],'workflowName':undefined};else return _0x403648[_0x31deb7(0x1f5)]===0x2?{'projectName':_0x403648[0x0],'workflowName':_0x403648[0x1]}:(console[_0x31deb7(0x193)](a52_0x4a9921[_0x31deb7(0x2bc)](_0x31deb7(0x25c)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x387f9b['workflowProject'],'workflowName':undefined};}['resolveProjectDir'](_0x3a87f0,_0x3cdb62,_0x52d83b=0x0){const _0xae1b7b=a52_0x378e60;if(_0x3a87f0[_0x52d83b])return _0x3a87f0[_0x52d83b];if(_0x3cdb62[_0xae1b7b(0x1b8)]){const _0x219f6c=a52_0x5594c9[_0xae1b7b(0x123)](process[_0xae1b7b(0x1bc)](),_0xae1b7b(0x29d),_0x3cdb62[_0xae1b7b(0x1b8)]);if(existsSync(a52_0x5594c9[_0xae1b7b(0x123)](_0x219f6c,_0xae1b7b(0x253))))return _0x219f6c;}return undefined;}async['showWorkflowConsoleUrl'](_0x3f4cd0,_0x15d158,_0x2366ef){const _0x5e4525=a52_0x378e60;try{const _0x47aaec=await _0x3f4cd0[_0x5e4525(0x252)][_0x5e4525(0x29d)](_0x15d158,{'limit':0x1});if(_0x47aaec[_0x5e4525(0x1f5)]>0x0){const _0x1d0bdc=_0x47aaec[0x0]['id'],_0x422c90=getWorkflowUrl(_0x2366ef,_0x1d0bdc);console[_0x5e4525(0x193)](_0x5e4525(0x1d5)+a52_0x4a9921[_0x5e4525(0x271)](_0x422c90));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a52_0x378e60(0x276);['description']=a52_0x378e60(0x1d7);async[a52_0x378e60(0x27c)](_0x3d43f3){const _0x3a0a47=a52_0x378e60,{options:_0x2a3b61,args:_0x260884,tdx:_0x396af6}=_0x3d43f3,_0x1ecd16=_0x260884[0x0],_0x52c2cc=_0x2a3b61['clear'];if(_0x52c2cc)return saveSessionContext({'workflow_project':undefined},_0x2a3b61[_0x3a0a47(0x273)]),console[_0x3a0a47(0x19d)](a52_0x4a9921[_0x3a0a47(0x214)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x1ecd16)return console['error'](a52_0x4a9921['red'](_0x3a0a47(0x25c)),'Project\x20name\x20is\x20required'),console[_0x3a0a47(0x193)](a52_0x4a9921[_0x3a0a47(0x283)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x3a0a47(0x193)](a52_0x4a9921[_0x3a0a47(0x283)](_0x3a0a47(0x293))),0x1;const _0x27d499=await withSpinner(_0x3a0a47(0x27b)+_0x1ecd16+_0x3a0a47(0x19f),()=>_0x396af6[_0x3a0a47(0x252)][_0x3a0a47(0x1d2)](_0x1ecd16),{'verbose':_0x2a3b61[_0x3a0a47(0x12c)]}),{name:_0x5c9d34}=_0x27d499[_0x3a0a47(0x129)];return saveSessionContext({'workflow_project':_0x5c9d34},_0x2a3b61[_0x3a0a47(0x273)]),console[_0x3a0a47(0x19d)](a52_0x4a9921['green'](_0x3a0a47(0x287)+a52_0x4a9921[_0x3a0a47(0x271)](_0x5c9d34))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a52_0x378e60(0x160)]='workflow:projects';[a52_0x378e60(0x2af)]=a52_0x378e60(0x167);async[a52_0x378e60(0x27c)](_0x456226){const _0xb3b184=a52_0x378e60,{options:_0x395465,args:_0x486135,tdx:_0x4767aa}=_0x456226,_0x48b4f9=_0x486135[0x0];_0x395465[_0xb3b184(0x12c)]&&_0x48b4f9&&console[_0xb3b184(0x193)](_0xb3b184(0x200)+_0x48b4f9);const _0x56c310=await withSpinner(_0xb3b184(0x20d),()=>_0x4767aa['workflow'][_0xb3b184(0x19a)](_0x48b4f9,{'limit':_0x395465[_0xb3b184(0x2bd)]}),{'verbose':_0x395465[_0xb3b184(0x12c)]});let _0x2f6088=_0x56c310[_0xb3b184(0x129)];_0x2f6088[_0xb3b184(0x2b9)]((_0x182ae8,_0x30437d)=>_0x182ae8[_0xb3b184(0x160)][_0xb3b184(0x1f9)](_0x30437d[_0xb3b184(0x160)]));const _0x2612bb=_0x395465[_0xb3b184(0x2bd)]||0x64,_0x2ab95e=_0x2f6088[_0xb3b184(0x1f5)]>=_0x2612bb?a52_0x4a9921[_0xb3b184(0x283)](_0xb3b184(0x1bd)):'';console[_0xb3b184(0x193)](_0xb3b184(0x177)+_0x2f6088[_0xb3b184(0x1f5)]+_0xb3b184(0x228)+(_0x2f6088[_0xb3b184(0x1f5)]!==0x1?'s':'')+_0x2ab95e);if(_0x395465[_0xb3b184(0x1db)]===_0xb3b184(0x286)||_0x395465[_0xb3b184(0x1db)]===_0xb3b184(0x2a7)||_0x395465['format']===_0xb3b184(0x25a))await handleSDKOutput(_0x2f6088,_0x395465);else{if(_0x2f6088['length']===0x0)_0x48b4f9?console[_0xb3b184(0x19d)](_0xb3b184(0x1fe)+_0x48b4f9):console['log'](_0xb3b184(0x264));else{const _0x52125f=_0x2f6088[_0xb3b184(0x166)](_0x581a65=>{const _0x38f396=_0xb3b184,_0x331cda=_0x581a65[_0x38f396(0x259)]?.[_0x38f396(0x164)](_0x5e6682=>_0x5e6682[_0x38f396(0x202)]===_0x38f396(0x262)),_0xa4601f=_0x331cda?a52_0x4a9921['dim'](_0x38f396(0x195)):'';return _0x38f396(0x1cb)+_0x581a65['name']+_0xa4601f;});await writeOutput(_0x52125f[_0xb3b184(0x123)]('\x0a'),_0x395465[_0xb3b184(0x274)],_0xb3b184(0x11c));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a52_0x378e60(0x160)]='workflow:workflows';[a52_0x378e60(0x2af)]=a52_0x378e60(0x1ba);async[a52_0x378e60(0x27c)](_0x4c0e4b){const _0x1bebb3=a52_0x378e60,{options:_0x5e4a75,args:_0x2b270f,tdx:_0x2334b9}=_0x4c0e4b,_0x1c21e=this[_0x1bebb3(0x258)](_0x2b270f,_0x5e4a75);_0x5e4a75[_0x1bebb3(0x12c)]&&_0x1c21e&&console['error'](_0x1bebb3(0x139)+_0x1c21e);const _0x1d10bd=await withSpinner('Listing\x20workflows...',()=>_0x2334b9['workflow'][_0x1bebb3(0x29d)](_0x1c21e,{'limit':_0x5e4a75[_0x1bebb3(0x2bd)]}),{'verbose':_0x5e4a75[_0x1bebb3(0x12c)]});let _0x312e14=_0x1d10bd[_0x1bebb3(0x129)];_0x312e14[_0x1bebb3(0x2b9)]((_0x296dbb,_0x37ce46)=>{const _0x336228=_0x1bebb3,_0x2b62fe=_0x296dbb['name'][_0x336228(0x1f9)](_0x37ce46[_0x336228(0x160)]);if(_0x2b62fe!==0x0)return _0x2b62fe;return(_0x296dbb[_0x336228(0x1d8)]?.[_0x336228(0x160)]||'')[_0x336228(0x1f9)](_0x37ce46[_0x336228(0x1d8)]?.[_0x336228(0x160)]||'');});const _0x24e6a9=_0x5e4a75[_0x1bebb3(0x2bd)]||0x64,_0x240824=_0x312e14[_0x1bebb3(0x1f5)]>=_0x24e6a9?a52_0x4a9921['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x1bebb3(0x193)](_0x1bebb3(0x177)+_0x312e14['length']+_0x1bebb3(0x226)+(_0x312e14[_0x1bebb3(0x1f5)]!==0x1?'s':'')+_0x240824);if(_0x5e4a75[_0x1bebb3(0x1db)]==='json'||_0x5e4a75[_0x1bebb3(0x1db)]===_0x1bebb3(0x2a7)||_0x5e4a75[_0x1bebb3(0x1db)]===_0x1bebb3(0x25a))await handleSDKOutput(_0x312e14,_0x5e4a75);else{if(_0x312e14['length']===0x0)_0x1c21e?console['log'](_0x1bebb3(0x24a)+_0x1c21e):console[_0x1bebb3(0x19d)](_0x1bebb3(0x227));else{const _0xeee91e=_0x5e4a75[_0x1bebb3(0x179)],_0x4f84ea=_0x312e14['map'](_0x52cdae=>{const _0x4c26cc=_0x1bebb3,_0x5b277e=a52_0x4a9921['dim']('#'+_0x52cdae['id']),_0x3d3b35=hyperlink(_0x5b277e,getWorkflowUrl(_0xeee91e,_0x52cdae['id'])),_0x4b2eaa=_0x52cdae[_0x4c26cc(0x1d8)]?.[_0x4c26cc(0x160)]?a52_0x4a9921[_0x4c26cc(0x283)]('\x20('+_0x52cdae[_0x4c26cc(0x1d8)][_0x4c26cc(0x160)]+')'):'';return'📋\x20'+_0x3d3b35+'\x20'+_0x52cdae['name']+_0x4b2eaa;});await writeOutput(_0x4f84ea[_0x1bebb3(0x123)]('\x0a'),_0x5e4a75[_0x1bebb3(0x274)],_0x1bebb3(0x11c));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x2c1);[a52_0x378e60(0x2af)]='List\x20workflow\x20execution\x20sessions';async[a52_0x378e60(0x27c)](_0x4b35a0){const _0x11feea=a52_0x378e60,{options:_0x5d5d14,args:_0x576317,tdx:_0xe0420f}=_0x4b35a0,_0x35e76f=this['parseProjectWorkflowPattern'](_0x576317,_0x5d5d14);if(!_0x35e76f)return 0x1;const {projectName:_0x3eccb4,workflowName:_0x1483db}=_0x35e76f;if(_0x5d5d14[_0x11feea(0x12c)]){if(_0x3eccb4&&_0x1483db)console[_0x11feea(0x193)]('Filter:\x20'+_0x3eccb4+'.'+_0x1483db);else _0x3eccb4&&console[_0x11feea(0x193)](_0x11feea(0x29e)+_0x3eccb4);const _0x390d5d=_0x5d5d14['status'];_0x390d5d&&console[_0x11feea(0x193)](_0x11feea(0x126)+_0x390d5d);}let _0x4bbec2=0x28;if(process[_0x11feea(0x187)][_0x11feea(0x1e8)]&&!_0x5d5d14[_0x11feea(0x274)]&&!_0x5d5d14[_0x11feea(0x1db)]){const _0x2e1d14=process['stdout']['rows']||0x28;_0x4bbec2=Math[_0x11feea(0x269)](0x14,Math[_0x11feea(0x204)](_0x2e1d14*0x2/0x3));}const _0xf5f56f=_0x5d5d14[_0x11feea(0x2bd)]||_0x4bbec2,_0x1f3706=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0xe0420f['workflow'][_0x11feea(0x197)]({'projectName':_0x3eccb4,'workflowName':_0x1483db,'status':_0x5d5d14['status'],'fromTime':_0x5d5d14[_0x11feea(0x23d)],'toTime':_0x5d5d14['to'],'limit':_0xf5f56f}),{'verbose':_0x5d5d14[_0x11feea(0x12c)]}),_0x2a4095=_0x1f3706[_0x11feea(0x129)];_0x2a4095[_0x11feea(0x2b9)]((_0xc4acc6,_0x3af4f7)=>{const _0x1eac8a=_0x11feea,_0x2abd33=_0xc4acc6[_0x1eac8a(0x16f)]||'',_0x31f944=_0x3af4f7['sessionTime']||'';return _0x31f944['localeCompare'](_0x2abd33);});_0x2a4095['length']>=_0xf5f56f?console[_0x11feea(0x193)](_0x11feea(0x144)+_0x2a4095[_0x11feea(0x1f5)]+_0x11feea(0x2bb)+a52_0x4a9921[_0x11feea(0x283)](_0x11feea(0x15a))):console[_0x11feea(0x193)](_0x11feea(0x177)+_0x2a4095[_0x11feea(0x1f5)]+_0x11feea(0x27f)+(_0x2a4095[_0x11feea(0x1f5)]!==0x1?'s':''));if(_0x5d5d14[_0x11feea(0x1db)]===_0x11feea(0x286)||_0x5d5d14['format']===_0x11feea(0x2a7)||_0x5d5d14[_0x11feea(0x1db)]===_0x11feea(0x25a))await handleSDKOutput(_0x2a4095,_0x5d5d14);else{if(!process[_0x11feea(0x187)]['isTTY']||_0x5d5d14[_0x11feea(0x274)]){if(_0x2a4095[_0x11feea(0x1f5)]===0x0){if(_0x3eccb4&&_0x1483db)console[_0x11feea(0x19d)](_0x11feea(0x20c)+_0x3eccb4+'.'+_0x1483db);else _0x3eccb4?console[_0x11feea(0x19d)](_0x11feea(0x12d)+_0x3eccb4):console[_0x11feea(0x19d)](_0x11feea(0x21a));}else{const _0x2d4273=_0x5d5d14[_0x11feea(0x179)],_0x2d8301=this[_0x11feea(0x159)](_0x2a4095,_0x2d4273);_0x5d5d14['output']?await writeOutput(_0x2d8301,_0x5d5d14[_0x11feea(0x274)],_0x11feea(0x11c)):console[_0x11feea(0x19d)](_0x2d8301);}!_0x3eccb4&&(console['error'](''),console['error'](a52_0x4a9921[_0x11feea(0x283)](_0x11feea(0x212))),console['error'](a52_0x4a9921[_0x11feea(0x283)](_0x11feea(0x1f6))+'or'+a52_0x4a9921[_0x11feea(0x283)](_0x11feea(0x120))));}else{if(_0x2a4095[_0x11feea(0x1f5)]===0x0){if(_0x3eccb4&&_0x1483db)console['log'](_0x11feea(0x20c)+_0x3eccb4+'.'+_0x1483db);else _0x3eccb4?console['log'](_0x11feea(0x12d)+_0x3eccb4):console['log'](_0x11feea(0x21a));}else await this['navigateSessionsInteractive'](_0x2a4095,_0x4b35a0,_0x3eccb4);}}return 0x0;}[a52_0x378e60(0x159)](_0x199467,_0x2d10dd){const _0x1bcf1b=a52_0x378e60,_0x52d783=[],_0x267411=new Map();let _0x4552ca=Infinity,_0x3c9227=-Infinity;for(const _0x3e0522 of _0x199467){if(_0x3e0522[_0x1bcf1b(0x25b)]?.[_0x1bcf1b(0x165)]){const _0x25a214=new Date(_0x3e0522[_0x1bcf1b(0x25b)][_0x1bcf1b(0x165)])[_0x1bcf1b(0x143)](),_0x38a84b=_0x3e0522[_0x1bcf1b(0x25b)][_0x1bcf1b(0x180)]?new Date(_0x3e0522['lastAttempt'][_0x1bcf1b(0x180)])[_0x1bcf1b(0x143)]():Date[_0x1bcf1b(0x174)](),_0x34ff9d=_0x3e0522[_0x1bcf1b(0x1d8)]?.[_0x1bcf1b(0x160)]||_0x1bcf1b(0x20b);!_0x267411[_0x1bcf1b(0x22d)](_0x34ff9d)&&_0x267411['set'](_0x34ff9d,[]),_0x267411[_0x1bcf1b(0x135)](_0x34ff9d)['push']({'session':_0x3e0522,'startTime':_0x25a214,'endTime':_0x38a84b,'duration':_0x38a84b-_0x25a214}),_0x4552ca=Math[_0x1bcf1b(0x22a)](_0x4552ca,_0x25a214),_0x3c9227=Math[_0x1bcf1b(0x269)](_0x3c9227,_0x38a84b);}}if(_0x267411['size']===0x0)return _0x1bcf1b(0x152);const _0xab8c77=process[_0x1bcf1b(0x187)][_0x1bcf1b(0x225)]||0x78,_0x3eea3d=0x1e,_0x56bec9=0x32,_0x1341e4=0x4,_0xc5c724=Math[_0x1bcf1b(0x22a)](_0x56bec9,Math[_0x1bcf1b(0x269)](_0x3eea3d,Math[_0x1bcf1b(0x204)](_0xab8c77*0.3))),_0x22bc22=_0xab8c77-_0xc5c724-TIMELINE_CONFIG[_0x1bcf1b(0x156)]-0x3-_0x1341e4,_0x5bb50e=_0x3c9227-_0x4552ca,_0x16ae06=_0x5bb50e/_0xc5c724,_0x3550fe=renderTimeAxis({'startTime':_0x4552ca,'endTime':_0x3c9227,'durationMs':_0x5bb50e,'msPerChar':_0x16ae06},_0xc5c724),_0x284298=[];for(const _0x155742 of _0x267411['values']()){_0x284298[_0x1bcf1b(0x247)](..._0x155742);}_0x284298[_0x1bcf1b(0x2b9)]((_0x7959f7,_0x1b219f)=>_0x1b219f[_0x1bcf1b(0x206)]-_0x7959f7[_0x1bcf1b(0x206)]);const _0x12f30e=new Date(_0x4552ca),_0x202a37=formatDate(_0x12f30e),_0xc5a761=_0x1341e4+TIMELINE_CONFIG[_0x1bcf1b(0x17d)]+TIMELINE_CONFIG[_0x1bcf1b(0x170)]+_0x22bc22,_0x6d38ab='\x20'['repeat'](_0xc5a761-_0x202a37['length']),_0x432c8f=_0x6d38ab+a52_0x4a9921[_0x1bcf1b(0x283)](_0x202a37)+'\x20'+_0x3550fe;_0x52d783['push'](_0x432c8f);const _0xc62c35=0x16;let _0x3cf63d=0x0;for(const _0xb5fc08 of _0x284298){const _0x45c1a8=_0xb5fc08[_0x1bcf1b(0x273)][_0x1bcf1b(0x1d8)]?.[_0x1bcf1b(0x160)]||'?',_0x233328=Math['min'](stringWidth(_0x45c1a8),_0xc62c35);_0x3cf63d=Math[_0x1bcf1b(0x269)](_0x3cf63d,_0x233328);}for(const _0x158d15 of _0x284298){const {session:_0xedd904,startTime:_0x1440b8,endTime:_0x3fb145,duration:_0x3ca292}=_0x158d15,_0x10b647=_0xedd904[_0x1bcf1b(0x1d8)]?.['id'],_0x248229=_0xedd904['id'],_0x1330fc=_0xedd904['project']?.[_0x1bcf1b(0x160)]||'?',_0x3110a5=_0xedd904[_0x1bcf1b(0x252)]?.[_0x1bcf1b(0x160)]||'?';let _0x2fac44,_0x5a47c5;if(_0xedd904[_0x1bcf1b(0x25b)]){const _0x29af15=_0xedd904[_0x1bcf1b(0x25b)];!_0x29af15['done']?(_0x2fac44=_0x29af15['cancelRequested']?'🛑':'🔄',_0x5a47c5=_0x29af15['cancelRequested']?a52_0x4a9921[_0x1bcf1b(0x15d)]:a52_0x4a9921[_0x1bcf1b(0x26f)]):(_0x2fac44=_0x29af15[_0x1bcf1b(0x2ad)]?'✅':'❌',_0x5a47c5=_0x29af15['success']?a52_0x4a9921[_0x1bcf1b(0x214)]:a52_0x4a9921[_0x1bcf1b(0x2bc)]);}else _0x2fac44='⏳',_0x5a47c5=a52_0x4a9921[_0x1bcf1b(0x283)];const _0x206986='#'+_0x248229,_0x28bfb5=_0x10b647?hyperlink(_0x206986,getWorkflowSessionUrl(_0x2d10dd,_0x10b647,_0x248229)):_0x206986;let _0x14783e=_0x1330fc;stringWidth(_0x1330fc)>_0xc62c35&&(_0x14783e=_0x1330fc['slice'](0x0,_0xc62c35-0x1)+'…');const _0x4d41b1=a52_0x4a9921[_0x1bcf1b(0x283)](_0x14783e),_0x1303ca=stringWidth(_0x14783e),_0x3182b7='\x20'[_0x1bcf1b(0x1d3)](_0x3cf63d-stringWidth(_0x14783e)+0x2),_0x5e46fd='('+formatElapsed(_0x3ca292)+')',_0x222dcd=stringWidth(_0x5e46fd),_0x53185f=stringWidth(_0x206986),_0xc84f4=_0x53185f+0x1+_0x1303ca+_0x3182b7[_0x1bcf1b(0x1f5)],_0xbc2459=_0x22bc22-_0xc84f4-_0x222dcd-0x1-0x8;let _0x1eb3f0=_0x3110a5;stringWidth(_0x1eb3f0)>_0xbc2459&&(_0x1eb3f0=_0x1eb3f0[_0x1bcf1b(0x142)](0x0,_0xbc2459-0x1)+'…');const _0xb6f7e1=_0x28bfb5+'\x20'+_0x4d41b1+_0x3182b7+_0x1eb3f0,_0x3006c9=stringWidth(_0xb6f7e1),_0x42adc8=_0x22bc22-_0x3006c9-_0x222dcd,_0xe9e35=_0xb6f7e1+'\x20'['repeat'](Math[_0x1bcf1b(0x269)](0x1,_0x42adc8))+a52_0x4a9921['dim'](_0x5e46fd),_0x4abb33=Math[_0x1bcf1b(0x204)]((_0x1440b8-_0x4552ca)/_0x16ae06),_0x72c641=Math[_0x1bcf1b(0x204)]((_0x3fb145-_0x4552ca)/_0x16ae06),_0xdc5d3c=Math['max'](_0x4abb33+0x1,_0x72c641),_0x24c397=new Array(_0xc5c724)[_0x1bcf1b(0x18d)]('\x20');for(let _0x594141=_0x4abb33;_0x594141<Math[_0x1bcf1b(0x22a)](_0xdc5d3c,_0xc5c724);_0x594141++){_0x24c397[_0x594141]='─';}const _0x2fed8f=_0x24c397[_0x1bcf1b(0x166)](_0x484189=>_0x484189==='\x20'?'\x20':_0x5a47c5(_0x484189))['join']('');_0x52d783['push'](_0x2fac44+'\x20'+_0xe9e35+'│'+_0x2fed8f+'│');}return _0x52d783[_0x1bcf1b(0x123)]('\x0a');}async['navigateSessionsInteractive'](_0x2b4884,_0x23aa7a,_0x648b7b){const _0x17f334=a52_0x378e60,{options:_0x4952b8,tdx:_0x58904e}=_0x23aa7a,_0x28b65b=_0x4952b8[_0x17f334(0x179)],{timelineRows:_0x73749f,timeAxisHeader:_0x4ade4b}=this[_0x17f334(0x147)](_0x2b4884,_0x28b65b),_0x10266c=_0x73749f[_0x17f334(0x14c)](_0x1120cf=>_0x1120cf['attemptId']);if(_0x10266c['length']===0x0){const _0x18c23f=this['renderSessionsTimeline'](_0x2b4884,_0x28b65b);console[_0x17f334(0x19d)](_0x18c23f);!_0x648b7b&&(console['error'](''),console['error'](a52_0x4a9921['dim']('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x17f334(0x193)](a52_0x4a9921[_0x17f334(0x283)](_0x17f334(0x1f6))+'or'+a52_0x4a9921['dim'](_0x17f334(0x120))));return;}_0x4ade4b&&console['log'](_0x4ade4b);const _0x58fa75=_0x73749f[_0x17f334(0x14c)](_0x122718=>_0x122718['attemptId'])[_0x17f334(0x166)](_0x38e24e=>({'title':_0x38e24e[_0x17f334(0x29f)],'value':_0x38e24e[_0x17f334(0x208)]})),_0x33b866=process['stdout'][_0x17f334(0x24f)]||0x3c,_0xad6eca=Math[_0x17f334(0x269)](0x28,Math['floor'](_0x33b866*0x2/0x3)),_0x2d79f9=await a52_0x2e09b8({'type':'autocomplete','name':_0x17f334(0x208),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x58fa75,'initial':-0x1,'limit':_0xad6eca,'clearFirst':!![],'fallback':{'title':_0x17f334(0x140),'value':null},'suggest':(_0x4eff81,_0x537fca)=>{const _0x13d881=_0x17f334;if(!_0x4eff81)return Promise[_0x13d881(0x1dd)](_0x537fca);const _0x3bff71=_0x537fca[_0x13d881(0x14c)](_0x3257cc=>{const _0x56eaff=_0x13d881,_0x6bc025=_0x3257cc;return _0x6bc025[_0x56eaff(0x1e0)][_0x56eaff(0x2a1)]()[_0x56eaff(0x181)](_0x4eff81['toLowerCase']());});return Promise[_0x13d881(0x1dd)](_0x3bff71);}}),_0x4dd9f2=()=>{const _0x2a4a7a=_0x17f334;process['stdout'][_0x2a4a7a(0x27a)](_0x2a4a7a(0x27d)),process[_0x2a4a7a(0x187)][_0x2a4a7a(0x27a)](_0x2a4a7a(0x27d)),process[_0x2a4a7a(0x187)][_0x2a4a7a(0x27a)](_0x2a4a7a(0x27d));},_0x506c44=_0x2d79f9&&_0x2d79f9[_0x17f334(0x208)]&&_0x2d79f9[_0x17f334(0x208)]!==null&&_0x2d79f9[_0x17f334(0x208)][_0x17f334(0x2c2)]()!=='';if(!_0x506c44){_0x4dd9f2(),console[_0x17f334(0x19d)](a52_0x4a9921[_0x17f334(0x283)](_0x17f334(0x192)));return;}_0x4dd9f2();const _0x3a6e34=_0x2b4884[_0x17f334(0x18f)](_0x51ecfb=>_0x51ecfb[_0x17f334(0x25b)]?.['id']===_0x2d79f9[_0x17f334(0x208)]);if(_0x3a6e34){const _0x47aec8=_0x3a6e34['project']?.['name']||'?',_0x1670fc=_0x3a6e34[_0x17f334(0x252)]?.[_0x17f334(0x160)]||'?';console[_0x17f334(0x19d)]('Project:\x20'+a52_0x4a9921[_0x17f334(0x283)](_0x47aec8)+_0x17f334(0x22e)+a52_0x4a9921[_0x17f334(0x283)](_0x1670fc));}const _0x21937d=new WorkflowTimelineCommand();await _0x21937d[_0x17f334(0x27c)]({'args':[],'options':{..._0x4952b8,'attemptId':_0x2d79f9[_0x17f334(0x208)]},'tdx':_0x58904e});}['generateSessionTimelineRows'](_0x4b6dfa,_0x248cd8){const _0x2b3791=a52_0x378e60,_0x3ad0a2=new Map();for(const _0xa3bbb5 of _0x4b6dfa){_0xa3bbb5['id']&&_0xa3bbb5[_0x2b3791(0x25b)]?.['id']&&_0x3ad0a2[_0x2b3791(0x224)](_0xa3bbb5['id'],_0xa3bbb5[_0x2b3791(0x25b)]['id']);}const _0x4c6063=[];let _0x314438='';const _0x52d466=this[_0x2b3791(0x159)](_0x4b6dfa,_0x248cd8),_0x1fe547=_0x52d466['split']('\x0a');for(const _0x574518 of _0x1fe547){if(_0x574518[_0x2b3791(0x21f)](_0x2b3791(0x163))||_0x574518[_0x2b3791(0x13a)](/^\s+\d{4}-\d{2}-\d{2}/))_0x314438=_0x574518;else{if(_0x574518[_0x2b3791(0x13a)](/^[✅❌🔄🛑⏳]/)){const _0x4bbf86=_0x574518['match'](/#(\d+)/),_0x19f403=_0x4bbf86?_0x4bbf86[0x1]:null,_0x321863=_0x19f403?_0x3ad0a2['get'](_0x19f403)||null:null,_0x473c5d=_0x4b6dfa[_0x2b3791(0x18f)](_0x4ef54a=>_0x4ef54a['id']===_0x19f403),_0x203062=_0x473c5d?.['project']?.['name']||'';_0x4c6063['push']({'displayLine':_0x574518,'attemptId':_0x321863,'projectName':_0x203062});}}}return{'timelineRows':_0x4c6063,'timeAxisHeader':_0x314438};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a52_0x378e60(0x160)]='workflow:attempts';[a52_0x378e60(0x2af)]=a52_0x378e60(0x249);async[a52_0x378e60(0x27c)](_0x78bec7){const _0x2d0021=a52_0x378e60,{options:_0x2ebc32,args:_0x4ff5ed,tdx:_0x41220e}=_0x78bec7,_0x290841=this[_0x2d0021(0x1a3)](_0x4ff5ed,_0x2ebc32);if(!_0x290841)return 0x1;const {projectName:_0x30fe89,workflowName:_0x2283cb}=_0x290841,_0x5221dc=_0x2ebc32['includeRetried'];if(_0x2ebc32[_0x2d0021(0x12c)]){if(_0x30fe89&&_0x2283cb)console[_0x2d0021(0x193)](_0x2d0021(0x1ac)+_0x30fe89+'.'+_0x2283cb);else _0x30fe89&&console['error'](_0x2d0021(0x29e)+_0x30fe89);_0x5221dc&&console[_0x2d0021(0x193)](_0x2d0021(0x1b4));}const _0x58f63c=await withSpinner(_0x2d0021(0x241),()=>_0x41220e['workflow'][_0x2d0021(0x11e)]({'projectName':_0x30fe89,'workflowName':_0x2283cb,'includeRetried':_0x5221dc,'limit':_0x2ebc32[_0x2d0021(0x2bd)]}),{'verbose':_0x2ebc32['verbose']}),_0x656a99=_0x58f63c[_0x2d0021(0x129)],_0x39c5c7=_0x2ebc32[_0x2d0021(0x2bd)]||0x64,_0xdc9eef=_0x656a99['length']>=_0x39c5c7?a52_0x4a9921['dim'](_0x2d0021(0x1bd)):'';console[_0x2d0021(0x193)](_0x2d0021(0x177)+_0x656a99[_0x2d0021(0x1f5)]+_0x2d0021(0x171)+(_0x656a99[_0x2d0021(0x1f5)]!==0x1?'s':'')+_0xdc9eef);if(_0x2ebc32[_0x2d0021(0x1db)]===_0x2d0021(0x286)||_0x2ebc32[_0x2d0021(0x1db)]===_0x2d0021(0x2a7)||_0x2ebc32[_0x2d0021(0x1db)]===_0x2d0021(0x25a))await handleSDKOutput(_0x656a99,_0x2ebc32);else{if(_0x656a99[_0x2d0021(0x1f5)]===0x0){if(_0x30fe89&&_0x2283cb)console[_0x2d0021(0x19d)](_0x2d0021(0x266)+_0x30fe89+'.'+_0x2283cb);else _0x30fe89?console[_0x2d0021(0x19d)](_0x2d0021(0x23c)+_0x30fe89):console[_0x2d0021(0x19d)]('No\x20attempts\x20found');}else{const _0x516d6b=_0x2ebc32[_0x2d0021(0x179)],_0x1f7454=_0x656a99[_0x2d0021(0x166)](_0x20d50b=>{const _0x2eec05=_0x2d0021,_0x14f08f=a52_0x4a9921['dim']('#'+_0x20d50b['id']),_0x2ae5ad=_0x20d50b[_0x2eec05(0x1d8)]?.['id'],_0x5170be=_0x20d50b[_0x2eec05(0x231)]||_0x20d50b[_0x2eec05(0x1d9)],_0x2fa085=_0x2ae5ad&&_0x5170be?hyperlink(_0x14f08f,getWorkflowAttemptUrl(_0x516d6b,_0x2ae5ad,_0x5170be,_0x20d50b['id'])):_0x14f08f,{icon:_0x8b4f0e,text:_0x1b5e17}=getAttemptStatusDisplay(_0x20d50b),_0x7e9e85=(_0x20d50b[_0x2eec05(0x1d8)]?.[_0x2eec05(0x160)]||'?')+'.'+(_0x20d50b[_0x2eec05(0x252)]?.['name']||'?'),_0x42d8ac=_0x20d50b[_0x2eec05(0x16f)]?a52_0x4a9921[_0x2eec05(0x283)](_0x20d50b[_0x2eec05(0x16f)]):'';return(_0x2fa085+'\x20'+_0x8b4f0e+(_0x1b5e17?'\x20'+_0x1b5e17:'')+'\x20'+_0x7e9e85+'\x20'+_0x42d8ac)[_0x2eec05(0x125)]();});await writeOutput(_0x1f7454[_0x2d0021(0x123)]('\x0a'),_0x2ebc32[_0x2d0021(0x274)],_0x2d0021(0x11c));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a52_0x378e60(0x160)]='workflow:attempt';[a52_0x378e60(0x2af)]='Show\x20specific\x20attempt\x20details';async[a52_0x378e60(0x27c)](_0x401e15){const _0x41deb9=a52_0x378e60,{options:_0x2eefbe,args:_0x3aa33c,tdx:_0x5a4013}=_0x401e15,_0xafccb3=_0x3aa33c[0x0];if(!_0xafccb3)return console[_0x41deb9(0x193)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x2eefbe[_0x41deb9(0x12c)]&&console[_0x41deb9(0x193)](_0x41deb9(0x121)+_0xafccb3);const _0x17c357=await withSpinner(_0x41deb9(0x290),()=>_0x5a4013[_0x41deb9(0x252)][_0x41deb9(0x146)](_0xafccb3),{'verbose':_0x2eefbe['verbose']}),_0x450371=_0x17c357[_0x41deb9(0x129)];let _0x5b05df;!_0x450371[_0x41deb9(0x158)]?_0x5b05df=_0x450371['cancelRequested']?_0x41deb9(0x255):_0x41deb9(0x1ae):_0x5b05df=_0x450371[_0x41deb9(0x2ad)]?_0x41deb9(0x2ad):_0x41deb9(0x193);let _0x49a178;if(_0x450371[_0x41deb9(0x165)]&&_0x450371[_0x41deb9(0x180)]){const _0x35a6b0=new Date(_0x450371[_0x41deb9(0x165)])[_0x41deb9(0x143)](),_0x61aa33=new Date(_0x450371['finishedAt'])[_0x41deb9(0x143)]();_0x49a178=Math['round']((_0x61aa33-_0x35a6b0)/0x3e8);}const _0x5c4d27={'attempt_id':_0x450371['id'],'status':_0x5b05df,..._0x450371[_0x41deb9(0x267)]!==undefined&&{'index':_0x450371[_0x41deb9(0x267)]},..._0x450371[_0x41deb9(0x1d8)]&&{'project':_0x450371['project'][_0x41deb9(0x160)]},..._0x450371[_0x41deb9(0x252)]&&{'workflow':_0x450371['workflow'][_0x41deb9(0x160)]},..._0x450371[_0x41deb9(0x1d9)]&&{'session_id':_0x450371[_0x41deb9(0x1d9)]},..._0x450371[_0x41deb9(0x16f)]&&{'session_time':_0x450371[_0x41deb9(0x16f)]},..._0x450371[_0x41deb9(0x1b6)]&&{'retry_attempt':_0x450371[_0x41deb9(0x1b6)]},..._0x49a178!==undefined&&{'duration_sec':_0x49a178},..._0x450371[_0x41deb9(0x165)]&&{'created_at':_0x450371[_0x41deb9(0x165)]},..._0x450371[_0x41deb9(0x180)]&&{'finished_at':_0x450371['finishedAt']},...Object[_0x41deb9(0x218)](_0x450371[_0x41deb9(0x213)])[_0x41deb9(0x1f5)]>0x0&&{'params':_0x450371[_0x41deb9(0x213)]}};return await handleSingleObjectOutput(_0x5c4d27,_0x2eefbe),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x220);[a52_0x378e60(0x2af)]=a52_0x378e60(0x28c);async[a52_0x378e60(0x27c)](_0x439443){const _0x252c75=a52_0x378e60,{options:_0x31bf1f,args:_0x37ea16,tdx:_0x309f78}=_0x439443,_0x1f5e61=_0x37ea16[0x0];if(!_0x1f5e61)return console[_0x252c75(0x193)](_0x252c75(0x23f)),0x1;const _0x4ebe3b=_0x31bf1f[_0x252c75(0x119)];_0x31bf1f['verbose']&&(console[_0x252c75(0x193)](_0x252c75(0x121)+_0x1f5e61),_0x4ebe3b&&console['error'](_0x252c75(0x133)));const _0x5bf925=await withSpinner(_0x252c75(0x1fc),()=>_0x309f78[_0x252c75(0x252)][_0x252c75(0x1a2)](_0x1f5e61,_0x4ebe3b||![]),{'verbose':_0x31bf1f[_0x252c75(0x12c)]}),_0x291f94=_0x5bf925[_0x252c75(0x129)];return console[_0x252c75(0x193)]('✔\x20Found\x20'+_0x291f94[_0x252c75(0x1f5)]+_0x252c75(0x18a)+(_0x291f94[_0x252c75(0x1f5)]!==0x1?'s':'')),await handleSDKOutput(_0x291f94,_0x31bf1f),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']='workflow:logs';[a52_0x378e60(0x2af)]=a52_0x378e60(0x1ed);async[a52_0x378e60(0x27c)](_0xb6d0f9){const _0x4ac692=a52_0x378e60,{options:_0x18f1a5,args:_0x52d145,tdx:_0xa764fb}=_0xb6d0f9,_0xde913=_0x52d145[0x0];let _0x571c4e=_0x52d145[0x1];if(!_0xde913)return console[_0x4ac692(0x193)](_0x4ac692(0x23f)),0x1;_0x18f1a5['verbose']&&(console[_0x4ac692(0x193)](_0x4ac692(0x121)+_0xde913),_0x571c4e&&console[_0x4ac692(0x193)](_0x4ac692(0x207)+_0x571c4e));const _0x1640f5=await withSpinner(_0x4ac692(0x260),()=>_0xa764fb[_0x4ac692(0x252)]['logFiles'](_0xde913,_0x571c4e),{'verbose':_0x18f1a5[_0x4ac692(0x12c)]}),_0xe54de8=_0x1640f5[_0x4ac692(0x129)];if(_0xe54de8['length']===0x0)return console[_0x4ac692(0x193)](_0x4ac692(0x1a6)),0x0;if(!_0x571c4e&&(_0x18f1a5['json']||_0x18f1a5[_0x4ac692(0x1db)]))return await handleSDKOutput(_0xe54de8,_0x18f1a5),0x0;if(!_0x571c4e){const _0x208267=_0xe54de8[_0x4ac692(0x166)](_0x3d60c9=>({'title':_0x3d60c9[_0x4ac692(0x14f)]+'\x20('+formatBytes(_0x3d60c9[_0x4ac692(0x151)])+')','value':_0x3d60c9['taskName']})),_0x21fa3c=await a52_0x2e09b8({'type':_0x4ac692(0x1da),'name':_0x4ac692(0x122),'message':_0x4ac692(0x1fa),'choices':_0x208267});if(!_0x21fa3c[_0x4ac692(0x122)])return console['error'](_0x4ac692(0x192)),0x0;_0x571c4e=_0x21fa3c[_0x4ac692(0x122)];}const _0xbcba6c=await withSpinner(_0x4ac692(0x26b),()=>_0xa764fb[_0x4ac692(0x252)][_0x4ac692(0x209)](_0xde913,_0x571c4e),{'verbose':_0x18f1a5[_0x4ac692(0x12c)]}),_0x141688=_0xbcba6c[_0x4ac692(0x129)];return _0x141688?console[_0x4ac692(0x19d)](_0x141688):console[_0x4ac692(0x193)](_0x4ac692(0x243)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a52_0x378e60(0x160)]='workflow:kill';[a52_0x378e60(0x2af)]=a52_0x378e60(0x17f);async['execute'](_0x11b909){const _0xe9cacc=a52_0x378e60,{options:_0x349259,args:_0xb53b46,tdx:_0xcd5d04}=_0x11b909,_0x214615=_0xb53b46[0x0];if(!_0x214615)return console['error'](_0xe9cacc(0x23f)),0x1;const _0x1ba0f4=_0x349259[_0xe9cacc(0x1e1)];_0x349259[_0xe9cacc(0x12c)]&&(console[_0xe9cacc(0x193)](_0xe9cacc(0x121)+_0x214615),_0x1ba0f4&&console[_0xe9cacc(0x193)]('Reason:\x20'+_0x1ba0f4));if(!_0x349259['yes']){if(!isInteractive())return console[_0xe9cacc(0x193)](a52_0x4a9921[_0xe9cacc(0x2bc)](_0xe9cacc(0x2c5)),_0xe9cacc(0x1f4)),console[_0xe9cacc(0x193)](a52_0x4a9921[_0xe9cacc(0x283)](_0xe9cacc(0x2a0))),0x1;const _0x3f96ac=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x214615+'?');if(!_0x3f96ac)return console['error'](a52_0x4a9921[_0xe9cacc(0x15d)]('Cancelled')),0x1;}const _0x171092=await withSpinner(_0xe9cacc(0x1a5),()=>_0xcd5d04[_0xe9cacc(0x252)][_0xe9cacc(0x134)](_0x214615,_0x1ba0f4),{'verbose':_0x349259[_0xe9cacc(0x12c)]}),_0x4038d3=_0x171092['data'];return console[_0xe9cacc(0x193)]('✔\x20'+_0x4038d3),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x1d4);[a52_0x378e60(0x2af)]='Retry\x20a\x20session\x20or\x20attempt';async[a52_0x378e60(0x27c)](_0x587929){const _0x47719e=a52_0x378e60,{options:_0x1030c3,args:_0x270768,tdx:_0x3d2836}=_0x587929,_0x503e12=_0x270768[0x0];if(!_0x503e12)return console[_0x47719e(0x193)](_0x47719e(0x172)),console[_0x47719e(0x193)](_0x47719e(0x28d)),0x1;let _0xc3a3e8=![],_0x45e1b4=_0x503e12;if(_0x503e12[_0x47719e(0x21f)](_0x47719e(0x11f)))_0xc3a3e8=!![],_0x45e1b4=_0x503e12[_0x47719e(0x201)](0x8);else{if(_0x503e12[_0x47719e(0x21f)](_0x47719e(0x178)))_0xc3a3e8=![],_0x45e1b4=_0x503e12[_0x47719e(0x201)](0x8);else return console[_0x47719e(0x193)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x47719e(0x193)](_0x47719e(0x28d)),0x1;}const _0x261e8e=_0x1030c3[_0x47719e(0x2b4)],_0x3d6161=_0x1030c3[_0x47719e(0x1cf)],_0x13ddc9=_0x1030c3['params'],_0x56b34e=_0x1030c3['force'];_0x1030c3[_0x47719e(0x12c)]&&(console[_0x47719e(0x193)](_0x47719e(0x2c9)+(_0xc3a3e8?_0x47719e(0x273):_0x47719e(0x146))+'\x20'+_0x45e1b4),_0x261e8e&&console[_0x47719e(0x193)](_0x47719e(0x14e)+_0x261e8e),_0x3d6161&&console['error'](_0x47719e(0x2aa)+_0x3d6161),_0x13ddc9&&console[_0x47719e(0x193)](_0x47719e(0x20f)+_0x13ddc9),_0x56b34e&&console[_0x47719e(0x193)]('Force:\x20yes'));let _0x2838e7;if(_0x13ddc9)try{if(_0x13ddc9[_0x47719e(0x21f)]('@')){const _0x70b9e6=await import('fs/promises'),_0x41e053=_0x13ddc9[_0x47719e(0x201)](0x1),_0x4a7e08=await _0x70b9e6[_0x47719e(0x205)](_0x41e053,_0x47719e(0x1d1));_0x2838e7=JSON[_0x47719e(0x297)](_0x4a7e08);}else _0x2838e7=JSON['parse'](_0x13ddc9);}catch{return console[_0x47719e(0x193)](_0x47719e(0x21c)),0x1;}if(!_0x1030c3[_0x47719e(0x2ab)]){if(!isInteractive())return console[_0x47719e(0x193)](a52_0x4a9921[_0x47719e(0x2bc)](_0x47719e(0x2c5)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x47719e(0x193)](a52_0x4a9921[_0x47719e(0x283)](_0x47719e(0x2a0))),0x1;const _0x5c4580=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0xc3a3e8?_0x47719e(0x273):_0x47719e(0x146))+'\x20'+_0x45e1b4+'?');if(!_0x5c4580)return console['error'](a52_0x4a9921['yellow'](_0x47719e(0x192))),0x1;}let _0x3964dc;_0xc3a3e8?_0x3964dc=await withSpinner(_0x47719e(0x1b2),()=>_0x3d2836[_0x47719e(0x252)]['retrySession'](_0x45e1b4,{'fromTask':_0x261e8e,'retryParams':_0x2838e7}),{'verbose':_0x1030c3[_0x47719e(0x12c)]}):_0x3964dc=await withSpinner(_0x47719e(0x235),()=>_0x3d2836['workflow'][_0x47719e(0x1ad)](_0x45e1b4,{'resumeFrom':_0x3d6161,'retryParams':_0x2838e7,'force':_0x56b34e}),{'verbose':_0x1030c3['verbose']});const _0x42bd52=_0x3964dc['data'];return console[_0x47719e(0x193)](_0x47719e(0x17c)),console[_0x47719e(0x193)](_0x47719e(0x1aa)+_0x42bd52[_0x47719e(0x208)]),console[_0x47719e(0x193)](_0x47719e(0x21e)+_0x42bd52['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x29b);[a52_0x378e60(0x2af)]=a52_0x378e60(0x128);async[a52_0x378e60(0x27c)](_0x1f6cca){const _0x39c5cd=a52_0x378e60,{options:_0x5c068e,args:_0xa42695,tdx:_0x4d11ee}=_0x1f6cca;let _0x9875b1=_0xa42695[0x0];if(!_0x9875b1){const _0x37a7cd=this[_0x39c5cd(0x258)]([],_0x5c068e),_0x2b58db=await withSpinner(_0x39c5cd(0x184),()=>_0x4d11ee[_0x39c5cd(0x252)][_0x39c5cd(0x29d)](_0x37a7cd,{'limit':_0x5c068e[_0x39c5cd(0x2bd)]}),{'verbose':_0x5c068e[_0x39c5cd(0x12c)]}),_0x48ff10=_0x2b58db[_0x39c5cd(0x129)];if(_0x48ff10[_0x39c5cd(0x1f5)]===0x0)return console[_0x39c5cd(0x193)](_0x39c5cd(0x227)),!_0x37a7cd&&console['error'](a52_0x4a9921[_0x39c5cd(0x283)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x1d507b=_0x48ff10['map'](_0x39ee2e=>({'title':_0x39ee2e[_0x39c5cd(0x1d8)]?.[_0x39c5cd(0x160)]+'.'+_0x39ee2e['name'],'value':_0x39ee2e[_0x39c5cd(0x1d8)]?.[_0x39c5cd(0x160)]+'.'+_0x39ee2e[_0x39c5cd(0x160)],'description':_0x39ee2e[_0x39c5cd(0x1e9)]?_0x39c5cd(0x1af)+_0x39ee2e[_0x39c5cd(0x1e9)]:undefined})),_0x580e26=await a52_0x2e09b8({'type':_0x39c5cd(0x1da),'name':_0x39c5cd(0x252),'message':_0x39c5cd(0x16c),'choices':_0x1d507b});if(!_0x580e26[_0x39c5cd(0x252)])return 0x1;_0x9875b1=_0x580e26[_0x39c5cd(0x252)];}if(!_0x9875b1['includes']('.')){const _0x241056=this[_0x39c5cd(0x258)]([],_0x5c068e);if(_0x241056)_0x9875b1=_0x241056+'.'+_0x9875b1;else return console[_0x39c5cd(0x193)](a52_0x4a9921[_0x39c5cd(0x2bc)](_0x39c5cd(0x25c)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x39c5cd(0x193)](a52_0x4a9921[_0x39c5cd(0x283)](_0x39c5cd(0x1c3))),0x1;}const _0x45c385=_0x5c068e[_0x39c5cd(0x2a3)],_0x4b8033=_0x5c068e['sessionTime'],_0x99430={};if(_0x45c385&&Array['isArray'](_0x45c385))for(const _0xf2a474 of _0x45c385){const _0x1d1830=_0xf2a474[_0x39c5cd(0x1c1)]('=');if(_0x1d1830===-0x1)return console[_0x39c5cd(0x193)](_0x39c5cd(0x261)+_0xf2a474),console[_0x39c5cd(0x193)](_0x39c5cd(0x23a)),0x1;const _0x3385fe=_0xf2a474['substring'](0x0,_0x1d1830),_0xcae021=_0xf2a474[_0x39c5cd(0x201)](_0x1d1830+0x1);try{_0x99430[_0x3385fe]=JSON['parse'](_0xcae021);}catch{_0x99430[_0x3385fe]=_0xcae021;}}_0x5c068e[_0x39c5cd(0x12c)]&&(console[_0x39c5cd(0x193)]('Workflow:\x20'+_0x9875b1),Object[_0x39c5cd(0x218)](_0x99430)[_0x39c5cd(0x1f5)]>0x0&&console[_0x39c5cd(0x193)](_0x39c5cd(0x137)+JSON['stringify'](_0x99430)),_0x4b8033&&console[_0x39c5cd(0x193)](_0x39c5cd(0x15b)+_0x4b8033));const _0x210fcb=await withSpinner(_0x39c5cd(0x14a),()=>_0x4d11ee[_0x39c5cd(0x252)][_0x39c5cd(0x2bf)](_0x9875b1,_0x99430,{'sessionTime':_0x4b8033}),{'verbose':_0x5c068e[_0x39c5cd(0x12c)]}),_0x446325=_0x210fcb[_0x39c5cd(0x129)];console[_0x39c5cd(0x193)](_0x39c5cd(0x194)),console[_0x39c5cd(0x193)](_0x39c5cd(0x1e6)+_0x446325['id']),console[_0x39c5cd(0x193)](_0x39c5cd(0x21e)+_0x446325['sessionId']),console[_0x39c5cd(0x193)](_0x39c5cd(0x1a7)+_0x446325[_0x39c5cd(0x1d8)]?.[_0x39c5cd(0x160)]),console[_0x39c5cd(0x193)](_0x39c5cd(0x1f7)+_0x446325['workflow']?.[_0x39c5cd(0x160)]);if(_0x446325[_0x39c5cd(0x1d8)]?.['id']&&_0x446325[_0x39c5cd(0x1d9)]&&_0x446325['id']){const _0x233e9b=_0x5c068e[_0x39c5cd(0x179)],_0x145f37=getConsoleUrl(_0x233e9b,_0x39c5cd(0x14b)+_0x446325[_0x39c5cd(0x1d8)]['id']+'/sessions/'+_0x446325[_0x39c5cd(0x1d9)]+'/attempt/'+_0x446325['id']);console[_0x39c5cd(0x193)]('\x20\x20Console:\x20'+a52_0x4a9921[_0x39c5cd(0x271)](_0x145f37));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x2b6);[a52_0x378e60(0x2af)]=a52_0x378e60(0x272);async['execute'](_0x2ba930){const _0x9687dd=a52_0x378e60,{options:_0x32cbbc,args:_0xb0565d,tdx:_0x1d973f}=_0x2ba930,_0x46e621=_0xb0565d[0x0],_0x457a98=_0xb0565d[0x1]||'.';if(!_0x46e621)return console[_0x9687dd(0x193)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x9687dd(0x193)](_0x9687dd(0x2c3)),0x1;const _0x3df7ef=_0x32cbbc[_0x9687dd(0x1e9)];_0x32cbbc[_0x9687dd(0x12c)]&&(console[_0x9687dd(0x193)](_0x9687dd(0x1b9)+_0x46e621),console['error'](_0x9687dd(0x215)+_0x457a98),_0x3df7ef&&console[_0x9687dd(0x193)]('Revision:\x20'+_0x3df7ef));const _0x2bba10=await withSpinner(_0x9687dd(0x1f8)+_0x46e621+_0x9687dd(0x23e),()=>_0x1d973f[_0x9687dd(0x252)][_0x9687dd(0x1c5)](_0x46e621,_0x457a98,{'revision':_0x3df7ef}),{'verbose':_0x32cbbc[_0x9687dd(0x12c)]}),_0x39c05a=_0x2bba10['data'];return console[_0x9687dd(0x193)](_0x9687dd(0x1ee)+_0x39c05a[_0x9687dd(0x173)]),console[_0x9687dd(0x193)]('\x20\x20Revision:\x20'+_0x39c05a[_0x9687dd(0x1e9)]),console[_0x9687dd(0x193)]('\x20\x20Files\x20extracted:\x20'+_0x39c05a[_0x9687dd(0x296)]),console['error'](_0x9687dd(0x222)+_0x457a98+'/'+_0x39c05a['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a52_0x378e60(0x198);[a52_0x378e60(0x2af)]=a52_0x378e60(0x19c);async[a52_0x378e60(0x27c)](_0x4ea196){const _0x471882=a52_0x378e60,{options:_0x220b96,args:_0xe7da3c,tdx:_0x27b82a}=_0x4ea196;let _0x597c62='.',_0x167cd7=_0x220b96[_0x471882(0x160)];if(_0xe7da3c[0x0]){const {promises:_0x6cef76}=await import('fs');try{const _0x1fa5d0=await _0x6cef76['stat'](_0xe7da3c[0x0]);if(_0x1fa5d0[_0x471882(0x176)]())_0x597c62=_0xe7da3c[0x0];else return console[_0x471882(0x193)]('Error:\x20'+_0xe7da3c[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x167cd7=_0xe7da3c[0x0],_0x597c62='.';}}const _0x1aee5b=_0x220b96[_0x471882(0x1e9)],_0x215dab=_0x220b96[_0x471882(0x2a5)];_0x220b96['verbose']&&(console[_0x471882(0x193)]('Project\x20directory:\x20'+_0x597c62),_0x167cd7&&console['error'](_0x471882(0x17e)+_0x167cd7),_0x1aee5b&&console[_0x471882(0x193)](_0x471882(0x232)+_0x1aee5b),_0x215dab&&console[_0x471882(0x193)]('Validation:\x20skipped'));const _0x3b2eb7=await withSpinner(_0x471882(0x1a4),()=>_0x27b82a[_0x471882(0x252)][_0x471882(0x247)](_0x597c62,{'projectName':_0x167cd7,'revision':_0x1aee5b,'skipValidation':_0x215dab}),{'verbose':_0x220b96[_0x471882(0x12c)]}),_0x3afaef=_0x3b2eb7[_0x471882(0x129)];return console[_0x471882(0x193)]('✔\x20Pushed\x20'+_0x3afaef[_0x471882(0x173)]),console[_0x471882(0x193)]('\x20\x20Project\x20ID:\x20'+_0x3afaef[_0x471882(0x1e4)]),console[_0x471882(0x193)]('\x20\x20Revision:\x20'+_0x3afaef[_0x471882(0x1e9)]),await this[_0x471882(0x1b1)](_0x27b82a,_0x3afaef['projectName'],_0x220b96[_0x471882(0x179)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x138);[a52_0x378e60(0x2af)]=a52_0x378e60(0x169);async[a52_0x378e60(0x27c)](_0xab40a6){const _0x4df2f2=a52_0x378e60,{options:_0x55f2f2,args:_0x21b12d,tdx:_0x5ba625}=_0xab40a6,_0x3c1740=_0x21b12d[0x0],_0x5c844e=_0x21b12d[0x1];if(!_0x3c1740)return console['error'](a52_0x4a9921[_0x4df2f2(0x2bc)](_0x4df2f2(0x25c)),_0x4df2f2(0x175)),console[_0x4df2f2(0x193)](a52_0x4a9921[_0x4df2f2(0x283)](_0x4df2f2(0x294))),0x1;const _0x52bfa5=_0x55f2f2[_0x4df2f2(0x1e9)];_0x55f2f2[_0x4df2f2(0x12c)]&&(console[_0x4df2f2(0x193)](_0x4df2f2(0x1b9)+_0x3c1740),_0x5c844e&&console[_0x4df2f2(0x193)]('Target\x20directory:\x20'+_0x5c844e),_0x52bfa5&&console['error']('Revision:\x20'+_0x52bfa5),_0x55f2f2[_0x4df2f2(0x127)]&&console[_0x4df2f2(0x193)](_0x4df2f2(0x2ca)));const _0x16d3dd=await withSpinner('Pulling\x20project\x20'+_0x3c1740+_0x4df2f2(0x23e),()=>_0x5ba625['workflow'][_0x4df2f2(0x18c)](_0x3c1740,{'targetDir':_0x5c844e,'revision':_0x52bfa5}),{'verbose':_0x55f2f2[_0x4df2f2(0x12c)]}),_0x3d9a8c=_0x16d3dd['data'];_0x3d9a8c[_0x4df2f2(0x279)]?console[_0x4df2f2(0x193)](_0x4df2f2(0x191)+_0x3d9a8c[_0x4df2f2(0x173)]):console[_0x4df2f2(0x193)]('→\x20Project:\x20'+_0x3d9a8c[_0x4df2f2(0x173)]);console[_0x4df2f2(0x193)]('\x20\x20Revision:\x20'+_0x3d9a8c[_0x4df2f2(0x1e9)]),console['error'](_0x4df2f2(0x1cc)+(a52_0x5594c9[_0x4df2f2(0x2b7)](process[_0x4df2f2(0x1bc)](),_0x3d9a8c[_0x4df2f2(0x298)])||'.')),console['error'](_0x4df2f2(0x292)+a52_0x4a9921[_0x4df2f2(0x214)]('+'+_0x3d9a8c[_0x4df2f2(0x153)][_0x4df2f2(0x1c7)]+_0x4df2f2(0x199))+',\x20'+(a52_0x4a9921[_0x4df2f2(0x15d)]('~'+_0x3d9a8c[_0x4df2f2(0x153)][_0x4df2f2(0x2b3)]+_0x4df2f2(0x216))+',\x20')+(a52_0x4a9921[_0x4df2f2(0x2bc)]('-'+_0x3d9a8c['summary'][_0x4df2f2(0x22f)]+_0x4df2f2(0x157))+',\x20')+(''+a52_0x4a9921[_0x4df2f2(0x283)](_0x3d9a8c['summary'][_0x4df2f2(0x2b5)]+_0x4df2f2(0x1c0))));for(const _0x40466a of _0x3d9a8c[_0x4df2f2(0x12b)]){_0x40466a[_0x4df2f2(0x2a4)]===_0x4df2f2(0x2b3)&&_0x40466a[_0x4df2f2(0x285)]&&(console[_0x4df2f2(0x193)]('\x0a'+a52_0x4a9921['cyan'](_0x4df2f2(0x234)+_0x40466a['path'])),console['error'](_0x40466a[_0x4df2f2(0x285)]));}if(!_0x3d9a8c[_0x4df2f2(0x145)])return saveSessionContext({'workflow_project':_0x3d9a8c[_0x4df2f2(0x173)]},_0x55f2f2[_0x4df2f2(0x273)]),console[_0x4df2f2(0x193)](a52_0x4a9921[_0x4df2f2(0x214)](_0x4df2f2(0x15c))),console[_0x4df2f2(0x193)](a52_0x4a9921[_0x4df2f2(0x283)](_0x4df2f2(0x189)+_0x3d9a8c['projectName'])),0x0;if(_0x55f2f2[_0x4df2f2(0x127)])return console['error'](a52_0x4a9921[_0x4df2f2(0x15d)](_0x4df2f2(0x2c7))),0x0;if(!_0x55f2f2['yes']){if(!isInteractive())return console[_0x4df2f2(0x193)](a52_0x4a9921[_0x4df2f2(0x2bc)](_0x4df2f2(0x2c5)),_0x4df2f2(0x1f4)),console['error'](a52_0x4a9921['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x457284=await confirmKey(_0x4df2f2(0x281));if(!_0x457284)return console['error'](a52_0x4a9921[_0x4df2f2(0x15d)](_0x4df2f2(0x192)),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x4df2f2(0x18e),()=>_0x5ba625['workflow'][_0x4df2f2(0x190)](_0x3d9a8c,{'revision':_0x52bfa5}),{'verbose':_0x55f2f2[_0x4df2f2(0x12c)]}),saveSessionContext({'workflow_project':_0x3d9a8c[_0x4df2f2(0x173)]},_0x55f2f2[_0x4df2f2(0x273)]),console[_0x4df2f2(0x193)](a52_0x4a9921['green'](_0x4df2f2(0x22b)));const _0x4b7505=a52_0x5594c9[_0x4df2f2(0x2b7)](process['cwd'](),_0x3d9a8c[_0x4df2f2(0x298)])||'.';return console[_0x4df2f2(0x193)](a52_0x4a9921[_0x4df2f2(0x283)]('\x20\x20Location:\x20'+_0x4b7505)),console[_0x4df2f2(0x193)](a52_0x4a9921[_0x4df2f2(0x283)](_0x4df2f2(0x189)+_0x3d9a8c[_0x4df2f2(0x173)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x16b);[a52_0x378e60(0x2af)]=a52_0x378e60(0x20e);async['execute'](_0x1224b4){const _0x23e31b=a52_0x378e60,{options:_0x243c02,args:_0x19ff59,tdx:_0x51da53}=_0x1224b4,_0x4fee0e=this['resolveProjectDir'](_0x19ff59,_0x243c02),_0x1d6e4c=_0x243c02['revision'],_0x545dd3=_0x243c02[_0x23e31b(0x2a5)];_0x243c02['verbose']&&(_0x4fee0e&&console['error']('Source\x20directory:\x20'+_0x4fee0e),_0x1d6e4c&&console[_0x23e31b(0x193)](_0x23e31b(0x232)+_0x1d6e4c),_0x243c02['dryRun']&&console[_0x23e31b(0x193)]('Dry\x20run:\x20yes'),_0x545dd3&&console[_0x23e31b(0x193)](_0x23e31b(0x162)));let _0x1c468f;try{_0x1c468f=await withSpinner(_0x23e31b(0x299),()=>_0x51da53[_0x23e31b(0x252)][_0x23e31b(0x29c)]({'sourceDir':_0x4fee0e,'revision':_0x1d6e4c,'skipValidation':_0x545dd3}),{'verbose':_0x243c02[_0x23e31b(0x12c)]});}catch(_0x256a6f){if(_0x256a6f instanceof Error&&_0x256a6f[_0x23e31b(0x256)][_0x23e31b(0x181)](_0x23e31b(0x240)))return console['error'](a52_0x4a9921['red'](_0x23e31b(0x25c)),_0x23e31b(0x280)),_0x243c02[_0x23e31b(0x1b8)]?console[_0x23e31b(0x193)](a52_0x4a9921[_0x23e31b(0x283)](_0x23e31b(0x149)+_0x243c02[_0x23e31b(0x1b8)]+_0x23e31b(0x136)+_0x243c02['workflowProject']+'\x27')):console[_0x23e31b(0x193)](a52_0x4a9921[_0x23e31b(0x283)](_0x23e31b(0x28b))),0x1;throw _0x256a6f;}const _0x38f1a0=_0x1c468f[_0x23e31b(0x129)];console['error'](_0x23e31b(0x154)+_0x38f1a0['projectName']),console[_0x23e31b(0x193)](_0x23e31b(0x263)+_0x38f1a0['sourceDir']),console[_0x23e31b(0x193)](_0x23e31b(0x1dc)+_0x38f1a0[_0x23e31b(0x1e9)]),console[_0x23e31b(0x193)](_0x23e31b(0x292)+a52_0x4a9921['green']('+'+_0x38f1a0[_0x23e31b(0x153)][_0x23e31b(0x1c7)]+'\x20new')+',\x20'+(a52_0x4a9921['yellow']('~'+_0x38f1a0[_0x23e31b(0x153)][_0x23e31b(0x2b3)]+_0x23e31b(0x216))+',\x20')+(a52_0x4a9921[_0x23e31b(0x2bc)]('-'+_0x38f1a0['summary'][_0x23e31b(0x22f)]+_0x23e31b(0x157))+',\x20')+(''+a52_0x4a9921['dim'](_0x38f1a0[_0x23e31b(0x153)][_0x23e31b(0x2b5)]+_0x23e31b(0x1c0))));for(const _0x40989b of _0x38f1a0[_0x23e31b(0x12b)]){_0x40989b[_0x23e31b(0x2a4)]===_0x23e31b(0x2b3)&&_0x40989b[_0x23e31b(0x285)]&&(console[_0x23e31b(0x193)]('\x0a'+a52_0x4a9921[_0x23e31b(0x271)]('---\x20'+_0x40989b['path'])),console[_0x23e31b(0x193)](_0x40989b['diff']));}if(!_0x38f1a0[_0x23e31b(0x145)])return console[_0x23e31b(0x193)](a52_0x4a9921[_0x23e31b(0x214)](_0x23e31b(0x28a))),await this[_0x23e31b(0x1b1)](_0x51da53,_0x38f1a0[_0x23e31b(0x173)],_0x243c02[_0x23e31b(0x179)]),0x0;if(_0x243c02[_0x23e31b(0x127)])return console[_0x23e31b(0x193)](a52_0x4a9921['yellow'](_0x23e31b(0x24c))),0x0;if(!_0x243c02['yes']){if(!isInteractive())return console[_0x23e31b(0x193)](a52_0x4a9921[_0x23e31b(0x2bc)](_0x23e31b(0x2c5)),_0x23e31b(0x1f4)),console[_0x23e31b(0x193)](a52_0x4a9921[_0x23e31b(0x283)](_0x23e31b(0x2a0))),0x1;const _0x1797ea=await confirmKey(_0x23e31b(0x1ca));if(!_0x1797ea)return console[_0x23e31b(0x193)](a52_0x4a9921[_0x23e31b(0x15d)](_0x23e31b(0x192)),_0x23e31b(0x13d)),0x1;}const _0x36db73=await withSpinner(_0x23e31b(0x288),()=>_0x51da53[_0x23e31b(0x252)][_0x23e31b(0x186)](_0x38f1a0),{'verbose':_0x243c02[_0x23e31b(0x12c)]}),_0x100ae1=_0x36db73[_0x23e31b(0x129)];return console[_0x23e31b(0x193)](a52_0x4a9921['green'](_0x23e31b(0x28e))),console['error'](_0x23e31b(0x1ef)+_0x100ae1[_0x23e31b(0x1e4)]),console[_0x23e31b(0x193)]('\x20\x20Revision:\x20'+_0x100ae1['revision']),await this[_0x23e31b(0x1b1)](_0x51da53,_0x100ae1[_0x23e31b(0x173)],_0x243c02['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x185);['description']=a52_0x378e60(0x1a1);async[a52_0x378e60(0x27c)](_0x1343d0){const _0x31f8cf=a52_0x378e60,{options:_0x8b61eb,args:_0x2077c0,tdx:_0x3922d3}=_0x1343d0,_0x221f0a=this['resolveProjectDir'](_0x2077c0,_0x8b61eb),_0x44585d=_0x8b61eb[_0x31f8cf(0x160)],_0x1dfc40=_0x8b61eb[_0x31f8cf(0x1e9)],_0x35f3fb=_0x8b61eb[_0x31f8cf(0x2a5)];if(!_0x221f0a)return console[_0x31f8cf(0x193)](a52_0x4a9921[_0x31f8cf(0x2bc)](_0x31f8cf(0x25c)),'Source\x20directory\x20is\x20required'),console[_0x31f8cf(0x193)](a52_0x4a9921[_0x31f8cf(0x283)](_0x31f8cf(0x1a9))),console['error'](a52_0x4a9921[_0x31f8cf(0x283)](_0x31f8cf(0x21b))),0x1;if(!_0x44585d)return console[_0x31f8cf(0x193)](a52_0x4a9921[_0x31f8cf(0x2bc)](_0x31f8cf(0x25c)),_0x31f8cf(0x1b3)),console[_0x31f8cf(0x193)](a52_0x4a9921['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x8b61eb['verbose']&&(console[_0x31f8cf(0x193)](_0x31f8cf(0x270)+_0x221f0a),console[_0x31f8cf(0x193)](_0x31f8cf(0x16d)+_0x44585d),_0x1dfc40&&console[_0x31f8cf(0x193)](_0x31f8cf(0x232)+_0x1dfc40),_0x8b61eb[_0x31f8cf(0x127)]&&console[_0x31f8cf(0x193)]('Dry\x20run:\x20yes'),_0x35f3fb&&console[_0x31f8cf(0x193)](_0x31f8cf(0x162)));const _0x28542e=await withSpinner(_0x31f8cf(0x289),()=>_0x3922d3[_0x31f8cf(0x252)][_0x31f8cf(0x278)](_0x221f0a,_0x44585d,{'revision':_0x1dfc40,'skipValidation':_0x35f3fb}),{'verbose':_0x8b61eb[_0x31f8cf(0x12c)]}),_0x25b024=_0x28542e[_0x31f8cf(0x129)];console[_0x31f8cf(0x193)]('Source:\x20'+_0x25b024['sourceDir']);_0x25b024['sourceProjectName']&&console[_0x31f8cf(0x193)]('Source\x20project:\x20'+_0x25b024[_0x31f8cf(0x229)]);console[_0x31f8cf(0x193)](_0x31f8cf(0x16d)+_0x25b024[_0x31f8cf(0x1df)]),console[_0x31f8cf(0x193)]('Revision:\x20'+_0x25b024[_0x31f8cf(0x1e9)]),console[_0x31f8cf(0x193)](_0x31f8cf(0x25d)+_0x25b024[_0x31f8cf(0x11d)]);_0x25b024[_0x31f8cf(0x2a2)]&&(console['error'](a52_0x4a9921[_0x31f8cf(0x15d)](_0x31f8cf(0x219)+_0x25b024[_0x31f8cf(0x1df)]+_0x31f8cf(0x277)+_0x25b024['existingProjectId']+')')),console[_0x31f8cf(0x193)](a52_0x4a9921[_0x31f8cf(0x15d)](_0x31f8cf(0x15f))));if(_0x8b61eb['dryRun'])return console[_0x31f8cf(0x193)](a52_0x4a9921[_0x31f8cf(0x15d)](_0x31f8cf(0x210))),0x0;if(!_0x8b61eb[_0x31f8cf(0x2ab)]){if(!isInteractive())return console[_0x31f8cf(0x193)](a52_0x4a9921['red'](_0x31f8cf(0x2c5)),_0x31f8cf(0x1f4)),console['error'](a52_0x4a9921[_0x31f8cf(0x283)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x528d2e=_0x25b024['sourceProjectName']||a52_0x5594c9['basename'](_0x221f0a),_0x252d71=_0x25b024[_0x31f8cf(0x2a2)]?_0x31f8cf(0x1c9)+_0x44585d+_0x31f8cf(0x291):'\x0aClone\x20\x22'+_0x528d2e+'\x22\x20to\x20new\x20project\x20\x22'+_0x44585d+'\x22?',_0x3cb024=await confirmKey(_0x252d71);if(!_0x3cb024)return console[_0x31f8cf(0x193)](a52_0x4a9921[_0x31f8cf(0x15d)](_0x31f8cf(0x192))),0x1;}const _0x2bbc19=await withSpinner(_0x25b024[_0x31f8cf(0x2a2)]?_0x31f8cf(0x254)+_0x44585d+'...':_0x31f8cf(0x2c0)+_0x44585d+_0x31f8cf(0x23e),()=>_0x3922d3['workflow']['executeCloneProject'](_0x25b024),{'verbose':_0x8b61eb[_0x31f8cf(0x12c)]}),_0x5bd1b1=_0x2bbc19[_0x31f8cf(0x129)];return console[_0x31f8cf(0x193)](a52_0x4a9921[_0x31f8cf(0x214)](_0x25b024[_0x31f8cf(0x2a2)]?'✔\x20Project\x20updated':_0x31f8cf(0x26a))),console['error']('\x20\x20Project:\x20'+_0x5bd1b1['newProjectName']),console[_0x31f8cf(0x193)]('\x20\x20Project\x20ID:\x20'+_0x5bd1b1[_0x31f8cf(0x12e)]),console[_0x31f8cf(0x193)](_0x31f8cf(0x1dc)+_0x5bd1b1['revision']),await this[_0x31f8cf(0x1b1)](_0x3922d3,_0x5bd1b1[_0x31f8cf(0x1df)],_0x8b61eb[_0x31f8cf(0x179)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x282);[a52_0x378e60(0x2af)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x46cd4e){const _0x160a80=a52_0x378e60,{options:_0x478970,args:_0x3b2b36,tdx:_0x364caf}=_0x46cd4e,_0x3206a6=_0x3b2b36[0x0];if(!_0x3206a6)return console['error'](_0x160a80(0x188)),console[_0x160a80(0x193)](_0x160a80(0x1c8)),0x1;_0x478970['verbose']&&console[_0x160a80(0x193)](_0x160a80(0x1b9)+_0x3206a6);if(!_0x478970[_0x160a80(0x2ab)]){if(!isInteractive())return console[_0x160a80(0x193)](a52_0x4a9921[_0x160a80(0x2bc)](_0x160a80(0x2c5)),_0x160a80(0x1f4)),console[_0x160a80(0x193)](a52_0x4a9921['dim'](_0x160a80(0x2a0))),0x1;const _0x5e1fcd=await confirmKey(_0x160a80(0x1e5)+_0x3206a6+_0x160a80(0x233));if(!_0x5e1fcd)return console[_0x160a80(0x193)](a52_0x4a9921['yellow']('Cancelled')),0x1;}const _0x3a1688=await withSpinner('Deleting\x20project\x20'+_0x3206a6+'...',()=>_0x364caf['workflow'][_0x160a80(0x245)](_0x3206a6),{'verbose':_0x478970[_0x160a80(0x12c)]}),_0x2b1293=_0x3a1688[_0x160a80(0x129)];return console[_0x160a80(0x193)](_0x160a80(0x1ab)+_0x2b1293['projectName']),console['error'](_0x160a80(0x1ef)+_0x2b1293[_0x160a80(0x1e4)]),0x0;}}export function parseKeyValue(_0x58927b){const _0x2fa5ca=a52_0x378e60,_0x3d4649=_0x58927b[_0x2fa5ca(0x1c1)]('=');if(_0x3d4649===-0x1)throw new Error('Invalid\x20format:\x20'+_0x58927b+_0x2fa5ca(0x2a9));const _0x21e399=_0x58927b[_0x2fa5ca(0x201)](0x0,_0x3d4649),_0x1585ae=_0x58927b[_0x2fa5ca(0x201)](_0x3d4649+0x1);if(!_0x21e399)throw new Error(_0x2fa5ca(0x24b));return{'key':_0x21e399,'value':_0x1585ae};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x1d6);[a52_0x378e60(0x2af)]=a52_0x378e60(0x2a6);async[a52_0x378e60(0x27c)](_0x261089){const _0x24b421=a52_0x378e60,{options:_0x500186,args:_0x37f9d3,tdx:_0x5c56e3}=_0x261089,_0x1adcac=this[_0x24b421(0x29a)](_0x37f9d3,_0x500186);if(!_0x1adcac)return 0x1;_0x500186['verbose']&&console[_0x24b421(0x193)]('Project:\x20'+_0x1adcac);const _0x18b81f=await withSpinner('Listing\x20secrets...',()=>_0x5c56e3['workflow']['listSecrets'](_0x1adcac),{'verbose':_0x500186[_0x24b421(0x12c)]}),{secrets:_0x238403}=_0x18b81f[_0x24b421(0x129)];return console['error'](_0x24b421(0x177)+_0x238403[_0x24b421(0x1f5)]+_0x24b421(0x268)+(_0x238403[_0x24b421(0x1f5)]!==0x1?'s':'')),await handleSDKOutput(_0x238403,_0x500186),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a52_0x378e60(0x239);[a52_0x378e60(0x2af)]=a52_0x378e60(0x1a8);async[a52_0x378e60(0x27c)](_0x58179b){const _0x38763f=a52_0x378e60,{options:_0x1dcc56,args:_0x1b4c86,tdx:_0x5ee32c}=_0x58179b;let _0x2c3a79,_0x555473;if(_0x1b4c86[_0x38763f(0x1f5)]>=0x1&&!_0x1b4c86[0x0][_0x38763f(0x181)]('='))_0x2c3a79=_0x1b4c86[0x0],_0x555473=_0x1b4c86[_0x38763f(0x142)](0x1);else{if(_0x1b4c86[_0x38763f(0x1f5)]>=0x1&&_0x1dcc56[_0x38763f(0x1b8)])_0x2c3a79=_0x1dcc56[_0x38763f(0x1b8)],_0x555473=_0x1b4c86;else return _0x1b4c86[_0x38763f(0x1f5)]>=0x1?(console[_0x38763f(0x193)](_0x38763f(0x257)),console[_0x38763f(0x193)](_0x38763f(0x1c3)),0x1):(console[_0x38763f(0x193)](_0x38763f(0x16a)),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x555473['length']===0x0)return console[_0x38763f(0x193)](_0x38763f(0x16a)),console['error'](_0x38763f(0x236)),0x1;const _0x414d80={};try{for(const _0x2ad696 of _0x555473){const {key:_0x2c6b7f,value:_0x65e470}=parseKeyValue(_0x2ad696);_0x414d80[_0x2c6b7f]=_0x65e470;}}catch(_0x449859){return _0x449859 instanceof Error&&console['error'](a52_0x4a9921[_0x38763f(0x2bc)](_0x38763f(0x25c)),_0x449859[_0x38763f(0x256)]),0x1;}const _0xb0a440=Object['keys'](_0x414d80);_0x1dcc56[_0x38763f(0x12c)]&&(console[_0x38763f(0x193)]('Project:\x20'+_0x2c3a79),console[_0x38763f(0x193)](_0x38763f(0x150)+_0xb0a440[_0x38763f(0x123)](',\x20')));const _0x1656e0=await withSpinner(_0xb0a440['length']===0x1?_0x38763f(0x25e):_0x38763f(0x2cc)+_0xb0a440[_0x38763f(0x1f5)]+_0x38763f(0x13b),()=>_0x5ee32c['workflow'][_0x38763f(0x2b2)](_0x2c3a79,_0x414d80),{'verbose':_0x1dcc56[_0x38763f(0x12c)]}),_0x278e65=_0x1656e0[_0x38763f(0x129)];return console[_0x38763f(0x193)](_0xb0a440[_0x38763f(0x1f5)]===0x1?'✔\x20Secret\x20\x27'+_0x278e65['keys'][0x0]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x278e65[_0x38763f(0x173)]+'\x27':'✔\x20'+_0x278e65[_0x38763f(0x218)][_0x38763f(0x1f5)]+_0x38763f(0x2c6)+_0x278e65['projectName']+'\x27'),(_0x1dcc56[_0x38763f(0x286)]||_0x1dcc56[_0x38763f(0x2a7)])&&await handleSingleObjectOutput(_0x278e65,_0x1dcc56),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a52_0x378e60(0x160)]=a52_0x378e60(0x182);[a52_0x378e60(0x2af)]=a52_0x378e60(0x284);async[a52_0x378e60(0x27c)](_0x3eded7){const _0x38f68b=a52_0x378e60,{options:_0x321b26,args:_0x385e38,tdx:_0x3e5403}=_0x3eded7;let _0x4159b6,_0x4b8c6f;if(_0x385e38[_0x38f68b(0x1f5)]>=0x2)_0x4159b6=_0x385e38[0x0],_0x4b8c6f=_0x385e38[0x1];else{if(_0x385e38[_0x38f68b(0x1f5)]===0x1&&_0x321b26[_0x38f68b(0x1b8)])_0x4159b6=_0x321b26[_0x38f68b(0x1b8)],_0x4b8c6f=_0x385e38[0x0];else return _0x385e38[_0x38f68b(0x1f5)]===0x1?(console['error']('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x38f68b(0x1c3)),0x1):(console[_0x38f68b(0x193)](_0x38f68b(0x1be)),console[_0x38f68b(0x193)](_0x38f68b(0x2b8)),0x1);}_0x321b26[_0x38f68b(0x12c)]&&(console[_0x38f68b(0x193)](_0x38f68b(0x1b9)+_0x4159b6),console['error'](_0x38f68b(0x203)+_0x4b8c6f));if(!_0x321b26['yes']){if(!isInteractive())return console[_0x38f68b(0x193)](a52_0x4a9921[_0x38f68b(0x2bc)]('\x0aError:'),_0x38f68b(0x1f4)),console['error'](a52_0x4a9921['dim'](_0x38f68b(0x2a0))),0x1;const _0x44fc38=await confirmKey(_0x38f68b(0x2b1)+_0x4b8c6f+_0x38f68b(0x2ac)+_0x4159b6+'\x27?');if(!_0x44fc38)return console[_0x38f68b(0x193)](a52_0x4a9921[_0x38f68b(0x15d)](_0x38f68b(0x192))),0x1;}const _0x250067=await withSpinner(_0x38f68b(0x2cb),()=>_0x3e5403[_0x38f68b(0x252)][_0x38f68b(0x1d0)](_0x4159b6,_0x4b8c6f),{'verbose':_0x321b26[_0x38f68b(0x12c)]}),_0x3a6924=_0x250067[_0x38f68b(0x129)];return console[_0x38f68b(0x193)](_0x38f68b(0x1e7)+_0x3a6924[_0x38f68b(0x202)]+_0x38f68b(0x242)+_0x3a6924['projectName']+'\x27'),(_0x321b26[_0x38f68b(0x286)]||_0x321b26[_0x38f68b(0x2a7)])&&await handleSingleObjectOutput(_0x3a6924,_0x321b26),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x1f4956){const _0x4de3bd=a52_0x378e60,_0x2e1386=Math[_0x4de3bd(0x204)](_0x1f4956/0x3e8),_0x2391f5=Math[_0x4de3bd(0x204)](_0x2e1386/0x3c),_0x45fbec=Math[_0x4de3bd(0x204)](_0x2391f5/0x3c),_0x1f46fa=Math['floor'](_0x45fbec/0x18);if(_0x1f46fa>0x0){const _0x48204f=_0x45fbec%0x18;return _0x48204f>0x0?_0x1f46fa+'d\x20'+_0x48204f+'h':_0x1f46fa+'d';}else{if(_0x45fbec>0x0){const _0x3677c2=_0x2391f5%0x3c;return _0x3677c2>0x0?_0x45fbec+'h\x20'+_0x3677c2+'m':_0x45fbec+'h';}else{if(_0x2391f5>0x0){const _0x541980=_0x2e1386%0x3c;return _0x541980>0x0?_0x2391f5+'m\x20'+_0x541980+'s':_0x2391f5+'m';}else return _0x2e1386+'s';}}}function formatTimestamp(_0x415f2b,_0x4f2b44){const _0x6c3c1f=a52_0x378e60,_0x40b6e4=new Date(_0x415f2b),_0x2a3c1e=String(_0x40b6e4['getHours']())[_0x6c3c1f(0x19e)](0x2,'0'),_0x5d02d3=String(_0x40b6e4['getMinutes']())[_0x6c3c1f(0x19e)](0x2,'0'),_0x1d9ae9=_0x2a3c1e+':'+_0x5d02d3,_0x32ee15=_0x40b6e4['getFullYear']()===_0x4f2b44[_0x6c3c1f(0x1f2)]()&&_0x40b6e4['getMonth']()===_0x4f2b44[_0x6c3c1f(0x1bf)]()&&_0x40b6e4[_0x6c3c1f(0x124)]()===_0x4f2b44['getDate']();if(_0x32ee15)return _0x1d9ae9;else{const _0x7a0f44=String(_0x40b6e4[_0x6c3c1f(0x1bf)]()+0x1)[_0x6c3c1f(0x19e)](0x2,'0'),_0x19e740=String(_0x40b6e4[_0x6c3c1f(0x124)]())['padStart'](0x2,'0');return _0x7a0f44+'-'+_0x19e740+'\x20'+_0x1d9ae9;}}function a52_0x4922(_0x99fb2d,_0x43fafe){_0x99fb2d=_0x99fb2d-0x119;const _0x2e6418=a52_0x2e64();let _0x4922bb=_0x2e6418[_0x99fb2d];return _0x4922bb;}function formatDate(_0x5af4b0){const _0xce8587=a52_0x378e60,_0x248e81=_0x5af4b0[_0xce8587(0x1f2)](),_0x2422fc=String(_0x5af4b0['getMonth']()+0x1)[_0xce8587(0x19e)](0x2,'0'),_0x334e4a=String(_0x5af4b0[_0xce8587(0x124)]())[_0xce8587(0x19e)](0x2,'0');return _0x248e81+'-'+_0x2422fc+'-'+_0x334e4a;}function getTaskStateIcon(_0x48e6fb){const _0x14cda8={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x14cda8[_0x48e6fb]||'⚪';}function getBarChar(_0x564e7a){const _0x3bd419=a52_0x378e60;return _0x564e7a===_0x3bd419(0x193)||_0x564e7a===_0x3bd419(0x1de)?'×':'─';}function getBarColor(_0x43daec){const _0x331960=a52_0x378e60,_0x4ca679={'success':a52_0x4a9921['green'],'error':a52_0x4a9921[_0x331960(0x2bc)],'group_error':a52_0x4a9921[_0x331960(0x2bc)],'running':a52_0x4a9921[_0x331960(0x26f)],'blocked':a52_0x4a9921['yellow'],'planned':a52_0x4a9921['dim'],'canceling':a52_0x4a9921[_0x331960(0x15d)]};return _0x4ca679[_0x43daec]||a52_0x4a9921[_0x331960(0x2a8)];}function parseTaskName(_0x1a773f){const _0x54bf85=a52_0x378e60;let _0x46bb53=_0x1a773f[_0x54bf85(0x1f3)](/^\++/,'');const _0x331dc3=_0x46bb53[_0x54bf85(0x168)]('+'),_0x341efd=_0x331dc3[_0x54bf85(0x1f5)]>0x1?_0x331dc3[_0x54bf85(0x1f5)]-0x2:0x0,_0x30b61e=_0x331dc3[_0x331dc3['length']-0x1]||_0x46bb53;return{'level':_0x341efd,'name':'+'+_0x30b61e};}function truncateTaskName(_0x5ca901,_0x283666){const _0x3770cd=a52_0x378e60,_0x509988=stringWidth(_0x5ca901);if(_0x509988<=_0x283666)return _0x5ca901;let _0x31cc55=_0x5ca901;while(stringWidth(_0x31cc55+'…')>_0x283666&&_0x31cc55['length']>0x0){_0x31cc55=_0x31cc55[_0x3770cd(0x142)](0x0,-0x1);}return _0x31cc55+'…';}function calculateTimeScale(_0x4a65e9,_0x2f2fb0){const _0x1c7c8b=a52_0x378e60;return{'startTime':_0x4a65e9[_0x1c7c8b(0x23b)],'endTime':_0x4a65e9[_0x1c7c8b(0x132)],'durationMs':_0x4a65e9[_0x1c7c8b(0x211)],'msPerChar':_0x4a65e9[_0x1c7c8b(0x211)]/_0x2f2fb0};}function timeToPosition(_0x401ca5,_0x3deaec,_0x547ad6){const _0x33b86e=a52_0x378e60,_0x1f7487=_0x401ca5-_0x3deaec['startTime'],_0x1cb3af=Math[_0x33b86e(0x204)](_0x1f7487/_0x3deaec[_0x33b86e(0x15e)]);return Math['max'](0x0,Math[_0x33b86e(0x22a)](_0x1cb3af,_0x547ad6));}function renderTimeAxis(_0x53a18e,_0x474e87){const _0x55eda2=a52_0x378e60,_0x4190ad=Math[_0x55eda2(0x22a)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math['max'](TIMELINE_CONFIG[_0x55eda2(0x2c4)],Math[_0x55eda2(0x204)](_0x474e87/TIMELINE_CONFIG[_0x55eda2(0x1ff)]))),_0x4c476e=_0x53a18e['durationMs']/(_0x4190ad-0x1),_0x339c2f=new Date(_0x53a18e[_0x55eda2(0x206)]),_0xf3b3cf=[];for(let _0x571c51=0x0;_0x571c51<_0x4190ad;_0x571c51++){const _0x15526c=_0x53a18e[_0x55eda2(0x206)]+_0x571c51*_0x4c476e,_0x333145=timeToPosition(_0x15526c,_0x53a18e,_0x474e87),_0x47aa45=formatTimestamp(_0x15526c,_0x339c2f);_0xf3b3cf[_0x55eda2(0x247)]({'pos':_0x333145,'text':_0x47aa45});}const _0x317843=new Array(_0x474e87)['fill']('\x20');let _0x4cd6f7=-0x1;for(const {pos:_0xd77ac3,text:_0x108e16}of _0xf3b3cf){let _0x40b60a=Math[_0x55eda2(0x269)](0x0,_0xd77ac3-Math[_0x55eda2(0x204)](_0x108e16[_0x55eda2(0x1f5)]/0x2));_0x40b60a<=_0x4cd6f7+TIMELINE_CONFIG[_0x55eda2(0x196)]&&(_0x40b60a=_0x4cd6f7+TIMELINE_CONFIG[_0x55eda2(0x196)]+0x1);_0x40b60a+_0x108e16[_0x55eda2(0x1f5)]>_0x474e87&&(_0x40b60a=_0x474e87-_0x108e16['length']);if(_0x40b60a>=0x0&&_0x40b60a+_0x108e16[_0x55eda2(0x1f5)]<=_0x474e87&&_0x40b60a>_0x4cd6f7){for(let _0x214072=0x0;_0x214072<_0x108e16[_0x55eda2(0x1f5)];_0x214072++){_0x317843[_0x40b60a+_0x214072]=_0x108e16[_0x214072];}_0x4cd6f7=_0x40b60a+_0x108e16[_0x55eda2(0x1f5)]-0x1;}}return _0x317843[_0x55eda2(0x123)]('');}function renderTaskRow(_0x18e22b,_0x18f0a1,_0x2c1a6a,_0x2eeb6f){const _0x4423f9=a52_0x378e60,{level:_0x3f53e3,name:_0x58b40d}=parseTaskName(_0x18e22b['name']),_0x357a30='\x20'[_0x4423f9(0x1d3)](_0x3f53e3),_0x3ba223=_0x18e22b['window']?'('+formatElapsed(_0x18e22b[_0x4423f9(0x131)][_0x4423f9(0x211)])+')':'',_0x56883c=stringWidth(_0x3ba223),_0x5e7be8=_0x3f53e3*0x1,_0x3e921e=_0x2eeb6f-_0x5e7be8-_0x56883c-0x1,_0x30376a=truncateTaskName(_0x58b40d,_0x3e921e),_0x44e4a9=_0x357a30+_0x30376a,_0x3c6b89=stringWidth(_0x44e4a9),_0x209aa9=_0x2eeb6f-_0x3c6b89-_0x56883c,_0x5eaa2f=_0x44e4a9+'\x20'[_0x4423f9(0x1d3)](Math[_0x4423f9(0x269)](0x1,_0x209aa9))+a52_0x4a9921[_0x4423f9(0x283)](_0x3ba223),_0x3cc4d8=getTaskStateIcon(_0x18e22b[_0x4423f9(0x25f)]),_0x57ad96=new Array(_0x2c1a6a)[_0x4423f9(0x18d)]('\x20');if(_0x18e22b['window']){const _0x2fcf18=timeToPosition(_0x18e22b[_0x4423f9(0x131)][_0x4423f9(0x23b)],_0x18f0a1,_0x2c1a6a),_0x831870=timeToPosition(_0x18e22b[_0x4423f9(0x131)][_0x4423f9(0x132)],_0x18f0a1,_0x2c1a6a),_0x18fb15=getBarChar(_0x18e22b[_0x4423f9(0x25f)]),_0x52e83d=Math['max'](_0x2fcf18+0x1,_0x831870);for(let _0xd1beb=_0x2fcf18;_0xd1beb<Math[_0x4423f9(0x22a)](_0x52e83d,_0x2c1a6a);_0xd1beb++){_0x57ad96[_0xd1beb]=_0x18fb15;}}const _0x195bf1=getBarColor(_0x18e22b['state']),_0x462af6=_0x57ad96[_0x4423f9(0x166)](_0x9bcf3d=>_0x9bcf3d==='\x20'?'\x20':_0x195bf1(_0x9bcf3d))[_0x4423f9(0x123)]('');return _0x3cc4d8+'\x20'+_0x5eaa2f+'│'+_0x462af6+'│';}function calculateStats(_0xb98dff){const _0x4bd1bf=a52_0x378e60,_0x4a7bc0={'total':_0xb98dff[_0x4bd1bf(0x1f5)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x42761c of _0xb98dff){if(_0x42761c['state']===_0x4bd1bf(0x2ad))_0x4a7bc0['success']++;else{if(_0x42761c[_0x4bd1bf(0x25f)]===_0x4bd1bf(0x193)||_0x42761c['state']===_0x4bd1bf(0x1de))_0x4a7bc0[_0x4bd1bf(0x193)]++;else _0x42761c[_0x4bd1bf(0x25f)]===_0x4bd1bf(0x1ae)?_0x4a7bc0[_0x4bd1bf(0x1ae)]++:_0x4a7bc0['pending']++;}}return _0x4a7bc0;}function formatStats(_0x3fbb13){const _0x1253d5=a52_0x378e60;return[_0x1253d5(0x18b)+_0x3fbb13[_0x1253d5(0x13e)],'✅\x20'+_0x3fbb13['success'],'❌\x20'+_0x3fbb13[_0x1253d5(0x193)],_0x1253d5(0x2be)+_0x3fbb13[_0x1253d5(0x1ae)],'⏳\x20'+_0x3fbb13[_0x1253d5(0x238)]][_0x1253d5(0x123)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a52_0x378e60(0x1ce);[a52_0x378e60(0x2af)]=a52_0x378e60(0x161);async[a52_0x378e60(0x27c)](_0x38babb){const _0x25af15=a52_0x378e60,{options:_0x5413ef,args:_0x449c2d,tdx:_0x96482f}=_0x38babb;let _0x5e4d94,_0x37747e,_0x2adfef=![];if(_0x449c2d[0x0]){if(_0x449c2d[0x0]['includes']('.')){const _0x3f4001=this[_0x25af15(0x1a3)](_0x449c2d,_0x5413ef);if(!_0x3f4001)return 0x1;_0x5e4d94=_0x3f4001[_0x25af15(0x173)],_0x37747e=_0x3f4001['workflowName'];}else{_0x37747e=_0x449c2d[0x0],_0x5e4d94=_0x5413ef['workflowProject'];if(!_0x5e4d94)return console[_0x25af15(0x193)](a52_0x4a9921[_0x25af15(0x2bc)](_0x25af15(0x25c)),_0x25af15(0x24e)),0x1;_0x2adfef=!![];}}else{const _0x4d5955=this[_0x25af15(0x1a3)](_0x449c2d,_0x5413ef);if(!_0x4d5955)return 0x1;_0x5e4d94=_0x4d5955[_0x25af15(0x173)],_0x37747e=_0x4d5955[_0x25af15(0x1cd)];}if(_0x5413ef[_0x25af15(0x12c)]){if(_0x5e4d94&&_0x37747e)console[_0x25af15(0x193)]('Filter:\x20'+_0x5e4d94+'.'+_0x37747e);else _0x5e4d94&&console[_0x25af15(0x193)](_0x25af15(0x29e)+_0x5e4d94);}const _0x1525ea=_0x5413ef[_0x25af15(0x208)],_0x4aecc1=_0x5413ef['sessionId'];if(_0x1525ea){_0x4aecc1&&console[_0x25af15(0x193)](a52_0x4a9921[_0x25af15(0x15d)](_0x25af15(0x155)),_0x25af15(0x250));const _0x2c94d2=_0x5413ef[_0x25af15(0x13c)];return _0x2c94d2?await this[_0x25af15(0x1c4)](_0x38babb,_0x1525ea):await this[_0x25af15(0x19b)](_0x38babb,_0x1525ea,_0x5413ef),0x0;}if(_0x4aecc1){const _0x545f09=await withSpinner(_0x25af15(0x251),()=>_0x96482f[_0x25af15(0x252)][_0x25af15(0x197)]({'projectName':_0x5e4d94,'workflowName':_0x37747e,'limit':0x64}),{'verbose':_0x5413ef[_0x25af15(0x12c)]}),_0x4f89c3=_0x545f09[_0x25af15(0x129)][_0x25af15(0x18f)](_0x3fa964=>_0x3fa964['id']===_0x4aecc1);if(!_0x4f89c3)return console['error'](a52_0x4a9921[_0x25af15(0x2bc)](_0x25af15(0x25c)),_0x25af15(0x223)+_0x4aecc1),0x1;if(!_0x4f89c3['lastAttempt']?.['id'])return console[_0x25af15(0x193)](a52_0x4a9921[_0x25af15(0x2bc)](_0x25af15(0x25c)),_0x25af15(0x237)+_0x4aecc1+_0x25af15(0x1b5)),0x1;const _0x5cc52a=_0x4f89c3[_0x25af15(0x25b)]['id'];_0x5413ef[_0x25af15(0x12c)]&&console[_0x25af15(0x193)](_0x25af15(0x12f)+_0x5cc52a+_0x25af15(0x1eb)+_0x4aecc1);const _0x23d151=_0x5413ef['follow'];return _0x23d151?await this[_0x25af15(0x1c4)](_0x38babb,_0x5cc52a):await this[_0x25af15(0x19b)](_0x38babb,_0x5cc52a,_0x5413ef),0x0;}const _0xc5e40d=await withSpinner(_0x25af15(0x230),()=>_0x96482f[_0x25af15(0x252)][_0x25af15(0x197)]({'projectName':_0x5e4d94,'workflowName':_0x37747e,'limit':_0x5413ef[_0x25af15(0x2bd)]||0x32}),{'verbose':_0x5413ef[_0x25af15(0x12c)]}),_0x3068f0=_0xc5e40d[_0x25af15(0x129)];if(_0x3068f0['length']===0x0){if(_0x5e4d94&&_0x37747e)console['error'](_0x25af15(0x20c)+_0x5e4d94+'.'+_0x37747e);else _0x5e4d94?console[_0x25af15(0x193)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x5e4d94):(console[_0x25af15(0x193)]('No\x20workflow\x20sessions\x20found'),console['error'](a52_0x4a9921[_0x25af15(0x283)](_0x25af15(0x1ea))));return 0x0;}_0x3068f0[_0x25af15(0x2b9)]((_0xfc36a9,_0x55a471)=>{const _0x3acbb9=_0x25af15,_0x364d2d=_0xfc36a9[_0x3acbb9(0x16f)]||'',_0xef4c4e=_0x55a471[_0x3acbb9(0x16f)]||'';return _0xef4c4e[_0x3acbb9(0x1f9)](_0x364d2d);});if(_0x5413ef[_0x25af15(0x286)]||_0x5413ef[_0x25af15(0x2a7)])return await handleSDKOutput(_0x3068f0,_0x5413ef),0x0;let _0x30e360;if(_0x2adfef){const _0x1d1767=_0x3068f0[0x0];if(!_0x1d1767[_0x25af15(0x25b)]?.['id'])return console['error']('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x30e360=_0x1d1767[_0x25af15(0x25b)]['id'],_0x5413ef['verbose']&&console[_0x25af15(0x193)](_0x25af15(0x148)+_0x1d1767[_0x25af15(0x16f)]);}else{const _0x1d3116=_0x3068f0[_0x25af15(0x166)](_0x3600f1=>{const _0x360515=_0x25af15,_0x366a72=getAttemptStatusDisplay(_0x3600f1[_0x360515(0x25b)]);return{'title':_0x3600f1[_0x360515(0x1d8)]?.[_0x360515(0x160)]+'.'+_0x3600f1['workflow']?.['name']+_0x360515(0x221)+_0x3600f1[_0x360515(0x16f)]+'\x20'+_0x366a72[_0x360515(0x141)],'value':_0x3600f1[_0x360515(0x25b)]?.['id']||'','description':_0x366a72[_0x360515(0x26d)]};}),_0x2ef934=await a52_0x2e09b8({'type':_0x25af15(0x1da),'name':_0x25af15(0x208),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x1d3116[_0x25af15(0x14c)](_0x5f3ddd=>_0x5f3ddd[_0x25af15(0x1fd)]!=='')});if(!_0x2ef934['attemptId'])return 0x0;_0x30e360=_0x2ef934['attemptId'];}const _0xbdf042=_0x5413ef[_0x25af15(0x13c)];return _0xbdf042?await this[_0x25af15(0x1c4)](_0x38babb,_0x30e360):await this['renderSingleTimeline'](_0x38babb,_0x30e360,_0x5413ef),0x0;}async[a52_0x378e60(0x19b)](_0x15f73c,_0x3f5a37,_0x4f6cad){const _0x4d6c8b=a52_0x378e60,{tdx:_0x1b51e0}=_0x15f73c;let _0x1fcc62,_0x450bbb;try{[_0x1fcc62,_0x450bbb]=await Promise[_0x4d6c8b(0x1f1)]([_0x1b51e0[_0x4d6c8b(0x252)][_0x4d6c8b(0x146)](_0x3f5a37),_0x1b51e0[_0x4d6c8b(0x252)][_0x4d6c8b(0x1a2)](_0x3f5a37,![])]);}catch(_0x45fb2e){console[_0x4d6c8b(0x193)](a52_0x4a9921[_0x4d6c8b(0x2bc)](_0x4d6c8b(0x2b0)));_0x4f6cad['verbose']&&console[_0x4d6c8b(0x193)](_0x45fb2e);throw _0x45fb2e;}if(_0x4f6cad[_0x4d6c8b(0x286)]||_0x4f6cad[_0x4d6c8b(0x2a7)]){const _0x43b3ed=this[_0x4d6c8b(0x26c)](_0x1fcc62,_0x450bbb);await handleSDKOutput([_0x43b3ed],_0x4f6cad);return;}const _0x34106d=_0x1b51e0[_0x4d6c8b(0x21d)][_0x4d6c8b(0x179)],_0x3dd3af=this[_0x4d6c8b(0x246)](_0x1fcc62,_0x450bbb,_0x34106d);console[_0x4d6c8b(0x19d)](_0x3dd3af);}async[a52_0x378e60(0x1c4)](_0x114335,_0x1cac16){const _0xc93e73=a52_0x378e60,{tdx:_0x356b0c}=_0x114335,_0x34872f=TIMELINE_CONFIG[_0xc93e73(0x265)],_0x2000de=TIMELINE_CONFIG[_0xc93e73(0x130)];let _0x31468f=0x0;while(_0x31468f<_0x2000de){process[_0xc93e73(0x187)][_0xc93e73(0x1e8)]&&process[_0xc93e73(0x187)]['write']('\x1bc');let _0x1cc949,_0x56919c;try{[_0x1cc949,_0x56919c]=await Promise[_0xc93e73(0x1f1)]([_0x356b0c[_0xc93e73(0x252)][_0xc93e73(0x146)](_0x1cac16),_0x356b0c[_0xc93e73(0x252)][_0xc93e73(0x1a2)](_0x1cac16,![])]);}catch(_0x178240){console[_0xc93e73(0x193)](a52_0x4a9921[_0xc93e73(0x2bc)](_0xc93e73(0x295)));_0x31468f>0x0&&console['error'](a52_0x4a9921[_0xc93e73(0x283)](_0xc93e73(0x1c6)+_0x31468f));throw _0x178240;}const _0x649b33=_0x356b0c['context'][_0xc93e73(0x179)],_0x180557=this[_0xc93e73(0x246)](_0x1cc949,_0x56919c,_0x649b33);console[_0xc93e73(0x19d)](_0x180557);const _0xd26ea1=_0x1cc949[_0xc93e73(0x158)]&&_0x56919c['every'](_0x317e63=>_0x317e63[_0xc93e73(0x25f)]!==_0xc93e73(0x1ae)&&_0x317e63[_0xc93e73(0x25f)]!==_0xc93e73(0x20a));if(_0xd26ea1){console['error'](a52_0x4a9921[_0xc93e73(0x214)](_0xc93e73(0x13f)));break;}console[_0xc93e73(0x193)](a52_0x4a9921[_0xc93e73(0x283)]('\x0aPolling...\x20('+_0x31468f*0x2+_0xc93e73(0x2ae))),await new Promise(_0x111394=>setTimeout(_0x111394,_0x34872f)),_0x31468f++;}_0x31468f>=_0x2000de&&console[_0xc93e73(0x193)](a52_0x4a9921['yellow'](_0xc93e73(0x275)));}[a52_0x378e60(0x246)](_0x1c2d6c,_0x48ef9d,_0x152c54){const _0x486bf1=a52_0x378e60,_0x167414=[],_0x229cbc=TIMELINE_CONFIG[_0x486bf1(0x2ba)],_0x5e13f6=0x5,_0x4675b1=process[_0x486bf1(0x187)][_0x486bf1(0x225)]||0x78,_0x279836=_0x4675b1-_0x229cbc-_0x5e13f6,_0x45cc65=Math[_0x486bf1(0x269)](TIMELINE_CONFIG[_0x486bf1(0x183)],Math[_0x486bf1(0x22a)](_0x279836,TIMELINE_CONFIG[_0x486bf1(0x1ec)])),_0x4ab859=new Date(_0x1c2d6c[_0x486bf1(0x165)])['getTime'](),_0x1d00cc=_0x1c2d6c[_0x486bf1(0x180)]?new Date(_0x1c2d6c[_0x486bf1(0x180)])['getTime']():Date[_0x486bf1(0x174)](),_0x11fd07={'start':_0x4ab859,'end':_0x1d00cc,'duration':_0x1d00cc-_0x4ab859},_0x3642c7=new Map(),_0x434f04=[];for(const _0x3fedd9 of _0x48ef9d){if(_0x3fedd9[_0x486bf1(0x17b)]){const _0x2396b8=new Date(_0x3fedd9['startedAt'])[_0x486bf1(0x143)](),_0xfb6087=_0x3fedd9[_0x486bf1(0x2cd)]?new Date(_0x3fedd9[_0x486bf1(0x2cd)])[_0x486bf1(0x143)]():Date[_0x486bf1(0x174)](),_0x1d2db3={'start':_0x2396b8,'end':_0xfb6087,'duration':_0xfb6087-_0x2396b8};_0x3642c7[_0x486bf1(0x224)](_0x3fedd9['id'],_0x1d2db3),_0x434f04[_0x486bf1(0x247)]({'name':_0x3fedd9[_0x486bf1(0x24d)],'state':_0x3fedd9['state']||_0x486bf1(0x11b),'window':_0x1d2db3});}else _0x434f04[_0x486bf1(0x247)]({'name':_0x3fedd9[_0x486bf1(0x24d)],'state':_0x3fedd9[_0x486bf1(0x25f)]||'planned','window':undefined});}_0x434f04[_0x486bf1(0x2b9)]((_0x5a1420,_0x4eb13d)=>{const _0xba3e28=_0x486bf1;if(!_0x5a1420[_0xba3e28(0x131)])return 0x1;if(!_0x4eb13d[_0xba3e28(0x131)])return-0x1;return _0x5a1420['window']['start']-_0x4eb13d[_0xba3e28(0x131)]['start'];});const _0x5ceb7a=_0x434f04['length'],_0x6b467c=_0x5ceb7a>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x6b467c&&_0x434f04[_0x486bf1(0x11a)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x15a863=calculateTimeScale(_0x11fd07,_0x45cc65),_0x2b9fc3=_0x1c2d6c[_0x486bf1(0x158)]?_0x1c2d6c[_0x486bf1(0x2ad)]?a52_0x4a9921['green'](_0x486bf1(0x2ad)):a52_0x4a9921[_0x486bf1(0x2bc)](_0x486bf1(0x193)):a52_0x4a9921['blue']('running'),_0x5b9195=_0x1c2d6c[_0x486bf1(0x1d8)]?.['id'],_0x6d2572=_0x1c2d6c[_0x486bf1(0x1d9)];let _0x2282cd;if(_0x5b9195&&_0x6d2572){const _0x5690ee=getWorkflowAttemptUrl(_0x152c54,_0x5b9195,_0x6d2572,_0x1c2d6c['id']);_0x2282cd=hyperlink(a52_0x4a9921[_0x486bf1(0x283)](_0x1c2d6c['id']),_0x5690ee);}else _0x2282cd=a52_0x4a9921['dim'](_0x1c2d6c['id']);_0x167414[_0x486bf1(0x247)](_0x486bf1(0x14d)+_0x2282cd+_0x486bf1(0x221)+_0x2b9fc3+_0x486bf1(0x221)+formatElapsed(_0x11fd07[_0x486bf1(0x211)]));if(_0x434f04['length']>0x0){const _0x21e29a=renderTimeAxis(_0x15a863,_0x45cc65),_0x5a69c5=new Date(_0x11fd07[_0x486bf1(0x23b)]),_0x42cbab=formatDate(_0x5a69c5),_0x55419b=TIMELINE_CONFIG[_0x486bf1(0x17d)]+TIMELINE_CONFIG[_0x486bf1(0x170)]+_0x229cbc,_0x3df742=_0x42cbab[_0x486bf1(0x19e)](_0x55419b),_0x5c1f0a=a52_0x4a9921[_0x486bf1(0x283)](_0x3df742);_0x167414[_0x486bf1(0x247)](_0x5c1f0a+'\x20'+_0x21e29a);for(const _0x1b962c of _0x434f04){_0x167414['push'](renderTaskRow(_0x1b962c,_0x15a863,_0x45cc65,_0x229cbc));}const _0x3f245e=calculateStats(_0x434f04);_0x167414['push'](formatStats(_0x3f245e)),_0x6b467c&&_0x167414[_0x486bf1(0x247)](a52_0x4a9921[_0x486bf1(0x15d)](_0x486bf1(0x1c2)+TIMELINE_CONFIG[_0x486bf1(0x1fb)]+_0x486bf1(0x1e3)+_0x5ceb7a+_0x486bf1(0x1f0))),_0x167414[_0x486bf1(0x247)](''),_0x167414[_0x486bf1(0x247)](a52_0x4a9921[_0x486bf1(0x283)](_0x486bf1(0x1b0))+(_0x486bf1(0x17a)+_0x1c2d6c['id']+_0x486bf1(0x1e2))+a52_0x4a9921[_0x486bf1(0x283)](_0x486bf1(0x16e)));}else _0x167414['push'](_0x486bf1(0x28f));return _0x167414[_0x486bf1(0x123)]('\x0a');}[a52_0x378e60(0x26c)](_0x143afa,_0x55511a){const _0x274963=a52_0x378e60,_0x54853c=new Date(_0x143afa[_0x274963(0x165)])[_0x274963(0x143)](),_0x1b74c4=_0x143afa['finishedAt']?new Date(_0x143afa[_0x274963(0x180)])[_0x274963(0x143)]():Date[_0x274963(0x174)](),_0x1f9105=_0x1b74c4-_0x54853c,_0x1d8a83=[];for(const _0x5f489a of _0x55511a){if(_0x5f489a[_0x274963(0x17b)]){const _0x495ab3=new Date(_0x5f489a[_0x274963(0x17b)])[_0x274963(0x143)](),_0x279678=_0x5f489a[_0x274963(0x2cd)]?new Date(_0x5f489a['updatedAt'])[_0x274963(0x143)]():Date[_0x274963(0x174)]();_0x1d8a83[_0x274963(0x247)]({'name':_0x5f489a[_0x274963(0x24d)],'state':_0x5f489a[_0x274963(0x25f)]||_0x274963(0x11b),'window':{'start':_0x495ab3,'end':_0x279678,'duration':_0x279678-_0x495ab3}});}else _0x1d8a83[_0x274963(0x247)]({'name':_0x5f489a[_0x274963(0x24d)],'state':_0x5f489a[_0x274963(0x25f)]||_0x274963(0x20a),'window':undefined});}const _0x4d91c5=calculateStats(_0x1d8a83);return{'attempt':{'id':_0x143afa['id'],'status':_0x143afa[_0x274963(0x158)]?_0x143afa[_0x274963(0x2ad)]?'success':_0x274963(0x193):_0x274963(0x1ae),'createdAt':_0x143afa[_0x274963(0x165)],'finishedAt':_0x143afa[_0x274963(0x180)],'duration_ms':_0x1f9105},'tasks':_0x1d8a83[_0x274963(0x166)](_0x101214=>({'name':_0x101214['name'],'state':_0x101214[_0x274963(0x25f)],'startedAt':_0x101214[_0x274963(0x131)]?new Date(_0x101214[_0x274963(0x131)][_0x274963(0x23b)])[_0x274963(0x244)]():null,'updatedAt':_0x101214[_0x274963(0x131)]?new Date(_0x101214[_0x274963(0x131)][_0x274963(0x132)])['toISOString']():null,'duration_ms':_0x101214[_0x274963(0x131)]?.[_0x274963(0x211)]||null})),'stats':_0x4d91c5};}}
|
|
1
|
+
const a52_0x23efd3=a52_0x3d8b;(function(_0x595b10,_0x129b61){const _0x2acf8f=a52_0x3d8b,_0x149099=_0x595b10();while(!![]){try{const _0x74e74a=parseInt(_0x2acf8f(0x1f0))/0x1+parseInt(_0x2acf8f(0x22b))/0x2*(-parseInt(_0x2acf8f(0x2c9))/0x3)+-parseInt(_0x2acf8f(0x1f6))/0x4+-parseInt(_0x2acf8f(0x24c))/0x5*(-parseInt(_0x2acf8f(0x2b0))/0x6)+parseInt(_0x2acf8f(0x21f))/0x7*(-parseInt(_0x2acf8f(0x223))/0x8)+parseInt(_0x2acf8f(0x1f1))/0x9*(-parseInt(_0x2acf8f(0x281))/0xa)+parseInt(_0x2acf8f(0x20f))/0xb;if(_0x74e74a===_0x129b61)break;else _0x149099['push'](_0x149099['shift']());}catch(_0x114d81){_0x149099['push'](_0x149099['shift']());}}}(a52_0xd296,0xf28ce));import a52_0x3e6dd4 from'chalk';import{existsSync}from'fs';import a52_0x349595 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a52_0x2a2f9f from'prompts';function getAttemptStatusDisplay(_0x294791){const _0x1eb8ce=a52_0x3d8b;if(!_0x294791)return{'icon':'⏳','text':''};const {done:_0x259ff3,success:_0x21ff45,cancelRequested:_0x144423}=_0x294791;if(!_0x259ff3)return _0x144423?{'icon':'🛑','text':a52_0x3e6dd4['yellow'](_0x1eb8ce(0x2c5))}:{'icon':'🔄','text':a52_0x3e6dd4[_0x1eb8ce(0x1e2)]('running')};if(_0x21ff45)return{'icon':'✅','text':a52_0x3e6dd4[_0x1eb8ce(0x186)](_0x1eb8ce(0x181))};return{'icon':'❌','text':a52_0x3e6dd4['red'](_0x1eb8ce(0x2d7))};}export class WorkflowBaseCommand extends BaseCommand{[a52_0x23efd3(0x2c7)](_0x5c17d2,_0x2964f1,_0xaf03a3=0x0){const _0x5794ff=a52_0x23efd3;return _0x5c17d2[_0xaf03a3]||_0x2964f1[_0x5794ff(0x28a)];}[a52_0x23efd3(0x22e)](_0xb8996d,_0x259bc4,_0x407a30=0x0){const _0x3d40d6=a52_0x23efd3,_0x599aea=this[_0x3d40d6(0x2c7)](_0xb8996d,_0x259bc4,_0x407a30);if(!_0x599aea)return console[_0x3d40d6(0x2d7)](a52_0x3e6dd4[_0x3d40d6(0x27b)](_0x3d40d6(0x2fe)),_0x3d40d6(0x2ec)),console[_0x3d40d6(0x2d7)](a52_0x3e6dd4[_0x3d40d6(0x260)](_0x3d40d6(0x30d))),null;return _0x599aea;}[a52_0x23efd3(0x1c3)](_0x15a8ca,_0x30c9d9){const _0x53c319=a52_0x23efd3;if(_0x15a8ca[0x0]){const _0x3bfd3f=_0x15a8ca[0x0][_0x53c319(0x1bc)]('.');if(_0x3bfd3f[_0x53c319(0x317)]===0x1)return{'projectName':_0x3bfd3f[0x0],'workflowName':undefined};else return _0x3bfd3f['length']===0x2?{'projectName':_0x3bfd3f[0x0],'workflowName':_0x3bfd3f[0x1]}:(console['error'](a52_0x3e6dd4[_0x53c319(0x27b)](_0x53c319(0x2fe)),_0x53c319(0x307)),null);}return{'projectName':_0x30c9d9[_0x53c319(0x28a)],'workflowName':undefined};}['resolveProjectDir'](_0x3f1223,_0x45ae2d,_0xb05a94=0x0){const _0x5bfc0a=a52_0x23efd3;if(_0x3f1223[_0xb05a94])return _0x3f1223[_0xb05a94];if(_0x45ae2d[_0x5bfc0a(0x28a)]){const _0x46e06d=a52_0x349595[_0x5bfc0a(0x1b9)](process[_0x5bfc0a(0x18d)](),_0x5bfc0a(0x1da),_0x45ae2d[_0x5bfc0a(0x28a)]);if(existsSync(a52_0x349595[_0x5bfc0a(0x1b9)](_0x46e06d,_0x5bfc0a(0x1e5))))return _0x46e06d;}return undefined;}async[a52_0x23efd3(0x1ad)](_0x367eb7,_0x4f1655,_0x5733a2){const _0xc2a370=a52_0x23efd3;try{const _0x1bad17=await _0x367eb7[_0xc2a370(0x2a9)]['workflows'](_0x4f1655,{'limit':0x1});if(_0x1bad17[_0xc2a370(0x317)]>0x0){const _0x427d9e=_0x1bad17[0x0]['id'],_0x53e36e=getWorkflowUrl(_0x5733a2,_0x427d9e);console[_0xc2a370(0x2d7)](_0xc2a370(0x311)+a52_0x3e6dd4[_0xc2a370(0x2ce)](_0x53e36e));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x2e0);[a52_0x23efd3(0x305)]=a52_0x23efd3(0x232);async[a52_0x23efd3(0x1f3)](_0x390531){const _0x1c35fb=a52_0x23efd3,{options:_0x3c697c,args:_0x234498,tdx:_0x47e3ee}=_0x390531,_0x41f99d=_0x234498[0x0],_0x4b8996=_0x3c697c[_0x1c35fb(0x2ac)];if(_0x4b8996)return saveSessionContext({'workflow_project':undefined},_0x3c697c['session']),console[_0x1c35fb(0x2bc)](a52_0x3e6dd4[_0x1c35fb(0x186)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x41f99d)return console[_0x1c35fb(0x2d7)](a52_0x3e6dd4[_0x1c35fb(0x27b)](_0x1c35fb(0x2fe)),_0x1c35fb(0x2ec)),console[_0x1c35fb(0x2d7)](a52_0x3e6dd4['dim'](_0x1c35fb(0x2b5))),console[_0x1c35fb(0x2d7)](a52_0x3e6dd4[_0x1c35fb(0x260)](_0x1c35fb(0x2aa))),0x1;const _0x3841ff=await withSpinner(_0x1c35fb(0x28e)+_0x41f99d+_0x1c35fb(0x1d2),()=>_0x47e3ee[_0x1c35fb(0x2a9)][_0x1c35fb(0x2fa)](_0x41f99d),{'verbose':_0x3c697c[_0x1c35fb(0x1c2)]}),{name:_0x4cbf6a}=_0x3841ff[_0x1c35fb(0x213)];return saveSessionContext({'workflow_project':_0x4cbf6a},_0x3c697c[_0x1c35fb(0x2e6)]),console[_0x1c35fb(0x2bc)](a52_0x3e6dd4[_0x1c35fb(0x186)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a52_0x3e6dd4[_0x1c35fb(0x2ce)](_0x4cbf6a))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a52_0x23efd3(0x26e)]='workflow:projects';[a52_0x23efd3(0x305)]=a52_0x23efd3(0x24a);async['execute'](_0xb603a4){const _0x34269f=a52_0x23efd3,{options:_0x514de7,args:_0x27e951,tdx:_0x4f22ce}=_0xb603a4,_0x4d97a9=_0x27e951[0x0];_0x514de7[_0x34269f(0x1c2)]&&_0x4d97a9&&console[_0x34269f(0x2d7)](_0x34269f(0x25f)+_0x4d97a9);const _0x5abc75=await withSpinner(_0x34269f(0x29a),()=>_0x4f22ce[_0x34269f(0x2a9)][_0x34269f(0x316)](_0x4d97a9,{'limit':_0x514de7[_0x34269f(0x29f)]}),{'verbose':_0x514de7[_0x34269f(0x1c2)]});let _0xdf317a=_0x5abc75[_0x34269f(0x213)];_0xdf317a[_0x34269f(0x31a)]((_0x127ae5,_0x2f6a64)=>_0x127ae5[_0x34269f(0x26e)]['localeCompare'](_0x2f6a64[_0x34269f(0x26e)]));const _0x4f34d5=_0x514de7['limit']||0x64,_0x3900c2=_0xdf317a[_0x34269f(0x317)]>=_0x4f34d5?a52_0x3e6dd4['dim'](_0x34269f(0x228)):'';console['error'](_0x34269f(0x194)+_0xdf317a['length']+_0x34269f(0x174)+(_0xdf317a['length']!==0x1?'s':'')+_0x3900c2);if(_0x514de7[_0x34269f(0x206)]==='json'||_0x514de7['format']===_0x34269f(0x2b7)||_0x514de7['format']===_0x34269f(0x1a4))await handleSDKOutput(_0xdf317a,_0x514de7);else{if(_0xdf317a[_0x34269f(0x317)]===0x0)_0x4d97a9?console['log'](_0x34269f(0x23d)+_0x4d97a9):console[_0x34269f(0x2bc)]('No\x20workflow\x20projects\x20found');else{const _0x4f36b8=_0xdf317a[_0x34269f(0x229)](_0x21b6ce=>{const _0x16a96c=_0x34269f,_0x59fe31=_0x21b6ce[_0x16a96c(0x289)]?.['some'](_0x4a66b1=>_0x4a66b1[_0x16a96c(0x303)]==='sys'),_0x1b5307=_0x59fe31?a52_0x3e6dd4['dim'](_0x16a96c(0x2f8)):'';return _0x16a96c(0x191)+_0x21b6ce[_0x16a96c(0x26e)]+_0x1b5307;});await writeOutput(_0x4f36b8[_0x34269f(0x1b9)]('\x0a'),_0x514de7[_0x34269f(0x24d)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x2b2);[a52_0x23efd3(0x305)]='List\x20workflows';async[a52_0x23efd3(0x1f3)](_0xb8edcf){const _0x3a10cd=a52_0x23efd3,{options:_0x5bb321,args:_0x50742c,tdx:_0x50aff0}=_0xb8edcf,_0xd3d70=this[_0x3a10cd(0x2c7)](_0x50742c,_0x5bb321);_0x5bb321[_0x3a10cd(0x1c2)]&&_0xd3d70&&console['error'](_0x3a10cd(0x1fd)+_0xd3d70);const _0x479239=await withSpinner(_0x3a10cd(0x2dd),()=>_0x50aff0[_0x3a10cd(0x2a9)]['workflows'](_0xd3d70,{'limit':_0x5bb321[_0x3a10cd(0x29f)]}),{'verbose':_0x5bb321[_0x3a10cd(0x1c2)]});let _0x1966f6=_0x479239[_0x3a10cd(0x213)];_0x1966f6[_0x3a10cd(0x31a)]((_0x516b8f,_0x41d346)=>{const _0x36f3f8=_0x3a10cd,_0x5d5023=_0x516b8f[_0x36f3f8(0x26e)][_0x36f3f8(0x2a7)](_0x41d346[_0x36f3f8(0x26e)]);if(_0x5d5023!==0x0)return _0x5d5023;return(_0x516b8f['project']?.['name']||'')[_0x36f3f8(0x2a7)](_0x41d346['project']?.[_0x36f3f8(0x26e)]||'');});const _0x4ce288=_0x5bb321[_0x3a10cd(0x29f)]||0x64,_0xeedf32=_0x1966f6[_0x3a10cd(0x317)]>=_0x4ce288?a52_0x3e6dd4[_0x3a10cd(0x260)](_0x3a10cd(0x228)):'';console[_0x3a10cd(0x2d7)]('✔\x20Found\x20'+_0x1966f6[_0x3a10cd(0x317)]+_0x3a10cd(0x1e4)+(_0x1966f6[_0x3a10cd(0x317)]!==0x1?'s':'')+_0xeedf32);if(_0x5bb321[_0x3a10cd(0x206)]===_0x3a10cd(0x2f9)||_0x5bb321[_0x3a10cd(0x206)]===_0x3a10cd(0x2b7)||_0x5bb321['format']===_0x3a10cd(0x1a4))await handleSDKOutput(_0x1966f6,_0x5bb321);else{if(_0x1966f6[_0x3a10cd(0x317)]===0x0)_0xd3d70?console[_0x3a10cd(0x2bc)](_0x3a10cd(0x2ad)+_0xd3d70):console['log'](_0x3a10cd(0x2a5));else{const _0x2b9e61=_0x5bb321[_0x3a10cd(0x290)],_0x272f54=_0x1966f6[_0x3a10cd(0x229)](_0x21d47b=>{const _0x2d0fbd=_0x3a10cd,_0x4f1e77=a52_0x3e6dd4[_0x2d0fbd(0x260)]('#'+_0x21d47b['id']),_0x233fe7=hyperlink(_0x4f1e77,getWorkflowUrl(_0x2b9e61,_0x21d47b['id'])),_0x5066d9=_0x21d47b['project']?.[_0x2d0fbd(0x26e)]?a52_0x3e6dd4[_0x2d0fbd(0x260)]('\x20('+_0x21d47b['project'][_0x2d0fbd(0x26e)]+')'):'';return'📋\x20'+_0x233fe7+'\x20'+_0x21d47b[_0x2d0fbd(0x26e)]+_0x5066d9;});await writeOutput(_0x272f54[_0x3a10cd(0x1b9)]('\x0a'),_0x5bb321['output'],_0x3a10cd(0x287));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x19c);[a52_0x23efd3(0x305)]=a52_0x23efd3(0x2d1);async[a52_0x23efd3(0x1f3)](_0x1ff28d){const _0x20d6e3=a52_0x23efd3,{options:_0x55fd7f,args:_0x5d010d,tdx:_0x6d0f89}=_0x1ff28d,_0x349933=this[_0x20d6e3(0x1c3)](_0x5d010d,_0x55fd7f);if(!_0x349933)return 0x1;const {projectName:_0x3667e1,workflowName:_0x5c4cbc}=_0x349933;if(_0x55fd7f['verbose']){if(_0x3667e1&&_0x5c4cbc)console[_0x20d6e3(0x2d7)](_0x20d6e3(0x314)+_0x3667e1+'.'+_0x5c4cbc);else _0x3667e1&&console[_0x20d6e3(0x2d7)](_0x20d6e3(0x2d4)+_0x3667e1);const _0x9d1d2f=_0x55fd7f[_0x20d6e3(0x2d0)];_0x9d1d2f&&console['error'](_0x20d6e3(0x2af)+_0x9d1d2f);}let _0x5bc234=0x28;if(process[_0x20d6e3(0x19e)]['isTTY']&&!_0x55fd7f[_0x20d6e3(0x24d)]&&!_0x55fd7f[_0x20d6e3(0x206)]){const _0x8d937d=process[_0x20d6e3(0x19e)][_0x20d6e3(0x1af)]||0x28;_0x5bc234=Math[_0x20d6e3(0x266)](0x14,Math[_0x20d6e3(0x1a5)](_0x8d937d*0x2/0x3));}const _0x2a63ee=_0x55fd7f[_0x20d6e3(0x29f)]||_0x5bc234,_0x39f68b=await withSpinner(_0x20d6e3(0x1bd),()=>_0x6d0f89[_0x20d6e3(0x2a9)][_0x20d6e3(0x2fb)]({'projectName':_0x3667e1,'workflowName':_0x5c4cbc,'status':_0x55fd7f['status'],'fromTime':_0x55fd7f['from'],'toTime':_0x55fd7f['to'],'limit':_0x2a63ee}),{'verbose':_0x55fd7f[_0x20d6e3(0x1c2)]}),_0x46e0b5=_0x39f68b[_0x20d6e3(0x213)];_0x46e0b5[_0x20d6e3(0x31a)]((_0xc89dd0,_0x37006f)=>{const _0x3047c7=_0x20d6e3,_0x3e30e1=_0xc89dd0[_0x3047c7(0x28b)]||'',_0x3ceff7=_0x37006f[_0x3047c7(0x28b)]||'';return _0x3ceff7[_0x3047c7(0x2a7)](_0x3e30e1);});_0x46e0b5[_0x20d6e3(0x317)]>=_0x2a63ee?console[_0x20d6e3(0x2d7)](_0x20d6e3(0x222)+_0x46e0b5[_0x20d6e3(0x317)]+_0x20d6e3(0x20c)+a52_0x3e6dd4['dim'](_0x20d6e3(0x30c))):console[_0x20d6e3(0x2d7)]('✔\x20Found\x20'+_0x46e0b5['length']+'\x20session'+(_0x46e0b5['length']!==0x1?'s':''));if(_0x55fd7f[_0x20d6e3(0x206)]==='json'||_0x55fd7f['format']===_0x20d6e3(0x2b7)||_0x55fd7f[_0x20d6e3(0x206)]==='table')await handleSDKOutput(_0x46e0b5,_0x55fd7f);else{if(!process[_0x20d6e3(0x19e)][_0x20d6e3(0x18e)]||_0x55fd7f[_0x20d6e3(0x24d)]){if(_0x46e0b5[_0x20d6e3(0x317)]===0x0){if(_0x3667e1&&_0x5c4cbc)console['log'](_0x20d6e3(0x171)+_0x3667e1+'.'+_0x5c4cbc);else _0x3667e1?console[_0x20d6e3(0x2bc)](_0x20d6e3(0x173)+_0x3667e1):console[_0x20d6e3(0x2bc)](_0x20d6e3(0x27a));}else{const _0x11d98e=_0x55fd7f['site'],_0x270713=this[_0x20d6e3(0x1f5)](_0x46e0b5,_0x11d98e);_0x55fd7f[_0x20d6e3(0x24d)]?await writeOutput(_0x270713,_0x55fd7f['output'],'list'):console[_0x20d6e3(0x2bc)](_0x270713);}!_0x3667e1&&(console[_0x20d6e3(0x2d7)](''),console['error'](a52_0x3e6dd4[_0x20d6e3(0x260)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x20d6e3(0x2d7)](a52_0x3e6dd4[_0x20d6e3(0x260)](_0x20d6e3(0x21e))+'or'+a52_0x3e6dd4[_0x20d6e3(0x260)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x46e0b5[_0x20d6e3(0x317)]===0x0){if(_0x3667e1&&_0x5c4cbc)console[_0x20d6e3(0x2bc)](_0x20d6e3(0x171)+_0x3667e1+'.'+_0x5c4cbc);else _0x3667e1?console[_0x20d6e3(0x2bc)](_0x20d6e3(0x173)+_0x3667e1):console[_0x20d6e3(0x2bc)](_0x20d6e3(0x27a));}else await this['navigateSessionsInteractive'](_0x46e0b5,_0x1ff28d,_0x3667e1);}}return 0x0;}[a52_0x23efd3(0x1f5)](_0x5a1e05,_0x507df3){const _0x233f69=a52_0x23efd3,_0x5782ab=[],_0x484756=new Map();let _0x4150c7=Infinity,_0x58bbff=-Infinity;for(const _0x299d2b of _0x5a1e05){if(_0x299d2b['lastAttempt']?.[_0x233f69(0x2dc)]){const _0x159193=new Date(_0x299d2b[_0x233f69(0x2eb)][_0x233f69(0x2dc)])[_0x233f69(0x2bb)](),_0x4eeb17=_0x299d2b[_0x233f69(0x2eb)][_0x233f69(0x1bb)]?new Date(_0x299d2b[_0x233f69(0x2eb)][_0x233f69(0x1bb)])[_0x233f69(0x2bb)]():Date[_0x233f69(0x2a4)](),_0x1e97c4=_0x299d2b[_0x233f69(0x1db)]?.['name']||'(unknown)';!_0x484756[_0x233f69(0x1f4)](_0x1e97c4)&&_0x484756['set'](_0x1e97c4,[]),_0x484756['get'](_0x1e97c4)[_0x233f69(0x236)]({'session':_0x299d2b,'startTime':_0x159193,'endTime':_0x4eeb17,'duration':_0x4eeb17-_0x159193}),_0x4150c7=Math[_0x233f69(0x2e8)](_0x4150c7,_0x159193),_0x58bbff=Math[_0x233f69(0x266)](_0x58bbff,_0x4eeb17);}}if(_0x484756[_0x233f69(0x295)]===0x0)return _0x233f69(0x2ef);const _0x528371=process['stdout'][_0x233f69(0x240)]||0x78,_0x23d6b7=0x1e,_0x158dcb=0x32,_0x5510bf=0x4,_0x33e52e=Math[_0x233f69(0x2e8)](_0x158dcb,Math[_0x233f69(0x266)](_0x23d6b7,Math[_0x233f69(0x1a5)](_0x528371*0.3))),_0x4fbb5a=_0x528371-_0x33e52e-TIMELINE_CONFIG[_0x233f69(0x29e)]-0x3-_0x5510bf,_0x4cbe2e=_0x58bbff-_0x4150c7,_0x40e4ab=_0x4cbe2e/_0x33e52e,_0x91f661=renderTimeAxis({'startTime':_0x4150c7,'endTime':_0x58bbff,'durationMs':_0x4cbe2e,'msPerChar':_0x40e4ab},_0x33e52e),_0x40db3a=[];for(const _0x3fcf5b of _0x484756[_0x233f69(0x26f)]()){_0x40db3a['push'](..._0x3fcf5b);}_0x40db3a[_0x233f69(0x31a)]((_0x2b8d1a,_0x2d7f56)=>_0x2d7f56[_0x233f69(0x1f2)]-_0x2b8d1a['startTime']);const _0x5b34ec=new Date(_0x4150c7),_0x5e0c3c=formatDate(_0x5b34ec),_0x4f5750=_0x5510bf+TIMELINE_CONFIG[_0x233f69(0x23f)]+TIMELINE_CONFIG['ICON_SPACING']+_0x4fbb5a,_0x1d576f='\x20'['repeat'](_0x4f5750-_0x5e0c3c['length']),_0x572716=_0x1d576f+a52_0x3e6dd4[_0x233f69(0x260)](_0x5e0c3c)+'\x20'+_0x91f661;_0x5782ab['push'](_0x572716);const _0x39750d=0x16;let _0x29274a=0x0;for(const _0x4cb509 of _0x40db3a){const _0x43db8=_0x4cb509[_0x233f69(0x2e6)][_0x233f69(0x1db)]?.[_0x233f69(0x26e)]||'?',_0x208a49=Math[_0x233f69(0x2e8)](stringWidth(_0x43db8),_0x39750d);_0x29274a=Math['max'](_0x29274a,_0x208a49);}for(const _0x1d6b4a of _0x40db3a){const {session:_0x61b582,startTime:_0x34c3f8,endTime:_0x12e3e8,duration:_0x34cea2}=_0x1d6b4a,_0x205611=_0x61b582[_0x233f69(0x1db)]?.['id'],_0x578171=_0x61b582['id'],_0x113f56=_0x61b582[_0x233f69(0x1db)]?.[_0x233f69(0x26e)]||'?',_0x3b8260=_0x61b582[_0x233f69(0x2a9)]?.[_0x233f69(0x26e)]||'?';let _0x3e4178,_0x31d903;if(_0x61b582[_0x233f69(0x2eb)]){const _0x3f4290=_0x61b582[_0x233f69(0x2eb)];!_0x3f4290[_0x233f69(0x2a0)]?(_0x3e4178=_0x3f4290[_0x233f69(0x2f3)]?'🛑':'🔄',_0x31d903=_0x3f4290['cancelRequested']?a52_0x3e6dd4[_0x233f69(0x1ab)]:a52_0x3e6dd4[_0x233f69(0x1e2)]):(_0x3e4178=_0x3f4290[_0x233f69(0x181)]?'✅':'❌',_0x31d903=_0x3f4290['success']?a52_0x3e6dd4['green']:a52_0x3e6dd4[_0x233f69(0x27b)]);}else _0x3e4178='⏳',_0x31d903=a52_0x3e6dd4['dim'];const _0x2d32e5='#'+_0x578171,_0x7f57c7=_0x205611?hyperlink(_0x2d32e5,getWorkflowSessionUrl(_0x507df3,_0x205611,_0x578171)):_0x2d32e5;let _0x1d5d6b=_0x113f56;stringWidth(_0x113f56)>_0x39750d&&(_0x1d5d6b=_0x113f56['slice'](0x0,_0x39750d-0x1)+'…');const _0x23d379=a52_0x3e6dd4[_0x233f69(0x260)](_0x1d5d6b),_0x36c408=stringWidth(_0x1d5d6b),_0xb1a9af='\x20'[_0x233f69(0x1cc)](_0x29274a-stringWidth(_0x1d5d6b)+0x2),_0x2afdfb='('+formatElapsed(_0x34cea2)+')',_0x1a544d=stringWidth(_0x2afdfb),_0x375a92=stringWidth(_0x2d32e5),_0x41e5c4=_0x375a92+0x1+_0x36c408+_0xb1a9af['length'],_0x150c12=_0x4fbb5a-_0x41e5c4-_0x1a544d-0x1-0x8;let _0x2d0cc8=_0x3b8260;stringWidth(_0x2d0cc8)>_0x150c12&&(_0x2d0cc8=_0x2d0cc8[_0x233f69(0x262)](0x0,_0x150c12-0x1)+'…');const _0x17ccee=_0x7f57c7+'\x20'+_0x23d379+_0xb1a9af+_0x2d0cc8,_0x4e2199=stringWidth(_0x17ccee),_0x243812=_0x4fbb5a-_0x4e2199-_0x1a544d,_0xdd895d=_0x17ccee+'\x20'[_0x233f69(0x1cc)](Math[_0x233f69(0x266)](0x1,_0x243812))+a52_0x3e6dd4[_0x233f69(0x260)](_0x2afdfb),_0x2bb3c0=Math[_0x233f69(0x1a5)]((_0x34c3f8-_0x4150c7)/_0x40e4ab),_0x354746=Math[_0x233f69(0x1a5)]((_0x12e3e8-_0x4150c7)/_0x40e4ab),_0x3b80df=Math[_0x233f69(0x266)](_0x2bb3c0+0x1,_0x354746),_0x5f3e26=new Array(_0x33e52e)[_0x233f69(0x20d)]('\x20');for(let _0x21e798=_0x2bb3c0;_0x21e798<Math[_0x233f69(0x2e8)](_0x3b80df,_0x33e52e);_0x21e798++){_0x5f3e26[_0x21e798]='─';}const _0x390131=_0x5f3e26[_0x233f69(0x229)](_0x16c4ff=>_0x16c4ff==='\x20'?'\x20':_0x31d903(_0x16c4ff))[_0x233f69(0x1b9)]('');_0x5782ab[_0x233f69(0x236)](_0x3e4178+'\x20'+_0xdd895d+'│'+_0x390131+'│');}return _0x5782ab[_0x233f69(0x1b9)]('\x0a');}async[a52_0x23efd3(0x1c0)](_0x5930d3,_0x2f6aca,_0x158c93){const _0x2742f1=a52_0x23efd3,{options:_0x3b7087,tdx:_0x1b8172}=_0x2f6aca,_0x1a8e64=_0x3b7087[_0x2742f1(0x290)],{timelineRows:_0x45ab5a,timeAxisHeader:_0x26fb95}=this[_0x2742f1(0x224)](_0x5930d3,_0x1a8e64),_0x2628c7=_0x45ab5a['filter'](_0x4590e4=>_0x4590e4[_0x2742f1(0x1b7)]);if(_0x2628c7[_0x2742f1(0x317)]===0x0){const _0x5424fd=this['renderSessionsTimeline'](_0x5930d3,_0x1a8e64);console[_0x2742f1(0x2bc)](_0x5424fd);!_0x158c93&&(console[_0x2742f1(0x2d7)](''),console[_0x2742f1(0x2d7)](a52_0x3e6dd4[_0x2742f1(0x260)](_0x2742f1(0x2d2))),console['error'](a52_0x3e6dd4[_0x2742f1(0x260)](_0x2742f1(0x21e))+'or'+a52_0x3e6dd4[_0x2742f1(0x260)](_0x2742f1(0x1c5))));return;}_0x26fb95&&console['log'](_0x26fb95);const _0x40a227=_0x45ab5a[_0x2742f1(0x241)](_0x304891=>_0x304891[_0x2742f1(0x1b7)])[_0x2742f1(0x229)](_0x491a0f=>({'title':_0x491a0f[_0x2742f1(0x22a)],'value':_0x491a0f[_0x2742f1(0x1b7)]})),_0x5060e6=process[_0x2742f1(0x19e)][_0x2742f1(0x1af)]||0x3c,_0x1c15b8=Math['max'](0x28,Math[_0x2742f1(0x1a5)](_0x5060e6*0x2/0x3)),_0xb6dd08=await a52_0x2a2f9f({'type':_0x2742f1(0x1cb),'name':'attemptId','message':_0x2742f1(0x2c0),'choices':_0x40a227,'initial':-0x1,'limit':_0x1c15b8,'clearFirst':!![],'fallback':{'title':_0x2742f1(0x19f),'value':null},'suggest':(_0x293a83,_0x2eafb4)=>{const _0x199bd1=_0x2742f1;if(!_0x293a83)return Promise['resolve'](_0x2eafb4);const _0x21113b=_0x2eafb4[_0x199bd1(0x241)](_0x1346d9=>{const _0x4498bd=_0x199bd1,_0x54652e=_0x1346d9;return _0x54652e[_0x4498bd(0x205)][_0x4498bd(0x2b9)]()[_0x4498bd(0x18f)](_0x293a83[_0x4498bd(0x2b9)]());});return Promise[_0x199bd1(0x1a0)](_0x21113b);}}),_0x18ef88=()=>{const _0x9d23ba=_0x2742f1;process['stdout'][_0x9d23ba(0x17a)](_0x9d23ba(0x255)),process[_0x9d23ba(0x19e)][_0x9d23ba(0x17a)](_0x9d23ba(0x255)),process[_0x9d23ba(0x19e)]['write'](_0x9d23ba(0x255));},_0x28a366=_0xb6dd08&&_0xb6dd08['attemptId']&&_0xb6dd08[_0x2742f1(0x1b7)]!==null&&_0xb6dd08['attemptId'][_0x2742f1(0x2e1)]()!=='';if(!_0x28a366){_0x18ef88(),console[_0x2742f1(0x2bc)](a52_0x3e6dd4[_0x2742f1(0x260)](_0x2742f1(0x2f2)));return;}_0x18ef88();const _0x2eb194=_0x5930d3[_0x2742f1(0x184)](_0x2f72c7=>_0x2f72c7['lastAttempt']?.['id']===_0xb6dd08['attemptId']);if(_0x2eb194){const _0x1f95b0=_0x2eb194[_0x2742f1(0x1db)]?.[_0x2742f1(0x26e)]||'?',_0x551924=_0x2eb194['workflow']?.['name']||'?';console[_0x2742f1(0x2bc)](_0x2742f1(0x1e6)+a52_0x3e6dd4[_0x2742f1(0x260)](_0x1f95b0)+',\x20Workflow:\x20'+a52_0x3e6dd4['dim'](_0x551924));}const _0x28c06d=new WorkflowTimelineCommand();await _0x28c06d['execute']({'args':[],'options':{..._0x3b7087,'attemptId':_0xb6dd08['attemptId']},'tdx':_0x1b8172});}[a52_0x23efd3(0x224)](_0x2e0b8b,_0x281584){const _0xb86c69=a52_0x23efd3,_0x202dd5=new Map();for(const _0x4e4a85 of _0x2e0b8b){_0x4e4a85['id']&&_0x4e4a85[_0xb86c69(0x2eb)]?.['id']&&_0x202dd5[_0xb86c69(0x1b4)](_0x4e4a85['id'],_0x4e4a85[_0xb86c69(0x2eb)]['id']);}const _0x33f632=[];let _0x2e5898='';const _0x5b5a5b=this[_0xb86c69(0x1f5)](_0x2e0b8b,_0x281584),_0x410261=_0x5b5a5b[_0xb86c69(0x1bc)]('\x0a');for(const _0x37ab32 of _0x410261){if(_0x37ab32[_0xb86c69(0x20a)](_0xb86c69(0x1f7))||_0x37ab32[_0xb86c69(0x218)](/^\s+\d{4}-\d{2}-\d{2}/))_0x2e5898=_0x37ab32;else{if(_0x37ab32[_0xb86c69(0x218)](/^[✅❌🔄🛑⏳]/)){const _0x4dc2d2=_0x37ab32[_0xb86c69(0x218)](/#(\d+)/),_0x29fe4b=_0x4dc2d2?_0x4dc2d2[0x1]:null,_0xfacf8f=_0x29fe4b?_0x202dd5[_0xb86c69(0x1eb)](_0x29fe4b)||null:null,_0x512a41=_0x2e0b8b[_0xb86c69(0x184)](_0x2dfba5=>_0x2dfba5['id']===_0x29fe4b),_0x54b399=_0x512a41?.[_0xb86c69(0x1db)]?.[_0xb86c69(0x26e)]||'';_0x33f632[_0xb86c69(0x236)]({'displayLine':_0x37ab32,'attemptId':_0xfacf8f,'projectName':_0x54b399});}}}return{'timelineRows':_0x33f632,'timeAxisHeader':_0x2e5898};}}function a52_0x3d8b(_0x247afe,_0x387432){_0x247afe=_0x247afe-0x16f;const _0xd296a4=a52_0xd296();let _0x3d8b5c=_0xd296a4[_0x247afe];return _0x3d8b5c;}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a52_0x23efd3(0x1cd);['description']=a52_0x23efd3(0x2f1);async[a52_0x23efd3(0x1f3)](_0x254344){const _0x537d56=a52_0x23efd3,{options:_0x532c71,args:_0x60f403,tdx:_0x49b005}=_0x254344,_0x25677d=this[_0x537d56(0x1c3)](_0x60f403,_0x532c71);if(!_0x25677d)return 0x1;const {projectName:_0x3f9279,workflowName:_0x2749b2}=_0x25677d,_0x17c554=_0x532c71['includeRetried'];if(_0x532c71[_0x537d56(0x1c2)]){if(_0x3f9279&&_0x2749b2)console[_0x537d56(0x2d7)](_0x537d56(0x314)+_0x3f9279+'.'+_0x2749b2);else _0x3f9279&&console[_0x537d56(0x2d7)](_0x537d56(0x2d4)+_0x3f9279);_0x17c554&&console[_0x537d56(0x2d7)](_0x537d56(0x2df));}const _0x2a0c0c=await withSpinner(_0x537d56(0x18c),()=>_0x49b005[_0x537d56(0x2a9)]['attempts']({'projectName':_0x3f9279,'workflowName':_0x2749b2,'includeRetried':_0x17c554,'limit':_0x532c71[_0x537d56(0x29f)]}),{'verbose':_0x532c71[_0x537d56(0x1c2)]}),_0x4cc040=_0x2a0c0c[_0x537d56(0x213)],_0x29f08d=_0x532c71['limit']||0x64,_0xe452ad=_0x4cc040[_0x537d56(0x317)]>=_0x29f08d?a52_0x3e6dd4[_0x537d56(0x260)](_0x537d56(0x228)):'';console[_0x537d56(0x2d7)](_0x537d56(0x194)+_0x4cc040[_0x537d56(0x317)]+_0x537d56(0x2a3)+(_0x4cc040[_0x537d56(0x317)]!==0x1?'s':'')+_0xe452ad);if(_0x532c71[_0x537d56(0x206)]==='json'||_0x532c71[_0x537d56(0x206)]===_0x537d56(0x2b7)||_0x532c71[_0x537d56(0x206)]==='table')await handleSDKOutput(_0x4cc040,_0x532c71);else{if(_0x4cc040[_0x537d56(0x317)]===0x0){if(_0x3f9279&&_0x2749b2)console['log'](_0x537d56(0x2cc)+_0x3f9279+'.'+_0x2749b2);else _0x3f9279?console[_0x537d56(0x2bc)](_0x537d56(0x2cb)+_0x3f9279):console['log'](_0x537d56(0x1ec));}else{const _0x3d1bd0=_0x532c71[_0x537d56(0x290)],_0x765b90=_0x4cc040[_0x537d56(0x229)](_0x160bf0=>{const _0x328615=_0x537d56,_0x4d9448=a52_0x3e6dd4[_0x328615(0x260)]('#'+_0x160bf0['id']),_0x583184=_0x160bf0['project']?.['id'],_0x185cf9=_0x160bf0[_0x328615(0x1cf)]||_0x160bf0[_0x328615(0x269)],_0x45bc95=_0x583184&&_0x185cf9?hyperlink(_0x4d9448,getWorkflowAttemptUrl(_0x3d1bd0,_0x583184,_0x185cf9,_0x160bf0['id'])):_0x4d9448,{icon:_0x1fb22c,text:_0x51eb71}=getAttemptStatusDisplay(_0x160bf0),_0x3fbeef=(_0x160bf0[_0x328615(0x1db)]?.[_0x328615(0x26e)]||'?')+'.'+(_0x160bf0[_0x328615(0x2a9)]?.['name']||'?'),_0x49926c=_0x160bf0[_0x328615(0x28b)]?a52_0x3e6dd4['dim'](_0x160bf0[_0x328615(0x28b)]):'';return(_0x45bc95+'\x20'+_0x1fb22c+(_0x51eb71?'\x20'+_0x51eb71:'')+'\x20'+_0x3fbeef+'\x20'+_0x49926c)[_0x328615(0x27f)]();});await writeOutput(_0x765b90[_0x537d56(0x1b9)]('\x0a'),_0x532c71[_0x537d56(0x24d)],_0x537d56(0x287));}}return 0x0;}}function a52_0xd296(){const _0x76ea52=['context','No\x20sessions\x20found','red','run','renderSingleTimeline','\x0aPush\x20these\x20changes?','trimEnd','\x20\x20Revision:\x20','5770QxPDcb','Revision:\x20','resumeFrom','workflow:delete','applyPullProject','\x0aDry\x20run\x20-\x20no\x20files\x20written','list','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','metadata','workflowProject','sessionTime','\x0aDry\x20run\x20-\x20nothing\x20pushed','stringify','Resolving\x20project\x20\x27','readFile','site','isArray','\x22?\x20This\x20cannot\x20be\x20undone.','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','revision:\x20','size','Fetching\x20log\x20files...','fileSize','\x20deleted','message','Listing\x20workflow\x20projects...','workflow:retry','\x20of\x20','\x20\x20Files\x20extracted:\x20','GUTTER','limit','done','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Attempt\x20ID:\x20','\x20attempt','now','No\x20workflows\x20found','✔\x20Retry\x20started','localeCompare','text','workflow','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','durationMs','clear','No\x20workflows\x20found\x20in\x20project:\x20','\x0aApply\x20these\x20changes?','Status:\x20','153642vOMVcD','Pulling\x20project\x20','workflow:workflows','Session\x20not\x20found:\x20','Error:\x20Invalid\x20parameter\x20format:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','getMinutes','jsonl','updatedAt','toLowerCase','Select\x20a\x20session\x20to\x20view\x20timeline:','getTime','log','targetDir','follow','skipValidation','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','→\x20Project:\x20','newProjectId','Start\x20a\x20workflow\x20run','canceling','workflow:logs','resolveProject','executePushProject','772845kizPsi','Kill\x20a\x20running\x20attempt','No\x20attempts\x20found\x20in\x20project:\x20','No\x20attempts\x20found\x20for:\x20','isDirectory','cyan','tasks','status','List\x20workflow\x20execution\x20sessions','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','end','Filter:\x20project=','Using\x20attempt\x20','includeSubtasks','error','getDate','Target:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Dry\x20run:\x20yes','createdAt','Listing\x20workflows...','✔\x20Project\x20updated','Include\x20retried:\x20yes','workflow:use','trim','pollTimeline','Error:\x20Project\x20name\x20is\x20required','prepareCloneProject','Setting\x20secret...','session','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','min','\x20\x20Session\x20ID:\x20','Analyzing\x20project...','lastAttempt','Project\x20name\x20is\x20required','✔\x20Secret\x20\x27','workflow:pull','No\x20sessions\x20with\x20timing\x20information','running','List\x20workflow\x20attempts','Cancelled','cancelRequested','\x20from\x20session\x20','params','\x20\x20New\x20attempt\x20ID:\x20','session:','\x20(system)','json','resolveProjectId','sessions','Source:\x20','revision','Error:','Getting\x20attempt\x20details...','Retry\x20a\x20session\x20or\x20attempt','splice','Getting\x20attempt\x20tasks...','key','Source\x20project:\x20','description','attempt:','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','indexOf','force','Source\x20directory:\x20','Output\x20directory:\x20','(use\x20--limit\x20to\x20see\x20more)','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','renderTimeline','LABEL_WIDTH_DIVISOR','workflow:secrets:list','\x20\x20Console:\x20','Select\x20a\x20workflow\x20to\x20run','stat','Filter:\x20','✔\x20Pull\x20complete','projects','length','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','\x20\x20Workflow:\x20','sort','pullProject','changes','\x27\x20from\x20project\x20\x27','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','/attempt/','Auto-selected\x20latest\x20session:\x20','sourceProjectName','No\x20sessions\x20found\x20for:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','No\x20sessions\x20found\x20in\x20project:\x20','\x20project','\x20to\x20see\x20detailed\x20logs','white','Warning:','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Loading\x20sessions...','write','Key:\x20','msPerChar','delete','\x20secret','-\x20no\x20files\x20written','MAX_TASKS_DISPLAY','success','---\x20','filesExtracted','find','Show\x20logs\x20for\x20a\x20workflow\x20attempt','green','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','✔\x20Clone\x20complete','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Session\x20context\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Listing\x20workflow\x20attempts...','cwd','isTTY','includes','\x20-\x20','📁\x20','modified','attempt','✔\x20Found\x20','\x20has\x20no\x20attempts','total','download','Downloading\x20project\x20','start','Latest\x20session\x20has\x20no\x20attempt','Session\x20','workflow:sessions','LABEL_MIN_SPACING','stdout','No\x20matching\x20sessions\x20found','resolve','\x22\x20to\x20new\x20project\x20\x22','preparePushProject','logFiles','table','floor','\x22\x20with\x20new\x20revision?','parse','relative','param','listSecrets','yellow','✔\x20Push\x20complete','showWorkflowConsoleUrl','workflow:upload','rows','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Deleted\x20project\x20','duration','\x20task','set','\x0a✔\x20Attempt\x20complete','No\x20log\x20files\x20found\x20for\x20this\x20attempt','attemptId','Deleting\x20project\x20','join','Error:\x20Secret\x20key\x20is\x20required','finishedAt','split','Listing\x20workflow\x20sessions...','\x20\x20Attempt\x20ID:\x20','Project\x20directory:\x20','navigateSessionsInteractive','workflow:clone','verbose','parseProjectWorkflowPattern','Reason:\x20','\x20\x20tdx\x20wf\x20use\x20<project>','TASK_NAME_WIDTH','\x20unchanged','Listing\x20secrets...','window','getMonth','autocomplete','repeat','workflow:attempts','select','session_id','Validation:\x20skipped','sourceDir','\x27...','MIN_TIMELINE_WIDTH','MIN_LABEL_COUNT','Resume\x20from:\x20','Updating\x20','fs/promises','fullName','index','workflows','project','substring','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','task','.\x20Expected\x20format:\x20KEY=VALUE','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','blue','Deleting\x20secret...','\x20workflow','tdx.json','Project:\x20','planned','round','fromTask','Writing\x20files...','get','No\x20attempts\x20found','workflow:timeline','icon','unchanged','242292UTExav','18153wMSAJg','startTime','execute','has','renderSessionsTimeline','5562988BSNOeB','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x0aUpdate\x20existing\x20project\x20\x22','Files\x20to\x20upload:\x20','Analyzing\x20changes...','MAX_POLL_ITERATIONS','\x0aError:','Project\x20filter:\x20','projectName','\x20modified','all','dryRun','\x20\x20Location:\x20','state','diff','title','format','projectId','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','No\x20workflow\x20tdx.json\x20found','startsWith','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x20sessions\x20','fill','getFullYear','54115842FfSIhf','\x0aClone\x20\x22','getHours','toISOString','data','retryAttempt','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20new','deleteSecret','match','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','targetExists','yes','resolveProjectDir','workflow:push','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','962199Bbrhny','summary','unknown','✔\x20Showing\x20','104VLeTap','generateSessionTimelineRows','\x0aPolling...\x20(','kill','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','\x20(use\x20--limit\x20to\x20show\x20more)','map','displayLine','8dqhigr','\x20logs','every','requireProject','replace','✔\x20Project:\x20','Setting\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','/app/workflows/','-\x20nothing\x20pushed','Invalid\x20format:\x20','push','isNewProject','Parameters:\x20','padStart','\x20\x20Project:\x20','Key\x20cannot\x20be\x20empty','type','No\x20projects\x20match\x20pattern:\x20','Error:\x20','ICON_WIDTH','columns','filter','Loading\x20session...','🔄\x20','newProjectName','startedAt','...','/sessions/','retryAttemptName','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','List\x20all\x20workflow\x20projects','No\x20log\x20content\x20found','235XHpdBq','output','Total:\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x20\x20Source:\x20','✔\x20Workflow\x20run\x20started','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x20\x20Target:\x20','Attempt:\x20','\x1b[1A\x1b[2K','Error:\x20Attempt\x20ID\x20is\x20required','Pushing\x20project...','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflow:run','pending','workflowName','deleted','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','\x20\x20Changes:\x20','Pattern:\x20','dim','Retrying\x20session...','slice','basename','MAX_TIMELINE_WIDTH','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','max','No\x20workflow\x20sessions\x20found','buildTimelineData','sessionId','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','New\x20project\x20name:\x20','Project\x20name:\x20','\x20\x20Project\x20ID:\x20','name','values','workflow:attempt','Show\x20specific\x20attempt\x20details','new','Pull\x20workflow\x20project\x20to\x20local\x20folder','Params:\x20','Including\x20subtasks:\x20yes','keys','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Download\x20workflow\x20project\x20from\x20Treasure\x20Data'];a52_0xd296=function(){return _0x76ea52;};return a52_0xd296();}export class WorkflowAttemptCommand extends BaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x270);[a52_0x23efd3(0x305)]=a52_0x23efd3(0x271);async[a52_0x23efd3(0x1f3)](_0x5a6830){const _0x43d2ab=a52_0x23efd3,{options:_0x55774c,args:_0x13ee07,tdx:_0x327107}=_0x5a6830,_0x99e473=_0x13ee07[0x0];if(!_0x99e473)return console['error'](_0x43d2ab(0x256)),0x1;_0x55774c[_0x43d2ab(0x1c2)]&&console[_0x43d2ab(0x2d7)](_0x43d2ab(0x2a2)+_0x99e473);const _0x5ccae6=await withSpinner(_0x43d2ab(0x2ff),()=>_0x327107['workflow'][_0x43d2ab(0x193)](_0x99e473),{'verbose':_0x55774c[_0x43d2ab(0x1c2)]}),_0x433fb9=_0x5ccae6['data'];let _0x4df1db;!_0x433fb9[_0x43d2ab(0x2a0)]?_0x4df1db=_0x433fb9[_0x43d2ab(0x2f3)]?_0x43d2ab(0x2c5):'running':_0x4df1db=_0x433fb9[_0x43d2ab(0x181)]?_0x43d2ab(0x181):_0x43d2ab(0x2d7);let _0x1404f2;if(_0x433fb9[_0x43d2ab(0x2dc)]&&_0x433fb9['finishedAt']){const _0x278bb1=new Date(_0x433fb9['createdAt'])['getTime'](),_0x416179=new Date(_0x433fb9['finishedAt'])[_0x43d2ab(0x2bb)]();_0x1404f2=Math[_0x43d2ab(0x1e8)]((_0x416179-_0x278bb1)/0x3e8);}const _0x2e832d={'attempt_id':_0x433fb9['id'],'status':_0x4df1db,..._0x433fb9[_0x43d2ab(0x1d9)]!==undefined&&{'index':_0x433fb9[_0x43d2ab(0x1d9)]},..._0x433fb9[_0x43d2ab(0x1db)]&&{'project':_0x433fb9[_0x43d2ab(0x1db)][_0x43d2ab(0x26e)]},..._0x433fb9['workflow']&&{'workflow':_0x433fb9[_0x43d2ab(0x2a9)][_0x43d2ab(0x26e)]},..._0x433fb9['sessionId']&&{'session_id':_0x433fb9[_0x43d2ab(0x269)]},..._0x433fb9[_0x43d2ab(0x28b)]&&{'session_time':_0x433fb9[_0x43d2ab(0x28b)]},..._0x433fb9[_0x43d2ab(0x248)]&&{'retry_attempt':_0x433fb9['retryAttemptName']},..._0x1404f2!==undefined&&{'duration_sec':_0x1404f2},..._0x433fb9[_0x43d2ab(0x2dc)]&&{'created_at':_0x433fb9[_0x43d2ab(0x2dc)]},..._0x433fb9[_0x43d2ab(0x1bb)]&&{'finished_at':_0x433fb9['finishedAt']},...Object['keys'](_0x433fb9['params'])[_0x43d2ab(0x317)]>0x0&&{'params':_0x433fb9[_0x43d2ab(0x2f5)]}};return await handleSingleObjectOutput(_0x2e832d,_0x55774c),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a52_0x23efd3(0x26e)]='workflow:tasks';['description']='Show\x20tasks\x20for\x20an\x20attempt';async[a52_0x23efd3(0x1f3)](_0x26b96b){const _0x4cf70f=a52_0x23efd3,{options:_0x4bd3c0,args:_0x1a6887,tdx:_0x3cd576}=_0x26b96b,_0x249518=_0x1a6887[0x0];if(!_0x249518)return console[_0x4cf70f(0x2d7)](_0x4cf70f(0x256)),0x1;const _0x1080c2=_0x4bd3c0[_0x4cf70f(0x2d6)];_0x4bd3c0[_0x4cf70f(0x1c2)]&&(console[_0x4cf70f(0x2d7)](_0x4cf70f(0x2a2)+_0x249518),_0x1080c2&&console['error'](_0x4cf70f(0x275)));const _0x3b4569=await withSpinner(_0x4cf70f(0x302),()=>_0x3cd576[_0x4cf70f(0x2a9)]['tasks'](_0x249518,_0x1080c2||![]),{'verbose':_0x4bd3c0[_0x4cf70f(0x1c2)]}),_0x3f25b0=_0x3b4569['data'];return console[_0x4cf70f(0x2d7)](_0x4cf70f(0x194)+_0x3f25b0[_0x4cf70f(0x317)]+_0x4cf70f(0x1b3)+(_0x3f25b0[_0x4cf70f(0x317)]!==0x1?'s':'')),await handleSDKOutput(_0x3f25b0,_0x4bd3c0),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x2c6);['description']=a52_0x23efd3(0x185);async['execute'](_0x193584){const _0x319fe3=a52_0x23efd3,{options:_0x240a77,args:_0x47639d,tdx:_0x4d7b1}=_0x193584,_0x3b3389=_0x47639d[0x0];let _0xa37b5e=_0x47639d[0x1];if(!_0x3b3389)return console[_0x319fe3(0x2d7)](_0x319fe3(0x256)),0x1;_0x240a77[_0x319fe3(0x1c2)]&&(console[_0x319fe3(0x2d7)](_0x319fe3(0x2a2)+_0x3b3389),_0xa37b5e&&console[_0x319fe3(0x2d7)]('Task\x20name:\x20'+_0xa37b5e));const _0x3759c5=await withSpinner(_0x319fe3(0x296),()=>_0x4d7b1[_0x319fe3(0x2a9)][_0x319fe3(0x1a3)](_0x3b3389,_0xa37b5e),{'verbose':_0x240a77[_0x319fe3(0x1c2)]}),_0x274e00=_0x3759c5['data'];if(_0x274e00[_0x319fe3(0x317)]===0x0)return console[_0x319fe3(0x2d7)](_0x319fe3(0x1b6)),0x0;if(!_0xa37b5e&&(_0x240a77[_0x319fe3(0x2f9)]||_0x240a77[_0x319fe3(0x206)]))return await handleSDKOutput(_0x274e00,_0x240a77),0x0;if(!_0xa37b5e){const _0x2f54dc=_0x274e00[_0x319fe3(0x229)](_0x1d9774=>({'title':_0x1d9774['taskName']+'\x20('+formatBytes(_0x1d9774[_0x319fe3(0x297)])+')','value':_0x1d9774['taskName']})),_0x147e55=await a52_0x2a2f9f({'type':_0x319fe3(0x1ce),'name':'task','message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x2f54dc});if(!_0x147e55['task'])return console[_0x319fe3(0x2d7)](_0x319fe3(0x2f2)),0x0;_0xa37b5e=_0x147e55[_0x319fe3(0x1de)];}const _0x24f313=await withSpinner('Downloading\x20logs...',()=>_0x4d7b1[_0x319fe3(0x2a9)]['logs'](_0x3b3389,_0xa37b5e),{'verbose':_0x240a77[_0x319fe3(0x1c2)]}),_0x4b5c3c=_0x24f313['data'];return _0x4b5c3c?console[_0x319fe3(0x2bc)](_0x4b5c3c):console[_0x319fe3(0x2d7)](_0x319fe3(0x24b)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a52_0x23efd3(0x26e)]='workflow:kill';[a52_0x23efd3(0x305)]=a52_0x23efd3(0x2ca);async[a52_0x23efd3(0x1f3)](_0x4eb0c3){const _0x10a0e1=a52_0x23efd3,{options:_0x365f1f,args:_0x416478,tdx:_0x31f768}=_0x4eb0c3,_0x49da97=_0x416478[0x0];if(!_0x49da97)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x20325c=_0x365f1f['reason'];_0x365f1f['verbose']&&(console['error']('Attempt\x20ID:\x20'+_0x49da97),_0x20325c&&console[_0x10a0e1(0x2d7)](_0x10a0e1(0x1c4)+_0x20325c));if(!_0x365f1f['yes']){if(!isInteractive())return console[_0x10a0e1(0x2d7)](a52_0x3e6dd4[_0x10a0e1(0x27b)]('\x0aError:'),_0x10a0e1(0x208)),console[_0x10a0e1(0x2d7)](a52_0x3e6dd4['dim'](_0x10a0e1(0x178))),0x1;const _0x34470f=await confirmKey(_0x10a0e1(0x2c1)+_0x49da97+'?');if(!_0x34470f)return console[_0x10a0e1(0x2d7)](a52_0x3e6dd4['yellow'](_0x10a0e1(0x2f2))),0x1;}const _0x5c765a=await withSpinner('Killing\x20attempt...',()=>_0x31f768['workflow'][_0x10a0e1(0x226)](_0x49da97,_0x20325c),{'verbose':_0x365f1f['verbose']}),_0x24029f=_0x5c765a[_0x10a0e1(0x213)];return console[_0x10a0e1(0x2d7)]('✔\x20'+_0x24029f),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x29b);[a52_0x23efd3(0x305)]=a52_0x23efd3(0x300);async['execute'](_0x52eb52){const _0x5ef5aa=a52_0x23efd3,{options:_0x1dfcb7,args:_0x2bee04,tdx:_0x16b392}=_0x52eb52,_0xb381f=_0x2bee04[0x0];if(!_0xb381f)return console['error'](_0x5ef5aa(0x215)),console['error'](_0x5ef5aa(0x265)),0x1;let _0x1bd2c3=![],_0x349495=_0xb381f;if(_0xb381f[_0x5ef5aa(0x20a)](_0x5ef5aa(0x2f7)))_0x1bd2c3=!![],_0x349495=_0xb381f['substring'](0x8);else{if(_0xb381f['startsWith'](_0x5ef5aa(0x306)))_0x1bd2c3=![],_0x349495=_0xb381f[_0x5ef5aa(0x1dc)](0x8);else return console[_0x5ef5aa(0x2d7)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x5ef5aa(0x2d7)](_0x5ef5aa(0x265)),0x1;}const _0x48d705=_0x1dfcb7[_0x5ef5aa(0x1e9)],_0x5ee38a=_0x1dfcb7[_0x5ef5aa(0x283)],_0x315919=_0x1dfcb7[_0x5ef5aa(0x2f5)],_0x593506=_0x1dfcb7[_0x5ef5aa(0x309)];_0x1dfcb7[_0x5ef5aa(0x1c2)]&&(console[_0x5ef5aa(0x2d7)](_0x5ef5aa(0x2d9)+(_0x1bd2c3?_0x5ef5aa(0x2e6):_0x5ef5aa(0x193))+'\x20'+_0x349495),_0x48d705&&console[_0x5ef5aa(0x2d7)]('From\x20task:\x20'+_0x48d705),_0x5ee38a&&console['error'](_0x5ef5aa(0x1d5)+_0x5ee38a),_0x315919&&console[_0x5ef5aa(0x2d7)](_0x5ef5aa(0x274)+_0x315919),_0x593506&&console[_0x5ef5aa(0x2d7)]('Force:\x20yes'));let _0x37b2e1;if(_0x315919)try{if(_0x315919['startsWith']('@')){const _0x274838=await import(_0x5ef5aa(0x1d7)),_0x252307=_0x315919['substring'](0x1),_0x4e29fa=await _0x274838[_0x5ef5aa(0x28f)](_0x252307,'utf-8');_0x37b2e1=JSON[_0x5ef5aa(0x1a7)](_0x4e29fa);}else _0x37b2e1=JSON['parse'](_0x315919);}catch{return console[_0x5ef5aa(0x2d7)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x1dfcb7[_0x5ef5aa(0x21b)]){if(!isInteractive())return console[_0x5ef5aa(0x2d7)](a52_0x3e6dd4[_0x5ef5aa(0x27b)](_0x5ef5aa(0x1fc)),_0x5ef5aa(0x208)),console['error'](a52_0x3e6dd4[_0x5ef5aa(0x260)](_0x5ef5aa(0x178))),0x1;const _0x27c190=await confirmKey(_0x5ef5aa(0x258)+(_0x1bd2c3?_0x5ef5aa(0x2e6):_0x5ef5aa(0x193))+'\x20'+_0x349495+'?');if(!_0x27c190)return console[_0x5ef5aa(0x2d7)](a52_0x3e6dd4[_0x5ef5aa(0x1ab)](_0x5ef5aa(0x2f2))),0x1;}let _0x1fddd3;_0x1bd2c3?_0x1fddd3=await withSpinner(_0x5ef5aa(0x261),()=>_0x16b392[_0x5ef5aa(0x2a9)]['retrySession'](_0x349495,{'fromTask':_0x48d705,'retryParams':_0x37b2e1}),{'verbose':_0x1dfcb7[_0x5ef5aa(0x1c2)]}):_0x1fddd3=await withSpinner('Retrying\x20attempt...',()=>_0x16b392['workflow'][_0x5ef5aa(0x214)](_0x349495,{'resumeFrom':_0x5ee38a,'retryParams':_0x37b2e1,'force':_0x593506}),{'verbose':_0x1dfcb7[_0x5ef5aa(0x1c2)]});const _0x3a6152=_0x1fddd3['data'];return console['error'](_0x5ef5aa(0x2a6)),console[_0x5ef5aa(0x2d7)](_0x5ef5aa(0x2f6)+_0x3a6152[_0x5ef5aa(0x1b7)]),console['error'](_0x5ef5aa(0x2e9)+_0x3a6152['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x259);['description']=a52_0x23efd3(0x2c4);async['execute'](_0xd4ee28){const _0x518211=a52_0x23efd3,{options:_0x382ba5,args:_0xbf66a1,tdx:_0x393ae4}=_0xd4ee28;let _0x402dd0=_0xbf66a1[0x0];if(!_0x402dd0){const _0x4b455c=this['resolveProject']([],_0x382ba5),_0x3f30ae=await withSpinner('Loading\x20workflows...',()=>_0x393ae4[_0x518211(0x2a9)]['workflows'](_0x4b455c,{'limit':_0x382ba5['limit']}),{'verbose':_0x382ba5[_0x518211(0x1c2)]}),_0x4ef5f1=_0x3f30ae[_0x518211(0x213)];if(_0x4ef5f1['length']===0x0)return console[_0x518211(0x2d7)](_0x518211(0x2a5)),!_0x4b455c&&console['error'](a52_0x3e6dd4['dim'](_0x518211(0x30d))),0x1;const _0x601708=_0x4ef5f1[_0x518211(0x229)](_0x560ccc=>({'title':_0x560ccc[_0x518211(0x1db)]?.[_0x518211(0x26e)]+'.'+_0x560ccc['name'],'value':_0x560ccc[_0x518211(0x1db)]?.['name']+'.'+_0x560ccc[_0x518211(0x26e)],'description':_0x560ccc[_0x518211(0x2fd)]?_0x518211(0x294)+_0x560ccc[_0x518211(0x2fd)]:undefined})),_0x3b10a6=await a52_0x2a2f9f({'type':_0x518211(0x1ce),'name':_0x518211(0x2a9),'message':_0x518211(0x312),'choices':_0x601708});if(!_0x3b10a6['workflow'])return 0x1;_0x402dd0=_0x3b10a6[_0x518211(0x2a9)];}if(!_0x402dd0['includes']('.')){const _0x4fbb72=this[_0x518211(0x2c7)]([],_0x382ba5);if(_0x4fbb72)_0x402dd0=_0x4fbb72+'.'+_0x402dd0;else return console[_0x518211(0x2d7)](a52_0x3e6dd4[_0x518211(0x27b)](_0x518211(0x2fe)),_0x518211(0x227)),console[_0x518211(0x2d7)](a52_0x3e6dd4[_0x518211(0x260)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x2b6f3f=_0x382ba5[_0x518211(0x1a9)],_0x486769=_0x382ba5[_0x518211(0x28b)],_0x176760={};if(_0x2b6f3f&&Array[_0x518211(0x291)](_0x2b6f3f))for(const _0x5892e0 of _0x2b6f3f){const _0x196899=_0x5892e0[_0x518211(0x308)]('=');if(_0x196899===-0x1)return console[_0x518211(0x2d7)](_0x518211(0x2b4)+_0x5892e0),console[_0x518211(0x2d7)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x2593bf=_0x5892e0[_0x518211(0x1dc)](0x0,_0x196899),_0x32ff31=_0x5892e0[_0x518211(0x1dc)](_0x196899+0x1);try{_0x176760[_0x2593bf]=JSON[_0x518211(0x1a7)](_0x32ff31);}catch{_0x176760[_0x2593bf]=_0x32ff31;}}_0x382ba5[_0x518211(0x1c2)]&&(console['error']('Workflow:\x20'+_0x402dd0),Object[_0x518211(0x276)](_0x176760)['length']>0x0&&console[_0x518211(0x2d7)](_0x518211(0x238)+JSON[_0x518211(0x28d)](_0x176760)),_0x486769&&console[_0x518211(0x2d7)]('Session\x20time:\x20'+_0x486769));const _0x548f80=await withSpinner('Starting\x20workflow\x20run...',()=>_0x393ae4['workflow'][_0x518211(0x27c)](_0x402dd0,_0x176760,{'sessionTime':_0x486769}),{'verbose':_0x382ba5[_0x518211(0x1c2)]}),_0x46aae0=_0x548f80[_0x518211(0x213)];console[_0x518211(0x2d7)](_0x518211(0x251)),console[_0x518211(0x2d7)](_0x518211(0x1be)+_0x46aae0['id']),console[_0x518211(0x2d7)]('\x20\x20Session\x20ID:\x20'+_0x46aae0[_0x518211(0x269)]),console[_0x518211(0x2d7)](_0x518211(0x23a)+_0x46aae0[_0x518211(0x1db)]?.[_0x518211(0x26e)]),console[_0x518211(0x2d7)](_0x518211(0x319)+_0x46aae0[_0x518211(0x2a9)]?.['name']);if(_0x46aae0[_0x518211(0x1db)]?.['id']&&_0x46aae0[_0x518211(0x269)]&&_0x46aae0['id']){const _0x6b1b43=_0x382ba5['site'],_0x5a86db=getConsoleUrl(_0x6b1b43,_0x518211(0x233)+_0x46aae0[_0x518211(0x1db)]['id']+_0x518211(0x247)+_0x46aae0['sessionId']+_0x518211(0x31f)+_0x46aae0['id']);console['error'](_0x518211(0x311)+a52_0x3e6dd4[_0x518211(0x2ce)](_0x5a86db));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a52_0x23efd3(0x26e)]='workflow:download';['description']=a52_0x23efd3(0x278);async['execute'](_0x230a38){const _0x1efb8e=a52_0x23efd3,{options:_0x2763fd,args:_0x1fd6cf,tdx:_0x1f8b48}=_0x230a38,_0x54ca87=_0x1fd6cf[0x0],_0x434442=_0x1fd6cf[0x1]||'.';if(!_0x54ca87)return console['error'](_0x1efb8e(0x2e3)),console['error'](_0x1efb8e(0x2da)),0x1;const _0x49bf9e=_0x2763fd[_0x1efb8e(0x2fd)];_0x2763fd[_0x1efb8e(0x1c2)]&&(console[_0x1efb8e(0x2d7)](_0x1efb8e(0x1e6)+_0x54ca87),console['error'](_0x1efb8e(0x30b)+_0x434442),_0x49bf9e&&console[_0x1efb8e(0x2d7)](_0x1efb8e(0x282)+_0x49bf9e));const _0x70c510=await withSpinner(_0x1efb8e(0x198)+_0x54ca87+_0x1efb8e(0x246),()=>_0x1f8b48[_0x1efb8e(0x2a9)][_0x1efb8e(0x197)](_0x54ca87,_0x434442,{'revision':_0x49bf9e}),{'verbose':_0x2763fd[_0x1efb8e(0x1c2)]}),_0x5da602=_0x70c510[_0x1efb8e(0x213)];return console['error']('✔\x20Downloaded\x20'+_0x5da602[_0x1efb8e(0x1fe)]),console[_0x1efb8e(0x2d7)](_0x1efb8e(0x280)+_0x5da602[_0x1efb8e(0x2fd)]),console[_0x1efb8e(0x2d7)](_0x1efb8e(0x29d)+_0x5da602[_0x1efb8e(0x183)]),console[_0x1efb8e(0x2d7)](_0x1efb8e(0x202)+_0x434442+'/'+_0x5da602[_0x1efb8e(0x1fe)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x1ae);[a52_0x23efd3(0x305)]=a52_0x23efd3(0x288);async[a52_0x23efd3(0x1f3)](_0xe3018b){const _0x301afe=a52_0x23efd3,{options:_0x1b50c8,args:_0x9c0075,tdx:_0x787e1b}=_0xe3018b;let _0x13c7d0='.',_0x4ce821=_0x1b50c8[_0x301afe(0x26e)];if(_0x9c0075[0x0]){const {promises:_0x43d3c6}=await import('fs');try{const _0x21333a=await _0x43d3c6[_0x301afe(0x313)](_0x9c0075[0x0]);if(_0x21333a[_0x301afe(0x2cd)]())_0x13c7d0=_0x9c0075[0x0];else return console[_0x301afe(0x2d7)](_0x301afe(0x23e)+_0x9c0075[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x4ce821=_0x9c0075[0x0],_0x13c7d0='.';}}const _0x2b59b8=_0x1b50c8[_0x301afe(0x2fd)],_0x161e1f=_0x1b50c8[_0x301afe(0x2bf)];_0x1b50c8[_0x301afe(0x1c2)]&&(console['error'](_0x301afe(0x1bf)+_0x13c7d0),_0x4ce821&&console[_0x301afe(0x2d7)](_0x301afe(0x26c)+_0x4ce821),_0x2b59b8&&console[_0x301afe(0x2d7)]('Revision:\x20'+_0x2b59b8),_0x161e1f&&console[_0x301afe(0x2d7)]('Validation:\x20skipped'));const _0x4ffcd8=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x787e1b[_0x301afe(0x2a9)][_0x301afe(0x236)](_0x13c7d0,{'projectName':_0x4ce821,'revision':_0x2b59b8,'skipValidation':_0x161e1f}),{'verbose':_0x1b50c8[_0x301afe(0x1c2)]}),_0x5467fa=_0x4ffcd8[_0x301afe(0x213)];return console['error']('✔\x20Pushed\x20'+_0x5467fa[_0x301afe(0x1fe)]),console[_0x301afe(0x2d7)]('\x20\x20Project\x20ID:\x20'+_0x5467fa[_0x301afe(0x207)]),console[_0x301afe(0x2d7)](_0x301afe(0x280)+_0x5467fa[_0x301afe(0x2fd)]),await this[_0x301afe(0x1ad)](_0x787e1b,_0x5467fa[_0x301afe(0x1fe)],_0x1b50c8[_0x301afe(0x290)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x2ee);[a52_0x23efd3(0x305)]=a52_0x23efd3(0x273);async[a52_0x23efd3(0x1f3)](_0x2d7872){const _0x2d5000=a52_0x23efd3,{options:_0x3437ce,args:_0x1cb955,tdx:_0x1dd94b}=_0x2d7872,_0x38bd8e=_0x1cb955[0x0],_0x164100=_0x1cb955[0x1];if(!_0x38bd8e)return console[_0x2d5000(0x2d7)](a52_0x3e6dd4['red'](_0x2d5000(0x2fe)),_0x2d5000(0x2ec)),console[_0x2d5000(0x2d7)](a52_0x3e6dd4[_0x2d5000(0x260)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x48a05c=_0x3437ce[_0x2d5000(0x2fd)];_0x3437ce['verbose']&&(console[_0x2d5000(0x2d7)](_0x2d5000(0x1e6)+_0x38bd8e),_0x164100&&console[_0x2d5000(0x2d7)]('Target\x20directory:\x20'+_0x164100),_0x48a05c&&console[_0x2d5000(0x2d7)](_0x2d5000(0x282)+_0x48a05c),_0x3437ce[_0x2d5000(0x201)]&&console['error'](_0x2d5000(0x2db)));const _0x57b1cf=await withSpinner(_0x2d5000(0x2b1)+_0x38bd8e+'...',()=>_0x1dd94b[_0x2d5000(0x2a9)][_0x2d5000(0x31b)](_0x38bd8e,{'targetDir':_0x164100,'revision':_0x48a05c}),{'verbose':_0x3437ce[_0x2d5000(0x1c2)]}),_0x270d7d=_0x57b1cf['data'];_0x270d7d[_0x2d5000(0x237)]?console[_0x2d5000(0x2d7)]('→\x20New\x20project:\x20'+_0x270d7d['projectName']):console[_0x2d5000(0x2d7)](_0x2d5000(0x2c2)+_0x270d7d[_0x2d5000(0x1fe)]);console[_0x2d5000(0x2d7)](_0x2d5000(0x280)+_0x270d7d[_0x2d5000(0x2fd)]),console[_0x2d5000(0x2d7)](_0x2d5000(0x253)+(a52_0x349595[_0x2d5000(0x1a8)](process['cwd'](),_0x270d7d[_0x2d5000(0x2bd)])||'.')),console[_0x2d5000(0x2d7)](_0x2d5000(0x25e)+a52_0x3e6dd4[_0x2d5000(0x186)]('+'+_0x270d7d[_0x2d5000(0x220)][_0x2d5000(0x272)]+_0x2d5000(0x216))+',\x20'+(a52_0x3e6dd4[_0x2d5000(0x1ab)]('~'+_0x270d7d[_0x2d5000(0x220)][_0x2d5000(0x192)]+_0x2d5000(0x1ff))+',\x20')+(a52_0x3e6dd4['red']('-'+_0x270d7d[_0x2d5000(0x220)][_0x2d5000(0x25c)]+_0x2d5000(0x298))+',\x20')+(''+a52_0x3e6dd4['dim'](_0x270d7d[_0x2d5000(0x220)][_0x2d5000(0x1ef)]+'\x20unchanged')));for(const _0x573f85 of _0x270d7d[_0x2d5000(0x31c)]){_0x573f85[_0x2d5000(0x23c)]==='modified'&&_0x573f85['diff']&&(console[_0x2d5000(0x2d7)]('\x0a'+a52_0x3e6dd4['cyan'](_0x2d5000(0x182)+_0x573f85['path'])),console[_0x2d5000(0x2d7)](_0x573f85[_0x2d5000(0x204)]));}if(!_0x270d7d['hasChanges'])return saveSessionContext({'workflow_project':_0x270d7d[_0x2d5000(0x1fe)]},_0x3437ce[_0x2d5000(0x2e6)]),console[_0x2d5000(0x2d7)](a52_0x3e6dd4[_0x2d5000(0x186)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x2d5000(0x2d7)](a52_0x3e6dd4[_0x2d5000(0x260)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x270d7d['projectName'])),0x0;if(_0x3437ce[_0x2d5000(0x201)])return console[_0x2d5000(0x2d7)](a52_0x3e6dd4[_0x2d5000(0x1ab)](_0x2d5000(0x286))),0x0;if(!_0x3437ce[_0x2d5000(0x21b)]){if(!isInteractive())return console[_0x2d5000(0x2d7)](a52_0x3e6dd4[_0x2d5000(0x27b)](_0x2d5000(0x1fc)),_0x2d5000(0x208)),console[_0x2d5000(0x2d7)](a52_0x3e6dd4[_0x2d5000(0x260)](_0x2d5000(0x178))),0x1;const _0x3fb9af=await confirmKey(_0x2d5000(0x2ae));if(!_0x3fb9af)return console[_0x2d5000(0x2d7)](a52_0x3e6dd4[_0x2d5000(0x1ab)](_0x2d5000(0x2f2)),_0x2d5000(0x17f)),0x1;}await withSpinner(_0x2d5000(0x1ea),()=>_0x1dd94b[_0x2d5000(0x2a9)][_0x2d5000(0x285)](_0x270d7d,{'revision':_0x48a05c}),{'verbose':_0x3437ce[_0x2d5000(0x1c2)]}),saveSessionContext({'workflow_project':_0x270d7d[_0x2d5000(0x1fe)]},_0x3437ce[_0x2d5000(0x2e6)]),console['error'](a52_0x3e6dd4[_0x2d5000(0x186)](_0x2d5000(0x315)));const _0x48ea6d=a52_0x349595[_0x2d5000(0x1a8)](process[_0x2d5000(0x18d)](),_0x270d7d[_0x2d5000(0x2bd)])||'.';return console['error'](a52_0x3e6dd4[_0x2d5000(0x260)](_0x2d5000(0x202)+_0x48ea6d)),console['error'](a52_0x3e6dd4[_0x2d5000(0x260)](_0x2d5000(0x18a)+_0x270d7d['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x21d);['description']=a52_0x23efd3(0x1dd);async[a52_0x23efd3(0x1f3)](_0x217db4){const _0x24946c=a52_0x23efd3,{options:_0x167d8c,args:_0x16a44d,tdx:_0x551183}=_0x217db4,_0x433ce3=this['resolveProjectDir'](_0x16a44d,_0x167d8c),_0x50a767=_0x167d8c[_0x24946c(0x2fd)],_0x3a335c=_0x167d8c[_0x24946c(0x2bf)];_0x167d8c[_0x24946c(0x1c2)]&&(_0x433ce3&&console[_0x24946c(0x2d7)](_0x24946c(0x30a)+_0x433ce3),_0x50a767&&console[_0x24946c(0x2d7)]('Revision:\x20'+_0x50a767),_0x167d8c[_0x24946c(0x201)]&&console['error']('Dry\x20run:\x20yes'),_0x3a335c&&console[_0x24946c(0x2d7)](_0x24946c(0x1d0)));let _0x11f463;try{_0x11f463=await withSpinner(_0x24946c(0x1fa),()=>_0x551183['workflow'][_0x24946c(0x1a2)]({'sourceDir':_0x433ce3,'revision':_0x50a767,'skipValidation':_0x3a335c}),{'verbose':_0x167d8c[_0x24946c(0x1c2)]});}catch(_0x299060){if(_0x299060 instanceof Error&&_0x299060[_0x24946c(0x299)]['includes'](_0x24946c(0x209)))return console['error'](a52_0x3e6dd4[_0x24946c(0x27b)](_0x24946c(0x2fe)),_0x24946c(0x2e7)),_0x167d8c[_0x24946c(0x28a)]?console['error'](a52_0x3e6dd4[_0x24946c(0x260)]('Tip:\x20cd\x20to\x20workflows/'+_0x167d8c[_0x24946c(0x28a)]+_0x24946c(0x249)+_0x167d8c['workflowProject']+'\x27')):console['error'](a52_0x3e6dd4[_0x24946c(0x260)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x299060;}const _0x1dcfed=_0x11f463['data'];console[_0x24946c(0x2d7)](_0x24946c(0x230)+_0x1dcfed[_0x24946c(0x1fe)]),console['error'](_0x24946c(0x250)+_0x1dcfed[_0x24946c(0x1d1)]),console[_0x24946c(0x2d7)](_0x24946c(0x280)+_0x1dcfed[_0x24946c(0x2fd)]),console[_0x24946c(0x2d7)](_0x24946c(0x25e)+a52_0x3e6dd4['green']('+'+_0x1dcfed['summary']['new']+'\x20new')+',\x20'+(a52_0x3e6dd4['yellow']('~'+_0x1dcfed[_0x24946c(0x220)]['modified']+_0x24946c(0x1ff))+',\x20')+(a52_0x3e6dd4[_0x24946c(0x27b)]('-'+_0x1dcfed[_0x24946c(0x220)]['deleted']+_0x24946c(0x298))+',\x20')+(''+a52_0x3e6dd4[_0x24946c(0x260)](_0x1dcfed[_0x24946c(0x220)][_0x24946c(0x1ef)]+_0x24946c(0x1c7))));for(const _0x5df05a of _0x1dcfed['changes']){_0x5df05a['type']===_0x24946c(0x192)&&_0x5df05a['diff']&&(console[_0x24946c(0x2d7)]('\x0a'+a52_0x3e6dd4[_0x24946c(0x2ce)]('---\x20'+_0x5df05a['path'])),console[_0x24946c(0x2d7)](_0x5df05a[_0x24946c(0x204)]));}if(!_0x1dcfed['hasChanges'])return console[_0x24946c(0x2d7)](a52_0x3e6dd4[_0x24946c(0x186)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x24946c(0x1ad)](_0x551183,_0x1dcfed[_0x24946c(0x1fe)],_0x167d8c[_0x24946c(0x290)]),0x0;if(_0x167d8c[_0x24946c(0x201)])return console[_0x24946c(0x2d7)](a52_0x3e6dd4[_0x24946c(0x1ab)](_0x24946c(0x28c))),0x0;if(!_0x167d8c[_0x24946c(0x21b)]){if(!isInteractive())return console[_0x24946c(0x2d7)](a52_0x3e6dd4['red']('\x0aError:'),_0x24946c(0x208)),console[_0x24946c(0x2d7)](a52_0x3e6dd4[_0x24946c(0x260)](_0x24946c(0x178))),0x1;const _0x5c5533=await confirmKey(_0x24946c(0x27e));if(!_0x5c5533)return console['error'](a52_0x3e6dd4[_0x24946c(0x1ab)](_0x24946c(0x2f2)),_0x24946c(0x234)),0x1;}const _0xbbec3a=await withSpinner(_0x24946c(0x257),()=>_0x551183['workflow'][_0x24946c(0x2c8)](_0x1dcfed),{'verbose':_0x167d8c[_0x24946c(0x1c2)]}),_0x4822d4=_0xbbec3a[_0x24946c(0x213)];return console[_0x24946c(0x2d7)](a52_0x3e6dd4[_0x24946c(0x186)](_0x24946c(0x1ac))),console['error'](_0x24946c(0x26d)+_0x4822d4[_0x24946c(0x207)]),console[_0x24946c(0x2d7)](_0x24946c(0x280)+_0x4822d4[_0x24946c(0x2fd)]),await this['showWorkflowConsoleUrl'](_0x551183,_0x4822d4['projectName'],_0x167d8c[_0x24946c(0x290)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x1c1);['description']='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a52_0x23efd3(0x1f3)](_0x3f045c){const _0x2a18cc=a52_0x23efd3,{options:_0x3c2c57,args:_0x214956,tdx:_0x1cf7cd}=_0x3f045c,_0x1bc6e9=this[_0x2a18cc(0x21c)](_0x214956,_0x3c2c57),_0x431d68=_0x3c2c57[_0x2a18cc(0x26e)],_0x3e27d7=_0x3c2c57['revision'],_0x1d8ae4=_0x3c2c57[_0x2a18cc(0x2bf)];if(!_0x1bc6e9)return console['error'](a52_0x3e6dd4[_0x2a18cc(0x27b)](_0x2a18cc(0x2fe)),'Source\x20directory\x20is\x20required'),console[_0x2a18cc(0x2d7)](a52_0x3e6dd4['dim'](_0x2a18cc(0x31e))),console[_0x2a18cc(0x2d7)](a52_0x3e6dd4[_0x2a18cc(0x260)](_0x2a18cc(0x18b))),0x1;if(!_0x431d68)return console[_0x2a18cc(0x2d7)](a52_0x3e6dd4[_0x2a18cc(0x27b)](_0x2a18cc(0x2fe)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x2a18cc(0x2d7)](a52_0x3e6dd4[_0x2a18cc(0x260)](_0x2a18cc(0x31e))),0x1;_0x3c2c57[_0x2a18cc(0x1c2)]&&(console['error']('Source\x20directory:\x20'+_0x1bc6e9),console[_0x2a18cc(0x2d7)](_0x2a18cc(0x26b)+_0x431d68),_0x3e27d7&&console['error'](_0x2a18cc(0x282)+_0x3e27d7),_0x3c2c57[_0x2a18cc(0x201)]&&console[_0x2a18cc(0x2d7)](_0x2a18cc(0x2db)),_0x1d8ae4&&console['error'](_0x2a18cc(0x1d0)));const _0x206d21=await withSpinner(_0x2a18cc(0x2ea),()=>_0x1cf7cd[_0x2a18cc(0x2a9)][_0x2a18cc(0x2e4)](_0x1bc6e9,_0x431d68,{'revision':_0x3e27d7,'skipValidation':_0x1d8ae4}),{'verbose':_0x3c2c57['verbose']}),_0x4c7e2d=_0x206d21[_0x2a18cc(0x213)];console[_0x2a18cc(0x2d7)](_0x2a18cc(0x2fc)+_0x4c7e2d[_0x2a18cc(0x1d1)]);_0x4c7e2d[_0x2a18cc(0x170)]&&console[_0x2a18cc(0x2d7)](_0x2a18cc(0x304)+_0x4c7e2d['sourceProjectName']);console[_0x2a18cc(0x2d7)]('New\x20project\x20name:\x20'+_0x4c7e2d[_0x2a18cc(0x244)]),console[_0x2a18cc(0x2d7)](_0x2a18cc(0x282)+_0x4c7e2d[_0x2a18cc(0x2fd)]),console[_0x2a18cc(0x2d7)](_0x2a18cc(0x1f9)+_0x4c7e2d['fileCount']);_0x4c7e2d['targetExists']&&(console['error'](a52_0x3e6dd4['yellow']('\x0a⚠\x20Project\x20\x22'+_0x4c7e2d[_0x2a18cc(0x244)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x4c7e2d['existingProjectId']+')')),console[_0x2a18cc(0x2d7)](a52_0x3e6dd4[_0x2a18cc(0x1ab)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x3c2c57[_0x2a18cc(0x201)])return console['error'](a52_0x3e6dd4[_0x2a18cc(0x1ab)](_0x2a18cc(0x252))),0x0;if(!_0x3c2c57[_0x2a18cc(0x21b)]){if(!isInteractive())return console[_0x2a18cc(0x2d7)](a52_0x3e6dd4[_0x2a18cc(0x27b)](_0x2a18cc(0x1fc)),_0x2a18cc(0x208)),console['error'](a52_0x3e6dd4[_0x2a18cc(0x260)](_0x2a18cc(0x178))),0x1;const _0x4a1296=_0x4c7e2d[_0x2a18cc(0x170)]||a52_0x349595[_0x2a18cc(0x263)](_0x1bc6e9),_0x4f68d0=_0x4c7e2d[_0x2a18cc(0x21a)]?_0x2a18cc(0x1f8)+_0x431d68+_0x2a18cc(0x1a6):_0x2a18cc(0x210)+_0x4a1296+_0x2a18cc(0x1a1)+_0x431d68+'\x22?',_0x9844e8=await confirmKey(_0x4f68d0);if(!_0x9844e8)return console['error'](a52_0x3e6dd4[_0x2a18cc(0x1ab)](_0x2a18cc(0x2f2))),0x1;}const _0x43715b=await withSpinner(_0x4c7e2d['targetExists']?_0x2a18cc(0x1d6)+_0x431d68+_0x2a18cc(0x246):'Cloning\x20to\x20'+_0x431d68+_0x2a18cc(0x246),()=>_0x1cf7cd[_0x2a18cc(0x2a9)]['executeCloneProject'](_0x4c7e2d),{'verbose':_0x3c2c57[_0x2a18cc(0x1c2)]}),_0x4a5b54=_0x43715b['data'];return console[_0x2a18cc(0x2d7)](a52_0x3e6dd4[_0x2a18cc(0x186)](_0x4c7e2d[_0x2a18cc(0x21a)]?_0x2a18cc(0x2de):_0x2a18cc(0x188))),console[_0x2a18cc(0x2d7)](_0x2a18cc(0x23a)+_0x4a5b54[_0x2a18cc(0x244)]),console[_0x2a18cc(0x2d7)](_0x2a18cc(0x26d)+_0x4a5b54[_0x2a18cc(0x2c3)]),console['error']('\x20\x20Revision:\x20'+_0x4a5b54[_0x2a18cc(0x2fd)]),await this['showWorkflowConsoleUrl'](_0x1cf7cd,_0x4a5b54[_0x2a18cc(0x244)],_0x3c2c57[_0x2a18cc(0x290)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x284);['description']='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a52_0x23efd3(0x1f3)](_0x98c5e1){const _0x55f495=a52_0x23efd3,{options:_0x3e0460,args:_0x337337,tdx:_0x3364c8}=_0x98c5e1,_0x420d9b=_0x337337[0x0];if(!_0x420d9b)return console['error'](_0x55f495(0x189)),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x3e0460[_0x55f495(0x1c2)]&&console['error'](_0x55f495(0x1e6)+_0x420d9b);if(!_0x3e0460[_0x55f495(0x21b)]){if(!isInteractive())return console[_0x55f495(0x2d7)](a52_0x3e6dd4[_0x55f495(0x27b)](_0x55f495(0x1fc)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a52_0x3e6dd4[_0x55f495(0x260)](_0x55f495(0x178))),0x1;const _0x5b0c33=await confirmKey(_0x55f495(0x1b0)+_0x420d9b+_0x55f495(0x292));if(!_0x5b0c33)return console['error'](a52_0x3e6dd4['yellow'](_0x55f495(0x2f2))),0x1;}const _0x34bc14=await withSpinner(_0x55f495(0x1b8)+_0x420d9b+_0x55f495(0x246),()=>_0x3364c8[_0x55f495(0x2a9)][_0x55f495(0x17d)](_0x420d9b),{'verbose':_0x3e0460[_0x55f495(0x1c2)]}),_0x1d07f4=_0x34bc14['data'];return console[_0x55f495(0x2d7)](_0x55f495(0x1b1)+_0x1d07f4[_0x55f495(0x1fe)]),console[_0x55f495(0x2d7)](_0x55f495(0x26d)+_0x1d07f4[_0x55f495(0x207)]),0x0;}}export function parseKeyValue(_0x39e27e){const _0x5c8108=a52_0x23efd3,_0xcf1379=_0x39e27e[_0x5c8108(0x308)]('=');if(_0xcf1379===-0x1)throw new Error(_0x5c8108(0x235)+_0x39e27e+_0x5c8108(0x1df));const _0x22e31a=_0x39e27e[_0x5c8108(0x1dc)](0x0,_0xcf1379),_0x4b8dac=_0x39e27e[_0x5c8108(0x1dc)](_0xcf1379+0x1);if(!_0x22e31a)throw new Error(_0x5c8108(0x23b));return{'key':_0x22e31a,'value':_0x4b8dac};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x310);['description']=a52_0x23efd3(0x1e0);async[a52_0x23efd3(0x1f3)](_0xa5385e){const _0x57294a=a52_0x23efd3,{options:_0x5bee1d,args:_0x5f1930,tdx:_0x5b5cde}=_0xa5385e,_0x529a4e=this[_0x57294a(0x22e)](_0x5f1930,_0x5bee1d);if(!_0x529a4e)return 0x1;_0x5bee1d['verbose']&&console[_0x57294a(0x2d7)](_0x57294a(0x1e6)+_0x529a4e);const _0x422b0a=await withSpinner(_0x57294a(0x1c8),()=>_0x5b5cde['workflow'][_0x57294a(0x1aa)](_0x529a4e),{'verbose':_0x5bee1d[_0x57294a(0x1c2)]}),{secrets:_0x459cd0}=_0x422b0a['data'];return console['error'](_0x57294a(0x194)+_0x459cd0[_0x57294a(0x317)]+_0x57294a(0x17e)+(_0x459cd0[_0x57294a(0x317)]!==0x1?'s':'')),await handleSDKOutput(_0x459cd0,_0x5bee1d),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]='workflow:secrets:set';[a52_0x23efd3(0x305)]=a52_0x23efd3(0x219);async['execute'](_0x1a3b6e){const _0x3e5b4b=a52_0x23efd3,{options:_0xba6c57,args:_0x406468,tdx:_0x1f5523}=_0x1a3b6e;let _0x537a17,_0xc132e3;if(_0x406468[_0x3e5b4b(0x317)]>=0x1&&!_0x406468[0x0][_0x3e5b4b(0x18f)]('='))_0x537a17=_0x406468[0x0],_0xc132e3=_0x406468[_0x3e5b4b(0x262)](0x1);else{if(_0x406468[_0x3e5b4b(0x317)]>=0x1&&_0xba6c57[_0x3e5b4b(0x28a)])_0x537a17=_0xba6c57[_0x3e5b4b(0x28a)],_0xc132e3=_0x406468;else return _0x406468['length']>=0x1?(console[_0x3e5b4b(0x2d7)](_0x3e5b4b(0x2e3)),console[_0x3e5b4b(0x2d7)](_0x3e5b4b(0x30d)),0x1):(console[_0x3e5b4b(0x2d7)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x3e5b4b(0x2d7)](_0x3e5b4b(0x2a1)),0x1);}if(_0xc132e3[_0x3e5b4b(0x317)]===0x0)return console[_0x3e5b4b(0x2d7)](_0x3e5b4b(0x26a)),console[_0x3e5b4b(0x2d7)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x402c88={};try{for(const _0x3e0c17 of _0xc132e3){const {key:_0x2bc0d1,value:_0x22bc6f}=parseKeyValue(_0x3e0c17);_0x402c88[_0x2bc0d1]=_0x22bc6f;}}catch(_0x376308){return _0x376308 instanceof Error&&console['error'](a52_0x3e6dd4[_0x3e5b4b(0x27b)](_0x3e5b4b(0x2fe)),_0x376308['message']),0x1;}const _0x3d9a2a=Object[_0x3e5b4b(0x276)](_0x402c88);_0xba6c57['verbose']&&(console[_0x3e5b4b(0x2d7)](_0x3e5b4b(0x1e6)+_0x537a17),console[_0x3e5b4b(0x2d7)]('Secrets\x20to\x20set:\x20'+_0x3d9a2a[_0x3e5b4b(0x1b9)](',\x20')));const _0x5f15ad=await withSpinner(_0x3d9a2a[_0x3e5b4b(0x317)]===0x1?_0x3e5b4b(0x2e5):_0x3e5b4b(0x231)+_0x3d9a2a['length']+'\x20secrets...',()=>_0x1f5523[_0x3e5b4b(0x2a9)]['setSecrets'](_0x537a17,_0x402c88),{'verbose':_0xba6c57[_0x3e5b4b(0x1c2)]}),_0x283faa=_0x5f15ad[_0x3e5b4b(0x213)];return console[_0x3e5b4b(0x2d7)](_0x3d9a2a[_0x3e5b4b(0x317)]===0x1?'✔\x20Secret\x20\x27'+_0x283faa['keys'][0x0]+_0x3e5b4b(0x293)+_0x283faa[_0x3e5b4b(0x1fe)]+'\x27':'✔\x20'+_0x283faa[_0x3e5b4b(0x276)][_0x3e5b4b(0x317)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x283faa[_0x3e5b4b(0x1fe)]+'\x27'),(_0xba6c57[_0x3e5b4b(0x2f9)]||_0xba6c57['jsonl'])&&await handleSingleObjectOutput(_0x283faa,_0xba6c57),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]='workflow:secrets:delete';[a52_0x23efd3(0x305)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a52_0x23efd3(0x1f3)](_0x5a2464){const _0x2b6ecb=a52_0x23efd3,{options:_0x269e50,args:_0x439829,tdx:_0x2ec532}=_0x5a2464;let _0x2c377b,_0x1f9a19;if(_0x439829['length']>=0x2)_0x2c377b=_0x439829[0x0],_0x1f9a19=_0x439829[0x1];else{if(_0x439829['length']===0x1&&_0x269e50[_0x2b6ecb(0x28a)])_0x2c377b=_0x269e50[_0x2b6ecb(0x28a)],_0x1f9a19=_0x439829[0x0];else return _0x439829[_0x2b6ecb(0x317)]===0x1?(console[_0x2b6ecb(0x2d7)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x2b6ecb(0x2d7)](_0x2b6ecb(0x30d)),0x1):(console['error'](_0x2b6ecb(0x1ba)),console[_0x2b6ecb(0x2d7)](_0x2b6ecb(0x20b)),0x1);}_0x269e50['verbose']&&(console[_0x2b6ecb(0x2d7)](_0x2b6ecb(0x1e6)+_0x2c377b),console[_0x2b6ecb(0x2d7)](_0x2b6ecb(0x17b)+_0x1f9a19));if(!_0x269e50[_0x2b6ecb(0x21b)]){if(!isInteractive())return console[_0x2b6ecb(0x2d7)](a52_0x3e6dd4['red'](_0x2b6ecb(0x1fc)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x2b6ecb(0x2d7)](a52_0x3e6dd4[_0x2b6ecb(0x260)](_0x2b6ecb(0x178))),0x1;const _0x3b3b2b=await confirmKey(_0x2b6ecb(0x172)+_0x1f9a19+_0x2b6ecb(0x31d)+_0x2c377b+'\x27?');if(!_0x3b3b2b)return console[_0x2b6ecb(0x2d7)](a52_0x3e6dd4['yellow'](_0x2b6ecb(0x2f2))),0x1;}const _0x332c40=await withSpinner(_0x2b6ecb(0x1e3),()=>_0x2ec532[_0x2b6ecb(0x2a9)][_0x2b6ecb(0x217)](_0x2c377b,_0x1f9a19),{'verbose':_0x269e50[_0x2b6ecb(0x1c2)]}),_0x256a0c=_0x332c40[_0x2b6ecb(0x213)];return console[_0x2b6ecb(0x2d7)](_0x2b6ecb(0x2ed)+_0x256a0c[_0x2b6ecb(0x303)]+_0x2b6ecb(0x24f)+_0x256a0c[_0x2b6ecb(0x1fe)]+'\x27'),(_0x269e50[_0x2b6ecb(0x2f9)]||_0x269e50[_0x2b6ecb(0x2b7)])&&await handleSingleObjectOutput(_0x256a0c,_0x269e50),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x259c33){const _0x471a48=a52_0x23efd3,_0x276855=Math['floor'](_0x259c33/0x3e8),_0x2b7765=Math['floor'](_0x276855/0x3c),_0x43e2d5=Math[_0x471a48(0x1a5)](_0x2b7765/0x3c),_0xf12f84=Math['floor'](_0x43e2d5/0x18);if(_0xf12f84>0x0){const _0x13d6b5=_0x43e2d5%0x18;return _0x13d6b5>0x0?_0xf12f84+'d\x20'+_0x13d6b5+'h':_0xf12f84+'d';}else{if(_0x43e2d5>0x0){const _0x4c71dd=_0x2b7765%0x3c;return _0x4c71dd>0x0?_0x43e2d5+'h\x20'+_0x4c71dd+'m':_0x43e2d5+'h';}else{if(_0x2b7765>0x0){const _0xc7a32c=_0x276855%0x3c;return _0xc7a32c>0x0?_0x2b7765+'m\x20'+_0xc7a32c+'s':_0x2b7765+'m';}else return _0x276855+'s';}}}function formatTimestamp(_0x6812be,_0x5550f4){const _0x58200f=a52_0x23efd3,_0x4806e0=new Date(_0x6812be),_0x1d8c7e=String(_0x4806e0[_0x58200f(0x211)]())['padStart'](0x2,'0'),_0xdf2bdc=String(_0x4806e0[_0x58200f(0x2b6)]())[_0x58200f(0x239)](0x2,'0'),_0x434d72=_0x1d8c7e+':'+_0xdf2bdc,_0x404ae0=_0x4806e0[_0x58200f(0x20e)]()===_0x5550f4[_0x58200f(0x20e)]()&&_0x4806e0[_0x58200f(0x1ca)]()===_0x5550f4['getMonth']()&&_0x4806e0[_0x58200f(0x2d8)]()===_0x5550f4[_0x58200f(0x2d8)]();if(_0x404ae0)return _0x434d72;else{const _0x5321c5=String(_0x4806e0[_0x58200f(0x1ca)]()+0x1)[_0x58200f(0x239)](0x2,'0'),_0x286dc8=String(_0x4806e0[_0x58200f(0x2d8)]())[_0x58200f(0x239)](0x2,'0');return _0x5321c5+'-'+_0x286dc8+'\x20'+_0x434d72;}}function formatDate(_0x5a9ff9){const _0x2d4e35=a52_0x23efd3,_0x1e1248=_0x5a9ff9[_0x2d4e35(0x20e)](),_0x50c29d=String(_0x5a9ff9[_0x2d4e35(0x1ca)]()+0x1)[_0x2d4e35(0x239)](0x2,'0'),_0x5cefeb=String(_0x5a9ff9[_0x2d4e35(0x2d8)]())[_0x2d4e35(0x239)](0x2,'0');return _0x1e1248+'-'+_0x50c29d+'-'+_0x5cefeb;}function getTaskStateIcon(_0x5b8496){const _0x461d67={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x461d67[_0x5b8496]||'⚪';}function getBarChar(_0x2a080e){const _0x5610f7=a52_0x23efd3;return _0x2a080e===_0x5610f7(0x2d7)||_0x2a080e==='group_error'?'×':'─';}function getBarColor(_0x55521e){const _0x5d0024=a52_0x23efd3,_0x1e48a7={'success':a52_0x3e6dd4[_0x5d0024(0x186)],'error':a52_0x3e6dd4['red'],'group_error':a52_0x3e6dd4[_0x5d0024(0x27b)],'running':a52_0x3e6dd4[_0x5d0024(0x1e2)],'blocked':a52_0x3e6dd4[_0x5d0024(0x1ab)],'planned':a52_0x3e6dd4[_0x5d0024(0x260)],'canceling':a52_0x3e6dd4[_0x5d0024(0x1ab)]};return _0x1e48a7[_0x55521e]||a52_0x3e6dd4[_0x5d0024(0x176)];}function parseTaskName(_0x1d10c1){const _0x210623=a52_0x23efd3;let _0x2d7807=_0x1d10c1[_0x210623(0x22f)](/^\++/,'');const _0x14a638=_0x2d7807[_0x210623(0x1bc)]('+'),_0x5cc2d7=_0x14a638[_0x210623(0x317)]>0x1?_0x14a638[_0x210623(0x317)]-0x2:0x0,_0x24415b=_0x14a638[_0x14a638['length']-0x1]||_0x2d7807;return{'level':_0x5cc2d7,'name':'+'+_0x24415b};}function truncateTaskName(_0x4d2010,_0x4c8022){const _0x3993b8=a52_0x23efd3,_0x196be8=stringWidth(_0x4d2010);if(_0x196be8<=_0x4c8022)return _0x4d2010;let _0x1b2d6a=_0x4d2010;while(stringWidth(_0x1b2d6a+'…')>_0x4c8022&&_0x1b2d6a['length']>0x0){_0x1b2d6a=_0x1b2d6a[_0x3993b8(0x262)](0x0,-0x1);}return _0x1b2d6a+'…';}function calculateTimeScale(_0x518f57,_0x5241a6){const _0x28de2f=a52_0x23efd3;return{'startTime':_0x518f57[_0x28de2f(0x199)],'endTime':_0x518f57[_0x28de2f(0x2d3)],'durationMs':_0x518f57[_0x28de2f(0x1b2)],'msPerChar':_0x518f57[_0x28de2f(0x1b2)]/_0x5241a6};}function timeToPosition(_0x4317b8,_0x3e8c8d,_0x4004e5){const _0x5ceb04=a52_0x23efd3,_0x423952=_0x4317b8-_0x3e8c8d['startTime'],_0x2145be=Math['floor'](_0x423952/_0x3e8c8d[_0x5ceb04(0x17c)]);return Math[_0x5ceb04(0x266)](0x0,Math['min'](_0x2145be,_0x4004e5));}function renderTimeAxis(_0x20dd06,_0x2efa3d){const _0x48a678=a52_0x23efd3,_0x48fd17=Math[_0x48a678(0x2e8)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math['max'](TIMELINE_CONFIG[_0x48a678(0x1d4)],Math[_0x48a678(0x1a5)](_0x2efa3d/TIMELINE_CONFIG[_0x48a678(0x30f)]))),_0xf97b0=_0x20dd06[_0x48a678(0x2ab)]/(_0x48fd17-0x1),_0x51cea9=new Date(_0x20dd06[_0x48a678(0x1f2)]),_0x101ee3=[];for(let _0x4ef725=0x0;_0x4ef725<_0x48fd17;_0x4ef725++){const _0x404f15=_0x20dd06[_0x48a678(0x1f2)]+_0x4ef725*_0xf97b0,_0x281db5=timeToPosition(_0x404f15,_0x20dd06,_0x2efa3d),_0x381797=formatTimestamp(_0x404f15,_0x51cea9);_0x101ee3[_0x48a678(0x236)]({'pos':_0x281db5,'text':_0x381797});}const _0x3016f8=new Array(_0x2efa3d)[_0x48a678(0x20d)]('\x20');let _0xc7b5fb=-0x1;for(const {pos:_0x3858d,text:_0xce3b95}of _0x101ee3){let _0x3ab615=Math[_0x48a678(0x266)](0x0,_0x3858d-Math['floor'](_0xce3b95[_0x48a678(0x317)]/0x2));_0x3ab615<=_0xc7b5fb+TIMELINE_CONFIG[_0x48a678(0x19d)]&&(_0x3ab615=_0xc7b5fb+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x3ab615+_0xce3b95[_0x48a678(0x317)]>_0x2efa3d&&(_0x3ab615=_0x2efa3d-_0xce3b95['length']);if(_0x3ab615>=0x0&&_0x3ab615+_0xce3b95[_0x48a678(0x317)]<=_0x2efa3d&&_0x3ab615>_0xc7b5fb){for(let _0x3af0dd=0x0;_0x3af0dd<_0xce3b95[_0x48a678(0x317)];_0x3af0dd++){_0x3016f8[_0x3ab615+_0x3af0dd]=_0xce3b95[_0x3af0dd];}_0xc7b5fb=_0x3ab615+_0xce3b95['length']-0x1;}}return _0x3016f8[_0x48a678(0x1b9)]('');}function renderTaskRow(_0x114ae7,_0x2db10e,_0x300e24,_0x676b7){const _0x5c21bc=a52_0x23efd3,{level:_0x432a2a,name:_0x383f63}=parseTaskName(_0x114ae7['name']),_0x5db8eb='\x20'[_0x5c21bc(0x1cc)](_0x432a2a),_0xb575a2=_0x114ae7[_0x5c21bc(0x1c9)]?'('+formatElapsed(_0x114ae7['window'][_0x5c21bc(0x1b2)])+')':'',_0x59705b=stringWidth(_0xb575a2),_0x2c6e6f=_0x432a2a*0x1,_0x445760=_0x676b7-_0x2c6e6f-_0x59705b-0x1,_0xf8a9c9=truncateTaskName(_0x383f63,_0x445760),_0x453070=_0x5db8eb+_0xf8a9c9,_0x3b390d=stringWidth(_0x453070),_0x2dcf9b=_0x676b7-_0x3b390d-_0x59705b,_0x13bb26=_0x453070+'\x20'[_0x5c21bc(0x1cc)](Math[_0x5c21bc(0x266)](0x1,_0x2dcf9b))+a52_0x3e6dd4['dim'](_0xb575a2),_0x1576ad=getTaskStateIcon(_0x114ae7[_0x5c21bc(0x203)]),_0xe88203=new Array(_0x300e24)['fill']('\x20');if(_0x114ae7[_0x5c21bc(0x1c9)]){const _0x332ea2=timeToPosition(_0x114ae7['window'][_0x5c21bc(0x199)],_0x2db10e,_0x300e24),_0x40273a=timeToPosition(_0x114ae7[_0x5c21bc(0x1c9)][_0x5c21bc(0x2d3)],_0x2db10e,_0x300e24),_0x324774=getBarChar(_0x114ae7[_0x5c21bc(0x203)]),_0x1e51be=Math[_0x5c21bc(0x266)](_0x332ea2+0x1,_0x40273a);for(let _0x3a30c6=_0x332ea2;_0x3a30c6<Math[_0x5c21bc(0x2e8)](_0x1e51be,_0x300e24);_0x3a30c6++){_0xe88203[_0x3a30c6]=_0x324774;}}const _0x559679=getBarColor(_0x114ae7[_0x5c21bc(0x203)]),_0x5c03be=_0xe88203[_0x5c21bc(0x229)](_0x240a53=>_0x240a53==='\x20'?'\x20':_0x559679(_0x240a53))['join']('');return _0x1576ad+'\x20'+_0x13bb26+'│'+_0x5c03be+'│';}function calculateStats(_0x14131d){const _0x560a55=a52_0x23efd3,_0x444bd2={'total':_0x14131d['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x59d45d of _0x14131d){if(_0x59d45d['state']===_0x560a55(0x181))_0x444bd2['success']++;else{if(_0x59d45d[_0x560a55(0x203)]===_0x560a55(0x2d7)||_0x59d45d[_0x560a55(0x203)]==='group_error')_0x444bd2['error']++;else _0x59d45d[_0x560a55(0x203)]===_0x560a55(0x2f0)?_0x444bd2[_0x560a55(0x2f0)]++:_0x444bd2[_0x560a55(0x25a)]++;}}return _0x444bd2;}function formatStats(_0xd4b6c0){const _0x1c1c9e=a52_0x23efd3;return[_0x1c1c9e(0x24e)+_0xd4b6c0[_0x1c1c9e(0x196)],'✅\x20'+_0xd4b6c0[_0x1c1c9e(0x181)],'❌\x20'+_0xd4b6c0[_0x1c1c9e(0x2d7)],_0x1c1c9e(0x243)+_0xd4b6c0[_0x1c1c9e(0x2f0)],'⏳\x20'+_0xd4b6c0[_0x1c1c9e(0x25a)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a52_0x23efd3(0x26e)]=a52_0x23efd3(0x1ed);['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a52_0x23efd3(0x1f3)](_0x59cfda){const _0x15f422=a52_0x23efd3,{options:_0xf9475e,args:_0x27aba9,tdx:_0x2768c3}=_0x59cfda;let _0x9b728b,_0x50fcf9,_0x39ffd7=![];if(_0x27aba9[0x0]){if(_0x27aba9[0x0][_0x15f422(0x18f)]('.')){const _0x45eebb=this[_0x15f422(0x1c3)](_0x27aba9,_0xf9475e);if(!_0x45eebb)return 0x1;_0x9b728b=_0x45eebb[_0x15f422(0x1fe)],_0x50fcf9=_0x45eebb[_0x15f422(0x25b)];}else{_0x50fcf9=_0x27aba9[0x0],_0x9b728b=_0xf9475e[_0x15f422(0x28a)];if(!_0x9b728b)return console['error'](a52_0x3e6dd4[_0x15f422(0x27b)](_0x15f422(0x2fe)),_0x15f422(0x1e1)),0x1;_0x39ffd7=!![];}}else{const _0x44fdaa=this[_0x15f422(0x1c3)](_0x27aba9,_0xf9475e);if(!_0x44fdaa)return 0x1;_0x9b728b=_0x44fdaa[_0x15f422(0x1fe)],_0x50fcf9=_0x44fdaa['workflowName'];}if(_0xf9475e[_0x15f422(0x1c2)]){if(_0x9b728b&&_0x50fcf9)console[_0x15f422(0x2d7)](_0x15f422(0x314)+_0x9b728b+'.'+_0x50fcf9);else _0x9b728b&&console['error']('Filter:\x20project='+_0x9b728b);}const _0x22bf1e=_0xf9475e['attemptId'],_0x420dca=_0xf9475e['sessionId'];if(_0x22bf1e){_0x420dca&&console[_0x15f422(0x2d7)](a52_0x3e6dd4[_0x15f422(0x1ab)](_0x15f422(0x177)),_0x15f422(0x318));const _0xb00c07=_0xf9475e[_0x15f422(0x2be)];return _0xb00c07?await this[_0x15f422(0x2e2)](_0x59cfda,_0x22bf1e):await this['renderSingleTimeline'](_0x59cfda,_0x22bf1e,_0xf9475e),0x0;}if(_0x420dca){const _0x5946e0=await withSpinner(_0x15f422(0x242),()=>_0x2768c3[_0x15f422(0x2a9)][_0x15f422(0x2fb)]({'projectName':_0x9b728b,'workflowName':_0x50fcf9,'limit':0x64}),{'verbose':_0xf9475e[_0x15f422(0x1c2)]}),_0x547c1e=_0x5946e0[_0x15f422(0x213)][_0x15f422(0x184)](_0x1fbefe=>_0x1fbefe['id']===_0x420dca);if(!_0x547c1e)return console['error'](a52_0x3e6dd4[_0x15f422(0x27b)]('Error:'),_0x15f422(0x2b3)+_0x420dca),0x1;if(!_0x547c1e[_0x15f422(0x2eb)]?.['id'])return console[_0x15f422(0x2d7)](a52_0x3e6dd4['red'](_0x15f422(0x2fe)),_0x15f422(0x19b)+_0x420dca+_0x15f422(0x195)),0x1;const _0xbbbb38=_0x547c1e[_0x15f422(0x2eb)]['id'];_0xf9475e[_0x15f422(0x1c2)]&&console[_0x15f422(0x2d7)](_0x15f422(0x2d5)+_0xbbbb38+_0x15f422(0x2f4)+_0x420dca);const _0x2d1f38=_0xf9475e[_0x15f422(0x2be)];return _0x2d1f38?await this['pollTimeline'](_0x59cfda,_0xbbbb38):await this['renderSingleTimeline'](_0x59cfda,_0xbbbb38,_0xf9475e),0x0;}const _0x56b55c=await withSpinner(_0x15f422(0x179),()=>_0x2768c3[_0x15f422(0x2a9)][_0x15f422(0x2fb)]({'projectName':_0x9b728b,'workflowName':_0x50fcf9,'limit':_0xf9475e[_0x15f422(0x29f)]||0x32}),{'verbose':_0xf9475e[_0x15f422(0x1c2)]}),_0x4c3b58=_0x56b55c[_0x15f422(0x213)];if(_0x4c3b58['length']===0x0){if(_0x9b728b&&_0x50fcf9)console[_0x15f422(0x2d7)]('No\x20sessions\x20found\x20for:\x20'+_0x9b728b+'.'+_0x50fcf9);else _0x9b728b?console['error'](_0x15f422(0x173)+_0x9b728b):(console[_0x15f422(0x2d7)](_0x15f422(0x267)),console['error'](a52_0x3e6dd4[_0x15f422(0x260)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x4c3b58[_0x15f422(0x31a)]((_0x205a83,_0x98c309)=>{const _0x4cb98a=_0x15f422,_0x5a6151=_0x205a83[_0x4cb98a(0x28b)]||'',_0x52edea=_0x98c309['sessionTime']||'';return _0x52edea[_0x4cb98a(0x2a7)](_0x5a6151);});if(_0xf9475e[_0x15f422(0x2f9)]||_0xf9475e['jsonl'])return await handleSDKOutput(_0x4c3b58,_0xf9475e),0x0;let _0x27663b;if(_0x39ffd7){const _0x164319=_0x4c3b58[0x0];if(!_0x164319['lastAttempt']?.['id'])return console[_0x15f422(0x2d7)](_0x15f422(0x19a)),0x0;_0x27663b=_0x164319[_0x15f422(0x2eb)]['id'],_0xf9475e['verbose']&&console[_0x15f422(0x2d7)](_0x15f422(0x16f)+_0x164319[_0x15f422(0x28b)]);}else{const _0x5772f3=_0x4c3b58[_0x15f422(0x229)](_0x564e3a=>{const _0x90d1c=_0x15f422,_0x38a58d=getAttemptStatusDisplay(_0x564e3a[_0x90d1c(0x2eb)]);return{'title':_0x564e3a['project']?.[_0x90d1c(0x26e)]+'.'+_0x564e3a[_0x90d1c(0x2a9)]?.[_0x90d1c(0x26e)]+_0x90d1c(0x190)+_0x564e3a[_0x90d1c(0x28b)]+'\x20'+_0x38a58d[_0x90d1c(0x1ee)],'value':_0x564e3a[_0x90d1c(0x2eb)]?.['id']||'','description':_0x38a58d[_0x90d1c(0x2a8)]};}),_0x52c4d=await a52_0x2a2f9f({'type':_0x15f422(0x1ce),'name':'attemptId','message':_0x15f422(0x2ba),'choices':_0x5772f3['filter'](_0x447320=>_0x447320['value']!=='')});if(!_0x52c4d[_0x15f422(0x1b7)])return 0x0;_0x27663b=_0x52c4d[_0x15f422(0x1b7)];}const _0x23a453=_0xf9475e['follow'];return _0x23a453?await this['pollTimeline'](_0x59cfda,_0x27663b):await this[_0x15f422(0x27d)](_0x59cfda,_0x27663b,_0xf9475e),0x0;}async[a52_0x23efd3(0x27d)](_0x1f169e,_0x449b1d,_0x357fa2){const _0x5bb65b=a52_0x23efd3,{tdx:_0x61bb2f}=_0x1f169e;let _0x453d98,_0x4b84fc;try{[_0x453d98,_0x4b84fc]=await Promise[_0x5bb65b(0x200)]([_0x61bb2f[_0x5bb65b(0x2a9)][_0x5bb65b(0x193)](_0x449b1d),_0x61bb2f[_0x5bb65b(0x2a9)]['tasks'](_0x449b1d,![])]);}catch(_0x5baf0e){console['error'](a52_0x3e6dd4['red']('Failed\x20to\x20fetch\x20attempt\x20data'));_0x357fa2[_0x5bb65b(0x1c2)]&&console[_0x5bb65b(0x2d7)](_0x5baf0e);throw _0x5baf0e;}if(_0x357fa2[_0x5bb65b(0x2f9)]||_0x357fa2[_0x5bb65b(0x2b7)]){const _0x12f4c2=this[_0x5bb65b(0x268)](_0x453d98,_0x4b84fc);await handleSDKOutput([_0x12f4c2],_0x357fa2);return;}const _0x2609c7=_0x61bb2f['context'][_0x5bb65b(0x290)],_0x2a1955=this[_0x5bb65b(0x30e)](_0x453d98,_0x4b84fc,_0x2609c7);console[_0x5bb65b(0x2bc)](_0x2a1955);}async['pollTimeline'](_0x532305,_0x3ab909){const _0x463339=a52_0x23efd3,{tdx:_0x336aed}=_0x532305,_0x3832e0=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x13d01b=TIMELINE_CONFIG[_0x463339(0x1fb)];let _0x28ab9e=0x0;while(_0x28ab9e<_0x13d01b){process[_0x463339(0x19e)][_0x463339(0x18e)]&&process[_0x463339(0x19e)][_0x463339(0x17a)]('\x1bc');let _0x576ac4,_0x25c670;try{[_0x576ac4,_0x25c670]=await Promise[_0x463339(0x200)]([_0x336aed[_0x463339(0x2a9)]['attempt'](_0x3ab909),_0x336aed[_0x463339(0x2a9)][_0x463339(0x2cf)](_0x3ab909,![])]);}catch(_0x4742f6){console['error'](a52_0x3e6dd4[_0x463339(0x27b)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x28ab9e>0x0&&console['error'](a52_0x3e6dd4[_0x463339(0x260)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x28ab9e));throw _0x4742f6;}const _0x175347=_0x336aed[_0x463339(0x279)]['site'],_0x510665=this['renderTimeline'](_0x576ac4,_0x25c670,_0x175347);console[_0x463339(0x2bc)](_0x510665);const _0x258ae6=_0x576ac4['done']&&_0x25c670[_0x463339(0x22d)](_0x58f83b=>_0x58f83b[_0x463339(0x203)]!=='running'&&_0x58f83b[_0x463339(0x203)]!==_0x463339(0x1e7));if(_0x258ae6){console[_0x463339(0x2d7)](a52_0x3e6dd4[_0x463339(0x186)](_0x463339(0x1b5)));break;}console[_0x463339(0x2d7)](a52_0x3e6dd4[_0x463339(0x260)](_0x463339(0x225)+_0x28ab9e*0x2+_0x463339(0x277))),await new Promise(_0x40aaca=>setTimeout(_0x40aaca,_0x3832e0)),_0x28ab9e++;}_0x28ab9e>=_0x13d01b&&console[_0x463339(0x2d7)](a52_0x3e6dd4['yellow'](_0x463339(0x187)));}[a52_0x23efd3(0x30e)](_0x178c2a,_0x209451,_0x55f2c4){const _0x4e952a=a52_0x23efd3,_0x52fb37=[],_0x36642c=TIMELINE_CONFIG[_0x4e952a(0x1c6)],_0x4a8da0=0x5,_0x590033=process[_0x4e952a(0x19e)][_0x4e952a(0x240)]||0x78,_0x9dd0c2=_0x590033-_0x36642c-_0x4a8da0,_0x20381=Math[_0x4e952a(0x266)](TIMELINE_CONFIG[_0x4e952a(0x1d3)],Math[_0x4e952a(0x2e8)](_0x9dd0c2,TIMELINE_CONFIG[_0x4e952a(0x264)])),_0x43af58=new Date(_0x178c2a[_0x4e952a(0x2dc)])[_0x4e952a(0x2bb)](),_0x15594c=_0x178c2a['finishedAt']?new Date(_0x178c2a[_0x4e952a(0x1bb)])['getTime']():Date[_0x4e952a(0x2a4)](),_0x52daed={'start':_0x43af58,'end':_0x15594c,'duration':_0x15594c-_0x43af58},_0xad8118=new Map(),_0x3e43ff=[];for(const _0x398b5e of _0x209451){if(_0x398b5e[_0x4e952a(0x245)]){const _0x132b72=new Date(_0x398b5e[_0x4e952a(0x245)])[_0x4e952a(0x2bb)](),_0x223bbe=_0x398b5e[_0x4e952a(0x2b8)]?new Date(_0x398b5e[_0x4e952a(0x2b8)])[_0x4e952a(0x2bb)]():Date[_0x4e952a(0x2a4)](),_0x2293b2={'start':_0x132b72,'end':_0x223bbe,'duration':_0x223bbe-_0x132b72};_0xad8118[_0x4e952a(0x1b4)](_0x398b5e['id'],_0x2293b2),_0x3e43ff[_0x4e952a(0x236)]({'name':_0x398b5e[_0x4e952a(0x1d8)],'state':_0x398b5e[_0x4e952a(0x203)]||_0x4e952a(0x221),'window':_0x2293b2});}else _0x3e43ff[_0x4e952a(0x236)]({'name':_0x398b5e[_0x4e952a(0x1d8)],'state':_0x398b5e[_0x4e952a(0x203)]||'planned','window':undefined});}_0x3e43ff[_0x4e952a(0x31a)]((_0x1d6efa,_0x183715)=>{const _0x250bd7=_0x4e952a;if(!_0x1d6efa[_0x250bd7(0x1c9)])return 0x1;if(!_0x183715[_0x250bd7(0x1c9)])return-0x1;return _0x1d6efa[_0x250bd7(0x1c9)]['start']-_0x183715['window'][_0x250bd7(0x199)];});const _0x19637c=_0x3e43ff['length'],_0x37ddbd=_0x19637c>TIMELINE_CONFIG[_0x4e952a(0x180)];_0x37ddbd&&_0x3e43ff[_0x4e952a(0x301)](TIMELINE_CONFIG[_0x4e952a(0x180)]);const _0x1030ee=calculateTimeScale(_0x52daed,_0x20381),_0x11ec5f=_0x178c2a[_0x4e952a(0x2a0)]?_0x178c2a[_0x4e952a(0x181)]?a52_0x3e6dd4[_0x4e952a(0x186)](_0x4e952a(0x181)):a52_0x3e6dd4[_0x4e952a(0x27b)](_0x4e952a(0x2d7)):a52_0x3e6dd4[_0x4e952a(0x1e2)](_0x4e952a(0x2f0)),_0x3f23c7=_0x178c2a[_0x4e952a(0x1db)]?.['id'],_0x42c7d1=_0x178c2a[_0x4e952a(0x269)];let _0x26d810;if(_0x3f23c7&&_0x42c7d1){const _0x10d1bc=getWorkflowAttemptUrl(_0x55f2c4,_0x3f23c7,_0x42c7d1,_0x178c2a['id']);_0x26d810=hyperlink(a52_0x3e6dd4[_0x4e952a(0x260)](_0x178c2a['id']),_0x10d1bc);}else _0x26d810=a52_0x3e6dd4['dim'](_0x178c2a['id']);_0x52fb37['push'](_0x4e952a(0x254)+_0x26d810+_0x4e952a(0x190)+_0x11ec5f+'\x20-\x20'+formatElapsed(_0x52daed['duration']));if(_0x3e43ff['length']>0x0){const _0x3dfa97=renderTimeAxis(_0x1030ee,_0x20381),_0x25e379=new Date(_0x52daed[_0x4e952a(0x199)]),_0x344324=formatDate(_0x25e379),_0xd4e12d=TIMELINE_CONFIG[_0x4e952a(0x23f)]+TIMELINE_CONFIG['ICON_SPACING']+_0x36642c,_0x1692bd=_0x344324[_0x4e952a(0x239)](_0xd4e12d),_0x58730e=a52_0x3e6dd4[_0x4e952a(0x260)](_0x1692bd);_0x52fb37[_0x4e952a(0x236)](_0x58730e+'\x20'+_0x3dfa97);for(const _0x3acfc4 of _0x3e43ff){_0x52fb37['push'](renderTaskRow(_0x3acfc4,_0x1030ee,_0x20381,_0x36642c));}const _0x3708a8=calculateStats(_0x3e43ff);_0x52fb37[_0x4e952a(0x236)](formatStats(_0x3708a8)),_0x37ddbd&&_0x52fb37[_0x4e952a(0x236)](a52_0x3e6dd4[_0x4e952a(0x1ab)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x4e952a(0x29c)+_0x19637c+'\x20tasks')),_0x52fb37[_0x4e952a(0x236)](''),_0x52fb37[_0x4e952a(0x236)](a52_0x3e6dd4[_0x4e952a(0x260)]('💡\x20Tip:\x20Use\x20')+('tdx\x20wf\x20attempt\x20'+_0x178c2a['id']+_0x4e952a(0x22c))+a52_0x3e6dd4[_0x4e952a(0x260)](_0x4e952a(0x175)));}else _0x52fb37[_0x4e952a(0x236)](_0x4e952a(0x25d));return _0x52fb37[_0x4e952a(0x1b9)]('\x0a');}[a52_0x23efd3(0x268)](_0x1e2c45,_0x21fa55){const _0x1283d4=a52_0x23efd3,_0x22e17a=new Date(_0x1e2c45[_0x1283d4(0x2dc)])[_0x1283d4(0x2bb)](),_0x5d1749=_0x1e2c45[_0x1283d4(0x1bb)]?new Date(_0x1e2c45[_0x1283d4(0x1bb)])['getTime']():Date['now'](),_0x505551=_0x5d1749-_0x22e17a,_0x3c306f=[];for(const _0x4fc9b5 of _0x21fa55){if(_0x4fc9b5[_0x1283d4(0x245)]){const _0x36d784=new Date(_0x4fc9b5[_0x1283d4(0x245)])[_0x1283d4(0x2bb)](),_0x230ccb=_0x4fc9b5['updatedAt']?new Date(_0x4fc9b5[_0x1283d4(0x2b8)])[_0x1283d4(0x2bb)]():Date['now']();_0x3c306f[_0x1283d4(0x236)]({'name':_0x4fc9b5[_0x1283d4(0x1d8)],'state':_0x4fc9b5[_0x1283d4(0x203)]||_0x1283d4(0x221),'window':{'start':_0x36d784,'end':_0x230ccb,'duration':_0x230ccb-_0x36d784}});}else _0x3c306f['push']({'name':_0x4fc9b5[_0x1283d4(0x1d8)],'state':_0x4fc9b5[_0x1283d4(0x203)]||'planned','window':undefined});}const _0x37d585=calculateStats(_0x3c306f);return{'attempt':{'id':_0x1e2c45['id'],'status':_0x1e2c45['done']?_0x1e2c45[_0x1283d4(0x181)]?'success':_0x1283d4(0x2d7):_0x1283d4(0x2f0),'createdAt':_0x1e2c45[_0x1283d4(0x2dc)],'finishedAt':_0x1e2c45[_0x1283d4(0x1bb)],'duration_ms':_0x505551},'tasks':_0x3c306f['map'](_0x3bb473=>({'name':_0x3bb473[_0x1283d4(0x26e)],'state':_0x3bb473[_0x1283d4(0x203)],'startedAt':_0x3bb473[_0x1283d4(0x1c9)]?new Date(_0x3bb473[_0x1283d4(0x1c9)][_0x1283d4(0x199)])[_0x1283d4(0x212)]():null,'updatedAt':_0x3bb473[_0x1283d4(0x1c9)]?new Date(_0x3bb473[_0x1283d4(0x1c9)][_0x1283d4(0x2d3)])['toISOString']():null,'duration_ms':_0x3bb473[_0x1283d4(0x1c9)]?.[_0x1283d4(0x1b2)]||null})),'stats':_0x37d585};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12839b,_0x59eb59){const _0x594731=a53_0x1503,_0x595302=_0x12839b();while(!![]){try{const _0x47fafd=parseInt(_0x594731(0x1a9))/0x1*(parseInt(_0x594731(0x19f))/0x2)+parseInt(_0x594731(0x19d))/0x3+parseInt(_0x594731(0x1af))/0x4*(-parseInt(_0x594731(0x1a1))/0x5)+parseInt(_0x594731(0x1ac))/0x6*(parseInt(_0x594731(0x1a2))/0x7)+-parseInt(_0x594731(0x1a6))/0x8+-parseInt(_0x594731(0x1ae))/0x9+-parseInt(_0x594731(0x1aa))/0xa*(-parseInt(_0x594731(0x1a0))/0xb);if(_0x47fafd===_0x59eb59)break;else _0x595302['push'](_0x595302['shift']());}catch(_0x190441){_0x595302['push'](_0x595302['shift']());}}}(a53_0x2030,0xa29b9));import{platform}from'os';function a53_0x2030(){const _0x42efe9=['replace','516KDPXGe','tdx/','5104980nzUQhv','134092RZfkgX','Bearer\x20','3293856nULcwK','entries','2IPOByg','5145052AlRHZF','185VwRUDK','87199karPZf','version','tdx',';\x20node/','9183048DbOakd','length','Authorization','984507qSFdgD','10CFjtqV'];a53_0x2030=function(){return _0x42efe9;};return a53_0x2030();}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a53_0x1503(_0x14a325,_0x306238){_0x14a325=_0x14a325-0x19d;const _0x20304d=a53_0x2030();let _0x150399=_0x20304d[_0x14a325];return _0x150399;}export function getUserAgent(){const _0x4b3296=a53_0x1503,_0x20dd51=getVersion(),_0x3dab3e=platform(),_0x2bad76=process[_0x4b3296(0x1a3)][_0x4b3296(0x1ab)]('v','');return _0x4b3296(0x1ad)+_0x20dd51+'\x20('+_0x3dab3e+_0x4b3296(0x1a5)+_0x2bad76+')';}export function getAuthHeaders(_0x8e8c23,_0x5aebe8,_0x39b0c7){const _0x4e6eec=a53_0x1503,_0x5d0256=getVersion(),_0x4dab17={'User-Agent':getUserAgent(),'X-TD-Client':_0x4e6eec(0x1a4),'X-TD-Client-Version':_0x5d0256};if(_0x39b0c7)_0x4dab17['Authorization']=_0x4e6eec(0x1b0)+_0x39b0c7;else _0x5aebe8&&(_0x4dab17[_0x4e6eec(0x1a8)]='TD1\x20'+_0x5aebe8);return _0x4dab17;}export function toHeaderRecord(_0x1627f1){const _0x206609=a53_0x1503,_0x288daa={};for(const [_0x50fee5,_0x2e6a40]of Object[_0x206609(0x19e)](_0x1627f1)){_0x2e6a40!==undefined&&(_0x288daa[_0x50fee5]=_0x2e6a40);}return _0x288daa;}export function getTrinoHeaders(_0x1dfe90,_0x475a8d,_0x3be87c){const _0x80553f=a53_0x1503,_0x322ab0=getAuthHeaders(_0x1dfe90),_0xbc6cdc=toHeaderRecord(_0x322ab0);if(_0x3be87c)_0xbc6cdc[_0x80553f(0x1a8)]=_0x80553f(0x1b0)+_0x3be87c;else _0x475a8d&&(_0xbc6cdc['X-Trino-User']=_0x475a8d);return _0xbc6cdc;}export function hasAPIKey(_0x2cd04e){const _0x5158ce=a53_0x1503,_0xa074e8=getAPIKey();return _0xa074e8!==undefined&&_0xa074e8[_0x5158ce(0x1a7)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5d236f,_0x4456d1){const _0x1dcae5=a54_0x3b9b,_0x401f64=_0x5d236f();while(!![]){try{const _0x5177c4=parseInt(_0x1dcae5(0x189))/0x1*(-parseInt(_0x1dcae5(0x15d))/0x2)+parseInt(_0x1dcae5(0x168))/0x3*(-parseInt(_0x1dcae5(0x151))/0x4)+-parseInt(_0x1dcae5(0x159))/0x5*(parseInt(_0x1dcae5(0x195))/0x6)+parseInt(_0x1dcae5(0x162))/0x7*(-parseInt(_0x1dcae5(0x173))/0x8)+parseInt(_0x1dcae5(0x166))/0x9*(parseInt(_0x1dcae5(0x171))/0xa)+-parseInt(_0x1dcae5(0x191))/0xb*(-parseInt(_0x1dcae5(0x164))/0xc)+parseInt(_0x1dcae5(0x197))/0xd*(parseInt(_0x1dcae5(0x154))/0xe);if(_0x5177c4===_0x4456d1)break;else _0x401f64['push'](_0x401f64['shift']());}catch(_0x129ed1){_0x401f64['push'](_0x401f64['shift']());}}}(a54_0x5889,0xd244b));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a54_0x16f43f from'chalk';function a54_0x3b9b(_0x2c4802,_0x7b6837){_0x2c4802=_0x2c4802-0x151;const _0x58894d=a54_0x5889();let _0x3b9b12=_0x58894d[_0x2c4802];return _0x3b9b12;}import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x976a2){const _0x490390=a54_0x3b9b;return _0x976a2[_0x490390(0x198)]==='json'||_0x976a2[_0x490390(0x198)]==='jsonl'||_0x976a2[_0x490390(0x198)]===_0x490390(0x16f)||_0x976a2[_0x490390(0x198)]===_0x490390(0x188)||_0x976a2['json']===!![]||_0x976a2[_0x490390(0x178)]===!![]||_0x976a2[_0x490390(0x16f)]===!![]||_0x976a2[_0x490390(0x188)]===!![];}export function parseOutputOptions(_0x21aaf9){const _0x5b0a78=a54_0x3b9b;return{'format':_0x21aaf9[_0x5b0a78(0x198)]||_0x5b0a78(0x188),'output':_0x21aaf9[_0x5b0a78(0x194)]||'','limit':_0x21aaf9['limit'],'limitStructuredFormats':_0x21aaf9[_0x5b0a78(0x17f)],'color':_0x21aaf9[_0x5b0a78(0x187)],'noColor':_0x21aaf9[_0x5b0a78(0x19c)]};}function convertSDKResultToQueryResult(_0x33d29f){const _0x4ea0ef=a54_0x3b9b,_0x56d06b=[];if(_0x33d29f[_0x4ea0ef(0x156)]>0x0){const _0x230ec0=_0x33d29f[0x0];for(const [_0x154130,_0x1f9263]of Object['entries'](_0x230ec0)){let _0x5ce830=_0x4ea0ef(0x192);if(typeof _0x1f9263==='number')_0x5ce830=Number[_0x4ea0ef(0x196)](_0x1f9263)?'bigint':'double';else{if(typeof _0x1f9263===_0x4ea0ef(0x199))_0x5ce830=_0x4ea0ef(0x199);else _0x1f9263===null&&(_0x5ce830='varchar');}_0x56d06b[_0x4ea0ef(0x18a)]({'name':_0x154130,'type':_0x5ce830});}}return{'queryId':'sdk-result','columns':_0x56d06b,'data':_0x33d29f,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x33d29f[_0x4ea0ef(0x156)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}function a54_0x5889(){const _0x68772e=['90fVMDaQ','isInteger','10690823xdvvXd','format','boolean','limit','object','noColor','spawn','end','max','rule','134372bEjejc','string','close','14HPwjtK','red','length','stringify','stdout','141425gGMxnS','json','write','[rule]','2624QVKgha','resolve','inherit','stdin','data','7euSOpw','debug','6924bJcxfh','query','897516iAnHNr','number','69YyAerr','split','trim','params','─┬─','filter','entries','tsv','log','20BsAgsc','pipe','628696RuVbfH','isFinite','padEnd','blue','slice','jsonl','magenta','map','stderr','join','No\x20data','repeat','limitStructuredFormats','cmdout','isTTY','[params]','error','cyan','list','bold','color','table','134SBnKok','push','forEach','keys','yellow','[query]','-FXRSn','[logs]','24607JqbiDh','varchar','[error]','output'];a54_0x5889=function(){return _0x68772e;};return a54_0x5889();}export async function formatSDKOutput(_0x1daefc,_0x48454c){const _0x367cb7=convertSDKResultToQueryResult(_0x1daefc);return formatQueryOutput(_0x367cb7,_0x48454c);}export async function formatQueryOutput(_0x112455,_0x16e010){const _0x824ddd=a54_0x3b9b,{format:_0x5942db,limit:_0x273257,output:_0x47db7e,color:_0x355912,noColor:_0x3a5811,limitStructuredFormats:_0x26be0b}=_0x16e010,_0x199ae0=Boolean(_0x47db7e)&&!_0x355912,_0x5a6a2a={'color':_0x355912,'noColor':_0x3a5811||_0x199ae0};if(_0x5942db===_0x824ddd(0x188)){const _0xdfdc4a=shouldUseLess(_0x5942db,_0x47db7e);return formatAsTable(_0x112455,_0x273257,_0xdfdc4a,_0x5a6a2a);}const _0x21569d=_0x26be0b&&Number[_0x824ddd(0x174)](_0x273257)&&_0x112455[_0x824ddd(0x161)][_0x824ddd(0x156)]>_0x273257?{..._0x112455,'data':_0x112455['data'][_0x824ddd(0x177)](0x0,_0x273257)}:_0x112455;if(_0x5942db===_0x824ddd(0x15a))return formatAsJSON(_0x21569d,_0x5a6a2a);else return _0x5942db===_0x824ddd(0x178)?formatAsJSONL(_0x21569d,_0x5a6a2a):formatQueryResult(_0x21569d,_0x5942db);}function shouldUseLess(_0x3770cd,_0x63f8cb){const _0x1324d2=a54_0x3b9b;return(_0x3770cd===_0x1324d2(0x188)||_0x3770cd===_0x1324d2(0x185))&&process[_0x1324d2(0x158)][_0x1324d2(0x181)]&&!_0x63f8cb;}export function resolveOutputOptions(_0x51009b){const _0x141203=a54_0x3b9b,_0x485e67=_0x51009b['output']||'',_0x4537ff=resolveOutputFormat(_0x51009b[_0x141203(0x198)],_0x485e67,_0x141203(0x188));let _0x10c48d=typeof _0x51009b['limit']===_0x141203(0x167)?_0x51009b[_0x141203(0x19a)]:parseInt(_0x51009b[_0x141203(0x19a)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x51009b[_0x141203(0x19a)]===undefined&&shouldUseLess(_0x4537ff,_0x485e67)&&(_0x10c48d=Infinity),{'format':_0x4537ff,'output':_0x485e67,'limit':_0x10c48d,'limitStructuredFormats':_0x51009b[_0x141203(0x17f)],'color':_0x51009b[_0x141203(0x187)],'noColor':_0x51009b[_0x141203(0x19c)]};}export function writeOutput(_0x4bf726,_0x1d0db9,_0x2de771){const _0x2e93ff=a54_0x3b9b;return _0x1d0db9?(writeFileSync(_0x1d0db9,_0x4bf726),console[_0x2e93ff(0x183)]('Results\x20saved\x20to\x20'+_0x1d0db9),Promise[_0x2e93ff(0x15e)]()):shouldUseLess(_0x2de771||'','')?new Promise(_0x45cf30=>{const _0x311e78=_0x2e93ff,_0x3bba01=spawn('less',[_0x311e78(0x18f)],{'stdio':[_0x311e78(0x172),_0x311e78(0x15f),_0x311e78(0x15f)]});let _0x3a0776=![];_0x3bba01['on']('error',()=>{!_0x3a0776&&(_0x3a0776=!![],console['log'](_0x4bf726),_0x45cf30());}),_0x3bba01['on'](_0x311e78(0x153),()=>{!_0x3a0776&&(_0x3a0776=!![],_0x45cf30());}),_0x3bba01['on'](_0x311e78(0x19d),()=>{const _0x10569b=_0x311e78;!_0x3a0776&&_0x3bba01[_0x10569b(0x160)]&&(_0x3bba01[_0x10569b(0x160)]['on'](_0x10569b(0x183),()=>{}),_0x3bba01[_0x10569b(0x160)][_0x10569b(0x15b)](_0x4bf726),_0x3bba01[_0x10569b(0x160)][_0x10569b(0x19e)]());}),!_0x3bba01[_0x311e78(0x160)]&&(!_0x3a0776&&(_0x3a0776=!![],console[_0x311e78(0x170)](_0x4bf726),_0x45cf30()));}):(console[_0x2e93ff(0x170)](_0x4bf726),Promise['resolve']());}export async function handleSDKOutput(_0x5f5d6a,_0x4cf2ee){const _0x3437f3=a54_0x3b9b,_0x92f8ab=resolveOutputOptions(_0x4cf2ee),_0x54c11c=await formatSDKOutput(_0x5f5d6a,_0x92f8ab);await writeOutput(_0x54c11c,_0x92f8ab[_0x3437f3(0x194)]||undefined,_0x92f8ab[_0x3437f3(0x198)]);}export async function handleQueryOutput(_0x35a64a,_0x448585){const _0x1bf8c7=a54_0x3b9b,_0x4ddf62=resolveOutputOptions(_0x448585),_0x599c26=await formatQueryOutput(_0x35a64a,_0x4ddf62);await writeOutput(_0x599c26,_0x4ddf62[_0x1bf8c7(0x194)]||undefined,_0x4ddf62[_0x1bf8c7(0x198)]);}async function formatSingleObject(_0x4bf21b,_0x449af7){const _0x246db9=a54_0x3b9b,{format:_0x10d08c,color:_0x43f80a,noColor:_0x45c6db}=_0x449af7,_0x4bb424={'color':_0x43f80a,'noColor':_0x45c6db};if(_0x10d08c===_0x246db9(0x15a)){if(shouldUseColor(_0x4bb424))return colorizeJSON(_0x4bf21b,_0x4bb424);return JSON[_0x246db9(0x157)](_0x4bf21b,null,0x2);}else{if(_0x10d08c==='jsonl'){if(shouldUseColor(_0x4bb424))return colorizeJSONCompact(_0x4bf21b,_0x4bb424);return JSON[_0x246db9(0x157)](_0x4bf21b);}else{if(_0x10d08c==='tsv')return Object[_0x246db9(0x16e)](_0x4bf21b)['map'](([_0x35f817,_0x3500d1])=>_0x35f817+'\x09'+_0x3500d1)[_0x246db9(0x17c)]('\x0a');else{const _0x194aa8=Object[_0x246db9(0x16e)](_0x4bf21b);if(_0x194aa8['length']===0x0)return _0x246db9(0x17d);const _0x46edc1=_0x4bf21b[_0x246db9(0x163)],_0x5b5d7c=_0x4bf21b['query'],_0x2bded3=_0x4bf21b[_0x246db9(0x16b)],_0x13dbcd=_0x4bf21b[_0x246db9(0x1a0)],_0x1f0417=_0x5b5d7c?typeof _0x5b5d7c===_0x246db9(0x152)?_0x5b5d7c:JSON[_0x246db9(0x157)](_0x5b5d7c,null,0x2):undefined,_0x2f6704=_0x2bded3&&Object[_0x246db9(0x18c)](_0x2bded3)[_0x246db9(0x156)]>0x0?JSON['stringify'](_0x2bded3,null,0x2):undefined,_0x5d34d8=_0x13dbcd&&Object[_0x246db9(0x18c)](_0x13dbcd)[_0x246db9(0x156)]>0x0?JSON[_0x246db9(0x157)](_0x13dbcd,null,0x2):undefined,_0x54e6ea=_0x194aa8[_0x246db9(0x16d)](([_0x3b47eb])=>_0x3b47eb!==_0x246db9(0x163)&&_0x3b47eb!==_0x246db9(0x165)&&_0x3b47eb!==_0x246db9(0x16b)&&_0x3b47eb!=='rule'),_0xf9dc3c=Math[_0x246db9(0x19f)](..._0x54e6ea['map'](([_0x1f927a])=>_0x1f927a[_0x246db9(0x156)])),_0x30dcaf=Math[_0x246db9(0x19f)](..._0x54e6ea[_0x246db9(0x17a)](([,_0x33f321])=>{const _0x566367=_0x246db9;try{const _0x128cd5=_0x33f321===null||_0x33f321===undefined?'':typeof _0x33f321===_0x566367(0x19b)?JSON[_0x566367(0x157)](_0x33f321):String(_0x33f321),_0x2bc882=_0x128cd5[_0x566367(0x169)]('\x0a');return Math[_0x566367(0x19f)](..._0x2bc882['map'](_0x414711=>_0x414711[_0x566367(0x156)]),0x0);}catch{return 0x0;}}),0x14),_0x2181ef=[];_0x2181ef[_0x246db9(0x18a)](colorBorder('┌─'+'─'[_0x246db9(0x17e)](_0xf9dc3c)+_0x246db9(0x16c)+'─'['repeat'](_0x30dcaf)+'─┐',_0x4bb424)),_0x54e6ea[_0x246db9(0x18b)](([_0x22ccf7,_0x107a7f])=>{const _0x2bc75c=_0x246db9;let _0x3a69c8;try{_0x3a69c8=_0x107a7f===null||_0x107a7f===undefined?'':typeof _0x107a7f==='object'?JSON[_0x2bc75c(0x157)](_0x107a7f):String(_0x107a7f);}catch{_0x3a69c8='[Object]';}const _0x469c56=_0x22ccf7[_0x2bc75c(0x175)](_0xf9dc3c),_0x38b690=_0x3a69c8[_0x2bc75c(0x169)]('\x0a');_0x38b690[_0x2bc75c(0x18b)]((_0x37f998,_0x3c5d1a)=>{const _0x12a23e=_0x2bc75c,_0x154616=colorBorder('│',_0x4bb424);_0x3c5d1a===0x0?_0x2181ef[_0x12a23e(0x18a)](_0x154616+'\x20'+_0x469c56+'\x20'+_0x154616+'\x20'+_0x37f998[_0x12a23e(0x175)](_0x30dcaf)+'\x20'+_0x154616):_0x2181ef[_0x12a23e(0x18a)](_0x154616+'\x20'+'\x20'[_0x12a23e(0x17e)](_0xf9dc3c)+'\x20'+_0x154616+'\x20'+_0x37f998[_0x12a23e(0x175)](_0x30dcaf)+'\x20'+_0x154616);});}),_0x2181ef[_0x246db9(0x18a)](colorBorder('└─'+'─'[_0x246db9(0x17e)](_0xf9dc3c)+'─┴─'+'─'['repeat'](_0x30dcaf)+'─┘',_0x4bb424));_0x1f0417&&(_0x2181ef[_0x246db9(0x18a)](''),_0x2181ef[_0x246db9(0x18a)](String(a54_0x16f43f[_0x246db9(0x18d)][_0x246db9(0x186)](_0x246db9(0x18e)))),_0x2181ef[_0x246db9(0x18a)](_0x1f0417));_0x2f6704&&(_0x2181ef['push'](''),_0x2181ef[_0x246db9(0x18a)](String(a54_0x16f43f[_0x246db9(0x176)][_0x246db9(0x186)](_0x246db9(0x182)))),_0x2181ef[_0x246db9(0x18a)](_0x2f6704));_0x5d34d8&&(_0x2181ef[_0x246db9(0x18a)](''),_0x2181ef[_0x246db9(0x18a)](String(a54_0x16f43f[_0x246db9(0x179)]['bold'](_0x246db9(0x15c)))),_0x2181ef[_0x246db9(0x18a)](_0x5d34d8));if(_0x46edc1){if(_0x46edc1['stderr']){_0x2181ef[_0x246db9(0x18a)](''),_0x2181ef[_0x246db9(0x18a)](String(a54_0x16f43f[_0x246db9(0x155)][_0x246db9(0x186)](_0x246db9(0x193))));const _0x3a6a1f=_0x46edc1[_0x246db9(0x17b)][_0x246db9(0x169)]('\x0a');_0x3a6a1f[_0x246db9(0x18b)](_0x652be1=>{const _0x3539ff=_0x246db9;_0x652be1[_0x3539ff(0x16a)]()&&_0x2181ef[_0x3539ff(0x18a)](_0x652be1);});}if(_0x46edc1[_0x246db9(0x180)]){_0x2181ef['push'](''),_0x2181ef[_0x246db9(0x18a)](String(a54_0x16f43f[_0x246db9(0x184)][_0x246db9(0x186)](_0x246db9(0x190))));const _0x4db4c7=_0x46edc1['cmdout'][_0x246db9(0x169)]('\x0a');_0x4db4c7[_0x246db9(0x18b)](_0x38b844=>{const _0x403e19=_0x246db9;_0x38b844[_0x403e19(0x16a)]()&&_0x2181ef[_0x403e19(0x18a)](_0x38b844);});}}return _0x2181ef[_0x246db9(0x17c)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x176cd9,_0x20bc98){const _0x58c053=a54_0x3b9b;if(_0x20bc98['format']===_0x58c053(0x188)){await handleSDKOutput([_0x176cd9],_0x20bc98);return;}const _0x1b671e=resolveOutputOptions(_0x20bc98),_0x3a0d80=await formatSingleObject(_0x176cd9,_0x1b671e);await writeOutput(_0x3a0d80,_0x1b671e[_0x58c053(0x194)]||undefined,_0x1b671e[_0x58c053(0x198)]);}
|
|
1
|
+
(function(_0x98f1dc,_0x37ddaf){const _0x428829=a54_0x2ff6,_0x533ee8=_0x98f1dc();while(!![]){try{const _0x38b0be=parseInt(_0x428829(0x1ff))/0x1*(parseInt(_0x428829(0x1ed))/0x2)+parseInt(_0x428829(0x220))/0x3*(parseInt(_0x428829(0x202))/0x4)+-parseInt(_0x428829(0x214))/0x5*(-parseInt(_0x428829(0x208))/0x6)+-parseInt(_0x428829(0x22f))/0x7+-parseInt(_0x428829(0x1f6))/0x8*(-parseInt(_0x428829(0x1ec))/0x9)+parseInt(_0x428829(0x209))/0xa*(-parseInt(_0x428829(0x1f4))/0xb)+-parseInt(_0x428829(0x1eb))/0xc*(-parseInt(_0x428829(0x1fb))/0xd);if(_0x38b0be===_0x37ddaf)break;else _0x533ee8['push'](_0x533ee8['shift']());}catch(_0x3e6eba){_0x533ee8['push'](_0x533ee8['shift']());}}}(a54_0x13ed,0x6a1fc));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a54_0x2ff6(_0x32594c,_0x465b42){_0x32594c=_0x32594c-0x1e6;const _0x13edcf=a54_0x13ed();let _0x2ff6ed=_0x13edcf[_0x32594c];return _0x2ff6ed;}function a54_0x13ed(){const _0x4dc281=['table','[params]','error','19308YGieRd','170nHAnrH','[logs]','jsonl','data','[rule]','rule','double','split','output','boolean','resolve','260sOQIJm','pipe','stdin','push','─┴─','bold','trim','debug','sdk-result','json','less','padEnd','4023WNQohy','params','inherit','forEach','list','magenta','Results\x20saved\x20to\x20','log','number','stderr','blue','keys','spawn','repeat','join','1221542UjiIIo','color','tsv','yellow','cmdout','limitStructuredFormats','228Ewehcn','2232909hLxIEf','2VlWktx','[error]','format','length','map','string','entries','361240JdRzew','max','16svYhkC','isTTY','noColor','red','limit','16276WYRjsP','object','isFinite','varchar','382251uUdoKM','stringify','─┬─','292YkmFha','write','stdout'];a54_0x13ed=function(){return _0x4dc281;};return a54_0x13ed();}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a54_0x2b8890 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x28e860){const _0x2c0e90=a54_0x2ff6;return _0x28e860[_0x2c0e90(0x1ef)]===_0x2c0e90(0x21d)||_0x28e860[_0x2c0e90(0x1ef)]===_0x2c0e90(0x20b)||_0x28e860[_0x2c0e90(0x1ef)]===_0x2c0e90(0x1e7)||_0x28e860[_0x2c0e90(0x1ef)]===_0x2c0e90(0x205)||_0x28e860['json']===!![]||_0x28e860[_0x2c0e90(0x20b)]===!![]||_0x28e860[_0x2c0e90(0x1e7)]===!![]||_0x28e860['table']===!![];}export function parseOutputOptions(_0x5c1937){const _0x996abf=a54_0x2ff6;return{'format':_0x5c1937[_0x996abf(0x1ef)]||_0x996abf(0x205),'output':_0x5c1937[_0x996abf(0x211)]||'','limit':_0x5c1937['limit'],'limitStructuredFormats':_0x5c1937[_0x996abf(0x1ea)],'color':_0x5c1937[_0x996abf(0x1e6)],'noColor':_0x5c1937[_0x996abf(0x1f8)]};}function convertSDKResultToQueryResult(_0x17e11f){const _0x3d7192=a54_0x2ff6,_0x432ffc=[];if(_0x17e11f[_0x3d7192(0x1f0)]>0x0){const _0x2e2d05=_0x17e11f[0x0];for(const [_0x49b20e,_0x21cb6a]of Object[_0x3d7192(0x1f3)](_0x2e2d05)){let _0x1c7416=_0x3d7192(0x1fe);if(typeof _0x21cb6a==='number')_0x1c7416=Number['isInteger'](_0x21cb6a)?'bigint':_0x3d7192(0x20f);else{if(typeof _0x21cb6a==='boolean')_0x1c7416=_0x3d7192(0x212);else _0x21cb6a===null&&(_0x1c7416=_0x3d7192(0x1fe));}_0x432ffc[_0x3d7192(0x217)]({'name':_0x49b20e,'type':_0x1c7416});}}return{'queryId':_0x3d7192(0x21c),'columns':_0x432ffc,'data':_0x17e11f,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x17e11f['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x43a9f7,_0x3ac3ca){const _0x533010=convertSDKResultToQueryResult(_0x43a9f7);return formatQueryOutput(_0x533010,_0x3ac3ca);}export async function formatQueryOutput(_0xcb0ed8,_0x1fdcfc){const _0x4a0e25=a54_0x2ff6,{format:_0x2f1aff,limit:_0x2920c0,output:_0x2b2ec5,color:_0x1986da,noColor:_0x5d139b,limitStructuredFormats:_0x8fe111}=_0x1fdcfc,_0x14595d=Boolean(_0x2b2ec5)&&!_0x1986da,_0xc4a55={'color':_0x1986da,'noColor':_0x5d139b||_0x14595d};if(_0x2f1aff===_0x4a0e25(0x205)){const _0x1c913d=shouldUseLess(_0x2f1aff,_0x2b2ec5);return formatAsTable(_0xcb0ed8,_0x2920c0,_0x1c913d,_0xc4a55);}const _0x4d6887=_0x8fe111&&Number[_0x4a0e25(0x1fd)](_0x2920c0)&&_0xcb0ed8[_0x4a0e25(0x20c)][_0x4a0e25(0x1f0)]>_0x2920c0?{..._0xcb0ed8,'data':_0xcb0ed8[_0x4a0e25(0x20c)]['slice'](0x0,_0x2920c0)}:_0xcb0ed8;if(_0x2f1aff===_0x4a0e25(0x21d))return formatAsJSON(_0x4d6887,_0xc4a55);else return _0x2f1aff===_0x4a0e25(0x20b)?formatAsJSONL(_0x4d6887,_0xc4a55):formatQueryResult(_0x4d6887,_0x2f1aff);}function shouldUseLess(_0x440d63,_0x42f1c9){const _0x394237=a54_0x2ff6;return(_0x440d63===_0x394237(0x205)||_0x440d63===_0x394237(0x224))&&process[_0x394237(0x204)][_0x394237(0x1f7)]&&!_0x42f1c9;}export function resolveOutputOptions(_0x47d503){const _0x2a5bbf=a54_0x2ff6,_0x236da1=_0x47d503[_0x2a5bbf(0x211)]||'',_0x1f2b7b=resolveOutputFormat(_0x47d503[_0x2a5bbf(0x1ef)],_0x236da1,_0x2a5bbf(0x205));let _0x1283b0=typeof _0x47d503[_0x2a5bbf(0x1fa)]===_0x2a5bbf(0x228)?_0x47d503[_0x2a5bbf(0x1fa)]:parseInt(_0x47d503['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x47d503[_0x2a5bbf(0x1fa)]===undefined&&shouldUseLess(_0x1f2b7b,_0x236da1)&&(_0x1283b0=Infinity),{'format':_0x1f2b7b,'output':_0x236da1,'limit':_0x1283b0,'limitStructuredFormats':_0x47d503[_0x2a5bbf(0x1ea)],'color':_0x47d503['color'],'noColor':_0x47d503['noColor']};}export function writeOutput(_0xe93d5c,_0x20599c,_0xff028d){const _0x4d73bb=a54_0x2ff6;return _0x20599c?(writeFileSync(_0x20599c,_0xe93d5c),console[_0x4d73bb(0x207)](_0x4d73bb(0x226)+_0x20599c),Promise['resolve']()):shouldUseLess(_0xff028d||'','')?new Promise(_0x1876a4=>{const _0x1dfde0=_0x4d73bb,_0x1fa2e5=spawn(_0x1dfde0(0x21e),['-FXRSn'],{'stdio':[_0x1dfde0(0x215),_0x1dfde0(0x222),_0x1dfde0(0x222)]});let _0x4f20d1=![];_0x1fa2e5['on'](_0x1dfde0(0x207),()=>{const _0x252320=_0x1dfde0;!_0x4f20d1&&(_0x4f20d1=!![],console[_0x252320(0x227)](_0xe93d5c),_0x1876a4());}),_0x1fa2e5['on']('close',()=>{!_0x4f20d1&&(_0x4f20d1=!![],_0x1876a4());}),_0x1fa2e5['on'](_0x1dfde0(0x22c),()=>{const _0x500cbc=_0x1dfde0;!_0x4f20d1&&_0x1fa2e5[_0x500cbc(0x216)]&&(_0x1fa2e5[_0x500cbc(0x216)]['on']('error',()=>{}),_0x1fa2e5[_0x500cbc(0x216)][_0x500cbc(0x203)](_0xe93d5c),_0x1fa2e5[_0x500cbc(0x216)]['end']());}),!_0x1fa2e5[_0x1dfde0(0x216)]&&(!_0x4f20d1&&(_0x4f20d1=!![],console[_0x1dfde0(0x227)](_0xe93d5c),_0x1876a4()));}):(console[_0x4d73bb(0x227)](_0xe93d5c),Promise[_0x4d73bb(0x213)]());}export async function handleSDKOutput(_0x3bb421,_0x5e461e){const _0x5a4866=resolveOutputOptions(_0x5e461e),_0x55cdea=await formatSDKOutput(_0x3bb421,_0x5a4866);await writeOutput(_0x55cdea,_0x5a4866['output']||undefined,_0x5a4866['format']);}export async function handleQueryOutput(_0xc0a66,_0x28b89b){const _0x50bb03=a54_0x2ff6,_0xb13d60=resolveOutputOptions(_0x28b89b),_0x472b03=await formatQueryOutput(_0xc0a66,_0xb13d60);await writeOutput(_0x472b03,_0xb13d60[_0x50bb03(0x211)]||undefined,_0xb13d60[_0x50bb03(0x1ef)]);}async function formatSingleObject(_0x1d65e9,_0x9bc8b3){const _0x5aad40=a54_0x2ff6,{format:_0x4dab14,color:_0x59fc74,noColor:_0x2274f9}=_0x9bc8b3,_0x33ca66={'color':_0x59fc74,'noColor':_0x2274f9};if(_0x4dab14===_0x5aad40(0x21d)){if(shouldUseColor(_0x33ca66))return colorizeJSON(_0x1d65e9,_0x33ca66);return JSON['stringify'](_0x1d65e9,null,0x2);}else{if(_0x4dab14===_0x5aad40(0x20b)){if(shouldUseColor(_0x33ca66))return colorizeJSONCompact(_0x1d65e9,_0x33ca66);return JSON[_0x5aad40(0x200)](_0x1d65e9);}else{if(_0x4dab14===_0x5aad40(0x1e7))return Object[_0x5aad40(0x1f3)](_0x1d65e9)[_0x5aad40(0x1f1)](([_0x2ab5e2,_0x6b5bb7])=>_0x2ab5e2+'\x09'+_0x6b5bb7)['join']('\x0a');else{const _0x5d9f3a=Object[_0x5aad40(0x1f3)](_0x1d65e9);if(_0x5d9f3a[_0x5aad40(0x1f0)]===0x0)return'No\x20data';const _0x1c0ce0=_0x1d65e9[_0x5aad40(0x21b)],_0x152cb8=_0x1d65e9['query'],_0x3fdd0d=_0x1d65e9[_0x5aad40(0x221)],_0x4659bb=_0x1d65e9[_0x5aad40(0x20e)],_0x557015=_0x152cb8?typeof _0x152cb8===_0x5aad40(0x1f2)?_0x152cb8:JSON[_0x5aad40(0x200)](_0x152cb8,null,0x2):undefined,_0x6b3688=_0x3fdd0d&&Object[_0x5aad40(0x22b)](_0x3fdd0d)[_0x5aad40(0x1f0)]>0x0?JSON[_0x5aad40(0x200)](_0x3fdd0d,null,0x2):undefined,_0x2cbfa7=_0x4659bb&&Object[_0x5aad40(0x22b)](_0x4659bb)[_0x5aad40(0x1f0)]>0x0?JSON['stringify'](_0x4659bb,null,0x2):undefined,_0x52322b=_0x5d9f3a['filter'](([_0x585db8])=>_0x585db8!==_0x5aad40(0x21b)&&_0x585db8!=='query'&&_0x585db8!==_0x5aad40(0x221)&&_0x585db8!==_0x5aad40(0x20e)),_0x423c27=Math[_0x5aad40(0x1f5)](..._0x52322b[_0x5aad40(0x1f1)](([_0x1cba65])=>_0x1cba65[_0x5aad40(0x1f0)])),_0x3973b3=Math['max'](..._0x52322b['map'](([,_0x5a37d9])=>{const _0x57a593=_0x5aad40;try{const _0x166c96=_0x5a37d9===null||_0x5a37d9===undefined?'':typeof _0x5a37d9==='object'?JSON[_0x57a593(0x200)](_0x5a37d9):String(_0x5a37d9),_0x263686=_0x166c96['split']('\x0a');return Math[_0x57a593(0x1f5)](..._0x263686[_0x57a593(0x1f1)](_0x1868cb=>_0x1868cb[_0x57a593(0x1f0)]),0x0);}catch{return 0x0;}}),0x14),_0x8f0d46=[];_0x8f0d46['push'](colorBorder('┌─'+'─'[_0x5aad40(0x22d)](_0x423c27)+_0x5aad40(0x201)+'─'['repeat'](_0x3973b3)+'─┐',_0x33ca66)),_0x52322b[_0x5aad40(0x223)](([_0x159cf5,_0x4741f2])=>{const _0x361044=_0x5aad40;let _0x587cdc;try{_0x587cdc=_0x4741f2===null||_0x4741f2===undefined?'':typeof _0x4741f2===_0x361044(0x1fc)?JSON['stringify'](_0x4741f2):String(_0x4741f2);}catch{_0x587cdc='[Object]';}const _0xd424ce=_0x159cf5[_0x361044(0x21f)](_0x423c27),_0x158447=_0x587cdc[_0x361044(0x210)]('\x0a');_0x158447['forEach']((_0x35d736,_0x1d6daa)=>{const _0xebba95=_0x361044,_0x292740=colorBorder('│',_0x33ca66);_0x1d6daa===0x0?_0x8f0d46[_0xebba95(0x217)](_0x292740+'\x20'+_0xd424ce+'\x20'+_0x292740+'\x20'+_0x35d736[_0xebba95(0x21f)](_0x3973b3)+'\x20'+_0x292740):_0x8f0d46['push'](_0x292740+'\x20'+'\x20'[_0xebba95(0x22d)](_0x423c27)+'\x20'+_0x292740+'\x20'+_0x35d736[_0xebba95(0x21f)](_0x3973b3)+'\x20'+_0x292740);});}),_0x8f0d46[_0x5aad40(0x217)](colorBorder('└─'+'─'['repeat'](_0x423c27)+_0x5aad40(0x218)+'─'[_0x5aad40(0x22d)](_0x3973b3)+'─┘',_0x33ca66));_0x557015&&(_0x8f0d46['push'](''),_0x8f0d46['push'](String(a54_0x2b8890[_0x5aad40(0x1e8)][_0x5aad40(0x219)]('[query]'))),_0x8f0d46[_0x5aad40(0x217)](_0x557015));_0x6b3688&&(_0x8f0d46[_0x5aad40(0x217)](''),_0x8f0d46[_0x5aad40(0x217)](String(a54_0x2b8890[_0x5aad40(0x22a)][_0x5aad40(0x219)](_0x5aad40(0x206)))),_0x8f0d46[_0x5aad40(0x217)](_0x6b3688));_0x2cbfa7&&(_0x8f0d46[_0x5aad40(0x217)](''),_0x8f0d46[_0x5aad40(0x217)](String(a54_0x2b8890[_0x5aad40(0x225)][_0x5aad40(0x219)](_0x5aad40(0x20d)))),_0x8f0d46[_0x5aad40(0x217)](_0x2cbfa7));if(_0x1c0ce0){if(_0x1c0ce0[_0x5aad40(0x229)]){_0x8f0d46[_0x5aad40(0x217)](''),_0x8f0d46[_0x5aad40(0x217)](String(a54_0x2b8890[_0x5aad40(0x1f9)][_0x5aad40(0x219)](_0x5aad40(0x1ee))));const _0x2449ec=_0x1c0ce0[_0x5aad40(0x229)][_0x5aad40(0x210)]('\x0a');_0x2449ec['forEach'](_0x516eb4=>{const _0x2676ca=_0x5aad40;_0x516eb4[_0x2676ca(0x21a)]()&&_0x8f0d46[_0x2676ca(0x217)](_0x516eb4);});}if(_0x1c0ce0[_0x5aad40(0x1e9)]){_0x8f0d46[_0x5aad40(0x217)](''),_0x8f0d46[_0x5aad40(0x217)](String(a54_0x2b8890['cyan'][_0x5aad40(0x219)](_0x5aad40(0x20a))));const _0x5d0da0=_0x1c0ce0[_0x5aad40(0x1e9)][_0x5aad40(0x210)]('\x0a');_0x5d0da0[_0x5aad40(0x223)](_0x4d9d45=>{const _0x490b4e=_0x5aad40;_0x4d9d45[_0x490b4e(0x21a)]()&&_0x8f0d46[_0x490b4e(0x217)](_0x4d9d45);});}}return _0x8f0d46[_0x5aad40(0x22e)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x396dfb,_0x3568cd){const _0x29df9e=a54_0x2ff6;if(_0x3568cd[_0x29df9e(0x1ef)]===_0x29df9e(0x205)){await handleSDKOutput([_0x396dfb],_0x3568cd);return;}const _0x13ec77=resolveOutputOptions(_0x3568cd),_0x26dd6b=await formatSingleObject(_0x396dfb,_0x13ec77);await writeOutput(_0x26dd6b,_0x13ec77[_0x29df9e(0x211)]||undefined,_0x13ec77[_0x29df9e(0x1ef)]);}
|