@treasuredata/tdx 2026.3.45 → 2026.3.46
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/cas-command.js +1 -1
- package/dist/commands/cas-segment-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/work-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/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.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/types/workspace.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/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.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 a55_0x312470=a55_0x1a70;(function(_0x514aca,_0x3b341f){const _0x393e6f=a55_0x1a70,_0x25915d=_0x514aca();while(!![]){try{const _0x1a330a=parseInt(_0x393e6f(0x207))/0x1*(parseInt(_0x393e6f(0x205))/0x2)+-parseInt(_0x393e6f(0x254))/0x3*(-parseInt(_0x393e6f(0x157))/0x4)+-parseInt(_0x393e6f(0x196))/0x5+-parseInt(_0x393e6f(0x230))/0x6*(-parseInt(_0x393e6f(0x1b1))/0x7)+parseInt(_0x393e6f(0xee))/0x8+-parseInt(_0x393e6f(0x1a5))/0x9+parseInt(_0x393e6f(0x267))/0xa;if(_0x1a330a===_0x3b341f)break;else _0x25915d['push'](_0x25915d['shift']());}catch(_0x4f87be){_0x25915d['push'](_0x25915d['shift']());}}}(a55_0x491f,0x3080f));import a55_0x3d25b from'chalk';import{existsSync}from'fs';import a55_0x297239 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 a55_0x3870e8 from'prompts';function getAttemptStatusDisplay(_0x2f66d8){const _0x5b2ac7=a55_0x1a70;if(!_0x2f66d8)return{'icon':'⏳','text':''};const {done:_0x53c8b2,success:_0x118b9f,cancelRequested:_0x40fbac}=_0x2f66d8;if(!_0x53c8b2)return _0x40fbac?{'icon':'🛑','text':a55_0x3d25b[_0x5b2ac7(0x201)](_0x5b2ac7(0xff))}:{'icon':'🔄','text':a55_0x3d25b['blue']('running')};if(_0x118b9f)return{'icon':'✅','text':a55_0x3d25b[_0x5b2ac7(0x228)](_0x5b2ac7(0x219))};return{'icon':'❌','text':a55_0x3d25b[_0x5b2ac7(0x186)](_0x5b2ac7(0x143))};}function a55_0x491f(){const _0x1d3738=['\x20\x20Session\x20ID:\x20','resolveProjectId','LABEL_MIN_SPACING','✔\x20Clone\x20complete','⚠\x20Showing\x20first\x20','sessions','Dry\x20run:\x20yes','projects','value','Listing\x20workflow\x20projects...','Error:\x20Secret\x20key\x20is\x20required','getMonth','end','log','startsWith','Using\x20attempt\x20','MAX_LABEL_COUNT','retryAttemptName','workflow:logs','pollTimeline','\x27...','icon','revision','requireProject','\x20\x20Revision:\x20','workflow:tasks','isTTY','Loading\x20workflows...','navigateSessionsInteractive','list','targetExists','GUTTER','context','✔\x20Project:\x20','ICON_WIDTH','group_error','readFile','find','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Select\x20a\x20task\x20to\x20view\x20logs:','Filter:\x20','No\x20projects\x20match\x20pattern:\x20','workflow:workflows','follow','parse','\x20to\x20see\x20detailed\x20logs','Project\x20name:\x20','No\x20workflows\x20found','now','Listing\x20secrets...','toISOString','→\x20New\x20project:\x20','repeat','List\x20workflow\x20attempts','renderTimeline','Analyzing\x20project...','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Invalid\x20format:\x20','\x20\x20Console:\x20','\x0aPolling...\x20(','MAX_TASKS_DISPLAY','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Start\x20a\x20workflow\x20run','set','status','\x20tasks','dryRun','Cancelled','\x20modified','\x20logs','Retry\x20a\x20session\x20or\x20attempt','workflow:upload','yellow','Validation:\x20skipped','No\x20matching\x20sessions\x20found','MIN_TIMELINE_WIDTH','31294dSmLmo','data','24sMfqJZ','Select\x20a\x20workflow\x20to\x20run','slice','split','workflow:secrets:set','length','name','cwd','Status:\x20','map','resolve','/sessions/','\x20secret','✔\x20Pull\x20complete','new','getDate','(use\x20--limit\x20to\x20see\x20more)','prepareCloneProject','success','fs/promises','Listing\x20workflow\x20attempts...','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Tip:\x20cd\x20to\x20workflows/','message','retryAttempt','select','workflow:secrets:delete','Starting\x20workflow\x20run...','workflow:sessions','tdx.json','No\x20sessions\x20with\x20timing\x20information','Fetching\x20log\x20files...','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','green','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','projectId','Error:\x20Project\x20name\x20is\x20required','displayLine','\x20deleted','\x20project','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','1182sfXhyQ','Kill\x20a\x20running\x20attempt','POLL_INTERVAL_MS','sessionId','No\x20sessions\x20found\x20in\x20project:\x20','all','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Include\x20retried:\x20yes','filesExtracted','Error:','Project\x20name\x20is\x20required','\x20unchanged','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','splice','Filter:\x20project=','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Killing\x20attempt...','table','jsonl','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Updating\x20','fill','deleted','Source\x20directory\x20is\x20required','Source\x20directory:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Resolving\x20project\x20\x27','resolveProjectDir','durationMs','Source\x20project:\x20','preparePushProject','/attempt/','getMinutes','(unknown)','planned','Key\x20cannot\x20be\x20empty','111bbmXig','setSecrets','\x27\x20from\x20project\x20\x27','\x20\x20Session\x20context\x20set\x20to:\x20','Deleting\x20project\x20','includeSubtasks','Target:\x20','has','text','params','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Session\x20','Attempt\x20ID:\x20','Project:\x20','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','buildTimelineData','Task\x20name:\x20','cancelRequested','sessionTime','310160RyFnSF','\x20sessions\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','every','\x20(use\x20--limit\x20to\x20show\x20more)','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','index','msPerChar','No\x20attempts\x20found\x20in\x20project:\x20','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','sys','✔\x20Secret\x20\x27','attempt:','Usage:\x20tdx\x20wf\x20use\x20<project>','fullName','Listing\x20workflows...','showWorkflowConsoleUrl','autocomplete','workflow:secrets:list','Setting\x20secret...','relative','limit','Files\x20to\x20upload:\x20','some','Getting\x20attempt\x20tasks...','json','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','sort','Pull\x20workflow\x20project\x20to\x20local\x20folder','📁\x20','renderSingleTimeline','✔\x20Workflow\x20run\x20started','List\x20workflows','Show\x20tasks\x20for\x20an\x20attempt','Revision:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','session','\x0aApply\x20these\x20changes?','Warning:','pullProject','session_id','Workflow:\x20','padStart','Listing\x20workflow\x20sessions...','taskName','stat','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','stringify','Getting\x20attempt\x20details...','\x0a⚠\x20Project\x20\x22','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','task','No\x20sessions\x20found','220248JOFuVd','Output\x20directory:\x20','📋\x20','finishedAt','stdout','Project\x20filter:\x20','sourceProjectName','white','kill','round','format','modified','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','pending','deleteSecret','workflows','max','canceling','Session\x20time:\x20','size','verbose','parseProjectWorkflowPattern','type','getHours','from','localeCompare','Loading\x20session...','rows','startedAt','workflow:run','newProjectName','workflowProject','force','fileCount','ICON_SPACING','No\x20workflows\x20found\x20in\x20project:\x20','No\x20sessions\x20found\x20for:\x20','\x20\x20Location:\x20','changes','dim','\x1b[1A\x1b[2K','listSecrets','\x20\x20tdx\x20wf\x20use\x20<project>','\x0aFailed\x20to\x20fetch\x20attempt\x20data','No\x20workflow\x20tdx.json\x20found','duration','projectName','Retrying\x20session...','cyan','sourceDir','getFullYear','✔\x20Push\x20complete','-\x20nothing\x20pushed','join','push','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','skipValidation','\x22\x20to\x20new\x20project\x20\x22','blue','No\x20log\x20content\x20found','targetDir','\x22\x20already\x20exists\x20(ID:\x20','state','List\x20all\x20workflow\x20projects','\x20\x20Source:\x20','resolveProject','Deleting\x20secret...','executeCloneProject','param','\x20\x20Workflow:\x20','includes','\x0aDry\x20run\x20-\x20nothing\x20pushed','MIN_LABEL_COUNT','project','...','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','tasks','workflow:pull','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','\x20secrets...','updatedAt','attempts','\x20session','revision:\x20','\x20\x20Changes:\x20','error','fromTask','key','lastAttempt','columns','renderSessionsTimeline','Pushing\x20workflow\x20project...','\x20new','\x20\x20Project\x20ID:\x20','Setting\x20','filter','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','generateSessionTimelineRows','Secrets\x20to\x20set:\x20','tdx\x20wf\x20attempt\x20','Error:\x20Attempt\x20ID\x20is\x20required','utf-8','Auto-selected\x20latest\x20session:\x20','✔\x20Deleted\x20project\x20','done','19680retIHR','\x20-\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','existingProjectId','startTime','description','attempt','\x0aClone\x20\x22','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','min','running','title','\x0aError:','workflow:timeline','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','keys','No\x20attempts\x20found\x20for:\x20','workflow:use','hasChanges','\x20\x20Attempt\x20ID:\x20','substring','✔\x20Pushed\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','workflow:attempt','✔\x20Retry\x20started','newProjectId','Parameters:\x20','total','unchanged','✔\x20Showing\x20','No\x20workflow\x20sessions\x20found','\x20(system)','isDirectory','workflow','\x20is\x20not\x20a\x20directory','yes','basename','workflowName','indexOf','\x0aDry\x20run\x20-\x20no\x20files\x20written','write','getTime','workflow:clone','→\x20Project:\x20','unknown','session:','\x22\x20with\x20new\x20revision?','red','workflow:push','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','match','includeRetried','From\x20task:\x20','attemptId','✔\x20Workflow\x20project\x20context\x20cleared.','logs','Failed\x20to\x20fetch\x20attempt\x20data','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Select\x20a\x20session\x20to\x20view\x20timeline:','execute','\x0a✔\x20No\x20changes\x20to\x20push','output','site','1966200rkqjyT','retrySession','values','\x20secrets\x20set\x20for\x20project\x20\x27','Downloading\x20logs...','summary','\x20\x20New\x20attempt\x20ID:\x20','workflow:attempts','Total:\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x20\x20Project:\x20','No\x20workflow\x20projects\x20found','Project\x20directory:\x20','\x0aPush\x20these\x20changes?','createdAt','2095443TMqJZe','Retrying\x20attempt...','✔\x20Found\x20','Expected\x20format:\x20--param\x20key=value','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','toLowerCase','Analyzing\x20changes...','window','isArray','start','7413tYJlrX','Show\x20specific\x20attempt\x20details','path','isNewProject','diff','trimEnd','floor','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>'];a55_0x491f=function(){return _0x1d3738;};return a55_0x491f();}export class WorkflowBaseCommand extends BaseCommand{[a55_0x312470(0x12f)](_0x27122e,_0x53e938,_0x715246=0x0){const _0x51fa3a=a55_0x312470;return _0x27122e[_0x715246]||_0x53e938[_0x51fa3a(0x10d)];}[a55_0x312470(0x1d0)](_0x445a1e,_0x1897ba,_0x36c2b5=0x0){const _0x510e02=a55_0x312470,_0x3def75=this[_0x510e02(0x12f)](_0x445a1e,_0x1897ba,_0x36c2b5);if(!_0x3def75)return console[_0x510e02(0x143)](a55_0x3d25b['red'](_0x510e02(0x239)),_0x510e02(0x23a)),console['error'](a55_0x3d25b['dim'](_0x510e02(0x1ab))),null;return _0x3def75;}['parseProjectWorkflowPattern'](_0x233dd8,_0x8e403d){const _0x29595c=a55_0x312470;if(_0x233dd8[0x0]){const _0x299cfe=_0x233dd8[0x0][_0x29595c(0x20a)]('.');if(_0x299cfe[_0x29595c(0x20c)]===0x1)return{'projectName':_0x299cfe[0x0],'workflowName':undefined};else return _0x299cfe['length']===0x2?{'projectName':_0x299cfe[0x0],'workflowName':_0x299cfe[0x1]}:(console[_0x29595c(0x143)](a55_0x3d25b[_0x29595c(0x186)](_0x29595c(0x239)),_0x29595c(0x21c)),null);}return{'projectName':_0x8e403d['workflowProject'],'workflowName':undefined};}[a55_0x312470(0x24b)](_0x4709dd,_0x22df6f,_0x42ae24=0x0){const _0x5c0b64=a55_0x312470;if(_0x4709dd[_0x42ae24])return _0x4709dd[_0x42ae24];if(_0x22df6f[_0x5c0b64(0x10d)]){const _0x2f4f6e=a55_0x297239['join'](process[_0x5c0b64(0x20e)](),_0x5c0b64(0xfd),_0x22df6f[_0x5c0b64(0x10d)]);if(existsSync(a55_0x297239[_0x5c0b64(0x123)](_0x2f4f6e,_0x5c0b64(0x224))))return _0x2f4f6e;}return undefined;}async['showWorkflowConsoleUrl'](_0x1e47de,_0x121400,_0x2c1998){const _0x2b7350=a55_0x312470;try{const _0x52d282=await _0x1e47de[_0x2b7350(0x178)][_0x2b7350(0xfd)](_0x121400,{'limit':0x1});if(_0x52d282[_0x2b7350(0x20c)]>0x0){const _0x46138b=_0x52d282[0x0]['id'],_0x41a82b=getWorkflowUrl(_0x2c1998,_0x46138b);console[_0x2b7350(0x143)]('\x20\x20Console:\x20'+a55_0x3d25b[_0x2b7350(0x11e)](_0x41a82b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x168);[a55_0x312470(0x15c)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a55_0x312470(0x192)](_0x578ad2){const _0x2459f5=a55_0x312470,{options:_0x28000a,args:_0x39aa02,tdx:_0x4480fe}=_0x578ad2,_0x24c75b=_0x39aa02[0x0],_0x4fcdbd=_0x28000a['clear'];if(_0x4fcdbd)return saveSessionContext({'workflow_project':undefined},_0x28000a[_0x2459f5(0x28b)]),console['log'](a55_0x3d25b[_0x2459f5(0x228)](_0x2459f5(0x18d))),0x0;if(!_0x24c75b)return console[_0x2459f5(0x143)](a55_0x3d25b['red'](_0x2459f5(0x239)),_0x2459f5(0x23a)),console[_0x2459f5(0x143)](a55_0x3d25b['dim'](_0x2459f5(0x274))),console[_0x2459f5(0x143)](a55_0x3d25b['dim'](_0x2459f5(0x165))),0x1;const _0x1993ea=await withSpinner(_0x2459f5(0x24a)+_0x24c75b+_0x2459f5(0x1cd),()=>_0x4480fe[_0x2459f5(0x178)][_0x2459f5(0x1ba)](_0x24c75b),{'verbose':_0x28000a[_0x2459f5(0x102)]}),{name:_0x262105}=_0x1993ea[_0x2459f5(0x206)];return saveSessionContext({'workflow_project':_0x262105},_0x28000a[_0x2459f5(0x28b)]),console[_0x2459f5(0x1c6)](a55_0x3d25b[_0x2459f5(0x228)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a55_0x3d25b[_0x2459f5(0x11e)](_0x262105))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x312470(0x20d)]='workflow:projects';[a55_0x312470(0x15c)]=a55_0x312470(0x12d);async[a55_0x312470(0x192)](_0xce9e30){const _0x5e3beb=a55_0x312470,{options:_0xcfdb54,args:_0x35a18d,tdx:_0x1942e2}=_0xce9e30,_0x425d0f=_0x35a18d[0x0];_0xcfdb54[_0x5e3beb(0x102)]&&_0x425d0f&&console['error']('Pattern:\x20'+_0x425d0f);const _0x55238f=await withSpinner(_0x5e3beb(0x1c2),()=>_0x1942e2[_0x5e3beb(0x178)][_0x5e3beb(0x1c0)](_0x425d0f,{'limit':_0xcfdb54[_0x5e3beb(0x27c)]}),{'verbose':_0xcfdb54[_0x5e3beb(0x102)]});let _0x2e156f=_0x55238f[_0x5e3beb(0x206)];_0x2e156f[_0x5e3beb(0x282)]((_0x5bb885,_0x1db45e)=>_0x5bb885[_0x5e3beb(0x20d)]['localeCompare'](_0x1db45e[_0x5e3beb(0x20d)]));const _0x31c07c=_0xcfdb54['limit']||0x64,_0x5c8c42=_0x2e156f[_0x5e3beb(0x20c)]>=_0x31c07c?a55_0x3d25b[_0x5e3beb(0x115)](_0x5e3beb(0x26b)):'';console[_0x5e3beb(0x143)](_0x5e3beb(0x1a7)+_0x2e156f['length']+_0x5e3beb(0x22e)+(_0x2e156f[_0x5e3beb(0x20c)]!==0x1?'s':'')+_0x5c8c42);if(_0xcfdb54[_0x5e3beb(0xf8)]===_0x5e3beb(0x280)||_0xcfdb54[_0x5e3beb(0xf8)]===_0x5e3beb(0x242)||_0xcfdb54[_0x5e3beb(0xf8)]==='table')await handleSDKOutput(_0x2e156f,_0xcfdb54);else{if(_0x2e156f[_0x5e3beb(0x20c)]===0x0)_0x425d0f?console[_0x5e3beb(0x1c6)](_0x5e3beb(0x1e2)+_0x425d0f):console[_0x5e3beb(0x1c6)](_0x5e3beb(0x1a1));else{const _0x445bd5=_0x2e156f[_0x5e3beb(0x210)](_0x2e2b13=>{const _0x42898f=_0x5e3beb,_0x30d6f7=_0x2e2b13['metadata']?.[_0x42898f(0x27e)](_0x3df8ef=>_0x3df8ef[_0x42898f(0x145)]===_0x42898f(0x271)),_0x4a7767=_0x30d6f7?a55_0x3d25b[_0x42898f(0x115)](_0x42898f(0x176)):'';return _0x42898f(0x284)+_0x2e2b13[_0x42898f(0x20d)]+_0x4a7767;});await writeOutput(_0x445bd5[_0x5e3beb(0x123)]('\x0a'),_0xcfdb54[_0x5e3beb(0x194)],_0x5e3beb(0x1d6));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a55_0x312470(0x1e3);[a55_0x312470(0x15c)]=a55_0x312470(0x287);async[a55_0x312470(0x192)](_0x800748){const _0x324321=a55_0x312470,{options:_0x52f25e,args:_0x3ffcd3,tdx:_0x4b5f01}=_0x800748,_0x141eb0=this[_0x324321(0x12f)](_0x3ffcd3,_0x52f25e);_0x52f25e[_0x324321(0x102)]&&_0x141eb0&&console[_0x324321(0x143)](_0x324321(0xf3)+_0x141eb0);const _0xf291f8=await withSpinner(_0x324321(0x276),()=>_0x4b5f01[_0x324321(0x178)]['workflows'](_0x141eb0,{'limit':_0x52f25e[_0x324321(0x27c)]}),{'verbose':_0x52f25e['verbose']});let _0x203725=_0xf291f8[_0x324321(0x206)];_0x203725[_0x324321(0x282)]((_0x314b54,_0x5a97a0)=>{const _0x4d12f6=_0x324321,_0x38081f=_0x314b54[_0x4d12f6(0x20d)][_0x4d12f6(0x107)](_0x5a97a0[_0x4d12f6(0x20d)]);if(_0x38081f!==0x0)return _0x38081f;return(_0x314b54[_0x4d12f6(0x137)]?.['name']||'')[_0x4d12f6(0x107)](_0x5a97a0[_0x4d12f6(0x137)]?.[_0x4d12f6(0x20d)]||'');});const _0x5e50af=_0x52f25e[_0x324321(0x27c)]||0x64,_0x26760a=_0x203725[_0x324321(0x20c)]>=_0x5e50af?a55_0x3d25b[_0x324321(0x115)](_0x324321(0x26b)):'';console[_0x324321(0x143)](_0x324321(0x1a7)+_0x203725[_0x324321(0x20c)]+'\x20workflow'+(_0x203725[_0x324321(0x20c)]!==0x1?'s':'')+_0x26760a);if(_0x52f25e[_0x324321(0xf8)]===_0x324321(0x280)||_0x52f25e[_0x324321(0xf8)]===_0x324321(0x242)||_0x52f25e[_0x324321(0xf8)]===_0x324321(0x241))await handleSDKOutput(_0x203725,_0x52f25e);else{if(_0x203725[_0x324321(0x20c)]===0x0)_0x141eb0?console[_0x324321(0x1c6)](_0x324321(0x111)+_0x141eb0):console[_0x324321(0x1c6)](_0x324321(0x1e8));else{const _0x5600f9=_0x52f25e['site'],_0x1c93c4=_0x203725[_0x324321(0x210)](_0x299319=>{const _0x1e7b4c=_0x324321,_0x5e4f09=a55_0x3d25b[_0x1e7b4c(0x115)]('#'+_0x299319['id']),_0x3dafb0=hyperlink(_0x5e4f09,getWorkflowUrl(_0x5600f9,_0x299319['id'])),_0x47f532=_0x299319[_0x1e7b4c(0x137)]?.[_0x1e7b4c(0x20d)]?a55_0x3d25b['dim']('\x20('+_0x299319['project'][_0x1e7b4c(0x20d)]+')'):'';return _0x1e7b4c(0xf0)+_0x3dafb0+'\x20'+_0x299319['name']+_0x47f532;});await writeOutput(_0x1c93c4[_0x324321(0x123)]('\x0a'),_0x52f25e[_0x324321(0x194)],_0x324321(0x1d6));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x223);[a55_0x312470(0x15c)]='List\x20workflow\x20execution\x20sessions';async['execute'](_0x55a668){const _0x27b540=a55_0x312470,{options:_0x39e301,args:_0x9fff71,tdx:_0xd5257}=_0x55a668,_0x3d16af=this['parseProjectWorkflowPattern'](_0x9fff71,_0x39e301);if(!_0x3d16af)return 0x1;const {projectName:_0x18aa28,workflowName:_0xf4c4d}=_0x3d16af;if(_0x39e301[_0x27b540(0x102)]){if(_0x18aa28&&_0xf4c4d)console[_0x27b540(0x143)](_0x27b540(0x1e1)+_0x18aa28+'.'+_0xf4c4d);else _0x18aa28&&console[_0x27b540(0x143)](_0x27b540(0x23e)+_0x18aa28);const _0x264d12=_0x39e301[_0x27b540(0x1f9)];_0x264d12&&console[_0x27b540(0x143)](_0x27b540(0x20f)+_0x264d12);}let _0x1a0518=0x28;if(process['stdout'][_0x27b540(0x1d3)]&&!_0x39e301[_0x27b540(0x194)]&&!_0x39e301['format']){const _0x6c000e=process[_0x27b540(0xf2)][_0x27b540(0x109)]||0x28;_0x1a0518=Math['max'](0x14,Math[_0x27b540(0x1b7)](_0x6c000e*0x2/0x3));}const _0x3010a0=_0x39e301[_0x27b540(0x27c)]||_0x1a0518,_0x8325d0=await withSpinner(_0x27b540(0xe4),()=>_0xd5257[_0x27b540(0x178)]['sessions']({'projectName':_0x18aa28,'workflowName':_0xf4c4d,'status':_0x39e301['status'],'fromTime':_0x39e301[_0x27b540(0x106)],'toTime':_0x39e301['to'],'limit':_0x3010a0}),{'verbose':_0x39e301[_0x27b540(0x102)]}),_0x5c30c2=_0x8325d0['data'];_0x5c30c2[_0x27b540(0x282)]((_0x372f64,_0x4b47d6)=>{const _0x540273=_0x27b540,_0x2f30df=_0x372f64[_0x540273(0x266)]||'',_0x4986d5=_0x4b47d6[_0x540273(0x266)]||'';return _0x4986d5[_0x540273(0x107)](_0x2f30df);});_0x5c30c2[_0x27b540(0x20c)]>=_0x3010a0?console['error'](_0x27b540(0x174)+_0x5c30c2[_0x27b540(0x20c)]+_0x27b540(0x268)+a55_0x3d25b[_0x27b540(0x115)](_0x27b540(0x217))):console[_0x27b540(0x143)]('✔\x20Found\x20'+_0x5c30c2[_0x27b540(0x20c)]+_0x27b540(0x140)+(_0x5c30c2[_0x27b540(0x20c)]!==0x1?'s':''));if(_0x39e301['format']===_0x27b540(0x280)||_0x39e301[_0x27b540(0xf8)]===_0x27b540(0x242)||_0x39e301[_0x27b540(0xf8)]===_0x27b540(0x241))await handleSDKOutput(_0x5c30c2,_0x39e301);else{if(!process[_0x27b540(0xf2)][_0x27b540(0x1d3)]||_0x39e301[_0x27b540(0x194)]){if(_0x5c30c2[_0x27b540(0x20c)]===0x0){if(_0x18aa28&&_0xf4c4d)console['log'](_0x27b540(0x112)+_0x18aa28+'.'+_0xf4c4d);else _0x18aa28?console[_0x27b540(0x1c6)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x18aa28):console[_0x27b540(0x1c6)](_0x27b540(0xed));}else{const _0x2d6bc1=_0x39e301[_0x27b540(0x195)],_0x2d23aa=this['renderSessionsTimeline'](_0x5c30c2,_0x2d6bc1);_0x39e301[_0x27b540(0x194)]?await writeOutput(_0x2d23aa,_0x39e301[_0x27b540(0x194)],_0x27b540(0x1d6)):console[_0x27b540(0x1c6)](_0x2d23aa);}!_0x18aa28&&(console['error'](''),console[_0x27b540(0x143)](a55_0x3d25b[_0x27b540(0x115)](_0x27b540(0x25e))),console['error'](a55_0x3d25b[_0x27b540(0x115)](_0x27b540(0x23f))+'or'+a55_0x3d25b[_0x27b540(0x115)](_0x27b540(0x118))));}else{if(_0x5c30c2['length']===0x0){if(_0x18aa28&&_0xf4c4d)console[_0x27b540(0x1c6)](_0x27b540(0x112)+_0x18aa28+'.'+_0xf4c4d);else _0x18aa28?console[_0x27b540(0x1c6)](_0x27b540(0x234)+_0x18aa28):console[_0x27b540(0x1c6)]('No\x20sessions\x20found');}else await this[_0x27b540(0x1d5)](_0x5c30c2,_0x55a668,_0x18aa28);}}return 0x0;}[a55_0x312470(0x148)](_0x140230,_0xd37aaf){const _0x5c0be2=a55_0x312470,_0x387237=[],_0x590808=new Map();let _0x1b8eca=Infinity,_0x2f6152=-Infinity;for(const _0x19f954 of _0x140230){if(_0x19f954[_0x5c0be2(0x146)]?.[_0x5c0be2(0x1a4)]){const _0x190b85=new Date(_0x19f954[_0x5c0be2(0x146)][_0x5c0be2(0x1a4)])[_0x5c0be2(0x180)](),_0x3d65ce=_0x19f954[_0x5c0be2(0x146)][_0x5c0be2(0xf1)]?new Date(_0x19f954[_0x5c0be2(0x146)]['finishedAt'])[_0x5c0be2(0x180)]():Date[_0x5c0be2(0x1e9)](),_0x2db12f=_0x19f954['project']?.['name']||_0x5c0be2(0x251);!_0x590808[_0x5c0be2(0x25b)](_0x2db12f)&&_0x590808['set'](_0x2db12f,[]),_0x590808['get'](_0x2db12f)[_0x5c0be2(0x124)]({'session':_0x19f954,'startTime':_0x190b85,'endTime':_0x3d65ce,'duration':_0x3d65ce-_0x190b85}),_0x1b8eca=Math[_0x5c0be2(0x160)](_0x1b8eca,_0x190b85),_0x2f6152=Math['max'](_0x2f6152,_0x3d65ce);}}if(_0x590808[_0x5c0be2(0x101)]===0x0)return _0x5c0be2(0x225);const _0x45c140=process[_0x5c0be2(0xf2)][_0x5c0be2(0x147)]||0x78,_0x588b9c=0x1e,_0x4cbece=0x32,_0x594f54=0x4,_0x459700=Math['min'](_0x4cbece,Math[_0x5c0be2(0xfe)](_0x588b9c,Math[_0x5c0be2(0x1b7)](_0x45c140*0.3))),_0x4c30f3=_0x45c140-_0x459700-TIMELINE_CONFIG[_0x5c0be2(0x1d8)]-0x3-_0x594f54,_0x492a5c=_0x2f6152-_0x1b8eca,_0x535790=_0x492a5c/_0x459700,_0x4fa170=renderTimeAxis({'startTime':_0x1b8eca,'endTime':_0x2f6152,'durationMs':_0x492a5c,'msPerChar':_0x535790},_0x459700),_0x382911=[];for(const _0x144e30 of _0x590808[_0x5c0be2(0x198)]()){_0x382911[_0x5c0be2(0x124)](..._0x144e30);}_0x382911['sort']((_0xb87fcf,_0x2a1743)=>_0x2a1743[_0x5c0be2(0x15b)]-_0xb87fcf[_0x5c0be2(0x15b)]);const _0x2603da=new Date(_0x1b8eca),_0x169f11=formatDate(_0x2603da),_0x4446bb=_0x594f54+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x5c0be2(0x110)]+_0x4c30f3,_0x12fa37='\x20'[_0x5c0be2(0x1ed)](_0x4446bb-_0x169f11[_0x5c0be2(0x20c)]),_0x29c9a1=_0x12fa37+a55_0x3d25b['dim'](_0x169f11)+'\x20'+_0x4fa170;_0x387237['push'](_0x29c9a1);const _0x2840ed=0x16;let _0x1cfff0=0x0;for(const _0x1da22d of _0x382911){const _0x48ec58=_0x1da22d[_0x5c0be2(0x28b)]['project']?.[_0x5c0be2(0x20d)]||'?',_0x19ca51=Math[_0x5c0be2(0x160)](stringWidth(_0x48ec58),_0x2840ed);_0x1cfff0=Math['max'](_0x1cfff0,_0x19ca51);}for(const _0x40135b of _0x382911){const {session:_0x1ef615,startTime:_0x295244,endTime:_0x95fbf7,duration:_0x14eb81}=_0x40135b,_0x9c4efc=_0x1ef615[_0x5c0be2(0x137)]?.['id'],_0xba7c07=_0x1ef615['id'],_0x3ac1b1=_0x1ef615[_0x5c0be2(0x137)]?.[_0x5c0be2(0x20d)]||'?',_0x5a9952=_0x1ef615['workflow']?.[_0x5c0be2(0x20d)]||'?';let _0x56cf84,_0x42fbfe;if(_0x1ef615[_0x5c0be2(0x146)]){const _0x552bc0=_0x1ef615[_0x5c0be2(0x146)];!_0x552bc0['done']?(_0x56cf84=_0x552bc0[_0x5c0be2(0x265)]?'🛑':'🔄',_0x42fbfe=_0x552bc0[_0x5c0be2(0x265)]?a55_0x3d25b[_0x5c0be2(0x201)]:a55_0x3d25b[_0x5c0be2(0x128)]):(_0x56cf84=_0x552bc0[_0x5c0be2(0x219)]?'✅':'❌',_0x42fbfe=_0x552bc0[_0x5c0be2(0x219)]?a55_0x3d25b['green']:a55_0x3d25b[_0x5c0be2(0x186)]);}else _0x56cf84='⏳',_0x42fbfe=a55_0x3d25b[_0x5c0be2(0x115)];const _0x2ba132='#'+_0xba7c07,_0x185624=_0x9c4efc?hyperlink(_0x2ba132,getWorkflowSessionUrl(_0xd37aaf,_0x9c4efc,_0xba7c07)):_0x2ba132;let _0xb97236=_0x3ac1b1;stringWidth(_0x3ac1b1)>_0x2840ed&&(_0xb97236=_0x3ac1b1['slice'](0x0,_0x2840ed-0x1)+'…');const _0x5001e9=a55_0x3d25b['dim'](_0xb97236),_0x35069b=stringWidth(_0xb97236),_0x5612d3='\x20'[_0x5c0be2(0x1ed)](_0x1cfff0-stringWidth(_0xb97236)+0x2),_0xae7986='('+formatElapsed(_0x14eb81)+')',_0x536733=stringWidth(_0xae7986),_0x59fc0d=stringWidth(_0x2ba132),_0x526578=_0x59fc0d+0x1+_0x35069b+_0x5612d3[_0x5c0be2(0x20c)],_0x4bcb39=_0x4c30f3-_0x526578-_0x536733-0x1-0x8;let _0x216675=_0x5a9952;stringWidth(_0x216675)>_0x4bcb39&&(_0x216675=_0x216675['slice'](0x0,_0x4bcb39-0x1)+'…');const _0xc10879=_0x185624+'\x20'+_0x5001e9+_0x5612d3+_0x216675,_0xd4855e=stringWidth(_0xc10879),_0x364e0b=_0x4c30f3-_0xd4855e-_0x536733,_0x457c54=_0xc10879+'\x20'['repeat'](Math[_0x5c0be2(0xfe)](0x1,_0x364e0b))+a55_0x3d25b['dim'](_0xae7986),_0x38f664=Math[_0x5c0be2(0x1b7)]((_0x295244-_0x1b8eca)/_0x535790),_0x487307=Math['floor']((_0x95fbf7-_0x1b8eca)/_0x535790),_0xfa599f=Math['max'](_0x38f664+0x1,_0x487307),_0x6f14df=new Array(_0x459700)['fill']('\x20');for(let _0x5301bc=_0x38f664;_0x5301bc<Math[_0x5c0be2(0x160)](_0xfa599f,_0x459700);_0x5301bc++){_0x6f14df[_0x5301bc]='─';}const _0x4f1c9e=_0x6f14df[_0x5c0be2(0x210)](_0x8de1ba=>_0x8de1ba==='\x20'?'\x20':_0x42fbfe(_0x8de1ba))[_0x5c0be2(0x123)]('');_0x387237[_0x5c0be2(0x124)](_0x56cf84+'\x20'+_0x457c54+'│'+_0x4f1c9e+'│');}return _0x387237[_0x5c0be2(0x123)]('\x0a');}async[a55_0x312470(0x1d5)](_0x108cfd,_0x4768af,_0x12b805){const _0x1fff8b=a55_0x312470,{options:_0x72c023,tdx:_0x2b315f}=_0x4768af,_0x248aa4=_0x72c023['site'],{timelineRows:_0x5ac28a,timeAxisHeader:_0x2b314d}=this[_0x1fff8b(0x14f)](_0x108cfd,_0x248aa4),_0x17d0cc=_0x5ac28a[_0x1fff8b(0x14d)](_0x148f65=>_0x148f65[_0x1fff8b(0x18c)]);if(_0x17d0cc[_0x1fff8b(0x20c)]===0x0){const _0x44e6a4=this['renderSessionsTimeline'](_0x108cfd,_0x248aa4);console[_0x1fff8b(0x1c6)](_0x44e6a4);!_0x12b805&&(console['error'](''),console['error'](a55_0x3d25b[_0x1fff8b(0x115)](_0x1fff8b(0x25e))),console[_0x1fff8b(0x143)](a55_0x3d25b[_0x1fff8b(0x115)](_0x1fff8b(0x23f))+'or'+a55_0x3d25b[_0x1fff8b(0x115)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x2b314d&&console[_0x1fff8b(0x1c6)](_0x2b314d);const _0x16d3ad=_0x5ac28a[_0x1fff8b(0x14d)](_0x5ea7c9=>_0x5ea7c9[_0x1fff8b(0x18c)])['map'](_0x152a67=>({'title':_0x152a67[_0x1fff8b(0x22c)],'value':_0x152a67[_0x1fff8b(0x18c)]})),_0x141248=process[_0x1fff8b(0xf2)]['rows']||0x3c,_0xde66f9=Math[_0x1fff8b(0xfe)](0x28,Math['floor'](_0x141248*0x2/0x3)),_0x303a1b=await a55_0x3870e8({'type':_0x1fff8b(0x278),'name':_0x1fff8b(0x18c),'message':_0x1fff8b(0x1a9),'choices':_0x16d3ad,'initial':-0x1,'limit':_0xde66f9,'clearFirst':!![],'fallback':{'title':_0x1fff8b(0x203),'value':null},'suggest':(_0x272550,_0x1b0113)=>{const _0x1840ce=_0x1fff8b;if(!_0x272550)return Promise[_0x1840ce(0x211)](_0x1b0113);const _0x4338d4=_0x1b0113[_0x1840ce(0x14d)](_0x4e0f38=>{const _0x3e29d5=_0x1840ce,_0x197c49=_0x4e0f38;return _0x197c49[_0x3e29d5(0x162)]['toLowerCase']()[_0x3e29d5(0x134)](_0x272550[_0x3e29d5(0x1ac)]());});return Promise[_0x1840ce(0x211)](_0x4338d4);}}),_0x5574f6=()=>{const _0x13a316=_0x1fff8b;process[_0x13a316(0xf2)][_0x13a316(0x17f)](_0x13a316(0x116)),process[_0x13a316(0xf2)][_0x13a316(0x17f)](_0x13a316(0x116)),process['stdout'][_0x13a316(0x17f)](_0x13a316(0x116));},_0x424d72=_0x303a1b&&_0x303a1b['attemptId']&&_0x303a1b[_0x1fff8b(0x18c)]!==null&&_0x303a1b[_0x1fff8b(0x18c)]['trim']()!=='';if(!_0x424d72){_0x5574f6(),console[_0x1fff8b(0x1c6)](a55_0x3d25b[_0x1fff8b(0x115)](_0x1fff8b(0x1fc)));return;}_0x5574f6();const _0x13418d=_0x108cfd[_0x1fff8b(0x1de)](_0x4e488c=>_0x4e488c[_0x1fff8b(0x146)]?.['id']===_0x303a1b['attemptId']);if(_0x13418d){const _0x360b04=_0x13418d['project']?.['name']||'?',_0xf3cb2f=_0x13418d[_0x1fff8b(0x178)]?.[_0x1fff8b(0x20d)]||'?';console[_0x1fff8b(0x1c6)](_0x1fff8b(0x261)+a55_0x3d25b[_0x1fff8b(0x115)](_0x360b04)+',\x20Workflow:\x20'+a55_0x3d25b[_0x1fff8b(0x115)](_0xf3cb2f));}const _0x13c85d=new WorkflowTimelineCommand();await _0x13c85d[_0x1fff8b(0x192)]({'args':[],'options':{..._0x72c023,'attemptId':_0x303a1b[_0x1fff8b(0x18c)]},'tdx':_0x2b315f});}['generateSessionTimelineRows'](_0x670a3d,_0x1deb18){const _0x444aa8=a55_0x312470,_0x30957a=new Map();for(const _0x449f97 of _0x670a3d){_0x449f97['id']&&_0x449f97[_0x444aa8(0x146)]?.['id']&&_0x30957a[_0x444aa8(0x1f8)](_0x449f97['id'],_0x449f97['lastAttempt']['id']);}const _0x22399c=[];let _0x544f92='';const _0x3bf3c5=this[_0x444aa8(0x148)](_0x670a3d,_0x1deb18),_0x34abef=_0x3bf3c5[_0x444aa8(0x20a)]('\x0a');for(const _0x36b34d of _0x34abef){if(_0x36b34d['startsWith'](_0x444aa8(0x236))||_0x36b34d[_0x444aa8(0x189)](/^\s+\d{4}-\d{2}-\d{2}/))_0x544f92=_0x36b34d;else{if(_0x36b34d[_0x444aa8(0x189)](/^[✅❌🔄🛑⏳]/)){const _0x2fac9d=_0x36b34d[_0x444aa8(0x189)](/#(\d+)/),_0x36ff38=_0x2fac9d?_0x2fac9d[0x1]:null,_0x146e17=_0x36ff38?_0x30957a['get'](_0x36ff38)||null:null,_0x108a5e=_0x670a3d[_0x444aa8(0x1de)](_0x157e9c=>_0x157e9c['id']===_0x36ff38),_0x364cf6=_0x108a5e?.['project']?.[_0x444aa8(0x20d)]||'';_0x22399c[_0x444aa8(0x124)]({'displayLine':_0x36b34d,'attemptId':_0x146e17,'projectName':_0x364cf6});}}}return{'timelineRows':_0x22399c,'timeAxisHeader':_0x544f92};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x19d);[a55_0x312470(0x15c)]=a55_0x312470(0x1ee);async[a55_0x312470(0x192)](_0xd09e3e){const _0x57dc1a=a55_0x312470,{options:_0x3f0467,args:_0x452f0b,tdx:_0x5b0c57}=_0xd09e3e,_0x1479de=this['parseProjectWorkflowPattern'](_0x452f0b,_0x3f0467);if(!_0x1479de)return 0x1;const {projectName:_0x5ca57b,workflowName:_0x4cb445}=_0x1479de,_0xb20097=_0x3f0467[_0x57dc1a(0x18a)];if(_0x3f0467['verbose']){if(_0x5ca57b&&_0x4cb445)console[_0x57dc1a(0x143)](_0x57dc1a(0x1e1)+_0x5ca57b+'.'+_0x4cb445);else _0x5ca57b&&console[_0x57dc1a(0x143)](_0x57dc1a(0x23e)+_0x5ca57b);_0xb20097&&console[_0x57dc1a(0x143)](_0x57dc1a(0x237));}const _0x50d0e9=await withSpinner(_0x57dc1a(0x21b),()=>_0x5b0c57[_0x57dc1a(0x178)][_0x57dc1a(0x13f)]({'projectName':_0x5ca57b,'workflowName':_0x4cb445,'includeRetried':_0xb20097,'limit':_0x3f0467[_0x57dc1a(0x27c)]}),{'verbose':_0x3f0467['verbose']}),_0x4a3670=_0x50d0e9[_0x57dc1a(0x206)],_0x29c826=_0x3f0467['limit']||0x64,_0xa0a598=_0x4a3670[_0x57dc1a(0x20c)]>=_0x29c826?a55_0x3d25b[_0x57dc1a(0x115)](_0x57dc1a(0x26b)):'';console[_0x57dc1a(0x143)](_0x57dc1a(0x1a7)+_0x4a3670[_0x57dc1a(0x20c)]+'\x20attempt'+(_0x4a3670[_0x57dc1a(0x20c)]!==0x1?'s':'')+_0xa0a598);if(_0x3f0467[_0x57dc1a(0xf8)]===_0x57dc1a(0x280)||_0x3f0467['format']==='jsonl'||_0x3f0467[_0x57dc1a(0xf8)]===_0x57dc1a(0x241))await handleSDKOutput(_0x4a3670,_0x3f0467);else{if(_0x4a3670[_0x57dc1a(0x20c)]===0x0){if(_0x5ca57b&&_0x4cb445)console[_0x57dc1a(0x1c6)](_0x57dc1a(0x167)+_0x5ca57b+'.'+_0x4cb445);else _0x5ca57b?console[_0x57dc1a(0x1c6)](_0x57dc1a(0x26f)+_0x5ca57b):console[_0x57dc1a(0x1c6)]('No\x20attempts\x20found');}else{const _0x38c8d9=_0x3f0467[_0x57dc1a(0x195)],_0x4caff9=_0x4a3670[_0x57dc1a(0x210)](_0x4b1e2b=>{const _0x4df039=_0x57dc1a,_0x391b3a=a55_0x3d25b[_0x4df039(0x115)]('#'+_0x4b1e2b['id']),_0x1f7396=_0x4b1e2b[_0x4df039(0x137)]?.['id'],_0x5836be=_0x4b1e2b[_0x4df039(0x28f)]||_0x4b1e2b['sessionId'],_0xe5d638=_0x1f7396&&_0x5836be?hyperlink(_0x391b3a,getWorkflowAttemptUrl(_0x38c8d9,_0x1f7396,_0x5836be,_0x4b1e2b['id'])):_0x391b3a,{icon:_0x569afe,text:_0x323681}=getAttemptStatusDisplay(_0x4b1e2b),_0x4224bc=(_0x4b1e2b['project']?.[_0x4df039(0x20d)]||'?')+'.'+(_0x4b1e2b[_0x4df039(0x178)]?.[_0x4df039(0x20d)]||'?'),_0x58b6e5=_0x4b1e2b[_0x4df039(0x266)]?a55_0x3d25b['dim'](_0x4b1e2b[_0x4df039(0x266)]):'';return(_0xe5d638+'\x20'+_0x569afe+(_0x323681?'\x20'+_0x323681:'')+'\x20'+_0x4224bc+'\x20'+_0x58b6e5)[_0x4df039(0x1b6)]();});await writeOutput(_0x4caff9['join']('\x0a'),_0x3f0467[_0x57dc1a(0x194)],_0x57dc1a(0x1d6));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a55_0x312470(0x16e);['description']=a55_0x312470(0x1b2);async[a55_0x312470(0x192)](_0x629442){const _0x5eb956=a55_0x312470,{options:_0x44ad8b,args:_0x4bbf34,tdx:_0x1f972b}=_0x629442,_0x514b4e=_0x4bbf34[0x0];if(!_0x514b4e)return console[_0x5eb956(0x143)](_0x5eb956(0x152)),0x1;_0x44ad8b['verbose']&&console['error']('Attempt\x20ID:\x20'+_0x514b4e);const _0x20938a=await withSpinner(_0x5eb956(0xe9),()=>_0x1f972b[_0x5eb956(0x178)][_0x5eb956(0x15d)](_0x514b4e),{'verbose':_0x44ad8b['verbose']}),_0x1d4ac4=_0x20938a[_0x5eb956(0x206)];let _0x263f14;!_0x1d4ac4[_0x5eb956(0x156)]?_0x263f14=_0x1d4ac4[_0x5eb956(0x265)]?_0x5eb956(0xff):_0x5eb956(0x161):_0x263f14=_0x1d4ac4[_0x5eb956(0x219)]?_0x5eb956(0x219):_0x5eb956(0x143);let _0x2cc90b;if(_0x1d4ac4[_0x5eb956(0x1a4)]&&_0x1d4ac4[_0x5eb956(0xf1)]){const _0x17ff59=new Date(_0x1d4ac4[_0x5eb956(0x1a4)])[_0x5eb956(0x180)](),_0x41cd71=new Date(_0x1d4ac4[_0x5eb956(0xf1)])[_0x5eb956(0x180)]();_0x2cc90b=Math[_0x5eb956(0xf7)]((_0x41cd71-_0x17ff59)/0x3e8);}const _0x504f3c={'attempt_id':_0x1d4ac4['id'],'status':_0x263f14,..._0x1d4ac4[_0x5eb956(0x26d)]!==undefined&&{'index':_0x1d4ac4[_0x5eb956(0x26d)]},..._0x1d4ac4[_0x5eb956(0x137)]&&{'project':_0x1d4ac4['project'][_0x5eb956(0x20d)]},..._0x1d4ac4[_0x5eb956(0x178)]&&{'workflow':_0x1d4ac4['workflow']['name']},..._0x1d4ac4[_0x5eb956(0x233)]&&{'session_id':_0x1d4ac4[_0x5eb956(0x233)]},..._0x1d4ac4[_0x5eb956(0x266)]&&{'session_time':_0x1d4ac4[_0x5eb956(0x266)]},..._0x1d4ac4[_0x5eb956(0x1ca)]&&{'retry_attempt':_0x1d4ac4[_0x5eb956(0x1ca)]},..._0x2cc90b!==undefined&&{'duration_sec':_0x2cc90b},..._0x1d4ac4[_0x5eb956(0x1a4)]&&{'created_at':_0x1d4ac4[_0x5eb956(0x1a4)]},..._0x1d4ac4[_0x5eb956(0xf1)]&&{'finished_at':_0x1d4ac4['finishedAt']},...Object['keys'](_0x1d4ac4['params'])[_0x5eb956(0x20c)]>0x0&&{'params':_0x1d4ac4[_0x5eb956(0x25d)]}};return await handleSingleObjectOutput(_0x504f3c,_0x44ad8b),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x1d2);[a55_0x312470(0x15c)]=a55_0x312470(0x288);async['execute'](_0x21d330){const _0x3855af=a55_0x312470,{options:_0x21c22e,args:_0x1c2d24,tdx:_0x2305ad}=_0x21d330,_0x316b76=_0x1c2d24[0x0];if(!_0x316b76)return console[_0x3855af(0x143)](_0x3855af(0x152)),0x1;const _0x5f56a9=_0x21c22e[_0x3855af(0x259)];_0x21c22e['verbose']&&(console[_0x3855af(0x143)](_0x3855af(0x260)+_0x316b76),_0x5f56a9&&console['error']('Including\x20subtasks:\x20yes'));const _0x3399b5=await withSpinner(_0x3855af(0x27f),()=>_0x2305ad['workflow']['tasks'](_0x316b76,_0x5f56a9||![]),{'verbose':_0x21c22e[_0x3855af(0x102)]}),_0x3eeabe=_0x3399b5['data'];return console[_0x3855af(0x143)](_0x3855af(0x1a7)+_0x3eeabe['length']+'\x20task'+(_0x3eeabe['length']!==0x1?'s':'')),await handleSDKOutput(_0x3eeabe,_0x21c22e),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x1cb);['description']=a55_0x312470(0x249);async['execute'](_0x242603){const _0x19083e=a55_0x312470,{options:_0x3fe9f9,args:_0x4043be,tdx:_0x34d2f0}=_0x242603,_0x2bc16a=_0x4043be[0x0];let _0x3c5523=_0x4043be[0x1];if(!_0x2bc16a)return console[_0x19083e(0x143)](_0x19083e(0x152)),0x1;_0x3fe9f9[_0x19083e(0x102)]&&(console['error']('Attempt\x20ID:\x20'+_0x2bc16a),_0x3c5523&&console[_0x19083e(0x143)](_0x19083e(0x264)+_0x3c5523));const _0x385916=await withSpinner(_0x19083e(0x226),()=>_0x34d2f0['workflow']['logFiles'](_0x2bc16a,_0x3c5523),{'verbose':_0x3fe9f9[_0x19083e(0x102)]}),_0x2b6186=_0x385916[_0x19083e(0x206)];if(_0x2b6186[_0x19083e(0x20c)]===0x0)return console['error']('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x3c5523&&(_0x3fe9f9[_0x19083e(0x280)]||_0x3fe9f9[_0x19083e(0xf8)]))return await handleSDKOutput(_0x2b6186,_0x3fe9f9),0x0;if(!_0x3c5523){const _0x5e04b5=_0x2b6186['map'](_0x5b22ad=>({'title':_0x5b22ad[_0x19083e(0xe5)]+'\x20('+formatBytes(_0x5b22ad['fileSize'])+')','value':_0x5b22ad[_0x19083e(0xe5)]})),_0x3b019f=await a55_0x3870e8({'type':_0x19083e(0x220),'name':_0x19083e(0xec),'message':_0x19083e(0x1e0),'choices':_0x5e04b5});if(!_0x3b019f[_0x19083e(0xec)])return console['error'](_0x19083e(0x1fc)),0x0;_0x3c5523=_0x3b019f[_0x19083e(0xec)];}const _0x4173e4=await withSpinner(_0x19083e(0x19a),()=>_0x34d2f0[_0x19083e(0x178)][_0x19083e(0x18e)](_0x2bc16a,_0x3c5523),{'verbose':_0x3fe9f9[_0x19083e(0x102)]}),_0x2a89df=_0x4173e4[_0x19083e(0x206)];return _0x2a89df?console[_0x19083e(0x1c6)](_0x2a89df):console[_0x19083e(0x143)](_0x19083e(0x129)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x312470(0x20d)]='workflow:kill';['description']=a55_0x312470(0x231);async[a55_0x312470(0x192)](_0xdc4232){const _0x3096a5=a55_0x312470,{options:_0x1f82a0,args:_0x51cc3b,tdx:_0x1c8be3}=_0xdc4232,_0x155141=_0x51cc3b[0x0];if(!_0x155141)return console[_0x3096a5(0x143)](_0x3096a5(0x152)),0x1;const _0x3368e0=_0x1f82a0['reason'];_0x1f82a0['verbose']&&(console[_0x3096a5(0x143)](_0x3096a5(0x260)+_0x155141),_0x3368e0&&console[_0x3096a5(0x143)]('Reason:\x20'+_0x3368e0));if(!_0x1f82a0[_0x3096a5(0x17a)]){if(!isInteractive())return console[_0x3096a5(0x143)](a55_0x3d25b['red'](_0x3096a5(0x163)),_0x3096a5(0x14e)),console['error'](a55_0x3d25b[_0x3096a5(0x115)](_0x3096a5(0x227))),0x1;const _0xaad321=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x155141+'?');if(!_0xaad321)return console[_0x3096a5(0x143)](a55_0x3d25b[_0x3096a5(0x201)]('Cancelled')),0x1;}const _0x1ce699=await withSpinner(_0x3096a5(0x240),()=>_0x1c8be3['workflow'][_0x3096a5(0xf6)](_0x155141,_0x3368e0),{'verbose':_0x1f82a0['verbose']}),_0x551e38=_0x1ce699[_0x3096a5(0x206)];return console[_0x3096a5(0x143)]('✔\x20'+_0x551e38),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x312470(0x20d)]='workflow:retry';['description']=a55_0x312470(0x1ff);async[a55_0x312470(0x192)](_0xeec127){const _0x1f0d8e=a55_0x312470,{options:_0x1faf4b,args:_0x1321b6,tdx:_0x397f20}=_0xeec127,_0x20fe82=_0x1321b6[0x0];if(!_0x20fe82)return console[_0x1f0d8e(0x143)](_0x1f0d8e(0xe7)),console[_0x1f0d8e(0x143)](_0x1f0d8e(0x243)),0x1;let _0x732a0d=![],_0xa05d48=_0x20fe82;if(_0x20fe82[_0x1f0d8e(0x1c7)](_0x1f0d8e(0x184)))_0x732a0d=!![],_0xa05d48=_0x20fe82[_0x1f0d8e(0x16b)](0x8);else{if(_0x20fe82['startsWith'](_0x1f0d8e(0x273)))_0x732a0d=![],_0xa05d48=_0x20fe82['substring'](0x8);else return console[_0x1f0d8e(0x143)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x1f0d8e(0x143)](_0x1f0d8e(0x243)),0x1;}const _0x2e0f38=_0x1faf4b[_0x1f0d8e(0x144)],_0x2f3790=_0x1faf4b['resumeFrom'],_0x1b1bf5=_0x1faf4b[_0x1f0d8e(0x25d)],_0x6dbb72=_0x1faf4b[_0x1f0d8e(0x10e)];_0x1faf4b[_0x1f0d8e(0x102)]&&(console['error'](_0x1f0d8e(0x25a)+(_0x732a0d?_0x1f0d8e(0x28b):_0x1f0d8e(0x15d))+'\x20'+_0xa05d48),_0x2e0f38&&console[_0x1f0d8e(0x143)](_0x1f0d8e(0x18b)+_0x2e0f38),_0x2f3790&&console[_0x1f0d8e(0x143)]('Resume\x20from:\x20'+_0x2f3790),_0x1b1bf5&&console['error']('Params:\x20'+_0x1b1bf5),_0x6dbb72&&console['error']('Force:\x20yes'));let _0xa10a21;if(_0x1b1bf5)try{if(_0x1b1bf5[_0x1f0d8e(0x1c7)]('@')){const _0x41b180=await import(_0x1f0d8e(0x21a)),_0x2bf1c6=_0x1b1bf5[_0x1f0d8e(0x16b)](0x1),_0x3fe9d8=await _0x41b180[_0x1f0d8e(0x1dd)](_0x2bf1c6,_0x1f0d8e(0x153));_0xa10a21=JSON[_0x1f0d8e(0x1e5)](_0x3fe9d8);}else _0xa10a21=JSON[_0x1f0d8e(0x1e5)](_0x1b1bf5);}catch{return console[_0x1f0d8e(0x143)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x1faf4b[_0x1f0d8e(0x17a)]){if(!isInteractive())return console[_0x1f0d8e(0x143)](a55_0x3d25b['red'](_0x1f0d8e(0x163)),_0x1f0d8e(0x14e)),console[_0x1f0d8e(0x143)](a55_0x3d25b[_0x1f0d8e(0x115)](_0x1f0d8e(0x227))),0x1;const _0x465358=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x732a0d?_0x1f0d8e(0x28b):_0x1f0d8e(0x15d))+'\x20'+_0xa05d48+'?');if(!_0x465358)return console[_0x1f0d8e(0x143)](a55_0x3d25b[_0x1f0d8e(0x201)](_0x1f0d8e(0x1fc))),0x1;}let _0x1db3df;_0x732a0d?_0x1db3df=await withSpinner(_0x1f0d8e(0x11d),()=>_0x397f20[_0x1f0d8e(0x178)][_0x1f0d8e(0x197)](_0xa05d48,{'fromTask':_0x2e0f38,'retryParams':_0xa10a21}),{'verbose':_0x1faf4b[_0x1f0d8e(0x102)]}):_0x1db3df=await withSpinner(_0x1f0d8e(0x1a6),()=>_0x397f20[_0x1f0d8e(0x178)][_0x1f0d8e(0x21f)](_0xa05d48,{'resumeFrom':_0x2f3790,'retryParams':_0xa10a21,'force':_0x6dbb72}),{'verbose':_0x1faf4b['verbose']});const _0x382e50=_0x1db3df['data'];return console[_0x1f0d8e(0x143)](_0x1f0d8e(0x16f)),console[_0x1f0d8e(0x143)](_0x1f0d8e(0x19c)+_0x382e50[_0x1f0d8e(0x18c)]),console[_0x1f0d8e(0x143)](_0x1f0d8e(0x1b9)+_0x382e50[_0x1f0d8e(0x233)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x10b);['description']=a55_0x312470(0x1f7);async[a55_0x312470(0x192)](_0xf0b285){const _0x50f66c=a55_0x312470,{options:_0x311595,args:_0x3f0770,tdx:_0x530cec}=_0xf0b285;let _0x4b833c=_0x3f0770[0x0];if(!_0x4b833c){const _0x2280c7=this[_0x50f66c(0x12f)]([],_0x311595),_0x8e7bde=await withSpinner(_0x50f66c(0x1d4),()=>_0x530cec['workflow']['workflows'](_0x2280c7,{'limit':_0x311595['limit']}),{'verbose':_0x311595['verbose']}),_0x34d06d=_0x8e7bde['data'];if(_0x34d06d[_0x50f66c(0x20c)]===0x0)return console['error'](_0x50f66c(0x1e8)),!_0x2280c7&&console[_0x50f66c(0x143)](a55_0x3d25b[_0x50f66c(0x115)](_0x50f66c(0x1ab))),0x1;const _0x4be00e=_0x34d06d[_0x50f66c(0x210)](_0x1b0028=>({'title':_0x1b0028[_0x50f66c(0x137)]?.[_0x50f66c(0x20d)]+'.'+_0x1b0028['name'],'value':_0x1b0028[_0x50f66c(0x137)]?.[_0x50f66c(0x20d)]+'.'+_0x1b0028[_0x50f66c(0x20d)],'description':_0x1b0028[_0x50f66c(0x1cf)]?_0x50f66c(0x141)+_0x1b0028[_0x50f66c(0x1cf)]:undefined})),_0x482572=await a55_0x3870e8({'type':_0x50f66c(0x220),'name':_0x50f66c(0x178),'message':_0x50f66c(0x208),'choices':_0x4be00e});if(!_0x482572[_0x50f66c(0x178)])return 0x1;_0x4b833c=_0x482572[_0x50f66c(0x178)];}if(!_0x4b833c[_0x50f66c(0x134)]('.')){const _0x315712=this[_0x50f66c(0x12f)]([],_0x311595);if(_0x315712)_0x4b833c=_0x315712+'.'+_0x4b833c;else return console[_0x50f66c(0x143)](a55_0x3d25b[_0x50f66c(0x186)]('Error:'),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x50f66c(0x143)](a55_0x3d25b[_0x50f66c(0x115)](_0x50f66c(0x1ab))),0x1;}const _0x103251=_0x311595[_0x50f66c(0x132)],_0x1117d1=_0x311595[_0x50f66c(0x266)],_0x5b1881={};if(_0x103251&&Array[_0x50f66c(0x1af)](_0x103251))for(const _0x5efa00 of _0x103251){const _0x4d11af=_0x5efa00[_0x50f66c(0x17d)]('=');if(_0x4d11af===-0x1)return console[_0x50f66c(0x143)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x5efa00),console[_0x50f66c(0x143)](_0x50f66c(0x1a8)),0x1;const _0x220eeb=_0x5efa00[_0x50f66c(0x16b)](0x0,_0x4d11af),_0x49fd36=_0x5efa00[_0x50f66c(0x16b)](_0x4d11af+0x1);try{_0x5b1881[_0x220eeb]=JSON[_0x50f66c(0x1e5)](_0x49fd36);}catch{_0x5b1881[_0x220eeb]=_0x49fd36;}}_0x311595['verbose']&&(console[_0x50f66c(0x143)](_0x50f66c(0x290)+_0x4b833c),Object[_0x50f66c(0x166)](_0x5b1881)[_0x50f66c(0x20c)]>0x0&&console[_0x50f66c(0x143)](_0x50f66c(0x171)+JSON[_0x50f66c(0xe8)](_0x5b1881)),_0x1117d1&&console['error'](_0x50f66c(0x100)+_0x1117d1));const _0x42d149=await withSpinner(_0x50f66c(0x222),()=>_0x530cec[_0x50f66c(0x178)]['run'](_0x4b833c,_0x5b1881,{'sessionTime':_0x1117d1}),{'verbose':_0x311595[_0x50f66c(0x102)]}),_0x3c69cb=_0x42d149[_0x50f66c(0x206)];console['error'](_0x50f66c(0x286)),console[_0x50f66c(0x143)](_0x50f66c(0x16a)+_0x3c69cb['id']),console[_0x50f66c(0x143)](_0x50f66c(0x1b9)+_0x3c69cb[_0x50f66c(0x233)]),console[_0x50f66c(0x143)](_0x50f66c(0x1a0)+_0x3c69cb[_0x50f66c(0x137)]?.[_0x50f66c(0x20d)]),console['error'](_0x50f66c(0x133)+_0x3c69cb[_0x50f66c(0x178)]?.[_0x50f66c(0x20d)]);if(_0x3c69cb['project']?.['id']&&_0x3c69cb[_0x50f66c(0x233)]&&_0x3c69cb['id']){const _0x13e9fc=_0x311595['site'],_0x4ba7fb=getConsoleUrl(_0x13e9fc,'/app/workflows/'+_0x3c69cb[_0x50f66c(0x137)]['id']+_0x50f66c(0x212)+_0x3c69cb['sessionId']+_0x50f66c(0x24f)+_0x3c69cb['id']);console[_0x50f66c(0x143)](_0x50f66c(0x1f3)+a55_0x3d25b[_0x50f66c(0x11e)](_0x4ba7fb));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x312470(0x20d)]='workflow:download';[a55_0x312470(0x15c)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x44bf2b){const _0xcaf503=a55_0x312470,{options:_0x4ffbff,args:_0x2e831e,tdx:_0x4a51a9}=_0x44bf2b,_0x5a65df=_0x2e831e[0x0],_0xba2a0e=_0x2e831e[0x1]||'.';if(!_0x5a65df)return console[_0xcaf503(0x143)](_0xcaf503(0x22b)),console[_0xcaf503(0x143)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x171f34=_0x4ffbff[_0xcaf503(0x1cf)];_0x4ffbff['verbose']&&(console[_0xcaf503(0x143)](_0xcaf503(0x261)+_0x5a65df),console[_0xcaf503(0x143)](_0xcaf503(0xef)+_0xba2a0e),_0x171f34&&console[_0xcaf503(0x143)](_0xcaf503(0x289)+_0x171f34));const _0x5e6a4=await withSpinner('Downloading\x20project\x20'+_0x5a65df+_0xcaf503(0x138),()=>_0x4a51a9['workflow']['download'](_0x5a65df,_0xba2a0e,{'revision':_0x171f34}),{'verbose':_0x4ffbff[_0xcaf503(0x102)]}),_0xded9d1=_0x5e6a4[_0xcaf503(0x206)];return console[_0xcaf503(0x143)]('✔\x20Downloaded\x20'+_0xded9d1['projectName']),console[_0xcaf503(0x143)](_0xcaf503(0x1d1)+_0xded9d1['revision']),console['error']('\x20\x20Files\x20extracted:\x20'+_0xded9d1[_0xcaf503(0x238)]),console[_0xcaf503(0x143)]('\x20\x20Location:\x20'+_0xba2a0e+'/'+_0xded9d1['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x200);[a55_0x312470(0x15c)]=a55_0x312470(0x190);async[a55_0x312470(0x192)](_0x123c4e){const _0x2ad78a=a55_0x312470,{options:_0x1b84aa,args:_0x167818,tdx:_0xed6a16}=_0x123c4e;let _0x357ffb='.',_0x596885=_0x1b84aa[_0x2ad78a(0x20d)];if(_0x167818[0x0]){const {promises:_0x306c96}=await import('fs');try{const _0x28db49=await _0x306c96[_0x2ad78a(0xe6)](_0x167818[0x0]);if(_0x28db49[_0x2ad78a(0x177)]())_0x357ffb=_0x167818[0x0];else return console['error']('Error:\x20'+_0x167818[0x0]+_0x2ad78a(0x179)),0x1;}catch{_0x596885=_0x167818[0x0],_0x357ffb='.';}}const _0x59dab8=_0x1b84aa['revision'],_0x512c2b=_0x1b84aa[_0x2ad78a(0x126)];_0x1b84aa[_0x2ad78a(0x102)]&&(console[_0x2ad78a(0x143)](_0x2ad78a(0x1a2)+_0x357ffb),_0x596885&&console['error'](_0x2ad78a(0x1e7)+_0x596885),_0x59dab8&&console['error'](_0x2ad78a(0x289)+_0x59dab8),_0x512c2b&&console[_0x2ad78a(0x143)](_0x2ad78a(0x202)));const _0x40ee06=await withSpinner(_0x2ad78a(0x149),()=>_0xed6a16[_0x2ad78a(0x178)]['push'](_0x357ffb,{'projectName':_0x596885,'revision':_0x59dab8,'skipValidation':_0x512c2b}),{'verbose':_0x1b84aa[_0x2ad78a(0x102)]}),_0x5e6dc2=_0x40ee06[_0x2ad78a(0x206)];return console[_0x2ad78a(0x143)](_0x2ad78a(0x16c)+_0x5e6dc2[_0x2ad78a(0x11c)]),console[_0x2ad78a(0x143)](_0x2ad78a(0x14b)+_0x5e6dc2[_0x2ad78a(0x22a)]),console[_0x2ad78a(0x143)](_0x2ad78a(0x1d1)+_0x5e6dc2[_0x2ad78a(0x1cf)]),await this[_0x2ad78a(0x277)](_0xed6a16,_0x5e6dc2[_0x2ad78a(0x11c)],_0x1b84aa[_0x2ad78a(0x195)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x13b);['description']=a55_0x312470(0x283);async[a55_0x312470(0x192)](_0x4815ec){const _0x34ca68=a55_0x312470,{options:_0x4fc758,args:_0x2133a0,tdx:_0x3e81d6}=_0x4815ec,_0x1c5f2a=_0x2133a0[0x0],_0x4c1487=_0x2133a0[0x1];if(!_0x1c5f2a)return console[_0x34ca68(0x143)](a55_0x3d25b[_0x34ca68(0x186)](_0x34ca68(0x239)),_0x34ca68(0x23a)),console['error'](a55_0x3d25b['dim'](_0x34ca68(0x16d))),0x1;const _0x23d538=_0x4fc758[_0x34ca68(0x1cf)];_0x4fc758[_0x34ca68(0x102)]&&(console[_0x34ca68(0x143)]('Project:\x20'+_0x1c5f2a),_0x4c1487&&console[_0x34ca68(0x143)]('Target\x20directory:\x20'+_0x4c1487),_0x23d538&&console[_0x34ca68(0x143)](_0x34ca68(0x289)+_0x23d538),_0x4fc758[_0x34ca68(0x1fb)]&&console[_0x34ca68(0x143)]('Dry\x20run:\x20yes'));const _0x2d3b57=await withSpinner('Pulling\x20project\x20'+_0x1c5f2a+_0x34ca68(0x138),()=>_0x3e81d6[_0x34ca68(0x178)][_0x34ca68(0x28e)](_0x1c5f2a,{'targetDir':_0x4c1487,'revision':_0x23d538}),{'verbose':_0x4fc758[_0x34ca68(0x102)]}),_0x24218e=_0x2d3b57[_0x34ca68(0x206)];_0x24218e[_0x34ca68(0x1b4)]?console[_0x34ca68(0x143)](_0x34ca68(0x1ec)+_0x24218e['projectName']):console[_0x34ca68(0x143)](_0x34ca68(0x182)+_0x24218e[_0x34ca68(0x11c)]);console[_0x34ca68(0x143)]('\x20\x20Revision:\x20'+_0x24218e['revision']),console['error']('\x20\x20Target:\x20'+(a55_0x297239['relative'](process[_0x34ca68(0x20e)](),_0x24218e[_0x34ca68(0x12a)])||'.')),console['error'](_0x34ca68(0x142)+a55_0x3d25b[_0x34ca68(0x228)]('+'+_0x24218e[_0x34ca68(0x19b)][_0x34ca68(0x215)]+'\x20new')+',\x20'+(a55_0x3d25b[_0x34ca68(0x201)]('~'+_0x24218e[_0x34ca68(0x19b)][_0x34ca68(0xf9)]+_0x34ca68(0x1fd))+',\x20')+(a55_0x3d25b[_0x34ca68(0x186)]('-'+_0x24218e['summary'][_0x34ca68(0x246)]+_0x34ca68(0x22d))+',\x20')+(''+a55_0x3d25b['dim'](_0x24218e[_0x34ca68(0x19b)][_0x34ca68(0x173)]+_0x34ca68(0x23b))));for(const _0x25e79b of _0x24218e[_0x34ca68(0x114)]){_0x25e79b[_0x34ca68(0x104)]==='modified'&&_0x25e79b[_0x34ca68(0x1b5)]&&(console['error']('\x0a'+a55_0x3d25b[_0x34ca68(0x11e)]('---\x20'+_0x25e79b[_0x34ca68(0x1b3)])),console[_0x34ca68(0x143)](_0x25e79b[_0x34ca68(0x1b5)]));}if(!_0x24218e[_0x34ca68(0x169)])return saveSessionContext({'workflow_project':_0x24218e[_0x34ca68(0x11c)]},_0x4fc758['session']),console[_0x34ca68(0x143)](a55_0x3d25b[_0x34ca68(0x228)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x34ca68(0x143)](a55_0x3d25b[_0x34ca68(0x115)](_0x34ca68(0x257)+_0x24218e[_0x34ca68(0x11c)])),0x0;if(_0x4fc758[_0x34ca68(0x1fb)])return console[_0x34ca68(0x143)](a55_0x3d25b[_0x34ca68(0x201)](_0x34ca68(0x17e))),0x0;if(!_0x4fc758[_0x34ca68(0x17a)]){if(!isInteractive())return console[_0x34ca68(0x143)](a55_0x3d25b['red'](_0x34ca68(0x163)),_0x34ca68(0x14e)),console[_0x34ca68(0x143)](a55_0x3d25b[_0x34ca68(0x115)](_0x34ca68(0x227))),0x1;const _0x17fedc=await confirmKey(_0x34ca68(0x28c));if(!_0x17fedc)return console[_0x34ca68(0x143)](a55_0x3d25b[_0x34ca68(0x201)]('Cancelled'),'-\x20no\x20files\x20written'),0x1;}await withSpinner('Writing\x20files...',()=>_0x3e81d6[_0x34ca68(0x178)]['applyPullProject'](_0x24218e,{'revision':_0x23d538}),{'verbose':_0x4fc758[_0x34ca68(0x102)]}),saveSessionContext({'workflow_project':_0x24218e[_0x34ca68(0x11c)]},_0x4fc758[_0x34ca68(0x28b)]),console['error'](a55_0x3d25b['green'](_0x34ca68(0x214)));const _0x36d470=a55_0x297239[_0x34ca68(0x27b)](process[_0x34ca68(0x20e)](),_0x24218e[_0x34ca68(0x12a)])||'.';return console[_0x34ca68(0x143)](a55_0x3d25b[_0x34ca68(0x115)](_0x34ca68(0x113)+_0x36d470)),console[_0x34ca68(0x143)](a55_0x3d25b[_0x34ca68(0x115)](_0x34ca68(0x257)+_0x24218e[_0x34ca68(0x11c)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x187);[a55_0x312470(0x15c)]=a55_0x312470(0x26c);async[a55_0x312470(0x192)](_0x19e58c){const _0x31c826=a55_0x312470,{options:_0x4d51e2,args:_0x56c368,tdx:_0x3cf165}=_0x19e58c,_0x43aa7e=this[_0x31c826(0x24b)](_0x56c368,_0x4d51e2),_0xc55d03=_0x4d51e2[_0x31c826(0x1cf)],_0x35c504=_0x4d51e2[_0x31c826(0x126)];_0x4d51e2[_0x31c826(0x102)]&&(_0x43aa7e&&console[_0x31c826(0x143)](_0x31c826(0x248)+_0x43aa7e),_0xc55d03&&console[_0x31c826(0x143)](_0x31c826(0x289)+_0xc55d03),_0x4d51e2[_0x31c826(0x1fb)]&&console[_0x31c826(0x143)]('Dry\x20run:\x20yes'),_0x35c504&&console[_0x31c826(0x143)](_0x31c826(0x202)));let _0x29ac42;try{_0x29ac42=await withSpinner(_0x31c826(0x1ad),()=>_0x3cf165[_0x31c826(0x178)][_0x31c826(0x24e)]({'sourceDir':_0x43aa7e,'revision':_0xc55d03,'skipValidation':_0x35c504}),{'verbose':_0x4d51e2[_0x31c826(0x102)]});}catch(_0x43732f){if(_0x43732f instanceof Error&&_0x43732f[_0x31c826(0x21e)][_0x31c826(0x134)](_0x31c826(0x11a)))return console[_0x31c826(0x143)](a55_0x3d25b[_0x31c826(0x186)]('Error:'),_0x31c826(0x125)),_0x4d51e2[_0x31c826(0x10d)]?console['error'](a55_0x3d25b[_0x31c826(0x115)](_0x31c826(0x21d)+_0x4d51e2[_0x31c826(0x10d)]+_0x31c826(0x229)+_0x4d51e2['workflowProject']+'\x27')):console[_0x31c826(0x143)](a55_0x3d25b[_0x31c826(0x115)](_0x31c826(0x13c))),0x1;throw _0x43732f;}const _0x1af290=_0x29ac42[_0x31c826(0x206)];console['error'](_0x31c826(0x1da)+_0x1af290[_0x31c826(0x11c)]),console[_0x31c826(0x143)](_0x31c826(0x12e)+_0x1af290[_0x31c826(0x11f)]),console[_0x31c826(0x143)](_0x31c826(0x1d1)+_0x1af290['revision']),console['error'](_0x31c826(0x142)+a55_0x3d25b[_0x31c826(0x228)]('+'+_0x1af290[_0x31c826(0x19b)][_0x31c826(0x215)]+_0x31c826(0x14a))+',\x20'+(a55_0x3d25b[_0x31c826(0x201)]('~'+_0x1af290[_0x31c826(0x19b)][_0x31c826(0xf9)]+'\x20modified')+',\x20')+(a55_0x3d25b[_0x31c826(0x186)]('-'+_0x1af290['summary'][_0x31c826(0x246)]+_0x31c826(0x22d))+',\x20')+(''+a55_0x3d25b[_0x31c826(0x115)](_0x1af290[_0x31c826(0x19b)][_0x31c826(0x173)]+'\x20unchanged')));for(const _0x3f7d47 of _0x1af290[_0x31c826(0x114)]){_0x3f7d47[_0x31c826(0x104)]===_0x31c826(0xf9)&&_0x3f7d47[_0x31c826(0x1b5)]&&(console[_0x31c826(0x143)]('\x0a'+a55_0x3d25b[_0x31c826(0x11e)]('---\x20'+_0x3f7d47[_0x31c826(0x1b3)])),console[_0x31c826(0x143)](_0x3f7d47['diff']));}if(!_0x1af290[_0x31c826(0x169)])return console[_0x31c826(0x143)](a55_0x3d25b[_0x31c826(0x228)](_0x31c826(0x193))),await this['showWorkflowConsoleUrl'](_0x3cf165,_0x1af290['projectName'],_0x4d51e2[_0x31c826(0x195)]),0x0;if(_0x4d51e2[_0x31c826(0x1fb)])return console['error'](a55_0x3d25b[_0x31c826(0x201)](_0x31c826(0x135))),0x0;if(!_0x4d51e2[_0x31c826(0x17a)]){if(!isInteractive())return console[_0x31c826(0x143)](a55_0x3d25b[_0x31c826(0x186)](_0x31c826(0x163)),_0x31c826(0x14e)),console[_0x31c826(0x143)](a55_0x3d25b['dim'](_0x31c826(0x227))),0x1;const _0x527573=await confirmKey(_0x31c826(0x1a3));if(!_0x527573)return console['error'](a55_0x3d25b[_0x31c826(0x201)](_0x31c826(0x1fc)),_0x31c826(0x122)),0x1;}const _0xbc9de3=await withSpinner('Pushing\x20project...',()=>_0x3cf165[_0x31c826(0x178)]['executePushProject'](_0x1af290),{'verbose':_0x4d51e2['verbose']}),_0x56a2fe=_0xbc9de3[_0x31c826(0x206)];return console[_0x31c826(0x143)](a55_0x3d25b['green'](_0x31c826(0x121))),console['error'](_0x31c826(0x14b)+_0x56a2fe['projectId']),console[_0x31c826(0x143)]('\x20\x20Revision:\x20'+_0x56a2fe['revision']),await this['showWorkflowConsoleUrl'](_0x3cf165,_0x56a2fe[_0x31c826(0x11c)],_0x4d51e2[_0x31c826(0x195)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a55_0x312470(0x181);[a55_0x312470(0x15c)]=a55_0x312470(0x139);async['execute'](_0x3fc540){const _0x43f601=a55_0x312470,{options:_0x4bb05d,args:_0x442bba,tdx:_0x55e037}=_0x3fc540,_0x4abd39=this['resolveProjectDir'](_0x442bba,_0x4bb05d),_0x5271b9=_0x4bb05d[_0x43f601(0x20d)],_0x2083f0=_0x4bb05d['revision'],_0xa886d0=_0x4bb05d[_0x43f601(0x126)];if(!_0x4abd39)return console[_0x43f601(0x143)](a55_0x3d25b[_0x43f601(0x186)]('Error:'),_0x43f601(0x247)),console['error'](a55_0x3d25b[_0x43f601(0x115)](_0x43f601(0x1b8))),console[_0x43f601(0x143)](a55_0x3d25b[_0x43f601(0x115)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x5271b9)return console['error'](a55_0x3d25b[_0x43f601(0x186)](_0x43f601(0x239)),_0x43f601(0x188)),console[_0x43f601(0x143)](a55_0x3d25b[_0x43f601(0x115)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x4bb05d[_0x43f601(0x102)]&&(console['error']('Source\x20directory:\x20'+_0x4abd39),console[_0x43f601(0x143)]('New\x20project\x20name:\x20'+_0x5271b9),_0x2083f0&&console[_0x43f601(0x143)]('Revision:\x20'+_0x2083f0),_0x4bb05d[_0x43f601(0x1fb)]&&console['error'](_0x43f601(0x1bf)),_0xa886d0&&console['error'](_0x43f601(0x202)));const _0x25498c=await withSpinner(_0x43f601(0x1f0),()=>_0x55e037[_0x43f601(0x178)][_0x43f601(0x218)](_0x4abd39,_0x5271b9,{'revision':_0x2083f0,'skipValidation':_0xa886d0}),{'verbose':_0x4bb05d[_0x43f601(0x102)]}),_0x2af199=_0x25498c[_0x43f601(0x206)];console[_0x43f601(0x143)]('Source:\x20'+_0x2af199[_0x43f601(0x11f)]);_0x2af199[_0x43f601(0xf4)]&&console[_0x43f601(0x143)](_0x43f601(0x24d)+_0x2af199[_0x43f601(0xf4)]);console[_0x43f601(0x143)]('New\x20project\x20name:\x20'+_0x2af199[_0x43f601(0x10c)]),console['error'](_0x43f601(0x289)+_0x2af199[_0x43f601(0x1cf)]),console[_0x43f601(0x143)](_0x43f601(0x27d)+_0x2af199[_0x43f601(0x10f)]);_0x2af199[_0x43f601(0x1d7)]&&(console[_0x43f601(0x143)](a55_0x3d25b[_0x43f601(0x201)](_0x43f601(0xea)+_0x2af199[_0x43f601(0x10c)]+_0x43f601(0x12b)+_0x2af199[_0x43f601(0x15a)]+')')),console['error'](a55_0x3d25b['yellow'](_0x43f601(0xeb))));if(_0x4bb05d[_0x43f601(0x1fb)])return console[_0x43f601(0x143)](a55_0x3d25b[_0x43f601(0x201)](_0x43f601(0x19f))),0x0;if(!_0x4bb05d[_0x43f601(0x17a)]){if(!isInteractive())return console[_0x43f601(0x143)](a55_0x3d25b['red'](_0x43f601(0x163)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a55_0x3d25b['dim'](_0x43f601(0x227))),0x1;const _0x8f1254=_0x2af199[_0x43f601(0xf4)]||a55_0x297239[_0x43f601(0x17b)](_0x4abd39),_0x5eaa35=_0x2af199[_0x43f601(0x1d7)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x5271b9+_0x43f601(0x185):_0x43f601(0x15e)+_0x8f1254+_0x43f601(0x127)+_0x5271b9+'\x22?',_0x1ddf69=await confirmKey(_0x5eaa35);if(!_0x1ddf69)return console[_0x43f601(0x143)](a55_0x3d25b['yellow'](_0x43f601(0x1fc))),0x1;}const _0x5d434d=await withSpinner(_0x2af199[_0x43f601(0x1d7)]?_0x43f601(0x244)+_0x5271b9+_0x43f601(0x138):'Cloning\x20to\x20'+_0x5271b9+'...',()=>_0x55e037[_0x43f601(0x178)][_0x43f601(0x131)](_0x2af199),{'verbose':_0x4bb05d[_0x43f601(0x102)]}),_0x4924c0=_0x5d434d[_0x43f601(0x206)];return console[_0x43f601(0x143)](a55_0x3d25b[_0x43f601(0x228)](_0x2af199['targetExists']?'✔\x20Project\x20updated':_0x43f601(0x1bc))),console[_0x43f601(0x143)](_0x43f601(0x1a0)+_0x4924c0[_0x43f601(0x10c)]),console[_0x43f601(0x143)](_0x43f601(0x14b)+_0x4924c0[_0x43f601(0x170)]),console[_0x43f601(0x143)]('\x20\x20Revision:\x20'+_0x4924c0[_0x43f601(0x1cf)]),await this[_0x43f601(0x277)](_0x55e037,_0x4924c0[_0x43f601(0x10c)],_0x4bb05d[_0x43f601(0x195)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a55_0x312470(0x20d)]='workflow:delete';[a55_0x312470(0x15c)]=a55_0x312470(0xfa);async['execute'](_0x47bae3){const _0x48b67c=a55_0x312470,{options:_0x3073ab,args:_0x1b2d6c,tdx:_0x33ac70}=_0x47bae3,_0x405a6f=_0x1b2d6c[0x0];if(!_0x405a6f)return console[_0x48b67c(0x143)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x48b67c(0x143)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x3073ab[_0x48b67c(0x102)]&&console[_0x48b67c(0x143)](_0x48b67c(0x261)+_0x405a6f);if(!_0x3073ab[_0x48b67c(0x17a)]){if(!isInteractive())return console[_0x48b67c(0x143)](a55_0x3d25b[_0x48b67c(0x186)]('\x0aError:'),_0x48b67c(0x14e)),console['error'](a55_0x3d25b[_0x48b67c(0x115)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1ee5c=await confirmKey(_0x48b67c(0x281)+_0x405a6f+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x1ee5c)return console[_0x48b67c(0x143)](a55_0x3d25b[_0x48b67c(0x201)](_0x48b67c(0x1fc))),0x1;}const _0x309114=await withSpinner(_0x48b67c(0x258)+_0x405a6f+'...',()=>_0x33ac70['workflow']['delete'](_0x405a6f),{'verbose':_0x3073ab[_0x48b67c(0x102)]}),_0x3240d6=_0x309114['data'];return console[_0x48b67c(0x143)](_0x48b67c(0x155)+_0x3240d6[_0x48b67c(0x11c)]),console[_0x48b67c(0x143)](_0x48b67c(0x14b)+_0x3240d6[_0x48b67c(0x22a)]),0x0;}}export function parseKeyValue(_0x193a59){const _0xe28823=a55_0x312470,_0x2bb2b8=_0x193a59['indexOf']('=');if(_0x2bb2b8===-0x1)throw new Error(_0xe28823(0x1f2)+_0x193a59+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x899caf=_0x193a59[_0xe28823(0x16b)](0x0,_0x2bb2b8),_0x4e8740=_0x193a59[_0xe28823(0x16b)](_0x2bb2b8+0x1);if(!_0x899caf)throw new Error(_0xe28823(0x253));return{'key':_0x899caf,'value':_0x4e8740};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x279);[a55_0x312470(0x15c)]=a55_0x312470(0x1aa);async['execute'](_0x4dbfbb){const _0x5ba433=a55_0x312470,{options:_0x11a6d7,args:_0x800b57,tdx:_0x400f53}=_0x4dbfbb,_0x4e58a6=this[_0x5ba433(0x1d0)](_0x800b57,_0x11a6d7);if(!_0x4e58a6)return 0x1;_0x11a6d7['verbose']&&console[_0x5ba433(0x143)](_0x5ba433(0x261)+_0x4e58a6);const _0x59d7d6=await withSpinner(_0x5ba433(0x1ea),()=>_0x400f53[_0x5ba433(0x178)][_0x5ba433(0x117)](_0x4e58a6),{'verbose':_0x11a6d7['verbose']}),{secrets:_0x5b9cfe}=_0x59d7d6[_0x5ba433(0x206)];return console[_0x5ba433(0x143)](_0x5ba433(0x1a7)+_0x5b9cfe[_0x5ba433(0x20c)]+_0x5ba433(0x213)+(_0x5b9cfe[_0x5ba433(0x20c)]!==0x1?'s':'')),await handleSDKOutput(_0x5b9cfe,_0x11a6d7),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x312470(0x20d)]=a55_0x312470(0x20b);[a55_0x312470(0x15c)]=a55_0x312470(0x159);async[a55_0x312470(0x192)](_0x124976){const _0x2a583d=a55_0x312470,{options:_0x504a26,args:_0x3dc9f8,tdx:_0x580672}=_0x124976;let _0x144752,_0x120c80;if(_0x3dc9f8['length']>=0x1&&!_0x3dc9f8[0x0][_0x2a583d(0x134)]('='))_0x144752=_0x3dc9f8[0x0],_0x120c80=_0x3dc9f8[_0x2a583d(0x209)](0x1);else{if(_0x3dc9f8[_0x2a583d(0x20c)]>=0x1&&_0x504a26[_0x2a583d(0x10d)])_0x144752=_0x504a26[_0x2a583d(0x10d)],_0x120c80=_0x3dc9f8;else return _0x3dc9f8[_0x2a583d(0x20c)]>=0x1?(console['error'](_0x2a583d(0x22b)),console[_0x2a583d(0x143)](_0x2a583d(0x1ab)),0x1):(console[_0x2a583d(0x143)](_0x2a583d(0x15f)),console['error'](_0x2a583d(0x1f1)),0x1);}if(_0x120c80['length']===0x0)return console[_0x2a583d(0x143)](_0x2a583d(0x15f)),console[_0x2a583d(0x143)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x4f35a2={};try{for(const _0x5504bc of _0x120c80){const {key:_0x3df20c,value:_0x44a6c3}=parseKeyValue(_0x5504bc);_0x4f35a2[_0x3df20c]=_0x44a6c3;}}catch(_0x3c1311){return _0x3c1311 instanceof Error&&console[_0x2a583d(0x143)](a55_0x3d25b[_0x2a583d(0x186)](_0x2a583d(0x239)),_0x3c1311[_0x2a583d(0x21e)]),0x1;}const _0xf34803=Object[_0x2a583d(0x166)](_0x4f35a2);_0x504a26['verbose']&&(console[_0x2a583d(0x143)](_0x2a583d(0x261)+_0x144752),console['error'](_0x2a583d(0x150)+_0xf34803['join'](',\x20')));const _0x40200e=await withSpinner(_0xf34803['length']===0x1?_0x2a583d(0x27a):_0x2a583d(0x14c)+_0xf34803[_0x2a583d(0x20c)]+_0x2a583d(0x13d),()=>_0x580672['workflow'][_0x2a583d(0x255)](_0x144752,_0x4f35a2),{'verbose':_0x504a26[_0x2a583d(0x102)]}),_0x52bcd8=_0x40200e['data'];return console[_0x2a583d(0x143)](_0xf34803[_0x2a583d(0x20c)]===0x1?'✔\x20Secret\x20\x27'+_0x52bcd8['keys'][0x0]+_0x2a583d(0x22f)+_0x52bcd8[_0x2a583d(0x11c)]+'\x27':'✔\x20'+_0x52bcd8[_0x2a583d(0x166)][_0x2a583d(0x20c)]+_0x2a583d(0x199)+_0x52bcd8[_0x2a583d(0x11c)]+'\x27'),(_0x504a26['json']||_0x504a26[_0x2a583d(0x242)])&&await handleSingleObjectOutput(_0x52bcd8,_0x504a26),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a55_0x312470(0x221);[a55_0x312470(0x15c)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a55_0x312470(0x192)](_0x46bb09){const _0x5e24a9=a55_0x312470,{options:_0x409f80,args:_0x592ef8,tdx:_0x4f11bd}=_0x46bb09;let _0x8a1a95,_0x176d83;if(_0x592ef8[_0x5e24a9(0x20c)]>=0x2)_0x8a1a95=_0x592ef8[0x0],_0x176d83=_0x592ef8[0x1];else{if(_0x592ef8[_0x5e24a9(0x20c)]===0x1&&_0x409f80['workflowProject'])_0x8a1a95=_0x409f80['workflowProject'],_0x176d83=_0x592ef8[0x0];else return _0x592ef8[_0x5e24a9(0x20c)]===0x1?(console['error'](_0x5e24a9(0x22b)),console[_0x5e24a9(0x143)](_0x5e24a9(0x1ab)),0x1):(console[_0x5e24a9(0x143)](_0x5e24a9(0x1c3)),console[_0x5e24a9(0x143)](_0x5e24a9(0x269)),0x1);}_0x409f80[_0x5e24a9(0x102)]&&(console[_0x5e24a9(0x143)](_0x5e24a9(0x261)+_0x8a1a95),console[_0x5e24a9(0x143)]('Key:\x20'+_0x176d83));if(!_0x409f80[_0x5e24a9(0x17a)]){if(!isInteractive())return console[_0x5e24a9(0x143)](a55_0x3d25b[_0x5e24a9(0x186)]('\x0aError:'),_0x5e24a9(0x14e)),console[_0x5e24a9(0x143)](a55_0x3d25b[_0x5e24a9(0x115)](_0x5e24a9(0x227))),0x1;const _0x2a1966=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x176d83+_0x5e24a9(0x256)+_0x8a1a95+'\x27?');if(!_0x2a1966)return console[_0x5e24a9(0x143)](a55_0x3d25b[_0x5e24a9(0x201)](_0x5e24a9(0x1fc))),0x1;}const _0x2fa281=await withSpinner(_0x5e24a9(0x130),()=>_0x4f11bd['workflow'][_0x5e24a9(0xfc)](_0x8a1a95,_0x176d83),{'verbose':_0x409f80['verbose']}),_0x57dcb1=_0x2fa281[_0x5e24a9(0x206)];return console['error'](_0x5e24a9(0x272)+_0x57dcb1[_0x5e24a9(0x145)]+_0x5e24a9(0x1f6)+_0x57dcb1[_0x5e24a9(0x11c)]+'\x27'),(_0x409f80[_0x5e24a9(0x280)]||_0x409f80['jsonl'])&&await handleSingleObjectOutput(_0x57dcb1,_0x409f80),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(_0xe017d5){const _0x266a6f=a55_0x312470,_0x2dd016=Math[_0x266a6f(0x1b7)](_0xe017d5/0x3e8),_0x3f1292=Math[_0x266a6f(0x1b7)](_0x2dd016/0x3c),_0x337dea=Math[_0x266a6f(0x1b7)](_0x3f1292/0x3c),_0x4d2ec2=Math[_0x266a6f(0x1b7)](_0x337dea/0x18);if(_0x4d2ec2>0x0){const _0x409fe3=_0x337dea%0x18;return _0x409fe3>0x0?_0x4d2ec2+'d\x20'+_0x409fe3+'h':_0x4d2ec2+'d';}else{if(_0x337dea>0x0){const _0x5cf727=_0x3f1292%0x3c;return _0x5cf727>0x0?_0x337dea+'h\x20'+_0x5cf727+'m':_0x337dea+'h';}else{if(_0x3f1292>0x0){const _0x500d77=_0x2dd016%0x3c;return _0x500d77>0x0?_0x3f1292+'m\x20'+_0x500d77+'s':_0x3f1292+'m';}else return _0x2dd016+'s';}}}function formatTimestamp(_0x9e00eb,_0x55c3dd){const _0x5305a9=a55_0x312470,_0x234e17=new Date(_0x9e00eb),_0xaa795b=String(_0x234e17[_0x5305a9(0x105)]())['padStart'](0x2,'0'),_0x1f8dce=String(_0x234e17[_0x5305a9(0x250)]())[_0x5305a9(0xe3)](0x2,'0'),_0x2f2d10=_0xaa795b+':'+_0x1f8dce,_0x5fd9a2=_0x234e17[_0x5305a9(0x120)]()===_0x55c3dd['getFullYear']()&&_0x234e17[_0x5305a9(0x1c4)]()===_0x55c3dd['getMonth']()&&_0x234e17[_0x5305a9(0x216)]()===_0x55c3dd['getDate']();if(_0x5fd9a2)return _0x2f2d10;else{const _0x4c41e3=String(_0x234e17[_0x5305a9(0x1c4)]()+0x1)[_0x5305a9(0xe3)](0x2,'0'),_0x2ed617=String(_0x234e17['getDate']())['padStart'](0x2,'0');return _0x4c41e3+'-'+_0x2ed617+'\x20'+_0x2f2d10;}}function formatDate(_0x17d533){const _0x1ad267=a55_0x312470,_0x448586=_0x17d533[_0x1ad267(0x120)](),_0x4d158f=String(_0x17d533[_0x1ad267(0x1c4)]()+0x1)[_0x1ad267(0xe3)](0x2,'0'),_0x54a84e=String(_0x17d533[_0x1ad267(0x216)]())[_0x1ad267(0xe3)](0x2,'0');return _0x448586+'-'+_0x4d158f+'-'+_0x54a84e;}function getTaskStateIcon(_0x44ed53){const _0x1297d8={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1297d8[_0x44ed53]||'⚪';}function getBarChar(_0x2ba0da){const _0x2530d7=a55_0x312470;return _0x2ba0da===_0x2530d7(0x143)||_0x2ba0da===_0x2530d7(0x1dc)?'×':'─';}function getBarColor(_0x457005){const _0x338c23=a55_0x312470,_0x2716a2={'success':a55_0x3d25b[_0x338c23(0x228)],'error':a55_0x3d25b[_0x338c23(0x186)],'group_error':a55_0x3d25b['red'],'running':a55_0x3d25b[_0x338c23(0x128)],'blocked':a55_0x3d25b['yellow'],'planned':a55_0x3d25b[_0x338c23(0x115)],'canceling':a55_0x3d25b[_0x338c23(0x201)]};return _0x2716a2[_0x457005]||a55_0x3d25b[_0x338c23(0xf5)];}function parseTaskName(_0x3e0689){const _0x1aa88b=a55_0x312470;let _0x25dd44=_0x3e0689['replace'](/^\++/,'');const _0x58e741=_0x25dd44['split']('+'),_0x39ca31=_0x58e741[_0x1aa88b(0x20c)]>0x1?_0x58e741[_0x1aa88b(0x20c)]-0x2:0x0,_0x8e09c=_0x58e741[_0x58e741[_0x1aa88b(0x20c)]-0x1]||_0x25dd44;return{'level':_0x39ca31,'name':'+'+_0x8e09c};}function truncateTaskName(_0x4c2f35,_0x50c107){const _0x20e4c2=a55_0x312470,_0x1480bb=stringWidth(_0x4c2f35);if(_0x1480bb<=_0x50c107)return _0x4c2f35;let _0x3037b3=_0x4c2f35;while(stringWidth(_0x3037b3+'…')>_0x50c107&&_0x3037b3[_0x20e4c2(0x20c)]>0x0){_0x3037b3=_0x3037b3[_0x20e4c2(0x209)](0x0,-0x1);}return _0x3037b3+'…';}function calculateTimeScale(_0x5ac4e7,_0x2b1835){const _0x460811=a55_0x312470;return{'startTime':_0x5ac4e7['start'],'endTime':_0x5ac4e7[_0x460811(0x1c5)],'durationMs':_0x5ac4e7[_0x460811(0x11b)],'msPerChar':_0x5ac4e7[_0x460811(0x11b)]/_0x2b1835};}function timeToPosition(_0x509465,_0x5b6b1f,_0x4c80c2){const _0x513cde=a55_0x312470,_0x41b4d9=_0x509465-_0x5b6b1f[_0x513cde(0x15b)],_0xcd3089=Math['floor'](_0x41b4d9/_0x5b6b1f[_0x513cde(0x26e)]);return Math[_0x513cde(0xfe)](0x0,Math[_0x513cde(0x160)](_0xcd3089,_0x4c80c2));}function renderTimeAxis(_0x4e689e,_0xa38ebb){const _0x378f34=a55_0x312470,_0x3defc9=Math['min'](TIMELINE_CONFIG[_0x378f34(0x1c9)],Math[_0x378f34(0xfe)](TIMELINE_CONFIG[_0x378f34(0x136)],Math[_0x378f34(0x1b7)](_0xa38ebb/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x22d4dd=_0x4e689e[_0x378f34(0x24c)]/(_0x3defc9-0x1),_0x13b1c3=new Date(_0x4e689e[_0x378f34(0x15b)]),_0x4bc238=[];for(let _0x5b07d4=0x0;_0x5b07d4<_0x3defc9;_0x5b07d4++){const _0x3aedb7=_0x4e689e[_0x378f34(0x15b)]+_0x5b07d4*_0x22d4dd,_0x54757c=timeToPosition(_0x3aedb7,_0x4e689e,_0xa38ebb),_0x1c2502=formatTimestamp(_0x3aedb7,_0x13b1c3);_0x4bc238[_0x378f34(0x124)]({'pos':_0x54757c,'text':_0x1c2502});}const _0x53a41d=new Array(_0xa38ebb)[_0x378f34(0x245)]('\x20');let _0x5a9e3e=-0x1;for(const {pos:_0x170a23,text:_0x48fcc8}of _0x4bc238){let _0x2d8e3d=Math['max'](0x0,_0x170a23-Math[_0x378f34(0x1b7)](_0x48fcc8[_0x378f34(0x20c)]/0x2));_0x2d8e3d<=_0x5a9e3e+TIMELINE_CONFIG[_0x378f34(0x1bb)]&&(_0x2d8e3d=_0x5a9e3e+TIMELINE_CONFIG[_0x378f34(0x1bb)]+0x1);_0x2d8e3d+_0x48fcc8[_0x378f34(0x20c)]>_0xa38ebb&&(_0x2d8e3d=_0xa38ebb-_0x48fcc8[_0x378f34(0x20c)]);if(_0x2d8e3d>=0x0&&_0x2d8e3d+_0x48fcc8['length']<=_0xa38ebb&&_0x2d8e3d>_0x5a9e3e){for(let _0x523992=0x0;_0x523992<_0x48fcc8[_0x378f34(0x20c)];_0x523992++){_0x53a41d[_0x2d8e3d+_0x523992]=_0x48fcc8[_0x523992];}_0x5a9e3e=_0x2d8e3d+_0x48fcc8[_0x378f34(0x20c)]-0x1;}}return _0x53a41d[_0x378f34(0x123)]('');}function renderTaskRow(_0x506c38,_0x21cee8,_0x789364,_0x4feadd){const _0x54fc51=a55_0x312470,{level:_0x352a34,name:_0x1fce44}=parseTaskName(_0x506c38[_0x54fc51(0x20d)]),_0x4fc6c8='\x20'['repeat'](_0x352a34),_0x1d8524=_0x506c38['window']?'('+formatElapsed(_0x506c38[_0x54fc51(0x1ae)][_0x54fc51(0x11b)])+')':'',_0x512704=stringWidth(_0x1d8524),_0x5529af=_0x352a34*0x1,_0x461aca=_0x4feadd-_0x5529af-_0x512704-0x1,_0x255cd4=truncateTaskName(_0x1fce44,_0x461aca),_0x4beff7=_0x4fc6c8+_0x255cd4,_0x27b9c0=stringWidth(_0x4beff7),_0x504064=_0x4feadd-_0x27b9c0-_0x512704,_0x25c757=_0x4beff7+'\x20'['repeat'](Math[_0x54fc51(0xfe)](0x1,_0x504064))+a55_0x3d25b[_0x54fc51(0x115)](_0x1d8524),_0x642b6d=getTaskStateIcon(_0x506c38[_0x54fc51(0x12c)]),_0x3fdbc6=new Array(_0x789364)['fill']('\x20');if(_0x506c38[_0x54fc51(0x1ae)]){const _0x179a0c=timeToPosition(_0x506c38[_0x54fc51(0x1ae)][_0x54fc51(0x1b0)],_0x21cee8,_0x789364),_0x1010f3=timeToPosition(_0x506c38[_0x54fc51(0x1ae)][_0x54fc51(0x1c5)],_0x21cee8,_0x789364),_0x1458a2=getBarChar(_0x506c38[_0x54fc51(0x12c)]),_0x3aec5e=Math[_0x54fc51(0xfe)](_0x179a0c+0x1,_0x1010f3);for(let _0x23c04c=_0x179a0c;_0x23c04c<Math['min'](_0x3aec5e,_0x789364);_0x23c04c++){_0x3fdbc6[_0x23c04c]=_0x1458a2;}}const _0x50a7f7=getBarColor(_0x506c38[_0x54fc51(0x12c)]),_0x1ef293=_0x3fdbc6['map'](_0x1ed68c=>_0x1ed68c==='\x20'?'\x20':_0x50a7f7(_0x1ed68c))['join']('');return _0x642b6d+'\x20'+_0x25c757+'│'+_0x1ef293+'│';}function a55_0x1a70(_0x33900c,_0x30da2f){_0x33900c=_0x33900c-0xe3;const _0x491f23=a55_0x491f();let _0x1a7097=_0x491f23[_0x33900c];return _0x1a7097;}function calculateStats(_0x38729e){const _0x4dbb96=a55_0x312470,_0x301872={'total':_0x38729e[_0x4dbb96(0x20c)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3ad1be of _0x38729e){if(_0x3ad1be[_0x4dbb96(0x12c)]===_0x4dbb96(0x219))_0x301872['success']++;else{if(_0x3ad1be[_0x4dbb96(0x12c)]==='error'||_0x3ad1be[_0x4dbb96(0x12c)]==='group_error')_0x301872[_0x4dbb96(0x143)]++;else _0x3ad1be['state']==='running'?_0x301872[_0x4dbb96(0x161)]++:_0x301872[_0x4dbb96(0xfb)]++;}}return _0x301872;}function formatStats(_0x1730e7){const _0x2cb914=a55_0x312470;return[_0x2cb914(0x19e)+_0x1730e7[_0x2cb914(0x172)],'✅\x20'+_0x1730e7[_0x2cb914(0x219)],'❌\x20'+_0x1730e7[_0x2cb914(0x143)],'🔄\x20'+_0x1730e7[_0x2cb914(0x161)],'⏳\x20'+_0x1730e7['pending']][_0x2cb914(0x123)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a55_0x312470(0x164);[a55_0x312470(0x15c)]=a55_0x312470(0x270);async['execute'](_0x3e7682){const _0x479257=a55_0x312470,{options:_0x49d83e,args:_0x3d82b7,tdx:_0x26eb7a}=_0x3e7682;let _0x359947,_0x40c263,_0x5f178f=![];if(_0x3d82b7[0x0]){if(_0x3d82b7[0x0][_0x479257(0x134)]('.')){const _0x5b6419=this[_0x479257(0x103)](_0x3d82b7,_0x49d83e);if(!_0x5b6419)return 0x1;_0x359947=_0x5b6419[_0x479257(0x11c)],_0x40c263=_0x5b6419[_0x479257(0x17c)];}else{_0x40c263=_0x3d82b7[0x0],_0x359947=_0x49d83e[_0x479257(0x10d)];if(!_0x359947)return console[_0x479257(0x143)](a55_0x3d25b[_0x479257(0x186)](_0x479257(0x239)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x5f178f=!![];}}else{const _0x4430c3=this[_0x479257(0x103)](_0x3d82b7,_0x49d83e);if(!_0x4430c3)return 0x1;_0x359947=_0x4430c3['projectName'],_0x40c263=_0x4430c3[_0x479257(0x17c)];}if(_0x49d83e[_0x479257(0x102)]){if(_0x359947&&_0x40c263)console[_0x479257(0x143)]('Filter:\x20'+_0x359947+'.'+_0x40c263);else _0x359947&&console[_0x479257(0x143)]('Filter:\x20project='+_0x359947);}const _0x13e07c=_0x49d83e['attemptId'],_0x449019=_0x49d83e[_0x479257(0x233)];if(_0x13e07c){_0x449019&&console[_0x479257(0x143)](a55_0x3d25b[_0x479257(0x201)](_0x479257(0x28d)),_0x479257(0x262));const _0x16abc8=_0x49d83e[_0x479257(0x1e4)];return _0x16abc8?await this['pollTimeline'](_0x3e7682,_0x13e07c):await this['renderSingleTimeline'](_0x3e7682,_0x13e07c,_0x49d83e),0x0;}if(_0x449019){const _0x46d80d=await withSpinner(_0x479257(0x108),()=>_0x26eb7a['workflow'][_0x479257(0x1be)]({'projectName':_0x359947,'workflowName':_0x40c263,'limit':0x64}),{'verbose':_0x49d83e['verbose']}),_0x4f0fef=_0x46d80d['data'][_0x479257(0x1de)](_0x5406ff=>_0x5406ff['id']===_0x449019);if(!_0x4f0fef)return console['error'](a55_0x3d25b[_0x479257(0x186)]('Error:'),'Session\x20not\x20found:\x20'+_0x449019),0x1;if(!_0x4f0fef['lastAttempt']?.['id'])return console[_0x479257(0x143)](a55_0x3d25b[_0x479257(0x186)](_0x479257(0x239)),_0x479257(0x25f)+_0x449019+'\x20has\x20no\x20attempts'),0x1;const _0x4c08c0=_0x4f0fef[_0x479257(0x146)]['id'];_0x49d83e[_0x479257(0x102)]&&console[_0x479257(0x143)](_0x479257(0x1c8)+_0x4c08c0+'\x20from\x20session\x20'+_0x449019);const _0x253eea=_0x49d83e['follow'];return _0x253eea?await this[_0x479257(0x1cc)](_0x3e7682,_0x4c08c0):await this['renderSingleTimeline'](_0x3e7682,_0x4c08c0,_0x49d83e),0x0;}const _0x4dae5c=await withSpinner('Loading\x20sessions...',()=>_0x26eb7a[_0x479257(0x178)][_0x479257(0x1be)]({'projectName':_0x359947,'workflowName':_0x40c263,'limit':_0x49d83e[_0x479257(0x27c)]||0x32}),{'verbose':_0x49d83e[_0x479257(0x102)]}),_0xed2c7a=_0x4dae5c[_0x479257(0x206)];if(_0xed2c7a[_0x479257(0x20c)]===0x0){if(_0x359947&&_0x40c263)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x359947+'.'+_0x40c263);else _0x359947?console[_0x479257(0x143)](_0x479257(0x234)+_0x359947):(console[_0x479257(0x143)](_0x479257(0x175)),console[_0x479257(0x143)](a55_0x3d25b[_0x479257(0x115)](_0x479257(0x23c))));return 0x0;}_0xed2c7a[_0x479257(0x282)]((_0x34c841,_0x248c65)=>{const _0xd6a4bf=_0x479257,_0x33b202=_0x34c841[_0xd6a4bf(0x266)]||'',_0xc1ad42=_0x248c65[_0xd6a4bf(0x266)]||'';return _0xc1ad42['localeCompare'](_0x33b202);});if(_0x49d83e[_0x479257(0x280)]||_0x49d83e[_0x479257(0x242)])return await handleSDKOutput(_0xed2c7a,_0x49d83e),0x0;let _0x4f05ab;if(_0x5f178f){const _0x2fe0b1=_0xed2c7a[0x0];if(!_0x2fe0b1[_0x479257(0x146)]?.['id'])return console['error']('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x4f05ab=_0x2fe0b1[_0x479257(0x146)]['id'],_0x49d83e[_0x479257(0x102)]&&console['error'](_0x479257(0x154)+_0x2fe0b1['sessionTime']);}else{const _0x455d67=_0xed2c7a['map'](_0x25929e=>{const _0x5e382d=_0x479257,_0x5a07c6=getAttemptStatusDisplay(_0x25929e['lastAttempt']);return{'title':_0x25929e[_0x5e382d(0x137)]?.[_0x5e382d(0x20d)]+'.'+_0x25929e[_0x5e382d(0x178)]?.[_0x5e382d(0x20d)]+_0x5e382d(0x158)+_0x25929e[_0x5e382d(0x266)]+'\x20'+_0x5a07c6[_0x5e382d(0x1ce)],'value':_0x25929e[_0x5e382d(0x146)]?.['id']||'','description':_0x5a07c6[_0x5e382d(0x25c)]};}),_0x3d8d2c=await a55_0x3870e8({'type':_0x479257(0x220),'name':_0x479257(0x18c),'message':_0x479257(0x191),'choices':_0x455d67[_0x479257(0x14d)](_0x50a74c=>_0x50a74c[_0x479257(0x1c1)]!=='')});if(!_0x3d8d2c[_0x479257(0x18c)])return 0x0;_0x4f05ab=_0x3d8d2c[_0x479257(0x18c)];}const _0x5b8986=_0x49d83e[_0x479257(0x1e4)];return _0x5b8986?await this[_0x479257(0x1cc)](_0x3e7682,_0x4f05ab):await this[_0x479257(0x285)](_0x3e7682,_0x4f05ab,_0x49d83e),0x0;}async[a55_0x312470(0x285)](_0x244a06,_0x1feac1,_0x259d9d){const _0x34ab5c=a55_0x312470,{tdx:_0x3bf361}=_0x244a06;let _0x56d77a,_0x57e4f8;try{[_0x56d77a,_0x57e4f8]=await Promise[_0x34ab5c(0x235)]([_0x3bf361['workflow'][_0x34ab5c(0x15d)](_0x1feac1),_0x3bf361[_0x34ab5c(0x178)][_0x34ab5c(0x13a)](_0x1feac1,![])]);}catch(_0x64c6d6){console[_0x34ab5c(0x143)](a55_0x3d25b[_0x34ab5c(0x186)](_0x34ab5c(0x18f)));_0x259d9d[_0x34ab5c(0x102)]&&console[_0x34ab5c(0x143)](_0x64c6d6);throw _0x64c6d6;}if(_0x259d9d[_0x34ab5c(0x280)]||_0x259d9d[_0x34ab5c(0x242)]){const _0xdbb5ca=this[_0x34ab5c(0x263)](_0x56d77a,_0x57e4f8);await handleSDKOutput([_0xdbb5ca],_0x259d9d);return;}const _0x15c28c=_0x3bf361[_0x34ab5c(0x1d9)]['site'],_0x44d78a=this[_0x34ab5c(0x1ef)](_0x56d77a,_0x57e4f8,_0x15c28c);console[_0x34ab5c(0x1c6)](_0x44d78a);}async[a55_0x312470(0x1cc)](_0x138549,_0x389634){const _0x32c3a7=a55_0x312470,{tdx:_0x5393b0}=_0x138549,_0x1f4c79=TIMELINE_CONFIG[_0x32c3a7(0x232)],_0x46be58=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x40e060=0x0;while(_0x40e060<_0x46be58){process[_0x32c3a7(0xf2)][_0x32c3a7(0x1d3)]&&process[_0x32c3a7(0xf2)][_0x32c3a7(0x17f)]('\x1bc');let _0x5c2292,_0x26f9d8;try{[_0x5c2292,_0x26f9d8]=await Promise[_0x32c3a7(0x235)]([_0x5393b0[_0x32c3a7(0x178)]['attempt'](_0x389634),_0x5393b0['workflow'][_0x32c3a7(0x13a)](_0x389634,![])]);}catch(_0x24b3e1){console['error'](a55_0x3d25b[_0x32c3a7(0x186)](_0x32c3a7(0x119)));_0x40e060>0x0&&console[_0x32c3a7(0x143)](a55_0x3d25b['dim'](_0x32c3a7(0x1df)+_0x40e060));throw _0x24b3e1;}const _0x5857b7=_0x5393b0['context']['site'],_0x4da208=this['renderTimeline'](_0x5c2292,_0x26f9d8,_0x5857b7);console['log'](_0x4da208);const _0x3a97e2=_0x5c2292[_0x32c3a7(0x156)]&&_0x26f9d8[_0x32c3a7(0x26a)](_0xd5eefb=>_0xd5eefb[_0x32c3a7(0x12c)]!==_0x32c3a7(0x161)&&_0xd5eefb[_0x32c3a7(0x12c)]!=='planned');if(_0x3a97e2){console[_0x32c3a7(0x143)](a55_0x3d25b['green']('\x0a✔\x20Attempt\x20complete'));break;}console[_0x32c3a7(0x143)](a55_0x3d25b['dim'](_0x32c3a7(0x1f4)+_0x40e060*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x5e5aca=>setTimeout(_0x5e5aca,_0x1f4c79)),_0x40e060++;}_0x40e060>=_0x46be58&&console['error'](a55_0x3d25b[_0x32c3a7(0x201)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a55_0x312470(0x1ef)](_0x3d4eee,_0x3b2f12,_0x381f61){const _0x33595f=a55_0x312470,_0xfd13e0=[],_0x2418d0=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x5245ee=0x5,_0x52583d=process['stdout'][_0x33595f(0x147)]||0x78,_0x4d86d2=_0x52583d-_0x2418d0-_0x5245ee,_0xc4f510=Math[_0x33595f(0xfe)](TIMELINE_CONFIG[_0x33595f(0x204)],Math[_0x33595f(0x160)](_0x4d86d2,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x161d29=new Date(_0x3d4eee[_0x33595f(0x1a4)])[_0x33595f(0x180)](),_0xcf374=_0x3d4eee[_0x33595f(0xf1)]?new Date(_0x3d4eee['finishedAt'])[_0x33595f(0x180)]():Date[_0x33595f(0x1e9)](),_0x424b1c={'start':_0x161d29,'end':_0xcf374,'duration':_0xcf374-_0x161d29},_0x34795b=new Map(),_0x23a4d0=[];for(const _0xc5eca2 of _0x3b2f12){if(_0xc5eca2[_0x33595f(0x10a)]){const _0x13dd63=new Date(_0xc5eca2[_0x33595f(0x10a)])[_0x33595f(0x180)](),_0x464b7c=_0xc5eca2['updatedAt']?new Date(_0xc5eca2[_0x33595f(0x13e)])[_0x33595f(0x180)]():Date[_0x33595f(0x1e9)](),_0x427600={'start':_0x13dd63,'end':_0x464b7c,'duration':_0x464b7c-_0x13dd63};_0x34795b[_0x33595f(0x1f8)](_0xc5eca2['id'],_0x427600),_0x23a4d0[_0x33595f(0x124)]({'name':_0xc5eca2[_0x33595f(0x275)],'state':_0xc5eca2[_0x33595f(0x12c)]||_0x33595f(0x183),'window':_0x427600});}else _0x23a4d0[_0x33595f(0x124)]({'name':_0xc5eca2['fullName'],'state':_0xc5eca2['state']||'planned','window':undefined});}_0x23a4d0['sort']((_0x310515,_0x277e6b)=>{const _0x7097dd=_0x33595f;if(!_0x310515[_0x7097dd(0x1ae)])return 0x1;if(!_0x277e6b[_0x7097dd(0x1ae)])return-0x1;return _0x310515[_0x7097dd(0x1ae)]['start']-_0x277e6b[_0x7097dd(0x1ae)]['start'];});const _0x2b5c79=_0x23a4d0[_0x33595f(0x20c)],_0x9296bd=_0x2b5c79>TIMELINE_CONFIG[_0x33595f(0x1f5)];_0x9296bd&&_0x23a4d0[_0x33595f(0x23d)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x20fdb6=calculateTimeScale(_0x424b1c,_0xc4f510),_0x68958c=_0x3d4eee[_0x33595f(0x156)]?_0x3d4eee[_0x33595f(0x219)]?a55_0x3d25b[_0x33595f(0x228)]('success'):a55_0x3d25b[_0x33595f(0x186)](_0x33595f(0x143)):a55_0x3d25b['blue'](_0x33595f(0x161)),_0x4a75a0=_0x3d4eee[_0x33595f(0x137)]?.['id'],_0x3f10e4=_0x3d4eee[_0x33595f(0x233)];let _0x42fbf3;if(_0x4a75a0&&_0x3f10e4){const _0x32b4d3=getWorkflowAttemptUrl(_0x381f61,_0x4a75a0,_0x3f10e4,_0x3d4eee['id']);_0x42fbf3=hyperlink(a55_0x3d25b[_0x33595f(0x115)](_0x3d4eee['id']),_0x32b4d3);}else _0x42fbf3=a55_0x3d25b[_0x33595f(0x115)](_0x3d4eee['id']);_0xfd13e0[_0x33595f(0x124)]('Attempt:\x20'+_0x42fbf3+_0x33595f(0x158)+_0x68958c+_0x33595f(0x158)+formatElapsed(_0x424b1c['duration']));if(_0x23a4d0[_0x33595f(0x20c)]>0x0){const _0x421885=renderTimeAxis(_0x20fdb6,_0xc4f510),_0x1f09c0=new Date(_0x424b1c['start']),_0x5d3e0b=formatDate(_0x1f09c0),_0x298541=TIMELINE_CONFIG[_0x33595f(0x1db)]+TIMELINE_CONFIG[_0x33595f(0x110)]+_0x2418d0,_0xdb6bb7=_0x5d3e0b[_0x33595f(0xe3)](_0x298541),_0x4dc793=a55_0x3d25b[_0x33595f(0x115)](_0xdb6bb7);_0xfd13e0[_0x33595f(0x124)](_0x4dc793+'\x20'+_0x421885);for(const _0x36e0d1 of _0x23a4d0){_0xfd13e0[_0x33595f(0x124)](renderTaskRow(_0x36e0d1,_0x20fdb6,_0xc4f510,_0x2418d0));}const _0x3e8034=calculateStats(_0x23a4d0);_0xfd13e0[_0x33595f(0x124)](formatStats(_0x3e8034)),_0x9296bd&&_0xfd13e0[_0x33595f(0x124)](a55_0x3d25b[_0x33595f(0x201)](_0x33595f(0x1bd)+TIMELINE_CONFIG[_0x33595f(0x1f5)]+'\x20of\x20'+_0x2b5c79+_0x33595f(0x1fa))),_0xfd13e0[_0x33595f(0x124)](''),_0xfd13e0['push'](a55_0x3d25b['dim']('💡\x20Tip:\x20Use\x20')+(_0x33595f(0x151)+_0x3d4eee['id']+_0x33595f(0x1fe))+a55_0x3d25b[_0x33595f(0x115)](_0x33595f(0x1e6)));}else _0xfd13e0[_0x33595f(0x124)](_0x33595f(0x28a));return _0xfd13e0[_0x33595f(0x123)]('\x0a');}['buildTimelineData'](_0x4a6dd1,_0x56e019){const _0x35d85b=a55_0x312470,_0x583eff=new Date(_0x4a6dd1['createdAt'])['getTime'](),_0x1ac51e=_0x4a6dd1[_0x35d85b(0xf1)]?new Date(_0x4a6dd1[_0x35d85b(0xf1)])[_0x35d85b(0x180)]():Date[_0x35d85b(0x1e9)](),_0xe02135=_0x1ac51e-_0x583eff,_0x5a8055=[];for(const _0x5ec88d of _0x56e019){if(_0x5ec88d['startedAt']){const _0x4d95cf=new Date(_0x5ec88d[_0x35d85b(0x10a)])[_0x35d85b(0x180)](),_0x1b0af0=_0x5ec88d[_0x35d85b(0x13e)]?new Date(_0x5ec88d[_0x35d85b(0x13e)])[_0x35d85b(0x180)]():Date[_0x35d85b(0x1e9)]();_0x5a8055[_0x35d85b(0x124)]({'name':_0x5ec88d[_0x35d85b(0x275)],'state':_0x5ec88d[_0x35d85b(0x12c)]||_0x35d85b(0x183),'window':{'start':_0x4d95cf,'end':_0x1b0af0,'duration':_0x1b0af0-_0x4d95cf}});}else _0x5a8055[_0x35d85b(0x124)]({'name':_0x5ec88d['fullName'],'state':_0x5ec88d['state']||_0x35d85b(0x252),'window':undefined});}const _0x177aaf=calculateStats(_0x5a8055);return{'attempt':{'id':_0x4a6dd1['id'],'status':_0x4a6dd1['done']?_0x4a6dd1[_0x35d85b(0x219)]?'success':_0x35d85b(0x143):_0x35d85b(0x161),'createdAt':_0x4a6dd1['createdAt'],'finishedAt':_0x4a6dd1['finishedAt'],'duration_ms':_0xe02135},'tasks':_0x5a8055[_0x35d85b(0x210)](_0xbccf06=>({'name':_0xbccf06[_0x35d85b(0x20d)],'state':_0xbccf06[_0x35d85b(0x12c)],'startedAt':_0xbccf06[_0x35d85b(0x1ae)]?new Date(_0xbccf06[_0x35d85b(0x1ae)][_0x35d85b(0x1b0)])[_0x35d85b(0x1eb)]():null,'updatedAt':_0xbccf06['window']?new Date(_0xbccf06[_0x35d85b(0x1ae)][_0x35d85b(0x1c5)])[_0x35d85b(0x1eb)]():null,'duration_ms':_0xbccf06[_0x35d85b(0x1ae)]?.[_0x35d85b(0x11b)]||null})),'stats':_0x177aaf};}}
|
|
1
|
+
const a55_0x1fefeb=a55_0x1f8b;(function(_0x1ff38e,_0x326ed3){const _0x4a2e10=a55_0x1f8b,_0x458175=_0x1ff38e();while(!![]){try{const _0x20429a=-parseInt(_0x4a2e10(0x1a0))/0x1+-parseInt(_0x4a2e10(0x1ed))/0x2+-parseInt(_0x4a2e10(0x184))/0x3*(-parseInt(_0x4a2e10(0x17f))/0x4)+-parseInt(_0x4a2e10(0x124))/0x5*(parseInt(_0x4a2e10(0x211))/0x6)+parseInt(_0x4a2e10(0x139))/0x7*(parseInt(_0x4a2e10(0x245))/0x8)+parseInt(_0x4a2e10(0x15e))/0x9*(parseInt(_0x4a2e10(0x174))/0xa)+parseInt(_0x4a2e10(0x26f))/0xb;if(_0x20429a===_0x326ed3)break;else _0x458175['push'](_0x458175['shift']());}catch(_0x22da7e){_0x458175['push'](_0x458175['shift']());}}}(a55_0x416b,0xb739c));import a55_0x1e0863 from'chalk';import{existsSync}from'fs';import a55_0xdb9411 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 a55_0x2c95a7 from'prompts';function getAttemptStatusDisplay(_0x412a69){const _0x51a1d8=a55_0x1f8b;if(!_0x412a69)return{'icon':'⏳','text':''};const {done:_0x27f4cc,success:_0x3047f8,cancelRequested:_0x20d949}=_0x412a69;if(!_0x27f4cc)return _0x20d949?{'icon':'🛑','text':a55_0x1e0863['yellow'](_0x51a1d8(0x1b6))}:{'icon':'🔄','text':a55_0x1e0863[_0x51a1d8(0x17c)](_0x51a1d8(0x29c))};if(_0x3047f8)return{'icon':'✅','text':a55_0x1e0863[_0x51a1d8(0x1e9)](_0x51a1d8(0x19e))};return{'icon':'❌','text':a55_0x1e0863[_0x51a1d8(0x12c)](_0x51a1d8(0x23b))};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x1fefeb(0x2b9)](_0x200456,_0x1eff01,_0x489466=0x0){return _0x200456[_0x489466]||_0x1eff01['workflowProject'];}[a55_0x1fefeb(0x24d)](_0x3b491d,_0x5886e1,_0x57aecc=0x0){const _0x108186=a55_0x1fefeb,_0x3df568=this[_0x108186(0x2b9)](_0x3b491d,_0x5886e1,_0x57aecc);if(!_0x3df568)return console[_0x108186(0x23b)](a55_0x1e0863['red']('Error:'),'Project\x20name\x20is\x20required'),console[_0x108186(0x23b)](a55_0x1e0863[_0x108186(0x182)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x3df568;}['parseProjectWorkflowPattern'](_0x23bbce,_0x7d912e){const _0x3cb17f=a55_0x1fefeb;if(_0x23bbce[0x0]){const _0x568aa6=_0x23bbce[0x0][_0x3cb17f(0x177)]('.');if(_0x568aa6[_0x3cb17f(0x1d0)]===0x1)return{'projectName':_0x568aa6[0x0],'workflowName':undefined};else return _0x568aa6['length']===0x2?{'projectName':_0x568aa6[0x0],'workflowName':_0x568aa6[0x1]}:(console[_0x3cb17f(0x23b)](a55_0x1e0863[_0x3cb17f(0x12c)](_0x3cb17f(0x168)),_0x3cb17f(0x1c0)),null);}return{'projectName':_0x7d912e[_0x3cb17f(0x1cb)],'workflowName':undefined};}[a55_0x1fefeb(0x2b2)](_0x317f56,_0x5e758d,_0x55365c=0x0){const _0x4ff36f=a55_0x1fefeb;if(_0x317f56[_0x55365c])return _0x317f56[_0x55365c];if(_0x5e758d[_0x4ff36f(0x1cb)]){const _0x581995=a55_0xdb9411[_0x4ff36f(0x25e)](process[_0x4ff36f(0x11b)](),'workflows',_0x5e758d[_0x4ff36f(0x1cb)]);if(existsSync(a55_0xdb9411[_0x4ff36f(0x25e)](_0x581995,_0x4ff36f(0x1f7))))return _0x581995;}return undefined;}async[a55_0x1fefeb(0x1f1)](_0x14aa26,_0x1e13dc,_0x40ab4e){const _0x120d3c=a55_0x1fefeb;try{const _0x5f9698=await _0x14aa26[_0x120d3c(0x298)][_0x120d3c(0x188)](_0x1e13dc,{'limit':0x1});if(_0x5f9698[_0x120d3c(0x1d0)]>0x0){const _0x4a73b7=_0x5f9698[0x0]['id'],_0xb9f80b=getWorkflowUrl(_0x40ab4e,_0x4a73b7);console[_0x120d3c(0x23b)](_0x120d3c(0x135)+a55_0x1e0863[_0x120d3c(0x14b)](_0xb9f80b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x1fefeb(0x152)]=a55_0x1fefeb(0x27a);[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x1e5);async[a55_0x1fefeb(0x250)](_0x202ae3){const _0x22e0d4=a55_0x1fefeb,{options:_0x2664f3,args:_0x573d62,tdx:_0x3ba7c6}=_0x202ae3,_0x553337=_0x573d62[0x0],_0x2875ce=_0x2664f3[_0x22e0d4(0x275)];if(_0x2875ce)return saveSessionContext({'workflow_project':undefined},_0x2664f3[_0x22e0d4(0x176)]),console[_0x22e0d4(0x1e8)](a55_0x1e0863[_0x22e0d4(0x1e9)](_0x22e0d4(0x19a))),0x0;if(!_0x553337)return console[_0x22e0d4(0x23b)](a55_0x1e0863[_0x22e0d4(0x12c)](_0x22e0d4(0x168)),_0x22e0d4(0x2c1)),console[_0x22e0d4(0x23b)](a55_0x1e0863[_0x22e0d4(0x182)](_0x22e0d4(0x25b))),console[_0x22e0d4(0x23b)](a55_0x1e0863[_0x22e0d4(0x182)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x5366f6=await withSpinner(_0x22e0d4(0x148)+_0x553337+_0x22e0d4(0x22c),()=>_0x3ba7c6[_0x22e0d4(0x298)]['resolveProjectId'](_0x553337),{'verbose':_0x2664f3['verbose']}),{name:_0x10e57c}=_0x5366f6[_0x22e0d4(0x1ac)];return saveSessionContext({'workflow_project':_0x10e57c},_0x2664f3[_0x22e0d4(0x176)]),console['log'](a55_0x1e0863['green'](_0x22e0d4(0x137)+a55_0x1e0863['cyan'](_0x10e57c))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']='workflow:projects';[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x285);async[a55_0x1fefeb(0x250)](_0x37ebb6){const _0x2d52fa=a55_0x1fefeb,{options:_0x127fc2,args:_0x57779a,tdx:_0x39dd57}=_0x37ebb6,_0x153433=_0x57779a[0x0];_0x127fc2[_0x2d52fa(0x230)]&&_0x153433&&console[_0x2d52fa(0x23b)](_0x2d52fa(0x1e2)+_0x153433);const _0x72a604=await withSpinner(_0x2d52fa(0x159),()=>_0x39dd57[_0x2d52fa(0x298)]['projects'](_0x153433,{'limit':_0x127fc2['limit']}),{'verbose':_0x127fc2['verbose']});let _0x3c34d2=_0x72a604[_0x2d52fa(0x1ac)];_0x3c34d2['sort']((_0xf62fe7,_0x6bf153)=>_0xf62fe7[_0x2d52fa(0x152)]['localeCompare'](_0x6bf153[_0x2d52fa(0x152)]));const _0x49f695=_0x127fc2[_0x2d52fa(0x1c3)]||0x64,_0x539eb8=_0x3c34d2[_0x2d52fa(0x1d0)]>=_0x49f695?a55_0x1e0863[_0x2d52fa(0x182)](_0x2d52fa(0x286)):'';console[_0x2d52fa(0x23b)]('✔\x20Found\x20'+_0x3c34d2[_0x2d52fa(0x1d0)]+_0x2d52fa(0x259)+(_0x3c34d2[_0x2d52fa(0x1d0)]!==0x1?'s':'')+_0x539eb8);if(_0x127fc2['format']===_0x2d52fa(0x2c7)||_0x127fc2['format']===_0x2d52fa(0x207)||_0x127fc2[_0x2d52fa(0x126)]===_0x2d52fa(0x12f))await handleSDKOutput(_0x3c34d2,_0x127fc2);else{if(_0x3c34d2[_0x2d52fa(0x1d0)]===0x0)_0x153433?console[_0x2d52fa(0x1e8)](_0x2d52fa(0x2c3)+_0x153433):console[_0x2d52fa(0x1e8)](_0x2d52fa(0x23e));else{const _0x2e72e4=_0x3c34d2[_0x2d52fa(0x197)](_0x458ec7=>{const _0x5f4ed2=_0x2d52fa,_0x46114c=_0x458ec7[_0x5f4ed2(0x1eb)]?.[_0x5f4ed2(0x141)](_0x1b95f3=>_0x1b95f3['key']===_0x5f4ed2(0x13c)),_0x597111=_0x46114c?a55_0x1e0863[_0x5f4ed2(0x182)](_0x5f4ed2(0x173)):'';return'📁\x20'+_0x458ec7['name']+_0x597111;});await writeOutput(_0x2e72e4['join']('\x0a'),_0x127fc2[_0x2d52fa(0x20e)],_0x2d52fa(0x2ca));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x1fefeb(0x152)]=a55_0x1fefeb(0x179);['description']='List\x20workflows';async[a55_0x1fefeb(0x250)](_0x51d192){const _0x1164fc=a55_0x1fefeb,{options:_0x341ba4,args:_0x163139,tdx:_0x123525}=_0x51d192,_0x133e03=this[_0x1164fc(0x2b9)](_0x163139,_0x341ba4);_0x341ba4[_0x1164fc(0x230)]&&_0x133e03&&console[_0x1164fc(0x23b)](_0x1164fc(0x133)+_0x133e03);const _0x20cd7e=await withSpinner(_0x1164fc(0x2c8),()=>_0x123525[_0x1164fc(0x298)][_0x1164fc(0x188)](_0x133e03,{'limit':_0x341ba4['limit']}),{'verbose':_0x341ba4[_0x1164fc(0x230)]});let _0x516d13=_0x20cd7e[_0x1164fc(0x1ac)];_0x516d13['sort']((_0x491d87,_0x5be5e5)=>{const _0x49eaee=_0x1164fc,_0xcffbfb=_0x491d87[_0x49eaee(0x152)][_0x49eaee(0x255)](_0x5be5e5[_0x49eaee(0x152)]);if(_0xcffbfb!==0x0)return _0xcffbfb;return(_0x491d87[_0x49eaee(0x134)]?.['name']||'')[_0x49eaee(0x255)](_0x5be5e5[_0x49eaee(0x134)]?.[_0x49eaee(0x152)]||'');});const _0xcea50d=_0x341ba4[_0x1164fc(0x1c3)]||0x64,_0x191db7=_0x516d13[_0x1164fc(0x1d0)]>=_0xcea50d?a55_0x1e0863[_0x1164fc(0x182)](_0x1164fc(0x286)):'';console[_0x1164fc(0x23b)](_0x1164fc(0x1ee)+_0x516d13[_0x1164fc(0x1d0)]+_0x1164fc(0x178)+(_0x516d13[_0x1164fc(0x1d0)]!==0x1?'s':'')+_0x191db7);if(_0x341ba4[_0x1164fc(0x126)]===_0x1164fc(0x2c7)||_0x341ba4[_0x1164fc(0x126)]===_0x1164fc(0x207)||_0x341ba4[_0x1164fc(0x126)]===_0x1164fc(0x12f))await handleSDKOutput(_0x516d13,_0x341ba4);else{if(_0x516d13['length']===0x0)_0x133e03?console[_0x1164fc(0x1e8)](_0x1164fc(0x282)+_0x133e03):console[_0x1164fc(0x1e8)]('No\x20workflows\x20found');else{const _0x980197=_0x341ba4[_0x1164fc(0x1cc)],_0x4c109c=_0x516d13[_0x1164fc(0x197)](_0x50f392=>{const _0x3c6ff4=_0x1164fc,_0x12de14=a55_0x1e0863[_0x3c6ff4(0x182)]('#'+_0x50f392['id']),_0x1b2fd9=hyperlink(_0x12de14,getWorkflowUrl(_0x980197,_0x50f392['id'])),_0x2a4d0c=_0x50f392['project']?.[_0x3c6ff4(0x152)]?a55_0x1e0863[_0x3c6ff4(0x182)]('\x20('+_0x50f392[_0x3c6ff4(0x134)][_0x3c6ff4(0x152)]+')'):'';return _0x3c6ff4(0x269)+_0x1b2fd9+'\x20'+_0x50f392[_0x3c6ff4(0x152)]+_0x2a4d0c;});await writeOutput(_0x4c109c['join']('\x0a'),_0x341ba4[_0x1164fc(0x20e)],_0x1164fc(0x2ca));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x1fefeb(0x152)]='workflow:sessions';[a55_0x1fefeb(0x2b8)]='List\x20workflow\x20execution\x20sessions';async[a55_0x1fefeb(0x250)](_0xb15b7){const _0x394382=a55_0x1fefeb,{options:_0x37d87a,args:_0x3c5450,tdx:_0xd34bc0}=_0xb15b7,_0x48cb7b=this['parseProjectWorkflowPattern'](_0x3c5450,_0x37d87a);if(!_0x48cb7b)return 0x1;const {projectName:_0x16c97a,workflowName:_0x45e60b}=_0x48cb7b;if(_0x37d87a[_0x394382(0x230)]){if(_0x16c97a&&_0x45e60b)console[_0x394382(0x23b)]('Filter:\x20'+_0x16c97a+'.'+_0x45e60b);else _0x16c97a&&console[_0x394382(0x23b)]('Filter:\x20project='+_0x16c97a);const _0x355f74=_0x37d87a[_0x394382(0x267)];_0x355f74&&console['error']('Status:\x20'+_0x355f74);}let _0x3e6404=0x28;if(process['stdout'][_0x394382(0x12b)]&&!_0x37d87a['output']&&!_0x37d87a[_0x394382(0x126)]){const _0x213dbc=process[_0x394382(0x1a4)]['rows']||0x28;_0x3e6404=Math[_0x394382(0x2ad)](0x14,Math[_0x394382(0x274)](_0x213dbc*0x2/0x3));}const _0x180b46=_0x37d87a[_0x394382(0x1c3)]||_0x3e6404,_0x4fd94c=await withSpinner(_0x394382(0x1d6),()=>_0xd34bc0[_0x394382(0x298)][_0x394382(0x1d2)]({'projectName':_0x16c97a,'workflowName':_0x45e60b,'status':_0x37d87a[_0x394382(0x267)],'fromTime':_0x37d87a[_0x394382(0x18b)],'toTime':_0x37d87a['to'],'limit':_0x180b46}),{'verbose':_0x37d87a['verbose']}),_0x2a8330=_0x4fd94c['data'];_0x2a8330[_0x394382(0x155)]((_0x514b73,_0x2dd899)=>{const _0x1093dd=_0x394382,_0x1d4d5d=_0x514b73['sessionTime']||'',_0x111289=_0x2dd899['sessionTime']||'';return _0x111289[_0x1093dd(0x255)](_0x1d4d5d);});_0x2a8330[_0x394382(0x1d0)]>=_0x180b46?console['error']('✔\x20Showing\x20'+_0x2a8330[_0x394382(0x1d0)]+_0x394382(0x1f8)+a55_0x1e0863[_0x394382(0x182)](_0x394382(0x1e6))):console[_0x394382(0x23b)](_0x394382(0x1ee)+_0x2a8330[_0x394382(0x1d0)]+_0x394382(0x1ea)+(_0x2a8330[_0x394382(0x1d0)]!==0x1?'s':''));if(_0x37d87a[_0x394382(0x126)]===_0x394382(0x2c7)||_0x37d87a[_0x394382(0x126)]===_0x394382(0x207)||_0x37d87a[_0x394382(0x126)]===_0x394382(0x12f))await handleSDKOutput(_0x2a8330,_0x37d87a);else{if(!process['stdout'][_0x394382(0x12b)]||_0x37d87a[_0x394382(0x20e)]){if(_0x2a8330[_0x394382(0x1d0)]===0x0){if(_0x16c97a&&_0x45e60b)console[_0x394382(0x1e8)](_0x394382(0x1f4)+_0x16c97a+'.'+_0x45e60b);else _0x16c97a?console[_0x394382(0x1e8)](_0x394382(0x1de)+_0x16c97a):console[_0x394382(0x1e8)]('No\x20sessions\x20found');}else{const _0x53758c=_0x37d87a[_0x394382(0x1cc)],_0x2e3f5c=this['renderSessionsTimeline'](_0x2a8330,_0x53758c);_0x37d87a[_0x394382(0x20e)]?await writeOutput(_0x2e3f5c,_0x37d87a[_0x394382(0x20e)],_0x394382(0x2ca)):console[_0x394382(0x1e8)](_0x2e3f5c);}!_0x16c97a&&(console[_0x394382(0x23b)](''),console[_0x394382(0x23b)](a55_0x1e0863[_0x394382(0x182)](_0x394382(0x23d))),console['error'](a55_0x1e0863[_0x394382(0x182)](_0x394382(0x292))+'or'+a55_0x1e0863[_0x394382(0x182)](_0x394382(0x20a))));}else{if(_0x2a8330[_0x394382(0x1d0)]===0x0){if(_0x16c97a&&_0x45e60b)console[_0x394382(0x1e8)](_0x394382(0x1f4)+_0x16c97a+'.'+_0x45e60b);else _0x16c97a?console['log'](_0x394382(0x1de)+_0x16c97a):console[_0x394382(0x1e8)](_0x394382(0x2bc));}else await this['navigateSessionsInteractive'](_0x2a8330,_0xb15b7,_0x16c97a);}}return 0x0;}[a55_0x1fefeb(0x24f)](_0xa79384,_0x456835){const _0x4b72ba=a55_0x1fefeb,_0x5cd3da=[],_0x181bcc=new Map();let _0x39cef3=Infinity,_0x40aaee=-Infinity;for(const _0x30f35b of _0xa79384){if(_0x30f35b['lastAttempt']?.[_0x4b72ba(0x1ec)]){const _0x32ce69=new Date(_0x30f35b[_0x4b72ba(0x183)][_0x4b72ba(0x1ec)])[_0x4b72ba(0x247)](),_0x4672c1=_0x30f35b['lastAttempt']['finishedAt']?new Date(_0x30f35b[_0x4b72ba(0x183)][_0x4b72ba(0x225)])[_0x4b72ba(0x247)]():Date[_0x4b72ba(0x1e0)](),_0x152acf=_0x30f35b[_0x4b72ba(0x134)]?.['name']||_0x4b72ba(0x242);!_0x181bcc['has'](_0x152acf)&&_0x181bcc[_0x4b72ba(0x220)](_0x152acf,[]),_0x181bcc[_0x4b72ba(0x146)](_0x152acf)[_0x4b72ba(0x215)]({'session':_0x30f35b,'startTime':_0x32ce69,'endTime':_0x4672c1,'duration':_0x4672c1-_0x32ce69}),_0x39cef3=Math[_0x4b72ba(0x24c)](_0x39cef3,_0x32ce69),_0x40aaee=Math[_0x4b72ba(0x2ad)](_0x40aaee,_0x4672c1);}}if(_0x181bcc[_0x4b72ba(0x2a7)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0xab0829=process['stdout'][_0x4b72ba(0x25c)]||0x78,_0x55c0ed=0x1e,_0x3d9876=0x32,_0x235e28=0x4,_0x3a5ed9=Math[_0x4b72ba(0x24c)](_0x3d9876,Math[_0x4b72ba(0x2ad)](_0x55c0ed,Math[_0x4b72ba(0x274)](_0xab0829*0.3))),_0x3f47fc=_0xab0829-_0x3a5ed9-TIMELINE_CONFIG[_0x4b72ba(0x2b3)]-0x3-_0x235e28,_0x14c415=_0x40aaee-_0x39cef3,_0x3ec66e=_0x14c415/_0x3a5ed9,_0xd9af53=renderTimeAxis({'startTime':_0x39cef3,'endTime':_0x40aaee,'durationMs':_0x14c415,'msPerChar':_0x3ec66e},_0x3a5ed9),_0x66abd6=[];for(const _0x40bc1b of _0x181bcc[_0x4b72ba(0x1b2)]()){_0x66abd6[_0x4b72ba(0x215)](..._0x40bc1b);}_0x66abd6[_0x4b72ba(0x155)]((_0x2510ec,_0x165311)=>_0x165311[_0x4b72ba(0x28e)]-_0x2510ec[_0x4b72ba(0x28e)]);const _0x21cc5b=new Date(_0x39cef3),_0x982e01=formatDate(_0x21cc5b),_0x24054b=_0x235e28+TIMELINE_CONFIG[_0x4b72ba(0x296)]+TIMELINE_CONFIG[_0x4b72ba(0x295)]+_0x3f47fc,_0x29c69b='\x20'[_0x4b72ba(0x1cd)](_0x24054b-_0x982e01['length']),_0xb3efa3=_0x29c69b+a55_0x1e0863[_0x4b72ba(0x182)](_0x982e01)+'\x20'+_0xd9af53;_0x5cd3da[_0x4b72ba(0x215)](_0xb3efa3);const _0x4f0ec3=0x16;let _0x1242a6=0x0;for(const _0x552028 of _0x66abd6){const _0x5f0d18=_0x552028['session'][_0x4b72ba(0x134)]?.[_0x4b72ba(0x152)]||'?',_0x3814f2=Math[_0x4b72ba(0x24c)](stringWidth(_0x5f0d18),_0x4f0ec3);_0x1242a6=Math[_0x4b72ba(0x2ad)](_0x1242a6,_0x3814f2);}for(const _0x11509f of _0x66abd6){const {session:_0x1889c8,startTime:_0x38cef1,endTime:_0x238f88,duration:_0x4244dd}=_0x11509f,_0x154de8=_0x1889c8[_0x4b72ba(0x134)]?.['id'],_0x39e490=_0x1889c8['id'],_0x5b603c=_0x1889c8[_0x4b72ba(0x134)]?.[_0x4b72ba(0x152)]||'?',_0x5a019e=_0x1889c8[_0x4b72ba(0x298)]?.[_0x4b72ba(0x152)]||'?';let _0x50d27e,_0xaf7171;if(_0x1889c8[_0x4b72ba(0x183)]){const _0x136407=_0x1889c8[_0x4b72ba(0x183)];!_0x136407[_0x4b72ba(0x1c1)]?(_0x50d27e=_0x136407[_0x4b72ba(0x28f)]?'🛑':'🔄',_0xaf7171=_0x136407[_0x4b72ba(0x28f)]?a55_0x1e0863[_0x4b72ba(0x1c4)]:a55_0x1e0863[_0x4b72ba(0x17c)]):(_0x50d27e=_0x136407[_0x4b72ba(0x19e)]?'✅':'❌',_0xaf7171=_0x136407[_0x4b72ba(0x19e)]?a55_0x1e0863[_0x4b72ba(0x1e9)]:a55_0x1e0863[_0x4b72ba(0x12c)]);}else _0x50d27e='⏳',_0xaf7171=a55_0x1e0863['dim'];const _0x5044a5='#'+_0x39e490,_0x423b38=_0x154de8?hyperlink(_0x5044a5,getWorkflowSessionUrl(_0x456835,_0x154de8,_0x39e490)):_0x5044a5;let _0x267c64=_0x5b603c;stringWidth(_0x5b603c)>_0x4f0ec3&&(_0x267c64=_0x5b603c['slice'](0x0,_0x4f0ec3-0x1)+'…');const _0x5505c1=a55_0x1e0863[_0x4b72ba(0x182)](_0x267c64),_0x584422=stringWidth(_0x267c64),_0x523436='\x20'[_0x4b72ba(0x1cd)](_0x1242a6-stringWidth(_0x267c64)+0x2),_0x1836fa='('+formatElapsed(_0x4244dd)+')',_0xf6aa73=stringWidth(_0x1836fa),_0x36bd8d=stringWidth(_0x5044a5),_0x2b7a7f=_0x36bd8d+0x1+_0x584422+_0x523436[_0x4b72ba(0x1d0)],_0x497bab=_0x3f47fc-_0x2b7a7f-_0xf6aa73-0x1-0x8;let _0x5838c0=_0x5a019e;stringWidth(_0x5838c0)>_0x497bab&&(_0x5838c0=_0x5838c0[_0x4b72ba(0x244)](0x0,_0x497bab-0x1)+'…');const _0xd9c8b9=_0x423b38+'\x20'+_0x5505c1+_0x523436+_0x5838c0,_0x392af2=stringWidth(_0xd9c8b9),_0x4de37e=_0x3f47fc-_0x392af2-_0xf6aa73,_0x2e56df=_0xd9c8b9+'\x20'[_0x4b72ba(0x1cd)](Math[_0x4b72ba(0x2ad)](0x1,_0x4de37e))+a55_0x1e0863[_0x4b72ba(0x182)](_0x1836fa),_0x39b9ae=Math['floor']((_0x38cef1-_0x39cef3)/_0x3ec66e),_0x179d5d=Math[_0x4b72ba(0x274)]((_0x238f88-_0x39cef3)/_0x3ec66e),_0x7afefe=Math[_0x4b72ba(0x2ad)](_0x39b9ae+0x1,_0x179d5d),_0xe4aef1=new Array(_0x3a5ed9)[_0x4b72ba(0x266)]('\x20');for(let _0x38e639=_0x39b9ae;_0x38e639<Math['min'](_0x7afefe,_0x3a5ed9);_0x38e639++){_0xe4aef1[_0x38e639]='─';}const _0x2878c1=_0xe4aef1[_0x4b72ba(0x197)](_0x221477=>_0x221477==='\x20'?'\x20':_0xaf7171(_0x221477))[_0x4b72ba(0x25e)]('');_0x5cd3da[_0x4b72ba(0x215)](_0x50d27e+'\x20'+_0x2e56df+'│'+_0x2878c1+'│');}return _0x5cd3da['join']('\x0a');}async[a55_0x1fefeb(0x143)](_0x12c658,_0x38c129,_0x45750e){const _0x39c2a1=a55_0x1fefeb,{options:_0x35fb3e,tdx:_0x3f7fb9}=_0x38c129,_0x2272ea=_0x35fb3e['site'],{timelineRows:_0x3fa9b3,timeAxisHeader:_0x232ebc}=this[_0x39c2a1(0x17b)](_0x12c658,_0x2272ea),_0x465964=_0x3fa9b3[_0x39c2a1(0x13b)](_0x4c5482=>_0x4c5482['attemptId']);if(_0x465964[_0x39c2a1(0x1d0)]===0x0){const _0x3652b5=this['renderSessionsTimeline'](_0x12c658,_0x2272ea);console['log'](_0x3652b5);!_0x45750e&&(console[_0x39c2a1(0x23b)](''),console[_0x39c2a1(0x23b)](a55_0x1e0863['dim'](_0x39c2a1(0x23d))),console['error'](a55_0x1e0863[_0x39c2a1(0x182)](_0x39c2a1(0x292))+'or'+a55_0x1e0863[_0x39c2a1(0x182)](_0x39c2a1(0x20a))));return;}_0x232ebc&&console[_0x39c2a1(0x1e8)](_0x232ebc);const _0x312271=_0x3fa9b3[_0x39c2a1(0x13b)](_0x17e73b=>_0x17e73b[_0x39c2a1(0x1e3)])[_0x39c2a1(0x197)](_0x3d52b0=>({'title':_0x3d52b0[_0x39c2a1(0x229)],'value':_0x3d52b0[_0x39c2a1(0x1e3)]})),_0x457abc=process[_0x39c2a1(0x1a4)]['rows']||0x3c,_0x29ec27=Math[_0x39c2a1(0x2ad)](0x28,Math[_0x39c2a1(0x274)](_0x457abc*0x2/0x3)),_0x3106a8=await a55_0x2c95a7({'type':'autocomplete','name':_0x39c2a1(0x1e3),'message':_0x39c2a1(0x20c),'choices':_0x312271,'initial':-0x1,'limit':_0x29ec27,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x3a261a,_0x5d7a63)=>{const _0x5e2eba=_0x39c2a1;if(!_0x3a261a)return Promise['resolve'](_0x5d7a63);const _0x574fcd=_0x5d7a63[_0x5e2eba(0x13b)](_0x2e0a76=>{const _0x46d9e3=_0x5e2eba,_0xb708f9=_0x2e0a76;return _0xb708f9[_0x46d9e3(0x205)]['toLowerCase']()[_0x46d9e3(0x20f)](_0x3a261a[_0x46d9e3(0x2ac)]());});return Promise[_0x5e2eba(0x29d)](_0x574fcd);}}),_0x344c27=()=>{const _0x1bb8d2=_0x39c2a1;process[_0x1bb8d2(0x1a4)]['write'](_0x1bb8d2(0x277)),process['stdout'][_0x1bb8d2(0x1ab)](_0x1bb8d2(0x277)),process[_0x1bb8d2(0x1a4)][_0x1bb8d2(0x1ab)](_0x1bb8d2(0x277));},_0x3764df=_0x3106a8&&_0x3106a8['attemptId']&&_0x3106a8[_0x39c2a1(0x1e3)]!==null&&_0x3106a8[_0x39c2a1(0x1e3)][_0x39c2a1(0x175)]()!=='';if(!_0x3764df){_0x344c27(),console[_0x39c2a1(0x1e8)](a55_0x1e0863[_0x39c2a1(0x182)]('Cancelled'));return;}_0x344c27();const _0x2322b8=_0x12c658[_0x39c2a1(0x16e)](_0x35a6aa=>_0x35a6aa[_0x39c2a1(0x183)]?.['id']===_0x3106a8[_0x39c2a1(0x1e3)]);if(_0x2322b8){const _0x1ec287=_0x2322b8[_0x39c2a1(0x134)]?.[_0x39c2a1(0x152)]||'?',_0x473c3d=_0x2322b8[_0x39c2a1(0x298)]?.[_0x39c2a1(0x152)]||'?';console['log']('Project:\x20'+a55_0x1e0863[_0x39c2a1(0x182)](_0x1ec287)+_0x39c2a1(0x14d)+a55_0x1e0863['dim'](_0x473c3d));}const _0x2cfe9e=new WorkflowTimelineCommand();await _0x2cfe9e[_0x39c2a1(0x250)]({'args':[],'options':{..._0x35fb3e,'attemptId':_0x3106a8[_0x39c2a1(0x1e3)]},'tdx':_0x3f7fb9});}['generateSessionTimelineRows'](_0x537333,_0x1dcf31){const _0x7a0bf2=a55_0x1fefeb,_0x43505a=new Map();for(const _0x526095 of _0x537333){_0x526095['id']&&_0x526095[_0x7a0bf2(0x183)]?.['id']&&_0x43505a[_0x7a0bf2(0x220)](_0x526095['id'],_0x526095[_0x7a0bf2(0x183)]['id']);}const _0x37f010=[];let _0xb033a9='';const _0x550348=this[_0x7a0bf2(0x24f)](_0x537333,_0x1dcf31),_0x2d19f2=_0x550348[_0x7a0bf2(0x177)]('\x0a');for(const _0x3696e2 of _0x2d19f2){if(_0x3696e2[_0x7a0bf2(0x29b)](_0x7a0bf2(0x223))||_0x3696e2[_0x7a0bf2(0x19b)](/^\s+\d{4}-\d{2}-\d{2}/))_0xb033a9=_0x3696e2;else{if(_0x3696e2[_0x7a0bf2(0x19b)](/^[✅❌🔄🛑⏳]/)){const _0x85b831=_0x3696e2[_0x7a0bf2(0x19b)](/#(\d+)/),_0x2470ac=_0x85b831?_0x85b831[0x1]:null,_0x2f06af=_0x2470ac?_0x43505a[_0x7a0bf2(0x146)](_0x2470ac)||null:null,_0xd376d4=_0x537333['find'](_0x21fb14=>_0x21fb14['id']===_0x2470ac),_0x22e120=_0xd376d4?.[_0x7a0bf2(0x134)]?.[_0x7a0bf2(0x152)]||'';_0x37f010[_0x7a0bf2(0x215)]({'displayLine':_0x3696e2,'attemptId':_0x2f06af,'projectName':_0x22e120});}}}return{'timelineRows':_0x37f010,'timeAxisHeader':_0xb033a9};}}function a55_0x1f8b(_0x348212,_0x1f9d33){_0x348212=_0x348212-0x119;const _0x416ba7=a55_0x416b();let _0x1f8b65=_0x416ba7[_0x348212];return _0x1f8b65;}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x1fefeb(0x152)]='workflow:attempts';[a55_0x1fefeb(0x2b8)]='List\x20workflow\x20attempts';async[a55_0x1fefeb(0x250)](_0xb96bd6){const _0x2bb559=a55_0x1fefeb,{options:_0x3ab801,args:_0xd7d6ff,tdx:_0x3f018d}=_0xb96bd6,_0x34c662=this[_0x2bb559(0x2a3)](_0xd7d6ff,_0x3ab801);if(!_0x34c662)return 0x1;const {projectName:_0x3eda4c,workflowName:_0x2f5a5b}=_0x34c662,_0x4407a2=_0x3ab801[_0x2bb559(0x1ae)];if(_0x3ab801[_0x2bb559(0x230)]){if(_0x3eda4c&&_0x2f5a5b)console['error'](_0x2bb559(0x233)+_0x3eda4c+'.'+_0x2f5a5b);else _0x3eda4c&&console[_0x2bb559(0x23b)](_0x2bb559(0x2bd)+_0x3eda4c);_0x4407a2&&console[_0x2bb559(0x23b)]('Include\x20retried:\x20yes');}const _0x5986e0=await withSpinner(_0x2bb559(0x1dc),()=>_0x3f018d['workflow'][_0x2bb559(0x1ba)]({'projectName':_0x3eda4c,'workflowName':_0x2f5a5b,'includeRetried':_0x4407a2,'limit':_0x3ab801['limit']}),{'verbose':_0x3ab801[_0x2bb559(0x230)]}),_0x4ed9f1=_0x5986e0['data'],_0x44c254=_0x3ab801[_0x2bb559(0x1c3)]||0x64,_0x58b5ef=_0x4ed9f1[_0x2bb559(0x1d0)]>=_0x44c254?a55_0x1e0863[_0x2bb559(0x182)](_0x2bb559(0x286)):'';console[_0x2bb559(0x23b)](_0x2bb559(0x1ee)+_0x4ed9f1[_0x2bb559(0x1d0)]+_0x2bb559(0x2b4)+(_0x4ed9f1[_0x2bb559(0x1d0)]!==0x1?'s':'')+_0x58b5ef);if(_0x3ab801[_0x2bb559(0x126)]===_0x2bb559(0x2c7)||_0x3ab801[_0x2bb559(0x126)]===_0x2bb559(0x207)||_0x3ab801[_0x2bb559(0x126)]===_0x2bb559(0x12f))await handleSDKOutput(_0x4ed9f1,_0x3ab801);else{if(_0x4ed9f1['length']===0x0){if(_0x3eda4c&&_0x2f5a5b)console[_0x2bb559(0x1e8)]('No\x20attempts\x20found\x20for:\x20'+_0x3eda4c+'.'+_0x2f5a5b);else _0x3eda4c?console[_0x2bb559(0x1e8)](_0x2bb559(0x243)+_0x3eda4c):console[_0x2bb559(0x1e8)](_0x2bb559(0x18f));}else{const _0x526cb8=_0x3ab801['site'],_0x205844=_0x4ed9f1['map'](_0x23d8de=>{const _0x1ff82c=_0x2bb559,_0x50e670=a55_0x1e0863['dim']('#'+_0x23d8de['id']),_0x41f042=_0x23d8de['project']?.['id'],_0x7a541b=_0x23d8de[_0x1ff82c(0x13e)]||_0x23d8de[_0x1ff82c(0x1c7)],_0x2ba54b=_0x41f042&&_0x7a541b?hyperlink(_0x50e670,getWorkflowAttemptUrl(_0x526cb8,_0x41f042,_0x7a541b,_0x23d8de['id'])):_0x50e670,{icon:_0x34ba78,text:_0x417cf9}=getAttemptStatusDisplay(_0x23d8de),_0x54dcbc=(_0x23d8de[_0x1ff82c(0x134)]?.[_0x1ff82c(0x152)]||'?')+'.'+(_0x23d8de[_0x1ff82c(0x298)]?.['name']||'?'),_0x17159b=_0x23d8de[_0x1ff82c(0x219)]?a55_0x1e0863[_0x1ff82c(0x182)](_0x23d8de[_0x1ff82c(0x219)]):'';return(_0x2ba54b+'\x20'+_0x34ba78+(_0x417cf9?'\x20'+_0x417cf9:'')+'\x20'+_0x54dcbc+'\x20'+_0x17159b)['trimEnd']();});await writeOutput(_0x205844[_0x2bb559(0x25e)]('\x0a'),_0x3ab801[_0x2bb559(0x20e)],_0x2bb559(0x2ca));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a55_0x1fefeb(0x152)]=a55_0x1fefeb(0x12a);['description']=a55_0x1fefeb(0x150);async[a55_0x1fefeb(0x250)](_0x505c80){const _0x4b60eb=a55_0x1fefeb,{options:_0x2fbecb,args:_0x3caf27,tdx:_0x4ae1b1}=_0x505c80,_0x1117e0=_0x3caf27[0x0];if(!_0x1117e0)return console[_0x4b60eb(0x23b)](_0x4b60eb(0x192)),0x1;_0x2fbecb[_0x4b60eb(0x230)]&&console[_0x4b60eb(0x23b)](_0x4b60eb(0x289)+_0x1117e0);const _0x2ca7a3=await withSpinner('Getting\x20attempt\x20details...',()=>_0x4ae1b1[_0x4b60eb(0x298)][_0x4b60eb(0x27b)](_0x1117e0),{'verbose':_0x2fbecb[_0x4b60eb(0x230)]}),_0x449431=_0x2ca7a3[_0x4b60eb(0x1ac)];let _0x4acdd8;!_0x449431['done']?_0x4acdd8=_0x449431[_0x4b60eb(0x28f)]?'canceling':_0x4b60eb(0x29c):_0x4acdd8=_0x449431[_0x4b60eb(0x19e)]?_0x4b60eb(0x19e):_0x4b60eb(0x23b);let _0x342ec2;if(_0x449431[_0x4b60eb(0x1ec)]&&_0x449431[_0x4b60eb(0x225)]){const _0x538a42=new Date(_0x449431[_0x4b60eb(0x1ec)])[_0x4b60eb(0x247)](),_0x47cccb=new Date(_0x449431[_0x4b60eb(0x225)])[_0x4b60eb(0x247)]();_0x342ec2=Math['round']((_0x47cccb-_0x538a42)/0x3e8);}const _0x12a6b1={'attempt_id':_0x449431['id'],'status':_0x4acdd8,..._0x449431[_0x4b60eb(0x15a)]!==undefined&&{'index':_0x449431[_0x4b60eb(0x15a)]},..._0x449431['project']&&{'project':_0x449431[_0x4b60eb(0x134)]['name']},..._0x449431[_0x4b60eb(0x298)]&&{'workflow':_0x449431[_0x4b60eb(0x298)][_0x4b60eb(0x152)]},..._0x449431['sessionId']&&{'session_id':_0x449431[_0x4b60eb(0x1c7)]},..._0x449431['sessionTime']&&{'session_time':_0x449431[_0x4b60eb(0x219)]},..._0x449431[_0x4b60eb(0x130)]&&{'retry_attempt':_0x449431[_0x4b60eb(0x130)]},..._0x342ec2!==undefined&&{'duration_sec':_0x342ec2},..._0x449431[_0x4b60eb(0x1ec)]&&{'created_at':_0x449431[_0x4b60eb(0x1ec)]},..._0x449431[_0x4b60eb(0x225)]&&{'finished_at':_0x449431[_0x4b60eb(0x225)]},...Object[_0x4b60eb(0x251)](_0x449431[_0x4b60eb(0x28a)])[_0x4b60eb(0x1d0)]>0x0&&{'params':_0x449431[_0x4b60eb(0x28a)]}};return await handleSingleObjectOutput(_0x12a6b1,_0x2fbecb),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x1fefeb(0x152)]='workflow:tasks';[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x1e1);async[a55_0x1fefeb(0x250)](_0x37e9d0){const _0xb65693=a55_0x1fefeb,{options:_0x4658f6,args:_0x1f2845,tdx:_0x3b6e63}=_0x37e9d0,_0x4dcd4f=_0x1f2845[0x0];if(!_0x4dcd4f)return console[_0xb65693(0x23b)](_0xb65693(0x192)),0x1;const _0x2c0f73=_0x4658f6[_0xb65693(0x145)];_0x4658f6[_0xb65693(0x230)]&&(console['error']('Attempt\x20ID:\x20'+_0x4dcd4f),_0x2c0f73&&console[_0xb65693(0x23b)]('Including\x20subtasks:\x20yes'));const _0x2f12f1=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x3b6e63[_0xb65693(0x298)][_0xb65693(0x26e)](_0x4dcd4f,_0x2c0f73||![]),{'verbose':_0x4658f6[_0xb65693(0x230)]}),_0x1c5c92=_0x2f12f1[_0xb65693(0x1ac)];return console[_0xb65693(0x23b)]('✔\x20Found\x20'+_0x1c5c92[_0xb65693(0x1d0)]+'\x20task'+(_0x1c5c92['length']!==0x1?'s':'')),await handleSDKOutput(_0x1c5c92,_0x4658f6),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x1fefeb(0x152)]=a55_0x1fefeb(0x172);[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x28b);async['execute'](_0x56d2f7){const _0x2948aa=a55_0x1fefeb,{options:_0x5a01bd,args:_0x3d493f,tdx:_0x4980b7}=_0x56d2f7,_0x48e629=_0x3d493f[0x0];let _0x1d6a54=_0x3d493f[0x1];if(!_0x48e629)return console[_0x2948aa(0x23b)](_0x2948aa(0x192)),0x1;_0x5a01bd[_0x2948aa(0x230)]&&(console[_0x2948aa(0x23b)]('Attempt\x20ID:\x20'+_0x48e629),_0x1d6a54&&console['error']('Task\x20name:\x20'+_0x1d6a54));const _0x19554b=await withSpinner(_0x2948aa(0x29f),()=>_0x4980b7[_0x2948aa(0x298)][_0x2948aa(0x1bf)](_0x48e629,_0x1d6a54),{'verbose':_0x5a01bd[_0x2948aa(0x230)]}),_0x21f351=_0x19554b[_0x2948aa(0x1ac)];if(_0x21f351[_0x2948aa(0x1d0)]===0x0)return console[_0x2948aa(0x23b)](_0x2948aa(0x157)),0x0;if(!_0x1d6a54&&(_0x5a01bd['json']||_0x5a01bd[_0x2948aa(0x126)]))return await handleSDKOutput(_0x21f351,_0x5a01bd),0x0;if(!_0x1d6a54){const _0x1affbc=_0x21f351[_0x2948aa(0x197)](_0x1b7fa6=>({'title':_0x1b7fa6['taskName']+'\x20('+formatBytes(_0x1b7fa6[_0x2948aa(0x125)])+')','value':_0x1b7fa6[_0x2948aa(0x17d)]})),_0x5e8070=await a55_0x2c95a7({'type':_0x2948aa(0x147),'name':'task','message':_0x2948aa(0x1d7),'choices':_0x1affbc});if(!_0x5e8070[_0x2948aa(0x272)])return console[_0x2948aa(0x23b)](_0x2948aa(0x17e)),0x0;_0x1d6a54=_0x5e8070[_0x2948aa(0x272)];}const _0x35101d=await withSpinner(_0x2948aa(0x1b0),()=>_0x4980b7['workflow'][_0x2948aa(0x11a)](_0x48e629,_0x1d6a54),{'verbose':_0x5a01bd[_0x2948aa(0x230)]}),_0x4e1ca5=_0x35101d[_0x2948aa(0x1ac)];return _0x4e1ca5?console[_0x2948aa(0x1e8)](_0x4e1ca5):console[_0x2948aa(0x23b)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x1fefeb(0x152)]=a55_0x1fefeb(0x161);[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x121);async[a55_0x1fefeb(0x250)](_0x4678af){const _0x371c1d=a55_0x1fefeb,{options:_0x1f0753,args:_0x291896,tdx:_0x1cc3cc}=_0x4678af,_0x39c8a1=_0x291896[0x0];if(!_0x39c8a1)return console[_0x371c1d(0x23b)](_0x371c1d(0x192)),0x1;const _0x32cb92=_0x1f0753[_0x371c1d(0x1b5)];_0x1f0753[_0x371c1d(0x230)]&&(console[_0x371c1d(0x23b)](_0x371c1d(0x289)+_0x39c8a1),_0x32cb92&&console[_0x371c1d(0x23b)](_0x371c1d(0x1a3)+_0x32cb92));if(!_0x1f0753[_0x371c1d(0x256)]){if(!isInteractive())return console[_0x371c1d(0x23b)](a55_0x1e0863['red']('\x0aError:'),_0x371c1d(0x21f)),console[_0x371c1d(0x23b)](a55_0x1e0863[_0x371c1d(0x182)](_0x371c1d(0x268))),0x1;const _0x4305df=await confirmKey(_0x371c1d(0x1b7)+_0x39c8a1+'?');if(!_0x4305df)return console[_0x371c1d(0x23b)](a55_0x1e0863[_0x371c1d(0x1c4)](_0x371c1d(0x17e))),0x1;}const _0x4c84ef=await withSpinner(_0x371c1d(0x2bb),()=>_0x1cc3cc[_0x371c1d(0x298)][_0x371c1d(0x271)](_0x39c8a1,_0x32cb92),{'verbose':_0x1f0753[_0x371c1d(0x230)]}),_0x59abd0=_0x4c84ef[_0x371c1d(0x1ac)];return console[_0x371c1d(0x23b)]('✔\x20'+_0x59abd0),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x1fefeb(0x152)]=a55_0x1fefeb(0x13a);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a55_0x1fefeb(0x250)](_0x4a786b){const _0x54b028=a55_0x1fefeb,{options:_0x36e535,args:_0x119310,tdx:_0x34531c}=_0x4a786b,_0x490261=_0x119310[0x0];if(!_0x490261)return console['error'](_0x54b028(0x2ba)),console[_0x54b028(0x23b)](_0x54b028(0x194)),0x1;let _0x4280df=![],_0x5f396b=_0x490261;if(_0x490261[_0x54b028(0x29b)](_0x54b028(0x1af)))_0x4280df=!![],_0x5f396b=_0x490261[_0x54b028(0x1d9)](0x8);else{if(_0x490261[_0x54b028(0x29b)](_0x54b028(0x21b)))_0x4280df=![],_0x5f396b=_0x490261[_0x54b028(0x1d9)](0x8);else return console[_0x54b028(0x23b)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x54b028(0x23b)](_0x54b028(0x194)),0x1;}const _0x5583bb=_0x36e535[_0x54b028(0x16d)],_0x1360d0=_0x36e535['resumeFrom'],_0x4c9323=_0x36e535[_0x54b028(0x28a)],_0x2baea7=_0x36e535[_0x54b028(0x191)];_0x36e535[_0x54b028(0x230)]&&(console[_0x54b028(0x23b)](_0x54b028(0x210)+(_0x4280df?_0x54b028(0x176):'attempt')+'\x20'+_0x5f396b),_0x5583bb&&console['error'](_0x54b028(0x120)+_0x5583bb),_0x1360d0&&console[_0x54b028(0x23b)](_0x54b028(0x2c9)+_0x1360d0),_0x4c9323&&console[_0x54b028(0x23b)](_0x54b028(0x262)+_0x4c9323),_0x2baea7&&console[_0x54b028(0x23b)](_0x54b028(0x2b7)));let _0x52c251;if(_0x4c9323)try{if(_0x4c9323[_0x54b028(0x29b)]('@')){const _0x144199=await import(_0x54b028(0x276)),_0xde384d=_0x4c9323['substring'](0x1),_0x105a17=await _0x144199[_0x54b028(0x19f)](_0xde384d,_0x54b028(0x163));_0x52c251=JSON['parse'](_0x105a17);}else _0x52c251=JSON[_0x54b028(0x26a)](_0x4c9323);}catch{return console[_0x54b028(0x23b)](_0x54b028(0x21d)),0x1;}if(!_0x36e535[_0x54b028(0x256)]){if(!isInteractive())return console['error'](a55_0x1e0863[_0x54b028(0x12c)](_0x54b028(0x209)),_0x54b028(0x21f)),console[_0x54b028(0x23b)](a55_0x1e0863['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x178b48=await confirmKey(_0x54b028(0x18d)+(_0x4280df?_0x54b028(0x176):_0x54b028(0x27b))+'\x20'+_0x5f396b+'?');if(!_0x178b48)return console[_0x54b028(0x23b)](a55_0x1e0863[_0x54b028(0x1c4)](_0x54b028(0x17e))),0x1;}let _0x4bf8f8;_0x4280df?_0x4bf8f8=await withSpinner(_0x54b028(0x208),()=>_0x34531c['workflow']['retrySession'](_0x5f396b,{'fromTask':_0x5583bb,'retryParams':_0x52c251}),{'verbose':_0x36e535[_0x54b028(0x230)]}):_0x4bf8f8=await withSpinner('Retrying\x20attempt...',()=>_0x34531c[_0x54b028(0x298)][_0x54b028(0x14c)](_0x5f396b,{'resumeFrom':_0x1360d0,'retryParams':_0x52c251,'force':_0x2baea7}),{'verbose':_0x36e535[_0x54b028(0x230)]});const _0x4d04f6=_0x4bf8f8[_0x54b028(0x1ac)];return console[_0x54b028(0x23b)](_0x54b028(0x1ef)),console[_0x54b028(0x23b)](_0x54b028(0x1da)+_0x4d04f6[_0x54b028(0x1e3)]),console[_0x54b028(0x23b)]('\x20\x20Session\x20ID:\x20'+_0x4d04f6[_0x54b028(0x1c7)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x1fefeb(0x152)]='workflow:run';[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x22d);async[a55_0x1fefeb(0x250)](_0x330df0){const _0x19977f=a55_0x1fefeb,{options:_0x3d1e46,args:_0x3d70b2,tdx:_0x3083c2}=_0x330df0;let _0x160911=_0x3d70b2[0x0];if(!_0x160911){const _0x554fe3=this[_0x19977f(0x2b9)]([],_0x3d1e46),_0x1bb6fb=await withSpinner(_0x19977f(0x27c),()=>_0x3083c2[_0x19977f(0x298)][_0x19977f(0x188)](_0x554fe3,{'limit':_0x3d1e46[_0x19977f(0x1c3)]}),{'verbose':_0x3d1e46[_0x19977f(0x230)]}),_0x5a0e70=_0x1bb6fb['data'];if(_0x5a0e70[_0x19977f(0x1d0)]===0x0)return console['error'](_0x19977f(0x1a5)),!_0x554fe3&&console[_0x19977f(0x23b)](a55_0x1e0863['dim'](_0x19977f(0x23a))),0x1;const _0x484e15=_0x5a0e70['map'](_0x382dcf=>({'title':_0x382dcf[_0x19977f(0x134)]?.['name']+'.'+_0x382dcf[_0x19977f(0x152)],'value':_0x382dcf[_0x19977f(0x134)]?.[_0x19977f(0x152)]+'.'+_0x382dcf[_0x19977f(0x152)],'description':_0x382dcf[_0x19977f(0x1d1)]?_0x19977f(0x227)+_0x382dcf[_0x19977f(0x1d1)]:undefined})),_0x174f1c=await a55_0x2c95a7({'type':_0x19977f(0x147),'name':'workflow','message':_0x19977f(0x258),'choices':_0x484e15});if(!_0x174f1c[_0x19977f(0x298)])return 0x1;_0x160911=_0x174f1c[_0x19977f(0x298)];}if(!_0x160911[_0x19977f(0x20f)]('.')){const _0x3f8756=this[_0x19977f(0x2b9)]([],_0x3d1e46);if(_0x3f8756)_0x160911=_0x3f8756+'.'+_0x160911;else return console['error'](a55_0x1e0863[_0x19977f(0x12c)](_0x19977f(0x168)),_0x19977f(0x235)),console[_0x19977f(0x23b)](a55_0x1e0863[_0x19977f(0x182)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x1e2406=_0x3d1e46[_0x19977f(0x1f2)],_0x1a04ef=_0x3d1e46[_0x19977f(0x219)],_0x77bd2c={};if(_0x1e2406&&Array[_0x19977f(0x281)](_0x1e2406))for(const _0x34ac59 of _0x1e2406){const _0x1883be=_0x34ac59[_0x19977f(0x15f)]('=');if(_0x1883be===-0x1)return console['error'](_0x19977f(0x21a)+_0x34ac59),console[_0x19977f(0x23b)](_0x19977f(0x29e)),0x1;const _0x5e3c04=_0x34ac59[_0x19977f(0x1d9)](0x0,_0x1883be),_0x2a1f8e=_0x34ac59['substring'](_0x1883be+0x1);try{_0x77bd2c[_0x5e3c04]=JSON['parse'](_0x2a1f8e);}catch{_0x77bd2c[_0x5e3c04]=_0x2a1f8e;}}_0x3d1e46[_0x19977f(0x230)]&&(console[_0x19977f(0x23b)](_0x19977f(0x1a7)+_0x160911),Object[_0x19977f(0x251)](_0x77bd2c)[_0x19977f(0x1d0)]>0x0&&console[_0x19977f(0x23b)](_0x19977f(0x18a)+JSON[_0x19977f(0x1b8)](_0x77bd2c)),_0x1a04ef&&console[_0x19977f(0x23b)](_0x19977f(0x26c)+_0x1a04ef));const _0x187f7e=await withSpinner(_0x19977f(0x2a9),()=>_0x3083c2[_0x19977f(0x298)]['run'](_0x160911,_0x77bd2c,{'sessionTime':_0x1a04ef}),{'verbose':_0x3d1e46[_0x19977f(0x230)]}),_0x7d05a1=_0x187f7e['data'];console[_0x19977f(0x23b)](_0x19977f(0x23c)),console[_0x19977f(0x23b)](_0x19977f(0x11d)+_0x7d05a1['id']),console[_0x19977f(0x23b)]('\x20\x20Session\x20ID:\x20'+_0x7d05a1[_0x19977f(0x1c7)]),console[_0x19977f(0x23b)](_0x19977f(0x24a)+_0x7d05a1[_0x19977f(0x134)]?.[_0x19977f(0x152)]),console['error'](_0x19977f(0x290)+_0x7d05a1[_0x19977f(0x298)]?.[_0x19977f(0x152)]);if(_0x7d05a1[_0x19977f(0x134)]?.['id']&&_0x7d05a1['sessionId']&&_0x7d05a1['id']){const _0x3e53e7=_0x3d1e46[_0x19977f(0x1cc)],_0x164831=getConsoleUrl(_0x3e53e7,_0x19977f(0x246)+_0x7d05a1['project']['id']+_0x19977f(0x196)+_0x7d05a1[_0x19977f(0x1c7)]+_0x19977f(0x16a)+_0x7d05a1['id']);console['error'](_0x19977f(0x135)+a55_0x1e0863['cyan'](_0x164831));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']='workflow:download';['description']=a55_0x1fefeb(0x26d);async[a55_0x1fefeb(0x250)](_0x458b3a){const _0xee0e89=a55_0x1fefeb,{options:_0x3c31ab,args:_0x417941,tdx:_0x292515}=_0x458b3a,_0x252846=_0x417941[0x0],_0x16c7ed=_0x417941[0x1]||'.';if(!_0x252846)return console[_0xee0e89(0x23b)](_0xee0e89(0x221)),console['error'](_0xee0e89(0x2b1)),0x1;const _0x261a88=_0x3c31ab['revision'];_0x3c31ab['verbose']&&(console[_0xee0e89(0x23b)]('Project:\x20'+_0x252846),console['error'](_0xee0e89(0x1e4)+_0x16c7ed),_0x261a88&&console[_0xee0e89(0x23b)](_0xee0e89(0x122)+_0x261a88));const _0x420c2f=await withSpinner('Downloading\x20project\x20'+_0x252846+'...',()=>_0x292515['workflow']['download'](_0x252846,_0x16c7ed,{'revision':_0x261a88}),{'verbose':_0x3c31ab[_0xee0e89(0x230)]}),_0x53207d=_0x420c2f['data'];return console['error'](_0xee0e89(0x186)+_0x53207d[_0xee0e89(0x249)]),console[_0xee0e89(0x23b)](_0xee0e89(0x129)+_0x53207d['revision']),console[_0xee0e89(0x23b)](_0xee0e89(0x253)+_0x53207d['filesExtracted']),console[_0xee0e89(0x23b)]('\x20\x20Location:\x20'+_0x16c7ed+'/'+_0x53207d['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a55_0x1fefeb(0x28d);[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x22b);async['execute'](_0x5d1550){const _0x265ab0=a55_0x1fefeb,{options:_0x5e30e6,args:_0x456ea8,tdx:_0x2f1ea0}=_0x5d1550;let _0x29862b='.',_0xcddbb5=_0x5e30e6[_0x265ab0(0x152)];if(_0x456ea8[0x0]){const {promises:_0x31629e}=await import('fs');try{const _0x4182dd=await _0x31629e[_0x265ab0(0x1c8)](_0x456ea8[0x0]);if(_0x4182dd[_0x265ab0(0x2ab)]())_0x29862b=_0x456ea8[0x0];else return console[_0x265ab0(0x23b)](_0x265ab0(0x13d)+_0x456ea8[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0xcddbb5=_0x456ea8[0x0],_0x29862b='.';}}const _0x2d8666=_0x5e30e6['revision'],_0x3d71df=_0x5e30e6[_0x265ab0(0x138)];_0x5e30e6['verbose']&&(console['error'](_0x265ab0(0x2a4)+_0x29862b),_0xcddbb5&&console[_0x265ab0(0x23b)](_0x265ab0(0x1ad)+_0xcddbb5),_0x2d8666&&console[_0x265ab0(0x23b)](_0x265ab0(0x122)+_0x2d8666),_0x3d71df&&console[_0x265ab0(0x23b)]('Validation:\x20skipped'));const _0x1d2958=await withSpinner(_0x265ab0(0x238),()=>_0x2f1ea0[_0x265ab0(0x298)]['push'](_0x29862b,{'projectName':_0xcddbb5,'revision':_0x2d8666,'skipValidation':_0x3d71df}),{'verbose':_0x5e30e6[_0x265ab0(0x230)]}),_0x4ecff6=_0x1d2958[_0x265ab0(0x1ac)];return console[_0x265ab0(0x23b)]('✔\x20Pushed\x20'+_0x4ecff6[_0x265ab0(0x249)]),console['error'](_0x265ab0(0x2a6)+_0x4ecff6['projectId']),console[_0x265ab0(0x23b)]('\x20\x20Revision:\x20'+_0x4ecff6[_0x265ab0(0x1d1)]),await this[_0x265ab0(0x1f1)](_0x2f1ea0,_0x4ecff6[_0x265ab0(0x249)],_0x5e30e6[_0x265ab0(0x1cc)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x1fefeb(0x152)]='workflow:pull';[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x1c6);async[a55_0x1fefeb(0x250)](_0x560b82){const _0x177e0e=a55_0x1fefeb,{options:_0xe24ccf,args:_0x4c2e84,tdx:_0x3ca7ca}=_0x560b82,_0x3fceb1=_0x4c2e84[0x0],_0x2113fc=_0x4c2e84[0x1];if(!_0x3fceb1)return console[_0x177e0e(0x23b)](a55_0x1e0863['red'](_0x177e0e(0x168)),'Project\x20name\x20is\x20required'),console[_0x177e0e(0x23b)](a55_0x1e0863['dim'](_0x177e0e(0x1fc))),0x1;const _0x1e3e73=_0xe24ccf[_0x177e0e(0x1d1)];_0xe24ccf[_0x177e0e(0x230)]&&(console[_0x177e0e(0x23b)](_0x177e0e(0x1bb)+_0x3fceb1),_0x2113fc&&console[_0x177e0e(0x23b)]('Target\x20directory:\x20'+_0x2113fc),_0x1e3e73&&console[_0x177e0e(0x23b)](_0x177e0e(0x122)+_0x1e3e73),_0xe24ccf[_0x177e0e(0x1f3)]&&console[_0x177e0e(0x23b)]('Dry\x20run:\x20yes'));const _0x41b1da=await withSpinner(_0x177e0e(0x1bd)+_0x3fceb1+_0x177e0e(0x263),()=>_0x3ca7ca[_0x177e0e(0x298)][_0x177e0e(0x1a8)](_0x3fceb1,{'targetDir':_0x2113fc,'revision':_0x1e3e73}),{'verbose':_0xe24ccf[_0x177e0e(0x230)]}),_0x18a14=_0x41b1da['data'];_0x18a14[_0x177e0e(0x1c2)]?console[_0x177e0e(0x23b)](_0x177e0e(0x1df)+_0x18a14[_0x177e0e(0x249)]):console[_0x177e0e(0x23b)](_0x177e0e(0x284)+_0x18a14[_0x177e0e(0x249)]);console['error'](_0x177e0e(0x129)+_0x18a14[_0x177e0e(0x1d1)]),console[_0x177e0e(0x23b)](_0x177e0e(0x2c6)+(a55_0xdb9411[_0x177e0e(0x203)](process[_0x177e0e(0x11b)](),_0x18a14[_0x177e0e(0x25f)])||'.')),console['error'](_0x177e0e(0x2ae)+a55_0x1e0863[_0x177e0e(0x1e9)]('+'+_0x18a14[_0x177e0e(0x166)][_0x177e0e(0x190)]+_0x177e0e(0x1f6))+',\x20'+(a55_0x1e0863[_0x177e0e(0x1c4)]('~'+_0x18a14[_0x177e0e(0x166)][_0x177e0e(0x185)]+_0x177e0e(0x257))+',\x20')+(a55_0x1e0863[_0x177e0e(0x12c)]('-'+_0x18a14[_0x177e0e(0x166)][_0x177e0e(0x260)]+_0x177e0e(0x1a9))+',\x20')+(''+a55_0x1e0863[_0x177e0e(0x182)](_0x18a14[_0x177e0e(0x166)][_0x177e0e(0x1d4)]+_0x177e0e(0x17a))));for(const _0x350e3f of _0x18a14[_0x177e0e(0x13f)]){_0x350e3f[_0x177e0e(0x2c4)]==='modified'&&_0x350e3f[_0x177e0e(0x217)]&&(console[_0x177e0e(0x23b)]('\x0a'+a55_0x1e0863[_0x177e0e(0x14b)](_0x177e0e(0x156)+_0x350e3f[_0x177e0e(0x20d)])),console['error'](_0x350e3f[_0x177e0e(0x217)]));}if(!_0x18a14[_0x177e0e(0x154)])return saveSessionContext({'workflow_project':_0x18a14[_0x177e0e(0x249)]},_0xe24ccf[_0x177e0e(0x176)]),console[_0x177e0e(0x23b)](a55_0x1e0863['green'](_0x177e0e(0x180))),console['error'](a55_0x1e0863[_0x177e0e(0x182)](_0x177e0e(0x160)+_0x18a14[_0x177e0e(0x249)])),0x0;if(_0xe24ccf['dryRun'])return console[_0x177e0e(0x23b)](a55_0x1e0863['yellow'](_0x177e0e(0x291))),0x0;if(!_0xe24ccf[_0x177e0e(0x256)]){if(!isInteractive())return console[_0x177e0e(0x23b)](a55_0x1e0863[_0x177e0e(0x12c)](_0x177e0e(0x209)),_0x177e0e(0x21f)),console['error'](a55_0x1e0863['dim'](_0x177e0e(0x268))),0x1;const _0xd72fc9=await confirmKey(_0x177e0e(0x27d));if(!_0xd72fc9)return console[_0x177e0e(0x23b)](a55_0x1e0863['yellow'](_0x177e0e(0x17e)),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x177e0e(0x1d5),()=>_0x3ca7ca[_0x177e0e(0x298)][_0x177e0e(0x1b1)](_0x18a14,{'revision':_0x1e3e73}),{'verbose':_0xe24ccf[_0x177e0e(0x230)]}),saveSessionContext({'workflow_project':_0x18a14['projectName']},_0xe24ccf[_0x177e0e(0x176)]),console[_0x177e0e(0x23b)](a55_0x1e0863[_0x177e0e(0x1e9)](_0x177e0e(0x1e7)));const _0x35a648=a55_0xdb9411[_0x177e0e(0x203)](process['cwd'](),_0x18a14[_0x177e0e(0x25f)])||'.';return console[_0x177e0e(0x23b)](a55_0x1e0863['dim'](_0x177e0e(0x28c)+_0x35a648)),console[_0x177e0e(0x23b)](a55_0x1e0863[_0x177e0e(0x182)](_0x177e0e(0x160)+_0x18a14['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']='workflow:push';['description']='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a55_0x1fefeb(0x250)](_0x490f99){const _0x79ede7=a55_0x1fefeb,{options:_0x2f9833,args:_0x443634,tdx:_0x5f5dc9}=_0x490f99,_0x48d9cd=this[_0x79ede7(0x2b2)](_0x443634,_0x2f9833),_0x1cd79c=_0x2f9833[_0x79ede7(0x1d1)],_0x3e8938=_0x2f9833['skipValidation'];_0x2f9833[_0x79ede7(0x230)]&&(_0x48d9cd&&console['error'](_0x79ede7(0x224)+_0x48d9cd),_0x1cd79c&&console[_0x79ede7(0x23b)](_0x79ede7(0x122)+_0x1cd79c),_0x2f9833[_0x79ede7(0x1f3)]&&console[_0x79ede7(0x23b)](_0x79ede7(0x1a6)),_0x3e8938&&console[_0x79ede7(0x23b)](_0x79ede7(0x2a8)));let _0x30044a;try{_0x30044a=await withSpinner('Analyzing\x20changes...',()=>_0x5f5dc9[_0x79ede7(0x298)]['preparePushProject']({'sourceDir':_0x48d9cd,'revision':_0x1cd79c,'skipValidation':_0x3e8938}),{'verbose':_0x2f9833[_0x79ede7(0x230)]});}catch(_0x3071aa){if(_0x3071aa instanceof Error&&_0x3071aa[_0x79ede7(0x132)][_0x79ede7(0x20f)](_0x79ede7(0x20b)))return console[_0x79ede7(0x23b)](a55_0x1e0863[_0x79ede7(0x12c)]('Error:'),_0x79ede7(0x15c)),_0x2f9833[_0x79ede7(0x1cb)]?console[_0x79ede7(0x23b)](a55_0x1e0863[_0x79ede7(0x182)]('Tip:\x20cd\x20to\x20workflows/'+_0x2f9833[_0x79ede7(0x1cb)]+_0x79ede7(0x131)+_0x2f9833[_0x79ede7(0x1cb)]+'\x27')):console[_0x79ede7(0x23b)](a55_0x1e0863[_0x79ede7(0x182)](_0x79ede7(0x22a))),0x1;throw _0x3071aa;}const _0x4951ab=_0x30044a[_0x79ede7(0x1ac)];console[_0x79ede7(0x23b)](_0x79ede7(0x240)+_0x4951ab[_0x79ede7(0x249)]),console[_0x79ede7(0x23b)](_0x79ede7(0x283)+_0x4951ab[_0x79ede7(0x1fa)]),console['error'](_0x79ede7(0x129)+_0x4951ab[_0x79ede7(0x1d1)]),console['error'](_0x79ede7(0x2ae)+a55_0x1e0863[_0x79ede7(0x1e9)]('+'+_0x4951ab[_0x79ede7(0x166)]['new']+_0x79ede7(0x1f6))+',\x20'+(a55_0x1e0863[_0x79ede7(0x1c4)]('~'+_0x4951ab[_0x79ede7(0x166)][_0x79ede7(0x185)]+'\x20modified')+',\x20')+(a55_0x1e0863[_0x79ede7(0x12c)]('-'+_0x4951ab[_0x79ede7(0x166)][_0x79ede7(0x260)]+'\x20deleted')+',\x20')+(''+a55_0x1e0863[_0x79ede7(0x182)](_0x4951ab['summary']['unchanged']+'\x20unchanged')));for(const _0x5d1728 of _0x4951ab[_0x79ede7(0x13f)]){_0x5d1728[_0x79ede7(0x2c4)]===_0x79ede7(0x185)&&_0x5d1728['diff']&&(console[_0x79ede7(0x23b)]('\x0a'+a55_0x1e0863[_0x79ede7(0x14b)](_0x79ede7(0x156)+_0x5d1728[_0x79ede7(0x20d)])),console[_0x79ede7(0x23b)](_0x5d1728[_0x79ede7(0x217)]));}if(!_0x4951ab[_0x79ede7(0x154)])return console[_0x79ede7(0x23b)](a55_0x1e0863['green'](_0x79ede7(0x1fd))),await this[_0x79ede7(0x1f1)](_0x5f5dc9,_0x4951ab[_0x79ede7(0x249)],_0x2f9833[_0x79ede7(0x1cc)]),0x0;if(_0x2f9833['dryRun'])return console[_0x79ede7(0x23b)](a55_0x1e0863[_0x79ede7(0x1c4)](_0x79ede7(0x2a5))),0x0;if(!_0x2f9833[_0x79ede7(0x256)]){if(!isInteractive())return console[_0x79ede7(0x23b)](a55_0x1e0863[_0x79ede7(0x12c)](_0x79ede7(0x209)),_0x79ede7(0x21f)),console[_0x79ede7(0x23b)](a55_0x1e0863[_0x79ede7(0x182)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5d82db=await confirmKey(_0x79ede7(0x181));if(!_0x5d82db)return console[_0x79ede7(0x23b)](a55_0x1e0863[_0x79ede7(0x1c4)]('Cancelled'),'-\x20nothing\x20pushed'),0x1;}const _0x4ca0b2=await withSpinner(_0x79ede7(0x287),()=>_0x5f5dc9[_0x79ede7(0x298)][_0x79ede7(0x1ce)](_0x4951ab),{'verbose':_0x2f9833['verbose']}),_0x5f3b78=_0x4ca0b2[_0x79ede7(0x1ac)];return console['error'](a55_0x1e0863['green'](_0x79ede7(0x158))),console[_0x79ede7(0x23b)](_0x79ede7(0x2a6)+_0x5f3b78[_0x79ede7(0x21e)]),console[_0x79ede7(0x23b)](_0x79ede7(0x129)+_0x5f3b78[_0x79ede7(0x1d1)]),await this['showWorkflowConsoleUrl'](_0x5f5dc9,_0x5f3b78['projectName'],_0x2f9833['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x1fefeb(0x152)]=a55_0x1fefeb(0x27e);[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x1be);async[a55_0x1fefeb(0x250)](_0x5c4e88){const _0x558dac=a55_0x1fefeb,{options:_0x5d652d,args:_0x4aa28b,tdx:_0x58e7f0}=_0x5c4e88,_0x12da31=this[_0x558dac(0x2b2)](_0x4aa28b,_0x5d652d),_0x365980=_0x5d652d[_0x558dac(0x152)],_0x1481a4=_0x5d652d[_0x558dac(0x1d1)],_0x4b9e5e=_0x5d652d[_0x558dac(0x138)];if(!_0x12da31)return console[_0x558dac(0x23b)](a55_0x1e0863[_0x558dac(0x12c)](_0x558dac(0x168)),_0x558dac(0x11c)),console[_0x558dac(0x23b)](a55_0x1e0863[_0x558dac(0x182)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x558dac(0x23b)](a55_0x1e0863['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x365980)return console[_0x558dac(0x23b)](a55_0x1e0863[_0x558dac(0x12c)]('Error:'),_0x558dac(0x1ca)),console['error'](a55_0x1e0863[_0x558dac(0x182)](_0x558dac(0x278))),0x1;_0x5d652d[_0x558dac(0x230)]&&(console[_0x558dac(0x23b)](_0x558dac(0x224)+_0x12da31),console['error'](_0x558dac(0x142)+_0x365980),_0x1481a4&&console[_0x558dac(0x23b)]('Revision:\x20'+_0x1481a4),_0x5d652d[_0x558dac(0x1f3)]&&console[_0x558dac(0x23b)]('Dry\x20run:\x20yes'),_0x4b9e5e&&console[_0x558dac(0x23b)](_0x558dac(0x2a8)));const _0xfb2db5=await withSpinner(_0x558dac(0x214),()=>_0x58e7f0[_0x558dac(0x298)][_0x558dac(0x236)](_0x12da31,_0x365980,{'revision':_0x1481a4,'skipValidation':_0x4b9e5e}),{'verbose':_0x5d652d[_0x558dac(0x230)]}),_0x143d95=_0xfb2db5['data'];console['error'](_0x558dac(0x123)+_0x143d95[_0x558dac(0x1fa)]);_0x143d95[_0x558dac(0x26b)]&&console[_0x558dac(0x23b)]('Source\x20project:\x20'+_0x143d95[_0x558dac(0x26b)]);console[_0x558dac(0x23b)](_0x558dac(0x142)+_0x143d95['newProjectName']),console['error'](_0x558dac(0x122)+_0x143d95[_0x558dac(0x1d1)]),console[_0x558dac(0x23b)](_0x558dac(0x204)+_0x143d95[_0x558dac(0x201)]);_0x143d95[_0x558dac(0x162)]&&(console[_0x558dac(0x23b)](a55_0x1e0863['yellow'](_0x558dac(0x2be)+_0x143d95['newProjectName']+_0x558dac(0x2aa)+_0x143d95['existingProjectId']+')')),console['error'](a55_0x1e0863[_0x558dac(0x1c4)](_0x558dac(0x1d8))));if(_0x5d652d['dryRun'])return console[_0x558dac(0x23b)](a55_0x1e0863[_0x558dac(0x1c4)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x5d652d['yes']){if(!isInteractive())return console[_0x558dac(0x23b)](a55_0x1e0863[_0x558dac(0x12c)](_0x558dac(0x209)),_0x558dac(0x21f)),console[_0x558dac(0x23b)](a55_0x1e0863['dim'](_0x558dac(0x268))),0x1;const _0x31487b=_0x143d95[_0x558dac(0x26b)]||a55_0xdb9411[_0x558dac(0x202)](_0x12da31),_0x3683b2=_0x143d95['targetExists']?_0x558dac(0x16c)+_0x365980+'\x22\x20with\x20new\x20revision?':_0x558dac(0x14a)+_0x31487b+_0x558dac(0x12e)+_0x365980+'\x22?',_0x37116d=await confirmKey(_0x3683b2);if(!_0x37116d)return console[_0x558dac(0x23b)](a55_0x1e0863[_0x558dac(0x1c4)](_0x558dac(0x17e))),0x1;}const _0x3b9128=await withSpinner(_0x143d95[_0x558dac(0x162)]?_0x558dac(0x2b5)+_0x365980+'...':'Cloning\x20to\x20'+_0x365980+_0x558dac(0x263),()=>_0x58e7f0[_0x558dac(0x298)]['executeCloneProject'](_0x143d95),{'verbose':_0x5d652d[_0x558dac(0x230)]}),_0x3a93a5=_0x3b9128[_0x558dac(0x1ac)];return console[_0x558dac(0x23b)](a55_0x1e0863[_0x558dac(0x1e9)](_0x143d95[_0x558dac(0x162)]?_0x558dac(0x27f):_0x558dac(0x1aa))),console[_0x558dac(0x23b)](_0x558dac(0x24a)+_0x3a93a5[_0x558dac(0x199)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x3a93a5[_0x558dac(0x2a0)]),console['error'](_0x558dac(0x129)+_0x3a93a5[_0x558dac(0x1d1)]),await this[_0x558dac(0x1f1)](_0x58e7f0,_0x3a93a5[_0x558dac(0x199)],_0x5d652d['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a55_0x1fefeb(0x152)]='workflow:delete';[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x2af);async[a55_0x1fefeb(0x250)](_0x4c9077){const _0x28fd55=a55_0x1fefeb,{options:_0xb9ca5f,args:_0x3487b4,tdx:_0x4b6c59}=_0x4c9077,_0x9f78a6=_0x3487b4[0x0];if(!_0x9f78a6)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x28fd55(0x23b)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0xb9ca5f[_0x28fd55(0x230)]&&console['error'](_0x28fd55(0x1bb)+_0x9f78a6);if(!_0xb9ca5f['yes']){if(!isInteractive())return console[_0x28fd55(0x23b)](a55_0x1e0863[_0x28fd55(0x12c)](_0x28fd55(0x209)),_0x28fd55(0x21f)),console[_0x28fd55(0x23b)](a55_0x1e0863['dim'](_0x28fd55(0x268))),0x1;const _0x502b3c=await confirmKey(_0x28fd55(0x222)+_0x9f78a6+_0x28fd55(0x248));if(!_0x502b3c)return console[_0x28fd55(0x23b)](a55_0x1e0863[_0x28fd55(0x1c4)](_0x28fd55(0x17e))),0x1;}const _0x4bf4f0=await withSpinner(_0x28fd55(0x127)+_0x9f78a6+'...',()=>_0x4b6c59['workflow'][_0x28fd55(0x231)](_0x9f78a6),{'verbose':_0xb9ca5f[_0x28fd55(0x230)]}),_0xe19710=_0x4bf4f0['data'];return console[_0x28fd55(0x23b)]('✔\x20Deleted\x20project\x20'+_0xe19710['projectName']),console[_0x28fd55(0x23b)]('\x20\x20Project\x20ID:\x20'+_0xe19710['projectId']),0x0;}}export function parseKeyValue(_0x198e23){const _0x28eb3d=a55_0x1fefeb,_0x15988b=_0x198e23[_0x28eb3d(0x15f)]('=');if(_0x15988b===-0x1)throw new Error(_0x28eb3d(0x1cf)+_0x198e23+_0x28eb3d(0x216));const _0x1dcf2b=_0x198e23[_0x28eb3d(0x1d9)](0x0,_0x15988b),_0x41a1c6=_0x198e23['substring'](_0x15988b+0x1);if(!_0x1dcf2b)throw new Error(_0x28eb3d(0x1fb));return{'key':_0x1dcf2b,'value':_0x41a1c6};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x1fefeb(0x152)]='workflow:secrets:list';[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x1f9);async['execute'](_0x5a8390){const _0xcbde30=a55_0x1fefeb,{options:_0x33325b,args:_0x48a214,tdx:_0x5f29fb}=_0x5a8390,_0x57c8a1=this[_0xcbde30(0x24d)](_0x48a214,_0x33325b);if(!_0x57c8a1)return 0x1;_0x33325b[_0xcbde30(0x230)]&&console[_0xcbde30(0x23b)](_0xcbde30(0x1bb)+_0x57c8a1);const _0x632663=await withSpinner(_0xcbde30(0x11f),()=>_0x5f29fb[_0xcbde30(0x298)]['listSecrets'](_0x57c8a1),{'verbose':_0x33325b[_0xcbde30(0x230)]}),{secrets:_0x5b5226}=_0x632663[_0xcbde30(0x1ac)];return console[_0xcbde30(0x23b)]('✔\x20Found\x20'+_0x5b5226['length']+'\x20secret'+(_0x5b5226['length']!==0x1?'s':'')),await handleSDKOutput(_0x5b5226,_0x33325b),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x1fefeb(0x152)]=a55_0x1fefeb(0x169);[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x170);async[a55_0x1fefeb(0x250)](_0x312a5d){const _0x809f5f=a55_0x1fefeb,{options:_0x3117ba,args:_0x2c45ba,tdx:_0x155789}=_0x312a5d;let _0x56698d,_0x5021fc;if(_0x2c45ba[_0x809f5f(0x1d0)]>=0x1&&!_0x2c45ba[0x0][_0x809f5f(0x20f)]('='))_0x56698d=_0x2c45ba[0x0],_0x5021fc=_0x2c45ba[_0x809f5f(0x244)](0x1);else{if(_0x2c45ba[_0x809f5f(0x1d0)]>=0x1&&_0x3117ba[_0x809f5f(0x1cb)])_0x56698d=_0x3117ba['workflowProject'],_0x5021fc=_0x2c45ba;else return _0x2c45ba[_0x809f5f(0x1d0)]>=0x1?(console[_0x809f5f(0x23b)](_0x809f5f(0x221)),console[_0x809f5f(0x23b)](_0x809f5f(0x23a)),0x1):(console[_0x809f5f(0x23b)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x809f5f(0x23b)](_0x809f5f(0x15b)),0x1);}if(_0x5021fc[_0x809f5f(0x1d0)]===0x0)return console[_0x809f5f(0x23b)](_0x809f5f(0x1a1)),console[_0x809f5f(0x23b)](_0x809f5f(0x15b)),0x1;const _0x93acbc={};try{for(const _0x6311a8 of _0x5021fc){const {key:_0x262c04,value:_0x56234a}=parseKeyValue(_0x6311a8);_0x93acbc[_0x262c04]=_0x56234a;}}catch(_0x5f43d4){return _0x5f43d4 instanceof Error&&console[_0x809f5f(0x23b)](a55_0x1e0863[_0x809f5f(0x12c)](_0x809f5f(0x168)),_0x5f43d4[_0x809f5f(0x132)]),0x1;}const _0x2d99d6=Object[_0x809f5f(0x251)](_0x93acbc);_0x3117ba['verbose']&&(console[_0x809f5f(0x23b)](_0x809f5f(0x1bb)+_0x56698d),console['error'](_0x809f5f(0x187)+_0x2d99d6[_0x809f5f(0x25e)](',\x20')));const _0x514f32=await withSpinner(_0x2d99d6[_0x809f5f(0x1d0)]===0x1?_0x809f5f(0x1f0):_0x809f5f(0x226)+_0x2d99d6['length']+_0x809f5f(0x21c),()=>_0x155789[_0x809f5f(0x298)][_0x809f5f(0x14e)](_0x56698d,_0x93acbc),{'verbose':_0x3117ba[_0x809f5f(0x230)]}),_0x448710=_0x514f32[_0x809f5f(0x1ac)];return console[_0x809f5f(0x23b)](_0x2d99d6['length']===0x1?_0x809f5f(0x1db)+_0x448710['keys'][0x0]+_0x809f5f(0x18c)+_0x448710['projectName']+'\x27':'✔\x20'+_0x448710[_0x809f5f(0x251)][_0x809f5f(0x1d0)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x448710[_0x809f5f(0x249)]+'\x27'),(_0x3117ba[_0x809f5f(0x2c7)]||_0x3117ba['jsonl'])&&await handleSingleObjectOutput(_0x448710,_0x3117ba),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']='workflow:secrets:delete';['description']=a55_0x1fefeb(0x2a2);async[a55_0x1fefeb(0x250)](_0x23f491){const _0x14f5dd=a55_0x1fefeb,{options:_0x256807,args:_0x2489b7,tdx:_0x37c5e0}=_0x23f491;let _0xd19054,_0x21feaa;if(_0x2489b7[_0x14f5dd(0x1d0)]>=0x2)_0xd19054=_0x2489b7[0x0],_0x21feaa=_0x2489b7[0x1];else{if(_0x2489b7[_0x14f5dd(0x1d0)]===0x1&&_0x256807[_0x14f5dd(0x1cb)])_0xd19054=_0x256807['workflowProject'],_0x21feaa=_0x2489b7[0x0];else return _0x2489b7[_0x14f5dd(0x1d0)]===0x1?(console[_0x14f5dd(0x23b)](_0x14f5dd(0x221)),console[_0x14f5dd(0x23b)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error'](_0x14f5dd(0x29a)),console[_0x14f5dd(0x23b)](_0x14f5dd(0x1b3)),0x1);}_0x256807[_0x14f5dd(0x230)]&&(console['error'](_0x14f5dd(0x1bb)+_0xd19054),console['error'](_0x14f5dd(0x153)+_0x21feaa));if(!_0x256807[_0x14f5dd(0x256)]){if(!isInteractive())return console[_0x14f5dd(0x23b)](a55_0x1e0863['red']('\x0aError:'),_0x14f5dd(0x21f)),console[_0x14f5dd(0x23b)](a55_0x1e0863[_0x14f5dd(0x182)](_0x14f5dd(0x268))),0x1;const _0x568d23=await confirmKey(_0x14f5dd(0x270)+_0x21feaa+_0x14f5dd(0x1ff)+_0xd19054+'\x27?');if(!_0x568d23)return console[_0x14f5dd(0x23b)](a55_0x1e0863[_0x14f5dd(0x1c4)](_0x14f5dd(0x17e))),0x1;}const _0x403a7b=await withSpinner('Deleting\x20secret...',()=>_0x37c5e0[_0x14f5dd(0x298)]['deleteSecret'](_0xd19054,_0x21feaa),{'verbose':_0x256807[_0x14f5dd(0x230)]}),_0x2b8ad5=_0x403a7b[_0x14f5dd(0x1ac)];return console['error'](_0x14f5dd(0x1db)+_0x2b8ad5['key']+_0x14f5dd(0x279)+_0x2b8ad5[_0x14f5dd(0x249)]+'\x27'),(_0x256807[_0x14f5dd(0x2c7)]||_0x256807[_0x14f5dd(0x207)])&&await handleSingleObjectOutput(_0x2b8ad5,_0x256807),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(_0x502d6c){const _0x54f409=a55_0x1fefeb,_0x559649=Math['floor'](_0x502d6c/0x3e8),_0x58da3e=Math[_0x54f409(0x274)](_0x559649/0x3c),_0xeb4385=Math[_0x54f409(0x274)](_0x58da3e/0x3c),_0x3761af=Math['floor'](_0xeb4385/0x18);if(_0x3761af>0x0){const _0x34880b=_0xeb4385%0x18;return _0x34880b>0x0?_0x3761af+'d\x20'+_0x34880b+'h':_0x3761af+'d';}else{if(_0xeb4385>0x0){const _0x2fce0b=_0x58da3e%0x3c;return _0x2fce0b>0x0?_0xeb4385+'h\x20'+_0x2fce0b+'m':_0xeb4385+'h';}else{if(_0x58da3e>0x0){const _0x3cab91=_0x559649%0x3c;return _0x3cab91>0x0?_0x58da3e+'m\x20'+_0x3cab91+'s':_0x58da3e+'m';}else return _0x559649+'s';}}}function formatTimestamp(_0x535dfc,_0x3165b8){const _0x4de4b5=a55_0x1fefeb,_0x2a7011=new Date(_0x535dfc),_0x4b6db2=String(_0x2a7011[_0x4de4b5(0x16f)]())[_0x4de4b5(0x22f)](0x2,'0'),_0x1de6ea=String(_0x2a7011[_0x4de4b5(0x164)]())['padStart'](0x2,'0'),_0x52e241=_0x4b6db2+':'+_0x1de6ea,_0x3f60fa=_0x2a7011[_0x4de4b5(0x234)]()===_0x3165b8['getFullYear']()&&_0x2a7011[_0x4de4b5(0x1c9)]()===_0x3165b8[_0x4de4b5(0x1c9)]()&&_0x2a7011[_0x4de4b5(0x264)]()===_0x3165b8[_0x4de4b5(0x264)]();if(_0x3f60fa)return _0x52e241;else{const _0xb23ea2=String(_0x2a7011[_0x4de4b5(0x1c9)]()+0x1)[_0x4de4b5(0x22f)](0x2,'0'),_0x45249f=String(_0x2a7011['getDate']())[_0x4de4b5(0x22f)](0x2,'0');return _0xb23ea2+'-'+_0x45249f+'\x20'+_0x52e241;}}function formatDate(_0x2408c1){const _0x464fd0=a55_0x1fefeb,_0x5d3067=_0x2408c1[_0x464fd0(0x234)](),_0x35fa30=String(_0x2408c1[_0x464fd0(0x1c9)]()+0x1)[_0x464fd0(0x22f)](0x2,'0'),_0x50184a=String(_0x2408c1['getDate']())[_0x464fd0(0x22f)](0x2,'0');return _0x5d3067+'-'+_0x35fa30+'-'+_0x50184a;}function getTaskStateIcon(_0x2ab760){const _0x219bd2={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x219bd2[_0x2ab760]||'⚪';}function getBarChar(_0x4a61cc){const _0x1719d0=a55_0x1fefeb;return _0x4a61cc===_0x1719d0(0x23b)||_0x4a61cc==='group_error'?'×':'─';}function a55_0x416b(){const _0x345651=['startedAt','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','error','✔\x20Workflow\x20run\x20started','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','No\x20workflow\x20projects\x20found','every','✔\x20Project:\x20','LABEL_MIN_SPACING','(unknown)','No\x20attempts\x20found\x20in\x20project:\x20','slice','8nNZQcU','/app/workflows/','getTime','\x22?\x20This\x20cannot\x20be\x20undone.','projectName','\x20\x20Project:\x20','updatedAt','min','requireProject','\x0a✔\x20Attempt\x20complete','renderSessionsTimeline','execute','keys','\x20tasks','\x20\x20Files\x20extracted:\x20','all','localeCompare','yes','\x20modified','Select\x20a\x20workflow\x20to\x20run','\x20project','durationMs','Usage:\x20tdx\x20wf\x20use\x20<project>','columns','start','join','targetDir','deleted','\x20-\x20','Params:\x20','...','getDate','MIN_TIMELINE_WIDTH','fill','status','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','📋\x20','parse','sourceProjectName','Session\x20time:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','tasks','25675309MJqsWO','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','kill','task','Session\x20not\x20found:\x20','floor','clear','fs/promises','\x1b[1A\x1b[2K','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','workflow:use','attempt','Loading\x20workflows...','\x0aApply\x20these\x20changes?','workflow:clone','✔\x20Project\x20updated','⚠\x20Showing\x20first\x20','isArray','No\x20workflows\x20found\x20in\x20project:\x20','\x20\x20Source:\x20','→\x20Project:\x20','List\x20all\x20workflow\x20projects','\x20(use\x20--limit\x20to\x20show\x20more)','Pushing\x20project...','Latest\x20session\x20has\x20no\x20attempt','Attempt\x20ID:\x20','params','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20\x20Location:\x20','workflow:upload','startTime','cancelRequested','\x20\x20Workflow:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','splice','Warning:','ICON_SPACING','ICON_WIDTH','Using\x20attempt\x20','workflow','context','Error:\x20Secret\x20key\x20is\x20required','startsWith','running','resolve','Expected\x20format:\x20--param\x20key=value','Fetching\x20log\x20files...','newProjectId','total','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','parseProjectWorkflowPattern','Project\x20directory:\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x20\x20Project\x20ID:\x20','size','Validation:\x20skipped','Starting\x20workflow\x20run...','\x22\x20already\x20exists\x20(ID:\x20','isDirectory','toLowerCase','max','\x20\x20Changes:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','resolveProjectDir','GUTTER','\x20attempt','Updating\x20','TASK_NAME_WIDTH','Force:\x20yes','description','resolveProject','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Killing\x20attempt...','No\x20sessions\x20found','Filter:\x20project=','\x0a⚠\x20Project\x20\x22','Auto-selected\x20latest\x20session:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Project\x20name\x20is\x20required','renderTimeline','No\x20projects\x20match\x20pattern:\x20','type','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','\x20\x20Target:\x20','json','Listing\x20workflows...','Resume\x20from:\x20','list','duration','logs','cwd','Source\x20directory\x20is\x20required','\x20\x20Attempt\x20ID:\x20','renderSingleTimeline','Listing\x20secrets...','From\x20task:\x20','Kill\x20a\x20running\x20attempt','Revision:\x20','Source:\x20','6523805bDrBxL','fileSize','format','Deleting\x20project\x20','Session\x20','\x20\x20Revision:\x20','workflow:attempt','isTTY','red','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x22\x20to\x20new\x20project\x20\x22','table','retryAttemptName','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','message','Project\x20filter:\x20','project','\x20\x20Console:\x20','buildTimelineData','✔\x20Workflow\x20project\x20set\x20to:\x20','skipValidation','3953908xarOkE','workflow:retry','filter','sys','Error:\x20','session_id','changes','pending','some','New\x20project\x20name:\x20','navigateSessionsInteractive','icon','includeSubtasks','get','select','Resolving\x20project\x20\x27','MAX_TIMELINE_WIDTH','\x0aClone\x20\x22','cyan','retryAttempt',',\x20Workflow:\x20','setSecrets','state','Show\x20specific\x20attempt\x20details','Loading\x20sessions...','name','Key:\x20','hasChanges','sort','---\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','✔\x20Push\x20complete','Listing\x20workflow\x20projects...','index','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','279hDhoOB','indexOf','\x20\x20Session\x20context\x20set\x20to:\x20','workflow:kill','targetExists','utf-8','getMinutes','Failed\x20to\x20fetch\x20attempt\x20data','summary','LABEL_WIDTH_DIVISOR','Error:','workflow:secrets:set','/attempt/','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x0aUpdate\x20existing\x20project\x20\x22','fromTask','find','getHours','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','MAX_TASKS_DISPLAY','workflow:logs','\x20(system)','272330EnVCvq','trim','session','split','\x20workflow','workflow:workflows','\x20unchanged','generateSessionTimelineRows','blue','taskName','Cancelled','344AdGmzx','\x0a✔\x20Already\x20up\x20to\x20date','\x0aPush\x20these\x20changes?','dim','lastAttempt','11139tQCfUM','modified','✔\x20Downloaded\x20','Secrets\x20to\x20set:\x20','workflows','planned','Parameters:\x20','from','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Loading\x20session...','No\x20attempts\x20found','new','force','Error:\x20Attempt\x20ID\x20is\x20required','\x20has\x20no\x20attempts','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20of\x20','/sessions/','map','pollTimeline','newProjectName','✔\x20Workflow\x20project\x20context\x20cleared.','match','unknown','fullName','success','readFile','1415723zlSRuH','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','Attempt:\x20','Reason:\x20','stdout','No\x20workflows\x20found','Dry\x20run:\x20yes','Workflow:\x20','pullProject','\x20deleted','✔\x20Clone\x20complete','write','data','Project\x20name:\x20','includeRetried','session:','Downloading\x20logs...','applyPullProject','values','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','reason','canceling','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','stringify','💡\x20Tip:\x20Use\x20','attempts','Project:\x20','window','Pulling\x20project\x20','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','logFiles','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','done','isNewProject','limit','yellow','follow','Pull\x20workflow\x20project\x20to\x20local\x20folder','sessionId','stat','getMonth','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','workflowProject','site','repeat','executePushProject','Invalid\x20format:\x20','length','revision','sessions','MIN_LABEL_COUNT','unchanged','Writing\x20files...','Listing\x20workflow\x20sessions...','Select\x20a\x20task\x20to\x20view\x20logs:','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','substring','\x20\x20New\x20attempt\x20ID:\x20','✔\x20Secret\x20\x27','Listing\x20workflow\x20attempts...','\x0aPolling...\x20(','No\x20sessions\x20found\x20in\x20project:\x20','→\x20New\x20project:\x20','now','Show\x20tasks\x20for\x20an\x20attempt','Pattern:\x20','attemptId','Output\x20directory:\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','(use\x20--limit\x20to\x20see\x20more)','✔\x20Pull\x20complete','log','green','\x20session','metadata','createdAt','1183056eeHHup','✔\x20Found\x20','✔\x20Retry\x20started','Setting\x20secret...','showWorkflowConsoleUrl','param','dryRun','No\x20sessions\x20found\x20for:\x20','POLL_INTERVAL_MS','\x20new','tdx.json','\x20sessions\x20','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','sourceDir','Key\x20cannot\x20be\x20empty','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x0a✔\x20No\x20changes\x20to\x20push','Select\x20a\x20session\x20to\x20view\x20timeline:','\x27\x20from\x20project\x20\x27','toISOString','fileCount','basename','relative','Files\x20to\x20upload:\x20','title','No\x20workflow\x20sessions\x20found','jsonl','Retrying\x20session...','\x0aError:','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20workflow\x20tdx.json\x20found','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','path','output','includes','Target:\x20','6zJKgoP','group_error','Total:\x20','Analyzing\x20project...','push','.\x20Expected\x20format:\x20KEY=VALUE','diff','end','sessionTime','Error:\x20Invalid\x20parameter\x20format:\x20','attempt:','\x20secrets...','Error:\x20Invalid\x20JSON\x20in\x20--params','projectId','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','set','Error:\x20Project\x20name\x20is\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Source\x20directory:\x20','finishedAt','Setting\x20','revision:\x20','workflowName','displayLine','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','\x27...','Start\x20a\x20workflow\x20run','MAX_LABEL_COUNT','padStart','verbose','delete','🔄\x20','Filter:\x20','getFullYear','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','prepareCloneProject','\x20from\x20session\x20','Pushing\x20workflow\x20project...'];a55_0x416b=function(){return _0x345651;};return a55_0x416b();}function getBarColor(_0x2d22fb){const _0x28c7bc=a55_0x1fefeb,_0x236567={'success':a55_0x1e0863[_0x28c7bc(0x1e9)],'error':a55_0x1e0863[_0x28c7bc(0x12c)],'group_error':a55_0x1e0863[_0x28c7bc(0x12c)],'running':a55_0x1e0863[_0x28c7bc(0x17c)],'blocked':a55_0x1e0863[_0x28c7bc(0x1c4)],'planned':a55_0x1e0863[_0x28c7bc(0x182)],'canceling':a55_0x1e0863['yellow']};return _0x236567[_0x2d22fb]||a55_0x1e0863['white'];}function parseTaskName(_0x156685){const _0x3626e9=a55_0x1fefeb;let _0x36cde1=_0x156685['replace'](/^\++/,'');const _0x22a484=_0x36cde1[_0x3626e9(0x177)]('+'),_0x3453a8=_0x22a484[_0x3626e9(0x1d0)]>0x1?_0x22a484[_0x3626e9(0x1d0)]-0x2:0x0,_0x4aebf9=_0x22a484[_0x22a484[_0x3626e9(0x1d0)]-0x1]||_0x36cde1;return{'level':_0x3453a8,'name':'+'+_0x4aebf9};}function truncateTaskName(_0x54927f,_0x476d45){const _0xecabd9=a55_0x1fefeb,_0x114fde=stringWidth(_0x54927f);if(_0x114fde<=_0x476d45)return _0x54927f;let _0x304afc=_0x54927f;while(stringWidth(_0x304afc+'…')>_0x476d45&&_0x304afc[_0xecabd9(0x1d0)]>0x0){_0x304afc=_0x304afc['slice'](0x0,-0x1);}return _0x304afc+'…';}function calculateTimeScale(_0x2407cf,_0x5cd7de){const _0x4851c1=a55_0x1fefeb;return{'startTime':_0x2407cf[_0x4851c1(0x25d)],'endTime':_0x2407cf[_0x4851c1(0x218)],'durationMs':_0x2407cf['duration'],'msPerChar':_0x2407cf[_0x4851c1(0x119)]/_0x5cd7de};}function timeToPosition(_0x4861b8,_0xfc73a4,_0x21db34){const _0x1cb083=a55_0x1fefeb,_0x386713=_0x4861b8-_0xfc73a4[_0x1cb083(0x28e)],_0x52af1a=Math[_0x1cb083(0x274)](_0x386713/_0xfc73a4['msPerChar']);return Math['max'](0x0,Math[_0x1cb083(0x24c)](_0x52af1a,_0x21db34));}function renderTimeAxis(_0x14b1ce,_0x4e3a7d){const _0x1659d5=a55_0x1fefeb,_0x2603b4=Math[_0x1659d5(0x24c)](TIMELINE_CONFIG[_0x1659d5(0x22e)],Math['max'](TIMELINE_CONFIG[_0x1659d5(0x1d3)],Math['floor'](_0x4e3a7d/TIMELINE_CONFIG[_0x1659d5(0x167)]))),_0xd0da77=_0x14b1ce[_0x1659d5(0x25a)]/(_0x2603b4-0x1),_0x3574fe=new Date(_0x14b1ce[_0x1659d5(0x28e)]),_0x10edf8=[];for(let _0x4d6713=0x0;_0x4d6713<_0x2603b4;_0x4d6713++){const _0x133bf4=_0x14b1ce[_0x1659d5(0x28e)]+_0x4d6713*_0xd0da77,_0x494a62=timeToPosition(_0x133bf4,_0x14b1ce,_0x4e3a7d),_0x13c471=formatTimestamp(_0x133bf4,_0x3574fe);_0x10edf8[_0x1659d5(0x215)]({'pos':_0x494a62,'text':_0x13c471});}const _0x11f5a9=new Array(_0x4e3a7d)[_0x1659d5(0x266)]('\x20');let _0x172147=-0x1;for(const {pos:_0x32d92b,text:_0x39cb24}of _0x10edf8){let _0x17627d=Math[_0x1659d5(0x2ad)](0x0,_0x32d92b-Math['floor'](_0x39cb24[_0x1659d5(0x1d0)]/0x2));_0x17627d<=_0x172147+TIMELINE_CONFIG[_0x1659d5(0x241)]&&(_0x17627d=_0x172147+TIMELINE_CONFIG[_0x1659d5(0x241)]+0x1);_0x17627d+_0x39cb24[_0x1659d5(0x1d0)]>_0x4e3a7d&&(_0x17627d=_0x4e3a7d-_0x39cb24[_0x1659d5(0x1d0)]);if(_0x17627d>=0x0&&_0x17627d+_0x39cb24[_0x1659d5(0x1d0)]<=_0x4e3a7d&&_0x17627d>_0x172147){for(let _0x2dd669=0x0;_0x2dd669<_0x39cb24['length'];_0x2dd669++){_0x11f5a9[_0x17627d+_0x2dd669]=_0x39cb24[_0x2dd669];}_0x172147=_0x17627d+_0x39cb24['length']-0x1;}}return _0x11f5a9[_0x1659d5(0x25e)]('');}function renderTaskRow(_0x263f96,_0x4eabff,_0x2f43f6,_0x7a3c5){const _0x15fdb5=a55_0x1fefeb,{level:_0x4e56eb,name:_0x45d8bd}=parseTaskName(_0x263f96[_0x15fdb5(0x152)]),_0x25e8eb='\x20'['repeat'](_0x4e56eb),_0x3765ee=_0x263f96[_0x15fdb5(0x1bc)]?'('+formatElapsed(_0x263f96[_0x15fdb5(0x1bc)][_0x15fdb5(0x119)])+')':'',_0x3216a9=stringWidth(_0x3765ee),_0x3e7b2d=_0x4e56eb*0x1,_0x1cf498=_0x7a3c5-_0x3e7b2d-_0x3216a9-0x1,_0x39cb46=truncateTaskName(_0x45d8bd,_0x1cf498),_0x123ca2=_0x25e8eb+_0x39cb46,_0x395ad3=stringWidth(_0x123ca2),_0x1668c5=_0x7a3c5-_0x395ad3-_0x3216a9,_0x191268=_0x123ca2+'\x20'[_0x15fdb5(0x1cd)](Math['max'](0x1,_0x1668c5))+a55_0x1e0863[_0x15fdb5(0x182)](_0x3765ee),_0x88b3eb=getTaskStateIcon(_0x263f96[_0x15fdb5(0x14f)]),_0x5fac0b=new Array(_0x2f43f6)[_0x15fdb5(0x266)]('\x20');if(_0x263f96['window']){const _0x3dc0b9=timeToPosition(_0x263f96[_0x15fdb5(0x1bc)][_0x15fdb5(0x25d)],_0x4eabff,_0x2f43f6),_0xace0fb=timeToPosition(_0x263f96[_0x15fdb5(0x1bc)][_0x15fdb5(0x218)],_0x4eabff,_0x2f43f6),_0x14dde9=getBarChar(_0x263f96[_0x15fdb5(0x14f)]),_0x4056ca=Math[_0x15fdb5(0x2ad)](_0x3dc0b9+0x1,_0xace0fb);for(let _0x2c99fe=_0x3dc0b9;_0x2c99fe<Math['min'](_0x4056ca,_0x2f43f6);_0x2c99fe++){_0x5fac0b[_0x2c99fe]=_0x14dde9;}}const _0x3dfcac=getBarColor(_0x263f96[_0x15fdb5(0x14f)]),_0x38d73b=_0x5fac0b[_0x15fdb5(0x197)](_0x5206ec=>_0x5206ec==='\x20'?'\x20':_0x3dfcac(_0x5206ec))[_0x15fdb5(0x25e)]('');return _0x88b3eb+'\x20'+_0x191268+'│'+_0x38d73b+'│';}function calculateStats(_0x2f86b3){const _0xbda4d3=a55_0x1fefeb,_0xe69928={'total':_0x2f86b3[_0xbda4d3(0x1d0)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x52ed08 of _0x2f86b3){if(_0x52ed08['state']===_0xbda4d3(0x19e))_0xe69928[_0xbda4d3(0x19e)]++;else{if(_0x52ed08[_0xbda4d3(0x14f)]==='error'||_0x52ed08[_0xbda4d3(0x14f)]===_0xbda4d3(0x212))_0xe69928[_0xbda4d3(0x23b)]++;else _0x52ed08['state']===_0xbda4d3(0x29c)?_0xe69928['running']++:_0xe69928[_0xbda4d3(0x140)]++;}}return _0xe69928;}function formatStats(_0x58bc96){const _0x3220c8=a55_0x1fefeb;return[_0x3220c8(0x213)+_0x58bc96[_0x3220c8(0x2a1)],'✅\x20'+_0x58bc96['success'],'❌\x20'+_0x58bc96[_0x3220c8(0x23b)],_0x3220c8(0x232)+_0x58bc96[_0x3220c8(0x29c)],'⏳\x20'+_0x58bc96[_0x3220c8(0x140)]][_0x3220c8(0x25e)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x1fefeb(0x152)]='workflow:timeline';[a55_0x1fefeb(0x2b8)]=a55_0x1fefeb(0x12d);async[a55_0x1fefeb(0x250)](_0x594680){const _0x4c5ec2=a55_0x1fefeb,{options:_0xe2d060,args:_0x12382b,tdx:_0x4ccc93}=_0x594680;let _0x4a2430,_0xeaaaf5,_0xd9006d=![];if(_0x12382b[0x0]){if(_0x12382b[0x0][_0x4c5ec2(0x20f)]('.')){const _0x49e8f=this[_0x4c5ec2(0x2a3)](_0x12382b,_0xe2d060);if(!_0x49e8f)return 0x1;_0x4a2430=_0x49e8f['projectName'],_0xeaaaf5=_0x49e8f['workflowName'];}else{_0xeaaaf5=_0x12382b[0x0],_0x4a2430=_0xe2d060[_0x4c5ec2(0x1cb)];if(!_0x4a2430)return console['error'](a55_0x1e0863[_0x4c5ec2(0x12c)](_0x4c5ec2(0x168)),_0x4c5ec2(0x16b)),0x1;_0xd9006d=!![];}}else{const _0x1069d4=this['parseProjectWorkflowPattern'](_0x12382b,_0xe2d060);if(!_0x1069d4)return 0x1;_0x4a2430=_0x1069d4[_0x4c5ec2(0x249)],_0xeaaaf5=_0x1069d4[_0x4c5ec2(0x228)];}if(_0xe2d060[_0x4c5ec2(0x230)]){if(_0x4a2430&&_0xeaaaf5)console[_0x4c5ec2(0x23b)](_0x4c5ec2(0x233)+_0x4a2430+'.'+_0xeaaaf5);else _0x4a2430&&console[_0x4c5ec2(0x23b)]('Filter:\x20project='+_0x4a2430);}const _0x4d5381=_0xe2d060[_0x4c5ec2(0x1e3)],_0x2cf3dc=_0xe2d060[_0x4c5ec2(0x1c7)];if(_0x4d5381){_0x2cf3dc&&console[_0x4c5ec2(0x23b)](a55_0x1e0863[_0x4c5ec2(0x1c4)](_0x4c5ec2(0x294)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x4aa620=_0xe2d060[_0x4c5ec2(0x1c5)];return _0x4aa620?await this[_0x4c5ec2(0x198)](_0x594680,_0x4d5381):await this[_0x4c5ec2(0x11e)](_0x594680,_0x4d5381,_0xe2d060),0x0;}if(_0x2cf3dc){const _0x1fc6ab=await withSpinner(_0x4c5ec2(0x18e),()=>_0x4ccc93[_0x4c5ec2(0x298)]['sessions']({'projectName':_0x4a2430,'workflowName':_0xeaaaf5,'limit':0x64}),{'verbose':_0xe2d060[_0x4c5ec2(0x230)]}),_0x29ba99=_0x1fc6ab[_0x4c5ec2(0x1ac)][_0x4c5ec2(0x16e)](_0x478a70=>_0x478a70['id']===_0x2cf3dc);if(!_0x29ba99)return console['error'](a55_0x1e0863[_0x4c5ec2(0x12c)](_0x4c5ec2(0x168)),_0x4c5ec2(0x273)+_0x2cf3dc),0x1;if(!_0x29ba99[_0x4c5ec2(0x183)]?.['id'])return console[_0x4c5ec2(0x23b)](a55_0x1e0863[_0x4c5ec2(0x12c)]('Error:'),_0x4c5ec2(0x128)+_0x2cf3dc+_0x4c5ec2(0x193)),0x1;const _0x57c554=_0x29ba99[_0x4c5ec2(0x183)]['id'];_0xe2d060['verbose']&&console['error'](_0x4c5ec2(0x297)+_0x57c554+_0x4c5ec2(0x237)+_0x2cf3dc);const _0xb7d4c3=_0xe2d060[_0x4c5ec2(0x1c5)];return _0xb7d4c3?await this[_0x4c5ec2(0x198)](_0x594680,_0x57c554):await this[_0x4c5ec2(0x11e)](_0x594680,_0x57c554,_0xe2d060),0x0;}const _0x3e553b=await withSpinner(_0x4c5ec2(0x151),()=>_0x4ccc93[_0x4c5ec2(0x298)][_0x4c5ec2(0x1d2)]({'projectName':_0x4a2430,'workflowName':_0xeaaaf5,'limit':_0xe2d060[_0x4c5ec2(0x1c3)]||0x32}),{'verbose':_0xe2d060[_0x4c5ec2(0x230)]}),_0x532435=_0x3e553b[_0x4c5ec2(0x1ac)];if(_0x532435[_0x4c5ec2(0x1d0)]===0x0){if(_0x4a2430&&_0xeaaaf5)console[_0x4c5ec2(0x23b)]('No\x20sessions\x20found\x20for:\x20'+_0x4a2430+'.'+_0xeaaaf5);else _0x4a2430?console[_0x4c5ec2(0x23b)](_0x4c5ec2(0x1de)+_0x4a2430):(console[_0x4c5ec2(0x23b)](_0x4c5ec2(0x206)),console[_0x4c5ec2(0x23b)](a55_0x1e0863['dim'](_0x4c5ec2(0x1b4))));return 0x0;}_0x532435[_0x4c5ec2(0x155)]((_0x1bde16,_0x447ce6)=>{const _0x3c1231=_0x4c5ec2,_0x484cdc=_0x1bde16[_0x3c1231(0x219)]||'',_0x297f4f=_0x447ce6[_0x3c1231(0x219)]||'';return _0x297f4f[_0x3c1231(0x255)](_0x484cdc);});if(_0xe2d060['json']||_0xe2d060[_0x4c5ec2(0x207)])return await handleSDKOutput(_0x532435,_0xe2d060),0x0;let _0x123763;if(_0xd9006d){const _0x24263f=_0x532435[0x0];if(!_0x24263f[_0x4c5ec2(0x183)]?.['id'])return console['error'](_0x4c5ec2(0x288)),0x0;_0x123763=_0x24263f[_0x4c5ec2(0x183)]['id'],_0xe2d060[_0x4c5ec2(0x230)]&&console[_0x4c5ec2(0x23b)](_0x4c5ec2(0x2bf)+_0x24263f[_0x4c5ec2(0x219)]);}else{const _0x27a069=_0x532435[_0x4c5ec2(0x197)](_0x1f770b=>{const _0x11ad82=_0x4c5ec2,_0x5ae737=getAttemptStatusDisplay(_0x1f770b[_0x11ad82(0x183)]);return{'title':_0x1f770b[_0x11ad82(0x134)]?.[_0x11ad82(0x152)]+'.'+_0x1f770b[_0x11ad82(0x298)]?.['name']+_0x11ad82(0x261)+_0x1f770b[_0x11ad82(0x219)]+'\x20'+_0x5ae737[_0x11ad82(0x144)],'value':_0x1f770b[_0x11ad82(0x183)]?.['id']||'','description':_0x5ae737['text']};}),_0x214c77=await a55_0x2c95a7({'type':'select','name':'attemptId','message':_0x4c5ec2(0x1fe),'choices':_0x27a069[_0x4c5ec2(0x13b)](_0x33b099=>_0x33b099['value']!=='')});if(!_0x214c77['attemptId'])return 0x0;_0x123763=_0x214c77[_0x4c5ec2(0x1e3)];}const _0x2a2e18=_0xe2d060[_0x4c5ec2(0x1c5)];return _0x2a2e18?await this[_0x4c5ec2(0x198)](_0x594680,_0x123763):await this[_0x4c5ec2(0x11e)](_0x594680,_0x123763,_0xe2d060),0x0;}async[a55_0x1fefeb(0x11e)](_0x18ca6d,_0x1bcf18,_0x106f39){const _0x632ded=a55_0x1fefeb,{tdx:_0x5649e5}=_0x18ca6d;let _0x46413d,_0x2be041;try{[_0x46413d,_0x2be041]=await Promise[_0x632ded(0x254)]([_0x5649e5[_0x632ded(0x298)][_0x632ded(0x27b)](_0x1bcf18),_0x5649e5[_0x632ded(0x298)][_0x632ded(0x26e)](_0x1bcf18,![])]);}catch(_0x2059b1){console[_0x632ded(0x23b)](a55_0x1e0863[_0x632ded(0x12c)](_0x632ded(0x165)));_0x106f39[_0x632ded(0x230)]&&console['error'](_0x2059b1);throw _0x2059b1;}if(_0x106f39[_0x632ded(0x2c7)]||_0x106f39[_0x632ded(0x207)]){const _0x652706=this[_0x632ded(0x136)](_0x46413d,_0x2be041);await handleSDKOutput([_0x652706],_0x106f39);return;}const _0x44551f=_0x5649e5[_0x632ded(0x299)]['site'],_0x5ba987=this[_0x632ded(0x2c2)](_0x46413d,_0x2be041,_0x44551f);console[_0x632ded(0x1e8)](_0x5ba987);}async['pollTimeline'](_0x480d6b,_0x1eb060){const _0x99b57f=a55_0x1fefeb,{tdx:_0x56851b}=_0x480d6b,_0x4595bc=TIMELINE_CONFIG[_0x99b57f(0x1f5)],_0x3b7d9d=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x41dc3c=0x0;while(_0x41dc3c<_0x3b7d9d){process['stdout'][_0x99b57f(0x12b)]&&process['stdout'][_0x99b57f(0x1ab)]('\x1bc');let _0x38a95e,_0x31e143;try{[_0x38a95e,_0x31e143]=await Promise[_0x99b57f(0x254)]([_0x56851b['workflow']['attempt'](_0x1eb060),_0x56851b[_0x99b57f(0x298)][_0x99b57f(0x26e)](_0x1eb060,![])]);}catch(_0x37acfa){console[_0x99b57f(0x23b)](a55_0x1e0863[_0x99b57f(0x12c)](_0x99b57f(0x2b0)));_0x41dc3c>0x0&&console[_0x99b57f(0x23b)](a55_0x1e0863[_0x99b57f(0x182)](_0x99b57f(0x2c5)+_0x41dc3c));throw _0x37acfa;}const _0x58c715=_0x56851b[_0x99b57f(0x299)]['site'],_0x1dee8e=this[_0x99b57f(0x2c2)](_0x38a95e,_0x31e143,_0x58c715);console[_0x99b57f(0x1e8)](_0x1dee8e);const _0x569cc4=_0x38a95e['done']&&_0x31e143[_0x99b57f(0x23f)](_0x13b7b0=>_0x13b7b0[_0x99b57f(0x14f)]!=='running'&&_0x13b7b0['state']!==_0x99b57f(0x189));if(_0x569cc4){console['error'](a55_0x1e0863[_0x99b57f(0x1e9)](_0x99b57f(0x24e)));break;}console[_0x99b57f(0x23b)](a55_0x1e0863[_0x99b57f(0x182)](_0x99b57f(0x1dd)+_0x41dc3c*0x2+_0x99b57f(0x2c0))),await new Promise(_0x33ced9=>setTimeout(_0x33ced9,_0x4595bc)),_0x41dc3c++;}_0x41dc3c>=_0x3b7d9d&&console[_0x99b57f(0x23b)](a55_0x1e0863[_0x99b57f(0x1c4)](_0x99b57f(0x15d)));}[a55_0x1fefeb(0x2c2)](_0x3e9a64,_0x58a5d5,_0x1997da){const _0x38d18a=a55_0x1fefeb,_0x2c8a45=[],_0x101c32=TIMELINE_CONFIG[_0x38d18a(0x2b6)],_0x2affaa=0x5,_0x122169=process[_0x38d18a(0x1a4)][_0x38d18a(0x25c)]||0x78,_0x188a06=_0x122169-_0x101c32-_0x2affaa,_0x1e2065=Math[_0x38d18a(0x2ad)](TIMELINE_CONFIG[_0x38d18a(0x265)],Math[_0x38d18a(0x24c)](_0x188a06,TIMELINE_CONFIG[_0x38d18a(0x149)])),_0x5cdbe9=new Date(_0x3e9a64[_0x38d18a(0x1ec)])[_0x38d18a(0x247)](),_0x4e9acc=_0x3e9a64[_0x38d18a(0x225)]?new Date(_0x3e9a64['finishedAt'])[_0x38d18a(0x247)]():Date[_0x38d18a(0x1e0)](),_0x1a8b9d={'start':_0x5cdbe9,'end':_0x4e9acc,'duration':_0x4e9acc-_0x5cdbe9},_0x536288=new Map(),_0x415c9f=[];for(const _0x1b365c of _0x58a5d5){if(_0x1b365c[_0x38d18a(0x239)]){const _0x1aba38=new Date(_0x1b365c[_0x38d18a(0x239)])[_0x38d18a(0x247)](),_0x29213e=_0x1b365c[_0x38d18a(0x24b)]?new Date(_0x1b365c[_0x38d18a(0x24b)])[_0x38d18a(0x247)]():Date[_0x38d18a(0x1e0)](),_0x33b012={'start':_0x1aba38,'end':_0x29213e,'duration':_0x29213e-_0x1aba38};_0x536288['set'](_0x1b365c['id'],_0x33b012),_0x415c9f[_0x38d18a(0x215)]({'name':_0x1b365c[_0x38d18a(0x19d)],'state':_0x1b365c[_0x38d18a(0x14f)]||_0x38d18a(0x19c),'window':_0x33b012});}else _0x415c9f['push']({'name':_0x1b365c[_0x38d18a(0x19d)],'state':_0x1b365c[_0x38d18a(0x14f)]||_0x38d18a(0x189),'window':undefined});}_0x415c9f[_0x38d18a(0x155)]((_0x154a7f,_0x4bea6f)=>{const _0x383a56=_0x38d18a;if(!_0x154a7f[_0x383a56(0x1bc)])return 0x1;if(!_0x4bea6f[_0x383a56(0x1bc)])return-0x1;return _0x154a7f[_0x383a56(0x1bc)][_0x383a56(0x25d)]-_0x4bea6f[_0x383a56(0x1bc)][_0x383a56(0x25d)];});const _0x4e481e=_0x415c9f[_0x38d18a(0x1d0)],_0x5319d7=_0x4e481e>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x5319d7&&_0x415c9f[_0x38d18a(0x293)](TIMELINE_CONFIG[_0x38d18a(0x171)]);const _0x3fd5a9=calculateTimeScale(_0x1a8b9d,_0x1e2065),_0x27eb1c=_0x3e9a64[_0x38d18a(0x1c1)]?_0x3e9a64['success']?a55_0x1e0863[_0x38d18a(0x1e9)](_0x38d18a(0x19e)):a55_0x1e0863['red'](_0x38d18a(0x23b)):a55_0x1e0863[_0x38d18a(0x17c)](_0x38d18a(0x29c)),_0x21bade=_0x3e9a64[_0x38d18a(0x134)]?.['id'],_0x129727=_0x3e9a64['sessionId'];let _0xc30312;if(_0x21bade&&_0x129727){const _0x348e4b=getWorkflowAttemptUrl(_0x1997da,_0x21bade,_0x129727,_0x3e9a64['id']);_0xc30312=hyperlink(a55_0x1e0863['dim'](_0x3e9a64['id']),_0x348e4b);}else _0xc30312=a55_0x1e0863['dim'](_0x3e9a64['id']);_0x2c8a45[_0x38d18a(0x215)](_0x38d18a(0x1a2)+_0xc30312+'\x20-\x20'+_0x27eb1c+_0x38d18a(0x261)+formatElapsed(_0x1a8b9d['duration']));if(_0x415c9f['length']>0x0){const _0x32b8a1=renderTimeAxis(_0x3fd5a9,_0x1e2065),_0x1baf78=new Date(_0x1a8b9d[_0x38d18a(0x25d)]),_0x2f3858=formatDate(_0x1baf78),_0x411d85=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x38d18a(0x295)]+_0x101c32,_0x27252b=_0x2f3858[_0x38d18a(0x22f)](_0x411d85),_0x234ffe=a55_0x1e0863[_0x38d18a(0x182)](_0x27252b);_0x2c8a45[_0x38d18a(0x215)](_0x234ffe+'\x20'+_0x32b8a1);for(const _0x492acb of _0x415c9f){_0x2c8a45[_0x38d18a(0x215)](renderTaskRow(_0x492acb,_0x3fd5a9,_0x1e2065,_0x101c32));}const _0xc8c30=calculateStats(_0x415c9f);_0x2c8a45['push'](formatStats(_0xc8c30)),_0x5319d7&&_0x2c8a45['push'](a55_0x1e0863[_0x38d18a(0x1c4)](_0x38d18a(0x280)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x38d18a(0x195)+_0x4e481e+_0x38d18a(0x252))),_0x2c8a45[_0x38d18a(0x215)](''),_0x2c8a45['push'](a55_0x1e0863[_0x38d18a(0x182)](_0x38d18a(0x1b9))+('tdx\x20wf\x20attempt\x20'+_0x3e9a64['id']+'\x20logs')+a55_0x1e0863[_0x38d18a(0x182)]('\x20to\x20see\x20detailed\x20logs'));}else _0x2c8a45[_0x38d18a(0x215)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x2c8a45[_0x38d18a(0x25e)]('\x0a');}[a55_0x1fefeb(0x136)](_0x5d1fd5,_0x55b129){const _0x134879=a55_0x1fefeb,_0x33fefd=new Date(_0x5d1fd5['createdAt'])['getTime'](),_0x15b796=_0x5d1fd5[_0x134879(0x225)]?new Date(_0x5d1fd5[_0x134879(0x225)])[_0x134879(0x247)]():Date['now'](),_0x28f4ab=_0x15b796-_0x33fefd,_0x3c1590=[];for(const _0x7c8697 of _0x55b129){if(_0x7c8697[_0x134879(0x239)]){const _0x533be9=new Date(_0x7c8697[_0x134879(0x239)])[_0x134879(0x247)](),_0x8ffef4=_0x7c8697[_0x134879(0x24b)]?new Date(_0x7c8697['updatedAt'])[_0x134879(0x247)]():Date[_0x134879(0x1e0)]();_0x3c1590[_0x134879(0x215)]({'name':_0x7c8697[_0x134879(0x19d)],'state':_0x7c8697['state']||_0x134879(0x19c),'window':{'start':_0x533be9,'end':_0x8ffef4,'duration':_0x8ffef4-_0x533be9}});}else _0x3c1590['push']({'name':_0x7c8697['fullName'],'state':_0x7c8697[_0x134879(0x14f)]||_0x134879(0x189),'window':undefined});}const _0x2a328b=calculateStats(_0x3c1590);return{'attempt':{'id':_0x5d1fd5['id'],'status':_0x5d1fd5['done']?_0x5d1fd5[_0x134879(0x19e)]?_0x134879(0x19e):_0x134879(0x23b):_0x134879(0x29c),'createdAt':_0x5d1fd5['createdAt'],'finishedAt':_0x5d1fd5['finishedAt'],'duration_ms':_0x28f4ab},'tasks':_0x3c1590[_0x134879(0x197)](_0x5c2795=>({'name':_0x5c2795[_0x134879(0x152)],'state':_0x5c2795[_0x134879(0x14f)],'startedAt':_0x5c2795[_0x134879(0x1bc)]?new Date(_0x5c2795[_0x134879(0x1bc)][_0x134879(0x25d)])[_0x134879(0x200)]():null,'updatedAt':_0x5c2795[_0x134879(0x1bc)]?new Date(_0x5c2795[_0x134879(0x1bc)]['end'])[_0x134879(0x200)]():null,'duration_ms':_0x5c2795['window']?.[_0x134879(0x119)]||null})),'stats':_0x2a328b};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55dce6,_0x39c9d2){const _0x1b590a=a56_0x39e2,_0x327655=_0x55dce6();while(!![]){try{const _0x50495f=-parseInt(_0x1b590a(0x1e0))/0x1+-parseInt(_0x1b590a(0x1df))/0x2+-parseInt(_0x1b590a(0x1e2))/0x3*(-parseInt(_0x1b590a(0x1d1))/0x4)+parseInt(_0x1b590a(0x1de))/0x5*(parseInt(_0x1b590a(0x1d5))/0x6)+parseInt(_0x1b590a(0x1dc))/0x7+-parseInt(_0x1b590a(0x1d0))/0x8*(-parseInt(_0x1b590a(0x1db))/0x9)+parseInt(_0x1b590a(0x1e1))/0xa*(-parseInt(_0x1b590a(0x1d2))/0xb);if(_0x50495f===_0x39c9d2)break;else _0x327655['push'](_0x327655['shift']());}catch(_0x562ec2){_0x327655['push'](_0x327655['shift']());}}}(a56_0x595c,0x7c16a));import{platform}from'os';function a56_0x39e2(_0x42e86f,_0x531175){_0x42e86f=_0x42e86f-0x1d0;const _0x595c8d=a56_0x595c();let _0x39e229=_0x595c8d[_0x42e86f];return _0x39e229;}function a56_0x595c(){const _0x15db7b=['99mjxeAo','Authorization','tdx','54Ownfeg','replace','Bearer\x20','length',';\x20node/','entries','6362001hXQXPQ','4065299DCjcRm','TD1\x20','146530nDMkFk','1739410EvnyiW','74610IcBotB','1129380TEwTVw','1281FzZkRK','X-Trino-User','version','8KXkKxE','8596qjIGtT'];a56_0x595c=function(){return _0x15db7b;};return a56_0x595c();}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x38a9dd=a56_0x39e2,_0x3b311d=getVersion(),_0x2b1a25=platform(),_0x55afbd=process[_0x38a9dd(0x1e4)][_0x38a9dd(0x1d6)]('v','');return'tdx/'+_0x3b311d+'\x20('+_0x2b1a25+_0x38a9dd(0x1d9)+_0x55afbd+')';}export function getAuthHeaders(_0x1dfddd,_0xbf0e37,_0x3997fa){const _0x15b460=a56_0x39e2,_0x4c5367=getVersion(),_0x3dea75={'User-Agent':getUserAgent(),'X-TD-Client':_0x15b460(0x1d4),'X-TD-Client-Version':_0x4c5367};if(_0x3997fa)_0x3dea75[_0x15b460(0x1d3)]='Bearer\x20'+_0x3997fa;else _0xbf0e37&&(_0x3dea75[_0x15b460(0x1d3)]=_0x15b460(0x1dd)+_0xbf0e37);return _0x3dea75;}export function toHeaderRecord(_0x153e38){const _0x3a2e0e=a56_0x39e2,_0xf91533={};for(const [_0xd19e8f,_0x581dac]of Object[_0x3a2e0e(0x1da)](_0x153e38)){_0x581dac!==undefined&&(_0xf91533[_0xd19e8f]=_0x581dac);}return _0xf91533;}export function getTrinoHeaders(_0x12ba60,_0x180b64,_0x422252){const _0x5d039e=a56_0x39e2,_0x50be1c=getAuthHeaders(_0x12ba60),_0x2f9996=toHeaderRecord(_0x50be1c);if(_0x422252)_0x2f9996[_0x5d039e(0x1d3)]=_0x5d039e(0x1d7)+_0x422252;else _0x180b64&&(_0x2f9996[_0x5d039e(0x1e3)]=_0x180b64);return _0x2f9996;}export function hasAPIKey(_0x584747){const _0x381b8a=a56_0x39e2,_0x11bcee=getAPIKey();return _0x11bcee!==undefined&&_0x11bcee[_0x381b8a(0x1d8)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x37eea4,_0x56590a){const _0x5e3ba9=a57_0x4e14,_0x20c132=_0x37eea4();while(!![]){try{const _0xa3127a=-parseInt(_0x5e3ba9(0xcc))/0x1*(-parseInt(_0x5e3ba9(0xab))/0x2)+-parseInt(_0x5e3ba9(0x94))/0x3*(parseInt(_0x5e3ba9(0xc1))/0x4)+parseInt(_0x5e3ba9(0x99))/0x5+-parseInt(_0x5e3ba9(0xc7))/0x6*(parseInt(_0x5e3ba9(0xbd))/0x7)+-parseInt(_0x5e3ba9(0xb3))/0x8+-parseInt(_0x5e3ba9(0xc4))/0x9*(parseInt(_0x5e3ba9(0xb1))/0xa)+parseInt(_0x5e3ba9(0xa3))/0xb*(parseInt(_0x5e3ba9(0x9b))/0xc);if(_0xa3127a===_0x56590a)break;else _0x20c132['push'](_0x20c132['shift']());}catch(_0x5a1e78){_0x20c132['push'](_0x20c132['shift']());}}}(a57_0x34f5,0xd063d));import{writeFileSync}from'fs';function a57_0x34f5(){const _0x23db22=['varchar','stringify','jsonl','4408200KraEWp','bigint','21552abSMvM','bold','query','[logs]','limit','magenta','slice','debug','13453SaxUSC','isInteger','FINISHED','[rule]','string','data','split','stdout','2099572UkyzGJ','join','length','isTTY','trim','cmdout','230eGKxzh','blue','3814552jYUEvq','─┴─','isFinite','[Object]','stdin','object','double','padEnd','log','write','7wxhlkr','tsv','error','keys','4LgHNiR','max','filter','427995ZFrSYr','[error]','forEach','4775754SYnadv','spawn','resolve','noColor','Results\x20saved\x20to\x20','1lXDvCd','repeat','format','yellow','output','push','boolean','color','sdk-result','map','─┬─','limitStructuredFormats','list','rule','table','json','pipe','entries','cyan','stderr','2723478dZaoAp','number'];a57_0x34f5=function(){return _0x23db22;};return a57_0x34f5();}import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a57_0x1e7aae from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x5d6104){const _0x509363=a57_0x4e14;return _0x5d6104[_0x509363(0x82)]==='json'||_0x5d6104[_0x509363(0x82)]===_0x509363(0x98)||_0x5d6104[_0x509363(0x82)]==='tsv'||_0x5d6104['format']===_0x509363(0x8e)||_0x5d6104[_0x509363(0x8f)]===!![]||_0x5d6104['jsonl']===!![]||_0x5d6104['tsv']===!![]||_0x5d6104[_0x509363(0x8e)]===!![];}function a57_0x4e14(_0x255632,_0x3a4a20){_0x255632=_0x255632-0x81;const _0x34f567=a57_0x34f5();let _0x4e14ab=_0x34f567[_0x255632];return _0x4e14ab;}export function parseOutputOptions(_0x322781){const _0x5719b0=a57_0x4e14;return{'format':_0x322781[_0x5719b0(0x82)]||_0x5719b0(0x8e),'output':_0x322781[_0x5719b0(0x84)]||'','limit':_0x322781[_0x5719b0(0x9f)],'limitStructuredFormats':_0x322781[_0x5719b0(0x8b)],'color':_0x322781[_0x5719b0(0x87)],'noColor':_0x322781[_0x5719b0(0xca)]};}function convertSDKResultToQueryResult(_0xdd6912){const _0x2cd35e=a57_0x4e14,_0x5c670e=[];if(_0xdd6912['length']>0x0){const _0x5737f8=_0xdd6912[0x0];for(const [_0x51aef9,_0x5d829a]of Object[_0x2cd35e(0x91)](_0x5737f8)){let _0x541d89=_0x2cd35e(0x96);if(typeof _0x5d829a===_0x2cd35e(0x95))_0x541d89=Number[_0x2cd35e(0xa4)](_0x5d829a)?_0x2cd35e(0x9a):_0x2cd35e(0xb9);else{if(typeof _0x5d829a===_0x2cd35e(0x86))_0x541d89=_0x2cd35e(0x86);else _0x5d829a===null&&(_0x541d89='varchar');}_0x5c670e[_0x2cd35e(0x85)]({'name':_0x51aef9,'type':_0x541d89});}}return{'queryId':_0x2cd35e(0x88),'columns':_0x5c670e,'data':_0xdd6912,'stats':{'state':_0x2cd35e(0xa5),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0xdd6912['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x5bc50f,_0xed433f){const _0x3b44d0=convertSDKResultToQueryResult(_0x5bc50f);return formatQueryOutput(_0x3b44d0,_0xed433f);}export async function formatQueryOutput(_0x49f2ed,_0x48f90b){const _0x52801e=a57_0x4e14,{format:_0x2307eb,limit:_0x8281b2,output:_0x423895,color:_0x120c05,noColor:_0xfc1a6,limitStructuredFormats:_0x1dad4e}=_0x48f90b,_0x3f42d0=Boolean(_0x423895)&&!_0x120c05,_0x3a3de8={'color':_0x120c05,'noColor':_0xfc1a6||_0x3f42d0};if(_0x2307eb==='table'){const _0x19dff5=shouldUseLess(_0x2307eb,_0x423895);return formatAsTable(_0x49f2ed,_0x8281b2,_0x19dff5,_0x3a3de8);}const _0x3325a7=_0x1dad4e&&Number[_0x52801e(0xb5)](_0x8281b2)&&_0x49f2ed[_0x52801e(0xa8)][_0x52801e(0xad)]>_0x8281b2?{..._0x49f2ed,'data':_0x49f2ed[_0x52801e(0xa8)][_0x52801e(0xa1)](0x0,_0x8281b2)}:_0x49f2ed;if(_0x2307eb==='json')return formatAsJSON(_0x3325a7,_0x3a3de8);else return _0x2307eb===_0x52801e(0x98)?formatAsJSONL(_0x3325a7,_0x3a3de8):formatQueryResult(_0x3325a7,_0x2307eb);}function shouldUseLess(_0x4abca3,_0x579ae3){const _0x242e2d=a57_0x4e14;return(_0x4abca3==='table'||_0x4abca3===_0x242e2d(0x8c))&&process[_0x242e2d(0xaa)][_0x242e2d(0xae)]&&!_0x579ae3;}export function resolveOutputOptions(_0x3c9cc7){const _0x3b09ed=a57_0x4e14,_0x27a544=_0x3c9cc7['output']||'',_0x2888ce=resolveOutputFormat(_0x3c9cc7[_0x3b09ed(0x82)],_0x27a544,_0x3b09ed(0x8e));let _0x337bbb=typeof _0x3c9cc7[_0x3b09ed(0x9f)]==='number'?_0x3c9cc7['limit']:parseInt(_0x3c9cc7['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x3c9cc7[_0x3b09ed(0x9f)]===undefined&&shouldUseLess(_0x2888ce,_0x27a544)&&(_0x337bbb=Infinity),{'format':_0x2888ce,'output':_0x27a544,'limit':_0x337bbb,'limitStructuredFormats':_0x3c9cc7[_0x3b09ed(0x8b)],'color':_0x3c9cc7[_0x3b09ed(0x87)],'noColor':_0x3c9cc7['noColor']};}export function writeOutput(_0xe71efc,_0x364287,_0x5774c8){const _0x4a8b19=a57_0x4e14;return _0x364287?(writeFileSync(_0x364287,_0xe71efc),console[_0x4a8b19(0xbf)](_0x4a8b19(0xcb)+_0x364287),Promise[_0x4a8b19(0xc9)]()):shouldUseLess(_0x5774c8||'','')?new Promise(_0x498e06=>{const _0x3d993a=_0x4a8b19,_0x11e667=spawn('less',['-FXRSn'],{'stdio':[_0x3d993a(0x90),'inherit','inherit']});let _0x324023=![];_0x11e667['on']('error',()=>{const _0x29f8a0=_0x3d993a;!_0x324023&&(_0x324023=!![],console[_0x29f8a0(0xbb)](_0xe71efc),_0x498e06());}),_0x11e667['on']('close',()=>{!_0x324023&&(_0x324023=!![],_0x498e06());}),_0x11e667['on'](_0x3d993a(0xc8),()=>{const _0x2f1182=_0x3d993a;!_0x324023&&_0x11e667[_0x2f1182(0xb7)]&&(_0x11e667[_0x2f1182(0xb7)]['on']('error',()=>{}),_0x11e667['stdin'][_0x2f1182(0xbc)](_0xe71efc),_0x11e667[_0x2f1182(0xb7)]['end']());}),!_0x11e667[_0x3d993a(0xb7)]&&(!_0x324023&&(_0x324023=!![],console[_0x3d993a(0xbb)](_0xe71efc),_0x498e06()));}):(console[_0x4a8b19(0xbb)](_0xe71efc),Promise['resolve']());}export async function handleSDKOutput(_0x55d43a,_0x2b3909){const _0x2b0c00=a57_0x4e14,_0x540320=resolveOutputOptions(_0x2b3909),_0xb99e5b=await formatSDKOutput(_0x55d43a,_0x540320);await writeOutput(_0xb99e5b,_0x540320[_0x2b0c00(0x84)]||undefined,_0x540320[_0x2b0c00(0x82)]);}export async function handleQueryOutput(_0x4ae5bd,_0x1ffd44){const _0x4c80d8=a57_0x4e14,_0x7ce643=resolveOutputOptions(_0x1ffd44),_0x429ca7=await formatQueryOutput(_0x4ae5bd,_0x7ce643);await writeOutput(_0x429ca7,_0x7ce643[_0x4c80d8(0x84)]||undefined,_0x7ce643[_0x4c80d8(0x82)]);}async function formatSingleObject(_0xf816b8,_0x4eca14){const _0x3bca48=a57_0x4e14,{format:_0x3e1c14,color:_0x517204,noColor:_0x2f8039}=_0x4eca14,_0x51ecab={'color':_0x517204,'noColor':_0x2f8039};if(_0x3e1c14==='json'){if(shouldUseColor(_0x51ecab))return colorizeJSON(_0xf816b8,_0x51ecab);return JSON[_0x3bca48(0x97)](_0xf816b8,null,0x2);}else{if(_0x3e1c14===_0x3bca48(0x98)){if(shouldUseColor(_0x51ecab))return colorizeJSONCompact(_0xf816b8,_0x51ecab);return JSON['stringify'](_0xf816b8);}else{if(_0x3e1c14===_0x3bca48(0xbe))return Object['entries'](_0xf816b8)[_0x3bca48(0x89)](([_0x2399c1,_0x178d40])=>_0x2399c1+'\x09'+_0x178d40)[_0x3bca48(0xac)]('\x0a');else{const _0x1014af=Object[_0x3bca48(0x91)](_0xf816b8);if(_0x1014af[_0x3bca48(0xad)]===0x0)return'No\x20data';const _0x11ae7e=_0xf816b8[_0x3bca48(0xa2)],_0x21e1b2=_0xf816b8[_0x3bca48(0x9d)],_0x32b96a=_0xf816b8['params'],_0x268dc4=_0xf816b8[_0x3bca48(0x8d)],_0x296416=_0x21e1b2?typeof _0x21e1b2===_0x3bca48(0xa7)?_0x21e1b2:JSON[_0x3bca48(0x97)](_0x21e1b2,null,0x2):undefined,_0xdc3f2=_0x32b96a&&Object['keys'](_0x32b96a)[_0x3bca48(0xad)]>0x0?JSON['stringify'](_0x32b96a,null,0x2):undefined,_0x3a5e6b=_0x268dc4&&Object[_0x3bca48(0xc0)](_0x268dc4)[_0x3bca48(0xad)]>0x0?JSON['stringify'](_0x268dc4,null,0x2):undefined,_0x33a21b=_0x1014af[_0x3bca48(0xc3)](([_0x2ce27a])=>_0x2ce27a!==_0x3bca48(0xa2)&&_0x2ce27a!==_0x3bca48(0x9d)&&_0x2ce27a!=='params'&&_0x2ce27a!==_0x3bca48(0x8d)),_0x5b3e7a=Math[_0x3bca48(0xc2)](..._0x33a21b[_0x3bca48(0x89)](([_0x317fe1])=>_0x317fe1[_0x3bca48(0xad)])),_0x2336a2=Math[_0x3bca48(0xc2)](..._0x33a21b[_0x3bca48(0x89)](([,_0x4a4a81])=>{const _0x5c543e=_0x3bca48;try{const _0x4e3bb7=_0x4a4a81===null||_0x4a4a81===undefined?'':typeof _0x4a4a81===_0x5c543e(0xb8)?JSON[_0x5c543e(0x97)](_0x4a4a81):String(_0x4a4a81),_0x3f019c=_0x4e3bb7[_0x5c543e(0xa9)]('\x0a');return Math[_0x5c543e(0xc2)](..._0x3f019c[_0x5c543e(0x89)](_0x3696c8=>_0x3696c8[_0x5c543e(0xad)]),0x0);}catch{return 0x0;}}),0x14),_0x57ce27=[];_0x57ce27[_0x3bca48(0x85)](colorBorder('┌─'+'─'['repeat'](_0x5b3e7a)+_0x3bca48(0x8a)+'─'[_0x3bca48(0x81)](_0x2336a2)+'─┐',_0x51ecab)),_0x33a21b[_0x3bca48(0xc6)](([_0x3f6d70,_0xbd3e3e])=>{const _0x5e212d=_0x3bca48;let _0x5dda83;try{_0x5dda83=_0xbd3e3e===null||_0xbd3e3e===undefined?'':typeof _0xbd3e3e===_0x5e212d(0xb8)?JSON[_0x5e212d(0x97)](_0xbd3e3e):String(_0xbd3e3e);}catch{_0x5dda83=_0x5e212d(0xb6);}const _0xd455cc=_0x3f6d70['padEnd'](_0x5b3e7a),_0x200771=_0x5dda83[_0x5e212d(0xa9)]('\x0a');_0x200771[_0x5e212d(0xc6)]((_0x3b0caa,_0x14a957)=>{const _0x2e00a7=_0x5e212d,_0x3fde4e=colorBorder('│',_0x51ecab);_0x14a957===0x0?_0x57ce27[_0x2e00a7(0x85)](_0x3fde4e+'\x20'+_0xd455cc+'\x20'+_0x3fde4e+'\x20'+_0x3b0caa[_0x2e00a7(0xba)](_0x2336a2)+'\x20'+_0x3fde4e):_0x57ce27[_0x2e00a7(0x85)](_0x3fde4e+'\x20'+'\x20'['repeat'](_0x5b3e7a)+'\x20'+_0x3fde4e+'\x20'+_0x3b0caa[_0x2e00a7(0xba)](_0x2336a2)+'\x20'+_0x3fde4e);});}),_0x57ce27[_0x3bca48(0x85)](colorBorder('└─'+'─'[_0x3bca48(0x81)](_0x5b3e7a)+_0x3bca48(0xb4)+'─'['repeat'](_0x2336a2)+'─┘',_0x51ecab));_0x296416&&(_0x57ce27[_0x3bca48(0x85)](''),_0x57ce27[_0x3bca48(0x85)](String(a57_0x1e7aae[_0x3bca48(0x83)]['bold']('[query]'))),_0x57ce27[_0x3bca48(0x85)](_0x296416));_0xdc3f2&&(_0x57ce27[_0x3bca48(0x85)](''),_0x57ce27[_0x3bca48(0x85)](String(a57_0x1e7aae[_0x3bca48(0xb2)][_0x3bca48(0x9c)]('[params]'))),_0x57ce27[_0x3bca48(0x85)](_0xdc3f2));_0x3a5e6b&&(_0x57ce27[_0x3bca48(0x85)](''),_0x57ce27[_0x3bca48(0x85)](String(a57_0x1e7aae[_0x3bca48(0xa0)]['bold'](_0x3bca48(0xa6)))),_0x57ce27[_0x3bca48(0x85)](_0x3a5e6b));if(_0x11ae7e){if(_0x11ae7e[_0x3bca48(0x93)]){_0x57ce27['push'](''),_0x57ce27['push'](String(a57_0x1e7aae['red']['bold'](_0x3bca48(0xc5))));const _0x53702d=_0x11ae7e[_0x3bca48(0x93)]['split']('\x0a');_0x53702d['forEach'](_0x4f1ca6=>{_0x4f1ca6['trim']()&&_0x57ce27['push'](_0x4f1ca6);});}if(_0x11ae7e[_0x3bca48(0xb0)]){_0x57ce27[_0x3bca48(0x85)](''),_0x57ce27[_0x3bca48(0x85)](String(a57_0x1e7aae[_0x3bca48(0x92)][_0x3bca48(0x9c)](_0x3bca48(0x9e))));const _0x202e51=_0x11ae7e[_0x3bca48(0xb0)][_0x3bca48(0xa9)]('\x0a');_0x202e51[_0x3bca48(0xc6)](_0x21de0d=>{const _0x3d6495=_0x3bca48;_0x21de0d[_0x3d6495(0xaf)]()&&_0x57ce27[_0x3d6495(0x85)](_0x21de0d);});}}return _0x57ce27['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0xf73196,_0x21e9d3){const _0x28f39e=a57_0x4e14;if(_0x21e9d3[_0x28f39e(0x82)]===_0x28f39e(0x8e)){await handleSDKOutput([_0xf73196],_0x21e9d3);return;}const _0x42ae3a=resolveOutputOptions(_0x21e9d3),_0x22513a=await formatSingleObject(_0xf73196,_0x42ae3a);await writeOutput(_0x22513a,_0x42ae3a[_0x28f39e(0x84)]||undefined,_0x42ae3a[_0x28f39e(0x82)]);}
|
|
1
|
+
(function(_0x4e4a62,_0xd12a43){const _0x5c6f81=a57_0x307a,_0x281b74=_0x4e4a62();while(!![]){try{const _0x1e3e15=parseInt(_0x5c6f81(0x142))/0x1+parseInt(_0x5c6f81(0x119))/0x2+parseInt(_0x5c6f81(0x131))/0x3*(-parseInt(_0x5c6f81(0x125))/0x4)+parseInt(_0x5c6f81(0x11e))/0x5*(-parseInt(_0x5c6f81(0x137))/0x6)+-parseInt(_0x5c6f81(0x148))/0x7*(parseInt(_0x5c6f81(0x122))/0x8)+-parseInt(_0x5c6f81(0x12e))/0x9+parseInt(_0x5c6f81(0x115))/0xa*(parseInt(_0x5c6f81(0x14c))/0xb);if(_0x1e3e15===_0xd12a43)break;else _0x281b74['push'](_0x281b74['shift']());}catch(_0x5278e3){_0x281b74['push'](_0x281b74['shift']());}}}(a57_0x5cdc,0x44124));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 a57_0x5eb877 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x348b20){const _0x272e95=a57_0x307a;return _0x348b20[_0x272e95(0x143)]===_0x272e95(0x140)||_0x348b20[_0x272e95(0x143)]===_0x272e95(0x11b)||_0x348b20['format']==='tsv'||_0x348b20[_0x272e95(0x143)]===_0x272e95(0x128)||_0x348b20['json']===!![]||_0x348b20[_0x272e95(0x11b)]===!![]||_0x348b20[_0x272e95(0x149)]===!![]||_0x348b20[_0x272e95(0x128)]===!![];}export function parseOutputOptions(_0x14c7c9){const _0x57363c=a57_0x307a;return{'format':_0x14c7c9[_0x57363c(0x143)]||'table','output':_0x14c7c9['output']||'','limit':_0x14c7c9['limit'],'limitStructuredFormats':_0x14c7c9['limitStructuredFormats'],'color':_0x14c7c9[_0x57363c(0x12f)],'noColor':_0x14c7c9[_0x57363c(0x14a)]};}function a57_0x5cdc(){const _0x4bf27e=['padEnd','93970VuCjRz','keys','inherit','join','324012QiXzzb','spawn','jsonl','entries','[Object]','67345zjkKSp','[rule]','[error]','stdout','76696elRMpC','split','sdk-result','52YPVtzF','forEach','isFinite','table','error','-FXRSn','stdin','close','less','965205eNqqhB','color','trim','25422qVLqWN','data','[query]','stderr','No\x20data','bold','174lCZFra','Results\x20saved\x20to\x20','repeat','number','length','output','max','limit','bigint','json','cyan','179986TFejiv','format','query','params','log','isInteger','7LTjgEL','tsv','noColor','FINISHED','649rRlXWA','resolve','map','push','stringify','rule','varchar','blue','list','write','object','boolean','pipe','yellow','cmdout','─┬─','isTTY','slice','end'];a57_0x5cdc=function(){return _0x4bf27e;};return a57_0x5cdc();}function convertSDKResultToQueryResult(_0x9fce3f){const _0x1fd8a9=a57_0x307a,_0x31257e=[];if(_0x9fce3f[_0x1fd8a9(0x13b)]>0x0){const _0x4814f2=_0x9fce3f[0x0];for(const [_0x33aec8,_0x3443da]of Object[_0x1fd8a9(0x11c)](_0x4814f2)){let _0x259b7e=_0x1fd8a9(0x152);if(typeof _0x3443da===_0x1fd8a9(0x13a))_0x259b7e=Number[_0x1fd8a9(0x147)](_0x3443da)?_0x1fd8a9(0x13f):'double';else{if(typeof _0x3443da==='boolean')_0x259b7e=_0x1fd8a9(0x10c);else _0x3443da===null&&(_0x259b7e='varchar');}_0x31257e[_0x1fd8a9(0x14f)]({'name':_0x33aec8,'type':_0x259b7e});}}return{'queryId':_0x1fd8a9(0x124),'columns':_0x31257e,'data':_0x9fce3f,'stats':{'state':_0x1fd8a9(0x14b),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x9fce3f[_0x1fd8a9(0x13b)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x43673b,_0x2ba4de){const _0x30474b=convertSDKResultToQueryResult(_0x43673b);return formatQueryOutput(_0x30474b,_0x2ba4de);}export async function formatQueryOutput(_0x37eeb7,_0x52c3d2){const _0xafad96=a57_0x307a,{format:_0x4df16c,limit:_0x161fb0,output:_0x3f18ce,color:_0x9697cf,noColor:_0xfd94cb,limitStructuredFormats:_0x3031aa}=_0x52c3d2,_0x166be7=Boolean(_0x3f18ce)&&!_0x9697cf,_0xdd09d7={'color':_0x9697cf,'noColor':_0xfd94cb||_0x166be7};if(_0x4df16c==='table'){const _0x270a79=shouldUseLess(_0x4df16c,_0x3f18ce);return formatAsTable(_0x37eeb7,_0x161fb0,_0x270a79,_0xdd09d7);}const _0x4d7125=_0x3031aa&&Number[_0xafad96(0x127)](_0x161fb0)&&_0x37eeb7[_0xafad96(0x132)][_0xafad96(0x13b)]>_0x161fb0?{..._0x37eeb7,'data':_0x37eeb7['data'][_0xafad96(0x112)](0x0,_0x161fb0)}:_0x37eeb7;if(_0x4df16c==='json')return formatAsJSON(_0x4d7125,_0xdd09d7);else return _0x4df16c==='jsonl'?formatAsJSONL(_0x4d7125,_0xdd09d7):formatQueryResult(_0x4d7125,_0x4df16c);}function shouldUseLess(_0x504ca8,_0x332b1a){const _0x5b43ca=a57_0x307a;return(_0x504ca8===_0x5b43ca(0x128)||_0x504ca8===_0x5b43ca(0x154))&&process[_0x5b43ca(0x121)][_0x5b43ca(0x111)]&&!_0x332b1a;}export function resolveOutputOptions(_0xbffd2f){const _0x5e3bee=a57_0x307a,_0x4c3b89=_0xbffd2f['output']||'',_0x347a30=resolveOutputFormat(_0xbffd2f[_0x5e3bee(0x143)],_0x4c3b89,_0x5e3bee(0x128));let _0x537460=typeof _0xbffd2f[_0x5e3bee(0x13e)]===_0x5e3bee(0x13a)?_0xbffd2f[_0x5e3bee(0x13e)]:parseInt(_0xbffd2f['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0xbffd2f[_0x5e3bee(0x13e)]===undefined&&shouldUseLess(_0x347a30,_0x4c3b89)&&(_0x537460=Infinity),{'format':_0x347a30,'output':_0x4c3b89,'limit':_0x537460,'limitStructuredFormats':_0xbffd2f['limitStructuredFormats'],'color':_0xbffd2f[_0x5e3bee(0x12f)],'noColor':_0xbffd2f['noColor']};}export function writeOutput(_0x27d3b5,_0x32b69a,_0x36ae79){const _0x486a41=a57_0x307a;return _0x32b69a?(writeFileSync(_0x32b69a,_0x27d3b5),console[_0x486a41(0x129)](_0x486a41(0x138)+_0x32b69a),Promise[_0x486a41(0x14d)]()):shouldUseLess(_0x36ae79||'','')?new Promise(_0x30838f=>{const _0x4926fe=_0x486a41,_0x560ef0=spawn(_0x4926fe(0x12d),[_0x4926fe(0x12a)],{'stdio':[_0x4926fe(0x10d),_0x4926fe(0x117),_0x4926fe(0x117)]});let _0x31312c=![];_0x560ef0['on'](_0x4926fe(0x129),()=>{const _0x56f551=_0x4926fe;!_0x31312c&&(_0x31312c=!![],console[_0x56f551(0x146)](_0x27d3b5),_0x30838f());}),_0x560ef0['on'](_0x4926fe(0x12c),()=>{!_0x31312c&&(_0x31312c=!![],_0x30838f());}),_0x560ef0['on'](_0x4926fe(0x11a),()=>{const _0x229fdc=_0x4926fe;!_0x31312c&&_0x560ef0[_0x229fdc(0x12b)]&&(_0x560ef0[_0x229fdc(0x12b)]['on'](_0x229fdc(0x129),()=>{}),_0x560ef0[_0x229fdc(0x12b)][_0x229fdc(0x10a)](_0x27d3b5),_0x560ef0[_0x229fdc(0x12b)][_0x229fdc(0x113)]());}),!_0x560ef0[_0x4926fe(0x12b)]&&(!_0x31312c&&(_0x31312c=!![],console[_0x4926fe(0x146)](_0x27d3b5),_0x30838f()));}):(console[_0x486a41(0x146)](_0x27d3b5),Promise[_0x486a41(0x14d)]());}export async function handleSDKOutput(_0x47dfd1,_0x406ca8){const _0x340323=a57_0x307a,_0x1f35a7=resolveOutputOptions(_0x406ca8),_0x39776e=await formatSDKOutput(_0x47dfd1,_0x1f35a7);await writeOutput(_0x39776e,_0x1f35a7[_0x340323(0x13c)]||undefined,_0x1f35a7['format']);}function a57_0x307a(_0x29b0de,_0x3b3148){_0x29b0de=_0x29b0de-0x10a;const _0x5cdcd8=a57_0x5cdc();let _0x307ab1=_0x5cdcd8[_0x29b0de];return _0x307ab1;}export async function handleQueryOutput(_0x67ef94,_0x20da48){const _0x9ad1e=a57_0x307a,_0xd28bec=resolveOutputOptions(_0x20da48),_0x18f555=await formatQueryOutput(_0x67ef94,_0xd28bec);await writeOutput(_0x18f555,_0xd28bec[_0x9ad1e(0x13c)]||undefined,_0xd28bec[_0x9ad1e(0x143)]);}async function formatSingleObject(_0x3e72a1,_0x3a2125){const _0x2916f6=a57_0x307a,{format:_0x2acace,color:_0x16b2c2,noColor:_0x4b18b6}=_0x3a2125,_0x6f5d3f={'color':_0x16b2c2,'noColor':_0x4b18b6};if(_0x2acace==='json'){if(shouldUseColor(_0x6f5d3f))return colorizeJSON(_0x3e72a1,_0x6f5d3f);return JSON[_0x2916f6(0x150)](_0x3e72a1,null,0x2);}else{if(_0x2acace==='jsonl'){if(shouldUseColor(_0x6f5d3f))return colorizeJSONCompact(_0x3e72a1,_0x6f5d3f);return JSON[_0x2916f6(0x150)](_0x3e72a1);}else{if(_0x2acace===_0x2916f6(0x149))return Object[_0x2916f6(0x11c)](_0x3e72a1)['map'](([_0x4624f8,_0x225c4a])=>_0x4624f8+'\x09'+_0x225c4a)['join']('\x0a');else{const _0x1aea53=Object[_0x2916f6(0x11c)](_0x3e72a1);if(_0x1aea53[_0x2916f6(0x13b)]===0x0)return _0x2916f6(0x135);const _0x331f64=_0x3e72a1['debug'],_0x53dc95=_0x3e72a1[_0x2916f6(0x144)],_0x26397e=_0x3e72a1['params'],_0x47d7b1=_0x3e72a1[_0x2916f6(0x151)],_0x2ad491=_0x53dc95?typeof _0x53dc95==='string'?_0x53dc95:JSON[_0x2916f6(0x150)](_0x53dc95,null,0x2):undefined,_0x49ef41=_0x26397e&&Object[_0x2916f6(0x116)](_0x26397e)[_0x2916f6(0x13b)]>0x0?JSON['stringify'](_0x26397e,null,0x2):undefined,_0x3bf979=_0x47d7b1&&Object['keys'](_0x47d7b1)[_0x2916f6(0x13b)]>0x0?JSON['stringify'](_0x47d7b1,null,0x2):undefined,_0x3437b8=_0x1aea53['filter'](([_0x19c920])=>_0x19c920!=='debug'&&_0x19c920!==_0x2916f6(0x144)&&_0x19c920!==_0x2916f6(0x145)&&_0x19c920!==_0x2916f6(0x151)),_0x46eed7=Math['max'](..._0x3437b8['map'](([_0xbe5f9])=>_0xbe5f9['length'])),_0x6de26c=Math['max'](..._0x3437b8[_0x2916f6(0x14e)](([,_0x53635f])=>{const _0x3d3748=_0x2916f6;try{const _0x39f83a=_0x53635f===null||_0x53635f===undefined?'':typeof _0x53635f===_0x3d3748(0x10b)?JSON[_0x3d3748(0x150)](_0x53635f):String(_0x53635f),_0x257fb9=_0x39f83a['split']('\x0a');return Math[_0x3d3748(0x13d)](..._0x257fb9[_0x3d3748(0x14e)](_0x462480=>_0x462480['length']),0x0);}catch{return 0x0;}}),0x14),_0x253bfa=[];_0x253bfa[_0x2916f6(0x14f)](colorBorder('┌─'+'─'[_0x2916f6(0x139)](_0x46eed7)+_0x2916f6(0x110)+'─'['repeat'](_0x6de26c)+'─┐',_0x6f5d3f)),_0x3437b8[_0x2916f6(0x126)](([_0x2a72dc,_0x43ff41])=>{const _0x4eaaa5=_0x2916f6;let _0xa600f7;try{_0xa600f7=_0x43ff41===null||_0x43ff41===undefined?'':typeof _0x43ff41===_0x4eaaa5(0x10b)?JSON[_0x4eaaa5(0x150)](_0x43ff41):String(_0x43ff41);}catch{_0xa600f7=_0x4eaaa5(0x11d);}const _0x3d5f70=_0x2a72dc['padEnd'](_0x46eed7),_0x32b8e9=_0xa600f7[_0x4eaaa5(0x123)]('\x0a');_0x32b8e9[_0x4eaaa5(0x126)]((_0x4e42ff,_0xda646a)=>{const _0x2c5c7d=_0x4eaaa5,_0x5778fb=colorBorder('│',_0x6f5d3f);_0xda646a===0x0?_0x253bfa[_0x2c5c7d(0x14f)](_0x5778fb+'\x20'+_0x3d5f70+'\x20'+_0x5778fb+'\x20'+_0x4e42ff[_0x2c5c7d(0x114)](_0x6de26c)+'\x20'+_0x5778fb):_0x253bfa[_0x2c5c7d(0x14f)](_0x5778fb+'\x20'+'\x20'[_0x2c5c7d(0x139)](_0x46eed7)+'\x20'+_0x5778fb+'\x20'+_0x4e42ff[_0x2c5c7d(0x114)](_0x6de26c)+'\x20'+_0x5778fb);});}),_0x253bfa[_0x2916f6(0x14f)](colorBorder('└─'+'─'['repeat'](_0x46eed7)+'─┴─'+'─'[_0x2916f6(0x139)](_0x6de26c)+'─┘',_0x6f5d3f));_0x2ad491&&(_0x253bfa['push'](''),_0x253bfa[_0x2916f6(0x14f)](String(a57_0x5eb877[_0x2916f6(0x10e)]['bold'](_0x2916f6(0x133)))),_0x253bfa['push'](_0x2ad491));_0x49ef41&&(_0x253bfa[_0x2916f6(0x14f)](''),_0x253bfa[_0x2916f6(0x14f)](String(a57_0x5eb877[_0x2916f6(0x153)][_0x2916f6(0x136)]('[params]'))),_0x253bfa[_0x2916f6(0x14f)](_0x49ef41));_0x3bf979&&(_0x253bfa['push'](''),_0x253bfa['push'](String(a57_0x5eb877['magenta'][_0x2916f6(0x136)](_0x2916f6(0x11f)))),_0x253bfa[_0x2916f6(0x14f)](_0x3bf979));if(_0x331f64){if(_0x331f64[_0x2916f6(0x134)]){_0x253bfa[_0x2916f6(0x14f)](''),_0x253bfa['push'](String(a57_0x5eb877['red'][_0x2916f6(0x136)](_0x2916f6(0x120))));const _0x4ac9eb=_0x331f64['stderr'][_0x2916f6(0x123)]('\x0a');_0x4ac9eb[_0x2916f6(0x126)](_0x4e45d1=>{const _0x11af65=_0x2916f6;_0x4e45d1[_0x11af65(0x130)]()&&_0x253bfa[_0x11af65(0x14f)](_0x4e45d1);});}if(_0x331f64[_0x2916f6(0x10f)]){_0x253bfa[_0x2916f6(0x14f)](''),_0x253bfa['push'](String(a57_0x5eb877[_0x2916f6(0x141)]['bold']('[logs]')));const _0x8b2135=_0x331f64['cmdout'][_0x2916f6(0x123)]('\x0a');_0x8b2135[_0x2916f6(0x126)](_0x12ed2d=>{const _0x4909c1=_0x2916f6;_0x12ed2d[_0x4909c1(0x130)]()&&_0x253bfa['push'](_0x12ed2d);});}}return _0x253bfa[_0x2916f6(0x118)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x11d3c3,_0x17c6b5){const _0x52f433=a57_0x307a;if(_0x17c6b5[_0x52f433(0x143)]===_0x52f433(0x128)){await handleSDKOutput([_0x11d3c3],_0x17c6b5);return;}const _0x10a5fe=resolveOutputOptions(_0x17c6b5),_0x7147d5=await formatSingleObject(_0x11d3c3,_0x10a5fe);await writeOutput(_0x7147d5,_0x10a5fe[_0x52f433(0x13c)]||undefined,_0x10a5fe[_0x52f433(0x143)]);}
|