@treasuredata/tdx 0.25.2 → 0.25.4
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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +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/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/describe.js +1 -1
- package/dist/commands/engage-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/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/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.d.ts +16 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +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/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/api.js +1 -1
- package/dist/sdk/client/cdp-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/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/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/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.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-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-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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/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/port.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.d.ts +4 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a42_0xe6da40=a42_0x4f05;(function(_0x54bb7a,_0x15e7f0){const _0x2159bf=a42_0x4f05,_0x2aadae=_0x54bb7a();while(!![]){try{const _0x48aa0f=parseInt(_0x2159bf(0x340))/0x1*(parseInt(_0x2159bf(0x2ca))/0x2)+parseInt(_0x2159bf(0x254))/0x3+-parseInt(_0x2159bf(0x2c1))/0x4*(parseInt(_0x2159bf(0x397))/0x5)+-parseInt(_0x2159bf(0x31a))/0x6+-parseInt(_0x2159bf(0x31b))/0x7*(parseInt(_0x2159bf(0x2ab))/0x8)+parseInt(_0x2159bf(0x246))/0x9*(parseInt(_0x2159bf(0x21c))/0xa)+-parseInt(_0x2159bf(0x2f4))/0xb*(-parseInt(_0x2159bf(0x2ea))/0xc);if(_0x48aa0f===_0x15e7f0)break;else _0x2aadae['push'](_0x2aadae['shift']());}catch(_0xc67b9){_0x2aadae['push'](_0x2aadae['shift']());}}}(a42_0x59b6,0x93722));import a42_0x144d21 from'chalk';import{existsSync}from'fs';import a42_0x17adf7 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';function a42_0x59b6(){const _0x708554=['stdout','renderTimeline','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Error:\x20','renderSingleTimeline','clear','fromTask','Project\x20filter:\x20','deleted','Target:\x20','run','sourceProjectName','requireProject','cwd','workflowName','Resolving\x20project\x20\x27','Session\x20','retrySession','No\x20attempts\x20found\x20for:\x20','workflow:projects','resolveProjectDir','No\x20sessions\x20found','now','workflow:kill','Filter:\x20project=','Files\x20to\x20upload:\x20','data','end','Task\x20name:\x20','done','dryRun','pollTimeline','title','/sessions/','Validation:\x20skipped','projectName','path','No\x20sessions\x20found\x20for:\x20','\x20-\x20','targetExists','attemptId','→\x20Project:\x20','Pattern:\x20','json','Error:\x20Invalid\x20parameter\x20format:\x20','autocomplete','Invalid\x20format:\x20','total','output','duration','No\x20matching\x20sessions\x20found','table','logFiles','hasChanges','-\x20nothing\x20pushed','Deleting\x20project\x20','ICON_WIDTH','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Force:\x20yes','Warning:','split','2079510isbkLO','Project\x20name\x20is\x20required','basename','Error:\x20Invalid\x20JSON\x20in\x20--params','taskName','Dry\x20run:\x20yes','execute','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x1b[1A\x1b[2K','/attempt/','session_id','session:','slice','\x20\x20Attempt\x20ID:\x20','Including\x20subtasks:\x20yes','\x20of\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','join','keys','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x0aClone\x20\x22','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','workflow:push','Filter:\x20','get','format','resumeFrom','includeSubtasks','follow','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','showWorkflowConsoleUrl','parse','attempt:','newProjectId','✔\x20Workflow\x20run\x20started','fullName','\x20is\x20not\x20a\x20directory','\x20logs','\x20\x20Location:\x20','set','\x20\x20Project\x20ID:\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','fs/promises','workflow:attempts','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','getHours','10XuMpsi','pending','startsWith','\x20\x20Session\x20context\x20set\x20to:\x20','new','projects','Loading\x20sessions...','workflow:retry','\x0aError:','List\x20workflow\x20attempts','metadata','rows','\x20\x20New\x20attempt\x20ID:\x20','✔\x20Found\x20','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','error','Cancelled','window','workflow:timeline','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x20modified','delete','workflow:secrets:set','localeCompare','Key\x20cannot\x20be\x20empty','unchanged','\x20to\x20see\x20detailed\x20logs','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','cyan','key','Project\x20name:\x20','project','\x20unchanged','✔\x20Secret\x20\x27','LABEL_WIDTH_DIVISOR','getFullYear','floor','canceling','Output\x20directory:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','List\x20workflow\x20execution\x20sessions','POLL_INTERVAL_MS','5014089nehZWN','No\x20attempts\x20found\x20in\x20project:\x20','✔\x20Workflow\x20project\x20context\x20cleared.','Workflow:\x20','kill','\x0aApply\x20these\x20changes?','from','type','\x20\x20Changes:\x20','updatedAt','Revision:\x20','\x0aPush\x20these\x20changes?','push','skipValidation','1658112EAfQJS','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20\x20Console:\x20','\x0aUpdate\x20existing\x20project\x20\x22','map','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','jsonl','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','preparePushProject','📋\x20','\x20attempt','\x20sessions\x20','revision:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Source:\x20','\x20new','No\x20sessions\x20found\x20in\x20project:\x20','getMonth','MAX_LABEL_COUNT','createdAt','🔄\x20','No\x20workflows\x20found','Show\x20logs\x20for\x20a\x20workflow\x20attempt','✔\x20Workflow\x20project\x20set\x20to:\x20','targetDir','TASK_NAME_WIDTH','Pulling\x20project\x20','yellow','values','stringify','List\x20all\x20workflow\x20projects','workflow:workflows','No\x20attempts\x20found','...','fill','No\x20log\x20files\x20found\x20for\x20this\x20attempt','repeat','\x20secret','trim','\x0aDry\x20run\x20-\x20no\x20files\x20written','select','isNewProject','Listing\x20secrets...','planned','---\x20','Parameters:\x20','renderSessionsTimeline','unknown','Source\x20project:\x20','Error:\x20Attempt\x20ID\x20is\x20required','workflow:clone','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','yes','Error:\x20KEY=VALUE\x20is\x20required','attempt','projectId','setSecret','Show\x20specific\x20attempt\x20details','resolve','limit','Reason:\x20','Status:\x20','match','Retrying\x20attempt...','startTime','green','tasks','workflow:download','listSecrets','GUTTER','sessionId','applyPullProject','✔\x20Deleted\x20project\x20','filter','state','\x22\x20to\x20new\x20project\x20\x22','\x20session','changes','executeCloneProject','write','-\x20no\x20files\x20written','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','padStart','Show\x20tasks\x20for\x20an\x20attempt','⚠\x20Showing\x20first\x20','value','all','848zQTAXn','\x20\x20Revision:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','Fetching\x20log\x20files...','✔\x20Push\x20complete','workflow:upload','max','context','cancelRequested','workflow:logs','Error:','resolveProjectId','every','\x22\x20with\x20new\x20revision?','find','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Listing\x20workflow\x20sessions...','toLowerCase','\x20has\x20no\x20attempts','parseProjectWorkflowPattern','workflow:pull','navigateSessionsInteractive','4fruHxB','✔\x20Downloaded\x20','Setting\x20secret...','Error:\x20Secret\x20key\x20is\x20required','round','resolveProject','running','Usage:\x20tdx\x20wf\x20use\x20<project>','includes','7540nNaqYf','tdx.json','Session\x20not\x20found:\x20','\x0a✔\x20Already\x20up\x20to\x20date','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow','No\x20projects\x20match\x20pattern:\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','isArray','workflow:sessions','\x0aPolling...\x20(','deleteSecret','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','generateSessionTimelineRows','💡\x20Tip:\x20Use\x20','newProjectName','Pushing\x20project...','getMinutes','\x20\x20Files\x20extracted:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','startedAt','\x20deleted','lastAttempt','toISOString','workflow:secrets:list','MAX_TASKS_DISPLAY','filesExtracted','✔\x20Project\x20updated','session','Starting\x20workflow\x20run...','getDate','sessions','17676ZYNyaM','Using\x20attempt\x20','fileCount','Source\x20directory\x20is\x20required','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','finishedAt','size','success','description','site','1958jwtddR','text','columns','tdx\x20wf\x20attempt\x20','status','logs','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','download','Listing\x20workflow\x20attempts...','Select\x20a\x20workflow\x20to\x20run','utf-8','Source\x20directory:\x20','Attempt\x20ID:\x20','params','msPerChar','group_error','→\x20New\x20project:\x20','log','prepareCloneProject','relative','workflowProject','blue','Retry\x20a\x20session\x20or\x20attempt','revision','Key:\x20','name','Target\x20directory:\x20','From\x20task:\x20','LABEL_MIN_SPACING','task','list','workflows','\x20\x20Project:\x20','MAX_POLL_ITERATIONS','sourceDir',',\x20Workflow:\x20','/app/workflows/','retryAttemptName','5211222WsDCoe','31129MxhVNj','white','indexOf','ICON_SPACING','sessionTime','Getting\x20attempt\x20tasks...','\x20(use\x20--limit\x20to\x20show\x20more)','\x20(system)','red','Params:\x20','No\x20workflow\x20sessions\x20found','trimEnd','Session\x20time:\x20','length','includeRetried','min','\x20task','\x20\x20Session\x20ID:\x20','pullProject','buildTimelineData','Expected\x20format:\x20--param\x20key=value','has','Deleting\x20secret...','Error:\x20Project\x20name\x20is\x20required','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','diff','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','\x20project','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Auto-selected\x20latest\x20session:\x20','(use\x20--limit\x20to\x20see\x20more)','✔\x20Showing\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Project:\x20','getTime','\x22\x20already\x20exists\x20(ID:\x20','\x20\x20Target:\x20','262DegVIK','sort','dim','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20log\x20content\x20found','Start\x20a\x20workflow\x20run','summary','start','modified','Kill\x20a\x20running\x20attempt','workflow:delete','force','substring','workflow:attempt','\x22?\x20This\x20cannot\x20be\x20undone.','message','verbose','retryAttempt','Total:\x20','\x0aFailed\x20to\x20fetch\x20attempt\x20data','(unknown)','List\x20workflows','📁\x20','isTTY','Latest\x20session\x20has\x20no\x20attempt'];a42_0x59b6=function(){return _0x708554;};return a42_0x59b6();}import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x36de0e from'prompts';function getAttemptStatusDisplay(_0x1a314a){const _0x56d03a=a42_0x4f05;if(!_0x1a314a)return{'icon':'⏳','text':''};const {done:_0x5293d5,success:_0x3f9290,cancelRequested:_0x51f4cb}=_0x1a314a;if(!_0x5293d5)return _0x51f4cb?{'icon':'🛑','text':a42_0x144d21[_0x56d03a(0x26f)]('canceling')}:{'icon':'🔄','text':a42_0x144d21[_0x56d03a(0x309)]('running')};if(_0x3f9290)return{'icon':'✅','text':a42_0x144d21[_0x56d03a(0x295)](_0x56d03a(0x2f1))};return{'icon':'❌','text':a42_0x144d21[_0x56d03a(0x323)](_0x56d03a(0x22b))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0xe6da40(0x2c6)](_0x55c5df,_0x10720d,_0x371651=0x0){const _0x577935=a42_0xe6da40;return _0x55c5df[_0x371651]||_0x10720d[_0x577935(0x308)];}[a42_0xe6da40(0x366)](_0x28ccd7,_0x3ed5b9,_0x593747=0x0){const _0x5b1a9d=a42_0xe6da40,_0x541405=this[_0x5b1a9d(0x2c6)](_0x28ccd7,_0x3ed5b9,_0x593747);if(!_0x541405)return console['error'](a42_0x144d21[_0x5b1a9d(0x323)]('Error:'),_0x5b1a9d(0x398)),console[_0x5b1a9d(0x22b)](a42_0x144d21['dim'](_0x5b1a9d(0x2dd))),null;return _0x541405;}[a42_0xe6da40(0x2be)](_0x503314,_0x4610a6){const _0x4c01bd=a42_0xe6da40;if(_0x503314[0x0]){const _0x1ea436=_0x503314[0x0][_0x4c01bd(0x396)]('.');if(_0x1ea436['length']===0x1)return{'projectName':_0x1ea436[0x0],'workflowName':undefined};else return _0x1ea436[_0x4c01bd(0x328)]===0x2?{'projectName':_0x1ea436[0x0],'workflowName':_0x1ea436[0x1]}:(console[_0x4c01bd(0x22b)](a42_0x144d21[_0x4c01bd(0x323)](_0x4c01bd(0x2b5)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x4610a6[_0x4c01bd(0x308)],'workflowName':undefined};}[a42_0xe6da40(0x36e)](_0x975d4d,_0x3f4f60,_0x56a727=0x0){const _0x3f403b=a42_0xe6da40;if(_0x975d4d[_0x56a727])return _0x975d4d[_0x56a727];if(_0x3f4f60[_0x3f403b(0x308)]){const _0x39cdb1=a42_0x17adf7['join'](process[_0x3f403b(0x367)](),_0x3f403b(0x313),_0x3f4f60['workflowProject']);if(existsSync(a42_0x17adf7[_0x3f403b(0x1fd)](_0x39cdb1,_0x3f403b(0x2cb))))return _0x39cdb1;}return undefined;}async[a42_0xe6da40(0x20b)](_0xe27dd5,_0x471e67,_0x52fa6d){const _0x355387=a42_0xe6da40;try{const _0x2c2397=await _0xe27dd5[_0x355387(0x2cf)][_0x355387(0x313)](_0x471e67,{'limit':0x1});if(_0x2c2397[_0x355387(0x328)]>0x0){const _0x142ee9=_0x2c2397[0x0]['id'],_0x5d8a03=getWorkflowUrl(_0x52fa6d,_0x142ee9);console['error'](_0x355387(0x256)+a42_0x144d21[_0x355387(0x238)](_0x5d8a03));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']='workflow:use';[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x2a5);async[a42_0xe6da40(0x1f1)](_0x3f036c){const _0x265a8d=a42_0xe6da40,{options:_0x32b317,args:_0x1f74b1,tdx:_0x11c20d}=_0x3f036c,_0x382050=_0x1f74b1[0x0],_0x14debb=_0x32b317[_0x265a8d(0x35f)];if(_0x14debb)return saveSessionContext({'workflow_project':undefined},_0x32b317[_0x265a8d(0x2e6)]),console[_0x265a8d(0x305)](a42_0x144d21[_0x265a8d(0x295)](_0x265a8d(0x248))),0x0;if(!_0x382050)return console[_0x265a8d(0x22b)](a42_0x144d21[_0x265a8d(0x323)](_0x265a8d(0x2b5)),_0x265a8d(0x398)),console[_0x265a8d(0x22b)](a42_0x144d21[_0x265a8d(0x342)](_0x265a8d(0x2c8))),console[_0x265a8d(0x22b)](a42_0x144d21[_0x265a8d(0x342)](_0x265a8d(0x219))),0x1;const _0x4d28ec=await withSpinner(_0x265a8d(0x369)+_0x382050+'\x27...',()=>_0x11c20d[_0x265a8d(0x2cf)][_0x265a8d(0x2b6)](_0x382050),{'verbose':_0x32b317[_0x265a8d(0x350)]}),{name:_0x2e1e10}=_0x4d28ec[_0x265a8d(0x374)];return saveSessionContext({'workflow_project':_0x2e1e10},_0x32b317['session']),console['log'](a42_0x144d21[_0x265a8d(0x295)](_0x265a8d(0x26b)+a42_0x144d21['cyan'](_0x2e1e10))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x36d);['description']=a42_0xe6da40(0x272);async[a42_0xe6da40(0x1f1)](_0x4298e7){const _0x5e2b56=a42_0xe6da40,{options:_0xb10cce,args:_0x184c42,tdx:_0x387fa4}=_0x4298e7,_0x462147=_0x184c42[0x0];_0xb10cce[_0x5e2b56(0x350)]&&_0x462147&&console[_0x5e2b56(0x22b)](_0x5e2b56(0x384)+_0x462147);const _0x230832=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x387fa4[_0x5e2b56(0x2cf)][_0x5e2b56(0x221)](_0x462147,{'limit':_0xb10cce['limit']}),{'verbose':_0xb10cce[_0x5e2b56(0x350)]});let _0x1d535a=_0x230832[_0x5e2b56(0x374)];_0x1d535a['sort']((_0x1ac31d,_0x4212d9)=>_0x1ac31d[_0x5e2b56(0x30d)][_0x5e2b56(0x233)](_0x4212d9[_0x5e2b56(0x30d)]));const _0x422b34=_0xb10cce[_0x5e2b56(0x28f)]||0x64,_0x42201e=_0x1d535a['length']>=_0x422b34?a42_0x144d21[_0x5e2b56(0x342)](_0x5e2b56(0x321)):'';console['error'](_0x5e2b56(0x229)+_0x1d535a[_0x5e2b56(0x328)]+_0x5e2b56(0x336)+(_0x1d535a['length']!==0x1?'s':'')+_0x42201e);if(_0xb10cce[_0x5e2b56(0x206)]==='json'||_0xb10cce['format']===_0x5e2b56(0x25a)||_0xb10cce[_0x5e2b56(0x206)]===_0x5e2b56(0x38d))await handleSDKOutput(_0x1d535a,_0xb10cce);else{if(_0x1d535a[_0x5e2b56(0x328)]===0x0)_0x462147?console[_0x5e2b56(0x305)](_0x5e2b56(0x2d0)+_0x462147):console[_0x5e2b56(0x305)]('No\x20workflow\x20projects\x20found');else{const _0x237828=_0x1d535a[_0x5e2b56(0x258)](_0x4fca8d=>{const _0x18f31c=_0x5e2b56,_0x367b4f=_0x4fca8d[_0x18f31c(0x226)]?.['some'](_0xb5c4cf=>_0xb5c4cf[_0x18f31c(0x239)]==='sys'),_0x405e94=_0x367b4f?a42_0x144d21['dim'](_0x18f31c(0x322)):'';return _0x18f31c(0x356)+_0x4fca8d['name']+_0x405e94;});await writeOutput(_0x237828[_0x5e2b56(0x1fd)]('\x0a'),_0xb10cce[_0x5e2b56(0x38a)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a42_0xe6da40(0x273);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x355);async[a42_0xe6da40(0x1f1)](_0x3a9aa0){const _0x5fb3a7=a42_0xe6da40,{options:_0x5acc48,args:_0x2f16bb,tdx:_0x5c3d96}=_0x3a9aa0,_0x45bba9=this[_0x5fb3a7(0x2c6)](_0x2f16bb,_0x5acc48);_0x5acc48['verbose']&&_0x45bba9&&console['error'](_0x5fb3a7(0x361)+_0x45bba9);const _0x101f68=await withSpinner('Listing\x20workflows...',()=>_0x5c3d96[_0x5fb3a7(0x2cf)][_0x5fb3a7(0x313)](_0x45bba9,{'limit':_0x5acc48['limit']}),{'verbose':_0x5acc48[_0x5fb3a7(0x350)]});let _0x341f4f=_0x101f68['data'];_0x341f4f[_0x5fb3a7(0x341)]((_0x51ad84,_0x377ddb)=>{const _0x50ee7d=_0x5fb3a7,_0x490df7=_0x51ad84[_0x50ee7d(0x30d)]['localeCompare'](_0x377ddb['name']);if(_0x490df7!==0x0)return _0x490df7;return(_0x51ad84[_0x50ee7d(0x23b)]?.['name']||'')['localeCompare'](_0x377ddb[_0x50ee7d(0x23b)]?.[_0x50ee7d(0x30d)]||'');});const _0x1b9855=_0x5acc48[_0x5fb3a7(0x28f)]||0x64,_0x2e4aff=_0x341f4f[_0x5fb3a7(0x328)]>=_0x1b9855?a42_0x144d21[_0x5fb3a7(0x342)](_0x5fb3a7(0x321)):'';console[_0x5fb3a7(0x22b)](_0x5fb3a7(0x229)+_0x341f4f['length']+'\x20workflow'+(_0x341f4f[_0x5fb3a7(0x328)]!==0x1?'s':'')+_0x2e4aff);if(_0x5acc48['format']===_0x5fb3a7(0x385)||_0x5acc48[_0x5fb3a7(0x206)]===_0x5fb3a7(0x25a)||_0x5acc48[_0x5fb3a7(0x206)]==='table')await handleSDKOutput(_0x341f4f,_0x5acc48);else{if(_0x341f4f[_0x5fb3a7(0x328)]===0x0)_0x45bba9?console[_0x5fb3a7(0x305)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x45bba9):console[_0x5fb3a7(0x305)](_0x5fb3a7(0x269));else{const _0xe08bb1=_0x5acc48['site'],_0x263b08=_0x341f4f['map'](_0x3e0778=>{const _0x55f849=_0x5fb3a7,_0xa7aac3=a42_0x144d21[_0x55f849(0x342)]('#'+_0x3e0778['id']),_0x283a26=hyperlink(_0xa7aac3,getWorkflowUrl(_0xe08bb1,_0x3e0778['id'])),_0x24597e=_0x3e0778[_0x55f849(0x23b)]?.[_0x55f849(0x30d)]?a42_0x144d21[_0x55f849(0x342)]('\x20('+_0x3e0778[_0x55f849(0x23b)][_0x55f849(0x30d)]+')'):'';return _0x55f849(0x25d)+_0x283a26+'\x20'+_0x3e0778[_0x55f849(0x30d)]+_0x24597e;});await writeOutput(_0x263b08[_0x5fb3a7(0x1fd)]('\x0a'),_0x5acc48[_0x5fb3a7(0x38a)],_0x5fb3a7(0x312));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2d3);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x244);async[a42_0xe6da40(0x1f1)](_0x4f430e){const _0x1b1a93=a42_0xe6da40,{options:_0x5c59a1,args:_0x291a1f,tdx:_0x55c930}=_0x4f430e,_0x15b89f=this['parseProjectWorkflowPattern'](_0x291a1f,_0x5c59a1);if(!_0x15b89f)return 0x1;const {projectName:_0x25d546,workflowName:_0x133c01}=_0x15b89f;if(_0x5c59a1['verbose']){if(_0x25d546&&_0x133c01)console[_0x1b1a93(0x22b)](_0x1b1a93(0x204)+_0x25d546+'.'+_0x133c01);else _0x25d546&&console[_0x1b1a93(0x22b)](_0x1b1a93(0x372)+_0x25d546);const _0x34eead=_0x5c59a1['status'];_0x34eead&&console[_0x1b1a93(0x22b)](_0x1b1a93(0x291)+_0x34eead);}let _0x4639cc=0x28;if(process[_0x1b1a93(0x359)][_0x1b1a93(0x357)]&&!_0x5c59a1[_0x1b1a93(0x38a)]&&!_0x5c59a1[_0x1b1a93(0x206)]){const _0x106d60=process[_0x1b1a93(0x359)][_0x1b1a93(0x227)]||0x28;_0x4639cc=Math[_0x1b1a93(0x2b1)](0x14,Math['floor'](_0x106d60*0x2/0x3));}const _0x5d2993=_0x5c59a1['limit']||_0x4639cc,_0x27d989=await withSpinner(_0x1b1a93(0x2bb),()=>_0x55c930[_0x1b1a93(0x2cf)]['sessions']({'projectName':_0x25d546,'workflowName':_0x133c01,'status':_0x5c59a1[_0x1b1a93(0x2f8)],'fromTime':_0x5c59a1[_0x1b1a93(0x24c)],'toTime':_0x5c59a1['to'],'limit':_0x5d2993}),{'verbose':_0x5c59a1[_0x1b1a93(0x350)]}),_0x49736d=_0x27d989['data'];_0x49736d[_0x1b1a93(0x341)]((_0x294321,_0x4b89b9)=>{const _0x3bc20f=_0x1b1a93,_0x51662f=_0x294321[_0x3bc20f(0x31f)]||'',_0x4e4933=_0x4b89b9[_0x3bc20f(0x31f)]||'';return _0x4e4933[_0x3bc20f(0x233)](_0x51662f);});_0x49736d['length']>=_0x5d2993?console[_0x1b1a93(0x22b)](_0x1b1a93(0x33a)+_0x49736d[_0x1b1a93(0x328)]+_0x1b1a93(0x25f)+a42_0x144d21[_0x1b1a93(0x342)](_0x1b1a93(0x339))):console[_0x1b1a93(0x22b)](_0x1b1a93(0x229)+_0x49736d[_0x1b1a93(0x328)]+_0x1b1a93(0x2a0)+(_0x49736d[_0x1b1a93(0x328)]!==0x1?'s':''));if(_0x5c59a1[_0x1b1a93(0x206)]===_0x1b1a93(0x385)||_0x5c59a1[_0x1b1a93(0x206)]===_0x1b1a93(0x25a)||_0x5c59a1[_0x1b1a93(0x206)]===_0x1b1a93(0x38d))await handleSDKOutput(_0x49736d,_0x5c59a1);else{if(!process['stdout'][_0x1b1a93(0x357)]||_0x5c59a1['output']){if(_0x49736d[_0x1b1a93(0x328)]===0x0){if(_0x25d546&&_0x133c01)console[_0x1b1a93(0x305)](_0x1b1a93(0x37f)+_0x25d546+'.'+_0x133c01);else _0x25d546?console[_0x1b1a93(0x305)](_0x1b1a93(0x264)+_0x25d546):console[_0x1b1a93(0x305)]('No\x20sessions\x20found');}else{const _0x52d0fc=_0x5c59a1[_0x1b1a93(0x2f3)],_0x6e7ce7=this[_0x1b1a93(0x282)](_0x49736d,_0x52d0fc);_0x5c59a1[_0x1b1a93(0x38a)]?await writeOutput(_0x6e7ce7,_0x5c59a1['output'],'list'):console[_0x1b1a93(0x305)](_0x6e7ce7);}!_0x25d546&&(console[_0x1b1a93(0x22b)](''),console[_0x1b1a93(0x22b)](a42_0x144d21[_0x1b1a93(0x342)](_0x1b1a93(0x25b))),console[_0x1b1a93(0x22b)](a42_0x144d21[_0x1b1a93(0x342)](_0x1b1a93(0x2d1))+'or'+a42_0x144d21['dim'](_0x1b1a93(0x343))));}else{if(_0x49736d[_0x1b1a93(0x328)]===0x0){if(_0x25d546&&_0x133c01)console['log'](_0x1b1a93(0x37f)+_0x25d546+'.'+_0x133c01);else _0x25d546?console[_0x1b1a93(0x305)](_0x1b1a93(0x264)+_0x25d546):console[_0x1b1a93(0x305)](_0x1b1a93(0x36f));}else await this[_0x1b1a93(0x2c0)](_0x49736d,_0x4f430e,_0x25d546);}}return 0x0;}[a42_0xe6da40(0x282)](_0x21ac80,_0x4c1d2c){const _0x5f12be=a42_0xe6da40,_0x5989e4=[],_0xbbbbe8=new Map();let _0x4e6c45=Infinity,_0x392155=-Infinity;for(const _0x11683e of _0x21ac80){if(_0x11683e['lastAttempt']?.[_0x5f12be(0x267)]){const _0x579108=new Date(_0x11683e[_0x5f12be(0x2e0)][_0x5f12be(0x267)])[_0x5f12be(0x33d)](),_0x26c027=_0x11683e[_0x5f12be(0x2e0)][_0x5f12be(0x2ef)]?new Date(_0x11683e[_0x5f12be(0x2e0)][_0x5f12be(0x2ef)])[_0x5f12be(0x33d)]():Date[_0x5f12be(0x370)](),_0x40dc42=_0x11683e[_0x5f12be(0x23b)]?.[_0x5f12be(0x30d)]||_0x5f12be(0x354);!_0xbbbbe8[_0x5f12be(0x330)](_0x40dc42)&&_0xbbbbe8['set'](_0x40dc42,[]),_0xbbbbe8['get'](_0x40dc42)[_0x5f12be(0x252)]({'session':_0x11683e,'startTime':_0x579108,'endTime':_0x26c027,'duration':_0x26c027-_0x579108}),_0x4e6c45=Math[_0x5f12be(0x32a)](_0x4e6c45,_0x579108),_0x392155=Math[_0x5f12be(0x2b1)](_0x392155,_0x26c027);}}if(_0xbbbbe8[_0x5f12be(0x2f0)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x467a95=process[_0x5f12be(0x359)][_0x5f12be(0x2f6)]||0x78,_0x4af5fc=0x1e,_0x5bfeff=0x32,_0x3c5c2f=0x4,_0x263eac=Math[_0x5f12be(0x32a)](_0x5bfeff,Math[_0x5f12be(0x2b1)](_0x4af5fc,Math[_0x5f12be(0x240)](_0x467a95*0.3))),_0x57bc57=_0x467a95-_0x263eac-TIMELINE_CONFIG[_0x5f12be(0x299)]-0x3-_0x3c5c2f,_0x28f569=_0x392155-_0x4e6c45,_0x50c446=_0x28f569/_0x263eac,_0x5c3825=renderTimeAxis({'startTime':_0x4e6c45,'endTime':_0x392155,'durationMs':_0x28f569,'msPerChar':_0x50c446},_0x263eac),_0x25b8b5=[];for(const _0x1f9afe of _0xbbbbe8[_0x5f12be(0x270)]()){_0x25b8b5[_0x5f12be(0x252)](..._0x1f9afe);}_0x25b8b5['sort']((_0x44182c,_0x24cb25)=>_0x24cb25[_0x5f12be(0x294)]-_0x44182c[_0x5f12be(0x294)]);const _0xae716d=new Date(_0x4e6c45),_0x3e638b=formatDate(_0xae716d),_0x127e6a=_0x3c5c2f+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x5f12be(0x31e)]+_0x57bc57,_0x20492f='\x20'[_0x5f12be(0x278)](_0x127e6a-_0x3e638b[_0x5f12be(0x328)]),_0x35dd50=_0x20492f+a42_0x144d21[_0x5f12be(0x342)](_0x3e638b)+'\x20'+_0x5c3825;_0x5989e4[_0x5f12be(0x252)](_0x35dd50);const _0x13e1bd=0x16;let _0xd073a8=0x0;for(const _0x33402f of _0x25b8b5){const _0x4bd113=_0x33402f[_0x5f12be(0x2e6)][_0x5f12be(0x23b)]?.[_0x5f12be(0x30d)]||'?',_0x3f4b97=Math[_0x5f12be(0x32a)](stringWidth(_0x4bd113),_0x13e1bd);_0xd073a8=Math[_0x5f12be(0x2b1)](_0xd073a8,_0x3f4b97);}for(const _0x46f52b of _0x25b8b5){const {session:_0x19256e,startTime:_0x3090b0,endTime:_0x20b739,duration:_0x176778}=_0x46f52b,_0x4abbfc=_0x19256e[_0x5f12be(0x23b)]?.['id'],_0x25979a=_0x19256e['id'],_0x433b8c=_0x19256e[_0x5f12be(0x23b)]?.['name']||'?',_0x530484=_0x19256e[_0x5f12be(0x2cf)]?.[_0x5f12be(0x30d)]||'?';let _0x90e290,_0x35425e;if(_0x19256e[_0x5f12be(0x2e0)]){const _0x4c8952=_0x19256e[_0x5f12be(0x2e0)];!_0x4c8952['done']?(_0x90e290=_0x4c8952['cancelRequested']?'🛑':'🔄',_0x35425e=_0x4c8952[_0x5f12be(0x2b3)]?a42_0x144d21[_0x5f12be(0x26f)]:a42_0x144d21['blue']):(_0x90e290=_0x4c8952[_0x5f12be(0x2f1)]?'✅':'❌',_0x35425e=_0x4c8952['success']?a42_0x144d21[_0x5f12be(0x295)]:a42_0x144d21['red']);}else _0x90e290='⏳',_0x35425e=a42_0x144d21['dim'];const _0x5b650e='#'+_0x25979a,_0x585f50=_0x4abbfc?hyperlink(_0x5b650e,getWorkflowSessionUrl(_0x4c1d2c,_0x4abbfc,_0x25979a)):_0x5b650e;let _0x12346f=_0x433b8c;stringWidth(_0x433b8c)>_0x13e1bd&&(_0x12346f=_0x433b8c[_0x5f12be(0x1f8)](0x0,_0x13e1bd-0x1)+'…');const _0x5e3e25=a42_0x144d21[_0x5f12be(0x342)](_0x12346f),_0x5d72e2=stringWidth(_0x12346f),_0x34ea80='\x20'[_0x5f12be(0x278)](_0xd073a8-stringWidth(_0x12346f)+0x2),_0x4514e8='('+formatElapsed(_0x176778)+')',_0x363200=stringWidth(_0x4514e8),_0x302f71=stringWidth(_0x5b650e),_0x1fb54e=_0x302f71+0x1+_0x5d72e2+_0x34ea80[_0x5f12be(0x328)],_0x15bd8d=_0x57bc57-_0x1fb54e-_0x363200-0x1-0x8;let _0x2e3f4a=_0x530484;stringWidth(_0x2e3f4a)>_0x15bd8d&&(_0x2e3f4a=_0x2e3f4a['slice'](0x0,_0x15bd8d-0x1)+'…');const _0x57e20e=_0x585f50+'\x20'+_0x5e3e25+_0x34ea80+_0x2e3f4a,_0x58b033=stringWidth(_0x57e20e),_0x3523bb=_0x57bc57-_0x58b033-_0x363200,_0x1d1b68=_0x57e20e+'\x20'['repeat'](Math['max'](0x1,_0x3523bb))+a42_0x144d21[_0x5f12be(0x342)](_0x4514e8),_0x4ae7b3=Math[_0x5f12be(0x240)]((_0x3090b0-_0x4e6c45)/_0x50c446),_0x2c254c=Math[_0x5f12be(0x240)]((_0x20b739-_0x4e6c45)/_0x50c446),_0x39ab67=Math[_0x5f12be(0x2b1)](_0x4ae7b3+0x1,_0x2c254c),_0x42596d=new Array(_0x263eac)[_0x5f12be(0x276)]('\x20');for(let _0xdc1b97=_0x4ae7b3;_0xdc1b97<Math[_0x5f12be(0x32a)](_0x39ab67,_0x263eac);_0xdc1b97++){_0x42596d[_0xdc1b97]='─';}const _0x47e84e=_0x42596d[_0x5f12be(0x258)](_0x2647a0=>_0x2647a0==='\x20'?'\x20':_0x35425e(_0x2647a0))[_0x5f12be(0x1fd)]('');_0x5989e4['push'](_0x90e290+'\x20'+_0x1d1b68+'│'+_0x47e84e+'│');}return _0x5989e4[_0x5f12be(0x1fd)]('\x0a');}async['navigateSessionsInteractive'](_0x282dc4,_0x5204c9,_0x48ab96){const _0x597601=a42_0xe6da40,{options:_0x3ade42,tdx:_0x3a5f5a}=_0x5204c9,_0x197d43=_0x3ade42['site'],{timelineRows:_0x5b105e,timeAxisHeader:_0x458a9c}=this[_0x597601(0x2d7)](_0x282dc4,_0x197d43),_0x24be96=_0x5b105e[_0x597601(0x29d)](_0x48e38c=>_0x48e38c[_0x597601(0x382)]);if(_0x24be96['length']===0x0){const _0x1fd7d1=this[_0x597601(0x282)](_0x282dc4,_0x197d43);console[_0x597601(0x305)](_0x1fd7d1);!_0x48ab96&&(console[_0x597601(0x22b)](''),console['error'](a42_0x144d21[_0x597601(0x342)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x597601(0x22b)](a42_0x144d21[_0x597601(0x342)](_0x597601(0x2d1))+'or'+a42_0x144d21['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x458a9c&&console[_0x597601(0x305)](_0x458a9c);const _0x3b2f8a=_0x5b105e['filter'](_0x6dfc24=>_0x6dfc24[_0x597601(0x382)])['map'](_0x57cc31=>({'title':_0x57cc31['displayLine'],'value':_0x57cc31[_0x597601(0x382)]})),_0x34c1be=process[_0x597601(0x359)]['rows']||0x3c,_0x259c12=Math[_0x597601(0x2b1)](0x28,Math[_0x597601(0x240)](_0x34c1be*0x2/0x3)),_0x2fc457=await a42_0x36de0e({'type':_0x597601(0x387),'name':_0x597601(0x382),'message':_0x597601(0x35b),'choices':_0x3b2f8a,'initial':-0x1,'limit':_0x259c12,'clearFirst':!![],'fallback':{'title':_0x597601(0x38c),'value':null},'suggest':(_0x380bd7,_0x526b75)=>{const _0x926d8c=_0x597601;if(!_0x380bd7)return Promise[_0x926d8c(0x28e)](_0x526b75);const _0x290ebb=_0x526b75[_0x926d8c(0x29d)](_0x512318=>{const _0x140f38=_0x926d8c,_0x5dddc4=_0x512318;return _0x5dddc4[_0x140f38(0x37a)]['toLowerCase']()[_0x140f38(0x2c9)](_0x380bd7[_0x140f38(0x2bc)]());});return Promise['resolve'](_0x290ebb);}}),_0x31320f=()=>{const _0x48d6e7=_0x597601;process[_0x48d6e7(0x359)]['write'](_0x48d6e7(0x1f4)),process[_0x48d6e7(0x359)][_0x48d6e7(0x2a3)](_0x48d6e7(0x1f4)),process[_0x48d6e7(0x359)][_0x48d6e7(0x2a3)](_0x48d6e7(0x1f4));},_0x189138=_0x2fc457&&_0x2fc457['attemptId']&&_0x2fc457[_0x597601(0x382)]!==null&&_0x2fc457[_0x597601(0x382)][_0x597601(0x27a)]()!=='';if(!_0x189138){_0x31320f(),console['log'](a42_0x144d21[_0x597601(0x342)](_0x597601(0x22c)));return;}_0x31320f();const _0x23e7e5=_0x282dc4[_0x597601(0x2b9)](_0x1ffa28=>_0x1ffa28[_0x597601(0x2e0)]?.['id']===_0x2fc457[_0x597601(0x382)]);if(_0x23e7e5){const _0x265515=_0x23e7e5[_0x597601(0x23b)]?.[_0x597601(0x30d)]||'?',_0x1631af=_0x23e7e5[_0x597601(0x2cf)]?.[_0x597601(0x30d)]||'?';console[_0x597601(0x305)]('Project:\x20'+a42_0x144d21[_0x597601(0x342)](_0x265515)+_0x597601(0x317)+a42_0x144d21['dim'](_0x1631af));}const _0x2089d8=new WorkflowTimelineCommand();await _0x2089d8[_0x597601(0x1f1)]({'args':[],'options':{..._0x3ade42,'attemptId':_0x2fc457['attemptId']},'tdx':_0x3a5f5a});}[a42_0xe6da40(0x2d7)](_0x12bca4,_0x17efdb){const _0x1d45db=a42_0xe6da40,_0x15805c=new Map();for(const _0x377730 of _0x12bca4){_0x377730['id']&&_0x377730[_0x1d45db(0x2e0)]?.['id']&&_0x15805c[_0x1d45db(0x214)](_0x377730['id'],_0x377730[_0x1d45db(0x2e0)]['id']);}const _0x3c0eb0=[];let _0xd38b49='';const _0x25bf17=this[_0x1d45db(0x282)](_0x12bca4,_0x17efdb),_0x418459=_0x25bf17[_0x1d45db(0x396)]('\x0a');for(const _0x54cfcf of _0x418459){if(_0x54cfcf['startsWith'](_0x1d45db(0x261))||_0x54cfcf[_0x1d45db(0x292)](/^\s+\d{4}-\d{2}-\d{2}/))_0xd38b49=_0x54cfcf;else{if(_0x54cfcf['match'](/^[✅❌🔄🛑⏳]/)){const _0x277d17=_0x54cfcf[_0x1d45db(0x292)](/#(\d+)/),_0x3e43a9=_0x277d17?_0x277d17[0x1]:null,_0x5834e5=_0x3e43a9?_0x15805c[_0x1d45db(0x205)](_0x3e43a9)||null:null,_0x36abc2=_0x12bca4['find'](_0x199182=>_0x199182['id']===_0x3e43a9),_0x2ed451=_0x36abc2?.[_0x1d45db(0x23b)]?.[_0x1d45db(0x30d)]||'';_0x3c0eb0[_0x1d45db(0x252)]({'displayLine':_0x54cfcf,'attemptId':_0x5834e5,'projectName':_0x2ed451});}}}return{'timelineRows':_0x3c0eb0,'timeAxisHeader':_0xd38b49};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x218);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x225);async[a42_0xe6da40(0x1f1)](_0x330cee){const _0x534997=a42_0xe6da40,{options:_0x1e9409,args:_0x3667fd,tdx:_0x574293}=_0x330cee,_0x2c0805=this['parseProjectWorkflowPattern'](_0x3667fd,_0x1e9409);if(!_0x2c0805)return 0x1;const {projectName:_0x225fd1,workflowName:_0x5fb4f0}=_0x2c0805,_0x344dc7=_0x1e9409[_0x534997(0x329)];if(_0x1e9409['verbose']){if(_0x225fd1&&_0x5fb4f0)console['error']('Filter:\x20'+_0x225fd1+'.'+_0x5fb4f0);else _0x225fd1&&console[_0x534997(0x22b)](_0x534997(0x372)+_0x225fd1);_0x344dc7&&console[_0x534997(0x22b)]('Include\x20retried:\x20yes');}const _0x48c29f=await withSpinner(_0x534997(0x2fc),()=>_0x574293[_0x534997(0x2cf)]['attempts']({'projectName':_0x225fd1,'workflowName':_0x5fb4f0,'includeRetried':_0x344dc7,'limit':_0x1e9409[_0x534997(0x28f)]}),{'verbose':_0x1e9409[_0x534997(0x350)]}),_0x28fb1f=_0x48c29f[_0x534997(0x374)],_0x51139b=_0x1e9409[_0x534997(0x28f)]||0x64,_0x5252e2=_0x28fb1f[_0x534997(0x328)]>=_0x51139b?a42_0x144d21[_0x534997(0x342)](_0x534997(0x321)):'';console[_0x534997(0x22b)]('✔\x20Found\x20'+_0x28fb1f[_0x534997(0x328)]+_0x534997(0x25e)+(_0x28fb1f[_0x534997(0x328)]!==0x1?'s':'')+_0x5252e2);if(_0x1e9409[_0x534997(0x206)]===_0x534997(0x385)||_0x1e9409[_0x534997(0x206)]===_0x534997(0x25a)||_0x1e9409[_0x534997(0x206)]==='table')await handleSDKOutput(_0x28fb1f,_0x1e9409);else{if(_0x28fb1f['length']===0x0){if(_0x225fd1&&_0x5fb4f0)console[_0x534997(0x305)](_0x534997(0x36c)+_0x225fd1+'.'+_0x5fb4f0);else _0x225fd1?console[_0x534997(0x305)](_0x534997(0x247)+_0x225fd1):console['log'](_0x534997(0x274));}else{const _0x4307e0=_0x1e9409['site'],_0x295f42=_0x28fb1f['map'](_0x66a196=>{const _0x23ef86=_0x534997,_0x2eeb6e=a42_0x144d21[_0x23ef86(0x342)]('#'+_0x66a196['id']),_0x1808c3=_0x66a196[_0x23ef86(0x23b)]?.['id'],_0x20eaee=_0x66a196[_0x23ef86(0x1f6)]||_0x66a196[_0x23ef86(0x29a)],_0x44637c=_0x1808c3&&_0x20eaee?hyperlink(_0x2eeb6e,getWorkflowAttemptUrl(_0x4307e0,_0x1808c3,_0x20eaee,_0x66a196['id'])):_0x2eeb6e,{icon:_0x5e14b9,text:_0x577b11}=getAttemptStatusDisplay(_0x66a196),_0x45321e=(_0x66a196[_0x23ef86(0x23b)]?.[_0x23ef86(0x30d)]||'?')+'.'+(_0x66a196['workflow']?.[_0x23ef86(0x30d)]||'?'),_0x49e71f=_0x66a196[_0x23ef86(0x31f)]?a42_0x144d21[_0x23ef86(0x342)](_0x66a196['sessionTime']):'';return(_0x44637c+'\x20'+_0x5e14b9+(_0x577b11?'\x20'+_0x577b11:'')+'\x20'+_0x45321e+'\x20'+_0x49e71f)[_0x23ef86(0x326)]();});await writeOutput(_0x295f42[_0x534997(0x1fd)]('\x0a'),_0x1e9409[_0x534997(0x38a)],_0x534997(0x312));}}return 0x0;}}function a42_0x4f05(_0x137c22,_0x349a39){_0x137c22=_0x137c22-0x1ef;const _0x59b6e6=a42_0x59b6();let _0x4f05a3=_0x59b6e6[_0x137c22];return _0x4f05a3;}export class WorkflowAttemptCommand extends BaseCommand{['name']=a42_0xe6da40(0x34d);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x28d);async[a42_0xe6da40(0x1f1)](_0x154446){const _0x5533d5=a42_0xe6da40,{options:_0x32d980,args:_0x438862,tdx:_0x39c823}=_0x154446,_0x457153=_0x438862[0x0];if(!_0x457153)return console[_0x5533d5(0x22b)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x32d980[_0x5533d5(0x350)]&&console[_0x5533d5(0x22b)]('Attempt\x20ID:\x20'+_0x457153);const _0x4c292a=await withSpinner('Getting\x20attempt\x20details...',()=>_0x39c823[_0x5533d5(0x2cf)][_0x5533d5(0x28a)](_0x457153),{'verbose':_0x32d980[_0x5533d5(0x350)]}),_0x2dea84=_0x4c292a['data'];let _0x3fd4a8;!_0x2dea84[_0x5533d5(0x377)]?_0x3fd4a8=_0x2dea84[_0x5533d5(0x2b3)]?_0x5533d5(0x241):_0x5533d5(0x2c7):_0x3fd4a8=_0x2dea84['success']?'success':_0x5533d5(0x22b);let _0xf8255b;if(_0x2dea84[_0x5533d5(0x267)]&&_0x2dea84[_0x5533d5(0x2ef)]){const _0xdfffdf=new Date(_0x2dea84['createdAt'])[_0x5533d5(0x33d)](),_0x425427=new Date(_0x2dea84['finishedAt'])[_0x5533d5(0x33d)]();_0xf8255b=Math[_0x5533d5(0x2c5)]((_0x425427-_0xdfffdf)/0x3e8);}const _0x3ba14d={'attempt_id':_0x2dea84['id'],'status':_0x3fd4a8,..._0x2dea84['index']!==undefined&&{'index':_0x2dea84['index']},..._0x2dea84[_0x5533d5(0x23b)]&&{'project':_0x2dea84[_0x5533d5(0x23b)]['name']},..._0x2dea84['workflow']&&{'workflow':_0x2dea84[_0x5533d5(0x2cf)][_0x5533d5(0x30d)]},..._0x2dea84[_0x5533d5(0x29a)]&&{'session_id':_0x2dea84[_0x5533d5(0x29a)]},..._0x2dea84[_0x5533d5(0x31f)]&&{'session_time':_0x2dea84[_0x5533d5(0x31f)]},..._0x2dea84['retryAttemptName']&&{'retry_attempt':_0x2dea84[_0x5533d5(0x319)]},..._0xf8255b!==undefined&&{'duration_sec':_0xf8255b},..._0x2dea84[_0x5533d5(0x267)]&&{'created_at':_0x2dea84[_0x5533d5(0x267)]},..._0x2dea84[_0x5533d5(0x2ef)]&&{'finished_at':_0x2dea84[_0x5533d5(0x2ef)]},...Object['keys'](_0x2dea84['params'])['length']>0x0&&{'params':_0x2dea84[_0x5533d5(0x301)]}};return await handleSingleObjectOutput(_0x3ba14d,_0x32d980),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0xe6da40(0x30d)]='workflow:tasks';[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x2a7);async[a42_0xe6da40(0x1f1)](_0x1b3cfa){const _0x5a64f3=a42_0xe6da40,{options:_0x4b0a79,args:_0x5a72fd,tdx:_0x4dda7a}=_0x1b3cfa,_0x2e095d=_0x5a72fd[0x0];if(!_0x2e095d)return console[_0x5a64f3(0x22b)](_0x5a64f3(0x285)),0x1;const _0x33cd4f=_0x4b0a79[_0x5a64f3(0x208)];_0x4b0a79['verbose']&&(console[_0x5a64f3(0x22b)](_0x5a64f3(0x300)+_0x2e095d),_0x33cd4f&&console[_0x5a64f3(0x22b)](_0x5a64f3(0x1fa)));const _0x2690ce=await withSpinner(_0x5a64f3(0x320),()=>_0x4dda7a['workflow']['tasks'](_0x2e095d,_0x33cd4f||![]),{'verbose':_0x4b0a79[_0x5a64f3(0x350)]}),_0x1a79f8=_0x2690ce[_0x5a64f3(0x374)];return console['error'](_0x5a64f3(0x229)+_0x1a79f8['length']+_0x5a64f3(0x32b)+(_0x1a79f8[_0x5a64f3(0x328)]!==0x1?'s':'')),await handleSDKOutput(_0x1a79f8,_0x4b0a79),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2b4);['description']=a42_0xe6da40(0x26a);async['execute'](_0x3b2612){const _0xd1b9e6=a42_0xe6da40,{options:_0x448cd5,args:_0x1c1810,tdx:_0x43b362}=_0x3b2612,_0xe416e3=_0x1c1810[0x0];let _0x580ad1=_0x1c1810[0x1];if(!_0xe416e3)return console[_0xd1b9e6(0x22b)](_0xd1b9e6(0x285)),0x1;_0x448cd5[_0xd1b9e6(0x350)]&&(console[_0xd1b9e6(0x22b)](_0xd1b9e6(0x300)+_0xe416e3),_0x580ad1&&console[_0xd1b9e6(0x22b)](_0xd1b9e6(0x376)+_0x580ad1));const _0x496503=await withSpinner(_0xd1b9e6(0x2ae),()=>_0x43b362[_0xd1b9e6(0x2cf)][_0xd1b9e6(0x38e)](_0xe416e3,_0x580ad1),{'verbose':_0x448cd5[_0xd1b9e6(0x350)]}),_0x4aab50=_0x496503[_0xd1b9e6(0x374)];if(_0x4aab50[_0xd1b9e6(0x328)]===0x0)return console['error'](_0xd1b9e6(0x277)),0x0;if(!_0x580ad1&&(_0x448cd5[_0xd1b9e6(0x385)]||_0x448cd5['format']))return await handleSDKOutput(_0x4aab50,_0x448cd5),0x0;if(!_0x580ad1){const _0x146c40=_0x4aab50[_0xd1b9e6(0x258)](_0x49fea0=>({'title':_0x49fea0[_0xd1b9e6(0x1ef)]+'\x20('+formatBytes(_0x49fea0['fileSize'])+')','value':_0x49fea0[_0xd1b9e6(0x1ef)]})),_0x7a2141=await a42_0x36de0e({'type':_0xd1b9e6(0x27c),'name':_0xd1b9e6(0x311),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x146c40});if(!_0x7a2141['task'])return console[_0xd1b9e6(0x22b)]('Cancelled'),0x0;_0x580ad1=_0x7a2141[_0xd1b9e6(0x311)];}const _0x2eb49f=await withSpinner('Downloading\x20logs...',()=>_0x43b362[_0xd1b9e6(0x2cf)][_0xd1b9e6(0x2f9)](_0xe416e3,_0x580ad1),{'verbose':_0x448cd5[_0xd1b9e6(0x350)]}),_0xc4a511=_0x2eb49f[_0xd1b9e6(0x374)];return _0xc4a511?console['log'](_0xc4a511):console[_0xd1b9e6(0x22b)](_0xd1b9e6(0x344)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x371);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x349);async['execute'](_0x28fe6c){const _0x3e0f58=a42_0xe6da40,{options:_0xf89323,args:_0x504a87,tdx:_0x1d1c42}=_0x28fe6c,_0x1cebc4=_0x504a87[0x0];if(!_0x1cebc4)return console[_0x3e0f58(0x22b)](_0x3e0f58(0x285)),0x1;const _0x301e68=_0xf89323['reason'];_0xf89323[_0x3e0f58(0x350)]&&(console[_0x3e0f58(0x22b)](_0x3e0f58(0x300)+_0x1cebc4),_0x301e68&&console[_0x3e0f58(0x22b)](_0x3e0f58(0x290)+_0x301e68));if(!_0xf89323[_0x3e0f58(0x288)]){if(!isInteractive())return console['error'](a42_0x144d21[_0x3e0f58(0x323)](_0x3e0f58(0x224)),_0x3e0f58(0x243)),console['error'](a42_0x144d21[_0x3e0f58(0x342)](_0x3e0f58(0x333))),0x1;const _0x24aa3a=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x1cebc4+'?');if(!_0x24aa3a)return console[_0x3e0f58(0x22b)](a42_0x144d21[_0x3e0f58(0x26f)](_0x3e0f58(0x22c))),0x1;}const _0x1e2e24=await withSpinner('Killing\x20attempt...',()=>_0x1d1c42[_0x3e0f58(0x2cf)][_0x3e0f58(0x24a)](_0x1cebc4,_0x301e68),{'verbose':_0xf89323[_0x3e0f58(0x350)]}),_0x35217f=_0x1e2e24[_0x3e0f58(0x374)];return console[_0x3e0f58(0x22b)]('✔\x20'+_0x35217f),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x223);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x30a);async[a42_0xe6da40(0x1f1)](_0x4fbb94){const _0x25c5cb=a42_0xe6da40,{options:_0x4afaca,args:_0x2e35e4,tdx:_0x3233e4}=_0x4fbb94,_0x3def0c=_0x2e35e4[0x0];if(!_0x3def0c)return console['error'](_0x25c5cb(0x2ce)),console[_0x25c5cb(0x22b)](_0x25c5cb(0x2ee)),0x1;let _0xae4adc=![],_0x29d1a3=_0x3def0c;if(_0x3def0c[_0x25c5cb(0x21e)](_0x25c5cb(0x1f7)))_0xae4adc=!![],_0x29d1a3=_0x3def0c[_0x25c5cb(0x34c)](0x8);else{if(_0x3def0c[_0x25c5cb(0x21e)](_0x25c5cb(0x20d)))_0xae4adc=![],_0x29d1a3=_0x3def0c[_0x25c5cb(0x34c)](0x8);else return console[_0x25c5cb(0x22b)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x25c5cb(0x22b)](_0x25c5cb(0x2ee)),0x1;}const _0x3cf676=_0x4afaca[_0x25c5cb(0x360)],_0x170d85=_0x4afaca[_0x25c5cb(0x207)],_0x469264=_0x4afaca[_0x25c5cb(0x301)],_0x14d8bf=_0x4afaca[_0x25c5cb(0x34b)];_0x4afaca[_0x25c5cb(0x350)]&&(console[_0x25c5cb(0x22b)](_0x25c5cb(0x363)+(_0xae4adc?'session':_0x25c5cb(0x28a))+'\x20'+_0x29d1a3),_0x3cf676&&console[_0x25c5cb(0x22b)](_0x25c5cb(0x30f)+_0x3cf676),_0x170d85&&console[_0x25c5cb(0x22b)]('Resume\x20from:\x20'+_0x170d85),_0x469264&&console[_0x25c5cb(0x22b)](_0x25c5cb(0x324)+_0x469264),_0x14d8bf&&console[_0x25c5cb(0x22b)](_0x25c5cb(0x394)));let _0x38fb51;if(_0x469264)try{if(_0x469264[_0x25c5cb(0x21e)]('@')){const _0x2ba21a=await import(_0x25c5cb(0x217)),_0x595354=_0x469264['substring'](0x1),_0x6c2525=await _0x2ba21a['readFile'](_0x595354,_0x25c5cb(0x2fe));_0x38fb51=JSON[_0x25c5cb(0x20c)](_0x6c2525);}else _0x38fb51=JSON[_0x25c5cb(0x20c)](_0x469264);}catch{return console['error'](_0x25c5cb(0x39a)),0x1;}if(!_0x4afaca[_0x25c5cb(0x288)]){if(!isInteractive())return console['error'](a42_0x144d21[_0x25c5cb(0x323)](_0x25c5cb(0x224)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x25c5cb(0x22b)](a42_0x144d21[_0x25c5cb(0x342)](_0x25c5cb(0x333))),0x1;const _0x115841=await confirmKey(_0x25c5cb(0x393)+(_0xae4adc?'session':'attempt')+'\x20'+_0x29d1a3+'?');if(!_0x115841)return console[_0x25c5cb(0x22b)](a42_0x144d21[_0x25c5cb(0x26f)](_0x25c5cb(0x22c))),0x1;}let _0x2edd6f;_0xae4adc?_0x2edd6f=await withSpinner('Retrying\x20session...',()=>_0x3233e4[_0x25c5cb(0x2cf)][_0x25c5cb(0x36b)](_0x29d1a3,{'fromTask':_0x3cf676,'retryParams':_0x38fb51}),{'verbose':_0x4afaca[_0x25c5cb(0x350)]}):_0x2edd6f=await withSpinner(_0x25c5cb(0x293),()=>_0x3233e4['workflow'][_0x25c5cb(0x351)](_0x29d1a3,{'resumeFrom':_0x170d85,'retryParams':_0x38fb51,'force':_0x14d8bf}),{'verbose':_0x4afaca[_0x25c5cb(0x350)]});const _0x42a954=_0x2edd6f[_0x25c5cb(0x374)];return console[_0x25c5cb(0x22b)]('✔\x20Retry\x20started'),console['error'](_0x25c5cb(0x228)+_0x42a954[_0x25c5cb(0x382)]),console['error'](_0x25c5cb(0x32c)+_0x42a954[_0x25c5cb(0x29a)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]='workflow:run';['description']=a42_0xe6da40(0x345);async[a42_0xe6da40(0x1f1)](_0x57091b){const _0x561cba=a42_0xe6da40,{options:_0xfbd186,args:_0x2d9b04,tdx:_0xb3a71c}=_0x57091b;let _0x5d9792=_0x2d9b04[0x0];if(!_0x5d9792){const _0x4af0bb=this[_0x561cba(0x2c6)]([],_0xfbd186),_0x4248b4=await withSpinner('Loading\x20workflows...',()=>_0xb3a71c[_0x561cba(0x2cf)][_0x561cba(0x313)](_0x4af0bb,{'limit':_0xfbd186[_0x561cba(0x28f)]}),{'verbose':_0xfbd186[_0x561cba(0x350)]}),_0x360027=_0x4248b4[_0x561cba(0x374)];if(_0x360027[_0x561cba(0x328)]===0x0)return console['error'](_0x561cba(0x269)),!_0x4af0bb&&console['error'](a42_0x144d21[_0x561cba(0x342)](_0x561cba(0x2dd))),0x1;const _0x3c8e17=_0x360027[_0x561cba(0x258)](_0x55dce0=>({'title':_0x55dce0['project']?.[_0x561cba(0x30d)]+'.'+_0x55dce0[_0x561cba(0x30d)],'value':_0x55dce0[_0x561cba(0x23b)]?.['name']+'.'+_0x55dce0[_0x561cba(0x30d)],'description':_0x55dce0[_0x561cba(0x30b)]?_0x561cba(0x260)+_0x55dce0[_0x561cba(0x30b)]:undefined})),_0x236a7b=await a42_0x36de0e({'type':_0x561cba(0x27c),'name':_0x561cba(0x2cf),'message':_0x561cba(0x2fd),'choices':_0x3c8e17});if(!_0x236a7b[_0x561cba(0x2cf)])return 0x1;_0x5d9792=_0x236a7b[_0x561cba(0x2cf)];}if(!_0x5d9792['includes']('.')){const _0x306aca=this[_0x561cba(0x2c6)]([],_0xfbd186);if(_0x306aca)_0x5d9792=_0x306aca+'.'+_0x5d9792;else return console[_0x561cba(0x22b)](a42_0x144d21[_0x561cba(0x323)](_0x561cba(0x2b5)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a42_0x144d21[_0x561cba(0x342)](_0x561cba(0x2dd))),0x1;}const _0x27a378=_0xfbd186['param'],_0x19d258=_0xfbd186[_0x561cba(0x31f)],_0x1888b1={};if(_0x27a378&&Array[_0x561cba(0x2d2)](_0x27a378))for(const _0x40a527 of _0x27a378){const _0x549220=_0x40a527[_0x561cba(0x31d)]('=');if(_0x549220===-0x1)return console[_0x561cba(0x22b)](_0x561cba(0x386)+_0x40a527),console[_0x561cba(0x22b)](_0x561cba(0x32f)),0x1;const _0x4b645d=_0x40a527[_0x561cba(0x34c)](0x0,_0x549220),_0x135b6f=_0x40a527[_0x561cba(0x34c)](_0x549220+0x1);try{_0x1888b1[_0x4b645d]=JSON[_0x561cba(0x20c)](_0x135b6f);}catch{_0x1888b1[_0x4b645d]=_0x135b6f;}}_0xfbd186['verbose']&&(console['error'](_0x561cba(0x249)+_0x5d9792),Object[_0x561cba(0x1fe)](_0x1888b1)[_0x561cba(0x328)]>0x0&&console[_0x561cba(0x22b)](_0x561cba(0x281)+JSON[_0x561cba(0x271)](_0x1888b1)),_0x19d258&&console[_0x561cba(0x22b)](_0x561cba(0x327)+_0x19d258));const _0x400e46=await withSpinner(_0x561cba(0x2e7),()=>_0xb3a71c[_0x561cba(0x2cf)][_0x561cba(0x364)](_0x5d9792,_0x1888b1,{'sessionTime':_0x19d258}),{'verbose':_0xfbd186[_0x561cba(0x350)]}),_0x322193=_0x400e46[_0x561cba(0x374)];console[_0x561cba(0x22b)](_0x561cba(0x20f)),console[_0x561cba(0x22b)](_0x561cba(0x1f9)+_0x322193['id']),console[_0x561cba(0x22b)](_0x561cba(0x32c)+_0x322193[_0x561cba(0x29a)]),console['error'](_0x561cba(0x314)+_0x322193[_0x561cba(0x23b)]?.[_0x561cba(0x30d)]),console[_0x561cba(0x22b)]('\x20\x20Workflow:\x20'+_0x322193[_0x561cba(0x2cf)]?.['name']);if(_0x322193[_0x561cba(0x23b)]?.['id']&&_0x322193[_0x561cba(0x29a)]&&_0x322193['id']){const _0x14c371=_0xfbd186['site'],_0x47654b=getConsoleUrl(_0x14c371,_0x561cba(0x318)+_0x322193[_0x561cba(0x23b)]['id']+_0x561cba(0x37b)+_0x322193['sessionId']+_0x561cba(0x1f5)+_0x322193['id']);console[_0x561cba(0x22b)](_0x561cba(0x256)+a42_0x144d21[_0x561cba(0x238)](_0x47654b));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x297);[a42_0xe6da40(0x2f2)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0xe6da40(0x1f1)](_0x3da241){const _0x26d2e8=a42_0xe6da40,{options:_0x298dd5,args:_0x28d715,tdx:_0x2ae74a}=_0x3da241,_0x251f4c=_0x28d715[0x0],_0x29ac97=_0x28d715[0x1]||'.';if(!_0x251f4c)return console[_0x26d2e8(0x22b)](_0x26d2e8(0x332)),console['error'](_0x26d2e8(0x1ff)),0x1;const _0x1d1abd=_0x298dd5[_0x26d2e8(0x30b)];_0x298dd5['verbose']&&(console['error'](_0x26d2e8(0x33c)+_0x251f4c),console[_0x26d2e8(0x22b)](_0x26d2e8(0x242)+_0x29ac97),_0x1d1abd&&console[_0x26d2e8(0x22b)](_0x26d2e8(0x250)+_0x1d1abd));const _0x5945c0=await withSpinner('Downloading\x20project\x20'+_0x251f4c+'...',()=>_0x2ae74a[_0x26d2e8(0x2cf)][_0x26d2e8(0x2fb)](_0x251f4c,_0x29ac97,{'revision':_0x1d1abd}),{'verbose':_0x298dd5[_0x26d2e8(0x350)]}),_0x4e3fcc=_0x5945c0[_0x26d2e8(0x374)];return console['error'](_0x26d2e8(0x2c2)+_0x4e3fcc['projectName']),console[_0x26d2e8(0x22b)](_0x26d2e8(0x2ac)+_0x4e3fcc['revision']),console[_0x26d2e8(0x22b)](_0x26d2e8(0x2dc)+_0x4e3fcc[_0x26d2e8(0x2e4)]),console['error'](_0x26d2e8(0x213)+_0x29ac97+'/'+_0x4e3fcc[_0x26d2e8(0x37d)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2b0);[a42_0xe6da40(0x2f2)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a42_0xe6da40(0x1f1)](_0x1dfd5e){const _0x454f26=a42_0xe6da40,{options:_0x1b1e4a,args:_0xc9f346,tdx:_0x1fc3f6}=_0x1dfd5e;let _0xf62bc9='.',_0x50915e=_0x1b1e4a[_0x454f26(0x30d)];if(_0xc9f346[0x0]){const {promises:_0x1237b7}=await import('fs');try{const _0x1b5353=await _0x1237b7['stat'](_0xc9f346[0x0]);if(_0x1b5353['isDirectory']())_0xf62bc9=_0xc9f346[0x0];else return console[_0x454f26(0x22b)](_0x454f26(0x35d)+_0xc9f346[0x0]+_0x454f26(0x211)),0x1;}catch{_0x50915e=_0xc9f346[0x0],_0xf62bc9='.';}}const _0x5398b1=_0x1b1e4a[_0x454f26(0x30b)],_0xf54192=_0x1b1e4a['skipValidation'];_0x1b1e4a[_0x454f26(0x350)]&&(console[_0x454f26(0x22b)]('Project\x20directory:\x20'+_0xf62bc9),_0x50915e&&console['error'](_0x454f26(0x23a)+_0x50915e),_0x5398b1&&console[_0x454f26(0x22b)](_0x454f26(0x250)+_0x5398b1),_0xf54192&&console[_0x454f26(0x22b)](_0x454f26(0x37c)));const _0x21bf2f=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x1fc3f6[_0x454f26(0x2cf)][_0x454f26(0x252)](_0xf62bc9,{'projectName':_0x50915e,'revision':_0x5398b1,'skipValidation':_0xf54192}),{'verbose':_0x1b1e4a[_0x454f26(0x350)]}),_0x5d5acc=_0x21bf2f['data'];return console[_0x454f26(0x22b)]('✔\x20Pushed\x20'+_0x5d5acc[_0x454f26(0x37d)]),console[_0x454f26(0x22b)]('\x20\x20Project\x20ID:\x20'+_0x5d5acc[_0x454f26(0x28b)]),console[_0x454f26(0x22b)](_0x454f26(0x2ac)+_0x5d5acc['revision']),await this['showWorkflowConsoleUrl'](_0x1fc3f6,_0x5d5acc[_0x454f26(0x37d)],_0x1b1e4a[_0x454f26(0x2f3)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2bf);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x2ad);async['execute'](_0x40c82c){const _0x33ce01=a42_0xe6da40,{options:_0xe28af5,args:_0x226bf5,tdx:_0x39571a}=_0x40c82c,_0xa0896=_0x226bf5[0x0],_0x598d70=_0x226bf5[0x1];if(!_0xa0896)return console['error'](a42_0x144d21[_0x33ce01(0x323)](_0x33ce01(0x2b5)),_0x33ce01(0x398)),console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x342)](_0x33ce01(0x35c))),0x1;const _0x2bcbc3=_0xe28af5[_0x33ce01(0x30b)];_0xe28af5[_0x33ce01(0x350)]&&(console[_0x33ce01(0x22b)]('Project:\x20'+_0xa0896),_0x598d70&&console[_0x33ce01(0x22b)](_0x33ce01(0x30e)+_0x598d70),_0x2bcbc3&&console[_0x33ce01(0x22b)](_0x33ce01(0x250)+_0x2bcbc3),_0xe28af5[_0x33ce01(0x378)]&&console[_0x33ce01(0x22b)]('Dry\x20run:\x20yes'));const _0x57741f=await withSpinner(_0x33ce01(0x26e)+_0xa0896+_0x33ce01(0x275),()=>_0x39571a[_0x33ce01(0x2cf)][_0x33ce01(0x32d)](_0xa0896,{'targetDir':_0x598d70,'revision':_0x2bcbc3}),{'verbose':_0xe28af5[_0x33ce01(0x350)]}),_0x1c4d17=_0x57741f['data'];_0x1c4d17[_0x33ce01(0x27d)]?console['error'](_0x33ce01(0x304)+_0x1c4d17[_0x33ce01(0x37d)]):console[_0x33ce01(0x22b)](_0x33ce01(0x383)+_0x1c4d17['projectName']);console[_0x33ce01(0x22b)]('\x20\x20Revision:\x20'+_0x1c4d17[_0x33ce01(0x30b)]),console['error'](_0x33ce01(0x33f)+(a42_0x17adf7['relative'](process[_0x33ce01(0x367)](),_0x1c4d17[_0x33ce01(0x26c)])||'.')),console['error']('\x20\x20Changes:\x20'+a42_0x144d21[_0x33ce01(0x295)]('+'+_0x1c4d17[_0x33ce01(0x346)][_0x33ce01(0x220)]+_0x33ce01(0x263))+',\x20'+(a42_0x144d21[_0x33ce01(0x26f)]('~'+_0x1c4d17[_0x33ce01(0x346)][_0x33ce01(0x348)]+'\x20modified')+',\x20')+(a42_0x144d21[_0x33ce01(0x323)]('-'+_0x1c4d17[_0x33ce01(0x346)][_0x33ce01(0x362)]+_0x33ce01(0x2df))+',\x20')+(''+a42_0x144d21[_0x33ce01(0x342)](_0x1c4d17['summary'][_0x33ce01(0x235)]+_0x33ce01(0x23c))));for(const _0x43cbe of _0x1c4d17[_0x33ce01(0x2a1)]){_0x43cbe[_0x33ce01(0x24d)]==='modified'&&_0x43cbe[_0x33ce01(0x334)]&&(console[_0x33ce01(0x22b)]('\x0a'+a42_0x144d21[_0x33ce01(0x238)]('---\x20'+_0x43cbe[_0x33ce01(0x37e)])),console[_0x33ce01(0x22b)](_0x43cbe[_0x33ce01(0x334)]));}if(!_0x1c4d17[_0x33ce01(0x38f)])return saveSessionContext({'workflow_project':_0x1c4d17['projectName']},_0xe28af5[_0x33ce01(0x2e6)]),console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x295)](_0x33ce01(0x2cd))),console['error'](a42_0x144d21[_0x33ce01(0x342)](_0x33ce01(0x21f)+_0x1c4d17[_0x33ce01(0x37d)])),0x0;if(_0xe28af5[_0x33ce01(0x378)])return console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x26f)](_0x33ce01(0x27b))),0x0;if(!_0xe28af5[_0x33ce01(0x288)]){if(!isInteractive())return console['error'](a42_0x144d21[_0x33ce01(0x323)]('\x0aError:'),_0x33ce01(0x243)),console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x342)](_0x33ce01(0x333))),0x1;const _0x3a6e70=await confirmKey(_0x33ce01(0x24b));if(!_0x3a6e70)return console[_0x33ce01(0x22b)](a42_0x144d21[_0x33ce01(0x26f)](_0x33ce01(0x22c)),_0x33ce01(0x2a4)),0x1;}await withSpinner('Writing\x20files...',()=>_0x39571a[_0x33ce01(0x2cf)][_0x33ce01(0x29b)](_0x1c4d17,{'revision':_0x2bcbc3}),{'verbose':_0xe28af5[_0x33ce01(0x350)]}),saveSessionContext({'workflow_project':_0x1c4d17[_0x33ce01(0x37d)]},_0xe28af5[_0x33ce01(0x2e6)]),console['error'](a42_0x144d21['green']('✔\x20Pull\x20complete'));const _0x49c604=a42_0x17adf7[_0x33ce01(0x307)](process['cwd'](),_0x1c4d17[_0x33ce01(0x26c)])||'.';return console['error'](a42_0x144d21['dim']('\x20\x20Location:\x20'+_0x49c604)),console['error'](a42_0x144d21['dim'](_0x33ce01(0x21f)+_0x1c4d17[_0x33ce01(0x37d)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x203);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x22f);async[a42_0xe6da40(0x1f1)](_0x3a11c1){const _0x5f17ab=a42_0xe6da40,{options:_0x1142be,args:_0x25a900,tdx:_0x12ef40}=_0x3a11c1,_0x5a468a=this[_0x5f17ab(0x36e)](_0x25a900,_0x1142be),_0x30ed60=_0x1142be[_0x5f17ab(0x30b)],_0x23ea9a=_0x1142be[_0x5f17ab(0x253)];_0x1142be[_0x5f17ab(0x350)]&&(_0x5a468a&&console[_0x5f17ab(0x22b)](_0x5f17ab(0x2ff)+_0x5a468a),_0x30ed60&&console[_0x5f17ab(0x22b)](_0x5f17ab(0x250)+_0x30ed60),_0x1142be[_0x5f17ab(0x378)]&&console['error']('Dry\x20run:\x20yes'),_0x23ea9a&&console['error'](_0x5f17ab(0x37c)));let _0x567472;try{_0x567472=await withSpinner('Analyzing\x20changes...',()=>_0x12ef40['workflow'][_0x5f17ab(0x25c)]({'sourceDir':_0x5a468a,'revision':_0x30ed60,'skipValidation':_0x23ea9a}),{'verbose':_0x1142be[_0x5f17ab(0x350)]});}catch(_0x54892f){if(_0x54892f instanceof Error&&_0x54892f[_0x5f17ab(0x34f)][_0x5f17ab(0x2c9)]('No\x20workflow\x20tdx.json\x20found'))return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x323)](_0x5f17ab(0x2b5)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x1142be['workflowProject']?console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x342)]('Tip:\x20cd\x20to\x20workflows/'+_0x1142be['workflowProject']+_0x5f17ab(0x1fc)+_0x1142be[_0x5f17ab(0x308)]+'\x27')):console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x342)](_0x5f17ab(0x2ba))),0x1;throw _0x54892f;}const _0x4ee35a=_0x567472[_0x5f17ab(0x374)];console[_0x5f17ab(0x22b)]('✔\x20Project:\x20'+_0x4ee35a[_0x5f17ab(0x37d)]),console[_0x5f17ab(0x22b)](_0x5f17ab(0x262)+_0x4ee35a[_0x5f17ab(0x316)]),console[_0x5f17ab(0x22b)](_0x5f17ab(0x2ac)+_0x4ee35a['revision']),console['error'](_0x5f17ab(0x24e)+a42_0x144d21['green']('+'+_0x4ee35a['summary'][_0x5f17ab(0x220)]+_0x5f17ab(0x263))+',\x20'+(a42_0x144d21[_0x5f17ab(0x26f)]('~'+_0x4ee35a['summary'][_0x5f17ab(0x348)]+_0x5f17ab(0x230))+',\x20')+(a42_0x144d21[_0x5f17ab(0x323)]('-'+_0x4ee35a[_0x5f17ab(0x346)][_0x5f17ab(0x362)]+_0x5f17ab(0x2df))+',\x20')+(''+a42_0x144d21[_0x5f17ab(0x342)](_0x4ee35a[_0x5f17ab(0x346)][_0x5f17ab(0x235)]+_0x5f17ab(0x23c))));for(const _0x30dc52 of _0x4ee35a[_0x5f17ab(0x2a1)]){_0x30dc52[_0x5f17ab(0x24d)]==='modified'&&_0x30dc52['diff']&&(console[_0x5f17ab(0x22b)]('\x0a'+a42_0x144d21['cyan'](_0x5f17ab(0x280)+_0x30dc52[_0x5f17ab(0x37e)])),console[_0x5f17ab(0x22b)](_0x30dc52[_0x5f17ab(0x334)]));}if(!_0x4ee35a[_0x5f17ab(0x38f)])return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x295)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x5f17ab(0x20b)](_0x12ef40,_0x4ee35a[_0x5f17ab(0x37d)],_0x1142be[_0x5f17ab(0x2f3)]),0x0;if(_0x1142be['dryRun'])return console['error'](a42_0x144d21[_0x5f17ab(0x26f)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x1142be['yes']){if(!isInteractive())return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x323)](_0x5f17ab(0x224)),_0x5f17ab(0x243)),console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x342)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x35c22e=await confirmKey(_0x5f17ab(0x251));if(!_0x35c22e)return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x26f)](_0x5f17ab(0x22c)),_0x5f17ab(0x390)),0x1;}const _0x17d490=await withSpinner(_0x5f17ab(0x2da),()=>_0x12ef40[_0x5f17ab(0x2cf)]['executePushProject'](_0x4ee35a),{'verbose':_0x1142be['verbose']}),_0x14e7a5=_0x17d490['data'];return console[_0x5f17ab(0x22b)](a42_0x144d21[_0x5f17ab(0x295)](_0x5f17ab(0x2af))),console['error'](_0x5f17ab(0x215)+_0x14e7a5[_0x5f17ab(0x28b)]),console['error'](_0x5f17ab(0x2ac)+_0x14e7a5[_0x5f17ab(0x30b)]),await this[_0x5f17ab(0x20b)](_0x12ef40,_0x14e7a5[_0x5f17ab(0x37d)],_0x1142be['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x286);[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x259);async[a42_0xe6da40(0x1f1)](_0x51ff1d){const _0x1a1a26=a42_0xe6da40,{options:_0x1252e5,args:_0x33a8c7,tdx:_0xbabde6}=_0x51ff1d,_0x2a01b3=this[_0x1a1a26(0x36e)](_0x33a8c7,_0x1252e5),_0x5b9bd6=_0x1252e5[_0x1a1a26(0x30d)],_0x4ab5b1=_0x1252e5[_0x1a1a26(0x30b)],_0x258d4a=_0x1252e5[_0x1a1a26(0x253)];if(!_0x2a01b3)return console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x323)]('Error:'),_0x1a1a26(0x2ed)),console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x342)](_0x1a1a26(0x33b))),console['error'](a42_0x144d21[_0x1a1a26(0x342)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x5b9bd6)return console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x323)](_0x1a1a26(0x2b5)),_0x1a1a26(0x335)),console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x342)](_0x1a1a26(0x33b))),0x1;_0x1252e5['verbose']&&(console['error'](_0x1a1a26(0x2ff)+_0x2a01b3),console[_0x1a1a26(0x22b)]('New\x20project\x20name:\x20'+_0x5b9bd6),_0x4ab5b1&&console[_0x1a1a26(0x22b)](_0x1a1a26(0x250)+_0x4ab5b1),_0x1252e5['dryRun']&&console[_0x1a1a26(0x22b)](_0x1a1a26(0x1f0)),_0x258d4a&&console[_0x1a1a26(0x22b)](_0x1a1a26(0x37c)));const _0x171dd9=await withSpinner('Analyzing\x20project...',()=>_0xbabde6[_0x1a1a26(0x2cf)][_0x1a1a26(0x306)](_0x2a01b3,_0x5b9bd6,{'revision':_0x4ab5b1,'skipValidation':_0x258d4a}),{'verbose':_0x1252e5[_0x1a1a26(0x350)]}),_0x3d7f8d=_0x171dd9['data'];console[_0x1a1a26(0x22b)]('Source:\x20'+_0x3d7f8d['sourceDir']);_0x3d7f8d['sourceProjectName']&&console[_0x1a1a26(0x22b)](_0x1a1a26(0x284)+_0x3d7f8d[_0x1a1a26(0x365)]);console[_0x1a1a26(0x22b)]('New\x20project\x20name:\x20'+_0x3d7f8d[_0x1a1a26(0x2d9)]),console[_0x1a1a26(0x22b)](_0x1a1a26(0x250)+_0x3d7f8d[_0x1a1a26(0x30b)]),console[_0x1a1a26(0x22b)](_0x1a1a26(0x373)+_0x3d7f8d[_0x1a1a26(0x2ec)]);_0x3d7f8d[_0x1a1a26(0x381)]&&(console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x26f)]('\x0a⚠\x20Project\x20\x22'+_0x3d7f8d['newProjectName']+_0x1a1a26(0x33e)+_0x3d7f8d['existingProjectId']+')')),console[_0x1a1a26(0x22b)](a42_0x144d21['yellow']('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x1252e5['dryRun'])return console[_0x1a1a26(0x22b)](a42_0x144d21['yellow'](_0x1a1a26(0x1f3))),0x0;if(!_0x1252e5[_0x1a1a26(0x288)]){if(!isInteractive())return console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x323)](_0x1a1a26(0x224)),_0x1a1a26(0x243)),console['error'](a42_0x144d21[_0x1a1a26(0x342)](_0x1a1a26(0x333))),0x1;const _0x11eb32=_0x3d7f8d['sourceProjectName']||a42_0x17adf7[_0x1a1a26(0x399)](_0x2a01b3),_0x2f8e7e=_0x3d7f8d[_0x1a1a26(0x381)]?_0x1a1a26(0x257)+_0x5b9bd6+_0x1a1a26(0x2b8):_0x1a1a26(0x200)+_0x11eb32+_0x1a1a26(0x29f)+_0x5b9bd6+'\x22?',_0x9a4c9e=await confirmKey(_0x2f8e7e);if(!_0x9a4c9e)return console[_0x1a1a26(0x22b)](a42_0x144d21[_0x1a1a26(0x26f)]('Cancelled')),0x1;}const _0x34871c=await withSpinner(_0x3d7f8d['targetExists']?'Updating\x20'+_0x5b9bd6+'...':'Cloning\x20to\x20'+_0x5b9bd6+'...',()=>_0xbabde6[_0x1a1a26(0x2cf)][_0x1a1a26(0x2a2)](_0x3d7f8d),{'verbose':_0x1252e5['verbose']}),_0x2fd684=_0x34871c[_0x1a1a26(0x374)];return console[_0x1a1a26(0x22b)](a42_0x144d21['green'](_0x3d7f8d[_0x1a1a26(0x381)]?_0x1a1a26(0x2e5):'✔\x20Clone\x20complete')),console[_0x1a1a26(0x22b)](_0x1a1a26(0x314)+_0x2fd684[_0x1a1a26(0x2d9)]),console[_0x1a1a26(0x22b)](_0x1a1a26(0x215)+_0x2fd684[_0x1a1a26(0x20e)]),console[_0x1a1a26(0x22b)]('\x20\x20Revision:\x20'+_0x2fd684[_0x1a1a26(0x30b)]),await this[_0x1a1a26(0x20b)](_0xbabde6,_0x2fd684[_0x1a1a26(0x2d9)],_0x1252e5[_0x1a1a26(0x2f3)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x34a);[a42_0xe6da40(0x2f2)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0xe6da40(0x1f1)](_0xd3f620){const _0x39491f=a42_0xe6da40,{options:_0x18872f,args:_0x566122,tdx:_0x1f6b93}=_0xd3f620,_0x43b72d=_0x566122[0x0];if(!_0x43b72d)return console[_0x39491f(0x22b)](_0x39491f(0x202)),console[_0x39491f(0x22b)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x18872f[_0x39491f(0x350)]&&console[_0x39491f(0x22b)](_0x39491f(0x33c)+_0x43b72d);if(!_0x18872f['yes']){if(!isInteractive())return console[_0x39491f(0x22b)](a42_0x144d21['red'](_0x39491f(0x224)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x39491f(0x22b)](a42_0x144d21[_0x39491f(0x342)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1908ab=await confirmKey(_0x39491f(0x2d6)+_0x43b72d+_0x39491f(0x34e));if(!_0x1908ab)return console[_0x39491f(0x22b)](a42_0x144d21['yellow'](_0x39491f(0x22c))),0x1;}const _0x300eef=await withSpinner(_0x39491f(0x391)+_0x43b72d+_0x39491f(0x275),()=>_0x1f6b93[_0x39491f(0x2cf)][_0x39491f(0x231)](_0x43b72d),{'verbose':_0x18872f['verbose']}),_0x2f1b8c=_0x300eef[_0x39491f(0x374)];return console['error'](_0x39491f(0x29c)+_0x2f1b8c[_0x39491f(0x37d)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x2f1b8c[_0x39491f(0x28b)]),0x0;}}export function parseKeyValue(_0x156d6b){const _0xaa9089=a42_0xe6da40,_0x49b428=_0x156d6b['indexOf']('=');if(_0x49b428===-0x1)throw new Error(_0xaa9089(0x388)+_0x156d6b+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x31de7b=_0x156d6b['substring'](0x0,_0x49b428),_0x2e7ece=_0x156d6b[_0xaa9089(0x34c)](_0x49b428+0x1);if(!_0x31de7b)throw new Error(_0xaa9089(0x234));return{'key':_0x31de7b,'value':_0x2e7ece};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x2e2);['description']='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0xe6da40(0x1f1)](_0x1048aa){const _0x5ed5fc=a42_0xe6da40,{options:_0x4ad9c4,args:_0x40ce6e,tdx:_0x557708}=_0x1048aa,_0x47d5d4=this[_0x5ed5fc(0x366)](_0x40ce6e,_0x4ad9c4);if(!_0x47d5d4)return 0x1;_0x4ad9c4['verbose']&&console[_0x5ed5fc(0x22b)](_0x5ed5fc(0x33c)+_0x47d5d4);const _0xd3e8da=await withSpinner(_0x5ed5fc(0x27e),()=>_0x557708[_0x5ed5fc(0x2cf)][_0x5ed5fc(0x298)](_0x47d5d4),{'verbose':_0x4ad9c4[_0x5ed5fc(0x350)]}),{secrets:_0x5dab75}=_0xd3e8da[_0x5ed5fc(0x374)];return console[_0x5ed5fc(0x22b)](_0x5ed5fc(0x229)+_0x5dab75[_0x5ed5fc(0x328)]+_0x5ed5fc(0x279)+(_0x5dab75['length']!==0x1?'s':'')),await handleSDKOutput(_0x5dab75,_0x4ad9c4),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]=a42_0xe6da40(0x232);['description']=a42_0xe6da40(0x216);async['execute'](_0x4bc710){const _0x56f6cd=a42_0xe6da40,{options:_0x451db8,args:_0x50b6b1,tdx:_0x3334cb}=_0x4bc710;let _0x50dbac,_0x14238a;if(_0x50b6b1[_0x56f6cd(0x328)]>=0x2)_0x50dbac=_0x50b6b1[0x0],_0x14238a=_0x50b6b1[0x1];else{if(_0x50b6b1[_0x56f6cd(0x328)]===0x1&&_0x451db8[_0x56f6cd(0x308)])_0x50dbac=_0x451db8['workflowProject'],_0x14238a=_0x50b6b1[0x0];else return _0x50b6b1[_0x56f6cd(0x328)]===0x1?(console[_0x56f6cd(0x22b)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x56f6cd(0x2dd)),0x1):(console[_0x56f6cd(0x22b)](_0x56f6cd(0x289)),console[_0x56f6cd(0x22b)](_0x56f6cd(0x20a)),0x1);}let _0x4541b2,_0x474de1;try{({key:_0x4541b2,value:_0x474de1}=parseKeyValue(_0x14238a));}catch(_0x3f3dd0){return _0x3f3dd0 instanceof Error&&console[_0x56f6cd(0x22b)](a42_0x144d21[_0x56f6cd(0x323)](_0x56f6cd(0x2b5)),_0x3f3dd0[_0x56f6cd(0x34f)]),0x1;}_0x451db8[_0x56f6cd(0x350)]&&(console[_0x56f6cd(0x22b)](_0x56f6cd(0x33c)+_0x50dbac),console['error'](_0x56f6cd(0x30c)+_0x4541b2));const _0x4f9fe7=await withSpinner(_0x56f6cd(0x2c3),()=>_0x3334cb['workflow'][_0x56f6cd(0x28c)](_0x50dbac,_0x4541b2,_0x474de1),{'verbose':_0x451db8['verbose']}),_0x3cb649=_0x4f9fe7[_0x56f6cd(0x374)];return console[_0x56f6cd(0x22b)](_0x56f6cd(0x23d)+_0x3cb649['key']+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x3cb649['projectName']+'\x27'),(_0x451db8['json']||_0x451db8[_0x56f6cd(0x25a)])&&await handleSingleObjectOutput(_0x3cb649,_0x451db8),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0xe6da40(0x30d)]='workflow:secrets:delete';[a42_0xe6da40(0x2f2)]=a42_0xe6da40(0x1f2);async['execute'](_0x230ec5){const _0x573bdf=a42_0xe6da40,{options:_0x3a4d00,args:_0xaf296e,tdx:_0x489908}=_0x230ec5;let _0x5346b5,_0x27440c;if(_0xaf296e['length']>=0x2)_0x5346b5=_0xaf296e[0x0],_0x27440c=_0xaf296e[0x1];else{if(_0xaf296e[_0x573bdf(0x328)]===0x1&&_0x3a4d00[_0x573bdf(0x308)])_0x5346b5=_0x3a4d00['workflowProject'],_0x27440c=_0xaf296e[0x0];else return _0xaf296e['length']===0x1?(console['error'](_0x573bdf(0x332)),console[_0x573bdf(0x22b)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error'](_0x573bdf(0x2c4)),console[_0x573bdf(0x22b)](_0x573bdf(0x2fa)),0x1);}_0x3a4d00[_0x573bdf(0x350)]&&(console[_0x573bdf(0x22b)](_0x573bdf(0x33c)+_0x5346b5),console[_0x573bdf(0x22b)](_0x573bdf(0x30c)+_0x27440c));if(!_0x3a4d00[_0x573bdf(0x288)]){if(!isInteractive())return console[_0x573bdf(0x22b)](a42_0x144d21[_0x573bdf(0x323)](_0x573bdf(0x224)),_0x573bdf(0x243)),console['error'](a42_0x144d21[_0x573bdf(0x342)](_0x573bdf(0x333))),0x1;const _0x14aa38=await confirmKey(_0x573bdf(0x337)+_0x27440c+'\x27\x20from\x20project\x20\x27'+_0x5346b5+'\x27?');if(!_0x14aa38)return console[_0x573bdf(0x22b)](a42_0x144d21[_0x573bdf(0x26f)](_0x573bdf(0x22c))),0x1;}const _0x43da64=await withSpinner(_0x573bdf(0x331),()=>_0x489908[_0x573bdf(0x2cf)][_0x573bdf(0x2d5)](_0x5346b5,_0x27440c),{'verbose':_0x3a4d00[_0x573bdf(0x350)]}),_0x51c180=_0x43da64['data'];return console[_0x573bdf(0x22b)](_0x573bdf(0x23d)+_0x51c180[_0x573bdf(0x239)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x51c180[_0x573bdf(0x37d)]+'\x27'),(_0x3a4d00[_0x573bdf(0x385)]||_0x3a4d00[_0x573bdf(0x25a)])&&await handleSingleObjectOutput(_0x51c180,_0x3a4d00),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(_0x10d5b7){const _0x4737f5=a42_0xe6da40,_0x1aec07=Math['floor'](_0x10d5b7/0x3e8),_0x5e0362=Math[_0x4737f5(0x240)](_0x1aec07/0x3c),_0x19d29e=Math[_0x4737f5(0x240)](_0x5e0362/0x3c),_0x15a2fa=Math[_0x4737f5(0x240)](_0x19d29e/0x18);if(_0x15a2fa>0x0){const _0x177218=_0x19d29e%0x18;return _0x177218>0x0?_0x15a2fa+'d\x20'+_0x177218+'h':_0x15a2fa+'d';}else{if(_0x19d29e>0x0){const _0xbbfce6=_0x5e0362%0x3c;return _0xbbfce6>0x0?_0x19d29e+'h\x20'+_0xbbfce6+'m':_0x19d29e+'h';}else{if(_0x5e0362>0x0){const _0x344562=_0x1aec07%0x3c;return _0x344562>0x0?_0x5e0362+'m\x20'+_0x344562+'s':_0x5e0362+'m';}else return _0x1aec07+'s';}}}function formatTimestamp(_0xfe3b3a,_0x455df1){const _0x55c0a5=a42_0xe6da40,_0x4e1a90=new Date(_0xfe3b3a),_0x2ae41d=String(_0x4e1a90[_0x55c0a5(0x21b)]())[_0x55c0a5(0x2a6)](0x2,'0'),_0x25f358=String(_0x4e1a90[_0x55c0a5(0x2db)]())[_0x55c0a5(0x2a6)](0x2,'0'),_0x3c5d02=_0x2ae41d+':'+_0x25f358,_0x822f29=_0x4e1a90[_0x55c0a5(0x23f)]()===_0x455df1[_0x55c0a5(0x23f)]()&&_0x4e1a90[_0x55c0a5(0x265)]()===_0x455df1['getMonth']()&&_0x4e1a90[_0x55c0a5(0x2e8)]()===_0x455df1[_0x55c0a5(0x2e8)]();if(_0x822f29)return _0x3c5d02;else{const _0x3207c7=String(_0x4e1a90[_0x55c0a5(0x265)]()+0x1)[_0x55c0a5(0x2a6)](0x2,'0'),_0x5ce4d0=String(_0x4e1a90[_0x55c0a5(0x2e8)]())[_0x55c0a5(0x2a6)](0x2,'0');return _0x3207c7+'-'+_0x5ce4d0+'\x20'+_0x3c5d02;}}function formatDate(_0xa34c9f){const _0x1a1a63=a42_0xe6da40,_0x1eef49=_0xa34c9f[_0x1a1a63(0x23f)](),_0x3af6f3=String(_0xa34c9f[_0x1a1a63(0x265)]()+0x1)[_0x1a1a63(0x2a6)](0x2,'0'),_0x87dc4d=String(_0xa34c9f['getDate']())[_0x1a1a63(0x2a6)](0x2,'0');return _0x1eef49+'-'+_0x3af6f3+'-'+_0x87dc4d;}function getTaskStateIcon(_0x476358){const _0x4cc295={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x4cc295[_0x476358]||'⚪';}function getBarChar(_0x4455a2){const _0x543471=a42_0xe6da40;return _0x4455a2===_0x543471(0x22b)||_0x4455a2===_0x543471(0x303)?'×':'─';}function getBarColor(_0x19a9d9){const _0x2d5a92=a42_0xe6da40,_0xce4ce={'success':a42_0x144d21[_0x2d5a92(0x295)],'error':a42_0x144d21[_0x2d5a92(0x323)],'group_error':a42_0x144d21[_0x2d5a92(0x323)],'running':a42_0x144d21['blue'],'blocked':a42_0x144d21['yellow'],'planned':a42_0x144d21[_0x2d5a92(0x342)],'canceling':a42_0x144d21[_0x2d5a92(0x26f)]};return _0xce4ce[_0x19a9d9]||a42_0x144d21[_0x2d5a92(0x31c)];}function parseTaskName(_0x412898){const _0x264d95=a42_0xe6da40;let _0x1d873c=_0x412898['replace'](/^\++/,'');const _0x44cb3c=_0x1d873c[_0x264d95(0x396)]('+'),_0xa39d01=_0x44cb3c[_0x264d95(0x328)]>0x1?_0x44cb3c[_0x264d95(0x328)]-0x2:0x0,_0x494df8=_0x44cb3c[_0x44cb3c[_0x264d95(0x328)]-0x1]||_0x1d873c;return{'level':_0xa39d01,'name':'+'+_0x494df8};}function truncateTaskName(_0x2b2253,_0x4de63b){const _0x4999fe=a42_0xe6da40,_0x2ce12a=stringWidth(_0x2b2253);if(_0x2ce12a<=_0x4de63b)return _0x2b2253;let _0x111b23=_0x2b2253;while(stringWidth(_0x111b23+'…')>_0x4de63b&&_0x111b23[_0x4999fe(0x328)]>0x0){_0x111b23=_0x111b23[_0x4999fe(0x1f8)](0x0,-0x1);}return _0x111b23+'…';}function calculateTimeScale(_0x48c847,_0x2081ad){const _0x5a5ce6=a42_0xe6da40;return{'startTime':_0x48c847[_0x5a5ce6(0x347)],'endTime':_0x48c847[_0x5a5ce6(0x375)],'durationMs':_0x48c847[_0x5a5ce6(0x38b)],'msPerChar':_0x48c847['duration']/_0x2081ad};}function timeToPosition(_0x5c59b4,_0x134407,_0x5833fe){const _0x34be48=a42_0xe6da40,_0x11cc87=_0x5c59b4-_0x134407[_0x34be48(0x294)],_0x48a35f=Math[_0x34be48(0x240)](_0x11cc87/_0x134407[_0x34be48(0x302)]);return Math[_0x34be48(0x2b1)](0x0,Math[_0x34be48(0x32a)](_0x48a35f,_0x5833fe));}function renderTimeAxis(_0x427b4a,_0x4241b9){const _0x17c0ce=a42_0xe6da40,_0x1f1fb4=Math[_0x17c0ce(0x32a)](TIMELINE_CONFIG[_0x17c0ce(0x266)],Math[_0x17c0ce(0x2b1)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math['floor'](_0x4241b9/TIMELINE_CONFIG[_0x17c0ce(0x23e)]))),_0x5d4abe=_0x427b4a['durationMs']/(_0x1f1fb4-0x1),_0x35f227=new Date(_0x427b4a[_0x17c0ce(0x294)]),_0x287650=[];for(let _0x24da8b=0x0;_0x24da8b<_0x1f1fb4;_0x24da8b++){const _0x45d92b=_0x427b4a[_0x17c0ce(0x294)]+_0x24da8b*_0x5d4abe,_0x9c9d3f=timeToPosition(_0x45d92b,_0x427b4a,_0x4241b9),_0x5c58ae=formatTimestamp(_0x45d92b,_0x35f227);_0x287650['push']({'pos':_0x9c9d3f,'text':_0x5c58ae});}const _0x3279a3=new Array(_0x4241b9)[_0x17c0ce(0x276)]('\x20');let _0x3b426d=-0x1;for(const {pos:_0x448bb8,text:_0x4e494e}of _0x287650){let _0x2cc4ee=Math[_0x17c0ce(0x2b1)](0x0,_0x448bb8-Math[_0x17c0ce(0x240)](_0x4e494e[_0x17c0ce(0x328)]/0x2));_0x2cc4ee<=_0x3b426d+TIMELINE_CONFIG[_0x17c0ce(0x310)]&&(_0x2cc4ee=_0x3b426d+TIMELINE_CONFIG[_0x17c0ce(0x310)]+0x1);_0x2cc4ee+_0x4e494e[_0x17c0ce(0x328)]>_0x4241b9&&(_0x2cc4ee=_0x4241b9-_0x4e494e[_0x17c0ce(0x328)]);if(_0x2cc4ee>=0x0&&_0x2cc4ee+_0x4e494e[_0x17c0ce(0x328)]<=_0x4241b9&&_0x2cc4ee>_0x3b426d){for(let _0x1f0ce5=0x0;_0x1f0ce5<_0x4e494e[_0x17c0ce(0x328)];_0x1f0ce5++){_0x3279a3[_0x2cc4ee+_0x1f0ce5]=_0x4e494e[_0x1f0ce5];}_0x3b426d=_0x2cc4ee+_0x4e494e[_0x17c0ce(0x328)]-0x1;}}return _0x3279a3[_0x17c0ce(0x1fd)]('');}function renderTaskRow(_0x3232a3,_0x3acee9,_0xea2b6f,_0x4623f5){const _0x43822c=a42_0xe6da40,{level:_0x4b8b20,name:_0x599d80}=parseTaskName(_0x3232a3[_0x43822c(0x30d)]),_0x4a89cf='\x20'[_0x43822c(0x278)](_0x4b8b20),_0x531d57=_0x3232a3['window']?'('+formatElapsed(_0x3232a3[_0x43822c(0x22d)][_0x43822c(0x38b)])+')':'',_0x1c3ca2=stringWidth(_0x531d57),_0xb9d219=_0x4b8b20*0x1,_0x5cebe5=_0x4623f5-_0xb9d219-_0x1c3ca2-0x1,_0x4bfd71=truncateTaskName(_0x599d80,_0x5cebe5),_0x5a75f2=_0x4a89cf+_0x4bfd71,_0x24629e=stringWidth(_0x5a75f2),_0x7b939e=_0x4623f5-_0x24629e-_0x1c3ca2,_0x3b14d2=_0x5a75f2+'\x20'[_0x43822c(0x278)](Math[_0x43822c(0x2b1)](0x1,_0x7b939e))+a42_0x144d21['dim'](_0x531d57),_0x279795=getTaskStateIcon(_0x3232a3[_0x43822c(0x29e)]),_0x335ec7=new Array(_0xea2b6f)['fill']('\x20');if(_0x3232a3[_0x43822c(0x22d)]){const _0x115577=timeToPosition(_0x3232a3['window'][_0x43822c(0x347)],_0x3acee9,_0xea2b6f),_0x549d82=timeToPosition(_0x3232a3[_0x43822c(0x22d)][_0x43822c(0x375)],_0x3acee9,_0xea2b6f),_0x8031f9=getBarChar(_0x3232a3[_0x43822c(0x29e)]),_0x4f5011=Math['max'](_0x115577+0x1,_0x549d82);for(let _0xdca03d=_0x115577;_0xdca03d<Math[_0x43822c(0x32a)](_0x4f5011,_0xea2b6f);_0xdca03d++){_0x335ec7[_0xdca03d]=_0x8031f9;}}const _0x574273=getBarColor(_0x3232a3[_0x43822c(0x29e)]),_0x27d24b=_0x335ec7[_0x43822c(0x258)](_0x162b4a=>_0x162b4a==='\x20'?'\x20':_0x574273(_0x162b4a))[_0x43822c(0x1fd)]('');return _0x279795+'\x20'+_0x3b14d2+'│'+_0x27d24b+'│';}function calculateStats(_0x53b926){const _0x505be7=a42_0xe6da40,_0x1edcee={'total':_0x53b926[_0x505be7(0x328)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x58b2a8 of _0x53b926){if(_0x58b2a8[_0x505be7(0x29e)]==='success')_0x1edcee['success']++;else{if(_0x58b2a8[_0x505be7(0x29e)]==='error'||_0x58b2a8[_0x505be7(0x29e)]==='group_error')_0x1edcee['error']++;else _0x58b2a8[_0x505be7(0x29e)]===_0x505be7(0x2c7)?_0x1edcee[_0x505be7(0x2c7)]++:_0x1edcee[_0x505be7(0x21d)]++;}}return _0x1edcee;}function formatStats(_0x2a5110){const _0x27e7f5=a42_0xe6da40;return[_0x27e7f5(0x352)+_0x2a5110[_0x27e7f5(0x389)],'✅\x20'+_0x2a5110['success'],'❌\x20'+_0x2a5110[_0x27e7f5(0x22b)],_0x27e7f5(0x268)+_0x2a5110[_0x27e7f5(0x2c7)],'⏳\x20'+_0x2a5110[_0x27e7f5(0x21d)]][_0x27e7f5(0x1fd)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0xe6da40(0x22e);['description']=a42_0xe6da40(0x255);async[a42_0xe6da40(0x1f1)](_0x41a4a2){const _0x3be7da=a42_0xe6da40,{options:_0x3fb9d3,args:_0x292f9b,tdx:_0x5c6924}=_0x41a4a2;let _0x5ecc50,_0x3e6917,_0x5c2a84=![];if(_0x292f9b[0x0]){if(_0x292f9b[0x0]['includes']('.')){const _0x1b3f14=this[_0x3be7da(0x2be)](_0x292f9b,_0x3fb9d3);if(!_0x1b3f14)return 0x1;_0x5ecc50=_0x1b3f14[_0x3be7da(0x37d)],_0x3e6917=_0x1b3f14[_0x3be7da(0x368)];}else{_0x3e6917=_0x292f9b[0x0],_0x5ecc50=_0x3fb9d3[_0x3be7da(0x308)];if(!_0x5ecc50)return console[_0x3be7da(0x22b)](a42_0x144d21[_0x3be7da(0x323)](_0x3be7da(0x2b5)),_0x3be7da(0x287)),0x1;_0x5c2a84=!![];}}else{const _0x95479e=this[_0x3be7da(0x2be)](_0x292f9b,_0x3fb9d3);if(!_0x95479e)return 0x1;_0x5ecc50=_0x95479e[_0x3be7da(0x37d)],_0x3e6917=_0x95479e[_0x3be7da(0x368)];}if(_0x3fb9d3['verbose']){if(_0x5ecc50&&_0x3e6917)console[_0x3be7da(0x22b)](_0x3be7da(0x204)+_0x5ecc50+'.'+_0x3e6917);else _0x5ecc50&&console[_0x3be7da(0x22b)]('Filter:\x20project='+_0x5ecc50);}const _0x3d2d1a=_0x3fb9d3[_0x3be7da(0x382)],_0x593f01=_0x3fb9d3['sessionId'];if(_0x3d2d1a){_0x593f01&&console[_0x3be7da(0x22b)](a42_0x144d21[_0x3be7da(0x26f)](_0x3be7da(0x395)),_0x3be7da(0x22a));const _0xc80c53=_0x3fb9d3[_0x3be7da(0x209)];return _0xc80c53?await this[_0x3be7da(0x379)](_0x41a4a2,_0x3d2d1a):await this['renderSingleTimeline'](_0x41a4a2,_0x3d2d1a,_0x3fb9d3),0x0;}if(_0x593f01){const _0x12e7f8=await withSpinner('Loading\x20session...',()=>_0x5c6924[_0x3be7da(0x2cf)][_0x3be7da(0x2e9)]({'projectName':_0x5ecc50,'workflowName':_0x3e6917,'limit':0x64}),{'verbose':_0x3fb9d3[_0x3be7da(0x350)]}),_0x3c0f32=_0x12e7f8[_0x3be7da(0x374)][_0x3be7da(0x2b9)](_0x2bb2de=>_0x2bb2de['id']===_0x593f01);if(!_0x3c0f32)return console['error'](a42_0x144d21[_0x3be7da(0x323)](_0x3be7da(0x2b5)),_0x3be7da(0x2cc)+_0x593f01),0x1;if(!_0x3c0f32[_0x3be7da(0x2e0)]?.['id'])return console[_0x3be7da(0x22b)](a42_0x144d21[_0x3be7da(0x323)](_0x3be7da(0x2b5)),_0x3be7da(0x36a)+_0x593f01+_0x3be7da(0x2bd)),0x1;const _0x1d3f63=_0x3c0f32['lastAttempt']['id'];_0x3fb9d3['verbose']&&console['error'](_0x3be7da(0x2eb)+_0x1d3f63+'\x20from\x20session\x20'+_0x593f01);const _0x4c5024=_0x3fb9d3[_0x3be7da(0x209)];return _0x4c5024?await this[_0x3be7da(0x379)](_0x41a4a2,_0x1d3f63):await this[_0x3be7da(0x35e)](_0x41a4a2,_0x1d3f63,_0x3fb9d3),0x0;}const _0x55006f=await withSpinner(_0x3be7da(0x222),()=>_0x5c6924[_0x3be7da(0x2cf)][_0x3be7da(0x2e9)]({'projectName':_0x5ecc50,'workflowName':_0x3e6917,'limit':_0x3fb9d3[_0x3be7da(0x28f)]||0x32}),{'verbose':_0x3fb9d3[_0x3be7da(0x350)]}),_0x488e13=_0x55006f[_0x3be7da(0x374)];if(_0x488e13[_0x3be7da(0x328)]===0x0){if(_0x5ecc50&&_0x3e6917)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x5ecc50+'.'+_0x3e6917);else _0x5ecc50?console[_0x3be7da(0x22b)](_0x3be7da(0x264)+_0x5ecc50):(console[_0x3be7da(0x22b)](_0x3be7da(0x325)),console[_0x3be7da(0x22b)](a42_0x144d21[_0x3be7da(0x342)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x488e13[_0x3be7da(0x341)]((_0x7869dc,_0x4a98c6)=>{const _0x325bd5=_0x3be7da,_0x1e2d65=_0x7869dc[_0x325bd5(0x31f)]||'',_0x120c28=_0x4a98c6[_0x325bd5(0x31f)]||'';return _0x120c28[_0x325bd5(0x233)](_0x1e2d65);});if(_0x3fb9d3[_0x3be7da(0x385)]||_0x3fb9d3['jsonl'])return await handleSDKOutput(_0x488e13,_0x3fb9d3),0x0;let _0x323d2c;if(_0x5c2a84){const _0x329b76=_0x488e13[0x0];if(!_0x329b76[_0x3be7da(0x2e0)]?.['id'])return console[_0x3be7da(0x22b)](_0x3be7da(0x358)),0x0;_0x323d2c=_0x329b76[_0x3be7da(0x2e0)]['id'],_0x3fb9d3[_0x3be7da(0x350)]&&console[_0x3be7da(0x22b)](_0x3be7da(0x338)+_0x329b76[_0x3be7da(0x31f)]);}else{const _0x73da25=_0x488e13[_0x3be7da(0x258)](_0x3f7d64=>{const _0x2a71cb=_0x3be7da,_0x1d7169=getAttemptStatusDisplay(_0x3f7d64[_0x2a71cb(0x2e0)]);return{'title':_0x3f7d64[_0x2a71cb(0x23b)]?.[_0x2a71cb(0x30d)]+'.'+_0x3f7d64[_0x2a71cb(0x2cf)]?.[_0x2a71cb(0x30d)]+_0x2a71cb(0x380)+_0x3f7d64['sessionTime']+'\x20'+_0x1d7169['icon'],'value':_0x3f7d64[_0x2a71cb(0x2e0)]?.['id']||'','description':_0x1d7169[_0x2a71cb(0x2f5)]};}),_0x105db1=await a42_0x36de0e({'type':_0x3be7da(0x27c),'name':_0x3be7da(0x382),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x73da25['filter'](_0x26fb21=>_0x26fb21[_0x3be7da(0x2a9)]!=='')});if(!_0x105db1[_0x3be7da(0x382)])return 0x0;_0x323d2c=_0x105db1[_0x3be7da(0x382)];}const _0x389f6f=_0x3fb9d3[_0x3be7da(0x209)];return _0x389f6f?await this[_0x3be7da(0x379)](_0x41a4a2,_0x323d2c):await this[_0x3be7da(0x35e)](_0x41a4a2,_0x323d2c,_0x3fb9d3),0x0;}async[a42_0xe6da40(0x35e)](_0xc7e1ea,_0x1ffd46,_0xc59b3c){const _0x39d98e=a42_0xe6da40,{tdx:_0x4f37eb}=_0xc7e1ea;let _0x29f199,_0x5c5329;try{[_0x29f199,_0x5c5329]=await Promise['all']([_0x4f37eb[_0x39d98e(0x2cf)][_0x39d98e(0x28a)](_0x1ffd46),_0x4f37eb[_0x39d98e(0x2cf)][_0x39d98e(0x296)](_0x1ffd46,![])]);}catch(_0x3c372c){console[_0x39d98e(0x22b)](a42_0x144d21['red']('Failed\x20to\x20fetch\x20attempt\x20data'));_0xc59b3c[_0x39d98e(0x350)]&&console[_0x39d98e(0x22b)](_0x3c372c);throw _0x3c372c;}if(_0xc59b3c[_0x39d98e(0x385)]||_0xc59b3c['jsonl']){const _0x552929=this['buildTimelineData'](_0x29f199,_0x5c5329);await handleSDKOutput([_0x552929],_0xc59b3c);return;}const _0x50d9f8=_0x4f37eb[_0x39d98e(0x2b2)][_0x39d98e(0x2f3)],_0x177e2a=this[_0x39d98e(0x35a)](_0x29f199,_0x5c5329,_0x50d9f8);console[_0x39d98e(0x305)](_0x177e2a);}async[a42_0xe6da40(0x379)](_0x9d1263,_0x5a960c){const _0x7dbec0=a42_0xe6da40,{tdx:_0xa34510}=_0x9d1263,_0x1130de=TIMELINE_CONFIG[_0x7dbec0(0x245)],_0x5a17cd=TIMELINE_CONFIG[_0x7dbec0(0x315)];let _0x337626=0x0;while(_0x337626<_0x5a17cd){process[_0x7dbec0(0x359)][_0x7dbec0(0x357)]&&process[_0x7dbec0(0x359)][_0x7dbec0(0x2a3)]('\x1bc');let _0x261b5d,_0x2012e7;try{[_0x261b5d,_0x2012e7]=await Promise[_0x7dbec0(0x2aa)]([_0xa34510[_0x7dbec0(0x2cf)][_0x7dbec0(0x28a)](_0x5a960c),_0xa34510[_0x7dbec0(0x2cf)][_0x7dbec0(0x296)](_0x5a960c,![])]);}catch(_0x4ad089){console[_0x7dbec0(0x22b)](a42_0x144d21[_0x7dbec0(0x323)](_0x7dbec0(0x353)));_0x337626>0x0&&console['error'](a42_0x144d21[_0x7dbec0(0x342)](_0x7dbec0(0x21a)+_0x337626));throw _0x4ad089;}const _0xf755ad=_0xa34510['context']['site'],_0x48453e=this[_0x7dbec0(0x35a)](_0x261b5d,_0x2012e7,_0xf755ad);console['log'](_0x48453e);const _0x39a588=_0x261b5d[_0x7dbec0(0x377)]&&_0x2012e7[_0x7dbec0(0x2b7)](_0x3ffaa7=>_0x3ffaa7[_0x7dbec0(0x29e)]!=='running'&&_0x3ffaa7[_0x7dbec0(0x29e)]!==_0x7dbec0(0x27f));if(_0x39a588){console[_0x7dbec0(0x22b)](a42_0x144d21['green']('\x0a✔\x20Attempt\x20complete'));break;}console['error'](a42_0x144d21['dim'](_0x7dbec0(0x2d4)+_0x337626*0x2+_0x7dbec0(0x201))),await new Promise(_0x37afae=>setTimeout(_0x37afae,_0x1130de)),_0x337626++;}_0x337626>=_0x5a17cd&&console[_0x7dbec0(0x22b)](a42_0x144d21['yellow']('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0xe6da40(0x35a)](_0x4c0bb9,_0x253a1b,_0x26b6e3){const _0x5a2975=a42_0xe6da40,_0x51cbef=[],_0xfa4c99=TIMELINE_CONFIG[_0x5a2975(0x26d)],_0x4cd435=0x5,_0x1a222c=process[_0x5a2975(0x359)]['columns']||0x78,_0x5c1fa7=_0x1a222c-_0xfa4c99-_0x4cd435,_0x62865c=Math[_0x5a2975(0x2b1)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x5a2975(0x32a)](_0x5c1fa7,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x2c12b9=new Date(_0x4c0bb9[_0x5a2975(0x267)])[_0x5a2975(0x33d)](),_0x3ab638=_0x4c0bb9[_0x5a2975(0x2ef)]?new Date(_0x4c0bb9[_0x5a2975(0x2ef)])[_0x5a2975(0x33d)]():Date[_0x5a2975(0x370)](),_0x2697fa={'start':_0x2c12b9,'end':_0x3ab638,'duration':_0x3ab638-_0x2c12b9},_0x386edd=new Map(),_0x37dfb0=[];for(const _0x3a29f1 of _0x253a1b){if(_0x3a29f1[_0x5a2975(0x2de)]){const _0x51559a=new Date(_0x3a29f1[_0x5a2975(0x2de)])[_0x5a2975(0x33d)](),_0x3d4fbb=_0x3a29f1[_0x5a2975(0x24f)]?new Date(_0x3a29f1[_0x5a2975(0x24f)])[_0x5a2975(0x33d)]():Date[_0x5a2975(0x370)](),_0x4cecf6={'start':_0x51559a,'end':_0x3d4fbb,'duration':_0x3d4fbb-_0x51559a};_0x386edd['set'](_0x3a29f1['id'],_0x4cecf6),_0x37dfb0[_0x5a2975(0x252)]({'name':_0x3a29f1[_0x5a2975(0x210)],'state':_0x3a29f1['state']||_0x5a2975(0x283),'window':_0x4cecf6});}else _0x37dfb0[_0x5a2975(0x252)]({'name':_0x3a29f1[_0x5a2975(0x210)],'state':_0x3a29f1[_0x5a2975(0x29e)]||_0x5a2975(0x27f),'window':undefined});}_0x37dfb0[_0x5a2975(0x341)]((_0x37aead,_0x11e119)=>{const _0x1a80be=_0x5a2975;if(!_0x37aead[_0x1a80be(0x22d)])return 0x1;if(!_0x11e119[_0x1a80be(0x22d)])return-0x1;return _0x37aead[_0x1a80be(0x22d)][_0x1a80be(0x347)]-_0x11e119[_0x1a80be(0x22d)][_0x1a80be(0x347)];});const _0x36b656=_0x37dfb0[_0x5a2975(0x328)],_0x357646=_0x36b656>TIMELINE_CONFIG[_0x5a2975(0x2e3)];_0x357646&&_0x37dfb0['splice'](TIMELINE_CONFIG[_0x5a2975(0x2e3)]);const _0x5c6da9=calculateTimeScale(_0x2697fa,_0x62865c),_0x49ae09=_0x4c0bb9[_0x5a2975(0x377)]?_0x4c0bb9[_0x5a2975(0x2f1)]?a42_0x144d21['green'](_0x5a2975(0x2f1)):a42_0x144d21[_0x5a2975(0x323)](_0x5a2975(0x22b)):a42_0x144d21[_0x5a2975(0x309)](_0x5a2975(0x2c7)),_0x5e8487=_0x4c0bb9[_0x5a2975(0x23b)]?.['id'],_0x2b9189=_0x4c0bb9[_0x5a2975(0x29a)];let _0x236fdc;if(_0x5e8487&&_0x2b9189){const _0x122755=getWorkflowAttemptUrl(_0x26b6e3,_0x5e8487,_0x2b9189,_0x4c0bb9['id']);_0x236fdc=hyperlink(a42_0x144d21[_0x5a2975(0x342)](_0x4c0bb9['id']),_0x122755);}else _0x236fdc=a42_0x144d21[_0x5a2975(0x342)](_0x4c0bb9['id']);_0x51cbef[_0x5a2975(0x252)]('Attempt:\x20'+_0x236fdc+'\x20-\x20'+_0x49ae09+_0x5a2975(0x380)+formatElapsed(_0x2697fa['duration']));if(_0x37dfb0[_0x5a2975(0x328)]>0x0){const _0x2a0674=renderTimeAxis(_0x5c6da9,_0x62865c),_0x3da661=new Date(_0x2697fa['start']),_0x4ac9b0=formatDate(_0x3da661),_0x145ea9=TIMELINE_CONFIG[_0x5a2975(0x392)]+TIMELINE_CONFIG['ICON_SPACING']+_0xfa4c99,_0x16b4da=_0x4ac9b0[_0x5a2975(0x2a6)](_0x145ea9),_0x3aa03e=a42_0x144d21[_0x5a2975(0x342)](_0x16b4da);_0x51cbef['push'](_0x3aa03e+'\x20'+_0x2a0674);for(const _0x85ec3c of _0x37dfb0){_0x51cbef['push'](renderTaskRow(_0x85ec3c,_0x5c6da9,_0x62865c,_0xfa4c99));}const _0x14cb77=calculateStats(_0x37dfb0);_0x51cbef['push'](formatStats(_0x14cb77)),_0x357646&&_0x51cbef[_0x5a2975(0x252)](a42_0x144d21[_0x5a2975(0x26f)](_0x5a2975(0x2a8)+TIMELINE_CONFIG[_0x5a2975(0x2e3)]+_0x5a2975(0x1fb)+_0x36b656+'\x20tasks')),_0x51cbef[_0x5a2975(0x252)](''),_0x51cbef[_0x5a2975(0x252)](a42_0x144d21['dim'](_0x5a2975(0x2d8))+(_0x5a2975(0x2f7)+_0x4c0bb9['id']+_0x5a2975(0x212))+a42_0x144d21[_0x5a2975(0x342)](_0x5a2975(0x236)));}else _0x51cbef['push'](_0x5a2975(0x237));return _0x51cbef['join']('\x0a');}[a42_0xe6da40(0x32e)](_0x4091ec,_0x3c80a3){const _0x31880d=a42_0xe6da40,_0x35ab6e=new Date(_0x4091ec[_0x31880d(0x267)])[_0x31880d(0x33d)](),_0x128a25=_0x4091ec['finishedAt']?new Date(_0x4091ec[_0x31880d(0x2ef)])['getTime']():Date['now'](),_0x79ae03=_0x128a25-_0x35ab6e,_0x5af358=[];for(const _0x121a27 of _0x3c80a3){if(_0x121a27[_0x31880d(0x2de)]){const _0x570199=new Date(_0x121a27[_0x31880d(0x2de)])[_0x31880d(0x33d)](),_0x4d7d6a=_0x121a27[_0x31880d(0x24f)]?new Date(_0x121a27[_0x31880d(0x24f)])[_0x31880d(0x33d)]():Date[_0x31880d(0x370)]();_0x5af358[_0x31880d(0x252)]({'name':_0x121a27['fullName'],'state':_0x121a27[_0x31880d(0x29e)]||_0x31880d(0x283),'window':{'start':_0x570199,'end':_0x4d7d6a,'duration':_0x4d7d6a-_0x570199}});}else _0x5af358[_0x31880d(0x252)]({'name':_0x121a27[_0x31880d(0x210)],'state':_0x121a27[_0x31880d(0x29e)]||_0x31880d(0x27f),'window':undefined});}const _0x26113c=calculateStats(_0x5af358);return{'attempt':{'id':_0x4091ec['id'],'status':_0x4091ec[_0x31880d(0x377)]?_0x4091ec[_0x31880d(0x2f1)]?_0x31880d(0x2f1):_0x31880d(0x22b):_0x31880d(0x2c7),'createdAt':_0x4091ec['createdAt'],'finishedAt':_0x4091ec['finishedAt'],'duration_ms':_0x79ae03},'tasks':_0x5af358[_0x31880d(0x258)](_0x30012f=>({'name':_0x30012f['name'],'state':_0x30012f[_0x31880d(0x29e)],'startedAt':_0x30012f[_0x31880d(0x22d)]?new Date(_0x30012f[_0x31880d(0x22d)][_0x31880d(0x347)])[_0x31880d(0x2e1)]():null,'updatedAt':_0x30012f[_0x31880d(0x22d)]?new Date(_0x30012f[_0x31880d(0x22d)][_0x31880d(0x375)])['toISOString']():null,'duration_ms':_0x30012f[_0x31880d(0x22d)]?.[_0x31880d(0x38b)]||null})),'stats':_0x26113c};}}
|
|
1
|
+
const a42_0x271344=a42_0x3418;(function(_0x37e5bd,_0x52bf12){const _0x356386=a42_0x3418,_0x166c91=_0x37e5bd();while(!![]){try{const _0x121a00=-parseInt(_0x356386(0x2e6))/0x1+-parseInt(_0x356386(0x1b3))/0x2*(parseInt(_0x356386(0x282))/0x3)+-parseInt(_0x356386(0x2ae))/0x4+parseInt(_0x356386(0x2be))/0x5+parseInt(_0x356386(0x262))/0x6*(-parseInt(_0x356386(0x22e))/0x7)+-parseInt(_0x356386(0x285))/0x8*(parseInt(_0x356386(0x1ea))/0x9)+parseInt(_0x356386(0x18e))/0xa;if(_0x121a00===_0x52bf12)break;else _0x166c91['push'](_0x166c91['shift']());}catch(_0x15c582){_0x166c91['push'](_0x166c91['shift']());}}}(a42_0x3fe2,0x2dde1));import a42_0x4cb0ba from'chalk';import{existsSync}from'fs';import a42_0xff53de 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 a42_0x5e9a1d from'prompts';function getAttemptStatusDisplay(_0x5b4291){const _0x179bf9=a42_0x3418;if(!_0x5b4291)return{'icon':'⏳','text':''};const {done:_0x22c11a,success:_0x4b2333,cancelRequested:_0x3d690e}=_0x5b4291;if(!_0x22c11a)return _0x3d690e?{'icon':'🛑','text':a42_0x4cb0ba[_0x179bf9(0x1c6)]('canceling')}:{'icon':'🔄','text':a42_0x4cb0ba[_0x179bf9(0x2d8)](_0x179bf9(0x230))};if(_0x4b2333)return{'icon':'✅','text':a42_0x4cb0ba[_0x179bf9(0x1ff)](_0x179bf9(0x223))};return{'icon':'❌','text':a42_0x4cb0ba[_0x179bf9(0x2eb)](_0x179bf9(0x1e2))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x271344(0x16a)](_0xbb9cce,_0x310f28,_0x16ddff=0x0){const _0x6afd83=a42_0x271344;return _0xbb9cce[_0x16ddff]||_0x310f28[_0x6afd83(0x2e5)];}[a42_0x271344(0x1a0)](_0xcab8b1,_0x75054a,_0xfcf448=0x0){const _0x385f1f=a42_0x271344,_0x2305a9=this['resolveProject'](_0xcab8b1,_0x75054a,_0xfcf448);if(!_0x2305a9)return console[_0x385f1f(0x1e2)](a42_0x4cb0ba[_0x385f1f(0x2eb)](_0x385f1f(0x29a)),_0x385f1f(0x170)),console[_0x385f1f(0x1e2)](a42_0x4cb0ba[_0x385f1f(0x1fb)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x2305a9;}[a42_0x271344(0x15b)](_0x121503,_0x56913f){const _0x3155e7=a42_0x271344;if(_0x121503[0x0]){const _0x4b436=_0x121503[0x0][_0x3155e7(0x242)]('.');if(_0x4b436[_0x3155e7(0x152)]===0x1)return{'projectName':_0x4b436[0x0],'workflowName':undefined};else return _0x4b436[_0x3155e7(0x152)]===0x2?{'projectName':_0x4b436[0x0],'workflowName':_0x4b436[0x1]}:(console['error'](a42_0x4cb0ba[_0x3155e7(0x2eb)]('Error:'),_0x3155e7(0x2b6)),null);}return{'projectName':_0x56913f['workflowProject'],'workflowName':undefined};}[a42_0x271344(0x16b)](_0x22a1dd,_0x5e4b10,_0x4ef2f5=0x0){const _0x467734=a42_0x271344;if(_0x22a1dd[_0x4ef2f5])return _0x22a1dd[_0x4ef2f5];if(_0x5e4b10[_0x467734(0x2e5)]){const _0x3ee627=a42_0xff53de['join'](process[_0x467734(0x1e0)](),_0x467734(0x2f3),_0x5e4b10['workflowProject']);if(existsSync(a42_0xff53de[_0x467734(0x247)](_0x3ee627,'tdx.json')))return _0x3ee627;}return undefined;}async['showWorkflowConsoleUrl'](_0x1edd54,_0x3e6482,_0x2bd33a){const _0x170883=a42_0x271344;try{const _0x278025=await _0x1edd54[_0x170883(0x2b8)]['workflows'](_0x3e6482,{'limit':0x1});if(_0x278025['length']>0x0){const _0x320f35=_0x278025[0x0]['id'],_0x723085=getWorkflowUrl(_0x2bd33a,_0x320f35);console[_0x170883(0x1e2)](_0x170883(0x2ab)+a42_0x4cb0ba[_0x170883(0x27a)](_0x723085));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a42_0x271344(0x1dd);[a42_0x271344(0x186)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a42_0x271344(0x1ef)](_0x282c04){const _0x4a61eb=a42_0x271344,{options:_0x4fb4ef,args:_0x39e4a6,tdx:_0x5ec620}=_0x282c04,_0x20fc6f=_0x39e4a6[0x0],_0x597d30=_0x4fb4ef[_0x4a61eb(0x2e3)];if(_0x597d30)return saveSessionContext({'workflow_project':undefined},_0x4fb4ef[_0x4a61eb(0x23a)]),console[_0x4a61eb(0x295)](a42_0x4cb0ba[_0x4a61eb(0x1ff)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x20fc6f)return console['error'](a42_0x4cb0ba[_0x4a61eb(0x2eb)]('Error:'),_0x4a61eb(0x170)),console[_0x4a61eb(0x1e2)](a42_0x4cb0ba[_0x4a61eb(0x1fb)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x4a61eb(0x1e2)](a42_0x4cb0ba[_0x4a61eb(0x1fb)](_0x4a61eb(0x2a9))),0x1;const _0x396887=await withSpinner('Resolving\x20project\x20\x27'+_0x20fc6f+_0x4a61eb(0x1c1),()=>_0x5ec620[_0x4a61eb(0x2b8)]['resolveProjectId'](_0x20fc6f),{'verbose':_0x4fb4ef['verbose']}),{name:_0x4094aa}=_0x396887['data'];return saveSessionContext({'workflow_project':_0x4094aa},_0x4fb4ef[_0x4a61eb(0x23a)]),console[_0x4a61eb(0x295)](a42_0x4cb0ba['green'](_0x4a61eb(0x261)+a42_0x4cb0ba[_0x4a61eb(0x27a)](_0x4094aa))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x294);[a42_0x271344(0x186)]='List\x20all\x20workflow\x20projects';async[a42_0x271344(0x1ef)](_0x3db8ec){const _0x497c70=a42_0x271344,{options:_0x21a003,args:_0x22d9e3,tdx:_0x509da5}=_0x3db8ec,_0xf4705c=_0x22d9e3[0x0];_0x21a003['verbose']&&_0xf4705c&&console[_0x497c70(0x1e2)]('Pattern:\x20'+_0xf4705c);const _0x45c5b2=await withSpinner(_0x497c70(0x23c),()=>_0x509da5[_0x497c70(0x2b8)]['projects'](_0xf4705c,{'limit':_0x21a003[_0x497c70(0x22c)]}),{'verbose':_0x21a003[_0x497c70(0x2cc)]});let _0x8f8f19=_0x45c5b2[_0x497c70(0x1c3)];_0x8f8f19[_0x497c70(0x1cd)]((_0x5c7161,_0x477d65)=>_0x5c7161[_0x497c70(0x1bf)]['localeCompare'](_0x477d65[_0x497c70(0x1bf)]));const _0x407af0=_0x21a003[_0x497c70(0x22c)]||0x64,_0x2872a8=_0x8f8f19['length']>=_0x407af0?a42_0x4cb0ba[_0x497c70(0x1fb)](_0x497c70(0x2d6)):'';console[_0x497c70(0x1e2)](_0x497c70(0x18a)+_0x8f8f19[_0x497c70(0x152)]+'\x20project'+(_0x8f8f19['length']!==0x1?'s':'')+_0x2872a8);if(_0x21a003['format']===_0x497c70(0x19c)||_0x21a003['format']===_0x497c70(0x173)||_0x21a003[_0x497c70(0x2ed)]===_0x497c70(0x16c))await handleSDKOutput(_0x8f8f19,_0x21a003);else{if(_0x8f8f19[_0x497c70(0x152)]===0x0)_0xf4705c?console[_0x497c70(0x295)]('No\x20projects\x20match\x20pattern:\x20'+_0xf4705c):console['log']('No\x20workflow\x20projects\x20found');else{const _0x5a005e=_0x8f8f19[_0x497c70(0x174)](_0x29a99f=>{const _0x3843f8=_0x497c70,_0xdecb0f=_0x29a99f[_0x3843f8(0x208)]?.[_0x3843f8(0x1b9)](_0x4df9f4=>_0x4df9f4[_0x3843f8(0x1d3)]===_0x3843f8(0x1a2)),_0x43625c=_0xdecb0f?a42_0x4cb0ba[_0x3843f8(0x1fb)](_0x3843f8(0x2af)):'';return'📁\x20'+_0x29a99f['name']+_0x43625c;});await writeOutput(_0x5a005e[_0x497c70(0x247)]('\x0a'),_0x21a003['output'],_0x497c70(0x22d));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x1a3);[a42_0x271344(0x186)]=a42_0x271344(0x1b8);async['execute'](_0x483e2c){const _0x5d1743=a42_0x271344,{options:_0x15e229,args:_0x38b5aa,tdx:_0x5229b1}=_0x483e2c,_0x34edd0=this[_0x5d1743(0x16a)](_0x38b5aa,_0x15e229);_0x15e229['verbose']&&_0x34edd0&&console[_0x5d1743(0x1e2)](_0x5d1743(0x159)+_0x34edd0);const _0x5ac472=await withSpinner(_0x5d1743(0x28f),()=>_0x5229b1[_0x5d1743(0x2b8)]['workflows'](_0x34edd0,{'limit':_0x15e229['limit']}),{'verbose':_0x15e229[_0x5d1743(0x2cc)]});let _0x5448e3=_0x5ac472[_0x5d1743(0x1c3)];_0x5448e3[_0x5d1743(0x1cd)]((_0x55fca8,_0x37c8b6)=>{const _0x3d9e40=_0x5d1743,_0x372534=_0x55fca8[_0x3d9e40(0x1bf)][_0x3d9e40(0x235)](_0x37c8b6[_0x3d9e40(0x1bf)]);if(_0x372534!==0x0)return _0x372534;return(_0x55fca8['project']?.['name']||'')[_0x3d9e40(0x235)](_0x37c8b6['project']?.[_0x3d9e40(0x1bf)]||'');});const _0xa2691b=_0x15e229[_0x5d1743(0x22c)]||0x64,_0x3aaa8b=_0x5448e3[_0x5d1743(0x152)]>=_0xa2691b?a42_0x4cb0ba['dim'](_0x5d1743(0x2d6)):'';console[_0x5d1743(0x1e2)](_0x5d1743(0x18a)+_0x5448e3[_0x5d1743(0x152)]+_0x5d1743(0x20c)+(_0x5448e3[_0x5d1743(0x152)]!==0x1?'s':'')+_0x3aaa8b);if(_0x15e229[_0x5d1743(0x2ed)]===_0x5d1743(0x19c)||_0x15e229[_0x5d1743(0x2ed)]===_0x5d1743(0x173)||_0x15e229[_0x5d1743(0x2ed)]===_0x5d1743(0x16c))await handleSDKOutput(_0x5448e3,_0x15e229);else{if(_0x5448e3[_0x5d1743(0x152)]===0x0)_0x34edd0?console[_0x5d1743(0x295)](_0x5d1743(0x15f)+_0x34edd0):console[_0x5d1743(0x295)](_0x5d1743(0x2dc));else{const _0x325d85=_0x15e229[_0x5d1743(0x21f)],_0x22bdf9=_0x5448e3[_0x5d1743(0x174)](_0xc0306a=>{const _0x5a76be=_0x5d1743,_0x377c2e=a42_0x4cb0ba[_0x5a76be(0x1fb)]('#'+_0xc0306a['id']),_0x128184=hyperlink(_0x377c2e,getWorkflowUrl(_0x325d85,_0xc0306a['id'])),_0x533c06=_0xc0306a['project']?.[_0x5a76be(0x1bf)]?a42_0x4cb0ba[_0x5a76be(0x1fb)]('\x20('+_0xc0306a['project'][_0x5a76be(0x1bf)]+')'):'';return _0x5a76be(0x2c5)+_0x128184+'\x20'+_0xc0306a[_0x5a76be(0x1bf)]+_0x533c06;});await writeOutput(_0x22bdf9[_0x5d1743(0x247)]('\x0a'),_0x15e229['output'],_0x5d1743(0x22d));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x211);[a42_0x271344(0x186)]=a42_0x271344(0x19d);async[a42_0x271344(0x1ef)](_0x39fdb3){const _0x575de7=a42_0x271344,{options:_0x42a797,args:_0x198f69,tdx:_0x364729}=_0x39fdb3,_0x4e91bd=this[_0x575de7(0x15b)](_0x198f69,_0x42a797);if(!_0x4e91bd)return 0x1;const {projectName:_0x500cb6,workflowName:_0xc47da}=_0x4e91bd;if(_0x42a797[_0x575de7(0x2cc)]){if(_0x500cb6&&_0xc47da)console[_0x575de7(0x1e2)](_0x575de7(0x25e)+_0x500cb6+'.'+_0xc47da);else _0x500cb6&&console[_0x575de7(0x1e2)]('Filter:\x20project='+_0x500cb6);const _0x46da98=_0x42a797['status'];_0x46da98&&console[_0x575de7(0x1e2)]('Status:\x20'+_0x46da98);}let _0x9ae4b6=0x28;if(process[_0x575de7(0x206)]['isTTY']&&!_0x42a797[_0x575de7(0x263)]&&!_0x42a797[_0x575de7(0x2ed)]){const _0x5d66a9=process[_0x575de7(0x206)][_0x575de7(0x147)]||0x28;_0x9ae4b6=Math[_0x575de7(0x1c0)](0x14,Math[_0x575de7(0x1f4)](_0x5d66a9*0x2/0x3));}const _0x35c794=_0x42a797[_0x575de7(0x22c)]||_0x9ae4b6,_0x8cf0c8=await withSpinner(_0x575de7(0x24d),()=>_0x364729[_0x575de7(0x2b8)][_0x575de7(0x15c)]({'projectName':_0x500cb6,'workflowName':_0xc47da,'status':_0x42a797[_0x575de7(0x1eb)],'fromTime':_0x42a797[_0x575de7(0x2d2)],'toTime':_0x42a797['to'],'limit':_0x35c794}),{'verbose':_0x42a797[_0x575de7(0x2cc)]}),_0x859a8f=_0x8cf0c8[_0x575de7(0x1c3)];_0x859a8f[_0x575de7(0x1cd)]((_0x383e5b,_0x5762dc)=>{const _0x463a95=_0x575de7,_0x53f836=_0x383e5b['sessionTime']||'',_0x16edc0=_0x5762dc[_0x463a95(0x2d7)]||'';return _0x16edc0[_0x463a95(0x235)](_0x53f836);});_0x859a8f[_0x575de7(0x152)]>=_0x35c794?console[_0x575de7(0x1e2)](_0x575de7(0x2a7)+_0x859a8f[_0x575de7(0x152)]+_0x575de7(0x220)+a42_0x4cb0ba[_0x575de7(0x1fb)](_0x575de7(0x2d4))):console[_0x575de7(0x1e2)](_0x575de7(0x18a)+_0x859a8f[_0x575de7(0x152)]+_0x575de7(0x1e9)+(_0x859a8f[_0x575de7(0x152)]!==0x1?'s':''));if(_0x42a797[_0x575de7(0x2ed)]===_0x575de7(0x19c)||_0x42a797[_0x575de7(0x2ed)]==='jsonl'||_0x42a797[_0x575de7(0x2ed)]===_0x575de7(0x16c))await handleSDKOutput(_0x859a8f,_0x42a797);else{if(!process[_0x575de7(0x206)][_0x575de7(0x1da)]||_0x42a797[_0x575de7(0x263)]){if(_0x859a8f['length']===0x0){if(_0x500cb6&&_0xc47da)console[_0x575de7(0x295)](_0x575de7(0x239)+_0x500cb6+'.'+_0xc47da);else _0x500cb6?console[_0x575de7(0x295)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x500cb6):console[_0x575de7(0x295)](_0x575de7(0x243));}else{const _0x4edf00=_0x42a797[_0x575de7(0x21f)],_0xb13222=this[_0x575de7(0x175)](_0x859a8f,_0x4edf00);_0x42a797['output']?await writeOutput(_0xb13222,_0x42a797[_0x575de7(0x263)],_0x575de7(0x22d)):console['log'](_0xb13222);}!_0x500cb6&&(console['error'](''),console[_0x575de7(0x1e2)](a42_0x4cb0ba[_0x575de7(0x1fb)](_0x575de7(0x236))),console[_0x575de7(0x1e2)](a42_0x4cb0ba[_0x575de7(0x1fb)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0x4cb0ba[_0x575de7(0x1fb)](_0x575de7(0x273))));}else{if(_0x859a8f['length']===0x0){if(_0x500cb6&&_0xc47da)console[_0x575de7(0x295)](_0x575de7(0x239)+_0x500cb6+'.'+_0xc47da);else _0x500cb6?console[_0x575de7(0x295)](_0x575de7(0x200)+_0x500cb6):console[_0x575de7(0x295)](_0x575de7(0x243));}else await this[_0x575de7(0x1c5)](_0x859a8f,_0x39fdb3,_0x500cb6);}}return 0x0;}[a42_0x271344(0x175)](_0x56c7a9,_0x4d6d4a){const _0x29f894=a42_0x271344,_0xd5ac48=[],_0x1c43e7=new Map();let _0x925098=Infinity,_0x3a4ae2=-Infinity;for(const _0x450a89 of _0x56c7a9){if(_0x450a89['lastAttempt']?.[_0x29f894(0x2a2)]){const _0x48e6ca=new Date(_0x450a89['lastAttempt']['createdAt'])[_0x29f894(0x2c3)](),_0x555898=_0x450a89['lastAttempt'][_0x29f894(0x2e4)]?new Date(_0x450a89[_0x29f894(0x18c)][_0x29f894(0x2e4)])[_0x29f894(0x2c3)]():Date['now'](),_0x14e958=_0x450a89[_0x29f894(0x24b)]?.['name']||_0x29f894(0x2e9);!_0x1c43e7[_0x29f894(0x221)](_0x14e958)&&_0x1c43e7[_0x29f894(0x154)](_0x14e958,[]),_0x1c43e7[_0x29f894(0x210)](_0x14e958)[_0x29f894(0x1ad)]({'session':_0x450a89,'startTime':_0x48e6ca,'endTime':_0x555898,'duration':_0x555898-_0x48e6ca}),_0x925098=Math[_0x29f894(0x25c)](_0x925098,_0x48e6ca),_0x3a4ae2=Math['max'](_0x3a4ae2,_0x555898);}}if(_0x1c43e7[_0x29f894(0x1ce)]===0x0)return _0x29f894(0x287);const _0x483a68=process[_0x29f894(0x206)][_0x29f894(0x260)]||0x78,_0x3dce30=0x1e,_0xc23d43=0x32,_0x2e0aed=0x4,_0x461cbb=Math[_0x29f894(0x25c)](_0xc23d43,Math[_0x29f894(0x1c0)](_0x3dce30,Math[_0x29f894(0x1f4)](_0x483a68*0.3))),_0x12c8a6=_0x483a68-_0x461cbb-TIMELINE_CONFIG[_0x29f894(0x1fc)]-0x3-_0x2e0aed,_0x28435e=_0x3a4ae2-_0x925098,_0x140717=_0x28435e/_0x461cbb,_0x36f004=renderTimeAxis({'startTime':_0x925098,'endTime':_0x3a4ae2,'durationMs':_0x28435e,'msPerChar':_0x140717},_0x461cbb),_0x413dfb=[];for(const _0x17f81f of _0x1c43e7[_0x29f894(0x17e)]()){_0x413dfb[_0x29f894(0x1ad)](..._0x17f81f);}_0x413dfb[_0x29f894(0x1cd)]((_0x1571f6,_0x2a15c9)=>_0x2a15c9['startTime']-_0x1571f6[_0x29f894(0x224)]);const _0x1704a0=new Date(_0x925098),_0x7e97f4=formatDate(_0x1704a0),_0x2096cd=_0x2e0aed+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x29f894(0x185)]+_0x12c8a6,_0x9a359a='\x20'['repeat'](_0x2096cd-_0x7e97f4[_0x29f894(0x152)]),_0x296127=_0x9a359a+a42_0x4cb0ba[_0x29f894(0x1fb)](_0x7e97f4)+'\x20'+_0x36f004;_0xd5ac48[_0x29f894(0x1ad)](_0x296127);const _0x168965=0x16;let _0x4c2be3=0x0;for(const _0x4a46fe of _0x413dfb){const _0x43d9a0=_0x4a46fe[_0x29f894(0x23a)][_0x29f894(0x24b)]?.['name']||'?',_0x1f52dc=Math[_0x29f894(0x25c)](stringWidth(_0x43d9a0),_0x168965);_0x4c2be3=Math['max'](_0x4c2be3,_0x1f52dc);}for(const _0x426bd0 of _0x413dfb){const {session:_0x5e1596,startTime:_0x4590cd,endTime:_0x113bb7,duration:_0x32419a}=_0x426bd0,_0x57ffaa=_0x5e1596['project']?.['id'],_0x472fa9=_0x5e1596['id'],_0x590561=_0x5e1596[_0x29f894(0x24b)]?.['name']||'?',_0x1d22cb=_0x5e1596[_0x29f894(0x2b8)]?.[_0x29f894(0x1bf)]||'?';let _0x52cf38,_0xe27e80;if(_0x5e1596[_0x29f894(0x18c)]){const _0x369eb7=_0x5e1596[_0x29f894(0x18c)];!_0x369eb7[_0x29f894(0x240)]?(_0x52cf38=_0x369eb7['cancelRequested']?'🛑':'🔄',_0xe27e80=_0x369eb7[_0x29f894(0x2f2)]?a42_0x4cb0ba['yellow']:a42_0x4cb0ba[_0x29f894(0x2d8)]):(_0x52cf38=_0x369eb7[_0x29f894(0x223)]?'✅':'❌',_0xe27e80=_0x369eb7[_0x29f894(0x223)]?a42_0x4cb0ba[_0x29f894(0x1ff)]:a42_0x4cb0ba[_0x29f894(0x2eb)]);}else _0x52cf38='⏳',_0xe27e80=a42_0x4cb0ba['dim'];const _0x353dc2='#'+_0x472fa9,_0xe3e005=_0x57ffaa?hyperlink(_0x353dc2,getWorkflowSessionUrl(_0x4d6d4a,_0x57ffaa,_0x472fa9)):_0x353dc2;let _0x4ce0e4=_0x590561;stringWidth(_0x590561)>_0x168965&&(_0x4ce0e4=_0x590561[_0x29f894(0x213)](0x0,_0x168965-0x1)+'…');const _0xeba4=a42_0x4cb0ba[_0x29f894(0x1fb)](_0x4ce0e4),_0x253f58=stringWidth(_0x4ce0e4),_0xfacde3='\x20'[_0x29f894(0x188)](_0x4c2be3-stringWidth(_0x4ce0e4)+0x2),_0x3fe473='('+formatElapsed(_0x32419a)+')',_0x936e30=stringWidth(_0x3fe473),_0x4201fa=stringWidth(_0x353dc2),_0x4fe5cd=_0x4201fa+0x1+_0x253f58+_0xfacde3[_0x29f894(0x152)],_0x181619=_0x12c8a6-_0x4fe5cd-_0x936e30-0x1-0x8;let _0x2b29e9=_0x1d22cb;stringWidth(_0x2b29e9)>_0x181619&&(_0x2b29e9=_0x2b29e9['slice'](0x0,_0x181619-0x1)+'…');const _0x53d91d=_0xe3e005+'\x20'+_0xeba4+_0xfacde3+_0x2b29e9,_0x6a9747=stringWidth(_0x53d91d),_0x122863=_0x12c8a6-_0x6a9747-_0x936e30,_0x1f8dda=_0x53d91d+'\x20'[_0x29f894(0x188)](Math[_0x29f894(0x1c0)](0x1,_0x122863))+a42_0x4cb0ba[_0x29f894(0x1fb)](_0x3fe473),_0x50544e=Math['floor']((_0x4590cd-_0x925098)/_0x140717),_0x1eee3b=Math[_0x29f894(0x1f4)]((_0x113bb7-_0x925098)/_0x140717),_0x2927e8=Math[_0x29f894(0x1c0)](_0x50544e+0x1,_0x1eee3b),_0x3b53e5=new Array(_0x461cbb)[_0x29f894(0x1dc)]('\x20');for(let _0x4eb531=_0x50544e;_0x4eb531<Math[_0x29f894(0x25c)](_0x2927e8,_0x461cbb);_0x4eb531++){_0x3b53e5[_0x4eb531]='─';}const _0x478ada=_0x3b53e5['map'](_0x4685e7=>_0x4685e7==='\x20'?'\x20':_0xe27e80(_0x4685e7))['join']('');_0xd5ac48[_0x29f894(0x1ad)](_0x52cf38+'\x20'+_0x1f8dda+'│'+_0x478ada+'│');}return _0xd5ac48[_0x29f894(0x247)]('\x0a');}async['navigateSessionsInteractive'](_0x3c8c32,_0xaabc10,_0x39af06){const _0x4fa681=a42_0x271344,{options:_0x538f13,tdx:_0x4d9e94}=_0xaabc10,_0x180197=_0x538f13['site'],{timelineRows:_0x593685,timeAxisHeader:_0x39b37c}=this[_0x4fa681(0x205)](_0x3c8c32,_0x180197),_0x34914c=_0x593685[_0x4fa681(0x288)](_0x5d6f1f=>_0x5d6f1f['attemptId']);if(_0x34914c[_0x4fa681(0x152)]===0x0){const _0x1e862b=this['renderSessionsTimeline'](_0x3c8c32,_0x180197);console[_0x4fa681(0x295)](_0x1e862b);!_0x39af06&&(console[_0x4fa681(0x1e2)](''),console[_0x4fa681(0x1e2)](a42_0x4cb0ba[_0x4fa681(0x1fb)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x4fa681(0x1e2)](a42_0x4cb0ba['dim'](_0x4fa681(0x29d))+'or'+a42_0x4cb0ba[_0x4fa681(0x1fb)](_0x4fa681(0x273))));return;}_0x39b37c&&console[_0x4fa681(0x295)](_0x39b37c);const _0x218504=_0x593685[_0x4fa681(0x288)](_0x278ba9=>_0x278ba9[_0x4fa681(0x16d)])[_0x4fa681(0x174)](_0x412185=>({'title':_0x412185[_0x4fa681(0x183)],'value':_0x412185['attemptId']})),_0xcb070e=process[_0x4fa681(0x206)][_0x4fa681(0x147)]||0x3c,_0x55150c=Math[_0x4fa681(0x1c0)](0x28,Math[_0x4fa681(0x1f4)](_0xcb070e*0x2/0x3)),_0x485a0b=await a42_0x5e9a1d({'type':_0x4fa681(0x2ee),'name':_0x4fa681(0x16d),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x218504,'initial':-0x1,'limit':_0x55150c,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x35623c,_0x2f1ee8)=>{const _0x445363=_0x4fa681;if(!_0x35623c)return Promise[_0x445363(0x23e)](_0x2f1ee8);const _0x458674=_0x2f1ee8[_0x445363(0x288)](_0x3fbacf=>{const _0x560299=_0x445363,_0x3b8589=_0x3fbacf;return _0x3b8589[_0x560299(0x146)][_0x560299(0x1af)]()['includes'](_0x35623c[_0x560299(0x1af)]());});return Promise[_0x445363(0x23e)](_0x458674);}}),_0x519060=()=>{const _0x515570=_0x4fa681;process[_0x515570(0x206)]['write'](_0x515570(0x281)),process[_0x515570(0x206)][_0x515570(0x1f3)]('\x1b[1A\x1b[2K'),process[_0x515570(0x206)]['write']('\x1b[1A\x1b[2K');},_0x46dee0=_0x485a0b&&_0x485a0b['attemptId']&&_0x485a0b[_0x4fa681(0x16d)]!==null&&_0x485a0b['attemptId'][_0x4fa681(0x194)]()!=='';if(!_0x46dee0){_0x519060(),console[_0x4fa681(0x295)](a42_0x4cb0ba[_0x4fa681(0x1fb)](_0x4fa681(0x1e5)));return;}_0x519060();const _0x1e65f6=_0x3c8c32['find'](_0x1d2f44=>_0x1d2f44[_0x4fa681(0x18c)]?.['id']===_0x485a0b[_0x4fa681(0x16d)]);if(_0x1e65f6){const _0x248e28=_0x1e65f6[_0x4fa681(0x24b)]?.[_0x4fa681(0x1bf)]||'?',_0x195c01=_0x1e65f6[_0x4fa681(0x2b8)]?.[_0x4fa681(0x1bf)]||'?';console[_0x4fa681(0x295)](_0x4fa681(0x1e4)+a42_0x4cb0ba[_0x4fa681(0x1fb)](_0x248e28)+_0x4fa681(0x2d5)+a42_0x4cb0ba['dim'](_0x195c01));}const _0x2c71ee=new WorkflowTimelineCommand();await _0x2c71ee[_0x4fa681(0x1ef)]({'args':[],'options':{..._0x538f13,'attemptId':_0x485a0b[_0x4fa681(0x16d)]},'tdx':_0x4d9e94});}[a42_0x271344(0x205)](_0x8eb44b,_0x33005){const _0x2bc2cd=a42_0x271344,_0x4efce6=new Map();for(const _0xd14b2d of _0x8eb44b){_0xd14b2d['id']&&_0xd14b2d['lastAttempt']?.['id']&&_0x4efce6[_0x2bc2cd(0x154)](_0xd14b2d['id'],_0xd14b2d[_0x2bc2cd(0x18c)]['id']);}const _0x2851d7=[];let _0x416b30='';const _0x4d85a7=this['renderSessionsTimeline'](_0x8eb44b,_0x33005),_0x1c6e00=_0x4d85a7[_0x2bc2cd(0x242)]('\x0a');for(const _0x18a61c of _0x1c6e00){if(_0x18a61c[_0x2bc2cd(0x253)](_0x2bc2cd(0x189))||_0x18a61c[_0x2bc2cd(0x15d)](/^\s+\d{4}-\d{2}-\d{2}/))_0x416b30=_0x18a61c;else{if(_0x18a61c[_0x2bc2cd(0x15d)](/^[✅❌🔄🛑⏳]/)){const _0x34ee0e=_0x18a61c[_0x2bc2cd(0x15d)](/#(\d+)/),_0x29287f=_0x34ee0e?_0x34ee0e[0x1]:null,_0x2cc989=_0x29287f?_0x4efce6[_0x2bc2cd(0x210)](_0x29287f)||null:null,_0x320324=_0x8eb44b[_0x2bc2cd(0x2b4)](_0x1a92da=>_0x1a92da['id']===_0x29287f),_0x2cf3c5=_0x320324?.[_0x2bc2cd(0x24b)]?.[_0x2bc2cd(0x1bf)]||'';_0x2851d7[_0x2bc2cd(0x1ad)]({'displayLine':_0x18a61c,'attemptId':_0x2cc989,'projectName':_0x2cf3c5});}}}return{'timelineRows':_0x2851d7,'timeAxisHeader':_0x416b30};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x2e8);[a42_0x271344(0x186)]=a42_0x271344(0x1aa);async[a42_0x271344(0x1ef)](_0x6e62a4){const _0x357588=a42_0x271344,{options:_0x579f25,args:_0x258f08,tdx:_0x42da15}=_0x6e62a4,_0x1299b1=this[_0x357588(0x15b)](_0x258f08,_0x579f25);if(!_0x1299b1)return 0x1;const {projectName:_0xd95cbd,workflowName:_0x527375}=_0x1299b1,_0x3e7207=_0x579f25[_0x357588(0x21a)];if(_0x579f25[_0x357588(0x2cc)]){if(_0xd95cbd&&_0x527375)console[_0x357588(0x1e2)]('Filter:\x20'+_0xd95cbd+'.'+_0x527375);else _0xd95cbd&&console['error']('Filter:\x20project='+_0xd95cbd);_0x3e7207&&console[_0x357588(0x1e2)]('Include\x20retried:\x20yes');}const _0xc3aca8=await withSpinner(_0x357588(0x2c7),()=>_0x42da15['workflow'][_0x357588(0x202)]({'projectName':_0xd95cbd,'workflowName':_0x527375,'includeRetried':_0x3e7207,'limit':_0x579f25[_0x357588(0x22c)]}),{'verbose':_0x579f25[_0x357588(0x2cc)]}),_0x2c75f0=_0xc3aca8['data'],_0x19f1a4=_0x579f25['limit']||0x64,_0x5e175b=_0x2c75f0[_0x357588(0x152)]>=_0x19f1a4?a42_0x4cb0ba[_0x357588(0x1fb)](_0x357588(0x2d6)):'';console[_0x357588(0x1e2)](_0x357588(0x18a)+_0x2c75f0[_0x357588(0x152)]+'\x20attempt'+(_0x2c75f0[_0x357588(0x152)]!==0x1?'s':'')+_0x5e175b);if(_0x579f25['format']===_0x357588(0x19c)||_0x579f25['format']===_0x357588(0x173)||_0x579f25['format']==='table')await handleSDKOutput(_0x2c75f0,_0x579f25);else{if(_0x2c75f0['length']===0x0){if(_0xd95cbd&&_0x527375)console[_0x357588(0x295)]('No\x20attempts\x20found\x20for:\x20'+_0xd95cbd+'.'+_0x527375);else _0xd95cbd?console[_0x357588(0x295)](_0x357588(0x17b)+_0xd95cbd):console['log'](_0x357588(0x15a));}else{const _0x153495=_0x579f25[_0x357588(0x21f)],_0x50a90b=_0x2c75f0[_0x357588(0x174)](_0x217fc8=>{const _0x10a0ad=_0x357588,_0x5516f5=a42_0x4cb0ba['dim']('#'+_0x217fc8['id']),_0x365233=_0x217fc8['project']?.['id'],_0xf0439=_0x217fc8['session_id']||_0x217fc8[_0x10a0ad(0x20b)],_0x4dfb3a=_0x365233&&_0xf0439?hyperlink(_0x5516f5,getWorkflowAttemptUrl(_0x153495,_0x365233,_0xf0439,_0x217fc8['id'])):_0x5516f5,{icon:_0x90c425,text:_0x1c55fe}=getAttemptStatusDisplay(_0x217fc8),_0x483dd9=(_0x217fc8['project']?.[_0x10a0ad(0x1bf)]||'?')+'.'+(_0x217fc8[_0x10a0ad(0x2b8)]?.['name']||'?'),_0x1f3287=_0x217fc8[_0x10a0ad(0x2d7)]?a42_0x4cb0ba[_0x10a0ad(0x1fb)](_0x217fc8['sessionTime']):'';return(_0x4dfb3a+'\x20'+_0x90c425+(_0x1c55fe?'\x20'+_0x1c55fe:'')+'\x20'+_0x483dd9+'\x20'+_0x1f3287)[_0x10a0ad(0x171)]();});await writeOutput(_0x50a90b['join']('\x0a'),_0x579f25[_0x357588(0x263)],_0x357588(0x22d));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a42_0x271344(0x24c);[a42_0x271344(0x186)]=a42_0x271344(0x2df);async[a42_0x271344(0x1ef)](_0x38b17a){const _0x5e9714=a42_0x271344,{options:_0x21a724,args:_0xd104ad,tdx:_0x118671}=_0x38b17a,_0x310623=_0xd104ad[0x0];if(!_0x310623)return console[_0x5e9714(0x1e2)](_0x5e9714(0x19e)),0x1;_0x21a724[_0x5e9714(0x2cc)]&&console[_0x5e9714(0x1e2)]('Attempt\x20ID:\x20'+_0x310623);const _0x105bd7=await withSpinner(_0x5e9714(0x2ef),()=>_0x118671[_0x5e9714(0x2b8)][_0x5e9714(0x1e6)](_0x310623),{'verbose':_0x21a724[_0x5e9714(0x2cc)]}),_0x1e98b6=_0x105bd7['data'];let _0x359309;!_0x1e98b6[_0x5e9714(0x240)]?_0x359309=_0x1e98b6[_0x5e9714(0x2f2)]?_0x5e9714(0x254):'running':_0x359309=_0x1e98b6['success']?_0x5e9714(0x223):'error';let _0x1b2763;if(_0x1e98b6[_0x5e9714(0x2a2)]&&_0x1e98b6['finishedAt']){const _0x3f1b7e=new Date(_0x1e98b6[_0x5e9714(0x2a2)])[_0x5e9714(0x2c3)](),_0x4af970=new Date(_0x1e98b6[_0x5e9714(0x2e4)])[_0x5e9714(0x2c3)]();_0x1b2763=Math['round']((_0x4af970-_0x3f1b7e)/0x3e8);}const _0xa97bd5={'attempt_id':_0x1e98b6['id'],'status':_0x359309,..._0x1e98b6[_0x5e9714(0x214)]!==undefined&&{'index':_0x1e98b6['index']},..._0x1e98b6[_0x5e9714(0x24b)]&&{'project':_0x1e98b6[_0x5e9714(0x24b)][_0x5e9714(0x1bf)]},..._0x1e98b6['workflow']&&{'workflow':_0x1e98b6[_0x5e9714(0x2b8)][_0x5e9714(0x1bf)]},..._0x1e98b6[_0x5e9714(0x20b)]&&{'session_id':_0x1e98b6['sessionId']},..._0x1e98b6[_0x5e9714(0x2d7)]&&{'session_time':_0x1e98b6[_0x5e9714(0x2d7)]},..._0x1e98b6[_0x5e9714(0x1c8)]&&{'retry_attempt':_0x1e98b6[_0x5e9714(0x1c8)]},..._0x1b2763!==undefined&&{'duration_sec':_0x1b2763},..._0x1e98b6[_0x5e9714(0x2a2)]&&{'created_at':_0x1e98b6['createdAt']},..._0x1e98b6[_0x5e9714(0x2e4)]&&{'finished_at':_0x1e98b6[_0x5e9714(0x2e4)]},...Object[_0x5e9714(0x17a)](_0x1e98b6['params'])['length']>0x0&&{'params':_0x1e98b6[_0x5e9714(0x151)]}};return await handleSingleObjectOutput(_0xa97bd5,_0x21a724),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x1ec);['description']=a42_0x271344(0x226);async[a42_0x271344(0x1ef)](_0x380d1f){const _0x546778=a42_0x271344,{options:_0x5711e7,args:_0x4e04d6,tdx:_0xcdf21c}=_0x380d1f,_0x4a6e75=_0x4e04d6[0x0];if(!_0x4a6e75)return console[_0x546778(0x1e2)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x30c768=_0x5711e7[_0x546778(0x266)];_0x5711e7[_0x546778(0x2cc)]&&(console['error']('Attempt\x20ID:\x20'+_0x4a6e75),_0x30c768&&console['error']('Including\x20subtasks:\x20yes'));const _0x4057de=await withSpinner(_0x546778(0x153),()=>_0xcdf21c[_0x546778(0x2b8)][_0x546778(0x258)](_0x4a6e75,_0x30c768||![]),{'verbose':_0x5711e7['verbose']}),_0x54111a=_0x4057de[_0x546778(0x1c3)];return console[_0x546778(0x1e2)](_0x546778(0x18a)+_0x54111a[_0x546778(0x152)]+_0x546778(0x1e8)+(_0x54111a[_0x546778(0x152)]!==0x1?'s':'')),await handleSDKOutput(_0x54111a,_0x5711e7),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x2a4);['description']=a42_0x271344(0x172);async[a42_0x271344(0x1ef)](_0x2ffb81){const _0x46ff54=a42_0x271344,{options:_0x44f588,args:_0x550c32,tdx:_0x26e3b4}=_0x2ffb81,_0x34b7d6=_0x550c32[0x0];let _0x2af40a=_0x550c32[0x1];if(!_0x34b7d6)return console[_0x46ff54(0x1e2)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x44f588[_0x46ff54(0x2cc)]&&(console[_0x46ff54(0x1e2)]('Attempt\x20ID:\x20'+_0x34b7d6),_0x2af40a&&console[_0x46ff54(0x1e2)](_0x46ff54(0x19f)+_0x2af40a));const _0x18dc52=await withSpinner(_0x46ff54(0x148),()=>_0x26e3b4['workflow'][_0x46ff54(0x24a)](_0x34b7d6,_0x2af40a),{'verbose':_0x44f588[_0x46ff54(0x2cc)]}),_0xa17cf0=_0x18dc52['data'];if(_0xa17cf0[_0x46ff54(0x152)]===0x0)return console[_0x46ff54(0x1e2)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x2af40a&&(_0x44f588['json']||_0x44f588[_0x46ff54(0x2ed)]))return await handleSDKOutput(_0xa17cf0,_0x44f588),0x0;if(!_0x2af40a){const _0x222795=_0xa17cf0['map'](_0x24e890=>({'title':_0x24e890[_0x46ff54(0x237)]+'\x20('+formatBytes(_0x24e890[_0x46ff54(0x1a7)])+')','value':_0x24e890['taskName']})),_0x3c3fa8=await a42_0x5e9a1d({'type':'select','name':_0x46ff54(0x17c),'message':_0x46ff54(0x234),'choices':_0x222795});if(!_0x3c3fa8['task'])return console[_0x46ff54(0x1e2)](_0x46ff54(0x1e5)),0x0;_0x2af40a=_0x3c3fa8[_0x46ff54(0x17c)];}const _0x530fcd=await withSpinner('Downloading\x20logs...',()=>_0x26e3b4[_0x46ff54(0x2b8)][_0x46ff54(0x209)](_0x34b7d6,_0x2af40a),{'verbose':_0x44f588['verbose']}),_0x5a0813=_0x530fcd[_0x46ff54(0x1c3)];return _0x5a0813?console[_0x46ff54(0x295)](_0x5a0813):console[_0x46ff54(0x1e2)](_0x46ff54(0x16e)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x284);[a42_0x271344(0x186)]=a42_0x271344(0x2aa);async[a42_0x271344(0x1ef)](_0x20108d){const _0xc8d50b=a42_0x271344,{options:_0x6746ff,args:_0x5e7228,tdx:_0x484099}=_0x20108d,_0xcebaa6=_0x5e7228[0x0];if(!_0xcebaa6)return console['error'](_0xc8d50b(0x19e)),0x1;const _0x3e9535=_0x6746ff[_0xc8d50b(0x198)];_0x6746ff[_0xc8d50b(0x2cc)]&&(console[_0xc8d50b(0x1e2)]('Attempt\x20ID:\x20'+_0xcebaa6),_0x3e9535&&console[_0xc8d50b(0x1e2)]('Reason:\x20'+_0x3e9535));if(!_0x6746ff[_0xc8d50b(0x169)]){if(!isInteractive())return console[_0xc8d50b(0x1e2)](a42_0x4cb0ba[_0xc8d50b(0x2eb)](_0xc8d50b(0x16f)),_0xc8d50b(0x1b4)),console['error'](a42_0x4cb0ba[_0xc8d50b(0x1fb)](_0xc8d50b(0x1cc))),0x1;const _0x20950e=await confirmKey(_0xc8d50b(0x233)+_0xcebaa6+'?');if(!_0x20950e)return console['error'](a42_0x4cb0ba['yellow'](_0xc8d50b(0x1e5))),0x1;}const _0x18e3b0=await withSpinner('Killing\x20attempt...',()=>_0x484099[_0xc8d50b(0x2b8)]['kill'](_0xcebaa6,_0x3e9535),{'verbose':_0x6746ff['verbose']}),_0x503606=_0x18e3b0[_0xc8d50b(0x1c3)];return console['error']('✔\x20'+_0x503606),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a42_0x271344(0x2ac);[a42_0x271344(0x186)]=a42_0x271344(0x1fe);async[a42_0x271344(0x1ef)](_0x1e2175){const _0x922142=a42_0x271344,{options:_0x32b04d,args:_0x3683b2,tdx:_0x2cd933}=_0x1e2175,_0x181857=_0x3683b2[0x0];if(!_0x181857)return console['error'](_0x922142(0x286)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x52f8ca=![],_0x13fb48=_0x181857;if(_0x181857['startsWith'](_0x922142(0x2d3)))_0x52f8ca=!![],_0x13fb48=_0x181857[_0x922142(0x29e)](0x8);else{if(_0x181857['startsWith'](_0x922142(0x1d4)))_0x52f8ca=![],_0x13fb48=_0x181857[_0x922142(0x29e)](0x8);else return console['error'](_0x922142(0x1ab)),console[_0x922142(0x1e2)](_0x922142(0x28d)),0x1;}const _0x516372=_0x32b04d[_0x922142(0x1a6)],_0x2927e6=_0x32b04d[_0x922142(0x2a5)],_0x17c05a=_0x32b04d[_0x922142(0x151)],_0x4ddaa1=_0x32b04d[_0x922142(0x1b7)];_0x32b04d[_0x922142(0x2cc)]&&(console['error'](_0x922142(0x1f9)+(_0x52f8ca?'session':_0x922142(0x1e6))+'\x20'+_0x13fb48),_0x516372&&console[_0x922142(0x1e2)]('From\x20task:\x20'+_0x516372),_0x2927e6&&console['error'](_0x922142(0x2c0)+_0x2927e6),_0x17c05a&&console[_0x922142(0x1e2)](_0x922142(0x23d)+_0x17c05a),_0x4ddaa1&&console['error'](_0x922142(0x2f1)));let _0x1dd5ad;if(_0x17c05a)try{if(_0x17c05a[_0x922142(0x253)]('@')){const _0x4c1b50=await import('fs/promises'),_0x247cb5=_0x17c05a[_0x922142(0x29e)](0x1),_0x490c1e=await _0x4c1b50[_0x922142(0x2a0)](_0x247cb5,_0x922142(0x241));_0x1dd5ad=JSON[_0x922142(0x1cb)](_0x490c1e);}else _0x1dd5ad=JSON[_0x922142(0x1cb)](_0x17c05a);}catch{return console[_0x922142(0x1e2)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x32b04d[_0x922142(0x169)]){if(!isInteractive())return console[_0x922142(0x1e2)](a42_0x4cb0ba['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x922142(0x1e2)](a42_0x4cb0ba['dim'](_0x922142(0x1cc))),0x1;const _0x10a94a=await confirmKey(_0x922142(0x251)+(_0x52f8ca?_0x922142(0x23a):_0x922142(0x1e6))+'\x20'+_0x13fb48+'?');if(!_0x10a94a)return console['error'](a42_0x4cb0ba[_0x922142(0x1c6)](_0x922142(0x1e5))),0x1;}let _0x45be42;_0x52f8ca?_0x45be42=await withSpinner('Retrying\x20session...',()=>_0x2cd933['workflow'][_0x922142(0x21e)](_0x13fb48,{'fromTask':_0x516372,'retryParams':_0x1dd5ad}),{'verbose':_0x32b04d[_0x922142(0x2cc)]}):_0x45be42=await withSpinner(_0x922142(0x275),()=>_0x2cd933[_0x922142(0x2b8)][_0x922142(0x1d9)](_0x13fb48,{'resumeFrom':_0x2927e6,'retryParams':_0x1dd5ad,'force':_0x4ddaa1}),{'verbose':_0x32b04d[_0x922142(0x2cc)]});const _0x1e824d=_0x45be42[_0x922142(0x1c3)];return console[_0x922142(0x1e2)]('✔\x20Retry\x20started'),console[_0x922142(0x1e2)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x1e824d[_0x922142(0x16d)]),console[_0x922142(0x1e2)](_0x922142(0x149)+_0x1e824d[_0x922142(0x20b)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]='workflow:run';[a42_0x271344(0x186)]='Start\x20a\x20workflow\x20run';async[a42_0x271344(0x1ef)](_0x4783b9){const _0x757681=a42_0x271344,{options:_0x572edf,args:_0x4dd736,tdx:_0x295830}=_0x4783b9;let _0x508d63=_0x4dd736[0x0];if(!_0x508d63){const _0x8b0f58=this[_0x757681(0x16a)]([],_0x572edf),_0x36efea=await withSpinner(_0x757681(0x26c),()=>_0x295830[_0x757681(0x2b8)][_0x757681(0x2f3)](_0x8b0f58,{'limit':_0x572edf[_0x757681(0x22c)]}),{'verbose':_0x572edf[_0x757681(0x2cc)]}),_0x38490e=_0x36efea[_0x757681(0x1c3)];if(_0x38490e[_0x757681(0x152)]===0x0)return console[_0x757681(0x1e2)](_0x757681(0x2dc)),!_0x8b0f58&&console['error'](a42_0x4cb0ba[_0x757681(0x1fb)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x21d356=_0x38490e[_0x757681(0x174)](_0x518255=>({'title':_0x518255['project']?.[_0x757681(0x1bf)]+'.'+_0x518255[_0x757681(0x1bf)],'value':_0x518255[_0x757681(0x24b)]?.[_0x757681(0x1bf)]+'.'+_0x518255['name'],'description':_0x518255[_0x757681(0x1f7)]?_0x757681(0x265)+_0x518255[_0x757681(0x1f7)]:undefined})),_0x1ba9fe=await a42_0x5e9a1d({'type':'select','name':_0x757681(0x2b8),'message':_0x757681(0x1ae),'choices':_0x21d356});if(!_0x1ba9fe[_0x757681(0x2b8)])return 0x1;_0x508d63=_0x1ba9fe[_0x757681(0x2b8)];}if(!_0x508d63[_0x757681(0x181)]('.')){const _0x3e8d1b=this[_0x757681(0x16a)]([],_0x572edf);if(_0x3e8d1b)_0x508d63=_0x3e8d1b+'.'+_0x508d63;else return console[_0x757681(0x1e2)](a42_0x4cb0ba[_0x757681(0x2eb)](_0x757681(0x29a)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x757681(0x1e2)](a42_0x4cb0ba[_0x757681(0x1fb)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x8afa4e=_0x572edf[_0x757681(0x1bc)],_0x3524f6=_0x572edf[_0x757681(0x2d7)],_0x15cd64={};if(_0x8afa4e&&Array['isArray'](_0x8afa4e))for(const _0x3bcc8b of _0x8afa4e){const _0x4f430c=_0x3bcc8b['indexOf']('=');if(_0x4f430c===-0x1)return console['error'](_0x757681(0x2bd)+_0x3bcc8b),console[_0x757681(0x1e2)](_0x757681(0x2d9)),0x1;const _0x3d05d4=_0x3bcc8b[_0x757681(0x29e)](0x0,_0x4f430c),_0x56a6e2=_0x3bcc8b[_0x757681(0x29e)](_0x4f430c+0x1);try{_0x15cd64[_0x3d05d4]=JSON['parse'](_0x56a6e2);}catch{_0x15cd64[_0x3d05d4]=_0x56a6e2;}}_0x572edf[_0x757681(0x2cc)]&&(console[_0x757681(0x1e2)](_0x757681(0x1a4)+_0x508d63),Object[_0x757681(0x17a)](_0x15cd64)[_0x757681(0x152)]>0x0&&console[_0x757681(0x1e2)]('Parameters:\x20'+JSON[_0x757681(0x29b)](_0x15cd64)),_0x3524f6&&console[_0x757681(0x1e2)](_0x757681(0x264)+_0x3524f6));const _0x96a04b=await withSpinner('Starting\x20workflow\x20run...',()=>_0x295830[_0x757681(0x2b8)][_0x757681(0x1b0)](_0x508d63,_0x15cd64,{'sessionTime':_0x3524f6}),{'verbose':_0x572edf[_0x757681(0x2cc)]}),_0xe7baf2=_0x96a04b[_0x757681(0x1c3)];console[_0x757681(0x1e2)](_0x757681(0x14d)),console[_0x757681(0x1e2)](_0x757681(0x192)+_0xe7baf2['id']),console[_0x757681(0x1e2)](_0x757681(0x149)+_0xe7baf2[_0x757681(0x20b)]),console['error'](_0x757681(0x248)+_0xe7baf2['project']?.[_0x757681(0x1bf)]),console[_0x757681(0x1e2)](_0x757681(0x195)+_0xe7baf2['workflow']?.[_0x757681(0x1bf)]);if(_0xe7baf2[_0x757681(0x24b)]?.['id']&&_0xe7baf2[_0x757681(0x20b)]&&_0xe7baf2['id']){const _0x7a7ccc=_0x572edf['site'],_0x104148=getConsoleUrl(_0x7a7ccc,_0x757681(0x298)+_0xe7baf2[_0x757681(0x24b)]['id']+_0x757681(0x20e)+_0xe7baf2[_0x757681(0x20b)]+_0x757681(0x1fa)+_0xe7baf2['id']);console[_0x757681(0x1e2)](_0x757681(0x2ab)+a42_0x4cb0ba[_0x757681(0x27a)](_0x104148));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x14c);['description']='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0x271344(0x1ef)](_0xa2faf8){const _0x1259e3=a42_0x271344,{options:_0x385ce7,args:_0x136784,tdx:_0x57d176}=_0xa2faf8,_0xf6f47d=_0x136784[0x0],_0x56c363=_0x136784[0x1]||'.';if(!_0xf6f47d)return console['error'](_0x1259e3(0x289)),console['error'](_0x1259e3(0x269)),0x1;const _0x38f89c=_0x385ce7[_0x1259e3(0x1f7)];_0x385ce7['verbose']&&(console[_0x1259e3(0x1e2)]('Project:\x20'+_0xf6f47d),console[_0x1259e3(0x1e2)](_0x1259e3(0x2ba)+_0x56c363),_0x38f89c&&console[_0x1259e3(0x1e2)](_0x1259e3(0x229)+_0x38f89c));const _0x3ae907=await withSpinner('Downloading\x20project\x20'+_0xf6f47d+'...',()=>_0x57d176[_0x1259e3(0x2b8)][_0x1259e3(0x1de)](_0xf6f47d,_0x56c363,{'revision':_0x38f89c}),{'verbose':_0x385ce7[_0x1259e3(0x2cc)]}),_0x2097e3=_0x3ae907['data'];return console[_0x1259e3(0x1e2)](_0x1259e3(0x219)+_0x2097e3['projectName']),console['error'](_0x1259e3(0x1df)+_0x2097e3['revision']),console[_0x1259e3(0x1e2)](_0x1259e3(0x1e3)+_0x2097e3['filesExtracted']),console[_0x1259e3(0x1e2)]('\x20\x20Location:\x20'+_0x56c363+'/'+_0x2097e3[_0x1259e3(0x19a)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x259);[a42_0x271344(0x186)]=a42_0x271344(0x217);async[a42_0x271344(0x1ef)](_0x479eef){const _0x5ab344=a42_0x271344,{options:_0x2834ff,args:_0x56c0b1,tdx:_0x5d9638}=_0x479eef;let _0x2bbc9d='.',_0x41ee06=_0x2834ff['name'];if(_0x56c0b1[0x0]){const {promises:_0x5d566e}=await import('fs');try{const _0x2c8f94=await _0x5d566e[_0x5ab344(0x1bb)](_0x56c0b1[0x0]);if(_0x2c8f94[_0x5ab344(0x270)]())_0x2bbc9d=_0x56c0b1[0x0];else return console[_0x5ab344(0x1e2)]('Error:\x20'+_0x56c0b1[0x0]+_0x5ab344(0x2da)),0x1;}catch{_0x41ee06=_0x56c0b1[0x0],_0x2bbc9d='.';}}const _0x32140c=_0x2834ff[_0x5ab344(0x1f7)],_0x3151e8=_0x2834ff[_0x5ab344(0x2ec)];_0x2834ff['verbose']&&(console['error']('Project\x20directory:\x20'+_0x2bbc9d),_0x41ee06&&console[_0x5ab344(0x1e2)](_0x5ab344(0x1d2)+_0x41ee06),_0x32140c&&console[_0x5ab344(0x1e2)](_0x5ab344(0x229)+_0x32140c),_0x3151e8&&console[_0x5ab344(0x1e2)](_0x5ab344(0x22f)));const _0x3722fb=await withSpinner(_0x5ab344(0x164),()=>_0x5d9638[_0x5ab344(0x2b8)][_0x5ab344(0x1ad)](_0x2bbc9d,{'projectName':_0x41ee06,'revision':_0x32140c,'skipValidation':_0x3151e8}),{'verbose':_0x2834ff[_0x5ab344(0x2cc)]}),_0x323ddd=_0x3722fb[_0x5ab344(0x1c3)];return console['error'](_0x5ab344(0x14b)+_0x323ddd[_0x5ab344(0x19a)]),console[_0x5ab344(0x1e2)]('\x20\x20Project\x20ID:\x20'+_0x323ddd[_0x5ab344(0x201)]),console[_0x5ab344(0x1e2)](_0x5ab344(0x1df)+_0x323ddd[_0x5ab344(0x1f7)]),await this[_0x5ab344(0x203)](_0x5d9638,_0x323ddd[_0x5ab344(0x19a)],_0x2834ff['site']),0x0;}}function a42_0x3fe2(){const _0x7d6bda=['/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','\x20\x20Changes:\x20','retrySession','site','\x20sessions\x20','has','\x0aDry\x20run\x20-\x20no\x20project\x20created','success','startTime','workflow:secrets:list','Show\x20tasks\x20for\x20an\x20attempt','Analyzing\x20changes...','buildTimelineData','Revision:\x20','-\x20nothing\x20pushed','✔\x20Push\x20complete','limit','list','63zdimhp','Validation:\x20skipped','running','✔\x20Secret\x20\x27','\x0aClone\x20\x22','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Select\x20a\x20task\x20to\x20view\x20logs:','localeCompare','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','taskName','→\x20New\x20project:\x20','No\x20sessions\x20found\x20for:\x20','session','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Listing\x20workflow\x20projects...','Params:\x20','resolve','Select\x20a\x20session\x20to\x20view\x20timeline:','done','utf-8','split','No\x20sessions\x20found','planned','Cloning\x20to\x20','fullName','join','\x20\x20Project:\x20','deleteSecret','logFiles','project','workflow:attempt','Listing\x20workflow\x20sessions...','unchanged','workflow:secrets:delete','getDate','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflow:pull','startsWith','canceling','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','tasks','workflow:upload','-\x20no\x20files\x20written','Listing\x20secrets...','min','Latest\x20session\x20has\x20no\x20attempt','Filter:\x20','now','columns','✔\x20Workflow\x20project\x20set\x20to:\x20','211722KBtmep','output','Session\x20time:\x20','revision:\x20','includeSubtasks','Attempt:\x20','summary','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x22?\x20This\x20cannot\x20be\x20undone.','toISOString','Loading\x20workflows...','targetExists','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','getMinutes','isDirectory','sourceDir','type','\x20\x20tdx\x20wf\x20use\x20<project>','Auto-selected\x20latest\x20session:\x20','Retrying\x20attempt...','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','\x20tasks','Writing\x20files...','Session\x20','cyan','POLL_INTERVAL_MS','Source\x20project:\x20','replace','No\x20workflow\x20sessions\x20found','\x20secret','padStart','\x1b[1A\x1b[2K','21RcxCYH','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','workflow:kill','35512YeEioN','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','No\x20sessions\x20with\x20timing\x20information','filter','Error:\x20Project\x20name\x20is\x20required','\x20new','workflow:push','Updating\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Target\x20directory:\x20','Listing\x20workflows...','⚠\x20Showing\x20first\x20','Loading\x20session...','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','unknown','workflow:projects','log','dryRun','\x0a✔\x20No\x20changes\x20to\x20push','/app/workflows/','workflow:clone','Error:','stringify','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','substring','\x20modified','readFile','...','createdAt','\x0aFailed\x20to\x20fetch\x20attempt\x20data','workflow:logs','resumeFrom','end','✔\x20Showing\x20','modified','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Kill\x20a\x20running\x20attempt','\x20\x20Console:\x20','workflow:retry','ICON_WIDTH','1313156OECZpN','\x20(system)','\x20\x20Source:\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x20to\x20see\x20detailed\x20logs','getMonth','find','pullProject','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','✔\x20Project\x20updated','workflow','MAX_POLL_ITERATIONS','Output\x20directory:\x20','\x0aPolling...\x20(','MIN_TIMELINE_WIDTH','Error:\x20Invalid\x20parameter\x20format:\x20','892825QHPdTj','New\x20project\x20name:\x20','Resume\x20from:\x20','renderSingleTimeline','Source:\x20','getTime','Warning:','📋\x20','getFullYear','Listing\x20workflow\x20attempts...','Pushing\x20project...','path','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','durationMs','verbose','Files\x20to\x20upload:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','executeCloneProject','Loading\x20sessions...','Analyzing\x20project...','from','session:','(use\x20--limit\x20to\x20see\x20more)',',\x20Workflow:\x20','\x20(use\x20--limit\x20to\x20show\x20more)','sessionTime','blue','Expected\x20format:\x20--param\x20key=value','\x20is\x20not\x20a\x20directory','newProjectName','No\x20workflows\x20found','Key\x20cannot\x20be\x20empty','workflow:timeline','Show\x20specific\x20attempt\x20details','MAX_LABEL_COUNT','diff','✔\x20Deleted\x20project\x20','clear','finishedAt','workflowProject','56799WFvvra','Error:\x20Secret\x20key\x20is\x20required','workflow:attempts','(unknown)','pending','red','skipValidation','format','autocomplete','Getting\x20attempt\x20details...','MAX_TASKS_DISPLAY','Force:\x20yes','cancelRequested','workflows','Usage:\x20workflow:delete\x20<project-name-or-id>','title','rows','Fetching\x20log\x20files...','\x20\x20Session\x20ID:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','✔\x20Pushed\x20','workflow:download','✔\x20Workflow\x20run\x20started','MAX_TIMELINE_WIDTH','white','prepareCloneProject','params','length','Getting\x20attempt\x20tasks...','set','Setting\x20secret...','existingProjectId','\x0aPush\x20these\x20changes?','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Project\x20filter:\x20','No\x20attempts\x20found','parseProjectWorkflowPattern','sessions','match','Error:\x20KEY=VALUE\x20is\x20required','No\x20workflows\x20found\x20in\x20project:\x20','\x20deleted','\x22\x20to\x20new\x20project\x20\x22','LABEL_MIN_SPACING','message','Pushing\x20workflow\x20project...','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','fileCount','text','msPerChar','yes','resolveProject','resolveProjectDir','table','attemptId','No\x20log\x20content\x20found','\x0aError:','Project\x20name\x20is\x20required','trimEnd','Show\x20logs\x20for\x20a\x20workflow\x20attempt','jsonl','map','renderSessionsTimeline','pollTimeline','Pulling\x20project\x20','group_error','\x0aDry\x20run\x20-\x20no\x20files\x20written','keys','No\x20attempts\x20found\x20in\x20project:\x20','task','every','values','updatedAt','workflow:secrets:set','includes','\x20unchanged','displayLine','---\x20','ICON_SPACING','description','✔\x20Pull\x20complete','repeat','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✔\x20Found\x20','\x27\x20from\x20project\x20\x27','lastAttempt','tdx\x20wf\x20attempt\x20','9408850cgkaJk','Using\x20attempt\x20','Tip:\x20cd\x20to\x20workflows/','\x22\x20with\x20new\x20revision?','\x20\x20Attempt\x20ID:\x20','follow','trim','\x20\x20Workflow:\x20','delete','Source\x20directory\x20is\x20required','reason','Key:\x20','projectName','🔄\x20','json','List\x20workflow\x20execution\x20sessions','Error:\x20Attempt\x20ID\x20is\x20required','Task\x20name:\x20','requireProject','\x20-\x20','sys','workflow:workflows','Workflow:\x20','Source\x20directory:\x20','fromTask','fileSize','Invalid\x20format:\x20','basename','List\x20workflow\x20attempts','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','getHours','push','Select\x20a\x20workflow\x20to\x20run','toLowerCase','run','\x20\x20Session\x20context\x20set\x20to:\x20','window','13402JDkkPu','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','state','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','force','List\x20workflows','some','startedAt','stat','param','all','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','name','max','\x27...','targetDir','data','\x22\x20already\x20exists\x20(ID:\x20','navigateSessionsInteractive','yellow','Pull\x20workflow\x20project\x20to\x20local\x20folder','retryAttemptName','\x20has\x20no\x20attempts','\x20\x20Location:\x20','parse','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','sort','size','relative','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','💡\x20Tip:\x20Use\x20','Project\x20name:\x20','key','attempt:','\x0a✔\x20Attempt\x20complete','deleted','Total:\x20','listSecrets','retryAttempt','isTTY','\x20from\x20session\x20','fill','workflow:use','download','\x20\x20Revision:\x20','cwd','indexOf','error','\x20\x20Files\x20extracted:\x20','Project:\x20','Cancelled','attempt','No\x20workflow\x20tdx.json\x20found','\x20task','\x20session','369SksvTq','status','workflow:tasks','\x0aUpdate\x20existing\x20project\x20\x22','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','execute','\x0a✔\x20Already\x20up\x20to\x20date','sourceProjectName','\x20\x20Project\x20ID:\x20','write','floor','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','start','revision','value','Target:\x20','/attempt/','dim','GUTTER','duration','Retry\x20a\x20session\x20or\x20attempt','green','No\x20sessions\x20found\x20in\x20project:\x20','projectId','attempts','showWorkflowConsoleUrl','✔\x20Project:\x20','generateSessionTimelineRows','stdout','Filter:\x20project=','metadata','logs','Session\x20not\x20found:\x20','sessionId','\x20workflow','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','/sessions/','→\x20Project:\x20','get','workflow:sessions','\x0a⚠\x20Project\x20\x22','slice','index','TASK_NAME_WIDTH','renderTimeline','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Dry\x20run:\x20yes','✔\x20Downloaded\x20','includeRetried','splice'];a42_0x3fe2=function(){return _0x7d6bda;};return a42_0x3fe2();}export class WorkflowPullCommand extends BaseCommand{['name']=a42_0x271344(0x252);['description']=a42_0x271344(0x1c7);async[a42_0x271344(0x1ef)](_0x1978aa){const _0x4f1c5c=a42_0x271344,{options:_0xceb75a,args:_0x20262d,tdx:_0x1efb44}=_0x1978aa,_0x1e21be=_0x20262d[0x0],_0x59bc4a=_0x20262d[0x1];if(!_0x1e21be)return console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba[_0x4f1c5c(0x2eb)]('Error:'),_0x4f1c5c(0x170)),console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba['dim'](_0x4f1c5c(0x2ca))),0x1;const _0xd119d9=_0xceb75a[_0x4f1c5c(0x1f7)];_0xceb75a[_0x4f1c5c(0x2cc)]&&(console[_0x4f1c5c(0x1e2)](_0x4f1c5c(0x1e4)+_0x1e21be),_0x59bc4a&&console[_0x4f1c5c(0x1e2)](_0x4f1c5c(0x28e)+_0x59bc4a),_0xd119d9&&console[_0x4f1c5c(0x1e2)](_0x4f1c5c(0x229)+_0xd119d9),_0xceb75a[_0x4f1c5c(0x296)]&&console['error'](_0x4f1c5c(0x218)));const _0x1e2fe5=await withSpinner(_0x4f1c5c(0x177)+_0x1e21be+_0x4f1c5c(0x2a1),()=>_0x1efb44[_0x4f1c5c(0x2b8)][_0x4f1c5c(0x2b5)](_0x1e21be,{'targetDir':_0x59bc4a,'revision':_0xd119d9}),{'verbose':_0xceb75a['verbose']}),_0x1de765=_0x1e2fe5['data'];_0x1de765['isNewProject']?console[_0x4f1c5c(0x1e2)](_0x4f1c5c(0x238)+_0x1de765[_0x4f1c5c(0x19a)]):console[_0x4f1c5c(0x1e2)](_0x4f1c5c(0x20f)+_0x1de765[_0x4f1c5c(0x19a)]);console[_0x4f1c5c(0x1e2)](_0x4f1c5c(0x1df)+_0x1de765['revision']),console['error']('\x20\x20Target:\x20'+(a42_0xff53de[_0x4f1c5c(0x1cf)](process[_0x4f1c5c(0x1e0)](),_0x1de765[_0x4f1c5c(0x1c2)])||'.')),console['error'](_0x4f1c5c(0x21d)+a42_0x4cb0ba[_0x4f1c5c(0x1ff)]('+'+_0x1de765[_0x4f1c5c(0x268)]['new']+_0x4f1c5c(0x28a))+',\x20'+(a42_0x4cb0ba[_0x4f1c5c(0x1c6)]('~'+_0x1de765['summary']['modified']+_0x4f1c5c(0x29f))+',\x20')+(a42_0x4cb0ba[_0x4f1c5c(0x2eb)]('-'+_0x1de765[_0x4f1c5c(0x268)]['deleted']+_0x4f1c5c(0x160))+',\x20')+(''+a42_0x4cb0ba[_0x4f1c5c(0x1fb)](_0x1de765['summary'][_0x4f1c5c(0x24e)]+_0x4f1c5c(0x182))));for(const _0xa347f9 of _0x1de765['changes']){_0xa347f9[_0x4f1c5c(0x272)]===_0x4f1c5c(0x2a8)&&_0xa347f9[_0x4f1c5c(0x2e1)]&&(console[_0x4f1c5c(0x1e2)]('\x0a'+a42_0x4cb0ba[_0x4f1c5c(0x27a)](_0x4f1c5c(0x184)+_0xa347f9[_0x4f1c5c(0x2c9)])),console[_0x4f1c5c(0x1e2)](_0xa347f9[_0x4f1c5c(0x2e1)]));}if(!_0x1de765['hasChanges'])return saveSessionContext({'workflow_project':_0x1de765[_0x4f1c5c(0x19a)]},_0xceb75a[_0x4f1c5c(0x23a)]),console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba[_0x4f1c5c(0x1ff)](_0x4f1c5c(0x1f0))),console['error'](a42_0x4cb0ba[_0x4f1c5c(0x1fb)](_0x4f1c5c(0x1b1)+_0x1de765[_0x4f1c5c(0x19a)])),0x0;if(_0xceb75a[_0x4f1c5c(0x296)])return console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba[_0x4f1c5c(0x1c6)](_0x4f1c5c(0x179))),0x0;if(!_0xceb75a[_0x4f1c5c(0x169)]){if(!isInteractive())return console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba['red'](_0x4f1c5c(0x16f)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba[_0x4f1c5c(0x1fb)](_0x4f1c5c(0x1cc))),0x1;const _0x55a129=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x55a129)return console['error'](a42_0x4cb0ba[_0x4f1c5c(0x1c6)](_0x4f1c5c(0x1e5)),_0x4f1c5c(0x25a)),0x1;}await withSpinner(_0x4f1c5c(0x278),()=>_0x1efb44['workflow']['applyPullProject'](_0x1de765,{'revision':_0xd119d9}),{'verbose':_0xceb75a['verbose']}),saveSessionContext({'workflow_project':_0x1de765[_0x4f1c5c(0x19a)]},_0xceb75a[_0x4f1c5c(0x23a)]),console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba[_0x4f1c5c(0x1ff)](_0x4f1c5c(0x187)));const _0x1272e2=a42_0xff53de[_0x4f1c5c(0x1cf)](process['cwd'](),_0x1de765[_0x4f1c5c(0x1c2)])||'.';return console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba[_0x4f1c5c(0x1fb)](_0x4f1c5c(0x1ca)+_0x1272e2)),console[_0x4f1c5c(0x1e2)](a42_0x4cb0ba[_0x4f1c5c(0x1fb)](_0x4f1c5c(0x1b1)+_0x1de765[_0x4f1c5c(0x19a)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x28b);['description']=a42_0x271344(0x23b);async['execute'](_0x1dd9f6){const _0x4dcd79=a42_0x271344,{options:_0x3cbde4,args:_0x4a1079,tdx:_0x402740}=_0x1dd9f6,_0x33e555=this[_0x4dcd79(0x16b)](_0x4a1079,_0x3cbde4),_0x388dce=_0x3cbde4['revision'],_0x43811f=_0x3cbde4[_0x4dcd79(0x2ec)];_0x3cbde4[_0x4dcd79(0x2cc)]&&(_0x33e555&&console[_0x4dcd79(0x1e2)](_0x4dcd79(0x1a5)+_0x33e555),_0x388dce&&console['error'](_0x4dcd79(0x229)+_0x388dce),_0x3cbde4[_0x4dcd79(0x296)]&&console[_0x4dcd79(0x1e2)](_0x4dcd79(0x218)),_0x43811f&&console['error'](_0x4dcd79(0x22f)));let _0x1e731b;try{_0x1e731b=await withSpinner(_0x4dcd79(0x227),()=>_0x402740['workflow']['preparePushProject']({'sourceDir':_0x33e555,'revision':_0x388dce,'skipValidation':_0x43811f}),{'verbose':_0x3cbde4[_0x4dcd79(0x2cc)]});}catch(_0x1e85ae){if(_0x1e85ae instanceof Error&&_0x1e85ae[_0x4dcd79(0x163)][_0x4dcd79(0x181)](_0x4dcd79(0x1e7)))return console[_0x4dcd79(0x1e2)](a42_0x4cb0ba['red'](_0x4dcd79(0x29a)),_0x4dcd79(0x256)),_0x3cbde4[_0x4dcd79(0x2e5)]?console[_0x4dcd79(0x1e2)](a42_0x4cb0ba['dim'](_0x4dcd79(0x190)+_0x3cbde4[_0x4dcd79(0x2e5)]+_0x4dcd79(0x21c)+_0x3cbde4[_0x4dcd79(0x2e5)]+'\x27')):console[_0x4dcd79(0x1e2)](a42_0x4cb0ba[_0x4dcd79(0x1fb)](_0x4dcd79(0x158))),0x1;throw _0x1e85ae;}const _0x492b6c=_0x1e731b['data'];console['error'](_0x4dcd79(0x204)+_0x492b6c[_0x4dcd79(0x19a)]),console[_0x4dcd79(0x1e2)](_0x4dcd79(0x2b0)+_0x492b6c[_0x4dcd79(0x271)]),console[_0x4dcd79(0x1e2)](_0x4dcd79(0x1df)+_0x492b6c[_0x4dcd79(0x1f7)]),console[_0x4dcd79(0x1e2)]('\x20\x20Changes:\x20'+a42_0x4cb0ba[_0x4dcd79(0x1ff)]('+'+_0x492b6c[_0x4dcd79(0x268)]['new']+_0x4dcd79(0x28a))+',\x20'+(a42_0x4cb0ba[_0x4dcd79(0x1c6)]('~'+_0x492b6c[_0x4dcd79(0x268)][_0x4dcd79(0x2a8)]+_0x4dcd79(0x29f))+',\x20')+(a42_0x4cb0ba[_0x4dcd79(0x2eb)]('-'+_0x492b6c[_0x4dcd79(0x268)][_0x4dcd79(0x1d6)]+'\x20deleted')+',\x20')+(''+a42_0x4cb0ba[_0x4dcd79(0x1fb)](_0x492b6c['summary']['unchanged']+'\x20unchanged')));for(const _0x4de858 of _0x492b6c['changes']){_0x4de858[_0x4dcd79(0x272)]==='modified'&&_0x4de858[_0x4dcd79(0x2e1)]&&(console[_0x4dcd79(0x1e2)]('\x0a'+a42_0x4cb0ba[_0x4dcd79(0x27a)](_0x4dcd79(0x184)+_0x4de858[_0x4dcd79(0x2c9)])),console['error'](_0x4de858[_0x4dcd79(0x2e1)]));}if(!_0x492b6c['hasChanges'])return console[_0x4dcd79(0x1e2)](a42_0x4cb0ba[_0x4dcd79(0x1ff)](_0x4dcd79(0x297))),await this[_0x4dcd79(0x203)](_0x402740,_0x492b6c['projectName'],_0x3cbde4[_0x4dcd79(0x21f)]),0x0;if(_0x3cbde4['dryRun'])return console[_0x4dcd79(0x1e2)](a42_0x4cb0ba['yellow']('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x3cbde4[_0x4dcd79(0x169)]){if(!isInteractive())return console['error'](a42_0x4cb0ba[_0x4dcd79(0x2eb)](_0x4dcd79(0x16f)),_0x4dcd79(0x1b4)),console[_0x4dcd79(0x1e2)](a42_0x4cb0ba[_0x4dcd79(0x1fb)](_0x4dcd79(0x1cc))),0x1;const _0x4c1a3c=await confirmKey(_0x4dcd79(0x157));if(!_0x4c1a3c)return console[_0x4dcd79(0x1e2)](a42_0x4cb0ba[_0x4dcd79(0x1c6)](_0x4dcd79(0x1e5)),_0x4dcd79(0x22a)),0x1;}const _0x19ff18=await withSpinner(_0x4dcd79(0x2c8),()=>_0x402740[_0x4dcd79(0x2b8)]['executePushProject'](_0x492b6c),{'verbose':_0x3cbde4[_0x4dcd79(0x2cc)]}),_0x5803c0=_0x19ff18[_0x4dcd79(0x1c3)];return console[_0x4dcd79(0x1e2)](a42_0x4cb0ba[_0x4dcd79(0x1ff)](_0x4dcd79(0x22b))),console[_0x4dcd79(0x1e2)](_0x4dcd79(0x1f2)+_0x5803c0[_0x4dcd79(0x201)]),console[_0x4dcd79(0x1e2)](_0x4dcd79(0x1df)+_0x5803c0['revision']),await this['showWorkflowConsoleUrl'](_0x402740,_0x5803c0[_0x4dcd79(0x19a)],_0x3cbde4['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x299);[a42_0x271344(0x186)]=a42_0x271344(0x283);async[a42_0x271344(0x1ef)](_0x3ae30d){const _0x8d75f1=a42_0x271344,{options:_0x586b15,args:_0x3ccd1a,tdx:_0x1c122d}=_0x3ae30d,_0x24f9e8=this['resolveProjectDir'](_0x3ccd1a,_0x586b15),_0x6fc0fd=_0x586b15[_0x8d75f1(0x1bf)],_0x44d177=_0x586b15[_0x8d75f1(0x1f7)],_0x5148ab=_0x586b15[_0x8d75f1(0x2ec)];if(!_0x24f9e8)return console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x2eb)](_0x8d75f1(0x29a)),_0x8d75f1(0x197)),console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x1fb)](_0x8d75f1(0x1f5))),console['error'](a42_0x4cb0ba[_0x8d75f1(0x1fb)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x6fc0fd)return console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x2eb)](_0x8d75f1(0x29a)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console['error'](a42_0x4cb0ba[_0x8d75f1(0x1fb)](_0x8d75f1(0x1f5))),0x1;_0x586b15[_0x8d75f1(0x2cc)]&&(console['error'](_0x8d75f1(0x1a5)+_0x24f9e8),console['error'](_0x8d75f1(0x2bf)+_0x6fc0fd),_0x44d177&&console[_0x8d75f1(0x1e2)](_0x8d75f1(0x229)+_0x44d177),_0x586b15[_0x8d75f1(0x296)]&&console[_0x8d75f1(0x1e2)](_0x8d75f1(0x218)),_0x5148ab&&console['error']('Validation:\x20skipped'));const _0x2c89e3=await withSpinner(_0x8d75f1(0x2d1),()=>_0x1c122d[_0x8d75f1(0x2b8)][_0x8d75f1(0x150)](_0x24f9e8,_0x6fc0fd,{'revision':_0x44d177,'skipValidation':_0x5148ab}),{'verbose':_0x586b15['verbose']}),_0x2b50bb=_0x2c89e3[_0x8d75f1(0x1c3)];console['error'](_0x8d75f1(0x2c2)+_0x2b50bb[_0x8d75f1(0x271)]);_0x2b50bb[_0x8d75f1(0x1f1)]&&console[_0x8d75f1(0x1e2)](_0x8d75f1(0x27c)+_0x2b50bb[_0x8d75f1(0x1f1)]);console['error'](_0x8d75f1(0x2bf)+_0x2b50bb[_0x8d75f1(0x2db)]),console[_0x8d75f1(0x1e2)](_0x8d75f1(0x229)+_0x2b50bb[_0x8d75f1(0x1f7)]),console[_0x8d75f1(0x1e2)](_0x8d75f1(0x2cd)+_0x2b50bb[_0x8d75f1(0x166)]);_0x2b50bb[_0x8d75f1(0x26d)]&&(console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x1c6)](_0x8d75f1(0x212)+_0x2b50bb[_0x8d75f1(0x2db)]+_0x8d75f1(0x1c4)+_0x2b50bb[_0x8d75f1(0x156)]+')')),console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x1c6)](_0x8d75f1(0x1ee))));if(_0x586b15['dryRun'])return console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x1c6)](_0x8d75f1(0x222))),0x0;if(!_0x586b15[_0x8d75f1(0x169)]){if(!isInteractive())return console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x2eb)](_0x8d75f1(0x16f)),_0x8d75f1(0x1b4)),console[_0x8d75f1(0x1e2)](a42_0x4cb0ba['dim'](_0x8d75f1(0x1cc))),0x1;const _0x2a3898=_0x2b50bb[_0x8d75f1(0x1f1)]||a42_0xff53de[_0x8d75f1(0x1a9)](_0x24f9e8),_0xce9c9f=_0x2b50bb[_0x8d75f1(0x26d)]?_0x8d75f1(0x1ed)+_0x6fc0fd+_0x8d75f1(0x191):_0x8d75f1(0x232)+_0x2a3898+_0x8d75f1(0x161)+_0x6fc0fd+'\x22?',_0x2f11b4=await confirmKey(_0xce9c9f);if(!_0x2f11b4)return console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x1c6)](_0x8d75f1(0x1e5))),0x1;}const _0x483277=await withSpinner(_0x2b50bb[_0x8d75f1(0x26d)]?_0x8d75f1(0x28c)+_0x6fc0fd+'...':_0x8d75f1(0x245)+_0x6fc0fd+_0x8d75f1(0x2a1),()=>_0x1c122d[_0x8d75f1(0x2b8)][_0x8d75f1(0x2cf)](_0x2b50bb),{'verbose':_0x586b15[_0x8d75f1(0x2cc)]}),_0x17d9c7=_0x483277['data'];return console[_0x8d75f1(0x1e2)](a42_0x4cb0ba[_0x8d75f1(0x1ff)](_0x2b50bb[_0x8d75f1(0x26d)]?_0x8d75f1(0x2b7):'✔\x20Clone\x20complete')),console[_0x8d75f1(0x1e2)](_0x8d75f1(0x248)+_0x17d9c7[_0x8d75f1(0x2db)]),console[_0x8d75f1(0x1e2)](_0x8d75f1(0x1f2)+_0x17d9c7['newProjectId']),console['error']('\x20\x20Revision:\x20'+_0x17d9c7[_0x8d75f1(0x1f7)]),await this[_0x8d75f1(0x203)](_0x1c122d,_0x17d9c7['newProjectName'],_0x586b15[_0x8d75f1(0x21f)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x271344(0x1bf)]='workflow:delete';[a42_0x271344(0x186)]=a42_0x271344(0x292);async[a42_0x271344(0x1ef)](_0x378e5c){const _0x14d91a=a42_0x271344,{options:_0x4b5fd6,args:_0x2711b6,tdx:_0x43e5f0}=_0x378e5c,_0x515f37=_0x2711b6[0x0];if(!_0x515f37)return console[_0x14d91a(0x1e2)](_0x14d91a(0x14a)),console['error'](_0x14d91a(0x2f4)),0x1;_0x4b5fd6[_0x14d91a(0x2cc)]&&console[_0x14d91a(0x1e2)](_0x14d91a(0x1e4)+_0x515f37);if(!_0x4b5fd6['yes']){if(!isInteractive())return console[_0x14d91a(0x1e2)](a42_0x4cb0ba[_0x14d91a(0x2eb)](_0x14d91a(0x16f)),_0x14d91a(0x1b4)),console[_0x14d91a(0x1e2)](a42_0x4cb0ba[_0x14d91a(0x1fb)](_0x14d91a(0x1cc))),0x1;const _0x4a98a9=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x515f37+_0x14d91a(0x26a));if(!_0x4a98a9)return console['error'](a42_0x4cb0ba[_0x14d91a(0x1c6)](_0x14d91a(0x1e5))),0x1;}const _0x19a0fe=await withSpinner('Deleting\x20project\x20'+_0x515f37+'...',()=>_0x43e5f0[_0x14d91a(0x2b8)][_0x14d91a(0x196)](_0x515f37),{'verbose':_0x4b5fd6[_0x14d91a(0x2cc)]}),_0x58f3cf=_0x19a0fe[_0x14d91a(0x1c3)];return console[_0x14d91a(0x1e2)](_0x14d91a(0x2e2)+_0x58f3cf[_0x14d91a(0x19a)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x58f3cf[_0x14d91a(0x201)]),0x0;}}export function parseKeyValue(_0x367e0c){const _0x107742=a42_0x271344,_0x4a2a01=_0x367e0c[_0x107742(0x1e1)]('=');if(_0x4a2a01===-0x1)throw new Error(_0x107742(0x1a8)+_0x367e0c+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x20b31c=_0x367e0c['substring'](0x0,_0x4a2a01),_0x422882=_0x367e0c[_0x107742(0x29e)](_0x4a2a01+0x1);if(!_0x20b31c)throw new Error(_0x107742(0x2dd));return{'key':_0x20b31c,'value':_0x422882};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x225);[a42_0x271344(0x186)]=a42_0x271344(0x257);async[a42_0x271344(0x1ef)](_0x320f1e){const _0x3d5376=a42_0x271344,{options:_0x5b1175,args:_0x58cca7,tdx:_0x677ae5}=_0x320f1e,_0x35721d=this[_0x3d5376(0x1a0)](_0x58cca7,_0x5b1175);if(!_0x35721d)return 0x1;_0x5b1175[_0x3d5376(0x2cc)]&&console[_0x3d5376(0x1e2)](_0x3d5376(0x1e4)+_0x35721d);const _0x487041=await withSpinner(_0x3d5376(0x25b),()=>_0x677ae5[_0x3d5376(0x2b8)][_0x3d5376(0x1d8)](_0x35721d),{'verbose':_0x5b1175[_0x3d5376(0x2cc)]}),{secrets:_0x19c9b3}=_0x487041[_0x3d5376(0x1c3)];return console[_0x3d5376(0x1e2)](_0x3d5376(0x18a)+_0x19c9b3[_0x3d5376(0x152)]+_0x3d5376(0x27f)+(_0x19c9b3['length']!==0x1?'s':'')),await handleSDKOutput(_0x19c9b3,_0x5b1175),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x180);[a42_0x271344(0x186)]=a42_0x271344(0x2b1);async[a42_0x271344(0x1ef)](_0x17f5ad){const _0x4be3a3=a42_0x271344,{options:_0x38aafd,args:_0xcf610c,tdx:_0x2371d8}=_0x17f5ad;let _0x1d7c47,_0x4ad674;if(_0xcf610c[_0x4be3a3(0x152)]>=0x2)_0x1d7c47=_0xcf610c[0x0],_0x4ad674=_0xcf610c[0x1];else{if(_0xcf610c[_0x4be3a3(0x152)]===0x1&&_0x38aafd['workflowProject'])_0x1d7c47=_0x38aafd['workflowProject'],_0x4ad674=_0xcf610c[0x0];else return _0xcf610c[_0x4be3a3(0x152)]===0x1?(console[_0x4be3a3(0x1e2)](_0x4be3a3(0x289)),console[_0x4be3a3(0x1e2)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x4be3a3(0x1e2)](_0x4be3a3(0x15e)),console['error'](_0x4be3a3(0x165)),0x1);}let _0x342edf,_0x52f58f;try{({key:_0x342edf,value:_0x52f58f}=parseKeyValue(_0x4ad674));}catch(_0x304390){return _0x304390 instanceof Error&&console[_0x4be3a3(0x1e2)](a42_0x4cb0ba[_0x4be3a3(0x2eb)](_0x4be3a3(0x29a)),_0x304390[_0x4be3a3(0x163)]),0x1;}_0x38aafd[_0x4be3a3(0x2cc)]&&(console[_0x4be3a3(0x1e2)](_0x4be3a3(0x1e4)+_0x1d7c47),console[_0x4be3a3(0x1e2)](_0x4be3a3(0x199)+_0x342edf));const _0x144118=await withSpinner(_0x4be3a3(0x155),()=>_0x2371d8[_0x4be3a3(0x2b8)]['setSecret'](_0x1d7c47,_0x342edf,_0x52f58f),{'verbose':_0x38aafd['verbose']}),_0x36d24a=_0x144118[_0x4be3a3(0x1c3)];return console[_0x4be3a3(0x1e2)](_0x4be3a3(0x231)+_0x36d24a[_0x4be3a3(0x1d3)]+_0x4be3a3(0x255)+_0x36d24a[_0x4be3a3(0x19a)]+'\x27'),(_0x38aafd[_0x4be3a3(0x19c)]||_0x38aafd['jsonl'])&&await handleSingleObjectOutput(_0x36d24a,_0x38aafd),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x24f);[a42_0x271344(0x186)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a42_0x271344(0x1ef)](_0x5283eb){const _0x5cac0=a42_0x271344,{options:_0x5441a8,args:_0x440215,tdx:_0x489e50}=_0x5283eb;let _0x44fa92,_0x20bc81;if(_0x440215[_0x5cac0(0x152)]>=0x2)_0x44fa92=_0x440215[0x0],_0x20bc81=_0x440215[0x1];else{if(_0x440215['length']===0x1&&_0x5441a8[_0x5cac0(0x2e5)])_0x44fa92=_0x5441a8['workflowProject'],_0x20bc81=_0x440215[0x0];else return _0x440215[_0x5cac0(0x152)]===0x1?(console[_0x5cac0(0x1e2)]('Error:\x20Project\x20name\x20is\x20required'),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x5cac0(0x1e2)](_0x5cac0(0x2e7)),console[_0x5cac0(0x1e2)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x5441a8[_0x5cac0(0x2cc)]&&(console[_0x5cac0(0x1e2)](_0x5cac0(0x1e4)+_0x44fa92),console['error'](_0x5cac0(0x199)+_0x20bc81));if(!_0x5441a8['yes']){if(!isInteractive())return console[_0x5cac0(0x1e2)](a42_0x4cb0ba[_0x5cac0(0x2eb)]('\x0aError:'),_0x5cac0(0x1b4)),console['error'](a42_0x4cb0ba[_0x5cac0(0x1fb)](_0x5cac0(0x1cc))),0x1;const _0x19123a=await confirmKey(_0x5cac0(0x2ce)+_0x20bc81+_0x5cac0(0x18b)+_0x44fa92+'\x27?');if(!_0x19123a)return console[_0x5cac0(0x1e2)](a42_0x4cb0ba['yellow'](_0x5cac0(0x1e5))),0x1;}const _0xd63a90=await withSpinner('Deleting\x20secret...',()=>_0x489e50[_0x5cac0(0x2b8)][_0x5cac0(0x249)](_0x44fa92,_0x20bc81),{'verbose':_0x5441a8[_0x5cac0(0x2cc)]}),_0x5803f9=_0xd63a90[_0x5cac0(0x1c3)];return console['error'](_0x5cac0(0x231)+_0x5803f9[_0x5cac0(0x1d3)]+_0x5cac0(0x29c)+_0x5803f9[_0x5cac0(0x19a)]+'\x27'),(_0x5441a8['json']||_0x5441a8[_0x5cac0(0x173)])&&await handleSingleObjectOutput(_0x5803f9,_0x5441a8),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(_0x568a00){const _0x106ac2=a42_0x271344,_0x4e4c66=Math[_0x106ac2(0x1f4)](_0x568a00/0x3e8),_0x49538a=Math[_0x106ac2(0x1f4)](_0x4e4c66/0x3c),_0x416352=Math[_0x106ac2(0x1f4)](_0x49538a/0x3c),_0x1deeda=Math[_0x106ac2(0x1f4)](_0x416352/0x18);if(_0x1deeda>0x0){const _0x28d201=_0x416352%0x18;return _0x28d201>0x0?_0x1deeda+'d\x20'+_0x28d201+'h':_0x1deeda+'d';}else{if(_0x416352>0x0){const _0x171293=_0x49538a%0x3c;return _0x171293>0x0?_0x416352+'h\x20'+_0x171293+'m':_0x416352+'h';}else{if(_0x49538a>0x0){const _0x3e2da3=_0x4e4c66%0x3c;return _0x3e2da3>0x0?_0x49538a+'m\x20'+_0x3e2da3+'s':_0x49538a+'m';}else return _0x4e4c66+'s';}}}function formatTimestamp(_0x154e5b,_0x45bb2d){const _0x1098e2=a42_0x271344,_0x5c5f64=new Date(_0x154e5b),_0x19449e=String(_0x5c5f64[_0x1098e2(0x1ac)]())[_0x1098e2(0x280)](0x2,'0'),_0x20e0c4=String(_0x5c5f64[_0x1098e2(0x26f)]())[_0x1098e2(0x280)](0x2,'0'),_0x25d1c4=_0x19449e+':'+_0x20e0c4,_0x9d2d6f=_0x5c5f64['getFullYear']()===_0x45bb2d[_0x1098e2(0x2c6)]()&&_0x5c5f64[_0x1098e2(0x2b3)]()===_0x45bb2d['getMonth']()&&_0x5c5f64[_0x1098e2(0x250)]()===_0x45bb2d[_0x1098e2(0x250)]();if(_0x9d2d6f)return _0x25d1c4;else{const _0x27ec36=String(_0x5c5f64[_0x1098e2(0x2b3)]()+0x1)['padStart'](0x2,'0'),_0xa692c9=String(_0x5c5f64['getDate']())[_0x1098e2(0x280)](0x2,'0');return _0x27ec36+'-'+_0xa692c9+'\x20'+_0x25d1c4;}}function formatDate(_0xc8f7b8){const _0x5aec96=a42_0x271344,_0x16082e=_0xc8f7b8[_0x5aec96(0x2c6)](),_0x3446c6=String(_0xc8f7b8[_0x5aec96(0x2b3)]()+0x1)['padStart'](0x2,'0'),_0x39b8d6=String(_0xc8f7b8[_0x5aec96(0x250)]())[_0x5aec96(0x280)](0x2,'0');return _0x16082e+'-'+_0x3446c6+'-'+_0x39b8d6;}function a42_0x3418(_0x4fdf70,_0x21b29d){_0x4fdf70=_0x4fdf70-0x146;const _0x3fe26d=a42_0x3fe2();let _0x341892=_0x3fe26d[_0x4fdf70];return _0x341892;}function getTaskStateIcon(_0x198a5a){const _0x431766={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x431766[_0x198a5a]||'⚪';}function getBarChar(_0x405495){const _0x27f222=a42_0x271344;return _0x405495===_0x27f222(0x1e2)||_0x405495===_0x27f222(0x178)?'×':'─';}function getBarColor(_0x3ffd75){const _0x473136=a42_0x271344,_0x4491c9={'success':a42_0x4cb0ba['green'],'error':a42_0x4cb0ba[_0x473136(0x2eb)],'group_error':a42_0x4cb0ba[_0x473136(0x2eb)],'running':a42_0x4cb0ba[_0x473136(0x2d8)],'blocked':a42_0x4cb0ba[_0x473136(0x1c6)],'planned':a42_0x4cb0ba[_0x473136(0x1fb)],'canceling':a42_0x4cb0ba[_0x473136(0x1c6)]};return _0x4491c9[_0x3ffd75]||a42_0x4cb0ba[_0x473136(0x14f)];}function parseTaskName(_0x29bff2){const _0x5bccc1=a42_0x271344;let _0x1589a5=_0x29bff2[_0x5bccc1(0x27d)](/^\++/,'');const _0x4a7a80=_0x1589a5['split']('+'),_0xd02b32=_0x4a7a80['length']>0x1?_0x4a7a80[_0x5bccc1(0x152)]-0x2:0x0,_0x4ba51d=_0x4a7a80[_0x4a7a80[_0x5bccc1(0x152)]-0x1]||_0x1589a5;return{'level':_0xd02b32,'name':'+'+_0x4ba51d};}function truncateTaskName(_0x7e82ee,_0xea27b9){const _0x3a7f4a=a42_0x271344,_0x56d31f=stringWidth(_0x7e82ee);if(_0x56d31f<=_0xea27b9)return _0x7e82ee;let _0x4661b8=_0x7e82ee;while(stringWidth(_0x4661b8+'…')>_0xea27b9&&_0x4661b8['length']>0x0){_0x4661b8=_0x4661b8[_0x3a7f4a(0x213)](0x0,-0x1);}return _0x4661b8+'…';}function calculateTimeScale(_0x402ccb,_0x36d30b){const _0x5c7797=a42_0x271344;return{'startTime':_0x402ccb['start'],'endTime':_0x402ccb[_0x5c7797(0x2a6)],'durationMs':_0x402ccb['duration'],'msPerChar':_0x402ccb[_0x5c7797(0x1fd)]/_0x36d30b};}function timeToPosition(_0x442405,_0x470838,_0x807988){const _0x2afac3=a42_0x271344,_0x154b72=_0x442405-_0x470838[_0x2afac3(0x224)],_0x271a5a=Math['floor'](_0x154b72/_0x470838[_0x2afac3(0x168)]);return Math[_0x2afac3(0x1c0)](0x0,Math['min'](_0x271a5a,_0x807988));}function renderTimeAxis(_0x5ba9a0,_0xdc68ff){const _0x13c4ba=a42_0x271344,_0x5a2ab6=Math['min'](TIMELINE_CONFIG[_0x13c4ba(0x2e0)],Math[_0x13c4ba(0x1c0)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math['floor'](_0xdc68ff/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x29b72c=_0x5ba9a0[_0x13c4ba(0x2cb)]/(_0x5a2ab6-0x1),_0x296d19=new Date(_0x5ba9a0[_0x13c4ba(0x224)]),_0x1e480c=[];for(let _0x499e3e=0x0;_0x499e3e<_0x5a2ab6;_0x499e3e++){const _0x5b1357=_0x5ba9a0[_0x13c4ba(0x224)]+_0x499e3e*_0x29b72c,_0x5d807f=timeToPosition(_0x5b1357,_0x5ba9a0,_0xdc68ff),_0x209c30=formatTimestamp(_0x5b1357,_0x296d19);_0x1e480c[_0x13c4ba(0x1ad)]({'pos':_0x5d807f,'text':_0x209c30});}const _0x5ee2c6=new Array(_0xdc68ff)[_0x13c4ba(0x1dc)]('\x20');let _0x1d0262=-0x1;for(const {pos:_0x8e46f4,text:_0x5111c6}of _0x1e480c){let _0x497324=Math['max'](0x0,_0x8e46f4-Math['floor'](_0x5111c6['length']/0x2));_0x497324<=_0x1d0262+TIMELINE_CONFIG[_0x13c4ba(0x162)]&&(_0x497324=_0x1d0262+TIMELINE_CONFIG[_0x13c4ba(0x162)]+0x1);_0x497324+_0x5111c6[_0x13c4ba(0x152)]>_0xdc68ff&&(_0x497324=_0xdc68ff-_0x5111c6[_0x13c4ba(0x152)]);if(_0x497324>=0x0&&_0x497324+_0x5111c6[_0x13c4ba(0x152)]<=_0xdc68ff&&_0x497324>_0x1d0262){for(let _0x3e8c11=0x0;_0x3e8c11<_0x5111c6[_0x13c4ba(0x152)];_0x3e8c11++){_0x5ee2c6[_0x497324+_0x3e8c11]=_0x5111c6[_0x3e8c11];}_0x1d0262=_0x497324+_0x5111c6['length']-0x1;}}return _0x5ee2c6['join']('');}function renderTaskRow(_0x145626,_0x158a02,_0x555605,_0x2da091){const _0x4202e3=a42_0x271344,{level:_0x157d80,name:_0x2733f5}=parseTaskName(_0x145626[_0x4202e3(0x1bf)]),_0x1c2e65='\x20'[_0x4202e3(0x188)](_0x157d80),_0x7352fd=_0x145626[_0x4202e3(0x1b2)]?'('+formatElapsed(_0x145626['window'][_0x4202e3(0x1fd)])+')':'',_0x3292cb=stringWidth(_0x7352fd),_0x396055=_0x157d80*0x1,_0x119a07=_0x2da091-_0x396055-_0x3292cb-0x1,_0xe23f6e=truncateTaskName(_0x2733f5,_0x119a07),_0x249cbf=_0x1c2e65+_0xe23f6e,_0x4596c4=stringWidth(_0x249cbf),_0x1c6b0f=_0x2da091-_0x4596c4-_0x3292cb,_0x1096e0=_0x249cbf+'\x20'[_0x4202e3(0x188)](Math[_0x4202e3(0x1c0)](0x1,_0x1c6b0f))+a42_0x4cb0ba['dim'](_0x7352fd),_0x5dd97b=getTaskStateIcon(_0x145626[_0x4202e3(0x1b5)]),_0x328087=new Array(_0x555605)[_0x4202e3(0x1dc)]('\x20');if(_0x145626[_0x4202e3(0x1b2)]){const _0x59f9c7=timeToPosition(_0x145626[_0x4202e3(0x1b2)][_0x4202e3(0x1f6)],_0x158a02,_0x555605),_0xd812bd=timeToPosition(_0x145626[_0x4202e3(0x1b2)]['end'],_0x158a02,_0x555605),_0x332263=getBarChar(_0x145626[_0x4202e3(0x1b5)]),_0x5a1a7a=Math[_0x4202e3(0x1c0)](_0x59f9c7+0x1,_0xd812bd);for(let _0x5a03d2=_0x59f9c7;_0x5a03d2<Math[_0x4202e3(0x25c)](_0x5a1a7a,_0x555605);_0x5a03d2++){_0x328087[_0x5a03d2]=_0x332263;}}const _0x190c07=getBarColor(_0x145626['state']),_0x5c6c45=_0x328087['map'](_0x3ed8a8=>_0x3ed8a8==='\x20'?'\x20':_0x190c07(_0x3ed8a8))[_0x4202e3(0x247)]('');return _0x5dd97b+'\x20'+_0x1096e0+'│'+_0x5c6c45+'│';}function calculateStats(_0x375adc){const _0xe9b230=a42_0x271344,_0x1375b2={'total':_0x375adc[_0xe9b230(0x152)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x547fc6 of _0x375adc){if(_0x547fc6[_0xe9b230(0x1b5)]===_0xe9b230(0x223))_0x1375b2['success']++;else{if(_0x547fc6['state']===_0xe9b230(0x1e2)||_0x547fc6['state']==='group_error')_0x1375b2[_0xe9b230(0x1e2)]++;else _0x547fc6[_0xe9b230(0x1b5)]==='running'?_0x1375b2['running']++:_0x1375b2[_0xe9b230(0x2ea)]++;}}return _0x1375b2;}function formatStats(_0x355c5c){const _0x5a3ebc=a42_0x271344;return[_0x5a3ebc(0x1d7)+_0x355c5c['total'],'✅\x20'+_0x355c5c[_0x5a3ebc(0x223)],'❌\x20'+_0x355c5c[_0x5a3ebc(0x1e2)],_0x5a3ebc(0x19b)+_0x355c5c[_0x5a3ebc(0x230)],'⏳\x20'+_0x355c5c[_0x5a3ebc(0x2ea)]][_0x5a3ebc(0x247)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x271344(0x1bf)]=a42_0x271344(0x2de);[a42_0x271344(0x186)]=a42_0x271344(0x20d);async[a42_0x271344(0x1ef)](_0xab71c4){const _0x26c175=a42_0x271344,{options:_0x39cb46,args:_0x1dce9b,tdx:_0x4283d9}=_0xab71c4;let _0x7349ca,_0x3aeab0,_0x32132a=![];if(_0x1dce9b[0x0]){if(_0x1dce9b[0x0][_0x26c175(0x181)]('.')){const _0x1d08e2=this[_0x26c175(0x15b)](_0x1dce9b,_0x39cb46);if(!_0x1d08e2)return 0x1;_0x7349ca=_0x1d08e2[_0x26c175(0x19a)],_0x3aeab0=_0x1d08e2['workflowName'];}else{_0x3aeab0=_0x1dce9b[0x0],_0x7349ca=_0x39cb46[_0x26c175(0x2e5)];if(!_0x7349ca)return console['error'](a42_0x4cb0ba[_0x26c175(0x2eb)](_0x26c175(0x29a)),_0x26c175(0x1b6)),0x1;_0x32132a=!![];}}else{const _0x2fd424=this[_0x26c175(0x15b)](_0x1dce9b,_0x39cb46);if(!_0x2fd424)return 0x1;_0x7349ca=_0x2fd424[_0x26c175(0x19a)],_0x3aeab0=_0x2fd424['workflowName'];}if(_0x39cb46[_0x26c175(0x2cc)]){if(_0x7349ca&&_0x3aeab0)console[_0x26c175(0x1e2)](_0x26c175(0x25e)+_0x7349ca+'.'+_0x3aeab0);else _0x7349ca&&console[_0x26c175(0x1e2)](_0x26c175(0x207)+_0x7349ca);}const _0x4df698=_0x39cb46[_0x26c175(0x16d)],_0x6e1c1=_0x39cb46['sessionId'];if(_0x4df698){_0x6e1c1&&console['error'](a42_0x4cb0ba['yellow'](_0x26c175(0x2c4)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x24a662=_0x39cb46[_0x26c175(0x193)];return _0x24a662?await this[_0x26c175(0x176)](_0xab71c4,_0x4df698):await this[_0x26c175(0x2c1)](_0xab71c4,_0x4df698,_0x39cb46),0x0;}if(_0x6e1c1){const _0x22bb17=await withSpinner(_0x26c175(0x291),()=>_0x4283d9[_0x26c175(0x2b8)][_0x26c175(0x15c)]({'projectName':_0x7349ca,'workflowName':_0x3aeab0,'limit':0x64}),{'verbose':_0x39cb46[_0x26c175(0x2cc)]}),_0x3585f3=_0x22bb17[_0x26c175(0x1c3)][_0x26c175(0x2b4)](_0x496e88=>_0x496e88['id']===_0x6e1c1);if(!_0x3585f3)return console[_0x26c175(0x1e2)](a42_0x4cb0ba[_0x26c175(0x2eb)](_0x26c175(0x29a)),_0x26c175(0x20a)+_0x6e1c1),0x1;if(!_0x3585f3['lastAttempt']?.['id'])return console[_0x26c175(0x1e2)](a42_0x4cb0ba[_0x26c175(0x2eb)](_0x26c175(0x29a)),_0x26c175(0x279)+_0x6e1c1+_0x26c175(0x1c9)),0x1;const _0x5c9d7c=_0x3585f3['lastAttempt']['id'];_0x39cb46[_0x26c175(0x2cc)]&&console[_0x26c175(0x1e2)](_0x26c175(0x18f)+_0x5c9d7c+_0x26c175(0x1db)+_0x6e1c1);const _0xe3cc65=_0x39cb46['follow'];return _0xe3cc65?await this[_0x26c175(0x176)](_0xab71c4,_0x5c9d7c):await this[_0x26c175(0x2c1)](_0xab71c4,_0x5c9d7c,_0x39cb46),0x0;}const _0x1441fc=await withSpinner(_0x26c175(0x2d0),()=>_0x4283d9[_0x26c175(0x2b8)][_0x26c175(0x15c)]({'projectName':_0x7349ca,'workflowName':_0x3aeab0,'limit':_0x39cb46[_0x26c175(0x22c)]||0x32}),{'verbose':_0x39cb46[_0x26c175(0x2cc)]}),_0x14f029=_0x1441fc['data'];if(_0x14f029[_0x26c175(0x152)]===0x0){if(_0x7349ca&&_0x3aeab0)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x7349ca+'.'+_0x3aeab0);else _0x7349ca?console[_0x26c175(0x1e2)](_0x26c175(0x200)+_0x7349ca):(console[_0x26c175(0x1e2)](_0x26c175(0x27e)),console[_0x26c175(0x1e2)](a42_0x4cb0ba[_0x26c175(0x1fb)](_0x26c175(0x1d0))));return 0x0;}_0x14f029[_0x26c175(0x1cd)]((_0x39662b,_0x95215d)=>{const _0x75327d=_0x26c175,_0x2aeb6d=_0x39662b[_0x75327d(0x2d7)]||'',_0x4d1538=_0x95215d[_0x75327d(0x2d7)]||'';return _0x4d1538[_0x75327d(0x235)](_0x2aeb6d);});if(_0x39cb46['json']||_0x39cb46[_0x26c175(0x173)])return await handleSDKOutput(_0x14f029,_0x39cb46),0x0;let _0x5d89a8;if(_0x32132a){const _0x1d0ce5=_0x14f029[0x0];if(!_0x1d0ce5[_0x26c175(0x18c)]?.['id'])return console[_0x26c175(0x1e2)](_0x26c175(0x25d)),0x0;_0x5d89a8=_0x1d0ce5[_0x26c175(0x18c)]['id'],_0x39cb46['verbose']&&console[_0x26c175(0x1e2)](_0x26c175(0x274)+_0x1d0ce5[_0x26c175(0x2d7)]);}else{const _0x4fb7f3=_0x14f029[_0x26c175(0x174)](_0x6f0ec2=>{const _0x1ae3f8=_0x26c175,_0xff8264=getAttemptStatusDisplay(_0x6f0ec2[_0x1ae3f8(0x18c)]);return{'title':_0x6f0ec2[_0x1ae3f8(0x24b)]?.['name']+'.'+_0x6f0ec2[_0x1ae3f8(0x2b8)]?.[_0x1ae3f8(0x1bf)]+_0x1ae3f8(0x1a1)+_0x6f0ec2[_0x1ae3f8(0x2d7)]+'\x20'+_0xff8264['icon'],'value':_0x6f0ec2[_0x1ae3f8(0x18c)]?.['id']||'','description':_0xff8264[_0x1ae3f8(0x167)]};}),_0x50eb47=await a42_0x5e9a1d({'type':'select','name':'attemptId','message':_0x26c175(0x23f),'choices':_0x4fb7f3[_0x26c175(0x288)](_0x5db82b=>_0x5db82b[_0x26c175(0x1f8)]!=='')});if(!_0x50eb47['attemptId'])return 0x0;_0x5d89a8=_0x50eb47[_0x26c175(0x16d)];}const _0x2b827b=_0x39cb46[_0x26c175(0x193)];return _0x2b827b?await this[_0x26c175(0x176)](_0xab71c4,_0x5d89a8):await this['renderSingleTimeline'](_0xab71c4,_0x5d89a8,_0x39cb46),0x0;}async[a42_0x271344(0x2c1)](_0x1fbb0f,_0x269c98,_0x432b14){const _0x551bf8=a42_0x271344,{tdx:_0x3a3fdc}=_0x1fbb0f;let _0x19af5d,_0x17b07f;try{[_0x19af5d,_0x17b07f]=await Promise['all']([_0x3a3fdc['workflow']['attempt'](_0x269c98),_0x3a3fdc[_0x551bf8(0x2b8)][_0x551bf8(0x258)](_0x269c98,![])]);}catch(_0x58027e){console[_0x551bf8(0x1e2)](a42_0x4cb0ba[_0x551bf8(0x2eb)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x432b14[_0x551bf8(0x2cc)]&&console[_0x551bf8(0x1e2)](_0x58027e);throw _0x58027e;}if(_0x432b14[_0x551bf8(0x19c)]||_0x432b14[_0x551bf8(0x173)]){const _0x4ece42=this['buildTimelineData'](_0x19af5d,_0x17b07f);await handleSDKOutput([_0x4ece42],_0x432b14);return;}const _0x149811=_0x3a3fdc['context'][_0x551bf8(0x21f)],_0x42a925=this[_0x551bf8(0x216)](_0x19af5d,_0x17b07f,_0x149811);console['log'](_0x42a925);}async[a42_0x271344(0x176)](_0x1e96a6,_0x50da42){const _0x3fe8d4=a42_0x271344,{tdx:_0x128f40}=_0x1e96a6,_0x32e4a4=TIMELINE_CONFIG[_0x3fe8d4(0x27b)],_0x3c66c6=TIMELINE_CONFIG[_0x3fe8d4(0x2b9)];let _0x1a2422=0x0;while(_0x1a2422<_0x3c66c6){process[_0x3fe8d4(0x206)][_0x3fe8d4(0x1da)]&&process[_0x3fe8d4(0x206)]['write']('\x1bc');let _0xe92117,_0x58141f;try{[_0xe92117,_0x58141f]=await Promise[_0x3fe8d4(0x1bd)]([_0x128f40['workflow'][_0x3fe8d4(0x1e6)](_0x50da42),_0x128f40[_0x3fe8d4(0x2b8)]['tasks'](_0x50da42,![])]);}catch(_0x255891){console['error'](a42_0x4cb0ba['red'](_0x3fe8d4(0x2a3)));_0x1a2422>0x0&&console[_0x3fe8d4(0x1e2)](a42_0x4cb0ba[_0x3fe8d4(0x1fb)](_0x3fe8d4(0x26e)+_0x1a2422));throw _0x255891;}const _0x9251c7=_0x128f40['context']['site'],_0x5de985=this[_0x3fe8d4(0x216)](_0xe92117,_0x58141f,_0x9251c7);console[_0x3fe8d4(0x295)](_0x5de985);const _0x5579b9=_0xe92117['done']&&_0x58141f[_0x3fe8d4(0x17d)](_0x408cf9=>_0x408cf9[_0x3fe8d4(0x1b5)]!==_0x3fe8d4(0x230)&&_0x408cf9[_0x3fe8d4(0x1b5)]!==_0x3fe8d4(0x244));if(_0x5579b9){console[_0x3fe8d4(0x1e2)](a42_0x4cb0ba[_0x3fe8d4(0x1ff)](_0x3fe8d4(0x1d5)));break;}console['error'](a42_0x4cb0ba[_0x3fe8d4(0x1fb)](_0x3fe8d4(0x2bb)+_0x1a2422*0x2+_0x3fe8d4(0x276))),await new Promise(_0x2fa3e5=>setTimeout(_0x2fa3e5,_0x32e4a4)),_0x1a2422++;}_0x1a2422>=_0x3c66c6&&console[_0x3fe8d4(0x1e2)](a42_0x4cb0ba['yellow']('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0x271344(0x216)](_0x1625aa,_0x3dd7b0,_0x536253){const _0x26ddae=a42_0x271344,_0x4f391d=[],_0x11e24f=TIMELINE_CONFIG[_0x26ddae(0x215)],_0x2acfe5=0x5,_0xdf88cd=process[_0x26ddae(0x206)]['columns']||0x78,_0x210a54=_0xdf88cd-_0x11e24f-_0x2acfe5,_0x514931=Math[_0x26ddae(0x1c0)](TIMELINE_CONFIG[_0x26ddae(0x2bc)],Math[_0x26ddae(0x25c)](_0x210a54,TIMELINE_CONFIG[_0x26ddae(0x14e)])),_0x44b8ed=new Date(_0x1625aa['createdAt'])[_0x26ddae(0x2c3)](),_0x2c9b71=_0x1625aa[_0x26ddae(0x2e4)]?new Date(_0x1625aa[_0x26ddae(0x2e4)])[_0x26ddae(0x2c3)]():Date[_0x26ddae(0x25f)](),_0x4d056c={'start':_0x44b8ed,'end':_0x2c9b71,'duration':_0x2c9b71-_0x44b8ed},_0x277e5f=new Map(),_0x4fc59c=[];for(const _0x177790 of _0x3dd7b0){if(_0x177790[_0x26ddae(0x1ba)]){const _0x3991ec=new Date(_0x177790[_0x26ddae(0x1ba)])[_0x26ddae(0x2c3)](),_0x1fef7d=_0x177790[_0x26ddae(0x17f)]?new Date(_0x177790['updatedAt'])[_0x26ddae(0x2c3)]():Date[_0x26ddae(0x25f)](),_0xfd18a3={'start':_0x3991ec,'end':_0x1fef7d,'duration':_0x1fef7d-_0x3991ec};_0x277e5f[_0x26ddae(0x154)](_0x177790['id'],_0xfd18a3),_0x4fc59c[_0x26ddae(0x1ad)]({'name':_0x177790[_0x26ddae(0x246)],'state':_0x177790[_0x26ddae(0x1b5)]||_0x26ddae(0x293),'window':_0xfd18a3});}else _0x4fc59c['push']({'name':_0x177790[_0x26ddae(0x246)],'state':_0x177790[_0x26ddae(0x1b5)]||'planned','window':undefined});}_0x4fc59c[_0x26ddae(0x1cd)]((_0x16099c,_0x5741e1)=>{const _0xcf0bbe=_0x26ddae;if(!_0x16099c[_0xcf0bbe(0x1b2)])return 0x1;if(!_0x5741e1[_0xcf0bbe(0x1b2)])return-0x1;return _0x16099c['window'][_0xcf0bbe(0x1f6)]-_0x5741e1[_0xcf0bbe(0x1b2)][_0xcf0bbe(0x1f6)];});const _0x4ba989=_0x4fc59c['length'],_0x36bc3a=_0x4ba989>TIMELINE_CONFIG[_0x26ddae(0x2f0)];_0x36bc3a&&_0x4fc59c[_0x26ddae(0x21b)](TIMELINE_CONFIG[_0x26ddae(0x2f0)]);const _0x346f4f=calculateTimeScale(_0x4d056c,_0x514931),_0x405f13=_0x1625aa[_0x26ddae(0x240)]?_0x1625aa[_0x26ddae(0x223)]?a42_0x4cb0ba['green'](_0x26ddae(0x223)):a42_0x4cb0ba[_0x26ddae(0x2eb)](_0x26ddae(0x1e2)):a42_0x4cb0ba['blue'](_0x26ddae(0x230)),_0x2169ad=_0x1625aa[_0x26ddae(0x24b)]?.['id'],_0x445f61=_0x1625aa[_0x26ddae(0x20b)];let _0x3ec36b;if(_0x2169ad&&_0x445f61){const _0x346fe8=getWorkflowAttemptUrl(_0x536253,_0x2169ad,_0x445f61,_0x1625aa['id']);_0x3ec36b=hyperlink(a42_0x4cb0ba[_0x26ddae(0x1fb)](_0x1625aa['id']),_0x346fe8);}else _0x3ec36b=a42_0x4cb0ba['dim'](_0x1625aa['id']);_0x4f391d['push'](_0x26ddae(0x267)+_0x3ec36b+_0x26ddae(0x1a1)+_0x405f13+_0x26ddae(0x1a1)+formatElapsed(_0x4d056c[_0x26ddae(0x1fd)]));if(_0x4fc59c['length']>0x0){const _0x4b1e3c=renderTimeAxis(_0x346f4f,_0x514931),_0x565b48=new Date(_0x4d056c[_0x26ddae(0x1f6)]),_0x13c6e9=formatDate(_0x565b48),_0x1c51e3=TIMELINE_CONFIG[_0x26ddae(0x2ad)]+TIMELINE_CONFIG[_0x26ddae(0x185)]+_0x11e24f,_0x353b5f=_0x13c6e9['padStart'](_0x1c51e3),_0x100a44=a42_0x4cb0ba['dim'](_0x353b5f);_0x4f391d[_0x26ddae(0x1ad)](_0x100a44+'\x20'+_0x4b1e3c);for(const _0x1169bc of _0x4fc59c){_0x4f391d[_0x26ddae(0x1ad)](renderTaskRow(_0x1169bc,_0x346f4f,_0x514931,_0x11e24f));}const _0x3909e9=calculateStats(_0x4fc59c);_0x4f391d[_0x26ddae(0x1ad)](formatStats(_0x3909e9)),_0x36bc3a&&_0x4f391d['push'](a42_0x4cb0ba[_0x26ddae(0x1c6)](_0x26ddae(0x290)+TIMELINE_CONFIG[_0x26ddae(0x2f0)]+'\x20of\x20'+_0x4ba989+_0x26ddae(0x277))),_0x4f391d['push'](''),_0x4f391d[_0x26ddae(0x1ad)](a42_0x4cb0ba[_0x26ddae(0x1fb)](_0x26ddae(0x1d1))+(_0x26ddae(0x18d)+_0x1625aa['id']+'\x20logs')+a42_0x4cb0ba[_0x26ddae(0x1fb)](_0x26ddae(0x2b2)));}else _0x4f391d['push'](_0x26ddae(0x1be));return _0x4f391d[_0x26ddae(0x247)]('\x0a');}[a42_0x271344(0x228)](_0x55d453,_0x5efcbc){const _0x23bfb4=a42_0x271344,_0x6fce9=new Date(_0x55d453[_0x23bfb4(0x2a2)])[_0x23bfb4(0x2c3)](),_0x1b9e45=_0x55d453[_0x23bfb4(0x2e4)]?new Date(_0x55d453['finishedAt'])[_0x23bfb4(0x2c3)]():Date[_0x23bfb4(0x25f)](),_0x52d149=_0x1b9e45-_0x6fce9,_0x35858e=[];for(const _0x329d82 of _0x5efcbc){if(_0x329d82[_0x23bfb4(0x1ba)]){const _0x278e56=new Date(_0x329d82[_0x23bfb4(0x1ba)])[_0x23bfb4(0x2c3)](),_0x21dfae=_0x329d82[_0x23bfb4(0x17f)]?new Date(_0x329d82[_0x23bfb4(0x17f)])[_0x23bfb4(0x2c3)]():Date['now']();_0x35858e[_0x23bfb4(0x1ad)]({'name':_0x329d82[_0x23bfb4(0x246)],'state':_0x329d82['state']||_0x23bfb4(0x293),'window':{'start':_0x278e56,'end':_0x21dfae,'duration':_0x21dfae-_0x278e56}});}else _0x35858e[_0x23bfb4(0x1ad)]({'name':_0x329d82['fullName'],'state':_0x329d82[_0x23bfb4(0x1b5)]||_0x23bfb4(0x244),'window':undefined});}const _0x1d7a82=calculateStats(_0x35858e);return{'attempt':{'id':_0x55d453['id'],'status':_0x55d453['done']?_0x55d453['success']?_0x23bfb4(0x223):_0x23bfb4(0x1e2):'running','createdAt':_0x55d453[_0x23bfb4(0x2a2)],'finishedAt':_0x55d453['finishedAt'],'duration_ms':_0x52d149},'tasks':_0x35858e[_0x23bfb4(0x174)](_0x58b256=>({'name':_0x58b256[_0x23bfb4(0x1bf)],'state':_0x58b256['state'],'startedAt':_0x58b256[_0x23bfb4(0x1b2)]?new Date(_0x58b256[_0x23bfb4(0x1b2)][_0x23bfb4(0x1f6)])[_0x23bfb4(0x26b)]():null,'updatedAt':_0x58b256[_0x23bfb4(0x1b2)]?new Date(_0x58b256['window']['end'])[_0x23bfb4(0x26b)]():null,'duration_ms':_0x58b256['window']?.[_0x23bfb4(0x1fd)]||null})),'stats':_0x1d7a82};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d10e3,_0x4f13ad){const _0x2bf3de=a43_0x5123,_0x459f8e=_0x1d10e3();while(!![]){try{const _0x5e923f=parseInt(_0x2bf3de(0x16c))/0x1*(parseInt(_0x2bf3de(0x174))/0x2)+parseInt(_0x2bf3de(0x171))/0x3+-parseInt(_0x2bf3de(0x16e))/0x4+parseInt(_0x2bf3de(0x176))/0x5*(-parseInt(_0x2bf3de(0x16b))/0x6)+-parseInt(_0x2bf3de(0x172))/0x7+parseInt(_0x2bf3de(0x169))/0x8+parseInt(_0x2bf3de(0x168))/0x9;if(_0x5e923f===_0x4f13ad)break;else _0x459f8e['push'](_0x459f8e['shift']());}catch(_0xb583ab){_0x459f8e['push'](_0x459f8e['shift']());}}}(a43_0x3407,0xaebeb));import{platform}from'os';function a43_0x3407(){const _0xb99ea=['544132ZuWUwT','Authorization','110445XATCUD','length','tdx/','5091660kCtllD','9178264cpWUOm','replace','288uGoBbR','3cpkjCd','tdx','4006688UEOkex','entries','version','4084344zskZXZ','7790790ftWjEj','X-Trino-User'];a43_0x3407=function(){return _0xb99ea;};return a43_0x3407();}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x2c64f9=a43_0x5123,_0x3f19a0=getVersion(),_0x28fa8b=platform(),_0x87ec6c=process[_0x2c64f9(0x170)][_0x2c64f9(0x16a)]('v','');return _0x2c64f9(0x167)+_0x3f19a0+'\x20('+_0x28fa8b+';\x20node/'+_0x87ec6c+')';}export function getAuthHeaders(_0x3c6434,_0x39eb81){const _0xc7d6cd=a43_0x5123,_0xf8f57d=getVersion(),_0x54864d={'User-Agent':getUserAgent(),'X-TD-Client':_0xc7d6cd(0x16d),'X-TD-Client-Version':_0xf8f57d};return _0x39eb81&&(_0x54864d[_0xc7d6cd(0x175)]='TD1\x20'+_0x39eb81),_0x54864d;}function a43_0x5123(_0x259010,_0x550501){_0x259010=_0x259010-0x166;const _0x34075c=a43_0x3407();let _0x51239e=_0x34075c[_0x259010];return _0x51239e;}export function toHeaderRecord(_0x20b760){const _0x244105=a43_0x5123,_0x3a3dfb={};for(const [_0x800d0f,_0x329097]of Object[_0x244105(0x16f)](_0x20b760)){_0x329097!==undefined&&(_0x3a3dfb[_0x800d0f]=_0x329097);}return _0x3a3dfb;}export function getTrinoHeaders(_0x5187f6,_0x37a7dc){const _0x4654c4=a43_0x5123,_0x26cbd8=getAuthHeaders(_0x5187f6,_0x37a7dc),_0x58317c=toHeaderRecord(_0x26cbd8);return delete _0x58317c[_0x4654c4(0x175)],_0x37a7dc&&(_0x58317c[_0x4654c4(0x173)]=_0x37a7dc),_0x58317c;}export function hasAPIKey(_0x37def6){const _0x3bc239=a43_0x5123,_0x5bf94d=getAPIKey();return _0x5bf94d!==undefined&&_0x5bf94d[_0x3bc239(0x166)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x64c41,_0x37e616){const _0x587f00=a44_0x3927,_0x20bf11=_0x64c41();while(!![]){try{const _0x98469c=parseInt(_0x587f00(0x144))/0x1*(parseInt(_0x587f00(0x119))/0x2)+parseInt(_0x587f00(0x118))/0x3*(-parseInt(_0x587f00(0x130))/0x4)+parseInt(_0x587f00(0x142))/0x5*(-parseInt(_0x587f00(0x138))/0x6)+-parseInt(_0x587f00(0x10b))/0x7*(-parseInt(_0x587f00(0x121))/0x8)+parseInt(_0x587f00(0x13c))/0x9*(parseInt(_0x587f00(0x12a))/0xa)+-parseInt(_0x587f00(0x11a))/0xb+parseInt(_0x587f00(0x148))/0xc;if(_0x98469c===_0x37e616)break;else _0x20bf11['push'](_0x20bf11['shift']());}catch(_0x50d9be){_0x20bf11['push'](_0x20bf11['shift']());}}}(a44_0x54ab,0x6c82e));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a44_0x3927(_0x5cbb5f,_0x89af4f){_0x5cbb5f=_0x5cbb5f-0x101;const _0x54abb5=a44_0x54ab();let _0x392740=_0x54abb5[_0x5cbb5f];return _0x392740;}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x118b13 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x17c5b3){const _0x1753b9=a44_0x3927;return _0x17c5b3['format']==='json'||_0x17c5b3['format']===_0x1753b9(0x109)||_0x17c5b3['format']===_0x1753b9(0x125)||_0x17c5b3[_0x1753b9(0x141)]===_0x1753b9(0x103)||_0x17c5b3[_0x1753b9(0x12c)]===!![]||_0x17c5b3[_0x1753b9(0x109)]===!![]||_0x17c5b3[_0x1753b9(0x125)]===!![]||_0x17c5b3['table']===!![];}export function parseOutputOptions(_0x1f0a0d){const _0xc8c604=a44_0x3927;return{'format':_0x1f0a0d['format']||_0xc8c604(0x103),'output':_0x1f0a0d['output']||'','limit':_0x1f0a0d[_0xc8c604(0x120)],'color':_0x1f0a0d[_0xc8c604(0x13a)],'noColor':_0x1f0a0d['noColor']};}function convertSDKResultToQueryResult(_0x54a2d4){const _0x233c21=a44_0x3927,_0x1908d6=[];if(_0x54a2d4['length']>0x0){const _0x1818bf=_0x54a2d4[0x0];for(const [_0x3593eb,_0x48a7f8]of Object[_0x233c21(0x116)](_0x1818bf)){let _0x226e90=_0x233c21(0x14b);if(typeof _0x48a7f8===_0x233c21(0x129))_0x226e90=Number[_0x233c21(0x145)](_0x48a7f8)?_0x233c21(0x11e):'double';else{if(typeof _0x48a7f8===_0x233c21(0x115))_0x226e90='boolean';else _0x48a7f8===null&&(_0x226e90=_0x233c21(0x14b));}_0x1908d6[_0x233c21(0x13e)]({'name':_0x3593eb,'type':_0x226e90});}}return{'queryId':_0x233c21(0x111),'columns':_0x1908d6,'data':_0x54a2d4,'stats':{'state':_0x233c21(0x12b),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x54a2d4['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x566d3b,_0x312ac9){const _0x9640c4=convertSDKResultToQueryResult(_0x566d3b);return formatQueryOutput(_0x9640c4,_0x312ac9);}function a44_0x54ab(){const _0x2eb911=['jsonl','stringify','3681293UnZIMq','max','─┴─','isTTY','magenta','log','sdk-result','join','[error]','bold','boolean','entries','spawn','1647oDGbHl','525130xSARRU','7466283mkNbwx','padEnd','debug','output','bigint','resolve','limit','8BdFJdv','[Object]','[params]','stderr','tsv','map','[rule]','end','number','63790ScrMlj','FINISHED','json','-FXRSn','error','pipe','2820aOXtCA','query','blue','[query]','filter','keys','forEach','close','6pYcdmF','less','color','stdin','801mxECVs','cmdout','push','inherit','No\x20data','format','2072530mroASf','─┬─','1wmejyF','isInteger','object','list','6822852nhTXSl','repeat','length','varchar','trim','split','yellow','table','rule','[logs]','params','write','string'];a44_0x54ab=function(){return _0x2eb911;};return a44_0x54ab();}export async function formatQueryOutput(_0xffca5b,_0x25b539){const _0x1e547d=a44_0x3927,{format:_0x545d76,limit:_0x18dd0b,output:_0x562c0a,color:_0x51e221,noColor:_0x24117f}=_0x25b539,_0x2abb70=Boolean(_0x562c0a)&&!_0x51e221,_0x328311={'color':_0x51e221,'noColor':_0x24117f||_0x2abb70};if(_0x545d76===_0x1e547d(0x103)){const _0x542f29=shouldUseLess(_0x545d76,_0x562c0a);return formatAsTable(_0xffca5b,_0x18dd0b,_0x542f29,_0x328311);}else{if(_0x545d76===_0x1e547d(0x12c))return formatAsJSON(_0xffca5b,_0x328311);else return _0x545d76===_0x1e547d(0x109)?formatAsJSONL(_0xffca5b,_0x328311):formatQueryResult(_0xffca5b,_0x545d76);}}function shouldUseLess(_0x204bd1,_0x465f90){const _0x36b689=a44_0x3927;return(_0x204bd1===_0x36b689(0x103)||_0x204bd1===_0x36b689(0x147))&&process['stdout'][_0x36b689(0x10e)]&&!_0x465f90;}export function resolveOutputOptions(_0x25d225){const _0x1ca872=a44_0x3927,_0x12a834=resolveOutputFormat(_0x25d225[_0x1ca872(0x141)],_0x25d225[_0x1ca872(0x11d)],_0x1ca872(0x103));let _0x252cbc=typeof _0x25d225[_0x1ca872(0x120)]===_0x1ca872(0x129)?_0x25d225[_0x1ca872(0x120)]:parseInt(_0x25d225['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x4994f9=_0x25d225['output']||'';return shouldUseLess(_0x12a834,_0x4994f9)&&(_0x252cbc=Infinity),{'format':_0x12a834,'output':_0x4994f9,'limit':_0x252cbc,'color':_0x25d225[_0x1ca872(0x13a)],'noColor':_0x25d225['noColor']};}export function writeOutput(_0x537823,_0x246177,_0x61d7cd){const _0x54552f=a44_0x3927;return _0x246177?(writeFileSync(_0x246177,_0x537823),console[_0x54552f(0x12e)]('Results\x20saved\x20to\x20'+_0x246177),Promise[_0x54552f(0x11f)]()):shouldUseLess(_0x61d7cd||'','')?new Promise(_0x1e24d5=>{const _0x32510b=_0x54552f,_0x1fcdbe=spawn(_0x32510b(0x139),[_0x32510b(0x12d)],{'stdio':[_0x32510b(0x12f),_0x32510b(0x13f),'inherit']});let _0x176257=![];_0x1fcdbe['on'](_0x32510b(0x12e),()=>{const _0x2666b8=_0x32510b;!_0x176257&&(_0x176257=!![],console[_0x2666b8(0x110)](_0x537823),_0x1e24d5());}),_0x1fcdbe['on'](_0x32510b(0x137),()=>{!_0x176257&&(_0x176257=!![],_0x1e24d5());}),_0x1fcdbe['on'](_0x32510b(0x117),()=>{const _0xff8901=_0x32510b;!_0x176257&&_0x1fcdbe['stdin']&&(_0x1fcdbe['stdin']['on']('error',()=>{}),_0x1fcdbe['stdin'][_0xff8901(0x107)](_0x537823),_0x1fcdbe[_0xff8901(0x13b)][_0xff8901(0x128)]());}),!_0x1fcdbe[_0x32510b(0x13b)]&&(!_0x176257&&(_0x176257=!![],console[_0x32510b(0x110)](_0x537823),_0x1e24d5()));}):(console[_0x54552f(0x110)](_0x537823),Promise[_0x54552f(0x11f)]());}export async function handleSDKOutput(_0x3733c1,_0x381abd){const _0x3c0b22=a44_0x3927,_0xb9af92=resolveOutputOptions(_0x381abd),_0x46b14a=await formatSDKOutput(_0x3733c1,_0xb9af92);await writeOutput(_0x46b14a,_0xb9af92[_0x3c0b22(0x11d)]||undefined,_0xb9af92[_0x3c0b22(0x141)]);}export async function handleQueryOutput(_0x9bd945,_0x3f4099){const _0x4187fb=a44_0x3927,_0xddfef2=resolveOutputOptions(_0x3f4099),_0x5d009f=await formatQueryOutput(_0x9bd945,_0xddfef2);await writeOutput(_0x5d009f,_0xddfef2[_0x4187fb(0x11d)]||undefined,_0xddfef2[_0x4187fb(0x141)]);}async function formatSingleObject(_0x4fad2b,_0x343cd1){const _0x4ec792=a44_0x3927,{format:_0x45cd05,color:_0x2a513b,noColor:_0x995ab}=_0x343cd1,_0x41efd1={'color':_0x2a513b,'noColor':_0x995ab};if(_0x45cd05===_0x4ec792(0x12c)){if(shouldUseColor(_0x41efd1))return colorizeJSON(_0x4fad2b,_0x41efd1);return JSON[_0x4ec792(0x10a)](_0x4fad2b,null,0x2);}else{if(_0x45cd05===_0x4ec792(0x109)){if(shouldUseColor(_0x41efd1))return colorizeJSONCompact(_0x4fad2b,_0x41efd1);return JSON['stringify'](_0x4fad2b);}else{if(_0x45cd05==='tsv')return Object[_0x4ec792(0x116)](_0x4fad2b)[_0x4ec792(0x126)](([_0x521234,_0x387a1c])=>_0x521234+'\x09'+_0x387a1c)[_0x4ec792(0x112)]('\x0a');else{const _0x434911=Object['entries'](_0x4fad2b);if(_0x434911[_0x4ec792(0x14a)]===0x0)return _0x4ec792(0x140);const _0x3270fc=_0x4fad2b[_0x4ec792(0x11c)],_0x580483=_0x4fad2b[_0x4ec792(0x131)],_0x4ee9fe=_0x4fad2b[_0x4ec792(0x106)],_0xddb999=_0x4fad2b['rule'],_0x5f0feb=_0x580483?typeof _0x580483===_0x4ec792(0x108)?_0x580483:JSON[_0x4ec792(0x10a)](_0x580483,null,0x2):undefined,_0x25238b=_0x4ee9fe&&Object[_0x4ec792(0x135)](_0x4ee9fe)[_0x4ec792(0x14a)]>0x0?JSON[_0x4ec792(0x10a)](_0x4ee9fe,null,0x2):undefined,_0x18f77a=_0xddb999&&Object[_0x4ec792(0x135)](_0xddb999)[_0x4ec792(0x14a)]>0x0?JSON[_0x4ec792(0x10a)](_0xddb999,null,0x2):undefined,_0x2ce0fd=_0x434911[_0x4ec792(0x134)](([_0x2e7997])=>_0x2e7997!==_0x4ec792(0x11c)&&_0x2e7997!==_0x4ec792(0x131)&&_0x2e7997!==_0x4ec792(0x106)&&_0x2e7997!==_0x4ec792(0x104)),_0x2537ce=Math[_0x4ec792(0x10c)](..._0x2ce0fd['map'](([_0x89a33b])=>_0x89a33b[_0x4ec792(0x14a)])),_0xadfd16=Math[_0x4ec792(0x10c)](..._0x2ce0fd['map'](([,_0x58aedb])=>{const _0x315c60=_0x4ec792;try{const _0x514d56=_0x58aedb===null||_0x58aedb===undefined?'':typeof _0x58aedb===_0x315c60(0x146)?JSON['stringify'](_0x58aedb):String(_0x58aedb),_0x3c9f17=_0x514d56[_0x315c60(0x101)]('\x0a');return Math[_0x315c60(0x10c)](..._0x3c9f17[_0x315c60(0x126)](_0x24c3f8=>_0x24c3f8[_0x315c60(0x14a)]),0x0);}catch{return 0x0;}}),0x14),_0x28d52f=[];_0x28d52f[_0x4ec792(0x13e)](colorBorder('┌─'+'─'[_0x4ec792(0x149)](_0x2537ce)+_0x4ec792(0x143)+'─'[_0x4ec792(0x149)](_0xadfd16)+'─┐',_0x41efd1)),_0x2ce0fd['forEach'](([_0x24b4c9,_0x59c804])=>{const _0x23b569=_0x4ec792;let _0x494e21;try{_0x494e21=_0x59c804===null||_0x59c804===undefined?'':typeof _0x59c804===_0x23b569(0x146)?JSON[_0x23b569(0x10a)](_0x59c804):String(_0x59c804);}catch{_0x494e21=_0x23b569(0x122);}const _0x1c1f94=_0x24b4c9[_0x23b569(0x11b)](_0x2537ce),_0x11245b=_0x494e21[_0x23b569(0x101)]('\x0a');_0x11245b[_0x23b569(0x136)]((_0x5a78c6,_0x3e28f2)=>{const _0x3c14e6=_0x23b569,_0x46fc6e=colorBorder('│',_0x41efd1);_0x3e28f2===0x0?_0x28d52f[_0x3c14e6(0x13e)](_0x46fc6e+'\x20'+_0x1c1f94+'\x20'+_0x46fc6e+'\x20'+_0x5a78c6[_0x3c14e6(0x11b)](_0xadfd16)+'\x20'+_0x46fc6e):_0x28d52f[_0x3c14e6(0x13e)](_0x46fc6e+'\x20'+'\x20'[_0x3c14e6(0x149)](_0x2537ce)+'\x20'+_0x46fc6e+'\x20'+_0x5a78c6[_0x3c14e6(0x11b)](_0xadfd16)+'\x20'+_0x46fc6e);});}),_0x28d52f[_0x4ec792(0x13e)](colorBorder('└─'+'─'[_0x4ec792(0x149)](_0x2537ce)+_0x4ec792(0x10d)+'─'[_0x4ec792(0x149)](_0xadfd16)+'─┘',_0x41efd1));_0x5f0feb&&(_0x28d52f['push'](''),_0x28d52f['push'](String(a44_0x118b13[_0x4ec792(0x102)]['bold'](_0x4ec792(0x133)))),_0x28d52f[_0x4ec792(0x13e)](_0x5f0feb));_0x25238b&&(_0x28d52f[_0x4ec792(0x13e)](''),_0x28d52f['push'](String(a44_0x118b13[_0x4ec792(0x132)][_0x4ec792(0x114)](_0x4ec792(0x123)))),_0x28d52f[_0x4ec792(0x13e)](_0x25238b));_0x18f77a&&(_0x28d52f['push'](''),_0x28d52f[_0x4ec792(0x13e)](String(a44_0x118b13[_0x4ec792(0x10f)][_0x4ec792(0x114)](_0x4ec792(0x127)))),_0x28d52f[_0x4ec792(0x13e)](_0x18f77a));if(_0x3270fc){if(_0x3270fc['stderr']){_0x28d52f['push'](''),_0x28d52f[_0x4ec792(0x13e)](String(a44_0x118b13['red']['bold'](_0x4ec792(0x113))));const _0x5ba985=_0x3270fc[_0x4ec792(0x124)][_0x4ec792(0x101)]('\x0a');_0x5ba985[_0x4ec792(0x136)](_0x4d4192=>{const _0x27b9d6=_0x4ec792;_0x4d4192[_0x27b9d6(0x14c)]()&&_0x28d52f[_0x27b9d6(0x13e)](_0x4d4192);});}if(_0x3270fc['cmdout']){_0x28d52f[_0x4ec792(0x13e)](''),_0x28d52f[_0x4ec792(0x13e)](String(a44_0x118b13['cyan']['bold'](_0x4ec792(0x105))));const _0x13d76c=_0x3270fc[_0x4ec792(0x13d)][_0x4ec792(0x101)]('\x0a');_0x13d76c[_0x4ec792(0x136)](_0x14afb2=>{const _0x5ae361=_0x4ec792;_0x14afb2[_0x5ae361(0x14c)]()&&_0x28d52f[_0x5ae361(0x13e)](_0x14afb2);});}}return _0x28d52f[_0x4ec792(0x112)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x3fbd26,_0x561501){const _0x5b925b=a44_0x3927;if(_0x561501['format']===_0x5b925b(0x103)){await handleSDKOutput([_0x3fbd26],_0x561501);return;}const _0x25672f=resolveOutputOptions(_0x561501),_0x435ad0=await formatSingleObject(_0x3fbd26,_0x25672f);await writeOutput(_0x435ad0,_0x25672f[_0x5b925b(0x11d)]||undefined,_0x25672f[_0x5b925b(0x141)]);}
|
|
1
|
+
(function(_0x5d9a2a,_0x506afa){const _0x4f0804=a44_0x5437,_0x1d212b=_0x5d9a2a();while(!![]){try{const _0x3c24e7=parseInt(_0x4f0804(0x1e7))/0x1*(parseInt(_0x4f0804(0x1df))/0x2)+-parseInt(_0x4f0804(0x1c4))/0x3*(-parseInt(_0x4f0804(0x1ea))/0x4)+-parseInt(_0x4f0804(0x1f1))/0x5+parseInt(_0x4f0804(0x1c5))/0x6+parseInt(_0x4f0804(0x1cf))/0x7*(parseInt(_0x4f0804(0x1c6))/0x8)+parseInt(_0x4f0804(0x1c1))/0x9*(parseInt(_0x4f0804(0x1ff))/0xa)+parseInt(_0x4f0804(0x1eb))/0xb*(-parseInt(_0x4f0804(0x1d9))/0xc);if(_0x3c24e7===_0x506afa)break;else _0x1d212b['push'](_0x1d212b['shift']());}catch(_0x3ae51a){_0x1d212b['push'](_0x1d212b['shift']());}}}(a44_0x8e12,0x1e589));import{writeFileSync}from'fs';function a44_0x5437(_0x4e2677,_0xc7e83b){_0x4e2677=_0x4e2677-0x1c1;const _0x8e12a2=a44_0x8e12();let _0x54372b=_0x8e12a2[_0x4e2677];return _0x54372b;}import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x3ff761 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x36a1c9){const _0xa3d6f3=a44_0x5437;return _0x36a1c9['format']===_0xa3d6f3(0x1e1)||_0x36a1c9[_0xa3d6f3(0x1ef)]===_0xa3d6f3(0x1d0)||_0x36a1c9[_0xa3d6f3(0x1ef)]===_0xa3d6f3(0x1d6)||_0x36a1c9[_0xa3d6f3(0x1ef)]===_0xa3d6f3(0x202)||_0x36a1c9[_0xa3d6f3(0x1e1)]===!![]||_0x36a1c9[_0xa3d6f3(0x1d0)]===!![]||_0x36a1c9[_0xa3d6f3(0x1d6)]===!![]||_0x36a1c9[_0xa3d6f3(0x202)]===!![];}export function parseOutputOptions(_0x2525dd){const _0x166117=a44_0x5437;return{'format':_0x2525dd[_0x166117(0x1ef)]||'table','output':_0x2525dd['output']||'','limit':_0x2525dd['limit'],'color':_0x2525dd['color'],'noColor':_0x2525dd['noColor']};}function convertSDKResultToQueryResult(_0x48c052){const _0xf3553d=a44_0x5437,_0x103bab=[];if(_0x48c052['length']>0x0){const _0x22917b=_0x48c052[0x0];for(const [_0x3d31c0,_0x154261]of Object['entries'](_0x22917b)){let _0x2a0bd5=_0xf3553d(0x1d1);if(typeof _0x154261===_0xf3553d(0x1ee))_0x2a0bd5=Number['isInteger'](_0x154261)?_0xf3553d(0x1e9):'double';else{if(typeof _0x154261===_0xf3553d(0x1e3))_0x2a0bd5=_0xf3553d(0x1e3);else _0x154261===null&&(_0x2a0bd5=_0xf3553d(0x1d1));}_0x103bab['push']({'name':_0x3d31c0,'type':_0x2a0bd5});}}return{'queryId':'sdk-result','columns':_0x103bab,'data':_0x48c052,'stats':{'state':_0xf3553d(0x1fd),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x48c052[_0xf3553d(0x1c3)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0xa1ffd0,_0x24d74e){const _0x2583c4=convertSDKResultToQueryResult(_0xa1ffd0);return formatQueryOutput(_0x2583c4,_0x24d74e);}export async function formatQueryOutput(_0x1079eb,_0x398408){const _0x5c8fd4=a44_0x5437,{format:_0x29ccae,limit:_0x315da9,output:_0x3ad7ff,color:_0x228862,noColor:_0x384660}=_0x398408,_0x570f67=Boolean(_0x3ad7ff)&&!_0x228862,_0x24e2ab={'color':_0x228862,'noColor':_0x384660||_0x570f67};if(_0x29ccae===_0x5c8fd4(0x202)){const _0x3540b3=shouldUseLess(_0x29ccae,_0x3ad7ff);return formatAsTable(_0x1079eb,_0x315da9,_0x3540b3,_0x24e2ab);}else{if(_0x29ccae===_0x5c8fd4(0x1e1))return formatAsJSON(_0x1079eb,_0x24e2ab);else return _0x29ccae===_0x5c8fd4(0x1d0)?formatAsJSONL(_0x1079eb,_0x24e2ab):formatQueryResult(_0x1079eb,_0x29ccae);}}function shouldUseLess(_0xbc906b,_0x556f6d){const _0x197ecd=a44_0x5437;return(_0xbc906b===_0x197ecd(0x202)||_0xbc906b===_0x197ecd(0x1cc))&&process[_0x197ecd(0x204)][_0x197ecd(0x1e8)]&&!_0x556f6d;}export function resolveOutputOptions(_0x190306){const _0x3dbd4e=a44_0x5437,_0x3d5403=resolveOutputFormat(_0x190306[_0x3dbd4e(0x1ef)],_0x190306[_0x3dbd4e(0x1fb)],'table');let _0x144acf=typeof _0x190306[_0x3dbd4e(0x1db)]===_0x3dbd4e(0x1ee)?_0x190306[_0x3dbd4e(0x1db)]:parseInt(_0x190306[_0x3dbd4e(0x1db)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0xe2e22e=_0x190306[_0x3dbd4e(0x1fb)]||'';return shouldUseLess(_0x3d5403,_0xe2e22e)&&(_0x144acf=Infinity),{'format':_0x3d5403,'output':_0xe2e22e,'limit':_0x144acf,'color':_0x190306[_0x3dbd4e(0x1f8)],'noColor':_0x190306['noColor']};}export function writeOutput(_0xa6a26e,_0x127193,_0x139b09){const _0x289d87=a44_0x5437;return _0x127193?(writeFileSync(_0x127193,_0xa6a26e),console[_0x289d87(0x1e6)]('Results\x20saved\x20to\x20'+_0x127193),Promise['resolve']()):shouldUseLess(_0x139b09||'','')?new Promise(_0x1d3d2a=>{const _0x15a101=_0x289d87,_0x345e06=spawn(_0x15a101(0x1f2),[_0x15a101(0x1de)],{'stdio':['pipe','inherit',_0x15a101(0x1fc)]});let _0x4feeb6=![];_0x345e06['on']('error',()=>{const _0xddff4b=_0x15a101;!_0x4feeb6&&(_0x4feeb6=!![],console[_0xddff4b(0x1d2)](_0xa6a26e),_0x1d3d2a());}),_0x345e06['on'](_0x15a101(0x1cd),()=>{!_0x4feeb6&&(_0x4feeb6=!![],_0x1d3d2a());}),_0x345e06['on'](_0x15a101(0x201),()=>{const _0xb5ad8e=_0x15a101;!_0x4feeb6&&_0x345e06['stdin']&&(_0x345e06[_0xb5ad8e(0x205)]['on'](_0xb5ad8e(0x1e6),()=>{}),_0x345e06[_0xb5ad8e(0x205)]['write'](_0xa6a26e),_0x345e06[_0xb5ad8e(0x205)]['end']());}),!_0x345e06[_0x15a101(0x205)]&&(!_0x4feeb6&&(_0x4feeb6=!![],console[_0x15a101(0x1d2)](_0xa6a26e),_0x1d3d2a()));}):(console[_0x289d87(0x1d2)](_0xa6a26e),Promise[_0x289d87(0x1d5)]());}export async function handleSDKOutput(_0x193851,_0x3a6498){const _0x322842=a44_0x5437,_0x171233=resolveOutputOptions(_0x3a6498),_0x21d34e=await formatSDKOutput(_0x193851,_0x171233);await writeOutput(_0x21d34e,_0x171233[_0x322842(0x1fb)]||undefined,_0x171233[_0x322842(0x1ef)]);}export async function handleQueryOutput(_0x1fdf1c,_0x59c99e){const _0x1df27c=a44_0x5437,_0x576593=resolveOutputOptions(_0x59c99e),_0x550a88=await formatQueryOutput(_0x1fdf1c,_0x576593);await writeOutput(_0x550a88,_0x576593[_0x1df27c(0x1fb)]||undefined,_0x576593['format']);}function a44_0x8e12(){const _0x267d01=['keys','max','─┬─','─┴─','list','close','forEach','14NdzNxb','jsonl','varchar','log','debug','stderr','resolve','tsv','params','entries','24cKdcPg','string','limit','magenta','yellow','-FXRSn','1992oLXFrY','trim','json','filter','boolean','query','repeat','error','216rZDcot','isTTY','bigint','901372ESPvxL','4651130QbSmmM','split','map','number','format','stringify','152620FaEtkl','less','push','cmdout','No\x20data','rule','cyan','color','bold','red','output','inherit','FINISHED','object','61630gjGsty','padEnd','spawn','table','[rule]','stdout','stdin','[query]','351QTLzxu','blue','length','3uuuWWj','518862mvYIkq','932672hyfoEj','join'];a44_0x8e12=function(){return _0x267d01;};return a44_0x8e12();}async function formatSingleObject(_0x23d168,_0x587dd7){const _0x5a112d=a44_0x5437,{format:_0x28d68e,color:_0x12a4bb,noColor:_0x25f12f}=_0x587dd7,_0x745cf2={'color':_0x12a4bb,'noColor':_0x25f12f};if(_0x28d68e===_0x5a112d(0x1e1)){if(shouldUseColor(_0x745cf2))return colorizeJSON(_0x23d168,_0x745cf2);return JSON[_0x5a112d(0x1f0)](_0x23d168,null,0x2);}else{if(_0x28d68e===_0x5a112d(0x1d0)){if(shouldUseColor(_0x745cf2))return colorizeJSONCompact(_0x23d168,_0x745cf2);return JSON[_0x5a112d(0x1f0)](_0x23d168);}else{if(_0x28d68e===_0x5a112d(0x1d6))return Object[_0x5a112d(0x1d8)](_0x23d168)[_0x5a112d(0x1ed)](([_0x2844e1,_0xf95840])=>_0x2844e1+'\x09'+_0xf95840)['join']('\x0a');else{const _0x24d1a8=Object[_0x5a112d(0x1d8)](_0x23d168);if(_0x24d1a8['length']===0x0)return _0x5a112d(0x1f5);const _0x4afc12=_0x23d168[_0x5a112d(0x1d3)],_0x5dde92=_0x23d168[_0x5a112d(0x1e4)],_0x3ff994=_0x23d168[_0x5a112d(0x1d7)],_0x23c2a2=_0x23d168[_0x5a112d(0x1f6)],_0x58791c=_0x5dde92?typeof _0x5dde92===_0x5a112d(0x1da)?_0x5dde92:JSON[_0x5a112d(0x1f0)](_0x5dde92,null,0x2):undefined,_0x49f577=_0x3ff994&&Object['keys'](_0x3ff994)[_0x5a112d(0x1c3)]>0x0?JSON['stringify'](_0x3ff994,null,0x2):undefined,_0x3b42a1=_0x23c2a2&&Object[_0x5a112d(0x1c8)](_0x23c2a2)[_0x5a112d(0x1c3)]>0x0?JSON['stringify'](_0x23c2a2,null,0x2):undefined,_0x3ef5e8=_0x24d1a8[_0x5a112d(0x1e2)](([_0x2b8a68])=>_0x2b8a68!==_0x5a112d(0x1d3)&&_0x2b8a68!=='query'&&_0x2b8a68!==_0x5a112d(0x1d7)&&_0x2b8a68!==_0x5a112d(0x1f6)),_0x24c31e=Math[_0x5a112d(0x1c9)](..._0x3ef5e8[_0x5a112d(0x1ed)](([_0x56b2dd])=>_0x56b2dd[_0x5a112d(0x1c3)])),_0x22992e=Math['max'](..._0x3ef5e8['map'](([,_0x1d930e])=>{const _0x31e65a=_0x5a112d;try{const _0x2f2d93=_0x1d930e===null||_0x1d930e===undefined?'':typeof _0x1d930e==='object'?JSON['stringify'](_0x1d930e):String(_0x1d930e),_0x11c08a=_0x2f2d93[_0x31e65a(0x1ec)]('\x0a');return Math[_0x31e65a(0x1c9)](..._0x11c08a[_0x31e65a(0x1ed)](_0xcae11f=>_0xcae11f[_0x31e65a(0x1c3)]),0x0);}catch{return 0x0;}}),0x14),_0x4c8958=[];_0x4c8958[_0x5a112d(0x1f3)](colorBorder('┌─'+'─'['repeat'](_0x24c31e)+_0x5a112d(0x1ca)+'─'[_0x5a112d(0x1e5)](_0x22992e)+'─┐',_0x745cf2)),_0x3ef5e8[_0x5a112d(0x1ce)](([_0x3ef532,_0x5d26a6])=>{const _0x4fdc8d=_0x5a112d;let _0x583a28;try{_0x583a28=_0x5d26a6===null||_0x5d26a6===undefined?'':typeof _0x5d26a6===_0x4fdc8d(0x1fe)?JSON[_0x4fdc8d(0x1f0)](_0x5d26a6):String(_0x5d26a6);}catch{_0x583a28='[Object]';}const _0x14ecb9=_0x3ef532['padEnd'](_0x24c31e),_0x1097e9=_0x583a28[_0x4fdc8d(0x1ec)]('\x0a');_0x1097e9[_0x4fdc8d(0x1ce)]((_0x11b755,_0xc5bcb1)=>{const _0x3c681=_0x4fdc8d,_0x4dc17a=colorBorder('│',_0x745cf2);_0xc5bcb1===0x0?_0x4c8958[_0x3c681(0x1f3)](_0x4dc17a+'\x20'+_0x14ecb9+'\x20'+_0x4dc17a+'\x20'+_0x11b755[_0x3c681(0x200)](_0x22992e)+'\x20'+_0x4dc17a):_0x4c8958[_0x3c681(0x1f3)](_0x4dc17a+'\x20'+'\x20'['repeat'](_0x24c31e)+'\x20'+_0x4dc17a+'\x20'+_0x11b755[_0x3c681(0x200)](_0x22992e)+'\x20'+_0x4dc17a);});}),_0x4c8958[_0x5a112d(0x1f3)](colorBorder('└─'+'─'[_0x5a112d(0x1e5)](_0x24c31e)+_0x5a112d(0x1cb)+'─'[_0x5a112d(0x1e5)](_0x22992e)+'─┘',_0x745cf2));_0x58791c&&(_0x4c8958[_0x5a112d(0x1f3)](''),_0x4c8958['push'](String(a44_0x3ff761[_0x5a112d(0x1dd)][_0x5a112d(0x1f9)](_0x5a112d(0x206)))),_0x4c8958[_0x5a112d(0x1f3)](_0x58791c));_0x49f577&&(_0x4c8958[_0x5a112d(0x1f3)](''),_0x4c8958['push'](String(a44_0x3ff761[_0x5a112d(0x1c2)][_0x5a112d(0x1f9)]('[params]'))),_0x4c8958['push'](_0x49f577));_0x3b42a1&&(_0x4c8958['push'](''),_0x4c8958[_0x5a112d(0x1f3)](String(a44_0x3ff761[_0x5a112d(0x1dc)]['bold'](_0x5a112d(0x203)))),_0x4c8958['push'](_0x3b42a1));if(_0x4afc12){if(_0x4afc12[_0x5a112d(0x1d4)]){_0x4c8958[_0x5a112d(0x1f3)](''),_0x4c8958[_0x5a112d(0x1f3)](String(a44_0x3ff761[_0x5a112d(0x1fa)][_0x5a112d(0x1f9)]('[error]')));const _0x58c59e=_0x4afc12[_0x5a112d(0x1d4)][_0x5a112d(0x1ec)]('\x0a');_0x58c59e['forEach'](_0x5a7097=>{const _0x40cd8e=_0x5a112d;_0x5a7097[_0x40cd8e(0x1e0)]()&&_0x4c8958['push'](_0x5a7097);});}if(_0x4afc12[_0x5a112d(0x1f4)]){_0x4c8958[_0x5a112d(0x1f3)](''),_0x4c8958[_0x5a112d(0x1f3)](String(a44_0x3ff761[_0x5a112d(0x1f7)][_0x5a112d(0x1f9)]('[logs]')));const _0x8d7013=_0x4afc12[_0x5a112d(0x1f4)][_0x5a112d(0x1ec)]('\x0a');_0x8d7013[_0x5a112d(0x1ce)](_0x248317=>{const _0x1e63b2=_0x5a112d;_0x248317[_0x1e63b2(0x1e0)]()&&_0x4c8958[_0x1e63b2(0x1f3)](_0x248317);});}}return _0x4c8958[_0x5a112d(0x1c7)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x10526c,_0x517ab1){const _0x35e1c8=a44_0x5437;if(_0x517ab1[_0x35e1c8(0x1ef)]==='table'){await handleSDKOutput([_0x10526c],_0x517ab1);return;}const _0x6504c3=resolveOutputOptions(_0x517ab1),_0x3ebbcf=await formatSingleObject(_0x10526c,_0x6504c3);await writeOutput(_0x3ebbcf,_0x6504c3[_0x35e1c8(0x1fb)]||undefined,_0x6504c3[_0x35e1c8(0x1ef)]);}
|
package/dist/core/config.d.ts
CHANGED
|
@@ -224,4 +224,20 @@ export declare function isExperimentalAvailable(): boolean;
|
|
|
224
224
|
* loadGlobalProxy() // "http://proxy.corp.com:8080"
|
|
225
225
|
*/
|
|
226
226
|
export declare function loadGlobalProxy(): string | undefined;
|
|
227
|
+
export type ReleaseChannel = 'stable' | 'next';
|
|
228
|
+
/**
|
|
229
|
+
* Load release channel from environment variable or global tdx.json
|
|
230
|
+
*
|
|
231
|
+
* Priority:
|
|
232
|
+
* 1. TDX_RELEASE_CHANNEL environment variable
|
|
233
|
+
* 2. release_channel field in ~/.config/tdx/tdx.json
|
|
234
|
+
* 3. Default: 'stable'
|
|
235
|
+
*/
|
|
236
|
+
export declare function loadReleaseChannel(): ReleaseChannel;
|
|
237
|
+
/**
|
|
238
|
+
* Save release channel to global tdx.json
|
|
239
|
+
*
|
|
240
|
+
* @param channel - 'stable' or 'next'
|
|
241
|
+
*/
|
|
242
|
+
export declare function saveReleaseChannel(channel: ReleaseChannel): void;
|
|
227
243
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAgB/D;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAMlF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAMpG;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAM9E;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAMjH;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAM1D;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAID;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAMhF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAU9F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BpE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA0BrD;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAiBlE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAqEzG;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG7B;AA2ED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAgCnF;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvG;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,SAAS,CA4BtC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,SAAS,CAcpD"}
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAgB/D;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAMlF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAMpG;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAM9E;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAMjH;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAM1D;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAID;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAMhF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAU9F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BpE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA0BrD;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAiBlE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAqEzG;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG7B;AA2ED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAgCnF;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvG;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,SAAS,CA4BtC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,SAAS,CAcpD;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,cAAc,CAwBnD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAsBhE"}
|