@treasuredata/tdx 2026.3.20 → 2026.3.22
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.d.ts +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-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.d.ts +33 -0
- package/dist/commands/policy-command.d.ts.map +1 -0
- package/dist/commands/policy-command.js +1 -0
- package/dist/commands/policy-command.js.map +1 -0
- 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/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/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/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.d.ts +7 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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.d.ts +41 -0
- package/dist/sdk/policy.d.ts.map +1 -0
- package/dist/sdk/policy.js +1 -0
- package/dist/sdk/policy.js.map +1 -0
- 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.d.ts +1 -0
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/policy.d.ts +58 -0
- package/dist/sdk/types/policy.d.ts.map +1 -0
- package/dist/sdk/types/policy.js +1 -0
- package/dist/sdk/types/policy.js.map +1 -0
- package/dist/sdk/types/progress.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/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 a51_0x22a388=a51_0x57ff;(function(_0x75908b,_0x4f2e71){const _0x510860=a51_0x57ff,_0xae360e=_0x75908b();while(!![]){try{const _0x1dd9da=parseInt(_0x510860(0x15e))/0x1+-parseInt(_0x510860(0x1ff))/0x2*(parseInt(_0x510860(0x137))/0x3)+parseInt(_0x510860(0x116))/0x4*(parseInt(_0x510860(0x185))/0x5)+-parseInt(_0x510860(0x19e))/0x6*(parseInt(_0x510860(0xc4))/0x7)+parseInt(_0x510860(0x230))/0x8*(-parseInt(_0x510860(0x16f))/0x9)+parseInt(_0x510860(0x181))/0xa*(parseInt(_0x510860(0x193))/0xb)+parseInt(_0x510860(0xfe))/0xc;if(_0x1dd9da===_0x4f2e71)break;else _0xae360e['push'](_0xae360e['shift']());}catch(_0x3a9057){_0xae360e['push'](_0xae360e['shift']());}}}(a51_0x15a1,0xb2c43));import a51_0x5bf18c from'chalk';import{existsSync}from'fs';import a51_0x108fb0 from'path';import{BaseCommand}from'./command.js';function a51_0x57ff(_0x313d8a,_0x4aa9fb){_0x313d8a=_0x313d8a-0x9a;const _0x15a1bc=a51_0x15a1();let _0x57ffb4=_0x15a1bc[_0x313d8a];return _0x57ffb4;}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 a51_0x4f4bd3 from'prompts';function getAttemptStatusDisplay(_0x36a70b){const _0x490647=a51_0x57ff;if(!_0x36a70b)return{'icon':'⏳','text':''};const {done:_0x2381d8,success:_0x5a91c8,cancelRequested:_0x3f8c7e}=_0x36a70b;if(!_0x2381d8)return _0x3f8c7e?{'icon':'🛑','text':a51_0x5bf18c['yellow'](_0x490647(0x18c))}:{'icon':'🔄','text':a51_0x5bf18c['blue'](_0x490647(0x15b))};if(_0x5a91c8)return{'icon':'✅','text':a51_0x5bf18c[_0x490647(0xf7)](_0x490647(0x179))};return{'icon':'❌','text':a51_0x5bf18c['red'](_0x490647(0xf6))};}export class WorkflowBaseCommand extends BaseCommand{[a51_0x22a388(0x202)](_0x24ac75,_0x17e688,_0x1768e9=0x0){return _0x24ac75[_0x1768e9]||_0x17e688['workflowProject'];}['requireProject'](_0x3fd8b4,_0x27de86,_0x228223=0x0){const _0x11a967=a51_0x22a388,_0x21ffd3=this['resolveProject'](_0x3fd8b4,_0x27de86,_0x228223);if(!_0x21ffd3)return console[_0x11a967(0xf6)](a51_0x5bf18c['red']('Error:'),'Project\x20name\x20is\x20required'),console[_0x11a967(0xf6)](a51_0x5bf18c['dim'](_0x11a967(0x10a))),null;return _0x21ffd3;}['parseProjectWorkflowPattern'](_0x136944,_0x640206){const _0x2be523=a51_0x22a388;if(_0x136944[0x0]){const _0x1b3948=_0x136944[0x0][_0x2be523(0x22c)]('.');if(_0x1b3948[_0x2be523(0x221)]===0x1)return{'projectName':_0x1b3948[0x0],'workflowName':undefined};else return _0x1b3948[_0x2be523(0x221)]===0x2?{'projectName':_0x1b3948[0x0],'workflowName':_0x1b3948[0x1]}:(console[_0x2be523(0xf6)](a51_0x5bf18c[_0x2be523(0xf3)](_0x2be523(0x1e0)),_0x2be523(0x13d)),null);}return{'projectName':_0x640206['workflowProject'],'workflowName':undefined};}['resolveProjectDir'](_0x590abb,_0x57a309,_0x273b87=0x0){const _0x339145=a51_0x22a388;if(_0x590abb[_0x273b87])return _0x590abb[_0x273b87];if(_0x57a309[_0x339145(0x1c1)]){const _0x221c83=a51_0x108fb0[_0x339145(0x192)](process[_0x339145(0x166)](),'workflows',_0x57a309['workflowProject']);if(existsSync(a51_0x108fb0[_0x339145(0x192)](_0x221c83,'tdx.json')))return _0x221c83;}return undefined;}async['showWorkflowConsoleUrl'](_0x46bdd0,_0xb5e62c,_0x4ece11){const _0x5f5da6=a51_0x22a388;try{const _0x14224f=await _0x46bdd0[_0x5f5da6(0x121)][_0x5f5da6(0xa7)](_0xb5e62c,{'limit':0x1});if(_0x14224f[_0x5f5da6(0x221)]>0x0){const _0x21089e=_0x14224f[0x0]['id'],_0x5865ad=getWorkflowUrl(_0x4ece11,_0x21089e);console[_0x5f5da6(0xf6)](_0x5f5da6(0xa4)+a51_0x5bf18c[_0x5f5da6(0xbb)](_0x5865ad));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x20d);[a51_0x22a388(0x1b4)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a51_0x22a388(0xd2)](_0x226f97){const _0x567a04=a51_0x22a388,{options:_0xf38846,args:_0x349c8d,tdx:_0x1ba47b}=_0x226f97,_0x1da4d4=_0x349c8d[0x0],_0x102391=_0xf38846['clear'];if(_0x102391)return saveSessionContext({'workflow_project':undefined},_0xf38846['session']),console[_0x567a04(0x204)](a51_0x5bf18c[_0x567a04(0xf7)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x1da4d4)return console[_0x567a04(0xf6)](a51_0x5bf18c[_0x567a04(0xf3)](_0x567a04(0x1e0)),_0x567a04(0x21b)),console['error'](a51_0x5bf18c[_0x567a04(0x1b0)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x567a04(0xf6)](a51_0x5bf18c[_0x567a04(0x1b0)](_0x567a04(0x1e7))),0x1;const _0x1f0879=await withSpinner(_0x567a04(0x1a8)+_0x1da4d4+_0x567a04(0xda),()=>_0x1ba47b[_0x567a04(0x121)][_0x567a04(0x14f)](_0x1da4d4),{'verbose':_0xf38846[_0x567a04(0xde)]}),{name:_0x17c47a}=_0x1f0879[_0x567a04(0x195)];return saveSessionContext({'workflow_project':_0x17c47a},_0xf38846['session']),console[_0x567a04(0x204)](a51_0x5bf18c[_0x567a04(0xf7)](_0x567a04(0x1e5)+a51_0x5bf18c[_0x567a04(0xbb)](_0x17c47a))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a51_0x22a388(0x147);[a51_0x22a388(0x1b4)]='List\x20all\x20workflow\x20projects';async['execute'](_0x5b25ab){const _0x1e683d=a51_0x22a388,{options:_0x45c5cc,args:_0x6e759f,tdx:_0x4e61a4}=_0x5b25ab,_0x4b686c=_0x6e759f[0x0];_0x45c5cc[_0x1e683d(0xde)]&&_0x4b686c&&console['error'](_0x1e683d(0x18d)+_0x4b686c);const _0x2bd287=await withSpinner(_0x1e683d(0x129),()=>_0x4e61a4['workflow'][_0x1e683d(0x126)](_0x4b686c,{'limit':_0x45c5cc[_0x1e683d(0xa9)]}),{'verbose':_0x45c5cc[_0x1e683d(0xde)]});let _0x4688ca=_0x2bd287[_0x1e683d(0x195)];_0x4688ca['sort']((_0x917c6b,_0x110f93)=>_0x917c6b['name'][_0x1e683d(0xa1)](_0x110f93[_0x1e683d(0x174)]));const _0x8d30fa=_0x45c5cc[_0x1e683d(0xa9)]||0x64,_0x376b5a=_0x4688ca[_0x1e683d(0x221)]>=_0x8d30fa?a51_0x5bf18c[_0x1e683d(0x1b0)](_0x1e683d(0x22a)):'';console[_0x1e683d(0xf6)]('✔\x20Found\x20'+_0x4688ca['length']+'\x20project'+(_0x4688ca[_0x1e683d(0x221)]!==0x1?'s':'')+_0x376b5a);if(_0x45c5cc[_0x1e683d(0x1d7)]===_0x1e683d(0x176)||_0x45c5cc[_0x1e683d(0x1d7)]==='jsonl'||_0x45c5cc['format']===_0x1e683d(0xd8))await handleSDKOutput(_0x4688ca,_0x45c5cc);else{if(_0x4688ca['length']===0x0)_0x4b686c?console[_0x1e683d(0x204)](_0x1e683d(0x17c)+_0x4b686c):console[_0x1e683d(0x204)](_0x1e683d(0x14c));else{const _0x2db132=_0x4688ca['map'](_0x5a5ed2=>{const _0x2bb51c=_0x1e683d,_0x585226=_0x5a5ed2[_0x2bb51c(0x24e)]?.[_0x2bb51c(0x11a)](_0x1a8afc=>_0x1a8afc[_0x2bb51c(0x1b2)]===_0x2bb51c(0x1c3)),_0x19e60f=_0x585226?a51_0x5bf18c['dim'](_0x2bb51c(0x1bc)):'';return _0x2bb51c(0x102)+_0x5a5ed2[_0x2bb51c(0x174)]+_0x19e60f;});await writeOutput(_0x2db132[_0x1e683d(0x192)]('\x0a'),_0x45c5cc['output'],_0x1e683d(0x19f));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a51_0x22a388(0x1a6);[a51_0x22a388(0x1b4)]='List\x20workflows';async[a51_0x22a388(0xd2)](_0x10a832){const _0x3378f6=a51_0x22a388,{options:_0x2910f9,args:_0x330238,tdx:_0x2fc716}=_0x10a832,_0x53a58c=this['resolveProject'](_0x330238,_0x2910f9);_0x2910f9[_0x3378f6(0xde)]&&_0x53a58c&&console[_0x3378f6(0xf6)]('Project\x20filter:\x20'+_0x53a58c);const _0x5f2776=await withSpinner('Listing\x20workflows...',()=>_0x2fc716[_0x3378f6(0x121)][_0x3378f6(0xa7)](_0x53a58c,{'limit':_0x2910f9[_0x3378f6(0xa9)]}),{'verbose':_0x2910f9[_0x3378f6(0xde)]});let _0x4b72d3=_0x5f2776[_0x3378f6(0x195)];_0x4b72d3[_0x3378f6(0x248)]((_0x3aea9c,_0x3b5aee)=>{const _0x463fa4=_0x3378f6,_0x168108=_0x3aea9c[_0x463fa4(0x174)][_0x463fa4(0xa1)](_0x3b5aee[_0x463fa4(0x174)]);if(_0x168108!==0x0)return _0x168108;return(_0x3aea9c['project']?.[_0x463fa4(0x174)]||'')[_0x463fa4(0xa1)](_0x3b5aee[_0x463fa4(0x1fe)]?.[_0x463fa4(0x174)]||'');});const _0x2f7199=_0x2910f9['limit']||0x64,_0x3c3822=_0x4b72d3[_0x3378f6(0x221)]>=_0x2f7199?a51_0x5bf18c[_0x3378f6(0x1b0)](_0x3378f6(0x22a)):'';console[_0x3378f6(0xf6)](_0x3378f6(0x17a)+_0x4b72d3['length']+'\x20workflow'+(_0x4b72d3['length']!==0x1?'s':'')+_0x3c3822);if(_0x2910f9[_0x3378f6(0x1d7)]==='json'||_0x2910f9['format']==='jsonl'||_0x2910f9[_0x3378f6(0x1d7)]===_0x3378f6(0xd8))await handleSDKOutput(_0x4b72d3,_0x2910f9);else{if(_0x4b72d3[_0x3378f6(0x221)]===0x0)_0x53a58c?console['log'](_0x3378f6(0x122)+_0x53a58c):console[_0x3378f6(0x204)]('No\x20workflows\x20found');else{const _0x13ccf4=_0x2910f9[_0x3378f6(0x1e3)],_0x2109b4=_0x4b72d3[_0x3378f6(0x1de)](_0x3c3668=>{const _0x57915e=_0x3378f6,_0x196327=a51_0x5bf18c['dim']('#'+_0x3c3668['id']),_0x26e025=hyperlink(_0x196327,getWorkflowUrl(_0x13ccf4,_0x3c3668['id'])),_0xc6b819=_0x3c3668[_0x57915e(0x1fe)]?.[_0x57915e(0x174)]?a51_0x5bf18c[_0x57915e(0x1b0)]('\x20('+_0x3c3668['project']['name']+')'):'';return _0x57915e(0x13c)+_0x26e025+'\x20'+_0x3c3668[_0x57915e(0x174)]+_0xc6b819;});await writeOutput(_0x2109b4[_0x3378f6(0x192)]('\x0a'),_0x2910f9[_0x3378f6(0x1fd)],_0x3378f6(0x19f));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0xa6);[a51_0x22a388(0x1b4)]='List\x20workflow\x20execution\x20sessions';async['execute'](_0x3c7144){const _0x49c80e=a51_0x22a388,{options:_0x3b3da4,args:_0x4f6e13,tdx:_0x1a70ed}=_0x3c7144,_0x2301c1=this[_0x49c80e(0x227)](_0x4f6e13,_0x3b3da4);if(!_0x2301c1)return 0x1;const {projectName:_0x3f24cb,workflowName:_0x45ee48}=_0x2301c1;if(_0x3b3da4['verbose']){if(_0x3f24cb&&_0x45ee48)console['error']('Filter:\x20'+_0x3f24cb+'.'+_0x45ee48);else _0x3f24cb&&console[_0x49c80e(0xf6)]('Filter:\x20project='+_0x3f24cb);const _0x3858f2=_0x3b3da4[_0x49c80e(0x196)];_0x3858f2&&console[_0x49c80e(0xf6)](_0x49c80e(0x22d)+_0x3858f2);}let _0x499bad=0x28;if(process[_0x49c80e(0x20b)]['isTTY']&&!_0x3b3da4[_0x49c80e(0x1fd)]&&!_0x3b3da4[_0x49c80e(0x1d7)]){const _0x29ee0f=process[_0x49c80e(0x20b)]['rows']||0x28;_0x499bad=Math[_0x49c80e(0x170)](0x14,Math[_0x49c80e(0xdd)](_0x29ee0f*0x2/0x3));}const _0x1235c1=_0x3b3da4[_0x49c80e(0xa9)]||_0x499bad,_0x290083=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x1a70ed[_0x49c80e(0x121)]['sessions']({'projectName':_0x3f24cb,'workflowName':_0x45ee48,'status':_0x3b3da4[_0x49c80e(0x196)],'fromTime':_0x3b3da4[_0x49c80e(0x111)],'toTime':_0x3b3da4['to'],'limit':_0x1235c1}),{'verbose':_0x3b3da4['verbose']}),_0x467f6a=_0x290083[_0x49c80e(0x195)];_0x467f6a[_0x49c80e(0x248)]((_0x4d7a18,_0x2615fc)=>{const _0x20fcd4=_0x49c80e,_0xa38de3=_0x4d7a18[_0x20fcd4(0x16a)]||'',_0xff59f9=_0x2615fc[_0x20fcd4(0x16a)]||'';return _0xff59f9[_0x20fcd4(0xa1)](_0xa38de3);});_0x467f6a[_0x49c80e(0x221)]>=_0x1235c1?console['error']('✔\x20Showing\x20'+_0x467f6a[_0x49c80e(0x221)]+_0x49c80e(0x1df)+a51_0x5bf18c[_0x49c80e(0x1b0)](_0x49c80e(0x1b1))):console['error'](_0x49c80e(0x17a)+_0x467f6a[_0x49c80e(0x221)]+_0x49c80e(0x165)+(_0x467f6a['length']!==0x1?'s':''));if(_0x3b3da4['format']===_0x49c80e(0x176)||_0x3b3da4[_0x49c80e(0x1d7)]===_0x49c80e(0x201)||_0x3b3da4['format']===_0x49c80e(0xd8))await handleSDKOutput(_0x467f6a,_0x3b3da4);else{if(!process['stdout']['isTTY']||_0x3b3da4[_0x49c80e(0x1fd)]){if(_0x467f6a[_0x49c80e(0x221)]===0x0){if(_0x3f24cb&&_0x45ee48)console[_0x49c80e(0x204)](_0x49c80e(0x177)+_0x3f24cb+'.'+_0x45ee48);else _0x3f24cb?console[_0x49c80e(0x204)](_0x49c80e(0x19d)+_0x3f24cb):console[_0x49c80e(0x204)](_0x49c80e(0x188));}else{const _0x3ea174=_0x3b3da4[_0x49c80e(0x1e3)],_0x5245b5=this[_0x49c80e(0xad)](_0x467f6a,_0x3ea174);_0x3b3da4[_0x49c80e(0x1fd)]?await writeOutput(_0x5245b5,_0x3b3da4[_0x49c80e(0x1fd)],_0x49c80e(0x19f)):console[_0x49c80e(0x204)](_0x5245b5);}!_0x3f24cb&&(console[_0x49c80e(0xf6)](''),console[_0x49c80e(0xf6)](a51_0x5bf18c['dim'](_0x49c80e(0x9d))),console[_0x49c80e(0xf6)](a51_0x5bf18c[_0x49c80e(0x1b0)](_0x49c80e(0x104))+'or'+a51_0x5bf18c[_0x49c80e(0x1b0)](_0x49c80e(0x229))));}else{if(_0x467f6a[_0x49c80e(0x221)]===0x0){if(_0x3f24cb&&_0x45ee48)console[_0x49c80e(0x204)](_0x49c80e(0x177)+_0x3f24cb+'.'+_0x45ee48);else _0x3f24cb?console[_0x49c80e(0x204)](_0x49c80e(0x19d)+_0x3f24cb):console[_0x49c80e(0x204)](_0x49c80e(0x188));}else await this['navigateSessionsInteractive'](_0x467f6a,_0x3c7144,_0x3f24cb);}}return 0x0;}[a51_0x22a388(0xad)](_0x229df5,_0x52968b){const _0x4ec16b=a51_0x22a388,_0x2eb8a1=[],_0x2be67f=new Map();let _0x9749ba=Infinity,_0x138cc8=-Infinity;for(const _0x1dad8f of _0x229df5){if(_0x1dad8f[_0x4ec16b(0x225)]?.[_0x4ec16b(0x151)]){const _0x3ca8cc=new Date(_0x1dad8f[_0x4ec16b(0x225)][_0x4ec16b(0x151)])[_0x4ec16b(0x1dc)](),_0x4202b9=_0x1dad8f[_0x4ec16b(0x225)]['finishedAt']?new Date(_0x1dad8f[_0x4ec16b(0x225)]['finishedAt'])[_0x4ec16b(0x1dc)]():Date[_0x4ec16b(0x23d)](),_0x76fdb3=_0x1dad8f[_0x4ec16b(0x1fe)]?.[_0x4ec16b(0x174)]||_0x4ec16b(0x22e);!_0x2be67f['has'](_0x76fdb3)&&_0x2be67f[_0x4ec16b(0x9a)](_0x76fdb3,[]),_0x2be67f[_0x4ec16b(0x17f)](_0x76fdb3)[_0x4ec16b(0x11e)]({'session':_0x1dad8f,'startTime':_0x3ca8cc,'endTime':_0x4202b9,'duration':_0x4202b9-_0x3ca8cc}),_0x9749ba=Math[_0x4ec16b(0x13a)](_0x9749ba,_0x3ca8cc),_0x138cc8=Math[_0x4ec16b(0x170)](_0x138cc8,_0x4202b9);}}if(_0x2be67f[_0x4ec16b(0x200)]===0x0)return _0x4ec16b(0x158);const _0x15d624=process[_0x4ec16b(0x20b)][_0x4ec16b(0x1e8)]||0x78,_0x537347=0x1e,_0x5dd3ee=0x32,_0xf58b3e=0x4,_0x20e46e=Math['min'](_0x5dd3ee,Math['max'](_0x537347,Math['floor'](_0x15d624*0.3))),_0x47e3ac=_0x15d624-_0x20e46e-TIMELINE_CONFIG[_0x4ec16b(0x220)]-0x3-_0xf58b3e,_0x3fd18f=_0x138cc8-_0x9749ba,_0x259096=_0x3fd18f/_0x20e46e,_0x10feb2=renderTimeAxis({'startTime':_0x9749ba,'endTime':_0x138cc8,'durationMs':_0x3fd18f,'msPerChar':_0x259096},_0x20e46e),_0x8b9f55=[];for(const _0x41d84a of _0x2be67f[_0x4ec16b(0x1d1)]()){_0x8b9f55['push'](..._0x41d84a);}_0x8b9f55[_0x4ec16b(0x248)]((_0x474e84,_0x538a67)=>_0x538a67[_0x4ec16b(0x240)]-_0x474e84[_0x4ec16b(0x240)]);const _0x5de4b5=new Date(_0x9749ba),_0x937d29=formatDate(_0x5de4b5),_0x597698=_0xf58b3e+TIMELINE_CONFIG[_0x4ec16b(0x1ae)]+TIMELINE_CONFIG['ICON_SPACING']+_0x47e3ac,_0xe29f27='\x20'['repeat'](_0x597698-_0x937d29['length']),_0x20065c=_0xe29f27+a51_0x5bf18c['dim'](_0x937d29)+'\x20'+_0x10feb2;_0x2eb8a1[_0x4ec16b(0x11e)](_0x20065c);const _0x3de083=0x16;let _0x433b5f=0x0;for(const _0x52044f of _0x8b9f55){const _0x139925=_0x52044f['session'][_0x4ec16b(0x1fe)]?.[_0x4ec16b(0x174)]||'?',_0x3d3b0e=Math[_0x4ec16b(0x13a)](stringWidth(_0x139925),_0x3de083);_0x433b5f=Math[_0x4ec16b(0x170)](_0x433b5f,_0x3d3b0e);}for(const _0x2473d0 of _0x8b9f55){const {session:_0x448cb7,startTime:_0x7f78ea,endTime:_0x2d5f10,duration:_0x89bf09}=_0x2473d0,_0x3d1f64=_0x448cb7[_0x4ec16b(0x1fe)]?.['id'],_0x44f96f=_0x448cb7['id'],_0x14f1bc=_0x448cb7[_0x4ec16b(0x1fe)]?.['name']||'?',_0x46b834=_0x448cb7[_0x4ec16b(0x121)]?.['name']||'?';let _0x1768b2,_0x114a89;if(_0x448cb7[_0x4ec16b(0x225)]){const _0x56742b=_0x448cb7[_0x4ec16b(0x225)];!_0x56742b[_0x4ec16b(0xe1)]?(_0x1768b2=_0x56742b[_0x4ec16b(0x1d4)]?'🛑':'🔄',_0x114a89=_0x56742b['cancelRequested']?a51_0x5bf18c[_0x4ec16b(0xfc)]:a51_0x5bf18c[_0x4ec16b(0x1ed)]):(_0x1768b2=_0x56742b['success']?'✅':'❌',_0x114a89=_0x56742b[_0x4ec16b(0x179)]?a51_0x5bf18c[_0x4ec16b(0xf7)]:a51_0x5bf18c[_0x4ec16b(0xf3)]);}else _0x1768b2='⏳',_0x114a89=a51_0x5bf18c[_0x4ec16b(0x1b0)];const _0x35c99a='#'+_0x44f96f,_0xa9cba1=_0x3d1f64?hyperlink(_0x35c99a,getWorkflowSessionUrl(_0x52968b,_0x3d1f64,_0x44f96f)):_0x35c99a;let _0x1fd997=_0x14f1bc;stringWidth(_0x14f1bc)>_0x3de083&&(_0x1fd997=_0x14f1bc[_0x4ec16b(0xe9)](0x0,_0x3de083-0x1)+'…');const _0x4dc9a8=a51_0x5bf18c[_0x4ec16b(0x1b0)](_0x1fd997),_0x4e1dd3=stringWidth(_0x1fd997),_0x191655='\x20'['repeat'](_0x433b5f-stringWidth(_0x1fd997)+0x2),_0x59926d='('+formatElapsed(_0x89bf09)+')',_0x262cfe=stringWidth(_0x59926d),_0xa3231f=stringWidth(_0x35c99a),_0x7109a5=_0xa3231f+0x1+_0x4e1dd3+_0x191655[_0x4ec16b(0x221)],_0x2c7970=_0x47e3ac-_0x7109a5-_0x262cfe-0x1-0x8;let _0x21c14a=_0x46b834;stringWidth(_0x21c14a)>_0x2c7970&&(_0x21c14a=_0x21c14a[_0x4ec16b(0xe9)](0x0,_0x2c7970-0x1)+'…');const _0x2381d9=_0xa9cba1+'\x20'+_0x4dc9a8+_0x191655+_0x21c14a,_0x3d2da6=stringWidth(_0x2381d9),_0x48ba72=_0x47e3ac-_0x3d2da6-_0x262cfe,_0x228462=_0x2381d9+'\x20'[_0x4ec16b(0x245)](Math['max'](0x1,_0x48ba72))+a51_0x5bf18c['dim'](_0x59926d),_0x24c29d=Math['floor']((_0x7f78ea-_0x9749ba)/_0x259096),_0x18afb7=Math[_0x4ec16b(0xdd)]((_0x2d5f10-_0x9749ba)/_0x259096),_0x24dd63=Math['max'](_0x24c29d+0x1,_0x18afb7),_0x3fe6ec=new Array(_0x20e46e)[_0x4ec16b(0x113)]('\x20');for(let _0x2e5e06=_0x24c29d;_0x2e5e06<Math['min'](_0x24dd63,_0x20e46e);_0x2e5e06++){_0x3fe6ec[_0x2e5e06]='─';}const _0x543fa8=_0x3fe6ec[_0x4ec16b(0x1de)](_0x4de6e3=>_0x4de6e3==='\x20'?'\x20':_0x114a89(_0x4de6e3))[_0x4ec16b(0x192)]('');_0x2eb8a1[_0x4ec16b(0x11e)](_0x1768b2+'\x20'+_0x228462+'│'+_0x543fa8+'│');}return _0x2eb8a1[_0x4ec16b(0x192)]('\x0a');}async[a51_0x22a388(0x241)](_0x3c74e5,_0x3d69df,_0x185e5f){const _0x4f93e2=a51_0x22a388,{options:_0x3456a1,tdx:_0x38e950}=_0x3d69df,_0x3300ad=_0x3456a1['site'],{timelineRows:_0x366dd7,timeAxisHeader:_0x3a62d7}=this['generateSessionTimelineRows'](_0x3c74e5,_0x3300ad),_0x111350=_0x366dd7[_0x4f93e2(0x183)](_0x41417b=>_0x41417b['attemptId']);if(_0x111350[_0x4f93e2(0x221)]===0x0){const _0x5d0d5e=this['renderSessionsTimeline'](_0x3c74e5,_0x3300ad);console[_0x4f93e2(0x204)](_0x5d0d5e);!_0x185e5f&&(console[_0x4f93e2(0xf6)](''),console[_0x4f93e2(0xf6)](a51_0x5bf18c[_0x4f93e2(0x1b0)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a51_0x5bf18c[_0x4f93e2(0x1b0)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a51_0x5bf18c[_0x4f93e2(0x1b0)](_0x4f93e2(0x229))));return;}_0x3a62d7&&console[_0x4f93e2(0x204)](_0x3a62d7);const _0x2439c9=_0x366dd7['filter'](_0xb911bf=>_0xb911bf['attemptId'])['map'](_0x3c8d27=>({'title':_0x3c8d27[_0x4f93e2(0x231)],'value':_0x3c8d27[_0x4f93e2(0x173)]})),_0xa5005b=process[_0x4f93e2(0x20b)]['rows']||0x3c,_0x185de9=Math[_0x4f93e2(0x170)](0x28,Math[_0x4f93e2(0xdd)](_0xa5005b*0x2/0x3)),_0x503c90=await a51_0x4f4bd3({'type':_0x4f93e2(0x1b5),'name':_0x4f93e2(0x173),'message':_0x4f93e2(0xec),'choices':_0x2439c9,'initial':-0x1,'limit':_0x185de9,'clearFirst':!![],'fallback':{'title':_0x4f93e2(0xf1),'value':null},'suggest':(_0x1639bb,_0x1cb561)=>{const _0x510388=_0x4f93e2;if(!_0x1639bb)return Promise['resolve'](_0x1cb561);const _0x5cd9f3=_0x1cb561[_0x510388(0x183)](_0x43e407=>{const _0x235d15=_0x510388,_0x3d4a7d=_0x43e407;return _0x3d4a7d['title'][_0x235d15(0x14b)]()['includes'](_0x1639bb[_0x235d15(0x14b)]());});return Promise[_0x510388(0x154)](_0x5cd9f3);}}),_0x1843b7=()=>{const _0x1e9724=_0x4f93e2;process[_0x1e9724(0x20b)][_0x1e9724(0xbc)](_0x1e9724(0x1f1)),process[_0x1e9724(0x20b)][_0x1e9724(0xbc)](_0x1e9724(0x1f1)),process[_0x1e9724(0x20b)][_0x1e9724(0xbc)]('\x1b[1A\x1b[2K');},_0x5aa09d=_0x503c90&&_0x503c90[_0x4f93e2(0x173)]&&_0x503c90[_0x4f93e2(0x173)]!==null&&_0x503c90[_0x4f93e2(0x173)][_0x4f93e2(0xf4)]()!=='';if(!_0x5aa09d){_0x1843b7(),console['log'](a51_0x5bf18c[_0x4f93e2(0x1b0)](_0x4f93e2(0x1cb)));return;}_0x1843b7();const _0x257f1c=_0x3c74e5[_0x4f93e2(0x20e)](_0x1feca3=>_0x1feca3[_0x4f93e2(0x225)]?.['id']===_0x503c90['attemptId']);if(_0x257f1c){const _0x22959d=_0x257f1c[_0x4f93e2(0x1fe)]?.[_0x4f93e2(0x174)]||'?',_0x13666c=_0x257f1c[_0x4f93e2(0x121)]?.['name']||'?';console['log'](_0x4f93e2(0xba)+a51_0x5bf18c[_0x4f93e2(0x1b0)](_0x22959d)+_0x4f93e2(0x15c)+a51_0x5bf18c[_0x4f93e2(0x1b0)](_0x13666c));}const _0x34db10=new WorkflowTimelineCommand();await _0x34db10[_0x4f93e2(0xd2)]({'args':[],'options':{..._0x3456a1,'attemptId':_0x503c90[_0x4f93e2(0x173)]},'tdx':_0x38e950});}['generateSessionTimelineRows'](_0xeb1370,_0x2f648d){const _0x19d985=a51_0x22a388,_0x52b80b=new Map();for(const _0x5d25a2 of _0xeb1370){_0x5d25a2['id']&&_0x5d25a2[_0x19d985(0x225)]?.['id']&&_0x52b80b['set'](_0x5d25a2['id'],_0x5d25a2[_0x19d985(0x225)]['id']);}const _0x33e3c0=[];let _0x3e713d='';const _0x48b4e2=this['renderSessionsTimeline'](_0xeb1370,_0x2f648d),_0x13cea5=_0x48b4e2[_0x19d985(0x22c)]('\x0a');for(const _0x3cf390 of _0x13cea5){if(_0x3cf390[_0x19d985(0xb5)](_0x19d985(0x23c))||_0x3cf390[_0x19d985(0x239)](/^\s+\d{4}-\d{2}-\d{2}/))_0x3e713d=_0x3cf390;else{if(_0x3cf390[_0x19d985(0x239)](/^[✅❌🔄🛑⏳]/)){const _0x1956da=_0x3cf390[_0x19d985(0x239)](/#(\d+)/),_0x2e5eb5=_0x1956da?_0x1956da[0x1]:null,_0x29decc=_0x2e5eb5?_0x52b80b['get'](_0x2e5eb5)||null:null,_0x42ccf1=_0xeb1370[_0x19d985(0x20e)](_0x126381=>_0x126381['id']===_0x2e5eb5),_0x4137d4=_0x42ccf1?.[_0x19d985(0x1fe)]?.[_0x19d985(0x174)]||'';_0x33e3c0[_0x19d985(0x11e)]({'displayLine':_0x3cf390,'attemptId':_0x29decc,'projectName':_0x4137d4});}}}return{'timelineRows':_0x33e3c0,'timeAxisHeader':_0x3e713d};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x1c7);[a51_0x22a388(0x1b4)]=a51_0x22a388(0x228);async[a51_0x22a388(0xd2)](_0x53799c){const _0x29a342=a51_0x22a388,{options:_0x3481fb,args:_0x3e5d36,tdx:_0x40ee2f}=_0x53799c,_0x82ea0c=this[_0x29a342(0x227)](_0x3e5d36,_0x3481fb);if(!_0x82ea0c)return 0x1;const {projectName:_0x537b6e,workflowName:_0x6d281b}=_0x82ea0c,_0x27f90a=_0x3481fb[_0x29a342(0xcf)];if(_0x3481fb[_0x29a342(0xde)]){if(_0x537b6e&&_0x6d281b)console[_0x29a342(0xf6)](_0x29a342(0x140)+_0x537b6e+'.'+_0x6d281b);else _0x537b6e&&console[_0x29a342(0xf6)](_0x29a342(0x123)+_0x537b6e);_0x27f90a&&console[_0x29a342(0xf6)](_0x29a342(0xd3));}const _0x15ae3d=await withSpinner(_0x29a342(0x13e),()=>_0x40ee2f[_0x29a342(0x121)][_0x29a342(0x103)]({'projectName':_0x537b6e,'workflowName':_0x6d281b,'includeRetried':_0x27f90a,'limit':_0x3481fb[_0x29a342(0xa9)]}),{'verbose':_0x3481fb['verbose']}),_0x241427=_0x15ae3d[_0x29a342(0x195)],_0xf6f20e=_0x3481fb[_0x29a342(0xa9)]||0x64,_0x47ab46=_0x241427[_0x29a342(0x221)]>=_0xf6f20e?a51_0x5bf18c[_0x29a342(0x1b0)](_0x29a342(0x22a)):'';console[_0x29a342(0xf6)]('✔\x20Found\x20'+_0x241427['length']+'\x20attempt'+(_0x241427[_0x29a342(0x221)]!==0x1?'s':'')+_0x47ab46);if(_0x3481fb['format']===_0x29a342(0x176)||_0x3481fb[_0x29a342(0x1d7)]===_0x29a342(0x201)||_0x3481fb[_0x29a342(0x1d7)]===_0x29a342(0xd8))await handleSDKOutput(_0x241427,_0x3481fb);else{if(_0x241427[_0x29a342(0x221)]===0x0){if(_0x537b6e&&_0x6d281b)console[_0x29a342(0x204)](_0x29a342(0x138)+_0x537b6e+'.'+_0x6d281b);else _0x537b6e?console['log']('No\x20attempts\x20found\x20in\x20project:\x20'+_0x537b6e):console[_0x29a342(0x204)](_0x29a342(0x142));}else{const _0x3be5ae=_0x3481fb[_0x29a342(0x1e3)],_0x3b3173=_0x241427[_0x29a342(0x1de)](_0xc3e028=>{const _0x5b865b=_0x29a342,_0x4379cc=a51_0x5bf18c[_0x5b865b(0x1b0)]('#'+_0xc3e028['id']),_0x25a21a=_0xc3e028[_0x5b865b(0x1fe)]?.['id'],_0x5a9cff=_0xc3e028[_0x5b865b(0x131)]||_0xc3e028[_0x5b865b(0x214)],_0x22a284=_0x25a21a&&_0x5a9cff?hyperlink(_0x4379cc,getWorkflowAttemptUrl(_0x3be5ae,_0x25a21a,_0x5a9cff,_0xc3e028['id'])):_0x4379cc,{icon:_0x16655a,text:_0x3288f4}=getAttemptStatusDisplay(_0xc3e028),_0x4f26e7=(_0xc3e028[_0x5b865b(0x1fe)]?.[_0x5b865b(0x174)]||'?')+'.'+(_0xc3e028[_0x5b865b(0x121)]?.[_0x5b865b(0x174)]||'?'),_0x3e02e0=_0xc3e028['sessionTime']?a51_0x5bf18c[_0x5b865b(0x1b0)](_0xc3e028[_0x5b865b(0x16a)]):'';return(_0x22a284+'\x20'+_0x16655a+(_0x3288f4?'\x20'+_0x3288f4:'')+'\x20'+_0x4f26e7+'\x20'+_0x3e02e0)[_0x5b865b(0x101)]();});await writeOutput(_0x3b3173[_0x29a342(0x192)]('\x0a'),_0x3481fb['output'],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a51_0x22a388(0x1b4)]=a51_0x22a388(0x22f);async[a51_0x22a388(0xd2)](_0x4824a6){const _0x239b40=a51_0x22a388,{options:_0x44c040,args:_0x569136,tdx:_0x266b9d}=_0x4824a6,_0x3a5da1=_0x569136[0x0];if(!_0x3a5da1)return console[_0x239b40(0xf6)](_0x239b40(0x20c)),0x1;_0x44c040['verbose']&&console[_0x239b40(0xf6)]('Attempt\x20ID:\x20'+_0x3a5da1);const _0x2fe496=await withSpinner(_0x239b40(0x19c),()=>_0x266b9d[_0x239b40(0x121)][_0x239b40(0xfa)](_0x3a5da1),{'verbose':_0x44c040['verbose']}),_0x5f206c=_0x2fe496[_0x239b40(0x195)];let _0x32ee6e;!_0x5f206c['done']?_0x32ee6e=_0x5f206c[_0x239b40(0x1d4)]?_0x239b40(0x18c):_0x239b40(0x15b):_0x32ee6e=_0x5f206c[_0x239b40(0x179)]?_0x239b40(0x179):'error';let _0x156f81;if(_0x5f206c['createdAt']&&_0x5f206c[_0x239b40(0x1d3)]){const _0x3ee70e=new Date(_0x5f206c[_0x239b40(0x151)])[_0x239b40(0x1dc)](),_0x3c74a3=new Date(_0x5f206c['finishedAt'])[_0x239b40(0x1dc)]();_0x156f81=Math[_0x239b40(0x12d)]((_0x3c74a3-_0x3ee70e)/0x3e8);}const _0xf1a3df={'attempt_id':_0x5f206c['id'],'status':_0x32ee6e,..._0x5f206c[_0x239b40(0x1e4)]!==undefined&&{'index':_0x5f206c[_0x239b40(0x1e4)]},..._0x5f206c['project']&&{'project':_0x5f206c[_0x239b40(0x1fe)][_0x239b40(0x174)]},..._0x5f206c['workflow']&&{'workflow':_0x5f206c[_0x239b40(0x121)][_0x239b40(0x174)]},..._0x5f206c[_0x239b40(0x214)]&&{'session_id':_0x5f206c[_0x239b40(0x214)]},..._0x5f206c['sessionTime']&&{'session_time':_0x5f206c[_0x239b40(0x16a)]},..._0x5f206c[_0x239b40(0x21c)]&&{'retry_attempt':_0x5f206c['retryAttemptName']},..._0x156f81!==undefined&&{'duration_sec':_0x156f81},..._0x5f206c['createdAt']&&{'created_at':_0x5f206c[_0x239b40(0x151)]},..._0x5f206c[_0x239b40(0x1d3)]&&{'finished_at':_0x5f206c[_0x239b40(0x1d3)]},...Object[_0x239b40(0x244)](_0x5f206c[_0x239b40(0xb8)])[_0x239b40(0x221)]>0x0&&{'params':_0x5f206c[_0x239b40(0xb8)]}};return await handleSingleObjectOutput(_0xf1a3df,_0x44c040),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a51_0x22a388(0x174)]='workflow:tasks';['description']=a51_0x22a388(0xbd);async['execute'](_0x414455){const _0x364dcc=a51_0x22a388,{options:_0x3079a5,args:_0x5e3b07,tdx:_0x27e550}=_0x414455,_0x8bae87=_0x5e3b07[0x0];if(!_0x8bae87)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x52d603=_0x3079a5['includeSubtasks'];_0x3079a5[_0x364dcc(0xde)]&&(console[_0x364dcc(0xf6)](_0x364dcc(0x1ec)+_0x8bae87),_0x52d603&&console[_0x364dcc(0xf6)]('Including\x20subtasks:\x20yes'));const _0x28073b=await withSpinner(_0x364dcc(0x106),()=>_0x27e550[_0x364dcc(0x121)]['tasks'](_0x8bae87,_0x52d603||![]),{'verbose':_0x3079a5[_0x364dcc(0xde)]}),_0x17bbd7=_0x28073b[_0x364dcc(0x195)];return console['error'](_0x364dcc(0x17a)+_0x17bbd7[_0x364dcc(0x221)]+_0x364dcc(0xb7)+(_0x17bbd7['length']!==0x1?'s':'')),await handleSDKOutput(_0x17bbd7,_0x3079a5),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x1f2);[a51_0x22a388(0x1b4)]=a51_0x22a388(0xce);async[a51_0x22a388(0xd2)](_0x989bf6){const _0x226a9d=a51_0x22a388,{options:_0x443793,args:_0x4990c4,tdx:_0x4fd3a7}=_0x989bf6,_0x29d231=_0x4990c4[0x0];let _0xd40c28=_0x4990c4[0x1];if(!_0x29d231)return console['error'](_0x226a9d(0x20c)),0x1;_0x443793['verbose']&&(console[_0x226a9d(0xf6)]('Attempt\x20ID:\x20'+_0x29d231),_0xd40c28&&console[_0x226a9d(0xf6)](_0x226a9d(0x1c6)+_0xd40c28));const _0x262e93=await withSpinner(_0x226a9d(0x15a),()=>_0x4fd3a7[_0x226a9d(0x121)][_0x226a9d(0xaf)](_0x29d231,_0xd40c28),{'verbose':_0x443793[_0x226a9d(0xde)]}),_0x3cee2b=_0x262e93[_0x226a9d(0x195)];if(_0x3cee2b[_0x226a9d(0x221)]===0x0)return console['error'](_0x226a9d(0x12c)),0x0;if(!_0xd40c28&&(_0x443793[_0x226a9d(0x176)]||_0x443793[_0x226a9d(0x1d7)]))return await handleSDKOutput(_0x3cee2b,_0x443793),0x0;if(!_0xd40c28){const _0x16b476=_0x3cee2b[_0x226a9d(0x1de)](_0x550546=>({'title':_0x550546[_0x226a9d(0x146)]+'\x20('+formatBytes(_0x550546[_0x226a9d(0x1ce)])+')','value':_0x550546[_0x226a9d(0x146)]})),_0xbcb466=await a51_0x4f4bd3({'type':_0x226a9d(0xff),'name':_0x226a9d(0x1f4),'message':_0x226a9d(0x152),'choices':_0x16b476});if(!_0xbcb466['task'])return console[_0x226a9d(0xf6)](_0x226a9d(0x1cb)),0x0;_0xd40c28=_0xbcb466[_0x226a9d(0x1f4)];}const _0x1b4b70=await withSpinner('Downloading\x20logs...',()=>_0x4fd3a7[_0x226a9d(0x121)][_0x226a9d(0x1bd)](_0x29d231,_0xd40c28),{'verbose':_0x443793['verbose']}),_0x29d7b7=_0x1b4b70[_0x226a9d(0x195)];return _0x29d7b7?console[_0x226a9d(0x204)](_0x29d7b7):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x1ad);[a51_0x22a388(0x1b4)]=a51_0x22a388(0x24c);async[a51_0x22a388(0xd2)](_0x53ee6a){const _0x2c64b5=a51_0x22a388,{options:_0x5af752,args:_0x40db3a,tdx:_0x1297b0}=_0x53ee6a,_0x5b931b=_0x40db3a[0x0];if(!_0x5b931b)return console[_0x2c64b5(0xf6)](_0x2c64b5(0x20c)),0x1;const _0x28969d=_0x5af752[_0x2c64b5(0x23e)];_0x5af752[_0x2c64b5(0xde)]&&(console[_0x2c64b5(0xf6)](_0x2c64b5(0x1ec)+_0x5b931b),_0x28969d&&console[_0x2c64b5(0xf6)]('Reason:\x20'+_0x28969d));if(!_0x5af752[_0x2c64b5(0x117)]){if(!isInteractive())return console[_0x2c64b5(0xf6)](a51_0x5bf18c[_0x2c64b5(0xf3)]('\x0aError:'),_0x2c64b5(0x23f)),console[_0x2c64b5(0xf6)](a51_0x5bf18c[_0x2c64b5(0x1b0)](_0x2c64b5(0x119))),0x1;const _0x4ba5db=await confirmKey(_0x2c64b5(0x175)+_0x5b931b+'?');if(!_0x4ba5db)return console[_0x2c64b5(0xf6)](a51_0x5bf18c[_0x2c64b5(0xfc)]('Cancelled')),0x1;}const _0x3e9b77=await withSpinner(_0x2c64b5(0xc8),()=>_0x1297b0[_0x2c64b5(0x121)][_0x2c64b5(0x208)](_0x5b931b,_0x28969d),{'verbose':_0x5af752[_0x2c64b5(0xde)]}),_0x47a1b6=_0x3e9b77['data'];return console['error']('✔\x20'+_0x47a1b6),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x114);[a51_0x22a388(0x1b4)]=a51_0x22a388(0xb9);async['execute'](_0x5d675d){const _0x8de37a=a51_0x22a388,{options:_0x3e009a,args:_0x148bd4,tdx:_0xf3834c}=_0x5d675d,_0xb7674f=_0x148bd4[0x0];if(!_0xb7674f)return console['error'](_0x8de37a(0x237)),console[_0x8de37a(0xf6)](_0x8de37a(0xe4)),0x1;let _0x4c1d01=![],_0x2d171e=_0xb7674f;if(_0xb7674f[_0x8de37a(0xb5)](_0x8de37a(0x1c4)))_0x4c1d01=!![],_0x2d171e=_0xb7674f[_0x8de37a(0x24a)](0x8);else{if(_0xb7674f[_0x8de37a(0xb5)]('attempt:'))_0x4c1d01=![],_0x2d171e=_0xb7674f[_0x8de37a(0x24a)](0x8);else return console[_0x8de37a(0xf6)](_0x8de37a(0x222)),console[_0x8de37a(0xf6)](_0x8de37a(0xe4)),0x1;}const _0x3d8a8c=_0x3e009a[_0x8de37a(0x1e6)],_0x370553=_0x3e009a[_0x8de37a(0xac)],_0x40d8d8=_0x3e009a[_0x8de37a(0xb8)],_0x1cd0c2=_0x3e009a[_0x8de37a(0x211)];_0x3e009a[_0x8de37a(0xde)]&&(console['error'](_0x8de37a(0x197)+(_0x4c1d01?_0x8de37a(0xe7):_0x8de37a(0xfa))+'\x20'+_0x2d171e),_0x3d8a8c&&console['error'](_0x8de37a(0x238)+_0x3d8a8c),_0x370553&&console['error'](_0x8de37a(0x1ba)+_0x370553),_0x40d8d8&&console[_0x8de37a(0xf6)]('Params:\x20'+_0x40d8d8),_0x1cd0c2&&console[_0x8de37a(0xf6)]('Force:\x20yes'));let _0x3ba4f0;if(_0x40d8d8)try{if(_0x40d8d8[_0x8de37a(0xb5)]('@')){const _0x2d9f7f=await import('fs/promises'),_0x4c80e1=_0x40d8d8[_0x8de37a(0x24a)](0x1),_0x518e80=await _0x2d9f7f['readFile'](_0x4c80e1,_0x8de37a(0x16d));_0x3ba4f0=JSON[_0x8de37a(0xc6)](_0x518e80);}else _0x3ba4f0=JSON[_0x8de37a(0xc6)](_0x40d8d8);}catch{return console['error'](_0x8de37a(0xe3)),0x1;}if(!_0x3e009a[_0x8de37a(0x117)]){if(!isInteractive())return console['error'](a51_0x5bf18c[_0x8de37a(0xf3)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x8de37a(0xf6)](a51_0x5bf18c[_0x8de37a(0x1b0)](_0x8de37a(0x119))),0x1;const _0x4569f6=await confirmKey(_0x8de37a(0x242)+(_0x4c1d01?'session':_0x8de37a(0xfa))+'\x20'+_0x2d171e+'?');if(!_0x4569f6)return console[_0x8de37a(0xf6)](a51_0x5bf18c[_0x8de37a(0xfc)](_0x8de37a(0x1cb))),0x1;}let _0x13b8d5;_0x4c1d01?_0x13b8d5=await withSpinner(_0x8de37a(0x215),()=>_0xf3834c[_0x8de37a(0x121)][_0x8de37a(0x1ea)](_0x2d171e,{'fromTask':_0x3d8a8c,'retryParams':_0x3ba4f0}),{'verbose':_0x3e009a[_0x8de37a(0xde)]}):_0x13b8d5=await withSpinner(_0x8de37a(0x107),()=>_0xf3834c[_0x8de37a(0x121)][_0x8de37a(0x205)](_0x2d171e,{'resumeFrom':_0x370553,'retryParams':_0x3ba4f0,'force':_0x1cd0c2}),{'verbose':_0x3e009a['verbose']});const _0x42333e=_0x13b8d5[_0x8de37a(0x195)];return console[_0x8de37a(0xf6)]('✔\x20Retry\x20started'),console[_0x8de37a(0xf6)](_0x8de37a(0xc2)+_0x42333e[_0x8de37a(0x173)]),console[_0x8de37a(0xf6)](_0x8de37a(0x9c)+_0x42333e['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]='workflow:run';[a51_0x22a388(0x1b4)]=a51_0x22a388(0x157);async['execute'](_0x1a04d8){const _0x2bbec8=a51_0x22a388,{options:_0x3e63fa,args:_0x4b3b96,tdx:_0x59ee69}=_0x1a04d8;let _0x5e523d=_0x4b3b96[0x0];if(!_0x5e523d){const _0x48ca48=this[_0x2bbec8(0x202)]([],_0x3e63fa),_0x4224ad=await withSpinner('Loading\x20workflows...',()=>_0x59ee69[_0x2bbec8(0x121)][_0x2bbec8(0xa7)](_0x48ca48,{'limit':_0x3e63fa['limit']}),{'verbose':_0x3e63fa[_0x2bbec8(0xde)]}),_0x48dd40=_0x4224ad[_0x2bbec8(0x195)];if(_0x48dd40[_0x2bbec8(0x221)]===0x0)return console[_0x2bbec8(0xf6)](_0x2bbec8(0xe6)),!_0x48ca48&&console[_0x2bbec8(0xf6)](a51_0x5bf18c[_0x2bbec8(0x1b0)](_0x2bbec8(0x10a))),0x1;const _0x148529=_0x48dd40[_0x2bbec8(0x1de)](_0x27b663=>({'title':_0x27b663[_0x2bbec8(0x1fe)]?.[_0x2bbec8(0x174)]+'.'+_0x27b663['name'],'value':_0x27b663[_0x2bbec8(0x1fe)]?.[_0x2bbec8(0x174)]+'.'+_0x27b663['name'],'description':_0x27b663[_0x2bbec8(0xf2)]?_0x2bbec8(0xcc)+_0x27b663['revision']:undefined})),_0xa5b8dc=await a51_0x4f4bd3({'type':'select','name':_0x2bbec8(0x121),'message':_0x2bbec8(0x194),'choices':_0x148529});if(!_0xa5b8dc['workflow'])return 0x1;_0x5e523d=_0xa5b8dc[_0x2bbec8(0x121)];}if(!_0x5e523d[_0x2bbec8(0xe0)]('.')){const _0x1d16fe=this[_0x2bbec8(0x202)]([],_0x3e63fa);if(_0x1d16fe)_0x5e523d=_0x1d16fe+'.'+_0x5e523d;else return console[_0x2bbec8(0xf6)](a51_0x5bf18c[_0x2bbec8(0xf3)](_0x2bbec8(0x1e0)),_0x2bbec8(0x249)),console['error'](a51_0x5bf18c[_0x2bbec8(0x1b0)](_0x2bbec8(0x10a))),0x1;}const _0x14821b=_0x3e63fa[_0x2bbec8(0x128)],_0x535d86=_0x3e63fa[_0x2bbec8(0x16a)],_0x478260={};if(_0x14821b&&Array[_0x2bbec8(0x124)](_0x14821b))for(const _0x11b006 of _0x14821b){const _0x4d2dba=_0x11b006[_0x2bbec8(0xd7)]('=');if(_0x4d2dba===-0x1)return console[_0x2bbec8(0xf6)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x11b006),console[_0x2bbec8(0xf6)](_0x2bbec8(0x190)),0x1;const _0x369d55=_0x11b006[_0x2bbec8(0x24a)](0x0,_0x4d2dba),_0x1b171a=_0x11b006[_0x2bbec8(0x24a)](_0x4d2dba+0x1);try{_0x478260[_0x369d55]=JSON['parse'](_0x1b171a);}catch{_0x478260[_0x369d55]=_0x1b171a;}}_0x3e63fa[_0x2bbec8(0xde)]&&(console[_0x2bbec8(0xf6)](_0x2bbec8(0x162)+_0x5e523d),Object[_0x2bbec8(0x244)](_0x478260)[_0x2bbec8(0x221)]>0x0&&console[_0x2bbec8(0xf6)](_0x2bbec8(0x1b8)+JSON[_0x2bbec8(0x246)](_0x478260)),_0x535d86&&console[_0x2bbec8(0xf6)](_0x2bbec8(0x11b)+_0x535d86));const _0x44917b=await withSpinner('Starting\x20workflow\x20run...',()=>_0x59ee69[_0x2bbec8(0x121)][_0x2bbec8(0xe2)](_0x5e523d,_0x478260,{'sessionTime':_0x535d86}),{'verbose':_0x3e63fa[_0x2bbec8(0xde)]}),_0x3a706d=_0x44917b[_0x2bbec8(0x195)];console['error'](_0x2bbec8(0xa3)),console[_0x2bbec8(0xf6)](_0x2bbec8(0x161)+_0x3a706d['id']),console[_0x2bbec8(0xf6)]('\x20\x20Session\x20ID:\x20'+_0x3a706d['sessionId']),console['error'](_0x2bbec8(0x186)+_0x3a706d[_0x2bbec8(0x1fe)]?.[_0x2bbec8(0x174)]),console[_0x2bbec8(0xf6)]('\x20\x20Workflow:\x20'+_0x3a706d['workflow']?.[_0x2bbec8(0x174)]);if(_0x3a706d[_0x2bbec8(0x1fe)]?.['id']&&_0x3a706d['sessionId']&&_0x3a706d['id']){const _0x48a6f9=_0x3e63fa[_0x2bbec8(0x1e3)],_0x2194bf=getConsoleUrl(_0x48a6f9,_0x2bbec8(0xcd)+_0x3a706d[_0x2bbec8(0x1fe)]['id']+'/sessions/'+_0x3a706d[_0x2bbec8(0x214)]+_0x2bbec8(0x136)+_0x3a706d['id']);console['error']('\x20\x20Console:\x20'+a51_0x5bf18c['cyan'](_0x2194bf));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a51_0x22a388(0xb3);[a51_0x22a388(0x1b4)]=a51_0x22a388(0x1ac);async['execute'](_0x8e89c9){const _0x28ddfc=a51_0x22a388,{options:_0x3c4370,args:_0x1751f5,tdx:_0x3296d0}=_0x8e89c9,_0x164e10=_0x1751f5[0x0],_0x5e04a8=_0x1751f5[0x1]||'.';if(!_0x164e10)return console[_0x28ddfc(0xf6)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x28ddfc(0xf6)](_0x28ddfc(0xd1)),0x1;const _0x3a1f6a=_0x3c4370['revision'];_0x3c4370[_0x28ddfc(0xde)]&&(console['error'](_0x28ddfc(0xba)+_0x164e10),console[_0x28ddfc(0xf6)]('Output\x20directory:\x20'+_0x5e04a8),_0x3a1f6a&&console[_0x28ddfc(0xf6)]('Revision:\x20'+_0x3a1f6a));const _0x2c89f5=await withSpinner(_0x28ddfc(0x24d)+_0x164e10+_0x28ddfc(0x156),()=>_0x3296d0[_0x28ddfc(0x121)][_0x28ddfc(0x1cc)](_0x164e10,_0x5e04a8,{'revision':_0x3a1f6a}),{'verbose':_0x3c4370[_0x28ddfc(0xde)]}),_0xd008b1=_0x2c89f5[_0x28ddfc(0x195)];return console['error']('✔\x20Downloaded\x20'+_0xd008b1[_0x28ddfc(0xb4)]),console[_0x28ddfc(0xf6)](_0x28ddfc(0x182)+_0xd008b1['revision']),console[_0x28ddfc(0xf6)]('\x20\x20Files\x20extracted:\x20'+_0xd008b1['filesExtracted']),console['error'](_0x28ddfc(0x1c9)+_0x5e04a8+'/'+_0xd008b1['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a51_0x22a388(0xd4);[a51_0x22a388(0x1b4)]=a51_0x22a388(0x172);async[a51_0x22a388(0xd2)](_0x1a3328){const _0x814c27=a51_0x22a388,{options:_0x1b95c2,args:_0x3dd527,tdx:_0x99fddd}=_0x1a3328;let _0x401bbe='.',_0x993034=_0x1b95c2[_0x814c27(0x174)];if(_0x3dd527[0x0]){const {promises:_0x4b9617}=await import('fs');try{const _0x5cd473=await _0x4b9617['stat'](_0x3dd527[0x0]);if(_0x5cd473[_0x814c27(0x153)]())_0x401bbe=_0x3dd527[0x0];else return console[_0x814c27(0xf6)](_0x814c27(0x12b)+_0x3dd527[0x0]+_0x814c27(0x168)),0x1;}catch{_0x993034=_0x3dd527[0x0],_0x401bbe='.';}}const _0xb43ffa=_0x1b95c2[_0x814c27(0xf2)],_0x1ae3cd=_0x1b95c2[_0x814c27(0xf9)];_0x1b95c2[_0x814c27(0xde)]&&(console[_0x814c27(0xf6)]('Project\x20directory:\x20'+_0x401bbe),_0x993034&&console[_0x814c27(0xf6)](_0x814c27(0x1bf)+_0x993034),_0xb43ffa&&console['error']('Revision:\x20'+_0xb43ffa),_0x1ae3cd&&console['error'](_0x814c27(0xd0)));const _0x34bb7a=await withSpinner(_0x814c27(0x171),()=>_0x99fddd[_0x814c27(0x121)][_0x814c27(0x11e)](_0x401bbe,{'projectName':_0x993034,'revision':_0xb43ffa,'skipValidation':_0x1ae3cd}),{'verbose':_0x1b95c2['verbose']}),_0x3ae6ba=_0x34bb7a[_0x814c27(0x195)];return console[_0x814c27(0xf6)]('✔\x20Pushed\x20'+_0x3ae6ba[_0x814c27(0xb4)]),console['error'](_0x814c27(0xca)+_0x3ae6ba[_0x814c27(0xb6)]),console['error'](_0x814c27(0x182)+_0x3ae6ba[_0x814c27(0xf2)]),await this[_0x814c27(0x134)](_0x99fddd,_0x3ae6ba[_0x814c27(0xb4)],_0x1b95c2[_0x814c27(0x1e3)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x23a);['description']=a51_0x22a388(0x217);async[a51_0x22a388(0xd2)](_0x5325ae){const _0x17afd8=a51_0x22a388,{options:_0x45591b,args:_0x1df2e5,tdx:_0x3707b1}=_0x5325ae,_0x4c5e64=_0x1df2e5[0x0],_0x4ef354=_0x1df2e5[0x1];if(!_0x4c5e64)return console['error'](a51_0x5bf18c[_0x17afd8(0xf3)](_0x17afd8(0x1e0)),_0x17afd8(0x21b)),console[_0x17afd8(0xf6)](a51_0x5bf18c[_0x17afd8(0x1b0)](_0x17afd8(0x133))),0x1;const _0x5495bf=_0x45591b[_0x17afd8(0xf2)];_0x45591b[_0x17afd8(0xde)]&&(console['error'](_0x17afd8(0xba)+_0x4c5e64),_0x4ef354&&console['error'](_0x17afd8(0x1f6)+_0x4ef354),_0x5495bf&&console[_0x17afd8(0xf6)](_0x17afd8(0xa2)+_0x5495bf),_0x45591b['dryRun']&&console[_0x17afd8(0xf6)](_0x17afd8(0x21f)));const _0x3c601b=await withSpinner(_0x17afd8(0x1ee)+_0x4c5e64+_0x17afd8(0x156),()=>_0x3707b1[_0x17afd8(0x121)][_0x17afd8(0x21a)](_0x4c5e64,{'targetDir':_0x4ef354,'revision':_0x5495bf}),{'verbose':_0x45591b[_0x17afd8(0xde)]}),_0x2b2ffa=_0x3c601b['data'];_0x2b2ffa[_0x17afd8(0x234)]?console[_0x17afd8(0xf6)](_0x17afd8(0x247)+_0x2b2ffa[_0x17afd8(0xb4)]):console[_0x17afd8(0xf6)](_0x17afd8(0xdc)+_0x2b2ffa['projectName']);console[_0x17afd8(0xf6)](_0x17afd8(0x182)+_0x2b2ffa[_0x17afd8(0xf2)]),console['error'](_0x17afd8(0x1c0)+(a51_0x108fb0[_0x17afd8(0x1d2)](process[_0x17afd8(0x166)](),_0x2b2ffa[_0x17afd8(0x1a4)])||'.')),console[_0x17afd8(0xf6)]('\x20\x20Changes:\x20'+a51_0x5bf18c[_0x17afd8(0xf7)]('+'+_0x2b2ffa[_0x17afd8(0x145)]['new']+'\x20new')+',\x20'+(a51_0x5bf18c['yellow']('~'+_0x2b2ffa[_0x17afd8(0x145)][_0x17afd8(0x109)]+_0x17afd8(0x115))+',\x20')+(a51_0x5bf18c[_0x17afd8(0xf3)]('-'+_0x2b2ffa['summary'][_0x17afd8(0xe5)]+_0x17afd8(0x1be))+',\x20')+(''+a51_0x5bf18c[_0x17afd8(0x1b0)](_0x2b2ffa[_0x17afd8(0x145)][_0x17afd8(0x19a)]+_0x17afd8(0x21e))));for(const _0x194f56 of _0x2b2ffa[_0x17afd8(0xa8)]){_0x194f56[_0x17afd8(0x1a5)]==='modified'&&_0x194f56[_0x17afd8(0x1d9)]&&(console[_0x17afd8(0xf6)]('\x0a'+a51_0x5bf18c[_0x17afd8(0xbb)]('---\x20'+_0x194f56[_0x17afd8(0x15d)])),console['error'](_0x194f56['diff']));}if(!_0x2b2ffa[_0x17afd8(0xd6)])return saveSessionContext({'workflow_project':_0x2b2ffa[_0x17afd8(0xb4)]},_0x45591b[_0x17afd8(0xe7)]),console[_0x17afd8(0xf6)](a51_0x5bf18c[_0x17afd8(0xf7)](_0x17afd8(0x23b))),console[_0x17afd8(0xf6)](a51_0x5bf18c[_0x17afd8(0x1b0)](_0x17afd8(0x1cd)+_0x2b2ffa[_0x17afd8(0xb4)])),0x0;if(_0x45591b[_0x17afd8(0x164)])return console[_0x17afd8(0xf6)](a51_0x5bf18c[_0x17afd8(0xfc)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x45591b[_0x17afd8(0x117)]){if(!isInteractive())return console[_0x17afd8(0xf6)](a51_0x5bf18c[_0x17afd8(0xf3)](_0x17afd8(0xd9)),_0x17afd8(0x23f)),console[_0x17afd8(0xf6)](a51_0x5bf18c[_0x17afd8(0x1b0)](_0x17afd8(0x119))),0x1;const _0x20dc5b=await confirmKey(_0x17afd8(0xa5));if(!_0x20dc5b)return console[_0x17afd8(0xf6)](a51_0x5bf18c[_0x17afd8(0xfc)](_0x17afd8(0x1cb)),_0x17afd8(0x9f)),0x1;}await withSpinner(_0x17afd8(0x130),()=>_0x3707b1['workflow'][_0x17afd8(0x1aa)](_0x2b2ffa,{'revision':_0x5495bf}),{'verbose':_0x45591b[_0x17afd8(0xde)]}),saveSessionContext({'workflow_project':_0x2b2ffa[_0x17afd8(0xb4)]},_0x45591b[_0x17afd8(0xe7)]),console['error'](a51_0x5bf18c['green'](_0x17afd8(0x15f)));const _0x30cb33=a51_0x108fb0[_0x17afd8(0x1d2)](process[_0x17afd8(0x166)](),_0x2b2ffa[_0x17afd8(0x1a4)])||'.';return console['error'](a51_0x5bf18c[_0x17afd8(0x1b0)]('\x20\x20Location:\x20'+_0x30cb33)),console[_0x17afd8(0xf6)](a51_0x5bf18c[_0x17afd8(0x1b0)](_0x17afd8(0x1cd)+_0x2b2ffa['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x224);[a51_0x22a388(0x1b4)]=a51_0x22a388(0x135);async[a51_0x22a388(0xd2)](_0xcfdb24){const _0x5bf818=a51_0x22a388,{options:_0x2e0f7b,args:_0x545015,tdx:_0x29dff5}=_0xcfdb24,_0x4b88df=this[_0x5bf818(0x235)](_0x545015,_0x2e0f7b),_0x28b808=_0x2e0f7b[_0x5bf818(0xf2)],_0xe1ecd1=_0x2e0f7b[_0x5bf818(0xf9)];_0x2e0f7b['verbose']&&(_0x4b88df&&console[_0x5bf818(0xf6)](_0x5bf818(0x191)+_0x4b88df),_0x28b808&&console['error'](_0x5bf818(0xa2)+_0x28b808),_0x2e0f7b['dryRun']&&console[_0x5bf818(0xf6)](_0x5bf818(0x21f)),_0xe1ecd1&&console[_0x5bf818(0xf6)](_0x5bf818(0xd0)));let _0x281709;try{_0x281709=await withSpinner('Analyzing\x20changes...',()=>_0x29dff5['workflow'][_0x5bf818(0x127)]({'sourceDir':_0x4b88df,'revision':_0x28b808,'skipValidation':_0xe1ecd1}),{'verbose':_0x2e0f7b['verbose']});}catch(_0x159dc9){if(_0x159dc9 instanceof Error&&_0x159dc9[_0x5bf818(0x17b)]['includes'](_0x5bf818(0x10b)))return console[_0x5bf818(0xf6)](a51_0x5bf18c['red']('Error:'),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x2e0f7b[_0x5bf818(0x1c1)]?console[_0x5bf818(0xf6)](a51_0x5bf18c[_0x5bf818(0x1b0)](_0x5bf818(0x1f3)+_0x2e0f7b[_0x5bf818(0x1c1)]+_0x5bf818(0x184)+_0x2e0f7b[_0x5bf818(0x1c1)]+'\x27')):console[_0x5bf818(0xf6)](a51_0x5bf18c[_0x5bf818(0x1b0)](_0x5bf818(0x1da))),0x1;throw _0x159dc9;}const _0x2f05c3=_0x281709['data'];console['error'](_0x5bf818(0xfb)+_0x2f05c3[_0x5bf818(0xb4)]),console[_0x5bf818(0xf6)](_0x5bf818(0x20f)+_0x2f05c3[_0x5bf818(0x18e)]),console[_0x5bf818(0xf6)](_0x5bf818(0x182)+_0x2f05c3[_0x5bf818(0xf2)]),console['error'](_0x5bf818(0x150)+a51_0x5bf18c[_0x5bf818(0xf7)]('+'+_0x2f05c3[_0x5bf818(0x145)]['new']+'\x20new')+',\x20'+(a51_0x5bf18c[_0x5bf818(0xfc)]('~'+_0x2f05c3[_0x5bf818(0x145)][_0x5bf818(0x109)]+_0x5bf818(0x115))+',\x20')+(a51_0x5bf18c['red']('-'+_0x2f05c3[_0x5bf818(0x145)][_0x5bf818(0xe5)]+_0x5bf818(0x1be))+',\x20')+(''+a51_0x5bf18c['dim'](_0x2f05c3['summary'][_0x5bf818(0x19a)]+_0x5bf818(0x21e))));for(const _0xa673e5 of _0x2f05c3[_0x5bf818(0xa8)]){_0xa673e5[_0x5bf818(0x1a5)]===_0x5bf818(0x109)&&_0xa673e5[_0x5bf818(0x1d9)]&&(console[_0x5bf818(0xf6)]('\x0a'+a51_0x5bf18c[_0x5bf818(0xbb)]('---\x20'+_0xa673e5[_0x5bf818(0x15d)])),console[_0x5bf818(0xf6)](_0xa673e5[_0x5bf818(0x1d9)]));}if(!_0x2f05c3[_0x5bf818(0xd6)])return console['error'](a51_0x5bf18c[_0x5bf818(0xf7)](_0x5bf818(0x1b3))),await this['showWorkflowConsoleUrl'](_0x29dff5,_0x2f05c3['projectName'],_0x2e0f7b['site']),0x0;if(_0x2e0f7b[_0x5bf818(0x164)])return console[_0x5bf818(0xf6)](a51_0x5bf18c[_0x5bf818(0xfc)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x2e0f7b[_0x5bf818(0x117)]){if(!isInteractive())return console[_0x5bf818(0xf6)](a51_0x5bf18c['red'](_0x5bf818(0xd9)),_0x5bf818(0x23f)),console[_0x5bf818(0xf6)](a51_0x5bf18c[_0x5bf818(0x1b0)](_0x5bf818(0x119))),0x1;const _0x14d59f=await confirmKey(_0x5bf818(0x1f0));if(!_0x14d59f)return console['error'](a51_0x5bf18c[_0x5bf818(0xfc)](_0x5bf818(0x1cb)),_0x5bf818(0x1c8)),0x1;}const _0x25fbdc=await withSpinner(_0x5bf818(0x21d),()=>_0x29dff5[_0x5bf818(0x121)]['executePushProject'](_0x2f05c3),{'verbose':_0x2e0f7b[_0x5bf818(0xde)]}),_0x2816c6=_0x25fbdc[_0x5bf818(0x195)];return console[_0x5bf818(0xf6)](a51_0x5bf18c[_0x5bf818(0xf7)](_0x5bf818(0x11c))),console['error'](_0x5bf818(0xca)+_0x2816c6[_0x5bf818(0xb6)]),console['error'](_0x5bf818(0x182)+_0x2816c6[_0x5bf818(0xf2)]),await this[_0x5bf818(0x134)](_0x29dff5,_0x2816c6['projectName'],_0x2e0f7b[_0x5bf818(0x1e3)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x12a);[a51_0x22a388(0x1b4)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a51_0x22a388(0xd2)](_0x205d9){const _0x41bfbc=a51_0x22a388,{options:_0x16244d,args:_0x1d629d,tdx:_0x13d357}=_0x205d9,_0x4913b0=this[_0x41bfbc(0x235)](_0x1d629d,_0x16244d),_0x471b19=_0x16244d[_0x41bfbc(0x174)],_0x15b7de=_0x16244d[_0x41bfbc(0xf2)],_0xbce095=_0x16244d[_0x41bfbc(0xf9)];if(!_0x4913b0)return console[_0x41bfbc(0xf6)](a51_0x5bf18c[_0x41bfbc(0xf3)]('Error:'),_0x41bfbc(0x1dd)),console[_0x41bfbc(0xf6)](a51_0x5bf18c['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x41bfbc(0xf6)](a51_0x5bf18c[_0x41bfbc(0x1b0)](_0x41bfbc(0x1d5))),0x1;if(!_0x471b19)return console[_0x41bfbc(0xf6)](a51_0x5bf18c[_0x41bfbc(0xf3)](_0x41bfbc(0x1e0)),_0x41bfbc(0x10c)),console[_0x41bfbc(0xf6)](a51_0x5bf18c[_0x41bfbc(0x1b0)](_0x41bfbc(0x1a9))),0x1;_0x16244d[_0x41bfbc(0xde)]&&(console['error'](_0x41bfbc(0x191)+_0x4913b0),console[_0x41bfbc(0xf6)](_0x41bfbc(0x206)+_0x471b19),_0x15b7de&&console['error'](_0x41bfbc(0xa2)+_0x15b7de),_0x16244d[_0x41bfbc(0x164)]&&console['error']('Dry\x20run:\x20yes'),_0xbce095&&console['error'](_0x41bfbc(0xd0)));const _0x36ef65=await withSpinner(_0x41bfbc(0x17e),()=>_0x13d357[_0x41bfbc(0x121)][_0x41bfbc(0x120)](_0x4913b0,_0x471b19,{'revision':_0x15b7de,'skipValidation':_0xbce095}),{'verbose':_0x16244d[_0x41bfbc(0xde)]}),_0xdb1c64=_0x36ef65[_0x41bfbc(0x195)];console['error'](_0x41bfbc(0x10d)+_0xdb1c64[_0x41bfbc(0x18e)]);_0xdb1c64['sourceProjectName']&&console[_0x41bfbc(0xf6)]('Source\x20project:\x20'+_0xdb1c64[_0x41bfbc(0xbf)]);console[_0x41bfbc(0xf6)](_0x41bfbc(0x206)+_0xdb1c64[_0x41bfbc(0xf0)]),console['error'](_0x41bfbc(0xa2)+_0xdb1c64[_0x41bfbc(0xf2)]),console[_0x41bfbc(0xf6)](_0x41bfbc(0x1b9)+_0xdb1c64[_0x41bfbc(0x1af)]);_0xdb1c64[_0x41bfbc(0x1d6)]&&(console['error'](a51_0x5bf18c[_0x41bfbc(0xfc)]('\x0a⚠\x20Project\x20\x22'+_0xdb1c64[_0x41bfbc(0xf0)]+_0x41bfbc(0x148)+_0xdb1c64[_0x41bfbc(0x10e)]+')')),console[_0x41bfbc(0xf6)](a51_0x5bf18c[_0x41bfbc(0xfc)](_0x41bfbc(0x209))));if(_0x16244d[_0x41bfbc(0x164)])return console[_0x41bfbc(0xf6)](a51_0x5bf18c[_0x41bfbc(0xfc)](_0x41bfbc(0xc1))),0x0;if(!_0x16244d[_0x41bfbc(0x117)]){if(!isInteractive())return console[_0x41bfbc(0xf6)](a51_0x5bf18c[_0x41bfbc(0xf3)](_0x41bfbc(0xd9)),_0x41bfbc(0x23f)),console['error'](a51_0x5bf18c[_0x41bfbc(0x1b0)](_0x41bfbc(0x119))),0x1;const _0x5d9a0f=_0xdb1c64['sourceProjectName']||a51_0x108fb0[_0x41bfbc(0x144)](_0x4913b0),_0x29946d=_0xdb1c64['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x471b19+_0x41bfbc(0x1db):_0x41bfbc(0x1f5)+_0x5d9a0f+_0x41bfbc(0xdb)+_0x471b19+'\x22?',_0x88002b=await confirmKey(_0x29946d);if(!_0x88002b)return console['error'](a51_0x5bf18c[_0x41bfbc(0xfc)](_0x41bfbc(0x1cb))),0x1;}const _0x88b4d3=await withSpinner(_0xdb1c64[_0x41bfbc(0x1d6)]?_0x41bfbc(0x9b)+_0x471b19+_0x41bfbc(0x156):_0x41bfbc(0x1f7)+_0x471b19+'...',()=>_0x13d357[_0x41bfbc(0x121)]['executeCloneProject'](_0xdb1c64),{'verbose':_0x16244d[_0x41bfbc(0xde)]}),_0xeb1080=_0x88b4d3[_0x41bfbc(0x195)];return console[_0x41bfbc(0xf6)](a51_0x5bf18c[_0x41bfbc(0xf7)](_0xdb1c64['targetExists']?_0x41bfbc(0x11f):_0x41bfbc(0x1ca))),console[_0x41bfbc(0xf6)](_0x41bfbc(0x186)+_0xeb1080['newProjectName']),console[_0x41bfbc(0xf6)]('\x20\x20Project\x20ID:\x20'+_0xeb1080[_0x41bfbc(0xe8)]),console[_0x41bfbc(0xf6)](_0x41bfbc(0x182)+_0xeb1080[_0x41bfbc(0xf2)]),await this['showWorkflowConsoleUrl'](_0x13d357,_0xeb1080['newProjectName'],_0x16244d[_0x41bfbc(0x1e3)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x125);[a51_0x22a388(0x1b4)]=a51_0x22a388(0x112);async[a51_0x22a388(0xd2)](_0x555115){const _0x4f4c8e=a51_0x22a388,{options:_0x1bc4d0,args:_0xb668c6,tdx:_0xa629f7}=_0x555115,_0x46f820=_0xb668c6[0x0];if(!_0x46f820)return console['error'](_0x4f4c8e(0x1d8)),console[_0x4f4c8e(0xf6)](_0x4f4c8e(0x1a2)),0x1;_0x1bc4d0[_0x4f4c8e(0xde)]&&console[_0x4f4c8e(0xf6)](_0x4f4c8e(0xba)+_0x46f820);if(!_0x1bc4d0[_0x4f4c8e(0x117)]){if(!isInteractive())return console[_0x4f4c8e(0xf6)](a51_0x5bf18c[_0x4f4c8e(0xf3)](_0x4f4c8e(0xd9)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a51_0x5bf18c[_0x4f4c8e(0x1b0)](_0x4f4c8e(0x119))),0x1;const _0x37b925=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x46f820+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x37b925)return console[_0x4f4c8e(0xf6)](a51_0x5bf18c['yellow'](_0x4f4c8e(0x1cb))),0x1;}const _0x56d3b7=await withSpinner('Deleting\x20project\x20'+_0x46f820+_0x4f4c8e(0x156),()=>_0xa629f7['workflow'][_0x4f4c8e(0xc9)](_0x46f820),{'verbose':_0x1bc4d0[_0x4f4c8e(0xde)]}),_0x333b9e=_0x56d3b7['data'];return console['error'](_0x4f4c8e(0x1bb)+_0x333b9e['projectName']),console[_0x4f4c8e(0xf6)](_0x4f4c8e(0xca)+_0x333b9e[_0x4f4c8e(0xb6)]),0x0;}}export function parseKeyValue(_0x2455e0){const _0xdb6dfa=a51_0x22a388,_0x1678e0=_0x2455e0[_0xdb6dfa(0xd7)]('=');if(_0x1678e0===-0x1)throw new Error(_0xdb6dfa(0x159)+_0x2455e0+_0xdb6dfa(0x12f));const _0x33d1a5=_0x2455e0[_0xdb6dfa(0x24a)](0x0,_0x1678e0),_0x5a0004=_0x2455e0[_0xdb6dfa(0x24a)](_0x1678e0+0x1);if(!_0x33d1a5)throw new Error(_0xdb6dfa(0xed));return{'key':_0x33d1a5,'value':_0x5a0004};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x226);[a51_0x22a388(0x1b4)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a51_0x22a388(0xd2)](_0x5e2b52){const _0x2f6c79=a51_0x22a388,{options:_0x1bac9b,args:_0x2c53b5,tdx:_0x2e731d}=_0x5e2b52,_0x1dca4d=this[_0x2f6c79(0x118)](_0x2c53b5,_0x1bac9b);if(!_0x1dca4d)return 0x1;_0x1bac9b[_0x2f6c79(0xde)]&&console[_0x2f6c79(0xf6)]('Project:\x20'+_0x1dca4d);const _0x324164=await withSpinner(_0x2f6c79(0x18a),()=>_0x2e731d['workflow'][_0x2f6c79(0x105)](_0x1dca4d),{'verbose':_0x1bac9b[_0x2f6c79(0xde)]}),{secrets:_0x2db372}=_0x324164[_0x2f6c79(0x195)];return console['error'](_0x2f6c79(0x17a)+_0x2db372[_0x2f6c79(0x221)]+_0x2f6c79(0xf5)+(_0x2db372['length']!==0x1?'s':'')),await handleSDKOutput(_0x2db372,_0x1bac9b),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x223);[a51_0x22a388(0x1b4)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async[a51_0x22a388(0xd2)](_0x1fbba7){const _0x2642c1=a51_0x22a388,{options:_0x4a89d2,args:_0x9a2265,tdx:_0x895a46}=_0x1fbba7;let _0x149a41,_0x5effae;if(_0x9a2265[_0x2642c1(0x221)]>=0x1&&!_0x9a2265[0x0]['includes']('='))_0x149a41=_0x9a2265[0x0],_0x5effae=_0x9a2265['slice'](0x1);else{if(_0x9a2265[_0x2642c1(0x221)]>=0x1&&_0x4a89d2[_0x2642c1(0x1c1)])_0x149a41=_0x4a89d2[_0x2642c1(0x1c1)],_0x5effae=_0x9a2265;else return _0x9a2265[_0x2642c1(0x221)]>=0x1?(console[_0x2642c1(0xf6)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x2642c1(0x10a)),0x1):(console['error'](_0x2642c1(0xb1)),console[_0x2642c1(0xf6)](_0x2642c1(0x1d0)),0x1);}if(_0x5effae[_0x2642c1(0x221)]===0x0)return console[_0x2642c1(0xf6)](_0x2642c1(0xb1)),console[_0x2642c1(0xf6)](_0x2642c1(0x1d0)),0x1;const _0x2a06c4={};try{for(const _0x4ef91d of _0x5effae){const {key:_0x147283,value:_0xcd7782}=parseKeyValue(_0x4ef91d);_0x2a06c4[_0x147283]=_0xcd7782;}}catch(_0x455620){return _0x455620 instanceof Error&&console[_0x2642c1(0xf6)](a51_0x5bf18c[_0x2642c1(0xf3)](_0x2642c1(0x1e0)),_0x455620[_0x2642c1(0x17b)]),0x1;}const _0x1c4890=Object['keys'](_0x2a06c4);_0x4a89d2['verbose']&&(console[_0x2642c1(0xf6)](_0x2642c1(0xba)+_0x149a41),console[_0x2642c1(0xf6)]('Secrets\x20to\x20set:\x20'+_0x1c4890['join'](',\x20')));const _0x3b6bef=await withSpinner(_0x1c4890['length']===0x1?_0x2642c1(0x178):_0x2642c1(0xeb)+_0x1c4890[_0x2642c1(0x221)]+'\x20secrets...',()=>_0x895a46[_0x2642c1(0x121)][_0x2642c1(0xbe)](_0x149a41,_0x2a06c4),{'verbose':_0x4a89d2['verbose']}),_0x4d72de=_0x3b6bef['data'];return console[_0x2642c1(0xf6)](_0x1c4890[_0x2642c1(0x221)]===0x1?_0x2642c1(0x243)+_0x4d72de[_0x2642c1(0x244)][0x0]+_0x2642c1(0x1c5)+_0x4d72de[_0x2642c1(0xb4)]+'\x27':'✔\x20'+_0x4d72de[_0x2642c1(0x244)][_0x2642c1(0x221)]+_0x2642c1(0x216)+_0x4d72de[_0x2642c1(0xb4)]+'\x27'),(_0x4a89d2[_0x2642c1(0x176)]||_0x4a89d2[_0x2642c1(0x201)])&&await handleSingleObjectOutput(_0x4d72de,_0x4a89d2),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0xaa);['description']=a51_0x22a388(0x16c);async[a51_0x22a388(0xd2)](_0x1b8163){const _0xa02d26=a51_0x22a388,{options:_0x20afcb,args:_0x2bf17d,tdx:_0x2aa889}=_0x1b8163;let _0x2751ad,_0xa531f1;if(_0x2bf17d[_0xa02d26(0x221)]>=0x2)_0x2751ad=_0x2bf17d[0x0],_0xa531f1=_0x2bf17d[0x1];else{if(_0x2bf17d[_0xa02d26(0x221)]===0x1&&_0x20afcb[_0xa02d26(0x1c1)])_0x2751ad=_0x20afcb['workflowProject'],_0xa531f1=_0x2bf17d[0x0];else return _0x2bf17d[_0xa02d26(0x221)]===0x1?(console[_0xa02d26(0xf6)]('Error:\x20Project\x20name\x20is\x20required'),console[_0xa02d26(0xf6)](_0xa02d26(0x10a)),0x1):(console[_0xa02d26(0xf6)](_0xa02d26(0x203)),console[_0xa02d26(0xf6)](_0xa02d26(0xc0)),0x1);}_0x20afcb[_0xa02d26(0xde)]&&(console[_0xa02d26(0xf6)](_0xa02d26(0xba)+_0x2751ad),console['error']('Key:\x20'+_0xa531f1));if(!_0x20afcb[_0xa02d26(0x117)]){if(!isInteractive())return console[_0xa02d26(0xf6)](a51_0x5bf18c['red'](_0xa02d26(0xd9)),_0xa02d26(0x23f)),console[_0xa02d26(0xf6)](a51_0x5bf18c[_0xa02d26(0x1b0)](_0xa02d26(0x119))),0x1;const _0x5eed28=await confirmKey(_0xa02d26(0x22b)+_0xa531f1+_0xa02d26(0x1fc)+_0x2751ad+'\x27?');if(!_0x5eed28)return console['error'](a51_0x5bf18c[_0xa02d26(0xfc)](_0xa02d26(0x1cb))),0x1;}const _0x5c1535=await withSpinner(_0xa02d26(0x141),()=>_0x2aa889[_0xa02d26(0x121)][_0xa02d26(0xd5)](_0x2751ad,_0xa531f1),{'verbose':_0x20afcb['verbose']}),_0x381d4e=_0x5c1535[_0xa02d26(0x195)];return console['error']('✔\x20Secret\x20\x27'+_0x381d4e[_0xa02d26(0x1b2)]+_0xa02d26(0x132)+_0x381d4e[_0xa02d26(0xb4)]+'\x27'),(_0x20afcb[_0xa02d26(0x176)]||_0x20afcb['jsonl'])&&await handleSingleObjectOutput(_0x381d4e,_0x20afcb),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(_0x1428a6){const _0x278aab=a51_0x22a388,_0x451e0c=Math['floor'](_0x1428a6/0x3e8),_0x36c19a=Math['floor'](_0x451e0c/0x3c),_0x14f753=Math[_0x278aab(0xdd)](_0x36c19a/0x3c),_0x1ce6ac=Math[_0x278aab(0xdd)](_0x14f753/0x18);if(_0x1ce6ac>0x0){const _0x101211=_0x14f753%0x18;return _0x101211>0x0?_0x1ce6ac+'d\x20'+_0x101211+'h':_0x1ce6ac+'d';}else{if(_0x14f753>0x0){const _0x2572b9=_0x36c19a%0x3c;return _0x2572b9>0x0?_0x14f753+'h\x20'+_0x2572b9+'m':_0x14f753+'h';}else{if(_0x36c19a>0x0){const _0x4a0f4c=_0x451e0c%0x3c;return _0x4a0f4c>0x0?_0x36c19a+'m\x20'+_0x4a0f4c+'s':_0x36c19a+'m';}else return _0x451e0c+'s';}}}function formatTimestamp(_0x4acb03,_0x6b69ea){const _0x54f91e=a51_0x22a388,_0x29127f=new Date(_0x4acb03),_0x58c0a7=String(_0x29127f[_0x54f91e(0x1fa)]())[_0x54f91e(0x17d)](0x2,'0'),_0x5e4109=String(_0x29127f[_0x54f91e(0x14d)]())[_0x54f91e(0x17d)](0x2,'0'),_0x1683f1=_0x58c0a7+':'+_0x5e4109,_0x5e6762=_0x29127f[_0x54f91e(0x1e9)]()===_0x6b69ea[_0x54f91e(0x1e9)]()&&_0x29127f[_0x54f91e(0x187)]()===_0x6b69ea['getMonth']()&&_0x29127f['getDate']()===_0x6b69ea[_0x54f91e(0x149)]();if(_0x5e6762)return _0x1683f1;else{const _0x2262e4=String(_0x29127f['getMonth']()+0x1)[_0x54f91e(0x17d)](0x2,'0'),_0x381b9f=String(_0x29127f[_0x54f91e(0x149)]())['padStart'](0x2,'0');return _0x2262e4+'-'+_0x381b9f+'\x20'+_0x1683f1;}}function formatDate(_0x22af93){const _0x4ba063=a51_0x22a388,_0x37df52=_0x22af93[_0x4ba063(0x1e9)](),_0x478199=String(_0x22af93['getMonth']()+0x1)[_0x4ba063(0x17d)](0x2,'0'),_0x5d30b0=String(_0x22af93[_0x4ba063(0x149)]())[_0x4ba063(0x17d)](0x2,'0');return _0x37df52+'-'+_0x478199+'-'+_0x5d30b0;}function getTaskStateIcon(_0x52646e){const _0x90fac7={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x90fac7[_0x52646e]||'⚪';}function getBarChar(_0x54c532){const _0x53af6c=a51_0x22a388;return _0x54c532===_0x53af6c(0xf6)||_0x54c532==='group_error'?'×':'─';}function a51_0x15a1(){const _0x38f735=['getDate','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','toLowerCase','No\x20workflow\x20projects\x20found','getMinutes','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','resolveProjectId','\x20\x20Changes:\x20','createdAt','Select\x20a\x20task\x20to\x20view\x20logs:','isDirectory','resolve','\x20logs','...','Start\x20a\x20workflow\x20run','No\x20sessions\x20with\x20timing\x20information','Invalid\x20format:\x20','Fetching\x20log\x20files...','running',',\x20Workflow:\x20','path','764923JSlXkI','✔\x20Pull\x20complete','sessions','\x20\x20Attempt\x20ID:\x20','Workflow:\x20','fullName','dryRun','\x20session','cwd','ICON_SPACING','\x20is\x20not\x20a\x20directory','\x0aPolling...\x20(','sessionTime','\x20tasks','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','utf-8','Warning:','9FoyEzQ','max','Pushing\x20workflow\x20project...','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','attemptId','name','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','json','No\x20sessions\x20found\x20for:\x20','Setting\x20secret...','success','✔\x20Found\x20','message','No\x20projects\x20match\x20pattern:\x20','padStart','Analyzing\x20project...','get','MIN_TIMELINE_WIDTH','130VhtFrZ','\x20\x20Revision:\x20','filter','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','12960FhlFLr','\x20\x20Project:\x20','getMonth','No\x20sessions\x20found','text','Listing\x20secrets...','Loading\x20sessions...','canceling','Pattern:\x20','sourceDir','Auto-selected\x20latest\x20session:\x20','Expected\x20format:\x20--param\x20key=value','Source\x20directory:\x20','join','1177055sIldPh','Select\x20a\x20workflow\x20to\x20run','data','status','Target:\x20','duration','follow','unchanged','startedAt','Getting\x20attempt\x20details...','No\x20sessions\x20found\x20in\x20project:\x20','439818ECCzdr','list','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Usage:\x20workflow:delete\x20<project-name-or-id>','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','targetDir','type','workflow:workflows','MAX_TASKS_DISPLAY','Resolving\x20project\x20\x27','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','applyPullProject','TASK_NAME_WIDTH','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','workflow:kill','ICON_WIDTH','fileCount','dim','(use\x20--limit\x20to\x20see\x20more)','key','\x0a✔\x20No\x20changes\x20to\x20push','description','autocomplete','workflowName','renderSingleTimeline','Parameters:\x20','Files\x20to\x20upload:\x20','Resume\x20from:\x20','✔\x20Deleted\x20project\x20','\x20(system)','logs','\x20deleted','Project\x20name:\x20','\x20\x20Target:\x20','workflowProject','\x0aFailed\x20to\x20fetch\x20attempt\x20data','sys','session:','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Task\x20name:\x20','workflow:attempts','-\x20nothing\x20pushed','\x20\x20Location:\x20','✔\x20Clone\x20complete','Cancelled','download','\x20\x20Session\x20context\x20set\x20to:\x20','fileSize','value','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','values','relative','finishedAt','cancelRequested','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','targetExists','format','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','diff','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','\x22\x20with\x20new\x20revision?','getTime','Source\x20directory\x20is\x20required','map','\x20sessions\x20','Error:','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Attempt:\x20','site','index','✔\x20Workflow\x20project\x20set\x20to:\x20','fromTask','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','columns','getFullYear','retrySession','Total:\x20','Attempt\x20ID:\x20','blue','Pulling\x20project\x20','isTTY','\x0aPush\x20these\x20changes?','\x1b[1A\x1b[2K','workflow:logs','Tip:\x20cd\x20to\x20workflows/','task','\x0aClone\x20\x22','Target\x20directory:\x20','Cloning\x20to\x20','toISOString','Loading\x20session...','getHours','Session\x20','\x27\x20from\x20project\x20\x27','output','project','2fXfHev','size','jsonl','resolveProject','Error:\x20Secret\x20key\x20is\x20required','log','retryAttempt','New\x20project\x20name:\x20','durationMs','kill','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','planned','stdout','Error:\x20Attempt\x20ID\x20is\x20required','workflow:use','find','\x20\x20Source:\x20','state','force','updatedAt','🔄\x20','sessionId','Retrying\x20session...','\x20secrets\x20set\x20for\x20project\x20\x27','Pull\x20workflow\x20project\x20to\x20local\x20folder','\x0a✔\x20Attempt\x20complete','MAX_LABEL_COUNT','pullProject','Project\x20name\x20is\x20required','retryAttemptName','Pushing\x20project...','\x20unchanged','Dry\x20run:\x20yes','GUTTER','length','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','workflow:secrets:set','workflow:push','lastAttempt','workflow:secrets:list','parseProjectWorkflowPattern','List\x20workflow\x20attempts','\x20\x20tdx\x20wf\x20use\x20<project>','\x20(use\x20--limit\x20to\x20show\x20more)','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','split','Status:\x20','(unknown)','Show\x20specific\x20attempt\x20details','5945640cVAfVm','displayLine','end','\x20from\x20session\x20','isNewProject','resolveProjectDir','all','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','From\x20task:\x20','match','workflow:pull','\x0a✔\x20Already\x20up\x20to\x20date','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','now','reason','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','startTime','navigateSessionsInteractive','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','✔\x20Secret\x20\x27','keys','repeat','stringify','→\x20New\x20project:\x20','sort','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','substring','context','Kill\x20a\x20running\x20attempt','Downloading\x20project\x20','metadata','replace','unknown','set','Updating\x20','\x20\x20Session\x20ID:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','tdx\x20wf\x20attempt\x20','-\x20no\x20files\x20written','total','localeCompare','Revision:\x20','✔\x20Workflow\x20run\x20started','\x20\x20Console:\x20','\x0aApply\x20these\x20changes?','workflow:sessions','workflows','changes','limit','workflow:secrets:delete','renderTimeline','resumeFrom','renderSessionsTimeline','Latest\x20session\x20has\x20no\x20attempt','logFiles','\x20of\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','window','workflow:download','projectName','startsWith','projectId','\x20task','params','Retry\x20a\x20session\x20or\x20attempt','Project:\x20','cyan','write','Show\x20tasks\x20for\x20an\x20attempt','setSecrets','sourceProjectName','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x20\x20New\x20attempt\x20ID:\x20','group_error','42SgXLyd','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','parse','pollTimeline','Killing\x20attempt...','delete','\x20\x20Project\x20ID:\x20','start','revision:\x20','/app/workflows/','Show\x20logs\x20for\x20a\x20workflow\x20attempt','includeRetried','Validation:\x20skipped','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','execute','Include\x20retried:\x20yes','workflow:upload','deleteSecret','hasChanges','indexOf','table','\x0aError:','\x27...','\x22\x20to\x20new\x20project\x20\x22','→\x20Project:\x20','floor','verbose','white','includes','done','run','Error:\x20Invalid\x20JSON\x20in\x20--params','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','deleted','No\x20workflows\x20found','session','newProjectId','slice','tasks','Setting\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Key\x20cannot\x20be\x20empty','splice','Failed\x20to\x20fetch\x20attempt\x20data','newProjectName','No\x20matching\x20sessions\x20found','revision','red','trim','\x20secret','error','green','LABEL_WIDTH_DIVISOR','skipValidation','attempt','✔\x20Project:\x20','yellow','pending','4745652klNLnU','select','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','trimEnd','📁\x20','attempts','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','listSecrets','Getting\x20attempt\x20tasks...','Retrying\x20attempt...','every','modified','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','No\x20workflow\x20tdx.json\x20found','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Source:\x20','existingProjectId','msPerChar','\x20has\x20no\x20attempts','from','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','fill','workflow:retry','\x20modified','868FhWAQL','yes','requireProject','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','some','Session\x20time:\x20','✔\x20Push\x20complete','MIN_LABEL_COUNT','push','✔\x20Project\x20updated','prepareCloneProject','workflow','No\x20workflows\x20found\x20in\x20project:\x20','Filter:\x20project=','isArray','workflow:delete','projects','preparePushProject','param','Listing\x20workflow\x20projects...','workflow:clone','Error:\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','round','icon','.\x20Expected\x20format:\x20KEY=VALUE','Writing\x20files...','session_id','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','showWorkflowConsoleUrl','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','/attempt/','3596019clpXQF','No\x20attempts\x20found\x20for:\x20','workflow:timeline','min','Using\x20attempt\x20','📋\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Listing\x20workflow\x20attempts...','⚠\x20Showing\x20first\x20','Filter:\x20','Deleting\x20secret...','No\x20attempts\x20found','buildTimelineData','basename','summary','taskName','workflow:projects','\x22\x20already\x20exists\x20(ID:\x20'];a51_0x15a1=function(){return _0x38f735;};return a51_0x15a1();}function getBarColor(_0x5ef56b){const _0x22292a=a51_0x22a388,_0x3c9c10={'success':a51_0x5bf18c['green'],'error':a51_0x5bf18c[_0x22292a(0xf3)],'group_error':a51_0x5bf18c['red'],'running':a51_0x5bf18c[_0x22292a(0x1ed)],'blocked':a51_0x5bf18c[_0x22292a(0xfc)],'planned':a51_0x5bf18c[_0x22292a(0x1b0)],'canceling':a51_0x5bf18c[_0x22292a(0xfc)]};return _0x3c9c10[_0x5ef56b]||a51_0x5bf18c[_0x22292a(0xdf)];}function parseTaskName(_0x3baa75){const _0x4cb243=a51_0x22a388;let _0xf280cf=_0x3baa75[_0x4cb243(0x24f)](/^\++/,'');const _0x4f6d6f=_0xf280cf[_0x4cb243(0x22c)]('+'),_0xf94e53=_0x4f6d6f[_0x4cb243(0x221)]>0x1?_0x4f6d6f[_0x4cb243(0x221)]-0x2:0x0,_0x1ebcc0=_0x4f6d6f[_0x4f6d6f[_0x4cb243(0x221)]-0x1]||_0xf280cf;return{'level':_0xf94e53,'name':'+'+_0x1ebcc0};}function truncateTaskName(_0x8c2696,_0x3ed74c){const _0x342955=a51_0x22a388,_0x7b2fe4=stringWidth(_0x8c2696);if(_0x7b2fe4<=_0x3ed74c)return _0x8c2696;let _0x3e3a78=_0x8c2696;while(stringWidth(_0x3e3a78+'…')>_0x3ed74c&&_0x3e3a78[_0x342955(0x221)]>0x0){_0x3e3a78=_0x3e3a78['slice'](0x0,-0x1);}return _0x3e3a78+'…';}function calculateTimeScale(_0x1be0e0,_0x1b1ded){const _0x547c1f=a51_0x22a388;return{'startTime':_0x1be0e0[_0x547c1f(0xcb)],'endTime':_0x1be0e0[_0x547c1f(0x232)],'durationMs':_0x1be0e0[_0x547c1f(0x198)],'msPerChar':_0x1be0e0['duration']/_0x1b1ded};}function timeToPosition(_0xf050d0,_0x2e746d,_0x330eb4){const _0x309ec8=a51_0x22a388,_0x3cafe3=_0xf050d0-_0x2e746d[_0x309ec8(0x240)],_0x398b87=Math[_0x309ec8(0xdd)](_0x3cafe3/_0x2e746d[_0x309ec8(0x10f)]);return Math[_0x309ec8(0x170)](0x0,Math[_0x309ec8(0x13a)](_0x398b87,_0x330eb4));}function renderTimeAxis(_0x833dc2,_0x17cb8a){const _0x58cafe=a51_0x22a388,_0x4c6d9e=Math[_0x58cafe(0x13a)](TIMELINE_CONFIG[_0x58cafe(0x219)],Math[_0x58cafe(0x170)](TIMELINE_CONFIG[_0x58cafe(0x11d)],Math[_0x58cafe(0xdd)](_0x17cb8a/TIMELINE_CONFIG[_0x58cafe(0xf8)]))),_0x2896b7=_0x833dc2[_0x58cafe(0x207)]/(_0x4c6d9e-0x1),_0x3a9c8c=new Date(_0x833dc2['startTime']),_0x5964ec=[];for(let _0x2cdd58=0x0;_0x2cdd58<_0x4c6d9e;_0x2cdd58++){const _0x36ae95=_0x833dc2[_0x58cafe(0x240)]+_0x2cdd58*_0x2896b7,_0x20c2cf=timeToPosition(_0x36ae95,_0x833dc2,_0x17cb8a),_0x2a0dc2=formatTimestamp(_0x36ae95,_0x3a9c8c);_0x5964ec[_0x58cafe(0x11e)]({'pos':_0x20c2cf,'text':_0x2a0dc2});}const _0x292427=new Array(_0x17cb8a)['fill']('\x20');let _0x101a2c=-0x1;for(const {pos:_0x21ed09,text:_0x23d630}of _0x5964ec){let _0x233eb8=Math[_0x58cafe(0x170)](0x0,_0x21ed09-Math[_0x58cafe(0xdd)](_0x23d630[_0x58cafe(0x221)]/0x2));_0x233eb8<=_0x101a2c+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x233eb8=_0x101a2c+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x233eb8+_0x23d630[_0x58cafe(0x221)]>_0x17cb8a&&(_0x233eb8=_0x17cb8a-_0x23d630[_0x58cafe(0x221)]);if(_0x233eb8>=0x0&&_0x233eb8+_0x23d630['length']<=_0x17cb8a&&_0x233eb8>_0x101a2c){for(let _0x92766c=0x0;_0x92766c<_0x23d630['length'];_0x92766c++){_0x292427[_0x233eb8+_0x92766c]=_0x23d630[_0x92766c];}_0x101a2c=_0x233eb8+_0x23d630[_0x58cafe(0x221)]-0x1;}}return _0x292427['join']('');}function renderTaskRow(_0x1128de,_0x599c37,_0x3dc06b,_0x5cdd99){const _0x197ae4=a51_0x22a388,{level:_0x1085f0,name:_0x577bce}=parseTaskName(_0x1128de[_0x197ae4(0x174)]),_0x3b00d2='\x20'[_0x197ae4(0x245)](_0x1085f0),_0x471e4c=_0x1128de[_0x197ae4(0xb2)]?'('+formatElapsed(_0x1128de[_0x197ae4(0xb2)][_0x197ae4(0x198)])+')':'',_0x461c04=stringWidth(_0x471e4c),_0x163e85=_0x1085f0*0x1,_0x12d7b8=_0x5cdd99-_0x163e85-_0x461c04-0x1,_0x48db3e=truncateTaskName(_0x577bce,_0x12d7b8),_0x4da87e=_0x3b00d2+_0x48db3e,_0x4414ef=stringWidth(_0x4da87e),_0x1ce73a=_0x5cdd99-_0x4414ef-_0x461c04,_0x43a7d4=_0x4da87e+'\x20'[_0x197ae4(0x245)](Math['max'](0x1,_0x1ce73a))+a51_0x5bf18c['dim'](_0x471e4c),_0x192944=getTaskStateIcon(_0x1128de[_0x197ae4(0x210)]),_0x2fa108=new Array(_0x3dc06b)[_0x197ae4(0x113)]('\x20');if(_0x1128de[_0x197ae4(0xb2)]){const _0x25a88a=timeToPosition(_0x1128de[_0x197ae4(0xb2)]['start'],_0x599c37,_0x3dc06b),_0x458229=timeToPosition(_0x1128de[_0x197ae4(0xb2)][_0x197ae4(0x232)],_0x599c37,_0x3dc06b),_0x4b2c83=getBarChar(_0x1128de[_0x197ae4(0x210)]),_0xc585f8=Math['max'](_0x25a88a+0x1,_0x458229);for(let _0x243c73=_0x25a88a;_0x243c73<Math[_0x197ae4(0x13a)](_0xc585f8,_0x3dc06b);_0x243c73++){_0x2fa108[_0x243c73]=_0x4b2c83;}}const _0xb179ce=getBarColor(_0x1128de['state']),_0x19d77e=_0x2fa108[_0x197ae4(0x1de)](_0x432d7e=>_0x432d7e==='\x20'?'\x20':_0xb179ce(_0x432d7e))[_0x197ae4(0x192)]('');return _0x192944+'\x20'+_0x43a7d4+'│'+_0x19d77e+'│';}function calculateStats(_0x41b1cf){const _0x386e64=a51_0x22a388,_0x19d088={'total':_0x41b1cf['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x367ae1 of _0x41b1cf){if(_0x367ae1['state']===_0x386e64(0x179))_0x19d088[_0x386e64(0x179)]++;else{if(_0x367ae1[_0x386e64(0x210)]==='error'||_0x367ae1[_0x386e64(0x210)]===_0x386e64(0xc3))_0x19d088['error']++;else _0x367ae1[_0x386e64(0x210)]===_0x386e64(0x15b)?_0x19d088[_0x386e64(0x15b)]++:_0x19d088[_0x386e64(0xfd)]++;}}return _0x19d088;}function formatStats(_0x22b928){const _0x43738b=a51_0x22a388;return[_0x43738b(0x1eb)+_0x22b928[_0x43738b(0xa0)],'✅\x20'+_0x22b928[_0x43738b(0x179)],'❌\x20'+_0x22b928[_0x43738b(0xf6)],_0x43738b(0x213)+_0x22b928['running'],'⏳\x20'+_0x22b928[_0x43738b(0xfd)]][_0x43738b(0x192)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a51_0x22a388(0x174)]=a51_0x22a388(0x139);[a51_0x22a388(0x1b4)]=a51_0x22a388(0x100);async[a51_0x22a388(0xd2)](_0x5fdb59){const _0xf412ea=a51_0x22a388,{options:_0x530412,args:_0x40c661,tdx:_0x113432}=_0x5fdb59;let _0xfdbae8,_0x49e519,_0x1218c6=![];if(_0x40c661[0x0]){if(_0x40c661[0x0][_0xf412ea(0xe0)]('.')){const _0x12f5c7=this[_0xf412ea(0x227)](_0x40c661,_0x530412);if(!_0x12f5c7)return 0x1;_0xfdbae8=_0x12f5c7[_0xf412ea(0xb4)],_0x49e519=_0x12f5c7[_0xf412ea(0x1b6)];}else{_0x49e519=_0x40c661[0x0],_0xfdbae8=_0x530412['workflowProject'];if(!_0xfdbae8)return console[_0xf412ea(0xf6)](a51_0x5bf18c[_0xf412ea(0xf3)](_0xf412ea(0x1e0)),_0xf412ea(0x14e)),0x1;_0x1218c6=!![];}}else{const _0x28e7cc=this[_0xf412ea(0x227)](_0x40c661,_0x530412);if(!_0x28e7cc)return 0x1;_0xfdbae8=_0x28e7cc[_0xf412ea(0xb4)],_0x49e519=_0x28e7cc[_0xf412ea(0x1b6)];}if(_0x530412[_0xf412ea(0xde)]){if(_0xfdbae8&&_0x49e519)console[_0xf412ea(0xf6)]('Filter:\x20'+_0xfdbae8+'.'+_0x49e519);else _0xfdbae8&&console[_0xf412ea(0xf6)](_0xf412ea(0x123)+_0xfdbae8);}const _0x1bc6b7=_0x530412[_0xf412ea(0x173)],_0x4cbc63=_0x530412[_0xf412ea(0x214)];if(_0x1bc6b7){_0x4cbc63&&console[_0xf412ea(0xf6)](a51_0x5bf18c[_0xf412ea(0xfc)](_0xf412ea(0x16e)),_0xf412ea(0xc5));const _0x50132b=_0x530412[_0xf412ea(0x199)];return _0x50132b?await this[_0xf412ea(0xc7)](_0x5fdb59,_0x1bc6b7):await this[_0xf412ea(0x1b7)](_0x5fdb59,_0x1bc6b7,_0x530412),0x0;}if(_0x4cbc63){const _0x1b7101=await withSpinner(_0xf412ea(0x1f9),()=>_0x113432[_0xf412ea(0x121)][_0xf412ea(0x160)]({'projectName':_0xfdbae8,'workflowName':_0x49e519,'limit':0x64}),{'verbose':_0x530412[_0xf412ea(0xde)]}),_0x1d78cc=_0x1b7101[_0xf412ea(0x195)][_0xf412ea(0x20e)](_0x298ee6=>_0x298ee6['id']===_0x4cbc63);if(!_0x1d78cc)return console['error'](a51_0x5bf18c[_0xf412ea(0xf3)]('Error:'),'Session\x20not\x20found:\x20'+_0x4cbc63),0x1;if(!_0x1d78cc[_0xf412ea(0x225)]?.['id'])return console['error'](a51_0x5bf18c[_0xf412ea(0xf3)]('Error:'),_0xf412ea(0x1fb)+_0x4cbc63+_0xf412ea(0x110)),0x1;const _0x5eb2f6=_0x1d78cc['lastAttempt']['id'];_0x530412[_0xf412ea(0xde)]&&console[_0xf412ea(0xf6)](_0xf412ea(0x13b)+_0x5eb2f6+_0xf412ea(0x233)+_0x4cbc63);const _0x23a67a=_0x530412['follow'];return _0x23a67a?await this[_0xf412ea(0xc7)](_0x5fdb59,_0x5eb2f6):await this[_0xf412ea(0x1b7)](_0x5fdb59,_0x5eb2f6,_0x530412),0x0;}const _0x4dc11d=await withSpinner(_0xf412ea(0x18b),()=>_0x113432[_0xf412ea(0x121)]['sessions']({'projectName':_0xfdbae8,'workflowName':_0x49e519,'limit':_0x530412[_0xf412ea(0xa9)]||0x32}),{'verbose':_0x530412['verbose']}),_0x55a8b9=_0x4dc11d[_0xf412ea(0x195)];if(_0x55a8b9['length']===0x0){if(_0xfdbae8&&_0x49e519)console[_0xf412ea(0xf6)](_0xf412ea(0x177)+_0xfdbae8+'.'+_0x49e519);else _0xfdbae8?console[_0xf412ea(0xf6)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0xfdbae8):(console[_0xf412ea(0xf6)]('No\x20workflow\x20sessions\x20found'),console[_0xf412ea(0xf6)](a51_0x5bf18c[_0xf412ea(0x1b0)](_0xf412ea(0x1a0))));return 0x0;}_0x55a8b9['sort']((_0x2ab334,_0x422c27)=>{const _0x489a3e=_0xf412ea,_0x3569df=_0x2ab334[_0x489a3e(0x16a)]||'',_0x59f2af=_0x422c27[_0x489a3e(0x16a)]||'';return _0x59f2af[_0x489a3e(0xa1)](_0x3569df);});if(_0x530412[_0xf412ea(0x176)]||_0x530412['jsonl'])return await handleSDKOutput(_0x55a8b9,_0x530412),0x0;let _0x5c77c1;if(_0x1218c6){const _0x1c906e=_0x55a8b9[0x0];if(!_0x1c906e[_0xf412ea(0x225)]?.['id'])return console['error'](_0xf412ea(0xae)),0x0;_0x5c77c1=_0x1c906e[_0xf412ea(0x225)]['id'],_0x530412[_0xf412ea(0xde)]&&console['error'](_0xf412ea(0x18f)+_0x1c906e[_0xf412ea(0x16a)]);}else{const _0x2147ec=_0x55a8b9[_0xf412ea(0x1de)](_0x5b4679=>{const _0x1c46f3=_0xf412ea,_0x352be2=getAttemptStatusDisplay(_0x5b4679[_0x1c46f3(0x225)]);return{'title':_0x5b4679[_0x1c46f3(0x1fe)]?.[_0x1c46f3(0x174)]+'.'+_0x5b4679['workflow']?.['name']+'\x20-\x20'+_0x5b4679[_0x1c46f3(0x16a)]+'\x20'+_0x352be2[_0x1c46f3(0x12e)],'value':_0x5b4679[_0x1c46f3(0x225)]?.['id']||'','description':_0x352be2[_0x1c46f3(0x189)]};}),_0x2d0dab=await a51_0x4f4bd3({'type':_0xf412ea(0xff),'name':_0xf412ea(0x173),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x2147ec['filter'](_0x170b7b=>_0x170b7b[_0xf412ea(0x1cf)]!=='')});if(!_0x2d0dab[_0xf412ea(0x173)])return 0x0;_0x5c77c1=_0x2d0dab[_0xf412ea(0x173)];}const _0x2621dd=_0x530412[_0xf412ea(0x199)];return _0x2621dd?await this[_0xf412ea(0xc7)](_0x5fdb59,_0x5c77c1):await this['renderSingleTimeline'](_0x5fdb59,_0x5c77c1,_0x530412),0x0;}async[a51_0x22a388(0x1b7)](_0x5ba2f8,_0x4411ac,_0x4e928c){const _0x2496ab=a51_0x22a388,{tdx:_0x3842bd}=_0x5ba2f8;let _0x47ba86,_0x540252;try{[_0x47ba86,_0x540252]=await Promise[_0x2496ab(0x236)]([_0x3842bd['workflow'][_0x2496ab(0xfa)](_0x4411ac),_0x3842bd[_0x2496ab(0x121)][_0x2496ab(0xea)](_0x4411ac,![])]);}catch(_0x46d48d){console['error'](a51_0x5bf18c[_0x2496ab(0xf3)](_0x2496ab(0xef)));_0x4e928c[_0x2496ab(0xde)]&&console[_0x2496ab(0xf6)](_0x46d48d);throw _0x46d48d;}if(_0x4e928c['json']||_0x4e928c['jsonl']){const _0x5dc369=this['buildTimelineData'](_0x47ba86,_0x540252);await handleSDKOutput([_0x5dc369],_0x4e928c);return;}const _0x398d2d=_0x3842bd[_0x2496ab(0x24b)][_0x2496ab(0x1e3)],_0x20abcc=this[_0x2496ab(0xab)](_0x47ba86,_0x540252,_0x398d2d);console[_0x2496ab(0x204)](_0x20abcc);}async['pollTimeline'](_0x599ba9,_0x4c8fa0){const _0x2710c5=a51_0x22a388,{tdx:_0x2967fb}=_0x599ba9,_0x633545=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x4db982=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x46b5fb=0x0;while(_0x46b5fb<_0x4db982){process[_0x2710c5(0x20b)][_0x2710c5(0x1ef)]&&process['stdout'][_0x2710c5(0xbc)]('\x1bc');let _0x192b6e,_0x3043fd;try{[_0x192b6e,_0x3043fd]=await Promise['all']([_0x2967fb[_0x2710c5(0x121)][_0x2710c5(0xfa)](_0x4c8fa0),_0x2967fb[_0x2710c5(0x121)][_0x2710c5(0xea)](_0x4c8fa0,![])]);}catch(_0x449b55){console[_0x2710c5(0xf6)](a51_0x5bf18c['red'](_0x2710c5(0x1c2)));_0x46b5fb>0x0&&console[_0x2710c5(0xf6)](a51_0x5bf18c[_0x2710c5(0x1b0)](_0x2710c5(0x1a3)+_0x46b5fb));throw _0x449b55;}const _0x21189b=_0x2967fb['context']['site'],_0x164116=this[_0x2710c5(0xab)](_0x192b6e,_0x3043fd,_0x21189b);console[_0x2710c5(0x204)](_0x164116);const _0x431c36=_0x192b6e['done']&&_0x3043fd[_0x2710c5(0x108)](_0x3e7268=>_0x3e7268[_0x2710c5(0x210)]!==_0x2710c5(0x15b)&&_0x3e7268[_0x2710c5(0x210)]!==_0x2710c5(0x20a));if(_0x431c36){console[_0x2710c5(0xf6)](a51_0x5bf18c['green'](_0x2710c5(0x218)));break;}console['error'](a51_0x5bf18c[_0x2710c5(0x1b0)](_0x2710c5(0x169)+_0x46b5fb*0x2+_0x2710c5(0x1e1))),await new Promise(_0x32808d=>setTimeout(_0x32808d,_0x633545)),_0x46b5fb++;}_0x46b5fb>=_0x4db982&&console[_0x2710c5(0xf6)](a51_0x5bf18c['yellow'](_0x2710c5(0x14a)));}['renderTimeline'](_0x389b06,_0x293148,_0x300f97){const _0x41e783=a51_0x22a388,_0x404767=[],_0x428e9c=TIMELINE_CONFIG[_0x41e783(0x1ab)],_0x56930f=0x5,_0x1e7aeb=process[_0x41e783(0x20b)]['columns']||0x78,_0x58487a=_0x1e7aeb-_0x428e9c-_0x56930f,_0x437dbf=Math[_0x41e783(0x170)](TIMELINE_CONFIG[_0x41e783(0x180)],Math['min'](_0x58487a,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x41223d=new Date(_0x389b06['createdAt'])[_0x41e783(0x1dc)](),_0x223a40=_0x389b06['finishedAt']?new Date(_0x389b06['finishedAt'])[_0x41e783(0x1dc)]():Date[_0x41e783(0x23d)](),_0x40ecac={'start':_0x41223d,'end':_0x223a40,'duration':_0x223a40-_0x41223d},_0x4702db=new Map(),_0x5a1e7c=[];for(const _0x29195c of _0x293148){if(_0x29195c[_0x41e783(0x19b)]){const _0x4a8f90=new Date(_0x29195c[_0x41e783(0x19b)])['getTime'](),_0x3719dd=_0x29195c[_0x41e783(0x212)]?new Date(_0x29195c[_0x41e783(0x212)])[_0x41e783(0x1dc)]():Date[_0x41e783(0x23d)](),_0x45519d={'start':_0x4a8f90,'end':_0x3719dd,'duration':_0x3719dd-_0x4a8f90};_0x4702db[_0x41e783(0x9a)](_0x29195c['id'],_0x45519d),_0x5a1e7c[_0x41e783(0x11e)]({'name':_0x29195c[_0x41e783(0x163)],'state':_0x29195c['state']||_0x41e783(0x250),'window':_0x45519d});}else _0x5a1e7c[_0x41e783(0x11e)]({'name':_0x29195c[_0x41e783(0x163)],'state':_0x29195c[_0x41e783(0x210)]||'planned','window':undefined});}_0x5a1e7c[_0x41e783(0x248)]((_0x314cf8,_0x5ac8a6)=>{const _0x5e6741=_0x41e783;if(!_0x314cf8['window'])return 0x1;if(!_0x5ac8a6[_0x5e6741(0xb2)])return-0x1;return _0x314cf8[_0x5e6741(0xb2)]['start']-_0x5ac8a6[_0x5e6741(0xb2)][_0x5e6741(0xcb)];});const _0x47d01e=_0x5a1e7c['length'],_0x103da3=_0x47d01e>TIMELINE_CONFIG[_0x41e783(0x1a7)];_0x103da3&&_0x5a1e7c[_0x41e783(0xee)](TIMELINE_CONFIG[_0x41e783(0x1a7)]);const _0xd56400=calculateTimeScale(_0x40ecac,_0x437dbf),_0x16d7b7=_0x389b06[_0x41e783(0xe1)]?_0x389b06['success']?a51_0x5bf18c[_0x41e783(0xf7)](_0x41e783(0x179)):a51_0x5bf18c[_0x41e783(0xf3)]('error'):a51_0x5bf18c[_0x41e783(0x1ed)](_0x41e783(0x15b)),_0x352435=_0x389b06['project']?.['id'],_0x4dc04c=_0x389b06[_0x41e783(0x214)];let _0x2adc11;if(_0x352435&&_0x4dc04c){const _0x74c979=getWorkflowAttemptUrl(_0x300f97,_0x352435,_0x4dc04c,_0x389b06['id']);_0x2adc11=hyperlink(a51_0x5bf18c[_0x41e783(0x1b0)](_0x389b06['id']),_0x74c979);}else _0x2adc11=a51_0x5bf18c[_0x41e783(0x1b0)](_0x389b06['id']);_0x404767[_0x41e783(0x11e)](_0x41e783(0x1e2)+_0x2adc11+'\x20-\x20'+_0x16d7b7+'\x20-\x20'+formatElapsed(_0x40ecac[_0x41e783(0x198)]));if(_0x5a1e7c['length']>0x0){const _0x283e7f=renderTimeAxis(_0xd56400,_0x437dbf),_0x1f1934=new Date(_0x40ecac[_0x41e783(0xcb)]),_0x8f474=formatDate(_0x1f1934),_0x35475b=TIMELINE_CONFIG[_0x41e783(0x1ae)]+TIMELINE_CONFIG[_0x41e783(0x167)]+_0x428e9c,_0x374828=_0x8f474[_0x41e783(0x17d)](_0x35475b),_0x198669=a51_0x5bf18c[_0x41e783(0x1b0)](_0x374828);_0x404767[_0x41e783(0x11e)](_0x198669+'\x20'+_0x283e7f);for(const _0x508d6e of _0x5a1e7c){_0x404767['push'](renderTaskRow(_0x508d6e,_0xd56400,_0x437dbf,_0x428e9c));}const _0x30e6dc=calculateStats(_0x5a1e7c);_0x404767[_0x41e783(0x11e)](formatStats(_0x30e6dc)),_0x103da3&&_0x404767[_0x41e783(0x11e)](a51_0x5bf18c[_0x41e783(0xfc)](_0x41e783(0x13f)+TIMELINE_CONFIG[_0x41e783(0x1a7)]+_0x41e783(0xb0)+_0x47d01e+_0x41e783(0x16b))),_0x404767[_0x41e783(0x11e)](''),_0x404767[_0x41e783(0x11e)](a51_0x5bf18c[_0x41e783(0x1b0)]('💡\x20Tip:\x20Use\x20')+(_0x41e783(0x9e)+_0x389b06['id']+_0x41e783(0x155))+a51_0x5bf18c[_0x41e783(0x1b0)]('\x20to\x20see\x20detailed\x20logs'));}else _0x404767[_0x41e783(0x11e)](_0x41e783(0x1a1));return _0x404767[_0x41e783(0x192)]('\x0a');}[a51_0x22a388(0x143)](_0x4deb58,_0xabdca1){const _0x3a31bc=a51_0x22a388,_0x14f863=new Date(_0x4deb58['createdAt'])[_0x3a31bc(0x1dc)](),_0x393b96=_0x4deb58[_0x3a31bc(0x1d3)]?new Date(_0x4deb58[_0x3a31bc(0x1d3)])[_0x3a31bc(0x1dc)]():Date[_0x3a31bc(0x23d)](),_0x2d0707=_0x393b96-_0x14f863,_0x34df82=[];for(const _0x451573 of _0xabdca1){if(_0x451573[_0x3a31bc(0x19b)]){const _0x6e2d6=new Date(_0x451573[_0x3a31bc(0x19b)])['getTime'](),_0x3df4ab=_0x451573['updatedAt']?new Date(_0x451573[_0x3a31bc(0x212)])[_0x3a31bc(0x1dc)]():Date['now']();_0x34df82[_0x3a31bc(0x11e)]({'name':_0x451573[_0x3a31bc(0x163)],'state':_0x451573[_0x3a31bc(0x210)]||_0x3a31bc(0x250),'window':{'start':_0x6e2d6,'end':_0x3df4ab,'duration':_0x3df4ab-_0x6e2d6}});}else _0x34df82[_0x3a31bc(0x11e)]({'name':_0x451573[_0x3a31bc(0x163)],'state':_0x451573[_0x3a31bc(0x210)]||'planned','window':undefined});}const _0x215478=calculateStats(_0x34df82);return{'attempt':{'id':_0x4deb58['id'],'status':_0x4deb58[_0x3a31bc(0xe1)]?_0x4deb58[_0x3a31bc(0x179)]?'success':'error':'running','createdAt':_0x4deb58[_0x3a31bc(0x151)],'finishedAt':_0x4deb58['finishedAt'],'duration_ms':_0x2d0707},'tasks':_0x34df82[_0x3a31bc(0x1de)](_0x3ef098=>({'name':_0x3ef098[_0x3a31bc(0x174)],'state':_0x3ef098[_0x3a31bc(0x210)],'startedAt':_0x3ef098['window']?new Date(_0x3ef098[_0x3a31bc(0xb2)][_0x3a31bc(0xcb)])[_0x3a31bc(0x1f8)]():null,'updatedAt':_0x3ef098[_0x3a31bc(0xb2)]?new Date(_0x3ef098[_0x3a31bc(0xb2)]['end'])[_0x3a31bc(0x1f8)]():null,'duration_ms':_0x3ef098[_0x3a31bc(0xb2)]?.[_0x3a31bc(0x198)]||null})),'stats':_0x215478};}}
|
|
1
|
+
const a52_0xa13f07=a52_0x5468;function a52_0x5468(_0x241ac2,_0x350a62){_0x241ac2=_0x241ac2-0x7c;const _0x2d2f2a=a52_0x2d2f();let _0x5468ba=_0x2d2f2a[_0x241ac2];return _0x5468ba;}(function(_0x297f4a,_0x32eda9){const _0x28faff=a52_0x5468,_0x6b02f3=_0x297f4a();while(!![]){try{const _0x1e9956=-parseInt(_0x28faff(0x1f8))/0x1+-parseInt(_0x28faff(0x183))/0x2+-parseInt(_0x28faff(0x18c))/0x3*(parseInt(_0x28faff(0x205))/0x4)+-parseInt(_0x28faff(0x185))/0x5+-parseInt(_0x28faff(0x216))/0x6*(parseInt(_0x28faff(0x18e))/0x7)+-parseInt(_0x28faff(0x167))/0x8*(parseInt(_0x28faff(0xb4))/0x9)+parseInt(_0x28faff(0x15b))/0xa*(parseInt(_0x28faff(0x22e))/0xb);if(_0x1e9956===_0x32eda9)break;else _0x6b02f3['push'](_0x6b02f3['shift']());}catch(_0x1eb7cd){_0x6b02f3['push'](_0x6b02f3['shift']());}}}(a52_0x2d2f,0x2bb38));import a52_0x89d45 from'chalk';import{existsSync}from'fs';import a52_0x2ac51d 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 a52_0x4bedff from'prompts';function getAttemptStatusDisplay(_0x40898){const _0x549dce=a52_0x5468;if(!_0x40898)return{'icon':'⏳','text':''};const {done:_0x275342,success:_0x547b5f,cancelRequested:_0x25f834}=_0x40898;if(!_0x275342)return _0x25f834?{'icon':'🛑','text':a52_0x89d45[_0x549dce(0xd4)]('canceling')}:{'icon':'🔄','text':a52_0x89d45[_0x549dce(0xd2)]('running')};if(_0x547b5f)return{'icon':'✅','text':a52_0x89d45[_0x549dce(0x118)]('success')};return{'icon':'❌','text':a52_0x89d45[_0x549dce(0xb3)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a52_0xa13f07(0x174)](_0x4df023,_0x246ba9,_0x20a808=0x0){return _0x4df023[_0x20a808]||_0x246ba9['workflowProject'];}['requireProject'](_0x29a648,_0x5c8bd6,_0x544e24=0x0){const _0x489b5b=a52_0xa13f07,_0x589fea=this[_0x489b5b(0x174)](_0x29a648,_0x5c8bd6,_0x544e24);if(!_0x589fea)return console[_0x489b5b(0xa9)](a52_0x89d45[_0x489b5b(0xb3)](_0x489b5b(0x1a0)),_0x489b5b(0x161)),console[_0x489b5b(0xa9)](a52_0x89d45[_0x489b5b(0x20e)](_0x489b5b(0xbc))),null;return _0x589fea;}[a52_0xa13f07(0x1ab)](_0x493c73,_0x3777ee){const _0x3e579f=a52_0xa13f07;if(_0x493c73[0x0]){const _0x24455f=_0x493c73[0x0][_0x3e579f(0xdd)]('.');if(_0x24455f['length']===0x1)return{'projectName':_0x24455f[0x0],'workflowName':undefined};else return _0x24455f[_0x3e579f(0x86)]===0x2?{'projectName':_0x24455f[0x0],'workflowName':_0x24455f[0x1]}:(console[_0x3e579f(0xa9)](a52_0x89d45[_0x3e579f(0xb3)](_0x3e579f(0x1a0)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x3777ee[_0x3e579f(0x125)],'workflowName':undefined};}['resolveProjectDir'](_0x1fa97d,_0x40c8d0,_0x1ed02a=0x0){const _0x4996ff=a52_0xa13f07;if(_0x1fa97d[_0x1ed02a])return _0x1fa97d[_0x1ed02a];if(_0x40c8d0[_0x4996ff(0x125)]){const _0x39087a=a52_0x2ac51d[_0x4996ff(0x11c)](process[_0x4996ff(0xb9)](),_0x4996ff(0xec),_0x40c8d0['workflowProject']);if(existsSync(a52_0x2ac51d[_0x4996ff(0x11c)](_0x39087a,'tdx.json')))return _0x39087a;}return undefined;}async[a52_0xa13f07(0x1c2)](_0x115eac,_0x6caaa2,_0x27a977){const _0x8155eb=a52_0xa13f07;try{const _0x44f43a=await _0x115eac[_0x8155eb(0xfc)][_0x8155eb(0xec)](_0x6caaa2,{'limit':0x1});if(_0x44f43a['length']>0x0){const _0xc1959c=_0x44f43a[0x0]['id'],_0x508a62=getWorkflowUrl(_0x27a977,_0xc1959c);console[_0x8155eb(0xa9)](_0x8155eb(0x210)+a52_0x89d45[_0x8155eb(0x184)](_0x508a62));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a52_0xa13f07(0xb7);[a52_0xa13f07(0x122)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async['execute'](_0x13017c){const _0x13aa48=a52_0xa13f07,{options:_0x1390bb,args:_0x463002,tdx:_0x1dfeb6}=_0x13017c,_0x5a6a64=_0x463002[0x0],_0x52dca9=_0x1390bb[_0x13aa48(0xd0)];if(_0x52dca9)return saveSessionContext({'workflow_project':undefined},_0x1390bb[_0x13aa48(0x17e)]),console['log'](a52_0x89d45[_0x13aa48(0x118)](_0x13aa48(0x81))),0x0;if(!_0x5a6a64)return console[_0x13aa48(0xa9)](a52_0x89d45[_0x13aa48(0xb3)](_0x13aa48(0x1a0)),'Project\x20name\x20is\x20required'),console['error'](a52_0x89d45[_0x13aa48(0x20e)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x13aa48(0xa9)](a52_0x89d45['dim'](_0x13aa48(0xca))),0x1;const _0x2a4aa7=await withSpinner(_0x13aa48(0x22b)+_0x5a6a64+_0x13aa48(0x140),()=>_0x1dfeb6[_0x13aa48(0xfc)][_0x13aa48(0x19e)](_0x5a6a64),{'verbose':_0x1390bb[_0x13aa48(0x1e3)]}),{name:_0x2ee133}=_0x2a4aa7['data'];return saveSessionContext({'workflow_project':_0x2ee133},_0x1390bb['session']),console['log'](a52_0x89d45[_0x13aa48(0x118)](_0x13aa48(0x156)+a52_0x89d45[_0x13aa48(0x184)](_0x2ee133))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a52_0xa13f07(0x20d)]='workflow:projects';['description']='List\x20all\x20workflow\x20projects';async[a52_0xa13f07(0x22f)](_0x1b68bc){const _0x362824=a52_0xa13f07,{options:_0x2c2397,args:_0x472e91,tdx:_0x55030b}=_0x1b68bc,_0x3c18b5=_0x472e91[0x0];_0x2c2397[_0x362824(0x1e3)]&&_0x3c18b5&&console[_0x362824(0xa9)](_0x362824(0x11a)+_0x3c18b5);const _0x530e6e=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x55030b[_0x362824(0xfc)][_0x362824(0x201)](_0x3c18b5,{'limit':_0x2c2397[_0x362824(0x91)]}),{'verbose':_0x2c2397[_0x362824(0x1e3)]});let _0x52c282=_0x530e6e['data'];_0x52c282['sort']((_0x326bb6,_0x15c9e3)=>_0x326bb6[_0x362824(0x20d)]['localeCompare'](_0x15c9e3[_0x362824(0x20d)]));const _0x79033a=_0x2c2397[_0x362824(0x91)]||0x64,_0x1ec00b=_0x52c282[_0x362824(0x86)]>=_0x79033a?a52_0x89d45[_0x362824(0x20e)](_0x362824(0x1a5)):'';console[_0x362824(0xa9)](_0x362824(0x8a)+_0x52c282[_0x362824(0x86)]+_0x362824(0xe8)+(_0x52c282[_0x362824(0x86)]!==0x1?'s':'')+_0x1ec00b);if(_0x2c2397[_0x362824(0x99)]===_0x362824(0xd5)||_0x2c2397['format']==='jsonl'||_0x2c2397[_0x362824(0x99)]==='table')await handleSDKOutput(_0x52c282,_0x2c2397);else{if(_0x52c282[_0x362824(0x86)]===0x0)_0x3c18b5?console[_0x362824(0x1b2)](_0x362824(0xa2)+_0x3c18b5):console[_0x362824(0x1b2)](_0x362824(0xba));else{const _0x866c93=_0x52c282[_0x362824(0xd7)](_0x10722c=>{const _0x65463a=_0x362824,_0x3e16a9=_0x10722c[_0x65463a(0x113)]?.[_0x65463a(0x1f5)](_0x44ba0d=>_0x44ba0d[_0x65463a(0x176)]===_0x65463a(0x144)),_0x662d7b=_0x3e16a9?a52_0x89d45['dim'](_0x65463a(0x102)):'';return'📁\x20'+_0x10722c[_0x65463a(0x20d)]+_0x662d7b;});await writeOutput(_0x866c93[_0x362824(0x11c)]('\x0a'),_0x2c2397[_0x362824(0x20b)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a52_0xa13f07(0xd3);['description']='List\x20workflows';async['execute'](_0x193656){const _0x2ca701=a52_0xa13f07,{options:_0x1e8700,args:_0x417b15,tdx:_0x24641d}=_0x193656,_0x428e14=this[_0x2ca701(0x174)](_0x417b15,_0x1e8700);_0x1e8700[_0x2ca701(0x1e3)]&&_0x428e14&&console['error'](_0x2ca701(0x1a9)+_0x428e14);const _0x5648c1=await withSpinner(_0x2ca701(0x8b),()=>_0x24641d['workflow']['workflows'](_0x428e14,{'limit':_0x1e8700[_0x2ca701(0x91)]}),{'verbose':_0x1e8700[_0x2ca701(0x1e3)]});let _0x2cb9df=_0x5648c1[_0x2ca701(0x14b)];_0x2cb9df[_0x2ca701(0xc7)]((_0x249dcb,_0x2c18c6)=>{const _0x360f67=_0x2ca701,_0x48cfb7=_0x249dcb['name']['localeCompare'](_0x2c18c6[_0x360f67(0x20d)]);if(_0x48cfb7!==0x0)return _0x48cfb7;return(_0x249dcb[_0x360f67(0x1af)]?.['name']||'')['localeCompare'](_0x2c18c6[_0x360f67(0x1af)]?.[_0x360f67(0x20d)]||'');});const _0x3db498=_0x1e8700[_0x2ca701(0x91)]||0x64,_0x49e5c5=_0x2cb9df['length']>=_0x3db498?a52_0x89d45[_0x2ca701(0x20e)](_0x2ca701(0x1a5)):'';console[_0x2ca701(0xa9)](_0x2ca701(0x8a)+_0x2cb9df[_0x2ca701(0x86)]+_0x2ca701(0x84)+(_0x2cb9df[_0x2ca701(0x86)]!==0x1?'s':'')+_0x49e5c5);if(_0x1e8700[_0x2ca701(0x99)]===_0x2ca701(0xd5)||_0x1e8700[_0x2ca701(0x99)]===_0x2ca701(0x175)||_0x1e8700[_0x2ca701(0x99)]===_0x2ca701(0xc3))await handleSDKOutput(_0x2cb9df,_0x1e8700);else{if(_0x2cb9df[_0x2ca701(0x86)]===0x0)_0x428e14?console[_0x2ca701(0x1b2)](_0x2ca701(0x130)+_0x428e14):console['log'](_0x2ca701(0xf0));else{const _0x2639e4=_0x1e8700['site'],_0x337cc1=_0x2cb9df[_0x2ca701(0xd7)](_0x3a1ffc=>{const _0x440694=_0x2ca701,_0x2a8683=a52_0x89d45['dim']('#'+_0x3a1ffc['id']),_0x3cc2bb=hyperlink(_0x2a8683,getWorkflowUrl(_0x2639e4,_0x3a1ffc['id'])),_0x42602e=_0x3a1ffc[_0x440694(0x1af)]?.[_0x440694(0x20d)]?a52_0x89d45[_0x440694(0x20e)]('\x20('+_0x3a1ffc[_0x440694(0x1af)][_0x440694(0x20d)]+')'):'';return _0x440694(0x1f0)+_0x3cc2bb+'\x20'+_0x3a1ffc[_0x440694(0x20d)]+_0x42602e;});await writeOutput(_0x337cc1[_0x2ca701(0x11c)]('\x0a'),_0x1e8700[_0x2ca701(0x20b)],_0x2ca701(0xc0));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x8d);['description']='List\x20workflow\x20execution\x20sessions';async[a52_0xa13f07(0x22f)](_0x2edfd4){const _0x5ea514=a52_0xa13f07,{options:_0x5766ab,args:_0x43d26f,tdx:_0x1a57ac}=_0x2edfd4,_0x86efe9=this['parseProjectWorkflowPattern'](_0x43d26f,_0x5766ab);if(!_0x86efe9)return 0x1;const {projectName:_0x3feb22,workflowName:_0x34c354}=_0x86efe9;if(_0x5766ab[_0x5ea514(0x1e3)]){if(_0x3feb22&&_0x34c354)console[_0x5ea514(0xa9)]('Filter:\x20'+_0x3feb22+'.'+_0x34c354);else _0x3feb22&&console[_0x5ea514(0xa9)]('Filter:\x20project='+_0x3feb22);const _0x430420=_0x5766ab['status'];_0x430420&&console['error']('Status:\x20'+_0x430420);}let _0x42e4f3=0x28;if(process['stdout']['isTTY']&&!_0x5766ab[_0x5ea514(0x20b)]&&!_0x5766ab['format']){const _0x5c900d=process['stdout']['rows']||0x28;_0x42e4f3=Math[_0x5ea514(0x1fa)](0x14,Math['floor'](_0x5c900d*0x2/0x3));}const _0x5d11f2=_0x5766ab[_0x5ea514(0x91)]||_0x42e4f3,_0x3501fe=await withSpinner(_0x5ea514(0x111),()=>_0x1a57ac['workflow'][_0x5ea514(0xa3)]({'projectName':_0x3feb22,'workflowName':_0x34c354,'status':_0x5766ab['status'],'fromTime':_0x5766ab[_0x5ea514(0x92)],'toTime':_0x5766ab['to'],'limit':_0x5d11f2}),{'verbose':_0x5766ab[_0x5ea514(0x1e3)]}),_0x29cc2e=_0x3501fe[_0x5ea514(0x14b)];_0x29cc2e[_0x5ea514(0xc7)]((_0x58e8a6,_0x3994bf)=>{const _0x1f756c=_0x5ea514,_0x596a78=_0x58e8a6[_0x1f756c(0xa6)]||'',_0x5b63d2=_0x3994bf['sessionTime']||'';return _0x5b63d2[_0x1f756c(0x177)](_0x596a78);});_0x29cc2e[_0x5ea514(0x86)]>=_0x5d11f2?console[_0x5ea514(0xa9)](_0x5ea514(0x203)+_0x29cc2e[_0x5ea514(0x86)]+_0x5ea514(0x12f)+a52_0x89d45[_0x5ea514(0x20e)](_0x5ea514(0x181))):console[_0x5ea514(0xa9)]('✔\x20Found\x20'+_0x29cc2e[_0x5ea514(0x86)]+'\x20session'+(_0x29cc2e['length']!==0x1?'s':''));if(_0x5766ab[_0x5ea514(0x99)]===_0x5ea514(0xd5)||_0x5766ab[_0x5ea514(0x99)]===_0x5ea514(0x175)||_0x5766ab['format']===_0x5ea514(0xc3))await handleSDKOutput(_0x29cc2e,_0x5766ab);else{if(!process['stdout'][_0x5ea514(0xfa)]||_0x5766ab[_0x5ea514(0x20b)]){if(_0x29cc2e[_0x5ea514(0x86)]===0x0){if(_0x3feb22&&_0x34c354)console[_0x5ea514(0x1b2)]('No\x20sessions\x20found\x20for:\x20'+_0x3feb22+'.'+_0x34c354);else _0x3feb22?console[_0x5ea514(0x1b2)](_0x5ea514(0x189)+_0x3feb22):console['log'](_0x5ea514(0xa1));}else{const _0x310229=_0x5766ab[_0x5ea514(0x179)],_0x5ee615=this['renderSessionsTimeline'](_0x29cc2e,_0x310229);_0x5766ab[_0x5ea514(0x20b)]?await writeOutput(_0x5ee615,_0x5766ab[_0x5ea514(0x20b)],'list'):console['log'](_0x5ee615);}!_0x3feb22&&(console[_0x5ea514(0xa9)](''),console[_0x5ea514(0xa9)](a52_0x89d45[_0x5ea514(0x20e)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x5ea514(0xa9)](a52_0x89d45['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a52_0x89d45[_0x5ea514(0x20e)](_0x5ea514(0x104))));}else{if(_0x29cc2e[_0x5ea514(0x86)]===0x0){if(_0x3feb22&&_0x34c354)console[_0x5ea514(0x1b2)](_0x5ea514(0x131)+_0x3feb22+'.'+_0x34c354);else _0x3feb22?console[_0x5ea514(0x1b2)](_0x5ea514(0x189)+_0x3feb22):console['log'](_0x5ea514(0xa1));}else await this[_0x5ea514(0x87)](_0x29cc2e,_0x2edfd4,_0x3feb22);}}return 0x0;}[a52_0xa13f07(0x1ae)](_0x162d46,_0x52bf64){const _0x45125d=a52_0xa13f07,_0x3c1be3=[],_0x1883ea=new Map();let _0x55ac56=Infinity,_0x261f6b=-Infinity;for(const _0x4f335d of _0x162d46){if(_0x4f335d[_0x45125d(0xce)]?.[_0x45125d(0x85)]){const _0x3b69f4=new Date(_0x4f335d[_0x45125d(0xce)][_0x45125d(0x85)])[_0x45125d(0xe0)](),_0x22263d=_0x4f335d[_0x45125d(0xce)][_0x45125d(0x18a)]?new Date(_0x4f335d[_0x45125d(0xce)][_0x45125d(0x18a)])[_0x45125d(0xe0)]():Date[_0x45125d(0x13d)](),_0x5f30a0=_0x4f335d[_0x45125d(0x1af)]?.['name']||_0x45125d(0x106);!_0x1883ea['has'](_0x5f30a0)&&_0x1883ea[_0x45125d(0x16d)](_0x5f30a0,[]),_0x1883ea[_0x45125d(0x19c)](_0x5f30a0)['push']({'session':_0x4f335d,'startTime':_0x3b69f4,'endTime':_0x22263d,'duration':_0x22263d-_0x3b69f4}),_0x55ac56=Math[_0x45125d(0x190)](_0x55ac56,_0x3b69f4),_0x261f6b=Math[_0x45125d(0x1fa)](_0x261f6b,_0x22263d);}}if(_0x1883ea[_0x45125d(0x215)]===0x0)return _0x45125d(0x1cf);const _0x10b737=process['stdout'][_0x45125d(0x1bb)]||0x78,_0x36e0a6=0x1e,_0x10f4cc=0x32,_0xd7b06=0x4,_0x2b62c5=Math[_0x45125d(0x190)](_0x10f4cc,Math[_0x45125d(0x1fa)](_0x36e0a6,Math[_0x45125d(0x21a)](_0x10b737*0.3))),_0x13aa06=_0x10b737-_0x2b62c5-TIMELINE_CONFIG[_0x45125d(0x142)]-0x3-_0xd7b06,_0x407ce0=_0x261f6b-_0x55ac56,_0x3f5786=_0x407ce0/_0x2b62c5,_0x578d73=renderTimeAxis({'startTime':_0x55ac56,'endTime':_0x261f6b,'durationMs':_0x407ce0,'msPerChar':_0x3f5786},_0x2b62c5),_0x5d2eb4=[];for(const _0x1b8df6 of _0x1883ea['values']()){_0x5d2eb4['push'](..._0x1b8df6);}_0x5d2eb4[_0x45125d(0xc7)]((_0xe6028,_0x4979a3)=>_0x4979a3['startTime']-_0xe6028[_0x45125d(0x1a1)]);const _0x556d54=new Date(_0x55ac56),_0x2ea49a=formatDate(_0x556d54),_0x3ed2e9=_0xd7b06+TIMELINE_CONFIG[_0x45125d(0x1c1)]+TIMELINE_CONFIG[_0x45125d(0x13f)]+_0x13aa06,_0x280f39='\x20'[_0x45125d(0xb5)](_0x3ed2e9-_0x2ea49a[_0x45125d(0x86)]),_0x4f65e5=_0x280f39+a52_0x89d45[_0x45125d(0x20e)](_0x2ea49a)+'\x20'+_0x578d73;_0x3c1be3[_0x45125d(0xdc)](_0x4f65e5);const _0xa5231c=0x16;let _0x2b2729=0x0;for(const _0x2992d5 of _0x5d2eb4){const _0x410bcb=_0x2992d5[_0x45125d(0x17e)][_0x45125d(0x1af)]?.[_0x45125d(0x20d)]||'?',_0x23f32a=Math[_0x45125d(0x190)](stringWidth(_0x410bcb),_0xa5231c);_0x2b2729=Math[_0x45125d(0x1fa)](_0x2b2729,_0x23f32a);}for(const _0x586232 of _0x5d2eb4){const {session:_0x369e57,startTime:_0x4cbc77,endTime:_0x2b727d,duration:_0x558336}=_0x586232,_0x24a074=_0x369e57['project']?.['id'],_0x5c2565=_0x369e57['id'],_0x4050da=_0x369e57['project']?.[_0x45125d(0x20d)]||'?',_0x14d106=_0x369e57[_0x45125d(0xfc)]?.[_0x45125d(0x20d)]||'?';let _0x495a3e,_0x5a7e72;if(_0x369e57['lastAttempt']){const _0x49fa63=_0x369e57[_0x45125d(0xce)];!_0x49fa63['done']?(_0x495a3e=_0x49fa63[_0x45125d(0x1b0)]?'🛑':'🔄',_0x5a7e72=_0x49fa63[_0x45125d(0x1b0)]?a52_0x89d45[_0x45125d(0xd4)]:a52_0x89d45[_0x45125d(0xd2)]):(_0x495a3e=_0x49fa63[_0x45125d(0x1ba)]?'✅':'❌',_0x5a7e72=_0x49fa63['success']?a52_0x89d45[_0x45125d(0x118)]:a52_0x89d45['red']);}else _0x495a3e='⏳',_0x5a7e72=a52_0x89d45[_0x45125d(0x20e)];const _0x126a23='#'+_0x5c2565,_0x4aabd8=_0x24a074?hyperlink(_0x126a23,getWorkflowSessionUrl(_0x52bf64,_0x24a074,_0x5c2565)):_0x126a23;let _0x270c51=_0x4050da;stringWidth(_0x4050da)>_0xa5231c&&(_0x270c51=_0x4050da['slice'](0x0,_0xa5231c-0x1)+'…');const _0x45caf2=a52_0x89d45['dim'](_0x270c51),_0x5e80db=stringWidth(_0x270c51),_0x2e737a='\x20'[_0x45125d(0xb5)](_0x2b2729-stringWidth(_0x270c51)+0x2),_0x399255='('+formatElapsed(_0x558336)+')',_0x5c55a7=stringWidth(_0x399255),_0x1bcbda=stringWidth(_0x126a23),_0x103202=_0x1bcbda+0x1+_0x5e80db+_0x2e737a[_0x45125d(0x86)],_0x24882b=_0x13aa06-_0x103202-_0x5c55a7-0x1-0x8;let _0x3e3bba=_0x14d106;stringWidth(_0x3e3bba)>_0x24882b&&(_0x3e3bba=_0x3e3bba['slice'](0x0,_0x24882b-0x1)+'…');const _0x5e63f2=_0x4aabd8+'\x20'+_0x45caf2+_0x2e737a+_0x3e3bba,_0x5aa760=stringWidth(_0x5e63f2),_0x31717f=_0x13aa06-_0x5aa760-_0x5c55a7,_0x1bf182=_0x5e63f2+'\x20'[_0x45125d(0xb5)](Math[_0x45125d(0x1fa)](0x1,_0x31717f))+a52_0x89d45[_0x45125d(0x20e)](_0x399255),_0x20924c=Math['floor']((_0x4cbc77-_0x55ac56)/_0x3f5786),_0x5e5b5c=Math[_0x45125d(0x21a)]((_0x2b727d-_0x55ac56)/_0x3f5786),_0x27131a=Math[_0x45125d(0x1fa)](_0x20924c+0x1,_0x5e5b5c),_0x5931d4=new Array(_0x2b62c5)[_0x45125d(0x16f)]('\x20');for(let _0x2ec5da=_0x20924c;_0x2ec5da<Math[_0x45125d(0x190)](_0x27131a,_0x2b62c5);_0x2ec5da++){_0x5931d4[_0x2ec5da]='─';}const _0x5a5de9=_0x5931d4['map'](_0x1a4ce1=>_0x1a4ce1==='\x20'?'\x20':_0x5a7e72(_0x1a4ce1))['join']('');_0x3c1be3['push'](_0x495a3e+'\x20'+_0x1bf182+'│'+_0x5a5de9+'│');}return _0x3c1be3['join']('\x0a');}async[a52_0xa13f07(0x87)](_0x2d2f4c,_0x559f08,_0x3357c1){const _0x11d2ed=a52_0xa13f07,{options:_0x1750ea,tdx:_0x517f3c}=_0x559f08,_0x4ea279=_0x1750ea[_0x11d2ed(0x179)],{timelineRows:_0x27eed6,timeAxisHeader:_0x20b2df}=this['generateSessionTimelineRows'](_0x2d2f4c,_0x4ea279),_0x5088dd=_0x27eed6[_0x11d2ed(0x80)](_0xb4890f=>_0xb4890f[_0x11d2ed(0x10b)]);if(_0x5088dd[_0x11d2ed(0x86)]===0x0){const _0x59d880=this[_0x11d2ed(0x1ae)](_0x2d2f4c,_0x4ea279);console[_0x11d2ed(0x1b2)](_0x59d880);!_0x3357c1&&(console[_0x11d2ed(0xa9)](''),console[_0x11d2ed(0xa9)](a52_0x89d45[_0x11d2ed(0x20e)](_0x11d2ed(0xef))),console[_0x11d2ed(0xa9)](a52_0x89d45[_0x11d2ed(0x20e)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a52_0x89d45[_0x11d2ed(0x20e)](_0x11d2ed(0x104))));return;}_0x20b2df&&console[_0x11d2ed(0x1b2)](_0x20b2df);const _0x3706b8=_0x27eed6[_0x11d2ed(0x80)](_0x44142a=>_0x44142a[_0x11d2ed(0x10b)])[_0x11d2ed(0xd7)](_0x4285bf=>({'title':_0x4285bf[_0x11d2ed(0x1c3)],'value':_0x4285bf[_0x11d2ed(0x10b)]})),_0x358ace=process[_0x11d2ed(0x15c)][_0x11d2ed(0x15f)]||0x3c,_0x208237=Math[_0x11d2ed(0x1fa)](0x28,Math[_0x11d2ed(0x21a)](_0x358ace*0x2/0x3)),_0x22c51c=await a52_0x4bedff({'type':'autocomplete','name':_0x11d2ed(0x10b),'message':_0x11d2ed(0x226),'choices':_0x3706b8,'initial':-0x1,'limit':_0x208237,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x1946b0,_0x37cf75)=>{const _0x398b62=_0x11d2ed;if(!_0x1946b0)return Promise['resolve'](_0x37cf75);const _0x3d802e=_0x37cf75[_0x398b62(0x80)](_0x1cbd69=>{const _0x930504=_0x398b62,_0x472b2e=_0x1cbd69;return _0x472b2e[_0x930504(0xcc)][_0x930504(0x116)]()[_0x930504(0x1bd)](_0x1946b0[_0x930504(0x116)]());});return Promise[_0x398b62(0x187)](_0x3d802e);}}),_0x13cff5=()=>{const _0x31f681=_0x11d2ed;process['stdout'][_0x31f681(0x129)](_0x31f681(0x229)),process['stdout'][_0x31f681(0x129)](_0x31f681(0x229)),process[_0x31f681(0x15c)][_0x31f681(0x129)](_0x31f681(0x229));},_0x1aacc3=_0x22c51c&&_0x22c51c['attemptId']&&_0x22c51c['attemptId']!==null&&_0x22c51c[_0x11d2ed(0x10b)][_0x11d2ed(0x1b6)]()!=='';if(!_0x1aacc3){_0x13cff5(),console[_0x11d2ed(0x1b2)](a52_0x89d45[_0x11d2ed(0x20e)](_0x11d2ed(0xeb)));return;}_0x13cff5();const _0x49c550=_0x2d2f4c[_0x11d2ed(0x100)](_0x22e31b=>_0x22e31b[_0x11d2ed(0xce)]?.['id']===_0x22c51c[_0x11d2ed(0x10b)]);if(_0x49c550){const _0x42bfdb=_0x49c550[_0x11d2ed(0x1af)]?.[_0x11d2ed(0x20d)]||'?',_0x3d4572=_0x49c550[_0x11d2ed(0xfc)]?.[_0x11d2ed(0x20d)]||'?';console[_0x11d2ed(0x1b2)](_0x11d2ed(0xaa)+a52_0x89d45[_0x11d2ed(0x20e)](_0x42bfdb)+',\x20Workflow:\x20'+a52_0x89d45[_0x11d2ed(0x20e)](_0x3d4572));}const _0x4a20b0=new WorkflowTimelineCommand();await _0x4a20b0['execute']({'args':[],'options':{..._0x1750ea,'attemptId':_0x22c51c[_0x11d2ed(0x10b)]},'tdx':_0x517f3c});}[a52_0xa13f07(0x101)](_0x543e64,_0xa3dd3f){const _0x27a47d=a52_0xa13f07,_0x3aa6ac=new Map();for(const _0x5c2f01 of _0x543e64){_0x5c2f01['id']&&_0x5c2f01[_0x27a47d(0xce)]?.['id']&&_0x3aa6ac[_0x27a47d(0x16d)](_0x5c2f01['id'],_0x5c2f01[_0x27a47d(0xce)]['id']);}const _0x3bb551=[];let _0x3eef7b='';const _0x3819f4=this[_0x27a47d(0x1ae)](_0x543e64,_0xa3dd3f),_0x4203c4=_0x3819f4[_0x27a47d(0xdd)]('\x0a');for(const _0x3cfeb0 of _0x4203c4){if(_0x3cfeb0['startsWith']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x3cfeb0[_0x27a47d(0x1bc)](/^\s+\d{4}-\d{2}-\d{2}/))_0x3eef7b=_0x3cfeb0;else{if(_0x3cfeb0[_0x27a47d(0x1bc)](/^[✅❌🔄🛑⏳]/)){const _0x557342=_0x3cfeb0[_0x27a47d(0x1bc)](/#(\d+)/),_0x22422a=_0x557342?_0x557342[0x1]:null,_0xe8a089=_0x22422a?_0x3aa6ac[_0x27a47d(0x19c)](_0x22422a)||null:null,_0x5bad2a=_0x543e64[_0x27a47d(0x100)](_0x1037c3=>_0x1037c3['id']===_0x22422a),_0x2ecd59=_0x5bad2a?.['project']?.[_0x27a47d(0x20d)]||'';_0x3bb551[_0x27a47d(0xdc)]({'displayLine':_0x3cfeb0,'attemptId':_0xe8a089,'projectName':_0x2ecd59});}}}return{'timelineRows':_0x3bb551,'timeAxisHeader':_0x3eef7b};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x19f);[a52_0xa13f07(0x122)]=a52_0xa13f07(0x138);async[a52_0xa13f07(0x22f)](_0x30d23d){const _0x21df52=a52_0xa13f07,{options:_0x390eeb,args:_0x55bdd5,tdx:_0x1bf5ec}=_0x30d23d,_0x1ab403=this[_0x21df52(0x1ab)](_0x55bdd5,_0x390eeb);if(!_0x1ab403)return 0x1;const {projectName:_0x31a158,workflowName:_0x415d27}=_0x1ab403,_0x320164=_0x390eeb['includeRetried'];if(_0x390eeb['verbose']){if(_0x31a158&&_0x415d27)console[_0x21df52(0xa9)]('Filter:\x20'+_0x31a158+'.'+_0x415d27);else _0x31a158&&console[_0x21df52(0xa9)](_0x21df52(0x1b9)+_0x31a158);_0x320164&&console[_0x21df52(0xa9)](_0x21df52(0x1e0));}const _0x4c3e93=await withSpinner(_0x21df52(0x1e6),()=>_0x1bf5ec[_0x21df52(0xfc)]['attempts']({'projectName':_0x31a158,'workflowName':_0x415d27,'includeRetried':_0x320164,'limit':_0x390eeb[_0x21df52(0x91)]}),{'verbose':_0x390eeb[_0x21df52(0x1e3)]}),_0x423bad=_0x4c3e93[_0x21df52(0x14b)],_0x459ff8=_0x390eeb[_0x21df52(0x91)]||0x64,_0x406c30=_0x423bad['length']>=_0x459ff8?a52_0x89d45[_0x21df52(0x20e)](_0x21df52(0x1a5)):'';console[_0x21df52(0xa9)](_0x21df52(0x8a)+_0x423bad['length']+'\x20attempt'+(_0x423bad[_0x21df52(0x86)]!==0x1?'s':'')+_0x406c30);if(_0x390eeb['format']===_0x21df52(0xd5)||_0x390eeb[_0x21df52(0x99)]===_0x21df52(0x175)||_0x390eeb[_0x21df52(0x99)]===_0x21df52(0xc3))await handleSDKOutput(_0x423bad,_0x390eeb);else{if(_0x423bad[_0x21df52(0x86)]===0x0){if(_0x31a158&&_0x415d27)console['log'](_0x21df52(0x16e)+_0x31a158+'.'+_0x415d27);else _0x31a158?console[_0x21df52(0x1b2)](_0x21df52(0x136)+_0x31a158):console['log'](_0x21df52(0x199));}else{const _0x30996c=_0x390eeb[_0x21df52(0x179)],_0x144c67=_0x423bad['map'](_0x489746=>{const _0x2392a0=_0x21df52,_0x521b21=a52_0x89d45[_0x2392a0(0x20e)]('#'+_0x489746['id']),_0x34583b=_0x489746[_0x2392a0(0x1af)]?.['id'],_0x1026ff=_0x489746['session_id']||_0x489746[_0x2392a0(0xc8)],_0x283521=_0x34583b&&_0x1026ff?hyperlink(_0x521b21,getWorkflowAttemptUrl(_0x30996c,_0x34583b,_0x1026ff,_0x489746['id'])):_0x521b21,{icon:_0xe74b15,text:_0x328b25}=getAttemptStatusDisplay(_0x489746),_0x47f3e1=(_0x489746['project']?.[_0x2392a0(0x20d)]||'?')+'.'+(_0x489746['workflow']?.['name']||'?'),_0x14a182=_0x489746[_0x2392a0(0xa6)]?a52_0x89d45[_0x2392a0(0x20e)](_0x489746['sessionTime']):'';return(_0x283521+'\x20'+_0xe74b15+(_0x328b25?'\x20'+_0x328b25:'')+'\x20'+_0x47f3e1+'\x20'+_0x14a182)['trimEnd']();});await writeOutput(_0x144c67[_0x21df52(0x11c)]('\x0a'),_0x390eeb[_0x21df52(0x20b)],_0x21df52(0xc0));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a52_0xa13f07(0x20d)]='workflow:attempt';['description']=a52_0xa13f07(0x12b);async[a52_0xa13f07(0x22f)](_0x868cb6){const _0x3d79d1=a52_0xa13f07,{options:_0x41767,args:_0x1b4bfc,tdx:_0x196073}=_0x868cb6,_0x5cc5e9=_0x1b4bfc[0x0];if(!_0x5cc5e9)return console['error'](_0x3d79d1(0x222)),0x1;_0x41767[_0x3d79d1(0x1e3)]&&console[_0x3d79d1(0xa9)](_0x3d79d1(0xda)+_0x5cc5e9);const _0x2f8a67=await withSpinner(_0x3d79d1(0x20f),()=>_0x196073[_0x3d79d1(0xfc)][_0x3d79d1(0xc6)](_0x5cc5e9),{'verbose':_0x41767['verbose']}),_0x3848bd=_0x2f8a67[_0x3d79d1(0x14b)];let _0x56a987;!_0x3848bd[_0x3d79d1(0x178)]?_0x56a987=_0x3848bd[_0x3d79d1(0x1b0)]?_0x3d79d1(0x168):_0x3d79d1(0x1b8):_0x56a987=_0x3848bd[_0x3d79d1(0x1ba)]?_0x3d79d1(0x1ba):_0x3d79d1(0xa9);let _0x19cf70;if(_0x3848bd[_0x3d79d1(0x85)]&&_0x3848bd['finishedAt']){const _0xb2defe=new Date(_0x3848bd['createdAt'])[_0x3d79d1(0xe0)](),_0x1553da=new Date(_0x3848bd[_0x3d79d1(0x18a)])[_0x3d79d1(0xe0)]();_0x19cf70=Math[_0x3d79d1(0x19b)]((_0x1553da-_0xb2defe)/0x3e8);}const _0x1f96fd={'attempt_id':_0x3848bd['id'],'status':_0x56a987,..._0x3848bd[_0x3d79d1(0x95)]!==undefined&&{'index':_0x3848bd[_0x3d79d1(0x95)]},..._0x3848bd[_0x3d79d1(0x1af)]&&{'project':_0x3848bd['project'][_0x3d79d1(0x20d)]},..._0x3848bd[_0x3d79d1(0xfc)]&&{'workflow':_0x3848bd[_0x3d79d1(0xfc)][_0x3d79d1(0x20d)]},..._0x3848bd['sessionId']&&{'session_id':_0x3848bd[_0x3d79d1(0xc8)]},..._0x3848bd['sessionTime']&&{'session_time':_0x3848bd[_0x3d79d1(0xa6)]},..._0x3848bd[_0x3d79d1(0x1cc)]&&{'retry_attempt':_0x3848bd[_0x3d79d1(0x1cc)]},..._0x19cf70!==undefined&&{'duration_sec':_0x19cf70},..._0x3848bd['createdAt']&&{'created_at':_0x3848bd[_0x3d79d1(0x85)]},..._0x3848bd[_0x3d79d1(0x18a)]&&{'finished_at':_0x3848bd[_0x3d79d1(0x18a)]},...Object['keys'](_0x3848bd[_0x3d79d1(0x151)])[_0x3d79d1(0x86)]>0x0&&{'params':_0x3848bd['params']}};return await handleSingleObjectOutput(_0x1f96fd,_0x41767),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x198);[a52_0xa13f07(0x122)]=a52_0xa13f07(0x88);async[a52_0xa13f07(0x22f)](_0x50f17a){const _0xedabc0=a52_0xa13f07,{options:_0x1f107c,args:_0x1c4820,tdx:_0x4bc73e}=_0x50f17a,_0x4bc847=_0x1c4820[0x0];if(!_0x4bc847)return console[_0xedabc0(0xa9)](_0xedabc0(0x222)),0x1;const _0x4da6f4=_0x1f107c[_0xedabc0(0x1f2)];_0x1f107c['verbose']&&(console[_0xedabc0(0xa9)](_0xedabc0(0xda)+_0x4bc847),_0x4da6f4&&console['error'](_0xedabc0(0x1df)));const _0x3846e7=await withSpinner(_0xedabc0(0x1c6),()=>_0x4bc73e['workflow'][_0xedabc0(0xe7)](_0x4bc847,_0x4da6f4||![]),{'verbose':_0x1f107c['verbose']}),_0x3d89b5=_0x3846e7[_0xedabc0(0x14b)];return console['error'](_0xedabc0(0x8a)+_0x3d89b5[_0xedabc0(0x86)]+_0xedabc0(0x206)+(_0x3d89b5[_0xedabc0(0x86)]!==0x1?'s':'')),await handleSDKOutput(_0x3d89b5,_0x1f107c),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a52_0xa13f07(0x20d)]='workflow:logs';['description']=a52_0xa13f07(0x225);async[a52_0xa13f07(0x22f)](_0xe15186){const _0x28efb0=a52_0xa13f07,{options:_0xc9ca,args:_0x501163,tdx:_0x44c2ed}=_0xe15186,_0x291bc4=_0x501163[0x0];let _0x2aad1f=_0x501163[0x1];if(!_0x291bc4)return console['error'](_0x28efb0(0x222)),0x1;_0xc9ca['verbose']&&(console[_0x28efb0(0xa9)](_0x28efb0(0xda)+_0x291bc4),_0x2aad1f&&console[_0x28efb0(0xa9)](_0x28efb0(0xf2)+_0x2aad1f));const _0x32e171=await withSpinner('Fetching\x20log\x20files...',()=>_0x44c2ed['workflow'][_0x28efb0(0xb2)](_0x291bc4,_0x2aad1f),{'verbose':_0xc9ca[_0x28efb0(0x1e3)]}),_0xe124ea=_0x32e171['data'];if(_0xe124ea['length']===0x0)return console[_0x28efb0(0xa9)](_0x28efb0(0x16a)),0x0;if(!_0x2aad1f&&(_0xc9ca[_0x28efb0(0xd5)]||_0xc9ca[_0x28efb0(0x99)]))return await handleSDKOutput(_0xe124ea,_0xc9ca),0x0;if(!_0x2aad1f){const _0x251dd8=_0xe124ea[_0x28efb0(0xd7)](_0x284ca9=>({'title':_0x284ca9[_0x28efb0(0x1fb)]+'\x20('+formatBytes(_0x284ca9[_0x28efb0(0x197)])+')','value':_0x284ca9['taskName']})),_0x535bd2=await a52_0x4bedff({'type':'select','name':_0x28efb0(0xd6),'message':_0x28efb0(0x13b),'choices':_0x251dd8});if(!_0x535bd2[_0x28efb0(0xd6)])return console[_0x28efb0(0xa9)](_0x28efb0(0xeb)),0x0;_0x2aad1f=_0x535bd2[_0x28efb0(0xd6)];}const _0x4baebc=await withSpinner(_0x28efb0(0x150),()=>_0x44c2ed[_0x28efb0(0xfc)][_0x28efb0(0x218)](_0x291bc4,_0x2aad1f),{'verbose':_0xc9ca[_0x28efb0(0x1e3)]}),_0x33cad9=_0x4baebc[_0x28efb0(0x14b)];return _0x33cad9?console[_0x28efb0(0x1b2)](_0x33cad9):console['error'](_0x28efb0(0xf8)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0xde);['description']=a52_0xa13f07(0x124);async['execute'](_0x14a456){const _0x3559d3=a52_0xa13f07,{options:_0x502402,args:_0xd11448,tdx:_0x331cfb}=_0x14a456,_0x3b934f=_0xd11448[0x0];if(!_0x3b934f)return console[_0x3559d3(0xa9)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x445bd5=_0x502402['reason'];_0x502402[_0x3559d3(0x1e3)]&&(console[_0x3559d3(0xa9)]('Attempt\x20ID:\x20'+_0x3b934f),_0x445bd5&&console[_0x3559d3(0xa9)](_0x3559d3(0x152)+_0x445bd5));if(!_0x502402['yes']){if(!isInteractive())return console['error'](a52_0x89d45[_0x3559d3(0xb3)](_0x3559d3(0x162)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x3559d3(0xa9)](a52_0x89d45[_0x3559d3(0x20e)](_0x3559d3(0x1ad))),0x1;const _0x1a2a5b=await confirmKey(_0x3559d3(0x115)+_0x3b934f+'?');if(!_0x1a2a5b)return console[_0x3559d3(0xa9)](a52_0x89d45[_0x3559d3(0xd4)](_0x3559d3(0xeb))),0x1;}const _0x2b8d52=await withSpinner(_0x3559d3(0xac),()=>_0x331cfb[_0x3559d3(0xfc)][_0x3559d3(0x186)](_0x3b934f,_0x445bd5),{'verbose':_0x502402[_0x3559d3(0x1e3)]}),_0x385200=_0x2b8d52[_0x3559d3(0x14b)];return console[_0x3559d3(0xa9)]('✔\x20'+_0x385200),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x9c);[a52_0xa13f07(0x122)]=a52_0xa13f07(0x165);async['execute'](_0x2edf14){const _0xf6fe6f=a52_0xa13f07,{options:_0x1496b9,args:_0x3f7722,tdx:_0x2d3698}=_0x2edf14,_0x33a894=_0x3f7722[0x0];if(!_0x33a894)return console[_0xf6fe6f(0xa9)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console['error'](_0xf6fe6f(0x158)),0x1;let _0x528e84=![],_0x47dae5=_0x33a894;if(_0x33a894[_0xf6fe6f(0x107)]('session:'))_0x528e84=!![],_0x47dae5=_0x33a894[_0xf6fe6f(0x135)](0x8);else{if(_0x33a894[_0xf6fe6f(0x107)](_0xf6fe6f(0x143)))_0x528e84=![],_0x47dae5=_0x33a894['substring'](0x8);else return console[_0xf6fe6f(0xa9)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0xf6fe6f(0xa9)](_0xf6fe6f(0x158)),0x1;}const _0x32f6ce=_0x1496b9[_0xf6fe6f(0x128)],_0x1d2e2f=_0x1496b9[_0xf6fe6f(0x213)],_0x2de253=_0x1496b9[_0xf6fe6f(0x151)],_0x714a3c=_0x1496b9[_0xf6fe6f(0x1cd)];_0x1496b9[_0xf6fe6f(0x1e3)]&&(console[_0xf6fe6f(0xa9)](_0xf6fe6f(0x93)+(_0x528e84?_0xf6fe6f(0x17e):_0xf6fe6f(0xc6))+'\x20'+_0x47dae5),_0x32f6ce&&console[_0xf6fe6f(0xa9)](_0xf6fe6f(0x202)+_0x32f6ce),_0x1d2e2f&&console[_0xf6fe6f(0xa9)]('Resume\x20from:\x20'+_0x1d2e2f),_0x2de253&&console[_0xf6fe6f(0xa9)](_0xf6fe6f(0x172)+_0x2de253),_0x714a3c&&console[_0xf6fe6f(0xa9)]('Force:\x20yes'));let _0x30d937;if(_0x2de253)try{if(_0x2de253[_0xf6fe6f(0x107)]('@')){const _0x22bb9c=await import(_0xf6fe6f(0x105)),_0x5cd0a6=_0x2de253[_0xf6fe6f(0x135)](0x1),_0x528abd=await _0x22bb9c[_0xf6fe6f(0x19d)](_0x5cd0a6,'utf-8');_0x30d937=JSON[_0xf6fe6f(0x7f)](_0x528abd);}else _0x30d937=JSON['parse'](_0x2de253);}catch{return console[_0xf6fe6f(0xa9)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x1496b9[_0xf6fe6f(0x9f)]){if(!isInteractive())return console['error'](a52_0x89d45['red'](_0xf6fe6f(0x162)),_0xf6fe6f(0x21b)),console[_0xf6fe6f(0xa9)](a52_0x89d45[_0xf6fe6f(0x20e)](_0xf6fe6f(0x1ad))),0x1;const _0x27126e=await confirmKey(_0xf6fe6f(0x1d9)+(_0x528e84?_0xf6fe6f(0x17e):'attempt')+'\x20'+_0x47dae5+'?');if(!_0x27126e)return console[_0xf6fe6f(0xa9)](a52_0x89d45[_0xf6fe6f(0xd4)](_0xf6fe6f(0xeb))),0x1;}let _0x18ef6b;_0x528e84?_0x18ef6b=await withSpinner('Retrying\x20session...',()=>_0x2d3698[_0xf6fe6f(0xfc)][_0xf6fe6f(0xa7)](_0x47dae5,{'fromTask':_0x32f6ce,'retryParams':_0x30d937}),{'verbose':_0x1496b9[_0xf6fe6f(0x1e3)]}):_0x18ef6b=await withSpinner(_0xf6fe6f(0x9a),()=>_0x2d3698[_0xf6fe6f(0xfc)][_0xf6fe6f(0x1fc)](_0x47dae5,{'resumeFrom':_0x1d2e2f,'retryParams':_0x30d937,'force':_0x714a3c}),{'verbose':_0x1496b9[_0xf6fe6f(0x1e3)]});const _0xacab29=_0x18ef6b['data'];return console['error'](_0xf6fe6f(0x11b)),console[_0xf6fe6f(0xa9)](_0xf6fe6f(0x20c)+_0xacab29['attemptId']),console[_0xf6fe6f(0xa9)]('\x20\x20Session\x20ID:\x20'+_0xacab29[_0xf6fe6f(0xc8)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]='workflow:run';[a52_0xa13f07(0x122)]=a52_0xa13f07(0x1c7);async[a52_0xa13f07(0x22f)](_0x30baeb){const _0x23f50b=a52_0xa13f07,{options:_0x4b08be,args:_0x1b4494,tdx:_0x3514a6}=_0x30baeb;let _0x886c77=_0x1b4494[0x0];if(!_0x886c77){const _0x386265=this[_0x23f50b(0x174)]([],_0x4b08be),_0x109d69=await withSpinner(_0x23f50b(0x1da),()=>_0x3514a6[_0x23f50b(0xfc)][_0x23f50b(0xec)](_0x386265,{'limit':_0x4b08be[_0x23f50b(0x91)]}),{'verbose':_0x4b08be['verbose']}),_0x3528d5=_0x109d69[_0x23f50b(0x14b)];if(_0x3528d5[_0x23f50b(0x86)]===0x0)return console[_0x23f50b(0xa9)](_0x23f50b(0xf0)),!_0x386265&&console[_0x23f50b(0xa9)](a52_0x89d45[_0x23f50b(0x20e)](_0x23f50b(0xbc))),0x1;const _0x10b463=_0x3528d5[_0x23f50b(0xd7)](_0xd93412=>({'title':_0xd93412['project']?.['name']+'.'+_0xd93412[_0x23f50b(0x20d)],'value':_0xd93412[_0x23f50b(0x1af)]?.[_0x23f50b(0x20d)]+'.'+_0xd93412['name'],'description':_0xd93412[_0x23f50b(0x204)]?_0x23f50b(0x21f)+_0xd93412[_0x23f50b(0x204)]:undefined})),_0xa62bd8=await a52_0x4bedff({'type':'select','name':_0x23f50b(0xfc),'message':_0x23f50b(0x1c9),'choices':_0x10b463});if(!_0xa62bd8['workflow'])return 0x1;_0x886c77=_0xa62bd8['workflow'];}if(!_0x886c77['includes']('.')){const _0x1d24bf=this[_0x23f50b(0x174)]([],_0x4b08be);if(_0x1d24bf)_0x886c77=_0x1d24bf+'.'+_0x886c77;else return console[_0x23f50b(0xa9)](a52_0x89d45[_0x23f50b(0xb3)](_0x23f50b(0x1a0)),_0x23f50b(0x1d6)),console[_0x23f50b(0xa9)](a52_0x89d45[_0x23f50b(0x20e)](_0x23f50b(0xbc))),0x1;}const _0x14cdc3=_0x4b08be[_0x23f50b(0xcd)],_0x4d89fe=_0x4b08be[_0x23f50b(0xa6)],_0x1eb669={};if(_0x14cdc3&&Array[_0x23f50b(0x1ac)](_0x14cdc3))for(const _0x4f641d of _0x14cdc3){const _0x51acfb=_0x4f641d[_0x23f50b(0x155)]('=');if(_0x51acfb===-0x1)return console[_0x23f50b(0xa9)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x4f641d),console[_0x23f50b(0xa9)](_0x23f50b(0x1ff)),0x1;const _0x251b51=_0x4f641d[_0x23f50b(0x135)](0x0,_0x51acfb),_0x7100d5=_0x4f641d[_0x23f50b(0x135)](_0x51acfb+0x1);try{_0x1eb669[_0x251b51]=JSON[_0x23f50b(0x7f)](_0x7100d5);}catch{_0x1eb669[_0x251b51]=_0x7100d5;}}_0x4b08be[_0x23f50b(0x1e3)]&&(console[_0x23f50b(0xa9)](_0x23f50b(0x137)+_0x886c77),Object[_0x23f50b(0x10e)](_0x1eb669)[_0x23f50b(0x86)]>0x0&&console[_0x23f50b(0xa9)](_0x23f50b(0x127)+JSON[_0x23f50b(0xab)](_0x1eb669)),_0x4d89fe&&console[_0x23f50b(0xa9)]('Session\x20time:\x20'+_0x4d89fe));const _0x1910b9=await withSpinner(_0x23f50b(0xee),()=>_0x3514a6[_0x23f50b(0xfc)][_0x23f50b(0x223)](_0x886c77,_0x1eb669,{'sessionTime':_0x4d89fe}),{'verbose':_0x4b08be['verbose']}),_0x103869=_0x1910b9[_0x23f50b(0x14b)];console['error'](_0x23f50b(0x188)),console[_0x23f50b(0xa9)]('\x20\x20Attempt\x20ID:\x20'+_0x103869['id']),console[_0x23f50b(0xa9)](_0x23f50b(0x219)+_0x103869[_0x23f50b(0xc8)]),console[_0x23f50b(0xa9)](_0x23f50b(0x1c8)+_0x103869[_0x23f50b(0x1af)]?.[_0x23f50b(0x20d)]),console[_0x23f50b(0xa9)](_0x23f50b(0x7d)+_0x103869[_0x23f50b(0xfc)]?.['name']);if(_0x103869[_0x23f50b(0x1af)]?.['id']&&_0x103869[_0x23f50b(0xc8)]&&_0x103869['id']){const _0x22d36b=_0x4b08be['site'],_0x95de61=getConsoleUrl(_0x22d36b,_0x23f50b(0xf5)+_0x103869[_0x23f50b(0x1af)]['id']+_0x23f50b(0x9e)+_0x103869[_0x23f50b(0xc8)]+_0x23f50b(0x194)+_0x103869['id']);console['error'](_0x23f50b(0x210)+a52_0x89d45[_0x23f50b(0x184)](_0x95de61));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x1b5);[a52_0xa13f07(0x122)]=a52_0xa13f07(0xd8);async[a52_0xa13f07(0x22f)](_0xc64a6f){const _0x20b903=a52_0xa13f07,{options:_0x79f393,args:_0x2eab4b,tdx:_0x480b4b}=_0xc64a6f,_0x27683a=_0x2eab4b[0x0],_0x417c77=_0x2eab4b[0x1]||'.';if(!_0x27683a)return console[_0x20b903(0xa9)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x20b903(0x196)),0x1;const _0x2699d3=_0x79f393[_0x20b903(0x204)];_0x79f393[_0x20b903(0x1e3)]&&(console[_0x20b903(0xa9)](_0x20b903(0xaa)+_0x27683a),console['error'](_0x20b903(0x148)+_0x417c77),_0x2699d3&&console['error']('Revision:\x20'+_0x2699d3));const _0x2795e0=await withSpinner(_0x20b903(0xe6)+_0x27683a+_0x20b903(0xe1),()=>_0x480b4b[_0x20b903(0xfc)][_0x20b903(0x227)](_0x27683a,_0x417c77,{'revision':_0x2699d3}),{'verbose':_0x79f393[_0x20b903(0x1e3)]}),_0x228c54=_0x2795e0[_0x20b903(0x14b)];return console[_0x20b903(0xa9)](_0x20b903(0x221)+_0x228c54[_0x20b903(0x120)]),console[_0x20b903(0xa9)](_0x20b903(0xc5)+_0x228c54['revision']),console[_0x20b903(0xa9)](_0x20b903(0xbd)+_0x228c54[_0x20b903(0x139)]),console[_0x20b903(0xa9)](_0x20b903(0xff)+_0x417c77+'/'+_0x228c54[_0x20b903(0x120)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x112);[a52_0xa13f07(0x122)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a52_0xa13f07(0x22f)](_0x4534b5){const _0x52e53f=a52_0xa13f07,{options:_0x3e35af,args:_0x53551b,tdx:_0xf8ea5f}=_0x4534b5;let _0x172006='.',_0x25f299=_0x3e35af[_0x52e53f(0x20d)];if(_0x53551b[0x0]){const {promises:_0x21751e}=await import('fs');try{const _0x49ed26=await _0x21751e[_0x52e53f(0x1dc)](_0x53551b[0x0]);if(_0x49ed26['isDirectory']())_0x172006=_0x53551b[0x0];else return console[_0x52e53f(0xa9)](_0x52e53f(0x1aa)+_0x53551b[0x0]+_0x52e53f(0x1f3)),0x1;}catch{_0x25f299=_0x53551b[0x0],_0x172006='.';}}const _0x1c750b=_0x3e35af['revision'],_0x21cda3=_0x3e35af[_0x52e53f(0x1d7)];_0x3e35af[_0x52e53f(0x1e3)]&&(console['error'](_0x52e53f(0x145)+_0x172006),_0x25f299&&console[_0x52e53f(0xa9)](_0x52e53f(0xbe)+_0x25f299),_0x1c750b&&console[_0x52e53f(0xa9)](_0x52e53f(0x193)+_0x1c750b),_0x21cda3&&console['error'](_0x52e53f(0x10a)));const _0xbd6f6=await withSpinner('Pushing\x20workflow\x20project...',()=>_0xf8ea5f[_0x52e53f(0xfc)]['push'](_0x172006,{'projectName':_0x25f299,'revision':_0x1c750b,'skipValidation':_0x21cda3}),{'verbose':_0x3e35af[_0x52e53f(0x1e3)]}),_0x3538fc=_0xbd6f6[_0x52e53f(0x14b)];return console[_0x52e53f(0xa9)]('✔\x20Pushed\x20'+_0x3538fc[_0x52e53f(0x120)]),console[_0x52e53f(0xa9)]('\x20\x20Project\x20ID:\x20'+_0x3538fc[_0x52e53f(0x1d5)]),console[_0x52e53f(0xa9)](_0x52e53f(0xc5)+_0x3538fc[_0x52e53f(0x204)]),await this[_0x52e53f(0x1c2)](_0xf8ea5f,_0x3538fc[_0x52e53f(0x120)],_0x3e35af[_0x52e53f(0x179)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x1d3);[a52_0xa13f07(0x122)]=a52_0xa13f07(0xa0);async['execute'](_0x4075d7){const _0x1aed71=a52_0xa13f07,{options:_0x3dc0ad,args:_0x11d1c6,tdx:_0x9c8b78}=_0x4075d7,_0x395215=_0x11d1c6[0x0],_0x5abc6f=_0x11d1c6[0x1];if(!_0x395215)return console[_0x1aed71(0xa9)](a52_0x89d45[_0x1aed71(0xb3)](_0x1aed71(0x1a0)),_0x1aed71(0x161)),console[_0x1aed71(0xa9)](a52_0x89d45['dim'](_0x1aed71(0x1cb))),0x1;const _0x5db21b=_0x3dc0ad[_0x1aed71(0x204)];_0x3dc0ad['verbose']&&(console[_0x1aed71(0xa9)](_0x1aed71(0xaa)+_0x395215),_0x5abc6f&&console[_0x1aed71(0xa9)]('Target\x20directory:\x20'+_0x5abc6f),_0x5db21b&&console[_0x1aed71(0xa9)](_0x1aed71(0x193)+_0x5db21b),_0x3dc0ad[_0x1aed71(0xf1)]&&console['error'](_0x1aed71(0xe9)));const _0xa4f3be=await withSpinner(_0x1aed71(0x208)+_0x395215+_0x1aed71(0xe1),()=>_0x9c8b78[_0x1aed71(0xfc)]['pullProject'](_0x395215,{'targetDir':_0x5abc6f,'revision':_0x5db21b}),{'verbose':_0x3dc0ad[_0x1aed71(0x1e3)]}),_0x3533b0=_0xa4f3be[_0x1aed71(0x14b)];_0x3533b0[_0x1aed71(0x1ea)]?console[_0x1aed71(0xa9)](_0x1aed71(0x14c)+_0x3533b0[_0x1aed71(0x120)]):console[_0x1aed71(0xa9)](_0x1aed71(0xf9)+_0x3533b0[_0x1aed71(0x120)]);console[_0x1aed71(0xa9)]('\x20\x20Revision:\x20'+_0x3533b0[_0x1aed71(0x204)]),console[_0x1aed71(0xa9)](_0x1aed71(0x17b)+(a52_0x2ac51d[_0x1aed71(0x13c)](process[_0x1aed71(0xb9)](),_0x3533b0[_0x1aed71(0x10c)])||'.')),console['error'](_0x1aed71(0x9b)+a52_0x89d45[_0x1aed71(0x118)]('+'+_0x3533b0[_0x1aed71(0x182)][_0x1aed71(0x1bf)]+_0x1aed71(0x166))+',\x20'+(a52_0x89d45[_0x1aed71(0xd4)]('~'+_0x3533b0[_0x1aed71(0x182)][_0x1aed71(0x211)]+_0x1aed71(0xb6))+',\x20')+(a52_0x89d45[_0x1aed71(0xb3)]('-'+_0x3533b0[_0x1aed71(0x182)]['deleted']+'\x20deleted')+',\x20')+(''+a52_0x89d45[_0x1aed71(0x20e)](_0x3533b0[_0x1aed71(0x182)][_0x1aed71(0x228)]+_0x1aed71(0x1f1))));for(const _0xe0e3e3 of _0x3533b0[_0x1aed71(0xd1)]){_0xe0e3e3['type']===_0x1aed71(0x211)&&_0xe0e3e3[_0x1aed71(0x141)]&&(console[_0x1aed71(0xa9)]('\x0a'+a52_0x89d45[_0x1aed71(0x184)](_0x1aed71(0x18f)+_0xe0e3e3['path'])),console['error'](_0xe0e3e3[_0x1aed71(0x141)]));}if(!_0x3533b0[_0x1aed71(0x16b)])return saveSessionContext({'workflow_project':_0x3533b0[_0x1aed71(0x120)]},_0x3dc0ad['session']),console[_0x1aed71(0xa9)](a52_0x89d45[_0x1aed71(0x118)](_0x1aed71(0x94))),console[_0x1aed71(0xa9)](a52_0x89d45[_0x1aed71(0x20e)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x3533b0[_0x1aed71(0x120)])),0x0;if(_0x3dc0ad[_0x1aed71(0xf1)])return console[_0x1aed71(0xa9)](a52_0x89d45[_0x1aed71(0xd4)](_0x1aed71(0x17a))),0x0;if(!_0x3dc0ad[_0x1aed71(0x9f)]){if(!isInteractive())return console[_0x1aed71(0xa9)](a52_0x89d45[_0x1aed71(0xb3)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1aed71(0xa9)](a52_0x89d45[_0x1aed71(0x20e)](_0x1aed71(0x1ad))),0x1;const _0x4c8a88=await confirmKey(_0x1aed71(0x16c));if(!_0x4c8a88)return console[_0x1aed71(0xa9)](a52_0x89d45['yellow']('Cancelled'),_0x1aed71(0x22a)),0x1;}await withSpinner('Writing\x20files...',()=>_0x9c8b78['workflow'][_0x1aed71(0x11f)](_0x3533b0,{'revision':_0x5db21b}),{'verbose':_0x3dc0ad[_0x1aed71(0x1e3)]}),saveSessionContext({'workflow_project':_0x3533b0[_0x1aed71(0x120)]},_0x3dc0ad[_0x1aed71(0x17e)]),console[_0x1aed71(0xa9)](a52_0x89d45[_0x1aed71(0x118)]('✔\x20Pull\x20complete'));const _0x40a29b=a52_0x2ac51d['relative'](process[_0x1aed71(0xb9)](),_0x3533b0[_0x1aed71(0x10c)])||'.';return console[_0x1aed71(0xa9)](a52_0x89d45[_0x1aed71(0x20e)](_0x1aed71(0xff)+_0x40a29b)),console[_0x1aed71(0xa9)](a52_0x89d45['dim'](_0x1aed71(0x22d)+_0x3533b0['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x13e);[a52_0xa13f07(0x122)]=a52_0xa13f07(0x146);async['execute'](_0x57e0d5){const _0x46d30d=a52_0xa13f07,{options:_0xb35810,args:_0x5a4d28,tdx:_0xe271f5}=_0x57e0d5,_0x5e0161=this[_0x46d30d(0x1e4)](_0x5a4d28,_0xb35810),_0x4edacc=_0xb35810[_0x46d30d(0x204)],_0x3c2152=_0xb35810['skipValidation'];_0xb35810['verbose']&&(_0x5e0161&&console[_0x46d30d(0xa9)](_0x46d30d(0x1d0)+_0x5e0161),_0x4edacc&&console['error']('Revision:\x20'+_0x4edacc),_0xb35810[_0x46d30d(0xf1)]&&console[_0x46d30d(0xa9)]('Dry\x20run:\x20yes'),_0x3c2152&&console[_0x46d30d(0xa9)](_0x46d30d(0x10a)));let _0x2691c3;try{_0x2691c3=await withSpinner('Analyzing\x20changes...',()=>_0xe271f5[_0x46d30d(0xfc)]['preparePushProject']({'sourceDir':_0x5e0161,'revision':_0x4edacc,'skipValidation':_0x3c2152}),{'verbose':_0xb35810['verbose']});}catch(_0x5e71df){if(_0x5e71df instanceof Error&&_0x5e71df[_0x46d30d(0xe5)]['includes'](_0x46d30d(0x1a8)))return console['error'](a52_0x89d45['red']('Error:'),_0x46d30d(0x1ec)),_0xb35810['workflowProject']?console[_0x46d30d(0xa9)](a52_0x89d45['dim'](_0x46d30d(0x170)+_0xb35810[_0x46d30d(0x125)]+_0x46d30d(0x14f)+_0xb35810['workflowProject']+'\x27')):console['error'](a52_0x89d45[_0x46d30d(0x20e)](_0x46d30d(0x147))),0x1;throw _0x5e71df;}const _0x48e44c=_0x2691c3[_0x46d30d(0x14b)];console[_0x46d30d(0xa9)](_0x46d30d(0x14d)+_0x48e44c[_0x46d30d(0x120)]),console['error'](_0x46d30d(0x1e2)+_0x48e44c[_0x46d30d(0x1b1)]),console['error'](_0x46d30d(0xc5)+_0x48e44c['revision']),console[_0x46d30d(0xa9)]('\x20\x20Changes:\x20'+a52_0x89d45[_0x46d30d(0x118)]('+'+_0x48e44c[_0x46d30d(0x182)][_0x46d30d(0x1bf)]+'\x20new')+',\x20'+(a52_0x89d45[_0x46d30d(0xd4)]('~'+_0x48e44c['summary']['modified']+'\x20modified')+',\x20')+(a52_0x89d45['red']('-'+_0x48e44c['summary'][_0x46d30d(0x21d)]+_0x46d30d(0x153))+',\x20')+(''+a52_0x89d45['dim'](_0x48e44c[_0x46d30d(0x182)]['unchanged']+_0x46d30d(0x1f1))));for(const _0xfe34ff of _0x48e44c['changes']){_0xfe34ff[_0x46d30d(0x209)]===_0x46d30d(0x211)&&_0xfe34ff[_0x46d30d(0x141)]&&(console[_0x46d30d(0xa9)]('\x0a'+a52_0x89d45[_0x46d30d(0x184)](_0x46d30d(0x18f)+_0xfe34ff[_0x46d30d(0x11d)])),console[_0x46d30d(0xa9)](_0xfe34ff['diff']));}if(!_0x48e44c[_0x46d30d(0x16b)])return console[_0x46d30d(0xa9)](a52_0x89d45[_0x46d30d(0x118)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x46d30d(0x1c2)](_0xe271f5,_0x48e44c[_0x46d30d(0x120)],_0xb35810['site']),0x0;if(_0xb35810[_0x46d30d(0xf1)])return console['error'](a52_0x89d45[_0x46d30d(0xd4)](_0x46d30d(0x110))),0x0;if(!_0xb35810[_0x46d30d(0x9f)]){if(!isInteractive())return console[_0x46d30d(0xa9)](a52_0x89d45[_0x46d30d(0xb3)](_0x46d30d(0x162)),_0x46d30d(0x21b)),console['error'](a52_0x89d45[_0x46d30d(0x20e)](_0x46d30d(0x1ad))),0x1;const _0x505a25=await confirmKey(_0x46d30d(0x19a));if(!_0x505a25)return console[_0x46d30d(0xa9)](a52_0x89d45[_0x46d30d(0xd4)](_0x46d30d(0xeb)),_0x46d30d(0x12a)),0x1;}const _0xf5ffc4=await withSpinner(_0x46d30d(0x1a7),()=>_0xe271f5['workflow']['executePushProject'](_0x48e44c),{'verbose':_0xb35810[_0x46d30d(0x1e3)]}),_0x3bfa73=_0xf5ffc4['data'];return console[_0x46d30d(0xa9)](a52_0x89d45[_0x46d30d(0x118)]('✔\x20Push\x20complete')),console[_0x46d30d(0xa9)](_0x46d30d(0x180)+_0x3bfa73[_0x46d30d(0x1d5)]),console['error'](_0x46d30d(0xc5)+_0x3bfa73[_0x46d30d(0x204)]),await this['showWorkflowConsoleUrl'](_0xe271f5,_0x3bfa73['projectName'],_0xb35810['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]='workflow:clone';['description']=a52_0xa13f07(0x1f7);async[a52_0xa13f07(0x22f)](_0x52f764){const _0x31a14e=a52_0xa13f07,{options:_0xdc9063,args:_0x42179b,tdx:_0xbcba99}=_0x52f764,_0xe0ff03=this[_0x31a14e(0x1e4)](_0x42179b,_0xdc9063),_0x41900d=_0xdc9063['name'],_0x332016=_0xdc9063['revision'],_0x51e6a8=_0xdc9063[_0x31a14e(0x1d7)];if(!_0xe0ff03)return console[_0x31a14e(0xa9)](a52_0x89d45[_0x31a14e(0xb3)](_0x31a14e(0x1a0)),_0x31a14e(0xea)),console[_0x31a14e(0xa9)](a52_0x89d45[_0x31a14e(0x20e)](_0x31a14e(0x15a))),console['error'](a52_0x89d45['dim'](_0x31a14e(0x82))),0x1;if(!_0x41900d)return console[_0x31a14e(0xa9)](a52_0x89d45[_0x31a14e(0xb3)]('Error:'),_0x31a14e(0xe4)),console[_0x31a14e(0xa9)](a52_0x89d45['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0xdc9063['verbose']&&(console[_0x31a14e(0xa9)](_0x31a14e(0x1d0)+_0xe0ff03),console[_0x31a14e(0xa9)](_0x31a14e(0x1c0)+_0x41900d),_0x332016&&console[_0x31a14e(0xa9)](_0x31a14e(0x193)+_0x332016),_0xdc9063[_0x31a14e(0xf1)]&&console[_0x31a14e(0xa9)](_0x31a14e(0xe9)),_0x51e6a8&&console['error'](_0x31a14e(0x10a)));const _0x38e6fa=await withSpinner('Analyzing\x20project...',()=>_0xbcba99[_0x31a14e(0xfc)][_0x31a14e(0x134)](_0xe0ff03,_0x41900d,{'revision':_0x332016,'skipValidation':_0x51e6a8}),{'verbose':_0xdc9063[_0x31a14e(0x1e3)]}),_0x2391e6=_0x38e6fa['data'];console[_0x31a14e(0xa9)]('Source:\x20'+_0x2391e6['sourceDir']);_0x2391e6[_0x31a14e(0xe2)]&&console[_0x31a14e(0xa9)](_0x31a14e(0x1c5)+_0x2391e6[_0x31a14e(0xe2)]);console['error'](_0x31a14e(0x1c0)+_0x2391e6[_0x31a14e(0xbb)]),console[_0x31a14e(0xa9)]('Revision:\x20'+_0x2391e6[_0x31a14e(0x204)]),console[_0x31a14e(0xa9)](_0x31a14e(0xb8)+_0x2391e6[_0x31a14e(0x126)]);_0x2391e6[_0x31a14e(0x18b)]&&(console[_0x31a14e(0xa9)](a52_0x89d45[_0x31a14e(0xd4)](_0x31a14e(0xaf)+_0x2391e6[_0x31a14e(0xbb)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x2391e6[_0x31a14e(0x1ef)]+')')),console[_0x31a14e(0xa9)](a52_0x89d45[_0x31a14e(0xd4)](_0x31a14e(0x1de))));if(_0xdc9063['dryRun'])return console['error'](a52_0x89d45[_0x31a14e(0xd4)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0xdc9063[_0x31a14e(0x9f)]){if(!isInteractive())return console[_0x31a14e(0xa9)](a52_0x89d45[_0x31a14e(0xb3)](_0x31a14e(0x162)),_0x31a14e(0x21b)),console[_0x31a14e(0xa9)](a52_0x89d45[_0x31a14e(0x20e)](_0x31a14e(0x1ad))),0x1;const _0x30f634=_0x2391e6[_0x31a14e(0xe2)]||a52_0x2ac51d[_0x31a14e(0xfd)](_0xe0ff03),_0x5f32fe=_0x2391e6[_0x31a14e(0x18b)]?_0x31a14e(0xc1)+_0x41900d+_0x31a14e(0x17c):'\x0aClone\x20\x22'+_0x30f634+_0x31a14e(0xe3)+_0x41900d+'\x22?',_0x460cb4=await confirmKey(_0x5f32fe);if(!_0x460cb4)return console[_0x31a14e(0xa9)](a52_0x89d45['yellow'](_0x31a14e(0xeb))),0x1;}const _0x28926a=await withSpinner(_0x2391e6[_0x31a14e(0x18b)]?'Updating\x20'+_0x41900d+_0x31a14e(0xe1):_0x31a14e(0x1e8)+_0x41900d+'...',()=>_0xbcba99['workflow'][_0x31a14e(0xcb)](_0x2391e6),{'verbose':_0xdc9063[_0x31a14e(0x1e3)]}),_0x63b03e=_0x28926a[_0x31a14e(0x14b)];return console[_0x31a14e(0xa9)](a52_0x89d45['green'](_0x2391e6[_0x31a14e(0x18b)]?_0x31a14e(0x1eb):_0x31a14e(0x192))),console[_0x31a14e(0xa9)](_0x31a14e(0x1c8)+_0x63b03e[_0x31a14e(0xbb)]),console['error'](_0x31a14e(0x180)+_0x63b03e[_0x31a14e(0x96)]),console[_0x31a14e(0xa9)](_0x31a14e(0xc5)+_0x63b03e['revision']),await this[_0x31a14e(0x1c2)](_0xbcba99,_0x63b03e[_0x31a14e(0xbb)],_0xdc9063[_0x31a14e(0x179)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x108);[a52_0xa13f07(0x122)]=a52_0xa13f07(0x12c);async[a52_0xa13f07(0x22f)](_0x39ddc4){const _0x304809=a52_0xa13f07,{options:_0x157842,args:_0x4ac2a1,tdx:_0xeb521c}=_0x39ddc4,_0x13136e=_0x4ac2a1[0x0];if(!_0x13136e)return console['error'](_0x304809(0x7c)),console[_0x304809(0xa9)](_0x304809(0x11e)),0x1;_0x157842[_0x304809(0x1e3)]&&console[_0x304809(0xa9)](_0x304809(0xaa)+_0x13136e);if(!_0x157842[_0x304809(0x9f)]){if(!isInteractive())return console[_0x304809(0xa9)](a52_0x89d45['red'](_0x304809(0x162)),_0x304809(0x21b)),console[_0x304809(0xa9)](a52_0x89d45[_0x304809(0x20e)](_0x304809(0x1ad))),0x1;const _0x57d80d=await confirmKey(_0x304809(0x160)+_0x13136e+_0x304809(0x157));if(!_0x57d80d)return console[_0x304809(0xa9)](a52_0x89d45['yellow'](_0x304809(0xeb))),0x1;}const _0x2181c1=await withSpinner(_0x304809(0x7e)+_0x13136e+'...',()=>_0xeb521c[_0x304809(0xfc)]['delete'](_0x13136e),{'verbose':_0x157842['verbose']}),_0x57203d=_0x2181c1[_0x304809(0x14b)];return console[_0x304809(0xa9)](_0x304809(0x119)+_0x57203d[_0x304809(0x120)]),console[_0x304809(0xa9)](_0x304809(0x180)+_0x57203d[_0x304809(0x1d5)]),0x0;}}export function parseKeyValue(_0x3e0b98){const _0x3b9159=a52_0xa13f07,_0x41f2f0=_0x3e0b98[_0x3b9159(0x155)]('=');if(_0x41f2f0===-0x1)throw new Error(_0x3b9159(0x1f6)+_0x3e0b98+_0x3b9159(0x212));const _0xf7a105=_0x3e0b98[_0x3b9159(0x135)](0x0,_0x41f2f0),_0x27c077=_0x3e0b98[_0x3b9159(0x135)](_0x41f2f0+0x1);if(!_0xf7a105)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0xf7a105,'value':_0x27c077};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0xed);[a52_0xa13f07(0x122)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a52_0xa13f07(0x22f)](_0x409399){const _0x5e9c7c=a52_0xa13f07,{options:_0x3cae1e,args:_0x541b6a,tdx:_0x8cac46}=_0x409399,_0x54624e=this[_0x5e9c7c(0x21e)](_0x541b6a,_0x3cae1e);if(!_0x54624e)return 0x1;_0x3cae1e[_0x5e9c7c(0x1e3)]&&console['error']('Project:\x20'+_0x54624e);const _0x12561b=await withSpinner(_0x5e9c7c(0xd9),()=>_0x8cac46[_0x5e9c7c(0xfc)][_0x5e9c7c(0x10d)](_0x54624e),{'verbose':_0x3cae1e[_0x5e9c7c(0x1e3)]}),{secrets:_0x2ee386}=_0x12561b[_0x5e9c7c(0x14b)];return console[_0x5e9c7c(0xa9)](_0x5e9c7c(0x8a)+_0x2ee386[_0x5e9c7c(0x86)]+_0x5e9c7c(0x1e7)+(_0x2ee386[_0x5e9c7c(0x86)]!==0x1?'s':'')),await handleSDKOutput(_0x2ee386,_0x3cae1e),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x20a);[a52_0xa13f07(0x122)]=a52_0xa13f07(0xf6);async[a52_0xa13f07(0x22f)](_0x552e29){const _0x3836b2=a52_0xa13f07,{options:_0x1872b2,args:_0xf037a3,tdx:_0x4514eb}=_0x552e29;let _0x354fae,_0x305d76;if(_0xf037a3['length']>=0x1&&!_0xf037a3[0x0][_0x3836b2(0x1bd)]('='))_0x354fae=_0xf037a3[0x0],_0x305d76=_0xf037a3[_0x3836b2(0xb0)](0x1);else{if(_0xf037a3['length']>=0x1&&_0x1872b2['workflowProject'])_0x354fae=_0x1872b2[_0x3836b2(0x125)],_0x305d76=_0xf037a3;else return _0xf037a3[_0x3836b2(0x86)]>=0x1?(console[_0x3836b2(0xa9)](_0x3836b2(0x14a)),console['error'](_0x3836b2(0xbc)),0x1):(console[_0x3836b2(0xa9)](_0x3836b2(0x230)),console[_0x3836b2(0xa9)](_0x3836b2(0x22c)),0x1);}if(_0x305d76['length']===0x0)return console[_0x3836b2(0xa9)](_0x3836b2(0x230)),console['error'](_0x3836b2(0x22c)),0x1;const _0xcd29c6={};try{for(const _0x5d2220 of _0x305d76){const {key:_0x59856d,value:_0x3b5974}=parseKeyValue(_0x5d2220);_0xcd29c6[_0x59856d]=_0x3b5974;}}catch(_0x53d4db){return _0x53d4db instanceof Error&&console[_0x3836b2(0xa9)](a52_0x89d45[_0x3836b2(0xb3)]('Error:'),_0x53d4db[_0x3836b2(0xe5)]),0x1;}const _0x2a7b17=Object[_0x3836b2(0x10e)](_0xcd29c6);_0x1872b2[_0x3836b2(0x1e3)]&&(console['error'](_0x3836b2(0xaa)+_0x354fae),console[_0x3836b2(0xa9)]('Secrets\x20to\x20set:\x20'+_0x2a7b17[_0x3836b2(0x11c)](',\x20')));const _0x3d0832=await withSpinner(_0x2a7b17[_0x3836b2(0x86)]===0x1?'Setting\x20secret...':_0x3836b2(0x220)+_0x2a7b17['length']+_0x3836b2(0x1b3),()=>_0x4514eb[_0x3836b2(0xfc)][_0x3836b2(0x1ed)](_0x354fae,_0xcd29c6),{'verbose':_0x1872b2['verbose']}),_0x14f2e8=_0x3d0832[_0x3836b2(0x14b)];return console['error'](_0x2a7b17[_0x3836b2(0x86)]===0x1?_0x3836b2(0x1dd)+_0x14f2e8[_0x3836b2(0x10e)][0x0]+_0x3836b2(0x12e)+_0x14f2e8[_0x3836b2(0x120)]+'\x27':'✔\x20'+_0x14f2e8[_0x3836b2(0x10e)]['length']+_0x3836b2(0x224)+_0x14f2e8['projectName']+'\x27'),(_0x1872b2['json']||_0x1872b2[_0x3836b2(0x175)])&&await handleSingleObjectOutput(_0x14f2e8,_0x1872b2),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]='workflow:secrets:delete';[a52_0xa13f07(0x122)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a52_0xa13f07(0x22f)](_0x4eb90c){const _0x41a9c2=a52_0xa13f07,{options:_0x1fe2a8,args:_0x4a4215,tdx:_0x7cd6a0}=_0x4eb90c;let _0xc95dbc,_0x1a2f8d;if(_0x4a4215[_0x41a9c2(0x86)]>=0x2)_0xc95dbc=_0x4a4215[0x0],_0x1a2f8d=_0x4a4215[0x1];else{if(_0x4a4215[_0x41a9c2(0x86)]===0x1&&_0x1fe2a8[_0x41a9c2(0x125)])_0xc95dbc=_0x1fe2a8[_0x41a9c2(0x125)],_0x1a2f8d=_0x4a4215[0x0];else return _0x4a4215[_0x41a9c2(0x86)]===0x1?(console[_0x41a9c2(0xa9)](_0x41a9c2(0x14a)),console[_0x41a9c2(0xa9)](_0x41a9c2(0xbc)),0x1):(console['error']('Error:\x20Secret\x20key\x20is\x20required'),console[_0x41a9c2(0xa9)](_0x41a9c2(0x154)),0x1);}_0x1fe2a8[_0x41a9c2(0x1e3)]&&(console['error'](_0x41a9c2(0xaa)+_0xc95dbc),console[_0x41a9c2(0xa9)](_0x41a9c2(0x103)+_0x1a2f8d));if(!_0x1fe2a8[_0x41a9c2(0x9f)]){if(!isInteractive())return console['error'](a52_0x89d45[_0x41a9c2(0xb3)](_0x41a9c2(0x162)),_0x41a9c2(0x21b)),console[_0x41a9c2(0xa9)](a52_0x89d45['dim'](_0x41a9c2(0x1ad))),0x1;const _0x297106=await confirmKey(_0x41a9c2(0x195)+_0x1a2f8d+'\x27\x20from\x20project\x20\x27'+_0xc95dbc+'\x27?');if(!_0x297106)return console[_0x41a9c2(0xa9)](a52_0x89d45[_0x41a9c2(0xd4)](_0x41a9c2(0xeb))),0x1;}const _0xbd93d6=await withSpinner(_0x41a9c2(0x1e1),()=>_0x7cd6a0[_0x41a9c2(0xfc)][_0x41a9c2(0x14e)](_0xc95dbc,_0x1a2f8d),{'verbose':_0x1fe2a8[_0x41a9c2(0x1e3)]}),_0x5d6a56=_0xbd93d6[_0x41a9c2(0x14b)];return console[_0x41a9c2(0xa9)](_0x41a9c2(0x1dd)+_0x5d6a56[_0x41a9c2(0x176)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x5d6a56[_0x41a9c2(0x120)]+'\x27'),(_0x1fe2a8[_0x41a9c2(0xd5)]||_0x1fe2a8[_0x41a9c2(0x175)])&&await handleSingleObjectOutput(_0x5d6a56,_0x1fe2a8),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 a52_0x2d2f(){const _0x251d6b=['/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Downloading\x20logs...','params','Reason:\x20','\x20deleted','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','indexOf','✔\x20Workflow\x20project\x20set\x20to:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','window','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','10aQTXef','stdout','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','workflow:timeline','rows','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Project\x20name\x20is\x20required','\x0aError:','\x20logs','context','Retry\x20a\x20session\x20or\x20attempt','\x20new','12936wPhvvR','canceling','LABEL_MIN_SPACING','No\x20log\x20files\x20found\x20for\x20this\x20attempt','hasChanges','\x0aApply\x20these\x20changes?','set','No\x20attempts\x20found\x20for:\x20','fill','Tip:\x20cd\x20to\x20workflows/','Session\x20not\x20found:\x20','Params:\x20','text','resolveProject','jsonl','key','localeCompare','done','site','\x0aDry\x20run\x20-\x20no\x20files\x20written','\x20\x20Target:\x20','\x22\x20with\x20new\x20revision?','durationMs','session','Warning:','\x20\x20Project\x20ID:\x20','(use\x20--limit\x20to\x20see\x20more)','summary','194938gieElo','cyan','599210CGmTzs','kill','resolve','✔\x20Workflow\x20run\x20started','No\x20sessions\x20found\x20in\x20project:\x20','finishedAt','targetExists','12393CDJhlX','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','133waeiBd','---\x20','min','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','✔\x20Clone\x20complete','Revision:\x20','/attempt/','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','fileSize','workflow:tasks','No\x20attempts\x20found','\x0aPush\x20these\x20changes?','round','get','readFile','resolveProjectId','workflow:attempts','Error:','startTime','No\x20workflow\x20sessions\x20found','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','pending','\x20(use\x20--limit\x20to\x20show\x20more)','end','Pushing\x20project...','No\x20workflow\x20tdx.json\x20found','Project\x20filter:\x20','Error:\x20','parseProjectWorkflowPattern','isArray','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','renderSessionsTimeline','project','cancelRequested','sourceDir','log','\x20secrets...','💡\x20Tip:\x20Use\x20','workflow:download','trim','POLL_INTERVAL_MS','running','Filter:\x20project=','success','columns','match','includes','buildTimelineData','new','New\x20project\x20name:\x20','ICON_WIDTH','showWorkflowConsoleUrl','displayLine','state','Source\x20project:\x20','Getting\x20attempt\x20tasks...','Start\x20a\x20workflow\x20run','\x20\x20Project:\x20','Select\x20a\x20workflow\x20to\x20run','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','retryAttemptName','force','renderSingleTimeline','No\x20sessions\x20with\x20timing\x20information','Source\x20directory:\x20','MIN_LABEL_COUNT','MAX_LABEL_COUNT','workflow:pull','⚠\x20Showing\x20first\x20','projectId','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','skipValidation','Latest\x20session\x20has\x20no\x20attempt','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Loading\x20workflows...','Select\x20a\x20session\x20to\x20view\x20timeline:','stat','✔\x20Secret\x20\x27','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Including\x20subtasks:\x20yes','Include\x20retried:\x20yes','Deleting\x20secret...','\x20\x20Source:\x20','verbose','resolveProjectDir','unknown','Listing\x20workflow\x20attempts...','\x20secret','Cloning\x20to\x20','tdx\x20wf\x20attempt\x20','isNewProject','✔\x20Project\x20updated','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','setSecrets','Loading\x20session...','existingProjectId','📋\x20','\x20unchanged','includeSubtasks','\x20is\x20not\x20a\x20directory','follow','some','Invalid\x20format:\x20','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','212312qmhxbi','updatedAt','max','taskName','retryAttempt','🔄\x20','\x0a✔\x20Attempt\x20complete','Expected\x20format:\x20--param\x20key=value','Session\x20','projects','From\x20task:\x20','✔\x20Showing\x20','revision','88ejtaOf','\x20task','MAX_TIMELINE_WIDTH','Pulling\x20project\x20','type','workflow:secrets:set','output','\x20\x20New\x20attempt\x20ID:\x20','name','dim','Getting\x20attempt\x20details...','\x20\x20Console:\x20','modified','.\x20Expected\x20format:\x20KEY=VALUE','resumeFrom','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','size','66090kyuonI','Using\x20attempt\x20','logs','\x20\x20Session\x20ID:\x20','floor','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','group_error','deleted','requireProject','revision:\x20','Setting\x20','✔\x20Downloaded\x20','Error:\x20Attempt\x20ID\x20is\x20required','run','\x20secrets\x20set\x20for\x20project\x20\x27','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','download','unchanged','\x1b[1A\x1b[2K','-\x20no\x20files\x20written','Resolving\x20project\x20\x27','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','\x20\x20Session\x20context\x20set\x20to:\x20','11046123RHuLbC','execute','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Workflow:\x20','Deleting\x20project\x20','parse','filter','✔\x20Workflow\x20project\x20context\x20cleared.','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','workflowName','\x20workflow','createdAt','length','navigateSessionsInteractive','Show\x20tasks\x20for\x20an\x20attempt','startedAt','✔\x20Found\x20','Listing\x20workflows...','getFullYear','workflow:sessions','\x20to\x20see\x20detailed\x20logs','select','MAX_TASKS_DISPLAY','limit','from','Target:\x20','\x0a✔\x20Already\x20up\x20to\x20date','index','newProjectId','pollTimeline','padStart','format','Retrying\x20attempt...','\x20\x20Changes:\x20','workflow:retry','\x20of\x20','/sessions/','yes','Pull\x20workflow\x20project\x20to\x20local\x20folder','No\x20sessions\x20found','No\x20projects\x20match\x20pattern:\x20','sessions','planned','value','sessionTime','retrySession','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','error','Project:\x20','stringify','Killing\x20attempt...','all','getDate','\x0a⚠\x20Project\x20\x22','slice','getMonth','logFiles','red','531OwhroE','repeat','\x20modified','workflow:use','Files\x20to\x20upload:\x20','cwd','No\x20workflow\x20projects\x20found','newProjectName','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Files\x20extracted:\x20','Project\x20name:\x20','Failed\x20to\x20fetch\x20attempt\x20data','list','\x0aUpdate\x20existing\x20project\x20\x22','Attempt:\x20','table','fullName','\x20\x20Revision:\x20','attempt','sort','sessionId','white','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','executeCloneProject','title','param','lastAttempt','renderTimeline','clear','changes','blue','workflow:workflows','yellow','json','task','map','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Listing\x20secrets...','Attempt\x20ID:\x20','duration','push','split','workflow:kill','\x20from\x20session\x20','getTime','...','sourceProjectName','\x22\x20to\x20new\x20project\x20\x22','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','message','Downloading\x20project\x20','tasks','\x20project','Dry\x20run:\x20yes','Source\x20directory\x20is\x20required','Cancelled','workflows','workflow:secrets:list','Starting\x20workflow\x20run...','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','No\x20workflows\x20found','dryRun','Task\x20name:\x20','icon','Filter:\x20','/app/workflows/','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x0aPolling...\x20(','No\x20log\x20content\x20found','→\x20Project:\x20','isTTY','every','workflow','basename','MIN_TIMELINE_WIDTH','\x20\x20Location:\x20','find','generateSessionTimelineRows','\x20(system)','Key:\x20','\x20\x20tdx\x20wf\x20use\x20<project>','fs/promises','(unknown)','startsWith','workflow:delete','getHours','Validation:\x20skipped','attemptId','targetDir','listSecrets','keys','MAX_POLL_ITERATIONS','\x0aDry\x20run\x20-\x20nothing\x20pushed','Listing\x20workflow\x20sessions...','workflow:upload','metadata','splice','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','toLowerCase','\x0aFailed\x20to\x20fetch\x20attempt\x20data','green','✔\x20Deleted\x20project\x20','Pattern:\x20','✔\x20Retry\x20started','join','path','Usage:\x20workflow:delete\x20<project-name-or-id>','applyPullProject','projectName','toISOString','description','TASK_NAME_WIDTH','Kill\x20a\x20running\x20attempt','workflowProject','fileCount','Parameters:\x20','fromTask','write','-\x20nothing\x20pushed','Show\x20specific\x20attempt\x20details','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','msPerChar','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','\x20sessions\x20','No\x20workflows\x20found\x20in\x20project:\x20','No\x20sessions\x20found\x20for:\x20','\x20-\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','prepareCloneProject','substring','No\x20attempts\x20found\x20in\x20project:\x20','Workflow:\x20','List\x20workflow\x20attempts','filesExtracted','start','Select\x20a\x20task\x20to\x20view\x20logs:','relative','now','workflow:push','ICON_SPACING','\x27...','diff','GUTTER','attempt:','sys','Project\x20directory:\x20','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Output\x20directory:\x20','Auto-selected\x20latest\x20session:\x20','Error:\x20Project\x20name\x20is\x20required','data','→\x20New\x20project:\x20','✔\x20Project:\x20','deleteSecret'];a52_0x2d2f=function(){return _0x251d6b;};return a52_0x2d2f();}function formatElapsed(_0x5439d6){const _0x2ed820=a52_0xa13f07,_0x2849d0=Math[_0x2ed820(0x21a)](_0x5439d6/0x3e8),_0x281726=Math[_0x2ed820(0x21a)](_0x2849d0/0x3c),_0x2c077a=Math[_0x2ed820(0x21a)](_0x281726/0x3c),_0x445392=Math['floor'](_0x2c077a/0x18);if(_0x445392>0x0){const _0x24d1a3=_0x2c077a%0x18;return _0x24d1a3>0x0?_0x445392+'d\x20'+_0x24d1a3+'h':_0x445392+'d';}else{if(_0x2c077a>0x0){const _0x5eb734=_0x281726%0x3c;return _0x5eb734>0x0?_0x2c077a+'h\x20'+_0x5eb734+'m':_0x2c077a+'h';}else{if(_0x281726>0x0){const _0x46ccf4=_0x2849d0%0x3c;return _0x46ccf4>0x0?_0x281726+'m\x20'+_0x46ccf4+'s':_0x281726+'m';}else return _0x2849d0+'s';}}}function formatTimestamp(_0x54944a,_0x79d75e){const _0x365598=a52_0xa13f07,_0x54372d=new Date(_0x54944a),_0x47bfaf=String(_0x54372d[_0x365598(0x109)]())[_0x365598(0x98)](0x2,'0'),_0x3a71dd=String(_0x54372d['getMinutes']())[_0x365598(0x98)](0x2,'0'),_0x95f7c1=_0x47bfaf+':'+_0x3a71dd,_0x3c96da=_0x54372d[_0x365598(0x8c)]()===_0x79d75e[_0x365598(0x8c)]()&&_0x54372d[_0x365598(0xb1)]()===_0x79d75e[_0x365598(0xb1)]()&&_0x54372d[_0x365598(0xae)]()===_0x79d75e['getDate']();if(_0x3c96da)return _0x95f7c1;else{const _0x4f3b9c=String(_0x54372d[_0x365598(0xb1)]()+0x1)[_0x365598(0x98)](0x2,'0'),_0x10773d=String(_0x54372d[_0x365598(0xae)]())['padStart'](0x2,'0');return _0x4f3b9c+'-'+_0x10773d+'\x20'+_0x95f7c1;}}function formatDate(_0x426c20){const _0x1886a9=a52_0xa13f07,_0x182b86=_0x426c20[_0x1886a9(0x8c)](),_0x7bf82d=String(_0x426c20['getMonth']()+0x1)[_0x1886a9(0x98)](0x2,'0'),_0x4af8ab=String(_0x426c20['getDate']())['padStart'](0x2,'0');return _0x182b86+'-'+_0x7bf82d+'-'+_0x4af8ab;}function getTaskStateIcon(_0x4259a7){const _0x32aed2={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x32aed2[_0x4259a7]||'⚪';}function getBarChar(_0x2d6259){const _0x5f7663=a52_0xa13f07;return _0x2d6259===_0x5f7663(0xa9)||_0x2d6259===_0x5f7663(0x21c)?'×':'─';}function getBarColor(_0xc6afab){const _0x5298e=a52_0xa13f07,_0x5c449a={'success':a52_0x89d45['green'],'error':a52_0x89d45[_0x5298e(0xb3)],'group_error':a52_0x89d45['red'],'running':a52_0x89d45[_0x5298e(0xd2)],'blocked':a52_0x89d45[_0x5298e(0xd4)],'planned':a52_0x89d45[_0x5298e(0x20e)],'canceling':a52_0x89d45[_0x5298e(0xd4)]};return _0x5c449a[_0xc6afab]||a52_0x89d45[_0x5298e(0xc9)];}function parseTaskName(_0x103ebe){const _0x53e5c7=a52_0xa13f07;let _0x35842b=_0x103ebe['replace'](/^\++/,'');const _0x40fbde=_0x35842b['split']('+'),_0x16f6b2=_0x40fbde[_0x53e5c7(0x86)]>0x1?_0x40fbde['length']-0x2:0x0,_0x51f1e8=_0x40fbde[_0x40fbde[_0x53e5c7(0x86)]-0x1]||_0x35842b;return{'level':_0x16f6b2,'name':'+'+_0x51f1e8};}function truncateTaskName(_0x3934fe,_0x3772e3){const _0x32d8f3=a52_0xa13f07,_0x54fa66=stringWidth(_0x3934fe);if(_0x54fa66<=_0x3772e3)return _0x3934fe;let _0x4ebe7a=_0x3934fe;while(stringWidth(_0x4ebe7a+'…')>_0x3772e3&&_0x4ebe7a[_0x32d8f3(0x86)]>0x0){_0x4ebe7a=_0x4ebe7a[_0x32d8f3(0xb0)](0x0,-0x1);}return _0x4ebe7a+'…';}function calculateTimeScale(_0x76f760,_0x5fc72b){const _0x162826=a52_0xa13f07;return{'startTime':_0x76f760[_0x162826(0x13a)],'endTime':_0x76f760[_0x162826(0x1a6)],'durationMs':_0x76f760[_0x162826(0xdb)],'msPerChar':_0x76f760['duration']/_0x5fc72b};}function timeToPosition(_0x4cba2a,_0x54bad0,_0x1b9ba0){const _0x2d319f=a52_0xa13f07,_0xfb6b18=_0x4cba2a-_0x54bad0[_0x2d319f(0x1a1)],_0x29ac2c=Math[_0x2d319f(0x21a)](_0xfb6b18/_0x54bad0[_0x2d319f(0x12d)]);return Math[_0x2d319f(0x1fa)](0x0,Math[_0x2d319f(0x190)](_0x29ac2c,_0x1b9ba0));}function renderTimeAxis(_0x101575,_0x3c2698){const _0x6256a8=a52_0xa13f07,_0x41e269=Math[_0x6256a8(0x190)](TIMELINE_CONFIG[_0x6256a8(0x1d2)],Math[_0x6256a8(0x1fa)](TIMELINE_CONFIG[_0x6256a8(0x1d1)],Math[_0x6256a8(0x21a)](_0x3c2698/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x1c5ae3=_0x101575[_0x6256a8(0x17d)]/(_0x41e269-0x1),_0x1dc094=new Date(_0x101575['startTime']),_0x4850ec=[];for(let _0x2b9b93=0x0;_0x2b9b93<_0x41e269;_0x2b9b93++){const _0x292343=_0x101575[_0x6256a8(0x1a1)]+_0x2b9b93*_0x1c5ae3,_0x57509c=timeToPosition(_0x292343,_0x101575,_0x3c2698),_0x5dfefc=formatTimestamp(_0x292343,_0x1dc094);_0x4850ec['push']({'pos':_0x57509c,'text':_0x5dfefc});}const _0x42d706=new Array(_0x3c2698)[_0x6256a8(0x16f)]('\x20');let _0x35da30=-0x1;for(const {pos:_0x1130f6,text:_0x2fcf5e}of _0x4850ec){let _0x42acec=Math[_0x6256a8(0x1fa)](0x0,_0x1130f6-Math[_0x6256a8(0x21a)](_0x2fcf5e['length']/0x2));_0x42acec<=_0x35da30+TIMELINE_CONFIG[_0x6256a8(0x169)]&&(_0x42acec=_0x35da30+TIMELINE_CONFIG[_0x6256a8(0x169)]+0x1);_0x42acec+_0x2fcf5e[_0x6256a8(0x86)]>_0x3c2698&&(_0x42acec=_0x3c2698-_0x2fcf5e[_0x6256a8(0x86)]);if(_0x42acec>=0x0&&_0x42acec+_0x2fcf5e[_0x6256a8(0x86)]<=_0x3c2698&&_0x42acec>_0x35da30){for(let _0x59e14b=0x0;_0x59e14b<_0x2fcf5e[_0x6256a8(0x86)];_0x59e14b++){_0x42d706[_0x42acec+_0x59e14b]=_0x2fcf5e[_0x59e14b];}_0x35da30=_0x42acec+_0x2fcf5e[_0x6256a8(0x86)]-0x1;}}return _0x42d706['join']('');}function renderTaskRow(_0x1d95a6,_0x464593,_0x2b68c5,_0x1eeff9){const _0x529ed7=a52_0xa13f07,{level:_0x16a465,name:_0x2f093c}=parseTaskName(_0x1d95a6[_0x529ed7(0x20d)]),_0xb3ab2='\x20'[_0x529ed7(0xb5)](_0x16a465),_0x2c83c4=_0x1d95a6['window']?'('+formatElapsed(_0x1d95a6[_0x529ed7(0x159)]['duration'])+')':'',_0x8fd18d=stringWidth(_0x2c83c4),_0x5ab7ed=_0x16a465*0x1,_0x53e3e2=_0x1eeff9-_0x5ab7ed-_0x8fd18d-0x1,_0x36d119=truncateTaskName(_0x2f093c,_0x53e3e2),_0xc9588d=_0xb3ab2+_0x36d119,_0x2e3041=stringWidth(_0xc9588d),_0x111a69=_0x1eeff9-_0x2e3041-_0x8fd18d,_0x44a610=_0xc9588d+'\x20'[_0x529ed7(0xb5)](Math[_0x529ed7(0x1fa)](0x1,_0x111a69))+a52_0x89d45[_0x529ed7(0x20e)](_0x2c83c4),_0x5ea4f9=getTaskStateIcon(_0x1d95a6[_0x529ed7(0x1c4)]),_0x8ed5be=new Array(_0x2b68c5)[_0x529ed7(0x16f)]('\x20');if(_0x1d95a6[_0x529ed7(0x159)]){const _0x2b59ce=timeToPosition(_0x1d95a6[_0x529ed7(0x159)][_0x529ed7(0x13a)],_0x464593,_0x2b68c5),_0x1f8d8d=timeToPosition(_0x1d95a6[_0x529ed7(0x159)]['end'],_0x464593,_0x2b68c5),_0x1b6f92=getBarChar(_0x1d95a6['state']),_0x298f3e=Math[_0x529ed7(0x1fa)](_0x2b59ce+0x1,_0x1f8d8d);for(let _0x4ac7a5=_0x2b59ce;_0x4ac7a5<Math[_0x529ed7(0x190)](_0x298f3e,_0x2b68c5);_0x4ac7a5++){_0x8ed5be[_0x4ac7a5]=_0x1b6f92;}}const _0x91d0b2=getBarColor(_0x1d95a6[_0x529ed7(0x1c4)]),_0x2c04dd=_0x8ed5be[_0x529ed7(0xd7)](_0x1f7150=>_0x1f7150==='\x20'?'\x20':_0x91d0b2(_0x1f7150))['join']('');return _0x5ea4f9+'\x20'+_0x44a610+'│'+_0x2c04dd+'│';}function calculateStats(_0x138090){const _0x57b0b9=a52_0xa13f07,_0x1b688c={'total':_0x138090[_0x57b0b9(0x86)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x58e571 of _0x138090){if(_0x58e571['state']===_0x57b0b9(0x1ba))_0x1b688c['success']++;else{if(_0x58e571[_0x57b0b9(0x1c4)]===_0x57b0b9(0xa9)||_0x58e571[_0x57b0b9(0x1c4)]==='group_error')_0x1b688c['error']++;else _0x58e571[_0x57b0b9(0x1c4)]==='running'?_0x1b688c[_0x57b0b9(0x1b8)]++:_0x1b688c[_0x57b0b9(0x1a4)]++;}}return _0x1b688c;}function formatStats(_0x1c4c54){const _0x440c29=a52_0xa13f07;return['Total:\x20'+_0x1c4c54['total'],'✅\x20'+_0x1c4c54[_0x440c29(0x1ba)],'❌\x20'+_0x1c4c54['error'],_0x440c29(0x1fd)+_0x1c4c54[_0x440c29(0x1b8)],'⏳\x20'+_0x1c4c54[_0x440c29(0x1a4)]][_0x440c29(0x11c)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a52_0xa13f07(0x20d)]=a52_0xa13f07(0x15e);[a52_0xa13f07(0x122)]=a52_0xa13f07(0x18d);async['execute'](_0x1f8f91){const _0xf4c989=a52_0xa13f07,{options:_0x3a17df,args:_0x13eb4d,tdx:_0x359c05}=_0x1f8f91;let _0x4c6d1e,_0x539f9f,_0x13d3c1=![];if(_0x13eb4d[0x0]){if(_0x13eb4d[0x0][_0xf4c989(0x1bd)]('.')){const _0x2af1ee=this['parseProjectWorkflowPattern'](_0x13eb4d,_0x3a17df);if(!_0x2af1ee)return 0x1;_0x4c6d1e=_0x2af1ee['projectName'],_0x539f9f=_0x2af1ee[_0xf4c989(0x83)];}else{_0x539f9f=_0x13eb4d[0x0],_0x4c6d1e=_0x3a17df[_0xf4c989(0x125)];if(!_0x4c6d1e)return console['error'](a52_0x89d45[_0xf4c989(0xb3)]('Error:'),_0xf4c989(0x191)),0x1;_0x13d3c1=!![];}}else{const _0x1e60b6=this[_0xf4c989(0x1ab)](_0x13eb4d,_0x3a17df);if(!_0x1e60b6)return 0x1;_0x4c6d1e=_0x1e60b6['projectName'],_0x539f9f=_0x1e60b6[_0xf4c989(0x83)];}if(_0x3a17df['verbose']){if(_0x4c6d1e&&_0x539f9f)console[_0xf4c989(0xa9)](_0xf4c989(0xf4)+_0x4c6d1e+'.'+_0x539f9f);else _0x4c6d1e&&console[_0xf4c989(0xa9)]('Filter:\x20project='+_0x4c6d1e);}const _0x304ce9=_0x3a17df[_0xf4c989(0x10b)],_0x3ad4ae=_0x3a17df[_0xf4c989(0xc8)];if(_0x304ce9){_0x3ad4ae&&console[_0xf4c989(0xa9)](a52_0x89d45[_0xf4c989(0xd4)](_0xf4c989(0x17f)),_0xf4c989(0x15d));const _0x488904=_0x3a17df[_0xf4c989(0x1f4)];return _0x488904?await this['pollTimeline'](_0x1f8f91,_0x304ce9):await this[_0xf4c989(0x1ce)](_0x1f8f91,_0x304ce9,_0x3a17df),0x0;}if(_0x3ad4ae){const _0x182d27=await withSpinner(_0xf4c989(0x1ee),()=>_0x359c05[_0xf4c989(0xfc)][_0xf4c989(0xa3)]({'projectName':_0x4c6d1e,'workflowName':_0x539f9f,'limit':0x64}),{'verbose':_0x3a17df[_0xf4c989(0x1e3)]}),_0x28d646=_0x182d27[_0xf4c989(0x14b)][_0xf4c989(0x100)](_0x1d47a6=>_0x1d47a6['id']===_0x3ad4ae);if(!_0x28d646)return console[_0xf4c989(0xa9)](a52_0x89d45[_0xf4c989(0xb3)]('Error:'),_0xf4c989(0x171)+_0x3ad4ae),0x1;if(!_0x28d646[_0xf4c989(0xce)]?.['id'])return console[_0xf4c989(0xa9)](a52_0x89d45['red'](_0xf4c989(0x1a0)),_0xf4c989(0x200)+_0x3ad4ae+'\x20has\x20no\x20attempts'),0x1;const _0x430093=_0x28d646[_0xf4c989(0xce)]['id'];_0x3a17df['verbose']&&console[_0xf4c989(0xa9)](_0xf4c989(0x217)+_0x430093+_0xf4c989(0xdf)+_0x3ad4ae);const _0x3deb68=_0x3a17df[_0xf4c989(0x1f4)];return _0x3deb68?await this[_0xf4c989(0x97)](_0x1f8f91,_0x430093):await this[_0xf4c989(0x1ce)](_0x1f8f91,_0x430093,_0x3a17df),0x0;}const _0x2e9a34=await withSpinner('Loading\x20sessions...',()=>_0x359c05[_0xf4c989(0xfc)][_0xf4c989(0xa3)]({'projectName':_0x4c6d1e,'workflowName':_0x539f9f,'limit':_0x3a17df[_0xf4c989(0x91)]||0x32}),{'verbose':_0x3a17df['verbose']}),_0x1d4897=_0x2e9a34[_0xf4c989(0x14b)];if(_0x1d4897[_0xf4c989(0x86)]===0x0){if(_0x4c6d1e&&_0x539f9f)console[_0xf4c989(0xa9)](_0xf4c989(0x131)+_0x4c6d1e+'.'+_0x539f9f);else _0x4c6d1e?console[_0xf4c989(0xa9)](_0xf4c989(0x189)+_0x4c6d1e):(console[_0xf4c989(0xa9)](_0xf4c989(0x1a2)),console[_0xf4c989(0xa9)](a52_0x89d45['dim'](_0xf4c989(0x214))));return 0x0;}_0x1d4897[_0xf4c989(0xc7)]((_0xdf7ca7,_0x19c185)=>{const _0x1581a9=_0xf4c989,_0x21810f=_0xdf7ca7[_0x1581a9(0xa6)]||'',_0x3f8185=_0x19c185['sessionTime']||'';return _0x3f8185[_0x1581a9(0x177)](_0x21810f);});if(_0x3a17df[_0xf4c989(0xd5)]||_0x3a17df[_0xf4c989(0x175)])return await handleSDKOutput(_0x1d4897,_0x3a17df),0x0;let _0x594757;if(_0x13d3c1){const _0x2813de=_0x1d4897[0x0];if(!_0x2813de[_0xf4c989(0xce)]?.['id'])return console[_0xf4c989(0xa9)](_0xf4c989(0x1d8)),0x0;_0x594757=_0x2813de['lastAttempt']['id'],_0x3a17df[_0xf4c989(0x1e3)]&&console[_0xf4c989(0xa9)](_0xf4c989(0x149)+_0x2813de[_0xf4c989(0xa6)]);}else{const _0x3fcabb=_0x1d4897[_0xf4c989(0xd7)](_0x346691=>{const _0x271d3a=_0xf4c989,_0x3b5a48=getAttemptStatusDisplay(_0x346691[_0x271d3a(0xce)]);return{'title':_0x346691[_0x271d3a(0x1af)]?.[_0x271d3a(0x20d)]+'.'+_0x346691['workflow']?.[_0x271d3a(0x20d)]+'\x20-\x20'+_0x346691[_0x271d3a(0xa6)]+'\x20'+_0x3b5a48[_0x271d3a(0xf3)],'value':_0x346691['lastAttempt']?.['id']||'','description':_0x3b5a48[_0x271d3a(0x173)]};}),_0x394b6f=await a52_0x4bedff({'type':_0xf4c989(0x8f),'name':_0xf4c989(0x10b),'message':_0xf4c989(0x1db),'choices':_0x3fcabb[_0xf4c989(0x80)](_0x39c6c2=>_0x39c6c2[_0xf4c989(0xa5)]!=='')});if(!_0x394b6f['attemptId'])return 0x0;_0x594757=_0x394b6f['attemptId'];}const _0x5d127a=_0x3a17df[_0xf4c989(0x1f4)];return _0x5d127a?await this['pollTimeline'](_0x1f8f91,_0x594757):await this['renderSingleTimeline'](_0x1f8f91,_0x594757,_0x3a17df),0x0;}async[a52_0xa13f07(0x1ce)](_0x582131,_0x51fe90,_0x52a062){const _0x539c68=a52_0xa13f07,{tdx:_0x56df05}=_0x582131;let _0x2a09c6,_0x4d8169;try{[_0x2a09c6,_0x4d8169]=await Promise[_0x539c68(0xad)]([_0x56df05['workflow']['attempt'](_0x51fe90),_0x56df05[_0x539c68(0xfc)][_0x539c68(0xe7)](_0x51fe90,![])]);}catch(_0x382108){console[_0x539c68(0xa9)](a52_0x89d45['red'](_0x539c68(0xbf)));_0x52a062[_0x539c68(0x1e3)]&&console[_0x539c68(0xa9)](_0x382108);throw _0x382108;}if(_0x52a062[_0x539c68(0xd5)]||_0x52a062[_0x539c68(0x175)]){const _0x1dfb5c=this[_0x539c68(0x1be)](_0x2a09c6,_0x4d8169);await handleSDKOutput([_0x1dfb5c],_0x52a062);return;}const _0x368e19=_0x56df05[_0x539c68(0x164)]['site'],_0x17cc76=this[_0x539c68(0xcf)](_0x2a09c6,_0x4d8169,_0x368e19);console[_0x539c68(0x1b2)](_0x17cc76);}async[a52_0xa13f07(0x97)](_0x528be9,_0x4cd34a){const _0x1ea866=a52_0xa13f07,{tdx:_0x597360}=_0x528be9,_0x2b012=TIMELINE_CONFIG[_0x1ea866(0x1b7)],_0x26a4e4=TIMELINE_CONFIG[_0x1ea866(0x10f)];let _0x20975e=0x0;while(_0x20975e<_0x26a4e4){process['stdout'][_0x1ea866(0xfa)]&&process[_0x1ea866(0x15c)][_0x1ea866(0x129)]('\x1bc');let _0x3d6282,_0x1e7db0;try{[_0x3d6282,_0x1e7db0]=await Promise['all']([_0x597360['workflow']['attempt'](_0x4cd34a),_0x597360['workflow'][_0x1ea866(0xe7)](_0x4cd34a,![])]);}catch(_0x545221){console[_0x1ea866(0xa9)](a52_0x89d45[_0x1ea866(0xb3)](_0x1ea866(0x117)));_0x20975e>0x0&&console[_0x1ea866(0xa9)](a52_0x89d45[_0x1ea866(0x20e)](_0x1ea866(0x1ca)+_0x20975e));throw _0x545221;}const _0x3a8bb1=_0x597360['context'][_0x1ea866(0x179)],_0x29b13a=this['renderTimeline'](_0x3d6282,_0x1e7db0,_0x3a8bb1);console[_0x1ea866(0x1b2)](_0x29b13a);const _0xe1c5f9=_0x3d6282['done']&&_0x1e7db0[_0x1ea866(0xfb)](_0x4f7f08=>_0x4f7f08[_0x1ea866(0x1c4)]!==_0x1ea866(0x1b8)&&_0x4f7f08[_0x1ea866(0x1c4)]!=='planned');if(_0xe1c5f9){console[_0x1ea866(0xa9)](a52_0x89d45[_0x1ea866(0x118)](_0x1ea866(0x1fe)));break;}console[_0x1ea866(0xa9)](a52_0x89d45[_0x1ea866(0x20e)](_0x1ea866(0xf7)+_0x20975e*0x2+_0x1ea866(0x133))),await new Promise(_0x232791=>setTimeout(_0x232791,_0x2b012)),_0x20975e++;}_0x20975e>=_0x26a4e4&&console[_0x1ea866(0xa9)](a52_0x89d45[_0x1ea866(0xd4)](_0x1ea866(0x1a3)));}[a52_0xa13f07(0xcf)](_0x2fa615,_0x4482bc,_0x1ef76a){const _0x41ce9e=a52_0xa13f07,_0x1ac4b2=[],_0x562995=TIMELINE_CONFIG[_0x41ce9e(0x123)],_0x5d2f4e=0x5,_0x13caef=process['stdout'][_0x41ce9e(0x1bb)]||0x78,_0x15d545=_0x13caef-_0x562995-_0x5d2f4e,_0x4084f0=Math['max'](TIMELINE_CONFIG[_0x41ce9e(0xfe)],Math[_0x41ce9e(0x190)](_0x15d545,TIMELINE_CONFIG[_0x41ce9e(0x207)])),_0x21c64a=new Date(_0x2fa615[_0x41ce9e(0x85)])[_0x41ce9e(0xe0)](),_0x3ef030=_0x2fa615[_0x41ce9e(0x18a)]?new Date(_0x2fa615[_0x41ce9e(0x18a)])['getTime']():Date[_0x41ce9e(0x13d)](),_0x2ab90d={'start':_0x21c64a,'end':_0x3ef030,'duration':_0x3ef030-_0x21c64a},_0x2d4b44=new Map(),_0xacb5c8=[];for(const _0x276caa of _0x4482bc){if(_0x276caa[_0x41ce9e(0x89)]){const _0x109cb3=new Date(_0x276caa[_0x41ce9e(0x89)])[_0x41ce9e(0xe0)](),_0x416ec6=_0x276caa['updatedAt']?new Date(_0x276caa[_0x41ce9e(0x1f9)])[_0x41ce9e(0xe0)]():Date[_0x41ce9e(0x13d)](),_0x127096={'start':_0x109cb3,'end':_0x416ec6,'duration':_0x416ec6-_0x109cb3};_0x2d4b44[_0x41ce9e(0x16d)](_0x276caa['id'],_0x127096),_0xacb5c8[_0x41ce9e(0xdc)]({'name':_0x276caa[_0x41ce9e(0xc4)],'state':_0x276caa[_0x41ce9e(0x1c4)]||_0x41ce9e(0x1e5),'window':_0x127096});}else _0xacb5c8[_0x41ce9e(0xdc)]({'name':_0x276caa[_0x41ce9e(0xc4)],'state':_0x276caa['state']||_0x41ce9e(0xa4),'window':undefined});}_0xacb5c8['sort']((_0x5e1b4e,_0x48688e)=>{const _0x5abea4=_0x41ce9e;if(!_0x5e1b4e[_0x5abea4(0x159)])return 0x1;if(!_0x48688e[_0x5abea4(0x159)])return-0x1;return _0x5e1b4e[_0x5abea4(0x159)][_0x5abea4(0x13a)]-_0x48688e['window'][_0x5abea4(0x13a)];});const _0x4e8192=_0xacb5c8[_0x41ce9e(0x86)],_0x44c205=_0x4e8192>TIMELINE_CONFIG[_0x41ce9e(0x90)];_0x44c205&&_0xacb5c8[_0x41ce9e(0x114)](TIMELINE_CONFIG[_0x41ce9e(0x90)]);const _0x2dc6bc=calculateTimeScale(_0x2ab90d,_0x4084f0),_0x4c5487=_0x2fa615[_0x41ce9e(0x178)]?_0x2fa615[_0x41ce9e(0x1ba)]?a52_0x89d45[_0x41ce9e(0x118)](_0x41ce9e(0x1ba)):a52_0x89d45[_0x41ce9e(0xb3)](_0x41ce9e(0xa9)):a52_0x89d45['blue'](_0x41ce9e(0x1b8)),_0x2ce9a9=_0x2fa615['project']?.['id'],_0x5cab6b=_0x2fa615[_0x41ce9e(0xc8)];let _0x906885;if(_0x2ce9a9&&_0x5cab6b){const _0x4dd600=getWorkflowAttemptUrl(_0x1ef76a,_0x2ce9a9,_0x5cab6b,_0x2fa615['id']);_0x906885=hyperlink(a52_0x89d45[_0x41ce9e(0x20e)](_0x2fa615['id']),_0x4dd600);}else _0x906885=a52_0x89d45[_0x41ce9e(0x20e)](_0x2fa615['id']);_0x1ac4b2[_0x41ce9e(0xdc)](_0x41ce9e(0xc2)+_0x906885+_0x41ce9e(0x132)+_0x4c5487+_0x41ce9e(0x132)+formatElapsed(_0x2ab90d[_0x41ce9e(0xdb)]));if(_0xacb5c8[_0x41ce9e(0x86)]>0x0){const _0xf9a236=renderTimeAxis(_0x2dc6bc,_0x4084f0),_0x4e5aa3=new Date(_0x2ab90d['start']),_0x4c5a5a=formatDate(_0x4e5aa3),_0x4874f4=TIMELINE_CONFIG[_0x41ce9e(0x1c1)]+TIMELINE_CONFIG['ICON_SPACING']+_0x562995,_0x450c4e=_0x4c5a5a[_0x41ce9e(0x98)](_0x4874f4),_0x4f3eef=a52_0x89d45[_0x41ce9e(0x20e)](_0x450c4e);_0x1ac4b2[_0x41ce9e(0xdc)](_0x4f3eef+'\x20'+_0xf9a236);for(const _0x9e70c0 of _0xacb5c8){_0x1ac4b2[_0x41ce9e(0xdc)](renderTaskRow(_0x9e70c0,_0x2dc6bc,_0x4084f0,_0x562995));}const _0x52cf61=calculateStats(_0xacb5c8);_0x1ac4b2[_0x41ce9e(0xdc)](formatStats(_0x52cf61)),_0x44c205&&_0x1ac4b2[_0x41ce9e(0xdc)](a52_0x89d45['yellow'](_0x41ce9e(0x1d4)+TIMELINE_CONFIG[_0x41ce9e(0x90)]+_0x41ce9e(0x9d)+_0x4e8192+'\x20tasks')),_0x1ac4b2[_0x41ce9e(0xdc)](''),_0x1ac4b2[_0x41ce9e(0xdc)](a52_0x89d45['dim'](_0x41ce9e(0x1b4))+(_0x41ce9e(0x1e9)+_0x2fa615['id']+_0x41ce9e(0x163))+a52_0x89d45[_0x41ce9e(0x20e)](_0x41ce9e(0x8e)));}else _0x1ac4b2[_0x41ce9e(0xdc)](_0x41ce9e(0xa8));return _0x1ac4b2[_0x41ce9e(0x11c)]('\x0a');}[a52_0xa13f07(0x1be)](_0x298370,_0x169517){const _0x2e369f=a52_0xa13f07,_0x28a5a9=new Date(_0x298370[_0x2e369f(0x85)])[_0x2e369f(0xe0)](),_0x3b39d6=_0x298370[_0x2e369f(0x18a)]?new Date(_0x298370[_0x2e369f(0x18a)])[_0x2e369f(0xe0)]():Date[_0x2e369f(0x13d)](),_0x5f012b=_0x3b39d6-_0x28a5a9,_0x10a908=[];for(const _0xf1dce0 of _0x169517){if(_0xf1dce0[_0x2e369f(0x89)]){const _0x58fad1=new Date(_0xf1dce0[_0x2e369f(0x89)])[_0x2e369f(0xe0)](),_0x4def82=_0xf1dce0['updatedAt']?new Date(_0xf1dce0[_0x2e369f(0x1f9)])[_0x2e369f(0xe0)]():Date[_0x2e369f(0x13d)]();_0x10a908[_0x2e369f(0xdc)]({'name':_0xf1dce0[_0x2e369f(0xc4)],'state':_0xf1dce0[_0x2e369f(0x1c4)]||'unknown','window':{'start':_0x58fad1,'end':_0x4def82,'duration':_0x4def82-_0x58fad1}});}else _0x10a908[_0x2e369f(0xdc)]({'name':_0xf1dce0[_0x2e369f(0xc4)],'state':_0xf1dce0[_0x2e369f(0x1c4)]||'planned','window':undefined});}const _0x523fc2=calculateStats(_0x10a908);return{'attempt':{'id':_0x298370['id'],'status':_0x298370['done']?_0x298370['success']?_0x2e369f(0x1ba):_0x2e369f(0xa9):_0x2e369f(0x1b8),'createdAt':_0x298370[_0x2e369f(0x85)],'finishedAt':_0x298370[_0x2e369f(0x18a)],'duration_ms':_0x5f012b},'tasks':_0x10a908[_0x2e369f(0xd7)](_0x5b6388=>({'name':_0x5b6388[_0x2e369f(0x20d)],'state':_0x5b6388[_0x2e369f(0x1c4)],'startedAt':_0x5b6388['window']?new Date(_0x5b6388[_0x2e369f(0x159)]['start'])['toISOString']():null,'updatedAt':_0x5b6388[_0x2e369f(0x159)]?new Date(_0x5b6388[_0x2e369f(0x159)]['end'])[_0x2e369f(0x121)]():null,'duration_ms':_0x5b6388[_0x2e369f(0x159)]?.[_0x2e369f(0xdb)]||null})),'stats':_0x523fc2};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a53_0x2016(_0x701254,_0xa537ed){_0x701254=_0x701254-0x89;const _0x8ad862=a53_0x8ad8();let _0x2016eb=_0x8ad862[_0x701254];return _0x2016eb;}(function(_0x91cff1,_0x5b8e9b){const _0x811c5d=a53_0x2016,_0x323c16=_0x91cff1();while(!![]){try{const _0x5f1bf0=parseInt(_0x811c5d(0x91))/0x1+-parseInt(_0x811c5d(0x92))/0x2*(parseInt(_0x811c5d(0x99))/0x3)+-parseInt(_0x811c5d(0x97))/0x4+-parseInt(_0x811c5d(0x8a))/0x5+-parseInt(_0x811c5d(0x90))/0x6*(-parseInt(_0x811c5d(0x94))/0x7)+-parseInt(_0x811c5d(0x8d))/0x8+parseInt(_0x811c5d(0x93))/0x9;if(_0x5f1bf0===_0x5b8e9b)break;else _0x323c16['push'](_0x323c16['shift']());}catch(_0x4d4aeb){_0x323c16['push'](_0x323c16['shift']());}}}(a53_0x8ad8,0xeaaab));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a53_0x8ad8(){const _0x302494=['32osrbVf','48155733YuvtLz','70dIirYA','Authorization','entries','6465684ISqSJZ','tdx/','212916XobWsh','tdx','2451700hjUdtX','replace','TD1\x20','11661504sIBFMd','X-Trino-User','version','43986vxeKFX','237249CYMSYq'];a53_0x8ad8=function(){return _0x302494;};return a53_0x8ad8();}export function getUserAgent(){const _0x5d4691=a53_0x2016,_0xdf5848=getVersion(),_0x1dda2b=platform(),_0xa26602=process[_0x5d4691(0x8f)][_0x5d4691(0x8b)]('v','');return _0x5d4691(0x98)+_0xdf5848+'\x20('+_0x1dda2b+';\x20node/'+_0xa26602+')';}export function getAuthHeaders(_0x4ffa59,_0x3a9352,_0x101248){const _0x3f685b=a53_0x2016,_0x38746d=getVersion(),_0x1d93e8={'User-Agent':getUserAgent(),'X-TD-Client':_0x3f685b(0x89),'X-TD-Client-Version':_0x38746d};if(_0x101248)_0x1d93e8[_0x3f685b(0x95)]='Bearer\x20'+_0x101248;else _0x3a9352&&(_0x1d93e8[_0x3f685b(0x95)]=_0x3f685b(0x8c)+_0x3a9352);return _0x1d93e8;}export function toHeaderRecord(_0x23c304){const _0x5e6bb0=a53_0x2016,_0xb8e4e7={};for(const [_0x4c1e7d,_0x437969]of Object[_0x5e6bb0(0x96)](_0x23c304)){_0x437969!==undefined&&(_0xb8e4e7[_0x4c1e7d]=_0x437969);}return _0xb8e4e7;}export function getTrinoHeaders(_0x3c8676,_0x361df8,_0x3c4019){const _0x4a9125=a53_0x2016,_0x43fd5a=getAuthHeaders(_0x3c8676),_0x47e64c=toHeaderRecord(_0x43fd5a);if(_0x3c4019)_0x47e64c['Authorization']='Bearer\x20'+_0x3c4019;else _0x361df8&&(_0x47e64c[_0x4a9125(0x8e)]=_0x361df8);return _0x47e64c;}export function hasAPIKey(_0x556051){const _0x38d787=getAPIKey();return _0x38d787!==undefined&&_0x38d787['length']>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x44f65f,_0xe75728){const _0x2e3210=a53_0x5ef9,_0x233248=_0x44f65f();while(!![]){try{const _0x418919=-parseInt(_0x2e3210(0x1bb))/0x1+parseInt(_0x2e3210(0x1c3))/0x2+-parseInt(_0x2e3210(0x197))/0x3*(-parseInt(_0x2e3210(0x1a0))/0x4)+parseInt(_0x2e3210(0x1bf))/0x5*(-parseInt(_0x2e3210(0x188))/0x6)+parseInt(_0x2e3210(0x18e))/0x7*(-parseInt(_0x2e3210(0x193))/0x8)+-parseInt(_0x2e3210(0x19a))/0x9*(-parseInt(_0x2e3210(0x196))/0xa)+parseInt(_0x2e3210(0x19c))/0xb;if(_0x418919===_0xe75728)break;else _0x233248['push'](_0x233248['shift']());}catch(_0x29f9c8){_0x233248['push'](_0x233248['shift']());}}}(a53_0x1d70,0x48722));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a53_0x187921 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1cc55c){const _0x156f42=a53_0x5ef9;return _0x1cc55c[_0x156f42(0x1c1)]==='json'||_0x1cc55c[_0x156f42(0x1c1)]===_0x156f42(0x1a2)||_0x1cc55c[_0x156f42(0x1c1)]===_0x156f42(0x195)||_0x1cc55c['format']==='table'||_0x1cc55c[_0x156f42(0x194)]===!![]||_0x1cc55c[_0x156f42(0x1a2)]===!![]||_0x1cc55c[_0x156f42(0x195)]===!![]||_0x1cc55c[_0x156f42(0x1be)]===!![];}function a53_0x1d70(){const _0x3ae2d5=['error','length','push','limit','resolve','[error]','inherit','[rule]','object','─┴─','152671SEMZyN','limitStructuredFormats','repeat','table','415ttBhmz','spawn','format','No\x20data','890934YOfdmK','close','params','cyan','bigint','blue','trim','list','bold','pipe','cmdout','end','filter','write','less','noColor','14604GzntGw','FINISHED','rule','max','number','-FXRSn','112cCRCJk','varchar','split','padEnd','map','176744UZNTSc','json','tsv','17300iDNAZY','3PYoqUF','red','join','711cXjSPz','debug','1338359BmmDqz','stdin','stringify','forEach','1204452SqOdfc','color','jsonl','log','boolean','[logs]','entries','data','isInteger','query','keys','isFinite','stderr','output','string','Results\x20saved\x20to\x20','[query]'];a53_0x1d70=function(){return _0x3ae2d5;};return a53_0x1d70();}export function parseOutputOptions(_0x472f8b){const _0x4f5f1c=a53_0x5ef9;return{'format':_0x472f8b[_0x4f5f1c(0x1c1)]||'table','output':_0x472f8b['output']||'','limit':_0x472f8b[_0x4f5f1c(0x1b4)],'limitStructuredFormats':_0x472f8b[_0x4f5f1c(0x1bc)],'color':_0x472f8b[_0x4f5f1c(0x1a1)],'noColor':_0x472f8b[_0x4f5f1c(0x187)]};}function convertSDKResultToQueryResult(_0x30f7fa){const _0x51534d=a53_0x5ef9,_0xb1ecd6=[];if(_0x30f7fa[_0x51534d(0x1b2)]>0x0){const _0x1044d6=_0x30f7fa[0x0];for(const [_0x36a06b,_0x39fe73]of Object[_0x51534d(0x1a6)](_0x1044d6)){let _0x47698d=_0x51534d(0x18f);if(typeof _0x39fe73===_0x51534d(0x18c))_0x47698d=Number[_0x51534d(0x1a8)](_0x39fe73)?_0x51534d(0x1c7):'double';else{if(typeof _0x39fe73==='boolean')_0x47698d=_0x51534d(0x1a4);else _0x39fe73===null&&(_0x47698d='varchar');}_0xb1ecd6[_0x51534d(0x1b3)]({'name':_0x36a06b,'type':_0x47698d});}}return{'queryId':'sdk-result','columns':_0xb1ecd6,'data':_0x30f7fa,'stats':{'state':_0x51534d(0x189),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x30f7fa[_0x51534d(0x1b2)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x193f05,_0xabd7e4){const _0x44a09a=convertSDKResultToQueryResult(_0x193f05);return formatQueryOutput(_0x44a09a,_0xabd7e4);}export async function formatQueryOutput(_0x337db1,_0x15b64d){const _0x18af89=a53_0x5ef9,{format:_0x1e2fab,limit:_0x221370,output:_0x2e523e,color:_0x22de72,noColor:_0x3f7673,limitStructuredFormats:_0x28ab22}=_0x15b64d,_0xe68817=Boolean(_0x2e523e)&&!_0x22de72,_0x289016={'color':_0x22de72,'noColor':_0x3f7673||_0xe68817};if(_0x1e2fab===_0x18af89(0x1be)){const _0x4a2205=shouldUseLess(_0x1e2fab,_0x2e523e);return formatAsTable(_0x337db1,_0x221370,_0x4a2205,_0x289016);}const _0x28d30e=_0x28ab22&&Number[_0x18af89(0x1ab)](_0x221370)&&_0x337db1[_0x18af89(0x1a7)]['length']>_0x221370?{..._0x337db1,'data':_0x337db1[_0x18af89(0x1a7)]['slice'](0x0,_0x221370)}:_0x337db1;if(_0x1e2fab===_0x18af89(0x194))return formatAsJSON(_0x28d30e,_0x289016);else return _0x1e2fab==='jsonl'?formatAsJSONL(_0x28d30e,_0x289016):formatQueryResult(_0x28d30e,_0x1e2fab);}function shouldUseLess(_0x18d216,_0x3c183d){const _0x422c8b=a53_0x5ef9;return(_0x18d216===_0x422c8b(0x1be)||_0x18d216===_0x422c8b(0x1ca))&&process['stdout']['isTTY']&&!_0x3c183d;}export function resolveOutputOptions(_0x3dd2e3){const _0x9c341=a53_0x5ef9,_0x216e65=_0x3dd2e3['output']||'',_0x13a95a=resolveOutputFormat(_0x3dd2e3[_0x9c341(0x1c1)],_0x216e65,'table');let _0x247e25=typeof _0x3dd2e3[_0x9c341(0x1b4)]===_0x9c341(0x18c)?_0x3dd2e3[_0x9c341(0x1b4)]:parseInt(_0x3dd2e3[_0x9c341(0x1b4)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x3dd2e3[_0x9c341(0x1b4)]===undefined&&shouldUseLess(_0x13a95a,_0x216e65)&&(_0x247e25=Infinity),{'format':_0x13a95a,'output':_0x216e65,'limit':_0x247e25,'limitStructuredFormats':_0x3dd2e3['limitStructuredFormats'],'color':_0x3dd2e3[_0x9c341(0x1a1)],'noColor':_0x3dd2e3[_0x9c341(0x187)]};}export function writeOutput(_0x44414b,_0xd54b1b,_0x735ff8){const _0x29bee1=a53_0x5ef9;return _0xd54b1b?(writeFileSync(_0xd54b1b,_0x44414b),console[_0x29bee1(0x1b1)](_0x29bee1(0x1af)+_0xd54b1b),Promise[_0x29bee1(0x1b5)]()):shouldUseLess(_0x735ff8||'','')?new Promise(_0x2b1cd4=>{const _0x2fb0fa=_0x29bee1,_0x2264ac=spawn(_0x2fb0fa(0x186),[_0x2fb0fa(0x18d)],{'stdio':[_0x2fb0fa(0x1cc),_0x2fb0fa(0x1b7),_0x2fb0fa(0x1b7)]});let _0x5de27a=![];_0x2264ac['on']('error',()=>{const _0x1e0812=_0x2fb0fa;!_0x5de27a&&(_0x5de27a=!![],console[_0x1e0812(0x1a3)](_0x44414b),_0x2b1cd4());}),_0x2264ac['on'](_0x2fb0fa(0x1c4),()=>{!_0x5de27a&&(_0x5de27a=!![],_0x2b1cd4());}),_0x2264ac['on'](_0x2fb0fa(0x1c0),()=>{const _0x51593d=_0x2fb0fa;!_0x5de27a&&_0x2264ac['stdin']&&(_0x2264ac[_0x51593d(0x19d)]['on'](_0x51593d(0x1b1),()=>{}),_0x2264ac['stdin'][_0x51593d(0x185)](_0x44414b),_0x2264ac[_0x51593d(0x19d)][_0x51593d(0x183)]());}),!_0x2264ac[_0x2fb0fa(0x19d)]&&(!_0x5de27a&&(_0x5de27a=!![],console[_0x2fb0fa(0x1a3)](_0x44414b),_0x2b1cd4()));}):(console[_0x29bee1(0x1a3)](_0x44414b),Promise[_0x29bee1(0x1b5)]());}export async function handleSDKOutput(_0x4fcb8b,_0xcaaf86){const _0x14e085=a53_0x5ef9,_0x1f3639=resolveOutputOptions(_0xcaaf86),_0x5bc09b=await formatSDKOutput(_0x4fcb8b,_0x1f3639);await writeOutput(_0x5bc09b,_0x1f3639[_0x14e085(0x1ad)]||undefined,_0x1f3639[_0x14e085(0x1c1)]);}export async function handleQueryOutput(_0x330860,_0x38ed13){const _0x18879a=a53_0x5ef9,_0x451ad5=resolveOutputOptions(_0x38ed13),_0x3b34e1=await formatQueryOutput(_0x330860,_0x451ad5);await writeOutput(_0x3b34e1,_0x451ad5[_0x18879a(0x1ad)]||undefined,_0x451ad5[_0x18879a(0x1c1)]);}function a53_0x5ef9(_0x24be92,_0x378a95){_0x24be92=_0x24be92-0x183;const _0x1d70e9=a53_0x1d70();let _0x5ef986=_0x1d70e9[_0x24be92];return _0x5ef986;}async function formatSingleObject(_0x52b0f0,_0x4dbdc0){const _0x2170bb=a53_0x5ef9,{format:_0x33e1ba,color:_0x154650,noColor:_0x1e67a3}=_0x4dbdc0,_0x155f0e={'color':_0x154650,'noColor':_0x1e67a3};if(_0x33e1ba===_0x2170bb(0x194)){if(shouldUseColor(_0x155f0e))return colorizeJSON(_0x52b0f0,_0x155f0e);return JSON[_0x2170bb(0x19e)](_0x52b0f0,null,0x2);}else{if(_0x33e1ba===_0x2170bb(0x1a2)){if(shouldUseColor(_0x155f0e))return colorizeJSONCompact(_0x52b0f0,_0x155f0e);return JSON[_0x2170bb(0x19e)](_0x52b0f0);}else{if(_0x33e1ba===_0x2170bb(0x195))return Object[_0x2170bb(0x1a6)](_0x52b0f0)[_0x2170bb(0x192)](([_0x153c02,_0x4e458f])=>_0x153c02+'\x09'+_0x4e458f)[_0x2170bb(0x199)]('\x0a');else{const _0x1a2a66=Object[_0x2170bb(0x1a6)](_0x52b0f0);if(_0x1a2a66[_0x2170bb(0x1b2)]===0x0)return _0x2170bb(0x1c2);const _0x419c28=_0x52b0f0[_0x2170bb(0x19b)],_0x5664e8=_0x52b0f0['query'],_0x194282=_0x52b0f0[_0x2170bb(0x1c5)],_0x58b3db=_0x52b0f0[_0x2170bb(0x18a)],_0x289d24=_0x5664e8?typeof _0x5664e8===_0x2170bb(0x1ae)?_0x5664e8:JSON[_0x2170bb(0x19e)](_0x5664e8,null,0x2):undefined,_0x377cbe=_0x194282&&Object[_0x2170bb(0x1aa)](_0x194282)[_0x2170bb(0x1b2)]>0x0?JSON['stringify'](_0x194282,null,0x2):undefined,_0xae9b7d=_0x58b3db&&Object['keys'](_0x58b3db)[_0x2170bb(0x1b2)]>0x0?JSON[_0x2170bb(0x19e)](_0x58b3db,null,0x2):undefined,_0x2e6e32=_0x1a2a66[_0x2170bb(0x184)](([_0x1d0c37])=>_0x1d0c37!==_0x2170bb(0x19b)&&_0x1d0c37!==_0x2170bb(0x1a9)&&_0x1d0c37!=='params'&&_0x1d0c37!==_0x2170bb(0x18a)),_0xf7a253=Math[_0x2170bb(0x18b)](..._0x2e6e32[_0x2170bb(0x192)](([_0x3d2e76])=>_0x3d2e76[_0x2170bb(0x1b2)])),_0xb25567=Math[_0x2170bb(0x18b)](..._0x2e6e32[_0x2170bb(0x192)](([,_0x3baea4])=>{const _0x2fa8ce=_0x2170bb;try{const _0x487b18=_0x3baea4===null||_0x3baea4===undefined?'':typeof _0x3baea4===_0x2fa8ce(0x1b9)?JSON[_0x2fa8ce(0x19e)](_0x3baea4):String(_0x3baea4),_0x5e6d9c=_0x487b18[_0x2fa8ce(0x190)]('\x0a');return Math[_0x2fa8ce(0x18b)](..._0x5e6d9c[_0x2fa8ce(0x192)](_0x191aa5=>_0x191aa5[_0x2fa8ce(0x1b2)]),0x0);}catch{return 0x0;}}),0x14),_0x29f0ce=[];_0x29f0ce[_0x2170bb(0x1b3)](colorBorder('┌─'+'─'['repeat'](_0xf7a253)+'─┬─'+'─'[_0x2170bb(0x1bd)](_0xb25567)+'─┐',_0x155f0e)),_0x2e6e32[_0x2170bb(0x19f)](([_0x38ef06,_0x130a66])=>{const _0x54e95e=_0x2170bb;let _0x4bcafb;try{_0x4bcafb=_0x130a66===null||_0x130a66===undefined?'':typeof _0x130a66===_0x54e95e(0x1b9)?JSON[_0x54e95e(0x19e)](_0x130a66):String(_0x130a66);}catch{_0x4bcafb='[Object]';}const _0x12cff6=_0x38ef06[_0x54e95e(0x191)](_0xf7a253),_0x1cf1a5=_0x4bcafb[_0x54e95e(0x190)]('\x0a');_0x1cf1a5[_0x54e95e(0x19f)]((_0x54b269,_0x2daadc)=>{const _0x247256=_0x54e95e,_0x1e8940=colorBorder('│',_0x155f0e);_0x2daadc===0x0?_0x29f0ce[_0x247256(0x1b3)](_0x1e8940+'\x20'+_0x12cff6+'\x20'+_0x1e8940+'\x20'+_0x54b269[_0x247256(0x191)](_0xb25567)+'\x20'+_0x1e8940):_0x29f0ce[_0x247256(0x1b3)](_0x1e8940+'\x20'+'\x20'[_0x247256(0x1bd)](_0xf7a253)+'\x20'+_0x1e8940+'\x20'+_0x54b269[_0x247256(0x191)](_0xb25567)+'\x20'+_0x1e8940);});}),_0x29f0ce[_0x2170bb(0x1b3)](colorBorder('└─'+'─'[_0x2170bb(0x1bd)](_0xf7a253)+_0x2170bb(0x1ba)+'─'[_0x2170bb(0x1bd)](_0xb25567)+'─┘',_0x155f0e));_0x289d24&&(_0x29f0ce[_0x2170bb(0x1b3)](''),_0x29f0ce[_0x2170bb(0x1b3)](String(a53_0x187921['yellow'][_0x2170bb(0x1cb)](_0x2170bb(0x1b0)))),_0x29f0ce[_0x2170bb(0x1b3)](_0x289d24));_0x377cbe&&(_0x29f0ce[_0x2170bb(0x1b3)](''),_0x29f0ce[_0x2170bb(0x1b3)](String(a53_0x187921[_0x2170bb(0x1c8)][_0x2170bb(0x1cb)]('[params]'))),_0x29f0ce[_0x2170bb(0x1b3)](_0x377cbe));_0xae9b7d&&(_0x29f0ce[_0x2170bb(0x1b3)](''),_0x29f0ce[_0x2170bb(0x1b3)](String(a53_0x187921['magenta']['bold'](_0x2170bb(0x1b8)))),_0x29f0ce[_0x2170bb(0x1b3)](_0xae9b7d));if(_0x419c28){if(_0x419c28[_0x2170bb(0x1ac)]){_0x29f0ce['push'](''),_0x29f0ce[_0x2170bb(0x1b3)](String(a53_0x187921[_0x2170bb(0x198)][_0x2170bb(0x1cb)](_0x2170bb(0x1b6))));const _0x40fdcf=_0x419c28['stderr'][_0x2170bb(0x190)]('\x0a');_0x40fdcf[_0x2170bb(0x19f)](_0xc41bf5=>{const _0x12f282=_0x2170bb;_0xc41bf5['trim']()&&_0x29f0ce[_0x12f282(0x1b3)](_0xc41bf5);});}if(_0x419c28[_0x2170bb(0x1cd)]){_0x29f0ce[_0x2170bb(0x1b3)](''),_0x29f0ce[_0x2170bb(0x1b3)](String(a53_0x187921[_0x2170bb(0x1c6)][_0x2170bb(0x1cb)](_0x2170bb(0x1a5))));const _0xbb045c=_0x419c28['cmdout']['split']('\x0a');_0xbb045c[_0x2170bb(0x19f)](_0x47b97f=>{const _0x323aeb=_0x2170bb;_0x47b97f[_0x323aeb(0x1c9)]()&&_0x29f0ce['push'](_0x47b97f);});}}return _0x29f0ce[_0x2170bb(0x199)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x335603,_0x2df130){const _0x408f4d=a53_0x5ef9;if(_0x2df130[_0x408f4d(0x1c1)]===_0x408f4d(0x1be)){await handleSDKOutput([_0x335603],_0x2df130);return;}const _0x2e27f2=resolveOutputOptions(_0x2df130),_0x3eedd4=await formatSingleObject(_0x335603,_0x2e27f2);await writeOutput(_0x3eedd4,_0x2e27f2[_0x408f4d(0x1ad)]||undefined,_0x2e27f2[_0x408f4d(0x1c1)]);}
|
|
1
|
+
(function(_0x207f4d,_0x54cd9b){const _0x577e1a=a54_0x2630,_0x26bcb3=_0x207f4d();while(!![]){try{const _0x3dd471=-parseInt(_0x577e1a(0x135))/0x1+parseInt(_0x577e1a(0x117))/0x2*(parseInt(_0x577e1a(0x109))/0x3)+-parseInt(_0x577e1a(0xfe))/0x4+-parseInt(_0x577e1a(0x113))/0x5*(parseInt(_0x577e1a(0x12b))/0x6)+parseInt(_0x577e1a(0x13f))/0x7+-parseInt(_0x577e1a(0x111))/0x8+parseInt(_0x577e1a(0x129))/0x9;if(_0x3dd471===_0x54cd9b)break;else _0x26bcb3['push'](_0x26bcb3['shift']());}catch(_0x3891e5){_0x26bcb3['push'](_0x26bcb3['shift']());}}}(a54_0x57fa,0x89fa6));import{writeFileSync}from'fs';import{spawn}from'child_process';function a54_0x57fa(){const _0xa956e3=['pipe','isInteger','filter','query','output','magenta','rule','json','color','map','tsv','11581965fujbTI','join','6IoKdIR','blue','red','isTTY','yellow','cmdout','inherit','repeat','string','spawn','871789wmpzdq','trim','debug','object','varchar','length','[params]','stderr','split','─┴─','6601196mVUdZY','forEach','sdk-result','close','[query]','params','less','cyan','1482452BUwJxa','No\x20data','stringify','list','jsonl','table','bigint','[rule]','limitStructuredFormats','isFinite','data','3EUSDzw','format','write','boolean','error','limit','padEnd','double','7963856bZhElQ','push','1308230NPTXdX','entries','end','max','1669550sZploP','[error]','[logs]','bold','stdin','-FXRSn','stdout'];a54_0x57fa=function(){return _0xa956e3;};return a54_0x57fa();}import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a54_0x113e18 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x49963e){const _0x448bb4=a54_0x2630;return _0x49963e[_0x448bb4(0x10a)]==='json'||_0x49963e['format']===_0x448bb4(0x102)||_0x49963e[_0x448bb4(0x10a)]===_0x448bb4(0x128)||_0x49963e['format']===_0x448bb4(0x103)||_0x49963e['json']===!![]||_0x49963e[_0x448bb4(0x102)]===!![]||_0x49963e[_0x448bb4(0x128)]===!![]||_0x49963e[_0x448bb4(0x103)]===!![];}export function parseOutputOptions(_0x509427){const _0x57962d=a54_0x2630;return{'format':_0x509427[_0x57962d(0x10a)]||_0x57962d(0x103),'output':_0x509427[_0x57962d(0x122)]||'','limit':_0x509427[_0x57962d(0x10e)],'limitStructuredFormats':_0x509427['limitStructuredFormats'],'color':_0x509427['color'],'noColor':_0x509427['noColor']};}function convertSDKResultToQueryResult(_0x218c70){const _0x17ef14=a54_0x2630,_0x1e6754=[];if(_0x218c70[_0x17ef14(0x13a)]>0x0){const _0x173869=_0x218c70[0x0];for(const [_0x4484fb,_0x34cc27]of Object['entries'](_0x173869)){let _0x327f45=_0x17ef14(0x139);if(typeof _0x34cc27==='number')_0x327f45=Number[_0x17ef14(0x11f)](_0x34cc27)?_0x17ef14(0x104):_0x17ef14(0x110);else{if(typeof _0x34cc27===_0x17ef14(0x10c))_0x327f45=_0x17ef14(0x10c);else _0x34cc27===null&&(_0x327f45=_0x17ef14(0x139));}_0x1e6754[_0x17ef14(0x112)]({'name':_0x4484fb,'type':_0x327f45});}}return{'queryId':_0x17ef14(0x141),'columns':_0x1e6754,'data':_0x218c70,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x218c70[_0x17ef14(0x13a)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x3832e9,_0x3f6a04){const _0x3424f5=convertSDKResultToQueryResult(_0x3832e9);return formatQueryOutput(_0x3424f5,_0x3f6a04);}export async function formatQueryOutput(_0x37f89b,_0x5e1575){const _0x3873e5=a54_0x2630,{format:_0x1df409,limit:_0x45e768,output:_0x44b8b2,color:_0x1d2215,noColor:_0x12a0a7,limitStructuredFormats:_0x18180e}=_0x5e1575,_0x5b14e1=Boolean(_0x44b8b2)&&!_0x1d2215,_0x2034d9={'color':_0x1d2215,'noColor':_0x12a0a7||_0x5b14e1};if(_0x1df409===_0x3873e5(0x103)){const _0x1e5eb9=shouldUseLess(_0x1df409,_0x44b8b2);return formatAsTable(_0x37f89b,_0x45e768,_0x1e5eb9,_0x2034d9);}const _0x6d45f8=_0x18180e&&Number[_0x3873e5(0x107)](_0x45e768)&&_0x37f89b[_0x3873e5(0x108)]['length']>_0x45e768?{..._0x37f89b,'data':_0x37f89b[_0x3873e5(0x108)]['slice'](0x0,_0x45e768)}:_0x37f89b;if(_0x1df409===_0x3873e5(0x125))return formatAsJSON(_0x6d45f8,_0x2034d9);else return _0x1df409===_0x3873e5(0x102)?formatAsJSONL(_0x6d45f8,_0x2034d9):formatQueryResult(_0x6d45f8,_0x1df409);}function a54_0x2630(_0x38bbc0,_0x1464e7){_0x38bbc0=_0x38bbc0-0xfd;const _0x57fadb=a54_0x57fa();let _0x263039=_0x57fadb[_0x38bbc0];return _0x263039;}function shouldUseLess(_0x5e31f4,_0x476832){const _0x462664=a54_0x2630;return(_0x5e31f4===_0x462664(0x103)||_0x5e31f4===_0x462664(0x101))&&process[_0x462664(0x11d)][_0x462664(0x12e)]&&!_0x476832;}export function resolveOutputOptions(_0x395e0c){const _0x22dcc7=a54_0x2630,_0x1d0504=_0x395e0c[_0x22dcc7(0x122)]||'',_0x36bd03=resolveOutputFormat(_0x395e0c[_0x22dcc7(0x10a)],_0x1d0504,_0x22dcc7(0x103));let _0x5391b2=typeof _0x395e0c[_0x22dcc7(0x10e)]==='number'?_0x395e0c[_0x22dcc7(0x10e)]:parseInt(_0x395e0c[_0x22dcc7(0x10e)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x395e0c[_0x22dcc7(0x10e)]===undefined&&shouldUseLess(_0x36bd03,_0x1d0504)&&(_0x5391b2=Infinity),{'format':_0x36bd03,'output':_0x1d0504,'limit':_0x5391b2,'limitStructuredFormats':_0x395e0c[_0x22dcc7(0x106)],'color':_0x395e0c[_0x22dcc7(0x126)],'noColor':_0x395e0c['noColor']};}export function writeOutput(_0x39c946,_0x129e10,_0x13df78){return _0x129e10?(writeFileSync(_0x129e10,_0x39c946),console['error']('Results\x20saved\x20to\x20'+_0x129e10),Promise['resolve']()):shouldUseLess(_0x13df78||'','')?new Promise(_0x5b2ec6=>{const _0x18cd26=a54_0x2630,_0x514ea5=spawn(_0x18cd26(0x145),[_0x18cd26(0x11c)],{'stdio':[_0x18cd26(0x11e),_0x18cd26(0x131),_0x18cd26(0x131)]});let _0xdf3521=![];_0x514ea5['on'](_0x18cd26(0x10d),()=>{!_0xdf3521&&(_0xdf3521=!![],console['log'](_0x39c946),_0x5b2ec6());}),_0x514ea5['on'](_0x18cd26(0x142),()=>{!_0xdf3521&&(_0xdf3521=!![],_0x5b2ec6());}),_0x514ea5['on'](_0x18cd26(0x134),()=>{const _0x18a167=_0x18cd26;!_0xdf3521&&_0x514ea5[_0x18a167(0x11b)]&&(_0x514ea5['stdin']['on'](_0x18a167(0x10d),()=>{}),_0x514ea5[_0x18a167(0x11b)][_0x18a167(0x10b)](_0x39c946),_0x514ea5[_0x18a167(0x11b)][_0x18a167(0x115)]());}),!_0x514ea5[_0x18cd26(0x11b)]&&(!_0xdf3521&&(_0xdf3521=!![],console['log'](_0x39c946),_0x5b2ec6()));}):(console['log'](_0x39c946),Promise['resolve']());}export async function handleSDKOutput(_0x3a5732,_0x5d0193){const _0x1d32c8=a54_0x2630,_0x1449fd=resolveOutputOptions(_0x5d0193),_0x717b13=await formatSDKOutput(_0x3a5732,_0x1449fd);await writeOutput(_0x717b13,_0x1449fd[_0x1d32c8(0x122)]||undefined,_0x1449fd['format']);}export async function handleQueryOutput(_0x494120,_0x145a03){const _0x4be501=a54_0x2630,_0x37af72=resolveOutputOptions(_0x145a03),_0x547ee1=await formatQueryOutput(_0x494120,_0x37af72);await writeOutput(_0x547ee1,_0x37af72[_0x4be501(0x122)]||undefined,_0x37af72[_0x4be501(0x10a)]);}async function formatSingleObject(_0x424de5,_0x550416){const _0x11c102=a54_0x2630,{format:_0x4ef76b,color:_0x916ac,noColor:_0xc9acdf}=_0x550416,_0x15811b={'color':_0x916ac,'noColor':_0xc9acdf};if(_0x4ef76b===_0x11c102(0x125)){if(shouldUseColor(_0x15811b))return colorizeJSON(_0x424de5,_0x15811b);return JSON[_0x11c102(0x100)](_0x424de5,null,0x2);}else{if(_0x4ef76b===_0x11c102(0x102)){if(shouldUseColor(_0x15811b))return colorizeJSONCompact(_0x424de5,_0x15811b);return JSON[_0x11c102(0x100)](_0x424de5);}else{if(_0x4ef76b===_0x11c102(0x128))return Object[_0x11c102(0x114)](_0x424de5)[_0x11c102(0x127)](([_0x216c8e,_0x173334])=>_0x216c8e+'\x09'+_0x173334)[_0x11c102(0x12a)]('\x0a');else{const _0xd47c40=Object[_0x11c102(0x114)](_0x424de5);if(_0xd47c40[_0x11c102(0x13a)]===0x0)return _0x11c102(0xff);const _0x136255=_0x424de5['debug'],_0x26ed63=_0x424de5[_0x11c102(0x121)],_0x47cafd=_0x424de5[_0x11c102(0x144)],_0x40a3cf=_0x424de5[_0x11c102(0x124)],_0x108c05=_0x26ed63?typeof _0x26ed63===_0x11c102(0x133)?_0x26ed63:JSON[_0x11c102(0x100)](_0x26ed63,null,0x2):undefined,_0x2f9718=_0x47cafd&&Object['keys'](_0x47cafd)[_0x11c102(0x13a)]>0x0?JSON['stringify'](_0x47cafd,null,0x2):undefined,_0x321b6f=_0x40a3cf&&Object['keys'](_0x40a3cf)['length']>0x0?JSON[_0x11c102(0x100)](_0x40a3cf,null,0x2):undefined,_0xa945bf=_0xd47c40[_0x11c102(0x120)](([_0x20fbf9])=>_0x20fbf9!==_0x11c102(0x137)&&_0x20fbf9!==_0x11c102(0x121)&&_0x20fbf9!==_0x11c102(0x144)&&_0x20fbf9!=='rule'),_0x443f65=Math['max'](..._0xa945bf[_0x11c102(0x127)](([_0x511a5a])=>_0x511a5a['length'])),_0x5d04d8=Math[_0x11c102(0x116)](..._0xa945bf[_0x11c102(0x127)](([,_0x5ddd22])=>{const _0x305d63=_0x11c102;try{const _0x583d90=_0x5ddd22===null||_0x5ddd22===undefined?'':typeof _0x5ddd22==='object'?JSON[_0x305d63(0x100)](_0x5ddd22):String(_0x5ddd22),_0x26026a=_0x583d90[_0x305d63(0x13d)]('\x0a');return Math[_0x305d63(0x116)](..._0x26026a[_0x305d63(0x127)](_0x541b01=>_0x541b01['length']),0x0);}catch{return 0x0;}}),0x14),_0x2cc39e=[];_0x2cc39e[_0x11c102(0x112)](colorBorder('┌─'+'─'[_0x11c102(0x132)](_0x443f65)+'─┬─'+'─'[_0x11c102(0x132)](_0x5d04d8)+'─┐',_0x15811b)),_0xa945bf['forEach'](([_0xbf70e2,_0x3723ce])=>{const _0x19f64c=_0x11c102;let _0x240cf8;try{_0x240cf8=_0x3723ce===null||_0x3723ce===undefined?'':typeof _0x3723ce===_0x19f64c(0x138)?JSON[_0x19f64c(0x100)](_0x3723ce):String(_0x3723ce);}catch{_0x240cf8='[Object]';}const _0x5544a8=_0xbf70e2[_0x19f64c(0x10f)](_0x443f65),_0x2a9c61=_0x240cf8[_0x19f64c(0x13d)]('\x0a');_0x2a9c61['forEach']((_0x114472,_0x179bd1)=>{const _0x528a06=_0x19f64c,_0x457bf0=colorBorder('│',_0x15811b);_0x179bd1===0x0?_0x2cc39e[_0x528a06(0x112)](_0x457bf0+'\x20'+_0x5544a8+'\x20'+_0x457bf0+'\x20'+_0x114472[_0x528a06(0x10f)](_0x5d04d8)+'\x20'+_0x457bf0):_0x2cc39e['push'](_0x457bf0+'\x20'+'\x20'[_0x528a06(0x132)](_0x443f65)+'\x20'+_0x457bf0+'\x20'+_0x114472[_0x528a06(0x10f)](_0x5d04d8)+'\x20'+_0x457bf0);});}),_0x2cc39e[_0x11c102(0x112)](colorBorder('└─'+'─'['repeat'](_0x443f65)+_0x11c102(0x13e)+'─'['repeat'](_0x5d04d8)+'─┘',_0x15811b));_0x108c05&&(_0x2cc39e[_0x11c102(0x112)](''),_0x2cc39e[_0x11c102(0x112)](String(a54_0x113e18[_0x11c102(0x12f)][_0x11c102(0x11a)](_0x11c102(0x143)))),_0x2cc39e[_0x11c102(0x112)](_0x108c05));_0x2f9718&&(_0x2cc39e[_0x11c102(0x112)](''),_0x2cc39e[_0x11c102(0x112)](String(a54_0x113e18[_0x11c102(0x12c)][_0x11c102(0x11a)](_0x11c102(0x13b)))),_0x2cc39e[_0x11c102(0x112)](_0x2f9718));_0x321b6f&&(_0x2cc39e[_0x11c102(0x112)](''),_0x2cc39e['push'](String(a54_0x113e18[_0x11c102(0x123)][_0x11c102(0x11a)](_0x11c102(0x105)))),_0x2cc39e['push'](_0x321b6f));if(_0x136255){if(_0x136255[_0x11c102(0x13c)]){_0x2cc39e[_0x11c102(0x112)](''),_0x2cc39e[_0x11c102(0x112)](String(a54_0x113e18[_0x11c102(0x12d)][_0x11c102(0x11a)](_0x11c102(0x118))));const _0x5499d6=_0x136255[_0x11c102(0x13c)][_0x11c102(0x13d)]('\x0a');_0x5499d6['forEach'](_0x280ad4=>{const _0x10fdd1=_0x11c102;_0x280ad4[_0x10fdd1(0x136)]()&&_0x2cc39e[_0x10fdd1(0x112)](_0x280ad4);});}if(_0x136255[_0x11c102(0x130)]){_0x2cc39e[_0x11c102(0x112)](''),_0x2cc39e[_0x11c102(0x112)](String(a54_0x113e18[_0x11c102(0xfd)]['bold'](_0x11c102(0x119))));const _0x4eb34d=_0x136255['cmdout'][_0x11c102(0x13d)]('\x0a');_0x4eb34d[_0x11c102(0x140)](_0x51628a=>{const _0x4950be=_0x11c102;_0x51628a[_0x4950be(0x136)]()&&_0x2cc39e[_0x4950be(0x112)](_0x51628a);});}}return _0x2cc39e[_0x11c102(0x12a)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x415d5c,_0x3523d6){const _0x51bb71=a54_0x2630;if(_0x3523d6[_0x51bb71(0x10a)]==='table'){await handleSDKOutput([_0x415d5c],_0x3523d6);return;}const _0x561f1b=resolveOutputOptions(_0x3523d6),_0x5066ca=await formatSingleObject(_0x415d5c,_0x561f1b);await writeOutput(_0x5066ca,_0x561f1b[_0x51bb71(0x122)]||undefined,_0x561f1b[_0x51bb71(0x10a)]);}
|