@treasuredata/tdx 0.26.7 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.d.ts +4 -2
- package/dist/commands/claude-statusline-command.d.ts.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-statusline-command.js.map +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/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.d.ts +52 -0
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.d.ts.map +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-command.js.map +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.d.ts.map +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +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/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +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/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.d.ts +2 -2
- package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/claude-usage-tracker.js.map +1 -1
- package/dist/proxy/passthrough-server.d.ts +18 -3
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +1 -1
- package/dist/proxy/sse-usage-parser.d.ts +20 -2
- package/dist/proxy/sse-usage-parser.d.ts.map +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/proxy/sse-usage-parser.js.map +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.d.ts +94 -2
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +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/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/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.d.ts +149 -2
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +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.d.ts +0 -4
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +2 -2
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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.d.ts.map +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-utils.js.map +1 -1
- package/dist/sdk/segment/journey-validator.d.ts +3 -0
- package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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/pull-workflow.js.map +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.d.ts +21 -3
- package/dist/sdk/segment/push-workflow.d.ts.map +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js.map +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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/segment-def.d.ts +10 -1
- package/dist/sdk/segment/types/segment-def.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +188 -16
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- 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/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/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/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 +3 -3
- package/dist/utils/port.d.ts +0 -18
- package/dist/utils/port.d.ts.map +0 -1
- package/dist/utils/port.js +0 -1
- package/dist/utils/port.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a42_0xc57567=a42_0x15e8;(function(_0x308154,_0x339c18){const _0x209f40=a42_0x15e8,_0x291026=_0x308154();while(!![]){try{const _0x41cc86=-parseInt(_0x209f40(0x291))/0x1+parseInt(_0x209f40(0x33e))/0x2*(parseInt(_0x209f40(0x28a))/0x3)+parseInt(_0x209f40(0x35a))/0x4+-parseInt(_0x209f40(0x2c0))/0x5+parseInt(_0x209f40(0x246))/0x6+-parseInt(_0x209f40(0x288))/0x7*(-parseInt(_0x209f40(0x2e3))/0x8)+-parseInt(_0x209f40(0x373))/0x9*(parseInt(_0x209f40(0x393))/0xa);if(_0x41cc86===_0x339c18)break;else _0x291026['push'](_0x291026['shift']());}catch(_0x374fce){_0x291026['push'](_0x291026['shift']());}}}(a42_0x4a1f,0x6f2d1));import a42_0x28d120 from'chalk';import{existsSync}from'fs';import a42_0x4c5f63 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 a42_0x4fae from'prompts';function getAttemptStatusDisplay(_0x4588ce){const _0x4ed782=a42_0x15e8;if(!_0x4588ce)return{'icon':'⏳','text':''};const {done:_0x52bc50,success:_0x4e838e,cancelRequested:_0x2e643a}=_0x4588ce;if(!_0x52bc50)return _0x2e643a?{'icon':'🛑','text':a42_0x28d120[_0x4ed782(0x2a1)]('canceling')}:{'icon':'🔄','text':a42_0x28d120[_0x4ed782(0x1fd)](_0x4ed782(0x272))};if(_0x4e838e)return{'icon':'✅','text':a42_0x28d120[_0x4ed782(0x382)](_0x4ed782(0x32b))};return{'icon':'❌','text':a42_0x28d120['red'](_0x4ed782(0x343))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0xc57567(0x247)](_0x2789ef,_0x334e97,_0x4a7f31=0x0){const _0x2ce1d6=a42_0xc57567;return _0x2789ef[_0x4a7f31]||_0x334e97[_0x2ce1d6(0x220)];}[a42_0xc57567(0x2e6)](_0x273415,_0x52586c,_0x5a329d=0x0){const _0x50dbfb=a42_0xc57567,_0x443f0e=this[_0x50dbfb(0x247)](_0x273415,_0x52586c,_0x5a329d);if(!_0x443f0e)return console['error'](a42_0x28d120['red'](_0x50dbfb(0x2c8)),_0x50dbfb(0x383)),console[_0x50dbfb(0x343)](a42_0x28d120[_0x50dbfb(0x307)](_0x50dbfb(0x2e9))),null;return _0x443f0e;}[a42_0xc57567(0x323)](_0x36a559,_0x24411d){const _0x3722c8=a42_0xc57567;if(_0x36a559[0x0]){const _0x2154ad=_0x36a559[0x0][_0x3722c8(0x294)]('.');if(_0x2154ad[_0x3722c8(0x22b)]===0x1)return{'projectName':_0x2154ad[0x0],'workflowName':undefined};else return _0x2154ad[_0x3722c8(0x22b)]===0x2?{'projectName':_0x2154ad[0x0],'workflowName':_0x2154ad[0x1]}:(console['error'](a42_0x28d120[_0x3722c8(0x356)](_0x3722c8(0x2c8)),_0x3722c8(0x224)),null);}return{'projectName':_0x24411d[_0x3722c8(0x220)],'workflowName':undefined};}[a42_0xc57567(0x2de)](_0x309399,_0x138e0c,_0x48c265=0x0){const _0x5e9624=a42_0xc57567;if(_0x309399[_0x48c265])return _0x309399[_0x48c265];if(_0x138e0c[_0x5e9624(0x220)]){const _0x43bae4=a42_0x4c5f63['join'](process['cwd'](),_0x5e9624(0x34d),_0x138e0c[_0x5e9624(0x220)]);if(existsSync(a42_0x4c5f63['join'](_0x43bae4,_0x5e9624(0x2c6))))return _0x43bae4;}return undefined;}async[a42_0xc57567(0x2be)](_0x187d5f,_0x48b26f,_0x3c084d){const _0xc9c78f=a42_0xc57567;try{const _0x5c82bc=await _0x187d5f[_0xc9c78f(0x2da)][_0xc9c78f(0x34d)](_0x48b26f,{'limit':0x1});if(_0x5c82bc[_0xc9c78f(0x22b)]>0x0){const _0x5d821c=_0x5c82bc[0x0]['id'],_0x3f3afe=getWorkflowUrl(_0x3c084d,_0x5d821c);console[_0xc9c78f(0x343)](_0xc9c78f(0x2c4)+a42_0x28d120['cyan'](_0x3f3afe));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x244);[a42_0xc57567(0x371)]=a42_0xc57567(0x257);async[a42_0xc57567(0x2dc)](_0x1b3c80){const _0x1cfd22=a42_0xc57567,{options:_0x454575,args:_0x333ddc,tdx:_0x2823cf}=_0x1b3c80,_0x123607=_0x333ddc[0x0],_0x1499b8=_0x454575[_0x1cfd22(0x298)];if(_0x1499b8)return saveSessionContext({'workflow_project':undefined},_0x454575['session']),console['log'](a42_0x28d120[_0x1cfd22(0x382)](_0x1cfd22(0x23e))),0x0;if(!_0x123607)return console[_0x1cfd22(0x343)](a42_0x28d120['red'](_0x1cfd22(0x2c8)),'Project\x20name\x20is\x20required'),console[_0x1cfd22(0x343)](a42_0x28d120['dim'](_0x1cfd22(0x2e4))),console['error'](a42_0x28d120[_0x1cfd22(0x307)](_0x1cfd22(0x1ff))),0x1;const _0x1aabb6=await withSpinner(_0x1cfd22(0x23b)+_0x123607+'\x27...',()=>_0x2823cf[_0x1cfd22(0x2da)][_0x1cfd22(0x27b)](_0x123607),{'verbose':_0x454575[_0x1cfd22(0x250)]}),{name:_0x1f5516}=_0x1aabb6[_0x1cfd22(0x201)];return saveSessionContext({'workflow_project':_0x1f5516},_0x454575[_0x1cfd22(0x317)]),console['log'](a42_0x28d120[_0x1cfd22(0x382)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a42_0x28d120['cyan'](_0x1f5516))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a42_0xc57567(0x2ce);['description']=a42_0xc57567(0x275);async[a42_0xc57567(0x2dc)](_0xcd6c65){const _0xae4642=a42_0xc57567,{options:_0x3650de,args:_0x45ee93,tdx:_0x421495}=_0xcd6c65,_0x11657a=_0x45ee93[0x0];_0x3650de[_0xae4642(0x250)]&&_0x11657a&&console[_0xae4642(0x343)]('Pattern:\x20'+_0x11657a);const _0x3572a9=await withSpinner(_0xae4642(0x217),()=>_0x421495[_0xae4642(0x2da)][_0xae4642(0x2ed)](_0x11657a,{'limit':_0x3650de[_0xae4642(0x22d)]}),{'verbose':_0x3650de[_0xae4642(0x250)]});let _0x37fffc=_0x3572a9['data'];_0x37fffc['sort']((_0x50348e,_0x130049)=>_0x50348e['name'][_0xae4642(0x2f1)](_0x130049[_0xae4642(0x331)]));const _0x29c81a=_0x3650de[_0xae4642(0x22d)]||0x64,_0x3a178d=_0x37fffc['length']>=_0x29c81a?a42_0x28d120['dim'](_0xae4642(0x301)):'';console[_0xae4642(0x343)](_0xae4642(0x36f)+_0x37fffc[_0xae4642(0x22b)]+_0xae4642(0x221)+(_0x37fffc[_0xae4642(0x22b)]!==0x1?'s':'')+_0x3a178d);if(_0x3650de[_0xae4642(0x24b)]===_0xae4642(0x1fc)||_0x3650de[_0xae4642(0x24b)]===_0xae4642(0x39a)||_0x3650de[_0xae4642(0x24b)]===_0xae4642(0x39e))await handleSDKOutput(_0x37fffc,_0x3650de);else{if(_0x37fffc[_0xae4642(0x22b)]===0x0)_0x11657a?console[_0xae4642(0x385)](_0xae4642(0x303)+_0x11657a):console[_0xae4642(0x385)]('No\x20workflow\x20projects\x20found');else{const _0x3386b0=_0x37fffc[_0xae4642(0x27a)](_0x1844b9=>{const _0x61694c=_0xae4642,_0x2adc19=_0x1844b9[_0x61694c(0x286)]?.['some'](_0x203029=>_0x203029['key']===_0x61694c(0x228)),_0x55c5f1=_0x2adc19?a42_0x28d120[_0x61694c(0x307)](_0x61694c(0x314)):'';return'📁\x20'+_0x1844b9[_0x61694c(0x331)]+_0x55c5f1;});await writeOutput(_0x3386b0[_0xae4642(0x238)]('\x0a'),_0x3650de[_0xae4642(0x209)],_0xae4642(0x233));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x397);['description']='List\x20workflows';async['execute'](_0x2f01f3){const _0x146346=a42_0xc57567,{options:_0x41a009,args:_0x52bed3,tdx:_0x1bf77d}=_0x2f01f3,_0x484a79=this[_0x146346(0x247)](_0x52bed3,_0x41a009);_0x41a009['verbose']&&_0x484a79&&console[_0x146346(0x343)]('Project\x20filter:\x20'+_0x484a79);const _0x55848d=await withSpinner(_0x146346(0x254),()=>_0x1bf77d[_0x146346(0x2da)][_0x146346(0x34d)](_0x484a79,{'limit':_0x41a009[_0x146346(0x22d)]}),{'verbose':_0x41a009[_0x146346(0x250)]});let _0x3cb024=_0x55848d[_0x146346(0x201)];_0x3cb024[_0x146346(0x208)]((_0x5abb14,_0x2127c4)=>{const _0x3ae55e=_0x146346,_0x43177a=_0x5abb14['name'][_0x3ae55e(0x2f1)](_0x2127c4[_0x3ae55e(0x331)]);if(_0x43177a!==0x0)return _0x43177a;return(_0x5abb14[_0x3ae55e(0x296)]?.['name']||'')[_0x3ae55e(0x2f1)](_0x2127c4[_0x3ae55e(0x296)]?.[_0x3ae55e(0x331)]||'');});const _0x1b38cb=_0x41a009[_0x146346(0x22d)]||0x64,_0x4a491f=_0x3cb024[_0x146346(0x22b)]>=_0x1b38cb?a42_0x28d120[_0x146346(0x307)](_0x146346(0x301)):'';console['error'](_0x146346(0x36f)+_0x3cb024[_0x146346(0x22b)]+_0x146346(0x2dd)+(_0x3cb024['length']!==0x1?'s':'')+_0x4a491f);if(_0x41a009[_0x146346(0x24b)]===_0x146346(0x1fc)||_0x41a009['format']===_0x146346(0x39a)||_0x41a009['format']==='table')await handleSDKOutput(_0x3cb024,_0x41a009);else{if(_0x3cb024['length']===0x0)_0x484a79?console[_0x146346(0x385)](_0x146346(0x35b)+_0x484a79):console['log'](_0x146346(0x26b));else{const _0x5222cc=_0x41a009[_0x146346(0x31d)],_0x52ebbe=_0x3cb024[_0x146346(0x27a)](_0x11d599=>{const _0x1f01da=_0x146346,_0x47b307=a42_0x28d120[_0x1f01da(0x307)]('#'+_0x11d599['id']),_0xf457a3=hyperlink(_0x47b307,getWorkflowUrl(_0x5222cc,_0x11d599['id'])),_0x44d407=_0x11d599[_0x1f01da(0x296)]?.[_0x1f01da(0x331)]?a42_0x28d120[_0x1f01da(0x307)]('\x20('+_0x11d599[_0x1f01da(0x296)][_0x1f01da(0x331)]+')'):'';return _0x1f01da(0x2d9)+_0xf457a3+'\x20'+_0x11d599[_0x1f01da(0x331)]+_0x44d407;});await writeOutput(_0x52ebbe[_0x146346(0x238)]('\x0a'),_0x41a009[_0x146346(0x209)],_0x146346(0x233));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x2b0);[a42_0xc57567(0x371)]=a42_0xc57567(0x292);async[a42_0xc57567(0x2dc)](_0x22a5ac){const _0x20800d=a42_0xc57567,{options:_0x15d702,args:_0x5ee259,tdx:_0x296883}=_0x22a5ac,_0x34fe89=this['parseProjectWorkflowPattern'](_0x5ee259,_0x15d702);if(!_0x34fe89)return 0x1;const {projectName:_0x45d7c8,workflowName:_0x514e98}=_0x34fe89;if(_0x15d702[_0x20800d(0x250)]){if(_0x45d7c8&&_0x514e98)console['error'](_0x20800d(0x2ef)+_0x45d7c8+'.'+_0x514e98);else _0x45d7c8&&console[_0x20800d(0x343)](_0x20800d(0x2b4)+_0x45d7c8);const _0x384196=_0x15d702[_0x20800d(0x2ea)];_0x384196&&console['error']('Status:\x20'+_0x384196);}let _0x12d373=0x28;if(process[_0x20800d(0x297)][_0x20800d(0x24d)]&&!_0x15d702[_0x20800d(0x209)]&&!_0x15d702[_0x20800d(0x24b)]){const _0x1f1fc6=process[_0x20800d(0x297)][_0x20800d(0x218)]||0x28;_0x12d373=Math[_0x20800d(0x30f)](0x14,Math[_0x20800d(0x347)](_0x1f1fc6*0x2/0x3));}const _0x2b2264=_0x15d702[_0x20800d(0x22d)]||_0x12d373,_0x338edb=await withSpinner(_0x20800d(0x211),()=>_0x296883[_0x20800d(0x2da)][_0x20800d(0x2d4)]({'projectName':_0x45d7c8,'workflowName':_0x514e98,'status':_0x15d702[_0x20800d(0x2ea)],'fromTime':_0x15d702['from'],'toTime':_0x15d702['to'],'limit':_0x2b2264}),{'verbose':_0x15d702[_0x20800d(0x250)]}),_0x5698af=_0x338edb[_0x20800d(0x201)];_0x5698af[_0x20800d(0x208)]((_0x37070c,_0x5ce3e1)=>{const _0x1dd0b1=_0x20800d,_0x4773d4=_0x37070c[_0x1dd0b1(0x24f)]||'',_0x18a78b=_0x5ce3e1[_0x1dd0b1(0x24f)]||'';return _0x18a78b[_0x1dd0b1(0x2f1)](_0x4773d4);});_0x5698af[_0x20800d(0x22b)]>=_0x2b2264?console[_0x20800d(0x343)]('✔\x20Showing\x20'+_0x5698af['length']+'\x20sessions\x20'+a42_0x28d120['dim'](_0x20800d(0x339))):console['error'](_0x20800d(0x36f)+_0x5698af[_0x20800d(0x22b)]+'\x20session'+(_0x5698af['length']!==0x1?'s':''));if(_0x15d702[_0x20800d(0x24b)]===_0x20800d(0x1fc)||_0x15d702['format']===_0x20800d(0x39a)||_0x15d702[_0x20800d(0x24b)]===_0x20800d(0x39e))await handleSDKOutput(_0x5698af,_0x15d702);else{if(!process[_0x20800d(0x297)]['isTTY']||_0x15d702[_0x20800d(0x209)]){if(_0x5698af[_0x20800d(0x22b)]===0x0){if(_0x45d7c8&&_0x514e98)console[_0x20800d(0x385)]('No\x20sessions\x20found\x20for:\x20'+_0x45d7c8+'.'+_0x514e98);else _0x45d7c8?console[_0x20800d(0x385)](_0x20800d(0x32a)+_0x45d7c8):console[_0x20800d(0x385)](_0x20800d(0x243));}else{const _0x1161d9=_0x15d702[_0x20800d(0x31d)],_0x3e8ff7=this[_0x20800d(0x23a)](_0x5698af,_0x1161d9);_0x15d702[_0x20800d(0x209)]?await writeOutput(_0x3e8ff7,_0x15d702[_0x20800d(0x209)],_0x20800d(0x233)):console[_0x20800d(0x385)](_0x3e8ff7);}!_0x45d7c8&&(console[_0x20800d(0x343)](''),console[_0x20800d(0x343)](a42_0x28d120[_0x20800d(0x307)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a42_0x28d120[_0x20800d(0x307)](_0x20800d(0x34e))+'or'+a42_0x28d120[_0x20800d(0x307)](_0x20800d(0x37c))));}else{if(_0x5698af[_0x20800d(0x22b)]===0x0){if(_0x45d7c8&&_0x514e98)console[_0x20800d(0x385)](_0x20800d(0x269)+_0x45d7c8+'.'+_0x514e98);else _0x45d7c8?console[_0x20800d(0x385)](_0x20800d(0x32a)+_0x45d7c8):console['log'](_0x20800d(0x243));}else await this['navigateSessionsInteractive'](_0x5698af,_0x22a5ac,_0x45d7c8);}}return 0x0;}[a42_0xc57567(0x23a)](_0x1373bd,_0x4ae897){const _0x21cacf=a42_0xc57567,_0x4356b3=[],_0x1d2144=new Map();let _0x4842c5=Infinity,_0x1b85f9=-Infinity;for(const _0xa4101 of _0x1373bd){if(_0xa4101['lastAttempt']?.[_0x21cacf(0x2ac)]){const _0xf5af27=new Date(_0xa4101[_0x21cacf(0x2a9)][_0x21cacf(0x2ac)])['getTime'](),_0x5f3c4a=_0xa4101[_0x21cacf(0x2a9)][_0x21cacf(0x23f)]?new Date(_0xa4101[_0x21cacf(0x2a9)][_0x21cacf(0x23f)])[_0x21cacf(0x2e8)]():Date[_0x21cacf(0x2c1)](),_0x2c395e=_0xa4101[_0x21cacf(0x296)]?.[_0x21cacf(0x331)]||_0x21cacf(0x2df);!_0x1d2144[_0x21cacf(0x34a)](_0x2c395e)&&_0x1d2144[_0x21cacf(0x25a)](_0x2c395e,[]),_0x1d2144[_0x21cacf(0x2c3)](_0x2c395e)['push']({'session':_0xa4101,'startTime':_0xf5af27,'endTime':_0x5f3c4a,'duration':_0x5f3c4a-_0xf5af27}),_0x4842c5=Math[_0x21cacf(0x232)](_0x4842c5,_0xf5af27),_0x1b85f9=Math[_0x21cacf(0x30f)](_0x1b85f9,_0x5f3c4a);}}if(_0x1d2144[_0x21cacf(0x33d)]===0x0)return _0x21cacf(0x2ec);const _0x1cbafa=process[_0x21cacf(0x297)][_0x21cacf(0x350)]||0x78,_0x9dd6aa=0x1e,_0x370faa=0x32,_0x38fcc=0x4,_0x5d8269=Math[_0x21cacf(0x232)](_0x370faa,Math[_0x21cacf(0x30f)](_0x9dd6aa,Math[_0x21cacf(0x347)](_0x1cbafa*0.3))),_0x43ab95=_0x1cbafa-_0x5d8269-TIMELINE_CONFIG['GUTTER']-0x3-_0x38fcc,_0x4363f3=_0x1b85f9-_0x4842c5,_0x29adf9=_0x4363f3/_0x5d8269,_0x259153=renderTimeAxis({'startTime':_0x4842c5,'endTime':_0x1b85f9,'durationMs':_0x4363f3,'msPerChar':_0x29adf9},_0x5d8269),_0x3c73e5=[];for(const _0x49e645 of _0x1d2144[_0x21cacf(0x387)]()){_0x3c73e5[_0x21cacf(0x2c5)](..._0x49e645);}_0x3c73e5['sort']((_0x4656c2,_0x477adf)=>_0x477adf['startTime']-_0x4656c2[_0x21cacf(0x205)]);const _0x6eea9d=new Date(_0x4842c5),_0x1a1630=formatDate(_0x6eea9d),_0xd507f7=_0x38fcc+TIMELINE_CONFIG[_0x21cacf(0x360)]+TIMELINE_CONFIG[_0x21cacf(0x27e)]+_0x43ab95,_0x248fd0='\x20'[_0x21cacf(0x335)](_0xd507f7-_0x1a1630[_0x21cacf(0x22b)]),_0x401460=_0x248fd0+a42_0x28d120[_0x21cacf(0x307)](_0x1a1630)+'\x20'+_0x259153;_0x4356b3['push'](_0x401460);const _0x1bb44c=0x16;let _0x2c6262=0x0;for(const _0x55be63 of _0x3c73e5){const _0x34d730=_0x55be63[_0x21cacf(0x317)][_0x21cacf(0x296)]?.[_0x21cacf(0x331)]||'?',_0x22d543=Math[_0x21cacf(0x232)](stringWidth(_0x34d730),_0x1bb44c);_0x2c6262=Math[_0x21cacf(0x30f)](_0x2c6262,_0x22d543);}for(const _0x17444a of _0x3c73e5){const {session:_0x5888cd,startTime:_0x170225,endTime:_0xedeed1,duration:_0x121e79}=_0x17444a,_0x1532ed=_0x5888cd[_0x21cacf(0x296)]?.['id'],_0x57dfb4=_0x5888cd['id'],_0x2c9e69=_0x5888cd[_0x21cacf(0x296)]?.[_0x21cacf(0x331)]||'?',_0x812677=_0x5888cd[_0x21cacf(0x2da)]?.[_0x21cacf(0x331)]||'?';let _0x3536de,_0x1bc776;if(_0x5888cd[_0x21cacf(0x2a9)]){const _0x17ef38=_0x5888cd[_0x21cacf(0x2a9)];!_0x17ef38['done']?(_0x3536de=_0x17ef38[_0x21cacf(0x398)]?'🛑':'🔄',_0x1bc776=_0x17ef38[_0x21cacf(0x398)]?a42_0x28d120[_0x21cacf(0x2a1)]:a42_0x28d120[_0x21cacf(0x1fd)]):(_0x3536de=_0x17ef38[_0x21cacf(0x32b)]?'✅':'❌',_0x1bc776=_0x17ef38[_0x21cacf(0x32b)]?a42_0x28d120[_0x21cacf(0x382)]:a42_0x28d120[_0x21cacf(0x356)]);}else _0x3536de='⏳',_0x1bc776=a42_0x28d120['dim'];const _0x246f67='#'+_0x57dfb4,_0x1f116d=_0x1532ed?hyperlink(_0x246f67,getWorkflowSessionUrl(_0x4ae897,_0x1532ed,_0x57dfb4)):_0x246f67;let _0x409c13=_0x2c9e69;stringWidth(_0x2c9e69)>_0x1bb44c&&(_0x409c13=_0x2c9e69[_0x21cacf(0x273)](0x0,_0x1bb44c-0x1)+'…');const _0x513870=a42_0x28d120[_0x21cacf(0x307)](_0x409c13),_0x58d08d=stringWidth(_0x409c13),_0x2b2246='\x20'[_0x21cacf(0x335)](_0x2c6262-stringWidth(_0x409c13)+0x2),_0x4160d8='('+formatElapsed(_0x121e79)+')',_0x5f472d=stringWidth(_0x4160d8),_0x2063f5=stringWidth(_0x246f67),_0x4cf9a7=_0x2063f5+0x1+_0x58d08d+_0x2b2246[_0x21cacf(0x22b)],_0x9e273a=_0x43ab95-_0x4cf9a7-_0x5f472d-0x1-0x8;let _0x391a76=_0x812677;stringWidth(_0x391a76)>_0x9e273a&&(_0x391a76=_0x391a76['slice'](0x0,_0x9e273a-0x1)+'…');const _0x4602f5=_0x1f116d+'\x20'+_0x513870+_0x2b2246+_0x391a76,_0x8b58f2=stringWidth(_0x4602f5),_0x326f91=_0x43ab95-_0x8b58f2-_0x5f472d,_0x23cd2d=_0x4602f5+'\x20'[_0x21cacf(0x335)](Math[_0x21cacf(0x30f)](0x1,_0x326f91))+a42_0x28d120['dim'](_0x4160d8),_0x5ccdeb=Math[_0x21cacf(0x347)]((_0x170225-_0x4842c5)/_0x29adf9),_0x3ca8ce=Math['floor']((_0xedeed1-_0x4842c5)/_0x29adf9),_0x3b4927=Math[_0x21cacf(0x30f)](_0x5ccdeb+0x1,_0x3ca8ce),_0x5ce6bd=new Array(_0x5d8269)[_0x21cacf(0x261)]('\x20');for(let _0x10b69a=_0x5ccdeb;_0x10b69a<Math[_0x21cacf(0x232)](_0x3b4927,_0x5d8269);_0x10b69a++){_0x5ce6bd[_0x10b69a]='─';}const _0x1ff4f2=_0x5ce6bd[_0x21cacf(0x27a)](_0x37c886=>_0x37c886==='\x20'?'\x20':_0x1bc776(_0x37c886))[_0x21cacf(0x238)]('');_0x4356b3[_0x21cacf(0x2c5)](_0x3536de+'\x20'+_0x23cd2d+'│'+_0x1ff4f2+'│');}return _0x4356b3[_0x21cacf(0x238)]('\x0a');}async[a42_0xc57567(0x32f)](_0x681e71,_0x579721,_0x2f4ed3){const _0x451bc2=a42_0xc57567,{options:_0x3db90a,tdx:_0x2d8ebb}=_0x579721,_0x43d305=_0x3db90a['site'],{timelineRows:_0x27970e,timeAxisHeader:_0x239c75}=this[_0x451bc2(0x2ee)](_0x681e71,_0x43d305),_0x155fd0=_0x27970e[_0x451bc2(0x36b)](_0xc83e16=>_0xc83e16[_0x451bc2(0x270)]);if(_0x155fd0['length']===0x0){const _0x354113=this[_0x451bc2(0x23a)](_0x681e71,_0x43d305);console[_0x451bc2(0x385)](_0x354113);!_0x2f4ed3&&(console[_0x451bc2(0x343)](''),console[_0x451bc2(0x343)](a42_0x28d120[_0x451bc2(0x307)](_0x451bc2(0x1fe))),console[_0x451bc2(0x343)](a42_0x28d120[_0x451bc2(0x307)](_0x451bc2(0x34e))+'or'+a42_0x28d120[_0x451bc2(0x307)](_0x451bc2(0x37c))));return;}_0x239c75&&console['log'](_0x239c75);const _0x2f5fe5=_0x27970e[_0x451bc2(0x36b)](_0x2b9f79=>_0x2b9f79[_0x451bc2(0x270)])[_0x451bc2(0x27a)](_0x228772=>({'title':_0x228772[_0x451bc2(0x372)],'value':_0x228772[_0x451bc2(0x270)]})),_0x11bb02=process[_0x451bc2(0x297)][_0x451bc2(0x218)]||0x3c,_0xc42a1f=Math[_0x451bc2(0x30f)](0x28,Math['floor'](_0x11bb02*0x2/0x3)),_0x5b1d4a=await a42_0x4fae({'type':_0x451bc2(0x352),'name':_0x451bc2(0x270),'message':_0x451bc2(0x2d1),'choices':_0x2f5fe5,'initial':-0x1,'limit':_0xc42a1f,'clearFirst':!![],'fallback':{'title':_0x451bc2(0x2a6),'value':null},'suggest':(_0x5e704b,_0x5f07dc)=>{const _0x510758=_0x451bc2;if(!_0x5e704b)return Promise[_0x510758(0x310)](_0x5f07dc);const _0x50e8a0=_0x5f07dc[_0x510758(0x36b)](_0xfebec2=>{const _0x148200=_0x510758,_0x38a0bf=_0xfebec2;return _0x38a0bf[_0x148200(0x334)][_0x148200(0x279)]()[_0x148200(0x26d)](_0x5e704b[_0x148200(0x279)]());});return Promise[_0x510758(0x310)](_0x50e8a0);}}),_0x1255aa=()=>{const _0x1f7812=_0x451bc2;process[_0x1f7812(0x297)][_0x1f7812(0x268)](_0x1f7812(0x289)),process['stdout'][_0x1f7812(0x268)](_0x1f7812(0x289)),process['stdout'][_0x1f7812(0x268)](_0x1f7812(0x289));},_0x26affe=_0x5b1d4a&&_0x5b1d4a['attemptId']&&_0x5b1d4a[_0x451bc2(0x270)]!==null&&_0x5b1d4a[_0x451bc2(0x270)]['trim']()!=='';if(!_0x26affe){_0x1255aa(),console[_0x451bc2(0x385)](a42_0x28d120[_0x451bc2(0x307)]('Cancelled'));return;}_0x1255aa();const _0x155605=_0x681e71['find'](_0x1dc7fa=>_0x1dc7fa[_0x451bc2(0x2a9)]?.['id']===_0x5b1d4a[_0x451bc2(0x270)]);if(_0x155605){const _0x1a2488=_0x155605[_0x451bc2(0x296)]?.['name']||'?',_0x20c989=_0x155605[_0x451bc2(0x2da)]?.[_0x451bc2(0x331)]||'?';console[_0x451bc2(0x385)]('Project:\x20'+a42_0x28d120[_0x451bc2(0x307)](_0x1a2488)+_0x451bc2(0x306)+a42_0x28d120[_0x451bc2(0x307)](_0x20c989));}const _0x3575f1=new WorkflowTimelineCommand();await _0x3575f1[_0x451bc2(0x2dc)]({'args':[],'options':{..._0x3db90a,'attemptId':_0x5b1d4a[_0x451bc2(0x270)]},'tdx':_0x2d8ebb});}['generateSessionTimelineRows'](_0x42b057,_0xdc6967){const _0x4ec773=a42_0xc57567,_0x3ac66d=new Map();for(const _0x317ffa of _0x42b057){_0x317ffa['id']&&_0x317ffa[_0x4ec773(0x2a9)]?.['id']&&_0x3ac66d[_0x4ec773(0x25a)](_0x317ffa['id'],_0x317ffa[_0x4ec773(0x2a9)]['id']);}const _0x202e24=[];let _0x10f2f9='';const _0x1c0877=this[_0x4ec773(0x23a)](_0x42b057,_0xdc6967),_0x58c9ce=_0x1c0877[_0x4ec773(0x294)]('\x0a');for(const _0x1db360 of _0x58c9ce){if(_0x1db360['startsWith'](_0x4ec773(0x348))||_0x1db360[_0x4ec773(0x353)](/^\s+\d{4}-\d{2}-\d{2}/))_0x10f2f9=_0x1db360;else{if(_0x1db360['match'](/^[✅❌🔄🛑⏳]/)){const _0x1e5e7b=_0x1db360['match'](/#(\d+)/),_0x4a97f0=_0x1e5e7b?_0x1e5e7b[0x1]:null,_0x1959c6=_0x4a97f0?_0x3ac66d[_0x4ec773(0x2c3)](_0x4a97f0)||null:null,_0x3d2e2a=_0x42b057[_0x4ec773(0x386)](_0x94204=>_0x94204['id']===_0x4a97f0),_0x66518e=_0x3d2e2a?.[_0x4ec773(0x296)]?.[_0x4ec773(0x331)]||'';_0x202e24['push']({'displayLine':_0x1db360,'attemptId':_0x1959c6,'projectName':_0x66518e});}}}return{'timelineRows':_0x202e24,'timeAxisHeader':_0x10f2f9};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x290);[a42_0xc57567(0x371)]=a42_0xc57567(0x258);async[a42_0xc57567(0x2dc)](_0xb6ba71){const _0x4428b8=a42_0xc57567,{options:_0x245951,args:_0x42bf9e,tdx:_0x5a84ab}=_0xb6ba71,_0x480b94=this['parseProjectWorkflowPattern'](_0x42bf9e,_0x245951);if(!_0x480b94)return 0x1;const {projectName:_0x436580,workflowName:_0x4ef2ec}=_0x480b94,_0x1b9c17=_0x245951['includeRetried'];if(_0x245951['verbose']){if(_0x436580&&_0x4ef2ec)console['error'](_0x4428b8(0x2ef)+_0x436580+'.'+_0x4ef2ec);else _0x436580&&console[_0x4428b8(0x343)](_0x4428b8(0x2b4)+_0x436580);_0x1b9c17&&console[_0x4428b8(0x343)](_0x4428b8(0x35d));}const _0x2cd774=await withSpinner(_0x4428b8(0x1f7),()=>_0x5a84ab['workflow']['attempts']({'projectName':_0x436580,'workflowName':_0x4ef2ec,'includeRetried':_0x1b9c17,'limit':_0x245951[_0x4428b8(0x22d)]}),{'verbose':_0x245951[_0x4428b8(0x250)]}),_0x2d6c56=_0x2cd774[_0x4428b8(0x201)],_0x182d4d=_0x245951[_0x4428b8(0x22d)]||0x64,_0x5e091=_0x2d6c56[_0x4428b8(0x22b)]>=_0x182d4d?a42_0x28d120[_0x4428b8(0x307)](_0x4428b8(0x301)):'';console[_0x4428b8(0x343)](_0x4428b8(0x36f)+_0x2d6c56[_0x4428b8(0x22b)]+_0x4428b8(0x22f)+(_0x2d6c56[_0x4428b8(0x22b)]!==0x1?'s':'')+_0x5e091);if(_0x245951[_0x4428b8(0x24b)]===_0x4428b8(0x1fc)||_0x245951['format']==='jsonl'||_0x245951[_0x4428b8(0x24b)]===_0x4428b8(0x39e))await handleSDKOutput(_0x2d6c56,_0x245951);else{if(_0x2d6c56[_0x4428b8(0x22b)]===0x0){if(_0x436580&&_0x4ef2ec)console['log']('No\x20attempts\x20found\x20for:\x20'+_0x436580+'.'+_0x4ef2ec);else _0x436580?console['log'](_0x4428b8(0x322)+_0x436580):console['log'](_0x4428b8(0x22c));}else{const _0x2312b7=_0x245951[_0x4428b8(0x31d)],_0x382d69=_0x2d6c56[_0x4428b8(0x27a)](_0x4266ea=>{const _0x203016=_0x4428b8,_0x1ee06a=a42_0x28d120['dim']('#'+_0x4266ea['id']),_0xe8dd53=_0x4266ea[_0x203016(0x296)]?.['id'],_0x566d95=_0x4266ea[_0x203016(0x300)]||_0x4266ea[_0x203016(0x1f6)],_0x24878f=_0xe8dd53&&_0x566d95?hyperlink(_0x1ee06a,getWorkflowAttemptUrl(_0x2312b7,_0xe8dd53,_0x566d95,_0x4266ea['id'])):_0x1ee06a,{icon:_0x49b6d7,text:_0x23de87}=getAttemptStatusDisplay(_0x4266ea),_0x266e39=(_0x4266ea[_0x203016(0x296)]?.[_0x203016(0x331)]||'?')+'.'+(_0x4266ea['workflow']?.[_0x203016(0x331)]||'?'),_0x2a94f9=_0x4266ea['sessionTime']?a42_0x28d120[_0x203016(0x307)](_0x4266ea[_0x203016(0x24f)]):'';return(_0x24878f+'\x20'+_0x49b6d7+(_0x23de87?'\x20'+_0x23de87:'')+'\x20'+_0x266e39+'\x20'+_0x2a94f9)[_0x203016(0x2a0)]();});await writeOutput(_0x382d69[_0x4428b8(0x238)]('\x0a'),_0x245951[_0x4428b8(0x209)],_0x4428b8(0x233));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x35c);[a42_0xc57567(0x371)]=a42_0xc57567(0x23c);async[a42_0xc57567(0x2dc)](_0x51857a){const _0x106a21=a42_0xc57567,{options:_0x1cb89e,args:_0x5686f9,tdx:_0x1cb342}=_0x51857a,_0x5cb2f7=_0x5686f9[0x0];if(!_0x5cb2f7)return console[_0x106a21(0x343)](_0x106a21(0x392)),0x1;_0x1cb89e[_0x106a21(0x250)]&&console['error'](_0x106a21(0x2b2)+_0x5cb2f7);const _0x50d4fd=await withSpinner(_0x106a21(0x32d),()=>_0x1cb342['workflow'][_0x106a21(0x320)](_0x5cb2f7),{'verbose':_0x1cb89e[_0x106a21(0x250)]}),_0x47b612=_0x50d4fd[_0x106a21(0x201)];let _0x28aac5;!_0x47b612[_0x106a21(0x21e)]?_0x28aac5=_0x47b612[_0x106a21(0x398)]?_0x106a21(0x28d):_0x106a21(0x272):_0x28aac5=_0x47b612[_0x106a21(0x32b)]?_0x106a21(0x32b):_0x106a21(0x343);let _0x3a59a9;if(_0x47b612[_0x106a21(0x2ac)]&&_0x47b612[_0x106a21(0x23f)]){const _0x2446b1=new Date(_0x47b612[_0x106a21(0x2ac)])[_0x106a21(0x2e8)](),_0x58e78d=new Date(_0x47b612[_0x106a21(0x23f)])['getTime']();_0x3a59a9=Math['round']((_0x58e78d-_0x2446b1)/0x3e8);}const _0x104452={'attempt_id':_0x47b612['id'],'status':_0x28aac5,..._0x47b612[_0x106a21(0x28b)]!==undefined&&{'index':_0x47b612['index']},..._0x47b612[_0x106a21(0x296)]&&{'project':_0x47b612[_0x106a21(0x296)][_0x106a21(0x331)]},..._0x47b612['workflow']&&{'workflow':_0x47b612[_0x106a21(0x2da)][_0x106a21(0x331)]},..._0x47b612['sessionId']&&{'session_id':_0x47b612['sessionId']},..._0x47b612[_0x106a21(0x24f)]&&{'session_time':_0x47b612[_0x106a21(0x24f)]},..._0x47b612['retryAttemptName']&&{'retry_attempt':_0x47b612[_0x106a21(0x349)]},..._0x3a59a9!==undefined&&{'duration_sec':_0x3a59a9},..._0x47b612[_0x106a21(0x2ac)]&&{'created_at':_0x47b612[_0x106a21(0x2ac)]},..._0x47b612[_0x106a21(0x23f)]&&{'finished_at':_0x47b612[_0x106a21(0x23f)]},...Object[_0x106a21(0x377)](_0x47b612['params'])[_0x106a21(0x22b)]>0x0&&{'params':_0x47b612[_0x106a21(0x2f6)]}};return await handleSingleObjectOutput(_0x104452,_0x1cb89e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x2d2);['description']=a42_0xc57567(0x2fd);async[a42_0xc57567(0x2dc)](_0xc3f3b9){const _0x3bef86=a42_0xc57567,{options:_0x29a7f7,args:_0x5d9fa5,tdx:_0xd05b3b}=_0xc3f3b9,_0x1872f6=_0x5d9fa5[0x0];if(!_0x1872f6)return console[_0x3bef86(0x343)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x3ce004=_0x29a7f7[_0x3bef86(0x338)];_0x29a7f7[_0x3bef86(0x250)]&&(console[_0x3bef86(0x343)](_0x3bef86(0x2b2)+_0x1872f6),_0x3ce004&&console['error'](_0x3bef86(0x280)));const _0x28e594=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0xd05b3b[_0x3bef86(0x2da)][_0x3bef86(0x332)](_0x1872f6,_0x3ce004||![]),{'verbose':_0x29a7f7[_0x3bef86(0x250)]}),_0x181535=_0x28e594['data'];return console['error'](_0x3bef86(0x36f)+_0x181535[_0x3bef86(0x22b)]+_0x3bef86(0x389)+(_0x181535[_0x3bef86(0x22b)]!==0x1?'s':'')),await handleSDKOutput(_0x181535,_0x29a7f7),0x0;}}function a42_0x4a1f(){const _0x3949d8=['\x0aDry\x20run\x20-\x20nothing\x20pushed','Filter:\x20project=','renderSingleTimeline','\x0aPolling...\x20(','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Fetching\x20log\x20files...','utf-8','revision','Select\x20a\x20task\x20to\x20view\x20logs:','param','workflow:upload','showWorkflowConsoleUrl','unchanged','1353900aARBFW','now','\x20\x20Project:\x20','get','\x20\x20Console:\x20','push','tdx.json','Usage:\x20workflow:delete\x20<project-name-or-id>','Error:','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','projectId','✔\x20Pushed\x20','context','pollTimeline','workflow:projects','\x0aClone\x20\x22','TASK_NAME_WIDTH','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','workflow:tasks','projectName','sessions','Target:\x20','getFullYear','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','targetExists','📋\x20','workflow','startsWith','execute','\x20workflow','resolveProjectDir','(unknown)','preparePushProject','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','\x20\x20Location:\x20','1576JvXilJ','Usage:\x20tdx\x20wf\x20use\x20<project>','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','requireProject','\x0aPush\x20these\x20changes?','getTime','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','status','✔\x20Clone\x20complete','No\x20sessions\x20with\x20timing\x20information','projects','generateSessionTimelineRows','Filter:\x20','Killing\x20attempt...','localeCompare','\x20new','\x22?\x20This\x20cannot\x20be\x20undone.','POLL_INTERVAL_MS','No\x20workflow\x20sessions\x20found','params','path','duration','\x0aUpdate\x20existing\x20project\x20\x22','Invalid\x20format:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Show\x20tasks\x20for\x20an\x20attempt','replace','select','session_id','\x20(use\x20--limit\x20to\x20show\x20more)','group_error','No\x20projects\x20match\x20pattern:\x20','Files\x20to\x20upload:\x20','workflow:retry',',\x20Workflow:\x20','dim','all','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','dryRun','\x0aFailed\x20to\x20fetch\x20attempt\x20data','session:','workflow:secrets:list','task','max','resolve','\x20deleted','✔\x20Deleted\x20project\x20','prepareCloneProject','\x20(system)','Tip:\x20cd\x20to\x20workflows/','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','session','New\x20project\x20name:\x20','\x20\x20Changes:\x20','Project\x20directory:\x20','newProjectName','\x20logs','site','workflowName','Setting\x20secret...','attempt','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','No\x20attempts\x20found\x20in\x20project:\x20','parseProjectWorkflowPattern','Resume\x20from:\x20','diff','\x20to\x20see\x20detailed\x20logs','Session\x20not\x20found:\x20','existingProjectId','Source:\x20','No\x20sessions\x20found\x20in\x20project:\x20','success','Writing\x20files...','Getting\x20attempt\x20details...','---\x20','navigateSessionsInteractive','\x22\x20with\x20new\x20revision?','name','tasks','\x20\x20Session\x20context\x20set\x20to:\x20','title','repeat','Cloning\x20to\x20','getMinutes','includeSubtasks','(use\x20--limit\x20to\x20see\x20more)','applyPullProject','getHours','workflow:download','size','2DxYMnE','\x0a✔\x20Attempt\x20complete','splice','white','Source\x20directory:\x20','error','Total:\x20','Downloading\x20project\x20','Deleting\x20project\x20','floor','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','retryAttemptName','has','end','updatedAt','workflows','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20secret','columns','modified','autocomplete','match','Output\x20directory:\x20','workflow:run','red','Kill\x20a\x20running\x20attempt','reason','Validation:\x20skipped','690424uUIdhS','No\x20workflows\x20found\x20in\x20project:\x20','workflow:attempt','Include\x20retried:\x20yes','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','summary','ICON_WIDTH','indexOf','Pull\x20workflow\x20project\x20to\x20local\x20folder','-\x20nothing\x20pushed','Retry\x20a\x20session\x20or\x20attempt','MIN_TIMELINE_WIDTH','taskName','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','fullName','isNewProject','filter','Target\x20directory:\x20','type','Error:\x20','✔\x20Found\x20','fromTask','description','displayLine','806805sxVbfZ','\x0a⚠\x20Project\x20\x22','\x20\x20Project\x20ID:\x20','✔\x20Downloaded\x20','keys','Latest\x20session\x20has\x20no\x20attempt','\x20-\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','MIN_LABEL_COUNT','\x20\x20tdx\x20wf\x20use\x20<project>','Retrying\x20session...','start','\x20\x20Revision:\x20','\x22\x20to\x20new\x20project\x20\x22','Revision:\x20','green','Project\x20name\x20is\x20required','Task\x20name:\x20','log','find','values','From\x20task:\x20','\x20task','run','fs/promises','Project\x20name:\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','✔\x20Project:\x20','\x20modified','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','executeCloneProject','Error:\x20Attempt\x20ID\x20is\x20required','30IGfvDi','Parameters:\x20','skipValidation','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','workflow:workflows','cancelRequested','→\x20New\x20project:\x20','jsonl','delete','new','\x0aError:','table','stringify','text','sessionId','Listing\x20workflow\x20attempts...','\x20from\x20session\x20','\x0aApply\x20these\x20changes?','msPerChar','sourceProjectName','json','blue','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Pulling\x20project\x20','data','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','buildTimelineData','Attempt:\x20','startTime','newProjectId','✔\x20Retry\x20started','sort','output','💡\x20Tip:\x20Use\x20','Analyzing\x20changes...','Pushing\x20workflow\x20project...','retrySession','Workflow:\x20','\x22\x20already\x20exists\x20(ID:\x20','MAX_TASKS_DISPLAY','Listing\x20workflow\x20sessions...','parse','readFile','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','window','cwd','Listing\x20workflow\x20projects...','rows','✔\x20Pull\x20complete','/attempt/','substring','state','basename','done','\x20unchanged','workflowProject','\x20project','Error:\x20KEY=VALUE\x20is\x20required','MAX_POLL_ITERATIONS','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Start\x20a\x20workflow\x20run','Dry\x20run:\x20yes','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','sys','workflow:push','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','length','No\x20attempts\x20found','limit','kill','\x20attempt','padStart','unknown','min','list','revision:\x20','Updating\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','join','stat','renderSessionsTimeline','Resolving\x20project\x20\x27','Show\x20specific\x20attempt\x20details','workflow:pull','✔\x20Workflow\x20project\x20context\x20cleared.','finishedAt','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x20\x20Session\x20ID:\x20','follow','No\x20sessions\x20found','workflow:use','🔄\x20','3714996icddzr','resolveProject','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Pushing\x20project...','deleteSecret','format','icon','isTTY','fileCount','sessionTime','verbose','→\x20Project:\x20','download','yes','Listing\x20workflows...','Error:\x20Project\x20name\x20is\x20required','Using\x20attempt\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','List\x20workflow\x20attempts','Loading\x20sessions...','set','\x20\x20New\x20attempt\x20ID:\x20','Auto-selected\x20latest\x20session:\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','logs','.\x20Expected\x20format:\x20KEY=VALUE','cyan','fill','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','renderTimeline','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','pullProject','✔\x20Push\x20complete','Key:\x20','write','No\x20sessions\x20found\x20for:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','No\x20workflows\x20found','\x20\x20Files\x20extracted:\x20','includes','\x20\x20Attempt\x20ID:\x20','planned','attemptId','retryAttempt','running','slice','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','List\x20all\x20workflow\x20projects','isArray','getDate','deleted','toLowerCase','map','resolveProjectId','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','fileSize','ICON_SPACING','Session\x20','Including\x20subtasks:\x20yes','...','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','hasChanges','/sessions/','Error:\x20Invalid\x20JSON\x20in\x20--params','metadata','resumeFrom','6587cUoUfn','\x1b[1A\x1b[2K','861633BFTxof','index','toISOString','canceling','startedAt','\x0aDry\x20run\x20-\x20no\x20files\x20written','workflow:attempts','269268MuFkXU','List\x20workflow\x20execution\x20sessions','sourceDir','split','message','project','stdout','clear','workflow:secrets:delete','pending','attempt:','getMonth','Downloading\x20logs...','changes','Project:\x20','trimEnd','yellow','Failed\x20to\x20fetch\x20attempt\x20data','Session\x20time:\x20','Listing\x20secrets...','listSecrets','No\x20matching\x20sessions\x20found','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Show\x20logs\x20for\x20a\x20workflow\x20attempt','lastAttempt','workflow:secrets:set','Params:\x20','createdAt','workflow:clone','Cancelled','LABEL_MIN_SPACING','workflow:sessions','executePushProject','Attempt\x20ID:\x20'];a42_0x4a1f=function(){return _0x3949d8;};return a42_0x4a1f();}export class WorkflowLogsCommand extends BaseCommand{[a42_0xc57567(0x331)]='workflow:logs';[a42_0xc57567(0x371)]=a42_0xc57567(0x2a8);async['execute'](_0x1e15d4){const _0x48220f=a42_0xc57567,{options:_0xac30ee,args:_0x37e05a,tdx:_0x20895c}=_0x1e15d4,_0x66eded=_0x37e05a[0x0];let _0x16eb36=_0x37e05a[0x1];if(!_0x66eded)return console[_0x48220f(0x343)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0xac30ee['verbose']&&(console['error']('Attempt\x20ID:\x20'+_0x66eded),_0x16eb36&&console['error'](_0x48220f(0x384)+_0x16eb36));const _0x456cac=await withSpinner(_0x48220f(0x2b8),()=>_0x20895c[_0x48220f(0x2da)]['logFiles'](_0x66eded,_0x16eb36),{'verbose':_0xac30ee[_0x48220f(0x250)]}),_0x5c60ed=_0x456cac[_0x48220f(0x201)];if(_0x5c60ed[_0x48220f(0x22b)]===0x0)return console[_0x48220f(0x343)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x16eb36&&(_0xac30ee[_0x48220f(0x1fc)]||_0xac30ee['format']))return await handleSDKOutput(_0x5c60ed,_0xac30ee),0x0;if(!_0x16eb36){const _0x467cbe=_0x5c60ed[_0x48220f(0x27a)](_0x30cc54=>({'title':_0x30cc54[_0x48220f(0x366)]+'\x20('+formatBytes(_0x30cc54[_0x48220f(0x27d)])+')','value':_0x30cc54[_0x48220f(0x366)]})),_0x244e89=await a42_0x4fae({'type':_0x48220f(0x2ff),'name':_0x48220f(0x30e),'message':_0x48220f(0x2bb),'choices':_0x467cbe});if(!_0x244e89[_0x48220f(0x30e)])return console[_0x48220f(0x343)](_0x48220f(0x2ae)),0x0;_0x16eb36=_0x244e89[_0x48220f(0x30e)];}const _0x163f68=await withSpinner(_0x48220f(0x29d),()=>_0x20895c[_0x48220f(0x2da)][_0x48220f(0x25e)](_0x66eded,_0x16eb36),{'verbose':_0xac30ee['verbose']}),_0x3b83f3=_0x163f68[_0x48220f(0x201)];return _0x3b83f3?console[_0x48220f(0x385)](_0x3b83f3):console[_0x48220f(0x343)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']='workflow:kill';[a42_0xc57567(0x371)]=a42_0xc57567(0x357);async[a42_0xc57567(0x2dc)](_0xaf5da4){const _0x1b0363=a42_0xc57567,{options:_0x2f6646,args:_0x53a455,tdx:_0x2c3155}=_0xaf5da4,_0x206dcf=_0x53a455[0x0];if(!_0x206dcf)return console[_0x1b0363(0x343)](_0x1b0363(0x392)),0x1;const _0x77c632=_0x2f6646[_0x1b0363(0x358)];_0x2f6646[_0x1b0363(0x250)]&&(console[_0x1b0363(0x343)](_0x1b0363(0x2b2)+_0x206dcf),_0x77c632&&console[_0x1b0363(0x343)]('Reason:\x20'+_0x77c632));if(!_0x2f6646['yes']){if(!isInteractive())return console[_0x1b0363(0x343)](a42_0x28d120[_0x1b0363(0x356)]('\x0aError:'),_0x1b0363(0x2e5)),console['error'](a42_0x28d120[_0x1b0363(0x307)](_0x1b0363(0x25d))),0x1;const _0xb1c46e=await confirmKey(_0x1b0363(0x2fc)+_0x206dcf+'?');if(!_0xb1c46e)return console[_0x1b0363(0x343)](a42_0x28d120[_0x1b0363(0x2a1)](_0x1b0363(0x2ae))),0x1;}const _0x27170e=await withSpinner(_0x1b0363(0x2f0),()=>_0x2c3155['workflow'][_0x1b0363(0x22e)](_0x206dcf,_0x77c632),{'verbose':_0x2f6646[_0x1b0363(0x250)]}),_0x61b350=_0x27170e[_0x1b0363(0x201)];return console[_0x1b0363(0x343)]('✔\x20'+_0x61b350),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x305);[a42_0xc57567(0x371)]=a42_0xc57567(0x364);async[a42_0xc57567(0x2dc)](_0x2ba04c){const _0x59bbd0=a42_0xc57567,{options:_0x5f36c2,args:_0x7c6935,tdx:_0x38c457}=_0x2ba04c,_0x48d247=_0x7c6935[0x0];if(!_0x48d247)return console[_0x59bbd0(0x343)](_0x59bbd0(0x27c)),console[_0x59bbd0(0x343)](_0x59bbd0(0x2fb)),0x1;let _0x477f6c=![],_0x57b842=_0x48d247;if(_0x48d247[_0x59bbd0(0x2db)](_0x59bbd0(0x30c)))_0x477f6c=!![],_0x57b842=_0x48d247['substring'](0x8);else{if(_0x48d247[_0x59bbd0(0x2db)](_0x59bbd0(0x29b)))_0x477f6c=![],_0x57b842=_0x48d247[_0x59bbd0(0x21b)](0x8);else return console[_0x59bbd0(0x343)](_0x59bbd0(0x2a7)),console[_0x59bbd0(0x343)](_0x59bbd0(0x2fb)),0x1;}const _0x2d2070=_0x5f36c2[_0x59bbd0(0x370)],_0x103d88=_0x5f36c2[_0x59bbd0(0x287)],_0x47dbcb=_0x5f36c2[_0x59bbd0(0x2f6)],_0x3ea512=_0x5f36c2['force'];_0x5f36c2[_0x59bbd0(0x250)]&&(console[_0x59bbd0(0x343)](_0x59bbd0(0x2d5)+(_0x477f6c?_0x59bbd0(0x317):_0x59bbd0(0x320))+'\x20'+_0x57b842),_0x2d2070&&console[_0x59bbd0(0x343)](_0x59bbd0(0x388)+_0x2d2070),_0x103d88&&console[_0x59bbd0(0x343)](_0x59bbd0(0x324)+_0x103d88),_0x47dbcb&&console[_0x59bbd0(0x343)](_0x59bbd0(0x2ab)+_0x47dbcb),_0x3ea512&&console['error']('Force:\x20yes'));let _0x505f8c;if(_0x47dbcb)try{if(_0x47dbcb[_0x59bbd0(0x2db)]('@')){const _0x4e778b=await import(_0x59bbd0(0x38b)),_0x3a4de3=_0x47dbcb['substring'](0x1),_0x4cbedb=await _0x4e778b[_0x59bbd0(0x213)](_0x3a4de3,_0x59bbd0(0x2b9));_0x505f8c=JSON[_0x59bbd0(0x212)](_0x4cbedb);}else _0x505f8c=JSON[_0x59bbd0(0x212)](_0x47dbcb);}catch{return console[_0x59bbd0(0x343)](_0x59bbd0(0x285)),0x1;}if(!_0x5f36c2[_0x59bbd0(0x253)]){if(!isInteractive())return console[_0x59bbd0(0x343)](a42_0x28d120[_0x59bbd0(0x356)](_0x59bbd0(0x39d)),_0x59bbd0(0x2e5)),console[_0x59bbd0(0x343)](a42_0x28d120[_0x59bbd0(0x307)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x32a5f5=await confirmKey(_0x59bbd0(0x237)+(_0x477f6c?_0x59bbd0(0x317):_0x59bbd0(0x320))+'\x20'+_0x57b842+'?');if(!_0x32a5f5)return console[_0x59bbd0(0x343)](a42_0x28d120[_0x59bbd0(0x2a1)](_0x59bbd0(0x2ae))),0x1;}let _0x23a80a;_0x477f6c?_0x23a80a=await withSpinner(_0x59bbd0(0x37d),()=>_0x38c457[_0x59bbd0(0x2da)][_0x59bbd0(0x20d)](_0x57b842,{'fromTask':_0x2d2070,'retryParams':_0x505f8c}),{'verbose':_0x5f36c2[_0x59bbd0(0x250)]}):_0x23a80a=await withSpinner('Retrying\x20attempt...',()=>_0x38c457[_0x59bbd0(0x2da)][_0x59bbd0(0x271)](_0x57b842,{'resumeFrom':_0x103d88,'retryParams':_0x505f8c,'force':_0x3ea512}),{'verbose':_0x5f36c2[_0x59bbd0(0x250)]});const _0x1a22df=_0x23a80a[_0x59bbd0(0x201)];return console['error'](_0x59bbd0(0x207)),console['error'](_0x59bbd0(0x25b)+_0x1a22df['attemptId']),console[_0x59bbd0(0x343)](_0x59bbd0(0x241)+_0x1a22df['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x355);[a42_0xc57567(0x371)]=a42_0xc57567(0x225);async[a42_0xc57567(0x2dc)](_0x4707e4){const _0x4eb7f3=a42_0xc57567,{options:_0x5db6cb,args:_0x2c1c3a,tdx:_0x2526b8}=_0x4707e4;let _0x3394a9=_0x2c1c3a[0x0];if(!_0x3394a9){const _0x2dceed=this[_0x4eb7f3(0x247)]([],_0x5db6cb),_0x4c97b7=await withSpinner('Loading\x20workflows...',()=>_0x2526b8[_0x4eb7f3(0x2da)][_0x4eb7f3(0x34d)](_0x2dceed,{'limit':_0x5db6cb[_0x4eb7f3(0x22d)]}),{'verbose':_0x5db6cb[_0x4eb7f3(0x250)]}),_0x4a1ed5=_0x4c97b7[_0x4eb7f3(0x201)];if(_0x4a1ed5['length']===0x0)return console[_0x4eb7f3(0x343)]('No\x20workflows\x20found'),!_0x2dceed&&console['error'](a42_0x28d120[_0x4eb7f3(0x307)](_0x4eb7f3(0x2e9))),0x1;const _0x110c40=_0x4a1ed5[_0x4eb7f3(0x27a)](_0x377a25=>({'title':_0x377a25['project']?.[_0x4eb7f3(0x331)]+'.'+_0x377a25[_0x4eb7f3(0x331)],'value':_0x377a25['project']?.[_0x4eb7f3(0x331)]+'.'+_0x377a25['name'],'description':_0x377a25[_0x4eb7f3(0x2ba)]?_0x4eb7f3(0x234)+_0x377a25[_0x4eb7f3(0x2ba)]:undefined})),_0x44209=await a42_0x4fae({'type':_0x4eb7f3(0x2ff),'name':'workflow','message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x110c40});if(!_0x44209[_0x4eb7f3(0x2da)])return 0x1;_0x3394a9=_0x44209[_0x4eb7f3(0x2da)];}if(!_0x3394a9[_0x4eb7f3(0x26d)]('.')){const _0x1794b=this[_0x4eb7f3(0x247)]([],_0x5db6cb);if(_0x1794b)_0x3394a9=_0x1794b+'.'+_0x3394a9;else return console[_0x4eb7f3(0x343)](a42_0x28d120[_0x4eb7f3(0x356)]('Error:'),_0x4eb7f3(0x316)),console[_0x4eb7f3(0x343)](a42_0x28d120['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x92fd8a=_0x5db6cb[_0x4eb7f3(0x2bc)],_0x47b3c1=_0x5db6cb[_0x4eb7f3(0x24f)],_0x21e0af={};if(_0x92fd8a&&Array[_0x4eb7f3(0x276)](_0x92fd8a))for(const _0x20d3f0 of _0x92fd8a){const _0xb4bb54=_0x20d3f0[_0x4eb7f3(0x361)]('=');if(_0xb4bb54===-0x1)return console[_0x4eb7f3(0x343)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x20d3f0),console[_0x4eb7f3(0x343)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x29fc2d=_0x20d3f0[_0x4eb7f3(0x21b)](0x0,_0xb4bb54),_0xf2ada9=_0x20d3f0[_0x4eb7f3(0x21b)](_0xb4bb54+0x1);try{_0x21e0af[_0x29fc2d]=JSON['parse'](_0xf2ada9);}catch{_0x21e0af[_0x29fc2d]=_0xf2ada9;}}_0x5db6cb[_0x4eb7f3(0x250)]&&(console['error'](_0x4eb7f3(0x20e)+_0x3394a9),Object[_0x4eb7f3(0x377)](_0x21e0af)[_0x4eb7f3(0x22b)]>0x0&&console[_0x4eb7f3(0x343)](_0x4eb7f3(0x394)+JSON[_0x4eb7f3(0x1f4)](_0x21e0af)),_0x47b3c1&&console[_0x4eb7f3(0x343)](_0x4eb7f3(0x2a3)+_0x47b3c1));const _0xd6d334=await withSpinner('Starting\x20workflow\x20run...',()=>_0x2526b8[_0x4eb7f3(0x2da)][_0x4eb7f3(0x38a)](_0x3394a9,_0x21e0af,{'sessionTime':_0x47b3c1}),{'verbose':_0x5db6cb[_0x4eb7f3(0x250)]}),_0x104b1f=_0xd6d334[_0x4eb7f3(0x201)];console[_0x4eb7f3(0x343)]('✔\x20Workflow\x20run\x20started'),console[_0x4eb7f3(0x343)](_0x4eb7f3(0x26e)+_0x104b1f['id']),console[_0x4eb7f3(0x343)](_0x4eb7f3(0x241)+_0x104b1f[_0x4eb7f3(0x1f6)]),console[_0x4eb7f3(0x343)](_0x4eb7f3(0x2c2)+_0x104b1f[_0x4eb7f3(0x296)]?.[_0x4eb7f3(0x331)]),console[_0x4eb7f3(0x343)]('\x20\x20Workflow:\x20'+_0x104b1f[_0x4eb7f3(0x2da)]?.[_0x4eb7f3(0x331)]);if(_0x104b1f[_0x4eb7f3(0x296)]?.['id']&&_0x104b1f[_0x4eb7f3(0x1f6)]&&_0x104b1f['id']){const _0x772a3f=_0x5db6cb[_0x4eb7f3(0x31d)],_0x4ae94f=getConsoleUrl(_0x772a3f,'/app/workflows/'+_0x104b1f['project']['id']+_0x4eb7f3(0x284)+_0x104b1f['sessionId']+_0x4eb7f3(0x21a)+_0x104b1f['id']);console[_0x4eb7f3(0x343)](_0x4eb7f3(0x2c4)+a42_0x28d120[_0x4eb7f3(0x260)](_0x4ae94f));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a42_0xc57567(0x33c);['description']=a42_0xc57567(0x309);async[a42_0xc57567(0x2dc)](_0x37e8e8){const _0x50c4c9=a42_0xc57567,{options:_0x3dd296,args:_0x6373bf,tdx:_0x4d835a}=_0x37e8e8,_0x265ecb=_0x6373bf[0x0],_0xf55b3b=_0x6373bf[0x1]||'.';if(!_0x265ecb)return console[_0x50c4c9(0x343)](_0x50c4c9(0x255)),console[_0x50c4c9(0x343)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0xb4397b=_0x3dd296[_0x50c4c9(0x2ba)];_0x3dd296[_0x50c4c9(0x250)]&&(console['error'](_0x50c4c9(0x29f)+_0x265ecb),console[_0x50c4c9(0x343)](_0x50c4c9(0x354)+_0xf55b3b),_0xb4397b&&console[_0x50c4c9(0x343)](_0x50c4c9(0x381)+_0xb4397b));const _0x31ef7a=await withSpinner(_0x50c4c9(0x345)+_0x265ecb+_0x50c4c9(0x281),()=>_0x4d835a['workflow'][_0x50c4c9(0x252)](_0x265ecb,_0xf55b3b,{'revision':_0xb4397b}),{'verbose':_0x3dd296[_0x50c4c9(0x250)]}),_0x447e8b=_0x31ef7a[_0x50c4c9(0x201)];return console['error'](_0x50c4c9(0x376)+_0x447e8b[_0x50c4c9(0x2d3)]),console[_0x50c4c9(0x343)](_0x50c4c9(0x37f)+_0x447e8b[_0x50c4c9(0x2ba)]),console['error'](_0x50c4c9(0x26c)+_0x447e8b['filesExtracted']),console['error'](_0x50c4c9(0x2e2)+_0xf55b3b+'/'+_0x447e8b[_0x50c4c9(0x2d3)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x2bd);[a42_0xc57567(0x371)]=a42_0xc57567(0x2c9);async['execute'](_0x4d0f57){const _0x2e95a6=a42_0xc57567,{options:_0x33d5f3,args:_0x5a4862,tdx:_0x52fdbf}=_0x4d0f57;let _0x1aaada='.',_0x57682e=_0x33d5f3[_0x2e95a6(0x331)];if(_0x5a4862[0x0]){const {promises:_0x1ec962}=await import('fs');try{const _0x2fd465=await _0x1ec962[_0x2e95a6(0x239)](_0x5a4862[0x0]);if(_0x2fd465['isDirectory']())_0x1aaada=_0x5a4862[0x0];else return console[_0x2e95a6(0x343)](_0x2e95a6(0x36e)+_0x5a4862[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x57682e=_0x5a4862[0x0],_0x1aaada='.';}}const _0x238db1=_0x33d5f3[_0x2e95a6(0x2ba)],_0xed205c=_0x33d5f3[_0x2e95a6(0x395)];_0x33d5f3[_0x2e95a6(0x250)]&&(console[_0x2e95a6(0x343)](_0x2e95a6(0x31a)+_0x1aaada),_0x57682e&&console[_0x2e95a6(0x343)](_0x2e95a6(0x38c)+_0x57682e),_0x238db1&&console['error'](_0x2e95a6(0x381)+_0x238db1),_0xed205c&&console['error']('Validation:\x20skipped'));const _0x3a34dd=await withSpinner(_0x2e95a6(0x20c),()=>_0x52fdbf[_0x2e95a6(0x2da)]['push'](_0x1aaada,{'projectName':_0x57682e,'revision':_0x238db1,'skipValidation':_0xed205c}),{'verbose':_0x33d5f3[_0x2e95a6(0x250)]}),_0x47246e=_0x3a34dd[_0x2e95a6(0x201)];return console[_0x2e95a6(0x343)](_0x2e95a6(0x2cb)+_0x47246e[_0x2e95a6(0x2d3)]),console['error'](_0x2e95a6(0x375)+_0x47246e['projectId']),console[_0x2e95a6(0x343)](_0x2e95a6(0x37f)+_0x47246e['revision']),await this['showWorkflowConsoleUrl'](_0x52fdbf,_0x47246e['projectName'],_0x33d5f3[_0x2e95a6(0x31d)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x23d);[a42_0xc57567(0x371)]=a42_0xc57567(0x362);async[a42_0xc57567(0x2dc)](_0x21270f){const _0x566f77=a42_0xc57567,{options:_0x220fd5,args:_0x373230,tdx:_0x4246c9}=_0x21270f,_0x1296de=_0x373230[0x0],_0x580163=_0x373230[0x1];if(!_0x1296de)return console['error'](a42_0x28d120[_0x566f77(0x356)](_0x566f77(0x2c8)),'Project\x20name\x20is\x20required'),console['error'](a42_0x28d120[_0x566f77(0x307)](_0x566f77(0x37a))),0x1;const _0x4a93d9=_0x220fd5[_0x566f77(0x2ba)];_0x220fd5['verbose']&&(console[_0x566f77(0x343)](_0x566f77(0x29f)+_0x1296de),_0x580163&&console[_0x566f77(0x343)](_0x566f77(0x36c)+_0x580163),_0x4a93d9&&console[_0x566f77(0x343)](_0x566f77(0x381)+_0x4a93d9),_0x220fd5['dryRun']&&console['error'](_0x566f77(0x226)));const _0x180718=await withSpinner(_0x566f77(0x200)+_0x1296de+'...',()=>_0x4246c9[_0x566f77(0x2da)][_0x566f77(0x265)](_0x1296de,{'targetDir':_0x580163,'revision':_0x4a93d9}),{'verbose':_0x220fd5[_0x566f77(0x250)]}),_0x3e090c=_0x180718['data'];_0x3e090c[_0x566f77(0x36a)]?console[_0x566f77(0x343)](_0x566f77(0x399)+_0x3e090c[_0x566f77(0x2d3)]):console['error'](_0x566f77(0x251)+_0x3e090c['projectName']);console[_0x566f77(0x343)]('\x20\x20Revision:\x20'+_0x3e090c['revision']),console['error']('\x20\x20Target:\x20'+(a42_0x4c5f63['relative'](process[_0x566f77(0x216)](),_0x3e090c['targetDir'])||'.')),console[_0x566f77(0x343)](_0x566f77(0x319)+a42_0x28d120[_0x566f77(0x382)]('+'+_0x3e090c[_0x566f77(0x35f)][_0x566f77(0x39c)]+_0x566f77(0x2f2))+',\x20'+(a42_0x28d120['yellow']('~'+_0x3e090c[_0x566f77(0x35f)][_0x566f77(0x351)]+_0x566f77(0x38f))+',\x20')+(a42_0x28d120['red']('-'+_0x3e090c[_0x566f77(0x35f)][_0x566f77(0x278)]+_0x566f77(0x311))+',\x20')+(''+a42_0x28d120[_0x566f77(0x307)](_0x3e090c[_0x566f77(0x35f)][_0x566f77(0x2bf)]+_0x566f77(0x21f))));for(const _0x56875c of _0x3e090c[_0x566f77(0x29e)]){_0x56875c[_0x566f77(0x36d)]===_0x566f77(0x351)&&_0x56875c[_0x566f77(0x325)]&&(console[_0x566f77(0x343)]('\x0a'+a42_0x28d120['cyan'](_0x566f77(0x32e)+_0x56875c[_0x566f77(0x2f7)])),console['error'](_0x56875c[_0x566f77(0x325)]));}if(!_0x3e090c[_0x566f77(0x283)])return saveSessionContext({'workflow_project':_0x3e090c['projectName']},_0x220fd5[_0x566f77(0x317)]),console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x382)]('\x0a✔\x20Already\x20up\x20to\x20date')),console['error'](a42_0x28d120[_0x566f77(0x307)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x3e090c[_0x566f77(0x2d3)])),0x0;if(_0x220fd5['dryRun'])return console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x2a1)](_0x566f77(0x28f))),0x0;if(!_0x220fd5['yes']){if(!isInteractive())return console['error'](a42_0x28d120[_0x566f77(0x356)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x307)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4c10c2=await confirmKey(_0x566f77(0x1f9));if(!_0x4c10c2)return console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x2a1)](_0x566f77(0x2ae)),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x566f77(0x32c),()=>_0x4246c9[_0x566f77(0x2da)][_0x566f77(0x33a)](_0x3e090c,{'revision':_0x4a93d9}),{'verbose':_0x220fd5[_0x566f77(0x250)]}),saveSessionContext({'workflow_project':_0x3e090c[_0x566f77(0x2d3)]},_0x220fd5[_0x566f77(0x317)]),console[_0x566f77(0x343)](a42_0x28d120[_0x566f77(0x382)](_0x566f77(0x219)));const _0x3548b2=a42_0x4c5f63['relative'](process[_0x566f77(0x216)](),_0x3e090c['targetDir'])||'.';return console[_0x566f77(0x343)](a42_0x28d120['dim'](_0x566f77(0x2e2)+_0x3548b2)),console['error'](a42_0x28d120[_0x566f77(0x307)](_0x566f77(0x333)+_0x3e090c[_0x566f77(0x2d3)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x229);[a42_0xc57567(0x371)]=a42_0xc57567(0x2d7);async[a42_0xc57567(0x2dc)](_0x557227){const _0x52f75b=a42_0xc57567,{options:_0x41dda1,args:_0x17c134,tdx:_0xf71735}=_0x557227,_0x15d9d6=this[_0x52f75b(0x2de)](_0x17c134,_0x41dda1),_0x16c6ab=_0x41dda1[_0x52f75b(0x2ba)],_0x16be2d=_0x41dda1[_0x52f75b(0x395)];_0x41dda1['verbose']&&(_0x15d9d6&&console['error'](_0x52f75b(0x342)+_0x15d9d6),_0x16c6ab&&console[_0x52f75b(0x343)](_0x52f75b(0x381)+_0x16c6ab),_0x41dda1['dryRun']&&console[_0x52f75b(0x343)](_0x52f75b(0x226)),_0x16be2d&&console[_0x52f75b(0x343)](_0x52f75b(0x359)));let _0x377757;try{_0x377757=await withSpinner(_0x52f75b(0x20b),()=>_0xf71735[_0x52f75b(0x2da)][_0x52f75b(0x2e0)]({'sourceDir':_0x15d9d6,'revision':_0x16c6ab,'skipValidation':_0x16be2d}),{'verbose':_0x41dda1[_0x52f75b(0x250)]});}catch(_0xa6523b){if(_0xa6523b instanceof Error&&_0xa6523b[_0x52f75b(0x295)][_0x52f75b(0x26d)]('No\x20workflow\x20tdx.json\x20found'))return console['error'](a42_0x28d120[_0x52f75b(0x356)](_0x52f75b(0x2c8)),_0x52f75b(0x202)),_0x41dda1[_0x52f75b(0x220)]?console['error'](a42_0x28d120['dim'](_0x52f75b(0x315)+_0x41dda1['workflowProject']+_0x52f75b(0x368)+_0x41dda1[_0x52f75b(0x220)]+'\x27')):console[_0x52f75b(0x343)](a42_0x28d120[_0x52f75b(0x307)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0xa6523b;}const _0x1b6b33=_0x377757['data'];console['error'](_0x52f75b(0x38e)+_0x1b6b33[_0x52f75b(0x2d3)]),console['error']('\x20\x20Source:\x20'+_0x1b6b33[_0x52f75b(0x293)]),console[_0x52f75b(0x343)](_0x52f75b(0x37f)+_0x1b6b33['revision']),console[_0x52f75b(0x343)](_0x52f75b(0x319)+a42_0x28d120[_0x52f75b(0x382)]('+'+_0x1b6b33['summary'][_0x52f75b(0x39c)]+'\x20new')+',\x20'+(a42_0x28d120[_0x52f75b(0x2a1)]('~'+_0x1b6b33[_0x52f75b(0x35f)][_0x52f75b(0x351)]+_0x52f75b(0x38f))+',\x20')+(a42_0x28d120[_0x52f75b(0x356)]('-'+_0x1b6b33[_0x52f75b(0x35f)][_0x52f75b(0x278)]+'\x20deleted')+',\x20')+(''+a42_0x28d120[_0x52f75b(0x307)](_0x1b6b33[_0x52f75b(0x35f)][_0x52f75b(0x2bf)]+_0x52f75b(0x21f))));for(const _0x3d6e29 of _0x1b6b33[_0x52f75b(0x29e)]){_0x3d6e29[_0x52f75b(0x36d)]==='modified'&&_0x3d6e29[_0x52f75b(0x325)]&&(console[_0x52f75b(0x343)]('\x0a'+a42_0x28d120[_0x52f75b(0x260)](_0x52f75b(0x32e)+_0x3d6e29[_0x52f75b(0x2f7)])),console[_0x52f75b(0x343)](_0x3d6e29[_0x52f75b(0x325)]));}if(!_0x1b6b33[_0x52f75b(0x283)])return console[_0x52f75b(0x343)](a42_0x28d120[_0x52f75b(0x382)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x52f75b(0x2be)](_0xf71735,_0x1b6b33['projectName'],_0x41dda1[_0x52f75b(0x31d)]),0x0;if(_0x41dda1[_0x52f75b(0x30a)])return console[_0x52f75b(0x343)](a42_0x28d120['yellow'](_0x52f75b(0x2b3))),0x0;if(!_0x41dda1['yes']){if(!isInteractive())return console[_0x52f75b(0x343)](a42_0x28d120['red'](_0x52f75b(0x39d)),_0x52f75b(0x2e5)),console['error'](a42_0x28d120[_0x52f75b(0x307)](_0x52f75b(0x25d))),0x1;const _0x126e3c=await confirmKey(_0x52f75b(0x2e7));if(!_0x126e3c)return console[_0x52f75b(0x343)](a42_0x28d120['yellow']('Cancelled'),_0x52f75b(0x363)),0x1;}const _0x1e57a9=await withSpinner(_0x52f75b(0x249),()=>_0xf71735[_0x52f75b(0x2da)][_0x52f75b(0x2b1)](_0x1b6b33),{'verbose':_0x41dda1[_0x52f75b(0x250)]}),_0x36f75a=_0x1e57a9[_0x52f75b(0x201)];return console['error'](a42_0x28d120[_0x52f75b(0x382)](_0x52f75b(0x266))),console[_0x52f75b(0x343)](_0x52f75b(0x375)+_0x36f75a['projectId']),console[_0x52f75b(0x343)]('\x20\x20Revision:\x20'+_0x36f75a[_0x52f75b(0x2ba)]),await this[_0x52f75b(0x2be)](_0xf71735,_0x36f75a[_0x52f75b(0x2d3)],_0x41dda1[_0x52f75b(0x31d)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x2ad);[a42_0xc57567(0x371)]=a42_0xc57567(0x321);async[a42_0xc57567(0x2dc)](_0x5d0f9a){const _0x271c7c=a42_0xc57567,{options:_0x1a8b27,args:_0x19b312,tdx:_0x518d49}=_0x5d0f9a,_0x31b8af=this[_0x271c7c(0x2de)](_0x19b312,_0x1a8b27),_0x2e0dbd=_0x1a8b27['name'],_0x340bfa=_0x1a8b27['revision'],_0x1d2e89=_0x1a8b27[_0x271c7c(0x395)];if(!_0x31b8af)return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x356)](_0x271c7c(0x2c8)),'Source\x20directory\x20is\x20required'),console['error'](a42_0x28d120[_0x271c7c(0x307)](_0x271c7c(0x22a))),console['error'](a42_0x28d120[_0x271c7c(0x307)](_0x271c7c(0x274))),0x1;if(!_0x2e0dbd)return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x356)]('Error:'),_0x271c7c(0x2b7)),console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x307)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x1a8b27['verbose']&&(console['error'](_0x271c7c(0x342)+_0x31b8af),console[_0x271c7c(0x343)](_0x271c7c(0x318)+_0x2e0dbd),_0x340bfa&&console['error'](_0x271c7c(0x381)+_0x340bfa),_0x1a8b27[_0x271c7c(0x30a)]&&console[_0x271c7c(0x343)]('Dry\x20run:\x20yes'),_0x1d2e89&&console[_0x271c7c(0x343)](_0x271c7c(0x359)));const _0x3527fe=await withSpinner('Analyzing\x20project...',()=>_0x518d49[_0x271c7c(0x2da)][_0x271c7c(0x313)](_0x31b8af,_0x2e0dbd,{'revision':_0x340bfa,'skipValidation':_0x1d2e89}),{'verbose':_0x1a8b27[_0x271c7c(0x250)]}),_0x5688e7=_0x3527fe[_0x271c7c(0x201)];console[_0x271c7c(0x343)](_0x271c7c(0x329)+_0x5688e7[_0x271c7c(0x293)]);_0x5688e7['sourceProjectName']&&console[_0x271c7c(0x343)]('Source\x20project:\x20'+_0x5688e7[_0x271c7c(0x1fb)]);console['error'](_0x271c7c(0x318)+_0x5688e7[_0x271c7c(0x31b)]),console['error'](_0x271c7c(0x381)+_0x5688e7[_0x271c7c(0x2ba)]),console['error'](_0x271c7c(0x304)+_0x5688e7[_0x271c7c(0x24e)]);_0x5688e7[_0x271c7c(0x2d8)]&&(console['error'](a42_0x28d120['yellow'](_0x271c7c(0x374)+_0x5688e7[_0x271c7c(0x31b)]+_0x271c7c(0x20f)+_0x5688e7[_0x271c7c(0x328)]+')')),console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x2a1)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x1a8b27['dryRun'])return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x2a1)](_0x271c7c(0x236))),0x0;if(!_0x1a8b27[_0x271c7c(0x253)]){if(!isInteractive())return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x356)](_0x271c7c(0x39d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x307)](_0x271c7c(0x25d))),0x1;const _0x3e69e3=_0x5688e7[_0x271c7c(0x1fb)]||a42_0x4c5f63[_0x271c7c(0x21d)](_0x31b8af),_0x1c2011=_0x5688e7[_0x271c7c(0x2d8)]?_0x271c7c(0x2f9)+_0x2e0dbd+_0x271c7c(0x330):_0x271c7c(0x2cf)+_0x3e69e3+_0x271c7c(0x380)+_0x2e0dbd+'\x22?',_0x5ac55f=await confirmKey(_0x1c2011);if(!_0x5ac55f)return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x2a1)](_0x271c7c(0x2ae))),0x1;}const _0x1173f2=await withSpinner(_0x5688e7[_0x271c7c(0x2d8)]?_0x271c7c(0x235)+_0x2e0dbd+_0x271c7c(0x281):_0x271c7c(0x336)+_0x2e0dbd+'...',()=>_0x518d49[_0x271c7c(0x2da)][_0x271c7c(0x391)](_0x5688e7),{'verbose':_0x1a8b27[_0x271c7c(0x250)]}),_0x43cc71=_0x1173f2[_0x271c7c(0x201)];return console[_0x271c7c(0x343)](a42_0x28d120[_0x271c7c(0x382)](_0x5688e7['targetExists']?'✔\x20Project\x20updated':_0x271c7c(0x2eb))),console[_0x271c7c(0x343)](_0x271c7c(0x2c2)+_0x43cc71[_0x271c7c(0x31b)]),console[_0x271c7c(0x343)]('\x20\x20Project\x20ID:\x20'+_0x43cc71[_0x271c7c(0x206)]),console[_0x271c7c(0x343)](_0x271c7c(0x37f)+_0x43cc71[_0x271c7c(0x2ba)]),await this[_0x271c7c(0x2be)](_0x518d49,_0x43cc71[_0x271c7c(0x31b)],_0x1a8b27[_0x271c7c(0x31d)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0xc57567(0x331)]='workflow:delete';[a42_0xc57567(0x371)]=a42_0xc57567(0x282);async[a42_0xc57567(0x2dc)](_0x11c68f){const _0x2b112c=a42_0xc57567,{options:_0x2b9d04,args:_0x1833c6,tdx:_0x38c1fe}=_0x11c68f,_0x506b54=_0x1833c6[0x0];if(!_0x506b54)return console[_0x2b112c(0x343)](_0x2b112c(0x396)),console[_0x2b112c(0x343)](_0x2b112c(0x2c7)),0x1;_0x2b9d04['verbose']&&console[_0x2b112c(0x343)](_0x2b112c(0x29f)+_0x506b54);if(!_0x2b9d04[_0x2b112c(0x253)]){if(!isInteractive())return console['error'](a42_0x28d120[_0x2b112c(0x356)](_0x2b112c(0x39d)),_0x2b112c(0x2e5)),console[_0x2b112c(0x343)](a42_0x28d120[_0x2b112c(0x307)](_0x2b112c(0x25d))),0x1;const _0x54c57a=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x506b54+_0x2b112c(0x2f3));if(!_0x54c57a)return console[_0x2b112c(0x343)](a42_0x28d120['yellow']('Cancelled')),0x1;}const _0x47a07f=await withSpinner(_0x2b112c(0x346)+_0x506b54+'...',()=>_0x38c1fe[_0x2b112c(0x2da)][_0x2b112c(0x39b)](_0x506b54),{'verbose':_0x2b9d04[_0x2b112c(0x250)]}),_0x5ee97a=_0x47a07f[_0x2b112c(0x201)];return console[_0x2b112c(0x343)](_0x2b112c(0x312)+_0x5ee97a[_0x2b112c(0x2d3)]),console[_0x2b112c(0x343)](_0x2b112c(0x375)+_0x5ee97a[_0x2b112c(0x2ca)]),0x0;}}export function parseKeyValue(_0x377d82){const _0x37821e=a42_0xc57567,_0x1a5964=_0x377d82[_0x37821e(0x361)]('=');if(_0x1a5964===-0x1)throw new Error(_0x37821e(0x2fa)+_0x377d82+_0x37821e(0x25f));const _0x56f770=_0x377d82[_0x37821e(0x21b)](0x0,_0x1a5964),_0x4f8ec6=_0x377d82[_0x37821e(0x21b)](_0x1a5964+0x1);if(!_0x56f770)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x56f770,'value':_0x4f8ec6};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x30d);[a42_0xc57567(0x371)]=a42_0xc57567(0x262);async['execute'](_0x3e539a){const _0x3d296c=a42_0xc57567,{options:_0x35af96,args:_0x4270b7,tdx:_0x1a48da}=_0x3e539a,_0x504e14=this[_0x3d296c(0x2e6)](_0x4270b7,_0x35af96);if(!_0x504e14)return 0x1;_0x35af96[_0x3d296c(0x250)]&&console[_0x3d296c(0x343)](_0x3d296c(0x29f)+_0x504e14);const _0x3b38fe=await withSpinner(_0x3d296c(0x2a4),()=>_0x1a48da[_0x3d296c(0x2da)][_0x3d296c(0x2a5)](_0x504e14),{'verbose':_0x35af96[_0x3d296c(0x250)]}),{secrets:_0x7f6a75}=_0x3b38fe[_0x3d296c(0x201)];return console[_0x3d296c(0x343)](_0x3d296c(0x36f)+_0x7f6a75[_0x3d296c(0x22b)]+_0x3d296c(0x34f)+(_0x7f6a75['length']!==0x1?'s':'')),await handleSDKOutput(_0x7f6a75,_0x35af96),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a42_0xc57567(0x2aa);[a42_0xc57567(0x371)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async[a42_0xc57567(0x2dc)](_0x4a9fe8){const _0x5eec8d=a42_0xc57567,{options:_0x570e32,args:_0x408a4f,tdx:_0x4a9234}=_0x4a9fe8;let _0x42f162,_0x402d28;if(_0x408a4f['length']>=0x2)_0x42f162=_0x408a4f[0x0],_0x402d28=_0x408a4f[0x1];else{if(_0x408a4f['length']===0x1&&_0x570e32[_0x5eec8d(0x220)])_0x42f162=_0x570e32[_0x5eec8d(0x220)],_0x402d28=_0x408a4f[0x0];else return _0x408a4f[_0x5eec8d(0x22b)]===0x1?(console[_0x5eec8d(0x343)](_0x5eec8d(0x255)),console[_0x5eec8d(0x343)](_0x5eec8d(0x2e9)),0x1):(console[_0x5eec8d(0x343)](_0x5eec8d(0x222)),console[_0x5eec8d(0x343)](_0x5eec8d(0x227)),0x1);}let _0x2f1ff8,_0x32c267;try{({key:_0x2f1ff8,value:_0x32c267}=parseKeyValue(_0x402d28));}catch(_0x2cd053){return _0x2cd053 instanceof Error&&console[_0x5eec8d(0x343)](a42_0x28d120[_0x5eec8d(0x356)](_0x5eec8d(0x2c8)),_0x2cd053[_0x5eec8d(0x295)]),0x1;}_0x570e32[_0x5eec8d(0x250)]&&(console['error'](_0x5eec8d(0x29f)+_0x42f162),console[_0x5eec8d(0x343)](_0x5eec8d(0x267)+_0x2f1ff8));const _0x3fd258=await withSpinner(_0x5eec8d(0x31f),()=>_0x4a9234[_0x5eec8d(0x2da)]['setSecret'](_0x42f162,_0x2f1ff8,_0x32c267),{'verbose':_0x570e32['verbose']}),_0x11c0da=_0x3fd258[_0x5eec8d(0x201)];return console[_0x5eec8d(0x343)]('✔\x20Secret\x20\x27'+_0x11c0da['key']+_0x5eec8d(0x248)+_0x11c0da[_0x5eec8d(0x2d3)]+'\x27'),(_0x570e32[_0x5eec8d(0x1fc)]||_0x570e32[_0x5eec8d(0x39a)])&&await handleSingleObjectOutput(_0x11c0da,_0x570e32),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0xc57567(0x331)]=a42_0xc57567(0x299);['description']=a42_0xc57567(0x390);async[a42_0xc57567(0x2dc)](_0x40395c){const _0x306b5a=a42_0xc57567,{options:_0x1b130e,args:_0x475cd9,tdx:_0x47be3e}=_0x40395c;let _0x563da8,_0x5339f8;if(_0x475cd9['length']>=0x2)_0x563da8=_0x475cd9[0x0],_0x5339f8=_0x475cd9[0x1];else{if(_0x475cd9[_0x306b5a(0x22b)]===0x1&&_0x1b130e[_0x306b5a(0x220)])_0x563da8=_0x1b130e[_0x306b5a(0x220)],_0x5339f8=_0x475cd9[0x0];else return _0x475cd9[_0x306b5a(0x22b)]===0x1?(console[_0x306b5a(0x343)](_0x306b5a(0x255)),console[_0x306b5a(0x343)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x306b5a(0x343)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x306b5a(0x343)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x1b130e[_0x306b5a(0x250)]&&(console[_0x306b5a(0x343)]('Project:\x20'+_0x563da8),console['error'](_0x306b5a(0x267)+_0x5339f8));if(!_0x1b130e[_0x306b5a(0x253)]){if(!isInteractive())return console[_0x306b5a(0x343)](a42_0x28d120[_0x306b5a(0x356)](_0x306b5a(0x39d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x306b5a(0x343)](a42_0x28d120[_0x306b5a(0x307)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1690c4=await confirmKey(_0x306b5a(0x240)+_0x5339f8+'\x27\x20from\x20project\x20\x27'+_0x563da8+'\x27?');if(!_0x1690c4)return console[_0x306b5a(0x343)](a42_0x28d120[_0x306b5a(0x2a1)](_0x306b5a(0x2ae))),0x1;}const _0x2a9460=await withSpinner('Deleting\x20secret...',()=>_0x47be3e['workflow'][_0x306b5a(0x24a)](_0x563da8,_0x5339f8),{'verbose':_0x1b130e[_0x306b5a(0x250)]}),_0x427642=_0x2a9460[_0x306b5a(0x201)];return console['error']('✔\x20Secret\x20\x27'+_0x427642['key']+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x427642[_0x306b5a(0x2d3)]+'\x27'),(_0x1b130e[_0x306b5a(0x1fc)]||_0x1b130e[_0x306b5a(0x39a)])&&await handleSingleObjectOutput(_0x427642,_0x1b130e),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(_0x293cf2){const _0x19c598=a42_0xc57567,_0x7adb8f=Math[_0x19c598(0x347)](_0x293cf2/0x3e8),_0x36d3db=Math['floor'](_0x7adb8f/0x3c),_0x1860d7=Math[_0x19c598(0x347)](_0x36d3db/0x3c),_0x30d076=Math[_0x19c598(0x347)](_0x1860d7/0x18);if(_0x30d076>0x0){const _0x1dbb59=_0x1860d7%0x18;return _0x1dbb59>0x0?_0x30d076+'d\x20'+_0x1dbb59+'h':_0x30d076+'d';}else{if(_0x1860d7>0x0){const _0x3f162a=_0x36d3db%0x3c;return _0x3f162a>0x0?_0x1860d7+'h\x20'+_0x3f162a+'m':_0x1860d7+'h';}else{if(_0x36d3db>0x0){const _0x427c4a=_0x7adb8f%0x3c;return _0x427c4a>0x0?_0x36d3db+'m\x20'+_0x427c4a+'s':_0x36d3db+'m';}else return _0x7adb8f+'s';}}}function a42_0x15e8(_0x32b26b,_0x38622b){_0x32b26b=_0x32b26b-0x1f4;const _0x4a1f13=a42_0x4a1f();let _0x15e8b6=_0x4a1f13[_0x32b26b];return _0x15e8b6;}function formatTimestamp(_0x17ee6b,_0x569a25){const _0x329e13=a42_0xc57567,_0x5c2e48=new Date(_0x17ee6b),_0x11f13b=String(_0x5c2e48[_0x329e13(0x33b)]())[_0x329e13(0x230)](0x2,'0'),_0x1f108b=String(_0x5c2e48[_0x329e13(0x337)]())[_0x329e13(0x230)](0x2,'0'),_0x49aa17=_0x11f13b+':'+_0x1f108b,_0x45178a=_0x5c2e48[_0x329e13(0x2d6)]()===_0x569a25[_0x329e13(0x2d6)]()&&_0x5c2e48['getMonth']()===_0x569a25[_0x329e13(0x29c)]()&&_0x5c2e48['getDate']()===_0x569a25['getDate']();if(_0x45178a)return _0x49aa17;else{const _0x2d3984=String(_0x5c2e48[_0x329e13(0x29c)]()+0x1)[_0x329e13(0x230)](0x2,'0'),_0x5c15f4=String(_0x5c2e48[_0x329e13(0x277)]())[_0x329e13(0x230)](0x2,'0');return _0x2d3984+'-'+_0x5c15f4+'\x20'+_0x49aa17;}}function formatDate(_0x3ffce4){const _0x12272e=a42_0xc57567,_0x3e7f73=_0x3ffce4['getFullYear'](),_0xb418cc=String(_0x3ffce4[_0x12272e(0x29c)]()+0x1)[_0x12272e(0x230)](0x2,'0'),_0x51876a=String(_0x3ffce4['getDate']())[_0x12272e(0x230)](0x2,'0');return _0x3e7f73+'-'+_0xb418cc+'-'+_0x51876a;}function getTaskStateIcon(_0x4c7064){const _0x5e9046={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x5e9046[_0x4c7064]||'⚪';}function getBarChar(_0x43bdeb){const _0x1af28a=a42_0xc57567;return _0x43bdeb===_0x1af28a(0x343)||_0x43bdeb===_0x1af28a(0x302)?'×':'─';}function getBarColor(_0x53ced5){const _0x322bf7=a42_0xc57567,_0xa1fd30={'success':a42_0x28d120[_0x322bf7(0x382)],'error':a42_0x28d120[_0x322bf7(0x356)],'group_error':a42_0x28d120[_0x322bf7(0x356)],'running':a42_0x28d120[_0x322bf7(0x1fd)],'blocked':a42_0x28d120['yellow'],'planned':a42_0x28d120[_0x322bf7(0x307)],'canceling':a42_0x28d120[_0x322bf7(0x2a1)]};return _0xa1fd30[_0x53ced5]||a42_0x28d120[_0x322bf7(0x341)];}function parseTaskName(_0x4aff2e){const _0x37ae8e=a42_0xc57567;let _0x406dfa=_0x4aff2e[_0x37ae8e(0x2fe)](/^\++/,'');const _0x5532b4=_0x406dfa[_0x37ae8e(0x294)]('+'),_0x4b5790=_0x5532b4[_0x37ae8e(0x22b)]>0x1?_0x5532b4['length']-0x2:0x0,_0x10d53b=_0x5532b4[_0x5532b4[_0x37ae8e(0x22b)]-0x1]||_0x406dfa;return{'level':_0x4b5790,'name':'+'+_0x10d53b};}function truncateTaskName(_0xbda6bb,_0x22cf0a){const _0x795a5e=a42_0xc57567,_0x48a0d4=stringWidth(_0xbda6bb);if(_0x48a0d4<=_0x22cf0a)return _0xbda6bb;let _0x1c5e81=_0xbda6bb;while(stringWidth(_0x1c5e81+'…')>_0x22cf0a&&_0x1c5e81[_0x795a5e(0x22b)]>0x0){_0x1c5e81=_0x1c5e81[_0x795a5e(0x273)](0x0,-0x1);}return _0x1c5e81+'…';}function calculateTimeScale(_0x2600fe,_0x378896){const _0x212a0c=a42_0xc57567;return{'startTime':_0x2600fe[_0x212a0c(0x37e)],'endTime':_0x2600fe['end'],'durationMs':_0x2600fe['duration'],'msPerChar':_0x2600fe[_0x212a0c(0x2f8)]/_0x378896};}function timeToPosition(_0x577238,_0x2ae3b9,_0x4a83b7){const _0x496ded=a42_0xc57567,_0x14d22d=_0x577238-_0x2ae3b9[_0x496ded(0x205)],_0x17d278=Math['floor'](_0x14d22d/_0x2ae3b9[_0x496ded(0x1fa)]);return Math[_0x496ded(0x30f)](0x0,Math['min'](_0x17d278,_0x4a83b7));}function renderTimeAxis(_0x423a88,_0x4a84ec){const _0x1fd693=a42_0xc57567,_0x3e6f41=Math[_0x1fd693(0x232)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x1fd693(0x30f)](TIMELINE_CONFIG[_0x1fd693(0x37b)],Math[_0x1fd693(0x347)](_0x4a84ec/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x2563cf=_0x423a88['durationMs']/(_0x3e6f41-0x1),_0x2a5bfb=new Date(_0x423a88[_0x1fd693(0x205)]),_0x46fa26=[];for(let _0x42a5a0=0x0;_0x42a5a0<_0x3e6f41;_0x42a5a0++){const _0x1745c9=_0x423a88[_0x1fd693(0x205)]+_0x42a5a0*_0x2563cf,_0x3fcd92=timeToPosition(_0x1745c9,_0x423a88,_0x4a84ec),_0x47777c=formatTimestamp(_0x1745c9,_0x2a5bfb);_0x46fa26[_0x1fd693(0x2c5)]({'pos':_0x3fcd92,'text':_0x47777c});}const _0x253554=new Array(_0x4a84ec)[_0x1fd693(0x261)]('\x20');let _0x5ca6ca=-0x1;for(const {pos:_0x2078f4,text:_0x553c9d}of _0x46fa26){let _0x32ee7e=Math['max'](0x0,_0x2078f4-Math['floor'](_0x553c9d[_0x1fd693(0x22b)]/0x2));_0x32ee7e<=_0x5ca6ca+TIMELINE_CONFIG[_0x1fd693(0x2af)]&&(_0x32ee7e=_0x5ca6ca+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x32ee7e+_0x553c9d[_0x1fd693(0x22b)]>_0x4a84ec&&(_0x32ee7e=_0x4a84ec-_0x553c9d[_0x1fd693(0x22b)]);if(_0x32ee7e>=0x0&&_0x32ee7e+_0x553c9d[_0x1fd693(0x22b)]<=_0x4a84ec&&_0x32ee7e>_0x5ca6ca){for(let _0xa2b5d4=0x0;_0xa2b5d4<_0x553c9d['length'];_0xa2b5d4++){_0x253554[_0x32ee7e+_0xa2b5d4]=_0x553c9d[_0xa2b5d4];}_0x5ca6ca=_0x32ee7e+_0x553c9d['length']-0x1;}}return _0x253554[_0x1fd693(0x238)]('');}function renderTaskRow(_0x201b52,_0x5277eb,_0x5385e2,_0x496ffa){const _0x2f6592=a42_0xc57567,{level:_0x34d3c4,name:_0x41336a}=parseTaskName(_0x201b52[_0x2f6592(0x331)]),_0x5da872='\x20'['repeat'](_0x34d3c4),_0x11236d=_0x201b52[_0x2f6592(0x215)]?'('+formatElapsed(_0x201b52[_0x2f6592(0x215)][_0x2f6592(0x2f8)])+')':'',_0x3e2bae=stringWidth(_0x11236d),_0x4a9ba1=_0x34d3c4*0x1,_0x400b6d=_0x496ffa-_0x4a9ba1-_0x3e2bae-0x1,_0x3b9fb1=truncateTaskName(_0x41336a,_0x400b6d),_0x3ce738=_0x5da872+_0x3b9fb1,_0x5582e1=stringWidth(_0x3ce738),_0x2bb3bf=_0x496ffa-_0x5582e1-_0x3e2bae,_0x37edfe=_0x3ce738+'\x20'[_0x2f6592(0x335)](Math[_0x2f6592(0x30f)](0x1,_0x2bb3bf))+a42_0x28d120[_0x2f6592(0x307)](_0x11236d),_0x510856=getTaskStateIcon(_0x201b52['state']),_0x58e869=new Array(_0x5385e2)['fill']('\x20');if(_0x201b52['window']){const _0xb92581=timeToPosition(_0x201b52[_0x2f6592(0x215)]['start'],_0x5277eb,_0x5385e2),_0x3dd670=timeToPosition(_0x201b52[_0x2f6592(0x215)][_0x2f6592(0x34b)],_0x5277eb,_0x5385e2),_0x27b16f=getBarChar(_0x201b52[_0x2f6592(0x21c)]),_0x1c3cb5=Math[_0x2f6592(0x30f)](_0xb92581+0x1,_0x3dd670);for(let _0x1c0e0a=_0xb92581;_0x1c0e0a<Math[_0x2f6592(0x232)](_0x1c3cb5,_0x5385e2);_0x1c0e0a++){_0x58e869[_0x1c0e0a]=_0x27b16f;}}const _0x305132=getBarColor(_0x201b52[_0x2f6592(0x21c)]),_0x215f13=_0x58e869[_0x2f6592(0x27a)](_0x1e244a=>_0x1e244a==='\x20'?'\x20':_0x305132(_0x1e244a))[_0x2f6592(0x238)]('');return _0x510856+'\x20'+_0x37edfe+'│'+_0x215f13+'│';}function calculateStats(_0x34b0f2){const _0x54ecf3=a42_0xc57567,_0x62fe07={'total':_0x34b0f2[_0x54ecf3(0x22b)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0xdc6723 of _0x34b0f2){if(_0xdc6723[_0x54ecf3(0x21c)]===_0x54ecf3(0x32b))_0x62fe07[_0x54ecf3(0x32b)]++;else{if(_0xdc6723[_0x54ecf3(0x21c)]===_0x54ecf3(0x343)||_0xdc6723[_0x54ecf3(0x21c)]==='group_error')_0x62fe07[_0x54ecf3(0x343)]++;else _0xdc6723[_0x54ecf3(0x21c)]===_0x54ecf3(0x272)?_0x62fe07[_0x54ecf3(0x272)]++:_0x62fe07[_0x54ecf3(0x29a)]++;}}return _0x62fe07;}function formatStats(_0x330136){const _0x263d6d=a42_0xc57567;return[_0x263d6d(0x344)+_0x330136['total'],'✅\x20'+_0x330136[_0x263d6d(0x32b)],'❌\x20'+_0x330136[_0x263d6d(0x343)],_0x263d6d(0x245)+_0x330136['running'],'⏳\x20'+_0x330136['pending']]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']='workflow:timeline';[a42_0xc57567(0x371)]=a42_0xc57567(0x214);async[a42_0xc57567(0x2dc)](_0x3e88d7){const _0x509f8d=a42_0xc57567,{options:_0x141796,args:_0x8f2c0e,tdx:_0x21e2f4}=_0x3e88d7;let _0x554ddf,_0x13767c,_0x4acf7c=![];if(_0x8f2c0e[0x0]){if(_0x8f2c0e[0x0]['includes']('.')){const _0x56162a=this[_0x509f8d(0x323)](_0x8f2c0e,_0x141796);if(!_0x56162a)return 0x1;_0x554ddf=_0x56162a['projectName'],_0x13767c=_0x56162a[_0x509f8d(0x31e)];}else{_0x13767c=_0x8f2c0e[0x0],_0x554ddf=_0x141796[_0x509f8d(0x220)];if(!_0x554ddf)return console['error'](a42_0x28d120[_0x509f8d(0x356)](_0x509f8d(0x2c8)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x4acf7c=!![];}}else{const _0x2c8be5=this[_0x509f8d(0x323)](_0x8f2c0e,_0x141796);if(!_0x2c8be5)return 0x1;_0x554ddf=_0x2c8be5[_0x509f8d(0x2d3)],_0x13767c=_0x2c8be5[_0x509f8d(0x31e)];}if(_0x141796[_0x509f8d(0x250)]){if(_0x554ddf&&_0x13767c)console['error'](_0x509f8d(0x2ef)+_0x554ddf+'.'+_0x13767c);else _0x554ddf&&console['error']('Filter:\x20project='+_0x554ddf);}const _0x528864=_0x141796[_0x509f8d(0x270)],_0x2c1180=_0x141796[_0x509f8d(0x1f6)];if(_0x528864){_0x2c1180&&console['error'](a42_0x28d120[_0x509f8d(0x2a1)]('Warning:'),_0x509f8d(0x2e1));const _0x4501ca=_0x141796[_0x509f8d(0x242)];return _0x4501ca?await this['pollTimeline'](_0x3e88d7,_0x528864):await this[_0x509f8d(0x2b5)](_0x3e88d7,_0x528864,_0x141796),0x0;}if(_0x2c1180){const _0xedc3ca=await withSpinner('Loading\x20session...',()=>_0x21e2f4[_0x509f8d(0x2da)]['sessions']({'projectName':_0x554ddf,'workflowName':_0x13767c,'limit':0x64}),{'verbose':_0x141796[_0x509f8d(0x250)]}),_0x397413=_0xedc3ca[_0x509f8d(0x201)]['find'](_0x518a33=>_0x518a33['id']===_0x2c1180);if(!_0x397413)return console['error'](a42_0x28d120['red'](_0x509f8d(0x2c8)),_0x509f8d(0x327)+_0x2c1180),0x1;if(!_0x397413['lastAttempt']?.['id'])return console['error'](a42_0x28d120[_0x509f8d(0x356)](_0x509f8d(0x2c8)),_0x509f8d(0x27f)+_0x2c1180+'\x20has\x20no\x20attempts'),0x1;const _0x4617a5=_0x397413['lastAttempt']['id'];_0x141796[_0x509f8d(0x250)]&&console[_0x509f8d(0x343)](_0x509f8d(0x256)+_0x4617a5+_0x509f8d(0x1f8)+_0x2c1180);const _0x303242=_0x141796[_0x509f8d(0x242)];return _0x303242?await this['pollTimeline'](_0x3e88d7,_0x4617a5):await this[_0x509f8d(0x2b5)](_0x3e88d7,_0x4617a5,_0x141796),0x0;}const _0x3a1777=await withSpinner(_0x509f8d(0x259),()=>_0x21e2f4[_0x509f8d(0x2da)][_0x509f8d(0x2d4)]({'projectName':_0x554ddf,'workflowName':_0x13767c,'limit':_0x141796[_0x509f8d(0x22d)]||0x32}),{'verbose':_0x141796[_0x509f8d(0x250)]}),_0x51456d=_0x3a1777[_0x509f8d(0x201)];if(_0x51456d[_0x509f8d(0x22b)]===0x0){if(_0x554ddf&&_0x13767c)console['error'](_0x509f8d(0x269)+_0x554ddf+'.'+_0x13767c);else _0x554ddf?console[_0x509f8d(0x343)](_0x509f8d(0x32a)+_0x554ddf):(console[_0x509f8d(0x343)](_0x509f8d(0x2f5)),console[_0x509f8d(0x343)](a42_0x28d120['dim'](_0x509f8d(0x38d))));return 0x0;}_0x51456d['sort']((_0x4b3906,_0x592228)=>{const _0x4ab3ba=_0x509f8d,_0x1b934e=_0x4b3906['sessionTime']||'',_0x10c28c=_0x592228[_0x4ab3ba(0x24f)]||'';return _0x10c28c[_0x4ab3ba(0x2f1)](_0x1b934e);});if(_0x141796['json']||_0x141796[_0x509f8d(0x39a)])return await handleSDKOutput(_0x51456d,_0x141796),0x0;let _0x3d1e49;if(_0x4acf7c){const _0x10ff7d=_0x51456d[0x0];if(!_0x10ff7d[_0x509f8d(0x2a9)]?.['id'])return console[_0x509f8d(0x343)](_0x509f8d(0x378)),0x0;_0x3d1e49=_0x10ff7d[_0x509f8d(0x2a9)]['id'],_0x141796[_0x509f8d(0x250)]&&console[_0x509f8d(0x343)](_0x509f8d(0x25c)+_0x10ff7d[_0x509f8d(0x24f)]);}else{const _0x449043=_0x51456d[_0x509f8d(0x27a)](_0xf32003=>{const _0x414d71=_0x509f8d,_0xb893af=getAttemptStatusDisplay(_0xf32003[_0x414d71(0x2a9)]);return{'title':_0xf32003[_0x414d71(0x296)]?.[_0x414d71(0x331)]+'.'+_0xf32003[_0x414d71(0x2da)]?.[_0x414d71(0x331)]+_0x414d71(0x379)+_0xf32003[_0x414d71(0x24f)]+'\x20'+_0xb893af[_0x414d71(0x24c)],'value':_0xf32003[_0x414d71(0x2a9)]?.['id']||'','description':_0xb893af[_0x414d71(0x1f5)]};}),_0x345a7b=await a42_0x4fae({'type':_0x509f8d(0x2ff),'name':_0x509f8d(0x270),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x449043[_0x509f8d(0x36b)](_0x4a446e=>_0x4a446e['value']!=='')});if(!_0x345a7b['attemptId'])return 0x0;_0x3d1e49=_0x345a7b[_0x509f8d(0x270)];}const _0x8e5725=_0x141796[_0x509f8d(0x242)];return _0x8e5725?await this[_0x509f8d(0x2cd)](_0x3e88d7,_0x3d1e49):await this['renderSingleTimeline'](_0x3e88d7,_0x3d1e49,_0x141796),0x0;}async[a42_0xc57567(0x2b5)](_0x3660e9,_0x49d0c,_0xcb2d63){const _0x31ab6a=a42_0xc57567,{tdx:_0x401bf7}=_0x3660e9;let _0x112719,_0x473061;try{[_0x112719,_0x473061]=await Promise[_0x31ab6a(0x308)]([_0x401bf7[_0x31ab6a(0x2da)]['attempt'](_0x49d0c),_0x401bf7[_0x31ab6a(0x2da)][_0x31ab6a(0x332)](_0x49d0c,![])]);}catch(_0x5ddd77){console['error'](a42_0x28d120[_0x31ab6a(0x356)](_0x31ab6a(0x2a2)));_0xcb2d63[_0x31ab6a(0x250)]&&console[_0x31ab6a(0x343)](_0x5ddd77);throw _0x5ddd77;}if(_0xcb2d63[_0x31ab6a(0x1fc)]||_0xcb2d63[_0x31ab6a(0x39a)]){const _0xd45372=this['buildTimelineData'](_0x112719,_0x473061);await handleSDKOutput([_0xd45372],_0xcb2d63);return;}const _0x564efd=_0x401bf7[_0x31ab6a(0x2cc)][_0x31ab6a(0x31d)],_0x135820=this['renderTimeline'](_0x112719,_0x473061,_0x564efd);console['log'](_0x135820);}async['pollTimeline'](_0x3283c0,_0x174071){const _0x3b1f65=a42_0xc57567,{tdx:_0x244cf4}=_0x3283c0,_0x4e68ad=TIMELINE_CONFIG[_0x3b1f65(0x2f4)],_0x4a4c86=TIMELINE_CONFIG[_0x3b1f65(0x223)];let _0x174704=0x0;while(_0x174704<_0x4a4c86){process['stdout'][_0x3b1f65(0x24d)]&&process[_0x3b1f65(0x297)][_0x3b1f65(0x268)]('\x1bc');let _0x1ee991,_0x36cf6e;try{[_0x1ee991,_0x36cf6e]=await Promise[_0x3b1f65(0x308)]([_0x244cf4[_0x3b1f65(0x2da)][_0x3b1f65(0x320)](_0x174071),_0x244cf4['workflow'][_0x3b1f65(0x332)](_0x174071,![])]);}catch(_0x3b1bb0){console['error'](a42_0x28d120[_0x3b1f65(0x356)](_0x3b1f65(0x30b)));_0x174704>0x0&&console[_0x3b1f65(0x343)](a42_0x28d120['dim'](_0x3b1f65(0x35e)+_0x174704));throw _0x3b1bb0;}const _0x38e3bd=_0x244cf4[_0x3b1f65(0x2cc)]['site'],_0x4cfd73=this[_0x3b1f65(0x263)](_0x1ee991,_0x36cf6e,_0x38e3bd);console[_0x3b1f65(0x385)](_0x4cfd73);const _0x1bfa96=_0x1ee991[_0x3b1f65(0x21e)]&&_0x36cf6e['every'](_0xa9b058=>_0xa9b058[_0x3b1f65(0x21c)]!==_0x3b1f65(0x272)&&_0xa9b058[_0x3b1f65(0x21c)]!==_0x3b1f65(0x26f));if(_0x1bfa96){console[_0x3b1f65(0x343)](a42_0x28d120[_0x3b1f65(0x382)](_0x3b1f65(0x33f)));break;}console[_0x3b1f65(0x343)](a42_0x28d120['dim'](_0x3b1f65(0x2b6)+_0x174704*0x2+_0x3b1f65(0x26a))),await new Promise(_0x401853=>setTimeout(_0x401853,_0x4e68ad)),_0x174704++;}_0x174704>=_0x4a4c86&&console['error'](a42_0x28d120[_0x3b1f65(0x2a1)](_0x3b1f65(0x367)));}['renderTimeline'](_0x5e3b8f,_0x413423,_0x89d09f){const _0x2f4df7=a42_0xc57567,_0x118eae=[],_0x3b01aa=TIMELINE_CONFIG[_0x2f4df7(0x2d0)],_0x7333b6=0x5,_0xe394f0=process[_0x2f4df7(0x297)][_0x2f4df7(0x350)]||0x78,_0x486a08=_0xe394f0-_0x3b01aa-_0x7333b6,_0x66b25d=Math[_0x2f4df7(0x30f)](TIMELINE_CONFIG[_0x2f4df7(0x365)],Math[_0x2f4df7(0x232)](_0x486a08,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x162c1e=new Date(_0x5e3b8f[_0x2f4df7(0x2ac)])[_0x2f4df7(0x2e8)](),_0x16e11e=_0x5e3b8f[_0x2f4df7(0x23f)]?new Date(_0x5e3b8f[_0x2f4df7(0x23f)])['getTime']():Date[_0x2f4df7(0x2c1)](),_0x410ed9={'start':_0x162c1e,'end':_0x16e11e,'duration':_0x16e11e-_0x162c1e},_0x4e67cc=new Map(),_0x1f06f3=[];for(const _0x485045 of _0x413423){if(_0x485045[_0x2f4df7(0x28e)]){const _0x3a2869=new Date(_0x485045[_0x2f4df7(0x28e)])['getTime'](),_0xc1eedd=_0x485045['updatedAt']?new Date(_0x485045[_0x2f4df7(0x34c)])[_0x2f4df7(0x2e8)]():Date[_0x2f4df7(0x2c1)](),_0x190fcc={'start':_0x3a2869,'end':_0xc1eedd,'duration':_0xc1eedd-_0x3a2869};_0x4e67cc[_0x2f4df7(0x25a)](_0x485045['id'],_0x190fcc),_0x1f06f3[_0x2f4df7(0x2c5)]({'name':_0x485045[_0x2f4df7(0x369)],'state':_0x485045[_0x2f4df7(0x21c)]||'unknown','window':_0x190fcc});}else _0x1f06f3['push']({'name':_0x485045[_0x2f4df7(0x369)],'state':_0x485045[_0x2f4df7(0x21c)]||_0x2f4df7(0x26f),'window':undefined});}_0x1f06f3[_0x2f4df7(0x208)]((_0x46241a,_0x5972f6)=>{const _0x565dd7=_0x2f4df7;if(!_0x46241a[_0x565dd7(0x215)])return 0x1;if(!_0x5972f6['window'])return-0x1;return _0x46241a[_0x565dd7(0x215)][_0x565dd7(0x37e)]-_0x5972f6['window'][_0x565dd7(0x37e)];});const _0x13bc23=_0x1f06f3[_0x2f4df7(0x22b)],_0x2b7fb5=_0x13bc23>TIMELINE_CONFIG[_0x2f4df7(0x210)];_0x2b7fb5&&_0x1f06f3[_0x2f4df7(0x340)](TIMELINE_CONFIG[_0x2f4df7(0x210)]);const _0x55da35=calculateTimeScale(_0x410ed9,_0x66b25d),_0x3c8994=_0x5e3b8f[_0x2f4df7(0x21e)]?_0x5e3b8f[_0x2f4df7(0x32b)]?a42_0x28d120[_0x2f4df7(0x382)](_0x2f4df7(0x32b)):a42_0x28d120['red'](_0x2f4df7(0x343)):a42_0x28d120['blue'](_0x2f4df7(0x272)),_0x36c250=_0x5e3b8f['project']?.['id'],_0x2c338a=_0x5e3b8f[_0x2f4df7(0x1f6)];let _0x3e46b3;if(_0x36c250&&_0x2c338a){const _0x2e408e=getWorkflowAttemptUrl(_0x89d09f,_0x36c250,_0x2c338a,_0x5e3b8f['id']);_0x3e46b3=hyperlink(a42_0x28d120[_0x2f4df7(0x307)](_0x5e3b8f['id']),_0x2e408e);}else _0x3e46b3=a42_0x28d120[_0x2f4df7(0x307)](_0x5e3b8f['id']);_0x118eae[_0x2f4df7(0x2c5)](_0x2f4df7(0x204)+_0x3e46b3+'\x20-\x20'+_0x3c8994+_0x2f4df7(0x379)+formatElapsed(_0x410ed9[_0x2f4df7(0x2f8)]));if(_0x1f06f3['length']>0x0){const _0x2be27f=renderTimeAxis(_0x55da35,_0x66b25d),_0x4eb712=new Date(_0x410ed9[_0x2f4df7(0x37e)]),_0x21f8c2=formatDate(_0x4eb712),_0x2f0bdd=TIMELINE_CONFIG[_0x2f4df7(0x360)]+TIMELINE_CONFIG[_0x2f4df7(0x27e)]+_0x3b01aa,_0x1da3dc=_0x21f8c2['padStart'](_0x2f0bdd),_0x2a79f6=a42_0x28d120[_0x2f4df7(0x307)](_0x1da3dc);_0x118eae[_0x2f4df7(0x2c5)](_0x2a79f6+'\x20'+_0x2be27f);for(const _0x4bdc58 of _0x1f06f3){_0x118eae['push'](renderTaskRow(_0x4bdc58,_0x55da35,_0x66b25d,_0x3b01aa));}const _0x49c635=calculateStats(_0x1f06f3);_0x118eae[_0x2f4df7(0x2c5)](formatStats(_0x49c635)),_0x2b7fb5&&_0x118eae['push'](a42_0x28d120[_0x2f4df7(0x2a1)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x2f4df7(0x210)]+'\x20of\x20'+_0x13bc23+'\x20tasks')),_0x118eae[_0x2f4df7(0x2c5)](''),_0x118eae[_0x2f4df7(0x2c5)](a42_0x28d120[_0x2f4df7(0x307)](_0x2f4df7(0x20a))+('tdx\x20wf\x20attempt\x20'+_0x5e3b8f['id']+_0x2f4df7(0x31c))+a42_0x28d120['dim'](_0x2f4df7(0x326)));}else _0x118eae[_0x2f4df7(0x2c5)](_0x2f4df7(0x264));return _0x118eae[_0x2f4df7(0x238)]('\x0a');}[a42_0xc57567(0x203)](_0x55ef5b,_0x2e4833){const _0x52b31d=a42_0xc57567,_0x5e5654=new Date(_0x55ef5b[_0x52b31d(0x2ac)])[_0x52b31d(0x2e8)](),_0x1fcc3d=_0x55ef5b[_0x52b31d(0x23f)]?new Date(_0x55ef5b[_0x52b31d(0x23f)])[_0x52b31d(0x2e8)]():Date[_0x52b31d(0x2c1)](),_0x641b80=_0x1fcc3d-_0x5e5654,_0x449c8d=[];for(const _0x1e97e2 of _0x2e4833){if(_0x1e97e2[_0x52b31d(0x28e)]){const _0x3f1e73=new Date(_0x1e97e2['startedAt'])[_0x52b31d(0x2e8)](),_0xcddebc=_0x1e97e2[_0x52b31d(0x34c)]?new Date(_0x1e97e2[_0x52b31d(0x34c)])[_0x52b31d(0x2e8)]():Date[_0x52b31d(0x2c1)]();_0x449c8d[_0x52b31d(0x2c5)]({'name':_0x1e97e2[_0x52b31d(0x369)],'state':_0x1e97e2['state']||_0x52b31d(0x231),'window':{'start':_0x3f1e73,'end':_0xcddebc,'duration':_0xcddebc-_0x3f1e73}});}else _0x449c8d[_0x52b31d(0x2c5)]({'name':_0x1e97e2[_0x52b31d(0x369)],'state':_0x1e97e2[_0x52b31d(0x21c)]||_0x52b31d(0x26f),'window':undefined});}const _0x4d2437=calculateStats(_0x449c8d);return{'attempt':{'id':_0x55ef5b['id'],'status':_0x55ef5b['done']?_0x55ef5b[_0x52b31d(0x32b)]?_0x52b31d(0x32b):_0x52b31d(0x343):_0x52b31d(0x272),'createdAt':_0x55ef5b[_0x52b31d(0x2ac)],'finishedAt':_0x55ef5b[_0x52b31d(0x23f)],'duration_ms':_0x641b80},'tasks':_0x449c8d[_0x52b31d(0x27a)](_0x1fa5ab=>({'name':_0x1fa5ab[_0x52b31d(0x331)],'state':_0x1fa5ab[_0x52b31d(0x21c)],'startedAt':_0x1fa5ab[_0x52b31d(0x215)]?new Date(_0x1fa5ab[_0x52b31d(0x215)]['start'])[_0x52b31d(0x28c)]():null,'updatedAt':_0x1fa5ab[_0x52b31d(0x215)]?new Date(_0x1fa5ab[_0x52b31d(0x215)][_0x52b31d(0x34b)])[_0x52b31d(0x28c)]():null,'duration_ms':_0x1fa5ab[_0x52b31d(0x215)]?.[_0x52b31d(0x2f8)]||null})),'stats':_0x4d2437};}}
|
|
1
|
+
const a42_0x34064d=a42_0xd5e8;(function(_0x99f408,_0x14178b){const _0x3f03da=a42_0xd5e8,_0x5b6567=_0x99f408();while(!![]){try{const _0x4bba5f=-parseInt(_0x3f03da(0x2b9))/0x1+parseInt(_0x3f03da(0x2e2))/0x2+parseInt(_0x3f03da(0x19c))/0x3*(parseInt(_0x3f03da(0x1d9))/0x4)+-parseInt(_0x3f03da(0x2f7))/0x5+parseInt(_0x3f03da(0x2f9))/0x6+-parseInt(_0x3f03da(0x194))/0x7+parseInt(_0x3f03da(0x247))/0x8*(-parseInt(_0x3f03da(0x2ca))/0x9);if(_0x4bba5f===_0x14178b)break;else _0x5b6567['push'](_0x5b6567['shift']());}catch(_0x104fa1){_0x5b6567['push'](_0x5b6567['shift']());}}}(a42_0xab04,0x3e4f1));import a42_0x35b1c5 from'chalk';import{existsSync}from'fs';import a42_0x1ccec2 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';function a42_0xd5e8(_0x2f94ac,_0xf36e08){_0x2f94ac=_0x2f94ac-0x17a;const _0xab040=a42_0xab04();let _0xd5e8ae=_0xab040[_0x2f94ac];return _0xd5e8ae;}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 a42_0x40adc0 from'prompts';function getAttemptStatusDisplay(_0x5b5032){const _0x59959b=a42_0xd5e8;if(!_0x5b5032)return{'icon':'⏳','text':''};const {done:_0x4c2f84,success:_0x4a4ffc,cancelRequested:_0xeb0c8d}=_0x5b5032;if(!_0x4c2f84)return _0xeb0c8d?{'icon':'🛑','text':a42_0x35b1c5[_0x59959b(0x2eb)]('canceling')}:{'icon':'🔄','text':a42_0x35b1c5['blue'](_0x59959b(0x294))};if(_0x4a4ffc)return{'icon':'✅','text':a42_0x35b1c5[_0x59959b(0x250)]('success')};return{'icon':'❌','text':a42_0x35b1c5[_0x59959b(0x304)](_0x59959b(0x1ed))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x34064d(0x18c)](_0x2f6178,_0x3baf7a,_0x5c4a95=0x0){const _0x23ccb5=a42_0x34064d;return _0x2f6178[_0x5c4a95]||_0x3baf7a[_0x23ccb5(0x303)];}[a42_0x34064d(0x316)](_0x51c0ae,_0x5b1f37,_0x43359f=0x0){const _0x3fca9d=a42_0x34064d,_0x1a0521=this[_0x3fca9d(0x18c)](_0x51c0ae,_0x5b1f37,_0x43359f);if(!_0x1a0521)return console[_0x3fca9d(0x1ed)](a42_0x35b1c5[_0x3fca9d(0x304)]('Error:'),'Project\x20name\x20is\x20required'),console[_0x3fca9d(0x1ed)](a42_0x35b1c5['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x1a0521;}[a42_0x34064d(0x19a)](_0x20f69c,_0x402bec){const _0x5b0fe7=a42_0x34064d;if(_0x20f69c[0x0]){const _0x54d7ec=_0x20f69c[0x0][_0x5b0fe7(0x1a2)]('.');if(_0x54d7ec[_0x5b0fe7(0x2a1)]===0x1)return{'projectName':_0x54d7ec[0x0],'workflowName':undefined};else return _0x54d7ec[_0x5b0fe7(0x2a1)]===0x2?{'projectName':_0x54d7ec[0x0],'workflowName':_0x54d7ec[0x1]}:(console['error'](a42_0x35b1c5['red'](_0x5b0fe7(0x2cb)),_0x5b0fe7(0x1f5)),null);}return{'projectName':_0x402bec[_0x5b0fe7(0x303)],'workflowName':undefined};}[a42_0x34064d(0x261)](_0x41d725,_0x450db4,_0x244400=0x0){const _0x4f6f0c=a42_0x34064d;if(_0x41d725[_0x244400])return _0x41d725[_0x244400];if(_0x450db4[_0x4f6f0c(0x303)]){const _0x262c42=a42_0x1ccec2[_0x4f6f0c(0x2dc)](process[_0x4f6f0c(0x2f2)](),_0x4f6f0c(0x23d),_0x450db4[_0x4f6f0c(0x303)]);if(existsSync(a42_0x1ccec2[_0x4f6f0c(0x2dc)](_0x262c42,'tdx.json')))return _0x262c42;}return undefined;}async[a42_0x34064d(0x1f0)](_0x44e8d0,_0x1ebd70,_0x36e54d){const _0x575f29=a42_0x34064d;try{const _0x2c83d0=await _0x44e8d0[_0x575f29(0x277)][_0x575f29(0x23d)](_0x1ebd70,{'limit':0x1});if(_0x2c83d0[_0x575f29(0x2a1)]>0x0){const _0xa3448=_0x2c83d0[0x0]['id'],_0x420ba5=getWorkflowUrl(_0x36e54d,_0xa3448);console[_0x575f29(0x1ed)](_0x575f29(0x2ad)+a42_0x35b1c5['cyan'](_0x420ba5));}}catch{}}}function a42_0xab04(){const _0x40df29=['Key\x20cannot\x20be\x20empty','No\x20sessions\x20found\x20for:\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Validation:\x20skipped','planned','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','POLL_INTERVAL_MS','renderSessionsTimeline','durationMs','List\x20workflow\x20execution\x20sessions','yes','\x20\x20Console:\x20','\x20is\x20not\x20a\x20directory','set','Select\x20a\x20task\x20to\x20view\x20logs:','Select\x20a\x20session\x20to\x20view\x20timeline:','json','No\x20sessions\x20found\x20in\x20project:\x20','from','Params:\x20','kill','\x20attempt','filter','9688xYGbQa','sourceDir','data','renderTimeline','deleted','Fetching\x20log\x20files...','navigateSessionsInteractive','Using\x20attempt\x20','\x0aError:','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','message','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','keys','Tip:\x20cd\x20to\x20workflows/','Downloading\x20logs...','basename','9WNTRIQ','Error:','toLowerCase','Files\x20to\x20upload:\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','renderSingleTimeline','updatedAt','Target\x20directory:\x20','end','\x20task','isDirectory','\x20project','attemptId','execute','getHours','Project\x20name\x20is\x20required','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20of\x20','join','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','MIN_TIMELINE_WIDTH','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','value','workflow:workflows','669248JUdlxi','Expected\x20format:\x20--param\x20key=value','Deleting\x20project\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','resolveProjectId','Kill\x20a\x20running\x20attempt','Killing\x20attempt...','select','stdout','yellow','slice','\x0aClone\x20\x22','task','\x1b[1A\x1b[2K','Latest\x20session\x20has\x20no\x20attempt','name','cwd','some','No\x20workflows\x20found','workflow:push','No\x20attempts\x20found\x20in\x20project:\x20','74120ONUvPS','dim','2855556jhTZLk','/app/workflows/','startTime','\x0aDry\x20run\x20-\x20no\x20files\x20written','project','Task\x20name:\x20','size','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','workflowName','workflow:timeline','workflowProject','red','Pull\x20workflow\x20project\x20to\x20local\x20folder','workflow:tasks','attempt','modified','Failed\x20to\x20fetch\x20attempt\x20data','Auto-selected\x20latest\x20session:\x20','Parameters:\x20','Project:\x20','Listing\x20secrets...','stringify','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','No\x20workflow\x20sessions\x20found','workflow:secrets:set','list','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','match','preparePushProject','requireProject','ICON_WIDTH','\x20\x20Changes:\x20','MAX_POLL_ITERATIONS','createdAt','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','summary','indexOf','\x0aPush\x20these\x20changes?','output','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','No\x20sessions\x20found','No\x20log\x20content\x20found','\x20\x20Source:\x20','retryAttemptName','Dry\x20run:\x20yes','replace','💡\x20Tip:\x20Use\x20','changes','newProjectName','(unknown)','📋\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','resolveProject','ICON_SPACING','text','Select\x20a\x20workflow\x20to\x20run','\x20to\x20see\x20detailed\x20logs','taskName','has','Warning:','634207GqUVAl','⚠\x20Showing\x20first\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','retryAttempt','unknown','find','parseProjectWorkflowPattern','sessions','3LVTiTX','\x20\x20Session\x20context\x20set\x20to:\x20','GUTTER','List\x20workflow\x20attempts','done','Workflow:\x20','split','\x0aUpdate\x20existing\x20project\x20\x22','stat','success','Invalid\x20format:\x20','-\x20nothing\x20pushed','download','Usage:\x20tdx\x20wf\x20use\x20<project>','✔\x20Workflow\x20run\x20started','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x20(system)',',\x20Workflow:\x20','session:','✔\x20Secret\x20\x27','Deleting\x20secret...','localeCompare','✔\x20Project:\x20','readFile','blue','projectName','finishedAt','generateSessionTimelineRows','metadata','\x20has\x20no\x20attempts','floor','Usage:\x20workflow:delete\x20<project-name-or-id>','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','sessionTime','title','List\x20workflows','startedAt','workflow:kill','Error:\x20Attempt\x20ID\x20is\x20required','Status:\x20','type','workflow:attempts','\x20new','\x20secret','workflow:secrets:delete','Loading\x20sessions...','\x20\x20Project\x20ID:\x20','sessionId','projects','Listing\x20workflow\x20attempts...','resumeFrom','Filter:\x20project=','Updating\x20','\x20session','prepareCloneProject','getMonth','\x0a✔\x20No\x20changes\x20to\x20push','skipValidation','limit','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','workflow:use','1463692rRDxsN','Force:\x20yes','existingProjectId','✔\x20Clone\x20complete','cyan','\x0a⚠\x20Project\x20\x22','\x20tasks','revision','tasks','get','values','Session\x20time:\x20','Attempt\x20ID:\x20','substring','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','map','\x20\x20Session\x20ID:\x20','unchanged','MAX_LABEL_COUNT','logs','error','✔\x20Pull\x20complete','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','showWorkflowConsoleUrl','cancelRequested','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Loading\x20session...','\x20-\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','workflow:sessions','getMinutes','duration','window','executeCloneProject','workflow:attempt','Downloading\x20project\x20','rows','LABEL_MIN_SPACING','getDate','newProjectId','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x22\x20already\x20exists\x20(ID:\x20','params','all','✔\x20Push\x20complete','state','buildTimelineData','now','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Session\x20not\x20found:\x20','index','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','max','revision:\x20','reason','site','hasChanges','includeRetried','\x20logs','push','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','workflow:logs','\x20unchanged','relative','No\x20workflow\x20tdx.json\x20found','description','session_id','No\x20attempts\x20found','\x20\x20tdx\x20wf\x20use\x20<project>','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','sys','Error:\x20KEY=VALUE\x20is\x20required','Starting\x20workflow\x20run...','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Source:\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','Show\x20specific\x20attempt\x20details','...','\x0a✔\x20Already\x20up\x20to\x20date','write','✔\x20Found\x20','/sessions/','key','Setting\x20secret...','canceling','workflow:run','workflow:delete','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Show\x20tasks\x20for\x20an\x20attempt','\x0aPolling...\x20(','From\x20task:\x20','.\x20Expected\x20format:\x20KEY=VALUE','\x0a✔\x20Attempt\x20complete','Listing\x20workflow\x20projects...','Key:\x20','Include\x20retried:\x20yes','TASK_NAME_WIDTH','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','Error:\x20Invalid\x20parameter\x20format:\x20','min','workflows','trim','deleteSecret','---\x20','filesExtracted','run','every','displayLine','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','workflow:upload','6449144LdgBSQ','\x22?\x20This\x20cannot\x20be\x20undone.','\x20\x20Project:\x20','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x20deleted','parse','✔\x20Downloaded\x20','pollTimeline','dryRun','green','isArray','startsWith','tdx\x20wf\x20attempt\x20','✔\x20Workflow\x20project\x20set\x20to:\x20','path','verbose','fullName','workflow:secrets:list','setSecret','toISOString','format','table','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Project\x20filter:\x20','Resolving\x20project\x20\x27','resolveProjectDir','pullProject','session','\x27\x20from\x20project\x20\x27','Cancelled','fileSize','targetDir','diff','Resume\x20from:\x20','Error:\x20Project\x20name\x20is\x20required','lastAttempt','repeat','MAX_TASKS_DISPLAY','context','getTime','Filter:\x20','fromTask','retrySession','targetExists','\x0aDry\x20run\x20-\x20nothing\x20pushed','MIN_LABEL_COUNT','✔\x20Deleted\x20project\x20','workflow','pending','sourceProjectName','Pattern:\x20','Output\x20directory:\x20','Analyzing\x20changes...','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','/attempt/','Listing\x20workflow\x20sessions...','isTTY','→\x20Project:\x20','\x20\x20Revision:\x20','columns','✔\x20Retry\x20started','No\x20sessions\x20with\x20timing\x20information','(use\x20--limit\x20to\x20see\x20more)','follow','Pushing\x20workflow\x20project...','fill','getFullYear','\x20\x20Attempt\x20ID:\x20','log','\x0aApply\x20these\x20changes?','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Pushing\x20project...','includes','Getting\x20attempt\x20tasks...','sort','running','padStart','Attempt:\x20','Error:\x20','jsonl','Revision:\x20','start','projectId','status','Analyzing\x20project...','🔄\x20','\x20(use\x20--limit\x20to\x20show\x20more)','✔\x20Project\x20updated','length'];a42_0xab04=function(){return _0x40df29;};return a42_0xab04();}export class WorkflowUseCommand extends BaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x1d8);[a42_0x34064d(0x21a)]=a42_0x34064d(0x1e7);async[a42_0x34064d(0x2d7)](_0x12c21b){const _0xa2b935=a42_0x34064d,{options:_0x43e28d,args:_0x736c21,tdx:_0x19956a}=_0x12c21b,_0xaefff1=_0x736c21[0x0],_0x5a9d75=_0x43e28d['clear'];if(_0x5a9d75)return saveSessionContext({'workflow_project':undefined},_0x43e28d['session']),console[_0xa2b935(0x28d)](a42_0x35b1c5['green']('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0xaefff1)return console[_0xa2b935(0x1ed)](a42_0x35b1c5['red']('Error:'),_0xa2b935(0x2d9)),console[_0xa2b935(0x1ed)](a42_0x35b1c5[_0xa2b935(0x2f8)](_0xa2b935(0x1a9))),console[_0xa2b935(0x1ed)](a42_0x35b1c5['dim'](_0xa2b935(0x300))),0x1;const _0x3c41ed=await withSpinner(_0xa2b935(0x260)+_0xaefff1+'\x27...',()=>_0x19956a[_0xa2b935(0x277)][_0xa2b935(0x2e6)](_0xaefff1),{'verbose':_0x43e28d['verbose']}),{name:_0xb3c25d}=_0x3c41ed['data'];return saveSessionContext({'workflow_project':_0xb3c25d},_0x43e28d[_0xa2b935(0x263)]),console[_0xa2b935(0x28d)](a42_0x35b1c5[_0xa2b935(0x250)](_0xa2b935(0x254)+a42_0x35b1c5['cyan'](_0xb3c25d))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x34064d(0x2f1)]='workflow:projects';[a42_0x34064d(0x21a)]='List\x20all\x20workflow\x20projects';async[a42_0x34064d(0x2d7)](_0x18b714){const _0x425e22=a42_0x34064d,{options:_0x5d30dd,args:_0x8ff205,tdx:_0x1525e0}=_0x18b714,_0x519f29=_0x8ff205[0x0];_0x5d30dd[_0x425e22(0x256)]&&_0x519f29&&console[_0x425e22(0x1ed)](_0x425e22(0x27a)+_0x519f29);const _0x7ce43c=await withSpinner(_0x425e22(0x236),()=>_0x1525e0[_0x425e22(0x277)][_0x425e22(0x1cc)](_0x519f29,{'limit':_0x5d30dd[_0x425e22(0x1d6)]}),{'verbose':_0x5d30dd[_0x425e22(0x256)]});let _0x39b309=_0x7ce43c[_0x425e22(0x2bb)];_0x39b309['sort']((_0x1910e0,_0x2eb25c)=>_0x1910e0['name'][_0x425e22(0x1b1)](_0x2eb25c[_0x425e22(0x2f1)]));const _0x44326e=_0x5d30dd[_0x425e22(0x1d6)]||0x64,_0x54c2cc=_0x39b309[_0x425e22(0x2a1)]>=_0x44326e?a42_0x35b1c5[_0x425e22(0x2f8)](_0x425e22(0x29f)):'';console[_0x425e22(0x1ed)]('✔\x20Found\x20'+_0x39b309[_0x425e22(0x2a1)]+_0x425e22(0x2d5)+(_0x39b309[_0x425e22(0x2a1)]!==0x1?'s':'')+_0x54c2cc);if(_0x5d30dd['format']==='json'||_0x5d30dd[_0x425e22(0x25b)]===_0x425e22(0x298)||_0x5d30dd['format']==='table')await handleSDKOutput(_0x39b309,_0x5d30dd);else{if(_0x39b309['length']===0x0)_0x519f29?console[_0x425e22(0x28d)]('No\x20projects\x20match\x20pattern:\x20'+_0x519f29):console[_0x425e22(0x28d)]('No\x20workflow\x20projects\x20found');else{const _0x4ce489=_0x39b309['map'](_0x5d125f=>{const _0xd2308d=_0x425e22,_0x4d7c93=_0x5d125f[_0xd2308d(0x1b8)]?.[_0xd2308d(0x2f3)](_0x5c8a3f=>_0x5c8a3f['key']===_0xd2308d(0x21f)),_0x34cbcf=_0x4d7c93?a42_0x35b1c5['dim'](_0xd2308d(0x1ac)):'';return'📁\x20'+_0x5d125f['name']+_0x34cbcf;});await writeOutput(_0x4ce489[_0x425e22(0x2dc)]('\x0a'),_0x5d30dd[_0x425e22(0x17e)],_0x425e22(0x312));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x2e1);[a42_0x34064d(0x21a)]=a42_0x34064d(0x1bf);async[a42_0x34064d(0x2d7)](_0x2b994c){const _0x5e55c7=a42_0x34064d,{options:_0x25eb3e,args:_0x55848c,tdx:_0x16a713}=_0x2b994c,_0x29832f=this[_0x5e55c7(0x18c)](_0x55848c,_0x25eb3e);_0x25eb3e['verbose']&&_0x29832f&&console[_0x5e55c7(0x1ed)](_0x5e55c7(0x25f)+_0x29832f);const _0x40df60=await withSpinner('Listing\x20workflows...',()=>_0x16a713['workflow'][_0x5e55c7(0x23d)](_0x29832f,{'limit':_0x25eb3e[_0x5e55c7(0x1d6)]}),{'verbose':_0x25eb3e[_0x5e55c7(0x256)]});let _0x493116=_0x40df60['data'];_0x493116['sort']((_0x4726cb,_0x433d0e)=>{const _0x3b3809=_0x5e55c7,_0x16d552=_0x4726cb['name'][_0x3b3809(0x1b1)](_0x433d0e[_0x3b3809(0x2f1)]);if(_0x16d552!==0x0)return _0x16d552;return(_0x4726cb['project']?.['name']||'')['localeCompare'](_0x433d0e['project']?.[_0x3b3809(0x2f1)]||'');});const _0x3b0757=_0x25eb3e[_0x5e55c7(0x1d6)]||0x64,_0x200078=_0x493116[_0x5e55c7(0x2a1)]>=_0x3b0757?a42_0x35b1c5[_0x5e55c7(0x2f8)](_0x5e55c7(0x29f)):'';console['error'](_0x5e55c7(0x229)+_0x493116[_0x5e55c7(0x2a1)]+'\x20workflow'+(_0x493116[_0x5e55c7(0x2a1)]!==0x1?'s':'')+_0x200078);if(_0x25eb3e['format']===_0x5e55c7(0x2b2)||_0x25eb3e[_0x5e55c7(0x25b)]===_0x5e55c7(0x298)||_0x25eb3e[_0x5e55c7(0x25b)]===_0x5e55c7(0x25c))await handleSDKOutput(_0x493116,_0x25eb3e);else{if(_0x493116[_0x5e55c7(0x2a1)]===0x0)_0x29832f?console[_0x5e55c7(0x28d)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x29832f):console[_0x5e55c7(0x28d)](_0x5e55c7(0x2f4));else{const _0xfc1ba0=_0x25eb3e[_0x5e55c7(0x210)],_0xe7de74=_0x493116['map'](_0x4e61fd=>{const _0x4ad7a9=_0x5e55c7,_0x4f63e6=a42_0x35b1c5[_0x4ad7a9(0x2f8)]('#'+_0x4e61fd['id']),_0x10acb5=hyperlink(_0x4f63e6,getWorkflowUrl(_0xfc1ba0,_0x4e61fd['id'])),_0x1136c9=_0x4e61fd[_0x4ad7a9(0x2fd)]?.[_0x4ad7a9(0x2f1)]?a42_0x35b1c5[_0x4ad7a9(0x2f8)]('\x20('+_0x4e61fd[_0x4ad7a9(0x2fd)][_0x4ad7a9(0x2f1)]+')'):'';return _0x4ad7a9(0x18a)+_0x10acb5+'\x20'+_0x4e61fd[_0x4ad7a9(0x2f1)]+_0x1136c9;});await writeOutput(_0xe7de74[_0x5e55c7(0x2dc)]('\x0a'),_0x25eb3e['output'],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x1f6);['description']=a42_0x34064d(0x2ab);async[a42_0x34064d(0x2d7)](_0x312d49){const _0x3f62b1=a42_0x34064d,{options:_0x471633,args:_0x405f75,tdx:_0xd2700c}=_0x312d49,_0x50073c=this[_0x3f62b1(0x19a)](_0x405f75,_0x471633);if(!_0x50073c)return 0x1;const {projectName:_0x29c67f,workflowName:_0x16ed67}=_0x50073c;if(_0x471633['verbose']){if(_0x29c67f&&_0x16ed67)console['error'](_0x3f62b1(0x270)+_0x29c67f+'.'+_0x16ed67);else _0x29c67f&&console[_0x3f62b1(0x1ed)](_0x3f62b1(0x1cf)+_0x29c67f);const _0x21c15f=_0x471633['status'];_0x21c15f&&console[_0x3f62b1(0x1ed)](_0x3f62b1(0x1c3)+_0x21c15f);}let _0x3b1d4d=0x28;if(process[_0x3f62b1(0x2ea)]['isTTY']&&!_0x471633[_0x3f62b1(0x17e)]&&!_0x471633['format']){const _0x1714d4=process[_0x3f62b1(0x2ea)][_0x3f62b1(0x1fd)]||0x28;_0x3b1d4d=Math[_0x3f62b1(0x20d)](0x14,Math[_0x3f62b1(0x1ba)](_0x1714d4*0x2/0x3));}const _0x14cd5e=_0x471633[_0x3f62b1(0x1d6)]||_0x3b1d4d,_0x320b8b=await withSpinner(_0x3f62b1(0x280),()=>_0xd2700c['workflow']['sessions']({'projectName':_0x29c67f,'workflowName':_0x16ed67,'status':_0x471633[_0x3f62b1(0x29c)],'fromTime':_0x471633[_0x3f62b1(0x2b4)],'toTime':_0x471633['to'],'limit':_0x14cd5e}),{'verbose':_0x471633[_0x3f62b1(0x256)]}),_0x219423=_0x320b8b['data'];_0x219423[_0x3f62b1(0x293)]((_0x2e3523,_0x5aecd2)=>{const _0x38f9de=_0x3f62b1,_0x27e29d=_0x2e3523[_0x38f9de(0x1bd)]||'',_0x26d42f=_0x5aecd2[_0x38f9de(0x1bd)]||'';return _0x26d42f[_0x38f9de(0x1b1)](_0x27e29d);});_0x219423[_0x3f62b1(0x2a1)]>=_0x14cd5e?console[_0x3f62b1(0x1ed)]('✔\x20Showing\x20'+_0x219423[_0x3f62b1(0x2a1)]+'\x20sessions\x20'+a42_0x35b1c5[_0x3f62b1(0x2f8)](_0x3f62b1(0x287))):console[_0x3f62b1(0x1ed)](_0x3f62b1(0x229)+_0x219423[_0x3f62b1(0x2a1)]+_0x3f62b1(0x1d1)+(_0x219423['length']!==0x1?'s':''));if(_0x471633[_0x3f62b1(0x25b)]===_0x3f62b1(0x2b2)||_0x471633[_0x3f62b1(0x25b)]===_0x3f62b1(0x298)||_0x471633[_0x3f62b1(0x25b)]==='table')await handleSDKOutput(_0x219423,_0x471633);else{if(!process[_0x3f62b1(0x2ea)][_0x3f62b1(0x281)]||_0x471633[_0x3f62b1(0x17e)]){if(_0x219423[_0x3f62b1(0x2a1)]===0x0){if(_0x29c67f&&_0x16ed67)console[_0x3f62b1(0x28d)](_0x3f62b1(0x2a3)+_0x29c67f+'.'+_0x16ed67);else _0x29c67f?console[_0x3f62b1(0x28d)](_0x3f62b1(0x2b3)+_0x29c67f):console['log'](_0x3f62b1(0x180));}else{const _0x4eb2dd=_0x471633[_0x3f62b1(0x210)],_0x541547=this[_0x3f62b1(0x2a9)](_0x219423,_0x4eb2dd);_0x471633[_0x3f62b1(0x17e)]?await writeOutput(_0x541547,_0x471633[_0x3f62b1(0x17e)],_0x3f62b1(0x312)):console[_0x3f62b1(0x28d)](_0x541547);}!_0x29c67f&&(console[_0x3f62b1(0x1ed)](''),console['error'](a42_0x35b1c5[_0x3f62b1(0x2f8)](_0x3f62b1(0x1d7))),console['error'](a42_0x35b1c5['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0x35b1c5[_0x3f62b1(0x2f8)](_0x3f62b1(0x21d))));}else{if(_0x219423[_0x3f62b1(0x2a1)]===0x0){if(_0x29c67f&&_0x16ed67)console[_0x3f62b1(0x28d)](_0x3f62b1(0x2a3)+_0x29c67f+'.'+_0x16ed67);else _0x29c67f?console[_0x3f62b1(0x28d)](_0x3f62b1(0x2b3)+_0x29c67f):console[_0x3f62b1(0x28d)](_0x3f62b1(0x180));}else await this['navigateSessionsInteractive'](_0x219423,_0x312d49,_0x29c67f);}}return 0x0;}[a42_0x34064d(0x2a9)](_0x25f2ef,_0x450c5c){const _0x2cd5d6=a42_0x34064d,_0x2546c7=[],_0x104110=new Map();let _0x15e761=Infinity,_0x3845bd=-Infinity;for(const _0x298720 of _0x25f2ef){if(_0x298720[_0x2cd5d6(0x26b)]?.[_0x2cd5d6(0x31a)]){const _0x3c1360=new Date(_0x298720[_0x2cd5d6(0x26b)][_0x2cd5d6(0x31a)])[_0x2cd5d6(0x26f)](),_0x107a9e=_0x298720[_0x2cd5d6(0x26b)][_0x2cd5d6(0x1b6)]?new Date(_0x298720[_0x2cd5d6(0x26b)][_0x2cd5d6(0x1b6)])['getTime']():Date[_0x2cd5d6(0x208)](),_0xa6cf79=_0x298720['project']?.[_0x2cd5d6(0x2f1)]||_0x2cd5d6(0x189);!_0x104110[_0x2cd5d6(0x192)](_0xa6cf79)&&_0x104110[_0x2cd5d6(0x2af)](_0xa6cf79,[]),_0x104110[_0x2cd5d6(0x1e2)](_0xa6cf79)[_0x2cd5d6(0x214)]({'session':_0x298720,'startTime':_0x3c1360,'endTime':_0x107a9e,'duration':_0x107a9e-_0x3c1360}),_0x15e761=Math['min'](_0x15e761,_0x3c1360),_0x3845bd=Math[_0x2cd5d6(0x20d)](_0x3845bd,_0x107a9e);}}if(_0x104110[_0x2cd5d6(0x2ff)]===0x0)return _0x2cd5d6(0x286);const _0x2c2479=process[_0x2cd5d6(0x2ea)][_0x2cd5d6(0x284)]||0x78,_0x41d19d=0x1e,_0x155836=0x32,_0x721856=0x4,_0x541684=Math['min'](_0x155836,Math[_0x2cd5d6(0x20d)](_0x41d19d,Math[_0x2cd5d6(0x1ba)](_0x2c2479*0.3))),_0xde88b4=_0x2c2479-_0x541684-TIMELINE_CONFIG[_0x2cd5d6(0x19e)]-0x3-_0x721856,_0x1cbc97=_0x3845bd-_0x15e761,_0x5da839=_0x1cbc97/_0x541684,_0x2ac9c0=renderTimeAxis({'startTime':_0x15e761,'endTime':_0x3845bd,'durationMs':_0x1cbc97,'msPerChar':_0x5da839},_0x541684),_0x2c649f=[];for(const _0x20e811 of _0x104110[_0x2cd5d6(0x1e3)]()){_0x2c649f[_0x2cd5d6(0x214)](..._0x20e811);}_0x2c649f['sort']((_0x4fc298,_0x4e754c)=>_0x4e754c['startTime']-_0x4fc298['startTime']);const _0x260c39=new Date(_0x15e761),_0x364928=formatDate(_0x260c39),_0x13d604=_0x721856+TIMELINE_CONFIG[_0x2cd5d6(0x317)]+TIMELINE_CONFIG[_0x2cd5d6(0x18d)]+_0xde88b4,_0x5a4e62='\x20'[_0x2cd5d6(0x26c)](_0x13d604-_0x364928[_0x2cd5d6(0x2a1)]),_0x3d27a3=_0x5a4e62+a42_0x35b1c5[_0x2cd5d6(0x2f8)](_0x364928)+'\x20'+_0x2ac9c0;_0x2546c7['push'](_0x3d27a3);const _0x1f3848=0x16;let _0x44d7c8=0x0;for(const _0x977b4f of _0x2c649f){const _0x4a7986=_0x977b4f['session'][_0x2cd5d6(0x2fd)]?.[_0x2cd5d6(0x2f1)]||'?',_0xc3b45c=Math[_0x2cd5d6(0x23c)](stringWidth(_0x4a7986),_0x1f3848);_0x44d7c8=Math['max'](_0x44d7c8,_0xc3b45c);}for(const _0x565886 of _0x2c649f){const {session:_0xe4c3b3,startTime:_0x26eec2,endTime:_0x546db2,duration:_0x80e632}=_0x565886,_0x429a30=_0xe4c3b3[_0x2cd5d6(0x2fd)]?.['id'],_0x4feb7f=_0xe4c3b3['id'],_0x440921=_0xe4c3b3[_0x2cd5d6(0x2fd)]?.[_0x2cd5d6(0x2f1)]||'?',_0x233ace=_0xe4c3b3['workflow']?.[_0x2cd5d6(0x2f1)]||'?';let _0x1639d8,_0x418e48;if(_0xe4c3b3[_0x2cd5d6(0x26b)]){const _0x1fb4d2=_0xe4c3b3['lastAttempt'];!_0x1fb4d2['done']?(_0x1639d8=_0x1fb4d2[_0x2cd5d6(0x1f1)]?'🛑':'🔄',_0x418e48=_0x1fb4d2[_0x2cd5d6(0x1f1)]?a42_0x35b1c5['yellow']:a42_0x35b1c5[_0x2cd5d6(0x1b4)]):(_0x1639d8=_0x1fb4d2[_0x2cd5d6(0x1a5)]?'✅':'❌',_0x418e48=_0x1fb4d2[_0x2cd5d6(0x1a5)]?a42_0x35b1c5[_0x2cd5d6(0x250)]:a42_0x35b1c5['red']);}else _0x1639d8='⏳',_0x418e48=a42_0x35b1c5[_0x2cd5d6(0x2f8)];const _0x507852='#'+_0x4feb7f,_0x15a67b=_0x429a30?hyperlink(_0x507852,getWorkflowSessionUrl(_0x450c5c,_0x429a30,_0x4feb7f)):_0x507852;let _0x25c029=_0x440921;stringWidth(_0x440921)>_0x1f3848&&(_0x25c029=_0x440921[_0x2cd5d6(0x2ec)](0x0,_0x1f3848-0x1)+'…');const _0x511c1f=a42_0x35b1c5[_0x2cd5d6(0x2f8)](_0x25c029),_0x19fb6c=stringWidth(_0x25c029),_0x299757='\x20'[_0x2cd5d6(0x26c)](_0x44d7c8-stringWidth(_0x25c029)+0x2),_0x430cb8='('+formatElapsed(_0x80e632)+')',_0xdfb695=stringWidth(_0x430cb8),_0xd69918=stringWidth(_0x507852),_0x3b5e0f=_0xd69918+0x1+_0x19fb6c+_0x299757['length'],_0x31acbe=_0xde88b4-_0x3b5e0f-_0xdfb695-0x1-0x8;let _0x341660=_0x233ace;stringWidth(_0x341660)>_0x31acbe&&(_0x341660=_0x341660[_0x2cd5d6(0x2ec)](0x0,_0x31acbe-0x1)+'…');const _0x1dbf27=_0x15a67b+'\x20'+_0x511c1f+_0x299757+_0x341660,_0x4f4906=stringWidth(_0x1dbf27),_0x2eab25=_0xde88b4-_0x4f4906-_0xdfb695,_0x301bc3=_0x1dbf27+'\x20'[_0x2cd5d6(0x26c)](Math[_0x2cd5d6(0x20d)](0x1,_0x2eab25))+a42_0x35b1c5[_0x2cd5d6(0x2f8)](_0x430cb8),_0x257ab3=Math[_0x2cd5d6(0x1ba)]((_0x26eec2-_0x15e761)/_0x5da839),_0x18ada3=Math[_0x2cd5d6(0x1ba)]((_0x546db2-_0x15e761)/_0x5da839),_0x4be56b=Math[_0x2cd5d6(0x20d)](_0x257ab3+0x1,_0x18ada3),_0x4fbb96=new Array(_0x541684)[_0x2cd5d6(0x28a)]('\x20');for(let _0x2158bf=_0x257ab3;_0x2158bf<Math[_0x2cd5d6(0x23c)](_0x4be56b,_0x541684);_0x2158bf++){_0x4fbb96[_0x2158bf]='─';}const _0x23559a=_0x4fbb96[_0x2cd5d6(0x1e8)](_0x21c259=>_0x21c259==='\x20'?'\x20':_0x418e48(_0x21c259))[_0x2cd5d6(0x2dc)]('');_0x2546c7[_0x2cd5d6(0x214)](_0x1639d8+'\x20'+_0x301bc3+'│'+_0x23559a+'│');}return _0x2546c7['join']('\x0a');}async[a42_0x34064d(0x2bf)](_0x2b4bbe,_0x148274,_0x30f831){const _0x3a9a17=a42_0x34064d,{options:_0x1b5c03,tdx:_0x237927}=_0x148274,_0x9779f4=_0x1b5c03[_0x3a9a17(0x210)],{timelineRows:_0x574906,timeAxisHeader:_0x214a52}=this[_0x3a9a17(0x1b7)](_0x2b4bbe,_0x9779f4),_0x3e7dea=_0x574906[_0x3a9a17(0x2b8)](_0x187fea=>_0x187fea[_0x3a9a17(0x2d6)]);if(_0x3e7dea[_0x3a9a17(0x2a1)]===0x0){const _0x189f77=this[_0x3a9a17(0x2a9)](_0x2b4bbe,_0x9779f4);console[_0x3a9a17(0x28d)](_0x189f77);!_0x30f831&&(console[_0x3a9a17(0x1ed)](''),console[_0x3a9a17(0x1ed)](a42_0x35b1c5[_0x3a9a17(0x2f8)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x3a9a17(0x1ed)](a42_0x35b1c5[_0x3a9a17(0x2f8)](_0x3a9a17(0x2e5))+'or'+a42_0x35b1c5[_0x3a9a17(0x2f8)](_0x3a9a17(0x21d))));return;}_0x214a52&&console['log'](_0x214a52);const _0x15207c=_0x574906[_0x3a9a17(0x2b8)](_0x2a1049=>_0x2a1049[_0x3a9a17(0x2d6)])[_0x3a9a17(0x1e8)](_0x1d5fa4=>({'title':_0x1d5fa4[_0x3a9a17(0x244)],'value':_0x1d5fa4[_0x3a9a17(0x2d6)]})),_0x361123=process[_0x3a9a17(0x2ea)][_0x3a9a17(0x1fd)]||0x3c,_0x5bd535=Math[_0x3a9a17(0x20d)](0x28,Math[_0x3a9a17(0x1ba)](_0x361123*0x2/0x3)),_0xad6630=await a42_0x40adc0({'type':'autocomplete','name':_0x3a9a17(0x2d6),'message':_0x3a9a17(0x215),'choices':_0x15207c,'initial':-0x1,'limit':_0x5bd535,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x359a48,_0x2d5599)=>{if(!_0x359a48)return Promise['resolve'](_0x2d5599);const _0x3fd9d5=_0x2d5599['filter'](_0x3679c5=>{const _0x53e5d3=a42_0xd5e8,_0x1c5f4a=_0x3679c5;return _0x1c5f4a[_0x53e5d3(0x1be)][_0x53e5d3(0x2cc)]()[_0x53e5d3(0x291)](_0x359a48[_0x53e5d3(0x2cc)]());});return Promise['resolve'](_0x3fd9d5);}}),_0xb89e2c=()=>{const _0x2830fc=_0x3a9a17;process[_0x2830fc(0x2ea)]['write']('\x1b[1A\x1b[2K'),process[_0x2830fc(0x2ea)][_0x2830fc(0x228)](_0x2830fc(0x2ef)),process[_0x2830fc(0x2ea)][_0x2830fc(0x228)](_0x2830fc(0x2ef));},_0x4a735d=_0xad6630&&_0xad6630[_0x3a9a17(0x2d6)]&&_0xad6630[_0x3a9a17(0x2d6)]!==null&&_0xad6630[_0x3a9a17(0x2d6)][_0x3a9a17(0x23e)]()!=='';if(!_0x4a735d){_0xb89e2c(),console[_0x3a9a17(0x28d)](a42_0x35b1c5[_0x3a9a17(0x2f8)](_0x3a9a17(0x265)));return;}_0xb89e2c();const _0x13a662=_0x2b4bbe[_0x3a9a17(0x199)](_0x18c69e=>_0x18c69e[_0x3a9a17(0x26b)]?.['id']===_0xad6630[_0x3a9a17(0x2d6)]);if(_0x13a662){const _0x485595=_0x13a662['project']?.[_0x3a9a17(0x2f1)]||'?',_0x207c9b=_0x13a662[_0x3a9a17(0x277)]?.['name']||'?';console[_0x3a9a17(0x28d)](_0x3a9a17(0x30c)+a42_0x35b1c5[_0x3a9a17(0x2f8)](_0x485595)+_0x3a9a17(0x1ad)+a42_0x35b1c5[_0x3a9a17(0x2f8)](_0x207c9b));}const _0xdea9a=new WorkflowTimelineCommand();await _0xdea9a[_0x3a9a17(0x2d7)]({'args':[],'options':{..._0x1b5c03,'attemptId':_0xad6630['attemptId']},'tdx':_0x237927});}[a42_0x34064d(0x1b7)](_0x312408,_0x426f74){const _0x1a76a1=a42_0x34064d,_0x17838a=new Map();for(const _0x136e4b of _0x312408){_0x136e4b['id']&&_0x136e4b[_0x1a76a1(0x26b)]?.['id']&&_0x17838a[_0x1a76a1(0x2af)](_0x136e4b['id'],_0x136e4b[_0x1a76a1(0x26b)]['id']);}const _0x40f0f4=[];let _0x51803c='';const _0x4c0baa=this['renderSessionsTimeline'](_0x312408,_0x426f74),_0x57c3cd=_0x4c0baa[_0x1a76a1(0x1a2)]('\x0a');for(const _0x4e13a5 of _0x57c3cd){if(_0x4e13a5[_0x1a76a1(0x252)](_0x1a76a1(0x1f2))||_0x4e13a5[_0x1a76a1(0x314)](/^\s+\d{4}-\d{2}-\d{2}/))_0x51803c=_0x4e13a5;else{if(_0x4e13a5[_0x1a76a1(0x314)](/^[✅❌🔄🛑⏳]/)){const _0x59d4c0=_0x4e13a5[_0x1a76a1(0x314)](/#(\d+)/),_0x428a00=_0x59d4c0?_0x59d4c0[0x1]:null,_0x5bcd35=_0x428a00?_0x17838a['get'](_0x428a00)||null:null,_0x2635ef=_0x312408[_0x1a76a1(0x199)](_0x37edea=>_0x37edea['id']===_0x428a00),_0xf1ee3b=_0x2635ef?.[_0x1a76a1(0x2fd)]?.[_0x1a76a1(0x2f1)]||'';_0x40f0f4[_0x1a76a1(0x214)]({'displayLine':_0x4e13a5,'attemptId':_0x5bcd35,'projectName':_0xf1ee3b});}}}return{'timelineRows':_0x40f0f4,'timeAxisHeader':_0x51803c};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x1c5);['description']=a42_0x34064d(0x19f);async[a42_0x34064d(0x2d7)](_0x429594){const _0x537960=a42_0x34064d,{options:_0x1c9e70,args:_0x5b4d91,tdx:_0x3b239b}=_0x429594,_0xa9d01e=this[_0x537960(0x19a)](_0x5b4d91,_0x1c9e70);if(!_0xa9d01e)return 0x1;const {projectName:_0x43b54f,workflowName:_0x582584}=_0xa9d01e,_0x5df75c=_0x1c9e70[_0x537960(0x212)];if(_0x1c9e70[_0x537960(0x256)]){if(_0x43b54f&&_0x582584)console[_0x537960(0x1ed)](_0x537960(0x270)+_0x43b54f+'.'+_0x582584);else _0x43b54f&&console[_0x537960(0x1ed)](_0x537960(0x1cf)+_0x43b54f);_0x5df75c&&console[_0x537960(0x1ed)](_0x537960(0x238));}const _0x4cc0e9=await withSpinner(_0x537960(0x1cd),()=>_0x3b239b[_0x537960(0x277)]['attempts']({'projectName':_0x43b54f,'workflowName':_0x582584,'includeRetried':_0x5df75c,'limit':_0x1c9e70[_0x537960(0x1d6)]}),{'verbose':_0x1c9e70[_0x537960(0x256)]}),_0x3d2827=_0x4cc0e9['data'],_0x4d732c=_0x1c9e70[_0x537960(0x1d6)]||0x64,_0x201690=_0x3d2827[_0x537960(0x2a1)]>=_0x4d732c?a42_0x35b1c5[_0x537960(0x2f8)](_0x537960(0x29f)):'';console['error'](_0x537960(0x229)+_0x3d2827[_0x537960(0x2a1)]+_0x537960(0x2b7)+(_0x3d2827['length']!==0x1?'s':'')+_0x201690);if(_0x1c9e70[_0x537960(0x25b)]===_0x537960(0x2b2)||_0x1c9e70[_0x537960(0x25b)]==='jsonl'||_0x1c9e70[_0x537960(0x25b)]===_0x537960(0x25c))await handleSDKOutput(_0x3d2827,_0x1c9e70);else{if(_0x3d2827['length']===0x0){if(_0x43b54f&&_0x582584)console[_0x537960(0x28d)]('No\x20attempts\x20found\x20for:\x20'+_0x43b54f+'.'+_0x582584);else _0x43b54f?console[_0x537960(0x28d)](_0x537960(0x2f6)+_0x43b54f):console['log'](_0x537960(0x21c));}else{const _0x11533f=_0x1c9e70[_0x537960(0x210)],_0xb9bab=_0x3d2827[_0x537960(0x1e8)](_0x2e3574=>{const _0x3c3259=_0x537960,_0x44a799=a42_0x35b1c5[_0x3c3259(0x2f8)]('#'+_0x2e3574['id']),_0x43adb7=_0x2e3574[_0x3c3259(0x2fd)]?.['id'],_0x10af19=_0x2e3574[_0x3c3259(0x21b)]||_0x2e3574[_0x3c3259(0x1cb)],_0x3bf902=_0x43adb7&&_0x10af19?hyperlink(_0x44a799,getWorkflowAttemptUrl(_0x11533f,_0x43adb7,_0x10af19,_0x2e3574['id'])):_0x44a799,{icon:_0x3c1d72,text:_0x100d29}=getAttemptStatusDisplay(_0x2e3574),_0x19423e=(_0x2e3574['project']?.[_0x3c3259(0x2f1)]||'?')+'.'+(_0x2e3574[_0x3c3259(0x277)]?.[_0x3c3259(0x2f1)]||'?'),_0x249ef9=_0x2e3574[_0x3c3259(0x1bd)]?a42_0x35b1c5[_0x3c3259(0x2f8)](_0x2e3574[_0x3c3259(0x1bd)]):'';return(_0x3bf902+'\x20'+_0x3c1d72+(_0x100d29?'\x20'+_0x100d29:'')+'\x20'+_0x19423e+'\x20'+_0x249ef9)['trimEnd']();});await writeOutput(_0xb9bab[_0x537960(0x2dc)]('\x0a'),_0x1c9e70[_0x537960(0x17e)],_0x537960(0x312));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a42_0x34064d(0x1fb);[a42_0x34064d(0x21a)]=a42_0x34064d(0x225);async['execute'](_0x11f78e){const _0x4fe7fa=a42_0x34064d,{options:_0x38f13c,args:_0x1c5575,tdx:_0x190b04}=_0x11f78e,_0x1875f5=_0x1c5575[0x0];if(!_0x1875f5)return console[_0x4fe7fa(0x1ed)](_0x4fe7fa(0x1c2)),0x1;_0x38f13c['verbose']&&console['error'](_0x4fe7fa(0x1e5)+_0x1875f5);const _0x4eb238=await withSpinner('Getting\x20attempt\x20details...',()=>_0x190b04['workflow'][_0x4fe7fa(0x307)](_0x1875f5),{'verbose':_0x38f13c[_0x4fe7fa(0x256)]}),_0x34b5ca=_0x4eb238['data'];let _0x1260bd;!_0x34b5ca[_0x4fe7fa(0x1a0)]?_0x1260bd=_0x34b5ca[_0x4fe7fa(0x1f1)]?_0x4fe7fa(0x22d):_0x4fe7fa(0x294):_0x1260bd=_0x34b5ca['success']?_0x4fe7fa(0x1a5):_0x4fe7fa(0x1ed);let _0x2562d9;if(_0x34b5ca['createdAt']&&_0x34b5ca['finishedAt']){const _0x4045a8=new Date(_0x34b5ca['createdAt'])[_0x4fe7fa(0x26f)](),_0x4669d6=new Date(_0x34b5ca[_0x4fe7fa(0x1b6)])[_0x4fe7fa(0x26f)]();_0x2562d9=Math['round']((_0x4669d6-_0x4045a8)/0x3e8);}const _0x2f0717={'attempt_id':_0x34b5ca['id'],'status':_0x1260bd,..._0x34b5ca[_0x4fe7fa(0x20b)]!==undefined&&{'index':_0x34b5ca[_0x4fe7fa(0x20b)]},..._0x34b5ca[_0x4fe7fa(0x2fd)]&&{'project':_0x34b5ca['project'][_0x4fe7fa(0x2f1)]},..._0x34b5ca[_0x4fe7fa(0x277)]&&{'workflow':_0x34b5ca[_0x4fe7fa(0x277)][_0x4fe7fa(0x2f1)]},..._0x34b5ca[_0x4fe7fa(0x1cb)]&&{'session_id':_0x34b5ca[_0x4fe7fa(0x1cb)]},..._0x34b5ca['sessionTime']&&{'session_time':_0x34b5ca[_0x4fe7fa(0x1bd)]},..._0x34b5ca['retryAttemptName']&&{'retry_attempt':_0x34b5ca[_0x4fe7fa(0x183)]},..._0x2562d9!==undefined&&{'duration_sec':_0x2562d9},..._0x34b5ca['createdAt']&&{'created_at':_0x34b5ca[_0x4fe7fa(0x31a)]},..._0x34b5ca[_0x4fe7fa(0x1b6)]&&{'finished_at':_0x34b5ca[_0x4fe7fa(0x1b6)]},...Object[_0x4fe7fa(0x2c6)](_0x34b5ca[_0x4fe7fa(0x203)])[_0x4fe7fa(0x2a1)]>0x0&&{'params':_0x34b5ca['params']}};return await handleSingleObjectOutput(_0x2f0717,_0x38f13c),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a42_0x34064d(0x306);[a42_0x34064d(0x21a)]=a42_0x34064d(0x231);async['execute'](_0x30ad4d){const _0x23f541=a42_0x34064d,{options:_0x453734,args:_0x1301a2,tdx:_0x4849bd}=_0x30ad4d,_0x3ce6bb=_0x1301a2[0x0];if(!_0x3ce6bb)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x26aa97=_0x453734['includeSubtasks'];_0x453734[_0x23f541(0x256)]&&(console[_0x23f541(0x1ed)](_0x23f541(0x1e5)+_0x3ce6bb),_0x26aa97&&console['error']('Including\x20subtasks:\x20yes'));const _0x45fdbd=await withSpinner(_0x23f541(0x292),()=>_0x4849bd['workflow'][_0x23f541(0x1e1)](_0x3ce6bb,_0x26aa97||![]),{'verbose':_0x453734['verbose']}),_0x1ffedd=_0x45fdbd[_0x23f541(0x2bb)];return console[_0x23f541(0x1ed)](_0x23f541(0x229)+_0x1ffedd[_0x23f541(0x2a1)]+_0x23f541(0x2d3)+(_0x1ffedd['length']!==0x1?'s':'')),await handleSDKOutput(_0x1ffedd,_0x453734),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a42_0x34064d(0x216);[a42_0x34064d(0x21a)]=a42_0x34064d(0x25e);async['execute'](_0x2024fc){const _0x4dc155=a42_0x34064d,{options:_0x4ed567,args:_0x5ccdb3,tdx:_0x3db64e}=_0x2024fc,_0x3f2056=_0x5ccdb3[0x0];let _0x3a6574=_0x5ccdb3[0x1];if(!_0x3f2056)return console[_0x4dc155(0x1ed)](_0x4dc155(0x1c2)),0x1;_0x4ed567[_0x4dc155(0x256)]&&(console[_0x4dc155(0x1ed)](_0x4dc155(0x1e5)+_0x3f2056),_0x3a6574&&console[_0x4dc155(0x1ed)](_0x4dc155(0x2fe)+_0x3a6574));const _0x94467c=await withSpinner(_0x4dc155(0x2be),()=>_0x3db64e[_0x4dc155(0x277)]['logFiles'](_0x3f2056,_0x3a6574),{'verbose':_0x4ed567[_0x4dc155(0x256)]}),_0x286552=_0x94467c[_0x4dc155(0x2bb)];if(_0x286552['length']===0x0)return console[_0x4dc155(0x1ed)](_0x4dc155(0x209)),0x0;if(!_0x3a6574&&(_0x4ed567[_0x4dc155(0x2b2)]||_0x4ed567[_0x4dc155(0x25b)]))return await handleSDKOutput(_0x286552,_0x4ed567),0x0;if(!_0x3a6574){const _0x5d3b5c=_0x286552[_0x4dc155(0x1e8)](_0x5867fe=>({'title':_0x5867fe[_0x4dc155(0x191)]+'\x20('+formatBytes(_0x5867fe[_0x4dc155(0x266)])+')','value':_0x5867fe[_0x4dc155(0x191)]})),_0x273f5d=await a42_0x40adc0({'type':_0x4dc155(0x2e9),'name':_0x4dc155(0x2ee),'message':_0x4dc155(0x2b0),'choices':_0x5d3b5c});if(!_0x273f5d[_0x4dc155(0x2ee)])return console[_0x4dc155(0x1ed)](_0x4dc155(0x265)),0x0;_0x3a6574=_0x273f5d[_0x4dc155(0x2ee)];}const _0x7e410c=await withSpinner(_0x4dc155(0x2c8),()=>_0x3db64e[_0x4dc155(0x277)][_0x4dc155(0x1ec)](_0x3f2056,_0x3a6574),{'verbose':_0x4ed567[_0x4dc155(0x256)]}),_0xadf6c9=_0x7e410c['data'];return _0xadf6c9?console['log'](_0xadf6c9):console['error'](_0x4dc155(0x181)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a42_0x34064d(0x1c1);[a42_0x34064d(0x21a)]=a42_0x34064d(0x2e7);async[a42_0x34064d(0x2d7)](_0x33d71e){const _0x34be09=a42_0x34064d,{options:_0x45a16c,args:_0x5878b2,tdx:_0x10c852}=_0x33d71e,_0x48c0b5=_0x5878b2[0x0];if(!_0x48c0b5)return console[_0x34be09(0x1ed)](_0x34be09(0x1c2)),0x1;const _0x5da472=_0x45a16c[_0x34be09(0x20f)];_0x45a16c[_0x34be09(0x256)]&&(console[_0x34be09(0x1ed)]('Attempt\x20ID:\x20'+_0x48c0b5),_0x5da472&&console[_0x34be09(0x1ed)]('Reason:\x20'+_0x5da472));if(!_0x45a16c[_0x34be09(0x2ac)]){if(!isInteractive())return console[_0x34be09(0x1ed)](a42_0x35b1c5[_0x34be09(0x304)](_0x34be09(0x2c1)),_0x34be09(0x2da)),console[_0x34be09(0x1ed)](a42_0x35b1c5[_0x34be09(0x2f8)](_0x34be09(0x21e))),0x1;const _0x353019=await confirmKey(_0x34be09(0x313)+_0x48c0b5+'?');if(!_0x353019)return console[_0x34be09(0x1ed)](a42_0x35b1c5[_0x34be09(0x2eb)]('Cancelled')),0x1;}const _0x4bab91=await withSpinner(_0x34be09(0x2e8),()=>_0x10c852[_0x34be09(0x277)][_0x34be09(0x2b6)](_0x48c0b5,_0x5da472),{'verbose':_0x45a16c['verbose']}),_0x4cc8a1=_0x4bab91[_0x34be09(0x2bb)];return console[_0x34be09(0x1ed)]('✔\x20'+_0x4cc8a1),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x34064d(0x2f1)]='workflow:retry';[a42_0x34064d(0x21a)]='Retry\x20a\x20session\x20or\x20attempt';async[a42_0x34064d(0x2d7)](_0x1a4766){const _0x3dfbb3=a42_0x34064d,{options:_0x7a7204,args:_0x2755bd,tdx:_0x23754b}=_0x1a4766,_0x289f57=_0x2755bd[0x0];if(!_0x289f57)return console[_0x3dfbb3(0x1ed)](_0x3dfbb3(0x2c4)),console[_0x3dfbb3(0x1ed)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x1f76a5=![],_0x287185=_0x289f57;if(_0x289f57[_0x3dfbb3(0x252)](_0x3dfbb3(0x1ae)))_0x1f76a5=!![],_0x287185=_0x289f57[_0x3dfbb3(0x1e6)](0x8);else{if(_0x289f57['startsWith']('attempt:'))_0x1f76a5=![],_0x287185=_0x289f57[_0x3dfbb3(0x1e6)](0x8);else return console[_0x3dfbb3(0x1ed)](_0x3dfbb3(0x196)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x5e8ec0=_0x7a7204[_0x3dfbb3(0x271)],_0x127b0d=_0x7a7204[_0x3dfbb3(0x1ce)],_0x33fd2b=_0x7a7204[_0x3dfbb3(0x203)],_0x56ecfb=_0x7a7204['force'];_0x7a7204[_0x3dfbb3(0x256)]&&(console[_0x3dfbb3(0x1ed)]('Target:\x20'+(_0x1f76a5?_0x3dfbb3(0x263):_0x3dfbb3(0x307))+'\x20'+_0x287185),_0x5e8ec0&&console['error'](_0x3dfbb3(0x233)+_0x5e8ec0),_0x127b0d&&console[_0x3dfbb3(0x1ed)](_0x3dfbb3(0x269)+_0x127b0d),_0x33fd2b&&console[_0x3dfbb3(0x1ed)](_0x3dfbb3(0x2b5)+_0x33fd2b),_0x56ecfb&&console[_0x3dfbb3(0x1ed)](_0x3dfbb3(0x1da)));let _0x2ca589;if(_0x33fd2b)try{if(_0x33fd2b[_0x3dfbb3(0x252)]('@')){const _0xa71f09=await import('fs/promises'),_0x29df68=_0x33fd2b['substring'](0x1),_0x283442=await _0xa71f09[_0x3dfbb3(0x1b3)](_0x29df68,'utf-8');_0x2ca589=JSON[_0x3dfbb3(0x24c)](_0x283442);}else _0x2ca589=JSON['parse'](_0x33fd2b);}catch{return console['error'](_0x3dfbb3(0x224)),0x1;}if(!_0x7a7204[_0x3dfbb3(0x2ac)]){if(!isInteractive())return console[_0x3dfbb3(0x1ed)](a42_0x35b1c5[_0x3dfbb3(0x304)](_0x3dfbb3(0x2c1)),_0x3dfbb3(0x2da)),console[_0x3dfbb3(0x1ed)](a42_0x35b1c5[_0x3dfbb3(0x2f8)](_0x3dfbb3(0x21e))),0x1;const _0x392ac2=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x1f76a5?_0x3dfbb3(0x263):'attempt')+'\x20'+_0x287185+'?');if(!_0x392ac2)return console[_0x3dfbb3(0x1ed)](a42_0x35b1c5[_0x3dfbb3(0x2eb)](_0x3dfbb3(0x265))),0x1;}let _0x12b1d0;_0x1f76a5?_0x12b1d0=await withSpinner('Retrying\x20session...',()=>_0x23754b['workflow'][_0x3dfbb3(0x272)](_0x287185,{'fromTask':_0x5e8ec0,'retryParams':_0x2ca589}),{'verbose':_0x7a7204[_0x3dfbb3(0x256)]}):_0x12b1d0=await withSpinner('Retrying\x20attempt...',()=>_0x23754b[_0x3dfbb3(0x277)][_0x3dfbb3(0x197)](_0x287185,{'resumeFrom':_0x127b0d,'retryParams':_0x2ca589,'force':_0x56ecfb}),{'verbose':_0x7a7204[_0x3dfbb3(0x256)]});const _0x17c946=_0x12b1d0[_0x3dfbb3(0x2bb)];return console['error'](_0x3dfbb3(0x285)),console[_0x3dfbb3(0x1ed)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x17c946[_0x3dfbb3(0x2d6)]),console[_0x3dfbb3(0x1ed)](_0x3dfbb3(0x1e9)+_0x17c946[_0x3dfbb3(0x1cb)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x22e);[a42_0x34064d(0x21a)]='Start\x20a\x20workflow\x20run';async[a42_0x34064d(0x2d7)](_0x5e284f){const _0x31f799=a42_0x34064d,{options:_0x1f6219,args:_0x2e802b,tdx:_0x39390a}=_0x5e284f;let _0x5bd59a=_0x2e802b[0x0];if(!_0x5bd59a){const _0x1058a3=this['resolveProject']([],_0x1f6219),_0x420a8b=await withSpinner('Loading\x20workflows...',()=>_0x39390a[_0x31f799(0x277)]['workflows'](_0x1058a3,{'limit':_0x1f6219[_0x31f799(0x1d6)]}),{'verbose':_0x1f6219[_0x31f799(0x256)]}),_0x1481c8=_0x420a8b[_0x31f799(0x2bb)];if(_0x1481c8[_0x31f799(0x2a1)]===0x0)return console['error']('No\x20workflows\x20found'),!_0x1058a3&&console['error'](a42_0x35b1c5[_0x31f799(0x2f8)](_0x31f799(0x201))),0x1;const _0x19f8ce=_0x1481c8[_0x31f799(0x1e8)](_0x433011=>({'title':_0x433011[_0x31f799(0x2fd)]?.[_0x31f799(0x2f1)]+'.'+_0x433011[_0x31f799(0x2f1)],'value':_0x433011[_0x31f799(0x2fd)]?.[_0x31f799(0x2f1)]+'.'+_0x433011[_0x31f799(0x2f1)],'description':_0x433011[_0x31f799(0x1e0)]?_0x31f799(0x20e)+_0x433011[_0x31f799(0x1e0)]:undefined})),_0x4ed80a=await a42_0x40adc0({'type':_0x31f799(0x2e9),'name':_0x31f799(0x277),'message':_0x31f799(0x18f),'choices':_0x19f8ce});if(!_0x4ed80a[_0x31f799(0x277)])return 0x1;_0x5bd59a=_0x4ed80a['workflow'];}if(!_0x5bd59a['includes']('.')){const _0x25cc9f=this[_0x31f799(0x18c)]([],_0x1f6219);if(_0x25cc9f)_0x5bd59a=_0x25cc9f+'.'+_0x5bd59a;else return console[_0x31f799(0x1ed)](a42_0x35b1c5[_0x31f799(0x304)](_0x31f799(0x2cb)),_0x31f799(0x28f)),console[_0x31f799(0x1ed)](a42_0x35b1c5[_0x31f799(0x2f8)](_0x31f799(0x201))),0x1;}const _0x399777=_0x1f6219['param'],_0x221e8b=_0x1f6219['sessionTime'],_0x41d943={};if(_0x399777&&Array[_0x31f799(0x251)](_0x399777))for(const _0x385252 of _0x399777){const _0x135b3f=_0x385252[_0x31f799(0x17c)]('=');if(_0x135b3f===-0x1)return console[_0x31f799(0x1ed)](_0x31f799(0x23b)+_0x385252),console['error'](_0x31f799(0x2e3)),0x1;const _0x3014c6=_0x385252['substring'](0x0,_0x135b3f),_0x5f42c0=_0x385252[_0x31f799(0x1e6)](_0x135b3f+0x1);try{_0x41d943[_0x3014c6]=JSON[_0x31f799(0x24c)](_0x5f42c0);}catch{_0x41d943[_0x3014c6]=_0x5f42c0;}}_0x1f6219['verbose']&&(console[_0x31f799(0x1ed)](_0x31f799(0x1a1)+_0x5bd59a),Object[_0x31f799(0x2c6)](_0x41d943)[_0x31f799(0x2a1)]>0x0&&console[_0x31f799(0x1ed)](_0x31f799(0x30b)+JSON[_0x31f799(0x30e)](_0x41d943)),_0x221e8b&&console['error'](_0x31f799(0x1e4)+_0x221e8b));const _0x3d2f63=await withSpinner(_0x31f799(0x221),()=>_0x39390a[_0x31f799(0x277)][_0x31f799(0x242)](_0x5bd59a,_0x41d943,{'sessionTime':_0x221e8b}),{'verbose':_0x1f6219[_0x31f799(0x256)]}),_0x1cd21b=_0x3d2f63['data'];console[_0x31f799(0x1ed)](_0x31f799(0x1aa)),console[_0x31f799(0x1ed)](_0x31f799(0x28c)+_0x1cd21b['id']),console[_0x31f799(0x1ed)](_0x31f799(0x1e9)+_0x1cd21b[_0x31f799(0x1cb)]),console[_0x31f799(0x1ed)](_0x31f799(0x249)+_0x1cd21b[_0x31f799(0x2fd)]?.[_0x31f799(0x2f1)]),console[_0x31f799(0x1ed)]('\x20\x20Workflow:\x20'+_0x1cd21b[_0x31f799(0x277)]?.[_0x31f799(0x2f1)]);if(_0x1cd21b[_0x31f799(0x2fd)]?.['id']&&_0x1cd21b[_0x31f799(0x1cb)]&&_0x1cd21b['id']){const _0x510729=_0x1f6219['site'],_0x434c6c=getConsoleUrl(_0x510729,_0x31f799(0x2fa)+_0x1cd21b[_0x31f799(0x2fd)]['id']+_0x31f799(0x22a)+_0x1cd21b[_0x31f799(0x1cb)]+_0x31f799(0x27f)+_0x1cd21b['id']);console['error'](_0x31f799(0x2ad)+a42_0x35b1c5[_0x31f799(0x1dd)](_0x434c6c));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']='workflow:download';[a42_0x34064d(0x21a)]=a42_0x34064d(0x17a);async[a42_0x34064d(0x2d7)](_0x1e4896){const _0x4c4515=a42_0x34064d,{options:_0x50db47,args:_0x131033,tdx:_0x1dd2bb}=_0x1e4896,_0x415737=_0x131033[0x0],_0x3b1177=_0x131033[0x1]||'.';if(!_0x415737)return console[_0x4c4515(0x1ed)](_0x4c4515(0x26a)),console[_0x4c4515(0x1ed)](_0x4c4515(0x1bc)),0x1;const _0xc9767c=_0x50db47[_0x4c4515(0x1e0)];_0x50db47[_0x4c4515(0x256)]&&(console[_0x4c4515(0x1ed)](_0x4c4515(0x30c)+_0x415737),console[_0x4c4515(0x1ed)](_0x4c4515(0x27b)+_0x3b1177),_0xc9767c&&console[_0x4c4515(0x1ed)](_0x4c4515(0x299)+_0xc9767c));const _0x483e42=await withSpinner(_0x4c4515(0x1fc)+_0x415737+_0x4c4515(0x226),()=>_0x1dd2bb[_0x4c4515(0x277)][_0x4c4515(0x1a8)](_0x415737,_0x3b1177,{'revision':_0xc9767c}),{'verbose':_0x50db47[_0x4c4515(0x256)]}),_0x20d30a=_0x483e42['data'];return console['error'](_0x4c4515(0x24d)+_0x20d30a[_0x4c4515(0x1b5)]),console[_0x4c4515(0x1ed)](_0x4c4515(0x283)+_0x20d30a[_0x4c4515(0x1e0)]),console[_0x4c4515(0x1ed)]('\x20\x20Files\x20extracted:\x20'+_0x20d30a[_0x4c4515(0x241)]),console[_0x4c4515(0x1ed)]('\x20\x20Location:\x20'+_0x3b1177+'/'+_0x20d30a[_0x4c4515(0x1b5)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x246);[a42_0x34064d(0x21a)]=a42_0x34064d(0x2ce);async['execute'](_0x167df9){const _0x27148b=a42_0x34064d,{options:_0x59146e,args:_0x23ca78,tdx:_0x1fe616}=_0x167df9;let _0xd2e79e='.',_0x2ae9e2=_0x59146e[_0x27148b(0x2f1)];if(_0x23ca78[0x0]){const {promises:_0x188943}=await import('fs');try{const _0x49ff2f=await _0x188943[_0x27148b(0x1a4)](_0x23ca78[0x0]);if(_0x49ff2f[_0x27148b(0x2d4)]())_0xd2e79e=_0x23ca78[0x0];else return console[_0x27148b(0x1ed)](_0x27148b(0x297)+_0x23ca78[0x0]+_0x27148b(0x2ae)),0x1;}catch{_0x2ae9e2=_0x23ca78[0x0],_0xd2e79e='.';}}const _0x5a437b=_0x59146e[_0x27148b(0x1e0)],_0x12a7cb=_0x59146e[_0x27148b(0x1d5)];_0x59146e[_0x27148b(0x256)]&&(console['error']('Project\x20directory:\x20'+_0xd2e79e),_0x2ae9e2&&console[_0x27148b(0x1ed)]('Project\x20name:\x20'+_0x2ae9e2),_0x5a437b&&console['error'](_0x27148b(0x299)+_0x5a437b),_0x12a7cb&&console[_0x27148b(0x1ed)](_0x27148b(0x2a5)));const _0x59dcc3=await withSpinner(_0x27148b(0x289),()=>_0x1fe616[_0x27148b(0x277)][_0x27148b(0x214)](_0xd2e79e,{'projectName':_0x2ae9e2,'revision':_0x5a437b,'skipValidation':_0x12a7cb}),{'verbose':_0x59146e[_0x27148b(0x256)]}),_0x43682a=_0x59dcc3[_0x27148b(0x2bb)];return console[_0x27148b(0x1ed)]('✔\x20Pushed\x20'+_0x43682a[_0x27148b(0x1b5)]),console['error'](_0x27148b(0x1ca)+_0x43682a[_0x27148b(0x29b)]),console['error'](_0x27148b(0x283)+_0x43682a[_0x27148b(0x1e0)]),await this[_0x27148b(0x1f0)](_0x1fe616,_0x43682a[_0x27148b(0x1b5)],_0x59146e['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x34064d(0x2f1)]='workflow:pull';[a42_0x34064d(0x21a)]=a42_0x34064d(0x305);async['execute'](_0x55be35){const _0x451691=a42_0x34064d,{options:_0xa226e,args:_0x1c3ee1,tdx:_0x485709}=_0x55be35,_0xa0191e=_0x1c3ee1[0x0],_0x466a7c=_0x1c3ee1[0x1];if(!_0xa0191e)return console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x304)](_0x451691(0x2cb)),_0x451691(0x2d9)),console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x2f8)](_0x451691(0x2a4))),0x1;const _0x4d1144=_0xa226e['revision'];_0xa226e[_0x451691(0x256)]&&(console[_0x451691(0x1ed)](_0x451691(0x30c)+_0xa0191e),_0x466a7c&&console[_0x451691(0x1ed)](_0x451691(0x2d1)+_0x466a7c),_0x4d1144&&console[_0x451691(0x1ed)](_0x451691(0x299)+_0x4d1144),_0xa226e[_0x451691(0x24f)]&&console[_0x451691(0x1ed)](_0x451691(0x184)));const _0x327f5b=await withSpinner('Pulling\x20project\x20'+_0xa0191e+'...',()=>_0x485709['workflow'][_0x451691(0x262)](_0xa0191e,{'targetDir':_0x466a7c,'revision':_0x4d1144}),{'verbose':_0xa226e[_0x451691(0x256)]}),_0x1d4c5a=_0x327f5b[_0x451691(0x2bb)];_0x1d4c5a['isNewProject']?console[_0x451691(0x1ed)]('→\x20New\x20project:\x20'+_0x1d4c5a['projectName']):console[_0x451691(0x1ed)](_0x451691(0x282)+_0x1d4c5a[_0x451691(0x1b5)]);console['error'](_0x451691(0x283)+_0x1d4c5a[_0x451691(0x1e0)]),console[_0x451691(0x1ed)]('\x20\x20Target:\x20'+(a42_0x1ccec2[_0x451691(0x218)](process[_0x451691(0x2f2)](),_0x1d4c5a[_0x451691(0x267)])||'.')),console['error'](_0x451691(0x318)+a42_0x35b1c5[_0x451691(0x250)]('+'+_0x1d4c5a['summary']['new']+_0x451691(0x1c6))+',\x20'+(a42_0x35b1c5[_0x451691(0x2eb)]('~'+_0x1d4c5a['summary'][_0x451691(0x308)]+'\x20modified')+',\x20')+(a42_0x35b1c5['red']('-'+_0x1d4c5a[_0x451691(0x17b)][_0x451691(0x2bd)]+_0x451691(0x24b))+',\x20')+(''+a42_0x35b1c5[_0x451691(0x2f8)](_0x1d4c5a[_0x451691(0x17b)][_0x451691(0x1ea)]+_0x451691(0x217))));for(const _0x177b84 of _0x1d4c5a[_0x451691(0x187)]){_0x177b84['type']==='modified'&&_0x177b84[_0x451691(0x268)]&&(console['error']('\x0a'+a42_0x35b1c5['cyan'](_0x451691(0x240)+_0x177b84[_0x451691(0x255)])),console['error'](_0x177b84['diff']));}if(!_0x1d4c5a[_0x451691(0x211)])return saveSessionContext({'workflow_project':_0x1d4c5a[_0x451691(0x1b5)]},_0xa226e[_0x451691(0x263)]),console[_0x451691(0x1ed)](a42_0x35b1c5['green'](_0x451691(0x227))),console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x2f8)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1d4c5a[_0x451691(0x1b5)])),0x0;if(_0xa226e[_0x451691(0x24f)])return console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x2eb)](_0x451691(0x2fc))),0x0;if(!_0xa226e[_0x451691(0x2ac)]){if(!isInteractive())return console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x304)]('\x0aError:'),_0x451691(0x2da)),console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x2f8)](_0x451691(0x21e))),0x1;const _0x15d81a=await confirmKey(_0x451691(0x28e));if(!_0x15d81a)return console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x2eb)](_0x451691(0x265)),'-\x20no\x20files\x20written'),0x1;}await withSpinner('Writing\x20files...',()=>_0x485709[_0x451691(0x277)]['applyPullProject'](_0x1d4c5a,{'revision':_0x4d1144}),{'verbose':_0xa226e[_0x451691(0x256)]}),saveSessionContext({'workflow_project':_0x1d4c5a['projectName']},_0xa226e['session']),console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x250)](_0x451691(0x1ee)));const _0x26e582=a42_0x1ccec2['relative'](process[_0x451691(0x2f2)](),_0x1d4c5a[_0x451691(0x267)])||'.';return console['error'](a42_0x35b1c5[_0x451691(0x2f8)]('\x20\x20Location:\x20'+_0x26e582)),console[_0x451691(0x1ed)](a42_0x35b1c5[_0x451691(0x2f8)](_0x451691(0x19d)+_0x1d4c5a[_0x451691(0x1b5)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x2f5);[a42_0x34064d(0x21a)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async['execute'](_0x4d02ea){const _0x3ec798=a42_0x34064d,{options:_0x1da18d,args:_0x38ac7b,tdx:_0x3d8529}=_0x4d02ea,_0x424e74=this[_0x3ec798(0x261)](_0x38ac7b,_0x1da18d),_0x22836d=_0x1da18d[_0x3ec798(0x1e0)],_0x570da2=_0x1da18d[_0x3ec798(0x1d5)];_0x1da18d[_0x3ec798(0x256)]&&(_0x424e74&&console[_0x3ec798(0x1ed)]('Source\x20directory:\x20'+_0x424e74),_0x22836d&&console[_0x3ec798(0x1ed)](_0x3ec798(0x299)+_0x22836d),_0x1da18d[_0x3ec798(0x24f)]&&console['error'](_0x3ec798(0x184)),_0x570da2&&console[_0x3ec798(0x1ed)]('Validation:\x20skipped'));let _0x4d4244;try{_0x4d4244=await withSpinner(_0x3ec798(0x27c),()=>_0x3d8529[_0x3ec798(0x277)][_0x3ec798(0x315)]({'sourceDir':_0x424e74,'revision':_0x22836d,'skipValidation':_0x570da2}),{'verbose':_0x1da18d[_0x3ec798(0x256)]});}catch(_0x538d1c){if(_0x538d1c instanceof Error&&_0x538d1c['message'][_0x3ec798(0x291)](_0x3ec798(0x219)))return console[_0x3ec798(0x1ed)](a42_0x35b1c5['red']('Error:'),_0x3ec798(0x222)),_0x1da18d[_0x3ec798(0x303)]?console[_0x3ec798(0x1ed)](a42_0x35b1c5[_0x3ec798(0x2f8)](_0x3ec798(0x2c7)+_0x1da18d[_0x3ec798(0x303)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x1da18d[_0x3ec798(0x303)]+'\x27')):console[_0x3ec798(0x1ed)](a42_0x35b1c5['dim'](_0x3ec798(0x20c))),0x1;throw _0x538d1c;}const _0x59116e=_0x4d4244['data'];console[_0x3ec798(0x1ed)](_0x3ec798(0x1b2)+_0x59116e[_0x3ec798(0x1b5)]),console[_0x3ec798(0x1ed)](_0x3ec798(0x182)+_0x59116e['sourceDir']),console[_0x3ec798(0x1ed)](_0x3ec798(0x283)+_0x59116e[_0x3ec798(0x1e0)]),console[_0x3ec798(0x1ed)](_0x3ec798(0x318)+a42_0x35b1c5[_0x3ec798(0x250)]('+'+_0x59116e[_0x3ec798(0x17b)]['new']+'\x20new')+',\x20'+(a42_0x35b1c5[_0x3ec798(0x2eb)]('~'+_0x59116e[_0x3ec798(0x17b)][_0x3ec798(0x308)]+'\x20modified')+',\x20')+(a42_0x35b1c5[_0x3ec798(0x304)]('-'+_0x59116e[_0x3ec798(0x17b)][_0x3ec798(0x2bd)]+_0x3ec798(0x24b))+',\x20')+(''+a42_0x35b1c5[_0x3ec798(0x2f8)](_0x59116e['summary']['unchanged']+_0x3ec798(0x217))));for(const _0x14270a of _0x59116e['changes']){_0x14270a[_0x3ec798(0x1c4)]===_0x3ec798(0x308)&&_0x14270a['diff']&&(console[_0x3ec798(0x1ed)]('\x0a'+a42_0x35b1c5[_0x3ec798(0x1dd)](_0x3ec798(0x240)+_0x14270a[_0x3ec798(0x255)])),console[_0x3ec798(0x1ed)](_0x14270a['diff']));}if(!_0x59116e[_0x3ec798(0x211)])return console[_0x3ec798(0x1ed)](a42_0x35b1c5['green'](_0x3ec798(0x1d4))),await this['showWorkflowConsoleUrl'](_0x3d8529,_0x59116e[_0x3ec798(0x1b5)],_0x1da18d[_0x3ec798(0x210)]),0x0;if(_0x1da18d[_0x3ec798(0x24f)])return console[_0x3ec798(0x1ed)](a42_0x35b1c5['yellow'](_0x3ec798(0x274))),0x0;if(!_0x1da18d[_0x3ec798(0x2ac)]){if(!isInteractive())return console[_0x3ec798(0x1ed)](a42_0x35b1c5[_0x3ec798(0x304)](_0x3ec798(0x2c1)),_0x3ec798(0x2da)),console['error'](a42_0x35b1c5[_0x3ec798(0x2f8)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3bfb84=await confirmKey(_0x3ec798(0x17d));if(!_0x3bfb84)return console[_0x3ec798(0x1ed)](a42_0x35b1c5[_0x3ec798(0x2eb)]('Cancelled'),_0x3ec798(0x1a7)),0x1;}const _0x43239a=await withSpinner(_0x3ec798(0x290),()=>_0x3d8529[_0x3ec798(0x277)]['executePushProject'](_0x59116e),{'verbose':_0x1da18d['verbose']}),_0x54440b=_0x43239a['data'];return console[_0x3ec798(0x1ed)](a42_0x35b1c5[_0x3ec798(0x250)](_0x3ec798(0x205))),console[_0x3ec798(0x1ed)](_0x3ec798(0x1ca)+_0x54440b[_0x3ec798(0x29b)]),console['error'](_0x3ec798(0x283)+_0x54440b['revision']),await this[_0x3ec798(0x1f0)](_0x3d8529,_0x54440b[_0x3ec798(0x1b5)],_0x1da18d['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]='workflow:clone';[a42_0x34064d(0x21a)]=a42_0x34064d(0x1ab);async[a42_0x34064d(0x2d7)](_0x4f2aa2){const _0x1ed232=a42_0x34064d,{options:_0x38aa51,args:_0x91a95d,tdx:_0x681e3d}=_0x4f2aa2,_0x837ef0=this[_0x1ed232(0x261)](_0x91a95d,_0x38aa51),_0x1d1733=_0x38aa51[_0x1ed232(0x2f1)],_0x7f37ab=_0x38aa51[_0x1ed232(0x1e0)],_0x9f3bf2=_0x38aa51['skipValidation'];if(!_0x837ef0)return console[_0x1ed232(0x1ed)](a42_0x35b1c5[_0x1ed232(0x304)](_0x1ed232(0x2cb)),'Source\x20directory\x20is\x20required'),console['error'](a42_0x35b1c5[_0x1ed232(0x2f8)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console['error'](a42_0x35b1c5[_0x1ed232(0x2f8)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x1d1733)return console[_0x1ed232(0x1ed)](a42_0x35b1c5[_0x1ed232(0x304)](_0x1ed232(0x2cb)),_0x1ed232(0x230)),console[_0x1ed232(0x1ed)](a42_0x35b1c5[_0x1ed232(0x2f8)](_0x1ed232(0x1ef))),0x1;_0x38aa51[_0x1ed232(0x256)]&&(console[_0x1ed232(0x1ed)]('Source\x20directory:\x20'+_0x837ef0),console[_0x1ed232(0x1ed)]('New\x20project\x20name:\x20'+_0x1d1733),_0x7f37ab&&console[_0x1ed232(0x1ed)](_0x1ed232(0x299)+_0x7f37ab),_0x38aa51[_0x1ed232(0x24f)]&&console[_0x1ed232(0x1ed)]('Dry\x20run:\x20yes'),_0x9f3bf2&&console['error']('Validation:\x20skipped'));const _0xa7ab2=await withSpinner(_0x1ed232(0x29d),()=>_0x681e3d['workflow'][_0x1ed232(0x1d2)](_0x837ef0,_0x1d1733,{'revision':_0x7f37ab,'skipValidation':_0x9f3bf2}),{'verbose':_0x38aa51['verbose']}),_0x41c32f=_0xa7ab2[_0x1ed232(0x2bb)];console[_0x1ed232(0x1ed)](_0x1ed232(0x223)+_0x41c32f[_0x1ed232(0x2ba)]);_0x41c32f[_0x1ed232(0x279)]&&console[_0x1ed232(0x1ed)]('Source\x20project:\x20'+_0x41c32f[_0x1ed232(0x279)]);console[_0x1ed232(0x1ed)]('New\x20project\x20name:\x20'+_0x41c32f['newProjectName']),console[_0x1ed232(0x1ed)]('Revision:\x20'+_0x41c32f[_0x1ed232(0x1e0)]),console[_0x1ed232(0x1ed)](_0x1ed232(0x2cd)+_0x41c32f['fileCount']);_0x41c32f[_0x1ed232(0x273)]&&(console[_0x1ed232(0x1ed)](a42_0x35b1c5['yellow'](_0x1ed232(0x1de)+_0x41c32f[_0x1ed232(0x188)]+_0x1ed232(0x202)+_0x41c32f[_0x1ed232(0x1db)]+')')),console[_0x1ed232(0x1ed)](a42_0x35b1c5[_0x1ed232(0x2eb)](_0x1ed232(0x2c2))));if(_0x38aa51['dryRun'])return console[_0x1ed232(0x1ed)](a42_0x35b1c5[_0x1ed232(0x2eb)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x38aa51[_0x1ed232(0x2ac)]){if(!isInteractive())return console[_0x1ed232(0x1ed)](a42_0x35b1c5[_0x1ed232(0x304)](_0x1ed232(0x2c1)),_0x1ed232(0x2da)),console[_0x1ed232(0x1ed)](a42_0x35b1c5[_0x1ed232(0x2f8)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1614d7=_0x41c32f[_0x1ed232(0x279)]||a42_0x1ccec2[_0x1ed232(0x2c9)](_0x837ef0),_0x2fde3f=_0x41c32f[_0x1ed232(0x273)]?_0x1ed232(0x1a3)+_0x1d1733+'\x22\x20with\x20new\x20revision?':_0x1ed232(0x2ed)+_0x1614d7+'\x22\x20to\x20new\x20project\x20\x22'+_0x1d1733+'\x22?',_0x1afebb=await confirmKey(_0x2fde3f);if(!_0x1afebb)return console[_0x1ed232(0x1ed)](a42_0x35b1c5['yellow'](_0x1ed232(0x265))),0x1;}const _0x2484bc=await withSpinner(_0x41c32f['targetExists']?_0x1ed232(0x1d0)+_0x1d1733+'...':'Cloning\x20to\x20'+_0x1d1733+_0x1ed232(0x226),()=>_0x681e3d[_0x1ed232(0x277)][_0x1ed232(0x1fa)](_0x41c32f),{'verbose':_0x38aa51[_0x1ed232(0x256)]}),_0x1cbe54=_0x2484bc[_0x1ed232(0x2bb)];return console['error'](a42_0x35b1c5[_0x1ed232(0x250)](_0x41c32f[_0x1ed232(0x273)]?_0x1ed232(0x2a0):_0x1ed232(0x1dc))),console[_0x1ed232(0x1ed)](_0x1ed232(0x249)+_0x1cbe54[_0x1ed232(0x188)]),console[_0x1ed232(0x1ed)]('\x20\x20Project\x20ID:\x20'+_0x1cbe54[_0x1ed232(0x200)]),console['error'](_0x1ed232(0x283)+_0x1cbe54[_0x1ed232(0x1e0)]),await this[_0x1ed232(0x1f0)](_0x681e3d,_0x1cbe54['newProjectName'],_0x38aa51['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x22f);['description']=a42_0x34064d(0x18b);async[a42_0x34064d(0x2d7)](_0x4fbb97){const _0x43374f=a42_0x34064d,{options:_0x6c6140,args:_0x5d94d5,tdx:_0x27bf19}=_0x4fbb97,_0x449b6d=_0x5d94d5[0x0];if(!_0x449b6d)return console[_0x43374f(0x1ed)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console['error'](_0x43374f(0x1bb)),0x1;_0x6c6140[_0x43374f(0x256)]&&console[_0x43374f(0x1ed)](_0x43374f(0x30c)+_0x449b6d);if(!_0x6c6140[_0x43374f(0x2ac)]){if(!isInteractive())return console[_0x43374f(0x1ed)](a42_0x35b1c5[_0x43374f(0x304)](_0x43374f(0x2c1)),_0x43374f(0x2da)),console[_0x43374f(0x1ed)](a42_0x35b1c5[_0x43374f(0x2f8)](_0x43374f(0x21e))),0x1;const _0x5bb8ac=await confirmKey(_0x43374f(0x30f)+_0x449b6d+_0x43374f(0x248));if(!_0x5bb8ac)return console[_0x43374f(0x1ed)](a42_0x35b1c5[_0x43374f(0x2eb)](_0x43374f(0x265))),0x1;}const _0x224cc7=await withSpinner(_0x43374f(0x2e4)+_0x449b6d+_0x43374f(0x226),()=>_0x27bf19[_0x43374f(0x277)]['delete'](_0x449b6d),{'verbose':_0x6c6140[_0x43374f(0x256)]}),_0xf0aa96=_0x224cc7[_0x43374f(0x2bb)];return console[_0x43374f(0x1ed)](_0x43374f(0x276)+_0xf0aa96[_0x43374f(0x1b5)]),console[_0x43374f(0x1ed)](_0x43374f(0x1ca)+_0xf0aa96['projectId']),0x0;}}export function parseKeyValue(_0x42d4bb){const _0x48bf34=a42_0x34064d,_0x5ecadf=_0x42d4bb[_0x48bf34(0x17c)]('=');if(_0x5ecadf===-0x1)throw new Error(_0x48bf34(0x1a6)+_0x42d4bb+_0x48bf34(0x234));const _0x39b6bb=_0x42d4bb[_0x48bf34(0x1e6)](0x0,_0x5ecadf),_0x1eaac9=_0x42d4bb[_0x48bf34(0x1e6)](_0x5ecadf+0x1);if(!_0x39b6bb)throw new Error(_0x48bf34(0x2a2));return{'key':_0x39b6bb,'value':_0x1eaac9};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x258);[a42_0x34064d(0x21a)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0x34064d(0x2d7)](_0x251bca){const _0x3de2c9=a42_0x34064d,{options:_0xc0119f,args:_0x6161cd,tdx:_0x9c6939}=_0x251bca,_0x4fec14=this[_0x3de2c9(0x316)](_0x6161cd,_0xc0119f);if(!_0x4fec14)return 0x1;_0xc0119f['verbose']&&console[_0x3de2c9(0x1ed)]('Project:\x20'+_0x4fec14);const _0x461724=await withSpinner(_0x3de2c9(0x30d),()=>_0x9c6939['workflow']['listSecrets'](_0x4fec14),{'verbose':_0xc0119f[_0x3de2c9(0x256)]}),{secrets:_0x520b8b}=_0x461724[_0x3de2c9(0x2bb)];return console['error']('✔\x20Found\x20'+_0x520b8b[_0x3de2c9(0x2a1)]+_0x3de2c9(0x1c7)+(_0x520b8b['length']!==0x1?'s':'')),await handleSDKOutput(_0x520b8b,_0xc0119f),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x311);['description']=a42_0x34064d(0x27d);async[a42_0x34064d(0x2d7)](_0x288fca){const _0x4228b2=a42_0x34064d,{options:_0x390eea,args:_0x49a239,tdx:_0x273bf6}=_0x288fca;let _0x34559a,_0x375e6f;if(_0x49a239['length']>=0x2)_0x34559a=_0x49a239[0x0],_0x375e6f=_0x49a239[0x1];else{if(_0x49a239[_0x4228b2(0x2a1)]===0x1&&_0x390eea[_0x4228b2(0x303)])_0x34559a=_0x390eea[_0x4228b2(0x303)],_0x375e6f=_0x49a239[0x0];else return _0x49a239[_0x4228b2(0x2a1)]===0x1?(console['error'](_0x4228b2(0x26a)),console['error'](_0x4228b2(0x201)),0x1):(console[_0x4228b2(0x1ed)](_0x4228b2(0x220)),console[_0x4228b2(0x1ed)](_0x4228b2(0x23a)),0x1);}let _0x34f3de,_0x3900ab;try{({key:_0x34f3de,value:_0x3900ab}=parseKeyValue(_0x375e6f));}catch(_0x1c56ca){return _0x1c56ca instanceof Error&&console[_0x4228b2(0x1ed)](a42_0x35b1c5[_0x4228b2(0x304)](_0x4228b2(0x2cb)),_0x1c56ca[_0x4228b2(0x2c3)]),0x1;}_0x390eea[_0x4228b2(0x256)]&&(console['error'](_0x4228b2(0x30c)+_0x34559a),console[_0x4228b2(0x1ed)]('Key:\x20'+_0x34f3de));const _0x3dca0a=await withSpinner(_0x4228b2(0x22c),()=>_0x273bf6[_0x4228b2(0x277)][_0x4228b2(0x259)](_0x34559a,_0x34f3de,_0x3900ab),{'verbose':_0x390eea[_0x4228b2(0x256)]}),_0x1ad34a=_0x3dca0a[_0x4228b2(0x2bb)];return console[_0x4228b2(0x1ed)](_0x4228b2(0x1af)+_0x1ad34a[_0x4228b2(0x22b)]+_0x4228b2(0x2a7)+_0x1ad34a['projectName']+'\x27'),(_0x390eea[_0x4228b2(0x2b2)]||_0x390eea[_0x4228b2(0x298)])&&await handleSingleObjectOutput(_0x1ad34a,_0x390eea),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x34064d(0x2f1)]=a42_0x34064d(0x1c8);['description']='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async['execute'](_0x21493d){const _0x5bf797=a42_0x34064d,{options:_0x322740,args:_0x19a35d,tdx:_0x380fdc}=_0x21493d;let _0x5702e0,_0x5ea8ac;if(_0x19a35d['length']>=0x2)_0x5702e0=_0x19a35d[0x0],_0x5ea8ac=_0x19a35d[0x1];else{if(_0x19a35d['length']===0x1&&_0x322740[_0x5bf797(0x303)])_0x5702e0=_0x322740['workflowProject'],_0x5ea8ac=_0x19a35d[0x0];else return _0x19a35d[_0x5bf797(0x2a1)]===0x1?(console[_0x5bf797(0x1ed)](_0x5bf797(0x26a)),console[_0x5bf797(0x1ed)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x5bf797(0x1ed)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x5bf797(0x1ed)](_0x5bf797(0x17f)),0x1);}_0x322740[_0x5bf797(0x256)]&&(console[_0x5bf797(0x1ed)]('Project:\x20'+_0x5702e0),console[_0x5bf797(0x1ed)](_0x5bf797(0x237)+_0x5ea8ac));if(!_0x322740[_0x5bf797(0x2ac)]){if(!isInteractive())return console[_0x5bf797(0x1ed)](a42_0x35b1c5[_0x5bf797(0x304)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5bf797(0x1ed)](a42_0x35b1c5[_0x5bf797(0x2f8)](_0x5bf797(0x21e))),0x1;const _0x34d75a=await confirmKey(_0x5bf797(0x2df)+_0x5ea8ac+_0x5bf797(0x264)+_0x5702e0+'\x27?');if(!_0x34d75a)return console[_0x5bf797(0x1ed)](a42_0x35b1c5[_0x5bf797(0x2eb)](_0x5bf797(0x265))),0x1;}const _0x1eb139=await withSpinner(_0x5bf797(0x1b0),()=>_0x380fdc[_0x5bf797(0x277)][_0x5bf797(0x23f)](_0x5702e0,_0x5ea8ac),{'verbose':_0x322740[_0x5bf797(0x256)]}),_0x41bb64=_0x1eb139[_0x5bf797(0x2bb)];return console[_0x5bf797(0x1ed)](_0x5bf797(0x1af)+_0x41bb64[_0x5bf797(0x22b)]+_0x5bf797(0x27e)+_0x41bb64['projectName']+'\x27'),(_0x322740['json']||_0x322740[_0x5bf797(0x298)])&&await handleSingleObjectOutput(_0x41bb64,_0x322740),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(_0x20fbb3){const _0x301fe8=a42_0x34064d,_0x34e391=Math[_0x301fe8(0x1ba)](_0x20fbb3/0x3e8),_0x35e689=Math[_0x301fe8(0x1ba)](_0x34e391/0x3c),_0x818882=Math['floor'](_0x35e689/0x3c),_0x56a540=Math[_0x301fe8(0x1ba)](_0x818882/0x18);if(_0x56a540>0x0){const _0xc250f5=_0x818882%0x18;return _0xc250f5>0x0?_0x56a540+'d\x20'+_0xc250f5+'h':_0x56a540+'d';}else{if(_0x818882>0x0){const _0x10e3b1=_0x35e689%0x3c;return _0x10e3b1>0x0?_0x818882+'h\x20'+_0x10e3b1+'m':_0x818882+'h';}else{if(_0x35e689>0x0){const _0x2f4009=_0x34e391%0x3c;return _0x2f4009>0x0?_0x35e689+'m\x20'+_0x2f4009+'s':_0x35e689+'m';}else return _0x34e391+'s';}}}function formatTimestamp(_0x3f448a,_0x13d5ee){const _0x351224=a42_0x34064d,_0x2543db=new Date(_0x3f448a),_0x179cae=String(_0x2543db[_0x351224(0x2d8)]())['padStart'](0x2,'0'),_0x3d075b=String(_0x2543db[_0x351224(0x1f7)]())[_0x351224(0x295)](0x2,'0'),_0xaa4193=_0x179cae+':'+_0x3d075b,_0x11bd4e=_0x2543db['getFullYear']()===_0x13d5ee[_0x351224(0x28b)]()&&_0x2543db[_0x351224(0x1d3)]()===_0x13d5ee[_0x351224(0x1d3)]()&&_0x2543db[_0x351224(0x1ff)]()===_0x13d5ee[_0x351224(0x1ff)]();if(_0x11bd4e)return _0xaa4193;else{const _0x16e125=String(_0x2543db['getMonth']()+0x1)[_0x351224(0x295)](0x2,'0'),_0x8d0f26=String(_0x2543db[_0x351224(0x1ff)]())[_0x351224(0x295)](0x2,'0');return _0x16e125+'-'+_0x8d0f26+'\x20'+_0xaa4193;}}function formatDate(_0xf82d41){const _0x3d935a=a42_0x34064d,_0x487d57=_0xf82d41[_0x3d935a(0x28b)](),_0x2168e5=String(_0xf82d41['getMonth']()+0x1)['padStart'](0x2,'0'),_0x48faf3=String(_0xf82d41[_0x3d935a(0x1ff)]())[_0x3d935a(0x295)](0x2,'0');return _0x487d57+'-'+_0x2168e5+'-'+_0x48faf3;}function getTaskStateIcon(_0x12b8d9){const _0x38d4c1={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x38d4c1[_0x12b8d9]||'⚪';}function getBarChar(_0x90d3d9){const _0x404454=a42_0x34064d;return _0x90d3d9===_0x404454(0x1ed)||_0x90d3d9==='group_error'?'×':'─';}function getBarColor(_0x390bb5){const _0x13e534=a42_0x34064d,_0xe679={'success':a42_0x35b1c5[_0x13e534(0x250)],'error':a42_0x35b1c5[_0x13e534(0x304)],'group_error':a42_0x35b1c5[_0x13e534(0x304)],'running':a42_0x35b1c5[_0x13e534(0x1b4)],'blocked':a42_0x35b1c5['yellow'],'planned':a42_0x35b1c5[_0x13e534(0x2f8)],'canceling':a42_0x35b1c5[_0x13e534(0x2eb)]};return _0xe679[_0x390bb5]||a42_0x35b1c5['white'];}function parseTaskName(_0x548153){const _0xa6d054=a42_0x34064d;let _0x249808=_0x548153[_0xa6d054(0x185)](/^\++/,'');const _0x1ef02e=_0x249808['split']('+'),_0x3452eb=_0x1ef02e[_0xa6d054(0x2a1)]>0x1?_0x1ef02e['length']-0x2:0x0,_0x15965d=_0x1ef02e[_0x1ef02e[_0xa6d054(0x2a1)]-0x1]||_0x249808;return{'level':_0x3452eb,'name':'+'+_0x15965d};}function truncateTaskName(_0x431557,_0x46ae48){const _0x2092a9=a42_0x34064d,_0x1bd50f=stringWidth(_0x431557);if(_0x1bd50f<=_0x46ae48)return _0x431557;let _0x13e0e7=_0x431557;while(stringWidth(_0x13e0e7+'…')>_0x46ae48&&_0x13e0e7[_0x2092a9(0x2a1)]>0x0){_0x13e0e7=_0x13e0e7[_0x2092a9(0x2ec)](0x0,-0x1);}return _0x13e0e7+'…';}function calculateTimeScale(_0x24e9db,_0x4a7da9){const _0x4ee90d=a42_0x34064d;return{'startTime':_0x24e9db[_0x4ee90d(0x29a)],'endTime':_0x24e9db['end'],'durationMs':_0x24e9db[_0x4ee90d(0x1f8)],'msPerChar':_0x24e9db[_0x4ee90d(0x1f8)]/_0x4a7da9};}function timeToPosition(_0x51b544,_0x21e7c8,_0xcf958a){const _0x2e371c=a42_0x34064d,_0x3711ce=_0x51b544-_0x21e7c8[_0x2e371c(0x2fb)],_0x3e97c7=Math['floor'](_0x3711ce/_0x21e7c8['msPerChar']);return Math[_0x2e371c(0x20d)](0x0,Math[_0x2e371c(0x23c)](_0x3e97c7,_0xcf958a));}function renderTimeAxis(_0x2537d1,_0x2af4af){const _0x1e4595=a42_0x34064d,_0x385e26=Math['min'](TIMELINE_CONFIG[_0x1e4595(0x1eb)],Math['max'](TIMELINE_CONFIG[_0x1e4595(0x275)],Math[_0x1e4595(0x1ba)](_0x2af4af/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x34aea6=_0x2537d1[_0x1e4595(0x2aa)]/(_0x385e26-0x1),_0x596689=new Date(_0x2537d1[_0x1e4595(0x2fb)]),_0x4e717d=[];for(let _0x7fcd06=0x0;_0x7fcd06<_0x385e26;_0x7fcd06++){const _0x912bce=_0x2537d1[_0x1e4595(0x2fb)]+_0x7fcd06*_0x34aea6,_0x309ba8=timeToPosition(_0x912bce,_0x2537d1,_0x2af4af),_0x4a4bdf=formatTimestamp(_0x912bce,_0x596689);_0x4e717d[_0x1e4595(0x214)]({'pos':_0x309ba8,'text':_0x4a4bdf});}const _0x33dabf=new Array(_0x2af4af)[_0x1e4595(0x28a)]('\x20');let _0x7faf0e=-0x1;for(const {pos:_0x5b2a39,text:_0x392c63}of _0x4e717d){let _0x29abe5=Math[_0x1e4595(0x20d)](0x0,_0x5b2a39-Math[_0x1e4595(0x1ba)](_0x392c63[_0x1e4595(0x2a1)]/0x2));_0x29abe5<=_0x7faf0e+TIMELINE_CONFIG[_0x1e4595(0x1fe)]&&(_0x29abe5=_0x7faf0e+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x29abe5+_0x392c63[_0x1e4595(0x2a1)]>_0x2af4af&&(_0x29abe5=_0x2af4af-_0x392c63[_0x1e4595(0x2a1)]);if(_0x29abe5>=0x0&&_0x29abe5+_0x392c63[_0x1e4595(0x2a1)]<=_0x2af4af&&_0x29abe5>_0x7faf0e){for(let _0x21c796=0x0;_0x21c796<_0x392c63[_0x1e4595(0x2a1)];_0x21c796++){_0x33dabf[_0x29abe5+_0x21c796]=_0x392c63[_0x21c796];}_0x7faf0e=_0x29abe5+_0x392c63['length']-0x1;}}return _0x33dabf['join']('');}function renderTaskRow(_0x31b0bf,_0x2efd78,_0x366bd8,_0x41905d){const _0x199d9b=a42_0x34064d,{level:_0x42301a,name:_0x21be5a}=parseTaskName(_0x31b0bf[_0x199d9b(0x2f1)]),_0x5ee8dd='\x20'['repeat'](_0x42301a),_0xa4a0c1=_0x31b0bf[_0x199d9b(0x1f9)]?'('+formatElapsed(_0x31b0bf[_0x199d9b(0x1f9)]['duration'])+')':'',_0x20ebc1=stringWidth(_0xa4a0c1),_0x520bf1=_0x42301a*0x1,_0x1288c1=_0x41905d-_0x520bf1-_0x20ebc1-0x1,_0xfa9492=truncateTaskName(_0x21be5a,_0x1288c1),_0x28cdcb=_0x5ee8dd+_0xfa9492,_0x19717a=stringWidth(_0x28cdcb),_0x2e055f=_0x41905d-_0x19717a-_0x20ebc1,_0x6891a5=_0x28cdcb+'\x20'[_0x199d9b(0x26c)](Math[_0x199d9b(0x20d)](0x1,_0x2e055f))+a42_0x35b1c5[_0x199d9b(0x2f8)](_0xa4a0c1),_0x1bfbb3=getTaskStateIcon(_0x31b0bf[_0x199d9b(0x206)]),_0x41c5f9=new Array(_0x366bd8)[_0x199d9b(0x28a)]('\x20');if(_0x31b0bf[_0x199d9b(0x1f9)]){const _0x1fc2c9=timeToPosition(_0x31b0bf[_0x199d9b(0x1f9)][_0x199d9b(0x29a)],_0x2efd78,_0x366bd8),_0x2a52cc=timeToPosition(_0x31b0bf[_0x199d9b(0x1f9)]['end'],_0x2efd78,_0x366bd8),_0x5ef519=getBarChar(_0x31b0bf[_0x199d9b(0x206)]),_0x542b1a=Math[_0x199d9b(0x20d)](_0x1fc2c9+0x1,_0x2a52cc);for(let _0x1f0250=_0x1fc2c9;_0x1f0250<Math[_0x199d9b(0x23c)](_0x542b1a,_0x366bd8);_0x1f0250++){_0x41c5f9[_0x1f0250]=_0x5ef519;}}const _0x5badfc=getBarColor(_0x31b0bf[_0x199d9b(0x206)]),_0xed70ae=_0x41c5f9[_0x199d9b(0x1e8)](_0x1acc89=>_0x1acc89==='\x20'?'\x20':_0x5badfc(_0x1acc89))[_0x199d9b(0x2dc)]('');return _0x1bfbb3+'\x20'+_0x6891a5+'│'+_0xed70ae+'│';}function calculateStats(_0x150cdf){const _0x151de9=a42_0x34064d,_0x22c97b={'total':_0x150cdf[_0x151de9(0x2a1)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x499389 of _0x150cdf){if(_0x499389[_0x151de9(0x206)]===_0x151de9(0x1a5))_0x22c97b[_0x151de9(0x1a5)]++;else{if(_0x499389['state']===_0x151de9(0x1ed)||_0x499389[_0x151de9(0x206)]==='group_error')_0x22c97b[_0x151de9(0x1ed)]++;else _0x499389['state']===_0x151de9(0x294)?_0x22c97b['running']++:_0x22c97b[_0x151de9(0x278)]++;}}return _0x22c97b;}function formatStats(_0x5cc89a){const _0x199be4=a42_0x34064d;return['Total:\x20'+_0x5cc89a['total'],'✅\x20'+_0x5cc89a[_0x199be4(0x1a5)],'❌\x20'+_0x5cc89a['error'],_0x199be4(0x29e)+_0x5cc89a['running'],'⏳\x20'+_0x5cc89a['pending']][_0x199be4(0x2dc)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0x34064d(0x302);['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async['execute'](_0x2697d5){const _0x3204b8=a42_0x34064d,{options:_0x423a59,args:_0x46df7b,tdx:_0x3711f6}=_0x2697d5;let _0xa6ff32,_0x98a9e0,_0x11682d=![];if(_0x46df7b[0x0]){if(_0x46df7b[0x0][_0x3204b8(0x291)]('.')){const _0x45396d=this[_0x3204b8(0x19a)](_0x46df7b,_0x423a59);if(!_0x45396d)return 0x1;_0xa6ff32=_0x45396d['projectName'],_0x98a9e0=_0x45396d['workflowName'];}else{_0x98a9e0=_0x46df7b[0x0],_0xa6ff32=_0x423a59[_0x3204b8(0x303)];if(!_0xa6ff32)return console['error'](a42_0x35b1c5[_0x3204b8(0x304)](_0x3204b8(0x2cb)),_0x3204b8(0x2dd)),0x1;_0x11682d=!![];}}else{const _0x275bce=this[_0x3204b8(0x19a)](_0x46df7b,_0x423a59);if(!_0x275bce)return 0x1;_0xa6ff32=_0x275bce[_0x3204b8(0x1b5)],_0x98a9e0=_0x275bce[_0x3204b8(0x301)];}if(_0x423a59[_0x3204b8(0x256)]){if(_0xa6ff32&&_0x98a9e0)console[_0x3204b8(0x1ed)]('Filter:\x20'+_0xa6ff32+'.'+_0x98a9e0);else _0xa6ff32&&console[_0x3204b8(0x1ed)](_0x3204b8(0x1cf)+_0xa6ff32);}const _0x275d2d=_0x423a59['attemptId'],_0x4e2037=_0x423a59['sessionId'];if(_0x275d2d){_0x4e2037&&console[_0x3204b8(0x1ed)](a42_0x35b1c5['yellow'](_0x3204b8(0x193)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x4a6b8d=_0x423a59['follow'];return _0x4a6b8d?await this[_0x3204b8(0x24e)](_0x2697d5,_0x275d2d):await this[_0x3204b8(0x2cf)](_0x2697d5,_0x275d2d,_0x423a59),0x0;}if(_0x4e2037){const _0x2c3bd0=await withSpinner(_0x3204b8(0x1f3),()=>_0x3711f6[_0x3204b8(0x277)]['sessions']({'projectName':_0xa6ff32,'workflowName':_0x98a9e0,'limit':0x64}),{'verbose':_0x423a59[_0x3204b8(0x256)]}),_0x417213=_0x2c3bd0['data'][_0x3204b8(0x199)](_0x36c7fb=>_0x36c7fb['id']===_0x4e2037);if(!_0x417213)return console['error'](a42_0x35b1c5[_0x3204b8(0x304)]('Error:'),_0x3204b8(0x20a)+_0x4e2037),0x1;if(!_0x417213[_0x3204b8(0x26b)]?.['id'])return console[_0x3204b8(0x1ed)](a42_0x35b1c5[_0x3204b8(0x304)](_0x3204b8(0x2cb)),'Session\x20'+_0x4e2037+_0x3204b8(0x1b9)),0x1;const _0x539e14=_0x417213[_0x3204b8(0x26b)]['id'];_0x423a59[_0x3204b8(0x256)]&&console['error'](_0x3204b8(0x2c0)+_0x539e14+'\x20from\x20session\x20'+_0x4e2037);const _0x421659=_0x423a59[_0x3204b8(0x288)];return _0x421659?await this[_0x3204b8(0x24e)](_0x2697d5,_0x539e14):await this[_0x3204b8(0x2cf)](_0x2697d5,_0x539e14,_0x423a59),0x0;}const _0x321926=await withSpinner(_0x3204b8(0x1c9),()=>_0x3711f6['workflow'][_0x3204b8(0x19b)]({'projectName':_0xa6ff32,'workflowName':_0x98a9e0,'limit':_0x423a59['limit']||0x32}),{'verbose':_0x423a59[_0x3204b8(0x256)]}),_0x43ee56=_0x321926[_0x3204b8(0x2bb)];if(_0x43ee56[_0x3204b8(0x2a1)]===0x0){if(_0xa6ff32&&_0x98a9e0)console['error'](_0x3204b8(0x2a3)+_0xa6ff32+'.'+_0x98a9e0);else _0xa6ff32?console[_0x3204b8(0x1ed)](_0x3204b8(0x2b3)+_0xa6ff32):(console[_0x3204b8(0x1ed)](_0x3204b8(0x310)),console[_0x3204b8(0x1ed)](a42_0x35b1c5[_0x3204b8(0x2f8)](_0x3204b8(0x245))));return 0x0;}_0x43ee56['sort']((_0x4e5852,_0x551084)=>{const _0x284b7e=_0x3204b8,_0x381eee=_0x4e5852[_0x284b7e(0x1bd)]||'',_0x2ddad5=_0x551084[_0x284b7e(0x1bd)]||'';return _0x2ddad5[_0x284b7e(0x1b1)](_0x381eee);});if(_0x423a59[_0x3204b8(0x2b2)]||_0x423a59[_0x3204b8(0x298)])return await handleSDKOutput(_0x43ee56,_0x423a59),0x0;let _0x248441;if(_0x11682d){const _0x8117e7=_0x43ee56[0x0];if(!_0x8117e7[_0x3204b8(0x26b)]?.['id'])return console['error'](_0x3204b8(0x2f0)),0x0;_0x248441=_0x8117e7['lastAttempt']['id'],_0x423a59[_0x3204b8(0x256)]&&console[_0x3204b8(0x1ed)](_0x3204b8(0x30a)+_0x8117e7[_0x3204b8(0x1bd)]);}else{const _0xec67f3=_0x43ee56['map'](_0x3fffd9=>{const _0x2c7eb3=_0x3204b8,_0x3edd7d=getAttemptStatusDisplay(_0x3fffd9['lastAttempt']);return{'title':_0x3fffd9[_0x2c7eb3(0x2fd)]?.['name']+'.'+_0x3fffd9['workflow']?.[_0x2c7eb3(0x2f1)]+'\x20-\x20'+_0x3fffd9[_0x2c7eb3(0x1bd)]+'\x20'+_0x3edd7d['icon'],'value':_0x3fffd9[_0x2c7eb3(0x26b)]?.['id']||'','description':_0x3edd7d[_0x2c7eb3(0x18e)]};}),_0x5e58a7=await a42_0x40adc0({'type':_0x3204b8(0x2e9),'name':_0x3204b8(0x2d6),'message':_0x3204b8(0x2b1),'choices':_0xec67f3[_0x3204b8(0x2b8)](_0xfd453c=>_0xfd453c[_0x3204b8(0x2e0)]!=='')});if(!_0x5e58a7['attemptId'])return 0x0;_0x248441=_0x5e58a7['attemptId'];}const _0x38f5c7=_0x423a59[_0x3204b8(0x288)];return _0x38f5c7?await this['pollTimeline'](_0x2697d5,_0x248441):await this[_0x3204b8(0x2cf)](_0x2697d5,_0x248441,_0x423a59),0x0;}async[a42_0x34064d(0x2cf)](_0x4e94d8,_0x10346b,_0x555152){const _0x58fa84=a42_0x34064d,{tdx:_0x187dac}=_0x4e94d8;let _0x213071,_0x47c588;try{[_0x213071,_0x47c588]=await Promise['all']([_0x187dac[_0x58fa84(0x277)][_0x58fa84(0x307)](_0x10346b),_0x187dac[_0x58fa84(0x277)][_0x58fa84(0x1e1)](_0x10346b,![])]);}catch(_0x1de4b0){console[_0x58fa84(0x1ed)](a42_0x35b1c5[_0x58fa84(0x304)](_0x58fa84(0x309)));_0x555152[_0x58fa84(0x256)]&&console[_0x58fa84(0x1ed)](_0x1de4b0);throw _0x1de4b0;}if(_0x555152[_0x58fa84(0x2b2)]||_0x555152[_0x58fa84(0x298)]){const _0x71e0c3=this['buildTimelineData'](_0x213071,_0x47c588);await handleSDKOutput([_0x71e0c3],_0x555152);return;}const _0x3bed52=_0x187dac[_0x58fa84(0x26e)][_0x58fa84(0x210)],_0x2cd31c=this['renderTimeline'](_0x213071,_0x47c588,_0x3bed52);console[_0x58fa84(0x28d)](_0x2cd31c);}async[a42_0x34064d(0x24e)](_0x4afab3,_0x2eb37a){const _0x141f2a=a42_0x34064d,{tdx:_0x422b59}=_0x4afab3,_0x493113=TIMELINE_CONFIG[_0x141f2a(0x2a8)],_0xc455de=TIMELINE_CONFIG[_0x141f2a(0x319)];let _0x1e0973=0x0;while(_0x1e0973<_0xc455de){process[_0x141f2a(0x2ea)]['isTTY']&&process['stdout'][_0x141f2a(0x228)]('\x1bc');let _0x4256fc,_0x4f71d7;try{[_0x4256fc,_0x4f71d7]=await Promise[_0x141f2a(0x204)]([_0x422b59['workflow'][_0x141f2a(0x307)](_0x2eb37a),_0x422b59[_0x141f2a(0x277)][_0x141f2a(0x1e1)](_0x2eb37a,![])]);}catch(_0x5a877a){console['error'](a42_0x35b1c5[_0x141f2a(0x304)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x1e0973>0x0&&console[_0x141f2a(0x1ed)](a42_0x35b1c5[_0x141f2a(0x2f8)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x1e0973));throw _0x5a877a;}const _0x5c9816=_0x422b59[_0x141f2a(0x26e)][_0x141f2a(0x210)],_0x29390d=this[_0x141f2a(0x2bc)](_0x4256fc,_0x4f71d7,_0x5c9816);console['log'](_0x29390d);const _0x49efb2=_0x4256fc[_0x141f2a(0x1a0)]&&_0x4f71d7[_0x141f2a(0x243)](_0x1d8935=>_0x1d8935[_0x141f2a(0x206)]!==_0x141f2a(0x294)&&_0x1d8935[_0x141f2a(0x206)]!=='planned');if(_0x49efb2){console[_0x141f2a(0x1ed)](a42_0x35b1c5[_0x141f2a(0x250)](_0x141f2a(0x235)));break;}console[_0x141f2a(0x1ed)](a42_0x35b1c5[_0x141f2a(0x2f8)](_0x141f2a(0x232)+_0x1e0973*0x2+_0x141f2a(0x2c5))),await new Promise(_0x20b34e=>setTimeout(_0x20b34e,_0x493113)),_0x1e0973++;}_0x1e0973>=_0xc455de&&console[_0x141f2a(0x1ed)](a42_0x35b1c5[_0x141f2a(0x2eb)](_0x141f2a(0x24a)));}['renderTimeline'](_0x2f7df5,_0x15dd41,_0x32a028){const _0x2337ef=a42_0x34064d,_0x3c4ea7=[],_0x2f379a=TIMELINE_CONFIG[_0x2337ef(0x239)],_0xb0757c=0x5,_0x2b78db=process[_0x2337ef(0x2ea)][_0x2337ef(0x284)]||0x78,_0x5c187c=_0x2b78db-_0x2f379a-_0xb0757c,_0x52467e=Math[_0x2337ef(0x20d)](TIMELINE_CONFIG[_0x2337ef(0x2de)],Math[_0x2337ef(0x23c)](_0x5c187c,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x1e4bfa=new Date(_0x2f7df5[_0x2337ef(0x31a)])[_0x2337ef(0x26f)](),_0x3fd5ca=_0x2f7df5['finishedAt']?new Date(_0x2f7df5[_0x2337ef(0x1b6)])[_0x2337ef(0x26f)]():Date[_0x2337ef(0x208)](),_0xb700ba={'start':_0x1e4bfa,'end':_0x3fd5ca,'duration':_0x3fd5ca-_0x1e4bfa},_0x2e8453=new Map(),_0x31197f=[];for(const _0x1e5a4b of _0x15dd41){if(_0x1e5a4b[_0x2337ef(0x1c0)]){const _0x3604d5=new Date(_0x1e5a4b['startedAt'])[_0x2337ef(0x26f)](),_0x3b07b7=_0x1e5a4b[_0x2337ef(0x2d0)]?new Date(_0x1e5a4b[_0x2337ef(0x2d0)])[_0x2337ef(0x26f)]():Date[_0x2337ef(0x208)](),_0x1638ec={'start':_0x3604d5,'end':_0x3b07b7,'duration':_0x3b07b7-_0x3604d5};_0x2e8453['set'](_0x1e5a4b['id'],_0x1638ec),_0x31197f[_0x2337ef(0x214)]({'name':_0x1e5a4b[_0x2337ef(0x257)],'state':_0x1e5a4b['state']||_0x2337ef(0x198),'window':_0x1638ec});}else _0x31197f[_0x2337ef(0x214)]({'name':_0x1e5a4b[_0x2337ef(0x257)],'state':_0x1e5a4b[_0x2337ef(0x206)]||_0x2337ef(0x2a6),'window':undefined});}_0x31197f[_0x2337ef(0x293)]((_0x515832,_0x3017b4)=>{const _0x8fca4d=_0x2337ef;if(!_0x515832[_0x8fca4d(0x1f9)])return 0x1;if(!_0x3017b4[_0x8fca4d(0x1f9)])return-0x1;return _0x515832['window'][_0x8fca4d(0x29a)]-_0x3017b4[_0x8fca4d(0x1f9)][_0x8fca4d(0x29a)];});const _0x46b0f3=_0x31197f['length'],_0x43c6fd=_0x46b0f3>TIMELINE_CONFIG[_0x2337ef(0x26d)];_0x43c6fd&&_0x31197f['splice'](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x2fe6af=calculateTimeScale(_0xb700ba,_0x52467e),_0x5685cc=_0x2f7df5[_0x2337ef(0x1a0)]?_0x2f7df5[_0x2337ef(0x1a5)]?a42_0x35b1c5['green'](_0x2337ef(0x1a5)):a42_0x35b1c5[_0x2337ef(0x304)](_0x2337ef(0x1ed)):a42_0x35b1c5['blue'](_0x2337ef(0x294)),_0x5d7dd7=_0x2f7df5[_0x2337ef(0x2fd)]?.['id'],_0x5c4fc8=_0x2f7df5[_0x2337ef(0x1cb)];let _0x22930e;if(_0x5d7dd7&&_0x5c4fc8){const _0x585860=getWorkflowAttemptUrl(_0x32a028,_0x5d7dd7,_0x5c4fc8,_0x2f7df5['id']);_0x22930e=hyperlink(a42_0x35b1c5[_0x2337ef(0x2f8)](_0x2f7df5['id']),_0x585860);}else _0x22930e=a42_0x35b1c5[_0x2337ef(0x2f8)](_0x2f7df5['id']);_0x3c4ea7[_0x2337ef(0x214)](_0x2337ef(0x296)+_0x22930e+_0x2337ef(0x1f4)+_0x5685cc+_0x2337ef(0x1f4)+formatElapsed(_0xb700ba['duration']));if(_0x31197f[_0x2337ef(0x2a1)]>0x0){const _0x3a7a49=renderTimeAxis(_0x2fe6af,_0x52467e),_0x351840=new Date(_0xb700ba[_0x2337ef(0x29a)]),_0x196b22=formatDate(_0x351840),_0x21bfff=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG['ICON_SPACING']+_0x2f379a,_0x3f2786=_0x196b22[_0x2337ef(0x295)](_0x21bfff),_0x37508c=a42_0x35b1c5[_0x2337ef(0x2f8)](_0x3f2786);_0x3c4ea7['push'](_0x37508c+'\x20'+_0x3a7a49);for(const _0x395e17 of _0x31197f){_0x3c4ea7[_0x2337ef(0x214)](renderTaskRow(_0x395e17,_0x2fe6af,_0x52467e,_0x2f379a));}const _0x24d0fe=calculateStats(_0x31197f);_0x3c4ea7[_0x2337ef(0x214)](formatStats(_0x24d0fe)),_0x43c6fd&&_0x3c4ea7[_0x2337ef(0x214)](a42_0x35b1c5[_0x2337ef(0x2eb)](_0x2337ef(0x195)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x2337ef(0x2db)+_0x46b0f3+_0x2337ef(0x1df))),_0x3c4ea7[_0x2337ef(0x214)](''),_0x3c4ea7[_0x2337ef(0x214)](a42_0x35b1c5[_0x2337ef(0x2f8)](_0x2337ef(0x186))+(_0x2337ef(0x253)+_0x2f7df5['id']+_0x2337ef(0x213))+a42_0x35b1c5[_0x2337ef(0x2f8)](_0x2337ef(0x190)));}else _0x3c4ea7[_0x2337ef(0x214)](_0x2337ef(0x25d));return _0x3c4ea7[_0x2337ef(0x2dc)]('\x0a');}[a42_0x34064d(0x207)](_0x107a94,_0xb5b894){const _0x1a408e=a42_0x34064d,_0x2efd51=new Date(_0x107a94['createdAt'])[_0x1a408e(0x26f)](),_0x2c6b4c=_0x107a94[_0x1a408e(0x1b6)]?new Date(_0x107a94[_0x1a408e(0x1b6)])['getTime']():Date['now'](),_0x47d14c=_0x2c6b4c-_0x2efd51,_0x1ae7cf=[];for(const _0x1d73b4 of _0xb5b894){if(_0x1d73b4['startedAt']){const _0x1782e5=new Date(_0x1d73b4[_0x1a408e(0x1c0)])[_0x1a408e(0x26f)](),_0x5884d2=_0x1d73b4[_0x1a408e(0x2d0)]?new Date(_0x1d73b4['updatedAt'])[_0x1a408e(0x26f)]():Date['now']();_0x1ae7cf[_0x1a408e(0x214)]({'name':_0x1d73b4[_0x1a408e(0x257)],'state':_0x1d73b4[_0x1a408e(0x206)]||_0x1a408e(0x198),'window':{'start':_0x1782e5,'end':_0x5884d2,'duration':_0x5884d2-_0x1782e5}});}else _0x1ae7cf['push']({'name':_0x1d73b4[_0x1a408e(0x257)],'state':_0x1d73b4[_0x1a408e(0x206)]||_0x1a408e(0x2a6),'window':undefined});}const _0x41504e=calculateStats(_0x1ae7cf);return{'attempt':{'id':_0x107a94['id'],'status':_0x107a94[_0x1a408e(0x1a0)]?_0x107a94[_0x1a408e(0x1a5)]?'success':'error':_0x1a408e(0x294),'createdAt':_0x107a94[_0x1a408e(0x31a)],'finishedAt':_0x107a94[_0x1a408e(0x1b6)],'duration_ms':_0x47d14c},'tasks':_0x1ae7cf[_0x1a408e(0x1e8)](_0x56bad0=>({'name':_0x56bad0[_0x1a408e(0x2f1)],'state':_0x56bad0['state'],'startedAt':_0x56bad0[_0x1a408e(0x1f9)]?new Date(_0x56bad0[_0x1a408e(0x1f9)][_0x1a408e(0x29a)])[_0x1a408e(0x25a)]():null,'updatedAt':_0x56bad0['window']?new Date(_0x56bad0['window'][_0x1a408e(0x2d2)])['toISOString']():null,'duration_ms':_0x56bad0[_0x1a408e(0x1f9)]?.[_0x1a408e(0x1f8)]||null})),'stats':_0x41504e};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x120d8f,_0x292371){const _0x3691c0=a43_0xb021,_0x3b3f75=_0x120d8f();while(!![]){try{const _0x6fb470=-parseInt(_0x3691c0(0xd8))/0x1*(-parseInt(_0x3691c0(0xce))/0x2)+parseInt(_0x3691c0(0xd4))/0x3*(-parseInt(_0x3691c0(0xd3))/0x4)+-parseInt(_0x3691c0(0xd7))/0x5*(-parseInt(_0x3691c0(0xd9))/0x6)+-parseInt(_0x3691c0(0xcb))/0x7+-parseInt(_0x3691c0(0xdb))/0x8*(-parseInt(_0x3691c0(0xca))/0x9)+parseInt(_0x3691c0(0xda))/0xa*(-parseInt(_0x3691c0(0xdc))/0xb)+parseInt(_0x3691c0(0xd5))/0xc;if(_0x6fb470===_0x292371)break;else _0x3b3f75['push'](_0x3b3f75['shift']());}catch(_0xdf75ad){_0x3b3f75['push'](_0x3b3f75['shift']());}}}(a43_0x58b1,0x9cc5a));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a43_0x58b1(){const _0x1668b5=['version','2871gEKFxs','1077230TDabCD','entries','length','1632514muowZO',';\x20node/','Authorization','replace','tdx/','384432oHQvnw','24zXUnUA','20707716bAzare','TD1\x20','690uMHFTH','1dRSqvG','3732eUkrgY','10708190sOwfkq','200DFpWzC','11LgVQGZ'];a43_0x58b1=function(){return _0x1668b5;};return a43_0x58b1();}export function getUserAgent(){const _0x1bc63e=a43_0xb021,_0x59c1e4=getVersion(),_0x47ac52=platform(),_0x572f97=process[_0x1bc63e(0xc9)][_0x1bc63e(0xd1)]('v','');return _0x1bc63e(0xd2)+_0x59c1e4+'\x20('+_0x47ac52+_0x1bc63e(0xcf)+_0x572f97+')';}export function getAuthHeaders(_0x3385f7,_0x5b4f68){const _0xa6248=a43_0xb021,_0x310095=getVersion(),_0x4fa862={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x310095};return _0x5b4f68&&(_0x4fa862[_0xa6248(0xd0)]=_0xa6248(0xd6)+_0x5b4f68),_0x4fa862;}export function toHeaderRecord(_0x520d60){const _0x1d0a9f=a43_0xb021,_0x1f4ace={};for(const [_0x3f66fb,_0x211443]of Object[_0x1d0a9f(0xcc)](_0x520d60)){_0x211443!==undefined&&(_0x1f4ace[_0x3f66fb]=_0x211443);}return _0x1f4ace;}function a43_0xb021(_0x519b7c,_0x42ade5){_0x519b7c=_0x519b7c-0xc9;const _0x58b18f=a43_0x58b1();let _0xb02149=_0x58b18f[_0x519b7c];return _0xb02149;}export function getTrinoHeaders(_0x54b9cb,_0x5e26b9){const _0x11a567=a43_0xb021,_0x3766d6=getAuthHeaders(_0x54b9cb,_0x5e26b9),_0x28491b=toHeaderRecord(_0x3766d6);return delete _0x28491b[_0x11a567(0xd0)],_0x5e26b9&&(_0x28491b['X-Trino-User']=_0x5e26b9),_0x28491b;}export function hasAPIKey(_0x4756c8){const _0x357ed3=a43_0xb021,_0x40c07d=getAPIKey();return _0x40c07d!==undefined&&_0x40c07d[_0x357ed3(0xcd)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4c8bf5,_0x682fd7){const _0x29bf60=a44_0x242b,_0x4516d2=_0x4c8bf5();while(!![]){try{const _0x153508=parseInt(_0x29bf60(0x226))/0x1+parseInt(_0x29bf60(0x212))/0x2*(parseInt(_0x29bf60(0x1f1))/0x3)+-parseInt(_0x29bf60(0x234))/0x4+parseInt(_0x29bf60(0x201))/0x5*(parseInt(_0x29bf60(0x1fb))/0x6)+-parseInt(_0x29bf60(0x207))/0x7+-parseInt(_0x29bf60(0x235))/0x8*(-parseInt(_0x29bf60(0x208))/0x9)+-parseInt(_0x29bf60(0x1fa))/0xa*(parseInt(_0x29bf60(0x202))/0xb);if(_0x153508===_0x682fd7)break;else _0x4516d2['push'](_0x4516d2['shift']());}catch(_0xdbd15f){_0x4516d2['push'](_0x4516d2['shift']());}}}(a44_0x382e,0x72550));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 a44_0x2d71d9 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x29a384){const _0x46b826=a44_0x242b;return _0x29a384['format']==='json'||_0x29a384[_0x46b826(0x200)]==='jsonl'||_0x29a384['format']===_0x46b826(0x1ff)||_0x29a384['format']===_0x46b826(0x1f2)||_0x29a384[_0x46b826(0x203)]===!![]||_0x29a384['jsonl']===!![]||_0x29a384[_0x46b826(0x1ff)]===!![]||_0x29a384[_0x46b826(0x1f2)]===!![];}export function parseOutputOptions(_0x333239){const _0x440c16=a44_0x242b;return{'format':_0x333239[_0x440c16(0x200)]||_0x440c16(0x1f2),'output':_0x333239[_0x440c16(0x20e)]||'','limit':_0x333239[_0x440c16(0x220)],'color':_0x333239[_0x440c16(0x227)],'noColor':_0x333239[_0x440c16(0x217)]};}function convertSDKResultToQueryResult(_0x4ff2d6){const _0x452048=a44_0x242b,_0x4be2ea=[];if(_0x4ff2d6[_0x452048(0x232)]>0x0){const _0x5de33a=_0x4ff2d6[0x0];for(const [_0x14bd10,_0x5e97b8]of Object[_0x452048(0x1f5)](_0x5de33a)){let _0x1db992=_0x452048(0x219);if(typeof _0x5e97b8===_0x452048(0x23a))_0x1db992=Number[_0x452048(0x215)](_0x5e97b8)?_0x452048(0x218):_0x452048(0x1f6);else{if(typeof _0x5e97b8===_0x452048(0x21b))_0x1db992=_0x452048(0x21b);else _0x5e97b8===null&&(_0x1db992='varchar');}_0x4be2ea[_0x452048(0x224)]({'name':_0x14bd10,'type':_0x1db992});}}return{'queryId':_0x452048(0x223),'columns':_0x4be2ea,'data':_0x4ff2d6,'stats':{'state':_0x452048(0x231),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4ff2d6['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x5d2d45,_0x572c27){const _0x392157=convertSDKResultToQueryResult(_0x5d2d45);return formatQueryOutput(_0x392157,_0x572c27);}export async function formatQueryOutput(_0x588b91,_0x297b3c){const _0x26f1da=a44_0x242b,{format:_0x50d383,limit:_0x53865c,output:_0x4765f4,color:_0x259a9d,noColor:_0xaf3076}=_0x297b3c,_0x2f1440=Boolean(_0x4765f4)&&!_0x259a9d,_0x289342={'color':_0x259a9d,'noColor':_0xaf3076||_0x2f1440};if(_0x50d383==='table'){const _0x19fe03=shouldUseLess(_0x50d383,_0x4765f4);return formatAsTable(_0x588b91,_0x53865c,_0x19fe03,_0x289342);}else{if(_0x50d383===_0x26f1da(0x203))return formatAsJSON(_0x588b91,_0x289342);else return _0x50d383===_0x26f1da(0x20f)?formatAsJSONL(_0x588b91,_0x289342):formatQueryResult(_0x588b91,_0x50d383);}}function shouldUseLess(_0x1a7df4,_0x4a84cc){const _0x262911=a44_0x242b;return(_0x1a7df4===_0x262911(0x1f2)||_0x1a7df4===_0x262911(0x233))&&process['stdout'][_0x262911(0x1f3)]&&!_0x4a84cc;}export function resolveOutputOptions(_0x2fe0fc){const _0x57c394=a44_0x242b,_0x1ad8e4=resolveOutputFormat(_0x2fe0fc['format'],_0x2fe0fc[_0x57c394(0x20e)],'table');let _0x3f516f=typeof _0x2fe0fc[_0x57c394(0x220)]===_0x57c394(0x23a)?_0x2fe0fc['limit']:parseInt(_0x2fe0fc[_0x57c394(0x220)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x15f9f9=_0x2fe0fc[_0x57c394(0x20e)]||'';return shouldUseLess(_0x1ad8e4,_0x15f9f9)&&(_0x3f516f=Infinity),{'format':_0x1ad8e4,'output':_0x15f9f9,'limit':_0x3f516f,'color':_0x2fe0fc[_0x57c394(0x227)],'noColor':_0x2fe0fc[_0x57c394(0x217)]};}function a44_0x242b(_0x43593c,_0x5d0e73){_0x43593c=_0x43593c-0x1f1;const _0x382e8e=a44_0x382e();let _0x242bd6=_0x382e8e[_0x43593c];return _0x242bd6;}function a44_0x382e(){const _0x25b440=['query','repeat','No\x20data','FINISHED','length','list','41028gUsRLR','6339736vCqmrE','[query]','forEach','max','padEnd','number','54195hgbyHT','table','isTTY','keys','entries','double','[error]','resolve','error','50qpzHin','6FUfhiz','split','rule','cyan','tsv','format','869605pFpQNd','2480071UaZSQt','json','pipe','[rule]','end','4035101VYWXEU','9MJiyvk','map','[params]','inherit','params','Results\x20saved\x20to\x20','output','jsonl','-FXRSn','blue','98kKMlzi','[Object]','stdin','isInteger','cmdout','noColor','bigint','varchar','trim','boolean','write','bold','stderr','yellow','limit','filter','less','sdk-result','push','object','330736ozbJRu','color','debug','─┴─','red','stringify','join','[logs]'];a44_0x382e=function(){return _0x25b440;};return a44_0x382e();}export function writeOutput(_0x535a0a,_0x3fef67,_0xef08c3){const _0x5d72d5=a44_0x242b;return _0x3fef67?(writeFileSync(_0x3fef67,_0x535a0a),console[_0x5d72d5(0x1f9)](_0x5d72d5(0x20d)+_0x3fef67),Promise['resolve']()):shouldUseLess(_0xef08c3||'','')?new Promise(_0x4be4f5=>{const _0x4888e7=_0x5d72d5,_0x32fa3e=spawn(_0x4888e7(0x222),[_0x4888e7(0x210)],{'stdio':[_0x4888e7(0x204),'inherit',_0x4888e7(0x20b)]});let _0x85a139=![];_0x32fa3e['on']('error',()=>{!_0x85a139&&(_0x85a139=!![],console['log'](_0x535a0a),_0x4be4f5());}),_0x32fa3e['on']('close',()=>{!_0x85a139&&(_0x85a139=!![],_0x4be4f5());}),_0x32fa3e['on']('spawn',()=>{const _0x1cb55a=_0x4888e7;!_0x85a139&&_0x32fa3e['stdin']&&(_0x32fa3e['stdin']['on']('error',()=>{}),_0x32fa3e[_0x1cb55a(0x214)][_0x1cb55a(0x21c)](_0x535a0a),_0x32fa3e['stdin'][_0x1cb55a(0x206)]());}),!_0x32fa3e['stdin']&&(!_0x85a139&&(_0x85a139=!![],console['log'](_0x535a0a),_0x4be4f5()));}):(console['log'](_0x535a0a),Promise[_0x5d72d5(0x1f8)]());}export async function handleSDKOutput(_0x523065,_0x4a8904){const _0x47ff9c=a44_0x242b,_0x59d929=resolveOutputOptions(_0x4a8904),_0x9dcf11=await formatSDKOutput(_0x523065,_0x59d929);await writeOutput(_0x9dcf11,_0x59d929[_0x47ff9c(0x20e)]||undefined,_0x59d929['format']);}export async function handleQueryOutput(_0xfef69f,_0x1c0d4f){const _0x1d18c2=a44_0x242b,_0x156ccd=resolveOutputOptions(_0x1c0d4f),_0xd96f4d=await formatQueryOutput(_0xfef69f,_0x156ccd);await writeOutput(_0xd96f4d,_0x156ccd[_0x1d18c2(0x20e)]||undefined,_0x156ccd[_0x1d18c2(0x200)]);}async function formatSingleObject(_0x4c4761,_0x5aea04){const _0x2d1eb6=a44_0x242b,{format:_0x5d030d,color:_0x451d02,noColor:_0x459b5d}=_0x5aea04,_0x4f9722={'color':_0x451d02,'noColor':_0x459b5d};if(_0x5d030d===_0x2d1eb6(0x203)){if(shouldUseColor(_0x4f9722))return colorizeJSON(_0x4c4761,_0x4f9722);return JSON['stringify'](_0x4c4761,null,0x2);}else{if(_0x5d030d===_0x2d1eb6(0x20f)){if(shouldUseColor(_0x4f9722))return colorizeJSONCompact(_0x4c4761,_0x4f9722);return JSON['stringify'](_0x4c4761);}else{if(_0x5d030d===_0x2d1eb6(0x1ff))return Object[_0x2d1eb6(0x1f5)](_0x4c4761)['map'](([_0x476fd5,_0x5809d8])=>_0x476fd5+'\x09'+_0x5809d8)[_0x2d1eb6(0x22c)]('\x0a');else{const _0x1b9aca=Object['entries'](_0x4c4761);if(_0x1b9aca[_0x2d1eb6(0x232)]===0x0)return _0x2d1eb6(0x230);const _0x36ce69=_0x4c4761[_0x2d1eb6(0x228)],_0x4c9346=_0x4c4761['query'],_0x107540=_0x4c4761[_0x2d1eb6(0x20c)],_0x46f4e5=_0x4c4761[_0x2d1eb6(0x1fd)],_0x53e150=_0x4c9346?typeof _0x4c9346==='string'?_0x4c9346:JSON[_0x2d1eb6(0x22b)](_0x4c9346,null,0x2):undefined,_0x28b16d=_0x107540&&Object[_0x2d1eb6(0x1f4)](_0x107540)['length']>0x0?JSON[_0x2d1eb6(0x22b)](_0x107540,null,0x2):undefined,_0x3479b0=_0x46f4e5&&Object[_0x2d1eb6(0x1f4)](_0x46f4e5)[_0x2d1eb6(0x232)]>0x0?JSON[_0x2d1eb6(0x22b)](_0x46f4e5,null,0x2):undefined,_0x219bbd=_0x1b9aca[_0x2d1eb6(0x221)](([_0x5da5c1])=>_0x5da5c1!=='debug'&&_0x5da5c1!==_0x2d1eb6(0x22e)&&_0x5da5c1!=='params'&&_0x5da5c1!==_0x2d1eb6(0x1fd)),_0x528c2e=Math[_0x2d1eb6(0x238)](..._0x219bbd['map'](([_0x3dcf7b])=>_0x3dcf7b[_0x2d1eb6(0x232)])),_0x1b26e1=Math[_0x2d1eb6(0x238)](..._0x219bbd[_0x2d1eb6(0x209)](([,_0x25e6bd])=>{const _0x5a40ea=_0x2d1eb6;try{const _0x2512f8=_0x25e6bd===null||_0x25e6bd===undefined?'':typeof _0x25e6bd===_0x5a40ea(0x225)?JSON[_0x5a40ea(0x22b)](_0x25e6bd):String(_0x25e6bd),_0x56b20a=_0x2512f8[_0x5a40ea(0x1fc)]('\x0a');return Math['max'](..._0x56b20a[_0x5a40ea(0x209)](_0x199565=>_0x199565[_0x5a40ea(0x232)]),0x0);}catch{return 0x0;}}),0x14),_0x397639=[];_0x397639[_0x2d1eb6(0x224)](colorBorder('┌─'+'─'[_0x2d1eb6(0x22f)](_0x528c2e)+'─┬─'+'─'[_0x2d1eb6(0x22f)](_0x1b26e1)+'─┐',_0x4f9722)),_0x219bbd[_0x2d1eb6(0x237)](([_0x9b5489,_0x193ec9])=>{const _0x3e917d=_0x2d1eb6;let _0x476f8d;try{_0x476f8d=_0x193ec9===null||_0x193ec9===undefined?'':typeof _0x193ec9===_0x3e917d(0x225)?JSON['stringify'](_0x193ec9):String(_0x193ec9);}catch{_0x476f8d=_0x3e917d(0x213);}const _0x106861=_0x9b5489[_0x3e917d(0x239)](_0x528c2e),_0x39c839=_0x476f8d[_0x3e917d(0x1fc)]('\x0a');_0x39c839[_0x3e917d(0x237)]((_0x4cf22d,_0x17c980)=>{const _0x4243a2=_0x3e917d,_0x91b99a=colorBorder('│',_0x4f9722);_0x17c980===0x0?_0x397639[_0x4243a2(0x224)](_0x91b99a+'\x20'+_0x106861+'\x20'+_0x91b99a+'\x20'+_0x4cf22d['padEnd'](_0x1b26e1)+'\x20'+_0x91b99a):_0x397639[_0x4243a2(0x224)](_0x91b99a+'\x20'+'\x20'[_0x4243a2(0x22f)](_0x528c2e)+'\x20'+_0x91b99a+'\x20'+_0x4cf22d[_0x4243a2(0x239)](_0x1b26e1)+'\x20'+_0x91b99a);});}),_0x397639[_0x2d1eb6(0x224)](colorBorder('└─'+'─'[_0x2d1eb6(0x22f)](_0x528c2e)+_0x2d1eb6(0x229)+'─'[_0x2d1eb6(0x22f)](_0x1b26e1)+'─┘',_0x4f9722));_0x53e150&&(_0x397639['push'](''),_0x397639['push'](String(a44_0x2d71d9[_0x2d1eb6(0x21f)]['bold'](_0x2d1eb6(0x236)))),_0x397639[_0x2d1eb6(0x224)](_0x53e150));_0x28b16d&&(_0x397639['push'](''),_0x397639[_0x2d1eb6(0x224)](String(a44_0x2d71d9[_0x2d1eb6(0x211)][_0x2d1eb6(0x21d)](_0x2d1eb6(0x20a)))),_0x397639[_0x2d1eb6(0x224)](_0x28b16d));_0x3479b0&&(_0x397639['push'](''),_0x397639[_0x2d1eb6(0x224)](String(a44_0x2d71d9['magenta'][_0x2d1eb6(0x21d)](_0x2d1eb6(0x205)))),_0x397639['push'](_0x3479b0));if(_0x36ce69){if(_0x36ce69[_0x2d1eb6(0x21e)]){_0x397639[_0x2d1eb6(0x224)](''),_0x397639[_0x2d1eb6(0x224)](String(a44_0x2d71d9[_0x2d1eb6(0x22a)][_0x2d1eb6(0x21d)](_0x2d1eb6(0x1f7))));const _0x4ab5b3=_0x36ce69['stderr'][_0x2d1eb6(0x1fc)]('\x0a');_0x4ab5b3[_0x2d1eb6(0x237)](_0x230031=>{const _0x1c255a=_0x2d1eb6;_0x230031[_0x1c255a(0x21a)]()&&_0x397639[_0x1c255a(0x224)](_0x230031);});}if(_0x36ce69['cmdout']){_0x397639[_0x2d1eb6(0x224)](''),_0x397639[_0x2d1eb6(0x224)](String(a44_0x2d71d9[_0x2d1eb6(0x1fe)][_0x2d1eb6(0x21d)](_0x2d1eb6(0x22d))));const _0x16e6a5=_0x36ce69[_0x2d1eb6(0x216)][_0x2d1eb6(0x1fc)]('\x0a');_0x16e6a5[_0x2d1eb6(0x237)](_0x14a997=>{const _0x33bf8e=_0x2d1eb6;_0x14a997[_0x33bf8e(0x21a)]()&&_0x397639[_0x33bf8e(0x224)](_0x14a997);});}}return _0x397639['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0xbff3a3,_0x505b5b){const _0x598a07=a44_0x242b;if(_0x505b5b['format']==='table'){await handleSDKOutput([_0xbff3a3],_0x505b5b);return;}const _0x45d444=resolveOutputOptions(_0x505b5b),_0x503d95=await formatSingleObject(_0xbff3a3,_0x45d444);await writeOutput(_0x503d95,_0x45d444[_0x598a07(0x20e)]||undefined,_0x45d444[_0x598a07(0x200)]);}
|
|
1
|
+
(function(_0x10d988,_0x1caefa){const _0x592de8=a44_0x57ea,_0x521c5c=_0x10d988();while(!![]){try{const _0x53330c=-parseInt(_0x592de8(0xba))/0x1+parseInt(_0x592de8(0xa4))/0x2*(parseInt(_0x592de8(0xaf))/0x3)+parseInt(_0x592de8(0xc8))/0x4*(parseInt(_0x592de8(0xc0))/0x5)+parseInt(_0x592de8(0xca))/0x6+parseInt(_0x592de8(0xaa))/0x7+-parseInt(_0x592de8(0xd4))/0x8*(-parseInt(_0x592de8(0xa3))/0x9)+-parseInt(_0x592de8(0xbe))/0xa;if(_0x53330c===_0x1caefa)break;else _0x521c5c['push'](_0x521c5c['shift']());}catch(_0x523e07){_0x521c5c['push'](_0x521c5c['shift']());}}}(a44_0x354b,0x7f8e7));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 a44_0x12fb69 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';function a44_0x354b(){const _0x23a4f4=['[Object]','max','[params]','params','483161fOpwxs','jsonl','noColor','stdin','23722780sWRyOf','string','5OFIARQ','bold','-FXRSn','color','stderr','─┬─','[rule]','resolve','2672532mrvtIA','red','5391498YYUaZu','cyan','json','keys','stdout','isInteger','Results\x20saved\x20to\x20','forEach','pipe','padEnd','32htCmGm','[error]','debug','varchar','inherit','push','close','repeat','format','join','split','rule','blue','[logs]','less','limit','boolean','FINISHED','trim','query','stringify','1443357zhFqSN','2ywjHxQ','error','─┴─','double','No\x20data','map','4295473tDlCuU','filter','length','sdk-result','output','1668189IkXJrL','write','tsv','table','number','log','entries'];a44_0x354b=function(){return _0x23a4f4;};return a44_0x354b();}import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x566acb){const _0x46849a=a44_0x57ea;return _0x566acb[_0x46849a(0x96)]==='json'||_0x566acb[_0x46849a(0x96)]===_0x46849a(0xbb)||_0x566acb[_0x46849a(0x96)]===_0x46849a(0xb1)||_0x566acb[_0x46849a(0x96)]==='table'||_0x566acb[_0x46849a(0xcc)]===!![]||_0x566acb['jsonl']===!![]||_0x566acb[_0x46849a(0xb1)]===!![]||_0x566acb['table']===!![];}export function parseOutputOptions(_0x5b1b68){const _0x456ba5=a44_0x57ea;return{'format':_0x5b1b68['format']||_0x456ba5(0xb2),'output':_0x5b1b68[_0x456ba5(0xae)]||'','limit':_0x5b1b68['limit'],'color':_0x5b1b68['color'],'noColor':_0x5b1b68['noColor']};}function convertSDKResultToQueryResult(_0x27e30a){const _0x296177=a44_0x57ea,_0x474975=[];if(_0x27e30a[_0x296177(0xac)]>0x0){const _0x47cfc6=_0x27e30a[0x0];for(const [_0x493abf,_0x40c87a]of Object[_0x296177(0xb5)](_0x47cfc6)){let _0x421950=_0x296177(0x91);if(typeof _0x40c87a===_0x296177(0xb3))_0x421950=Number[_0x296177(0xcf)](_0x40c87a)?'bigint':_0x296177(0xa7);else{if(typeof _0x40c87a===_0x296177(0x9e))_0x421950=_0x296177(0x9e);else _0x40c87a===null&&(_0x421950=_0x296177(0x91));}_0x474975[_0x296177(0x93)]({'name':_0x493abf,'type':_0x421950});}}return{'queryId':_0x296177(0xad),'columns':_0x474975,'data':_0x27e30a,'stats':{'state':_0x296177(0x9f),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x27e30a[_0x296177(0xac)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x227db7,_0x52d298){const _0x8c726e=convertSDKResultToQueryResult(_0x227db7);return formatQueryOutput(_0x8c726e,_0x52d298);}export async function formatQueryOutput(_0x57fa83,_0x3ba12e){const _0x447001=a44_0x57ea,{format:_0x5d7c54,limit:_0x310105,output:_0x403073,color:_0x2c31ac,noColor:_0x42ff8c}=_0x3ba12e,_0xc1b3c8=Boolean(_0x403073)&&!_0x2c31ac,_0xf0160f={'color':_0x2c31ac,'noColor':_0x42ff8c||_0xc1b3c8};if(_0x5d7c54==='table'){const _0x3c9528=shouldUseLess(_0x5d7c54,_0x403073);return formatAsTable(_0x57fa83,_0x310105,_0x3c9528,_0xf0160f);}else{if(_0x5d7c54===_0x447001(0xcc))return formatAsJSON(_0x57fa83,_0xf0160f);else return _0x5d7c54===_0x447001(0xbb)?formatAsJSONL(_0x57fa83,_0xf0160f):formatQueryResult(_0x57fa83,_0x5d7c54);}}function shouldUseLess(_0x5c95a0,_0x4d409e){const _0x552c27=a44_0x57ea;return(_0x5c95a0===_0x552c27(0xb2)||_0x5c95a0==='list')&&process[_0x552c27(0xce)]['isTTY']&&!_0x4d409e;}export function resolveOutputOptions(_0x919b87){const _0x407e1f=a44_0x57ea,_0x19051d=resolveOutputFormat(_0x919b87[_0x407e1f(0x96)],_0x919b87['output'],_0x407e1f(0xb2));let _0x292705=typeof _0x919b87['limit']===_0x407e1f(0xb3)?_0x919b87[_0x407e1f(0x9d)]:parseInt(_0x919b87[_0x407e1f(0x9d)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0xd3abef=_0x919b87[_0x407e1f(0xae)]||'';return shouldUseLess(_0x19051d,_0xd3abef)&&(_0x292705=Infinity),{'format':_0x19051d,'output':_0xd3abef,'limit':_0x292705,'color':_0x919b87[_0x407e1f(0xc3)],'noColor':_0x919b87[_0x407e1f(0xbc)]};}export function writeOutput(_0xb6ae1a,_0x46475c,_0x484fa0){const _0x3cf63a=a44_0x57ea;return _0x46475c?(writeFileSync(_0x46475c,_0xb6ae1a),console[_0x3cf63a(0xa5)](_0x3cf63a(0xd0)+_0x46475c),Promise[_0x3cf63a(0xc7)]()):shouldUseLess(_0x484fa0||'','')?new Promise(_0x3d885a=>{const _0x308ea2=_0x3cf63a,_0x5c9962=spawn(_0x308ea2(0x9c),[_0x308ea2(0xc2)],{'stdio':[_0x308ea2(0xd2),_0x308ea2(0x92),'inherit']});let _0x1ec5dc=![];_0x5c9962['on']('error',()=>{const _0x26c36=_0x308ea2;!_0x1ec5dc&&(_0x1ec5dc=!![],console[_0x26c36(0xb4)](_0xb6ae1a),_0x3d885a());}),_0x5c9962['on'](_0x308ea2(0x94),()=>{!_0x1ec5dc&&(_0x1ec5dc=!![],_0x3d885a());}),_0x5c9962['on']('spawn',()=>{const _0x44a196=_0x308ea2;!_0x1ec5dc&&_0x5c9962[_0x44a196(0xbd)]&&(_0x5c9962[_0x44a196(0xbd)]['on'](_0x44a196(0xa5),()=>{}),_0x5c9962[_0x44a196(0xbd)][_0x44a196(0xb0)](_0xb6ae1a),_0x5c9962[_0x44a196(0xbd)]['end']());}),!_0x5c9962[_0x308ea2(0xbd)]&&(!_0x1ec5dc&&(_0x1ec5dc=!![],console[_0x308ea2(0xb4)](_0xb6ae1a),_0x3d885a()));}):(console['log'](_0xb6ae1a),Promise['resolve']());}export async function handleSDKOutput(_0x1c1397,_0x4d87a0){const _0x28ed51=a44_0x57ea,_0x2d94aa=resolveOutputOptions(_0x4d87a0),_0x4015a2=await formatSDKOutput(_0x1c1397,_0x2d94aa);await writeOutput(_0x4015a2,_0x2d94aa[_0x28ed51(0xae)]||undefined,_0x2d94aa['format']);}export async function handleQueryOutput(_0xf5fc91,_0x4fcccb){const _0x52ace8=a44_0x57ea,_0x38e68e=resolveOutputOptions(_0x4fcccb),_0x8cd1f1=await formatQueryOutput(_0xf5fc91,_0x38e68e);await writeOutput(_0x8cd1f1,_0x38e68e['output']||undefined,_0x38e68e[_0x52ace8(0x96)]);}function a44_0x57ea(_0x1af6b8,_0x7504d){_0x1af6b8=_0x1af6b8-0x91;const _0x354b80=a44_0x354b();let _0x57ea21=_0x354b80[_0x1af6b8];return _0x57ea21;}async function formatSingleObject(_0x2d3908,_0x5eed64){const _0xfc51db=a44_0x57ea,{format:_0x18d4c1,color:_0x530eff,noColor:_0x4a07ea}=_0x5eed64,_0x3f4e7c={'color':_0x530eff,'noColor':_0x4a07ea};if(_0x18d4c1==='json'){if(shouldUseColor(_0x3f4e7c))return colorizeJSON(_0x2d3908,_0x3f4e7c);return JSON[_0xfc51db(0xa2)](_0x2d3908,null,0x2);}else{if(_0x18d4c1===_0xfc51db(0xbb)){if(shouldUseColor(_0x3f4e7c))return colorizeJSONCompact(_0x2d3908,_0x3f4e7c);return JSON[_0xfc51db(0xa2)](_0x2d3908);}else{if(_0x18d4c1===_0xfc51db(0xb1))return Object[_0xfc51db(0xb5)](_0x2d3908)['map'](([_0x3f4318,_0x293cb2])=>_0x3f4318+'\x09'+_0x293cb2)[_0xfc51db(0x97)]('\x0a');else{const _0x458fce=Object[_0xfc51db(0xb5)](_0x2d3908);if(_0x458fce[_0xfc51db(0xac)]===0x0)return _0xfc51db(0xa8);const _0x3d69e5=_0x2d3908[_0xfc51db(0xd6)],_0x1381ff=_0x2d3908[_0xfc51db(0xa1)],_0x2dd511=_0x2d3908[_0xfc51db(0xb9)],_0x5e887e=_0x2d3908[_0xfc51db(0x99)],_0x3cf269=_0x1381ff?typeof _0x1381ff===_0xfc51db(0xbf)?_0x1381ff:JSON[_0xfc51db(0xa2)](_0x1381ff,null,0x2):undefined,_0x6744f3=_0x2dd511&&Object[_0xfc51db(0xcd)](_0x2dd511)[_0xfc51db(0xac)]>0x0?JSON[_0xfc51db(0xa2)](_0x2dd511,null,0x2):undefined,_0x18f79d=_0x5e887e&&Object[_0xfc51db(0xcd)](_0x5e887e)['length']>0x0?JSON[_0xfc51db(0xa2)](_0x5e887e,null,0x2):undefined,_0x2e2799=_0x458fce[_0xfc51db(0xab)](([_0x5e5e26])=>_0x5e5e26!==_0xfc51db(0xd6)&&_0x5e5e26!==_0xfc51db(0xa1)&&_0x5e5e26!=='params'&&_0x5e5e26!==_0xfc51db(0x99)),_0x453413=Math[_0xfc51db(0xb7)](..._0x2e2799[_0xfc51db(0xa9)](([_0x4d3eb0])=>_0x4d3eb0[_0xfc51db(0xac)])),_0x2ee7ff=Math[_0xfc51db(0xb7)](..._0x2e2799[_0xfc51db(0xa9)](([,_0x3397a8])=>{const _0x40cdd4=_0xfc51db;try{const _0x522f96=_0x3397a8===null||_0x3397a8===undefined?'':typeof _0x3397a8==='object'?JSON[_0x40cdd4(0xa2)](_0x3397a8):String(_0x3397a8),_0xf34170=_0x522f96[_0x40cdd4(0x98)]('\x0a');return Math[_0x40cdd4(0xb7)](..._0xf34170[_0x40cdd4(0xa9)](_0x30a115=>_0x30a115['length']),0x0);}catch{return 0x0;}}),0x14),_0x4f331c=[];_0x4f331c['push'](colorBorder('┌─'+'─'[_0xfc51db(0x95)](_0x453413)+_0xfc51db(0xc5)+'─'[_0xfc51db(0x95)](_0x2ee7ff)+'─┐',_0x3f4e7c)),_0x2e2799[_0xfc51db(0xd1)](([_0x3d6a1b,_0x13775d])=>{const _0xa20379=_0xfc51db;let _0x486260;try{_0x486260=_0x13775d===null||_0x13775d===undefined?'':typeof _0x13775d==='object'?JSON[_0xa20379(0xa2)](_0x13775d):String(_0x13775d);}catch{_0x486260=_0xa20379(0xb6);}const _0x452204=_0x3d6a1b[_0xa20379(0xd3)](_0x453413),_0x5a0388=_0x486260[_0xa20379(0x98)]('\x0a');_0x5a0388['forEach']((_0x363c27,_0x3bf639)=>{const _0x2508c8=_0xa20379,_0x41c784=colorBorder('│',_0x3f4e7c);_0x3bf639===0x0?_0x4f331c[_0x2508c8(0x93)](_0x41c784+'\x20'+_0x452204+'\x20'+_0x41c784+'\x20'+_0x363c27[_0x2508c8(0xd3)](_0x2ee7ff)+'\x20'+_0x41c784):_0x4f331c[_0x2508c8(0x93)](_0x41c784+'\x20'+'\x20'[_0x2508c8(0x95)](_0x453413)+'\x20'+_0x41c784+'\x20'+_0x363c27[_0x2508c8(0xd3)](_0x2ee7ff)+'\x20'+_0x41c784);});}),_0x4f331c[_0xfc51db(0x93)](colorBorder('└─'+'─'[_0xfc51db(0x95)](_0x453413)+_0xfc51db(0xa6)+'─'['repeat'](_0x2ee7ff)+'─┘',_0x3f4e7c));_0x3cf269&&(_0x4f331c[_0xfc51db(0x93)](''),_0x4f331c[_0xfc51db(0x93)](String(a44_0x12fb69['yellow'][_0xfc51db(0xc1)]('[query]'))),_0x4f331c[_0xfc51db(0x93)](_0x3cf269));_0x6744f3&&(_0x4f331c[_0xfc51db(0x93)](''),_0x4f331c[_0xfc51db(0x93)](String(a44_0x12fb69[_0xfc51db(0x9a)]['bold'](_0xfc51db(0xb8)))),_0x4f331c[_0xfc51db(0x93)](_0x6744f3));_0x18f79d&&(_0x4f331c[_0xfc51db(0x93)](''),_0x4f331c[_0xfc51db(0x93)](String(a44_0x12fb69['magenta'][_0xfc51db(0xc1)](_0xfc51db(0xc6)))),_0x4f331c[_0xfc51db(0x93)](_0x18f79d));if(_0x3d69e5){if(_0x3d69e5[_0xfc51db(0xc4)]){_0x4f331c[_0xfc51db(0x93)](''),_0x4f331c[_0xfc51db(0x93)](String(a44_0x12fb69[_0xfc51db(0xc9)][_0xfc51db(0xc1)](_0xfc51db(0xd5))));const _0x132dbf=_0x3d69e5[_0xfc51db(0xc4)][_0xfc51db(0x98)]('\x0a');_0x132dbf[_0xfc51db(0xd1)](_0x565e4d=>{const _0x2ae512=_0xfc51db;_0x565e4d[_0x2ae512(0xa0)]()&&_0x4f331c['push'](_0x565e4d);});}if(_0x3d69e5['cmdout']){_0x4f331c[_0xfc51db(0x93)](''),_0x4f331c[_0xfc51db(0x93)](String(a44_0x12fb69[_0xfc51db(0xcb)][_0xfc51db(0xc1)](_0xfc51db(0x9b))));const _0xa01246=_0x3d69e5['cmdout'][_0xfc51db(0x98)]('\x0a');_0xa01246[_0xfc51db(0xd1)](_0x1230c2=>{const _0x136856=_0xfc51db;_0x1230c2[_0x136856(0xa0)]()&&_0x4f331c['push'](_0x1230c2);});}}return _0x4f331c[_0xfc51db(0x97)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x23fe31,_0x4179b7){const _0x10b6d0=a44_0x57ea;if(_0x4179b7[_0x10b6d0(0x96)]===_0x10b6d0(0xb2)){await handleSDKOutput([_0x23fe31],_0x4179b7);return;}const _0x3cc66a=resolveOutputOptions(_0x4179b7),_0x2886cb=await formatSingleObject(_0x23fe31,_0x3cc66a);await writeOutput(_0x2886cb,_0x3cc66a[_0x10b6d0(0xae)]||undefined,_0x3cc66a['format']);}
|