@treasuredata/tdx 2026.5.0 → 2026.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.d.ts +9 -0
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.d.ts +8 -1
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.d.ts +8 -1
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/segment-validator.js.map +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +19 -0
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x5a9c5d=a55_0x47db;function a55_0x47db(_0x2fc570,_0x317d85){_0x2fc570=_0x2fc570-0xe4;const _0x2ee0cd=a55_0x2ee0();let _0x47db43=_0x2ee0cd[_0x2fc570];return _0x47db43;}function a55_0x2ee0(){const _0x24b82e=['text','ICON_SPACING','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','workflow:projects','\x20secrets...','1454046BagtwS','GUTTER','fullName','\x20enabled\x20(','\x22\x20to\x20new\x20project\x20\x22','now','renderTimeline','workflow:download','Using\x20attempt\x20','workflow:retry','durationMs','preparePushProject','Latest\x20session\x20has\x20no\x20attempt','sessionId','padStart','workflow:clone','MAX_TASKS_DISPLAY','\x22\x20with\x20new\x20revision?','\x20\x20Session\x20ID:\x20','Validation:\x20skipped','isTTY','parseProjectWorkflowPattern','repeat','Enable\x20a\x20workflow\x20schedule','workflow:secrets:list','📋\x20','\x20\x20Console:\x20','Show\x20tasks\x20for\x20an\x20attempt','deleted','\x20new','\x20logs','kill','download','jsonl','✔\x20Deleted\x20project\x20','resolveProjectId','Error:\x20Project\x20name\x20is\x20required','Include\x20retried:\x20yes','index','includeRetried','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Task\x20graph:','config','group_error','Project\x20directory:\x20','sourceDir','No\x20log\x20content\x20found','green','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','planned','isDirectory','workflow','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','LABEL_MIN_SPACING','\x1b[1A\x1b[2K','.\x20Expected\x20format:\x20KEY=VALUE','bold','isNewProject','From\x20task:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','No\x20workflows\x20found','params','\x20schedule','No\x20workflow\x20sessions\x20found','Disabling\x20schedule\x20#','(use\x20--limit\x20to\x20see\x20more)','list','dryRun','split','session_id','getFullYear','10lCYDxR','cwd','Pushing\x20workflow\x20project...','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','delete','Attempt:\x20','find','\x20\x20Workflow:\x20','canceling','Select\x20a\x20workflow\x20to\x20run','pending','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20next:\x20','start','red','indexOf','Setting\x20secret...','✔\x20Project\x20updated','stdout','workflow:attempts','metadata','execute','\x22?\x20This\x20cannot\x20be\x20undone.','\x0aPush\x20these\x20changes?','\x0aDry\x20run\x20-\x20nothing\x20pushed','targetDir','New\x20project\x20name:\x20','limit','Setting\x20','min','Pushing\x20project...','✔\x20Pull\x20complete','listSecrets','workflowProject','parse','description','Updating\x20','Listing\x20secrets...','workflow:pull','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','get','Failed\x20to\x20fetch\x20attempt\x20data','workflow:use','22369113RJHqgJ','msPerChar','tasks','✔\x20Schedule\x20#','Target:\x20','slice','\x0aUpdate\x20existing\x20project\x20\x22','workflow:run','No\x20sessions\x20found','listSchedules','\x0a⚠\x20Project\x20\x22','existingProjectId','Error:\x20Attempt\x20ID\x20is\x20required','workflow:logs','LABEL_WIDTH_DIVISOR','workflow:kill','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','\x0a✔\x20Attempt\x20complete','workflow:attempt','error','has','substring','columns','attempt','name','retryAttempt','sessions','attemptId','Listing\x20workflow\x20projects...','Secrets\x20to\x20set:\x20','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','fromTask','displayLine','\x20(use\x20--limit\x20to\x20show\x20more)','verbose','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Fetching\x20workflow\x20','\x20\x20Target:\x20','Cancelled','message','trimEnd','Output\x20directory:\x20','tdx\x20wf\x20attempt\x20','projectName','Error:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','98VeEmvv','\x20modified','\x20attempt','done','\x20\x20Source:\x20','Error:\x20Secret\x20key\x20is\x20required','getHours','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','keys','/attempt/','length','fileCount','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','-\x20no\x20files\x20written','Killing\x20attempt...','856862zZdXrG','\x20-\x20','yellow','new','deleteSecret','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','\x20\x20New\x20attempt\x20ID:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','showWorkflowConsoleUrl','Revision:\x20','Show\x20specific\x20attempt\x20details','map','window','title','max','localeCompare','Including\x20subtasks:\x20yes','key','createdAt','Session\x20time:','values','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','task','Filter:\x20project=','getMonth','Tip:\x20cd\x20to\x20workflows/','executePushProject','No\x20schedules\x20found','round','Getting\x20attempt\x20tasks...','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Disable\x20a\x20workflow\x20schedule','projects','getWorkflow','No\x20attempts\x20found\x20in\x20project:\x20','select','updatedAt','\x0a✔\x20No\x20changes\x20to\x20push','reason','\x20task','Session\x20time:\x20','finishedAt','Workflow:\x20','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Dry\x20run:\x20yes','\x20secret','POLL_INTERVAL_MS','workflow:upload','modified','executeDryRun','stat','sessionTime','all','Key\x20cannot\x20be\x20empty','Pattern:\x20','List\x20all\x20workflow\x20projects','project','renderSessionsTimeline','\x20workflow','push','workflow:schedule:disable','Loading\x20sessions...','session','getMinutes','relative','context','Listing\x20workflow\x20sessions...','applyPullProject','\x20\x20Project\x20ID:\x20','3194124BSwfEE','Force:\x20yes','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20\x20Changes:\x20','Warning:','328357nRaxhz','utf-8','\x20session','Status:\x20','filesExtracted','log','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Project\x20name\x20is\x20required',',\x20Workflow:\x20','site','retryAttemptName','toLowerCase','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','running','json','MIN_TIMELINE_WIDTH','clear','table','trim','follow','---\x20','executeCloneProject','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','workflow:schedules','...','unchanged','✔\x20Workflow\x20project\x20set\x20to:\x20','✔\x20Retry\x20started','path','/app/workflows/','replace','enableSchedule','targetExists','No\x20workflow\x20tdx.json\x20found','\x20\x20Next\x20run:\x20','changes','value','dim','write','startsWith','skipValidation','List\x20workflow\x20attempts','\x0aError:','revision:\x20','type','730640WTUfYb','(unknown)','hasChanges','resumeFrom','Project\x20filter:\x20','workflow:workflows','workflowName','Getting\x20attempt\x20details...','duration','Downloading\x20logs...','taskName','List\x20workflow\x20schedules','splice','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','renderSingleTimeline','\x27\x20from\x20project\x20\x27','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','\x20tasks','\x20secrets\x20set\x20for\x20project\x20\x27','diff','navigateSessionsInteractive','attempt:','\x0a✔\x20Already\x20up\x20to\x20date','end','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','join','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','\x20(disabled)','\x0aDry\x20run\x20-\x20no\x20files\x20written','icon','attempts','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','✔\x20Clone\x20complete','data','✔\x20Showing\x20','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','Source\x20directory:\x20','Target\x20directory:\x20','startedAt','Auto-selected\x20latest\x20session:\x20','\x20has\x20no\x20attempts','set','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','summary','workflows','\x20from\x20session\x20','✔\x20Found\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','Attempt\x20ID:\x20','some','floor','stringify','fs/promises','✔\x20Downloaded\x20','format','filter','\x20\x20Files\x20extracted:\x20','\x20\x20Attempt\x20ID:\x20','\x20of\x20','state','Source\x20project:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','session:','Session\x20not\x20found:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','unknown','sort','Error:','workflow:delete','includes','cyan','autocomplete','match','5hdvGwE','Retrying\x20session...','resolveProjectDir','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Listing\x20workflow\x20attempts...','rows','force','TASK_NAME_WIDTH','Parameters:\x20','pullProject','retrySession','\x20\x20Revision:\x20','\x0aFailed\x20to\x20fetch\x20attempt\x20data','2269191gqtmtB','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','workflow:timeline','\x20\x20Location:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','resolveProject','No\x20attempts\x20found','List\x20workflow\x20execution\x20sessions','prepareCloneProject','Source\x20directory\x20is\x20required','/sessions/','projectId','Error:\x20Invalid\x20JSON\x20in\x20--params','✔\x20Workflow\x20run\x20started','total','Retrying\x20attempt...','output','✔\x20Project:\x20','List\x20workflows','💡\x20Tip:\x20Use\x20','from','startTime','getTime','workflow:sessions','✔\x20Secret\x20\x27','No\x20workflows\x20found\x20in\x20project:\x20','fileSize','\x20is\x20not\x20a\x20directory','requireProject','getDate','\x20deleted','nextRunTime','lastAttempt','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','No\x20sessions\x20found\x20for:\x20','isArray','\x20disabled\x20(','Loading\x20workflows...','newProjectName','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20unchanged','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','pollTimeline','Listing\x20workflows...','newProjectId','readFile','Writing\x20files...','\x20(system)','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','Filter:\x20','toISOString','Invalid\x20format:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','Session\x20','MIN_LABEL_COUNT','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','workflow:tasks','Source:\x20','No\x20sessions\x20found\x20in\x20project:\x20','sourceProjectName','\x20\x20Session\x20context\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20','status','Project:\x20','revision','logs','success','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','⚠\x20Showing\x20first\x20','blue','Start\x20a\x20workflow\x20run','fill','buildTimelineData','workflow:secrets:set','Error:\x20Invalid\x20parameter\x20format:\x20','yes','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x0aApply\x20these\x20changes?','MAX_TIMELINE_WIDTH','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','cancelRequested','every','Resume\x20from:\x20','generateSessionTimelineRows','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Analyzing\x20changes...'];a55_0x2ee0=function(){return _0x24b82e;};return a55_0x2ee0();}(function(_0x34dee8,_0x500d4e){const _0x5db250=a55_0x47db,_0x5b3523=_0x34dee8();while(!![]){try{const _0x3f7a2c=parseInt(_0x5db250(0x289))/0x1+parseInt(_0x5db250(0x23e))/0x2+parseInt(_0x5db250(0x132))/0x3+parseInt(_0x5db250(0x284))/0x4+-parseInt(_0x5db250(0x125))/0x5*(parseInt(_0x5db250(0x18f))/0x6)+parseInt(_0x5db250(0x22f))/0x7*(parseInt(_0x5db250(0x2b6))/0x8)+-parseInt(_0x5db250(0x201))/0x9*(parseInt(_0x5db250(0x1d6))/0xa);if(_0x3f7a2c===_0x500d4e)break;else _0x5b3523['push'](_0x5b3523['shift']());}catch(_0x1c1893){_0x5b3523['push'](_0x5b3523['shift']());}}}(a55_0x2ee0,0xd294a));import a55_0x359219 from'chalk';import{existsSync}from'fs';import a55_0x815213 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import{parseTaskGraph,formatTaskGraph,summarizeTaskGraph,formatWarningSummary}from'../sdk/workflow/task-graph.js';import a55_0x1b2e73 from'prompts';function getAttemptStatusDisplay(_0x46330a){const _0x1f03fa=a55_0x47db;if(!_0x46330a)return{'icon':'⏳','text':''};const {done:_0x4cd723,success:_0x5d70f7,cancelRequested:_0x3964f9}=_0x46330a;if(!_0x4cd723)return _0x3964f9?{'icon':'🛑','text':a55_0x359219[_0x1f03fa(0x240)](_0x1f03fa(0x1de))}:{'icon':'🔄','text':a55_0x359219[_0x1f03fa(0x179)](_0x1f03fa(0x296))};if(_0x5d70f7)return{'icon':'✅','text':a55_0x359219['green']('success')};return{'icon':'❌','text':a55_0x359219[_0x1f03fa(0x1e4)](_0x1f03fa(0x214))};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x5a9c5d(0x137)](_0x3b65b2,_0x326f22,_0x150bae=0x0){return _0x3b65b2[_0x150bae]||_0x326f22['workflowProject'];}[a55_0x5a9c5d(0x14e)](_0x3e0e3d,_0x100267,_0x3ea85f=0x0){const _0x482a7b=a55_0x5a9c5d,_0x298507=this[_0x482a7b(0x137)](_0x3e0e3d,_0x100267,_0x3ea85f);if(!_0x298507)return console['error'](a55_0x359219[_0x482a7b(0x1e4)]('Error:'),_0x482a7b(0x290)),console['error'](a55_0x359219[_0x482a7b(0x2ae)](_0x482a7b(0x1bf))),null;return _0x298507;}['parseProjectWorkflowPattern'](_0x1a6a6f,_0x246062){const _0x49e0b5=a55_0x5a9c5d;if(_0x1a6a6f[0x0]){const _0x38c84c=_0x1a6a6f[0x0][_0x49e0b5(0x1d3)]('.');if(_0x38c84c[_0x49e0b5(0x239)]===0x1)return{'projectName':_0x38c84c[0x0],'workflowName':undefined};else return _0x38c84c['length']===0x2?{'projectName':_0x38c84c[0x0],'workflowName':_0x38c84c[0x1]}:(console['error'](a55_0x359219[_0x49e0b5(0x1e4)](_0x49e0b5(0x11f)),_0x49e0b5(0x253)),null);}return{'projectName':_0x246062[_0x49e0b5(0x1f7)],'workflowName':undefined};}[a55_0x5a9c5d(0x127)](_0x1d0fdb,_0x291ff0,_0x4b6e3f=0x0){const _0x5eaa0d=a55_0x5a9c5d;if(_0x1d0fdb[_0x4b6e3f])return _0x1d0fdb[_0x4b6e3f];if(_0x291ff0[_0x5eaa0d(0x1f7)]){const _0x5224ce=a55_0x815213[_0x5eaa0d(0xf3)](process['cwd'](),'workflows',_0x291ff0[_0x5eaa0d(0x1f7)]);if(existsSync(a55_0x815213[_0x5eaa0d(0xf3)](_0x5224ce,'tdx.json')))return _0x5224ce;}return undefined;}async[a55_0x5a9c5d(0x246)](_0x4e534f,_0x14cad6,_0x319d29){const _0x1e4046=a55_0x5a9c5d;try{const _0x95ba38=await _0x4e534f[_0x1e4046(0x1c2)]['workflows'](_0x14cad6,{'limit':0x1});if(_0x95ba38['length']>0x0){const _0x56d77a=_0x95ba38[0x0]['id'],_0x4752c2=getWorkflowUrl(_0x319d29,_0x56d77a);console[_0x1e4046(0x214)](_0x1e4046(0x1a9)+a55_0x359219[_0x1e4046(0x122)](_0x4752c2));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a55_0x5a9c5d(0x200);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0xf4);async[a55_0x5a9c5d(0x1eb)](_0x104808){const _0x37ae6a=a55_0x5a9c5d,{options:_0x59654e,args:_0x1030c7,tdx:_0x21bd5d}=_0x104808,_0x5d963e=_0x1030c7[0x0],_0x16caac=_0x59654e[_0x37ae6a(0x299)];if(_0x16caac)return saveSessionContext({'workflow_project':undefined},_0x59654e[_0x37ae6a(0x27d)]),console[_0x37ae6a(0x28e)](a55_0x359219['green']('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x5d963e)return console['error'](a55_0x359219[_0x37ae6a(0x1e4)](_0x37ae6a(0x11f)),'Project\x20name\x20is\x20required'),console[_0x37ae6a(0x214)](a55_0x359219[_0x37ae6a(0x2ae)](_0x37ae6a(0x167))),console[_0x37ae6a(0x214)](a55_0x359219[_0x37ae6a(0x2ae)](_0x37ae6a(0x11b))),0x1;const _0x12a3da=await withSpinner('Resolving\x20project\x20\x27'+_0x5d963e+'\x27...',()=>_0x21bd5d[_0x37ae6a(0x1c2)][_0x37ae6a(0x1b2)](_0x5d963e),{'verbose':_0x59654e[_0x37ae6a(0x223)]}),{name:_0x353bf8}=_0x12a3da['data'];return saveSessionContext({'workflow_project':_0x353bf8},_0x59654e[_0x37ae6a(0x27d)]),console[_0x37ae6a(0x28e)](a55_0x359219[_0x37ae6a(0x1be)](_0x37ae6a(0x2a3)+a55_0x359219[_0x37ae6a(0x122)](_0x353bf8))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a55_0x5a9c5d(0x18d);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x276);async[a55_0x5a9c5d(0x1eb)](_0x4af2e4){const _0x516573=a55_0x5a9c5d,{options:_0x4eb32f,args:_0x3cea56,tdx:_0xcd4898}=_0x4af2e4,_0x3c4e38=_0x3cea56[0x0];_0x4eb32f[_0x516573(0x223)]&&_0x3c4e38&&console[_0x516573(0x214)](_0x516573(0x275)+_0x3c4e38);const _0x50c175=await withSpinner(_0x516573(0x21d),()=>_0xcd4898[_0x516573(0x1c2)][_0x516573(0x25f)](_0x3c4e38,{'limit':_0x4eb32f[_0x516573(0x1f1)]}),{'verbose':_0x4eb32f[_0x516573(0x223)]});let _0x5d480c=_0x50c175['data'];_0x5d480c['sort']((_0x578a73,_0x1fd360)=>_0x578a73['name'][_0x516573(0x24d)](_0x1fd360[_0x516573(0x219)]));const _0x33b0ba=_0x4eb32f['limit']&&_0x5d480c['length']>=_0x4eb32f[_0x516573(0x1f1)]?a55_0x359219['dim'](_0x516573(0x222)):'';console[_0x516573(0x214)](_0x516573(0x109)+_0x5d480c[_0x516573(0x239)]+'\x20project'+(_0x5d480c[_0x516573(0x239)]!==0x1?'s':'')+_0x33b0ba);if(_0x4eb32f['format']==='json'||_0x4eb32f[_0x516573(0x111)]===_0x516573(0x1b0)||_0x4eb32f['format']==='table')await handleSDKOutput(_0x5d480c,_0x4eb32f);else{if(_0x5d480c['length']===0x0)_0x3c4e38?console[_0x516573(0x28e)]('No\x20projects\x20match\x20pattern:\x20'+_0x3c4e38):console[_0x516573(0x28e)]('No\x20workflow\x20projects\x20found');else{const _0x332c22=_0x5d480c[_0x516573(0x249)](_0x121606=>{const _0x339204=_0x516573,_0x3307f7=_0x121606[_0x339204(0x1ea)]?.[_0x339204(0x10c)](_0x2229df=>_0x2229df[_0x339204(0x24f)]==='sys'),_0x1e1b27=_0x3307f7?a55_0x359219[_0x339204(0x2ae)](_0x339204(0x161)):'';return'📁\x20'+_0x121606[_0x339204(0x219)]+_0x1e1b27;});await writeOutput(_0x332c22[_0x516573(0xf3)]('\x0a'),_0x4eb32f[_0x516573(0x142)],_0x516573(0x1d1));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x2bb);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x144);async['execute'](_0x51c703){const _0x487c15=a55_0x5a9c5d,{options:_0x148ff5,args:_0x993bf9,tdx:_0x444919}=_0x51c703,_0x3c2bce=this[_0x487c15(0x137)](_0x993bf9,_0x148ff5);_0x148ff5[_0x487c15(0x223)]&&_0x3c2bce&&console[_0x487c15(0x214)](_0x487c15(0x2ba)+_0x3c2bce);const _0x2bd58a=await withSpinner(_0x487c15(0x15d),()=>_0x444919[_0x487c15(0x1c2)][_0x487c15(0x107)](_0x3c2bce,{'limit':_0x148ff5['limit']}),{'verbose':_0x148ff5[_0x487c15(0x223)]});let _0x40cf9b=_0x2bd58a[_0x487c15(0xfc)];_0x40cf9b[_0x487c15(0x11e)]((_0x425752,_0x49e0a4)=>{const _0x39cac4=_0x487c15,_0x2ebf0a=_0x425752[_0x39cac4(0x219)]['localeCompare'](_0x49e0a4[_0x39cac4(0x219)]);if(_0x2ebf0a!==0x0)return _0x2ebf0a;return(_0x425752[_0x39cac4(0x277)]?.[_0x39cac4(0x219)]||'')[_0x39cac4(0x24d)](_0x49e0a4[_0x39cac4(0x277)]?.[_0x39cac4(0x219)]||'');});const _0x5781f8=_0x148ff5[_0x487c15(0x1f1)]&&_0x40cf9b[_0x487c15(0x239)]>=_0x148ff5[_0x487c15(0x1f1)]?a55_0x359219[_0x487c15(0x2ae)](_0x487c15(0x222)):'';console[_0x487c15(0x214)](_0x487c15(0x109)+_0x40cf9b[_0x487c15(0x239)]+_0x487c15(0x279)+(_0x40cf9b[_0x487c15(0x239)]!==0x1?'s':'')+_0x5781f8);if(_0x148ff5[_0x487c15(0x111)]==='json'||_0x148ff5['format']==='jsonl'||_0x148ff5[_0x487c15(0x111)]===_0x487c15(0x29a))await handleSDKOutput(_0x40cf9b,_0x148ff5);else{if(_0x40cf9b[_0x487c15(0x239)]===0x0)_0x3c2bce?console[_0x487c15(0x28e)](_0x487c15(0x14b)+_0x3c2bce):console[_0x487c15(0x28e)](_0x487c15(0x1cb));else{const _0x4a8717=_0x148ff5[_0x487c15(0x292)],_0x1a02e6=_0x40cf9b[_0x487c15(0x249)](_0x2bbcb8=>{const _0x495a4f=_0x487c15,_0x199d8a=a55_0x359219[_0x495a4f(0x2ae)]('#'+_0x2bbcb8['id']),_0x35f39c=hyperlink(_0x199d8a,getWorkflowUrl(_0x4a8717,_0x2bbcb8['id'])),_0x427361=_0x2bbcb8[_0x495a4f(0x277)]?.[_0x495a4f(0x219)]?a55_0x359219[_0x495a4f(0x2ae)]('\x20('+_0x2bbcb8[_0x495a4f(0x277)][_0x495a4f(0x219)]+')'):'';return _0x495a4f(0x1a8)+_0x35f39c+'\x20'+_0x2bbcb8[_0x495a4f(0x219)]+_0x427361;});await writeOutput(_0x1a02e6[_0x487c15(0xf3)]('\x0a'),_0x148ff5[_0x487c15(0x142)],_0x487c15(0x1d1));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a55_0x5a9c5d(0x149);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x139);async[a55_0x5a9c5d(0x1eb)](_0x30bde6){const _0x42936c=a55_0x5a9c5d,{options:_0x4b8d90,args:_0x37331b,tdx:_0x4dd526}=_0x30bde6,_0x3accd3=this[_0x42936c(0x1a4)](_0x37331b,_0x4b8d90);if(!_0x3accd3)return 0x1;const {projectName:_0x107161,workflowName:_0x55380d}=_0x3accd3;if(_0x4b8d90[_0x42936c(0x223)]){if(_0x107161&&_0x55380d)console[_0x42936c(0x214)](_0x42936c(0x164)+_0x107161+'.'+_0x55380d);else _0x107161&&console[_0x42936c(0x214)](_0x42936c(0x255)+_0x107161);const _0x4d8f68=_0x4b8d90[_0x42936c(0x172)];_0x4d8f68&&console[_0x42936c(0x214)](_0x42936c(0x28c)+_0x4d8f68);}let _0x3b7463=0x28;if(process[_0x42936c(0x1e8)][_0x42936c(0x1a3)]&&!_0x4b8d90[_0x42936c(0x142)]&&!_0x4b8d90['format']){const _0x5e681b=process['stdout'][_0x42936c(0x12a)]||0x28;_0x3b7463=Math[_0x42936c(0x24c)](0x14,Math[_0x42936c(0x10d)](_0x5e681b*0x2/0x3));}const _0x2158df=_0x4b8d90['limit']||_0x3b7463,_0x5dc0ca=await withSpinner(_0x42936c(0x281),()=>_0x4dd526[_0x42936c(0x1c2)][_0x42936c(0x21b)]({'projectName':_0x107161,'workflowName':_0x55380d,'status':_0x4b8d90['status'],'fromTime':_0x4b8d90[_0x42936c(0x146)],'toTime':_0x4b8d90['to'],'limit':_0x2158df}),{'verbose':_0x4b8d90[_0x42936c(0x223)]}),_0x17927e=_0x5dc0ca[_0x42936c(0xfc)];_0x17927e[_0x42936c(0x11e)]((_0x2a533f,_0xd38d22)=>{const _0x444d46=_0x42936c,_0x4de1b2=_0x2a533f[_0x444d46(0x272)]||'',_0xcb8b48=_0xd38d22[_0x444d46(0x272)]||'';return _0xcb8b48['localeCompare'](_0x4de1b2);});_0x17927e[_0x42936c(0x239)]>=_0x2158df?console['error'](_0x42936c(0xfd)+_0x17927e[_0x42936c(0x239)]+'\x20sessions\x20'+a55_0x359219[_0x42936c(0x2ae)](_0x42936c(0x1d0))):console[_0x42936c(0x214)](_0x42936c(0x109)+_0x17927e[_0x42936c(0x239)]+_0x42936c(0x28b)+(_0x17927e[_0x42936c(0x239)]!==0x1?'s':''));if(_0x4b8d90[_0x42936c(0x111)]===_0x42936c(0x297)||_0x4b8d90['format']===_0x42936c(0x1b0)||_0x4b8d90[_0x42936c(0x111)]===_0x42936c(0x29a))await handleSDKOutput(_0x17927e,_0x4b8d90);else{if(!process[_0x42936c(0x1e8)][_0x42936c(0x1a3)]||_0x4b8d90[_0x42936c(0x142)]){if(_0x17927e['length']===0x0){if(_0x107161&&_0x55380d)console['log'](_0x42936c(0x154)+_0x107161+'.'+_0x55380d);else _0x107161?console['log'](_0x42936c(0x16d)+_0x107161):console[_0x42936c(0x28e)]('No\x20sessions\x20found');}else{const _0x1dea55=_0x4b8d90['site'],_0x5848d5=this[_0x42936c(0x278)](_0x17927e,_0x1dea55);_0x4b8d90[_0x42936c(0x142)]?await writeOutput(_0x5848d5,_0x4b8d90['output'],'list'):console['log'](_0x5848d5);}!_0x107161&&(console[_0x42936c(0x214)](''),console['error'](a55_0x359219[_0x42936c(0x2ae)](_0x42936c(0x16a))),console[_0x42936c(0x214)](a55_0x359219[_0x42936c(0x2ae)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a55_0x359219['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x17927e[_0x42936c(0x239)]===0x0){if(_0x107161&&_0x55380d)console[_0x42936c(0x28e)](_0x42936c(0x154)+_0x107161+'.'+_0x55380d);else _0x107161?console[_0x42936c(0x28e)](_0x42936c(0x16d)+_0x107161):console[_0x42936c(0x28e)](_0x42936c(0x209));}else await this[_0x42936c(0xee)](_0x17927e,_0x30bde6,_0x107161);}}return 0x0;}['renderSessionsTimeline'](_0x4a913f,_0x25492c){const _0x14e4b4=a55_0x5a9c5d,_0x268579=[],_0x48ec93=new Map();let _0x4f7640=Infinity,_0x261f46=-Infinity;for(const _0x183a72 of _0x4a913f){if(_0x183a72[_0x14e4b4(0x152)]?.[_0x14e4b4(0x250)]){const _0x34d0e0=new Date(_0x183a72[_0x14e4b4(0x152)][_0x14e4b4(0x250)])[_0x14e4b4(0x148)](),_0x28bf34=_0x183a72['lastAttempt']['finishedAt']?new Date(_0x183a72[_0x14e4b4(0x152)][_0x14e4b4(0x268)])[_0x14e4b4(0x148)]():Date[_0x14e4b4(0x194)](),_0x21395e=_0x183a72[_0x14e4b4(0x277)]?.[_0x14e4b4(0x219)]||_0x14e4b4(0x2b7);!_0x48ec93[_0x14e4b4(0x215)](_0x21395e)&&_0x48ec93['set'](_0x21395e,[]),_0x48ec93[_0x14e4b4(0x1fe)](_0x21395e)[_0x14e4b4(0x27a)]({'session':_0x183a72,'startTime':_0x34d0e0,'endTime':_0x28bf34,'duration':_0x28bf34-_0x34d0e0}),_0x4f7640=Math[_0x14e4b4(0x1f3)](_0x4f7640,_0x34d0e0),_0x261f46=Math['max'](_0x261f46,_0x28bf34);}}if(_0x48ec93['size']===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x2bad60=process['stdout'][_0x14e4b4(0x217)]||0x78,_0x5ef526=0x1e,_0x131b32=0x32,_0x147297=0x4,_0x3bee4a=Math['min'](_0x131b32,Math['max'](_0x5ef526,Math[_0x14e4b4(0x10d)](_0x2bad60*0.3))),_0x43ae44=_0x2bad60-_0x3bee4a-TIMELINE_CONFIG[_0x14e4b4(0x190)]-0x3-_0x147297,_0x389a05=_0x261f46-_0x4f7640,_0x3ba4dd=_0x389a05/_0x3bee4a,_0x35f12c=renderTimeAxis({'startTime':_0x4f7640,'endTime':_0x261f46,'durationMs':_0x389a05,'msPerChar':_0x3ba4dd},_0x3bee4a),_0x237087=[];for(const _0x233d21 of _0x48ec93[_0x14e4b4(0x252)]()){_0x237087[_0x14e4b4(0x27a)](..._0x233d21);}_0x237087[_0x14e4b4(0x11e)]((_0x3d31bc,_0x9ced2c)=>_0x9ced2c[_0x14e4b4(0x147)]-_0x3d31bc[_0x14e4b4(0x147)]);const _0x217edf=new Date(_0x4f7640),_0x62bdc1=formatDate(_0x217edf),_0x5c70f3=_0x147297+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x14e4b4(0x18b)]+_0x43ae44,_0x3cf280='\x20'[_0x14e4b4(0x1a5)](_0x5c70f3-_0x62bdc1[_0x14e4b4(0x239)]),_0x80866b=_0x3cf280+a55_0x359219['dim'](_0x62bdc1)+'\x20'+_0x35f12c;_0x268579[_0x14e4b4(0x27a)](_0x80866b);const _0xef69d0=0x16;let _0x264cd0=0x0;for(const _0x3b7a60 of _0x237087){const _0x206af3=_0x3b7a60[_0x14e4b4(0x27d)][_0x14e4b4(0x277)]?.[_0x14e4b4(0x219)]||'?',_0x3c92ac=Math['min'](stringWidth(_0x206af3),_0xef69d0);_0x264cd0=Math[_0x14e4b4(0x24c)](_0x264cd0,_0x3c92ac);}for(const _0xedf48c of _0x237087){const {session:_0x4de3ac,startTime:_0xfec41a,endTime:_0x14d8f0,duration:_0x280a94}=_0xedf48c,_0x5b8dd1=_0x4de3ac[_0x14e4b4(0x277)]?.['id'],_0x19547a=_0x4de3ac['id'],_0x2c553d=_0x4de3ac[_0x14e4b4(0x277)]?.['name']||'?',_0x174372=_0x4de3ac[_0x14e4b4(0x1c2)]?.['name']||'?';let _0x13e193,_0x197844;if(_0x4de3ac['lastAttempt']){const _0x4e4af5=_0x4de3ac['lastAttempt'];!_0x4e4af5[_0x14e4b4(0x232)]?(_0x13e193=_0x4e4af5['cancelRequested']?'🛑':'🔄',_0x197844=_0x4e4af5[_0x14e4b4(0x184)]?a55_0x359219[_0x14e4b4(0x240)]:a55_0x359219[_0x14e4b4(0x179)]):(_0x13e193=_0x4e4af5['success']?'✅':'❌',_0x197844=_0x4e4af5[_0x14e4b4(0x176)]?a55_0x359219['green']:a55_0x359219[_0x14e4b4(0x1e4)]);}else _0x13e193='⏳',_0x197844=a55_0x359219[_0x14e4b4(0x2ae)];const _0x2c6982='#'+_0x19547a,_0x6b2a3c=_0x5b8dd1?hyperlink(_0x2c6982,getWorkflowSessionUrl(_0x25492c,_0x5b8dd1,_0x19547a)):_0x2c6982;let _0x55ac0d=_0x2c553d;stringWidth(_0x2c553d)>_0xef69d0&&(_0x55ac0d=_0x2c553d[_0x14e4b4(0x206)](0x0,_0xef69d0-0x1)+'…');const _0x4ca607=a55_0x359219[_0x14e4b4(0x2ae)](_0x55ac0d),_0x32f19d=stringWidth(_0x55ac0d),_0x5ab050='\x20'['repeat'](_0x264cd0-stringWidth(_0x55ac0d)+0x2),_0x169c42='('+formatElapsed(_0x280a94)+')',_0x576368=stringWidth(_0x169c42),_0x11c75d=stringWidth(_0x2c6982),_0x44e7ab=_0x11c75d+0x1+_0x32f19d+_0x5ab050['length'],_0x314c1e=_0x43ae44-_0x44e7ab-_0x576368-0x1-0x8;let _0x49c6f2=_0x174372;stringWidth(_0x49c6f2)>_0x314c1e&&(_0x49c6f2=_0x49c6f2[_0x14e4b4(0x206)](0x0,_0x314c1e-0x1)+'…');const _0x2628b7=_0x6b2a3c+'\x20'+_0x4ca607+_0x5ab050+_0x49c6f2,_0x38f24a=stringWidth(_0x2628b7),_0x47401e=_0x43ae44-_0x38f24a-_0x576368,_0x9cfead=_0x2628b7+'\x20'['repeat'](Math['max'](0x1,_0x47401e))+a55_0x359219[_0x14e4b4(0x2ae)](_0x169c42),_0x264faa=Math[_0x14e4b4(0x10d)]((_0xfec41a-_0x4f7640)/_0x3ba4dd),_0x1c5963=Math[_0x14e4b4(0x10d)]((_0x14d8f0-_0x4f7640)/_0x3ba4dd),_0x51d1f3=Math[_0x14e4b4(0x24c)](_0x264faa+0x1,_0x1c5963),_0x3bb759=new Array(_0x3bee4a)['fill']('\x20');for(let _0x3b4e8b=_0x264faa;_0x3b4e8b<Math['min'](_0x51d1f3,_0x3bee4a);_0x3b4e8b++){_0x3bb759[_0x3b4e8b]='─';}const _0x5ae5be=_0x3bb759[_0x14e4b4(0x249)](_0x55b1bb=>_0x55b1bb==='\x20'?'\x20':_0x197844(_0x55b1bb))[_0x14e4b4(0xf3)]('');_0x268579[_0x14e4b4(0x27a)](_0x13e193+'\x20'+_0x9cfead+'│'+_0x5ae5be+'│');}return _0x268579[_0x14e4b4(0xf3)]('\x0a');}async['navigateSessionsInteractive'](_0x5bd9dc,_0x5ba2f9,_0x4a88f2){const _0x5382d9=a55_0x5a9c5d,{options:_0x224006,tdx:_0xa58676}=_0x5ba2f9,_0x4e3328=_0x224006[_0x5382d9(0x292)],{timelineRows:_0x48ee05,timeAxisHeader:_0x1bf60b}=this['generateSessionTimelineRows'](_0x5bd9dc,_0x4e3328),_0x5248be=_0x48ee05['filter'](_0x4e3c92=>_0x4e3c92[_0x5382d9(0x21c)]);if(_0x5248be[_0x5382d9(0x239)]===0x0){const _0xd885eb=this[_0x5382d9(0x278)](_0x5bd9dc,_0x4e3328);console['log'](_0xd885eb);!_0x4a88f2&&(console[_0x5382d9(0x214)](''),console[_0x5382d9(0x214)](a55_0x359219['dim'](_0x5382d9(0x16a))),console[_0x5382d9(0x214)](a55_0x359219[_0x5382d9(0x2ae)](_0x5382d9(0x1e1))+'or'+a55_0x359219[_0x5382d9(0x2ae)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x1bf60b&&console[_0x5382d9(0x28e)](_0x1bf60b);const _0x50de5f=_0x48ee05[_0x5382d9(0x112)](_0x22f8b6=>_0x22f8b6[_0x5382d9(0x21c)])[_0x5382d9(0x249)](_0x2d54b3=>({'title':_0x2d54b3[_0x5382d9(0x221)],'value':_0x2d54b3[_0x5382d9(0x21c)]})),_0x4a8a2d=process['stdout'][_0x5382d9(0x12a)]||0x3c,_0x81b87=Math[_0x5382d9(0x24c)](0x28,Math[_0x5382d9(0x10d)](_0x4a8a2d*0x2/0x3)),_0x242133=await a55_0x1b2e73({'type':_0x5382d9(0x123),'name':'attemptId','message':_0x5382d9(0x18c),'choices':_0x50de5f,'initial':-0x1,'limit':_0x81b87,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x44211f,_0xfe7c37)=>{const _0x53b65f=_0x5382d9;if(!_0x44211f)return Promise['resolve'](_0xfe7c37);const _0x505a2e=_0xfe7c37[_0x53b65f(0x112)](_0x438915=>{const _0x451ec2=_0x53b65f,_0x583bfe=_0x438915;return _0x583bfe[_0x451ec2(0x24b)][_0x451ec2(0x294)]()[_0x451ec2(0x121)](_0x44211f['toLowerCase']());});return Promise['resolve'](_0x505a2e);}}),_0x2b4d0f=()=>{const _0x4b0b25=_0x5382d9;process[_0x4b0b25(0x1e8)]['write'](_0x4b0b25(0x1c5)),process[_0x4b0b25(0x1e8)][_0x4b0b25(0x2af)](_0x4b0b25(0x1c5)),process[_0x4b0b25(0x1e8)][_0x4b0b25(0x2af)]('\x1b[1A\x1b[2K');},_0x5aeafa=_0x242133&&_0x242133[_0x5382d9(0x21c)]&&_0x242133[_0x5382d9(0x21c)]!==null&&_0x242133['attemptId'][_0x5382d9(0x29b)]()!=='';if(!_0x5aeafa){_0x2b4d0f(),console['log'](a55_0x359219[_0x5382d9(0x2ae)]('Cancelled'));return;}_0x2b4d0f();const _0x52e256=_0x5bd9dc[_0x5382d9(0x1dc)](_0x2306a2=>_0x2306a2[_0x5382d9(0x152)]?.['id']===_0x242133[_0x5382d9(0x21c)]);if(_0x52e256){const _0x11e013=_0x52e256[_0x5382d9(0x277)]?.[_0x5382d9(0x219)]||'?',_0x491b87=_0x52e256[_0x5382d9(0x1c2)]?.['name']||'?';console[_0x5382d9(0x28e)](_0x5382d9(0x173)+a55_0x359219[_0x5382d9(0x2ae)](_0x11e013)+_0x5382d9(0x291)+a55_0x359219[_0x5382d9(0x2ae)](_0x491b87));}const _0x596455=new WorkflowTimelineCommand();await _0x596455['execute']({'args':[],'options':{..._0x224006,'attemptId':_0x242133[_0x5382d9(0x21c)]},'tdx':_0xa58676});}[a55_0x5a9c5d(0x187)](_0x456573,_0x559370){const _0x5d7ccb=a55_0x5a9c5d,_0x1e7242=new Map();for(const _0xff7cdc of _0x456573){_0xff7cdc['id']&&_0xff7cdc[_0x5d7ccb(0x152)]?.['id']&&_0x1e7242['set'](_0xff7cdc['id'],_0xff7cdc[_0x5d7ccb(0x152)]['id']);}const _0x2a2d83=[];let _0x4641bc='';const _0x48779d=this[_0x5d7ccb(0x278)](_0x456573,_0x559370),_0x4de744=_0x48779d[_0x5d7ccb(0x1d3)]('\x0a');for(const _0x26126b of _0x4de744){if(_0x26126b['startsWith'](_0x5d7ccb(0x170))||_0x26126b[_0x5d7ccb(0x124)](/^\s+\d{4}-\d{2}-\d{2}/))_0x4641bc=_0x26126b;else{if(_0x26126b[_0x5d7ccb(0x124)](/^[✅❌🔄🛑⏳]/)){const _0x38453a=_0x26126b[_0x5d7ccb(0x124)](/#(\d+)/),_0x258ece=_0x38453a?_0x38453a[0x1]:null,_0x421dca=_0x258ece?_0x1e7242[_0x5d7ccb(0x1fe)](_0x258ece)||null:null,_0x2337de=_0x456573[_0x5d7ccb(0x1dc)](_0x5e08ec=>_0x5e08ec['id']===_0x258ece),_0x80475d=_0x2337de?.[_0x5d7ccb(0x277)]?.[_0x5d7ccb(0x219)]||'';_0x2a2d83['push']({'displayLine':_0x26126b,'attemptId':_0x421dca,'projectName':_0x80475d});}}}return{'timelineRows':_0x2a2d83,'timeAxisHeader':_0x4641bc};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x1e9);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x2b2);async[a55_0x5a9c5d(0x1eb)](_0x44bb4c){const _0x79ad9e=a55_0x5a9c5d,{options:_0x58bf72,args:_0x53f889,tdx:_0x3fd867}=_0x44bb4c,_0x450eaf=this[_0x79ad9e(0x1a4)](_0x53f889,_0x58bf72);if(!_0x450eaf)return 0x1;const {projectName:_0x426d7c,workflowName:_0x5ab228}=_0x450eaf,_0x210770=_0x58bf72[_0x79ad9e(0x1b6)];if(_0x58bf72[_0x79ad9e(0x223)]){if(_0x426d7c&&_0x5ab228)console['error'](_0x79ad9e(0x164)+_0x426d7c+'.'+_0x5ab228);else _0x426d7c&&console[_0x79ad9e(0x214)](_0x79ad9e(0x255)+_0x426d7c);_0x210770&&console[_0x79ad9e(0x214)](_0x79ad9e(0x1b4));}const _0x99fc62=await withSpinner(_0x79ad9e(0x129),()=>_0x3fd867[_0x79ad9e(0x1c2)][_0x79ad9e(0xf8)]({'projectName':_0x426d7c,'workflowName':_0x5ab228,'includeRetried':_0x210770,'limit':_0x58bf72['limit']}),{'verbose':_0x58bf72[_0x79ad9e(0x223)]}),_0x26b654=_0x99fc62[_0x79ad9e(0xfc)],_0x5c91b1=_0x58bf72[_0x79ad9e(0x1f1)]||0x64,_0x1369ad=_0x26b654[_0x79ad9e(0x239)]>=_0x5c91b1?a55_0x359219[_0x79ad9e(0x2ae)](_0x79ad9e(0x222)):'';console['error'](_0x79ad9e(0x109)+_0x26b654['length']+_0x79ad9e(0x231)+(_0x26b654[_0x79ad9e(0x239)]!==0x1?'s':'')+_0x1369ad);if(_0x58bf72[_0x79ad9e(0x111)]===_0x79ad9e(0x297)||_0x58bf72[_0x79ad9e(0x111)]===_0x79ad9e(0x1b0)||_0x58bf72[_0x79ad9e(0x111)]===_0x79ad9e(0x29a))await handleSDKOutput(_0x26b654,_0x58bf72);else{if(_0x26b654[_0x79ad9e(0x239)]===0x0){if(_0x426d7c&&_0x5ab228)console[_0x79ad9e(0x28e)]('No\x20attempts\x20found\x20for:\x20'+_0x426d7c+'.'+_0x5ab228);else _0x426d7c?console['log'](_0x79ad9e(0x261)+_0x426d7c):console[_0x79ad9e(0x28e)](_0x79ad9e(0x138));}else{const _0x204f82=_0x58bf72[_0x79ad9e(0x292)],_0x249f0f=_0x26b654[_0x79ad9e(0x249)](_0x1da195=>{const _0x474e24=_0x79ad9e,_0x1e56f7=a55_0x359219['dim']('#'+_0x1da195['id']),_0x4ac0fc=_0x1da195['project']?.['id'],_0x37e34d=_0x1da195[_0x474e24(0x1d4)]||_0x1da195[_0x474e24(0x19c)],_0xfb9bcf=_0x4ac0fc&&_0x37e34d?hyperlink(_0x1e56f7,getWorkflowAttemptUrl(_0x204f82,_0x4ac0fc,_0x37e34d,_0x1da195['id'])):_0x1e56f7,{icon:_0x50d1fe,text:_0x3bec80}=getAttemptStatusDisplay(_0x1da195),_0x4943cc=(_0x1da195[_0x474e24(0x277)]?.['name']||'?')+'.'+(_0x1da195['workflow']?.['name']||'?'),_0x52fb83=_0x1da195['sessionTime']?a55_0x359219[_0x474e24(0x2ae)](_0x1da195[_0x474e24(0x272)]):'';return(_0xfb9bcf+'\x20'+_0x50d1fe+(_0x3bec80?'\x20'+_0x3bec80:'')+'\x20'+_0x4943cc+'\x20'+_0x52fb83)[_0x474e24(0x229)]();});await writeOutput(_0x249f0f[_0x79ad9e(0xf3)]('\x0a'),_0x58bf72[_0x79ad9e(0x142)],_0x79ad9e(0x1d1));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x213);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x248);async[a55_0x5a9c5d(0x1eb)](_0x4441ca){const _0x44a406=a55_0x5a9c5d,{options:_0x28f04a,args:_0x30842b,tdx:_0x2463f8}=_0x4441ca,_0x4cb641=_0x30842b[0x0];if(!_0x4cb641)return console[_0x44a406(0x214)](_0x44a406(0x20d)),0x1;_0x28f04a['verbose']&&console[_0x44a406(0x214)](_0x44a406(0x10b)+_0x4cb641);const _0x16ee92=await withSpinner(_0x44a406(0x2bd),()=>_0x2463f8[_0x44a406(0x1c2)]['attempt'](_0x4cb641),{'verbose':_0x28f04a[_0x44a406(0x223)]}),_0x48f8e4=_0x16ee92[_0x44a406(0xfc)];let _0x5940a2;!_0x48f8e4[_0x44a406(0x232)]?_0x5940a2=_0x48f8e4['cancelRequested']?'canceling':_0x44a406(0x296):_0x5940a2=_0x48f8e4[_0x44a406(0x176)]?_0x44a406(0x176):_0x44a406(0x214);let _0x68db17;if(_0x48f8e4['createdAt']&&_0x48f8e4[_0x44a406(0x268)]){const _0x5ecd35=new Date(_0x48f8e4[_0x44a406(0x250)])[_0x44a406(0x148)](),_0x57a7ea=new Date(_0x48f8e4['finishedAt'])[_0x44a406(0x148)]();_0x68db17=Math[_0x44a406(0x25a)]((_0x57a7ea-_0x5ecd35)/0x3e8);}const _0x4a0422={'attempt_id':_0x48f8e4['id'],'status':_0x5940a2,..._0x48f8e4[_0x44a406(0x1b5)]!==undefined&&{'index':_0x48f8e4[_0x44a406(0x1b5)]},..._0x48f8e4[_0x44a406(0x277)]&&{'project':_0x48f8e4[_0x44a406(0x277)][_0x44a406(0x219)]},..._0x48f8e4[_0x44a406(0x1c2)]&&{'workflow':_0x48f8e4[_0x44a406(0x1c2)][_0x44a406(0x219)]},..._0x48f8e4['sessionId']&&{'session_id':_0x48f8e4[_0x44a406(0x19c)]},..._0x48f8e4['sessionTime']&&{'session_time':_0x48f8e4[_0x44a406(0x272)]},..._0x48f8e4['retryAttemptName']&&{'retry_attempt':_0x48f8e4[_0x44a406(0x293)]},..._0x68db17!==undefined&&{'duration_sec':_0x68db17},..._0x48f8e4['createdAt']&&{'created_at':_0x48f8e4[_0x44a406(0x250)]},..._0x48f8e4[_0x44a406(0x268)]&&{'finished_at':_0x48f8e4[_0x44a406(0x268)]},...Object['keys'](_0x48f8e4[_0x44a406(0x1cc)])[_0x44a406(0x239)]>0x0&&{'params':_0x48f8e4['params']}};return await handleSingleObjectOutput(_0x4a0422,_0x28f04a),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x16b);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x1aa);async['execute'](_0x574a78){const _0x20c824=a55_0x5a9c5d,{options:_0x58e281,args:_0x354913,tdx:_0x19ed12}=_0x574a78,_0xe6164=_0x354913[0x0];if(!_0xe6164)return console[_0x20c824(0x214)](_0x20c824(0x20d)),0x1;const _0x3faf85=_0x58e281['includeSubtasks'];_0x58e281[_0x20c824(0x223)]&&(console[_0x20c824(0x214)](_0x20c824(0x10b)+_0xe6164),_0x3faf85&&console[_0x20c824(0x214)](_0x20c824(0x24e)));const _0x2c6dac=await withSpinner(_0x20c824(0x25b),()=>_0x19ed12[_0x20c824(0x1c2)][_0x20c824(0x203)](_0xe6164,_0x3faf85||![]),{'verbose':_0x58e281[_0x20c824(0x223)]}),_0x4cc505=_0x2c6dac[_0x20c824(0xfc)];return console[_0x20c824(0x214)](_0x20c824(0x109)+_0x4cc505[_0x20c824(0x239)]+_0x20c824(0x266)+(_0x4cc505[_0x20c824(0x239)]!==0x1?'s':'')),await handleSDKOutput(_0x4cc505,_0x58e281),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x20e);['description']=a55_0x5a9c5d(0x118);async[a55_0x5a9c5d(0x1eb)](_0x326537){const _0x549225=a55_0x5a9c5d,{options:_0x5a8efc,args:_0x15331a,tdx:_0x25cc41}=_0x326537,_0x23d377=_0x15331a[0x0];let _0xfa9f82=_0x15331a[0x1];if(!_0x23d377)return console[_0x549225(0x214)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x5a8efc[_0x549225(0x223)]&&(console[_0x549225(0x214)](_0x549225(0x10b)+_0x23d377),_0xfa9f82&&console[_0x549225(0x214)]('Task\x20name:\x20'+_0xfa9f82));const _0x1fa10f=await withSpinner('Fetching\x20log\x20files...',()=>_0x25cc41[_0x549225(0x1c2)]['logFiles'](_0x23d377,_0xfa9f82),{'verbose':_0x5a8efc[_0x549225(0x223)]}),_0x3e94db=_0x1fa10f[_0x549225(0xfc)];if(_0x3e94db['length']===0x0)return console['error'](_0x549225(0x25d)),0x0;if(!_0xfa9f82&&(_0x5a8efc[_0x549225(0x297)]||_0x5a8efc[_0x549225(0x111)]))return await handleSDKOutput(_0x3e94db,_0x5a8efc),0x0;if(!_0xfa9f82){const _0x517cd9=_0x3e94db[_0x549225(0x249)](_0x5f2d1c=>({'title':_0x5f2d1c[_0x549225(0xe4)]+'\x20('+formatBytes(_0x5f2d1c[_0x549225(0x14c)])+')','value':_0x5f2d1c[_0x549225(0xe4)]})),_0x2965e5=await a55_0x1b2e73({'type':_0x549225(0x262),'name':_0x549225(0x254),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x517cd9});if(!_0x2965e5[_0x549225(0x254)])return console[_0x549225(0x214)](_0x549225(0x227)),0x0;_0xfa9f82=_0x2965e5[_0x549225(0x254)];}const _0xe72f3d=await withSpinner(_0x549225(0x2bf),()=>_0x25cc41[_0x549225(0x1c2)][_0x549225(0x175)](_0x23d377,_0xfa9f82),{'verbose':_0x5a8efc['verbose']}),_0x167b73=_0xe72f3d[_0x549225(0xfc)];return _0x167b73?console[_0x549225(0x28e)](_0x167b73):console['error'](_0x549225(0x1bd)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a55_0x5a9c5d(0x210);[a55_0x5a9c5d(0x1f9)]='Kill\x20a\x20running\x20attempt';async[a55_0x5a9c5d(0x1eb)](_0xdd66b2){const _0x2cfb7a=a55_0x5a9c5d,{options:_0x4960ec,args:_0x3b0706,tdx:_0x480c13}=_0xdd66b2,_0x4e5673=_0x3b0706[0x0];if(!_0x4e5673)return console[_0x2cfb7a(0x214)](_0x2cfb7a(0x20d)),0x1;const _0x5aeb20=_0x4960ec[_0x2cfb7a(0x265)];_0x4960ec[_0x2cfb7a(0x223)]&&(console[_0x2cfb7a(0x214)](_0x2cfb7a(0x10b)+_0x4e5673),_0x5aeb20&&console['error']('Reason:\x20'+_0x5aeb20));if(!_0x4960ec[_0x2cfb7a(0x17f)]){if(!isInteractive())return console['error'](a55_0x359219['red']('\x0aError:'),_0x2cfb7a(0x1fd)),console[_0x2cfb7a(0x214)](a55_0x359219['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xd15ded=await confirmKey(_0x2cfb7a(0xf9)+_0x4e5673+'?');if(!_0xd15ded)return console['error'](a55_0x359219[_0x2cfb7a(0x240)]('Cancelled')),0x1;}const _0x322663=await withSpinner(_0x2cfb7a(0x23d),()=>_0x480c13[_0x2cfb7a(0x1c2)][_0x2cfb7a(0x1ae)](_0x4e5673,_0x5aeb20),{'verbose':_0x4960ec['verbose']}),_0x2fc5c8=_0x322663[_0x2cfb7a(0xfc)];return console[_0x2cfb7a(0x214)]('✔\x20'+_0x2fc5c8),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a55_0x5a9c5d(0x198);[a55_0x5a9c5d(0x1f9)]='Retry\x20a\x20session\x20or\x20attempt';async['execute'](_0x4fbc25){const _0x558ecb=a55_0x5a9c5d,{options:_0x3b082a,args:_0x16cd88,tdx:_0x24a4ab}=_0x4fbc25,_0x438a57=_0x16cd88[0x0];if(!_0x438a57)return console[_0x558ecb(0x214)](_0x558ecb(0x22e)),console[_0x558ecb(0x214)](_0x558ecb(0x286)),0x1;let _0x514b9e=![],_0x4cead9=_0x438a57;if(_0x438a57[_0x558ecb(0x2b0)](_0x558ecb(0x119)))_0x514b9e=!![],_0x4cead9=_0x438a57[_0x558ecb(0x216)](0x8);else{if(_0x438a57['startsWith'](_0x558ecb(0xef)))_0x514b9e=![],_0x4cead9=_0x438a57[_0x558ecb(0x216)](0x8);else return console['error'](_0x558ecb(0x159)),console[_0x558ecb(0x214)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x4fd310=_0x3b082a[_0x558ecb(0x220)],_0x143279=_0x3b082a[_0x558ecb(0x2b9)],_0x3a37a7=_0x3b082a[_0x558ecb(0x1cc)],_0x4ebb62=_0x3b082a[_0x558ecb(0x12b)];_0x3b082a[_0x558ecb(0x223)]&&(console[_0x558ecb(0x214)](_0x558ecb(0x205)+(_0x514b9e?'session':_0x558ecb(0x218))+'\x20'+_0x4cead9),_0x4fd310&&console['error'](_0x558ecb(0x1c9)+_0x4fd310),_0x143279&&console[_0x558ecb(0x214)](_0x558ecb(0x186)+_0x143279),_0x3a37a7&&console[_0x558ecb(0x214)]('Params:\x20'+_0x3a37a7),_0x4ebb62&&console[_0x558ecb(0x214)](_0x558ecb(0x285)));let _0x31a4b1;if(_0x3a37a7)try{if(_0x3a37a7[_0x558ecb(0x2b0)]('@')){const _0x392807=await import(_0x558ecb(0x10f)),_0x987d96=_0x3a37a7[_0x558ecb(0x216)](0x1),_0x66b775=await _0x392807[_0x558ecb(0x15f)](_0x987d96,_0x558ecb(0x28a));_0x31a4b1=JSON[_0x558ecb(0x1f8)](_0x66b775);}else _0x31a4b1=JSON[_0x558ecb(0x1f8)](_0x3a37a7);}catch{return console[_0x558ecb(0x214)](_0x558ecb(0x13e)),0x1;}if(!_0x3b082a[_0x558ecb(0x17f)]){if(!isInteractive())return console[_0x558ecb(0x214)](a55_0x359219['red'](_0x558ecb(0x2b3)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a55_0x359219[_0x558ecb(0x2ae)](_0x558ecb(0xf2))),0x1;const _0x5b313a=await confirmKey(_0x558ecb(0x295)+(_0x514b9e?_0x558ecb(0x27d):_0x558ecb(0x218))+'\x20'+_0x4cead9+'?');if(!_0x5b313a)return console[_0x558ecb(0x214)](a55_0x359219['yellow'](_0x558ecb(0x227))),0x1;}let _0x3ed9c4;_0x514b9e?_0x3ed9c4=await withSpinner(_0x558ecb(0x126),()=>_0x24a4ab[_0x558ecb(0x1c2)][_0x558ecb(0x12f)](_0x4cead9,{'fromTask':_0x4fd310,'retryParams':_0x31a4b1}),{'verbose':_0x3b082a[_0x558ecb(0x223)]}):_0x3ed9c4=await withSpinner(_0x558ecb(0x141),()=>_0x24a4ab[_0x558ecb(0x1c2)][_0x558ecb(0x21a)](_0x4cead9,{'resumeFrom':_0x143279,'retryParams':_0x31a4b1,'force':_0x4ebb62}),{'verbose':_0x3b082a['verbose']});const _0x15d8a5=_0x3ed9c4[_0x558ecb(0xfc)];return console[_0x558ecb(0x214)](_0x558ecb(0x2a4)),console[_0x558ecb(0x214)](_0x558ecb(0x244)+_0x15d8a5[_0x558ecb(0x21c)]),console[_0x558ecb(0x214)]('\x20\x20Session\x20ID:\x20'+_0x15d8a5[_0x558ecb(0x19c)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x208);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x17a);async[a55_0x5a9c5d(0x1eb)](_0x36bbca){const _0x1707a8=a55_0x5a9c5d,{options:_0x472fdc,args:_0x529267,tdx:_0x3794dc}=_0x36bbca;let _0x5ae757=_0x529267[0x0];if(!_0x5ae757){const _0x5b3156=this[_0x1707a8(0x137)]([],_0x472fdc),_0x52a8ff=await withSpinner(_0x1707a8(0x157),()=>_0x3794dc['workflow']['workflows'](_0x5b3156,{'limit':_0x472fdc[_0x1707a8(0x1f1)]}),{'verbose':_0x472fdc[_0x1707a8(0x223)]}),_0x1fe93b=_0x52a8ff['data'];if(_0x1fe93b[_0x1707a8(0x239)]===0x0)return console[_0x1707a8(0x214)](_0x1707a8(0x1cb)),!_0x5b3156&&console[_0x1707a8(0x214)](a55_0x359219[_0x1707a8(0x2ae)](_0x1707a8(0x1bf))),0x1;const _0x2e2574=_0x1fe93b[_0x1707a8(0x249)](_0x32e51d=>({'title':_0x32e51d[_0x1707a8(0x277)]?.[_0x1707a8(0x219)]+'.'+_0x32e51d[_0x1707a8(0x219)],'value':_0x32e51d[_0x1707a8(0x277)]?.[_0x1707a8(0x219)]+'.'+_0x32e51d[_0x1707a8(0x219)],'description':_0x32e51d[_0x1707a8(0x174)]?_0x1707a8(0x2b4)+_0x32e51d['revision']:undefined})),_0xffb7fe=await a55_0x1b2e73({'type':_0x1707a8(0x262),'name':_0x1707a8(0x1c2),'message':_0x1707a8(0x1df),'choices':_0x2e2574});if(!_0xffb7fe[_0x1707a8(0x1c2)])return 0x1;_0x5ae757=_0xffb7fe[_0x1707a8(0x1c2)];}if(!_0x5ae757[_0x1707a8(0x121)]('.')){const _0x270b9c=this[_0x1707a8(0x137)]([],_0x472fdc);if(_0x270b9c)_0x5ae757=_0x270b9c+'.'+_0x5ae757;else return console['error'](a55_0x359219[_0x1707a8(0x1e4)](_0x1707a8(0x11f)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a55_0x359219[_0x1707a8(0x2ae)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x1f72cf=_0x472fdc['param'],_0x2359c3=_0x472fdc[_0x1707a8(0x272)],_0x14bc7b={};if(_0x1f72cf&&Array[_0x1707a8(0x155)](_0x1f72cf))for(const _0x3d0236 of _0x1f72cf){const _0x46ecf3=_0x3d0236[_0x1707a8(0x1e5)]('=');if(_0x46ecf3===-0x1)return console['error'](_0x1707a8(0x17e)+_0x3d0236),console[_0x1707a8(0x214)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x2da387=_0x3d0236[_0x1707a8(0x216)](0x0,_0x46ecf3),_0x2e8fc6=_0x3d0236[_0x1707a8(0x216)](_0x46ecf3+0x1);try{_0x14bc7b[_0x2da387]=JSON[_0x1707a8(0x1f8)](_0x2e8fc6);}catch{_0x14bc7b[_0x2da387]=_0x2e8fc6;}}_0x472fdc[_0x1707a8(0x223)]&&(console[_0x1707a8(0x214)](_0x1707a8(0x269)+_0x5ae757),Object[_0x1707a8(0x237)](_0x14bc7b)[_0x1707a8(0x239)]>0x0&&console['error'](_0x1707a8(0x12d)+JSON['stringify'](_0x14bc7b)),_0x2359c3&&console[_0x1707a8(0x214)](_0x1707a8(0x267)+_0x2359c3));if(_0x472fdc['dryRun'])return await this['executeDryRun'](_0x36bbca,_0x5ae757,_0x14bc7b,_0x2359c3);const _0x1f229a=await withSpinner('Starting\x20workflow\x20run...',()=>_0x3794dc[_0x1707a8(0x1c2)]['run'](_0x5ae757,_0x14bc7b,{'sessionTime':_0x2359c3}),{'verbose':_0x472fdc['verbose']}),_0x219dc6=_0x1f229a['data'];console['error'](_0x1707a8(0x13f)),console['error'](_0x1707a8(0x114)+_0x219dc6['id']),console[_0x1707a8(0x214)](_0x1707a8(0x1a1)+_0x219dc6[_0x1707a8(0x19c)]),console[_0x1707a8(0x214)](_0x1707a8(0x171)+_0x219dc6[_0x1707a8(0x277)]?.['name']),console[_0x1707a8(0x214)](_0x1707a8(0x1dd)+_0x219dc6[_0x1707a8(0x1c2)]?.[_0x1707a8(0x219)]);if(_0x219dc6[_0x1707a8(0x277)]?.['id']&&_0x219dc6[_0x1707a8(0x19c)]&&_0x219dc6['id']){const _0x39aec5=_0x472fdc['site'],_0x4163bb=getConsoleUrl(_0x39aec5,_0x1707a8(0x2a6)+_0x219dc6[_0x1707a8(0x277)]['id']+_0x1707a8(0x13c)+_0x219dc6['sessionId']+_0x1707a8(0x238)+_0x219dc6['id']);console[_0x1707a8(0x214)](_0x1707a8(0x1a9)+a55_0x359219[_0x1707a8(0x122)](_0x4163bb));}return 0x0;}async[a55_0x5a9c5d(0x270)](_0x24230d,_0x37f093,_0x2f9362,_0x4ca75a){const _0x442d46=a55_0x5a9c5d,{options:_0x14abe7,tdx:_0x160186}=_0x24230d,_0x87526b=await withSpinner(_0x442d46(0x225)+_0x37f093+_0x442d46(0x2a1),()=>_0x160186[_0x442d46(0x1c2)][_0x442d46(0x260)](_0x37f093),{'verbose':_0x14abe7[_0x442d46(0x223)]}),_0x864362=_0x87526b[_0x442d46(0xfc)],_0x4384f9=_0x4ca75a??new Date()[_0x442d46(0x165)]();console[_0x442d46(0x28e)](a55_0x359219[_0x442d46(0x1c7)]('Workflow:'),_0x37f093),console['log'](a55_0x359219['bold'](_0x442d46(0x251)),_0x4384f9),console[_0x442d46(0x28e)](a55_0x359219[_0x442d46(0x1c7)]('Parameters:'),JSON[_0x442d46(0x10e)](_0x2f9362)),console[_0x442d46(0x28e)](''),console[_0x442d46(0x28e)](a55_0x359219[_0x442d46(0x1c7)](_0x442d46(0x1b8)));const _0x5c82af=parseTaskGraph(_0x864362[_0x442d46(0x1b9)]??null);if(_0x5c82af['length']===0x0)console['log'](a55_0x359219[_0x442d46(0x2ae)](_0x442d46(0x21f)));else for(const _0x52aa0b of formatTaskGraph(_0x5c82af)){console[_0x442d46(0x28e)](_0x52aa0b);}const _0x41cc06=summarizeTaskGraph(_0x5c82af),_0x38d952=formatWarningSummary(_0x41cc06);return _0x38d952&&(console['log'](''),console['log'](a55_0x359219[_0x442d46(0x240)](_0x38d952))),console[_0x442d46(0x28e)](a55_0x359219[_0x442d46(0x240)](_0x442d46(0xfe))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x196);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x245);async['execute'](_0xa248f6){const _0x3b88aa=a55_0x5a9c5d,{options:_0x17920c,args:_0x345988,tdx:_0x2e503b}=_0xa248f6,_0x191274=_0x345988[0x0],_0x466a99=_0x345988[0x1]||'.';if(!_0x191274)return console[_0x3b88aa(0x214)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x3b88aa(0x136)),0x1;const _0x225211=_0x17920c['revision'];_0x17920c['verbose']&&(console[_0x3b88aa(0x214)](_0x3b88aa(0x173)+_0x191274),console[_0x3b88aa(0x214)](_0x3b88aa(0x22a)+_0x466a99),_0x225211&&console[_0x3b88aa(0x214)](_0x3b88aa(0x247)+_0x225211));const _0x6fa543=await withSpinner('Downloading\x20project\x20'+_0x191274+_0x3b88aa(0x2a1),()=>_0x2e503b[_0x3b88aa(0x1c2)][_0x3b88aa(0x1af)](_0x191274,_0x466a99,{'revision':_0x225211}),{'verbose':_0x17920c[_0x3b88aa(0x223)]}),_0x59ef42=_0x6fa543[_0x3b88aa(0xfc)];return console[_0x3b88aa(0x214)](_0x3b88aa(0x110)+_0x59ef42[_0x3b88aa(0x22c)]),console[_0x3b88aa(0x214)](_0x3b88aa(0x130)+_0x59ef42[_0x3b88aa(0x174)]),console[_0x3b88aa(0x214)](_0x3b88aa(0x113)+_0x59ef42[_0x3b88aa(0x28d)]),console['error'](_0x3b88aa(0x135)+_0x466a99+'/'+_0x59ef42[_0x3b88aa(0x22c)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x26e);['description']=a55_0x5a9c5d(0x243);async[a55_0x5a9c5d(0x1eb)](_0x570ee2){const _0x2459da=a55_0x5a9c5d,{options:_0x1dd636,args:_0x422aba,tdx:_0x3fb52a}=_0x570ee2;let _0x328cfa='.',_0x57149b=_0x1dd636['name'];if(_0x422aba[0x0]){const {promises:_0x421a17}=await import('fs');try{const _0x2bf40b=await _0x421a17[_0x2459da(0x271)](_0x422aba[0x0]);if(_0x2bf40b[_0x2459da(0x1c1)]())_0x328cfa=_0x422aba[0x0];else return console['error'](_0x2459da(0x22d)+_0x422aba[0x0]+_0x2459da(0x14d)),0x1;}catch{_0x57149b=_0x422aba[0x0],_0x328cfa='.';}}const _0x5e9ec2=_0x1dd636[_0x2459da(0x174)],_0x2339f4=_0x1dd636[_0x2459da(0x2b1)];_0x1dd636[_0x2459da(0x223)]&&(console[_0x2459da(0x214)](_0x2459da(0x1bb)+_0x328cfa),_0x57149b&&console['error']('Project\x20name:\x20'+_0x57149b),_0x5e9ec2&&console[_0x2459da(0x214)](_0x2459da(0x247)+_0x5e9ec2),_0x2339f4&&console[_0x2459da(0x214)](_0x2459da(0x1a2)));const _0x542b19=await withSpinner(_0x2459da(0x1d8),()=>_0x3fb52a['workflow'][_0x2459da(0x27a)](_0x328cfa,{'projectName':_0x57149b,'revision':_0x5e9ec2,'skipValidation':_0x2339f4}),{'verbose':_0x1dd636[_0x2459da(0x223)]}),_0x302472=_0x542b19[_0x2459da(0xfc)];return console[_0x2459da(0x214)]('✔\x20Pushed\x20'+_0x302472[_0x2459da(0x22c)]),console[_0x2459da(0x214)]('\x20\x20Project\x20ID:\x20'+_0x302472['projectId']),console[_0x2459da(0x214)]('\x20\x20Revision:\x20'+_0x302472[_0x2459da(0x174)]),await this[_0x2459da(0x246)](_0x3fb52a,_0x302472['projectName'],_0x1dd636[_0x2459da(0x292)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x1fc);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x1ca);async[a55_0x5a9c5d(0x1eb)](_0x546231){const _0x552151=a55_0x5a9c5d,{options:_0x2f723e,args:_0x147996,tdx:_0x149728}=_0x546231,_0x1ff7ab=_0x147996[0x0],_0x1900cc=_0x147996[0x1];if(!_0x1ff7ab)return console['error'](a55_0x359219[_0x552151(0x1e4)](_0x552151(0x11f)),_0x552151(0x290)),console[_0x552151(0x214)](a55_0x359219[_0x552151(0x2ae)](_0x552151(0x177))),0x1;const _0x24aa9f=_0x2f723e['revision'];_0x2f723e[_0x552151(0x223)]&&(console['error'](_0x552151(0x173)+_0x1ff7ab),_0x1900cc&&console[_0x552151(0x214)](_0x552151(0x100)+_0x1900cc),_0x24aa9f&&console[_0x552151(0x214)](_0x552151(0x247)+_0x24aa9f),_0x2f723e[_0x552151(0x1d2)]&&console[_0x552151(0x214)](_0x552151(0x26b)));const _0x51fb80=await withSpinner('Pulling\x20project\x20'+_0x1ff7ab+_0x552151(0x2a1),()=>_0x149728['workflow'][_0x552151(0x12e)](_0x1ff7ab,{'targetDir':_0x1900cc,'revision':_0x24aa9f}),{'verbose':_0x2f723e[_0x552151(0x223)]}),_0x48861=_0x51fb80[_0x552151(0xfc)];_0x48861[_0x552151(0x1c8)]?console[_0x552151(0x214)]('→\x20New\x20project:\x20'+_0x48861[_0x552151(0x22c)]):console[_0x552151(0x214)]('→\x20Project:\x20'+_0x48861[_0x552151(0x22c)]);console['error'](_0x552151(0x130)+_0x48861[_0x552151(0x174)]),console[_0x552151(0x214)](_0x552151(0x226)+(a55_0x815213[_0x552151(0x27f)](process[_0x552151(0x1d7)](),_0x48861[_0x552151(0x1ef)])||'.')),console['error']('\x20\x20Changes:\x20'+a55_0x359219[_0x552151(0x1be)]('+'+_0x48861['summary'][_0x552151(0x241)]+_0x552151(0x1ac))+',\x20'+(a55_0x359219[_0x552151(0x240)]('~'+_0x48861['summary']['modified']+_0x552151(0x230))+',\x20')+(a55_0x359219[_0x552151(0x1e4)]('-'+_0x48861[_0x552151(0x106)][_0x552151(0x1ab)]+'\x20deleted')+',\x20')+(''+a55_0x359219['dim'](_0x48861[_0x552151(0x106)][_0x552151(0x2a2)]+_0x552151(0x15a))));for(const _0x26d040 of _0x48861[_0x552151(0x2ac)]){_0x26d040[_0x552151(0x2b5)]===_0x552151(0x26f)&&_0x26d040['diff']&&(console[_0x552151(0x214)]('\x0a'+a55_0x359219[_0x552151(0x122)](_0x552151(0x29d)+_0x26d040[_0x552151(0x2a5)])),console[_0x552151(0x214)](_0x26d040[_0x552151(0xed)]));}if(!_0x48861['hasChanges'])return saveSessionContext({'workflow_project':_0x48861[_0x552151(0x22c)]},_0x2f723e['session']),console['error'](a55_0x359219[_0x552151(0x1be)](_0x552151(0xf0))),console[_0x552151(0x214)](a55_0x359219[_0x552151(0x2ae)](_0x552151(0x16f)+_0x48861[_0x552151(0x22c)])),0x0;if(_0x2f723e['dryRun'])return console['error'](a55_0x359219[_0x552151(0x240)](_0x552151(0xf6))),0x0;if(!_0x2f723e['yes']){if(!isInteractive())return console[_0x552151(0x214)](a55_0x359219[_0x552151(0x1e4)]('\x0aError:'),_0x552151(0x1fd)),console[_0x552151(0x214)](a55_0x359219[_0x552151(0x2ae)](_0x552151(0xf2))),0x1;const _0x3cdc39=await confirmKey(_0x552151(0x181));if(!_0x3cdc39)return console[_0x552151(0x214)](a55_0x359219[_0x552151(0x240)]('Cancelled'),_0x552151(0x23c)),0x1;}await withSpinner(_0x552151(0x160),()=>_0x149728['workflow'][_0x552151(0x282)](_0x48861,{'revision':_0x24aa9f}),{'verbose':_0x2f723e[_0x552151(0x223)]}),saveSessionContext({'workflow_project':_0x48861[_0x552151(0x22c)]},_0x2f723e[_0x552151(0x27d)]),console[_0x552151(0x214)](a55_0x359219[_0x552151(0x1be)](_0x552151(0x1f5)));const _0x5dcb64=a55_0x815213[_0x552151(0x27f)](process[_0x552151(0x1d7)](),_0x48861[_0x552151(0x1ef)])||'.';return console[_0x552151(0x214)](a55_0x359219[_0x552151(0x2ae)](_0x552151(0x135)+_0x5dcb64)),console[_0x552151(0x214)](a55_0x359219[_0x552151(0x2ae)](_0x552151(0x16f)+_0x48861[_0x552151(0x22c)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]='workflow:push';['description']=a55_0x5a9c5d(0x211);async[a55_0x5a9c5d(0x1eb)](_0xa270f9){const _0x44042c=a55_0x5a9c5d,{options:_0x5d36bd,args:_0xd05478,tdx:_0x1a6e8d}=_0xa270f9,_0x4a0437=this[_0x44042c(0x127)](_0xd05478,_0x5d36bd),_0xa9ef03=_0x5d36bd[_0x44042c(0x174)],_0x839b6=_0x5d36bd['skipValidation'];_0x5d36bd['verbose']&&(_0x4a0437&&console[_0x44042c(0x214)](_0x44042c(0xff)+_0x4a0437),_0xa9ef03&&console[_0x44042c(0x214)](_0x44042c(0x247)+_0xa9ef03),_0x5d36bd[_0x44042c(0x1d2)]&&console['error']('Dry\x20run:\x20yes'),_0x839b6&&console[_0x44042c(0x214)]('Validation:\x20skipped'));let _0x32d1e0;try{_0x32d1e0=await withSpinner(_0x44042c(0x189),()=>_0x1a6e8d[_0x44042c(0x1c2)][_0x44042c(0x19a)]({'sourceDir':_0x4a0437,'revision':_0xa9ef03,'skipValidation':_0x839b6}),{'verbose':_0x5d36bd[_0x44042c(0x223)]});}catch(_0x91adb1){if(_0x91adb1 instanceof Error&&_0x91adb1[_0x44042c(0x228)]['includes'](_0x44042c(0x2aa)))return console[_0x44042c(0x214)](a55_0x359219['red'](_0x44042c(0x11f)),_0x44042c(0x236)),_0x5d36bd[_0x44042c(0x1f7)]?console[_0x44042c(0x214)](a55_0x359219[_0x44042c(0x2ae)](_0x44042c(0x257)+_0x5d36bd[_0x44042c(0x1f7)]+_0x44042c(0x188)+_0x5d36bd[_0x44042c(0x1f7)]+'\x27')):console[_0x44042c(0x214)](a55_0x359219[_0x44042c(0x2ae)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x91adb1;}const _0xce8548=_0x32d1e0[_0x44042c(0xfc)];console['error'](_0x44042c(0x143)+_0xce8548[_0x44042c(0x22c)]),console['error'](_0x44042c(0x233)+_0xce8548['sourceDir']),console['error'](_0x44042c(0x130)+_0xce8548[_0x44042c(0x174)]),console['error'](_0x44042c(0x287)+a55_0x359219[_0x44042c(0x1be)]('+'+_0xce8548[_0x44042c(0x106)][_0x44042c(0x241)]+_0x44042c(0x1ac))+',\x20'+(a55_0x359219['yellow']('~'+_0xce8548[_0x44042c(0x106)][_0x44042c(0x26f)]+_0x44042c(0x230))+',\x20')+(a55_0x359219['red']('-'+_0xce8548[_0x44042c(0x106)][_0x44042c(0x1ab)]+_0x44042c(0x150))+',\x20')+(''+a55_0x359219[_0x44042c(0x2ae)](_0xce8548[_0x44042c(0x106)]['unchanged']+_0x44042c(0x15a))));for(const _0x3c0786 of _0xce8548[_0x44042c(0x2ac)]){_0x3c0786[_0x44042c(0x2b5)]===_0x44042c(0x26f)&&_0x3c0786[_0x44042c(0xed)]&&(console[_0x44042c(0x214)]('\x0a'+a55_0x359219[_0x44042c(0x122)](_0x44042c(0x29d)+_0x3c0786[_0x44042c(0x2a5)])),console['error'](_0x3c0786[_0x44042c(0xed)]));}if(!_0xce8548[_0x44042c(0x2b8)])return console[_0x44042c(0x214)](a55_0x359219[_0x44042c(0x1be)](_0x44042c(0x264))),await this[_0x44042c(0x246)](_0x1a6e8d,_0xce8548['projectName'],_0x5d36bd['site']),0x0;if(_0x5d36bd['dryRun'])return console[_0x44042c(0x214)](a55_0x359219[_0x44042c(0x240)](_0x44042c(0x1ee))),0x0;if(!_0x5d36bd[_0x44042c(0x17f)]){if(!isInteractive())return console['error'](a55_0x359219[_0x44042c(0x1e4)](_0x44042c(0x2b3)),_0x44042c(0x1fd)),console[_0x44042c(0x214)](a55_0x359219[_0x44042c(0x2ae)](_0x44042c(0xf2))),0x1;const _0x502b9e=await confirmKey(_0x44042c(0x1ed));if(!_0x502b9e)return console[_0x44042c(0x214)](a55_0x359219['yellow'](_0x44042c(0x227)),'-\x20nothing\x20pushed'),0x1;}const _0x15f577=await withSpinner(_0x44042c(0x1f4),()=>_0x1a6e8d[_0x44042c(0x1c2)][_0x44042c(0x258)](_0xce8548),{'verbose':_0x5d36bd[_0x44042c(0x223)]}),_0x4b4c01=_0x15f577[_0x44042c(0xfc)];return console[_0x44042c(0x214)](a55_0x359219[_0x44042c(0x1be)]('✔\x20Push\x20complete')),console[_0x44042c(0x214)](_0x44042c(0x283)+_0x4b4c01[_0x44042c(0x13d)]),console[_0x44042c(0x214)](_0x44042c(0x130)+_0x4b4c01[_0x44042c(0x174)]),await this[_0x44042c(0x246)](_0x1a6e8d,_0x4b4c01['projectName'],_0x5d36bd['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x19e);[a55_0x5a9c5d(0x1f9)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async['execute'](_0xb1adce){const _0x56b023=a55_0x5a9c5d,{options:_0x1ef4b1,args:_0xe7f71c,tdx:_0x30b4e7}=_0xb1adce,_0x13c21f=this[_0x56b023(0x127)](_0xe7f71c,_0x1ef4b1),_0x24f05e=_0x1ef4b1[_0x56b023(0x219)],_0xf93d18=_0x1ef4b1[_0x56b023(0x174)],_0x32b538=_0x1ef4b1['skipValidation'];if(!_0x13c21f)return console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x1e4)]('Error:'),_0x56b023(0x13b)),console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x2ae)](_0x56b023(0x105))),console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x2ae)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x24f05e)return console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x1e4)](_0x56b023(0x11f)),_0x56b023(0x1c3)),console['error'](a55_0x359219[_0x56b023(0x2ae)](_0x56b023(0x105))),0x1;_0x1ef4b1['verbose']&&(console[_0x56b023(0x214)](_0x56b023(0xff)+_0x13c21f),console['error'](_0x56b023(0x1f0)+_0x24f05e),_0xf93d18&&console[_0x56b023(0x214)](_0x56b023(0x247)+_0xf93d18),_0x1ef4b1['dryRun']&&console[_0x56b023(0x214)]('Dry\x20run:\x20yes'),_0x32b538&&console[_0x56b023(0x214)](_0x56b023(0x1a2)));const _0x2588fd=await withSpinner('Analyzing\x20project...',()=>_0x30b4e7[_0x56b023(0x1c2)][_0x56b023(0x13a)](_0x13c21f,_0x24f05e,{'revision':_0xf93d18,'skipValidation':_0x32b538}),{'verbose':_0x1ef4b1[_0x56b023(0x223)]}),_0x54dbf2=_0x2588fd[_0x56b023(0xfc)];console[_0x56b023(0x214)](_0x56b023(0x16c)+_0x54dbf2[_0x56b023(0x1bc)]);_0x54dbf2['sourceProjectName']&&console[_0x56b023(0x214)](_0x56b023(0x117)+_0x54dbf2[_0x56b023(0x16e)]);console[_0x56b023(0x214)]('New\x20project\x20name:\x20'+_0x54dbf2[_0x56b023(0x158)]),console['error'](_0x56b023(0x247)+_0x54dbf2[_0x56b023(0x174)]),console[_0x56b023(0x214)]('Files\x20to\x20upload:\x20'+_0x54dbf2[_0x56b023(0x23a)]);_0x54dbf2['targetExists']&&(console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x240)](_0x56b023(0x20b)+_0x54dbf2[_0x56b023(0x158)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x54dbf2[_0x56b023(0x20c)]+')')),console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x240)](_0x56b023(0xe7))));if(_0x1ef4b1['dryRun'])return console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x240)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x1ef4b1[_0x56b023(0x17f)]){if(!isInteractive())return console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x1e4)](_0x56b023(0x2b3)),_0x56b023(0x1fd)),console['error'](a55_0x359219[_0x56b023(0x2ae)](_0x56b023(0xf2))),0x1;const _0x1de827=_0x54dbf2['sourceProjectName']||a55_0x815213['basename'](_0x13c21f),_0x2f0353=_0x54dbf2[_0x56b023(0x2a9)]?_0x56b023(0x207)+_0x24f05e+_0x56b023(0x1a0):'\x0aClone\x20\x22'+_0x1de827+_0x56b023(0x193)+_0x24f05e+'\x22?',_0x218028=await confirmKey(_0x2f0353);if(!_0x218028)return console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x240)](_0x56b023(0x227))),0x1;}const _0x22a4d0=await withSpinner(_0x54dbf2[_0x56b023(0x2a9)]?_0x56b023(0x1fa)+_0x24f05e+'...':'Cloning\x20to\x20'+_0x24f05e+_0x56b023(0x2a1),()=>_0x30b4e7[_0x56b023(0x1c2)][_0x56b023(0x29e)](_0x54dbf2),{'verbose':_0x1ef4b1[_0x56b023(0x223)]}),_0x439dd4=_0x22a4d0[_0x56b023(0xfc)];return console[_0x56b023(0x214)](a55_0x359219[_0x56b023(0x1be)](_0x54dbf2['targetExists']?_0x56b023(0x1e7):_0x56b023(0xfb))),console['error'](_0x56b023(0x171)+_0x439dd4['newProjectName']),console[_0x56b023(0x214)](_0x56b023(0x283)+_0x439dd4[_0x56b023(0x15e)]),console[_0x56b023(0x214)](_0x56b023(0x130)+_0x439dd4['revision']),await this[_0x56b023(0x246)](_0x30b4e7,_0x439dd4[_0x56b023(0x158)],_0x1ef4b1[_0x56b023(0x292)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a55_0x5a9c5d(0x120);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x23b);async[a55_0x5a9c5d(0x1eb)](_0x38c10d){const _0x4bad8c=a55_0x5a9c5d,{options:_0x35b9b4,args:_0x19ab4b,tdx:_0x2e4d95}=_0x38c10d,_0x2f7d72=_0x19ab4b[0x0];if(!_0x2f7d72)return console['error'](_0x4bad8c(0x128)),console[_0x4bad8c(0x214)](_0x4bad8c(0x10a)),0x1;_0x35b9b4[_0x4bad8c(0x223)]&&console[_0x4bad8c(0x214)](_0x4bad8c(0x173)+_0x2f7d72);if(!_0x35b9b4[_0x4bad8c(0x17f)]){if(!isInteractive())return console['error'](a55_0x359219[_0x4bad8c(0x1e4)]('\x0aError:'),_0x4bad8c(0x1fd)),console[_0x4bad8c(0x214)](a55_0x359219[_0x4bad8c(0x2ae)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2c5b92=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x2f7d72+_0x4bad8c(0x1ec));if(!_0x2c5b92)return console[_0x4bad8c(0x214)](a55_0x359219[_0x4bad8c(0x240)](_0x4bad8c(0x227))),0x1;}const _0x2abcbc=await withSpinner('Deleting\x20project\x20'+_0x2f7d72+_0x4bad8c(0x2a1),()=>_0x2e4d95[_0x4bad8c(0x1c2)][_0x4bad8c(0x1da)](_0x2f7d72),{'verbose':_0x35b9b4['verbose']}),_0x462462=_0x2abcbc[_0x4bad8c(0xfc)];return console['error'](_0x4bad8c(0x1b1)+_0x462462[_0x4bad8c(0x22c)]),console['error'](_0x4bad8c(0x283)+_0x462462[_0x4bad8c(0x13d)]),0x0;}}export function parseKeyValue(_0xb9bed6){const _0x408faf=a55_0x5a9c5d,_0x372a21=_0xb9bed6['indexOf']('=');if(_0x372a21===-0x1)throw new Error(_0x408faf(0x166)+_0xb9bed6+_0x408faf(0x1c6));const _0x286768=_0xb9bed6['substring'](0x0,_0x372a21),_0x24ffea=_0xb9bed6[_0x408faf(0x216)](_0x372a21+0x1);if(!_0x286768)throw new Error(_0x408faf(0x274));return{'key':_0x286768,'value':_0x24ffea};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x1a7);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0xfa);async[a55_0x5a9c5d(0x1eb)](_0x82d683){const _0xb0d16d=a55_0x5a9c5d,{options:_0x21200a,args:_0xff89a2,tdx:_0xe56473}=_0x82d683,_0x3905bd=this[_0xb0d16d(0x14e)](_0xff89a2,_0x21200a);if(!_0x3905bd)return 0x1;_0x21200a[_0xb0d16d(0x223)]&&console['error'](_0xb0d16d(0x173)+_0x3905bd);const _0x5ee44b=await withSpinner(_0xb0d16d(0x1fb),()=>_0xe56473[_0xb0d16d(0x1c2)][_0xb0d16d(0x1f6)](_0x3905bd),{'verbose':_0x21200a['verbose']}),{secrets:_0x333b7d}=_0x5ee44b[_0xb0d16d(0xfc)];return console[_0xb0d16d(0x214)](_0xb0d16d(0x109)+_0x333b7d[_0xb0d16d(0x239)]+_0xb0d16d(0x26c)+(_0x333b7d[_0xb0d16d(0x239)]!==0x1?'s':'')),await handleSDKOutput(_0x333b7d,_0x21200a),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x17d);['description']=a55_0x5a9c5d(0x153);async[a55_0x5a9c5d(0x1eb)](_0x464e68){const _0x18a876=a55_0x5a9c5d,{options:_0x453890,args:_0x566815,tdx:_0x4e77ae}=_0x464e68;let _0xbfde3c,_0x2f59e9;if(_0x566815[_0x18a876(0x239)]>=0x1&&!_0x566815[0x0][_0x18a876(0x121)]('='))_0xbfde3c=_0x566815[0x0],_0x2f59e9=_0x566815[_0x18a876(0x206)](0x1);else{if(_0x566815[_0x18a876(0x239)]>=0x1&&_0x453890[_0x18a876(0x1f7)])_0xbfde3c=_0x453890[_0x18a876(0x1f7)],_0x2f59e9=_0x566815;else return _0x566815[_0x18a876(0x239)]>=0x1?(console[_0x18a876(0x214)](_0x18a876(0x1b3)),console[_0x18a876(0x214)](_0x18a876(0x1bf)),0x1):(console[_0x18a876(0x214)](_0x18a876(0x163)),console[_0x18a876(0x214)](_0x18a876(0x26a)),0x1);}if(_0x2f59e9[_0x18a876(0x239)]===0x0)return console[_0x18a876(0x214)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x18a876(0x214)](_0x18a876(0x26a)),0x1;const _0x2c7833={};try{for(const _0x2170ce of _0x2f59e9){const {key:_0x434bc6,value:_0x13c344}=parseKeyValue(_0x2170ce);_0x2c7833[_0x434bc6]=_0x13c344;}}catch(_0x26c18f){return _0x26c18f instanceof Error&&console[_0x18a876(0x214)](a55_0x359219[_0x18a876(0x1e4)]('Error:'),_0x26c18f[_0x18a876(0x228)]),0x1;}const _0x13522d=Object['keys'](_0x2c7833);_0x453890[_0x18a876(0x223)]&&(console[_0x18a876(0x214)](_0x18a876(0x173)+_0xbfde3c),console[_0x18a876(0x214)](_0x18a876(0x21e)+_0x13522d[_0x18a876(0xf3)](',\x20')));const _0x4c4da2=await withSpinner(_0x13522d[_0x18a876(0x239)]===0x1?_0x18a876(0x1e6):_0x18a876(0x1f2)+_0x13522d['length']+_0x18a876(0x18e),()=>_0x4e77ae[_0x18a876(0x1c2)]['setSecrets'](_0xbfde3c,_0x2c7833),{'verbose':_0x453890[_0x18a876(0x223)]}),_0xec560e=_0x4c4da2[_0x18a876(0xfc)];return console[_0x18a876(0x214)](_0x13522d['length']===0x1?'✔\x20Secret\x20\x27'+_0xec560e['keys'][0x0]+_0x18a876(0x15b)+_0xec560e[_0x18a876(0x22c)]+'\x27':'✔\x20'+_0xec560e[_0x18a876(0x237)][_0x18a876(0x239)]+_0x18a876(0xec)+_0xec560e[_0x18a876(0x22c)]+'\x27'),(_0x453890[_0x18a876(0x297)]||_0x453890[_0x18a876(0x1b0)])&&await handleSingleObjectOutput(_0xec560e,_0x453890),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a55_0x5a9c5d(0x219)]='workflow:secrets:delete';[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x180);async[a55_0x5a9c5d(0x1eb)](_0x2c4009){const _0x5566e5=a55_0x5a9c5d,{options:_0x30e275,args:_0x318f86,tdx:_0x2d522c}=_0x2c4009;let _0x4dc874,_0x2ddd89;if(_0x318f86[_0x5566e5(0x239)]>=0x2)_0x4dc874=_0x318f86[0x0],_0x2ddd89=_0x318f86[0x1];else{if(_0x318f86['length']===0x1&&_0x30e275['workflowProject'])_0x4dc874=_0x30e275[_0x5566e5(0x1f7)],_0x2ddd89=_0x318f86[0x0];else return _0x318f86[_0x5566e5(0x239)]===0x1?(console[_0x5566e5(0x214)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x5566e5(0x214)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x5566e5(0x214)](_0x5566e5(0x234)),console[_0x5566e5(0x214)](_0x5566e5(0x11c)),0x1);}_0x30e275[_0x5566e5(0x223)]&&(console['error']('Project:\x20'+_0x4dc874),console['error']('Key:\x20'+_0x2ddd89));if(!_0x30e275[_0x5566e5(0x17f)]){if(!isInteractive())return console[_0x5566e5(0x214)](a55_0x359219[_0x5566e5(0x1e4)]('\x0aError:'),_0x5566e5(0x1fd)),console[_0x5566e5(0x214)](a55_0x359219[_0x5566e5(0x2ae)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5b96e3=await confirmKey(_0x5566e5(0x224)+_0x2ddd89+_0x5566e5(0xe9)+_0x4dc874+'\x27?');if(!_0x5b96e3)return console['error'](a55_0x359219['yellow'](_0x5566e5(0x227))),0x1;}const _0x2bfe19=await withSpinner('Deleting\x20secret...',()=>_0x2d522c['workflow'][_0x5566e5(0x242)](_0x4dc874,_0x2ddd89),{'verbose':_0x30e275[_0x5566e5(0x223)]}),_0x2878ce=_0x2bfe19[_0x5566e5(0xfc)];return console[_0x5566e5(0x214)](_0x5566e5(0x14a)+_0x2878ce['key']+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x2878ce['projectName']+'\x27'),(_0x30e275[_0x5566e5(0x297)]||_0x30e275[_0x5566e5(0x1b0)])&&await handleSingleObjectOutput(_0x2878ce,_0x30e275),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(_0x35ad05){const _0x4dc46e=a55_0x5a9c5d,_0x3def68=Math[_0x4dc46e(0x10d)](_0x35ad05/0x3e8),_0x46dc97=Math[_0x4dc46e(0x10d)](_0x3def68/0x3c),_0x4e6316=Math[_0x4dc46e(0x10d)](_0x46dc97/0x3c),_0x44dddd=Math[_0x4dc46e(0x10d)](_0x4e6316/0x18);if(_0x44dddd>0x0){const _0x5836b1=_0x4e6316%0x18;return _0x5836b1>0x0?_0x44dddd+'d\x20'+_0x5836b1+'h':_0x44dddd+'d';}else{if(_0x4e6316>0x0){const _0x5c751b=_0x46dc97%0x3c;return _0x5c751b>0x0?_0x4e6316+'h\x20'+_0x5c751b+'m':_0x4e6316+'h';}else{if(_0x46dc97>0x0){const _0x3384d6=_0x3def68%0x3c;return _0x3384d6>0x0?_0x46dc97+'m\x20'+_0x3384d6+'s':_0x46dc97+'m';}else return _0x3def68+'s';}}}function formatTimestamp(_0x2167c3,_0x49fac7){const _0x3628c4=a55_0x5a9c5d,_0x526f4e=new Date(_0x2167c3),_0x2e7a77=String(_0x526f4e[_0x3628c4(0x235)]())[_0x3628c4(0x19d)](0x2,'0'),_0x57b29c=String(_0x526f4e[_0x3628c4(0x27e)]())['padStart'](0x2,'0'),_0x2511cf=_0x2e7a77+':'+_0x57b29c,_0x18055e=_0x526f4e[_0x3628c4(0x1d5)]()===_0x49fac7[_0x3628c4(0x1d5)]()&&_0x526f4e[_0x3628c4(0x256)]()===_0x49fac7[_0x3628c4(0x256)]()&&_0x526f4e[_0x3628c4(0x14f)]()===_0x49fac7['getDate']();if(_0x18055e)return _0x2511cf;else{const _0x18a22c=String(_0x526f4e[_0x3628c4(0x256)]()+0x1)[_0x3628c4(0x19d)](0x2,'0'),_0x5321ca=String(_0x526f4e['getDate']())[_0x3628c4(0x19d)](0x2,'0');return _0x18a22c+'-'+_0x5321ca+'\x20'+_0x2511cf;}}function formatDate(_0x4a8219){const _0x57f751=a55_0x5a9c5d,_0x22606f=_0x4a8219[_0x57f751(0x1d5)](),_0x237adb=String(_0x4a8219[_0x57f751(0x256)]()+0x1)['padStart'](0x2,'0'),_0x1a5066=String(_0x4a8219[_0x57f751(0x14f)]())[_0x57f751(0x19d)](0x2,'0');return _0x22606f+'-'+_0x237adb+'-'+_0x1a5066;}function getTaskStateIcon(_0x3f3aea){const _0x470fb0={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x470fb0[_0x3f3aea]||'⚪';}function getBarChar(_0x14c18f){const _0x656f2a=a55_0x5a9c5d;return _0x14c18f===_0x656f2a(0x214)||_0x14c18f==='group_error'?'×':'─';}function getBarColor(_0x53f5d9){const _0x1b0c87=a55_0x5a9c5d,_0x27e121={'success':a55_0x359219[_0x1b0c87(0x1be)],'error':a55_0x359219[_0x1b0c87(0x1e4)],'group_error':a55_0x359219[_0x1b0c87(0x1e4)],'running':a55_0x359219[_0x1b0c87(0x179)],'blocked':a55_0x359219[_0x1b0c87(0x240)],'planned':a55_0x359219[_0x1b0c87(0x2ae)],'canceling':a55_0x359219[_0x1b0c87(0x240)]};return _0x27e121[_0x53f5d9]||a55_0x359219['white'];}function parseTaskName(_0x2e2996){const _0x2a8d71=a55_0x5a9c5d;let _0x4dcf0a=_0x2e2996[_0x2a8d71(0x2a7)](/^\++/,'');const _0x3f6dbd=_0x4dcf0a[_0x2a8d71(0x1d3)]('+'),_0x3f5ffc=_0x3f6dbd[_0x2a8d71(0x239)]>0x1?_0x3f6dbd['length']-0x2:0x0,_0x3ed01c=_0x3f6dbd[_0x3f6dbd[_0x2a8d71(0x239)]-0x1]||_0x4dcf0a;return{'level':_0x3f5ffc,'name':'+'+_0x3ed01c};}function truncateTaskName(_0x2b73da,_0x10f738){const _0xc5b7e7=a55_0x5a9c5d,_0x57d834=stringWidth(_0x2b73da);if(_0x57d834<=_0x10f738)return _0x2b73da;let _0x230623=_0x2b73da;while(stringWidth(_0x230623+'…')>_0x10f738&&_0x230623['length']>0x0){_0x230623=_0x230623[_0xc5b7e7(0x206)](0x0,-0x1);}return _0x230623+'…';}function calculateTimeScale(_0x3458d9,_0x44de18){const _0x139762=a55_0x5a9c5d;return{'startTime':_0x3458d9[_0x139762(0x1e3)],'endTime':_0x3458d9[_0x139762(0xf1)],'durationMs':_0x3458d9['duration'],'msPerChar':_0x3458d9[_0x139762(0x2be)]/_0x44de18};}function timeToPosition(_0x34e07e,_0x4530e1,_0x13f10d){const _0x476902=a55_0x5a9c5d,_0x2c85ac=_0x34e07e-_0x4530e1['startTime'],_0x3ca69b=Math[_0x476902(0x10d)](_0x2c85ac/_0x4530e1[_0x476902(0x202)]);return Math[_0x476902(0x24c)](0x0,Math[_0x476902(0x1f3)](_0x3ca69b,_0x13f10d));}function renderTimeAxis(_0x19bc9d,_0xb9fcd0){const _0x2c5131=a55_0x5a9c5d,_0x1cdccf=Math['min'](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math['max'](TIMELINE_CONFIG[_0x2c5131(0x169)],Math[_0x2c5131(0x10d)](_0xb9fcd0/TIMELINE_CONFIG[_0x2c5131(0x20f)]))),_0x247860=_0x19bc9d[_0x2c5131(0x199)]/(_0x1cdccf-0x1),_0x23f211=new Date(_0x19bc9d[_0x2c5131(0x147)]),_0x38b953=[];for(let _0x24e92d=0x0;_0x24e92d<_0x1cdccf;_0x24e92d++){const _0x3aaf1b=_0x19bc9d[_0x2c5131(0x147)]+_0x24e92d*_0x247860,_0xdcb29c=timeToPosition(_0x3aaf1b,_0x19bc9d,_0xb9fcd0),_0x53800b=formatTimestamp(_0x3aaf1b,_0x23f211);_0x38b953[_0x2c5131(0x27a)]({'pos':_0xdcb29c,'text':_0x53800b});}const _0x1dc235=new Array(_0xb9fcd0)[_0x2c5131(0x17b)]('\x20');let _0x305ddf=-0x1;for(const {pos:_0x6c7c4d,text:_0x347f31}of _0x38b953){let _0x35f54b=Math[_0x2c5131(0x24c)](0x0,_0x6c7c4d-Math['floor'](_0x347f31[_0x2c5131(0x239)]/0x2));_0x35f54b<=_0x305ddf+TIMELINE_CONFIG[_0x2c5131(0x1c4)]&&(_0x35f54b=_0x305ddf+TIMELINE_CONFIG[_0x2c5131(0x1c4)]+0x1);_0x35f54b+_0x347f31[_0x2c5131(0x239)]>_0xb9fcd0&&(_0x35f54b=_0xb9fcd0-_0x347f31[_0x2c5131(0x239)]);if(_0x35f54b>=0x0&&_0x35f54b+_0x347f31['length']<=_0xb9fcd0&&_0x35f54b>_0x305ddf){for(let _0x3270a1=0x0;_0x3270a1<_0x347f31[_0x2c5131(0x239)];_0x3270a1++){_0x1dc235[_0x35f54b+_0x3270a1]=_0x347f31[_0x3270a1];}_0x305ddf=_0x35f54b+_0x347f31[_0x2c5131(0x239)]-0x1;}}return _0x1dc235[_0x2c5131(0xf3)]('');}function renderTaskRow(_0x327992,_0x22edd2,_0xf176b1,_0x28f19d){const _0x4ffbe2=a55_0x5a9c5d,{level:_0xe49f85,name:_0xb8d814}=parseTaskName(_0x327992['name']),_0x2f9add='\x20'[_0x4ffbe2(0x1a5)](_0xe49f85),_0x40dbac=_0x327992[_0x4ffbe2(0x24a)]?'('+formatElapsed(_0x327992[_0x4ffbe2(0x24a)]['duration'])+')':'',_0x48ce66=stringWidth(_0x40dbac),_0x50a3cb=_0xe49f85*0x1,_0x3d19ce=_0x28f19d-_0x50a3cb-_0x48ce66-0x1,_0x7801a9=truncateTaskName(_0xb8d814,_0x3d19ce),_0x1f4e07=_0x2f9add+_0x7801a9,_0x3d55c5=stringWidth(_0x1f4e07),_0x5f4010=_0x28f19d-_0x3d55c5-_0x48ce66,_0x47b1c4=_0x1f4e07+'\x20'[_0x4ffbe2(0x1a5)](Math[_0x4ffbe2(0x24c)](0x1,_0x5f4010))+a55_0x359219[_0x4ffbe2(0x2ae)](_0x40dbac),_0x4b2b41=getTaskStateIcon(_0x327992[_0x4ffbe2(0x116)]),_0x32d52c=new Array(_0xf176b1)[_0x4ffbe2(0x17b)]('\x20');if(_0x327992[_0x4ffbe2(0x24a)]){const _0x117dba=timeToPosition(_0x327992[_0x4ffbe2(0x24a)][_0x4ffbe2(0x1e3)],_0x22edd2,_0xf176b1),_0x364ca2=timeToPosition(_0x327992['window'][_0x4ffbe2(0xf1)],_0x22edd2,_0xf176b1),_0x38e3b8=getBarChar(_0x327992[_0x4ffbe2(0x116)]),_0x4213df=Math['max'](_0x117dba+0x1,_0x364ca2);for(let _0x303825=_0x117dba;_0x303825<Math[_0x4ffbe2(0x1f3)](_0x4213df,_0xf176b1);_0x303825++){_0x32d52c[_0x303825]=_0x38e3b8;}}const _0x257924=getBarColor(_0x327992[_0x4ffbe2(0x116)]),_0x542df2=_0x32d52c[_0x4ffbe2(0x249)](_0x5a04e2=>_0x5a04e2==='\x20'?'\x20':_0x257924(_0x5a04e2))['join']('');return _0x4b2b41+'\x20'+_0x47b1c4+'│'+_0x542df2+'│';}function calculateStats(_0x12f44a){const _0x2e3761=a55_0x5a9c5d,_0x421703={'total':_0x12f44a[_0x2e3761(0x239)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0xd1ad00 of _0x12f44a){if(_0xd1ad00['state']===_0x2e3761(0x176))_0x421703[_0x2e3761(0x176)]++;else{if(_0xd1ad00[_0x2e3761(0x116)]===_0x2e3761(0x214)||_0xd1ad00[_0x2e3761(0x116)]===_0x2e3761(0x1ba))_0x421703['error']++;else _0xd1ad00[_0x2e3761(0x116)]===_0x2e3761(0x296)?_0x421703['running']++:_0x421703[_0x2e3761(0x1e0)]++;}}return _0x421703;}function formatStats(_0x516975){const _0x47249e=a55_0x5a9c5d;return['Total:\x20'+_0x516975[_0x47249e(0x140)],'✅\x20'+_0x516975[_0x47249e(0x176)],'❌\x20'+_0x516975[_0x47249e(0x214)],'🔄\x20'+_0x516975['running'],'⏳\x20'+_0x516975['pending']][_0x47249e(0xf3)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a55_0x5a9c5d(0x134);['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a55_0x5a9c5d(0x1eb)](_0x75f662){const _0x1464e6=a55_0x5a9c5d,{options:_0x5b1ba6,args:_0x5ca4d1,tdx:_0x3f89d6}=_0x75f662;let _0x1a818f,_0xfde415,_0x37fda7=![];if(_0x5ca4d1[0x0]){if(_0x5ca4d1[0x0][_0x1464e6(0x121)]('.')){const _0x58cb77=this[_0x1464e6(0x1a4)](_0x5ca4d1,_0x5b1ba6);if(!_0x58cb77)return 0x1;_0x1a818f=_0x58cb77[_0x1464e6(0x22c)],_0xfde415=_0x58cb77[_0x1464e6(0x2bc)];}else{_0xfde415=_0x5ca4d1[0x0],_0x1a818f=_0x5b1ba6[_0x1464e6(0x1f7)];if(!_0x1a818f)return console[_0x1464e6(0x214)](a55_0x359219['red']('Error:'),_0x1464e6(0x162)),0x1;_0x37fda7=!![];}}else{const _0x1629f9=this[_0x1464e6(0x1a4)](_0x5ca4d1,_0x5b1ba6);if(!_0x1629f9)return 0x1;_0x1a818f=_0x1629f9[_0x1464e6(0x22c)],_0xfde415=_0x1629f9[_0x1464e6(0x2bc)];}if(_0x5b1ba6[_0x1464e6(0x223)]){if(_0x1a818f&&_0xfde415)console[_0x1464e6(0x214)](_0x1464e6(0x164)+_0x1a818f+'.'+_0xfde415);else _0x1a818f&&console[_0x1464e6(0x214)](_0x1464e6(0x255)+_0x1a818f);}const _0x579171=_0x5b1ba6[_0x1464e6(0x21c)],_0xe85f72=_0x5b1ba6[_0x1464e6(0x19c)];if(_0x579171){_0xe85f72&&console['error'](a55_0x359219['yellow'](_0x1464e6(0x288)),_0x1464e6(0x25c));const _0x5d6754=_0x5b1ba6[_0x1464e6(0x29c)];return _0x5d6754?await this[_0x1464e6(0x15c)](_0x75f662,_0x579171):await this[_0x1464e6(0xe8)](_0x75f662,_0x579171,_0x5b1ba6),0x0;}if(_0xe85f72){const _0x4c5405=await withSpinner('Loading\x20session...',()=>_0x3f89d6[_0x1464e6(0x1c2)][_0x1464e6(0x21b)]({'projectName':_0x1a818f,'workflowName':_0xfde415,'limit':0x64}),{'verbose':_0x5b1ba6[_0x1464e6(0x223)]}),_0x165789=_0x4c5405[_0x1464e6(0xfc)][_0x1464e6(0x1dc)](_0x54f9c8=>_0x54f9c8['id']===_0xe85f72);if(!_0x165789)return console[_0x1464e6(0x214)](a55_0x359219['red'](_0x1464e6(0x11f)),_0x1464e6(0x11a)+_0xe85f72),0x1;if(!_0x165789[_0x1464e6(0x152)]?.['id'])return console['error'](a55_0x359219[_0x1464e6(0x1e4)]('Error:'),_0x1464e6(0x168)+_0xe85f72+_0x1464e6(0x103)),0x1;const _0x3a418e=_0x165789[_0x1464e6(0x152)]['id'];_0x5b1ba6[_0x1464e6(0x223)]&&console[_0x1464e6(0x214)](_0x1464e6(0x197)+_0x3a418e+_0x1464e6(0x108)+_0xe85f72);const _0x57bfd8=_0x5b1ba6['follow'];return _0x57bfd8?await this[_0x1464e6(0x15c)](_0x75f662,_0x3a418e):await this['renderSingleTimeline'](_0x75f662,_0x3a418e,_0x5b1ba6),0x0;}const _0x147ef9=await withSpinner(_0x1464e6(0x27c),()=>_0x3f89d6[_0x1464e6(0x1c2)][_0x1464e6(0x21b)]({'projectName':_0x1a818f,'workflowName':_0xfde415,'limit':_0x5b1ba6[_0x1464e6(0x1f1)]||0x32}),{'verbose':_0x5b1ba6[_0x1464e6(0x223)]}),_0x4110ca=_0x147ef9[_0x1464e6(0xfc)];if(_0x4110ca[_0x1464e6(0x239)]===0x0){if(_0x1a818f&&_0xfde415)console[_0x1464e6(0x214)](_0x1464e6(0x154)+_0x1a818f+'.'+_0xfde415);else _0x1a818f?console[_0x1464e6(0x214)](_0x1464e6(0x16d)+_0x1a818f):(console[_0x1464e6(0x214)](_0x1464e6(0x1ce)),console[_0x1464e6(0x214)](a55_0x359219[_0x1464e6(0x2ae)](_0x1464e6(0xea))));return 0x0;}_0x4110ca[_0x1464e6(0x11e)]((_0x5e434e,_0x538de1)=>{const _0x3f344c=_0x1464e6,_0x45ebe8=_0x5e434e['sessionTime']||'',_0x3a9cd0=_0x538de1[_0x3f344c(0x272)]||'';return _0x3a9cd0['localeCompare'](_0x45ebe8);});if(_0x5b1ba6['json']||_0x5b1ba6[_0x1464e6(0x1b0)])return await handleSDKOutput(_0x4110ca,_0x5b1ba6),0x0;let _0x109341;if(_0x37fda7){const _0x2b157c=_0x4110ca[0x0];if(!_0x2b157c[_0x1464e6(0x152)]?.['id'])return console[_0x1464e6(0x214)](_0x1464e6(0x19b)),0x0;_0x109341=_0x2b157c[_0x1464e6(0x152)]['id'],_0x5b1ba6[_0x1464e6(0x223)]&&console['error'](_0x1464e6(0x102)+_0x2b157c['sessionTime']);}else{const _0x2131c2=_0x4110ca[_0x1464e6(0x249)](_0x463ebf=>{const _0x2c0b6f=_0x1464e6,_0x144040=getAttemptStatusDisplay(_0x463ebf[_0x2c0b6f(0x152)]);return{'title':_0x463ebf[_0x2c0b6f(0x277)]?.[_0x2c0b6f(0x219)]+'.'+_0x463ebf[_0x2c0b6f(0x1c2)]?.[_0x2c0b6f(0x219)]+_0x2c0b6f(0x23f)+_0x463ebf[_0x2c0b6f(0x272)]+'\x20'+_0x144040[_0x2c0b6f(0xf7)],'value':_0x463ebf[_0x2c0b6f(0x152)]?.['id']||'','description':_0x144040[_0x2c0b6f(0x18a)]};}),_0x515ccc=await a55_0x1b2e73({'type':'select','name':_0x1464e6(0x21c),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x2131c2[_0x1464e6(0x112)](_0x28d5b3=>_0x28d5b3[_0x1464e6(0x2ad)]!=='')});if(!_0x515ccc[_0x1464e6(0x21c)])return 0x0;_0x109341=_0x515ccc[_0x1464e6(0x21c)];}const _0x536dec=_0x5b1ba6[_0x1464e6(0x29c)];return _0x536dec?await this[_0x1464e6(0x15c)](_0x75f662,_0x109341):await this[_0x1464e6(0xe8)](_0x75f662,_0x109341,_0x5b1ba6),0x0;}async[a55_0x5a9c5d(0xe8)](_0xeaa2cf,_0x377684,_0x29969c){const _0x3c1335=a55_0x5a9c5d,{tdx:_0x2708b2}=_0xeaa2cf;let _0x2a2037,_0x379585;try{[_0x2a2037,_0x379585]=await Promise[_0x3c1335(0x273)]([_0x2708b2[_0x3c1335(0x1c2)][_0x3c1335(0x218)](_0x377684),_0x2708b2[_0x3c1335(0x1c2)][_0x3c1335(0x203)](_0x377684,![])]);}catch(_0x306228){console[_0x3c1335(0x214)](a55_0x359219['red'](_0x3c1335(0x1ff)));_0x29969c[_0x3c1335(0x223)]&&console['error'](_0x306228);throw _0x306228;}if(_0x29969c[_0x3c1335(0x297)]||_0x29969c[_0x3c1335(0x1b0)]){const _0x1a0e62=this['buildTimelineData'](_0x2a2037,_0x379585);await handleSDKOutput([_0x1a0e62],_0x29969c);return;}const _0x31b351=_0x2708b2[_0x3c1335(0x280)][_0x3c1335(0x292)],_0x3af921=this['renderTimeline'](_0x2a2037,_0x379585,_0x31b351);console['log'](_0x3af921);}async[a55_0x5a9c5d(0x15c)](_0xc058c2,_0x2e8462){const _0x2f989c=a55_0x5a9c5d,{tdx:_0x3d29a2}=_0xc058c2,_0x158105=TIMELINE_CONFIG[_0x2f989c(0x26d)],_0x49545a=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x45a031=0x0;while(_0x45a031<_0x49545a){process[_0x2f989c(0x1e8)][_0x2f989c(0x1a3)]&&process[_0x2f989c(0x1e8)][_0x2f989c(0x2af)]('\x1bc');let _0x5176d4,_0x1a91f7;try{[_0x5176d4,_0x1a91f7]=await Promise[_0x2f989c(0x273)]([_0x3d29a2[_0x2f989c(0x1c2)]['attempt'](_0x2e8462),_0x3d29a2[_0x2f989c(0x1c2)][_0x2f989c(0x203)](_0x2e8462,![])]);}catch(_0x49d4b2){console[_0x2f989c(0x214)](a55_0x359219[_0x2f989c(0x1e4)](_0x2f989c(0x131)));_0x45a031>0x0&&console[_0x2f989c(0x214)](a55_0x359219[_0x2f989c(0x2ae)](_0x2f989c(0x28f)+_0x45a031));throw _0x49d4b2;}const _0x23a62e=_0x3d29a2[_0x2f989c(0x280)][_0x2f989c(0x292)],_0x3f9731=this['renderTimeline'](_0x5176d4,_0x1a91f7,_0x23a62e);console[_0x2f989c(0x28e)](_0x3f9731);const _0x5cb7e1=_0x5176d4[_0x2f989c(0x232)]&&_0x1a91f7[_0x2f989c(0x185)](_0x43f051=>_0x43f051[_0x2f989c(0x116)]!==_0x2f989c(0x296)&&_0x43f051[_0x2f989c(0x116)]!==_0x2f989c(0x1c0));if(_0x5cb7e1){console[_0x2f989c(0x214)](a55_0x359219[_0x2f989c(0x1be)](_0x2f989c(0x212)));break;}console[_0x2f989c(0x214)](a55_0x359219[_0x2f989c(0x2ae)]('\x0aPolling...\x20('+_0x45a031*0x2+_0x2f989c(0x133))),await new Promise(_0x290872=>setTimeout(_0x290872,_0x158105)),_0x45a031++;}_0x45a031>=_0x49545a&&console[_0x2f989c(0x214)](a55_0x359219[_0x2f989c(0x240)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a55_0x5a9c5d(0x195)](_0x4163a1,_0x24bac5,_0x51626c){const _0x2ca776=a55_0x5a9c5d,_0x21f9ff=[],_0x1870ce=TIMELINE_CONFIG[_0x2ca776(0x12c)],_0x3890c6=0x5,_0x51869a=process[_0x2ca776(0x1e8)]['columns']||0x78,_0x1c03fc=_0x51869a-_0x1870ce-_0x3890c6,_0x102d5e=Math[_0x2ca776(0x24c)](TIMELINE_CONFIG[_0x2ca776(0x298)],Math[_0x2ca776(0x1f3)](_0x1c03fc,TIMELINE_CONFIG[_0x2ca776(0x182)])),_0x207e6d=new Date(_0x4163a1['createdAt'])['getTime'](),_0x330e4c=_0x4163a1[_0x2ca776(0x268)]?new Date(_0x4163a1[_0x2ca776(0x268)])['getTime']():Date[_0x2ca776(0x194)](),_0x399318={'start':_0x207e6d,'end':_0x330e4c,'duration':_0x330e4c-_0x207e6d},_0x18ccf0=new Map(),_0x348d8c=[];for(const _0x557541 of _0x24bac5){if(_0x557541['startedAt']){const _0x14176e=new Date(_0x557541[_0x2ca776(0x101)])[_0x2ca776(0x148)](),_0x1ca541=_0x557541[_0x2ca776(0x263)]?new Date(_0x557541[_0x2ca776(0x263)])[_0x2ca776(0x148)]():Date['now'](),_0x1534be={'start':_0x14176e,'end':_0x1ca541,'duration':_0x1ca541-_0x14176e};_0x18ccf0[_0x2ca776(0x104)](_0x557541['id'],_0x1534be),_0x348d8c['push']({'name':_0x557541[_0x2ca776(0x191)],'state':_0x557541[_0x2ca776(0x116)]||_0x2ca776(0x11d),'window':_0x1534be});}else _0x348d8c['push']({'name':_0x557541[_0x2ca776(0x191)],'state':_0x557541['state']||'planned','window':undefined});}_0x348d8c[_0x2ca776(0x11e)]((_0x3f9200,_0x573aa9)=>{const _0x4c84bb=_0x2ca776;if(!_0x3f9200[_0x4c84bb(0x24a)])return 0x1;if(!_0x573aa9[_0x4c84bb(0x24a)])return-0x1;return _0x3f9200['window']['start']-_0x573aa9[_0x4c84bb(0x24a)][_0x4c84bb(0x1e3)];});const _0x253ba9=_0x348d8c['length'],_0x464363=_0x253ba9>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x464363&&_0x348d8c[_0x2ca776(0xe6)](TIMELINE_CONFIG[_0x2ca776(0x19f)]);const _0x51f0a5=calculateTimeScale(_0x399318,_0x102d5e),_0x2bab72=_0x4163a1['done']?_0x4163a1[_0x2ca776(0x176)]?a55_0x359219[_0x2ca776(0x1be)](_0x2ca776(0x176)):a55_0x359219[_0x2ca776(0x1e4)](_0x2ca776(0x214)):a55_0x359219['blue']('running'),_0x53305e=_0x4163a1[_0x2ca776(0x277)]?.['id'],_0x43f6a2=_0x4163a1[_0x2ca776(0x19c)];let _0x52093e;if(_0x53305e&&_0x43f6a2){const _0x4c9ee2=getWorkflowAttemptUrl(_0x51626c,_0x53305e,_0x43f6a2,_0x4163a1['id']);_0x52093e=hyperlink(a55_0x359219[_0x2ca776(0x2ae)](_0x4163a1['id']),_0x4c9ee2);}else _0x52093e=a55_0x359219[_0x2ca776(0x2ae)](_0x4163a1['id']);_0x21f9ff[_0x2ca776(0x27a)](_0x2ca776(0x1db)+_0x52093e+_0x2ca776(0x23f)+_0x2bab72+_0x2ca776(0x23f)+formatElapsed(_0x399318[_0x2ca776(0x2be)]));if(_0x348d8c[_0x2ca776(0x239)]>0x0){const _0x333378=renderTimeAxis(_0x51f0a5,_0x102d5e),_0x4efd5a=new Date(_0x399318[_0x2ca776(0x1e3)]),_0x4aee4b=formatDate(_0x4efd5a),_0x5a5088=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x2ca776(0x18b)]+_0x1870ce,_0x36e3f8=_0x4aee4b[_0x2ca776(0x19d)](_0x5a5088),_0x1be202=a55_0x359219['dim'](_0x36e3f8);_0x21f9ff[_0x2ca776(0x27a)](_0x1be202+'\x20'+_0x333378);for(const _0x38c031 of _0x348d8c){_0x21f9ff[_0x2ca776(0x27a)](renderTaskRow(_0x38c031,_0x51f0a5,_0x102d5e,_0x1870ce));}const _0x2e2684=calculateStats(_0x348d8c);_0x21f9ff['push'](formatStats(_0x2e2684)),_0x464363&&_0x21f9ff[_0x2ca776(0x27a)](a55_0x359219[_0x2ca776(0x240)](_0x2ca776(0x178)+TIMELINE_CONFIG[_0x2ca776(0x19f)]+_0x2ca776(0x115)+_0x253ba9+_0x2ca776(0xeb))),_0x21f9ff['push'](''),_0x21f9ff['push'](a55_0x359219['dim'](_0x2ca776(0x145))+(_0x2ca776(0x22b)+_0x4163a1['id']+_0x2ca776(0x1ad))+a55_0x359219['dim']('\x20to\x20see\x20detailed\x20logs'));}else _0x21f9ff['push'](_0x2ca776(0x183));return _0x21f9ff['join']('\x0a');}[a55_0x5a9c5d(0x17c)](_0x3bf067,_0x401381){const _0x151ece=a55_0x5a9c5d,_0x409370=new Date(_0x3bf067[_0x151ece(0x250)])['getTime'](),_0x38ebd3=_0x3bf067[_0x151ece(0x268)]?new Date(_0x3bf067[_0x151ece(0x268)])[_0x151ece(0x148)]():Date[_0x151ece(0x194)](),_0xd29b0e=_0x38ebd3-_0x409370,_0x5bf322=[];for(const _0x1372d9 of _0x401381){if(_0x1372d9[_0x151ece(0x101)]){const _0x176aba=new Date(_0x1372d9['startedAt'])['getTime'](),_0x42b3cb=_0x1372d9[_0x151ece(0x263)]?new Date(_0x1372d9['updatedAt'])[_0x151ece(0x148)]():Date[_0x151ece(0x194)]();_0x5bf322['push']({'name':_0x1372d9[_0x151ece(0x191)],'state':_0x1372d9[_0x151ece(0x116)]||_0x151ece(0x11d),'window':{'start':_0x176aba,'end':_0x42b3cb,'duration':_0x42b3cb-_0x176aba}});}else _0x5bf322['push']({'name':_0x1372d9[_0x151ece(0x191)],'state':_0x1372d9['state']||_0x151ece(0x1c0),'window':undefined});}const _0x14944f=calculateStats(_0x5bf322);return{'attempt':{'id':_0x3bf067['id'],'status':_0x3bf067[_0x151ece(0x232)]?_0x3bf067['success']?_0x151ece(0x176):_0x151ece(0x214):_0x151ece(0x296),'createdAt':_0x3bf067[_0x151ece(0x250)],'finishedAt':_0x3bf067[_0x151ece(0x268)],'duration_ms':_0xd29b0e},'tasks':_0x5bf322[_0x151ece(0x249)](_0x4c7c1f=>({'name':_0x4c7c1f[_0x151ece(0x219)],'state':_0x4c7c1f[_0x151ece(0x116)],'startedAt':_0x4c7c1f[_0x151ece(0x24a)]?new Date(_0x4c7c1f[_0x151ece(0x24a)][_0x151ece(0x1e3)])[_0x151ece(0x165)]():null,'updatedAt':_0x4c7c1f[_0x151ece(0x24a)]?new Date(_0x4c7c1f[_0x151ece(0x24a)][_0x151ece(0xf1)])[_0x151ece(0x165)]():null,'duration_ms':_0x4c7c1f[_0x151ece(0x24a)]?.[_0x151ece(0x2be)]||null})),'stats':_0x14944f};}}export class WorkflowSchedulesCommand extends BaseCommand{['name']=a55_0x5a9c5d(0x2a0);['description']=a55_0x5a9c5d(0xe5);async[a55_0x5a9c5d(0x1eb)](_0xd0c6fc){const _0x3dad27=a55_0x5a9c5d,{options:_0x575e7c,tdx:_0xe51c31}=_0xd0c6fc,_0x3eef0f=await withSpinner('Listing\x20schedules...',()=>_0xe51c31[_0x3dad27(0x1c2)][_0x3dad27(0x20a)](),{'verbose':_0x575e7c['verbose']}),_0x16e6b8=_0x3eef0f[_0x3dad27(0xfc)];console[_0x3dad27(0x214)](_0x3dad27(0x109)+_0x16e6b8['length']+_0x3dad27(0x1cd)+(_0x16e6b8[_0x3dad27(0x239)]!==0x1?'s':''));if(isStructuredFormat(_0x575e7c))await handleSDKOutput(_0x16e6b8,_0x575e7c);else{if(_0x16e6b8[_0x3dad27(0x239)]===0x0)console[_0x3dad27(0x28e)](_0x3dad27(0x259));else for(const _0x5ac9b6 of _0x16e6b8){const _0x2df4fb=_0x5ac9b6['disabledAt']?a55_0x359219[_0x3dad27(0x240)](_0x3dad27(0xf5)):'',_0x47e174=_0x5ac9b6['project']?.[_0x3dad27(0x219)]?a55_0x359219[_0x3dad27(0x2ae)]('\x20['+_0x5ac9b6[_0x3dad27(0x277)][_0x3dad27(0x219)]+']'):'',_0x162501=_0x5ac9b6[_0x3dad27(0x151)]?a55_0x359219['dim'](_0x3dad27(0x1e2)+new Date(_0x5ac9b6[_0x3dad27(0x151)])['toLocaleString']()):'';console['log']('📅\x20#'+_0x5ac9b6['id']+'\x20'+(_0x5ac9b6[_0x3dad27(0x1c2)]?.['name']||_0x3dad27(0x2b7))+_0x47e174+_0x2df4fb+_0x162501);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a55_0x5a9c5d(0x219)]='workflow:schedule:enable';[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x1a6);async['execute'](_0x5190c1){const _0x1cd158=a55_0x5a9c5d,{options:_0x3bae9e,args:_0x31855b,tdx:_0x1d2e0c}=_0x5190c1,_0xf35a19=_0x31855b[0x0];if(!_0xf35a19)return console[_0x1cd158(0x214)](a55_0x359219['red'](_0x1cd158(0x11f)),'Schedule\x20ID\x20is\x20required'),console[_0x1cd158(0x214)](a55_0x359219['dim'](_0x1cd158(0x29f))),console['error'](a55_0x359219['dim']('Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs')),0x1;const _0x257464=await withSpinner('Enabling\x20schedule\x20#'+_0xf35a19+_0x1cd158(0x2a1),()=>_0x1d2e0c[_0x1cd158(0x1c2)][_0x1cd158(0x2a8)](_0xf35a19),{'verbose':_0x3bae9e[_0x1cd158(0x223)]}),_0x4636db=_0x257464[_0x1cd158(0xfc)];return isStructuredFormat(_0x3bae9e)?await handleSingleObjectOutput(_0x4636db,_0x3bae9e):(console[_0x1cd158(0x28e)](_0x1cd158(0x204)+_0xf35a19+_0x1cd158(0x192)+(_0x4636db[_0x1cd158(0x1c2)]?.[_0x1cd158(0x219)]||'unknown')+')'),_0x4636db[_0x1cd158(0x151)]&&console[_0x1cd158(0x28e)](a55_0x359219[_0x1cd158(0x2ae)](_0x1cd158(0x2ab)+new Date(_0x4636db[_0x1cd158(0x151)])['toLocaleString']()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a55_0x5a9c5d(0x219)]=a55_0x5a9c5d(0x27b);[a55_0x5a9c5d(0x1f9)]=a55_0x5a9c5d(0x25e);async[a55_0x5a9c5d(0x1eb)](_0x1f3cce){const _0x20e4a9=a55_0x5a9c5d,{options:_0x237792,args:_0x55dd5a,tdx:_0x81b221}=_0x1f3cce,_0x4b0afa=_0x55dd5a[0x0];if(!_0x4b0afa)return console[_0x20e4a9(0x214)](a55_0x359219[_0x20e4a9(0x1e4)](_0x20e4a9(0x11f)),'Schedule\x20ID\x20is\x20required'),console[_0x20e4a9(0x214)](a55_0x359219[_0x20e4a9(0x2ae)](_0x20e4a9(0x1d9))),console['error'](a55_0x359219['dim'](_0x20e4a9(0x1b7))),0x1;const _0x2ebee4=await withSpinner(_0x20e4a9(0x1cf)+_0x4b0afa+_0x20e4a9(0x2a1),()=>_0x81b221[_0x20e4a9(0x1c2)]['disableSchedule'](_0x4b0afa),{'verbose':_0x237792['verbose']}),_0x5a3b7c=_0x2ebee4[_0x20e4a9(0xfc)];return isStructuredFormat(_0x237792)?await handleSingleObjectOutput(_0x5a3b7c,_0x237792):console[_0x20e4a9(0x28e)](_0x20e4a9(0x204)+_0x4b0afa+_0x20e4a9(0x156)+(_0x5a3b7c[_0x20e4a9(0x1c2)]?.[_0x20e4a9(0x219)]||_0x20e4a9(0x11d))+')'),0x0;}}
|
|
1
|
+
const a55_0x2c1f74=a55_0xf87f;(function(_0x3c0ac9,_0x5cb629){const _0x5dc04b=a55_0xf87f,_0x198cde=_0x3c0ac9();while(!![]){try{const _0xd91a19=parseInt(_0x5dc04b(0x245))/0x1*(-parseInt(_0x5dc04b(0x241))/0x2)+parseInt(_0x5dc04b(0x1e2))/0x3*(-parseInt(_0x5dc04b(0x16f))/0x4)+parseInt(_0x5dc04b(0x309))/0x5*(parseInt(_0x5dc04b(0x13f))/0x6)+-parseInt(_0x5dc04b(0x1af))/0x7+-parseInt(_0x5dc04b(0x225))/0x8+-parseInt(_0x5dc04b(0x1bc))/0x9+-parseInt(_0x5dc04b(0x23b))/0xa*(-parseInt(_0x5dc04b(0x1b7))/0xb);if(_0xd91a19===_0x5cb629)break;else _0x198cde['push'](_0x198cde['shift']());}catch(_0xd72958){_0x198cde['push'](_0x198cde['shift']());}}}(a55_0x3083,0xd8002));import a55_0x39f9f7 from'chalk';import{existsSync}from'fs';import a55_0x352ae9 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';function a55_0xf87f(_0x2b9bd0,_0x3a7fc0){_0x2b9bd0=_0x2b9bd0-0x13b;const _0x3083ec=a55_0x3083();let _0xf87f7=_0x3083ec[_0x2b9bd0];return _0xf87f7;}import{parseTaskGraph,formatTaskGraph,summarizeTaskGraph,formatWarningSummary}from'../sdk/workflow/task-graph.js';import a55_0x281505 from'prompts';function getAttemptStatusDisplay(_0x52b0d3){const _0x397652=a55_0xf87f;if(!_0x52b0d3)return{'icon':'⏳','text':''};const {done:_0xea17a4,success:_0x423935,cancelRequested:_0x922981}=_0x52b0d3;if(!_0xea17a4)return _0x922981?{'icon':'🛑','text':a55_0x39f9f7[_0x397652(0x158)](_0x397652(0x2c5))}:{'icon':'🔄','text':a55_0x39f9f7[_0x397652(0x2d9)](_0x397652(0x14d))};if(_0x423935)return{'icon':'✅','text':a55_0x39f9f7[_0x397652(0x2f2)](_0x397652(0x1b0))};return{'icon':'❌','text':a55_0x39f9f7[_0x397652(0x2c3)](_0x397652(0x262))};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x2c1f74(0x25c)](_0x37c61b,_0x483696,_0x5fd1dc=0x0){const _0x13853e=a55_0x2c1f74;return _0x37c61b[_0x5fd1dc]||_0x483696[_0x13853e(0x2c4)];}[a55_0x2c1f74(0x1c7)](_0x2dfb45,_0x59dba5,_0x94d982=0x0){const _0x1c37ab=a55_0x2c1f74,_0x1f3eb7=this['resolveProject'](_0x2dfb45,_0x59dba5,_0x94d982);if(!_0x1f3eb7)return console[_0x1c37ab(0x262)](a55_0x39f9f7[_0x1c37ab(0x2c3)](_0x1c37ab(0x1fc)),_0x1c37ab(0x287)),console['error'](a55_0x39f9f7[_0x1c37ab(0x184)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x1f3eb7;}['parseProjectWorkflowPattern'](_0x156d14,_0xaa70b1){const _0x450629=a55_0x2c1f74;if(_0x156d14[0x0]){const _0x2401f0=_0x156d14[0x0][_0x450629(0x16a)]('.');if(_0x2401f0[_0x450629(0x1e8)]===0x1)return{'projectName':_0x2401f0[0x0],'workflowName':undefined};else return _0x2401f0[_0x450629(0x1e8)]===0x2?{'projectName':_0x2401f0[0x0],'workflowName':_0x2401f0[0x1]}:(console[_0x450629(0x262)](a55_0x39f9f7[_0x450629(0x2c3)](_0x450629(0x1fc)),_0x450629(0x147)),null);}return{'projectName':_0xaa70b1[_0x450629(0x2c4)],'workflowName':undefined};}['resolveProjectDir'](_0x34457e,_0x5617f6,_0x5b06a5=0x0){const _0x3580a7=a55_0x2c1f74;if(_0x34457e[_0x5b06a5])return _0x34457e[_0x5b06a5];if(_0x5617f6[_0x3580a7(0x2c4)]){const _0x9c8ae2=a55_0x352ae9[_0x3580a7(0x18b)](process['cwd'](),_0x3580a7(0x2a1),_0x5617f6[_0x3580a7(0x2c4)]);if(existsSync(a55_0x352ae9['join'](_0x9c8ae2,'tdx.json')))return _0x9c8ae2;}return undefined;}async[a55_0x2c1f74(0x163)](_0x7647b0,_0x55f8bc,_0x267e02){const _0x59c50d=a55_0x2c1f74;try{const _0x2f32bd=await _0x7647b0[_0x59c50d(0x2b8)][_0x59c50d(0x2a1)](_0x55f8bc,{'limit':0x1});if(_0x2f32bd['length']>0x0){const _0x60cb92=_0x2f32bd[0x0]['id'],_0x2f6864=getWorkflowUrl(_0x267e02,_0x60cb92);console['error'](_0x59c50d(0x2a7)+a55_0x39f9f7[_0x59c50d(0x176)](_0x2f6864));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x2c0);['description']=a55_0x2c1f74(0x29c);async['execute'](_0x5d4b21){const _0x4a3e26=a55_0x2c1f74,{options:_0x4c702e,args:_0x1a6038,tdx:_0x1de2fa}=_0x5d4b21,_0x19f9c9=_0x1a6038[0x0],_0x25f75e=_0x4c702e[_0x4a3e26(0x2f3)];if(_0x25f75e)return saveSessionContext({'workflow_project':undefined},_0x4c702e[_0x4a3e26(0x293)]),console[_0x4a3e26(0x2b2)](a55_0x39f9f7[_0x4a3e26(0x2f2)](_0x4a3e26(0x1cd))),0x0;if(!_0x19f9c9)return console[_0x4a3e26(0x262)](a55_0x39f9f7['red'](_0x4a3e26(0x1fc)),_0x4a3e26(0x287)),console['error'](a55_0x39f9f7[_0x4a3e26(0x184)](_0x4a3e26(0x20b))),console[_0x4a3e26(0x262)](a55_0x39f9f7['dim'](_0x4a3e26(0x165))),0x1;const _0x5754c6=await withSpinner(_0x4a3e26(0x2d5)+_0x19f9c9+_0x4a3e26(0x228),()=>_0x1de2fa[_0x4a3e26(0x2b8)][_0x4a3e26(0x1da)](_0x19f9c9),{'verbose':_0x4c702e[_0x4a3e26(0x1eb)]}),{name:_0x1fcf0c}=_0x5754c6[_0x4a3e26(0x209)];return saveSessionContext({'workflow_project':_0x1fcf0c},_0x4c702e[_0x4a3e26(0x293)]),console[_0x4a3e26(0x2b2)](a55_0x39f9f7[_0x4a3e26(0x2f2)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a55_0x39f9f7['cyan'](_0x1fcf0c))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x247);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x2f4);async['execute'](_0x2413ca){const _0x38bd24=a55_0x2c1f74,{options:_0x4c1086,args:_0x3da056,tdx:_0x42ce37}=_0x2413ca,_0x29a499=_0x3da056[0x0];_0x4c1086[_0x38bd24(0x1eb)]&&_0x29a499&&console['error']('Pattern:\x20'+_0x29a499);const _0xd955bd=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x42ce37[_0x38bd24(0x2b8)]['projects'](_0x29a499,{'limit':_0x4c1086[_0x38bd24(0x1fd)]}),{'verbose':_0x4c1086[_0x38bd24(0x1eb)]});let _0x30da3f=_0xd955bd[_0x38bd24(0x209)];_0x30da3f[_0x38bd24(0x2eb)]((_0x263677,_0x19db34)=>_0x263677[_0x38bd24(0x1c2)][_0x38bd24(0x1d7)](_0x19db34['name']));const _0x194f13=_0x4c1086[_0x38bd24(0x1fd)]&&_0x30da3f[_0x38bd24(0x1e8)]>=_0x4c1086[_0x38bd24(0x1fd)]?a55_0x39f9f7[_0x38bd24(0x184)](_0x38bd24(0x277)):'';console['error']('✔\x20Found\x20'+_0x30da3f[_0x38bd24(0x1e8)]+'\x20project'+(_0x30da3f['length']!==0x1?'s':'')+_0x194f13);if(_0x4c1086['format']===_0x38bd24(0x219)||_0x4c1086[_0x38bd24(0x1f7)]===_0x38bd24(0x1a6)||_0x4c1086[_0x38bd24(0x1f7)]===_0x38bd24(0x15c))await handleSDKOutput(_0x30da3f,_0x4c1086);else{if(_0x30da3f[_0x38bd24(0x1e8)]===0x0)_0x29a499?console[_0x38bd24(0x2b2)](_0x38bd24(0x2e4)+_0x29a499):console[_0x38bd24(0x2b2)](_0x38bd24(0x285));else{const _0x5563c8=_0x30da3f[_0x38bd24(0x160)](_0x36d505=>{const _0x4d2b76=_0x38bd24,_0x320cfe=_0x36d505[_0x4d2b76(0x26b)]?.[_0x4d2b76(0x27d)](_0x66f4bd=>_0x66f4bd['key']==='sys'),_0x20e5df=_0x320cfe?a55_0x39f9f7[_0x4d2b76(0x184)](_0x4d2b76(0x175)):'';return'📁\x20'+_0x36d505[_0x4d2b76(0x1c2)]+_0x20e5df;});await writeOutput(_0x5563c8['join']('\x0a'),_0x4c1086[_0x38bd24(0x2db)],_0x38bd24(0x202));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x1d1);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x279);async[a55_0x2c1f74(0x15f)](_0xe6036f){const _0x3dcd32=a55_0x2c1f74,{options:_0x420c76,args:_0x1e4d0c,tdx:_0x5b9866}=_0xe6036f,_0x11e255=this[_0x3dcd32(0x25c)](_0x1e4d0c,_0x420c76);_0x420c76[_0x3dcd32(0x1eb)]&&_0x11e255&&console[_0x3dcd32(0x262)](_0x3dcd32(0x164)+_0x11e255);const _0x523340=await withSpinner(_0x3dcd32(0x1ed),()=>_0x5b9866['workflow'][_0x3dcd32(0x2a1)](_0x11e255,{'limit':_0x420c76[_0x3dcd32(0x1fd)]}),{'verbose':_0x420c76[_0x3dcd32(0x1eb)]});let _0x274daa=_0x523340[_0x3dcd32(0x209)];_0x274daa['sort']((_0x5c39c6,_0x2d68a9)=>{const _0x172aba=_0x3dcd32,_0x53d4e1=_0x5c39c6['name'][_0x172aba(0x1d7)](_0x2d68a9['name']);if(_0x53d4e1!==0x0)return _0x53d4e1;return(_0x5c39c6[_0x172aba(0x23a)]?.[_0x172aba(0x1c2)]||'')[_0x172aba(0x1d7)](_0x2d68a9[_0x172aba(0x23a)]?.[_0x172aba(0x1c2)]||'');});const _0xaa3d80=_0x420c76[_0x3dcd32(0x1fd)]&&_0x274daa[_0x3dcd32(0x1e8)]>=_0x420c76[_0x3dcd32(0x1fd)]?a55_0x39f9f7[_0x3dcd32(0x184)](_0x3dcd32(0x277)):'';console[_0x3dcd32(0x262)](_0x3dcd32(0x149)+_0x274daa[_0x3dcd32(0x1e8)]+_0x3dcd32(0x1b2)+(_0x274daa[_0x3dcd32(0x1e8)]!==0x1?'s':'')+_0xaa3d80);if(_0x420c76['format']==='json'||_0x420c76[_0x3dcd32(0x1f7)]===_0x3dcd32(0x1a6)||_0x420c76[_0x3dcd32(0x1f7)]===_0x3dcd32(0x15c))await handleSDKOutput(_0x274daa,_0x420c76);else{if(_0x274daa['length']===0x0)_0x11e255?console[_0x3dcd32(0x2b2)](_0x3dcd32(0x235)+_0x11e255):console['log']('No\x20workflows\x20found');else{const _0x24bec2=_0x420c76[_0x3dcd32(0x1e6)],_0x4ecec8=_0x274daa[_0x3dcd32(0x160)](_0x5f3dfc=>{const _0x2dfb11=_0x3dcd32,_0x3d6626=a55_0x39f9f7[_0x2dfb11(0x184)]('#'+_0x5f3dfc['id']),_0x4d7cee=hyperlink(_0x3d6626,getWorkflowUrl(_0x24bec2,_0x5f3dfc['id'])),_0x3bf2f5=_0x5f3dfc[_0x2dfb11(0x23a)]?.[_0x2dfb11(0x1c2)]?a55_0x39f9f7['dim']('\x20('+_0x5f3dfc[_0x2dfb11(0x23a)][_0x2dfb11(0x1c2)]+')'):'';return _0x2dfb11(0x2b4)+_0x4d7cee+'\x20'+_0x5f3dfc[_0x2dfb11(0x1c2)]+_0x3bf2f5;});await writeOutput(_0x4ecec8[_0x3dcd32(0x18b)]('\x0a'),_0x420c76[_0x3dcd32(0x2db)],_0x3dcd32(0x202));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x28f);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x278);async['execute'](_0x2293c8){const _0x560aa4=a55_0x2c1f74,{options:_0x1feb6d,args:_0x526880,tdx:_0x497da3}=_0x2293c8,_0x487c6b=this[_0x560aa4(0x2a4)](_0x526880,_0x1feb6d);if(!_0x487c6b)return 0x1;const {projectName:_0x7d7a4c,workflowName:_0x55d3d0}=_0x487c6b;if(_0x1feb6d[_0x560aa4(0x1eb)]){if(_0x7d7a4c&&_0x55d3d0)console[_0x560aa4(0x262)](_0x560aa4(0x2b1)+_0x7d7a4c+'.'+_0x55d3d0);else _0x7d7a4c&&console[_0x560aa4(0x262)](_0x560aa4(0x189)+_0x7d7a4c);const _0x597ced=_0x1feb6d[_0x560aa4(0x1a3)];_0x597ced&&console[_0x560aa4(0x262)]('Status:\x20'+_0x597ced);}let _0x2b4719=0x28;if(process[_0x560aa4(0x167)][_0x560aa4(0x1e9)]&&!_0x1feb6d[_0x560aa4(0x2db)]&&!_0x1feb6d['format']){const _0x478f60=process[_0x560aa4(0x167)][_0x560aa4(0x283)]||0x28;_0x2b4719=Math[_0x560aa4(0x276)](0x14,Math[_0x560aa4(0x25d)](_0x478f60*0x2/0x3));}const _0x3c918e=_0x1feb6d[_0x560aa4(0x1fd)]||_0x2b4719,_0x400a83=await withSpinner(_0x560aa4(0x269),()=>_0x497da3[_0x560aa4(0x2b8)][_0x560aa4(0x2af)]({'projectName':_0x7d7a4c,'workflowName':_0x55d3d0,'status':_0x1feb6d[_0x560aa4(0x1a3)],'fromTime':_0x1feb6d['from'],'toTime':_0x1feb6d['to'],'limit':_0x3c918e}),{'verbose':_0x1feb6d[_0x560aa4(0x1eb)]}),_0x22eb1f=_0x400a83['data'];_0x22eb1f[_0x560aa4(0x2eb)]((_0x596165,_0x2c9dd)=>{const _0x11f7a1=_0x560aa4,_0x4dc083=_0x596165['sessionTime']||'',_0x106507=_0x2c9dd[_0x11f7a1(0x22a)]||'';return _0x106507['localeCompare'](_0x4dc083);});_0x22eb1f[_0x560aa4(0x1e8)]>=_0x3c918e?console[_0x560aa4(0x262)](_0x560aa4(0x2ba)+_0x22eb1f[_0x560aa4(0x1e8)]+_0x560aa4(0x1c5)+a55_0x39f9f7[_0x560aa4(0x184)](_0x560aa4(0x17f))):console['error'](_0x560aa4(0x149)+_0x22eb1f[_0x560aa4(0x1e8)]+'\x20session'+(_0x22eb1f[_0x560aa4(0x1e8)]!==0x1?'s':''));if(_0x1feb6d['format']===_0x560aa4(0x219)||_0x1feb6d[_0x560aa4(0x1f7)]==='jsonl'||_0x1feb6d[_0x560aa4(0x1f7)]==='table')await handleSDKOutput(_0x22eb1f,_0x1feb6d);else{if(!process[_0x560aa4(0x167)][_0x560aa4(0x1e9)]||_0x1feb6d[_0x560aa4(0x2db)]){if(_0x22eb1f['length']===0x0){if(_0x7d7a4c&&_0x55d3d0)console[_0x560aa4(0x2b2)](_0x560aa4(0x216)+_0x7d7a4c+'.'+_0x55d3d0);else _0x7d7a4c?console[_0x560aa4(0x2b2)](_0x560aa4(0x256)+_0x7d7a4c):console['log'](_0x560aa4(0x157));}else{const _0x1567a8=_0x1feb6d[_0x560aa4(0x1e6)],_0x49eb46=this['renderSessionsTimeline'](_0x22eb1f,_0x1567a8);_0x1feb6d[_0x560aa4(0x2db)]?await writeOutput(_0x49eb46,_0x1feb6d[_0x560aa4(0x2db)],_0x560aa4(0x202)):console['log'](_0x49eb46);}!_0x7d7a4c&&(console[_0x560aa4(0x262)](''),console[_0x560aa4(0x262)](a55_0x39f9f7[_0x560aa4(0x184)](_0x560aa4(0x2b9))),console['error'](a55_0x39f9f7[_0x560aa4(0x184)](_0x560aa4(0x177))+'or'+a55_0x39f9f7[_0x560aa4(0x184)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x22eb1f[_0x560aa4(0x1e8)]===0x0){if(_0x7d7a4c&&_0x55d3d0)console[_0x560aa4(0x2b2)](_0x560aa4(0x216)+_0x7d7a4c+'.'+_0x55d3d0);else _0x7d7a4c?console[_0x560aa4(0x2b2)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x7d7a4c):console[_0x560aa4(0x2b2)]('No\x20sessions\x20found');}else await this[_0x560aa4(0x2c1)](_0x22eb1f,_0x2293c8,_0x7d7a4c);}}return 0x0;}[a55_0x2c1f74(0x1bd)](_0x5028ba,_0x34090b){const _0x5ce6fb=a55_0x2c1f74,_0x5c01f5=[],_0x313717=new Map();let _0x3993a1=Infinity,_0x147f7e=-Infinity;for(const _0x2c2684 of _0x5028ba){if(_0x2c2684[_0x5ce6fb(0x29b)]?.['createdAt']){const _0x5e34ac=new Date(_0x2c2684[_0x5ce6fb(0x29b)][_0x5ce6fb(0x2fa)])[_0x5ce6fb(0x29a)](),_0x45386e=_0x2c2684[_0x5ce6fb(0x29b)][_0x5ce6fb(0x20c)]?new Date(_0x2c2684[_0x5ce6fb(0x29b)][_0x5ce6fb(0x20c)])[_0x5ce6fb(0x29a)]():Date[_0x5ce6fb(0x305)](),_0x5b1989=_0x2c2684['project']?.[_0x5ce6fb(0x1c2)]||'(unknown)';!_0x313717[_0x5ce6fb(0x201)](_0x5b1989)&&_0x313717[_0x5ce6fb(0x1a0)](_0x5b1989,[]),_0x313717['get'](_0x5b1989)['push']({'session':_0x2c2684,'startTime':_0x5e34ac,'endTime':_0x45386e,'duration':_0x45386e-_0x5e34ac}),_0x3993a1=Math[_0x5ce6fb(0x155)](_0x3993a1,_0x5e34ac),_0x147f7e=Math[_0x5ce6fb(0x276)](_0x147f7e,_0x45386e);}}if(_0x313717[_0x5ce6fb(0x1ec)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0xc5cc41=process['stdout'][_0x5ce6fb(0x1ef)]||0x78,_0x2e540f=0x1e,_0x38a9a9=0x32,_0x1e811d=0x4,_0x23eb62=Math['min'](_0x38a9a9,Math[_0x5ce6fb(0x276)](_0x2e540f,Math['floor'](_0xc5cc41*0.3))),_0x3c858c=_0xc5cc41-_0x23eb62-TIMELINE_CONFIG[_0x5ce6fb(0x1b9)]-0x3-_0x1e811d,_0x50760b=_0x147f7e-_0x3993a1,_0xfc2771=_0x50760b/_0x23eb62,_0x4244b7=renderTimeAxis({'startTime':_0x3993a1,'endTime':_0x147f7e,'durationMs':_0x50760b,'msPerChar':_0xfc2771},_0x23eb62),_0x1cc552=[];for(const _0xd88d54 of _0x313717[_0x5ce6fb(0x191)]()){_0x1cc552[_0x5ce6fb(0x14b)](..._0xd88d54);}_0x1cc552[_0x5ce6fb(0x2eb)]((_0x5b8d90,_0x2d0629)=>_0x2d0629[_0x5ce6fb(0x2e2)]-_0x5b8d90[_0x5ce6fb(0x2e2)]);const _0x332a94=new Date(_0x3993a1),_0x4a6c29=formatDate(_0x332a94),_0x29ece0=_0x1e811d+TIMELINE_CONFIG[_0x5ce6fb(0x2cc)]+TIMELINE_CONFIG[_0x5ce6fb(0x1d3)]+_0x3c858c,_0x3d4093='\x20'['repeat'](_0x29ece0-_0x4a6c29[_0x5ce6fb(0x1e8)]),_0xd900a1=_0x3d4093+a55_0x39f9f7[_0x5ce6fb(0x184)](_0x4a6c29)+'\x20'+_0x4244b7;_0x5c01f5['push'](_0xd900a1);const _0x3dc627=0x16;let _0xb2991c=0x0;for(const _0x5ed0ce of _0x1cc552){const _0x420258=_0x5ed0ce[_0x5ce6fb(0x293)][_0x5ce6fb(0x23a)]?.[_0x5ce6fb(0x1c2)]||'?',_0x176d0b=Math['min'](stringWidth(_0x420258),_0x3dc627);_0xb2991c=Math['max'](_0xb2991c,_0x176d0b);}for(const _0x14e118 of _0x1cc552){const {session:_0x587600,startTime:_0x1d46ca,endTime:_0x663b39,duration:_0x4d6b2a}=_0x14e118,_0x3ca376=_0x587600[_0x5ce6fb(0x23a)]?.['id'],_0x2880e4=_0x587600['id'],_0x1ba9bc=_0x587600[_0x5ce6fb(0x23a)]?.[_0x5ce6fb(0x1c2)]||'?',_0x1ab2ad=_0x587600[_0x5ce6fb(0x2b8)]?.[_0x5ce6fb(0x1c2)]||'?';let _0x49a769,_0x35d8d8;if(_0x587600[_0x5ce6fb(0x29b)]){const _0x444e3d=_0x587600[_0x5ce6fb(0x29b)];!_0x444e3d[_0x5ce6fb(0x297)]?(_0x49a769=_0x444e3d[_0x5ce6fb(0x2fc)]?'🛑':'🔄',_0x35d8d8=_0x444e3d[_0x5ce6fb(0x2fc)]?a55_0x39f9f7[_0x5ce6fb(0x158)]:a55_0x39f9f7[_0x5ce6fb(0x2d9)]):(_0x49a769=_0x444e3d[_0x5ce6fb(0x1b0)]?'✅':'❌',_0x35d8d8=_0x444e3d[_0x5ce6fb(0x1b0)]?a55_0x39f9f7[_0x5ce6fb(0x2f2)]:a55_0x39f9f7['red']);}else _0x49a769='⏳',_0x35d8d8=a55_0x39f9f7[_0x5ce6fb(0x184)];const _0x1bd7d5='#'+_0x2880e4,_0x4a51ea=_0x3ca376?hyperlink(_0x1bd7d5,getWorkflowSessionUrl(_0x34090b,_0x3ca376,_0x2880e4)):_0x1bd7d5;let _0xc923bb=_0x1ba9bc;stringWidth(_0x1ba9bc)>_0x3dc627&&(_0xc923bb=_0x1ba9bc[_0x5ce6fb(0x1d4)](0x0,_0x3dc627-0x1)+'…');const _0x4a9eb2=a55_0x39f9f7['dim'](_0xc923bb),_0x37b7b9=stringWidth(_0xc923bb),_0xfd57c2='\x20'[_0x5ce6fb(0x203)](_0xb2991c-stringWidth(_0xc923bb)+0x2),_0x12c3af='('+formatElapsed(_0x4d6b2a)+')',_0x2926a0=stringWidth(_0x12c3af),_0x1171d6=stringWidth(_0x1bd7d5),_0x509391=_0x1171d6+0x1+_0x37b7b9+_0xfd57c2[_0x5ce6fb(0x1e8)],_0xaf5877=_0x3c858c-_0x509391-_0x2926a0-0x1-0x8;let _0x1e09d2=_0x1ab2ad;stringWidth(_0x1e09d2)>_0xaf5877&&(_0x1e09d2=_0x1e09d2[_0x5ce6fb(0x1d4)](0x0,_0xaf5877-0x1)+'…');const _0x2f6d06=_0x4a51ea+'\x20'+_0x4a9eb2+_0xfd57c2+_0x1e09d2,_0x54f5d1=stringWidth(_0x2f6d06),_0x238949=_0x3c858c-_0x54f5d1-_0x2926a0,_0x412983=_0x2f6d06+'\x20'[_0x5ce6fb(0x203)](Math[_0x5ce6fb(0x276)](0x1,_0x238949))+a55_0x39f9f7[_0x5ce6fb(0x184)](_0x12c3af),_0x30e513=Math[_0x5ce6fb(0x25d)]((_0x1d46ca-_0x3993a1)/_0xfc2771),_0x5a8b65=Math[_0x5ce6fb(0x25d)]((_0x663b39-_0x3993a1)/_0xfc2771),_0x44759e=Math['max'](_0x30e513+0x1,_0x5a8b65),_0x21aa63=new Array(_0x23eb62)[_0x5ce6fb(0x2e7)]('\x20');for(let _0x22d91c=_0x30e513;_0x22d91c<Math[_0x5ce6fb(0x155)](_0x44759e,_0x23eb62);_0x22d91c++){_0x21aa63[_0x22d91c]='─';}const _0x498617=_0x21aa63[_0x5ce6fb(0x160)](_0x401222=>_0x401222==='\x20'?'\x20':_0x35d8d8(_0x401222))['join']('');_0x5c01f5[_0x5ce6fb(0x14b)](_0x49a769+'\x20'+_0x412983+'│'+_0x498617+'│');}return _0x5c01f5['join']('\x0a');}async[a55_0x2c1f74(0x2c1)](_0xa24579,_0xfd5827,_0x331bcb){const _0x3afee4=a55_0x2c1f74,{options:_0x2090b2,tdx:_0x240cfc}=_0xfd5827,_0x57491a=_0x2090b2[_0x3afee4(0x1e6)],{timelineRows:_0x15db21,timeAxisHeader:_0x639f34}=this[_0x3afee4(0x289)](_0xa24579,_0x57491a),_0xb9b69b=_0x15db21['filter'](_0x171401=>_0x171401[_0x3afee4(0x250)]);if(_0xb9b69b[_0x3afee4(0x1e8)]===0x0){const _0xdef4f9=this[_0x3afee4(0x1bd)](_0xa24579,_0x57491a);console[_0x3afee4(0x2b2)](_0xdef4f9);!_0x331bcb&&(console[_0x3afee4(0x262)](''),console[_0x3afee4(0x262)](a55_0x39f9f7[_0x3afee4(0x184)](_0x3afee4(0x2b9))),console[_0x3afee4(0x262)](a55_0x39f9f7['dim'](_0x3afee4(0x177))+'or'+a55_0x39f9f7['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x639f34&&console['log'](_0x639f34);const _0x512e95=_0x15db21[_0x3afee4(0x2dd)](_0x3fddb9=>_0x3fddb9['attemptId'])['map'](_0x281587=>({'title':_0x281587['displayLine'],'value':_0x281587[_0x3afee4(0x250)]})),_0x39312a=process[_0x3afee4(0x167)][_0x3afee4(0x283)]||0x3c,_0x5ccc50=Math[_0x3afee4(0x276)](0x28,Math['floor'](_0x39312a*0x2/0x3)),_0x6eefd4=await a55_0x281505({'type':_0x3afee4(0x2d3),'name':'attemptId','message':_0x3afee4(0x1a2),'choices':_0x512e95,'initial':-0x1,'limit':_0x5ccc50,'clearFirst':!![],'fallback':{'title':_0x3afee4(0x2bc),'value':null},'suggest':(_0x341249,_0x175d3b)=>{const _0x2b1998=_0x3afee4;if(!_0x341249)return Promise[_0x2b1998(0x18e)](_0x175d3b);const _0x526621=_0x175d3b[_0x2b1998(0x2dd)](_0x102a16=>{const _0x54414f=_0x2b1998,_0x3c9b2a=_0x102a16;return _0x3c9b2a[_0x54414f(0x226)][_0x54414f(0x19e)]()[_0x54414f(0x231)](_0x341249[_0x54414f(0x19e)]());});return Promise[_0x2b1998(0x18e)](_0x526621);}}),_0x236910=()=>{const _0x149a71=_0x3afee4;process[_0x149a71(0x167)]['write']('\x1b[1A\x1b[2K'),process[_0x149a71(0x167)]['write'](_0x149a71(0x1d6)),process[_0x149a71(0x167)]['write']('\x1b[1A\x1b[2K');},_0x1a4658=_0x6eefd4&&_0x6eefd4[_0x3afee4(0x250)]&&_0x6eefd4[_0x3afee4(0x250)]!==null&&_0x6eefd4[_0x3afee4(0x250)][_0x3afee4(0x282)]()!=='';if(!_0x1a4658){_0x236910(),console[_0x3afee4(0x2b2)](a55_0x39f9f7['dim'](_0x3afee4(0x179)));return;}_0x236910();const _0x435dea=_0xa24579[_0x3afee4(0x2cb)](_0x3acd4c=>_0x3acd4c[_0x3afee4(0x29b)]?.['id']===_0x6eefd4[_0x3afee4(0x250)]);if(_0x435dea){const _0x1461f4=_0x435dea['project']?.['name']||'?',_0x3ffee0=_0x435dea[_0x3afee4(0x2b8)]?.[_0x3afee4(0x1c2)]||'?';console[_0x3afee4(0x2b2)](_0x3afee4(0x186)+a55_0x39f9f7[_0x3afee4(0x184)](_0x1461f4)+_0x3afee4(0x21e)+a55_0x39f9f7[_0x3afee4(0x184)](_0x3ffee0));}const _0x2374eb=new WorkflowTimelineCommand();await _0x2374eb[_0x3afee4(0x15f)]({'args':[],'options':{..._0x2090b2,'attemptId':_0x6eefd4[_0x3afee4(0x250)]},'tdx':_0x240cfc});}['generateSessionTimelineRows'](_0x1d6c4b,_0x22a875){const _0xcedf54=a55_0x2c1f74,_0x201268=new Map();for(const _0x35131c of _0x1d6c4b){_0x35131c['id']&&_0x35131c[_0xcedf54(0x29b)]?.['id']&&_0x201268['set'](_0x35131c['id'],_0x35131c[_0xcedf54(0x29b)]['id']);}const _0x52cd27=[];let _0x1a7d42='';const _0x7c54d2=this['renderSessionsTimeline'](_0x1d6c4b,_0x22a875),_0x144776=_0x7c54d2[_0xcedf54(0x16a)]('\x0a');for(const _0x33d816 of _0x144776){if(_0x33d816[_0xcedf54(0x1c3)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x33d816['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x1a7d42=_0x33d816;else{if(_0x33d816[_0xcedf54(0x266)](/^[✅❌🔄🛑⏳]/)){const _0x241bf6=_0x33d816['match'](/#(\d+)/),_0x2e1141=_0x241bf6?_0x241bf6[0x1]:null,_0x210bfa=_0x2e1141?_0x201268[_0xcedf54(0x300)](_0x2e1141)||null:null,_0x242c7d=_0x1d6c4b['find'](_0x59a56d=>_0x59a56d['id']===_0x2e1141),_0x26ae76=_0x242c7d?.[_0xcedf54(0x23a)]?.[_0xcedf54(0x1c2)]||'';_0x52cd27[_0xcedf54(0x14b)]({'displayLine':_0x33d816,'attemptId':_0x210bfa,'projectName':_0x26ae76});}}}return{'timelineRows':_0x52cd27,'timeAxisHeader':_0x1a7d42};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x2ff);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x301);async[a55_0x2c1f74(0x15f)](_0xfd3bd9){const _0x136dcf=a55_0x2c1f74,{options:_0x497be1,args:_0x1fb755,tdx:_0x2a5d88}=_0xfd3bd9,_0x45170c=this[_0x136dcf(0x2a4)](_0x1fb755,_0x497be1);if(!_0x45170c)return 0x1;const {projectName:_0x6679ca,workflowName:_0x255cba}=_0x45170c,_0x4e8756=_0x497be1[_0x136dcf(0x1df)];if(_0x497be1[_0x136dcf(0x1eb)]){if(_0x6679ca&&_0x255cba)console['error'](_0x136dcf(0x2b1)+_0x6679ca+'.'+_0x255cba);else _0x6679ca&&console[_0x136dcf(0x262)](_0x136dcf(0x189)+_0x6679ca);_0x4e8756&&console['error'](_0x136dcf(0x240));}const _0x312e0e=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x2a5d88[_0x136dcf(0x2b8)][_0x136dcf(0x215)]({'projectName':_0x6679ca,'workflowName':_0x255cba,'includeRetried':_0x4e8756,'limit':_0x497be1['limit']}),{'verbose':_0x497be1[_0x136dcf(0x1eb)]}),_0x31fdf=_0x312e0e[_0x136dcf(0x209)],_0x2f8cad=_0x497be1['limit']||0x64,_0x3ad8b5=_0x31fdf[_0x136dcf(0x1e8)]>=_0x2f8cad?a55_0x39f9f7[_0x136dcf(0x184)](_0x136dcf(0x277)):'';console[_0x136dcf(0x262)](_0x136dcf(0x149)+_0x31fdf['length']+_0x136dcf(0x1ae)+(_0x31fdf[_0x136dcf(0x1e8)]!==0x1?'s':'')+_0x3ad8b5);if(_0x497be1[_0x136dcf(0x1f7)]===_0x136dcf(0x219)||_0x497be1['format']===_0x136dcf(0x1a6)||_0x497be1[_0x136dcf(0x1f7)]==='table')await handleSDKOutput(_0x31fdf,_0x497be1);else{if(_0x31fdf[_0x136dcf(0x1e8)]===0x0){if(_0x6679ca&&_0x255cba)console[_0x136dcf(0x2b2)](_0x136dcf(0x141)+_0x6679ca+'.'+_0x255cba);else _0x6679ca?console['log'](_0x136dcf(0x1ce)+_0x6679ca):console[_0x136dcf(0x2b2)](_0x136dcf(0x26d));}else{const _0x40539c=_0x497be1[_0x136dcf(0x1e6)],_0x10603e=_0x31fdf[_0x136dcf(0x160)](_0xde347b=>{const _0x26397e=_0x136dcf,_0xd915c7=a55_0x39f9f7[_0x26397e(0x184)]('#'+_0xde347b['id']),_0x5d7d62=_0xde347b['project']?.['id'],_0x2f846d=_0xde347b[_0x26397e(0x21f)]||_0xde347b[_0x26397e(0x1de)],_0x16b9dc=_0x5d7d62&&_0x2f846d?hyperlink(_0xd915c7,getWorkflowAttemptUrl(_0x40539c,_0x5d7d62,_0x2f846d,_0xde347b['id'])):_0xd915c7,{icon:_0x175619,text:_0x48cac9}=getAttemptStatusDisplay(_0xde347b),_0x147d82=(_0xde347b[_0x26397e(0x23a)]?.[_0x26397e(0x1c2)]||'?')+'.'+(_0xde347b[_0x26397e(0x2b8)]?.['name']||'?'),_0x1e5c1c=_0xde347b[_0x26397e(0x22a)]?a55_0x39f9f7['dim'](_0xde347b[_0x26397e(0x22a)]):'';return(_0x16b9dc+'\x20'+_0x175619+(_0x48cac9?'\x20'+_0x48cac9:'')+'\x20'+_0x147d82+'\x20'+_0x1e5c1c)[_0x26397e(0x2e6)]();});await writeOutput(_0x10603e[_0x136dcf(0x18b)]('\x0a'),_0x497be1[_0x136dcf(0x2db)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a55_0x2c1f74(0x274);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x25f);async[a55_0x2c1f74(0x15f)](_0xe9f891){const _0x1e2adf=a55_0x2c1f74,{options:_0x105cc3,args:_0x4eab13,tdx:_0x11fd0f}=_0xe9f891,_0x188437=_0x4eab13[0x0];if(!_0x188437)return console[_0x1e2adf(0x262)](_0x1e2adf(0x302)),0x1;_0x105cc3['verbose']&&console[_0x1e2adf(0x262)](_0x1e2adf(0x208)+_0x188437);const _0x32138e=await withSpinner('Getting\x20attempt\x20details...',()=>_0x11fd0f[_0x1e2adf(0x2b8)][_0x1e2adf(0x17c)](_0x188437),{'verbose':_0x105cc3[_0x1e2adf(0x1eb)]}),_0x4c2707=_0x32138e[_0x1e2adf(0x209)];let _0x16463d;!_0x4c2707['done']?_0x16463d=_0x4c2707['cancelRequested']?_0x1e2adf(0x2c5):_0x1e2adf(0x14d):_0x16463d=_0x4c2707[_0x1e2adf(0x1b0)]?'success':_0x1e2adf(0x262);let _0x3aa08f;if(_0x4c2707['createdAt']&&_0x4c2707[_0x1e2adf(0x20c)]){const _0x36688a=new Date(_0x4c2707[_0x1e2adf(0x2fa)])[_0x1e2adf(0x29a)](),_0x49b583=new Date(_0x4c2707[_0x1e2adf(0x20c)])['getTime']();_0x3aa08f=Math[_0x1e2adf(0x220)]((_0x49b583-_0x36688a)/0x3e8);}const _0x55d5f5={'attempt_id':_0x4c2707['id'],'status':_0x16463d,..._0x4c2707[_0x1e2adf(0x150)]!==undefined&&{'index':_0x4c2707[_0x1e2adf(0x150)]},..._0x4c2707[_0x1e2adf(0x23a)]&&{'project':_0x4c2707[_0x1e2adf(0x23a)][_0x1e2adf(0x1c2)]},..._0x4c2707[_0x1e2adf(0x2b8)]&&{'workflow':_0x4c2707[_0x1e2adf(0x2b8)][_0x1e2adf(0x1c2)]},..._0x4c2707[_0x1e2adf(0x1de)]&&{'session_id':_0x4c2707[_0x1e2adf(0x1de)]},..._0x4c2707[_0x1e2adf(0x22a)]&&{'session_time':_0x4c2707['sessionTime']},..._0x4c2707[_0x1e2adf(0x30b)]&&{'retry_attempt':_0x4c2707[_0x1e2adf(0x30b)]},..._0x3aa08f!==undefined&&{'duration_sec':_0x3aa08f},..._0x4c2707[_0x1e2adf(0x2fa)]&&{'created_at':_0x4c2707['createdAt']},..._0x4c2707[_0x1e2adf(0x20c)]&&{'finished_at':_0x4c2707[_0x1e2adf(0x20c)]},...Object[_0x1e2adf(0x2fd)](_0x4c2707[_0x1e2adf(0x2b0)])[_0x1e2adf(0x1e8)]>0x0&&{'params':_0x4c2707[_0x1e2adf(0x2b0)]}};return await handleSingleObjectOutput(_0x55d5f5,_0x105cc3),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x206);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x280);async['execute'](_0x3f41b9){const _0x2ca757=a55_0x2c1f74,{options:_0x4a610c,args:_0x532a3f,tdx:_0x92436b}=_0x3f41b9,_0x166673=_0x532a3f[0x0];if(!_0x166673)return console['error'](_0x2ca757(0x302)),0x1;const _0x57ecdf=_0x4a610c[_0x2ca757(0x27c)];_0x4a610c[_0x2ca757(0x1eb)]&&(console[_0x2ca757(0x262)](_0x2ca757(0x208)+_0x166673),_0x57ecdf&&console[_0x2ca757(0x262)](_0x2ca757(0x16e)));const _0xfb592f=await withSpinner(_0x2ca757(0x242),()=>_0x92436b[_0x2ca757(0x2b8)][_0x2ca757(0x19b)](_0x166673,_0x57ecdf||![]),{'verbose':_0x4a610c['verbose']}),_0xe663ba=_0xfb592f[_0x2ca757(0x209)];return console['error']('✔\x20Found\x20'+_0xe663ba['length']+'\x20task'+(_0xe663ba[_0x2ca757(0x1e8)]!==0x1?'s':'')),await handleSDKOutput(_0xe663ba,_0x4a610c),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x23d);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x1a7);async[a55_0x2c1f74(0x15f)](_0x55a973){const _0xb94547=a55_0x2c1f74,{options:_0x27f245,args:_0xf6896e,tdx:_0x2576c0}=_0x55a973,_0x18ecfb=_0xf6896e[0x0];let _0xbbaca4=_0xf6896e[0x1];if(!_0x18ecfb)return console['error'](_0xb94547(0x302)),0x1;_0x27f245[_0xb94547(0x1eb)]&&(console[_0xb94547(0x262)](_0xb94547(0x208)+_0x18ecfb),_0xbbaca4&&console[_0xb94547(0x262)]('Task\x20name:\x20'+_0xbbaca4));const _0x3bd45c=await withSpinner('Fetching\x20log\x20files...',()=>_0x2576c0['workflow'][_0xb94547(0x20f)](_0x18ecfb,_0xbbaca4),{'verbose':_0x27f245[_0xb94547(0x1eb)]}),_0x24dd71=_0x3bd45c[_0xb94547(0x209)];if(_0x24dd71['length']===0x0)return console['error'](_0xb94547(0x223)),0x0;if(!_0xbbaca4&&(_0x27f245[_0xb94547(0x219)]||_0x27f245[_0xb94547(0x1f7)]))return await handleSDKOutput(_0x24dd71,_0x27f245),0x0;if(!_0xbbaca4){const _0x509b44=_0x24dd71[_0xb94547(0x160)](_0x43112a=>({'title':_0x43112a[_0xb94547(0x18d)]+'\x20('+formatBytes(_0x43112a['fileSize'])+')','value':_0x43112a[_0xb94547(0x18d)]})),_0x518e32=await a55_0x281505({'type':'select','name':_0xb94547(0x2be),'message':_0xb94547(0x183),'choices':_0x509b44});if(!_0x518e32[_0xb94547(0x2be)])return console['error'](_0xb94547(0x179)),0x0;_0xbbaca4=_0x518e32['task'];}const _0x4beaa5=await withSpinner(_0xb94547(0x22e),()=>_0x2576c0['workflow'][_0xb94547(0x24d)](_0x18ecfb,_0xbbaca4),{'verbose':_0x27f245[_0xb94547(0x1eb)]}),_0x560128=_0x4beaa5[_0xb94547(0x209)];return _0x560128?console['log'](_0x560128):console[_0xb94547(0x262)](_0xb94547(0x1d8)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]='workflow:kill';[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x24c);async['execute'](_0x46f876){const _0x1d3773=a55_0x2c1f74,{options:_0x31eedf,args:_0xc1d2ce,tdx:_0x80d4e1}=_0x46f876,_0x5ccf42=_0xc1d2ce[0x0];if(!_0x5ccf42)return console[_0x1d3773(0x262)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x2fe63c=_0x31eedf[_0x1d3773(0x1e1)];_0x31eedf['verbose']&&(console[_0x1d3773(0x262)](_0x1d3773(0x208)+_0x5ccf42),_0x2fe63c&&console[_0x1d3773(0x262)](_0x1d3773(0x25a)+_0x2fe63c));if(!_0x31eedf['yes']){if(!isInteractive())return console[_0x1d3773(0x262)](a55_0x39f9f7[_0x1d3773(0x2c3)](_0x1d3773(0x21d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a55_0x39f9f7['dim'](_0x1d3773(0x28c))),0x1;const _0x70379=await confirmKey(_0x1d3773(0x2e3)+_0x5ccf42+'?');if(!_0x70379)return console[_0x1d3773(0x262)](a55_0x39f9f7['yellow'](_0x1d3773(0x179))),0x1;}const _0x5827e8=await withSpinner(_0x1d3773(0x255),()=>_0x80d4e1[_0x1d3773(0x2b8)][_0x1d3773(0x2de)](_0x5ccf42,_0x2fe63c),{'verbose':_0x31eedf[_0x1d3773(0x1eb)]}),_0x228a26=_0x5827e8[_0x1d3773(0x209)];return console['error']('✔\x20'+_0x228a26),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x1f8);['description']=a55_0x2c1f74(0x248);async['execute'](_0x3aeeb8){const _0x13d993=a55_0x2c1f74,{options:_0x13953d,args:_0x59b82f,tdx:_0x305eba}=_0x3aeeb8,_0x1a1395=_0x59b82f[0x0];if(!_0x1a1395)return console['error'](_0x13d993(0x23c)),console[_0x13d993(0x262)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x714fed=![],_0x3fdc7c=_0x1a1395;if(_0x1a1395[_0x13d993(0x1c3)]('session:'))_0x714fed=!![],_0x3fdc7c=_0x1a1395['substring'](0x8);else{if(_0x1a1395['startsWith']('attempt:'))_0x714fed=![],_0x3fdc7c=_0x1a1395[_0x13d993(0x26f)](0x8);else return console[_0x13d993(0x262)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x13d993(0x262)](_0x13d993(0x213)),0x1;}const _0x53da8e=_0x13953d['fromTask'],_0x443d7f=_0x13953d[_0x13d993(0x2c9)],_0x23c635=_0x13953d[_0x13d993(0x2b0)],_0x39503d=_0x13953d[_0x13d993(0x224)];_0x13953d[_0x13d993(0x1eb)]&&(console['error'](_0x13d993(0x2cd)+(_0x714fed?_0x13d993(0x293):_0x13d993(0x17c))+'\x20'+_0x3fdc7c),_0x53da8e&&console[_0x13d993(0x262)](_0x13d993(0x1f1)+_0x53da8e),_0x443d7f&&console['error']('Resume\x20from:\x20'+_0x443d7f),_0x23c635&&console[_0x13d993(0x262)](_0x13d993(0x1f2)+_0x23c635),_0x39503d&&console['error'](_0x13d993(0x2f7)));let _0x18f910;if(_0x23c635)try{if(_0x23c635[_0x13d993(0x1c3)]('@')){const _0x7ee6c=await import('fs/promises'),_0x2f3879=_0x23c635['substring'](0x1),_0x1bee1b=await _0x7ee6c['readFile'](_0x2f3879,_0x13d993(0x30c));_0x18f910=JSON['parse'](_0x1bee1b);}else _0x18f910=JSON[_0x13d993(0x2ec)](_0x23c635);}catch{return console['error'](_0x13d993(0x2aa)),0x1;}if(!_0x13953d['yes']){if(!isInteractive())return console[_0x13d993(0x262)](a55_0x39f9f7[_0x13d993(0x2c3)](_0x13d993(0x21d)),_0x13d993(0x308)),console[_0x13d993(0x262)](a55_0x39f9f7['dim'](_0x13d993(0x28c))),0x1;const _0x3e7198=await confirmKey(_0x13d993(0x145)+(_0x714fed?_0x13d993(0x293):'attempt')+'\x20'+_0x3fdc7c+'?');if(!_0x3e7198)return console[_0x13d993(0x262)](a55_0x39f9f7[_0x13d993(0x158)](_0x13d993(0x179))),0x1;}let _0x57eaa6;_0x714fed?_0x57eaa6=await withSpinner(_0x13d993(0x182),()=>_0x305eba[_0x13d993(0x2b8)][_0x13d993(0x233)](_0x3fdc7c,{'fromTask':_0x53da8e,'retryParams':_0x18f910}),{'verbose':_0x13953d[_0x13d993(0x1eb)]}):_0x57eaa6=await withSpinner(_0x13d993(0x281),()=>_0x305eba[_0x13d993(0x2b8)]['retryAttempt'](_0x3fdc7c,{'resumeFrom':_0x443d7f,'retryParams':_0x18f910,'force':_0x39503d}),{'verbose':_0x13953d[_0x13d993(0x1eb)]});const _0x43fe0c=_0x57eaa6[_0x13d993(0x209)];return console[_0x13d993(0x262)]('✔\x20Retry\x20started'),console[_0x13d993(0x262)](_0x13d993(0x23f)+_0x43fe0c[_0x13d993(0x250)]),console['error']('\x20\x20Session\x20ID:\x20'+_0x43fe0c['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x15e);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x1b8);async[a55_0x2c1f74(0x15f)](_0x48ba6b){const _0x5aa5ab=a55_0x2c1f74,{options:_0xbf39e2,args:_0x48ac84,tdx:_0x394559}=_0x48ba6b;let _0x7c4e09=_0x48ac84[0x0];if(!_0x7c4e09){const _0x35cb0c=this[_0x5aa5ab(0x25c)]([],_0xbf39e2),_0x4c4423=await withSpinner(_0x5aa5ab(0x249),()=>_0x394559[_0x5aa5ab(0x2b8)][_0x5aa5ab(0x2a1)](_0x35cb0c,{'limit':_0xbf39e2['limit']}),{'verbose':_0xbf39e2[_0x5aa5ab(0x1eb)]}),_0x1ec65a=_0x4c4423[_0x5aa5ab(0x209)];if(_0x1ec65a[_0x5aa5ab(0x1e8)]===0x0)return console[_0x5aa5ab(0x262)]('No\x20workflows\x20found'),!_0x35cb0c&&console[_0x5aa5ab(0x262)](a55_0x39f9f7[_0x5aa5ab(0x184)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x3d007b=_0x1ec65a[_0x5aa5ab(0x160)](_0x4cbacc=>({'title':_0x4cbacc[_0x5aa5ab(0x23a)]?.[_0x5aa5ab(0x1c2)]+'.'+_0x4cbacc['name'],'value':_0x4cbacc['project']?.['name']+'.'+_0x4cbacc[_0x5aa5ab(0x1c2)],'description':_0x4cbacc['revision']?_0x5aa5ab(0x197)+_0x4cbacc[_0x5aa5ab(0x173)]:undefined})),_0x9e47a=await a55_0x281505({'type':'select','name':'workflow','message':_0x5aa5ab(0x181),'choices':_0x3d007b});if(!_0x9e47a[_0x5aa5ab(0x2b8)])return 0x1;_0x7c4e09=_0x9e47a[_0x5aa5ab(0x2b8)];}if(!_0x7c4e09[_0x5aa5ab(0x231)]('.')){const _0x3110fd=this[_0x5aa5ab(0x25c)]([],_0xbf39e2);if(_0x3110fd)_0x7c4e09=_0x3110fd+'.'+_0x7c4e09;else return console[_0x5aa5ab(0x262)](a55_0x39f9f7[_0x5aa5ab(0x2c3)](_0x5aa5ab(0x1fc)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x5aa5ab(0x262)](a55_0x39f9f7[_0x5aa5ab(0x184)](_0x5aa5ab(0x27a))),0x1;}const _0x44e1d6=_0xbf39e2['param'],_0x2a41d3=_0xbf39e2[_0x5aa5ab(0x22a)],_0x20708f={};if(_0x44e1d6&&Array['isArray'](_0x44e1d6))for(const _0x2cdee9 of _0x44e1d6){const _0x4b3e3a=_0x2cdee9[_0x5aa5ab(0x22c)]('=');if(_0x4b3e3a===-0x1)return console[_0x5aa5ab(0x262)](_0x5aa5ab(0x19f)+_0x2cdee9),console[_0x5aa5ab(0x262)](_0x5aa5ab(0x1fb)),0x1;const _0x4f445b=_0x2cdee9[_0x5aa5ab(0x26f)](0x0,_0x4b3e3a),_0x15a96d=_0x2cdee9['substring'](_0x4b3e3a+0x1);try{_0x20708f[_0x4f445b]=JSON[_0x5aa5ab(0x2ec)](_0x15a96d);}catch{_0x20708f[_0x4f445b]=_0x15a96d;}}_0xbf39e2[_0x5aa5ab(0x1eb)]&&(console[_0x5aa5ab(0x262)]('Workflow:\x20'+_0x7c4e09),Object['keys'](_0x20708f)[_0x5aa5ab(0x1e8)]>0x0&&console[_0x5aa5ab(0x262)](_0x5aa5ab(0x14a)+JSON['stringify'](_0x20708f)),_0x2a41d3&&console[_0x5aa5ab(0x262)](_0x5aa5ab(0x180)+_0x2a41d3));if(_0xbf39e2['dryRun'])return await this[_0x5aa5ab(0x2bf)](_0x48ba6b,_0x7c4e09,_0x20708f,_0x2a41d3);const _0x1e1153=await withSpinner(_0x5aa5ab(0x2ee),()=>_0x394559['workflow'][_0x5aa5ab(0x13b)](_0x7c4e09,_0x20708f,{'sessionTime':_0x2a41d3}),{'verbose':_0xbf39e2['verbose']}),_0x4b4ffb=_0x1e1153['data'];console[_0x5aa5ab(0x262)]('✔\x20Workflow\x20run\x20started'),console[_0x5aa5ab(0x262)](_0x5aa5ab(0x2b6)+_0x4b4ffb['id']),console['error'](_0x5aa5ab(0x234)+_0x4b4ffb['sessionId']),console['error'](_0x5aa5ab(0x267)+_0x4b4ffb[_0x5aa5ab(0x23a)]?.[_0x5aa5ab(0x1c2)]),console[_0x5aa5ab(0x262)](_0x5aa5ab(0x1dc)+_0x4b4ffb[_0x5aa5ab(0x2b8)]?.['name']);if(_0x4b4ffb[_0x5aa5ab(0x23a)]?.['id']&&_0x4b4ffb[_0x5aa5ab(0x1de)]&&_0x4b4ffb['id']){const _0x3cf413=_0xbf39e2[_0x5aa5ab(0x1e6)],_0x558e32=getConsoleUrl(_0x3cf413,_0x5aa5ab(0x1ee)+_0x4b4ffb[_0x5aa5ab(0x23a)]['id']+_0x5aa5ab(0x222)+_0x4b4ffb[_0x5aa5ab(0x1de)]+_0x5aa5ab(0x169)+_0x4b4ffb['id']);console[_0x5aa5ab(0x262)](_0x5aa5ab(0x2a7)+a55_0x39f9f7[_0x5aa5ab(0x176)](_0x558e32));}return 0x0;}async[a55_0x2c1f74(0x2bf)](_0x41d85b,_0x423a3e,_0x4053df,_0x37c01d){const _0x3b3910=a55_0x2c1f74,{options:_0x4ce237,tdx:_0x127768}=_0x41d85b,_0x504a5c=await withSpinner('Fetching\x20workflow\x20'+_0x423a3e+_0x3b3910(0x29e),()=>_0x127768[_0x3b3910(0x2b8)][_0x3b3910(0x17a)](_0x423a3e),{'verbose':_0x4ce237[_0x3b3910(0x1eb)]}),_0x17e98c=_0x504a5c[_0x3b3910(0x209)],_0x3762ae=_0x37c01d??new Date()[_0x3b3910(0x28a)]();console['log'](a55_0x39f9f7['bold'](_0x3b3910(0x1d9)),_0x423a3e),console[_0x3b3910(0x2b2)](a55_0x39f9f7[_0x3b3910(0x2dc)](_0x3b3910(0x2f6)),_0x3762ae),console['log'](a55_0x39f9f7[_0x3b3910(0x2dc)](_0x3b3910(0x15a)),JSON[_0x3b3910(0x14e)](_0x4053df)),console['log'](''),console[_0x3b3910(0x2b2)](a55_0x39f9f7[_0x3b3910(0x2dc)](_0x3b3910(0x303)));const _0x3c904b=parseTaskGraph(_0x17e98c[_0x3b3910(0x264)]??null);if(_0x3c904b['length']===0x0)console[_0x3b3910(0x2b2)](a55_0x39f9f7[_0x3b3910(0x184)]('\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)'));else for(const _0x30d7b4 of formatTaskGraph(_0x3c904b)){console['log'](_0x30d7b4);}const _0xfd254c=summarizeTaskGraph(_0x3c904b),_0x2d8a15=formatWarningSummary(_0xfd254c);return _0x2d8a15&&(console[_0x3b3910(0x2b2)](''),console[_0x3b3910(0x2b2)](a55_0x39f9f7[_0x3b3910(0x158)](_0x2d8a15))),console[_0x3b3910(0x2b2)](a55_0x39f9f7[_0x3b3910(0x158)](_0x3b3910(0x261))),0x0;}}function a55_0x3083(){const _0x250236=['No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','\x20\x20Workflow:\x20','Deleting\x20secret...','sessionId','includeRetried','\x20tasks','reason','3uRdUye','Files\x20to\x20upload:\x20','\x0a✔\x20No\x20changes\x20to\x20push','workflow:secrets:list','site','start','length','isTTY','listSecrets','verbose','size','Listing\x20workflows...','/app/workflows/','columns','deleted','From\x20task:\x20','Params:\x20','isDirectory','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','icon','Error:\x20','format','workflow:retry','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','(unknown)','Expected\x20format:\x20--param\x20key=value','Error:','limit','Failed\x20to\x20fetch\x20attempt\x20data','\x0a✔\x20Attempt\x20complete','executeCloneProject','has','list','repeat','Updating\x20','⚠\x20Showing\x20first\x20','workflow:tasks','💡\x20Tip:\x20Use\x20','Attempt\x20ID:\x20','data','Secrets\x20to\x20set:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','finishedAt','workflow:schedule:disable','Revision:\x20','logFiles','Analyzing\x20changes...','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Latest\x20session\x20has\x20no\x20attempt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','relative','attempts','No\x20sessions\x20found\x20for:\x20','\x20\x20Location:\x20','LABEL_WIDTH_DIVISOR','json','unchanged','✔\x20Project\x20updated','Key:\x20','\x0aError:',',\x20Workflow:\x20','session_id','round','MAX_LABEL_COUNT','/sessions/','No\x20log\x20files\x20found\x20for\x20this\x20attempt','force','5615584wOAJMQ','title','\x20\x20Next\x20run:\x20','\x27...','Key\x20cannot\x20be\x20empty','sessionTime','Auto-selected\x20latest\x20session:\x20','indexOf','Loading\x20sessions...','Downloading\x20logs...','Enable\x20a\x20workflow\x20schedule','MIN_LABEL_COUNT','includes','workflow:schedule:enable','retrySession','\x20\x20Session\x20ID:\x20','No\x20workflows\x20found\x20in\x20project:\x20','\x20logs','Error:\x20Secret\x20key\x20is\x20required','targetExists','\x20new','project','110hyYWGF','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow:logs','preparePushProject','\x20\x20New\x20attempt\x20ID:\x20','Include\x20retried:\x20yes','16312jKYBzl','Getting\x20attempt\x20tasks...','follow','\x22\x20already\x20exists\x20(ID:\x20','97JhBTLi','Using\x20attempt\x20','workflow:projects','Retry\x20a\x20session\x20or\x20attempt','Loading\x20workflows...','every','updatedAt','Kill\x20a\x20running\x20attempt','logs','\x0aPush\x20these\x20changes?','\x20\x20Target:\x20','attemptId','New\x20project\x20name:\x20','No\x20schedules\x20found','Dry\x20run:\x20yes','getMonth','Killing\x20attempt...','No\x20sessions\x20found\x20in\x20project:\x20','write','\x20is\x20not\x20a\x20directory','message','Reason:\x20','hasChanges','resolveProject','floor','List\x20workflow\x20schedules','Show\x20specific\x20attempt\x20details','Disable\x20a\x20workflow\x20schedule','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','error','MAX_TASKS_DISPLAY','config','\x0aDry\x20run\x20-\x20nothing\x20pushed','match','\x20\x20Project:\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Listing\x20workflow\x20sessions...','→\x20New\x20project:\x20','metadata','listSchedules','No\x20attempts\x20found','diff','substring','getHours','\x20to\x20see\x20detailed\x20logs','group_error','Session\x20not\x20found:\x20','workflow:attempt','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','max','\x20(use\x20--limit\x20to\x20show\x20more)','List\x20workflow\x20execution\x20sessions','List\x20workflows','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','includeSubtasks','some','Project\x20directory:\x20','end','Show\x20tasks\x20for\x20an\x20attempt','Retrying\x20attempt...','trim','rows','\x20\x20Session\x20context\x20set\x20to:\x20','No\x20workflow\x20projects\x20found','context','Project\x20name\x20is\x20required','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','generateSessionTimelineRows','toISOString','\x20secrets...','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','new','sourceProjectName','workflow:sessions','\x20disabled\x20(','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','toLocaleString','session','enableSchedule','window','workflow:secrets:set','done','state','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','getTime','lastAttempt','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','\x20\x20Changes:\x20','...','LABEL_MIN_SPACING','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','workflows','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Loading\x20session...','parseProjectWorkflowPattern','\x20\x20Revision:\x20','✔\x20Pull\x20complete','\x20\x20Console:\x20','modified','-\x20no\x20files\x20written','Error:\x20Invalid\x20JSON\x20in\x20--params','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','tdx\x20wf\x20attempt\x20','\x20\x20Project\x20ID:\x20','fullName','sessions','params','Filter:\x20','log','\x20deleted','📋\x20','white','\x20\x20Attempt\x20ID:\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','workflow','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','✔\x20Showing\x20','✔\x20Secret\x20\x27','No\x20matching\x20sessions\x20found','resolveProjectDir','task','executeDryRun','workflow:use','navigateSessionsInteractive','Usage:\x20workflow:delete\x20<project-name-or-id>','red','workflowProject','canceling','skipValidation','\x20\x20Source:\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','resumeFrom','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','find','ICON_WIDTH','Target:\x20','pollTimeline','\x0a✔\x20Already\x20up\x20to\x20date','Target\x20directory:\x20','Project\x20name:\x20','description','autocomplete','Tip:\x20cd\x20to\x20workflows/','Resolving\x20project\x20\x27','\x27\x20from\x20project\x20\x27','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x20modified','blue','\x20schedule','output','bold','filter','kill','targetDir','buildTimelineData','Output\x20directory:\x20','startTime','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','No\x20projects\x20match\x20pattern:\x20','Source\x20project:\x20','trimEnd','fill','\x0aClone\x20\x22','Attempt:\x20','\x20next:\x20','sort','parse','prepareCloneProject','Starting\x20workflow\x20run...','Session\x20','stat','Pushing\x20project...','green','clear','List\x20all\x20workflow\x20projects','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Session\x20time:','Force:\x20yes','cwd','getDate','createdAt','Error:\x20Project\x20name\x20is\x20required','cancelRequested','keys','workflow:timeline','workflow:attempts','get','List\x20workflow\x20attempts','Error:\x20Attempt\x20ID\x20is\x20required','Task\x20graph:','planned','now','Analyzing\x20project...','workflowName','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','65KJFVUo','renderSingleTimeline','retryAttemptName','utf-8','run','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','\x0aFailed\x20to\x20fetch\x20attempt\x20data','\x20-\x20','69882fTjIlu','summary','No\x20attempts\x20found\x20for:\x20','MAX_TIMELINE_WIDTH','\x20unchanged','Pulling\x20project\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','value','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','applyPullProject','✔\x20Found\x20','Parameters:\x20','push','\x20secrets\x20set\x20for\x20project\x20\x27','running','stringify','📅\x20#','index','Enabling\x20schedule\x20#','type','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','deleteSecret','min','pending','No\x20sessions\x20found','yellow','workflow:delete','Parameters:','unknown','table','workflow:download','workflow:run','execute','map','workflow:upload','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','showWorkflowConsoleUrl','Project\x20filter:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','getFullYear','stdout','dryRun','/attempt/','split','sourceDir','\x22?\x20This\x20cannot\x20be\x20undone.','nextRunTime','Including\x20subtasks:\x20yes','3575128JOeHoW','filesExtracted','path','Listing\x20secrets...','revision','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20(system)','cyan','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','Cancelled','getWorkflow','delete','attempt','replace','yes','(use\x20--limit\x20to\x20see\x20more)','Session\x20time:\x20','Select\x20a\x20workflow\x20to\x20run','Retrying\x20session...','Select\x20a\x20task\x20to\x20view\x20logs:','dim','\x0aApply\x20these\x20changes?','Project:\x20','startedAt','changes','Filter:\x20project=','msPerChar','join','\x0aDry\x20run\x20-\x20no\x20files\x20written','taskName','resolve','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','values','MIN_TIMELINE_WIDTH','✔\x20Schedule\x20#','getMinutes','---\x20','\x22\x20to\x20new\x20project\x20\x22','revision:\x20','executePushProject','Disabling\x20schedule\x20#','disabledAt','tasks','\x0aDry\x20run\x20-\x20no\x20project\x20created','projectId','toLowerCase','Error:\x20Invalid\x20parameter\x20format:\x20','set','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','status','🔄\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','jsonl','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20from\x20session\x20','workflow:schedules','\x22\x20with\x20new\x20revision?','\x20\x20Files\x20extracted:\x20','padStart','total','\x20attempt','6733916zDlchB','success','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20workflow','\x20of\x20','\x20(disabled)','projectName','duration','5616314hPifDz','Start\x20a\x20workflow\x20run','GUTTER','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','workflow:push','13807233cRwipn','renderSessionsTimeline','Pushing\x20workflow\x20project...','Schedule\x20ID\x20is\x20required','Writing\x20files...','✔\x20Project:\x20','name','startsWith','Warning:','\x20sessions\x20','newProjectName','requireProject','workflow:secrets:delete','Source:\x20','renderTimeline','✔\x20Downloaded\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','✔\x20Workflow\x20project\x20context\x20cleared.','No\x20attempts\x20found\x20in\x20project:\x20','Source\x20directory:\x20','Validation:\x20skipped','workflow:workflows','\x0a⚠\x20Project\x20\x22','ICON_SPACING','slice','\x0aUpdate\x20existing\x20project\x20\x22','\x1b[1A\x1b[2K','localeCompare','No\x20log\x20content\x20found','Workflow:','resolveProjectId'];a55_0x3083=function(){return _0x250236;};return a55_0x3083();}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x15d);['description']=a55_0x2c1f74(0x1a1);async[a55_0x2c1f74(0x15f)](_0x2efaf7){const _0x264d78=a55_0x2c1f74,{options:_0x263eb6,args:_0x17f10d,tdx:_0x5cc6cf}=_0x2efaf7,_0x25a99c=_0x17f10d[0x0],_0x41b253=_0x17f10d[0x1]||'.';if(!_0x25a99c)return console['error'](_0x264d78(0x2fb)),console[_0x264d78(0x262)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x5f39a1=_0x263eb6[_0x264d78(0x173)];_0x263eb6[_0x264d78(0x1eb)]&&(console[_0x264d78(0x262)](_0x264d78(0x186)+_0x25a99c),console['error'](_0x264d78(0x2e1)+_0x41b253),_0x5f39a1&&console[_0x264d78(0x262)](_0x264d78(0x20e)+_0x5f39a1));const _0x408aa=await withSpinner('Downloading\x20project\x20'+_0x25a99c+_0x264d78(0x29e),()=>_0x5cc6cf[_0x264d78(0x2b8)]['download'](_0x25a99c,_0x41b253,{'revision':_0x5f39a1}),{'verbose':_0x263eb6[_0x264d78(0x1eb)]}),_0x23f35f=_0x408aa[_0x264d78(0x209)];return console[_0x264d78(0x262)](_0x264d78(0x1cb)+_0x23f35f[_0x264d78(0x1b5)]),console[_0x264d78(0x262)](_0x264d78(0x2a5)+_0x23f35f[_0x264d78(0x173)]),console[_0x264d78(0x262)](_0x264d78(0x1ab)+_0x23f35f[_0x264d78(0x170)]),console[_0x264d78(0x262)](_0x264d78(0x217)+_0x41b253+'/'+_0x23f35f[_0x264d78(0x1b5)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x161);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x178);async[a55_0x2c1f74(0x15f)](_0x3d3946){const _0x3fd1b3=a55_0x2c1f74,{options:_0x6f6ddf,args:_0x3bf1e4,tdx:_0x36a4a5}=_0x3d3946;let _0x302a0c='.',_0x2b8594=_0x6f6ddf[_0x3fd1b3(0x1c2)];if(_0x3bf1e4[0x0]){const {promises:_0x187b59}=await import('fs');try{const _0x4bcc18=await _0x187b59[_0x3fd1b3(0x2f0)](_0x3bf1e4[0x0]);if(_0x4bcc18[_0x3fd1b3(0x1f3)]())_0x302a0c=_0x3bf1e4[0x0];else return console['error'](_0x3fd1b3(0x1f6)+_0x3bf1e4[0x0]+_0x3fd1b3(0x258)),0x1;}catch{_0x2b8594=_0x3bf1e4[0x0],_0x302a0c='.';}}const _0x166276=_0x6f6ddf[_0x3fd1b3(0x173)],_0x4aa788=_0x6f6ddf[_0x3fd1b3(0x2c6)];_0x6f6ddf[_0x3fd1b3(0x1eb)]&&(console[_0x3fd1b3(0x262)](_0x3fd1b3(0x27e)+_0x302a0c),_0x2b8594&&console['error'](_0x3fd1b3(0x2d1)+_0x2b8594),_0x166276&&console['error'](_0x3fd1b3(0x20e)+_0x166276),_0x4aa788&&console['error'](_0x3fd1b3(0x1d0)));const _0x3beda0=await withSpinner(_0x3fd1b3(0x1be),()=>_0x36a4a5[_0x3fd1b3(0x2b8)]['push'](_0x302a0c,{'projectName':_0x2b8594,'revision':_0x166276,'skipValidation':_0x4aa788}),{'verbose':_0x6f6ddf['verbose']}),_0x5ca4dd=_0x3beda0[_0x3fd1b3(0x209)];return console[_0x3fd1b3(0x262)]('✔\x20Pushed\x20'+_0x5ca4dd[_0x3fd1b3(0x1b5)]),console[_0x3fd1b3(0x262)](_0x3fd1b3(0x2ad)+_0x5ca4dd[_0x3fd1b3(0x19d)]),console[_0x3fd1b3(0x262)](_0x3fd1b3(0x2a5)+_0x5ca4dd[_0x3fd1b3(0x173)]),await this[_0x3fd1b3(0x163)](_0x36a4a5,_0x5ca4dd['projectName'],_0x6f6ddf[_0x3fd1b3(0x1e6)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]='workflow:pull';['description']='Pull\x20workflow\x20project\x20to\x20local\x20folder';async['execute'](_0x21b40e){const _0x36acac=a55_0x2c1f74,{options:_0x4c562f,args:_0x43f4d2,tdx:_0x11b567}=_0x21b40e,_0x545183=_0x43f4d2[0x0],_0x1fe03c=_0x43f4d2[0x1];if(!_0x545183)return console[_0x36acac(0x262)](a55_0x39f9f7['red'](_0x36acac(0x1fc)),_0x36acac(0x287)),console[_0x36acac(0x262)](a55_0x39f9f7[_0x36acac(0x184)](_0x36acac(0x1a5))),0x1;const _0x51fd83=_0x4c562f['revision'];_0x4c562f[_0x36acac(0x1eb)]&&(console[_0x36acac(0x262)](_0x36acac(0x186)+_0x545183),_0x1fe03c&&console[_0x36acac(0x262)](_0x36acac(0x2d0)+_0x1fe03c),_0x51fd83&&console[_0x36acac(0x262)](_0x36acac(0x20e)+_0x51fd83),_0x4c562f[_0x36acac(0x168)]&&console['error'](_0x36acac(0x253)));const _0x5d0da0=await withSpinner(_0x36acac(0x144)+_0x545183+'...',()=>_0x11b567[_0x36acac(0x2b8)]['pullProject'](_0x545183,{'targetDir':_0x1fe03c,'revision':_0x51fd83}),{'verbose':_0x4c562f[_0x36acac(0x1eb)]}),_0x2e4aa2=_0x5d0da0['data'];_0x2e4aa2['isNewProject']?console[_0x36acac(0x262)](_0x36acac(0x26a)+_0x2e4aa2[_0x36acac(0x1b5)]):console[_0x36acac(0x262)]('→\x20Project:\x20'+_0x2e4aa2[_0x36acac(0x1b5)]);console[_0x36acac(0x262)](_0x36acac(0x2a5)+_0x2e4aa2[_0x36acac(0x173)]),console['error'](_0x36acac(0x24f)+(a55_0x352ae9[_0x36acac(0x214)](process[_0x36acac(0x2f8)](),_0x2e4aa2[_0x36acac(0x2df)])||'.')),console[_0x36acac(0x262)](_0x36acac(0x29d)+a55_0x39f9f7[_0x36acac(0x2f2)]('+'+_0x2e4aa2[_0x36acac(0x140)][_0x36acac(0x28d)]+_0x36acac(0x239))+',\x20'+(a55_0x39f9f7[_0x36acac(0x158)]('~'+_0x2e4aa2['summary'][_0x36acac(0x2a8)]+'\x20modified')+',\x20')+(a55_0x39f9f7['red']('-'+_0x2e4aa2['summary'][_0x36acac(0x1f0)]+_0x36acac(0x2b3))+',\x20')+(''+a55_0x39f9f7['dim'](_0x2e4aa2[_0x36acac(0x140)][_0x36acac(0x21a)]+'\x20unchanged')));for(const _0x18a71f of _0x2e4aa2['changes']){_0x18a71f[_0x36acac(0x152)]===_0x36acac(0x2a8)&&_0x18a71f[_0x36acac(0x26e)]&&(console[_0x36acac(0x262)]('\x0a'+a55_0x39f9f7[_0x36acac(0x176)](_0x36acac(0x195)+_0x18a71f['path'])),console['error'](_0x18a71f[_0x36acac(0x26e)]));}if(!_0x2e4aa2['hasChanges'])return saveSessionContext({'workflow_project':_0x2e4aa2['projectName']},_0x4c562f[_0x36acac(0x293)]),console[_0x36acac(0x262)](a55_0x39f9f7[_0x36acac(0x2f2)](_0x36acac(0x2cf))),console[_0x36acac(0x262)](a55_0x39f9f7[_0x36acac(0x184)](_0x36acac(0x284)+_0x2e4aa2[_0x36acac(0x1b5)])),0x0;if(_0x4c562f[_0x36acac(0x168)])return console[_0x36acac(0x262)](a55_0x39f9f7[_0x36acac(0x158)](_0x36acac(0x18c))),0x0;if(!_0x4c562f['yes']){if(!isInteractive())return console[_0x36acac(0x262)](a55_0x39f9f7['red'](_0x36acac(0x21d)),_0x36acac(0x308)),console[_0x36acac(0x262)](a55_0x39f9f7['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3f6ed0=await confirmKey(_0x36acac(0x185));if(!_0x3f6ed0)return console['error'](a55_0x39f9f7['yellow']('Cancelled'),_0x36acac(0x2a9)),0x1;}await withSpinner(_0x36acac(0x1c0),()=>_0x11b567[_0x36acac(0x2b8)][_0x36acac(0x148)](_0x2e4aa2,{'revision':_0x51fd83}),{'verbose':_0x4c562f[_0x36acac(0x1eb)]}),saveSessionContext({'workflow_project':_0x2e4aa2[_0x36acac(0x1b5)]},_0x4c562f[_0x36acac(0x293)]),console[_0x36acac(0x262)](a55_0x39f9f7['green'](_0x36acac(0x2a6)));const _0x145576=a55_0x352ae9[_0x36acac(0x214)](process['cwd'](),_0x2e4aa2[_0x36acac(0x2df)])||'.';return console['error'](a55_0x39f9f7[_0x36acac(0x184)](_0x36acac(0x217)+_0x145576)),console[_0x36acac(0x262)](a55_0x39f9f7[_0x36acac(0x184)](_0x36acac(0x284)+_0x2e4aa2[_0x36acac(0x1b5)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x1bb);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x1ba);async['execute'](_0x3b2e09){const _0xffc2fb=a55_0x2c1f74,{options:_0xf532f3,args:_0x1938fa,tdx:_0x2b1828}=_0x3b2e09,_0x574997=this[_0xffc2fb(0x2bd)](_0x1938fa,_0xf532f3),_0x263279=_0xf532f3[_0xffc2fb(0x173)],_0x482407=_0xf532f3[_0xffc2fb(0x2c6)];_0xf532f3[_0xffc2fb(0x1eb)]&&(_0x574997&&console['error'](_0xffc2fb(0x1cf)+_0x574997),_0x263279&&console[_0xffc2fb(0x262)]('Revision:\x20'+_0x263279),_0xf532f3[_0xffc2fb(0x168)]&&console[_0xffc2fb(0x262)](_0xffc2fb(0x253)),_0x482407&&console[_0xffc2fb(0x262)](_0xffc2fb(0x1d0)));let _0x2b4a8b;try{_0x2b4a8b=await withSpinner(_0xffc2fb(0x210),()=>_0x2b1828['workflow'][_0xffc2fb(0x23e)]({'sourceDir':_0x574997,'revision':_0x263279,'skipValidation':_0x482407}),{'verbose':_0xf532f3[_0xffc2fb(0x1eb)]});}catch(_0x42b60c){if(_0x42b60c instanceof Error&&_0x42b60c[_0xffc2fb(0x259)]['includes']('No\x20workflow\x20tdx.json\x20found'))return console[_0xffc2fb(0x262)](a55_0x39f9f7['red']('Error:'),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0xf532f3[_0xffc2fb(0x2c4)]?console['error'](a55_0x39f9f7[_0xffc2fb(0x184)](_0xffc2fb(0x2d4)+_0xf532f3['workflowProject']+_0xffc2fb(0x268)+_0xf532f3[_0xffc2fb(0x2c4)]+'\x27')):console[_0xffc2fb(0x262)](a55_0x39f9f7[_0xffc2fb(0x184)](_0xffc2fb(0x2ca))),0x1;throw _0x42b60c;}const _0x303168=_0x2b4a8b[_0xffc2fb(0x209)];console[_0xffc2fb(0x262)](_0xffc2fb(0x1c1)+_0x303168[_0xffc2fb(0x1b5)]),console['error'](_0xffc2fb(0x2c7)+_0x303168[_0xffc2fb(0x16b)]),console[_0xffc2fb(0x262)](_0xffc2fb(0x2a5)+_0x303168[_0xffc2fb(0x173)]),console[_0xffc2fb(0x262)](_0xffc2fb(0x29d)+a55_0x39f9f7['green']('+'+_0x303168['summary'][_0xffc2fb(0x28d)]+_0xffc2fb(0x239))+',\x20'+(a55_0x39f9f7['yellow']('~'+_0x303168[_0xffc2fb(0x140)][_0xffc2fb(0x2a8)]+_0xffc2fb(0x2d8))+',\x20')+(a55_0x39f9f7['red']('-'+_0x303168[_0xffc2fb(0x140)]['deleted']+_0xffc2fb(0x2b3))+',\x20')+(''+a55_0x39f9f7[_0xffc2fb(0x184)](_0x303168[_0xffc2fb(0x140)][_0xffc2fb(0x21a)]+_0xffc2fb(0x143))));for(const _0x2a262e of _0x303168[_0xffc2fb(0x188)]){_0x2a262e[_0xffc2fb(0x152)]==='modified'&&_0x2a262e['diff']&&(console[_0xffc2fb(0x262)]('\x0a'+a55_0x39f9f7[_0xffc2fb(0x176)](_0xffc2fb(0x195)+_0x2a262e[_0xffc2fb(0x171)])),console[_0xffc2fb(0x262)](_0x2a262e[_0xffc2fb(0x26e)]));}if(!_0x303168[_0xffc2fb(0x25b)])return console[_0xffc2fb(0x262)](a55_0x39f9f7[_0xffc2fb(0x2f2)](_0xffc2fb(0x1e4))),await this[_0xffc2fb(0x163)](_0x2b1828,_0x303168[_0xffc2fb(0x1b5)],_0xf532f3[_0xffc2fb(0x1e6)]),0x0;if(_0xf532f3[_0xffc2fb(0x168)])return console[_0xffc2fb(0x262)](a55_0x39f9f7[_0xffc2fb(0x158)](_0xffc2fb(0x265))),0x0;if(!_0xf532f3[_0xffc2fb(0x17e)]){if(!isInteractive())return console[_0xffc2fb(0x262)](a55_0x39f9f7[_0xffc2fb(0x2c3)](_0xffc2fb(0x21d)),_0xffc2fb(0x308)),console[_0xffc2fb(0x262)](a55_0x39f9f7[_0xffc2fb(0x184)](_0xffc2fb(0x28c))),0x1;const _0x2c5ec4=await confirmKey(_0xffc2fb(0x24e));if(!_0x2c5ec4)return console[_0xffc2fb(0x262)](a55_0x39f9f7[_0xffc2fb(0x158)](_0xffc2fb(0x179)),'-\x20nothing\x20pushed'),0x1;}const _0x3b7d60=await withSpinner(_0xffc2fb(0x2f1),()=>_0x2b1828[_0xffc2fb(0x2b8)][_0xffc2fb(0x198)](_0x303168),{'verbose':_0xf532f3[_0xffc2fb(0x1eb)]}),_0x4b6ede=_0x3b7d60[_0xffc2fb(0x209)];return console[_0xffc2fb(0x262)](a55_0x39f9f7[_0xffc2fb(0x2f2)]('✔\x20Push\x20complete')),console['error'](_0xffc2fb(0x2ad)+_0x4b6ede['projectId']),console[_0xffc2fb(0x262)]('\x20\x20Revision:\x20'+_0x4b6ede[_0xffc2fb(0x173)]),await this['showWorkflowConsoleUrl'](_0x2b1828,_0x4b6ede[_0xffc2fb(0x1b5)],_0xf532f3[_0xffc2fb(0x1e6)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]='workflow:clone';[a55_0x2c1f74(0x2d2)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a55_0x2c1f74(0x15f)](_0x255897){const _0x498a00=a55_0x2c1f74,{options:_0x313e1e,args:_0x49e2e9,tdx:_0xe44e11}=_0x255897,_0x2f4fea=this[_0x498a00(0x2bd)](_0x49e2e9,_0x313e1e),_0x5e1657=_0x313e1e['name'],_0x57a628=_0x313e1e[_0x498a00(0x173)],_0x85a098=_0x313e1e[_0x498a00(0x2c6)];if(!_0x2f4fea)return console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x2c3)](_0x498a00(0x1fc)),'Source\x20directory\x20is\x20required'),console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x184)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x184)](_0x498a00(0x291))),0x1;if(!_0x5e1657)return console[_0x498a00(0x262)](a55_0x39f9f7['red']('Error:'),_0x498a00(0x190)),console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x184)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x313e1e[_0x498a00(0x1eb)]&&(console['error']('Source\x20directory:\x20'+_0x2f4fea),console[_0x498a00(0x262)](_0x498a00(0x251)+_0x5e1657),_0x57a628&&console[_0x498a00(0x262)](_0x498a00(0x20e)+_0x57a628),_0x313e1e[_0x498a00(0x168)]&&console[_0x498a00(0x262)](_0x498a00(0x253)),_0x85a098&&console[_0x498a00(0x262)](_0x498a00(0x1d0)));const _0x3b8df0=await withSpinner(_0x498a00(0x306),()=>_0xe44e11[_0x498a00(0x2b8)][_0x498a00(0x2ed)](_0x2f4fea,_0x5e1657,{'revision':_0x57a628,'skipValidation':_0x85a098}),{'verbose':_0x313e1e[_0x498a00(0x1eb)]}),_0x5907d8=_0x3b8df0[_0x498a00(0x209)];console[_0x498a00(0x262)](_0x498a00(0x1c9)+_0x5907d8[_0x498a00(0x16b)]);_0x5907d8[_0x498a00(0x28e)]&&console[_0x498a00(0x262)](_0x498a00(0x2e5)+_0x5907d8[_0x498a00(0x28e)]);console[_0x498a00(0x262)]('New\x20project\x20name:\x20'+_0x5907d8[_0x498a00(0x1c6)]),console[_0x498a00(0x262)](_0x498a00(0x20e)+_0x5907d8[_0x498a00(0x173)]),console['error'](_0x498a00(0x1e3)+_0x5907d8['fileCount']);_0x5907d8['targetExists']&&(console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x158)](_0x498a00(0x1d2)+_0x5907d8[_0x498a00(0x1c6)]+_0x498a00(0x244)+_0x5907d8['existingProjectId']+')')),console['error'](a55_0x39f9f7[_0x498a00(0x158)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x313e1e[_0x498a00(0x168)])return console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x158)](_0x498a00(0x19c))),0x0;if(!_0x313e1e[_0x498a00(0x17e)]){if(!isInteractive())return console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x2c3)](_0x498a00(0x21d)),_0x498a00(0x308)),console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x184)](_0x498a00(0x28c))),0x1;const _0x5ebecf=_0x5907d8['sourceProjectName']||a55_0x352ae9['basename'](_0x2f4fea),_0x57fc19=_0x5907d8[_0x498a00(0x238)]?_0x498a00(0x1d5)+_0x5e1657+_0x498a00(0x1aa):_0x498a00(0x2e8)+_0x5ebecf+_0x498a00(0x196)+_0x5e1657+'\x22?',_0x11a5f7=await confirmKey(_0x57fc19);if(!_0x11a5f7)return console[_0x498a00(0x262)](a55_0x39f9f7[_0x498a00(0x158)](_0x498a00(0x179))),0x1;}const _0x56fe31=await withSpinner(_0x5907d8[_0x498a00(0x238)]?_0x498a00(0x204)+_0x5e1657+_0x498a00(0x29e):'Cloning\x20to\x20'+_0x5e1657+_0x498a00(0x29e),()=>_0xe44e11[_0x498a00(0x2b8)][_0x498a00(0x200)](_0x5907d8),{'verbose':_0x313e1e[_0x498a00(0x1eb)]}),_0x1f5dd4=_0x56fe31['data'];return console[_0x498a00(0x262)](a55_0x39f9f7['green'](_0x5907d8['targetExists']?_0x498a00(0x21b):'✔\x20Clone\x20complete')),console[_0x498a00(0x262)](_0x498a00(0x267)+_0x1f5dd4[_0x498a00(0x1c6)]),console['error'](_0x498a00(0x2ad)+_0x1f5dd4['newProjectId']),console[_0x498a00(0x262)](_0x498a00(0x2a5)+_0x1f5dd4['revision']),await this[_0x498a00(0x163)](_0xe44e11,_0x1f5dd4[_0x498a00(0x1c6)],_0x313e1e[_0x498a00(0x1e6)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a55_0x2c1f74(0x159);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x13c);async[a55_0x2c1f74(0x15f)](_0x3fcb1c){const _0x35abcb=a55_0x2c1f74,{options:_0x4147ca,args:_0x1dc730,tdx:_0x89a6e9}=_0x3fcb1c,_0x1e26b2=_0x1dc730[0x0];if(!_0x1e26b2)return console[_0x35abcb(0x262)](_0x35abcb(0x2ab)),console[_0x35abcb(0x262)](_0x35abcb(0x2c2)),0x1;_0x4147ca[_0x35abcb(0x1eb)]&&console[_0x35abcb(0x262)](_0x35abcb(0x186)+_0x1e26b2);if(!_0x4147ca[_0x35abcb(0x17e)]){if(!isInteractive())return console['error'](a55_0x39f9f7[_0x35abcb(0x2c3)](_0x35abcb(0x21d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x35abcb(0x262)](a55_0x39f9f7[_0x35abcb(0x184)](_0x35abcb(0x28c))),0x1;const _0xeb15c1=await confirmKey(_0x35abcb(0x299)+_0x1e26b2+_0x35abcb(0x16c));if(!_0xeb15c1)return console[_0x35abcb(0x262)](a55_0x39f9f7[_0x35abcb(0x158)]('Cancelled')),0x1;}const _0x5a8fec=await withSpinner('Deleting\x20project\x20'+_0x1e26b2+_0x35abcb(0x29e),()=>_0x89a6e9[_0x35abcb(0x2b8)][_0x35abcb(0x17b)](_0x1e26b2),{'verbose':_0x4147ca[_0x35abcb(0x1eb)]}),_0x49f19e=_0x5a8fec['data'];return console[_0x35abcb(0x262)]('✔\x20Deleted\x20project\x20'+_0x49f19e[_0x35abcb(0x1b5)]),console[_0x35abcb(0x262)](_0x35abcb(0x2ad)+_0x49f19e[_0x35abcb(0x19d)]),0x0;}}export function parseKeyValue(_0x4ea29b){const _0x2d37d9=a55_0x2c1f74,_0x12a80b=_0x4ea29b[_0x2d37d9(0x22c)]('=');if(_0x12a80b===-0x1)throw new Error('Invalid\x20format:\x20'+_0x4ea29b+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x580c39=_0x4ea29b['substring'](0x0,_0x12a80b),_0x1f661b=_0x4ea29b[_0x2d37d9(0x26f)](_0x12a80b+0x1);if(!_0x580c39)throw new Error(_0x2d37d9(0x229));return{'key':_0x580c39,'value':_0x1f661b};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x1e5);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x162);async[a55_0x2c1f74(0x15f)](_0x5d6543){const _0x317ba5=a55_0x2c1f74,{options:_0x527e7e,args:_0x2900ee,tdx:_0xd63c7a}=_0x5d6543,_0xfbf7b1=this['requireProject'](_0x2900ee,_0x527e7e);if(!_0xfbf7b1)return 0x1;_0x527e7e[_0x317ba5(0x1eb)]&&console[_0x317ba5(0x262)](_0x317ba5(0x186)+_0xfbf7b1);const _0x406821=await withSpinner(_0x317ba5(0x172),()=>_0xd63c7a[_0x317ba5(0x2b8)][_0x317ba5(0x1ea)](_0xfbf7b1),{'verbose':_0x527e7e[_0x317ba5(0x1eb)]}),{secrets:_0xa24650}=_0x406821[_0x317ba5(0x209)];return console['error'](_0x317ba5(0x149)+_0xa24650[_0x317ba5(0x1e8)]+'\x20secret'+(_0xa24650['length']!==0x1?'s':'')),await handleSDKOutput(_0xa24650,_0x527e7e),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x296);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x288);async[a55_0x2c1f74(0x15f)](_0xcc3274){const _0x2cf4c0=a55_0x2c1f74,{options:_0x32fb3f,args:_0xd80524,tdx:_0x47e007}=_0xcc3274;let _0x24aecb,_0x327987;if(_0xd80524[_0x2cf4c0(0x1e8)]>=0x1&&!_0xd80524[0x0][_0x2cf4c0(0x231)]('='))_0x24aecb=_0xd80524[0x0],_0x327987=_0xd80524['slice'](0x1);else{if(_0xd80524[_0x2cf4c0(0x1e8)]>=0x1&&_0x32fb3f[_0x2cf4c0(0x2c4)])_0x24aecb=_0x32fb3f['workflowProject'],_0x327987=_0xd80524;else return _0xd80524['length']>=0x1?(console[_0x2cf4c0(0x262)](_0x2cf4c0(0x2fb)),console[_0x2cf4c0(0x262)](_0x2cf4c0(0x27a)),0x1):(console[_0x2cf4c0(0x262)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console['error'](_0x2cf4c0(0x1f4)),0x1);}if(_0x327987[_0x2cf4c0(0x1e8)]===0x0)return console[_0x2cf4c0(0x262)](_0x2cf4c0(0x2b7)),console[_0x2cf4c0(0x262)](_0x2cf4c0(0x1f4)),0x1;const _0x2ff782={};try{for(const _0x43ffe8 of _0x327987){const {key:_0x5212e5,value:_0x1d475a}=parseKeyValue(_0x43ffe8);_0x2ff782[_0x5212e5]=_0x1d475a;}}catch(_0x47ff71){return _0x47ff71 instanceof Error&&console[_0x2cf4c0(0x262)](a55_0x39f9f7[_0x2cf4c0(0x2c3)](_0x2cf4c0(0x1fc)),_0x47ff71[_0x2cf4c0(0x259)]),0x1;}const _0x24f54b=Object[_0x2cf4c0(0x2fd)](_0x2ff782);_0x32fb3f[_0x2cf4c0(0x1eb)]&&(console[_0x2cf4c0(0x262)](_0x2cf4c0(0x186)+_0x24aecb),console[_0x2cf4c0(0x262)](_0x2cf4c0(0x20a)+_0x24f54b[_0x2cf4c0(0x18b)](',\x20')));const _0x398e05=await withSpinner(_0x24f54b['length']===0x1?'Setting\x20secret...':'Setting\x20'+_0x24f54b['length']+_0x2cf4c0(0x28b),()=>_0x47e007[_0x2cf4c0(0x2b8)]['setSecrets'](_0x24aecb,_0x2ff782),{'verbose':_0x32fb3f['verbose']}),_0x296e02=_0x398e05[_0x2cf4c0(0x209)];return console['error'](_0x24f54b['length']===0x1?_0x2cf4c0(0x2bb)+_0x296e02['keys'][0x0]+_0x2cf4c0(0x2a2)+_0x296e02[_0x2cf4c0(0x1b5)]+'\x27':'✔\x20'+_0x296e02[_0x2cf4c0(0x2fd)][_0x2cf4c0(0x1e8)]+_0x2cf4c0(0x14c)+_0x296e02[_0x2cf4c0(0x1b5)]+'\x27'),(_0x32fb3f[_0x2cf4c0(0x219)]||_0x32fb3f[_0x2cf4c0(0x1a6)])&&await handleSingleObjectOutput(_0x296e02,_0x32fb3f),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x1c8);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x2f5);async[a55_0x2c1f74(0x15f)](_0x2f0853){const _0x1c5d10=a55_0x2c1f74,{options:_0x140763,args:_0x34f62b,tdx:_0x1502a2}=_0x2f0853;let _0x4cd667,_0x56f01b;if(_0x34f62b[_0x1c5d10(0x1e8)]>=0x2)_0x4cd667=_0x34f62b[0x0],_0x56f01b=_0x34f62b[0x1];else{if(_0x34f62b[_0x1c5d10(0x1e8)]===0x1&&_0x140763['workflowProject'])_0x4cd667=_0x140763[_0x1c5d10(0x2c4)],_0x56f01b=_0x34f62b[0x0];else return _0x34f62b[_0x1c5d10(0x1e8)]===0x1?(console['error'](_0x1c5d10(0x2fb)),console[_0x1c5d10(0x262)](_0x1c5d10(0x27a)),0x1):(console[_0x1c5d10(0x262)](_0x1c5d10(0x237)),console[_0x1c5d10(0x262)](_0x1c5d10(0x2c8)),0x1);}_0x140763[_0x1c5d10(0x1eb)]&&(console['error'](_0x1c5d10(0x186)+_0x4cd667),console[_0x1c5d10(0x262)](_0x1c5d10(0x21c)+_0x56f01b));if(!_0x140763[_0x1c5d10(0x17e)]){if(!isInteractive())return console[_0x1c5d10(0x262)](a55_0x39f9f7['red'](_0x1c5d10(0x21d)),_0x1c5d10(0x308)),console[_0x1c5d10(0x262)](a55_0x39f9f7['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1bf18c=await confirmKey(_0x1c5d10(0x2d7)+_0x56f01b+_0x1c5d10(0x2d6)+_0x4cd667+'\x27?');if(!_0x1bf18c)return console[_0x1c5d10(0x262)](a55_0x39f9f7[_0x1c5d10(0x158)]('Cancelled')),0x1;}const _0x37b8d9=await withSpinner(_0x1c5d10(0x1dd),()=>_0x1502a2['workflow'][_0x1c5d10(0x154)](_0x4cd667,_0x56f01b),{'verbose':_0x140763[_0x1c5d10(0x1eb)]}),_0x2bdc1e=_0x37b8d9[_0x1c5d10(0x209)];return console[_0x1c5d10(0x262)](_0x1c5d10(0x2bb)+_0x2bdc1e['key']+_0x1c5d10(0x1cc)+_0x2bdc1e[_0x1c5d10(0x1b5)]+'\x27'),(_0x140763['json']||_0x140763[_0x1c5d10(0x1a6)])&&await handleSingleObjectOutput(_0x2bdc1e,_0x140763),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(_0x2dc628){const _0x164891=a55_0x2c1f74,_0x2c9449=Math[_0x164891(0x25d)](_0x2dc628/0x3e8),_0x22a118=Math[_0x164891(0x25d)](_0x2c9449/0x3c),_0xc3e7b3=Math[_0x164891(0x25d)](_0x22a118/0x3c),_0x8d8007=Math['floor'](_0xc3e7b3/0x18);if(_0x8d8007>0x0){const _0x46801=_0xc3e7b3%0x18;return _0x46801>0x0?_0x8d8007+'d\x20'+_0x46801+'h':_0x8d8007+'d';}else{if(_0xc3e7b3>0x0){const _0x4e491e=_0x22a118%0x3c;return _0x4e491e>0x0?_0xc3e7b3+'h\x20'+_0x4e491e+'m':_0xc3e7b3+'h';}else{if(_0x22a118>0x0){const _0x35b6df=_0x2c9449%0x3c;return _0x35b6df>0x0?_0x22a118+'m\x20'+_0x35b6df+'s':_0x22a118+'m';}else return _0x2c9449+'s';}}}function formatTimestamp(_0x55f1c4,_0x14cd46){const _0x40716b=a55_0x2c1f74,_0x225f3b=new Date(_0x55f1c4),_0x578b1f=String(_0x225f3b[_0x40716b(0x270)]())[_0x40716b(0x1ac)](0x2,'0'),_0x463634=String(_0x225f3b[_0x40716b(0x194)]())['padStart'](0x2,'0'),_0x3264a8=_0x578b1f+':'+_0x463634,_0x3b3fd3=_0x225f3b[_0x40716b(0x166)]()===_0x14cd46['getFullYear']()&&_0x225f3b['getMonth']()===_0x14cd46[_0x40716b(0x254)]()&&_0x225f3b[_0x40716b(0x2f9)]()===_0x14cd46['getDate']();if(_0x3b3fd3)return _0x3264a8;else{const _0x4cc68e=String(_0x225f3b[_0x40716b(0x254)]()+0x1)[_0x40716b(0x1ac)](0x2,'0'),_0x5abf6d=String(_0x225f3b['getDate']())[_0x40716b(0x1ac)](0x2,'0');return _0x4cc68e+'-'+_0x5abf6d+'\x20'+_0x3264a8;}}function formatDate(_0x153ccb){const _0x35e221=a55_0x2c1f74,_0x969c58=_0x153ccb[_0x35e221(0x166)](),_0x2928fe=String(_0x153ccb[_0x35e221(0x254)]()+0x1)[_0x35e221(0x1ac)](0x2,'0'),_0x370dd4=String(_0x153ccb[_0x35e221(0x2f9)]())['padStart'](0x2,'0');return _0x969c58+'-'+_0x2928fe+'-'+_0x370dd4;}function getTaskStateIcon(_0x4b7a2e){const _0x3620fe={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x3620fe[_0x4b7a2e]||'⚪';}function getBarChar(_0x33bbc5){const _0xc02e52=a55_0x2c1f74;return _0x33bbc5===_0xc02e52(0x262)||_0x33bbc5===_0xc02e52(0x272)?'×':'─';}function getBarColor(_0x3eb649){const _0x1d9231=a55_0x2c1f74,_0x43fcd1={'success':a55_0x39f9f7['green'],'error':a55_0x39f9f7[_0x1d9231(0x2c3)],'group_error':a55_0x39f9f7[_0x1d9231(0x2c3)],'running':a55_0x39f9f7[_0x1d9231(0x2d9)],'blocked':a55_0x39f9f7['yellow'],'planned':a55_0x39f9f7['dim'],'canceling':a55_0x39f9f7[_0x1d9231(0x158)]};return _0x43fcd1[_0x3eb649]||a55_0x39f9f7[_0x1d9231(0x2b5)];}function parseTaskName(_0xe075ba){const _0x5e4f7c=a55_0x2c1f74;let _0x3b1b0e=_0xe075ba[_0x5e4f7c(0x17d)](/^\++/,'');const _0x1c6636=_0x3b1b0e[_0x5e4f7c(0x16a)]('+'),_0x3192ff=_0x1c6636['length']>0x1?_0x1c6636[_0x5e4f7c(0x1e8)]-0x2:0x0,_0x5ce96b=_0x1c6636[_0x1c6636[_0x5e4f7c(0x1e8)]-0x1]||_0x3b1b0e;return{'level':_0x3192ff,'name':'+'+_0x5ce96b};}function truncateTaskName(_0x2c7054,_0x3a39e3){const _0x3976de=a55_0x2c1f74,_0x19cfa7=stringWidth(_0x2c7054);if(_0x19cfa7<=_0x3a39e3)return _0x2c7054;let _0x50d4fc=_0x2c7054;while(stringWidth(_0x50d4fc+'…')>_0x3a39e3&&_0x50d4fc[_0x3976de(0x1e8)]>0x0){_0x50d4fc=_0x50d4fc['slice'](0x0,-0x1);}return _0x50d4fc+'…';}function calculateTimeScale(_0x3ab87a,_0x12acc9){const _0x3854f2=a55_0x2c1f74;return{'startTime':_0x3ab87a[_0x3854f2(0x1e7)],'endTime':_0x3ab87a[_0x3854f2(0x27f)],'durationMs':_0x3ab87a[_0x3854f2(0x1b6)],'msPerChar':_0x3ab87a[_0x3854f2(0x1b6)]/_0x12acc9};}function timeToPosition(_0x4b0639,_0x4e2d6e,_0x255e2d){const _0x496024=a55_0x2c1f74,_0x223444=_0x4b0639-_0x4e2d6e['startTime'],_0x1d7068=Math[_0x496024(0x25d)](_0x223444/_0x4e2d6e[_0x496024(0x18a)]);return Math[_0x496024(0x276)](0x0,Math[_0x496024(0x155)](_0x1d7068,_0x255e2d));}function renderTimeAxis(_0x250294,_0x23e748){const _0x3fb430=a55_0x2c1f74,_0x25e78c=Math[_0x3fb430(0x155)](TIMELINE_CONFIG[_0x3fb430(0x221)],Math[_0x3fb430(0x276)](TIMELINE_CONFIG[_0x3fb430(0x230)],Math[_0x3fb430(0x25d)](_0x23e748/TIMELINE_CONFIG[_0x3fb430(0x218)]))),_0x37b2dc=_0x250294['durationMs']/(_0x25e78c-0x1),_0x20bb16=new Date(_0x250294[_0x3fb430(0x2e2)]),_0x41765e=[];for(let _0x5720c5=0x0;_0x5720c5<_0x25e78c;_0x5720c5++){const _0x5c52cc=_0x250294[_0x3fb430(0x2e2)]+_0x5720c5*_0x37b2dc,_0x15ae2d=timeToPosition(_0x5c52cc,_0x250294,_0x23e748),_0x3ce68c=formatTimestamp(_0x5c52cc,_0x20bb16);_0x41765e[_0x3fb430(0x14b)]({'pos':_0x15ae2d,'text':_0x3ce68c});}const _0x40b56e=new Array(_0x23e748)[_0x3fb430(0x2e7)]('\x20');let _0xf87b76=-0x1;for(const {pos:_0x25f281,text:_0x3881c1}of _0x41765e){let _0x50f332=Math[_0x3fb430(0x276)](0x0,_0x25f281-Math[_0x3fb430(0x25d)](_0x3881c1['length']/0x2));_0x50f332<=_0xf87b76+TIMELINE_CONFIG[_0x3fb430(0x29f)]&&(_0x50f332=_0xf87b76+TIMELINE_CONFIG[_0x3fb430(0x29f)]+0x1);_0x50f332+_0x3881c1['length']>_0x23e748&&(_0x50f332=_0x23e748-_0x3881c1[_0x3fb430(0x1e8)]);if(_0x50f332>=0x0&&_0x50f332+_0x3881c1[_0x3fb430(0x1e8)]<=_0x23e748&&_0x50f332>_0xf87b76){for(let _0x26f7ed=0x0;_0x26f7ed<_0x3881c1[_0x3fb430(0x1e8)];_0x26f7ed++){_0x40b56e[_0x50f332+_0x26f7ed]=_0x3881c1[_0x26f7ed];}_0xf87b76=_0x50f332+_0x3881c1[_0x3fb430(0x1e8)]-0x1;}}return _0x40b56e[_0x3fb430(0x18b)]('');}function renderTaskRow(_0xa4038b,_0x408d35,_0xd8d6cb,_0x105f8d){const _0x15748a=a55_0x2c1f74,{level:_0x4518af,name:_0x5a58d8}=parseTaskName(_0xa4038b[_0x15748a(0x1c2)]),_0x465fee='\x20'['repeat'](_0x4518af),_0x35dbe3=_0xa4038b[_0x15748a(0x295)]?'('+formatElapsed(_0xa4038b['window']['duration'])+')':'',_0x3a61aa=stringWidth(_0x35dbe3),_0x1ca03f=_0x4518af*0x1,_0x42ed91=_0x105f8d-_0x1ca03f-_0x3a61aa-0x1,_0x398f25=truncateTaskName(_0x5a58d8,_0x42ed91),_0x287fa3=_0x465fee+_0x398f25,_0x5cc83c=stringWidth(_0x287fa3),_0x53f94f=_0x105f8d-_0x5cc83c-_0x3a61aa,_0x4774ca=_0x287fa3+'\x20'[_0x15748a(0x203)](Math[_0x15748a(0x276)](0x1,_0x53f94f))+a55_0x39f9f7[_0x15748a(0x184)](_0x35dbe3),_0x12c991=getTaskStateIcon(_0xa4038b['state']),_0x406b54=new Array(_0xd8d6cb)[_0x15748a(0x2e7)]('\x20');if(_0xa4038b[_0x15748a(0x295)]){const _0x4f4691=timeToPosition(_0xa4038b[_0x15748a(0x295)][_0x15748a(0x1e7)],_0x408d35,_0xd8d6cb),_0x404094=timeToPosition(_0xa4038b['window'][_0x15748a(0x27f)],_0x408d35,_0xd8d6cb),_0x53dc34=getBarChar(_0xa4038b[_0x15748a(0x298)]),_0x3d3dfa=Math[_0x15748a(0x276)](_0x4f4691+0x1,_0x404094);for(let _0x4d6f6c=_0x4f4691;_0x4d6f6c<Math[_0x15748a(0x155)](_0x3d3dfa,_0xd8d6cb);_0x4d6f6c++){_0x406b54[_0x4d6f6c]=_0x53dc34;}}const _0xa7c248=getBarColor(_0xa4038b[_0x15748a(0x298)]),_0x326ccf=_0x406b54[_0x15748a(0x160)](_0x3f2d46=>_0x3f2d46==='\x20'?'\x20':_0xa7c248(_0x3f2d46))['join']('');return _0x12c991+'\x20'+_0x4774ca+'│'+_0x326ccf+'│';}function calculateStats(_0xecdbba){const _0x2e6873=a55_0x2c1f74,_0x833e2f={'total':_0xecdbba[_0x2e6873(0x1e8)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x19195e of _0xecdbba){if(_0x19195e[_0x2e6873(0x298)]===_0x2e6873(0x1b0))_0x833e2f[_0x2e6873(0x1b0)]++;else{if(_0x19195e[_0x2e6873(0x298)]===_0x2e6873(0x262)||_0x19195e['state']==='group_error')_0x833e2f[_0x2e6873(0x262)]++;else _0x19195e[_0x2e6873(0x298)]===_0x2e6873(0x14d)?_0x833e2f[_0x2e6873(0x14d)]++:_0x833e2f[_0x2e6873(0x156)]++;}}return _0x833e2f;}function formatStats(_0x474597){const _0x5e3271=a55_0x2c1f74;return['Total:\x20'+_0x474597[_0x5e3271(0x1ad)],'✅\x20'+_0x474597[_0x5e3271(0x1b0)],'❌\x20'+_0x474597[_0x5e3271(0x262)],_0x5e3271(0x1a4)+_0x474597[_0x5e3271(0x14d)],'⏳\x20'+_0x474597['pending']]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x2fe);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x174);async[a55_0x2c1f74(0x15f)](_0x294179){const _0x2798e3=a55_0x2c1f74,{options:_0x3d4a3c,args:_0x428b17,tdx:_0x408618}=_0x294179;let _0x457f3c,_0x38a5e1,_0x42d01a=![];if(_0x428b17[0x0]){if(_0x428b17[0x0][_0x2798e3(0x231)]('.')){const _0x4f82a3=this[_0x2798e3(0x2a4)](_0x428b17,_0x3d4a3c);if(!_0x4f82a3)return 0x1;_0x457f3c=_0x4f82a3[_0x2798e3(0x1b5)],_0x38a5e1=_0x4f82a3[_0x2798e3(0x307)];}else{_0x38a5e1=_0x428b17[0x0],_0x457f3c=_0x3d4a3c[_0x2798e3(0x2c4)];if(!_0x457f3c)return console['error'](a55_0x39f9f7[_0x2798e3(0x2c3)](_0x2798e3(0x1fc)),_0x2798e3(0x1b1)),0x1;_0x42d01a=!![];}}else{const _0x2b9489=this[_0x2798e3(0x2a4)](_0x428b17,_0x3d4a3c);if(!_0x2b9489)return 0x1;_0x457f3c=_0x2b9489['projectName'],_0x38a5e1=_0x2b9489[_0x2798e3(0x307)];}if(_0x3d4a3c[_0x2798e3(0x1eb)]){if(_0x457f3c&&_0x38a5e1)console['error'](_0x2798e3(0x2b1)+_0x457f3c+'.'+_0x38a5e1);else _0x457f3c&&console[_0x2798e3(0x262)](_0x2798e3(0x189)+_0x457f3c);}const _0x16edf3=_0x3d4a3c[_0x2798e3(0x250)],_0x5f563a=_0x3d4a3c[_0x2798e3(0x1de)];if(_0x16edf3){_0x5f563a&&console[_0x2798e3(0x262)](a55_0x39f9f7[_0x2798e3(0x158)](_0x2798e3(0x1c4)),_0x2798e3(0x18f));const _0x551f38=_0x3d4a3c[_0x2798e3(0x243)];return _0x551f38?await this[_0x2798e3(0x2ce)](_0x294179,_0x16edf3):await this['renderSingleTimeline'](_0x294179,_0x16edf3,_0x3d4a3c),0x0;}if(_0x5f563a){const _0x4156d7=await withSpinner(_0x2798e3(0x2a3),()=>_0x408618[_0x2798e3(0x2b8)]['sessions']({'projectName':_0x457f3c,'workflowName':_0x38a5e1,'limit':0x64}),{'verbose':_0x3d4a3c['verbose']}),_0x4212c5=_0x4156d7[_0x2798e3(0x209)]['find'](_0x5e9c91=>_0x5e9c91['id']===_0x5f563a);if(!_0x4212c5)return console[_0x2798e3(0x262)](a55_0x39f9f7[_0x2798e3(0x2c3)]('Error:'),_0x2798e3(0x273)+_0x5f563a),0x1;if(!_0x4212c5[_0x2798e3(0x29b)]?.['id'])return console[_0x2798e3(0x262)](a55_0x39f9f7[_0x2798e3(0x2c3)]('Error:'),_0x2798e3(0x2ef)+_0x5f563a+'\x20has\x20no\x20attempts'),0x1;const _0x25eb0e=_0x4212c5[_0x2798e3(0x29b)]['id'];_0x3d4a3c[_0x2798e3(0x1eb)]&&console['error'](_0x2798e3(0x246)+_0x25eb0e+_0x2798e3(0x1a8)+_0x5f563a);const _0x6a7338=_0x3d4a3c[_0x2798e3(0x243)];return _0x6a7338?await this[_0x2798e3(0x2ce)](_0x294179,_0x25eb0e):await this[_0x2798e3(0x30a)](_0x294179,_0x25eb0e,_0x3d4a3c),0x0;}const _0x16003f=await withSpinner(_0x2798e3(0x22d),()=>_0x408618[_0x2798e3(0x2b8)][_0x2798e3(0x2af)]({'projectName':_0x457f3c,'workflowName':_0x38a5e1,'limit':_0x3d4a3c['limit']||0x32}),{'verbose':_0x3d4a3c['verbose']}),_0x31735e=_0x16003f['data'];if(_0x31735e[_0x2798e3(0x1e8)]===0x0){if(_0x457f3c&&_0x38a5e1)console[_0x2798e3(0x262)](_0x2798e3(0x216)+_0x457f3c+'.'+_0x38a5e1);else _0x457f3c?console[_0x2798e3(0x262)](_0x2798e3(0x256)+_0x457f3c):(console[_0x2798e3(0x262)]('No\x20workflow\x20sessions\x20found'),console['error'](a55_0x39f9f7['dim']('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x31735e[_0x2798e3(0x2eb)]((_0x17265a,_0x314a22)=>{const _0x4e883b=_0x2798e3,_0x5a0784=_0x17265a['sessionTime']||'',_0x2b5835=_0x314a22[_0x4e883b(0x22a)]||'';return _0x2b5835[_0x4e883b(0x1d7)](_0x5a0784);});if(_0x3d4a3c[_0x2798e3(0x219)]||_0x3d4a3c[_0x2798e3(0x1a6)])return await handleSDKOutput(_0x31735e,_0x3d4a3c),0x0;let _0x15d6e9;if(_0x42d01a){const _0x266f17=_0x31735e[0x0];if(!_0x266f17['lastAttempt']?.['id'])return console['error'](_0x2798e3(0x212)),0x0;_0x15d6e9=_0x266f17[_0x2798e3(0x29b)]['id'],_0x3d4a3c[_0x2798e3(0x1eb)]&&console['error'](_0x2798e3(0x22b)+_0x266f17[_0x2798e3(0x22a)]);}else{const _0x4a4fb0=_0x31735e['map'](_0x4aa32e=>{const _0x1a1554=_0x2798e3,_0x2faec9=getAttemptStatusDisplay(_0x4aa32e[_0x1a1554(0x29b)]);return{'title':_0x4aa32e['project']?.[_0x1a1554(0x1c2)]+'.'+_0x4aa32e['workflow']?.['name']+_0x1a1554(0x13e)+_0x4aa32e['sessionTime']+'\x20'+_0x2faec9[_0x1a1554(0x1f5)],'value':_0x4aa32e[_0x1a1554(0x29b)]?.['id']||'','description':_0x2faec9['text']};}),_0x373421=await a55_0x281505({'type':'select','name':_0x2798e3(0x250),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x4a4fb0[_0x2798e3(0x2dd)](_0xdcc65d=>_0xdcc65d[_0x2798e3(0x146)]!=='')});if(!_0x373421[_0x2798e3(0x250)])return 0x0;_0x15d6e9=_0x373421[_0x2798e3(0x250)];}const _0x50d30c=_0x3d4a3c['follow'];return _0x50d30c?await this[_0x2798e3(0x2ce)](_0x294179,_0x15d6e9):await this[_0x2798e3(0x30a)](_0x294179,_0x15d6e9,_0x3d4a3c),0x0;}async['renderSingleTimeline'](_0x1b01c6,_0x48b133,_0x4cb3fc){const _0x7904ea=a55_0x2c1f74,{tdx:_0x51a6bd}=_0x1b01c6;let _0x331046,_0x5c4771;try{[_0x331046,_0x5c4771]=await Promise['all']([_0x51a6bd[_0x7904ea(0x2b8)]['attempt'](_0x48b133),_0x51a6bd[_0x7904ea(0x2b8)][_0x7904ea(0x19b)](_0x48b133,![])]);}catch(_0xdb935c){console[_0x7904ea(0x262)](a55_0x39f9f7[_0x7904ea(0x2c3)](_0x7904ea(0x1fe)));_0x4cb3fc['verbose']&&console['error'](_0xdb935c);throw _0xdb935c;}if(_0x4cb3fc[_0x7904ea(0x219)]||_0x4cb3fc[_0x7904ea(0x1a6)]){const _0x21711a=this[_0x7904ea(0x2e0)](_0x331046,_0x5c4771);await handleSDKOutput([_0x21711a],_0x4cb3fc);return;}const _0x249706=_0x51a6bd['context'][_0x7904ea(0x1e6)],_0x161108=this[_0x7904ea(0x1ca)](_0x331046,_0x5c4771,_0x249706);console[_0x7904ea(0x2b2)](_0x161108);}async['pollTimeline'](_0x246959,_0x2600c4){const _0xa0b4cb=a55_0x2c1f74,{tdx:_0x281bb0}=_0x246959,_0x1daa1c=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x50be7e=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x13ae8d=0x0;while(_0x13ae8d<_0x50be7e){process[_0xa0b4cb(0x167)][_0xa0b4cb(0x1e9)]&&process[_0xa0b4cb(0x167)][_0xa0b4cb(0x257)]('\x1bc');let _0x5eb991,_0x2e9624;try{[_0x5eb991,_0x2e9624]=await Promise['all']([_0x281bb0[_0xa0b4cb(0x2b8)]['attempt'](_0x2600c4),_0x281bb0[_0xa0b4cb(0x2b8)][_0xa0b4cb(0x19b)](_0x2600c4,![])]);}catch(_0x70df44){console[_0xa0b4cb(0x262)](a55_0x39f9f7[_0xa0b4cb(0x2c3)](_0xa0b4cb(0x13d)));_0x13ae8d>0x0&&console[_0xa0b4cb(0x262)](a55_0x39f9f7[_0xa0b4cb(0x184)](_0xa0b4cb(0x275)+_0x13ae8d));throw _0x70df44;}const _0x66f482=_0x281bb0[_0xa0b4cb(0x286)][_0xa0b4cb(0x1e6)],_0x464f5c=this[_0xa0b4cb(0x1ca)](_0x5eb991,_0x2e9624,_0x66f482);console[_0xa0b4cb(0x2b2)](_0x464f5c);const _0x30bb4a=_0x5eb991[_0xa0b4cb(0x297)]&&_0x2e9624[_0xa0b4cb(0x24a)](_0xeba4fd=>_0xeba4fd['state']!==_0xa0b4cb(0x14d)&&_0xeba4fd['state']!==_0xa0b4cb(0x304));if(_0x30bb4a){console[_0xa0b4cb(0x262)](a55_0x39f9f7[_0xa0b4cb(0x2f2)](_0xa0b4cb(0x1ff)));break;}console[_0xa0b4cb(0x262)](a55_0x39f9f7[_0xa0b4cb(0x184)]('\x0aPolling...\x20('+_0x13ae8d*0x2+_0xa0b4cb(0x1f9))),await new Promise(_0x50cf93=>setTimeout(_0x50cf93,_0x1daa1c)),_0x13ae8d++;}_0x13ae8d>=_0x50be7e&&console[_0xa0b4cb(0x262)](a55_0x39f9f7[_0xa0b4cb(0x158)](_0xa0b4cb(0x153)));}['renderTimeline'](_0x4b104b,_0xc5a263,_0x3dbce2){const _0x22488e=a55_0x2c1f74,_0x3d661a=[],_0x27d9b6=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x836be4=0x5,_0x1372ea=process[_0x22488e(0x167)][_0x22488e(0x1ef)]||0x78,_0x2fa74c=_0x1372ea-_0x27d9b6-_0x836be4,_0x53e9b5=Math[_0x22488e(0x276)](TIMELINE_CONFIG[_0x22488e(0x192)],Math[_0x22488e(0x155)](_0x2fa74c,TIMELINE_CONFIG[_0x22488e(0x142)])),_0x28440d=new Date(_0x4b104b[_0x22488e(0x2fa)])[_0x22488e(0x29a)](),_0x242970=_0x4b104b[_0x22488e(0x20c)]?new Date(_0x4b104b['finishedAt'])[_0x22488e(0x29a)]():Date[_0x22488e(0x305)](),_0xd29502={'start':_0x28440d,'end':_0x242970,'duration':_0x242970-_0x28440d},_0x5d5ef8=new Map(),_0x339dd4=[];for(const _0x27f0c0 of _0xc5a263){if(_0x27f0c0[_0x22488e(0x187)]){const _0x255da9=new Date(_0x27f0c0[_0x22488e(0x187)])[_0x22488e(0x29a)](),_0x36f5b6=_0x27f0c0['updatedAt']?new Date(_0x27f0c0[_0x22488e(0x24b)])[_0x22488e(0x29a)]():Date['now'](),_0x342d74={'start':_0x255da9,'end':_0x36f5b6,'duration':_0x36f5b6-_0x255da9};_0x5d5ef8[_0x22488e(0x1a0)](_0x27f0c0['id'],_0x342d74),_0x339dd4['push']({'name':_0x27f0c0[_0x22488e(0x2ae)],'state':_0x27f0c0['state']||_0x22488e(0x15b),'window':_0x342d74});}else _0x339dd4[_0x22488e(0x14b)]({'name':_0x27f0c0[_0x22488e(0x2ae)],'state':_0x27f0c0[_0x22488e(0x298)]||'planned','window':undefined});}_0x339dd4[_0x22488e(0x2eb)]((_0x1bc584,_0x3c5c7d)=>{const _0x1a8fda=_0x22488e;if(!_0x1bc584[_0x1a8fda(0x295)])return 0x1;if(!_0x3c5c7d['window'])return-0x1;return _0x1bc584[_0x1a8fda(0x295)]['start']-_0x3c5c7d[_0x1a8fda(0x295)][_0x1a8fda(0x1e7)];});const _0x3167f0=_0x339dd4[_0x22488e(0x1e8)],_0x2ab43d=_0x3167f0>TIMELINE_CONFIG[_0x22488e(0x263)];_0x2ab43d&&_0x339dd4['splice'](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x122d42=calculateTimeScale(_0xd29502,_0x53e9b5),_0x224e22=_0x4b104b['done']?_0x4b104b['success']?a55_0x39f9f7[_0x22488e(0x2f2)](_0x22488e(0x1b0)):a55_0x39f9f7['red'](_0x22488e(0x262)):a55_0x39f9f7[_0x22488e(0x2d9)](_0x22488e(0x14d)),_0x2c474a=_0x4b104b[_0x22488e(0x23a)]?.['id'],_0x5d0886=_0x4b104b[_0x22488e(0x1de)];let _0x917f82;if(_0x2c474a&&_0x5d0886){const _0x162d85=getWorkflowAttemptUrl(_0x3dbce2,_0x2c474a,_0x5d0886,_0x4b104b['id']);_0x917f82=hyperlink(a55_0x39f9f7[_0x22488e(0x184)](_0x4b104b['id']),_0x162d85);}else _0x917f82=a55_0x39f9f7[_0x22488e(0x184)](_0x4b104b['id']);_0x3d661a['push'](_0x22488e(0x2e9)+_0x917f82+_0x22488e(0x13e)+_0x224e22+'\x20-\x20'+formatElapsed(_0xd29502[_0x22488e(0x1b6)]));if(_0x339dd4[_0x22488e(0x1e8)]>0x0){const _0x4989f5=renderTimeAxis(_0x122d42,_0x53e9b5),_0x1704af=new Date(_0xd29502[_0x22488e(0x1e7)]),_0x3b1c97=formatDate(_0x1704af),_0x535ac4=TIMELINE_CONFIG[_0x22488e(0x2cc)]+TIMELINE_CONFIG[_0x22488e(0x1d3)]+_0x27d9b6,_0x15337e=_0x3b1c97[_0x22488e(0x1ac)](_0x535ac4),_0x42a0b8=a55_0x39f9f7[_0x22488e(0x184)](_0x15337e);_0x3d661a[_0x22488e(0x14b)](_0x42a0b8+'\x20'+_0x4989f5);for(const _0x2d4f50 of _0x339dd4){_0x3d661a[_0x22488e(0x14b)](renderTaskRow(_0x2d4f50,_0x122d42,_0x53e9b5,_0x27d9b6));}const _0x562200=calculateStats(_0x339dd4);_0x3d661a[_0x22488e(0x14b)](formatStats(_0x562200)),_0x2ab43d&&_0x3d661a['push'](a55_0x39f9f7[_0x22488e(0x158)](_0x22488e(0x205)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x22488e(0x1b3)+_0x3167f0+_0x22488e(0x1e0))),_0x3d661a['push'](''),_0x3d661a[_0x22488e(0x14b)](a55_0x39f9f7[_0x22488e(0x184)](_0x22488e(0x207))+(_0x22488e(0x2ac)+_0x4b104b['id']+_0x22488e(0x236))+a55_0x39f9f7[_0x22488e(0x184)](_0x22488e(0x271)));}else _0x3d661a[_0x22488e(0x14b)](_0x22488e(0x1db));return _0x3d661a[_0x22488e(0x18b)]('\x0a');}[a55_0x2c1f74(0x2e0)](_0x45b787,_0x248cb2){const _0x3eac44=a55_0x2c1f74,_0x54086d=new Date(_0x45b787['createdAt'])[_0x3eac44(0x29a)](),_0x52f028=_0x45b787['finishedAt']?new Date(_0x45b787[_0x3eac44(0x20c)])[_0x3eac44(0x29a)]():Date[_0x3eac44(0x305)](),_0x224bac=_0x52f028-_0x54086d,_0x880ef9=[];for(const _0x5f22e7 of _0x248cb2){if(_0x5f22e7[_0x3eac44(0x187)]){const _0x23fb99=new Date(_0x5f22e7[_0x3eac44(0x187)])['getTime'](),_0x10da4b=_0x5f22e7[_0x3eac44(0x24b)]?new Date(_0x5f22e7['updatedAt'])[_0x3eac44(0x29a)]():Date[_0x3eac44(0x305)]();_0x880ef9[_0x3eac44(0x14b)]({'name':_0x5f22e7[_0x3eac44(0x2ae)],'state':_0x5f22e7['state']||'unknown','window':{'start':_0x23fb99,'end':_0x10da4b,'duration':_0x10da4b-_0x23fb99}});}else _0x880ef9['push']({'name':_0x5f22e7['fullName'],'state':_0x5f22e7['state']||_0x3eac44(0x304),'window':undefined});}const _0x546006=calculateStats(_0x880ef9);return{'attempt':{'id':_0x45b787['id'],'status':_0x45b787[_0x3eac44(0x297)]?_0x45b787['success']?_0x3eac44(0x1b0):_0x3eac44(0x262):_0x3eac44(0x14d),'createdAt':_0x45b787['createdAt'],'finishedAt':_0x45b787['finishedAt'],'duration_ms':_0x224bac},'tasks':_0x880ef9[_0x3eac44(0x160)](_0x36b103=>({'name':_0x36b103[_0x3eac44(0x1c2)],'state':_0x36b103['state'],'startedAt':_0x36b103['window']?new Date(_0x36b103[_0x3eac44(0x295)][_0x3eac44(0x1e7)])[_0x3eac44(0x28a)]():null,'updatedAt':_0x36b103['window']?new Date(_0x36b103[_0x3eac44(0x295)][_0x3eac44(0x27f)])[_0x3eac44(0x28a)]():null,'duration_ms':_0x36b103[_0x3eac44(0x295)]?.[_0x3eac44(0x1b6)]||null})),'stats':_0x546006};}}export class WorkflowSchedulesCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x1a9);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x25e);async['execute'](_0x129635){const _0x59c7c5=a55_0x2c1f74,{options:_0x25e2b8,tdx:_0x188b89}=_0x129635,_0x245d9b=await withSpinner('Listing\x20schedules...',()=>_0x188b89['workflow'][_0x59c7c5(0x26c)](),{'verbose':_0x25e2b8['verbose']}),_0x19f4ec=_0x245d9b[_0x59c7c5(0x209)];console[_0x59c7c5(0x262)]('✔\x20Found\x20'+_0x19f4ec['length']+_0x59c7c5(0x2da)+(_0x19f4ec[_0x59c7c5(0x1e8)]!==0x1?'s':''));if(isStructuredFormat(_0x25e2b8))await handleSDKOutput(_0x19f4ec,_0x25e2b8);else{if(_0x19f4ec[_0x59c7c5(0x1e8)]===0x0)console[_0x59c7c5(0x2b2)](_0x59c7c5(0x252));else for(const _0x4b107c of _0x19f4ec){const _0x2e3be0=_0x4b107c[_0x59c7c5(0x19a)]?a55_0x39f9f7[_0x59c7c5(0x158)](_0x59c7c5(0x1b4)):'',_0x366555=_0x4b107c[_0x59c7c5(0x23a)]?.[_0x59c7c5(0x1c2)]?a55_0x39f9f7['dim']('\x20['+_0x4b107c['project']['name']+']'):'',_0x14100e=_0x4b107c[_0x59c7c5(0x16d)]?a55_0x39f9f7[_0x59c7c5(0x184)](_0x59c7c5(0x2ea)+new Date(_0x4b107c[_0x59c7c5(0x16d)])['toLocaleString']()):'';console[_0x59c7c5(0x2b2)](_0x59c7c5(0x14f)+_0x4b107c['id']+'\x20'+(_0x4b107c['workflow']?.[_0x59c7c5(0x1c2)]||_0x59c7c5(0x1fa))+_0x366555+_0x2e3be0+_0x14100e);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x232);[a55_0x2c1f74(0x2d2)]=a55_0x2c1f74(0x22f);async['execute'](_0x16296b){const _0x2eb766=a55_0x2c1f74,{options:_0x12d20e,args:_0x402c94,tdx:_0x567af5}=_0x16296b,_0x261418=_0x402c94[0x0];if(!_0x261418)return console[_0x2eb766(0x262)](a55_0x39f9f7[_0x2eb766(0x2c3)]('Error:'),_0x2eb766(0x1bf)),console[_0x2eb766(0x262)](a55_0x39f9f7['dim'](_0x2eb766(0x27b))),console[_0x2eb766(0x262)](a55_0x39f9f7['dim'](_0x2eb766(0x2a0))),0x1;const _0x202f62=await withSpinner(_0x2eb766(0x151)+_0x261418+'...',()=>_0x567af5[_0x2eb766(0x2b8)][_0x2eb766(0x294)](_0x261418),{'verbose':_0x12d20e[_0x2eb766(0x1eb)]}),_0x1c9158=_0x202f62[_0x2eb766(0x209)];return isStructuredFormat(_0x12d20e)?await handleSingleObjectOutput(_0x1c9158,_0x12d20e):(console[_0x2eb766(0x2b2)](_0x2eb766(0x193)+_0x261418+'\x20enabled\x20('+(_0x1c9158['workflow']?.[_0x2eb766(0x1c2)]||_0x2eb766(0x15b))+')'),_0x1c9158['nextRunTime']&&console[_0x2eb766(0x2b2)](a55_0x39f9f7['dim'](_0x2eb766(0x227)+new Date(_0x1c9158[_0x2eb766(0x16d)])[_0x2eb766(0x292)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a55_0x2c1f74(0x1c2)]=a55_0x2c1f74(0x20d);['description']=a55_0x2c1f74(0x260);async['execute'](_0x10e811){const _0x22d82a=a55_0x2c1f74,{options:_0x3bfd1b,args:_0x5f5dab,tdx:_0x231392}=_0x10e811,_0x58a357=_0x5f5dab[0x0];if(!_0x58a357)return console[_0x22d82a(0x262)](a55_0x39f9f7[_0x22d82a(0x2c3)](_0x22d82a(0x1fc)),_0x22d82a(0x1bf)),console[_0x22d82a(0x262)](a55_0x39f9f7['dim'](_0x22d82a(0x211))),console[_0x22d82a(0x262)](a55_0x39f9f7['dim'](_0x22d82a(0x2a0))),0x1;const _0x24e0bd=await withSpinner(_0x22d82a(0x199)+_0x58a357+'...',()=>_0x231392[_0x22d82a(0x2b8)]['disableSchedule'](_0x58a357),{'verbose':_0x3bfd1b[_0x22d82a(0x1eb)]}),_0xac4b5f=_0x24e0bd[_0x22d82a(0x209)];return isStructuredFormat(_0x3bfd1b)?await handleSingleObjectOutput(_0xac4b5f,_0x3bfd1b):console['log'](_0x22d82a(0x193)+_0x58a357+_0x22d82a(0x290)+(_0xac4b5f[_0x22d82a(0x2b8)]?.[_0x22d82a(0x1c2)]||_0x22d82a(0x15b))+')'),0x0;}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42c9d1,_0x3a6520){const _0x1dafd8=a56_0x16d0,_0x446e49=_0x42c9d1();while(!![]){try{const _0x9e75f7=-parseInt(_0x1dafd8(0xdf))/0x1+-parseInt(_0x1dafd8(0xe1))/0x2+-parseInt(_0x1dafd8(0xe8))/0x3*(parseInt(_0x1dafd8(0xdb))/0x4)+parseInt(_0x1dafd8(0xdd))/0x5+-parseInt(_0x1dafd8(0xdc))/0x6+parseInt(_0x1dafd8(0xe0))/0x7*(parseInt(_0x1dafd8(0xe6))/0x8)+parseInt(_0x1dafd8(0xd6))/0x9*(parseInt(_0x1dafd8(0xda))/0xa);if(_0x9e75f7===_0x3a6520)break;else _0x446e49['push'](_0x446e49['shift']());}catch(_0x5433f8){_0x446e49['push'](_0x446e49['shift']());}}}(a56_0x1436,0xba25c));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a56_0x1436(){const _0x549271=['TD1\x20','tdx/','replace','110vPVAiW','577528WYVapz','187512HQxFNF','101145AZSLkj','entries','536212fTNSQX','7tArCHg','2655014rtzhVa','Bearer\x20',';\x20node/','tdx','length','5235144Ggdehb','Authorization','3lXFOlI','X-Trino-User','version','1740429yALQTy'];a56_0x1436=function(){return _0x549271;};return a56_0x1436();}export function getUserAgent(){const _0xad7ca8=a56_0x16d0,_0x43c95a=getVersion(),_0x1fa0e2=platform(),_0x3ce9a0=process[_0xad7ca8(0xd5)][_0xad7ca8(0xd9)]('v','');return _0xad7ca8(0xd8)+_0x43c95a+'\x20('+_0x1fa0e2+_0xad7ca8(0xe3)+_0x3ce9a0+')';}export function getAuthHeaders(_0x1edbf3,_0x50607e,_0x3169c4){const _0x3a6e45=a56_0x16d0,_0xd5f6e8=getVersion(),_0x56049d={'User-Agent':getUserAgent(),'X-TD-Client':_0x3a6e45(0xe4),'X-TD-Client-Version':_0xd5f6e8};if(_0x3169c4)_0x56049d['Authorization']=_0x3a6e45(0xe2)+_0x3169c4;else _0x50607e&&(_0x56049d['Authorization']=_0x3a6e45(0xd7)+_0x50607e);return _0x56049d;}export function toHeaderRecord(_0x259f3f){const _0x2626e0=a56_0x16d0,_0x5b5046={};for(const [_0x3b2b76,_0x48569d]of Object[_0x2626e0(0xde)](_0x259f3f)){_0x48569d!==undefined&&(_0x5b5046[_0x3b2b76]=_0x48569d);}return _0x5b5046;}export function getTrinoHeaders(_0x2a3703,_0x5653f5,_0x479c83){const _0x148d60=a56_0x16d0,_0x2efd74=getAuthHeaders(_0x2a3703),_0x224463=toHeaderRecord(_0x2efd74);if(_0x479c83)_0x224463[_0x148d60(0xe7)]='Bearer\x20'+_0x479c83;else _0x5653f5&&(_0x224463[_0x148d60(0xd4)]=_0x5653f5);return _0x224463;}function a56_0x16d0(_0x48349c,_0x352179){_0x48349c=_0x48349c-0xd4;const _0x14367a=a56_0x1436();let _0x16d09d=_0x14367a[_0x48349c];return _0x16d09d;}export function hasAPIKey(_0x29f6b6){const _0x3bacf4=a56_0x16d0,_0xa3120e=getAPIKey();return _0xa3120e!==undefined&&_0xa3120e[_0x3bacf4(0xe5)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x201c98,_0x2140c5){const _0x14e127=a57_0x25bc,_0x30c7fd=_0x201c98();while(!![]){try{const _0x35003b=-parseInt(_0x14e127(0x1f6))/0x1*(parseInt(_0x14e127(0x20e))/0x2)+-parseInt(_0x14e127(0x1fc))/0x3*(-parseInt(_0x14e127(0x209))/0x4)+parseInt(_0x14e127(0x1e2))/0x5*(parseInt(_0x14e127(0x1ea))/0x6)+parseInt(_0x14e127(0x1fb))/0x7+parseInt(_0x14e127(0x1e0))/0x8+parseInt(_0x14e127(0x1de))/0x9*(parseInt(_0x14e127(0x1ef))/0xa)+-parseInt(_0x14e127(0x1e5))/0xb;if(_0x35003b===_0x2140c5)break;else _0x30c7fd['push'](_0x30c7fd['shift']());}catch(_0x476806){_0x30c7fd['push'](_0x30c7fd['shift']());}}}(a57_0x50f9,0x2c25d));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a57_0x3aa974 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x3c7e5f){const _0x329af4=a57_0x25bc;return _0x3c7e5f[_0x329af4(0x1d7)]===_0x329af4(0x1c8)||_0x3c7e5f[_0x329af4(0x1d7)]===_0x329af4(0x1f9)||_0x3c7e5f[_0x329af4(0x1d7)]===_0x329af4(0x20d)||_0x3c7e5f[_0x329af4(0x1d7)]===_0x329af4(0x202)||_0x3c7e5f[_0x329af4(0x1c8)]===!![]||_0x3c7e5f[_0x329af4(0x1f9)]===!![]||_0x3c7e5f[_0x329af4(0x20d)]===!![]||_0x3c7e5f[_0x329af4(0x202)]===!![];}export function parseOutputOptions(_0x5096ef){const _0xb843f7=a57_0x25bc;return{'format':_0x5096ef['format']||_0xb843f7(0x202),'output':_0x5096ef[_0xb843f7(0x204)]||'','limit':_0x5096ef[_0xb843f7(0x20a)],'limitStructuredFormats':_0x5096ef[_0xb843f7(0x1fe)],'color':_0x5096ef[_0xb843f7(0x1d6)],'noColor':_0x5096ef[_0xb843f7(0x208)]};}function convertSDKResultToQueryResult(_0x50193a){const _0x2bd006=a57_0x25bc,_0x198f9e=[];if(_0x50193a['length']>0x0){const _0x1b21a9=_0x50193a[0x0];for(const [_0x1a8531,_0x5311d6]of Object[_0x2bd006(0x1eb)](_0x1b21a9)){let _0x486b79='varchar';if(typeof _0x5311d6===_0x2bd006(0x205))_0x486b79=Number[_0x2bd006(0x201)](_0x5311d6)?_0x2bd006(0x1ce):_0x2bd006(0x207);else{if(typeof _0x5311d6===_0x2bd006(0x1e1))_0x486b79='boolean';else _0x5311d6===null&&(_0x486b79=_0x2bd006(0x1df));}_0x198f9e[_0x2bd006(0x1ca)]({'name':_0x1a8531,'type':_0x486b79});}}return{'queryId':_0x2bd006(0x1d0),'columns':_0x198f9e,'data':_0x50193a,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x50193a['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0xf3e07a,_0x5ecf8e){const _0x165c6e=convertSDKResultToQueryResult(_0xf3e07a);return formatQueryOutput(_0x165c6e,_0x5ecf8e);}export async function formatQueryOutput(_0x3eda6f,_0x47a30d){const _0x572021=a57_0x25bc,{format:_0x865dd4,limit:_0x5a3359,output:_0x3d1551,color:_0x32d359,noColor:_0x1f2400,limitStructuredFormats:_0x11e9c4}=_0x47a30d,_0x32786b=Boolean(_0x3d1551)&&!_0x32d359,_0x5c2875={'color':_0x32d359,'noColor':_0x1f2400||_0x32786b};if(_0x865dd4===_0x572021(0x202)){const _0x238977=shouldUseLess(_0x865dd4,_0x3d1551);return formatAsTable(_0x3eda6f,_0x5a3359,_0x238977,_0x5c2875);}const _0x568f87=_0x11e9c4&&Number[_0x572021(0x1d3)](_0x5a3359)&&_0x3eda6f[_0x572021(0x1f5)][_0x572021(0x1ee)]>_0x5a3359?{..._0x3eda6f,'data':_0x3eda6f[_0x572021(0x1f5)]['slice'](0x0,_0x5a3359)}:_0x3eda6f;if(_0x865dd4===_0x572021(0x1c8))return formatAsJSON(_0x568f87,_0x5c2875);else return _0x865dd4==='jsonl'?formatAsJSONL(_0x568f87,_0x5c2875):formatQueryResult(_0x568f87,_0x865dd4);}function shouldUseLess(_0x57a6c8,_0x541b03){const _0x4a4b3e=a57_0x25bc;return(_0x57a6c8==='table'||_0x57a6c8==='list')&&process[_0x4a4b3e(0x1ff)][_0x4a4b3e(0x1f4)]&&!_0x541b03;}export function resolveOutputOptions(_0x4310ac){const _0x1b654a=a57_0x25bc,_0x6d0902=_0x4310ac[_0x1b654a(0x204)]||'',_0xc5195=resolveOutputFormat(_0x4310ac[_0x1b654a(0x1d7)],_0x6d0902,_0x1b654a(0x202));let _0xb399=typeof _0x4310ac['limit']===_0x1b654a(0x205)?_0x4310ac[_0x1b654a(0x20a)]:parseInt(_0x4310ac[_0x1b654a(0x20a)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x4310ac[_0x1b654a(0x20a)]===undefined&&shouldUseLess(_0xc5195,_0x6d0902)&&(_0xb399=Infinity),{'format':_0xc5195,'output':_0x6d0902,'limit':_0xb399,'limitStructuredFormats':_0x4310ac[_0x1b654a(0x1fe)],'color':_0x4310ac['color'],'noColor':_0x4310ac['noColor']};}export function writeOutput(_0x4dd640,_0x20e958,_0x409530){const _0x1eb567=a57_0x25bc;return _0x20e958?(writeFileSync(_0x20e958,_0x4dd640),console[_0x1eb567(0x1da)](_0x1eb567(0x1d4)+_0x20e958),Promise[_0x1eb567(0x1f1)]()):shouldUseLess(_0x409530||'','')?new Promise(_0x3b14b5=>{const _0x3773f1=_0x1eb567,_0x2e2843=spawn(_0x3773f1(0x1db),['-FXRSn'],{'stdio':[_0x3773f1(0x1e4),_0x3773f1(0x1d1),_0x3773f1(0x1d1)]});let _0x51ac93=![];_0x2e2843['on'](_0x3773f1(0x1da),()=>{const _0x2a8b13=_0x3773f1;!_0x51ac93&&(_0x51ac93=!![],console[_0x2a8b13(0x200)](_0x4dd640),_0x3b14b5());}),_0x2e2843['on'](_0x3773f1(0x1ed),()=>{!_0x51ac93&&(_0x51ac93=!![],_0x3b14b5());}),_0x2e2843['on'](_0x3773f1(0x1e3),()=>{const _0x3ff1b4=_0x3773f1;!_0x51ac93&&_0x2e2843[_0x3ff1b4(0x1d5)]&&(_0x2e2843[_0x3ff1b4(0x1d5)]['on'](_0x3ff1b4(0x1da),()=>{}),_0x2e2843[_0x3ff1b4(0x1d5)]['write'](_0x4dd640),_0x2e2843['stdin'][_0x3ff1b4(0x1cf)]());}),!_0x2e2843[_0x3773f1(0x1d5)]&&(!_0x51ac93&&(_0x51ac93=!![],console['log'](_0x4dd640),_0x3b14b5()));}):(console['log'](_0x4dd640),Promise[_0x1eb567(0x1f1)]());}function a57_0x25bc(_0x1b2ec2,_0x18176c){_0x1b2ec2=_0x1b2ec2-0x1c8;const _0x50f949=a57_0x50f9();let _0x25bc36=_0x50f949[_0x1b2ec2];return _0x25bc36;}export async function handleSDKOutput(_0x5bbc38,_0x36ca40){const _0x44692a=a57_0x25bc,_0x3ab0fa=resolveOutputOptions(_0x36ca40),_0xdffe04=await formatSDKOutput(_0x5bbc38,_0x3ab0fa);await writeOutput(_0xdffe04,_0x3ab0fa[_0x44692a(0x204)]||undefined,_0x3ab0fa[_0x44692a(0x1d7)]);}export async function handleQueryOutput(_0x1b5437,_0x3a8748){const _0x359639=a57_0x25bc,_0x59c5b5=resolveOutputOptions(_0x3a8748),_0x27a137=await formatQueryOutput(_0x1b5437,_0x59c5b5);await writeOutput(_0x27a137,_0x59c5b5[_0x359639(0x204)]||undefined,_0x59c5b5[_0x359639(0x1d7)]);}async function formatSingleObject(_0x423f96,_0x2ff902){const _0x3b0611=a57_0x25bc,{format:_0x320775,color:_0x5c5364,noColor:_0x2d13a2}=_0x2ff902,_0x3da381={'color':_0x5c5364,'noColor':_0x2d13a2};if(_0x320775===_0x3b0611(0x1c8)){if(shouldUseColor(_0x3da381))return colorizeJSON(_0x423f96,_0x3da381);return JSON[_0x3b0611(0x1ec)](_0x423f96,null,0x2);}else{if(_0x320775===_0x3b0611(0x1f9)){if(shouldUseColor(_0x3da381))return colorizeJSONCompact(_0x423f96,_0x3da381);return JSON[_0x3b0611(0x1ec)](_0x423f96);}else{if(_0x320775==='tsv')return Object[_0x3b0611(0x1eb)](_0x423f96)[_0x3b0611(0x1e9)](([_0x366676,_0x5d86a5])=>_0x366676+'\x09'+_0x5d86a5)[_0x3b0611(0x1cc)]('\x0a');else{const _0xffb008=Object[_0x3b0611(0x1eb)](_0x423f96);if(_0xffb008[_0x3b0611(0x1ee)]===0x0)return _0x3b0611(0x1c9);const _0x8b88e9=_0x423f96[_0x3b0611(0x1fd)],_0x33342b=_0x423f96['query'],_0x1f6b15=_0x423f96[_0x3b0611(0x1f8)],_0x27d862=_0x423f96[_0x3b0611(0x1cd)],_0x16fc39=_0x33342b?typeof _0x33342b===_0x3b0611(0x1f3)?_0x33342b:JSON[_0x3b0611(0x1ec)](_0x33342b,null,0x2):undefined,_0x3586c6=_0x1f6b15&&Object[_0x3b0611(0x1fa)](_0x1f6b15)[_0x3b0611(0x1ee)]>0x0?JSON[_0x3b0611(0x1ec)](_0x1f6b15,null,0x2):undefined,_0x1a59e8=_0x27d862&&Object[_0x3b0611(0x1fa)](_0x27d862)['length']>0x0?JSON['stringify'](_0x27d862,null,0x2):undefined,_0x25f065=_0xffb008['filter'](([_0x4dc8cd])=>_0x4dc8cd!==_0x3b0611(0x1fd)&&_0x4dc8cd!=='query'&&_0x4dc8cd!==_0x3b0611(0x1f8)&&_0x4dc8cd!==_0x3b0611(0x1cd)),_0x230449=Math[_0x3b0611(0x20f)](..._0x25f065[_0x3b0611(0x1e9)](([_0x149f1c])=>_0x149f1c[_0x3b0611(0x1ee)])),_0x4dbb1d=Math[_0x3b0611(0x20f)](..._0x25f065['map'](([,_0x5eee8e])=>{const _0x350f97=_0x3b0611;try{const _0x126651=_0x5eee8e===null||_0x5eee8e===undefined?'':typeof _0x5eee8e===_0x350f97(0x1d2)?JSON['stringify'](_0x5eee8e):String(_0x5eee8e),_0x354f26=_0x126651[_0x350f97(0x1f2)]('\x0a');return Math['max'](..._0x354f26[_0x350f97(0x1e9)](_0x2ce702=>_0x2ce702[_0x350f97(0x1ee)]),0x0);}catch{return 0x0;}}),0x14),_0x28558a=[];_0x28558a[_0x3b0611(0x1ca)](colorBorder('┌─'+'─'[_0x3b0611(0x1f7)](_0x230449)+'─┬─'+'─'['repeat'](_0x4dbb1d)+'─┐',_0x3da381)),_0x25f065[_0x3b0611(0x203)](([_0x1cdc42,_0x1ff254])=>{const _0x458b83=_0x3b0611;let _0x34bf5a;try{_0x34bf5a=_0x1ff254===null||_0x1ff254===undefined?'':typeof _0x1ff254===_0x458b83(0x1d2)?JSON['stringify'](_0x1ff254):String(_0x1ff254);}catch{_0x34bf5a=_0x458b83(0x1e7);}const _0x1d57f2=_0x1cdc42[_0x458b83(0x1e8)](_0x230449),_0x5c7b58=_0x34bf5a['split']('\x0a');_0x5c7b58['forEach']((_0xca295e,_0x7a2471)=>{const _0x45ad4f=_0x458b83,_0x8bb242=colorBorder('│',_0x3da381);_0x7a2471===0x0?_0x28558a[_0x45ad4f(0x1ca)](_0x8bb242+'\x20'+_0x1d57f2+'\x20'+_0x8bb242+'\x20'+_0xca295e['padEnd'](_0x4dbb1d)+'\x20'+_0x8bb242):_0x28558a[_0x45ad4f(0x1ca)](_0x8bb242+'\x20'+'\x20'['repeat'](_0x230449)+'\x20'+_0x8bb242+'\x20'+_0xca295e[_0x45ad4f(0x1e8)](_0x4dbb1d)+'\x20'+_0x8bb242);});}),_0x28558a[_0x3b0611(0x1ca)](colorBorder('└─'+'─'[_0x3b0611(0x1f7)](_0x230449)+_0x3b0611(0x1cb)+'─'['repeat'](_0x4dbb1d)+'─┘',_0x3da381));_0x16fc39&&(_0x28558a[_0x3b0611(0x1ca)](''),_0x28558a[_0x3b0611(0x1ca)](String(a57_0x3aa974['yellow'][_0x3b0611(0x1d9)](_0x3b0611(0x1e6)))),_0x28558a[_0x3b0611(0x1ca)](_0x16fc39));_0x3586c6&&(_0x28558a[_0x3b0611(0x1ca)](''),_0x28558a['push'](String(a57_0x3aa974[_0x3b0611(0x1dc)]['bold'](_0x3b0611(0x1f0)))),_0x28558a['push'](_0x3586c6));_0x1a59e8&&(_0x28558a['push'](''),_0x28558a[_0x3b0611(0x1ca)](String(a57_0x3aa974[_0x3b0611(0x1dd)][_0x3b0611(0x1d9)](_0x3b0611(0x20c)))),_0x28558a[_0x3b0611(0x1ca)](_0x1a59e8));if(_0x8b88e9){if(_0x8b88e9['stderr']){_0x28558a[_0x3b0611(0x1ca)](''),_0x28558a[_0x3b0611(0x1ca)](String(a57_0x3aa974['red'][_0x3b0611(0x1d9)](_0x3b0611(0x210))));const _0x295bb=_0x8b88e9['stderr'][_0x3b0611(0x1f2)]('\x0a');_0x295bb[_0x3b0611(0x203)](_0x1fe065=>{const _0x4715ec=_0x3b0611;_0x1fe065[_0x4715ec(0x20b)]()&&_0x28558a[_0x4715ec(0x1ca)](_0x1fe065);});}if(_0x8b88e9[_0x3b0611(0x206)]){_0x28558a[_0x3b0611(0x1ca)](''),_0x28558a[_0x3b0611(0x1ca)](String(a57_0x3aa974['cyan'][_0x3b0611(0x1d9)](_0x3b0611(0x1d8))));const _0x4f1d20=_0x8b88e9['cmdout'][_0x3b0611(0x1f2)]('\x0a');_0x4f1d20['forEach'](_0x3c945a=>{const _0xde0d9b=_0x3b0611;_0x3c945a[_0xde0d9b(0x20b)]()&&_0x28558a[_0xde0d9b(0x1ca)](_0x3c945a);});}}return _0x28558a[_0x3b0611(0x1cc)]('\x0a');}}}}function a57_0x50f9(){const _0x2a9c93=['isFinite','Results\x20saved\x20to\x20','stdin','color','format','[logs]','bold','error','less','blue','magenta','2691LsEVcz','varchar','1282400egDBLm','boolean','178520EBwIAJ','spawn','pipe','7334129AYcqcL','[query]','[Object]','padEnd','map','48ypHgcV','entries','stringify','close','length','5910sssfLI','[params]','resolve','split','string','isTTY','data','185ZgncJV','repeat','params','jsonl','keys','2359868RdNAbb','3zfYkWV','debug','limitStructuredFormats','stdout','log','isInteger','table','forEach','output','number','cmdout','double','noColor','771472OjylOl','limit','trim','[rule]','tsv','3298rWCSUG','max','[error]','json','No\x20data','push','─┴─','join','rule','bigint','end','sdk-result','inherit','object'];a57_0x50f9=function(){return _0x2a9c93;};return a57_0x50f9();}export async function handleSingleObjectOutput(_0x4bd9a1,_0x56a4e9){const _0x368eab=a57_0x25bc;if(_0x56a4e9[_0x368eab(0x1d7)]===_0x368eab(0x202)){await handleSDKOutput([_0x4bd9a1],_0x56a4e9);return;}const _0x19aa69=resolveOutputOptions(_0x56a4e9),_0x57e8f3=await formatSingleObject(_0x4bd9a1,_0x19aa69);await writeOutput(_0x57e8f3,_0x19aa69['output']||undefined,_0x19aa69[_0x368eab(0x1d7)]);}
|
|
1
|
+
(function(_0x38eee4,_0x24449c){const _0x3a3c6d=a57_0x1548,_0x5efb13=_0x38eee4();while(!![]){try{const _0x1d0d30=parseInt(_0x3a3c6d(0x19b))/0x1+-parseInt(_0x3a3c6d(0x17a))/0x2+parseInt(_0x3a3c6d(0x18a))/0x3+-parseInt(_0x3a3c6d(0x174))/0x4*(-parseInt(_0x3a3c6d(0x171))/0x5)+-parseInt(_0x3a3c6d(0x197))/0x6+parseInt(_0x3a3c6d(0x1a9))/0x7+parseInt(_0x3a3c6d(0x177))/0x8;if(_0x1d0d30===_0x24449c)break;else _0x5efb13['push'](_0x5efb13['shift']());}catch(_0xc4be8){_0x5efb13['push'](_0x5efb13['shift']());}}}(a57_0x3ec6,0x94f37));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a57_0xf7c121 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x2ea3d9){const _0x19e02e=a57_0x1548;return _0x2ea3d9['format']==='json'||_0x2ea3d9[_0x19e02e(0x172)]===_0x19e02e(0x175)||_0x2ea3d9['format']===_0x19e02e(0x18b)||_0x2ea3d9[_0x19e02e(0x172)]===_0x19e02e(0x1ac)||_0x2ea3d9[_0x19e02e(0x199)]===!![]||_0x2ea3d9[_0x19e02e(0x175)]===!![]||_0x2ea3d9['tsv']===!![]||_0x2ea3d9[_0x19e02e(0x1ac)]===!![];}export function parseOutputOptions(_0x5b5e6d){const _0x51a61b=a57_0x1548;return{'format':_0x5b5e6d['format']||_0x51a61b(0x1ac),'output':_0x5b5e6d[_0x51a61b(0x19d)]||'','limit':_0x5b5e6d[_0x51a61b(0x188)],'limitStructuredFormats':_0x5b5e6d[_0x51a61b(0x187)],'color':_0x5b5e6d['color'],'noColor':_0x5b5e6d[_0x51a61b(0x19f)]};}function convertSDKResultToQueryResult(_0x382c4c){const _0x290d30=a57_0x1548,_0x23d0fe=[];if(_0x382c4c[_0x290d30(0x1a1)]>0x0){const _0x37094b=_0x382c4c[0x0];for(const [_0x228d25,_0x5ec5e9]of Object[_0x290d30(0x1a6)](_0x37094b)){let _0x34f10d=_0x290d30(0x186);if(typeof _0x5ec5e9===_0x290d30(0x17f))_0x34f10d=Number[_0x290d30(0x16d)](_0x5ec5e9)?_0x290d30(0x1a2):_0x290d30(0x1a4);else{if(typeof _0x5ec5e9===_0x290d30(0x16b))_0x34f10d='boolean';else _0x5ec5e9===null&&(_0x34f10d=_0x290d30(0x186));}_0x23d0fe[_0x290d30(0x182)]({'name':_0x228d25,'type':_0x34f10d});}}return{'queryId':_0x290d30(0x183),'columns':_0x23d0fe,'data':_0x382c4c,'stats':{'state':_0x290d30(0x193),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x382c4c[_0x290d30(0x1a1)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x37ace4,_0x4faff7){const _0xd53a96=convertSDKResultToQueryResult(_0x37ace4);return formatQueryOutput(_0xd53a96,_0x4faff7);}export async function formatQueryOutput(_0x43ac8b,_0x3131bf){const _0x24c2ed=a57_0x1548,{format:_0x320c1f,limit:_0x165dc8,output:_0x4cd10d,color:_0x57e64f,noColor:_0x323bd2,limitStructuredFormats:_0x5a0658}=_0x3131bf,_0x10eb35=Boolean(_0x4cd10d)&&!_0x57e64f,_0x3f9af1={'color':_0x57e64f,'noColor':_0x323bd2||_0x10eb35};if(_0x320c1f===_0x24c2ed(0x1ac)){const _0x534c4b=shouldUseLess(_0x320c1f,_0x4cd10d);return formatAsTable(_0x43ac8b,_0x165dc8,_0x534c4b,_0x3f9af1);}const _0xab3754=_0x5a0658&&Number['isFinite'](_0x165dc8)&&_0x43ac8b[_0x24c2ed(0x1af)][_0x24c2ed(0x1a1)]>_0x165dc8?{..._0x43ac8b,'data':_0x43ac8b[_0x24c2ed(0x1af)][_0x24c2ed(0x1a3)](0x0,_0x165dc8)}:_0x43ac8b;if(_0x320c1f==='json')return formatAsJSON(_0xab3754,_0x3f9af1);else return _0x320c1f===_0x24c2ed(0x175)?formatAsJSONL(_0xab3754,_0x3f9af1):formatQueryResult(_0xab3754,_0x320c1f);}function a57_0x3ec6(){const _0x2e60b7=['repeat','isInteger','pipe','max','No\x20data','15GLBjtZ','format','error','38788DFvpDF','jsonl','magenta','7597064FLNnxo','spawn','write','734692XlWcKu','trim','close','-FXRSn','split','number','map','red','push','sdk-result','stdin','color','varchar','limitStructuredFormats','limit','[query]','2906421NFTpXK','tsv','stderr','log','[error]','[params]','yellow','forEach','keys','FINISHED','─┴─','bold','resolve','6693984CbaBNa','join','json','filter','135822ULZzYW','padEnd','output','rule','noColor','object','length','bigint','slice','double','─┬─','entries','cmdout','blue','68320jltSww','params','cyan','table','debug','stringify','data','string','boolean'];a57_0x3ec6=function(){return _0x2e60b7;};return a57_0x3ec6();}function shouldUseLess(_0x41f99e,_0x112a7a){const _0x158f39=a57_0x1548;return(_0x41f99e===_0x158f39(0x1ac)||_0x41f99e==='list')&&process['stdout']['isTTY']&&!_0x112a7a;}export function resolveOutputOptions(_0x395979){const _0x27e42a=a57_0x1548,_0x41718d=_0x395979[_0x27e42a(0x19d)]||'',_0x208fd8=resolveOutputFormat(_0x395979[_0x27e42a(0x172)],_0x41718d,_0x27e42a(0x1ac));let _0x2cbfb2=typeof _0x395979[_0x27e42a(0x188)]===_0x27e42a(0x17f)?_0x395979[_0x27e42a(0x188)]:parseInt(_0x395979[_0x27e42a(0x188)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x395979[_0x27e42a(0x188)]===undefined&&shouldUseLess(_0x208fd8,_0x41718d)&&(_0x2cbfb2=Infinity),{'format':_0x208fd8,'output':_0x41718d,'limit':_0x2cbfb2,'limitStructuredFormats':_0x395979[_0x27e42a(0x187)],'color':_0x395979[_0x27e42a(0x185)],'noColor':_0x395979[_0x27e42a(0x19f)]};}export function writeOutput(_0x25d352,_0x2d56d6,_0x104058){const _0x2e0c98=a57_0x1548;return _0x2d56d6?(writeFileSync(_0x2d56d6,_0x25d352),console['error']('Results\x20saved\x20to\x20'+_0x2d56d6),Promise[_0x2e0c98(0x196)]()):shouldUseLess(_0x104058||'','')?new Promise(_0x5b62f1=>{const _0x560881=_0x2e0c98,_0x2c36e2=spawn('less',[_0x560881(0x17d)],{'stdio':[_0x560881(0x16e),'inherit','inherit']});let _0x10d783=![];_0x2c36e2['on'](_0x560881(0x173),()=>{const _0x218d4e=_0x560881;!_0x10d783&&(_0x10d783=!![],console[_0x218d4e(0x18d)](_0x25d352),_0x5b62f1());}),_0x2c36e2['on'](_0x560881(0x17c),()=>{!_0x10d783&&(_0x10d783=!![],_0x5b62f1());}),_0x2c36e2['on'](_0x560881(0x178),()=>{const _0xa1900d=_0x560881;!_0x10d783&&_0x2c36e2[_0xa1900d(0x184)]&&(_0x2c36e2['stdin']['on'](_0xa1900d(0x173),()=>{}),_0x2c36e2[_0xa1900d(0x184)][_0xa1900d(0x179)](_0x25d352),_0x2c36e2['stdin']['end']());}),!_0x2c36e2[_0x560881(0x184)]&&(!_0x10d783&&(_0x10d783=!![],console['log'](_0x25d352),_0x5b62f1()));}):(console[_0x2e0c98(0x18d)](_0x25d352),Promise[_0x2e0c98(0x196)]());}function a57_0x1548(_0x846296,_0x15f56d){_0x846296=_0x846296-0x16a;const _0x3ec6b4=a57_0x3ec6();let _0x15487a=_0x3ec6b4[_0x846296];return _0x15487a;}export async function handleSDKOutput(_0x4b04c6,_0x43ec81){const _0x916d98=a57_0x1548,_0x426ba7=resolveOutputOptions(_0x43ec81),_0x2bb3c2=await formatSDKOutput(_0x4b04c6,_0x426ba7);await writeOutput(_0x2bb3c2,_0x426ba7[_0x916d98(0x19d)]||undefined,_0x426ba7['format']);}export async function handleQueryOutput(_0x13bbe3,_0x4bf472){const _0x30fab1=a57_0x1548,_0x56281d=resolveOutputOptions(_0x4bf472),_0x11b522=await formatQueryOutput(_0x13bbe3,_0x56281d);await writeOutput(_0x11b522,_0x56281d[_0x30fab1(0x19d)]||undefined,_0x56281d['format']);}async function formatSingleObject(_0x12d65d,_0x25f57a){const _0x4f907b=a57_0x1548,{format:_0x548b33,color:_0xc455d5,noColor:_0x198316}=_0x25f57a,_0x3126cf={'color':_0xc455d5,'noColor':_0x198316};if(_0x548b33===_0x4f907b(0x199)){if(shouldUseColor(_0x3126cf))return colorizeJSON(_0x12d65d,_0x3126cf);return JSON[_0x4f907b(0x1ae)](_0x12d65d,null,0x2);}else{if(_0x548b33===_0x4f907b(0x175)){if(shouldUseColor(_0x3126cf))return colorizeJSONCompact(_0x12d65d,_0x3126cf);return JSON[_0x4f907b(0x1ae)](_0x12d65d);}else{if(_0x548b33===_0x4f907b(0x18b))return Object['entries'](_0x12d65d)['map'](([_0x2b910b,_0x517dd2])=>_0x2b910b+'\x09'+_0x517dd2)[_0x4f907b(0x198)]('\x0a');else{const _0x4287fc=Object[_0x4f907b(0x1a6)](_0x12d65d);if(_0x4287fc[_0x4f907b(0x1a1)]===0x0)return _0x4f907b(0x170);const _0x14e927=_0x12d65d[_0x4f907b(0x1ad)],_0x33bfec=_0x12d65d['query'],_0x2e0163=_0x12d65d['params'],_0x437a9e=_0x12d65d[_0x4f907b(0x19e)],_0x5f0f27=_0x33bfec?typeof _0x33bfec===_0x4f907b(0x16a)?_0x33bfec:JSON[_0x4f907b(0x1ae)](_0x33bfec,null,0x2):undefined,_0x4144a0=_0x2e0163&&Object[_0x4f907b(0x192)](_0x2e0163)[_0x4f907b(0x1a1)]>0x0?JSON[_0x4f907b(0x1ae)](_0x2e0163,null,0x2):undefined,_0x19b1ef=_0x437a9e&&Object['keys'](_0x437a9e)[_0x4f907b(0x1a1)]>0x0?JSON['stringify'](_0x437a9e,null,0x2):undefined,_0x45b943=_0x4287fc[_0x4f907b(0x19a)](([_0x2df9b7])=>_0x2df9b7!==_0x4f907b(0x1ad)&&_0x2df9b7!=='query'&&_0x2df9b7!==_0x4f907b(0x1aa)&&_0x2df9b7!==_0x4f907b(0x19e)),_0x6764e=Math['max'](..._0x45b943[_0x4f907b(0x180)](([_0x5dcd9a])=>_0x5dcd9a[_0x4f907b(0x1a1)])),_0x68b274=Math[_0x4f907b(0x16f)](..._0x45b943[_0x4f907b(0x180)](([,_0x2f4876])=>{const _0x286e5d=_0x4f907b;try{const _0x4c2719=_0x2f4876===null||_0x2f4876===undefined?'':typeof _0x2f4876===_0x286e5d(0x1a0)?JSON['stringify'](_0x2f4876):String(_0x2f4876),_0x39bab1=_0x4c2719['split']('\x0a');return Math[_0x286e5d(0x16f)](..._0x39bab1[_0x286e5d(0x180)](_0x55d6c3=>_0x55d6c3[_0x286e5d(0x1a1)]),0x0);}catch{return 0x0;}}),0x14),_0xcf4960=[];_0xcf4960['push'](colorBorder('┌─'+'─'[_0x4f907b(0x16c)](_0x6764e)+_0x4f907b(0x1a5)+'─'[_0x4f907b(0x16c)](_0x68b274)+'─┐',_0x3126cf)),_0x45b943[_0x4f907b(0x191)](([_0x26abb3,_0x514692])=>{const _0x297ce2=_0x4f907b;let _0x3dd9f6;try{_0x3dd9f6=_0x514692===null||_0x514692===undefined?'':typeof _0x514692===_0x297ce2(0x1a0)?JSON[_0x297ce2(0x1ae)](_0x514692):String(_0x514692);}catch{_0x3dd9f6='[Object]';}const _0x30c440=_0x26abb3[_0x297ce2(0x19c)](_0x6764e),_0x5eb9cc=_0x3dd9f6[_0x297ce2(0x17e)]('\x0a');_0x5eb9cc[_0x297ce2(0x191)]((_0x2ed54e,_0x5526d3)=>{const _0xdef18=_0x297ce2,_0x53c424=colorBorder('│',_0x3126cf);_0x5526d3===0x0?_0xcf4960[_0xdef18(0x182)](_0x53c424+'\x20'+_0x30c440+'\x20'+_0x53c424+'\x20'+_0x2ed54e['padEnd'](_0x68b274)+'\x20'+_0x53c424):_0xcf4960['push'](_0x53c424+'\x20'+'\x20'['repeat'](_0x6764e)+'\x20'+_0x53c424+'\x20'+_0x2ed54e[_0xdef18(0x19c)](_0x68b274)+'\x20'+_0x53c424);});}),_0xcf4960[_0x4f907b(0x182)](colorBorder('└─'+'─'[_0x4f907b(0x16c)](_0x6764e)+_0x4f907b(0x194)+'─'[_0x4f907b(0x16c)](_0x68b274)+'─┘',_0x3126cf));_0x5f0f27&&(_0xcf4960['push'](''),_0xcf4960[_0x4f907b(0x182)](String(a57_0xf7c121[_0x4f907b(0x190)][_0x4f907b(0x195)](_0x4f907b(0x189)))),_0xcf4960[_0x4f907b(0x182)](_0x5f0f27));_0x4144a0&&(_0xcf4960[_0x4f907b(0x182)](''),_0xcf4960[_0x4f907b(0x182)](String(a57_0xf7c121[_0x4f907b(0x1a8)][_0x4f907b(0x195)](_0x4f907b(0x18f)))),_0xcf4960[_0x4f907b(0x182)](_0x4144a0));_0x19b1ef&&(_0xcf4960[_0x4f907b(0x182)](''),_0xcf4960[_0x4f907b(0x182)](String(a57_0xf7c121[_0x4f907b(0x176)][_0x4f907b(0x195)]('[rule]'))),_0xcf4960[_0x4f907b(0x182)](_0x19b1ef));if(_0x14e927){if(_0x14e927[_0x4f907b(0x18c)]){_0xcf4960['push'](''),_0xcf4960[_0x4f907b(0x182)](String(a57_0xf7c121[_0x4f907b(0x181)][_0x4f907b(0x195)](_0x4f907b(0x18e))));const _0x40a0ac=_0x14e927[_0x4f907b(0x18c)][_0x4f907b(0x17e)]('\x0a');_0x40a0ac[_0x4f907b(0x191)](_0x3eb075=>{const _0xdd755f=_0x4f907b;_0x3eb075['trim']()&&_0xcf4960[_0xdd755f(0x182)](_0x3eb075);});}if(_0x14e927[_0x4f907b(0x1a7)]){_0xcf4960[_0x4f907b(0x182)](''),_0xcf4960[_0x4f907b(0x182)](String(a57_0xf7c121[_0x4f907b(0x1ab)][_0x4f907b(0x195)]('[logs]')));const _0x31b372=_0x14e927['cmdout']['split']('\x0a');_0x31b372['forEach'](_0xc308c=>{const _0x1bb65b=_0x4f907b;_0xc308c[_0x1bb65b(0x17b)]()&&_0xcf4960['push'](_0xc308c);});}}return _0xcf4960['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x107fdb,_0x5622d7){const _0x2f71c9=a57_0x1548;if(_0x5622d7[_0x2f71c9(0x172)]===_0x2f71c9(0x1ac)){await handleSDKOutput([_0x107fdb],_0x5622d7);return;}const _0x3d67fd=resolveOutputOptions(_0x5622d7),_0x4834df=await formatSingleObject(_0x107fdb,_0x3d67fd);await writeOutput(_0x4834df,_0x3d67fd['output']||undefined,_0x3d67fd[_0x2f71c9(0x172)]);}
|