@treasuredata/tdx 2026.6.1 → 2026.6.3
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-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/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.d.ts +2 -2
- package/dist/commands/workflow-command.d.ts.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/commands/workflow-command.js.map +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.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.d.ts +23 -1
- package/dist/sdk/client/workflow-client.d.ts.map +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/client/workflow-client.js.map +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workflow.d.ts +1 -1
- package/dist/sdk/types/workflow.d.ts.map +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.d.ts +23 -2
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.d.ts +4 -0
- package/dist/sdk/workflow/push-workflow.d.ts.map +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js.map +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_0x117a6c=a55_0x39fd;(function(_0x2b93a4,_0x3007e5){const _0x28ac7a=a55_0x39fd,_0x49fbee=_0x2b93a4();while(!![]){try{const _0x1bdc6d=-parseInt(_0x28ac7a(0x2ed))/0x1*(-parseInt(_0x28ac7a(0x277))/0x2)+-parseInt(_0x28ac7a(0x29b))/0x3*(-parseInt(_0x28ac7a(0x1a8))/0x4)+parseInt(_0x28ac7a(0x1bf))/0x5*(-parseInt(_0x28ac7a(0x1f8))/0x6)+parseInt(_0x28ac7a(0x1fd))/0x7*(parseInt(_0x28ac7a(0x2f4))/0x8)+parseInt(_0x28ac7a(0x26e))/0x9+-parseInt(_0x28ac7a(0x2f9))/0xa*(-parseInt(_0x28ac7a(0x289))/0xb)+-parseInt(_0x28ac7a(0x2b8))/0xc;if(_0x1bdc6d===_0x3007e5)break;else _0x49fbee['push'](_0x49fbee['shift']());}catch(_0x1a21f3){_0x49fbee['push'](_0x49fbee['shift']());}}}(a55_0x5b0d,0xcdf0c));import a55_0x11b5bd from'chalk';import{existsSync}from'fs';import a55_0x22acec from'path';function a55_0x39fd(_0x1aefeb,_0xcfac71){_0x1aefeb=_0x1aefeb-0x176;const _0x5b0d8f=a55_0x5b0d();let _0x39fd6c=_0x5b0d8f[_0x1aefeb];return _0x39fd6c;}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';function a55_0x5b0d(){const _0x5e8acf=['55118724SkUzrl','List\x20workflow\x20execution\x20sessions','start','workflow','\x20session','size','attempt','\x20from\x20session\x20','metadata','trimEnd','\x20\x20Revision:\x20','duration','applyPullProject','requireProject','Parameters:\x20','state','diff','Deleting\x20project\x20','getFullYear','taskName','splice','No\x20attempts\x20found\x20in\x20project:\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','title','from','\x20(use\x20--limit\x20to\x20show\x20more)','total','\x20secrets...','listSecrets','workflow:delete','workflow:schedule:enable','Validation:\x20skipped','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Listing\x20schedules...','\x20has\x20no\x20attempts','\x0a⚠\x20Project\x20\x22','Error:\x20Project\x20name\x20is\x20required','\x20-\x20','length','No\x20log\x20content\x20found','Setting\x20','\x0aApply\x20these\x20changes?','---\x20','now','\x20\x20Source:\x20','Reason:\x20','basename','fromTask','limit','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','\x20of\x20','/sessions/','sys','535917qelIaN','Target:\x20','done','\x20schedule','startsWith','Killing\x20attempt...','Project\x20filter:\x20','8elnupq','workflowProject','MAX_TASKS_DISPLAY','json','push','9691820QhvMyk','\x0aError:','Analyzing\x20changes...','isDirectory','workflow:use','Include\x20retried:\x20yes','write','green','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','executePushProject','\x0aDry\x20run\x20-\x20nothing\x20pushed','max','Downloading\x20project\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','name','hasChanges','tasks','\x0a✔\x20Already\x20up\x20to\x20date','filter','workflow:clone','MAX_LABEL_COUNT','Failed\x20to\x20fetch\x20attempt\x20data','deleteSecret','Downloading\x20logs...','fill','✔\x20Project:\x20','canceling','workflows','localeCompare','stdout','Schedule\x20ID\x20is\x20required','replace','tdx\x20wf\x20attempt\x20','Project\x20name\x20is\x20required','logs','workflow:download','Workflow:\x20','Pulling\x20project\x20','relative','Error:','displayLine','repeat','Auto-selected\x20latest\x20session:\x20','New\x20project\x20name:\x20','Retrying\x20attempt...','toISOString','Project\x20directory:\x20','floor','→\x20Project:\x20','\x20deleted','Dry\x20run:\x20yes','Filter:\x20project=','message','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','pollTimeline','dim','rows','Setting\x20secret...','Workflow:','\x0aPolling...\x20(','Secrets\x20to\x20set:\x20','Pushing\x20project...','\x20modified','Project:\x20','\x20\x20Location:\x20','autocomplete','\x22\x20with\x20new\x20revision?','List\x20workflow\x20attempts','workflow:timeline','✔\x20Clone\x20complete','value','fileSize','MAX_POLL_ITERATIONS','find','workflow:projects','fs/promises','\x22\x20already\x20exists\x20(ID:\x20','showWorkflowConsoleUrl','substring','parse','every','attemptId','jsonl','unknown','sourceProjectName','toLowerCase','Task\x20name:\x20','msPerChar','\x20\x20Console:\x20','path','context','get','\x27...','min','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','List\x20workflows','data','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','follow','(unknown)','resolveProject','session_id','Expected\x20format:\x20--param\x20key=value','Start\x20a\x20workflow\x20run','Error:\x20Invalid\x20parameter\x20format:\x20','all','isArray','deleted','🔄\x20','renderSingleTimeline','startTime','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','projectName','\x20\x20Files\x20extracted:\x20','No\x20workflows\x20found','No\x20workflow\x20projects\x20found','/app/workflows/','\x20\x20Attempt\x20ID:\x20','580KTvcMs','\x20\x20Next\x20run:\x20','Using\x20attempt\x20','includeRetried','navigateSessionsInteractive','delete','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','workflow:upload','No\x20sessions\x20with\x20timing\x20information','Params:\x20','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Pull\x20workflow\x20project\x20to\x20local\x20folder','getHours','\x20disabled\x20(','keys','cyan','output','projects','workflow:secrets:delete','workflow:sessions','retryAttemptName','indexOf','✔\x20Secret\x20\x27','10DnHyny','error','renderSessionsTimeline','\x20workflow','No\x20projects\x20match\x20pattern:\x20','stat','format','workflow:push','set','No\x20workflows\x20found\x20in\x20project:\x20','log','filesExtracted','Show\x20tasks\x20for\x20an\x20attempt','list','Session\x20time:','new','Including\x20subtasks:\x20yes','Show\x20logs\x20for\x20a\x20workflow\x20attempt','description','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','unchanged','\x0a✔\x20No\x20changes\x20to\x20push','Status:\x20','Retrying\x20session...','Deleting\x20secret...','targetDir','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','No\x20schedules\x20found','trim','workflow:secrets:list','updatedAt','\x20unchanged','workflow:tasks','type','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20\x20New\x20attempt\x20ID:\x20',',\x20Workflow:\x20','fullName','end','LABEL_WIDTH_DIVISOR','✔\x20Push\x20complete','\x20\x20Session\x20ID:\x20','getDate','params','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','retrySession','blue','verbose','some','Error:\x20Attempt\x20ID\x20is\x20required','-\x20nothing\x20pushed','ICON_WIDTH','columns','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Tip:\x20cd\x20to\x20workflows/','createdAt','1680234WdcugD','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','\x20\x20Target:\x20','split','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','7786842dkBTcu','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','attempts','...','targetExists','Fetching\x20workflow\x20','GUTTER','workflow:logs','renderTimeline','pullProject','padStart','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','nextRunTime','changes','Usage:\x20workflow:delete\x20<project-name-or-id>','utf-8','red','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','getMonth','Output\x20directory:\x20','session:','List\x20all\x20workflow\x20projects','session','✔\x20Downloaded\x20','success','📋\x20','Listing\x20workflows...','Attempt\x20ID:\x20','join','kill','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','workflowName','\x20\x20Session\x20context\x20set\x20to:\x20','executeDryRun','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','sessions','sessionTime','📅\x20#','startedAt','Invalid\x20format:\x20','workflow:schedules','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','No\x20matching\x20sessions\x20found','Select\x20a\x20session\x20to\x20view\x20timeline:','disableSchedule','Key:\x20','modified','sort','resumeFrom','resolve','readFile','Session\x20not\x20found:\x20','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','executeCloneProject','\x20\x20Project\x20ID:\x20','existingProjectId','finishedAt','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Files\x20to\x20upload:\x20','running','\x20\x20Changes:\x20','window','Session\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','planned','✔\x20Workflow\x20run\x20started','\x20to\x20see\x20detailed\x20logs','sourceDir','-\x20no\x20files\x20written','\x20new','MIN_TIMELINE_WIDTH','Total:\x20','pending','task','\x20logs','enableSchedule','workflow:run','\x20secret','Revision:\x20','Key\x20cannot\x20be\x20empty','POLL_INTERVAL_MS','key','No\x20sessions\x20found\x20in\x20project:\x20','Pushing\x20workflow\x20project...','getTime','\x1b[1A\x1b[2K','table','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','retryAttempt','yes','Source\x20directory:\x20','parseProjectWorkflowPattern','Cloning\x20to\x20','white','No\x20sessions\x20found','cancelRequested','values','No\x20attempts\x20found','durationMs','projectId','newProjectName','\x20\x20Project:\x20','site','bold','/attempt/','Listing\x20workflow\x20attempts...','MAX_TIMELINE_WIDTH','tdx.json','match','List\x20workflow\x20schedules','workflow:secrets:set','getMinutes','Latest\x20session\x20has\x20no\x20attempt','10104327wuXkSn','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','includes','✔\x20Schedule\x20#','param','map','Show\x20specific\x20attempt\x20details','attempt:','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','6sPKtSW','Resolving\x20project\x20\x27','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','lastAttempt','project','\x20(system)','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x0aDry\x20run\x20-\x20no\x20project\x20created','Error:\x20Secret\x20key\x20is\x20required','Warning:','✔\x20Deleted\x20project\x20','workflow:workflows','✔\x20Workflow\x20project\x20context\x20cleared.','revision','Loading\x20sessions...','✔\x20Pushed\x20','Enable\x20a\x20workflow\x20schedule','11tSayZZ','✔\x20Found\x20','\x20next:\x20','LABEL_MIN_SPACING','workflow:kill','icon','✔\x20Workflow\x20project\x20set\x20to:\x20','Source\x20project:\x20','status','preparePushProject','No\x20attempts\x20found\x20for:\x20','clear','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','summary','sessionId','resolveProjectDir','skipValidation','TASK_NAME_WIDTH','24513xxYLWg','Select\x20a\x20workflow\x20to\x20run','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','ICON_SPACING','prepareCloneProject','No\x20sessions\x20found\x20for:\x20','cwd','toLocaleString','force','Cancelled','Parameters:','logFiles','slice','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','Updating\x20','select','stringify','workflow:attempts','generateSessionTimelineRows','\x0aDry\x20run\x20-\x20no\x20files\x20written','dryRun','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Getting\x20attempt\x20tasks...','execute','yellow','isTTY','Filter:\x20','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','Kill\x20a\x20running\x20attempt'];a55_0x5b0d=function(){return _0x5e8acf;};return a55_0x5b0d();}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_0x53e091 from'prompts';function getAttemptStatusDisplay(_0x53fc70){const _0x89fe32=a55_0x39fd;if(!_0x53fc70)return{'icon':'⏳','text':''};const {done:_0x2963f9,success:_0x16a639,cancelRequested:_0x4d04b7}=_0x53fc70;if(!_0x2963f9)return _0x4d04b7?{'icon':'🛑','text':a55_0x11b5bd[_0x89fe32(0x2b3)](_0x89fe32(0x314))}:{'icon':'🔄','text':a55_0x11b5bd[_0x89fe32(0x1ee)](_0x89fe32(0x238))};if(_0x16a639)return{'icon':'✅','text':a55_0x11b5bd[_0x89fe32(0x300)](_0x89fe32(0x215))};return{'icon':'❌','text':a55_0x11b5bd[_0x89fe32(0x20d)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x117a6c(0x196)](_0x41aa87,_0x4c893b,_0x1adebb=0x0){const _0x7da159=a55_0x117a6c;return _0x41aa87[_0x1adebb]||_0x4c893b[_0x7da159(0x2f5)];}[a55_0x117a6c(0x2c5)](_0x58e5c0,_0x64436c,_0x1f69c7=0x0){const _0x518544=a55_0x117a6c,_0x2d00b1=this[_0x518544(0x196)](_0x58e5c0,_0x64436c,_0x1f69c7);if(!_0x2d00b1)return console[_0x518544(0x1c0)](a55_0x11b5bd[_0x518544(0x20d)](_0x518544(0x321)),'Project\x20name\x20is\x20required'),console[_0x518544(0x1c0)](a55_0x11b5bd['dim'](_0x518544(0x254))),null;return _0x2d00b1;}['parseProjectWorkflowPattern'](_0x4ecbc5,_0x56295c){const _0x3d78c7=a55_0x117a6c;if(_0x4ecbc5[0x0]){const _0x81883=_0x4ecbc5[0x0][_0x3d78c7(0x1fb)]('.');if(_0x81883[_0x3d78c7(0x2de)]===0x1)return{'projectName':_0x81883[0x0],'workflowName':undefined};else return _0x81883['length']===0x2?{'projectName':_0x81883[0x0],'workflowName':_0x81883[0x1]}:(console[_0x3d78c7(0x1c0)](a55_0x11b5bd[_0x3d78c7(0x20d)](_0x3d78c7(0x321)),_0x3d78c7(0x20e)),null);}return{'projectName':_0x56295c[_0x3d78c7(0x2f5)],'workflowName':undefined};}['resolveProjectDir'](_0x3f7b65,_0x17a3db,_0x139619=0x0){const _0x24d3a8=a55_0x117a6c;if(_0x3f7b65[_0x139619])return _0x3f7b65[_0x139619];if(_0x17a3db[_0x24d3a8(0x2f5)]){const _0x38af69=a55_0x22acec[_0x24d3a8(0x219)](process['cwd'](),_0x24d3a8(0x315),_0x17a3db[_0x24d3a8(0x2f5)]);if(existsSync(a55_0x22acec[_0x24d3a8(0x219)](_0x38af69,_0x24d3a8(0x268))))return _0x38af69;}return undefined;}async[a55_0x117a6c(0x17f)](_0x481320,_0x3f1f93,_0x52cfa2){const _0x1f129e=a55_0x117a6c;try{const _0x2ba951=await _0x481320[_0x1f129e(0x2bb)][_0x1f129e(0x315)](_0x3f1f93,{'limit':0x1});if(_0x2ba951[_0x1f129e(0x2de)]>0x0){const _0x1fba26=_0x2ba951[0x0]['id'],_0x1273b6=getWorkflowUrl(_0x52cfa2,_0x1fba26);console['error']('\x20\x20Console:\x20'+a55_0x11b5bd[_0x1f129e(0x1b7)](_0x1273b6));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x2fd);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x29d);async[a55_0x117a6c(0x2b2)](_0xbbf4d3){const _0x4dfa69=a55_0x117a6c,{options:_0x2c3236,args:_0x34ca60,tdx:_0x57c798}=_0xbbf4d3,_0x4bac31=_0x34ca60[0x0],_0x271730=_0x2c3236[_0x4dfa69(0x294)];if(_0x271730)return saveSessionContext({'workflow_project':undefined},_0x2c3236[_0x4dfa69(0x213)]),console[_0x4dfa69(0x1c9)](a55_0x11b5bd[_0x4dfa69(0x300)](_0x4dfa69(0x284))),0x0;if(!_0x4bac31)return console[_0x4dfa69(0x1c0)](a55_0x11b5bd[_0x4dfa69(0x20d)](_0x4dfa69(0x321)),'Project\x20name\x20is\x20required'),console[_0x4dfa69(0x1c0)](a55_0x11b5bd[_0x4dfa69(0x331)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x4dfa69(0x1c0)](a55_0x11b5bd[_0x4dfa69(0x331)](_0x4dfa69(0x307))),0x1;const _0x1e6667=await withSpinner(_0x4dfa69(0x278)+_0x4bac31+_0x4dfa69(0x18e),()=>_0x57c798['workflow']['resolveProjectId'](_0x4bac31),{'verbose':_0x2c3236[_0x4dfa69(0x1ef)]}),{name:_0x4c88a3}=_0x1e6667['data'];return saveSessionContext({'workflow_project':_0x4c88a3},_0x2c3236[_0x4dfa69(0x213)]),console[_0x4dfa69(0x1c9)](a55_0x11b5bd[_0x4dfa69(0x300)](_0x4dfa69(0x28f)+a55_0x11b5bd[_0x4dfa69(0x1b7)](_0x4c88a3))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a55_0x117a6c(0x17c);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x212);async['execute'](_0x57fae5){const _0x50fea9=a55_0x117a6c,{options:_0x469958,args:_0x28cab8,tdx:_0xd8b288}=_0x57fae5,_0x56cfcd=_0x28cab8[0x0];_0x469958['verbose']&&_0x56cfcd&&console[_0x50fea9(0x1c0)]('Pattern:\x20'+_0x56cfcd);const _0x7cb26d=await withSpinner('Listing\x20workflow\x20projects...',()=>_0xd8b288[_0x50fea9(0x2bb)][_0x50fea9(0x1b9)](_0x56cfcd,{'limit':_0x469958[_0x50fea9(0x2e8)]}),{'verbose':_0x469958['verbose']});let _0x1c7561=_0x7cb26d[_0x50fea9(0x192)];_0x1c7561['sort']((_0x3e1b5b,_0xdf9dfc)=>_0x3e1b5b[_0x50fea9(0x308)]['localeCompare'](_0xdf9dfc[_0x50fea9(0x308)]));const _0x276e1e=_0x469958[_0x50fea9(0x2e8)]&&_0x1c7561[_0x50fea9(0x2de)]>=_0x469958[_0x50fea9(0x2e8)]?a55_0x11b5bd[_0x50fea9(0x331)](_0x50fea9(0x2d1)):'';console[_0x50fea9(0x1c0)](_0x50fea9(0x28a)+_0x1c7561[_0x50fea9(0x2de)]+'\x20project'+(_0x1c7561['length']!==0x1?'s':'')+_0x276e1e);if(_0x469958[_0x50fea9(0x1c5)]===_0x50fea9(0x2f7)||_0x469958[_0x50fea9(0x1c5)]==='jsonl'||_0x469958[_0x50fea9(0x1c5)]===_0x50fea9(0x253))await handleSDKOutput(_0x1c7561,_0x469958);else{if(_0x1c7561[_0x50fea9(0x2de)]===0x0)_0x56cfcd?console[_0x50fea9(0x1c9)](_0x50fea9(0x1c3)+_0x56cfcd):console[_0x50fea9(0x1c9)](_0x50fea9(0x1a5));else{const _0x59e712=_0x1c7561[_0x50fea9(0x273)](_0x1abe4f=>{const _0x1231ff=_0x50fea9,_0x505dec=_0x1abe4f[_0x1231ff(0x2c0)]?.[_0x1231ff(0x1f0)](_0x241cf4=>_0x241cf4[_0x1231ff(0x24e)]===_0x1231ff(0x2ec)),_0x5c894=_0x505dec?a55_0x11b5bd[_0x1231ff(0x331)](_0x1231ff(0x27c)):'';return'📁\x20'+_0x1abe4f['name']+_0x5c894;});await writeOutput(_0x59e712[_0x50fea9(0x219)]('\x0a'),_0x469958[_0x50fea9(0x1b8)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x283);['description']=a55_0x117a6c(0x191);async[a55_0x117a6c(0x2b2)](_0x5cec18){const _0x53b1ae=a55_0x117a6c,{options:_0x36e5c0,args:_0x4021bf,tdx:_0x4ed514}=_0x5cec18,_0x372f14=this['resolveProject'](_0x4021bf,_0x36e5c0);_0x36e5c0['verbose']&&_0x372f14&&console[_0x53b1ae(0x1c0)](_0x53b1ae(0x2f3)+_0x372f14);const _0xe1437c=await withSpinner(_0x53b1ae(0x217),()=>_0x4ed514[_0x53b1ae(0x2bb)][_0x53b1ae(0x315)](_0x372f14,{'limit':_0x36e5c0['limit']}),{'verbose':_0x36e5c0[_0x53b1ae(0x1ef)]});let _0x42c8ca=_0xe1437c[_0x53b1ae(0x192)];_0x42c8ca['sort']((_0x597b23,_0xb5a92c)=>{const _0x1361ef=_0x53b1ae,_0x2a3ca5=_0x597b23['name'][_0x1361ef(0x316)](_0xb5a92c[_0x1361ef(0x308)]);if(_0x2a3ca5!==0x0)return _0x2a3ca5;return(_0x597b23['project']?.['name']||'')['localeCompare'](_0xb5a92c['project']?.[_0x1361ef(0x308)]||'');});const _0x2116d7=_0x36e5c0[_0x53b1ae(0x2e8)]&&_0x42c8ca[_0x53b1ae(0x2de)]>=_0x36e5c0[_0x53b1ae(0x2e8)]?a55_0x11b5bd[_0x53b1ae(0x331)](_0x53b1ae(0x2d1)):'';console[_0x53b1ae(0x1c0)](_0x53b1ae(0x28a)+_0x42c8ca[_0x53b1ae(0x2de)]+_0x53b1ae(0x1c2)+(_0x42c8ca[_0x53b1ae(0x2de)]!==0x1?'s':'')+_0x2116d7);if(_0x36e5c0[_0x53b1ae(0x1c5)]===_0x53b1ae(0x2f7)||_0x36e5c0[_0x53b1ae(0x1c5)]===_0x53b1ae(0x184)||_0x36e5c0['format']===_0x53b1ae(0x253))await handleSDKOutput(_0x42c8ca,_0x36e5c0);else{if(_0x42c8ca[_0x53b1ae(0x2de)]===0x0)_0x372f14?console[_0x53b1ae(0x1c9)](_0x53b1ae(0x1c8)+_0x372f14):console['log'](_0x53b1ae(0x1a4));else{const _0x1eb33d=_0x36e5c0['site'],_0x56e196=_0x42c8ca['map'](_0x21ce02=>{const _0x4eee91=_0x53b1ae,_0x510d37=a55_0x11b5bd['dim']('#'+_0x21ce02['id']),_0x7a04c8=hyperlink(_0x510d37,getWorkflowUrl(_0x1eb33d,_0x21ce02['id'])),_0x3386f3=_0x21ce02[_0x4eee91(0x27b)]?.[_0x4eee91(0x308)]?a55_0x11b5bd[_0x4eee91(0x331)]('\x20('+_0x21ce02[_0x4eee91(0x27b)][_0x4eee91(0x308)]+')'):'';return _0x4eee91(0x216)+_0x7a04c8+'\x20'+_0x21ce02[_0x4eee91(0x308)]+_0x3386f3;});await writeOutput(_0x56e196[_0x53b1ae(0x219)]('\x0a'),_0x36e5c0[_0x53b1ae(0x1b8)],_0x53b1ae(0x1cc));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x1bb);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x2b9);async['execute'](_0xb04daf){const _0x2ab6cd=a55_0x117a6c,{options:_0x5d856c,args:_0x6535f4,tdx:_0x4ee669}=_0xb04daf,_0x18b8e1=this[_0x2ab6cd(0x258)](_0x6535f4,_0x5d856c);if(!_0x18b8e1)return 0x1;const {projectName:_0x2952cb,workflowName:_0x163eda}=_0x18b8e1;if(_0x5d856c['verbose']){if(_0x2952cb&&_0x163eda)console[_0x2ab6cd(0x1c0)]('Filter:\x20'+_0x2952cb+'.'+_0x163eda);else _0x2952cb&&console[_0x2ab6cd(0x1c0)](_0x2ab6cd(0x32d)+_0x2952cb);const _0x21cd0e=_0x5d856c[_0x2ab6cd(0x291)];_0x21cd0e&&console[_0x2ab6cd(0x1c0)](_0x2ab6cd(0x1d5)+_0x21cd0e);}let _0x148895=0x28;if(process[_0x2ab6cd(0x317)][_0x2ab6cd(0x2b4)]&&!_0x5d856c[_0x2ab6cd(0x1b8)]&&!_0x5d856c[_0x2ab6cd(0x1c5)]){const _0x741966=process['stdout'][_0x2ab6cd(0x332)]||0x28;_0x148895=Math[_0x2ab6cd(0x305)](0x14,Math[_0x2ab6cd(0x329)](_0x741966*0x2/0x3));}const _0x4dc7d9=_0x5d856c[_0x2ab6cd(0x2e8)]||_0x148895,_0x56394c=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x4ee669[_0x2ab6cd(0x2bb)][_0x2ab6cd(0x220)]({'projectName':_0x2952cb,'workflowName':_0x163eda,'status':_0x5d856c[_0x2ab6cd(0x291)],'fromTime':_0x5d856c[_0x2ab6cd(0x2d0)],'toTime':_0x5d856c['to'],'limit':_0x4dc7d9}),{'verbose':_0x5d856c[_0x2ab6cd(0x1ef)]}),_0x3eb04c=_0x56394c['data'];_0x3eb04c[_0x2ab6cd(0x22c)]((_0x11f875,_0x531d2a)=>{const _0x4f8d68=_0x2ab6cd,_0x523481=_0x11f875[_0x4f8d68(0x221)]||'',_0x35c11b=_0x531d2a[_0x4f8d68(0x221)]||'';return _0x35c11b[_0x4f8d68(0x316)](_0x523481);});_0x3eb04c[_0x2ab6cd(0x2de)]>=_0x4dc7d9?console[_0x2ab6cd(0x1c0)]('✔\x20Showing\x20'+_0x3eb04c[_0x2ab6cd(0x2de)]+'\x20sessions\x20'+a55_0x11b5bd['dim']('(use\x20--limit\x20to\x20see\x20more)')):console['error'](_0x2ab6cd(0x28a)+_0x3eb04c[_0x2ab6cd(0x2de)]+_0x2ab6cd(0x2bc)+(_0x3eb04c['length']!==0x1?'s':''));if(_0x5d856c['format']===_0x2ab6cd(0x2f7)||_0x5d856c[_0x2ab6cd(0x1c5)]===_0x2ab6cd(0x184)||_0x5d856c[_0x2ab6cd(0x1c5)]===_0x2ab6cd(0x253))await handleSDKOutput(_0x3eb04c,_0x5d856c);else{if(!process[_0x2ab6cd(0x317)][_0x2ab6cd(0x2b4)]||_0x5d856c['output']){if(_0x3eb04c[_0x2ab6cd(0x2de)]===0x0){if(_0x2952cb&&_0x163eda)console[_0x2ab6cd(0x1c9)](_0x2ab6cd(0x2a0)+_0x2952cb+'.'+_0x163eda);else _0x2952cb?console['log'](_0x2ab6cd(0x24f)+_0x2952cb):console['log'](_0x2ab6cd(0x25b));}else{const _0x200cea=_0x5d856c[_0x2ab6cd(0x263)],_0x33b88d=this[_0x2ab6cd(0x1c1)](_0x3eb04c,_0x200cea);_0x5d856c[_0x2ab6cd(0x1b8)]?await writeOutput(_0x33b88d,_0x5d856c[_0x2ab6cd(0x1b8)],_0x2ab6cd(0x1cc)):console['log'](_0x33b88d);}!_0x2952cb&&(console[_0x2ab6cd(0x1c0)](''),console['error'](a55_0x11b5bd['dim'](_0x2ab6cd(0x27e))),console[_0x2ab6cd(0x1c0)](a55_0x11b5bd[_0x2ab6cd(0x331)](_0x2ab6cd(0x32f))+'or'+a55_0x11b5bd[_0x2ab6cd(0x331)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x3eb04c[_0x2ab6cd(0x2de)]===0x0){if(_0x2952cb&&_0x163eda)console[_0x2ab6cd(0x1c9)](_0x2ab6cd(0x2a0)+_0x2952cb+'.'+_0x163eda);else _0x2952cb?console[_0x2ab6cd(0x1c9)](_0x2ab6cd(0x24f)+_0x2952cb):console['log'](_0x2ab6cd(0x25b));}else await this[_0x2ab6cd(0x1ac)](_0x3eb04c,_0xb04daf,_0x2952cb);}}return 0x0;}['renderSessionsTimeline'](_0x14e12a,_0x5d67cd){const _0x340f27=a55_0x117a6c,_0x2b37a9=[],_0x2552c0=new Map();let _0x572c88=Infinity,_0x1136ca=-Infinity;for(const _0xe5ee0f of _0x14e12a){if(_0xe5ee0f[_0x340f27(0x27a)]?.[_0x340f27(0x1f7)]){const _0x282ed1=new Date(_0xe5ee0f[_0x340f27(0x27a)][_0x340f27(0x1f7)])['getTime'](),_0x5c8362=_0xe5ee0f[_0x340f27(0x27a)]['finishedAt']?new Date(_0xe5ee0f[_0x340f27(0x27a)][_0x340f27(0x235)])[_0x340f27(0x251)]():Date[_0x340f27(0x2e3)](),_0x180d79=_0xe5ee0f['project']?.[_0x340f27(0x308)]||_0x340f27(0x195);!_0x2552c0['has'](_0x180d79)&&_0x2552c0['set'](_0x180d79,[]),_0x2552c0[_0x340f27(0x18d)](_0x180d79)[_0x340f27(0x2f8)]({'session':_0xe5ee0f,'startTime':_0x282ed1,'endTime':_0x5c8362,'duration':_0x5c8362-_0x282ed1}),_0x572c88=Math[_0x340f27(0x18f)](_0x572c88,_0x282ed1),_0x1136ca=Math['max'](_0x1136ca,_0x5c8362);}}if(_0x2552c0[_0x340f27(0x2bd)]===0x0)return _0x340f27(0x1b0);const _0x5a3224=process[_0x340f27(0x317)][_0x340f27(0x1f4)]||0x78,_0x21f47b=0x1e,_0x381efd=0x32,_0x2a4f1f=0x4,_0x5d48d3=Math['min'](_0x381efd,Math['max'](_0x21f47b,Math['floor'](_0x5a3224*0.3))),_0x50a3c1=_0x5a3224-_0x5d48d3-TIMELINE_CONFIG[_0x340f27(0x203)]-0x3-_0x2a4f1f,_0x332edc=_0x1136ca-_0x572c88,_0x84e4ee=_0x332edc/_0x5d48d3,_0x2286d4=renderTimeAxis({'startTime':_0x572c88,'endTime':_0x1136ca,'durationMs':_0x332edc,'msPerChar':_0x84e4ee},_0x5d48d3),_0x9b4b4a=[];for(const _0xa67be2 of _0x2552c0[_0x340f27(0x25d)]()){_0x9b4b4a['push'](..._0xa67be2);}_0x9b4b4a[_0x340f27(0x22c)]((_0x56a981,_0xb7ec11)=>_0xb7ec11[_0x340f27(0x1a0)]-_0x56a981[_0x340f27(0x1a0)]);const _0x504762=new Date(_0x572c88),_0x1a5aa7=formatDate(_0x504762),_0x1cf3c1=_0x2a4f1f+TIMELINE_CONFIG[_0x340f27(0x1f3)]+TIMELINE_CONFIG[_0x340f27(0x29e)]+_0x50a3c1,_0x35c363='\x20'['repeat'](_0x1cf3c1-_0x1a5aa7['length']),_0x2d5624=_0x35c363+a55_0x11b5bd['dim'](_0x1a5aa7)+'\x20'+_0x2286d4;_0x2b37a9['push'](_0x2d5624);const _0x18f43e=0x16;let _0xf31e70=0x0;for(const _0x5be5d2 of _0x9b4b4a){const _0x404cd0=_0x5be5d2[_0x340f27(0x213)][_0x340f27(0x27b)]?.['name']||'?',_0x35a932=Math[_0x340f27(0x18f)](stringWidth(_0x404cd0),_0x18f43e);_0xf31e70=Math[_0x340f27(0x305)](_0xf31e70,_0x35a932);}for(const _0x32b8cd of _0x9b4b4a){const {session:_0x39c8e1,startTime:_0x5ddadf,endTime:_0x3e2f58,duration:_0x53a28e}=_0x32b8cd,_0x56d08b=_0x39c8e1[_0x340f27(0x27b)]?.['id'],_0x3c2eb8=_0x39c8e1['id'],_0x51edca=_0x39c8e1['project']?.[_0x340f27(0x308)]||'?',_0x4e6886=_0x39c8e1['workflow']?.[_0x340f27(0x308)]||'?';let _0x542a02,_0x22cdb2;if(_0x39c8e1['lastAttempt']){const _0x588da3=_0x39c8e1[_0x340f27(0x27a)];!_0x588da3[_0x340f27(0x2ef)]?(_0x542a02=_0x588da3[_0x340f27(0x25c)]?'🛑':'🔄',_0x22cdb2=_0x588da3[_0x340f27(0x25c)]?a55_0x11b5bd['yellow']:a55_0x11b5bd['blue']):(_0x542a02=_0x588da3[_0x340f27(0x215)]?'✅':'❌',_0x22cdb2=_0x588da3[_0x340f27(0x215)]?a55_0x11b5bd[_0x340f27(0x300)]:a55_0x11b5bd[_0x340f27(0x20d)]);}else _0x542a02='⏳',_0x22cdb2=a55_0x11b5bd[_0x340f27(0x331)];const _0x3d8373='#'+_0x3c2eb8,_0x436827=_0x56d08b?hyperlink(_0x3d8373,getWorkflowSessionUrl(_0x5d67cd,_0x56d08b,_0x3c2eb8)):_0x3d8373;let _0x5cdb65=_0x51edca;stringWidth(_0x51edca)>_0x18f43e&&(_0x5cdb65=_0x51edca['slice'](0x0,_0x18f43e-0x1)+'…');const _0x259b38=a55_0x11b5bd[_0x340f27(0x331)](_0x5cdb65),_0x1b11e3=stringWidth(_0x5cdb65),_0x658737='\x20'['repeat'](_0xf31e70-stringWidth(_0x5cdb65)+0x2),_0x2833c7='('+formatElapsed(_0x53a28e)+')',_0x55f4de=stringWidth(_0x2833c7),_0x4e136b=stringWidth(_0x3d8373),_0x460f57=_0x4e136b+0x1+_0x1b11e3+_0x658737[_0x340f27(0x2de)],_0x3a245d=_0x50a3c1-_0x460f57-_0x55f4de-0x1-0x8;let _0x3ebac5=_0x4e6886;stringWidth(_0x3ebac5)>_0x3a245d&&(_0x3ebac5=_0x3ebac5[_0x340f27(0x2a7)](0x0,_0x3a245d-0x1)+'…');const _0x527461=_0x436827+'\x20'+_0x259b38+_0x658737+_0x3ebac5,_0x34355c=stringWidth(_0x527461),_0x144d26=_0x50a3c1-_0x34355c-_0x55f4de,_0x295de2=_0x527461+'\x20'['repeat'](Math[_0x340f27(0x305)](0x1,_0x144d26))+a55_0x11b5bd['dim'](_0x2833c7),_0x4e1f55=Math[_0x340f27(0x329)]((_0x5ddadf-_0x572c88)/_0x84e4ee),_0x409f3d=Math['floor']((_0x3e2f58-_0x572c88)/_0x84e4ee),_0xe68d8d=Math[_0x340f27(0x305)](_0x4e1f55+0x1,_0x409f3d),_0x34d1fa=new Array(_0x5d48d3)[_0x340f27(0x312)]('\x20');for(let _0x23eec9=_0x4e1f55;_0x23eec9<Math[_0x340f27(0x18f)](_0xe68d8d,_0x5d48d3);_0x23eec9++){_0x34d1fa[_0x23eec9]='─';}const _0x40d7a9=_0x34d1fa[_0x340f27(0x273)](_0x343d32=>_0x343d32==='\x20'?'\x20':_0x22cdb2(_0x343d32))[_0x340f27(0x219)]('');_0x2b37a9[_0x340f27(0x2f8)](_0x542a02+'\x20'+_0x295de2+'│'+_0x40d7a9+'│');}return _0x2b37a9[_0x340f27(0x219)]('\x0a');}async[a55_0x117a6c(0x1ac)](_0x3deda1,_0x2377c5,_0x390ed2){const _0xa2c81b=a55_0x117a6c,{options:_0x507314,tdx:_0x5ba01d}=_0x2377c5,_0x3851b6=_0x507314[_0xa2c81b(0x263)],{timelineRows:_0x42923e,timeAxisHeader:_0x4e8677}=this[_0xa2c81b(0x2ad)](_0x3deda1,_0x3851b6),_0x519335=_0x42923e[_0xa2c81b(0x30c)](_0x15d919=>_0x15d919[_0xa2c81b(0x183)]);if(_0x519335[_0xa2c81b(0x2de)]===0x0){const _0x247847=this['renderSessionsTimeline'](_0x3deda1,_0x3851b6);console[_0xa2c81b(0x1c9)](_0x247847);!_0x390ed2&&(console[_0xa2c81b(0x1c0)](''),console[_0xa2c81b(0x1c0)](a55_0x11b5bd['dim'](_0xa2c81b(0x27e))),console[_0xa2c81b(0x1c0)](a55_0x11b5bd[_0xa2c81b(0x331)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a55_0x11b5bd['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x4e8677&&console['log'](_0x4e8677);const _0x12935d=_0x42923e[_0xa2c81b(0x30c)](_0x52ea69=>_0x52ea69[_0xa2c81b(0x183)])[_0xa2c81b(0x273)](_0x1e3eb8=>({'title':_0x1e3eb8[_0xa2c81b(0x322)],'value':_0x1e3eb8['attemptId']})),_0x3d11c4=process[_0xa2c81b(0x317)][_0xa2c81b(0x332)]||0x3c,_0x3b3362=Math['max'](0x28,Math[_0xa2c81b(0x329)](_0x3d11c4*0x2/0x3)),_0x279647=await a55_0x53e091({'type':_0xa2c81b(0x33b),'name':_0xa2c81b(0x183),'message':_0xa2c81b(0x2d8),'choices':_0x12935d,'initial':-0x1,'limit':_0x3b3362,'clearFirst':!![],'fallback':{'title':_0xa2c81b(0x227),'value':null},'suggest':(_0x1f2275,_0x2ab8f4)=>{const _0x33cdc1=_0xa2c81b;if(!_0x1f2275)return Promise['resolve'](_0x2ab8f4);const _0x266eee=_0x2ab8f4[_0x33cdc1(0x30c)](_0x4c4bd5=>{const _0x71a1ad=_0x33cdc1,_0x4a216d=_0x4c4bd5;return _0x4a216d[_0x71a1ad(0x2cf)][_0x71a1ad(0x187)]()[_0x71a1ad(0x270)](_0x1f2275[_0x71a1ad(0x187)]());});return Promise[_0x33cdc1(0x22e)](_0x266eee);}}),_0x17430e=()=>{const _0x44042b=_0xa2c81b;process['stdout'][_0x44042b(0x2ff)](_0x44042b(0x252)),process[_0x44042b(0x317)]['write'](_0x44042b(0x252)),process[_0x44042b(0x317)][_0x44042b(0x2ff)](_0x44042b(0x252));},_0x243db3=_0x279647&&_0x279647[_0xa2c81b(0x183)]&&_0x279647[_0xa2c81b(0x183)]!==null&&_0x279647[_0xa2c81b(0x183)][_0xa2c81b(0x1dc)]()!=='';if(!_0x243db3){_0x17430e(),console[_0xa2c81b(0x1c9)](a55_0x11b5bd[_0xa2c81b(0x331)](_0xa2c81b(0x2a4)));return;}_0x17430e();const _0x20ee45=_0x3deda1['find'](_0x29d005=>_0x29d005[_0xa2c81b(0x27a)]?.['id']===_0x279647['attemptId']);if(_0x20ee45){const _0x4bb2c2=_0x20ee45[_0xa2c81b(0x27b)]?.[_0xa2c81b(0x308)]||'?',_0x2d820d=_0x20ee45['workflow']?.[_0xa2c81b(0x308)]||'?';console[_0xa2c81b(0x1c9)](_0xa2c81b(0x339)+a55_0x11b5bd[_0xa2c81b(0x331)](_0x4bb2c2)+_0xa2c81b(0x1e4)+a55_0x11b5bd[_0xa2c81b(0x331)](_0x2d820d));}const _0x899096=new WorkflowTimelineCommand();await _0x899096['execute']({'args':[],'options':{..._0x507314,'attemptId':_0x279647['attemptId']},'tdx':_0x5ba01d});}[a55_0x117a6c(0x2ad)](_0x4222a8,_0x21de07){const _0x5a0d30=a55_0x117a6c,_0x1b0226=new Map();for(const _0x1ea56b of _0x4222a8){_0x1ea56b['id']&&_0x1ea56b['lastAttempt']?.['id']&&_0x1b0226['set'](_0x1ea56b['id'],_0x1ea56b[_0x5a0d30(0x27a)]['id']);}const _0x3e4366=[];let _0x3c0eda='';const _0xb77dd3=this['renderSessionsTimeline'](_0x4222a8,_0x21de07),_0x46c59c=_0xb77dd3[_0x5a0d30(0x1fb)]('\x0a');for(const _0x15acc0 of _0x46c59c){if(_0x15acc0[_0x5a0d30(0x2f1)](_0x5a0d30(0x190))||_0x15acc0[_0x5a0d30(0x269)](/^\s+\d{4}-\d{2}-\d{2}/))_0x3c0eda=_0x15acc0;else{if(_0x15acc0[_0x5a0d30(0x269)](/^[✅❌🔄🛑⏳]/)){const _0x5df6c7=_0x15acc0[_0x5a0d30(0x269)](/#(\d+)/),_0x48a537=_0x5df6c7?_0x5df6c7[0x1]:null,_0x5846f7=_0x48a537?_0x1b0226[_0x5a0d30(0x18d)](_0x48a537)||null:null,_0x1671cd=_0x4222a8[_0x5a0d30(0x17b)](_0x5090dd=>_0x5090dd['id']===_0x48a537),_0x6cc71a=_0x1671cd?.[_0x5a0d30(0x27b)]?.['name']||'';_0x3e4366['push']({'displayLine':_0x15acc0,'attemptId':_0x5846f7,'projectName':_0x6cc71a});}}}return{'timelineRows':_0x3e4366,'timeAxisHeader':_0x3c0eda};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x2ac);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x33d);async['execute'](_0x5f4123){const _0x2fd352=a55_0x117a6c,{options:_0x5cb495,args:_0x3848fc,tdx:_0x1cac02}=_0x5f4123,_0x5c81e6=this[_0x2fd352(0x258)](_0x3848fc,_0x5cb495);if(!_0x5c81e6)return 0x1;const {projectName:_0x537454,workflowName:_0x476df8}=_0x5c81e6,_0x2b1630=_0x5cb495[_0x2fd352(0x1ab)];if(_0x5cb495[_0x2fd352(0x1ef)]){if(_0x537454&&_0x476df8)console['error'](_0x2fd352(0x2b5)+_0x537454+'.'+_0x476df8);else _0x537454&&console['error'](_0x2fd352(0x32d)+_0x537454);_0x2b1630&&console[_0x2fd352(0x1c0)](_0x2fd352(0x2fe));}const _0x11abcc=await withSpinner(_0x2fd352(0x266),()=>_0x1cac02[_0x2fd352(0x2bb)][_0x2fd352(0x1ff)]({'projectName':_0x537454,'workflowName':_0x476df8,'includeRetried':_0x2b1630,'limit':_0x5cb495[_0x2fd352(0x2e8)]}),{'verbose':_0x5cb495[_0x2fd352(0x1ef)]}),_0x278065=_0x11abcc[_0x2fd352(0x192)],_0x5d17c5=_0x5cb495[_0x2fd352(0x2e8)]||0x64,_0x510315=_0x278065[_0x2fd352(0x2de)]>=_0x5d17c5?a55_0x11b5bd[_0x2fd352(0x331)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x2fd352(0x1c0)](_0x2fd352(0x28a)+_0x278065[_0x2fd352(0x2de)]+'\x20attempt'+(_0x278065[_0x2fd352(0x2de)]!==0x1?'s':'')+_0x510315);if(_0x5cb495[_0x2fd352(0x1c5)]===_0x2fd352(0x2f7)||_0x5cb495[_0x2fd352(0x1c5)]===_0x2fd352(0x184)||_0x5cb495[_0x2fd352(0x1c5)]===_0x2fd352(0x253))await handleSDKOutput(_0x278065,_0x5cb495);else{if(_0x278065['length']===0x0){if(_0x537454&&_0x476df8)console['log'](_0x2fd352(0x293)+_0x537454+'.'+_0x476df8);else _0x537454?console['log'](_0x2fd352(0x2cd)+_0x537454):console[_0x2fd352(0x1c9)](_0x2fd352(0x25e));}else{const _0x65d43b=_0x5cb495[_0x2fd352(0x263)],_0x8c1cc3=_0x278065[_0x2fd352(0x273)](_0x2e6dad=>{const _0x1973a7=_0x2fd352,_0x38456c=a55_0x11b5bd[_0x1973a7(0x331)]('#'+_0x2e6dad['id']),_0x32de87=_0x2e6dad[_0x1973a7(0x27b)]?.['id'],_0x343914=_0x2e6dad[_0x1973a7(0x197)]||_0x2e6dad[_0x1973a7(0x297)],_0x1642c3=_0x32de87&&_0x343914?hyperlink(_0x38456c,getWorkflowAttemptUrl(_0x65d43b,_0x32de87,_0x343914,_0x2e6dad['id'])):_0x38456c,{icon:_0x33625b,text:_0x3a7472}=getAttemptStatusDisplay(_0x2e6dad),_0xb0a62=(_0x2e6dad['project']?.['name']||'?')+'.'+(_0x2e6dad[_0x1973a7(0x2bb)]?.[_0x1973a7(0x308)]||'?'),_0x3bdc9b=_0x2e6dad[_0x1973a7(0x221)]?a55_0x11b5bd['dim'](_0x2e6dad[_0x1973a7(0x221)]):'';return(_0x1642c3+'\x20'+_0x33625b+(_0x3a7472?'\x20'+_0x3a7472:'')+'\x20'+_0xb0a62+'\x20'+_0x3bdc9b)[_0x1973a7(0x2c1)]();});await writeOutput(_0x8c1cc3[_0x2fd352(0x219)]('\x0a'),_0x5cb495[_0x2fd352(0x1b8)],_0x2fd352(0x1cc));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x274);async['execute'](_0x3a00b9){const _0xd6fbef=a55_0x117a6c,{options:_0x32ef44,args:_0x2471d8,tdx:_0x3e3a6d}=_0x3a00b9,_0x5e94bf=_0x2471d8[0x0];if(!_0x5e94bf)return console[_0xd6fbef(0x1c0)](_0xd6fbef(0x1f1)),0x1;_0x32ef44[_0xd6fbef(0x1ef)]&&console[_0xd6fbef(0x1c0)](_0xd6fbef(0x218)+_0x5e94bf);const _0x295417=await withSpinner('Getting\x20attempt\x20details...',()=>_0x3e3a6d[_0xd6fbef(0x2bb)][_0xd6fbef(0x2be)](_0x5e94bf),{'verbose':_0x32ef44[_0xd6fbef(0x1ef)]}),_0x361047=_0x295417[_0xd6fbef(0x192)];let _0x1a3b1a;!_0x361047['done']?_0x1a3b1a=_0x361047[_0xd6fbef(0x25c)]?_0xd6fbef(0x314):_0xd6fbef(0x238):_0x1a3b1a=_0x361047[_0xd6fbef(0x215)]?_0xd6fbef(0x215):_0xd6fbef(0x1c0);let _0x4e4f38;if(_0x361047[_0xd6fbef(0x1f7)]&&_0x361047[_0xd6fbef(0x235)]){const _0x2947c6=new Date(_0x361047[_0xd6fbef(0x1f7)])[_0xd6fbef(0x251)](),_0x43beb3=new Date(_0x361047['finishedAt'])[_0xd6fbef(0x251)]();_0x4e4f38=Math['round']((_0x43beb3-_0x2947c6)/0x3e8);}const _0x1cad12={'attempt_id':_0x361047['id'],'status':_0x1a3b1a,..._0x361047['index']!==undefined&&{'index':_0x361047['index']},..._0x361047[_0xd6fbef(0x27b)]&&{'project':_0x361047[_0xd6fbef(0x27b)][_0xd6fbef(0x308)]},..._0x361047[_0xd6fbef(0x2bb)]&&{'workflow':_0x361047[_0xd6fbef(0x2bb)][_0xd6fbef(0x308)]},..._0x361047['sessionId']&&{'session_id':_0x361047['sessionId']},..._0x361047[_0xd6fbef(0x221)]&&{'session_time':_0x361047[_0xd6fbef(0x221)]},..._0x361047[_0xd6fbef(0x1bc)]&&{'retry_attempt':_0x361047[_0xd6fbef(0x1bc)]},..._0x4e4f38!==undefined&&{'duration_sec':_0x4e4f38},..._0x361047[_0xd6fbef(0x1f7)]&&{'created_at':_0x361047['createdAt']},..._0x361047['finishedAt']&&{'finished_at':_0x361047[_0xd6fbef(0x235)]},...Object[_0xd6fbef(0x1b6)](_0x361047[_0xd6fbef(0x1eb)])['length']>0x0&&{'params':_0x361047[_0xd6fbef(0x1eb)]}};return await handleSingleObjectOutput(_0x1cad12,_0x32ef44),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x1e0);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x1cb);async[a55_0x117a6c(0x2b2)](_0x21a749){const _0x42cc48=a55_0x117a6c,{options:_0xb845a9,args:_0xb463d1,tdx:_0x9bf0d2}=_0x21a749,_0x30f1fb=_0xb463d1[0x0];if(!_0x30f1fb)return console[_0x42cc48(0x1c0)](_0x42cc48(0x1f1)),0x1;const _0x341c64=_0xb845a9['includeSubtasks'];_0xb845a9[_0x42cc48(0x1ef)]&&(console[_0x42cc48(0x1c0)](_0x42cc48(0x218)+_0x30f1fb),_0x341c64&&console['error'](_0x42cc48(0x1cf)));const _0x3702a8=await withSpinner(_0x42cc48(0x2b1),()=>_0x9bf0d2[_0x42cc48(0x2bb)][_0x42cc48(0x30a)](_0x30f1fb,_0x341c64||![]),{'verbose':_0xb845a9[_0x42cc48(0x1ef)]}),_0x3905a8=_0x3702a8[_0x42cc48(0x192)];return console[_0x42cc48(0x1c0)](_0x42cc48(0x28a)+_0x3905a8[_0x42cc48(0x2de)]+'\x20task'+(_0x3905a8[_0x42cc48(0x2de)]!==0x1?'s':'')),await handleSDKOutput(_0x3905a8,_0xb845a9),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a55_0x117a6c(0x204);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x1d0);async[a55_0x117a6c(0x2b2)](_0xe4fc3d){const _0x59b71c=a55_0x117a6c,{options:_0x4bb201,args:_0x16c58e,tdx:_0xc010be}=_0xe4fc3d,_0x1d74b9=_0x16c58e[0x0];let _0x1372d7=_0x16c58e[0x1];if(!_0x1d74b9)return console[_0x59b71c(0x1c0)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x4bb201[_0x59b71c(0x1ef)]&&(console[_0x59b71c(0x1c0)](_0x59b71c(0x218)+_0x1d74b9),_0x1372d7&&console[_0x59b71c(0x1c0)](_0x59b71c(0x188)+_0x1372d7));const _0x51f6c4=await withSpinner('Fetching\x20log\x20files...',()=>_0xc010be['workflow'][_0x59b71c(0x2a6)](_0x1d74b9,_0x1372d7),{'verbose':_0x4bb201['verbose']}),_0x15209f=_0x51f6c4[_0x59b71c(0x192)];if(_0x15209f[_0x59b71c(0x2de)]===0x0)return console[_0x59b71c(0x1c0)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x1372d7&&(_0x4bb201[_0x59b71c(0x2f7)]||_0x4bb201[_0x59b71c(0x1c5)]))return await handleSDKOutput(_0x15209f,_0x4bb201),0x0;if(!_0x1372d7){const _0x578f06=_0x15209f[_0x59b71c(0x273)](_0x300a0d=>({'title':_0x300a0d[_0x59b71c(0x2cb)]+'\x20('+formatBytes(_0x300a0d[_0x59b71c(0x179)])+')','value':_0x300a0d['taskName']})),_0x280678=await a55_0x53e091({'type':'select','name':_0x59b71c(0x246),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x578f06});if(!_0x280678[_0x59b71c(0x246)])return console[_0x59b71c(0x1c0)](_0x59b71c(0x2a4)),0x0;_0x1372d7=_0x280678['task'];}const _0x42a0f1=await withSpinner(_0x59b71c(0x311),()=>_0xc010be[_0x59b71c(0x2bb)][_0x59b71c(0x31c)](_0x1d74b9,_0x1372d7),{'verbose':_0x4bb201['verbose']}),_0x3f8b03=_0x42a0f1[_0x59b71c(0x192)];return _0x3f8b03?console[_0x59b71c(0x1c9)](_0x3f8b03):console['error'](_0x59b71c(0x2df)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x28d);['description']=a55_0x117a6c(0x2b7);async[a55_0x117a6c(0x2b2)](_0x65b77){const _0x23331b=a55_0x117a6c,{options:_0x142a72,args:_0x3d5fa9,tdx:_0x4b9977}=_0x65b77,_0x4ad7ad=_0x3d5fa9[0x0];if(!_0x4ad7ad)return console['error'](_0x23331b(0x1f1)),0x1;const _0x13e788=_0x142a72['reason'];_0x142a72[_0x23331b(0x1ef)]&&(console[_0x23331b(0x1c0)](_0x23331b(0x218)+_0x4ad7ad),_0x13e788&&console[_0x23331b(0x1c0)](_0x23331b(0x2e5)+_0x13e788));if(!_0x142a72['yes']){if(!isInteractive())return console[_0x23331b(0x1c0)](a55_0x11b5bd['red'](_0x23331b(0x2fa)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x23331b(0x1c0)](a55_0x11b5bd[_0x23331b(0x331)](_0x23331b(0x1a1))),0x1;const _0x15db5b=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x4ad7ad+'?');if(!_0x15db5b)return console[_0x23331b(0x1c0)](a55_0x11b5bd['yellow']('Cancelled')),0x1;}const _0x38d7d3=await withSpinner(_0x23331b(0x2f2),()=>_0x4b9977[_0x23331b(0x2bb)][_0x23331b(0x21a)](_0x4ad7ad,_0x13e788),{'verbose':_0x142a72[_0x23331b(0x1ef)]}),_0x129c98=_0x38d7d3['data'];return console[_0x23331b(0x1c0)]('✔\x20'+_0x129c98),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x117a6c(0x308)]='workflow:retry';[a55_0x117a6c(0x1d1)]='Retry\x20a\x20session\x20or\x20attempt';async[a55_0x117a6c(0x2b2)](_0x566049){const _0x3c9a50=a55_0x117a6c,{options:_0x4d4087,args:_0x3d5052,tdx:_0x3b7220}=_0x566049,_0x500072=_0x3d5052[0x0];if(!_0x500072)return console[_0x3c9a50(0x1c0)](_0x3c9a50(0x1ec)),console[_0x3c9a50(0x1c0)](_0x3c9a50(0x1e2)),0x1;let _0x154d94=![],_0x84dcf0=_0x500072;if(_0x500072[_0x3c9a50(0x2f1)](_0x3c9a50(0x211)))_0x154d94=!![],_0x84dcf0=_0x500072[_0x3c9a50(0x180)](0x8);else{if(_0x500072[_0x3c9a50(0x2f1)](_0x3c9a50(0x275)))_0x154d94=![],_0x84dcf0=_0x500072['substring'](0x8);else return console[_0x3c9a50(0x1c0)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x3c9a50(0x1c0)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x2bf774=_0x4d4087[_0x3c9a50(0x2e7)],_0xedbf3a=_0x4d4087[_0x3c9a50(0x22d)],_0x3129cd=_0x4d4087[_0x3c9a50(0x1eb)],_0x10508a=_0x4d4087[_0x3c9a50(0x2a3)];_0x4d4087[_0x3c9a50(0x1ef)]&&(console[_0x3c9a50(0x1c0)](_0x3c9a50(0x2ee)+(_0x154d94?'session':_0x3c9a50(0x2be))+'\x20'+_0x84dcf0),_0x2bf774&&console[_0x3c9a50(0x1c0)]('From\x20task:\x20'+_0x2bf774),_0xedbf3a&&console[_0x3c9a50(0x1c0)]('Resume\x20from:\x20'+_0xedbf3a),_0x3129cd&&console[_0x3c9a50(0x1c0)](_0x3c9a50(0x1b1)+_0x3129cd),_0x10508a&&console[_0x3c9a50(0x1c0)]('Force:\x20yes'));let _0x35566d;if(_0x3129cd)try{if(_0x3129cd[_0x3c9a50(0x2f1)]('@')){const _0x580cec=await import(_0x3c9a50(0x17d)),_0xdfc7e5=_0x3129cd[_0x3c9a50(0x180)](0x1),_0x3b6b0a=await _0x580cec[_0x3c9a50(0x22f)](_0xdfc7e5,_0x3c9a50(0x20c));_0x35566d=JSON[_0x3c9a50(0x181)](_0x3b6b0a);}else _0x35566d=JSON[_0x3c9a50(0x181)](_0x3129cd);}catch{return console[_0x3c9a50(0x1c0)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x4d4087['yes']){if(!isInteractive())return console[_0x3c9a50(0x1c0)](a55_0x11b5bd['red'](_0x3c9a50(0x2fa)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x3c9a50(0x1c0)](a55_0x11b5bd[_0x3c9a50(0x331)](_0x3c9a50(0x1a1))),0x1;const _0x3aa239=await confirmKey(_0x3c9a50(0x1d9)+(_0x154d94?'session':_0x3c9a50(0x2be))+'\x20'+_0x84dcf0+'?');if(!_0x3aa239)return console[_0x3c9a50(0x1c0)](a55_0x11b5bd[_0x3c9a50(0x2b3)](_0x3c9a50(0x2a4))),0x1;}let _0x1d18a2;_0x154d94?_0x1d18a2=await withSpinner(_0x3c9a50(0x1d6),()=>_0x3b7220[_0x3c9a50(0x2bb)][_0x3c9a50(0x1ed)](_0x84dcf0,{'fromTask':_0x2bf774,'retryParams':_0x35566d}),{'verbose':_0x4d4087[_0x3c9a50(0x1ef)]}):_0x1d18a2=await withSpinner(_0x3c9a50(0x326),()=>_0x3b7220['workflow'][_0x3c9a50(0x255)](_0x84dcf0,{'resumeFrom':_0xedbf3a,'retryParams':_0x35566d,'force':_0x10508a}),{'verbose':_0x4d4087[_0x3c9a50(0x1ef)]});const _0x46ce7d=_0x1d18a2['data'];return console[_0x3c9a50(0x1c0)]('✔\x20Retry\x20started'),console[_0x3c9a50(0x1c0)](_0x3c9a50(0x1e3)+_0x46ce7d['attemptId']),console['error'](_0x3c9a50(0x1e9)+_0x46ce7d[_0x3c9a50(0x297)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a55_0x117a6c(0x249);['description']=a55_0x117a6c(0x199);async[a55_0x117a6c(0x2b2)](_0x31ef1e){const _0x37dcc3=a55_0x117a6c,{options:_0x340d8b,args:_0x2411ac,tdx:_0x3f6c87}=_0x31ef1e;let _0x5944d3=_0x2411ac[0x0];if(!_0x5944d3){const _0x1363e1=this[_0x37dcc3(0x196)]([],_0x340d8b),_0x28481e=await withSpinner('Loading\x20workflows...',()=>_0x3f6c87[_0x37dcc3(0x2bb)][_0x37dcc3(0x315)](_0x1363e1,{'limit':_0x340d8b['limit']}),{'verbose':_0x340d8b['verbose']}),_0x36d2a3=_0x28481e['data'];if(_0x36d2a3[_0x37dcc3(0x2de)]===0x0)return console[_0x37dcc3(0x1c0)]('No\x20workflows\x20found'),!_0x1363e1&&console['error'](a55_0x11b5bd['dim'](_0x37dcc3(0x254))),0x1;const _0x564b45=_0x36d2a3[_0x37dcc3(0x273)](_0x35addb=>({'title':_0x35addb[_0x37dcc3(0x27b)]?.['name']+'.'+_0x35addb[_0x37dcc3(0x308)],'value':_0x35addb[_0x37dcc3(0x27b)]?.['name']+'.'+_0x35addb[_0x37dcc3(0x308)],'description':_0x35addb[_0x37dcc3(0x285)]?'revision:\x20'+_0x35addb['revision']:undefined})),_0x222caa=await a55_0x53e091({'type':'select','name':'workflow','message':_0x37dcc3(0x29c),'choices':_0x564b45});if(!_0x222caa[_0x37dcc3(0x2bb)])return 0x1;_0x5944d3=_0x222caa['workflow'];}if(!_0x5944d3[_0x37dcc3(0x270)]('.')){const _0x4ccb6a=this['resolveProject']([],_0x340d8b);if(_0x4ccb6a)_0x5944d3=_0x4ccb6a+'.'+_0x5944d3;else return console[_0x37dcc3(0x1c0)](a55_0x11b5bd[_0x37dcc3(0x20d)](_0x37dcc3(0x321)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x37dcc3(0x1c0)](a55_0x11b5bd[_0x37dcc3(0x331)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x13990b=_0x340d8b[_0x37dcc3(0x272)],_0xc6b70e=_0x340d8b[_0x37dcc3(0x221)],_0xdedf40={};if(_0x13990b&&Array[_0x37dcc3(0x19c)](_0x13990b))for(const _0x4baa83 of _0x13990b){const _0x13d65c=_0x4baa83[_0x37dcc3(0x1bd)]('=');if(_0x13d65c===-0x1)return console[_0x37dcc3(0x1c0)](_0x37dcc3(0x19a)+_0x4baa83),console[_0x37dcc3(0x1c0)](_0x37dcc3(0x198)),0x1;const _0x249cf0=_0x4baa83[_0x37dcc3(0x180)](0x0,_0x13d65c),_0x19f9bc=_0x4baa83[_0x37dcc3(0x180)](_0x13d65c+0x1);try{_0xdedf40[_0x249cf0]=JSON[_0x37dcc3(0x181)](_0x19f9bc);}catch{_0xdedf40[_0x249cf0]=_0x19f9bc;}}_0x340d8b[_0x37dcc3(0x1ef)]&&(console[_0x37dcc3(0x1c0)](_0x37dcc3(0x31e)+_0x5944d3),Object[_0x37dcc3(0x1b6)](_0xdedf40)[_0x37dcc3(0x2de)]>0x0&&console['error'](_0x37dcc3(0x2c6)+JSON[_0x37dcc3(0x2ab)](_0xdedf40)),_0xc6b70e&&console['error']('Session\x20time:\x20'+_0xc6b70e));if(_0x340d8b[_0x37dcc3(0x2af)])return await this['executeDryRun'](_0x31ef1e,_0x5944d3,_0xdedf40,_0xc6b70e);const _0x31ae87=await withSpinner('Starting\x20workflow\x20run...',()=>_0x3f6c87[_0x37dcc3(0x2bb)]['run'](_0x5944d3,_0xdedf40,{'sessionTime':_0xc6b70e}),{'verbose':_0x340d8b[_0x37dcc3(0x1ef)]}),_0x47ee86=_0x31ae87[_0x37dcc3(0x192)];console[_0x37dcc3(0x1c0)](_0x37dcc3(0x23e)),console[_0x37dcc3(0x1c0)](_0x37dcc3(0x1a7)+_0x47ee86['id']),console[_0x37dcc3(0x1c0)](_0x37dcc3(0x1e9)+_0x47ee86[_0x37dcc3(0x297)]),console[_0x37dcc3(0x1c0)](_0x37dcc3(0x262)+_0x47ee86[_0x37dcc3(0x27b)]?.['name']),console[_0x37dcc3(0x1c0)]('\x20\x20Workflow:\x20'+_0x47ee86[_0x37dcc3(0x2bb)]?.[_0x37dcc3(0x308)]);if(_0x47ee86['project']?.['id']&&_0x47ee86['sessionId']&&_0x47ee86['id']){const _0x4208fb=_0x340d8b[_0x37dcc3(0x263)],_0x162f71=getConsoleUrl(_0x4208fb,_0x37dcc3(0x1a6)+_0x47ee86[_0x37dcc3(0x27b)]['id']+_0x37dcc3(0x2eb)+_0x47ee86[_0x37dcc3(0x297)]+_0x37dcc3(0x265)+_0x47ee86['id']);console[_0x37dcc3(0x1c0)](_0x37dcc3(0x18a)+a55_0x11b5bd[_0x37dcc3(0x1b7)](_0x162f71));}return 0x0;}async[a55_0x117a6c(0x21e)](_0x4510fb,_0x266668,_0x1d319c,_0x4c56a2){const _0x168250=a55_0x117a6c,{options:_0x240339,tdx:_0x12f375}=_0x4510fb,_0x3c69a3=await withSpinner(_0x168250(0x202)+_0x266668+_0x168250(0x200),()=>_0x12f375['workflow']['getWorkflow'](_0x266668),{'verbose':_0x240339[_0x168250(0x1ef)]}),_0x152169=_0x3c69a3[_0x168250(0x192)],_0x4f3b05=_0x4c56a2??new Date()[_0x168250(0x327)]();console['log'](a55_0x11b5bd[_0x168250(0x264)](_0x168250(0x334)),_0x266668),console[_0x168250(0x1c9)](a55_0x11b5bd['bold'](_0x168250(0x1cd)),_0x4f3b05),console[_0x168250(0x1c9)](a55_0x11b5bd[_0x168250(0x264)](_0x168250(0x2a5)),JSON[_0x168250(0x2ab)](_0x1d319c)),console['log'](''),console[_0x168250(0x1c9)](a55_0x11b5bd[_0x168250(0x264)]('Task\x20graph:'));const _0x4f0f50=parseTaskGraph(_0x152169['config']??null);if(_0x4f0f50[_0x168250(0x2de)]===0x0)console[_0x168250(0x1c9)](a55_0x11b5bd['dim'](_0x168250(0x26f)));else for(const _0x1a5ff5 of formatTaskGraph(_0x4f0f50)){console[_0x168250(0x1c9)](_0x1a5ff5);}const _0x3a25d3=summarizeTaskGraph(_0x4f0f50),_0x134b45=formatWarningSummary(_0x3a25d3);return _0x134b45&&(console[_0x168250(0x1c9)](''),console['log'](a55_0x11b5bd[_0x168250(0x2b3)](_0x134b45))),console[_0x168250(0x1c9)](a55_0x11b5bd[_0x168250(0x2b3)](_0x168250(0x231))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x31d);[a55_0x117a6c(0x1d1)]='Download\x20workflow\x20project\x20from\x20Treasure\x20AI';async[a55_0x117a6c(0x2b2)](_0x3ca471){const _0x49830c=a55_0x117a6c,{options:_0x58c786,args:_0x436137,tdx:_0x5df92a}=_0x3ca471,_0x49f0bc=_0x436137[0x0],_0x5d80ab=_0x436137[0x1]||'.';if(!_0x49f0bc)return console['error'](_0x49830c(0x2dc)),console[_0x49830c(0x1c0)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x25dc3e=_0x58c786[_0x49830c(0x285)];_0x58c786[_0x49830c(0x1ef)]&&(console['error'](_0x49830c(0x339)+_0x49f0bc),console['error'](_0x49830c(0x210)+_0x5d80ab),_0x25dc3e&&console[_0x49830c(0x1c0)](_0x49830c(0x24b)+_0x25dc3e));const _0x491345=await withSpinner(_0x49830c(0x306)+_0x49f0bc+_0x49830c(0x200),()=>_0x5df92a[_0x49830c(0x2bb)]['download'](_0x49f0bc,_0x5d80ab,{'revision':_0x25dc3e}),{'verbose':_0x58c786[_0x49830c(0x1ef)]}),_0x934e26=_0x491345[_0x49830c(0x192)];return console['error'](_0x49830c(0x214)+_0x934e26[_0x49830c(0x1a2)]),console[_0x49830c(0x1c0)]('\x20\x20Revision:\x20'+_0x934e26[_0x49830c(0x285)]),console[_0x49830c(0x1c0)](_0x49830c(0x1a3)+_0x934e26[_0x49830c(0x1ca)]),console['error'](_0x49830c(0x33a)+_0x5d80ab+'/'+_0x934e26['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a55_0x117a6c(0x1af);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x2ce);async['execute'](_0x372035){const _0x3f28cc=a55_0x117a6c,{options:_0x343b78,args:_0x421f6c,tdx:_0x2cd4a1}=_0x372035;let _0x4ac517='.',_0x165cf5=_0x343b78[_0x3f28cc(0x308)];if(_0x421f6c[0x0]){const {promises:_0x2999a3}=await import('fs');try{const _0x378c9e=await _0x2999a3[_0x3f28cc(0x1c4)](_0x421f6c[0x0]);if(_0x378c9e[_0x3f28cc(0x2fc)]())_0x4ac517=_0x421f6c[0x0];else return console[_0x3f28cc(0x1c0)]('Error:\x20'+_0x421f6c[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x165cf5=_0x421f6c[0x0],_0x4ac517='.';}}const _0x1eb555=_0x343b78[_0x3f28cc(0x285)],_0x16e025=_0x343b78[_0x3f28cc(0x299)];_0x343b78['verbose']&&(console['error'](_0x3f28cc(0x328)+_0x4ac517),_0x165cf5&&console[_0x3f28cc(0x1c0)]('Project\x20name:\x20'+_0x165cf5),_0x1eb555&&console[_0x3f28cc(0x1c0)](_0x3f28cc(0x24b)+_0x1eb555),_0x16e025&&console[_0x3f28cc(0x1c0)](_0x3f28cc(0x2d7)));const _0xa08b38=await withSpinner(_0x3f28cc(0x250),()=>_0x2cd4a1[_0x3f28cc(0x2bb)]['push'](_0x4ac517,{'projectName':_0x165cf5,'revision':_0x1eb555,'skipValidation':_0x16e025}),{'verbose':_0x343b78['verbose']}),_0x806baa=_0xa08b38['data'];return console[_0x3f28cc(0x1c0)](_0x3f28cc(0x287)+_0x806baa[_0x3f28cc(0x1a2)]),console[_0x3f28cc(0x1c0)](_0x3f28cc(0x233)+_0x806baa[_0x3f28cc(0x260)]),console[_0x3f28cc(0x1c0)]('\x20\x20Revision:\x20'+_0x806baa[_0x3f28cc(0x285)]),await this['showWorkflowConsoleUrl'](_0x2cd4a1,_0x806baa[_0x3f28cc(0x1a2)],_0x343b78[_0x3f28cc(0x263)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x117a6c(0x308)]='workflow:pull';['description']=a55_0x117a6c(0x1b3);async[a55_0x117a6c(0x2b2)](_0x273300){const _0x330a16=a55_0x117a6c,{options:_0xc44079,args:_0x354664,tdx:_0x355914}=_0x273300,_0x357eda=_0x354664[0x0],_0x392895=_0x354664[0x1];if(!_0x357eda)return console[_0x330a16(0x1c0)](a55_0x11b5bd[_0x330a16(0x20d)](_0x330a16(0x321)),_0x330a16(0x31b)),console[_0x330a16(0x1c0)](a55_0x11b5bd[_0x330a16(0x331)](_0x330a16(0x21b))),0x1;const _0x3a0bff=_0xc44079[_0x330a16(0x285)];_0xc44079['verbose']&&(console[_0x330a16(0x1c0)](_0x330a16(0x339)+_0x357eda),_0x392895&&console[_0x330a16(0x1c0)]('Target\x20directory:\x20'+_0x392895),_0x3a0bff&&console[_0x330a16(0x1c0)]('Revision:\x20'+_0x3a0bff),_0xc44079[_0x330a16(0x2af)]&&console['error'](_0x330a16(0x32c)));const _0x56691d=await withSpinner(_0x330a16(0x31f)+_0x357eda+_0x330a16(0x200),()=>_0x355914[_0x330a16(0x2bb)][_0x330a16(0x206)](_0x357eda,{'targetDir':_0x392895,'revision':_0x3a0bff}),{'verbose':_0xc44079[_0x330a16(0x1ef)]}),_0x148a18=_0x56691d[_0x330a16(0x192)];_0x148a18['isNewProject']?console['error']('→\x20New\x20project:\x20'+_0x148a18[_0x330a16(0x1a2)]):console[_0x330a16(0x1c0)](_0x330a16(0x32a)+_0x148a18['projectName']);console[_0x330a16(0x1c0)](_0x330a16(0x2c2)+_0x148a18[_0x330a16(0x285)]),console[_0x330a16(0x1c0)](_0x330a16(0x1fa)+(a55_0x22acec[_0x330a16(0x320)](process[_0x330a16(0x2a1)](),_0x148a18[_0x330a16(0x1d8)])||'.')),console[_0x330a16(0x1c0)](_0x330a16(0x239)+a55_0x11b5bd[_0x330a16(0x300)]('+'+_0x148a18[_0x330a16(0x296)][_0x330a16(0x1ce)]+'\x20new')+',\x20'+(a55_0x11b5bd[_0x330a16(0x2b3)]('~'+_0x148a18['summary'][_0x330a16(0x22b)]+'\x20modified')+',\x20')+(a55_0x11b5bd['red']('-'+_0x148a18['summary'][_0x330a16(0x19d)]+_0x330a16(0x32b))+',\x20')+(''+a55_0x11b5bd[_0x330a16(0x331)](_0x148a18[_0x330a16(0x296)][_0x330a16(0x1d3)]+'\x20unchanged')));for(const _0x21ae05 of _0x148a18[_0x330a16(0x20a)]){_0x21ae05[_0x330a16(0x1e1)]===_0x330a16(0x22b)&&_0x21ae05['diff']&&(console[_0x330a16(0x1c0)]('\x0a'+a55_0x11b5bd['cyan'](_0x330a16(0x2e2)+_0x21ae05['path'])),console[_0x330a16(0x1c0)](_0x21ae05['diff']));}if(!_0x148a18['hasChanges'])return saveSessionContext({'workflow_project':_0x148a18[_0x330a16(0x1a2)]},_0xc44079['session']),console[_0x330a16(0x1c0)](a55_0x11b5bd[_0x330a16(0x300)](_0x330a16(0x30b))),console[_0x330a16(0x1c0)](a55_0x11b5bd['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x148a18[_0x330a16(0x1a2)])),0x0;if(_0xc44079['dryRun'])return console['error'](a55_0x11b5bd[_0x330a16(0x2b3)](_0x330a16(0x2ae))),0x0;if(!_0xc44079[_0x330a16(0x256)]){if(!isInteractive())return console['error'](a55_0x11b5bd[_0x330a16(0x20d)](_0x330a16(0x2fa)),_0x330a16(0x1d2)),console[_0x330a16(0x1c0)](a55_0x11b5bd[_0x330a16(0x331)](_0x330a16(0x1a1))),0x1;const _0xd2774a=await confirmKey(_0x330a16(0x2e1));if(!_0xd2774a)return console['error'](a55_0x11b5bd['yellow'](_0x330a16(0x2a4)),_0x330a16(0x241)),0x1;}await withSpinner('Writing\x20files...',()=>_0x355914[_0x330a16(0x2bb)][_0x330a16(0x2c4)](_0x148a18,{'revision':_0x3a0bff}),{'verbose':_0xc44079[_0x330a16(0x1ef)]}),saveSessionContext({'workflow_project':_0x148a18[_0x330a16(0x1a2)]},_0xc44079[_0x330a16(0x213)]),console[_0x330a16(0x1c0)](a55_0x11b5bd['green']('✔\x20Pull\x20complete'));const _0x3f74d6=a55_0x22acec[_0x330a16(0x320)](process['cwd'](),_0x148a18[_0x330a16(0x1d8)])||'.';return console[_0x330a16(0x1c0)](a55_0x11b5bd[_0x330a16(0x331)](_0x330a16(0x33a)+_0x3f74d6)),console['error'](a55_0x11b5bd['dim'](_0x330a16(0x21d)+_0x148a18[_0x330a16(0x1a2)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x1c6);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x1ae);async[a55_0x117a6c(0x2b2)](_0x4d8241){const _0x473045=a55_0x117a6c,{options:_0x46a41b,args:_0x4594be,tdx:_0x4fd001}=_0x4d8241,_0x852b27=this[_0x473045(0x298)](_0x4594be,_0x46a41b),_0x181074=_0x46a41b[_0x473045(0x285)],_0xb75804=_0x46a41b['skipValidation'];_0x46a41b['verbose']&&(_0x852b27&&console[_0x473045(0x1c0)](_0x473045(0x257)+_0x852b27),_0x181074&&console['error'](_0x473045(0x24b)+_0x181074),_0x46a41b[_0x473045(0x2af)]&&console[_0x473045(0x1c0)](_0x473045(0x32c)),_0xb75804&&console[_0x473045(0x1c0)](_0x473045(0x2d7)));let _0x5a4966;try{_0x5a4966=await withSpinner(_0x473045(0x2fb),()=>_0x4fd001[_0x473045(0x2bb)][_0x473045(0x292)]({'sourceDir':_0x852b27,'revision':_0x181074,'skipValidation':_0xb75804}),{'verbose':_0x46a41b['verbose']});}catch(_0x5a938c){if(_0x5a938c instanceof Error&&_0x5a938c[_0x473045(0x32e)][_0x473045(0x270)]('No\x20workflow\x20tdx.json\x20found'))return console[_0x473045(0x1c0)](a55_0x11b5bd[_0x473045(0x20d)](_0x473045(0x321)),_0x473045(0x2e9)),_0x46a41b[_0x473045(0x2f5)]?console[_0x473045(0x1c0)](a55_0x11b5bd[_0x473045(0x331)](_0x473045(0x1f6)+_0x46a41b[_0x473045(0x2f5)]+_0x473045(0x1fe)+_0x46a41b[_0x473045(0x2f5)]+'\x27')):console[_0x473045(0x1c0)](a55_0x11b5bd['dim'](_0x473045(0x295))),0x1;throw _0x5a938c;}const _0x9f1182=_0x5a4966['data'];console[_0x473045(0x1c0)](_0x473045(0x313)+_0x9f1182[_0x473045(0x1a2)]),console[_0x473045(0x1c0)](_0x473045(0x2e4)+_0x9f1182['sourceDir']),console[_0x473045(0x1c0)](_0x473045(0x2c2)+_0x9f1182[_0x473045(0x285)]),console[_0x473045(0x1c0)](_0x473045(0x239)+a55_0x11b5bd[_0x473045(0x300)]('+'+_0x9f1182['summary'][_0x473045(0x1ce)]+_0x473045(0x242))+',\x20'+(a55_0x11b5bd['yellow']('~'+_0x9f1182[_0x473045(0x296)][_0x473045(0x22b)]+_0x473045(0x338))+',\x20')+(a55_0x11b5bd['red']('-'+_0x9f1182[_0x473045(0x296)][_0x473045(0x19d)]+'\x20deleted')+',\x20')+(''+a55_0x11b5bd[_0x473045(0x331)](_0x9f1182[_0x473045(0x296)][_0x473045(0x1d3)]+_0x473045(0x1df))));for(const _0xfcea64 of _0x9f1182[_0x473045(0x20a)]){_0xfcea64[_0x473045(0x1e1)]===_0x473045(0x22b)&&_0xfcea64[_0x473045(0x2c8)]&&(console['error']('\x0a'+a55_0x11b5bd[_0x473045(0x1b7)]('---\x20'+_0xfcea64[_0x473045(0x18b)])),console[_0x473045(0x1c0)](_0xfcea64[_0x473045(0x2c8)]));}if(!_0x9f1182[_0x473045(0x309)])return console[_0x473045(0x1c0)](a55_0x11b5bd[_0x473045(0x300)](_0x473045(0x1d4))),await this['showWorkflowConsoleUrl'](_0x4fd001,_0x9f1182[_0x473045(0x1a2)],_0x46a41b[_0x473045(0x263)]),0x0;if(_0x46a41b[_0x473045(0x2af)])return console[_0x473045(0x1c0)](a55_0x11b5bd[_0x473045(0x2b3)](_0x473045(0x304))),0x0;if(!_0x46a41b[_0x473045(0x256)]){if(!isInteractive())return console[_0x473045(0x1c0)](a55_0x11b5bd[_0x473045(0x20d)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x473045(0x1c0)](a55_0x11b5bd[_0x473045(0x331)](_0x473045(0x1a1))),0x1;const _0x508f2c=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x508f2c)return console[_0x473045(0x1c0)](a55_0x11b5bd[_0x473045(0x2b3)](_0x473045(0x2a4)),_0x473045(0x1f2)),0x1;}const _0xaa7d63=await withSpinner(_0x473045(0x337),()=>_0x4fd001[_0x473045(0x2bb)][_0x473045(0x303)](_0x9f1182),{'verbose':_0x46a41b[_0x473045(0x1ef)]}),_0x5ee2d7=_0xaa7d63[_0x473045(0x192)];return console[_0x473045(0x1c0)](a55_0x11b5bd[_0x473045(0x300)](_0x473045(0x1e8))),console['error'](_0x473045(0x233)+_0x5ee2d7['projectId']),console[_0x473045(0x1c0)](_0x473045(0x2c2)+_0x5ee2d7[_0x473045(0x285)]),await this['showWorkflowConsoleUrl'](_0x4fd001,_0x5ee2d7[_0x473045(0x1a2)],_0x46a41b[_0x473045(0x263)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x30d);[a55_0x117a6c(0x1d1)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a55_0x117a6c(0x2b2)](_0xad2c88){const _0x12c4cf=a55_0x117a6c,{options:_0x4229f2,args:_0x34afa9,tdx:_0x205e51}=_0xad2c88,_0x295f76=this[_0x12c4cf(0x298)](_0x34afa9,_0x4229f2),_0x33fe3e=_0x4229f2[_0x12c4cf(0x308)],_0x430019=_0x4229f2[_0x12c4cf(0x285)],_0x5e12fd=_0x4229f2['skipValidation'];if(!_0x295f76)return console[_0x12c4cf(0x1c0)](a55_0x11b5bd[_0x12c4cf(0x20d)]('Error:'),'Source\x20directory\x20is\x20required'),console[_0x12c4cf(0x1c0)](a55_0x11b5bd[_0x12c4cf(0x331)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x12c4cf(0x1c0)](a55_0x11b5bd['dim'](_0x12c4cf(0x276))),0x1;if(!_0x33fe3e)return console[_0x12c4cf(0x1c0)](a55_0x11b5bd[_0x12c4cf(0x20d)](_0x12c4cf(0x321)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x12c4cf(0x1c0)](a55_0x11b5bd[_0x12c4cf(0x331)](_0x12c4cf(0x2b0))),0x1;_0x4229f2['verbose']&&(console[_0x12c4cf(0x1c0)](_0x12c4cf(0x257)+_0x295f76),console[_0x12c4cf(0x1c0)](_0x12c4cf(0x325)+_0x33fe3e),_0x430019&&console[_0x12c4cf(0x1c0)]('Revision:\x20'+_0x430019),_0x4229f2[_0x12c4cf(0x2af)]&&console[_0x12c4cf(0x1c0)](_0x12c4cf(0x32c)),_0x5e12fd&&console[_0x12c4cf(0x1c0)]('Validation:\x20skipped'));const _0x2c6040=await withSpinner('Analyzing\x20project...',()=>_0x205e51['workflow'][_0x12c4cf(0x29f)](_0x295f76,_0x33fe3e,{'revision':_0x430019,'skipValidation':_0x5e12fd}),{'verbose':_0x4229f2[_0x12c4cf(0x1ef)]}),_0x43c59f=_0x2c6040[_0x12c4cf(0x192)];console[_0x12c4cf(0x1c0)]('Source:\x20'+_0x43c59f[_0x12c4cf(0x240)]);_0x43c59f[_0x12c4cf(0x186)]&&console['error'](_0x12c4cf(0x290)+_0x43c59f['sourceProjectName']);console[_0x12c4cf(0x1c0)](_0x12c4cf(0x325)+_0x43c59f[_0x12c4cf(0x261)]),console['error']('Revision:\x20'+_0x43c59f[_0x12c4cf(0x285)]),console[_0x12c4cf(0x1c0)](_0x12c4cf(0x237)+_0x43c59f['fileCount']);_0x43c59f[_0x12c4cf(0x201)]&&(console[_0x12c4cf(0x1c0)](a55_0x11b5bd[_0x12c4cf(0x2b3)](_0x12c4cf(0x2db)+_0x43c59f[_0x12c4cf(0x261)]+_0x12c4cf(0x17e)+_0x43c59f[_0x12c4cf(0x234)]+')')),console['error'](a55_0x11b5bd['yellow'](_0x12c4cf(0x279))));if(_0x4229f2['dryRun'])return console[_0x12c4cf(0x1c0)](a55_0x11b5bd['yellow'](_0x12c4cf(0x27f))),0x0;if(!_0x4229f2[_0x12c4cf(0x256)]){if(!isInteractive())return console[_0x12c4cf(0x1c0)](a55_0x11b5bd[_0x12c4cf(0x20d)](_0x12c4cf(0x2fa)),_0x12c4cf(0x1d2)),console[_0x12c4cf(0x1c0)](a55_0x11b5bd[_0x12c4cf(0x331)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x488dc0=_0x43c59f[_0x12c4cf(0x186)]||a55_0x22acec[_0x12c4cf(0x2e6)](_0x295f76),_0x4820c8=_0x43c59f[_0x12c4cf(0x201)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x33fe3e+_0x12c4cf(0x33c):'\x0aClone\x20\x22'+_0x488dc0+'\x22\x20to\x20new\x20project\x20\x22'+_0x33fe3e+'\x22?',_0x4094d4=await confirmKey(_0x4820c8);if(!_0x4094d4)return console['error'](a55_0x11b5bd['yellow'](_0x12c4cf(0x2a4))),0x1;}const _0x1e1e89=await withSpinner(_0x43c59f[_0x12c4cf(0x201)]?_0x12c4cf(0x2a9)+_0x33fe3e+_0x12c4cf(0x200):_0x12c4cf(0x259)+_0x33fe3e+_0x12c4cf(0x200),()=>_0x205e51['workflow'][_0x12c4cf(0x232)](_0x43c59f),{'verbose':_0x4229f2[_0x12c4cf(0x1ef)]}),_0x96f0b1=_0x1e1e89[_0x12c4cf(0x192)];return console['error'](a55_0x11b5bd[_0x12c4cf(0x300)](_0x43c59f['targetExists']?'✔\x20Project\x20updated':_0x12c4cf(0x177))),console[_0x12c4cf(0x1c0)](_0x12c4cf(0x262)+_0x96f0b1[_0x12c4cf(0x261)]),console['error'](_0x12c4cf(0x233)+_0x96f0b1['newProjectId']),console[_0x12c4cf(0x1c0)](_0x12c4cf(0x2c2)+_0x96f0b1[_0x12c4cf(0x285)]),await this['showWorkflowConsoleUrl'](_0x205e51,_0x96f0b1['newProjectName'],_0x4229f2[_0x12c4cf(0x263)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x2d5);[a55_0x117a6c(0x1d1)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20AI';async[a55_0x117a6c(0x2b2)](_0x2a5c89){const _0x4cadc4=a55_0x117a6c,{options:_0x55ebac,args:_0x158eb3,tdx:_0xd2ec1f}=_0x2a5c89,_0x5eb683=_0x158eb3[0x0];if(!_0x5eb683)return console[_0x4cadc4(0x1c0)](_0x4cadc4(0x302)),console[_0x4cadc4(0x1c0)](_0x4cadc4(0x20b)),0x1;_0x55ebac['verbose']&&console[_0x4cadc4(0x1c0)](_0x4cadc4(0x339)+_0x5eb683);if(!_0x55ebac[_0x4cadc4(0x256)]){if(!isInteractive())return console[_0x4cadc4(0x1c0)](a55_0x11b5bd['red'](_0x4cadc4(0x2fa)),_0x4cadc4(0x1d2)),console[_0x4cadc4(0x1c0)](a55_0x11b5bd['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x373fd3=await confirmKey(_0x4cadc4(0x208)+_0x5eb683+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x373fd3)return console[_0x4cadc4(0x1c0)](a55_0x11b5bd[_0x4cadc4(0x2b3)](_0x4cadc4(0x2a4))),0x1;}const _0xf2757a=await withSpinner(_0x4cadc4(0x2c9)+_0x5eb683+'...',()=>_0xd2ec1f['workflow'][_0x4cadc4(0x1ad)](_0x5eb683),{'verbose':_0x55ebac['verbose']}),_0x4abada=_0xf2757a[_0x4cadc4(0x192)];return console['error'](_0x4cadc4(0x282)+_0x4abada[_0x4cadc4(0x1a2)]),console[_0x4cadc4(0x1c0)](_0x4cadc4(0x233)+_0x4abada['projectId']),0x0;}}export function parseKeyValue(_0x28580d){const _0x1b251b=a55_0x117a6c,_0x477afa=_0x28580d[_0x1b251b(0x1bd)]('=');if(_0x477afa===-0x1)throw new Error(_0x1b251b(0x224)+_0x28580d+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x5785f6=_0x28580d[_0x1b251b(0x180)](0x0,_0x477afa),_0x3e9838=_0x28580d['substring'](_0x477afa+0x1);if(!_0x5785f6)throw new Error(_0x1b251b(0x24c));return{'key':_0x5785f6,'value':_0x3e9838};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x1dd);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x27d);async[a55_0x117a6c(0x2b2)](_0x16a8b5){const _0x276dcb=a55_0x117a6c,{options:_0x2b7d41,args:_0x5123da,tdx:_0x32ac60}=_0x16a8b5,_0x356ae1=this[_0x276dcb(0x2c5)](_0x5123da,_0x2b7d41);if(!_0x356ae1)return 0x1;_0x2b7d41[_0x276dcb(0x1ef)]&&console[_0x276dcb(0x1c0)]('Project:\x20'+_0x356ae1);const _0x579d09=await withSpinner('Listing\x20secrets...',()=>_0x32ac60['workflow'][_0x276dcb(0x2d4)](_0x356ae1),{'verbose':_0x2b7d41[_0x276dcb(0x1ef)]}),{secrets:_0x4641dd}=_0x579d09['data'];return console[_0x276dcb(0x1c0)](_0x276dcb(0x28a)+_0x4641dd[_0x276dcb(0x2de)]+_0x276dcb(0x24a)+(_0x4641dd[_0x276dcb(0x2de)]!==0x1?'s':'')),await handleSDKOutput(_0x4641dd,_0x2b7d41),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x26b);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x226);async[a55_0x117a6c(0x2b2)](_0x2a91e3){const _0x9606f7=a55_0x117a6c,{options:_0x593320,args:_0x136536,tdx:_0x524d7a}=_0x2a91e3;let _0x3cbbae,_0x383603;if(_0x136536['length']>=0x1&&!_0x136536[0x0][_0x9606f7(0x270)]('='))_0x3cbbae=_0x136536[0x0],_0x383603=_0x136536[_0x9606f7(0x2a7)](0x1);else{if(_0x136536[_0x9606f7(0x2de)]>=0x1&&_0x593320[_0x9606f7(0x2f5)])_0x3cbbae=_0x593320['workflowProject'],_0x383603=_0x136536;else return _0x136536['length']>=0x1?(console['error']('Error:\x20Project\x20name\x20is\x20required'),console[_0x9606f7(0x1c0)](_0x9606f7(0x254)),0x1):(console['error'](_0x9606f7(0x2a8)),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x383603[_0x9606f7(0x2de)]===0x0)return console[_0x9606f7(0x1c0)](_0x9606f7(0x2a8)),console['error'](_0x9606f7(0x1b2)),0x1;const _0x779ba0={};try{for(const _0x15fe38 of _0x383603){const {key:_0x3109d1,value:_0x563104}=parseKeyValue(_0x15fe38);_0x779ba0[_0x3109d1]=_0x563104;}}catch(_0x4595d2){return _0x4595d2 instanceof Error&&console[_0x9606f7(0x1c0)](a55_0x11b5bd[_0x9606f7(0x20d)](_0x9606f7(0x321)),_0x4595d2[_0x9606f7(0x32e)]),0x1;}const _0x307385=Object[_0x9606f7(0x1b6)](_0x779ba0);_0x593320['verbose']&&(console['error'](_0x9606f7(0x339)+_0x3cbbae),console[_0x9606f7(0x1c0)](_0x9606f7(0x336)+_0x307385['join'](',\x20')));const _0x3658ee=await withSpinner(_0x307385[_0x9606f7(0x2de)]===0x1?_0x9606f7(0x333):_0x9606f7(0x2e0)+_0x307385[_0x9606f7(0x2de)]+_0x9606f7(0x2d3),()=>_0x524d7a[_0x9606f7(0x2bb)]['setSecrets'](_0x3cbbae,_0x779ba0),{'verbose':_0x593320[_0x9606f7(0x1ef)]}),_0x45704f=_0x3658ee['data'];return console[_0x9606f7(0x1c0)](_0x307385['length']===0x1?'✔\x20Secret\x20\x27'+_0x45704f['keys'][0x0]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x45704f[_0x9606f7(0x1a2)]+'\x27':'✔\x20'+_0x45704f[_0x9606f7(0x1b6)][_0x9606f7(0x2de)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x45704f[_0x9606f7(0x1a2)]+'\x27'),(_0x593320[_0x9606f7(0x2f7)]||_0x593320['jsonl'])&&await handleSingleObjectOutput(_0x45704f,_0x593320),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a55_0x117a6c(0x1ba);[a55_0x117a6c(0x1d1)]=a55_0x117a6c(0x23c);async['execute'](_0xdddbe7){const _0x560828=a55_0x117a6c,{options:_0x29734a,args:_0xab6b81,tdx:_0x2d418c}=_0xdddbe7;let _0x4d4a06,_0x12af23;if(_0xab6b81['length']>=0x2)_0x4d4a06=_0xab6b81[0x0],_0x12af23=_0xab6b81[0x1];else{if(_0xab6b81[_0x560828(0x2de)]===0x1&&_0x29734a[_0x560828(0x2f5)])_0x4d4a06=_0x29734a['workflowProject'],_0x12af23=_0xab6b81[0x0];else return _0xab6b81[_0x560828(0x2de)]===0x1?(console[_0x560828(0x1c0)](_0x560828(0x2dc)),console[_0x560828(0x1c0)](_0x560828(0x254)),0x1):(console['error'](_0x560828(0x280)),console['error']('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x29734a[_0x560828(0x1ef)]&&(console[_0x560828(0x1c0)](_0x560828(0x339)+_0x4d4a06),console[_0x560828(0x1c0)](_0x560828(0x22a)+_0x12af23));if(!_0x29734a[_0x560828(0x256)]){if(!isInteractive())return console[_0x560828(0x1c0)](a55_0x11b5bd['red'](_0x560828(0x2fa)),_0x560828(0x1d2)),console[_0x560828(0x1c0)](a55_0x11b5bd[_0x560828(0x331)](_0x560828(0x1a1))),0x1;const _0x261000=await confirmKey(_0x560828(0x193)+_0x12af23+'\x27\x20from\x20project\x20\x27'+_0x4d4a06+'\x27?');if(!_0x261000)return console[_0x560828(0x1c0)](a55_0x11b5bd['yellow'](_0x560828(0x2a4))),0x1;}const _0x5cccb4=await withSpinner(_0x560828(0x1d7),()=>_0x2d418c['workflow'][_0x560828(0x310)](_0x4d4a06,_0x12af23),{'verbose':_0x29734a[_0x560828(0x1ef)]}),_0x14470e=_0x5cccb4[_0x560828(0x192)];return console[_0x560828(0x1c0)](_0x560828(0x1be)+_0x14470e[_0x560828(0x24e)]+_0x560828(0x1f5)+_0x14470e['projectName']+'\x27'),(_0x29734a[_0x560828(0x2f7)]||_0x29734a[_0x560828(0x184)])&&await handleSingleObjectOutput(_0x14470e,_0x29734a),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(_0x41d7eb){const _0x5a98df=a55_0x117a6c,_0x1935fb=Math[_0x5a98df(0x329)](_0x41d7eb/0x3e8),_0x46aebc=Math[_0x5a98df(0x329)](_0x1935fb/0x3c),_0x10c6ab=Math[_0x5a98df(0x329)](_0x46aebc/0x3c),_0x3c80ad=Math[_0x5a98df(0x329)](_0x10c6ab/0x18);if(_0x3c80ad>0x0){const _0x25b693=_0x10c6ab%0x18;return _0x25b693>0x0?_0x3c80ad+'d\x20'+_0x25b693+'h':_0x3c80ad+'d';}else{if(_0x10c6ab>0x0){const _0xdc13cb=_0x46aebc%0x3c;return _0xdc13cb>0x0?_0x10c6ab+'h\x20'+_0xdc13cb+'m':_0x10c6ab+'h';}else{if(_0x46aebc>0x0){const _0x3a890b=_0x1935fb%0x3c;return _0x3a890b>0x0?_0x46aebc+'m\x20'+_0x3a890b+'s':_0x46aebc+'m';}else return _0x1935fb+'s';}}}function formatTimestamp(_0x3a1632,_0x59623b){const _0x2cc7af=a55_0x117a6c,_0x469e9c=new Date(_0x3a1632),_0x39d36a=String(_0x469e9c[_0x2cc7af(0x1b4)]())[_0x2cc7af(0x207)](0x2,'0'),_0x5bf5ba=String(_0x469e9c[_0x2cc7af(0x26c)]())[_0x2cc7af(0x207)](0x2,'0'),_0xcc7d4d=_0x39d36a+':'+_0x5bf5ba,_0x4e4e2b=_0x469e9c[_0x2cc7af(0x2ca)]()===_0x59623b['getFullYear']()&&_0x469e9c[_0x2cc7af(0x20f)]()===_0x59623b[_0x2cc7af(0x20f)]()&&_0x469e9c[_0x2cc7af(0x1ea)]()===_0x59623b[_0x2cc7af(0x1ea)]();if(_0x4e4e2b)return _0xcc7d4d;else{const _0x1b2d41=String(_0x469e9c[_0x2cc7af(0x20f)]()+0x1)['padStart'](0x2,'0'),_0x1e1b4c=String(_0x469e9c['getDate']())[_0x2cc7af(0x207)](0x2,'0');return _0x1b2d41+'-'+_0x1e1b4c+'\x20'+_0xcc7d4d;}}function formatDate(_0x543caf){const _0x42f0e6=a55_0x117a6c,_0x398852=_0x543caf['getFullYear'](),_0x289854=String(_0x543caf[_0x42f0e6(0x20f)]()+0x1)[_0x42f0e6(0x207)](0x2,'0'),_0x60dda0=String(_0x543caf[_0x42f0e6(0x1ea)]())[_0x42f0e6(0x207)](0x2,'0');return _0x398852+'-'+_0x289854+'-'+_0x60dda0;}function getTaskStateIcon(_0x30214c){const _0x552494={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x552494[_0x30214c]||'⚪';}function getBarChar(_0x4f1190){const _0x5af5ae=a55_0x117a6c;return _0x4f1190===_0x5af5ae(0x1c0)||_0x4f1190==='group_error'?'×':'─';}function getBarColor(_0x7edca7){const _0x5f58a1=a55_0x117a6c,_0x2086d4={'success':a55_0x11b5bd[_0x5f58a1(0x300)],'error':a55_0x11b5bd[_0x5f58a1(0x20d)],'group_error':a55_0x11b5bd['red'],'running':a55_0x11b5bd[_0x5f58a1(0x1ee)],'blocked':a55_0x11b5bd[_0x5f58a1(0x2b3)],'planned':a55_0x11b5bd['dim'],'canceling':a55_0x11b5bd[_0x5f58a1(0x2b3)]};return _0x2086d4[_0x7edca7]||a55_0x11b5bd[_0x5f58a1(0x25a)];}function parseTaskName(_0x1de68d){const _0x15482c=a55_0x117a6c;let _0x3a0ef2=_0x1de68d[_0x15482c(0x319)](/^\++/,'');const _0x2fc6e0=_0x3a0ef2[_0x15482c(0x1fb)]('+'),_0x3db3f5=_0x2fc6e0[_0x15482c(0x2de)]>0x1?_0x2fc6e0['length']-0x2:0x0,_0x3a3067=_0x2fc6e0[_0x2fc6e0['length']-0x1]||_0x3a0ef2;return{'level':_0x3db3f5,'name':'+'+_0x3a3067};}function truncateTaskName(_0x41be2e,_0x131584){const _0x4dc781=a55_0x117a6c,_0x2f9647=stringWidth(_0x41be2e);if(_0x2f9647<=_0x131584)return _0x41be2e;let _0x3fcf79=_0x41be2e;while(stringWidth(_0x3fcf79+'…')>_0x131584&&_0x3fcf79['length']>0x0){_0x3fcf79=_0x3fcf79[_0x4dc781(0x2a7)](0x0,-0x1);}return _0x3fcf79+'…';}function calculateTimeScale(_0x346ccd,_0x46791c){const _0x3037c3=a55_0x117a6c;return{'startTime':_0x346ccd[_0x3037c3(0x2ba)],'endTime':_0x346ccd['end'],'durationMs':_0x346ccd[_0x3037c3(0x2c3)],'msPerChar':_0x346ccd[_0x3037c3(0x2c3)]/_0x46791c};}function timeToPosition(_0x547b8b,_0x4e19b8,_0x277969){const _0x1bb419=a55_0x117a6c,_0x21a0c0=_0x547b8b-_0x4e19b8[_0x1bb419(0x1a0)],_0x202630=Math[_0x1bb419(0x329)](_0x21a0c0/_0x4e19b8[_0x1bb419(0x189)]);return Math[_0x1bb419(0x305)](0x0,Math[_0x1bb419(0x18f)](_0x202630,_0x277969));}function renderTimeAxis(_0x10c9e0,_0xc34ccd){const _0x1566af=a55_0x117a6c,_0x510025=Math[_0x1566af(0x18f)](TIMELINE_CONFIG[_0x1566af(0x30e)],Math[_0x1566af(0x305)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math['floor'](_0xc34ccd/TIMELINE_CONFIG[_0x1566af(0x1e7)]))),_0x4dbb90=_0x10c9e0[_0x1566af(0x25f)]/(_0x510025-0x1),_0x176f56=new Date(_0x10c9e0[_0x1566af(0x1a0)]),_0x1470ef=[];for(let _0x382385=0x0;_0x382385<_0x510025;_0x382385++){const _0xebd7b0=_0x10c9e0[_0x1566af(0x1a0)]+_0x382385*_0x4dbb90,_0x2af9ac=timeToPosition(_0xebd7b0,_0x10c9e0,_0xc34ccd),_0x518894=formatTimestamp(_0xebd7b0,_0x176f56);_0x1470ef['push']({'pos':_0x2af9ac,'text':_0x518894});}const _0x5bc415=new Array(_0xc34ccd)[_0x1566af(0x312)]('\x20');let _0x470fa0=-0x1;for(const {pos:_0x437f0d,text:_0x2e37d3}of _0x1470ef){let _0x2066de=Math[_0x1566af(0x305)](0x0,_0x437f0d-Math[_0x1566af(0x329)](_0x2e37d3['length']/0x2));_0x2066de<=_0x470fa0+TIMELINE_CONFIG[_0x1566af(0x28c)]&&(_0x2066de=_0x470fa0+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x2066de+_0x2e37d3[_0x1566af(0x2de)]>_0xc34ccd&&(_0x2066de=_0xc34ccd-_0x2e37d3[_0x1566af(0x2de)]);if(_0x2066de>=0x0&&_0x2066de+_0x2e37d3['length']<=_0xc34ccd&&_0x2066de>_0x470fa0){for(let _0x16bb99=0x0;_0x16bb99<_0x2e37d3['length'];_0x16bb99++){_0x5bc415[_0x2066de+_0x16bb99]=_0x2e37d3[_0x16bb99];}_0x470fa0=_0x2066de+_0x2e37d3[_0x1566af(0x2de)]-0x1;}}return _0x5bc415['join']('');}function renderTaskRow(_0x255db6,_0x3e42c8,_0x467840,_0x383922){const _0x160992=a55_0x117a6c,{level:_0x40b0e8,name:_0x34524d}=parseTaskName(_0x255db6[_0x160992(0x308)]),_0x3c7831='\x20'[_0x160992(0x323)](_0x40b0e8),_0x581ff8=_0x255db6[_0x160992(0x23a)]?'('+formatElapsed(_0x255db6[_0x160992(0x23a)]['duration'])+')':'',_0x4b1cac=stringWidth(_0x581ff8),_0x377130=_0x40b0e8*0x1,_0x2aa1ec=_0x383922-_0x377130-_0x4b1cac-0x1,_0x15b6ab=truncateTaskName(_0x34524d,_0x2aa1ec),_0x537407=_0x3c7831+_0x15b6ab,_0x4fb44f=stringWidth(_0x537407),_0x12655a=_0x383922-_0x4fb44f-_0x4b1cac,_0x5d71fc=_0x537407+'\x20'[_0x160992(0x323)](Math[_0x160992(0x305)](0x1,_0x12655a))+a55_0x11b5bd[_0x160992(0x331)](_0x581ff8),_0x48989b=getTaskStateIcon(_0x255db6[_0x160992(0x2c7)]),_0xfd1f36=new Array(_0x467840)[_0x160992(0x312)]('\x20');if(_0x255db6[_0x160992(0x23a)]){const _0x11fca5=timeToPosition(_0x255db6[_0x160992(0x23a)][_0x160992(0x2ba)],_0x3e42c8,_0x467840),_0x327b25=timeToPosition(_0x255db6['window']['end'],_0x3e42c8,_0x467840),_0x30c5f6=getBarChar(_0x255db6['state']),_0x56dfac=Math['max'](_0x11fca5+0x1,_0x327b25);for(let _0x3af8b2=_0x11fca5;_0x3af8b2<Math[_0x160992(0x18f)](_0x56dfac,_0x467840);_0x3af8b2++){_0xfd1f36[_0x3af8b2]=_0x30c5f6;}}const _0x5e998f=getBarColor(_0x255db6['state']),_0x5a8033=_0xfd1f36[_0x160992(0x273)](_0x351cfa=>_0x351cfa==='\x20'?'\x20':_0x5e998f(_0x351cfa))[_0x160992(0x219)]('');return _0x48989b+'\x20'+_0x5d71fc+'│'+_0x5a8033+'│';}function calculateStats(_0x4fb2cf){const _0x3dd0ca=a55_0x117a6c,_0x380053={'total':_0x4fb2cf[_0x3dd0ca(0x2de)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x21e549 of _0x4fb2cf){if(_0x21e549[_0x3dd0ca(0x2c7)]==='success')_0x380053[_0x3dd0ca(0x215)]++;else{if(_0x21e549[_0x3dd0ca(0x2c7)]===_0x3dd0ca(0x1c0)||_0x21e549[_0x3dd0ca(0x2c7)]==='group_error')_0x380053[_0x3dd0ca(0x1c0)]++;else _0x21e549['state']===_0x3dd0ca(0x238)?_0x380053[_0x3dd0ca(0x238)]++:_0x380053[_0x3dd0ca(0x245)]++;}}return _0x380053;}function formatStats(_0x2587de){const _0x22d657=a55_0x117a6c;return[_0x22d657(0x244)+_0x2587de[_0x22d657(0x2d2)],'✅\x20'+_0x2587de['success'],'❌\x20'+_0x2587de[_0x22d657(0x1c0)],_0x22d657(0x19e)+_0x2587de[_0x22d657(0x238)],'⏳\x20'+_0x2587de[_0x22d657(0x245)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x176);['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a55_0x117a6c(0x2b2)](_0x173868){const _0x4f2873=a55_0x117a6c,{options:_0x2bb513,args:_0x205f8c,tdx:_0x5b4dc6}=_0x173868;let _0x2fd604,_0x4f3f36,_0x12f99d=![];if(_0x205f8c[0x0]){if(_0x205f8c[0x0][_0x4f2873(0x270)]('.')){const _0x101bd1=this[_0x4f2873(0x258)](_0x205f8c,_0x2bb513);if(!_0x101bd1)return 0x1;_0x2fd604=_0x101bd1[_0x4f2873(0x1a2)],_0x4f3f36=_0x101bd1[_0x4f2873(0x21c)];}else{_0x4f3f36=_0x205f8c[0x0],_0x2fd604=_0x2bb513[_0x4f2873(0x2f5)];if(!_0x2fd604)return console['error'](a55_0x11b5bd[_0x4f2873(0x20d)]('Error:'),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x12f99d=!![];}}else{const _0x13cb67=this[_0x4f2873(0x258)](_0x205f8c,_0x2bb513);if(!_0x13cb67)return 0x1;_0x2fd604=_0x13cb67[_0x4f2873(0x1a2)],_0x4f3f36=_0x13cb67[_0x4f2873(0x21c)];}if(_0x2bb513[_0x4f2873(0x1ef)]){if(_0x2fd604&&_0x4f3f36)console[_0x4f2873(0x1c0)](_0x4f2873(0x2b5)+_0x2fd604+'.'+_0x4f3f36);else _0x2fd604&&console['error'](_0x4f2873(0x32d)+_0x2fd604);}const _0x12f7fa=_0x2bb513[_0x4f2873(0x183)],_0xdb7feb=_0x2bb513[_0x4f2873(0x297)];if(_0x12f7fa){_0xdb7feb&&console[_0x4f2873(0x1c0)](a55_0x11b5bd[_0x4f2873(0x2b3)](_0x4f2873(0x281)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x7ffc12=_0x2bb513[_0x4f2873(0x194)];return _0x7ffc12?await this['pollTimeline'](_0x173868,_0x12f7fa):await this['renderSingleTimeline'](_0x173868,_0x12f7fa,_0x2bb513),0x0;}if(_0xdb7feb){const _0x3e11ae=await withSpinner('Loading\x20session...',()=>_0x5b4dc6[_0x4f2873(0x2bb)][_0x4f2873(0x220)]({'projectName':_0x2fd604,'workflowName':_0x4f3f36,'limit':0x64}),{'verbose':_0x2bb513[_0x4f2873(0x1ef)]}),_0x52cfec=_0x3e11ae[_0x4f2873(0x192)][_0x4f2873(0x17b)](_0x581a7e=>_0x581a7e['id']===_0xdb7feb);if(!_0x52cfec)return console['error'](a55_0x11b5bd[_0x4f2873(0x20d)]('Error:'),_0x4f2873(0x230)+_0xdb7feb),0x1;if(!_0x52cfec[_0x4f2873(0x27a)]?.['id'])return console[_0x4f2873(0x1c0)](a55_0x11b5bd[_0x4f2873(0x20d)](_0x4f2873(0x321)),_0x4f2873(0x23b)+_0xdb7feb+_0x4f2873(0x2da)),0x1;const _0x210c3a=_0x52cfec['lastAttempt']['id'];_0x2bb513[_0x4f2873(0x1ef)]&&console[_0x4f2873(0x1c0)](_0x4f2873(0x1aa)+_0x210c3a+_0x4f2873(0x2bf)+_0xdb7feb);const _0x5e5bcd=_0x2bb513[_0x4f2873(0x194)];return _0x5e5bcd?await this[_0x4f2873(0x330)](_0x173868,_0x210c3a):await this['renderSingleTimeline'](_0x173868,_0x210c3a,_0x2bb513),0x0;}const _0x2b8aca=await withSpinner(_0x4f2873(0x286),()=>_0x5b4dc6[_0x4f2873(0x2bb)]['sessions']({'projectName':_0x2fd604,'workflowName':_0x4f3f36,'limit':_0x2bb513['limit']||0x32}),{'verbose':_0x2bb513[_0x4f2873(0x1ef)]}),_0x34efdf=_0x2b8aca[_0x4f2873(0x192)];if(_0x34efdf[_0x4f2873(0x2de)]===0x0){if(_0x2fd604&&_0x4f3f36)console[_0x4f2873(0x1c0)](_0x4f2873(0x2a0)+_0x2fd604+'.'+_0x4f3f36);else _0x2fd604?console[_0x4f2873(0x1c0)](_0x4f2873(0x24f)+_0x2fd604):(console[_0x4f2873(0x1c0)]('No\x20workflow\x20sessions\x20found'),console[_0x4f2873(0x1c0)](a55_0x11b5bd[_0x4f2873(0x331)](_0x4f2873(0x301))));return 0x0;}_0x34efdf[_0x4f2873(0x22c)]((_0x10a5bf,_0x10289c)=>{const _0x43ebd2=_0x4f2873,_0x1e1cfd=_0x10a5bf[_0x43ebd2(0x221)]||'',_0xf06fa3=_0x10289c[_0x43ebd2(0x221)]||'';return _0xf06fa3[_0x43ebd2(0x316)](_0x1e1cfd);});if(_0x2bb513['json']||_0x2bb513[_0x4f2873(0x184)])return await handleSDKOutput(_0x34efdf,_0x2bb513),0x0;let _0xc2bf13;if(_0x12f99d){const _0x52664e=_0x34efdf[0x0];if(!_0x52664e[_0x4f2873(0x27a)]?.['id'])return console['error'](_0x4f2873(0x26d)),0x0;_0xc2bf13=_0x52664e[_0x4f2873(0x27a)]['id'],_0x2bb513[_0x4f2873(0x1ef)]&&console['error'](_0x4f2873(0x324)+_0x52664e[_0x4f2873(0x221)]);}else{const _0x2a1042=_0x34efdf['map'](_0x249f38=>{const _0x4f8cb0=_0x4f2873,_0x2472db=getAttemptStatusDisplay(_0x249f38[_0x4f8cb0(0x27a)]);return{'title':_0x249f38[_0x4f8cb0(0x27b)]?.[_0x4f8cb0(0x308)]+'.'+_0x249f38[_0x4f8cb0(0x2bb)]?.[_0x4f8cb0(0x308)]+_0x4f8cb0(0x2dd)+_0x249f38[_0x4f8cb0(0x221)]+'\x20'+_0x2472db[_0x4f8cb0(0x28e)],'value':_0x249f38[_0x4f8cb0(0x27a)]?.['id']||'','description':_0x2472db['text']};}),_0x4fa24c=await a55_0x53e091({'type':_0x4f2873(0x2aa),'name':_0x4f2873(0x183),'message':_0x4f2873(0x228),'choices':_0x2a1042['filter'](_0x34085b=>_0x34085b[_0x4f2873(0x178)]!=='')});if(!_0x4fa24c[_0x4f2873(0x183)])return 0x0;_0xc2bf13=_0x4fa24c[_0x4f2873(0x183)];}const _0x59d57b=_0x2bb513[_0x4f2873(0x194)];return _0x59d57b?await this[_0x4f2873(0x330)](_0x173868,_0xc2bf13):await this[_0x4f2873(0x19f)](_0x173868,_0xc2bf13,_0x2bb513),0x0;}async['renderSingleTimeline'](_0x4edff1,_0x4cc9bf,_0x1815a7){const _0x36d95b=a55_0x117a6c,{tdx:_0x41a536}=_0x4edff1;let _0x28085c,_0x30a1bc;try{[_0x28085c,_0x30a1bc]=await Promise[_0x36d95b(0x19b)]([_0x41a536['workflow'][_0x36d95b(0x2be)](_0x4cc9bf),_0x41a536[_0x36d95b(0x2bb)]['tasks'](_0x4cc9bf,![])]);}catch(_0x5f51fd){console[_0x36d95b(0x1c0)](a55_0x11b5bd[_0x36d95b(0x20d)](_0x36d95b(0x30f)));_0x1815a7[_0x36d95b(0x1ef)]&&console[_0x36d95b(0x1c0)](_0x5f51fd);throw _0x5f51fd;}if(_0x1815a7[_0x36d95b(0x2f7)]||_0x1815a7[_0x36d95b(0x184)]){const _0x3954c3=this['buildTimelineData'](_0x28085c,_0x30a1bc);await handleSDKOutput([_0x3954c3],_0x1815a7);return;}const _0x2e2403=_0x41a536[_0x36d95b(0x18c)][_0x36d95b(0x263)],_0x52a54d=this[_0x36d95b(0x205)](_0x28085c,_0x30a1bc,_0x2e2403);console[_0x36d95b(0x1c9)](_0x52a54d);}async[a55_0x117a6c(0x330)](_0x1d2b20,_0x16c80d){const _0x3b251a=a55_0x117a6c,{tdx:_0x1a06c8}=_0x1d2b20,_0x124a11=TIMELINE_CONFIG[_0x3b251a(0x24d)],_0x4a1e93=TIMELINE_CONFIG[_0x3b251a(0x17a)];let _0x11c1db=0x0;while(_0x11c1db<_0x4a1e93){process[_0x3b251a(0x317)][_0x3b251a(0x2b4)]&&process[_0x3b251a(0x317)][_0x3b251a(0x2ff)]('\x1bc');let _0x4c5b8d,_0x5c58d0;try{[_0x4c5b8d,_0x5c58d0]=await Promise[_0x3b251a(0x19b)]([_0x1a06c8[_0x3b251a(0x2bb)][_0x3b251a(0x2be)](_0x16c80d),_0x1a06c8[_0x3b251a(0x2bb)][_0x3b251a(0x30a)](_0x16c80d,![])]);}catch(_0x482530){console['error'](a55_0x11b5bd[_0x3b251a(0x20d)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x11c1db>0x0&&console[_0x3b251a(0x1c0)](a55_0x11b5bd['dim'](_0x3b251a(0x1da)+_0x11c1db));throw _0x482530;}const _0x41644c=_0x1a06c8[_0x3b251a(0x18c)][_0x3b251a(0x263)],_0x5d4d2b=this['renderTimeline'](_0x4c5b8d,_0x5c58d0,_0x41644c);console[_0x3b251a(0x1c9)](_0x5d4d2b);const _0x36d45e=_0x4c5b8d[_0x3b251a(0x2ef)]&&_0x5c58d0[_0x3b251a(0x182)](_0x25a4d5=>_0x25a4d5['state']!=='running'&&_0x25a4d5[_0x3b251a(0x2c7)]!=='planned');if(_0x36d45e){console[_0x3b251a(0x1c0)](a55_0x11b5bd[_0x3b251a(0x300)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x3b251a(0x1c0)](a55_0x11b5bd[_0x3b251a(0x331)](_0x3b251a(0x335)+_0x11c1db*0x2+_0x3b251a(0x1f9))),await new Promise(_0x3f304b=>setTimeout(_0x3f304b,_0x124a11)),_0x11c1db++;}_0x11c1db>=_0x4a1e93&&console[_0x3b251a(0x1c0)](a55_0x11b5bd[_0x3b251a(0x2b3)](_0x3b251a(0x1fc)));}[a55_0x117a6c(0x205)](_0x3ec723,_0x58a564,_0x4ec862){const _0x4a6e5c=a55_0x117a6c,_0x2e1911=[],_0x174de8=TIMELINE_CONFIG[_0x4a6e5c(0x29a)],_0x62e255=0x5,_0x16ce71=process[_0x4a6e5c(0x317)][_0x4a6e5c(0x1f4)]||0x78,_0x5a875a=_0x16ce71-_0x174de8-_0x62e255,_0x6a0a23=Math[_0x4a6e5c(0x305)](TIMELINE_CONFIG[_0x4a6e5c(0x243)],Math[_0x4a6e5c(0x18f)](_0x5a875a,TIMELINE_CONFIG[_0x4a6e5c(0x267)])),_0x131bc2=new Date(_0x3ec723['createdAt'])[_0x4a6e5c(0x251)](),_0xf95464=_0x3ec723[_0x4a6e5c(0x235)]?new Date(_0x3ec723['finishedAt'])[_0x4a6e5c(0x251)]():Date['now'](),_0x83805b={'start':_0x131bc2,'end':_0xf95464,'duration':_0xf95464-_0x131bc2},_0x3d032e=new Map(),_0x461674=[];for(const _0x52fe8f of _0x58a564){if(_0x52fe8f[_0x4a6e5c(0x223)]){const _0x2da69d=new Date(_0x52fe8f[_0x4a6e5c(0x223)])[_0x4a6e5c(0x251)](),_0x492d14=_0x52fe8f[_0x4a6e5c(0x1de)]?new Date(_0x52fe8f['updatedAt'])[_0x4a6e5c(0x251)]():Date['now'](),_0x5f1df7={'start':_0x2da69d,'end':_0x492d14,'duration':_0x492d14-_0x2da69d};_0x3d032e[_0x4a6e5c(0x1c7)](_0x52fe8f['id'],_0x5f1df7),_0x461674[_0x4a6e5c(0x2f8)]({'name':_0x52fe8f['fullName'],'state':_0x52fe8f[_0x4a6e5c(0x2c7)]||'unknown','window':_0x5f1df7});}else _0x461674[_0x4a6e5c(0x2f8)]({'name':_0x52fe8f[_0x4a6e5c(0x1e5)],'state':_0x52fe8f['state']||_0x4a6e5c(0x23d),'window':undefined});}_0x461674['sort']((_0x11b34b,_0x2330b3)=>{const _0x4ff187=_0x4a6e5c;if(!_0x11b34b[_0x4ff187(0x23a)])return 0x1;if(!_0x2330b3[_0x4ff187(0x23a)])return-0x1;return _0x11b34b[_0x4ff187(0x23a)]['start']-_0x2330b3[_0x4ff187(0x23a)][_0x4ff187(0x2ba)];});const _0x3962b7=_0x461674[_0x4a6e5c(0x2de)],_0x978970=_0x3962b7>TIMELINE_CONFIG[_0x4a6e5c(0x2f6)];_0x978970&&_0x461674[_0x4a6e5c(0x2cc)](TIMELINE_CONFIG[_0x4a6e5c(0x2f6)]);const _0x4ab0fb=calculateTimeScale(_0x83805b,_0x6a0a23),_0x5772a4=_0x3ec723['done']?_0x3ec723[_0x4a6e5c(0x215)]?a55_0x11b5bd[_0x4a6e5c(0x300)](_0x4a6e5c(0x215)):a55_0x11b5bd[_0x4a6e5c(0x20d)]('error'):a55_0x11b5bd[_0x4a6e5c(0x1ee)]('running'),_0x230cf9=_0x3ec723['project']?.['id'],_0x224fa6=_0x3ec723['sessionId'];let _0x429892;if(_0x230cf9&&_0x224fa6){const _0x1b5570=getWorkflowAttemptUrl(_0x4ec862,_0x230cf9,_0x224fa6,_0x3ec723['id']);_0x429892=hyperlink(a55_0x11b5bd['dim'](_0x3ec723['id']),_0x1b5570);}else _0x429892=a55_0x11b5bd['dim'](_0x3ec723['id']);_0x2e1911[_0x4a6e5c(0x2f8)]('Attempt:\x20'+_0x429892+'\x20-\x20'+_0x5772a4+_0x4a6e5c(0x2dd)+formatElapsed(_0x83805b['duration']));if(_0x461674['length']>0x0){const _0x1b3d8c=renderTimeAxis(_0x4ab0fb,_0x6a0a23),_0x52bf2c=new Date(_0x83805b[_0x4a6e5c(0x2ba)]),_0x1f5eb4=formatDate(_0x52bf2c),_0x385d78=TIMELINE_CONFIG[_0x4a6e5c(0x1f3)]+TIMELINE_CONFIG[_0x4a6e5c(0x29e)]+_0x174de8,_0x33d950=_0x1f5eb4[_0x4a6e5c(0x207)](_0x385d78),_0x4a9061=a55_0x11b5bd['dim'](_0x33d950);_0x2e1911['push'](_0x4a9061+'\x20'+_0x1b3d8c);for(const _0x3d57ca of _0x461674){_0x2e1911[_0x4a6e5c(0x2f8)](renderTaskRow(_0x3d57ca,_0x4ab0fb,_0x6a0a23,_0x174de8));}const _0x3f0983=calculateStats(_0x461674);_0x2e1911[_0x4a6e5c(0x2f8)](formatStats(_0x3f0983)),_0x978970&&_0x2e1911[_0x4a6e5c(0x2f8)](a55_0x11b5bd[_0x4a6e5c(0x2b3)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x4a6e5c(0x2f6)]+_0x4a6e5c(0x2ea)+_0x3962b7+'\x20tasks')),_0x2e1911['push'](''),_0x2e1911[_0x4a6e5c(0x2f8)](a55_0x11b5bd[_0x4a6e5c(0x331)]('💡\x20Tip:\x20Use\x20')+(_0x4a6e5c(0x31a)+_0x3ec723['id']+_0x4a6e5c(0x247))+a55_0x11b5bd[_0x4a6e5c(0x331)](_0x4a6e5c(0x23f)));}else _0x2e1911[_0x4a6e5c(0x2f8)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x2e1911[_0x4a6e5c(0x219)]('\x0a');}['buildTimelineData'](_0x4e6dc7,_0x3516ec){const _0x4e6132=a55_0x117a6c,_0x47b3a8=new Date(_0x4e6dc7[_0x4e6132(0x1f7)])[_0x4e6132(0x251)](),_0x4ecc7a=_0x4e6dc7[_0x4e6132(0x235)]?new Date(_0x4e6dc7[_0x4e6132(0x235)])['getTime']():Date['now'](),_0x175a9d=_0x4ecc7a-_0x47b3a8,_0x367f95=[];for(const _0x59cf32 of _0x3516ec){if(_0x59cf32[_0x4e6132(0x223)]){const _0x4c9d97=new Date(_0x59cf32[_0x4e6132(0x223)])[_0x4e6132(0x251)](),_0x3b57ea=_0x59cf32[_0x4e6132(0x1de)]?new Date(_0x59cf32['updatedAt'])[_0x4e6132(0x251)]():Date[_0x4e6132(0x2e3)]();_0x367f95[_0x4e6132(0x2f8)]({'name':_0x59cf32['fullName'],'state':_0x59cf32['state']||_0x4e6132(0x185),'window':{'start':_0x4c9d97,'end':_0x3b57ea,'duration':_0x3b57ea-_0x4c9d97}});}else _0x367f95[_0x4e6132(0x2f8)]({'name':_0x59cf32['fullName'],'state':_0x59cf32[_0x4e6132(0x2c7)]||_0x4e6132(0x23d),'window':undefined});}const _0x49cef9=calculateStats(_0x367f95);return{'attempt':{'id':_0x4e6dc7['id'],'status':_0x4e6dc7[_0x4e6132(0x2ef)]?_0x4e6dc7[_0x4e6132(0x215)]?'success':_0x4e6132(0x1c0):_0x4e6132(0x238),'createdAt':_0x4e6dc7[_0x4e6132(0x1f7)],'finishedAt':_0x4e6dc7[_0x4e6132(0x235)],'duration_ms':_0x175a9d},'tasks':_0x367f95[_0x4e6132(0x273)](_0x108d74=>({'name':_0x108d74[_0x4e6132(0x308)],'state':_0x108d74[_0x4e6132(0x2c7)],'startedAt':_0x108d74[_0x4e6132(0x23a)]?new Date(_0x108d74['window'][_0x4e6132(0x2ba)])[_0x4e6132(0x327)]():null,'updatedAt':_0x108d74[_0x4e6132(0x23a)]?new Date(_0x108d74[_0x4e6132(0x23a)][_0x4e6132(0x1e6)])[_0x4e6132(0x327)]():null,'duration_ms':_0x108d74[_0x4e6132(0x23a)]?.['duration']||null})),'stats':_0x49cef9};}}export class WorkflowSchedulesCommand extends BaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x225);['description']=a55_0x117a6c(0x26a);async['execute'](_0x3fe747){const _0x594da3=a55_0x117a6c,{options:_0x69fcd7,tdx:_0x3ca3e8}=_0x3fe747,_0x36c764=await withSpinner(_0x594da3(0x2d9),()=>_0x3ca3e8[_0x594da3(0x2bb)]['listSchedules'](),{'verbose':_0x69fcd7[_0x594da3(0x1ef)]}),_0x2da0e8=_0x36c764['data'];console[_0x594da3(0x1c0)](_0x594da3(0x28a)+_0x2da0e8[_0x594da3(0x2de)]+_0x594da3(0x2f0)+(_0x2da0e8[_0x594da3(0x2de)]!==0x1?'s':''));if(isStructuredFormat(_0x69fcd7))await handleSDKOutput(_0x2da0e8,_0x69fcd7);else{if(_0x2da0e8[_0x594da3(0x2de)]===0x0)console[_0x594da3(0x1c9)](_0x594da3(0x1db));else for(const _0x5f2a6a of _0x2da0e8){const _0x3b14c7=_0x5f2a6a['disabledAt']?a55_0x11b5bd[_0x594da3(0x2b3)]('\x20(disabled)'):'',_0x346a2d=_0x5f2a6a[_0x594da3(0x27b)]?.[_0x594da3(0x308)]?a55_0x11b5bd[_0x594da3(0x331)]('\x20['+_0x5f2a6a[_0x594da3(0x27b)][_0x594da3(0x308)]+']'):'',_0x5cbeaf=_0x5f2a6a[_0x594da3(0x209)]?a55_0x11b5bd[_0x594da3(0x331)](_0x594da3(0x28b)+new Date(_0x5f2a6a['nextRunTime'])['toLocaleString']()):'';console[_0x594da3(0x1c9)](_0x594da3(0x222)+_0x5f2a6a['id']+'\x20'+(_0x5f2a6a['workflow']?.[_0x594da3(0x308)]||_0x594da3(0x195))+_0x346a2d+_0x3b14c7+_0x5cbeaf);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a55_0x117a6c(0x308)]=a55_0x117a6c(0x2d6);['description']=a55_0x117a6c(0x288);async[a55_0x117a6c(0x2b2)](_0x1680d4){const _0x3080b7=a55_0x117a6c,{options:_0x359085,args:_0x5bb64c,tdx:_0x2d16b0}=_0x1680d4,_0x26393b=_0x5bb64c[0x0];if(!_0x26393b)return console[_0x3080b7(0x1c0)](a55_0x11b5bd[_0x3080b7(0x20d)](_0x3080b7(0x321)),'Schedule\x20ID\x20is\x20required'),console[_0x3080b7(0x1c0)](a55_0x11b5bd[_0x3080b7(0x331)](_0x3080b7(0x2b6))),console[_0x3080b7(0x1c0)](a55_0x11b5bd[_0x3080b7(0x331)](_0x3080b7(0x236))),0x1;const _0x413682=await withSpinner('Enabling\x20schedule\x20#'+_0x26393b+_0x3080b7(0x200),()=>_0x2d16b0[_0x3080b7(0x2bb)][_0x3080b7(0x248)](_0x26393b),{'verbose':_0x359085[_0x3080b7(0x1ef)]}),_0x1ca731=_0x413682[_0x3080b7(0x192)];return isStructuredFormat(_0x359085)?await handleSingleObjectOutput(_0x1ca731,_0x359085):(console[_0x3080b7(0x1c9)](_0x3080b7(0x271)+_0x26393b+'\x20enabled\x20('+(_0x1ca731[_0x3080b7(0x2bb)]?.[_0x3080b7(0x308)]||_0x3080b7(0x185))+')'),_0x1ca731[_0x3080b7(0x209)]&&console[_0x3080b7(0x1c9)](a55_0x11b5bd[_0x3080b7(0x331)](_0x3080b7(0x1a9)+new Date(_0x1ca731[_0x3080b7(0x209)])[_0x3080b7(0x2a2)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a55_0x117a6c(0x308)]='workflow:schedule:disable';[a55_0x117a6c(0x1d1)]='Disable\x20a\x20workflow\x20schedule';async['execute'](_0xd82fe9){const _0x2710a5=a55_0x117a6c,{options:_0x1a17f9,args:_0x454df2,tdx:_0xfd8ef}=_0xd82fe9,_0x7668cc=_0x454df2[0x0];if(!_0x7668cc)return console[_0x2710a5(0x1c0)](a55_0x11b5bd[_0x2710a5(0x20d)](_0x2710a5(0x321)),_0x2710a5(0x318)),console['error'](a55_0x11b5bd[_0x2710a5(0x331)](_0x2710a5(0x21f))),console[_0x2710a5(0x1c0)](a55_0x11b5bd['dim'](_0x2710a5(0x236))),0x1;const _0x532a1c=await withSpinner('Disabling\x20schedule\x20#'+_0x7668cc+_0x2710a5(0x200),()=>_0xfd8ef[_0x2710a5(0x2bb)][_0x2710a5(0x229)](_0x7668cc),{'verbose':_0x1a17f9[_0x2710a5(0x1ef)]}),_0x8d15ff=_0x532a1c[_0x2710a5(0x192)];return isStructuredFormat(_0x1a17f9)?await handleSingleObjectOutput(_0x8d15ff,_0x1a17f9):console[_0x2710a5(0x1c9)]('✔\x20Schedule\x20#'+_0x7668cc+_0x2710a5(0x1b5)+(_0x8d15ff[_0x2710a5(0x2bb)]?.[_0x2710a5(0x308)]||_0x2710a5(0x185))+')'),0x0;}}
|
|
1
|
+
const a55_0xa29ad1=a55_0x34d6;(function(_0x3e8667,_0x362943){const _0x2e3594=a55_0x34d6,_0xff2831=_0x3e8667();while(!![]){try{const _0x26ae7c=parseInt(_0x2e3594(0x358))/0x1+parseInt(_0x2e3594(0x264))/0x2+-parseInt(_0x2e3594(0x35b))/0x3*(-parseInt(_0x2e3594(0x331))/0x4)+parseInt(_0x2e3594(0x293))/0x5*(-parseInt(_0x2e3594(0x318))/0x6)+parseInt(_0x2e3594(0x19b))/0x7*(-parseInt(_0x2e3594(0x1a0))/0x8)+-parseInt(_0x2e3594(0x1a4))/0x9+-parseInt(_0x2e3594(0x255))/0xa*(parseInt(_0x2e3594(0x203))/0xb);if(_0x26ae7c===_0x362943)break;else _0xff2831['push'](_0xff2831['shift']());}catch(_0x352661){_0xff2831['push'](_0xff2831['shift']());}}}(a55_0x590a,0x6797f));import a55_0x12f6c0 from'chalk';import{existsSync}from'fs';import a55_0xe058bc 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_0x46d174 from'prompts';function getAttemptStatusDisplay(_0x1c5194){const _0xe220bc=a55_0x34d6;if(!_0x1c5194)return{'icon':'⏳','text':''};const {done:_0x11526d,success:_0x3449ca,cancelRequested:_0x508efb}=_0x1c5194;if(!_0x11526d)return _0x508efb?{'icon':'🛑','text':a55_0x12f6c0[_0xe220bc(0x227)](_0xe220bc(0x2ee))}:{'icon':'🔄','text':a55_0x12f6c0[_0xe220bc(0x1b6)](_0xe220bc(0x31d))};if(_0x3449ca)return{'icon':'✅','text':a55_0x12f6c0[_0xe220bc(0x1cf)]('success')};return{'icon':'❌','text':a55_0x12f6c0['red']('error')};}export class WorkflowBaseCommand extends BaseCommand{[a55_0xa29ad1(0x1a8)](_0x468be1,_0x2de17d,_0x4f3265=0x0){const _0x4c48b3=a55_0xa29ad1;return _0x468be1[_0x4f3265]||_0x2de17d[_0x4c48b3(0x1b0)];}['requireProject'](_0x5ee4a9,_0x349d0b,_0x1b0ebb=0x0){const _0x4847ee=a55_0xa29ad1,_0x819fd5=this[_0x4847ee(0x1a8)](_0x5ee4a9,_0x349d0b,_0x1b0ebb);if(!_0x819fd5)return console[_0x4847ee(0x2b5)](a55_0x12f6c0[_0x4847ee(0x1bb)](_0x4847ee(0x352)),'Project\x20name\x20is\x20required'),console['error'](a55_0x12f6c0[_0x4847ee(0x34a)](_0x4847ee(0x333))),null;return _0x819fd5;}[a55_0xa29ad1(0x29c)](_0x3ab74e,_0x334da3){const _0x171ffd=a55_0xa29ad1;if(_0x3ab74e[0x0]){const _0x493f79=_0x3ab74e[0x0][_0x171ffd(0x1c9)]('.');if(_0x493f79[_0x171ffd(0x2ec)]===0x1)return{'projectName':_0x493f79[0x0],'workflowName':undefined};else return _0x493f79[_0x171ffd(0x2ec)]===0x2?{'projectName':_0x493f79[0x0],'workflowName':_0x493f79[0x1]}:(console[_0x171ffd(0x2b5)](a55_0x12f6c0[_0x171ffd(0x1bb)](_0x171ffd(0x352)),_0x171ffd(0x1fe)),null);}return{'projectName':_0x334da3[_0x171ffd(0x1b0)],'workflowName':undefined};}['resolveProjectDir'](_0x2c996f,_0x31464f,_0x3c598f=0x0){const _0x14a832=a55_0xa29ad1;if(_0x2c996f[_0x3c598f])return _0x2c996f[_0x3c598f];if(_0x31464f[_0x14a832(0x1b0)]){const _0xa02335=a55_0xe058bc[_0x14a832(0x23a)](process[_0x14a832(0x344)](),_0x14a832(0x335),_0x31464f['workflowProject']);if(existsSync(a55_0xe058bc['join'](_0xa02335,_0x14a832(0x337))))return _0xa02335;}return undefined;}async[a55_0xa29ad1(0x338)](_0x448784,_0x5981d8,_0xd897c8){const _0x591aec=a55_0xa29ad1;try{const _0x4ae260=await _0x448784[_0x591aec(0x1d9)][_0x591aec(0x335)](_0x5981d8,{'limit':0x1});if(_0x4ae260['length']>0x0){const _0x48c0ca=_0x4ae260[0x0]['id'],_0x57630f=getWorkflowUrl(_0xd897c8,_0x48c0ca);console[_0x591aec(0x2b5)](_0x591aec(0x2ce)+a55_0x12f6c0[_0x591aec(0x2dd)](_0x57630f));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x298);['description']='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a55_0xa29ad1(0x22c)](_0x24b9f7){const _0x57b1ec=a55_0xa29ad1,{options:_0x24594d,args:_0x57ef7a,tdx:_0x17886d}=_0x24b9f7,_0x422cdf=_0x57ef7a[0x0],_0x399820=_0x24594d[_0x57b1ec(0x25e)];if(_0x399820)return saveSessionContext({'workflow_project':undefined},_0x24594d[_0x57b1ec(0x326)]),console['log'](a55_0x12f6c0[_0x57b1ec(0x1cf)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x422cdf)return console[_0x57b1ec(0x2b5)](a55_0x12f6c0[_0x57b1ec(0x1bb)](_0x57b1ec(0x352)),_0x57b1ec(0x216)),console['error'](a55_0x12f6c0[_0x57b1ec(0x34a)](_0x57b1ec(0x25a))),console['error'](a55_0x12f6c0[_0x57b1ec(0x34a)](_0x57b1ec(0x289))),0x1;const _0x376125=await withSpinner(_0x57b1ec(0x341)+_0x422cdf+_0x57b1ec(0x355),()=>_0x17886d[_0x57b1ec(0x1d9)][_0x57b1ec(0x300)](_0x422cdf),{'verbose':_0x24594d[_0x57b1ec(0x19f)]}),{name:_0x2999bf}=_0x376125[_0x57b1ec(0x35c)];return saveSessionContext({'workflow_project':_0x2999bf},_0x24594d[_0x57b1ec(0x326)]),console[_0x57b1ec(0x361)](a55_0x12f6c0[_0x57b1ec(0x1cf)](_0x57b1ec(0x274)+a55_0x12f6c0[_0x57b1ec(0x2dd)](_0x2999bf))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x1b9);[a55_0xa29ad1(0x22a)]='List\x20all\x20workflow\x20projects';async[a55_0xa29ad1(0x22c)](_0x195b51){const _0x2cea0f=a55_0xa29ad1,{options:_0x2cd3bf,args:_0x2d87b1,tdx:_0x2c6873}=_0x195b51,_0x4054b5=_0x2d87b1[0x0];_0x2cd3bf[_0x2cea0f(0x19f)]&&_0x4054b5&&console[_0x2cea0f(0x2b5)](_0x2cea0f(0x2f8)+_0x4054b5);const _0x377ea3=await withSpinner(_0x2cea0f(0x2c3),()=>_0x2c6873[_0x2cea0f(0x1d9)]['projects'](_0x4054b5,{'limit':_0x2cd3bf[_0x2cea0f(0x301)]}),{'verbose':_0x2cd3bf[_0x2cea0f(0x19f)]});let _0x468ff6=_0x377ea3[_0x2cea0f(0x35c)];_0x468ff6[_0x2cea0f(0x271)]((_0x3f3311,_0x2e8b11)=>_0x3f3311[_0x2cea0f(0x1ff)]['localeCompare'](_0x2e8b11['name']));const _0x3fa94c=_0x2cd3bf[_0x2cea0f(0x301)]&&_0x468ff6[_0x2cea0f(0x2ec)]>=_0x2cd3bf[_0x2cea0f(0x301)]?a55_0x12f6c0[_0x2cea0f(0x34a)](_0x2cea0f(0x1ee)):'';console[_0x2cea0f(0x2b5)](_0x2cea0f(0x32a)+_0x468ff6[_0x2cea0f(0x2ec)]+'\x20project'+(_0x468ff6['length']!==0x1?'s':'')+_0x3fa94c);if(_0x2cd3bf[_0x2cea0f(0x1d2)]===_0x2cea0f(0x325)||_0x2cd3bf[_0x2cea0f(0x1d2)]==='jsonl'||_0x2cd3bf[_0x2cea0f(0x1d2)]===_0x2cea0f(0x20d))await handleSDKOutput(_0x468ff6,_0x2cd3bf);else{if(_0x468ff6[_0x2cea0f(0x2ec)]===0x0)_0x4054b5?console['log']('No\x20projects\x20match\x20pattern:\x20'+_0x4054b5):console['log']('No\x20workflow\x20projects\x20found');else{const _0x4b9050=_0x468ff6[_0x2cea0f(0x312)](_0x52f71d=>{const _0x2c26c2=_0x2cea0f,_0x51eea2=_0x52f71d['metadata']?.['some'](_0x38cbcb=>_0x38cbcb[_0x2c26c2(0x2b0)]===_0x2c26c2(0x236)),_0x4ecdc9=_0x51eea2?a55_0x12f6c0[_0x2c26c2(0x34a)]('\x20(system)'):'';return _0x2c26c2(0x2ad)+_0x52f71d[_0x2c26c2(0x1ff)]+_0x4ecdc9;});await writeOutput(_0x4b9050[_0x2cea0f(0x23a)]('\x0a'),_0x2cd3bf[_0x2cea0f(0x196)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x1dd);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x282);async[a55_0xa29ad1(0x22c)](_0x3afef0){const _0x3762ce=a55_0xa29ad1,{options:_0x17dc5d,args:_0x219930,tdx:_0x5deab7}=_0x3afef0,_0x31ec07=this[_0x3762ce(0x1a8)](_0x219930,_0x17dc5d);_0x17dc5d[_0x3762ce(0x19f)]&&_0x31ec07&&console[_0x3762ce(0x2b5)](_0x3762ce(0x257)+_0x31ec07);const _0x52f4cd=await withSpinner(_0x3762ce(0x316),()=>_0x5deab7[_0x3762ce(0x1d9)][_0x3762ce(0x335)](_0x31ec07,{'limit':_0x17dc5d['limit']}),{'verbose':_0x17dc5d[_0x3762ce(0x19f)]});let _0x44c4ea=_0x52f4cd[_0x3762ce(0x35c)];_0x44c4ea['sort']((_0x34cde6,_0x333208)=>{const _0x540b6e=_0x3762ce,_0x182070=_0x34cde6[_0x540b6e(0x1ff)][_0x540b6e(0x1bd)](_0x333208[_0x540b6e(0x1ff)]);if(_0x182070!==0x0)return _0x182070;return(_0x34cde6[_0x540b6e(0x356)]?.['name']||'')['localeCompare'](_0x333208[_0x540b6e(0x356)]?.[_0x540b6e(0x1ff)]||'');});const _0x434f88=_0x17dc5d['limit']&&_0x44c4ea[_0x3762ce(0x2ec)]>=_0x17dc5d[_0x3762ce(0x301)]?a55_0x12f6c0['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3762ce(0x2b5)]('✔\x20Found\x20'+_0x44c4ea[_0x3762ce(0x2ec)]+'\x20workflow'+(_0x44c4ea[_0x3762ce(0x2ec)]!==0x1?'s':'')+_0x434f88);if(_0x17dc5d[_0x3762ce(0x1d2)]==='json'||_0x17dc5d[_0x3762ce(0x1d2)]==='jsonl'||_0x17dc5d['format']==='table')await handleSDKOutput(_0x44c4ea,_0x17dc5d);else{if(_0x44c4ea[_0x3762ce(0x2ec)]===0x0)_0x31ec07?console[_0x3762ce(0x361)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x31ec07):console['log'](_0x3762ce(0x268));else{const _0x58a9df=_0x17dc5d[_0x3762ce(0x2e4)],_0x2de420=_0x44c4ea[_0x3762ce(0x312)](_0x3a0e04=>{const _0x3306b8=_0x3762ce,_0x53eaa5=a55_0x12f6c0['dim']('#'+_0x3a0e04['id']),_0x247a9e=hyperlink(_0x53eaa5,getWorkflowUrl(_0x58a9df,_0x3a0e04['id'])),_0x4349a8=_0x3a0e04['project']?.[_0x3306b8(0x1ff)]?a55_0x12f6c0[_0x3306b8(0x34a)]('\x20('+_0x3a0e04[_0x3306b8(0x356)][_0x3306b8(0x1ff)]+')'):'';return _0x3306b8(0x278)+_0x247a9e+'\x20'+_0x3a0e04[_0x3306b8(0x1ff)]+_0x4349a8;});await writeOutput(_0x2de420[_0x3762ce(0x23a)]('\x0a'),_0x17dc5d[_0x3762ce(0x196)],_0x3762ce(0x292));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x21e);[a55_0xa29ad1(0x22a)]='List\x20workflow\x20execution\x20sessions';async['execute'](_0x24e6d9){const _0x464d6a=a55_0xa29ad1,{options:_0x2ef337,args:_0x436be1,tdx:_0xa968ea}=_0x24e6d9,_0x198a4e=this[_0x464d6a(0x29c)](_0x436be1,_0x2ef337);if(!_0x198a4e)return 0x1;const {projectName:_0x1b670d,workflowName:_0x1e743c}=_0x198a4e;if(_0x2ef337[_0x464d6a(0x19f)]){if(_0x1b670d&&_0x1e743c)console['error'](_0x464d6a(0x2fb)+_0x1b670d+'.'+_0x1e743c);else _0x1b670d&&console[_0x464d6a(0x2b5)](_0x464d6a(0x31a)+_0x1b670d);const _0x3a15f6=_0x2ef337['status'];_0x3a15f6&&console[_0x464d6a(0x2b5)](_0x464d6a(0x24f)+_0x3a15f6);}let _0x3b92e6=0x28;if(process[_0x464d6a(0x2dc)]['isTTY']&&!_0x2ef337['output']&&!_0x2ef337[_0x464d6a(0x1d2)]){const _0xb9914a=process[_0x464d6a(0x2dc)][_0x464d6a(0x29b)]||0x28;_0x3b92e6=Math[_0x464d6a(0x27f)](0x14,Math[_0x464d6a(0x27e)](_0xb9914a*0x2/0x3));}const _0x2a95e7=_0x2ef337[_0x464d6a(0x301)]||_0x3b92e6,_0x525a21=await withSpinner(_0x464d6a(0x1a7),()=>_0xa968ea[_0x464d6a(0x1d9)][_0x464d6a(0x243)]({'projectName':_0x1b670d,'workflowName':_0x1e743c,'status':_0x2ef337[_0x464d6a(0x1d8)],'fromTime':_0x2ef337['from'],'toTime':_0x2ef337['to'],'limit':_0x2a95e7}),{'verbose':_0x2ef337[_0x464d6a(0x19f)]}),_0x49b241=_0x525a21['data'];_0x49b241['sort']((_0x4724ec,_0x55b7fe)=>{const _0x4a88d9=_0x464d6a,_0x3b9a26=_0x4724ec[_0x4a88d9(0x329)]||'',_0x518d84=_0x55b7fe[_0x4a88d9(0x329)]||'';return _0x518d84[_0x4a88d9(0x1bd)](_0x3b9a26);});_0x49b241['length']>=_0x2a95e7?console[_0x464d6a(0x2b5)]('✔\x20Showing\x20'+_0x49b241['length']+_0x464d6a(0x1ac)+a55_0x12f6c0[_0x464d6a(0x34a)](_0x464d6a(0x359))):console[_0x464d6a(0x2b5)](_0x464d6a(0x32a)+_0x49b241[_0x464d6a(0x2ec)]+_0x464d6a(0x35e)+(_0x49b241[_0x464d6a(0x2ec)]!==0x1?'s':''));if(_0x2ef337[_0x464d6a(0x1d2)]===_0x464d6a(0x325)||_0x2ef337[_0x464d6a(0x1d2)]==='jsonl'||_0x2ef337[_0x464d6a(0x1d2)]===_0x464d6a(0x20d))await handleSDKOutput(_0x49b241,_0x2ef337);else{if(!process[_0x464d6a(0x2dc)][_0x464d6a(0x1fb)]||_0x2ef337[_0x464d6a(0x196)]){if(_0x49b241[_0x464d6a(0x2ec)]===0x0){if(_0x1b670d&&_0x1e743c)console[_0x464d6a(0x361)](_0x464d6a(0x1fd)+_0x1b670d+'.'+_0x1e743c);else _0x1b670d?console[_0x464d6a(0x361)](_0x464d6a(0x349)+_0x1b670d):console[_0x464d6a(0x361)]('No\x20sessions\x20found');}else{const _0x2a8aeb=_0x2ef337[_0x464d6a(0x2e4)],_0x16bc25=this[_0x464d6a(0x1b4)](_0x49b241,_0x2a8aeb);_0x2ef337['output']?await writeOutput(_0x16bc25,_0x2ef337[_0x464d6a(0x196)],_0x464d6a(0x292)):console[_0x464d6a(0x361)](_0x16bc25);}!_0x1b670d&&(console[_0x464d6a(0x2b5)](''),console[_0x464d6a(0x2b5)](a55_0x12f6c0[_0x464d6a(0x34a)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x464d6a(0x2b5)](a55_0x12f6c0[_0x464d6a(0x34a)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a55_0x12f6c0[_0x464d6a(0x34a)](_0x464d6a(0x33f))));}else{if(_0x49b241['length']===0x0){if(_0x1b670d&&_0x1e743c)console[_0x464d6a(0x361)]('No\x20sessions\x20found\x20for:\x20'+_0x1b670d+'.'+_0x1e743c);else _0x1b670d?console['log'](_0x464d6a(0x349)+_0x1b670d):console[_0x464d6a(0x361)]('No\x20sessions\x20found');}else await this['navigateSessionsInteractive'](_0x49b241,_0x24e6d9,_0x1b670d);}}return 0x0;}[a55_0xa29ad1(0x1b4)](_0x9bf3c9,_0x5baab1){const _0x4c8330=a55_0xa29ad1,_0xdb59f5=[],_0x45d4a2=new Map();let _0x227030=Infinity,_0x5e7f06=-Infinity;for(const _0x12d59a of _0x9bf3c9){if(_0x12d59a[_0x4c8330(0x1af)]?.[_0x4c8330(0x1d7)]){const _0x15c4c1=new Date(_0x12d59a[_0x4c8330(0x1af)][_0x4c8330(0x1d7)])[_0x4c8330(0x34e)](),_0x1583fb=_0x12d59a[_0x4c8330(0x1af)][_0x4c8330(0x353)]?new Date(_0x12d59a[_0x4c8330(0x1af)]['finishedAt'])['getTime']():Date[_0x4c8330(0x2a3)](),_0x5e9034=_0x12d59a[_0x4c8330(0x356)]?.[_0x4c8330(0x1ff)]||_0x4c8330(0x1f9);!_0x45d4a2[_0x4c8330(0x262)](_0x5e9034)&&_0x45d4a2['set'](_0x5e9034,[]),_0x45d4a2['get'](_0x5e9034)[_0x4c8330(0x267)]({'session':_0x12d59a,'startTime':_0x15c4c1,'endTime':_0x1583fb,'duration':_0x1583fb-_0x15c4c1}),_0x227030=Math[_0x4c8330(0x21c)](_0x227030,_0x15c4c1),_0x5e7f06=Math[_0x4c8330(0x27f)](_0x5e7f06,_0x1583fb);}}if(_0x45d4a2[_0x4c8330(0x2b1)]===0x0)return _0x4c8330(0x26a);const _0x2761de=process['stdout'][_0x4c8330(0x315)]||0x78,_0x4fdce1=0x1e,_0x3a4e33=0x32,_0x170db2=0x4,_0x3917ac=Math['min'](_0x3a4e33,Math[_0x4c8330(0x27f)](_0x4fdce1,Math['floor'](_0x2761de*0.3))),_0xfb13fe=_0x2761de-_0x3917ac-TIMELINE_CONFIG[_0x4c8330(0x248)]-0x3-_0x170db2,_0x13b408=_0x5e7f06-_0x227030,_0x36716d=_0x13b408/_0x3917ac,_0x328dd3=renderTimeAxis({'startTime':_0x227030,'endTime':_0x5e7f06,'durationMs':_0x13b408,'msPerChar':_0x36716d},_0x3917ac),_0x5d344f=[];for(const _0x5008a8 of _0x45d4a2[_0x4c8330(0x34f)]()){_0x5d344f[_0x4c8330(0x267)](..._0x5008a8);}_0x5d344f['sort']((_0xe956d8,_0x2e3801)=>_0x2e3801[_0x4c8330(0x1b8)]-_0xe956d8['startTime']);const _0x5ba363=new Date(_0x227030),_0x8affa=formatDate(_0x5ba363),_0x2545e7=_0x170db2+TIMELINE_CONFIG[_0x4c8330(0x1a5)]+TIMELINE_CONFIG[_0x4c8330(0x31e)]+_0xfb13fe,_0x225431='\x20'[_0x4c8330(0x1f2)](_0x2545e7-_0x8affa[_0x4c8330(0x2ec)]),_0x26ba78=_0x225431+a55_0x12f6c0[_0x4c8330(0x34a)](_0x8affa)+'\x20'+_0x328dd3;_0xdb59f5[_0x4c8330(0x267)](_0x26ba78);const _0x1f9359=0x16;let _0x5ac90d=0x0;for(const _0x4d1d39 of _0x5d344f){const _0x3a9c75=_0x4d1d39['session']['project']?.[_0x4c8330(0x1ff)]||'?',_0x55b2ff=Math[_0x4c8330(0x21c)](stringWidth(_0x3a9c75),_0x1f9359);_0x5ac90d=Math[_0x4c8330(0x27f)](_0x5ac90d,_0x55b2ff);}for(const _0x29e9db of _0x5d344f){const {session:_0x5bd0cf,startTime:_0x7d048b,endTime:_0x5bf861,duration:_0x2c58c1}=_0x29e9db,_0x17bb10=_0x5bd0cf[_0x4c8330(0x356)]?.['id'],_0x1fc870=_0x5bd0cf['id'],_0x5e16fd=_0x5bd0cf[_0x4c8330(0x356)]?.[_0x4c8330(0x1ff)]||'?',_0x189d51=_0x5bd0cf['workflow']?.['name']||'?';let _0x5e7986,_0x310273;if(_0x5bd0cf['lastAttempt']){const _0x1b6970=_0x5bd0cf['lastAttempt'];!_0x1b6970['done']?(_0x5e7986=_0x1b6970[_0x4c8330(0x30b)]?'🛑':'🔄',_0x310273=_0x1b6970[_0x4c8330(0x30b)]?a55_0x12f6c0[_0x4c8330(0x227)]:a55_0x12f6c0[_0x4c8330(0x1b6)]):(_0x5e7986=_0x1b6970[_0x4c8330(0x19a)]?'✅':'❌',_0x310273=_0x1b6970[_0x4c8330(0x19a)]?a55_0x12f6c0['green']:a55_0x12f6c0[_0x4c8330(0x1bb)]);}else _0x5e7986='⏳',_0x310273=a55_0x12f6c0[_0x4c8330(0x34a)];const _0x338bb3='#'+_0x1fc870,_0x168cc4=_0x17bb10?hyperlink(_0x338bb3,getWorkflowSessionUrl(_0x5baab1,_0x17bb10,_0x1fc870)):_0x338bb3;let _0x13520c=_0x5e16fd;stringWidth(_0x5e16fd)>_0x1f9359&&(_0x13520c=_0x5e16fd['slice'](0x0,_0x1f9359-0x1)+'…');const _0x50286c=a55_0x12f6c0[_0x4c8330(0x34a)](_0x13520c),_0x2fd78b=stringWidth(_0x13520c),_0x3ed16e='\x20'[_0x4c8330(0x1f2)](_0x5ac90d-stringWidth(_0x13520c)+0x2),_0x2cc513='('+formatElapsed(_0x2c58c1)+')',_0x3602b7=stringWidth(_0x2cc513),_0x17070c=stringWidth(_0x338bb3),_0x209217=_0x17070c+0x1+_0x2fd78b+_0x3ed16e[_0x4c8330(0x2ec)],_0x1c6d70=_0xfb13fe-_0x209217-_0x3602b7-0x1-0x8;let _0x139e1f=_0x189d51;stringWidth(_0x139e1f)>_0x1c6d70&&(_0x139e1f=_0x139e1f[_0x4c8330(0x29a)](0x0,_0x1c6d70-0x1)+'…');const _0xcd8f88=_0x168cc4+'\x20'+_0x50286c+_0x3ed16e+_0x139e1f,_0x6ac3b2=stringWidth(_0xcd8f88),_0x199890=_0xfb13fe-_0x6ac3b2-_0x3602b7,_0x390100=_0xcd8f88+'\x20'['repeat'](Math['max'](0x1,_0x199890))+a55_0x12f6c0[_0x4c8330(0x34a)](_0x2cc513),_0x2873e6=Math[_0x4c8330(0x27e)]((_0x7d048b-_0x227030)/_0x36716d),_0x19d6db=Math['floor']((_0x5bf861-_0x227030)/_0x36716d),_0x5b1c79=Math[_0x4c8330(0x27f)](_0x2873e6+0x1,_0x19d6db),_0x3f7f2a=new Array(_0x3917ac)[_0x4c8330(0x2cb)]('\x20');for(let _0x26331c=_0x2873e6;_0x26331c<Math['min'](_0x5b1c79,_0x3917ac);_0x26331c++){_0x3f7f2a[_0x26331c]='─';}const _0x46106a=_0x3f7f2a['map'](_0x4d746a=>_0x4d746a==='\x20'?'\x20':_0x310273(_0x4d746a))[_0x4c8330(0x23a)]('');_0xdb59f5[_0x4c8330(0x267)](_0x5e7986+'\x20'+_0x390100+'│'+_0x46106a+'│');}return _0xdb59f5[_0x4c8330(0x23a)]('\x0a');}async[a55_0xa29ad1(0x34c)](_0x45a3af,_0x51886c,_0xd167c0){const _0x3e7ec9=a55_0xa29ad1,{options:_0x34d4e7,tdx:_0x168682}=_0x51886c,_0x28f43e=_0x34d4e7[_0x3e7ec9(0x2e4)],{timelineRows:_0xc783c3,timeAxisHeader:_0x340603}=this[_0x3e7ec9(0x336)](_0x45a3af,_0x28f43e),_0x2e01a1=_0xc783c3[_0x3e7ec9(0x23e)](_0x10fdf4=>_0x10fdf4[_0x3e7ec9(0x2c5)]);if(_0x2e01a1[_0x3e7ec9(0x2ec)]===0x0){const _0xcd0b83=this[_0x3e7ec9(0x1b4)](_0x45a3af,_0x28f43e);console[_0x3e7ec9(0x361)](_0xcd0b83);!_0xd167c0&&(console['error'](''),console['error'](a55_0x12f6c0['dim'](_0x3e7ec9(0x321))),console[_0x3e7ec9(0x2b5)](a55_0x12f6c0['dim'](_0x3e7ec9(0x284))+'or'+a55_0x12f6c0[_0x3e7ec9(0x34a)](_0x3e7ec9(0x33f))));return;}_0x340603&&console[_0x3e7ec9(0x361)](_0x340603);const _0x550706=_0xc783c3[_0x3e7ec9(0x23e)](_0x2f813d=>_0x2f813d[_0x3e7ec9(0x2c5)])['map'](_0x315983=>({'title':_0x315983['displayLine'],'value':_0x315983['attemptId']})),_0x320f18=process[_0x3e7ec9(0x2dc)]['rows']||0x3c,_0xe88b9b=Math['max'](0x28,Math[_0x3e7ec9(0x27e)](_0x320f18*0x2/0x3)),_0x402c77=await a55_0x46d174({'type':_0x3e7ec9(0x1b2),'name':_0x3e7ec9(0x2c5),'message':_0x3e7ec9(0x309),'choices':_0x550706,'initial':-0x1,'limit':_0xe88b9b,'clearFirst':!![],'fallback':{'title':_0x3e7ec9(0x2eb),'value':null},'suggest':(_0x897361,_0x5b5171)=>{const _0x12533e=_0x3e7ec9;if(!_0x897361)return Promise[_0x12533e(0x215)](_0x5b5171);const _0x42f0cb=_0x5b5171[_0x12533e(0x23e)](_0x46c0c5=>{const _0x3fc3bf=_0x12533e,_0xa51db4=_0x46c0c5;return _0xa51db4[_0x3fc3bf(0x1c4)]['toLowerCase']()[_0x3fc3bf(0x210)](_0x897361[_0x3fc3bf(0x33b)]());});return Promise[_0x12533e(0x215)](_0x42f0cb);}}),_0x201b8f=()=>{const _0x32dd25=_0x3e7ec9;process['stdout'][_0x32dd25(0x342)](_0x32dd25(0x1e3)),process['stdout'][_0x32dd25(0x342)](_0x32dd25(0x1e3)),process['stdout'][_0x32dd25(0x342)](_0x32dd25(0x1e3));},_0x122cc9=_0x402c77&&_0x402c77[_0x3e7ec9(0x2c5)]&&_0x402c77[_0x3e7ec9(0x2c5)]!==null&&_0x402c77[_0x3e7ec9(0x2c5)][_0x3e7ec9(0x1aa)]()!=='';if(!_0x122cc9){_0x201b8f(),console[_0x3e7ec9(0x361)](a55_0x12f6c0[_0x3e7ec9(0x34a)](_0x3e7ec9(0x1e5)));return;}_0x201b8f();const _0x209abf=_0x45a3af[_0x3e7ec9(0x2b2)](_0x415e82=>_0x415e82['lastAttempt']?.['id']===_0x402c77[_0x3e7ec9(0x2c5)]);if(_0x209abf){const _0xb5c55f=_0x209abf[_0x3e7ec9(0x356)]?.[_0x3e7ec9(0x1ff)]||'?',_0xdffde9=_0x209abf[_0x3e7ec9(0x1d9)]?.['name']||'?';console[_0x3e7ec9(0x361)](_0x3e7ec9(0x308)+a55_0x12f6c0[_0x3e7ec9(0x34a)](_0xb5c55f)+',\x20Workflow:\x20'+a55_0x12f6c0[_0x3e7ec9(0x34a)](_0xdffde9));}const _0x64147d=new WorkflowTimelineCommand();await _0x64147d[_0x3e7ec9(0x22c)]({'args':[],'options':{..._0x34d4e7,'attemptId':_0x402c77['attemptId']},'tdx':_0x168682});}['generateSessionTimelineRows'](_0x486a0e,_0x1f4214){const _0x3c229b=a55_0xa29ad1,_0x265847=new Map();for(const _0x1de55d of _0x486a0e){_0x1de55d['id']&&_0x1de55d[_0x3c229b(0x1af)]?.['id']&&_0x265847['set'](_0x1de55d['id'],_0x1de55d['lastAttempt']['id']);}const _0x18693b=[];let _0x36f0d7='';const _0x11d2a3=this[_0x3c229b(0x1b4)](_0x486a0e,_0x1f4214),_0x507b42=_0x11d2a3['split']('\x0a');for(const _0x3e5b1a of _0x507b42){if(_0x3e5b1a[_0x3c229b(0x26d)](_0x3c229b(0x218))||_0x3e5b1a[_0x3c229b(0x328)](/^\s+\d{4}-\d{2}-\d{2}/))_0x36f0d7=_0x3e5b1a;else{if(_0x3e5b1a[_0x3c229b(0x328)](/^[✅❌🔄🛑⏳]/)){const _0x3dd7a9=_0x3e5b1a[_0x3c229b(0x328)](/#(\d+)/),_0x3eb74c=_0x3dd7a9?_0x3dd7a9[0x1]:null,_0xf85f19=_0x3eb74c?_0x265847[_0x3c229b(0x2a7)](_0x3eb74c)||null:null,_0x588c9e=_0x486a0e[_0x3c229b(0x2b2)](_0x2a8a56=>_0x2a8a56['id']===_0x3eb74c),_0x279652=_0x588c9e?.['project']?.[_0x3c229b(0x1ff)]||'';_0x18693b[_0x3c229b(0x267)]({'displayLine':_0x3e5b1a,'attemptId':_0xf85f19,'projectName':_0x279652});}}}return{'timelineRows':_0x18693b,'timeAxisHeader':_0x36f0d7};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a55_0xa29ad1(0x1a3);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x241);async[a55_0xa29ad1(0x22c)](_0x3d00de){const _0x3c368a=a55_0xa29ad1,{options:_0x9436bb,args:_0x3e2c37,tdx:_0x3fb31d}=_0x3d00de,_0x1d6945=this['parseProjectWorkflowPattern'](_0x3e2c37,_0x9436bb);if(!_0x1d6945)return 0x1;const {projectName:_0x371a4f,workflowName:_0x5171ee}=_0x1d6945,_0x2c7ad3=_0x9436bb[_0x3c368a(0x2bd)];if(_0x9436bb[_0x3c368a(0x19f)]){if(_0x371a4f&&_0x5171ee)console[_0x3c368a(0x2b5)](_0x3c368a(0x2fb)+_0x371a4f+'.'+_0x5171ee);else _0x371a4f&&console[_0x3c368a(0x2b5)]('Filter:\x20project='+_0x371a4f);_0x2c7ad3&&console[_0x3c368a(0x2b5)](_0x3c368a(0x30e));}const _0x3dabd7=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x3fb31d[_0x3c368a(0x1d9)][_0x3c368a(0x20c)]({'projectName':_0x371a4f,'workflowName':_0x5171ee,'includeRetried':_0x2c7ad3,'limit':_0x9436bb[_0x3c368a(0x301)]}),{'verbose':_0x9436bb[_0x3c368a(0x19f)]}),_0x395b7a=_0x3dabd7[_0x3c368a(0x35c)],_0x153f70=_0x9436bb['limit']||0x64,_0x25bdf2=_0x395b7a[_0x3c368a(0x2ec)]>=_0x153f70?a55_0x12f6c0[_0x3c368a(0x34a)](_0x3c368a(0x1ee)):'';console['error']('✔\x20Found\x20'+_0x395b7a[_0x3c368a(0x2ec)]+_0x3c368a(0x21f)+(_0x395b7a[_0x3c368a(0x2ec)]!==0x1?'s':'')+_0x25bdf2);if(_0x9436bb['format']==='json'||_0x9436bb[_0x3c368a(0x1d2)]==='jsonl'||_0x9436bb[_0x3c368a(0x1d2)]===_0x3c368a(0x20d))await handleSDKOutput(_0x395b7a,_0x9436bb);else{if(_0x395b7a[_0x3c368a(0x2ec)]===0x0){if(_0x371a4f&&_0x5171ee)console[_0x3c368a(0x361)]('No\x20attempts\x20found\x20for:\x20'+_0x371a4f+'.'+_0x5171ee);else _0x371a4f?console[_0x3c368a(0x361)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x371a4f):console[_0x3c368a(0x361)](_0x3c368a(0x2b7));}else{const _0x4c1f4d=_0x9436bb[_0x3c368a(0x2e4)],_0x18dfef=_0x395b7a[_0x3c368a(0x312)](_0x204e9d=>{const _0x2d049a=_0x3c368a,_0x2d0edf=a55_0x12f6c0[_0x2d049a(0x34a)]('#'+_0x204e9d['id']),_0x2e509e=_0x204e9d[_0x2d049a(0x356)]?.['id'],_0x9347aa=_0x204e9d[_0x2d049a(0x192)]||_0x204e9d[_0x2d049a(0x2a5)],_0x5d3126=_0x2e509e&&_0x9347aa?hyperlink(_0x2d0edf,getWorkflowAttemptUrl(_0x4c1f4d,_0x2e509e,_0x9347aa,_0x204e9d['id'])):_0x2d0edf,{icon:_0x1cc277,text:_0xfdd18e}=getAttemptStatusDisplay(_0x204e9d),_0x18183a=(_0x204e9d[_0x2d049a(0x356)]?.[_0x2d049a(0x1ff)]||'?')+'.'+(_0x204e9d[_0x2d049a(0x1d9)]?.['name']||'?'),_0x29a157=_0x204e9d['sessionTime']?a55_0x12f6c0[_0x2d049a(0x34a)](_0x204e9d[_0x2d049a(0x329)]):'';return(_0x5d3126+'\x20'+_0x1cc277+(_0xfdd18e?'\x20'+_0xfdd18e:'')+'\x20'+_0x18183a+'\x20'+_0x29a157)[_0x2d049a(0x1f8)]();});await writeOutput(_0x18dfef[_0x3c368a(0x23a)]('\x0a'),_0x9436bb[_0x3c368a(0x196)],_0x3c368a(0x292));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x2da);['description']=a55_0xa29ad1(0x25f);async[a55_0xa29ad1(0x22c)](_0xb0ac35){const _0x5cb97d=a55_0xa29ad1,{options:_0xcfc73f,args:_0x44107d,tdx:_0x49fe77}=_0xb0ac35,_0x27ccce=_0x44107d[0x0];if(!_0x27ccce)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0xcfc73f[_0x5cb97d(0x19f)]&&console['error']('Attempt\x20ID:\x20'+_0x27ccce);const _0x44010a=await withSpinner(_0x5cb97d(0x1ba),()=>_0x49fe77[_0x5cb97d(0x1d9)][_0x5cb97d(0x28b)](_0x27ccce),{'verbose':_0xcfc73f[_0x5cb97d(0x19f)]}),_0x2a0643=_0x44010a[_0x5cb97d(0x35c)];let _0x5bb448;!_0x2a0643['done']?_0x5bb448=_0x2a0643[_0x5cb97d(0x30b)]?_0x5cb97d(0x2ee):_0x5cb97d(0x31d):_0x5bb448=_0x2a0643[_0x5cb97d(0x19a)]?_0x5cb97d(0x19a):_0x5cb97d(0x2b5);let _0x2c8adb;if(_0x2a0643[_0x5cb97d(0x1d7)]&&_0x2a0643['finishedAt']){const _0x1d8427=new Date(_0x2a0643[_0x5cb97d(0x1d7)])[_0x5cb97d(0x34e)](),_0x4afb08=new Date(_0x2a0643[_0x5cb97d(0x353)])[_0x5cb97d(0x34e)]();_0x2c8adb=Math[_0x5cb97d(0x2ca)]((_0x4afb08-_0x1d8427)/0x3e8);}const _0x332263={'attempt_id':_0x2a0643['id'],'status':_0x5bb448,..._0x2a0643[_0x5cb97d(0x28d)]!==undefined&&{'index':_0x2a0643['index']},..._0x2a0643[_0x5cb97d(0x356)]&&{'project':_0x2a0643[_0x5cb97d(0x356)][_0x5cb97d(0x1ff)]},..._0x2a0643[_0x5cb97d(0x1d9)]&&{'workflow':_0x2a0643[_0x5cb97d(0x1d9)][_0x5cb97d(0x1ff)]},..._0x2a0643['sessionId']&&{'session_id':_0x2a0643[_0x5cb97d(0x2a5)]},..._0x2a0643[_0x5cb97d(0x329)]&&{'session_time':_0x2a0643[_0x5cb97d(0x329)]},..._0x2a0643[_0x5cb97d(0x363)]&&{'retry_attempt':_0x2a0643[_0x5cb97d(0x363)]},..._0x2c8adb!==undefined&&{'duration_sec':_0x2c8adb},..._0x2a0643[_0x5cb97d(0x1d7)]&&{'created_at':_0x2a0643[_0x5cb97d(0x1d7)]},..._0x2a0643[_0x5cb97d(0x353)]&&{'finished_at':_0x2a0643['finishedAt']},...Object[_0x5cb97d(0x281)](_0x2a0643['params'])['length']>0x0&&{'params':_0x2a0643[_0x5cb97d(0x194)]}};return await handleSingleObjectOutput(_0x332263,_0xcfc73f),0x0;}}function a55_0x34d6(_0x35007e,_0x54210e){_0x35007e=_0x35007e-0x192;const _0x590adb=a55_0x590a();let _0x34d66d=_0x590adb[_0x35007e];return _0x34d66d;}export class WorkflowTasksCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x354);['description']=a55_0xa29ad1(0x2a9);async['execute'](_0x27e6bc){const _0x146fe3=a55_0xa29ad1,{options:_0x45adb4,args:_0x3448d2,tdx:_0x529bdb}=_0x27e6bc,_0x585cc4=_0x3448d2[0x0];if(!_0x585cc4)return console['error'](_0x146fe3(0x22e)),0x1;const _0x3d504f=_0x45adb4['includeSubtasks'];_0x45adb4[_0x146fe3(0x19f)]&&(console[_0x146fe3(0x2b5)](_0x146fe3(0x21a)+_0x585cc4),_0x3d504f&&console[_0x146fe3(0x2b5)]('Including\x20subtasks:\x20yes'));const _0xdb1df6=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x529bdb[_0x146fe3(0x1d9)][_0x146fe3(0x2f7)](_0x585cc4,_0x3d504f||![]),{'verbose':_0x45adb4[_0x146fe3(0x19f)]}),_0x50c945=_0xdb1df6[_0x146fe3(0x35c)];return console[_0x146fe3(0x2b5)](_0x146fe3(0x32a)+_0x50c945['length']+_0x146fe3(0x348)+(_0x50c945[_0x146fe3(0x2ec)]!==0x1?'s':'')),await handleSDKOutput(_0x50c945,_0x45adb4),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a55_0xa29ad1(0x2ef);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x2f3);async['execute'](_0x14477a){const _0x5d174e=a55_0xa29ad1,{options:_0x3c6fe7,args:_0x1edd95,tdx:_0x565a45}=_0x14477a,_0x22fdae=_0x1edd95[0x0];let _0x24b41a=_0x1edd95[0x1];if(!_0x22fdae)return console[_0x5d174e(0x2b5)](_0x5d174e(0x22e)),0x1;_0x3c6fe7[_0x5d174e(0x19f)]&&(console[_0x5d174e(0x2b5)]('Attempt\x20ID:\x20'+_0x22fdae),_0x24b41a&&console[_0x5d174e(0x2b5)](_0x5d174e(0x1cd)+_0x24b41a));const _0x2093b1=await withSpinner(_0x5d174e(0x240),()=>_0x565a45['workflow'][_0x5d174e(0x1e4)](_0x22fdae,_0x24b41a),{'verbose':_0x3c6fe7[_0x5d174e(0x19f)]}),_0x1e57d4=_0x2093b1[_0x5d174e(0x35c)];if(_0x1e57d4[_0x5d174e(0x2ec)]===0x0)return console[_0x5d174e(0x2b5)](_0x5d174e(0x27a)),0x0;if(!_0x24b41a&&(_0x3c6fe7[_0x5d174e(0x325)]||_0x3c6fe7[_0x5d174e(0x1d2)]))return await handleSDKOutput(_0x1e57d4,_0x3c6fe7),0x0;if(!_0x24b41a){const _0x318ef3=_0x1e57d4[_0x5d174e(0x312)](_0xd207f1=>({'title':_0xd207f1['taskName']+'\x20('+formatBytes(_0xd207f1[_0x5d174e(0x23d)])+')','value':_0xd207f1[_0x5d174e(0x29f)]})),_0x5f5d44=await a55_0x46d174({'type':_0x5d174e(0x25b),'name':'task','message':_0x5d174e(0x1e8),'choices':_0x318ef3});if(!_0x5f5d44[_0x5d174e(0x1f0)])return console[_0x5d174e(0x2b5)](_0x5d174e(0x1e5)),0x0;_0x24b41a=_0x5f5d44[_0x5d174e(0x1f0)];}const _0x6f4ad4=await withSpinner(_0x5d174e(0x2d8),()=>_0x565a45['workflow'][_0x5d174e(0x2c9)](_0x22fdae,_0x24b41a),{'verbose':_0x3c6fe7['verbose']}),_0x2be152=_0x6f4ad4['data'];return _0x2be152?console[_0x5d174e(0x361)](_0x2be152):console[_0x5d174e(0x2b5)](_0x5d174e(0x1a6)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a55_0xa29ad1(0x25c);[a55_0xa29ad1(0x22a)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x430b95){const _0x200f8a=a55_0xa29ad1,{options:_0x43867a,args:_0x236c0a,tdx:_0x5aa3ba}=_0x430b95,_0x1ddbf3=_0x236c0a[0x0];if(!_0x1ddbf3)return console[_0x200f8a(0x2b5)](_0x200f8a(0x22e)),0x1;const _0x24e092=_0x43867a['reason'];_0x43867a[_0x200f8a(0x19f)]&&(console[_0x200f8a(0x2b5)]('Attempt\x20ID:\x20'+_0x1ddbf3),_0x24e092&&console['error'](_0x200f8a(0x1cc)+_0x24e092));if(!_0x43867a[_0x200f8a(0x296)]){if(!isInteractive())return console['error'](a55_0x12f6c0['red'](_0x200f8a(0x2d2)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x200f8a(0x2b5)](a55_0x12f6c0[_0x200f8a(0x34a)](_0x200f8a(0x1c7))),0x1;const _0x262db5=await confirmKey(_0x200f8a(0x226)+_0x1ddbf3+'?');if(!_0x262db5)return console[_0x200f8a(0x2b5)](a55_0x12f6c0[_0x200f8a(0x227)](_0x200f8a(0x1e5))),0x1;}const _0x5c476f=await withSpinner('Killing\x20attempt...',()=>_0x5aa3ba['workflow'][_0x200f8a(0x229)](_0x1ddbf3,_0x24e092),{'verbose':_0x43867a['verbose']}),_0x1b8a1d=_0x5c476f[_0x200f8a(0x35c)];return console[_0x200f8a(0x2b5)]('✔\x20'+_0x1b8a1d),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x21b);['description']=a55_0xa29ad1(0x2a4);async[a55_0xa29ad1(0x22c)](_0x1f6a9a){const _0xd6af9e=a55_0xa29ad1,{options:_0x109600,args:_0x286f6f,tdx:_0x594f1f}=_0x1f6a9a,_0x1934e3=_0x286f6f[0x0];if(!_0x1934e3)return console['error'](_0xd6af9e(0x220)),console['error'](_0xd6af9e(0x261)),0x1;let _0xc9896c=![],_0x1d6bfa=_0x1934e3;if(_0x1934e3[_0xd6af9e(0x26d)](_0xd6af9e(0x20b)))_0xc9896c=!![],_0x1d6bfa=_0x1934e3[_0xd6af9e(0x322)](0x8);else{if(_0x1934e3[_0xd6af9e(0x26d)](_0xd6af9e(0x2be)))_0xc9896c=![],_0x1d6bfa=_0x1934e3[_0xd6af9e(0x322)](0x8);else return console['error'](_0xd6af9e(0x239)),console[_0xd6af9e(0x2b5)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x29b59c=_0x109600[_0xd6af9e(0x20a)],_0xd6fce6=_0x109600['resumeFrom'],_0x23e257=_0x109600[_0xd6af9e(0x194)],_0x545957=_0x109600[_0xd6af9e(0x30d)];_0x109600[_0xd6af9e(0x19f)]&&(console[_0xd6af9e(0x2b5)]('Target:\x20'+(_0xc9896c?_0xd6af9e(0x326):_0xd6af9e(0x28b))+'\x20'+_0x1d6bfa),_0x29b59c&&console[_0xd6af9e(0x2b5)](_0xd6af9e(0x2ea)+_0x29b59c),_0xd6fce6&&console[_0xd6af9e(0x2b5)](_0xd6af9e(0x27d)+_0xd6fce6),_0x23e257&&console[_0xd6af9e(0x2b5)]('Params:\x20'+_0x23e257),_0x545957&&console['error'](_0xd6af9e(0x204)));let _0x570a75;if(_0x23e257)try{if(_0x23e257[_0xd6af9e(0x26d)]('@')){const _0x40bbef=await import('fs/promises'),_0x10836c=_0x23e257[_0xd6af9e(0x322)](0x1),_0x3f9913=await _0x40bbef[_0xd6af9e(0x2e1)](_0x10836c,_0xd6af9e(0x28c));_0x570a75=JSON[_0xd6af9e(0x1f3)](_0x3f9913);}else _0x570a75=JSON[_0xd6af9e(0x1f3)](_0x23e257);}catch{return console['error']('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x109600[_0xd6af9e(0x296)]){if(!isInteractive())return console[_0xd6af9e(0x2b5)](a55_0x12f6c0['red'](_0xd6af9e(0x2d2)),_0xd6af9e(0x2cf)),console[_0xd6af9e(0x2b5)](a55_0x12f6c0['dim'](_0xd6af9e(0x1c7))),0x1;const _0x149e5a=await confirmKey(_0xd6af9e(0x297)+(_0xc9896c?_0xd6af9e(0x326):_0xd6af9e(0x28b))+'\x20'+_0x1d6bfa+'?');if(!_0x149e5a)return console['error'](a55_0x12f6c0['yellow']('Cancelled')),0x1;}let _0x509d74;_0xc9896c?_0x509d74=await withSpinner(_0xd6af9e(0x2f9),()=>_0x594f1f[_0xd6af9e(0x1d9)][_0xd6af9e(0x237)](_0x1d6bfa,{'fromTask':_0x29b59c,'retryParams':_0x570a75}),{'verbose':_0x109600['verbose']}):_0x509d74=await withSpinner('Retrying\x20attempt...',()=>_0x594f1f[_0xd6af9e(0x1d9)][_0xd6af9e(0x2bf)](_0x1d6bfa,{'resumeFrom':_0xd6fce6,'retryParams':_0x570a75,'force':_0x545957}),{'verbose':_0x109600[_0xd6af9e(0x19f)]});const _0x459cf3=_0x509d74[_0xd6af9e(0x35c)];return console[_0xd6af9e(0x2b5)](_0xd6af9e(0x1e0)),console['error'](_0xd6af9e(0x2f1)+_0x459cf3['attemptId']),console[_0xd6af9e(0x2b5)](_0xd6af9e(0x250)+_0x459cf3[_0xd6af9e(0x2a5)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']='workflow:run';['description']=a55_0xa29ad1(0x19c);async[a55_0xa29ad1(0x22c)](_0x57bd98){const _0x2b575e=a55_0xa29ad1,{options:_0x46bd79,args:_0x4b38b0,tdx:_0x387ea9}=_0x57bd98;let _0x112422=_0x4b38b0[0x0];if(!_0x112422){const _0xd2226e=this[_0x2b575e(0x1a8)]([],_0x46bd79),_0x9efc21=await withSpinner(_0x2b575e(0x1c8),()=>_0x387ea9[_0x2b575e(0x1d9)]['workflows'](_0xd2226e,{'limit':_0x46bd79[_0x2b575e(0x301)]}),{'verbose':_0x46bd79['verbose']}),_0x2b6871=_0x9efc21[_0x2b575e(0x35c)];if(_0x2b6871[_0x2b575e(0x2ec)]===0x0)return console[_0x2b575e(0x2b5)](_0x2b575e(0x268)),!_0xd2226e&&console[_0x2b575e(0x2b5)](a55_0x12f6c0[_0x2b575e(0x34a)](_0x2b575e(0x333))),0x1;const _0x4442ee=_0x2b6871['map'](_0x3ede07=>({'title':_0x3ede07[_0x2b575e(0x356)]?.['name']+'.'+_0x3ede07[_0x2b575e(0x1ff)],'value':_0x3ede07['project']?.[_0x2b575e(0x1ff)]+'.'+_0x3ede07['name'],'description':_0x3ede07[_0x2b575e(0x22f)]?_0x2b575e(0x304)+_0x3ede07[_0x2b575e(0x22f)]:undefined})),_0x22e2fc=await a55_0x46d174({'type':_0x2b575e(0x25b),'name':_0x2b575e(0x1d9),'message':_0x2b575e(0x2f6),'choices':_0x4442ee});if(!_0x22e2fc[_0x2b575e(0x1d9)])return 0x1;_0x112422=_0x22e2fc[_0x2b575e(0x1d9)];}if(!_0x112422[_0x2b575e(0x210)]('.')){const _0x5e4e07=this[_0x2b575e(0x1a8)]([],_0x46bd79);if(_0x5e4e07)_0x112422=_0x5e4e07+'.'+_0x112422;else return console[_0x2b575e(0x2b5)](a55_0x12f6c0[_0x2b575e(0x1bb)](_0x2b575e(0x352)),_0x2b575e(0x26f)),console['error'](a55_0x12f6c0['dim'](_0x2b575e(0x333))),0x1;}const _0x2ec07d=_0x46bd79[_0x2b575e(0x340)],_0x399836=_0x46bd79[_0x2b575e(0x329)],_0x20c95c={};if(_0x2ec07d&&Array[_0x2b575e(0x200)](_0x2ec07d))for(const _0x3d62c3 of _0x2ec07d){const _0x2e7bbc=_0x3d62c3['indexOf']('=');if(_0x2e7bbc===-0x1)return console[_0x2b575e(0x2b5)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x3d62c3),console['error'](_0x2b575e(0x287)),0x1;const _0x23f76a=_0x3d62c3[_0x2b575e(0x322)](0x0,_0x2e7bbc),_0x21a63b=_0x3d62c3[_0x2b575e(0x322)](_0x2e7bbc+0x1);try{_0x20c95c[_0x23f76a]=JSON[_0x2b575e(0x1f3)](_0x21a63b);}catch{_0x20c95c[_0x23f76a]=_0x21a63b;}}_0x46bd79[_0x2b575e(0x19f)]&&(console[_0x2b575e(0x2b5)](_0x2b575e(0x30a)+_0x112422),Object[_0x2b575e(0x281)](_0x20c95c)[_0x2b575e(0x2ec)]>0x0&&console[_0x2b575e(0x2b5)](_0x2b575e(0x1e6)+JSON['stringify'](_0x20c95c)),_0x399836&&console[_0x2b575e(0x2b5)](_0x2b575e(0x1c1)+_0x399836));if(_0x46bd79[_0x2b575e(0x1bf)])return await this[_0x2b575e(0x32e)](_0x57bd98,_0x112422,_0x20c95c,_0x399836);const _0xc0badd=await withSpinner(_0x2b575e(0x2ed),()=>_0x387ea9[_0x2b575e(0x1d9)][_0x2b575e(0x362)](_0x112422,_0x20c95c,{'sessionTime':_0x399836}),{'verbose':_0x46bd79['verbose']}),_0x102b2d=_0xc0badd[_0x2b575e(0x35c)];console['error'](_0x2b575e(0x1ec)),console[_0x2b575e(0x2b5)](_0x2b575e(0x259)+_0x102b2d['id']),console[_0x2b575e(0x2b5)]('\x20\x20Session\x20ID:\x20'+_0x102b2d[_0x2b575e(0x2a5)]),console[_0x2b575e(0x2b5)]('\x20\x20Project:\x20'+_0x102b2d[_0x2b575e(0x356)]?.[_0x2b575e(0x1ff)]),console[_0x2b575e(0x2b5)](_0x2b575e(0x258)+_0x102b2d[_0x2b575e(0x1d9)]?.[_0x2b575e(0x1ff)]);if(_0x102b2d[_0x2b575e(0x356)]?.['id']&&_0x102b2d[_0x2b575e(0x2a5)]&&_0x102b2d['id']){const _0x30db3f=_0x46bd79[_0x2b575e(0x2e4)],_0xd5b03a=getConsoleUrl(_0x30db3f,_0x2b575e(0x26c)+_0x102b2d[_0x2b575e(0x356)]['id']+'/sessions/'+_0x102b2d['sessionId']+'/attempt/'+_0x102b2d['id']);console[_0x2b575e(0x2b5)](_0x2b575e(0x2ce)+a55_0x12f6c0['cyan'](_0xd5b03a));}return 0x0;}async['executeDryRun'](_0x124767,_0x2e23a8,_0x201a22,_0x15f67d){const _0xf5493b=a55_0xa29ad1,{options:_0xfaf466,tdx:_0x177c11}=_0x124767,_0x495ac3=await withSpinner(_0xf5493b(0x1e1)+_0x2e23a8+'...',()=>_0x177c11[_0xf5493b(0x1d9)][_0xf5493b(0x330)](_0x2e23a8),{'verbose':_0xfaf466[_0xf5493b(0x19f)]}),_0x29f748=_0x495ac3['data'],_0x29ed5b=_0x15f67d??new Date()[_0xf5493b(0x233)]();console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x2a8)](_0xf5493b(0x2ac)),_0x2e23a8),console['log'](a55_0x12f6c0[_0xf5493b(0x2a8)](_0xf5493b(0x1d6)),_0x29ed5b),console['log'](a55_0x12f6c0[_0xf5493b(0x2a8)]('Parameters:'),JSON[_0xf5493b(0x242)](_0x201a22)),console['log'](''),console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x2a8)](_0xf5493b(0x2f4)));const _0x5c7cb5=parseTaskGraph(_0x29f748['config']??null);if(_0x5c7cb5[_0xf5493b(0x2ec)]===0x0)console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x34a)](_0xf5493b(0x1db)));else for(const _0x3f9865 of formatTaskGraph(_0x5c7cb5)){console[_0xf5493b(0x361)](_0x3f9865);}const _0x109429=summarizeTaskGraph(_0x5c7cb5),_0x569635=formatWarningSummary(_0x109429);return _0x569635&&(console[_0xf5493b(0x361)](''),console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x227)](_0x569635))),console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x227)](_0xf5493b(0x2f2))),0x0;}}function a55_0x590a(){const _0x4f5df9=['fullName','group_error','✔\x20Workflow\x20project\x20set\x20to:\x20','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','changes','\x20-\x20','📋\x20','\x20logs','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','disabledAt','Resume\x20from:\x20','floor','max','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','keys','List\x20workflows','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20\x20Changes:\x20','Project\x20name:\x20','Expected\x20format:\x20--param\x20key=value','Output\x20directory:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','updatedAt','attempt','utf-8','index','\x0a⚠\x20Project\x20\x22','Setting\x20','MIN_TIMELINE_WIDTH','Dry\x20run:\x20yes','list','5XDQEAW','Source\x20project:\x20','Source:\x20','yes','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflow:use','Pushing\x20workflow\x20project...','slice','rows','parseProjectWorkflowPattern','follow','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','taskName','renderTimeline','...','Latest\x20session\x20has\x20no\x20attempt','now','Retry\x20a\x20session\x20or\x20attempt','sessionId','\x20\x20Next\x20run:\x20','get','bold','Show\x20tasks\x20for\x20an\x20attempt','workflow:delete','durationMs','Workflow:','📁\x20','MAX_TIMELINE_WIDTH','all','key','size','find','\x20\x20Project\x20ID:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','error','renderSingleTimeline','No\x20attempts\x20found','executeCloneProject','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','Error:\x20Project\x20name\x20is\x20required','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','workflow:schedule:disable','includeRetried','attempt:','retryAttempt','targetDir','type','No\x20workflow\x20tdx.json\x20found','Listing\x20workflow\x20projects...','🔄\x20','attemptId','done','\x0aClone\x20\x22','\x20(disabled)','logs','round','fill','listSchedules','jsonl','\x20\x20Console:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','icon','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','\x0aError:','MIN_LABEL_COUNT','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x20to\x20see\x20detailed\x20logs','pollTimeline','\x20is\x20not\x20a\x20directory','Downloading\x20logs...','✔\x20Deleted\x20project\x20','workflow:attempt','Analyzing\x20changes...','stdout','cyan','✔\x20Push\x20complete','nextTime','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','readFile','Disable\x20a\x20workflow\x20schedule','Files\x20to\x20upload:\x20','site','unchanged','isNewProject','\x20from\x20session\x20','indexOf','getHours','From\x20task:\x20','No\x20matching\x20sessions\x20found','length','Starting\x20workflow\x20run...','canceling','workflow:logs','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x20\x20New\x20attempt\x20ID:\x20','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Task\x20graph:','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Select\x20a\x20workflow\x20to\x20run','tasks','Pattern:\x20','Retrying\x20session...','Error:\x20','Filter:\x20','deleted','white','workflow:secrets:set','Disabling\x20schedule\x20#','resolveProjectId','limit','getDate','Session\x20','revision:\x20','Auto-selected\x20latest\x20session:\x20','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','\x0aDry\x20run\x20-\x20no\x20project\x20created','Project:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Workflow:\x20','cancelRequested','diff','force','Include\x20retried:\x20yes','Select\x20a\x20session\x20to\x20view\x20timeline:','LABEL_MIN_SPACING','\x22\x20with\x20new\x20revision?','map','No\x20workflow\x20sessions\x20found','buildTimelineData','columns','Listing\x20workflows...','resolveProjectDir','4804722RhBvPw','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','Filter:\x20project=','\x20next:\x20','\x20modified','running','ICON_SPACING','replace','\x20\x20Revision:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','substring','✔\x20Pushed\x20','Deleting\x20project\x20','json','session','preparePushProject','match','sessionTime','✔\x20Found\x20','TASK_NAME_WIDTH','workflow:secrets:delete','\x20secrets\x20set\x20for\x20project\x20\x27','executeDryRun','\x0aApply\x20these\x20changes?','getWorkflow','1222204VkVfQa','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Usage:\x20workflow:delete\x20<project-name-or-id>','workflows','generateSessionTimelineRows','tdx.json','showWorkflowConsoleUrl','\x20\x20Location:\x20','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','toLowerCase','duration','start','Writing\x20files...','\x20\x20tdx\x20wf\x20use\x20<project>','param','Resolving\x20project\x20\x27','write','planned','cwd','Project\x20directory:\x20','\x20enabled\x20(','workflow:clone','\x20task','No\x20sessions\x20found\x20in\x20project:\x20','dim','\x0aPush\x20these\x20changes?','navigateSessionsInteractive','getMinutes','getTime','values','Enable\x20a\x20workflow\x20schedule','✔\x20Secret\x20\x27','Error:','finishedAt','workflow:tasks','\x27...','project','skipSchedule','483568zBpgoy','(use\x20--limit\x20to\x20see\x20more)','\x0aUpdate\x20existing\x20project\x20\x22','3RMFcbh','data','\x20tasks','\x20session','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Secrets\x20to\x20set:\x20','log','run','retryAttemptName','\x20\x20Source:\x20','session_id','💡\x20Tip:\x20Use\x20','params','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','output','\x0aPolling...\x20(','\x20\x20Session\x20context\x20set\x20to:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','success','21xYnqSv','Start\x20a\x20workflow\x20run','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','padStart','verbose','352264hfIVKw','⚠\x20Showing\x20first\x20','listProjectSchedules','workflow:attempts','1490715ZnAMal','ICON_WIDTH','No\x20log\x20content\x20found','Listing\x20workflow\x20sessions...','resolveProject','Total:\x20','trim','set','\x20sessions\x20','\x0a✔\x20No\x20changes\x20to\x20push','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','lastAttempt','workflowProject','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','autocomplete','modified','renderSessionsTimeline','every','blue','Tip:\x20cd\x20to\x20workflows/','startTime','workflow:projects','Getting\x20attempt\x20details...','red','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','localeCompare','new','dryRun','Warning:','Session\x20time:\x20','toLocaleString','\x20new','title','window','Key\x20cannot\x20be\x20empty','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Loading\x20workflows...','split','✔\x20Pull\x20complete','✔\x20Schedule\x20#','Reason:\x20','Task\x20name:\x20','message','green','Downloading\x20project\x20','startedAt','format','executePushProject','basename','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Session\x20time:','createdAt','status','workflow','\x0a✔\x20Already\x20up\x20to\x20date','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','pending','workflow:workflows','\x20\x20Project:\x20','Key:\x20','✔\x20Retry\x20started','Fetching\x20workflow\x20','-\x20nothing\x20pushed','\x1b[1A\x1b[2K','logFiles','Cancelled','Parameters:\x20','targetExists','Select\x20a\x20task\x20to\x20view\x20logs:','Source\x20directory\x20is\x20required','MAX_POLL_ITERATIONS','summary','✔\x20Workflow\x20run\x20started','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','\x20(use\x20--limit\x20to\x20show\x20more)','✔\x20Clone\x20complete','task','setSecrets','repeat','parse','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','applyPullProject','→\x20Project:\x20','trimEnd','(unknown)','\x20schedule','isTTY','✔\x20Project\x20updated','No\x20sessions\x20found\x20for:\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','name','isArray','Revision:\x20','skipValidation','130757paRUiR','Force:\x20yes','disableSchedule','relative','\x20deleted','text','newProjectId','fromTask','session:','attempts','table','workflowName','state','includes','Session\x20not\x20found:\x20','\x20\x20Files\x20extracted:\x20','projectName','Listing\x20schedules\x20for\x20','resolve','Project\x20name\x20is\x20required','Using\x20attempt\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','end','Attempt\x20ID:\x20','workflow:retry','min','workflow:schedule:enable','workflow:sessions','\x20attempt','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','New\x20project\x20name:\x20','Updating\x20','List\x20workflow\x20schedules','pullProject','enableSchedule','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','yellow','Error:\x20Secret\x20key\x20is\x20required','kill','description','📅\x20#','execute','newProjectName','Error:\x20Attempt\x20ID\x20is\x20required','revision','Fetching\x20schedule\x20#','Cloning\x20to\x20','→\x20New\x20project:\x20','toISOString','sourceProjectName','requireProject','sys','retrySession','getMonth','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','join','-\x20no\x20files\x20written','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','fileSize','filter','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','Fetching\x20log\x20files...','List\x20workflow\x20attempts','stringify','sessions','nextRunTime','context','\x22\x20to\x20new\x20project\x20\x22','Attempt:\x20','GUTTER','projectId','Source\x20directory:\x20','splice','Pushing\x20project...','\x20disabled\x20(','workflow:push','Status:\x20','\x20\x20Session\x20ID:\x20','workflow:schedules','Validation:\x20skipped','Enabling\x20schedule\x20#','workflow:upload','10abeDOa','unknown','Project\x20filter:\x20','\x20\x20Workflow:\x20','\x20\x20Attempt\x20ID:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','select','workflow:kill','stat','clear','Show\x20specific\x20attempt\x20details','MAX_TASKS_DISPLAY','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','has','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','1491216ImROlL','---\x20','LABEL_WIDTH_DIVISOR','push','No\x20workflows\x20found','sourceDir','No\x20sessions\x20with\x20timing\x20information','getFullYear','/app/workflows/','startsWith','\x20unchanged','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','sort'];a55_0x590a=function(){return _0x4f5df9;};return a55_0x590a();}export class WorkflowDownloadCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]='workflow:download';['description']=a55_0xa29ad1(0x23f);async['execute'](_0x41c101){const _0x4ea182=a55_0xa29ad1,{options:_0x4f7654,args:_0xb2ba6f,tdx:_0x5f2c9d}=_0x41c101,_0x2a2f2b=_0xb2ba6f[0x0],_0x473b60=_0xb2ba6f[0x1]||'.';if(!_0x2a2f2b)return console[_0x4ea182(0x2b5)](_0x4ea182(0x2ba)),console[_0x4ea182(0x2b5)](_0x4ea182(0x35f)),0x1;const _0x557a0b=_0x4f7654[_0x4ea182(0x22f)];_0x4f7654[_0x4ea182(0x19f)]&&(console['error'](_0x4ea182(0x308)+_0x2a2f2b),console['error'](_0x4ea182(0x288)+_0x473b60),_0x557a0b&&console['error'](_0x4ea182(0x201)+_0x557a0b));const _0x3f71c2=await withSpinner(_0x4ea182(0x1d0)+_0x2a2f2b+'...',()=>_0x5f2c9d[_0x4ea182(0x1d9)]['download'](_0x2a2f2b,_0x473b60,{'revision':_0x557a0b}),{'verbose':_0x4f7654[_0x4ea182(0x19f)]}),_0x49e5d7=_0x3f71c2[_0x4ea182(0x35c)];return console[_0x4ea182(0x2b5)]('✔\x20Downloaded\x20'+_0x49e5d7[_0x4ea182(0x213)]),console[_0x4ea182(0x2b5)]('\x20\x20Revision:\x20'+_0x49e5d7['revision']),console[_0x4ea182(0x2b5)](_0x4ea182(0x212)+_0x49e5d7['filesExtracted']),console[_0x4ea182(0x2b5)]('\x20\x20Location:\x20'+_0x473b60+'/'+_0x49e5d7[_0x4ea182(0x213)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x254);['description']=a55_0xa29ad1(0x319);async['execute'](_0x1ff738){const _0x3dc140=a55_0xa29ad1,{options:_0x4f441d,args:_0x3b639b,tdx:_0x1d56a1}=_0x1ff738;let _0x50f7e7='.',_0x116ee8=_0x4f441d[_0x3dc140(0x1ff)];if(_0x3b639b[0x0]){const {promises:_0x425c72}=await import('fs');try{const _0x1cf4f8=await _0x425c72[_0x3dc140(0x25d)](_0x3b639b[0x0]);if(_0x1cf4f8['isDirectory']())_0x50f7e7=_0x3b639b[0x0];else return console[_0x3dc140(0x2b5)](_0x3dc140(0x2fa)+_0x3b639b[0x0]+_0x3dc140(0x2d7)),0x1;}catch{_0x116ee8=_0x3b639b[0x0],_0x50f7e7='.';}}const _0x1f0e01=_0x4f441d[_0x3dc140(0x22f)],_0x264c20=_0x4f441d[_0x3dc140(0x202)];_0x4f441d[_0x3dc140(0x19f)]&&(console[_0x3dc140(0x2b5)](_0x3dc140(0x345)+_0x50f7e7),_0x116ee8&&console[_0x3dc140(0x2b5)](_0x3dc140(0x286)+_0x116ee8),_0x1f0e01&&console[_0x3dc140(0x2b5)]('Revision:\x20'+_0x1f0e01),_0x264c20&&console[_0x3dc140(0x2b5)](_0x3dc140(0x252)));const _0xc56f6b=await withSpinner(_0x3dc140(0x299),()=>_0x1d56a1[_0x3dc140(0x1d9)][_0x3dc140(0x267)](_0x50f7e7,{'projectName':_0x116ee8,'revision':_0x1f0e01,'skipValidation':_0x264c20}),{'verbose':_0x4f441d[_0x3dc140(0x19f)]}),_0x12945e=_0xc56f6b[_0x3dc140(0x35c)];return console[_0x3dc140(0x2b5)](_0x3dc140(0x323)+_0x12945e[_0x3dc140(0x213)]),console[_0x3dc140(0x2b5)](_0x3dc140(0x2b3)+_0x12945e[_0x3dc140(0x249)]),console[_0x3dc140(0x2b5)](_0x3dc140(0x320)+_0x12945e[_0x3dc140(0x22f)]),await this[_0x3dc140(0x338)](_0x1d56a1,_0x12945e[_0x3dc140(0x213)],_0x4f441d[_0x3dc140(0x2e4)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]='workflow:pull';[a55_0xa29ad1(0x22a)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async['execute'](_0x1322b3){const _0x4515f6=a55_0xa29ad1,{options:_0x53b1c9,args:_0x4c38a4,tdx:_0x34493e}=_0x1322b3,_0x24ae3c=_0x4c38a4[0x0],_0x4b032e=_0x4c38a4[0x1];if(!_0x24ae3c)return console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x1bb)](_0x4515f6(0x352)),'Project\x20name\x20is\x20required'),console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x34a)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x216954=_0x53b1c9['revision'];_0x53b1c9[_0x4515f6(0x19f)]&&(console['error'](_0x4515f6(0x308)+_0x24ae3c),_0x4b032e&&console['error']('Target\x20directory:\x20'+_0x4b032e),_0x216954&&console[_0x4515f6(0x2b5)](_0x4515f6(0x201)+_0x216954),_0x53b1c9[_0x4515f6(0x1bf)]&&console[_0x4515f6(0x2b5)](_0x4515f6(0x291)));const _0x5e334a=await withSpinner('Pulling\x20project\x20'+_0x24ae3c+_0x4515f6(0x2a1),()=>_0x34493e['workflow'][_0x4515f6(0x224)](_0x24ae3c,{'targetDir':_0x4b032e,'revision':_0x216954}),{'verbose':_0x53b1c9['verbose']}),_0x5c997f=_0x5e334a[_0x4515f6(0x35c)];_0x5c997f[_0x4515f6(0x2e6)]?console[_0x4515f6(0x2b5)](_0x4515f6(0x232)+_0x5c997f['projectName']):console[_0x4515f6(0x2b5)](_0x4515f6(0x1f7)+_0x5c997f[_0x4515f6(0x213)]);console['error'](_0x4515f6(0x320)+_0x5c997f['revision']),console[_0x4515f6(0x2b5)]('\x20\x20Target:\x20'+(a55_0xe058bc[_0x4515f6(0x206)](process['cwd'](),_0x5c997f[_0x4515f6(0x2c0)])||'.')),console[_0x4515f6(0x2b5)](_0x4515f6(0x285)+a55_0x12f6c0[_0x4515f6(0x1cf)]('+'+_0x5c997f[_0x4515f6(0x1eb)][_0x4515f6(0x1be)]+_0x4515f6(0x1c3))+',\x20'+(a55_0x12f6c0[_0x4515f6(0x227)]('~'+_0x5c997f[_0x4515f6(0x1eb)][_0x4515f6(0x1b3)]+_0x4515f6(0x31c))+',\x20')+(a55_0x12f6c0[_0x4515f6(0x1bb)]('-'+_0x5c997f['summary']['deleted']+_0x4515f6(0x207))+',\x20')+(''+a55_0x12f6c0[_0x4515f6(0x34a)](_0x5c997f[_0x4515f6(0x1eb)][_0x4515f6(0x2e5)]+_0x4515f6(0x26e))));for(const _0x36231e of _0x5c997f[_0x4515f6(0x276)]){_0x36231e[_0x4515f6(0x2c1)]===_0x4515f6(0x1b3)&&_0x36231e[_0x4515f6(0x30c)]&&(console[_0x4515f6(0x2b5)]('\x0a'+a55_0x12f6c0['cyan'](_0x4515f6(0x265)+_0x36231e['path'])),console[_0x4515f6(0x2b5)](_0x36231e['diff']));}if(!_0x5c997f['hasChanges'])return saveSessionContext({'workflow_project':_0x5c997f[_0x4515f6(0x213)]},_0x53b1c9[_0x4515f6(0x326)]),console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x1cf)](_0x4515f6(0x1da))),console['error'](a55_0x12f6c0[_0x4515f6(0x34a)](_0x4515f6(0x198)+_0x5c997f['projectName'])),0x0;if(_0x53b1c9['dryRun'])return console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x227)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x53b1c9['yes']){if(!isInteractive())return console[_0x4515f6(0x2b5)](a55_0x12f6c0['red'](_0x4515f6(0x2d2)),_0x4515f6(0x2cf)),console[_0x4515f6(0x2b5)](a55_0x12f6c0['dim'](_0x4515f6(0x1c7))),0x1;const _0x12cc66=await confirmKey(_0x4515f6(0x32f));if(!_0x12cc66)return console['error'](a55_0x12f6c0['yellow'](_0x4515f6(0x1e5)),_0x4515f6(0x23b)),0x1;}await withSpinner(_0x4515f6(0x33e),()=>_0x34493e[_0x4515f6(0x1d9)][_0x4515f6(0x1f6)](_0x5c997f,{'revision':_0x216954}),{'verbose':_0x53b1c9[_0x4515f6(0x19f)]}),saveSessionContext({'workflow_project':_0x5c997f['projectName']},_0x53b1c9[_0x4515f6(0x326)]),console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x1cf)](_0x4515f6(0x1ca)));const _0x41cd36=a55_0xe058bc[_0x4515f6(0x206)](process[_0x4515f6(0x344)](),_0x5c997f['targetDir'])||'.';return console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x34a)](_0x4515f6(0x339)+_0x41cd36)),console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x34a)](_0x4515f6(0x198)+_0x5c997f[_0x4515f6(0x213)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a55_0xa29ad1(0x24e);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x263);async[a55_0xa29ad1(0x22c)](_0x1e9bc2){const _0x182029=a55_0xa29ad1,{options:_0x38ec70,args:_0x1a6aad,tdx:_0x42aa26}=_0x1e9bc2,_0x21d1d6=this[_0x182029(0x317)](_0x1a6aad,_0x38ec70),_0x72ed1a=_0x38ec70,{revision:_0x342b71,skipValidation:_0x305414,backfill:_0x19e31d}=_0x72ed1a,_0x295776=_0x19e31d===undefined?undefined:!_0x19e31d;_0x38ec70[_0x182029(0x19f)]&&(_0x21d1d6&&console[_0x182029(0x2b5)](_0x182029(0x24a)+_0x21d1d6),_0x342b71&&console[_0x182029(0x2b5)](_0x182029(0x201)+_0x342b71),_0x38ec70['dryRun']&&console[_0x182029(0x2b5)]('Dry\x20run:\x20yes'),_0x305414&&console[_0x182029(0x2b5)](_0x182029(0x252)),_0x19e31d&&console['error'](_0x182029(0x33a)));let _0x5166c4;try{_0x5166c4=await withSpinner(_0x182029(0x2db),()=>_0x42aa26[_0x182029(0x1d9)][_0x182029(0x327)]({'sourceDir':_0x21d1d6,'revision':_0x342b71,'skipValidation':_0x305414,'skipSchedule':_0x295776}),{'verbose':_0x38ec70['verbose']});}catch(_0x46ac3a){if(_0x46ac3a instanceof Error&&_0x46ac3a['message'][_0x182029(0x210)](_0x182029(0x2c2)))return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x1bb)]('Error:'),_0x182029(0x195)),_0x38ec70[_0x182029(0x1b0)]?console[_0x182029(0x2b5)](a55_0x12f6c0['dim'](_0x182029(0x1b7)+_0x38ec70[_0x182029(0x1b0)]+_0x182029(0x1b1)+_0x38ec70[_0x182029(0x1b0)]+'\x27')):console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x34a)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x46ac3a;}const _0x2163c7=_0x5166c4[_0x182029(0x35c)];console['error']('✔\x20Project:\x20'+_0x2163c7[_0x182029(0x213)]),console[_0x182029(0x2b5)](_0x182029(0x364)+_0x2163c7[_0x182029(0x269)]),console[_0x182029(0x2b5)](_0x182029(0x320)+_0x2163c7['revision']),console[_0x182029(0x2b5)]('\x20\x20Changes:\x20'+a55_0x12f6c0[_0x182029(0x1cf)]('+'+_0x2163c7[_0x182029(0x1eb)]['new']+'\x20new')+',\x20'+(a55_0x12f6c0[_0x182029(0x227)]('~'+_0x2163c7['summary'][_0x182029(0x1b3)]+_0x182029(0x31c))+',\x20')+(a55_0x12f6c0[_0x182029(0x1bb)]('-'+_0x2163c7['summary'][_0x182029(0x2fc)]+'\x20deleted')+',\x20')+(''+a55_0x12f6c0[_0x182029(0x34a)](_0x2163c7[_0x182029(0x1eb)]['unchanged']+_0x182029(0x26e))));for(const _0xf52d34 of _0x2163c7[_0x182029(0x276)]){_0xf52d34['type']===_0x182029(0x1b3)&&_0xf52d34[_0x182029(0x30c)]&&(console['error']('\x0a'+a55_0x12f6c0[_0x182029(0x2dd)]('---\x20'+_0xf52d34['path'])),console[_0x182029(0x2b5)](_0xf52d34[_0x182029(0x30c)]));}if(!_0x2163c7['hasChanges'])return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x1cf)](_0x182029(0x1ad))),await this[_0x182029(0x338)](_0x42aa26,_0x2163c7['projectName'],_0x38ec70['site']),0x0;if(_0x38ec70[_0x182029(0x1bf)])return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x227)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x38ec70['yes']){if(!isInteractive())return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x1bb)](_0x182029(0x2d2)),_0x182029(0x2cf)),console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x34a)](_0x182029(0x1c7))),0x1;const _0x1e75b6=await confirmKey(_0x182029(0x34b));if(!_0x1e75b6)return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x227)](_0x182029(0x1e5)),_0x182029(0x1e2)),0x1;}const _0x40d727=await withSpinner(_0x182029(0x24c),()=>_0x42aa26['workflow'][_0x182029(0x1d3)](_0x2163c7),{'verbose':_0x38ec70[_0x182029(0x19f)]}),_0x4600fd=_0x40d727[_0x182029(0x35c)];return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x1cf)](_0x182029(0x2de))),console[_0x182029(0x2b5)](_0x182029(0x2b3)+_0x4600fd[_0x182029(0x249)]),console['error']('\x20\x20Revision:\x20'+_0x4600fd['revision']),await this[_0x182029(0x338)](_0x42aa26,_0x4600fd[_0x182029(0x213)],_0x38ec70['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x347);[a55_0xa29ad1(0x22a)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a55_0xa29ad1(0x22c)](_0x32f10c){const _0x324f24=a55_0xa29ad1,{options:_0x524bc3,args:_0x5cdc66,tdx:_0x555201}=_0x32f10c,_0x5d642e=this[_0x324f24(0x317)](_0x5cdc66,_0x524bc3),_0x3f9936=_0x524bc3[_0x324f24(0x1ff)],_0x3f7175=_0x524bc3[_0x324f24(0x22f)],_0x331435=_0x524bc3[_0x324f24(0x202)];if(!_0x5d642e)return console[_0x324f24(0x2b5)](a55_0x12f6c0['red'](_0x324f24(0x352)),_0x324f24(0x1e9)),console[_0x324f24(0x2b5)](a55_0x12f6c0['dim'](_0x324f24(0x19d))),console[_0x324f24(0x2b5)](a55_0x12f6c0['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x3f9936)return console['error'](a55_0x12f6c0[_0x324f24(0x1bb)](_0x324f24(0x352)),_0x324f24(0x23c)),console['error'](a55_0x12f6c0[_0x324f24(0x34a)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x524bc3[_0x324f24(0x19f)]&&(console[_0x324f24(0x2b5)]('Source\x20directory:\x20'+_0x5d642e),console[_0x324f24(0x2b5)]('New\x20project\x20name:\x20'+_0x3f9936),_0x3f7175&&console['error'](_0x324f24(0x201)+_0x3f7175),_0x524bc3['dryRun']&&console['error']('Dry\x20run:\x20yes'),_0x331435&&console[_0x324f24(0x2b5)](_0x324f24(0x252)));const _0x525576=await withSpinner('Analyzing\x20project...',()=>_0x555201[_0x324f24(0x1d9)]['prepareCloneProject'](_0x5d642e,_0x3f9936,{'revision':_0x3f7175,'skipValidation':_0x331435}),{'verbose':_0x524bc3[_0x324f24(0x19f)]}),_0x4ee3e2=_0x525576[_0x324f24(0x35c)];console[_0x324f24(0x2b5)](_0x324f24(0x295)+_0x4ee3e2[_0x324f24(0x269)]);_0x4ee3e2[_0x324f24(0x234)]&&console['error'](_0x324f24(0x294)+_0x4ee3e2['sourceProjectName']);console[_0x324f24(0x2b5)](_0x324f24(0x221)+_0x4ee3e2[_0x324f24(0x22d)]),console[_0x324f24(0x2b5)](_0x324f24(0x201)+_0x4ee3e2['revision']),console[_0x324f24(0x2b5)](_0x324f24(0x2e3)+_0x4ee3e2['fileCount']);_0x4ee3e2['targetExists']&&(console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x227)](_0x324f24(0x28e)+_0x4ee3e2[_0x324f24(0x22d)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x4ee3e2['existingProjectId']+')')),console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x227)](_0x324f24(0x1ae))));if(_0x524bc3[_0x324f24(0x1bf)])return console[_0x324f24(0x2b5)](a55_0x12f6c0['yellow'](_0x324f24(0x307))),0x0;if(!_0x524bc3[_0x324f24(0x296)]){if(!isInteractive())return console['error'](a55_0x12f6c0[_0x324f24(0x1bb)](_0x324f24(0x2d2)),_0x324f24(0x2cf)),console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x34a)](_0x324f24(0x1c7))),0x1;const _0x5e1e1e=_0x4ee3e2[_0x324f24(0x234)]||a55_0xe058bc[_0x324f24(0x1d4)](_0x5d642e),_0x369eac=_0x4ee3e2[_0x324f24(0x1e7)]?_0x324f24(0x35a)+_0x3f9936+_0x324f24(0x311):_0x324f24(0x2c7)+_0x5e1e1e+_0x324f24(0x246)+_0x3f9936+'\x22?',_0x5aa567=await confirmKey(_0x369eac);if(!_0x5aa567)return console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x227)](_0x324f24(0x1e5))),0x1;}const _0x4244d8=await withSpinner(_0x4ee3e2[_0x324f24(0x1e7)]?_0x324f24(0x222)+_0x3f9936+_0x324f24(0x2a1):_0x324f24(0x231)+_0x3f9936+_0x324f24(0x2a1),()=>_0x555201[_0x324f24(0x1d9)][_0x324f24(0x2b8)](_0x4ee3e2),{'verbose':_0x524bc3[_0x324f24(0x19f)]}),_0x1dee62=_0x4244d8[_0x324f24(0x35c)];return console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x1cf)](_0x4ee3e2[_0x324f24(0x1e7)]?_0x324f24(0x1fc):_0x324f24(0x1ef))),console[_0x324f24(0x2b5)](_0x324f24(0x1de)+_0x1dee62[_0x324f24(0x22d)]),console[_0x324f24(0x2b5)](_0x324f24(0x2b3)+_0x1dee62[_0x324f24(0x209)]),console[_0x324f24(0x2b5)]('\x20\x20Revision:\x20'+_0x1dee62[_0x324f24(0x22f)]),await this[_0x324f24(0x338)](_0x555201,_0x1dee62[_0x324f24(0x22d)],_0x524bc3['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a55_0xa29ad1(0x2aa);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x270);async[a55_0xa29ad1(0x22c)](_0x202630){const _0x346913=a55_0xa29ad1,{options:_0x1af9f8,args:_0x1df64e,tdx:_0x2ec99b}=_0x202630,_0x52273f=_0x1df64e[0x0];if(!_0x52273f)return console[_0x346913(0x2b5)](_0x346913(0x2bb)),console[_0x346913(0x2b5)](_0x346913(0x334)),0x1;_0x1af9f8['verbose']&&console[_0x346913(0x2b5)](_0x346913(0x308)+_0x52273f);if(!_0x1af9f8[_0x346913(0x296)]){if(!isInteractive())return console['error'](a55_0x12f6c0[_0x346913(0x1bb)](_0x346913(0x2d2)),_0x346913(0x2cf)),console[_0x346913(0x2b5)](a55_0x12f6c0[_0x346913(0x34a)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4fe11b=await confirmKey(_0x346913(0x2f0)+_0x52273f+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x4fe11b)return console[_0x346913(0x2b5)](a55_0x12f6c0[_0x346913(0x227)](_0x346913(0x1e5))),0x1;}const _0x41b3bb=await withSpinner(_0x346913(0x324)+_0x52273f+'...',()=>_0x2ec99b['workflow']['delete'](_0x52273f),{'verbose':_0x1af9f8[_0x346913(0x19f)]}),_0x90ddda=_0x41b3bb[_0x346913(0x35c)];return console['error'](_0x346913(0x2d9)+_0x90ddda['projectName']),console[_0x346913(0x2b5)](_0x346913(0x2b3)+_0x90ddda[_0x346913(0x249)]),0x0;}}export function parseKeyValue(_0x24e0d7){const _0x2c91fe=a55_0xa29ad1,_0x195bed=_0x24e0d7[_0x2c91fe(0x2e8)]('=');if(_0x195bed===-0x1)throw new Error('Invalid\x20format:\x20'+_0x24e0d7+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x35b7ef=_0x24e0d7[_0x2c91fe(0x322)](0x0,_0x195bed),_0x5389c4=_0x24e0d7['substring'](_0x195bed+0x1);if(!_0x35b7ef)throw new Error(_0x2c91fe(0x1c6));return{'key':_0x35b7ef,'value':_0x5389c4};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]='workflow:secrets:list';[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x306);async[a55_0xa29ad1(0x22c)](_0x557d02){const _0x1fbc85=a55_0xa29ad1,{options:_0x4411ba,args:_0x19ab0a,tdx:_0x5b20b7}=_0x557d02,_0x27e561=this[_0x1fbc85(0x235)](_0x19ab0a,_0x4411ba);if(!_0x27e561)return 0x1;_0x4411ba[_0x1fbc85(0x19f)]&&console[_0x1fbc85(0x2b5)]('Project:\x20'+_0x27e561);const _0x29cf52=await withSpinner('Listing\x20secrets...',()=>_0x5b20b7[_0x1fbc85(0x1d9)]['listSecrets'](_0x27e561),{'verbose':_0x4411ba[_0x1fbc85(0x19f)]}),{secrets:_0x2b494f}=_0x29cf52['data'];return console[_0x1fbc85(0x2b5)](_0x1fbc85(0x32a)+_0x2b494f[_0x1fbc85(0x2ec)]+'\x20secret'+(_0x2b494f[_0x1fbc85(0x2ec)]!==0x1?'s':'')),await handleSDKOutput(_0x2b494f,_0x4411ba),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a55_0xa29ad1(0x2fe);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x280);async[a55_0xa29ad1(0x22c)](_0x2c8b0b){const _0x50e5ac=a55_0xa29ad1,{options:_0xe380e8,args:_0x41d561,tdx:_0xaf70a1}=_0x2c8b0b;let _0x21a9db,_0x49341;if(_0x41d561[_0x50e5ac(0x2ec)]>=0x1&&!_0x41d561[0x0][_0x50e5ac(0x210)]('='))_0x21a9db=_0x41d561[0x0],_0x49341=_0x41d561[_0x50e5ac(0x29a)](0x1);else{if(_0x41d561[_0x50e5ac(0x2ec)]>=0x1&&_0xe380e8['workflowProject'])_0x21a9db=_0xe380e8[_0x50e5ac(0x1b0)],_0x49341=_0x41d561;else return _0x41d561['length']>=0x1?(console[_0x50e5ac(0x2b5)](_0x50e5ac(0x2ba)),console[_0x50e5ac(0x2b5)](_0x50e5ac(0x333)),0x1):(console[_0x50e5ac(0x2b5)](_0x50e5ac(0x27b)),console['error'](_0x50e5ac(0x1f5)),0x1);}if(_0x49341[_0x50e5ac(0x2ec)]===0x0)return console[_0x50e5ac(0x2b5)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x2e72c0={};try{for(const _0x4a9e02 of _0x49341){const {key:_0x30cbe9,value:_0x4bd840}=parseKeyValue(_0x4a9e02);_0x2e72c0[_0x30cbe9]=_0x4bd840;}}catch(_0x38b0b9){return _0x38b0b9 instanceof Error&&console[_0x50e5ac(0x2b5)](a55_0x12f6c0[_0x50e5ac(0x1bb)]('Error:'),_0x38b0b9[_0x50e5ac(0x1ce)]),0x1;}const _0x25b42d=Object[_0x50e5ac(0x281)](_0x2e72c0);_0xe380e8[_0x50e5ac(0x19f)]&&(console[_0x50e5ac(0x2b5)](_0x50e5ac(0x308)+_0x21a9db),console[_0x50e5ac(0x2b5)](_0x50e5ac(0x360)+_0x25b42d[_0x50e5ac(0x23a)](',\x20')));const _0x1e3fdd=await withSpinner(_0x25b42d['length']===0x1?'Setting\x20secret...':_0x50e5ac(0x28f)+_0x25b42d[_0x50e5ac(0x2ec)]+'\x20secrets...',()=>_0xaf70a1[_0x50e5ac(0x1d9)][_0x50e5ac(0x1f1)](_0x21a9db,_0x2e72c0),{'verbose':_0xe380e8['verbose']}),_0x338075=_0x1e3fdd['data'];return console['error'](_0x25b42d[_0x50e5ac(0x2ec)]===0x1?_0x50e5ac(0x351)+_0x338075[_0x50e5ac(0x281)][0x0]+_0x50e5ac(0x332)+_0x338075[_0x50e5ac(0x213)]+'\x27':'✔\x20'+_0x338075[_0x50e5ac(0x281)]['length']+_0x50e5ac(0x32d)+_0x338075['projectName']+'\x27'),(_0xe380e8['json']||_0xe380e8[_0x50e5ac(0x2cd)])&&await handleSingleObjectOutput(_0x338075,_0xe380e8),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x32c);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x283);async[a55_0xa29ad1(0x22c)](_0x361803){const _0x43ed98=a55_0xa29ad1,{options:_0x31d66a,args:_0x110f2e,tdx:_0xa120cd}=_0x361803;let _0x412536,_0x2b5c9d;if(_0x110f2e[_0x43ed98(0x2ec)]>=0x2)_0x412536=_0x110f2e[0x0],_0x2b5c9d=_0x110f2e[0x1];else{if(_0x110f2e[_0x43ed98(0x2ec)]===0x1&&_0x31d66a[_0x43ed98(0x1b0)])_0x412536=_0x31d66a[_0x43ed98(0x1b0)],_0x2b5c9d=_0x110f2e[0x0];else return _0x110f2e['length']===0x1?(console[_0x43ed98(0x2b5)](_0x43ed98(0x2ba)),console[_0x43ed98(0x2b5)](_0x43ed98(0x333)),0x1):(console[_0x43ed98(0x2b5)](_0x43ed98(0x228)),console[_0x43ed98(0x2b5)](_0x43ed98(0x2d4)),0x1);}_0x31d66a[_0x43ed98(0x19f)]&&(console[_0x43ed98(0x2b5)](_0x43ed98(0x308)+_0x412536),console[_0x43ed98(0x2b5)](_0x43ed98(0x1df)+_0x2b5c9d));if(!_0x31d66a[_0x43ed98(0x296)]){if(!isInteractive())return console[_0x43ed98(0x2b5)](a55_0x12f6c0['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a55_0x12f6c0[_0x43ed98(0x34a)](_0x43ed98(0x1c7))),0x1;const _0x38229f=await confirmKey(_0x43ed98(0x1bc)+_0x2b5c9d+'\x27\x20from\x20project\x20\x27'+_0x412536+'\x27?');if(!_0x38229f)return console['error'](a55_0x12f6c0[_0x43ed98(0x227)](_0x43ed98(0x1e5))),0x1;}const _0x402736=await withSpinner('Deleting\x20secret...',()=>_0xa120cd['workflow']['deleteSecret'](_0x412536,_0x2b5c9d),{'verbose':_0x31d66a[_0x43ed98(0x19f)]}),_0x32f347=_0x402736[_0x43ed98(0x35c)];return console['error'](_0x43ed98(0x351)+_0x32f347[_0x43ed98(0x2b0)]+_0x43ed98(0x1d5)+_0x32f347[_0x43ed98(0x213)]+'\x27'),(_0x31d66a[_0x43ed98(0x325)]||_0x31d66a['jsonl'])&&await handleSingleObjectOutput(_0x32f347,_0x31d66a),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(_0x313ed9){const _0x5db46b=a55_0xa29ad1,_0x42e32f=Math['floor'](_0x313ed9/0x3e8),_0x196311=Math[_0x5db46b(0x27e)](_0x42e32f/0x3c),_0x222df6=Math[_0x5db46b(0x27e)](_0x196311/0x3c),_0x5a1945=Math['floor'](_0x222df6/0x18);if(_0x5a1945>0x0){const _0x424eb6=_0x222df6%0x18;return _0x424eb6>0x0?_0x5a1945+'d\x20'+_0x424eb6+'h':_0x5a1945+'d';}else{if(_0x222df6>0x0){const _0x33cdf4=_0x196311%0x3c;return _0x33cdf4>0x0?_0x222df6+'h\x20'+_0x33cdf4+'m':_0x222df6+'h';}else{if(_0x196311>0x0){const _0x531eed=_0x42e32f%0x3c;return _0x531eed>0x0?_0x196311+'m\x20'+_0x531eed+'s':_0x196311+'m';}else return _0x42e32f+'s';}}}function formatTimestamp(_0x418893,_0x47dc70){const _0x41b809=a55_0xa29ad1,_0x487946=new Date(_0x418893),_0x49ee90=String(_0x487946[_0x41b809(0x2e9)]())[_0x41b809(0x19e)](0x2,'0'),_0x456b39=String(_0x487946[_0x41b809(0x34d)]())[_0x41b809(0x19e)](0x2,'0'),_0x63fc03=_0x49ee90+':'+_0x456b39,_0x212372=_0x487946[_0x41b809(0x26b)]()===_0x47dc70['getFullYear']()&&_0x487946[_0x41b809(0x238)]()===_0x47dc70[_0x41b809(0x238)]()&&_0x487946[_0x41b809(0x302)]()===_0x47dc70['getDate']();if(_0x212372)return _0x63fc03;else{const _0x58bdf4=String(_0x487946[_0x41b809(0x238)]()+0x1)[_0x41b809(0x19e)](0x2,'0'),_0x1b0d65=String(_0x487946['getDate']())['padStart'](0x2,'0');return _0x58bdf4+'-'+_0x1b0d65+'\x20'+_0x63fc03;}}function formatDate(_0x2542b7){const _0x4ee331=a55_0xa29ad1,_0x453342=_0x2542b7[_0x4ee331(0x26b)](),_0x5a4998=String(_0x2542b7[_0x4ee331(0x238)]()+0x1)[_0x4ee331(0x19e)](0x2,'0'),_0x4b4fae=String(_0x2542b7[_0x4ee331(0x302)]())[_0x4ee331(0x19e)](0x2,'0');return _0x453342+'-'+_0x5a4998+'-'+_0x4b4fae;}function getTaskStateIcon(_0x12fb7c){const _0x19d342={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x19d342[_0x12fb7c]||'⚪';}function getBarChar(_0x3f1e12){const _0x302d50=a55_0xa29ad1;return _0x3f1e12===_0x302d50(0x2b5)||_0x3f1e12===_0x302d50(0x273)?'×':'─';}function getBarColor(_0x40ae52){const _0x369c9b=a55_0xa29ad1,_0x47d848={'success':a55_0x12f6c0[_0x369c9b(0x1cf)],'error':a55_0x12f6c0[_0x369c9b(0x1bb)],'group_error':a55_0x12f6c0[_0x369c9b(0x1bb)],'running':a55_0x12f6c0[_0x369c9b(0x1b6)],'blocked':a55_0x12f6c0[_0x369c9b(0x227)],'planned':a55_0x12f6c0[_0x369c9b(0x34a)],'canceling':a55_0x12f6c0[_0x369c9b(0x227)]};return _0x47d848[_0x40ae52]||a55_0x12f6c0[_0x369c9b(0x2fd)];}function parseTaskName(_0x133f98){const _0x5476db=a55_0xa29ad1;let _0x23aa71=_0x133f98[_0x5476db(0x31f)](/^\++/,'');const _0x4febf8=_0x23aa71[_0x5476db(0x1c9)]('+'),_0x3f4bff=_0x4febf8[_0x5476db(0x2ec)]>0x1?_0x4febf8[_0x5476db(0x2ec)]-0x2:0x0,_0x2c28cc=_0x4febf8[_0x4febf8['length']-0x1]||_0x23aa71;return{'level':_0x3f4bff,'name':'+'+_0x2c28cc};}function truncateTaskName(_0x1bbc90,_0x106f7f){const _0x124a0c=a55_0xa29ad1,_0x214c4b=stringWidth(_0x1bbc90);if(_0x214c4b<=_0x106f7f)return _0x1bbc90;let _0x40206c=_0x1bbc90;while(stringWidth(_0x40206c+'…')>_0x106f7f&&_0x40206c['length']>0x0){_0x40206c=_0x40206c[_0x124a0c(0x29a)](0x0,-0x1);}return _0x40206c+'…';}function calculateTimeScale(_0x83ef53,_0x5b6f40){const _0x917dc4=a55_0xa29ad1;return{'startTime':_0x83ef53[_0x917dc4(0x33d)],'endTime':_0x83ef53['end'],'durationMs':_0x83ef53[_0x917dc4(0x33c)],'msPerChar':_0x83ef53['duration']/_0x5b6f40};}function timeToPosition(_0x3f5d56,_0xc5a8f7,_0x8d1435){const _0x5e661d=a55_0xa29ad1,_0x40fbf4=_0x3f5d56-_0xc5a8f7['startTime'],_0x5e0071=Math[_0x5e661d(0x27e)](_0x40fbf4/_0xc5a8f7['msPerChar']);return Math[_0x5e661d(0x27f)](0x0,Math[_0x5e661d(0x21c)](_0x5e0071,_0x8d1435));}function renderTimeAxis(_0x1a6eea,_0xb9342d){const _0x3fbff9=a55_0xa29ad1,_0x5468cf=Math['min'](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x3fbff9(0x27f)](TIMELINE_CONFIG[_0x3fbff9(0x2d3)],Math['floor'](_0xb9342d/TIMELINE_CONFIG[_0x3fbff9(0x266)]))),_0x231fb2=_0x1a6eea[_0x3fbff9(0x2ab)]/(_0x5468cf-0x1),_0x16f5f2=new Date(_0x1a6eea[_0x3fbff9(0x1b8)]),_0x9890e5=[];for(let _0x33b5bf=0x0;_0x33b5bf<_0x5468cf;_0x33b5bf++){const _0x7d9341=_0x1a6eea['startTime']+_0x33b5bf*_0x231fb2,_0x5c2bd5=timeToPosition(_0x7d9341,_0x1a6eea,_0xb9342d),_0xc0e9c1=formatTimestamp(_0x7d9341,_0x16f5f2);_0x9890e5[_0x3fbff9(0x267)]({'pos':_0x5c2bd5,'text':_0xc0e9c1});}const _0x485e8=new Array(_0xb9342d)[_0x3fbff9(0x2cb)]('\x20');let _0x1bf48c=-0x1;for(const {pos:_0x2b0cd6,text:_0x10f98f}of _0x9890e5){let _0x4131cf=Math[_0x3fbff9(0x27f)](0x0,_0x2b0cd6-Math[_0x3fbff9(0x27e)](_0x10f98f[_0x3fbff9(0x2ec)]/0x2));_0x4131cf<=_0x1bf48c+TIMELINE_CONFIG[_0x3fbff9(0x310)]&&(_0x4131cf=_0x1bf48c+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x4131cf+_0x10f98f['length']>_0xb9342d&&(_0x4131cf=_0xb9342d-_0x10f98f[_0x3fbff9(0x2ec)]);if(_0x4131cf>=0x0&&_0x4131cf+_0x10f98f['length']<=_0xb9342d&&_0x4131cf>_0x1bf48c){for(let _0x2cc368=0x0;_0x2cc368<_0x10f98f[_0x3fbff9(0x2ec)];_0x2cc368++){_0x485e8[_0x4131cf+_0x2cc368]=_0x10f98f[_0x2cc368];}_0x1bf48c=_0x4131cf+_0x10f98f[_0x3fbff9(0x2ec)]-0x1;}}return _0x485e8[_0x3fbff9(0x23a)]('');}function renderTaskRow(_0x7297ea,_0x1dc75c,_0x3e9728,_0x4e801b){const _0x2f4972=a55_0xa29ad1,{level:_0x2cc33c,name:_0x34da3f}=parseTaskName(_0x7297ea['name']),_0x568513='\x20'[_0x2f4972(0x1f2)](_0x2cc33c),_0x2c848c=_0x7297ea[_0x2f4972(0x1c5)]?'('+formatElapsed(_0x7297ea[_0x2f4972(0x1c5)][_0x2f4972(0x33c)])+')':'',_0x3869b3=stringWidth(_0x2c848c),_0x452987=_0x2cc33c*0x1,_0x5c0337=_0x4e801b-_0x452987-_0x3869b3-0x1,_0x6a6d83=truncateTaskName(_0x34da3f,_0x5c0337),_0x2bb403=_0x568513+_0x6a6d83,_0x38fb5e=stringWidth(_0x2bb403),_0x4f16ed=_0x4e801b-_0x38fb5e-_0x3869b3,_0xa6ba0e=_0x2bb403+'\x20'['repeat'](Math[_0x2f4972(0x27f)](0x1,_0x4f16ed))+a55_0x12f6c0['dim'](_0x2c848c),_0x2d3792=getTaskStateIcon(_0x7297ea['state']),_0x28b923=new Array(_0x3e9728)[_0x2f4972(0x2cb)]('\x20');if(_0x7297ea[_0x2f4972(0x1c5)]){const _0x4e86f9=timeToPosition(_0x7297ea[_0x2f4972(0x1c5)][_0x2f4972(0x33d)],_0x1dc75c,_0x3e9728),_0x2f0dc3=timeToPosition(_0x7297ea[_0x2f4972(0x1c5)][_0x2f4972(0x219)],_0x1dc75c,_0x3e9728),_0x18ff40=getBarChar(_0x7297ea[_0x2f4972(0x20f)]),_0x165220=Math[_0x2f4972(0x27f)](_0x4e86f9+0x1,_0x2f0dc3);for(let _0x3d3ece=_0x4e86f9;_0x3d3ece<Math[_0x2f4972(0x21c)](_0x165220,_0x3e9728);_0x3d3ece++){_0x28b923[_0x3d3ece]=_0x18ff40;}}const _0x339a1e=getBarColor(_0x7297ea[_0x2f4972(0x20f)]),_0x23841c=_0x28b923[_0x2f4972(0x312)](_0x101af4=>_0x101af4==='\x20'?'\x20':_0x339a1e(_0x101af4))['join']('');return _0x2d3792+'\x20'+_0xa6ba0e+'│'+_0x23841c+'│';}function calculateStats(_0x15a675){const _0x15a010=a55_0xa29ad1,_0x2878be={'total':_0x15a675[_0x15a010(0x2ec)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x44627c of _0x15a675){if(_0x44627c['state']===_0x15a010(0x19a))_0x2878be[_0x15a010(0x19a)]++;else{if(_0x44627c[_0x15a010(0x20f)]===_0x15a010(0x2b5)||_0x44627c[_0x15a010(0x20f)]===_0x15a010(0x273))_0x2878be['error']++;else _0x44627c[_0x15a010(0x20f)]===_0x15a010(0x31d)?_0x2878be['running']++:_0x2878be[_0x15a010(0x1dc)]++;}}return _0x2878be;}function formatStats(_0x3e32a3){const _0x2a85f7=a55_0xa29ad1;return[_0x2a85f7(0x1a9)+_0x3e32a3['total'],'✅\x20'+_0x3e32a3[_0x2a85f7(0x19a)],'❌\x20'+_0x3e32a3[_0x2a85f7(0x2b5)],_0x2a85f7(0x2c4)+_0x3e32a3[_0x2a85f7(0x31d)],'⏳\x20'+_0x3e32a3[_0x2a85f7(0x1dc)]][_0x2a85f7(0x23a)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]='workflow:timeline';['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a55_0xa29ad1(0x22c)](_0x307edb){const _0x199dce=a55_0xa29ad1,{options:_0x184b6a,args:_0x487f92,tdx:_0x53a246}=_0x307edb;let _0x5182e7,_0x4913b8,_0x13da2f=![];if(_0x487f92[0x0]){if(_0x487f92[0x0][_0x199dce(0x210)]('.')){const _0x540c1a=this[_0x199dce(0x29c)](_0x487f92,_0x184b6a);if(!_0x540c1a)return 0x1;_0x5182e7=_0x540c1a[_0x199dce(0x213)],_0x4913b8=_0x540c1a[_0x199dce(0x20e)];}else{_0x4913b8=_0x487f92[0x0],_0x5182e7=_0x184b6a[_0x199dce(0x1b0)];if(!_0x5182e7)return console[_0x199dce(0x2b5)](a55_0x12f6c0[_0x199dce(0x1bb)](_0x199dce(0x352)),_0x199dce(0x2b4)),0x1;_0x13da2f=!![];}}else{const _0x49afc0=this[_0x199dce(0x29c)](_0x487f92,_0x184b6a);if(!_0x49afc0)return 0x1;_0x5182e7=_0x49afc0['projectName'],_0x4913b8=_0x49afc0[_0x199dce(0x20e)];}if(_0x184b6a[_0x199dce(0x19f)]){if(_0x5182e7&&_0x4913b8)console[_0x199dce(0x2b5)](_0x199dce(0x2fb)+_0x5182e7+'.'+_0x4913b8);else _0x5182e7&&console['error'](_0x199dce(0x31a)+_0x5182e7);}const _0x4535d2=_0x184b6a[_0x199dce(0x2c5)],_0xd2cbc9=_0x184b6a[_0x199dce(0x2a5)];if(_0x4535d2){_0xd2cbc9&&console[_0x199dce(0x2b5)](a55_0x12f6c0[_0x199dce(0x227)](_0x199dce(0x1c0)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x48943b=_0x184b6a[_0x199dce(0x29d)];return _0x48943b?await this['pollTimeline'](_0x307edb,_0x4535d2):await this[_0x199dce(0x2b6)](_0x307edb,_0x4535d2,_0x184b6a),0x0;}if(_0xd2cbc9){const _0x31a850=await withSpinner('Loading\x20session...',()=>_0x53a246[_0x199dce(0x1d9)]['sessions']({'projectName':_0x5182e7,'workflowName':_0x4913b8,'limit':0x64}),{'verbose':_0x184b6a['verbose']}),_0x5797b7=_0x31a850[_0x199dce(0x35c)][_0x199dce(0x2b2)](_0x128932=>_0x128932['id']===_0xd2cbc9);if(!_0x5797b7)return console[_0x199dce(0x2b5)](a55_0x12f6c0['red'](_0x199dce(0x352)),_0x199dce(0x211)+_0xd2cbc9),0x1;if(!_0x5797b7[_0x199dce(0x1af)]?.['id'])return console[_0x199dce(0x2b5)](a55_0x12f6c0[_0x199dce(0x1bb)](_0x199dce(0x352)),_0x199dce(0x303)+_0xd2cbc9+'\x20has\x20no\x20attempts'),0x1;const _0x234719=_0x5797b7[_0x199dce(0x1af)]['id'];_0x184b6a[_0x199dce(0x19f)]&&console[_0x199dce(0x2b5)](_0x199dce(0x217)+_0x234719+_0x199dce(0x2e7)+_0xd2cbc9);const _0x2a4740=_0x184b6a[_0x199dce(0x29d)];return _0x2a4740?await this[_0x199dce(0x2d6)](_0x307edb,_0x234719):await this[_0x199dce(0x2b6)](_0x307edb,_0x234719,_0x184b6a),0x0;}const _0x4f1659=await withSpinner('Loading\x20sessions...',()=>_0x53a246[_0x199dce(0x1d9)][_0x199dce(0x243)]({'projectName':_0x5182e7,'workflowName':_0x4913b8,'limit':_0x184b6a[_0x199dce(0x301)]||0x32}),{'verbose':_0x184b6a['verbose']}),_0x59ecd2=_0x4f1659['data'];if(_0x59ecd2[_0x199dce(0x2ec)]===0x0){if(_0x5182e7&&_0x4913b8)console['error'](_0x199dce(0x1fd)+_0x5182e7+'.'+_0x4913b8);else _0x5182e7?console['error'](_0x199dce(0x349)+_0x5182e7):(console[_0x199dce(0x2b5)](_0x199dce(0x313)),console[_0x199dce(0x2b5)](a55_0x12f6c0[_0x199dce(0x34a)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x59ecd2[_0x199dce(0x271)]((_0x213cfb,_0x550122)=>{const _0x591b9b=_0x199dce,_0x407fcf=_0x213cfb[_0x591b9b(0x329)]||'',_0x318d07=_0x550122[_0x591b9b(0x329)]||'';return _0x318d07[_0x591b9b(0x1bd)](_0x407fcf);});if(_0x184b6a[_0x199dce(0x325)]||_0x184b6a[_0x199dce(0x2cd)])return await handleSDKOutput(_0x59ecd2,_0x184b6a),0x0;let _0x4da692;if(_0x13da2f){const _0x452e3a=_0x59ecd2[0x0];if(!_0x452e3a[_0x199dce(0x1af)]?.['id'])return console['error'](_0x199dce(0x2a2)),0x0;_0x4da692=_0x452e3a['lastAttempt']['id'],_0x184b6a[_0x199dce(0x19f)]&&console[_0x199dce(0x2b5)](_0x199dce(0x305)+_0x452e3a[_0x199dce(0x329)]);}else{const _0x435c48=_0x59ecd2[_0x199dce(0x312)](_0x15ad3f=>{const _0x521300=_0x199dce,_0x8570fa=getAttemptStatusDisplay(_0x15ad3f[_0x521300(0x1af)]);return{'title':_0x15ad3f[_0x521300(0x356)]?.[_0x521300(0x1ff)]+'.'+_0x15ad3f['workflow']?.[_0x521300(0x1ff)]+_0x521300(0x277)+_0x15ad3f['sessionTime']+'\x20'+_0x8570fa[_0x521300(0x2d0)],'value':_0x15ad3f[_0x521300(0x1af)]?.['id']||'','description':_0x8570fa[_0x521300(0x208)]};}),_0x5a66f7=await a55_0x46d174({'type':'select','name':_0x199dce(0x2c5),'message':_0x199dce(0x30f),'choices':_0x435c48[_0x199dce(0x23e)](_0x572d3d=>_0x572d3d['value']!=='')});if(!_0x5a66f7['attemptId'])return 0x0;_0x4da692=_0x5a66f7[_0x199dce(0x2c5)];}const _0x326378=_0x184b6a['follow'];return _0x326378?await this[_0x199dce(0x2d6)](_0x307edb,_0x4da692):await this['renderSingleTimeline'](_0x307edb,_0x4da692,_0x184b6a),0x0;}async[a55_0xa29ad1(0x2b6)](_0x18fecf,_0x34f606,_0x270a30){const _0x250624=a55_0xa29ad1,{tdx:_0x43b05a}=_0x18fecf;let _0x5aeb9e,_0x307a10;try{[_0x5aeb9e,_0x307a10]=await Promise['all']([_0x43b05a[_0x250624(0x1d9)][_0x250624(0x28b)](_0x34f606),_0x43b05a[_0x250624(0x1d9)][_0x250624(0x2f7)](_0x34f606,![])]);}catch(_0x206e86){console[_0x250624(0x2b5)](a55_0x12f6c0[_0x250624(0x1bb)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x270a30[_0x250624(0x19f)]&&console[_0x250624(0x2b5)](_0x206e86);throw _0x206e86;}if(_0x270a30[_0x250624(0x325)]||_0x270a30[_0x250624(0x2cd)]){const _0x955858=this[_0x250624(0x314)](_0x5aeb9e,_0x307a10);await handleSDKOutput([_0x955858],_0x270a30);return;}const _0x1757f7=_0x43b05a[_0x250624(0x245)][_0x250624(0x2e4)],_0x37e3fd=this['renderTimeline'](_0x5aeb9e,_0x307a10,_0x1757f7);console[_0x250624(0x361)](_0x37e3fd);}async['pollTimeline'](_0x54aa0c,_0x35cc60){const _0x545982=a55_0xa29ad1,{tdx:_0x755a58}=_0x54aa0c,_0x2e0002=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x39c209=TIMELINE_CONFIG[_0x545982(0x1ea)];let _0x449909=0x0;while(_0x449909<_0x39c209){process[_0x545982(0x2dc)][_0x545982(0x1fb)]&&process[_0x545982(0x2dc)][_0x545982(0x342)]('\x1bc');let _0x5339d1,_0x54e3f2;try{[_0x5339d1,_0x54e3f2]=await Promise[_0x545982(0x2af)]([_0x755a58['workflow']['attempt'](_0x35cc60),_0x755a58['workflow']['tasks'](_0x35cc60,![])]);}catch(_0xdd09f1){console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x1bb)](_0x545982(0x1f4)));_0x449909>0x0&&console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x34a)](_0x545982(0x275)+_0x449909));throw _0xdd09f1;}const _0x329371=_0x755a58[_0x545982(0x245)]['site'],_0x1d2ada=this[_0x545982(0x2a0)](_0x5339d1,_0x54e3f2,_0x329371);console[_0x545982(0x361)](_0x1d2ada);const _0xba1583=_0x5339d1[_0x545982(0x2c6)]&&_0x54e3f2[_0x545982(0x1b5)](_0x58df62=>_0x58df62[_0x545982(0x20f)]!==_0x545982(0x31d)&&_0x58df62[_0x545982(0x20f)]!==_0x545982(0x343));if(_0xba1583){console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x1cf)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x34a)](_0x545982(0x197)+_0x449909*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x10f024=>setTimeout(_0x10f024,_0x2e0002)),_0x449909++;}_0x449909>=_0x39c209&&console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x227)](_0x545982(0x29e)));}[a55_0xa29ad1(0x2a0)](_0x5efa79,_0x3fd6e2,_0xef1f0d){const _0x43f56e=a55_0xa29ad1,_0x21d823=[],_0x34d11d=TIMELINE_CONFIG[_0x43f56e(0x32b)],_0x2c6dd0=0x5,_0x47211b=process[_0x43f56e(0x2dc)][_0x43f56e(0x315)]||0x78,_0x6ff4c2=_0x47211b-_0x34d11d-_0x2c6dd0,_0x318a68=Math[_0x43f56e(0x27f)](TIMELINE_CONFIG[_0x43f56e(0x290)],Math['min'](_0x6ff4c2,TIMELINE_CONFIG[_0x43f56e(0x2ae)])),_0x272372=new Date(_0x5efa79[_0x43f56e(0x1d7)])['getTime'](),_0x4b1c8d=_0x5efa79[_0x43f56e(0x353)]?new Date(_0x5efa79[_0x43f56e(0x353)])['getTime']():Date[_0x43f56e(0x2a3)](),_0x300f20={'start':_0x272372,'end':_0x4b1c8d,'duration':_0x4b1c8d-_0x272372},_0x34018d=new Map(),_0x580462=[];for(const _0x400438 of _0x3fd6e2){if(_0x400438['startedAt']){const _0x1e6866=new Date(_0x400438['startedAt'])[_0x43f56e(0x34e)](),_0x3dfeed=_0x400438['updatedAt']?new Date(_0x400438[_0x43f56e(0x28a)])[_0x43f56e(0x34e)]():Date[_0x43f56e(0x2a3)](),_0x1847f6={'start':_0x1e6866,'end':_0x3dfeed,'duration':_0x3dfeed-_0x1e6866};_0x34018d[_0x43f56e(0x1ab)](_0x400438['id'],_0x1847f6),_0x580462[_0x43f56e(0x267)]({'name':_0x400438[_0x43f56e(0x272)],'state':_0x400438[_0x43f56e(0x20f)]||_0x43f56e(0x256),'window':_0x1847f6});}else _0x580462[_0x43f56e(0x267)]({'name':_0x400438[_0x43f56e(0x272)],'state':_0x400438[_0x43f56e(0x20f)]||'planned','window':undefined});}_0x580462[_0x43f56e(0x271)]((_0x6666f6,_0x253fda)=>{const _0x214f50=_0x43f56e;if(!_0x6666f6[_0x214f50(0x1c5)])return 0x1;if(!_0x253fda[_0x214f50(0x1c5)])return-0x1;return _0x6666f6[_0x214f50(0x1c5)][_0x214f50(0x33d)]-_0x253fda['window'][_0x214f50(0x33d)];});const _0x1aefc1=_0x580462[_0x43f56e(0x2ec)],_0x5babb6=_0x1aefc1>TIMELINE_CONFIG[_0x43f56e(0x260)];_0x5babb6&&_0x580462[_0x43f56e(0x24b)](TIMELINE_CONFIG[_0x43f56e(0x260)]);const _0x14853f=calculateTimeScale(_0x300f20,_0x318a68),_0xb9a831=_0x5efa79['done']?_0x5efa79[_0x43f56e(0x19a)]?a55_0x12f6c0[_0x43f56e(0x1cf)](_0x43f56e(0x19a)):a55_0x12f6c0['red'](_0x43f56e(0x2b5)):a55_0x12f6c0[_0x43f56e(0x1b6)](_0x43f56e(0x31d)),_0x1e39c3=_0x5efa79[_0x43f56e(0x356)]?.['id'],_0x57a4ab=_0x5efa79['sessionId'];let _0x159564;if(_0x1e39c3&&_0x57a4ab){const _0x494cf8=getWorkflowAttemptUrl(_0xef1f0d,_0x1e39c3,_0x57a4ab,_0x5efa79['id']);_0x159564=hyperlink(a55_0x12f6c0['dim'](_0x5efa79['id']),_0x494cf8);}else _0x159564=a55_0x12f6c0[_0x43f56e(0x34a)](_0x5efa79['id']);_0x21d823['push'](_0x43f56e(0x247)+_0x159564+_0x43f56e(0x277)+_0xb9a831+_0x43f56e(0x277)+formatElapsed(_0x300f20[_0x43f56e(0x33c)]));if(_0x580462[_0x43f56e(0x2ec)]>0x0){const _0x2976d4=renderTimeAxis(_0x14853f,_0x318a68),_0x2d46c8=new Date(_0x300f20[_0x43f56e(0x33d)]),_0x101086=formatDate(_0x2d46c8),_0x5b57a5=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x43f56e(0x31e)]+_0x34d11d,_0x1b7ed2=_0x101086['padStart'](_0x5b57a5),_0x41363c=a55_0x12f6c0[_0x43f56e(0x34a)](_0x1b7ed2);_0x21d823[_0x43f56e(0x267)](_0x41363c+'\x20'+_0x2976d4);for(const _0x188752 of _0x580462){_0x21d823[_0x43f56e(0x267)](renderTaskRow(_0x188752,_0x14853f,_0x318a68,_0x34d11d));}const _0x5b6109=calculateStats(_0x580462);_0x21d823[_0x43f56e(0x267)](formatStats(_0x5b6109)),_0x5babb6&&_0x21d823[_0x43f56e(0x267)](a55_0x12f6c0[_0x43f56e(0x227)](_0x43f56e(0x1a1)+TIMELINE_CONFIG[_0x43f56e(0x260)]+'\x20of\x20'+_0x1aefc1+_0x43f56e(0x35d))),_0x21d823[_0x43f56e(0x267)](''),_0x21d823[_0x43f56e(0x267)](a55_0x12f6c0[_0x43f56e(0x34a)](_0x43f56e(0x193))+('tdx\x20wf\x20attempt\x20'+_0x5efa79['id']+_0x43f56e(0x279))+a55_0x12f6c0[_0x43f56e(0x34a)](_0x43f56e(0x2d5)));}else _0x21d823[_0x43f56e(0x267)](_0x43f56e(0x199));return _0x21d823[_0x43f56e(0x23a)]('\x0a');}['buildTimelineData'](_0x3a282a,_0x40f489){const _0x50d3be=a55_0xa29ad1,_0x488ec8=new Date(_0x3a282a[_0x50d3be(0x1d7)])[_0x50d3be(0x34e)](),_0x540b38=_0x3a282a[_0x50d3be(0x353)]?new Date(_0x3a282a[_0x50d3be(0x353)])[_0x50d3be(0x34e)]():Date[_0x50d3be(0x2a3)](),_0x594e3b=_0x540b38-_0x488ec8,_0x1ee498=[];for(const _0x42d465 of _0x40f489){if(_0x42d465[_0x50d3be(0x1d1)]){const _0x23bd75=new Date(_0x42d465['startedAt'])[_0x50d3be(0x34e)](),_0x441ac8=_0x42d465[_0x50d3be(0x28a)]?new Date(_0x42d465[_0x50d3be(0x28a)])['getTime']():Date[_0x50d3be(0x2a3)]();_0x1ee498[_0x50d3be(0x267)]({'name':_0x42d465[_0x50d3be(0x272)],'state':_0x42d465['state']||_0x50d3be(0x256),'window':{'start':_0x23bd75,'end':_0x441ac8,'duration':_0x441ac8-_0x23bd75}});}else _0x1ee498[_0x50d3be(0x267)]({'name':_0x42d465[_0x50d3be(0x272)],'state':_0x42d465[_0x50d3be(0x20f)]||_0x50d3be(0x343),'window':undefined});}const _0x1275c5=calculateStats(_0x1ee498);return{'attempt':{'id':_0x3a282a['id'],'status':_0x3a282a[_0x50d3be(0x2c6)]?_0x3a282a[_0x50d3be(0x19a)]?_0x50d3be(0x19a):_0x50d3be(0x2b5):_0x50d3be(0x31d),'createdAt':_0x3a282a[_0x50d3be(0x1d7)],'finishedAt':_0x3a282a[_0x50d3be(0x353)],'duration_ms':_0x594e3b},'tasks':_0x1ee498['map'](_0x2a4094=>({'name':_0x2a4094[_0x50d3be(0x1ff)],'state':_0x2a4094[_0x50d3be(0x20f)],'startedAt':_0x2a4094[_0x50d3be(0x1c5)]?new Date(_0x2a4094[_0x50d3be(0x1c5)]['start'])[_0x50d3be(0x233)]():null,'updatedAt':_0x2a4094['window']?new Date(_0x2a4094[_0x50d3be(0x1c5)]['end'])['toISOString']():null,'duration_ms':_0x2a4094[_0x50d3be(0x1c5)]?.[_0x50d3be(0x33c)]||null})),'stats':_0x1275c5};}}function formatScheduleLine(_0x54b7ce){const _0x28236e=a55_0xa29ad1,_0x5164fd=_0x54b7ce[_0x28236e(0x27c)]?a55_0x12f6c0[_0x28236e(0x227)](_0x28236e(0x2c8)):'',_0x49e4bd=_0x54b7ce[_0x28236e(0x356)]?.[_0x28236e(0x1ff)]?a55_0x12f6c0[_0x28236e(0x34a)]('\x20['+_0x54b7ce[_0x28236e(0x356)]['name']+']'):'',_0x307f44=_0x54b7ce['nextRunTime']?a55_0x12f6c0[_0x28236e(0x34a)](_0x28236e(0x31b)+new Date(_0x54b7ce[_0x28236e(0x244)])[_0x28236e(0x1c2)]()):'';return _0x28236e(0x22b)+_0x54b7ce['id']+'\x20'+(_0x54b7ce[_0x28236e(0x1d9)]?.[_0x28236e(0x1ff)]||_0x28236e(0x1f9))+_0x49e4bd+_0x5164fd+_0x307f44;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x251);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x223);async['execute'](_0xe392ea){const _0x31a5d6=a55_0xa29ad1,{options:_0x411af6,args:_0x2314fc,tdx:_0x5570f5}=_0xe392ea,{scheduleId:_0x3c07d0}=_0x411af6;if(_0x3c07d0&&_0x2314fc[0x0])return console[_0x31a5d6(0x2b5)](a55_0x12f6c0[_0x31a5d6(0x1bb)](_0x31a5d6(0x352)),'--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter'),console[_0x31a5d6(0x2b5)](a55_0x12f6c0['dim'](_0x31a5d6(0x1ed))),0x1;if(_0x3c07d0){const _0x3cf4dd=await withSpinner(_0x31a5d6(0x230)+_0x3c07d0+_0x31a5d6(0x2a1),()=>_0x5570f5['workflow']['getSchedule'](_0x3c07d0),{'verbose':_0x411af6['verbose']}),_0x2c46e4=_0x3cf4dd[_0x31a5d6(0x35c)];return isStructuredFormat(_0x411af6)?await handleSingleObjectOutput(_0x2c46e4,_0x411af6):(console[_0x31a5d6(0x2b5)]('✔\x20Schedule\x20found'),console[_0x31a5d6(0x361)](formatScheduleLine(_0x2c46e4))),0x0;}const _0x4c2d84=this[_0x31a5d6(0x29c)](_0x2314fc,_0x411af6);if(!_0x4c2d84)return 0x1;const {projectName:_0x530ade,workflowName:_0x393551}=_0x4c2d84,_0x231bd3=_0x530ade?'\x27'+_0x530ade+(_0x393551?'.'+_0x393551:'')+'\x27':undefined,_0x547040=await withSpinner(_0x231bd3?_0x31a5d6(0x214)+_0x231bd3+_0x31a5d6(0x2a1):'Listing\x20schedules...',()=>_0x530ade?_0x5570f5[_0x31a5d6(0x1d9)][_0x31a5d6(0x1a2)](_0x530ade,{'workflow':_0x393551,'limit':_0x411af6['limit']}):_0x5570f5[_0x31a5d6(0x1d9)][_0x31a5d6(0x2cc)]({'limit':_0x411af6['limit']}),{'verbose':_0x411af6[_0x31a5d6(0x19f)]}),_0x30bad8=_0x547040[_0x31a5d6(0x35c)],_0x4345bf=_0x411af6['limit']&&_0x30bad8[_0x31a5d6(0x2ec)]>=_0x411af6[_0x31a5d6(0x301)]?a55_0x12f6c0[_0x31a5d6(0x34a)](_0x31a5d6(0x2b9)):'';console[_0x31a5d6(0x2b5)]('✔\x20Found\x20'+_0x30bad8[_0x31a5d6(0x2ec)]+_0x31a5d6(0x1fa)+(_0x30bad8[_0x31a5d6(0x2ec)]!==0x1?'s':'')+_0x4345bf);if(isStructuredFormat(_0x411af6))await handleSDKOutput(_0x30bad8,_0x411af6);else{if(_0x30bad8['length']===0x0)console['log']('No\x20schedules\x20found');else for(const _0x197706 of _0x30bad8){console[_0x31a5d6(0x361)](formatScheduleLine(_0x197706));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x21d);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x350);async[a55_0xa29ad1(0x22c)](_0x457ad0){const _0x1cdcf1=a55_0xa29ad1,{options:_0xc7df2d,args:_0x39b09b,tdx:_0x2db56e}=_0x457ad0,_0x30916e=_0x39b09b[0x0];if(!_0x30916e)return console[_0x1cdcf1(0x2b5)](a55_0x12f6c0[_0x1cdcf1(0x1bb)]('Error:'),'Schedule\x20ID\x20is\x20required'),console['error'](a55_0x12f6c0[_0x1cdcf1(0x34a)](_0x1cdcf1(0x2d1))),console[_0x1cdcf1(0x2b5)](a55_0x12f6c0[_0x1cdcf1(0x34a)](_0x1cdcf1(0x2e0))),0x1;const {backfill:_0x1ed153,nextTime:_0x59391d}=_0xc7df2d,_0x29421b={};if(_0x1ed153!==undefined)_0x29421b[_0x1cdcf1(0x357)]=!_0x1ed153;if(_0x59391d!==undefined)_0x29421b[_0x1cdcf1(0x2df)]=_0x59391d;const _0x364202=await withSpinner(_0x1cdcf1(0x253)+_0x30916e+'...',()=>_0x2db56e[_0x1cdcf1(0x1d9)][_0x1cdcf1(0x225)](_0x30916e,_0x29421b),{'verbose':_0xc7df2d[_0x1cdcf1(0x19f)]}),_0x12947b=_0x364202[_0x1cdcf1(0x35c)];return isStructuredFormat(_0xc7df2d)?await handleSingleObjectOutput(_0x12947b,_0xc7df2d):(console[_0x1cdcf1(0x361)](_0x1cdcf1(0x1cb)+_0x30916e+_0x1cdcf1(0x346)+(_0x12947b[_0x1cdcf1(0x1d9)]?.[_0x1cdcf1(0x1ff)]||_0x1cdcf1(0x256))+')'),_0x12947b[_0x1cdcf1(0x244)]&&console[_0x1cdcf1(0x361)](a55_0x12f6c0[_0x1cdcf1(0x34a)](_0x1cdcf1(0x2a6)+new Date(_0x12947b['nextRunTime'])['toLocaleString']()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']=a55_0xa29ad1(0x2bc);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x2e2);async[a55_0xa29ad1(0x22c)](_0xb7b495){const _0x30b3f8=a55_0xa29ad1,{options:_0x396dc5,args:_0x457a88,tdx:_0x4ef6c7}=_0xb7b495,_0x508988=_0x457a88[0x0];if(!_0x508988)return console[_0x30b3f8(0x2b5)](a55_0x12f6c0[_0x30b3f8(0x1bb)]('Error:'),'Schedule\x20ID\x20is\x20required'),console['error'](a55_0x12f6c0[_0x30b3f8(0x34a)](_0x30b3f8(0x2f5))),console['error'](a55_0x12f6c0['dim'](_0x30b3f8(0x2e0))),0x1;const _0x353f7d=await withSpinner(_0x30b3f8(0x2ff)+_0x508988+_0x30b3f8(0x2a1),()=>_0x4ef6c7['workflow'][_0x30b3f8(0x205)](_0x508988),{'verbose':_0x396dc5[_0x30b3f8(0x19f)]}),_0x44cdb3=_0x353f7d[_0x30b3f8(0x35c)];return isStructuredFormat(_0x396dc5)?await handleSingleObjectOutput(_0x44cdb3,_0x396dc5):console[_0x30b3f8(0x361)](_0x30b3f8(0x1cb)+_0x508988+_0x30b3f8(0x24d)+(_0x44cdb3['workflow']?.[_0x30b3f8(0x1ff)]||_0x30b3f8(0x256))+')'),0x0;}}
|