@treasuredata/tdx 2026.3.52 → 2026.3.54
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-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/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.d.ts.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +2 -0
- package/dist/mcp/tools/index.d.ts.map +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/index.js.map +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.d.ts +50 -0
- package/dist/mcp/tools/work-create-item.d.ts.map +1 -0
- package/dist/mcp/tools/work-create-item.js +1 -0
- package/dist/mcp/tools/work-create-item.js.map +1 -0
- 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/personalization.js +1 -1
- package/dist/sdk/policy.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.d.ts +15 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +14 -2
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +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 a54_0x2cd64f=a54_0x1c09;(function(_0x9f59c1,_0x390114){const _0x350c52=a54_0x1c09,_0x2c0078=_0x9f59c1();while(!![]){try{const _0x599084=-parseInt(_0x350c52(0x266))/0x1+parseInt(_0x350c52(0x230))/0x2*(parseInt(_0x350c52(0x25f))/0x3)+-parseInt(_0x350c52(0x26b))/0x4*(-parseInt(_0x350c52(0x2d3))/0x5)+-parseInt(_0x350c52(0x2d9))/0x6*(parseInt(_0x350c52(0x2b8))/0x7)+parseInt(_0x350c52(0x151))/0x8*(parseInt(_0x350c52(0x2a5))/0x9)+-parseInt(_0x350c52(0x27d))/0xa+parseInt(_0x350c52(0x285))/0xb;if(_0x599084===_0x390114)break;else _0x2c0078['push'](_0x2c0078['shift']());}catch(_0x2e1eac){_0x2c0078['push'](_0x2c0078['shift']());}}}(a54_0x52df,0xcac14));import a54_0x22d6d4 from'chalk';import{existsSync}from'fs';import a54_0x49f5e from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,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 a54_0xbf6bfc from'prompts';function getAttemptStatusDisplay(_0x5dd4e2){const _0x5ee1f6=a54_0x1c09;if(!_0x5dd4e2)return{'icon':'⏳','text':''};const {done:_0x45d643,success:_0x53914c,cancelRequested:_0x3f1d86}=_0x5dd4e2;if(!_0x45d643)return _0x3f1d86?{'icon':'🛑','text':a54_0x22d6d4[_0x5ee1f6(0x1d6)](_0x5ee1f6(0x1cb))}:{'icon':'🔄','text':a54_0x22d6d4[_0x5ee1f6(0x176)]('running')};if(_0x53914c)return{'icon':'✅','text':a54_0x22d6d4[_0x5ee1f6(0x145)](_0x5ee1f6(0x197))};return{'icon':'❌','text':a54_0x22d6d4[_0x5ee1f6(0x297)](_0x5ee1f6(0x29e))};}export class WorkflowBaseCommand extends BaseCommand{[a54_0x2cd64f(0x28e)](_0xca1c34,_0x524d95,_0x3f144d=0x0){return _0xca1c34[_0x3f144d]||_0x524d95['workflowProject'];}['requireProject'](_0x5612be,_0x20472b,_0x4ba1e0=0x0){const _0x57b043=a54_0x2cd64f,_0x53cd29=this[_0x57b043(0x28e)](_0x5612be,_0x20472b,_0x4ba1e0);if(!_0x53cd29)return console[_0x57b043(0x29e)](a54_0x22d6d4['red'](_0x57b043(0x1ae)),'Project\x20name\x20is\x20required'),console[_0x57b043(0x29e)](a54_0x22d6d4[_0x57b043(0x149)](_0x57b043(0x1ee))),null;return _0x53cd29;}['parseProjectWorkflowPattern'](_0x50d45e,_0x205933){const _0x475a91=a54_0x2cd64f;if(_0x50d45e[0x0]){const _0x5d27a4=_0x50d45e[0x0][_0x475a91(0x1d5)]('.');if(_0x5d27a4[_0x475a91(0x289)]===0x1)return{'projectName':_0x5d27a4[0x0],'workflowName':undefined};else return _0x5d27a4['length']===0x2?{'projectName':_0x5d27a4[0x0],'workflowName':_0x5d27a4[0x1]}:(console[_0x475a91(0x29e)](a54_0x22d6d4[_0x475a91(0x297)](_0x475a91(0x1ae)),_0x475a91(0x196)),null);}return{'projectName':_0x205933[_0x475a91(0x22f)],'workflowName':undefined};}['resolveProjectDir'](_0x36e642,_0x4baa76,_0x5470dd=0x0){const _0x2bb7d1=a54_0x2cd64f;if(_0x36e642[_0x5470dd])return _0x36e642[_0x5470dd];if(_0x4baa76[_0x2bb7d1(0x22f)]){const _0x2ae8f8=a54_0x49f5e[_0x2bb7d1(0x184)](process['cwd'](),_0x2bb7d1(0x13f),_0x4baa76['workflowProject']);if(existsSync(a54_0x49f5e[_0x2bb7d1(0x184)](_0x2ae8f8,_0x2bb7d1(0x281))))return _0x2ae8f8;}return undefined;}async[a54_0x2cd64f(0x29d)](_0x1a5c40,_0x358e37,_0x568d9a){const _0x2f0a14=a54_0x2cd64f;try{const _0xb94cb7=await _0x1a5c40['workflow']['workflows'](_0x358e37,{'limit':0x1});if(_0xb94cb7[_0x2f0a14(0x289)]>0x0){const _0x32f5c4=_0xb94cb7[0x0]['id'],_0x4a2a8b=getWorkflowUrl(_0x568d9a,_0x32f5c4);console[_0x2f0a14(0x29e)](_0x2f0a14(0x1c3)+a54_0x22d6d4[_0x2f0a14(0x159)](_0x4a2a8b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x222);[a54_0x2cd64f(0x167)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a54_0x2cd64f(0x223)](_0x1fa99b){const _0x5efbb4=a54_0x2cd64f,{options:_0x5d171c,args:_0x22c60e,tdx:_0x157b1d}=_0x1fa99b,_0x496a9a=_0x22c60e[0x0],_0x1fdd74=_0x5d171c[_0x5efbb4(0x177)];if(_0x1fdd74)return saveSessionContext({'workflow_project':undefined},_0x5d171c[_0x5efbb4(0x218)]),console['log'](a54_0x22d6d4[_0x5efbb4(0x145)](_0x5efbb4(0x267))),0x0;if(!_0x496a9a)return console['error'](a54_0x22d6d4['red'](_0x5efbb4(0x1ae)),'Project\x20name\x20is\x20required'),console[_0x5efbb4(0x29e)](a54_0x22d6d4['dim']('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x5efbb4(0x29e)](a54_0x22d6d4[_0x5efbb4(0x149)](_0x5efbb4(0x296))),0x1;const _0x540df5=await withSpinner(_0x5efbb4(0x290)+_0x496a9a+_0x5efbb4(0x1aa),()=>_0x157b1d[_0x5efbb4(0x199)][_0x5efbb4(0x28b)](_0x496a9a),{'verbose':_0x5d171c[_0x5efbb4(0x20a)]}),{name:_0x154a07}=_0x540df5[_0x5efbb4(0x1e5)];return saveSessionContext({'workflow_project':_0x154a07},_0x5d171c[_0x5efbb4(0x218)]),console['log'](a54_0x22d6d4['green']('✔\x20Workflow\x20project\x20set\x20to:\x20'+a54_0x22d6d4[_0x5efbb4(0x159)](_0x154a07))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a54_0x2cd64f(0x181);['description']=a54_0x2cd64f(0x2a8);async[a54_0x2cd64f(0x223)](_0xef7567){const _0x2c7b5d=a54_0x2cd64f,{options:_0x2b8d97,args:_0x3cfd2b,tdx:_0x21eff4}=_0xef7567,_0x333783=_0x3cfd2b[0x0];_0x2b8d97[_0x2c7b5d(0x20a)]&&_0x333783&&console[_0x2c7b5d(0x29e)](_0x2c7b5d(0x2be)+_0x333783);const _0x18e607=await withSpinner(_0x2c7b5d(0x14c),()=>_0x21eff4['workflow'][_0x2c7b5d(0x27f)](_0x333783,{'limit':_0x2b8d97[_0x2c7b5d(0x24a)]}),{'verbose':_0x2b8d97[_0x2c7b5d(0x20a)]});let _0x3494db=_0x18e607[_0x2c7b5d(0x1e5)];_0x3494db[_0x2c7b5d(0x19b)]((_0x37db90,_0x23f8bf)=>_0x37db90[_0x2c7b5d(0x131)][_0x2c7b5d(0x2b4)](_0x23f8bf['name']));const _0xb3d7c9=_0x2b8d97['limit']||0x64,_0x100f42=_0x3494db[_0x2c7b5d(0x289)]>=_0xb3d7c9?a54_0x22d6d4[_0x2c7b5d(0x149)](_0x2c7b5d(0x134)):'';console[_0x2c7b5d(0x29e)](_0x2c7b5d(0x125)+_0x3494db[_0x2c7b5d(0x289)]+_0x2c7b5d(0x18b)+(_0x3494db[_0x2c7b5d(0x289)]!==0x1?'s':'')+_0x100f42);if(_0x2b8d97[_0x2c7b5d(0x183)]==='json'||_0x2b8d97[_0x2c7b5d(0x183)]===_0x2c7b5d(0x2c6)||_0x2b8d97[_0x2c7b5d(0x183)]==='table')await handleSDKOutput(_0x3494db,_0x2b8d97);else{if(_0x3494db[_0x2c7b5d(0x289)]===0x0)_0x333783?console['log'](_0x2c7b5d(0x2a2)+_0x333783):console[_0x2c7b5d(0x188)](_0x2c7b5d(0x201));else{const _0x50e2af=_0x3494db[_0x2c7b5d(0x245)](_0x3cd21c=>{const _0x518edb=_0x2c7b5d,_0x1a43e8=_0x3cd21c[_0x518edb(0x248)]?.[_0x518edb(0x283)](_0x5034c6=>_0x5034c6[_0x518edb(0x2a0)]===_0x518edb(0x227)),_0x38fa59=_0x1a43e8?a54_0x22d6d4['dim']('\x20(system)'):'';return _0x518edb(0x262)+_0x3cd21c[_0x518edb(0x131)]+_0x38fa59;});await writeOutput(_0x50e2af[_0x2c7b5d(0x184)]('\x0a'),_0x2b8d97[_0x2c7b5d(0x25b)],_0x2c7b5d(0x1ff));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a54_0x2cd64f(0x27e);['description']=a54_0x2cd64f(0x147);async[a54_0x2cd64f(0x223)](_0x257789){const _0x330cdb=a54_0x2cd64f,{options:_0x3c3355,args:_0x4aadbc,tdx:_0x36bd43}=_0x257789,_0xbcc175=this['resolveProject'](_0x4aadbc,_0x3c3355);_0x3c3355['verbose']&&_0xbcc175&&console[_0x330cdb(0x29e)]('Project\x20filter:\x20'+_0xbcc175);const _0xdb7460=await withSpinner(_0x330cdb(0x142),()=>_0x36bd43[_0x330cdb(0x199)][_0x330cdb(0x13f)](_0xbcc175,{'limit':_0x3c3355[_0x330cdb(0x24a)]}),{'verbose':_0x3c3355[_0x330cdb(0x20a)]});let _0x5ef525=_0xdb7460[_0x330cdb(0x1e5)];_0x5ef525[_0x330cdb(0x19b)]((_0x9edf3a,_0x4c6cab)=>{const _0x4c9c14=_0x330cdb,_0x5ed6e8=_0x9edf3a[_0x4c9c14(0x131)]['localeCompare'](_0x4c6cab[_0x4c9c14(0x131)]);if(_0x5ed6e8!==0x0)return _0x5ed6e8;return(_0x9edf3a[_0x4c9c14(0x241)]?.[_0x4c9c14(0x131)]||'')[_0x4c9c14(0x2b4)](_0x4c6cab[_0x4c9c14(0x241)]?.[_0x4c9c14(0x131)]||'');});const _0x46ec70=_0x3c3355[_0x330cdb(0x24a)]||0x64,_0x2fd484=_0x5ef525['length']>=_0x46ec70?a54_0x22d6d4['dim'](_0x330cdb(0x134)):'';console[_0x330cdb(0x29e)](_0x330cdb(0x125)+_0x5ef525['length']+_0x330cdb(0x128)+(_0x5ef525[_0x330cdb(0x289)]!==0x1?'s':'')+_0x2fd484);if(_0x3c3355['format']===_0x330cdb(0x175)||_0x3c3355[_0x330cdb(0x183)]==='jsonl'||_0x3c3355['format']===_0x330cdb(0x1a0))await handleSDKOutput(_0x5ef525,_0x3c3355);else{if(_0x5ef525[_0x330cdb(0x289)]===0x0)_0xbcc175?console[_0x330cdb(0x188)](_0x330cdb(0x24d)+_0xbcc175):console['log'](_0x330cdb(0x16a));else{const _0x309733=_0x3c3355['site'],_0x581384=_0x5ef525[_0x330cdb(0x245)](_0x21e13d=>{const _0x1313aa=_0x330cdb,_0x28fff0=a54_0x22d6d4[_0x1313aa(0x149)]('#'+_0x21e13d['id']),_0x21dec5=hyperlink(_0x28fff0,getWorkflowUrl(_0x309733,_0x21e13d['id'])),_0xb9f6ed=_0x21e13d[_0x1313aa(0x241)]?.['name']?a54_0x22d6d4[_0x1313aa(0x149)]('\x20('+_0x21e13d[_0x1313aa(0x241)][_0x1313aa(0x131)]+')'):'';return _0x1313aa(0x133)+_0x21dec5+'\x20'+_0x21e13d[_0x1313aa(0x131)]+_0xb9f6ed;});await writeOutput(_0x581384[_0x330cdb(0x184)]('\x0a'),_0x3c3355[_0x330cdb(0x25b)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x1f2);[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x2af);async['execute'](_0xdcfce0){const _0x32f139=a54_0x2cd64f,{options:_0x23d400,args:_0xd01aa7,tdx:_0x4c96fc}=_0xdcfce0,_0x156e1c=this[_0x32f139(0x15f)](_0xd01aa7,_0x23d400);if(!_0x156e1c)return 0x1;const {projectName:_0x49ae32,workflowName:_0x24e4f0}=_0x156e1c;if(_0x23d400[_0x32f139(0x20a)]){if(_0x49ae32&&_0x24e4f0)console[_0x32f139(0x29e)](_0x32f139(0x1f8)+_0x49ae32+'.'+_0x24e4f0);else _0x49ae32&&console[_0x32f139(0x29e)]('Filter:\x20project='+_0x49ae32);const _0x325df0=_0x23d400[_0x32f139(0x29c)];_0x325df0&&console['error']('Status:\x20'+_0x325df0);}let _0x18355f=0x28;if(process[_0x32f139(0x25e)][_0x32f139(0x265)]&&!_0x23d400[_0x32f139(0x25b)]&&!_0x23d400[_0x32f139(0x183)]){const _0x23e758=process['stdout'][_0x32f139(0x28f)]||0x28;_0x18355f=Math[_0x32f139(0x123)](0x14,Math[_0x32f139(0x180)](_0x23e758*0x2/0x3));}const _0x41eb63=_0x23d400['limit']||_0x18355f,_0x129f13=await withSpinner(_0x32f139(0x24e),()=>_0x4c96fc[_0x32f139(0x199)][_0x32f139(0x272)]({'projectName':_0x49ae32,'workflowName':_0x24e4f0,'status':_0x23d400['status'],'fromTime':_0x23d400[_0x32f139(0x270)],'toTime':_0x23d400['to'],'limit':_0x41eb63}),{'verbose':_0x23d400[_0x32f139(0x20a)]}),_0x1503ef=_0x129f13[_0x32f139(0x1e5)];_0x1503ef['sort']((_0x1c739f,_0x122707)=>{const _0x56b997=_0x32f139,_0x1c35e5=_0x1c739f[_0x56b997(0x1ea)]||'',_0x456cc1=_0x122707[_0x56b997(0x1ea)]||'';return _0x456cc1['localeCompare'](_0x1c35e5);});_0x1503ef[_0x32f139(0x289)]>=_0x41eb63?console[_0x32f139(0x29e)](_0x32f139(0x2d2)+_0x1503ef['length']+'\x20sessions\x20'+a54_0x22d6d4[_0x32f139(0x149)](_0x32f139(0x236))):console[_0x32f139(0x29e)](_0x32f139(0x125)+_0x1503ef[_0x32f139(0x289)]+'\x20session'+(_0x1503ef['length']!==0x1?'s':''));if(_0x23d400['format']===_0x32f139(0x175)||_0x23d400[_0x32f139(0x183)]===_0x32f139(0x2c6)||_0x23d400[_0x32f139(0x183)]===_0x32f139(0x1a0))await handleSDKOutput(_0x1503ef,_0x23d400);else{if(!process[_0x32f139(0x25e)][_0x32f139(0x265)]||_0x23d400[_0x32f139(0x25b)]){if(_0x1503ef[_0x32f139(0x289)]===0x0){if(_0x49ae32&&_0x24e4f0)console[_0x32f139(0x188)](_0x32f139(0x2c1)+_0x49ae32+'.'+_0x24e4f0);else _0x49ae32?console['log'](_0x32f139(0x282)+_0x49ae32):console[_0x32f139(0x188)](_0x32f139(0x14e));}else{const _0x29ca70=_0x23d400[_0x32f139(0x298)],_0x126a80=this[_0x32f139(0x194)](_0x1503ef,_0x29ca70);_0x23d400[_0x32f139(0x25b)]?await writeOutput(_0x126a80,_0x23d400[_0x32f139(0x25b)],_0x32f139(0x1ff)):console[_0x32f139(0x188)](_0x126a80);}!_0x49ae32&&(console[_0x32f139(0x29e)](''),console[_0x32f139(0x29e)](a54_0x22d6d4[_0x32f139(0x149)](_0x32f139(0x22d))),console['error'](a54_0x22d6d4[_0x32f139(0x149)](_0x32f139(0x2b0))+'or'+a54_0x22d6d4[_0x32f139(0x149)](_0x32f139(0x179))));}else{if(_0x1503ef[_0x32f139(0x289)]===0x0){if(_0x49ae32&&_0x24e4f0)console[_0x32f139(0x188)]('No\x20sessions\x20found\x20for:\x20'+_0x49ae32+'.'+_0x24e4f0);else _0x49ae32?console[_0x32f139(0x188)](_0x32f139(0x282)+_0x49ae32):console[_0x32f139(0x188)](_0x32f139(0x14e));}else await this[_0x32f139(0x269)](_0x1503ef,_0xdcfce0,_0x49ae32);}}return 0x0;}[a54_0x2cd64f(0x194)](_0x3ab2ab,_0x3e3cd2){const _0x4900c3=a54_0x2cd64f,_0x580995=[],_0x37eea2=new Map();let _0x3761a2=Infinity,_0x47ef47=-Infinity;for(const _0x4aa297 of _0x3ab2ab){if(_0x4aa297[_0x4900c3(0x29a)]?.[_0x4900c3(0x215)]){const _0x5ae4d0=new Date(_0x4aa297[_0x4900c3(0x29a)][_0x4900c3(0x215)])['getTime'](),_0x1a9c1c=_0x4aa297[_0x4900c3(0x29a)][_0x4900c3(0x20f)]?new Date(_0x4aa297[_0x4900c3(0x29a)][_0x4900c3(0x20f)])[_0x4900c3(0x20d)]():Date[_0x4900c3(0x2ab)](),_0x5c0a09=_0x4aa297['project']?.[_0x4900c3(0x131)]||_0x4900c3(0x2d8);!_0x37eea2[_0x4900c3(0x2cb)](_0x5c0a09)&&_0x37eea2[_0x4900c3(0x257)](_0x5c0a09,[]),_0x37eea2[_0x4900c3(0x190)](_0x5c0a09)[_0x4900c3(0x2a3)]({'session':_0x4aa297,'startTime':_0x5ae4d0,'endTime':_0x1a9c1c,'duration':_0x1a9c1c-_0x5ae4d0}),_0x3761a2=Math[_0x4900c3(0x228)](_0x3761a2,_0x5ae4d0),_0x47ef47=Math[_0x4900c3(0x123)](_0x47ef47,_0x1a9c1c);}}if(_0x37eea2['size']===0x0)return _0x4900c3(0x16f);const _0x2ff0d8=process[_0x4900c3(0x25e)][_0x4900c3(0x26d)]||0x78,_0x1a1782=0x1e,_0x16a8e9=0x32,_0x2fa31f=0x4,_0x475cf4=Math['min'](_0x16a8e9,Math[_0x4900c3(0x123)](_0x1a1782,Math['floor'](_0x2ff0d8*0.3))),_0x5ab025=_0x2ff0d8-_0x475cf4-TIMELINE_CONFIG[_0x4900c3(0x273)]-0x3-_0x2fa31f,_0x28b62c=_0x47ef47-_0x3761a2,_0xf67662=_0x28b62c/_0x475cf4,_0x2f0712=renderTimeAxis({'startTime':_0x3761a2,'endTime':_0x47ef47,'durationMs':_0x28b62c,'msPerChar':_0xf67662},_0x475cf4),_0x4ca95d=[];for(const _0x59f49f of _0x37eea2['values']()){_0x4ca95d[_0x4900c3(0x2a3)](..._0x59f49f);}_0x4ca95d[_0x4900c3(0x19b)]((_0x338d2e,_0x4e2ec4)=>_0x4e2ec4['startTime']-_0x338d2e[_0x4900c3(0x1e7)]);const _0x10454b=new Date(_0x3761a2),_0x506a8f=formatDate(_0x10454b),_0x6b9184=_0x2fa31f+TIMELINE_CONFIG[_0x4900c3(0x144)]+TIMELINE_CONFIG['ICON_SPACING']+_0x5ab025,_0x282d17='\x20'[_0x4900c3(0x243)](_0x6b9184-_0x506a8f[_0x4900c3(0x289)]),_0x211cb5=_0x282d17+a54_0x22d6d4['dim'](_0x506a8f)+'\x20'+_0x2f0712;_0x580995['push'](_0x211cb5);const _0x1f7991=0x16;let _0x535c8a=0x0;for(const _0x2e7b1f of _0x4ca95d){const _0x275993=_0x2e7b1f[_0x4900c3(0x218)][_0x4900c3(0x241)]?.[_0x4900c3(0x131)]||'?',_0x56469b=Math[_0x4900c3(0x228)](stringWidth(_0x275993),_0x1f7991);_0x535c8a=Math[_0x4900c3(0x123)](_0x535c8a,_0x56469b);}for(const _0x39e162 of _0x4ca95d){const {session:_0x2a7e3e,startTime:_0x24de22,endTime:_0x2de8a8,duration:_0x202801}=_0x39e162,_0x2dca00=_0x2a7e3e[_0x4900c3(0x241)]?.['id'],_0x596446=_0x2a7e3e['id'],_0x31ac3f=_0x2a7e3e[_0x4900c3(0x241)]?.[_0x4900c3(0x131)]||'?',_0x8179ad=_0x2a7e3e[_0x4900c3(0x199)]?.[_0x4900c3(0x131)]||'?';let _0x529d7a,_0x50a1e6;if(_0x2a7e3e[_0x4900c3(0x29a)]){const _0x25ff4a=_0x2a7e3e[_0x4900c3(0x29a)];!_0x25ff4a[_0x4900c3(0x1d7)]?(_0x529d7a=_0x25ff4a[_0x4900c3(0x256)]?'🛑':'🔄',_0x50a1e6=_0x25ff4a[_0x4900c3(0x256)]?a54_0x22d6d4[_0x4900c3(0x1d6)]:a54_0x22d6d4[_0x4900c3(0x176)]):(_0x529d7a=_0x25ff4a[_0x4900c3(0x197)]?'✅':'❌',_0x50a1e6=_0x25ff4a['success']?a54_0x22d6d4[_0x4900c3(0x145)]:a54_0x22d6d4['red']);}else _0x529d7a='⏳',_0x50a1e6=a54_0x22d6d4['dim'];const _0x26bda2='#'+_0x596446,_0x3457d7=_0x2dca00?hyperlink(_0x26bda2,getWorkflowSessionUrl(_0x3e3cd2,_0x2dca00,_0x596446)):_0x26bda2;let _0x4e9b67=_0x31ac3f;stringWidth(_0x31ac3f)>_0x1f7991&&(_0x4e9b67=_0x31ac3f[_0x4900c3(0x1ba)](0x0,_0x1f7991-0x1)+'…');const _0x1bcb34=a54_0x22d6d4[_0x4900c3(0x149)](_0x4e9b67),_0x27ed37=stringWidth(_0x4e9b67),_0x48a895='\x20'[_0x4900c3(0x243)](_0x535c8a-stringWidth(_0x4e9b67)+0x2),_0x4ec415='('+formatElapsed(_0x202801)+')',_0x5bda9e=stringWidth(_0x4ec415),_0x53f777=stringWidth(_0x26bda2),_0x3aaff6=_0x53f777+0x1+_0x27ed37+_0x48a895[_0x4900c3(0x289)],_0x367439=_0x5ab025-_0x3aaff6-_0x5bda9e-0x1-0x8;let _0x5b40db=_0x8179ad;stringWidth(_0x5b40db)>_0x367439&&(_0x5b40db=_0x5b40db[_0x4900c3(0x1ba)](0x0,_0x367439-0x1)+'…');const _0x36fc40=_0x3457d7+'\x20'+_0x1bcb34+_0x48a895+_0x5b40db,_0x4abdb3=stringWidth(_0x36fc40),_0x4693f5=_0x5ab025-_0x4abdb3-_0x5bda9e,_0x361d97=_0x36fc40+'\x20'[_0x4900c3(0x243)](Math[_0x4900c3(0x123)](0x1,_0x4693f5))+a54_0x22d6d4[_0x4900c3(0x149)](_0x4ec415),_0x1a7ee4=Math[_0x4900c3(0x180)]((_0x24de22-_0x3761a2)/_0xf67662),_0x2eaf82=Math[_0x4900c3(0x180)]((_0x2de8a8-_0x3761a2)/_0xf67662),_0xbae08d=Math[_0x4900c3(0x123)](_0x1a7ee4+0x1,_0x2eaf82),_0x549234=new Array(_0x475cf4)['fill']('\x20');for(let _0x5e9a88=_0x1a7ee4;_0x5e9a88<Math[_0x4900c3(0x228)](_0xbae08d,_0x475cf4);_0x5e9a88++){_0x549234[_0x5e9a88]='─';}const _0x590f29=_0x549234['map'](_0x39a799=>_0x39a799==='\x20'?'\x20':_0x50a1e6(_0x39a799))[_0x4900c3(0x184)]('');_0x580995[_0x4900c3(0x2a3)](_0x529d7a+'\x20'+_0x361d97+'│'+_0x590f29+'│');}return _0x580995[_0x4900c3(0x184)]('\x0a');}async[a54_0x2cd64f(0x269)](_0xa140e2,_0x51412a,_0x843235){const _0x3f269e=a54_0x2cd64f,{options:_0x3aee71,tdx:_0x148e3e}=_0x51412a,_0x112869=_0x3aee71[_0x3f269e(0x298)],{timelineRows:_0x87d705,timeAxisHeader:_0x3dcff1}=this[_0x3f269e(0x1bc)](_0xa140e2,_0x112869),_0x29b794=_0x87d705[_0x3f269e(0x299)](_0x23a53b=>_0x23a53b[_0x3f269e(0x20c)]);if(_0x29b794[_0x3f269e(0x289)]===0x0){const _0x4b8eff=this['renderSessionsTimeline'](_0xa140e2,_0x112869);console[_0x3f269e(0x188)](_0x4b8eff);!_0x843235&&(console[_0x3f269e(0x29e)](''),console[_0x3f269e(0x29e)](a54_0x22d6d4[_0x3f269e(0x149)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a54_0x22d6d4['dim'](_0x3f269e(0x2b0))+'or'+a54_0x22d6d4[_0x3f269e(0x149)](_0x3f269e(0x179))));return;}_0x3dcff1&&console['log'](_0x3dcff1);const _0x16ea14=_0x87d705[_0x3f269e(0x299)](_0x405727=>_0x405727['attemptId'])[_0x3f269e(0x245)](_0x38cc3f=>({'title':_0x38cc3f[_0x3f269e(0x14f)],'value':_0x38cc3f['attemptId']})),_0x4ae877=process[_0x3f269e(0x25e)][_0x3f269e(0x28f)]||0x3c,_0x17a1ed=Math[_0x3f269e(0x123)](0x28,Math['floor'](_0x4ae877*0x2/0x3)),_0x348864=await a54_0xbf6bfc({'type':_0x3f269e(0x1b6),'name':_0x3f269e(0x20c),'message':_0x3f269e(0x16b),'choices':_0x16ea14,'initial':-0x1,'limit':_0x17a1ed,'clearFirst':!![],'fallback':{'title':_0x3f269e(0x24c),'value':null},'suggest':(_0x2a8f63,_0x406adc)=>{const _0x7e399e=_0x3f269e;if(!_0x2a8f63)return Promise[_0x7e399e(0x1b4)](_0x406adc);const _0x22c985=_0x406adc['filter'](_0x1243f9=>{const _0xe1a496=_0x7e399e,_0x361130=_0x1243f9;return _0x361130[_0xe1a496(0x1d4)]['toLowerCase']()[_0xe1a496(0x2d5)](_0x2a8f63['toLowerCase']());});return Promise[_0x7e399e(0x1b4)](_0x22c985);}}),_0x26495a=()=>{const _0x534a91=_0x3f269e;process[_0x534a91(0x25e)][_0x534a91(0x139)](_0x534a91(0x292)),process[_0x534a91(0x25e)]['write'](_0x534a91(0x292)),process[_0x534a91(0x25e)][_0x534a91(0x139)](_0x534a91(0x292));},_0x49f5e5=_0x348864&&_0x348864[_0x3f269e(0x20c)]&&_0x348864[_0x3f269e(0x20c)]!==null&&_0x348864[_0x3f269e(0x20c)][_0x3f269e(0x17f)]()!=='';if(!_0x49f5e5){_0x26495a(),console[_0x3f269e(0x188)](a54_0x22d6d4[_0x3f269e(0x149)]('Cancelled'));return;}_0x26495a();const _0x1be71d=_0xa140e2[_0x3f269e(0x240)](_0x2efabf=>_0x2efabf[_0x3f269e(0x29a)]?.['id']===_0x348864[_0x3f269e(0x20c)]);if(_0x1be71d){const _0x16daa4=_0x1be71d[_0x3f269e(0x241)]?.['name']||'?',_0x2936b5=_0x1be71d[_0x3f269e(0x199)]?.['name']||'?';console[_0x3f269e(0x188)](_0x3f269e(0x26e)+a54_0x22d6d4['dim'](_0x16daa4)+_0x3f269e(0x2a9)+a54_0x22d6d4[_0x3f269e(0x149)](_0x2936b5));}const _0x2a04a2=new WorkflowTimelineCommand();await _0x2a04a2[_0x3f269e(0x223)]({'args':[],'options':{..._0x3aee71,'attemptId':_0x348864[_0x3f269e(0x20c)]},'tdx':_0x148e3e});}[a54_0x2cd64f(0x1bc)](_0xe47c35,_0x35edad){const _0x3b6c73=a54_0x2cd64f,_0x1c1196=new Map();for(const _0x5e0f6c of _0xe47c35){_0x5e0f6c['id']&&_0x5e0f6c['lastAttempt']?.['id']&&_0x1c1196[_0x3b6c73(0x257)](_0x5e0f6c['id'],_0x5e0f6c['lastAttempt']['id']);}const _0xc9573a=[];let _0xe3ab94='';const _0x2e7139=this[_0x3b6c73(0x194)](_0xe47c35,_0x35edad),_0x246010=_0x2e7139[_0x3b6c73(0x1d5)]('\x0a');for(const _0x2b89ff of _0x246010){if(_0x2b89ff[_0x3b6c73(0x1c4)](_0x3b6c73(0x162))||_0x2b89ff[_0x3b6c73(0x28d)](/^\s+\d{4}-\d{2}-\d{2}/))_0xe3ab94=_0x2b89ff;else{if(_0x2b89ff[_0x3b6c73(0x28d)](/^[✅❌🔄🛑⏳]/)){const _0xe60bcb=_0x2b89ff[_0x3b6c73(0x28d)](/#(\d+)/),_0xf6fbf0=_0xe60bcb?_0xe60bcb[0x1]:null,_0x3634ed=_0xf6fbf0?_0x1c1196[_0x3b6c73(0x190)](_0xf6fbf0)||null:null,_0x427f68=_0xe47c35['find'](_0x2c749b=>_0x2c749b['id']===_0xf6fbf0),_0x13d5c3=_0x427f68?.[_0x3b6c73(0x241)]?.[_0x3b6c73(0x131)]||'';_0xc9573a[_0x3b6c73(0x2a3)]({'displayLine':_0x2b89ff,'attemptId':_0x3634ed,'projectName':_0x13d5c3});}}}return{'timelineRows':_0xc9573a,'timeAxisHeader':_0xe3ab94};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x1f5);[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x12e);async[a54_0x2cd64f(0x223)](_0x188b70){const _0x104d96=a54_0x2cd64f,{options:_0x22cd0d,args:_0x57881b,tdx:_0x4c8cf1}=_0x188b70,_0x3e2e3e=this[_0x104d96(0x15f)](_0x57881b,_0x22cd0d);if(!_0x3e2e3e)return 0x1;const {projectName:_0x24601b,workflowName:_0x287c11}=_0x3e2e3e,_0x3a9ebd=_0x22cd0d[_0x104d96(0x178)];if(_0x22cd0d[_0x104d96(0x20a)]){if(_0x24601b&&_0x287c11)console['error'](_0x104d96(0x1f8)+_0x24601b+'.'+_0x287c11);else _0x24601b&&console[_0x104d96(0x29e)]('Filter:\x20project='+_0x24601b);_0x3a9ebd&&console[_0x104d96(0x29e)]('Include\x20retried:\x20yes');}const _0x123526=await withSpinner(_0x104d96(0x19a),()=>_0x4c8cf1[_0x104d96(0x199)][_0x104d96(0x200)]({'projectName':_0x24601b,'workflowName':_0x287c11,'includeRetried':_0x3a9ebd,'limit':_0x22cd0d['limit']}),{'verbose':_0x22cd0d[_0x104d96(0x20a)]}),_0x4c3239=_0x123526[_0x104d96(0x1e5)],_0x34ac21=_0x22cd0d['limit']||0x64,_0x11ea92=_0x4c3239[_0x104d96(0x289)]>=_0x34ac21?a54_0x22d6d4['dim'](_0x104d96(0x134)):'';console[_0x104d96(0x29e)](_0x104d96(0x125)+_0x4c3239[_0x104d96(0x289)]+_0x104d96(0x28c)+(_0x4c3239[_0x104d96(0x289)]!==0x1?'s':'')+_0x11ea92);if(_0x22cd0d[_0x104d96(0x183)]==='json'||_0x22cd0d[_0x104d96(0x183)]===_0x104d96(0x2c6)||_0x22cd0d[_0x104d96(0x183)]===_0x104d96(0x1a0))await handleSDKOutput(_0x4c3239,_0x22cd0d);else{if(_0x4c3239[_0x104d96(0x289)]===0x0){if(_0x24601b&&_0x287c11)console[_0x104d96(0x188)](_0x104d96(0x27a)+_0x24601b+'.'+_0x287c11);else _0x24601b?console[_0x104d96(0x188)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x24601b):console['log']('No\x20attempts\x20found');}else{const _0x410583=_0x22cd0d[_0x104d96(0x298)],_0x437b2d=_0x4c3239[_0x104d96(0x245)](_0x22aaca=>{const _0x2abb41=_0x104d96,_0x330319=a54_0x22d6d4[_0x2abb41(0x149)]('#'+_0x22aaca['id']),_0x360468=_0x22aaca[_0x2abb41(0x241)]?.['id'],_0x421885=_0x22aaca[_0x2abb41(0x21f)]||_0x22aaca[_0x2abb41(0x1a9)],_0x1590c3=_0x360468&&_0x421885?hyperlink(_0x330319,getWorkflowAttemptUrl(_0x410583,_0x360468,_0x421885,_0x22aaca['id'])):_0x330319,{icon:_0x4f2f7c,text:_0x48bffd}=getAttemptStatusDisplay(_0x22aaca),_0x1fab0f=(_0x22aaca[_0x2abb41(0x241)]?.['name']||'?')+'.'+(_0x22aaca[_0x2abb41(0x199)]?.[_0x2abb41(0x131)]||'?'),_0x2c18b6=_0x22aaca[_0x2abb41(0x1ea)]?a54_0x22d6d4[_0x2abb41(0x149)](_0x22aaca[_0x2abb41(0x1ea)]):'';return(_0x1590c3+'\x20'+_0x4f2f7c+(_0x48bffd?'\x20'+_0x48bffd:'')+'\x20'+_0x1fab0f+'\x20'+_0x2c18b6)[_0x2abb41(0x1f7)]();});await writeOutput(_0x437b2d[_0x104d96(0x184)]('\x0a'),_0x22cd0d[_0x104d96(0x25b)],_0x104d96(0x1ff));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x2c3);['description']=a54_0x2cd64f(0x13a);async['execute'](_0x4b3cf8){const _0x2df1d9=a54_0x2cd64f,{options:_0x32a03c,args:_0x48c5ec,tdx:_0x79fd54}=_0x4b3cf8,_0x427c1d=_0x48c5ec[0x0];if(!_0x427c1d)return console[_0x2df1d9(0x29e)](_0x2df1d9(0x221)),0x1;_0x32a03c[_0x2df1d9(0x20a)]&&console[_0x2df1d9(0x29e)](_0x2df1d9(0x2c5)+_0x427c1d);const _0x4d3079=await withSpinner(_0x2df1d9(0x1b3),()=>_0x79fd54[_0x2df1d9(0x199)][_0x2df1d9(0x293)](_0x427c1d),{'verbose':_0x32a03c[_0x2df1d9(0x20a)]}),_0x22dbab=_0x4d3079[_0x2df1d9(0x1e5)];let _0xcd40a5;!_0x22dbab[_0x2df1d9(0x1d7)]?_0xcd40a5=_0x22dbab[_0x2df1d9(0x256)]?_0x2df1d9(0x1cb):_0x2df1d9(0x1f0):_0xcd40a5=_0x22dbab['success']?_0x2df1d9(0x197):_0x2df1d9(0x29e);let _0x3469cb;if(_0x22dbab[_0x2df1d9(0x215)]&&_0x22dbab[_0x2df1d9(0x20f)]){const _0x52fc68=new Date(_0x22dbab[_0x2df1d9(0x215)])['getTime'](),_0x186e77=new Date(_0x22dbab['finishedAt'])['getTime']();_0x3469cb=Math['round']((_0x186e77-_0x52fc68)/0x3e8);}const _0x1a8976={'attempt_id':_0x22dbab['id'],'status':_0xcd40a5,..._0x22dbab[_0x2df1d9(0x284)]!==undefined&&{'index':_0x22dbab[_0x2df1d9(0x284)]},..._0x22dbab[_0x2df1d9(0x241)]&&{'project':_0x22dbab['project'][_0x2df1d9(0x131)]},..._0x22dbab['workflow']&&{'workflow':_0x22dbab[_0x2df1d9(0x199)][_0x2df1d9(0x131)]},..._0x22dbab[_0x2df1d9(0x1a9)]&&{'session_id':_0x22dbab[_0x2df1d9(0x1a9)]},..._0x22dbab[_0x2df1d9(0x1ea)]&&{'session_time':_0x22dbab['sessionTime']},..._0x22dbab[_0x2df1d9(0x2d6)]&&{'retry_attempt':_0x22dbab[_0x2df1d9(0x2d6)]},..._0x3469cb!==undefined&&{'duration_sec':_0x3469cb},..._0x22dbab['createdAt']&&{'created_at':_0x22dbab['createdAt']},..._0x22dbab[_0x2df1d9(0x20f)]&&{'finished_at':_0x22dbab[_0x2df1d9(0x20f)]},...Object[_0x2df1d9(0x140)](_0x22dbab[_0x2df1d9(0x1a4)])['length']>0x0&&{'params':_0x22dbab[_0x2df1d9(0x1a4)]}};return await handleSingleObjectOutput(_0x1a8976,_0x32a03c),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x21d);[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x14a);async[a54_0x2cd64f(0x223)](_0x2d65f8){const _0x5828ef=a54_0x2cd64f,{options:_0x527625,args:_0xede4f9,tdx:_0xef582c}=_0x2d65f8,_0x30753b=_0xede4f9[0x0];if(!_0x30753b)return console['error'](_0x5828ef(0x221)),0x1;const _0xfbbbea=_0x527625['includeSubtasks'];_0x527625[_0x5828ef(0x20a)]&&(console[_0x5828ef(0x29e)](_0x5828ef(0x2c5)+_0x30753b),_0xfbbbea&&console[_0x5828ef(0x29e)](_0x5828ef(0x138)));const _0x2d9f1b=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0xef582c['workflow']['tasks'](_0x30753b,_0xfbbbea||![]),{'verbose':_0x527625[_0x5828ef(0x20a)]}),_0x3d3257=_0x2d9f1b[_0x5828ef(0x1e5)];return console['error'](_0x5828ef(0x125)+_0x3d3257[_0x5828ef(0x289)]+_0x5828ef(0x25a)+(_0x3d3257[_0x5828ef(0x289)]!==0x1?'s':'')),await handleSDKOutput(_0x3d3257,_0x527625),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x250);[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x279);async['execute'](_0x21acbb){const _0x559c69=a54_0x2cd64f,{options:_0x4f30ad,args:_0x24c626,tdx:_0x2c83eb}=_0x21acbb,_0x34bd12=_0x24c626[0x0];let _0x26a98c=_0x24c626[0x1];if(!_0x34bd12)return console[_0x559c69(0x29e)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x4f30ad[_0x559c69(0x20a)]&&(console[_0x559c69(0x29e)]('Attempt\x20ID:\x20'+_0x34bd12),_0x26a98c&&console[_0x559c69(0x29e)]('Task\x20name:\x20'+_0x26a98c));const _0xb9968a=await withSpinner(_0x559c69(0x1c9),()=>_0x2c83eb[_0x559c69(0x199)]['logFiles'](_0x34bd12,_0x26a98c),{'verbose':_0x4f30ad['verbose']}),_0x4fd57c=_0xb9968a[_0x559c69(0x1e5)];if(_0x4fd57c['length']===0x0)return console[_0x559c69(0x29e)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x26a98c&&(_0x4f30ad[_0x559c69(0x175)]||_0x4f30ad['format']))return await handleSDKOutput(_0x4fd57c,_0x4f30ad),0x0;if(!_0x26a98c){const _0x49df61=_0x4fd57c[_0x559c69(0x245)](_0x3953cc=>({'title':_0x3953cc[_0x559c69(0x2a7)]+'\x20('+formatBytes(_0x3953cc[_0x559c69(0x2b3)])+')','value':_0x3953cc[_0x559c69(0x2a7)]})),_0x54c5fb=await a54_0xbf6bfc({'type':_0x559c69(0x15c),'name':'task','message':_0x559c69(0x209),'choices':_0x49df61});if(!_0x54c5fb[_0x559c69(0x1ca)])return console[_0x559c69(0x29e)](_0x559c69(0x17e)),0x0;_0x26a98c=_0x54c5fb['task'];}const _0x121a13=await withSpinner(_0x559c69(0x2ac),()=>_0x2c83eb[_0x559c69(0x199)][_0x559c69(0x263)](_0x34bd12,_0x26a98c),{'verbose':_0x4f30ad['verbose']}),_0x39d3d1=_0x121a13[_0x559c69(0x1e5)];return _0x39d3d1?console['log'](_0x39d3d1):console[_0x559c69(0x29e)](_0x559c69(0x2b5)),0x0;}}function a54_0x52df(){const _0x2b6bf6=['autocomplete','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Analyzing\x20changes...','slice','\x20of\x20','generateSessionTimelineRows','✔\x20Downloaded\x20','Select\x20a\x20session\x20to\x20view\x20timeline:','skipValidation','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Loading\x20workflows...','unchanged','\x20\x20Console:\x20','startsWith','Session\x20','Target\x20directory:\x20','delete','Parameters:\x20','Fetching\x20log\x20files...','task','canceling','Error:\x20Project\x20name\x20is\x20required','workflow:timeline','resolveProjectDir','workflow:secrets:set','---\x20','\x20\x20Project\x20ID:\x20','context','/app/workflows/','title','split','yellow','done','Force:\x20yes','Attempt:\x20','attempt:','modified','relative','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x22\x20already\x20exists\x20(ID:\x20','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','setSecrets','requireProject','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Loading\x20session...','getMonth','data','Target:\x20','startTime','getHours','\x20unchanged','sessionTime','\x20\x20Source:\x20','Key:\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','total','running','Key\x20cannot\x20be\x20empty','workflow:sessions','group_error','\x20secret','workflow:attempts','MAX_TIMELINE_WIDTH','trimEnd','Filter:\x20','Resume\x20from:\x20','\x0aPolling...\x20(','Project\x20directory:\x20','Source:\x20','Listing\x20secrets...','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','list','attempts','No\x20workflow\x20projects\x20found','\x20logs','\x0a⚠\x20Project\x20\x22','changes','dryRun','Latest\x20session\x20has\x20no\x20attempt','\x22\x20to\x20new\x20project\x20\x22','MIN_TIMELINE_WIDTH','Select\x20a\x20task\x20to\x20view\x20logs:','verbose','unknown','attemptId','getTime','✔\x20Retry\x20started','finishedAt','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Total:\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','projectId','/sessions/','createdAt','Kill\x20a\x20running\x20attempt','fromTask','session','/attempt/','startedAt','TASK_NAME_WIDTH','Tip:\x20cd\x20to\x20workflows/','workflow:tasks','-\x20nothing\x20pushed','session_id','Revision:\x20','Error:\x20Attempt\x20ID\x20is\x20required','workflow:use','execute','Project\x20name\x20is\x20required','Error:\x20Secret\x20key\x20is\x20required','revision:\x20','sys','min','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','workflow:upload','new','✔\x20Project\x20updated','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','planned','workflowProject','208108XzLTOq','state','workflow:download','path','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','(use\x20--limit\x20to\x20see\x20more)','toISOString','end','isDirectory','cwd','Killing\x20attempt...','MIN_LABEL_COUNT','MAX_TASKS_DISPLAY','\x20new','buildTimelineData','find','project','newProjectName','repeat','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','map','\x20deleted','Start\x20a\x20workflow\x20run','metadata','\x20\x20Session\x20ID:\x20','limit','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','No\x20matching\x20sessions\x20found','No\x20workflows\x20found\x20in\x20project:\x20','Listing\x20workflow\x20sessions...','Files\x20to\x20upload:\x20','workflow:logs','message','workflowName','getMinutes','Invalid\x20format:\x20','padStart','cancelRequested','set','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','\x20tasks','\x20task','output','Error:\x20Invalid\x20parameter\x20format:\x20','\x0aUpdate\x20existing\x20project\x20\x22','stdout','3OwsQzA','Auto-selected\x20latest\x20session:\x20','Reason:\x20','📁\x20','logs','✔\x20Pull\x20complete','isTTY','1471648ysmKqO','✔\x20Workflow\x20project\x20context\x20cleared.','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','navigateSessionsInteractive','✔\x20Secret\x20\x27','108gYHJUp','type','columns','Project:\x20','tdx\x20wf\x20attempt\x20','from','Retrying\x20attempt...','sessions','GUTTER','fullName','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','workflow:kill','start','white','Show\x20logs\x20for\x20a\x20workflow\x20attempt','No\x20attempts\x20found\x20for:\x20','durationMs','updatedAt','8245770Ysycaz','workflow:workflows','projects','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','tdx.json','No\x20sessions\x20found\x20in\x20project:\x20','some','index','20001047mLSHbz','MAX_LABEL_COUNT','MAX_POLL_ITERATIONS','💡\x20Tip:\x20Use\x20','length','Setting\x20','resolveProjectId','\x20attempt','match','resolveProject','rows','Resolving\x20project\x20\x27','diff','\x1b[1A\x1b[2K','attempt','Deleting\x20project\x20','existingProjectId','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','red','site','filter','lastAttempt','\x0a✔\x20Already\x20up\x20to\x20date','status','showWorkflowConsoleUrl','error','\x20to\x20see\x20detailed\x20logs','key','replace','No\x20projects\x20match\x20pattern:\x20','push','ICON_SPACING','91062cfBKZA','Usage:\x20workflow:delete\x20<project-name-or-id>','taskName','List\x20all\x20workflow\x20projects',',\x20Workflow:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','now','Downloading\x20logs...','Writing\x20files...','renderTimeline','List\x20workflow\x20execution\x20sessions','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','executePushProject','fileSize','localeCompare','No\x20log\x20content\x20found','Validation:\x20skipped','\x20secrets...','4829111GGvnyb','run','Failed\x20to\x20fetch\x20attempt\x20data','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','duration','Pattern:\x20','Project\x20name:\x20','Deleting\x20secret...','No\x20sessions\x20found\x20for:\x20','\x20\x20Files\x20extracted:\x20','workflow:attempt','msPerChar','Attempt\x20ID:\x20','jsonl','\x20\x20Revision:\x20','Updating\x20','preparePushProject','sourceDir','has','Cloning\x20to\x20','stringify','⚠\x20Showing\x20first\x20','revision','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','isNewProject','✔\x20Showing\x20','288955SgLmMS','listSecrets','includes','retryAttemptName','\x20\x20Changes:\x20','(unknown)','6KMxxJe','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','max','hasChanges','✔\x20Found\x20','Pushing\x20project...','getFullYear','\x20workflow','LABEL_MIN_SPACING','targetDir','isArray','Output\x20directory:\x20','readFile','List\x20workflow\x20attempts','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','name','\x20\x20Project:\x20','📋\x20','\x20(use\x20--limit\x20to\x20show\x20more)','-\x20no\x20files\x20written','POLL_INTERVAL_MS','getDate','Including\x20subtasks:\x20yes','write','Show\x20specific\x20attempt\x20details','→\x20Project:\x20','\x20\x20New\x20attempt\x20ID:\x20','\x27\x20from\x20project\x20\x27','summary','workflows','keys','targetExists','Listing\x20workflows...','Dry\x20run:\x20yes','ICON_WIDTH','green','Loading\x20sessions...','List\x20workflows','retrySession','dim','Show\x20tasks\x20for\x20an\x20attempt','tasks','Listing\x20workflow\x20projects...','...','No\x20sessions\x20found','displayLine','\x22\x20with\x20new\x20revision?','264kyivJT','parse','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','pollTimeline','→\x20New\x20project:\x20','workflow:secrets:delete','\x20modified','\x20\x20Target:\x20','cyan','value','\x20-\x20','select','\x20from\x20session\x20','New\x20project\x20name:\x20','parseProjectWorkflowPattern','every','workflow:retry','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','\x0a✔\x20Attempt\x20complete','renderSingleTimeline','\x22?\x20This\x20cannot\x20be\x20undone.','description','fileCount','✔\x20Clone\x20complete','No\x20workflows\x20found','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','newProjectId','indexOf','Source\x20directory\x20is\x20required','No\x20sessions\x20with\x20timing\x20information','\x0aPush\x20these\x20changes?','Pull\x20workflow\x20project\x20to\x20local\x20folder','sourceProjectName','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','LABEL_WIDTH_DIVISOR','json','blue','clear','includeRetried','\x20\x20tdx\x20wf\x20use\x20<project>','\x20\x20Location:\x20','From\x20task:\x20','\x20\x20Workflow:\x20','✔\x20Project:\x20','Cancelled','trim','floor','workflow:projects','\x0aError:','format','join','Error:\x20Invalid\x20JSON\x20in\x20--params','yes','Session\x20time:\x20','log','Error:\x20','prepareCloneProject','\x20project','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','retryAttempt','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','download','get','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Pulling\x20project\x20','Warning:','renderSessionsTimeline','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','success','Source\x20project:\x20','workflow','Listing\x20workflow\x20attempts...','sort','applyPullProject','window','Select\x20a\x20workflow\x20to\x20run','Secrets\x20to\x20set:\x20','table','Session\x20not\x20found:\x20','substring','follow','params','Analyzing\x20project...','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Starting\x20workflow\x20run...','Retrying\x20session...','sessionId','\x27...','\x20\x20Session\x20context\x20set\x20to:\x20','workflow:delete','✔\x20Workflow\x20run\x20started','Error:','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Setting\x20secret...','Params:\x20','projectName','Getting\x20attempt\x20details...','resolve','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]'];a54_0x52df=function(){return _0x2b6bf6;};return a54_0x52df();}export class WorkflowKillCommand extends BaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x276);['description']=a54_0x2cd64f(0x216);async[a54_0x2cd64f(0x223)](_0x21d8e0){const _0x337fd8=a54_0x2cd64f,{options:_0x4e7e73,args:_0x485f75,tdx:_0x4cb7b2}=_0x21d8e0,_0x16a5d8=_0x485f75[0x0];if(!_0x16a5d8)return console['error'](_0x337fd8(0x221)),0x1;const _0x45783b=_0x4e7e73['reason'];_0x4e7e73[_0x337fd8(0x20a)]&&(console['error'](_0x337fd8(0x2c5)+_0x16a5d8),_0x45783b&&console[_0x337fd8(0x29e)](_0x337fd8(0x261)+_0x45783b));if(!_0x4e7e73[_0x337fd8(0x186)]){if(!isInteractive())return console[_0x337fd8(0x29e)](a54_0x22d6d4[_0x337fd8(0x297)](_0x337fd8(0x182)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x337fd8(0x29e)](a54_0x22d6d4[_0x337fd8(0x149)](_0x337fd8(0x18e))),0x1;const _0x2fe177=await confirmKey(_0x337fd8(0x244)+_0x16a5d8+'?');if(!_0x2fe177)return console['error'](a54_0x22d6d4[_0x337fd8(0x1d6)](_0x337fd8(0x17e))),0x1;}const _0x37ef9e=await withSpinner(_0x337fd8(0x23b),()=>_0x4cb7b2[_0x337fd8(0x199)]['kill'](_0x16a5d8,_0x45783b),{'verbose':_0x4e7e73[_0x337fd8(0x20a)]}),_0x4641ae=_0x37ef9e[_0x337fd8(0x1e5)];return console['error']('✔\x20'+_0x4641ae),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x161);[a54_0x2cd64f(0x167)]='Retry\x20a\x20session\x20or\x20attempt';async[a54_0x2cd64f(0x223)](_0x1b516d){const _0x379b91=a54_0x2cd64f,{options:_0x1b75e7,args:_0x41f6a7,tdx:_0x1fab3a}=_0x1b516d,_0x26f3cb=_0x41f6a7[0x0];if(!_0x26f3cb)return console['error'](_0x379b91(0x1af)),console['error'](_0x379b91(0x18c)),0x1;let _0x5cc33d=![],_0x35a490=_0x26f3cb;if(_0x26f3cb[_0x379b91(0x1c4)]('session:'))_0x5cc33d=!![],_0x35a490=_0x26f3cb[_0x379b91(0x1a2)](0x8);else{if(_0x26f3cb[_0x379b91(0x1c4)](_0x379b91(0x1da)))_0x5cc33d=![],_0x35a490=_0x26f3cb[_0x379b91(0x1a2)](0x8);else return console[_0x379b91(0x29e)](_0x379b91(0x1dd)),console[_0x379b91(0x29e)](_0x379b91(0x18c)),0x1;}const _0x2e0831=_0x1b75e7[_0x379b91(0x217)],_0x225778=_0x1b75e7['resumeFrom'],_0x39f376=_0x1b75e7[_0x379b91(0x1a4)],_0x2d28c9=_0x1b75e7['force'];_0x1b75e7[_0x379b91(0x20a)]&&(console[_0x379b91(0x29e)](_0x379b91(0x1e6)+(_0x5cc33d?_0x379b91(0x218):_0x379b91(0x293))+'\x20'+_0x35a490),_0x2e0831&&console[_0x379b91(0x29e)](_0x379b91(0x17b)+_0x2e0831),_0x225778&&console['error'](_0x379b91(0x1f9)+_0x225778),_0x39f376&&console['error'](_0x379b91(0x1b1)+_0x39f376),_0x2d28c9&&console[_0x379b91(0x29e)](_0x379b91(0x1d8)));let _0x52a36a;if(_0x39f376)try{if(_0x39f376['startsWith']('@')){const _0x2c8e3b=await import('fs/promises'),_0x4a7e39=_0x39f376[_0x379b91(0x1a2)](0x1),_0x2cc48b=await _0x2c8e3b[_0x379b91(0x12d)](_0x4a7e39,'utf-8');_0x52a36a=JSON['parse'](_0x2cc48b);}else _0x52a36a=JSON[_0x379b91(0x152)](_0x39f376);}catch{return console[_0x379b91(0x29e)](_0x379b91(0x185)),0x1;}if(!_0x1b75e7[_0x379b91(0x186)]){if(!isInteractive())return console[_0x379b91(0x29e)](a54_0x22d6d4['red'](_0x379b91(0x182)),_0x379b91(0x24b)),console[_0x379b91(0x29e)](a54_0x22d6d4[_0x379b91(0x149)](_0x379b91(0x18e))),0x1;const _0x50f659=await confirmKey(_0x379b91(0x2bb)+(_0x5cc33d?_0x379b91(0x218):_0x379b91(0x293))+'\x20'+_0x35a490+'?');if(!_0x50f659)return console[_0x379b91(0x29e)](a54_0x22d6d4['yellow']('Cancelled')),0x1;}let _0x54a3c9;_0x5cc33d?_0x54a3c9=await withSpinner(_0x379b91(0x1a8),()=>_0x1fab3a[_0x379b91(0x199)][_0x379b91(0x148)](_0x35a490,{'fromTask':_0x2e0831,'retryParams':_0x52a36a}),{'verbose':_0x1b75e7[_0x379b91(0x20a)]}):_0x54a3c9=await withSpinner(_0x379b91(0x271),()=>_0x1fab3a[_0x379b91(0x199)][_0x379b91(0x18d)](_0x35a490,{'resumeFrom':_0x225778,'retryParams':_0x52a36a,'force':_0x2d28c9}),{'verbose':_0x1b75e7[_0x379b91(0x20a)]});const _0x4b4098=_0x54a3c9[_0x379b91(0x1e5)];return console[_0x379b91(0x29e)](_0x379b91(0x20e)),console[_0x379b91(0x29e)](_0x379b91(0x13c)+_0x4b4098['attemptId']),console[_0x379b91(0x29e)](_0x379b91(0x249)+_0x4b4098[_0x379b91(0x1a9)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]='workflow:run';['description']=a54_0x2cd64f(0x247);async[a54_0x2cd64f(0x223)](_0x4b5296){const _0x2f88cb=a54_0x2cd64f,{options:_0x3ac845,args:_0x39c05d,tdx:_0x2b6511}=_0x4b5296;let _0x365cfd=_0x39c05d[0x0];if(!_0x365cfd){const _0x4af3c9=this[_0x2f88cb(0x28e)]([],_0x3ac845),_0x531671=await withSpinner(_0x2f88cb(0x1c1),()=>_0x2b6511['workflow'][_0x2f88cb(0x13f)](_0x4af3c9,{'limit':_0x3ac845[_0x2f88cb(0x24a)]}),{'verbose':_0x3ac845[_0x2f88cb(0x20a)]}),_0x5b411f=_0x531671['data'];if(_0x5b411f[_0x2f88cb(0x289)]===0x0)return console[_0x2f88cb(0x29e)]('No\x20workflows\x20found'),!_0x4af3c9&&console[_0x2f88cb(0x29e)](a54_0x22d6d4[_0x2f88cb(0x149)](_0x2f88cb(0x1ee))),0x1;const _0x2eb562=_0x5b411f['map'](_0x2f28d3=>({'title':_0x2f28d3[_0x2f88cb(0x241)]?.['name']+'.'+_0x2f28d3['name'],'value':_0x2f28d3['project']?.[_0x2f88cb(0x131)]+'.'+_0x2f28d3[_0x2f88cb(0x131)],'description':_0x2f28d3[_0x2f88cb(0x2cf)]?_0x2f88cb(0x226)+_0x2f28d3[_0x2f88cb(0x2cf)]:undefined})),_0x341945=await a54_0xbf6bfc({'type':_0x2f88cb(0x15c),'name':_0x2f88cb(0x199),'message':_0x2f88cb(0x19e),'choices':_0x2eb562});if(!_0x341945[_0x2f88cb(0x199)])return 0x1;_0x365cfd=_0x341945[_0x2f88cb(0x199)];}if(!_0x365cfd[_0x2f88cb(0x2d5)]('.')){const _0x2682eb=this[_0x2f88cb(0x28e)]([],_0x3ac845);if(_0x2682eb)_0x365cfd=_0x2682eb+'.'+_0x365cfd;else return console[_0x2f88cb(0x29e)](a54_0x22d6d4[_0x2f88cb(0x297)](_0x2f88cb(0x1ae)),_0x2f88cb(0x275)),console[_0x2f88cb(0x29e)](a54_0x22d6d4[_0x2f88cb(0x149)](_0x2f88cb(0x1ee))),0x1;}const _0x23dda5=_0x3ac845['param'],_0x4ffc4a=_0x3ac845[_0x2f88cb(0x1ea)],_0x4cc57c={};if(_0x23dda5&&Array[_0x2f88cb(0x12b)](_0x23dda5))for(const _0x41d6b4 of _0x23dda5){const _0x3d847f=_0x41d6b4[_0x2f88cb(0x16d)]('=');if(_0x3d847f===-0x1)return console[_0x2f88cb(0x29e)](_0x2f88cb(0x25c)+_0x41d6b4),console[_0x2f88cb(0x29e)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x32ac64=_0x41d6b4[_0x2f88cb(0x1a2)](0x0,_0x3d847f),_0x4bb811=_0x41d6b4[_0x2f88cb(0x1a2)](_0x3d847f+0x1);try{_0x4cc57c[_0x32ac64]=JSON[_0x2f88cb(0x152)](_0x4bb811);}catch{_0x4cc57c[_0x32ac64]=_0x4bb811;}}_0x3ac845['verbose']&&(console['error']('Workflow:\x20'+_0x365cfd),Object[_0x2f88cb(0x140)](_0x4cc57c)[_0x2f88cb(0x289)]>0x0&&console[_0x2f88cb(0x29e)](_0x2f88cb(0x1c8)+JSON[_0x2f88cb(0x2cd)](_0x4cc57c)),_0x4ffc4a&&console[_0x2f88cb(0x29e)](_0x2f88cb(0x187)+_0x4ffc4a));const _0x56d90c=await withSpinner(_0x2f88cb(0x1a7),()=>_0x2b6511[_0x2f88cb(0x199)][_0x2f88cb(0x2b9)](_0x365cfd,_0x4cc57c,{'sessionTime':_0x4ffc4a}),{'verbose':_0x3ac845[_0x2f88cb(0x20a)]}),_0x56f90c=_0x56d90c['data'];console[_0x2f88cb(0x29e)](_0x2f88cb(0x1ad)),console[_0x2f88cb(0x29e)]('\x20\x20Attempt\x20ID:\x20'+_0x56f90c['id']),console['error'](_0x2f88cb(0x249)+_0x56f90c[_0x2f88cb(0x1a9)]),console[_0x2f88cb(0x29e)](_0x2f88cb(0x132)+_0x56f90c['project']?.[_0x2f88cb(0x131)]),console[_0x2f88cb(0x29e)](_0x2f88cb(0x17c)+_0x56f90c['workflow']?.[_0x2f88cb(0x131)]);if(_0x56f90c['project']?.['id']&&_0x56f90c['sessionId']&&_0x56f90c['id']){const _0x2f6877=_0x3ac845[_0x2f88cb(0x298)],_0x164d6d=getConsoleUrl(_0x2f6877,_0x2f88cb(0x1d3)+_0x56f90c['project']['id']+_0x2f88cb(0x214)+_0x56f90c[_0x2f88cb(0x1a9)]+_0x2f88cb(0x219)+_0x56f90c['id']);console['error']('\x20\x20Console:\x20'+a54_0x22d6d4[_0x2f88cb(0x159)](_0x164d6d));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x232);['description']=a54_0x2cd64f(0x173);async['execute'](_0x32ffe5){const _0x542a20=a54_0x2cd64f,{options:_0x540ca3,args:_0x491f94,tdx:_0x1a80ae}=_0x32ffe5,_0x52035d=_0x491f94[0x0],_0x2ffeca=_0x491f94[0x1]||'.';if(!_0x52035d)return console[_0x542a20(0x29e)](_0x542a20(0x1cc)),console['error'](_0x542a20(0x191)),0x1;const _0x5626a4=_0x540ca3[_0x542a20(0x2cf)];_0x540ca3[_0x542a20(0x20a)]&&(console['error'](_0x542a20(0x26e)+_0x52035d),console[_0x542a20(0x29e)](_0x542a20(0x12c)+_0x2ffeca),_0x5626a4&&console[_0x542a20(0x29e)](_0x542a20(0x220)+_0x5626a4));const _0xab2d1a=await withSpinner('Downloading\x20project\x20'+_0x52035d+_0x542a20(0x14d),()=>_0x1a80ae[_0x542a20(0x199)][_0x542a20(0x18f)](_0x52035d,_0x2ffeca,{'revision':_0x5626a4}),{'verbose':_0x540ca3[_0x542a20(0x20a)]}),_0x2b2ff6=_0xab2d1a[_0x542a20(0x1e5)];return console[_0x542a20(0x29e)](_0x542a20(0x1bd)+_0x2b2ff6['projectName']),console[_0x542a20(0x29e)](_0x542a20(0x2c7)+_0x2b2ff6[_0x542a20(0x2cf)]),console[_0x542a20(0x29e)](_0x542a20(0x2c2)+_0x2b2ff6['filesExtracted']),console[_0x542a20(0x29e)]('\x20\x20Location:\x20'+_0x2ffeca+'/'+_0x2b2ff6['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x22a);[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x2b1);async[a54_0x2cd64f(0x223)](_0x587c7e){const _0x15a5dd=a54_0x2cd64f,{options:_0x450ff1,args:_0x383a6e,tdx:_0x2ed350}=_0x587c7e;let _0x40a1f3='.',_0x5acf02=_0x450ff1['name'];if(_0x383a6e[0x0]){const {promises:_0x414abf}=await import('fs');try{const _0x9a929d=await _0x414abf['stat'](_0x383a6e[0x0]);if(_0x9a929d[_0x15a5dd(0x239)]())_0x40a1f3=_0x383a6e[0x0];else return console[_0x15a5dd(0x29e)](_0x15a5dd(0x189)+_0x383a6e[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x5acf02=_0x383a6e[0x0],_0x40a1f3='.';}}const _0x27c1af=_0x450ff1[_0x15a5dd(0x2cf)],_0x535a3b=_0x450ff1['skipValidation'];_0x450ff1[_0x15a5dd(0x20a)]&&(console[_0x15a5dd(0x29e)](_0x15a5dd(0x1fb)+_0x40a1f3),_0x5acf02&&console[_0x15a5dd(0x29e)](_0x15a5dd(0x2bf)+_0x5acf02),_0x27c1af&&console[_0x15a5dd(0x29e)](_0x15a5dd(0x220)+_0x27c1af),_0x535a3b&&console['error']('Validation:\x20skipped'));const _0x24ccd3=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x2ed350[_0x15a5dd(0x199)]['push'](_0x40a1f3,{'projectName':_0x5acf02,'revision':_0x27c1af,'skipValidation':_0x535a3b}),{'verbose':_0x450ff1[_0x15a5dd(0x20a)]}),_0x1c629f=_0x24ccd3[_0x15a5dd(0x1e5)];return console['error']('✔\x20Pushed\x20'+_0x1c629f[_0x15a5dd(0x1b2)]),console['error'](_0x15a5dd(0x1d1)+_0x1c629f[_0x15a5dd(0x213)]),console[_0x15a5dd(0x29e)](_0x15a5dd(0x2c7)+_0x1c629f[_0x15a5dd(0x2cf)]),await this[_0x15a5dd(0x29d)](_0x2ed350,_0x1c629f[_0x15a5dd(0x1b2)],_0x450ff1['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a54_0x2cd64f(0x131)]='workflow:pull';[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x171);async[a54_0x2cd64f(0x223)](_0x234753){const _0x56e1b8=a54_0x2cd64f,{options:_0x2a7a4f,args:_0x3fece1,tdx:_0x33408f}=_0x234753,_0x5a5064=_0x3fece1[0x0],_0x3be60c=_0x3fece1[0x1];if(!_0x5a5064)return console[_0x56e1b8(0x29e)](a54_0x22d6d4[_0x56e1b8(0x297)](_0x56e1b8(0x1ae)),_0x56e1b8(0x224)),console[_0x56e1b8(0x29e)](a54_0x22d6d4[_0x56e1b8(0x149)](_0x56e1b8(0x1b5))),0x1;const _0x1eea95=_0x2a7a4f['revision'];_0x2a7a4f[_0x56e1b8(0x20a)]&&(console[_0x56e1b8(0x29e)](_0x56e1b8(0x26e)+_0x5a5064),_0x3be60c&&console[_0x56e1b8(0x29e)](_0x56e1b8(0x1c6)+_0x3be60c),_0x1eea95&&console[_0x56e1b8(0x29e)]('Revision:\x20'+_0x1eea95),_0x2a7a4f[_0x56e1b8(0x205)]&&console[_0x56e1b8(0x29e)]('Dry\x20run:\x20yes'));const _0x3bc52a=await withSpinner(_0x56e1b8(0x192)+_0x5a5064+_0x56e1b8(0x14d),()=>_0x33408f[_0x56e1b8(0x199)]['pullProject'](_0x5a5064,{'targetDir':_0x3be60c,'revision':_0x1eea95}),{'verbose':_0x2a7a4f[_0x56e1b8(0x20a)]}),_0x3099e0=_0x3bc52a[_0x56e1b8(0x1e5)];_0x3099e0[_0x56e1b8(0x2d1)]?console[_0x56e1b8(0x29e)](_0x56e1b8(0x155)+_0x3099e0[_0x56e1b8(0x1b2)]):console[_0x56e1b8(0x29e)](_0x56e1b8(0x13b)+_0x3099e0[_0x56e1b8(0x1b2)]);console['error'](_0x56e1b8(0x2c7)+_0x3099e0[_0x56e1b8(0x2cf)]),console['error'](_0x56e1b8(0x158)+(a54_0x49f5e['relative'](process[_0x56e1b8(0x23a)](),_0x3099e0[_0x56e1b8(0x12a)])||'.')),console['error'](_0x56e1b8(0x2d7)+a54_0x22d6d4[_0x56e1b8(0x145)]('+'+_0x3099e0[_0x56e1b8(0x13e)][_0x56e1b8(0x22b)]+_0x56e1b8(0x23e))+',\x20'+(a54_0x22d6d4['yellow']('~'+_0x3099e0[_0x56e1b8(0x13e)]['modified']+_0x56e1b8(0x157))+',\x20')+(a54_0x22d6d4[_0x56e1b8(0x297)]('-'+_0x3099e0[_0x56e1b8(0x13e)]['deleted']+_0x56e1b8(0x246))+',\x20')+(''+a54_0x22d6d4['dim'](_0x3099e0[_0x56e1b8(0x13e)][_0x56e1b8(0x1c2)]+_0x56e1b8(0x1e9))));for(const _0x2c5566 of _0x3099e0[_0x56e1b8(0x204)]){_0x2c5566[_0x56e1b8(0x26c)]===_0x56e1b8(0x1db)&&_0x2c5566[_0x56e1b8(0x291)]&&(console[_0x56e1b8(0x29e)]('\x0a'+a54_0x22d6d4[_0x56e1b8(0x159)](_0x56e1b8(0x1d0)+_0x2c5566['path'])),console['error'](_0x2c5566[_0x56e1b8(0x291)]));}if(!_0x3099e0[_0x56e1b8(0x124)])return saveSessionContext({'workflow_project':_0x3099e0['projectName']},_0x2a7a4f[_0x56e1b8(0x218)]),console[_0x56e1b8(0x29e)](a54_0x22d6d4['green'](_0x56e1b8(0x29b))),console[_0x56e1b8(0x29e)](a54_0x22d6d4[_0x56e1b8(0x149)](_0x56e1b8(0x1ab)+_0x3099e0[_0x56e1b8(0x1b2)])),0x0;if(_0x2a7a4f[_0x56e1b8(0x205)])return console[_0x56e1b8(0x29e)](a54_0x22d6d4[_0x56e1b8(0x1d6)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x2a7a4f[_0x56e1b8(0x186)]){if(!isInteractive())return console[_0x56e1b8(0x29e)](a54_0x22d6d4['red'](_0x56e1b8(0x182)),_0x56e1b8(0x24b)),console[_0x56e1b8(0x29e)](a54_0x22d6d4[_0x56e1b8(0x149)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4ffffc=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x4ffffc)return console[_0x56e1b8(0x29e)](a54_0x22d6d4[_0x56e1b8(0x1d6)](_0x56e1b8(0x17e)),_0x56e1b8(0x135)),0x1;}await withSpinner(_0x56e1b8(0x2ad),()=>_0x33408f[_0x56e1b8(0x199)][_0x56e1b8(0x19c)](_0x3099e0,{'revision':_0x1eea95}),{'verbose':_0x2a7a4f[_0x56e1b8(0x20a)]}),saveSessionContext({'workflow_project':_0x3099e0[_0x56e1b8(0x1b2)]},_0x2a7a4f['session']),console['error'](a54_0x22d6d4[_0x56e1b8(0x145)](_0x56e1b8(0x264)));const _0x1eb77a=a54_0x49f5e[_0x56e1b8(0x1dc)](process[_0x56e1b8(0x23a)](),_0x3099e0[_0x56e1b8(0x12a)])||'.';return console['error'](a54_0x22d6d4[_0x56e1b8(0x149)](_0x56e1b8(0x17a)+_0x1eb77a)),console['error'](a54_0x22d6d4[_0x56e1b8(0x149)](_0x56e1b8(0x1ab)+_0x3099e0[_0x56e1b8(0x1b2)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]='workflow:push';[a54_0x2cd64f(0x167)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a54_0x2cd64f(0x223)](_0x3458c3){const _0x7aab2a=a54_0x2cd64f,{options:_0x2d6e69,args:_0x480dc7,tdx:_0x4fba29}=_0x3458c3,_0x3fc016=this[_0x7aab2a(0x1ce)](_0x480dc7,_0x2d6e69),_0x42744a=_0x2d6e69[_0x7aab2a(0x2cf)],_0x50ce6a=_0x2d6e69['skipValidation'];_0x2d6e69[_0x7aab2a(0x20a)]&&(_0x3fc016&&console[_0x7aab2a(0x29e)]('Source\x20directory:\x20'+_0x3fc016),_0x42744a&&console[_0x7aab2a(0x29e)](_0x7aab2a(0x220)+_0x42744a),_0x2d6e69['dryRun']&&console['error'](_0x7aab2a(0x143)),_0x50ce6a&&console['error'](_0x7aab2a(0x2b6)));let _0x48daf8;try{_0x48daf8=await withSpinner(_0x7aab2a(0x1b9),()=>_0x4fba29['workflow'][_0x7aab2a(0x2c9)]({'sourceDir':_0x3fc016,'revision':_0x42744a,'skipValidation':_0x50ce6a}),{'verbose':_0x2d6e69[_0x7aab2a(0x20a)]});}catch(_0x266e31){if(_0x266e31 instanceof Error&&_0x266e31[_0x7aab2a(0x251)]['includes']('No\x20workflow\x20tdx.json\x20found'))return console[_0x7aab2a(0x29e)](a54_0x22d6d4[_0x7aab2a(0x297)]('Error:'),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x2d6e69[_0x7aab2a(0x22f)]?console['error'](a54_0x22d6d4[_0x7aab2a(0x149)](_0x7aab2a(0x21c)+_0x2d6e69['workflowProject']+_0x7aab2a(0x153)+_0x2d6e69[_0x7aab2a(0x22f)]+'\x27')):console[_0x7aab2a(0x29e)](a54_0x22d6d4[_0x7aab2a(0x149)](_0x7aab2a(0x258))),0x1;throw _0x266e31;}const _0x37139f=_0x48daf8[_0x7aab2a(0x1e5)];console[_0x7aab2a(0x29e)](_0x7aab2a(0x17d)+_0x37139f[_0x7aab2a(0x1b2)]),console['error'](_0x7aab2a(0x1eb)+_0x37139f[_0x7aab2a(0x2ca)]),console[_0x7aab2a(0x29e)](_0x7aab2a(0x2c7)+_0x37139f['revision']),console['error']('\x20\x20Changes:\x20'+a54_0x22d6d4[_0x7aab2a(0x145)]('+'+_0x37139f['summary'][_0x7aab2a(0x22b)]+_0x7aab2a(0x23e))+',\x20'+(a54_0x22d6d4[_0x7aab2a(0x1d6)]('~'+_0x37139f[_0x7aab2a(0x13e)][_0x7aab2a(0x1db)]+_0x7aab2a(0x157))+',\x20')+(a54_0x22d6d4[_0x7aab2a(0x297)]('-'+_0x37139f[_0x7aab2a(0x13e)]['deleted']+'\x20deleted')+',\x20')+(''+a54_0x22d6d4[_0x7aab2a(0x149)](_0x37139f[_0x7aab2a(0x13e)][_0x7aab2a(0x1c2)]+_0x7aab2a(0x1e9))));for(const _0x5197ed of _0x37139f['changes']){_0x5197ed[_0x7aab2a(0x26c)]===_0x7aab2a(0x1db)&&_0x5197ed[_0x7aab2a(0x291)]&&(console[_0x7aab2a(0x29e)]('\x0a'+a54_0x22d6d4['cyan'](_0x7aab2a(0x1d0)+_0x5197ed[_0x7aab2a(0x233)])),console['error'](_0x5197ed['diff']));}if(!_0x37139f['hasChanges'])return console[_0x7aab2a(0x29e)](a54_0x22d6d4[_0x7aab2a(0x145)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x7aab2a(0x29d)](_0x4fba29,_0x37139f[_0x7aab2a(0x1b2)],_0x2d6e69[_0x7aab2a(0x298)]),0x0;if(_0x2d6e69[_0x7aab2a(0x205)])return console['error'](a54_0x22d6d4[_0x7aab2a(0x1d6)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x2d6e69[_0x7aab2a(0x186)]){if(!isInteractive())return console[_0x7aab2a(0x29e)](a54_0x22d6d4[_0x7aab2a(0x297)](_0x7aab2a(0x182)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x7aab2a(0x29e)](a54_0x22d6d4[_0x7aab2a(0x149)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1c9b29=await confirmKey(_0x7aab2a(0x170));if(!_0x1c9b29)return console[_0x7aab2a(0x29e)](a54_0x22d6d4[_0x7aab2a(0x1d6)](_0x7aab2a(0x17e)),_0x7aab2a(0x21e)),0x1;}const _0x485a6c=await withSpinner(_0x7aab2a(0x126),()=>_0x4fba29[_0x7aab2a(0x199)][_0x7aab2a(0x2b2)](_0x37139f),{'verbose':_0x2d6e69['verbose']}),_0x504ebc=_0x485a6c[_0x7aab2a(0x1e5)];return console['error'](a54_0x22d6d4[_0x7aab2a(0x145)]('✔\x20Push\x20complete')),console[_0x7aab2a(0x29e)](_0x7aab2a(0x1d1)+_0x504ebc[_0x7aab2a(0x213)]),console[_0x7aab2a(0x29e)]('\x20\x20Revision:\x20'+_0x504ebc[_0x7aab2a(0x2cf)]),await this[_0x7aab2a(0x29d)](_0x4fba29,_0x504ebc['projectName'],_0x2d6e69[_0x7aab2a(0x298)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]='workflow:clone';[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x1b7);async[a54_0x2cd64f(0x223)](_0x4f6bc0){const _0x469631=a54_0x2cd64f,{options:_0x46fd88,args:_0x4a315c,tdx:_0x11aa3e}=_0x4f6bc0,_0x7f570b=this[_0x469631(0x1ce)](_0x4a315c,_0x46fd88),_0x515ea0=_0x46fd88[_0x469631(0x131)],_0x35d488=_0x46fd88[_0x469631(0x2cf)],_0x14b2a3=_0x46fd88[_0x469631(0x1bf)];if(!_0x7f570b)return console[_0x469631(0x29e)](a54_0x22d6d4[_0x469631(0x297)]('Error:'),_0x469631(0x16e)),console[_0x469631(0x29e)](a54_0x22d6d4[_0x469631(0x149)](_0x469631(0x195))),console['error'](a54_0x22d6d4[_0x469631(0x149)](_0x469631(0x1fe))),0x1;if(!_0x515ea0)return console[_0x469631(0x29e)](a54_0x22d6d4[_0x469631(0x297)](_0x469631(0x1ae)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x469631(0x29e)](a54_0x22d6d4['dim'](_0x469631(0x195))),0x1;_0x46fd88[_0x469631(0x20a)]&&(console[_0x469631(0x29e)]('Source\x20directory:\x20'+_0x7f570b),console['error'](_0x469631(0x15e)+_0x515ea0),_0x35d488&&console[_0x469631(0x29e)](_0x469631(0x220)+_0x35d488),_0x46fd88[_0x469631(0x205)]&&console['error'](_0x469631(0x143)),_0x14b2a3&&console['error'](_0x469631(0x2b6)));const _0x3a2078=await withSpinner(_0x469631(0x1a5),()=>_0x11aa3e[_0x469631(0x199)][_0x469631(0x18a)](_0x7f570b,_0x515ea0,{'revision':_0x35d488,'skipValidation':_0x14b2a3}),{'verbose':_0x46fd88[_0x469631(0x20a)]}),_0x1e1a0b=_0x3a2078[_0x469631(0x1e5)];console[_0x469631(0x29e)](_0x469631(0x1fc)+_0x1e1a0b[_0x469631(0x2ca)]);_0x1e1a0b[_0x469631(0x172)]&&console['error'](_0x469631(0x198)+_0x1e1a0b[_0x469631(0x172)]);console[_0x469631(0x29e)](_0x469631(0x15e)+_0x1e1a0b['newProjectName']),console[_0x469631(0x29e)](_0x469631(0x220)+_0x1e1a0b[_0x469631(0x2cf)]),console[_0x469631(0x29e)](_0x469631(0x24f)+_0x1e1a0b[_0x469631(0x168)]);_0x1e1a0b[_0x469631(0x141)]&&(console['error'](a54_0x22d6d4[_0x469631(0x1d6)](_0x469631(0x203)+_0x1e1a0b[_0x469631(0x242)]+_0x469631(0x1de)+_0x1e1a0b[_0x469631(0x295)]+')')),console[_0x469631(0x29e)](a54_0x22d6d4[_0x469631(0x1d6)](_0x469631(0x229))));if(_0x46fd88[_0x469631(0x205)])return console[_0x469631(0x29e)](a54_0x22d6d4['yellow'](_0x469631(0x212))),0x0;if(!_0x46fd88[_0x469631(0x186)]){if(!isInteractive())return console[_0x469631(0x29e)](a54_0x22d6d4['red'](_0x469631(0x182)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x469631(0x29e)](a54_0x22d6d4[_0x469631(0x149)](_0x469631(0x18e))),0x1;const _0xcb74fe=_0x1e1a0b[_0x469631(0x172)]||a54_0x49f5e['basename'](_0x7f570b),_0x5758c6=_0x1e1a0b['targetExists']?_0x469631(0x25d)+_0x515ea0+_0x469631(0x150):'\x0aClone\x20\x22'+_0xcb74fe+_0x469631(0x207)+_0x515ea0+'\x22?',_0x5eef91=await confirmKey(_0x5758c6);if(!_0x5eef91)return console['error'](a54_0x22d6d4[_0x469631(0x1d6)](_0x469631(0x17e))),0x1;}const _0xdcad30=await withSpinner(_0x1e1a0b['targetExists']?_0x469631(0x2c8)+_0x515ea0+_0x469631(0x14d):_0x469631(0x2cc)+_0x515ea0+_0x469631(0x14d),()=>_0x11aa3e['workflow']['executeCloneProject'](_0x1e1a0b),{'verbose':_0x46fd88[_0x469631(0x20a)]}),_0x43362f=_0xdcad30[_0x469631(0x1e5)];return console[_0x469631(0x29e)](a54_0x22d6d4[_0x469631(0x145)](_0x1e1a0b[_0x469631(0x141)]?_0x469631(0x22c):_0x469631(0x169))),console[_0x469631(0x29e)](_0x469631(0x132)+_0x43362f[_0x469631(0x242)]),console[_0x469631(0x29e)]('\x20\x20Project\x20ID:\x20'+_0x43362f[_0x469631(0x16c)]),console[_0x469631(0x29e)](_0x469631(0x2c7)+_0x43362f[_0x469631(0x2cf)]),await this[_0x469631(0x29d)](_0x11aa3e,_0x43362f[_0x469631(0x242)],_0x46fd88[_0x469631(0x298)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x1ac);[a54_0x2cd64f(0x167)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a54_0x2cd64f(0x223)](_0x2d5177){const _0x3b9da1=a54_0x2cd64f,{options:_0x761e9,args:_0x4ead59,tdx:_0x23b56e}=_0x2d5177,_0x25f812=_0x4ead59[0x0];if(!_0x25f812)return console[_0x3b9da1(0x29e)](_0x3b9da1(0x280)),console['error'](_0x3b9da1(0x2a6)),0x1;_0x761e9[_0x3b9da1(0x20a)]&&console['error'](_0x3b9da1(0x26e)+_0x25f812);if(!_0x761e9[_0x3b9da1(0x186)]){if(!isInteractive())return console[_0x3b9da1(0x29e)](a54_0x22d6d4['red']('\x0aError:'),_0x3b9da1(0x24b)),console[_0x3b9da1(0x29e)](a54_0x22d6d4[_0x3b9da1(0x149)](_0x3b9da1(0x18e))),0x1;const _0x2f37b0=await confirmKey(_0x3b9da1(0x2d0)+_0x25f812+_0x3b9da1(0x166));if(!_0x2f37b0)return console[_0x3b9da1(0x29e)](a54_0x22d6d4[_0x3b9da1(0x1d6)](_0x3b9da1(0x17e))),0x1;}const _0x13bed8=await withSpinner(_0x3b9da1(0x294)+_0x25f812+'...',()=>_0x23b56e[_0x3b9da1(0x199)][_0x3b9da1(0x1c7)](_0x25f812),{'verbose':_0x761e9['verbose']}),_0x48eaa1=_0x13bed8[_0x3b9da1(0x1e5)];return console[_0x3b9da1(0x29e)]('✔\x20Deleted\x20project\x20'+_0x48eaa1[_0x3b9da1(0x1b2)]),console[_0x3b9da1(0x29e)](_0x3b9da1(0x1d1)+_0x48eaa1[_0x3b9da1(0x213)]),0x0;}}export function parseKeyValue(_0x5c1092){const _0x2f0e2b=a54_0x2cd64f,_0x2eb6b4=_0x5c1092[_0x2f0e2b(0x16d)]('=');if(_0x2eb6b4===-0x1)throw new Error(_0x2f0e2b(0x254)+_0x5c1092+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x5c91e5=_0x5c1092[_0x2f0e2b(0x1a2)](0x0,_0x2eb6b4),_0x925ef2=_0x5c1092[_0x2f0e2b(0x1a2)](_0x2eb6b4+0x1);if(!_0x5c91e5)throw new Error(_0x2f0e2b(0x1f1));return{'key':_0x5c91e5,'value':_0x925ef2};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]='workflow:secrets:list';[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x234);async['execute'](_0x2e52f9){const _0x1cf961=a54_0x2cd64f,{options:_0x1c71f2,args:_0x17744f,tdx:_0x3853e6}=_0x2e52f9,_0x159d7b=this[_0x1cf961(0x1e1)](_0x17744f,_0x1c71f2);if(!_0x159d7b)return 0x1;_0x1c71f2['verbose']&&console['error'](_0x1cf961(0x26e)+_0x159d7b);const _0x54a611=await withSpinner(_0x1cf961(0x1fd),()=>_0x3853e6[_0x1cf961(0x199)][_0x1cf961(0x2d4)](_0x159d7b),{'verbose':_0x1c71f2['verbose']}),{secrets:_0x541673}=_0x54a611[_0x1cf961(0x1e5)];return console[_0x1cf961(0x29e)]('✔\x20Found\x20'+_0x541673[_0x1cf961(0x289)]+_0x1cf961(0x1f4)+(_0x541673[_0x1cf961(0x289)]!==0x1?'s':'')),await handleSDKOutput(_0x541673,_0x1c71f2),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x1cf);[a54_0x2cd64f(0x167)]=a54_0x2cd64f(0x268);async[a54_0x2cd64f(0x223)](_0x376d81){const _0x17ffd0=a54_0x2cd64f,{options:_0x1c5ee7,args:_0x559e30,tdx:_0x310a72}=_0x376d81;let _0x33ccf6,_0x58602c;if(_0x559e30['length']>=0x1&&!_0x559e30[0x0][_0x17ffd0(0x2d5)]('='))_0x33ccf6=_0x559e30[0x0],_0x58602c=_0x559e30[_0x17ffd0(0x1ba)](0x1);else{if(_0x559e30[_0x17ffd0(0x289)]>=0x1&&_0x1c5ee7['workflowProject'])_0x33ccf6=_0x1c5ee7[_0x17ffd0(0x22f)],_0x58602c=_0x559e30;else return _0x559e30[_0x17ffd0(0x289)]>=0x1?(console[_0x17ffd0(0x29e)](_0x17ffd0(0x1cc)),console['error'](_0x17ffd0(0x1ee)),0x1):(console['error'](_0x17ffd0(0x163)),console[_0x17ffd0(0x29e)](_0x17ffd0(0x210)),0x1);}if(_0x58602c[_0x17ffd0(0x289)]===0x0)return console[_0x17ffd0(0x29e)](_0x17ffd0(0x163)),console[_0x17ffd0(0x29e)](_0x17ffd0(0x210)),0x1;const _0x533da7={};try{for(const _0x4b2b67 of _0x58602c){const {key:_0x451bff,value:_0x51ff4}=parseKeyValue(_0x4b2b67);_0x533da7[_0x451bff]=_0x51ff4;}}catch(_0x10785e){return _0x10785e instanceof Error&&console[_0x17ffd0(0x29e)](a54_0x22d6d4['red'](_0x17ffd0(0x1ae)),_0x10785e[_0x17ffd0(0x251)]),0x1;}const _0x5a407f=Object['keys'](_0x533da7);_0x1c5ee7[_0x17ffd0(0x20a)]&&(console['error'](_0x17ffd0(0x26e)+_0x33ccf6),console[_0x17ffd0(0x29e)](_0x17ffd0(0x19f)+_0x5a407f[_0x17ffd0(0x184)](',\x20')));const _0x524f3d=await withSpinner(_0x5a407f[_0x17ffd0(0x289)]===0x1?_0x17ffd0(0x1b0):_0x17ffd0(0x28a)+_0x5a407f['length']+_0x17ffd0(0x2b7),()=>_0x310a72[_0x17ffd0(0x199)][_0x17ffd0(0x1e0)](_0x33ccf6,_0x533da7),{'verbose':_0x1c5ee7[_0x17ffd0(0x20a)]}),_0xed865d=_0x524f3d[_0x17ffd0(0x1e5)];return console[_0x17ffd0(0x29e)](_0x5a407f[_0x17ffd0(0x289)]===0x1?_0x17ffd0(0x26a)+_0xed865d[_0x17ffd0(0x140)][0x0]+_0x17ffd0(0x1c0)+_0xed865d[_0x17ffd0(0x1b2)]+'\x27':'✔\x20'+_0xed865d['keys'][_0x17ffd0(0x289)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0xed865d['projectName']+'\x27'),(_0x1c5ee7[_0x17ffd0(0x175)]||_0x1c5ee7[_0x17ffd0(0x2c6)])&&await handleSingleObjectOutput(_0xed865d,_0x1c5ee7),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0x2cd64f(0x131)]=a54_0x2cd64f(0x156);['description']=a54_0x2cd64f(0x1e2);async['execute'](_0x32f497){const _0x3fc401=a54_0x2cd64f,{options:_0x43720c,args:_0x19df16,tdx:_0x5a4950}=_0x32f497;let _0x3829f0,_0x30098d;if(_0x19df16[_0x3fc401(0x289)]>=0x2)_0x3829f0=_0x19df16[0x0],_0x30098d=_0x19df16[0x1];else{if(_0x19df16[_0x3fc401(0x289)]===0x1&&_0x43720c[_0x3fc401(0x22f)])_0x3829f0=_0x43720c[_0x3fc401(0x22f)],_0x30098d=_0x19df16[0x0];else return _0x19df16['length']===0x1?(console[_0x3fc401(0x29e)](_0x3fc401(0x1cc)),console[_0x3fc401(0x29e)](_0x3fc401(0x1ee)),0x1):(console[_0x3fc401(0x29e)](_0x3fc401(0x225)),console[_0x3fc401(0x29e)](_0x3fc401(0x1ed)),0x1);}_0x43720c[_0x3fc401(0x20a)]&&(console[_0x3fc401(0x29e)](_0x3fc401(0x26e)+_0x3829f0),console[_0x3fc401(0x29e)](_0x3fc401(0x1ec)+_0x30098d));if(!_0x43720c[_0x3fc401(0x186)]){if(!isInteractive())return console['error'](a54_0x22d6d4[_0x3fc401(0x297)](_0x3fc401(0x182)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a54_0x22d6d4[_0x3fc401(0x149)](_0x3fc401(0x18e))),0x1;const _0x3f8d20=await confirmKey(_0x3fc401(0x2da)+_0x30098d+_0x3fc401(0x13d)+_0x3829f0+'\x27?');if(!_0x3f8d20)return console[_0x3fc401(0x29e)](a54_0x22d6d4[_0x3fc401(0x1d6)]('Cancelled')),0x1;}const _0x2ea573=await withSpinner(_0x3fc401(0x2c0),()=>_0x5a4950[_0x3fc401(0x199)]['deleteSecret'](_0x3829f0,_0x30098d),{'verbose':_0x43720c[_0x3fc401(0x20a)]}),_0x1faaa2=_0x2ea573[_0x3fc401(0x1e5)];return console[_0x3fc401(0x29e)](_0x3fc401(0x26a)+_0x1faaa2['key']+_0x3fc401(0x2bc)+_0x1faaa2[_0x3fc401(0x1b2)]+'\x27'),(_0x43720c[_0x3fc401(0x175)]||_0x43720c['jsonl'])&&await handleSingleObjectOutput(_0x1faaa2,_0x43720c),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(_0x2013cb){const _0x59c5e0=a54_0x2cd64f,_0x3788c9=Math[_0x59c5e0(0x180)](_0x2013cb/0x3e8),_0x3f5932=Math[_0x59c5e0(0x180)](_0x3788c9/0x3c),_0x5271da=Math[_0x59c5e0(0x180)](_0x3f5932/0x3c),_0x3d7750=Math[_0x59c5e0(0x180)](_0x5271da/0x18);if(_0x3d7750>0x0){const _0x5503bf=_0x5271da%0x18;return _0x5503bf>0x0?_0x3d7750+'d\x20'+_0x5503bf+'h':_0x3d7750+'d';}else{if(_0x5271da>0x0){const _0x4d8c4d=_0x3f5932%0x3c;return _0x4d8c4d>0x0?_0x5271da+'h\x20'+_0x4d8c4d+'m':_0x5271da+'h';}else{if(_0x3f5932>0x0){const _0x1d0c11=_0x3788c9%0x3c;return _0x1d0c11>0x0?_0x3f5932+'m\x20'+_0x1d0c11+'s':_0x3f5932+'m';}else return _0x3788c9+'s';}}}function formatTimestamp(_0x215427,_0x23c46f){const _0x3e4840=a54_0x2cd64f,_0x58eb3a=new Date(_0x215427),_0x27464c=String(_0x58eb3a[_0x3e4840(0x1e8)]())[_0x3e4840(0x255)](0x2,'0'),_0x3c4753=String(_0x58eb3a[_0x3e4840(0x253)]())['padStart'](0x2,'0'),_0x577bc1=_0x27464c+':'+_0x3c4753,_0x1a7053=_0x58eb3a[_0x3e4840(0x127)]()===_0x23c46f[_0x3e4840(0x127)]()&&_0x58eb3a[_0x3e4840(0x1e4)]()===_0x23c46f[_0x3e4840(0x1e4)]()&&_0x58eb3a[_0x3e4840(0x137)]()===_0x23c46f[_0x3e4840(0x137)]();if(_0x1a7053)return _0x577bc1;else{const _0x4fc11f=String(_0x58eb3a[_0x3e4840(0x1e4)]()+0x1)[_0x3e4840(0x255)](0x2,'0'),_0x4c29d5=String(_0x58eb3a[_0x3e4840(0x137)]())[_0x3e4840(0x255)](0x2,'0');return _0x4fc11f+'-'+_0x4c29d5+'\x20'+_0x577bc1;}}function formatDate(_0x49ddf0){const _0xb9e79=a54_0x2cd64f,_0x188414=_0x49ddf0['getFullYear'](),_0x2e9a70=String(_0x49ddf0[_0xb9e79(0x1e4)]()+0x1)[_0xb9e79(0x255)](0x2,'0'),_0x56fc14=String(_0x49ddf0[_0xb9e79(0x137)]())[_0xb9e79(0x255)](0x2,'0');return _0x188414+'-'+_0x2e9a70+'-'+_0x56fc14;}function getTaskStateIcon(_0x143279){const _0x33c494={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x33c494[_0x143279]||'⚪';}function getBarChar(_0x18cdb8){return _0x18cdb8==='error'||_0x18cdb8==='group_error'?'×':'─';}function getBarColor(_0x4a148){const _0x4b917f=a54_0x2cd64f,_0x13a327={'success':a54_0x22d6d4[_0x4b917f(0x145)],'error':a54_0x22d6d4['red'],'group_error':a54_0x22d6d4[_0x4b917f(0x297)],'running':a54_0x22d6d4['blue'],'blocked':a54_0x22d6d4['yellow'],'planned':a54_0x22d6d4[_0x4b917f(0x149)],'canceling':a54_0x22d6d4[_0x4b917f(0x1d6)]};return _0x13a327[_0x4a148]||a54_0x22d6d4[_0x4b917f(0x278)];}function a54_0x1c09(_0x259d2a,_0x56067a){_0x259d2a=_0x259d2a-0x123;const _0x52df85=a54_0x52df();let _0x1c09e2=_0x52df85[_0x259d2a];return _0x1c09e2;}function parseTaskName(_0x4b72ec){const _0x23f993=a54_0x2cd64f;let _0x4884a9=_0x4b72ec[_0x23f993(0x2a1)](/^\++/,'');const _0x4a9156=_0x4884a9[_0x23f993(0x1d5)]('+'),_0x417710=_0x4a9156[_0x23f993(0x289)]>0x1?_0x4a9156[_0x23f993(0x289)]-0x2:0x0,_0x5d974f=_0x4a9156[_0x4a9156['length']-0x1]||_0x4884a9;return{'level':_0x417710,'name':'+'+_0x5d974f};}function truncateTaskName(_0x2169aa,_0x2e085e){const _0x2364b1=a54_0x2cd64f,_0x4dad67=stringWidth(_0x2169aa);if(_0x4dad67<=_0x2e085e)return _0x2169aa;let _0x2f2a7c=_0x2169aa;while(stringWidth(_0x2f2a7c+'…')>_0x2e085e&&_0x2f2a7c[_0x2364b1(0x289)]>0x0){_0x2f2a7c=_0x2f2a7c[_0x2364b1(0x1ba)](0x0,-0x1);}return _0x2f2a7c+'…';}function calculateTimeScale(_0x3d0757,_0x4a9eb2){const _0x55edb7=a54_0x2cd64f;return{'startTime':_0x3d0757['start'],'endTime':_0x3d0757[_0x55edb7(0x238)],'durationMs':_0x3d0757[_0x55edb7(0x2bd)],'msPerChar':_0x3d0757[_0x55edb7(0x2bd)]/_0x4a9eb2};}function timeToPosition(_0x53fc31,_0x262714,_0x4fb95a){const _0x15a5f1=a54_0x2cd64f,_0x42ce95=_0x53fc31-_0x262714[_0x15a5f1(0x1e7)],_0x1af302=Math['floor'](_0x42ce95/_0x262714[_0x15a5f1(0x2c4)]);return Math[_0x15a5f1(0x123)](0x0,Math[_0x15a5f1(0x228)](_0x1af302,_0x4fb95a));}function renderTimeAxis(_0x33e939,_0x55fa7d){const _0x17c896=a54_0x2cd64f,_0x2d6cec=Math[_0x17c896(0x228)](TIMELINE_CONFIG[_0x17c896(0x286)],Math[_0x17c896(0x123)](TIMELINE_CONFIG[_0x17c896(0x23c)],Math[_0x17c896(0x180)](_0x55fa7d/TIMELINE_CONFIG[_0x17c896(0x174)]))),_0x57f42a=_0x33e939[_0x17c896(0x27b)]/(_0x2d6cec-0x1),_0x345475=new Date(_0x33e939[_0x17c896(0x1e7)]),_0x51bce0=[];for(let _0x250b21=0x0;_0x250b21<_0x2d6cec;_0x250b21++){const _0x1ea336=_0x33e939['startTime']+_0x250b21*_0x57f42a,_0x1813f1=timeToPosition(_0x1ea336,_0x33e939,_0x55fa7d),_0x1701c3=formatTimestamp(_0x1ea336,_0x345475);_0x51bce0[_0x17c896(0x2a3)]({'pos':_0x1813f1,'text':_0x1701c3});}const _0x6688e6=new Array(_0x55fa7d)['fill']('\x20');let _0x161c5e=-0x1;for(const {pos:_0x282613,text:_0x136534}of _0x51bce0){let _0x1c1f57=Math[_0x17c896(0x123)](0x0,_0x282613-Math[_0x17c896(0x180)](_0x136534[_0x17c896(0x289)]/0x2));_0x1c1f57<=_0x161c5e+TIMELINE_CONFIG[_0x17c896(0x129)]&&(_0x1c1f57=_0x161c5e+TIMELINE_CONFIG[_0x17c896(0x129)]+0x1);_0x1c1f57+_0x136534[_0x17c896(0x289)]>_0x55fa7d&&(_0x1c1f57=_0x55fa7d-_0x136534[_0x17c896(0x289)]);if(_0x1c1f57>=0x0&&_0x1c1f57+_0x136534[_0x17c896(0x289)]<=_0x55fa7d&&_0x1c1f57>_0x161c5e){for(let _0x2f8f12=0x0;_0x2f8f12<_0x136534[_0x17c896(0x289)];_0x2f8f12++){_0x6688e6[_0x1c1f57+_0x2f8f12]=_0x136534[_0x2f8f12];}_0x161c5e=_0x1c1f57+_0x136534[_0x17c896(0x289)]-0x1;}}return _0x6688e6[_0x17c896(0x184)]('');}function renderTaskRow(_0x1b9bfc,_0x1f0e33,_0x236032,_0x5b588e){const _0x509070=a54_0x2cd64f,{level:_0x136d5d,name:_0x485e54}=parseTaskName(_0x1b9bfc['name']),_0x317833='\x20'[_0x509070(0x243)](_0x136d5d),_0x461f2b=_0x1b9bfc[_0x509070(0x19d)]?'('+formatElapsed(_0x1b9bfc[_0x509070(0x19d)][_0x509070(0x2bd)])+')':'',_0x4ca5a1=stringWidth(_0x461f2b),_0x254ca3=_0x136d5d*0x1,_0x6b262f=_0x5b588e-_0x254ca3-_0x4ca5a1-0x1,_0x1c57dd=truncateTaskName(_0x485e54,_0x6b262f),_0x243476=_0x317833+_0x1c57dd,_0x36ac96=stringWidth(_0x243476),_0x5e6add=_0x5b588e-_0x36ac96-_0x4ca5a1,_0x2a472d=_0x243476+'\x20'[_0x509070(0x243)](Math[_0x509070(0x123)](0x1,_0x5e6add))+a54_0x22d6d4['dim'](_0x461f2b),_0x16849c=getTaskStateIcon(_0x1b9bfc[_0x509070(0x231)]),_0xec8090=new Array(_0x236032)['fill']('\x20');if(_0x1b9bfc['window']){const _0x51444d=timeToPosition(_0x1b9bfc[_0x509070(0x19d)]['start'],_0x1f0e33,_0x236032),_0x53a99f=timeToPosition(_0x1b9bfc[_0x509070(0x19d)]['end'],_0x1f0e33,_0x236032),_0x3970b9=getBarChar(_0x1b9bfc[_0x509070(0x231)]),_0x3fe815=Math[_0x509070(0x123)](_0x51444d+0x1,_0x53a99f);for(let _0xb0a10=_0x51444d;_0xb0a10<Math['min'](_0x3fe815,_0x236032);_0xb0a10++){_0xec8090[_0xb0a10]=_0x3970b9;}}const _0x4c7d37=getBarColor(_0x1b9bfc[_0x509070(0x231)]),_0xe3f6c5=_0xec8090[_0x509070(0x245)](_0x425579=>_0x425579==='\x20'?'\x20':_0x4c7d37(_0x425579))[_0x509070(0x184)]('');return _0x16849c+'\x20'+_0x2a472d+'│'+_0xe3f6c5+'│';}function calculateStats(_0x1de172){const _0x4249c9=a54_0x2cd64f,_0xcf3ae4={'total':_0x1de172[_0x4249c9(0x289)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x11f9f7 of _0x1de172){if(_0x11f9f7[_0x4249c9(0x231)]===_0x4249c9(0x197))_0xcf3ae4['success']++;else{if(_0x11f9f7[_0x4249c9(0x231)]===_0x4249c9(0x29e)||_0x11f9f7[_0x4249c9(0x231)]===_0x4249c9(0x1f3))_0xcf3ae4[_0x4249c9(0x29e)]++;else _0x11f9f7['state']===_0x4249c9(0x1f0)?_0xcf3ae4[_0x4249c9(0x1f0)]++:_0xcf3ae4['pending']++;}}return _0xcf3ae4;}function formatStats(_0x4bc341){const _0x3f0237=a54_0x2cd64f;return[_0x3f0237(0x211)+_0x4bc341[_0x3f0237(0x1ef)],'✅\x20'+_0x4bc341['success'],'❌\x20'+_0x4bc341[_0x3f0237(0x29e)],'🔄\x20'+_0x4bc341['running'],'⏳\x20'+_0x4bc341['pending']][_0x3f0237(0x184)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a54_0x2cd64f(0x1cd);[a54_0x2cd64f(0x167)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a54_0x2cd64f(0x223)](_0xfce624){const _0x2fa2f8=a54_0x2cd64f,{options:_0x39644f,args:_0x34b5f0,tdx:_0x8c3cf0}=_0xfce624;let _0x2c7435,_0xb860eb,_0x3c70c9=![];if(_0x34b5f0[0x0]){if(_0x34b5f0[0x0][_0x2fa2f8(0x2d5)]('.')){const _0x54842e=this[_0x2fa2f8(0x15f)](_0x34b5f0,_0x39644f);if(!_0x54842e)return 0x1;_0x2c7435=_0x54842e[_0x2fa2f8(0x1b2)],_0xb860eb=_0x54842e[_0x2fa2f8(0x252)];}else{_0xb860eb=_0x34b5f0[0x0],_0x2c7435=_0x39644f['workflowProject'];if(!_0x2c7435)return console[_0x2fa2f8(0x29e)](a54_0x22d6d4[_0x2fa2f8(0x297)](_0x2fa2f8(0x1ae)),_0x2fa2f8(0x2aa)),0x1;_0x3c70c9=!![];}}else{const _0x3d9e19=this[_0x2fa2f8(0x15f)](_0x34b5f0,_0x39644f);if(!_0x3d9e19)return 0x1;_0x2c7435=_0x3d9e19['projectName'],_0xb860eb=_0x3d9e19['workflowName'];}if(_0x39644f[_0x2fa2f8(0x20a)]){if(_0x2c7435&&_0xb860eb)console[_0x2fa2f8(0x29e)](_0x2fa2f8(0x1f8)+_0x2c7435+'.'+_0xb860eb);else _0x2c7435&&console[_0x2fa2f8(0x29e)]('Filter:\x20project='+_0x2c7435);}const _0x3f1339=_0x39644f[_0x2fa2f8(0x20c)],_0x3d1383=_0x39644f[_0x2fa2f8(0x1a9)];if(_0x3f1339){_0x3d1383&&console[_0x2fa2f8(0x29e)](a54_0x22d6d4['yellow'](_0x2fa2f8(0x193)),_0x2fa2f8(0x1df));const _0x387a62=_0x39644f[_0x2fa2f8(0x1a3)];return _0x387a62?await this[_0x2fa2f8(0x154)](_0xfce624,_0x3f1339):await this[_0x2fa2f8(0x165)](_0xfce624,_0x3f1339,_0x39644f),0x0;}if(_0x3d1383){const _0x9411ff=await withSpinner(_0x2fa2f8(0x1e3),()=>_0x8c3cf0[_0x2fa2f8(0x199)][_0x2fa2f8(0x272)]({'projectName':_0x2c7435,'workflowName':_0xb860eb,'limit':0x64}),{'verbose':_0x39644f[_0x2fa2f8(0x20a)]}),_0x3c5ec6=_0x9411ff[_0x2fa2f8(0x1e5)][_0x2fa2f8(0x240)](_0xb2f730=>_0xb2f730['id']===_0x3d1383);if(!_0x3c5ec6)return console[_0x2fa2f8(0x29e)](a54_0x22d6d4[_0x2fa2f8(0x297)](_0x2fa2f8(0x1ae)),_0x2fa2f8(0x1a1)+_0x3d1383),0x1;if(!_0x3c5ec6[_0x2fa2f8(0x29a)]?.['id'])return console[_0x2fa2f8(0x29e)](a54_0x22d6d4[_0x2fa2f8(0x297)]('Error:'),_0x2fa2f8(0x1c5)+_0x3d1383+'\x20has\x20no\x20attempts'),0x1;const _0x4b6533=_0x3c5ec6[_0x2fa2f8(0x29a)]['id'];_0x39644f['verbose']&&console[_0x2fa2f8(0x29e)]('Using\x20attempt\x20'+_0x4b6533+_0x2fa2f8(0x15d)+_0x3d1383);const _0x482617=_0x39644f[_0x2fa2f8(0x1a3)];return _0x482617?await this['pollTimeline'](_0xfce624,_0x4b6533):await this[_0x2fa2f8(0x165)](_0xfce624,_0x4b6533,_0x39644f),0x0;}const _0x18fc4a=await withSpinner(_0x2fa2f8(0x146),()=>_0x8c3cf0[_0x2fa2f8(0x199)]['sessions']({'projectName':_0x2c7435,'workflowName':_0xb860eb,'limit':_0x39644f['limit']||0x32}),{'verbose':_0x39644f[_0x2fa2f8(0x20a)]}),_0x85dfab=_0x18fc4a[_0x2fa2f8(0x1e5)];if(_0x85dfab[_0x2fa2f8(0x289)]===0x0){if(_0x2c7435&&_0xb860eb)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x2c7435+'.'+_0xb860eb);else _0x2c7435?console['error'](_0x2fa2f8(0x282)+_0x2c7435):(console[_0x2fa2f8(0x29e)]('No\x20workflow\x20sessions\x20found'),console[_0x2fa2f8(0x29e)](a54_0x22d6d4[_0x2fa2f8(0x149)](_0x2fa2f8(0x1a6))));return 0x0;}_0x85dfab[_0x2fa2f8(0x19b)]((_0x28d87e,_0x595eaf)=>{const _0x56cf18=_0x2fa2f8,_0x1f9419=_0x28d87e['sessionTime']||'',_0x513d8f=_0x595eaf[_0x56cf18(0x1ea)]||'';return _0x513d8f['localeCompare'](_0x1f9419);});if(_0x39644f[_0x2fa2f8(0x175)]||_0x39644f['jsonl'])return await handleSDKOutput(_0x85dfab,_0x39644f),0x0;let _0xfdb485;if(_0x3c70c9){const _0x8c11ab=_0x85dfab[0x0];if(!_0x8c11ab['lastAttempt']?.['id'])return console[_0x2fa2f8(0x29e)](_0x2fa2f8(0x206)),0x0;_0xfdb485=_0x8c11ab[_0x2fa2f8(0x29a)]['id'],_0x39644f[_0x2fa2f8(0x20a)]&&console[_0x2fa2f8(0x29e)](_0x2fa2f8(0x260)+_0x8c11ab[_0x2fa2f8(0x1ea)]);}else{const _0x2df4cd=_0x85dfab['map'](_0x2d6600=>{const _0x4a5916=_0x2fa2f8,_0x3becb4=getAttemptStatusDisplay(_0x2d6600[_0x4a5916(0x29a)]);return{'title':_0x2d6600[_0x4a5916(0x241)]?.[_0x4a5916(0x131)]+'.'+_0x2d6600[_0x4a5916(0x199)]?.[_0x4a5916(0x131)]+_0x4a5916(0x15b)+_0x2d6600[_0x4a5916(0x1ea)]+'\x20'+_0x3becb4['icon'],'value':_0x2d6600[_0x4a5916(0x29a)]?.['id']||'','description':_0x3becb4['text']};}),_0x1f3358=await a54_0xbf6bfc({'type':_0x2fa2f8(0x15c),'name':_0x2fa2f8(0x20c),'message':_0x2fa2f8(0x1be),'choices':_0x2df4cd[_0x2fa2f8(0x299)](_0x32a24f=>_0x32a24f[_0x2fa2f8(0x15a)]!=='')});if(!_0x1f3358[_0x2fa2f8(0x20c)])return 0x0;_0xfdb485=_0x1f3358[_0x2fa2f8(0x20c)];}const _0x592d96=_0x39644f[_0x2fa2f8(0x1a3)];return _0x592d96?await this[_0x2fa2f8(0x154)](_0xfce624,_0xfdb485):await this[_0x2fa2f8(0x165)](_0xfce624,_0xfdb485,_0x39644f),0x0;}async[a54_0x2cd64f(0x165)](_0x7a4e9d,_0x185ebd,_0x15c835){const _0xbf1abe=a54_0x2cd64f,{tdx:_0x140048}=_0x7a4e9d;let _0x33ef5d,_0x3c4a4d;try{[_0x33ef5d,_0x3c4a4d]=await Promise['all']([_0x140048[_0xbf1abe(0x199)][_0xbf1abe(0x293)](_0x185ebd),_0x140048[_0xbf1abe(0x199)][_0xbf1abe(0x14b)](_0x185ebd,![])]);}catch(_0x1ddcbc){console[_0xbf1abe(0x29e)](a54_0x22d6d4['red'](_0xbf1abe(0x2ba)));_0x15c835[_0xbf1abe(0x20a)]&&console['error'](_0x1ddcbc);throw _0x1ddcbc;}if(_0x15c835[_0xbf1abe(0x175)]||_0x15c835[_0xbf1abe(0x2c6)]){const _0x14c698=this[_0xbf1abe(0x23f)](_0x33ef5d,_0x3c4a4d);await handleSDKOutput([_0x14c698],_0x15c835);return;}const _0x4d371d=_0x140048[_0xbf1abe(0x1d2)]['site'],_0x1e549d=this[_0xbf1abe(0x2ae)](_0x33ef5d,_0x3c4a4d,_0x4d371d);console[_0xbf1abe(0x188)](_0x1e549d);}async['pollTimeline'](_0x1afa95,_0x1c6066){const _0x30f851=a54_0x2cd64f,{tdx:_0x52efe1}=_0x1afa95,_0x412257=TIMELINE_CONFIG[_0x30f851(0x136)],_0x51b550=TIMELINE_CONFIG[_0x30f851(0x287)];let _0x136381=0x0;while(_0x136381<_0x51b550){process[_0x30f851(0x25e)][_0x30f851(0x265)]&&process[_0x30f851(0x25e)][_0x30f851(0x139)]('\x1bc');let _0x416338,_0x3e5afe;try{[_0x416338,_0x3e5afe]=await Promise['all']([_0x52efe1[_0x30f851(0x199)][_0x30f851(0x293)](_0x1c6066),_0x52efe1[_0x30f851(0x199)][_0x30f851(0x14b)](_0x1c6066,![])]);}catch(_0x17ba06){console['error'](a54_0x22d6d4['red'](_0x30f851(0x1b8)));_0x136381>0x0&&console[_0x30f851(0x29e)](a54_0x22d6d4[_0x30f851(0x149)](_0x30f851(0x12f)+_0x136381));throw _0x17ba06;}const _0x108ff7=_0x52efe1[_0x30f851(0x1d2)][_0x30f851(0x298)],_0xc4e9cd=this[_0x30f851(0x2ae)](_0x416338,_0x3e5afe,_0x108ff7);console[_0x30f851(0x188)](_0xc4e9cd);const _0x2c86d2=_0x416338[_0x30f851(0x1d7)]&&_0x3e5afe[_0x30f851(0x160)](_0x54b960=>_0x54b960[_0x30f851(0x231)]!==_0x30f851(0x1f0)&&_0x54b960['state']!==_0x30f851(0x22e));if(_0x2c86d2){console[_0x30f851(0x29e)](a54_0x22d6d4[_0x30f851(0x145)](_0x30f851(0x164)));break;}console[_0x30f851(0x29e)](a54_0x22d6d4[_0x30f851(0x149)](_0x30f851(0x1fa)+_0x136381*0x2+_0x30f851(0x235))),await new Promise(_0xdcf203=>setTimeout(_0xdcf203,_0x412257)),_0x136381++;}_0x136381>=_0x51b550&&console[_0x30f851(0x29e)](a54_0x22d6d4[_0x30f851(0x1d6)](_0x30f851(0x130)));}['renderTimeline'](_0x42571d,_0x451cad,_0x25df8b){const _0x4c33ac=a54_0x2cd64f,_0x40ff70=[],_0x5e34c7=TIMELINE_CONFIG[_0x4c33ac(0x21b)],_0x4b24b8=0x5,_0x90b6ee=process[_0x4c33ac(0x25e)][_0x4c33ac(0x26d)]||0x78,_0x447d02=_0x90b6ee-_0x5e34c7-_0x4b24b8,_0xf98b48=Math[_0x4c33ac(0x123)](TIMELINE_CONFIG[_0x4c33ac(0x208)],Math[_0x4c33ac(0x228)](_0x447d02,TIMELINE_CONFIG[_0x4c33ac(0x1f6)])),_0x137204=new Date(_0x42571d[_0x4c33ac(0x215)])[_0x4c33ac(0x20d)](),_0x87e824=_0x42571d[_0x4c33ac(0x20f)]?new Date(_0x42571d['finishedAt'])[_0x4c33ac(0x20d)]():Date[_0x4c33ac(0x2ab)](),_0x2cb0bd={'start':_0x137204,'end':_0x87e824,'duration':_0x87e824-_0x137204},_0x255960=new Map(),_0x2702f5=[];for(const _0x3a124e of _0x451cad){if(_0x3a124e[_0x4c33ac(0x21a)]){const _0x117fa1=new Date(_0x3a124e['startedAt'])[_0x4c33ac(0x20d)](),_0x4b4d3f=_0x3a124e[_0x4c33ac(0x27c)]?new Date(_0x3a124e[_0x4c33ac(0x27c)])[_0x4c33ac(0x20d)]():Date[_0x4c33ac(0x2ab)](),_0x11f0b7={'start':_0x117fa1,'end':_0x4b4d3f,'duration':_0x4b4d3f-_0x117fa1};_0x255960[_0x4c33ac(0x257)](_0x3a124e['id'],_0x11f0b7),_0x2702f5[_0x4c33ac(0x2a3)]({'name':_0x3a124e[_0x4c33ac(0x274)],'state':_0x3a124e[_0x4c33ac(0x231)]||_0x4c33ac(0x20b),'window':_0x11f0b7});}else _0x2702f5['push']({'name':_0x3a124e[_0x4c33ac(0x274)],'state':_0x3a124e[_0x4c33ac(0x231)]||_0x4c33ac(0x22e),'window':undefined});}_0x2702f5[_0x4c33ac(0x19b)]((_0x28962b,_0x40eede)=>{const _0xec562d=_0x4c33ac;if(!_0x28962b['window'])return 0x1;if(!_0x40eede[_0xec562d(0x19d)])return-0x1;return _0x28962b[_0xec562d(0x19d)][_0xec562d(0x277)]-_0x40eede[_0xec562d(0x19d)][_0xec562d(0x277)];});const _0x51cdc7=_0x2702f5[_0x4c33ac(0x289)],_0x3c1ea8=_0x51cdc7>TIMELINE_CONFIG[_0x4c33ac(0x23d)];_0x3c1ea8&&_0x2702f5['splice'](TIMELINE_CONFIG[_0x4c33ac(0x23d)]);const _0x565e28=calculateTimeScale(_0x2cb0bd,_0xf98b48),_0x443b65=_0x42571d[_0x4c33ac(0x1d7)]?_0x42571d[_0x4c33ac(0x197)]?a54_0x22d6d4[_0x4c33ac(0x145)]('success'):a54_0x22d6d4[_0x4c33ac(0x297)](_0x4c33ac(0x29e)):a54_0x22d6d4['blue'](_0x4c33ac(0x1f0)),_0x284232=_0x42571d[_0x4c33ac(0x241)]?.['id'],_0x1d4caa=_0x42571d[_0x4c33ac(0x1a9)];let _0x123c24;if(_0x284232&&_0x1d4caa){const _0x40ad91=getWorkflowAttemptUrl(_0x25df8b,_0x284232,_0x1d4caa,_0x42571d['id']);_0x123c24=hyperlink(a54_0x22d6d4['dim'](_0x42571d['id']),_0x40ad91);}else _0x123c24=a54_0x22d6d4[_0x4c33ac(0x149)](_0x42571d['id']);_0x40ff70[_0x4c33ac(0x2a3)](_0x4c33ac(0x1d9)+_0x123c24+_0x4c33ac(0x15b)+_0x443b65+'\x20-\x20'+formatElapsed(_0x2cb0bd[_0x4c33ac(0x2bd)]));if(_0x2702f5[_0x4c33ac(0x289)]>0x0){const _0xbb087f=renderTimeAxis(_0x565e28,_0xf98b48),_0x11fa73=new Date(_0x2cb0bd[_0x4c33ac(0x277)]),_0x23f673=formatDate(_0x11fa73),_0x552332=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x4c33ac(0x2a4)]+_0x5e34c7,_0x5dc499=_0x23f673[_0x4c33ac(0x255)](_0x552332),_0x4c0a43=a54_0x22d6d4[_0x4c33ac(0x149)](_0x5dc499);_0x40ff70[_0x4c33ac(0x2a3)](_0x4c0a43+'\x20'+_0xbb087f);for(const _0x46451e of _0x2702f5){_0x40ff70[_0x4c33ac(0x2a3)](renderTaskRow(_0x46451e,_0x565e28,_0xf98b48,_0x5e34c7));}const _0x48a911=calculateStats(_0x2702f5);_0x40ff70['push'](formatStats(_0x48a911)),_0x3c1ea8&&_0x40ff70['push'](a54_0x22d6d4[_0x4c33ac(0x1d6)](_0x4c33ac(0x2ce)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x4c33ac(0x1bb)+_0x51cdc7+_0x4c33ac(0x259))),_0x40ff70[_0x4c33ac(0x2a3)](''),_0x40ff70['push'](a54_0x22d6d4[_0x4c33ac(0x149)](_0x4c33ac(0x288))+(_0x4c33ac(0x26f)+_0x42571d['id']+_0x4c33ac(0x202))+a54_0x22d6d4['dim'](_0x4c33ac(0x29f)));}else _0x40ff70[_0x4c33ac(0x2a3)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x40ff70[_0x4c33ac(0x184)]('\x0a');}[a54_0x2cd64f(0x23f)](_0x441244,_0x11d822){const _0x2a70e5=a54_0x2cd64f,_0x1a819d=new Date(_0x441244[_0x2a70e5(0x215)])[_0x2a70e5(0x20d)](),_0x2907b0=_0x441244['finishedAt']?new Date(_0x441244[_0x2a70e5(0x20f)])['getTime']():Date[_0x2a70e5(0x2ab)](),_0x30c955=_0x2907b0-_0x1a819d,_0x190deb=[];for(const _0x118295 of _0x11d822){if(_0x118295[_0x2a70e5(0x21a)]){const _0x4a5ef7=new Date(_0x118295[_0x2a70e5(0x21a)])[_0x2a70e5(0x20d)](),_0x415e61=_0x118295[_0x2a70e5(0x27c)]?new Date(_0x118295[_0x2a70e5(0x27c)])[_0x2a70e5(0x20d)]():Date[_0x2a70e5(0x2ab)]();_0x190deb[_0x2a70e5(0x2a3)]({'name':_0x118295[_0x2a70e5(0x274)],'state':_0x118295[_0x2a70e5(0x231)]||_0x2a70e5(0x20b),'window':{'start':_0x4a5ef7,'end':_0x415e61,'duration':_0x415e61-_0x4a5ef7}});}else _0x190deb['push']({'name':_0x118295['fullName'],'state':_0x118295[_0x2a70e5(0x231)]||_0x2a70e5(0x22e),'window':undefined});}const _0xa529a1=calculateStats(_0x190deb);return{'attempt':{'id':_0x441244['id'],'status':_0x441244[_0x2a70e5(0x1d7)]?_0x441244[_0x2a70e5(0x197)]?_0x2a70e5(0x197):_0x2a70e5(0x29e):'running','createdAt':_0x441244[_0x2a70e5(0x215)],'finishedAt':_0x441244['finishedAt'],'duration_ms':_0x30c955},'tasks':_0x190deb[_0x2a70e5(0x245)](_0x29663f=>({'name':_0x29663f[_0x2a70e5(0x131)],'state':_0x29663f[_0x2a70e5(0x231)],'startedAt':_0x29663f[_0x2a70e5(0x19d)]?new Date(_0x29663f['window'][_0x2a70e5(0x277)])[_0x2a70e5(0x237)]():null,'updatedAt':_0x29663f[_0x2a70e5(0x19d)]?new Date(_0x29663f['window']['end'])[_0x2a70e5(0x237)]():null,'duration_ms':_0x29663f['window']?.[_0x2a70e5(0x2bd)]||null})),'stats':_0xa529a1};}}
|
|
1
|
+
const a54_0x54edc0=a54_0xccde;(function(_0x879e37,_0x2ecedf){const _0x3774dd=a54_0xccde,_0x52ee58=_0x879e37();while(!![]){try{const _0xe8d569=parseInt(_0x3774dd(0x149))/0x1*(-parseInt(_0x3774dd(0x19a))/0x2)+parseInt(_0x3774dd(0x27e))/0x3+parseInt(_0x3774dd(0x134))/0x4*(parseInt(_0x3774dd(0x280))/0x5)+-parseInt(_0x3774dd(0x299))/0x6*(parseInt(_0x3774dd(0x2b6))/0x7)+-parseInt(_0x3774dd(0x2bf))/0x8*(parseInt(_0x3774dd(0x2b2))/0x9)+parseInt(_0x3774dd(0x2ae))/0xa*(-parseInt(_0x3774dd(0x197))/0xb)+parseInt(_0x3774dd(0x18e))/0xc*(parseInt(_0x3774dd(0x13f))/0xd);if(_0xe8d569===_0x2ecedf)break;else _0x52ee58['push'](_0x52ee58['shift']());}catch(_0xd22bc){_0x52ee58['push'](_0x52ee58['shift']());}}}(a54_0x11ab,0xdb0f3));import a54_0x26125e from'chalk';function a54_0xccde(_0x5aebd0,_0x5a266d){_0x5aebd0=_0x5aebd0-0x11c;const _0x11ab96=a54_0x11ab();let _0xccded9=_0x11ab96[_0x5aebd0];return _0xccded9;}import{existsSync}from'fs';import a54_0x1db018 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,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 a54_0x1aee3d from'prompts';function getAttemptStatusDisplay(_0x16f32b){const _0x300276=a54_0xccde;if(!_0x16f32b)return{'icon':'⏳','text':''};const {done:_0x562d4c,success:_0x1b7f6b,cancelRequested:_0x5ddda5}=_0x16f32b;if(!_0x562d4c)return _0x5ddda5?{'icon':'🛑','text':a54_0x26125e[_0x300276(0x21c)](_0x300276(0x17d))}:{'icon':'🔄','text':a54_0x26125e['blue'](_0x300276(0x187))};if(_0x1b7f6b)return{'icon':'✅','text':a54_0x26125e[_0x300276(0x208)](_0x300276(0x2bb))};return{'icon':'❌','text':a54_0x26125e[_0x300276(0x16f)](_0x300276(0x279))};}export class WorkflowBaseCommand extends BaseCommand{[a54_0x54edc0(0x2bd)](_0xba37e5,_0x4b0a8b,_0x109fce=0x0){const _0x963863=a54_0x54edc0;return _0xba37e5[_0x109fce]||_0x4b0a8b[_0x963863(0x198)];}['requireProject'](_0x18aec7,_0x12d0bd,_0x496b72=0x0){const _0x4154c4=a54_0x54edc0,_0x87a9a0=this[_0x4154c4(0x2bd)](_0x18aec7,_0x12d0bd,_0x496b72);if(!_0x87a9a0)return console[_0x4154c4(0x279)](a54_0x26125e['red'](_0x4154c4(0x14e)),'Project\x20name\x20is\x20required'),console['error'](a54_0x26125e['dim'](_0x4154c4(0x1eb))),null;return _0x87a9a0;}[a54_0x54edc0(0x124)](_0x19fb18,_0x1a664f){const _0x3f6029=a54_0x54edc0;if(_0x19fb18[0x0]){const _0x5d5194=_0x19fb18[0x0][_0x3f6029(0x210)]('.');if(_0x5d5194[_0x3f6029(0x274)]===0x1)return{'projectName':_0x5d5194[0x0],'workflowName':undefined};else return _0x5d5194['length']===0x2?{'projectName':_0x5d5194[0x0],'workflowName':_0x5d5194[0x1]}:(console['error'](a54_0x26125e[_0x3f6029(0x16f)](_0x3f6029(0x14e)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x1a664f[_0x3f6029(0x198)],'workflowName':undefined};}[a54_0x54edc0(0x1a1)](_0x249237,_0x585c6d,_0x55da15=0x0){const _0x1df6f8=a54_0x54edc0;if(_0x249237[_0x55da15])return _0x249237[_0x55da15];if(_0x585c6d[_0x1df6f8(0x198)]){const _0x2aab6c=a54_0x1db018['join'](process['cwd'](),_0x1df6f8(0x189),_0x585c6d['workflowProject']);if(existsSync(a54_0x1db018[_0x1df6f8(0x2a6)](_0x2aab6c,'tdx.json')))return _0x2aab6c;}return undefined;}async[a54_0x54edc0(0x140)](_0x43b851,_0x376d6d,_0x891256){const _0x474518=a54_0x54edc0;try{const _0x1f1c68=await _0x43b851['workflow'][_0x474518(0x189)](_0x376d6d,{'limit':0x1});if(_0x1f1c68[_0x474518(0x274)]>0x0){const _0x570d0d=_0x1f1c68[0x0]['id'],_0x44140e=getWorkflowUrl(_0x891256,_0x570d0d);console['error'](_0x474518(0x15e)+a54_0x26125e['cyan'](_0x44140e));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a54_0x54edc0(0x231)]='workflow:use';[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x1b7);async[a54_0x54edc0(0x256)](_0x325fa8){const _0x567bdf=a54_0x54edc0,{options:_0x5ba579,args:_0x4b8548,tdx:_0x11dcae}=_0x325fa8,_0x512c72=_0x4b8548[0x0],_0x39f81a=_0x5ba579[_0x567bdf(0x23d)];if(_0x39f81a)return saveSessionContext({'workflow_project':undefined},_0x5ba579[_0x567bdf(0x27d)]),console[_0x567bdf(0x25d)](a54_0x26125e['green']('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x512c72)return console['error'](a54_0x26125e[_0x567bdf(0x16f)](_0x567bdf(0x14e)),_0x567bdf(0x2c0)),console[_0x567bdf(0x279)](a54_0x26125e[_0x567bdf(0x13e)](_0x567bdf(0x2c8))),console[_0x567bdf(0x279)](a54_0x26125e[_0x567bdf(0x13e)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x30621b=await withSpinner(_0x567bdf(0x1fd)+_0x512c72+_0x567bdf(0x216),()=>_0x11dcae[_0x567bdf(0x169)][_0x567bdf(0x192)](_0x512c72),{'verbose':_0x5ba579[_0x567bdf(0x1f9)]}),{name:_0x322ae8}=_0x30621b['data'];return saveSessionContext({'workflow_project':_0x322ae8},_0x5ba579[_0x567bdf(0x27d)]),console[_0x567bdf(0x25d)](a54_0x26125e[_0x567bdf(0x208)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a54_0x26125e['cyan'](_0x322ae8))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a54_0x54edc0(0x231)]='workflow:projects';[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x25f);async['execute'](_0x5de221){const _0x1460ef=a54_0x54edc0,{options:_0x3d3e54,args:_0x5a72d6,tdx:_0x3f4742}=_0x5de221,_0x569776=_0x5a72d6[0x0];_0x3d3e54[_0x1460ef(0x1f9)]&&_0x569776&&console[_0x1460ef(0x279)](_0x1460ef(0x1ac)+_0x569776);const _0x27fab8=await withSpinner(_0x1460ef(0x138),()=>_0x3f4742[_0x1460ef(0x169)][_0x1460ef(0x262)](_0x569776,{'limit':_0x3d3e54[_0x1460ef(0x21e)]}),{'verbose':_0x3d3e54['verbose']});let _0x3977ea=_0x27fab8[_0x1460ef(0x199)];_0x3977ea[_0x1460ef(0x1f8)]((_0x4d0658,_0x4f7518)=>_0x4d0658['name'][_0x1460ef(0x267)](_0x4f7518['name']));const _0x408c03=_0x3d3e54[_0x1460ef(0x21e)]||0x64,_0x3224c3=_0x3977ea[_0x1460ef(0x274)]>=_0x408c03?a54_0x26125e[_0x1460ef(0x13e)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x1460ef(0x279)](_0x1460ef(0x272)+_0x3977ea[_0x1460ef(0x274)]+_0x1460ef(0x243)+(_0x3977ea['length']!==0x1?'s':'')+_0x3224c3);if(_0x3d3e54['format']===_0x1460ef(0x11d)||_0x3d3e54[_0x1460ef(0x185)]===_0x1460ef(0x245)||_0x3d3e54[_0x1460ef(0x185)]==='table')await handleSDKOutput(_0x3977ea,_0x3d3e54);else{if(_0x3977ea['length']===0x0)_0x569776?console[_0x1460ef(0x25d)](_0x1460ef(0x273)+_0x569776):console[_0x1460ef(0x25d)]('No\x20workflow\x20projects\x20found');else{const _0x4e7bc3=_0x3977ea[_0x1460ef(0x136)](_0x4ffa30=>{const _0x575aec=_0x1460ef,_0x55c8ec=_0x4ffa30['metadata']?.['some'](_0x2d398d=>_0x2d398d[_0x575aec(0x254)]===_0x575aec(0x23f)),_0x19e6ef=_0x55c8ec?a54_0x26125e[_0x575aec(0x13e)](_0x575aec(0x230)):'';return _0x575aec(0x2b1)+_0x4ffa30[_0x575aec(0x231)]+_0x19e6ef;});await writeOutput(_0x4e7bc3['join']('\x0a'),_0x3d3e54[_0x1460ef(0x2c5)],_0x1460ef(0x222));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]='workflow:workflows';[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x181);async[a54_0x54edc0(0x256)](_0x2855f3){const _0x326b34=a54_0x54edc0,{options:_0x451172,args:_0x5a6fd7,tdx:_0x46edac}=_0x2855f3,_0x26c44d=this['resolveProject'](_0x5a6fd7,_0x451172);_0x451172[_0x326b34(0x1f9)]&&_0x26c44d&&console['error']('Project\x20filter:\x20'+_0x26c44d);const _0x2a756a=await withSpinner(_0x326b34(0x295),()=>_0x46edac[_0x326b34(0x169)]['workflows'](_0x26c44d,{'limit':_0x451172['limit']}),{'verbose':_0x451172['verbose']});let _0x130b00=_0x2a756a[_0x326b34(0x199)];_0x130b00[_0x326b34(0x1f8)]((_0x2332dc,_0x25c143)=>{const _0x228061=_0x326b34,_0xc8176=_0x2332dc[_0x228061(0x231)]['localeCompare'](_0x25c143[_0x228061(0x231)]);if(_0xc8176!==0x0)return _0xc8176;return(_0x2332dc[_0x228061(0x21d)]?.[_0x228061(0x231)]||'')[_0x228061(0x267)](_0x25c143['project']?.[_0x228061(0x231)]||'');});const _0x2b748c=_0x451172[_0x326b34(0x21e)]||0x64,_0x1b5a3f=_0x130b00[_0x326b34(0x274)]>=_0x2b748c?a54_0x26125e[_0x326b34(0x13e)](_0x326b34(0x24b)):'';console[_0x326b34(0x279)](_0x326b34(0x272)+_0x130b00['length']+_0x326b34(0x238)+(_0x130b00['length']!==0x1?'s':'')+_0x1b5a3f);if(_0x451172[_0x326b34(0x185)]==='json'||_0x451172['format']===_0x326b34(0x245)||_0x451172[_0x326b34(0x185)]===_0x326b34(0x1c2))await handleSDKOutput(_0x130b00,_0x451172);else{if(_0x130b00[_0x326b34(0x274)]===0x0)_0x26c44d?console[_0x326b34(0x25d)](_0x326b34(0x294)+_0x26c44d):console[_0x326b34(0x25d)]('No\x20workflows\x20found');else{const _0x2789ba=_0x451172[_0x326b34(0x232)],_0x41f0a1=_0x130b00['map'](_0x47616c=>{const _0x211c2a=_0x326b34,_0x1c7724=a54_0x26125e[_0x211c2a(0x13e)]('#'+_0x47616c['id']),_0x2b237a=hyperlink(_0x1c7724,getWorkflowUrl(_0x2789ba,_0x47616c['id'])),_0x343c0f=_0x47616c['project']?.[_0x211c2a(0x231)]?a54_0x26125e[_0x211c2a(0x13e)]('\x20('+_0x47616c[_0x211c2a(0x21d)][_0x211c2a(0x231)]+')'):'';return _0x211c2a(0x288)+_0x2b237a+'\x20'+_0x47616c[_0x211c2a(0x231)]+_0x343c0f;});await writeOutput(_0x41f0a1[_0x326b34(0x2a6)]('\x0a'),_0x451172['output'],_0x326b34(0x222));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]='workflow:sessions';[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x15b);async[a54_0x54edc0(0x256)](_0x3c65aa){const _0x5e4ba4=a54_0x54edc0,{options:_0x4e4cdb,args:_0x1c00e6,tdx:_0x8f4fde}=_0x3c65aa,_0x4d548a=this[_0x5e4ba4(0x124)](_0x1c00e6,_0x4e4cdb);if(!_0x4d548a)return 0x1;const {projectName:_0x276c11,workflowName:_0x3de4da}=_0x4d548a;if(_0x4e4cdb[_0x5e4ba4(0x1f9)]){if(_0x276c11&&_0x3de4da)console[_0x5e4ba4(0x279)](_0x5e4ba4(0x2a7)+_0x276c11+'.'+_0x3de4da);else _0x276c11&&console[_0x5e4ba4(0x279)](_0x5e4ba4(0x22e)+_0x276c11);const _0x31e9a1=_0x4e4cdb[_0x5e4ba4(0x156)];_0x31e9a1&&console[_0x5e4ba4(0x279)](_0x5e4ba4(0x19b)+_0x31e9a1);}let _0x5b569b=0x28;if(process['stdout']['isTTY']&&!_0x4e4cdb[_0x5e4ba4(0x2c5)]&&!_0x4e4cdb[_0x5e4ba4(0x185)]){const _0x4ea3c0=process['stdout'][_0x5e4ba4(0x20b)]||0x28;_0x5b569b=Math[_0x5e4ba4(0x224)](0x14,Math[_0x5e4ba4(0x287)](_0x4ea3c0*0x2/0x3));}const _0x24a9e4=_0x4e4cdb[_0x5e4ba4(0x21e)]||_0x5b569b,_0x49db2b=await withSpinner(_0x5e4ba4(0x2a0),()=>_0x8f4fde[_0x5e4ba4(0x169)][_0x5e4ba4(0x173)]({'projectName':_0x276c11,'workflowName':_0x3de4da,'status':_0x4e4cdb['status'],'fromTime':_0x4e4cdb[_0x5e4ba4(0x213)],'toTime':_0x4e4cdb['to'],'limit':_0x24a9e4}),{'verbose':_0x4e4cdb[_0x5e4ba4(0x1f9)]}),_0x3a5f61=_0x49db2b['data'];_0x3a5f61[_0x5e4ba4(0x1f8)]((_0x1e806e,_0x21a2e6)=>{const _0x158ab3=_0x5e4ba4,_0x2ce1eb=_0x1e806e[_0x158ab3(0x2b9)]||'',_0x6210db=_0x21a2e6['sessionTime']||'';return _0x6210db[_0x158ab3(0x267)](_0x2ce1eb);});_0x3a5f61[_0x5e4ba4(0x274)]>=_0x24a9e4?console[_0x5e4ba4(0x279)]('✔\x20Showing\x20'+_0x3a5f61[_0x5e4ba4(0x274)]+'\x20sessions\x20'+a54_0x26125e[_0x5e4ba4(0x13e)](_0x5e4ba4(0x201))):console[_0x5e4ba4(0x279)](_0x5e4ba4(0x272)+_0x3a5f61[_0x5e4ba4(0x274)]+_0x5e4ba4(0x1ab)+(_0x3a5f61['length']!==0x1?'s':''));if(_0x4e4cdb[_0x5e4ba4(0x185)]===_0x5e4ba4(0x11d)||_0x4e4cdb[_0x5e4ba4(0x185)]===_0x5e4ba4(0x245)||_0x4e4cdb[_0x5e4ba4(0x185)]===_0x5e4ba4(0x1c2))await handleSDKOutput(_0x3a5f61,_0x4e4cdb);else{if(!process[_0x5e4ba4(0x1ce)][_0x5e4ba4(0x170)]||_0x4e4cdb['output']){if(_0x3a5f61['length']===0x0){if(_0x276c11&&_0x3de4da)console[_0x5e4ba4(0x25d)](_0x5e4ba4(0x13a)+_0x276c11+'.'+_0x3de4da);else _0x276c11?console[_0x5e4ba4(0x25d)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x276c11):console[_0x5e4ba4(0x25d)](_0x5e4ba4(0x2ca));}else{const _0x487e7c=_0x4e4cdb[_0x5e4ba4(0x232)],_0xd5845b=this[_0x5e4ba4(0x1d6)](_0x3a5f61,_0x487e7c);_0x4e4cdb[_0x5e4ba4(0x2c5)]?await writeOutput(_0xd5845b,_0x4e4cdb[_0x5e4ba4(0x2c5)],_0x5e4ba4(0x222)):console['log'](_0xd5845b);}!_0x276c11&&(console[_0x5e4ba4(0x279)](''),console[_0x5e4ba4(0x279)](a54_0x26125e['dim']('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x5e4ba4(0x279)](a54_0x26125e['dim'](_0x5e4ba4(0x25a))+'or'+a54_0x26125e['dim'](_0x5e4ba4(0x20c))));}else{if(_0x3a5f61['length']===0x0){if(_0x276c11&&_0x3de4da)console['log'](_0x5e4ba4(0x13a)+_0x276c11+'.'+_0x3de4da);else _0x276c11?console[_0x5e4ba4(0x25d)](_0x5e4ba4(0x21a)+_0x276c11):console[_0x5e4ba4(0x25d)](_0x5e4ba4(0x2ca));}else await this[_0x5e4ba4(0x1d5)](_0x3a5f61,_0x3c65aa,_0x276c11);}}return 0x0;}[a54_0x54edc0(0x1d6)](_0x234331,_0x3d59f1){const _0x30797e=a54_0x54edc0,_0x47e623=[],_0x163d7b=new Map();let _0x35d81d=Infinity,_0xaa2251=-Infinity;for(const _0x505d7f of _0x234331){if(_0x505d7f['lastAttempt']?.['createdAt']){const _0x2595e5=new Date(_0x505d7f[_0x30797e(0x2b7)][_0x30797e(0x145)])[_0x30797e(0x284)](),_0x41ff5f=_0x505d7f[_0x30797e(0x2b7)][_0x30797e(0x16e)]?new Date(_0x505d7f['lastAttempt'][_0x30797e(0x16e)])['getTime']():Date[_0x30797e(0x2be)](),_0x5eccb8=_0x505d7f[_0x30797e(0x21d)]?.[_0x30797e(0x231)]||'(unknown)';!_0x163d7b[_0x30797e(0x2aa)](_0x5eccb8)&&_0x163d7b['set'](_0x5eccb8,[]),_0x163d7b['get'](_0x5eccb8)[_0x30797e(0x167)]({'session':_0x505d7f,'startTime':_0x2595e5,'endTime':_0x41ff5f,'duration':_0x41ff5f-_0x2595e5}),_0x35d81d=Math[_0x30797e(0x121)](_0x35d81d,_0x2595e5),_0xaa2251=Math[_0x30797e(0x224)](_0xaa2251,_0x41ff5f);}}if(_0x163d7b[_0x30797e(0x1da)]===0x0)return _0x30797e(0x241);const _0x2aedaa=process['stdout'][_0x30797e(0x2c3)]||0x78,_0x18a317=0x1e,_0x593c4d=0x32,_0x6dfdd8=0x4,_0x27a2f4=Math[_0x30797e(0x121)](_0x593c4d,Math['max'](_0x18a317,Math['floor'](_0x2aedaa*0.3))),_0x38f266=_0x2aedaa-_0x27a2f4-TIMELINE_CONFIG['GUTTER']-0x3-_0x6dfdd8,_0x1572af=_0xaa2251-_0x35d81d,_0xf99a2c=_0x1572af/_0x27a2f4,_0x4251af=renderTimeAxis({'startTime':_0x35d81d,'endTime':_0xaa2251,'durationMs':_0x1572af,'msPerChar':_0xf99a2c},_0x27a2f4),_0x23e5bf=[];for(const _0x272302 of _0x163d7b[_0x30797e(0x211)]()){_0x23e5bf[_0x30797e(0x167)](..._0x272302);}_0x23e5bf[_0x30797e(0x1f8)]((_0x32eea1,_0x4c71b8)=>_0x4c71b8[_0x30797e(0x1fa)]-_0x32eea1[_0x30797e(0x1fa)]);const _0x3b87b1=new Date(_0x35d81d),_0x909add=formatDate(_0x3b87b1),_0x2d9b82=_0x6dfdd8+TIMELINE_CONFIG[_0x30797e(0x162)]+TIMELINE_CONFIG[_0x30797e(0x1b1)]+_0x38f266,_0x5b47b0='\x20'[_0x30797e(0x258)](_0x2d9b82-_0x909add[_0x30797e(0x274)]),_0x55a1a4=_0x5b47b0+a54_0x26125e['dim'](_0x909add)+'\x20'+_0x4251af;_0x47e623[_0x30797e(0x167)](_0x55a1a4);const _0x8ab5b3=0x16;let _0x1c6c09=0x0;for(const _0x288176 of _0x23e5bf){const _0x35cdc6=_0x288176[_0x30797e(0x27d)][_0x30797e(0x21d)]?.[_0x30797e(0x231)]||'?',_0x6625d6=Math[_0x30797e(0x121)](stringWidth(_0x35cdc6),_0x8ab5b3);_0x1c6c09=Math[_0x30797e(0x224)](_0x1c6c09,_0x6625d6);}for(const _0x2f48c3 of _0x23e5bf){const {session:_0xcc2ec0,startTime:_0x4fa765,endTime:_0x3c6116,duration:_0x5581c3}=_0x2f48c3,_0x4d6f27=_0xcc2ec0[_0x30797e(0x21d)]?.['id'],_0x2cc2f3=_0xcc2ec0['id'],_0x1be73c=_0xcc2ec0[_0x30797e(0x21d)]?.['name']||'?',_0x4f345c=_0xcc2ec0[_0x30797e(0x169)]?.[_0x30797e(0x231)]||'?';let _0x49f365,_0x3f41b4;if(_0xcc2ec0['lastAttempt']){const _0xf8fb4e=_0xcc2ec0[_0x30797e(0x2b7)];!_0xf8fb4e['done']?(_0x49f365=_0xf8fb4e[_0x30797e(0x1f3)]?'🛑':'🔄',_0x3f41b4=_0xf8fb4e[_0x30797e(0x1f3)]?a54_0x26125e[_0x30797e(0x21c)]:a54_0x26125e[_0x30797e(0x154)]):(_0x49f365=_0xf8fb4e[_0x30797e(0x2bb)]?'✅':'❌',_0x3f41b4=_0xf8fb4e['success']?a54_0x26125e[_0x30797e(0x208)]:a54_0x26125e[_0x30797e(0x16f)]);}else _0x49f365='⏳',_0x3f41b4=a54_0x26125e[_0x30797e(0x13e)];const _0x63860e='#'+_0x2cc2f3,_0x3c5783=_0x4d6f27?hyperlink(_0x63860e,getWorkflowSessionUrl(_0x3d59f1,_0x4d6f27,_0x2cc2f3)):_0x63860e;let _0x15c7da=_0x1be73c;stringWidth(_0x1be73c)>_0x8ab5b3&&(_0x15c7da=_0x1be73c['slice'](0x0,_0x8ab5b3-0x1)+'…');const _0x1cba9f=a54_0x26125e['dim'](_0x15c7da),_0xb84d2b=stringWidth(_0x15c7da),_0x4f89fa='\x20'[_0x30797e(0x258)](_0x1c6c09-stringWidth(_0x15c7da)+0x2),_0x2eb65c='('+formatElapsed(_0x5581c3)+')',_0x1f107f=stringWidth(_0x2eb65c),_0xfaf3f8=stringWidth(_0x63860e),_0x5de900=_0xfaf3f8+0x1+_0xb84d2b+_0x4f89fa['length'],_0x566537=_0x38f266-_0x5de900-_0x1f107f-0x1-0x8;let _0x3be978=_0x4f345c;stringWidth(_0x3be978)>_0x566537&&(_0x3be978=_0x3be978[_0x30797e(0x12d)](0x0,_0x566537-0x1)+'…');const _0x35ff3b=_0x3c5783+'\x20'+_0x1cba9f+_0x4f89fa+_0x3be978,_0x1bb947=stringWidth(_0x35ff3b),_0x1b46ce=_0x38f266-_0x1bb947-_0x1f107f,_0x23585f=_0x35ff3b+'\x20'[_0x30797e(0x258)](Math[_0x30797e(0x224)](0x1,_0x1b46ce))+a54_0x26125e[_0x30797e(0x13e)](_0x2eb65c),_0x16be0e=Math[_0x30797e(0x287)]((_0x4fa765-_0x35d81d)/_0xf99a2c),_0x22e14e=Math[_0x30797e(0x287)]((_0x3c6116-_0x35d81d)/_0xf99a2c),_0x188467=Math[_0x30797e(0x224)](_0x16be0e+0x1,_0x22e14e),_0x4fc81d=new Array(_0x27a2f4)[_0x30797e(0x28b)]('\x20');for(let _0x52245a=_0x16be0e;_0x52245a<Math[_0x30797e(0x121)](_0x188467,_0x27a2f4);_0x52245a++){_0x4fc81d[_0x52245a]='─';}const _0x66e72c=_0x4fc81d[_0x30797e(0x136)](_0x290202=>_0x290202==='\x20'?'\x20':_0x3f41b4(_0x290202))['join']('');_0x47e623[_0x30797e(0x167)](_0x49f365+'\x20'+_0x23585f+'│'+_0x66e72c+'│');}return _0x47e623[_0x30797e(0x2a6)]('\x0a');}async[a54_0x54edc0(0x1d5)](_0x711a8c,_0x12cc86,_0x49326e){const _0x41b9bc=a54_0x54edc0,{options:_0x243956,tdx:_0x5ae6fc}=_0x12cc86,_0x1265fa=_0x243956['site'],{timelineRows:_0x6ce810,timeAxisHeader:_0x3d1ddf}=this[_0x41b9bc(0x195)](_0x711a8c,_0x1265fa),_0x5d0f46=_0x6ce810[_0x41b9bc(0x217)](_0x5e2759=>_0x5e2759['attemptId']);if(_0x5d0f46[_0x41b9bc(0x274)]===0x0){const _0x458f34=this[_0x41b9bc(0x1d6)](_0x711a8c,_0x1265fa);console[_0x41b9bc(0x25d)](_0x458f34);!_0x49326e&&(console[_0x41b9bc(0x279)](''),console[_0x41b9bc(0x279)](a54_0x26125e['dim'](_0x41b9bc(0x2c1))),console[_0x41b9bc(0x279)](a54_0x26125e['dim'](_0x41b9bc(0x25a))+'or'+a54_0x26125e['dim'](_0x41b9bc(0x20c))));return;}_0x3d1ddf&&console['log'](_0x3d1ddf);const _0x295619=_0x6ce810[_0x41b9bc(0x217)](_0x28674f=>_0x28674f[_0x41b9bc(0x28e)])[_0x41b9bc(0x136)](_0x24a6bd=>({'title':_0x24a6bd[_0x41b9bc(0x1d3)],'value':_0x24a6bd[_0x41b9bc(0x28e)]})),_0x2258bb=process[_0x41b9bc(0x1ce)][_0x41b9bc(0x20b)]||0x3c,_0x44d998=Math[_0x41b9bc(0x224)](0x28,Math[_0x41b9bc(0x287)](_0x2258bb*0x2/0x3)),_0x202088=await a54_0x1aee3d({'type':_0x41b9bc(0x250),'name':_0x41b9bc(0x28e),'message':_0x41b9bc(0x1c4),'choices':_0x295619,'initial':-0x1,'limit':_0x44d998,'clearFirst':!![],'fallback':{'title':_0x41b9bc(0x130),'value':null},'suggest':(_0x333e2d,_0x3ec979)=>{const _0x58cb7a=_0x41b9bc;if(!_0x333e2d)return Promise[_0x58cb7a(0x236)](_0x3ec979);const _0x4e81b4=_0x3ec979['filter'](_0x291a8d=>{const _0x3bdc1e=_0x58cb7a,_0x72439c=_0x291a8d;return _0x72439c[_0x3bdc1e(0x228)]['toLowerCase']()[_0x3bdc1e(0x183)](_0x333e2d[_0x3bdc1e(0x286)]());});return Promise[_0x58cb7a(0x236)](_0x4e81b4);}}),_0x32ed9d=()=>{const _0x2447a9=_0x41b9bc;process[_0x2447a9(0x1ce)]['write'](_0x2447a9(0x1d2)),process[_0x2447a9(0x1ce)][_0x2447a9(0x15c)](_0x2447a9(0x1d2)),process[_0x2447a9(0x1ce)][_0x2447a9(0x15c)](_0x2447a9(0x1d2));},_0x38995a=_0x202088&&_0x202088[_0x41b9bc(0x28e)]&&_0x202088[_0x41b9bc(0x28e)]!==null&&_0x202088[_0x41b9bc(0x28e)][_0x41b9bc(0x234)]()!=='';if(!_0x38995a){_0x32ed9d(),console['log'](a54_0x26125e['dim'](_0x41b9bc(0x1cf)));return;}_0x32ed9d();const _0x18ce0f=_0x711a8c[_0x41b9bc(0x1b0)](_0x231f73=>_0x231f73[_0x41b9bc(0x2b7)]?.['id']===_0x202088['attemptId']);if(_0x18ce0f){const _0x4ca4f1=_0x18ce0f[_0x41b9bc(0x21d)]?.['name']||'?',_0x5b65c5=_0x18ce0f[_0x41b9bc(0x169)]?.[_0x41b9bc(0x231)]||'?';console[_0x41b9bc(0x25d)](_0x41b9bc(0x1e6)+a54_0x26125e['dim'](_0x4ca4f1)+',\x20Workflow:\x20'+a54_0x26125e['dim'](_0x5b65c5));}const _0x76427e=new WorkflowTimelineCommand();await _0x76427e[_0x41b9bc(0x256)]({'args':[],'options':{..._0x243956,'attemptId':_0x202088[_0x41b9bc(0x28e)]},'tdx':_0x5ae6fc});}[a54_0x54edc0(0x195)](_0x37cbe7,_0x495b3a){const _0x44658d=a54_0x54edc0,_0x6d4b2d=new Map();for(const _0x513733 of _0x37cbe7){_0x513733['id']&&_0x513733['lastAttempt']?.['id']&&_0x6d4b2d[_0x44658d(0x11e)](_0x513733['id'],_0x513733['lastAttempt']['id']);}const _0x3930a8=[];let _0x13220f='';const _0x25cf8d=this['renderSessionsTimeline'](_0x37cbe7,_0x495b3a),_0x138877=_0x25cf8d['split']('\x0a');for(const _0x3048c1 of _0x138877){if(_0x3048c1[_0x44658d(0x2b0)](_0x44658d(0x1b5))||_0x3048c1[_0x44658d(0x153)](/^\s+\d{4}-\d{2}-\d{2}/))_0x13220f=_0x3048c1;else{if(_0x3048c1['match'](/^[✅❌🔄🛑⏳]/)){const _0x587f07=_0x3048c1[_0x44658d(0x153)](/#(\d+)/),_0x1eb19b=_0x587f07?_0x587f07[0x1]:null,_0x2791c8=_0x1eb19b?_0x6d4b2d[_0x44658d(0x298)](_0x1eb19b)||null:null,_0x1da8d0=_0x37cbe7[_0x44658d(0x1b0)](_0xd3a951=>_0xd3a951['id']===_0x1eb19b),_0x42baaa=_0x1da8d0?.[_0x44658d(0x21d)]?.['name']||'';_0x3930a8['push']({'displayLine':_0x3048c1,'attemptId':_0x2791c8,'projectName':_0x42baaa});}}}return{'timelineRows':_0x3930a8,'timeAxisHeader':_0x13220f};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']='workflow:attempts';[a54_0x54edc0(0x26a)]='List\x20workflow\x20attempts';async[a54_0x54edc0(0x256)](_0x1bdd1a){const _0x2a773b=a54_0x54edc0,{options:_0x3b9be3,args:_0x3eadf1,tdx:_0x3ff8dc}=_0x1bdd1a,_0x3fa731=this[_0x2a773b(0x124)](_0x3eadf1,_0x3b9be3);if(!_0x3fa731)return 0x1;const {projectName:_0x5d5783,workflowName:_0x265dc5}=_0x3fa731,_0x5aee57=_0x3b9be3[_0x2a773b(0x1d4)];if(_0x3b9be3[_0x2a773b(0x1f9)]){if(_0x5d5783&&_0x265dc5)console[_0x2a773b(0x279)](_0x2a773b(0x2a7)+_0x5d5783+'.'+_0x265dc5);else _0x5d5783&&console[_0x2a773b(0x279)](_0x2a773b(0x22e)+_0x5d5783);_0x5aee57&&console['error'](_0x2a773b(0x158));}const _0x56d522=await withSpinner(_0x2a773b(0x22b),()=>_0x3ff8dc[_0x2a773b(0x169)][_0x2a773b(0x283)]({'projectName':_0x5d5783,'workflowName':_0x265dc5,'includeRetried':_0x5aee57,'limit':_0x3b9be3['limit']}),{'verbose':_0x3b9be3[_0x2a773b(0x1f9)]}),_0x31fb1e=_0x56d522[_0x2a773b(0x199)],_0x192321=_0x3b9be3['limit']||0x64,_0x1aed8f=_0x31fb1e[_0x2a773b(0x274)]>=_0x192321?a54_0x26125e['dim'](_0x2a773b(0x24b)):'';console[_0x2a773b(0x279)](_0x2a773b(0x272)+_0x31fb1e[_0x2a773b(0x274)]+_0x2a773b(0x221)+(_0x31fb1e[_0x2a773b(0x274)]!==0x1?'s':'')+_0x1aed8f);if(_0x3b9be3[_0x2a773b(0x185)]===_0x2a773b(0x11d)||_0x3b9be3[_0x2a773b(0x185)]===_0x2a773b(0x245)||_0x3b9be3[_0x2a773b(0x185)]===_0x2a773b(0x1c2))await handleSDKOutput(_0x31fb1e,_0x3b9be3);else{if(_0x31fb1e['length']===0x0){if(_0x5d5783&&_0x265dc5)console['log']('No\x20attempts\x20found\x20for:\x20'+_0x5d5783+'.'+_0x265dc5);else _0x5d5783?console[_0x2a773b(0x25d)](_0x2a773b(0x126)+_0x5d5783):console[_0x2a773b(0x25d)](_0x2a773b(0x1df));}else{const _0x391173=_0x3b9be3[_0x2a773b(0x232)],_0x42f063=_0x31fb1e['map'](_0x82a4b=>{const _0x5b9e29=_0x2a773b,_0x4e3fe1=a54_0x26125e[_0x5b9e29(0x13e)]('#'+_0x82a4b['id']),_0x305432=_0x82a4b[_0x5b9e29(0x21d)]?.['id'],_0x11c8d7=_0x82a4b[_0x5b9e29(0x1cd)]||_0x82a4b[_0x5b9e29(0x1fe)],_0x460016=_0x305432&&_0x11c8d7?hyperlink(_0x4e3fe1,getWorkflowAttemptUrl(_0x391173,_0x305432,_0x11c8d7,_0x82a4b['id'])):_0x4e3fe1,{icon:_0x23efc9,text:_0x1b3ba6}=getAttemptStatusDisplay(_0x82a4b),_0x144f12=(_0x82a4b[_0x5b9e29(0x21d)]?.[_0x5b9e29(0x231)]||'?')+'.'+(_0x82a4b['workflow']?.[_0x5b9e29(0x231)]||'?'),_0x150ecb=_0x82a4b[_0x5b9e29(0x2b9)]?a54_0x26125e[_0x5b9e29(0x13e)](_0x82a4b[_0x5b9e29(0x2b9)]):'';return(_0x460016+'\x20'+_0x23efc9+(_0x1b3ba6?'\x20'+_0x1b3ba6:'')+'\x20'+_0x144f12+'\x20'+_0x150ecb)[_0x5b9e29(0x14f)]();});await writeOutput(_0x42f063[_0x2a773b(0x2a6)]('\x0a'),_0x3b9be3[_0x2a773b(0x2c5)],_0x2a773b(0x222));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x265);[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x28f);async[a54_0x54edc0(0x256)](_0x10c8e5){const _0x1033b5=a54_0x54edc0,{options:_0x5e9ed7,args:_0xc853cf,tdx:_0x87972d}=_0x10c8e5,_0x3d0c46=_0xc853cf[0x0];if(!_0x3d0c46)return console[_0x1033b5(0x279)](_0x1033b5(0x1bd)),0x1;_0x5e9ed7[_0x1033b5(0x1f9)]&&console[_0x1033b5(0x279)]('Attempt\x20ID:\x20'+_0x3d0c46);const _0x56c9e5=await withSpinner(_0x1033b5(0x1b4),()=>_0x87972d[_0x1033b5(0x169)][_0x1033b5(0x164)](_0x3d0c46),{'verbose':_0x5e9ed7[_0x1033b5(0x1f9)]}),_0x2f0931=_0x56c9e5[_0x1033b5(0x199)];let _0x3fc289;!_0x2f0931['done']?_0x3fc289=_0x2f0931[_0x1033b5(0x1f3)]?_0x1033b5(0x17d):_0x1033b5(0x187):_0x3fc289=_0x2f0931[_0x1033b5(0x2bb)]?_0x1033b5(0x2bb):'error';let _0x132d0b;if(_0x2f0931['createdAt']&&_0x2f0931[_0x1033b5(0x16e)]){const _0x11119a=new Date(_0x2f0931[_0x1033b5(0x145)])[_0x1033b5(0x284)](),_0x950d0b=new Date(_0x2f0931['finishedAt'])[_0x1033b5(0x284)]();_0x132d0b=Math['round']((_0x950d0b-_0x11119a)/0x3e8);}const _0x3ddb97={'attempt_id':_0x2f0931['id'],'status':_0x3fc289,..._0x2f0931[_0x1033b5(0x1e5)]!==undefined&&{'index':_0x2f0931[_0x1033b5(0x1e5)]},..._0x2f0931[_0x1033b5(0x21d)]&&{'project':_0x2f0931[_0x1033b5(0x21d)][_0x1033b5(0x231)]},..._0x2f0931[_0x1033b5(0x169)]&&{'workflow':_0x2f0931[_0x1033b5(0x169)][_0x1033b5(0x231)]},..._0x2f0931[_0x1033b5(0x1fe)]&&{'session_id':_0x2f0931[_0x1033b5(0x1fe)]},..._0x2f0931[_0x1033b5(0x2b9)]&&{'session_time':_0x2f0931[_0x1033b5(0x2b9)]},..._0x2f0931['retryAttemptName']&&{'retry_attempt':_0x2f0931['retryAttemptName']},..._0x132d0b!==undefined&&{'duration_sec':_0x132d0b},..._0x2f0931[_0x1033b5(0x145)]&&{'created_at':_0x2f0931[_0x1033b5(0x145)]},..._0x2f0931[_0x1033b5(0x16e)]&&{'finished_at':_0x2f0931['finishedAt']},...Object[_0x1033b5(0x257)](_0x2f0931[_0x1033b5(0x29a)])[_0x1033b5(0x274)]>0x0&&{'params':_0x2f0931[_0x1033b5(0x29a)]}};return await handleSingleObjectOutput(_0x3ddb97,_0x5e9ed7),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x1a2);[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x2ad);async[a54_0x54edc0(0x256)](_0x1bf582){const _0x24a480=a54_0x54edc0,{options:_0x38fc54,args:_0x27615f,tdx:_0x3dcbe4}=_0x1bf582,_0x33ed06=_0x27615f[0x0];if(!_0x33ed06)return console['error'](_0x24a480(0x1bd)),0x1;const _0x27f08c=_0x38fc54[_0x24a480(0x141)];_0x38fc54[_0x24a480(0x1f9)]&&(console[_0x24a480(0x279)](_0x24a480(0x123)+_0x33ed06),_0x27f08c&&console['error'](_0x24a480(0x251)));const _0x515f64=await withSpinner(_0x24a480(0x1e3),()=>_0x3dcbe4['workflow'][_0x24a480(0x1a3)](_0x33ed06,_0x27f08c||![]),{'verbose':_0x38fc54[_0x24a480(0x1f9)]}),_0x552726=_0x515f64[_0x24a480(0x199)];return console[_0x24a480(0x279)](_0x24a480(0x272)+_0x552726[_0x24a480(0x274)]+_0x24a480(0x1bb)+(_0x552726[_0x24a480(0x274)]!==0x1?'s':'')),await handleSDKOutput(_0x552726,_0x38fc54),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0x54edc0(0x231)]='workflow:logs';['description']=a54_0x54edc0(0x171);async[a54_0x54edc0(0x256)](_0x37526d){const _0x3cd8b5=a54_0x54edc0,{options:_0x37e9e2,args:_0x336e44,tdx:_0x59d221}=_0x37526d,_0x54a338=_0x336e44[0x0];let _0x4db88e=_0x336e44[0x1];if(!_0x54a338)return console[_0x3cd8b5(0x279)](_0x3cd8b5(0x1bd)),0x1;_0x37e9e2[_0x3cd8b5(0x1f9)]&&(console[_0x3cd8b5(0x279)](_0x3cd8b5(0x123)+_0x54a338),_0x4db88e&&console[_0x3cd8b5(0x279)](_0x3cd8b5(0x220)+_0x4db88e));const _0x26037e=await withSpinner(_0x3cd8b5(0x165),()=>_0x59d221[_0x3cd8b5(0x169)][_0x3cd8b5(0x1bf)](_0x54a338,_0x4db88e),{'verbose':_0x37e9e2[_0x3cd8b5(0x1f9)]}),_0x340360=_0x26037e['data'];if(_0x340360[_0x3cd8b5(0x274)]===0x0)return console[_0x3cd8b5(0x279)](_0x3cd8b5(0x26f)),0x0;if(!_0x4db88e&&(_0x37e9e2[_0x3cd8b5(0x11d)]||_0x37e9e2[_0x3cd8b5(0x185)]))return await handleSDKOutput(_0x340360,_0x37e9e2),0x0;if(!_0x4db88e){const _0x38a27d=_0x340360[_0x3cd8b5(0x136)](_0x27a32e=>({'title':_0x27a32e[_0x3cd8b5(0x14a)]+'\x20('+formatBytes(_0x27a32e[_0x3cd8b5(0x28d)])+')','value':_0x27a32e['taskName']})),_0x4a2cdf=await a54_0x1aee3d({'type':_0x3cd8b5(0x1b3),'name':_0x3cd8b5(0x14c),'message':_0x3cd8b5(0x27b),'choices':_0x38a27d});if(!_0x4a2cdf['task'])return console['error']('Cancelled'),0x0;_0x4db88e=_0x4a2cdf[_0x3cd8b5(0x14c)];}const _0x262f64=await withSpinner(_0x3cd8b5(0x268),()=>_0x59d221['workflow'][_0x3cd8b5(0x229)](_0x54a338,_0x4db88e),{'verbose':_0x37e9e2[_0x3cd8b5(0x1f9)]}),_0x220f05=_0x262f64[_0x3cd8b5(0x199)];return _0x220f05?console[_0x3cd8b5(0x25d)](_0x220f05):console['error'](_0x3cd8b5(0x131)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0x54edc0(0x231)]='workflow:kill';[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x1c9);async[a54_0x54edc0(0x256)](_0x124def){const _0x10d25a=a54_0x54edc0,{options:_0x4be135,args:_0x1a1a7f,tdx:_0x3b99df}=_0x124def,_0x23c271=_0x1a1a7f[0x0];if(!_0x23c271)return console[_0x10d25a(0x279)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x359755=_0x4be135[_0x10d25a(0x25b)];_0x4be135['verbose']&&(console['error'](_0x10d25a(0x123)+_0x23c271),_0x359755&&console[_0x10d25a(0x279)]('Reason:\x20'+_0x359755));if(!_0x4be135['yes']){if(!isInteractive())return console[_0x10d25a(0x279)](a54_0x26125e[_0x10d25a(0x16f)](_0x10d25a(0x186)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a54_0x26125e[_0x10d25a(0x13e)](_0x10d25a(0x2b3))),0x1;const _0x25d733=await confirmKey(_0x10d25a(0x23e)+_0x23c271+'?');if(!_0x25d733)return console[_0x10d25a(0x279)](a54_0x26125e['yellow'](_0x10d25a(0x1cf))),0x1;}const _0x493e01=await withSpinner('Killing\x20attempt...',()=>_0x3b99df[_0x10d25a(0x169)][_0x10d25a(0x18f)](_0x23c271,_0x359755),{'verbose':_0x4be135[_0x10d25a(0x1f9)]}),_0x2975db=_0x493e01[_0x10d25a(0x199)];return console['error']('✔\x20'+_0x2975db),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x24a);[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x24e);async[a54_0x54edc0(0x256)](_0x38acc7){const _0x237497=a54_0x54edc0,{options:_0xdc28dc,args:_0x1172e6,tdx:_0x3a4250}=_0x38acc7,_0x1768a2=_0x1172e6[0x0];if(!_0x1768a2)return console[_0x237497(0x279)](_0x237497(0x176)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x507c0b=![],_0x8fa100=_0x1768a2;if(_0x1768a2[_0x237497(0x2b0)](_0x237497(0x178)))_0x507c0b=!![],_0x8fa100=_0x1768a2[_0x237497(0x1a4)](0x8);else{if(_0x1768a2[_0x237497(0x2b0)]('attempt:'))_0x507c0b=![],_0x8fa100=_0x1768a2['substring'](0x8);else return console[_0x237497(0x279)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error'](_0x237497(0x137)),0x1;}const _0x3d8120=_0xdc28dc[_0x237497(0x25c)],_0x21f957=_0xdc28dc[_0x237497(0x135)],_0x14dc03=_0xdc28dc[_0x237497(0x29a)],_0x2b8e2c=_0xdc28dc[_0x237497(0x1c3)];_0xdc28dc[_0x237497(0x1f9)]&&(console[_0x237497(0x279)](_0x237497(0x144)+(_0x507c0b?_0x237497(0x27d):_0x237497(0x164))+'\x20'+_0x8fa100),_0x3d8120&&console[_0x237497(0x279)]('From\x20task:\x20'+_0x3d8120),_0x21f957&&console[_0x237497(0x279)](_0x237497(0x260)+_0x21f957),_0x14dc03&&console[_0x237497(0x279)](_0x237497(0x155)+_0x14dc03),_0x2b8e2c&&console[_0x237497(0x279)](_0x237497(0x296)));let _0x43820e;if(_0x14dc03)try{if(_0x14dc03['startsWith']('@')){const _0x549993=await import(_0x237497(0x248)),_0x176fb6=_0x14dc03[_0x237497(0x1a4)](0x1),_0x5d915e=await _0x549993[_0x237497(0x151)](_0x176fb6,_0x237497(0x21f));_0x43820e=JSON[_0x237497(0x26d)](_0x5d915e);}else _0x43820e=JSON[_0x237497(0x26d)](_0x14dc03);}catch{return console[_0x237497(0x279)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0xdc28dc['yes']){if(!isInteractive())return console[_0x237497(0x279)](a54_0x26125e[_0x237497(0x16f)](_0x237497(0x186)),_0x237497(0x269)),console[_0x237497(0x279)](a54_0x26125e[_0x237497(0x13e)](_0x237497(0x2b3))),0x1;const _0x127166=await confirmKey(_0x237497(0x207)+(_0x507c0b?_0x237497(0x27d):_0x237497(0x164))+'\x20'+_0x8fa100+'?');if(!_0x127166)return console['error'](a54_0x26125e[_0x237497(0x21c)]('Cancelled')),0x1;}let _0x4e5923;_0x507c0b?_0x4e5923=await withSpinner(_0x237497(0x2a9),()=>_0x3a4250['workflow']['retrySession'](_0x8fa100,{'fromTask':_0x3d8120,'retryParams':_0x43820e}),{'verbose':_0xdc28dc[_0x237497(0x1f9)]}):_0x4e5923=await withSpinner(_0x237497(0x1ea),()=>_0x3a4250[_0x237497(0x169)]['retryAttempt'](_0x8fa100,{'resumeFrom':_0x21f957,'retryParams':_0x43820e,'force':_0x2b8e2c}),{'verbose':_0xdc28dc[_0x237497(0x1f9)]});const _0x1a708b=_0x4e5923['data'];return console[_0x237497(0x279)](_0x237497(0x247)),console[_0x237497(0x279)](_0x237497(0x29d)+_0x1a708b[_0x237497(0x28e)]),console[_0x237497(0x279)]('\x20\x20Session\x20ID:\x20'+_0x1a708b['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x22f);[a54_0x54edc0(0x26a)]='Start\x20a\x20workflow\x20run';async[a54_0x54edc0(0x256)](_0x1e3329){const _0x56627c=a54_0x54edc0,{options:_0x1c502a,args:_0x25a428,tdx:_0x3a85cb}=_0x1e3329;let _0x438196=_0x25a428[0x0];if(!_0x438196){const _0x263f13=this[_0x56627c(0x2bd)]([],_0x1c502a),_0x184e07=await withSpinner(_0x56627c(0x1e4),()=>_0x3a85cb[_0x56627c(0x169)][_0x56627c(0x189)](_0x263f13,{'limit':_0x1c502a[_0x56627c(0x21e)]}),{'verbose':_0x1c502a[_0x56627c(0x1f9)]}),_0x30e2df=_0x184e07[_0x56627c(0x199)];if(_0x30e2df[_0x56627c(0x274)]===0x0)return console[_0x56627c(0x279)]('No\x20workflows\x20found'),!_0x263f13&&console[_0x56627c(0x279)](a54_0x26125e['dim'](_0x56627c(0x1eb))),0x1;const _0x687d9d=_0x30e2df[_0x56627c(0x136)](_0x13c8c4=>({'title':_0x13c8c4['project']?.[_0x56627c(0x231)]+'.'+_0x13c8c4['name'],'value':_0x13c8c4[_0x56627c(0x21d)]?.[_0x56627c(0x231)]+'.'+_0x13c8c4[_0x56627c(0x231)],'description':_0x13c8c4[_0x56627c(0x235)]?_0x56627c(0x205)+_0x13c8c4[_0x56627c(0x235)]:undefined})),_0x54543b=await a54_0x1aee3d({'type':_0x56627c(0x1b3),'name':_0x56627c(0x169),'message':_0x56627c(0x17e),'choices':_0x687d9d});if(!_0x54543b[_0x56627c(0x169)])return 0x1;_0x438196=_0x54543b[_0x56627c(0x169)];}if(!_0x438196[_0x56627c(0x183)]('.')){const _0x109bb7=this[_0x56627c(0x2bd)]([],_0x1c502a);if(_0x109bb7)_0x438196=_0x109bb7+'.'+_0x438196;else return console['error'](a54_0x26125e[_0x56627c(0x16f)](_0x56627c(0x14e)),_0x56627c(0x275)),console[_0x56627c(0x279)](a54_0x26125e[_0x56627c(0x13e)](_0x56627c(0x1eb))),0x1;}const _0x1e7785=_0x1c502a[_0x56627c(0x271)],_0x44cd83=_0x1c502a[_0x56627c(0x2b9)],_0x1d37b9={};if(_0x1e7785&&Array[_0x56627c(0x16c)](_0x1e7785))for(const _0x1c64dc of _0x1e7785){const _0x5186ce=_0x1c64dc[_0x56627c(0x2b5)]('=');if(_0x5186ce===-0x1)return console[_0x56627c(0x279)](_0x56627c(0x1f4)+_0x1c64dc),console[_0x56627c(0x279)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x1d563c=_0x1c64dc[_0x56627c(0x1a4)](0x0,_0x5186ce),_0x398349=_0x1c64dc[_0x56627c(0x1a4)](_0x5186ce+0x1);try{_0x1d37b9[_0x1d563c]=JSON[_0x56627c(0x26d)](_0x398349);}catch{_0x1d37b9[_0x1d563c]=_0x398349;}}_0x1c502a[_0x56627c(0x1f9)]&&(console[_0x56627c(0x279)](_0x56627c(0x12a)+_0x438196),Object[_0x56627c(0x257)](_0x1d37b9)['length']>0x0&&console[_0x56627c(0x279)](_0x56627c(0x1b8)+JSON['stringify'](_0x1d37b9)),_0x44cd83&&console[_0x56627c(0x279)](_0x56627c(0x13c)+_0x44cd83));const _0x52fcac=await withSpinner(_0x56627c(0x297),()=>_0x3a85cb[_0x56627c(0x169)]['run'](_0x438196,_0x1d37b9,{'sessionTime':_0x44cd83}),{'verbose':_0x1c502a[_0x56627c(0x1f9)]}),_0x39ba60=_0x52fcac[_0x56627c(0x199)];console['error'](_0x56627c(0x20a)),console[_0x56627c(0x279)]('\x20\x20Attempt\x20ID:\x20'+_0x39ba60['id']),console['error']('\x20\x20Session\x20ID:\x20'+_0x39ba60[_0x56627c(0x1fe)]),console[_0x56627c(0x279)](_0x56627c(0x29b)+_0x39ba60[_0x56627c(0x21d)]?.['name']),console[_0x56627c(0x279)](_0x56627c(0x14b)+_0x39ba60[_0x56627c(0x169)]?.[_0x56627c(0x231)]);if(_0x39ba60[_0x56627c(0x21d)]?.['id']&&_0x39ba60['sessionId']&&_0x39ba60['id']){const _0x504816=_0x1c502a['site'],_0x198b7f=getConsoleUrl(_0x504816,_0x56627c(0x1e0)+_0x39ba60[_0x56627c(0x21d)]['id']+_0x56627c(0x194)+_0x39ba60[_0x56627c(0x1fe)]+_0x56627c(0x179)+_0x39ba60['id']);console[_0x56627c(0x279)](_0x56627c(0x15e)+a54_0x26125e['cyan'](_0x198b7f));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x21b);['description']=a54_0x54edc0(0x19c);async[a54_0x54edc0(0x256)](_0x22a6e4){const _0x4557f5=a54_0x54edc0,{options:_0x4a7912,args:_0x50df57,tdx:_0x46239c}=_0x22a6e4,_0x55f420=_0x50df57[0x0],_0x2f39a6=_0x50df57[0x1]||'.';if(!_0x55f420)return console[_0x4557f5(0x279)](_0x4557f5(0x175)),console['error'](_0x4557f5(0x1ef)),0x1;const _0x34efac=_0x4a7912['revision'];_0x4a7912['verbose']&&(console[_0x4557f5(0x279)](_0x4557f5(0x1e6)+_0x55f420),console[_0x4557f5(0x279)](_0x4557f5(0x219)+_0x2f39a6),_0x34efac&&console['error'](_0x4557f5(0x26b)+_0x34efac));const _0x326726=await withSpinner(_0x4557f5(0x1d0)+_0x55f420+_0x4557f5(0x1aa),()=>_0x46239c[_0x4557f5(0x169)][_0x4557f5(0x1f2)](_0x55f420,_0x2f39a6,{'revision':_0x34efac}),{'verbose':_0x4a7912[_0x4557f5(0x1f9)]}),_0x42a283=_0x326726[_0x4557f5(0x199)];return console[_0x4557f5(0x279)](_0x4557f5(0x1dc)+_0x42a283[_0x4557f5(0x1d7)]),console['error'](_0x4557f5(0x143)+_0x42a283['revision']),console['error']('\x20\x20Files\x20extracted:\x20'+_0x42a283[_0x4557f5(0x17c)]),console['error'](_0x4557f5(0x223)+_0x2f39a6+'/'+_0x42a283['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x22c);[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x125);async['execute'](_0x5f3070){const _0x3a2b6d=a54_0x54edc0,{options:_0x261b15,args:_0x5edb2d,tdx:_0x3cdfe7}=_0x5f3070;let _0x343ee1='.',_0x5aae34=_0x261b15['name'];if(_0x5edb2d[0x0]){const {promises:_0x17e4b9}=await import('fs');try{const _0xa728fd=await _0x17e4b9[_0x3a2b6d(0x1a7)](_0x5edb2d[0x0]);if(_0xa728fd[_0x3a2b6d(0x23a)]())_0x343ee1=_0x5edb2d[0x0];else return console[_0x3a2b6d(0x279)](_0x3a2b6d(0x12c)+_0x5edb2d[0x0]+_0x3a2b6d(0x290)),0x1;}catch{_0x5aae34=_0x5edb2d[0x0],_0x343ee1='.';}}const _0xdd216=_0x261b15[_0x3a2b6d(0x235)],_0x1655e2=_0x261b15[_0x3a2b6d(0x129)];_0x261b15[_0x3a2b6d(0x1f9)]&&(console['error'](_0x3a2b6d(0x2c4)+_0x343ee1),_0x5aae34&&console[_0x3a2b6d(0x279)](_0x3a2b6d(0x27a)+_0x5aae34),_0xdd216&&console['error'](_0x3a2b6d(0x26b)+_0xdd216),_0x1655e2&&console[_0x3a2b6d(0x279)](_0x3a2b6d(0x174)));const _0xc80a4d=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x3cdfe7[_0x3a2b6d(0x169)][_0x3a2b6d(0x167)](_0x343ee1,{'projectName':_0x5aae34,'revision':_0xdd216,'skipValidation':_0x1655e2}),{'verbose':_0x261b15['verbose']}),_0x31d758=_0xc80a4d[_0x3a2b6d(0x199)];return console[_0x3a2b6d(0x279)](_0x3a2b6d(0x166)+_0x31d758[_0x3a2b6d(0x1d7)]),console[_0x3a2b6d(0x279)](_0x3a2b6d(0x2b8)+_0x31d758['projectId']),console[_0x3a2b6d(0x279)]('\x20\x20Revision:\x20'+_0x31d758['revision']),await this[_0x3a2b6d(0x140)](_0x3cdfe7,_0x31d758[_0x3a2b6d(0x1d7)],_0x261b15[_0x3a2b6d(0x232)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a54_0x54edc0(0x132);[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x29f);async[a54_0x54edc0(0x256)](_0x41b0fd){const _0x51a30f=a54_0x54edc0,{options:_0x88a115,args:_0x29ad5b,tdx:_0x5bcf6b}=_0x41b0fd,_0x276015=_0x29ad5b[0x0],_0xec7cb0=_0x29ad5b[0x1];if(!_0x276015)return console[_0x51a30f(0x279)](a54_0x26125e['red'](_0x51a30f(0x14e)),_0x51a30f(0x2c0)),console['error'](a54_0x26125e[_0x51a30f(0x13e)](_0x51a30f(0x1c6))),0x1;const _0x3e4755=_0x88a115[_0x51a30f(0x235)];_0x88a115[_0x51a30f(0x1f9)]&&(console[_0x51a30f(0x279)](_0x51a30f(0x1e6)+_0x276015),_0xec7cb0&&console[_0x51a30f(0x279)](_0x51a30f(0x1a5)+_0xec7cb0),_0x3e4755&&console['error'](_0x51a30f(0x26b)+_0x3e4755),_0x88a115[_0x51a30f(0x200)]&&console['error']('Dry\x20run:\x20yes'));const _0x21db55=await withSpinner('Pulling\x20project\x20'+_0x276015+_0x51a30f(0x1aa),()=>_0x5bcf6b[_0x51a30f(0x169)][_0x51a30f(0x1fb)](_0x276015,{'targetDir':_0xec7cb0,'revision':_0x3e4755}),{'verbose':_0x88a115['verbose']}),_0x52265c=_0x21db55[_0x51a30f(0x199)];_0x52265c[_0x51a30f(0x24f)]?console['error'](_0x51a30f(0x1c5)+_0x52265c[_0x51a30f(0x1d7)]):console[_0x51a30f(0x279)]('→\x20Project:\x20'+_0x52265c['projectName']);console[_0x51a30f(0x279)](_0x51a30f(0x143)+_0x52265c[_0x51a30f(0x235)]),console[_0x51a30f(0x279)](_0x51a30f(0x19d)+(a54_0x1db018[_0x51a30f(0x184)](process[_0x51a30f(0x2a2)](),_0x52265c[_0x51a30f(0x120)])||'.')),console[_0x51a30f(0x279)](_0x51a30f(0x2a8)+a54_0x26125e[_0x51a30f(0x208)]('+'+_0x52265c[_0x51a30f(0x163)][_0x51a30f(0x237)]+_0x51a30f(0x291))+',\x20'+(a54_0x26125e['yellow']('~'+_0x52265c['summary'][_0x51a30f(0x142)]+_0x51a30f(0x1d8))+',\x20')+(a54_0x26125e['red']('-'+_0x52265c[_0x51a30f(0x163)][_0x51a30f(0x277)]+_0x51a30f(0x160))+',\x20')+(''+a54_0x26125e[_0x51a30f(0x13e)](_0x52265c['summary'][_0x51a30f(0x1ed)]+_0x51a30f(0x1a8))));for(const _0x8f73dd of _0x52265c[_0x51a30f(0x2c6)]){_0x8f73dd[_0x51a30f(0x266)]===_0x51a30f(0x142)&&_0x8f73dd[_0x51a30f(0x1e8)]&&(console[_0x51a30f(0x279)]('\x0a'+a54_0x26125e[_0x51a30f(0x1ca)]('---\x20'+_0x8f73dd['path'])),console[_0x51a30f(0x279)](_0x8f73dd[_0x51a30f(0x1e8)]));}if(!_0x52265c[_0x51a30f(0x202)])return saveSessionContext({'workflow_project':_0x52265c['projectName']},_0x88a115[_0x51a30f(0x27d)]),console[_0x51a30f(0x279)](a54_0x26125e[_0x51a30f(0x208)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x51a30f(0x279)](a54_0x26125e['dim'](_0x51a30f(0x1f7)+_0x52265c[_0x51a30f(0x1d7)])),0x0;if(_0x88a115[_0x51a30f(0x200)])return console['error'](a54_0x26125e[_0x51a30f(0x21c)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x88a115['yes']){if(!isInteractive())return console[_0x51a30f(0x279)](a54_0x26125e[_0x51a30f(0x16f)](_0x51a30f(0x186)),_0x51a30f(0x269)),console[_0x51a30f(0x279)](a54_0x26125e['dim'](_0x51a30f(0x2b3))),0x1;const _0x212ae2=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x212ae2)return console[_0x51a30f(0x279)](a54_0x26125e[_0x51a30f(0x21c)](_0x51a30f(0x1cf)),'-\x20no\x20files\x20written'),0x1;}await withSpinner('Writing\x20files...',()=>_0x5bcf6b[_0x51a30f(0x169)][_0x51a30f(0x1e1)](_0x52265c,{'revision':_0x3e4755}),{'verbose':_0x88a115['verbose']}),saveSessionContext({'workflow_project':_0x52265c['projectName']},_0x88a115[_0x51a30f(0x27d)]),console['error'](a54_0x26125e[_0x51a30f(0x208)]('✔\x20Pull\x20complete'));const _0x94af49=a54_0x1db018[_0x51a30f(0x184)](process[_0x51a30f(0x2a2)](),_0x52265c[_0x51a30f(0x120)])||'.';return console[_0x51a30f(0x279)](a54_0x26125e[_0x51a30f(0x13e)](_0x51a30f(0x223)+_0x94af49)),console[_0x51a30f(0x279)](a54_0x26125e[_0x51a30f(0x13e)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x52265c['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a54_0x54edc0(0x182);['description']=a54_0x54edc0(0x2c7);async[a54_0x54edc0(0x256)](_0x354964){const _0x2262a3=a54_0x54edc0,{options:_0x4d5eff,args:_0x289ba1,tdx:_0x3ef46b}=_0x354964,_0x1a7cc2=this[_0x2262a3(0x1a1)](_0x289ba1,_0x4d5eff),_0x2aa01a=_0x4d5eff[_0x2262a3(0x235)],_0x56e2c9=_0x4d5eff['skipValidation'];_0x4d5eff[_0x2262a3(0x1f9)]&&(_0x1a7cc2&&console[_0x2262a3(0x279)](_0x2262a3(0x17f)+_0x1a7cc2),_0x2aa01a&&console['error'](_0x2262a3(0x26b)+_0x2aa01a),_0x4d5eff[_0x2262a3(0x200)]&&console[_0x2262a3(0x279)](_0x2262a3(0x15f)),_0x56e2c9&&console[_0x2262a3(0x279)]('Validation:\x20skipped'));let _0x3c5b64;try{_0x3c5b64=await withSpinner(_0x2262a3(0x147),()=>_0x3ef46b['workflow']['preparePushProject']({'sourceDir':_0x1a7cc2,'revision':_0x2aa01a,'skipValidation':_0x56e2c9}),{'verbose':_0x4d5eff[_0x2262a3(0x1f9)]});}catch(_0x205496){if(_0x205496 instanceof Error&&_0x205496[_0x2262a3(0x276)][_0x2262a3(0x183)]('No\x20workflow\x20tdx.json\x20found'))return console[_0x2262a3(0x279)](a54_0x26125e[_0x2262a3(0x16f)](_0x2262a3(0x14e)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x4d5eff[_0x2262a3(0x198)]?console[_0x2262a3(0x279)](a54_0x26125e[_0x2262a3(0x13e)](_0x2262a3(0x12e)+_0x4d5eff['workflowProject']+_0x2262a3(0x2ba)+_0x4d5eff[_0x2262a3(0x198)]+'\x27')):console[_0x2262a3(0x279)](a54_0x26125e[_0x2262a3(0x13e)](_0x2262a3(0x261))),0x1;throw _0x205496;}const _0x3baf87=_0x3c5b64[_0x2262a3(0x199)];console['error'](_0x2262a3(0x270)+_0x3baf87[_0x2262a3(0x1d7)]),console[_0x2262a3(0x279)](_0x2262a3(0x12b)+_0x3baf87[_0x2262a3(0x206)]),console[_0x2262a3(0x279)](_0x2262a3(0x143)+_0x3baf87['revision']),console['error'](_0x2262a3(0x2a8)+a54_0x26125e[_0x2262a3(0x208)]('+'+_0x3baf87['summary'][_0x2262a3(0x237)]+_0x2262a3(0x291))+',\x20'+(a54_0x26125e[_0x2262a3(0x21c)]('~'+_0x3baf87['summary'][_0x2262a3(0x142)]+_0x2262a3(0x1d8))+',\x20')+(a54_0x26125e[_0x2262a3(0x16f)]('-'+_0x3baf87['summary'][_0x2262a3(0x277)]+_0x2262a3(0x160))+',\x20')+(''+a54_0x26125e[_0x2262a3(0x13e)](_0x3baf87[_0x2262a3(0x163)]['unchanged']+_0x2262a3(0x1a8))));for(const _0x3ac2e8 of _0x3baf87[_0x2262a3(0x2c6)]){_0x3ac2e8[_0x2262a3(0x266)]===_0x2262a3(0x142)&&_0x3ac2e8[_0x2262a3(0x1e8)]&&(console[_0x2262a3(0x279)]('\x0a'+a54_0x26125e[_0x2262a3(0x1ca)](_0x2262a3(0x1c7)+_0x3ac2e8['path'])),console[_0x2262a3(0x279)](_0x3ac2e8[_0x2262a3(0x1e8)]));}if(!_0x3baf87['hasChanges'])return console[_0x2262a3(0x279)](a54_0x26125e[_0x2262a3(0x208)](_0x2262a3(0x193))),await this[_0x2262a3(0x140)](_0x3ef46b,_0x3baf87['projectName'],_0x4d5eff[_0x2262a3(0x232)]),0x0;if(_0x4d5eff[_0x2262a3(0x200)])return console[_0x2262a3(0x279)](a54_0x26125e['yellow'](_0x2262a3(0x2a3))),0x0;if(!_0x4d5eff[_0x2262a3(0x13d)]){if(!isInteractive())return console[_0x2262a3(0x279)](a54_0x26125e['red'](_0x2262a3(0x186)),_0x2262a3(0x269)),console[_0x2262a3(0x279)](a54_0x26125e[_0x2262a3(0x13e)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x16f02e=await confirmKey(_0x2262a3(0x1dd));if(!_0x16f02e)return console[_0x2262a3(0x279)](a54_0x26125e[_0x2262a3(0x21c)]('Cancelled'),_0x2262a3(0x13b)),0x1;}const _0x4cc613=await withSpinner('Pushing\x20project...',()=>_0x3ef46b[_0x2262a3(0x169)][_0x2262a3(0x18b)](_0x3baf87),{'verbose':_0x4d5eff[_0x2262a3(0x1f9)]}),_0x27883d=_0x4cc613[_0x2262a3(0x199)];return console[_0x2262a3(0x279)](a54_0x26125e[_0x2262a3(0x208)](_0x2262a3(0x1bc))),console[_0x2262a3(0x279)]('\x20\x20Project\x20ID:\x20'+_0x27883d[_0x2262a3(0x152)]),console[_0x2262a3(0x279)](_0x2262a3(0x143)+_0x27883d[_0x2262a3(0x235)]),await this[_0x2262a3(0x140)](_0x3ef46b,_0x27883d[_0x2262a3(0x1d7)],_0x4d5eff[_0x2262a3(0x232)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x22d);[a54_0x54edc0(0x26a)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a54_0x54edc0(0x256)](_0x3b0f75){const _0x38746d=a54_0x54edc0,{options:_0x4e8c58,args:_0x420cba,tdx:_0x46799b}=_0x3b0f75,_0x43742f=this[_0x38746d(0x1a1)](_0x420cba,_0x4e8c58),_0x442f08=_0x4e8c58[_0x38746d(0x231)],_0x3baa72=_0x4e8c58[_0x38746d(0x235)],_0x4dd0c7=_0x4e8c58[_0x38746d(0x129)];if(!_0x43742f)return console[_0x38746d(0x279)](a54_0x26125e[_0x38746d(0x16f)](_0x38746d(0x14e)),_0x38746d(0x1f5)),console[_0x38746d(0x279)](a54_0x26125e[_0x38746d(0x13e)](_0x38746d(0x1c8))),console['error'](a54_0x26125e[_0x38746d(0x13e)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x442f08)return console[_0x38746d(0x279)](a54_0x26125e['red']('Error:'),_0x38746d(0x1f0)),console[_0x38746d(0x279)](a54_0x26125e[_0x38746d(0x13e)](_0x38746d(0x1c8))),0x1;_0x4e8c58['verbose']&&(console['error'](_0x38746d(0x17f)+_0x43742f),console['error'](_0x38746d(0x1ff)+_0x442f08),_0x3baa72&&console[_0x38746d(0x279)](_0x38746d(0x26b)+_0x3baa72),_0x4e8c58[_0x38746d(0x200)]&&console[_0x38746d(0x279)](_0x38746d(0x15f)),_0x4dd0c7&&console[_0x38746d(0x279)](_0x38746d(0x174)));const _0x50730f=await withSpinner('Analyzing\x20project...',()=>_0x46799b[_0x38746d(0x169)][_0x38746d(0x253)](_0x43742f,_0x442f08,{'revision':_0x3baa72,'skipValidation':_0x4dd0c7}),{'verbose':_0x4e8c58[_0x38746d(0x1f9)]}),_0x35979e=_0x50730f['data'];console[_0x38746d(0x279)](_0x38746d(0x1af)+_0x35979e['sourceDir']);_0x35979e['sourceProjectName']&&console[_0x38746d(0x279)]('Source\x20project:\x20'+_0x35979e['sourceProjectName']);console[_0x38746d(0x279)](_0x38746d(0x1ff)+_0x35979e['newProjectName']),console[_0x38746d(0x279)](_0x38746d(0x26b)+_0x35979e[_0x38746d(0x235)]),console[_0x38746d(0x279)](_0x38746d(0x2b4)+_0x35979e['fileCount']);_0x35979e['targetExists']&&(console[_0x38746d(0x279)](a54_0x26125e[_0x38746d(0x21c)]('\x0a⚠\x20Project\x20\x22'+_0x35979e['newProjectName']+_0x38746d(0x1b9)+_0x35979e[_0x38746d(0x2af)]+')')),console[_0x38746d(0x279)](a54_0x26125e['yellow'](_0x38746d(0x259))));if(_0x4e8c58[_0x38746d(0x200)])return console['error'](a54_0x26125e['yellow'](_0x38746d(0x24d))),0x0;if(!_0x4e8c58['yes']){if(!isInteractive())return console[_0x38746d(0x279)](a54_0x26125e[_0x38746d(0x16f)](_0x38746d(0x186)),_0x38746d(0x269)),console[_0x38746d(0x279)](a54_0x26125e[_0x38746d(0x13e)](_0x38746d(0x2b3))),0x1;const _0x441a15=_0x35979e['sourceProjectName']||a54_0x1db018[_0x38746d(0x289)](_0x43742f),_0x44a106=_0x35979e[_0x38746d(0x177)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x442f08+'\x22\x20with\x20new\x20revision?':'\x0aClone\x20\x22'+_0x441a15+_0x38746d(0x212)+_0x442f08+'\x22?',_0x578ec1=await confirmKey(_0x44a106);if(!_0x578ec1)return console['error'](a54_0x26125e['yellow']('Cancelled')),0x1;}const _0x1192a9=await withSpinner(_0x35979e[_0x38746d(0x177)]?_0x38746d(0x1c0)+_0x442f08+_0x38746d(0x1aa):_0x38746d(0x1e2)+_0x442f08+'...',()=>_0x46799b[_0x38746d(0x169)]['executeCloneProject'](_0x35979e),{'verbose':_0x4e8c58[_0x38746d(0x1f9)]}),_0x1252e4=_0x1192a9[_0x38746d(0x199)];return console[_0x38746d(0x279)](a54_0x26125e[_0x38746d(0x208)](_0x35979e[_0x38746d(0x177)]?_0x38746d(0x191):_0x38746d(0x11c))),console['error'](_0x38746d(0x29b)+_0x1252e4['newProjectName']),console[_0x38746d(0x279)]('\x20\x20Project\x20ID:\x20'+_0x1252e4[_0x38746d(0x18c)]),console[_0x38746d(0x279)]('\x20\x20Revision:\x20'+_0x1252e4['revision']),await this[_0x38746d(0x140)](_0x46799b,_0x1252e4[_0x38746d(0x1b2)],_0x4e8c58[_0x38746d(0x232)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a54_0x54edc0(0x231)]='workflow:delete';[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x252);async[a54_0x54edc0(0x256)](_0xe7e749){const _0x5aacc4=a54_0x54edc0,{options:_0x2a126d,args:_0x4c1c4b,tdx:_0xe8cefb}=_0xe7e749,_0xf6ca25=_0x4c1c4b[0x0];if(!_0xf6ca25)return console[_0x5aacc4(0x279)](_0x5aacc4(0x1ec)),console[_0x5aacc4(0x279)](_0x5aacc4(0x1fc)),0x1;_0x2a126d[_0x5aacc4(0x1f9)]&&console[_0x5aacc4(0x279)]('Project:\x20'+_0xf6ca25);if(!_0x2a126d[_0x5aacc4(0x13d)]){if(!isInteractive())return console[_0x5aacc4(0x279)](a54_0x26125e[_0x5aacc4(0x16f)]('\x0aError:'),_0x5aacc4(0x269)),console[_0x5aacc4(0x279)](a54_0x26125e['dim'](_0x5aacc4(0x2b3))),0x1;const _0x3b4a50=await confirmKey(_0x5aacc4(0x1f1)+_0xf6ca25+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3b4a50)return console[_0x5aacc4(0x279)](a54_0x26125e[_0x5aacc4(0x21c)](_0x5aacc4(0x1cf))),0x1;}const _0x425285=await withSpinner(_0x5aacc4(0x1d1)+_0xf6ca25+_0x5aacc4(0x1aa),()=>_0xe8cefb[_0x5aacc4(0x169)][_0x5aacc4(0x1c1)](_0xf6ca25),{'verbose':_0x2a126d[_0x5aacc4(0x1f9)]}),_0x514590=_0x425285[_0x5aacc4(0x199)];return console['error'](_0x5aacc4(0x1de)+_0x514590[_0x5aacc4(0x1d7)]),console[_0x5aacc4(0x279)](_0x5aacc4(0x2b8)+_0x514590['projectId']),0x0;}}export function parseKeyValue(_0xa58a3e){const _0x6d1ae0=a54_0x54edc0,_0x53a1a0=_0xa58a3e[_0x6d1ae0(0x2b5)]('=');if(_0x53a1a0===-0x1)throw new Error(_0x6d1ae0(0x281)+_0xa58a3e+_0x6d1ae0(0x19f));const _0x349085=_0xa58a3e[_0x6d1ae0(0x1a4)](0x0,_0x53a1a0),_0x473d7c=_0xa58a3e[_0x6d1ae0(0x1a4)](_0x53a1a0+0x1);if(!_0x349085)throw new Error(_0x6d1ae0(0x285));return{'key':_0x349085,'value':_0x473d7c};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]='workflow:secrets:list';[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x146);async['execute'](_0x3eb655){const _0x27b9f3=a54_0x54edc0,{options:_0x5c106c,args:_0x37accf,tdx:_0x5f0dbc}=_0x3eb655,_0x2f958c=this[_0x27b9f3(0x1ad)](_0x37accf,_0x5c106c);if(!_0x2f958c)return 0x1;_0x5c106c[_0x27b9f3(0x1f9)]&&console[_0x27b9f3(0x279)]('Project:\x20'+_0x2f958c);const _0x44a014=await withSpinner(_0x27b9f3(0x1ee),()=>_0x5f0dbc[_0x27b9f3(0x169)][_0x27b9f3(0x2ab)](_0x2f958c),{'verbose':_0x5c106c['verbose']}),{secrets:_0x51fa24}=_0x44a014['data'];return console[_0x27b9f3(0x279)]('✔\x20Found\x20'+_0x51fa24['length']+_0x27b9f3(0x1f6)+(_0x51fa24[_0x27b9f3(0x274)]!==0x1?'s':'')),await handleSDKOutput(_0x51fa24,_0x5c106c),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x27f);[a54_0x54edc0(0x26a)]=a54_0x54edc0(0x1ba);async[a54_0x54edc0(0x256)](_0x469658){const _0x55860b=a54_0x54edc0,{options:_0x4928e6,args:_0x5a842d,tdx:_0x1b1a28}=_0x469658;let _0x131394,_0x24b7a0;if(_0x5a842d['length']>=0x1&&!_0x5a842d[0x0][_0x55860b(0x183)]('='))_0x131394=_0x5a842d[0x0],_0x24b7a0=_0x5a842d[_0x55860b(0x12d)](0x1);else{if(_0x5a842d['length']>=0x1&&_0x4928e6[_0x55860b(0x198)])_0x131394=_0x4928e6['workflowProject'],_0x24b7a0=_0x5a842d;else return _0x5a842d[_0x55860b(0x274)]>=0x1?(console[_0x55860b(0x279)](_0x55860b(0x175)),console[_0x55860b(0x279)](_0x55860b(0x1eb)),0x1):(console[_0x55860b(0x279)](_0x55860b(0x159)),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x24b7a0[_0x55860b(0x274)]===0x0)return console[_0x55860b(0x279)](_0x55860b(0x159)),console['error'](_0x55860b(0x23c)),0x1;const _0x4e5307={};try{for(const _0x2a2c83 of _0x24b7a0){const {key:_0x43a718,value:_0x14be33}=parseKeyValue(_0x2a2c83);_0x4e5307[_0x43a718]=_0x14be33;}}catch(_0x58fee3){return _0x58fee3 instanceof Error&&console['error'](a54_0x26125e[_0x55860b(0x16f)](_0x55860b(0x14e)),_0x58fee3[_0x55860b(0x276)]),0x1;}const _0x2124c4=Object['keys'](_0x4e5307);_0x4928e6['verbose']&&(console[_0x55860b(0x279)](_0x55860b(0x1e6)+_0x131394),console[_0x55860b(0x279)](_0x55860b(0x204)+_0x2124c4[_0x55860b(0x2a6)](',\x20')));const _0x46cbcf=await withSpinner(_0x2124c4[_0x55860b(0x274)]===0x1?_0x55860b(0x17b):_0x55860b(0x255)+_0x2124c4[_0x55860b(0x274)]+_0x55860b(0x28c),()=>_0x1b1a28[_0x55860b(0x169)][_0x55860b(0x172)](_0x131394,_0x4e5307),{'verbose':_0x4928e6[_0x55860b(0x1f9)]}),_0x34fd5a=_0x46cbcf[_0x55860b(0x199)];return console[_0x55860b(0x279)](_0x2124c4[_0x55860b(0x274)]===0x1?_0x55860b(0x22a)+_0x34fd5a['keys'][0x0]+_0x55860b(0x20e)+_0x34fd5a[_0x55860b(0x1d7)]+'\x27':'✔\x20'+_0x34fd5a[_0x55860b(0x257)][_0x55860b(0x274)]+_0x55860b(0x29e)+_0x34fd5a[_0x55860b(0x1d7)]+'\x27'),(_0x4928e6[_0x55860b(0x11d)]||_0x4928e6[_0x55860b(0x245)])&&await handleSingleObjectOutput(_0x34fd5a,_0x4928e6),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]=a54_0x54edc0(0x1db);['description']=a54_0x54edc0(0x20d);async[a54_0x54edc0(0x256)](_0x25a6fc){const _0x599d91=a54_0x54edc0,{options:_0x4a0646,args:_0x5dace2,tdx:_0x9903cd}=_0x25a6fc;let _0x26663c,_0x23eb8f;if(_0x5dace2[_0x599d91(0x274)]>=0x2)_0x26663c=_0x5dace2[0x0],_0x23eb8f=_0x5dace2[0x1];else{if(_0x5dace2[_0x599d91(0x274)]===0x1&&_0x4a0646['workflowProject'])_0x26663c=_0x4a0646[_0x599d91(0x198)],_0x23eb8f=_0x5dace2[0x0];else return _0x5dace2[_0x599d91(0x274)]===0x1?(console['error'](_0x599d91(0x175)),console[_0x599d91(0x279)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x599d91(0x279)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x599d91(0x279)](_0x599d91(0x233)),0x1);}_0x4a0646[_0x599d91(0x1f9)]&&(console[_0x599d91(0x279)](_0x599d91(0x1e6)+_0x26663c),console['error'](_0x599d91(0x157)+_0x23eb8f));if(!_0x4a0646[_0x599d91(0x13d)]){if(!isInteractive())return console[_0x599d91(0x279)](a54_0x26125e[_0x599d91(0x16f)](_0x599d91(0x186)),_0x599d91(0x269)),console[_0x599d91(0x279)](a54_0x26125e[_0x599d91(0x13e)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5070cb=await confirmKey(_0x599d91(0x14d)+_0x23eb8f+'\x27\x20from\x20project\x20\x27'+_0x26663c+'\x27?');if(!_0x5070cb)return console[_0x599d91(0x279)](a54_0x26125e[_0x599d91(0x21c)]('Cancelled')),0x1;}const _0x35498a=await withSpinner(_0x599d91(0x127),()=>_0x9903cd[_0x599d91(0x169)][_0x599d91(0x282)](_0x26663c,_0x23eb8f),{'verbose':_0x4a0646['verbose']}),_0x4aa4b2=_0x35498a[_0x599d91(0x199)];return console['error'](_0x599d91(0x22a)+_0x4aa4b2[_0x599d91(0x254)]+_0x599d91(0x24c)+_0x4aa4b2[_0x599d91(0x1d7)]+'\x27'),(_0x4a0646['json']||_0x4a0646[_0x599d91(0x245)])&&await handleSingleObjectOutput(_0x4aa4b2,_0x4a0646),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(_0xf1b246){const _0xa85092=a54_0x54edc0,_0x32571b=Math[_0xa85092(0x287)](_0xf1b246/0x3e8),_0x5eaa31=Math[_0xa85092(0x287)](_0x32571b/0x3c),_0x295777=Math['floor'](_0x5eaa31/0x3c),_0x1e37f9=Math[_0xa85092(0x287)](_0x295777/0x18);if(_0x1e37f9>0x0){const _0xda107e=_0x295777%0x18;return _0xda107e>0x0?_0x1e37f9+'d\x20'+_0xda107e+'h':_0x1e37f9+'d';}else{if(_0x295777>0x0){const _0x5e71f3=_0x5eaa31%0x3c;return _0x5e71f3>0x0?_0x295777+'h\x20'+_0x5e71f3+'m':_0x295777+'h';}else{if(_0x5eaa31>0x0){const _0x5dd69b=_0x32571b%0x3c;return _0x5dd69b>0x0?_0x5eaa31+'m\x20'+_0x5dd69b+'s':_0x5eaa31+'m';}else return _0x32571b+'s';}}}function formatTimestamp(_0x3a9fec,_0x14cb9d){const _0x17c3e1=a54_0x54edc0,_0x223656=new Date(_0x3a9fec),_0xa625c5=String(_0x223656['getHours']())[_0x17c3e1(0x1d9)](0x2,'0'),_0x3ba516=String(_0x223656[_0x17c3e1(0x148)]())[_0x17c3e1(0x1d9)](0x2,'0'),_0x5f36a5=_0xa625c5+':'+_0x3ba516,_0x59d45d=_0x223656[_0x17c3e1(0x1e9)]()===_0x14cb9d[_0x17c3e1(0x1e9)]()&&_0x223656[_0x17c3e1(0x2a5)]()===_0x14cb9d['getMonth']()&&_0x223656['getDate']()===_0x14cb9d['getDate']();if(_0x59d45d)return _0x5f36a5;else{const _0x1245db=String(_0x223656[_0x17c3e1(0x2a5)]()+0x1)[_0x17c3e1(0x1d9)](0x2,'0'),_0x9327b0=String(_0x223656[_0x17c3e1(0x2ac)]())[_0x17c3e1(0x1d9)](0x2,'0');return _0x1245db+'-'+_0x9327b0+'\x20'+_0x5f36a5;}}function formatDate(_0x4da9fb){const _0x5cf475=a54_0x54edc0,_0x4eeceb=_0x4da9fb['getFullYear'](),_0x4a33e7=String(_0x4da9fb[_0x5cf475(0x2a5)]()+0x1)['padStart'](0x2,'0'),_0x2197fd=String(_0x4da9fb[_0x5cf475(0x2ac)]())[_0x5cf475(0x1d9)](0x2,'0');return _0x4eeceb+'-'+_0x4a33e7+'-'+_0x2197fd;}function getTaskStateIcon(_0x155e63){const _0x3cb651={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x3cb651[_0x155e63]||'⚪';}function getBarChar(_0x5295fa){const _0x291f48=a54_0x54edc0;return _0x5295fa===_0x291f48(0x279)||_0x5295fa===_0x291f48(0x1cc)?'×':'─';}function getBarColor(_0x3af35b){const _0xaa4b8=a54_0x54edc0,_0x262b93={'success':a54_0x26125e[_0xaa4b8(0x208)],'error':a54_0x26125e[_0xaa4b8(0x16f)],'group_error':a54_0x26125e[_0xaa4b8(0x16f)],'running':a54_0x26125e[_0xaa4b8(0x154)],'blocked':a54_0x26125e[_0xaa4b8(0x21c)],'planned':a54_0x26125e[_0xaa4b8(0x13e)],'canceling':a54_0x26125e[_0xaa4b8(0x21c)]};return _0x262b93[_0x3af35b]||a54_0x26125e['white'];}function parseTaskName(_0x3294db){const _0x1ecc7e=a54_0x54edc0;let _0x170d5e=_0x3294db[_0x1ecc7e(0x249)](/^\++/,'');const _0x49e5d6=_0x170d5e[_0x1ecc7e(0x210)]('+'),_0x3ad7aa=_0x49e5d6[_0x1ecc7e(0x274)]>0x1?_0x49e5d6[_0x1ecc7e(0x274)]-0x2:0x0,_0x1b99c9=_0x49e5d6[_0x49e5d6[_0x1ecc7e(0x274)]-0x1]||_0x170d5e;return{'level':_0x3ad7aa,'name':'+'+_0x1b99c9};}function truncateTaskName(_0x48014a,_0x31ba96){const _0x3ae546=a54_0x54edc0,_0x5867d5=stringWidth(_0x48014a);if(_0x5867d5<=_0x31ba96)return _0x48014a;let _0x25cf80=_0x48014a;while(stringWidth(_0x25cf80+'…')>_0x31ba96&&_0x25cf80['length']>0x0){_0x25cf80=_0x25cf80[_0x3ae546(0x12d)](0x0,-0x1);}return _0x25cf80+'…';}function a54_0x11ab(){const _0x4bc28d=['No\x20sessions\x20with\x20timing\x20information','pollTimeline','\x20project','MAX_TASKS_DISPLAY','jsonl','updatedAt','✔\x20Retry\x20started','fs/promises','replace','workflow:retry','\x20(use\x20--limit\x20to\x20show\x20more)','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x0aDry\x20run\x20-\x20no\x20project\x20created','Retry\x20a\x20session\x20or\x20attempt','isNewProject','autocomplete','Including\x20subtasks:\x20yes','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','prepareCloneProject','key','Setting\x20','execute','keys','repeat','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','reason','fromTask','log','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','List\x20all\x20workflow\x20projects','Resume\x20from:\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','projects','\x20logs','Auto-selected\x20latest\x20session:\x20','workflow:attempt','type','localeCompare','Downloading\x20logs...','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','description','Revision:\x20','MIN_LABEL_COUNT','parse','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','No\x20log\x20files\x20found\x20for\x20this\x20attempt','✔\x20Project:\x20','param','✔\x20Found\x20','No\x20projects\x20match\x20pattern:\x20','length','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','message','deleted','duration','error','Project\x20name:\x20','Select\x20a\x20task\x20to\x20view\x20logs:','Warning:','session','3382008dDMdcx','workflow:secrets:set','120AgmVZC','Invalid\x20format:\x20','deleteSecret','attempts','getTime','Key\x20cannot\x20be\x20empty','toLowerCase','floor','📋\x20','basename','Failed\x20to\x20fetch\x20attempt\x20data','fill','\x20secrets...','fileSize','attemptId','Show\x20specific\x20attempt\x20details','\x20is\x20not\x20a\x20directory','\x20new','MAX_LABEL_COUNT','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','No\x20workflows\x20found\x20in\x20project:\x20','Listing\x20workflows...','Force:\x20yes','Starting\x20workflow\x20run...','get','6211542goQydR','params','\x20\x20Project:\x20','Total:\x20','\x20\x20New\x20attempt\x20ID:\x20','\x20secrets\x20set\x20for\x20project\x20\x27','Pull\x20workflow\x20project\x20to\x20local\x20folder','Listing\x20workflow\x20sessions...','msPerChar','cwd','\x0aDry\x20run\x20-\x20nothing\x20pushed','TASK_NAME_WIDTH','getMonth','join','Filter:\x20','\x20\x20Changes:\x20','Retrying\x20session...','has','listSecrets','getDate','Show\x20tasks\x20for\x20an\x20attempt','27420VJsTkm','existingProjectId','startsWith','📁\x20','260694maaxJv','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Files\x20to\x20upload:\x20','indexOf','7qHdGgQ','lastAttempt','\x20\x20Project\x20ID:\x20','sessionTime','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','success','window','resolveProject','now','40WyvFSI','Project\x20name\x20is\x20required','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20-\x20','columns','Project\x20directory:\x20','output','changes','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Usage:\x20tdx\x20wf\x20use\x20<project>','context','No\x20sessions\x20found','✔\x20Clone\x20complete','json','set','\x20from\x20session\x20','targetDir','min','renderSingleTimeline','Attempt\x20ID:\x20','parseProjectWorkflowPattern','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','No\x20attempts\x20found\x20in\x20project:\x20','Deleting\x20secret...','buildTimelineData','skipValidation','Workflow:\x20','\x20\x20Source:\x20','Error:\x20','slice','Tip:\x20cd\x20to\x20workflows/','renderTimeline','No\x20matching\x20sessions\x20found','No\x20log\x20content\x20found','workflow:pull','MIN_TIMELINE_WIDTH','108272UmcDlN','resumeFrom','map','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Listing\x20workflow\x20projects...','toISOString','No\x20sessions\x20found\x20for:\x20','-\x20nothing\x20pushed','Session\x20time:\x20','yes','dim','13OEJKyF','showWorkflowConsoleUrl','includeSubtasks','modified','\x20\x20Revision:\x20','Target:\x20','createdAt','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Analyzing\x20changes...','getMinutes','731296xwfCGG','taskName','\x20\x20Workflow:\x20','task','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Error:','trimEnd','Loading\x20session...','readFile','projectId','match','blue','Params:\x20','status','Key:\x20','Include\x20retried:\x20yes','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','\x20of\x20','List\x20workflow\x20execution\x20sessions','write','\x20tasks','\x20\x20Console:\x20','Dry\x20run:\x20yes','\x20deleted','planned','ICON_WIDTH','summary','attempt','Fetching\x20log\x20files...','✔\x20Pushed\x20','push','all','workflow','fullName','follow','isArray','state','finishedAt','red','isTTY','Show\x20logs\x20for\x20a\x20workflow\x20attempt','setSecrets','sessions','Validation:\x20skipped','Error:\x20Project\x20name\x20is\x20required','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','targetExists','session:','/attempt/','No\x20workflow\x20sessions\x20found','Setting\x20secret...','filesExtracted','canceling','Select\x20a\x20workflow\x20to\x20run','Source\x20directory:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','List\x20workflows','workflow:push','includes','relative','format','\x0aError:','running','done','workflows','💡\x20Tip:\x20Use\x20','executePushProject','newProjectId','MAX_POLL_ITERATIONS','30576096WHWMqy','kill','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','✔\x20Project\x20updated','resolveProjectId','\x0a✔\x20No\x20changes\x20to\x20push','/sessions/','generateSessionTimelineRows','Using\x20attempt\x20','6083lreGkV','workflowProject','data','2uieVZP','Status:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20Target:\x20','end','.\x20Expected\x20format:\x20KEY=VALUE','\x20to\x20see\x20detailed\x20logs','resolveProjectDir','workflow:tasks','tasks','substring','Target\x20directory:\x20','pending','stat','\x20unchanged','\x0aFailed\x20to\x20fetch\x20attempt\x20data','...','\x20session','Pattern:\x20','requireProject','startedAt','Source:\x20','find','ICON_SPACING','newProjectName','select','Getting\x20attempt\x20details...','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','icon','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Parameters:\x20','\x22\x20already\x20exists\x20(ID:\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x20task','✔\x20Push\x20complete','Error:\x20Attempt\x20ID\x20is\x20required','workflowName','logFiles','Updating\x20','delete','table','force','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','→\x20New\x20project:\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','---\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Kill\x20a\x20running\x20attempt','cyan','Select\x20a\x20session\x20to\x20view\x20timeline:','group_error','session_id','stdout','Cancelled','Downloading\x20project\x20','Deleting\x20project\x20','\x1b[1A\x1b[2K','displayLine','includeRetried','navigateSessionsInteractive','renderSessionsTimeline','projectName','\x20modified','padStart','size','workflow:secrets:delete','✔\x20Downloaded\x20','\x0aPush\x20these\x20changes?','✔\x20Deleted\x20project\x20','No\x20attempts\x20found','/app/workflows/','applyPullProject','Cloning\x20to\x20','Getting\x20attempt\x20tasks...','Loading\x20workflows...','index','Project:\x20','text','diff','getFullYear','Retrying\x20attempt...','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','unchanged','Listing\x20secrets...','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','download','cancelRequested','Error:\x20Invalid\x20parameter\x20format:\x20','Source\x20directory\x20is\x20required','\x20secret','\x20\x20Session\x20context\x20set\x20to:\x20','sort','verbose','startTime','pullProject','Usage:\x20workflow:delete\x20<project-name-or-id>','Resolving\x20project\x20\x27','sessionId','New\x20project\x20name:\x20','dryRun','(use\x20--limit\x20to\x20see\x20more)','hasChanges','\x0aPolling...\x20(','Secrets\x20to\x20set:\x20','revision:\x20','sourceDir','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','green','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','✔\x20Workflow\x20run\x20started','rows','\x20\x20tdx\x20wf\x20use\x20<project>','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','MAX_TIMELINE_WIDTH','split','values','\x22\x20to\x20new\x20project\x20\x22','from','unknown','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','\x27...','filter','start','Output\x20directory:\x20','No\x20sessions\x20found\x20in\x20project:\x20','workflow:download','yellow','project','limit','utf-8','Task\x20name:\x20','\x20attempt','list','\x20\x20Location:\x20','max','durationMs','Latest\x20session\x20has\x20no\x20attempt','every','title','logs','✔\x20Secret\x20\x27','Listing\x20workflow\x20attempts...','workflow:upload','workflow:clone','Filter:\x20project=','workflow:run','\x20(system)','name','site','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','trim','revision','resolve','new','\x20workflow','splice','isDirectory','\x0a✔\x20Attempt\x20complete','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','clear','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','sys','⚠\x20Showing\x20first\x20'];a54_0x11ab=function(){return _0x4bc28d;};return a54_0x11ab();}function calculateTimeScale(_0x2cd2b4,_0x2baed1){const _0x427eb4=a54_0x54edc0;return{'startTime':_0x2cd2b4['start'],'endTime':_0x2cd2b4['end'],'durationMs':_0x2cd2b4['duration'],'msPerChar':_0x2cd2b4[_0x427eb4(0x278)]/_0x2baed1};}function timeToPosition(_0x5e73bb,_0x50e390,_0x24362e){const _0x46cb67=a54_0x54edc0,_0x49ad19=_0x5e73bb-_0x50e390['startTime'],_0x3e63ca=Math[_0x46cb67(0x287)](_0x49ad19/_0x50e390[_0x46cb67(0x2a1)]);return Math[_0x46cb67(0x224)](0x0,Math['min'](_0x3e63ca,_0x24362e));}function renderTimeAxis(_0x537da9,_0x307343){const _0x5c49cd=a54_0x54edc0,_0x53b249=Math[_0x5c49cd(0x121)](TIMELINE_CONFIG[_0x5c49cd(0x292)],Math[_0x5c49cd(0x224)](TIMELINE_CONFIG[_0x5c49cd(0x26c)],Math[_0x5c49cd(0x287)](_0x307343/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x42ca88=_0x537da9[_0x5c49cd(0x225)]/(_0x53b249-0x1),_0x175462=new Date(_0x537da9[_0x5c49cd(0x1fa)]),_0x569ea4=[];for(let _0x10caf4=0x0;_0x10caf4<_0x53b249;_0x10caf4++){const _0x1a8f29=_0x537da9['startTime']+_0x10caf4*_0x42ca88,_0x298204=timeToPosition(_0x1a8f29,_0x537da9,_0x307343),_0x31b4b5=formatTimestamp(_0x1a8f29,_0x175462);_0x569ea4[_0x5c49cd(0x167)]({'pos':_0x298204,'text':_0x31b4b5});}const _0x5b38f9=new Array(_0x307343)[_0x5c49cd(0x28b)]('\x20');let _0x314bdc=-0x1;for(const {pos:_0xbec1e4,text:_0x33b354}of _0x569ea4){let _0x186ae4=Math['max'](0x0,_0xbec1e4-Math[_0x5c49cd(0x287)](_0x33b354[_0x5c49cd(0x274)]/0x2));_0x186ae4<=_0x314bdc+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x186ae4=_0x314bdc+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x186ae4+_0x33b354['length']>_0x307343&&(_0x186ae4=_0x307343-_0x33b354['length']);if(_0x186ae4>=0x0&&_0x186ae4+_0x33b354[_0x5c49cd(0x274)]<=_0x307343&&_0x186ae4>_0x314bdc){for(let _0x421de3=0x0;_0x421de3<_0x33b354[_0x5c49cd(0x274)];_0x421de3++){_0x5b38f9[_0x186ae4+_0x421de3]=_0x33b354[_0x421de3];}_0x314bdc=_0x186ae4+_0x33b354[_0x5c49cd(0x274)]-0x1;}}return _0x5b38f9[_0x5c49cd(0x2a6)]('');}function renderTaskRow(_0x9c78fd,_0x363876,_0x3a7aa9,_0x547e8f){const _0x2bf97f=a54_0x54edc0,{level:_0x7fb029,name:_0x54ced3}=parseTaskName(_0x9c78fd[_0x2bf97f(0x231)]),_0xa4a1a5='\x20'[_0x2bf97f(0x258)](_0x7fb029),_0x5e6f5e=_0x9c78fd[_0x2bf97f(0x2bc)]?'('+formatElapsed(_0x9c78fd[_0x2bf97f(0x2bc)][_0x2bf97f(0x278)])+')':'',_0x310eac=stringWidth(_0x5e6f5e),_0x33886b=_0x7fb029*0x1,_0x21db54=_0x547e8f-_0x33886b-_0x310eac-0x1,_0x13b399=truncateTaskName(_0x54ced3,_0x21db54),_0x7fcf2a=_0xa4a1a5+_0x13b399,_0xd07a2a=stringWidth(_0x7fcf2a),_0x39ded4=_0x547e8f-_0xd07a2a-_0x310eac,_0x54a427=_0x7fcf2a+'\x20'[_0x2bf97f(0x258)](Math['max'](0x1,_0x39ded4))+a54_0x26125e['dim'](_0x5e6f5e),_0x1f74af=getTaskStateIcon(_0x9c78fd[_0x2bf97f(0x16d)]),_0x21e461=new Array(_0x3a7aa9)[_0x2bf97f(0x28b)]('\x20');if(_0x9c78fd['window']){const _0xb5cfb0=timeToPosition(_0x9c78fd[_0x2bf97f(0x2bc)]['start'],_0x363876,_0x3a7aa9),_0x5cc4e4=timeToPosition(_0x9c78fd['window'][_0x2bf97f(0x19e)],_0x363876,_0x3a7aa9),_0x439a40=getBarChar(_0x9c78fd['state']),_0xcf5dbd=Math[_0x2bf97f(0x224)](_0xb5cfb0+0x1,_0x5cc4e4);for(let _0x3bb19e=_0xb5cfb0;_0x3bb19e<Math[_0x2bf97f(0x121)](_0xcf5dbd,_0x3a7aa9);_0x3bb19e++){_0x21e461[_0x3bb19e]=_0x439a40;}}const _0x17cc1b=getBarColor(_0x9c78fd[_0x2bf97f(0x16d)]),_0x30a268=_0x21e461[_0x2bf97f(0x136)](_0x59b302=>_0x59b302==='\x20'?'\x20':_0x17cc1b(_0x59b302))['join']('');return _0x1f74af+'\x20'+_0x54a427+'│'+_0x30a268+'│';}function calculateStats(_0x58f735){const _0x1e565d=a54_0x54edc0,_0x8eb6ca={'total':_0x58f735[_0x1e565d(0x274)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x2bfc67 of _0x58f735){if(_0x2bfc67['state']===_0x1e565d(0x2bb))_0x8eb6ca['success']++;else{if(_0x2bfc67[_0x1e565d(0x16d)]===_0x1e565d(0x279)||_0x2bfc67[_0x1e565d(0x16d)]===_0x1e565d(0x1cc))_0x8eb6ca[_0x1e565d(0x279)]++;else _0x2bfc67[_0x1e565d(0x16d)]===_0x1e565d(0x187)?_0x8eb6ca[_0x1e565d(0x187)]++:_0x8eb6ca[_0x1e565d(0x1a6)]++;}}return _0x8eb6ca;}function formatStats(_0x580882){const _0x3b3773=a54_0x54edc0;return[_0x3b3773(0x29c)+_0x580882['total'],'✅\x20'+_0x580882[_0x3b3773(0x2bb)],'❌\x20'+_0x580882[_0x3b3773(0x279)],'🔄\x20'+_0x580882[_0x3b3773(0x187)],'⏳\x20'+_0x580882[_0x3b3773(0x1a6)]][_0x3b3773(0x2a6)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a54_0x54edc0(0x231)]='workflow:timeline';['description']=a54_0x54edc0(0x293);async['execute'](_0x20f606){const _0x150fc0=a54_0x54edc0,{options:_0x428b3e,args:_0x266855,tdx:_0x34fc41}=_0x20f606;let _0xd49f4d,_0x1db12,_0x506bc2=![];if(_0x266855[0x0]){if(_0x266855[0x0][_0x150fc0(0x183)]('.')){const _0x3bf6d7=this[_0x150fc0(0x124)](_0x266855,_0x428b3e);if(!_0x3bf6d7)return 0x1;_0xd49f4d=_0x3bf6d7[_0x150fc0(0x1d7)],_0x1db12=_0x3bf6d7[_0x150fc0(0x1be)];}else{_0x1db12=_0x266855[0x0],_0xd49f4d=_0x428b3e[_0x150fc0(0x198)];if(!_0xd49f4d)return console[_0x150fc0(0x279)](a54_0x26125e[_0x150fc0(0x16f)]('Error:'),_0x150fc0(0x180)),0x1;_0x506bc2=!![];}}else{const _0x135ece=this[_0x150fc0(0x124)](_0x266855,_0x428b3e);if(!_0x135ece)return 0x1;_0xd49f4d=_0x135ece['projectName'],_0x1db12=_0x135ece['workflowName'];}if(_0x428b3e['verbose']){if(_0xd49f4d&&_0x1db12)console['error']('Filter:\x20'+_0xd49f4d+'.'+_0x1db12);else _0xd49f4d&&console[_0x150fc0(0x279)](_0x150fc0(0x22e)+_0xd49f4d);}const _0x162520=_0x428b3e[_0x150fc0(0x28e)],_0x25cc4d=_0x428b3e[_0x150fc0(0x1fe)];if(_0x162520){_0x25cc4d&&console[_0x150fc0(0x279)](a54_0x26125e[_0x150fc0(0x21c)](_0x150fc0(0x27c)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x5435fa=_0x428b3e[_0x150fc0(0x16b)];return _0x5435fa?await this[_0x150fc0(0x242)](_0x20f606,_0x162520):await this[_0x150fc0(0x122)](_0x20f606,_0x162520,_0x428b3e),0x0;}if(_0x25cc4d){const _0x187707=await withSpinner(_0x150fc0(0x150),()=>_0x34fc41['workflow'][_0x150fc0(0x173)]({'projectName':_0xd49f4d,'workflowName':_0x1db12,'limit':0x64}),{'verbose':_0x428b3e[_0x150fc0(0x1f9)]}),_0x5b5074=_0x187707[_0x150fc0(0x199)][_0x150fc0(0x1b0)](_0x2082f2=>_0x2082f2['id']===_0x25cc4d);if(!_0x5b5074)return console['error'](a54_0x26125e['red'](_0x150fc0(0x14e)),'Session\x20not\x20found:\x20'+_0x25cc4d),0x1;if(!_0x5b5074[_0x150fc0(0x2b7)]?.['id'])return console['error'](a54_0x26125e['red'](_0x150fc0(0x14e)),'Session\x20'+_0x25cc4d+'\x20has\x20no\x20attempts'),0x1;const _0x54fc18=_0x5b5074[_0x150fc0(0x2b7)]['id'];_0x428b3e[_0x150fc0(0x1f9)]&&console[_0x150fc0(0x279)](_0x150fc0(0x196)+_0x54fc18+_0x150fc0(0x11f)+_0x25cc4d);const _0x2b2bd1=_0x428b3e[_0x150fc0(0x16b)];return _0x2b2bd1?await this[_0x150fc0(0x242)](_0x20f606,_0x54fc18):await this['renderSingleTimeline'](_0x20f606,_0x54fc18,_0x428b3e),0x0;}const _0x42ebdc=await withSpinner('Loading\x20sessions...',()=>_0x34fc41['workflow']['sessions']({'projectName':_0xd49f4d,'workflowName':_0x1db12,'limit':_0x428b3e[_0x150fc0(0x21e)]||0x32}),{'verbose':_0x428b3e[_0x150fc0(0x1f9)]}),_0x3885a6=_0x42ebdc[_0x150fc0(0x199)];if(_0x3885a6[_0x150fc0(0x274)]===0x0){if(_0xd49f4d&&_0x1db12)console[_0x150fc0(0x279)](_0x150fc0(0x13a)+_0xd49f4d+'.'+_0x1db12);else _0xd49f4d?console[_0x150fc0(0x279)](_0x150fc0(0x21a)+_0xd49f4d):(console[_0x150fc0(0x279)](_0x150fc0(0x17a)),console[_0x150fc0(0x279)](a54_0x26125e['dim'](_0x150fc0(0x26e))));return 0x0;}_0x3885a6[_0x150fc0(0x1f8)]((_0x3c6153,_0x11f9f2)=>{const _0x1997c0=_0x150fc0,_0x1e8cc3=_0x3c6153[_0x1997c0(0x2b9)]||'',_0x26b20f=_0x11f9f2['sessionTime']||'';return _0x26b20f[_0x1997c0(0x267)](_0x1e8cc3);});if(_0x428b3e[_0x150fc0(0x11d)]||_0x428b3e[_0x150fc0(0x245)])return await handleSDKOutput(_0x3885a6,_0x428b3e),0x0;let _0x85c937;if(_0x506bc2){const _0x31fadb=_0x3885a6[0x0];if(!_0x31fadb[_0x150fc0(0x2b7)]?.['id'])return console[_0x150fc0(0x279)](_0x150fc0(0x226)),0x0;_0x85c937=_0x31fadb['lastAttempt']['id'],_0x428b3e[_0x150fc0(0x1f9)]&&console[_0x150fc0(0x279)](_0x150fc0(0x264)+_0x31fadb[_0x150fc0(0x2b9)]);}else{const _0x123a5b=_0x3885a6[_0x150fc0(0x136)](_0x3ab303=>{const _0x3f30b0=_0x150fc0,_0x2d6049=getAttemptStatusDisplay(_0x3ab303[_0x3f30b0(0x2b7)]);return{'title':_0x3ab303[_0x3f30b0(0x21d)]?.[_0x3f30b0(0x231)]+'.'+_0x3ab303['workflow']?.[_0x3f30b0(0x231)]+_0x3f30b0(0x2c2)+_0x3ab303[_0x3f30b0(0x2b9)]+'\x20'+_0x2d6049[_0x3f30b0(0x1b6)],'value':_0x3ab303[_0x3f30b0(0x2b7)]?.['id']||'','description':_0x2d6049[_0x3f30b0(0x1e7)]};}),_0x3d79d5=await a54_0x1aee3d({'type':_0x150fc0(0x1b3),'name':_0x150fc0(0x28e),'message':_0x150fc0(0x1cb),'choices':_0x123a5b[_0x150fc0(0x217)](_0x493c47=>_0x493c47['value']!=='')});if(!_0x3d79d5[_0x150fc0(0x28e)])return 0x0;_0x85c937=_0x3d79d5['attemptId'];}const _0x376301=_0x428b3e['follow'];return _0x376301?await this[_0x150fc0(0x242)](_0x20f606,_0x85c937):await this[_0x150fc0(0x122)](_0x20f606,_0x85c937,_0x428b3e),0x0;}async[a54_0x54edc0(0x122)](_0x282666,_0x40e88b,_0xdf6253){const _0x44617d=a54_0x54edc0,{tdx:_0x1559ff}=_0x282666;let _0x3cf730,_0xf523c4;try{[_0x3cf730,_0xf523c4]=await Promise[_0x44617d(0x168)]([_0x1559ff['workflow']['attempt'](_0x40e88b),_0x1559ff[_0x44617d(0x169)][_0x44617d(0x1a3)](_0x40e88b,![])]);}catch(_0x11af50){console[_0x44617d(0x279)](a54_0x26125e[_0x44617d(0x16f)](_0x44617d(0x28a)));_0xdf6253[_0x44617d(0x1f9)]&&console[_0x44617d(0x279)](_0x11af50);throw _0x11af50;}if(_0xdf6253[_0x44617d(0x11d)]||_0xdf6253[_0x44617d(0x245)]){const _0x32e177=this[_0x44617d(0x128)](_0x3cf730,_0xf523c4);await handleSDKOutput([_0x32e177],_0xdf6253);return;}const _0x470d91=_0x1559ff[_0x44617d(0x2c9)]['site'],_0x4f62c8=this[_0x44617d(0x12f)](_0x3cf730,_0xf523c4,_0x470d91);console['log'](_0x4f62c8);}async[a54_0x54edc0(0x242)](_0xb08079,_0x190dfc){const _0x1ef838=a54_0x54edc0,{tdx:_0x3f17a1}=_0xb08079,_0x2ee38f=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x1f07ac=TIMELINE_CONFIG[_0x1ef838(0x18d)];let _0x576d5f=0x0;while(_0x576d5f<_0x1f07ac){process[_0x1ef838(0x1ce)]['isTTY']&&process[_0x1ef838(0x1ce)][_0x1ef838(0x15c)]('\x1bc');let _0x4a15f2,_0xf689b4;try{[_0x4a15f2,_0xf689b4]=await Promise[_0x1ef838(0x168)]([_0x3f17a1[_0x1ef838(0x169)][_0x1ef838(0x164)](_0x190dfc),_0x3f17a1['workflow'][_0x1ef838(0x1a3)](_0x190dfc,![])]);}catch(_0x65ef01){console[_0x1ef838(0x279)](a54_0x26125e[_0x1ef838(0x16f)](_0x1ef838(0x1a9)));_0x576d5f>0x0&&console[_0x1ef838(0x279)](a54_0x26125e['dim'](_0x1ef838(0x190)+_0x576d5f));throw _0x65ef01;}const _0x189557=_0x3f17a1[_0x1ef838(0x2c9)][_0x1ef838(0x232)],_0x5e3621=this[_0x1ef838(0x12f)](_0x4a15f2,_0xf689b4,_0x189557);console[_0x1ef838(0x25d)](_0x5e3621);const _0xd94f6f=_0x4a15f2[_0x1ef838(0x188)]&&_0xf689b4[_0x1ef838(0x227)](_0x167c4f=>_0x167c4f[_0x1ef838(0x16d)]!==_0x1ef838(0x187)&&_0x167c4f[_0x1ef838(0x16d)]!=='planned');if(_0xd94f6f){console[_0x1ef838(0x279)](a54_0x26125e[_0x1ef838(0x208)](_0x1ef838(0x23b)));break;}console['error'](a54_0x26125e[_0x1ef838(0x13e)](_0x1ef838(0x203)+_0x576d5f*0x2+_0x1ef838(0x215))),await new Promise(_0x567d6c=>setTimeout(_0x567d6c,_0x2ee38f)),_0x576d5f++;}_0x576d5f>=_0x1f07ac&&console[_0x1ef838(0x279)](a54_0x26125e[_0x1ef838(0x21c)](_0x1ef838(0x209)));}[a54_0x54edc0(0x12f)](_0x1ba4a1,_0x12874f,_0x5655f2){const _0xadec5=a54_0x54edc0,_0x5c7da7=[],_0x4c9f62=TIMELINE_CONFIG[_0xadec5(0x2a4)],_0x2be1d3=0x5,_0x2dff32=process[_0xadec5(0x1ce)][_0xadec5(0x2c3)]||0x78,_0x447349=_0x2dff32-_0x4c9f62-_0x2be1d3,_0x36633e=Math[_0xadec5(0x224)](TIMELINE_CONFIG[_0xadec5(0x133)],Math[_0xadec5(0x121)](_0x447349,TIMELINE_CONFIG[_0xadec5(0x20f)])),_0x444847=new Date(_0x1ba4a1[_0xadec5(0x145)])[_0xadec5(0x284)](),_0x4da4e5=_0x1ba4a1['finishedAt']?new Date(_0x1ba4a1[_0xadec5(0x16e)])[_0xadec5(0x284)]():Date['now'](),_0x57a84f={'start':_0x444847,'end':_0x4da4e5,'duration':_0x4da4e5-_0x444847},_0x5a7f44=new Map(),_0x34bc42=[];for(const _0x4b2eb0 of _0x12874f){if(_0x4b2eb0[_0xadec5(0x1ae)]){const _0x3e83ad=new Date(_0x4b2eb0[_0xadec5(0x1ae)])[_0xadec5(0x284)](),_0x2de10b=_0x4b2eb0['updatedAt']?new Date(_0x4b2eb0[_0xadec5(0x246)])[_0xadec5(0x284)]():Date['now'](),_0x542989={'start':_0x3e83ad,'end':_0x2de10b,'duration':_0x2de10b-_0x3e83ad};_0x5a7f44[_0xadec5(0x11e)](_0x4b2eb0['id'],_0x542989),_0x34bc42[_0xadec5(0x167)]({'name':_0x4b2eb0[_0xadec5(0x16a)],'state':_0x4b2eb0['state']||_0xadec5(0x214),'window':_0x542989});}else _0x34bc42['push']({'name':_0x4b2eb0[_0xadec5(0x16a)],'state':_0x4b2eb0['state']||_0xadec5(0x161),'window':undefined});}_0x34bc42['sort']((_0x56e277,_0x183d7e)=>{const _0xa8d7af=_0xadec5;if(!_0x56e277[_0xa8d7af(0x2bc)])return 0x1;if(!_0x183d7e[_0xa8d7af(0x2bc)])return-0x1;return _0x56e277[_0xa8d7af(0x2bc)]['start']-_0x183d7e[_0xa8d7af(0x2bc)][_0xa8d7af(0x218)];});const _0x5cddeb=_0x34bc42[_0xadec5(0x274)],_0x57fe38=_0x5cddeb>TIMELINE_CONFIG[_0xadec5(0x244)];_0x57fe38&&_0x34bc42[_0xadec5(0x239)](TIMELINE_CONFIG[_0xadec5(0x244)]);const _0x13460d=calculateTimeScale(_0x57a84f,_0x36633e),_0x5d3954=_0x1ba4a1[_0xadec5(0x188)]?_0x1ba4a1[_0xadec5(0x2bb)]?a54_0x26125e[_0xadec5(0x208)](_0xadec5(0x2bb)):a54_0x26125e[_0xadec5(0x16f)](_0xadec5(0x279)):a54_0x26125e[_0xadec5(0x154)]('running'),_0x3eaaa1=_0x1ba4a1['project']?.['id'],_0x4236e4=_0x1ba4a1['sessionId'];let _0x5c5eb0;if(_0x3eaaa1&&_0x4236e4){const _0x20fab7=getWorkflowAttemptUrl(_0x5655f2,_0x3eaaa1,_0x4236e4,_0x1ba4a1['id']);_0x5c5eb0=hyperlink(a54_0x26125e['dim'](_0x1ba4a1['id']),_0x20fab7);}else _0x5c5eb0=a54_0x26125e[_0xadec5(0x13e)](_0x1ba4a1['id']);_0x5c7da7[_0xadec5(0x167)]('Attempt:\x20'+_0x5c5eb0+_0xadec5(0x2c2)+_0x5d3954+_0xadec5(0x2c2)+formatElapsed(_0x57a84f['duration']));if(_0x34bc42['length']>0x0){const _0x29bdd4=renderTimeAxis(_0x13460d,_0x36633e),_0xa7a550=new Date(_0x57a84f['start']),_0x3cc83f=formatDate(_0xa7a550),_0x2113ac=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG['ICON_SPACING']+_0x4c9f62,_0x482c2c=_0x3cc83f[_0xadec5(0x1d9)](_0x2113ac),_0x2e5d22=a54_0x26125e[_0xadec5(0x13e)](_0x482c2c);_0x5c7da7[_0xadec5(0x167)](_0x2e5d22+'\x20'+_0x29bdd4);for(const _0x4739a5 of _0x34bc42){_0x5c7da7['push'](renderTaskRow(_0x4739a5,_0x13460d,_0x36633e,_0x4c9f62));}const _0x18c420=calculateStats(_0x34bc42);_0x5c7da7['push'](formatStats(_0x18c420)),_0x57fe38&&_0x5c7da7[_0xadec5(0x167)](a54_0x26125e['yellow'](_0xadec5(0x240)+TIMELINE_CONFIG[_0xadec5(0x244)]+_0xadec5(0x15a)+_0x5cddeb+_0xadec5(0x15d))),_0x5c7da7[_0xadec5(0x167)](''),_0x5c7da7[_0xadec5(0x167)](a54_0x26125e['dim'](_0xadec5(0x18a))+('tdx\x20wf\x20attempt\x20'+_0x1ba4a1['id']+_0xadec5(0x263))+a54_0x26125e[_0xadec5(0x13e)](_0xadec5(0x1a0)));}else _0x5c7da7['push'](_0xadec5(0x25e));return _0x5c7da7[_0xadec5(0x2a6)]('\x0a');}[a54_0x54edc0(0x128)](_0x3a7a12,_0x3c7ec1){const _0x52f8c0=a54_0x54edc0,_0x5b2ee2=new Date(_0x3a7a12[_0x52f8c0(0x145)])[_0x52f8c0(0x284)](),_0x20e7df=_0x3a7a12[_0x52f8c0(0x16e)]?new Date(_0x3a7a12[_0x52f8c0(0x16e)])['getTime']():Date[_0x52f8c0(0x2be)](),_0xf51666=_0x20e7df-_0x5b2ee2,_0x462639=[];for(const _0x3acb20 of _0x3c7ec1){if(_0x3acb20[_0x52f8c0(0x1ae)]){const _0x645683=new Date(_0x3acb20[_0x52f8c0(0x1ae)])[_0x52f8c0(0x284)](),_0x29e97c=_0x3acb20[_0x52f8c0(0x246)]?new Date(_0x3acb20[_0x52f8c0(0x246)])[_0x52f8c0(0x284)]():Date[_0x52f8c0(0x2be)]();_0x462639['push']({'name':_0x3acb20[_0x52f8c0(0x16a)],'state':_0x3acb20[_0x52f8c0(0x16d)]||_0x52f8c0(0x214),'window':{'start':_0x645683,'end':_0x29e97c,'duration':_0x29e97c-_0x645683}});}else _0x462639[_0x52f8c0(0x167)]({'name':_0x3acb20['fullName'],'state':_0x3acb20[_0x52f8c0(0x16d)]||_0x52f8c0(0x161),'window':undefined});}const _0x20110c=calculateStats(_0x462639);return{'attempt':{'id':_0x3a7a12['id'],'status':_0x3a7a12[_0x52f8c0(0x188)]?_0x3a7a12['success']?'success':_0x52f8c0(0x279):_0x52f8c0(0x187),'createdAt':_0x3a7a12[_0x52f8c0(0x145)],'finishedAt':_0x3a7a12['finishedAt'],'duration_ms':_0xf51666},'tasks':_0x462639[_0x52f8c0(0x136)](_0x12bca8=>({'name':_0x12bca8['name'],'state':_0x12bca8['state'],'startedAt':_0x12bca8[_0x52f8c0(0x2bc)]?new Date(_0x12bca8[_0x52f8c0(0x2bc)][_0x52f8c0(0x218)])['toISOString']():null,'updatedAt':_0x12bca8[_0x52f8c0(0x2bc)]?new Date(_0x12bca8[_0x52f8c0(0x2bc)]['end'])[_0x52f8c0(0x139)]():null,'duration_ms':_0x12bca8[_0x52f8c0(0x2bc)]?.[_0x52f8c0(0x278)]||null})),'stats':_0x20110c};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x406db8,_0x533c9d){const _0x46ebc3=a55_0x9823,_0x1fbaf3=_0x406db8();while(!![]){try{const _0x41f003=-parseInt(_0x46ebc3(0x187))/0x1+parseInt(_0x46ebc3(0x18e))/0x2*(-parseInt(_0x46ebc3(0x190))/0x3)+-parseInt(_0x46ebc3(0x192))/0x4*(parseInt(_0x46ebc3(0x18c))/0x5)+parseInt(_0x46ebc3(0x195))/0x6*(-parseInt(_0x46ebc3(0x191))/0x7)+parseInt(_0x46ebc3(0x185))/0x8*(parseInt(_0x46ebc3(0x194))/0x9)+parseInt(_0x46ebc3(0x193))/0xa+-parseInt(_0x46ebc3(0x18b))/0xb*(-parseInt(_0x46ebc3(0x18f))/0xc);if(_0x41f003===_0x533c9d)break;else _0x1fbaf3['push'](_0x1fbaf3['shift']());}catch(_0x317f3b){_0x1fbaf3['push'](_0x1fbaf3['shift']());}}}(a55_0x2dda,0x1a42f));import{platform}from'os';import{getAPIKey}from'./config.js';function a55_0x2dda(){const _0x22ad7e=['entries','56277CqEMDe','tdx/','replace','Bearer\x20','11evqEbf','5kBZipG',';\x20node/','206MieUvH','2748600lnrGuv','2724RNFaMW','7ctKRto','286040uQrHDD','897690oHqoWp','90BgpMmG','325446SWAtuq','Authorization','51440mpNKgY'];a55_0x2dda=function(){return _0x22ad7e;};return a55_0x2dda();}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x24540a=a55_0x9823,_0x3bea13=getVersion(),_0x3550f5=platform(),_0x306909=process['version'][_0x24540a(0x189)]('v','');return _0x24540a(0x188)+_0x3bea13+'\x20('+_0x3550f5+_0x24540a(0x18d)+_0x306909+')';}export function getAuthHeaders(_0x1d78ff,_0x44d0a4,_0x38d417){const _0x5013c1=a55_0x9823,_0x9ff245=getVersion(),_0x279735={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x9ff245};if(_0x38d417)_0x279735[_0x5013c1(0x184)]=_0x5013c1(0x18a)+_0x38d417;else _0x44d0a4&&(_0x279735[_0x5013c1(0x184)]='TD1\x20'+_0x44d0a4);return _0x279735;}export function toHeaderRecord(_0x100ad2){const _0x348587=a55_0x9823,_0x28e14f={};for(const [_0x2fa103,_0x2da4a6]of Object[_0x348587(0x186)](_0x100ad2)){_0x2da4a6!==undefined&&(_0x28e14f[_0x2fa103]=_0x2da4a6);}return _0x28e14f;}export function getTrinoHeaders(_0x28e630,_0x4b8895,_0xe34410){const _0x463884=a55_0x9823,_0x5e8940=getAuthHeaders(_0x28e630),_0x2d41c7=toHeaderRecord(_0x5e8940);if(_0xe34410)_0x2d41c7[_0x463884(0x184)]=_0x463884(0x18a)+_0xe34410;else _0x4b8895&&(_0x2d41c7['X-Trino-User']=_0x4b8895);return _0x2d41c7;}function a55_0x9823(_0x151e0a,_0x150df8){_0x151e0a=_0x151e0a-0x184;const _0x2dda34=a55_0x2dda();let _0x982368=_0x2dda34[_0x151e0a];return _0x982368;}export function hasAPIKey(_0x175644){const _0x480833=getAPIKey();return _0x480833!==undefined&&_0x480833['length']>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x31e57d,_0x269d67){const _0x585620=a56_0x22c8,_0x53c395=_0x31e57d();while(!![]){try{const _0x19a641=parseInt(_0x585620(0x200))/0x1*(-parseInt(_0x585620(0x1f2))/0x2)+parseInt(_0x585620(0x212))/0x3+-parseInt(_0x585620(0x218))/0x4*(parseInt(_0x585620(0x1ec))/0x5)+-parseInt(_0x585620(0x1f0))/0x6+-parseInt(_0x585620(0x1e7))/0x7*(parseInt(_0x585620(0x201))/0x8)+parseInt(_0x585620(0x1dd))/0x9+-parseInt(_0x585620(0x1da))/0xa*(-parseInt(_0x585620(0x1fd))/0xb);if(_0x19a641===_0x269d67)break;else _0x53c395['push'](_0x53c395['shift']());}catch(_0x15e237){_0x53c395['push'](_0x53c395['shift']());}}}(a56_0x5536,0xefe3e));import{writeFileSync}from'fs';function a56_0x22c8(_0x15cfde,_0x53b32b){_0x15cfde=_0x15cfde-0x1d5;const _0x553630=a56_0x5536();let _0x22c80b=_0x553630[_0x15cfde];return _0x22c80b;}import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a56_0x186369 from'chalk';function a56_0x5536(){const _0x473e4e=['bigint','end','stdout','3363261DYadep','split','limitStructuredFormats','spawn','isInteger','slice','12GILrjF','[error]','max','isFinite','inherit','join','magenta','padEnd','push','jsonl','rule','less','debug','color','list','3372860maidLo','length','write','465822RJUVVw','FINISHED','varchar','stringify','bold','cmdout','No\x20data','[logs]','trim','pipe','11885776sGUWpF','forEach','map','─┬─','stderr','1551265WavRbO','limit','json','close','1293726LuxAWC','[query]','26HDNgeL','output','sdk-result','query','filter','keys','number','repeat','stdin','log','entries','143YlOpwJ','[rule]','tsv','133125cQiAyt','8VzBwCE','error','red','double','cyan','noColor','Results\x20saved\x20to\x20','format','isTTY','resolve','object','params','table','yellow'];a56_0x5536=function(){return _0x473e4e;};return a56_0x5536();}import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x3a7ace){const _0x3fcc6b=a56_0x22c8;return _0x3a7ace[_0x3fcc6b(0x208)]===_0x3fcc6b(0x1ee)||_0x3a7ace['format']==='jsonl'||_0x3a7ace['format']===_0x3fcc6b(0x1ff)||_0x3a7ace[_0x3fcc6b(0x208)]===_0x3fcc6b(0x20d)||_0x3a7ace[_0x3fcc6b(0x1ee)]===!![]||_0x3a7ace[_0x3fcc6b(0x221)]===!![]||_0x3a7ace[_0x3fcc6b(0x1ff)]===!![]||_0x3a7ace[_0x3fcc6b(0x20d)]===!![];}export function parseOutputOptions(_0x2a2640){const _0x3d4cfb=a56_0x22c8;return{'format':_0x2a2640['format']||_0x3d4cfb(0x20d),'output':_0x2a2640[_0x3d4cfb(0x1f3)]||'','limit':_0x2a2640[_0x3d4cfb(0x1ed)],'limitStructuredFormats':_0x2a2640[_0x3d4cfb(0x214)],'color':_0x2a2640[_0x3d4cfb(0x1d8)],'noColor':_0x2a2640[_0x3d4cfb(0x206)]};}function convertSDKResultToQueryResult(_0x1c4c32){const _0x55671d=a56_0x22c8,_0x1247d5=[];if(_0x1c4c32[_0x55671d(0x1db)]>0x0){const _0x28d963=_0x1c4c32[0x0];for(const [_0x3d6298,_0x371bfc]of Object[_0x55671d(0x1fc)](_0x28d963)){let _0x387f92=_0x55671d(0x1df);if(typeof _0x371bfc==='number')_0x387f92=Number[_0x55671d(0x216)](_0x371bfc)?_0x55671d(0x20f):_0x55671d(0x204);else{if(typeof _0x371bfc==='boolean')_0x387f92='boolean';else _0x371bfc===null&&(_0x387f92=_0x55671d(0x1df));}_0x1247d5[_0x55671d(0x220)]({'name':_0x3d6298,'type':_0x387f92});}}return{'queryId':_0x55671d(0x1f4),'columns':_0x1247d5,'data':_0x1c4c32,'stats':{'state':_0x55671d(0x1de),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1c4c32[_0x55671d(0x1db)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x5b0dc,_0x56c16a){const _0xb189a4=convertSDKResultToQueryResult(_0x5b0dc);return formatQueryOutput(_0xb189a4,_0x56c16a);}export async function formatQueryOutput(_0x12de53,_0x5514b7){const _0x2a4f29=a56_0x22c8,{format:_0x1edd9b,limit:_0x2a8d13,output:_0x4e42b0,color:_0x101707,noColor:_0x46f38b,limitStructuredFormats:_0x16c2f6}=_0x5514b7,_0x22167a=Boolean(_0x4e42b0)&&!_0x101707,_0x1a28a7={'color':_0x101707,'noColor':_0x46f38b||_0x22167a};if(_0x1edd9b===_0x2a4f29(0x20d)){const _0x1bbef3=shouldUseLess(_0x1edd9b,_0x4e42b0);return formatAsTable(_0x12de53,_0x2a8d13,_0x1bbef3,_0x1a28a7);}const _0x3278f9=_0x16c2f6&&Number[_0x2a4f29(0x21b)](_0x2a8d13)&&_0x12de53['data'][_0x2a4f29(0x1db)]>_0x2a8d13?{..._0x12de53,'data':_0x12de53['data'][_0x2a4f29(0x217)](0x0,_0x2a8d13)}:_0x12de53;if(_0x1edd9b===_0x2a4f29(0x1ee))return formatAsJSON(_0x3278f9,_0x1a28a7);else return _0x1edd9b===_0x2a4f29(0x221)?formatAsJSONL(_0x3278f9,_0x1a28a7):formatQueryResult(_0x3278f9,_0x1edd9b);}function shouldUseLess(_0x554b39,_0x44990a){const _0xd589c0=a56_0x22c8;return(_0x554b39===_0xd589c0(0x20d)||_0x554b39===_0xd589c0(0x1d9))&&process[_0xd589c0(0x211)][_0xd589c0(0x209)]&&!_0x44990a;}export function resolveOutputOptions(_0x2997d3){const _0x272b31=a56_0x22c8,_0xf9e707=_0x2997d3[_0x272b31(0x1f3)]||'',_0x7ace21=resolveOutputFormat(_0x2997d3[_0x272b31(0x208)],_0xf9e707,'table');let _0x2c69fc=typeof _0x2997d3['limit']===_0x272b31(0x1f8)?_0x2997d3[_0x272b31(0x1ed)]:parseInt(_0x2997d3[_0x272b31(0x1ed)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x2997d3[_0x272b31(0x1ed)]===undefined&&shouldUseLess(_0x7ace21,_0xf9e707)&&(_0x2c69fc=Infinity),{'format':_0x7ace21,'output':_0xf9e707,'limit':_0x2c69fc,'limitStructuredFormats':_0x2997d3[_0x272b31(0x214)],'color':_0x2997d3[_0x272b31(0x1d8)],'noColor':_0x2997d3[_0x272b31(0x206)]};}export function writeOutput(_0x23a767,_0x41120a,_0x219107){const _0x8086dc=a56_0x22c8;return _0x41120a?(writeFileSync(_0x41120a,_0x23a767),console[_0x8086dc(0x202)](_0x8086dc(0x207)+_0x41120a),Promise['resolve']()):shouldUseLess(_0x219107||'','')?new Promise(_0x4c2fa9=>{const _0x32c513=_0x8086dc,_0x58af7b=spawn(_0x32c513(0x1d6),['-FXRSn'],{'stdio':[_0x32c513(0x1e6),_0x32c513(0x21c),_0x32c513(0x21c)]});let _0x118c35=![];_0x58af7b['on'](_0x32c513(0x202),()=>{const _0x1ac9b6=_0x32c513;!_0x118c35&&(_0x118c35=!![],console[_0x1ac9b6(0x1fb)](_0x23a767),_0x4c2fa9());}),_0x58af7b['on'](_0x32c513(0x1ef),()=>{!_0x118c35&&(_0x118c35=!![],_0x4c2fa9());}),_0x58af7b['on'](_0x32c513(0x215),()=>{const _0x487db3=_0x32c513;!_0x118c35&&_0x58af7b['stdin']&&(_0x58af7b['stdin']['on'](_0x487db3(0x202),()=>{}),_0x58af7b['stdin'][_0x487db3(0x1dc)](_0x23a767),_0x58af7b[_0x487db3(0x1fa)][_0x487db3(0x210)]());}),!_0x58af7b[_0x32c513(0x1fa)]&&(!_0x118c35&&(_0x118c35=!![],console['log'](_0x23a767),_0x4c2fa9()));}):(console[_0x8086dc(0x1fb)](_0x23a767),Promise[_0x8086dc(0x20a)]());}export async function handleSDKOutput(_0xdd1940,_0x351d7e){const _0x15a0a3=a56_0x22c8,_0x3896c2=resolveOutputOptions(_0x351d7e),_0x5c8ab3=await formatSDKOutput(_0xdd1940,_0x3896c2);await writeOutput(_0x5c8ab3,_0x3896c2[_0x15a0a3(0x1f3)]||undefined,_0x3896c2[_0x15a0a3(0x208)]);}export async function handleQueryOutput(_0x2a0a16,_0x3f11d2){const _0x1a0fe9=a56_0x22c8,_0x40af89=resolveOutputOptions(_0x3f11d2),_0x20bebd=await formatQueryOutput(_0x2a0a16,_0x40af89);await writeOutput(_0x20bebd,_0x40af89['output']||undefined,_0x40af89[_0x1a0fe9(0x208)]);}async function formatSingleObject(_0x31df83,_0x4fdef0){const _0x152571=a56_0x22c8,{format:_0xff209f,color:_0x5191b1,noColor:_0xcf8a4f}=_0x4fdef0,_0x157bed={'color':_0x5191b1,'noColor':_0xcf8a4f};if(_0xff209f===_0x152571(0x1ee)){if(shouldUseColor(_0x157bed))return colorizeJSON(_0x31df83,_0x157bed);return JSON[_0x152571(0x1e0)](_0x31df83,null,0x2);}else{if(_0xff209f===_0x152571(0x221)){if(shouldUseColor(_0x157bed))return colorizeJSONCompact(_0x31df83,_0x157bed);return JSON[_0x152571(0x1e0)](_0x31df83);}else{if(_0xff209f===_0x152571(0x1ff))return Object[_0x152571(0x1fc)](_0x31df83)[_0x152571(0x1e9)](([_0x435976,_0x8f3565])=>_0x435976+'\x09'+_0x8f3565)[_0x152571(0x21d)]('\x0a');else{const _0x79195d=Object[_0x152571(0x1fc)](_0x31df83);if(_0x79195d['length']===0x0)return _0x152571(0x1e3);const _0x2035d9=_0x31df83[_0x152571(0x1d7)],_0x3b12e6=_0x31df83[_0x152571(0x1f5)],_0x100bd6=_0x31df83[_0x152571(0x20c)],_0x1de7ed=_0x31df83[_0x152571(0x1d5)],_0x1a0890=_0x3b12e6?typeof _0x3b12e6==='string'?_0x3b12e6:JSON[_0x152571(0x1e0)](_0x3b12e6,null,0x2):undefined,_0x23424c=_0x100bd6&&Object[_0x152571(0x1f7)](_0x100bd6)[_0x152571(0x1db)]>0x0?JSON[_0x152571(0x1e0)](_0x100bd6,null,0x2):undefined,_0x36e8a4=_0x1de7ed&&Object[_0x152571(0x1f7)](_0x1de7ed)[_0x152571(0x1db)]>0x0?JSON[_0x152571(0x1e0)](_0x1de7ed,null,0x2):undefined,_0x50431d=_0x79195d[_0x152571(0x1f6)](([_0x372be1])=>_0x372be1!==_0x152571(0x1d7)&&_0x372be1!==_0x152571(0x1f5)&&_0x372be1!==_0x152571(0x20c)&&_0x372be1!==_0x152571(0x1d5)),_0x505683=Math[_0x152571(0x21a)](..._0x50431d[_0x152571(0x1e9)](([_0x4272f1])=>_0x4272f1[_0x152571(0x1db)])),_0x1ab68d=Math[_0x152571(0x21a)](..._0x50431d[_0x152571(0x1e9)](([,_0x4fa36c])=>{const _0x2f2c0f=_0x152571;try{const _0x660b9b=_0x4fa36c===null||_0x4fa36c===undefined?'':typeof _0x4fa36c===_0x2f2c0f(0x20b)?JSON[_0x2f2c0f(0x1e0)](_0x4fa36c):String(_0x4fa36c),_0x33d034=_0x660b9b[_0x2f2c0f(0x213)]('\x0a');return Math['max'](..._0x33d034[_0x2f2c0f(0x1e9)](_0x50c63a=>_0x50c63a[_0x2f2c0f(0x1db)]),0x0);}catch{return 0x0;}}),0x14),_0x2faa55=[];_0x2faa55[_0x152571(0x220)](colorBorder('┌─'+'─'[_0x152571(0x1f9)](_0x505683)+_0x152571(0x1ea)+'─'[_0x152571(0x1f9)](_0x1ab68d)+'─┐',_0x157bed)),_0x50431d[_0x152571(0x1e8)](([_0x40be9d,_0x2cb70a])=>{const _0x11c528=_0x152571;let _0xd78317;try{_0xd78317=_0x2cb70a===null||_0x2cb70a===undefined?'':typeof _0x2cb70a===_0x11c528(0x20b)?JSON[_0x11c528(0x1e0)](_0x2cb70a):String(_0x2cb70a);}catch{_0xd78317='[Object]';}const _0x154353=_0x40be9d[_0x11c528(0x21f)](_0x505683),_0xc59852=_0xd78317[_0x11c528(0x213)]('\x0a');_0xc59852[_0x11c528(0x1e8)]((_0x3a5878,_0x29fbe5)=>{const _0x57cfe0=_0x11c528,_0x3ce395=colorBorder('│',_0x157bed);_0x29fbe5===0x0?_0x2faa55[_0x57cfe0(0x220)](_0x3ce395+'\x20'+_0x154353+'\x20'+_0x3ce395+'\x20'+_0x3a5878[_0x57cfe0(0x21f)](_0x1ab68d)+'\x20'+_0x3ce395):_0x2faa55[_0x57cfe0(0x220)](_0x3ce395+'\x20'+'\x20'[_0x57cfe0(0x1f9)](_0x505683)+'\x20'+_0x3ce395+'\x20'+_0x3a5878[_0x57cfe0(0x21f)](_0x1ab68d)+'\x20'+_0x3ce395);});}),_0x2faa55[_0x152571(0x220)](colorBorder('└─'+'─'[_0x152571(0x1f9)](_0x505683)+'─┴─'+'─'[_0x152571(0x1f9)](_0x1ab68d)+'─┘',_0x157bed));_0x1a0890&&(_0x2faa55[_0x152571(0x220)](''),_0x2faa55[_0x152571(0x220)](String(a56_0x186369[_0x152571(0x20e)]['bold'](_0x152571(0x1f1)))),_0x2faa55[_0x152571(0x220)](_0x1a0890));_0x23424c&&(_0x2faa55[_0x152571(0x220)](''),_0x2faa55[_0x152571(0x220)](String(a56_0x186369['blue'][_0x152571(0x1e1)]('[params]'))),_0x2faa55[_0x152571(0x220)](_0x23424c));_0x36e8a4&&(_0x2faa55[_0x152571(0x220)](''),_0x2faa55['push'](String(a56_0x186369[_0x152571(0x21e)][_0x152571(0x1e1)](_0x152571(0x1fe)))),_0x2faa55['push'](_0x36e8a4));if(_0x2035d9){if(_0x2035d9[_0x152571(0x1eb)]){_0x2faa55['push'](''),_0x2faa55[_0x152571(0x220)](String(a56_0x186369[_0x152571(0x203)][_0x152571(0x1e1)](_0x152571(0x219))));const _0x364ce5=_0x2035d9[_0x152571(0x1eb)][_0x152571(0x213)]('\x0a');_0x364ce5[_0x152571(0x1e8)](_0x131c78=>{const _0x335cab=_0x152571;_0x131c78[_0x335cab(0x1e5)]()&&_0x2faa55[_0x335cab(0x220)](_0x131c78);});}if(_0x2035d9[_0x152571(0x1e2)]){_0x2faa55[_0x152571(0x220)](''),_0x2faa55['push'](String(a56_0x186369[_0x152571(0x205)][_0x152571(0x1e1)](_0x152571(0x1e4))));const _0x5c2ad9=_0x2035d9[_0x152571(0x1e2)][_0x152571(0x213)]('\x0a');_0x5c2ad9[_0x152571(0x1e8)](_0x1d0b76=>{_0x1d0b76['trim']()&&_0x2faa55['push'](_0x1d0b76);});}}return _0x2faa55[_0x152571(0x21d)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x13e75c,_0x2f467f){const _0x3ab84a=a56_0x22c8;if(_0x2f467f[_0x3ab84a(0x208)]===_0x3ab84a(0x20d)){await handleSDKOutput([_0x13e75c],_0x2f467f);return;}const _0x4e5766=resolveOutputOptions(_0x2f467f),_0x4f6c4f=await formatSingleObject(_0x13e75c,_0x4e5766);await writeOutput(_0x4f6c4f,_0x4e5766[_0x3ab84a(0x1f3)]||undefined,_0x4e5766[_0x3ab84a(0x208)]);}
|
|
1
|
+
(function(_0x56a0b2,_0x10c9f0){const _0x5a6496=a56_0x3c04,_0x3e0167=_0x56a0b2();while(!![]){try{const _0x1aff19=parseInt(_0x5a6496(0x131))/0x1+-parseInt(_0x5a6496(0x118))/0x2+-parseInt(_0x5a6496(0x11b))/0x3+-parseInt(_0x5a6496(0x127))/0x4+-parseInt(_0x5a6496(0x14d))/0x5*(parseInt(_0x5a6496(0x11d))/0x6)+-parseInt(_0x5a6496(0x116))/0x7+parseInt(_0x5a6496(0x13a))/0x8;if(_0x1aff19===_0x10c9f0)break;else _0x3e0167['push'](_0x3e0167['shift']());}catch(_0x5e4a5f){_0x3e0167['push'](_0x3e0167['shift']());}}}(a56_0x50d4,0x5abab));import{writeFileSync}from'fs';function a56_0x3c04(_0x29a66a,_0x1a15bb){_0x29a66a=_0x29a66a-0x10e;const _0x50d46d=a56_0x50d4();let _0x3c044d=_0x50d46d[_0x29a66a];return _0x3c044d;}import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a56_0x171798 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x565a07){const _0x17dddb=a56_0x3c04;return _0x565a07[_0x17dddb(0x135)]==='json'||_0x565a07['format']==='jsonl'||_0x565a07['format']==='tsv'||_0x565a07[_0x17dddb(0x135)]==='table'||_0x565a07[_0x17dddb(0x14b)]===!![]||_0x565a07[_0x17dddb(0x147)]===!![]||_0x565a07[_0x17dddb(0x137)]===!![]||_0x565a07[_0x17dddb(0x12e)]===!![];}export function parseOutputOptions(_0x5c91d5){const _0x2ba242=a56_0x3c04;return{'format':_0x5c91d5[_0x2ba242(0x135)]||_0x2ba242(0x12e),'output':_0x5c91d5[_0x2ba242(0x124)]||'','limit':_0x5c91d5[_0x2ba242(0x12f)],'limitStructuredFormats':_0x5c91d5[_0x2ba242(0x114)],'color':_0x5c91d5['color'],'noColor':_0x5c91d5['noColor']};}function convertSDKResultToQueryResult(_0x31f360){const _0x2dbfd6=a56_0x3c04,_0x501dae=[];if(_0x31f360[_0x2dbfd6(0x115)]>0x0){const _0x4966ca=_0x31f360[0x0];for(const [_0x49691c,_0x506a38]of Object[_0x2dbfd6(0x13d)](_0x4966ca)){let _0x364036='varchar';if(typeof _0x506a38===_0x2dbfd6(0x143))_0x364036=Number[_0x2dbfd6(0x11e)](_0x506a38)?_0x2dbfd6(0x133):'double';else{if(typeof _0x506a38===_0x2dbfd6(0x148))_0x364036=_0x2dbfd6(0x148);else _0x506a38===null&&(_0x364036=_0x2dbfd6(0x14e));}_0x501dae[_0x2dbfd6(0x110)]({'name':_0x49691c,'type':_0x364036});}}return{'queryId':'sdk-result','columns':_0x501dae,'data':_0x31f360,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x31f360[_0x2dbfd6(0x115)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x3aa8d4,_0x326296){const _0x32f118=convertSDKResultToQueryResult(_0x3aa8d4);return formatQueryOutput(_0x32f118,_0x326296);}export async function formatQueryOutput(_0xd4593c,_0x19f5b3){const _0x729707=a56_0x3c04,{format:_0x104410,limit:_0x24f424,output:_0xf6d0fc,color:_0x2d0758,noColor:_0x4d24f8,limitStructuredFormats:_0x233858}=_0x19f5b3,_0x592f00=Boolean(_0xf6d0fc)&&!_0x2d0758,_0x5ddbdb={'color':_0x2d0758,'noColor':_0x4d24f8||_0x592f00};if(_0x104410===_0x729707(0x12e)){const _0x95fc29=shouldUseLess(_0x104410,_0xf6d0fc);return formatAsTable(_0xd4593c,_0x24f424,_0x95fc29,_0x5ddbdb);}const _0x33fd1f=_0x233858&&Number[_0x729707(0x151)](_0x24f424)&&_0xd4593c['data'][_0x729707(0x115)]>_0x24f424?{..._0xd4593c,'data':_0xd4593c[_0x729707(0x126)][_0x729707(0x130)](0x0,_0x24f424)}:_0xd4593c;if(_0x104410===_0x729707(0x14b))return formatAsJSON(_0x33fd1f,_0x5ddbdb);else return _0x104410===_0x729707(0x147)?formatAsJSONL(_0x33fd1f,_0x5ddbdb):formatQueryResult(_0x33fd1f,_0x104410);}function shouldUseLess(_0x2fd2ba,_0xcd6b4d){const _0x85fdc6=a56_0x3c04;return(_0x2fd2ba===_0x85fdc6(0x12e)||_0x2fd2ba===_0x85fdc6(0x152))&&process[_0x85fdc6(0x12c)][_0x85fdc6(0x120)]&&!_0xcd6b4d;}export function resolveOutputOptions(_0xec8cff){const _0xce1f8=a56_0x3c04,_0x1f794c=_0xec8cff[_0xce1f8(0x124)]||'',_0x2f272b=resolveOutputFormat(_0xec8cff[_0xce1f8(0x135)],_0x1f794c,_0xce1f8(0x12e));let _0x502566=typeof _0xec8cff[_0xce1f8(0x12f)]===_0xce1f8(0x143)?_0xec8cff[_0xce1f8(0x12f)]:parseInt(_0xec8cff[_0xce1f8(0x12f)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0xec8cff[_0xce1f8(0x12f)]===undefined&&shouldUseLess(_0x2f272b,_0x1f794c)&&(_0x502566=Infinity),{'format':_0x2f272b,'output':_0x1f794c,'limit':_0x502566,'limitStructuredFormats':_0xec8cff['limitStructuredFormats'],'color':_0xec8cff['color'],'noColor':_0xec8cff[_0xce1f8(0x125)]};}export function writeOutput(_0x5b7b2c,_0x3714a1,_0x228632){const _0x15f7ef=a56_0x3c04;return _0x3714a1?(writeFileSync(_0x3714a1,_0x5b7b2c),console[_0x15f7ef(0x140)]('Results\x20saved\x20to\x20'+_0x3714a1),Promise[_0x15f7ef(0x128)]()):shouldUseLess(_0x228632||'','')?new Promise(_0x570e74=>{const _0x407d10=_0x15f7ef,_0x448653=spawn('less',[_0x407d10(0x10f)],{'stdio':['pipe',_0x407d10(0x144),_0x407d10(0x144)]});let _0xa2e449=![];_0x448653['on'](_0x407d10(0x140),()=>{!_0xa2e449&&(_0xa2e449=!![],console['log'](_0x5b7b2c),_0x570e74());}),_0x448653['on'](_0x407d10(0x12a),()=>{!_0xa2e449&&(_0xa2e449=!![],_0x570e74());}),_0x448653['on'](_0x407d10(0x129),()=>{const _0x4f6935=_0x407d10;!_0xa2e449&&_0x448653[_0x4f6935(0x11c)]&&(_0x448653[_0x4f6935(0x11c)]['on'](_0x4f6935(0x140),()=>{}),_0x448653['stdin']['write'](_0x5b7b2c),_0x448653[_0x4f6935(0x11c)][_0x4f6935(0x112)]());}),!_0x448653[_0x407d10(0x11c)]&&(!_0xa2e449&&(_0xa2e449=!![],console[_0x407d10(0x119)](_0x5b7b2c),_0x570e74()));}):(console[_0x15f7ef(0x119)](_0x5b7b2c),Promise['resolve']());}export async function handleSDKOutput(_0x3d2c9e,_0x42955f){const _0x2794b5=a56_0x3c04,_0x52b624=resolveOutputOptions(_0x42955f),_0x3c392b=await formatSDKOutput(_0x3d2c9e,_0x52b624);await writeOutput(_0x3c392b,_0x52b624[_0x2794b5(0x124)]||undefined,_0x52b624['format']);}function a56_0x50d4(){const _0x1a4d7a=['─┴─','params','stderr','output','noColor','data','1154812AVgiIB','resolve','spawn','close','cmdout','stdout','magenta','table','limit','slice','389715dtdndP','debug','bigint','[rule]','format','max','tsv','repeat','[Object]','20468560VuyYxQ','keys','padEnd','entries','map','blue','error','query','join','number','inherit','object','trim','jsonl','boolean','─┬─','bold','json','split','32610KVZqbg','varchar','string','rule','isFinite','list','forEach','-FXRSn','push','red','end','yellow','limitStructuredFormats','length','4581899ZkLfQO','stringify','1483476klasjM','log','[logs]','1051002eANJtw','stdin','498tzDPKo','isInteger','filter','isTTY'];a56_0x50d4=function(){return _0x1a4d7a;};return a56_0x50d4();}export async function handleQueryOutput(_0x30857b,_0x23d4d4){const _0x193ef7=a56_0x3c04,_0x5676ef=resolveOutputOptions(_0x23d4d4),_0x14ac91=await formatQueryOutput(_0x30857b,_0x5676ef);await writeOutput(_0x14ac91,_0x5676ef[_0x193ef7(0x124)]||undefined,_0x5676ef['format']);}async function formatSingleObject(_0x4d54bf,_0x538532){const _0x384a67=a56_0x3c04,{format:_0x1ac150,color:_0x4ed847,noColor:_0xcbce2b}=_0x538532,_0x4c72f3={'color':_0x4ed847,'noColor':_0xcbce2b};if(_0x1ac150==='json'){if(shouldUseColor(_0x4c72f3))return colorizeJSON(_0x4d54bf,_0x4c72f3);return JSON[_0x384a67(0x117)](_0x4d54bf,null,0x2);}else{if(_0x1ac150===_0x384a67(0x147)){if(shouldUseColor(_0x4c72f3))return colorizeJSONCompact(_0x4d54bf,_0x4c72f3);return JSON['stringify'](_0x4d54bf);}else{if(_0x1ac150==='tsv')return Object['entries'](_0x4d54bf)[_0x384a67(0x13e)](([_0x3ba392,_0x2403b8])=>_0x3ba392+'\x09'+_0x2403b8)[_0x384a67(0x142)]('\x0a');else{const _0x7d8d19=Object[_0x384a67(0x13d)](_0x4d54bf);if(_0x7d8d19[_0x384a67(0x115)]===0x0)return'No\x20data';const _0x276cc6=_0x4d54bf[_0x384a67(0x132)],_0x31e862=_0x4d54bf[_0x384a67(0x141)],_0xd9562=_0x4d54bf[_0x384a67(0x122)],_0x4c534a=_0x4d54bf[_0x384a67(0x150)],_0x5cbc8e=_0x31e862?typeof _0x31e862===_0x384a67(0x14f)?_0x31e862:JSON[_0x384a67(0x117)](_0x31e862,null,0x2):undefined,_0x20d70b=_0xd9562&&Object[_0x384a67(0x13b)](_0xd9562)[_0x384a67(0x115)]>0x0?JSON['stringify'](_0xd9562,null,0x2):undefined,_0x29d246=_0x4c534a&&Object[_0x384a67(0x13b)](_0x4c534a)['length']>0x0?JSON[_0x384a67(0x117)](_0x4c534a,null,0x2):undefined,_0x4b4c2e=_0x7d8d19[_0x384a67(0x11f)](([_0x2c533b])=>_0x2c533b!==_0x384a67(0x132)&&_0x2c533b!==_0x384a67(0x141)&&_0x2c533b!==_0x384a67(0x122)&&_0x2c533b!==_0x384a67(0x150)),_0x3bd516=Math[_0x384a67(0x136)](..._0x4b4c2e['map'](([_0x4e6fca])=>_0x4e6fca[_0x384a67(0x115)])),_0x144d16=Math['max'](..._0x4b4c2e['map'](([,_0x2764d8])=>{const _0x5c06ad=_0x384a67;try{const _0x5df9ea=_0x2764d8===null||_0x2764d8===undefined?'':typeof _0x2764d8===_0x5c06ad(0x145)?JSON['stringify'](_0x2764d8):String(_0x2764d8),_0x121222=_0x5df9ea[_0x5c06ad(0x14c)]('\x0a');return Math[_0x5c06ad(0x136)](..._0x121222[_0x5c06ad(0x13e)](_0x36c20d=>_0x36c20d['length']),0x0);}catch{return 0x0;}}),0x14),_0x436098=[];_0x436098[_0x384a67(0x110)](colorBorder('┌─'+'─'[_0x384a67(0x138)](_0x3bd516)+_0x384a67(0x149)+'─'[_0x384a67(0x138)](_0x144d16)+'─┐',_0x4c72f3)),_0x4b4c2e[_0x384a67(0x10e)](([_0xafbc1e,_0x3f9d20])=>{const _0x375f31=_0x384a67;let _0x3faadd;try{_0x3faadd=_0x3f9d20===null||_0x3f9d20===undefined?'':typeof _0x3f9d20===_0x375f31(0x145)?JSON[_0x375f31(0x117)](_0x3f9d20):String(_0x3f9d20);}catch{_0x3faadd=_0x375f31(0x139);}const _0x3fc3bf=_0xafbc1e[_0x375f31(0x13c)](_0x3bd516),_0x47f814=_0x3faadd[_0x375f31(0x14c)]('\x0a');_0x47f814[_0x375f31(0x10e)]((_0x279bb7,_0x407cd8)=>{const _0x5c90b3=_0x375f31,_0x3985cc=colorBorder('│',_0x4c72f3);_0x407cd8===0x0?_0x436098[_0x5c90b3(0x110)](_0x3985cc+'\x20'+_0x3fc3bf+'\x20'+_0x3985cc+'\x20'+_0x279bb7[_0x5c90b3(0x13c)](_0x144d16)+'\x20'+_0x3985cc):_0x436098['push'](_0x3985cc+'\x20'+'\x20'[_0x5c90b3(0x138)](_0x3bd516)+'\x20'+_0x3985cc+'\x20'+_0x279bb7[_0x5c90b3(0x13c)](_0x144d16)+'\x20'+_0x3985cc);});}),_0x436098[_0x384a67(0x110)](colorBorder('└─'+'─'[_0x384a67(0x138)](_0x3bd516)+_0x384a67(0x121)+'─'['repeat'](_0x144d16)+'─┘',_0x4c72f3));_0x5cbc8e&&(_0x436098['push'](''),_0x436098[_0x384a67(0x110)](String(a56_0x171798[_0x384a67(0x113)][_0x384a67(0x14a)]('[query]'))),_0x436098[_0x384a67(0x110)](_0x5cbc8e));_0x20d70b&&(_0x436098[_0x384a67(0x110)](''),_0x436098[_0x384a67(0x110)](String(a56_0x171798[_0x384a67(0x13f)][_0x384a67(0x14a)]('[params]'))),_0x436098[_0x384a67(0x110)](_0x20d70b));_0x29d246&&(_0x436098[_0x384a67(0x110)](''),_0x436098[_0x384a67(0x110)](String(a56_0x171798[_0x384a67(0x12d)]['bold'](_0x384a67(0x134)))),_0x436098[_0x384a67(0x110)](_0x29d246));if(_0x276cc6){if(_0x276cc6[_0x384a67(0x123)]){_0x436098[_0x384a67(0x110)](''),_0x436098[_0x384a67(0x110)](String(a56_0x171798[_0x384a67(0x111)]['bold']('[error]')));const _0x45357=_0x276cc6[_0x384a67(0x123)][_0x384a67(0x14c)]('\x0a');_0x45357['forEach'](_0x43669b=>{const _0x113098=_0x384a67;_0x43669b[_0x113098(0x146)]()&&_0x436098[_0x113098(0x110)](_0x43669b);});}if(_0x276cc6['cmdout']){_0x436098['push'](''),_0x436098['push'](String(a56_0x171798['cyan'][_0x384a67(0x14a)](_0x384a67(0x11a))));const _0x191b91=_0x276cc6[_0x384a67(0x12b)]['split']('\x0a');_0x191b91[_0x384a67(0x10e)](_0x8040ba=>{const _0x209c68=_0x384a67;_0x8040ba[_0x209c68(0x146)]()&&_0x436098[_0x209c68(0x110)](_0x8040ba);});}}return _0x436098[_0x384a67(0x142)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x2cff81,_0x29d9dd){const _0x3919e9=a56_0x3c04;if(_0x29d9dd[_0x3919e9(0x135)]===_0x3919e9(0x12e)){await handleSDKOutput([_0x2cff81],_0x29d9dd);return;}const _0x2ee0c0=resolveOutputOptions(_0x29d9dd),_0x4c54c4=await formatSingleObject(_0x2cff81,_0x2ee0c0);await writeOutput(_0x4c54c4,_0x2ee0c0[_0x3919e9(0x124)]||undefined,_0x2ee0c0['format']);}
|