@treasuredata/tdx 0.16.8 → 0.16.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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/llm-proxy.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/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.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/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/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.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/claude-agent/claude-agent-client.js +1 -1
- package/dist/sdk/claude-agent/environment.js +1 -1
- package/dist/sdk/claude-agent/index.js +1 -1
- package/dist/sdk/claude-agent/system-prompts.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-aliases.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/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/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.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a42_0x1a014a=a42_0x1ed3;(function(_0x9b4cf6,_0x337483){const _0x2305a7=a42_0x1ed3,_0x2e60d0=_0x9b4cf6();while(!![]){try{const _0x16446a=parseInt(_0x2305a7(0x294))/0x1+-parseInt(_0x2305a7(0x218))/0x2+-parseInt(_0x2305a7(0x252))/0x3+parseInt(_0x2305a7(0x26c))/0x4+-parseInt(_0x2305a7(0x34f))/0x5+parseInt(_0x2305a7(0x26b))/0x6+-parseInt(_0x2305a7(0x2b1))/0x7*(parseInt(_0x2305a7(0x21f))/0x8);if(_0x16446a===_0x337483)break;else _0x2e60d0['push'](_0x2e60d0['shift']());}catch(_0x1d9196){_0x2e60d0['push'](_0x2e60d0['shift']());}}}(a42_0x2427,0xd1c91));import a42_0x24c450 from'chalk';import{existsSync}from'fs';import a42_0x123493 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}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';function a42_0x2427(){const _0x5e3e75=['\x20logs','sessions','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','displayLine','floor','attempt:','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','workflow:tasks','split','\x20has\x20no\x20attempts','min','sourceDir','LABEL_WIDTH_DIVISOR','rows','icon','Kill\x20a\x20running\x20attempt','buildTimelineData','Error:','Updating\x20','setSecret','.\x20Expected\x20format:\x20KEY=VALUE','log','jsonl','session:','Task\x20name:\x20','1838442LAOlAD','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','MAX_TASKS_DISPLAY','\x20modified','task','Loading\x20workflows...','✔\x20Downloaded\x20','from','repeat','basename','Select\x20a\x20workflow\x20to\x20run','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Total:\x20','dryRun','\x20\x20Workflow:\x20','Dry\x20run:\x20yes','Project\x20name:\x20','blue','localeCompare','\x20\x20Console:\x20','trimEnd','retrySession','description','state','\x1b[1A\x1b[2K','8069676VDZcGY','5952156tmjxos','workflow:use','Error:\x20Secret\x20key\x20is\x20required','GUTTER','No\x20attempts\x20found','Include\x20retried:\x20yes','workflow:kill','generateSessionTimelineRows','projectId','includes','\x20from\x20session\x20','isTTY','\x20unchanged','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Show\x20specific\x20attempt\x20details','\x20\x20New\x20attempt\x20ID:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','No\x20workflows\x20found\x20in\x20project:\x20','type','join','MAX_POLL_ITERATIONS','fs/promises','workflow:secrets:list','listSecrets','Deleting\x20project\x20','isDirectory','clear','group_error','running','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','get','done','Error:\x20KEY=VALUE\x20is\x20required','unknown','params','workflow:download','substring','executeCloneProject','ICON_WIDTH','No\x20attempts\x20found\x20for:\x20','1609134TLwxZK','Starting\x20workflow\x20run...','ICON_SPACING','POLL_INTERVAL_MS','keys','/attempt/','\x20project','name','sys','isNewProject','\x0a✔\x20Attempt\x20complete','startedAt','Analyzing\x20project...','Tip:\x20cd\x20to\x20workflows/','some','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Listing\x20workflow\x20sessions...','📋\x20','Analyzing\x20changes...','tdx\x20wf\x20attempt\x20','Killing\x20attempt...','deleteSecret','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','limit','Pulling\x20project\x20','Auto-selected\x20latest\x20session:\x20','title','tasks','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','7lDzBQj','Params:\x20','\x0aUpdate\x20existing\x20project\x20\x22','workflow:secrets:set','sourceProjectName','✔\x20Deleted\x20project\x20','columns','\x22\x20with\x20new\x20revision?','getHours','\x20\x20tdx\x20wf\x20use\x20<project>','Validation:\x20skipped','map','data','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','success','Source\x20directory\x20is\x20required','finishedAt','replace','✔\x20Workflow\x20run\x20started','duration','tdx.json','\x22?\x20This\x20cannot\x20be\x20undone.','resolveProjectId','Session\x20not\x20found:\x20','\x20\x20Session\x20context\x20set\x20to:\x20','getMinutes','Session\x20time:\x20','path','✔\x20Clone\x20complete','Pushing\x20workflow\x20project...','follow','prepareCloneProject','✔\x20Secret\x20\x27','Listing\x20workflow\x20attempts...','verbose','Retrying\x20attempt...','...','Loading\x20session...','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','relative','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','targetExists','unchanged','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Cloning\x20to\x20','\x20tasks','Attempt:\x20','sessionId','push','status','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Changes:\x20','createdAt','filter','length','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','hasChanges','Setting\x20secret...','workflows','error','List\x20workflows','No\x20sessions\x20with\x20timing\x20information','workflow:secrets:delete','\x20secret','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Source:\x20','applyPullProject','No\x20workflows\x20found','trim','Listing\x20workflows...','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','session',',\x20Workflow:\x20','getMonth','readFile','kill','Start\x20a\x20workflow\x20run','end','cyan','No\x20log\x20content\x20found','resolveProject','workflow:workflows','targetDir','match','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','retryAttempt','New\x20project\x20name:\x20','\x20deleted','showWorkflowConsoleUrl','planned','\x0a✔\x20No\x20changes\x20to\x20push','\x20of\x20','Source\x20directory:\x20','projects','Latest\x20session\x20has\x20no\x20attempt','\x20sessions\x20','Downloading\x20logs...','\x22\x20already\x20exists\x20(ID:\x20','\x0aClone\x20\x22','Source:\x20','size','renderSessionsTimeline','set','⚠\x20Showing\x20first\x20','project','cwd','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','fromTask','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','workflow:run','requireProject','\x20\x20Project:\x20','output','table','round','list','Usage:\x20tdx\x20wf\x20use\x20<project>','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Error:\x20Attempt\x20ID\x20is\x20required','\x0aApply\x20these\x20changes?','logs','summary','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Pushing\x20project...','includeRetried','canceling','run','key','\x27...','No\x20sessions\x20found\x20for:\x20','getTime','\x20(system)','every','📁\x20','window','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Failed\x20to\x20fetch\x20attempt\x20data','Usage:\x20workflow:delete\x20<project-name-or-id>','message','Source\x20project:\x20','List\x20workflow\x20attempts','Attempt\x20ID:\x20','\x20\x20Session\x20ID:\x20','pending','Using\x20attempt\x20','attempt','Force:\x20yes','Filter:\x20','Select\x20a\x20session\x20to\x20view\x20timeline:','Target:\x20','Downloading\x20project\x20','List\x20workflow\x20execution\x20sessions','startTime','workflow:push','Key\x20cannot\x20be\x20empty','1167390lcZIBb','newProjectName','\x20(use\x20--limit\x20to\x20show\x20more)','No\x20workflow\x20projects\x20found','\x20new','Error:\x20Project\x20name\x20is\x20required','Error:\x20Invalid\x20parameter\x20format:\x20','attemptId','No\x20projects\x20match\x20pattern:\x20','max','Retrying\x20session...','resolveProjectDir','reason','MIN_LABEL_COUNT','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','deleted','workflowProject','skipValidation','revision:\x20','executePushProject','Session\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','workflow:retry','MAX_LABEL_COUNT','find','workflow:clone','\x27\x20from\x20project\x20\x27','modified','/app/workflows/','getDate','Output\x20directory:\x20','\x0a⚠\x20Project\x20\x22','MIN_TIMELINE_WIDTH','Parameters:\x20','lastAttempt','diff','Project\x20name\x20is\x20required','\x0aPolling...\x20(','select','Error:\x20','✔\x20Project\x20updated','Project:\x20','start','\x20\x20Files\x20extracted:\x20','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','green','updatedAt','dim','---\x20','\x20session','✔\x20Pull\x20complete','startsWith','Cancelled','context','msPerChar','splice','parse','index','padStart','workflow:sessions','sort','✔\x20Workflow\x20project\x20context\x20cleared.','Invalid\x20format:\x20','delete','No\x20workflow\x20tdx.json\x20found','stat','site','sessionTime','\x20is\x20not\x20a\x20directory','Deleting\x20secret...','white','Fetching\x20log\x20files...','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x0aDry\x20run\x20-\x20no\x20files\x20written','✔\x20Found\x20','format','\x22\x20to\x20new\x20project\x20\x22','Filter:\x20project=','Retry\x20a\x20session\x20or\x20attempt','✔\x20Push\x20complete','stringify','durationMs','stdout','slice','all','execute','write','now','projectName','json','\x0aFailed\x20to\x20fetch\x20attempt\x20data','workflow','LABEL_MIN_SPACING','\x20-\x20','fill','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','(unknown)','fileSize','yes','Key:\x20','\x20\x20Project\x20ID:\x20','Select\x20a\x20task\x20to\x20view\x20logs:','workflowName','Project\x20directory:\x20','No\x20sessions\x20found\x20in\x20project:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','pollTimeline','yellow','No\x20workflow\x20sessions\x20found','\x20to\x20see\x20detailed\x20logs','Pattern:\x20','Files\x20to\x20upload:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','cancelRequested','revision','fullName','Pull\x20workflow\x20project\x20to\x20local\x20folder','💡\x20Tip:\x20Use\x20','2534654gcBqNC','isArray','navigateSessionsInteractive','getFullYear','✔\x20New\x20project:\x20','Revision:\x20','✔\x20Project:\x20','11753752kNExIO','No\x20sessions\x20found','total','List\x20all\x20workflow\x20projects','Warning:','\x20\x20Revision:\x20','Loading\x20sessions...','Target\x20directory:\x20','\x20workflow','parseProjectWorkflowPattern','workflow:attempts','autocomplete','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','renderSingleTimeline','red','changes','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','\x20\x20Location:\x20','renderTimeline','workflow:projects','Listing\x20workflow\x20projects...','workflow:timeline','\x0aDry\x20run\x20-\x20no\x20project\x20created','filesExtracted','logFiles','metadata'];a42_0x2427=function(){return _0x5e3e75;};return a42_0x2427();}import a42_0x2a8463 from'prompts';function getAttemptStatusDisplay(_0x297820){const _0x595362=a42_0x1ed3;if(!_0x297820)return{'icon':'⏳','text':''};const {done:_0x4c08c2,success:_0x1f1f45,cancelRequested:_0x3023ea}=_0x297820;if(!_0x4c08c2)return _0x3023ea?{'icon':'🛑','text':a42_0x24c450[_0x595362(0x20d)]('canceling')}:{'icon':'🔄','text':a42_0x24c450[_0x595362(0x263)]('running')};if(_0x1f1f45)return{'icon':'✅','text':a42_0x24c450['green'](_0x595362(0x2bf))};return{'icon':'❌','text':a42_0x24c450['red'](_0x595362(0x2ef))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x1a014a(0x304)](_0x157eff,_0x326b7d,_0xc8afbf=0x0){const _0x443424=a42_0x1a014a;return _0x157eff[_0xc8afbf]||_0x326b7d[_0x443424(0x35f)];}[a42_0x1a014a(0x322)](_0x4c3157,_0x2c41d0,_0x22aeee=0x0){const _0x3bdd95=a42_0x1a014a,_0x2f201e=this['resolveProject'](_0x4c3157,_0x2c41d0,_0x22aeee);if(!_0x2f201e)return console[_0x3bdd95(0x2ef)](a42_0x24c450[_0x3bdd95(0x22d)](_0x3bdd95(0x24a)),_0x3bdd95(0x1c6)),console['error'](a42_0x24c450[_0x3bdd95(0x1d1)](_0x3bdd95(0x2e6))),null;return _0x2f201e;}[a42_0x1a014a(0x228)](_0x48c542,_0x97cbcc){const _0x59df1e=a42_0x1a014a;if(_0x48c542[0x0]){const _0x94ad09=_0x48c542[0x0][_0x59df1e(0x241)]('.');if(_0x94ad09[_0x59df1e(0x2ea)]===0x1)return{'projectName':_0x94ad09[0x0],'workflowName':undefined};else return _0x94ad09[_0x59df1e(0x2ea)]===0x2?{'projectName':_0x94ad09[0x0],'workflowName':_0x94ad09[0x1]}:(console[_0x59df1e(0x2ef)](a42_0x24c450['red'](_0x59df1e(0x24a)),_0x59df1e(0x2df)),null);}return{'projectName':_0x97cbcc[_0x59df1e(0x35f)],'workflowName':undefined};}[a42_0x1a014a(0x35a)](_0x244c37,_0x1da265,_0x418fd8=0x0){const _0x2ec5c3=a42_0x1a014a;if(_0x244c37[_0x418fd8])return _0x244c37[_0x418fd8];if(_0x1da265[_0x2ec5c3(0x35f)]){const _0xb67950=a42_0x123493['join'](process['cwd'](),'workflows',_0x1da265['workflowProject']);if(existsSync(a42_0x123493[_0x2ec5c3(0x27f)](_0xb67950,_0x2ec5c3(0x2c5))))return _0xb67950;}return undefined;}async['showWorkflowConsoleUrl'](_0x27cefa,_0x9c7f81,_0x4ad874){const _0x238518=a42_0x1a014a;try{const _0x48b99d=await _0x27cefa[_0x238518(0x1fd)][_0x238518(0x2ee)](_0x9c7f81,{'limit':0x1});if(_0x48b99d[_0x238518(0x2ea)]>0x0){const _0x563b7b=_0x48b99d[0x0]['id'],_0x4c3e3f=getWorkflowUrl(_0x4ad874,_0x563b7b);console[_0x238518(0x2ef)]('\x20\x20Console:\x20'+a42_0x24c450[_0x238518(0x302)](_0x4c3e3f));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x26d);[a42_0x1a014a(0x268)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a42_0x1a014a(0x1f7)](_0x4424bc){const _0x28d8a9=a42_0x1a014a,{options:_0x545447,args:_0x838370,tdx:_0x16d01c}=_0x4424bc,_0x58620a=_0x838370[0x0],_0x108b4d=_0x545447[_0x28d8a9(0x286)];if(_0x108b4d)return saveSessionContext({'workflow_project':undefined},_0x545447[_0x28d8a9(0x2fb)]),console[_0x28d8a9(0x24e)](a42_0x24c450['green'](_0x28d8a9(0x1df))),0x0;if(!_0x58620a)return console[_0x28d8a9(0x2ef)](a42_0x24c450[_0x28d8a9(0x22d)]('Error:'),_0x28d8a9(0x1c6)),console['error'](a42_0x24c450['dim'](_0x28d8a9(0x328))),console[_0x28d8a9(0x2ef)](a42_0x24c450['dim'](_0x28d8a9(0x22f))),0x1;const _0x5cb734=await withSpinner('Resolving\x20project\x20\x27'+_0x58620a+_0x28d8a9(0x334),()=>_0x16d01c['workflow'][_0x28d8a9(0x2c7)](_0x58620a),{'verbose':_0x545447['verbose']}),{name:_0x5482a4}=_0x5cb734[_0x28d8a9(0x2bd)];return saveSessionContext({'workflow_project':_0x5482a4},_0x545447[_0x28d8a9(0x2fb)]),console[_0x28d8a9(0x24e)](a42_0x24c450[_0x28d8a9(0x1cf)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a42_0x24c450[_0x28d8a9(0x302)](_0x5482a4))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x232);[a42_0x1a014a(0x268)]=a42_0x1a014a(0x222);async['execute'](_0x184ea2){const _0x2d574e=a42_0x1a014a,{options:_0x1670a4,args:_0x42b3ac,tdx:_0xb265ed}=_0x184ea2,_0x22e9e5=_0x42b3ac[0x0];_0x1670a4[_0x2d574e(0x2d3)]&&_0x22e9e5&&console['error'](_0x2d574e(0x210)+_0x22e9e5);const _0x7b641=await withSpinner(_0x2d574e(0x233),()=>_0xb265ed[_0x2d574e(0x1fd)][_0x2d574e(0x311)](_0x22e9e5,{'limit':_0x1670a4['limit']}),{'verbose':_0x1670a4[_0x2d574e(0x2d3)]});let _0x1747b1=_0x7b641[_0x2d574e(0x2bd)];_0x1747b1['sort']((_0x517767,_0x55589f)=>_0x517767['name'][_0x2d574e(0x264)](_0x55589f['name']));const _0xe02dc8=_0x1670a4[_0x2d574e(0x2ab)]||0x64,_0x3dfdd9=_0x1747b1[_0x2d574e(0x2ea)]>=_0xe02dc8?a42_0x24c450['dim'](_0x2d574e(0x351)):'';console[_0x2d574e(0x2ef)](_0x2d574e(0x1ec)+_0x1747b1[_0x2d574e(0x2ea)]+_0x2d574e(0x29a)+(_0x1747b1[_0x2d574e(0x2ea)]!==0x1?'s':'')+_0x3dfdd9);if(_0x1670a4[_0x2d574e(0x1ed)]===_0x2d574e(0x1fb)||_0x1670a4[_0x2d574e(0x1ed)]===_0x2d574e(0x24f)||_0x1670a4[_0x2d574e(0x1ed)]===_0x2d574e(0x325))await handleSDKOutput(_0x1747b1,_0x1670a4);else{if(_0x1747b1[_0x2d574e(0x2ea)]===0x0)_0x22e9e5?console[_0x2d574e(0x24e)](_0x2d574e(0x357)+_0x22e9e5):console[_0x2d574e(0x24e)](_0x2d574e(0x352));else{const _0x5abce=_0x1747b1[_0x2d574e(0x2bc)](_0x227df4=>{const _0x3be59b=_0x2d574e,_0x3dd5e7=_0x227df4[_0x3be59b(0x238)]?.[_0x3be59b(0x2a2)](_0x4b2e75=>_0x4b2e75[_0x3be59b(0x333)]===_0x3be59b(0x29c)),_0x157c0e=_0x3dd5e7?a42_0x24c450[_0x3be59b(0x1d1)](_0x3be59b(0x337)):'';return _0x3be59b(0x339)+_0x227df4[_0x3be59b(0x29b)]+_0x157c0e;});await writeOutput(_0x5abce[_0x2d574e(0x27f)]('\x0a'),_0x1670a4[_0x2d574e(0x324)],_0x2d574e(0x327));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x305);['description']=a42_0x1a014a(0x2f0);async[a42_0x1a014a(0x1f7)](_0x46d955){const _0x3b6b01=a42_0x1a014a,{options:_0x35bbb0,args:_0x50cf36,tdx:_0x100a3d}=_0x46d955,_0x10f99a=this[_0x3b6b01(0x304)](_0x50cf36,_0x35bbb0);_0x35bbb0[_0x3b6b01(0x2d3)]&&_0x10f99a&&console[_0x3b6b01(0x2ef)]('Project\x20filter:\x20'+_0x10f99a);const _0x2428a5=await withSpinner(_0x3b6b01(0x2f9),()=>_0x100a3d['workflow'][_0x3b6b01(0x2ee)](_0x10f99a,{'limit':_0x35bbb0['limit']}),{'verbose':_0x35bbb0[_0x3b6b01(0x2d3)]});let _0x3a3d2c=_0x2428a5[_0x3b6b01(0x2bd)];_0x3a3d2c[_0x3b6b01(0x1de)]((_0x4dd99f,_0x251c35)=>{const _0x38d014=_0x3b6b01,_0x5508a3=_0x4dd99f[_0x38d014(0x29b)][_0x38d014(0x264)](_0x251c35['name']);if(_0x5508a3!==0x0)return _0x5508a3;return(_0x4dd99f['project']?.[_0x38d014(0x29b)]||'')[_0x38d014(0x264)](_0x251c35[_0x38d014(0x31c)]?.[_0x38d014(0x29b)]||'');});const _0x505494=_0x35bbb0[_0x3b6b01(0x2ab)]||0x64,_0x513904=_0x3a3d2c['length']>=_0x505494?a42_0x24c450[_0x3b6b01(0x1d1)](_0x3b6b01(0x351)):'';console['error'](_0x3b6b01(0x1ec)+_0x3a3d2c[_0x3b6b01(0x2ea)]+_0x3b6b01(0x227)+(_0x3a3d2c[_0x3b6b01(0x2ea)]!==0x1?'s':'')+_0x513904);if(_0x35bbb0['format']===_0x3b6b01(0x1fb)||_0x35bbb0[_0x3b6b01(0x1ed)]==='jsonl'||_0x35bbb0[_0x3b6b01(0x1ed)]===_0x3b6b01(0x325))await handleSDKOutput(_0x3a3d2c,_0x35bbb0);else{if(_0x3a3d2c[_0x3b6b01(0x2ea)]===0x0)_0x10f99a?console[_0x3b6b01(0x24e)](_0x3b6b01(0x27d)+_0x10f99a):console[_0x3b6b01(0x24e)](_0x3b6b01(0x2f7));else{const _0x387267=_0x35bbb0['site'],_0x2045e5=_0x3a3d2c[_0x3b6b01(0x2bc)](_0x32db17=>{const _0x380fde=_0x3b6b01,_0x12d600=a42_0x24c450['dim']('#'+_0x32db17['id']),_0x162346=hyperlink(_0x12d600,getWorkflowUrl(_0x387267,_0x32db17['id'])),_0x1759b5=_0x32db17[_0x380fde(0x31c)]?.[_0x380fde(0x29b)]?a42_0x24c450[_0x380fde(0x1d1)]('\x20('+_0x32db17[_0x380fde(0x31c)][_0x380fde(0x29b)]+')'):'';return _0x380fde(0x2a5)+_0x162346+'\x20'+_0x32db17[_0x380fde(0x29b)]+_0x1759b5;});await writeOutput(_0x2045e5['join']('\x0a'),_0x35bbb0['output'],_0x3b6b01(0x327));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x1dd);['description']=a42_0x1a014a(0x34b);async[a42_0x1a014a(0x1f7)](_0x458824){const _0x17fc28=a42_0x1a014a,{options:_0x14cb94,args:_0x56cf86,tdx:_0x17bdde}=_0x458824,_0x3e11a7=this[_0x17fc28(0x228)](_0x56cf86,_0x14cb94);if(!_0x3e11a7)return 0x1;const {projectName:_0x2d19b6,workflowName:_0x36e718}=_0x3e11a7;if(_0x14cb94[_0x17fc28(0x2d3)]){if(_0x2d19b6&&_0x36e718)console[_0x17fc28(0x2ef)]('Filter:\x20'+_0x2d19b6+'.'+_0x36e718);else _0x2d19b6&&console['error'](_0x17fc28(0x1ef)+_0x2d19b6);const _0x470223=_0x14cb94[_0x17fc28(0x2e5)];_0x470223&&console[_0x17fc28(0x2ef)]('Status:\x20'+_0x470223);}let _0x3e311b=0x28;if(process['stdout']['isTTY']&&!_0x14cb94['output']&&!_0x14cb94[_0x17fc28(0x1ed)]){const _0x34b3d7=process[_0x17fc28(0x1f4)]['rows']||0x28;_0x3e311b=Math[_0x17fc28(0x358)](0x14,Math[_0x17fc28(0x23d)](_0x34b3d7*0x2/0x3));}const _0x3dd9b2=_0x14cb94[_0x17fc28(0x2ab)]||_0x3e311b,_0x59ac3e=await withSpinner(_0x17fc28(0x2a4),()=>_0x17bdde[_0x17fc28(0x1fd)][_0x17fc28(0x23a)]({'projectName':_0x2d19b6,'workflowName':_0x36e718,'status':_0x14cb94[_0x17fc28(0x2e5)],'fromTime':_0x14cb94[_0x17fc28(0x259)],'toTime':_0x14cb94['to'],'limit':_0x3dd9b2}),{'verbose':_0x14cb94[_0x17fc28(0x2d3)]}),_0x2b3e3a=_0x59ac3e[_0x17fc28(0x2bd)];_0x2b3e3a['sort']((_0x5f05f4,_0x49b4da)=>{const _0x1e4dd4=_0x5f05f4['sessionTime']||'',_0x20d2e4=_0x49b4da['sessionTime']||'';return _0x20d2e4['localeCompare'](_0x1e4dd4);});_0x2b3e3a[_0x17fc28(0x2ea)]>=_0x3dd9b2?console[_0x17fc28(0x2ef)]('✔\x20Showing\x20'+_0x2b3e3a[_0x17fc28(0x2ea)]+_0x17fc28(0x313)+a42_0x24c450[_0x17fc28(0x1d1)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x17fc28(0x2ef)](_0x17fc28(0x1ec)+_0x2b3e3a[_0x17fc28(0x2ea)]+_0x17fc28(0x1d3)+(_0x2b3e3a[_0x17fc28(0x2ea)]!==0x1?'s':''));if(_0x14cb94[_0x17fc28(0x1ed)]===_0x17fc28(0x1fb)||_0x14cb94[_0x17fc28(0x1ed)]===_0x17fc28(0x24f)||_0x14cb94[_0x17fc28(0x1ed)]===_0x17fc28(0x325))await handleSDKOutput(_0x2b3e3a,_0x14cb94);else{if(!process[_0x17fc28(0x1f4)][_0x17fc28(0x277)]||_0x14cb94[_0x17fc28(0x324)]){if(_0x2b3e3a[_0x17fc28(0x2ea)]===0x0){if(_0x2d19b6&&_0x36e718)console[_0x17fc28(0x24e)]('No\x20sessions\x20found\x20for:\x20'+_0x2d19b6+'.'+_0x36e718);else _0x2d19b6?console[_0x17fc28(0x24e)](_0x17fc28(0x20a)+_0x2d19b6):console['log'](_0x17fc28(0x220));}else{const _0x598f05=_0x14cb94[_0x17fc28(0x1e4)],_0x18a05a=this[_0x17fc28(0x319)](_0x2b3e3a,_0x598f05);_0x14cb94[_0x17fc28(0x324)]?await writeOutput(_0x18a05a,_0x14cb94['output'],_0x17fc28(0x327)):console['log'](_0x18a05a);}!_0x2d19b6&&(console[_0x17fc28(0x2ef)](''),console[_0x17fc28(0x2ef)](a42_0x24c450['dim'](_0x17fc28(0x31e))),console[_0x17fc28(0x2ef)](a42_0x24c450[_0x17fc28(0x1d1)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0x24c450[_0x17fc28(0x1d1)](_0x17fc28(0x2ba))));}else{if(_0x2b3e3a[_0x17fc28(0x2ea)]===0x0){if(_0x2d19b6&&_0x36e718)console['log'](_0x17fc28(0x335)+_0x2d19b6+'.'+_0x36e718);else _0x2d19b6?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x2d19b6):console[_0x17fc28(0x24e)](_0x17fc28(0x220));}else await this[_0x17fc28(0x21a)](_0x2b3e3a,_0x458824,_0x2d19b6);}}return 0x0;}[a42_0x1a014a(0x319)](_0x576bec,_0x3240d8){const _0x3b4a97=a42_0x1a014a,_0xeb41bd=[],_0x45c577=new Map();let _0x3449b2=Infinity,_0x9da5cf=-Infinity;for(const _0x9d3b02 of _0x576bec){if(_0x9d3b02[_0x3b4a97(0x1c4)]?.[_0x3b4a97(0x2e8)]){const _0x40506e=new Date(_0x9d3b02[_0x3b4a97(0x1c4)][_0x3b4a97(0x2e8)])[_0x3b4a97(0x336)](),_0x31513d=_0x9d3b02['lastAttempt'][_0x3b4a97(0x2c1)]?new Date(_0x9d3b02[_0x3b4a97(0x1c4)][_0x3b4a97(0x2c1)])['getTime']():Date[_0x3b4a97(0x1f9)](),_0x367fd4=_0x9d3b02[_0x3b4a97(0x31c)]?.[_0x3b4a97(0x29b)]||_0x3b4a97(0x202);!_0x45c577['has'](_0x367fd4)&&_0x45c577[_0x3b4a97(0x31a)](_0x367fd4,[]),_0x45c577[_0x3b4a97(0x28a)](_0x367fd4)['push']({'session':_0x9d3b02,'startTime':_0x40506e,'endTime':_0x31513d,'duration':_0x31513d-_0x40506e}),_0x3449b2=Math[_0x3b4a97(0x243)](_0x3449b2,_0x40506e),_0x9da5cf=Math[_0x3b4a97(0x358)](_0x9da5cf,_0x31513d);}}if(_0x45c577[_0x3b4a97(0x318)]===0x0)return _0x3b4a97(0x2f1);const _0x421195=process['stdout']['columns']||0x78,_0xfc035=0x1e,_0x460228=0x32,_0x188b38=0x4,_0x1cbe2d=Math[_0x3b4a97(0x243)](_0x460228,Math[_0x3b4a97(0x358)](_0xfc035,Math[_0x3b4a97(0x23d)](_0x421195*0.3))),_0x2d1dac=_0x421195-_0x1cbe2d-TIMELINE_CONFIG[_0x3b4a97(0x26f)]-0x3-_0x188b38,_0x45074a=_0x9da5cf-_0x3449b2,_0x413fb3=_0x45074a/_0x1cbe2d,_0x4d607a=renderTimeAxis({'startTime':_0x3449b2,'endTime':_0x9da5cf,'durationMs':_0x45074a,'msPerChar':_0x413fb3},_0x1cbe2d),_0x7b8e60=[];for(const _0x4ebe8f of _0x45c577['values']()){_0x7b8e60[_0x3b4a97(0x2e4)](..._0x4ebe8f);}_0x7b8e60['sort']((_0x5a24f4,_0x1f36f4)=>_0x1f36f4[_0x3b4a97(0x34c)]-_0x5a24f4[_0x3b4a97(0x34c)]);const _0x32cca0=new Date(_0x3449b2),_0x28269e=formatDate(_0x32cca0),_0x4f1e63=_0x188b38+TIMELINE_CONFIG[_0x3b4a97(0x292)]+TIMELINE_CONFIG[_0x3b4a97(0x296)]+_0x2d1dac,_0x4472c1='\x20'[_0x3b4a97(0x25a)](_0x4f1e63-_0x28269e[_0x3b4a97(0x2ea)]),_0x550f98=_0x4472c1+a42_0x24c450[_0x3b4a97(0x1d1)](_0x28269e)+'\x20'+_0x4d607a;_0xeb41bd[_0x3b4a97(0x2e4)](_0x550f98);const _0x5cce20=0x16;let _0x32e270=0x0;for(const _0x3c54f2 of _0x7b8e60){const _0xf97daf=_0x3c54f2[_0x3b4a97(0x2fb)][_0x3b4a97(0x31c)]?.[_0x3b4a97(0x29b)]||'?',_0x574820=Math[_0x3b4a97(0x243)](stringWidth(_0xf97daf),_0x5cce20);_0x32e270=Math[_0x3b4a97(0x358)](_0x32e270,_0x574820);}for(const _0x15cfae of _0x7b8e60){const {session:_0x2f979a,startTime:_0x44ff75,endTime:_0x45a64e,duration:_0x30d6b9}=_0x15cfae,_0x5be277=_0x2f979a[_0x3b4a97(0x31c)]?.['id'],_0x367f8c=_0x2f979a['id'],_0x46d231=_0x2f979a[_0x3b4a97(0x31c)]?.[_0x3b4a97(0x29b)]||'?',_0x288372=_0x2f979a[_0x3b4a97(0x1fd)]?.[_0x3b4a97(0x29b)]||'?';let _0x922173,_0x3cae7d;if(_0x2f979a[_0x3b4a97(0x1c4)]){const _0x1d73d6=_0x2f979a[_0x3b4a97(0x1c4)];!_0x1d73d6[_0x3b4a97(0x28b)]?(_0x922173=_0x1d73d6[_0x3b4a97(0x213)]?'🛑':'🔄',_0x3cae7d=_0x1d73d6['cancelRequested']?a42_0x24c450['yellow']:a42_0x24c450[_0x3b4a97(0x263)]):(_0x922173=_0x1d73d6[_0x3b4a97(0x2bf)]?'✅':'❌',_0x3cae7d=_0x1d73d6['success']?a42_0x24c450[_0x3b4a97(0x1cf)]:a42_0x24c450[_0x3b4a97(0x22d)]);}else _0x922173='⏳',_0x3cae7d=a42_0x24c450[_0x3b4a97(0x1d1)];const _0x2d39a7='#'+_0x367f8c,_0x5e882c=_0x5be277?hyperlink(_0x2d39a7,getWorkflowSessionUrl(_0x3240d8,_0x5be277,_0x367f8c)):_0x2d39a7;let _0x5c6ebb=_0x46d231;stringWidth(_0x46d231)>_0x5cce20&&(_0x5c6ebb=_0x46d231[_0x3b4a97(0x1f5)](0x0,_0x5cce20-0x1)+'…');const _0x5c72f9=a42_0x24c450[_0x3b4a97(0x1d1)](_0x5c6ebb),_0x5c26a6=stringWidth(_0x5c6ebb),_0x23419f='\x20'[_0x3b4a97(0x25a)](_0x32e270-stringWidth(_0x5c6ebb)+0x2),_0x338354='('+formatElapsed(_0x30d6b9)+')',_0x3ccc19=stringWidth(_0x338354),_0x3f473b=stringWidth(_0x2d39a7),_0x1b2ee1=_0x3f473b+0x1+_0x5c26a6+_0x23419f['length'],_0x1b387a=_0x2d1dac-_0x1b2ee1-_0x3ccc19-0x1-0x8;let _0x526b0d=_0x288372;stringWidth(_0x526b0d)>_0x1b387a&&(_0x526b0d=_0x526b0d[_0x3b4a97(0x1f5)](0x0,_0x1b387a-0x1)+'…');const _0xfb3ea1=_0x5e882c+'\x20'+_0x5c72f9+_0x23419f+_0x526b0d,_0x11edf0=stringWidth(_0xfb3ea1),_0x3da60e=_0x2d1dac-_0x11edf0-_0x3ccc19,_0x1a1944=_0xfb3ea1+'\x20'['repeat'](Math['max'](0x1,_0x3da60e))+a42_0x24c450[_0x3b4a97(0x1d1)](_0x338354),_0x329f1d=Math[_0x3b4a97(0x23d)]((_0x44ff75-_0x3449b2)/_0x413fb3),_0x3b8558=Math[_0x3b4a97(0x23d)]((_0x45a64e-_0x3449b2)/_0x413fb3),_0x19c621=Math['max'](_0x329f1d+0x1,_0x3b8558),_0x2fc8f3=new Array(_0x1cbe2d)[_0x3b4a97(0x200)]('\x20');for(let _0x108b82=_0x329f1d;_0x108b82<Math[_0x3b4a97(0x243)](_0x19c621,_0x1cbe2d);_0x108b82++){_0x2fc8f3[_0x108b82]='─';}const _0x4e1a4c=_0x2fc8f3[_0x3b4a97(0x2bc)](_0x538da9=>_0x538da9==='\x20'?'\x20':_0x3cae7d(_0x538da9))['join']('');_0xeb41bd[_0x3b4a97(0x2e4)](_0x922173+'\x20'+_0x1a1944+'│'+_0x4e1a4c+'│');}return _0xeb41bd[_0x3b4a97(0x27f)]('\x0a');}async['navigateSessionsInteractive'](_0x4756bf,_0x12ec0b,_0x390510){const _0x23585d=a42_0x1a014a,{options:_0x17e31b,tdx:_0x28d065}=_0x12ec0b,_0x44744f=_0x17e31b[_0x23585d(0x1e4)],{timelineRows:_0x4aa239,timeAxisHeader:_0x15322c}=this[_0x23585d(0x273)](_0x4756bf,_0x44744f),_0x3968f9=_0x4aa239[_0x23585d(0x2e9)](_0x5710a9=>_0x5710a9[_0x23585d(0x356)]);if(_0x3968f9[_0x23585d(0x2ea)]===0x0){const _0x10ebd3=this[_0x23585d(0x319)](_0x4756bf,_0x44744f);console[_0x23585d(0x24e)](_0x10ebd3);!_0x390510&&(console['error'](''),console[_0x23585d(0x2ef)](a42_0x24c450[_0x23585d(0x1d1)](_0x23585d(0x31e))),console[_0x23585d(0x2ef)](a42_0x24c450[_0x23585d(0x1d1)](_0x23585d(0x308))+'or'+a42_0x24c450[_0x23585d(0x1d1)](_0x23585d(0x2ba))));return;}_0x15322c&&console['log'](_0x15322c);const _0x5956ff=_0x4aa239[_0x23585d(0x2e9)](_0x247d27=>_0x247d27[_0x23585d(0x356)])[_0x23585d(0x2bc)](_0x1b7cbd=>({'title':_0x1b7cbd[_0x23585d(0x23c)],'value':_0x1b7cbd[_0x23585d(0x356)]})),_0x787522=process['stdout'][_0x23585d(0x246)]||0x3c,_0x55b77e=Math[_0x23585d(0x358)](0x28,Math[_0x23585d(0x23d)](_0x787522*0x2/0x3)),_0x5837c0=await a42_0x2a8463({'type':_0x23585d(0x22a),'name':_0x23585d(0x356),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x5956ff,'initial':-0x1,'limit':_0x55b77e,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x356476,_0x4e1503)=>{const _0x1a420e=_0x23585d;if(!_0x356476)return Promise['resolve'](_0x4e1503);const _0x5b4c=_0x4e1503[_0x1a420e(0x2e9)](_0x2c27d4=>{const _0x1180c9=_0x1a420e,_0xbfa418=_0x2c27d4;return _0xbfa418[_0x1180c9(0x2ae)]['toLowerCase']()[_0x1180c9(0x275)](_0x356476['toLowerCase']());});return Promise['resolve'](_0x5b4c);}}),_0x5ea16d=()=>{const _0x46d6f2=_0x23585d;process[_0x46d6f2(0x1f4)][_0x46d6f2(0x1f8)](_0x46d6f2(0x26a)),process['stdout'][_0x46d6f2(0x1f8)](_0x46d6f2(0x26a)),process[_0x46d6f2(0x1f4)][_0x46d6f2(0x1f8)](_0x46d6f2(0x26a));},_0x9d5484=_0x5837c0&&_0x5837c0[_0x23585d(0x356)]&&_0x5837c0['attemptId']!==null&&_0x5837c0[_0x23585d(0x356)][_0x23585d(0x2f8)]()!=='';if(!_0x9d5484){_0x5ea16d(),console[_0x23585d(0x24e)](a42_0x24c450[_0x23585d(0x1d1)](_0x23585d(0x1d6)));return;}_0x5ea16d();const _0x36c17e=_0x4756bf[_0x23585d(0x368)](_0x597836=>_0x597836[_0x23585d(0x1c4)]?.['id']===_0x5837c0[_0x23585d(0x356)]);if(_0x36c17e){const _0x7d2507=_0x36c17e['project']?.[_0x23585d(0x29b)]||'?',_0x31cefc=_0x36c17e[_0x23585d(0x1fd)]?.['name']||'?';console['log'](_0x23585d(0x1cb)+a42_0x24c450[_0x23585d(0x1d1)](_0x7d2507)+_0x23585d(0x2fc)+a42_0x24c450[_0x23585d(0x1d1)](_0x31cefc));}const _0x13477f=new WorkflowTimelineCommand();await _0x13477f[_0x23585d(0x1f7)]({'args':[],'options':{..._0x17e31b,'attemptId':_0x5837c0[_0x23585d(0x356)]},'tdx':_0x28d065});}[a42_0x1a014a(0x273)](_0x3470c1,_0x5768a8){const _0x225f59=a42_0x1a014a,_0x5b80b3=new Map();for(const _0x3ebb61 of _0x3470c1){_0x3ebb61['id']&&_0x3ebb61['lastAttempt']?.['id']&&_0x5b80b3[_0x225f59(0x31a)](_0x3ebb61['id'],_0x3ebb61[_0x225f59(0x1c4)]['id']);}const _0x5c1ffb=[];let _0x541ec7='';const _0x5d3289=this[_0x225f59(0x319)](_0x3470c1,_0x5768a8),_0x3b75cf=_0x5d3289[_0x225f59(0x241)]('\x0a');for(const _0x25eca9 of _0x3b75cf){if(_0x25eca9[_0x225f59(0x1d5)](_0x225f59(0x23b))||_0x25eca9['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x541ec7=_0x25eca9;else{if(_0x25eca9[_0x225f59(0x307)](/^[✅❌🔄🛑⏳]/)){const _0x528981=_0x25eca9['match'](/#(\d+)/),_0x4b17d3=_0x528981?_0x528981[0x1]:null,_0x56ca4c=_0x4b17d3?_0x5b80b3['get'](_0x4b17d3)||null:null,_0x2e1479=_0x3470c1[_0x225f59(0x368)](_0x48f176=>_0x48f176['id']===_0x4b17d3),_0x9ef593=_0x2e1479?.[_0x225f59(0x31c)]?.[_0x225f59(0x29b)]||'';_0x5c1ffb[_0x225f59(0x2e4)]({'displayLine':_0x25eca9,'attemptId':_0x56ca4c,'projectName':_0x9ef593});}}}return{'timelineRows':_0x5c1ffb,'timeAxisHeader':_0x541ec7};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x229);[a42_0x1a014a(0x268)]=a42_0x1a014a(0x340);async[a42_0x1a014a(0x1f7)](_0x236381){const _0x3ef0d0=a42_0x1a014a,{options:_0x59d5c6,args:_0x18a081,tdx:_0xb5544a}=_0x236381,_0x25a1f3=this[_0x3ef0d0(0x228)](_0x18a081,_0x59d5c6);if(!_0x25a1f3)return 0x1;const {projectName:_0x2676e2,workflowName:_0x585c28}=_0x25a1f3,_0x2938f4=_0x59d5c6[_0x3ef0d0(0x330)];if(_0x59d5c6[_0x3ef0d0(0x2d3)]){if(_0x2676e2&&_0x585c28)console[_0x3ef0d0(0x2ef)]('Filter:\x20'+_0x2676e2+'.'+_0x585c28);else _0x2676e2&&console[_0x3ef0d0(0x2ef)]('Filter:\x20project='+_0x2676e2);_0x2938f4&&console[_0x3ef0d0(0x2ef)](_0x3ef0d0(0x271));}const _0x106ab9=await withSpinner(_0x3ef0d0(0x2d2),()=>_0xb5544a[_0x3ef0d0(0x1fd)]['attempts']({'projectName':_0x2676e2,'workflowName':_0x585c28,'includeRetried':_0x2938f4,'limit':_0x59d5c6[_0x3ef0d0(0x2ab)]}),{'verbose':_0x59d5c6[_0x3ef0d0(0x2d3)]}),_0x80f409=_0x106ab9['data'],_0x488177=_0x59d5c6['limit']||0x64,_0x2aec08=_0x80f409[_0x3ef0d0(0x2ea)]>=_0x488177?a42_0x24c450[_0x3ef0d0(0x1d1)](_0x3ef0d0(0x351)):'';console[_0x3ef0d0(0x2ef)](_0x3ef0d0(0x1ec)+_0x80f409['length']+'\x20attempt'+(_0x80f409[_0x3ef0d0(0x2ea)]!==0x1?'s':'')+_0x2aec08);if(_0x59d5c6[_0x3ef0d0(0x1ed)]===_0x3ef0d0(0x1fb)||_0x59d5c6[_0x3ef0d0(0x1ed)]===_0x3ef0d0(0x24f)||_0x59d5c6[_0x3ef0d0(0x1ed)]==='table')await handleSDKOutput(_0x80f409,_0x59d5c6);else{if(_0x80f409[_0x3ef0d0(0x2ea)]===0x0){if(_0x2676e2&&_0x585c28)console[_0x3ef0d0(0x24e)](_0x3ef0d0(0x293)+_0x2676e2+'.'+_0x585c28);else _0x2676e2?console[_0x3ef0d0(0x24e)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x2676e2):console[_0x3ef0d0(0x24e)](_0x3ef0d0(0x270));}else{const _0x3454b0=_0x59d5c6[_0x3ef0d0(0x1e4)],_0x7cc63b=_0x80f409[_0x3ef0d0(0x2bc)](_0x4dd9fc=>{const _0x2ad48e=_0x3ef0d0,_0xbd1866=a42_0x24c450['dim']('#'+_0x4dd9fc['id']),_0x2337a1=_0x4dd9fc[_0x2ad48e(0x31c)]?.['id'],_0x420e63=_0x4dd9fc['session_id']||_0x4dd9fc[_0x2ad48e(0x2e3)],_0x4d024b=_0x2337a1&&_0x420e63?hyperlink(_0xbd1866,getWorkflowAttemptUrl(_0x3454b0,_0x2337a1,_0x420e63,_0x4dd9fc['id'])):_0xbd1866,{icon:_0x15a4c5,text:_0x527a39}=getAttemptStatusDisplay(_0x4dd9fc),_0x25a2a2=(_0x4dd9fc['project']?.[_0x2ad48e(0x29b)]||'?')+'.'+(_0x4dd9fc[_0x2ad48e(0x1fd)]?.['name']||'?'),_0x2235a5=_0x4dd9fc['sessionTime']?a42_0x24c450[_0x2ad48e(0x1d1)](_0x4dd9fc[_0x2ad48e(0x1e5)]):'';return(_0x4d024b+'\x20'+_0x15a4c5+(_0x527a39?'\x20'+_0x527a39:'')+'\x20'+_0x25a2a2+'\x20'+_0x2235a5)[_0x2ad48e(0x266)]();});await writeOutput(_0x7cc63b['join']('\x0a'),_0x59d5c6[_0x3ef0d0(0x324)],_0x3ef0d0(0x327));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x1a014a(0x29b)]='workflow:attempt';[a42_0x1a014a(0x268)]=a42_0x1a014a(0x27a);async['execute'](_0x156c18){const _0x2602c7=a42_0x1a014a,{options:_0x25b160,args:_0x10c0fb,tdx:_0x4b0bc8}=_0x156c18,_0x678931=_0x10c0fb[0x0];if(!_0x678931)return console[_0x2602c7(0x2ef)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x25b160['verbose']&&console[_0x2602c7(0x2ef)](_0x2602c7(0x341)+_0x678931);const _0x4b43e1=await withSpinner('Getting\x20attempt\x20details...',()=>_0x4b0bc8['workflow'][_0x2602c7(0x345)](_0x678931),{'verbose':_0x25b160[_0x2602c7(0x2d3)]}),_0xa50dad=_0x4b43e1['data'];let _0x36f38e;!_0xa50dad[_0x2602c7(0x28b)]?_0x36f38e=_0xa50dad['cancelRequested']?_0x2602c7(0x331):'running':_0x36f38e=_0xa50dad[_0x2602c7(0x2bf)]?_0x2602c7(0x2bf):'error';let _0x1f065b;if(_0xa50dad[_0x2602c7(0x2e8)]&&_0xa50dad[_0x2602c7(0x2c1)]){const _0x4c62ac=new Date(_0xa50dad['createdAt'])[_0x2602c7(0x336)](),_0x5eb05e=new Date(_0xa50dad[_0x2602c7(0x2c1)])[_0x2602c7(0x336)]();_0x1f065b=Math[_0x2602c7(0x326)]((_0x5eb05e-_0x4c62ac)/0x3e8);}const _0x9ea6bc={'attempt_id':_0xa50dad['id'],'status':_0x36f38e,..._0xa50dad[_0x2602c7(0x1db)]!==undefined&&{'index':_0xa50dad[_0x2602c7(0x1db)]},..._0xa50dad[_0x2602c7(0x31c)]&&{'project':_0xa50dad[_0x2602c7(0x31c)]['name']},..._0xa50dad['workflow']&&{'workflow':_0xa50dad['workflow']['name']},..._0xa50dad[_0x2602c7(0x2e3)]&&{'session_id':_0xa50dad[_0x2602c7(0x2e3)]},..._0xa50dad[_0x2602c7(0x1e5)]&&{'session_time':_0xa50dad['sessionTime']},..._0xa50dad['retryAttemptName']&&{'retry_attempt':_0xa50dad['retryAttemptName']},..._0x1f065b!==undefined&&{'duration_sec':_0x1f065b},..._0xa50dad[_0x2602c7(0x2e8)]&&{'created_at':_0xa50dad[_0x2602c7(0x2e8)]},..._0xa50dad[_0x2602c7(0x2c1)]&&{'finished_at':_0xa50dad[_0x2602c7(0x2c1)]},...Object[_0x2602c7(0x298)](_0xa50dad[_0x2602c7(0x28e)])[_0x2602c7(0x2ea)]>0x0&&{'params':_0xa50dad['params']}};return await handleSingleObjectOutput(_0x9ea6bc,_0x25b160),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a42_0x1a014a(0x240);[a42_0x1a014a(0x268)]='Show\x20tasks\x20for\x20an\x20attempt';async[a42_0x1a014a(0x1f7)](_0x40039c){const _0x5aacb1=a42_0x1a014a,{options:_0x5dc91d,args:_0x2d82f2,tdx:_0x7022fe}=_0x40039c,_0x57d33e=_0x2d82f2[0x0];if(!_0x57d33e)return console[_0x5aacb1(0x2ef)](_0x5aacb1(0x32a)),0x1;const _0x5c545e=_0x5dc91d['includeSubtasks'];_0x5dc91d[_0x5aacb1(0x2d3)]&&(console[_0x5aacb1(0x2ef)](_0x5aacb1(0x341)+_0x57d33e),_0x5c545e&&console[_0x5aacb1(0x2ef)]('Including\x20subtasks:\x20yes'));const _0x4c549e=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x7022fe[_0x5aacb1(0x1fd)][_0x5aacb1(0x2af)](_0x57d33e,_0x5c545e||![]),{'verbose':_0x5dc91d[_0x5aacb1(0x2d3)]}),_0x23e0ec=_0x4c549e['data'];return console[_0x5aacb1(0x2ef)](_0x5aacb1(0x1ec)+_0x23e0ec[_0x5aacb1(0x2ea)]+'\x20task'+(_0x23e0ec[_0x5aacb1(0x2ea)]!==0x1?'s':'')),await handleSDKOutput(_0x23e0ec,_0x5dc91d),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x1a014a(0x29b)]='workflow:logs';[a42_0x1a014a(0x268)]=a42_0x1a014a(0x33b);async['execute'](_0x51aae9){const _0x5eee04=a42_0x1a014a,{options:_0x47c5ab,args:_0x5c2a5c,tdx:_0x257f77}=_0x51aae9,_0x3f7448=_0x5c2a5c[0x0];let _0x1491e1=_0x5c2a5c[0x1];if(!_0x3f7448)return console[_0x5eee04(0x2ef)](_0x5eee04(0x32a)),0x1;_0x47c5ab[_0x5eee04(0x2d3)]&&(console[_0x5eee04(0x2ef)](_0x5eee04(0x341)+_0x3f7448),_0x1491e1&&console[_0x5eee04(0x2ef)](_0x5eee04(0x251)+_0x1491e1));const _0x381191=await withSpinner(_0x5eee04(0x1e9),()=>_0x257f77[_0x5eee04(0x1fd)][_0x5eee04(0x237)](_0x3f7448,_0x1491e1),{'verbose':_0x47c5ab[_0x5eee04(0x2d3)]}),_0x451111=_0x381191['data'];if(_0x451111[_0x5eee04(0x2ea)]===0x0)return console['error'](_0x5eee04(0x32e)),0x0;if(!_0x1491e1&&(_0x47c5ab[_0x5eee04(0x1fb)]||_0x47c5ab[_0x5eee04(0x1ed)]))return await handleSDKOutput(_0x451111,_0x47c5ab),0x0;if(!_0x1491e1){const _0x3ec6b2=_0x451111[_0x5eee04(0x2bc)](_0x460dda=>({'title':_0x460dda['taskName']+'\x20('+formatBytes(_0x460dda[_0x5eee04(0x203)])+')','value':_0x460dda['taskName']})),_0x558fa3=await a42_0x2a8463({'type':'select','name':'task','message':_0x5eee04(0x207),'choices':_0x3ec6b2});if(!_0x558fa3[_0x5eee04(0x256)])return console[_0x5eee04(0x2ef)](_0x5eee04(0x1d6)),0x0;_0x1491e1=_0x558fa3[_0x5eee04(0x256)];}const _0x1cd636=await withSpinner(_0x5eee04(0x314),()=>_0x257f77[_0x5eee04(0x1fd)][_0x5eee04(0x32c)](_0x3f7448,_0x1491e1),{'verbose':_0x47c5ab[_0x5eee04(0x2d3)]}),_0x5db8ef=_0x1cd636[_0x5eee04(0x2bd)];return _0x5db8ef?console[_0x5eee04(0x24e)](_0x5db8ef):console[_0x5eee04(0x2ef)](_0x5eee04(0x303)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x272);['description']=a42_0x1a014a(0x248);async[a42_0x1a014a(0x1f7)](_0x3ed8a5){const _0x3ff540=a42_0x1a014a,{options:_0x486287,args:_0x874458,tdx:_0x4fe439}=_0x3ed8a5,_0x247968=_0x874458[0x0];if(!_0x247968)return console[_0x3ff540(0x2ef)](_0x3ff540(0x32a)),0x1;const _0x419bfd=_0x486287[_0x3ff540(0x35b)];_0x486287['verbose']&&(console[_0x3ff540(0x2ef)]('Attempt\x20ID:\x20'+_0x247968),_0x419bfd&&console[_0x3ff540(0x2ef)]('Reason:\x20'+_0x419bfd));if(!_0x486287['yes']){const _0x25378b=await confirmKey(_0x3ff540(0x2a3)+_0x247968+'?');if(!_0x25378b)return console['error']('Cancelled'),0x0;}const _0x5e20cd=await withSpinner(_0x3ff540(0x2a8),()=>_0x4fe439[_0x3ff540(0x1fd)][_0x3ff540(0x2ff)](_0x247968,_0x419bfd),{'verbose':_0x486287[_0x3ff540(0x2d3)]}),_0x396179=_0x5e20cd[_0x3ff540(0x2bd)];return console[_0x3ff540(0x2ef)]('✔\x20'+_0x396179),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a42_0x1a014a(0x366);[a42_0x1a014a(0x268)]=a42_0x1a014a(0x1f0);async[a42_0x1a014a(0x1f7)](_0x286c68){const _0x4e47bb=a42_0x1a014a,{options:_0x5c1f3d,args:_0x271a48,tdx:_0x236275}=_0x286c68,_0x790493=_0x271a48[0x0];if(!_0x790493)return console[_0x4e47bb(0x2ef)](_0x4e47bb(0x212)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x48bbb9=![],_0xad5a5=_0x790493;if(_0x790493[_0x4e47bb(0x1d5)](_0x4e47bb(0x250)))_0x48bbb9=!![],_0xad5a5=_0x790493[_0x4e47bb(0x290)](0x8);else{if(_0x790493[_0x4e47bb(0x1d5)](_0x4e47bb(0x23e)))_0x48bbb9=![],_0xad5a5=_0x790493[_0x4e47bb(0x290)](0x8);else return console['error']('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error'](_0x4e47bb(0x329)),0x1;}const _0x4fa0de=_0x5c1f3d[_0x4e47bb(0x31f)],_0x39ffd7=_0x5c1f3d['resumeFrom'],_0x1d3a4f=_0x5c1f3d[_0x4e47bb(0x28e)],_0x529846=_0x5c1f3d['force'];_0x5c1f3d['verbose']&&(console[_0x4e47bb(0x2ef)](_0x4e47bb(0x349)+(_0x48bbb9?_0x4e47bb(0x2fb):'attempt')+'\x20'+_0xad5a5),_0x4fa0de&&console[_0x4e47bb(0x2ef)]('From\x20task:\x20'+_0x4fa0de),_0x39ffd7&&console[_0x4e47bb(0x2ef)]('Resume\x20from:\x20'+_0x39ffd7),_0x1d3a4f&&console[_0x4e47bb(0x2ef)](_0x4e47bb(0x2b2)+_0x1d3a4f),_0x529846&&console[_0x4e47bb(0x2ef)](_0x4e47bb(0x346)));let _0x2b1cbe;if(_0x1d3a4f)try{if(_0x1d3a4f[_0x4e47bb(0x1d5)]('@')){const _0x124a64=await import(_0x4e47bb(0x281)),_0x108578=_0x1d3a4f[_0x4e47bb(0x290)](0x1),_0x598ecb=await _0x124a64[_0x4e47bb(0x2fe)](_0x108578,'utf-8');_0x2b1cbe=JSON['parse'](_0x598ecb);}else _0x2b1cbe=JSON[_0x4e47bb(0x1da)](_0x1d3a4f);}catch{return console[_0x4e47bb(0x2ef)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x5c1f3d[_0x4e47bb(0x204)]){const _0x31f850=await confirmKey(_0x4e47bb(0x2fa)+(_0x48bbb9?_0x4e47bb(0x2fb):_0x4e47bb(0x345))+'\x20'+_0xad5a5+'?');if(!_0x31f850)return console[_0x4e47bb(0x2ef)](_0x4e47bb(0x1d6)),0x0;}let _0x5916a5;_0x48bbb9?_0x5916a5=await withSpinner(_0x4e47bb(0x359),()=>_0x236275['workflow'][_0x4e47bb(0x267)](_0xad5a5,{'fromTask':_0x4fa0de,'retryParams':_0x2b1cbe}),{'verbose':_0x5c1f3d['verbose']}):_0x5916a5=await withSpinner(_0x4e47bb(0x2d4),()=>_0x236275[_0x4e47bb(0x1fd)][_0x4e47bb(0x309)](_0xad5a5,{'resumeFrom':_0x39ffd7,'retryParams':_0x2b1cbe,'force':_0x529846}),{'verbose':_0x5c1f3d[_0x4e47bb(0x2d3)]});const _0x415d29=_0x5916a5[_0x4e47bb(0x2bd)];return console['error']('✔\x20Retry\x20started'),console[_0x4e47bb(0x2ef)](_0x4e47bb(0x27b)+_0x415d29[_0x4e47bb(0x356)]),console['error'](_0x4e47bb(0x342)+_0x415d29['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a42_0x1a014a(0x321);['description']=a42_0x1a014a(0x300);async[a42_0x1a014a(0x1f7)](_0x55a7d6){const _0x3df6d6=a42_0x1a014a,{options:_0x2cccf7,args:_0x26de85,tdx:_0x13082a}=_0x55a7d6;let _0x1a3b8a=_0x26de85[0x0];if(!_0x1a3b8a){const _0x18d9a1=this[_0x3df6d6(0x304)]([],_0x2cccf7),_0x57a24e=await withSpinner(_0x3df6d6(0x257),()=>_0x13082a['workflow']['workflows'](_0x18d9a1,{'limit':_0x2cccf7[_0x3df6d6(0x2ab)]}),{'verbose':_0x2cccf7['verbose']}),_0x1a7524=_0x57a24e[_0x3df6d6(0x2bd)];if(_0x1a7524['length']===0x0)return console[_0x3df6d6(0x2ef)]('No\x20workflows\x20found'),!_0x18d9a1&&console[_0x3df6d6(0x2ef)](a42_0x24c450[_0x3df6d6(0x1d1)](_0x3df6d6(0x2e6))),0x1;const _0x4b57cc=_0x1a7524[_0x3df6d6(0x2bc)](_0x529377=>({'title':_0x529377[_0x3df6d6(0x31c)]?.[_0x3df6d6(0x29b)]+'.'+_0x529377[_0x3df6d6(0x29b)],'value':_0x529377['project']?.[_0x3df6d6(0x29b)]+'.'+_0x529377[_0x3df6d6(0x29b)],'description':_0x529377[_0x3df6d6(0x214)]?_0x3df6d6(0x361)+_0x529377[_0x3df6d6(0x214)]:undefined})),_0x434d37=await a42_0x2a8463({'type':_0x3df6d6(0x1c8),'name':_0x3df6d6(0x1fd),'message':_0x3df6d6(0x25c),'choices':_0x4b57cc});if(!_0x434d37[_0x3df6d6(0x1fd)])return 0x1;_0x1a3b8a=_0x434d37['workflow'];}if(!_0x1a3b8a[_0x3df6d6(0x275)]('.')){const _0x146de8=this[_0x3df6d6(0x304)]([],_0x2cccf7);if(_0x146de8)_0x1a3b8a=_0x146de8+'.'+_0x1a3b8a;else return console[_0x3df6d6(0x2ef)](a42_0x24c450['red'](_0x3df6d6(0x24a)),_0x3df6d6(0x2d8)),console[_0x3df6d6(0x2ef)](a42_0x24c450[_0x3df6d6(0x1d1)](_0x3df6d6(0x2e6))),0x1;}const _0x5e6c8c=_0x2cccf7['param'],_0x21bd7e=_0x2cccf7[_0x3df6d6(0x1e5)],_0x51912b={};if(_0x5e6c8c&&Array[_0x3df6d6(0x219)](_0x5e6c8c))for(const _0x3f02f4 of _0x5e6c8c){const _0x45e77c=_0x3f02f4['indexOf']('=');if(_0x45e77c===-0x1)return console[_0x3df6d6(0x2ef)](_0x3df6d6(0x355)+_0x3f02f4),console[_0x3df6d6(0x2ef)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x3840d9=_0x3f02f4[_0x3df6d6(0x290)](0x0,_0x45e77c),_0x349cac=_0x3f02f4['substring'](_0x45e77c+0x1);try{_0x51912b[_0x3840d9]=JSON[_0x3df6d6(0x1da)](_0x349cac);}catch{_0x51912b[_0x3840d9]=_0x349cac;}}_0x2cccf7[_0x3df6d6(0x2d3)]&&(console[_0x3df6d6(0x2ef)]('Workflow:\x20'+_0x1a3b8a),Object[_0x3df6d6(0x298)](_0x51912b)[_0x3df6d6(0x2ea)]>0x0&&console['error'](_0x3df6d6(0x1c3)+JSON[_0x3df6d6(0x1f2)](_0x51912b)),_0x21bd7e&&console[_0x3df6d6(0x2ef)](_0x3df6d6(0x2cb)+_0x21bd7e));const _0x582031=await withSpinner(_0x3df6d6(0x295),()=>_0x13082a[_0x3df6d6(0x1fd)][_0x3df6d6(0x332)](_0x1a3b8a,_0x51912b,{'sessionTime':_0x21bd7e}),{'verbose':_0x2cccf7[_0x3df6d6(0x2d3)]}),_0x2af9ee=_0x582031[_0x3df6d6(0x2bd)];console[_0x3df6d6(0x2ef)](_0x3df6d6(0x2c3)),console[_0x3df6d6(0x2ef)]('\x20\x20Attempt\x20ID:\x20'+_0x2af9ee['id']),console['error'](_0x3df6d6(0x342)+_0x2af9ee[_0x3df6d6(0x2e3)]),console[_0x3df6d6(0x2ef)]('\x20\x20Project:\x20'+_0x2af9ee[_0x3df6d6(0x31c)]?.[_0x3df6d6(0x29b)]),console[_0x3df6d6(0x2ef)](_0x3df6d6(0x260)+_0x2af9ee[_0x3df6d6(0x1fd)]?.[_0x3df6d6(0x29b)]);if(_0x2af9ee[_0x3df6d6(0x31c)]?.['id']&&_0x2af9ee[_0x3df6d6(0x2e3)]&&_0x2af9ee['id']){const _0x59eae0=_0x2cccf7['site'],_0x28f78a=getConsoleUrl(_0x59eae0,_0x3df6d6(0x36c)+_0x2af9ee[_0x3df6d6(0x31c)]['id']+'/sessions/'+_0x2af9ee[_0x3df6d6(0x2e3)]+_0x3df6d6(0x299)+_0x2af9ee['id']);console[_0x3df6d6(0x2ef)](_0x3df6d6(0x265)+a42_0x24c450[_0x3df6d6(0x302)](_0x28f78a));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a42_0x1a014a(0x28f);[a42_0x1a014a(0x268)]=a42_0x1a014a(0x22b);async[a42_0x1a014a(0x1f7)](_0x46777a){const _0x3526a6=a42_0x1a014a,{options:_0x1aaf36,args:_0x25b04a,tdx:_0x46fcf9}=_0x46777a,_0x2702ea=_0x25b04a[0x0],_0x447f54=_0x25b04a[0x1]||'.';if(!_0x2702ea)return console['error'](_0x3526a6(0x354)),console['error'](_0x3526a6(0x365)),0x1;const _0x3c6436=_0x1aaf36[_0x3526a6(0x214)];_0x1aaf36[_0x3526a6(0x2d3)]&&(console[_0x3526a6(0x2ef)]('Project:\x20'+_0x2702ea),console[_0x3526a6(0x2ef)](_0x3526a6(0x36e)+_0x447f54),_0x3c6436&&console[_0x3526a6(0x2ef)]('Revision:\x20'+_0x3c6436));const _0x4ea911=await withSpinner(_0x3526a6(0x34a)+_0x2702ea+_0x3526a6(0x2d5),()=>_0x46fcf9[_0x3526a6(0x1fd)]['download'](_0x2702ea,_0x447f54,{'revision':_0x3c6436}),{'verbose':_0x1aaf36[_0x3526a6(0x2d3)]}),_0x2eadf9=_0x4ea911[_0x3526a6(0x2bd)];return console['error'](_0x3526a6(0x258)+_0x2eadf9[_0x3526a6(0x1fa)]),console['error'](_0x3526a6(0x224)+_0x2eadf9[_0x3526a6(0x214)]),console[_0x3526a6(0x2ef)](_0x3526a6(0x1cd)+_0x2eadf9[_0x3526a6(0x236)]),console[_0x3526a6(0x2ef)](_0x3526a6(0x230)+_0x447f54+'/'+_0x2eadf9[_0x3526a6(0x1fa)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]='workflow:upload';[a42_0x1a014a(0x268)]=a42_0x1a014a(0x2aa);async[a42_0x1a014a(0x1f7)](_0x1428a){const _0x2b01=a42_0x1a014a,{options:_0x249c22,args:_0x566fa4,tdx:_0x5e49f9}=_0x1428a;let _0x347512='.',_0x44867d=_0x249c22[_0x2b01(0x29b)];if(_0x566fa4[0x0]){const {promises:_0x51083d}=await import('fs');try{const _0x5ab2c5=await _0x51083d[_0x2b01(0x1e3)](_0x566fa4[0x0]);if(_0x5ab2c5[_0x2b01(0x285)]())_0x347512=_0x566fa4[0x0];else return console[_0x2b01(0x2ef)](_0x2b01(0x1c9)+_0x566fa4[0x0]+_0x2b01(0x1e6)),0x1;}catch{_0x44867d=_0x566fa4[0x0],_0x347512='.';}}const _0x51deb5=_0x249c22[_0x2b01(0x214)],_0x322e69=_0x249c22[_0x2b01(0x360)];_0x249c22['verbose']&&(console[_0x2b01(0x2ef)](_0x2b01(0x209)+_0x347512),_0x44867d&&console['error'](_0x2b01(0x262)+_0x44867d),_0x51deb5&&console['error'](_0x2b01(0x21d)+_0x51deb5),_0x322e69&&console['error']('Validation:\x20skipped'));const _0x221698=await withSpinner(_0x2b01(0x2ce),()=>_0x5e49f9['workflow']['push'](_0x347512,{'projectName':_0x44867d,'revision':_0x51deb5,'skipValidation':_0x322e69}),{'verbose':_0x249c22[_0x2b01(0x2d3)]}),_0x152cea=_0x221698[_0x2b01(0x2bd)];return console[_0x2b01(0x2ef)]('✔\x20Pushed\x20'+_0x152cea[_0x2b01(0x1fa)]),console[_0x2b01(0x2ef)](_0x2b01(0x206)+_0x152cea[_0x2b01(0x274)]),console[_0x2b01(0x2ef)](_0x2b01(0x224)+_0x152cea[_0x2b01(0x214)]),await this[_0x2b01(0x30c)](_0x5e49f9,_0x152cea[_0x2b01(0x1fa)],_0x249c22[_0x2b01(0x1e4)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x1a014a(0x29b)]='workflow:pull';['description']=a42_0x1a014a(0x216);async[a42_0x1a014a(0x1f7)](_0x245c05){const _0x1c87a2=a42_0x1a014a,{options:_0x3be569,args:_0x360179,tdx:_0x24578a}=_0x245c05,_0x3333c0=_0x360179[0x0],_0xf1985e=_0x360179[0x1];if(!_0x3333c0)return console['error'](a42_0x24c450[_0x1c87a2(0x22d)](_0x1c87a2(0x24a)),_0x1c87a2(0x1c6)),console['error'](a42_0x24c450[_0x1c87a2(0x1d1)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x35ce1b=_0x3be569['revision'];_0x3be569[_0x1c87a2(0x2d3)]&&(console[_0x1c87a2(0x2ef)]('Project:\x20'+_0x3333c0),_0xf1985e&&console[_0x1c87a2(0x2ef)](_0x1c87a2(0x226)+_0xf1985e),_0x35ce1b&&console['error'](_0x1c87a2(0x21d)+_0x35ce1b),_0x3be569[_0x1c87a2(0x25f)]&&console['error'](_0x1c87a2(0x261)));const _0x5a1c2d=await withSpinner(_0x1c87a2(0x2ac)+_0x3333c0+_0x1c87a2(0x2d5),()=>_0x24578a[_0x1c87a2(0x1fd)]['pullProject'](_0x3333c0,{'targetDir':_0xf1985e,'revision':_0x35ce1b}),{'verbose':_0x3be569['verbose']}),_0x1b953d=_0x5a1c2d[_0x1c87a2(0x2bd)];_0x1b953d[_0x1c87a2(0x29d)]?console[_0x1c87a2(0x2ef)](_0x1c87a2(0x21c)+_0x1b953d[_0x1c87a2(0x1fa)]):console[_0x1c87a2(0x2ef)](_0x1c87a2(0x21e)+_0x1b953d['projectName']);console[_0x1c87a2(0x2ef)](_0x1c87a2(0x224)+_0x1b953d[_0x1c87a2(0x214)]),console[_0x1c87a2(0x2ef)]('\x20\x20Target:\x20'+(a42_0x123493['relative'](process[_0x1c87a2(0x31d)](),_0x1b953d['targetDir'])||'.')),console[_0x1c87a2(0x2ef)](_0x1c87a2(0x2e7)+a42_0x24c450['green']('+'+_0x1b953d[_0x1c87a2(0x32d)]['new']+_0x1c87a2(0x353))+',\x20'+(a42_0x24c450[_0x1c87a2(0x20d)]('~'+_0x1b953d[_0x1c87a2(0x32d)][_0x1c87a2(0x36b)]+_0x1c87a2(0x255))+',\x20')+(a42_0x24c450['red']('-'+_0x1b953d[_0x1c87a2(0x32d)][_0x1c87a2(0x35e)]+_0x1c87a2(0x30b))+',\x20')+(''+a42_0x24c450[_0x1c87a2(0x1d1)](_0x1b953d[_0x1c87a2(0x32d)][_0x1c87a2(0x2de)]+_0x1c87a2(0x278))));for(const _0x1bced0 of _0x1b953d[_0x1c87a2(0x22e)]){_0x1bced0[_0x1c87a2(0x27e)]===_0x1c87a2(0x36b)&&_0x1bced0[_0x1c87a2(0x1c5)]&&(console[_0x1c87a2(0x2ef)]('\x0a'+a42_0x24c450[_0x1c87a2(0x302)](_0x1c87a2(0x1d2)+_0x1bced0[_0x1c87a2(0x2cc)])),console[_0x1c87a2(0x2ef)](_0x1bced0['diff']));}if(!_0x1b953d[_0x1c87a2(0x2ec)])return saveSessionContext({'workflow_project':_0x1b953d[_0x1c87a2(0x1fa)]},_0x3be569[_0x1c87a2(0x2fb)]),console[_0x1c87a2(0x2ef)](a42_0x24c450['green']('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x1c87a2(0x2ef)](a42_0x24c450['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1b953d[_0x1c87a2(0x1fa)])),0x0;if(_0x3be569['dryRun'])return console[_0x1c87a2(0x2ef)](a42_0x24c450['yellow'](_0x1c87a2(0x1eb))),0x0;if(!_0x3be569[_0x1c87a2(0x204)]){const _0x490fe0=await confirmKey(_0x1c87a2(0x32b));if(!_0x490fe0)return console[_0x1c87a2(0x2ef)](_0x1c87a2(0x1d6)),0x0;}await withSpinner('Writing\x20files...',()=>_0x24578a[_0x1c87a2(0x1fd)][_0x1c87a2(0x2f6)](_0x1b953d,{'revision':_0x35ce1b}),{'verbose':_0x3be569[_0x1c87a2(0x2d3)]}),saveSessionContext({'workflow_project':_0x1b953d[_0x1c87a2(0x1fa)]},_0x3be569[_0x1c87a2(0x2fb)]),console[_0x1c87a2(0x2ef)](a42_0x24c450[_0x1c87a2(0x1cf)](_0x1c87a2(0x1d4)));const _0x4e5e8e=a42_0x123493[_0x1c87a2(0x2db)](process[_0x1c87a2(0x31d)](),_0x1b953d[_0x1c87a2(0x306)])||'.';return console[_0x1c87a2(0x2ef)](a42_0x24c450[_0x1c87a2(0x1d1)](_0x1c87a2(0x230)+_0x4e5e8e)),console[_0x1c87a2(0x2ef)](a42_0x24c450[_0x1c87a2(0x1d1)](_0x1c87a2(0x2c9)+_0x1b953d['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x34d);[a42_0x1a014a(0x268)]=a42_0x1a014a(0x1ce);async[a42_0x1a014a(0x1f7)](_0x15816d){const _0x345c45=a42_0x1a014a,{options:_0x1c3b69,args:_0x563188,tdx:_0x8484de}=_0x15816d,_0x3c00a2=this[_0x345c45(0x35a)](_0x563188,_0x1c3b69),_0x2f6e85=_0x1c3b69[_0x345c45(0x214)],_0x50cbec=_0x1c3b69[_0x345c45(0x360)];_0x1c3b69[_0x345c45(0x2d3)]&&(_0x3c00a2&&console[_0x345c45(0x2ef)](_0x345c45(0x310)+_0x3c00a2),_0x2f6e85&&console['error'](_0x345c45(0x21d)+_0x2f6e85),_0x1c3b69[_0x345c45(0x25f)]&&console[_0x345c45(0x2ef)](_0x345c45(0x261)),_0x50cbec&&console[_0x345c45(0x2ef)](_0x345c45(0x2bb)));let _0x5b5254;try{_0x5b5254=await withSpinner(_0x345c45(0x2a6),()=>_0x8484de[_0x345c45(0x1fd)]['preparePushProject']({'sourceDir':_0x3c00a2,'revision':_0x2f6e85,'skipValidation':_0x50cbec}),{'verbose':_0x1c3b69[_0x345c45(0x2d3)]});}catch(_0x26295a){if(_0x26295a instanceof Error&&_0x26295a[_0x345c45(0x33e)]['includes'](_0x345c45(0x1e2)))return console[_0x345c45(0x2ef)](a42_0x24c450[_0x345c45(0x22d)](_0x345c45(0x24a)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x1c3b69['workflowProject']?console[_0x345c45(0x2ef)](a42_0x24c450[_0x345c45(0x1d1)](_0x345c45(0x2a1)+_0x1c3b69[_0x345c45(0x35f)]+_0x345c45(0x279)+_0x1c3b69[_0x345c45(0x35f)]+'\x27')):console[_0x345c45(0x2ef)](a42_0x24c450['dim'](_0x345c45(0x320))),0x1;throw _0x26295a;}const _0x3caf6d=_0x5b5254[_0x345c45(0x2bd)];console[_0x345c45(0x2ef)](_0x345c45(0x21e)+_0x3caf6d[_0x345c45(0x1fa)]),console[_0x345c45(0x2ef)](_0x345c45(0x2f5)+_0x3caf6d[_0x345c45(0x244)]),console[_0x345c45(0x2ef)](_0x345c45(0x224)+_0x3caf6d['revision']),console['error'](_0x345c45(0x2e7)+a42_0x24c450[_0x345c45(0x1cf)]('+'+_0x3caf6d[_0x345c45(0x32d)]['new']+'\x20new')+',\x20'+(a42_0x24c450[_0x345c45(0x20d)]('~'+_0x3caf6d['summary'][_0x345c45(0x36b)]+_0x345c45(0x255))+',\x20')+(a42_0x24c450['red']('-'+_0x3caf6d[_0x345c45(0x32d)][_0x345c45(0x35e)]+_0x345c45(0x30b))+',\x20')+(''+a42_0x24c450['dim'](_0x3caf6d[_0x345c45(0x32d)][_0x345c45(0x2de)]+_0x345c45(0x278))));for(const _0x291fa8 of _0x3caf6d[_0x345c45(0x22e)]){_0x291fa8[_0x345c45(0x27e)]==='modified'&&_0x291fa8[_0x345c45(0x1c5)]&&(console[_0x345c45(0x2ef)]('\x0a'+a42_0x24c450[_0x345c45(0x302)](_0x345c45(0x1d2)+_0x291fa8[_0x345c45(0x2cc)])),console[_0x345c45(0x2ef)](_0x291fa8[_0x345c45(0x1c5)]));}if(!_0x3caf6d[_0x345c45(0x2ec)])return console[_0x345c45(0x2ef)](a42_0x24c450[_0x345c45(0x1cf)](_0x345c45(0x30e))),await this[_0x345c45(0x30c)](_0x8484de,_0x3caf6d['projectName'],_0x1c3b69['site']),0x0;if(_0x1c3b69[_0x345c45(0x25f)])return console[_0x345c45(0x2ef)](a42_0x24c450['yellow']('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x1c3b69[_0x345c45(0x204)]){const _0x2453f2=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x2453f2)return console[_0x345c45(0x2ef)](_0x345c45(0x1d6)),0x0;}const _0x541990=await withSpinner(_0x345c45(0x32f),()=>_0x8484de[_0x345c45(0x1fd)][_0x345c45(0x362)](_0x3caf6d),{'verbose':_0x1c3b69[_0x345c45(0x2d3)]}),_0x3214e8=_0x541990[_0x345c45(0x2bd)];return console[_0x345c45(0x2ef)](a42_0x24c450[_0x345c45(0x1cf)](_0x345c45(0x1f1))),console[_0x345c45(0x2ef)]('\x20\x20Project\x20ID:\x20'+_0x3214e8[_0x345c45(0x274)]),console[_0x345c45(0x2ef)]('\x20\x20Revision:\x20'+_0x3214e8[_0x345c45(0x214)]),await this['showWorkflowConsoleUrl'](_0x8484de,_0x3214e8[_0x345c45(0x1fa)],_0x1c3b69[_0x345c45(0x1e4)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a42_0x1a014a(0x369);['description']='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a42_0x1a014a(0x1f7)](_0x853e08){const _0x374265=a42_0x1a014a,{options:_0x127440,args:_0x30594b,tdx:_0x1c523e}=_0x853e08,_0x19db85=this[_0x374265(0x35a)](_0x30594b,_0x127440),_0x1b8e43=_0x127440[_0x374265(0x29b)],_0x2553ca=_0x127440[_0x374265(0x214)],_0x2abcb8=_0x127440['skipValidation'];if(!_0x19db85)return console[_0x374265(0x2ef)](a42_0x24c450[_0x374265(0x22d)](_0x374265(0x24a)),_0x374265(0x2c0)),console[_0x374265(0x2ef)](a42_0x24c450[_0x374265(0x1d1)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x374265(0x2ef)](a42_0x24c450[_0x374265(0x1d1)](_0x374265(0x20b))),0x1;if(!_0x1b8e43)return console[_0x374265(0x2ef)](a42_0x24c450[_0x374265(0x22d)](_0x374265(0x24a)),_0x374265(0x2dc)),console['error'](a42_0x24c450[_0x374265(0x1d1)](_0x374265(0x2be))),0x1;_0x127440[_0x374265(0x2d3)]&&(console[_0x374265(0x2ef)](_0x374265(0x310)+_0x19db85),console[_0x374265(0x2ef)](_0x374265(0x30a)+_0x1b8e43),_0x2553ca&&console[_0x374265(0x2ef)](_0x374265(0x21d)+_0x2553ca),_0x127440[_0x374265(0x25f)]&&console[_0x374265(0x2ef)](_0x374265(0x261)),_0x2abcb8&&console[_0x374265(0x2ef)]('Validation:\x20skipped'));const _0x1b1d1a=await withSpinner(_0x374265(0x2a0),()=>_0x1c523e[_0x374265(0x1fd)][_0x374265(0x2d0)](_0x19db85,_0x1b8e43,{'revision':_0x2553ca,'skipValidation':_0x2abcb8}),{'verbose':_0x127440[_0x374265(0x2d3)]}),_0x2da63b=_0x1b1d1a[_0x374265(0x2bd)];console[_0x374265(0x2ef)](_0x374265(0x317)+_0x2da63b[_0x374265(0x244)]);_0x2da63b['sourceProjectName']&&console[_0x374265(0x2ef)](_0x374265(0x33f)+_0x2da63b[_0x374265(0x2b5)]);console[_0x374265(0x2ef)](_0x374265(0x30a)+_0x2da63b[_0x374265(0x350)]),console['error'](_0x374265(0x21d)+_0x2da63b[_0x374265(0x214)]),console[_0x374265(0x2ef)](_0x374265(0x211)+_0x2da63b['fileCount']);_0x2da63b[_0x374265(0x2dd)]&&(console[_0x374265(0x2ef)](a42_0x24c450[_0x374265(0x20d)](_0x374265(0x36f)+_0x2da63b[_0x374265(0x350)]+_0x374265(0x315)+_0x2da63b['existingProjectId']+')')),console[_0x374265(0x2ef)](a42_0x24c450['yellow'](_0x374265(0x2da))));if(_0x127440['dryRun'])return console[_0x374265(0x2ef)](a42_0x24c450[_0x374265(0x20d)](_0x374265(0x235))),0x0;if(!_0x127440[_0x374265(0x204)]){const _0x21d433=_0x2da63b['sourceProjectName']||a42_0x123493[_0x374265(0x25b)](_0x19db85),_0x1766d8=_0x2da63b[_0x374265(0x2dd)]?_0x374265(0x2b3)+_0x1b8e43+_0x374265(0x2b8):_0x374265(0x316)+_0x21d433+_0x374265(0x1ee)+_0x1b8e43+'\x22?',_0x4e4885=await confirmKey(_0x1766d8);if(!_0x4e4885)return console[_0x374265(0x2ef)]('Cancelled'),0x0;}const _0xbe2db1=await withSpinner(_0x2da63b[_0x374265(0x2dd)]?_0x374265(0x24b)+_0x1b8e43+_0x374265(0x2d5):_0x374265(0x2e0)+_0x1b8e43+'...',()=>_0x1c523e['workflow'][_0x374265(0x291)](_0x2da63b),{'verbose':_0x127440[_0x374265(0x2d3)]}),_0x25e35b=_0xbe2db1[_0x374265(0x2bd)];return console[_0x374265(0x2ef)](a42_0x24c450[_0x374265(0x1cf)](_0x2da63b['targetExists']?_0x374265(0x1ca):_0x374265(0x2cd))),console[_0x374265(0x2ef)](_0x374265(0x323)+_0x25e35b[_0x374265(0x350)]),console[_0x374265(0x2ef)](_0x374265(0x206)+_0x25e35b['newProjectId']),console[_0x374265(0x2ef)](_0x374265(0x224)+_0x25e35b[_0x374265(0x214)]),await this[_0x374265(0x30c)](_0x1c523e,_0x25e35b[_0x374265(0x350)],_0x127440[_0x374265(0x1e4)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x1a014a(0x29b)]='workflow:delete';['description']=a42_0x1a014a(0x2eb);async[a42_0x1a014a(0x1f7)](_0x45e965){const _0x3e9243=a42_0x1a014a,{options:_0x449a80,args:_0x30c00f,tdx:_0x45d8e0}=_0x45e965,_0x3769bd=_0x30c00f[0x0];if(!_0x3769bd)return console[_0x3e9243(0x2ef)](_0x3e9243(0x2d7)),console[_0x3e9243(0x2ef)](_0x3e9243(0x33d)),0x1;_0x449a80['verbose']&&console[_0x3e9243(0x2ef)](_0x3e9243(0x1cb)+_0x3769bd);if(!_0x449a80[_0x3e9243(0x204)]){const _0x43283b=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x3769bd+_0x3e9243(0x2c6));if(!_0x43283b)return console[_0x3e9243(0x2ef)]('Cancelled'),0x0;}const _0x9745cd=await withSpinner(_0x3e9243(0x284)+_0x3769bd+_0x3e9243(0x2d5),()=>_0x45d8e0[_0x3e9243(0x1fd)][_0x3e9243(0x1e1)](_0x3769bd),{'verbose':_0x449a80[_0x3e9243(0x2d3)]}),_0x406ced=_0x9745cd['data'];return console[_0x3e9243(0x2ef)](_0x3e9243(0x2b6)+_0x406ced[_0x3e9243(0x1fa)]),console[_0x3e9243(0x2ef)]('\x20\x20Project\x20ID:\x20'+_0x406ced[_0x3e9243(0x274)]),0x0;}}export function parseKeyValue(_0x4b4c29){const _0xae6552=a42_0x1a014a,_0xc6344c=_0x4b4c29['indexOf']('=');if(_0xc6344c===-0x1)throw new Error(_0xae6552(0x1e0)+_0x4b4c29+_0xae6552(0x24d));const _0x565856=_0x4b4c29['substring'](0x0,_0xc6344c),_0x129497=_0x4b4c29[_0xae6552(0x290)](_0xc6344c+0x1);if(!_0x565856)throw new Error(_0xae6552(0x34e));return{'key':_0x565856,'value':_0x129497};}function a42_0x1ed3(_0x5e4ac0,_0xbfdeca){_0x5e4ac0=_0x5e4ac0-0x1c3;const _0x2427ed=a42_0x2427();let _0x1ed384=_0x2427ed[_0x5e4ac0];return _0x1ed384;}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x282);[a42_0x1a014a(0x268)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0x1a014a(0x1f7)](_0xed92bd){const _0x1cad22=a42_0x1a014a,{options:_0x839bf,args:_0x45e66b,tdx:_0x1cbd9d}=_0xed92bd,_0x4c483d=this[_0x1cad22(0x322)](_0x45e66b,_0x839bf);if(!_0x4c483d)return 0x1;_0x839bf[_0x1cad22(0x2d3)]&&console[_0x1cad22(0x2ef)]('Project:\x20'+_0x4c483d);const _0x4d01fa=await withSpinner('Listing\x20secrets...',()=>_0x1cbd9d[_0x1cad22(0x1fd)][_0x1cad22(0x283)](_0x4c483d),{'verbose':_0x839bf[_0x1cad22(0x2d3)]}),{secrets:_0x137226}=_0x4d01fa['data'];return console[_0x1cad22(0x2ef)](_0x1cad22(0x1ec)+_0x137226['length']+_0x1cad22(0x2f3)+(_0x137226[_0x1cad22(0x2ea)]!==0x1?'s':'')),await handleSDKOutput(_0x137226,_0x839bf),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x2b4);['description']=a42_0x1a014a(0x23f);async[a42_0x1a014a(0x1f7)](_0xc640e3){const _0x3b574d=a42_0x1a014a,{options:_0x497200,args:_0x276ab7,tdx:_0x199cdc}=_0xc640e3;let _0x27b60e,_0x1a8704;if(_0x276ab7[_0x3b574d(0x2ea)]>=0x2)_0x27b60e=_0x276ab7[0x0],_0x1a8704=_0x276ab7[0x1];else{if(_0x276ab7['length']===0x1&&_0x497200[_0x3b574d(0x35f)])_0x27b60e=_0x497200[_0x3b574d(0x35f)],_0x1a8704=_0x276ab7[0x0];else return _0x276ab7['length']===0x1?(console[_0x3b574d(0x2ef)](_0x3b574d(0x354)),console[_0x3b574d(0x2ef)](_0x3b574d(0x2e6)),0x1):(console[_0x3b574d(0x2ef)](_0x3b574d(0x28c)),console[_0x3b574d(0x2ef)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE'),0x1);}let _0x46251c,_0x3c22c4;try{({key:_0x46251c,value:_0x3c22c4}=parseKeyValue(_0x1a8704));}catch(_0xcf792d){return _0xcf792d instanceof Error&&console['error'](a42_0x24c450[_0x3b574d(0x22d)](_0x3b574d(0x24a)),_0xcf792d['message']),0x1;}_0x497200['verbose']&&(console[_0x3b574d(0x2ef)](_0x3b574d(0x1cb)+_0x27b60e),console[_0x3b574d(0x2ef)](_0x3b574d(0x205)+_0x46251c));const _0x436b65=await withSpinner(_0x3b574d(0x2ed),()=>_0x199cdc[_0x3b574d(0x1fd)][_0x3b574d(0x24c)](_0x27b60e,_0x46251c,_0x3c22c4),{'verbose':_0x497200[_0x3b574d(0x2d3)]}),_0x57467a=_0x436b65[_0x3b574d(0x2bd)];return console[_0x3b574d(0x2ef)](_0x3b574d(0x2d1)+_0x57467a[_0x3b574d(0x333)]+_0x3b574d(0x253)+_0x57467a[_0x3b574d(0x1fa)]+'\x27'),(_0x497200[_0x3b574d(0x1fb)]||_0x497200[_0x3b574d(0x24f)])&&await handleSingleObjectOutput(_0x57467a,_0x497200),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x2f2);[a42_0x1a014a(0x268)]=a42_0x1a014a(0x1ea);async[a42_0x1a014a(0x1f7)](_0x4949e2){const _0x452249=a42_0x1a014a,{options:_0x557925,args:_0x3af9b2,tdx:_0x1c6c43}=_0x4949e2;let _0x1c1924,_0xb6cee9;if(_0x3af9b2['length']>=0x2)_0x1c1924=_0x3af9b2[0x0],_0xb6cee9=_0x3af9b2[0x1];else{if(_0x3af9b2[_0x452249(0x2ea)]===0x1&&_0x557925[_0x452249(0x35f)])_0x1c1924=_0x557925['workflowProject'],_0xb6cee9=_0x3af9b2[0x0];else return _0x3af9b2[_0x452249(0x2ea)]===0x1?(console['error'](_0x452249(0x354)),console['error'](_0x452249(0x2e6)),0x1):(console['error'](_0x452249(0x26e)),console[_0x452249(0x2ef)](_0x452249(0x364)),0x1);}_0x557925['verbose']&&(console[_0x452249(0x2ef)](_0x452249(0x1cb)+_0x1c1924),console[_0x452249(0x2ef)](_0x452249(0x205)+_0xb6cee9));if(!_0x557925[_0x452249(0x204)]){const _0x3f94e1=await confirmKey(_0x452249(0x25d)+_0xb6cee9+_0x452249(0x36a)+_0x1c1924+'\x27?');if(!_0x3f94e1)return console['error']('Cancelled'),0x0;}const _0xaf0929=await withSpinner(_0x452249(0x1e7),()=>_0x1c6c43['workflow'][_0x452249(0x2a9)](_0x1c1924,_0xb6cee9),{'verbose':_0x557925['verbose']}),_0xef9ba1=_0xaf0929['data'];return console[_0x452249(0x2ef)](_0x452249(0x2d1)+_0xef9ba1['key']+_0x452249(0x35d)+_0xef9ba1[_0x452249(0x1fa)]+'\x27'),(_0x557925[_0x452249(0x1fb)]||_0x557925[_0x452249(0x24f)])&&await handleSingleObjectOutput(_0xef9ba1,_0x557925),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(_0x14b65){const _0x18221a=a42_0x1a014a,_0x11e2f3=Math['floor'](_0x14b65/0x3e8),_0x216831=Math['floor'](_0x11e2f3/0x3c),_0x1c9eb6=Math[_0x18221a(0x23d)](_0x216831/0x3c),_0x1480a3=Math[_0x18221a(0x23d)](_0x1c9eb6/0x18);if(_0x1480a3>0x0){const _0x4eb711=_0x1c9eb6%0x18;return _0x4eb711>0x0?_0x1480a3+'d\x20'+_0x4eb711+'h':_0x1480a3+'d';}else{if(_0x1c9eb6>0x0){const _0x2da6ee=_0x216831%0x3c;return _0x2da6ee>0x0?_0x1c9eb6+'h\x20'+_0x2da6ee+'m':_0x1c9eb6+'h';}else{if(_0x216831>0x0){const _0x17fc61=_0x11e2f3%0x3c;return _0x17fc61>0x0?_0x216831+'m\x20'+_0x17fc61+'s':_0x216831+'m';}else return _0x11e2f3+'s';}}}function formatTimestamp(_0x3bd69,_0x314343){const _0x137af7=a42_0x1a014a,_0x2d7e0d=new Date(_0x3bd69),_0x28ba0d=String(_0x2d7e0d[_0x137af7(0x2b9)]())[_0x137af7(0x1dc)](0x2,'0'),_0x1b4644=String(_0x2d7e0d[_0x137af7(0x2ca)]())[_0x137af7(0x1dc)](0x2,'0'),_0x2516f9=_0x28ba0d+':'+_0x1b4644,_0x5c0612=_0x2d7e0d[_0x137af7(0x21b)]()===_0x314343['getFullYear']()&&_0x2d7e0d[_0x137af7(0x2fd)]()===_0x314343[_0x137af7(0x2fd)]()&&_0x2d7e0d[_0x137af7(0x36d)]()===_0x314343[_0x137af7(0x36d)]();if(_0x5c0612)return _0x2516f9;else{const _0x472cd8=String(_0x2d7e0d[_0x137af7(0x2fd)]()+0x1)[_0x137af7(0x1dc)](0x2,'0'),_0x236832=String(_0x2d7e0d['getDate']())['padStart'](0x2,'0');return _0x472cd8+'-'+_0x236832+'\x20'+_0x2516f9;}}function formatDate(_0x14292d){const _0x172422=a42_0x1a014a,_0x251d76=_0x14292d[_0x172422(0x21b)](),_0x407e25=String(_0x14292d[_0x172422(0x2fd)]()+0x1)[_0x172422(0x1dc)](0x2,'0'),_0x3b2e31=String(_0x14292d[_0x172422(0x36d)]())[_0x172422(0x1dc)](0x2,'0');return _0x251d76+'-'+_0x407e25+'-'+_0x3b2e31;}function getTaskStateIcon(_0x3f7315){const _0x4ddf99={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x4ddf99[_0x3f7315]||'⚪';}function getBarChar(_0x127fef){const _0x43dfd5=a42_0x1a014a;return _0x127fef===_0x43dfd5(0x2ef)||_0x127fef===_0x43dfd5(0x287)?'×':'─';}function getBarColor(_0x4259e5){const _0x46404=a42_0x1a014a,_0x2c652d={'success':a42_0x24c450[_0x46404(0x1cf)],'error':a42_0x24c450[_0x46404(0x22d)],'group_error':a42_0x24c450[_0x46404(0x22d)],'running':a42_0x24c450[_0x46404(0x263)],'blocked':a42_0x24c450['yellow'],'planned':a42_0x24c450[_0x46404(0x1d1)],'canceling':a42_0x24c450[_0x46404(0x20d)]};return _0x2c652d[_0x4259e5]||a42_0x24c450[_0x46404(0x1e8)];}function parseTaskName(_0x22d5e3){const _0x2d9812=a42_0x1a014a;let _0x476357=_0x22d5e3[_0x2d9812(0x2c2)](/^\++/,'');const _0x4193db=_0x476357[_0x2d9812(0x241)]('+'),_0xaa99ae=_0x4193db[_0x2d9812(0x2ea)]>0x1?_0x4193db[_0x2d9812(0x2ea)]-0x2:0x0,_0x5e986b=_0x4193db[_0x4193db[_0x2d9812(0x2ea)]-0x1]||_0x476357;return{'level':_0xaa99ae,'name':'+'+_0x5e986b};}function truncateTaskName(_0x2e440d,_0x5dec0d){const _0x184d25=stringWidth(_0x2e440d);if(_0x184d25<=_0x5dec0d)return _0x2e440d;let _0x2472aa=_0x2e440d;while(stringWidth(_0x2472aa+'…')>_0x5dec0d&&_0x2472aa['length']>0x0){_0x2472aa=_0x2472aa['slice'](0x0,-0x1);}return _0x2472aa+'…';}function calculateTimeScale(_0xbdaaf7,_0x3f2961){const _0x115abc=a42_0x1a014a;return{'startTime':_0xbdaaf7['start'],'endTime':_0xbdaaf7[_0x115abc(0x301)],'durationMs':_0xbdaaf7[_0x115abc(0x2c4)],'msPerChar':_0xbdaaf7[_0x115abc(0x2c4)]/_0x3f2961};}function timeToPosition(_0x381dcc,_0xfe3ec1,_0x43da93){const _0x44ef8d=a42_0x1a014a,_0x401304=_0x381dcc-_0xfe3ec1[_0x44ef8d(0x34c)],_0x4c9264=Math[_0x44ef8d(0x23d)](_0x401304/_0xfe3ec1[_0x44ef8d(0x1d8)]);return Math[_0x44ef8d(0x358)](0x0,Math[_0x44ef8d(0x243)](_0x4c9264,_0x43da93));}function renderTimeAxis(_0x18c9e9,_0x420ce1){const _0x1ca61d=a42_0x1a014a,_0x36533a=Math['min'](TIMELINE_CONFIG[_0x1ca61d(0x367)],Math[_0x1ca61d(0x358)](TIMELINE_CONFIG[_0x1ca61d(0x35c)],Math[_0x1ca61d(0x23d)](_0x420ce1/TIMELINE_CONFIG[_0x1ca61d(0x245)]))),_0x141f22=_0x18c9e9[_0x1ca61d(0x1f3)]/(_0x36533a-0x1),_0x4a7878=new Date(_0x18c9e9[_0x1ca61d(0x34c)]),_0x2324d3=[];for(let _0x31f62e=0x0;_0x31f62e<_0x36533a;_0x31f62e++){const _0x4aaaec=_0x18c9e9[_0x1ca61d(0x34c)]+_0x31f62e*_0x141f22,_0x797c09=timeToPosition(_0x4aaaec,_0x18c9e9,_0x420ce1),_0x1c4a36=formatTimestamp(_0x4aaaec,_0x4a7878);_0x2324d3[_0x1ca61d(0x2e4)]({'pos':_0x797c09,'text':_0x1c4a36});}const _0xf93d8f=new Array(_0x420ce1)['fill']('\x20');let _0x2b9e6a=-0x1;for(const {pos:_0x45ef88,text:_0x2afa74}of _0x2324d3){let _0x3778b8=Math[_0x1ca61d(0x358)](0x0,_0x45ef88-Math[_0x1ca61d(0x23d)](_0x2afa74[_0x1ca61d(0x2ea)]/0x2));_0x3778b8<=_0x2b9e6a+TIMELINE_CONFIG[_0x1ca61d(0x1fe)]&&(_0x3778b8=_0x2b9e6a+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x3778b8+_0x2afa74[_0x1ca61d(0x2ea)]>_0x420ce1&&(_0x3778b8=_0x420ce1-_0x2afa74[_0x1ca61d(0x2ea)]);if(_0x3778b8>=0x0&&_0x3778b8+_0x2afa74[_0x1ca61d(0x2ea)]<=_0x420ce1&&_0x3778b8>_0x2b9e6a){for(let _0x3f4c3d=0x0;_0x3f4c3d<_0x2afa74[_0x1ca61d(0x2ea)];_0x3f4c3d++){_0xf93d8f[_0x3778b8+_0x3f4c3d]=_0x2afa74[_0x3f4c3d];}_0x2b9e6a=_0x3778b8+_0x2afa74[_0x1ca61d(0x2ea)]-0x1;}}return _0xf93d8f[_0x1ca61d(0x27f)]('');}function renderTaskRow(_0x51b8ed,_0x1495f7,_0x2d8b6c,_0x403bc4){const _0x443f06=a42_0x1a014a,{level:_0x571a30,name:_0x59c58d}=parseTaskName(_0x51b8ed[_0x443f06(0x29b)]),_0x37f1a7='\x20'['repeat'](_0x571a30),_0x3a9d63=_0x51b8ed[_0x443f06(0x33a)]?'('+formatElapsed(_0x51b8ed[_0x443f06(0x33a)][_0x443f06(0x2c4)])+')':'',_0x1b1b68=stringWidth(_0x3a9d63),_0x44a255=_0x571a30*0x1,_0x3df12e=_0x403bc4-_0x44a255-_0x1b1b68-0x1,_0xf4a18c=truncateTaskName(_0x59c58d,_0x3df12e),_0x379c5d=_0x37f1a7+_0xf4a18c,_0x12cfeb=stringWidth(_0x379c5d),_0x56fc4a=_0x403bc4-_0x12cfeb-_0x1b1b68,_0x2198bc=_0x379c5d+'\x20'[_0x443f06(0x25a)](Math[_0x443f06(0x358)](0x1,_0x56fc4a))+a42_0x24c450[_0x443f06(0x1d1)](_0x3a9d63),_0x121dca=getTaskStateIcon(_0x51b8ed[_0x443f06(0x269)]),_0x16f391=new Array(_0x2d8b6c)['fill']('\x20');if(_0x51b8ed['window']){const _0x48cc7d=timeToPosition(_0x51b8ed[_0x443f06(0x33a)]['start'],_0x1495f7,_0x2d8b6c),_0x5c0f4b=timeToPosition(_0x51b8ed[_0x443f06(0x33a)][_0x443f06(0x301)],_0x1495f7,_0x2d8b6c),_0x49006f=getBarChar(_0x51b8ed[_0x443f06(0x269)]),_0x2b14fd=Math[_0x443f06(0x358)](_0x48cc7d+0x1,_0x5c0f4b);for(let _0x50ed46=_0x48cc7d;_0x50ed46<Math['min'](_0x2b14fd,_0x2d8b6c);_0x50ed46++){_0x16f391[_0x50ed46]=_0x49006f;}}const _0x158fc8=getBarColor(_0x51b8ed[_0x443f06(0x269)]),_0x34a39a=_0x16f391[_0x443f06(0x2bc)](_0x3fb46a=>_0x3fb46a==='\x20'?'\x20':_0x158fc8(_0x3fb46a))['join']('');return _0x121dca+'\x20'+_0x2198bc+'│'+_0x34a39a+'│';}function calculateStats(_0x1cc718){const _0x179459=a42_0x1a014a,_0x997894={'total':_0x1cc718['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3c6068 of _0x1cc718){if(_0x3c6068['state']===_0x179459(0x2bf))_0x997894['success']++;else{if(_0x3c6068[_0x179459(0x269)]===_0x179459(0x2ef)||_0x3c6068[_0x179459(0x269)]===_0x179459(0x287))_0x997894[_0x179459(0x2ef)]++;else _0x3c6068[_0x179459(0x269)]===_0x179459(0x288)?_0x997894['running']++:_0x997894[_0x179459(0x343)]++;}}return _0x997894;}function formatStats(_0x1a77f4){const _0x234736=a42_0x1a014a;return[_0x234736(0x25e)+_0x1a77f4[_0x234736(0x221)],'✅\x20'+_0x1a77f4[_0x234736(0x2bf)],'❌\x20'+_0x1a77f4[_0x234736(0x2ef)],'🔄\x20'+_0x1a77f4['running'],'⏳\x20'+_0x1a77f4['pending']][_0x234736(0x27f)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x1a014a(0x29b)]=a42_0x1a014a(0x234);[a42_0x1a014a(0x268)]=a42_0x1a014a(0x2d9);async[a42_0x1a014a(0x1f7)](_0x242e48){const _0x32725d=a42_0x1a014a,{options:_0x5cb4c0,args:_0x4d0a6a,tdx:_0x11f93c}=_0x242e48;let _0x2e037d,_0x5c222e,_0xc69ac2=![];if(_0x4d0a6a[0x0]){if(_0x4d0a6a[0x0][_0x32725d(0x275)]('.')){const _0x22ab63=this[_0x32725d(0x228)](_0x4d0a6a,_0x5cb4c0);if(!_0x22ab63)return 0x1;_0x2e037d=_0x22ab63[_0x32725d(0x1fa)],_0x5c222e=_0x22ab63[_0x32725d(0x208)];}else{_0x5c222e=_0x4d0a6a[0x0],_0x2e037d=_0x5cb4c0[_0x32725d(0x35f)];if(!_0x2e037d)return console[_0x32725d(0x2ef)](a42_0x24c450['red']('Error:'),_0x32725d(0x2f4)),0x1;_0xc69ac2=!![];}}else{const _0x4723fc=this[_0x32725d(0x228)](_0x4d0a6a,_0x5cb4c0);if(!_0x4723fc)return 0x1;_0x2e037d=_0x4723fc[_0x32725d(0x1fa)],_0x5c222e=_0x4723fc['workflowName'];}if(_0x5cb4c0[_0x32725d(0x2d3)]){if(_0x2e037d&&_0x5c222e)console[_0x32725d(0x2ef)](_0x32725d(0x347)+_0x2e037d+'.'+_0x5c222e);else _0x2e037d&&console['error']('Filter:\x20project='+_0x2e037d);}const _0x1bff85=_0x5cb4c0[_0x32725d(0x356)],_0x23c658=_0x5cb4c0[_0x32725d(0x2e3)];if(_0x1bff85){_0x23c658&&console[_0x32725d(0x2ef)](a42_0x24c450[_0x32725d(0x20d)](_0x32725d(0x223)),_0x32725d(0x289));const _0x59d830=_0x5cb4c0[_0x32725d(0x2cf)];return _0x59d830?await this['pollTimeline'](_0x242e48,_0x1bff85):await this[_0x32725d(0x22c)](_0x242e48,_0x1bff85,_0x5cb4c0),0x0;}if(_0x23c658){const _0x3e8187=await withSpinner(_0x32725d(0x2d6),()=>_0x11f93c[_0x32725d(0x1fd)]['sessions']({'projectName':_0x2e037d,'workflowName':_0x5c222e,'limit':0x64}),{'verbose':_0x5cb4c0['verbose']}),_0x19f0e1=_0x3e8187[_0x32725d(0x2bd)][_0x32725d(0x368)](_0x5b22a4=>_0x5b22a4['id']===_0x23c658);if(!_0x19f0e1)return console[_0x32725d(0x2ef)](a42_0x24c450[_0x32725d(0x22d)]('Error:'),_0x32725d(0x2c8)+_0x23c658),0x1;if(!_0x19f0e1['lastAttempt']?.['id'])return console[_0x32725d(0x2ef)](a42_0x24c450['red']('Error:'),_0x32725d(0x363)+_0x23c658+_0x32725d(0x242)),0x1;const _0x1cf66d=_0x19f0e1['lastAttempt']['id'];_0x5cb4c0['verbose']&&console[_0x32725d(0x2ef)](_0x32725d(0x344)+_0x1cf66d+_0x32725d(0x276)+_0x23c658);const _0x5e228c=_0x5cb4c0['follow'];return _0x5e228c?await this[_0x32725d(0x20c)](_0x242e48,_0x1cf66d):await this['renderSingleTimeline'](_0x242e48,_0x1cf66d,_0x5cb4c0),0x0;}const _0x2390f7=await withSpinner(_0x32725d(0x225),()=>_0x11f93c[_0x32725d(0x1fd)]['sessions']({'projectName':_0x2e037d,'workflowName':_0x5c222e,'limit':_0x5cb4c0[_0x32725d(0x2ab)]||0x32}),{'verbose':_0x5cb4c0[_0x32725d(0x2d3)]}),_0x5390f2=_0x2390f7[_0x32725d(0x2bd)];if(_0x5390f2[_0x32725d(0x2ea)]===0x0){if(_0x2e037d&&_0x5c222e)console[_0x32725d(0x2ef)](_0x32725d(0x335)+_0x2e037d+'.'+_0x5c222e);else _0x2e037d?console[_0x32725d(0x2ef)](_0x32725d(0x20a)+_0x2e037d):(console[_0x32725d(0x2ef)](_0x32725d(0x20e)),console['error'](a42_0x24c450[_0x32725d(0x1d1)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x5390f2[_0x32725d(0x1de)]((_0x2e644b,_0x384566)=>{const _0x374915=_0x32725d,_0x2468c0=_0x2e644b[_0x374915(0x1e5)]||'',_0x5462d1=_0x384566[_0x374915(0x1e5)]||'';return _0x5462d1[_0x374915(0x264)](_0x2468c0);});if(_0x5cb4c0[_0x32725d(0x1fb)]||_0x5cb4c0[_0x32725d(0x24f)])return await handleSDKOutput(_0x5390f2,_0x5cb4c0),0x0;let _0x43516d;if(_0xc69ac2){const _0x56aeb9=_0x5390f2[0x0];if(!_0x56aeb9['lastAttempt']?.['id'])return console['error'](_0x32725d(0x312)),0x0;_0x43516d=_0x56aeb9[_0x32725d(0x1c4)]['id'],_0x5cb4c0[_0x32725d(0x2d3)]&&console[_0x32725d(0x2ef)](_0x32725d(0x2ad)+_0x56aeb9[_0x32725d(0x1e5)]);}else{const _0x496b81=_0x5390f2[_0x32725d(0x2bc)](_0x426c30=>{const _0x3ffed2=_0x32725d,_0x2e7480=getAttemptStatusDisplay(_0x426c30[_0x3ffed2(0x1c4)]);return{'title':_0x426c30[_0x3ffed2(0x31c)]?.[_0x3ffed2(0x29b)]+'.'+_0x426c30[_0x3ffed2(0x1fd)]?.[_0x3ffed2(0x29b)]+_0x3ffed2(0x1ff)+_0x426c30[_0x3ffed2(0x1e5)]+'\x20'+_0x2e7480[_0x3ffed2(0x247)],'value':_0x426c30['lastAttempt']?.['id']||'','description':_0x2e7480['text']};}),_0x4c1c6b=await a42_0x2a8463({'type':_0x32725d(0x1c8),'name':'attemptId','message':_0x32725d(0x348),'choices':_0x496b81[_0x32725d(0x2e9)](_0x15396c=>_0x15396c['value']!=='')});if(!_0x4c1c6b[_0x32725d(0x356)])return 0x0;_0x43516d=_0x4c1c6b['attemptId'];}const _0x46c4df=_0x5cb4c0[_0x32725d(0x2cf)];return _0x46c4df?await this[_0x32725d(0x20c)](_0x242e48,_0x43516d):await this[_0x32725d(0x22c)](_0x242e48,_0x43516d,_0x5cb4c0),0x0;}async[a42_0x1a014a(0x22c)](_0x42b459,_0x1c8861,_0x17f917){const _0x53dfb4=a42_0x1a014a,{tdx:_0x274e97}=_0x42b459;let _0x21cf48,_0x45780d;try{[_0x21cf48,_0x45780d]=await Promise[_0x53dfb4(0x1f6)]([_0x274e97[_0x53dfb4(0x1fd)]['attempt'](_0x1c8861),_0x274e97[_0x53dfb4(0x1fd)][_0x53dfb4(0x2af)](_0x1c8861,![])]);}catch(_0x27b3a3){console['error'](a42_0x24c450[_0x53dfb4(0x22d)](_0x53dfb4(0x33c)));_0x17f917[_0x53dfb4(0x2d3)]&&console['error'](_0x27b3a3);throw _0x27b3a3;}if(_0x17f917[_0x53dfb4(0x1fb)]||_0x17f917[_0x53dfb4(0x24f)]){const _0x4538ac=this[_0x53dfb4(0x249)](_0x21cf48,_0x45780d);await handleSDKOutput([_0x4538ac],_0x17f917);return;}const _0x28ec89=_0x274e97[_0x53dfb4(0x1d7)][_0x53dfb4(0x1e4)],_0x1fb9ad=this[_0x53dfb4(0x231)](_0x21cf48,_0x45780d,_0x28ec89);console['log'](_0x1fb9ad);}async[a42_0x1a014a(0x20c)](_0x1e27fc,_0x33a7db){const _0x10f8a8=a42_0x1a014a,{tdx:_0x1bf59c}=_0x1e27fc,_0x54929d=TIMELINE_CONFIG[_0x10f8a8(0x297)],_0x2b1a9c=TIMELINE_CONFIG[_0x10f8a8(0x280)];let _0x4981f1=0x0;while(_0x4981f1<_0x2b1a9c){process['stdout'][_0x10f8a8(0x277)]&&process['stdout'][_0x10f8a8(0x1f8)]('\x1bc');let _0x516f02,_0x9757d3;try{[_0x516f02,_0x9757d3]=await Promise[_0x10f8a8(0x1f6)]([_0x1bf59c['workflow'][_0x10f8a8(0x345)](_0x33a7db),_0x1bf59c[_0x10f8a8(0x1fd)]['tasks'](_0x33a7db,![])]);}catch(_0x3a6604){console['error'](a42_0x24c450[_0x10f8a8(0x22d)](_0x10f8a8(0x1fc)));_0x4981f1>0x0&&console[_0x10f8a8(0x2ef)](a42_0x24c450[_0x10f8a8(0x1d1)](_0x10f8a8(0x2b0)+_0x4981f1));throw _0x3a6604;}const _0x1f9f5d=_0x1bf59c[_0x10f8a8(0x1d7)][_0x10f8a8(0x1e4)],_0x183730=this['renderTimeline'](_0x516f02,_0x9757d3,_0x1f9f5d);console[_0x10f8a8(0x24e)](_0x183730);const _0x7e709b=_0x516f02['done']&&_0x9757d3[_0x10f8a8(0x338)](_0x1652d5=>_0x1652d5[_0x10f8a8(0x269)]!=='running'&&_0x1652d5[_0x10f8a8(0x269)]!==_0x10f8a8(0x30d));if(_0x7e709b){console[_0x10f8a8(0x2ef)](a42_0x24c450['green'](_0x10f8a8(0x29e)));break;}console[_0x10f8a8(0x2ef)](a42_0x24c450[_0x10f8a8(0x1d1)](_0x10f8a8(0x1c7)+_0x4981f1*0x2+_0x10f8a8(0x27c))),await new Promise(_0x9f8ddc=>setTimeout(_0x9f8ddc,_0x54929d)),_0x4981f1++;}_0x4981f1>=_0x2b1a9c&&console[_0x10f8a8(0x2ef)](a42_0x24c450[_0x10f8a8(0x20d)](_0x10f8a8(0x201)));}[a42_0x1a014a(0x231)](_0x1181ea,_0x3ee12d,_0x4b289e){const _0x5d5399=a42_0x1a014a,_0x5e47d8=[],_0x4db9f5=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x3d21ac=0x5,_0x58f716=process[_0x5d5399(0x1f4)][_0x5d5399(0x2b7)]||0x78,_0x576add=_0x58f716-_0x4db9f5-_0x3d21ac,_0x2705de=Math[_0x5d5399(0x358)](TIMELINE_CONFIG[_0x5d5399(0x370)],Math[_0x5d5399(0x243)](_0x576add,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0xd73ca5=new Date(_0x1181ea[_0x5d5399(0x2e8)])[_0x5d5399(0x336)](),_0x4638ca=_0x1181ea[_0x5d5399(0x2c1)]?new Date(_0x1181ea[_0x5d5399(0x2c1)])[_0x5d5399(0x336)]():Date[_0x5d5399(0x1f9)](),_0x87fa1b={'start':_0xd73ca5,'end':_0x4638ca,'duration':_0x4638ca-_0xd73ca5},_0x352643=new Map(),_0x5e4f2f=[];for(const _0x39899b of _0x3ee12d){if(_0x39899b['startedAt']){const _0x500ed2=new Date(_0x39899b[_0x5d5399(0x29f)])[_0x5d5399(0x336)](),_0x439c46=_0x39899b[_0x5d5399(0x1d0)]?new Date(_0x39899b[_0x5d5399(0x1d0)])[_0x5d5399(0x336)]():Date['now'](),_0x2dd1cb={'start':_0x500ed2,'end':_0x439c46,'duration':_0x439c46-_0x500ed2};_0x352643[_0x5d5399(0x31a)](_0x39899b['id'],_0x2dd1cb),_0x5e4f2f[_0x5d5399(0x2e4)]({'name':_0x39899b['fullName'],'state':_0x39899b['state']||'unknown','window':_0x2dd1cb});}else _0x5e4f2f['push']({'name':_0x39899b[_0x5d5399(0x215)],'state':_0x39899b[_0x5d5399(0x269)]||_0x5d5399(0x30d),'window':undefined});}_0x5e4f2f[_0x5d5399(0x1de)]((_0x44f8d0,_0x2bc629)=>{const _0xd61cf7=_0x5d5399;if(!_0x44f8d0[_0xd61cf7(0x33a)])return 0x1;if(!_0x2bc629[_0xd61cf7(0x33a)])return-0x1;return _0x44f8d0[_0xd61cf7(0x33a)][_0xd61cf7(0x1cc)]-_0x2bc629[_0xd61cf7(0x33a)]['start'];});const _0x5655d9=_0x5e4f2f[_0x5d5399(0x2ea)],_0x119854=_0x5655d9>TIMELINE_CONFIG[_0x5d5399(0x254)];_0x119854&&_0x5e4f2f[_0x5d5399(0x1d9)](TIMELINE_CONFIG[_0x5d5399(0x254)]);const _0x3ff503=calculateTimeScale(_0x87fa1b,_0x2705de),_0x272264=_0x1181ea[_0x5d5399(0x28b)]?_0x1181ea[_0x5d5399(0x2bf)]?a42_0x24c450['green'](_0x5d5399(0x2bf)):a42_0x24c450['red'](_0x5d5399(0x2ef)):a42_0x24c450[_0x5d5399(0x263)](_0x5d5399(0x288)),_0x18c1d8=_0x1181ea[_0x5d5399(0x31c)]?.['id'],_0x33a57b=_0x1181ea[_0x5d5399(0x2e3)];let _0x3a77cf;if(_0x18c1d8&&_0x33a57b){const _0x1ce8f1=getWorkflowAttemptUrl(_0x4b289e,_0x18c1d8,_0x33a57b,_0x1181ea['id']);_0x3a77cf=hyperlink(a42_0x24c450['dim'](_0x1181ea['id']),_0x1ce8f1);}else _0x3a77cf=a42_0x24c450['dim'](_0x1181ea['id']);_0x5e47d8[_0x5d5399(0x2e4)](_0x5d5399(0x2e2)+_0x3a77cf+_0x5d5399(0x1ff)+_0x272264+_0x5d5399(0x1ff)+formatElapsed(_0x87fa1b['duration']));if(_0x5e4f2f[_0x5d5399(0x2ea)]>0x0){const _0x1f461c=renderTimeAxis(_0x3ff503,_0x2705de),_0x2d20a1=new Date(_0x87fa1b[_0x5d5399(0x1cc)]),_0x35b91f=formatDate(_0x2d20a1),_0x3c0dd6=TIMELINE_CONFIG[_0x5d5399(0x292)]+TIMELINE_CONFIG[_0x5d5399(0x296)]+_0x4db9f5,_0x359e18=_0x35b91f['padStart'](_0x3c0dd6),_0x19b61c=a42_0x24c450[_0x5d5399(0x1d1)](_0x359e18);_0x5e47d8['push'](_0x19b61c+'\x20'+_0x1f461c);for(const _0x1c7a99 of _0x5e4f2f){_0x5e47d8[_0x5d5399(0x2e4)](renderTaskRow(_0x1c7a99,_0x3ff503,_0x2705de,_0x4db9f5));}const _0x1e6b8c=calculateStats(_0x5e4f2f);_0x5e47d8[_0x5d5399(0x2e4)](formatStats(_0x1e6b8c)),_0x119854&&_0x5e47d8[_0x5d5399(0x2e4)](a42_0x24c450[_0x5d5399(0x20d)](_0x5d5399(0x31b)+TIMELINE_CONFIG[_0x5d5399(0x254)]+_0x5d5399(0x30f)+_0x5655d9+_0x5d5399(0x2e1))),_0x5e47d8[_0x5d5399(0x2e4)](''),_0x5e47d8[_0x5d5399(0x2e4)](a42_0x24c450[_0x5d5399(0x1d1)](_0x5d5399(0x217))+(_0x5d5399(0x2a7)+_0x1181ea['id']+_0x5d5399(0x239))+a42_0x24c450[_0x5d5399(0x1d1)](_0x5d5399(0x20f)));}else _0x5e47d8[_0x5d5399(0x2e4)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x5e47d8['join']('\x0a');}[a42_0x1a014a(0x249)](_0x25a382,_0x269df1){const _0x51dc14=a42_0x1a014a,_0x503ad8=new Date(_0x25a382['createdAt'])[_0x51dc14(0x336)](),_0x387feb=_0x25a382[_0x51dc14(0x2c1)]?new Date(_0x25a382[_0x51dc14(0x2c1)])[_0x51dc14(0x336)]():Date[_0x51dc14(0x1f9)](),_0x1b6e59=_0x387feb-_0x503ad8,_0x10a5a6=[];for(const _0x584a6c of _0x269df1){if(_0x584a6c[_0x51dc14(0x29f)]){const _0x55030f=new Date(_0x584a6c[_0x51dc14(0x29f)])[_0x51dc14(0x336)](),_0x120288=_0x584a6c[_0x51dc14(0x1d0)]?new Date(_0x584a6c[_0x51dc14(0x1d0)])[_0x51dc14(0x336)]():Date[_0x51dc14(0x1f9)]();_0x10a5a6[_0x51dc14(0x2e4)]({'name':_0x584a6c[_0x51dc14(0x215)],'state':_0x584a6c['state']||_0x51dc14(0x28d),'window':{'start':_0x55030f,'end':_0x120288,'duration':_0x120288-_0x55030f}});}else _0x10a5a6[_0x51dc14(0x2e4)]({'name':_0x584a6c[_0x51dc14(0x215)],'state':_0x584a6c['state']||_0x51dc14(0x30d),'window':undefined});}const _0x2fb04d=calculateStats(_0x10a5a6);return{'attempt':{'id':_0x25a382['id'],'status':_0x25a382['done']?_0x25a382['success']?'success':_0x51dc14(0x2ef):_0x51dc14(0x288),'createdAt':_0x25a382[_0x51dc14(0x2e8)],'finishedAt':_0x25a382[_0x51dc14(0x2c1)],'duration_ms':_0x1b6e59},'tasks':_0x10a5a6[_0x51dc14(0x2bc)](_0x425721=>({'name':_0x425721[_0x51dc14(0x29b)],'state':_0x425721[_0x51dc14(0x269)],'startedAt':_0x425721[_0x51dc14(0x33a)]?new Date(_0x425721[_0x51dc14(0x33a)][_0x51dc14(0x1cc)])['toISOString']():null,'updatedAt':_0x425721[_0x51dc14(0x33a)]?new Date(_0x425721['window'][_0x51dc14(0x301)])['toISOString']():null,'duration_ms':_0x425721['window']?.[_0x51dc14(0x2c4)]||null})),'stats':_0x2fb04d};}}
|
|
1
|
+
const a42_0x5d907a=a42_0x3b57;(function(_0x5f07f9,_0x2db9c9){const _0x47de16=a42_0x3b57,_0x54c939=_0x5f07f9();while(!![]){try{const _0x5a6429=-parseInt(_0x47de16(0x208))/0x1+parseInt(_0x47de16(0x168))/0x2*(-parseInt(_0x47de16(0x2ba))/0x3)+-parseInt(_0x47de16(0x2fb))/0x4*(parseInt(_0x47de16(0x17c))/0x5)+-parseInt(_0x47de16(0x202))/0x6*(parseInt(_0x47de16(0x309))/0x7)+-parseInt(_0x47de16(0x274))/0x8*(-parseInt(_0x47de16(0x1ac))/0x9)+-parseInt(_0x47de16(0x205))/0xa+parseInt(_0x47de16(0x20f))/0xb;if(_0x5a6429===_0x2db9c9)break;else _0x54c939['push'](_0x54c939['shift']());}catch(_0x3ca546){_0x54c939['push'](_0x54c939['shift']());}}}(a42_0x4b0d,0xa61c7));import a42_0x52dc99 from'chalk';import{existsSync}from'fs';import a42_0x5d30f9 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}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_0x3ff555 from'prompts';function getAttemptStatusDisplay(_0x4b550d){const _0x12e86c=a42_0x3b57;if(!_0x4b550d)return{'icon':'⏳','text':''};const {done:_0x28706d,success:_0x1182b4,cancelRequested:_0x264bb0}=_0x4b550d;if(!_0x28706d)return _0x264bb0?{'icon':'🛑','text':a42_0x52dc99[_0x12e86c(0x1b5)](_0x12e86c(0x163))}:{'icon':'🔄','text':a42_0x52dc99[_0x12e86c(0x1a9)](_0x12e86c(0x21b))};if(_0x1182b4)return{'icon':'✅','text':a42_0x52dc99['green']('success')};return{'icon':'❌','text':a42_0x52dc99[_0x12e86c(0x2ef)]('error')};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x53f3b2,_0x5620ee,_0x2d9dd0=0x0){const _0x414c81=a42_0x3b57;return _0x53f3b2[_0x2d9dd0]||_0x5620ee[_0x414c81(0x171)];}[a42_0x5d907a(0x24b)](_0xf780a3,_0x248d2c,_0xd03db9=0x0){const _0x77d9f4=a42_0x5d907a,_0x49857d=this[_0x77d9f4(0x2b1)](_0xf780a3,_0x248d2c,_0xd03db9);if(!_0x49857d)return console[_0x77d9f4(0x2d9)](a42_0x52dc99[_0x77d9f4(0x2ef)](_0x77d9f4(0x2f7)),_0x77d9f4(0x2f1)),console[_0x77d9f4(0x2d9)](a42_0x52dc99[_0x77d9f4(0x1bf)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x49857d;}[a42_0x5d907a(0x2a3)](_0x51b9e0,_0x1c3802){const _0x1dc3d6=a42_0x5d907a;if(_0x51b9e0[0x0]){const _0x41354e=_0x51b9e0[0x0][_0x1dc3d6(0x228)]('.');if(_0x41354e[_0x1dc3d6(0x235)]===0x1)return{'projectName':_0x41354e[0x0],'workflowName':undefined};else return _0x41354e['length']===0x2?{'projectName':_0x41354e[0x0],'workflowName':_0x41354e[0x1]}:(console[_0x1dc3d6(0x2d9)](a42_0x52dc99[_0x1dc3d6(0x2ef)](_0x1dc3d6(0x2f7)),_0x1dc3d6(0x294)),null);}return{'projectName':_0x1c3802[_0x1dc3d6(0x171)],'workflowName':undefined};}[a42_0x5d907a(0x2eb)](_0x277e4a,_0x5ab742,_0x15413e=0x0){const _0x3fd9ba=a42_0x5d907a;if(_0x277e4a[_0x15413e])return _0x277e4a[_0x15413e];if(_0x5ab742[_0x3fd9ba(0x171)]){const _0x1e38ea=a42_0x5d30f9['join'](process[_0x3fd9ba(0x262)](),_0x3fd9ba(0x30d),_0x5ab742[_0x3fd9ba(0x171)]);if(existsSync(a42_0x5d30f9['join'](_0x1e38ea,_0x3fd9ba(0x2b5))))return _0x1e38ea;}return undefined;}async['showWorkflowConsoleUrl'](_0x3aa03d,_0x3ef56f,_0x1bbfd7){const _0x192789=a42_0x5d907a;try{const _0x3ff4c6=await _0x3aa03d[_0x192789(0x2de)]['workflows'](_0x3ef56f,{'limit':0x1});if(_0x3ff4c6[_0x192789(0x235)]>0x0){const _0x378690=_0x3ff4c6[0x0]['id'],_0x120503=getWorkflowUrl(_0x1bbfd7,_0x378690);console['error'](_0x192789(0x2a4)+a42_0x52dc99['cyan'](_0x120503));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x2b8);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x239);async[a42_0x5d907a(0x1b3)](_0x5242fb){const _0x314165=a42_0x5d907a,{options:_0x493a6b,args:_0x33a256,tdx:_0x49ec21}=_0x5242fb,_0x1efa0f=_0x33a256[0x0],_0x2e43b5=_0x493a6b[_0x314165(0x29a)];if(_0x2e43b5)return saveSessionContext({'workflow_project':undefined},_0x493a6b['session']),console[_0x314165(0x1e0)](a42_0x52dc99['green'](_0x314165(0x28a))),0x0;if(!_0x1efa0f)return console['error'](a42_0x52dc99[_0x314165(0x2ef)]('Error:'),_0x314165(0x2f1)),console['error'](a42_0x52dc99[_0x314165(0x1bf)](_0x314165(0x2cd))),console[_0x314165(0x2d9)](a42_0x52dc99[_0x314165(0x1bf)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x4be569=await withSpinner(_0x314165(0x2a8)+_0x1efa0f+'\x27...',()=>_0x49ec21[_0x314165(0x2de)][_0x314165(0x1d0)](_0x1efa0f),{'verbose':_0x493a6b[_0x314165(0x211)]}),{name:_0x57bf98}=_0x4be569[_0x314165(0x187)];return saveSessionContext({'workflow_project':_0x57bf98},_0x493a6b[_0x314165(0x2e6)]),console[_0x314165(0x1e0)](a42_0x52dc99['green'](_0x314165(0x2ed)+a42_0x52dc99[_0x314165(0x22d)](_0x57bf98))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x268);[a42_0x5d907a(0x1e7)]='List\x20all\x20workflow\x20projects';async[a42_0x5d907a(0x1b3)](_0xae864){const _0x22d1c2=a42_0x5d907a,{options:_0x2f957b,args:_0x5d28ed,tdx:_0x1b9cac}=_0xae864,_0x3d91c2=_0x5d28ed[0x0];_0x2f957b[_0x22d1c2(0x211)]&&_0x3d91c2&&console[_0x22d1c2(0x2d9)](_0x22d1c2(0x20d)+_0x3d91c2);const _0x49730b=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x1b9cac['workflow'][_0x22d1c2(0x304)](_0x3d91c2,{'limit':_0x2f957b[_0x22d1c2(0x24f)]}),{'verbose':_0x2f957b[_0x22d1c2(0x211)]});let _0x69a911=_0x49730b[_0x22d1c2(0x187)];_0x69a911[_0x22d1c2(0x2cc)]((_0x4d9db6,_0x3225d1)=>_0x4d9db6[_0x22d1c2(0x1fc)][_0x22d1c2(0x200)](_0x3225d1['name']));const _0x1b848b=_0x2f957b[_0x22d1c2(0x24f)]||0x64,_0x529f30=_0x69a911[_0x22d1c2(0x235)]>=_0x1b848b?a42_0x52dc99['dim'](_0x22d1c2(0x186)):'';console[_0x22d1c2(0x2d9)](_0x22d1c2(0x1f2)+_0x69a911[_0x22d1c2(0x235)]+_0x22d1c2(0x1ec)+(_0x69a911['length']!==0x1?'s':'')+_0x529f30);if(_0x2f957b[_0x22d1c2(0x269)]===_0x22d1c2(0x26c)||_0x2f957b['format']==='jsonl'||_0x2f957b[_0x22d1c2(0x269)]==='table')await handleSDKOutput(_0x69a911,_0x2f957b);else{if(_0x69a911[_0x22d1c2(0x235)]===0x0)_0x3d91c2?console[_0x22d1c2(0x1e0)]('No\x20projects\x20match\x20pattern:\x20'+_0x3d91c2):console[_0x22d1c2(0x1e0)]('No\x20workflow\x20projects\x20found');else{const _0x3c89a9=_0x69a911['map'](_0x468dcd=>{const _0x5ac8ed=_0x22d1c2,_0x46cbb1=_0x468dcd[_0x5ac8ed(0x300)]?.[_0x5ac8ed(0x2fa)](_0x2a5427=>_0x2a5427[_0x5ac8ed(0x222)]==='sys'),_0x55230e=_0x46cbb1?a42_0x52dc99[_0x5ac8ed(0x1bf)]('\x20(system)'):'';return'📁\x20'+_0x468dcd[_0x5ac8ed(0x1fc)]+_0x55230e;});await writeOutput(_0x3c89a9[_0x22d1c2(0x275)]('\x0a'),_0x2f957b[_0x22d1c2(0x273)],_0x22d1c2(0x252));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x2e3);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x1ea);async['execute'](_0x11a40e){const _0x2ef8ce=a42_0x5d907a,{options:_0x50a955,args:_0xadfbec,tdx:_0x3b276c}=_0x11a40e,_0x1bcf50=this['resolveProject'](_0xadfbec,_0x50a955);_0x50a955['verbose']&&_0x1bcf50&&console[_0x2ef8ce(0x2d9)](_0x2ef8ce(0x2a1)+_0x1bcf50);const _0xccb6b1=await withSpinner(_0x2ef8ce(0x25d),()=>_0x3b276c[_0x2ef8ce(0x2de)]['workflows'](_0x1bcf50,{'limit':_0x50a955['limit']}),{'verbose':_0x50a955['verbose']});let _0x2e9c3e=_0xccb6b1['data'];_0x2e9c3e[_0x2ef8ce(0x2cc)]((_0x172337,_0x4ee12d)=>{const _0x1699a2=_0x2ef8ce,_0x2996c9=_0x172337['name'][_0x1699a2(0x200)](_0x4ee12d[_0x1699a2(0x1fc)]);if(_0x2996c9!==0x0)return _0x2996c9;return(_0x172337[_0x1699a2(0x167)]?.['name']||'')[_0x1699a2(0x200)](_0x4ee12d['project']?.['name']||'');});const _0x30ef3a=_0x50a955[_0x2ef8ce(0x24f)]||0x64,_0x54e792=_0x2e9c3e[_0x2ef8ce(0x235)]>=_0x30ef3a?a42_0x52dc99[_0x2ef8ce(0x1bf)](_0x2ef8ce(0x186)):'';console['error'](_0x2ef8ce(0x1f2)+_0x2e9c3e[_0x2ef8ce(0x235)]+_0x2ef8ce(0x1b0)+(_0x2e9c3e['length']!==0x1?'s':'')+_0x54e792);if(_0x50a955['format']===_0x2ef8ce(0x26c)||_0x50a955[_0x2ef8ce(0x269)]===_0x2ef8ce(0x2ce)||_0x50a955[_0x2ef8ce(0x269)]===_0x2ef8ce(0x233))await handleSDKOutput(_0x2e9c3e,_0x50a955);else{if(_0x2e9c3e[_0x2ef8ce(0x235)]===0x0)_0x1bcf50?console[_0x2ef8ce(0x1e0)](_0x2ef8ce(0x23d)+_0x1bcf50):console[_0x2ef8ce(0x1e0)](_0x2ef8ce(0x21f));else{const _0x1b272d=_0x50a955[_0x2ef8ce(0x2f0)],_0x4ac2cd=_0x2e9c3e[_0x2ef8ce(0x18a)](_0x113d62=>{const _0x56f9f6=_0x2ef8ce,_0x57b9f6=a42_0x52dc99['dim']('#'+_0x113d62['id']),_0x2b3d05=hyperlink(_0x57b9f6,getWorkflowUrl(_0x1b272d,_0x113d62['id'])),_0x4276f3=_0x113d62[_0x56f9f6(0x167)]?.[_0x56f9f6(0x1fc)]?a42_0x52dc99[_0x56f9f6(0x1bf)]('\x20('+_0x113d62[_0x56f9f6(0x167)][_0x56f9f6(0x1fc)]+')'):'';return'📋\x20'+_0x2b3d05+'\x20'+_0x113d62[_0x56f9f6(0x1fc)]+_0x4276f3;});await writeOutput(_0x4ac2cd[_0x2ef8ce(0x275)]('\x0a'),_0x50a955[_0x2ef8ce(0x273)],_0x2ef8ce(0x252));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x1c8);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x1a2);async[a42_0x5d907a(0x1b3)](_0x173eb7){const _0x767d5d=a42_0x5d907a,{options:_0x46a9a7,args:_0x1747b6,tdx:_0x462d08}=_0x173eb7,_0x13a51c=this[_0x767d5d(0x2a3)](_0x1747b6,_0x46a9a7);if(!_0x13a51c)return 0x1;const {projectName:_0x1b18ed,workflowName:_0x5862bc}=_0x13a51c;if(_0x46a9a7[_0x767d5d(0x211)]){if(_0x1b18ed&&_0x5862bc)console[_0x767d5d(0x2d9)](_0x767d5d(0x1f4)+_0x1b18ed+'.'+_0x5862bc);else _0x1b18ed&&console[_0x767d5d(0x2d9)](_0x767d5d(0x196)+_0x1b18ed);const _0xbf19fa=_0x46a9a7[_0x767d5d(0x2b3)];_0xbf19fa&&console['error'](_0x767d5d(0x21c)+_0xbf19fa);}let _0x172382=0x28;if(process['stdout'][_0x767d5d(0x1fb)]&&!_0x46a9a7['output']&&!_0x46a9a7[_0x767d5d(0x269)]){const _0x268cfe=process[_0x767d5d(0x286)][_0x767d5d(0x29e)]||0x28;_0x172382=Math[_0x767d5d(0x1e3)](0x14,Math[_0x767d5d(0x1d9)](_0x268cfe*0x2/0x3));}const _0x357d5a=_0x46a9a7[_0x767d5d(0x24f)]||_0x172382,_0x557581=await withSpinner(_0x767d5d(0x263),()=>_0x462d08[_0x767d5d(0x2de)][_0x767d5d(0x213)]({'projectName':_0x1b18ed,'workflowName':_0x5862bc,'status':_0x46a9a7['status'],'fromTime':_0x46a9a7[_0x767d5d(0x243)],'toTime':_0x46a9a7['to'],'limit':_0x357d5a}),{'verbose':_0x46a9a7['verbose']}),_0x11cdd8=_0x557581[_0x767d5d(0x187)];_0x11cdd8[_0x767d5d(0x2cc)]((_0x3f40e9,_0x50d274)=>{const _0x285822=_0x767d5d,_0x30bfb8=_0x3f40e9[_0x285822(0x27a)]||'',_0x42fab9=_0x50d274[_0x285822(0x27a)]||'';return _0x42fab9[_0x285822(0x200)](_0x30bfb8);});_0x11cdd8[_0x767d5d(0x235)]>=_0x357d5a?console['error'](_0x767d5d(0x225)+_0x11cdd8[_0x767d5d(0x235)]+'\x20sessions\x20'+a42_0x52dc99['dim']('(use\x20--limit\x20to\x20see\x20more)')):console['error']('✔\x20Found\x20'+_0x11cdd8['length']+'\x20session'+(_0x11cdd8[_0x767d5d(0x235)]!==0x1?'s':''));if(_0x46a9a7[_0x767d5d(0x269)]===_0x767d5d(0x26c)||_0x46a9a7[_0x767d5d(0x269)]==='jsonl'||_0x46a9a7[_0x767d5d(0x269)]===_0x767d5d(0x233))await handleSDKOutput(_0x11cdd8,_0x46a9a7);else{if(!process[_0x767d5d(0x286)][_0x767d5d(0x1fb)]||_0x46a9a7[_0x767d5d(0x273)]){if(_0x11cdd8['length']===0x0){if(_0x1b18ed&&_0x5862bc)console[_0x767d5d(0x1e0)]('No\x20sessions\x20found\x20for:\x20'+_0x1b18ed+'.'+_0x5862bc);else _0x1b18ed?console[_0x767d5d(0x1e0)](_0x767d5d(0x28d)+_0x1b18ed):console[_0x767d5d(0x1e0)](_0x767d5d(0x2c6));}else{const _0x321922=_0x46a9a7[_0x767d5d(0x2f0)],_0x44eab4=this[_0x767d5d(0x2ad)](_0x11cdd8,_0x321922);_0x46a9a7[_0x767d5d(0x273)]?await writeOutput(_0x44eab4,_0x46a9a7[_0x767d5d(0x273)],'list'):console[_0x767d5d(0x1e0)](_0x44eab4);}!_0x1b18ed&&(console['error'](''),console[_0x767d5d(0x2d9)](a42_0x52dc99[_0x767d5d(0x1bf)](_0x767d5d(0x253))),console[_0x767d5d(0x2d9)](a42_0x52dc99[_0x767d5d(0x1bf)](_0x767d5d(0x236))+'or'+a42_0x52dc99['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x11cdd8['length']===0x0){if(_0x1b18ed&&_0x5862bc)console[_0x767d5d(0x1e0)](_0x767d5d(0x185)+_0x1b18ed+'.'+_0x5862bc);else _0x1b18ed?console[_0x767d5d(0x1e0)](_0x767d5d(0x28d)+_0x1b18ed):console[_0x767d5d(0x1e0)](_0x767d5d(0x2c6));}else await this[_0x767d5d(0x189)](_0x11cdd8,_0x173eb7,_0x1b18ed);}}return 0x0;}[a42_0x5d907a(0x2ad)](_0x4a3e41,_0x5c7af9){const _0x2f4fa5=a42_0x5d907a,_0x58712e=[],_0x5acde8=new Map();let _0x3d0f76=Infinity,_0x1d3375=-Infinity;for(const _0x25e7b3 of _0x4a3e41){if(_0x25e7b3[_0x2f4fa5(0x276)]?.[_0x2f4fa5(0x2a5)]){const _0x5cd540=new Date(_0x25e7b3[_0x2f4fa5(0x276)]['createdAt'])[_0x2f4fa5(0x2f8)](),_0x1f5b44=_0x25e7b3[_0x2f4fa5(0x276)]['finishedAt']?new Date(_0x25e7b3[_0x2f4fa5(0x276)][_0x2f4fa5(0x169)])[_0x2f4fa5(0x2f8)]():Date[_0x2f4fa5(0x296)](),_0x1f3946=_0x25e7b3[_0x2f4fa5(0x167)]?.[_0x2f4fa5(0x1fc)]||_0x2f4fa5(0x1ff);!_0x5acde8[_0x2f4fa5(0x282)](_0x1f3946)&&_0x5acde8[_0x2f4fa5(0x2bc)](_0x1f3946,[]),_0x5acde8['get'](_0x1f3946)['push']({'session':_0x25e7b3,'startTime':_0x5cd540,'endTime':_0x1f5b44,'duration':_0x1f5b44-_0x5cd540}),_0x3d0f76=Math[_0x2f4fa5(0x221)](_0x3d0f76,_0x5cd540),_0x1d3375=Math[_0x2f4fa5(0x1e3)](_0x1d3375,_0x1f5b44);}}if(_0x5acde8[_0x2f4fa5(0x17b)]===0x0)return _0x2f4fa5(0x1d6);const _0x156c03=process['stdout'][_0x2f4fa5(0x19f)]||0x78,_0x306e97=0x1e,_0x1610b6=0x32,_0x4be246=0x4,_0x341817=Math[_0x2f4fa5(0x221)](_0x1610b6,Math[_0x2f4fa5(0x1e3)](_0x306e97,Math[_0x2f4fa5(0x1d9)](_0x156c03*0.3))),_0x491fa6=_0x156c03-_0x341817-TIMELINE_CONFIG[_0x2f4fa5(0x1e5)]-0x3-_0x4be246,_0x2287c7=_0x1d3375-_0x3d0f76,_0x37fe94=_0x2287c7/_0x341817,_0x402e8e=renderTimeAxis({'startTime':_0x3d0f76,'endTime':_0x1d3375,'durationMs':_0x2287c7,'msPerChar':_0x37fe94},_0x341817),_0xb2ca42=[];for(const _0x815aca of _0x5acde8[_0x2f4fa5(0x2f4)]()){_0xb2ca42[_0x2f4fa5(0x19c)](..._0x815aca);}_0xb2ca42[_0x2f4fa5(0x2cc)]((_0x19e008,_0x3510ac)=>_0x3510ac['startTime']-_0x19e008[_0x2f4fa5(0x2dc)]);const _0x232636=new Date(_0x3d0f76),_0xc6524f=formatDate(_0x232636),_0x4eb658=_0x4be246+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x2f4fa5(0x20a)]+_0x491fa6,_0x51f9e6='\x20'[_0x2f4fa5(0x2a7)](_0x4eb658-_0xc6524f[_0x2f4fa5(0x235)]),_0xf9ebc6=_0x51f9e6+a42_0x52dc99['dim'](_0xc6524f)+'\x20'+_0x402e8e;_0x58712e[_0x2f4fa5(0x19c)](_0xf9ebc6);const _0x26f43d=0x16;let _0x17194a=0x0;for(const _0x3654db of _0xb2ca42){const _0x29cd50=_0x3654db[_0x2f4fa5(0x2e6)][_0x2f4fa5(0x167)]?.[_0x2f4fa5(0x1fc)]||'?',_0x571792=Math[_0x2f4fa5(0x221)](stringWidth(_0x29cd50),_0x26f43d);_0x17194a=Math['max'](_0x17194a,_0x571792);}for(const _0x56c60e of _0xb2ca42){const {session:_0x2f2293,startTime:_0x1b2e0e,endTime:_0x347209,duration:_0x304bb1}=_0x56c60e,_0x2f0f99=_0x2f2293[_0x2f4fa5(0x167)]?.['id'],_0x4eae9f=_0x2f2293['id'],_0x4ab130=_0x2f2293[_0x2f4fa5(0x167)]?.[_0x2f4fa5(0x1fc)]||'?',_0x5b005d=_0x2f2293['workflow']?.[_0x2f4fa5(0x1fc)]||'?';let _0x44128d,_0xe6756d;if(_0x2f2293[_0x2f4fa5(0x276)]){const _0x12538b=_0x2f2293[_0x2f4fa5(0x276)];!_0x12538b[_0x2f4fa5(0x2b9)]?(_0x44128d=_0x12538b[_0x2f4fa5(0x295)]?'🛑':'🔄',_0xe6756d=_0x12538b[_0x2f4fa5(0x295)]?a42_0x52dc99['yellow']:a42_0x52dc99['blue']):(_0x44128d=_0x12538b['success']?'✅':'❌',_0xe6756d=_0x12538b[_0x2f4fa5(0x25c)]?a42_0x52dc99[_0x2f4fa5(0x164)]:a42_0x52dc99[_0x2f4fa5(0x2ef)]);}else _0x44128d='⏳',_0xe6756d=a42_0x52dc99['dim'];const _0x4a2007='#'+_0x4eae9f,_0x298cbd=_0x2f0f99?hyperlink(_0x4a2007,getWorkflowSessionUrl(_0x5c7af9,_0x2f0f99,_0x4eae9f)):_0x4a2007;let _0x3fd187=_0x4ab130;stringWidth(_0x4ab130)>_0x26f43d&&(_0x3fd187=_0x4ab130[_0x2f4fa5(0x1f7)](0x0,_0x26f43d-0x1)+'…');const _0x1127a0=a42_0x52dc99[_0x2f4fa5(0x1bf)](_0x3fd187),_0x19f44c=stringWidth(_0x3fd187),_0x52d41c='\x20'[_0x2f4fa5(0x2a7)](_0x17194a-stringWidth(_0x3fd187)+0x2),_0x1368d7='('+formatElapsed(_0x304bb1)+')',_0x8a6225=stringWidth(_0x1368d7),_0x57b3a1=stringWidth(_0x4a2007),_0x2969e4=_0x57b3a1+0x1+_0x19f44c+_0x52d41c[_0x2f4fa5(0x235)],_0x5ba543=_0x491fa6-_0x2969e4-_0x8a6225-0x1-0x8;let _0x3f5028=_0x5b005d;stringWidth(_0x3f5028)>_0x5ba543&&(_0x3f5028=_0x3f5028[_0x2f4fa5(0x1f7)](0x0,_0x5ba543-0x1)+'…');const _0x2c2594=_0x298cbd+'\x20'+_0x1127a0+_0x52d41c+_0x3f5028,_0xc4cff3=stringWidth(_0x2c2594),_0x545006=_0x491fa6-_0xc4cff3-_0x8a6225,_0x522486=_0x2c2594+'\x20'[_0x2f4fa5(0x2a7)](Math[_0x2f4fa5(0x1e3)](0x1,_0x545006))+a42_0x52dc99[_0x2f4fa5(0x1bf)](_0x1368d7),_0x18b32b=Math[_0x2f4fa5(0x1d9)]((_0x1b2e0e-_0x3d0f76)/_0x37fe94),_0x4f10d6=Math['floor']((_0x347209-_0x3d0f76)/_0x37fe94),_0x5cf4a1=Math['max'](_0x18b32b+0x1,_0x4f10d6),_0xe03f06=new Array(_0x341817)[_0x2f4fa5(0x23a)]('\x20');for(let _0x2b6dae=_0x18b32b;_0x2b6dae<Math[_0x2f4fa5(0x221)](_0x5cf4a1,_0x341817);_0x2b6dae++){_0xe03f06[_0x2b6dae]='─';}const _0x5967b7=_0xe03f06[_0x2f4fa5(0x18a)](_0x1f49e6=>_0x1f49e6==='\x20'?'\x20':_0xe6756d(_0x1f49e6))[_0x2f4fa5(0x275)]('');_0x58712e[_0x2f4fa5(0x19c)](_0x44128d+'\x20'+_0x522486+'│'+_0x5967b7+'│');}return _0x58712e[_0x2f4fa5(0x275)]('\x0a');}async[a42_0x5d907a(0x189)](_0x10579a,_0x3403e1,_0x4e5d1b){const _0x3e582e=a42_0x5d907a,{options:_0x1a13c4,tdx:_0x36f8dd}=_0x3403e1,_0x5babaf=_0x1a13c4[_0x3e582e(0x2f0)],{timelineRows:_0x1e275d,timeAxisHeader:_0x4d6beb}=this[_0x3e582e(0x175)](_0x10579a,_0x5babaf),_0x2319c4=_0x1e275d['filter'](_0x420b5e=>_0x420b5e[_0x3e582e(0x230)]);if(_0x2319c4[_0x3e582e(0x235)]===0x0){const _0x568fdb=this[_0x3e582e(0x2ad)](_0x10579a,_0x5babaf);console['log'](_0x568fdb);!_0x4e5d1b&&(console[_0x3e582e(0x2d9)](''),console['error'](a42_0x52dc99[_0x3e582e(0x1bf)](_0x3e582e(0x253))),console[_0x3e582e(0x2d9)](a42_0x52dc99[_0x3e582e(0x1bf)](_0x3e582e(0x236))+'or'+a42_0x52dc99['dim'](_0x3e582e(0x2b4))));return;}_0x4d6beb&&console[_0x3e582e(0x1e0)](_0x4d6beb);const _0x19b649=_0x1e275d[_0x3e582e(0x1af)](_0x3ecbac=>_0x3ecbac[_0x3e582e(0x230)])[_0x3e582e(0x18a)](_0xb9c2d0=>({'title':_0xb9c2d0[_0x3e582e(0x1cd)],'value':_0xb9c2d0[_0x3e582e(0x230)]})),_0x306dcf=process[_0x3e582e(0x286)]['rows']||0x3c,_0x13bff7=Math[_0x3e582e(0x1e3)](0x28,Math[_0x3e582e(0x1d9)](_0x306dcf*0x2/0x3)),_0x784b3c=await a42_0x3ff555({'type':_0x3e582e(0x201),'name':_0x3e582e(0x230),'message':_0x3e582e(0x183),'choices':_0x19b649,'initial':-0x1,'limit':_0x13bff7,'clearFirst':!![],'fallback':{'title':_0x3e582e(0x23c),'value':null},'suggest':(_0x3ea75f,_0x8cd7e5)=>{const _0x3880e4=_0x3e582e;if(!_0x3ea75f)return Promise[_0x3880e4(0x284)](_0x8cd7e5);const _0xfedfcc=_0x8cd7e5[_0x3880e4(0x1af)](_0x40fb57=>{const _0x2c34ce=_0x3880e4,_0x49b90b=_0x40fb57;return _0x49b90b[_0x2c34ce(0x280)][_0x2c34ce(0x2fc)]()[_0x2c34ce(0x28f)](_0x3ea75f['toLowerCase']());});return Promise[_0x3880e4(0x284)](_0xfedfcc);}}),_0x5efd79=()=>{const _0x12b179=_0x3e582e;process[_0x12b179(0x286)]['write'](_0x12b179(0x30b)),process[_0x12b179(0x286)]['write'](_0x12b179(0x30b)),process[_0x12b179(0x286)][_0x12b179(0x2ec)](_0x12b179(0x30b));},_0x2801f7=_0x784b3c&&_0x784b3c[_0x3e582e(0x230)]&&_0x784b3c[_0x3e582e(0x230)]!==null&&_0x784b3c['attemptId'][_0x3e582e(0x184)]()!=='';if(!_0x2801f7){_0x5efd79(),console[_0x3e582e(0x1e0)](a42_0x52dc99[_0x3e582e(0x1bf)]('Cancelled'));return;}_0x5efd79();const _0x49e3a1=_0x10579a[_0x3e582e(0x206)](_0x120cb9=>_0x120cb9[_0x3e582e(0x276)]?.['id']===_0x784b3c[_0x3e582e(0x230)]);if(_0x49e3a1){const _0x33db42=_0x49e3a1[_0x3e582e(0x167)]?.[_0x3e582e(0x1fc)]||'?',_0x1bcfe3=_0x49e3a1[_0x3e582e(0x2de)]?.['name']||'?';console[_0x3e582e(0x1e0)](_0x3e582e(0x1de)+a42_0x52dc99[_0x3e582e(0x1bf)](_0x33db42)+',\x20Workflow:\x20'+a42_0x52dc99[_0x3e582e(0x1bf)](_0x1bcfe3));}const _0x4d1dce=new WorkflowTimelineCommand();await _0x4d1dce[_0x3e582e(0x1b3)]({'args':[],'options':{..._0x1a13c4,'attemptId':_0x784b3c[_0x3e582e(0x230)]},'tdx':_0x36f8dd});}[a42_0x5d907a(0x175)](_0x5bfeec,_0x3c120c){const _0x3722c8=a42_0x5d907a,_0x856597=new Map();for(const _0x52d8ca of _0x5bfeec){_0x52d8ca['id']&&_0x52d8ca['lastAttempt']?.['id']&&_0x856597['set'](_0x52d8ca['id'],_0x52d8ca[_0x3722c8(0x276)]['id']);}const _0x2dbbcc=[];let _0x3cc0fc='';const _0x3cc2df=this[_0x3722c8(0x2ad)](_0x5bfeec,_0x3c120c),_0x4ac366=_0x3cc2df[_0x3722c8(0x228)]('\x0a');for(const _0x51ed5f of _0x4ac366){if(_0x51ed5f['startsWith'](_0x3722c8(0x1c9))||_0x51ed5f[_0x3722c8(0x19a)](/^\s+\d{4}-\d{2}-\d{2}/))_0x3cc0fc=_0x51ed5f;else{if(_0x51ed5f[_0x3722c8(0x19a)](/^[✅❌🔄🛑⏳]/)){const _0x2390c1=_0x51ed5f[_0x3722c8(0x19a)](/#(\d+)/),_0x5d2301=_0x2390c1?_0x2390c1[0x1]:null,_0x511f50=_0x5d2301?_0x856597[_0x3722c8(0x2f3)](_0x5d2301)||null:null,_0x10950f=_0x5bfeec[_0x3722c8(0x206)](_0x5ab3f1=>_0x5ab3f1['id']===_0x5d2301),_0x1a5d0c=_0x10950f?.[_0x3722c8(0x167)]?.['name']||'';_0x2dbbcc[_0x3722c8(0x19c)]({'displayLine':_0x51ed5f,'attemptId':_0x511f50,'projectName':_0x1a5d0c});}}}return{'timelineRows':_0x2dbbcc,'timeAxisHeader':_0x3cc0fc};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x195);['description']=a42_0x5d907a(0x16b);async['execute'](_0x51356c){const _0x262b45=a42_0x5d907a,{options:_0x17d5e9,args:_0x3dfc4d,tdx:_0xaa9f5d}=_0x51356c,_0xcdfe9a=this['parseProjectWorkflowPattern'](_0x3dfc4d,_0x17d5e9);if(!_0xcdfe9a)return 0x1;const {projectName:_0x5f20d7,workflowName:_0x4e371c}=_0xcdfe9a,_0x24a343=_0x17d5e9[_0x262b45(0x1d3)];if(_0x17d5e9[_0x262b45(0x211)]){if(_0x5f20d7&&_0x4e371c)console[_0x262b45(0x2d9)](_0x262b45(0x1f4)+_0x5f20d7+'.'+_0x4e371c);else _0x5f20d7&&console['error'](_0x262b45(0x196)+_0x5f20d7);_0x24a343&&console[_0x262b45(0x2d9)](_0x262b45(0x20e));}const _0x52a720=await withSpinner(_0x262b45(0x2bf),()=>_0xaa9f5d[_0x262b45(0x2de)][_0x262b45(0x18c)]({'projectName':_0x5f20d7,'workflowName':_0x4e371c,'includeRetried':_0x24a343,'limit':_0x17d5e9['limit']}),{'verbose':_0x17d5e9[_0x262b45(0x211)]}),_0x5a8387=_0x52a720[_0x262b45(0x187)],_0x151dea=_0x17d5e9[_0x262b45(0x24f)]||0x64,_0x47cdaf=_0x5a8387[_0x262b45(0x235)]>=_0x151dea?a42_0x52dc99[_0x262b45(0x1bf)](_0x262b45(0x186)):'';console['error'](_0x262b45(0x1f2)+_0x5a8387[_0x262b45(0x235)]+'\x20attempt'+(_0x5a8387[_0x262b45(0x235)]!==0x1?'s':'')+_0x47cdaf);if(_0x17d5e9[_0x262b45(0x269)]===_0x262b45(0x26c)||_0x17d5e9[_0x262b45(0x269)]===_0x262b45(0x2ce)||_0x17d5e9['format']===_0x262b45(0x233))await handleSDKOutput(_0x5a8387,_0x17d5e9);else{if(_0x5a8387[_0x262b45(0x235)]===0x0){if(_0x5f20d7&&_0x4e371c)console[_0x262b45(0x1e0)](_0x262b45(0x2e7)+_0x5f20d7+'.'+_0x4e371c);else _0x5f20d7?console[_0x262b45(0x1e0)](_0x262b45(0x1bb)+_0x5f20d7):console[_0x262b45(0x1e0)](_0x262b45(0x2e2));}else{const _0x2ce4dc=_0x17d5e9[_0x262b45(0x2f0)],_0xa5a361=_0x5a8387[_0x262b45(0x18a)](_0x2cd4ab=>{const _0x39f754=_0x262b45,_0x39217c=a42_0x52dc99[_0x39f754(0x1bf)]('#'+_0x2cd4ab['id']),_0x4b48be=_0x2cd4ab[_0x39f754(0x167)]?.['id'],_0x442ccb=_0x2cd4ab[_0x39f754(0x1d8)]||_0x2cd4ab[_0x39f754(0x1f6)],_0x5a55f4=_0x4b48be&&_0x442ccb?hyperlink(_0x39217c,getWorkflowAttemptUrl(_0x2ce4dc,_0x4b48be,_0x442ccb,_0x2cd4ab['id'])):_0x39217c,{icon:_0x1024af,text:_0x5422cc}=getAttemptStatusDisplay(_0x2cd4ab),_0x4f1f1a=(_0x2cd4ab['project']?.['name']||'?')+'.'+(_0x2cd4ab[_0x39f754(0x2de)]?.[_0x39f754(0x1fc)]||'?'),_0x372c83=_0x2cd4ab['sessionTime']?a42_0x52dc99[_0x39f754(0x1bf)](_0x2cd4ab[_0x39f754(0x27a)]):'';return(_0x5a55f4+'\x20'+_0x1024af+(_0x5422cc?'\x20'+_0x5422cc:'')+'\x20'+_0x4f1f1a+'\x20'+_0x372c83)[_0x39f754(0x292)]();});await writeOutput(_0xa5a361[_0x262b45(0x275)]('\x0a'),_0x17d5e9[_0x262b45(0x273)],_0x262b45(0x252));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a42_0x5d907a(0x250);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x2af);async[a42_0x5d907a(0x1b3)](_0x225034){const _0x4d47e5=a42_0x5d907a,{options:_0x21a8b6,args:_0x7d8549,tdx:_0x33f7f3}=_0x225034,_0x46efdb=_0x7d8549[0x0];if(!_0x46efdb)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x21a8b6['verbose']&&console[_0x4d47e5(0x2d9)]('Attempt\x20ID:\x20'+_0x46efdb);const _0x450691=await withSpinner(_0x4d47e5(0x18f),()=>_0x33f7f3['workflow']['attempt'](_0x46efdb),{'verbose':_0x21a8b6[_0x4d47e5(0x211)]}),_0x18a703=_0x450691[_0x4d47e5(0x187)];let _0x56e8b1;!_0x18a703[_0x4d47e5(0x2b9)]?_0x56e8b1=_0x18a703[_0x4d47e5(0x295)]?_0x4d47e5(0x163):_0x4d47e5(0x21b):_0x56e8b1=_0x18a703[_0x4d47e5(0x25c)]?'success':_0x4d47e5(0x2d9);let _0x1f8a4a;if(_0x18a703[_0x4d47e5(0x2a5)]&&_0x18a703['finishedAt']){const _0x33b23a=new Date(_0x18a703[_0x4d47e5(0x2a5)])[_0x4d47e5(0x2f8)](),_0x3fd2f4=new Date(_0x18a703['finishedAt'])['getTime']();_0x1f8a4a=Math['round']((_0x3fd2f4-_0x33b23a)/0x3e8);}const _0x4cc807={'attempt_id':_0x18a703['id'],'status':_0x56e8b1,..._0x18a703[_0x4d47e5(0x2e8)]!==undefined&&{'index':_0x18a703['index']},..._0x18a703[_0x4d47e5(0x167)]&&{'project':_0x18a703['project']['name']},..._0x18a703[_0x4d47e5(0x2de)]&&{'workflow':_0x18a703['workflow'][_0x4d47e5(0x1fc)]},..._0x18a703[_0x4d47e5(0x1f6)]&&{'session_id':_0x18a703[_0x4d47e5(0x1f6)]},..._0x18a703[_0x4d47e5(0x27a)]&&{'session_time':_0x18a703[_0x4d47e5(0x27a)]},..._0x18a703[_0x4d47e5(0x272)]&&{'retry_attempt':_0x18a703[_0x4d47e5(0x272)]},..._0x1f8a4a!==undefined&&{'duration_sec':_0x1f8a4a},..._0x18a703[_0x4d47e5(0x2a5)]&&{'created_at':_0x18a703[_0x4d47e5(0x2a5)]},..._0x18a703[_0x4d47e5(0x169)]&&{'finished_at':_0x18a703[_0x4d47e5(0x169)]},...Object['keys'](_0x18a703['params'])['length']>0x0&&{'params':_0x18a703[_0x4d47e5(0x16a)]}};return await handleSingleObjectOutput(_0x4cc807,_0x21a8b6),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a42_0x5d907a(0x2d3);[a42_0x5d907a(0x1e7)]='Show\x20tasks\x20for\x20an\x20attempt';async['execute'](_0x39a36e){const _0x1a085b=a42_0x5d907a,{options:_0x4e8903,args:_0x519983,tdx:_0x240c50}=_0x39a36e,_0x4519d0=_0x519983[0x0];if(!_0x4519d0)return console[_0x1a085b(0x2d9)](_0x1a085b(0x2c9)),0x1;const _0x1bfcc8=_0x4e8903['includeSubtasks'];_0x4e8903['verbose']&&(console['error']('Attempt\x20ID:\x20'+_0x4519d0),_0x1bfcc8&&console[_0x1a085b(0x2d9)](_0x1a085b(0x25e)));const _0xc74a50=await withSpinner(_0x1a085b(0x2ae),()=>_0x240c50[_0x1a085b(0x2de)][_0x1a085b(0x24a)](_0x4519d0,_0x1bfcc8||![]),{'verbose':_0x4e8903[_0x1a085b(0x211)]}),_0x60b801=_0xc74a50[_0x1a085b(0x187)];return console[_0x1a085b(0x2d9)](_0x1a085b(0x1f2)+_0x60b801[_0x1a085b(0x235)]+_0x1a085b(0x240)+(_0x60b801[_0x1a085b(0x235)]!==0x1?'s':'')),await handleSDKOutput(_0x60b801,_0x4e8903),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]='workflow:logs';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x265);async['execute'](_0x1cef88){const _0x72a90f=a42_0x5d907a,{options:_0xe10f20,args:_0x12a590,tdx:_0xace8db}=_0x1cef88,_0x52233c=_0x12a590[0x0];let _0xf6932f=_0x12a590[0x1];if(!_0x52233c)return console[_0x72a90f(0x2d9)](_0x72a90f(0x2c9)),0x1;_0xe10f20[_0x72a90f(0x211)]&&(console[_0x72a90f(0x2d9)](_0x72a90f(0x2cf)+_0x52233c),_0xf6932f&&console[_0x72a90f(0x2d9)](_0x72a90f(0x259)+_0xf6932f));const _0x2876a5=await withSpinner(_0x72a90f(0x2bb),()=>_0xace8db[_0x72a90f(0x2de)]['logFiles'](_0x52233c,_0xf6932f),{'verbose':_0xe10f20[_0x72a90f(0x211)]}),_0x479d62=_0x2876a5[_0x72a90f(0x187)];if(_0x479d62[_0x72a90f(0x235)]===0x0)return console[_0x72a90f(0x2d9)](_0x72a90f(0x2f2)),0x0;if(!_0xf6932f&&(_0xe10f20[_0x72a90f(0x26c)]||_0xe10f20[_0x72a90f(0x269)]))return await handleSDKOutput(_0x479d62,_0xe10f20),0x0;if(!_0xf6932f){const _0x592d8d=_0x479d62[_0x72a90f(0x18a)](_0x399a74=>({'title':_0x399a74[_0x72a90f(0x178)]+'\x20('+formatBytes(_0x399a74['fileSize'])+')','value':_0x399a74[_0x72a90f(0x178)]})),_0x2c18a0=await a42_0x3ff555({'type':'select','name':_0x72a90f(0x237),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x592d8d});if(!_0x2c18a0[_0x72a90f(0x237)])return console[_0x72a90f(0x2d9)]('Cancelled'),0x0;_0xf6932f=_0x2c18a0['task'];}const _0x5abd57=await withSpinner('Downloading\x20logs...',()=>_0xace8db['workflow'][_0x72a90f(0x180)](_0x52233c,_0xf6932f),{'verbose':_0xe10f20[_0x72a90f(0x211)]}),_0x3cc08c=_0x5abd57[_0x72a90f(0x187)];return _0x3cc08c?console[_0x72a90f(0x1e0)](_0x3cc08c):console[_0x72a90f(0x2d9)](_0x72a90f(0x19d)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a42_0x5d907a(0x293);[a42_0x5d907a(0x1e7)]='Kill\x20a\x20running\x20attempt';async[a42_0x5d907a(0x1b3)](_0x240470){const _0xf0cbf=a42_0x5d907a,{options:_0x4602a2,args:_0x5f05ac,tdx:_0x1c40e8}=_0x240470,_0x21539e=_0x5f05ac[0x0];if(!_0x21539e)return console[_0xf0cbf(0x2d9)](_0xf0cbf(0x2c9)),0x1;const _0x1d3957=_0x4602a2['reason'];_0x4602a2[_0xf0cbf(0x211)]&&(console[_0xf0cbf(0x2d9)](_0xf0cbf(0x2cf)+_0x21539e),_0x1d3957&&console[_0xf0cbf(0x2d9)](_0xf0cbf(0x215)+_0x1d3957));if(!_0x4602a2['yes']){const _0x52a8b4=await confirmKey(_0xf0cbf(0x21e)+_0x21539e+'?');if(!_0x52a8b4)return console[_0xf0cbf(0x2d9)](_0xf0cbf(0x209)),0x0;}const _0x203864=await withSpinner(_0xf0cbf(0x1d7),()=>_0x1c40e8['workflow'][_0xf0cbf(0x28e)](_0x21539e,_0x1d3957),{'verbose':_0x4602a2['verbose']}),_0x45a8ad=_0x203864[_0xf0cbf(0x187)];return console[_0xf0cbf(0x2d9)]('✔\x20'+_0x45a8ad),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]='workflow:retry';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x27f);async[a42_0x5d907a(0x1b3)](_0x7fefaf){const _0x5d19c2=a42_0x5d907a,{options:_0xac0159,args:_0x8bbf9f,tdx:_0x2e8094}=_0x7fefaf,_0x30cb3e=_0x8bbf9f[0x0];if(!_0x30cb3e)return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x1b1)),console[_0x5d19c2(0x2d9)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x537b7e=![],_0x564a3b=_0x30cb3e;if(_0x30cb3e[_0x5d19c2(0x220)]('session:'))_0x537b7e=!![],_0x564a3b=_0x30cb3e[_0x5d19c2(0x1dd)](0x8);else{if(_0x30cb3e[_0x5d19c2(0x220)]('attempt:'))_0x537b7e=![],_0x564a3b=_0x30cb3e[_0x5d19c2(0x1dd)](0x8);else return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x2df)),console['error'](_0x5d19c2(0x1d4)),0x1;}const _0x5d4bbb=_0xac0159[_0x5d19c2(0x27b)],_0x392b5c=_0xac0159[_0x5d19c2(0x1c4)],_0x3d1dce=_0xac0159[_0x5d19c2(0x16a)],_0x263766=_0xac0159[_0x5d19c2(0x2d7)];_0xac0159[_0x5d19c2(0x211)]&&(console['error'](_0x5d19c2(0x203)+(_0x537b7e?_0x5d19c2(0x2e6):'attempt')+'\x20'+_0x564a3b),_0x5d4bbb&&console[_0x5d19c2(0x2d9)]('From\x20task:\x20'+_0x5d4bbb),_0x392b5c&&console[_0x5d19c2(0x2d9)]('Resume\x20from:\x20'+_0x392b5c),_0x3d1dce&&console[_0x5d19c2(0x2d9)](_0x5d19c2(0x1c6)+_0x3d1dce),_0x263766&&console[_0x5d19c2(0x2d9)](_0x5d19c2(0x1a5)));let _0x525eb5;if(_0x3d1dce)try{if(_0x3d1dce[_0x5d19c2(0x220)]('@')){const _0x22a014=await import(_0x5d19c2(0x267)),_0x23572a=_0x3d1dce[_0x5d19c2(0x1dd)](0x1),_0x549734=await _0x22a014[_0x5d19c2(0x307)](_0x23572a,_0x5d19c2(0x1d1));_0x525eb5=JSON['parse'](_0x549734);}else _0x525eb5=JSON[_0x5d19c2(0x1fa)](_0x3d1dce);}catch{return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x22e)),0x1;}if(!_0xac0159[_0x5d19c2(0x219)]){const _0x50514e=await confirmKey(_0x5d19c2(0x2b0)+(_0x537b7e?'session':_0x5d19c2(0x247))+'\x20'+_0x564a3b+'?');if(!_0x50514e)return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x209)),0x0;}let _0x58203c;_0x537b7e?_0x58203c=await withSpinner(_0x5d19c2(0x24c),()=>_0x2e8094[_0x5d19c2(0x2de)]['retrySession'](_0x564a3b,{'fromTask':_0x5d4bbb,'retryParams':_0x525eb5}),{'verbose':_0xac0159[_0x5d19c2(0x211)]}):_0x58203c=await withSpinner('Retrying\x20attempt...',()=>_0x2e8094['workflow']['retryAttempt'](_0x564a3b,{'resumeFrom':_0x392b5c,'retryParams':_0x525eb5,'force':_0x263766}),{'verbose':_0xac0159[_0x5d19c2(0x211)]});const _0x394d65=_0x58203c[_0x5d19c2(0x187)];return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x214)),console[_0x5d19c2(0x2d9)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x394d65[_0x5d19c2(0x230)]),console['error'](_0x5d19c2(0x26e)+_0x394d65['sessionId']),0x0;}}function a42_0x4b0d(){const _0x3efacf=['logs','fullName','\x20from\x20session\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','trim','No\x20sessions\x20found\x20for:\x20','\x20(use\x20--limit\x20to\x20show\x20more)','data','POLL_INTERVAL_MS','navigateSessionsInteractive','map','stat','attempts','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','/attempt/','Getting\x20attempt\x20details...','MIN_LABEL_COUNT','✔\x20New\x20project:\x20','getMonth','isDirectory','buildTimelineData','workflow:attempts','Filter:\x20project=','Updating\x20','\x27\x20from\x20project\x20\x27','filesExtracted','match','Latest\x20session\x20has\x20no\x20attempt','push','No\x20log\x20content\x20found','deleted','columns','delete','workflow:run','List\x20workflow\x20execution\x20sessions','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Key\x20cannot\x20be\x20empty','Force:\x20yes','\x20of\x20','Session\x20','workflow:push','blue','workflow:secrets:delete','follow','9UpPzeZ','Dry\x20run:\x20yes','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','filter','\x20workflow','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20tasks','execute','keys','yellow','skipValidation','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','revision','getFullYear','sourceProjectName','No\x20attempts\x20found\x20in\x20project:\x20','LABEL_WIDTH_DIVISOR','projectName','Pushing\x20project...','dim','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','diff','sourceDir','context','resumeFrom','.\x20Expected\x20format:\x20KEY=VALUE','Params:\x20','unchanged','workflow:sessions','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','type','Writing\x20files...','Error:\x20Secret\x20key\x20is\x20required','displayLine','prepareCloneProject','planned','resolveProjectId','utf-8','✔\x20Project:\x20','includeRetried','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','updatedAt','No\x20sessions\x20with\x20timing\x20information','Killing\x20attempt...','session_id','floor','Deleting\x20project\x20','\x20\x20Session\x20context\x20set\x20to:\x20','showWorkflowConsoleUrl','substring','Project:\x20','param','log','💡\x20Tip:\x20Use\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','max','revision:\x20','GUTTER','durationMs','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','indexOf','List\x20workflows','toISOString','\x20project','\x0aFailed\x20to\x20fetch\x20attempt\x20data','\x0aPolling...\x20(','\x22\x20to\x20new\x20project\x20\x22','MAX_TIMELINE_WIDTH','pending','✔\x20Found\x20','\x20\x20Location:\x20','Filter:\x20','\x0a✔\x20Already\x20up\x20to\x20date','sessionId','slice','\x0aDry\x20run\x20-\x20nothing\x20pushed','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','parse','isTTY','name','end','Deleting\x20secret...','(unknown)','localeCompare','autocomplete','115134MhrqfB','Target:\x20','targetDir','7572890YBFuNc','find','Loading\x20session...','636511xgTTzx','Cancelled','ICON_SPACING','\x0aDry\x20run\x20-\x20no\x20files\x20written','msPerChar','Pattern:\x20','Include\x20retried:\x20yes','31851622OzDWkS','Error:\x20Invalid\x20parameter\x20format:\x20','verbose','\x22\x20already\x20exists\x20(ID:\x20','sessions','✔\x20Retry\x20started','Reason:\x20','modified','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','MAX_POLL_ITERATIONS','yes','Pull\x20workflow\x20project\x20to\x20local\x20folder','running','Status:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','No\x20workflows\x20found','startsWith','min','key','every','LABEL_MIN_SPACING','✔\x20Showing\x20','Source\x20project:\x20','Cloning\x20to\x20','split','message','Total:\x20','\x20\x20Project\x20ID:\x20','getHours','cyan','Error:\x20Invalid\x20JSON\x20in\x20--params','Select\x20a\x20workflow\x20to\x20run','attemptId','Select\x20a\x20session\x20to\x20view\x20timeline:','renderTimeline','table','Session\x20time:\x20','length','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','task','Validation:\x20skipped','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','fill','workflowName','No\x20matching\x20sessions\x20found','No\x20workflows\x20found\x20in\x20project:\x20','\x20deleted','state','\x20task','applyPullProject','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','from','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','summary','\x0aUpdate\x20existing\x20project\x20\x22','attempt','Loading\x20workflows...','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','tasks','requireProject','Retrying\x20session...','\x20\x20Changes:\x20','Error:\x20KEY=VALUE\x20is\x20required','limit','workflow:attempt','✔\x20Secret\x20\x27','list','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','getDate','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Pulling\x20project\x20','\x20\x20Attempt\x20ID:\x20','Task\x20name:\x20','getMinutes','Attempt:\x20','success','Listing\x20workflows...','Including\x20subtasks:\x20yes','download','\x22?\x20This\x20cannot\x20be\x20undone.','---\x20','cwd','Listing\x20workflow\x20sessions...','newProjectName','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20\x20Source:\x20','fs/promises','workflow:projects','format','text','workflow:download','json','\x20has\x20no\x20attempts','\x20\x20Session\x20ID:\x20','Pushing\x20workflow\x20project...','workflow:delete','Workflow:\x20','retryAttemptName','output','10062328cufQfW','join','lastAttempt','Setting\x20secret...','Loading\x20sessions...','renderSingleTimeline','sessionTime','fromTask','duration','Analyzing\x20changes...','run','Retry\x20a\x20session\x20or\x20attempt','title','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','has','\x22\x20with\x20new\x20revision?','resolve','✔\x20Pull\x20complete','stdout','Expected\x20format:\x20--param\x20key=value','Tip:\x20cd\x20to\x20workflows/','path','✔\x20Workflow\x20project\x20context\x20cleared.','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','stringify','No\x20sessions\x20found\x20in\x20project:\x20','kill','includes','Using\x20attempt\x20','Project\x20name:\x20','trimEnd','workflow:kill','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','cancelRequested','now','Source\x20directory:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Downloaded\x20','clear','Starting\x20workflow\x20run...','deleteSecret','New\x20project\x20name:\x20','rows','✔\x20Deleted\x20project\x20','projectId','Project\x20filter:\x20','executePushProject','parseProjectWorkflowPattern','\x20\x20Console:\x20','createdAt','No\x20workflow\x20sessions\x20found','repeat','Resolving\x20project\x20\x27','unknown','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','No\x20workflow\x20tdx.json\x20found','\x20\x20Project:\x20','renderSessionsTimeline','Getting\x20attempt\x20tasks...','Show\x20specific\x20attempt\x20details','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','resolveProject','padStart','status','\x20\x20tdx\x20wf\x20use\x20<project>','tdx.json','splice','targetExists','workflow:use','done','3XrKzzh','Fetching\x20log\x20files...','set','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','✔\x20Push\x20complete','Listing\x20workflow\x20attempts...','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Error:\x20Project\x20name\x20is\x20required','changes','✔\x20Project\x20updated','/app/workflows/','\x20to\x20see\x20detailed\x20logs','No\x20sessions\x20found','Session\x20not\x20found:\x20','ICON_WIDTH','Error:\x20Attempt\x20ID\x20is\x20required','relative','Usage:\x20workflow:delete\x20<project-name-or-id>','sort','Usage:\x20tdx\x20wf\x20use\x20<project>','jsonl','Attempt\x20ID:\x20','Revision:\x20','Output\x20directory:\x20','MAX_TASKS_DISPLAY','workflow:tasks','workflow:timeline','Failed\x20to\x20fetch\x20attempt\x20data','\x0a✔\x20No\x20changes\x20to\x20push','force','pullProject','error','\x20modified','window','startTime','hasChanges','workflow','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Files\x20to\x20upload:\x20','group_error','No\x20attempts\x20found','workflow:workflows','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Files\x20extracted:\x20','session','No\x20attempts\x20found\x20for:\x20','index','🔄\x20','\x0aApply\x20these\x20changes?','resolveProjectDir','write','✔\x20Workflow\x20project\x20set\x20to:\x20','start','red','site','Project\x20name\x20is\x20required','No\x20log\x20files\x20found\x20for\x20this\x20attempt','get','values','✔\x20Workflow\x20run\x20started','...','Error:','getTime','\x20\x20Revision:\x20','some','201904nksyLz','toLowerCase','\x0aDry\x20run\x20-\x20no\x20project\x20created','Analyzing\x20project...','select','metadata','\x20new','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Invalid\x20format:\x20','projects','basename','pollTimeline','readFile','dryRun','35rGdkvD','Source:\x20','\x1b[1A\x1b[2K','value','workflows','canceling','green','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','project','1644618kcrZbi','finishedAt','params','List\x20workflow\x20attempts','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','✔\x20Pushed\x20','\x20unchanged','workflow:pull','workflowProject','tdx\x20wf\x20attempt\x20','TASK_NAME_WIDTH','new','generateSessionTimelineRows','Error:\x20','setSecret','taskName','Parameters:\x20','startedAt','size','115ZCeRrF','\x20-\x20','\x0a⚠\x20Project\x20\x22','Start\x20a\x20workflow\x20run'];a42_0x4b0d=function(){return _0x3efacf;};return a42_0x4b0d();}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x1a1);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x17f);async[a42_0x5d907a(0x1b3)](_0x15ddbb){const _0x3bd956=a42_0x5d907a,{options:_0xa408ff,args:_0xf4e3fc,tdx:_0x125c46}=_0x15ddbb;let _0x4b0f6b=_0xf4e3fc[0x0];if(!_0x4b0f6b){const _0x3d6646=this[_0x3bd956(0x2b1)]([],_0xa408ff),_0x3fe773=await withSpinner(_0x3bd956(0x248),()=>_0x125c46['workflow']['workflows'](_0x3d6646,{'limit':_0xa408ff[_0x3bd956(0x24f)]}),{'verbose':_0xa408ff[_0x3bd956(0x211)]}),_0x34ed13=_0x3fe773[_0x3bd956(0x187)];if(_0x34ed13[_0x3bd956(0x235)]===0x0)return console[_0x3bd956(0x2d9)](_0x3bd956(0x21f)),!_0x3d6646&&console[_0x3bd956(0x2d9)](a42_0x52dc99[_0x3bd956(0x1bf)](_0x3bd956(0x1a3))),0x1;const _0x209ff5=_0x34ed13[_0x3bd956(0x18a)](_0x19ccad=>({'title':_0x19ccad['project']?.[_0x3bd956(0x1fc)]+'.'+_0x19ccad[_0x3bd956(0x1fc)],'value':_0x19ccad[_0x3bd956(0x167)]?.['name']+'.'+_0x19ccad[_0x3bd956(0x1fc)],'description':_0x19ccad[_0x3bd956(0x1b8)]?_0x3bd956(0x1e4)+_0x19ccad[_0x3bd956(0x1b8)]:undefined})),_0x24e23a=await a42_0x3ff555({'type':_0x3bd956(0x2ff),'name':'workflow','message':_0x3bd956(0x22f),'choices':_0x209ff5});if(!_0x24e23a['workflow'])return 0x1;_0x4b0f6b=_0x24e23a['workflow'];}if(!_0x4b0f6b[_0x3bd956(0x28f)]('.')){const _0x2de949=this[_0x3bd956(0x2b1)]([],_0xa408ff);if(_0x2de949)_0x4b0f6b=_0x2de949+'.'+_0x4b0f6b;else return console[_0x3bd956(0x2d9)](a42_0x52dc99['red']('Error:'),_0x3bd956(0x16c)),console['error'](a42_0x52dc99[_0x3bd956(0x1bf)](_0x3bd956(0x1a3))),0x1;}const _0x41c145=_0xa408ff[_0x3bd956(0x1df)],_0x58aeed=_0xa408ff[_0x3bd956(0x27a)],_0x1dd392={};if(_0x41c145&&Array['isArray'](_0x41c145))for(const _0xb66d50 of _0x41c145){const _0x38ed6f=_0xb66d50[_0x3bd956(0x1e9)]('=');if(_0x38ed6f===-0x1)return console[_0x3bd956(0x2d9)](_0x3bd956(0x210)+_0xb66d50),console[_0x3bd956(0x2d9)](_0x3bd956(0x287)),0x1;const _0x412e55=_0xb66d50[_0x3bd956(0x1dd)](0x0,_0x38ed6f),_0x2a973c=_0xb66d50[_0x3bd956(0x1dd)](_0x38ed6f+0x1);try{_0x1dd392[_0x412e55]=JSON['parse'](_0x2a973c);}catch{_0x1dd392[_0x412e55]=_0x2a973c;}}_0xa408ff[_0x3bd956(0x211)]&&(console['error'](_0x3bd956(0x271)+_0x4b0f6b),Object[_0x3bd956(0x1b4)](_0x1dd392)['length']>0x0&&console[_0x3bd956(0x2d9)](_0x3bd956(0x179)+JSON[_0x3bd956(0x28c)](_0x1dd392)),_0x58aeed&&console['error'](_0x3bd956(0x234)+_0x58aeed));const _0x4b05e9=await withSpinner(_0x3bd956(0x29b),()=>_0x125c46[_0x3bd956(0x2de)][_0x3bd956(0x27e)](_0x4b0f6b,_0x1dd392,{'sessionTime':_0x58aeed}),{'verbose':_0xa408ff[_0x3bd956(0x211)]}),_0x3835bd=_0x4b05e9['data'];console[_0x3bd956(0x2d9)](_0x3bd956(0x2f5)),console['error'](_0x3bd956(0x258)+_0x3835bd['id']),console[_0x3bd956(0x2d9)](_0x3bd956(0x26e)+_0x3835bd[_0x3bd956(0x1f6)]),console[_0x3bd956(0x2d9)](_0x3bd956(0x2ac)+_0x3835bd[_0x3bd956(0x167)]?.[_0x3bd956(0x1fc)]),console[_0x3bd956(0x2d9)]('\x20\x20Workflow:\x20'+_0x3835bd['workflow']?.[_0x3bd956(0x1fc)]);if(_0x3835bd[_0x3bd956(0x167)]?.['id']&&_0x3835bd[_0x3bd956(0x1f6)]&&_0x3835bd['id']){const _0x6dc4d6=_0xa408ff[_0x3bd956(0x2f0)],_0x27e818=getConsoleUrl(_0x6dc4d6,_0x3bd956(0x2c4)+_0x3835bd[_0x3bd956(0x167)]['id']+'/sessions/'+_0x3835bd[_0x3bd956(0x1f6)]+_0x3bd956(0x18e)+_0x3835bd['id']);console[_0x3bd956(0x2d9)](_0x3bd956(0x2a4)+a42_0x52dc99[_0x3bd956(0x22d)](_0x27e818));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x26b);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x21d);async[a42_0x5d907a(0x1b3)](_0x49f38a){const _0x35292c=a42_0x5d907a,{options:_0x45d443,args:_0x3adbc5,tdx:_0x20c846}=_0x49f38a,_0x5b80d1=_0x3adbc5[0x0],_0x43eb27=_0x3adbc5[0x1]||'.';if(!_0x5b80d1)return console[_0x35292c(0x2d9)](_0x35292c(0x2c1)),console[_0x35292c(0x2d9)](_0x35292c(0x256)),0x1;const _0x29373d=_0x45d443[_0x35292c(0x1b8)];_0x45d443[_0x35292c(0x211)]&&(console[_0x35292c(0x2d9)](_0x35292c(0x1de)+_0x5b80d1),console['error'](_0x35292c(0x2d1)+_0x43eb27),_0x29373d&&console[_0x35292c(0x2d9)](_0x35292c(0x2d0)+_0x29373d));const _0x38b290=await withSpinner('Downloading\x20project\x20'+_0x5b80d1+_0x35292c(0x2f6),()=>_0x20c846['workflow'][_0x35292c(0x25f)](_0x5b80d1,_0x43eb27,{'revision':_0x29373d}),{'verbose':_0x45d443[_0x35292c(0x211)]}),_0x3e4b05=_0x38b290[_0x35292c(0x187)];return console[_0x35292c(0x2d9)](_0x35292c(0x299)+_0x3e4b05['projectName']),console[_0x35292c(0x2d9)]('\x20\x20Revision:\x20'+_0x3e4b05[_0x35292c(0x1b8)]),console['error'](_0x35292c(0x2e5)+_0x3e4b05[_0x35292c(0x199)]),console['error'](_0x35292c(0x1f3)+_0x43eb27+'/'+_0x3e4b05[_0x35292c(0x1bd)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']='workflow:upload';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x281);async['execute'](_0x32e9a6){const _0x48fcee=a42_0x5d907a,{options:_0x206468,args:_0x2af660,tdx:_0x3fb90d}=_0x32e9a6;let _0x3259a3='.',_0x15aec6=_0x206468[_0x48fcee(0x1fc)];if(_0x2af660[0x0]){const {promises:_0x2d1bb6}=await import('fs');try{const _0x5dd6cd=await _0x2d1bb6[_0x48fcee(0x18b)](_0x2af660[0x0]);if(_0x5dd6cd[_0x48fcee(0x193)]())_0x3259a3=_0x2af660[0x0];else return console[_0x48fcee(0x2d9)](_0x48fcee(0x176)+_0x2af660[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x15aec6=_0x2af660[0x0],_0x3259a3='.';}}const _0x516045=_0x206468['revision'],_0x276a93=_0x206468[_0x48fcee(0x1b6)];_0x206468['verbose']&&(console[_0x48fcee(0x2d9)]('Project\x20directory:\x20'+_0x3259a3),_0x15aec6&&console['error'](_0x48fcee(0x291)+_0x15aec6),_0x516045&&console[_0x48fcee(0x2d9)](_0x48fcee(0x2d0)+_0x516045),_0x276a93&&console[_0x48fcee(0x2d9)](_0x48fcee(0x238)));const _0x446782=await withSpinner(_0x48fcee(0x26f),()=>_0x3fb90d[_0x48fcee(0x2de)][_0x48fcee(0x19c)](_0x3259a3,{'projectName':_0x15aec6,'revision':_0x516045,'skipValidation':_0x276a93}),{'verbose':_0x206468[_0x48fcee(0x211)]}),_0x5877bc=_0x446782[_0x48fcee(0x187)];return console[_0x48fcee(0x2d9)](_0x48fcee(0x16e)+_0x5877bc['projectName']),console['error'](_0x48fcee(0x22b)+_0x5877bc[_0x48fcee(0x2a0)]),console[_0x48fcee(0x2d9)](_0x48fcee(0x2f9)+_0x5877bc[_0x48fcee(0x1b8)]),await this[_0x48fcee(0x1dc)](_0x3fb90d,_0x5877bc[_0x48fcee(0x1bd)],_0x206468[_0x48fcee(0x2f0)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x170);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x21a);async[a42_0x5d907a(0x1b3)](_0x36c741){const _0xf9ac3=a42_0x5d907a,{options:_0x44cfd3,args:_0x2e49c9,tdx:_0x4e68ff}=_0x36c741,_0x128702=_0x2e49c9[0x0],_0x2a19cb=_0x2e49c9[0x1];if(!_0x128702)return console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x2ef)](_0xf9ac3(0x2f7)),_0xf9ac3(0x2f1)),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x1bf)](_0xf9ac3(0x2aa))),0x1;const _0x4bd4e2=_0x44cfd3['revision'];_0x44cfd3[_0xf9ac3(0x211)]&&(console[_0xf9ac3(0x2d9)](_0xf9ac3(0x1de)+_0x128702),_0x2a19cb&&console['error']('Target\x20directory:\x20'+_0x2a19cb),_0x4bd4e2&&console[_0xf9ac3(0x2d9)](_0xf9ac3(0x2d0)+_0x4bd4e2),_0x44cfd3[_0xf9ac3(0x308)]&&console[_0xf9ac3(0x2d9)](_0xf9ac3(0x1ad)));const _0x4b182e=await withSpinner(_0xf9ac3(0x257)+_0x128702+'...',()=>_0x4e68ff[_0xf9ac3(0x2de)][_0xf9ac3(0x2d8)](_0x128702,{'targetDir':_0x2a19cb,'revision':_0x4bd4e2}),{'verbose':_0x44cfd3[_0xf9ac3(0x211)]}),_0x4cc98b=_0x4b182e[_0xf9ac3(0x187)];_0x4cc98b['isNewProject']?console[_0xf9ac3(0x2d9)](_0xf9ac3(0x191)+_0x4cc98b[_0xf9ac3(0x1bd)]):console[_0xf9ac3(0x2d9)](_0xf9ac3(0x1d2)+_0x4cc98b[_0xf9ac3(0x1bd)]);console[_0xf9ac3(0x2d9)](_0xf9ac3(0x2f9)+_0x4cc98b[_0xf9ac3(0x1b8)]),console[_0xf9ac3(0x2d9)]('\x20\x20Target:\x20'+(a42_0x5d30f9[_0xf9ac3(0x2ca)](process[_0xf9ac3(0x262)](),_0x4cc98b[_0xf9ac3(0x204)])||'.')),console[_0xf9ac3(0x2d9)](_0xf9ac3(0x24d)+a42_0x52dc99['green']('+'+_0x4cc98b[_0xf9ac3(0x245)][_0xf9ac3(0x174)]+'\x20new')+',\x20'+(a42_0x52dc99['yellow']('~'+_0x4cc98b[_0xf9ac3(0x245)][_0xf9ac3(0x216)]+'\x20modified')+',\x20')+(a42_0x52dc99[_0xf9ac3(0x2ef)]('-'+_0x4cc98b['summary']['deleted']+_0xf9ac3(0x23e))+',\x20')+(''+a42_0x52dc99[_0xf9ac3(0x1bf)](_0x4cc98b[_0xf9ac3(0x245)][_0xf9ac3(0x1c7)]+_0xf9ac3(0x16f))));for(const _0x4fa398 of _0x4cc98b[_0xf9ac3(0x2c2)]){_0x4fa398[_0xf9ac3(0x1ca)]===_0xf9ac3(0x216)&&_0x4fa398['diff']&&(console[_0xf9ac3(0x2d9)]('\x0a'+a42_0x52dc99[_0xf9ac3(0x22d)](_0xf9ac3(0x261)+_0x4fa398[_0xf9ac3(0x289)])),console['error'](_0x4fa398[_0xf9ac3(0x1c1)]));}if(!_0x4cc98b[_0xf9ac3(0x2dd)])return saveSessionContext({'workflow_project':_0x4cc98b[_0xf9ac3(0x1bd)]},_0x44cfd3[_0xf9ac3(0x2e6)]),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x164)](_0xf9ac3(0x1f5))),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x1bf)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x4cc98b[_0xf9ac3(0x1bd)])),0x0;if(_0x44cfd3['dryRun'])return console[_0xf9ac3(0x2d9)](a42_0x52dc99['yellow'](_0xf9ac3(0x20b))),0x0;if(!_0x44cfd3[_0xf9ac3(0x219)]){const _0x3d4f52=await confirmKey(_0xf9ac3(0x2ea));if(!_0x3d4f52)return console[_0xf9ac3(0x2d9)]('Cancelled'),0x0;}await withSpinner(_0xf9ac3(0x1cb),()=>_0x4e68ff[_0xf9ac3(0x2de)][_0xf9ac3(0x241)](_0x4cc98b,{'revision':_0x4bd4e2}),{'verbose':_0x44cfd3['verbose']}),saveSessionContext({'workflow_project':_0x4cc98b[_0xf9ac3(0x1bd)]},_0x44cfd3[_0xf9ac3(0x2e6)]),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x164)](_0xf9ac3(0x285)));const _0x443583=a42_0x5d30f9[_0xf9ac3(0x2ca)](process[_0xf9ac3(0x262)](),_0x4cc98b[_0xf9ac3(0x204)])||'.';return console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x1bf)](_0xf9ac3(0x1f3)+_0x443583)),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x1bf)](_0xf9ac3(0x1db)+_0x4cc98b[_0xf9ac3(0x1bd)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x1a8);[a42_0x5d907a(0x1e7)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a42_0x5d907a(0x1b3)](_0x6df6c3){const _0x105e31=a42_0x5d907a,{options:_0x5c1e91,args:_0x10234a,tdx:_0x312de9}=_0x6df6c3,_0x1ed787=this[_0x105e31(0x2eb)](_0x10234a,_0x5c1e91),_0x21af4c=_0x5c1e91[_0x105e31(0x1b8)],_0x10e3ba=_0x5c1e91['skipValidation'];_0x5c1e91[_0x105e31(0x211)]&&(_0x1ed787&&console[_0x105e31(0x2d9)](_0x105e31(0x297)+_0x1ed787),_0x21af4c&&console['error']('Revision:\x20'+_0x21af4c),_0x5c1e91[_0x105e31(0x308)]&&console[_0x105e31(0x2d9)](_0x105e31(0x1ad)),_0x10e3ba&&console['error']('Validation:\x20skipped'));let _0x374cda;try{_0x374cda=await withSpinner(_0x105e31(0x27d),()=>_0x312de9['workflow']['preparePushProject']({'sourceDir':_0x1ed787,'revision':_0x21af4c,'skipValidation':_0x10e3ba}),{'verbose':_0x5c1e91['verbose']});}catch(_0x3ffe23){if(_0x3ffe23 instanceof Error&&_0x3ffe23['message']['includes'](_0x105e31(0x2ab)))return console['error'](a42_0x52dc99[_0x105e31(0x2ef)](_0x105e31(0x2f7)),_0x105e31(0x16d)),_0x5c1e91[_0x105e31(0x171)]?console[_0x105e31(0x2d9)](a42_0x52dc99['dim'](_0x105e31(0x288)+_0x5c1e91['workflowProject']+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x5c1e91[_0x105e31(0x171)]+'\x27')):console[_0x105e31(0x2d9)](a42_0x52dc99[_0x105e31(0x1bf)](_0x105e31(0x1f9))),0x1;throw _0x3ffe23;}const _0x52532b=_0x374cda[_0x105e31(0x187)];console['error'](_0x105e31(0x1d2)+_0x52532b[_0x105e31(0x1bd)]),console[_0x105e31(0x2d9)](_0x105e31(0x266)+_0x52532b[_0x105e31(0x1c2)]),console[_0x105e31(0x2d9)]('\x20\x20Revision:\x20'+_0x52532b['revision']),console[_0x105e31(0x2d9)](_0x105e31(0x24d)+a42_0x52dc99[_0x105e31(0x164)]('+'+_0x52532b[_0x105e31(0x245)][_0x105e31(0x174)]+_0x105e31(0x301))+',\x20'+(a42_0x52dc99[_0x105e31(0x1b5)]('~'+_0x52532b[_0x105e31(0x245)]['modified']+_0x105e31(0x2da))+',\x20')+(a42_0x52dc99[_0x105e31(0x2ef)]('-'+_0x52532b['summary'][_0x105e31(0x19e)]+_0x105e31(0x23e))+',\x20')+(''+a42_0x52dc99[_0x105e31(0x1bf)](_0x52532b[_0x105e31(0x245)][_0x105e31(0x1c7)]+_0x105e31(0x16f))));for(const _0xf97a9e of _0x52532b[_0x105e31(0x2c2)]){_0xf97a9e[_0x105e31(0x1ca)]===_0x105e31(0x216)&&_0xf97a9e['diff']&&(console['error']('\x0a'+a42_0x52dc99[_0x105e31(0x22d)](_0x105e31(0x261)+_0xf97a9e['path'])),console[_0x105e31(0x2d9)](_0xf97a9e['diff']));}if(!_0x52532b['hasChanges'])return console[_0x105e31(0x2d9)](a42_0x52dc99[_0x105e31(0x164)](_0x105e31(0x2d6))),await this[_0x105e31(0x1dc)](_0x312de9,_0x52532b[_0x105e31(0x1bd)],_0x5c1e91[_0x105e31(0x2f0)]),0x0;if(_0x5c1e91[_0x105e31(0x308)])return console[_0x105e31(0x2d9)](a42_0x52dc99[_0x105e31(0x1b5)](_0x105e31(0x1f8))),0x0;if(!_0x5c1e91[_0x105e31(0x219)]){const _0x22f4aa=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x22f4aa)return console['error'](_0x105e31(0x209)),0x0;}const _0xc33af8=await withSpinner(_0x105e31(0x1be),()=>_0x312de9[_0x105e31(0x2de)][_0x105e31(0x2a2)](_0x52532b),{'verbose':_0x5c1e91[_0x105e31(0x211)]}),_0x2d4c59=_0xc33af8[_0x105e31(0x187)];return console[_0x105e31(0x2d9)](a42_0x52dc99['green'](_0x105e31(0x2be))),console[_0x105e31(0x2d9)](_0x105e31(0x22b)+_0x2d4c59[_0x105e31(0x2a0)]),console['error'](_0x105e31(0x2f9)+_0x2d4c59[_0x105e31(0x1b8)]),await this[_0x105e31(0x1dc)](_0x312de9,_0x2d4c59[_0x105e31(0x1bd)],_0x5c1e91['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']='workflow:clone';['description']=a42_0x5d907a(0x2bd);async[a42_0x5d907a(0x1b3)](_0x4e2697){const _0x1958b5=a42_0x5d907a,{options:_0x369871,args:_0x45611b,tdx:_0x118999}=_0x4e2697,_0x7153e3=this[_0x1958b5(0x2eb)](_0x45611b,_0x369871),_0x48c489=_0x369871[_0x1958b5(0x1fc)],_0x332924=_0x369871[_0x1958b5(0x1b8)],_0x105cb1=_0x369871['skipValidation'];if(!_0x7153e3)return console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x2ef)](_0x1958b5(0x2f7)),'Source\x20directory\x20is\x20required'),console['error'](a42_0x52dc99['dim'](_0x1958b5(0x1ae))),console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x1bf)](_0x1958b5(0x1e8))),0x1;if(!_0x48c489)return console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x2ef)](_0x1958b5(0x2f7)),_0x1958b5(0x1b7)),console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x1bf)](_0x1958b5(0x1ae))),0x1;_0x369871[_0x1958b5(0x211)]&&(console[_0x1958b5(0x2d9)](_0x1958b5(0x297)+_0x7153e3),console['error']('New\x20project\x20name:\x20'+_0x48c489),_0x332924&&console[_0x1958b5(0x2d9)]('Revision:\x20'+_0x332924),_0x369871['dryRun']&&console[_0x1958b5(0x2d9)](_0x1958b5(0x1ad)),_0x105cb1&&console['error'](_0x1958b5(0x238)));const _0x440534=await withSpinner(_0x1958b5(0x2fe),()=>_0x118999['workflow'][_0x1958b5(0x1ce)](_0x7153e3,_0x48c489,{'revision':_0x332924,'skipValidation':_0x105cb1}),{'verbose':_0x369871['verbose']}),_0x2266d2=_0x440534[_0x1958b5(0x187)];console[_0x1958b5(0x2d9)](_0x1958b5(0x30a)+_0x2266d2[_0x1958b5(0x1c2)]);_0x2266d2[_0x1958b5(0x1ba)]&&console[_0x1958b5(0x2d9)](_0x1958b5(0x226)+_0x2266d2[_0x1958b5(0x1ba)]);console[_0x1958b5(0x2d9)](_0x1958b5(0x29d)+_0x2266d2[_0x1958b5(0x264)]),console['error'](_0x1958b5(0x2d0)+_0x2266d2['revision']),console['error'](_0x1958b5(0x2e0)+_0x2266d2['fileCount']);_0x2266d2[_0x1958b5(0x2b7)]&&(console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x1b5)](_0x1958b5(0x17e)+_0x2266d2['newProjectName']+_0x1958b5(0x212)+_0x2266d2['existingProjectId']+')')),console['error'](a42_0x52dc99[_0x1958b5(0x1b5)](_0x1958b5(0x1c0))));if(_0x369871[_0x1958b5(0x308)])return console['error'](a42_0x52dc99[_0x1958b5(0x1b5)](_0x1958b5(0x2fd))),0x0;if(!_0x369871[_0x1958b5(0x219)]){const _0x2a4a6d=_0x2266d2[_0x1958b5(0x1ba)]||a42_0x5d30f9[_0x1958b5(0x305)](_0x7153e3),_0x185c9a=_0x2266d2[_0x1958b5(0x2b7)]?_0x1958b5(0x246)+_0x48c489+_0x1958b5(0x283):'\x0aClone\x20\x22'+_0x2a4a6d+_0x1958b5(0x1ef)+_0x48c489+'\x22?',_0x4f9095=await confirmKey(_0x185c9a);if(!_0x4f9095)return console['error'](_0x1958b5(0x209)),0x0;}const _0x2d3d5e=await withSpinner(_0x2266d2[_0x1958b5(0x2b7)]?_0x1958b5(0x197)+_0x48c489+_0x1958b5(0x2f6):_0x1958b5(0x227)+_0x48c489+'...',()=>_0x118999[_0x1958b5(0x2de)]['executeCloneProject'](_0x2266d2),{'verbose':_0x369871[_0x1958b5(0x211)]}),_0x52243b=_0x2d3d5e[_0x1958b5(0x187)];return console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x164)](_0x2266d2[_0x1958b5(0x2b7)]?_0x1958b5(0x2c3):'✔\x20Clone\x20complete')),console[_0x1958b5(0x2d9)](_0x1958b5(0x2ac)+_0x52243b['newProjectName']),console[_0x1958b5(0x2d9)](_0x1958b5(0x22b)+_0x52243b['newProjectId']),console[_0x1958b5(0x2d9)]('\x20\x20Revision:\x20'+_0x52243b[_0x1958b5(0x1b8)]),await this[_0x1958b5(0x1dc)](_0x118999,_0x52243b['newProjectName'],_0x369871[_0x1958b5(0x2f0)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x270);[a42_0x5d907a(0x1e7)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0x5d907a(0x1b3)](_0x492059){const _0x3e77b9=a42_0x5d907a,{options:_0x549753,args:_0x498eb9,tdx:_0x5e8b0e}=_0x492059,_0x353b1e=_0x498eb9[0x0];if(!_0x353b1e)return console[_0x3e77b9(0x2d9)](_0x3e77b9(0x2e4)),console[_0x3e77b9(0x2d9)](_0x3e77b9(0x2cb)),0x1;_0x549753[_0x3e77b9(0x211)]&&console[_0x3e77b9(0x2d9)](_0x3e77b9(0x1de)+_0x353b1e);if(!_0x549753[_0x3e77b9(0x219)]){const _0x39f498=await confirmKey(_0x3e77b9(0x298)+_0x353b1e+_0x3e77b9(0x260));if(!_0x39f498)return console[_0x3e77b9(0x2d9)]('Cancelled'),0x0;}const _0xee991e=await withSpinner(_0x3e77b9(0x1da)+_0x353b1e+'...',()=>_0x5e8b0e[_0x3e77b9(0x2de)][_0x3e77b9(0x1a0)](_0x353b1e),{'verbose':_0x549753[_0x3e77b9(0x211)]}),_0x405e0c=_0xee991e[_0x3e77b9(0x187)];return console[_0x3e77b9(0x2d9)](_0x3e77b9(0x29f)+_0x405e0c['projectName']),console['error'](_0x3e77b9(0x22b)+_0x405e0c[_0x3e77b9(0x2a0)]),0x0;}}export function parseKeyValue(_0x13baf0){const _0x569961=a42_0x5d907a,_0xe085c7=_0x13baf0['indexOf']('=');if(_0xe085c7===-0x1)throw new Error(_0x569961(0x303)+_0x13baf0+_0x569961(0x1c5));const _0x421df1=_0x13baf0[_0x569961(0x1dd)](0x0,_0xe085c7),_0x1d578b=_0x13baf0[_0x569961(0x1dd)](_0xe085c7+0x1);if(!_0x421df1)throw new Error(_0x569961(0x1a4));return{'key':_0x421df1,'value':_0x1d578b};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']='workflow:secrets:list';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x242);async['execute'](_0x43307b){const _0x11fb1b=a42_0x5d907a,{options:_0x10646d,args:_0x206f10,tdx:_0xeae172}=_0x43307b,_0x49f434=this[_0x11fb1b(0x24b)](_0x206f10,_0x10646d);if(!_0x49f434)return 0x1;_0x10646d['verbose']&&console[_0x11fb1b(0x2d9)]('Project:\x20'+_0x49f434);const _0x36d1d4=await withSpinner('Listing\x20secrets...',()=>_0xeae172['workflow']['listSecrets'](_0x49f434),{'verbose':_0x10646d[_0x11fb1b(0x211)]}),{secrets:_0x4f2ca0}=_0x36d1d4[_0x11fb1b(0x187)];return console[_0x11fb1b(0x2d9)](_0x11fb1b(0x1f2)+_0x4f2ca0[_0x11fb1b(0x235)]+'\x20secret'+(_0x4f2ca0[_0x11fb1b(0x235)]!==0x1?'s':'')),await handleSDKOutput(_0x4f2ca0,_0x10646d),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]='workflow:secrets:set';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x2c0);async[a42_0x5d907a(0x1b3)](_0x1805ae){const _0x55f44c=a42_0x5d907a,{options:_0x21437d,args:_0x9afa0e,tdx:_0x13452a}=_0x1805ae;let _0x2f9b1b,_0x466fdc;if(_0x9afa0e['length']>=0x2)_0x2f9b1b=_0x9afa0e[0x0],_0x466fdc=_0x9afa0e[0x1];else{if(_0x9afa0e[_0x55f44c(0x235)]===0x1&&_0x21437d[_0x55f44c(0x171)])_0x2f9b1b=_0x21437d[_0x55f44c(0x171)],_0x466fdc=_0x9afa0e[0x0];else return _0x9afa0e[_0x55f44c(0x235)]===0x1?(console['error'](_0x55f44c(0x2c1)),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x55f44c(0x2d9)](_0x55f44c(0x24e)),console[_0x55f44c(0x2d9)](_0x55f44c(0x28b)),0x1);}let _0x35e197,_0x2042f7;try{({key:_0x35e197,value:_0x2042f7}=parseKeyValue(_0x466fdc));}catch(_0x48fbd3){return _0x48fbd3 instanceof Error&&console[_0x55f44c(0x2d9)](a42_0x52dc99[_0x55f44c(0x2ef)](_0x55f44c(0x2f7)),_0x48fbd3[_0x55f44c(0x229)]),0x1;}_0x21437d[_0x55f44c(0x211)]&&(console[_0x55f44c(0x2d9)](_0x55f44c(0x1de)+_0x2f9b1b),console[_0x55f44c(0x2d9)]('Key:\x20'+_0x35e197));const _0x5e009b=await withSpinner(_0x55f44c(0x277),()=>_0x13452a[_0x55f44c(0x2de)][_0x55f44c(0x177)](_0x2f9b1b,_0x35e197,_0x2042f7),{'verbose':_0x21437d[_0x55f44c(0x211)]}),_0x1a1f67=_0x5e009b[_0x55f44c(0x187)];return console['error']('✔\x20Secret\x20\x27'+_0x1a1f67['key']+_0x55f44c(0x1e2)+_0x1a1f67[_0x55f44c(0x1bd)]+'\x27'),(_0x21437d[_0x55f44c(0x26c)]||_0x21437d[_0x55f44c(0x2ce)])&&await handleSingleObjectOutput(_0x1a1f67,_0x21437d),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x1aa);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x165);async[a42_0x5d907a(0x1b3)](_0xdb62a){const _0x3174cf=a42_0x5d907a,{options:_0x1ad31c,args:_0x526948,tdx:_0x261e13}=_0xdb62a;let _0x5f59fc,_0xe998c9;if(_0x526948[_0x3174cf(0x235)]>=0x2)_0x5f59fc=_0x526948[0x0],_0xe998c9=_0x526948[0x1];else{if(_0x526948[_0x3174cf(0x235)]===0x1&&_0x1ad31c[_0x3174cf(0x171)])_0x5f59fc=_0x1ad31c[_0x3174cf(0x171)],_0xe998c9=_0x526948[0x0];else return _0x526948['length']===0x1?(console['error'](_0x3174cf(0x2c1)),console[_0x3174cf(0x2d9)](_0x3174cf(0x1a3)),0x1):(console[_0x3174cf(0x2d9)](_0x3174cf(0x1cc)),console[_0x3174cf(0x2d9)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x1ad31c['verbose']&&(console[_0x3174cf(0x2d9)](_0x3174cf(0x1de)+_0x5f59fc),console['error']('Key:\x20'+_0xe998c9));if(!_0x1ad31c['yes']){const _0x4b04f1=await confirmKey(_0x3174cf(0x302)+_0xe998c9+_0x3174cf(0x198)+_0x5f59fc+'\x27?');if(!_0x4b04f1)return console[_0x3174cf(0x2d9)](_0x3174cf(0x209)),0x0;}const _0x4c558c=await withSpinner(_0x3174cf(0x1fe),()=>_0x261e13['workflow'][_0x3174cf(0x29c)](_0x5f59fc,_0xe998c9),{'verbose':_0x1ad31c[_0x3174cf(0x211)]}),_0x1442bb=_0x4c558c[_0x3174cf(0x187)];return console[_0x3174cf(0x2d9)](_0x3174cf(0x251)+_0x1442bb[_0x3174cf(0x222)]+_0x3174cf(0x217)+_0x1442bb[_0x3174cf(0x1bd)]+'\x27'),(_0x1ad31c[_0x3174cf(0x26c)]||_0x1ad31c[_0x3174cf(0x2ce)])&&await handleSingleObjectOutput(_0x1442bb,_0x1ad31c),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(_0x5ce3d8){const _0x5085b0=a42_0x5d907a,_0x12d333=Math[_0x5085b0(0x1d9)](_0x5ce3d8/0x3e8),_0x204aa7=Math['floor'](_0x12d333/0x3c),_0x2707f1=Math[_0x5085b0(0x1d9)](_0x204aa7/0x3c),_0x185cdc=Math[_0x5085b0(0x1d9)](_0x2707f1/0x18);if(_0x185cdc>0x0){const _0x2589d9=_0x2707f1%0x18;return _0x2589d9>0x0?_0x185cdc+'d\x20'+_0x2589d9+'h':_0x185cdc+'d';}else{if(_0x2707f1>0x0){const _0x56be53=_0x204aa7%0x3c;return _0x56be53>0x0?_0x2707f1+'h\x20'+_0x56be53+'m':_0x2707f1+'h';}else{if(_0x204aa7>0x0){const _0x51db30=_0x12d333%0x3c;return _0x51db30>0x0?_0x204aa7+'m\x20'+_0x51db30+'s':_0x204aa7+'m';}else return _0x12d333+'s';}}}function formatTimestamp(_0x2ea384,_0x2907a4){const _0x50fb8f=a42_0x5d907a,_0x5d1518=new Date(_0x2ea384),_0x5f2013=String(_0x5d1518[_0x50fb8f(0x22c)]())['padStart'](0x2,'0'),_0x5d4318=String(_0x5d1518[_0x50fb8f(0x25a)]())[_0x50fb8f(0x2b2)](0x2,'0'),_0x39fcb8=_0x5f2013+':'+_0x5d4318,_0x547d87=_0x5d1518[_0x50fb8f(0x1b9)]()===_0x2907a4[_0x50fb8f(0x1b9)]()&&_0x5d1518[_0x50fb8f(0x192)]()===_0x2907a4[_0x50fb8f(0x192)]()&&_0x5d1518[_0x50fb8f(0x254)]()===_0x2907a4[_0x50fb8f(0x254)]();if(_0x547d87)return _0x39fcb8;else{const _0x1a0142=String(_0x5d1518['getMonth']()+0x1)['padStart'](0x2,'0'),_0x2f9c93=String(_0x5d1518['getDate']())['padStart'](0x2,'0');return _0x1a0142+'-'+_0x2f9c93+'\x20'+_0x39fcb8;}}function formatDate(_0xcc5257){const _0x2e7ab0=a42_0x5d907a,_0x329f01=_0xcc5257[_0x2e7ab0(0x1b9)](),_0x13848f=String(_0xcc5257[_0x2e7ab0(0x192)]()+0x1)[_0x2e7ab0(0x2b2)](0x2,'0'),_0x3031f1=String(_0xcc5257[_0x2e7ab0(0x254)]())[_0x2e7ab0(0x2b2)](0x2,'0');return _0x329f01+'-'+_0x13848f+'-'+_0x3031f1;}function getTaskStateIcon(_0x3fe504){const _0x41266b={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x41266b[_0x3fe504]||'⚪';}function a42_0x3b57(_0x1e2d28,_0x2ee5d9){_0x1e2d28=_0x1e2d28-0x163;const _0x4b0db6=a42_0x4b0d();let _0x3b5760=_0x4b0db6[_0x1e2d28];return _0x3b5760;}function getBarChar(_0x14831a){const _0x3c7217=a42_0x5d907a;return _0x14831a===_0x3c7217(0x2d9)||_0x14831a===_0x3c7217(0x2e1)?'×':'─';}function getBarColor(_0x789b56){const _0xf88e24=a42_0x5d907a,_0x42a860={'success':a42_0x52dc99[_0xf88e24(0x164)],'error':a42_0x52dc99['red'],'group_error':a42_0x52dc99[_0xf88e24(0x2ef)],'running':a42_0x52dc99['blue'],'blocked':a42_0x52dc99['yellow'],'planned':a42_0x52dc99[_0xf88e24(0x1bf)],'canceling':a42_0x52dc99[_0xf88e24(0x1b5)]};return _0x42a860[_0x789b56]||a42_0x52dc99['white'];}function parseTaskName(_0x3683ed){const _0x3a28f8=a42_0x5d907a;let _0x2e0813=_0x3683ed['replace'](/^\++/,'');const _0x206774=_0x2e0813[_0x3a28f8(0x228)]('+'),_0x3f17ca=_0x206774[_0x3a28f8(0x235)]>0x1?_0x206774['length']-0x2:0x0,_0x2b1af6=_0x206774[_0x206774[_0x3a28f8(0x235)]-0x1]||_0x2e0813;return{'level':_0x3f17ca,'name':'+'+_0x2b1af6};}function truncateTaskName(_0x38af89,_0x149e17){const _0x193759=a42_0x5d907a,_0x4e53f6=stringWidth(_0x38af89);if(_0x4e53f6<=_0x149e17)return _0x38af89;let _0x2022b0=_0x38af89;while(stringWidth(_0x2022b0+'…')>_0x149e17&&_0x2022b0[_0x193759(0x235)]>0x0){_0x2022b0=_0x2022b0[_0x193759(0x1f7)](0x0,-0x1);}return _0x2022b0+'…';}function calculateTimeScale(_0x5519aa,_0x358c6){const _0x53087c=a42_0x5d907a;return{'startTime':_0x5519aa['start'],'endTime':_0x5519aa[_0x53087c(0x1fd)],'durationMs':_0x5519aa[_0x53087c(0x27c)],'msPerChar':_0x5519aa['duration']/_0x358c6};}function timeToPosition(_0x1740fa,_0x50ea18,_0x3e07e6){const _0x176006=a42_0x5d907a,_0x3fb097=_0x1740fa-_0x50ea18[_0x176006(0x2dc)],_0x18fcbe=Math[_0x176006(0x1d9)](_0x3fb097/_0x50ea18[_0x176006(0x20c)]);return Math[_0x176006(0x1e3)](0x0,Math[_0x176006(0x221)](_0x18fcbe,_0x3e07e6));}function renderTimeAxis(_0xe246b1,_0x292eb6){const _0x32ea87=a42_0x5d907a,_0x2486ad=Math[_0x32ea87(0x221)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x32ea87(0x1e3)](TIMELINE_CONFIG[_0x32ea87(0x190)],Math[_0x32ea87(0x1d9)](_0x292eb6/TIMELINE_CONFIG[_0x32ea87(0x1bc)]))),_0x90e510=_0xe246b1[_0x32ea87(0x1e6)]/(_0x2486ad-0x1),_0x591948=new Date(_0xe246b1['startTime']),_0x32f8d9=[];for(let _0x33dc51=0x0;_0x33dc51<_0x2486ad;_0x33dc51++){const _0x25b407=_0xe246b1[_0x32ea87(0x2dc)]+_0x33dc51*_0x90e510,_0x2bd916=timeToPosition(_0x25b407,_0xe246b1,_0x292eb6),_0x1e9a5e=formatTimestamp(_0x25b407,_0x591948);_0x32f8d9[_0x32ea87(0x19c)]({'pos':_0x2bd916,'text':_0x1e9a5e});}const _0x549077=new Array(_0x292eb6)['fill']('\x20');let _0x4295c5=-0x1;for(const {pos:_0x300585,text:_0x36d797}of _0x32f8d9){let _0x5e4bf1=Math[_0x32ea87(0x1e3)](0x0,_0x300585-Math[_0x32ea87(0x1d9)](_0x36d797['length']/0x2));_0x5e4bf1<=_0x4295c5+TIMELINE_CONFIG[_0x32ea87(0x224)]&&(_0x5e4bf1=_0x4295c5+TIMELINE_CONFIG[_0x32ea87(0x224)]+0x1);_0x5e4bf1+_0x36d797[_0x32ea87(0x235)]>_0x292eb6&&(_0x5e4bf1=_0x292eb6-_0x36d797[_0x32ea87(0x235)]);if(_0x5e4bf1>=0x0&&_0x5e4bf1+_0x36d797[_0x32ea87(0x235)]<=_0x292eb6&&_0x5e4bf1>_0x4295c5){for(let _0x396560=0x0;_0x396560<_0x36d797[_0x32ea87(0x235)];_0x396560++){_0x549077[_0x5e4bf1+_0x396560]=_0x36d797[_0x396560];}_0x4295c5=_0x5e4bf1+_0x36d797[_0x32ea87(0x235)]-0x1;}}return _0x549077[_0x32ea87(0x275)]('');}function renderTaskRow(_0x4d17d6,_0x28a73d,_0x16b821,_0x34875c){const _0x58a190=a42_0x5d907a,{level:_0x3232bb,name:_0x36aea9}=parseTaskName(_0x4d17d6[_0x58a190(0x1fc)]),_0xdd6a8='\x20'[_0x58a190(0x2a7)](_0x3232bb),_0x4cc082=_0x4d17d6[_0x58a190(0x2db)]?'('+formatElapsed(_0x4d17d6['window'][_0x58a190(0x27c)])+')':'',_0x3bc425=stringWidth(_0x4cc082),_0x410636=_0x3232bb*0x1,_0x5b6ced=_0x34875c-_0x410636-_0x3bc425-0x1,_0xc33a26=truncateTaskName(_0x36aea9,_0x5b6ced),_0x277b1e=_0xdd6a8+_0xc33a26,_0x2c431f=stringWidth(_0x277b1e),_0x114300=_0x34875c-_0x2c431f-_0x3bc425,_0x3b048e=_0x277b1e+'\x20'[_0x58a190(0x2a7)](Math['max'](0x1,_0x114300))+a42_0x52dc99[_0x58a190(0x1bf)](_0x4cc082),_0x40351e=getTaskStateIcon(_0x4d17d6[_0x58a190(0x23f)]),_0x4d427e=new Array(_0x16b821)[_0x58a190(0x23a)]('\x20');if(_0x4d17d6['window']){const _0x4ce1b8=timeToPosition(_0x4d17d6[_0x58a190(0x2db)][_0x58a190(0x2ee)],_0x28a73d,_0x16b821),_0x4feaa3=timeToPosition(_0x4d17d6[_0x58a190(0x2db)][_0x58a190(0x1fd)],_0x28a73d,_0x16b821),_0xdb40d9=getBarChar(_0x4d17d6[_0x58a190(0x23f)]),_0x4ba6cf=Math[_0x58a190(0x1e3)](_0x4ce1b8+0x1,_0x4feaa3);for(let _0x5b0dfd=_0x4ce1b8;_0x5b0dfd<Math['min'](_0x4ba6cf,_0x16b821);_0x5b0dfd++){_0x4d427e[_0x5b0dfd]=_0xdb40d9;}}const _0x4c4e21=getBarColor(_0x4d17d6['state']),_0x2529c2=_0x4d427e[_0x58a190(0x18a)](_0x396c32=>_0x396c32==='\x20'?'\x20':_0x4c4e21(_0x396c32))[_0x58a190(0x275)]('');return _0x40351e+'\x20'+_0x3b048e+'│'+_0x2529c2+'│';}function calculateStats(_0x3d8baf){const _0x5b49b9=a42_0x5d907a,_0x667f01={'total':_0x3d8baf[_0x5b49b9(0x235)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x40fcae of _0x3d8baf){if(_0x40fcae[_0x5b49b9(0x23f)]===_0x5b49b9(0x25c))_0x667f01[_0x5b49b9(0x25c)]++;else{if(_0x40fcae[_0x5b49b9(0x23f)]===_0x5b49b9(0x2d9)||_0x40fcae[_0x5b49b9(0x23f)]===_0x5b49b9(0x2e1))_0x667f01[_0x5b49b9(0x2d9)]++;else _0x40fcae[_0x5b49b9(0x23f)]===_0x5b49b9(0x21b)?_0x667f01[_0x5b49b9(0x21b)]++:_0x667f01[_0x5b49b9(0x1f1)]++;}}return _0x667f01;}function formatStats(_0x19cbc5){const _0x36ebf4=a42_0x5d907a;return[_0x36ebf4(0x22a)+_0x19cbc5['total'],'✅\x20'+_0x19cbc5[_0x36ebf4(0x25c)],'❌\x20'+_0x19cbc5[_0x36ebf4(0x2d9)],_0x36ebf4(0x2e9)+_0x19cbc5[_0x36ebf4(0x21b)],'⏳\x20'+_0x19cbc5['pending']]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0x5d907a(0x2d4);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x18d);async[a42_0x5d907a(0x1b3)](_0x31f8e1){const _0x442ff7=a42_0x5d907a,{options:_0x4dc5ec,args:_0x54e449,tdx:_0xc5551f}=_0x31f8e1;let _0x54f8cf,_0x1bd045,_0x56b869=![];if(_0x54e449[0x0]){if(_0x54e449[0x0]['includes']('.')){const _0xf43622=this[_0x442ff7(0x2a3)](_0x54e449,_0x4dc5ec);if(!_0xf43622)return 0x1;_0x54f8cf=_0xf43622['projectName'],_0x1bd045=_0xf43622[_0x442ff7(0x23b)];}else{_0x1bd045=_0x54e449[0x0],_0x54f8cf=_0x4dc5ec[_0x442ff7(0x171)];if(!_0x54f8cf)return console[_0x442ff7(0x2d9)](a42_0x52dc99['red'](_0x442ff7(0x2f7)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x56b869=!![];}}else{const _0x6be29b=this[_0x442ff7(0x2a3)](_0x54e449,_0x4dc5ec);if(!_0x6be29b)return 0x1;_0x54f8cf=_0x6be29b[_0x442ff7(0x1bd)],_0x1bd045=_0x6be29b[_0x442ff7(0x23b)];}if(_0x4dc5ec[_0x442ff7(0x211)]){if(_0x54f8cf&&_0x1bd045)console[_0x442ff7(0x2d9)](_0x442ff7(0x1f4)+_0x54f8cf+'.'+_0x1bd045);else _0x54f8cf&&console[_0x442ff7(0x2d9)](_0x442ff7(0x196)+_0x54f8cf);}const _0x4d2604=_0x4dc5ec[_0x442ff7(0x230)],_0x681bd7=_0x4dc5ec[_0x442ff7(0x1f6)];if(_0x4d2604){_0x681bd7&&console[_0x442ff7(0x2d9)](a42_0x52dc99[_0x442ff7(0x1b5)]('Warning:'),_0x442ff7(0x166));const _0xb358cb=_0x4dc5ec[_0x442ff7(0x1ab)];return _0xb358cb?await this[_0x442ff7(0x306)](_0x31f8e1,_0x4d2604):await this['renderSingleTimeline'](_0x31f8e1,_0x4d2604,_0x4dc5ec),0x0;}if(_0x681bd7){const _0x102225=await withSpinner(_0x442ff7(0x207),()=>_0xc5551f[_0x442ff7(0x2de)][_0x442ff7(0x213)]({'projectName':_0x54f8cf,'workflowName':_0x1bd045,'limit':0x64}),{'verbose':_0x4dc5ec[_0x442ff7(0x211)]}),_0x20daa6=_0x102225['data'][_0x442ff7(0x206)](_0x4bc139=>_0x4bc139['id']===_0x681bd7);if(!_0x20daa6)return console['error'](a42_0x52dc99[_0x442ff7(0x2ef)](_0x442ff7(0x2f7)),_0x442ff7(0x2c7)+_0x681bd7),0x1;if(!_0x20daa6[_0x442ff7(0x276)]?.['id'])return console[_0x442ff7(0x2d9)](a42_0x52dc99['red'](_0x442ff7(0x2f7)),_0x442ff7(0x1a7)+_0x681bd7+_0x442ff7(0x26d)),0x1;const _0x1b3b6a=_0x20daa6[_0x442ff7(0x276)]['id'];_0x4dc5ec[_0x442ff7(0x211)]&&console[_0x442ff7(0x2d9)](_0x442ff7(0x290)+_0x1b3b6a+_0x442ff7(0x182)+_0x681bd7);const _0xb19973=_0x4dc5ec[_0x442ff7(0x1ab)];return _0xb19973?await this['pollTimeline'](_0x31f8e1,_0x1b3b6a):await this['renderSingleTimeline'](_0x31f8e1,_0x1b3b6a,_0x4dc5ec),0x0;}const _0x1ecc5c=await withSpinner(_0x442ff7(0x278),()=>_0xc5551f['workflow'][_0x442ff7(0x213)]({'projectName':_0x54f8cf,'workflowName':_0x1bd045,'limit':_0x4dc5ec[_0x442ff7(0x24f)]||0x32}),{'verbose':_0x4dc5ec[_0x442ff7(0x211)]}),_0x4be9e7=_0x1ecc5c['data'];if(_0x4be9e7[_0x442ff7(0x235)]===0x0){if(_0x54f8cf&&_0x1bd045)console[_0x442ff7(0x2d9)](_0x442ff7(0x185)+_0x54f8cf+'.'+_0x1bd045);else _0x54f8cf?console[_0x442ff7(0x2d9)](_0x442ff7(0x28d)+_0x54f8cf):(console[_0x442ff7(0x2d9)](_0x442ff7(0x2a6)),console['error'](a42_0x52dc99['dim'](_0x442ff7(0x255))));return 0x0;}_0x4be9e7['sort']((_0x25930c,_0xddad64)=>{const _0x2e1f19=_0x442ff7,_0x37f233=_0x25930c[_0x2e1f19(0x27a)]||'',_0x281354=_0xddad64[_0x2e1f19(0x27a)]||'';return _0x281354[_0x2e1f19(0x200)](_0x37f233);});if(_0x4dc5ec[_0x442ff7(0x26c)]||_0x4dc5ec[_0x442ff7(0x2ce)])return await handleSDKOutput(_0x4be9e7,_0x4dc5ec),0x0;let _0x4babf7;if(_0x56b869){const _0x18205c=_0x4be9e7[0x0];if(!_0x18205c[_0x442ff7(0x276)]?.['id'])return console[_0x442ff7(0x2d9)](_0x442ff7(0x19b)),0x0;_0x4babf7=_0x18205c[_0x442ff7(0x276)]['id'],_0x4dc5ec[_0x442ff7(0x211)]&&console['error']('Auto-selected\x20latest\x20session:\x20'+_0x18205c['sessionTime']);}else{const _0x341f6a=_0x4be9e7[_0x442ff7(0x18a)](_0x17ec44=>{const _0xea3a2c=_0x442ff7,_0x1c4fcf=getAttemptStatusDisplay(_0x17ec44[_0xea3a2c(0x276)]);return{'title':_0x17ec44[_0xea3a2c(0x167)]?.[_0xea3a2c(0x1fc)]+'.'+_0x17ec44['workflow']?.[_0xea3a2c(0x1fc)]+'\x20-\x20'+_0x17ec44[_0xea3a2c(0x27a)]+'\x20'+_0x1c4fcf['icon'],'value':_0x17ec44[_0xea3a2c(0x276)]?.['id']||'','description':_0x1c4fcf[_0xea3a2c(0x26a)]};}),_0x28eda8=await a42_0x3ff555({'type':_0x442ff7(0x2ff),'name':_0x442ff7(0x230),'message':_0x442ff7(0x231),'choices':_0x341f6a['filter'](_0x107096=>_0x107096[_0x442ff7(0x30c)]!=='')});if(!_0x28eda8[_0x442ff7(0x230)])return 0x0;_0x4babf7=_0x28eda8[_0x442ff7(0x230)];}const _0xfec7ab=_0x4dc5ec[_0x442ff7(0x1ab)];return _0xfec7ab?await this[_0x442ff7(0x306)](_0x31f8e1,_0x4babf7):await this[_0x442ff7(0x279)](_0x31f8e1,_0x4babf7,_0x4dc5ec),0x0;}async['renderSingleTimeline'](_0x337ee1,_0x47828e,_0x54d25d){const _0x5dbaf8=a42_0x5d907a,{tdx:_0x126e96}=_0x337ee1;let _0x3cb2b3,_0x6947e4;try{[_0x3cb2b3,_0x6947e4]=await Promise['all']([_0x126e96[_0x5dbaf8(0x2de)]['attempt'](_0x47828e),_0x126e96['workflow'][_0x5dbaf8(0x24a)](_0x47828e,![])]);}catch(_0x55da0b){console[_0x5dbaf8(0x2d9)](a42_0x52dc99[_0x5dbaf8(0x2ef)](_0x5dbaf8(0x2d5)));_0x54d25d[_0x5dbaf8(0x211)]&&console[_0x5dbaf8(0x2d9)](_0x55da0b);throw _0x55da0b;}if(_0x54d25d[_0x5dbaf8(0x26c)]||_0x54d25d[_0x5dbaf8(0x2ce)]){const _0x36dc91=this[_0x5dbaf8(0x194)](_0x3cb2b3,_0x6947e4);await handleSDKOutput([_0x36dc91],_0x54d25d);return;}const _0x4fc7e4=_0x126e96[_0x5dbaf8(0x1c3)][_0x5dbaf8(0x2f0)],_0x5cd7bd=this['renderTimeline'](_0x3cb2b3,_0x6947e4,_0x4fc7e4);console['log'](_0x5cd7bd);}async[a42_0x5d907a(0x306)](_0xbcf882,_0x1015db){const _0x5410f=a42_0x5d907a,{tdx:_0x1819a6}=_0xbcf882,_0x5b709f=TIMELINE_CONFIG[_0x5410f(0x188)],_0xb133d8=TIMELINE_CONFIG[_0x5410f(0x218)];let _0x28992c=0x0;while(_0x28992c<_0xb133d8){process[_0x5410f(0x286)]['isTTY']&&process[_0x5410f(0x286)][_0x5410f(0x2ec)]('\x1bc');let _0x132066,_0x5d933f;try{[_0x132066,_0x5d933f]=await Promise['all']([_0x1819a6[_0x5410f(0x2de)][_0x5410f(0x247)](_0x1015db),_0x1819a6[_0x5410f(0x2de)][_0x5410f(0x24a)](_0x1015db,![])]);}catch(_0x354deb){console[_0x5410f(0x2d9)](a42_0x52dc99[_0x5410f(0x2ef)](_0x5410f(0x1ed)));_0x28992c>0x0&&console[_0x5410f(0x2d9)](a42_0x52dc99['dim'](_0x5410f(0x249)+_0x28992c));throw _0x354deb;}const _0x5bee70=_0x1819a6['context']['site'],_0x2158c0=this[_0x5410f(0x232)](_0x132066,_0x5d933f,_0x5bee70);console[_0x5410f(0x1e0)](_0x2158c0);const _0x1002cf=_0x132066[_0x5410f(0x2b9)]&&_0x5d933f[_0x5410f(0x223)](_0x2217e2=>_0x2217e2[_0x5410f(0x23f)]!=='running'&&_0x2217e2[_0x5410f(0x23f)]!=='planned');if(_0x1002cf){console['error'](a42_0x52dc99[_0x5410f(0x164)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x5410f(0x2d9)](a42_0x52dc99[_0x5410f(0x1bf)](_0x5410f(0x1ee)+_0x28992c*0x2+_0x5410f(0x244))),await new Promise(_0x82326d=>setTimeout(_0x82326d,_0x5b709f)),_0x28992c++;}_0x28992c>=_0xb133d8&&console[_0x5410f(0x2d9)](a42_0x52dc99[_0x5410f(0x1b5)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0x5d907a(0x232)](_0x2f42a1,_0x31cc3a,_0x587569){const _0x11edd5=a42_0x5d907a,_0x45ccfd=[],_0x507f4f=TIMELINE_CONFIG[_0x11edd5(0x173)],_0x2e1d56=0x5,_0x1762fd=process[_0x11edd5(0x286)][_0x11edd5(0x19f)]||0x78,_0x522f9e=_0x1762fd-_0x507f4f-_0x2e1d56,_0x4bacbd=Math[_0x11edd5(0x1e3)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x11edd5(0x221)](_0x522f9e,TIMELINE_CONFIG[_0x11edd5(0x1f0)])),_0x43f871=new Date(_0x2f42a1[_0x11edd5(0x2a5)])[_0x11edd5(0x2f8)](),_0x4c2f4a=_0x2f42a1[_0x11edd5(0x169)]?new Date(_0x2f42a1[_0x11edd5(0x169)])[_0x11edd5(0x2f8)]():Date[_0x11edd5(0x296)](),_0x57d5ad={'start':_0x43f871,'end':_0x4c2f4a,'duration':_0x4c2f4a-_0x43f871},_0x1c02da=new Map(),_0x1e33a8=[];for(const _0x39da31 of _0x31cc3a){if(_0x39da31[_0x11edd5(0x17a)]){const _0x12f32a=new Date(_0x39da31['startedAt'])[_0x11edd5(0x2f8)](),_0x1c13fa=_0x39da31[_0x11edd5(0x1d5)]?new Date(_0x39da31[_0x11edd5(0x1d5)])[_0x11edd5(0x2f8)]():Date[_0x11edd5(0x296)](),_0x3cb17a={'start':_0x12f32a,'end':_0x1c13fa,'duration':_0x1c13fa-_0x12f32a};_0x1c02da[_0x11edd5(0x2bc)](_0x39da31['id'],_0x3cb17a),_0x1e33a8['push']({'name':_0x39da31['fullName'],'state':_0x39da31[_0x11edd5(0x23f)]||_0x11edd5(0x2a9),'window':_0x3cb17a});}else _0x1e33a8['push']({'name':_0x39da31[_0x11edd5(0x181)],'state':_0x39da31['state']||_0x11edd5(0x1cf),'window':undefined});}_0x1e33a8[_0x11edd5(0x2cc)]((_0xed4b2c,_0x1b16b4)=>{const _0x30328d=_0x11edd5;if(!_0xed4b2c[_0x30328d(0x2db)])return 0x1;if(!_0x1b16b4[_0x30328d(0x2db)])return-0x1;return _0xed4b2c[_0x30328d(0x2db)][_0x30328d(0x2ee)]-_0x1b16b4[_0x30328d(0x2db)]['start'];});const _0x1bbb25=_0x1e33a8[_0x11edd5(0x235)],_0x371e42=_0x1bbb25>TIMELINE_CONFIG[_0x11edd5(0x2d2)];_0x371e42&&_0x1e33a8[_0x11edd5(0x2b6)](TIMELINE_CONFIG[_0x11edd5(0x2d2)]);const _0x55aa69=calculateTimeScale(_0x57d5ad,_0x4bacbd),_0x5ddaae=_0x2f42a1['done']?_0x2f42a1[_0x11edd5(0x25c)]?a42_0x52dc99[_0x11edd5(0x164)](_0x11edd5(0x25c)):a42_0x52dc99[_0x11edd5(0x2ef)]('error'):a42_0x52dc99[_0x11edd5(0x1a9)]('running'),_0x4cb947=_0x2f42a1['project']?.['id'],_0x551235=_0x2f42a1[_0x11edd5(0x1f6)];let _0x326beb;if(_0x4cb947&&_0x551235){const _0x2ffd9a=getWorkflowAttemptUrl(_0x587569,_0x4cb947,_0x551235,_0x2f42a1['id']);_0x326beb=hyperlink(a42_0x52dc99['dim'](_0x2f42a1['id']),_0x2ffd9a);}else _0x326beb=a42_0x52dc99[_0x11edd5(0x1bf)](_0x2f42a1['id']);_0x45ccfd[_0x11edd5(0x19c)](_0x11edd5(0x25b)+_0x326beb+_0x11edd5(0x17d)+_0x5ddaae+_0x11edd5(0x17d)+formatElapsed(_0x57d5ad[_0x11edd5(0x27c)]));if(_0x1e33a8['length']>0x0){const _0x5005ac=renderTimeAxis(_0x55aa69,_0x4bacbd),_0x471d8e=new Date(_0x57d5ad[_0x11edd5(0x2ee)]),_0x1ec238=formatDate(_0x471d8e),_0x15bc9e=TIMELINE_CONFIG[_0x11edd5(0x2c8)]+TIMELINE_CONFIG[_0x11edd5(0x20a)]+_0x507f4f,_0x298483=_0x1ec238[_0x11edd5(0x2b2)](_0x15bc9e),_0x5ed378=a42_0x52dc99[_0x11edd5(0x1bf)](_0x298483);_0x45ccfd['push'](_0x5ed378+'\x20'+_0x5005ac);for(const _0x9ac724 of _0x1e33a8){_0x45ccfd['push'](renderTaskRow(_0x9ac724,_0x55aa69,_0x4bacbd,_0x507f4f));}const _0x9b085f=calculateStats(_0x1e33a8);_0x45ccfd[_0x11edd5(0x19c)](formatStats(_0x9b085f)),_0x371e42&&_0x45ccfd['push'](a42_0x52dc99['yellow']('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x11edd5(0x1a6)+_0x1bbb25+_0x11edd5(0x1b2))),_0x45ccfd['push'](''),_0x45ccfd[_0x11edd5(0x19c)](a42_0x52dc99[_0x11edd5(0x1bf)](_0x11edd5(0x1e1))+(_0x11edd5(0x172)+_0x2f42a1['id']+'\x20logs')+a42_0x52dc99[_0x11edd5(0x1bf)](_0x11edd5(0x2c5)));}else _0x45ccfd[_0x11edd5(0x19c)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x45ccfd['join']('\x0a');}[a42_0x5d907a(0x194)](_0x37207c,_0x33c31b){const _0xa6e1de=a42_0x5d907a,_0x3263a2=new Date(_0x37207c[_0xa6e1de(0x2a5)])[_0xa6e1de(0x2f8)](),_0xe4bcda=_0x37207c[_0xa6e1de(0x169)]?new Date(_0x37207c[_0xa6e1de(0x169)])[_0xa6e1de(0x2f8)]():Date[_0xa6e1de(0x296)](),_0x35d169=_0xe4bcda-_0x3263a2,_0xe673d7=[];for(const _0x7b72d6 of _0x33c31b){if(_0x7b72d6[_0xa6e1de(0x17a)]){const _0xafac7e=new Date(_0x7b72d6[_0xa6e1de(0x17a)])[_0xa6e1de(0x2f8)](),_0x2e1d00=_0x7b72d6[_0xa6e1de(0x1d5)]?new Date(_0x7b72d6['updatedAt'])[_0xa6e1de(0x2f8)]():Date[_0xa6e1de(0x296)]();_0xe673d7[_0xa6e1de(0x19c)]({'name':_0x7b72d6['fullName'],'state':_0x7b72d6['state']||_0xa6e1de(0x2a9),'window':{'start':_0xafac7e,'end':_0x2e1d00,'duration':_0x2e1d00-_0xafac7e}});}else _0xe673d7['push']({'name':_0x7b72d6[_0xa6e1de(0x181)],'state':_0x7b72d6[_0xa6e1de(0x23f)]||_0xa6e1de(0x1cf),'window':undefined});}const _0x325eda=calculateStats(_0xe673d7);return{'attempt':{'id':_0x37207c['id'],'status':_0x37207c['done']?_0x37207c['success']?_0xa6e1de(0x25c):_0xa6e1de(0x2d9):'running','createdAt':_0x37207c[_0xa6e1de(0x2a5)],'finishedAt':_0x37207c[_0xa6e1de(0x169)],'duration_ms':_0x35d169},'tasks':_0xe673d7['map'](_0x41bec8=>({'name':_0x41bec8[_0xa6e1de(0x1fc)],'state':_0x41bec8['state'],'startedAt':_0x41bec8[_0xa6e1de(0x2db)]?new Date(_0x41bec8[_0xa6e1de(0x2db)]['start'])[_0xa6e1de(0x1eb)]():null,'updatedAt':_0x41bec8['window']?new Date(_0x41bec8[_0xa6e1de(0x2db)][_0xa6e1de(0x1fd)])['toISOString']():null,'duration_ms':_0x41bec8[_0xa6e1de(0x2db)]?.[_0xa6e1de(0x27c)]||null})),'stats':_0x325eda};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xed453,_0x524a6a){const _0x49a3ce=a43_0x3aa9,_0x206c24=_0xed453();while(!![]){try{const _0x35d653=-parseInt(_0x49a3ce(0x9a))/0x1*(parseInt(_0x49a3ce(0xa1))/0x2)+parseInt(_0x49a3ce(0xa6))/0x3+-parseInt(_0x49a3ce(0x96))/0x4*(parseInt(_0x49a3ce(0x9b))/0x5)+parseInt(_0x49a3ce(0xa3))/0x6+-parseInt(_0x49a3ce(0xa0))/0x7+-parseInt(_0x49a3ce(0x98))/0x8+-parseInt(_0x49a3ce(0x9d))/0x9*(-parseInt(_0x49a3ce(0x9f))/0xa);if(_0x35d653===_0x524a6a)break;else _0x206c24['push'](_0x206c24['shift']());}catch(_0x139e6d){_0x206c24['push'](_0x206c24['shift']());}}}(a43_0x2b56,0x3315c));import{platform}from'os';function a43_0x3aa9(_0x3ed214,_0x5bb255){_0x3ed214=_0x3ed214-0x95;const _0x2b5697=a43_0x2b56();let _0x3aa9bf=_0x2b5697[_0x3ed214];return _0x3aa9bf;}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0xc1018f=a43_0x3aa9,_0x586123=getVersion(),_0x1886ef=platform(),_0x35f706=process[_0xc1018f(0x97)][_0xc1018f(0xa4)]('v','');return _0xc1018f(0x9c)+_0x586123+'\x20('+_0x1886ef+_0xc1018f(0xa2)+_0x35f706+')';}function a43_0x2b56(){const _0x46306c=['tdx/','93060spyyAC','length','610nfqTym','478289leDeyY','25106NOrQMK',';\x20node/','1979712ikUbyd','replace','TD1\x20','156945CIFzpc','Authorization','tdx','1996qRfsmq','version','2489912KVQuHR','X-Trino-User','7rMpwHU','3370dKnaCg'];a43_0x2b56=function(){return _0x46306c;};return a43_0x2b56();}export function getAuthHeaders(_0x34b1dd,_0x3070ff){const _0x2d63f2=a43_0x3aa9,_0x551524=getVersion(),_0x4ed93b={'User-Agent':getUserAgent(),'X-TD-Client':_0x2d63f2(0x95),'X-TD-Client-Version':_0x551524};return _0x3070ff&&(_0x4ed93b[_0x2d63f2(0xa7)]=_0x2d63f2(0xa5)+_0x3070ff),_0x4ed93b;}export function toHeaderRecord(_0x3dac00){const _0x5a9eb6={};for(const [_0x240cf5,_0x2a0897]of Object['entries'](_0x3dac00)){_0x2a0897!==undefined&&(_0x5a9eb6[_0x240cf5]=_0x2a0897);}return _0x5a9eb6;}export function getTrinoHeaders(_0x441f53,_0x8e4624){const _0x20b8c5=a43_0x3aa9,_0x4c5d35=getAuthHeaders(_0x441f53,_0x8e4624),_0x4368df=toHeaderRecord(_0x4c5d35);return delete _0x4368df[_0x20b8c5(0xa7)],_0x8e4624&&(_0x4368df[_0x20b8c5(0x99)]=_0x8e4624),_0x4368df;}export function hasAPIKey(_0x942977){const _0x33d417=a43_0x3aa9,_0xa22561=getAPIKey(_0x942977);return _0xa22561!==undefined&&_0xa22561[_0x33d417(0x9e)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x39845d,_0xb2d69c){const _0x1b244c=a44_0x3023,_0x42ba5e=_0x39845d();while(!![]){try{const _0x383689=-parseInt(_0x1b244c(0x11f))/0x1+-parseInt(_0x1b244c(0x139))/0x2*(parseInt(_0x1b244c(0x130))/0x3)+-parseInt(_0x1b244c(0x14c))/0x4*(parseInt(_0x1b244c(0x156))/0x5)+parseInt(_0x1b244c(0x11e))/0x6+-parseInt(_0x1b244c(0x13a))/0x7+parseInt(_0x1b244c(0x12c))/0x8*(parseInt(_0x1b244c(0x15a))/0x9)+parseInt(_0x1b244c(0x126))/0xa*(parseInt(_0x1b244c(0x145))/0xb);if(_0x383689===_0xb2d69c)break;else _0x42ba5e['push'](_0x42ba5e['shift']());}catch(_0x417399){_0x42ba5e['push'](_0x42ba5e['shift']());}}}(a44_0x110e,0xa4dd8));function a44_0x3023(_0x3d387a,_0x150ff0){_0x3d387a=_0x3d387a-0x114;const _0x110e7a=a44_0x110e();let _0x3023f5=_0x110e7a[_0x3d387a];return _0x3023f5;}import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x1718d2 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x45ce0c){const _0x100f8b=a44_0x3023;return _0x45ce0c[_0x100f8b(0x13f)]==='json'||_0x45ce0c[_0x100f8b(0x13f)]===_0x100f8b(0x122)||_0x45ce0c['format']==='tsv'||_0x45ce0c[_0x100f8b(0x13f)]===_0x100f8b(0x154)||_0x45ce0c[_0x100f8b(0x133)]===!![]||_0x45ce0c[_0x100f8b(0x122)]===!![]||_0x45ce0c[_0x100f8b(0x12d)]===!![]||_0x45ce0c['table']===!![];}export function parseOutputOptions(_0x2b16a7){const _0x500271=a44_0x3023;return{'format':_0x2b16a7[_0x500271(0x13f)]||_0x500271(0x154),'output':_0x2b16a7[_0x500271(0x119)]||'','limit':_0x2b16a7['limit'],'color':_0x2b16a7[_0x500271(0x128)],'noColor':_0x2b16a7[_0x500271(0x14d)]};}function convertSDKResultToQueryResult(_0x4a1745){const _0x30fc21=a44_0x3023,_0x419930=[];if(_0x4a1745[_0x30fc21(0x11d)]>0x0){const _0x39ac62=_0x4a1745[0x0];for(const [_0xe3fa8f,_0x41cc56]of Object[_0x30fc21(0x14f)](_0x39ac62)){let _0x3c7ffc=_0x30fc21(0x148);if(typeof _0x41cc56===_0x30fc21(0x129))_0x3c7ffc=Number[_0x30fc21(0x149)](_0x41cc56)?_0x30fc21(0x153):_0x30fc21(0x14e);else{if(typeof _0x41cc56==='boolean')_0x3c7ffc=_0x30fc21(0x137);else _0x41cc56===null&&(_0x3c7ffc=_0x30fc21(0x148));}_0x419930[_0x30fc21(0x120)]({'name':_0xe3fa8f,'type':_0x3c7ffc});}}return{'queryId':_0x30fc21(0x13c),'columns':_0x419930,'data':_0x4a1745,'stats':{'state':_0x30fc21(0x124),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4a1745[_0x30fc21(0x11d)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x150459,_0x52eb08){const _0x70fa4b=convertSDKResultToQueryResult(_0x150459);return formatQueryOutput(_0x70fa4b,_0x52eb08);}export async function formatQueryOutput(_0x45f0a2,_0x1a8d3c){const _0x45fd03=a44_0x3023,{format:_0x5a5c3a,limit:_0x51ba08,output:_0x32c942,color:_0x631552,noColor:_0x5c4e1c}=_0x1a8d3c,_0xb52f49=Boolean(_0x32c942)&&!_0x631552,_0x2d29a8={'color':_0x631552,'noColor':_0x5c4e1c||_0xb52f49};if(_0x5a5c3a===_0x45fd03(0x154)){const _0x53a490=shouldUseLess(_0x5a5c3a,_0x32c942);return formatAsTable(_0x45f0a2,_0x51ba08,_0x53a490,_0x2d29a8);}else{if(_0x5a5c3a==='json')return formatAsJSON(_0x45f0a2,_0x2d29a8);else return _0x5a5c3a===_0x45fd03(0x122)?formatAsJSONL(_0x45f0a2,_0x2d29a8):formatQueryResult(_0x45f0a2,_0x5a5c3a);}}function shouldUseLess(_0xbfd3a2,_0x2d4810){const _0x4c3692=a44_0x3023;return(_0xbfd3a2===_0x4c3692(0x154)||_0xbfd3a2===_0x4c3692(0x152))&&process[_0x4c3692(0x151)][_0x4c3692(0x13e)]&&!_0x2d4810;}function a44_0x110e(){const _0x3cafcf=['tsv','stderr','keys','1568931vlMnVl','[error]','padEnd','json','spawn','error','max','boolean','repeat','2gTqSDv','4093425asumtj','Results\x20saved\x20to\x20','sdk-result','[logs]','isTTY','format','trim','[query]','query','map','yellow','1793FLKHwo','split','debug','varchar','isInteger','No\x20data','params','4772mVFqqR','noColor','double','entries','red','stdout','list','bigint','table','resolve','3505VXIfPA','object','─┴─','inherit','1710SHdfXz','blue','[params]','limit','forEach','join','output','stringify','stdin','end','length','5930094MUYqtz','739653SMxfYL','push','bold','jsonl','log','FINISHED','cyan','141090XicSBt','[rule]','color','number','-FXRSn','rule','2984asqGoj'];a44_0x110e=function(){return _0x3cafcf;};return a44_0x110e();}export function resolveOutputOptions(_0x20ffe7){const _0x24baef=a44_0x3023,_0x542b7c=resolveOutputFormat(_0x20ffe7['format'],_0x20ffe7[_0x24baef(0x119)],_0x24baef(0x154));let _0x4e14e5=typeof _0x20ffe7[_0x24baef(0x116)]===_0x24baef(0x129)?_0x20ffe7['limit']:parseInt(_0x20ffe7[_0x24baef(0x116)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x1db8ac=_0x20ffe7['output']||'';return shouldUseLess(_0x542b7c,_0x1db8ac)&&(_0x4e14e5=Infinity),{'format':_0x542b7c,'output':_0x1db8ac,'limit':_0x4e14e5,'color':_0x20ffe7[_0x24baef(0x128)],'noColor':_0x20ffe7[_0x24baef(0x14d)]};}export function writeOutput(_0x476b66,_0x32ed55,_0x1a019b){const _0x84e36b=a44_0x3023;return _0x32ed55?(writeFileSync(_0x32ed55,_0x476b66),console['error'](_0x84e36b(0x13b)+_0x32ed55),Promise[_0x84e36b(0x155)]()):shouldUseLess(_0x1a019b||'','')?new Promise(_0xabdbf0=>{const _0x18036b=_0x84e36b,_0x2772cd=spawn('less',[_0x18036b(0x12a)],{'stdio':['pipe',_0x18036b(0x159),_0x18036b(0x159)]});let _0x199b95=![];_0x2772cd['on'](_0x18036b(0x135),()=>{const _0x9ef3a7=_0x18036b;!_0x199b95&&(_0x199b95=!![],console[_0x9ef3a7(0x123)](_0x476b66),_0xabdbf0());}),_0x2772cd['on']('close',()=>{!_0x199b95&&(_0x199b95=!![],_0xabdbf0());}),_0x2772cd['on'](_0x18036b(0x134),()=>{const _0x5634e2=_0x18036b;!_0x199b95&&_0x2772cd['stdin']&&(_0x2772cd[_0x5634e2(0x11b)]['on']('error',()=>{}),_0x2772cd['stdin']['write'](_0x476b66),_0x2772cd[_0x5634e2(0x11b)][_0x5634e2(0x11c)]());}),!_0x2772cd[_0x18036b(0x11b)]&&(!_0x199b95&&(_0x199b95=!![],console[_0x18036b(0x123)](_0x476b66),_0xabdbf0()));}):(console[_0x84e36b(0x123)](_0x476b66),Promise[_0x84e36b(0x155)]());}export async function handleSDKOutput(_0x3113f2,_0x436ff0){const _0x4e202e=a44_0x3023,_0x36633e=resolveOutputOptions(_0x436ff0),_0x882ea1=await formatSDKOutput(_0x3113f2,_0x36633e);await writeOutput(_0x882ea1,_0x36633e[_0x4e202e(0x119)]||undefined,_0x36633e[_0x4e202e(0x13f)]);}export async function handleQueryOutput(_0x5419ed,_0x11ddcb){const _0x4387d5=a44_0x3023,_0x2d7833=resolveOutputOptions(_0x11ddcb),_0x3292ee=await formatQueryOutput(_0x5419ed,_0x2d7833);await writeOutput(_0x3292ee,_0x2d7833[_0x4387d5(0x119)]||undefined,_0x2d7833[_0x4387d5(0x13f)]);}async function formatSingleObject(_0x279ed3,_0x5b0036){const _0x49fcb7=a44_0x3023,{format:_0x344959,color:_0x5d24df,noColor:_0x24ad29}=_0x5b0036,_0x37218e={'color':_0x5d24df,'noColor':_0x24ad29};if(_0x344959===_0x49fcb7(0x133)){if(shouldUseColor(_0x37218e))return colorizeJSON(_0x279ed3,_0x37218e);return JSON[_0x49fcb7(0x11a)](_0x279ed3,null,0x2);}else{if(_0x344959===_0x49fcb7(0x122)){if(shouldUseColor(_0x37218e))return colorizeJSONCompact(_0x279ed3,_0x37218e);return JSON['stringify'](_0x279ed3);}else{if(_0x344959===_0x49fcb7(0x12d))return Object[_0x49fcb7(0x14f)](_0x279ed3)[_0x49fcb7(0x143)](([_0x3e19da,_0x216f13])=>_0x3e19da+'\x09'+_0x216f13)['join']('\x0a');else{const _0x5d6e97=Object[_0x49fcb7(0x14f)](_0x279ed3);if(_0x5d6e97['length']===0x0)return _0x49fcb7(0x14a);const _0x1f93ca=_0x279ed3[_0x49fcb7(0x147)],_0xf085f8=_0x279ed3[_0x49fcb7(0x142)],_0x3f9820=_0x279ed3[_0x49fcb7(0x14b)],_0x417d7a=_0x279ed3[_0x49fcb7(0x12b)],_0x276ad9=_0xf085f8?typeof _0xf085f8==='string'?_0xf085f8:JSON['stringify'](_0xf085f8,null,0x2):undefined,_0x45c716=_0x3f9820&&Object[_0x49fcb7(0x12f)](_0x3f9820)[_0x49fcb7(0x11d)]>0x0?JSON[_0x49fcb7(0x11a)](_0x3f9820,null,0x2):undefined,_0xd1bd57=_0x417d7a&&Object[_0x49fcb7(0x12f)](_0x417d7a)['length']>0x0?JSON['stringify'](_0x417d7a,null,0x2):undefined,_0x50811c=_0x5d6e97['filter'](([_0x325b20])=>_0x325b20!==_0x49fcb7(0x147)&&_0x325b20!==_0x49fcb7(0x142)&&_0x325b20!==_0x49fcb7(0x14b)&&_0x325b20!==_0x49fcb7(0x12b)),_0x59a58a=Math['max'](..._0x50811c[_0x49fcb7(0x143)](([_0x9e6b29])=>_0x9e6b29['length'])),_0x407df3=Math[_0x49fcb7(0x136)](..._0x50811c[_0x49fcb7(0x143)](([,_0x23acbc])=>{const _0x210782=_0x49fcb7;try{const _0x319630=_0x23acbc===null||_0x23acbc===undefined?'':typeof _0x23acbc==='object'?JSON[_0x210782(0x11a)](_0x23acbc):String(_0x23acbc),_0x2175d8=_0x319630[_0x210782(0x146)]('\x0a');return Math[_0x210782(0x136)](..._0x2175d8[_0x210782(0x143)](_0x26b14f=>_0x26b14f[_0x210782(0x11d)]),0x0);}catch{return 0x0;}}),0x14),_0x492b5b=[];_0x492b5b[_0x49fcb7(0x120)](colorBorder('┌─'+'─'[_0x49fcb7(0x138)](_0x59a58a)+'─┬─'+'─'[_0x49fcb7(0x138)](_0x407df3)+'─┐',_0x37218e)),_0x50811c[_0x49fcb7(0x117)](([_0x2f2b49,_0x48f5ee])=>{const _0x1bc2a1=_0x49fcb7;let _0xfd510a;try{_0xfd510a=_0x48f5ee===null||_0x48f5ee===undefined?'':typeof _0x48f5ee===_0x1bc2a1(0x157)?JSON[_0x1bc2a1(0x11a)](_0x48f5ee):String(_0x48f5ee);}catch{_0xfd510a='[Object]';}const _0x1b2ed4=_0x2f2b49['padEnd'](_0x59a58a),_0x223ed4=_0xfd510a[_0x1bc2a1(0x146)]('\x0a');_0x223ed4[_0x1bc2a1(0x117)]((_0x38ba4c,_0x4bbdb5)=>{const _0x4bf1ad=_0x1bc2a1,_0x727add=colorBorder('│',_0x37218e);_0x4bbdb5===0x0?_0x492b5b[_0x4bf1ad(0x120)](_0x727add+'\x20'+_0x1b2ed4+'\x20'+_0x727add+'\x20'+_0x38ba4c[_0x4bf1ad(0x132)](_0x407df3)+'\x20'+_0x727add):_0x492b5b[_0x4bf1ad(0x120)](_0x727add+'\x20'+'\x20'['repeat'](_0x59a58a)+'\x20'+_0x727add+'\x20'+_0x38ba4c[_0x4bf1ad(0x132)](_0x407df3)+'\x20'+_0x727add);});}),_0x492b5b[_0x49fcb7(0x120)](colorBorder('└─'+'─'['repeat'](_0x59a58a)+_0x49fcb7(0x158)+'─'[_0x49fcb7(0x138)](_0x407df3)+'─┘',_0x37218e));_0x276ad9&&(_0x492b5b[_0x49fcb7(0x120)](''),_0x492b5b['push'](String(a44_0x1718d2[_0x49fcb7(0x144)][_0x49fcb7(0x121)](_0x49fcb7(0x141)))),_0x492b5b['push'](_0x276ad9));_0x45c716&&(_0x492b5b[_0x49fcb7(0x120)](''),_0x492b5b[_0x49fcb7(0x120)](String(a44_0x1718d2[_0x49fcb7(0x114)][_0x49fcb7(0x121)](_0x49fcb7(0x115)))),_0x492b5b['push'](_0x45c716));_0xd1bd57&&(_0x492b5b['push'](''),_0x492b5b[_0x49fcb7(0x120)](String(a44_0x1718d2['magenta'][_0x49fcb7(0x121)](_0x49fcb7(0x127)))),_0x492b5b[_0x49fcb7(0x120)](_0xd1bd57));if(_0x1f93ca){if(_0x1f93ca[_0x49fcb7(0x12e)]){_0x492b5b[_0x49fcb7(0x120)](''),_0x492b5b[_0x49fcb7(0x120)](String(a44_0x1718d2[_0x49fcb7(0x150)][_0x49fcb7(0x121)](_0x49fcb7(0x131))));const _0x273669=_0x1f93ca[_0x49fcb7(0x12e)][_0x49fcb7(0x146)]('\x0a');_0x273669[_0x49fcb7(0x117)](_0x18b0a8=>{const _0x56b2cc=_0x49fcb7;_0x18b0a8[_0x56b2cc(0x140)]()&&_0x492b5b[_0x56b2cc(0x120)](_0x18b0a8);});}if(_0x1f93ca['cmdout']){_0x492b5b[_0x49fcb7(0x120)](''),_0x492b5b[_0x49fcb7(0x120)](String(a44_0x1718d2[_0x49fcb7(0x125)]['bold'](_0x49fcb7(0x13d))));const _0x555d9a=_0x1f93ca['cmdout'][_0x49fcb7(0x146)]('\x0a');_0x555d9a[_0x49fcb7(0x117)](_0x5a4a10=>{const _0x272d15=_0x49fcb7;_0x5a4a10[_0x272d15(0x140)]()&&_0x492b5b[_0x272d15(0x120)](_0x5a4a10);});}}return _0x492b5b[_0x49fcb7(0x118)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x5de635,_0x18edb0){const _0x14e6cb=a44_0x3023;if(_0x18edb0[_0x14e6cb(0x13f)]===_0x14e6cb(0x154)){await handleSDKOutput([_0x5de635],_0x18edb0);return;}const _0x344a1e=resolveOutputOptions(_0x18edb0),_0x44e1ed=await formatSingleObject(_0x5de635,_0x344a1e);await writeOutput(_0x44e1ed,_0x344a1e[_0x14e6cb(0x119)]||undefined,_0x344a1e[_0x14e6cb(0x13f)]);}
|
|
1
|
+
(function(_0xe55ead,_0x2f918d){const _0x4f0b05=a44_0x30f0,_0x5f136e=_0xe55ead();while(!![]){try{const _0x8222ec=parseInt(_0x4f0b05(0x1e9))/0x1+-parseInt(_0x4f0b05(0x1b9))/0x2*(-parseInt(_0x4f0b05(0x1d5))/0x3)+-parseInt(_0x4f0b05(0x1d2))/0x4*(parseInt(_0x4f0b05(0x1e5))/0x5)+-parseInt(_0x4f0b05(0x1e3))/0x6*(-parseInt(_0x4f0b05(0x1c4))/0x7)+-parseInt(_0x4f0b05(0x1e8))/0x8*(-parseInt(_0x4f0b05(0x1bc))/0x9)+parseInt(_0x4f0b05(0x1cf))/0xa+-parseInt(_0x4f0b05(0x1ab))/0xb*(parseInt(_0x4f0b05(0x1c9))/0xc);if(_0x8222ec===_0x2f918d)break;else _0x5f136e['push'](_0x5f136e['shift']());}catch(_0x4595e4){_0x5f136e['push'](_0x5f136e['shift']());}}}(a44_0x3c0c,0x30e67));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';function a44_0x3c0c(){const _0x2d1acd=['488wWSzfJ','141059mXyvIX','split','cyan','noColor','json','[params]','[error]','length','─┴─','stderr','7008837mldrCU','sdk-result','max','entries','color','filter','table','end','string','spawn','inherit','pipe','format','magenta','2sqQdhR','boolean','forEach','52416EfpFnp','trim','bold','blue','limit','map','repeat','join','1841497DNNvZK','[Object]','─┬─','[query]','query','12QsLiZS','padEnd','output','number','tsv','debug','1130590mfVFRY','stdin','bigint','44qqZZQZ','object','less','450978cwtUde','[logs]','[rule]','params','error','log','resolve','close','push','stringify','jsonl','keys','isInteger','yellow','6jVyEnS','rule','84235EwSIGh','varchar','cmdout'];a44_0x3c0c=function(){return _0x2d1acd;};return a44_0x3c0c();}import a44_0x2352a0 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x2bef66){const _0x742ac4=a44_0x30f0;return _0x2bef66['format']===_0x742ac4(0x1a5)||_0x2bef66[_0x742ac4(0x1b7)]===_0x742ac4(0x1df)||_0x2bef66['format']===_0x742ac4(0x1cd)||_0x2bef66[_0x742ac4(0x1b7)]===_0x742ac4(0x1b1)||_0x2bef66[_0x742ac4(0x1a5)]===!![]||_0x2bef66[_0x742ac4(0x1df)]===!![]||_0x2bef66[_0x742ac4(0x1cd)]===!![]||_0x2bef66['table']===!![];}export function parseOutputOptions(_0x273811){const _0x501342=a44_0x30f0;return{'format':_0x273811[_0x501342(0x1b7)]||'table','output':_0x273811['output']||'','limit':_0x273811[_0x501342(0x1c0)],'color':_0x273811[_0x501342(0x1af)],'noColor':_0x273811['noColor']};}function convertSDKResultToQueryResult(_0x38bf8c){const _0x15f65f=a44_0x30f0,_0x87f635=[];if(_0x38bf8c['length']>0x0){const _0x552576=_0x38bf8c[0x0];for(const [_0x47a0f1,_0x19bc4b]of Object['entries'](_0x552576)){let _0x14a1b7=_0x15f65f(0x1e6);if(typeof _0x19bc4b===_0x15f65f(0x1cc))_0x14a1b7=Number[_0x15f65f(0x1e1)](_0x19bc4b)?_0x15f65f(0x1d1):'double';else{if(typeof _0x19bc4b==='boolean')_0x14a1b7=_0x15f65f(0x1ba);else _0x19bc4b===null&&(_0x14a1b7=_0x15f65f(0x1e6));}_0x87f635[_0x15f65f(0x1dd)]({'name':_0x47a0f1,'type':_0x14a1b7});}}return{'queryId':_0x15f65f(0x1ac),'columns':_0x87f635,'data':_0x38bf8c,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x38bf8c[_0x15f65f(0x1a8)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x28b358,_0x53b6c2){const _0x47e58e=convertSDKResultToQueryResult(_0x28b358);return formatQueryOutput(_0x47e58e,_0x53b6c2);}export async function formatQueryOutput(_0x2fa9ee,_0xde93e2){const _0x2426e9=a44_0x30f0,{format:_0x1cb521,limit:_0x3ccf56,output:_0x320c59,color:_0x256b6a,noColor:_0x1fdeea}=_0xde93e2,_0x232121=Boolean(_0x320c59)&&!_0x256b6a,_0x16800e={'color':_0x256b6a,'noColor':_0x1fdeea||_0x232121};if(_0x1cb521===_0x2426e9(0x1b1)){const _0x3e7d54=shouldUseLess(_0x1cb521,_0x320c59);return formatAsTable(_0x2fa9ee,_0x3ccf56,_0x3e7d54,_0x16800e);}else{if(_0x1cb521===_0x2426e9(0x1a5))return formatAsJSON(_0x2fa9ee,_0x16800e);else return _0x1cb521==='jsonl'?formatAsJSONL(_0x2fa9ee,_0x16800e):formatQueryResult(_0x2fa9ee,_0x1cb521);}}function shouldUseLess(_0x144b0e,_0x70d388){const _0x24007d=a44_0x30f0;return(_0x144b0e===_0x24007d(0x1b1)||_0x144b0e==='list')&&process['stdout']['isTTY']&&!_0x70d388;}export function resolveOutputOptions(_0x28e425){const _0x5edfe8=a44_0x30f0,_0x507d4f=resolveOutputFormat(_0x28e425[_0x5edfe8(0x1b7)],_0x28e425['output'],_0x5edfe8(0x1b1));let _0x14b1a5=typeof _0x28e425[_0x5edfe8(0x1c0)]===_0x5edfe8(0x1cc)?_0x28e425['limit']:parseInt(_0x28e425[_0x5edfe8(0x1c0)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x471086=_0x28e425[_0x5edfe8(0x1cb)]||'';return shouldUseLess(_0x507d4f,_0x471086)&&(_0x14b1a5=Infinity),{'format':_0x507d4f,'output':_0x471086,'limit':_0x14b1a5,'color':_0x28e425[_0x5edfe8(0x1af)],'noColor':_0x28e425[_0x5edfe8(0x1a4)]};}export function writeOutput(_0x5ee3b6,_0x39d652,_0x5385a2){const _0x209065=a44_0x30f0;return _0x39d652?(writeFileSync(_0x39d652,_0x5ee3b6),console[_0x209065(0x1d9)]('Results\x20saved\x20to\x20'+_0x39d652),Promise['resolve']()):shouldUseLess(_0x5385a2||'','')?new Promise(_0x16e3e9=>{const _0x5dc917=_0x209065,_0x52c54c=spawn(_0x5dc917(0x1d4),['-FXRSn'],{'stdio':[_0x5dc917(0x1b6),_0x5dc917(0x1b5),_0x5dc917(0x1b5)]});let _0x167336=![];_0x52c54c['on']('error',()=>{!_0x167336&&(_0x167336=!![],console['log'](_0x5ee3b6),_0x16e3e9());}),_0x52c54c['on'](_0x5dc917(0x1dc),()=>{!_0x167336&&(_0x167336=!![],_0x16e3e9());}),_0x52c54c['on'](_0x5dc917(0x1b4),()=>{const _0x49afeb=_0x5dc917;!_0x167336&&_0x52c54c['stdin']&&(_0x52c54c['stdin']['on'](_0x49afeb(0x1d9),()=>{}),_0x52c54c['stdin']['write'](_0x5ee3b6),_0x52c54c[_0x49afeb(0x1d0)][_0x49afeb(0x1b2)]());}),!_0x52c54c[_0x5dc917(0x1d0)]&&(!_0x167336&&(_0x167336=!![],console['log'](_0x5ee3b6),_0x16e3e9()));}):(console[_0x209065(0x1da)](_0x5ee3b6),Promise[_0x209065(0x1db)]());}function a44_0x30f0(_0x15fcff,_0x4f166f){_0x15fcff=_0x15fcff-0x1a2;const _0x3c0c64=a44_0x3c0c();let _0x30f01d=_0x3c0c64[_0x15fcff];return _0x30f01d;}export async function handleSDKOutput(_0x4a29b2,_0x43c28b){const _0x3f109d=a44_0x30f0,_0x3d93f9=resolveOutputOptions(_0x43c28b),_0x3d7102=await formatSDKOutput(_0x4a29b2,_0x3d93f9);await writeOutput(_0x3d7102,_0x3d93f9[_0x3f109d(0x1cb)]||undefined,_0x3d93f9[_0x3f109d(0x1b7)]);}export async function handleQueryOutput(_0x1b2ae7,_0x3f8e4e){const _0x365c71=a44_0x30f0,_0x11c1a8=resolveOutputOptions(_0x3f8e4e),_0x101841=await formatQueryOutput(_0x1b2ae7,_0x11c1a8);await writeOutput(_0x101841,_0x11c1a8[_0x365c71(0x1cb)]||undefined,_0x11c1a8['format']);}async function formatSingleObject(_0x5d9fcd,_0x145f71){const _0x5d1853=a44_0x30f0,{format:_0x5d1549,color:_0x3b8585,noColor:_0x4c0bf7}=_0x145f71,_0x2c610f={'color':_0x3b8585,'noColor':_0x4c0bf7};if(_0x5d1549===_0x5d1853(0x1a5)){if(shouldUseColor(_0x2c610f))return colorizeJSON(_0x5d9fcd,_0x2c610f);return JSON[_0x5d1853(0x1de)](_0x5d9fcd,null,0x2);}else{if(_0x5d1549===_0x5d1853(0x1df)){if(shouldUseColor(_0x2c610f))return colorizeJSONCompact(_0x5d9fcd,_0x2c610f);return JSON[_0x5d1853(0x1de)](_0x5d9fcd);}else{if(_0x5d1549===_0x5d1853(0x1cd))return Object[_0x5d1853(0x1ae)](_0x5d9fcd)[_0x5d1853(0x1c1)](([_0xdb8f84,_0x24318b])=>_0xdb8f84+'\x09'+_0x24318b)['join']('\x0a');else{const _0x37e93e=Object[_0x5d1853(0x1ae)](_0x5d9fcd);if(_0x37e93e[_0x5d1853(0x1a8)]===0x0)return'No\x20data';const _0x23aebc=_0x5d9fcd[_0x5d1853(0x1ce)],_0x54dd51=_0x5d9fcd[_0x5d1853(0x1c8)],_0x1e3947=_0x5d9fcd[_0x5d1853(0x1d8)],_0x26b58e=_0x5d9fcd[_0x5d1853(0x1e4)],_0x318099=_0x54dd51?typeof _0x54dd51===_0x5d1853(0x1b3)?_0x54dd51:JSON[_0x5d1853(0x1de)](_0x54dd51,null,0x2):undefined,_0x3bf7d6=_0x1e3947&&Object[_0x5d1853(0x1e0)](_0x1e3947)[_0x5d1853(0x1a8)]>0x0?JSON['stringify'](_0x1e3947,null,0x2):undefined,_0x14ec09=_0x26b58e&&Object[_0x5d1853(0x1e0)](_0x26b58e)[_0x5d1853(0x1a8)]>0x0?JSON[_0x5d1853(0x1de)](_0x26b58e,null,0x2):undefined,_0x5a5b16=_0x37e93e[_0x5d1853(0x1b0)](([_0x315f7d])=>_0x315f7d!==_0x5d1853(0x1ce)&&_0x315f7d!==_0x5d1853(0x1c8)&&_0x315f7d!==_0x5d1853(0x1d8)&&_0x315f7d!==_0x5d1853(0x1e4)),_0x4ecbbe=Math[_0x5d1853(0x1ad)](..._0x5a5b16[_0x5d1853(0x1c1)](([_0x51940a])=>_0x51940a['length'])),_0x567aea=Math[_0x5d1853(0x1ad)](..._0x5a5b16[_0x5d1853(0x1c1)](([,_0x5e9efa])=>{const _0x2d26c8=_0x5d1853;try{const _0x2c9463=_0x5e9efa===null||_0x5e9efa===undefined?'':typeof _0x5e9efa===_0x2d26c8(0x1d3)?JSON[_0x2d26c8(0x1de)](_0x5e9efa):String(_0x5e9efa),_0x43a6b1=_0x2c9463['split']('\x0a');return Math[_0x2d26c8(0x1ad)](..._0x43a6b1['map'](_0x39a237=>_0x39a237[_0x2d26c8(0x1a8)]),0x0);}catch{return 0x0;}}),0x14),_0x3ff11a=[];_0x3ff11a[_0x5d1853(0x1dd)](colorBorder('┌─'+'─'[_0x5d1853(0x1c2)](_0x4ecbbe)+_0x5d1853(0x1c6)+'─'[_0x5d1853(0x1c2)](_0x567aea)+'─┐',_0x2c610f)),_0x5a5b16[_0x5d1853(0x1bb)](([_0x126009,_0x37a1bb])=>{const _0x30978c=_0x5d1853;let _0x569640;try{_0x569640=_0x37a1bb===null||_0x37a1bb===undefined?'':typeof _0x37a1bb==='object'?JSON[_0x30978c(0x1de)](_0x37a1bb):String(_0x37a1bb);}catch{_0x569640=_0x30978c(0x1c5);}const _0x56a060=_0x126009[_0x30978c(0x1ca)](_0x4ecbbe),_0xd92418=_0x569640['split']('\x0a');_0xd92418[_0x30978c(0x1bb)]((_0x4396be,_0x3af7ee)=>{const _0x176fce=_0x30978c,_0x1d179f=colorBorder('│',_0x2c610f);_0x3af7ee===0x0?_0x3ff11a[_0x176fce(0x1dd)](_0x1d179f+'\x20'+_0x56a060+'\x20'+_0x1d179f+'\x20'+_0x4396be['padEnd'](_0x567aea)+'\x20'+_0x1d179f):_0x3ff11a['push'](_0x1d179f+'\x20'+'\x20'['repeat'](_0x4ecbbe)+'\x20'+_0x1d179f+'\x20'+_0x4396be[_0x176fce(0x1ca)](_0x567aea)+'\x20'+_0x1d179f);});}),_0x3ff11a[_0x5d1853(0x1dd)](colorBorder('└─'+'─'[_0x5d1853(0x1c2)](_0x4ecbbe)+_0x5d1853(0x1a9)+'─'[_0x5d1853(0x1c2)](_0x567aea)+'─┘',_0x2c610f));_0x318099&&(_0x3ff11a[_0x5d1853(0x1dd)](''),_0x3ff11a[_0x5d1853(0x1dd)](String(a44_0x2352a0[_0x5d1853(0x1e2)][_0x5d1853(0x1be)](_0x5d1853(0x1c7)))),_0x3ff11a[_0x5d1853(0x1dd)](_0x318099));_0x3bf7d6&&(_0x3ff11a[_0x5d1853(0x1dd)](''),_0x3ff11a[_0x5d1853(0x1dd)](String(a44_0x2352a0[_0x5d1853(0x1bf)][_0x5d1853(0x1be)](_0x5d1853(0x1a6)))),_0x3ff11a['push'](_0x3bf7d6));_0x14ec09&&(_0x3ff11a[_0x5d1853(0x1dd)](''),_0x3ff11a[_0x5d1853(0x1dd)](String(a44_0x2352a0[_0x5d1853(0x1b8)][_0x5d1853(0x1be)](_0x5d1853(0x1d7)))),_0x3ff11a[_0x5d1853(0x1dd)](_0x14ec09));if(_0x23aebc){if(_0x23aebc[_0x5d1853(0x1aa)]){_0x3ff11a[_0x5d1853(0x1dd)](''),_0x3ff11a[_0x5d1853(0x1dd)](String(a44_0x2352a0['red'][_0x5d1853(0x1be)](_0x5d1853(0x1a7))));const _0x5a95c9=_0x23aebc['stderr']['split']('\x0a');_0x5a95c9[_0x5d1853(0x1bb)](_0x215eeb=>{const _0x303b8f=_0x5d1853;_0x215eeb[_0x303b8f(0x1bd)]()&&_0x3ff11a['push'](_0x215eeb);});}if(_0x23aebc[_0x5d1853(0x1e7)]){_0x3ff11a[_0x5d1853(0x1dd)](''),_0x3ff11a['push'](String(a44_0x2352a0[_0x5d1853(0x1a3)][_0x5d1853(0x1be)](_0x5d1853(0x1d6))));const _0x4d8d9d=_0x23aebc[_0x5d1853(0x1e7)][_0x5d1853(0x1a2)]('\x0a');_0x4d8d9d['forEach'](_0x49435c=>{const _0xc7d95a=_0x5d1853;_0x49435c[_0xc7d95a(0x1bd)]()&&_0x3ff11a[_0xc7d95a(0x1dd)](_0x49435c);});}}return _0x3ff11a[_0x5d1853(0x1c3)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x2a29e5,_0x1cab9f){const _0x5f42b3=a44_0x30f0;if(_0x1cab9f[_0x5f42b3(0x1b7)]===_0x5f42b3(0x1b1)){await handleSDKOutput([_0x2a29e5],_0x1cab9f);return;}const _0x3fa684=resolveOutputOptions(_0x1cab9f),_0x4ef002=await formatSingleObject(_0x2a29e5,_0x3fa684);await writeOutput(_0x4ef002,_0x3fa684[_0x5f42b3(0x1cb)]||undefined,_0x3fa684[_0x5f42b3(0x1b7)]);}
|