@treasuredata/tdx 2026.6.3 → 2026.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.d.ts +14 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.d.ts +1 -0
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/project-config.js.map +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.d.ts.map +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/tdx-search.js.map +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.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/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/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_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;}}
|
|
1
|
+
const a55_0x5029cc=a55_0x5cbb;(function(_0x50a2b9,_0x5b0b85){const _0x2b57cf=a55_0x5cbb,_0x4c6662=_0x50a2b9();while(!![]){try{const _0x5822ae=-parseInt(_0x2b57cf(0xcf))/0x1+-parseInt(_0x2b57cf(0x1f7))/0x2*(parseInt(_0x2b57cf(0x182))/0x3)+parseInt(_0x2b57cf(0x21c))/0x4+parseInt(_0x2b57cf(0x265))/0x5+parseInt(_0x2b57cf(0x143))/0x6+-parseInt(_0x2b57cf(0x131))/0x7*(parseInt(_0x2b57cf(0x22d))/0x8)+parseInt(_0x2b57cf(0xa5))/0x9;if(_0x5822ae===_0x5b0b85)break;else _0x4c6662['push'](_0x4c6662['shift']());}catch(_0x232a1b){_0x4c6662['push'](_0x4c6662['shift']());}}}(a55_0x4d42,0x4d280));import a55_0x47a174 from'chalk';import{existsSync}from'fs';import a55_0x4d0954 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_0x110a93 from'prompts';function getAttemptStatusDisplay(_0x4bf490){const _0x537d00=a55_0x5cbb;if(!_0x4bf490)return{'icon':'⏳','text':''};const {done:_0x4d234f,success:_0x56deb8,cancelRequested:_0x4263a8}=_0x4bf490;if(!_0x4d234f)return _0x4263a8?{'icon':'🛑','text':a55_0x47a174[_0x537d00(0x175)](_0x537d00(0x185))}:{'icon':'🔄','text':a55_0x47a174[_0x537d00(0x117)](_0x537d00(0x97))};if(_0x56deb8)return{'icon':'✅','text':a55_0x47a174[_0x537d00(0x1de)](_0x537d00(0x1ca))};return{'icon':'❌','text':a55_0x47a174[_0x537d00(0x25a)](_0x537d00(0x19c))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x29696e,_0x1ea2d2,_0xa02e17=0x0){const _0x1466a3=a55_0x5cbb;return _0x29696e[_0xa02e17]||_0x1ea2d2[_0x1466a3(0x149)];}[a55_0x5029cc(0x1e3)](_0x4a351f,_0x427b80,_0xc2c97e=0x0){const _0x325b58=a55_0x5029cc,_0x5ade24=this[_0x325b58(0xd7)](_0x4a351f,_0x427b80,_0xc2c97e);if(!_0x5ade24)return console[_0x325b58(0x19c)](a55_0x47a174['red']('Error:'),_0x325b58(0xfa)),console['error'](a55_0x47a174['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x5ade24;}[a55_0x5029cc(0x1e1)](_0x3281d4,_0x2a5c73){const _0x4360fc=a55_0x5029cc;if(_0x3281d4[0x0]){const _0x54473d=_0x3281d4[0x0][_0x4360fc(0x12e)]('.');if(_0x54473d[_0x4360fc(0x1d7)]===0x1)return{'projectName':_0x54473d[0x0],'workflowName':undefined};else return _0x54473d[_0x4360fc(0x1d7)]===0x2?{'projectName':_0x54473d[0x0],'workflowName':_0x54473d[0x1]}:(console[_0x4360fc(0x19c)](a55_0x47a174[_0x4360fc(0x25a)](_0x4360fc(0x25b)),_0x4360fc(0x181)),null);}return{'projectName':_0x2a5c73[_0x4360fc(0x149)],'workflowName':undefined};}[a55_0x5029cc(0x13e)](_0x2c6bc3,_0x37ac53,_0xefcafc=0x0){const _0x33fe2f=a55_0x5029cc;if(_0x2c6bc3[_0xefcafc])return _0x2c6bc3[_0xefcafc];if(_0x37ac53[_0x33fe2f(0x149)]){const _0x3bf7f2=a55_0x4d0954[_0x33fe2f(0x1a6)](process[_0x33fe2f(0x20b)](),_0x33fe2f(0x204),_0x37ac53[_0x33fe2f(0x149)]);if(existsSync(a55_0x4d0954[_0x33fe2f(0x1a6)](_0x3bf7f2,_0x33fe2f(0xa7))))return _0x3bf7f2;}return undefined;}async[a55_0x5029cc(0xd3)](_0x1b31a5,_0x23931f,_0x1168ad){const _0x2aedbb=a55_0x5029cc;try{const _0x44f023=await _0x1b31a5[_0x2aedbb(0x1f9)][_0x2aedbb(0x204)](_0x23931f,{'limit':0x1});if(_0x44f023['length']>0x0){const _0x3310ea=_0x44f023[0x0]['id'],_0x72b4b3=getWorkflowUrl(_0x1168ad,_0x3310ea);console[_0x2aedbb(0x19c)](_0x2aedbb(0x1fb)+a55_0x47a174['cyan'](_0x72b4b3));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a55_0x5029cc(0x1c3);['description']='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a55_0x5029cc(0x196)](_0x2339a3){const _0x5a16f6=a55_0x5029cc,{options:_0x17aa7a,args:_0xd44a66,tdx:_0x1d6057}=_0x2339a3,_0x1c5c15=_0xd44a66[0x0],_0x1885df=_0x17aa7a[_0x5a16f6(0x189)];if(_0x1885df)return saveSessionContext({'workflow_project':undefined},_0x17aa7a[_0x5a16f6(0x1a2)]),console[_0x5a16f6(0x241)](a55_0x47a174[_0x5a16f6(0x1de)](_0x5a16f6(0x128))),0x0;if(!_0x1c5c15)return console['error'](a55_0x47a174['red'](_0x5a16f6(0x25b)),_0x5a16f6(0xfa)),console['error'](a55_0x47a174['dim'](_0x5a16f6(0x191))),console[_0x5a16f6(0x19c)](a55_0x47a174[_0x5a16f6(0x225)](_0x5a16f6(0x247))),0x1;const _0x33d826=await withSpinner(_0x5a16f6(0xe3)+_0x1c5c15+_0x5a16f6(0xf3),()=>_0x1d6057[_0x5a16f6(0x1f9)][_0x5a16f6(0x203)](_0x1c5c15),{'verbose':_0x17aa7a[_0x5a16f6(0x1af)]}),{name:_0x1e38a5}=_0x33d826[_0x5a16f6(0x1a8)];return saveSessionContext({'workflow_project':_0x1e38a5},_0x17aa7a[_0x5a16f6(0x1a2)]),console[_0x5a16f6(0x241)](a55_0x47a174[_0x5a16f6(0x1de)](_0x5a16f6(0x18d)+a55_0x47a174[_0x5a16f6(0x138)](_0x1e38a5))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x222);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x25c);async['execute'](_0x3fd2ca){const _0x4e6b28=a55_0x5029cc,{options:_0x5afb1b,args:_0x50ebc2,tdx:_0x5086a9}=_0x3fd2ca,_0x4a5827=_0x50ebc2[0x0];_0x5afb1b[_0x4e6b28(0x1af)]&&_0x4a5827&&console[_0x4e6b28(0x19c)](_0x4e6b28(0x142)+_0x4a5827);const _0x1e9ce0=await withSpinner(_0x4e6b28(0xbc),()=>_0x5086a9[_0x4e6b28(0x1f9)][_0x4e6b28(0xb9)](_0x4a5827,{'limit':_0x5afb1b[_0x4e6b28(0x1ec)]}),{'verbose':_0x5afb1b[_0x4e6b28(0x1af)]});let _0x334d80=_0x1e9ce0['data'];_0x334d80[_0x4e6b28(0xba)]((_0x69255c,_0x138c4c)=>_0x69255c['name'][_0x4e6b28(0xa8)](_0x138c4c[_0x4e6b28(0x260)]));const _0x53df40=_0x5afb1b[_0x4e6b28(0x1ec)]&&_0x334d80[_0x4e6b28(0x1d7)]>=_0x5afb1b[_0x4e6b28(0x1ec)]?a55_0x47a174[_0x4e6b28(0x225)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x4e6b28(0x19c)](_0x4e6b28(0xd4)+_0x334d80[_0x4e6b28(0x1d7)]+'\x20project'+(_0x334d80[_0x4e6b28(0x1d7)]!==0x1?'s':'')+_0x53df40);if(_0x5afb1b[_0x4e6b28(0xd1)]===_0x4e6b28(0xce)||_0x5afb1b[_0x4e6b28(0xd1)]===_0x4e6b28(0xf9)||_0x5afb1b[_0x4e6b28(0xd1)]==='table')await handleSDKOutput(_0x334d80,_0x5afb1b);else{if(_0x334d80[_0x4e6b28(0x1d7)]===0x0)_0x4a5827?console[_0x4e6b28(0x241)](_0x4e6b28(0xe1)+_0x4a5827):console['log'](_0x4e6b28(0x232));else{const _0x44b855=_0x334d80[_0x4e6b28(0x14d)](_0x2d9df6=>{const _0x97d7e3=_0x4e6b28,_0x963bc=_0x2d9df6[_0x97d7e3(0xcc)]?.[_0x97d7e3(0x22e)](_0x1b1641=>_0x1b1641[_0x97d7e3(0x114)]===_0x97d7e3(0x1ea)),_0x3fea7a=_0x963bc?a55_0x47a174[_0x97d7e3(0x225)](_0x97d7e3(0x19b)):'';return _0x97d7e3(0x254)+_0x2d9df6[_0x97d7e3(0x260)]+_0x3fea7a;});await writeOutput(_0x44b855[_0x4e6b28(0x1a6)]('\x0a'),_0x5afb1b[_0x4e6b28(0x1e7)],_0x4e6b28(0x210));}}return 0x0;}}function a55_0x4d42(){const _0x25b87f=['\x20(disabled)','Usage:\x20tdx\x20wf\x20use\x20<project>','sourceProjectName','No\x20sessions\x20with\x20timing\x20information','resolve','\x20\x20Next\x20run:\x20','execute','📋\x20','stringify','✔\x20Showing\x20','Invalid\x20format:\x20','\x20(system)','error','Params:\x20','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Status:\x20','\x20logs','session','follow','Disabling\x20schedule\x20#','\x20has\x20no\x20attempts','join','changes','data','all','LABEL_WIDTH_DIVISOR','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','sourceDir','indexOf','\x20\x20Session\x20context\x20set\x20to:\x20','verbose','slice','white','Cloning\x20to\x20','Total:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','ICON_WIDTH','attempts','unchanged','Writing\x20files...','workflow:run','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','existingProjectId','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','projectName','targetDir','padStart','project','from','workflow:use','No\x20sessions\x20found','\x20disabled\x20(','workflow:attempts','splice','No\x20sessions\x20found\x20in\x20project:\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','success','Killing\x20attempt...','Task\x20graph:','\x20\x20Project\x20ID:\x20','No\x20schedules\x20found','resumeFrom','preparePushProject','MAX_TASKS_DISPLAY','\x20tasks','✔\x20Workflow\x20run\x20started','Retrying\x20session...','getHours','\x20task','length','Parameters:','Schedule\x20ID\x20is\x20required','unknown','Deleting\x20project\x20','getSchedule','params','green','find','targetExists','parseProjectWorkflowPattern','renderTimeline','requireProject','\x20secret','MAX_LABEL_COUNT','getWorkflow','output','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','sys','trimEnd','limit','workflow:attempt','description','No\x20attempts\x20found\x20in\x20project:\x20','Workflow:','Force:\x20yes','\x0aFailed\x20to\x20fetch\x20attempt\x20data','\x20modified','hasChanges','Listing\x20workflow\x20attempts...','workflow:secrets:list','250qetTFX','finishedAt','workflow','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','\x20\x20Console:\x20','From\x20task:\x20','Fetching\x20schedule\x20#','relative','\x0aError:','✔\x20Pushed\x20','projectId','✔\x20Pull\x20complete','resolveProjectId','workflows','Getting\x20attempt\x20tasks...','message','retryAttemptName','workflow:secrets:delete','Workflow:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','cwd','Fetching\x20log\x20files...','table','workflow:pull','.\x20Expected\x20format:\x20KEY=VALUE','list','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','icon','No\x20sessions\x20found\x20for:\x20','modified','\x20\x20Location:\x20','\x20\x20New\x20attempt\x20ID:\x20','context','Key:\x20','Select\x20a\x20task\x20to\x20view\x20logs:','duration','✔\x20Downloaded\x20','1207952yyNvmr','workflow:schedule:disable','session:','nextRunTime','workflow:kill','push','workflow:projects','displayLine','autocomplete','dim','min','⚠\x20Showing\x20first\x20','Validation:\x20skipped','List\x20workflows','Auto-selected\x20latest\x20session:\x20','\x20unchanged','getTime','744WbQkZj','some','replace','\x20sessions\x20','planned','No\x20workflow\x20projects\x20found','/sessions/','...','select','Error:\x20Attempt\x20ID\x20is\x20required','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','Session\x20time:\x20','📅\x20#','Target\x20directory:\x20','Error:\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','index','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','fileCount','/app/workflows/','log','enableSchedule','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','No\x20workflow\x20sessions\x20found','getMonth','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Using\x20attempt\x20','revision:\x20','task','Project:\x20','session_id','Pull\x20workflow\x20project\x20to\x20local\x20folder','---\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','fullName','\x20\x20Session\x20ID:\x20','\x20workflow','\x0aDry\x20run\x20-\x20nothing\x20pushed','📁\x20','startTime','Include\x20retried:\x20yes','stat','✔\x20Push\x20complete','attemptId','red','Error:','List\x20all\x20workflow\x20projects','fileSize','Source\x20directory\x20is\x20required','executeDryRun','name','size','yes','ICON_SPACING','\x20(use\x20--limit\x20to\x20show\x20more)','1136705iwWdbq','Disable\x20a\x20workflow\x20schedule','\x20attempt','\x20\x20Files\x20extracted:\x20','\x20\x20Revision:\x20','🔄\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','List\x20workflow\x20attempts','retryAttempt','revision','isNewProject','kill','Failed\x20to\x20fetch\x20attempt\x20data','LABEL_MIN_SPACING','basename','Pushing\x20workflow\x20project...','✔\x20Schedule\x20found','Source\x20directory:\x20','status','\x20of\x20','\x0aClone\x20\x22','MIN_LABEL_COUNT','Attempt\x20ID:\x20','fs/promises','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Filter:\x20','parse','running','disabledAt','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','site','MAX_POLL_ITERATIONS','start','\x20\x20Source:\x20','workflow:schedule:enable','force','getMinutes','Listing\x20secrets...','Error:\x20Secret\x20key\x20is\x20required','text','No\x20workflow\x20tdx.json\x20found','6777702baGvOX','dryRun','tdx.json','localeCompare','lastAttempt','bold','repeat','floor','sessions','Loading\x20session...','filter','Error:\x20Invalid\x20parameter\x20format:\x20','workflow:retry','end','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20enabled\x20(','keys','Kill\x20a\x20running\x20attempt','\x20secrets...','projects','sort','Retry\x20a\x20session\x20or\x20attempt','Listing\x20workflow\x20projects...','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','✔\x20Project\x20updated','Listing\x20schedules...','Deleting\x20secret...','tasks','write','\x22\x20already\x20exists\x20(ID:\x20','Revision:\x20','rows','Pushing\x20project...','attempt:','\x0aApply\x20these\x20changes?','→\x20Project:\x20','Source\x20project:\x20','Resume\x20from:\x20','metadata','attempt','json','462107KqpzPU','Project\x20filter:\x20','format','workflow:tasks','showWorkflowConsoleUrl','✔\x20Found\x20','(unknown)','nextTime','resolveProject','listProjectSchedules','reason','pending','isDirectory','(use\x20--limit\x20to\x20see\x20more)',',\x20Workflow:\x20','done','includes','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20projects\x20match\x20pattern:\x20','listSecrets','Resolving\x20project\x20\x27','Select\x20a\x20workflow\x20to\x20run','toISOString','✔\x20Secret\x20\x27','Filter:\x20project=','Setting\x20','startedAt','Downloading\x20logs...','renderSingleTimeline','Attempt:\x20','/attempt/','includeSubtasks','Starting\x20workflow\x20run...','\x20next:\x20','sessionTime','\x20new','\x27...','every','round','newProjectName','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','workflow:workflows','jsonl','Project\x20name\x20is\x20required','\x0a⚠\x20Project\x20\x22','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','skipValidation','get','delete','path','\x20\x20Workflow:\x20','retrySession','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Key\x20cannot\x20be\x20empty','Retrying\x20attempt...','generateSessionTimelineRows','Analyzing\x20changes...','-\x20no\x20files\x20written','title','\x20-\x20','stdout','→\x20New\x20project:\x20','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','match','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','applyPullProject','key','\x0aPush\x20these\x20changes?','Expected\x20format:\x20--param\x20key=value','blue','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','max','type','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Dry\x20run:\x20yes','getFullYear','value','state','Updating\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Latest\x20session\x20has\x20no\x20attempt','createdAt','taskName','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','\x20from\x20session\x20','columns','✔\x20Workflow\x20project\x20context\x20cleared.','\x22\x20to\x20new\x20project\x20\x22','summary','workflow:sessions','download','TASK_NAME_WIDTH','split','\x20\x20Project:\x20','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','33999qYFGcr','Error:\x20Invalid\x20JSON\x20in\x20--params','updatedAt','No\x20attempts\x20found','\x20\x20Target:\x20','new','workflow:schedules','cyan','✔\x20Schedule\x20#','pollTimeline','workflowName','Project\x20directory:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','resolveProjectDir','now','group_error','Pulling\x20project\x20','Pattern:\x20','2946348WANAcG','startsWith','navigateSessionsInteractive','\x20\x20Attempt\x20ID:\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20deleted','workflowProject','Usage:\x20workflow:delete\x20<project-name-or-id>','✔\x20Retry\x20started','No\x20attempts\x20found\x20for:\x20','map','\x27\x20from\x20project\x20\x27','Show\x20specific\x20attempt\x20details','workflow:download','Listing\x20workflows...','logs','cancelRequested','pullProject','List\x20workflow\x20execution\x20sessions','fill','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','utf-8','Select\x20a\x20session\x20to\x20view\x20timeline:','isTTY','workflow:upload','workflow:secrets:set','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','executeCloneProject','buildTimelineData','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','New\x20project\x20name:\x20','toLowerCase','Cancelled','includeRetried','tdx\x20wf\x20attempt\x20','set','MAX_TIMELINE_WIDTH','has','total','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Warning:','Secrets\x20to\x20set:\x20','readFile','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','deleted','workflow:delete','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Error:\x20Project\x20name\x20is\x20required','Reason:\x20','renderSessionsTimeline','yellow','executePushProject','MIN_TIMELINE_WIDTH','\x1b[1A\x1b[2K','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Loading\x20sessions...','substring','workflow:timeline','config','Downloading\x20project\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','13047VObMsp','Source:\x20','sessionId','canceling','\x0aUpdate\x20existing\x20project\x20\x22','Tip:\x20cd\x20to\x20workflows/','window','clear','values','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','diff','✔\x20Workflow\x20project\x20set\x20to:\x20','-\x20nothing\x20pushed','getDate'];a55_0x4d42=function(){return _0x25b87f;};return a55_0x4d42();}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0xf8);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x229);async[a55_0x5029cc(0x196)](_0x54b656){const _0x475807=a55_0x5029cc,{options:_0x5dd604,args:_0x14b8dd,tdx:_0x278bf4}=_0x54b656,_0x968bba=this['resolveProject'](_0x14b8dd,_0x5dd604);_0x5dd604[_0x475807(0x1af)]&&_0x968bba&&console[_0x475807(0x19c)](_0x475807(0xd0)+_0x968bba);const _0x1b965e=await withSpinner(_0x475807(0x151),()=>_0x278bf4[_0x475807(0x1f9)][_0x475807(0x204)](_0x968bba,{'limit':_0x5dd604[_0x475807(0x1ec)]}),{'verbose':_0x5dd604['verbose']});let _0x253541=_0x1b965e[_0x475807(0x1a8)];_0x253541[_0x475807(0xba)]((_0x127f5a,_0x1aa919)=>{const _0x2f5765=_0x475807,_0x9af58e=_0x127f5a[_0x2f5765(0x260)][_0x2f5765(0xa8)](_0x1aa919[_0x2f5765(0x260)]);if(_0x9af58e!==0x0)return _0x9af58e;return(_0x127f5a[_0x2f5765(0x1c1)]?.[_0x2f5765(0x260)]||'')[_0x2f5765(0xa8)](_0x1aa919[_0x2f5765(0x1c1)]?.[_0x2f5765(0x260)]||'');});const _0x34bd01=_0x5dd604[_0x475807(0x1ec)]&&_0x253541[_0x475807(0x1d7)]>=_0x5dd604['limit']?a55_0x47a174['dim'](_0x475807(0x264)):'';console[_0x475807(0x19c)](_0x475807(0xd4)+_0x253541[_0x475807(0x1d7)]+_0x475807(0x252)+(_0x253541[_0x475807(0x1d7)]!==0x1?'s':'')+_0x34bd01);if(_0x5dd604[_0x475807(0xd1)]===_0x475807(0xce)||_0x5dd604[_0x475807(0xd1)]===_0x475807(0xf9)||_0x5dd604[_0x475807(0xd1)]===_0x475807(0x20d))await handleSDKOutput(_0x253541,_0x5dd604);else{if(_0x253541[_0x475807(0x1d7)]===0x0)_0x968bba?console['log']('No\x20workflows\x20found\x20in\x20project:\x20'+_0x968bba):console[_0x475807(0x241)]('No\x20workflows\x20found');else{const _0x57354a=_0x5dd604[_0x475807(0x9a)],_0x5d2b71=_0x253541[_0x475807(0x14d)](_0x451232=>{const _0x3bdd09=_0x475807,_0x38d8c0=a55_0x47a174[_0x3bdd09(0x225)]('#'+_0x451232['id']),_0x12de19=hyperlink(_0x38d8c0,getWorkflowUrl(_0x57354a,_0x451232['id'])),_0x2d3466=_0x451232[_0x3bdd09(0x1c1)]?.[_0x3bdd09(0x260)]?a55_0x47a174['dim']('\x20('+_0x451232[_0x3bdd09(0x1c1)]['name']+')'):'';return _0x3bdd09(0x197)+_0x12de19+'\x20'+_0x451232[_0x3bdd09(0x260)]+_0x2d3466;});await writeOutput(_0x5d2b71[_0x475807(0x1a6)]('\x0a'),_0x5dd604[_0x475807(0x1e7)],_0x475807(0x210));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x12b);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x155);async[a55_0x5029cc(0x196)](_0x343d9d){const _0x55caed=a55_0x5029cc,{options:_0x158bbe,args:_0xe60897,tdx:_0x307f2e}=_0x343d9d,_0x2b4ce0=this[_0x55caed(0x1e1)](_0xe60897,_0x158bbe);if(!_0x2b4ce0)return 0x1;const {projectName:_0x3f0461,workflowName:_0x17b5eb}=_0x2b4ce0;if(_0x158bbe[_0x55caed(0x1af)]){if(_0x3f0461&&_0x17b5eb)console[_0x55caed(0x19c)](_0x55caed(0x95)+_0x3f0461+'.'+_0x17b5eb);else _0x3f0461&&console[_0x55caed(0x19c)](_0x55caed(0xe7)+_0x3f0461);const _0x4fc0cf=_0x158bbe['status'];_0x4fc0cf&&console[_0x55caed(0x19c)](_0x55caed(0x1a0)+_0x4fc0cf);}let _0x258a64=0x28;if(process[_0x55caed(0x10d)][_0x55caed(0x15a)]&&!_0x158bbe['output']&&!_0x158bbe[_0x55caed(0xd1)]){const _0x2e7cc8=process[_0x55caed(0x10d)][_0x55caed(0xc5)]||0x28;_0x258a64=Math['max'](0x14,Math['floor'](_0x2e7cc8*0x2/0x3));}const _0x5f1876=_0x158bbe[_0x55caed(0x1ec)]||_0x258a64,_0x578055=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x307f2e[_0x55caed(0x1f9)][_0x55caed(0xad)]({'projectName':_0x3f0461,'workflowName':_0x17b5eb,'status':_0x158bbe[_0x55caed(0x8e)],'fromTime':_0x158bbe[_0x55caed(0x1c2)],'toTime':_0x158bbe['to'],'limit':_0x5f1876}),{'verbose':_0x158bbe[_0x55caed(0x1af)]}),_0x252848=_0x578055[_0x55caed(0x1a8)];_0x252848[_0x55caed(0xba)]((_0x447175,_0x651474)=>{const _0x412bba=_0x55caed,_0x1fca41=_0x447175['sessionTime']||'',_0x5583f5=_0x651474['sessionTime']||'';return _0x5583f5[_0x412bba(0xa8)](_0x1fca41);});_0x252848['length']>=_0x5f1876?console[_0x55caed(0x19c)](_0x55caed(0x199)+_0x252848[_0x55caed(0x1d7)]+_0x55caed(0x230)+a55_0x47a174[_0x55caed(0x225)](_0x55caed(0xdc))):console[_0x55caed(0x19c)](_0x55caed(0xd4)+_0x252848[_0x55caed(0x1d7)]+'\x20session'+(_0x252848[_0x55caed(0x1d7)]!==0x1?'s':''));if(_0x158bbe['format']===_0x55caed(0xce)||_0x158bbe[_0x55caed(0xd1)]===_0x55caed(0xf9)||_0x158bbe['format']==='table')await handleSDKOutput(_0x252848,_0x158bbe);else{if(!process[_0x55caed(0x10d)][_0x55caed(0x15a)]||_0x158bbe['output']){if(_0x252848[_0x55caed(0x1d7)]===0x0){if(_0x3f0461&&_0x17b5eb)console[_0x55caed(0x241)](_0x55caed(0x213)+_0x3f0461+'.'+_0x17b5eb);else _0x3f0461?console[_0x55caed(0x241)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x3f0461):console[_0x55caed(0x241)](_0x55caed(0x1c4));}else{const _0x1397b0=_0x158bbe['site'],_0x5f2a44=this[_0x55caed(0x174)](_0x252848,_0x1397b0);_0x158bbe[_0x55caed(0x1e7)]?await writeOutput(_0x5f2a44,_0x158bbe[_0x55caed(0x1e7)],_0x55caed(0x210)):console[_0x55caed(0x241)](_0x5f2a44);}!_0x3f0461&&(console[_0x55caed(0x19c)](''),console['error'](a55_0x47a174[_0x55caed(0x225)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x55caed(0x19c)](a55_0x47a174['dim'](_0x55caed(0x110))+'or'+a55_0x47a174[_0x55caed(0x225)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x252848['length']===0x0){if(_0x3f0461&&_0x17b5eb)console[_0x55caed(0x241)](_0x55caed(0x213)+_0x3f0461+'.'+_0x17b5eb);else _0x3f0461?console[_0x55caed(0x241)](_0x55caed(0x1c8)+_0x3f0461):console['log'](_0x55caed(0x1c4));}else await this[_0x55caed(0x145)](_0x252848,_0x343d9d,_0x3f0461);}}return 0x0;}[a55_0x5029cc(0x174)](_0x27654e,_0x2b1e84){const _0x1b9896=a55_0x5029cc,_0x32c06a=[],_0x4ef837=new Map();let _0xbd3678=Infinity,_0x500dd6=-Infinity;for(const _0x420b4e of _0x27654e){if(_0x420b4e[_0x1b9896(0xa9)]?.['createdAt']){const _0x563ba3=new Date(_0x420b4e['lastAttempt'][_0x1b9896(0x123)])[_0x1b9896(0x22c)](),_0xf881ac=_0x420b4e['lastAttempt'][_0x1b9896(0x1f8)]?new Date(_0x420b4e[_0x1b9896(0xa9)][_0x1b9896(0x1f8)])['getTime']():Date[_0x1b9896(0x13f)](),_0x398174=_0x420b4e[_0x1b9896(0x1c1)]?.[_0x1b9896(0x260)]||'(unknown)';!_0x4ef837[_0x1b9896(0x168)](_0x398174)&&_0x4ef837[_0x1b9896(0x166)](_0x398174,[]),_0x4ef837['get'](_0x398174)[_0x1b9896(0x221)]({'session':_0x420b4e,'startTime':_0x563ba3,'endTime':_0xf881ac,'duration':_0xf881ac-_0x563ba3}),_0xbd3678=Math['min'](_0xbd3678,_0x563ba3),_0x500dd6=Math[_0x1b9896(0x119)](_0x500dd6,_0xf881ac);}}if(_0x4ef837[_0x1b9896(0x261)]===0x0)return _0x1b9896(0x193);const _0x1d4997=process[_0x1b9896(0x10d)][_0x1b9896(0x127)]||0x78,_0x2ee07c=0x1e,_0x35ca5e=0x32,_0x4abb4c=0x4,_0x232cfa=Math[_0x1b9896(0x226)](_0x35ca5e,Math[_0x1b9896(0x119)](_0x2ee07c,Math['floor'](_0x1d4997*0.3))),_0x3985b0=_0x1d4997-_0x232cfa-TIMELINE_CONFIG['GUTTER']-0x3-_0x4abb4c,_0x49971e=_0x500dd6-_0xbd3678,_0x4bd963=_0x49971e/_0x232cfa,_0x346e72=renderTimeAxis({'startTime':_0xbd3678,'endTime':_0x500dd6,'durationMs':_0x49971e,'msPerChar':_0x4bd963},_0x232cfa),_0x1bd091=[];for(const _0x48e9d6 of _0x4ef837[_0x1b9896(0x18a)]()){_0x1bd091[_0x1b9896(0x221)](..._0x48e9d6);}_0x1bd091['sort']((_0x4c8114,_0x22caea)=>_0x22caea[_0x1b9896(0x255)]-_0x4c8114[_0x1b9896(0x255)]);const _0x385b8d=new Date(_0xbd3678),_0x598c2e=formatDate(_0x385b8d),_0x2fd4a7=_0x4abb4c+TIMELINE_CONFIG[_0x1b9896(0x1b5)]+TIMELINE_CONFIG['ICON_SPACING']+_0x3985b0,_0x3beb2e='\x20'[_0x1b9896(0xab)](_0x2fd4a7-_0x598c2e[_0x1b9896(0x1d7)]),_0x3090bd=_0x3beb2e+a55_0x47a174['dim'](_0x598c2e)+'\x20'+_0x346e72;_0x32c06a[_0x1b9896(0x221)](_0x3090bd);const _0x530493=0x16;let _0x5d6808=0x0;for(const _0xef7126 of _0x1bd091){const _0x23b3ca=_0xef7126[_0x1b9896(0x1a2)][_0x1b9896(0x1c1)]?.['name']||'?',_0x210ecc=Math[_0x1b9896(0x226)](stringWidth(_0x23b3ca),_0x530493);_0x5d6808=Math[_0x1b9896(0x119)](_0x5d6808,_0x210ecc);}for(const _0x32dc2b of _0x1bd091){const {session:_0x1329fb,startTime:_0x178fbe,endTime:_0x1f8308,duration:_0x1561bf}=_0x32dc2b,_0x11c4d4=_0x1329fb[_0x1b9896(0x1c1)]?.['id'],_0x3d859a=_0x1329fb['id'],_0x25fbb9=_0x1329fb[_0x1b9896(0x1c1)]?.[_0x1b9896(0x260)]||'?',_0x3d8ba1=_0x1329fb[_0x1b9896(0x1f9)]?.[_0x1b9896(0x260)]||'?';let _0xe31015,_0x415f2d;if(_0x1329fb['lastAttempt']){const _0x33ce99=_0x1329fb[_0x1b9896(0xa9)];!_0x33ce99[_0x1b9896(0xde)]?(_0xe31015=_0x33ce99[_0x1b9896(0x153)]?'🛑':'🔄',_0x415f2d=_0x33ce99['cancelRequested']?a55_0x47a174[_0x1b9896(0x175)]:a55_0x47a174[_0x1b9896(0x117)]):(_0xe31015=_0x33ce99[_0x1b9896(0x1ca)]?'✅':'❌',_0x415f2d=_0x33ce99[_0x1b9896(0x1ca)]?a55_0x47a174[_0x1b9896(0x1de)]:a55_0x47a174[_0x1b9896(0x25a)]);}else _0xe31015='⏳',_0x415f2d=a55_0x47a174[_0x1b9896(0x225)];const _0x565942='#'+_0x3d859a,_0x13f3d3=_0x11c4d4?hyperlink(_0x565942,getWorkflowSessionUrl(_0x2b1e84,_0x11c4d4,_0x3d859a)):_0x565942;let _0x5d770b=_0x25fbb9;stringWidth(_0x25fbb9)>_0x530493&&(_0x5d770b=_0x25fbb9[_0x1b9896(0x1b0)](0x0,_0x530493-0x1)+'…');const _0x549e3a=a55_0x47a174['dim'](_0x5d770b),_0x3fbe28=stringWidth(_0x5d770b),_0x326272='\x20'[_0x1b9896(0xab)](_0x5d6808-stringWidth(_0x5d770b)+0x2),_0x5e030c='('+formatElapsed(_0x1561bf)+')',_0x3eeb6a=stringWidth(_0x5e030c),_0x5772b4=stringWidth(_0x565942),_0x37ce29=_0x5772b4+0x1+_0x3fbe28+_0x326272[_0x1b9896(0x1d7)],_0x1822ef=_0x3985b0-_0x37ce29-_0x3eeb6a-0x1-0x8;let _0x98388d=_0x3d8ba1;stringWidth(_0x98388d)>_0x1822ef&&(_0x98388d=_0x98388d[_0x1b9896(0x1b0)](0x0,_0x1822ef-0x1)+'…');const _0x6593da=_0x13f3d3+'\x20'+_0x549e3a+_0x326272+_0x98388d,_0x3a0b6c=stringWidth(_0x6593da),_0x43ad36=_0x3985b0-_0x3a0b6c-_0x3eeb6a,_0x1b4a43=_0x6593da+'\x20'[_0x1b9896(0xab)](Math['max'](0x1,_0x43ad36))+a55_0x47a174['dim'](_0x5e030c),_0x524e37=Math[_0x1b9896(0xac)]((_0x178fbe-_0xbd3678)/_0x4bd963),_0x25f5e8=Math[_0x1b9896(0xac)]((_0x1f8308-_0xbd3678)/_0x4bd963),_0x52a8a4=Math[_0x1b9896(0x119)](_0x524e37+0x1,_0x25f5e8),_0x1bd354=new Array(_0x232cfa)[_0x1b9896(0x156)]('\x20');for(let _0xc9defd=_0x524e37;_0xc9defd<Math[_0x1b9896(0x226)](_0x52a8a4,_0x232cfa);_0xc9defd++){_0x1bd354[_0xc9defd]='─';}const _0x26f14a=_0x1bd354[_0x1b9896(0x14d)](_0x6915a5=>_0x6915a5==='\x20'?'\x20':_0x415f2d(_0x6915a5))[_0x1b9896(0x1a6)]('');_0x32c06a[_0x1b9896(0x221)](_0xe31015+'\x20'+_0x1b4a43+'│'+_0x26f14a+'│');}return _0x32c06a[_0x1b9896(0x1a6)]('\x0a');}async[a55_0x5029cc(0x145)](_0x4a7d54,_0x34c98a,_0x117498){const _0x5a0f00=a55_0x5029cc,{options:_0x369db1,tdx:_0x1412af}=_0x34c98a,_0x1ae477=_0x369db1['site'],{timelineRows:_0x57ef70,timeAxisHeader:_0x1a6890}=this['generateSessionTimelineRows'](_0x4a7d54,_0x1ae477),_0x3be1a8=_0x57ef70['filter'](_0x1b71f8=>_0x1b71f8[_0x5a0f00(0x259)]);if(_0x3be1a8['length']===0x0){const _0xe73db=this['renderSessionsTimeline'](_0x4a7d54,_0x1ae477);console[_0x5a0f00(0x241)](_0xe73db);!_0x117498&&(console[_0x5a0f00(0x19c)](''),console[_0x5a0f00(0x19c)](a55_0x47a174[_0x5a0f00(0x225)](_0x5a0f00(0xbd))),console[_0x5a0f00(0x19c)](a55_0x47a174[_0x5a0f00(0x225)](_0x5a0f00(0x110))+'or'+a55_0x47a174['dim'](_0x5a0f00(0xe0))));return;}_0x1a6890&&console[_0x5a0f00(0x241)](_0x1a6890);const _0x57585a=_0x57ef70[_0x5a0f00(0xaf)](_0x33b74a=>_0x33b74a[_0x5a0f00(0x259)])[_0x5a0f00(0x14d)](_0x7aac89=>({'title':_0x7aac89[_0x5a0f00(0x223)],'value':_0x7aac89[_0x5a0f00(0x259)]})),_0xec5390=process[_0x5a0f00(0x10d)][_0x5a0f00(0xc5)]||0x3c,_0x55c8b3=Math['max'](0x28,Math[_0x5a0f00(0xac)](_0xec5390*0x2/0x3)),_0x142439=await a55_0x110a93({'type':_0x5a0f00(0x224),'name':_0x5a0f00(0x259),'message':_0x5a0f00(0x26b),'choices':_0x57585a,'initial':-0x1,'limit':_0x55c8b3,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x56301c,_0x431ffb)=>{const _0x4b92d0=_0x5a0f00;if(!_0x56301c)return Promise[_0x4b92d0(0x194)](_0x431ffb);const _0x527c13=_0x431ffb['filter'](_0x2b3e63=>{const _0x5df0be=_0x4b92d0,_0x383640=_0x2b3e63;return _0x383640[_0x5df0be(0x10b)]['toLowerCase']()['includes'](_0x56301c[_0x5df0be(0x162)]());});return Promise[_0x4b92d0(0x194)](_0x527c13);}}),_0x43d14e=()=>{const _0x3680cd=_0x5a0f00;process[_0x3680cd(0x10d)][_0x3680cd(0xc2)](_0x3680cd(0x178)),process[_0x3680cd(0x10d)][_0x3680cd(0xc2)](_0x3680cd(0x178)),process['stdout'][_0x3680cd(0xc2)]('\x1b[1A\x1b[2K');},_0x1d6bd1=_0x142439&&_0x142439[_0x5a0f00(0x259)]&&_0x142439[_0x5a0f00(0x259)]!==null&&_0x142439[_0x5a0f00(0x259)]['trim']()!=='';if(!_0x1d6bd1){_0x43d14e(),console[_0x5a0f00(0x241)](a55_0x47a174[_0x5a0f00(0x225)](_0x5a0f00(0x163)));return;}_0x43d14e();const _0x50042c=_0x4a7d54[_0x5a0f00(0x1df)](_0x3a93a4=>_0x3a93a4[_0x5a0f00(0xa9)]?.['id']===_0x142439[_0x5a0f00(0x259)]);if(_0x50042c){const _0x5975e1=_0x50042c[_0x5a0f00(0x1c1)]?.[_0x5a0f00(0x260)]||'?',_0x537b34=_0x50042c[_0x5a0f00(0x1f9)]?.['name']||'?';console[_0x5a0f00(0x241)](_0x5a0f00(0x24b)+a55_0x47a174[_0x5a0f00(0x225)](_0x5975e1)+_0x5a0f00(0xdd)+a55_0x47a174[_0x5a0f00(0x225)](_0x537b34));}const _0x4350a4=new WorkflowTimelineCommand();await _0x4350a4[_0x5a0f00(0x196)]({'args':[],'options':{..._0x369db1,'attemptId':_0x142439[_0x5a0f00(0x259)]},'tdx':_0x1412af});}[a55_0x5029cc(0x108)](_0x48e121,_0x23fc26){const _0x1a1a88=a55_0x5029cc,_0xd77d2=new Map();for(const _0x2f25dc of _0x48e121){_0x2f25dc['id']&&_0x2f25dc['lastAttempt']?.['id']&&_0xd77d2['set'](_0x2f25dc['id'],_0x2f25dc['lastAttempt']['id']);}const _0x3bdd3f=[];let _0x1d7bea='';const _0x4b238c=this['renderSessionsTimeline'](_0x48e121,_0x23fc26),_0x1406b3=_0x4b238c[_0x1a1a88(0x12e)]('\x0a');for(const _0x585c5e of _0x1406b3){if(_0x585c5e[_0x1a1a88(0x144)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x585c5e[_0x1a1a88(0x111)](/^\s+\d{4}-\d{2}-\d{2}/))_0x1d7bea=_0x585c5e;else{if(_0x585c5e['match'](/^[✅❌🔄🛑⏳]/)){const _0x239a17=_0x585c5e['match'](/#(\d+)/),_0x39b589=_0x239a17?_0x239a17[0x1]:null,_0xf1c38c=_0x39b589?_0xd77d2[_0x1a1a88(0xfe)](_0x39b589)||null:null,_0x1a9409=_0x48e121[_0x1a1a88(0x1df)](_0x3967c5=>_0x3967c5['id']===_0x39b589),_0x559aa5=_0x1a9409?.[_0x1a1a88(0x1c1)]?.[_0x1a1a88(0x260)]||'';_0x3bdd3f[_0x1a1a88(0x221)]({'displayLine':_0x585c5e,'attemptId':_0xf1c38c,'projectName':_0x559aa5});}}}return{'timelineRows':_0x3bdd3f,'timeAxisHeader':_0x1d7bea};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x1c6);['description']=a55_0x5029cc(0x26c);async[a55_0x5029cc(0x196)](_0x2d5043){const _0x20f5ab=a55_0x5029cc,{options:_0x2b3bde,args:_0x58ed8b,tdx:_0x5164c1}=_0x2d5043,_0x257ffd=this['parseProjectWorkflowPattern'](_0x58ed8b,_0x2b3bde);if(!_0x257ffd)return 0x1;const {projectName:_0x4916cb,workflowName:_0x4152c2}=_0x257ffd,_0x121ef8=_0x2b3bde[_0x20f5ab(0x164)];if(_0x2b3bde[_0x20f5ab(0x1af)]){if(_0x4916cb&&_0x4152c2)console[_0x20f5ab(0x19c)](_0x20f5ab(0x95)+_0x4916cb+'.'+_0x4152c2);else _0x4916cb&&console[_0x20f5ab(0x19c)](_0x20f5ab(0xe7)+_0x4916cb);_0x121ef8&&console[_0x20f5ab(0x19c)](_0x20f5ab(0x256));}const _0x3b2bca=await withSpinner(_0x20f5ab(0x1f5),()=>_0x5164c1['workflow'][_0x20f5ab(0x1b6)]({'projectName':_0x4916cb,'workflowName':_0x4152c2,'includeRetried':_0x121ef8,'limit':_0x2b3bde[_0x20f5ab(0x1ec)]}),{'verbose':_0x2b3bde['verbose']}),_0x52b85e=_0x3b2bca[_0x20f5ab(0x1a8)],_0x27871a=_0x2b3bde['limit']||0x64,_0x124e79=_0x52b85e[_0x20f5ab(0x1d7)]>=_0x27871a?a55_0x47a174[_0x20f5ab(0x225)](_0x20f5ab(0x264)):'';console[_0x20f5ab(0x19c)](_0x20f5ab(0xd4)+_0x52b85e[_0x20f5ab(0x1d7)]+_0x20f5ab(0x267)+(_0x52b85e['length']!==0x1?'s':'')+_0x124e79);if(_0x2b3bde['format']==='json'||_0x2b3bde['format']===_0x20f5ab(0xf9)||_0x2b3bde[_0x20f5ab(0xd1)]===_0x20f5ab(0x20d))await handleSDKOutput(_0x52b85e,_0x2b3bde);else{if(_0x52b85e[_0x20f5ab(0x1d7)]===0x0){if(_0x4916cb&&_0x4152c2)console[_0x20f5ab(0x241)](_0x20f5ab(0x14c)+_0x4916cb+'.'+_0x4152c2);else _0x4916cb?console[_0x20f5ab(0x241)](_0x20f5ab(0x1ef)+_0x4916cb):console[_0x20f5ab(0x241)](_0x20f5ab(0x134));}else{const _0x3177b9=_0x2b3bde[_0x20f5ab(0x9a)],_0x21fdd0=_0x52b85e['map'](_0x65614b=>{const _0xd1dd4c=_0x20f5ab,_0x50209d=a55_0x47a174[_0xd1dd4c(0x225)]('#'+_0x65614b['id']),_0x1a23dd=_0x65614b[_0xd1dd4c(0x1c1)]?.['id'],_0x4e1b6b=_0x65614b[_0xd1dd4c(0x24c)]||_0x65614b['sessionId'],_0x95ebd5=_0x1a23dd&&_0x4e1b6b?hyperlink(_0x50209d,getWorkflowAttemptUrl(_0x3177b9,_0x1a23dd,_0x4e1b6b,_0x65614b['id'])):_0x50209d,{icon:_0x4f29fa,text:_0x3bed7b}=getAttemptStatusDisplay(_0x65614b),_0x547ef7=(_0x65614b[_0xd1dd4c(0x1c1)]?.['name']||'?')+'.'+(_0x65614b[_0xd1dd4c(0x1f9)]?.[_0xd1dd4c(0x260)]||'?'),_0x14d525=_0x65614b['sessionTime']?a55_0x47a174['dim'](_0x65614b['sessionTime']):'';return(_0x95ebd5+'\x20'+_0x4f29fa+(_0x3bed7b?'\x20'+_0x3bed7b:'')+'\x20'+_0x547ef7+'\x20'+_0x14d525)[_0xd1dd4c(0x1eb)]();});await writeOutput(_0x21fdd0[_0x20f5ab(0x1a6)]('\x0a'),_0x2b3bde[_0x20f5ab(0x1e7)],_0x20f5ab(0x210));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a55_0x5029cc(0x1ed);['description']=a55_0x5029cc(0x14f);async[a55_0x5029cc(0x196)](_0x50d556){const _0x43e893=a55_0x5029cc,{options:_0x2dd690,args:_0x4590de,tdx:_0x46fe33}=_0x50d556,_0x56b1f3=_0x4590de[0x0];if(!_0x56b1f3)return console[_0x43e893(0x19c)](_0x43e893(0x236)),0x1;_0x2dd690[_0x43e893(0x1af)]&&console[_0x43e893(0x19c)](_0x43e893(0x92)+_0x56b1f3);const _0x33279f=await withSpinner('Getting\x20attempt\x20details...',()=>_0x46fe33['workflow']['attempt'](_0x56b1f3),{'verbose':_0x2dd690[_0x43e893(0x1af)]}),_0x13ab76=_0x33279f['data'];let _0xc9ca16;!_0x13ab76[_0x43e893(0xde)]?_0xc9ca16=_0x13ab76[_0x43e893(0x153)]?_0x43e893(0x185):_0x43e893(0x97):_0xc9ca16=_0x13ab76[_0x43e893(0x1ca)]?'success':'error';let _0x230f63;if(_0x13ab76[_0x43e893(0x123)]&&_0x13ab76[_0x43e893(0x1f8)]){const _0x49a903=new Date(_0x13ab76['createdAt'])[_0x43e893(0x22c)](),_0x4b38df=new Date(_0x13ab76[_0x43e893(0x1f8)])[_0x43e893(0x22c)]();_0x230f63=Math[_0x43e893(0xf5)]((_0x4b38df-_0x49a903)/0x3e8);}const _0x5bbe07={'attempt_id':_0x13ab76['id'],'status':_0xc9ca16,..._0x13ab76[_0x43e893(0x23d)]!==undefined&&{'index':_0x13ab76['index']},..._0x13ab76[_0x43e893(0x1c1)]&&{'project':_0x13ab76[_0x43e893(0x1c1)][_0x43e893(0x260)]},..._0x13ab76['workflow']&&{'workflow':_0x13ab76[_0x43e893(0x1f9)][_0x43e893(0x260)]},..._0x13ab76['sessionId']&&{'session_id':_0x13ab76['sessionId']},..._0x13ab76[_0x43e893(0xf1)]&&{'session_time':_0x13ab76[_0x43e893(0xf1)]},..._0x13ab76[_0x43e893(0x207)]&&{'retry_attempt':_0x13ab76['retryAttemptName']},..._0x230f63!==undefined&&{'duration_sec':_0x230f63},..._0x13ab76['createdAt']&&{'created_at':_0x13ab76['createdAt']},..._0x13ab76[_0x43e893(0x1f8)]&&{'finished_at':_0x13ab76[_0x43e893(0x1f8)]},...Object[_0x43e893(0xb6)](_0x13ab76[_0x43e893(0x1dd)])[_0x43e893(0x1d7)]>0x0&&{'params':_0x13ab76[_0x43e893(0x1dd)]}};return await handleSingleObjectOutput(_0x5bbe07,_0x2dd690),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a55_0x5029cc(0xd2);[a55_0x5029cc(0x1ee)]='Show\x20tasks\x20for\x20an\x20attempt';async[a55_0x5029cc(0x196)](_0x6108be){const _0x444424=a55_0x5029cc,{options:_0x8d628f,args:_0x1ca4b8,tdx:_0x2c1622}=_0x6108be,_0x226640=_0x1ca4b8[0x0];if(!_0x226640)return console[_0x444424(0x19c)](_0x444424(0x236)),0x1;const _0x59a577=_0x8d628f[_0x444424(0xee)];_0x8d628f['verbose']&&(console['error'](_0x444424(0x92)+_0x226640),_0x59a577&&console[_0x444424(0x19c)]('Including\x20subtasks:\x20yes'));const _0x42601a=await withSpinner(_0x444424(0x205),()=>_0x2c1622[_0x444424(0x1f9)][_0x444424(0xc1)](_0x226640,_0x59a577||![]),{'verbose':_0x8d628f[_0x444424(0x1af)]}),_0x14189b=_0x42601a[_0x444424(0x1a8)];return console[_0x444424(0x19c)](_0x444424(0xd4)+_0x14189b[_0x444424(0x1d7)]+_0x444424(0x1d6)+(_0x14189b[_0x444424(0x1d7)]!==0x1?'s':'')),await handleSDKOutput(_0x14189b,_0x8d628f),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x5029cc(0x260)]='workflow:logs';['description']=a55_0x5029cc(0x104);async[a55_0x5029cc(0x196)](_0x29e0ca){const _0x1f5dfd=a55_0x5029cc,{options:_0x2b43f5,args:_0x4e80de,tdx:_0x35fbcc}=_0x29e0ca,_0x1bb715=_0x4e80de[0x0];let _0x4aa4a7=_0x4e80de[0x1];if(!_0x1bb715)return console[_0x1f5dfd(0x19c)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x2b43f5[_0x1f5dfd(0x1af)]&&(console[_0x1f5dfd(0x19c)](_0x1f5dfd(0x92)+_0x1bb715),_0x4aa4a7&&console['error']('Task\x20name:\x20'+_0x4aa4a7));const _0x2f7da5=await withSpinner(_0x1f5dfd(0x20c),()=>_0x35fbcc['workflow']['logFiles'](_0x1bb715,_0x4aa4a7),{'verbose':_0x2b43f5[_0x1f5dfd(0x1af)]}),_0x192ea2=_0x2f7da5[_0x1f5dfd(0x1a8)];if(_0x192ea2['length']===0x0)return console['error'](_0x1f5dfd(0x19f)),0x0;if(!_0x4aa4a7&&(_0x2b43f5[_0x1f5dfd(0xce)]||_0x2b43f5['format']))return await handleSDKOutput(_0x192ea2,_0x2b43f5),0x0;if(!_0x4aa4a7){const _0x24d9b8=_0x192ea2[_0x1f5dfd(0x14d)](_0x1df35e=>({'title':_0x1df35e[_0x1f5dfd(0x124)]+'\x20('+formatBytes(_0x1df35e[_0x1f5dfd(0x25d)])+')','value':_0x1df35e[_0x1f5dfd(0x124)]})),_0x486174=await a55_0x110a93({'type':_0x1f5dfd(0x235),'name':_0x1f5dfd(0x24a),'message':_0x1f5dfd(0x219),'choices':_0x24d9b8});if(!_0x486174['task'])return console[_0x1f5dfd(0x19c)](_0x1f5dfd(0x163)),0x0;_0x4aa4a7=_0x486174[_0x1f5dfd(0x24a)];}const _0x5f58e7=await withSpinner(_0x1f5dfd(0xea),()=>_0x35fbcc[_0x1f5dfd(0x1f9)][_0x1f5dfd(0x152)](_0x1bb715,_0x4aa4a7),{'verbose':_0x2b43f5['verbose']}),_0x2ef2ff=_0x5f58e7['data'];return _0x2ef2ff?console[_0x1f5dfd(0x241)](_0x2ef2ff):console[_0x1f5dfd(0x19c)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x220);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0xb7);async[a55_0x5029cc(0x196)](_0x42aca8){const _0x3dbce2=a55_0x5029cc,{options:_0x1c3c9c,args:_0x3524d3,tdx:_0x210d3a}=_0x42aca8,_0x5ef957=_0x3524d3[0x0];if(!_0x5ef957)return console[_0x3dbce2(0x19c)](_0x3dbce2(0x236)),0x1;const _0x2bc9f7=_0x1c3c9c[_0x3dbce2(0xd9)];_0x1c3c9c[_0x3dbce2(0x1af)]&&(console[_0x3dbce2(0x19c)](_0x3dbce2(0x92)+_0x5ef957),_0x2bc9f7&&console[_0x3dbce2(0x19c)](_0x3dbce2(0x173)+_0x2bc9f7));if(!_0x1c3c9c['yes']){if(!isInteractive())return console[_0x3dbce2(0x19c)](a55_0x47a174[_0x3dbce2(0x25a)](_0x3dbce2(0x1ff)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a55_0x47a174[_0x3dbce2(0x225)](_0x3dbce2(0x24f))),0x1;const _0x517b41=await confirmKey(_0x3dbce2(0x171)+_0x5ef957+'?');if(!_0x517b41)return console[_0x3dbce2(0x19c)](a55_0x47a174['yellow']('Cancelled')),0x1;}const _0x167779=await withSpinner(_0x3dbce2(0x1cb),()=>_0x210d3a['workflow'][_0x3dbce2(0x270)](_0x5ef957,_0x2bc9f7),{'verbose':_0x1c3c9c[_0x3dbce2(0x1af)]}),_0xcf5dc4=_0x167779['data'];return console[_0x3dbce2(0x19c)]('✔\x20'+_0xcf5dc4),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0xb1);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0xbb);async[a55_0x5029cc(0x196)](_0x15fc86){const _0x478d08=a55_0x5029cc,{options:_0x1f5469,args:_0x36aadf,tdx:_0x4f4425}=_0x15fc86,_0x55b196=_0x36aadf[0x0];if(!_0x55b196)return console[_0x478d08(0x19c)](_0x478d08(0x121)),console[_0x478d08(0x19c)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x4f5e02=![],_0x47ac40=_0x55b196;if(_0x55b196[_0x478d08(0x144)](_0x478d08(0x21e)))_0x4f5e02=!![],_0x47ac40=_0x55b196[_0x478d08(0x17d)](0x8);else{if(_0x55b196[_0x478d08(0x144)](_0x478d08(0xc7)))_0x4f5e02=![],_0x47ac40=_0x55b196[_0x478d08(0x17d)](0x8);else return console[_0x478d08(0x19c)](_0x478d08(0xb4)),console[_0x478d08(0x19c)](_0x478d08(0x1bd)),0x1;}const _0x404813=_0x1f5469['fromTask'],_0x87f14=_0x1f5469[_0x478d08(0x1cf)],_0x55ef05=_0x1f5469[_0x478d08(0x1dd)],_0x1e491f=_0x1f5469[_0x478d08(0x9f)];_0x1f5469[_0x478d08(0x1af)]&&(console[_0x478d08(0x19c)]('Target:\x20'+(_0x4f5e02?_0x478d08(0x1a2):'attempt')+'\x20'+_0x47ac40),_0x404813&&console['error'](_0x478d08(0x1fc)+_0x404813),_0x87f14&&console[_0x478d08(0x19c)](_0x478d08(0xcb)+_0x87f14),_0x55ef05&&console[_0x478d08(0x19c)](_0x478d08(0x19d)+_0x55ef05),_0x1e491f&&console[_0x478d08(0x19c)](_0x478d08(0x1f1)));let _0x4d7a33;if(_0x55ef05)try{if(_0x55ef05[_0x478d08(0x144)]('@')){const _0x5c7a6d=await import(_0x478d08(0x93)),_0x171f70=_0x55ef05[_0x478d08(0x17d)](0x1),_0xab503f=await _0x5c7a6d[_0x478d08(0x16d)](_0x171f70,_0x478d08(0x158));_0x4d7a33=JSON[_0x478d08(0x96)](_0xab503f);}else _0x4d7a33=JSON[_0x478d08(0x96)](_0x55ef05);}catch{return console[_0x478d08(0x19c)](_0x478d08(0x132)),0x1;}if(!_0x1f5469[_0x478d08(0x262)]){if(!isInteractive())return console['error'](a55_0x47a174[_0x478d08(0x25a)](_0x478d08(0x1ff)),_0x478d08(0xb3)),console[_0x478d08(0x19c)](a55_0x47a174[_0x478d08(0x225)](_0x478d08(0x24f))),0x1;const _0x61e705=await confirmKey(_0x478d08(0x99)+(_0x4f5e02?'session':_0x478d08(0xcd))+'\x20'+_0x47ac40+'?');if(!_0x61e705)return console[_0x478d08(0x19c)](a55_0x47a174['yellow'](_0x478d08(0x163))),0x1;}let _0x103087;_0x4f5e02?_0x103087=await withSpinner(_0x478d08(0x1d4),()=>_0x4f4425[_0x478d08(0x1f9)][_0x478d08(0x102)](_0x47ac40,{'fromTask':_0x404813,'retryParams':_0x4d7a33}),{'verbose':_0x1f5469[_0x478d08(0x1af)]}):_0x103087=await withSpinner(_0x478d08(0x107),()=>_0x4f4425[_0x478d08(0x1f9)][_0x478d08(0x26d)](_0x47ac40,{'resumeFrom':_0x87f14,'retryParams':_0x4d7a33,'force':_0x1e491f}),{'verbose':_0x1f5469[_0x478d08(0x1af)]});const _0x31b04d=_0x103087[_0x478d08(0x1a8)];return console[_0x478d08(0x19c)](_0x478d08(0x14b)),console[_0x478d08(0x19c)](_0x478d08(0x216)+_0x31b04d[_0x478d08(0x259)]),console['error'](_0x478d08(0x251)+_0x31b04d['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x1b9);[a55_0x5029cc(0x1ee)]='Start\x20a\x20workflow\x20run';async[a55_0x5029cc(0x196)](_0x1a1b47){const _0x14714a=a55_0x5029cc,{options:_0x38efbf,args:_0x5c693c,tdx:_0x4ff4f9}=_0x1a1b47;let _0xe0a92e=_0x5c693c[0x0];if(!_0xe0a92e){const _0x1c534b=this['resolveProject']([],_0x38efbf),_0x27339f=await withSpinner('Loading\x20workflows...',()=>_0x4ff4f9[_0x14714a(0x1f9)][_0x14714a(0x204)](_0x1c534b,{'limit':_0x38efbf[_0x14714a(0x1ec)]}),{'verbose':_0x38efbf[_0x14714a(0x1af)]}),_0x2658b2=_0x27339f[_0x14714a(0x1a8)];if(_0x2658b2[_0x14714a(0x1d7)]===0x0)return console[_0x14714a(0x19c)]('No\x20workflows\x20found'),!_0x1c534b&&console[_0x14714a(0x19c)](a55_0x47a174[_0x14714a(0x225)](_0x14714a(0x1e9))),0x1;const _0x533e03=_0x2658b2[_0x14714a(0x14d)](_0x53a5d5=>({'title':_0x53a5d5[_0x14714a(0x1c1)]?.['name']+'.'+_0x53a5d5['name'],'value':_0x53a5d5[_0x14714a(0x1c1)]?.[_0x14714a(0x260)]+'.'+_0x53a5d5['name'],'description':_0x53a5d5[_0x14714a(0x26e)]?_0x14714a(0x249)+_0x53a5d5['revision']:undefined})),_0x1f9e3e=await a55_0x110a93({'type':'select','name':_0x14714a(0x1f9),'message':_0x14714a(0xe4),'choices':_0x533e03});if(!_0x1f9e3e[_0x14714a(0x1f9)])return 0x1;_0xe0a92e=_0x1f9e3e[_0x14714a(0x1f9)];}if(!_0xe0a92e[_0x14714a(0xdf)]('.')){const _0x364526=this['resolveProject']([],_0x38efbf);if(_0x364526)_0xe0a92e=_0x364526+'.'+_0xe0a92e;else return console[_0x14714a(0x19c)](a55_0x47a174['red'](_0x14714a(0x25b)),_0x14714a(0x1bc)),console[_0x14714a(0x19c)](a55_0x47a174[_0x14714a(0x225)](_0x14714a(0x1e9))),0x1;}const _0x3df1ea=_0x38efbf['param'],_0xbfeb29=_0x38efbf['sessionTime'],_0x117e82={};if(_0x3df1ea&&Array['isArray'](_0x3df1ea))for(const _0x3edddc of _0x3df1ea){const _0x40685e=_0x3edddc['indexOf']('=');if(_0x40685e===-0x1)return console['error'](_0x14714a(0xb0)+_0x3edddc),console[_0x14714a(0x19c)](_0x14714a(0x116)),0x1;const _0x33aa5c=_0x3edddc['substring'](0x0,_0x40685e),_0x3740eb=_0x3edddc[_0x14714a(0x17d)](_0x40685e+0x1);try{_0x117e82[_0x33aa5c]=JSON[_0x14714a(0x96)](_0x3740eb);}catch{_0x117e82[_0x33aa5c]=_0x3740eb;}}_0x38efbf[_0x14714a(0x1af)]&&(console['error'](_0x14714a(0x209)+_0xe0a92e),Object[_0x14714a(0xb6)](_0x117e82)[_0x14714a(0x1d7)]>0x0&&console[_0x14714a(0x19c)]('Parameters:\x20'+JSON[_0x14714a(0x198)](_0x117e82)),_0xbfeb29&&console[_0x14714a(0x19c)](_0x14714a(0x238)+_0xbfeb29));if(_0x38efbf[_0x14714a(0xa6)])return await this[_0x14714a(0x25f)](_0x1a1b47,_0xe0a92e,_0x117e82,_0xbfeb29);const _0x4f78b3=await withSpinner(_0x14714a(0xef),()=>_0x4ff4f9[_0x14714a(0x1f9)]['run'](_0xe0a92e,_0x117e82,{'sessionTime':_0xbfeb29}),{'verbose':_0x38efbf[_0x14714a(0x1af)]}),_0x1cd4a1=_0x4f78b3[_0x14714a(0x1a8)];console['error'](_0x14714a(0x1d3)),console[_0x14714a(0x19c)](_0x14714a(0x146)+_0x1cd4a1['id']),console[_0x14714a(0x19c)](_0x14714a(0x251)+_0x1cd4a1[_0x14714a(0x184)]),console[_0x14714a(0x19c)](_0x14714a(0x12f)+_0x1cd4a1[_0x14714a(0x1c1)]?.[_0x14714a(0x260)]),console[_0x14714a(0x19c)](_0x14714a(0x101)+_0x1cd4a1[_0x14714a(0x1f9)]?.[_0x14714a(0x260)]);if(_0x1cd4a1[_0x14714a(0x1c1)]?.['id']&&_0x1cd4a1['sessionId']&&_0x1cd4a1['id']){const _0x8712b4=_0x38efbf[_0x14714a(0x9a)],_0xa1bbe6=getConsoleUrl(_0x8712b4,_0x14714a(0x240)+_0x1cd4a1['project']['id']+_0x14714a(0x233)+_0x1cd4a1[_0x14714a(0x184)]+_0x14714a(0xed)+_0x1cd4a1['id']);console['error'](_0x14714a(0x1fb)+a55_0x47a174[_0x14714a(0x138)](_0xa1bbe6));}return 0x0;}async[a55_0x5029cc(0x25f)](_0x1b4cc5,_0x39e713,_0xe9d359,_0x21f643){const _0x214bb7=a55_0x5029cc,{options:_0x32e0f4,tdx:_0x43fc92}=_0x1b4cc5,_0xca7a7e=await withSpinner('Fetching\x20workflow\x20'+_0x39e713+_0x214bb7(0x234),()=>_0x43fc92[_0x214bb7(0x1f9)][_0x214bb7(0x1e6)](_0x39e713),{'verbose':_0x32e0f4['verbose']}),_0x1dc070=_0xca7a7e[_0x214bb7(0x1a8)],_0x4baaef=_0x21f643??new Date()[_0x214bb7(0xe5)]();console['log'](a55_0x47a174[_0x214bb7(0xaa)](_0x214bb7(0x1f0)),_0x39e713),console[_0x214bb7(0x241)](a55_0x47a174[_0x214bb7(0xaa)]('Session\x20time:'),_0x4baaef),console['log'](a55_0x47a174['bold'](_0x214bb7(0x1d8)),JSON['stringify'](_0xe9d359)),console[_0x214bb7(0x241)](''),console[_0x214bb7(0x241)](a55_0x47a174[_0x214bb7(0xaa)](_0x214bb7(0x1cc)));const _0xe08b91=parseTaskGraph(_0x1dc070[_0x214bb7(0x17f)]??null);if(_0xe08b91['length']===0x0)console[_0x214bb7(0x241)](a55_0x47a174['dim'](_0x214bb7(0x1ba)));else for(const _0x54a7fe of formatTaskGraph(_0xe08b91)){console[_0x214bb7(0x241)](_0x54a7fe);}const _0x28ef99=summarizeTaskGraph(_0xe08b91),_0x1072de=formatWarningSummary(_0x28ef99);return _0x1072de&&(console['log'](''),console['log'](a55_0x47a174[_0x214bb7(0x175)](_0x1072de))),console[_0x214bb7(0x241)](a55_0x47a174[_0x214bb7(0x175)](_0x214bb7(0x237))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x150);[a55_0x5029cc(0x1ee)]='Download\x20workflow\x20project\x20from\x20Treasure\x20AI';async[a55_0x5029cc(0x196)](_0x46ecd3){const _0xcd37a6=a55_0x5029cc,{options:_0x3039a2,args:_0x41f9af,tdx:_0x390b92}=_0x46ecd3,_0x202ca2=_0x41f9af[0x0],_0x354e00=_0x41f9af[0x1]||'.';if(!_0x202ca2)return console[_0xcd37a6(0x19c)]('Error:\x20Project\x20name\x20is\x20required'),console[_0xcd37a6(0x19c)](_0xcd37a6(0x1b4)),0x1;const _0x240e08=_0x3039a2[_0xcd37a6(0x26e)];_0x3039a2[_0xcd37a6(0x1af)]&&(console[_0xcd37a6(0x19c)]('Project:\x20'+_0x202ca2),console['error']('Output\x20directory:\x20'+_0x354e00),_0x240e08&&console[_0xcd37a6(0x19c)]('Revision:\x20'+_0x240e08));const _0x55896d=await withSpinner(_0xcd37a6(0x180)+_0x202ca2+_0xcd37a6(0x234),()=>_0x390b92[_0xcd37a6(0x1f9)][_0xcd37a6(0x12c)](_0x202ca2,_0x354e00,{'revision':_0x240e08}),{'verbose':_0x3039a2[_0xcd37a6(0x1af)]}),_0x40c383=_0x55896d['data'];return console[_0xcd37a6(0x19c)](_0xcd37a6(0x21b)+_0x40c383['projectName']),console[_0xcd37a6(0x19c)](_0xcd37a6(0x269)+_0x40c383['revision']),console[_0xcd37a6(0x19c)](_0xcd37a6(0x268)+_0x40c383['filesExtracted']),console[_0xcd37a6(0x19c)]('\x20\x20Location:\x20'+_0x354e00+'/'+_0x40c383['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x15b);[a55_0x5029cc(0x1ee)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)';async[a55_0x5029cc(0x196)](_0x3d615e){const _0x2e6ce7=a55_0x5029cc,{options:_0x1f75b7,args:_0x1f56e1,tdx:_0x17cbf6}=_0x3d615e;let _0x1f9359='.',_0x508eba=_0x1f75b7['name'];if(_0x1f56e1[0x0]){const {promises:_0x586016}=await import('fs');try{const _0x184948=await _0x586016[_0x2e6ce7(0x257)](_0x1f56e1[0x0]);if(_0x184948[_0x2e6ce7(0xdb)]())_0x1f9359=_0x1f56e1[0x0];else return console[_0x2e6ce7(0x19c)](_0x2e6ce7(0x23b)+_0x1f56e1[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x508eba=_0x1f56e1[0x0],_0x1f9359='.';}}const _0x30d115=_0x1f75b7[_0x2e6ce7(0x26e)],_0x3dcc17=_0x1f75b7[_0x2e6ce7(0xfd)];_0x1f75b7[_0x2e6ce7(0x1af)]&&(console[_0x2e6ce7(0x19c)](_0x2e6ce7(0x13c)+_0x1f9359),_0x508eba&&console['error']('Project\x20name:\x20'+_0x508eba),_0x30d115&&console[_0x2e6ce7(0x19c)](_0x2e6ce7(0xc4)+_0x30d115),_0x3dcc17&&console[_0x2e6ce7(0x19c)]('Validation:\x20skipped'));const _0x31ea7f=await withSpinner(_0x2e6ce7(0x8b),()=>_0x17cbf6[_0x2e6ce7(0x1f9)][_0x2e6ce7(0x221)](_0x1f9359,{'projectName':_0x508eba,'revision':_0x30d115,'skipValidation':_0x3dcc17}),{'verbose':_0x1f75b7[_0x2e6ce7(0x1af)]}),_0x3c4d83=_0x31ea7f[_0x2e6ce7(0x1a8)];return console[_0x2e6ce7(0x19c)](_0x2e6ce7(0x200)+_0x3c4d83['projectName']),console[_0x2e6ce7(0x19c)](_0x2e6ce7(0x1cd)+_0x3c4d83[_0x2e6ce7(0x201)]),console[_0x2e6ce7(0x19c)]('\x20\x20Revision:\x20'+_0x3c4d83[_0x2e6ce7(0x26e)]),await this[_0x2e6ce7(0xd3)](_0x17cbf6,_0x3c4d83[_0x2e6ce7(0x1be)],_0x1f75b7[_0x2e6ce7(0x9a)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a55_0x5029cc(0x20e);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x24d);async[a55_0x5029cc(0x196)](_0x592239){const _0x3015f3=a55_0x5029cc,{options:_0x2e0004,args:_0x112fdd,tdx:_0x588042}=_0x592239,_0x3c2427=_0x112fdd[0x0],_0x232c17=_0x112fdd[0x1];if(!_0x3c2427)return console[_0x3015f3(0x19c)](a55_0x47a174['red'](_0x3015f3(0x25b)),'Project\x20name\x20is\x20required'),console[_0x3015f3(0x19c)](a55_0x47a174[_0x3015f3(0x225)](_0x3015f3(0xfc))),0x1;const _0x19c1a4=_0x2e0004['revision'];_0x2e0004[_0x3015f3(0x1af)]&&(console[_0x3015f3(0x19c)](_0x3015f3(0x24b)+_0x3c2427),_0x232c17&&console[_0x3015f3(0x19c)](_0x3015f3(0x23a)+_0x232c17),_0x19c1a4&&console[_0x3015f3(0x19c)](_0x3015f3(0xc4)+_0x19c1a4),_0x2e0004['dryRun']&&console['error'](_0x3015f3(0x11c)));const _0x2c5241=await withSpinner(_0x3015f3(0x141)+_0x3c2427+_0x3015f3(0x234),()=>_0x588042[_0x3015f3(0x1f9)][_0x3015f3(0x154)](_0x3c2427,{'targetDir':_0x232c17,'revision':_0x19c1a4}),{'verbose':_0x2e0004['verbose']}),_0x35813c=_0x2c5241['data'];_0x35813c[_0x3015f3(0x26f)]?console[_0x3015f3(0x19c)](_0x3015f3(0x10e)+_0x35813c[_0x3015f3(0x1be)]):console[_0x3015f3(0x19c)](_0x3015f3(0xc9)+_0x35813c[_0x3015f3(0x1be)]);console[_0x3015f3(0x19c)]('\x20\x20Revision:\x20'+_0x35813c[_0x3015f3(0x26e)]),console['error'](_0x3015f3(0x135)+(a55_0x4d0954[_0x3015f3(0x1fe)](process['cwd'](),_0x35813c[_0x3015f3(0x1bf)])||'.')),console['error']('\x20\x20Changes:\x20'+a55_0x47a174[_0x3015f3(0x1de)]('+'+_0x35813c[_0x3015f3(0x12a)][_0x3015f3(0x136)]+_0x3015f3(0xf2))+',\x20'+(a55_0x47a174[_0x3015f3(0x175)]('~'+_0x35813c[_0x3015f3(0x12a)][_0x3015f3(0x214)]+_0x3015f3(0x1f3))+',\x20')+(a55_0x47a174['red']('-'+_0x35813c['summary'][_0x3015f3(0x16f)]+'\x20deleted')+',\x20')+(''+a55_0x47a174[_0x3015f3(0x225)](_0x35813c[_0x3015f3(0x12a)][_0x3015f3(0x1b7)]+_0x3015f3(0x22b))));for(const _0x4a6ea5 of _0x35813c[_0x3015f3(0x1a7)]){_0x4a6ea5[_0x3015f3(0x11a)]===_0x3015f3(0x214)&&_0x4a6ea5[_0x3015f3(0x18c)]&&(console[_0x3015f3(0x19c)]('\x0a'+a55_0x47a174[_0x3015f3(0x138)](_0x3015f3(0x24e)+_0x4a6ea5[_0x3015f3(0x100)])),console['error'](_0x4a6ea5['diff']));}if(!_0x35813c[_0x3015f3(0x1f4)])return saveSessionContext({'workflow_project':_0x35813c[_0x3015f3(0x1be)]},_0x2e0004['session']),console[_0x3015f3(0x19c)](a55_0x47a174[_0x3015f3(0x1de)]('\x0a✔\x20Already\x20up\x20to\x20date')),console['error'](a55_0x47a174[_0x3015f3(0x225)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x35813c[_0x3015f3(0x1be)])),0x0;if(_0x2e0004[_0x3015f3(0xa6)])return console[_0x3015f3(0x19c)](a55_0x47a174['yellow'](_0x3015f3(0x13d))),0x0;if(!_0x2e0004['yes']){if(!isInteractive())return console[_0x3015f3(0x19c)](a55_0x47a174[_0x3015f3(0x25a)]('\x0aError:'),_0x3015f3(0xb3)),console[_0x3015f3(0x19c)](a55_0x47a174['dim'](_0x3015f3(0x24f))),0x1;const _0x4c2e10=await confirmKey(_0x3015f3(0xc8));if(!_0x4c2e10)return console[_0x3015f3(0x19c)](a55_0x47a174['yellow']('Cancelled'),_0x3015f3(0x10a)),0x1;}await withSpinner(_0x3015f3(0x1b8),()=>_0x588042[_0x3015f3(0x1f9)][_0x3015f3(0x113)](_0x35813c,{'revision':_0x19c1a4}),{'verbose':_0x2e0004[_0x3015f3(0x1af)]}),saveSessionContext({'workflow_project':_0x35813c[_0x3015f3(0x1be)]},_0x2e0004[_0x3015f3(0x1a2)]),console[_0x3015f3(0x19c)](a55_0x47a174[_0x3015f3(0x1de)](_0x3015f3(0x202)));const _0x235633=a55_0x4d0954[_0x3015f3(0x1fe)](process[_0x3015f3(0x20b)](),_0x35813c[_0x3015f3(0x1bf)])||'.';return console['error'](a55_0x47a174[_0x3015f3(0x225)](_0x3015f3(0x215)+_0x235633)),console['error'](a55_0x47a174[_0x3015f3(0x225)](_0x3015f3(0x1ae)+_0x35813c[_0x3015f3(0x1be)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]='workflow:push';[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x23e);async['execute'](_0x4b29ad){const _0x12932c=a55_0x5029cc,{options:_0x1edfe5,args:_0x555083,tdx:_0x2981fc}=_0x4b29ad,_0x1f4bd2=this[_0x12932c(0x13e)](_0x555083,_0x1edfe5),_0x361655=_0x1edfe5,{revision:_0x902a4c,skipValidation:_0x4d3a4a,backfill:_0x52123a}=_0x361655,_0x2bbee3=_0x52123a===undefined?undefined:!_0x52123a;_0x1edfe5['verbose']&&(_0x1f4bd2&&console['error'](_0x12932c(0x8d)+_0x1f4bd2),_0x902a4c&&console['error'](_0x12932c(0xc4)+_0x902a4c),_0x1edfe5['dryRun']&&console['error'](_0x12932c(0x11c)),_0x4d3a4a&&console['error'](_0x12932c(0x228)),_0x52123a&&console[_0x12932c(0x19c)]('Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)'));let _0x260d83;try{_0x260d83=await withSpinner(_0x12932c(0x109),()=>_0x2981fc['workflow'][_0x12932c(0x1d0)]({'sourceDir':_0x1f4bd2,'revision':_0x902a4c,'skipValidation':_0x4d3a4a,'skipSchedule':_0x2bbee3}),{'verbose':_0x1edfe5[_0x12932c(0x1af)]});}catch(_0x5337ca){if(_0x5337ca instanceof Error&&_0x5337ca[_0x12932c(0x206)][_0x12932c(0xdf)](_0x12932c(0xa4)))return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x25a)](_0x12932c(0x25b)),_0x12932c(0x157)),_0x1edfe5[_0x12932c(0x149)]?console[_0x12932c(0x19c)](a55_0x47a174['dim'](_0x12932c(0x187)+_0x1edfe5[_0x12932c(0x149)]+_0x12932c(0x179)+_0x1edfe5[_0x12932c(0x149)]+'\x27')):console[_0x12932c(0x19c)](a55_0x47a174['dim']('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x5337ca;}const _0x3fca9f=_0x260d83[_0x12932c(0x1a8)];console['error']('✔\x20Project:\x20'+_0x3fca9f[_0x12932c(0x1be)]),console[_0x12932c(0x19c)](_0x12932c(0x9d)+_0x3fca9f[_0x12932c(0x1ac)]),console[_0x12932c(0x19c)](_0x12932c(0x269)+_0x3fca9f['revision']),console[_0x12932c(0x19c)]('\x20\x20Changes:\x20'+a55_0x47a174[_0x12932c(0x1de)]('+'+_0x3fca9f[_0x12932c(0x12a)][_0x12932c(0x136)]+_0x12932c(0xf2))+',\x20'+(a55_0x47a174[_0x12932c(0x175)]('~'+_0x3fca9f[_0x12932c(0x12a)][_0x12932c(0x214)]+_0x12932c(0x1f3))+',\x20')+(a55_0x47a174[_0x12932c(0x25a)]('-'+_0x3fca9f['summary'][_0x12932c(0x16f)]+_0x12932c(0x148))+',\x20')+(''+a55_0x47a174['dim'](_0x3fca9f[_0x12932c(0x12a)][_0x12932c(0x1b7)]+'\x20unchanged')));for(const _0x2789d1 of _0x3fca9f['changes']){_0x2789d1[_0x12932c(0x11a)]==='modified'&&_0x2789d1[_0x12932c(0x18c)]&&(console['error']('\x0a'+a55_0x47a174[_0x12932c(0x138)](_0x12932c(0x24e)+_0x2789d1[_0x12932c(0x100)])),console[_0x12932c(0x19c)](_0x2789d1[_0x12932c(0x18c)]));}if(!_0x3fca9f[_0x12932c(0x1f4)])return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x1de)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x12932c(0xd3)](_0x2981fc,_0x3fca9f[_0x12932c(0x1be)],_0x1edfe5['site']),0x0;if(_0x1edfe5[_0x12932c(0xa6)])return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x175)](_0x12932c(0x253))),0x0;if(!_0x1edfe5['yes']){if(!isInteractive())return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x25a)](_0x12932c(0x1ff)),_0x12932c(0xb3)),console[_0x12932c(0x19c)](a55_0x47a174['dim'](_0x12932c(0x24f))),0x1;const _0x5ccc83=await confirmKey(_0x12932c(0x115));if(!_0x5ccc83)return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x175)](_0x12932c(0x163)),_0x12932c(0x18e)),0x1;}const _0x480832=await withSpinner(_0x12932c(0xc6),()=>_0x2981fc[_0x12932c(0x1f9)][_0x12932c(0x176)](_0x3fca9f),{'verbose':_0x1edfe5[_0x12932c(0x1af)]}),_0x293216=_0x480832[_0x12932c(0x1a8)];return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x1de)](_0x12932c(0x258))),console[_0x12932c(0x19c)](_0x12932c(0x1cd)+_0x293216['projectId']),console['error'](_0x12932c(0x269)+_0x293216[_0x12932c(0x26e)]),await this[_0x12932c(0xd3)](_0x2981fc,_0x293216[_0x12932c(0x1be)],_0x1edfe5['site']),0x0;}}function a55_0x5cbb(_0x52dc05,_0x32fc32){_0x52dc05=_0x52dc05-0x8b;const _0x4d42d7=a55_0x4d42();let _0x5cbb1a=_0x4d42d7[_0x52dc05];return _0x5cbb1a;}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]='workflow:clone';[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x10f);async[a55_0x5029cc(0x196)](_0x220685){const _0x22fa2a=a55_0x5029cc,{options:_0x4d07e6,args:_0x33e23f,tdx:_0x5a657d}=_0x220685,_0x302d8c=this[_0x22fa2a(0x13e)](_0x33e23f,_0x4d07e6),_0x48b35a=_0x4d07e6[_0x22fa2a(0x260)],_0x4277c4=_0x4d07e6['revision'],_0x4279df=_0x4d07e6[_0x22fa2a(0xfd)];if(!_0x302d8c)return console['error'](a55_0x47a174[_0x22fa2a(0x25a)](_0x22fa2a(0x25b)),_0x22fa2a(0x25e)),console[_0x22fa2a(0x19c)](a55_0x47a174['dim'](_0x22fa2a(0x147))),console['error'](a55_0x47a174['dim'](_0x22fa2a(0x1fa))),0x1;if(!_0x48b35a)return console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x25a)](_0x22fa2a(0x25b)),_0x22fa2a(0x19e)),console[_0x22fa2a(0x19c)](a55_0x47a174['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x4d07e6[_0x22fa2a(0x1af)]&&(console['error'](_0x22fa2a(0x8d)+_0x302d8c),console['error']('New\x20project\x20name:\x20'+_0x48b35a),_0x4277c4&&console['error'](_0x22fa2a(0xc4)+_0x4277c4),_0x4d07e6[_0x22fa2a(0xa6)]&&console['error'](_0x22fa2a(0x11c)),_0x4279df&&console[_0x22fa2a(0x19c)](_0x22fa2a(0x228)));const _0x3b90d9=await withSpinner('Analyzing\x20project...',()=>_0x5a657d['workflow']['prepareCloneProject'](_0x302d8c,_0x48b35a,{'revision':_0x4277c4,'skipValidation':_0x4279df}),{'verbose':_0x4d07e6[_0x22fa2a(0x1af)]}),_0x3e1e90=_0x3b90d9[_0x22fa2a(0x1a8)];console['error'](_0x22fa2a(0x183)+_0x3e1e90[_0x22fa2a(0x1ac)]);_0x3e1e90['sourceProjectName']&&console[_0x22fa2a(0x19c)](_0x22fa2a(0xca)+_0x3e1e90[_0x22fa2a(0x192)]);console['error'](_0x22fa2a(0x161)+_0x3e1e90[_0x22fa2a(0xf6)]),console[_0x22fa2a(0x19c)]('Revision:\x20'+_0x3e1e90[_0x22fa2a(0x26e)]),console['error']('Files\x20to\x20upload:\x20'+_0x3e1e90[_0x22fa2a(0x23f)]);_0x3e1e90[_0x22fa2a(0x1e0)]&&(console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x175)](_0x22fa2a(0xfb)+_0x3e1e90['newProjectName']+_0x22fa2a(0xc3)+_0x3e1e90[_0x22fa2a(0x1bb)]+')')),console[_0x22fa2a(0x19c)](a55_0x47a174['yellow'](_0x22fa2a(0x211))));if(_0x4d07e6[_0x22fa2a(0xa6)])return console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x175)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x4d07e6['yes']){if(!isInteractive())return console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x25a)]('\x0aError:'),_0x22fa2a(0xb3)),console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x225)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x284ea9=_0x3e1e90['sourceProjectName']||a55_0x4d0954[_0x22fa2a(0x273)](_0x302d8c),_0x535d70=_0x3e1e90[_0x22fa2a(0x1e0)]?_0x22fa2a(0x186)+_0x48b35a+'\x22\x20with\x20new\x20revision?':_0x22fa2a(0x90)+_0x284ea9+_0x22fa2a(0x129)+_0x48b35a+'\x22?',_0x381a27=await confirmKey(_0x535d70);if(!_0x381a27)return console['error'](a55_0x47a174[_0x22fa2a(0x175)]('Cancelled')),0x1;}const _0x129849=await withSpinner(_0x3e1e90[_0x22fa2a(0x1e0)]?_0x22fa2a(0x120)+_0x48b35a+'...':_0x22fa2a(0x1b2)+_0x48b35a+_0x22fa2a(0x234),()=>_0x5a657d[_0x22fa2a(0x1f9)][_0x22fa2a(0x15e)](_0x3e1e90),{'verbose':_0x4d07e6['verbose']}),_0x1a006b=_0x129849[_0x22fa2a(0x1a8)];return console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x1de)](_0x3e1e90[_0x22fa2a(0x1e0)]?_0x22fa2a(0xbe):'✔\x20Clone\x20complete')),console[_0x22fa2a(0x19c)](_0x22fa2a(0x12f)+_0x1a006b[_0x22fa2a(0xf6)]),console[_0x22fa2a(0x19c)]('\x20\x20Project\x20ID:\x20'+_0x1a006b['newProjectId']),console['error'](_0x22fa2a(0x269)+_0x1a006b['revision']),await this[_0x22fa2a(0xd3)](_0x5a657d,_0x1a006b[_0x22fa2a(0xf6)],_0x4d07e6[_0x22fa2a(0x9a)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x170);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x17a);async[a55_0x5029cc(0x196)](_0x3eac70){const _0x28388b=a55_0x5029cc,{options:_0x4f8b07,args:_0x3fea73,tdx:_0x466226}=_0x3eac70,_0x317a57=_0x3fea73[0x0];if(!_0x317a57)return console[_0x28388b(0x19c)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x28388b(0x19c)](_0x28388b(0x14a)),0x1;_0x4f8b07[_0x28388b(0x1af)]&&console['error'](_0x28388b(0x24b)+_0x317a57);if(!_0x4f8b07[_0x28388b(0x262)]){if(!isInteractive())return console['error'](a55_0x47a174[_0x28388b(0x25a)]('\x0aError:'),_0x28388b(0xb3)),console[_0x28388b(0x19c)](a55_0x47a174[_0x28388b(0x225)](_0x28388b(0x24f))),0x1;const _0x3b013a=await confirmKey(_0x28388b(0x11b)+_0x317a57+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3b013a)return console[_0x28388b(0x19c)](a55_0x47a174['yellow'](_0x28388b(0x163))),0x1;}const _0x134ab9=await withSpinner(_0x28388b(0x1db)+_0x317a57+_0x28388b(0x234),()=>_0x466226[_0x28388b(0x1f9)][_0x28388b(0xff)](_0x317a57),{'verbose':_0x4f8b07[_0x28388b(0x1af)]}),_0x4524dd=_0x134ab9[_0x28388b(0x1a8)];return console['error']('✔\x20Deleted\x20project\x20'+_0x4524dd[_0x28388b(0x1be)]),console[_0x28388b(0x19c)]('\x20\x20Project\x20ID:\x20'+_0x4524dd[_0x28388b(0x201)]),0x0;}}export function parseKeyValue(_0xb0660f){const _0x3f578a=a55_0x5029cc,_0x4c68b6=_0xb0660f[_0x3f578a(0x1ad)]('=');if(_0x4c68b6===-0x1)throw new Error(_0x3f578a(0x19a)+_0xb0660f+_0x3f578a(0x20f));const _0x4c04ba=_0xb0660f['substring'](0x0,_0x4c68b6),_0x3d9d73=_0xb0660f[_0x3f578a(0x17d)](_0x4c68b6+0x1);if(!_0x4c04ba)throw new Error(_0x3f578a(0x106));return{'key':_0x4c04ba,'value':_0x3d9d73};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x1f6);['description']=a55_0x5029cc(0x160);async[a55_0x5029cc(0x196)](_0x4b9e20){const _0xcfef84=a55_0x5029cc,{options:_0x11cf6c,args:_0x76dd07,tdx:_0x3177bb}=_0x4b9e20,_0x25b01e=this[_0xcfef84(0x1e3)](_0x76dd07,_0x11cf6c);if(!_0x25b01e)return 0x1;_0x11cf6c[_0xcfef84(0x1af)]&&console[_0xcfef84(0x19c)](_0xcfef84(0x24b)+_0x25b01e);const _0x497b0e=await withSpinner(_0xcfef84(0xa1),()=>_0x3177bb[_0xcfef84(0x1f9)][_0xcfef84(0xe2)](_0x25b01e),{'verbose':_0x11cf6c['verbose']}),{secrets:_0x3f0811}=_0x497b0e[_0xcfef84(0x1a8)];return console[_0xcfef84(0x19c)]('✔\x20Found\x20'+_0x3f0811[_0xcfef84(0x1d7)]+_0xcfef84(0x1e4)+(_0x3f0811['length']!==0x1?'s':'')),await handleSDKOutput(_0x3f0811,_0x11cf6c),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x15c);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x103);async['execute'](_0x1ba151){const _0x257cc3=a55_0x5029cc,{options:_0x1dc692,args:_0x879ca3,tdx:_0x274d02}=_0x1ba151;let _0x5d55ed,_0x29e766;if(_0x879ca3[_0x257cc3(0x1d7)]>=0x1&&!_0x879ca3[0x0][_0x257cc3(0xdf)]('='))_0x5d55ed=_0x879ca3[0x0],_0x29e766=_0x879ca3[_0x257cc3(0x1b0)](0x1);else{if(_0x879ca3[_0x257cc3(0x1d7)]>=0x1&&_0x1dc692[_0x257cc3(0x149)])_0x5d55ed=_0x1dc692['workflowProject'],_0x29e766=_0x879ca3;else return _0x879ca3['length']>=0x1?(console['error']('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x257cc3(0x1e9)),0x1):(console[_0x257cc3(0x19c)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x257cc3(0x19c)](_0x257cc3(0x105)),0x1);}if(_0x29e766[_0x257cc3(0x1d7)]===0x0)return console['error'](_0x257cc3(0x1c9)),console[_0x257cc3(0x19c)](_0x257cc3(0x105)),0x1;const _0x2b1270={};try{for(const _0x4906dc of _0x29e766){const {key:_0x44f827,value:_0x4ae683}=parseKeyValue(_0x4906dc);_0x2b1270[_0x44f827]=_0x4ae683;}}catch(_0x3b33b8){return _0x3b33b8 instanceof Error&&console[_0x257cc3(0x19c)](a55_0x47a174[_0x257cc3(0x25a)]('Error:'),_0x3b33b8[_0x257cc3(0x206)]),0x1;}const _0x561b8c=Object['keys'](_0x2b1270);_0x1dc692[_0x257cc3(0x1af)]&&(console[_0x257cc3(0x19c)](_0x257cc3(0x24b)+_0x5d55ed),console[_0x257cc3(0x19c)](_0x257cc3(0x16c)+_0x561b8c[_0x257cc3(0x1a6)](',\x20')));const _0x5cc22b=await withSpinner(_0x561b8c[_0x257cc3(0x1d7)]===0x1?'Setting\x20secret...':_0x257cc3(0xe8)+_0x561b8c[_0x257cc3(0x1d7)]+_0x257cc3(0xb8),()=>_0x274d02['workflow']['setSecrets'](_0x5d55ed,_0x2b1270),{'verbose':_0x1dc692['verbose']}),_0x3b5174=_0x5cc22b[_0x257cc3(0x1a8)];return console['error'](_0x561b8c[_0x257cc3(0x1d7)]===0x1?_0x257cc3(0xe6)+_0x3b5174['keys'][0x0]+_0x257cc3(0x23c)+_0x3b5174[_0x257cc3(0x1be)]+'\x27':'✔\x20'+_0x3b5174[_0x257cc3(0xb6)][_0x257cc3(0x1d7)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x3b5174[_0x257cc3(0x1be)]+'\x27'),(_0x1dc692[_0x257cc3(0xce)]||_0x1dc692[_0x257cc3(0xf9)])&&await handleSingleObjectOutput(_0x3b5174,_0x1dc692),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a55_0x5029cc(0x208);['description']=a55_0x5029cc(0x16e);async['execute'](_0x20fc9d){const _0xaa19a=a55_0x5029cc,{options:_0x22aede,args:_0x5db66d,tdx:_0x57aee9}=_0x20fc9d;let _0x39a498,_0x33da18;if(_0x5db66d[_0xaa19a(0x1d7)]>=0x2)_0x39a498=_0x5db66d[0x0],_0x33da18=_0x5db66d[0x1];else{if(_0x5db66d[_0xaa19a(0x1d7)]===0x1&&_0x22aede[_0xaa19a(0x149)])_0x39a498=_0x22aede['workflowProject'],_0x33da18=_0x5db66d[0x0];else return _0x5db66d['length']===0x1?(console[_0xaa19a(0x19c)](_0xaa19a(0x172)),console[_0xaa19a(0x19c)](_0xaa19a(0x1e9)),0x1):(console[_0xaa19a(0x19c)](_0xaa19a(0xa2)),console['error'](_0xaa19a(0x1ab)),0x1);}_0x22aede[_0xaa19a(0x1af)]&&(console[_0xaa19a(0x19c)](_0xaa19a(0x24b)+_0x39a498),console['error'](_0xaa19a(0x218)+_0x33da18));if(!_0x22aede[_0xaa19a(0x262)]){if(!isInteractive())return console['error'](a55_0x47a174[_0xaa19a(0x25a)](_0xaa19a(0x1ff)),_0xaa19a(0xb3)),console[_0xaa19a(0x19c)](a55_0x47a174[_0xaa19a(0x225)](_0xaa19a(0x24f))),0x1;const _0x24c9c8=await confirmKey(_0xaa19a(0x243)+_0x33da18+_0xaa19a(0x14e)+_0x39a498+'\x27?');if(!_0x24c9c8)return console[_0xaa19a(0x19c)](a55_0x47a174[_0xaa19a(0x175)](_0xaa19a(0x163))),0x1;}const _0x9f1ca9=await withSpinner(_0xaa19a(0xc0),()=>_0x57aee9['workflow']['deleteSecret'](_0x39a498,_0x33da18),{'verbose':_0x22aede[_0xaa19a(0x1af)]}),_0x1f4152=_0x9f1ca9[_0xaa19a(0x1a8)];return console[_0xaa19a(0x19c)](_0xaa19a(0xe6)+_0x1f4152[_0xaa19a(0x114)]+_0xaa19a(0x94)+_0x1f4152[_0xaa19a(0x1be)]+'\x27'),(_0x22aede['json']||_0x22aede[_0xaa19a(0xf9)])&&await handleSingleObjectOutput(_0x1f4152,_0x22aede),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(_0x3558d7){const _0x1e8bc4=a55_0x5029cc,_0x518c4d=Math[_0x1e8bc4(0xac)](_0x3558d7/0x3e8),_0x85a067=Math[_0x1e8bc4(0xac)](_0x518c4d/0x3c),_0x476e44=Math['floor'](_0x85a067/0x3c),_0x256c0a=Math[_0x1e8bc4(0xac)](_0x476e44/0x18);if(_0x256c0a>0x0){const _0x1ed80c=_0x476e44%0x18;return _0x1ed80c>0x0?_0x256c0a+'d\x20'+_0x1ed80c+'h':_0x256c0a+'d';}else{if(_0x476e44>0x0){const _0x1ba45f=_0x85a067%0x3c;return _0x1ba45f>0x0?_0x476e44+'h\x20'+_0x1ba45f+'m':_0x476e44+'h';}else{if(_0x85a067>0x0){const _0x33e2d7=_0x518c4d%0x3c;return _0x33e2d7>0x0?_0x85a067+'m\x20'+_0x33e2d7+'s':_0x85a067+'m';}else return _0x518c4d+'s';}}}function formatTimestamp(_0x9193fd,_0x5cb471){const _0x3c543f=a55_0x5029cc,_0x50c364=new Date(_0x9193fd),_0x5c8cfb=String(_0x50c364[_0x3c543f(0x1d5)]())[_0x3c543f(0x1c0)](0x2,'0'),_0x52eb20=String(_0x50c364[_0x3c543f(0xa0)]())[_0x3c543f(0x1c0)](0x2,'0'),_0x5cda2e=_0x5c8cfb+':'+_0x52eb20,_0x487d3a=_0x50c364[_0x3c543f(0x11d)]()===_0x5cb471[_0x3c543f(0x11d)]()&&_0x50c364[_0x3c543f(0x245)]()===_0x5cb471['getMonth']()&&_0x50c364['getDate']()===_0x5cb471[_0x3c543f(0x18f)]();if(_0x487d3a)return _0x5cda2e;else{const _0x55394a=String(_0x50c364[_0x3c543f(0x245)]()+0x1)['padStart'](0x2,'0'),_0x2acc70=String(_0x50c364[_0x3c543f(0x18f)]())[_0x3c543f(0x1c0)](0x2,'0');return _0x55394a+'-'+_0x2acc70+'\x20'+_0x5cda2e;}}function formatDate(_0x443583){const _0x334b9e=a55_0x5029cc,_0x3fde10=_0x443583['getFullYear'](),_0x3717d0=String(_0x443583['getMonth']()+0x1)[_0x334b9e(0x1c0)](0x2,'0'),_0x5853f9=String(_0x443583[_0x334b9e(0x18f)]())[_0x334b9e(0x1c0)](0x2,'0');return _0x3fde10+'-'+_0x3717d0+'-'+_0x5853f9;}function getTaskStateIcon(_0x511ef2){const _0x1905b1={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1905b1[_0x511ef2]||'⚪';}function getBarChar(_0x18dace){const _0x23a78e=a55_0x5029cc;return _0x18dace===_0x23a78e(0x19c)||_0x18dace===_0x23a78e(0x140)?'×':'─';}function getBarColor(_0x23d02e){const _0x4046cd=a55_0x5029cc,_0x1213ec={'success':a55_0x47a174[_0x4046cd(0x1de)],'error':a55_0x47a174[_0x4046cd(0x25a)],'group_error':a55_0x47a174['red'],'running':a55_0x47a174['blue'],'blocked':a55_0x47a174[_0x4046cd(0x175)],'planned':a55_0x47a174[_0x4046cd(0x225)],'canceling':a55_0x47a174[_0x4046cd(0x175)]};return _0x1213ec[_0x23d02e]||a55_0x47a174[_0x4046cd(0x1b1)];}function parseTaskName(_0x252d83){const _0x5d881d=a55_0x5029cc;let _0x15c5e5=_0x252d83[_0x5d881d(0x22f)](/^\++/,'');const _0x29f144=_0x15c5e5['split']('+'),_0x38879c=_0x29f144[_0x5d881d(0x1d7)]>0x1?_0x29f144['length']-0x2:0x0,_0x367b77=_0x29f144[_0x29f144['length']-0x1]||_0x15c5e5;return{'level':_0x38879c,'name':'+'+_0x367b77};}function truncateTaskName(_0x5bf110,_0x5cc51f){const _0x2dcf09=a55_0x5029cc,_0x14df40=stringWidth(_0x5bf110);if(_0x14df40<=_0x5cc51f)return _0x5bf110;let _0x20132f=_0x5bf110;while(stringWidth(_0x20132f+'…')>_0x5cc51f&&_0x20132f[_0x2dcf09(0x1d7)]>0x0){_0x20132f=_0x20132f[_0x2dcf09(0x1b0)](0x0,-0x1);}return _0x20132f+'…';}function calculateTimeScale(_0x3aadf7,_0x5c278f){const _0x23094a=a55_0x5029cc;return{'startTime':_0x3aadf7[_0x23094a(0x9c)],'endTime':_0x3aadf7[_0x23094a(0xb2)],'durationMs':_0x3aadf7[_0x23094a(0x21a)],'msPerChar':_0x3aadf7[_0x23094a(0x21a)]/_0x5c278f};}function timeToPosition(_0x2d103c,_0x57cd14,_0x3b0503){const _0x478c2e=a55_0x5029cc,_0x429224=_0x2d103c-_0x57cd14[_0x478c2e(0x255)],_0x4519d2=Math['floor'](_0x429224/_0x57cd14['msPerChar']);return Math[_0x478c2e(0x119)](0x0,Math['min'](_0x4519d2,_0x3b0503));}function renderTimeAxis(_0x854754,_0x3b012f){const _0xd8d4df=a55_0x5029cc,_0x591ef3=Math[_0xd8d4df(0x226)](TIMELINE_CONFIG[_0xd8d4df(0x1e5)],Math['max'](TIMELINE_CONFIG[_0xd8d4df(0x91)],Math[_0xd8d4df(0xac)](_0x3b012f/TIMELINE_CONFIG[_0xd8d4df(0x1aa)]))),_0x39ba21=_0x854754['durationMs']/(_0x591ef3-0x1),_0x896d5d=new Date(_0x854754[_0xd8d4df(0x255)]),_0x5a75b3=[];for(let _0x1d6ec5=0x0;_0x1d6ec5<_0x591ef3;_0x1d6ec5++){const _0x2a6074=_0x854754[_0xd8d4df(0x255)]+_0x1d6ec5*_0x39ba21,_0xbbaab9=timeToPosition(_0x2a6074,_0x854754,_0x3b012f),_0x3bf48f=formatTimestamp(_0x2a6074,_0x896d5d);_0x5a75b3[_0xd8d4df(0x221)]({'pos':_0xbbaab9,'text':_0x3bf48f});}const _0x5da7aa=new Array(_0x3b012f)[_0xd8d4df(0x156)]('\x20');let _0x2d18a6=-0x1;for(const {pos:_0xf9c7a0,text:_0x3b3a7c}of _0x5a75b3){let _0x32dfaa=Math[_0xd8d4df(0x119)](0x0,_0xf9c7a0-Math[_0xd8d4df(0xac)](_0x3b3a7c[_0xd8d4df(0x1d7)]/0x2));_0x32dfaa<=_0x2d18a6+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x32dfaa=_0x2d18a6+TIMELINE_CONFIG[_0xd8d4df(0x272)]+0x1);_0x32dfaa+_0x3b3a7c[_0xd8d4df(0x1d7)]>_0x3b012f&&(_0x32dfaa=_0x3b012f-_0x3b3a7c[_0xd8d4df(0x1d7)]);if(_0x32dfaa>=0x0&&_0x32dfaa+_0x3b3a7c['length']<=_0x3b012f&&_0x32dfaa>_0x2d18a6){for(let _0x58256e=0x0;_0x58256e<_0x3b3a7c[_0xd8d4df(0x1d7)];_0x58256e++){_0x5da7aa[_0x32dfaa+_0x58256e]=_0x3b3a7c[_0x58256e];}_0x2d18a6=_0x32dfaa+_0x3b3a7c[_0xd8d4df(0x1d7)]-0x1;}}return _0x5da7aa[_0xd8d4df(0x1a6)]('');}function renderTaskRow(_0x16f4cb,_0x2b7253,_0x1c567c,_0xb33ac){const _0x25325e=a55_0x5029cc,{level:_0xf787a7,name:_0x4863a9}=parseTaskName(_0x16f4cb[_0x25325e(0x260)]),_0x1aa46a='\x20'[_0x25325e(0xab)](_0xf787a7),_0x5b4252=_0x16f4cb[_0x25325e(0x188)]?'('+formatElapsed(_0x16f4cb[_0x25325e(0x188)][_0x25325e(0x21a)])+')':'',_0x26b53b=stringWidth(_0x5b4252),_0xefafa0=_0xf787a7*0x1,_0x1890fd=_0xb33ac-_0xefafa0-_0x26b53b-0x1,_0x435d21=truncateTaskName(_0x4863a9,_0x1890fd),_0x152c2f=_0x1aa46a+_0x435d21,_0x20e729=stringWidth(_0x152c2f),_0x6b0d3b=_0xb33ac-_0x20e729-_0x26b53b,_0x14dcd8=_0x152c2f+'\x20'['repeat'](Math[_0x25325e(0x119)](0x1,_0x6b0d3b))+a55_0x47a174[_0x25325e(0x225)](_0x5b4252),_0x5331ee=getTaskStateIcon(_0x16f4cb[_0x25325e(0x11f)]),_0x33bc56=new Array(_0x1c567c)[_0x25325e(0x156)]('\x20');if(_0x16f4cb[_0x25325e(0x188)]){const _0x5f5df9=timeToPosition(_0x16f4cb[_0x25325e(0x188)][_0x25325e(0x9c)],_0x2b7253,_0x1c567c),_0x1d2dad=timeToPosition(_0x16f4cb['window'][_0x25325e(0xb2)],_0x2b7253,_0x1c567c),_0x42ac2b=getBarChar(_0x16f4cb[_0x25325e(0x11f)]),_0x4335be=Math['max'](_0x5f5df9+0x1,_0x1d2dad);for(let _0x55df1f=_0x5f5df9;_0x55df1f<Math[_0x25325e(0x226)](_0x4335be,_0x1c567c);_0x55df1f++){_0x33bc56[_0x55df1f]=_0x42ac2b;}}const _0x4c3d20=getBarColor(_0x16f4cb[_0x25325e(0x11f)]),_0x15154f=_0x33bc56[_0x25325e(0x14d)](_0x1844de=>_0x1844de==='\x20'?'\x20':_0x4c3d20(_0x1844de))[_0x25325e(0x1a6)]('');return _0x5331ee+'\x20'+_0x14dcd8+'│'+_0x15154f+'│';}function calculateStats(_0x192cdf){const _0x178f91=a55_0x5029cc,_0x441599={'total':_0x192cdf[_0x178f91(0x1d7)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x1665a7 of _0x192cdf){if(_0x1665a7[_0x178f91(0x11f)]===_0x178f91(0x1ca))_0x441599[_0x178f91(0x1ca)]++;else{if(_0x1665a7[_0x178f91(0x11f)]==='error'||_0x1665a7[_0x178f91(0x11f)]===_0x178f91(0x140))_0x441599[_0x178f91(0x19c)]++;else _0x1665a7['state']===_0x178f91(0x97)?_0x441599[_0x178f91(0x97)]++:_0x441599[_0x178f91(0xda)]++;}}return _0x441599;}function formatStats(_0x13d4ef){const _0x4bfcd8=a55_0x5029cc;return[_0x4bfcd8(0x1b3)+_0x13d4ef[_0x4bfcd8(0x169)],'✅\x20'+_0x13d4ef[_0x4bfcd8(0x1ca)],'❌\x20'+_0x13d4ef[_0x4bfcd8(0x19c)],_0x4bfcd8(0x26a)+_0x13d4ef[_0x4bfcd8(0x97)],'⏳\x20'+_0x13d4ef[_0x4bfcd8(0xda)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x17e);[a55_0x5029cc(0x1ee)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a55_0x5029cc(0x196)](_0x1e6e4c){const _0x3842c9=a55_0x5029cc,{options:_0x2e4d94,args:_0x3f6c9c,tdx:_0x3715c1}=_0x1e6e4c;let _0x3856d8,_0x3ae24b,_0x2dd3d2=![];if(_0x3f6c9c[0x0]){if(_0x3f6c9c[0x0]['includes']('.')){const _0x5792a4=this[_0x3842c9(0x1e1)](_0x3f6c9c,_0x2e4d94);if(!_0x5792a4)return 0x1;_0x3856d8=_0x5792a4[_0x3842c9(0x1be)],_0x3ae24b=_0x5792a4['workflowName'];}else{_0x3ae24b=_0x3f6c9c[0x0],_0x3856d8=_0x2e4d94[_0x3842c9(0x149)];if(!_0x3856d8)return console[_0x3842c9(0x19c)](a55_0x47a174['red'](_0x3842c9(0x25b)),_0x3842c9(0x1e8)),0x1;_0x2dd3d2=!![];}}else{const _0x5d8ee3=this[_0x3842c9(0x1e1)](_0x3f6c9c,_0x2e4d94);if(!_0x5d8ee3)return 0x1;_0x3856d8=_0x5d8ee3[_0x3842c9(0x1be)],_0x3ae24b=_0x5d8ee3[_0x3842c9(0x13b)];}if(_0x2e4d94['verbose']){if(_0x3856d8&&_0x3ae24b)console[_0x3842c9(0x19c)](_0x3842c9(0x95)+_0x3856d8+'.'+_0x3ae24b);else _0x3856d8&&console[_0x3842c9(0x19c)](_0x3842c9(0xe7)+_0x3856d8);}const _0x5e9b2f=_0x2e4d94[_0x3842c9(0x259)],_0x4e2bd=_0x2e4d94[_0x3842c9(0x184)];if(_0x5e9b2f){_0x4e2bd&&console['error'](a55_0x47a174[_0x3842c9(0x175)](_0x3842c9(0x16b)),_0x3842c9(0xf7));const _0x54a271=_0x2e4d94['follow'];return _0x54a271?await this[_0x3842c9(0x13a)](_0x1e6e4c,_0x5e9b2f):await this[_0x3842c9(0xeb)](_0x1e6e4c,_0x5e9b2f,_0x2e4d94),0x0;}if(_0x4e2bd){const _0x1eb546=await withSpinner(_0x3842c9(0xae),()=>_0x3715c1['workflow']['sessions']({'projectName':_0x3856d8,'workflowName':_0x3ae24b,'limit':0x64}),{'verbose':_0x2e4d94['verbose']}),_0x536d53=_0x1eb546[_0x3842c9(0x1a8)][_0x3842c9(0x1df)](_0x5ad801=>_0x5ad801['id']===_0x4e2bd);if(!_0x536d53)return console[_0x3842c9(0x19c)](a55_0x47a174[_0x3842c9(0x25a)](_0x3842c9(0x25b)),'Session\x20not\x20found:\x20'+_0x4e2bd),0x1;if(!_0x536d53['lastAttempt']?.['id'])return console[_0x3842c9(0x19c)](a55_0x47a174[_0x3842c9(0x25a)](_0x3842c9(0x25b)),'Session\x20'+_0x4e2bd+_0x3842c9(0x1a5)),0x1;const _0x29ec52=_0x536d53[_0x3842c9(0xa9)]['id'];_0x2e4d94[_0x3842c9(0x1af)]&&console[_0x3842c9(0x19c)](_0x3842c9(0x248)+_0x29ec52+_0x3842c9(0x126)+_0x4e2bd);const _0x2e821d=_0x2e4d94[_0x3842c9(0x1a3)];return _0x2e821d?await this[_0x3842c9(0x13a)](_0x1e6e4c,_0x29ec52):await this[_0x3842c9(0xeb)](_0x1e6e4c,_0x29ec52,_0x2e4d94),0x0;}const _0x22cfd3=await withSpinner(_0x3842c9(0x17c),()=>_0x3715c1[_0x3842c9(0x1f9)][_0x3842c9(0xad)]({'projectName':_0x3856d8,'workflowName':_0x3ae24b,'limit':_0x2e4d94[_0x3842c9(0x1ec)]||0x32}),{'verbose':_0x2e4d94[_0x3842c9(0x1af)]}),_0x288073=_0x22cfd3['data'];if(_0x288073[_0x3842c9(0x1d7)]===0x0){if(_0x3856d8&&_0x3ae24b)console[_0x3842c9(0x19c)]('No\x20sessions\x20found\x20for:\x20'+_0x3856d8+'.'+_0x3ae24b);else _0x3856d8?console['error'](_0x3842c9(0x1c8)+_0x3856d8):(console[_0x3842c9(0x19c)](_0x3842c9(0x244)),console[_0x3842c9(0x19c)](a55_0x47a174[_0x3842c9(0x225)](_0x3842c9(0x246))));return 0x0;}_0x288073['sort']((_0x1e04f1,_0x1ca5be)=>{const _0x234f19=_0x3842c9,_0x297e56=_0x1e04f1[_0x234f19(0xf1)]||'',_0x10cca5=_0x1ca5be[_0x234f19(0xf1)]||'';return _0x10cca5[_0x234f19(0xa8)](_0x297e56);});if(_0x2e4d94['json']||_0x2e4d94['jsonl'])return await handleSDKOutput(_0x288073,_0x2e4d94),0x0;let _0x4c6047;if(_0x2dd3d2){const _0x50f383=_0x288073[0x0];if(!_0x50f383[_0x3842c9(0xa9)]?.['id'])return console['error'](_0x3842c9(0x122)),0x0;_0x4c6047=_0x50f383['lastAttempt']['id'],_0x2e4d94['verbose']&&console['error'](_0x3842c9(0x22a)+_0x50f383['sessionTime']);}else{const _0x3db6e5=_0x288073[_0x3842c9(0x14d)](_0xaafcf7=>{const _0x59412d=_0x3842c9,_0x452cd0=getAttemptStatusDisplay(_0xaafcf7[_0x59412d(0xa9)]);return{'title':_0xaafcf7[_0x59412d(0x1c1)]?.[_0x59412d(0x260)]+'.'+_0xaafcf7[_0x59412d(0x1f9)]?.[_0x59412d(0x260)]+_0x59412d(0x10c)+_0xaafcf7[_0x59412d(0xf1)]+'\x20'+_0x452cd0[_0x59412d(0x212)],'value':_0xaafcf7[_0x59412d(0xa9)]?.['id']||'','description':_0x452cd0[_0x59412d(0xa3)]};}),_0x567d64=await a55_0x110a93({'type':_0x3842c9(0x235),'name':'attemptId','message':_0x3842c9(0x159),'choices':_0x3db6e5[_0x3842c9(0xaf)](_0x4aab77=>_0x4aab77[_0x3842c9(0x11e)]!=='')});if(!_0x567d64['attemptId'])return 0x0;_0x4c6047=_0x567d64['attemptId'];}const _0x2d0531=_0x2e4d94[_0x3842c9(0x1a3)];return _0x2d0531?await this[_0x3842c9(0x13a)](_0x1e6e4c,_0x4c6047):await this[_0x3842c9(0xeb)](_0x1e6e4c,_0x4c6047,_0x2e4d94),0x0;}async[a55_0x5029cc(0xeb)](_0x3267c1,_0x2dbdea,_0x2fb1d5){const _0x2c23f4=a55_0x5029cc,{tdx:_0x3e07fc}=_0x3267c1;let _0xe5e158,_0x1b9008;try{[_0xe5e158,_0x1b9008]=await Promise['all']([_0x3e07fc[_0x2c23f4(0x1f9)][_0x2c23f4(0xcd)](_0x2dbdea),_0x3e07fc[_0x2c23f4(0x1f9)]['tasks'](_0x2dbdea,![])]);}catch(_0x3aaa9c){console[_0x2c23f4(0x19c)](a55_0x47a174[_0x2c23f4(0x25a)](_0x2c23f4(0x271)));_0x2fb1d5[_0x2c23f4(0x1af)]&&console[_0x2c23f4(0x19c)](_0x3aaa9c);throw _0x3aaa9c;}if(_0x2fb1d5['json']||_0x2fb1d5['jsonl']){const _0x88a371=this[_0x2c23f4(0x15f)](_0xe5e158,_0x1b9008);await handleSDKOutput([_0x88a371],_0x2fb1d5);return;}const _0x38be37=_0x3e07fc[_0x2c23f4(0x217)][_0x2c23f4(0x9a)],_0x4b116d=this[_0x2c23f4(0x1e2)](_0xe5e158,_0x1b9008,_0x38be37);console[_0x2c23f4(0x241)](_0x4b116d);}async[a55_0x5029cc(0x13a)](_0xdd6a45,_0x515c0b){const _0x429efd=a55_0x5029cc,{tdx:_0xe65221}=_0xdd6a45,_0x21f70d=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x211999=TIMELINE_CONFIG[_0x429efd(0x9b)];let _0x5307ff=0x0;while(_0x5307ff<_0x211999){process[_0x429efd(0x10d)][_0x429efd(0x15a)]&&process['stdout'][_0x429efd(0xc2)]('\x1bc');let _0x56b425,_0x71eeff;try{[_0x56b425,_0x71eeff]=await Promise[_0x429efd(0x1a9)]([_0xe65221[_0x429efd(0x1f9)][_0x429efd(0xcd)](_0x515c0b),_0xe65221[_0x429efd(0x1f9)][_0x429efd(0xc1)](_0x515c0b,![])]);}catch(_0x3866ed){console[_0x429efd(0x19c)](a55_0x47a174['red'](_0x429efd(0x1f2)));_0x5307ff>0x0&&console['error'](a55_0x47a174[_0x429efd(0x225)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x5307ff));throw _0x3866ed;}const _0xe043b2=_0xe65221[_0x429efd(0x217)][_0x429efd(0x9a)],_0x28fca6=this[_0x429efd(0x1e2)](_0x56b425,_0x71eeff,_0xe043b2);console['log'](_0x28fca6);const _0x5cc128=_0x56b425[_0x429efd(0xde)]&&_0x71eeff[_0x429efd(0xf4)](_0x38f171=>_0x38f171[_0x429efd(0x11f)]!==_0x429efd(0x97)&&_0x38f171[_0x429efd(0x11f)]!==_0x429efd(0x231));if(_0x5cc128){console['error'](a55_0x47a174['green']('\x0a✔\x20Attempt\x20complete'));break;}console[_0x429efd(0x19c)](a55_0x47a174[_0x429efd(0x225)]('\x0aPolling...\x20('+_0x5307ff*0x2+_0x429efd(0x20a))),await new Promise(_0x2956a9=>setTimeout(_0x2956a9,_0x21f70d)),_0x5307ff++;}_0x5307ff>=_0x211999&&console[_0x429efd(0x19c)](a55_0x47a174[_0x429efd(0x175)](_0x429efd(0x130)));}[a55_0x5029cc(0x1e2)](_0x15f0fa,_0x1d9c93,_0x210cd7){const _0x2e7d66=a55_0x5029cc,_0x49ab7c=[],_0x304e09=TIMELINE_CONFIG[_0x2e7d66(0x12d)],_0xfad827=0x5,_0x310725=process[_0x2e7d66(0x10d)][_0x2e7d66(0x127)]||0x78,_0x43e850=_0x310725-_0x304e09-_0xfad827,_0x2d9928=Math[_0x2e7d66(0x119)](TIMELINE_CONFIG[_0x2e7d66(0x177)],Math['min'](_0x43e850,TIMELINE_CONFIG[_0x2e7d66(0x167)])),_0x47de81=new Date(_0x15f0fa['createdAt'])['getTime'](),_0x5df674=_0x15f0fa['finishedAt']?new Date(_0x15f0fa[_0x2e7d66(0x1f8)])[_0x2e7d66(0x22c)]():Date[_0x2e7d66(0x13f)](),_0x2230ad={'start':_0x47de81,'end':_0x5df674,'duration':_0x5df674-_0x47de81},_0x2a56d7=new Map(),_0x23f1c4=[];for(const _0x155eb6 of _0x1d9c93){if(_0x155eb6[_0x2e7d66(0xe9)]){const _0x3e8fd4=new Date(_0x155eb6[_0x2e7d66(0xe9)])[_0x2e7d66(0x22c)](),_0x29fc2b=_0x155eb6['updatedAt']?new Date(_0x155eb6[_0x2e7d66(0x133)])[_0x2e7d66(0x22c)]():Date[_0x2e7d66(0x13f)](),_0x334321={'start':_0x3e8fd4,'end':_0x29fc2b,'duration':_0x29fc2b-_0x3e8fd4};_0x2a56d7[_0x2e7d66(0x166)](_0x155eb6['id'],_0x334321),_0x23f1c4[_0x2e7d66(0x221)]({'name':_0x155eb6[_0x2e7d66(0x250)],'state':_0x155eb6[_0x2e7d66(0x11f)]||_0x2e7d66(0x1da),'window':_0x334321});}else _0x23f1c4[_0x2e7d66(0x221)]({'name':_0x155eb6[_0x2e7d66(0x250)],'state':_0x155eb6[_0x2e7d66(0x11f)]||'planned','window':undefined});}_0x23f1c4['sort']((_0x5f4ffc,_0x466094)=>{const _0x2d4d84=_0x2e7d66;if(!_0x5f4ffc[_0x2d4d84(0x188)])return 0x1;if(!_0x466094[_0x2d4d84(0x188)])return-0x1;return _0x5f4ffc[_0x2d4d84(0x188)][_0x2d4d84(0x9c)]-_0x466094[_0x2d4d84(0x188)]['start'];});const _0x4bf00c=_0x23f1c4[_0x2e7d66(0x1d7)],_0x89b9be=_0x4bf00c>TIMELINE_CONFIG[_0x2e7d66(0x1d1)];_0x89b9be&&_0x23f1c4[_0x2e7d66(0x1c7)](TIMELINE_CONFIG[_0x2e7d66(0x1d1)]);const _0xb990db=calculateTimeScale(_0x2230ad,_0x2d9928),_0xec4ac1=_0x15f0fa[_0x2e7d66(0xde)]?_0x15f0fa[_0x2e7d66(0x1ca)]?a55_0x47a174['green'](_0x2e7d66(0x1ca)):a55_0x47a174['red']('error'):a55_0x47a174[_0x2e7d66(0x117)]('running'),_0x26ad81=_0x15f0fa['project']?.['id'],_0x40aacc=_0x15f0fa[_0x2e7d66(0x184)];let _0x22a02e;if(_0x26ad81&&_0x40aacc){const _0x44a677=getWorkflowAttemptUrl(_0x210cd7,_0x26ad81,_0x40aacc,_0x15f0fa['id']);_0x22a02e=hyperlink(a55_0x47a174['dim'](_0x15f0fa['id']),_0x44a677);}else _0x22a02e=a55_0x47a174[_0x2e7d66(0x225)](_0x15f0fa['id']);_0x49ab7c[_0x2e7d66(0x221)](_0x2e7d66(0xec)+_0x22a02e+_0x2e7d66(0x10c)+_0xec4ac1+_0x2e7d66(0x10c)+formatElapsed(_0x2230ad[_0x2e7d66(0x21a)]));if(_0x23f1c4['length']>0x0){const _0x4bb84b=renderTimeAxis(_0xb990db,_0x2d9928),_0x41ac09=new Date(_0x2230ad[_0x2e7d66(0x9c)]),_0x1b1022=formatDate(_0x41ac09),_0x2f3450=TIMELINE_CONFIG[_0x2e7d66(0x1b5)]+TIMELINE_CONFIG[_0x2e7d66(0x263)]+_0x304e09,_0x376b83=_0x1b1022[_0x2e7d66(0x1c0)](_0x2f3450),_0x14f0c4=a55_0x47a174[_0x2e7d66(0x225)](_0x376b83);_0x49ab7c[_0x2e7d66(0x221)](_0x14f0c4+'\x20'+_0x4bb84b);for(const _0x4434cc of _0x23f1c4){_0x49ab7c['push'](renderTaskRow(_0x4434cc,_0xb990db,_0x2d9928,_0x304e09));}const _0x4ff873=calculateStats(_0x23f1c4);_0x49ab7c[_0x2e7d66(0x221)](formatStats(_0x4ff873)),_0x89b9be&&_0x49ab7c[_0x2e7d66(0x221)](a55_0x47a174[_0x2e7d66(0x175)](_0x2e7d66(0x227)+TIMELINE_CONFIG[_0x2e7d66(0x1d1)]+_0x2e7d66(0x8f)+_0x4bf00c+_0x2e7d66(0x1d2))),_0x49ab7c[_0x2e7d66(0x221)](''),_0x49ab7c[_0x2e7d66(0x221)](a55_0x47a174[_0x2e7d66(0x225)]('💡\x20Tip:\x20Use\x20')+(_0x2e7d66(0x165)+_0x15f0fa['id']+_0x2e7d66(0x1a1))+a55_0x47a174[_0x2e7d66(0x225)]('\x20to\x20see\x20detailed\x20logs'));}else _0x49ab7c[_0x2e7d66(0x221)](_0x2e7d66(0x16a));return _0x49ab7c[_0x2e7d66(0x1a6)]('\x0a');}[a55_0x5029cc(0x15f)](_0x57806d,_0x56aff1){const _0x26327e=a55_0x5029cc,_0x47bba0=new Date(_0x57806d['createdAt'])[_0x26327e(0x22c)](),_0x58d487=_0x57806d[_0x26327e(0x1f8)]?new Date(_0x57806d[_0x26327e(0x1f8)])[_0x26327e(0x22c)]():Date['now'](),_0xded79c=_0x58d487-_0x47bba0,_0x2c2f74=[];for(const _0x3fa0e7 of _0x56aff1){if(_0x3fa0e7['startedAt']){const _0x518c12=new Date(_0x3fa0e7[_0x26327e(0xe9)])[_0x26327e(0x22c)](),_0x21b9fa=_0x3fa0e7[_0x26327e(0x133)]?new Date(_0x3fa0e7[_0x26327e(0x133)])[_0x26327e(0x22c)]():Date[_0x26327e(0x13f)]();_0x2c2f74[_0x26327e(0x221)]({'name':_0x3fa0e7[_0x26327e(0x250)],'state':_0x3fa0e7['state']||_0x26327e(0x1da),'window':{'start':_0x518c12,'end':_0x21b9fa,'duration':_0x21b9fa-_0x518c12}});}else _0x2c2f74['push']({'name':_0x3fa0e7[_0x26327e(0x250)],'state':_0x3fa0e7[_0x26327e(0x11f)]||_0x26327e(0x231),'window':undefined});}const _0x373eda=calculateStats(_0x2c2f74);return{'attempt':{'id':_0x57806d['id'],'status':_0x57806d[_0x26327e(0xde)]?_0x57806d['success']?_0x26327e(0x1ca):_0x26327e(0x19c):'running','createdAt':_0x57806d[_0x26327e(0x123)],'finishedAt':_0x57806d[_0x26327e(0x1f8)],'duration_ms':_0xded79c},'tasks':_0x2c2f74[_0x26327e(0x14d)](_0x4a117b=>({'name':_0x4a117b[_0x26327e(0x260)],'state':_0x4a117b[_0x26327e(0x11f)],'startedAt':_0x4a117b['window']?new Date(_0x4a117b[_0x26327e(0x188)]['start'])[_0x26327e(0xe5)]():null,'updatedAt':_0x4a117b[_0x26327e(0x188)]?new Date(_0x4a117b[_0x26327e(0x188)][_0x26327e(0xb2)])[_0x26327e(0xe5)]():null,'duration_ms':_0x4a117b[_0x26327e(0x188)]?.[_0x26327e(0x21a)]||null})),'stats':_0x373eda};}}function formatScheduleLine(_0x3f6626){const _0x52ff5c=a55_0x5029cc,_0x4b43e0=_0x3f6626[_0x52ff5c(0x98)]?a55_0x47a174[_0x52ff5c(0x175)](_0x52ff5c(0x190)):'',_0x10ac7a=_0x3f6626[_0x52ff5c(0x1c1)]?.[_0x52ff5c(0x260)]?a55_0x47a174[_0x52ff5c(0x225)]('\x20['+_0x3f6626['project'][_0x52ff5c(0x260)]+']'):'',_0x322eb5=_0x3f6626[_0x52ff5c(0x21f)]?a55_0x47a174[_0x52ff5c(0x225)](_0x52ff5c(0xf0)+new Date(_0x3f6626[_0x52ff5c(0x21f)])['toLocaleString']()):'';return _0x52ff5c(0x239)+_0x3f6626['id']+'\x20'+(_0x3f6626[_0x52ff5c(0x1f9)]?.[_0x52ff5c(0x260)]||_0x52ff5c(0xd5))+_0x10ac7a+_0x4b43e0+_0x322eb5;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x137);['description']='List\x20workflow\x20schedules';async[a55_0x5029cc(0x196)](_0x25ad92){const _0x5bcdc6=a55_0x5029cc,{options:_0x8bfbed,args:_0x276132,tdx:_0x46db9e}=_0x25ad92,{scheduleId:_0x58611c}=_0x8bfbed;if(_0x58611c&&_0x276132[0x0])return console['error'](a55_0x47a174[_0x5bcdc6(0x25a)]('Error:'),_0x5bcdc6(0x18b)),console[_0x5bcdc6(0x19c)](a55_0x47a174[_0x5bcdc6(0x225)](_0x5bcdc6(0x112))),0x1;if(_0x58611c){const _0x19eda0=await withSpinner(_0x5bcdc6(0x1fd)+_0x58611c+_0x5bcdc6(0x234),()=>_0x46db9e[_0x5bcdc6(0x1f9)][_0x5bcdc6(0x1dc)](_0x58611c),{'verbose':_0x8bfbed[_0x5bcdc6(0x1af)]}),_0x2dea8f=_0x19eda0['data'];return isStructuredFormat(_0x8bfbed)?await handleSingleObjectOutput(_0x2dea8f,_0x8bfbed):(console[_0x5bcdc6(0x19c)](_0x5bcdc6(0x8c)),console[_0x5bcdc6(0x241)](formatScheduleLine(_0x2dea8f))),0x0;}const _0x3bbd8c=this[_0x5bcdc6(0x1e1)](_0x276132,_0x8bfbed);if(!_0x3bbd8c)return 0x1;const {projectName:_0x2f331e,workflowName:_0x295a43}=_0x3bbd8c,_0x494c58=_0x2f331e?'\x27'+_0x2f331e+(_0x295a43?'.'+_0x295a43:'')+'\x27':undefined,_0x10ce23=await withSpinner(_0x494c58?'Listing\x20schedules\x20for\x20'+_0x494c58+_0x5bcdc6(0x234):_0x5bcdc6(0xbf),()=>_0x2f331e?_0x46db9e[_0x5bcdc6(0x1f9)][_0x5bcdc6(0xd8)](_0x2f331e,{'workflow':_0x295a43,'limit':_0x8bfbed[_0x5bcdc6(0x1ec)]}):_0x46db9e[_0x5bcdc6(0x1f9)]['listSchedules']({'limit':_0x8bfbed[_0x5bcdc6(0x1ec)]}),{'verbose':_0x8bfbed[_0x5bcdc6(0x1af)]}),_0x2fafc3=_0x10ce23[_0x5bcdc6(0x1a8)],_0x55b74b=_0x8bfbed[_0x5bcdc6(0x1ec)]&&_0x2fafc3[_0x5bcdc6(0x1d7)]>=_0x8bfbed[_0x5bcdc6(0x1ec)]?a55_0x47a174[_0x5bcdc6(0x225)](_0x5bcdc6(0x125)):'';console[_0x5bcdc6(0x19c)](_0x5bcdc6(0xd4)+_0x2fafc3[_0x5bcdc6(0x1d7)]+'\x20schedule'+(_0x2fafc3[_0x5bcdc6(0x1d7)]!==0x1?'s':'')+_0x55b74b);if(isStructuredFormat(_0x8bfbed))await handleSDKOutput(_0x2fafc3,_0x8bfbed);else{if(_0x2fafc3[_0x5bcdc6(0x1d7)]===0x0)console['log'](_0x5bcdc6(0x1ce));else for(const _0x168169 of _0x2fafc3){console[_0x5bcdc6(0x241)](formatScheduleLine(_0x168169));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{['name']=a55_0x5029cc(0x9e);['description']='Enable\x20a\x20workflow\x20schedule';async[a55_0x5029cc(0x196)](_0x7871cc){const _0x210485=a55_0x5029cc,{options:_0x1de12a,args:_0x19601d,tdx:_0x8e8c79}=_0x7871cc,_0x14fb16=_0x19601d[0x0];if(!_0x14fb16)return console[_0x210485(0x19c)](a55_0x47a174[_0x210485(0x25a)](_0x210485(0x25b)),_0x210485(0x1d9)),console[_0x210485(0x19c)](a55_0x47a174[_0x210485(0x225)](_0x210485(0x118))),console[_0x210485(0x19c)](a55_0x47a174['dim'](_0x210485(0x17b))),0x1;const {backfill:_0x1b1429,nextTime:_0x196152}=_0x1de12a,_0x312fcf={};if(_0x1b1429!==undefined)_0x312fcf['skipSchedule']=!_0x1b1429;if(_0x196152!==undefined)_0x312fcf[_0x210485(0xd6)]=_0x196152;const _0x4710dd=await withSpinner('Enabling\x20schedule\x20#'+_0x14fb16+_0x210485(0x234),()=>_0x8e8c79[_0x210485(0x1f9)][_0x210485(0x242)](_0x14fb16,_0x312fcf),{'verbose':_0x1de12a[_0x210485(0x1af)]}),_0x32f6ef=_0x4710dd[_0x210485(0x1a8)];return isStructuredFormat(_0x1de12a)?await handleSingleObjectOutput(_0x32f6ef,_0x1de12a):(console['log'](_0x210485(0x139)+_0x14fb16+_0x210485(0xb5)+(_0x32f6ef['workflow']?.['name']||_0x210485(0x1da))+')'),_0x32f6ef['nextRunTime']&&console['log'](a55_0x47a174[_0x210485(0x225)](_0x210485(0x195)+new Date(_0x32f6ef['nextRunTime'])['toLocaleString']()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x21d);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x266);async['execute'](_0x1cf17b){const _0x1cd0fe=a55_0x5029cc,{options:_0xf5de9f,args:_0x4a3582,tdx:_0x3468d7}=_0x1cf17b,_0xc1245f=_0x4a3582[0x0];if(!_0xc1245f)return console[_0x1cd0fe(0x19c)](a55_0x47a174[_0x1cd0fe(0x25a)]('Error:'),_0x1cd0fe(0x1d9)),console[_0x1cd0fe(0x19c)](a55_0x47a174[_0x1cd0fe(0x225)](_0x1cd0fe(0x15d))),console['error'](a55_0x47a174[_0x1cd0fe(0x225)](_0x1cd0fe(0x17b))),0x1;const _0x70df5=await withSpinner(_0x1cd0fe(0x1a4)+_0xc1245f+_0x1cd0fe(0x234),()=>_0x3468d7[_0x1cd0fe(0x1f9)]['disableSchedule'](_0xc1245f),{'verbose':_0xf5de9f[_0x1cd0fe(0x1af)]}),_0x36e56f=_0x70df5[_0x1cd0fe(0x1a8)];return isStructuredFormat(_0xf5de9f)?await handleSingleObjectOutput(_0x36e56f,_0xf5de9f):console['log'](_0x1cd0fe(0x139)+_0xc1245f+_0x1cd0fe(0x1c5)+(_0x36e56f[_0x1cd0fe(0x1f9)]?.[_0x1cd0fe(0x260)]||_0x1cd0fe(0x1da))+')'),0x0;}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a56_0x3ad4(_0x5e158c,_0x4e1fe3){_0x5e158c=_0x5e158c-0x13c;const _0x1649b7=a56_0x1649();let _0x3ad4f5=_0x1649b7[_0x5e158c];return _0x3ad4f5;}(function(_0xebe0d3,_0x5d56b8){const _0x5e476d=a56_0x3ad4,_0x4b6939=_0xebe0d3();while(!![]){try{const _0x7f5686=parseInt(_0x5e476d(0x14e))/0x1+-parseInt(_0x5e476d(0x148))/0x2*(parseInt(_0x5e476d(0x13f))/0x3)+-parseInt(_0x5e476d(0x14b))/0x4*(-parseInt(_0x5e476d(0x13d))/0x5)+-parseInt(_0x5e476d(0x146))/0x6+-parseInt(_0x5e476d(0x143))/0x7*(parseInt(_0x5e476d(0x149))/0x8)+parseInt(_0x5e476d(0x141))/0x9*(parseInt(_0x5e476d(0x144))/0xa)+parseInt(_0x5e476d(0x14d))/0xb*(parseInt(_0x5e476d(0x147))/0xc);if(_0x7f5686===_0x5d56b8)break;else _0x4b6939['push'](_0x4b6939['shift']());}catch(_0xbd0105){_0x4b6939['push'](_0x4b6939['shift']());}}}(a56_0x1649,0xbc80b));function a56_0x1649(){const _0x473ab2=['301EZoxXM','10yKYZLB','length','1738014ipvMgt','29952LpbENJ','71494mbsbCD','122264EKcALC','entries','28YoDjNF','TD1\x20','5995EhPEse','239064uCSOTH','version','417955wGtSoT','Bearer\x20','105SKcVWS','tdx','7070121FUrtla','tdx/'];a56_0x1649=function(){return _0x473ab2;};return a56_0x1649();}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x587ce5=a56_0x3ad4,_0x1b9bf8=getVersion(),_0x495942=platform(),_0x2e2969=process[_0x587ce5(0x13c)]['replace']('v','');return _0x587ce5(0x142)+_0x1b9bf8+'\x20('+_0x495942+';\x20node/'+_0x2e2969+')';}export function getAuthHeaders(_0x506a64,_0x4f8370,_0x515395){const _0x2be5c4=a56_0x3ad4,_0x191515=getVersion(),_0x5f557b={'User-Agent':getUserAgent(),'X-TD-Client':_0x2be5c4(0x140),'X-TD-Client-Version':_0x191515};if(_0x515395)_0x5f557b['Authorization']=_0x2be5c4(0x13e)+_0x515395;else _0x4f8370&&(_0x5f557b['Authorization']=_0x2be5c4(0x14c)+_0x4f8370);return _0x5f557b;}export function toHeaderRecord(_0x44017e){const _0x29c0a6=a56_0x3ad4,_0x13da5b={};for(const [_0x4ca611,_0x578b1e]of Object[_0x29c0a6(0x14a)](_0x44017e)){_0x578b1e!==undefined&&(_0x13da5b[_0x4ca611]=_0x578b1e);}return _0x13da5b;}export function getTrinoHeaders(_0x36bb34,_0x242c38,_0x4cc972){const _0x16e5b3=a56_0x3ad4,_0x14e7aa=getAuthHeaders(_0x36bb34),_0x1b4cf2=toHeaderRecord(_0x14e7aa);if(_0x4cc972)_0x1b4cf2['Authorization']=_0x16e5b3(0x13e)+_0x4cc972;else _0x242c38&&(_0x1b4cf2['X-Trino-User']=_0x242c38);return _0x1b4cf2;}export function hasAPIKey(_0x3a6945){const _0x3e5eec=a56_0x3ad4,_0x339458=getAPIKey();return _0x339458!==undefined&&_0x339458[_0x3e5eec(0x145)]>0x0;}
|