@treasuredata/tdx 2026.6.2 → 2026.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.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_0x29f4d0=a55_0x1841;(function(_0x185299,_0x17d0ef){const _0x1b355b=a55_0x1841,_0x1f5dcb=_0x185299();while(!![]){try{const _0x5d0dfe=parseInt(_0x1b355b(0x284))/0x1+-parseInt(_0x1b355b(0x2ee))/0x2*(-parseInt(_0x1b355b(0x27d))/0x3)+parseInt(_0x1b355b(0x28e))/0x4*(-parseInt(_0x1b355b(0x261))/0x5)+parseInt(_0x1b355b(0x266))/0x6+-parseInt(_0x1b355b(0x31d))/0x7*(parseInt(_0x1b355b(0x2ea))/0x8)+-parseInt(_0x1b355b(0x2f0))/0x9+parseInt(_0x1b355b(0x157))/0xa;if(_0x5d0dfe===_0x17d0ef)break;else _0x1f5dcb['push'](_0x1f5dcb['shift']());}catch(_0x18d809){_0x1f5dcb['push'](_0x1f5dcb['shift']());}}}(a55_0x2684,0x9d935));import a55_0x262d9e from'chalk';import{existsSync}from'fs';import a55_0xee06fd 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_0x353259 from'prompts';function getAttemptStatusDisplay(_0x5d48ec){const _0x5b1aa3=a55_0x1841;if(!_0x5d48ec)return{'icon':'⏳','text':''};const {done:_0xb49c91,success:_0x457b8a,cancelRequested:_0x43a2c4}=_0x5d48ec;if(!_0xb49c91)return _0x43a2c4?{'icon':'🛑','text':a55_0x262d9e[_0x5b1aa3(0x1ea)]('canceling')}:{'icon':'🔄','text':a55_0x262d9e['blue']('running')};if(_0x457b8a)return{'icon':'✅','text':a55_0x262d9e[_0x5b1aa3(0x26d)]('success')};return{'icon':'❌','text':a55_0x262d9e['red']('error')};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x29f4d0(0x235)](_0x202493,_0x1675ca,_0x5b4861=0x0){return _0x202493[_0x5b4861]||_0x1675ca['workflowProject'];}[a55_0x29f4d0(0x215)](_0x188a1f,_0x525c51,_0x14b614=0x0){const _0x1c9824=a55_0x29f4d0,_0x577fc5=this['resolveProject'](_0x188a1f,_0x525c51,_0x14b614);if(!_0x577fc5)return console[_0x1c9824(0x2f5)](a55_0x262d9e[_0x1c9824(0x25b)](_0x1c9824(0x1df)),_0x1c9824(0x20b)),console[_0x1c9824(0x2f5)](a55_0x262d9e[_0x1c9824(0x312)](_0x1c9824(0x23c))),null;return _0x577fc5;}[a55_0x29f4d0(0x19d)](_0x2c9edc,_0x782396){const _0x59c14c=a55_0x29f4d0;if(_0x2c9edc[0x0]){const _0x3941a7=_0x2c9edc[0x0][_0x59c14c(0x248)]('.');if(_0x3941a7[_0x59c14c(0x17c)]===0x1)return{'projectName':_0x3941a7[0x0],'workflowName':undefined};else return _0x3941a7[_0x59c14c(0x17c)]===0x2?{'projectName':_0x3941a7[0x0],'workflowName':_0x3941a7[0x1]}:(console[_0x59c14c(0x2f5)](a55_0x262d9e['red'](_0x59c14c(0x1df)),_0x59c14c(0x2d7)),null);}return{'projectName':_0x782396[_0x59c14c(0x16c)],'workflowName':undefined};}['resolveProjectDir'](_0x2f1596,_0x5821ad,_0x3d9f07=0x0){const _0x16fe47=a55_0x29f4d0;if(_0x2f1596[_0x3d9f07])return _0x2f1596[_0x3d9f07];if(_0x5821ad[_0x16fe47(0x16c)]){const _0x28b29d=a55_0xee06fd[_0x16fe47(0x303)](process[_0x16fe47(0x1c4)](),'workflows',_0x5821ad[_0x16fe47(0x16c)]);if(existsSync(a55_0xee06fd[_0x16fe47(0x303)](_0x28b29d,_0x16fe47(0x230))))return _0x28b29d;}return undefined;}async[a55_0x29f4d0(0x1c6)](_0xecf984,_0x17ce8a,_0x4d22bb){const _0x3be2ba=a55_0x29f4d0;try{const _0x3afd68=await _0xecf984[_0x3be2ba(0x2ba)][_0x3be2ba(0x254)](_0x17ce8a,{'limit':0x1});if(_0x3afd68['length']>0x0){const _0x24a612=_0x3afd68[0x0]['id'],_0x388b7d=getWorkflowUrl(_0x4d22bb,_0x24a612);console[_0x3be2ba(0x2f5)](_0x3be2ba(0x2d3)+a55_0x262d9e[_0x3be2ba(0x295)](_0x388b7d));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x158);['description']=a55_0x29f4d0(0x171);async['execute'](_0x10d152){const _0x295acb=a55_0x29f4d0,{options:_0x57f9a1,args:_0x5c19bc,tdx:_0x1f92e9}=_0x10d152,_0x5295ce=_0x5c19bc[0x0],_0x514e38=_0x57f9a1[_0x295acb(0x213)];if(_0x514e38)return saveSessionContext({'workflow_project':undefined},_0x57f9a1[_0x295acb(0x209)]),console['log'](a55_0x262d9e['green'](_0x295acb(0x21f))),0x0;if(!_0x5295ce)return console[_0x295acb(0x2f5)](a55_0x262d9e['red'](_0x295acb(0x1df)),_0x295acb(0x20b)),console['error'](a55_0x262d9e[_0x295acb(0x312)](_0x295acb(0x1e1))),console['error'](a55_0x262d9e[_0x295acb(0x312)](_0x295acb(0x1f1))),0x1;const _0x33091a=await withSpinner(_0x295acb(0x1af)+_0x5295ce+'\x27...',()=>_0x1f92e9[_0x295acb(0x2ba)][_0x295acb(0x300)](_0x5295ce),{'verbose':_0x57f9a1['verbose']}),{name:_0x3c7e38}=_0x33091a[_0x295acb(0x2a6)];return saveSessionContext({'workflow_project':_0x3c7e38},_0x57f9a1[_0x295acb(0x209)]),console['log'](a55_0x262d9e[_0x295acb(0x26d)](_0x295acb(0x2b5)+a55_0x262d9e[_0x295acb(0x295)](_0x3c7e38))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x168);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2e0);async['execute'](_0x363ddd){const _0x2eb224=a55_0x29f4d0,{options:_0xe91c5e,args:_0x4a3c54,tdx:_0x337480}=_0x363ddd,_0x56492f=_0x4a3c54[0x0];_0xe91c5e[_0x2eb224(0x28d)]&&_0x56492f&&console[_0x2eb224(0x2f5)](_0x2eb224(0x19e)+_0x56492f);const _0x479ea0=await withSpinner(_0x2eb224(0x2b0),()=>_0x337480[_0x2eb224(0x2ba)][_0x2eb224(0x22d)](_0x56492f,{'limit':_0xe91c5e['limit']}),{'verbose':_0xe91c5e[_0x2eb224(0x28d)]});let _0x44f0e5=_0x479ea0['data'];_0x44f0e5[_0x2eb224(0x242)]((_0x4374d4,_0x766a5e)=>_0x4374d4[_0x2eb224(0x172)][_0x2eb224(0x2c8)](_0x766a5e[_0x2eb224(0x172)]));const _0x2891e0=_0xe91c5e['limit']&&_0x44f0e5[_0x2eb224(0x17c)]>=_0xe91c5e['limit']?a55_0x262d9e[_0x2eb224(0x312)](_0x2eb224(0x2da)):'';console[_0x2eb224(0x2f5)]('✔\x20Found\x20'+_0x44f0e5['length']+'\x20project'+(_0x44f0e5[_0x2eb224(0x17c)]!==0x1?'s':'')+_0x2891e0);if(_0xe91c5e['format']===_0x2eb224(0x29f)||_0xe91c5e['format']==='jsonl'||_0xe91c5e[_0x2eb224(0x2e1)]==='table')await handleSDKOutput(_0x44f0e5,_0xe91c5e);else{if(_0x44f0e5[_0x2eb224(0x17c)]===0x0)_0x56492f?console['log'](_0x2eb224(0x148)+_0x56492f):console[_0x2eb224(0x2bd)](_0x2eb224(0x20d));else{const _0x137dd3=_0x44f0e5['map'](_0x555ca6=>{const _0x4d06ee=_0x2eb224,_0x250d5b=_0x555ca6['metadata']?.[_0x4d06ee(0x29d)](_0x576418=>_0x576418[_0x4d06ee(0x225)]===_0x4d06ee(0x1ff)),_0x5a4a55=_0x250d5b?a55_0x262d9e[_0x4d06ee(0x312)](_0x4d06ee(0x2c9)):'';return _0x4d06ee(0x2f8)+_0x555ca6[_0x4d06ee(0x172)]+_0x5a4a55;});await writeOutput(_0x137dd3[_0x2eb224(0x303)]('\x0a'),_0xe91c5e[_0x2eb224(0x233)],_0x2eb224(0x308));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x24f);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x1e0);async[a55_0x29f4d0(0x211)](_0x1ca9a8){const _0xbbd5d3=a55_0x29f4d0,{options:_0x5a7e74,args:_0x2d3e73,tdx:_0x5f80df}=_0x1ca9a8,_0x18eaf3=this[_0xbbd5d3(0x235)](_0x2d3e73,_0x5a7e74);_0x5a7e74[_0xbbd5d3(0x28d)]&&_0x18eaf3&&console['error'](_0xbbd5d3(0x191)+_0x18eaf3);const _0x3fac32=await withSpinner(_0xbbd5d3(0x2eb),()=>_0x5f80df[_0xbbd5d3(0x2ba)][_0xbbd5d3(0x254)](_0x18eaf3,{'limit':_0x5a7e74['limit']}),{'verbose':_0x5a7e74['verbose']});let _0x3d5f36=_0x3fac32[_0xbbd5d3(0x2a6)];_0x3d5f36[_0xbbd5d3(0x242)]((_0x233bd1,_0x54a008)=>{const _0x5b66b0=_0xbbd5d3,_0x232d8f=_0x233bd1['name'][_0x5b66b0(0x2c8)](_0x54a008[_0x5b66b0(0x172)]);if(_0x232d8f!==0x0)return _0x232d8f;return(_0x233bd1[_0x5b66b0(0x1c8)]?.[_0x5b66b0(0x172)]||'')[_0x5b66b0(0x2c8)](_0x54a008[_0x5b66b0(0x1c8)]?.[_0x5b66b0(0x172)]||'');});const _0x50aa29=_0x5a7e74[_0xbbd5d3(0x2a8)]&&_0x3d5f36['length']>=_0x5a7e74[_0xbbd5d3(0x2a8)]?a55_0x262d9e[_0xbbd5d3(0x312)](_0xbbd5d3(0x2da)):'';console[_0xbbd5d3(0x2f5)](_0xbbd5d3(0x18b)+_0x3d5f36[_0xbbd5d3(0x17c)]+_0xbbd5d3(0x1c1)+(_0x3d5f36[_0xbbd5d3(0x17c)]!==0x1?'s':'')+_0x50aa29);if(_0x5a7e74['format']===_0xbbd5d3(0x29f)||_0x5a7e74[_0xbbd5d3(0x2e1)]===_0xbbd5d3(0x232)||_0x5a7e74[_0xbbd5d3(0x2e1)]===_0xbbd5d3(0x296))await handleSDKOutput(_0x3d5f36,_0x5a7e74);else{if(_0x3d5f36[_0xbbd5d3(0x17c)]===0x0)_0x18eaf3?console['log'](_0xbbd5d3(0x176)+_0x18eaf3):console[_0xbbd5d3(0x2bd)](_0xbbd5d3(0x141));else{const _0x5e0003=_0x5a7e74['site'],_0x4b1636=_0x3d5f36[_0xbbd5d3(0x27e)](_0x1127ef=>{const _0x5aa1bd=_0xbbd5d3,_0x47b249=a55_0x262d9e['dim']('#'+_0x1127ef['id']),_0x2f5591=hyperlink(_0x47b249,getWorkflowUrl(_0x5e0003,_0x1127ef['id'])),_0x1c83da=_0x1127ef[_0x5aa1bd(0x1c8)]?.['name']?a55_0x262d9e[_0x5aa1bd(0x312)]('\x20('+_0x1127ef[_0x5aa1bd(0x1c8)][_0x5aa1bd(0x172)]+')'):'';return _0x5aa1bd(0x16b)+_0x2f5591+'\x20'+_0x1127ef[_0x5aa1bd(0x172)]+_0x1c83da;});await writeOutput(_0x4b1636[_0xbbd5d3(0x303)]('\x0a'),_0x5a7e74[_0xbbd5d3(0x233)],_0xbbd5d3(0x308));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x1ae);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x175);async[a55_0x29f4d0(0x211)](_0x1f6096){const _0x51b3d9=a55_0x29f4d0,{options:_0x4b9fbd,args:_0x67ae32,tdx:_0x4738a0}=_0x1f6096,_0x5948b6=this[_0x51b3d9(0x19d)](_0x67ae32,_0x4b9fbd);if(!_0x5948b6)return 0x1;const {projectName:_0x26cfa8,workflowName:_0x26e166}=_0x5948b6;if(_0x4b9fbd['verbose']){if(_0x26cfa8&&_0x26e166)console[_0x51b3d9(0x2f5)](_0x51b3d9(0x1a2)+_0x26cfa8+'.'+_0x26e166);else _0x26cfa8&&console[_0x51b3d9(0x2f5)]('Filter:\x20project='+_0x26cfa8);const _0x5704d9=_0x4b9fbd['status'];_0x5704d9&&console[_0x51b3d9(0x2f5)](_0x51b3d9(0x1ed)+_0x5704d9);}let _0x36e290=0x28;if(process[_0x51b3d9(0x281)][_0x51b3d9(0x2c5)]&&!_0x4b9fbd['output']&&!_0x4b9fbd[_0x51b3d9(0x2e1)]){const _0x30fb18=process[_0x51b3d9(0x281)][_0x51b3d9(0x221)]||0x28;_0x36e290=Math['max'](0x14,Math[_0x51b3d9(0x2f1)](_0x30fb18*0x2/0x3));}const _0xa972e4=_0x4b9fbd[_0x51b3d9(0x2a8)]||_0x36e290,_0x4c583d=await withSpinner(_0x51b3d9(0x309),()=>_0x4738a0[_0x51b3d9(0x2ba)][_0x51b3d9(0x2bc)]({'projectName':_0x26cfa8,'workflowName':_0x26e166,'status':_0x4b9fbd[_0x51b3d9(0x307)],'fromTime':_0x4b9fbd[_0x51b3d9(0x194)],'toTime':_0x4b9fbd['to'],'limit':_0xa972e4}),{'verbose':_0x4b9fbd[_0x51b3d9(0x28d)]}),_0x10f895=_0x4c583d['data'];_0x10f895[_0x51b3d9(0x242)]((_0x4b68a3,_0x2292fa)=>{const _0x320f01=_0x51b3d9,_0x34caa3=_0x4b68a3[_0x320f01(0x21c)]||'',_0x1ed170=_0x2292fa['sessionTime']||'';return _0x1ed170[_0x320f01(0x2c8)](_0x34caa3);});_0x10f895[_0x51b3d9(0x17c)]>=_0xa972e4?console[_0x51b3d9(0x2f5)](_0x51b3d9(0x1b0)+_0x10f895['length']+_0x51b3d9(0x245)+a55_0x262d9e[_0x51b3d9(0x312)](_0x51b3d9(0x316))):console[_0x51b3d9(0x2f5)]('✔\x20Found\x20'+_0x10f895[_0x51b3d9(0x17c)]+_0x51b3d9(0x18e)+(_0x10f895[_0x51b3d9(0x17c)]!==0x1?'s':''));if(_0x4b9fbd[_0x51b3d9(0x2e1)]===_0x51b3d9(0x29f)||_0x4b9fbd[_0x51b3d9(0x2e1)]===_0x51b3d9(0x232)||_0x4b9fbd[_0x51b3d9(0x2e1)]===_0x51b3d9(0x296))await handleSDKOutput(_0x10f895,_0x4b9fbd);else{if(!process[_0x51b3d9(0x281)][_0x51b3d9(0x2c5)]||_0x4b9fbd[_0x51b3d9(0x233)]){if(_0x10f895[_0x51b3d9(0x17c)]===0x0){if(_0x26cfa8&&_0x26e166)console[_0x51b3d9(0x2bd)](_0x51b3d9(0x1fa)+_0x26cfa8+'.'+_0x26e166);else _0x26cfa8?console[_0x51b3d9(0x2bd)](_0x51b3d9(0x1bc)+_0x26cfa8):console[_0x51b3d9(0x2bd)](_0x51b3d9(0x234));}else{const _0x173a84=_0x4b9fbd[_0x51b3d9(0x313)],_0x2850d0=this[_0x51b3d9(0x2b6)](_0x10f895,_0x173a84);_0x4b9fbd[_0x51b3d9(0x233)]?await writeOutput(_0x2850d0,_0x4b9fbd['output'],_0x51b3d9(0x308)):console[_0x51b3d9(0x2bd)](_0x2850d0);}!_0x26cfa8&&(console[_0x51b3d9(0x2f5)](''),console[_0x51b3d9(0x2f5)](a55_0x262d9e['dim'](_0x51b3d9(0x267))),console[_0x51b3d9(0x2f5)](a55_0x262d9e['dim'](_0x51b3d9(0x150))+'or'+a55_0x262d9e['dim'](_0x51b3d9(0x1ec))));}else{if(_0x10f895[_0x51b3d9(0x17c)]===0x0){if(_0x26cfa8&&_0x26e166)console['log'](_0x51b3d9(0x1fa)+_0x26cfa8+'.'+_0x26e166);else _0x26cfa8?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x26cfa8):console[_0x51b3d9(0x2bd)](_0x51b3d9(0x234));}else await this[_0x51b3d9(0x31a)](_0x10f895,_0x1f6096,_0x26cfa8);}}return 0x0;}[a55_0x29f4d0(0x2b6)](_0x10acff,_0x2e380d){const _0x2930db=a55_0x29f4d0,_0x153f65=[],_0xe709d2=new Map();let _0x52df3e=Infinity,_0x2d33ef=-Infinity;for(const _0x35d4b9 of _0x10acff){if(_0x35d4b9[_0x2930db(0x2fc)]?.['createdAt']){const _0x255dca=new Date(_0x35d4b9[_0x2930db(0x2fc)][_0x2930db(0x2e8)])['getTime'](),_0x379ec3=_0x35d4b9['lastAttempt']['finishedAt']?new Date(_0x35d4b9[_0x2930db(0x2fc)][_0x2930db(0x1d0)])[_0x2930db(0x19b)]():Date[_0x2930db(0x311)](),_0xf4bc3f=_0x35d4b9[_0x2930db(0x1c8)]?.[_0x2930db(0x172)]||_0x2930db(0x19a);!_0xe709d2[_0x2930db(0x276)](_0xf4bc3f)&&_0xe709d2[_0x2930db(0x182)](_0xf4bc3f,[]),_0xe709d2[_0x2930db(0x23e)](_0xf4bc3f)[_0x2930db(0x2b7)]({'session':_0x35d4b9,'startTime':_0x255dca,'endTime':_0x379ec3,'duration':_0x379ec3-_0x255dca}),_0x52df3e=Math[_0x2930db(0x231)](_0x52df3e,_0x255dca),_0x2d33ef=Math[_0x2930db(0x180)](_0x2d33ef,_0x379ec3);}}if(_0xe709d2[_0x2930db(0x2ac)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x5878d1=process[_0x2930db(0x281)][_0x2930db(0x1e5)]||0x78,_0x4e67b8=0x1e,_0x37e1d9=0x32,_0x35c718=0x4,_0x4cc399=Math[_0x2930db(0x231)](_0x37e1d9,Math[_0x2930db(0x180)](_0x4e67b8,Math[_0x2930db(0x2f1)](_0x5878d1*0.3))),_0x51673e=_0x5878d1-_0x4cc399-TIMELINE_CONFIG[_0x2930db(0x2b3)]-0x3-_0x35c718,_0x46f431=_0x2d33ef-_0x52df3e,_0x3142bd=_0x46f431/_0x4cc399,_0x46e7b8=renderTimeAxis({'startTime':_0x52df3e,'endTime':_0x2d33ef,'durationMs':_0x46f431,'msPerChar':_0x3142bd},_0x4cc399),_0x355408=[];for(const _0x14fef8 of _0xe709d2[_0x2930db(0x2c4)]()){_0x355408[_0x2930db(0x2b7)](..._0x14fef8);}_0x355408['sort']((_0x3942c9,_0x5cab5d)=>_0x5cab5d[_0x2930db(0x282)]-_0x3942c9[_0x2930db(0x282)]);const _0x861ca5=new Date(_0x52df3e),_0x4d8bfa=formatDate(_0x861ca5),_0x28d088=_0x35c718+TIMELINE_CONFIG[_0x2930db(0x2fe)]+TIMELINE_CONFIG[_0x2930db(0x1f2)]+_0x51673e,_0x43df53='\x20'['repeat'](_0x28d088-_0x4d8bfa[_0x2930db(0x17c)]),_0x4fe8da=_0x43df53+a55_0x262d9e[_0x2930db(0x312)](_0x4d8bfa)+'\x20'+_0x46e7b8;_0x153f65[_0x2930db(0x2b7)](_0x4fe8da);const _0x97b29b=0x16;let _0x4a68d0=0x0;for(const _0x56d537 of _0x355408){const _0x15e044=_0x56d537[_0x2930db(0x209)][_0x2930db(0x1c8)]?.['name']||'?',_0x32abe8=Math[_0x2930db(0x231)](stringWidth(_0x15e044),_0x97b29b);_0x4a68d0=Math[_0x2930db(0x180)](_0x4a68d0,_0x32abe8);}for(const _0x48e570 of _0x355408){const {session:_0x10e39c,startTime:_0x8244c,endTime:_0x103615,duration:_0x2fe326}=_0x48e570,_0x5780c8=_0x10e39c[_0x2930db(0x1c8)]?.['id'],_0x32f3af=_0x10e39c['id'],_0x10846e=_0x10e39c[_0x2930db(0x1c8)]?.['name']||'?',_0x2232b9=_0x10e39c[_0x2930db(0x2ba)]?.[_0x2930db(0x172)]||'?';let _0x299acc,_0x312f7e;if(_0x10e39c[_0x2930db(0x2fc)]){const _0xaad4c4=_0x10e39c[_0x2930db(0x2fc)];!_0xaad4c4[_0x2930db(0x195)]?(_0x299acc=_0xaad4c4[_0x2930db(0x15d)]?'🛑':'🔄',_0x312f7e=_0xaad4c4[_0x2930db(0x15d)]?a55_0x262d9e[_0x2930db(0x1ea)]:a55_0x262d9e[_0x2930db(0x2ab)]):(_0x299acc=_0xaad4c4[_0x2930db(0x24c)]?'✅':'❌',_0x312f7e=_0xaad4c4[_0x2930db(0x24c)]?a55_0x262d9e['green']:a55_0x262d9e[_0x2930db(0x25b)]);}else _0x299acc='⏳',_0x312f7e=a55_0x262d9e[_0x2930db(0x312)];const _0x21879a='#'+_0x32f3af,_0xc99148=_0x5780c8?hyperlink(_0x21879a,getWorkflowSessionUrl(_0x2e380d,_0x5780c8,_0x32f3af)):_0x21879a;let _0x4a7e52=_0x10846e;stringWidth(_0x10846e)>_0x97b29b&&(_0x4a7e52=_0x10846e['slice'](0x0,_0x97b29b-0x1)+'…');const _0x33a718=a55_0x262d9e[_0x2930db(0x312)](_0x4a7e52),_0x2fdaa1=stringWidth(_0x4a7e52),_0x14ff41='\x20'[_0x2930db(0x22b)](_0x4a68d0-stringWidth(_0x4a7e52)+0x2),_0x307830='('+formatElapsed(_0x2fe326)+')',_0x36c1ae=stringWidth(_0x307830),_0x21f953=stringWidth(_0x21879a),_0x25b2d8=_0x21f953+0x1+_0x2fdaa1+_0x14ff41[_0x2930db(0x17c)],_0x152899=_0x51673e-_0x25b2d8-_0x36c1ae-0x1-0x8;let _0x32f0f2=_0x2232b9;stringWidth(_0x32f0f2)>_0x152899&&(_0x32f0f2=_0x32f0f2[_0x2930db(0x2f7)](0x0,_0x152899-0x1)+'…');const _0x1c5c10=_0xc99148+'\x20'+_0x33a718+_0x14ff41+_0x32f0f2,_0x1f4b3e=stringWidth(_0x1c5c10),_0x279624=_0x51673e-_0x1f4b3e-_0x36c1ae,_0xa5fb42=_0x1c5c10+'\x20'[_0x2930db(0x22b)](Math[_0x2930db(0x180)](0x1,_0x279624))+a55_0x262d9e[_0x2930db(0x312)](_0x307830),_0x4f475d=Math[_0x2930db(0x2f1)]((_0x8244c-_0x52df3e)/_0x3142bd),_0x2fb9ed=Math[_0x2930db(0x2f1)]((_0x103615-_0x52df3e)/_0x3142bd),_0x150c2c=Math[_0x2930db(0x180)](_0x4f475d+0x1,_0x2fb9ed),_0x42a19f=new Array(_0x4cc399)['fill']('\x20');for(let _0x2653dc=_0x4f475d;_0x2653dc<Math[_0x2930db(0x231)](_0x150c2c,_0x4cc399);_0x2653dc++){_0x42a19f[_0x2653dc]='─';}const _0x1499fa=_0x42a19f[_0x2930db(0x27e)](_0xf1153e=>_0xf1153e==='\x20'?'\x20':_0x312f7e(_0xf1153e))[_0x2930db(0x303)]('');_0x153f65[_0x2930db(0x2b7)](_0x299acc+'\x20'+_0xa5fb42+'│'+_0x1499fa+'│');}return _0x153f65['join']('\x0a');}async['navigateSessionsInteractive'](_0x155d32,_0x43bb8f,_0x27a0cf){const _0x11de39=a55_0x29f4d0,{options:_0x3a9210,tdx:_0x5ef6d9}=_0x43bb8f,_0x5d910f=_0x3a9210[_0x11de39(0x313)],{timelineRows:_0x162e77,timeAxisHeader:_0x10f886}=this[_0x11de39(0x162)](_0x155d32,_0x5d910f),_0x1ea24e=_0x162e77[_0x11de39(0x277)](_0x5909cd=>_0x5909cd[_0x11de39(0x169)]);if(_0x1ea24e['length']===0x0){const _0xa769e0=this['renderSessionsTimeline'](_0x155d32,_0x5d910f);console[_0x11de39(0x2bd)](_0xa769e0);!_0x27a0cf&&(console[_0x11de39(0x2f5)](''),console['error'](a55_0x262d9e[_0x11de39(0x312)](_0x11de39(0x267))),console[_0x11de39(0x2f5)](a55_0x262d9e['dim'](_0x11de39(0x150))+'or'+a55_0x262d9e['dim'](_0x11de39(0x1ec))));return;}_0x10f886&&console['log'](_0x10f886);const _0x4b3eb4=_0x162e77[_0x11de39(0x277)](_0x2cda64=>_0x2cda64[_0x11de39(0x169)])[_0x11de39(0x27e)](_0x4651bb=>({'title':_0x4651bb['displayLine'],'value':_0x4651bb[_0x11de39(0x169)]})),_0x177c60=process[_0x11de39(0x281)][_0x11de39(0x221)]||0x3c,_0x436f3c=Math[_0x11de39(0x180)](0x28,Math[_0x11de39(0x2f1)](_0x177c60*0x2/0x3)),_0x455626=await a55_0x353259({'type':_0x11de39(0x2f6),'name':_0x11de39(0x169),'message':_0x11de39(0x304),'choices':_0x4b3eb4,'initial':-0x1,'limit':_0x436f3c,'clearFirst':!![],'fallback':{'title':_0x11de39(0x152),'value':null},'suggest':(_0x28baf2,_0x182422)=>{const _0xb2cd86=_0x11de39;if(!_0x28baf2)return Promise[_0xb2cd86(0x17e)](_0x182422);const _0x2b899c=_0x182422[_0xb2cd86(0x277)](_0x1c6b1a=>{const _0x27000e=_0xb2cd86,_0x777ef8=_0x1c6b1a;return _0x777ef8[_0x27000e(0x2b9)][_0x27000e(0x142)]()[_0x27000e(0x208)](_0x28baf2[_0x27000e(0x142)]());});return Promise[_0xb2cd86(0x17e)](_0x2b899c);}}),_0x5db556=()=>{const _0x5dba68=_0x11de39;process[_0x5dba68(0x281)][_0x5dba68(0x21e)](_0x5dba68(0x210)),process[_0x5dba68(0x281)][_0x5dba68(0x21e)]('\x1b[1A\x1b[2K'),process[_0x5dba68(0x281)][_0x5dba68(0x21e)](_0x5dba68(0x210));},_0x4e9a4c=_0x455626&&_0x455626['attemptId']&&_0x455626['attemptId']!==null&&_0x455626[_0x11de39(0x169)]['trim']()!=='';if(!_0x4e9a4c){_0x5db556(),console[_0x11de39(0x2bd)](a55_0x262d9e[_0x11de39(0x312)]('Cancelled'));return;}_0x5db556();const _0x500b01=_0x155d32[_0x11de39(0x15e)](_0x153f81=>_0x153f81[_0x11de39(0x2fc)]?.['id']===_0x455626[_0x11de39(0x169)]);if(_0x500b01){const _0x5b818e=_0x500b01[_0x11de39(0x1c8)]?.['name']||'?',_0x151959=_0x500b01['workflow']?.[_0x11de39(0x172)]||'?';console[_0x11de39(0x2bd)](_0x11de39(0x1ba)+a55_0x262d9e['dim'](_0x5b818e)+',\x20Workflow:\x20'+a55_0x262d9e[_0x11de39(0x312)](_0x151959));}const _0x167409=new WorkflowTimelineCommand();await _0x167409[_0x11de39(0x211)]({'args':[],'options':{..._0x3a9210,'attemptId':_0x455626[_0x11de39(0x169)]},'tdx':_0x5ef6d9});}[a55_0x29f4d0(0x162)](_0x4df821,_0x2d6632){const _0x575134=a55_0x29f4d0,_0x3ac6b0=new Map();for(const _0x345dda of _0x4df821){_0x345dda['id']&&_0x345dda[_0x575134(0x2fc)]?.['id']&&_0x3ac6b0[_0x575134(0x182)](_0x345dda['id'],_0x345dda[_0x575134(0x2fc)]['id']);}const _0x215b08=[];let _0x59ec77='';const _0x1f0ed9=this[_0x575134(0x2b6)](_0x4df821,_0x2d6632),_0x4875b7=_0x1f0ed9[_0x575134(0x248)]('\x0a');for(const _0x394ddc of _0x4875b7){if(_0x394ddc[_0x575134(0x205)](_0x575134(0x298))||_0x394ddc[_0x575134(0x2ec)](/^\s+\d{4}-\d{2}-\d{2}/))_0x59ec77=_0x394ddc;else{if(_0x394ddc['match'](/^[✅❌🔄🛑⏳]/)){const _0x334d12=_0x394ddc[_0x575134(0x2ec)](/#(\d+)/),_0x23f413=_0x334d12?_0x334d12[0x1]:null,_0x15a98c=_0x23f413?_0x3ac6b0['get'](_0x23f413)||null:null,_0x33dda4=_0x4df821[_0x575134(0x15e)](_0x398ebc=>_0x398ebc['id']===_0x23f413),_0xed7fa2=_0x33dda4?.['project']?.[_0x575134(0x172)]||'';_0x215b08[_0x575134(0x2b7)]({'displayLine':_0x394ddc,'attemptId':_0x15a98c,'projectName':_0xed7fa2});}}}return{'timelineRows':_0x215b08,'timeAxisHeader':_0x59ec77};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x1ab);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2df);async['execute'](_0x1a7397){const _0x4254fa=a55_0x29f4d0,{options:_0x4119d0,args:_0x4cf0ec,tdx:_0x24c181}=_0x1a7397,_0x2288a6=this[_0x4254fa(0x19d)](_0x4cf0ec,_0x4119d0);if(!_0x2288a6)return 0x1;const {projectName:_0x64dafc,workflowName:_0x688523}=_0x2288a6,_0x1438c3=_0x4119d0[_0x4254fa(0x203)];if(_0x4119d0['verbose']){if(_0x64dafc&&_0x688523)console[_0x4254fa(0x2f5)](_0x4254fa(0x1a2)+_0x64dafc+'.'+_0x688523);else _0x64dafc&&console['error'](_0x4254fa(0x184)+_0x64dafc);_0x1438c3&&console[_0x4254fa(0x2f5)]('Include\x20retried:\x20yes');}const _0x2521b8=await withSpinner(_0x4254fa(0x16e),()=>_0x24c181[_0x4254fa(0x2ba)][_0x4254fa(0x178)]({'projectName':_0x64dafc,'workflowName':_0x688523,'includeRetried':_0x1438c3,'limit':_0x4119d0[_0x4254fa(0x2a8)]}),{'verbose':_0x4119d0[_0x4254fa(0x28d)]}),_0x23a008=_0x2521b8[_0x4254fa(0x2a6)],_0x4a2d3e=_0x4119d0['limit']||0x64,_0xf1916b=_0x23a008[_0x4254fa(0x17c)]>=_0x4a2d3e?a55_0x262d9e['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x4254fa(0x2f5)]('✔\x20Found\x20'+_0x23a008[_0x4254fa(0x17c)]+'\x20attempt'+(_0x23a008[_0x4254fa(0x17c)]!==0x1?'s':'')+_0xf1916b);if(_0x4119d0[_0x4254fa(0x2e1)]==='json'||_0x4119d0['format']===_0x4254fa(0x232)||_0x4119d0['format']==='table')await handleSDKOutput(_0x23a008,_0x4119d0);else{if(_0x23a008[_0x4254fa(0x17c)]===0x0){if(_0x64dafc&&_0x688523)console[_0x4254fa(0x2bd)]('No\x20attempts\x20found\x20for:\x20'+_0x64dafc+'.'+_0x688523);else _0x64dafc?console['log'](_0x4254fa(0x2e4)+_0x64dafc):console[_0x4254fa(0x2bd)](_0x4254fa(0x237));}else{const _0x443a57=_0x4119d0['site'],_0x392902=_0x23a008[_0x4254fa(0x27e)](_0x4be71c=>{const _0x59f7f4=_0x4254fa,_0x153cab=a55_0x262d9e['dim']('#'+_0x4be71c['id']),_0x18eeca=_0x4be71c[_0x59f7f4(0x1c8)]?.['id'],_0x1b837b=_0x4be71c[_0x59f7f4(0x217)]||_0x4be71c[_0x59f7f4(0x163)],_0x162c50=_0x18eeca&&_0x1b837b?hyperlink(_0x153cab,getWorkflowAttemptUrl(_0x443a57,_0x18eeca,_0x1b837b,_0x4be71c['id'])):_0x153cab,{icon:_0x155e2e,text:_0x37852d}=getAttemptStatusDisplay(_0x4be71c),_0xa6412b=(_0x4be71c['project']?.['name']||'?')+'.'+(_0x4be71c[_0x59f7f4(0x2ba)]?.[_0x59f7f4(0x172)]||'?'),_0x367b18=_0x4be71c['sessionTime']?a55_0x262d9e[_0x59f7f4(0x312)](_0x4be71c[_0x59f7f4(0x21c)]):'';return(_0x162c50+'\x20'+_0x155e2e+(_0x37852d?'\x20'+_0x37852d:'')+'\x20'+_0xa6412b+'\x20'+_0x367b18)[_0x59f7f4(0x2ef)]();});await writeOutput(_0x392902[_0x4254fa(0x303)]('\x0a'),_0x4119d0['output'],_0x4254fa(0x308));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a55_0x29f4d0(0x1bb)]='Show\x20specific\x20attempt\x20details';async['execute'](_0x5d57d9){const _0x6a62d6=a55_0x29f4d0,{options:_0x1cebc0,args:_0x19a0d2,tdx:_0x1afe58}=_0x5d57d9,_0x38cdf2=_0x19a0d2[0x0];if(!_0x38cdf2)return console[_0x6a62d6(0x2f5)](_0x6a62d6(0x22e)),0x1;_0x1cebc0[_0x6a62d6(0x28d)]&&console[_0x6a62d6(0x2f5)](_0x6a62d6(0x1c5)+_0x38cdf2);const _0x237159=await withSpinner(_0x6a62d6(0x144),()=>_0x1afe58[_0x6a62d6(0x2ba)][_0x6a62d6(0x291)](_0x38cdf2),{'verbose':_0x1cebc0[_0x6a62d6(0x28d)]}),_0x5c033c=_0x237159[_0x6a62d6(0x2a6)];let _0x3c754e;!_0x5c033c['done']?_0x3c754e=_0x5c033c[_0x6a62d6(0x15d)]?_0x6a62d6(0x2bf):_0x6a62d6(0x207):_0x3c754e=_0x5c033c[_0x6a62d6(0x24c)]?_0x6a62d6(0x24c):_0x6a62d6(0x2f5);let _0x43c995;if(_0x5c033c[_0x6a62d6(0x2e8)]&&_0x5c033c['finishedAt']){const _0x5820c8=new Date(_0x5c033c[_0x6a62d6(0x2e8)])[_0x6a62d6(0x19b)](),_0x1db206=new Date(_0x5c033c['finishedAt'])[_0x6a62d6(0x19b)]();_0x43c995=Math[_0x6a62d6(0x222)]((_0x1db206-_0x5820c8)/0x3e8);}const _0x3f34da={'attempt_id':_0x5c033c['id'],'status':_0x3c754e,..._0x5c033c[_0x6a62d6(0x204)]!==undefined&&{'index':_0x5c033c[_0x6a62d6(0x204)]},..._0x5c033c[_0x6a62d6(0x1c8)]&&{'project':_0x5c033c[_0x6a62d6(0x1c8)][_0x6a62d6(0x172)]},..._0x5c033c[_0x6a62d6(0x2ba)]&&{'workflow':_0x5c033c[_0x6a62d6(0x2ba)][_0x6a62d6(0x172)]},..._0x5c033c['sessionId']&&{'session_id':_0x5c033c[_0x6a62d6(0x163)]},..._0x5c033c[_0x6a62d6(0x21c)]&&{'session_time':_0x5c033c[_0x6a62d6(0x21c)]},..._0x5c033c[_0x6a62d6(0x26a)]&&{'retry_attempt':_0x5c033c[_0x6a62d6(0x26a)]},..._0x43c995!==undefined&&{'duration_sec':_0x43c995},..._0x5c033c[_0x6a62d6(0x2e8)]&&{'created_at':_0x5c033c[_0x6a62d6(0x2e8)]},..._0x5c033c[_0x6a62d6(0x1d0)]&&{'finished_at':_0x5c033c[_0x6a62d6(0x1d0)]},...Object[_0x6a62d6(0x186)](_0x5c033c[_0x6a62d6(0x19f)])[_0x6a62d6(0x17c)]>0x0&&{'params':_0x5c033c[_0x6a62d6(0x19f)]}};return await handleSingleObjectOutput(_0x3f34da,_0x1cebc0),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x29f4d0(0x172)]='workflow:tasks';[a55_0x29f4d0(0x1bb)]='Show\x20tasks\x20for\x20an\x20attempt';async['execute'](_0x8145b7){const _0x14ba70=a55_0x29f4d0,{options:_0x5724ad,args:_0x2e2a13,tdx:_0x4ba9b6}=_0x8145b7,_0x57584e=_0x2e2a13[0x0];if(!_0x57584e)return console[_0x14ba70(0x2f5)](_0x14ba70(0x22e)),0x1;const _0x2d4e4b=_0x5724ad[_0x14ba70(0x2be)];_0x5724ad[_0x14ba70(0x28d)]&&(console[_0x14ba70(0x2f5)](_0x14ba70(0x1c5)+_0x57584e),_0x2d4e4b&&console[_0x14ba70(0x2f5)](_0x14ba70(0x159)));const _0x3da813=await withSpinner(_0x14ba70(0x26f),()=>_0x4ba9b6[_0x14ba70(0x2ba)][_0x14ba70(0x2fa)](_0x57584e,_0x2d4e4b||![]),{'verbose':_0x5724ad[_0x14ba70(0x28d)]}),_0xc224df=_0x3da813[_0x14ba70(0x2a6)];return console['error'](_0x14ba70(0x18b)+_0xc224df['length']+_0x14ba70(0x2c3)+(_0xc224df[_0x14ba70(0x17c)]!==0x1?'s':'')),await handleSDKOutput(_0xc224df,_0x5724ad),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x278);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2a0);async[a55_0x29f4d0(0x211)](_0x38fb04){const _0x11f4e6=a55_0x29f4d0,{options:_0x5704c5,args:_0x45914a,tdx:_0x4f2354}=_0x38fb04,_0x135077=_0x45914a[0x0];let _0x2eaf2c=_0x45914a[0x1];if(!_0x135077)return console[_0x11f4e6(0x2f5)](_0x11f4e6(0x22e)),0x1;_0x5704c5[_0x11f4e6(0x28d)]&&(console[_0x11f4e6(0x2f5)](_0x11f4e6(0x1c5)+_0x135077),_0x2eaf2c&&console['error'](_0x11f4e6(0x244)+_0x2eaf2c));const _0x16949e=await withSpinner(_0x11f4e6(0x1bd),()=>_0x4f2354[_0x11f4e6(0x2ba)]['logFiles'](_0x135077,_0x2eaf2c),{'verbose':_0x5704c5[_0x11f4e6(0x28d)]}),_0x93ed3b=_0x16949e[_0x11f4e6(0x2a6)];if(_0x93ed3b[_0x11f4e6(0x17c)]===0x0)return console['error'](_0x11f4e6(0x24a)),0x0;if(!_0x2eaf2c&&(_0x5704c5[_0x11f4e6(0x29f)]||_0x5704c5[_0x11f4e6(0x2e1)]))return await handleSDKOutput(_0x93ed3b,_0x5704c5),0x0;if(!_0x2eaf2c){const _0x2fa03a=_0x93ed3b['map'](_0x5a0dd8=>({'title':_0x5a0dd8[_0x11f4e6(0x256)]+'\x20('+formatBytes(_0x5a0dd8['fileSize'])+')','value':_0x5a0dd8[_0x11f4e6(0x256)]})),_0x28999b=await a55_0x353259({'type':_0x11f4e6(0x2e3),'name':_0x11f4e6(0x1dd),'message':_0x11f4e6(0x246),'choices':_0x2fa03a});if(!_0x28999b[_0x11f4e6(0x1dd)])return console[_0x11f4e6(0x2f5)](_0x11f4e6(0x1e8)),0x0;_0x2eaf2c=_0x28999b[_0x11f4e6(0x1dd)];}const _0x4f86d4=await withSpinner(_0x11f4e6(0x2d1),()=>_0x4f2354['workflow'][_0x11f4e6(0x2f4)](_0x135077,_0x2eaf2c),{'verbose':_0x5704c5[_0x11f4e6(0x28d)]}),_0x1704bb=_0x4f86d4['data'];return _0x1704bb?console[_0x11f4e6(0x2bd)](_0x1704bb):console['error'](_0x11f4e6(0x2c6)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a55_0x29f4d0(0x243);[a55_0x29f4d0(0x1bb)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x22fde7){const _0x5e4f9f=a55_0x29f4d0,{options:_0x17e7a4,args:_0x517554,tdx:_0x16f569}=_0x22fde7,_0x47da33=_0x517554[0x0];if(!_0x47da33)return console[_0x5e4f9f(0x2f5)](_0x5e4f9f(0x22e)),0x1;const _0x39b95d=_0x17e7a4['reason'];_0x17e7a4[_0x5e4f9f(0x28d)]&&(console[_0x5e4f9f(0x2f5)](_0x5e4f9f(0x1c5)+_0x47da33),_0x39b95d&&console[_0x5e4f9f(0x2f5)](_0x5e4f9f(0x226)+_0x39b95d));if(!_0x17e7a4[_0x5e4f9f(0x202)]){if(!isInteractive())return console[_0x5e4f9f(0x2f5)](a55_0x262d9e['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5e4f9f(0x2f5)](a55_0x262d9e[_0x5e4f9f(0x312)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x24c8eb=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x47da33+'?');if(!_0x24c8eb)return console[_0x5e4f9f(0x2f5)](a55_0x262d9e[_0x5e4f9f(0x1ea)]('Cancelled')),0x1;}const _0xd0c3bd=await withSpinner('Killing\x20attempt...',()=>_0x16f569['workflow']['kill'](_0x47da33,_0x39b95d),{'verbose':_0x17e7a4[_0x5e4f9f(0x28d)]}),_0xea5e3f=_0xd0c3bd[_0x5e4f9f(0x2a6)];return console['error']('✔\x20'+_0xea5e3f),0x0;}}function a55_0x1841(_0x43c0d2,_0x4b9ad7){_0x43c0d2=_0x43c0d2-0x141;const _0x2684a3=a55_0x2684();let _0x184101=_0x2684a3[_0x43c0d2];return _0x184101;}export class WorkflowRetryCommand extends BaseCommand{[a55_0x29f4d0(0x172)]='workflow:retry';['description']=a55_0x29f4d0(0x25c);async[a55_0x29f4d0(0x211)](_0x23c8a0){const _0x47ff71=a55_0x29f4d0,{options:_0x4e04e6,args:_0x2c8ce5,tdx:_0x302b88}=_0x23c8a0,_0x554643=_0x2c8ce5[0x0];if(!_0x554643)return console['error'](_0x47ff71(0x2e5)),console['error'](_0x47ff71(0x199)),0x1;let _0x50b10c=![],_0x48a20c=_0x554643;if(_0x554643[_0x47ff71(0x205)](_0x47ff71(0x21b)))_0x50b10c=!![],_0x48a20c=_0x554643['substring'](0x8);else{if(_0x554643[_0x47ff71(0x205)](_0x47ff71(0x2af)))_0x50b10c=![],_0x48a20c=_0x554643['substring'](0x8);else return console[_0x47ff71(0x2f5)](_0x47ff71(0x145)),console[_0x47ff71(0x2f5)](_0x47ff71(0x199)),0x1;}const _0x2c5b50=_0x4e04e6[_0x47ff71(0x27a)],_0x524c45=_0x4e04e6[_0x47ff71(0x1aa)],_0x4557ad=_0x4e04e6['params'],_0x24053d=_0x4e04e6['force'];_0x4e04e6['verbose']&&(console['error'](_0x47ff71(0x306)+(_0x50b10c?'session':_0x47ff71(0x291))+'\x20'+_0x48a20c),_0x2c5b50&&console[_0x47ff71(0x2f5)](_0x47ff71(0x1ce)+_0x2c5b50),_0x524c45&&console[_0x47ff71(0x2f5)](_0x47ff71(0x27b)+_0x524c45),_0x4557ad&&console[_0x47ff71(0x2f5)](_0x47ff71(0x14a)+_0x4557ad),_0x24053d&&console[_0x47ff71(0x2f5)](_0x47ff71(0x193)));let _0x3ac377;if(_0x4557ad)try{if(_0x4557ad[_0x47ff71(0x205)]('@')){const _0x37e1d7=await import('fs/promises'),_0x4c9a26=_0x4557ad[_0x47ff71(0x2cd)](0x1),_0x4b06f6=await _0x37e1d7[_0x47ff71(0x2f3)](_0x4c9a26,_0x47ff71(0x18a));_0x3ac377=JSON[_0x47ff71(0x260)](_0x4b06f6);}else _0x3ac377=JSON[_0x47ff71(0x260)](_0x4557ad);}catch{return console[_0x47ff71(0x2f5)](_0x47ff71(0x1a0)),0x1;}if(!_0x4e04e6[_0x47ff71(0x202)]){if(!isInteractive())return console[_0x47ff71(0x2f5)](a55_0x262d9e[_0x47ff71(0x25b)](_0x47ff71(0x25d)),_0x47ff71(0x2ff)),console['error'](a55_0x262d9e[_0x47ff71(0x312)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2c9779=await confirmKey(_0x47ff71(0x2dd)+(_0x50b10c?_0x47ff71(0x209):_0x47ff71(0x291))+'\x20'+_0x48a20c+'?');if(!_0x2c9779)return console['error'](a55_0x262d9e[_0x47ff71(0x1ea)]('Cancelled')),0x1;}let _0x2172a4;_0x50b10c?_0x2172a4=await withSpinner(_0x47ff71(0x257),()=>_0x302b88[_0x47ff71(0x2ba)]['retrySession'](_0x48a20c,{'fromTask':_0x2c5b50,'retryParams':_0x3ac377}),{'verbose':_0x4e04e6[_0x47ff71(0x28d)]}):_0x2172a4=await withSpinner(_0x47ff71(0x214),()=>_0x302b88['workflow']['retryAttempt'](_0x48a20c,{'resumeFrom':_0x524c45,'retryParams':_0x3ac377,'force':_0x24053d}),{'verbose':_0x4e04e6[_0x47ff71(0x28d)]});const _0x57b30e=_0x2172a4[_0x47ff71(0x2a6)];return console['error']('✔\x20Retry\x20started'),console[_0x47ff71(0x2f5)](_0x47ff71(0x218)+_0x57b30e[_0x47ff71(0x169)]),console[_0x47ff71(0x2f5)](_0x47ff71(0x2aa)+_0x57b30e[_0x47ff71(0x163)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a55_0x29f4d0(0x15c);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x206);async[a55_0x29f4d0(0x211)](_0x5eb855){const _0x1be9f6=a55_0x29f4d0,{options:_0x5f49b6,args:_0x3af42b,tdx:_0xe6063c}=_0x5eb855;let _0x3bf6df=_0x3af42b[0x0];if(!_0x3bf6df){const _0x4d8dca=this[_0x1be9f6(0x235)]([],_0x5f49b6),_0x34e0c8=await withSpinner('Loading\x20workflows...',()=>_0xe6063c[_0x1be9f6(0x2ba)][_0x1be9f6(0x254)](_0x4d8dca,{'limit':_0x5f49b6[_0x1be9f6(0x2a8)]}),{'verbose':_0x5f49b6[_0x1be9f6(0x28d)]}),_0xa19877=_0x34e0c8[_0x1be9f6(0x2a6)];if(_0xa19877[_0x1be9f6(0x17c)]===0x0)return console['error'](_0x1be9f6(0x141)),!_0x4d8dca&&console[_0x1be9f6(0x2f5)](a55_0x262d9e[_0x1be9f6(0x312)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x14dc7a=_0xa19877[_0x1be9f6(0x27e)](_0x4d47da=>({'title':_0x4d47da[_0x1be9f6(0x1c8)]?.[_0x1be9f6(0x172)]+'.'+_0x4d47da['name'],'value':_0x4d47da[_0x1be9f6(0x1c8)]?.[_0x1be9f6(0x172)]+'.'+_0x4d47da[_0x1be9f6(0x172)],'description':_0x4d47da[_0x1be9f6(0x22c)]?'revision:\x20'+_0x4d47da[_0x1be9f6(0x22c)]:undefined})),_0x17a30e=await a55_0x353259({'type':_0x1be9f6(0x2e3),'name':_0x1be9f6(0x2ba),'message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x14dc7a});if(!_0x17a30e['workflow'])return 0x1;_0x3bf6df=_0x17a30e[_0x1be9f6(0x2ba)];}if(!_0x3bf6df['includes']('.')){const _0x1cb486=this[_0x1be9f6(0x235)]([],_0x5f49b6);if(_0x1cb486)_0x3bf6df=_0x1cb486+'.'+_0x3bf6df;else return console[_0x1be9f6(0x2f5)](a55_0x262d9e['red']('Error:'),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x1be9f6(0x2f5)](a55_0x262d9e[_0x1be9f6(0x312)](_0x1be9f6(0x23c))),0x1;}const _0x4be53d=_0x5f49b6[_0x1be9f6(0x1ac)],_0x555434=_0x5f49b6['sessionTime'],_0x2ba938={};if(_0x4be53d&&Array[_0x1be9f6(0x181)](_0x4be53d))for(const _0x737326 of _0x4be53d){const _0x1ca013=_0x737326[_0x1be9f6(0x1a4)]('=');if(_0x1ca013===-0x1)return console[_0x1be9f6(0x2f5)](_0x1be9f6(0x2ed)+_0x737326),console[_0x1be9f6(0x2f5)](_0x1be9f6(0x28a)),0x1;const _0x1f4922=_0x737326[_0x1be9f6(0x2cd)](0x0,_0x1ca013),_0x3c090b=_0x737326['substring'](_0x1ca013+0x1);try{_0x2ba938[_0x1f4922]=JSON[_0x1be9f6(0x260)](_0x3c090b);}catch{_0x2ba938[_0x1f4922]=_0x3c090b;}}_0x5f49b6[_0x1be9f6(0x28d)]&&(console[_0x1be9f6(0x2f5)](_0x1be9f6(0x264)+_0x3bf6df),Object[_0x1be9f6(0x186)](_0x2ba938)[_0x1be9f6(0x17c)]>0x0&&console[_0x1be9f6(0x2f5)](_0x1be9f6(0x1f5)+JSON[_0x1be9f6(0x236)](_0x2ba938)),_0x555434&&console[_0x1be9f6(0x2f5)](_0x1be9f6(0x153)+_0x555434));if(_0x5f49b6[_0x1be9f6(0x259)])return await this['executeDryRun'](_0x5eb855,_0x3bf6df,_0x2ba938,_0x555434);const _0xd9b4b6=await withSpinner(_0x1be9f6(0x30b),()=>_0xe6063c['workflow']['run'](_0x3bf6df,_0x2ba938,{'sessionTime':_0x555434}),{'verbose':_0x5f49b6[_0x1be9f6(0x28d)]}),_0x605af4=_0xd9b4b6['data'];console[_0x1be9f6(0x2f5)](_0x1be9f6(0x263)),console['error'](_0x1be9f6(0x198)+_0x605af4['id']),console[_0x1be9f6(0x2f5)](_0x1be9f6(0x2aa)+_0x605af4[_0x1be9f6(0x163)]),console[_0x1be9f6(0x2f5)](_0x1be9f6(0x1e6)+_0x605af4[_0x1be9f6(0x1c8)]?.['name']),console['error'](_0x1be9f6(0x1a1)+_0x605af4[_0x1be9f6(0x2ba)]?.[_0x1be9f6(0x172)]);if(_0x605af4[_0x1be9f6(0x1c8)]?.['id']&&_0x605af4[_0x1be9f6(0x163)]&&_0x605af4['id']){const _0x34c678=_0x5f49b6[_0x1be9f6(0x313)],_0x2a9a40=getConsoleUrl(_0x34c678,_0x1be9f6(0x23d)+_0x605af4['project']['id']+_0x1be9f6(0x2d8)+_0x605af4[_0x1be9f6(0x163)]+'/attempt/'+_0x605af4['id']);console[_0x1be9f6(0x2f5)](_0x1be9f6(0x2d3)+a55_0x262d9e['cyan'](_0x2a9a40));}return 0x0;}async['executeDryRun'](_0x1bcebf,_0x17ac81,_0x5d240e,_0x212134){const _0x502383=a55_0x29f4d0,{options:_0x4223a,tdx:_0x36a018}=_0x1bcebf,_0xd40e0=await withSpinner(_0x502383(0x30a)+_0x17ac81+_0x502383(0x23a),()=>_0x36a018['workflow']['getWorkflow'](_0x17ac81),{'verbose':_0x4223a[_0x502383(0x28d)]}),_0x384778=_0xd40e0[_0x502383(0x2a6)],_0x4967b8=_0x212134??new Date()[_0x502383(0x253)]();console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x240)](_0x502383(0x147)),_0x17ac81),console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x240)]('Session\x20time:'),_0x4967b8),console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x240)]('Parameters:'),JSON[_0x502383(0x236)](_0x5d240e)),console['log'](''),console['log'](a55_0x262d9e['bold'](_0x502383(0x1ca)));const _0x1fba5d=parseTaskGraph(_0x384778[_0x502383(0x1f4)]??null);if(_0x1fba5d[_0x502383(0x17c)]===0x0)console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x312)]('\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)'));else for(const _0x1a7716 of formatTaskGraph(_0x1fba5d)){console[_0x502383(0x2bd)](_0x1a7716);}const _0x272bb7=summarizeTaskGraph(_0x1fba5d),_0x3db1d7=formatWarningSummary(_0x272bb7);return _0x3db1d7&&(console['log'](''),console['log'](a55_0x262d9e[_0x502383(0x1ea)](_0x3db1d7))),console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x1ea)]('\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.')),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x2d0);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2c1);async[a55_0x29f4d0(0x211)](_0x284282){const _0x5cbc81=a55_0x29f4d0,{options:_0x1c978d,args:_0x1f2fa7,tdx:_0x320fb3}=_0x284282,_0x194c40=_0x1f2fa7[0x0],_0x568d5a=_0x1f2fa7[0x1]||'.';if(!_0x194c40)return console[_0x5cbc81(0x2f5)]('Error:\x20Project\x20name\x20is\x20required'),console['error']('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x401a28=_0x1c978d[_0x5cbc81(0x22c)];_0x1c978d[_0x5cbc81(0x28d)]&&(console[_0x5cbc81(0x2f5)](_0x5cbc81(0x1ba)+_0x194c40),console['error']('Output\x20directory:\x20'+_0x568d5a),_0x401a28&&console[_0x5cbc81(0x2f5)](_0x5cbc81(0x2e7)+_0x401a28));const _0x595e7d=await withSpinner('Downloading\x20project\x20'+_0x194c40+_0x5cbc81(0x23a),()=>_0x320fb3[_0x5cbc81(0x2ba)][_0x5cbc81(0x25e)](_0x194c40,_0x568d5a,{'revision':_0x401a28}),{'verbose':_0x1c978d['verbose']}),_0x355713=_0x595e7d['data'];return console['error'](_0x5cbc81(0x2d4)+_0x355713[_0x5cbc81(0x29a)]),console[_0x5cbc81(0x2f5)](_0x5cbc81(0x2a1)+_0x355713['revision']),console[_0x5cbc81(0x2f5)]('\x20\x20Files\x20extracted:\x20'+_0x355713[_0x5cbc81(0x2bb)]),console[_0x5cbc81(0x2f5)](_0x5cbc81(0x1c9)+_0x568d5a+'/'+_0x355713[_0x5cbc81(0x29a)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x1d3);['description']=a55_0x29f4d0(0x252);async[a55_0x29f4d0(0x211)](_0x2521dc){const _0x1b008d=a55_0x29f4d0,{options:_0x37005f,args:_0x37bb54,tdx:_0x26d5ca}=_0x2521dc;let _0x6ba7c0='.',_0x1bcaba=_0x37005f[_0x1b008d(0x172)];if(_0x37bb54[0x0]){const {promises:_0xabfd4c}=await import('fs');try{const _0x49979e=await _0xabfd4c[_0x1b008d(0x196)](_0x37bb54[0x0]);if(_0x49979e['isDirectory']())_0x6ba7c0=_0x37bb54[0x0];else return console[_0x1b008d(0x2f5)](_0x1b008d(0x1f6)+_0x37bb54[0x0]+_0x1b008d(0x269)),0x1;}catch{_0x1bcaba=_0x37bb54[0x0],_0x6ba7c0='.';}}const _0x38892e=_0x37005f[_0x1b008d(0x22c)],_0xcfc9a=_0x37005f[_0x1b008d(0x197)];_0x37005f[_0x1b008d(0x28d)]&&(console[_0x1b008d(0x2f5)](_0x1b008d(0x1d9)+_0x6ba7c0),_0x1bcaba&&console[_0x1b008d(0x2f5)](_0x1b008d(0x29e)+_0x1bcaba),_0x38892e&&console[_0x1b008d(0x2f5)](_0x1b008d(0x2e7)+_0x38892e),_0xcfc9a&&console[_0x1b008d(0x2f5)](_0x1b008d(0x2a5)));const _0x51f582=await withSpinner(_0x1b008d(0x29b),()=>_0x26d5ca[_0x1b008d(0x2ba)][_0x1b008d(0x2b7)](_0x6ba7c0,{'projectName':_0x1bcaba,'revision':_0x38892e,'skipValidation':_0xcfc9a}),{'verbose':_0x37005f['verbose']}),_0x345094=_0x51f582[_0x1b008d(0x2a6)];return console['error'](_0x1b008d(0x318)+_0x345094['projectName']),console[_0x1b008d(0x2f5)](_0x1b008d(0x292)+_0x345094[_0x1b008d(0x1ee)]),console['error']('\x20\x20Revision:\x20'+_0x345094[_0x1b008d(0x22c)]),await this['showWorkflowConsoleUrl'](_0x26d5ca,_0x345094['projectName'],_0x37005f[_0x1b008d(0x313)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x2a2);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x27c);async[a55_0x29f4d0(0x211)](_0x2aa730){const _0x20735e=a55_0x29f4d0,{options:_0x22dad5,args:_0x30e5d5,tdx:_0x4ba47c}=_0x2aa730,_0x5ef206=_0x30e5d5[0x0],_0x170f39=_0x30e5d5[0x1];if(!_0x5ef206)return console['error'](a55_0x262d9e[_0x20735e(0x25b)](_0x20735e(0x1df)),_0x20735e(0x20b)),console[_0x20735e(0x2f5)](a55_0x262d9e['dim']('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x4f6c65=_0x22dad5['revision'];_0x22dad5[_0x20735e(0x28d)]&&(console[_0x20735e(0x2f5)](_0x20735e(0x1ba)+_0x5ef206),_0x170f39&&console[_0x20735e(0x2f5)](_0x20735e(0x1c0)+_0x170f39),_0x4f6c65&&console[_0x20735e(0x2f5)](_0x20735e(0x2e7)+_0x4f6c65),_0x22dad5[_0x20735e(0x259)]&&console[_0x20735e(0x2f5)](_0x20735e(0x26c)));const _0x3ffeb0=await withSpinner(_0x20735e(0x319)+_0x5ef206+_0x20735e(0x23a),()=>_0x4ba47c[_0x20735e(0x2ba)]['pullProject'](_0x5ef206,{'targetDir':_0x170f39,'revision':_0x4f6c65}),{'verbose':_0x22dad5[_0x20735e(0x28d)]}),_0x4f5438=_0x3ffeb0['data'];_0x4f5438[_0x20735e(0x15a)]?console['error']('→\x20New\x20project:\x20'+_0x4f5438[_0x20735e(0x29a)]):console[_0x20735e(0x2f5)](_0x20735e(0x1c7)+_0x4f5438['projectName']);console[_0x20735e(0x2f5)](_0x20735e(0x2a1)+_0x4f5438[_0x20735e(0x22c)]),console[_0x20735e(0x2f5)](_0x20735e(0x183)+(a55_0xee06fd['relative'](process[_0x20735e(0x1c4)](),_0x4f5438[_0x20735e(0x293)])||'.')),console[_0x20735e(0x2f5)](_0x20735e(0x164)+a55_0x262d9e[_0x20735e(0x26d)]('+'+_0x4f5438[_0x20735e(0x1d8)]['new']+_0x20735e(0x2e9))+',\x20'+(a55_0x262d9e[_0x20735e(0x1ea)]('~'+_0x4f5438['summary']['modified']+_0x20735e(0x258))+',\x20')+(a55_0x262d9e[_0x20735e(0x25b)]('-'+_0x4f5438[_0x20735e(0x1d8)][_0x20735e(0x15f)]+_0x20735e(0x24d))+',\x20')+(''+a55_0x262d9e[_0x20735e(0x312)](_0x4f5438['summary']['unchanged']+_0x20735e(0x18c))));for(const _0x392515 of _0x4f5438[_0x20735e(0x2f2)]){_0x392515[_0x20735e(0x1a3)]==='modified'&&_0x392515[_0x20735e(0x1d7)]&&(console[_0x20735e(0x2f5)]('\x0a'+a55_0x262d9e['cyan']('---\x20'+_0x392515['path'])),console[_0x20735e(0x2f5)](_0x392515[_0x20735e(0x1d7)]));}if(!_0x4f5438[_0x20735e(0x25f)])return saveSessionContext({'workflow_project':_0x4f5438[_0x20735e(0x29a)]},_0x22dad5['session']),console['error'](a55_0x262d9e[_0x20735e(0x26d)](_0x20735e(0x156))),console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x312)](_0x20735e(0x160)+_0x4f5438['projectName'])),0x0;if(_0x22dad5['dryRun'])return console['error'](a55_0x262d9e[_0x20735e(0x1ea)](_0x20735e(0x223))),0x0;if(!_0x22dad5[_0x20735e(0x202)]){if(!isInteractive())return console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x25b)](_0x20735e(0x25d)),_0x20735e(0x2ff)),console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x312)](_0x20735e(0x17f))),0x1;const _0x4b9560=await confirmKey(_0x20735e(0x305));if(!_0x4b9560)return console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x1ea)](_0x20735e(0x1e8)),_0x20735e(0x177)),0x1;}await withSpinner('Writing\x20files...',()=>_0x4ba47c[_0x20735e(0x2ba)][_0x20735e(0x179)](_0x4f5438,{'revision':_0x4f6c65}),{'verbose':_0x22dad5['verbose']}),saveSessionContext({'workflow_project':_0x4f5438[_0x20735e(0x29a)]},_0x22dad5[_0x20735e(0x209)]),console['error'](a55_0x262d9e[_0x20735e(0x26d)]('✔\x20Pull\x20complete'));const _0x29244b=a55_0xee06fd[_0x20735e(0x2c2)](process[_0x20735e(0x1c4)](),_0x4f5438[_0x20735e(0x293)])||'.';return console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x312)](_0x20735e(0x1c9)+_0x29244b)),console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x312)](_0x20735e(0x160)+_0x4f5438[_0x20735e(0x29a)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]='workflow:push';[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x201);async[a55_0x29f4d0(0x211)](_0x4ea179){const _0x30232c=a55_0x29f4d0,{options:_0x5e3cb5,args:_0x3be690,tdx:_0x2442de}=_0x4ea179,_0x1d0e83=this[_0x30232c(0x1eb)](_0x3be690,_0x5e3cb5),_0x4bc4f0=_0x5e3cb5,{revision:_0x124b99,skipValidation:_0x2329e1,backfill:_0x21ed79}=_0x4bc4f0,_0x16825a=_0x21ed79===undefined?undefined:!_0x21ed79;_0x5e3cb5[_0x30232c(0x28d)]&&(_0x1d0e83&&console['error'](_0x30232c(0x2ce)+_0x1d0e83),_0x124b99&&console[_0x30232c(0x2f5)](_0x30232c(0x2e7)+_0x124b99),_0x5e3cb5[_0x30232c(0x259)]&&console[_0x30232c(0x2f5)](_0x30232c(0x26c)),_0x2329e1&&console[_0x30232c(0x2f5)](_0x30232c(0x2a5)),_0x21ed79&&console[_0x30232c(0x2f5)](_0x30232c(0x285)));let _0x136ef1;try{_0x136ef1=await withSpinner(_0x30232c(0x2d5),()=>_0x2442de[_0x30232c(0x2ba)][_0x30232c(0x1c3)]({'sourceDir':_0x1d0e83,'revision':_0x124b99,'skipValidation':_0x2329e1,'skipSchedule':_0x16825a}),{'verbose':_0x5e3cb5[_0x30232c(0x28d)]});}catch(_0x343d19){if(_0x343d19 instanceof Error&&_0x343d19['message'][_0x30232c(0x208)](_0x30232c(0x1e9)))return console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x25b)]('Error:'),_0x30232c(0x2cc)),_0x5e3cb5[_0x30232c(0x16c)]?console['error'](a55_0x262d9e[_0x30232c(0x312)](_0x30232c(0x2fb)+_0x5e3cb5[_0x30232c(0x16c)]+_0x30232c(0x20e)+_0x5e3cb5[_0x30232c(0x16c)]+'\x27')):console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x312)](_0x30232c(0x149))),0x1;throw _0x343d19;}const _0x3f5651=_0x136ef1['data'];console[_0x30232c(0x2f5)](_0x30232c(0x2a7)+_0x3f5651['projectName']),console[_0x30232c(0x2f5)](_0x30232c(0x1b9)+_0x3f5651[_0x30232c(0x227)]),console['error'](_0x30232c(0x2a1)+_0x3f5651[_0x30232c(0x22c)]),console['error']('\x20\x20Changes:\x20'+a55_0x262d9e[_0x30232c(0x26d)]('+'+_0x3f5651[_0x30232c(0x1d8)][_0x30232c(0x17a)]+_0x30232c(0x2e9))+',\x20'+(a55_0x262d9e[_0x30232c(0x1ea)]('~'+_0x3f5651[_0x30232c(0x1d8)]['modified']+_0x30232c(0x258))+',\x20')+(a55_0x262d9e['red']('-'+_0x3f5651[_0x30232c(0x1d8)][_0x30232c(0x15f)]+_0x30232c(0x24d))+',\x20')+(''+a55_0x262d9e[_0x30232c(0x312)](_0x3f5651[_0x30232c(0x1d8)][_0x30232c(0x1e3)]+_0x30232c(0x18c))));for(const _0x4f5ad0 of _0x3f5651['changes']){_0x4f5ad0[_0x30232c(0x1a3)]===_0x30232c(0x189)&&_0x4f5ad0[_0x30232c(0x1d7)]&&(console[_0x30232c(0x2f5)]('\x0a'+a55_0x262d9e[_0x30232c(0x295)]('---\x20'+_0x4f5ad0['path'])),console[_0x30232c(0x2f5)](_0x4f5ad0[_0x30232c(0x1d7)]));}if(!_0x3f5651[_0x30232c(0x25f)])return console['error'](a55_0x262d9e[_0x30232c(0x26d)](_0x30232c(0x154))),await this['showWorkflowConsoleUrl'](_0x2442de,_0x3f5651[_0x30232c(0x29a)],_0x5e3cb5[_0x30232c(0x313)]),0x0;if(_0x5e3cb5[_0x30232c(0x259)])return console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x1ea)](_0x30232c(0x229))),0x0;if(!_0x5e3cb5[_0x30232c(0x202)]){if(!isInteractive())return console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x25b)](_0x30232c(0x25d)),_0x30232c(0x2ff)),console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x312)](_0x30232c(0x17f))),0x1;const _0x14f49e=await confirmKey(_0x30232c(0x20a));if(!_0x14f49e)return console['error'](a55_0x262d9e['yellow'](_0x30232c(0x1e8)),'-\x20nothing\x20pushed'),0x1;}const _0x548ed2=await withSpinner(_0x30232c(0x238),()=>_0x2442de[_0x30232c(0x2ba)][_0x30232c(0x20c)](_0x3f5651),{'verbose':_0x5e3cb5[_0x30232c(0x28d)]}),_0x6f5fe5=_0x548ed2[_0x30232c(0x2a6)];return console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x26d)](_0x30232c(0x212))),console[_0x30232c(0x2f5)]('\x20\x20Project\x20ID:\x20'+_0x6f5fe5[_0x30232c(0x1ee)]),console['error'](_0x30232c(0x2a1)+_0x6f5fe5[_0x30232c(0x22c)]),await this[_0x30232c(0x1c6)](_0x2442de,_0x6f5fe5['projectName'],_0x5e3cb5[_0x30232c(0x313)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]='workflow:clone';[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x16f);async['execute'](_0x4be24d){const _0xe62e21=a55_0x29f4d0,{options:_0x300eb4,args:_0x47e3e4,tdx:_0x23fe63}=_0x4be24d,_0x38e7ef=this['resolveProjectDir'](_0x47e3e4,_0x300eb4),_0x5e1504=_0x300eb4['name'],_0x2f3b1b=_0x300eb4[_0xe62e21(0x22c)],_0x351898=_0x300eb4['skipValidation'];if(!_0x38e7ef)return console[_0xe62e21(0x2f5)](a55_0x262d9e['red']('Error:'),_0xe62e21(0x190)),console[_0xe62e21(0x2f5)](a55_0x262d9e['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x312)](_0xe62e21(0x1a9))),0x1;if(!_0x5e1504)return console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x25b)](_0xe62e21(0x1df)),_0xe62e21(0x315)),console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x312)](_0xe62e21(0x1b6))),0x1;_0x300eb4[_0xe62e21(0x28d)]&&(console[_0xe62e21(0x2f5)]('Source\x20directory:\x20'+_0x38e7ef),console[_0xe62e21(0x2f5)](_0xe62e21(0x1d4)+_0x5e1504),_0x2f3b1b&&console['error'](_0xe62e21(0x2e7)+_0x2f3b1b),_0x300eb4[_0xe62e21(0x259)]&&console['error']('Dry\x20run:\x20yes'),_0x351898&&console['error'](_0xe62e21(0x2a5)));const _0x5d2205=await withSpinner('Analyzing\x20project...',()=>_0x23fe63['workflow'][_0xe62e21(0x167)](_0x38e7ef,_0x5e1504,{'revision':_0x2f3b1b,'skipValidation':_0x351898}),{'verbose':_0x300eb4[_0xe62e21(0x28d)]}),_0x119128=_0x5d2205[_0xe62e21(0x2a6)];console[_0xe62e21(0x2f5)](_0xe62e21(0x25a)+_0x119128[_0xe62e21(0x227)]);_0x119128[_0xe62e21(0x1d2)]&&console[_0xe62e21(0x2f5)](_0xe62e21(0x26b)+_0x119128[_0xe62e21(0x1d2)]);console[_0xe62e21(0x2f5)](_0xe62e21(0x1d4)+_0x119128[_0xe62e21(0x249)]),console['error'](_0xe62e21(0x2e7)+_0x119128[_0xe62e21(0x22c)]),console[_0xe62e21(0x2f5)](_0xe62e21(0x1dc)+_0x119128['fileCount']);_0x119128[_0xe62e21(0x1a5)]&&(console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x1ea)](_0xe62e21(0x17b)+_0x119128[_0xe62e21(0x249)]+_0xe62e21(0x219)+_0x119128[_0xe62e21(0x165)]+')')),console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x1ea)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x300eb4['dryRun'])return console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x1ea)](_0xe62e21(0x26e))),0x0;if(!_0x300eb4[_0xe62e21(0x202)]){if(!isInteractive())return console['error'](a55_0x262d9e[_0xe62e21(0x25b)](_0xe62e21(0x25d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x312)](_0xe62e21(0x17f))),0x1;const _0x5d4721=_0x119128[_0xe62e21(0x1d2)]||a55_0xee06fd[_0xe62e21(0x273)](_0x38e7ef),_0x2156d1=_0x119128[_0xe62e21(0x1a5)]?_0xe62e21(0x24e)+_0x5e1504+_0xe62e21(0x1be):_0xe62e21(0x2d2)+_0x5d4721+_0xe62e21(0x1d6)+_0x5e1504+'\x22?',_0x3f92e1=await confirmKey(_0x2156d1);if(!_0x3f92e1)return console['error'](a55_0x262d9e['yellow'](_0xe62e21(0x1e8))),0x1;}const _0x27becc=await withSpinner(_0x119128[_0xe62e21(0x1a5)]?'Updating\x20'+_0x5e1504+_0xe62e21(0x23a):_0xe62e21(0x185)+_0x5e1504+_0xe62e21(0x23a),()=>_0x23fe63[_0xe62e21(0x2ba)][_0xe62e21(0x28f)](_0x119128),{'verbose':_0x300eb4['verbose']}),_0x3c82c4=_0x27becc['data'];return console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x26d)](_0x119128[_0xe62e21(0x1a5)]?_0xe62e21(0x2d6):_0xe62e21(0x30c))),console[_0xe62e21(0x2f5)](_0xe62e21(0x1e6)+_0x3c82c4[_0xe62e21(0x249)]),console[_0xe62e21(0x2f5)](_0xe62e21(0x292)+_0x3c82c4[_0xe62e21(0x1d1)]),console[_0xe62e21(0x2f5)](_0xe62e21(0x2a1)+_0x3c82c4[_0xe62e21(0x22c)]),await this['showWorkflowConsoleUrl'](_0x23fe63,_0x3c82c4[_0xe62e21(0x249)],_0x300eb4[_0xe62e21(0x313)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a55_0x29f4d0(0x170);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2a3);async['execute'](_0x1b5cd8){const _0x38862d=a55_0x29f4d0,{options:_0x488e76,args:_0x46d257,tdx:_0x2cca71}=_0x1b5cd8,_0x5a268d=_0x46d257[0x0];if(!_0x5a268d)return console[_0x38862d(0x2f5)](_0x38862d(0x28c)),console['error'](_0x38862d(0x20f)),0x1;_0x488e76[_0x38862d(0x28d)]&&console[_0x38862d(0x2f5)](_0x38862d(0x1ba)+_0x5a268d);if(!_0x488e76[_0x38862d(0x202)]){if(!isInteractive())return console[_0x38862d(0x2f5)](a55_0x262d9e[_0x38862d(0x25b)](_0x38862d(0x25d)),_0x38862d(0x2ff)),console[_0x38862d(0x2f5)](a55_0x262d9e[_0x38862d(0x312)](_0x38862d(0x17f))),0x1;const _0x12e027=await confirmKey(_0x38862d(0x289)+_0x5a268d+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x12e027)return console[_0x38862d(0x2f5)](a55_0x262d9e[_0x38862d(0x1ea)]('Cancelled')),0x1;}const _0x4869ac=await withSpinner('Deleting\x20project\x20'+_0x5a268d+_0x38862d(0x23a),()=>_0x2cca71['workflow'][_0x38862d(0x15b)](_0x5a268d),{'verbose':_0x488e76[_0x38862d(0x28d)]}),_0xcef00=_0x4869ac[_0x38862d(0x2a6)];return console[_0x38862d(0x2f5)](_0x38862d(0x317)+_0xcef00[_0x38862d(0x29a)]),console[_0x38862d(0x2f5)]('\x20\x20Project\x20ID:\x20'+_0xcef00[_0x38862d(0x1ee)]),0x0;}}export function parseKeyValue(_0x2fe0a2){const _0x5239d6=a55_0x29f4d0,_0x43d3f5=_0x2fe0a2[_0x5239d6(0x1a4)]('=');if(_0x43d3f5===-0x1)throw new Error(_0x5239d6(0x174)+_0x2fe0a2+_0x5239d6(0x2dc));const _0x4b97a9=_0x2fe0a2[_0x5239d6(0x2cd)](0x0,_0x43d3f5),_0x28e730=_0x2fe0a2['substring'](_0x43d3f5+0x1);if(!_0x4b97a9)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x4b97a9,'value':_0x28e730};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a55_0x29f4d0(0x310);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2c7);async[a55_0x29f4d0(0x211)](_0x3dc0dc){const _0x3f2e9e=a55_0x29f4d0,{options:_0x1aa4ca,args:_0x1b0643,tdx:_0x4dc939}=_0x3dc0dc,_0x172146=this[_0x3f2e9e(0x215)](_0x1b0643,_0x1aa4ca);if(!_0x172146)return 0x1;_0x1aa4ca[_0x3f2e9e(0x28d)]&&console[_0x3f2e9e(0x2f5)](_0x3f2e9e(0x1ba)+_0x172146);const _0x224adc=await withSpinner(_0x3f2e9e(0x1a8),()=>_0x4dc939[_0x3f2e9e(0x2ba)][_0x3f2e9e(0x1bf)](_0x172146),{'verbose':_0x1aa4ca['verbose']}),{secrets:_0x4bddfc}=_0x224adc[_0x3f2e9e(0x2a6)];return console[_0x3f2e9e(0x2f5)](_0x3f2e9e(0x18b)+_0x4bddfc['length']+_0x3f2e9e(0x28b)+(_0x4bddfc[_0x3f2e9e(0x17c)]!==0x1?'s':'')),await handleSDKOutput(_0x4bddfc,_0x1aa4ca),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]='workflow:secrets:set';[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x299);async[a55_0x29f4d0(0x211)](_0x5b3a1d){const _0x40fa0c=a55_0x29f4d0,{options:_0x1d7a1b,args:_0x481c69,tdx:_0x1a09e1}=_0x5b3a1d;let _0x20b727,_0x4577d1;if(_0x481c69[_0x40fa0c(0x17c)]>=0x1&&!_0x481c69[0x0][_0x40fa0c(0x208)]('='))_0x20b727=_0x481c69[0x0],_0x4577d1=_0x481c69['slice'](0x1);else{if(_0x481c69['length']>=0x1&&_0x1d7a1b['workflowProject'])_0x20b727=_0x1d7a1b[_0x40fa0c(0x16c)],_0x4577d1=_0x481c69;else return _0x481c69[_0x40fa0c(0x17c)]>=0x1?(console[_0x40fa0c(0x2f5)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x40fa0c(0x2f5)](_0x40fa0c(0x23c)),0x1):(console['error']('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console['error'](_0x40fa0c(0x1a7)),0x1);}if(_0x4577d1[_0x40fa0c(0x17c)]===0x0)return console['error'](_0x40fa0c(0x1ef)),console[_0x40fa0c(0x2f5)](_0x40fa0c(0x1a7)),0x1;const _0x1b0224={};try{for(const _0x201e0e of _0x4577d1){const {key:_0x2e3f7f,value:_0x184dff}=parseKeyValue(_0x201e0e);_0x1b0224[_0x2e3f7f]=_0x184dff;}}catch(_0x543268){return _0x543268 instanceof Error&&console['error'](a55_0x262d9e[_0x40fa0c(0x25b)](_0x40fa0c(0x1df)),_0x543268['message']),0x1;}const _0x42943f=Object[_0x40fa0c(0x186)](_0x1b0224);_0x1d7a1b['verbose']&&(console[_0x40fa0c(0x2f5)](_0x40fa0c(0x1ba)+_0x20b727),console[_0x40fa0c(0x2f5)]('Secrets\x20to\x20set:\x20'+_0x42943f[_0x40fa0c(0x303)](',\x20')));const _0x15bc66=await withSpinner(_0x42943f[_0x40fa0c(0x17c)]===0x1?_0x40fa0c(0x239):_0x40fa0c(0x1de)+_0x42943f[_0x40fa0c(0x17c)]+_0x40fa0c(0x251),()=>_0x1a09e1[_0x40fa0c(0x2ba)]['setSecrets'](_0x20b727,_0x1b0224),{'verbose':_0x1d7a1b[_0x40fa0c(0x28d)]}),_0x544fb2=_0x15bc66[_0x40fa0c(0x2a6)];return console[_0x40fa0c(0x2f5)](_0x42943f['length']===0x1?_0x40fa0c(0x1fb)+_0x544fb2[_0x40fa0c(0x186)][0x0]+_0x40fa0c(0x22f)+_0x544fb2[_0x40fa0c(0x29a)]+'\x27':'✔\x20'+_0x544fb2[_0x40fa0c(0x186)][_0x40fa0c(0x17c)]+_0x40fa0c(0x1a6)+_0x544fb2[_0x40fa0c(0x29a)]+'\x27'),(_0x1d7a1b[_0x40fa0c(0x29f)]||_0x1d7a1b['jsonl'])&&await handleSingleObjectOutput(_0x544fb2,_0x1d7a1b),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a55_0x29f4d0(0x297);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x274);async['execute'](_0x365f76){const _0x58c366=a55_0x29f4d0,{options:_0x453c9b,args:_0x341d52,tdx:_0x321b72}=_0x365f76;let _0x11625f,_0x2bd335;if(_0x341d52[_0x58c366(0x17c)]>=0x2)_0x11625f=_0x341d52[0x0],_0x2bd335=_0x341d52[0x1];else{if(_0x341d52[_0x58c366(0x17c)]===0x1&&_0x453c9b['workflowProject'])_0x11625f=_0x453c9b['workflowProject'],_0x2bd335=_0x341d52[0x0];else return _0x341d52['length']===0x1?(console['error'](_0x58c366(0x14c)),console[_0x58c366(0x2f5)](_0x58c366(0x23c)),0x1):(console[_0x58c366(0x2f5)](_0x58c366(0x262)),console['error'](_0x58c366(0x2ca)),0x1);}_0x453c9b[_0x58c366(0x28d)]&&(console[_0x58c366(0x2f5)](_0x58c366(0x1ba)+_0x11625f),console['error'](_0x58c366(0x275)+_0x2bd335));if(!_0x453c9b[_0x58c366(0x202)]){if(!isInteractive())return console[_0x58c366(0x2f5)](a55_0x262d9e[_0x58c366(0x25b)]('\x0aError:'),_0x58c366(0x2ff)),console[_0x58c366(0x2f5)](a55_0x262d9e[_0x58c366(0x312)](_0x58c366(0x17f))),0x1;const _0x58d2e7=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x2bd335+'\x27\x20from\x20project\x20\x27'+_0x11625f+'\x27?');if(!_0x58d2e7)return console['error'](a55_0x262d9e[_0x58c366(0x1ea)](_0x58c366(0x1e8))),0x1;}const _0x2b295a=await withSpinner('Deleting\x20secret...',()=>_0x321b72['workflow']['deleteSecret'](_0x11625f,_0x2bd335),{'verbose':_0x453c9b[_0x58c366(0x28d)]}),_0x369846=_0x2b295a['data'];return console[_0x58c366(0x2f5)](_0x58c366(0x1fb)+_0x369846[_0x58c366(0x225)]+_0x58c366(0x1e2)+_0x369846[_0x58c366(0x29a)]+'\x27'),(_0x453c9b['json']||_0x453c9b[_0x58c366(0x232)])&&await handleSingleObjectOutput(_0x369846,_0x453c9b),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(_0x7206da){const _0x11d58f=a55_0x29f4d0,_0xec03c7=Math[_0x11d58f(0x2f1)](_0x7206da/0x3e8),_0x330658=Math[_0x11d58f(0x2f1)](_0xec03c7/0x3c),_0xcce46a=Math[_0x11d58f(0x2f1)](_0x330658/0x3c),_0xc30ced=Math[_0x11d58f(0x2f1)](_0xcce46a/0x18);if(_0xc30ced>0x0){const _0x5c7e32=_0xcce46a%0x18;return _0x5c7e32>0x0?_0xc30ced+'d\x20'+_0x5c7e32+'h':_0xc30ced+'d';}else{if(_0xcce46a>0x0){const _0x1d3d8e=_0x330658%0x3c;return _0x1d3d8e>0x0?_0xcce46a+'h\x20'+_0x1d3d8e+'m':_0xcce46a+'h';}else{if(_0x330658>0x0){const _0x27f709=_0xec03c7%0x3c;return _0x27f709>0x0?_0x330658+'m\x20'+_0x27f709+'s':_0x330658+'m';}else return _0xec03c7+'s';}}}function formatTimestamp(_0x1bf9cf,_0x1a827b){const _0x37640a=a55_0x29f4d0,_0x492e9b=new Date(_0x1bf9cf),_0x5d5e16=String(_0x492e9b[_0x37640a(0x1f8)]())[_0x37640a(0x2f9)](0x2,'0'),_0x4d54c8=String(_0x492e9b[_0x37640a(0x18f)]())['padStart'](0x2,'0'),_0x1ee49a=_0x5d5e16+':'+_0x4d54c8,_0x5cb021=_0x492e9b[_0x37640a(0x1ad)]()===_0x1a827b[_0x37640a(0x1ad)]()&&_0x492e9b['getMonth']()===_0x1a827b['getMonth']()&&_0x492e9b[_0x37640a(0x2ad)]()===_0x1a827b[_0x37640a(0x2ad)]();if(_0x5cb021)return _0x1ee49a;else{const _0x51ffb4=String(_0x492e9b[_0x37640a(0x1cf)]()+0x1)[_0x37640a(0x2f9)](0x2,'0'),_0x367c9f=String(_0x492e9b['getDate']())['padStart'](0x2,'0');return _0x51ffb4+'-'+_0x367c9f+'\x20'+_0x1ee49a;}}function formatDate(_0x4faeda){const _0x501d55=a55_0x29f4d0,_0xf64701=_0x4faeda['getFullYear'](),_0x22a296=String(_0x4faeda[_0x501d55(0x1cf)]()+0x1)[_0x501d55(0x2f9)](0x2,'0'),_0x96c2e=String(_0x4faeda['getDate']())[_0x501d55(0x2f9)](0x2,'0');return _0xf64701+'-'+_0x22a296+'-'+_0x96c2e;}function getTaskStateIcon(_0x4f68a9){const _0x1de799={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1de799[_0x4f68a9]||'⚪';}function getBarChar(_0x48e626){const _0x226794=a55_0x29f4d0;return _0x48e626===_0x226794(0x2f5)||_0x48e626===_0x226794(0x2c0)?'×':'─';}function getBarColor(_0x3061c6){const _0x5e9476=a55_0x29f4d0,_0x2b386e={'success':a55_0x262d9e[_0x5e9476(0x26d)],'error':a55_0x262d9e[_0x5e9476(0x25b)],'group_error':a55_0x262d9e[_0x5e9476(0x25b)],'running':a55_0x262d9e[_0x5e9476(0x2ab)],'blocked':a55_0x262d9e[_0x5e9476(0x1ea)],'planned':a55_0x262d9e[_0x5e9476(0x312)],'canceling':a55_0x262d9e[_0x5e9476(0x1ea)]};return _0x2b386e[_0x3061c6]||a55_0x262d9e[_0x5e9476(0x192)];}function parseTaskName(_0x43d6af){const _0x1dbd81=a55_0x29f4d0;let _0x354ae0=_0x43d6af[_0x1dbd81(0x2d9)](/^\++/,'');const _0x2adff3=_0x354ae0[_0x1dbd81(0x248)]('+'),_0x39184d=_0x2adff3['length']>0x1?_0x2adff3[_0x1dbd81(0x17c)]-0x2:0x0,_0x5d8198=_0x2adff3[_0x2adff3[_0x1dbd81(0x17c)]-0x1]||_0x354ae0;return{'level':_0x39184d,'name':'+'+_0x5d8198};}function truncateTaskName(_0x147d9e,_0x17990b){const _0x451434=a55_0x29f4d0,_0x62208c=stringWidth(_0x147d9e);if(_0x62208c<=_0x17990b)return _0x147d9e;let _0x28261d=_0x147d9e;while(stringWidth(_0x28261d+'…')>_0x17990b&&_0x28261d['length']>0x0){_0x28261d=_0x28261d[_0x451434(0x2f7)](0x0,-0x1);}return _0x28261d+'…';}function calculateTimeScale(_0x46724c,_0x442f90){const _0x311749=a55_0x29f4d0;return{'startTime':_0x46724c['start'],'endTime':_0x46724c[_0x311749(0x1cb)],'durationMs':_0x46724c[_0x311749(0x188)],'msPerChar':_0x46724c[_0x311749(0x188)]/_0x442f90};}function timeToPosition(_0x200574,_0x2c242c,_0x5473cf){const _0x4a25ea=a55_0x29f4d0,_0xaf9b66=_0x200574-_0x2c242c['startTime'],_0xa8ce38=Math[_0x4a25ea(0x2f1)](_0xaf9b66/_0x2c242c[_0x4a25ea(0x283)]);return Math[_0x4a25ea(0x180)](0x0,Math['min'](_0xa8ce38,_0x5473cf));}function renderTimeAxis(_0x1a3be8,_0x33d3ca){const _0x173a39=a55_0x29f4d0,_0x4ed52d=Math[_0x173a39(0x231)](TIMELINE_CONFIG[_0x173a39(0x166)],Math[_0x173a39(0x180)](TIMELINE_CONFIG[_0x173a39(0x287)],Math[_0x173a39(0x2f1)](_0x33d3ca/TIMELINE_CONFIG[_0x173a39(0x280)]))),_0x4416d4=_0x1a3be8[_0x173a39(0x1b8)]/(_0x4ed52d-0x1),_0x2dc9b0=new Date(_0x1a3be8['startTime']),_0x13a3c5=[];for(let _0x542395=0x0;_0x542395<_0x4ed52d;_0x542395++){const _0x2f6583=_0x1a3be8[_0x173a39(0x282)]+_0x542395*_0x4416d4,_0x3cfcb3=timeToPosition(_0x2f6583,_0x1a3be8,_0x33d3ca),_0x2b8d7f=formatTimestamp(_0x2f6583,_0x2dc9b0);_0x13a3c5[_0x173a39(0x2b7)]({'pos':_0x3cfcb3,'text':_0x2b8d7f});}const _0xe95cb7=new Array(_0x33d3ca)[_0x173a39(0x17d)]('\x20');let _0xdf549c=-0x1;for(const {pos:_0x45431e,text:_0x47d589}of _0x13a3c5){let _0x58f93d=Math[_0x173a39(0x180)](0x0,_0x45431e-Math[_0x173a39(0x2f1)](_0x47d589['length']/0x2));_0x58f93d<=_0xdf549c+TIMELINE_CONFIG[_0x173a39(0x19c)]&&(_0x58f93d=_0xdf549c+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x58f93d+_0x47d589[_0x173a39(0x17c)]>_0x33d3ca&&(_0x58f93d=_0x33d3ca-_0x47d589[_0x173a39(0x17c)]);if(_0x58f93d>=0x0&&_0x58f93d+_0x47d589[_0x173a39(0x17c)]<=_0x33d3ca&&_0x58f93d>_0xdf549c){for(let _0x18bd78=0x0;_0x18bd78<_0x47d589[_0x173a39(0x17c)];_0x18bd78++){_0xe95cb7[_0x58f93d+_0x18bd78]=_0x47d589[_0x18bd78];}_0xdf549c=_0x58f93d+_0x47d589['length']-0x1;}}return _0xe95cb7[_0x173a39(0x303)]('');}function renderTaskRow(_0xbf8447,_0x38dd11,_0x1ed482,_0x6628da){const _0x2485c9=a55_0x29f4d0,{level:_0x2827c6,name:_0x23514f}=parseTaskName(_0xbf8447[_0x2485c9(0x172)]),_0x52f491='\x20'[_0x2485c9(0x22b)](_0x2827c6),_0x501795=_0xbf8447['window']?'('+formatElapsed(_0xbf8447[_0x2485c9(0x1b3)][_0x2485c9(0x188)])+')':'',_0x5a3e6a=stringWidth(_0x501795),_0x448f7f=_0x2827c6*0x1,_0x5b7954=_0x6628da-_0x448f7f-_0x5a3e6a-0x1,_0x20710a=truncateTaskName(_0x23514f,_0x5b7954),_0x4a8b85=_0x52f491+_0x20710a,_0x5e6e1b=stringWidth(_0x4a8b85),_0xae195d=_0x6628da-_0x5e6e1b-_0x5a3e6a,_0x4a45fb=_0x4a8b85+'\x20'['repeat'](Math[_0x2485c9(0x180)](0x1,_0xae195d))+a55_0x262d9e['dim'](_0x501795),_0x3fe67f=getTaskStateIcon(_0xbf8447['state']),_0x1341b1=new Array(_0x1ed482)[_0x2485c9(0x17d)]('\x20');if(_0xbf8447[_0x2485c9(0x1b3)]){const _0x5c25eb=timeToPosition(_0xbf8447['window']['start'],_0x38dd11,_0x1ed482),_0x3bb989=timeToPosition(_0xbf8447[_0x2485c9(0x1b3)][_0x2485c9(0x1cb)],_0x38dd11,_0x1ed482),_0x3e7808=getBarChar(_0xbf8447['state']),_0x115b16=Math[_0x2485c9(0x180)](_0x5c25eb+0x1,_0x3bb989);for(let _0x4e669b=_0x5c25eb;_0x4e669b<Math[_0x2485c9(0x231)](_0x115b16,_0x1ed482);_0x4e669b++){_0x1341b1[_0x4e669b]=_0x3e7808;}}const _0xe22132=getBarColor(_0xbf8447[_0x2485c9(0x2b1)]),_0x336c0c=_0x1341b1['map'](_0x325bd7=>_0x325bd7==='\x20'?'\x20':_0xe22132(_0x325bd7))[_0x2485c9(0x303)]('');return _0x3fe67f+'\x20'+_0x4a45fb+'│'+_0x336c0c+'│';}function calculateStats(_0x377161){const _0x319e2d=a55_0x29f4d0,_0x3ff4ac={'total':_0x377161['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x537132 of _0x377161){if(_0x537132[_0x319e2d(0x2b1)]===_0x319e2d(0x24c))_0x3ff4ac[_0x319e2d(0x24c)]++;else{if(_0x537132[_0x319e2d(0x2b1)]===_0x319e2d(0x2f5)||_0x537132[_0x319e2d(0x2b1)]===_0x319e2d(0x2c0))_0x3ff4ac[_0x319e2d(0x2f5)]++;else _0x537132[_0x319e2d(0x2b1)]===_0x319e2d(0x207)?_0x3ff4ac['running']++:_0x3ff4ac[_0x319e2d(0x2de)]++;}}return _0x3ff4ac;}function formatStats(_0x27ae54){const _0x29fa54=a55_0x29f4d0;return[_0x29fa54(0x1e7)+_0x27ae54['total'],'✅\x20'+_0x27ae54[_0x29fa54(0x24c)],'❌\x20'+_0x27ae54[_0x29fa54(0x2f5)],_0x29fa54(0x187)+_0x27ae54[_0x29fa54(0x207)],'⏳\x20'+_0x27ae54[_0x29fa54(0x2de)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]='workflow:timeline';['description']=a55_0x29f4d0(0x16a);async['execute'](_0x3fcd74){const _0x5da94e=a55_0x29f4d0,{options:_0x25c9e4,args:_0x8c3e2b,tdx:_0x103beb}=_0x3fcd74;let _0x19defb,_0x7dea0c,_0x3956b0=![];if(_0x8c3e2b[0x0]){if(_0x8c3e2b[0x0][_0x5da94e(0x208)]('.')){const _0x579599=this[_0x5da94e(0x19d)](_0x8c3e2b,_0x25c9e4);if(!_0x579599)return 0x1;_0x19defb=_0x579599[_0x5da94e(0x29a)],_0x7dea0c=_0x579599[_0x5da94e(0x288)];}else{_0x7dea0c=_0x8c3e2b[0x0],_0x19defb=_0x25c9e4[_0x5da94e(0x16c)];if(!_0x19defb)return console['error'](a55_0x262d9e[_0x5da94e(0x25b)](_0x5da94e(0x1df)),_0x5da94e(0x265)),0x1;_0x3956b0=!![];}}else{const _0x3d35b1=this[_0x5da94e(0x19d)](_0x8c3e2b,_0x25c9e4);if(!_0x3d35b1)return 0x1;_0x19defb=_0x3d35b1[_0x5da94e(0x29a)],_0x7dea0c=_0x3d35b1[_0x5da94e(0x288)];}if(_0x25c9e4[_0x5da94e(0x28d)]){if(_0x19defb&&_0x7dea0c)console['error'](_0x5da94e(0x1a2)+_0x19defb+'.'+_0x7dea0c);else _0x19defb&&console['error'](_0x5da94e(0x184)+_0x19defb);}const _0x337886=_0x25c9e4[_0x5da94e(0x169)],_0x5b21aa=_0x25c9e4[_0x5da94e(0x163)];if(_0x337886){_0x5b21aa&&console['error'](a55_0x262d9e[_0x5da94e(0x1ea)](_0x5da94e(0x22a)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x552c8f=_0x25c9e4[_0x5da94e(0x1fd)];return _0x552c8f?await this['pollTimeline'](_0x3fcd74,_0x337886):await this[_0x5da94e(0x1f7)](_0x3fcd74,_0x337886,_0x25c9e4),0x0;}if(_0x5b21aa){const _0x3b540c=await withSpinner(_0x5da94e(0x2ae),()=>_0x103beb[_0x5da94e(0x2ba)][_0x5da94e(0x2bc)]({'projectName':_0x19defb,'workflowName':_0x7dea0c,'limit':0x64}),{'verbose':_0x25c9e4[_0x5da94e(0x28d)]}),_0x427060=_0x3b540c['data'][_0x5da94e(0x15e)](_0x4876dd=>_0x4876dd['id']===_0x5b21aa);if(!_0x427060)return console[_0x5da94e(0x2f5)](a55_0x262d9e['red']('Error:'),_0x5da94e(0x2e2)+_0x5b21aa),0x1;if(!_0x427060[_0x5da94e(0x2fc)]?.['id'])return console[_0x5da94e(0x2f5)](a55_0x262d9e['red'](_0x5da94e(0x1df)),_0x5da94e(0x14f)+_0x5b21aa+_0x5da94e(0x290)),0x1;const _0x4e445e=_0x427060[_0x5da94e(0x2fc)]['id'];_0x25c9e4[_0x5da94e(0x28d)]&&console[_0x5da94e(0x2f5)](_0x5da94e(0x301)+_0x4e445e+_0x5da94e(0x1f9)+_0x5b21aa);const _0x17cd89=_0x25c9e4['follow'];return _0x17cd89?await this[_0x5da94e(0x1c2)](_0x3fcd74,_0x4e445e):await this['renderSingleTimeline'](_0x3fcd74,_0x4e445e,_0x25c9e4),0x0;}const _0x24db1a=await withSpinner(_0x5da94e(0x241),()=>_0x103beb[_0x5da94e(0x2ba)][_0x5da94e(0x2bc)]({'projectName':_0x19defb,'workflowName':_0x7dea0c,'limit':_0x25c9e4[_0x5da94e(0x2a8)]||0x32}),{'verbose':_0x25c9e4[_0x5da94e(0x28d)]}),_0x24e116=_0x24db1a[_0x5da94e(0x2a6)];if(_0x24e116[_0x5da94e(0x17c)]===0x0){if(_0x19defb&&_0x7dea0c)console[_0x5da94e(0x2f5)]('No\x20sessions\x20found\x20for:\x20'+_0x19defb+'.'+_0x7dea0c);else _0x19defb?console[_0x5da94e(0x2f5)](_0x5da94e(0x1bc)+_0x19defb):(console['error'](_0x5da94e(0x216)),console[_0x5da94e(0x2f5)](a55_0x262d9e[_0x5da94e(0x312)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x24e116['sort']((_0x35e8b0,_0x15d033)=>{const _0xe03937=_0x5da94e,_0x254f84=_0x35e8b0['sessionTime']||'',_0x13358a=_0x15d033[_0xe03937(0x21c)]||'';return _0x13358a[_0xe03937(0x2c8)](_0x254f84);});if(_0x25c9e4[_0x5da94e(0x29f)]||_0x25c9e4['jsonl'])return await handleSDKOutput(_0x24e116,_0x25c9e4),0x0;let _0x389b2a;if(_0x3956b0){const _0x27ec78=_0x24e116[0x0];if(!_0x27ec78[_0x5da94e(0x2fc)]?.['id'])return console[_0x5da94e(0x2f5)](_0x5da94e(0x250)),0x0;_0x389b2a=_0x27ec78['lastAttempt']['id'],_0x25c9e4[_0x5da94e(0x28d)]&&console[_0x5da94e(0x2f5)]('Auto-selected\x20latest\x20session:\x20'+_0x27ec78[_0x5da94e(0x21c)]);}else{const _0xc318fa=_0x24e116[_0x5da94e(0x27e)](_0xced263=>{const _0x69dbd7=_0x5da94e,_0x3ef92f=getAttemptStatusDisplay(_0xced263['lastAttempt']);return{'title':_0xced263[_0x69dbd7(0x1c8)]?.['name']+'.'+_0xced263['workflow']?.['name']+_0x69dbd7(0x1fe)+_0xced263[_0x69dbd7(0x21c)]+'\x20'+_0x3ef92f[_0x69dbd7(0x23f)],'value':_0xced263[_0x69dbd7(0x2fc)]?.['id']||'','description':_0x3ef92f[_0x69dbd7(0x2b4)]};}),_0x24c876=await a55_0x353259({'type':'select','name':_0x5da94e(0x169),'message':_0x5da94e(0x1f3),'choices':_0xc318fa[_0x5da94e(0x277)](_0x3c9c61=>_0x3c9c61[_0x5da94e(0x220)]!=='')});if(!_0x24c876[_0x5da94e(0x169)])return 0x0;_0x389b2a=_0x24c876[_0x5da94e(0x169)];}const _0x477dd9=_0x25c9e4[_0x5da94e(0x1fd)];return _0x477dd9?await this[_0x5da94e(0x1c2)](_0x3fcd74,_0x389b2a):await this[_0x5da94e(0x1f7)](_0x3fcd74,_0x389b2a,_0x25c9e4),0x0;}async[a55_0x29f4d0(0x1f7)](_0x598324,_0x5792b6,_0x1770f5){const _0x3adb9d=a55_0x29f4d0,{tdx:_0x1e93a4}=_0x598324;let _0x3545f3,_0x2c02a8;try{[_0x3545f3,_0x2c02a8]=await Promise[_0x3adb9d(0x294)]([_0x1e93a4[_0x3adb9d(0x2ba)][_0x3adb9d(0x291)](_0x5792b6),_0x1e93a4[_0x3adb9d(0x2ba)][_0x3adb9d(0x2fa)](_0x5792b6,![])]);}catch(_0x5810e7){console['error'](a55_0x262d9e['red'](_0x3adb9d(0x14b)));_0x1770f5['verbose']&&console[_0x3adb9d(0x2f5)](_0x5810e7);throw _0x5810e7;}if(_0x1770f5[_0x3adb9d(0x29f)]||_0x1770f5[_0x3adb9d(0x232)]){const _0x5cf127=this['buildTimelineData'](_0x3545f3,_0x2c02a8);await handleSDKOutput([_0x5cf127],_0x1770f5);return;}const _0x5c2bf9=_0x1e93a4['context']['site'],_0x311d79=this['renderTimeline'](_0x3545f3,_0x2c02a8,_0x5c2bf9);console[_0x3adb9d(0x2bd)](_0x311d79);}async[a55_0x29f4d0(0x1c2)](_0x26d49f,_0x1dafec){const _0x2b3825=a55_0x29f4d0,{tdx:_0x41bd5e}=_0x26d49f,_0xd6707e=TIMELINE_CONFIG[_0x2b3825(0x1f0)],_0x224d84=TIMELINE_CONFIG[_0x2b3825(0x1b5)];let _0x559c1d=0x0;while(_0x559c1d<_0x224d84){process['stdout'][_0x2b3825(0x2c5)]&&process[_0x2b3825(0x281)][_0x2b3825(0x21e)]('\x1bc');let _0x4a1a86,_0x559e09;try{[_0x4a1a86,_0x559e09]=await Promise[_0x2b3825(0x294)]([_0x41bd5e['workflow'][_0x2b3825(0x291)](_0x1dafec),_0x41bd5e[_0x2b3825(0x2ba)][_0x2b3825(0x2fa)](_0x1dafec,![])]);}catch(_0x5b9853){console['error'](a55_0x262d9e[_0x2b3825(0x25b)](_0x2b3825(0x21a)));_0x559c1d>0x0&&console['error'](a55_0x262d9e[_0x2b3825(0x312)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x559c1d));throw _0x5b9853;}const _0x34408e=_0x41bd5e[_0x2b3825(0x2a4)][_0x2b3825(0x313)],_0x31b1bd=this[_0x2b3825(0x146)](_0x4a1a86,_0x559e09,_0x34408e);console[_0x2b3825(0x2bd)](_0x31b1bd);const _0x655407=_0x4a1a86[_0x2b3825(0x195)]&&_0x559e09[_0x2b3825(0x224)](_0x3f66c9=>_0x3f66c9['state']!=='running'&&_0x3f66c9['state']!=='planned');if(_0x655407){console[_0x2b3825(0x2f5)](a55_0x262d9e['green']('\x0a✔\x20Attempt\x20complete'));break;}console[_0x2b3825(0x2f5)](a55_0x262d9e['dim'](_0x2b3825(0x151)+_0x559c1d*0x2+_0x2b3825(0x30e))),await new Promise(_0x507d2e=>setTimeout(_0x507d2e,_0xd6707e)),_0x559c1d++;}_0x559c1d>=_0x224d84&&console[_0x2b3825(0x2f5)](a55_0x262d9e[_0x2b3825(0x1ea)](_0x2b3825(0x24b)));}[a55_0x29f4d0(0x146)](_0xcce321,_0x35d368,_0x547efd){const _0x32b391=a55_0x29f4d0,_0xb584ed=[],_0xa988a2=TIMELINE_CONFIG[_0x32b391(0x314)],_0x1ddd5a=0x5,_0x3bfa13=process[_0x32b391(0x281)][_0x32b391(0x1e5)]||0x78,_0xcb3e76=_0x3bfa13-_0xa988a2-_0x1ddd5a,_0x551b44=Math[_0x32b391(0x180)](TIMELINE_CONFIG[_0x32b391(0x272)],Math[_0x32b391(0x231)](_0xcb3e76,TIMELINE_CONFIG[_0x32b391(0x2b8)])),_0x2cfbb2=new Date(_0xcce321[_0x32b391(0x2e8)])[_0x32b391(0x19b)](),_0x3c1d95=_0xcce321[_0x32b391(0x1d0)]?new Date(_0xcce321['finishedAt'])['getTime']():Date[_0x32b391(0x311)](),_0x16440a={'start':_0x2cfbb2,'end':_0x3c1d95,'duration':_0x3c1d95-_0x2cfbb2},_0x162ec8=new Map(),_0x142eee=[];for(const _0x28e7ec of _0x35d368){if(_0x28e7ec[_0x32b391(0x21d)]){const _0x13a8c6=new Date(_0x28e7ec[_0x32b391(0x21d)])['getTime'](),_0x1c79df=_0x28e7ec[_0x32b391(0x155)]?new Date(_0x28e7ec[_0x32b391(0x155)])[_0x32b391(0x19b)]():Date['now'](),_0x78bca5={'start':_0x13a8c6,'end':_0x1c79df,'duration':_0x1c79df-_0x13a8c6};_0x162ec8[_0x32b391(0x182)](_0x28e7ec['id'],_0x78bca5),_0x142eee[_0x32b391(0x2b7)]({'name':_0x28e7ec['fullName'],'state':_0x28e7ec['state']||'unknown','window':_0x78bca5});}else _0x142eee[_0x32b391(0x2b7)]({'name':_0x28e7ec[_0x32b391(0x27f)],'state':_0x28e7ec[_0x32b391(0x2b1)]||_0x32b391(0x1fc),'window':undefined});}_0x142eee[_0x32b391(0x242)]((_0xf8c196,_0x1c677e)=>{const _0x52efc4=_0x32b391;if(!_0xf8c196['window'])return 0x1;if(!_0x1c677e[_0x52efc4(0x1b3)])return-0x1;return _0xf8c196['window'][_0x52efc4(0x1cc)]-_0x1c677e[_0x52efc4(0x1b3)]['start'];});const _0x54be14=_0x142eee[_0x32b391(0x17c)],_0x3999aa=_0x54be14>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x3999aa&&_0x142eee['splice'](TIMELINE_CONFIG[_0x32b391(0x255)]);const _0x5385a1=calculateTimeScale(_0x16440a,_0x551b44),_0x1682de=_0xcce321[_0x32b391(0x195)]?_0xcce321[_0x32b391(0x24c)]?a55_0x262d9e[_0x32b391(0x26d)](_0x32b391(0x24c)):a55_0x262d9e['red'](_0x32b391(0x2f5)):a55_0x262d9e[_0x32b391(0x2ab)](_0x32b391(0x207)),_0x47a11b=_0xcce321['project']?.['id'],_0x54983b=_0xcce321[_0x32b391(0x163)];let _0x2718a2;if(_0x47a11b&&_0x54983b){const _0xcd22d5=getWorkflowAttemptUrl(_0x547efd,_0x47a11b,_0x54983b,_0xcce321['id']);_0x2718a2=hyperlink(a55_0x262d9e[_0x32b391(0x312)](_0xcce321['id']),_0xcd22d5);}else _0x2718a2=a55_0x262d9e[_0x32b391(0x312)](_0xcce321['id']);_0xb584ed[_0x32b391(0x2b7)](_0x32b391(0x1b2)+_0x2718a2+_0x32b391(0x1fe)+_0x1682de+_0x32b391(0x1fe)+formatElapsed(_0x16440a[_0x32b391(0x188)]));if(_0x142eee['length']>0x0){const _0x3bea94=renderTimeAxis(_0x5385a1,_0x551b44),_0x2d62e9=new Date(_0x16440a[_0x32b391(0x1cc)]),_0x47133b=formatDate(_0x2d62e9),_0x431e7b=TIMELINE_CONFIG[_0x32b391(0x2fe)]+TIMELINE_CONFIG[_0x32b391(0x1f2)]+_0xa988a2,_0x3d83ac=_0x47133b['padStart'](_0x431e7b),_0x193f8b=a55_0x262d9e[_0x32b391(0x312)](_0x3d83ac);_0xb584ed[_0x32b391(0x2b7)](_0x193f8b+'\x20'+_0x3bea94);for(const _0x54fd75 of _0x142eee){_0xb584ed['push'](renderTaskRow(_0x54fd75,_0x5385a1,_0x551b44,_0xa988a2));}const _0x4ae732=calculateStats(_0x142eee);_0xb584ed[_0x32b391(0x2b7)](formatStats(_0x4ae732)),_0x3999aa&&_0xb584ed['push'](a55_0x262d9e[_0x32b391(0x1ea)](_0x32b391(0x2db)+TIMELINE_CONFIG[_0x32b391(0x255)]+_0x32b391(0x173)+_0x54be14+'\x20tasks')),_0xb584ed['push'](''),_0xb584ed[_0x32b391(0x2b7)](a55_0x262d9e['dim']('💡\x20Tip:\x20Use\x20')+(_0x32b391(0x1db)+_0xcce321['id']+'\x20logs')+a55_0x262d9e['dim'](_0x32b391(0x286)));}else _0xb584ed['push']('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0xb584ed[_0x32b391(0x303)]('\x0a');}['buildTimelineData'](_0x2eab24,_0x4bb732){const _0x4fbf04=a55_0x29f4d0,_0x6055d6=new Date(_0x2eab24['createdAt'])['getTime'](),_0x246f1b=_0x2eab24[_0x4fbf04(0x1d0)]?new Date(_0x2eab24[_0x4fbf04(0x1d0)])[_0x4fbf04(0x19b)]():Date[_0x4fbf04(0x311)](),_0x40e3a1=_0x246f1b-_0x6055d6,_0x38d966=[];for(const _0x1daa92 of _0x4bb732){if(_0x1daa92[_0x4fbf04(0x21d)]){const _0x460976=new Date(_0x1daa92[_0x4fbf04(0x21d)])[_0x4fbf04(0x19b)](),_0x6a2c52=_0x1daa92[_0x4fbf04(0x155)]?new Date(_0x1daa92[_0x4fbf04(0x155)])[_0x4fbf04(0x19b)]():Date['now']();_0x38d966[_0x4fbf04(0x2b7)]({'name':_0x1daa92[_0x4fbf04(0x27f)],'state':_0x1daa92[_0x4fbf04(0x2b1)]||'unknown','window':{'start':_0x460976,'end':_0x6a2c52,'duration':_0x6a2c52-_0x460976}});}else _0x38d966['push']({'name':_0x1daa92[_0x4fbf04(0x27f)],'state':_0x1daa92[_0x4fbf04(0x2b1)]||_0x4fbf04(0x1fc),'window':undefined});}const _0x244a46=calculateStats(_0x38d966);return{'attempt':{'id':_0x2eab24['id'],'status':_0x2eab24[_0x4fbf04(0x195)]?_0x2eab24[_0x4fbf04(0x24c)]?'success':_0x4fbf04(0x2f5):'running','createdAt':_0x2eab24[_0x4fbf04(0x2e8)],'finishedAt':_0x2eab24[_0x4fbf04(0x1d0)],'duration_ms':_0x40e3a1},'tasks':_0x38d966[_0x4fbf04(0x27e)](_0x26e77f=>({'name':_0x26e77f['name'],'state':_0x26e77f[_0x4fbf04(0x2b1)],'startedAt':_0x26e77f[_0x4fbf04(0x1b3)]?new Date(_0x26e77f['window'][_0x4fbf04(0x1cc)])[_0x4fbf04(0x253)]():null,'updatedAt':_0x26e77f[_0x4fbf04(0x1b3)]?new Date(_0x26e77f['window'][_0x4fbf04(0x1cb)])[_0x4fbf04(0x253)]():null,'duration_ms':_0x26e77f['window']?.[_0x4fbf04(0x188)]||null})),'stats':_0x244a46};}}function formatScheduleLine(_0x374461){const _0x133610=a55_0x29f4d0,_0xc519ef=_0x374461['disabledAt']?a55_0x262d9e[_0x133610(0x1ea)]('\x20(disabled)'):'',_0x1ca8cc=_0x374461[_0x133610(0x1c8)]?.[_0x133610(0x172)]?a55_0x262d9e[_0x133610(0x312)]('\x20['+_0x374461[_0x133610(0x1c8)][_0x133610(0x172)]+']'):'',_0x49ceb2=_0x374461[_0x133610(0x1d5)]?a55_0x262d9e['dim'](_0x133610(0x270)+new Date(_0x374461[_0x133610(0x1d5)])[_0x133610(0x2a9)]()):'';return _0x133610(0x1b4)+_0x374461['id']+'\x20'+(_0x374461[_0x133610(0x2ba)]?.['name']||_0x133610(0x19a))+_0x1ca8cc+_0xc519ef+_0x49ceb2;}function a55_0x2684(){const _0x5ba311=['\x20\x20Next\x20run:\x20','From\x20task:\x20','getMonth','finishedAt','newProjectId','sourceProjectName','workflow:upload','New\x20project\x20name:\x20','nextRunTime','\x22\x20to\x20new\x20project\x20\x22','diff','summary','Project\x20directory:\x20','\x20enabled\x20(','tdx\x20wf\x20attempt\x20','Files\x20to\x20upload:\x20','task','Setting\x20','Error:','List\x20workflows','Usage:\x20tdx\x20wf\x20use\x20<project>','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','unchanged','Listing\x20schedules\x20for\x20','columns','\x20\x20Project:\x20','Total:\x20','Cancelled','No\x20workflow\x20tdx.json\x20found','yellow','resolveProjectDir','\x20\x20tdx\x20wf\x20use\x20<project>','Status:\x20','projectId','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','POLL_INTERVAL_MS','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','ICON_SPACING','Select\x20a\x20session\x20to\x20view\x20timeline:','config','Parameters:\x20','Error:\x20','renderSingleTimeline','getHours','\x20from\x20session\x20','No\x20sessions\x20found\x20for:\x20','✔\x20Secret\x20\x27','planned','follow','\x20-\x20','sys','workflow:schedule:disable','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','yes','includeRetried','index','startsWith','Start\x20a\x20workflow\x20run','running','includes','session','\x0aPush\x20these\x20changes?','Project\x20name\x20is\x20required','executePushProject','No\x20workflow\x20projects\x20found','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','\x1b[1A\x1b[2K','execute','✔\x20Push\x20complete','clear','Retrying\x20attempt...','requireProject','No\x20workflow\x20sessions\x20found','session_id','\x20\x20New\x20attempt\x20ID:\x20','\x22\x20already\x20exists\x20(ID:\x20','\x0aFailed\x20to\x20fetch\x20attempt\x20data','session:','sessionTime','startedAt','write','✔\x20Workflow\x20project\x20context\x20cleared.','value','rows','round','\x0aDry\x20run\x20-\x20no\x20files\x20written','every','key','Reason:\x20','sourceDir','✔\x20Schedule\x20#','\x0aDry\x20run\x20-\x20nothing\x20pushed','Warning:','repeat','revision','projects','Error:\x20Attempt\x20ID\x20is\x20required','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','tdx.json','min','jsonl','output','No\x20sessions\x20found','resolveProject','stringify','No\x20attempts\x20found','Pushing\x20project...','Setting\x20secret...','...','disableSchedule','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','/app/workflows/','get','icon','bold','Loading\x20sessions...','sort','workflow:kill','Task\x20name:\x20','\x20sessions\x20','Select\x20a\x20task\x20to\x20view\x20logs:','Schedule\x20ID\x20is\x20required','split','newProjectName','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','success','\x20deleted','\x0aUpdate\x20existing\x20project\x20\x22','workflow:workflows','Latest\x20session\x20has\x20no\x20attempt','\x20secrets...','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','toISOString','workflows','MAX_TASKS_DISPLAY','taskName','Retrying\x20session...','\x20modified','dryRun','Source:\x20','red','Retry\x20a\x20session\x20or\x20attempt','\x0aError:','download','hasChanges','parse','410055oPNjGi','Error:\x20Secret\x20key\x20is\x20required','✔\x20Workflow\x20run\x20started','Workflow:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','4053228khyfRs','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','\x20is\x20not\x20a\x20directory','retryAttemptName','Source\x20project:\x20','Dry\x20run:\x20yes','green','\x0aDry\x20run\x20-\x20no\x20project\x20created','Getting\x20attempt\x20tasks...','\x20next:\x20','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','MIN_TIMELINE_WIDTH','basename','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Key:\x20','has','filter','workflow:logs','Disabling\x20schedule\x20#','fromTask','Resume\x20from:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','9TcFwYD','map','fullName','LABEL_WIDTH_DIVISOR','stdout','startTime','msPerChar','464299QzNmXu','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','\x20to\x20see\x20detailed\x20logs','MIN_LABEL_COUNT','workflowName','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Expected\x20format:\x20--param\x20key=value','\x20secret','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','verbose','60Dqxagr','executeCloneProject','\x20has\x20no\x20attempts','attempt','\x20\x20Project\x20ID:\x20','targetDir','all','cyan','table','workflow:secrets:delete','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','projectName','Pushing\x20workflow\x20project...','workflow:schedule:enable','some','Project\x20name:\x20','json','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20\x20Revision:\x20','workflow:pull','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','context','Validation:\x20skipped','data','✔\x20Project:\x20','limit','toLocaleString','\x20\x20Session\x20ID:\x20','blue','size','getDate','Loading\x20session...','attempt:','Listing\x20workflow\x20projects...','state','getSchedule','GUTTER','text','✔\x20Workflow\x20project\x20set\x20to:\x20','renderSessionsTimeline','push','MAX_TIMELINE_WIDTH','title','workflow','filesExtracted','sessions','log','includeSubtasks','canceling','group_error','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','relative','\x20task','values','isTTY','No\x20log\x20content\x20found','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','localeCompare','\x20(system)','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','listSchedules','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','substring','Source\x20directory:\x20','✔\x20Schedule\x20found','workflow:download','Downloading\x20logs...','\x0aClone\x20\x22','\x20\x20Console:\x20','✔\x20Downloaded\x20','Analyzing\x20changes...','✔\x20Project\x20updated','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','/sessions/','replace','\x20(use\x20--limit\x20to\x20show\x20more)','⚠\x20Showing\x20first\x20','.\x20Expected\x20format:\x20KEY=VALUE','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','pending','List\x20workflow\x20attempts','List\x20all\x20workflow\x20projects','format','Session\x20not\x20found:\x20','select','No\x20attempts\x20found\x20in\x20project:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','No\x20schedules\x20found','Revision:\x20','createdAt','\x20new','1432FsARjX','Listing\x20workflows...','match','Error:\x20Invalid\x20parameter\x20format:\x20','82778zlGeVV','trimEnd','8502228TWfyLR','floor','changes','readFile','logs','error','autocomplete','slice','📁\x20','padStart','tasks','Tip:\x20cd\x20to\x20workflows/','lastAttempt','Listing\x20schedules...','ICON_WIDTH','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','resolveProjectId','Using\x20attempt\x20','skipSchedule','join','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','\x0aApply\x20these\x20changes?','Target:\x20','status','list','Listing\x20workflow\x20sessions...','Fetching\x20workflow\x20','Starting\x20workflow\x20run...','✔\x20Clone\x20complete','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Enabling\x20schedule\x20#','workflow:secrets:list','now','dim','site','TASK_NAME_WIDTH','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','(use\x20--limit\x20to\x20see\x20more)','✔\x20Deleted\x20project\x20','✔\x20Pushed\x20','Pulling\x20project\x20','navigateSessionsInteractive','\x20schedule','nextTime','45983nEprTA','No\x20workflows\x20found','toLowerCase','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','Getting\x20attempt\x20details...','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','renderTimeline','Workflow:','No\x20projects\x20match\x20pattern:\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Params:\x20','Failed\x20to\x20fetch\x20attempt\x20data','Error:\x20Project\x20name\x20is\x20required','workflow:schedules','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','Session\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x0aPolling...\x20(','No\x20matching\x20sessions\x20found','Session\x20time:\x20','\x0a✔\x20No\x20changes\x20to\x20push','updatedAt','\x0a✔\x20Already\x20up\x20to\x20date','27321330oGwQWN','workflow:use','Including\x20subtasks:\x20yes','isNewProject','delete','workflow:run','cancelRequested','find','deleted','\x20\x20Session\x20context\x20set\x20to:\x20','Enable\x20a\x20workflow\x20schedule','generateSessionTimelineRows','sessionId','\x20\x20Changes:\x20','existingProjectId','MAX_LABEL_COUNT','prepareCloneProject','workflow:projects','attemptId','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','📋\x20','workflowProject','unknown','Listing\x20workflow\x20attempts...','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','workflow:delete','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','name','\x20of\x20','Invalid\x20format:\x20','List\x20workflow\x20execution\x20sessions','No\x20workflows\x20found\x20in\x20project:\x20','-\x20no\x20files\x20written','attempts','applyPullProject','new','\x0a⚠\x20Project\x20\x22','length','fill','resolve','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','max','isArray','set','\x20\x20Target:\x20','Filter:\x20project=','Cloning\x20to\x20','keys','🔄\x20','duration','modified','utf-8','✔\x20Found\x20','\x20unchanged','\x20disabled\x20(','\x20session','getMinutes','Source\x20directory\x20is\x20required','Project\x20filter:\x20','white','Force:\x20yes','from','done','stat','skipValidation','\x20\x20Attempt\x20ID:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','(unknown)','getTime','LABEL_MIN_SPACING','parseProjectWorkflowPattern','Pattern:\x20','params','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20\x20Workflow:\x20','Filter:\x20','type','indexOf','targetExists','\x20secrets\x20set\x20for\x20project\x20\x27','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Listing\x20secrets...','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','resumeFrom','workflow:attempts','param','getFullYear','workflow:sessions','Resolving\x20project\x20\x27','✔\x20Showing\x20','listProjectSchedules','Attempt:\x20','window','📅\x20#','MAX_POLL_ITERATIONS','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','enableSchedule','durationMs','\x20\x20Source:\x20','Project:\x20','description','No\x20sessions\x20found\x20in\x20project:\x20','Fetching\x20log\x20files...','\x22\x20with\x20new\x20revision?','listSecrets','Target\x20directory:\x20','\x20workflow','pollTimeline','preparePushProject','cwd','Attempt\x20ID:\x20','showWorkflowConsoleUrl','→\x20Project:\x20','project','\x20\x20Location:\x20','Task\x20graph:','end','start'];a55_0x2684=function(){return _0x5ba311;};return a55_0x2684();}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x14d);[a55_0x29f4d0(0x1bb)]='List\x20workflow\x20schedules';async[a55_0x29f4d0(0x211)](_0xaf3d93){const _0x1bc6e7=a55_0x29f4d0,{options:_0x30e395,args:_0x3009f7,tdx:_0xcd3561}=_0xaf3d93,{scheduleId:_0xe568f9}=_0x30e395;if(_0xe568f9&&_0x3009f7[0x0])return console[_0x1bc6e7(0x2f5)](a55_0x262d9e['red'](_0x1bc6e7(0x1df)),_0x1bc6e7(0x271)),console[_0x1bc6e7(0x2f5)](a55_0x262d9e['dim']('Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>')),0x1;if(_0xe568f9){const _0x4022f3=await withSpinner('Fetching\x20schedule\x20#'+_0xe568f9+'...',()=>_0xcd3561['workflow'][_0x1bc6e7(0x2b2)](_0xe568f9),{'verbose':_0x30e395[_0x1bc6e7(0x28d)]}),_0x3aedac=_0x4022f3[_0x1bc6e7(0x2a6)];return isStructuredFormat(_0x30e395)?await handleSingleObjectOutput(_0x3aedac,_0x30e395):(console['error'](_0x1bc6e7(0x2cf)),console[_0x1bc6e7(0x2bd)](formatScheduleLine(_0x3aedac))),0x0;}const _0x2b1de8=this[_0x1bc6e7(0x19d)](_0x3009f7,_0x30e395);if(!_0x2b1de8)return 0x1;const {projectName:_0x52566b,workflowName:_0x168319}=_0x2b1de8,_0x536c3f=_0x52566b?'\x27'+_0x52566b+(_0x168319?'.'+_0x168319:'')+'\x27':undefined,_0x42000b=await withSpinner(_0x536c3f?_0x1bc6e7(0x1e4)+_0x536c3f+_0x1bc6e7(0x23a):_0x1bc6e7(0x2fd),()=>_0x52566b?_0xcd3561[_0x1bc6e7(0x2ba)][_0x1bc6e7(0x1b1)](_0x52566b,{'workflow':_0x168319,'limit':_0x30e395['limit']}):_0xcd3561[_0x1bc6e7(0x2ba)][_0x1bc6e7(0x2cb)]({'limit':_0x30e395[_0x1bc6e7(0x2a8)]}),{'verbose':_0x30e395[_0x1bc6e7(0x28d)]}),_0x4c4444=_0x42000b[_0x1bc6e7(0x2a6)],_0x362cc0=_0x30e395[_0x1bc6e7(0x2a8)]&&_0x4c4444[_0x1bc6e7(0x17c)]>=_0x30e395[_0x1bc6e7(0x2a8)]?a55_0x262d9e[_0x1bc6e7(0x312)](_0x1bc6e7(0x14e)):'';console[_0x1bc6e7(0x2f5)](_0x1bc6e7(0x18b)+_0x4c4444[_0x1bc6e7(0x17c)]+_0x1bc6e7(0x31b)+(_0x4c4444['length']!==0x1?'s':'')+_0x362cc0);if(isStructuredFormat(_0x30e395))await handleSDKOutput(_0x4c4444,_0x30e395);else{if(_0x4c4444['length']===0x0)console['log'](_0x1bc6e7(0x2e6));else for(const _0x3375fd of _0x4c4444){console['log'](formatScheduleLine(_0x3375fd));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x29c);['description']=a55_0x29f4d0(0x161);async[a55_0x29f4d0(0x211)](_0x395ffa){const _0x46c7d8=a55_0x29f4d0,{options:_0x605215,args:_0x4f578e,tdx:_0x2a080f}=_0x395ffa,_0x94130a=_0x4f578e[0x0];if(!_0x94130a)return console['error'](a55_0x262d9e[_0x46c7d8(0x25b)]('Error:'),_0x46c7d8(0x247)),console['error'](a55_0x262d9e[_0x46c7d8(0x312)](_0x46c7d8(0x143))),console[_0x46c7d8(0x2f5)](a55_0x262d9e[_0x46c7d8(0x312)](_0x46c7d8(0x30d))),0x1;const {backfill:_0x34e67c,nextTime:_0x4c2e4a}=_0x605215,_0x4a9e5a={};if(_0x34e67c!==undefined)_0x4a9e5a[_0x46c7d8(0x302)]=!_0x34e67c;if(_0x4c2e4a!==undefined)_0x4a9e5a[_0x46c7d8(0x31c)]=_0x4c2e4a;const _0x580770=await withSpinner(_0x46c7d8(0x30f)+_0x94130a+_0x46c7d8(0x23a),()=>_0x2a080f[_0x46c7d8(0x2ba)][_0x46c7d8(0x1b7)](_0x94130a,_0x4a9e5a),{'verbose':_0x605215[_0x46c7d8(0x28d)]}),_0x34af1b=_0x580770[_0x46c7d8(0x2a6)];return isStructuredFormat(_0x605215)?await handleSingleObjectOutput(_0x34af1b,_0x605215):(console['log'](_0x46c7d8(0x228)+_0x94130a+_0x46c7d8(0x1da)+(_0x34af1b[_0x46c7d8(0x2ba)]?.[_0x46c7d8(0x172)]||'unknown')+')'),_0x34af1b[_0x46c7d8(0x1d5)]&&console[_0x46c7d8(0x2bd)](a55_0x262d9e[_0x46c7d8(0x312)](_0x46c7d8(0x1cd)+new Date(_0x34af1b[_0x46c7d8(0x1d5)])[_0x46c7d8(0x2a9)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x200);['description']='Disable\x20a\x20workflow\x20schedule';async[a55_0x29f4d0(0x211)](_0x27887d){const _0x2bb796=a55_0x29f4d0,{options:_0x538633,args:_0x55539b,tdx:_0x212cdf}=_0x27887d,_0x3ab506=_0x55539b[0x0];if(!_0x3ab506)return console[_0x2bb796(0x2f5)](a55_0x262d9e['red']('Error:'),_0x2bb796(0x247)),console['error'](a55_0x262d9e[_0x2bb796(0x312)](_0x2bb796(0x268))),console[_0x2bb796(0x2f5)](a55_0x262d9e[_0x2bb796(0x312)](_0x2bb796(0x30d))),0x1;const _0x333f2f=await withSpinner(_0x2bb796(0x279)+_0x3ab506+'...',()=>_0x212cdf[_0x2bb796(0x2ba)][_0x2bb796(0x23b)](_0x3ab506),{'verbose':_0x538633['verbose']}),_0xc971eb=_0x333f2f['data'];return isStructuredFormat(_0x538633)?await handleSingleObjectOutput(_0xc971eb,_0x538633):console[_0x2bb796(0x2bd)](_0x2bb796(0x228)+_0x3ab506+_0x2bb796(0x18d)+(_0xc971eb['workflow']?.[_0x2bb796(0x172)]||_0x2bb796(0x16d))+')'),0x0;}}
|
|
1
|
+
const a55_0xa29ad1=a55_0x34d6;(function(_0x3e8667,_0x362943){const _0x2e3594=a55_0x34d6,_0xff2831=_0x3e8667();while(!![]){try{const _0x26ae7c=parseInt(_0x2e3594(0x358))/0x1+parseInt(_0x2e3594(0x264))/0x2+-parseInt(_0x2e3594(0x35b))/0x3*(-parseInt(_0x2e3594(0x331))/0x4)+parseInt(_0x2e3594(0x293))/0x5*(-parseInt(_0x2e3594(0x318))/0x6)+parseInt(_0x2e3594(0x19b))/0x7*(-parseInt(_0x2e3594(0x1a0))/0x8)+-parseInt(_0x2e3594(0x1a4))/0x9+-parseInt(_0x2e3594(0x255))/0xa*(parseInt(_0x2e3594(0x203))/0xb);if(_0x26ae7c===_0x362943)break;else _0xff2831['push'](_0xff2831['shift']());}catch(_0x352661){_0xff2831['push'](_0xff2831['shift']());}}}(a55_0x590a,0x6797f));import a55_0x12f6c0 from'chalk';import{existsSync}from'fs';import a55_0xe058bc from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import{parseTaskGraph,formatTaskGraph,summarizeTaskGraph,formatWarningSummary}from'../sdk/workflow/task-graph.js';import a55_0x46d174 from'prompts';function getAttemptStatusDisplay(_0x1c5194){const _0xe220bc=a55_0x34d6;if(!_0x1c5194)return{'icon':'⏳','text':''};const {done:_0x11526d,success:_0x3449ca,cancelRequested:_0x508efb}=_0x1c5194;if(!_0x11526d)return _0x508efb?{'icon':'🛑','text':a55_0x12f6c0[_0xe220bc(0x227)](_0xe220bc(0x2ee))}:{'icon':'🔄','text':a55_0x12f6c0[_0xe220bc(0x1b6)](_0xe220bc(0x31d))};if(_0x3449ca)return{'icon':'✅','text':a55_0x12f6c0[_0xe220bc(0x1cf)]('success')};return{'icon':'❌','text':a55_0x12f6c0['red']('error')};}export class WorkflowBaseCommand extends BaseCommand{[a55_0xa29ad1(0x1a8)](_0x468be1,_0x2de17d,_0x4f3265=0x0){const _0x4c48b3=a55_0xa29ad1;return _0x468be1[_0x4f3265]||_0x2de17d[_0x4c48b3(0x1b0)];}['requireProject'](_0x5ee4a9,_0x349d0b,_0x1b0ebb=0x0){const _0x4847ee=a55_0xa29ad1,_0x819fd5=this[_0x4847ee(0x1a8)](_0x5ee4a9,_0x349d0b,_0x1b0ebb);if(!_0x819fd5)return console[_0x4847ee(0x2b5)](a55_0x12f6c0[_0x4847ee(0x1bb)](_0x4847ee(0x352)),'Project\x20name\x20is\x20required'),console['error'](a55_0x12f6c0[_0x4847ee(0x34a)](_0x4847ee(0x333))),null;return _0x819fd5;}[a55_0xa29ad1(0x29c)](_0x3ab74e,_0x334da3){const _0x171ffd=a55_0xa29ad1;if(_0x3ab74e[0x0]){const _0x493f79=_0x3ab74e[0x0][_0x171ffd(0x1c9)]('.');if(_0x493f79[_0x171ffd(0x2ec)]===0x1)return{'projectName':_0x493f79[0x0],'workflowName':undefined};else return _0x493f79[_0x171ffd(0x2ec)]===0x2?{'projectName':_0x493f79[0x0],'workflowName':_0x493f79[0x1]}:(console[_0x171ffd(0x2b5)](a55_0x12f6c0[_0x171ffd(0x1bb)](_0x171ffd(0x352)),_0x171ffd(0x1fe)),null);}return{'projectName':_0x334da3[_0x171ffd(0x1b0)],'workflowName':undefined};}['resolveProjectDir'](_0x2c996f,_0x31464f,_0x3c598f=0x0){const _0x14a832=a55_0xa29ad1;if(_0x2c996f[_0x3c598f])return _0x2c996f[_0x3c598f];if(_0x31464f[_0x14a832(0x1b0)]){const _0xa02335=a55_0xe058bc[_0x14a832(0x23a)](process[_0x14a832(0x344)](),_0x14a832(0x335),_0x31464f['workflowProject']);if(existsSync(a55_0xe058bc['join'](_0xa02335,_0x14a832(0x337))))return _0xa02335;}return undefined;}async[a55_0xa29ad1(0x338)](_0x448784,_0x5981d8,_0xd897c8){const _0x591aec=a55_0xa29ad1;try{const _0x4ae260=await _0x448784[_0x591aec(0x1d9)][_0x591aec(0x335)](_0x5981d8,{'limit':0x1});if(_0x4ae260['length']>0x0){const _0x48c0ca=_0x4ae260[0x0]['id'],_0x57630f=getWorkflowUrl(_0xd897c8,_0x48c0ca);console[_0x591aec(0x2b5)](_0x591aec(0x2ce)+a55_0x12f6c0[_0x591aec(0x2dd)](_0x57630f));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x298);['description']='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a55_0xa29ad1(0x22c)](_0x24b9f7){const _0x57b1ec=a55_0xa29ad1,{options:_0x24594d,args:_0x57ef7a,tdx:_0x17886d}=_0x24b9f7,_0x422cdf=_0x57ef7a[0x0],_0x399820=_0x24594d[_0x57b1ec(0x25e)];if(_0x399820)return saveSessionContext({'workflow_project':undefined},_0x24594d[_0x57b1ec(0x326)]),console['log'](a55_0x12f6c0[_0x57b1ec(0x1cf)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x422cdf)return console[_0x57b1ec(0x2b5)](a55_0x12f6c0[_0x57b1ec(0x1bb)](_0x57b1ec(0x352)),_0x57b1ec(0x216)),console['error'](a55_0x12f6c0[_0x57b1ec(0x34a)](_0x57b1ec(0x25a))),console['error'](a55_0x12f6c0[_0x57b1ec(0x34a)](_0x57b1ec(0x289))),0x1;const _0x376125=await withSpinner(_0x57b1ec(0x341)+_0x422cdf+_0x57b1ec(0x355),()=>_0x17886d[_0x57b1ec(0x1d9)][_0x57b1ec(0x300)](_0x422cdf),{'verbose':_0x24594d[_0x57b1ec(0x19f)]}),{name:_0x2999bf}=_0x376125[_0x57b1ec(0x35c)];return saveSessionContext({'workflow_project':_0x2999bf},_0x24594d[_0x57b1ec(0x326)]),console[_0x57b1ec(0x361)](a55_0x12f6c0[_0x57b1ec(0x1cf)](_0x57b1ec(0x274)+a55_0x12f6c0[_0x57b1ec(0x2dd)](_0x2999bf))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x1b9);[a55_0xa29ad1(0x22a)]='List\x20all\x20workflow\x20projects';async[a55_0xa29ad1(0x22c)](_0x195b51){const _0x2cea0f=a55_0xa29ad1,{options:_0x2cd3bf,args:_0x2d87b1,tdx:_0x2c6873}=_0x195b51,_0x4054b5=_0x2d87b1[0x0];_0x2cd3bf[_0x2cea0f(0x19f)]&&_0x4054b5&&console[_0x2cea0f(0x2b5)](_0x2cea0f(0x2f8)+_0x4054b5);const _0x377ea3=await withSpinner(_0x2cea0f(0x2c3),()=>_0x2c6873[_0x2cea0f(0x1d9)]['projects'](_0x4054b5,{'limit':_0x2cd3bf[_0x2cea0f(0x301)]}),{'verbose':_0x2cd3bf[_0x2cea0f(0x19f)]});let _0x468ff6=_0x377ea3[_0x2cea0f(0x35c)];_0x468ff6[_0x2cea0f(0x271)]((_0x3f3311,_0x2e8b11)=>_0x3f3311[_0x2cea0f(0x1ff)]['localeCompare'](_0x2e8b11['name']));const _0x3fa94c=_0x2cd3bf[_0x2cea0f(0x301)]&&_0x468ff6[_0x2cea0f(0x2ec)]>=_0x2cd3bf[_0x2cea0f(0x301)]?a55_0x12f6c0[_0x2cea0f(0x34a)](_0x2cea0f(0x1ee)):'';console[_0x2cea0f(0x2b5)](_0x2cea0f(0x32a)+_0x468ff6[_0x2cea0f(0x2ec)]+'\x20project'+(_0x468ff6['length']!==0x1?'s':'')+_0x3fa94c);if(_0x2cd3bf[_0x2cea0f(0x1d2)]===_0x2cea0f(0x325)||_0x2cd3bf[_0x2cea0f(0x1d2)]==='jsonl'||_0x2cd3bf[_0x2cea0f(0x1d2)]===_0x2cea0f(0x20d))await handleSDKOutput(_0x468ff6,_0x2cd3bf);else{if(_0x468ff6[_0x2cea0f(0x2ec)]===0x0)_0x4054b5?console['log']('No\x20projects\x20match\x20pattern:\x20'+_0x4054b5):console['log']('No\x20workflow\x20projects\x20found');else{const _0x4b9050=_0x468ff6[_0x2cea0f(0x312)](_0x52f71d=>{const _0x2c26c2=_0x2cea0f,_0x51eea2=_0x52f71d['metadata']?.['some'](_0x38cbcb=>_0x38cbcb[_0x2c26c2(0x2b0)]===_0x2c26c2(0x236)),_0x4ecdc9=_0x51eea2?a55_0x12f6c0[_0x2c26c2(0x34a)]('\x20(system)'):'';return _0x2c26c2(0x2ad)+_0x52f71d[_0x2c26c2(0x1ff)]+_0x4ecdc9;});await writeOutput(_0x4b9050[_0x2cea0f(0x23a)]('\x0a'),_0x2cd3bf[_0x2cea0f(0x196)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x1dd);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x282);async[a55_0xa29ad1(0x22c)](_0x3afef0){const _0x3762ce=a55_0xa29ad1,{options:_0x17dc5d,args:_0x219930,tdx:_0x5deab7}=_0x3afef0,_0x31ec07=this[_0x3762ce(0x1a8)](_0x219930,_0x17dc5d);_0x17dc5d[_0x3762ce(0x19f)]&&_0x31ec07&&console[_0x3762ce(0x2b5)](_0x3762ce(0x257)+_0x31ec07);const _0x52f4cd=await withSpinner(_0x3762ce(0x316),()=>_0x5deab7[_0x3762ce(0x1d9)][_0x3762ce(0x335)](_0x31ec07,{'limit':_0x17dc5d['limit']}),{'verbose':_0x17dc5d[_0x3762ce(0x19f)]});let _0x44c4ea=_0x52f4cd[_0x3762ce(0x35c)];_0x44c4ea['sort']((_0x34cde6,_0x333208)=>{const _0x540b6e=_0x3762ce,_0x182070=_0x34cde6[_0x540b6e(0x1ff)][_0x540b6e(0x1bd)](_0x333208[_0x540b6e(0x1ff)]);if(_0x182070!==0x0)return _0x182070;return(_0x34cde6[_0x540b6e(0x356)]?.['name']||'')['localeCompare'](_0x333208[_0x540b6e(0x356)]?.[_0x540b6e(0x1ff)]||'');});const _0x434f88=_0x17dc5d['limit']&&_0x44c4ea[_0x3762ce(0x2ec)]>=_0x17dc5d[_0x3762ce(0x301)]?a55_0x12f6c0['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3762ce(0x2b5)]('✔\x20Found\x20'+_0x44c4ea[_0x3762ce(0x2ec)]+'\x20workflow'+(_0x44c4ea[_0x3762ce(0x2ec)]!==0x1?'s':'')+_0x434f88);if(_0x17dc5d[_0x3762ce(0x1d2)]==='json'||_0x17dc5d[_0x3762ce(0x1d2)]==='jsonl'||_0x17dc5d['format']==='table')await handleSDKOutput(_0x44c4ea,_0x17dc5d);else{if(_0x44c4ea[_0x3762ce(0x2ec)]===0x0)_0x31ec07?console[_0x3762ce(0x361)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x31ec07):console['log'](_0x3762ce(0x268));else{const _0x58a9df=_0x17dc5d[_0x3762ce(0x2e4)],_0x2de420=_0x44c4ea[_0x3762ce(0x312)](_0x3a0e04=>{const _0x3306b8=_0x3762ce,_0x53eaa5=a55_0x12f6c0['dim']('#'+_0x3a0e04['id']),_0x247a9e=hyperlink(_0x53eaa5,getWorkflowUrl(_0x58a9df,_0x3a0e04['id'])),_0x4349a8=_0x3a0e04['project']?.[_0x3306b8(0x1ff)]?a55_0x12f6c0[_0x3306b8(0x34a)]('\x20('+_0x3a0e04[_0x3306b8(0x356)][_0x3306b8(0x1ff)]+')'):'';return _0x3306b8(0x278)+_0x247a9e+'\x20'+_0x3a0e04[_0x3306b8(0x1ff)]+_0x4349a8;});await writeOutput(_0x2de420[_0x3762ce(0x23a)]('\x0a'),_0x17dc5d[_0x3762ce(0x196)],_0x3762ce(0x292));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x21e);[a55_0xa29ad1(0x22a)]='List\x20workflow\x20execution\x20sessions';async['execute'](_0x24e6d9){const _0x464d6a=a55_0xa29ad1,{options:_0x2ef337,args:_0x436be1,tdx:_0xa968ea}=_0x24e6d9,_0x198a4e=this[_0x464d6a(0x29c)](_0x436be1,_0x2ef337);if(!_0x198a4e)return 0x1;const {projectName:_0x1b670d,workflowName:_0x1e743c}=_0x198a4e;if(_0x2ef337[_0x464d6a(0x19f)]){if(_0x1b670d&&_0x1e743c)console['error'](_0x464d6a(0x2fb)+_0x1b670d+'.'+_0x1e743c);else _0x1b670d&&console[_0x464d6a(0x2b5)](_0x464d6a(0x31a)+_0x1b670d);const _0x3a15f6=_0x2ef337['status'];_0x3a15f6&&console[_0x464d6a(0x2b5)](_0x464d6a(0x24f)+_0x3a15f6);}let _0x3b92e6=0x28;if(process[_0x464d6a(0x2dc)]['isTTY']&&!_0x2ef337['output']&&!_0x2ef337[_0x464d6a(0x1d2)]){const _0xb9914a=process[_0x464d6a(0x2dc)][_0x464d6a(0x29b)]||0x28;_0x3b92e6=Math[_0x464d6a(0x27f)](0x14,Math[_0x464d6a(0x27e)](_0xb9914a*0x2/0x3));}const _0x2a95e7=_0x2ef337[_0x464d6a(0x301)]||_0x3b92e6,_0x525a21=await withSpinner(_0x464d6a(0x1a7),()=>_0xa968ea[_0x464d6a(0x1d9)][_0x464d6a(0x243)]({'projectName':_0x1b670d,'workflowName':_0x1e743c,'status':_0x2ef337[_0x464d6a(0x1d8)],'fromTime':_0x2ef337['from'],'toTime':_0x2ef337['to'],'limit':_0x2a95e7}),{'verbose':_0x2ef337[_0x464d6a(0x19f)]}),_0x49b241=_0x525a21['data'];_0x49b241['sort']((_0x4724ec,_0x55b7fe)=>{const _0x4a88d9=_0x464d6a,_0x3b9a26=_0x4724ec[_0x4a88d9(0x329)]||'',_0x518d84=_0x55b7fe[_0x4a88d9(0x329)]||'';return _0x518d84[_0x4a88d9(0x1bd)](_0x3b9a26);});_0x49b241['length']>=_0x2a95e7?console[_0x464d6a(0x2b5)]('✔\x20Showing\x20'+_0x49b241['length']+_0x464d6a(0x1ac)+a55_0x12f6c0[_0x464d6a(0x34a)](_0x464d6a(0x359))):console[_0x464d6a(0x2b5)](_0x464d6a(0x32a)+_0x49b241[_0x464d6a(0x2ec)]+_0x464d6a(0x35e)+(_0x49b241[_0x464d6a(0x2ec)]!==0x1?'s':''));if(_0x2ef337[_0x464d6a(0x1d2)]===_0x464d6a(0x325)||_0x2ef337[_0x464d6a(0x1d2)]==='jsonl'||_0x2ef337[_0x464d6a(0x1d2)]===_0x464d6a(0x20d))await handleSDKOutput(_0x49b241,_0x2ef337);else{if(!process[_0x464d6a(0x2dc)][_0x464d6a(0x1fb)]||_0x2ef337[_0x464d6a(0x196)]){if(_0x49b241[_0x464d6a(0x2ec)]===0x0){if(_0x1b670d&&_0x1e743c)console[_0x464d6a(0x361)](_0x464d6a(0x1fd)+_0x1b670d+'.'+_0x1e743c);else _0x1b670d?console[_0x464d6a(0x361)](_0x464d6a(0x349)+_0x1b670d):console[_0x464d6a(0x361)]('No\x20sessions\x20found');}else{const _0x2a8aeb=_0x2ef337[_0x464d6a(0x2e4)],_0x16bc25=this[_0x464d6a(0x1b4)](_0x49b241,_0x2a8aeb);_0x2ef337['output']?await writeOutput(_0x16bc25,_0x2ef337[_0x464d6a(0x196)],_0x464d6a(0x292)):console[_0x464d6a(0x361)](_0x16bc25);}!_0x1b670d&&(console[_0x464d6a(0x2b5)](''),console[_0x464d6a(0x2b5)](a55_0x12f6c0[_0x464d6a(0x34a)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x464d6a(0x2b5)](a55_0x12f6c0[_0x464d6a(0x34a)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a55_0x12f6c0[_0x464d6a(0x34a)](_0x464d6a(0x33f))));}else{if(_0x49b241['length']===0x0){if(_0x1b670d&&_0x1e743c)console[_0x464d6a(0x361)]('No\x20sessions\x20found\x20for:\x20'+_0x1b670d+'.'+_0x1e743c);else _0x1b670d?console['log'](_0x464d6a(0x349)+_0x1b670d):console[_0x464d6a(0x361)]('No\x20sessions\x20found');}else await this['navigateSessionsInteractive'](_0x49b241,_0x24e6d9,_0x1b670d);}}return 0x0;}[a55_0xa29ad1(0x1b4)](_0x9bf3c9,_0x5baab1){const _0x4c8330=a55_0xa29ad1,_0xdb59f5=[],_0x45d4a2=new Map();let _0x227030=Infinity,_0x5e7f06=-Infinity;for(const _0x12d59a of _0x9bf3c9){if(_0x12d59a[_0x4c8330(0x1af)]?.[_0x4c8330(0x1d7)]){const _0x15c4c1=new Date(_0x12d59a[_0x4c8330(0x1af)][_0x4c8330(0x1d7)])[_0x4c8330(0x34e)](),_0x1583fb=_0x12d59a[_0x4c8330(0x1af)][_0x4c8330(0x353)]?new Date(_0x12d59a[_0x4c8330(0x1af)]['finishedAt'])['getTime']():Date[_0x4c8330(0x2a3)](),_0x5e9034=_0x12d59a[_0x4c8330(0x356)]?.[_0x4c8330(0x1ff)]||_0x4c8330(0x1f9);!_0x45d4a2[_0x4c8330(0x262)](_0x5e9034)&&_0x45d4a2['set'](_0x5e9034,[]),_0x45d4a2['get'](_0x5e9034)[_0x4c8330(0x267)]({'session':_0x12d59a,'startTime':_0x15c4c1,'endTime':_0x1583fb,'duration':_0x1583fb-_0x15c4c1}),_0x227030=Math[_0x4c8330(0x21c)](_0x227030,_0x15c4c1),_0x5e7f06=Math[_0x4c8330(0x27f)](_0x5e7f06,_0x1583fb);}}if(_0x45d4a2[_0x4c8330(0x2b1)]===0x0)return _0x4c8330(0x26a);const _0x2761de=process['stdout'][_0x4c8330(0x315)]||0x78,_0x4fdce1=0x1e,_0x3a4e33=0x32,_0x170db2=0x4,_0x3917ac=Math['min'](_0x3a4e33,Math[_0x4c8330(0x27f)](_0x4fdce1,Math['floor'](_0x2761de*0.3))),_0xfb13fe=_0x2761de-_0x3917ac-TIMELINE_CONFIG[_0x4c8330(0x248)]-0x3-_0x170db2,_0x13b408=_0x5e7f06-_0x227030,_0x36716d=_0x13b408/_0x3917ac,_0x328dd3=renderTimeAxis({'startTime':_0x227030,'endTime':_0x5e7f06,'durationMs':_0x13b408,'msPerChar':_0x36716d},_0x3917ac),_0x5d344f=[];for(const _0x5008a8 of _0x45d4a2[_0x4c8330(0x34f)]()){_0x5d344f[_0x4c8330(0x267)](..._0x5008a8);}_0x5d344f['sort']((_0xe956d8,_0x2e3801)=>_0x2e3801[_0x4c8330(0x1b8)]-_0xe956d8['startTime']);const _0x5ba363=new Date(_0x227030),_0x8affa=formatDate(_0x5ba363),_0x2545e7=_0x170db2+TIMELINE_CONFIG[_0x4c8330(0x1a5)]+TIMELINE_CONFIG[_0x4c8330(0x31e)]+_0xfb13fe,_0x225431='\x20'[_0x4c8330(0x1f2)](_0x2545e7-_0x8affa[_0x4c8330(0x2ec)]),_0x26ba78=_0x225431+a55_0x12f6c0[_0x4c8330(0x34a)](_0x8affa)+'\x20'+_0x328dd3;_0xdb59f5[_0x4c8330(0x267)](_0x26ba78);const _0x1f9359=0x16;let _0x5ac90d=0x0;for(const _0x4d1d39 of _0x5d344f){const _0x3a9c75=_0x4d1d39['session']['project']?.[_0x4c8330(0x1ff)]||'?',_0x55b2ff=Math[_0x4c8330(0x21c)](stringWidth(_0x3a9c75),_0x1f9359);_0x5ac90d=Math[_0x4c8330(0x27f)](_0x5ac90d,_0x55b2ff);}for(const _0x29e9db of _0x5d344f){const {session:_0x5bd0cf,startTime:_0x7d048b,endTime:_0x5bf861,duration:_0x2c58c1}=_0x29e9db,_0x17bb10=_0x5bd0cf[_0x4c8330(0x356)]?.['id'],_0x1fc870=_0x5bd0cf['id'],_0x5e16fd=_0x5bd0cf[_0x4c8330(0x356)]?.[_0x4c8330(0x1ff)]||'?',_0x189d51=_0x5bd0cf['workflow']?.['name']||'?';let _0x5e7986,_0x310273;if(_0x5bd0cf['lastAttempt']){const _0x1b6970=_0x5bd0cf['lastAttempt'];!_0x1b6970['done']?(_0x5e7986=_0x1b6970[_0x4c8330(0x30b)]?'🛑':'🔄',_0x310273=_0x1b6970[_0x4c8330(0x30b)]?a55_0x12f6c0[_0x4c8330(0x227)]:a55_0x12f6c0[_0x4c8330(0x1b6)]):(_0x5e7986=_0x1b6970[_0x4c8330(0x19a)]?'✅':'❌',_0x310273=_0x1b6970[_0x4c8330(0x19a)]?a55_0x12f6c0['green']:a55_0x12f6c0[_0x4c8330(0x1bb)]);}else _0x5e7986='⏳',_0x310273=a55_0x12f6c0[_0x4c8330(0x34a)];const _0x338bb3='#'+_0x1fc870,_0x168cc4=_0x17bb10?hyperlink(_0x338bb3,getWorkflowSessionUrl(_0x5baab1,_0x17bb10,_0x1fc870)):_0x338bb3;let _0x13520c=_0x5e16fd;stringWidth(_0x5e16fd)>_0x1f9359&&(_0x13520c=_0x5e16fd['slice'](0x0,_0x1f9359-0x1)+'…');const _0x50286c=a55_0x12f6c0[_0x4c8330(0x34a)](_0x13520c),_0x2fd78b=stringWidth(_0x13520c),_0x3ed16e='\x20'[_0x4c8330(0x1f2)](_0x5ac90d-stringWidth(_0x13520c)+0x2),_0x2cc513='('+formatElapsed(_0x2c58c1)+')',_0x3602b7=stringWidth(_0x2cc513),_0x17070c=stringWidth(_0x338bb3),_0x209217=_0x17070c+0x1+_0x2fd78b+_0x3ed16e[_0x4c8330(0x2ec)],_0x1c6d70=_0xfb13fe-_0x209217-_0x3602b7-0x1-0x8;let _0x139e1f=_0x189d51;stringWidth(_0x139e1f)>_0x1c6d70&&(_0x139e1f=_0x139e1f[_0x4c8330(0x29a)](0x0,_0x1c6d70-0x1)+'…');const _0xcd8f88=_0x168cc4+'\x20'+_0x50286c+_0x3ed16e+_0x139e1f,_0x6ac3b2=stringWidth(_0xcd8f88),_0x199890=_0xfb13fe-_0x6ac3b2-_0x3602b7,_0x390100=_0xcd8f88+'\x20'['repeat'](Math['max'](0x1,_0x199890))+a55_0x12f6c0[_0x4c8330(0x34a)](_0x2cc513),_0x2873e6=Math[_0x4c8330(0x27e)]((_0x7d048b-_0x227030)/_0x36716d),_0x19d6db=Math['floor']((_0x5bf861-_0x227030)/_0x36716d),_0x5b1c79=Math[_0x4c8330(0x27f)](_0x2873e6+0x1,_0x19d6db),_0x3f7f2a=new Array(_0x3917ac)[_0x4c8330(0x2cb)]('\x20');for(let _0x26331c=_0x2873e6;_0x26331c<Math['min'](_0x5b1c79,_0x3917ac);_0x26331c++){_0x3f7f2a[_0x26331c]='─';}const _0x46106a=_0x3f7f2a['map'](_0x4d746a=>_0x4d746a==='\x20'?'\x20':_0x310273(_0x4d746a))[_0x4c8330(0x23a)]('');_0xdb59f5[_0x4c8330(0x267)](_0x5e7986+'\x20'+_0x390100+'│'+_0x46106a+'│');}return _0xdb59f5[_0x4c8330(0x23a)]('\x0a');}async[a55_0xa29ad1(0x34c)](_0x45a3af,_0x51886c,_0xd167c0){const _0x3e7ec9=a55_0xa29ad1,{options:_0x34d4e7,tdx:_0x168682}=_0x51886c,_0x28f43e=_0x34d4e7[_0x3e7ec9(0x2e4)],{timelineRows:_0xc783c3,timeAxisHeader:_0x340603}=this[_0x3e7ec9(0x336)](_0x45a3af,_0x28f43e),_0x2e01a1=_0xc783c3[_0x3e7ec9(0x23e)](_0x10fdf4=>_0x10fdf4[_0x3e7ec9(0x2c5)]);if(_0x2e01a1[_0x3e7ec9(0x2ec)]===0x0){const _0xcd0b83=this[_0x3e7ec9(0x1b4)](_0x45a3af,_0x28f43e);console[_0x3e7ec9(0x361)](_0xcd0b83);!_0xd167c0&&(console['error'](''),console['error'](a55_0x12f6c0['dim'](_0x3e7ec9(0x321))),console[_0x3e7ec9(0x2b5)](a55_0x12f6c0['dim'](_0x3e7ec9(0x284))+'or'+a55_0x12f6c0[_0x3e7ec9(0x34a)](_0x3e7ec9(0x33f))));return;}_0x340603&&console[_0x3e7ec9(0x361)](_0x340603);const _0x550706=_0xc783c3[_0x3e7ec9(0x23e)](_0x2f813d=>_0x2f813d[_0x3e7ec9(0x2c5)])['map'](_0x315983=>({'title':_0x315983['displayLine'],'value':_0x315983['attemptId']})),_0x320f18=process[_0x3e7ec9(0x2dc)]['rows']||0x3c,_0xe88b9b=Math['max'](0x28,Math[_0x3e7ec9(0x27e)](_0x320f18*0x2/0x3)),_0x402c77=await a55_0x46d174({'type':_0x3e7ec9(0x1b2),'name':_0x3e7ec9(0x2c5),'message':_0x3e7ec9(0x309),'choices':_0x550706,'initial':-0x1,'limit':_0xe88b9b,'clearFirst':!![],'fallback':{'title':_0x3e7ec9(0x2eb),'value':null},'suggest':(_0x897361,_0x5b5171)=>{const _0x12533e=_0x3e7ec9;if(!_0x897361)return Promise[_0x12533e(0x215)](_0x5b5171);const _0x42f0cb=_0x5b5171[_0x12533e(0x23e)](_0x46c0c5=>{const _0x3fc3bf=_0x12533e,_0xa51db4=_0x46c0c5;return _0xa51db4[_0x3fc3bf(0x1c4)]['toLowerCase']()[_0x3fc3bf(0x210)](_0x897361[_0x3fc3bf(0x33b)]());});return Promise[_0x12533e(0x215)](_0x42f0cb);}}),_0x201b8f=()=>{const _0x32dd25=_0x3e7ec9;process['stdout'][_0x32dd25(0x342)](_0x32dd25(0x1e3)),process['stdout'][_0x32dd25(0x342)](_0x32dd25(0x1e3)),process['stdout'][_0x32dd25(0x342)](_0x32dd25(0x1e3));},_0x122cc9=_0x402c77&&_0x402c77[_0x3e7ec9(0x2c5)]&&_0x402c77[_0x3e7ec9(0x2c5)]!==null&&_0x402c77[_0x3e7ec9(0x2c5)][_0x3e7ec9(0x1aa)]()!=='';if(!_0x122cc9){_0x201b8f(),console[_0x3e7ec9(0x361)](a55_0x12f6c0[_0x3e7ec9(0x34a)](_0x3e7ec9(0x1e5)));return;}_0x201b8f();const _0x209abf=_0x45a3af[_0x3e7ec9(0x2b2)](_0x415e82=>_0x415e82['lastAttempt']?.['id']===_0x402c77[_0x3e7ec9(0x2c5)]);if(_0x209abf){const _0xb5c55f=_0x209abf[_0x3e7ec9(0x356)]?.[_0x3e7ec9(0x1ff)]||'?',_0xdffde9=_0x209abf[_0x3e7ec9(0x1d9)]?.['name']||'?';console[_0x3e7ec9(0x361)](_0x3e7ec9(0x308)+a55_0x12f6c0[_0x3e7ec9(0x34a)](_0xb5c55f)+',\x20Workflow:\x20'+a55_0x12f6c0[_0x3e7ec9(0x34a)](_0xdffde9));}const _0x64147d=new WorkflowTimelineCommand();await _0x64147d[_0x3e7ec9(0x22c)]({'args':[],'options':{..._0x34d4e7,'attemptId':_0x402c77['attemptId']},'tdx':_0x168682});}['generateSessionTimelineRows'](_0x486a0e,_0x1f4214){const _0x3c229b=a55_0xa29ad1,_0x265847=new Map();for(const _0x1de55d of _0x486a0e){_0x1de55d['id']&&_0x1de55d[_0x3c229b(0x1af)]?.['id']&&_0x265847['set'](_0x1de55d['id'],_0x1de55d['lastAttempt']['id']);}const _0x18693b=[];let _0x36f0d7='';const _0x11d2a3=this[_0x3c229b(0x1b4)](_0x486a0e,_0x1f4214),_0x507b42=_0x11d2a3['split']('\x0a');for(const _0x3e5b1a of _0x507b42){if(_0x3e5b1a[_0x3c229b(0x26d)](_0x3c229b(0x218))||_0x3e5b1a[_0x3c229b(0x328)](/^\s+\d{4}-\d{2}-\d{2}/))_0x36f0d7=_0x3e5b1a;else{if(_0x3e5b1a[_0x3c229b(0x328)](/^[✅❌🔄🛑⏳]/)){const _0x3dd7a9=_0x3e5b1a[_0x3c229b(0x328)](/#(\d+)/),_0x3eb74c=_0x3dd7a9?_0x3dd7a9[0x1]:null,_0xf85f19=_0x3eb74c?_0x265847[_0x3c229b(0x2a7)](_0x3eb74c)||null:null,_0x588c9e=_0x486a0e[_0x3c229b(0x2b2)](_0x2a8a56=>_0x2a8a56['id']===_0x3eb74c),_0x279652=_0x588c9e?.['project']?.[_0x3c229b(0x1ff)]||'';_0x18693b[_0x3c229b(0x267)]({'displayLine':_0x3e5b1a,'attemptId':_0xf85f19,'projectName':_0x279652});}}}return{'timelineRows':_0x18693b,'timeAxisHeader':_0x36f0d7};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a55_0xa29ad1(0x1a3);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x241);async[a55_0xa29ad1(0x22c)](_0x3d00de){const _0x3c368a=a55_0xa29ad1,{options:_0x9436bb,args:_0x3e2c37,tdx:_0x3fb31d}=_0x3d00de,_0x1d6945=this['parseProjectWorkflowPattern'](_0x3e2c37,_0x9436bb);if(!_0x1d6945)return 0x1;const {projectName:_0x371a4f,workflowName:_0x5171ee}=_0x1d6945,_0x2c7ad3=_0x9436bb[_0x3c368a(0x2bd)];if(_0x9436bb[_0x3c368a(0x19f)]){if(_0x371a4f&&_0x5171ee)console[_0x3c368a(0x2b5)](_0x3c368a(0x2fb)+_0x371a4f+'.'+_0x5171ee);else _0x371a4f&&console[_0x3c368a(0x2b5)]('Filter:\x20project='+_0x371a4f);_0x2c7ad3&&console[_0x3c368a(0x2b5)](_0x3c368a(0x30e));}const _0x3dabd7=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x3fb31d[_0x3c368a(0x1d9)][_0x3c368a(0x20c)]({'projectName':_0x371a4f,'workflowName':_0x5171ee,'includeRetried':_0x2c7ad3,'limit':_0x9436bb[_0x3c368a(0x301)]}),{'verbose':_0x9436bb[_0x3c368a(0x19f)]}),_0x395b7a=_0x3dabd7[_0x3c368a(0x35c)],_0x153f70=_0x9436bb['limit']||0x64,_0x25bdf2=_0x395b7a[_0x3c368a(0x2ec)]>=_0x153f70?a55_0x12f6c0[_0x3c368a(0x34a)](_0x3c368a(0x1ee)):'';console['error']('✔\x20Found\x20'+_0x395b7a[_0x3c368a(0x2ec)]+_0x3c368a(0x21f)+(_0x395b7a[_0x3c368a(0x2ec)]!==0x1?'s':'')+_0x25bdf2);if(_0x9436bb['format']==='json'||_0x9436bb[_0x3c368a(0x1d2)]==='jsonl'||_0x9436bb[_0x3c368a(0x1d2)]===_0x3c368a(0x20d))await handleSDKOutput(_0x395b7a,_0x9436bb);else{if(_0x395b7a[_0x3c368a(0x2ec)]===0x0){if(_0x371a4f&&_0x5171ee)console[_0x3c368a(0x361)]('No\x20attempts\x20found\x20for:\x20'+_0x371a4f+'.'+_0x5171ee);else _0x371a4f?console[_0x3c368a(0x361)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x371a4f):console[_0x3c368a(0x361)](_0x3c368a(0x2b7));}else{const _0x4c1f4d=_0x9436bb[_0x3c368a(0x2e4)],_0x18dfef=_0x395b7a[_0x3c368a(0x312)](_0x204e9d=>{const _0x2d049a=_0x3c368a,_0x2d0edf=a55_0x12f6c0[_0x2d049a(0x34a)]('#'+_0x204e9d['id']),_0x2e509e=_0x204e9d[_0x2d049a(0x356)]?.['id'],_0x9347aa=_0x204e9d[_0x2d049a(0x192)]||_0x204e9d[_0x2d049a(0x2a5)],_0x5d3126=_0x2e509e&&_0x9347aa?hyperlink(_0x2d0edf,getWorkflowAttemptUrl(_0x4c1f4d,_0x2e509e,_0x9347aa,_0x204e9d['id'])):_0x2d0edf,{icon:_0x1cc277,text:_0xfdd18e}=getAttemptStatusDisplay(_0x204e9d),_0x18183a=(_0x204e9d[_0x2d049a(0x356)]?.[_0x2d049a(0x1ff)]||'?')+'.'+(_0x204e9d[_0x2d049a(0x1d9)]?.['name']||'?'),_0x29a157=_0x204e9d['sessionTime']?a55_0x12f6c0[_0x2d049a(0x34a)](_0x204e9d[_0x2d049a(0x329)]):'';return(_0x5d3126+'\x20'+_0x1cc277+(_0xfdd18e?'\x20'+_0xfdd18e:'')+'\x20'+_0x18183a+'\x20'+_0x29a157)[_0x2d049a(0x1f8)]();});await writeOutput(_0x18dfef[_0x3c368a(0x23a)]('\x0a'),_0x9436bb[_0x3c368a(0x196)],_0x3c368a(0x292));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x2da);['description']=a55_0xa29ad1(0x25f);async[a55_0xa29ad1(0x22c)](_0xb0ac35){const _0x5cb97d=a55_0xa29ad1,{options:_0xcfc73f,args:_0x44107d,tdx:_0x49fe77}=_0xb0ac35,_0x27ccce=_0x44107d[0x0];if(!_0x27ccce)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0xcfc73f[_0x5cb97d(0x19f)]&&console['error']('Attempt\x20ID:\x20'+_0x27ccce);const _0x44010a=await withSpinner(_0x5cb97d(0x1ba),()=>_0x49fe77[_0x5cb97d(0x1d9)][_0x5cb97d(0x28b)](_0x27ccce),{'verbose':_0xcfc73f[_0x5cb97d(0x19f)]}),_0x2a0643=_0x44010a[_0x5cb97d(0x35c)];let _0x5bb448;!_0x2a0643['done']?_0x5bb448=_0x2a0643[_0x5cb97d(0x30b)]?_0x5cb97d(0x2ee):_0x5cb97d(0x31d):_0x5bb448=_0x2a0643[_0x5cb97d(0x19a)]?_0x5cb97d(0x19a):_0x5cb97d(0x2b5);let _0x2c8adb;if(_0x2a0643[_0x5cb97d(0x1d7)]&&_0x2a0643['finishedAt']){const _0x1d8427=new Date(_0x2a0643[_0x5cb97d(0x1d7)])[_0x5cb97d(0x34e)](),_0x4afb08=new Date(_0x2a0643[_0x5cb97d(0x353)])[_0x5cb97d(0x34e)]();_0x2c8adb=Math[_0x5cb97d(0x2ca)]((_0x4afb08-_0x1d8427)/0x3e8);}const _0x332263={'attempt_id':_0x2a0643['id'],'status':_0x5bb448,..._0x2a0643[_0x5cb97d(0x28d)]!==undefined&&{'index':_0x2a0643['index']},..._0x2a0643[_0x5cb97d(0x356)]&&{'project':_0x2a0643[_0x5cb97d(0x356)][_0x5cb97d(0x1ff)]},..._0x2a0643[_0x5cb97d(0x1d9)]&&{'workflow':_0x2a0643[_0x5cb97d(0x1d9)][_0x5cb97d(0x1ff)]},..._0x2a0643['sessionId']&&{'session_id':_0x2a0643[_0x5cb97d(0x2a5)]},..._0x2a0643[_0x5cb97d(0x329)]&&{'session_time':_0x2a0643[_0x5cb97d(0x329)]},..._0x2a0643[_0x5cb97d(0x363)]&&{'retry_attempt':_0x2a0643[_0x5cb97d(0x363)]},..._0x2c8adb!==undefined&&{'duration_sec':_0x2c8adb},..._0x2a0643[_0x5cb97d(0x1d7)]&&{'created_at':_0x2a0643[_0x5cb97d(0x1d7)]},..._0x2a0643[_0x5cb97d(0x353)]&&{'finished_at':_0x2a0643['finishedAt']},...Object[_0x5cb97d(0x281)](_0x2a0643['params'])['length']>0x0&&{'params':_0x2a0643[_0x5cb97d(0x194)]}};return await handleSingleObjectOutput(_0x332263,_0xcfc73f),0x0;}}function a55_0x34d6(_0x35007e,_0x54210e){_0x35007e=_0x35007e-0x192;const _0x590adb=a55_0x590a();let _0x34d66d=_0x590adb[_0x35007e];return _0x34d66d;}export class WorkflowTasksCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x354);['description']=a55_0xa29ad1(0x2a9);async['execute'](_0x27e6bc){const _0x146fe3=a55_0xa29ad1,{options:_0x45adb4,args:_0x3448d2,tdx:_0x529bdb}=_0x27e6bc,_0x585cc4=_0x3448d2[0x0];if(!_0x585cc4)return console['error'](_0x146fe3(0x22e)),0x1;const _0x3d504f=_0x45adb4['includeSubtasks'];_0x45adb4[_0x146fe3(0x19f)]&&(console[_0x146fe3(0x2b5)](_0x146fe3(0x21a)+_0x585cc4),_0x3d504f&&console[_0x146fe3(0x2b5)]('Including\x20subtasks:\x20yes'));const _0xdb1df6=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x529bdb[_0x146fe3(0x1d9)][_0x146fe3(0x2f7)](_0x585cc4,_0x3d504f||![]),{'verbose':_0x45adb4[_0x146fe3(0x19f)]}),_0x50c945=_0xdb1df6[_0x146fe3(0x35c)];return console[_0x146fe3(0x2b5)](_0x146fe3(0x32a)+_0x50c945['length']+_0x146fe3(0x348)+(_0x50c945[_0x146fe3(0x2ec)]!==0x1?'s':'')),await handleSDKOutput(_0x50c945,_0x45adb4),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a55_0xa29ad1(0x2ef);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x2f3);async['execute'](_0x14477a){const _0x5d174e=a55_0xa29ad1,{options:_0x3c6fe7,args:_0x1edd95,tdx:_0x565a45}=_0x14477a,_0x22fdae=_0x1edd95[0x0];let _0x24b41a=_0x1edd95[0x1];if(!_0x22fdae)return console[_0x5d174e(0x2b5)](_0x5d174e(0x22e)),0x1;_0x3c6fe7[_0x5d174e(0x19f)]&&(console[_0x5d174e(0x2b5)]('Attempt\x20ID:\x20'+_0x22fdae),_0x24b41a&&console[_0x5d174e(0x2b5)](_0x5d174e(0x1cd)+_0x24b41a));const _0x2093b1=await withSpinner(_0x5d174e(0x240),()=>_0x565a45['workflow'][_0x5d174e(0x1e4)](_0x22fdae,_0x24b41a),{'verbose':_0x3c6fe7[_0x5d174e(0x19f)]}),_0x1e57d4=_0x2093b1[_0x5d174e(0x35c)];if(_0x1e57d4[_0x5d174e(0x2ec)]===0x0)return console[_0x5d174e(0x2b5)](_0x5d174e(0x27a)),0x0;if(!_0x24b41a&&(_0x3c6fe7[_0x5d174e(0x325)]||_0x3c6fe7[_0x5d174e(0x1d2)]))return await handleSDKOutput(_0x1e57d4,_0x3c6fe7),0x0;if(!_0x24b41a){const _0x318ef3=_0x1e57d4[_0x5d174e(0x312)](_0xd207f1=>({'title':_0xd207f1['taskName']+'\x20('+formatBytes(_0xd207f1[_0x5d174e(0x23d)])+')','value':_0xd207f1[_0x5d174e(0x29f)]})),_0x5f5d44=await a55_0x46d174({'type':_0x5d174e(0x25b),'name':'task','message':_0x5d174e(0x1e8),'choices':_0x318ef3});if(!_0x5f5d44[_0x5d174e(0x1f0)])return console[_0x5d174e(0x2b5)](_0x5d174e(0x1e5)),0x0;_0x24b41a=_0x5f5d44[_0x5d174e(0x1f0)];}const _0x6f4ad4=await withSpinner(_0x5d174e(0x2d8),()=>_0x565a45['workflow'][_0x5d174e(0x2c9)](_0x22fdae,_0x24b41a),{'verbose':_0x3c6fe7['verbose']}),_0x2be152=_0x6f4ad4['data'];return _0x2be152?console[_0x5d174e(0x361)](_0x2be152):console[_0x5d174e(0x2b5)](_0x5d174e(0x1a6)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a55_0xa29ad1(0x25c);[a55_0xa29ad1(0x22a)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x430b95){const _0x200f8a=a55_0xa29ad1,{options:_0x43867a,args:_0x236c0a,tdx:_0x5aa3ba}=_0x430b95,_0x1ddbf3=_0x236c0a[0x0];if(!_0x1ddbf3)return console[_0x200f8a(0x2b5)](_0x200f8a(0x22e)),0x1;const _0x24e092=_0x43867a['reason'];_0x43867a[_0x200f8a(0x19f)]&&(console[_0x200f8a(0x2b5)]('Attempt\x20ID:\x20'+_0x1ddbf3),_0x24e092&&console['error'](_0x200f8a(0x1cc)+_0x24e092));if(!_0x43867a[_0x200f8a(0x296)]){if(!isInteractive())return console['error'](a55_0x12f6c0['red'](_0x200f8a(0x2d2)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x200f8a(0x2b5)](a55_0x12f6c0[_0x200f8a(0x34a)](_0x200f8a(0x1c7))),0x1;const _0x262db5=await confirmKey(_0x200f8a(0x226)+_0x1ddbf3+'?');if(!_0x262db5)return console[_0x200f8a(0x2b5)](a55_0x12f6c0[_0x200f8a(0x227)](_0x200f8a(0x1e5))),0x1;}const _0x5c476f=await withSpinner('Killing\x20attempt...',()=>_0x5aa3ba['workflow'][_0x200f8a(0x229)](_0x1ddbf3,_0x24e092),{'verbose':_0x43867a['verbose']}),_0x1b8a1d=_0x5c476f[_0x200f8a(0x35c)];return console[_0x200f8a(0x2b5)]('✔\x20'+_0x1b8a1d),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x21b);['description']=a55_0xa29ad1(0x2a4);async[a55_0xa29ad1(0x22c)](_0x1f6a9a){const _0xd6af9e=a55_0xa29ad1,{options:_0x109600,args:_0x286f6f,tdx:_0x594f1f}=_0x1f6a9a,_0x1934e3=_0x286f6f[0x0];if(!_0x1934e3)return console['error'](_0xd6af9e(0x220)),console['error'](_0xd6af9e(0x261)),0x1;let _0xc9896c=![],_0x1d6bfa=_0x1934e3;if(_0x1934e3[_0xd6af9e(0x26d)](_0xd6af9e(0x20b)))_0xc9896c=!![],_0x1d6bfa=_0x1934e3[_0xd6af9e(0x322)](0x8);else{if(_0x1934e3[_0xd6af9e(0x26d)](_0xd6af9e(0x2be)))_0xc9896c=![],_0x1d6bfa=_0x1934e3[_0xd6af9e(0x322)](0x8);else return console['error'](_0xd6af9e(0x239)),console[_0xd6af9e(0x2b5)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x29b59c=_0x109600[_0xd6af9e(0x20a)],_0xd6fce6=_0x109600['resumeFrom'],_0x23e257=_0x109600[_0xd6af9e(0x194)],_0x545957=_0x109600[_0xd6af9e(0x30d)];_0x109600[_0xd6af9e(0x19f)]&&(console[_0xd6af9e(0x2b5)]('Target:\x20'+(_0xc9896c?_0xd6af9e(0x326):_0xd6af9e(0x28b))+'\x20'+_0x1d6bfa),_0x29b59c&&console[_0xd6af9e(0x2b5)](_0xd6af9e(0x2ea)+_0x29b59c),_0xd6fce6&&console[_0xd6af9e(0x2b5)](_0xd6af9e(0x27d)+_0xd6fce6),_0x23e257&&console[_0xd6af9e(0x2b5)]('Params:\x20'+_0x23e257),_0x545957&&console['error'](_0xd6af9e(0x204)));let _0x570a75;if(_0x23e257)try{if(_0x23e257[_0xd6af9e(0x26d)]('@')){const _0x40bbef=await import('fs/promises'),_0x10836c=_0x23e257[_0xd6af9e(0x322)](0x1),_0x3f9913=await _0x40bbef[_0xd6af9e(0x2e1)](_0x10836c,_0xd6af9e(0x28c));_0x570a75=JSON[_0xd6af9e(0x1f3)](_0x3f9913);}else _0x570a75=JSON[_0xd6af9e(0x1f3)](_0x23e257);}catch{return console['error']('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x109600[_0xd6af9e(0x296)]){if(!isInteractive())return console[_0xd6af9e(0x2b5)](a55_0x12f6c0['red'](_0xd6af9e(0x2d2)),_0xd6af9e(0x2cf)),console[_0xd6af9e(0x2b5)](a55_0x12f6c0['dim'](_0xd6af9e(0x1c7))),0x1;const _0x149e5a=await confirmKey(_0xd6af9e(0x297)+(_0xc9896c?_0xd6af9e(0x326):_0xd6af9e(0x28b))+'\x20'+_0x1d6bfa+'?');if(!_0x149e5a)return console['error'](a55_0x12f6c0['yellow']('Cancelled')),0x1;}let _0x509d74;_0xc9896c?_0x509d74=await withSpinner(_0xd6af9e(0x2f9),()=>_0x594f1f[_0xd6af9e(0x1d9)][_0xd6af9e(0x237)](_0x1d6bfa,{'fromTask':_0x29b59c,'retryParams':_0x570a75}),{'verbose':_0x109600['verbose']}):_0x509d74=await withSpinner('Retrying\x20attempt...',()=>_0x594f1f[_0xd6af9e(0x1d9)][_0xd6af9e(0x2bf)](_0x1d6bfa,{'resumeFrom':_0xd6fce6,'retryParams':_0x570a75,'force':_0x545957}),{'verbose':_0x109600[_0xd6af9e(0x19f)]});const _0x459cf3=_0x509d74[_0xd6af9e(0x35c)];return console[_0xd6af9e(0x2b5)](_0xd6af9e(0x1e0)),console['error'](_0xd6af9e(0x2f1)+_0x459cf3['attemptId']),console[_0xd6af9e(0x2b5)](_0xd6af9e(0x250)+_0x459cf3[_0xd6af9e(0x2a5)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']='workflow:run';['description']=a55_0xa29ad1(0x19c);async[a55_0xa29ad1(0x22c)](_0x57bd98){const _0x2b575e=a55_0xa29ad1,{options:_0x46bd79,args:_0x4b38b0,tdx:_0x387ea9}=_0x57bd98;let _0x112422=_0x4b38b0[0x0];if(!_0x112422){const _0xd2226e=this[_0x2b575e(0x1a8)]([],_0x46bd79),_0x9efc21=await withSpinner(_0x2b575e(0x1c8),()=>_0x387ea9[_0x2b575e(0x1d9)]['workflows'](_0xd2226e,{'limit':_0x46bd79[_0x2b575e(0x301)]}),{'verbose':_0x46bd79['verbose']}),_0x2b6871=_0x9efc21[_0x2b575e(0x35c)];if(_0x2b6871[_0x2b575e(0x2ec)]===0x0)return console[_0x2b575e(0x2b5)](_0x2b575e(0x268)),!_0xd2226e&&console[_0x2b575e(0x2b5)](a55_0x12f6c0[_0x2b575e(0x34a)](_0x2b575e(0x333))),0x1;const _0x4442ee=_0x2b6871['map'](_0x3ede07=>({'title':_0x3ede07[_0x2b575e(0x356)]?.['name']+'.'+_0x3ede07[_0x2b575e(0x1ff)],'value':_0x3ede07['project']?.[_0x2b575e(0x1ff)]+'.'+_0x3ede07['name'],'description':_0x3ede07[_0x2b575e(0x22f)]?_0x2b575e(0x304)+_0x3ede07[_0x2b575e(0x22f)]:undefined})),_0x22e2fc=await a55_0x46d174({'type':_0x2b575e(0x25b),'name':_0x2b575e(0x1d9),'message':_0x2b575e(0x2f6),'choices':_0x4442ee});if(!_0x22e2fc[_0x2b575e(0x1d9)])return 0x1;_0x112422=_0x22e2fc[_0x2b575e(0x1d9)];}if(!_0x112422[_0x2b575e(0x210)]('.')){const _0x5e4e07=this[_0x2b575e(0x1a8)]([],_0x46bd79);if(_0x5e4e07)_0x112422=_0x5e4e07+'.'+_0x112422;else return console[_0x2b575e(0x2b5)](a55_0x12f6c0[_0x2b575e(0x1bb)](_0x2b575e(0x352)),_0x2b575e(0x26f)),console['error'](a55_0x12f6c0['dim'](_0x2b575e(0x333))),0x1;}const _0x2ec07d=_0x46bd79[_0x2b575e(0x340)],_0x399836=_0x46bd79[_0x2b575e(0x329)],_0x20c95c={};if(_0x2ec07d&&Array[_0x2b575e(0x200)](_0x2ec07d))for(const _0x3d62c3 of _0x2ec07d){const _0x2e7bbc=_0x3d62c3['indexOf']('=');if(_0x2e7bbc===-0x1)return console[_0x2b575e(0x2b5)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x3d62c3),console['error'](_0x2b575e(0x287)),0x1;const _0x23f76a=_0x3d62c3[_0x2b575e(0x322)](0x0,_0x2e7bbc),_0x21a63b=_0x3d62c3[_0x2b575e(0x322)](_0x2e7bbc+0x1);try{_0x20c95c[_0x23f76a]=JSON[_0x2b575e(0x1f3)](_0x21a63b);}catch{_0x20c95c[_0x23f76a]=_0x21a63b;}}_0x46bd79[_0x2b575e(0x19f)]&&(console[_0x2b575e(0x2b5)](_0x2b575e(0x30a)+_0x112422),Object[_0x2b575e(0x281)](_0x20c95c)[_0x2b575e(0x2ec)]>0x0&&console[_0x2b575e(0x2b5)](_0x2b575e(0x1e6)+JSON['stringify'](_0x20c95c)),_0x399836&&console[_0x2b575e(0x2b5)](_0x2b575e(0x1c1)+_0x399836));if(_0x46bd79[_0x2b575e(0x1bf)])return await this[_0x2b575e(0x32e)](_0x57bd98,_0x112422,_0x20c95c,_0x399836);const _0xc0badd=await withSpinner(_0x2b575e(0x2ed),()=>_0x387ea9[_0x2b575e(0x1d9)][_0x2b575e(0x362)](_0x112422,_0x20c95c,{'sessionTime':_0x399836}),{'verbose':_0x46bd79['verbose']}),_0x102b2d=_0xc0badd[_0x2b575e(0x35c)];console['error'](_0x2b575e(0x1ec)),console[_0x2b575e(0x2b5)](_0x2b575e(0x259)+_0x102b2d['id']),console[_0x2b575e(0x2b5)]('\x20\x20Session\x20ID:\x20'+_0x102b2d[_0x2b575e(0x2a5)]),console[_0x2b575e(0x2b5)]('\x20\x20Project:\x20'+_0x102b2d[_0x2b575e(0x356)]?.[_0x2b575e(0x1ff)]),console[_0x2b575e(0x2b5)](_0x2b575e(0x258)+_0x102b2d[_0x2b575e(0x1d9)]?.[_0x2b575e(0x1ff)]);if(_0x102b2d[_0x2b575e(0x356)]?.['id']&&_0x102b2d[_0x2b575e(0x2a5)]&&_0x102b2d['id']){const _0x30db3f=_0x46bd79[_0x2b575e(0x2e4)],_0xd5b03a=getConsoleUrl(_0x30db3f,_0x2b575e(0x26c)+_0x102b2d[_0x2b575e(0x356)]['id']+'/sessions/'+_0x102b2d['sessionId']+'/attempt/'+_0x102b2d['id']);console[_0x2b575e(0x2b5)](_0x2b575e(0x2ce)+a55_0x12f6c0['cyan'](_0xd5b03a));}return 0x0;}async['executeDryRun'](_0x124767,_0x2e23a8,_0x201a22,_0x15f67d){const _0xf5493b=a55_0xa29ad1,{options:_0xfaf466,tdx:_0x177c11}=_0x124767,_0x495ac3=await withSpinner(_0xf5493b(0x1e1)+_0x2e23a8+'...',()=>_0x177c11[_0xf5493b(0x1d9)][_0xf5493b(0x330)](_0x2e23a8),{'verbose':_0xfaf466[_0xf5493b(0x19f)]}),_0x29f748=_0x495ac3['data'],_0x29ed5b=_0x15f67d??new Date()[_0xf5493b(0x233)]();console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x2a8)](_0xf5493b(0x2ac)),_0x2e23a8),console['log'](a55_0x12f6c0[_0xf5493b(0x2a8)](_0xf5493b(0x1d6)),_0x29ed5b),console['log'](a55_0x12f6c0[_0xf5493b(0x2a8)]('Parameters:'),JSON[_0xf5493b(0x242)](_0x201a22)),console['log'](''),console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x2a8)](_0xf5493b(0x2f4)));const _0x5c7cb5=parseTaskGraph(_0x29f748['config']??null);if(_0x5c7cb5[_0xf5493b(0x2ec)]===0x0)console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x34a)](_0xf5493b(0x1db)));else for(const _0x3f9865 of formatTaskGraph(_0x5c7cb5)){console[_0xf5493b(0x361)](_0x3f9865);}const _0x109429=summarizeTaskGraph(_0x5c7cb5),_0x569635=formatWarningSummary(_0x109429);return _0x569635&&(console[_0xf5493b(0x361)](''),console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x227)](_0x569635))),console[_0xf5493b(0x361)](a55_0x12f6c0[_0xf5493b(0x227)](_0xf5493b(0x2f2))),0x0;}}function a55_0x590a(){const _0x4f5df9=['fullName','group_error','✔\x20Workflow\x20project\x20set\x20to:\x20','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','changes','\x20-\x20','📋\x20','\x20logs','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','disabledAt','Resume\x20from:\x20','floor','max','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','keys','List\x20workflows','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20\x20Changes:\x20','Project\x20name:\x20','Expected\x20format:\x20--param\x20key=value','Output\x20directory:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','updatedAt','attempt','utf-8','index','\x0a⚠\x20Project\x20\x22','Setting\x20','MIN_TIMELINE_WIDTH','Dry\x20run:\x20yes','list','5XDQEAW','Source\x20project:\x20','Source:\x20','yes','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflow:use','Pushing\x20workflow\x20project...','slice','rows','parseProjectWorkflowPattern','follow','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','taskName','renderTimeline','...','Latest\x20session\x20has\x20no\x20attempt','now','Retry\x20a\x20session\x20or\x20attempt','sessionId','\x20\x20Next\x20run:\x20','get','bold','Show\x20tasks\x20for\x20an\x20attempt','workflow:delete','durationMs','Workflow:','📁\x20','MAX_TIMELINE_WIDTH','all','key','size','find','\x20\x20Project\x20ID:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','error','renderSingleTimeline','No\x20attempts\x20found','executeCloneProject','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','Error:\x20Project\x20name\x20is\x20required','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','workflow:schedule:disable','includeRetried','attempt:','retryAttempt','targetDir','type','No\x20workflow\x20tdx.json\x20found','Listing\x20workflow\x20projects...','🔄\x20','attemptId','done','\x0aClone\x20\x22','\x20(disabled)','logs','round','fill','listSchedules','jsonl','\x20\x20Console:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','icon','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','\x0aError:','MIN_LABEL_COUNT','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x20to\x20see\x20detailed\x20logs','pollTimeline','\x20is\x20not\x20a\x20directory','Downloading\x20logs...','✔\x20Deleted\x20project\x20','workflow:attempt','Analyzing\x20changes...','stdout','cyan','✔\x20Push\x20complete','nextTime','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','readFile','Disable\x20a\x20workflow\x20schedule','Files\x20to\x20upload:\x20','site','unchanged','isNewProject','\x20from\x20session\x20','indexOf','getHours','From\x20task:\x20','No\x20matching\x20sessions\x20found','length','Starting\x20workflow\x20run...','canceling','workflow:logs','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x20\x20New\x20attempt\x20ID:\x20','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Task\x20graph:','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Select\x20a\x20workflow\x20to\x20run','tasks','Pattern:\x20','Retrying\x20session...','Error:\x20','Filter:\x20','deleted','white','workflow:secrets:set','Disabling\x20schedule\x20#','resolveProjectId','limit','getDate','Session\x20','revision:\x20','Auto-selected\x20latest\x20session:\x20','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','\x0aDry\x20run\x20-\x20no\x20project\x20created','Project:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Workflow:\x20','cancelRequested','diff','force','Include\x20retried:\x20yes','Select\x20a\x20session\x20to\x20view\x20timeline:','LABEL_MIN_SPACING','\x22\x20with\x20new\x20revision?','map','No\x20workflow\x20sessions\x20found','buildTimelineData','columns','Listing\x20workflows...','resolveProjectDir','4804722RhBvPw','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','Filter:\x20project=','\x20next:\x20','\x20modified','running','ICON_SPACING','replace','\x20\x20Revision:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','substring','✔\x20Pushed\x20','Deleting\x20project\x20','json','session','preparePushProject','match','sessionTime','✔\x20Found\x20','TASK_NAME_WIDTH','workflow:secrets:delete','\x20secrets\x20set\x20for\x20project\x20\x27','executeDryRun','\x0aApply\x20these\x20changes?','getWorkflow','1222204VkVfQa','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Usage:\x20workflow:delete\x20<project-name-or-id>','workflows','generateSessionTimelineRows','tdx.json','showWorkflowConsoleUrl','\x20\x20Location:\x20','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','toLowerCase','duration','start','Writing\x20files...','\x20\x20tdx\x20wf\x20use\x20<project>','param','Resolving\x20project\x20\x27','write','planned','cwd','Project\x20directory:\x20','\x20enabled\x20(','workflow:clone','\x20task','No\x20sessions\x20found\x20in\x20project:\x20','dim','\x0aPush\x20these\x20changes?','navigateSessionsInteractive','getMinutes','getTime','values','Enable\x20a\x20workflow\x20schedule','✔\x20Secret\x20\x27','Error:','finishedAt','workflow:tasks','\x27...','project','skipSchedule','483568zBpgoy','(use\x20--limit\x20to\x20see\x20more)','\x0aUpdate\x20existing\x20project\x20\x22','3RMFcbh','data','\x20tasks','\x20session','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Secrets\x20to\x20set:\x20','log','run','retryAttemptName','\x20\x20Source:\x20','session_id','💡\x20Tip:\x20Use\x20','params','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','output','\x0aPolling...\x20(','\x20\x20Session\x20context\x20set\x20to:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','success','21xYnqSv','Start\x20a\x20workflow\x20run','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','padStart','verbose','352264hfIVKw','⚠\x20Showing\x20first\x20','listProjectSchedules','workflow:attempts','1490715ZnAMal','ICON_WIDTH','No\x20log\x20content\x20found','Listing\x20workflow\x20sessions...','resolveProject','Total:\x20','trim','set','\x20sessions\x20','\x0a✔\x20No\x20changes\x20to\x20push','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','lastAttempt','workflowProject','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','autocomplete','modified','renderSessionsTimeline','every','blue','Tip:\x20cd\x20to\x20workflows/','startTime','workflow:projects','Getting\x20attempt\x20details...','red','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','localeCompare','new','dryRun','Warning:','Session\x20time:\x20','toLocaleString','\x20new','title','window','Key\x20cannot\x20be\x20empty','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Loading\x20workflows...','split','✔\x20Pull\x20complete','✔\x20Schedule\x20#','Reason:\x20','Task\x20name:\x20','message','green','Downloading\x20project\x20','startedAt','format','executePushProject','basename','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Session\x20time:','createdAt','status','workflow','\x0a✔\x20Already\x20up\x20to\x20date','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','pending','workflow:workflows','\x20\x20Project:\x20','Key:\x20','✔\x20Retry\x20started','Fetching\x20workflow\x20','-\x20nothing\x20pushed','\x1b[1A\x1b[2K','logFiles','Cancelled','Parameters:\x20','targetExists','Select\x20a\x20task\x20to\x20view\x20logs:','Source\x20directory\x20is\x20required','MAX_POLL_ITERATIONS','summary','✔\x20Workflow\x20run\x20started','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','\x20(use\x20--limit\x20to\x20show\x20more)','✔\x20Clone\x20complete','task','setSecrets','repeat','parse','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','applyPullProject','→\x20Project:\x20','trimEnd','(unknown)','\x20schedule','isTTY','✔\x20Project\x20updated','No\x20sessions\x20found\x20for:\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','name','isArray','Revision:\x20','skipValidation','130757paRUiR','Force:\x20yes','disableSchedule','relative','\x20deleted','text','newProjectId','fromTask','session:','attempts','table','workflowName','state','includes','Session\x20not\x20found:\x20','\x20\x20Files\x20extracted:\x20','projectName','Listing\x20schedules\x20for\x20','resolve','Project\x20name\x20is\x20required','Using\x20attempt\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','end','Attempt\x20ID:\x20','workflow:retry','min','workflow:schedule:enable','workflow:sessions','\x20attempt','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','New\x20project\x20name:\x20','Updating\x20','List\x20workflow\x20schedules','pullProject','enableSchedule','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','yellow','Error:\x20Secret\x20key\x20is\x20required','kill','description','📅\x20#','execute','newProjectName','Error:\x20Attempt\x20ID\x20is\x20required','revision','Fetching\x20schedule\x20#','Cloning\x20to\x20','→\x20New\x20project:\x20','toISOString','sourceProjectName','requireProject','sys','retrySession','getMonth','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','join','-\x20no\x20files\x20written','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','fileSize','filter','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','Fetching\x20log\x20files...','List\x20workflow\x20attempts','stringify','sessions','nextRunTime','context','\x22\x20to\x20new\x20project\x20\x22','Attempt:\x20','GUTTER','projectId','Source\x20directory:\x20','splice','Pushing\x20project...','\x20disabled\x20(','workflow:push','Status:\x20','\x20\x20Session\x20ID:\x20','workflow:schedules','Validation:\x20skipped','Enabling\x20schedule\x20#','workflow:upload','10abeDOa','unknown','Project\x20filter:\x20','\x20\x20Workflow:\x20','\x20\x20Attempt\x20ID:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','select','workflow:kill','stat','clear','Show\x20specific\x20attempt\x20details','MAX_TASKS_DISPLAY','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','has','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','1491216ImROlL','---\x20','LABEL_WIDTH_DIVISOR','push','No\x20workflows\x20found','sourceDir','No\x20sessions\x20with\x20timing\x20information','getFullYear','/app/workflows/','startsWith','\x20unchanged','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','sort'];a55_0x590a=function(){return _0x4f5df9;};return a55_0x590a();}export class WorkflowDownloadCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]='workflow:download';['description']=a55_0xa29ad1(0x23f);async['execute'](_0x41c101){const _0x4ea182=a55_0xa29ad1,{options:_0x4f7654,args:_0xb2ba6f,tdx:_0x5f2c9d}=_0x41c101,_0x2a2f2b=_0xb2ba6f[0x0],_0x473b60=_0xb2ba6f[0x1]||'.';if(!_0x2a2f2b)return console[_0x4ea182(0x2b5)](_0x4ea182(0x2ba)),console[_0x4ea182(0x2b5)](_0x4ea182(0x35f)),0x1;const _0x557a0b=_0x4f7654[_0x4ea182(0x22f)];_0x4f7654[_0x4ea182(0x19f)]&&(console['error'](_0x4ea182(0x308)+_0x2a2f2b),console['error'](_0x4ea182(0x288)+_0x473b60),_0x557a0b&&console['error'](_0x4ea182(0x201)+_0x557a0b));const _0x3f71c2=await withSpinner(_0x4ea182(0x1d0)+_0x2a2f2b+'...',()=>_0x5f2c9d[_0x4ea182(0x1d9)]['download'](_0x2a2f2b,_0x473b60,{'revision':_0x557a0b}),{'verbose':_0x4f7654[_0x4ea182(0x19f)]}),_0x49e5d7=_0x3f71c2[_0x4ea182(0x35c)];return console[_0x4ea182(0x2b5)]('✔\x20Downloaded\x20'+_0x49e5d7[_0x4ea182(0x213)]),console[_0x4ea182(0x2b5)]('\x20\x20Revision:\x20'+_0x49e5d7['revision']),console[_0x4ea182(0x2b5)](_0x4ea182(0x212)+_0x49e5d7['filesExtracted']),console[_0x4ea182(0x2b5)]('\x20\x20Location:\x20'+_0x473b60+'/'+_0x49e5d7[_0x4ea182(0x213)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x254);['description']=a55_0xa29ad1(0x319);async['execute'](_0x1ff738){const _0x3dc140=a55_0xa29ad1,{options:_0x4f441d,args:_0x3b639b,tdx:_0x1d56a1}=_0x1ff738;let _0x50f7e7='.',_0x116ee8=_0x4f441d[_0x3dc140(0x1ff)];if(_0x3b639b[0x0]){const {promises:_0x425c72}=await import('fs');try{const _0x1cf4f8=await _0x425c72[_0x3dc140(0x25d)](_0x3b639b[0x0]);if(_0x1cf4f8['isDirectory']())_0x50f7e7=_0x3b639b[0x0];else return console[_0x3dc140(0x2b5)](_0x3dc140(0x2fa)+_0x3b639b[0x0]+_0x3dc140(0x2d7)),0x1;}catch{_0x116ee8=_0x3b639b[0x0],_0x50f7e7='.';}}const _0x1f0e01=_0x4f441d[_0x3dc140(0x22f)],_0x264c20=_0x4f441d[_0x3dc140(0x202)];_0x4f441d[_0x3dc140(0x19f)]&&(console[_0x3dc140(0x2b5)](_0x3dc140(0x345)+_0x50f7e7),_0x116ee8&&console[_0x3dc140(0x2b5)](_0x3dc140(0x286)+_0x116ee8),_0x1f0e01&&console[_0x3dc140(0x2b5)]('Revision:\x20'+_0x1f0e01),_0x264c20&&console[_0x3dc140(0x2b5)](_0x3dc140(0x252)));const _0xc56f6b=await withSpinner(_0x3dc140(0x299),()=>_0x1d56a1[_0x3dc140(0x1d9)][_0x3dc140(0x267)](_0x50f7e7,{'projectName':_0x116ee8,'revision':_0x1f0e01,'skipValidation':_0x264c20}),{'verbose':_0x4f441d[_0x3dc140(0x19f)]}),_0x12945e=_0xc56f6b[_0x3dc140(0x35c)];return console[_0x3dc140(0x2b5)](_0x3dc140(0x323)+_0x12945e[_0x3dc140(0x213)]),console[_0x3dc140(0x2b5)](_0x3dc140(0x2b3)+_0x12945e[_0x3dc140(0x249)]),console[_0x3dc140(0x2b5)](_0x3dc140(0x320)+_0x12945e[_0x3dc140(0x22f)]),await this[_0x3dc140(0x338)](_0x1d56a1,_0x12945e[_0x3dc140(0x213)],_0x4f441d[_0x3dc140(0x2e4)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]='workflow:pull';[a55_0xa29ad1(0x22a)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async['execute'](_0x1322b3){const _0x4515f6=a55_0xa29ad1,{options:_0x53b1c9,args:_0x4c38a4,tdx:_0x34493e}=_0x1322b3,_0x24ae3c=_0x4c38a4[0x0],_0x4b032e=_0x4c38a4[0x1];if(!_0x24ae3c)return console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x1bb)](_0x4515f6(0x352)),'Project\x20name\x20is\x20required'),console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x34a)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x216954=_0x53b1c9['revision'];_0x53b1c9[_0x4515f6(0x19f)]&&(console['error'](_0x4515f6(0x308)+_0x24ae3c),_0x4b032e&&console['error']('Target\x20directory:\x20'+_0x4b032e),_0x216954&&console[_0x4515f6(0x2b5)](_0x4515f6(0x201)+_0x216954),_0x53b1c9[_0x4515f6(0x1bf)]&&console[_0x4515f6(0x2b5)](_0x4515f6(0x291)));const _0x5e334a=await withSpinner('Pulling\x20project\x20'+_0x24ae3c+_0x4515f6(0x2a1),()=>_0x34493e['workflow'][_0x4515f6(0x224)](_0x24ae3c,{'targetDir':_0x4b032e,'revision':_0x216954}),{'verbose':_0x53b1c9['verbose']}),_0x5c997f=_0x5e334a[_0x4515f6(0x35c)];_0x5c997f[_0x4515f6(0x2e6)]?console[_0x4515f6(0x2b5)](_0x4515f6(0x232)+_0x5c997f['projectName']):console[_0x4515f6(0x2b5)](_0x4515f6(0x1f7)+_0x5c997f[_0x4515f6(0x213)]);console['error'](_0x4515f6(0x320)+_0x5c997f['revision']),console[_0x4515f6(0x2b5)]('\x20\x20Target:\x20'+(a55_0xe058bc[_0x4515f6(0x206)](process['cwd'](),_0x5c997f[_0x4515f6(0x2c0)])||'.')),console[_0x4515f6(0x2b5)](_0x4515f6(0x285)+a55_0x12f6c0[_0x4515f6(0x1cf)]('+'+_0x5c997f[_0x4515f6(0x1eb)][_0x4515f6(0x1be)]+_0x4515f6(0x1c3))+',\x20'+(a55_0x12f6c0[_0x4515f6(0x227)]('~'+_0x5c997f[_0x4515f6(0x1eb)][_0x4515f6(0x1b3)]+_0x4515f6(0x31c))+',\x20')+(a55_0x12f6c0[_0x4515f6(0x1bb)]('-'+_0x5c997f['summary']['deleted']+_0x4515f6(0x207))+',\x20')+(''+a55_0x12f6c0[_0x4515f6(0x34a)](_0x5c997f[_0x4515f6(0x1eb)][_0x4515f6(0x2e5)]+_0x4515f6(0x26e))));for(const _0x36231e of _0x5c997f[_0x4515f6(0x276)]){_0x36231e[_0x4515f6(0x2c1)]===_0x4515f6(0x1b3)&&_0x36231e[_0x4515f6(0x30c)]&&(console[_0x4515f6(0x2b5)]('\x0a'+a55_0x12f6c0['cyan'](_0x4515f6(0x265)+_0x36231e['path'])),console[_0x4515f6(0x2b5)](_0x36231e['diff']));}if(!_0x5c997f['hasChanges'])return saveSessionContext({'workflow_project':_0x5c997f[_0x4515f6(0x213)]},_0x53b1c9[_0x4515f6(0x326)]),console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x1cf)](_0x4515f6(0x1da))),console['error'](a55_0x12f6c0[_0x4515f6(0x34a)](_0x4515f6(0x198)+_0x5c997f['projectName'])),0x0;if(_0x53b1c9['dryRun'])return console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x227)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x53b1c9['yes']){if(!isInteractive())return console[_0x4515f6(0x2b5)](a55_0x12f6c0['red'](_0x4515f6(0x2d2)),_0x4515f6(0x2cf)),console[_0x4515f6(0x2b5)](a55_0x12f6c0['dim'](_0x4515f6(0x1c7))),0x1;const _0x12cc66=await confirmKey(_0x4515f6(0x32f));if(!_0x12cc66)return console['error'](a55_0x12f6c0['yellow'](_0x4515f6(0x1e5)),_0x4515f6(0x23b)),0x1;}await withSpinner(_0x4515f6(0x33e),()=>_0x34493e[_0x4515f6(0x1d9)][_0x4515f6(0x1f6)](_0x5c997f,{'revision':_0x216954}),{'verbose':_0x53b1c9[_0x4515f6(0x19f)]}),saveSessionContext({'workflow_project':_0x5c997f['projectName']},_0x53b1c9[_0x4515f6(0x326)]),console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x1cf)](_0x4515f6(0x1ca)));const _0x41cd36=a55_0xe058bc[_0x4515f6(0x206)](process[_0x4515f6(0x344)](),_0x5c997f['targetDir'])||'.';return console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x34a)](_0x4515f6(0x339)+_0x41cd36)),console[_0x4515f6(0x2b5)](a55_0x12f6c0[_0x4515f6(0x34a)](_0x4515f6(0x198)+_0x5c997f[_0x4515f6(0x213)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a55_0xa29ad1(0x24e);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x263);async[a55_0xa29ad1(0x22c)](_0x1e9bc2){const _0x182029=a55_0xa29ad1,{options:_0x38ec70,args:_0x1a6aad,tdx:_0x42aa26}=_0x1e9bc2,_0x21d1d6=this[_0x182029(0x317)](_0x1a6aad,_0x38ec70),_0x72ed1a=_0x38ec70,{revision:_0x342b71,skipValidation:_0x305414,backfill:_0x19e31d}=_0x72ed1a,_0x295776=_0x19e31d===undefined?undefined:!_0x19e31d;_0x38ec70[_0x182029(0x19f)]&&(_0x21d1d6&&console[_0x182029(0x2b5)](_0x182029(0x24a)+_0x21d1d6),_0x342b71&&console[_0x182029(0x2b5)](_0x182029(0x201)+_0x342b71),_0x38ec70['dryRun']&&console[_0x182029(0x2b5)]('Dry\x20run:\x20yes'),_0x305414&&console[_0x182029(0x2b5)](_0x182029(0x252)),_0x19e31d&&console['error'](_0x182029(0x33a)));let _0x5166c4;try{_0x5166c4=await withSpinner(_0x182029(0x2db),()=>_0x42aa26[_0x182029(0x1d9)][_0x182029(0x327)]({'sourceDir':_0x21d1d6,'revision':_0x342b71,'skipValidation':_0x305414,'skipSchedule':_0x295776}),{'verbose':_0x38ec70['verbose']});}catch(_0x46ac3a){if(_0x46ac3a instanceof Error&&_0x46ac3a['message'][_0x182029(0x210)](_0x182029(0x2c2)))return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x1bb)]('Error:'),_0x182029(0x195)),_0x38ec70[_0x182029(0x1b0)]?console[_0x182029(0x2b5)](a55_0x12f6c0['dim'](_0x182029(0x1b7)+_0x38ec70[_0x182029(0x1b0)]+_0x182029(0x1b1)+_0x38ec70[_0x182029(0x1b0)]+'\x27')):console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x34a)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x46ac3a;}const _0x2163c7=_0x5166c4[_0x182029(0x35c)];console['error']('✔\x20Project:\x20'+_0x2163c7[_0x182029(0x213)]),console[_0x182029(0x2b5)](_0x182029(0x364)+_0x2163c7[_0x182029(0x269)]),console[_0x182029(0x2b5)](_0x182029(0x320)+_0x2163c7['revision']),console[_0x182029(0x2b5)]('\x20\x20Changes:\x20'+a55_0x12f6c0[_0x182029(0x1cf)]('+'+_0x2163c7[_0x182029(0x1eb)]['new']+'\x20new')+',\x20'+(a55_0x12f6c0[_0x182029(0x227)]('~'+_0x2163c7['summary'][_0x182029(0x1b3)]+_0x182029(0x31c))+',\x20')+(a55_0x12f6c0[_0x182029(0x1bb)]('-'+_0x2163c7['summary'][_0x182029(0x2fc)]+'\x20deleted')+',\x20')+(''+a55_0x12f6c0[_0x182029(0x34a)](_0x2163c7[_0x182029(0x1eb)]['unchanged']+_0x182029(0x26e))));for(const _0xf52d34 of _0x2163c7[_0x182029(0x276)]){_0xf52d34['type']===_0x182029(0x1b3)&&_0xf52d34[_0x182029(0x30c)]&&(console['error']('\x0a'+a55_0x12f6c0[_0x182029(0x2dd)]('---\x20'+_0xf52d34['path'])),console[_0x182029(0x2b5)](_0xf52d34[_0x182029(0x30c)]));}if(!_0x2163c7['hasChanges'])return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x1cf)](_0x182029(0x1ad))),await this[_0x182029(0x338)](_0x42aa26,_0x2163c7['projectName'],_0x38ec70['site']),0x0;if(_0x38ec70[_0x182029(0x1bf)])return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x227)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x38ec70['yes']){if(!isInteractive())return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x1bb)](_0x182029(0x2d2)),_0x182029(0x2cf)),console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x34a)](_0x182029(0x1c7))),0x1;const _0x1e75b6=await confirmKey(_0x182029(0x34b));if(!_0x1e75b6)return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x227)](_0x182029(0x1e5)),_0x182029(0x1e2)),0x1;}const _0x40d727=await withSpinner(_0x182029(0x24c),()=>_0x42aa26['workflow'][_0x182029(0x1d3)](_0x2163c7),{'verbose':_0x38ec70[_0x182029(0x19f)]}),_0x4600fd=_0x40d727[_0x182029(0x35c)];return console[_0x182029(0x2b5)](a55_0x12f6c0[_0x182029(0x1cf)](_0x182029(0x2de))),console[_0x182029(0x2b5)](_0x182029(0x2b3)+_0x4600fd[_0x182029(0x249)]),console['error']('\x20\x20Revision:\x20'+_0x4600fd['revision']),await this[_0x182029(0x338)](_0x42aa26,_0x4600fd[_0x182029(0x213)],_0x38ec70['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x347);[a55_0xa29ad1(0x22a)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a55_0xa29ad1(0x22c)](_0x32f10c){const _0x324f24=a55_0xa29ad1,{options:_0x524bc3,args:_0x5cdc66,tdx:_0x555201}=_0x32f10c,_0x5d642e=this[_0x324f24(0x317)](_0x5cdc66,_0x524bc3),_0x3f9936=_0x524bc3[_0x324f24(0x1ff)],_0x3f7175=_0x524bc3[_0x324f24(0x22f)],_0x331435=_0x524bc3[_0x324f24(0x202)];if(!_0x5d642e)return console[_0x324f24(0x2b5)](a55_0x12f6c0['red'](_0x324f24(0x352)),_0x324f24(0x1e9)),console[_0x324f24(0x2b5)](a55_0x12f6c0['dim'](_0x324f24(0x19d))),console[_0x324f24(0x2b5)](a55_0x12f6c0['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x3f9936)return console['error'](a55_0x12f6c0[_0x324f24(0x1bb)](_0x324f24(0x352)),_0x324f24(0x23c)),console['error'](a55_0x12f6c0[_0x324f24(0x34a)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x524bc3[_0x324f24(0x19f)]&&(console[_0x324f24(0x2b5)]('Source\x20directory:\x20'+_0x5d642e),console[_0x324f24(0x2b5)]('New\x20project\x20name:\x20'+_0x3f9936),_0x3f7175&&console['error'](_0x324f24(0x201)+_0x3f7175),_0x524bc3['dryRun']&&console['error']('Dry\x20run:\x20yes'),_0x331435&&console[_0x324f24(0x2b5)](_0x324f24(0x252)));const _0x525576=await withSpinner('Analyzing\x20project...',()=>_0x555201[_0x324f24(0x1d9)]['prepareCloneProject'](_0x5d642e,_0x3f9936,{'revision':_0x3f7175,'skipValidation':_0x331435}),{'verbose':_0x524bc3[_0x324f24(0x19f)]}),_0x4ee3e2=_0x525576[_0x324f24(0x35c)];console[_0x324f24(0x2b5)](_0x324f24(0x295)+_0x4ee3e2[_0x324f24(0x269)]);_0x4ee3e2[_0x324f24(0x234)]&&console['error'](_0x324f24(0x294)+_0x4ee3e2['sourceProjectName']);console[_0x324f24(0x2b5)](_0x324f24(0x221)+_0x4ee3e2[_0x324f24(0x22d)]),console[_0x324f24(0x2b5)](_0x324f24(0x201)+_0x4ee3e2['revision']),console[_0x324f24(0x2b5)](_0x324f24(0x2e3)+_0x4ee3e2['fileCount']);_0x4ee3e2['targetExists']&&(console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x227)](_0x324f24(0x28e)+_0x4ee3e2[_0x324f24(0x22d)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x4ee3e2['existingProjectId']+')')),console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x227)](_0x324f24(0x1ae))));if(_0x524bc3[_0x324f24(0x1bf)])return console[_0x324f24(0x2b5)](a55_0x12f6c0['yellow'](_0x324f24(0x307))),0x0;if(!_0x524bc3[_0x324f24(0x296)]){if(!isInteractive())return console['error'](a55_0x12f6c0[_0x324f24(0x1bb)](_0x324f24(0x2d2)),_0x324f24(0x2cf)),console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x34a)](_0x324f24(0x1c7))),0x1;const _0x5e1e1e=_0x4ee3e2[_0x324f24(0x234)]||a55_0xe058bc[_0x324f24(0x1d4)](_0x5d642e),_0x369eac=_0x4ee3e2[_0x324f24(0x1e7)]?_0x324f24(0x35a)+_0x3f9936+_0x324f24(0x311):_0x324f24(0x2c7)+_0x5e1e1e+_0x324f24(0x246)+_0x3f9936+'\x22?',_0x5aa567=await confirmKey(_0x369eac);if(!_0x5aa567)return console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x227)](_0x324f24(0x1e5))),0x1;}const _0x4244d8=await withSpinner(_0x4ee3e2[_0x324f24(0x1e7)]?_0x324f24(0x222)+_0x3f9936+_0x324f24(0x2a1):_0x324f24(0x231)+_0x3f9936+_0x324f24(0x2a1),()=>_0x555201[_0x324f24(0x1d9)][_0x324f24(0x2b8)](_0x4ee3e2),{'verbose':_0x524bc3[_0x324f24(0x19f)]}),_0x1dee62=_0x4244d8[_0x324f24(0x35c)];return console[_0x324f24(0x2b5)](a55_0x12f6c0[_0x324f24(0x1cf)](_0x4ee3e2[_0x324f24(0x1e7)]?_0x324f24(0x1fc):_0x324f24(0x1ef))),console[_0x324f24(0x2b5)](_0x324f24(0x1de)+_0x1dee62[_0x324f24(0x22d)]),console[_0x324f24(0x2b5)](_0x324f24(0x2b3)+_0x1dee62[_0x324f24(0x209)]),console[_0x324f24(0x2b5)]('\x20\x20Revision:\x20'+_0x1dee62[_0x324f24(0x22f)]),await this[_0x324f24(0x338)](_0x555201,_0x1dee62[_0x324f24(0x22d)],_0x524bc3['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a55_0xa29ad1(0x2aa);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x270);async[a55_0xa29ad1(0x22c)](_0x202630){const _0x346913=a55_0xa29ad1,{options:_0x1af9f8,args:_0x1df64e,tdx:_0x2ec99b}=_0x202630,_0x52273f=_0x1df64e[0x0];if(!_0x52273f)return console[_0x346913(0x2b5)](_0x346913(0x2bb)),console[_0x346913(0x2b5)](_0x346913(0x334)),0x1;_0x1af9f8['verbose']&&console[_0x346913(0x2b5)](_0x346913(0x308)+_0x52273f);if(!_0x1af9f8[_0x346913(0x296)]){if(!isInteractive())return console['error'](a55_0x12f6c0[_0x346913(0x1bb)](_0x346913(0x2d2)),_0x346913(0x2cf)),console[_0x346913(0x2b5)](a55_0x12f6c0[_0x346913(0x34a)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4fe11b=await confirmKey(_0x346913(0x2f0)+_0x52273f+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x4fe11b)return console[_0x346913(0x2b5)](a55_0x12f6c0[_0x346913(0x227)](_0x346913(0x1e5))),0x1;}const _0x41b3bb=await withSpinner(_0x346913(0x324)+_0x52273f+'...',()=>_0x2ec99b['workflow']['delete'](_0x52273f),{'verbose':_0x1af9f8[_0x346913(0x19f)]}),_0x90ddda=_0x41b3bb[_0x346913(0x35c)];return console['error'](_0x346913(0x2d9)+_0x90ddda['projectName']),console[_0x346913(0x2b5)](_0x346913(0x2b3)+_0x90ddda[_0x346913(0x249)]),0x0;}}export function parseKeyValue(_0x24e0d7){const _0x2c91fe=a55_0xa29ad1,_0x195bed=_0x24e0d7[_0x2c91fe(0x2e8)]('=');if(_0x195bed===-0x1)throw new Error('Invalid\x20format:\x20'+_0x24e0d7+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x35b7ef=_0x24e0d7[_0x2c91fe(0x322)](0x0,_0x195bed),_0x5389c4=_0x24e0d7['substring'](_0x195bed+0x1);if(!_0x35b7ef)throw new Error(_0x2c91fe(0x1c6));return{'key':_0x35b7ef,'value':_0x5389c4};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]='workflow:secrets:list';[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x306);async[a55_0xa29ad1(0x22c)](_0x557d02){const _0x1fbc85=a55_0xa29ad1,{options:_0x4411ba,args:_0x19ab0a,tdx:_0x5b20b7}=_0x557d02,_0x27e561=this[_0x1fbc85(0x235)](_0x19ab0a,_0x4411ba);if(!_0x27e561)return 0x1;_0x4411ba[_0x1fbc85(0x19f)]&&console[_0x1fbc85(0x2b5)]('Project:\x20'+_0x27e561);const _0x29cf52=await withSpinner('Listing\x20secrets...',()=>_0x5b20b7[_0x1fbc85(0x1d9)]['listSecrets'](_0x27e561),{'verbose':_0x4411ba[_0x1fbc85(0x19f)]}),{secrets:_0x2b494f}=_0x29cf52['data'];return console[_0x1fbc85(0x2b5)](_0x1fbc85(0x32a)+_0x2b494f[_0x1fbc85(0x2ec)]+'\x20secret'+(_0x2b494f[_0x1fbc85(0x2ec)]!==0x1?'s':'')),await handleSDKOutput(_0x2b494f,_0x4411ba),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a55_0xa29ad1(0x2fe);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x280);async[a55_0xa29ad1(0x22c)](_0x2c8b0b){const _0x50e5ac=a55_0xa29ad1,{options:_0xe380e8,args:_0x41d561,tdx:_0xaf70a1}=_0x2c8b0b;let _0x21a9db,_0x49341;if(_0x41d561[_0x50e5ac(0x2ec)]>=0x1&&!_0x41d561[0x0][_0x50e5ac(0x210)]('='))_0x21a9db=_0x41d561[0x0],_0x49341=_0x41d561[_0x50e5ac(0x29a)](0x1);else{if(_0x41d561[_0x50e5ac(0x2ec)]>=0x1&&_0xe380e8['workflowProject'])_0x21a9db=_0xe380e8[_0x50e5ac(0x1b0)],_0x49341=_0x41d561;else return _0x41d561['length']>=0x1?(console[_0x50e5ac(0x2b5)](_0x50e5ac(0x2ba)),console[_0x50e5ac(0x2b5)](_0x50e5ac(0x333)),0x1):(console[_0x50e5ac(0x2b5)](_0x50e5ac(0x27b)),console['error'](_0x50e5ac(0x1f5)),0x1);}if(_0x49341[_0x50e5ac(0x2ec)]===0x0)return console[_0x50e5ac(0x2b5)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x2e72c0={};try{for(const _0x4a9e02 of _0x49341){const {key:_0x30cbe9,value:_0x4bd840}=parseKeyValue(_0x4a9e02);_0x2e72c0[_0x30cbe9]=_0x4bd840;}}catch(_0x38b0b9){return _0x38b0b9 instanceof Error&&console[_0x50e5ac(0x2b5)](a55_0x12f6c0[_0x50e5ac(0x1bb)]('Error:'),_0x38b0b9[_0x50e5ac(0x1ce)]),0x1;}const _0x25b42d=Object[_0x50e5ac(0x281)](_0x2e72c0);_0xe380e8[_0x50e5ac(0x19f)]&&(console[_0x50e5ac(0x2b5)](_0x50e5ac(0x308)+_0x21a9db),console[_0x50e5ac(0x2b5)](_0x50e5ac(0x360)+_0x25b42d[_0x50e5ac(0x23a)](',\x20')));const _0x1e3fdd=await withSpinner(_0x25b42d['length']===0x1?'Setting\x20secret...':_0x50e5ac(0x28f)+_0x25b42d[_0x50e5ac(0x2ec)]+'\x20secrets...',()=>_0xaf70a1[_0x50e5ac(0x1d9)][_0x50e5ac(0x1f1)](_0x21a9db,_0x2e72c0),{'verbose':_0xe380e8['verbose']}),_0x338075=_0x1e3fdd['data'];return console['error'](_0x25b42d[_0x50e5ac(0x2ec)]===0x1?_0x50e5ac(0x351)+_0x338075[_0x50e5ac(0x281)][0x0]+_0x50e5ac(0x332)+_0x338075[_0x50e5ac(0x213)]+'\x27':'✔\x20'+_0x338075[_0x50e5ac(0x281)]['length']+_0x50e5ac(0x32d)+_0x338075['projectName']+'\x27'),(_0xe380e8['json']||_0xe380e8[_0x50e5ac(0x2cd)])&&await handleSingleObjectOutput(_0x338075,_0xe380e8),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x32c);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x283);async[a55_0xa29ad1(0x22c)](_0x361803){const _0x43ed98=a55_0xa29ad1,{options:_0x31d66a,args:_0x110f2e,tdx:_0xa120cd}=_0x361803;let _0x412536,_0x2b5c9d;if(_0x110f2e[_0x43ed98(0x2ec)]>=0x2)_0x412536=_0x110f2e[0x0],_0x2b5c9d=_0x110f2e[0x1];else{if(_0x110f2e[_0x43ed98(0x2ec)]===0x1&&_0x31d66a[_0x43ed98(0x1b0)])_0x412536=_0x31d66a[_0x43ed98(0x1b0)],_0x2b5c9d=_0x110f2e[0x0];else return _0x110f2e['length']===0x1?(console[_0x43ed98(0x2b5)](_0x43ed98(0x2ba)),console[_0x43ed98(0x2b5)](_0x43ed98(0x333)),0x1):(console[_0x43ed98(0x2b5)](_0x43ed98(0x228)),console[_0x43ed98(0x2b5)](_0x43ed98(0x2d4)),0x1);}_0x31d66a[_0x43ed98(0x19f)]&&(console[_0x43ed98(0x2b5)](_0x43ed98(0x308)+_0x412536),console[_0x43ed98(0x2b5)](_0x43ed98(0x1df)+_0x2b5c9d));if(!_0x31d66a[_0x43ed98(0x296)]){if(!isInteractive())return console[_0x43ed98(0x2b5)](a55_0x12f6c0['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a55_0x12f6c0[_0x43ed98(0x34a)](_0x43ed98(0x1c7))),0x1;const _0x38229f=await confirmKey(_0x43ed98(0x1bc)+_0x2b5c9d+'\x27\x20from\x20project\x20\x27'+_0x412536+'\x27?');if(!_0x38229f)return console['error'](a55_0x12f6c0[_0x43ed98(0x227)](_0x43ed98(0x1e5))),0x1;}const _0x402736=await withSpinner('Deleting\x20secret...',()=>_0xa120cd['workflow']['deleteSecret'](_0x412536,_0x2b5c9d),{'verbose':_0x31d66a[_0x43ed98(0x19f)]}),_0x32f347=_0x402736[_0x43ed98(0x35c)];return console['error'](_0x43ed98(0x351)+_0x32f347[_0x43ed98(0x2b0)]+_0x43ed98(0x1d5)+_0x32f347[_0x43ed98(0x213)]+'\x27'),(_0x31d66a[_0x43ed98(0x325)]||_0x31d66a['jsonl'])&&await handleSingleObjectOutput(_0x32f347,_0x31d66a),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function formatElapsed(_0x313ed9){const _0x5db46b=a55_0xa29ad1,_0x42e32f=Math['floor'](_0x313ed9/0x3e8),_0x196311=Math[_0x5db46b(0x27e)](_0x42e32f/0x3c),_0x222df6=Math[_0x5db46b(0x27e)](_0x196311/0x3c),_0x5a1945=Math['floor'](_0x222df6/0x18);if(_0x5a1945>0x0){const _0x424eb6=_0x222df6%0x18;return _0x424eb6>0x0?_0x5a1945+'d\x20'+_0x424eb6+'h':_0x5a1945+'d';}else{if(_0x222df6>0x0){const _0x33cdf4=_0x196311%0x3c;return _0x33cdf4>0x0?_0x222df6+'h\x20'+_0x33cdf4+'m':_0x222df6+'h';}else{if(_0x196311>0x0){const _0x531eed=_0x42e32f%0x3c;return _0x531eed>0x0?_0x196311+'m\x20'+_0x531eed+'s':_0x196311+'m';}else return _0x42e32f+'s';}}}function formatTimestamp(_0x418893,_0x47dc70){const _0x41b809=a55_0xa29ad1,_0x487946=new Date(_0x418893),_0x49ee90=String(_0x487946[_0x41b809(0x2e9)]())[_0x41b809(0x19e)](0x2,'0'),_0x456b39=String(_0x487946[_0x41b809(0x34d)]())[_0x41b809(0x19e)](0x2,'0'),_0x63fc03=_0x49ee90+':'+_0x456b39,_0x212372=_0x487946[_0x41b809(0x26b)]()===_0x47dc70['getFullYear']()&&_0x487946[_0x41b809(0x238)]()===_0x47dc70[_0x41b809(0x238)]()&&_0x487946[_0x41b809(0x302)]()===_0x47dc70['getDate']();if(_0x212372)return _0x63fc03;else{const _0x58bdf4=String(_0x487946[_0x41b809(0x238)]()+0x1)[_0x41b809(0x19e)](0x2,'0'),_0x1b0d65=String(_0x487946['getDate']())['padStart'](0x2,'0');return _0x58bdf4+'-'+_0x1b0d65+'\x20'+_0x63fc03;}}function formatDate(_0x2542b7){const _0x4ee331=a55_0xa29ad1,_0x453342=_0x2542b7[_0x4ee331(0x26b)](),_0x5a4998=String(_0x2542b7[_0x4ee331(0x238)]()+0x1)[_0x4ee331(0x19e)](0x2,'0'),_0x4b4fae=String(_0x2542b7[_0x4ee331(0x302)]())[_0x4ee331(0x19e)](0x2,'0');return _0x453342+'-'+_0x5a4998+'-'+_0x4b4fae;}function getTaskStateIcon(_0x12fb7c){const _0x19d342={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x19d342[_0x12fb7c]||'⚪';}function getBarChar(_0x3f1e12){const _0x302d50=a55_0xa29ad1;return _0x3f1e12===_0x302d50(0x2b5)||_0x3f1e12===_0x302d50(0x273)?'×':'─';}function getBarColor(_0x40ae52){const _0x369c9b=a55_0xa29ad1,_0x47d848={'success':a55_0x12f6c0[_0x369c9b(0x1cf)],'error':a55_0x12f6c0[_0x369c9b(0x1bb)],'group_error':a55_0x12f6c0[_0x369c9b(0x1bb)],'running':a55_0x12f6c0[_0x369c9b(0x1b6)],'blocked':a55_0x12f6c0[_0x369c9b(0x227)],'planned':a55_0x12f6c0[_0x369c9b(0x34a)],'canceling':a55_0x12f6c0[_0x369c9b(0x227)]};return _0x47d848[_0x40ae52]||a55_0x12f6c0[_0x369c9b(0x2fd)];}function parseTaskName(_0x133f98){const _0x5476db=a55_0xa29ad1;let _0x23aa71=_0x133f98[_0x5476db(0x31f)](/^\++/,'');const _0x4febf8=_0x23aa71[_0x5476db(0x1c9)]('+'),_0x3f4bff=_0x4febf8[_0x5476db(0x2ec)]>0x1?_0x4febf8[_0x5476db(0x2ec)]-0x2:0x0,_0x2c28cc=_0x4febf8[_0x4febf8['length']-0x1]||_0x23aa71;return{'level':_0x3f4bff,'name':'+'+_0x2c28cc};}function truncateTaskName(_0x1bbc90,_0x106f7f){const _0x124a0c=a55_0xa29ad1,_0x214c4b=stringWidth(_0x1bbc90);if(_0x214c4b<=_0x106f7f)return _0x1bbc90;let _0x40206c=_0x1bbc90;while(stringWidth(_0x40206c+'…')>_0x106f7f&&_0x40206c['length']>0x0){_0x40206c=_0x40206c[_0x124a0c(0x29a)](0x0,-0x1);}return _0x40206c+'…';}function calculateTimeScale(_0x83ef53,_0x5b6f40){const _0x917dc4=a55_0xa29ad1;return{'startTime':_0x83ef53[_0x917dc4(0x33d)],'endTime':_0x83ef53['end'],'durationMs':_0x83ef53[_0x917dc4(0x33c)],'msPerChar':_0x83ef53['duration']/_0x5b6f40};}function timeToPosition(_0x3f5d56,_0xc5a8f7,_0x8d1435){const _0x5e661d=a55_0xa29ad1,_0x40fbf4=_0x3f5d56-_0xc5a8f7['startTime'],_0x5e0071=Math[_0x5e661d(0x27e)](_0x40fbf4/_0xc5a8f7['msPerChar']);return Math[_0x5e661d(0x27f)](0x0,Math[_0x5e661d(0x21c)](_0x5e0071,_0x8d1435));}function renderTimeAxis(_0x1a6eea,_0xb9342d){const _0x3fbff9=a55_0xa29ad1,_0x5468cf=Math['min'](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x3fbff9(0x27f)](TIMELINE_CONFIG[_0x3fbff9(0x2d3)],Math['floor'](_0xb9342d/TIMELINE_CONFIG[_0x3fbff9(0x266)]))),_0x231fb2=_0x1a6eea[_0x3fbff9(0x2ab)]/(_0x5468cf-0x1),_0x16f5f2=new Date(_0x1a6eea[_0x3fbff9(0x1b8)]),_0x9890e5=[];for(let _0x33b5bf=0x0;_0x33b5bf<_0x5468cf;_0x33b5bf++){const _0x7d9341=_0x1a6eea['startTime']+_0x33b5bf*_0x231fb2,_0x5c2bd5=timeToPosition(_0x7d9341,_0x1a6eea,_0xb9342d),_0xc0e9c1=formatTimestamp(_0x7d9341,_0x16f5f2);_0x9890e5[_0x3fbff9(0x267)]({'pos':_0x5c2bd5,'text':_0xc0e9c1});}const _0x485e8=new Array(_0xb9342d)[_0x3fbff9(0x2cb)]('\x20');let _0x1bf48c=-0x1;for(const {pos:_0x2b0cd6,text:_0x10f98f}of _0x9890e5){let _0x4131cf=Math[_0x3fbff9(0x27f)](0x0,_0x2b0cd6-Math[_0x3fbff9(0x27e)](_0x10f98f[_0x3fbff9(0x2ec)]/0x2));_0x4131cf<=_0x1bf48c+TIMELINE_CONFIG[_0x3fbff9(0x310)]&&(_0x4131cf=_0x1bf48c+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x4131cf+_0x10f98f['length']>_0xb9342d&&(_0x4131cf=_0xb9342d-_0x10f98f[_0x3fbff9(0x2ec)]);if(_0x4131cf>=0x0&&_0x4131cf+_0x10f98f['length']<=_0xb9342d&&_0x4131cf>_0x1bf48c){for(let _0x2cc368=0x0;_0x2cc368<_0x10f98f[_0x3fbff9(0x2ec)];_0x2cc368++){_0x485e8[_0x4131cf+_0x2cc368]=_0x10f98f[_0x2cc368];}_0x1bf48c=_0x4131cf+_0x10f98f[_0x3fbff9(0x2ec)]-0x1;}}return _0x485e8[_0x3fbff9(0x23a)]('');}function renderTaskRow(_0x7297ea,_0x1dc75c,_0x3e9728,_0x4e801b){const _0x2f4972=a55_0xa29ad1,{level:_0x2cc33c,name:_0x34da3f}=parseTaskName(_0x7297ea['name']),_0x568513='\x20'[_0x2f4972(0x1f2)](_0x2cc33c),_0x2c848c=_0x7297ea[_0x2f4972(0x1c5)]?'('+formatElapsed(_0x7297ea[_0x2f4972(0x1c5)][_0x2f4972(0x33c)])+')':'',_0x3869b3=stringWidth(_0x2c848c),_0x452987=_0x2cc33c*0x1,_0x5c0337=_0x4e801b-_0x452987-_0x3869b3-0x1,_0x6a6d83=truncateTaskName(_0x34da3f,_0x5c0337),_0x2bb403=_0x568513+_0x6a6d83,_0x38fb5e=stringWidth(_0x2bb403),_0x4f16ed=_0x4e801b-_0x38fb5e-_0x3869b3,_0xa6ba0e=_0x2bb403+'\x20'['repeat'](Math[_0x2f4972(0x27f)](0x1,_0x4f16ed))+a55_0x12f6c0['dim'](_0x2c848c),_0x2d3792=getTaskStateIcon(_0x7297ea['state']),_0x28b923=new Array(_0x3e9728)[_0x2f4972(0x2cb)]('\x20');if(_0x7297ea[_0x2f4972(0x1c5)]){const _0x4e86f9=timeToPosition(_0x7297ea[_0x2f4972(0x1c5)][_0x2f4972(0x33d)],_0x1dc75c,_0x3e9728),_0x2f0dc3=timeToPosition(_0x7297ea[_0x2f4972(0x1c5)][_0x2f4972(0x219)],_0x1dc75c,_0x3e9728),_0x18ff40=getBarChar(_0x7297ea[_0x2f4972(0x20f)]),_0x165220=Math[_0x2f4972(0x27f)](_0x4e86f9+0x1,_0x2f0dc3);for(let _0x3d3ece=_0x4e86f9;_0x3d3ece<Math[_0x2f4972(0x21c)](_0x165220,_0x3e9728);_0x3d3ece++){_0x28b923[_0x3d3ece]=_0x18ff40;}}const _0x339a1e=getBarColor(_0x7297ea[_0x2f4972(0x20f)]),_0x23841c=_0x28b923[_0x2f4972(0x312)](_0x101af4=>_0x101af4==='\x20'?'\x20':_0x339a1e(_0x101af4))['join']('');return _0x2d3792+'\x20'+_0xa6ba0e+'│'+_0x23841c+'│';}function calculateStats(_0x15a675){const _0x15a010=a55_0xa29ad1,_0x2878be={'total':_0x15a675[_0x15a010(0x2ec)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x44627c of _0x15a675){if(_0x44627c['state']===_0x15a010(0x19a))_0x2878be[_0x15a010(0x19a)]++;else{if(_0x44627c[_0x15a010(0x20f)]===_0x15a010(0x2b5)||_0x44627c[_0x15a010(0x20f)]===_0x15a010(0x273))_0x2878be['error']++;else _0x44627c[_0x15a010(0x20f)]===_0x15a010(0x31d)?_0x2878be['running']++:_0x2878be[_0x15a010(0x1dc)]++;}}return _0x2878be;}function formatStats(_0x3e32a3){const _0x2a85f7=a55_0xa29ad1;return[_0x2a85f7(0x1a9)+_0x3e32a3['total'],'✅\x20'+_0x3e32a3[_0x2a85f7(0x19a)],'❌\x20'+_0x3e32a3[_0x2a85f7(0x2b5)],_0x2a85f7(0x2c4)+_0x3e32a3[_0x2a85f7(0x31d)],'⏳\x20'+_0x3e32a3[_0x2a85f7(0x1dc)]][_0x2a85f7(0x23a)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]='workflow:timeline';['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a55_0xa29ad1(0x22c)](_0x307edb){const _0x199dce=a55_0xa29ad1,{options:_0x184b6a,args:_0x487f92,tdx:_0x53a246}=_0x307edb;let _0x5182e7,_0x4913b8,_0x13da2f=![];if(_0x487f92[0x0]){if(_0x487f92[0x0][_0x199dce(0x210)]('.')){const _0x540c1a=this[_0x199dce(0x29c)](_0x487f92,_0x184b6a);if(!_0x540c1a)return 0x1;_0x5182e7=_0x540c1a[_0x199dce(0x213)],_0x4913b8=_0x540c1a[_0x199dce(0x20e)];}else{_0x4913b8=_0x487f92[0x0],_0x5182e7=_0x184b6a[_0x199dce(0x1b0)];if(!_0x5182e7)return console[_0x199dce(0x2b5)](a55_0x12f6c0[_0x199dce(0x1bb)](_0x199dce(0x352)),_0x199dce(0x2b4)),0x1;_0x13da2f=!![];}}else{const _0x49afc0=this[_0x199dce(0x29c)](_0x487f92,_0x184b6a);if(!_0x49afc0)return 0x1;_0x5182e7=_0x49afc0['projectName'],_0x4913b8=_0x49afc0[_0x199dce(0x20e)];}if(_0x184b6a[_0x199dce(0x19f)]){if(_0x5182e7&&_0x4913b8)console[_0x199dce(0x2b5)](_0x199dce(0x2fb)+_0x5182e7+'.'+_0x4913b8);else _0x5182e7&&console['error'](_0x199dce(0x31a)+_0x5182e7);}const _0x4535d2=_0x184b6a[_0x199dce(0x2c5)],_0xd2cbc9=_0x184b6a[_0x199dce(0x2a5)];if(_0x4535d2){_0xd2cbc9&&console[_0x199dce(0x2b5)](a55_0x12f6c0[_0x199dce(0x227)](_0x199dce(0x1c0)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x48943b=_0x184b6a[_0x199dce(0x29d)];return _0x48943b?await this['pollTimeline'](_0x307edb,_0x4535d2):await this[_0x199dce(0x2b6)](_0x307edb,_0x4535d2,_0x184b6a),0x0;}if(_0xd2cbc9){const _0x31a850=await withSpinner('Loading\x20session...',()=>_0x53a246[_0x199dce(0x1d9)]['sessions']({'projectName':_0x5182e7,'workflowName':_0x4913b8,'limit':0x64}),{'verbose':_0x184b6a['verbose']}),_0x5797b7=_0x31a850[_0x199dce(0x35c)][_0x199dce(0x2b2)](_0x128932=>_0x128932['id']===_0xd2cbc9);if(!_0x5797b7)return console[_0x199dce(0x2b5)](a55_0x12f6c0['red'](_0x199dce(0x352)),_0x199dce(0x211)+_0xd2cbc9),0x1;if(!_0x5797b7[_0x199dce(0x1af)]?.['id'])return console[_0x199dce(0x2b5)](a55_0x12f6c0[_0x199dce(0x1bb)](_0x199dce(0x352)),_0x199dce(0x303)+_0xd2cbc9+'\x20has\x20no\x20attempts'),0x1;const _0x234719=_0x5797b7[_0x199dce(0x1af)]['id'];_0x184b6a[_0x199dce(0x19f)]&&console[_0x199dce(0x2b5)](_0x199dce(0x217)+_0x234719+_0x199dce(0x2e7)+_0xd2cbc9);const _0x2a4740=_0x184b6a[_0x199dce(0x29d)];return _0x2a4740?await this[_0x199dce(0x2d6)](_0x307edb,_0x234719):await this[_0x199dce(0x2b6)](_0x307edb,_0x234719,_0x184b6a),0x0;}const _0x4f1659=await withSpinner('Loading\x20sessions...',()=>_0x53a246[_0x199dce(0x1d9)][_0x199dce(0x243)]({'projectName':_0x5182e7,'workflowName':_0x4913b8,'limit':_0x184b6a[_0x199dce(0x301)]||0x32}),{'verbose':_0x184b6a['verbose']}),_0x59ecd2=_0x4f1659['data'];if(_0x59ecd2[_0x199dce(0x2ec)]===0x0){if(_0x5182e7&&_0x4913b8)console['error'](_0x199dce(0x1fd)+_0x5182e7+'.'+_0x4913b8);else _0x5182e7?console['error'](_0x199dce(0x349)+_0x5182e7):(console[_0x199dce(0x2b5)](_0x199dce(0x313)),console[_0x199dce(0x2b5)](a55_0x12f6c0[_0x199dce(0x34a)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x59ecd2[_0x199dce(0x271)]((_0x213cfb,_0x550122)=>{const _0x591b9b=_0x199dce,_0x407fcf=_0x213cfb[_0x591b9b(0x329)]||'',_0x318d07=_0x550122[_0x591b9b(0x329)]||'';return _0x318d07[_0x591b9b(0x1bd)](_0x407fcf);});if(_0x184b6a[_0x199dce(0x325)]||_0x184b6a[_0x199dce(0x2cd)])return await handleSDKOutput(_0x59ecd2,_0x184b6a),0x0;let _0x4da692;if(_0x13da2f){const _0x452e3a=_0x59ecd2[0x0];if(!_0x452e3a[_0x199dce(0x1af)]?.['id'])return console['error'](_0x199dce(0x2a2)),0x0;_0x4da692=_0x452e3a['lastAttempt']['id'],_0x184b6a[_0x199dce(0x19f)]&&console[_0x199dce(0x2b5)](_0x199dce(0x305)+_0x452e3a[_0x199dce(0x329)]);}else{const _0x435c48=_0x59ecd2[_0x199dce(0x312)](_0x15ad3f=>{const _0x521300=_0x199dce,_0x8570fa=getAttemptStatusDisplay(_0x15ad3f[_0x521300(0x1af)]);return{'title':_0x15ad3f[_0x521300(0x356)]?.[_0x521300(0x1ff)]+'.'+_0x15ad3f['workflow']?.[_0x521300(0x1ff)]+_0x521300(0x277)+_0x15ad3f['sessionTime']+'\x20'+_0x8570fa[_0x521300(0x2d0)],'value':_0x15ad3f[_0x521300(0x1af)]?.['id']||'','description':_0x8570fa[_0x521300(0x208)]};}),_0x5a66f7=await a55_0x46d174({'type':'select','name':_0x199dce(0x2c5),'message':_0x199dce(0x30f),'choices':_0x435c48[_0x199dce(0x23e)](_0x572d3d=>_0x572d3d['value']!=='')});if(!_0x5a66f7['attemptId'])return 0x0;_0x4da692=_0x5a66f7[_0x199dce(0x2c5)];}const _0x326378=_0x184b6a['follow'];return _0x326378?await this[_0x199dce(0x2d6)](_0x307edb,_0x4da692):await this['renderSingleTimeline'](_0x307edb,_0x4da692,_0x184b6a),0x0;}async[a55_0xa29ad1(0x2b6)](_0x18fecf,_0x34f606,_0x270a30){const _0x250624=a55_0xa29ad1,{tdx:_0x43b05a}=_0x18fecf;let _0x5aeb9e,_0x307a10;try{[_0x5aeb9e,_0x307a10]=await Promise['all']([_0x43b05a[_0x250624(0x1d9)][_0x250624(0x28b)](_0x34f606),_0x43b05a[_0x250624(0x1d9)][_0x250624(0x2f7)](_0x34f606,![])]);}catch(_0x206e86){console[_0x250624(0x2b5)](a55_0x12f6c0[_0x250624(0x1bb)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x270a30[_0x250624(0x19f)]&&console[_0x250624(0x2b5)](_0x206e86);throw _0x206e86;}if(_0x270a30[_0x250624(0x325)]||_0x270a30[_0x250624(0x2cd)]){const _0x955858=this[_0x250624(0x314)](_0x5aeb9e,_0x307a10);await handleSDKOutput([_0x955858],_0x270a30);return;}const _0x1757f7=_0x43b05a[_0x250624(0x245)][_0x250624(0x2e4)],_0x37e3fd=this['renderTimeline'](_0x5aeb9e,_0x307a10,_0x1757f7);console[_0x250624(0x361)](_0x37e3fd);}async['pollTimeline'](_0x54aa0c,_0x35cc60){const _0x545982=a55_0xa29ad1,{tdx:_0x755a58}=_0x54aa0c,_0x2e0002=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x39c209=TIMELINE_CONFIG[_0x545982(0x1ea)];let _0x449909=0x0;while(_0x449909<_0x39c209){process[_0x545982(0x2dc)][_0x545982(0x1fb)]&&process[_0x545982(0x2dc)][_0x545982(0x342)]('\x1bc');let _0x5339d1,_0x54e3f2;try{[_0x5339d1,_0x54e3f2]=await Promise[_0x545982(0x2af)]([_0x755a58['workflow']['attempt'](_0x35cc60),_0x755a58['workflow']['tasks'](_0x35cc60,![])]);}catch(_0xdd09f1){console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x1bb)](_0x545982(0x1f4)));_0x449909>0x0&&console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x34a)](_0x545982(0x275)+_0x449909));throw _0xdd09f1;}const _0x329371=_0x755a58[_0x545982(0x245)]['site'],_0x1d2ada=this[_0x545982(0x2a0)](_0x5339d1,_0x54e3f2,_0x329371);console[_0x545982(0x361)](_0x1d2ada);const _0xba1583=_0x5339d1[_0x545982(0x2c6)]&&_0x54e3f2[_0x545982(0x1b5)](_0x58df62=>_0x58df62[_0x545982(0x20f)]!==_0x545982(0x31d)&&_0x58df62[_0x545982(0x20f)]!==_0x545982(0x343));if(_0xba1583){console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x1cf)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x34a)](_0x545982(0x197)+_0x449909*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x10f024=>setTimeout(_0x10f024,_0x2e0002)),_0x449909++;}_0x449909>=_0x39c209&&console[_0x545982(0x2b5)](a55_0x12f6c0[_0x545982(0x227)](_0x545982(0x29e)));}[a55_0xa29ad1(0x2a0)](_0x5efa79,_0x3fd6e2,_0xef1f0d){const _0x43f56e=a55_0xa29ad1,_0x21d823=[],_0x34d11d=TIMELINE_CONFIG[_0x43f56e(0x32b)],_0x2c6dd0=0x5,_0x47211b=process[_0x43f56e(0x2dc)][_0x43f56e(0x315)]||0x78,_0x6ff4c2=_0x47211b-_0x34d11d-_0x2c6dd0,_0x318a68=Math[_0x43f56e(0x27f)](TIMELINE_CONFIG[_0x43f56e(0x290)],Math['min'](_0x6ff4c2,TIMELINE_CONFIG[_0x43f56e(0x2ae)])),_0x272372=new Date(_0x5efa79[_0x43f56e(0x1d7)])['getTime'](),_0x4b1c8d=_0x5efa79[_0x43f56e(0x353)]?new Date(_0x5efa79[_0x43f56e(0x353)])['getTime']():Date[_0x43f56e(0x2a3)](),_0x300f20={'start':_0x272372,'end':_0x4b1c8d,'duration':_0x4b1c8d-_0x272372},_0x34018d=new Map(),_0x580462=[];for(const _0x400438 of _0x3fd6e2){if(_0x400438['startedAt']){const _0x1e6866=new Date(_0x400438['startedAt'])[_0x43f56e(0x34e)](),_0x3dfeed=_0x400438['updatedAt']?new Date(_0x400438[_0x43f56e(0x28a)])[_0x43f56e(0x34e)]():Date[_0x43f56e(0x2a3)](),_0x1847f6={'start':_0x1e6866,'end':_0x3dfeed,'duration':_0x3dfeed-_0x1e6866};_0x34018d[_0x43f56e(0x1ab)](_0x400438['id'],_0x1847f6),_0x580462[_0x43f56e(0x267)]({'name':_0x400438[_0x43f56e(0x272)],'state':_0x400438[_0x43f56e(0x20f)]||_0x43f56e(0x256),'window':_0x1847f6});}else _0x580462[_0x43f56e(0x267)]({'name':_0x400438[_0x43f56e(0x272)],'state':_0x400438[_0x43f56e(0x20f)]||'planned','window':undefined});}_0x580462[_0x43f56e(0x271)]((_0x6666f6,_0x253fda)=>{const _0x214f50=_0x43f56e;if(!_0x6666f6[_0x214f50(0x1c5)])return 0x1;if(!_0x253fda[_0x214f50(0x1c5)])return-0x1;return _0x6666f6[_0x214f50(0x1c5)][_0x214f50(0x33d)]-_0x253fda['window'][_0x214f50(0x33d)];});const _0x1aefc1=_0x580462[_0x43f56e(0x2ec)],_0x5babb6=_0x1aefc1>TIMELINE_CONFIG[_0x43f56e(0x260)];_0x5babb6&&_0x580462[_0x43f56e(0x24b)](TIMELINE_CONFIG[_0x43f56e(0x260)]);const _0x14853f=calculateTimeScale(_0x300f20,_0x318a68),_0xb9a831=_0x5efa79['done']?_0x5efa79[_0x43f56e(0x19a)]?a55_0x12f6c0[_0x43f56e(0x1cf)](_0x43f56e(0x19a)):a55_0x12f6c0['red'](_0x43f56e(0x2b5)):a55_0x12f6c0[_0x43f56e(0x1b6)](_0x43f56e(0x31d)),_0x1e39c3=_0x5efa79[_0x43f56e(0x356)]?.['id'],_0x57a4ab=_0x5efa79['sessionId'];let _0x159564;if(_0x1e39c3&&_0x57a4ab){const _0x494cf8=getWorkflowAttemptUrl(_0xef1f0d,_0x1e39c3,_0x57a4ab,_0x5efa79['id']);_0x159564=hyperlink(a55_0x12f6c0['dim'](_0x5efa79['id']),_0x494cf8);}else _0x159564=a55_0x12f6c0[_0x43f56e(0x34a)](_0x5efa79['id']);_0x21d823['push'](_0x43f56e(0x247)+_0x159564+_0x43f56e(0x277)+_0xb9a831+_0x43f56e(0x277)+formatElapsed(_0x300f20[_0x43f56e(0x33c)]));if(_0x580462[_0x43f56e(0x2ec)]>0x0){const _0x2976d4=renderTimeAxis(_0x14853f,_0x318a68),_0x2d46c8=new Date(_0x300f20[_0x43f56e(0x33d)]),_0x101086=formatDate(_0x2d46c8),_0x5b57a5=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x43f56e(0x31e)]+_0x34d11d,_0x1b7ed2=_0x101086['padStart'](_0x5b57a5),_0x41363c=a55_0x12f6c0[_0x43f56e(0x34a)](_0x1b7ed2);_0x21d823[_0x43f56e(0x267)](_0x41363c+'\x20'+_0x2976d4);for(const _0x188752 of _0x580462){_0x21d823[_0x43f56e(0x267)](renderTaskRow(_0x188752,_0x14853f,_0x318a68,_0x34d11d));}const _0x5b6109=calculateStats(_0x580462);_0x21d823[_0x43f56e(0x267)](formatStats(_0x5b6109)),_0x5babb6&&_0x21d823[_0x43f56e(0x267)](a55_0x12f6c0[_0x43f56e(0x227)](_0x43f56e(0x1a1)+TIMELINE_CONFIG[_0x43f56e(0x260)]+'\x20of\x20'+_0x1aefc1+_0x43f56e(0x35d))),_0x21d823[_0x43f56e(0x267)](''),_0x21d823[_0x43f56e(0x267)](a55_0x12f6c0[_0x43f56e(0x34a)](_0x43f56e(0x193))+('tdx\x20wf\x20attempt\x20'+_0x5efa79['id']+_0x43f56e(0x279))+a55_0x12f6c0[_0x43f56e(0x34a)](_0x43f56e(0x2d5)));}else _0x21d823[_0x43f56e(0x267)](_0x43f56e(0x199));return _0x21d823[_0x43f56e(0x23a)]('\x0a');}['buildTimelineData'](_0x3a282a,_0x40f489){const _0x50d3be=a55_0xa29ad1,_0x488ec8=new Date(_0x3a282a[_0x50d3be(0x1d7)])[_0x50d3be(0x34e)](),_0x540b38=_0x3a282a[_0x50d3be(0x353)]?new Date(_0x3a282a[_0x50d3be(0x353)])[_0x50d3be(0x34e)]():Date[_0x50d3be(0x2a3)](),_0x594e3b=_0x540b38-_0x488ec8,_0x1ee498=[];for(const _0x42d465 of _0x40f489){if(_0x42d465[_0x50d3be(0x1d1)]){const _0x23bd75=new Date(_0x42d465['startedAt'])[_0x50d3be(0x34e)](),_0x441ac8=_0x42d465[_0x50d3be(0x28a)]?new Date(_0x42d465[_0x50d3be(0x28a)])['getTime']():Date[_0x50d3be(0x2a3)]();_0x1ee498[_0x50d3be(0x267)]({'name':_0x42d465[_0x50d3be(0x272)],'state':_0x42d465['state']||_0x50d3be(0x256),'window':{'start':_0x23bd75,'end':_0x441ac8,'duration':_0x441ac8-_0x23bd75}});}else _0x1ee498[_0x50d3be(0x267)]({'name':_0x42d465[_0x50d3be(0x272)],'state':_0x42d465[_0x50d3be(0x20f)]||_0x50d3be(0x343),'window':undefined});}const _0x1275c5=calculateStats(_0x1ee498);return{'attempt':{'id':_0x3a282a['id'],'status':_0x3a282a[_0x50d3be(0x2c6)]?_0x3a282a[_0x50d3be(0x19a)]?_0x50d3be(0x19a):_0x50d3be(0x2b5):_0x50d3be(0x31d),'createdAt':_0x3a282a[_0x50d3be(0x1d7)],'finishedAt':_0x3a282a[_0x50d3be(0x353)],'duration_ms':_0x594e3b},'tasks':_0x1ee498['map'](_0x2a4094=>({'name':_0x2a4094[_0x50d3be(0x1ff)],'state':_0x2a4094[_0x50d3be(0x20f)],'startedAt':_0x2a4094[_0x50d3be(0x1c5)]?new Date(_0x2a4094[_0x50d3be(0x1c5)]['start'])[_0x50d3be(0x233)]():null,'updatedAt':_0x2a4094['window']?new Date(_0x2a4094[_0x50d3be(0x1c5)]['end'])['toISOString']():null,'duration_ms':_0x2a4094[_0x50d3be(0x1c5)]?.[_0x50d3be(0x33c)]||null})),'stats':_0x1275c5};}}function formatScheduleLine(_0x54b7ce){const _0x28236e=a55_0xa29ad1,_0x5164fd=_0x54b7ce[_0x28236e(0x27c)]?a55_0x12f6c0[_0x28236e(0x227)](_0x28236e(0x2c8)):'',_0x49e4bd=_0x54b7ce[_0x28236e(0x356)]?.[_0x28236e(0x1ff)]?a55_0x12f6c0[_0x28236e(0x34a)]('\x20['+_0x54b7ce[_0x28236e(0x356)]['name']+']'):'',_0x307f44=_0x54b7ce['nextRunTime']?a55_0x12f6c0[_0x28236e(0x34a)](_0x28236e(0x31b)+new Date(_0x54b7ce[_0x28236e(0x244)])[_0x28236e(0x1c2)]()):'';return _0x28236e(0x22b)+_0x54b7ce['id']+'\x20'+(_0x54b7ce[_0x28236e(0x1d9)]?.[_0x28236e(0x1ff)]||_0x28236e(0x1f9))+_0x49e4bd+_0x5164fd+_0x307f44;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x251);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x223);async['execute'](_0xe392ea){const _0x31a5d6=a55_0xa29ad1,{options:_0x411af6,args:_0x2314fc,tdx:_0x5570f5}=_0xe392ea,{scheduleId:_0x3c07d0}=_0x411af6;if(_0x3c07d0&&_0x2314fc[0x0])return console[_0x31a5d6(0x2b5)](a55_0x12f6c0[_0x31a5d6(0x1bb)](_0x31a5d6(0x352)),'--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter'),console[_0x31a5d6(0x2b5)](a55_0x12f6c0['dim'](_0x31a5d6(0x1ed))),0x1;if(_0x3c07d0){const _0x3cf4dd=await withSpinner(_0x31a5d6(0x230)+_0x3c07d0+_0x31a5d6(0x2a1),()=>_0x5570f5['workflow']['getSchedule'](_0x3c07d0),{'verbose':_0x411af6['verbose']}),_0x2c46e4=_0x3cf4dd[_0x31a5d6(0x35c)];return isStructuredFormat(_0x411af6)?await handleSingleObjectOutput(_0x2c46e4,_0x411af6):(console[_0x31a5d6(0x2b5)]('✔\x20Schedule\x20found'),console[_0x31a5d6(0x361)](formatScheduleLine(_0x2c46e4))),0x0;}const _0x4c2d84=this[_0x31a5d6(0x29c)](_0x2314fc,_0x411af6);if(!_0x4c2d84)return 0x1;const {projectName:_0x530ade,workflowName:_0x393551}=_0x4c2d84,_0x231bd3=_0x530ade?'\x27'+_0x530ade+(_0x393551?'.'+_0x393551:'')+'\x27':undefined,_0x547040=await withSpinner(_0x231bd3?_0x31a5d6(0x214)+_0x231bd3+_0x31a5d6(0x2a1):'Listing\x20schedules...',()=>_0x530ade?_0x5570f5[_0x31a5d6(0x1d9)][_0x31a5d6(0x1a2)](_0x530ade,{'workflow':_0x393551,'limit':_0x411af6['limit']}):_0x5570f5[_0x31a5d6(0x1d9)][_0x31a5d6(0x2cc)]({'limit':_0x411af6['limit']}),{'verbose':_0x411af6[_0x31a5d6(0x19f)]}),_0x30bad8=_0x547040[_0x31a5d6(0x35c)],_0x4345bf=_0x411af6['limit']&&_0x30bad8[_0x31a5d6(0x2ec)]>=_0x411af6[_0x31a5d6(0x301)]?a55_0x12f6c0[_0x31a5d6(0x34a)](_0x31a5d6(0x2b9)):'';console[_0x31a5d6(0x2b5)]('✔\x20Found\x20'+_0x30bad8[_0x31a5d6(0x2ec)]+_0x31a5d6(0x1fa)+(_0x30bad8[_0x31a5d6(0x2ec)]!==0x1?'s':'')+_0x4345bf);if(isStructuredFormat(_0x411af6))await handleSDKOutput(_0x30bad8,_0x411af6);else{if(_0x30bad8['length']===0x0)console['log']('No\x20schedules\x20found');else for(const _0x197706 of _0x30bad8){console[_0x31a5d6(0x361)](formatScheduleLine(_0x197706));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a55_0xa29ad1(0x1ff)]=a55_0xa29ad1(0x21d);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x350);async[a55_0xa29ad1(0x22c)](_0x457ad0){const _0x1cdcf1=a55_0xa29ad1,{options:_0xc7df2d,args:_0x39b09b,tdx:_0x2db56e}=_0x457ad0,_0x30916e=_0x39b09b[0x0];if(!_0x30916e)return console[_0x1cdcf1(0x2b5)](a55_0x12f6c0[_0x1cdcf1(0x1bb)]('Error:'),'Schedule\x20ID\x20is\x20required'),console['error'](a55_0x12f6c0[_0x1cdcf1(0x34a)](_0x1cdcf1(0x2d1))),console[_0x1cdcf1(0x2b5)](a55_0x12f6c0[_0x1cdcf1(0x34a)](_0x1cdcf1(0x2e0))),0x1;const {backfill:_0x1ed153,nextTime:_0x59391d}=_0xc7df2d,_0x29421b={};if(_0x1ed153!==undefined)_0x29421b[_0x1cdcf1(0x357)]=!_0x1ed153;if(_0x59391d!==undefined)_0x29421b[_0x1cdcf1(0x2df)]=_0x59391d;const _0x364202=await withSpinner(_0x1cdcf1(0x253)+_0x30916e+'...',()=>_0x2db56e[_0x1cdcf1(0x1d9)][_0x1cdcf1(0x225)](_0x30916e,_0x29421b),{'verbose':_0xc7df2d[_0x1cdcf1(0x19f)]}),_0x12947b=_0x364202[_0x1cdcf1(0x35c)];return isStructuredFormat(_0xc7df2d)?await handleSingleObjectOutput(_0x12947b,_0xc7df2d):(console[_0x1cdcf1(0x361)](_0x1cdcf1(0x1cb)+_0x30916e+_0x1cdcf1(0x346)+(_0x12947b[_0x1cdcf1(0x1d9)]?.[_0x1cdcf1(0x1ff)]||_0x1cdcf1(0x256))+')'),_0x12947b[_0x1cdcf1(0x244)]&&console[_0x1cdcf1(0x361)](a55_0x12f6c0[_0x1cdcf1(0x34a)](_0x1cdcf1(0x2a6)+new Date(_0x12947b['nextRunTime'])['toLocaleString']()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']=a55_0xa29ad1(0x2bc);[a55_0xa29ad1(0x22a)]=a55_0xa29ad1(0x2e2);async[a55_0xa29ad1(0x22c)](_0xb7b495){const _0x30b3f8=a55_0xa29ad1,{options:_0x396dc5,args:_0x457a88,tdx:_0x4ef6c7}=_0xb7b495,_0x508988=_0x457a88[0x0];if(!_0x508988)return console[_0x30b3f8(0x2b5)](a55_0x12f6c0[_0x30b3f8(0x1bb)]('Error:'),'Schedule\x20ID\x20is\x20required'),console['error'](a55_0x12f6c0[_0x30b3f8(0x34a)](_0x30b3f8(0x2f5))),console['error'](a55_0x12f6c0['dim'](_0x30b3f8(0x2e0))),0x1;const _0x353f7d=await withSpinner(_0x30b3f8(0x2ff)+_0x508988+_0x30b3f8(0x2a1),()=>_0x4ef6c7['workflow'][_0x30b3f8(0x205)](_0x508988),{'verbose':_0x396dc5[_0x30b3f8(0x19f)]}),_0x44cdb3=_0x353f7d[_0x30b3f8(0x35c)];return isStructuredFormat(_0x396dc5)?await handleSingleObjectOutput(_0x44cdb3,_0x396dc5):console[_0x30b3f8(0x361)](_0x30b3f8(0x1cb)+_0x508988+_0x30b3f8(0x24d)+(_0x44cdb3['workflow']?.[_0x30b3f8(0x1ff)]||_0x30b3f8(0x256))+')'),0x0;}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x378b0,_0x5a62cd){const _0x302c21=a56_0x2914,_0x3bc703=_0x378b0();while(!![]){try{const _0x34374a=-parseInt(_0x302c21(0xdb))/0x1*(-parseInt(_0x302c21(0xe2))/0x2)+-parseInt(_0x302c21(0xda))/0x3*(parseInt(_0x302c21(0xd8))/0x4)+-parseInt(_0x302c21(0xe6))/0x5*(parseInt(_0x302c21(0xde))/0x6)+-parseInt(_0x302c21(0xe1))/0x7+parseInt(_0x302c21(0xdc))/0x8+parseInt(_0x302c21(0xe0))/0x9+-parseInt(_0x302c21(0xeb))/0xa*(-parseInt(_0x302c21(0xd9))/0xb);if(_0x34374a===_0x5a62cd)break;else _0x3bc703['push'](_0x3bc703['shift']());}catch(_0x2857c8){_0x3bc703['push'](_0x3bc703['shift']());}}}(a56_0x14d0,0x40dc6));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 _0x5c06b5=a56_0x2914,_0x17bbcb=getVersion(),_0x111f3f=platform(),_0xb57f11=process['version'][_0x5c06b5(0xea)]('v','');return _0x5c06b5(0xe7)+_0x17bbcb+'\x20('+_0x111f3f+_0x5c06b5(0xe4)+_0xb57f11+')';}function a56_0x14d0(){const _0x47ca36=['340bRAUBt','tdx/','TD1\x20','Bearer\x20','replace','10jatYSy','entries','238916moUgKp','5735081hHoXdd','21RhpIHZ','8763kvGLiY','888848WKaPcD','tdx','45966SyFAyY','length','2357604MECZzT','895034xKFOYQ','100tcUCoj','X-Trino-User',';\x20node/','Authorization'];a56_0x14d0=function(){return _0x47ca36;};return a56_0x14d0();}function a56_0x2914(_0xfcd88b,_0x274378){_0xfcd88b=_0xfcd88b-0xd8;const _0x14d0a6=a56_0x14d0();let _0x29140c=_0x14d0a6[_0xfcd88b];return _0x29140c;}export function getAuthHeaders(_0x5f3bee,_0x298163,_0x192943){const _0x3baa74=a56_0x2914,_0xa75825=getVersion(),_0xc15ee6={'User-Agent':getUserAgent(),'X-TD-Client':_0x3baa74(0xdd),'X-TD-Client-Version':_0xa75825};if(_0x192943)_0xc15ee6[_0x3baa74(0xe5)]=_0x3baa74(0xe9)+_0x192943;else _0x298163&&(_0xc15ee6[_0x3baa74(0xe5)]=_0x3baa74(0xe8)+_0x298163);return _0xc15ee6;}export function toHeaderRecord(_0x148385){const _0xdd16c9=a56_0x2914,_0x4779d2={};for(const [_0x165261,_0x4c29ac]of Object[_0xdd16c9(0xec)](_0x148385)){_0x4c29ac!==undefined&&(_0x4779d2[_0x165261]=_0x4c29ac);}return _0x4779d2;}export function getTrinoHeaders(_0x311c84,_0x2bebac,_0x1a3b0f){const _0x6e4e76=a56_0x2914,_0x3adbd8=getAuthHeaders(_0x311c84),_0x303e52=toHeaderRecord(_0x3adbd8);if(_0x1a3b0f)_0x303e52[_0x6e4e76(0xe5)]=_0x6e4e76(0xe9)+_0x1a3b0f;else _0x2bebac&&(_0x303e52[_0x6e4e76(0xe3)]=_0x2bebac);return _0x303e52;}export function hasAPIKey(_0x5a08af){const _0x1c36e5=a56_0x2914,_0x4a17fb=getAPIKey();return _0x4a17fb!==undefined&&_0x4a17fb[_0x1c36e5(0xdf)]>0x0;}
|