@treasuredata/tdx 2026.3.8 → 2026.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +2 -2
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/profile.js.map +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.d.ts +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.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.js +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/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a51_0x56fa1c=a51_0x10a5;(function(_0x5e7696,_0xee3462){const _0x43335e=a51_0x10a5,_0x2783a1=_0x5e7696();while(!![]){try{const _0xebba11=-parseInt(_0x43335e(0x2fd))/0x1*(-parseInt(_0x43335e(0x2a0))/0x2)+-parseInt(_0x43335e(0x2db))/0x3+-parseInt(_0x43335e(0x252))/0x4*(-parseInt(_0x43335e(0x2b6))/0x5)+parseInt(_0x43335e(0x1eb))/0x6*(-parseInt(_0x43335e(0x1c5))/0x7)+-parseInt(_0x43335e(0x237))/0x8+parseInt(_0x43335e(0x1f7))/0x9*(-parseInt(_0x43335e(0x1c9))/0xa)+parseInt(_0x43335e(0x2bf))/0xb;if(_0xebba11===_0xee3462)break;else _0x2783a1['push'](_0x2783a1['shift']());}catch(_0x58a66a){_0x2783a1['push'](_0x2783a1['shift']());}}}(a51_0x5c27,0x92439));import a51_0x1e115a from'chalk';import{existsSync}from'fs';import a51_0x58f6d7 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 a51_0x20619d from'prompts';function getAttemptStatusDisplay(_0x8349b3){const _0x4e4dbc=a51_0x10a5;if(!_0x8349b3)return{'icon':'⏳','text':''};const {done:_0x54bbad,success:_0x38c1ab,cancelRequested:_0x2a05c5}=_0x8349b3;if(!_0x54bbad)return _0x2a05c5?{'icon':'🛑','text':a51_0x1e115a[_0x4e4dbc(0x2d6)](_0x4e4dbc(0x222))}:{'icon':'🔄','text':a51_0x1e115a[_0x4e4dbc(0x1df)](_0x4e4dbc(0x18a))};if(_0x38c1ab)return{'icon':'✅','text':a51_0x1e115a[_0x4e4dbc(0x17e)](_0x4e4dbc(0x178))};return{'icon':'❌','text':a51_0x1e115a[_0x4e4dbc(0x1db)](_0x4e4dbc(0x1d3))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x460e2c,_0xabbdc5,_0x587bfa=0x0){const _0x5db56c=a51_0x10a5;return _0x460e2c[_0x587bfa]||_0xabbdc5[_0x5db56c(0x17a)];}[a51_0x56fa1c(0x2dc)](_0x2e5fd8,_0x19c3c6,_0xa155f3=0x0){const _0x44c2c2=a51_0x56fa1c,_0x4e1c7f=this[_0x44c2c2(0x1d5)](_0x2e5fd8,_0x19c3c6,_0xa155f3);if(!_0x4e1c7f)return console[_0x44c2c2(0x1d3)](a51_0x1e115a[_0x44c2c2(0x1db)](_0x44c2c2(0x293)),_0x44c2c2(0x2e8)),console[_0x44c2c2(0x1d3)](a51_0x1e115a['dim'](_0x44c2c2(0x1e4))),null;return _0x4e1c7f;}[a51_0x56fa1c(0x1d4)](_0x55472e,_0x46af4b){const _0x3e6329=a51_0x56fa1c;if(_0x55472e[0x0]){const _0x5c701b=_0x55472e[0x0][_0x3e6329(0x1d0)]('.');if(_0x5c701b[_0x3e6329(0x2d7)]===0x1)return{'projectName':_0x5c701b[0x0],'workflowName':undefined};else return _0x5c701b[_0x3e6329(0x2d7)]===0x2?{'projectName':_0x5c701b[0x0],'workflowName':_0x5c701b[0x1]}:(console['error'](a51_0x1e115a['red'](_0x3e6329(0x293)),_0x3e6329(0x210)),null);}return{'projectName':_0x46af4b[_0x3e6329(0x17a)],'workflowName':undefined};}[a51_0x56fa1c(0x19b)](_0x2112c9,_0x25ef69,_0x8843ad=0x0){const _0x34f929=a51_0x56fa1c;if(_0x2112c9[_0x8843ad])return _0x2112c9[_0x8843ad];if(_0x25ef69['workflowProject']){const _0x2a04a3=a51_0x58f6d7['join'](process['cwd'](),_0x34f929(0x2e2),_0x25ef69[_0x34f929(0x17a)]);if(existsSync(a51_0x58f6d7['join'](_0x2a04a3,_0x34f929(0x1ee))))return _0x2a04a3;}return undefined;}async[a51_0x56fa1c(0x1d7)](_0x5342c4,_0x4edd07,_0x3aefd1){const _0x10f0b5=a51_0x56fa1c;try{const _0x417c68=await _0x5342c4['workflow'][_0x10f0b5(0x2e2)](_0x4edd07,{'limit':0x1});if(_0x417c68[_0x10f0b5(0x2d7)]>0x0){const _0x2a273b=_0x417c68[0x0]['id'],_0x1cbccd=getWorkflowUrl(_0x3aefd1,_0x2a273b);console[_0x10f0b5(0x1d3)](_0x10f0b5(0x1be)+a51_0x1e115a[_0x10f0b5(0x1a0)](_0x1cbccd));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x267);['description']=a51_0x56fa1c(0x1a4);async['execute'](_0x5d938b){const _0x1d32a4=a51_0x56fa1c,{options:_0x3adfa3,args:_0x29dd1e,tdx:_0x2c795c}=_0x5d938b,_0x178b0c=_0x29dd1e[0x0],_0x547922=_0x3adfa3[_0x1d32a4(0x265)];if(_0x547922)return saveSessionContext({'workflow_project':undefined},_0x3adfa3[_0x1d32a4(0x19e)]),console[_0x1d32a4(0x171)](a51_0x1e115a[_0x1d32a4(0x17e)](_0x1d32a4(0x1f0))),0x0;if(!_0x178b0c)return console[_0x1d32a4(0x1d3)](a51_0x1e115a[_0x1d32a4(0x1db)](_0x1d32a4(0x293)),'Project\x20name\x20is\x20required'),console[_0x1d32a4(0x1d3)](a51_0x1e115a[_0x1d32a4(0x2f8)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x1d32a4(0x1d3)](a51_0x1e115a['dim'](_0x1d32a4(0x16e))),0x1;const _0x478236=await withSpinner('Resolving\x20project\x20\x27'+_0x178b0c+_0x1d32a4(0x2d1),()=>_0x2c795c['workflow']['resolveProjectId'](_0x178b0c),{'verbose':_0x3adfa3['verbose']}),{name:_0x314e3b}=_0x478236[_0x1d32a4(0x2c6)];return saveSessionContext({'workflow_project':_0x314e3b},_0x3adfa3[_0x1d32a4(0x19e)]),console[_0x1d32a4(0x171)](a51_0x1e115a['green'](_0x1d32a4(0x25a)+a51_0x1e115a[_0x1d32a4(0x1a0)](_0x314e3b))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x1c2);[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x253);async['execute'](_0x4a6ca8){const _0x1f359b=a51_0x56fa1c,{options:_0x159e70,args:_0x2ddce4,tdx:_0x9edd46}=_0x4a6ca8,_0x4d8173=_0x2ddce4[0x0];_0x159e70[_0x1f359b(0x2e6)]&&_0x4d8173&&console['error'](_0x1f359b(0x1e2)+_0x4d8173);const _0x389692=await withSpinner(_0x1f359b(0x1a3),()=>_0x9edd46[_0x1f359b(0x2ea)][_0x1f359b(0x229)](_0x4d8173,{'limit':_0x159e70[_0x1f359b(0x25d)]}),{'verbose':_0x159e70[_0x1f359b(0x2e6)]});let _0x53dec0=_0x389692[_0x1f359b(0x2c6)];_0x53dec0['sort']((_0xf3196e,_0x810e49)=>_0xf3196e['name']['localeCompare'](_0x810e49['name']));const _0x10c78e=_0x159e70[_0x1f359b(0x25d)]||0x64,_0x62028d=_0x53dec0['length']>=_0x10c78e?a51_0x1e115a[_0x1f359b(0x2f8)](_0x1f359b(0x25c)):'';console['error'](_0x1f359b(0x2eb)+_0x53dec0[_0x1f359b(0x2d7)]+_0x1f359b(0x20b)+(_0x53dec0['length']!==0x1?'s':'')+_0x62028d);if(_0x159e70[_0x1f359b(0x184)]===_0x1f359b(0x18d)||_0x159e70[_0x1f359b(0x184)]===_0x1f359b(0x234)||_0x159e70[_0x1f359b(0x184)]===_0x1f359b(0x16d))await handleSDKOutput(_0x53dec0,_0x159e70);else{if(_0x53dec0[_0x1f359b(0x2d7)]===0x0)_0x4d8173?console[_0x1f359b(0x171)]('No\x20projects\x20match\x20pattern:\x20'+_0x4d8173):console[_0x1f359b(0x171)](_0x1f359b(0x274));else{const _0x3778f0=_0x53dec0[_0x1f359b(0x221)](_0x25c2c4=>{const _0x1cd13c=_0x1f359b,_0x22bebf=_0x25c2c4[_0x1cd13c(0x183)]?.[_0x1cd13c(0x259)](_0xbcecb3=>_0xbcecb3[_0x1cd13c(0x2de)]===_0x1cd13c(0x200)),_0x227442=_0x22bebf?a51_0x1e115a[_0x1cd13c(0x2f8)]('\x20(system)'):'';return _0x1cd13c(0x20c)+_0x25c2c4['name']+_0x227442;});await writeOutput(_0x3778f0[_0x1f359b(0x25f)]('\x0a'),_0x159e70[_0x1f359b(0x185)],_0x1f359b(0x290));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a51_0x56fa1c(0x1cc)]='workflow:workflows';[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x297);async['execute'](_0x11e723){const _0x11d0ec=a51_0x56fa1c,{options:_0x4a77f6,args:_0x2bc5d9,tdx:_0xe23d40}=_0x11e723,_0x1ec153=this[_0x11d0ec(0x1d5)](_0x2bc5d9,_0x4a77f6);_0x4a77f6[_0x11d0ec(0x2e6)]&&_0x1ec153&&console[_0x11d0ec(0x1d3)](_0x11d0ec(0x1ef)+_0x1ec153);const _0x276fc1=await withSpinner(_0x11d0ec(0x225),()=>_0xe23d40[_0x11d0ec(0x2ea)][_0x11d0ec(0x2e2)](_0x1ec153,{'limit':_0x4a77f6[_0x11d0ec(0x25d)]}),{'verbose':_0x4a77f6[_0x11d0ec(0x2e6)]});let _0x5a892d=_0x276fc1[_0x11d0ec(0x2c6)];_0x5a892d['sort']((_0x4160c6,_0x4e5bdc)=>{const _0x4f4b88=_0x11d0ec,_0x1e3314=_0x4160c6[_0x4f4b88(0x1cc)]['localeCompare'](_0x4e5bdc[_0x4f4b88(0x1cc)]);if(_0x1e3314!==0x0)return _0x1e3314;return(_0x4160c6[_0x4f4b88(0x248)]?.[_0x4f4b88(0x1cc)]||'')['localeCompare'](_0x4e5bdc[_0x4f4b88(0x248)]?.[_0x4f4b88(0x1cc)]||'');});const _0x445938=_0x4a77f6[_0x11d0ec(0x25d)]||0x64,_0xee83e1=_0x5a892d[_0x11d0ec(0x2d7)]>=_0x445938?a51_0x1e115a['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x11d0ec(0x1d3)]('✔\x20Found\x20'+_0x5a892d[_0x11d0ec(0x2d7)]+'\x20workflow'+(_0x5a892d[_0x11d0ec(0x2d7)]!==0x1?'s':'')+_0xee83e1);if(_0x4a77f6[_0x11d0ec(0x184)]==='json'||_0x4a77f6[_0x11d0ec(0x184)]===_0x11d0ec(0x234)||_0x4a77f6[_0x11d0ec(0x184)]===_0x11d0ec(0x16d))await handleSDKOutput(_0x5a892d,_0x4a77f6);else{if(_0x5a892d[_0x11d0ec(0x2d7)]===0x0)_0x1ec153?console[_0x11d0ec(0x171)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x1ec153):console[_0x11d0ec(0x171)](_0x11d0ec(0x2b4));else{const _0x3c1afb=_0x4a77f6[_0x11d0ec(0x2dd)],_0x3ea086=_0x5a892d[_0x11d0ec(0x221)](_0x1b19ce=>{const _0x2cf2f9=_0x11d0ec,_0x54fffb=a51_0x1e115a[_0x2cf2f9(0x2f8)]('#'+_0x1b19ce['id']),_0x12fa1d=hyperlink(_0x54fffb,getWorkflowUrl(_0x3c1afb,_0x1b19ce['id'])),_0x54bef5=_0x1b19ce[_0x2cf2f9(0x248)]?.[_0x2cf2f9(0x1cc)]?a51_0x1e115a['dim']('\x20('+_0x1b19ce[_0x2cf2f9(0x248)][_0x2cf2f9(0x1cc)]+')'):'';return _0x2cf2f9(0x273)+_0x12fa1d+'\x20'+_0x1b19ce[_0x2cf2f9(0x1cc)]+_0x54bef5;});await writeOutput(_0x3ea086[_0x11d0ec(0x25f)]('\x0a'),_0x4a77f6['output'],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a51_0x56fa1c(0x1cc)]='workflow:sessions';['description']=a51_0x56fa1c(0x28e);async['execute'](_0x3e073a){const _0x8e683d=a51_0x56fa1c,{options:_0xada4d5,args:_0x3e6aa1,tdx:_0x2e4bab}=_0x3e073a,_0x30cf77=this[_0x8e683d(0x1d4)](_0x3e6aa1,_0xada4d5);if(!_0x30cf77)return 0x1;const {projectName:_0x16357c,workflowName:_0x160aa0}=_0x30cf77;if(_0xada4d5['verbose']){if(_0x16357c&&_0x160aa0)console[_0x8e683d(0x1d3)](_0x8e683d(0x190)+_0x16357c+'.'+_0x160aa0);else _0x16357c&&console['error']('Filter:\x20project='+_0x16357c);const _0x2b33ec=_0xada4d5[_0x8e683d(0x23a)];_0x2b33ec&&console[_0x8e683d(0x1d3)](_0x8e683d(0x21e)+_0x2b33ec);}let _0x46d7c4=0x28;if(process['stdout'][_0x8e683d(0x2cc)]&&!_0xada4d5[_0x8e683d(0x185)]&&!_0xada4d5['format']){const _0x4947d5=process['stdout']['rows']||0x28;_0x46d7c4=Math[_0x8e683d(0x22c)](0x14,Math['floor'](_0x4947d5*0x2/0x3));}const _0x3f978a=_0xada4d5[_0x8e683d(0x25d)]||_0x46d7c4,_0x680678=await withSpinner(_0x8e683d(0x283),()=>_0x2e4bab[_0x8e683d(0x2ea)]['sessions']({'projectName':_0x16357c,'workflowName':_0x160aa0,'status':_0xada4d5[_0x8e683d(0x23a)],'fromTime':_0xada4d5['from'],'toTime':_0xada4d5['to'],'limit':_0x3f978a}),{'verbose':_0xada4d5['verbose']}),_0x9ca84a=_0x680678[_0x8e683d(0x2c6)];_0x9ca84a['sort']((_0x4b61de,_0x45d782)=>{const _0x2c970d=_0x8e683d,_0x1eb3fc=_0x4b61de['sessionTime']||'',_0x38e78d=_0x45d782[_0x2c970d(0x2c4)]||'';return _0x38e78d[_0x2c970d(0x2e7)](_0x1eb3fc);});_0x9ca84a[_0x8e683d(0x2d7)]>=_0x3f978a?console[_0x8e683d(0x1d3)]('✔\x20Showing\x20'+_0x9ca84a[_0x8e683d(0x2d7)]+_0x8e683d(0x165)+a51_0x1e115a[_0x8e683d(0x2f8)](_0x8e683d(0x2a7))):console[_0x8e683d(0x1d3)]('✔\x20Found\x20'+_0x9ca84a['length']+'\x20session'+(_0x9ca84a[_0x8e683d(0x2d7)]!==0x1?'s':''));if(_0xada4d5[_0x8e683d(0x184)]==='json'||_0xada4d5[_0x8e683d(0x184)]===_0x8e683d(0x234)||_0xada4d5['format']==='table')await handleSDKOutput(_0x9ca84a,_0xada4d5);else{if(!process['stdout'][_0x8e683d(0x2cc)]||_0xada4d5[_0x8e683d(0x185)]){if(_0x9ca84a[_0x8e683d(0x2d7)]===0x0){if(_0x16357c&&_0x160aa0)console['log'](_0x8e683d(0x188)+_0x16357c+'.'+_0x160aa0);else _0x16357c?console[_0x8e683d(0x171)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x16357c):console[_0x8e683d(0x171)](_0x8e683d(0x29d));}else{const _0x113928=_0xada4d5[_0x8e683d(0x2dd)],_0x3bbae4=this[_0x8e683d(0x2bb)](_0x9ca84a,_0x113928);_0xada4d5['output']?await writeOutput(_0x3bbae4,_0xada4d5['output'],'list'):console[_0x8e683d(0x171)](_0x3bbae4);}!_0x16357c&&(console[_0x8e683d(0x1d3)](''),console['error'](a51_0x1e115a[_0x8e683d(0x2f8)](_0x8e683d(0x1cf))),console[_0x8e683d(0x1d3)](a51_0x1e115a[_0x8e683d(0x2f8)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a51_0x1e115a['dim'](_0x8e683d(0x25b))));}else{if(_0x9ca84a[_0x8e683d(0x2d7)]===0x0){if(_0x16357c&&_0x160aa0)console['log'](_0x8e683d(0x188)+_0x16357c+'.'+_0x160aa0);else _0x16357c?console[_0x8e683d(0x171)](_0x8e683d(0x2d8)+_0x16357c):console['log']('No\x20sessions\x20found');}else await this[_0x8e683d(0x1bf)](_0x9ca84a,_0x3e073a,_0x16357c);}}return 0x0;}['renderSessionsTimeline'](_0x125043,_0x508f27){const _0x417ad5=a51_0x56fa1c,_0x36926c=[],_0x3b9a56=new Map();let _0x44a231=Infinity,_0x4f212e=-Infinity;for(const _0xb2c482 of _0x125043){if(_0xb2c482[_0x417ad5(0x1e1)]?.[_0x417ad5(0x287)]){const _0x247269=new Date(_0xb2c482[_0x417ad5(0x1e1)][_0x417ad5(0x287)])[_0x417ad5(0x161)](),_0x31aa33=_0xb2c482[_0x417ad5(0x1e1)][_0x417ad5(0x20d)]?new Date(_0xb2c482[_0x417ad5(0x1e1)][_0x417ad5(0x20d)])[_0x417ad5(0x161)]():Date[_0x417ad5(0x1cb)](),_0xa22001=_0xb2c482[_0x417ad5(0x248)]?.[_0x417ad5(0x1cc)]||'(unknown)';!_0x3b9a56[_0x417ad5(0x24c)](_0xa22001)&&_0x3b9a56[_0x417ad5(0x172)](_0xa22001,[]),_0x3b9a56[_0x417ad5(0x280)](_0xa22001)[_0x417ad5(0x213)]({'session':_0xb2c482,'startTime':_0x247269,'endTime':_0x31aa33,'duration':_0x31aa33-_0x247269}),_0x44a231=Math[_0x417ad5(0x1c4)](_0x44a231,_0x247269),_0x4f212e=Math['max'](_0x4f212e,_0x31aa33);}}if(_0x3b9a56[_0x417ad5(0x275)]===0x0)return _0x417ad5(0x1ac);const _0x4e4dcd=process[_0x417ad5(0x1fb)][_0x417ad5(0x1e5)]||0x78,_0x553129=0x1e,_0x31b081=0x32,_0x239bdc=0x4,_0x264552=Math['min'](_0x31b081,Math['max'](_0x553129,Math[_0x417ad5(0x193)](_0x4e4dcd*0.3))),_0x47ac51=_0x4e4dcd-_0x264552-TIMELINE_CONFIG['GUTTER']-0x3-_0x239bdc,_0x188df3=_0x4f212e-_0x44a231,_0x5b6342=_0x188df3/_0x264552,_0x390398=renderTimeAxis({'startTime':_0x44a231,'endTime':_0x4f212e,'durationMs':_0x188df3,'msPerChar':_0x5b6342},_0x264552),_0x5ebb8c=[];for(const _0x2cff9b of _0x3b9a56[_0x417ad5(0x216)]()){_0x5ebb8c[_0x417ad5(0x213)](..._0x2cff9b);}_0x5ebb8c['sort']((_0x52f43a,_0x10dbe5)=>_0x10dbe5[_0x417ad5(0x272)]-_0x52f43a[_0x417ad5(0x272)]);const _0x120df0=new Date(_0x44a231),_0x2c17f7=formatDate(_0x120df0),_0x5e8a36=_0x239bdc+TIMELINE_CONFIG[_0x417ad5(0x1c3)]+TIMELINE_CONFIG[_0x417ad5(0x241)]+_0x47ac51,_0x485137='\x20'['repeat'](_0x5e8a36-_0x2c17f7[_0x417ad5(0x2d7)]),_0x3d8042=_0x485137+a51_0x1e115a[_0x417ad5(0x2f8)](_0x2c17f7)+'\x20'+_0x390398;_0x36926c[_0x417ad5(0x213)](_0x3d8042);const _0x5f1c13=0x16;let _0x18d8f5=0x0;for(const _0x52fc39 of _0x5ebb8c){const _0x317a03=_0x52fc39[_0x417ad5(0x19e)][_0x417ad5(0x248)]?.['name']||'?',_0x1bb187=Math[_0x417ad5(0x1c4)](stringWidth(_0x317a03),_0x5f1c13);_0x18d8f5=Math[_0x417ad5(0x22c)](_0x18d8f5,_0x1bb187);}for(const _0x54b3c4 of _0x5ebb8c){const {session:_0x2ad3e6,startTime:_0x2c0c73,endTime:_0x1ec7c8,duration:_0x5c79ac}=_0x54b3c4,_0x3c8937=_0x2ad3e6['project']?.['id'],_0x3c6cb3=_0x2ad3e6['id'],_0x242730=_0x2ad3e6['project']?.[_0x417ad5(0x1cc)]||'?',_0xe292b8=_0x2ad3e6['workflow']?.[_0x417ad5(0x1cc)]||'?';let _0x10afc6,_0x21e08b;if(_0x2ad3e6[_0x417ad5(0x1e1)]){const _0x122616=_0x2ad3e6['lastAttempt'];!_0x122616[_0x417ad5(0x2ec)]?(_0x10afc6=_0x122616[_0x417ad5(0x278)]?'🛑':'🔄',_0x21e08b=_0x122616[_0x417ad5(0x278)]?a51_0x1e115a[_0x417ad5(0x2d6)]:a51_0x1e115a[_0x417ad5(0x1df)]):(_0x10afc6=_0x122616['success']?'✅':'❌',_0x21e08b=_0x122616[_0x417ad5(0x178)]?a51_0x1e115a['green']:a51_0x1e115a['red']);}else _0x10afc6='⏳',_0x21e08b=a51_0x1e115a['dim'];const _0x398b95='#'+_0x3c6cb3,_0x154940=_0x3c8937?hyperlink(_0x398b95,getWorkflowSessionUrl(_0x508f27,_0x3c8937,_0x3c6cb3)):_0x398b95;let _0x1414fd=_0x242730;stringWidth(_0x242730)>_0x5f1c13&&(_0x1414fd=_0x242730[_0x417ad5(0x208)](0x0,_0x5f1c13-0x1)+'…');const _0x388949=a51_0x1e115a[_0x417ad5(0x2f8)](_0x1414fd),_0x1e377a=stringWidth(_0x1414fd),_0x36b00e='\x20'[_0x417ad5(0x1d2)](_0x18d8f5-stringWidth(_0x1414fd)+0x2),_0x5e6e6b='('+formatElapsed(_0x5c79ac)+')',_0x15dbbc=stringWidth(_0x5e6e6b),_0x5f0a82=stringWidth(_0x398b95),_0x5758db=_0x5f0a82+0x1+_0x1e377a+_0x36b00e['length'],_0x678446=_0x47ac51-_0x5758db-_0x15dbbc-0x1-0x8;let _0x38d180=_0xe292b8;stringWidth(_0x38d180)>_0x678446&&(_0x38d180=_0x38d180[_0x417ad5(0x208)](0x0,_0x678446-0x1)+'…');const _0x38b23f=_0x154940+'\x20'+_0x388949+_0x36b00e+_0x38d180,_0x550bc3=stringWidth(_0x38b23f),_0x2c8b9d=_0x47ac51-_0x550bc3-_0x15dbbc,_0x40f74a=_0x38b23f+'\x20'['repeat'](Math['max'](0x1,_0x2c8b9d))+a51_0x1e115a[_0x417ad5(0x2f8)](_0x5e6e6b),_0x17d5e9=Math[_0x417ad5(0x193)]((_0x2c0c73-_0x44a231)/_0x5b6342),_0x309367=Math[_0x417ad5(0x193)]((_0x1ec7c8-_0x44a231)/_0x5b6342),_0x4e6a52=Math['max'](_0x17d5e9+0x1,_0x309367),_0x12b045=new Array(_0x264552)[_0x417ad5(0x2df)]('\x20');for(let _0x438a12=_0x17d5e9;_0x438a12<Math[_0x417ad5(0x1c4)](_0x4e6a52,_0x264552);_0x438a12++){_0x12b045[_0x438a12]='─';}const _0x143e42=_0x12b045[_0x417ad5(0x221)](_0x1b9728=>_0x1b9728==='\x20'?'\x20':_0x21e08b(_0x1b9728))['join']('');_0x36926c[_0x417ad5(0x213)](_0x10afc6+'\x20'+_0x40f74a+'│'+_0x143e42+'│');}return _0x36926c['join']('\x0a');}async[a51_0x56fa1c(0x1bf)](_0x36ebcf,_0x3f4cb6,_0x8be509){const _0x18094e=a51_0x56fa1c,{options:_0x1dd0bc,tdx:_0x23f38c}=_0x3f4cb6,_0x32fd6e=_0x1dd0bc[_0x18094e(0x2dd)],{timelineRows:_0x17eac8,timeAxisHeader:_0x1fe8ae}=this[_0x18094e(0x1f3)](_0x36ebcf,_0x32fd6e),_0x45de95=_0x17eac8['filter'](_0x2a95d1=>_0x2a95d1['attemptId']);if(_0x45de95['length']===0x0){const _0x15ddba=this[_0x18094e(0x2bb)](_0x36ebcf,_0x32fd6e);console[_0x18094e(0x171)](_0x15ddba);!_0x8be509&&(console[_0x18094e(0x1d3)](''),console[_0x18094e(0x1d3)](a51_0x1e115a['dim'](_0x18094e(0x1cf))),console[_0x18094e(0x1d3)](a51_0x1e115a[_0x18094e(0x2f8)](_0x18094e(0x1bb))+'or'+a51_0x1e115a[_0x18094e(0x2f8)](_0x18094e(0x25b))));return;}_0x1fe8ae&&console['log'](_0x1fe8ae);const _0x3ba5ef=_0x17eac8[_0x18094e(0x2ce)](_0x357e92=>_0x357e92['attemptId'])[_0x18094e(0x221)](_0x5677c6=>({'title':_0x5677c6[_0x18094e(0x175)],'value':_0x5677c6[_0x18094e(0x258)]})),_0x1c62f1=process[_0x18094e(0x1fb)][_0x18094e(0x2a5)]||0x3c,_0x535e04=Math[_0x18094e(0x22c)](0x28,Math[_0x18094e(0x193)](_0x1c62f1*0x2/0x3)),_0xef777=await a51_0x20619d({'type':_0x18094e(0x20a),'name':_0x18094e(0x258),'message':_0x18094e(0x191),'choices':_0x3ba5ef,'initial':-0x1,'limit':_0x535e04,'clearFirst':!![],'fallback':{'title':_0x18094e(0x1ad),'value':null},'suggest':(_0x4a0323,_0x4cac8b)=>{const _0x1464f9=_0x18094e;if(!_0x4a0323)return Promise[_0x1464f9(0x286)](_0x4cac8b);const _0x1334b9=_0x4cac8b[_0x1464f9(0x2ce)](_0x3a5362=>{const _0x917aba=_0x1464f9,_0x448385=_0x3a5362;return _0x448385[_0x917aba(0x239)][_0x917aba(0x255)]()[_0x917aba(0x281)](_0x4a0323[_0x917aba(0x255)]());});return Promise[_0x1464f9(0x286)](_0x1334b9);}}),_0x470783=()=>{const _0x222935=_0x18094e;process[_0x222935(0x1fb)]['write'](_0x222935(0x254)),process[_0x222935(0x1fb)][_0x222935(0x15f)](_0x222935(0x254)),process[_0x222935(0x1fb)][_0x222935(0x15f)]('\x1b[1A\x1b[2K');},_0x565d40=_0xef777&&_0xef777[_0x18094e(0x258)]&&_0xef777[_0x18094e(0x258)]!==null&&_0xef777[_0x18094e(0x258)][_0x18094e(0x2bc)]()!=='';if(!_0x565d40){_0x470783(),console['log'](a51_0x1e115a[_0x18094e(0x2f8)](_0x18094e(0x207)));return;}_0x470783();const _0x497476=_0x36ebcf[_0x18094e(0x2ba)](_0x533cf4=>_0x533cf4[_0x18094e(0x1e1)]?.['id']===_0xef777[_0x18094e(0x258)]);if(_0x497476){const _0x5680f5=_0x497476[_0x18094e(0x248)]?.['name']||'?',_0x2bb101=_0x497476['workflow']?.[_0x18094e(0x1cc)]||'?';console[_0x18094e(0x171)](_0x18094e(0x27d)+a51_0x1e115a[_0x18094e(0x2f8)](_0x5680f5)+',\x20Workflow:\x20'+a51_0x1e115a[_0x18094e(0x2f8)](_0x2bb101));}const _0x3ad580=new WorkflowTimelineCommand();await _0x3ad580[_0x18094e(0x192)]({'args':[],'options':{..._0x1dd0bc,'attemptId':_0xef777[_0x18094e(0x258)]},'tdx':_0x23f38c});}[a51_0x56fa1c(0x1f3)](_0x4f3675,_0x4db85c){const _0x56d98c=a51_0x56fa1c,_0x34f677=new Map();for(const _0x496321 of _0x4f3675){_0x496321['id']&&_0x496321[_0x56d98c(0x1e1)]?.['id']&&_0x34f677[_0x56d98c(0x172)](_0x496321['id'],_0x496321[_0x56d98c(0x1e1)]['id']);}const _0x1b309c=[];let _0x107571='';const _0x224678=this[_0x56d98c(0x2bb)](_0x4f3675,_0x4db85c),_0x25094e=_0x224678['split']('\x0a');for(const _0x2b0ca8 of _0x25094e){if(_0x2b0ca8['startsWith'](_0x56d98c(0x1bc))||_0x2b0ca8[_0x56d98c(0x219)](/^\s+\d{4}-\d{2}-\d{2}/))_0x107571=_0x2b0ca8;else{if(_0x2b0ca8[_0x56d98c(0x219)](/^[✅❌🔄🛑⏳]/)){const _0x4d4e0b=_0x2b0ca8['match'](/#(\d+)/),_0x30d708=_0x4d4e0b?_0x4d4e0b[0x1]:null,_0x420ef1=_0x30d708?_0x34f677[_0x56d98c(0x280)](_0x30d708)||null:null,_0x882ca7=_0x4f3675['find'](_0x57ade8=>_0x57ade8['id']===_0x30d708),_0x397cf4=_0x882ca7?.['project']?.[_0x56d98c(0x1cc)]||'';_0x1b309c[_0x56d98c(0x213)]({'displayLine':_0x2b0ca8,'attemptId':_0x420ef1,'projectName':_0x397cf4});}}}return{'timelineRows':_0x1b309c,'timeAxisHeader':_0x107571};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a51_0x56fa1c(0x1cc)]='workflow:attempts';[a51_0x56fa1c(0x198)]='List\x20workflow\x20attempts';async[a51_0x56fa1c(0x192)](_0x5bff5a){const _0x563884=a51_0x56fa1c,{options:_0x505017,args:_0x433950,tdx:_0x396de6}=_0x5bff5a,_0x35db7a=this[_0x563884(0x1d4)](_0x433950,_0x505017);if(!_0x35db7a)return 0x1;const {projectName:_0x5652a6,workflowName:_0x2789bc}=_0x35db7a,_0x5d2fca=_0x505017['includeRetried'];if(_0x505017[_0x563884(0x2e6)]){if(_0x5652a6&&_0x2789bc)console[_0x563884(0x1d3)](_0x563884(0x190)+_0x5652a6+'.'+_0x2789bc);else _0x5652a6&&console[_0x563884(0x1d3)](_0x563884(0x2d3)+_0x5652a6);_0x5d2fca&&console['error'](_0x563884(0x1ec));}const _0x4aa924=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x396de6[_0x563884(0x2ea)][_0x563884(0x2ef)]({'projectName':_0x5652a6,'workflowName':_0x2789bc,'includeRetried':_0x5d2fca,'limit':_0x505017['limit']}),{'verbose':_0x505017[_0x563884(0x2e6)]}),_0x4304d4=_0x4aa924[_0x563884(0x2c6)],_0x38a5b1=_0x505017[_0x563884(0x25d)]||0x64,_0x452a58=_0x4304d4[_0x563884(0x2d7)]>=_0x38a5b1?a51_0x1e115a[_0x563884(0x2f8)](_0x563884(0x25c)):'';console['error'](_0x563884(0x2eb)+_0x4304d4[_0x563884(0x2d7)]+'\x20attempt'+(_0x4304d4[_0x563884(0x2d7)]!==0x1?'s':'')+_0x452a58);if(_0x505017[_0x563884(0x184)]===_0x563884(0x18d)||_0x505017['format']===_0x563884(0x234)||_0x505017['format']===_0x563884(0x16d))await handleSDKOutput(_0x4304d4,_0x505017);else{if(_0x4304d4['length']===0x0){if(_0x5652a6&&_0x2789bc)console[_0x563884(0x171)]('No\x20attempts\x20found\x20for:\x20'+_0x5652a6+'.'+_0x2789bc);else _0x5652a6?console['log'](_0x563884(0x226)+_0x5652a6):console[_0x563884(0x171)](_0x563884(0x29a));}else{const _0xb041d3=_0x505017[_0x563884(0x2dd)],_0x503b25=_0x4304d4['map'](_0x3ebd31=>{const _0x357239=_0x563884,_0x2911e9=a51_0x1e115a[_0x357239(0x2f8)]('#'+_0x3ebd31['id']),_0xcd701f=_0x3ebd31[_0x357239(0x248)]?.['id'],_0x3ff0aa=_0x3ebd31['session_id']||_0x3ebd31['sessionId'],_0x44afb5=_0xcd701f&&_0x3ff0aa?hyperlink(_0x2911e9,getWorkflowAttemptUrl(_0xb041d3,_0xcd701f,_0x3ff0aa,_0x3ebd31['id'])):_0x2911e9,{icon:_0x115c4b,text:_0x7ac0e3}=getAttemptStatusDisplay(_0x3ebd31),_0x4860e9=(_0x3ebd31[_0x357239(0x248)]?.[_0x357239(0x1cc)]||'?')+'.'+(_0x3ebd31['workflow']?.[_0x357239(0x1cc)]||'?'),_0x45ee0a=_0x3ebd31['sessionTime']?a51_0x1e115a['dim'](_0x3ebd31[_0x357239(0x2c4)]):'';return(_0x44afb5+'\x20'+_0x115c4b+(_0x7ac0e3?'\x20'+_0x7ac0e3:'')+'\x20'+_0x4860e9+'\x20'+_0x45ee0a)[_0x357239(0x2ae)]();});await writeOutput(_0x503b25[_0x563884(0x25f)]('\x0a'),_0x505017[_0x563884(0x185)],_0x563884(0x290));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x1ed);[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x291);async['execute'](_0x5b1a18){const _0x189354=a51_0x56fa1c,{options:_0x3e37c4,args:_0x2d09f0,tdx:_0x27dc70}=_0x5b1a18,_0x19621f=_0x2d09f0[0x0];if(!_0x19621f)return console['error'](_0x189354(0x1af)),0x1;_0x3e37c4['verbose']&&console[_0x189354(0x1d3)](_0x189354(0x249)+_0x19621f);const _0x380e4e=await withSpinner(_0x189354(0x1b2),()=>_0x27dc70[_0x189354(0x2ea)][_0x189354(0x302)](_0x19621f),{'verbose':_0x3e37c4[_0x189354(0x2e6)]}),_0x22b5d3=_0x380e4e['data'];let _0x2e75d6;!_0x22b5d3[_0x189354(0x2ec)]?_0x2e75d6=_0x22b5d3[_0x189354(0x278)]?'canceling':_0x189354(0x18a):_0x2e75d6=_0x22b5d3[_0x189354(0x178)]?'success':_0x189354(0x1d3);let _0x2127ec;if(_0x22b5d3[_0x189354(0x287)]&&_0x22b5d3[_0x189354(0x20d)]){const _0x430b41=new Date(_0x22b5d3[_0x189354(0x287)])[_0x189354(0x161)](),_0x14493d=new Date(_0x22b5d3[_0x189354(0x20d)])['getTime']();_0x2127ec=Math[_0x189354(0x169)]((_0x14493d-_0x430b41)/0x3e8);}const _0x2962ab={'attempt_id':_0x22b5d3['id'],'status':_0x2e75d6,..._0x22b5d3[_0x189354(0x29b)]!==undefined&&{'index':_0x22b5d3[_0x189354(0x29b)]},..._0x22b5d3[_0x189354(0x248)]&&{'project':_0x22b5d3[_0x189354(0x248)][_0x189354(0x1cc)]},..._0x22b5d3[_0x189354(0x2ea)]&&{'workflow':_0x22b5d3['workflow'][_0x189354(0x1cc)]},..._0x22b5d3[_0x189354(0x167)]&&{'session_id':_0x22b5d3[_0x189354(0x167)]},..._0x22b5d3[_0x189354(0x2c4)]&&{'session_time':_0x22b5d3[_0x189354(0x2c4)]},..._0x22b5d3['retryAttemptName']&&{'retry_attempt':_0x22b5d3[_0x189354(0x29c)]},..._0x2127ec!==undefined&&{'duration_sec':_0x2127ec},..._0x22b5d3['createdAt']&&{'created_at':_0x22b5d3['createdAt']},..._0x22b5d3[_0x189354(0x20d)]&&{'finished_at':_0x22b5d3['finishedAt']},...Object[_0x189354(0x1a1)](_0x22b5d3[_0x189354(0x2da)])[_0x189354(0x2d7)]>0x0&&{'params':_0x22b5d3['params']}};return await handleSingleObjectOutput(_0x2962ab,_0x3e37c4),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x2c2);[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x182);async['execute'](_0x23cf1c){const _0x5c389c=a51_0x56fa1c,{options:_0x2be861,args:_0x3db960,tdx:_0x4454a8}=_0x23cf1c,_0x2ad5f4=_0x3db960[0x0];if(!_0x2ad5f4)return console[_0x5c389c(0x1d3)](_0x5c389c(0x1af)),0x1;const _0x2c6b69=_0x2be861[_0x5c389c(0x2a6)];_0x2be861[_0x5c389c(0x2e6)]&&(console[_0x5c389c(0x1d3)](_0x5c389c(0x249)+_0x2ad5f4),_0x2c6b69&&console[_0x5c389c(0x1d3)](_0x5c389c(0x2c0)));const _0x5df4f7=await withSpinner(_0x5c389c(0x2b1),()=>_0x4454a8['workflow'][_0x5c389c(0x1cd)](_0x2ad5f4,_0x2c6b69||![]),{'verbose':_0x2be861[_0x5c389c(0x2e6)]}),_0x55e1f3=_0x5df4f7['data'];return console[_0x5c389c(0x1d3)](_0x5c389c(0x2eb)+_0x55e1f3[_0x5c389c(0x2d7)]+_0x5c389c(0x1ca)+(_0x55e1f3[_0x5c389c(0x2d7)]!==0x1?'s':'')),await handleSDKOutput(_0x55e1f3,_0x2be861),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]='workflow:logs';['description']=a51_0x56fa1c(0x174);async['execute'](_0x1e1693){const _0x109ad=a51_0x56fa1c,{options:_0x18bd88,args:_0xf91004,tdx:_0x126b41}=_0x1e1693,_0x4f65dc=_0xf91004[0x0];let _0x1bea13=_0xf91004[0x1];if(!_0x4f65dc)return console[_0x109ad(0x1d3)](_0x109ad(0x1af)),0x1;_0x18bd88[_0x109ad(0x2e6)]&&(console[_0x109ad(0x1d3)](_0x109ad(0x249)+_0x4f65dc),_0x1bea13&&console[_0x109ad(0x1d3)]('Task\x20name:\x20'+_0x1bea13));const _0x4b78ca=await withSpinner(_0x109ad(0x187),()=>_0x126b41[_0x109ad(0x2ea)][_0x109ad(0x19c)](_0x4f65dc,_0x1bea13),{'verbose':_0x18bd88['verbose']}),_0xc2e958=_0x4b78ca['data'];if(_0xc2e958[_0x109ad(0x2d7)]===0x0)return console['error'](_0x109ad(0x2a3)),0x0;if(!_0x1bea13&&(_0x18bd88[_0x109ad(0x18d)]||_0x18bd88[_0x109ad(0x184)]))return await handleSDKOutput(_0xc2e958,_0x18bd88),0x0;if(!_0x1bea13){const _0x589b6=_0xc2e958['map'](_0x56efb7=>({'title':_0x56efb7[_0x109ad(0x1fe)]+'\x20('+formatBytes(_0x56efb7[_0x109ad(0x21b)])+')','value':_0x56efb7[_0x109ad(0x1fe)]})),_0x440c22=await a51_0x20619d({'type':_0x109ad(0x2ca),'name':_0x109ad(0x266),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x589b6});if(!_0x440c22[_0x109ad(0x266)])return console[_0x109ad(0x1d3)](_0x109ad(0x207)),0x0;_0x1bea13=_0x440c22[_0x109ad(0x266)];}const _0x3693e1=await withSpinner(_0x109ad(0x2f0),()=>_0x126b41[_0x109ad(0x2ea)][_0x109ad(0x17b)](_0x4f65dc,_0x1bea13),{'verbose':_0x18bd88[_0x109ad(0x2e6)]}),_0x273f88=_0x3693e1[_0x109ad(0x2c6)];return _0x273f88?console[_0x109ad(0x171)](_0x273f88):console[_0x109ad(0x1d3)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x18c);[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x1a6);async['execute'](_0x12da5d){const _0x3f7c94=a51_0x56fa1c,{options:_0x2f0314,args:_0x3b9436,tdx:_0x354a5e}=_0x12da5d,_0x58e344=_0x3b9436[0x0];if(!_0x58e344)return console[_0x3f7c94(0x1d3)](_0x3f7c94(0x1af)),0x1;const _0x33bbfd=_0x2f0314[_0x3f7c94(0x16b)];_0x2f0314[_0x3f7c94(0x2e6)]&&(console[_0x3f7c94(0x1d3)](_0x3f7c94(0x249)+_0x58e344),_0x33bbfd&&console[_0x3f7c94(0x1d3)]('Reason:\x20'+_0x33bbfd));if(!_0x2f0314['yes']){if(!isInteractive())return console['error'](a51_0x1e115a[_0x3f7c94(0x1db)]('\x0aError:'),_0x3f7c94(0x2f4)),console['error'](a51_0x1e115a[_0x3f7c94(0x2f8)](_0x3f7c94(0x2e3))),0x1;const _0x104521=await confirmKey(_0x3f7c94(0x2c1)+_0x58e344+'?');if(!_0x104521)return console[_0x3f7c94(0x1d3)](a51_0x1e115a[_0x3f7c94(0x2d6)]('Cancelled')),0x1;}const _0x7cc50a=await withSpinner(_0x3f7c94(0x2ff),()=>_0x354a5e['workflow']['kill'](_0x58e344,_0x33bbfd),{'verbose':_0x2f0314['verbose']}),_0x268462=_0x7cc50a['data'];return console[_0x3f7c94(0x1d3)]('✔\x20'+_0x268462),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]='workflow:retry';[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x21f);async[a51_0x56fa1c(0x192)](_0x3c08a6){const _0x279361=a51_0x56fa1c,{options:_0x3cea94,args:_0x5e400c,tdx:_0x25f966}=_0x3c08a6,_0x44b68d=_0x5e400c[0x0];if(!_0x44b68d)return console['error']('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x279361(0x1d3)](_0x279361(0x2f7)),0x1;let _0x14bf42=![],_0x4740c0=_0x44b68d;if(_0x44b68d[_0x279361(0x20f)]('session:'))_0x14bf42=!![],_0x4740c0=_0x44b68d[_0x279361(0x264)](0x8);else{if(_0x44b68d['startsWith'](_0x279361(0x212)))_0x14bf42=![],_0x4740c0=_0x44b68d['substring'](0x8);else return console[_0x279361(0x1d3)](_0x279361(0x194)),console[_0x279361(0x1d3)](_0x279361(0x2f7)),0x1;}const _0x11e806=_0x3cea94[_0x279361(0x2fb)],_0x4f20b4=_0x3cea94[_0x279361(0x164)],_0x429039=_0x3cea94[_0x279361(0x2da)],_0x239486=_0x3cea94[_0x279361(0x295)];_0x3cea94[_0x279361(0x2e6)]&&(console[_0x279361(0x1d3)](_0x279361(0x19f)+(_0x14bf42?_0x279361(0x19e):_0x279361(0x302))+'\x20'+_0x4740c0),_0x11e806&&console[_0x279361(0x1d3)](_0x279361(0x256)+_0x11e806),_0x4f20b4&&console['error'](_0x279361(0x2a4)+_0x4f20b4),_0x429039&&console['error'](_0x279361(0x1b4)+_0x429039),_0x239486&&console['error'](_0x279361(0x179)));let _0x3fe50b;if(_0x429039)try{if(_0x429039[_0x279361(0x20f)]('@')){const _0x5d0a81=await import(_0x279361(0x211)),_0x47d930=_0x429039[_0x279361(0x264)](0x1),_0x252a43=await _0x5d0a81['readFile'](_0x47d930,_0x279361(0x233));_0x3fe50b=JSON['parse'](_0x252a43);}else _0x3fe50b=JSON[_0x279361(0x27a)](_0x429039);}catch{return console[_0x279361(0x1d3)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x3cea94['yes']){if(!isInteractive())return console['error'](a51_0x1e115a[_0x279361(0x1db)](_0x279361(0x166)),_0x279361(0x2f4)),console[_0x279361(0x1d3)](a51_0x1e115a[_0x279361(0x2f8)](_0x279361(0x2e3))),0x1;const _0x529770=await confirmKey(_0x279361(0x2c7)+(_0x14bf42?_0x279361(0x19e):_0x279361(0x302))+'\x20'+_0x4740c0+'?');if(!_0x529770)return console[_0x279361(0x1d3)](a51_0x1e115a[_0x279361(0x2d6)](_0x279361(0x207))),0x1;}let _0x597f3b;_0x14bf42?_0x597f3b=await withSpinner(_0x279361(0x170),()=>_0x25f966['workflow'][_0x279361(0x2c9)](_0x4740c0,{'fromTask':_0x11e806,'retryParams':_0x3fe50b}),{'verbose':_0x3cea94[_0x279361(0x2e6)]}):_0x597f3b=await withSpinner(_0x279361(0x27e),()=>_0x25f966[_0x279361(0x2ea)]['retryAttempt'](_0x4740c0,{'resumeFrom':_0x4f20b4,'retryParams':_0x3fe50b,'force':_0x239486}),{'verbose':_0x3cea94['verbose']});const _0x25c353=_0x597f3b[_0x279361(0x2c6)];return console[_0x279361(0x1d3)]('✔\x20Retry\x20started'),console[_0x279361(0x1d3)](_0x279361(0x2fc)+_0x25c353['attemptId']),console[_0x279361(0x1d3)](_0x279361(0x15c)+_0x25c353[_0x279361(0x167)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a51_0x56fa1c(0x1cc)]='workflow:run';[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x231);async[a51_0x56fa1c(0x192)](_0x27ef55){const _0x19ed10=a51_0x56fa1c,{options:_0x3586b7,args:_0x13c3c0,tdx:_0x8cca07}=_0x27ef55;let _0x4b39c7=_0x13c3c0[0x0];if(!_0x4b39c7){const _0x126710=this[_0x19ed10(0x1d5)]([],_0x3586b7),_0x534d29=await withSpinner('Loading\x20workflows...',()=>_0x8cca07[_0x19ed10(0x2ea)]['workflows'](_0x126710,{'limit':_0x3586b7[_0x19ed10(0x25d)]}),{'verbose':_0x3586b7[_0x19ed10(0x2e6)]}),_0x2d8e39=_0x534d29[_0x19ed10(0x2c6)];if(_0x2d8e39[_0x19ed10(0x2d7)]===0x0)return console['error']('No\x20workflows\x20found'),!_0x126710&&console[_0x19ed10(0x1d3)](a51_0x1e115a[_0x19ed10(0x2f8)](_0x19ed10(0x1e4))),0x1;const _0x500d81=_0x2d8e39[_0x19ed10(0x221)](_0x3d71ff=>({'title':_0x3d71ff[_0x19ed10(0x248)]?.[_0x19ed10(0x1cc)]+'.'+_0x3d71ff[_0x19ed10(0x1cc)],'value':_0x3d71ff[_0x19ed10(0x248)]?.[_0x19ed10(0x1cc)]+'.'+_0x3d71ff[_0x19ed10(0x1cc)],'description':_0x3d71ff[_0x19ed10(0x223)]?_0x19ed10(0x2e0)+_0x3d71ff[_0x19ed10(0x223)]:undefined})),_0x2ac1af=await a51_0x20619d({'type':_0x19ed10(0x2ca),'name':_0x19ed10(0x2ea),'message':_0x19ed10(0x176),'choices':_0x500d81});if(!_0x2ac1af[_0x19ed10(0x2ea)])return 0x1;_0x4b39c7=_0x2ac1af[_0x19ed10(0x2ea)];}if(!_0x4b39c7[_0x19ed10(0x281)]('.')){const _0x4df429=this[_0x19ed10(0x1d5)]([],_0x3586b7);if(_0x4df429)_0x4b39c7=_0x4df429+'.'+_0x4b39c7;else return console[_0x19ed10(0x1d3)](a51_0x1e115a[_0x19ed10(0x1db)](_0x19ed10(0x293)),_0x19ed10(0x299)),console['error'](a51_0x1e115a[_0x19ed10(0x2f8)](_0x19ed10(0x1e4))),0x1;}const _0x914f90=_0x3586b7[_0x19ed10(0x2c5)],_0x108b14=_0x3586b7[_0x19ed10(0x2c4)],_0x45cf14={};if(_0x914f90&&Array[_0x19ed10(0x1d9)](_0x914f90))for(const _0xf1213c of _0x914f90){const _0x43ae58=_0xf1213c[_0x19ed10(0x2b8)]('=');if(_0x43ae58===-0x1)return console['error'](_0x19ed10(0x1e6)+_0xf1213c),console[_0x19ed10(0x1d3)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x1e77e6=_0xf1213c[_0x19ed10(0x264)](0x0,_0x43ae58),_0x357578=_0xf1213c[_0x19ed10(0x264)](_0x43ae58+0x1);try{_0x45cf14[_0x1e77e6]=JSON[_0x19ed10(0x27a)](_0x357578);}catch{_0x45cf14[_0x1e77e6]=_0x357578;}}_0x3586b7[_0x19ed10(0x2e6)]&&(console[_0x19ed10(0x1d3)]('Workflow:\x20'+_0x4b39c7),Object[_0x19ed10(0x1a1)](_0x45cf14)[_0x19ed10(0x2d7)]>0x0&&console[_0x19ed10(0x1d3)](_0x19ed10(0x1e3)+JSON[_0x19ed10(0x18b)](_0x45cf14)),_0x108b14&&console[_0x19ed10(0x1d3)](_0x19ed10(0x1fd)+_0x108b14));const _0x45a458=await withSpinner('Starting\x20workflow\x20run...',()=>_0x8cca07[_0x19ed10(0x2ea)][_0x19ed10(0x2b5)](_0x4b39c7,_0x45cf14,{'sessionTime':_0x108b14}),{'verbose':_0x3586b7[_0x19ed10(0x2e6)]}),_0x5c8519=_0x45a458[_0x19ed10(0x2c6)];console[_0x19ed10(0x1d3)]('✔\x20Workflow\x20run\x20started'),console['error'](_0x19ed10(0x227)+_0x5c8519['id']),console[_0x19ed10(0x1d3)](_0x19ed10(0x15c)+_0x5c8519['sessionId']),console[_0x19ed10(0x1d3)]('\x20\x20Project:\x20'+_0x5c8519['project']?.[_0x19ed10(0x1cc)]),console[_0x19ed10(0x1d3)]('\x20\x20Workflow:\x20'+_0x5c8519[_0x19ed10(0x2ea)]?.[_0x19ed10(0x1cc)]);if(_0x5c8519['project']?.['id']&&_0x5c8519[_0x19ed10(0x167)]&&_0x5c8519['id']){const _0x281843=_0x3586b7[_0x19ed10(0x2dd)],_0x23e8d8=getConsoleUrl(_0x281843,_0x19ed10(0x197)+_0x5c8519['project']['id']+_0x19ed10(0x1e8)+_0x5c8519[_0x19ed10(0x167)]+_0x19ed10(0x23b)+_0x5c8519['id']);console[_0x19ed10(0x1d3)]('\x20\x20Console:\x20'+a51_0x1e115a[_0x19ed10(0x1a0)](_0x23e8d8));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x26f);[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x26d);async[a51_0x56fa1c(0x192)](_0x4ff756){const _0x30e155=a51_0x56fa1c,{options:_0x477b84,args:_0x28456b,tdx:_0x3872cf}=_0x4ff756,_0x25de72=_0x28456b[0x0],_0x22f2ba=_0x28456b[0x1]||'.';if(!_0x25de72)return console[_0x30e155(0x1d3)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x30e155(0x1d3)](_0x30e155(0x2cd)),0x1;const _0x875c3=_0x477b84[_0x30e155(0x223)];_0x477b84[_0x30e155(0x2e6)]&&(console[_0x30e155(0x1d3)](_0x30e155(0x27d)+_0x25de72),console['error'](_0x30e155(0x214)+_0x22f2ba),_0x875c3&&console[_0x30e155(0x1d3)](_0x30e155(0x2d4)+_0x875c3));const _0x518cbf=await withSpinner(_0x30e155(0x2a2)+_0x25de72+_0x30e155(0x24a),()=>_0x3872cf[_0x30e155(0x2ea)][_0x30e155(0x284)](_0x25de72,_0x22f2ba,{'revision':_0x875c3}),{'verbose':_0x477b84[_0x30e155(0x2e6)]}),_0x35fef5=_0x518cbf[_0x30e155(0x2c6)];return console[_0x30e155(0x1d3)](_0x30e155(0x1b1)+_0x35fef5[_0x30e155(0x162)]),console['error']('\x20\x20Revision:\x20'+_0x35fef5[_0x30e155(0x223)]),console[_0x30e155(0x1d3)]('\x20\x20Files\x20extracted:\x20'+_0x35fef5[_0x30e155(0x2b2)]),console[_0x30e155(0x1d3)]('\x20\x20Location:\x20'+_0x22f2ba+'/'+_0x35fef5[_0x30e155(0x162)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a51_0x56fa1c(0x247);['description']=a51_0x56fa1c(0x168);async[a51_0x56fa1c(0x192)](_0x27fcce){const _0x14effb=a51_0x56fa1c,{options:_0x31baa8,args:_0x495b9f,tdx:_0x9f50e7}=_0x27fcce;let _0x2538d8='.',_0x592c2e=_0x31baa8['name'];if(_0x495b9f[0x0]){const {promises:_0x36a43d}=await import('fs');try{const _0x51fd13=await _0x36a43d['stat'](_0x495b9f[0x0]);if(_0x51fd13['isDirectory']())_0x2538d8=_0x495b9f[0x0];else return console[_0x14effb(0x1d3)]('Error:\x20'+_0x495b9f[0x0]+_0x14effb(0x1e7)),0x1;}catch{_0x592c2e=_0x495b9f[0x0],_0x2538d8='.';}}const _0x5e5333=_0x31baa8['revision'],_0x4b9a8e=_0x31baa8[_0x14effb(0x224)];_0x31baa8[_0x14effb(0x2e6)]&&(console['error'](_0x14effb(0x2d2)+_0x2538d8),_0x592c2e&&console[_0x14effb(0x1d3)](_0x14effb(0x294)+_0x592c2e),_0x5e5333&&console[_0x14effb(0x1d3)](_0x14effb(0x2d4)+_0x5e5333),_0x4b9a8e&&console[_0x14effb(0x1d3)](_0x14effb(0x2ad)));const _0x532eb2=await withSpinner(_0x14effb(0x15b),()=>_0x9f50e7[_0x14effb(0x2ea)]['push'](_0x2538d8,{'projectName':_0x592c2e,'revision':_0x5e5333,'skipValidation':_0x4b9a8e}),{'verbose':_0x31baa8[_0x14effb(0x2e6)]}),_0x37cf17=_0x532eb2[_0x14effb(0x2c6)];return console[_0x14effb(0x1d3)](_0x14effb(0x15a)+_0x37cf17[_0x14effb(0x162)]),console[_0x14effb(0x1d3)]('\x20\x20Project\x20ID:\x20'+_0x37cf17[_0x14effb(0x1ce)]),console[_0x14effb(0x1d3)](_0x14effb(0x206)+_0x37cf17['revision']),await this[_0x14effb(0x1d7)](_0x9f50e7,_0x37cf17[_0x14effb(0x162)],_0x31baa8[_0x14effb(0x2dd)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x180);[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x1d6);async['execute'](_0x1ec7e2){const _0x5a4e3e=a51_0x56fa1c,{options:_0x1db374,args:_0x348bce,tdx:_0x197242}=_0x1ec7e2,_0x2bdd44=_0x348bce[0x0],_0x363c56=_0x348bce[0x1];if(!_0x2bdd44)return console[_0x5a4e3e(0x1d3)](a51_0x1e115a[_0x5a4e3e(0x1db)]('Error:'),'Project\x20name\x20is\x20required'),console[_0x5a4e3e(0x1d3)](a51_0x1e115a[_0x5a4e3e(0x2f8)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x50216e=_0x1db374[_0x5a4e3e(0x223)];_0x1db374['verbose']&&(console[_0x5a4e3e(0x1d3)]('Project:\x20'+_0x2bdd44),_0x363c56&&console['error']('Target\x20directory:\x20'+_0x363c56),_0x50216e&&console[_0x5a4e3e(0x1d3)]('Revision:\x20'+_0x50216e),_0x1db374[_0x5a4e3e(0x2bd)]&&console[_0x5a4e3e(0x1d3)](_0x5a4e3e(0x2d5)));const _0x599947=await withSpinner('Pulling\x20project\x20'+_0x2bdd44+_0x5a4e3e(0x24a),()=>_0x197242['workflow'][_0x5a4e3e(0x28b)](_0x2bdd44,{'targetDir':_0x363c56,'revision':_0x50216e}),{'verbose':_0x1db374[_0x5a4e3e(0x2e6)]}),_0x487f93=_0x599947['data'];_0x487f93[_0x5a4e3e(0x29e)]?console[_0x5a4e3e(0x1d3)](_0x5a4e3e(0x2f2)+_0x487f93[_0x5a4e3e(0x162)]):console[_0x5a4e3e(0x1d3)](_0x5a4e3e(0x230)+_0x487f93[_0x5a4e3e(0x162)]);console[_0x5a4e3e(0x1d3)](_0x5a4e3e(0x206)+_0x487f93[_0x5a4e3e(0x223)]),console[_0x5a4e3e(0x1d3)](_0x5a4e3e(0x282)+(a51_0x58f6d7[_0x5a4e3e(0x2b7)](process[_0x5a4e3e(0x1c0)](),_0x487f93[_0x5a4e3e(0x29f)])||'.')),console[_0x5a4e3e(0x1d3)](_0x5a4e3e(0x2a8)+a51_0x1e115a[_0x5a4e3e(0x17e)]('+'+_0x487f93[_0x5a4e3e(0x28a)]['new']+_0x5a4e3e(0x2e4))+',\x20'+(a51_0x1e115a[_0x5a4e3e(0x2d6)]('~'+_0x487f93[_0x5a4e3e(0x28a)][_0x5a4e3e(0x232)]+_0x5a4e3e(0x240))+',\x20')+(a51_0x1e115a[_0x5a4e3e(0x1db)]('-'+_0x487f93[_0x5a4e3e(0x28a)][_0x5a4e3e(0x160)]+_0x5a4e3e(0x238))+',\x20')+(''+a51_0x1e115a['dim'](_0x487f93['summary'][_0x5a4e3e(0x20e)]+'\x20unchanged')));for(const _0x58f69f of _0x487f93[_0x5a4e3e(0x1a8)]){_0x58f69f[_0x5a4e3e(0x257)]===_0x5a4e3e(0x232)&&_0x58f69f[_0x5a4e3e(0x296)]&&(console['error']('\x0a'+a51_0x1e115a[_0x5a4e3e(0x1a0)]('---\x20'+_0x58f69f['path'])),console['error'](_0x58f69f[_0x5a4e3e(0x296)]));}if(!_0x487f93[_0x5a4e3e(0x2f9)])return saveSessionContext({'workflow_project':_0x487f93[_0x5a4e3e(0x162)]},_0x1db374[_0x5a4e3e(0x19e)]),console[_0x5a4e3e(0x1d3)](a51_0x1e115a[_0x5a4e3e(0x17e)](_0x5a4e3e(0x1de))),console[_0x5a4e3e(0x1d3)](a51_0x1e115a[_0x5a4e3e(0x2f8)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x487f93['projectName'])),0x0;if(_0x1db374[_0x5a4e3e(0x2bd)])return console[_0x5a4e3e(0x1d3)](a51_0x1e115a[_0x5a4e3e(0x2d6)](_0x5a4e3e(0x1f8))),0x0;if(!_0x1db374[_0x5a4e3e(0x17d)]){if(!isInteractive())return console[_0x5a4e3e(0x1d3)](a51_0x1e115a[_0x5a4e3e(0x1db)]('\x0aError:'),_0x5a4e3e(0x2f4)),console[_0x5a4e3e(0x1d3)](a51_0x1e115a['dim'](_0x5a4e3e(0x2e3))),0x1;const _0x52b166=await confirmKey(_0x5a4e3e(0x2f3));if(!_0x52b166)return console[_0x5a4e3e(0x1d3)](a51_0x1e115a[_0x5a4e3e(0x2d6)](_0x5a4e3e(0x207)),_0x5a4e3e(0x21d)),0x1;}await withSpinner(_0x5a4e3e(0x209),()=>_0x197242[_0x5a4e3e(0x2ea)][_0x5a4e3e(0x26a)](_0x487f93,{'revision':_0x50216e}),{'verbose':_0x1db374[_0x5a4e3e(0x2e6)]}),saveSessionContext({'workflow_project':_0x487f93[_0x5a4e3e(0x162)]},_0x1db374[_0x5a4e3e(0x19e)]),console['error'](a51_0x1e115a[_0x5a4e3e(0x17e)]('✔\x20Pull\x20complete'));const _0x395618=a51_0x58f6d7[_0x5a4e3e(0x2b7)](process[_0x5a4e3e(0x1c0)](),_0x487f93[_0x5a4e3e(0x29f)])||'.';return console[_0x5a4e3e(0x1d3)](a51_0x1e115a[_0x5a4e3e(0x2f8)]('\x20\x20Location:\x20'+_0x395618)),console['error'](a51_0x1e115a[_0x5a4e3e(0x2f8)](_0x5a4e3e(0x1b6)+_0x487f93['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x1f5);[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x218);async['execute'](_0x5054ac){const _0x21aab1=a51_0x56fa1c,{options:_0x4e3aeb,args:_0x3a9368,tdx:_0x1b092e}=_0x5054ac,_0x3f8956=this['resolveProjectDir'](_0x3a9368,_0x4e3aeb),_0x393aba=_0x4e3aeb[_0x21aab1(0x223)],_0x4847c3=_0x4e3aeb[_0x21aab1(0x224)];_0x4e3aeb['verbose']&&(_0x3f8956&&console[_0x21aab1(0x1d3)](_0x21aab1(0x1d8)+_0x3f8956),_0x393aba&&console['error']('Revision:\x20'+_0x393aba),_0x4e3aeb[_0x21aab1(0x2bd)]&&console[_0x21aab1(0x1d3)](_0x21aab1(0x2d5)),_0x4847c3&&console[_0x21aab1(0x1d3)]('Validation:\x20skipped'));let _0x405eba;try{_0x405eba=await withSpinner('Analyzing\x20changes...',()=>_0x1b092e['workflow'][_0x21aab1(0x271)]({'sourceDir':_0x3f8956,'revision':_0x393aba,'skipValidation':_0x4847c3}),{'verbose':_0x4e3aeb[_0x21aab1(0x2e6)]});}catch(_0x5ab494){if(_0x5ab494 instanceof Error&&_0x5ab494[_0x21aab1(0x2f1)][_0x21aab1(0x281)](_0x21aab1(0x263)))return console['error'](a51_0x1e115a[_0x21aab1(0x1db)](_0x21aab1(0x293)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x4e3aeb['workflowProject']?console[_0x21aab1(0x1d3)](a51_0x1e115a['dim'](_0x21aab1(0x17f)+_0x4e3aeb[_0x21aab1(0x17a)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x4e3aeb[_0x21aab1(0x17a)]+'\x27')):console[_0x21aab1(0x1d3)](a51_0x1e115a[_0x21aab1(0x2f8)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x5ab494;}const _0x1fdf0a=_0x405eba[_0x21aab1(0x2c6)];console['error'](_0x21aab1(0x1fc)+_0x1fdf0a[_0x21aab1(0x162)]),console[_0x21aab1(0x1d3)](_0x21aab1(0x1d1)+_0x1fdf0a[_0x21aab1(0x289)]),console[_0x21aab1(0x1d3)](_0x21aab1(0x206)+_0x1fdf0a[_0x21aab1(0x223)]),console[_0x21aab1(0x1d3)](_0x21aab1(0x2a8)+a51_0x1e115a['green']('+'+_0x1fdf0a[_0x21aab1(0x28a)][_0x21aab1(0x22a)]+'\x20new')+',\x20'+(a51_0x1e115a[_0x21aab1(0x2d6)]('~'+_0x1fdf0a['summary'][_0x21aab1(0x232)]+'\x20modified')+',\x20')+(a51_0x1e115a[_0x21aab1(0x1db)]('-'+_0x1fdf0a[_0x21aab1(0x28a)][_0x21aab1(0x160)]+_0x21aab1(0x238))+',\x20')+(''+a51_0x1e115a['dim'](_0x1fdf0a[_0x21aab1(0x28a)][_0x21aab1(0x20e)]+_0x21aab1(0x16a))));for(const _0xc1333b of _0x1fdf0a[_0x21aab1(0x1a8)]){_0xc1333b[_0x21aab1(0x257)]===_0x21aab1(0x232)&&_0xc1333b['diff']&&(console[_0x21aab1(0x1d3)]('\x0a'+a51_0x1e115a[_0x21aab1(0x1a0)](_0x21aab1(0x2c3)+_0xc1333b[_0x21aab1(0x1f9)])),console[_0x21aab1(0x1d3)](_0xc1333b[_0x21aab1(0x296)]));}if(!_0x1fdf0a[_0x21aab1(0x2f9)])return console[_0x21aab1(0x1d3)](a51_0x1e115a['green'](_0x21aab1(0x199))),await this[_0x21aab1(0x1d7)](_0x1b092e,_0x1fdf0a[_0x21aab1(0x162)],_0x4e3aeb[_0x21aab1(0x2dd)]),0x0;if(_0x4e3aeb[_0x21aab1(0x2bd)])return console[_0x21aab1(0x1d3)](a51_0x1e115a[_0x21aab1(0x2d6)](_0x21aab1(0x27b))),0x0;if(!_0x4e3aeb[_0x21aab1(0x17d)]){if(!isInteractive())return console[_0x21aab1(0x1d3)](a51_0x1e115a['red'](_0x21aab1(0x166)),_0x21aab1(0x2f4)),console[_0x21aab1(0x1d3)](a51_0x1e115a['dim'](_0x21aab1(0x2e3))),0x1;const _0x8f6a65=await confirmKey(_0x21aab1(0x16c));if(!_0x8f6a65)return console[_0x21aab1(0x1d3)](a51_0x1e115a[_0x21aab1(0x2d6)](_0x21aab1(0x207)),_0x21aab1(0x1dc)),0x1;}const _0x280293=await withSpinner(_0x21aab1(0x163),()=>_0x1b092e[_0x21aab1(0x2ea)]['executePushProject'](_0x1fdf0a),{'verbose':_0x4e3aeb[_0x21aab1(0x2e6)]}),_0xc0146b=_0x280293['data'];return console['error'](a51_0x1e115a[_0x21aab1(0x17e)](_0x21aab1(0x1e9))),console[_0x21aab1(0x1d3)](_0x21aab1(0x1a5)+_0xc0146b[_0x21aab1(0x1ce)]),console[_0x21aab1(0x1d3)](_0x21aab1(0x206)+_0xc0146b[_0x21aab1(0x223)]),await this[_0x21aab1(0x1d7)](_0x1b092e,_0xc0146b[_0x21aab1(0x162)],_0x4e3aeb[_0x21aab1(0x2dd)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a51_0x56fa1c(0x2cf);['description']=a51_0x56fa1c(0x2ac);async[a51_0x56fa1c(0x192)](_0x35a8c8){const _0x19f738=a51_0x56fa1c,{options:_0x487ad3,args:_0x38b2cf,tdx:_0x118b91}=_0x35a8c8,_0x5d122b=this[_0x19f738(0x19b)](_0x38b2cf,_0x487ad3),_0x26e95f=_0x487ad3[_0x19f738(0x1cc)],_0x5b9eaf=_0x487ad3[_0x19f738(0x223)],_0x35e369=_0x487ad3[_0x19f738(0x224)];if(!_0x5d122b)return console[_0x19f738(0x1d3)](a51_0x1e115a[_0x19f738(0x1db)](_0x19f738(0x293)),'Source\x20directory\x20is\x20required'),console[_0x19f738(0x1d3)](a51_0x1e115a[_0x19f738(0x2f8)](_0x19f738(0x24f))),console[_0x19f738(0x1d3)](a51_0x1e115a['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x26e95f)return console['error'](a51_0x1e115a[_0x19f738(0x1db)](_0x19f738(0x293)),_0x19f738(0x2a1)),console[_0x19f738(0x1d3)](a51_0x1e115a[_0x19f738(0x2f8)](_0x19f738(0x24f))),0x1;_0x487ad3[_0x19f738(0x2e6)]&&(console[_0x19f738(0x1d3)](_0x19f738(0x1d8)+_0x5d122b),console[_0x19f738(0x1d3)](_0x19f738(0x2f5)+_0x26e95f),_0x5b9eaf&&console[_0x19f738(0x1d3)](_0x19f738(0x2d4)+_0x5b9eaf),_0x487ad3[_0x19f738(0x2bd)]&&console[_0x19f738(0x1d3)](_0x19f738(0x2d5)),_0x35e369&&console['error'](_0x19f738(0x2ad)));const _0x582f59=await withSpinner(_0x19f738(0x2ab),()=>_0x118b91[_0x19f738(0x2ea)]['prepareCloneProject'](_0x5d122b,_0x26e95f,{'revision':_0x5b9eaf,'skipValidation':_0x35e369}),{'verbose':_0x487ad3['verbose']}),_0x18fbe8=_0x582f59[_0x19f738(0x2c6)];console[_0x19f738(0x1d3)](_0x19f738(0x276)+_0x18fbe8[_0x19f738(0x289)]);_0x18fbe8['sourceProjectName']&&console[_0x19f738(0x1d3)]('Source\x20project:\x20'+_0x18fbe8['sourceProjectName']);console[_0x19f738(0x1d3)](_0x19f738(0x2f5)+_0x18fbe8[_0x19f738(0x1b0)]),console[_0x19f738(0x1d3)](_0x19f738(0x2d4)+_0x18fbe8[_0x19f738(0x223)]),console[_0x19f738(0x1d3)](_0x19f738(0x2e1)+_0x18fbe8['fileCount']);_0x18fbe8[_0x19f738(0x23f)]&&(console[_0x19f738(0x1d3)](a51_0x1e115a[_0x19f738(0x2d6)](_0x19f738(0x22e)+_0x18fbe8[_0x19f738(0x1b0)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x18fbe8['existingProjectId']+')')),console[_0x19f738(0x1d3)](a51_0x1e115a[_0x19f738(0x2d6)](_0x19f738(0x1dd))));if(_0x487ad3[_0x19f738(0x2bd)])return console[_0x19f738(0x1d3)](a51_0x1e115a['yellow'](_0x19f738(0x27c))),0x0;if(!_0x487ad3[_0x19f738(0x17d)]){if(!isInteractive())return console[_0x19f738(0x1d3)](a51_0x1e115a[_0x19f738(0x1db)](_0x19f738(0x166)),_0x19f738(0x2f4)),console[_0x19f738(0x1d3)](a51_0x1e115a['dim'](_0x19f738(0x2e3))),0x1;const _0x50e5d2=_0x18fbe8[_0x19f738(0x2b0)]||a51_0x58f6d7[_0x19f738(0x196)](_0x5d122b),_0x4e7591=_0x18fbe8[_0x19f738(0x23f)]?_0x19f738(0x215)+_0x26e95f+_0x19f738(0x186):_0x19f738(0x22b)+_0x50e5d2+_0x19f738(0x1a7)+_0x26e95f+'\x22?',_0x233e71=await confirmKey(_0x4e7591);if(!_0x233e71)return console[_0x19f738(0x1d3)](a51_0x1e115a[_0x19f738(0x2d6)](_0x19f738(0x207))),0x1;}const _0x390cab=await withSpinner(_0x18fbe8[_0x19f738(0x23f)]?_0x19f738(0x2e5)+_0x26e95f+_0x19f738(0x24a):_0x19f738(0x301)+_0x26e95f+_0x19f738(0x24a),()=>_0x118b91['workflow'][_0x19f738(0x288)](_0x18fbe8),{'verbose':_0x487ad3[_0x19f738(0x2e6)]}),_0x4dd6e4=_0x390cab[_0x19f738(0x2c6)];return console[_0x19f738(0x1d3)](a51_0x1e115a[_0x19f738(0x17e)](_0x18fbe8['targetExists']?'✔\x20Project\x20updated':'✔\x20Clone\x20complete')),console[_0x19f738(0x1d3)](_0x19f738(0x24b)+_0x4dd6e4['newProjectName']),console['error'](_0x19f738(0x1a5)+_0x4dd6e4[_0x19f738(0x25e)]),console[_0x19f738(0x1d3)](_0x19f738(0x206)+_0x4dd6e4[_0x19f738(0x223)]),await this[_0x19f738(0x1d7)](_0x118b91,_0x4dd6e4[_0x19f738(0x1b0)],_0x487ad3['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a51_0x56fa1c(0x1cc)]='workflow:delete';[a51_0x56fa1c(0x198)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a51_0x56fa1c(0x192)](_0x4ed274){const _0x3ef66=a51_0x56fa1c,{options:_0x59b1f1,args:_0x5870ed,tdx:_0x43ba25}=_0x4ed274,_0x4a21a5=_0x5870ed[0x0];if(!_0x4a21a5)return console[_0x3ef66(0x1d3)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x3ef66(0x1d3)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x59b1f1['verbose']&&console[_0x3ef66(0x1d3)](_0x3ef66(0x27d)+_0x4a21a5);if(!_0x59b1f1['yes']){if(!isInteractive())return console[_0x3ef66(0x1d3)](a51_0x1e115a['red'](_0x3ef66(0x166)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a51_0x1e115a[_0x3ef66(0x2f8)](_0x3ef66(0x2e3))),0x1;const _0x590285=await confirmKey(_0x3ef66(0x24e)+_0x4a21a5+_0x3ef66(0x195));if(!_0x590285)return console[_0x3ef66(0x1d3)](a51_0x1e115a[_0x3ef66(0x2d6)](_0x3ef66(0x207))),0x1;}const _0x21a6fd=await withSpinner(_0x3ef66(0x1ae)+_0x4a21a5+'...',()=>_0x43ba25['workflow'][_0x3ef66(0x251)](_0x4a21a5),{'verbose':_0x59b1f1[_0x3ef66(0x2e6)]}),_0x2b4460=_0x21a6fd[_0x3ef66(0x2c6)];return console[_0x3ef66(0x1d3)](_0x3ef66(0x1b5)+_0x2b4460[_0x3ef66(0x162)]),console[_0x3ef66(0x1d3)](_0x3ef66(0x1a5)+_0x2b4460[_0x3ef66(0x1ce)]),0x0;}}function a51_0x10a5(_0x45badf,_0x531d5e){_0x45badf=_0x45badf-0x15a;const _0x5c2770=a51_0x5c27();let _0x10a514=_0x5c2770[_0x45badf];return _0x10a514;}export function parseKeyValue(_0x1ca197){const _0x7efabd=a51_0x56fa1c,_0x59d529=_0x1ca197['indexOf']('=');if(_0x59d529===-0x1)throw new Error(_0x7efabd(0x26c)+_0x1ca197+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x2752dd=_0x1ca197[_0x7efabd(0x264)](0x0,_0x59d529),_0xeba245=_0x1ca197[_0x7efabd(0x264)](_0x59d529+0x1);if(!_0x2752dd)throw new Error(_0x7efabd(0x205));return{'key':_0x2752dd,'value':_0xeba245};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x260);['description']=a51_0x56fa1c(0x300);async[a51_0x56fa1c(0x192)](_0x1085df){const _0x4915d0=a51_0x56fa1c,{options:_0x2aa8ef,args:_0x1f313a,tdx:_0x257036}=_0x1085df,_0x4f0361=this[_0x4915d0(0x2dc)](_0x1f313a,_0x2aa8ef);if(!_0x4f0361)return 0x1;_0x2aa8ef['verbose']&&console[_0x4915d0(0x1d3)](_0x4915d0(0x27d)+_0x4f0361);const _0x35468d=await withSpinner('Listing\x20secrets...',()=>_0x257036['workflow'][_0x4915d0(0x203)](_0x4f0361),{'verbose':_0x2aa8ef[_0x4915d0(0x2e6)]}),{secrets:_0xb5fdad}=_0x35468d[_0x4915d0(0x2c6)];return console[_0x4915d0(0x1d3)](_0x4915d0(0x2eb)+_0xb5fdad['length']+'\x20secret'+(_0xb5fdad[_0x4915d0(0x2d7)]!==0x1?'s':'')),await handleSDKOutput(_0xb5fdad,_0x2aa8ef),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a51_0x56fa1c(0x2a9);['description']='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async[a51_0x56fa1c(0x192)](_0xbeb3b1){const _0x34c23d=a51_0x56fa1c,{options:_0x59372b,args:_0x1b4f9b,tdx:_0x3eb05e}=_0xbeb3b1;let _0x50d77f,_0x1707d2;if(_0x1b4f9b[_0x34c23d(0x2d7)]>=0x2)_0x50d77f=_0x1b4f9b[0x0],_0x1707d2=_0x1b4f9b[0x1];else{if(_0x1b4f9b[_0x34c23d(0x2d7)]===0x1&&_0x59372b[_0x34c23d(0x17a)])_0x50d77f=_0x59372b[_0x34c23d(0x17a)],_0x1707d2=_0x1b4f9b[0x0];else return _0x1b4f9b[_0x34c23d(0x2d7)]===0x1?(console[_0x34c23d(0x1d3)](_0x34c23d(0x1b3)),console['error'](_0x34c23d(0x1e4)),0x1):(console[_0x34c23d(0x1d3)](_0x34c23d(0x228)),console['error'](_0x34c23d(0x279)),0x1);}let _0x56adb7,_0x3740db;try{({key:_0x56adb7,value:_0x3740db}=parseKeyValue(_0x1707d2));}catch(_0x121c4f){return _0x121c4f instanceof Error&&console['error'](a51_0x1e115a[_0x34c23d(0x1db)]('Error:'),_0x121c4f[_0x34c23d(0x2f1)]),0x1;}_0x59372b[_0x34c23d(0x2e6)]&&(console[_0x34c23d(0x1d3)](_0x34c23d(0x27d)+_0x50d77f),console[_0x34c23d(0x1d3)](_0x34c23d(0x2ee)+_0x56adb7));const _0x710848=await withSpinner(_0x34c23d(0x1c1),()=>_0x3eb05e[_0x34c23d(0x2ea)][_0x34c23d(0x217)](_0x50d77f,_0x56adb7,_0x3740db),{'verbose':_0x59372b['verbose']}),_0x13c5ca=_0x710848[_0x34c23d(0x2c6)];return console[_0x34c23d(0x1d3)]('✔\x20Secret\x20\x27'+_0x13c5ca[_0x34c23d(0x2de)]+_0x34c23d(0x26e)+_0x13c5ca['projectName']+'\x27'),(_0x59372b[_0x34c23d(0x18d)]||_0x59372b['jsonl'])&&await handleSingleObjectOutput(_0x13c5ca,_0x59372b),0x0;}}function a51_0x5c27(){const _0x57458c=['success','Force:\x20yes','workflowProject','logs','🔄\x20','yes','green','Tip:\x20cd\x20to\x20workflows/','workflow:pull','MAX_POLL_ITERATIONS','Show\x20tasks\x20for\x20an\x20attempt','metadata','format','output','\x22\x20with\x20new\x20revision?','Fetching\x20log\x20files...','No\x20sessions\x20found\x20for:\x20','\x20tasks','running','stringify','workflow:kill','json','MIN_LABEL_COUNT','all','Filter:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','execute','floor','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x22?\x20This\x20cannot\x20be\x20undone.','basename','/app/workflows/','description','\x0a✔\x20No\x20changes\x20to\x20push','workflow:timeline','resolveProjectDir','logFiles','text','session','Target:\x20','cyan','keys','\x0aPolling...\x20(','Listing\x20workflow\x20projects...','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','\x20\x20Project\x20ID:\x20','Kill\x20a\x20running\x20attempt','\x22\x20to\x20new\x20project\x20\x22','changes','\x20from\x20session\x20','replace','\x20-\x20','No\x20sessions\x20with\x20timing\x20information','No\x20matching\x20sessions\x20found','Deleting\x20project\x20','Error:\x20Attempt\x20ID\x20is\x20required','newProjectName','✔\x20Downloaded\x20','Getting\x20attempt\x20details...','Error:\x20Project\x20name\x20is\x20required','Params:\x20','✔\x20Deleted\x20project\x20','\x20\x20Session\x20context\x20set\x20to:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','value','every','getFullYear','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20of\x20','\x20\x20Console:\x20','navigateSessionsInteractive','cwd','Setting\x20secret...','workflow:projects','ICON_WIDTH','min','14tkuxqh','LABEL_MIN_SPACING','renderSingleTimeline','POLL_INTERVAL_MS','5560dxHQXN','\x20task','now','name','tasks','projectId','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','split','\x20\x20Source:\x20','repeat','error','parseProjectWorkflowPattern','resolveProject','Pull\x20workflow\x20project\x20to\x20local\x20folder','showWorkflowConsoleUrl','Source\x20directory:\x20','isArray','end','red','-\x20nothing\x20pushed','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','\x0a✔\x20Already\x20up\x20to\x20date','blue','pollTimeline','lastAttempt','Pattern:\x20','Parameters:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','columns','Error:\x20Invalid\x20parameter\x20format:\x20','\x20is\x20not\x20a\x20directory','/sessions/','✔\x20Push\x20complete','MIN_TIMELINE_WIDTH','1662378Vowims','Include\x20retried:\x20yes','workflow:attempt','tdx.json','Project\x20filter:\x20','✔\x20Workflow\x20project\x20context\x20cleared.','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Session\x20not\x20found:\x20','generateSessionTimelineRows','sort','workflow:push','\x20has\x20no\x20attempts','9378QdqzRI','\x0aDry\x20run\x20-\x20no\x20files\x20written','path','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','stdout','✔\x20Project:\x20','Session\x20time:\x20','taskName','Attempt:\x20','sys','getMinutes','⚠\x20Showing\x20first\x20','listSecrets','splice','Key\x20cannot\x20be\x20empty','\x20\x20Revision:\x20','Cancelled','slice','Writing\x20files...','autocomplete','\x20project','📁\x20','finishedAt','unchanged','startsWith','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','fs/promises','attempt:','push','Output\x20directory:\x20','\x0aUpdate\x20existing\x20project\x20\x22','values','setSecret','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','match','\x0aFailed\x20to\x20fetch\x20attempt\x20data','fileSize','getDate','-\x20no\x20files\x20written','Status:\x20','Retry\x20a\x20session\x20or\x20attempt','Auto-selected\x20latest\x20session:\x20','map','canceling','revision','skipValidation','Listing\x20workflows...','No\x20attempts\x20found\x20in\x20project:\x20','\x20\x20Attempt\x20ID:\x20','Error:\x20KEY=VALUE\x20is\x20required','projects','new','\x0aClone\x20\x22','max','group_error','\x0a⚠\x20Project\x20\x22','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','→\x20Project:\x20','Start\x20a\x20workflow\x20run','modified','utf-8','jsonl','✔\x20Secret\x20\x27','Deleting\x20secret...','1370376toFhIn','\x20deleted','title','status','/attempt/','buildTimelineData','Failed\x20to\x20fetch\x20attempt\x20data','MAX_TASKS_DISPLAY','targetExists','\x20modified','ICON_SPACING','sessions','Warning:','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','duration','workflow:upload','project','Attempt\x20ID:\x20','...','\x20\x20Project:\x20','has','updatedAt','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','workflow:secrets:delete','delete','1003220KhCMLW','List\x20all\x20workflow\x20projects','\x1b[1A\x1b[2K','toLowerCase','From\x20task:\x20','type','attemptId','some','✔\x20Workflow\x20project\x20set\x20to:\x20','\x20\x20tdx\x20wf\x20use\x20<project>','\x20(use\x20--limit\x20to\x20show\x20more)','limit','newProjectId','join','workflow:secrets:list','workflowName','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','No\x20workflow\x20tdx.json\x20found','substring','clear','task','workflow:use','unknown','renderTimeline','applyPullProject','No\x20workflow\x20sessions\x20found','Invalid\x20format:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','workflow:download','TASK_NAME_WIDTH','preparePushProject','startTime','📋\x20','No\x20workflow\x20projects\x20found','size','Source:\x20','getHours','cancelRequested','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','parse','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x0aDry\x20run\x20-\x20no\x20project\x20created','Project:\x20','Retrying\x20attempt...','\x27\x20from\x20project\x20\x27','get','includes','\x20\x20Target:\x20','Listing\x20workflow\x20sessions...','download','window','resolve','createdAt','executeCloneProject','sourceDir','summary','pullProject','Using\x20attempt\x20','deleteSecret','List\x20workflow\x20execution\x20sessions','durationMs','list','Show\x20specific\x20attempt\x20details','LABEL_WIDTH_DIVISOR','Error:','Project\x20name:\x20','force','diff','List\x20workflows','Loading\x20sessions...','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','No\x20attempts\x20found','index','retryAttemptName','No\x20sessions\x20found','isNewProject','targetDir','84826saFyQZ','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Downloading\x20project\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Resume\x20from:\x20','rows','includeSubtasks','(use\x20--limit\x20to\x20see\x20more)','\x20\x20Changes:\x20','workflow:secrets:set','follow','Analyzing\x20project...','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','Validation:\x20skipped','trimEnd','planned','sourceProjectName','Getting\x20attempt\x20tasks...','filesExtracted','padStart','No\x20workflows\x20found','run','15BKZPFa','relative','indexOf','MAX_LABEL_COUNT','find','renderSessionsTimeline','trim','dryRun','💡\x20Tip:\x20Use\x20','14698189QYzLPT','Including\x20subtasks:\x20yes','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','workflow:tasks','---\x20','sessionTime','param','data','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','startedAt','retrySession','select','context','isTTY','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','filter','workflow:clone','Session\x20','\x27...','Project\x20directory:\x20','Filter:\x20project=','Revision:\x20','Dry\x20run:\x20yes','yellow','length','No\x20sessions\x20found\x20in\x20project:\x20','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','params','1444899kCxmSH','requireProject','site','key','fill','revision:\x20','Files\x20to\x20upload:\x20','workflows','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20new','Updating\x20','verbose','localeCompare','Project\x20name\x20is\x20required','fullName','workflow','✔\x20Found\x20','done','icon','Key:\x20','attempts','Downloading\x20logs...','message','→\x20New\x20project:\x20','\x0aApply\x20these\x20changes?','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','New\x20project\x20name:\x20','state','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','dim','hasChanges','Loading\x20session...','fromTask','\x20\x20New\x20attempt\x20ID:\x20','7LYLeIB','start','Killing\x20attempt...','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Cloning\x20to\x20','attempt','✔\x20Pushed\x20','Pushing\x20workflow\x20project...','\x20\x20Session\x20ID:\x20','Select\x20a\x20session\x20to\x20view\x20timeline:','toISOString','write','deleted','getTime','projectName','Pushing\x20project...','resumeFrom','\x20sessions\x20','\x0aError:','sessionId','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','round','\x20unchanged','reason','\x0aPush\x20these\x20changes?','table','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','getMonth','Retrying\x20session...','log','set','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Show\x20logs\x20for\x20a\x20workflow\x20attempt','displayLine','Select\x20a\x20workflow\x20to\x20run','pending'];a51_0x5c27=function(){return _0x57458c;};return a51_0x5c27();}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x250);[a51_0x56fa1c(0x198)]=a51_0x56fa1c(0x1fa);async['execute'](_0x4208ee){const _0x5587a9=a51_0x56fa1c,{options:_0x417d7a,args:_0x65832a,tdx:_0xf8e509}=_0x4208ee;let _0x2accb4,_0x402c71;if(_0x65832a[_0x5587a9(0x2d7)]>=0x2)_0x2accb4=_0x65832a[0x0],_0x402c71=_0x65832a[0x1];else{if(_0x65832a[_0x5587a9(0x2d7)]===0x1&&_0x417d7a[_0x5587a9(0x17a)])_0x2accb4=_0x417d7a[_0x5587a9(0x17a)],_0x402c71=_0x65832a[0x0];else return _0x65832a[_0x5587a9(0x2d7)]===0x1?(console[_0x5587a9(0x1d3)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x5587a9(0x1e4)),0x1):(console[_0x5587a9(0x1d3)]('Error:\x20Secret\x20key\x20is\x20required'),console['error'](_0x5587a9(0x173)),0x1);}_0x417d7a[_0x5587a9(0x2e6)]&&(console[_0x5587a9(0x1d3)](_0x5587a9(0x27d)+_0x2accb4),console[_0x5587a9(0x1d3)](_0x5587a9(0x2ee)+_0x402c71));if(!_0x417d7a[_0x5587a9(0x17d)]){if(!isInteractive())return console[_0x5587a9(0x1d3)](a51_0x1e115a[_0x5587a9(0x1db)](_0x5587a9(0x166)),_0x5587a9(0x2f4)),console['error'](a51_0x1e115a[_0x5587a9(0x2f8)](_0x5587a9(0x2e3))),0x1;const _0x44defd=await confirmKey(_0x5587a9(0x22f)+_0x402c71+_0x5587a9(0x27f)+_0x2accb4+'\x27?');if(!_0x44defd)return console[_0x5587a9(0x1d3)](a51_0x1e115a[_0x5587a9(0x2d6)](_0x5587a9(0x207))),0x1;}const _0x4389aa=await withSpinner(_0x5587a9(0x236),()=>_0xf8e509[_0x5587a9(0x2ea)][_0x5587a9(0x28d)](_0x2accb4,_0x402c71),{'verbose':_0x417d7a[_0x5587a9(0x2e6)]}),_0x21f8ac=_0x4389aa['data'];return console[_0x5587a9(0x1d3)](_0x5587a9(0x235)+_0x21f8ac[_0x5587a9(0x2de)]+_0x5587a9(0x1f1)+_0x21f8ac[_0x5587a9(0x162)]+'\x27'),(_0x417d7a['json']||_0x417d7a[_0x5587a9(0x234)])&&await handleSingleObjectOutput(_0x21f8ac,_0x417d7a),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(_0x52b3cc){const _0x69b98=a51_0x56fa1c,_0x3c6a07=Math[_0x69b98(0x193)](_0x52b3cc/0x3e8),_0x240db0=Math[_0x69b98(0x193)](_0x3c6a07/0x3c),_0x2bf1ec=Math['floor'](_0x240db0/0x3c),_0xb3cb4e=Math[_0x69b98(0x193)](_0x2bf1ec/0x18);if(_0xb3cb4e>0x0){const _0x5693fc=_0x2bf1ec%0x18;return _0x5693fc>0x0?_0xb3cb4e+'d\x20'+_0x5693fc+'h':_0xb3cb4e+'d';}else{if(_0x2bf1ec>0x0){const _0x388ca5=_0x240db0%0x3c;return _0x388ca5>0x0?_0x2bf1ec+'h\x20'+_0x388ca5+'m':_0x2bf1ec+'h';}else{if(_0x240db0>0x0){const _0xf7c2a7=_0x3c6a07%0x3c;return _0xf7c2a7>0x0?_0x240db0+'m\x20'+_0xf7c2a7+'s':_0x240db0+'m';}else return _0x3c6a07+'s';}}}function formatTimestamp(_0x2b6330,_0x25c138){const _0x26926f=a51_0x56fa1c,_0x5489ff=new Date(_0x2b6330),_0x8bf25c=String(_0x5489ff[_0x26926f(0x277)]())[_0x26926f(0x2b3)](0x2,'0'),_0x331cc3=String(_0x5489ff[_0x26926f(0x201)]())['padStart'](0x2,'0'),_0x428d3d=_0x8bf25c+':'+_0x331cc3,_0x5e9998=_0x5489ff[_0x26926f(0x1ba)]()===_0x25c138['getFullYear']()&&_0x5489ff['getMonth']()===_0x25c138[_0x26926f(0x16f)]()&&_0x5489ff[_0x26926f(0x21c)]()===_0x25c138['getDate']();if(_0x5e9998)return _0x428d3d;else{const _0x32ab0b=String(_0x5489ff[_0x26926f(0x16f)]()+0x1)['padStart'](0x2,'0'),_0x497f18=String(_0x5489ff[_0x26926f(0x21c)]())['padStart'](0x2,'0');return _0x32ab0b+'-'+_0x497f18+'\x20'+_0x428d3d;}}function formatDate(_0x1ecab6){const _0x36fc1d=a51_0x56fa1c,_0x5d77e4=_0x1ecab6[_0x36fc1d(0x1ba)](),_0x319c05=String(_0x1ecab6[_0x36fc1d(0x16f)]()+0x1)['padStart'](0x2,'0'),_0x1bdcd9=String(_0x1ecab6['getDate']())[_0x36fc1d(0x2b3)](0x2,'0');return _0x5d77e4+'-'+_0x319c05+'-'+_0x1bdcd9;}function getTaskStateIcon(_0x5ecd0c){const _0x305a33={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x305a33[_0x5ecd0c]||'⚪';}function getBarChar(_0x6d5554){const _0x2d0339=a51_0x56fa1c;return _0x6d5554===_0x2d0339(0x1d3)||_0x6d5554==='group_error'?'×':'─';}function getBarColor(_0x51f651){const _0x4a0989=a51_0x56fa1c,_0x3c70c6={'success':a51_0x1e115a[_0x4a0989(0x17e)],'error':a51_0x1e115a[_0x4a0989(0x1db)],'group_error':a51_0x1e115a[_0x4a0989(0x1db)],'running':a51_0x1e115a[_0x4a0989(0x1df)],'blocked':a51_0x1e115a['yellow'],'planned':a51_0x1e115a[_0x4a0989(0x2f8)],'canceling':a51_0x1e115a[_0x4a0989(0x2d6)]};return _0x3c70c6[_0x51f651]||a51_0x1e115a['white'];}function parseTaskName(_0x331fb6){const _0x267c92=a51_0x56fa1c;let _0x34980=_0x331fb6[_0x267c92(0x1aa)](/^\++/,'');const _0x197cf9=_0x34980[_0x267c92(0x1d0)]('+'),_0x46e005=_0x197cf9['length']>0x1?_0x197cf9[_0x267c92(0x2d7)]-0x2:0x0,_0x582d5a=_0x197cf9[_0x197cf9[_0x267c92(0x2d7)]-0x1]||_0x34980;return{'level':_0x46e005,'name':'+'+_0x582d5a};}function truncateTaskName(_0x3e81a1,_0x10956f){const _0x485276=a51_0x56fa1c,_0x4d62a8=stringWidth(_0x3e81a1);if(_0x4d62a8<=_0x10956f)return _0x3e81a1;let _0x50eb4b=_0x3e81a1;while(stringWidth(_0x50eb4b+'…')>_0x10956f&&_0x50eb4b[_0x485276(0x2d7)]>0x0){_0x50eb4b=_0x50eb4b[_0x485276(0x208)](0x0,-0x1);}return _0x50eb4b+'…';}function calculateTimeScale(_0x23c191,_0x428473){const _0x143a80=a51_0x56fa1c;return{'startTime':_0x23c191[_0x143a80(0x2fe)],'endTime':_0x23c191[_0x143a80(0x1da)],'durationMs':_0x23c191[_0x143a80(0x246)],'msPerChar':_0x23c191[_0x143a80(0x246)]/_0x428473};}function timeToPosition(_0x233d0e,_0x19e2eb,_0x5e493d){const _0xc7fb3a=a51_0x56fa1c,_0x105033=_0x233d0e-_0x19e2eb[_0xc7fb3a(0x272)],_0x3c2f1f=Math[_0xc7fb3a(0x193)](_0x105033/_0x19e2eb['msPerChar']);return Math[_0xc7fb3a(0x22c)](0x0,Math['min'](_0x3c2f1f,_0x5e493d));}function renderTimeAxis(_0x1d2b4d,_0x2ebe88){const _0x3d8cc2=a51_0x56fa1c,_0x5ebf4f=Math['min'](TIMELINE_CONFIG[_0x3d8cc2(0x2b9)],Math[_0x3d8cc2(0x22c)](TIMELINE_CONFIG[_0x3d8cc2(0x18e)],Math[_0x3d8cc2(0x193)](_0x2ebe88/TIMELINE_CONFIG[_0x3d8cc2(0x292)]))),_0x1ad707=_0x1d2b4d[_0x3d8cc2(0x28f)]/(_0x5ebf4f-0x1),_0x57ca8f=new Date(_0x1d2b4d['startTime']),_0x32b468=[];for(let _0x28c5b6=0x0;_0x28c5b6<_0x5ebf4f;_0x28c5b6++){const _0x1061f8=_0x1d2b4d[_0x3d8cc2(0x272)]+_0x28c5b6*_0x1ad707,_0x12d800=timeToPosition(_0x1061f8,_0x1d2b4d,_0x2ebe88),_0x3a5393=formatTimestamp(_0x1061f8,_0x57ca8f);_0x32b468[_0x3d8cc2(0x213)]({'pos':_0x12d800,'text':_0x3a5393});}const _0x205b7b=new Array(_0x2ebe88)[_0x3d8cc2(0x2df)]('\x20');let _0x4b6bb1=-0x1;for(const {pos:_0x4106ef,text:_0x1df151}of _0x32b468){let _0x440a3f=Math[_0x3d8cc2(0x22c)](0x0,_0x4106ef-Math[_0x3d8cc2(0x193)](_0x1df151[_0x3d8cc2(0x2d7)]/0x2));_0x440a3f<=_0x4b6bb1+TIMELINE_CONFIG[_0x3d8cc2(0x1c6)]&&(_0x440a3f=_0x4b6bb1+TIMELINE_CONFIG[_0x3d8cc2(0x1c6)]+0x1);_0x440a3f+_0x1df151[_0x3d8cc2(0x2d7)]>_0x2ebe88&&(_0x440a3f=_0x2ebe88-_0x1df151[_0x3d8cc2(0x2d7)]);if(_0x440a3f>=0x0&&_0x440a3f+_0x1df151['length']<=_0x2ebe88&&_0x440a3f>_0x4b6bb1){for(let _0x35f2fe=0x0;_0x35f2fe<_0x1df151[_0x3d8cc2(0x2d7)];_0x35f2fe++){_0x205b7b[_0x440a3f+_0x35f2fe]=_0x1df151[_0x35f2fe];}_0x4b6bb1=_0x440a3f+_0x1df151[_0x3d8cc2(0x2d7)]-0x1;}}return _0x205b7b['join']('');}function renderTaskRow(_0x217bec,_0x7a1218,_0x236fad,_0x48c80a){const _0x5b7bd2=a51_0x56fa1c,{level:_0x50ace3,name:_0x41a768}=parseTaskName(_0x217bec[_0x5b7bd2(0x1cc)]),_0x2bf330='\x20'[_0x5b7bd2(0x1d2)](_0x50ace3),_0x11d479=_0x217bec[_0x5b7bd2(0x285)]?'('+formatElapsed(_0x217bec[_0x5b7bd2(0x285)][_0x5b7bd2(0x246)])+')':'',_0x358697=stringWidth(_0x11d479),_0x57a690=_0x50ace3*0x1,_0x255abb=_0x48c80a-_0x57a690-_0x358697-0x1,_0x36b600=truncateTaskName(_0x41a768,_0x255abb),_0x145253=_0x2bf330+_0x36b600,_0x100d01=stringWidth(_0x145253),_0x4a8245=_0x48c80a-_0x100d01-_0x358697,_0x37a012=_0x145253+'\x20'[_0x5b7bd2(0x1d2)](Math[_0x5b7bd2(0x22c)](0x1,_0x4a8245))+a51_0x1e115a['dim'](_0x11d479),_0x41f6bf=getTaskStateIcon(_0x217bec['state']),_0x446bed=new Array(_0x236fad)[_0x5b7bd2(0x2df)]('\x20');if(_0x217bec['window']){const _0x11df9e=timeToPosition(_0x217bec[_0x5b7bd2(0x285)]['start'],_0x7a1218,_0x236fad),_0x3611a7=timeToPosition(_0x217bec[_0x5b7bd2(0x285)][_0x5b7bd2(0x1da)],_0x7a1218,_0x236fad),_0x38f949=getBarChar(_0x217bec[_0x5b7bd2(0x2f6)]),_0x393280=Math['max'](_0x11df9e+0x1,_0x3611a7);for(let _0x25da2d=_0x11df9e;_0x25da2d<Math[_0x5b7bd2(0x1c4)](_0x393280,_0x236fad);_0x25da2d++){_0x446bed[_0x25da2d]=_0x38f949;}}const _0x3b4db5=getBarColor(_0x217bec[_0x5b7bd2(0x2f6)]),_0x3afd13=_0x446bed['map'](_0x1254f9=>_0x1254f9==='\x20'?'\x20':_0x3b4db5(_0x1254f9))[_0x5b7bd2(0x25f)]('');return _0x41f6bf+'\x20'+_0x37a012+'│'+_0x3afd13+'│';}function calculateStats(_0x5b412b){const _0x484fcd=a51_0x56fa1c,_0x35afd1={'total':_0x5b412b[_0x484fcd(0x2d7)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x253ece of _0x5b412b){if(_0x253ece['state']===_0x484fcd(0x178))_0x35afd1[_0x484fcd(0x178)]++;else{if(_0x253ece['state']===_0x484fcd(0x1d3)||_0x253ece['state']===_0x484fcd(0x22d))_0x35afd1[_0x484fcd(0x1d3)]++;else _0x253ece[_0x484fcd(0x2f6)]===_0x484fcd(0x18a)?_0x35afd1[_0x484fcd(0x18a)]++:_0x35afd1[_0x484fcd(0x177)]++;}}return _0x35afd1;}function formatStats(_0x5f1af){const _0xfb3ff1=a51_0x56fa1c;return['Total:\x20'+_0x5f1af['total'],'✅\x20'+_0x5f1af[_0xfb3ff1(0x178)],'❌\x20'+_0x5f1af['error'],_0xfb3ff1(0x17c)+_0x5f1af[_0xfb3ff1(0x18a)],'⏳\x20'+_0x5f1af[_0xfb3ff1(0x177)]][_0xfb3ff1(0x25f)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a51_0x56fa1c(0x1cc)]=a51_0x56fa1c(0x19a);['description']=a51_0x56fa1c(0x262);async['execute'](_0xef1ed){const _0x302194=a51_0x56fa1c,{options:_0x4686b4,args:_0x5bb962,tdx:_0x4c2c0c}=_0xef1ed;let _0x28c951,_0xdd40ee,_0x585e46=![];if(_0x5bb962[0x0]){if(_0x5bb962[0x0][_0x302194(0x281)]('.')){const _0x9575c0=this[_0x302194(0x1d4)](_0x5bb962,_0x4686b4);if(!_0x9575c0)return 0x1;_0x28c951=_0x9575c0[_0x302194(0x162)],_0xdd40ee=_0x9575c0[_0x302194(0x261)];}else{_0xdd40ee=_0x5bb962[0x0],_0x28c951=_0x4686b4['workflowProject'];if(!_0x28c951)return console['error'](a51_0x1e115a[_0x302194(0x1db)](_0x302194(0x293)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x585e46=!![];}}else{const _0x4f7946=this[_0x302194(0x1d4)](_0x5bb962,_0x4686b4);if(!_0x4f7946)return 0x1;_0x28c951=_0x4f7946['projectName'],_0xdd40ee=_0x4f7946[_0x302194(0x261)];}if(_0x4686b4[_0x302194(0x2e6)]){if(_0x28c951&&_0xdd40ee)console[_0x302194(0x1d3)](_0x302194(0x190)+_0x28c951+'.'+_0xdd40ee);else _0x28c951&&console[_0x302194(0x1d3)]('Filter:\x20project='+_0x28c951);}const _0x2a65cf=_0x4686b4[_0x302194(0x258)],_0x2fc12a=_0x4686b4[_0x302194(0x167)];if(_0x2a65cf){_0x2fc12a&&console[_0x302194(0x1d3)](a51_0x1e115a[_0x302194(0x2d6)](_0x302194(0x243)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x2d20c2=_0x4686b4[_0x302194(0x2aa)];return _0x2d20c2?await this['pollTimeline'](_0xef1ed,_0x2a65cf):await this[_0x302194(0x1c7)](_0xef1ed,_0x2a65cf,_0x4686b4),0x0;}if(_0x2fc12a){const _0x1aa9bd=await withSpinner(_0x302194(0x2fa),()=>_0x4c2c0c[_0x302194(0x2ea)]['sessions']({'projectName':_0x28c951,'workflowName':_0xdd40ee,'limit':0x64}),{'verbose':_0x4686b4['verbose']}),_0x114e4d=_0x1aa9bd[_0x302194(0x2c6)][_0x302194(0x2ba)](_0x4744bc=>_0x4744bc['id']===_0x2fc12a);if(!_0x114e4d)return console['error'](a51_0x1e115a['red'](_0x302194(0x293)),_0x302194(0x1f2)+_0x2fc12a),0x1;if(!_0x114e4d['lastAttempt']?.['id'])return console[_0x302194(0x1d3)](a51_0x1e115a[_0x302194(0x1db)](_0x302194(0x293)),_0x302194(0x2d0)+_0x2fc12a+_0x302194(0x1f6)),0x1;const _0x38afa6=_0x114e4d['lastAttempt']['id'];_0x4686b4[_0x302194(0x2e6)]&&console['error'](_0x302194(0x28c)+_0x38afa6+_0x302194(0x1a9)+_0x2fc12a);const _0x5bf17b=_0x4686b4[_0x302194(0x2aa)];return _0x5bf17b?await this[_0x302194(0x1e0)](_0xef1ed,_0x38afa6):await this[_0x302194(0x1c7)](_0xef1ed,_0x38afa6,_0x4686b4),0x0;}const _0x2f2031=await withSpinner(_0x302194(0x298),()=>_0x4c2c0c['workflow'][_0x302194(0x242)]({'projectName':_0x28c951,'workflowName':_0xdd40ee,'limit':_0x4686b4['limit']||0x32}),{'verbose':_0x4686b4[_0x302194(0x2e6)]}),_0x381b14=_0x2f2031[_0x302194(0x2c6)];if(_0x381b14['length']===0x0){if(_0x28c951&&_0xdd40ee)console[_0x302194(0x1d3)](_0x302194(0x188)+_0x28c951+'.'+_0xdd40ee);else _0x28c951?console['error'](_0x302194(0x2d8)+_0x28c951):(console[_0x302194(0x1d3)](_0x302194(0x26b)),console[_0x302194(0x1d3)](a51_0x1e115a[_0x302194(0x2f8)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x381b14[_0x302194(0x1f4)]((_0x524380,_0x2d4673)=>{const _0x63ac13=_0x302194,_0x54be31=_0x524380['sessionTime']||'',_0x27bf58=_0x2d4673[_0x63ac13(0x2c4)]||'';return _0x27bf58['localeCompare'](_0x54be31);});if(_0x4686b4['json']||_0x4686b4['jsonl'])return await handleSDKOutput(_0x381b14,_0x4686b4),0x0;let _0xe4d9c6;if(_0x585e46){const _0x56baa0=_0x381b14[0x0];if(!_0x56baa0[_0x302194(0x1e1)]?.['id'])return console[_0x302194(0x1d3)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0xe4d9c6=_0x56baa0[_0x302194(0x1e1)]['id'],_0x4686b4['verbose']&&console[_0x302194(0x1d3)](_0x302194(0x220)+_0x56baa0[_0x302194(0x2c4)]);}else{const _0x536c54=_0x381b14[_0x302194(0x221)](_0x429264=>{const _0x139273=_0x302194,_0x271372=getAttemptStatusDisplay(_0x429264[_0x139273(0x1e1)]);return{'title':_0x429264[_0x139273(0x248)]?.[_0x139273(0x1cc)]+'.'+_0x429264[_0x139273(0x2ea)]?.[_0x139273(0x1cc)]+_0x139273(0x1ab)+_0x429264[_0x139273(0x2c4)]+'\x20'+_0x271372[_0x139273(0x2ed)],'value':_0x429264[_0x139273(0x1e1)]?.['id']||'','description':_0x271372[_0x139273(0x19d)]};}),_0x5ce6e2=await a51_0x20619d({'type':_0x302194(0x2ca),'name':_0x302194(0x258),'message':_0x302194(0x15d),'choices':_0x536c54[_0x302194(0x2ce)](_0x587531=>_0x587531[_0x302194(0x1b8)]!=='')});if(!_0x5ce6e2['attemptId'])return 0x0;_0xe4d9c6=_0x5ce6e2[_0x302194(0x258)];}const _0x2ca4cb=_0x4686b4[_0x302194(0x2aa)];return _0x2ca4cb?await this[_0x302194(0x1e0)](_0xef1ed,_0xe4d9c6):await this[_0x302194(0x1c7)](_0xef1ed,_0xe4d9c6,_0x4686b4),0x0;}async[a51_0x56fa1c(0x1c7)](_0x542257,_0x3a34ac,_0x149d2f){const _0x3e6044=a51_0x56fa1c,{tdx:_0x2bc344}=_0x542257;let _0x3817ee,_0x251112;try{[_0x3817ee,_0x251112]=await Promise[_0x3e6044(0x18f)]([_0x2bc344[_0x3e6044(0x2ea)][_0x3e6044(0x302)](_0x3a34ac),_0x2bc344[_0x3e6044(0x2ea)][_0x3e6044(0x1cd)](_0x3a34ac,![])]);}catch(_0x2a1f79){console['error'](a51_0x1e115a[_0x3e6044(0x1db)](_0x3e6044(0x23d)));_0x149d2f[_0x3e6044(0x2e6)]&&console[_0x3e6044(0x1d3)](_0x2a1f79);throw _0x2a1f79;}if(_0x149d2f[_0x3e6044(0x18d)]||_0x149d2f[_0x3e6044(0x234)]){const _0x3b1ddc=this[_0x3e6044(0x23c)](_0x3817ee,_0x251112);await handleSDKOutput([_0x3b1ddc],_0x149d2f);return;}const _0x4fa789=_0x2bc344[_0x3e6044(0x2cb)][_0x3e6044(0x2dd)],_0x580c63=this['renderTimeline'](_0x3817ee,_0x251112,_0x4fa789);console['log'](_0x580c63);}async[a51_0x56fa1c(0x1e0)](_0x105537,_0x4ebb6e){const _0x1fd388=a51_0x56fa1c,{tdx:_0x2a9fb2}=_0x105537,_0x15f2b0=TIMELINE_CONFIG[_0x1fd388(0x1c8)],_0x22c049=TIMELINE_CONFIG[_0x1fd388(0x181)];let _0x3b3c1a=0x0;while(_0x3b3c1a<_0x22c049){process[_0x1fd388(0x1fb)][_0x1fd388(0x2cc)]&&process[_0x1fd388(0x1fb)][_0x1fd388(0x15f)]('\x1bc');let _0x52afb6,_0x26e7db;try{[_0x52afb6,_0x26e7db]=await Promise[_0x1fd388(0x18f)]([_0x2a9fb2[_0x1fd388(0x2ea)]['attempt'](_0x4ebb6e),_0x2a9fb2['workflow'][_0x1fd388(0x1cd)](_0x4ebb6e,![])]);}catch(_0x2e49b3){console['error'](a51_0x1e115a[_0x1fd388(0x1db)](_0x1fd388(0x21a)));_0x3b3c1a>0x0&&console[_0x1fd388(0x1d3)](a51_0x1e115a[_0x1fd388(0x2f8)](_0x1fd388(0x2d9)+_0x3b3c1a));throw _0x2e49b3;}const _0x4a93f7=_0x2a9fb2[_0x1fd388(0x2cb)][_0x1fd388(0x2dd)],_0x2e5906=this[_0x1fd388(0x269)](_0x52afb6,_0x26e7db,_0x4a93f7);console[_0x1fd388(0x171)](_0x2e5906);const _0x37bf90=_0x52afb6[_0x1fd388(0x2ec)]&&_0x26e7db[_0x1fd388(0x1b9)](_0xf908da=>_0xf908da[_0x1fd388(0x2f6)]!==_0x1fd388(0x18a)&&_0xf908da[_0x1fd388(0x2f6)]!==_0x1fd388(0x2af));if(_0x37bf90){console[_0x1fd388(0x1d3)](a51_0x1e115a[_0x1fd388(0x17e)]('\x0a✔\x20Attempt\x20complete'));break;}console['error'](a51_0x1e115a[_0x1fd388(0x2f8)](_0x1fd388(0x1a2)+_0x3b3c1a*0x2+_0x1fd388(0x245))),await new Promise(_0xde52b5=>setTimeout(_0xde52b5,_0x15f2b0)),_0x3b3c1a++;}_0x3b3c1a>=_0x22c049&&console[_0x1fd388(0x1d3)](a51_0x1e115a[_0x1fd388(0x2d6)](_0x1fd388(0x244)));}[a51_0x56fa1c(0x269)](_0x82a28f,_0x2adc60,_0x3fc6c2){const _0x5ef1c0=a51_0x56fa1c,_0x38a398=[],_0x2e708d=TIMELINE_CONFIG[_0x5ef1c0(0x270)],_0x2f7050=0x5,_0x466581=process['stdout'][_0x5ef1c0(0x1e5)]||0x78,_0x36869c=_0x466581-_0x2e708d-_0x2f7050,_0xd5743d=Math[_0x5ef1c0(0x22c)](TIMELINE_CONFIG[_0x5ef1c0(0x1ea)],Math[_0x5ef1c0(0x1c4)](_0x36869c,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x3161b7=new Date(_0x82a28f[_0x5ef1c0(0x287)])['getTime'](),_0x6d2280=_0x82a28f[_0x5ef1c0(0x20d)]?new Date(_0x82a28f['finishedAt'])[_0x5ef1c0(0x161)]():Date[_0x5ef1c0(0x1cb)](),_0x388eb6={'start':_0x3161b7,'end':_0x6d2280,'duration':_0x6d2280-_0x3161b7},_0x353f39=new Map(),_0x46561a=[];for(const _0x425122 of _0x2adc60){if(_0x425122['startedAt']){const _0x76706a=new Date(_0x425122[_0x5ef1c0(0x2c8)])[_0x5ef1c0(0x161)](),_0x51f0b5=_0x425122[_0x5ef1c0(0x24d)]?new Date(_0x425122[_0x5ef1c0(0x24d)])[_0x5ef1c0(0x161)]():Date[_0x5ef1c0(0x1cb)](),_0x10f2c3={'start':_0x76706a,'end':_0x51f0b5,'duration':_0x51f0b5-_0x76706a};_0x353f39[_0x5ef1c0(0x172)](_0x425122['id'],_0x10f2c3),_0x46561a[_0x5ef1c0(0x213)]({'name':_0x425122[_0x5ef1c0(0x2e9)],'state':_0x425122[_0x5ef1c0(0x2f6)]||_0x5ef1c0(0x268),'window':_0x10f2c3});}else _0x46561a['push']({'name':_0x425122[_0x5ef1c0(0x2e9)],'state':_0x425122[_0x5ef1c0(0x2f6)]||_0x5ef1c0(0x2af),'window':undefined});}_0x46561a['sort']((_0x35ba08,_0x5d23c8)=>{const _0x26f8b6=_0x5ef1c0;if(!_0x35ba08[_0x26f8b6(0x285)])return 0x1;if(!_0x5d23c8[_0x26f8b6(0x285)])return-0x1;return _0x35ba08[_0x26f8b6(0x285)][_0x26f8b6(0x2fe)]-_0x5d23c8[_0x26f8b6(0x285)][_0x26f8b6(0x2fe)];});const _0x1ce29f=_0x46561a['length'],_0x36e464=_0x1ce29f>TIMELINE_CONFIG[_0x5ef1c0(0x23e)];_0x36e464&&_0x46561a[_0x5ef1c0(0x204)](TIMELINE_CONFIG[_0x5ef1c0(0x23e)]);const _0x562781=calculateTimeScale(_0x388eb6,_0xd5743d),_0x2ab64b=_0x82a28f[_0x5ef1c0(0x2ec)]?_0x82a28f[_0x5ef1c0(0x178)]?a51_0x1e115a['green'](_0x5ef1c0(0x178)):a51_0x1e115a['red'](_0x5ef1c0(0x1d3)):a51_0x1e115a['blue'](_0x5ef1c0(0x18a)),_0x1e439a=_0x82a28f[_0x5ef1c0(0x248)]?.['id'],_0x1e5217=_0x82a28f[_0x5ef1c0(0x167)];let _0x9ac1fc;if(_0x1e439a&&_0x1e5217){const _0x124112=getWorkflowAttemptUrl(_0x3fc6c2,_0x1e439a,_0x1e5217,_0x82a28f['id']);_0x9ac1fc=hyperlink(a51_0x1e115a['dim'](_0x82a28f['id']),_0x124112);}else _0x9ac1fc=a51_0x1e115a['dim'](_0x82a28f['id']);_0x38a398[_0x5ef1c0(0x213)](_0x5ef1c0(0x1ff)+_0x9ac1fc+_0x5ef1c0(0x1ab)+_0x2ab64b+_0x5ef1c0(0x1ab)+formatElapsed(_0x388eb6[_0x5ef1c0(0x246)]));if(_0x46561a[_0x5ef1c0(0x2d7)]>0x0){const _0x29ba4f=renderTimeAxis(_0x562781,_0xd5743d),_0x5186cb=new Date(_0x388eb6[_0x5ef1c0(0x2fe)]),_0xe643c3=formatDate(_0x5186cb),_0x15f5ca=TIMELINE_CONFIG[_0x5ef1c0(0x1c3)]+TIMELINE_CONFIG['ICON_SPACING']+_0x2e708d,_0x521df9=_0xe643c3['padStart'](_0x15f5ca),_0xbcfea8=a51_0x1e115a[_0x5ef1c0(0x2f8)](_0x521df9);_0x38a398[_0x5ef1c0(0x213)](_0xbcfea8+'\x20'+_0x29ba4f);for(const _0x4bc3f9 of _0x46561a){_0x38a398['push'](renderTaskRow(_0x4bc3f9,_0x562781,_0xd5743d,_0x2e708d));}const _0x15e4d7=calculateStats(_0x46561a);_0x38a398['push'](formatStats(_0x15e4d7)),_0x36e464&&_0x38a398[_0x5ef1c0(0x213)](a51_0x1e115a[_0x5ef1c0(0x2d6)](_0x5ef1c0(0x202)+TIMELINE_CONFIG[_0x5ef1c0(0x23e)]+_0x5ef1c0(0x1bd)+_0x1ce29f+_0x5ef1c0(0x189))),_0x38a398[_0x5ef1c0(0x213)](''),_0x38a398[_0x5ef1c0(0x213)](a51_0x1e115a[_0x5ef1c0(0x2f8)](_0x5ef1c0(0x2be))+('tdx\x20wf\x20attempt\x20'+_0x82a28f['id']+'\x20logs')+a51_0x1e115a[_0x5ef1c0(0x2f8)]('\x20to\x20see\x20detailed\x20logs'));}else _0x38a398['push'](_0x5ef1c0(0x1b7));return _0x38a398[_0x5ef1c0(0x25f)]('\x0a');}['buildTimelineData'](_0xd8664a,_0x2109ba){const _0x3dfafa=a51_0x56fa1c,_0x287d2b=new Date(_0xd8664a[_0x3dfafa(0x287)])[_0x3dfafa(0x161)](),_0x4e81b2=_0xd8664a[_0x3dfafa(0x20d)]?new Date(_0xd8664a['finishedAt'])['getTime']():Date['now'](),_0x434e46=_0x4e81b2-_0x287d2b,_0x2c30b1=[];for(const _0x530cc9 of _0x2109ba){if(_0x530cc9[_0x3dfafa(0x2c8)]){const _0x4b5fd1=new Date(_0x530cc9[_0x3dfafa(0x2c8)])[_0x3dfafa(0x161)](),_0x3f865c=_0x530cc9[_0x3dfafa(0x24d)]?new Date(_0x530cc9[_0x3dfafa(0x24d)])[_0x3dfafa(0x161)]():Date[_0x3dfafa(0x1cb)]();_0x2c30b1[_0x3dfafa(0x213)]({'name':_0x530cc9[_0x3dfafa(0x2e9)],'state':_0x530cc9[_0x3dfafa(0x2f6)]||_0x3dfafa(0x268),'window':{'start':_0x4b5fd1,'end':_0x3f865c,'duration':_0x3f865c-_0x4b5fd1}});}else _0x2c30b1[_0x3dfafa(0x213)]({'name':_0x530cc9[_0x3dfafa(0x2e9)],'state':_0x530cc9[_0x3dfafa(0x2f6)]||_0x3dfafa(0x2af),'window':undefined});}const _0x325dc9=calculateStats(_0x2c30b1);return{'attempt':{'id':_0xd8664a['id'],'status':_0xd8664a[_0x3dfafa(0x2ec)]?_0xd8664a['success']?_0x3dfafa(0x178):_0x3dfafa(0x1d3):_0x3dfafa(0x18a),'createdAt':_0xd8664a[_0x3dfafa(0x287)],'finishedAt':_0xd8664a[_0x3dfafa(0x20d)],'duration_ms':_0x434e46},'tasks':_0x2c30b1[_0x3dfafa(0x221)](_0x4b3e27=>({'name':_0x4b3e27['name'],'state':_0x4b3e27['state'],'startedAt':_0x4b3e27[_0x3dfafa(0x285)]?new Date(_0x4b3e27[_0x3dfafa(0x285)][_0x3dfafa(0x2fe)])[_0x3dfafa(0x15e)]():null,'updatedAt':_0x4b3e27['window']?new Date(_0x4b3e27['window']['end'])[_0x3dfafa(0x15e)]():null,'duration_ms':_0x4b3e27[_0x3dfafa(0x285)]?.[_0x3dfafa(0x246)]||null})),'stats':_0x325dc9};}}
|
|
1
|
+
const a51_0x3e4a18=a51_0x1765;(function(_0x159b14,_0x66bc76){const _0x815ab7=a51_0x1765,_0x52329e=_0x159b14();while(!![]){try{const _0x2aae66=-parseInt(_0x815ab7(0x2dc))/0x1*(parseInt(_0x815ab7(0x376))/0x2)+parseInt(_0x815ab7(0x295))/0x3*(-parseInt(_0x815ab7(0x378))/0x4)+parseInt(_0x815ab7(0x33a))/0x5+parseInt(_0x815ab7(0x230))/0x6+parseInt(_0x815ab7(0x1ec))/0x7+-parseInt(_0x815ab7(0x325))/0x8+parseInt(_0x815ab7(0x2e0))/0x9;if(_0x2aae66===_0x66bc76)break;else _0x52329e['push'](_0x52329e['shift']());}catch(_0x39a8cb){_0x52329e['push'](_0x52329e['shift']());}}}(a51_0xf29b,0x3ff91));import a51_0x19af4d from'chalk';import{existsSync}from'fs';import a51_0x4a2e0b 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 a51_0x4a0a66 from'prompts';function getAttemptStatusDisplay(_0x4b60b4){const _0x1dc072=a51_0x1765;if(!_0x4b60b4)return{'icon':'⏳','text':''};const {done:_0x1c57e2,success:_0x4911fc,cancelRequested:_0x19e2c8}=_0x4b60b4;if(!_0x1c57e2)return _0x19e2c8?{'icon':'🛑','text':a51_0x19af4d[_0x1dc072(0x2f8)]('canceling')}:{'icon':'🔄','text':a51_0x19af4d[_0x1dc072(0x361)](_0x1dc072(0x342))};if(_0x4911fc)return{'icon':'✅','text':a51_0x19af4d[_0x1dc072(0x308)](_0x1dc072(0x1f6))};return{'icon':'❌','text':a51_0x19af4d[_0x1dc072(0x26c)](_0x1dc072(0x21c))};}export class WorkflowBaseCommand extends BaseCommand{[a51_0x3e4a18(0x31b)](_0x292d8a,_0x2c2a84,_0xe8feae=0x0){return _0x292d8a[_0xe8feae]||_0x2c2a84['workflowProject'];}[a51_0x3e4a18(0x2fb)](_0x396eb0,_0x15128b,_0x238bd2=0x0){const _0x5fba9b=a51_0x3e4a18,_0x3cf37d=this['resolveProject'](_0x396eb0,_0x15128b,_0x238bd2);if(!_0x3cf37d)return console[_0x5fba9b(0x21c)](a51_0x19af4d[_0x5fba9b(0x26c)](_0x5fba9b(0x2cd)),_0x5fba9b(0x306)),console[_0x5fba9b(0x21c)](a51_0x19af4d[_0x5fba9b(0x34d)](_0x5fba9b(0x20f))),null;return _0x3cf37d;}[a51_0x3e4a18(0x2d3)](_0x45d0cb,_0x43e40b){const _0x1bd2b8=a51_0x3e4a18;if(_0x45d0cb[0x0]){const _0x3bda6f=_0x45d0cb[0x0][_0x1bd2b8(0x387)]('.');if(_0x3bda6f[_0x1bd2b8(0x202)]===0x1)return{'projectName':_0x3bda6f[0x0],'workflowName':undefined};else return _0x3bda6f[_0x1bd2b8(0x202)]===0x2?{'projectName':_0x3bda6f[0x0],'workflowName':_0x3bda6f[0x1]}:(console[_0x1bd2b8(0x21c)](a51_0x19af4d[_0x1bd2b8(0x26c)](_0x1bd2b8(0x2cd)),_0x1bd2b8(0x2b4)),null);}return{'projectName':_0x43e40b[_0x1bd2b8(0x22f)],'workflowName':undefined};}['resolveProjectDir'](_0x39e31d,_0x1bf0ed,_0x2a19ca=0x0){const _0xeba48=a51_0x3e4a18;if(_0x39e31d[_0x2a19ca])return _0x39e31d[_0x2a19ca];if(_0x1bf0ed[_0xeba48(0x22f)]){const _0x547799=a51_0x4a2e0b['join'](process[_0xeba48(0x288)](),'workflows',_0x1bf0ed['workflowProject']);if(existsSync(a51_0x4a2e0b[_0xeba48(0x210)](_0x547799,'tdx.json')))return _0x547799;}return undefined;}async[a51_0x3e4a18(0x310)](_0x1d265f,_0xdf79ca,_0x84cdaa){const _0xa9f46=a51_0x3e4a18;try{const _0x10558d=await _0x1d265f['workflow'][_0xa9f46(0x277)](_0xdf79ca,{'limit':0x1});if(_0x10558d[_0xa9f46(0x202)]>0x0){const _0x51634d=_0x10558d[0x0]['id'],_0x587082=getWorkflowUrl(_0x84cdaa,_0x51634d);console[_0xa9f46(0x21c)](_0xa9f46(0x299)+a51_0x19af4d[_0xa9f46(0x241)](_0x587082));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]='workflow:use';[a51_0x3e4a18(0x30b)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a51_0x3e4a18(0x1e9)](_0x2cdb90){const _0x19e4e1=a51_0x3e4a18,{options:_0x2a5fb5,args:_0x355d3d,tdx:_0x5c200f}=_0x2cdb90,_0x3cef16=_0x355d3d[0x0],_0xc41e06=_0x2a5fb5[_0x19e4e1(0x2c8)];if(_0xc41e06)return saveSessionContext({'workflow_project':undefined},_0x2a5fb5[_0x19e4e1(0x28a)]),console[_0x19e4e1(0x1f7)](a51_0x19af4d[_0x19e4e1(0x308)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x3cef16)return console['error'](a51_0x19af4d[_0x19e4e1(0x26c)](_0x19e4e1(0x2cd)),_0x19e4e1(0x306)),console[_0x19e4e1(0x21c)](a51_0x19af4d[_0x19e4e1(0x34d)](_0x19e4e1(0x26d))),console[_0x19e4e1(0x21c)](a51_0x19af4d['dim'](_0x19e4e1(0x1e8))),0x1;const _0x42e191=await withSpinner(_0x19e4e1(0x22d)+_0x3cef16+_0x19e4e1(0x26a),()=>_0x5c200f[_0x19e4e1(0x324)][_0x19e4e1(0x2b6)](_0x3cef16),{'verbose':_0x2a5fb5['verbose']}),{name:_0x276d3e}=_0x42e191[_0x19e4e1(0x2ab)];return saveSessionContext({'workflow_project':_0x276d3e},_0x2a5fb5[_0x19e4e1(0x28a)]),console[_0x19e4e1(0x1f7)](a51_0x19af4d[_0x19e4e1(0x308)](_0x19e4e1(0x2f3)+a51_0x19af4d[_0x19e4e1(0x241)](_0x276d3e))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x2dd);['description']=a51_0x3e4a18(0x25c);async['execute'](_0x3954a0){const _0x4f8926=a51_0x3e4a18,{options:_0x339335,args:_0x212ebc,tdx:_0xc7a170}=_0x3954a0,_0x367535=_0x212ebc[0x0];_0x339335[_0x4f8926(0x380)]&&_0x367535&&console[_0x4f8926(0x21c)](_0x4f8926(0x2ec)+_0x367535);const _0x5e2914=await withSpinner(_0x4f8926(0x1f9),()=>_0xc7a170['workflow']['projects'](_0x367535,{'limit':_0x339335[_0x4f8926(0x32c)]}),{'verbose':_0x339335[_0x4f8926(0x380)]});let _0x256992=_0x5e2914[_0x4f8926(0x2ab)];_0x256992[_0x4f8926(0x316)]((_0x6aba02,_0x47fbb7)=>_0x6aba02['name'][_0x4f8926(0x371)](_0x47fbb7[_0x4f8926(0x35a)]));const _0x340a25=_0x339335[_0x4f8926(0x32c)]||0x64,_0x434782=_0x256992[_0x4f8926(0x202)]>=_0x340a25?a51_0x19af4d[_0x4f8926(0x34d)](_0x4f8926(0x31f)):'';console[_0x4f8926(0x21c)](_0x4f8926(0x365)+_0x256992['length']+_0x4f8926(0x2c7)+(_0x256992[_0x4f8926(0x202)]!==0x1?'s':'')+_0x434782);if(_0x339335[_0x4f8926(0x21d)]==='json'||_0x339335['format']==='jsonl'||_0x339335[_0x4f8926(0x21d)]===_0x4f8926(0x290))await handleSDKOutput(_0x256992,_0x339335);else{if(_0x256992[_0x4f8926(0x202)]===0x0)_0x367535?console[_0x4f8926(0x1f7)](_0x4f8926(0x203)+_0x367535):console['log']('No\x20workflow\x20projects\x20found');else{const _0x383824=_0x256992['map'](_0x28f740=>{const _0x23c697=_0x4f8926,_0x2b8847=_0x28f740[_0x23c697(0x37f)]?.[_0x23c697(0x350)](_0x32a5ec=>_0x32a5ec['key']==='sys'),_0xf0eeba=_0x2b8847?a51_0x19af4d[_0x23c697(0x34d)](_0x23c697(0x258)):'';return _0x23c697(0x2f7)+_0x28f740['name']+_0xf0eeba;});await writeOutput(_0x383824['join']('\x0a'),_0x339335[_0x4f8926(0x2cb)],_0x4f8926(0x244));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a51_0x3e4a18(0x34b);[a51_0x3e4a18(0x30b)]='List\x20workflows';async[a51_0x3e4a18(0x1e9)](_0x440e4c){const _0x527bf9=a51_0x3e4a18,{options:_0x41af75,args:_0x288f5a,tdx:_0x521d0c}=_0x440e4c,_0x1b5721=this[_0x527bf9(0x31b)](_0x288f5a,_0x41af75);_0x41af75['verbose']&&_0x1b5721&&console['error'](_0x527bf9(0x320)+_0x1b5721);const _0xf1302=await withSpinner(_0x527bf9(0x1f1),()=>_0x521d0c[_0x527bf9(0x324)]['workflows'](_0x1b5721,{'limit':_0x41af75[_0x527bf9(0x32c)]}),{'verbose':_0x41af75[_0x527bf9(0x380)]});let _0x430865=_0xf1302[_0x527bf9(0x2ab)];_0x430865[_0x527bf9(0x316)]((_0x37437c,_0x29d6bc)=>{const _0x35c651=_0x527bf9,_0x3edc6f=_0x37437c[_0x35c651(0x35a)][_0x35c651(0x371)](_0x29d6bc[_0x35c651(0x35a)]);if(_0x3edc6f!==0x0)return _0x3edc6f;return(_0x37437c[_0x35c651(0x313)]?.[_0x35c651(0x35a)]||'')[_0x35c651(0x371)](_0x29d6bc[_0x35c651(0x313)]?.[_0x35c651(0x35a)]||'');});const _0x146d98=_0x41af75[_0x527bf9(0x32c)]||0x64,_0x5061be=_0x430865['length']>=_0x146d98?a51_0x19af4d[_0x527bf9(0x34d)](_0x527bf9(0x31f)):'';console['error'](_0x527bf9(0x365)+_0x430865['length']+_0x527bf9(0x2bd)+(_0x430865['length']!==0x1?'s':'')+_0x5061be);if(_0x41af75[_0x527bf9(0x21d)]===_0x527bf9(0x28d)||_0x41af75[_0x527bf9(0x21d)]===_0x527bf9(0x356)||_0x41af75[_0x527bf9(0x21d)]===_0x527bf9(0x290))await handleSDKOutput(_0x430865,_0x41af75);else{if(_0x430865['length']===0x0)_0x1b5721?console[_0x527bf9(0x1f7)](_0x527bf9(0x292)+_0x1b5721):console[_0x527bf9(0x1f7)](_0x527bf9(0x25a));else{const _0x2c1f0e=_0x41af75['site'],_0x37fd62=_0x430865[_0x527bf9(0x1fe)](_0x58e0dd=>{const _0x7d1f99=_0x527bf9,_0xc48c3f=a51_0x19af4d[_0x7d1f99(0x34d)]('#'+_0x58e0dd['id']),_0x1b4d24=hyperlink(_0xc48c3f,getWorkflowUrl(_0x2c1f0e,_0x58e0dd['id'])),_0x5ede21=_0x58e0dd[_0x7d1f99(0x313)]?.[_0x7d1f99(0x35a)]?a51_0x19af4d[_0x7d1f99(0x34d)]('\x20('+_0x58e0dd[_0x7d1f99(0x313)][_0x7d1f99(0x35a)]+')'):'';return _0x7d1f99(0x2b2)+_0x1b4d24+'\x20'+_0x58e0dd['name']+_0x5ede21;});await writeOutput(_0x37fd62[_0x527bf9(0x210)]('\x0a'),_0x41af75['output'],_0x527bf9(0x244));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x207);['description']=a51_0x3e4a18(0x2b0);async[a51_0x3e4a18(0x1e9)](_0x444f55){const _0x55c8df=a51_0x3e4a18,{options:_0x2895e6,args:_0x54a637,tdx:_0xd863}=_0x444f55,_0x6925ea=this[_0x55c8df(0x2d3)](_0x54a637,_0x2895e6);if(!_0x6925ea)return 0x1;const {projectName:_0x52e5de,workflowName:_0x1d73dc}=_0x6925ea;if(_0x2895e6[_0x55c8df(0x380)]){if(_0x52e5de&&_0x1d73dc)console[_0x55c8df(0x21c)](_0x55c8df(0x332)+_0x52e5de+'.'+_0x1d73dc);else _0x52e5de&&console[_0x55c8df(0x21c)]('Filter:\x20project='+_0x52e5de);const _0x11a451=_0x2895e6['status'];_0x11a451&&console[_0x55c8df(0x21c)]('Status:\x20'+_0x11a451);}let _0x2a6f8f=0x28;if(process[_0x55c8df(0x31c)][_0x55c8df(0x312)]&&!_0x2895e6[_0x55c8df(0x2cb)]&&!_0x2895e6[_0x55c8df(0x21d)]){const _0x5cb9a6=process[_0x55c8df(0x31c)][_0x55c8df(0x309)]||0x28;_0x2a6f8f=Math[_0x55c8df(0x201)](0x14,Math[_0x55c8df(0x24d)](_0x5cb9a6*0x2/0x3));}const _0x4252a5=_0x2895e6['limit']||_0x2a6f8f,_0x6d6c96=await withSpinner(_0x55c8df(0x35f),()=>_0xd863['workflow'][_0x55c8df(0x2a4)]({'projectName':_0x52e5de,'workflowName':_0x1d73dc,'status':_0x2895e6[_0x55c8df(0x2b8)],'fromTime':_0x2895e6[_0x55c8df(0x2cf)],'toTime':_0x2895e6['to'],'limit':_0x4252a5}),{'verbose':_0x2895e6[_0x55c8df(0x380)]}),_0x4b4e48=_0x6d6c96[_0x55c8df(0x2ab)];_0x4b4e48[_0x55c8df(0x316)]((_0x143edd,_0x4bade3)=>{const _0x587606=_0x55c8df,_0x1dd655=_0x143edd[_0x587606(0x237)]||'',_0x27b2d9=_0x4bade3[_0x587606(0x237)]||'';return _0x27b2d9['localeCompare'](_0x1dd655);});_0x4b4e48[_0x55c8df(0x202)]>=_0x4252a5?console[_0x55c8df(0x21c)](_0x55c8df(0x33e)+_0x4b4e48[_0x55c8df(0x202)]+_0x55c8df(0x217)+a51_0x19af4d[_0x55c8df(0x34d)](_0x55c8df(0x2e7))):console['error'](_0x55c8df(0x365)+_0x4b4e48[_0x55c8df(0x202)]+_0x55c8df(0x285)+(_0x4b4e48[_0x55c8df(0x202)]!==0x1?'s':''));if(_0x2895e6['format']===_0x55c8df(0x28d)||_0x2895e6['format']===_0x55c8df(0x356)||_0x2895e6[_0x55c8df(0x21d)]===_0x55c8df(0x290))await handleSDKOutput(_0x4b4e48,_0x2895e6);else{if(!process[_0x55c8df(0x31c)][_0x55c8df(0x312)]||_0x2895e6[_0x55c8df(0x2cb)]){if(_0x4b4e48[_0x55c8df(0x202)]===0x0){if(_0x52e5de&&_0x1d73dc)console[_0x55c8df(0x1f7)](_0x55c8df(0x377)+_0x52e5de+'.'+_0x1d73dc);else _0x52e5de?console[_0x55c8df(0x1f7)](_0x55c8df(0x346)+_0x52e5de):console[_0x55c8df(0x1f7)](_0x55c8df(0x2e4));}else{const _0x16fdfa=_0x2895e6['site'],_0x52a14b=this[_0x55c8df(0x2a0)](_0x4b4e48,_0x16fdfa);_0x2895e6[_0x55c8df(0x2cb)]?await writeOutput(_0x52a14b,_0x2895e6[_0x55c8df(0x2cb)],_0x55c8df(0x244)):console[_0x55c8df(0x1f7)](_0x52a14b);}!_0x52e5de&&(console[_0x55c8df(0x21c)](''),console[_0x55c8df(0x21c)](a51_0x19af4d['dim'](_0x55c8df(0x337))),console[_0x55c8df(0x21c)](a51_0x19af4d['dim'](_0x55c8df(0x246))+'or'+a51_0x19af4d[_0x55c8df(0x34d)](_0x55c8df(0x281))));}else{if(_0x4b4e48[_0x55c8df(0x202)]===0x0){if(_0x52e5de&&_0x1d73dc)console[_0x55c8df(0x1f7)](_0x55c8df(0x377)+_0x52e5de+'.'+_0x1d73dc);else _0x52e5de?console[_0x55c8df(0x1f7)](_0x55c8df(0x346)+_0x52e5de):console[_0x55c8df(0x1f7)](_0x55c8df(0x2e4));}else await this['navigateSessionsInteractive'](_0x4b4e48,_0x444f55,_0x52e5de);}}return 0x0;}['renderSessionsTimeline'](_0x2595b9,_0x35a5c1){const _0x24d659=a51_0x3e4a18,_0x1a6659=[],_0x252382=new Map();let _0x201320=Infinity,_0x246e62=-Infinity;for(const _0x95c6b9 of _0x2595b9){if(_0x95c6b9[_0x24d659(0x352)]?.[_0x24d659(0x32b)]){const _0x40c37e=new Date(_0x95c6b9[_0x24d659(0x352)][_0x24d659(0x32b)])[_0x24d659(0x226)](),_0x14532b=_0x95c6b9['lastAttempt'][_0x24d659(0x32d)]?new Date(_0x95c6b9[_0x24d659(0x352)][_0x24d659(0x32d)])[_0x24d659(0x226)]():Date[_0x24d659(0x302)](),_0x444f96=_0x95c6b9[_0x24d659(0x313)]?.[_0x24d659(0x35a)]||_0x24d659(0x2fd);!_0x252382[_0x24d659(0x1fb)](_0x444f96)&&_0x252382['set'](_0x444f96,[]),_0x252382[_0x24d659(0x2ac)](_0x444f96)[_0x24d659(0x331)]({'session':_0x95c6b9,'startTime':_0x40c37e,'endTime':_0x14532b,'duration':_0x14532b-_0x40c37e}),_0x201320=Math[_0x24d659(0x23a)](_0x201320,_0x40c37e),_0x246e62=Math[_0x24d659(0x201)](_0x246e62,_0x14532b);}}if(_0x252382['size']===0x0)return _0x24d659(0x24a);const _0xf23a60=process[_0x24d659(0x31c)][_0x24d659(0x23f)]||0x78,_0x2a2310=0x1e,_0x5187ee=0x32,_0x11f282=0x4,_0x2be602=Math[_0x24d659(0x23a)](_0x5187ee,Math[_0x24d659(0x201)](_0x2a2310,Math[_0x24d659(0x24d)](_0xf23a60*0.3))),_0x2939c6=_0xf23a60-_0x2be602-TIMELINE_CONFIG[_0x24d659(0x289)]-0x3-_0x11f282,_0x41f0bd=_0x246e62-_0x201320,_0x209780=_0x41f0bd/_0x2be602,_0x151251=renderTimeAxis({'startTime':_0x201320,'endTime':_0x246e62,'durationMs':_0x41f0bd,'msPerChar':_0x209780},_0x2be602),_0x383856=[];for(const _0x5326ea of _0x252382[_0x24d659(0x1fa)]()){_0x383856[_0x24d659(0x331)](..._0x5326ea);}_0x383856[_0x24d659(0x316)]((_0x3ae908,_0x3b1527)=>_0x3b1527[_0x24d659(0x30f)]-_0x3ae908[_0x24d659(0x30f)]);const _0x2a3e1a=new Date(_0x201320),_0x44132e=formatDate(_0x2a3e1a),_0x42cda0=_0x11f282+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x24d659(0x272)]+_0x2939c6,_0x432fd5='\x20'[_0x24d659(0x255)](_0x42cda0-_0x44132e[_0x24d659(0x202)]),_0x15ed47=_0x432fd5+a51_0x19af4d[_0x24d659(0x34d)](_0x44132e)+'\x20'+_0x151251;_0x1a6659[_0x24d659(0x331)](_0x15ed47);const _0x358a5a=0x16;let _0x1b9a88=0x0;for(const _0x37f2a4 of _0x383856){const _0x1d99cb=_0x37f2a4['session'][_0x24d659(0x313)]?.[_0x24d659(0x35a)]||'?',_0xdf9f53=Math[_0x24d659(0x23a)](stringWidth(_0x1d99cb),_0x358a5a);_0x1b9a88=Math[_0x24d659(0x201)](_0x1b9a88,_0xdf9f53);}for(const _0x51a96c of _0x383856){const {session:_0x5421b0,startTime:_0x445702,endTime:_0x481b23,duration:_0x4ebd94}=_0x51a96c,_0x194ade=_0x5421b0[_0x24d659(0x313)]?.['id'],_0x56e009=_0x5421b0['id'],_0x2aee0f=_0x5421b0['project']?.[_0x24d659(0x35a)]||'?',_0x216a80=_0x5421b0[_0x24d659(0x324)]?.['name']||'?';let _0x532863,_0x44e25d;if(_0x5421b0['lastAttempt']){const _0x315969=_0x5421b0['lastAttempt'];!_0x315969['done']?(_0x532863=_0x315969[_0x24d659(0x340)]?'🛑':'🔄',_0x44e25d=_0x315969[_0x24d659(0x340)]?a51_0x19af4d[_0x24d659(0x2f8)]:a51_0x19af4d[_0x24d659(0x361)]):(_0x532863=_0x315969[_0x24d659(0x1f6)]?'✅':'❌',_0x44e25d=_0x315969[_0x24d659(0x1f6)]?a51_0x19af4d[_0x24d659(0x308)]:a51_0x19af4d[_0x24d659(0x26c)]);}else _0x532863='⏳',_0x44e25d=a51_0x19af4d[_0x24d659(0x34d)];const _0x109e11='#'+_0x56e009,_0x24512f=_0x194ade?hyperlink(_0x109e11,getWorkflowSessionUrl(_0x35a5c1,_0x194ade,_0x56e009)):_0x109e11;let _0x1187c7=_0x2aee0f;stringWidth(_0x2aee0f)>_0x358a5a&&(_0x1187c7=_0x2aee0f['slice'](0x0,_0x358a5a-0x1)+'…');const _0x4d6702=a51_0x19af4d[_0x24d659(0x34d)](_0x1187c7),_0x50aafd=stringWidth(_0x1187c7),_0x15a05d='\x20'[_0x24d659(0x255)](_0x1b9a88-stringWidth(_0x1187c7)+0x2),_0x4b2e21='('+formatElapsed(_0x4ebd94)+')',_0x26fcdf=stringWidth(_0x4b2e21),_0x33784a=stringWidth(_0x109e11),_0x586237=_0x33784a+0x1+_0x50aafd+_0x15a05d[_0x24d659(0x202)],_0x1b866a=_0x2939c6-_0x586237-_0x26fcdf-0x1-0x8;let _0x3b1ed7=_0x216a80;stringWidth(_0x3b1ed7)>_0x1b866a&&(_0x3b1ed7=_0x3b1ed7[_0x24d659(0x26b)](0x0,_0x1b866a-0x1)+'…');const _0x398438=_0x24512f+'\x20'+_0x4d6702+_0x15a05d+_0x3b1ed7,_0x1b353c=stringWidth(_0x398438),_0x58996a=_0x2939c6-_0x1b353c-_0x26fcdf,_0x6c28f2=_0x398438+'\x20'['repeat'](Math['max'](0x1,_0x58996a))+a51_0x19af4d[_0x24d659(0x34d)](_0x4b2e21),_0x54b98a=Math['floor']((_0x445702-_0x201320)/_0x209780),_0x59bb42=Math[_0x24d659(0x24d)]((_0x481b23-_0x201320)/_0x209780),_0x2734a6=Math[_0x24d659(0x201)](_0x54b98a+0x1,_0x59bb42),_0x5d40c5=new Array(_0x2be602)['fill']('\x20');for(let _0x570870=_0x54b98a;_0x570870<Math[_0x24d659(0x23a)](_0x2734a6,_0x2be602);_0x570870++){_0x5d40c5[_0x570870]='─';}const _0x10a98a=_0x5d40c5[_0x24d659(0x1fe)](_0x12f2a9=>_0x12f2a9==='\x20'?'\x20':_0x44e25d(_0x12f2a9))['join']('');_0x1a6659[_0x24d659(0x331)](_0x532863+'\x20'+_0x6c28f2+'│'+_0x10a98a+'│');}return _0x1a6659[_0x24d659(0x210)]('\x0a');}async[a51_0x3e4a18(0x2f2)](_0x91d6cd,_0x226b99,_0x341962){const _0x3a9f3e=a51_0x3e4a18,{options:_0xfe7a10,tdx:_0x365b8a}=_0x226b99,_0xd78dd6=_0xfe7a10['site'],{timelineRows:_0x2bc4a3,timeAxisHeader:_0xbe45f6}=this['generateSessionTimelineRows'](_0x91d6cd,_0xd78dd6),_0x2154df=_0x2bc4a3[_0x3a9f3e(0x26f)](_0x506ba8=>_0x506ba8[_0x3a9f3e(0x269)]);if(_0x2154df[_0x3a9f3e(0x202)]===0x0){const _0x1e3242=this['renderSessionsTimeline'](_0x91d6cd,_0xd78dd6);console['log'](_0x1e3242);!_0x341962&&(console[_0x3a9f3e(0x21c)](''),console[_0x3a9f3e(0x21c)](a51_0x19af4d[_0x3a9f3e(0x34d)](_0x3a9f3e(0x337))),console[_0x3a9f3e(0x21c)](a51_0x19af4d['dim'](_0x3a9f3e(0x246))+'or'+a51_0x19af4d[_0x3a9f3e(0x34d)](_0x3a9f3e(0x281))));return;}_0xbe45f6&&console[_0x3a9f3e(0x1f7)](_0xbe45f6);const _0x4c6aaa=_0x2bc4a3['filter'](_0x189f3f=>_0x189f3f[_0x3a9f3e(0x269)])['map'](_0x312ba2=>({'title':_0x312ba2[_0x3a9f3e(0x30c)],'value':_0x312ba2[_0x3a9f3e(0x269)]})),_0x5a04d5=process[_0x3a9f3e(0x31c)][_0x3a9f3e(0x309)]||0x3c,_0x41b5a5=Math[_0x3a9f3e(0x201)](0x28,Math['floor'](_0x5a04d5*0x2/0x3)),_0x4c0c32=await a51_0x4a0a66({'type':_0x3a9f3e(0x1f0),'name':_0x3a9f3e(0x269),'message':_0x3a9f3e(0x36d),'choices':_0x4c6aaa,'initial':-0x1,'limit':_0x41b5a5,'clearFirst':!![],'fallback':{'title':_0x3a9f3e(0x1f5),'value':null},'suggest':(_0x6b6c59,_0x1fecd9)=>{const _0x4af3b6=_0x3a9f3e;if(!_0x6b6c59)return Promise[_0x4af3b6(0x2d0)](_0x1fecd9);const _0x3b686f=_0x1fecd9['filter'](_0x422fdb=>{const _0x5b4706=_0x4af3b6,_0x3b1fdd=_0x422fdb;return _0x3b1fdd[_0x5b4706(0x27a)]['toLowerCase']()[_0x5b4706(0x2ed)](_0x6b6c59[_0x5b4706(0x1f2)]());});return Promise[_0x4af3b6(0x2d0)](_0x3b686f);}}),_0x29c50b=()=>{const _0x6f8d7=_0x3a9f3e;process[_0x6f8d7(0x31c)][_0x6f8d7(0x261)](_0x6f8d7(0x247)),process[_0x6f8d7(0x31c)][_0x6f8d7(0x261)](_0x6f8d7(0x247)),process[_0x6f8d7(0x31c)]['write']('\x1b[1A\x1b[2K');},_0x5eb8e0=_0x4c0c32&&_0x4c0c32['attemptId']&&_0x4c0c32[_0x3a9f3e(0x269)]!==null&&_0x4c0c32['attemptId'][_0x3a9f3e(0x2cc)]()!=='';if(!_0x5eb8e0){_0x29c50b(),console[_0x3a9f3e(0x1f7)](a51_0x19af4d['dim'](_0x3a9f3e(0x209)));return;}_0x29c50b();const _0x7d21d0=_0x91d6cd['find'](_0x1a008f=>_0x1a008f[_0x3a9f3e(0x352)]?.['id']===_0x4c0c32[_0x3a9f3e(0x269)]);if(_0x7d21d0){const _0x124c04=_0x7d21d0[_0x3a9f3e(0x313)]?.['name']||'?',_0x27d70d=_0x7d21d0[_0x3a9f3e(0x324)]?.[_0x3a9f3e(0x35a)]||'?';console['log'](_0x3a9f3e(0x314)+a51_0x19af4d[_0x3a9f3e(0x34d)](_0x124c04)+',\x20Workflow:\x20'+a51_0x19af4d['dim'](_0x27d70d));}const _0x24ebc7=new WorkflowTimelineCommand();await _0x24ebc7[_0x3a9f3e(0x1e9)]({'args':[],'options':{..._0xfe7a10,'attemptId':_0x4c0c32[_0x3a9f3e(0x269)]},'tdx':_0x365b8a});}[a51_0x3e4a18(0x32a)](_0x13060b,_0x5bc231){const _0x45ba1a=a51_0x3e4a18,_0xfc8f3d=new Map();for(const _0x210793 of _0x13060b){_0x210793['id']&&_0x210793[_0x45ba1a(0x352)]?.['id']&&_0xfc8f3d[_0x45ba1a(0x35e)](_0x210793['id'],_0x210793[_0x45ba1a(0x352)]['id']);}const _0x451104=[];let _0x4ff998='';const _0x22bb3f=this[_0x45ba1a(0x2a0)](_0x13060b,_0x5bc231),_0x1a181e=_0x22bb3f[_0x45ba1a(0x387)]('\x0a');for(const _0x1426d4 of _0x1a181e){if(_0x1426d4[_0x45ba1a(0x256)](_0x45ba1a(0x1f4))||_0x1426d4[_0x45ba1a(0x23e)](/^\s+\d{4}-\d{2}-\d{2}/))_0x4ff998=_0x1426d4;else{if(_0x1426d4[_0x45ba1a(0x23e)](/^[✅❌🔄🛑⏳]/)){const _0x106598=_0x1426d4['match'](/#(\d+)/),_0x1fb566=_0x106598?_0x106598[0x1]:null,_0x473289=_0x1fb566?_0xfc8f3d[_0x45ba1a(0x2ac)](_0x1fb566)||null:null,_0x35d7b3=_0x13060b[_0x45ba1a(0x2c3)](_0x3b27d5=>_0x3b27d5['id']===_0x1fb566),_0x26fb10=_0x35d7b3?.['project']?.[_0x45ba1a(0x35a)]||'';_0x451104['push']({'displayLine':_0x1426d4,'attemptId':_0x473289,'projectName':_0x26fb10});}}}return{'timelineRows':_0x451104,'timeAxisHeader':_0x4ff998};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x362);[a51_0x3e4a18(0x30b)]=a51_0x3e4a18(0x379);async[a51_0x3e4a18(0x1e9)](_0x3b0b03){const _0xdb864d=a51_0x3e4a18,{options:_0x382d19,args:_0x4dc045,tdx:_0x3235d3}=_0x3b0b03,_0x37efac=this['parseProjectWorkflowPattern'](_0x4dc045,_0x382d19);if(!_0x37efac)return 0x1;const {projectName:_0x35ebe9,workflowName:_0x3a602b}=_0x37efac,_0x541d6b=_0x382d19[_0xdb864d(0x220)];if(_0x382d19['verbose']){if(_0x35ebe9&&_0x3a602b)console[_0xdb864d(0x21c)](_0xdb864d(0x332)+_0x35ebe9+'.'+_0x3a602b);else _0x35ebe9&&console['error'](_0xdb864d(0x221)+_0x35ebe9);_0x541d6b&&console[_0xdb864d(0x21c)]('Include\x20retried:\x20yes');}const _0x470b70=await withSpinner(_0xdb864d(0x374),()=>_0x3235d3['workflow'][_0xdb864d(0x2a2)]({'projectName':_0x35ebe9,'workflowName':_0x3a602b,'includeRetried':_0x541d6b,'limit':_0x382d19[_0xdb864d(0x32c)]}),{'verbose':_0x382d19['verbose']}),_0x41df27=_0x470b70[_0xdb864d(0x2ab)],_0x13e8bc=_0x382d19[_0xdb864d(0x32c)]||0x64,_0x16e047=_0x41df27[_0xdb864d(0x202)]>=_0x13e8bc?a51_0x19af4d[_0xdb864d(0x34d)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0xdb864d(0x21c)](_0xdb864d(0x365)+_0x41df27[_0xdb864d(0x202)]+'\x20attempt'+(_0x41df27[_0xdb864d(0x202)]!==0x1?'s':'')+_0x16e047);if(_0x382d19['format']===_0xdb864d(0x28d)||_0x382d19[_0xdb864d(0x21d)]===_0xdb864d(0x356)||_0x382d19[_0xdb864d(0x21d)]===_0xdb864d(0x290))await handleSDKOutput(_0x41df27,_0x382d19);else{if(_0x41df27[_0xdb864d(0x202)]===0x0){if(_0x35ebe9&&_0x3a602b)console[_0xdb864d(0x1f7)]('No\x20attempts\x20found\x20for:\x20'+_0x35ebe9+'.'+_0x3a602b);else _0x35ebe9?console[_0xdb864d(0x1f7)](_0xdb864d(0x36e)+_0x35ebe9):console[_0xdb864d(0x1f7)]('No\x20attempts\x20found');}else{const _0x2b90bc=_0x382d19[_0xdb864d(0x336)],_0x51dea9=_0x41df27[_0xdb864d(0x1fe)](_0xb06378=>{const _0x156581=_0xdb864d,_0x113387=a51_0x19af4d[_0x156581(0x34d)]('#'+_0xb06378['id']),_0x49d84d=_0xb06378[_0x156581(0x313)]?.['id'],_0x4fc9ad=_0xb06378[_0x156581(0x22a)]||_0xb06378[_0x156581(0x355)],_0x14dbd4=_0x49d84d&&_0x4fc9ad?hyperlink(_0x113387,getWorkflowAttemptUrl(_0x2b90bc,_0x49d84d,_0x4fc9ad,_0xb06378['id'])):_0x113387,{icon:_0xc748ac,text:_0xb55c15}=getAttemptStatusDisplay(_0xb06378),_0x46407f=(_0xb06378[_0x156581(0x313)]?.[_0x156581(0x35a)]||'?')+'.'+(_0xb06378[_0x156581(0x324)]?.[_0x156581(0x35a)]||'?'),_0x48a611=_0xb06378[_0x156581(0x237)]?a51_0x19af4d['dim'](_0xb06378[_0x156581(0x237)]):'';return(_0x14dbd4+'\x20'+_0xc748ac+(_0xb55c15?'\x20'+_0xb55c15:'')+'\x20'+_0x46407f+'\x20'+_0x48a611)['trimEnd']();});await writeOutput(_0x51dea9[_0xdb864d(0x210)]('\x0a'),_0x382d19[_0xdb864d(0x2cb)],_0xdb864d(0x244));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]='workflow:attempt';[a51_0x3e4a18(0x30b)]='Show\x20specific\x20attempt\x20details';async[a51_0x3e4a18(0x1e9)](_0x115343){const _0x429f7c=a51_0x3e4a18,{options:_0x49cf79,args:_0x57d385,tdx:_0x1a8345}=_0x115343,_0x2aff6f=_0x57d385[0x0];if(!_0x2aff6f)return console[_0x429f7c(0x21c)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x49cf79['verbose']&&console[_0x429f7c(0x21c)](_0x429f7c(0x27f)+_0x2aff6f);const _0x29d606=await withSpinner(_0x429f7c(0x204),()=>_0x1a8345[_0x429f7c(0x324)][_0x429f7c(0x231)](_0x2aff6f),{'verbose':_0x49cf79[_0x429f7c(0x380)]}),_0xc7747d=_0x29d606[_0x429f7c(0x2ab)];let _0x5d99c9;!_0xc7747d[_0x429f7c(0x26e)]?_0x5d99c9=_0xc7747d[_0x429f7c(0x340)]?'canceling':_0x429f7c(0x342):_0x5d99c9=_0xc7747d[_0x429f7c(0x1f6)]?'success':_0x429f7c(0x21c);let _0x13e86f;if(_0xc7747d[_0x429f7c(0x32b)]&&_0xc7747d[_0x429f7c(0x32d)]){const _0x53b918=new Date(_0xc7747d[_0x429f7c(0x32b)])[_0x429f7c(0x226)](),_0x5dc5a3=new Date(_0xc7747d['finishedAt'])[_0x429f7c(0x226)]();_0x13e86f=Math['round']((_0x5dc5a3-_0x53b918)/0x3e8);}const _0x2a437c={'attempt_id':_0xc7747d['id'],'status':_0x5d99c9,..._0xc7747d[_0x429f7c(0x29f)]!==undefined&&{'index':_0xc7747d[_0x429f7c(0x29f)]},..._0xc7747d['project']&&{'project':_0xc7747d['project'][_0x429f7c(0x35a)]},..._0xc7747d['workflow']&&{'workflow':_0xc7747d['workflow'][_0x429f7c(0x35a)]},..._0xc7747d['sessionId']&&{'session_id':_0xc7747d[_0x429f7c(0x355)]},..._0xc7747d['sessionTime']&&{'session_time':_0xc7747d['sessionTime']},..._0xc7747d['retryAttemptName']&&{'retry_attempt':_0xc7747d[_0x429f7c(0x341)]},..._0x13e86f!==undefined&&{'duration_sec':_0x13e86f},..._0xc7747d['createdAt']&&{'created_at':_0xc7747d[_0x429f7c(0x32b)]},..._0xc7747d[_0x429f7c(0x32d)]&&{'finished_at':_0xc7747d[_0x429f7c(0x32d)]},...Object['keys'](_0xc7747d[_0x429f7c(0x321)])[_0x429f7c(0x202)]>0x0&&{'params':_0xc7747d[_0x429f7c(0x321)]}};return await handleSingleObjectOutput(_0x2a437c,_0x49cf79),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x2f6);['description']=a51_0x3e4a18(0x2e6);async[a51_0x3e4a18(0x1e9)](_0x1485e0){const _0x6a31bd=a51_0x3e4a18,{options:_0x17d22f,args:_0x378f47,tdx:_0x4a9d07}=_0x1485e0,_0x19efc5=_0x378f47[0x0];if(!_0x19efc5)return console[_0x6a31bd(0x21c)](_0x6a31bd(0x1ed)),0x1;const _0xadbbf0=_0x17d22f['includeSubtasks'];_0x17d22f[_0x6a31bd(0x380)]&&(console[_0x6a31bd(0x21c)](_0x6a31bd(0x27f)+_0x19efc5),_0xadbbf0&&console[_0x6a31bd(0x21c)]('Including\x20subtasks:\x20yes'));const _0xedc98a=await withSpinner(_0x6a31bd(0x216),()=>_0x4a9d07[_0x6a31bd(0x324)][_0x6a31bd(0x20e)](_0x19efc5,_0xadbbf0||![]),{'verbose':_0x17d22f['verbose']}),_0xff1dcc=_0xedc98a[_0x6a31bd(0x2ab)];return console[_0x6a31bd(0x21c)](_0x6a31bd(0x365)+_0xff1dcc[_0x6a31bd(0x202)]+'\x20task'+(_0xff1dcc[_0x6a31bd(0x202)]!==0x1?'s':'')),await handleSDKOutput(_0xff1dcc,_0x17d22f),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x24f);[a51_0x3e4a18(0x30b)]=a51_0x3e4a18(0x2c6);async[a51_0x3e4a18(0x1e9)](_0x41b49f){const _0x19ab83=a51_0x3e4a18,{options:_0x534714,args:_0x23f359,tdx:_0x5e82b8}=_0x41b49f,_0x1f3b79=_0x23f359[0x0];let _0x1d855e=_0x23f359[0x1];if(!_0x1f3b79)return console['error'](_0x19ab83(0x1ed)),0x1;_0x534714['verbose']&&(console[_0x19ab83(0x21c)](_0x19ab83(0x27f)+_0x1f3b79),_0x1d855e&&console[_0x19ab83(0x21c)]('Task\x20name:\x20'+_0x1d855e));const _0x32a0d1=await withSpinner(_0x19ab83(0x32f),()=>_0x5e82b8['workflow'][_0x19ab83(0x382)](_0x1f3b79,_0x1d855e),{'verbose':_0x534714[_0x19ab83(0x380)]}),_0x3e32db=_0x32a0d1[_0x19ab83(0x2ab)];if(_0x3e32db[_0x19ab83(0x202)]===0x0)return console[_0x19ab83(0x21c)](_0x19ab83(0x344)),0x0;if(!_0x1d855e&&(_0x534714['json']||_0x534714[_0x19ab83(0x21d)]))return await handleSDKOutput(_0x3e32db,_0x534714),0x0;if(!_0x1d855e){const _0x5e992b=_0x3e32db[_0x19ab83(0x1fe)](_0x421724=>({'title':_0x421724[_0x19ab83(0x2fe)]+'\x20('+formatBytes(_0x421724[_0x19ab83(0x366)])+')','value':_0x421724[_0x19ab83(0x2fe)]})),_0x50defc=await a51_0x4a0a66({'type':_0x19ab83(0x33c),'name':'task','message':_0x19ab83(0x286),'choices':_0x5e992b});if(!_0x50defc[_0x19ab83(0x27d)])return console[_0x19ab83(0x21c)](_0x19ab83(0x209)),0x0;_0x1d855e=_0x50defc[_0x19ab83(0x27d)];}const _0x4f609a=await withSpinner(_0x19ab83(0x212),()=>_0x5e82b8[_0x19ab83(0x324)][_0x19ab83(0x370)](_0x1f3b79,_0x1d855e),{'verbose':_0x534714[_0x19ab83(0x380)]}),_0x2fca24=_0x4f609a[_0x19ab83(0x2ab)];return _0x2fca24?console[_0x19ab83(0x1f7)](_0x2fca24):console['error'](_0x19ab83(0x20a)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x2eb);[a51_0x3e4a18(0x30b)]='Kill\x20a\x20running\x20attempt';async[a51_0x3e4a18(0x1e9)](_0x10eb4b){const _0x2b5993=a51_0x3e4a18,{options:_0x3ed92e,args:_0x23d0c6,tdx:_0x5d1784}=_0x10eb4b,_0x1c4468=_0x23d0c6[0x0];if(!_0x1c4468)return console[_0x2b5993(0x21c)](_0x2b5993(0x1ed)),0x1;const _0x318043=_0x3ed92e[_0x2b5993(0x347)];_0x3ed92e[_0x2b5993(0x380)]&&(console[_0x2b5993(0x21c)](_0x2b5993(0x27f)+_0x1c4468),_0x318043&&console[_0x2b5993(0x21c)]('Reason:\x20'+_0x318043));if(!_0x3ed92e[_0x2b5993(0x242)]){if(!isInteractive())return console[_0x2b5993(0x21c)](a51_0x19af4d['red'](_0x2b5993(0x293)),_0x2b5993(0x218)),console[_0x2b5993(0x21c)](a51_0x19af4d[_0x2b5993(0x34d)](_0x2b5993(0x276))),0x1;const _0x52a4d8=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x1c4468+'?');if(!_0x52a4d8)return console[_0x2b5993(0x21c)](a51_0x19af4d[_0x2b5993(0x2f8)]('Cancelled')),0x1;}const _0x40e4fb=await withSpinner(_0x2b5993(0x267),()=>_0x5d1784[_0x2b5993(0x324)][_0x2b5993(0x257)](_0x1c4468,_0x318043),{'verbose':_0x3ed92e[_0x2b5993(0x380)]}),_0x36d86b=_0x40e4fb[_0x2b5993(0x2ab)];return console[_0x2b5993(0x21c)]('✔\x20'+_0x36d86b),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x2f9);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a51_0x3e4a18(0x1e9)](_0x1a195f){const _0x148631=a51_0x3e4a18,{options:_0x169c95,args:_0x12dac1,tdx:_0x3c8d2d}=_0x1a195f,_0x15c68e=_0x12dac1[0x0];if(!_0x15c68e)return console[_0x148631(0x21c)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x148631(0x21c)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x223b68=![],_0x15324a=_0x15c68e;if(_0x15c68e['startsWith'](_0x148631(0x275)))_0x223b68=!![],_0x15324a=_0x15c68e[_0x148631(0x29d)](0x8);else{if(_0x15c68e[_0x148631(0x256)](_0x148631(0x357)))_0x223b68=![],_0x15324a=_0x15c68e['substring'](0x8);else return console['error'](_0x148631(0x334)),console['error'](_0x148631(0x2d9)),0x1;}const _0x366621=_0x169c95[_0x148631(0x25f)],_0x31aa43=_0x169c95['resumeFrom'],_0x56ba54=_0x169c95[_0x148631(0x321)],_0x58b5d0=_0x169c95[_0x148631(0x205)];_0x169c95[_0x148631(0x380)]&&(console[_0x148631(0x21c)]('Target:\x20'+(_0x223b68?_0x148631(0x28a):_0x148631(0x231))+'\x20'+_0x15324a),_0x366621&&console[_0x148631(0x21c)](_0x148631(0x2a6)+_0x366621),_0x31aa43&&console[_0x148631(0x21c)](_0x148631(0x211)+_0x31aa43),_0x56ba54&&console[_0x148631(0x21c)]('Params:\x20'+_0x56ba54),_0x58b5d0&&console[_0x148631(0x21c)](_0x148631(0x32e)));let _0xf7a4f0;if(_0x56ba54)try{if(_0x56ba54['startsWith']('@')){const _0x36c312=await import(_0x148631(0x243)),_0x1c3bc2=_0x56ba54['substring'](0x1),_0x5bdaad=await _0x36c312[_0x148631(0x2e2)](_0x1c3bc2,_0x148631(0x372));_0xf7a4f0=JSON[_0x148631(0x303)](_0x5bdaad);}else _0xf7a4f0=JSON['parse'](_0x56ba54);}catch{return console[_0x148631(0x21c)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x169c95[_0x148631(0x242)]){if(!isInteractive())return console[_0x148631(0x21c)](a51_0x19af4d[_0x148631(0x26c)](_0x148631(0x293)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x148631(0x21c)](a51_0x19af4d['dim'](_0x148631(0x276))),0x1;const _0x4fc05d=await confirmKey(_0x148631(0x359)+(_0x223b68?_0x148631(0x28a):'attempt')+'\x20'+_0x15324a+'?');if(!_0x4fc05d)return console[_0x148631(0x21c)](a51_0x19af4d[_0x148631(0x2f8)](_0x148631(0x209))),0x1;}let _0x1aba7d;_0x223b68?_0x1aba7d=await withSpinner('Retrying\x20session...',()=>_0x3c8d2d['workflow']['retrySession'](_0x15324a,{'fromTask':_0x366621,'retryParams':_0xf7a4f0}),{'verbose':_0x169c95['verbose']}):_0x1aba7d=await withSpinner(_0x148631(0x279),()=>_0x3c8d2d[_0x148631(0x324)][_0x148631(0x36a)](_0x15324a,{'resumeFrom':_0x31aa43,'retryParams':_0xf7a4f0,'force':_0x58b5d0}),{'verbose':_0x169c95[_0x148631(0x380)]});const _0x1abcee=_0x1aba7d['data'];return console[_0x148631(0x21c)](_0x148631(0x37b)),console[_0x148631(0x21c)](_0x148631(0x25d)+_0x1abcee['attemptId']),console[_0x148631(0x21c)](_0x148631(0x22c)+_0x1abcee[_0x148631(0x355)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x30a);[a51_0x3e4a18(0x30b)]=a51_0x3e4a18(0x1fd);async[a51_0x3e4a18(0x1e9)](_0x5261f0){const _0x1b72ec=a51_0x3e4a18,{options:_0x51215f,args:_0x51887b,tdx:_0x40109c}=_0x5261f0;let _0x5a53c6=_0x51887b[0x0];if(!_0x5a53c6){const _0x3690d4=this['resolveProject']([],_0x51215f),_0x315947=await withSpinner('Loading\x20workflows...',()=>_0x40109c[_0x1b72ec(0x324)][_0x1b72ec(0x277)](_0x3690d4,{'limit':_0x51215f[_0x1b72ec(0x32c)]}),{'verbose':_0x51215f[_0x1b72ec(0x380)]}),_0x24f792=_0x315947[_0x1b72ec(0x2ab)];if(_0x24f792[_0x1b72ec(0x202)]===0x0)return console[_0x1b72ec(0x21c)](_0x1b72ec(0x25a)),!_0x3690d4&&console[_0x1b72ec(0x21c)](a51_0x19af4d[_0x1b72ec(0x34d)](_0x1b72ec(0x20f))),0x1;const _0x466acb=_0x24f792[_0x1b72ec(0x1fe)](_0xfec047=>({'title':_0xfec047['project']?.[_0x1b72ec(0x35a)]+'.'+_0xfec047[_0x1b72ec(0x35a)],'value':_0xfec047[_0x1b72ec(0x313)]?.[_0x1b72ec(0x35a)]+'.'+_0xfec047[_0x1b72ec(0x35a)],'description':_0xfec047[_0x1b72ec(0x239)]?'revision:\x20'+_0xfec047[_0x1b72ec(0x239)]:undefined})),_0x114358=await a51_0x4a0a66({'type':_0x1b72ec(0x33c),'name':_0x1b72ec(0x324),'message':_0x1b72ec(0x20c),'choices':_0x466acb});if(!_0x114358[_0x1b72ec(0x324)])return 0x1;_0x5a53c6=_0x114358[_0x1b72ec(0x324)];}if(!_0x5a53c6[_0x1b72ec(0x2ed)]('.')){const _0x17d895=this[_0x1b72ec(0x31b)]([],_0x51215f);if(_0x17d895)_0x5a53c6=_0x17d895+'.'+_0x5a53c6;else return console[_0x1b72ec(0x21c)](a51_0x19af4d[_0x1b72ec(0x26c)](_0x1b72ec(0x2cd)),_0x1b72ec(0x353)),console[_0x1b72ec(0x21c)](a51_0x19af4d['dim'](_0x1b72ec(0x20f))),0x1;}const _0x36355b=_0x51215f['param'],_0xecadf0=_0x51215f['sessionTime'],_0x392570={};if(_0x36355b&&Array[_0x1b72ec(0x2f1)](_0x36355b))for(const _0x4e774f of _0x36355b){const _0x1869e8=_0x4e774f[_0x1b72ec(0x311)]('=');if(_0x1869e8===-0x1)return console[_0x1b72ec(0x21c)](_0x1b72ec(0x29e)+_0x4e774f),console[_0x1b72ec(0x21c)](_0x1b72ec(0x249)),0x1;const _0x25220d=_0x4e774f['substring'](0x0,_0x1869e8),_0x5194b1=_0x4e774f[_0x1b72ec(0x29d)](_0x1869e8+0x1);try{_0x392570[_0x25220d]=JSON[_0x1b72ec(0x303)](_0x5194b1);}catch{_0x392570[_0x25220d]=_0x5194b1;}}_0x51215f[_0x1b72ec(0x380)]&&(console['error']('Workflow:\x20'+_0x5a53c6),Object['keys'](_0x392570)[_0x1b72ec(0x202)]>0x0&&console['error']('Parameters:\x20'+JSON['stringify'](_0x392570)),_0xecadf0&&console[_0x1b72ec(0x21c)](_0x1b72ec(0x224)+_0xecadf0));const _0x1721af=await withSpinner(_0x1b72ec(0x2e8),()=>_0x40109c[_0x1b72ec(0x324)][_0x1b72ec(0x208)](_0x5a53c6,_0x392570,{'sessionTime':_0xecadf0}),{'verbose':_0x51215f['verbose']}),_0x5e43a0=_0x1721af['data'];console[_0x1b72ec(0x21c)]('✔\x20Workflow\x20run\x20started'),console[_0x1b72ec(0x21c)]('\x20\x20Attempt\x20ID:\x20'+_0x5e43a0['id']),console['error'](_0x1b72ec(0x22c)+_0x5e43a0[_0x1b72ec(0x355)]),console[_0x1b72ec(0x21c)](_0x1b72ec(0x2b9)+_0x5e43a0[_0x1b72ec(0x313)]?.[_0x1b72ec(0x35a)]),console['error'](_0x1b72ec(0x1f3)+_0x5e43a0[_0x1b72ec(0x324)]?.[_0x1b72ec(0x35a)]);if(_0x5e43a0[_0x1b72ec(0x313)]?.['id']&&_0x5e43a0[_0x1b72ec(0x355)]&&_0x5e43a0['id']){const _0x4eebb0=_0x51215f['site'],_0x5ace54=getConsoleUrl(_0x4eebb0,_0x1b72ec(0x2da)+_0x5e43a0[_0x1b72ec(0x313)]['id']+_0x1b72ec(0x35d)+_0x5e43a0[_0x1b72ec(0x355)]+'/attempt/'+_0x5e43a0['id']);console[_0x1b72ec(0x21c)](_0x1b72ec(0x299)+a51_0x19af4d[_0x1b72ec(0x241)](_0x5ace54));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x323);['description']=a51_0x3e4a18(0x264);async[a51_0x3e4a18(0x1e9)](_0xa02036){const _0x5866bf=a51_0x3e4a18,{options:_0x3cc350,args:_0x43fd87,tdx:_0x1813d3}=_0xa02036,_0x56c3bc=_0x43fd87[0x0],_0x353ab2=_0x43fd87[0x1]||'.';if(!_0x56c3bc)return console[_0x5866bf(0x21c)](_0x5866bf(0x283)),console[_0x5866bf(0x21c)](_0x5866bf(0x2b3)),0x1;const _0x47762e=_0x3cc350[_0x5866bf(0x239)];_0x3cc350[_0x5866bf(0x380)]&&(console['error'](_0x5866bf(0x314)+_0x56c3bc),console[_0x5866bf(0x21c)](_0x5866bf(0x228)+_0x353ab2),_0x47762e&&console[_0x5866bf(0x21c)](_0x5866bf(0x240)+_0x47762e));const _0x55b46f=await withSpinner(_0x5866bf(0x319)+_0x56c3bc+'...',()=>_0x1813d3[_0x5866bf(0x324)][_0x5866bf(0x2b5)](_0x56c3bc,_0x353ab2,{'revision':_0x47762e}),{'verbose':_0x3cc350['verbose']}),_0x4b8fbe=_0x55b46f['data'];return console[_0x5866bf(0x21c)](_0x5866bf(0x2d1)+_0x4b8fbe[_0x5866bf(0x245)]),console[_0x5866bf(0x21c)](_0x5866bf(0x360)+_0x4b8fbe[_0x5866bf(0x239)]),console[_0x5866bf(0x21c)]('\x20\x20Files\x20extracted:\x20'+_0x4b8fbe['filesExtracted']),console[_0x5866bf(0x21c)](_0x5866bf(0x206)+_0x353ab2+'/'+_0x4b8fbe['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a51_0x3e4a18(0x35a)]='workflow:upload';[a51_0x3e4a18(0x30b)]=a51_0x3e4a18(0x223);async['execute'](_0x33bffe){const _0x24b54a=a51_0x3e4a18,{options:_0x114f2d,args:_0x27a8e9,tdx:_0x44a54e}=_0x33bffe;let _0x5f5799='.',_0x2797d1=_0x114f2d[_0x24b54a(0x35a)];if(_0x27a8e9[0x0]){const {promises:_0x586b9c}=await import('fs');try{const _0x1e20c4=await _0x586b9c[_0x24b54a(0x200)](_0x27a8e9[0x0]);if(_0x1e20c4[_0x24b54a(0x335)]())_0x5f5799=_0x27a8e9[0x0];else return console['error'](_0x24b54a(0x339)+_0x27a8e9[0x0]+_0x24b54a(0x2d5)),0x1;}catch{_0x2797d1=_0x27a8e9[0x0],_0x5f5799='.';}}const _0x2141ba=_0x114f2d['revision'],_0x27c429=_0x114f2d['skipValidation'];_0x114f2d[_0x24b54a(0x380)]&&(console[_0x24b54a(0x21c)]('Project\x20directory:\x20'+_0x5f5799),_0x2797d1&&console[_0x24b54a(0x21c)](_0x24b54a(0x2ca)+_0x2797d1),_0x2141ba&&console[_0x24b54a(0x21c)]('Revision:\x20'+_0x2141ba),_0x27c429&&console[_0x24b54a(0x21c)](_0x24b54a(0x373)));const _0x57bd88=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x44a54e[_0x24b54a(0x324)][_0x24b54a(0x331)](_0x5f5799,{'projectName':_0x2797d1,'revision':_0x2141ba,'skipValidation':_0x27c429}),{'verbose':_0x114f2d[_0x24b54a(0x380)]}),_0x5784b4=_0x57bd88[_0x24b54a(0x2ab)];return console['error'](_0x24b54a(0x384)+_0x5784b4[_0x24b54a(0x245)]),console[_0x24b54a(0x21c)](_0x24b54a(0x2bb)+_0x5784b4[_0x24b54a(0x33b)]),console[_0x24b54a(0x21c)](_0x24b54a(0x360)+_0x5784b4[_0x24b54a(0x239)]),await this[_0x24b54a(0x310)](_0x44a54e,_0x5784b4[_0x24b54a(0x245)],_0x114f2d[_0x24b54a(0x336)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x28e);[a51_0x3e4a18(0x30b)]=a51_0x3e4a18(0x2a1);async[a51_0x3e4a18(0x1e9)](_0x4b29d9){const _0x211772=a51_0x3e4a18,{options:_0x3366b3,args:_0x37eea1,tdx:_0x57e1bd}=_0x4b29d9,_0x27e993=_0x37eea1[0x0],_0x3fb960=_0x37eea1[0x1];if(!_0x27e993)return console[_0x211772(0x21c)](a51_0x19af4d[_0x211772(0x26c)]('Error:'),_0x211772(0x306)),console[_0x211772(0x21c)](a51_0x19af4d['dim']('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x2b80cf=_0x3366b3[_0x211772(0x239)];_0x3366b3[_0x211772(0x380)]&&(console[_0x211772(0x21c)](_0x211772(0x314)+_0x27e993),_0x3fb960&&console[_0x211772(0x21c)](_0x211772(0x351)+_0x3fb960),_0x2b80cf&&console['error'](_0x211772(0x240)+_0x2b80cf),_0x3366b3[_0x211772(0x2ee)]&&console[_0x211772(0x21c)](_0x211772(0x24c)));const _0x59a7c1=await withSpinner(_0x211772(0x219)+_0x27e993+_0x211772(0x367),()=>_0x57e1bd[_0x211772(0x324)][_0x211772(0x2a8)](_0x27e993,{'targetDir':_0x3fb960,'revision':_0x2b80cf}),{'verbose':_0x3366b3[_0x211772(0x380)]}),_0x1f2833=_0x59a7c1[_0x211772(0x2ab)];_0x1f2833[_0x211772(0x348)]?console[_0x211772(0x21c)](_0x211772(0x284)+_0x1f2833[_0x211772(0x245)]):console[_0x211772(0x21c)]('→\x20Project:\x20'+_0x1f2833[_0x211772(0x245)]);console[_0x211772(0x21c)](_0x211772(0x360)+_0x1f2833[_0x211772(0x239)]),console[_0x211772(0x21c)](_0x211772(0x36b)+(a51_0x4a2e0b[_0x211772(0x27b)](process[_0x211772(0x288)](),_0x1f2833[_0x211772(0x37a)])||'.')),console['error']('\x20\x20Changes:\x20'+a51_0x19af4d[_0x211772(0x308)]('+'+_0x1f2833['summary'][_0x211772(0x35c)]+'\x20new')+',\x20'+(a51_0x19af4d['yellow']('~'+_0x1f2833[_0x211772(0x2fa)][_0x211772(0x338)]+_0x211772(0x27c))+',\x20')+(a51_0x19af4d[_0x211772(0x26c)]('-'+_0x1f2833['summary'][_0x211772(0x235)]+'\x20deleted')+',\x20')+(''+a51_0x19af4d[_0x211772(0x34d)](_0x1f2833['summary'][_0x211772(0x2be)]+'\x20unchanged')));for(const _0x1dd833 of _0x1f2833[_0x211772(0x23b)]){_0x1dd833[_0x211772(0x225)]===_0x211772(0x338)&&_0x1dd833['diff']&&(console['error']('\x0a'+a51_0x19af4d[_0x211772(0x241)](_0x211772(0x23d)+_0x1dd833[_0x211772(0x22e)])),console[_0x211772(0x21c)](_0x1dd833[_0x211772(0x2de)]));}if(!_0x1f2833[_0x211772(0x2bf)])return saveSessionContext({'workflow_project':_0x1f2833['projectName']},_0x3366b3['session']),console[_0x211772(0x21c)](a51_0x19af4d['green'](_0x211772(0x34f))),console[_0x211772(0x21c)](a51_0x19af4d['dim'](_0x211772(0x2db)+_0x1f2833[_0x211772(0x245)])),0x0;if(_0x3366b3['dryRun'])return console[_0x211772(0x21c)](a51_0x19af4d[_0x211772(0x2f8)](_0x211772(0x2a3))),0x0;if(!_0x3366b3[_0x211772(0x242)]){if(!isInteractive())return console[_0x211772(0x21c)](a51_0x19af4d[_0x211772(0x26c)](_0x211772(0x293)),_0x211772(0x218)),console[_0x211772(0x21c)](a51_0x19af4d[_0x211772(0x34d)](_0x211772(0x276))),0x1;const _0x2eaa80=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x2eaa80)return console['error'](a51_0x19af4d[_0x211772(0x2f8)](_0x211772(0x209)),_0x211772(0x1eb)),0x1;}await withSpinner(_0x211772(0x1ff),()=>_0x57e1bd[_0x211772(0x324)][_0x211772(0x253)](_0x1f2833,{'revision':_0x2b80cf}),{'verbose':_0x3366b3[_0x211772(0x380)]}),saveSessionContext({'workflow_project':_0x1f2833[_0x211772(0x245)]},_0x3366b3[_0x211772(0x28a)]),console[_0x211772(0x21c)](a51_0x19af4d[_0x211772(0x308)](_0x211772(0x363)));const _0x3e5979=a51_0x4a2e0b['relative'](process[_0x211772(0x288)](),_0x1f2833[_0x211772(0x37a)])||'.';return console[_0x211772(0x21c)](a51_0x19af4d[_0x211772(0x34d)]('\x20\x20Location:\x20'+_0x3e5979)),console[_0x211772(0x21c)](a51_0x19af4d[_0x211772(0x34d)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1f2833['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x291);[a51_0x3e4a18(0x30b)]=a51_0x3e4a18(0x2ad);async[a51_0x3e4a18(0x1e9)](_0x1c079f){const _0x54f77f=a51_0x3e4a18,{options:_0x570928,args:_0x9cf00c,tdx:_0x2bdd52}=_0x1c079f,_0xa2e047=this[_0x54f77f(0x273)](_0x9cf00c,_0x570928),_0x4b1552=_0x570928[_0x54f77f(0x239)],_0x38680c=_0x570928[_0x54f77f(0x33f)];_0x570928[_0x54f77f(0x380)]&&(_0xa2e047&&console['error'](_0x54f77f(0x234)+_0xa2e047),_0x4b1552&&console[_0x54f77f(0x21c)](_0x54f77f(0x240)+_0x4b1552),_0x570928[_0x54f77f(0x2ee)]&&console[_0x54f77f(0x21c)](_0x54f77f(0x24c)),_0x38680c&&console[_0x54f77f(0x21c)]('Validation:\x20skipped'));let _0x21e524;try{_0x21e524=await withSpinner(_0x54f77f(0x369),()=>_0x2bdd52['workflow'][_0x54f77f(0x322)]({'sourceDir':_0xa2e047,'revision':_0x4b1552,'skipValidation':_0x38680c}),{'verbose':_0x570928['verbose']});}catch(_0x42e974){if(_0x42e974 instanceof Error&&_0x42e974[_0x54f77f(0x2a7)][_0x54f77f(0x2ed)](_0x54f77f(0x1ef)))return console['error'](a51_0x19af4d[_0x54f77f(0x26c)](_0x54f77f(0x2cd)),_0x54f77f(0x2ae)),_0x570928['workflowProject']?console['error'](a51_0x19af4d['dim']('Tip:\x20cd\x20to\x20workflows/'+_0x570928[_0x54f77f(0x22f)]+_0x54f77f(0x270)+_0x570928[_0x54f77f(0x22f)]+'\x27')):console[_0x54f77f(0x21c)](a51_0x19af4d[_0x54f77f(0x34d)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x42e974;}const _0x1373c2=_0x21e524[_0x54f77f(0x2ab)];console['error'](_0x54f77f(0x37c)+_0x1373c2['projectName']),console[_0x54f77f(0x21c)](_0x54f77f(0x307)+_0x1373c2[_0x54f77f(0x34c)]),console[_0x54f77f(0x21c)]('\x20\x20Revision:\x20'+_0x1373c2[_0x54f77f(0x239)]),console[_0x54f77f(0x21c)]('\x20\x20Changes:\x20'+a51_0x19af4d[_0x54f77f(0x308)]('+'+_0x1373c2[_0x54f77f(0x2fa)][_0x54f77f(0x35c)]+'\x20new')+',\x20'+(a51_0x19af4d['yellow']('~'+_0x1373c2[_0x54f77f(0x2fa)]['modified']+_0x54f77f(0x27c))+',\x20')+(a51_0x19af4d[_0x54f77f(0x26c)]('-'+_0x1373c2['summary'][_0x54f77f(0x235)]+_0x54f77f(0x33d))+',\x20')+(''+a51_0x19af4d[_0x54f77f(0x34d)](_0x1373c2['summary'][_0x54f77f(0x2be)]+_0x54f77f(0x29a))));for(const _0x51043f of _0x1373c2['changes']){_0x51043f[_0x54f77f(0x225)]==='modified'&&_0x51043f['diff']&&(console[_0x54f77f(0x21c)]('\x0a'+a51_0x19af4d[_0x54f77f(0x241)](_0x54f77f(0x23d)+_0x51043f[_0x54f77f(0x22e)])),console['error'](_0x51043f[_0x54f77f(0x2de)]));}if(!_0x1373c2[_0x54f77f(0x2bf)])return console[_0x54f77f(0x21c)](a51_0x19af4d['green'](_0x54f77f(0x2e3))),await this[_0x54f77f(0x310)](_0x2bdd52,_0x1373c2[_0x54f77f(0x245)],_0x570928[_0x54f77f(0x336)]),0x0;if(_0x570928[_0x54f77f(0x2ee)])return console[_0x54f77f(0x21c)](a51_0x19af4d[_0x54f77f(0x2f8)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x570928['yes']){if(!isInteractive())return console[_0x54f77f(0x21c)](a51_0x19af4d[_0x54f77f(0x26c)]('\x0aError:'),_0x54f77f(0x218)),console['error'](a51_0x19af4d[_0x54f77f(0x34d)](_0x54f77f(0x276))),0x1;const _0x347c61=await confirmKey(_0x54f77f(0x2d4));if(!_0x347c61)return console[_0x54f77f(0x21c)](a51_0x19af4d[_0x54f77f(0x2f8)](_0x54f77f(0x209)),_0x54f77f(0x271)),0x1;}const _0x2724b3=await withSpinner(_0x54f77f(0x251),()=>_0x2bdd52[_0x54f77f(0x324)][_0x54f77f(0x2d8)](_0x1373c2),{'verbose':_0x570928[_0x54f77f(0x380)]}),_0x43d305=_0x2724b3[_0x54f77f(0x2ab)];return console[_0x54f77f(0x21c)](a51_0x19af4d[_0x54f77f(0x308)](_0x54f77f(0x2e5))),console[_0x54f77f(0x21c)](_0x54f77f(0x2bb)+_0x43d305[_0x54f77f(0x33b)]),console[_0x54f77f(0x21c)](_0x54f77f(0x360)+_0x43d305[_0x54f77f(0x239)]),await this[_0x54f77f(0x310)](_0x2bdd52,_0x43d305[_0x54f77f(0x245)],_0x570928['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a51_0x3e4a18(0x35a)]='workflow:clone';['description']='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a51_0x3e4a18(0x1e9)](_0x2bff17){const _0x2f34b2=a51_0x3e4a18,{options:_0x53b5df,args:_0x29363b,tdx:_0x2b8066}=_0x2bff17,_0x21610d=this[_0x2f34b2(0x273)](_0x29363b,_0x53b5df),_0x57dd7f=_0x53b5df[_0x2f34b2(0x35a)],_0x48b709=_0x53b5df[_0x2f34b2(0x239)],_0x2e9f40=_0x53b5df[_0x2f34b2(0x33f)];if(!_0x21610d)return console['error'](a51_0x19af4d[_0x2f34b2(0x26c)]('Error:'),_0x2f34b2(0x294)),console[_0x2f34b2(0x21c)](a51_0x19af4d['dim'](_0x2f34b2(0x2df))),console[_0x2f34b2(0x21c)](a51_0x19af4d['dim'](_0x2f34b2(0x364))),0x1;if(!_0x57dd7f)return console['error'](a51_0x19af4d['red']('Error:'),_0x2f34b2(0x232)),console[_0x2f34b2(0x21c)](a51_0x19af4d[_0x2f34b2(0x34d)](_0x2f34b2(0x2df))),0x1;_0x53b5df[_0x2f34b2(0x380)]&&(console[_0x2f34b2(0x21c)](_0x2f34b2(0x234)+_0x21610d),console['error']('New\x20project\x20name:\x20'+_0x57dd7f),_0x48b709&&console[_0x2f34b2(0x21c)](_0x2f34b2(0x240)+_0x48b709),_0x53b5df[_0x2f34b2(0x2ee)]&&console[_0x2f34b2(0x21c)](_0x2f34b2(0x24c)),_0x2e9f40&&console[_0x2f34b2(0x21c)](_0x2f34b2(0x373)));const _0x467378=await withSpinner(_0x2f34b2(0x305),()=>_0x2b8066[_0x2f34b2(0x324)][_0x2f34b2(0x280)](_0x21610d,_0x57dd7f,{'revision':_0x48b709,'skipValidation':_0x2e9f40}),{'verbose':_0x53b5df[_0x2f34b2(0x380)]}),_0x127b83=_0x467378[_0x2f34b2(0x2ab)];console[_0x2f34b2(0x21c)](_0x2f34b2(0x259)+_0x127b83[_0x2f34b2(0x34c)]);_0x127b83[_0x2f34b2(0x2a9)]&&console[_0x2f34b2(0x21c)](_0x2f34b2(0x1fc)+_0x127b83[_0x2f34b2(0x2a9)]);console['error']('New\x20project\x20name:\x20'+_0x127b83['newProjectName']),console[_0x2f34b2(0x21c)](_0x2f34b2(0x240)+_0x127b83['revision']),console[_0x2f34b2(0x21c)](_0x2f34b2(0x23c)+_0x127b83['fileCount']);_0x127b83[_0x2f34b2(0x383)]&&(console[_0x2f34b2(0x21c)](a51_0x19af4d[_0x2f34b2(0x2f8)]('\x0a⚠\x20Project\x20\x22'+_0x127b83[_0x2f34b2(0x252)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x127b83[_0x2f34b2(0x349)]+')')),console['error'](a51_0x19af4d['yellow'](_0x2f34b2(0x2af))));if(_0x53b5df[_0x2f34b2(0x2ee)])return console[_0x2f34b2(0x21c)](a51_0x19af4d[_0x2f34b2(0x2f8)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x53b5df[_0x2f34b2(0x242)]){if(!isInteractive())return console[_0x2f34b2(0x21c)](a51_0x19af4d[_0x2f34b2(0x26c)](_0x2f34b2(0x293)),_0x2f34b2(0x218)),console[_0x2f34b2(0x21c)](a51_0x19af4d[_0x2f34b2(0x34d)](_0x2f34b2(0x276))),0x1;const _0x486d50=_0x127b83[_0x2f34b2(0x2a9)]||a51_0x4a2e0b[_0x2f34b2(0x298)](_0x21610d),_0x3b815d=_0x127b83[_0x2f34b2(0x383)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x57dd7f+_0x2f34b2(0x24b):_0x2f34b2(0x2b1)+_0x486d50+_0x2f34b2(0x329)+_0x57dd7f+'\x22?',_0xb95bb7=await confirmKey(_0x3b815d);if(!_0xb95bb7)return console[_0x2f34b2(0x21c)](a51_0x19af4d[_0x2f34b2(0x2f8)](_0x2f34b2(0x209))),0x1;}const _0x3bdd92=await withSpinner(_0x127b83[_0x2f34b2(0x383)]?'Updating\x20'+_0x57dd7f+_0x2f34b2(0x367):_0x2f34b2(0x278)+_0x57dd7f+'...',()=>_0x2b8066[_0x2f34b2(0x324)][_0x2f34b2(0x287)](_0x127b83),{'verbose':_0x53b5df[_0x2f34b2(0x380)]}),_0x485bbf=_0x3bdd92[_0x2f34b2(0x2ab)];return console[_0x2f34b2(0x21c)](a51_0x19af4d['green'](_0x127b83[_0x2f34b2(0x383)]?_0x2f34b2(0x227):'✔\x20Clone\x20complete')),console[_0x2f34b2(0x21c)](_0x2f34b2(0x2b9)+_0x485bbf[_0x2f34b2(0x252)]),console[_0x2f34b2(0x21c)](_0x2f34b2(0x2bb)+_0x485bbf[_0x2f34b2(0x333)]),console[_0x2f34b2(0x21c)](_0x2f34b2(0x360)+_0x485bbf[_0x2f34b2(0x239)]),await this[_0x2f34b2(0x310)](_0x2b8066,_0x485bbf['newProjectName'],_0x53b5df['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a51_0x3e4a18(0x268);['description']=a51_0x3e4a18(0x2c1);async[a51_0x3e4a18(0x1e9)](_0x1ce6ad){const _0x208a15=a51_0x3e4a18,{options:_0x4e0993,args:_0x5df004,tdx:_0x10c7c1}=_0x1ce6ad,_0x254d77=_0x5df004[0x0];if(!_0x254d77)return console[_0x208a15(0x21c)](_0x208a15(0x25b)),console[_0x208a15(0x21c)](_0x208a15(0x2e1)),0x1;_0x4e0993[_0x208a15(0x380)]&&console[_0x208a15(0x21c)](_0x208a15(0x314)+_0x254d77);if(!_0x4e0993['yes']){if(!isInteractive())return console[_0x208a15(0x21c)](a51_0x19af4d[_0x208a15(0x26c)](_0x208a15(0x293)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x208a15(0x21c)](a51_0x19af4d[_0x208a15(0x34d)](_0x208a15(0x276))),0x1;const _0x5ee07f=await confirmKey(_0x208a15(0x35b)+_0x254d77+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x5ee07f)return console[_0x208a15(0x21c)](a51_0x19af4d[_0x208a15(0x2f8)](_0x208a15(0x209))),0x1;}const _0x108ab2=await withSpinner('Deleting\x20project\x20'+_0x254d77+_0x208a15(0x367),()=>_0x10c7c1[_0x208a15(0x324)]['delete'](_0x254d77),{'verbose':_0x4e0993['verbose']}),_0x12cc63=_0x108ab2[_0x208a15(0x2ab)];return console['error'](_0x208a15(0x2d7)+_0x12cc63[_0x208a15(0x245)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x12cc63[_0x208a15(0x33b)]),0x0;}}function a51_0x1765(_0x57df53,_0x42412b){_0x57df53=_0x57df53-0x1e7;const _0xf29b03=a51_0xf29b();let _0x1765bb=_0xf29b03[_0x57df53];return _0x1765bb;}export function parseKeyValue(_0x49d43a){const _0x221c66=a51_0x3e4a18,_0x1f8663=_0x49d43a[_0x221c66(0x311)]('=');if(_0x1f8663===-0x1)throw new Error(_0x221c66(0x2ba)+_0x49d43a+_0x221c66(0x34a));const _0x4dcb94=_0x49d43a[_0x221c66(0x29d)](0x0,_0x1f8663),_0x5ad74d=_0x49d43a[_0x221c66(0x29d)](_0x1f8663+0x1);if(!_0x4dcb94)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x4dcb94,'value':_0x5ad74d};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a51_0x3e4a18(0x35a)]=a51_0x3e4a18(0x37e);['description']='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a51_0x3e4a18(0x1e9)](_0x254dc5){const _0x183de9=a51_0x3e4a18,{options:_0xc9c6b3,args:_0x4c1959,tdx:_0x3180e7}=_0x254dc5,_0xfeb4ee=this[_0x183de9(0x2fb)](_0x4c1959,_0xc9c6b3);if(!_0xfeb4ee)return 0x1;_0xc9c6b3['verbose']&&console[_0x183de9(0x21c)](_0x183de9(0x314)+_0xfeb4ee);const _0x56cbcf=await withSpinner(_0x183de9(0x214),()=>_0x3180e7[_0x183de9(0x324)]['listSecrets'](_0xfeb4ee),{'verbose':_0xc9c6b3['verbose']}),{secrets:_0x4f1521}=_0x56cbcf[_0x183de9(0x2ab)];return console['error'](_0x183de9(0x365)+_0x4f1521[_0x183de9(0x202)]+_0x183de9(0x29b)+(_0x4f1521[_0x183de9(0x202)]!==0x1?'s':'')),await handleSDKOutput(_0x4f1521,_0xc9c6b3),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a51_0x3e4a18(0x1e7);['description']=a51_0x3e4a18(0x28c);async[a51_0x3e4a18(0x1e9)](_0x45e5e5){const _0x297a00=a51_0x3e4a18,{options:_0x5f1d4e,args:_0x4d099c,tdx:_0x2bb630}=_0x45e5e5;let _0x54a627,_0x43cf13;if(_0x4d099c['length']>=0x2)_0x54a627=_0x4d099c[0x0],_0x43cf13=_0x4d099c[0x1];else{if(_0x4d099c[_0x297a00(0x202)]===0x1&&_0x5f1d4e[_0x297a00(0x22f)])_0x54a627=_0x5f1d4e[_0x297a00(0x22f)],_0x43cf13=_0x4d099c[0x0];else return _0x4d099c['length']===0x1?(console[_0x297a00(0x21c)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x297a00(0x21c)](_0x297a00(0x20f)),0x1):(console['error'](_0x297a00(0x368)),console[_0x297a00(0x21c)](_0x297a00(0x21b)),0x1);}let _0x2878cd,_0xcf719c;try{({key:_0x2878cd,value:_0xcf719c}=parseKeyValue(_0x43cf13));}catch(_0x1c311c){return _0x1c311c instanceof Error&&console[_0x297a00(0x21c)](a51_0x19af4d[_0x297a00(0x26c)](_0x297a00(0x2cd)),_0x1c311c[_0x297a00(0x2a7)]),0x1;}_0x5f1d4e[_0x297a00(0x380)]&&(console['error'](_0x297a00(0x314)+_0x54a627),console[_0x297a00(0x21c)](_0x297a00(0x381)+_0x2878cd));const _0x18a946=await withSpinner(_0x297a00(0x229),()=>_0x2bb630[_0x297a00(0x324)][_0x297a00(0x2c9)](_0x54a627,_0x2878cd,_0xcf719c),{'verbose':_0x5f1d4e[_0x297a00(0x380)]}),_0x51c461=_0x18a946[_0x297a00(0x2ab)];return console[_0x297a00(0x21c)](_0x297a00(0x31e)+_0x51c461[_0x297a00(0x29c)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x51c461[_0x297a00(0x245)]+'\x27'),(_0x5f1d4e['json']||_0x5f1d4e['jsonl'])&&await handleSingleObjectOutput(_0x51c461,_0x5f1d4e),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a51_0x3e4a18(0x35a)]='workflow:secrets:delete';[a51_0x3e4a18(0x30b)]=a51_0x3e4a18(0x358);async[a51_0x3e4a18(0x1e9)](_0x1af8cd){const _0x416e2d=a51_0x3e4a18,{options:_0xe59c41,args:_0x126992,tdx:_0x3109f9}=_0x1af8cd;let _0x2d71af,_0x2c0647;if(_0x126992[_0x416e2d(0x202)]>=0x2)_0x2d71af=_0x126992[0x0],_0x2c0647=_0x126992[0x1];else{if(_0x126992['length']===0x1&&_0xe59c41['workflowProject'])_0x2d71af=_0xe59c41['workflowProject'],_0x2c0647=_0x126992[0x0];else return _0x126992[_0x416e2d(0x202)]===0x1?(console[_0x416e2d(0x21c)](_0x416e2d(0x283)),console[_0x416e2d(0x21c)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x416e2d(0x21c)]('Error:\x20Secret\x20key\x20is\x20required'),console['error'](_0x416e2d(0x2b7)),0x1);}_0xe59c41[_0x416e2d(0x380)]&&(console[_0x416e2d(0x21c)](_0x416e2d(0x314)+_0x2d71af),console['error'](_0x416e2d(0x381)+_0x2c0647));if(!_0xe59c41[_0x416e2d(0x242)]){if(!isInteractive())return console['error'](a51_0x19af4d[_0x416e2d(0x26c)]('\x0aError:'),_0x416e2d(0x218)),console[_0x416e2d(0x21c)](a51_0x19af4d[_0x416e2d(0x34d)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xc6996=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x2c0647+_0x416e2d(0x2ff)+_0x2d71af+'\x27?');if(!_0xc6996)return console[_0x416e2d(0x21c)](a51_0x19af4d[_0x416e2d(0x2f8)](_0x416e2d(0x209))),0x1;}const _0x5a362e=await withSpinner('Deleting\x20secret...',()=>_0x3109f9[_0x416e2d(0x324)][_0x416e2d(0x262)](_0x2d71af,_0x2c0647),{'verbose':_0xe59c41['verbose']}),_0x1d3689=_0x5a362e['data'];return console[_0x416e2d(0x21c)](_0x416e2d(0x31e)+_0x1d3689[_0x416e2d(0x29c)]+_0x416e2d(0x2aa)+_0x1d3689[_0x416e2d(0x245)]+'\x27'),(_0xe59c41['json']||_0xe59c41['jsonl'])&&await handleSingleObjectOutput(_0x1d3689,_0xe59c41),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(_0x1e15b0){const _0x55b336=a51_0x3e4a18,_0x2059c6=Math['floor'](_0x1e15b0/0x3e8),_0x5c51b6=Math[_0x55b336(0x24d)](_0x2059c6/0x3c),_0x1bc3ef=Math[_0x55b336(0x24d)](_0x5c51b6/0x3c),_0x267c30=Math[_0x55b336(0x24d)](_0x1bc3ef/0x18);if(_0x267c30>0x0){const _0x9cc10d=_0x1bc3ef%0x18;return _0x9cc10d>0x0?_0x267c30+'d\x20'+_0x9cc10d+'h':_0x267c30+'d';}else{if(_0x1bc3ef>0x0){const _0x34bd84=_0x5c51b6%0x3c;return _0x34bd84>0x0?_0x1bc3ef+'h\x20'+_0x34bd84+'m':_0x1bc3ef+'h';}else{if(_0x5c51b6>0x0){const _0x5379c8=_0x2059c6%0x3c;return _0x5379c8>0x0?_0x5c51b6+'m\x20'+_0x5379c8+'s':_0x5c51b6+'m';}else return _0x2059c6+'s';}}}function formatTimestamp(_0xaf6a06,_0x39fce2){const _0x150759=a51_0x3e4a18,_0x100635=new Date(_0xaf6a06),_0x125a56=String(_0x100635['getHours']())[_0x150759(0x266)](0x2,'0'),_0x592ea6=String(_0x100635[_0x150759(0x260)]())[_0x150759(0x266)](0x2,'0'),_0x53215c=_0x125a56+':'+_0x592ea6,_0x272e66=_0x100635[_0x150759(0x36c)]()===_0x39fce2['getFullYear']()&&_0x100635[_0x150759(0x300)]()===_0x39fce2['getMonth']()&&_0x100635['getDate']()===_0x39fce2['getDate']();if(_0x272e66)return _0x53215c;else{const _0x44e225=String(_0x100635[_0x150759(0x300)]()+0x1)['padStart'](0x2,'0'),_0x53ab28=String(_0x100635[_0x150759(0x31a)]())[_0x150759(0x266)](0x2,'0');return _0x44e225+'-'+_0x53ab28+'\x20'+_0x53215c;}}function formatDate(_0xf05fa){const _0x31fe58=a51_0x3e4a18,_0x396023=_0xf05fa[_0x31fe58(0x36c)](),_0x54d454=String(_0xf05fa[_0x31fe58(0x300)]()+0x1)[_0x31fe58(0x266)](0x2,'0'),_0x51a166=String(_0xf05fa[_0x31fe58(0x31a)]())[_0x31fe58(0x266)](0x2,'0');return _0x396023+'-'+_0x54d454+'-'+_0x51a166;}function getTaskStateIcon(_0x5211f6){const _0x4f9565={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x4f9565[_0x5211f6]||'⚪';}function getBarChar(_0x52bf3b){const _0x4eefd7=a51_0x3e4a18;return _0x52bf3b===_0x4eefd7(0x21c)||_0x52bf3b===_0x4eefd7(0x25e)?'×':'─';}function getBarColor(_0x4b92c8){const _0x2a6952=a51_0x3e4a18,_0x4a10c2={'success':a51_0x19af4d[_0x2a6952(0x308)],'error':a51_0x19af4d[_0x2a6952(0x26c)],'group_error':a51_0x19af4d[_0x2a6952(0x26c)],'running':a51_0x19af4d['blue'],'blocked':a51_0x19af4d[_0x2a6952(0x2f8)],'planned':a51_0x19af4d['dim'],'canceling':a51_0x19af4d[_0x2a6952(0x2f8)]};return _0x4a10c2[_0x4b92c8]||a51_0x19af4d['white'];}function parseTaskName(_0x4a8770){const _0x1d3810=a51_0x3e4a18;let _0x3d136e=_0x4a8770['replace'](/^\++/,'');const _0x5bacab=_0x3d136e[_0x1d3810(0x387)]('+'),_0x3e01a6=_0x5bacab['length']>0x1?_0x5bacab[_0x1d3810(0x202)]-0x2:0x0,_0x2b651c=_0x5bacab[_0x5bacab[_0x1d3810(0x202)]-0x1]||_0x3d136e;return{'level':_0x3e01a6,'name':'+'+_0x2b651c};}function truncateTaskName(_0x18e63a,_0x20cc0c){const _0x4ee86a=a51_0x3e4a18,_0x3a2be9=stringWidth(_0x18e63a);if(_0x3a2be9<=_0x20cc0c)return _0x18e63a;let _0x531aad=_0x18e63a;while(stringWidth(_0x531aad+'…')>_0x20cc0c&&_0x531aad[_0x4ee86a(0x202)]>0x0){_0x531aad=_0x531aad[_0x4ee86a(0x26b)](0x0,-0x1);}return _0x531aad+'…';}function calculateTimeScale(_0x14ec40,_0x33d985){const _0x2cbca7=a51_0x3e4a18;return{'startTime':_0x14ec40['start'],'endTime':_0x14ec40[_0x2cbca7(0x2d2)],'durationMs':_0x14ec40[_0x2cbca7(0x328)],'msPerChar':_0x14ec40[_0x2cbca7(0x328)]/_0x33d985};}function timeToPosition(_0x19431f,_0x3f0796,_0xc5fba8){const _0x122f8c=a51_0x3e4a18,_0x12dce8=_0x19431f-_0x3f0796[_0x122f8c(0x30f)],_0x53cd2a=Math[_0x122f8c(0x24d)](_0x12dce8/_0x3f0796['msPerChar']);return Math[_0x122f8c(0x201)](0x0,Math[_0x122f8c(0x23a)](_0x53cd2a,_0xc5fba8));}function renderTimeAxis(_0x589cdd,_0x2466cc){const _0x52533f=a51_0x3e4a18,_0x5a3bc8=Math[_0x52533f(0x23a)](TIMELINE_CONFIG[_0x52533f(0x2f0)],Math['max'](TIMELINE_CONFIG[_0x52533f(0x317)],Math[_0x52533f(0x24d)](_0x2466cc/TIMELINE_CONFIG[_0x52533f(0x2ce)]))),_0x5d6666=_0x589cdd[_0x52533f(0x326)]/(_0x5a3bc8-0x1),_0x1ab1da=new Date(_0x589cdd[_0x52533f(0x30f)]),_0x9a66ca=[];for(let _0x57bc5c=0x0;_0x57bc5c<_0x5a3bc8;_0x57bc5c++){const _0x395ae6=_0x589cdd[_0x52533f(0x30f)]+_0x57bc5c*_0x5d6666,_0x1568bc=timeToPosition(_0x395ae6,_0x589cdd,_0x2466cc),_0x392676=formatTimestamp(_0x395ae6,_0x1ab1da);_0x9a66ca[_0x52533f(0x331)]({'pos':_0x1568bc,'text':_0x392676});}const _0x1f5377=new Array(_0x2466cc)[_0x52533f(0x2a5)]('\x20');let _0x4843ae=-0x1;for(const {pos:_0x52e6a1,text:_0x129343}of _0x9a66ca){let _0x5b6ae1=Math[_0x52533f(0x201)](0x0,_0x52e6a1-Math[_0x52533f(0x24d)](_0x129343['length']/0x2));_0x5b6ae1<=_0x4843ae+TIMELINE_CONFIG[_0x52533f(0x34e)]&&(_0x5b6ae1=_0x4843ae+TIMELINE_CONFIG[_0x52533f(0x34e)]+0x1);_0x5b6ae1+_0x129343[_0x52533f(0x202)]>_0x2466cc&&(_0x5b6ae1=_0x2466cc-_0x129343[_0x52533f(0x202)]);if(_0x5b6ae1>=0x0&&_0x5b6ae1+_0x129343[_0x52533f(0x202)]<=_0x2466cc&&_0x5b6ae1>_0x4843ae){for(let _0x53ee87=0x0;_0x53ee87<_0x129343[_0x52533f(0x202)];_0x53ee87++){_0x1f5377[_0x5b6ae1+_0x53ee87]=_0x129343[_0x53ee87];}_0x4843ae=_0x5b6ae1+_0x129343['length']-0x1;}}return _0x1f5377[_0x52533f(0x210)]('');}function a51_0xf29b(){const _0x478e21=['min','changes','Files\x20to\x20upload:\x20','---\x20','match','columns','Revision:\x20','cyan','yes','fs/promises','list','projectName','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x1b[1A\x1b[2K','renderTimeline','Expected\x20format:\x20--param\x20key=value','No\x20sessions\x20with\x20timing\x20information','\x22\x20with\x20new\x20revision?','Dry\x20run:\x20yes','floor','every','workflow:logs','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Pushing\x20project...','newProjectName','applyPullProject','Warning:','repeat','startsWith','kill','\x20(system)','Source:\x20','No\x20workflows\x20found','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','List\x20all\x20workflow\x20projects','\x20\x20New\x20attempt\x20ID:\x20','group_error','fromTask','getMinutes','write','deleteSecret','\x20-\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Failed\x20to\x20fetch\x20attempt\x20data','padStart','Killing\x20attempt...','workflow:delete','attemptId','\x27...','slice','red','Usage:\x20tdx\x20wf\x20use\x20<project>','done','filter','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','-\x20nothing\x20pushed','ICON_SPACING','resolveProjectDir','ICON_WIDTH','session:','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','workflows','Cloning\x20to\x20','Retrying\x20attempt...','title','relative','\x20modified','task','POLL_INTERVAL_MS','Attempt\x20ID:\x20','prepareCloneProject','\x20\x20tdx\x20wf\x20use\x20<project>','tdx\x20wf\x20attempt\x20','Error:\x20Project\x20name\x20is\x20required','→\x20New\x20project:\x20','\x20session','Select\x20a\x20task\x20to\x20view\x20logs:','executeCloneProject','cwd','GUTTER','session','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','json','workflow:pull','fullName','table','workflow:push','No\x20workflows\x20found\x20in\x20project:\x20','\x0aError:','Source\x20directory\x20is\x20required','6927zUHzhk','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','MIN_TIMELINE_WIDTH','basename','\x20\x20Console:\x20','\x20unchanged','\x20secret','key','substring','Error:\x20Invalid\x20parameter\x20format:\x20','index','renderSessionsTimeline','Pull\x20workflow\x20project\x20to\x20local\x20folder','attempts','\x0aDry\x20run\x20-\x20no\x20files\x20written','sessions','fill','From\x20task:\x20','message','pullProject','sourceProjectName','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','data','get','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','List\x20workflow\x20execution\x20sessions','\x0aClone\x20\x22','📋\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','download','resolveProjectId','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','status','\x20\x20Project:\x20','Invalid\x20format:\x20','\x20\x20Project\x20ID:\x20','planned','\x20workflow','unchanged','hasChanges','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Loading\x20session...','find','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','toISOString','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20project','clear','setSecret','Project\x20name:\x20','output','trim','Error:','LABEL_WIDTH_DIVISOR','from','resolve','✔\x20Downloaded\x20','end','parseProjectWorkflowPattern','\x0aPush\x20these\x20changes?','\x20is\x20not\x20a\x20directory','renderSingleTimeline','✔\x20Deleted\x20project\x20','executePushProject','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','/app/workflows/','\x20\x20Session\x20context\x20set\x20to:\x20','5rSfCQd','workflow:projects','diff','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','12768210XTUwJp','Usage:\x20workflow:delete\x20<project-name-or-id>','readFile','\x0a✔\x20No\x20changes\x20to\x20push','No\x20sessions\x20found','✔\x20Push\x20complete','Show\x20tasks\x20for\x20an\x20attempt','(use\x20--limit\x20to\x20see\x20more)','Starting\x20workflow\x20run...','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','window','workflow:kill','Pattern:\x20','includes','dryRun','Latest\x20session\x20has\x20no\x20attempt','MAX_LABEL_COUNT','isArray','navigateSessionsInteractive','✔\x20Workflow\x20project\x20set\x20to:\x20','pending','MAX_TASKS_DISPLAY','workflow:tasks','📁\x20','yellow','workflow:retry','summary','requireProject','all','(unknown)','taskName','\x27\x20from\x20project\x20\x27','getMonth','No\x20workflow\x20sessions\x20found','now','parse','workflow:timeline','Analyzing\x20project...','Project\x20name\x20is\x20required','\x20\x20Source:\x20','green','rows','workflow:run','description','displayLine','Session\x20not\x20found:\x20','unknown','startTime','showWorkflowConsoleUrl','indexOf','isTTY','project','Project:\x20','\x20has\x20no\x20attempts','sort','MIN_LABEL_COUNT','value','Downloading\x20project\x20','getDate','resolveProject','stdout','text','✔\x20Secret\x20\x27','\x20(use\x20--limit\x20to\x20show\x20more)','Project\x20filter:\x20','params','preparePushProject','workflow:download','workflow','3740376YqRJWn','durationMs','updatedAt','duration','\x22\x20to\x20new\x20project\x20\x22','generateSessionTimelineRows','createdAt','limit','finishedAt','Force:\x20yes','Fetching\x20log\x20files...','\x20from\x20session\x20','push','Filter:\x20','newProjectId','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','isDirectory','site','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','modified','Error:\x20','201240BfFKmv','projectId','select','\x20deleted','✔\x20Showing\x20','skipValidation','cancelRequested','retryAttemptName','running','workflowName','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Loading\x20sessions...','No\x20sessions\x20found\x20in\x20project:\x20','reason','isNewProject','existingProjectId','.\x20Expected\x20format:\x20KEY=VALUE','workflow:workflows','sourceDir','dim','LABEL_MIN_SPACING','\x0a✔\x20Already\x20up\x20to\x20date','some','Target\x20directory:\x20','lastAttempt','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','\x0a✔\x20Attempt\x20complete','sessionId','jsonl','attempt:','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','name','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','new','/sessions/','set','Listing\x20workflow\x20sessions...','\x20\x20Revision:\x20','blue','workflow:attempts','✔\x20Pull\x20complete','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','✔\x20Found\x20','fileSize','...','Error:\x20KEY=VALUE\x20is\x20required','Analyzing\x20changes...','retryAttempt','\x20\x20Target:\x20','getFullYear','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','No\x20attempts\x20found\x20in\x20project:\x20','state','logs','localeCompare','utf-8','Validation:\x20skipped','Listing\x20workflow\x20attempts...','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','204954IZeTFm','No\x20sessions\x20found\x20for:\x20','900eaoyPg','List\x20workflow\x20attempts','targetDir','✔\x20Retry\x20started','✔\x20Project:\x20','\x20logs','workflow:secrets:list','metadata','verbose','Key:\x20','logFiles','targetExists','✔\x20Pushed\x20','TASK_NAME_WIDTH','Using\x20attempt\x20','split','workflow:secrets:set','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','execute','Session\x20','-\x20no\x20files\x20written','1951747FFjcbZ','Error:\x20Attempt\x20ID\x20is\x20required','start','No\x20workflow\x20tdx.json\x20found','autocomplete','Listing\x20workflows...','toLowerCase','\x20\x20Workflow:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','No\x20matching\x20sessions\x20found','success','log','follow','Listing\x20workflow\x20projects...','values','has','Source\x20project:\x20','Start\x20a\x20workflow\x20run','map','Writing\x20files...','stat','max','length','No\x20projects\x20match\x20pattern:\x20','Getting\x20attempt\x20details...','force','\x20\x20Location:\x20','workflow:sessions','run','Cancelled','No\x20log\x20content\x20found','\x20to\x20see\x20detailed\x20logs','Select\x20a\x20workflow\x20to\x20run','buildTimelineData','tasks','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','join','Resume\x20from:\x20','Downloading\x20logs...','\x20of\x20','Listing\x20secrets...','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Getting\x20attempt\x20tasks...','\x20sessions\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Pulling\x20project\x20','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','error','format','Total:\x20','⚠\x20Showing\x20first\x20','includeRetried','Filter:\x20project=','\x0aPolling...\x20(','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Session\x20time:\x20','type','getTime','✔\x20Project\x20updated','Output\x20directory:\x20','Setting\x20secret...','session_id','Auto-selected\x20latest\x20session:\x20','\x20\x20Session\x20ID:\x20','Resolving\x20project\x20\x27','path','workflowProject','142386CDjZnY','attempt','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','startedAt','Source\x20directory:\x20','deleted','MAX_POLL_ITERATIONS','sessionTime','pollTimeline','revision'];a51_0xf29b=function(){return _0x478e21;};return a51_0xf29b();}function renderTaskRow(_0x17654a,_0x3eca05,_0xe1ff8b,_0x3eb17f){const _0xecc7ac=a51_0x3e4a18,{level:_0x1c73c4,name:_0x50ccad}=parseTaskName(_0x17654a[_0xecc7ac(0x35a)]),_0x56468d='\x20'[_0xecc7ac(0x255)](_0x1c73c4),_0x36b111=_0x17654a['window']?'('+formatElapsed(_0x17654a[_0xecc7ac(0x2ea)][_0xecc7ac(0x328)])+')':'',_0x20126c=stringWidth(_0x36b111),_0x500ae3=_0x1c73c4*0x1,_0xda977d=_0x3eb17f-_0x500ae3-_0x20126c-0x1,_0x1a7803=truncateTaskName(_0x50ccad,_0xda977d),_0x189cd9=_0x56468d+_0x1a7803,_0x1e8ea4=stringWidth(_0x189cd9),_0x4fa542=_0x3eb17f-_0x1e8ea4-_0x20126c,_0x1722a4=_0x189cd9+'\x20'['repeat'](Math[_0xecc7ac(0x201)](0x1,_0x4fa542))+a51_0x19af4d['dim'](_0x36b111),_0x13da08=getTaskStateIcon(_0x17654a[_0xecc7ac(0x36f)]),_0x46b563=new Array(_0xe1ff8b)[_0xecc7ac(0x2a5)]('\x20');if(_0x17654a[_0xecc7ac(0x2ea)]){const _0x11b318=timeToPosition(_0x17654a[_0xecc7ac(0x2ea)][_0xecc7ac(0x1ee)],_0x3eca05,_0xe1ff8b),_0x31efbf=timeToPosition(_0x17654a[_0xecc7ac(0x2ea)][_0xecc7ac(0x2d2)],_0x3eca05,_0xe1ff8b),_0x52d415=getBarChar(_0x17654a['state']),_0x17075c=Math[_0xecc7ac(0x201)](_0x11b318+0x1,_0x31efbf);for(let _0x3175c0=_0x11b318;_0x3175c0<Math[_0xecc7ac(0x23a)](_0x17075c,_0xe1ff8b);_0x3175c0++){_0x46b563[_0x3175c0]=_0x52d415;}}const _0x41a889=getBarColor(_0x17654a[_0xecc7ac(0x36f)]),_0x3bd8a1=_0x46b563[_0xecc7ac(0x1fe)](_0x5c2f61=>_0x5c2f61==='\x20'?'\x20':_0x41a889(_0x5c2f61))[_0xecc7ac(0x210)]('');return _0x13da08+'\x20'+_0x1722a4+'│'+_0x3bd8a1+'│';}function calculateStats(_0x5045dd){const _0x198fea=a51_0x3e4a18,_0x4eb469={'total':_0x5045dd[_0x198fea(0x202)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x2fc4e7 of _0x5045dd){if(_0x2fc4e7['state']===_0x198fea(0x1f6))_0x4eb469[_0x198fea(0x1f6)]++;else{if(_0x2fc4e7['state']==='error'||_0x2fc4e7[_0x198fea(0x36f)]===_0x198fea(0x25e))_0x4eb469[_0x198fea(0x21c)]++;else _0x2fc4e7[_0x198fea(0x36f)]==='running'?_0x4eb469[_0x198fea(0x342)]++:_0x4eb469[_0x198fea(0x2f4)]++;}}return _0x4eb469;}function formatStats(_0x93f511){const _0x16e2aa=a51_0x3e4a18;return[_0x16e2aa(0x21e)+_0x93f511['total'],'✅\x20'+_0x93f511['success'],'❌\x20'+_0x93f511[_0x16e2aa(0x21c)],'🔄\x20'+_0x93f511[_0x16e2aa(0x342)],'⏳\x20'+_0x93f511[_0x16e2aa(0x2f4)]][_0x16e2aa(0x210)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a51_0x3e4a18(0x304);[a51_0x3e4a18(0x30b)]=a51_0x3e4a18(0x21a);async['execute'](_0x120eef){const _0x27dbdf=a51_0x3e4a18,{options:_0x58962b,args:_0x540542,tdx:_0x187692}=_0x120eef;let _0x3b0ab8,_0x58719c,_0x9cfd68=![];if(_0x540542[0x0]){if(_0x540542[0x0][_0x27dbdf(0x2ed)]('.')){const _0x28bd8f=this[_0x27dbdf(0x2d3)](_0x540542,_0x58962b);if(!_0x28bd8f)return 0x1;_0x3b0ab8=_0x28bd8f[_0x27dbdf(0x245)],_0x58719c=_0x28bd8f[_0x27dbdf(0x343)];}else{_0x58719c=_0x540542[0x0],_0x3b0ab8=_0x58962b[_0x27dbdf(0x22f)];if(!_0x3b0ab8)return console[_0x27dbdf(0x21c)](a51_0x19af4d[_0x27dbdf(0x26c)](_0x27dbdf(0x2cd)),_0x27dbdf(0x28b)),0x1;_0x9cfd68=!![];}}else{const _0x2d2af1=this[_0x27dbdf(0x2d3)](_0x540542,_0x58962b);if(!_0x2d2af1)return 0x1;_0x3b0ab8=_0x2d2af1[_0x27dbdf(0x245)],_0x58719c=_0x2d2af1[_0x27dbdf(0x343)];}if(_0x58962b['verbose']){if(_0x3b0ab8&&_0x58719c)console[_0x27dbdf(0x21c)](_0x27dbdf(0x332)+_0x3b0ab8+'.'+_0x58719c);else _0x3b0ab8&&console['error'](_0x27dbdf(0x221)+_0x3b0ab8);}const _0x125670=_0x58962b[_0x27dbdf(0x269)],_0x585d00=_0x58962b['sessionId'];if(_0x125670){_0x585d00&&console[_0x27dbdf(0x21c)](a51_0x19af4d[_0x27dbdf(0x2f8)](_0x27dbdf(0x254)),_0x27dbdf(0x296));const _0x24950d=_0x58962b['follow'];return _0x24950d?await this[_0x27dbdf(0x238)](_0x120eef,_0x125670):await this[_0x27dbdf(0x2d6)](_0x120eef,_0x125670,_0x58962b),0x0;}if(_0x585d00){const _0x5e5d12=await withSpinner(_0x27dbdf(0x2c2),()=>_0x187692[_0x27dbdf(0x324)][_0x27dbdf(0x2a4)]({'projectName':_0x3b0ab8,'workflowName':_0x58719c,'limit':0x64}),{'verbose':_0x58962b[_0x27dbdf(0x380)]}),_0x43c9d2=_0x5e5d12[_0x27dbdf(0x2ab)]['find'](_0x3f1a00=>_0x3f1a00['id']===_0x585d00);if(!_0x43c9d2)return console[_0x27dbdf(0x21c)](a51_0x19af4d['red'](_0x27dbdf(0x2cd)),_0x27dbdf(0x30d)+_0x585d00),0x1;if(!_0x43c9d2['lastAttempt']?.['id'])return console[_0x27dbdf(0x21c)](a51_0x19af4d[_0x27dbdf(0x26c)]('Error:'),_0x27dbdf(0x1ea)+_0x585d00+_0x27dbdf(0x315)),0x1;const _0x10a76a=_0x43c9d2[_0x27dbdf(0x352)]['id'];_0x58962b[_0x27dbdf(0x380)]&&console['error'](_0x27dbdf(0x386)+_0x10a76a+_0x27dbdf(0x330)+_0x585d00);const _0xf5e045=_0x58962b[_0x27dbdf(0x1f8)];return _0xf5e045?await this[_0x27dbdf(0x238)](_0x120eef,_0x10a76a):await this['renderSingleTimeline'](_0x120eef,_0x10a76a,_0x58962b),0x0;}const _0x55f7f9=await withSpinner(_0x27dbdf(0x345),()=>_0x187692[_0x27dbdf(0x324)]['sessions']({'projectName':_0x3b0ab8,'workflowName':_0x58719c,'limit':_0x58962b[_0x27dbdf(0x32c)]||0x32}),{'verbose':_0x58962b[_0x27dbdf(0x380)]}),_0x18cdbd=_0x55f7f9[_0x27dbdf(0x2ab)];if(_0x18cdbd[_0x27dbdf(0x202)]===0x0){if(_0x3b0ab8&&_0x58719c)console[_0x27dbdf(0x21c)](_0x27dbdf(0x377)+_0x3b0ab8+'.'+_0x58719c);else _0x3b0ab8?console[_0x27dbdf(0x21c)](_0x27dbdf(0x346)+_0x3b0ab8):(console[_0x27dbdf(0x21c)](_0x27dbdf(0x301)),console[_0x27dbdf(0x21c)](a51_0x19af4d[_0x27dbdf(0x34d)](_0x27dbdf(0x375))));return 0x0;}_0x18cdbd[_0x27dbdf(0x316)]((_0x28a675,_0x59fc4d)=>{const _0x1282e8=_0x27dbdf,_0x3360f4=_0x28a675[_0x1282e8(0x237)]||'',_0x2b3412=_0x59fc4d['sessionTime']||'';return _0x2b3412[_0x1282e8(0x371)](_0x3360f4);});if(_0x58962b[_0x27dbdf(0x28d)]||_0x58962b[_0x27dbdf(0x356)])return await handleSDKOutput(_0x18cdbd,_0x58962b),0x0;let _0x1f43b7;if(_0x9cfd68){const _0x3811df=_0x18cdbd[0x0];if(!_0x3811df[_0x27dbdf(0x352)]?.['id'])return console[_0x27dbdf(0x21c)](_0x27dbdf(0x2ef)),0x0;_0x1f43b7=_0x3811df[_0x27dbdf(0x352)]['id'],_0x58962b[_0x27dbdf(0x380)]&&console[_0x27dbdf(0x21c)](_0x27dbdf(0x22b)+_0x3811df[_0x27dbdf(0x237)]);}else{const _0x56de2f=_0x18cdbd[_0x27dbdf(0x1fe)](_0x23a0a6=>{const _0x242928=_0x27dbdf,_0x409fab=getAttemptStatusDisplay(_0x23a0a6[_0x242928(0x352)]);return{'title':_0x23a0a6[_0x242928(0x313)]?.[_0x242928(0x35a)]+'.'+_0x23a0a6[_0x242928(0x324)]?.[_0x242928(0x35a)]+_0x242928(0x263)+_0x23a0a6[_0x242928(0x237)]+'\x20'+_0x409fab['icon'],'value':_0x23a0a6[_0x242928(0x352)]?.['id']||'','description':_0x409fab[_0x242928(0x31d)]};}),_0x3de268=await a51_0x4a0a66({'type':'select','name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x56de2f[_0x27dbdf(0x26f)](_0x2f2d6b=>_0x2f2d6b[_0x27dbdf(0x318)]!=='')});if(!_0x3de268[_0x27dbdf(0x269)])return 0x0;_0x1f43b7=_0x3de268[_0x27dbdf(0x269)];}const _0x5f4e1a=_0x58962b[_0x27dbdf(0x1f8)];return _0x5f4e1a?await this[_0x27dbdf(0x238)](_0x120eef,_0x1f43b7):await this[_0x27dbdf(0x2d6)](_0x120eef,_0x1f43b7,_0x58962b),0x0;}async['renderSingleTimeline'](_0x2e76a2,_0x55013e,_0x1bd58f){const _0x35afa1=a51_0x3e4a18,{tdx:_0x3fa380}=_0x2e76a2;let _0x3705de,_0x384c7e;try{[_0x3705de,_0x384c7e]=await Promise[_0x35afa1(0x2fc)]([_0x3fa380[_0x35afa1(0x324)][_0x35afa1(0x231)](_0x55013e),_0x3fa380[_0x35afa1(0x324)][_0x35afa1(0x20e)](_0x55013e,![])]);}catch(_0x1d9732){console['error'](a51_0x19af4d[_0x35afa1(0x26c)](_0x35afa1(0x265)));_0x1bd58f[_0x35afa1(0x380)]&&console[_0x35afa1(0x21c)](_0x1d9732);throw _0x1d9732;}if(_0x1bd58f['json']||_0x1bd58f['jsonl']){const _0x41fa9f=this[_0x35afa1(0x20d)](_0x3705de,_0x384c7e);await handleSDKOutput([_0x41fa9f],_0x1bd58f);return;}const _0x2f0827=_0x3fa380['context']['site'],_0x25e57d=this[_0x35afa1(0x248)](_0x3705de,_0x384c7e,_0x2f0827);console[_0x35afa1(0x1f7)](_0x25e57d);}async[a51_0x3e4a18(0x238)](_0x4e3b8e,_0x3a2375){const _0x433807=a51_0x3e4a18,{tdx:_0x8b88d8}=_0x4e3b8e,_0x1a3110=TIMELINE_CONFIG[_0x433807(0x27e)],_0x2413cf=TIMELINE_CONFIG[_0x433807(0x236)];let _0x17a946=0x0;while(_0x17a946<_0x2413cf){process[_0x433807(0x31c)][_0x433807(0x312)]&&process[_0x433807(0x31c)][_0x433807(0x261)]('\x1bc');let _0x4f737e,_0x3e0e2f;try{[_0x4f737e,_0x3e0e2f]=await Promise['all']([_0x8b88d8['workflow'][_0x433807(0x231)](_0x3a2375),_0x8b88d8['workflow']['tasks'](_0x3a2375,![])]);}catch(_0x4a31d0){console[_0x433807(0x21c)](a51_0x19af4d[_0x433807(0x26c)](_0x433807(0x2c0)));_0x17a946>0x0&&console[_0x433807(0x21c)](a51_0x19af4d['dim'](_0x433807(0x2e9)+_0x17a946));throw _0x4a31d0;}const _0x37cc29=_0x8b88d8['context']['site'],_0x1104b7=this[_0x433807(0x248)](_0x4f737e,_0x3e0e2f,_0x37cc29);console['log'](_0x1104b7);const _0x377c6a=_0x4f737e[_0x433807(0x26e)]&&_0x3e0e2f[_0x433807(0x24e)](_0x1f0e78=>_0x1f0e78[_0x433807(0x36f)]!==_0x433807(0x342)&&_0x1f0e78['state']!=='planned');if(_0x377c6a){console[_0x433807(0x21c)](a51_0x19af4d['green'](_0x433807(0x354)));break;}console[_0x433807(0x21c)](a51_0x19af4d[_0x433807(0x34d)](_0x433807(0x222)+_0x17a946*0x2+_0x433807(0x215))),await new Promise(_0x2daaa5=>setTimeout(_0x2daaa5,_0x1a3110)),_0x17a946++;}_0x17a946>=_0x2413cf&&console[_0x433807(0x21c)](a51_0x19af4d['yellow'](_0x433807(0x2c4)));}[a51_0x3e4a18(0x248)](_0x26ddcc,_0x5e927d,_0x225538){const _0x13bdb6=a51_0x3e4a18,_0x164212=[],_0x5e754f=TIMELINE_CONFIG[_0x13bdb6(0x385)],_0x5a2fd3=0x5,_0x2e98e6=process[_0x13bdb6(0x31c)][_0x13bdb6(0x23f)]||0x78,_0x5837cb=_0x2e98e6-_0x5e754f-_0x5a2fd3,_0x153955=Math[_0x13bdb6(0x201)](TIMELINE_CONFIG[_0x13bdb6(0x297)],Math[_0x13bdb6(0x23a)](_0x5837cb,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x22f526=new Date(_0x26ddcc[_0x13bdb6(0x32b)])['getTime'](),_0x411776=_0x26ddcc[_0x13bdb6(0x32d)]?new Date(_0x26ddcc[_0x13bdb6(0x32d)])['getTime']():Date[_0x13bdb6(0x302)](),_0xe163d4={'start':_0x22f526,'end':_0x411776,'duration':_0x411776-_0x22f526},_0x540fdd=new Map(),_0x3459d9=[];for(const _0x39739d of _0x5e927d){if(_0x39739d[_0x13bdb6(0x233)]){const _0x2975ca=new Date(_0x39739d['startedAt'])['getTime'](),_0x18e701=_0x39739d[_0x13bdb6(0x327)]?new Date(_0x39739d[_0x13bdb6(0x327)])[_0x13bdb6(0x226)]():Date[_0x13bdb6(0x302)](),_0x5aa80f={'start':_0x2975ca,'end':_0x18e701,'duration':_0x18e701-_0x2975ca};_0x540fdd[_0x13bdb6(0x35e)](_0x39739d['id'],_0x5aa80f),_0x3459d9['push']({'name':_0x39739d[_0x13bdb6(0x28f)],'state':_0x39739d['state']||_0x13bdb6(0x30e),'window':_0x5aa80f});}else _0x3459d9[_0x13bdb6(0x331)]({'name':_0x39739d[_0x13bdb6(0x28f)],'state':_0x39739d[_0x13bdb6(0x36f)]||_0x13bdb6(0x2bc),'window':undefined});}_0x3459d9[_0x13bdb6(0x316)]((_0x3a67d7,_0x32a953)=>{const _0x5a5b9c=_0x13bdb6;if(!_0x3a67d7[_0x5a5b9c(0x2ea)])return 0x1;if(!_0x32a953[_0x5a5b9c(0x2ea)])return-0x1;return _0x3a67d7[_0x5a5b9c(0x2ea)]['start']-_0x32a953[_0x5a5b9c(0x2ea)][_0x5a5b9c(0x1ee)];});const _0x2ffcac=_0x3459d9[_0x13bdb6(0x202)],_0x2e7545=_0x2ffcac>TIMELINE_CONFIG[_0x13bdb6(0x2f5)];_0x2e7545&&_0x3459d9['splice'](TIMELINE_CONFIG[_0x13bdb6(0x2f5)]);const _0x30f107=calculateTimeScale(_0xe163d4,_0x153955),_0x32596a=_0x26ddcc[_0x13bdb6(0x26e)]?_0x26ddcc[_0x13bdb6(0x1f6)]?a51_0x19af4d[_0x13bdb6(0x308)](_0x13bdb6(0x1f6)):a51_0x19af4d[_0x13bdb6(0x26c)](_0x13bdb6(0x21c)):a51_0x19af4d[_0x13bdb6(0x361)](_0x13bdb6(0x342)),_0x46bff7=_0x26ddcc[_0x13bdb6(0x313)]?.['id'],_0x2e8ee9=_0x26ddcc['sessionId'];let _0x212598;if(_0x46bff7&&_0x2e8ee9){const _0x76e8ef=getWorkflowAttemptUrl(_0x225538,_0x46bff7,_0x2e8ee9,_0x26ddcc['id']);_0x212598=hyperlink(a51_0x19af4d[_0x13bdb6(0x34d)](_0x26ddcc['id']),_0x76e8ef);}else _0x212598=a51_0x19af4d[_0x13bdb6(0x34d)](_0x26ddcc['id']);_0x164212[_0x13bdb6(0x331)]('Attempt:\x20'+_0x212598+'\x20-\x20'+_0x32596a+_0x13bdb6(0x263)+formatElapsed(_0xe163d4[_0x13bdb6(0x328)]));if(_0x3459d9[_0x13bdb6(0x202)]>0x0){const _0x36e936=renderTimeAxis(_0x30f107,_0x153955),_0x49fdcc=new Date(_0xe163d4[_0x13bdb6(0x1ee)]),_0x26b869=formatDate(_0x49fdcc),_0x3f1c21=TIMELINE_CONFIG[_0x13bdb6(0x274)]+TIMELINE_CONFIG[_0x13bdb6(0x272)]+_0x5e754f,_0x53002c=_0x26b869['padStart'](_0x3f1c21),_0x4d3048=a51_0x19af4d[_0x13bdb6(0x34d)](_0x53002c);_0x164212[_0x13bdb6(0x331)](_0x4d3048+'\x20'+_0x36e936);for(const _0x35a66e of _0x3459d9){_0x164212[_0x13bdb6(0x331)](renderTaskRow(_0x35a66e,_0x30f107,_0x153955,_0x5e754f));}const _0x13538d=calculateStats(_0x3459d9);_0x164212['push'](formatStats(_0x13538d)),_0x2e7545&&_0x164212[_0x13bdb6(0x331)](a51_0x19af4d[_0x13bdb6(0x2f8)](_0x13bdb6(0x21f)+TIMELINE_CONFIG[_0x13bdb6(0x2f5)]+_0x13bdb6(0x213)+_0x2ffcac+'\x20tasks')),_0x164212[_0x13bdb6(0x331)](''),_0x164212[_0x13bdb6(0x331)](a51_0x19af4d['dim']('💡\x20Tip:\x20Use\x20')+(_0x13bdb6(0x282)+_0x26ddcc['id']+_0x13bdb6(0x37d))+a51_0x19af4d['dim'](_0x13bdb6(0x20b)));}else _0x164212[_0x13bdb6(0x331)](_0x13bdb6(0x250));return _0x164212[_0x13bdb6(0x210)]('\x0a');}[a51_0x3e4a18(0x20d)](_0x598291,_0x3478b3){const _0xc5ebad=a51_0x3e4a18,_0x28a38e=new Date(_0x598291[_0xc5ebad(0x32b)])[_0xc5ebad(0x226)](),_0x15ae97=_0x598291[_0xc5ebad(0x32d)]?new Date(_0x598291[_0xc5ebad(0x32d)])[_0xc5ebad(0x226)]():Date[_0xc5ebad(0x302)](),_0x16e133=_0x15ae97-_0x28a38e,_0x56a88f=[];for(const _0x5f557b of _0x3478b3){if(_0x5f557b[_0xc5ebad(0x233)]){const _0x1816b2=new Date(_0x5f557b[_0xc5ebad(0x233)])[_0xc5ebad(0x226)](),_0x15a0a1=_0x5f557b[_0xc5ebad(0x327)]?new Date(_0x5f557b[_0xc5ebad(0x327)])[_0xc5ebad(0x226)]():Date[_0xc5ebad(0x302)]();_0x56a88f[_0xc5ebad(0x331)]({'name':_0x5f557b[_0xc5ebad(0x28f)],'state':_0x5f557b['state']||_0xc5ebad(0x30e),'window':{'start':_0x1816b2,'end':_0x15a0a1,'duration':_0x15a0a1-_0x1816b2}});}else _0x56a88f[_0xc5ebad(0x331)]({'name':_0x5f557b[_0xc5ebad(0x28f)],'state':_0x5f557b[_0xc5ebad(0x36f)]||'planned','window':undefined});}const _0x4f522f=calculateStats(_0x56a88f);return{'attempt':{'id':_0x598291['id'],'status':_0x598291['done']?_0x598291['success']?_0xc5ebad(0x1f6):_0xc5ebad(0x21c):'running','createdAt':_0x598291[_0xc5ebad(0x32b)],'finishedAt':_0x598291[_0xc5ebad(0x32d)],'duration_ms':_0x16e133},'tasks':_0x56a88f[_0xc5ebad(0x1fe)](_0x2ec325=>({'name':_0x2ec325[_0xc5ebad(0x35a)],'state':_0x2ec325[_0xc5ebad(0x36f)],'startedAt':_0x2ec325[_0xc5ebad(0x2ea)]?new Date(_0x2ec325[_0xc5ebad(0x2ea)]['start'])[_0xc5ebad(0x2c5)]():null,'updatedAt':_0x2ec325[_0xc5ebad(0x2ea)]?new Date(_0x2ec325[_0xc5ebad(0x2ea)][_0xc5ebad(0x2d2)])['toISOString']():null,'duration_ms':_0x2ec325['window']?.['duration']||null})),'stats':_0x4f522f};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fde18,_0x4f64d3){const _0x448f64=a52_0x34e7,_0x5cceae=_0x2fde18();while(!![]){try{const _0x2bb5eb=-parseInt(_0x448f64(0x162))/0x1+parseInt(_0x448f64(0x15e))/0x2+parseInt(_0x448f64(0x161))/0x3*(-parseInt(_0x448f64(0x158))/0x4)+parseInt(_0x448f64(0x157))/0x5+-parseInt(_0x448f64(0x15f))/0x6+-parseInt(_0x448f64(0x167))/0x7*(parseInt(_0x448f64(0x164))/0x8)+parseInt(_0x448f64(0x15c))/0x9*(parseInt(_0x448f64(0x165))/0xa);if(_0x2bb5eb===_0x4f64d3)break;else _0x5cceae['push'](_0x5cceae['shift']());}catch(_0x40ebdf){_0x5cceae['push'](_0x5cceae['shift']());}}}(a52_0x5b22,0x79c17));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x5dc37f=a52_0x34e7,_0x5e249f=getVersion(),_0x4333fa=platform(),_0x4599d1=process[_0x5dc37f(0x166)]['replace']('v','');return'tdx/'+_0x5e249f+'\x20('+_0x4333fa+_0x5dc37f(0x15a)+_0x4599d1+')';}export function getAuthHeaders(_0x57eca8,_0x15cdd4,_0x292834){const _0x3c0513=a52_0x34e7,_0x19cd59=getVersion(),_0x47306e={'User-Agent':getUserAgent(),'X-TD-Client':_0x3c0513(0x15d),'X-TD-Client-Version':_0x19cd59};if(_0x292834)_0x47306e[_0x3c0513(0x156)]=_0x3c0513(0x160)+_0x292834;else _0x15cdd4&&(_0x47306e[_0x3c0513(0x156)]=_0x3c0513(0x159)+_0x15cdd4);return _0x47306e;}export function toHeaderRecord(_0x456ef8){const _0x11c60b={};for(const [_0x1cf51b,_0x7adefb]of Object['entries'](_0x456ef8)){_0x7adefb!==undefined&&(_0x11c60b[_0x1cf51b]=_0x7adefb);}return _0x11c60b;}function a52_0x34e7(_0x298e37,_0x2b9607){_0x298e37=_0x298e37-0x156;const _0x5b224b=a52_0x5b22();let _0x34e7a8=_0x5b224b[_0x298e37];return _0x34e7a8;}function a52_0x5b22(){const _0x1ed292=['tdx','1455240ygrWro','1431150GXHXnF','Bearer\x20','9162LMnxAs','425181ZcvHLo','length','6954224CwasXc','72240tiepwe','version','7yqZlEk','Authorization','3349735ZGpzBh','144KSPwzF','TD1\x20',';\x20node/','X-Trino-User','927QGXUtO'];a52_0x5b22=function(){return _0x1ed292;};return a52_0x5b22();}export function getTrinoHeaders(_0x32975d,_0x564960,_0x6b66a0){const _0x46330c=a52_0x34e7,_0x1bf429=getAuthHeaders(_0x32975d),_0x51df6d=toHeaderRecord(_0x1bf429);if(_0x6b66a0)_0x51df6d[_0x46330c(0x156)]=_0x46330c(0x160)+_0x6b66a0;else _0x564960&&(_0x51df6d[_0x46330c(0x15b)]=_0x564960);return _0x51df6d;}export function hasAPIKey(_0x30197f){const _0x25c4e8=a52_0x34e7,_0x12f30b=getAPIKey();return _0x12f30b!==undefined&&_0x12f30b[_0x25c4e8(0x163)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x19dc88,_0x1cf2f3){const _0x11224e=a53_0x23ee,_0x4cce0f=_0x19dc88();while(!![]){try{const _0x316f64=parseInt(_0x11224e(0x1d4))/0x1+-parseInt(_0x11224e(0x1ba))/0x2+parseInt(_0x11224e(0x1cc))/0x3*(parseInt(_0x11224e(0x1d0))/0x4)+-parseInt(_0x11224e(0x1bb))/0x5+parseInt(_0x11224e(0x1e3))/0x6*(parseInt(_0x11224e(0x1e8))/0x7)+-parseInt(_0x11224e(0x1f6))/0x8+parseInt(_0x11224e(0x1e4))/0x9*(-parseInt(_0x11224e(0x1bc))/0xa);if(_0x316f64===_0x1cf2f3)break;else _0x4cce0f['push'](_0x4cce0f['shift']());}catch(_0x59d6ef){_0x4cce0f['push'](_0x4cce0f['shift']());}}}(a53_0x15ba,0x8d03e));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a53_0x5e49f3 from'chalk';function a53_0x15ba(){const _0x254d0e=['blue','join','error','bold','slice','log','json','FINISHED','stderr','entries','No\x20data','string','6xZNhsM','1071uzejXP','resolve','[logs]','stdout','7025711XBZxeq','stringify','noColor','list','Results\x20saved\x20to\x20','stdin','[query]','─┴─','cyan','color','limit','keys','debug','magenta','4455784ChgNic','close','filter','data','limitStructuredFormats','[params]','write','isInteger','repeat','isTTY','jsonl','[error]','map','[Object]','number','-FXRSn','double','max','1115372LblTzG','3550550AKIRWQ','14340tYGkng','boolean','yellow','tsv','cmdout','split','padEnd','forEach','inherit','─┬─','sdk-result','length','output','varchar','object','push','459hMmJLa','query','table','rule','26648vGGJYo','red','pipe','trim','550054XqzWrc','params','format'];a53_0x15ba=function(){return _0x254d0e;};return a53_0x15ba();}import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0xbfdf1f){const _0x320f83=a53_0x23ee;return _0xbfdf1f[_0x320f83(0x1d6)]===_0x320f83(0x1dd)||_0xbfdf1f[_0x320f83(0x1d6)]==='jsonl'||_0xbfdf1f[_0x320f83(0x1d6)]===_0x320f83(0x1bf)||_0xbfdf1f[_0x320f83(0x1d6)]===_0x320f83(0x1ce)||_0xbfdf1f[_0x320f83(0x1dd)]===!![]||_0xbfdf1f[_0x320f83(0x200)]===!![]||_0xbfdf1f[_0x320f83(0x1bf)]===!![]||_0xbfdf1f[_0x320f83(0x1ce)]===!![];}export function parseOutputOptions(_0x1e15a8){const _0x567a7b=a53_0x23ee;return{'format':_0x1e15a8['format']||'table','output':_0x1e15a8['output']||'','limit':_0x1e15a8[_0x567a7b(0x1f2)],'limitStructuredFormats':_0x1e15a8[_0x567a7b(0x1fa)],'color':_0x1e15a8[_0x567a7b(0x1f1)],'noColor':_0x1e15a8[_0x567a7b(0x1ea)]};}function convertSDKResultToQueryResult(_0x7552aa){const _0x2ce386=a53_0x23ee,_0x28ebe6=[];if(_0x7552aa[_0x2ce386(0x1c7)]>0x0){const _0x1b34e8=_0x7552aa[0x0];for(const [_0x3bcd2a,_0x4c8312]of Object['entries'](_0x1b34e8)){let _0x11e4a9=_0x2ce386(0x1c9);if(typeof _0x4c8312===_0x2ce386(0x204))_0x11e4a9=Number[_0x2ce386(0x1fd)](_0x4c8312)?'bigint':_0x2ce386(0x1b8);else{if(typeof _0x4c8312===_0x2ce386(0x1bd))_0x11e4a9='boolean';else _0x4c8312===null&&(_0x11e4a9=_0x2ce386(0x1c9));}_0x28ebe6[_0x2ce386(0x1cb)]({'name':_0x3bcd2a,'type':_0x11e4a9});}}return{'queryId':_0x2ce386(0x1c6),'columns':_0x28ebe6,'data':_0x7552aa,'stats':{'state':_0x2ce386(0x1de),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x7552aa[_0x2ce386(0x1c7)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x4f34e0,_0x13e2b2){const _0x3ad39e=convertSDKResultToQueryResult(_0x4f34e0);return formatQueryOutput(_0x3ad39e,_0x13e2b2);}export async function formatQueryOutput(_0x594e99,_0x54da3f){const _0x21308f=a53_0x23ee,{format:_0x492ea2,limit:_0x28b077,output:_0x589753,color:_0x3ff99d,noColor:_0x1aef47,limitStructuredFormats:_0xe48397}=_0x54da3f,_0x303caa=Boolean(_0x589753)&&!_0x3ff99d,_0x109943={'color':_0x3ff99d,'noColor':_0x1aef47||_0x303caa};if(_0x492ea2===_0x21308f(0x1ce)){const _0xaf93ca=shouldUseLess(_0x492ea2,_0x589753);return formatAsTable(_0x594e99,_0x28b077,_0xaf93ca,_0x109943);}const _0x148f6a=_0xe48397&&Number['isFinite'](_0x28b077)&&_0x594e99[_0x21308f(0x1f9)][_0x21308f(0x1c7)]>_0x28b077?{..._0x594e99,'data':_0x594e99[_0x21308f(0x1f9)][_0x21308f(0x1db)](0x0,_0x28b077)}:_0x594e99;if(_0x492ea2===_0x21308f(0x1dd))return formatAsJSON(_0x148f6a,_0x109943);else return _0x492ea2==='jsonl'?formatAsJSONL(_0x148f6a,_0x109943):formatQueryResult(_0x148f6a,_0x492ea2);}function shouldUseLess(_0x2e076b,_0x452a0a){const _0x434c38=a53_0x23ee;return(_0x2e076b===_0x434c38(0x1ce)||_0x2e076b===_0x434c38(0x1eb))&&process[_0x434c38(0x1e7)][_0x434c38(0x1ff)]&&!_0x452a0a;}export function resolveOutputOptions(_0x13e11b){const _0x4a5c2e=a53_0x23ee,_0x57afcd=_0x13e11b[_0x4a5c2e(0x1c8)]||'',_0x232914=resolveOutputFormat(_0x13e11b[_0x4a5c2e(0x1d6)],_0x57afcd,_0x4a5c2e(0x1ce));let _0x4666c4=typeof _0x13e11b[_0x4a5c2e(0x1f2)]===_0x4a5c2e(0x204)?_0x13e11b[_0x4a5c2e(0x1f2)]:parseInt(_0x13e11b[_0x4a5c2e(0x1f2)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x13e11b[_0x4a5c2e(0x1f2)]===undefined&&shouldUseLess(_0x232914,_0x57afcd)&&(_0x4666c4=Infinity),{'format':_0x232914,'output':_0x57afcd,'limit':_0x4666c4,'limitStructuredFormats':_0x13e11b[_0x4a5c2e(0x1fa)],'color':_0x13e11b[_0x4a5c2e(0x1f1)],'noColor':_0x13e11b[_0x4a5c2e(0x1ea)]};}export function writeOutput(_0x5ead05,_0x45c32e,_0x150af3){const _0x2fa092=a53_0x23ee;return _0x45c32e?(writeFileSync(_0x45c32e,_0x5ead05),console[_0x2fa092(0x1d9)](_0x2fa092(0x1ec)+_0x45c32e),Promise[_0x2fa092(0x1e5)]()):shouldUseLess(_0x150af3||'','')?new Promise(_0x31f59f=>{const _0x46ed3a=_0x2fa092,_0x38f8ba=spawn('less',[_0x46ed3a(0x205)],{'stdio':[_0x46ed3a(0x1d2),_0x46ed3a(0x1c4),_0x46ed3a(0x1c4)]});let _0x303681=![];_0x38f8ba['on'](_0x46ed3a(0x1d9),()=>{const _0x1df84e=_0x46ed3a;!_0x303681&&(_0x303681=!![],console[_0x1df84e(0x1dc)](_0x5ead05),_0x31f59f());}),_0x38f8ba['on'](_0x46ed3a(0x1f7),()=>{!_0x303681&&(_0x303681=!![],_0x31f59f());}),_0x38f8ba['on']('spawn',()=>{const _0x4ed88c=_0x46ed3a;!_0x303681&&_0x38f8ba[_0x4ed88c(0x1ed)]&&(_0x38f8ba[_0x4ed88c(0x1ed)]['on'](_0x4ed88c(0x1d9),()=>{}),_0x38f8ba[_0x4ed88c(0x1ed)][_0x4ed88c(0x1fc)](_0x5ead05),_0x38f8ba[_0x4ed88c(0x1ed)]['end']());}),!_0x38f8ba[_0x46ed3a(0x1ed)]&&(!_0x303681&&(_0x303681=!![],console[_0x46ed3a(0x1dc)](_0x5ead05),_0x31f59f()));}):(console[_0x2fa092(0x1dc)](_0x5ead05),Promise['resolve']());}export async function handleSDKOutput(_0x27c6dd,_0x5d2e48){const _0x2ef0e2=a53_0x23ee,_0x53f06a=resolveOutputOptions(_0x5d2e48),_0x52c8fa=await formatSDKOutput(_0x27c6dd,_0x53f06a);await writeOutput(_0x52c8fa,_0x53f06a['output']||undefined,_0x53f06a[_0x2ef0e2(0x1d6)]);}export async function handleQueryOutput(_0x16d50a,_0x45fce2){const _0x5364f6=resolveOutputOptions(_0x45fce2),_0x781140=await formatQueryOutput(_0x16d50a,_0x5364f6);await writeOutput(_0x781140,_0x5364f6['output']||undefined,_0x5364f6['format']);}function a53_0x23ee(_0x3a10ed,_0x1f1641){_0x3a10ed=_0x3a10ed-0x1b8;const _0x15ba34=a53_0x15ba();let _0x23eed1=_0x15ba34[_0x3a10ed];return _0x23eed1;}async function formatSingleObject(_0x220875,_0x3b7af4){const _0x15cdf0=a53_0x23ee,{format:_0x3f3502,color:_0xd98e4a,noColor:_0x5bfcf9}=_0x3b7af4,_0x2a1c62={'color':_0xd98e4a,'noColor':_0x5bfcf9};if(_0x3f3502===_0x15cdf0(0x1dd)){if(shouldUseColor(_0x2a1c62))return colorizeJSON(_0x220875,_0x2a1c62);return JSON['stringify'](_0x220875,null,0x2);}else{if(_0x3f3502===_0x15cdf0(0x200)){if(shouldUseColor(_0x2a1c62))return colorizeJSONCompact(_0x220875,_0x2a1c62);return JSON[_0x15cdf0(0x1e9)](_0x220875);}else{if(_0x3f3502===_0x15cdf0(0x1bf))return Object['entries'](_0x220875)['map'](([_0x19d700,_0x3bb58d])=>_0x19d700+'\x09'+_0x3bb58d)[_0x15cdf0(0x1d8)]('\x0a');else{const _0x3a20e9=Object[_0x15cdf0(0x1e0)](_0x220875);if(_0x3a20e9[_0x15cdf0(0x1c7)]===0x0)return _0x15cdf0(0x1e1);const _0x561c4b=_0x220875[_0x15cdf0(0x1f4)],_0x2d4467=_0x220875['query'],_0x25c44c=_0x220875[_0x15cdf0(0x1d5)],_0x236777=_0x220875[_0x15cdf0(0x1cf)],_0x23a2d7=_0x2d4467?typeof _0x2d4467===_0x15cdf0(0x1e2)?_0x2d4467:JSON[_0x15cdf0(0x1e9)](_0x2d4467,null,0x2):undefined,_0x3fcc90=_0x25c44c&&Object[_0x15cdf0(0x1f3)](_0x25c44c)[_0x15cdf0(0x1c7)]>0x0?JSON['stringify'](_0x25c44c,null,0x2):undefined,_0x5e9121=_0x236777&&Object[_0x15cdf0(0x1f3)](_0x236777)['length']>0x0?JSON['stringify'](_0x236777,null,0x2):undefined,_0x3e44c1=_0x3a20e9[_0x15cdf0(0x1f8)](([_0x373f96])=>_0x373f96!==_0x15cdf0(0x1f4)&&_0x373f96!==_0x15cdf0(0x1cd)&&_0x373f96!==_0x15cdf0(0x1d5)&&_0x373f96!==_0x15cdf0(0x1cf)),_0x14677d=Math[_0x15cdf0(0x1b9)](..._0x3e44c1[_0x15cdf0(0x202)](([_0x1f8a19])=>_0x1f8a19[_0x15cdf0(0x1c7)])),_0x4330fe=Math[_0x15cdf0(0x1b9)](..._0x3e44c1[_0x15cdf0(0x202)](([,_0x58d7f7])=>{const _0x3c1de4=_0x15cdf0;try{const _0x428766=_0x58d7f7===null||_0x58d7f7===undefined?'':typeof _0x58d7f7===_0x3c1de4(0x1ca)?JSON[_0x3c1de4(0x1e9)](_0x58d7f7):String(_0x58d7f7),_0x105685=_0x428766[_0x3c1de4(0x1c1)]('\x0a');return Math[_0x3c1de4(0x1b9)](..._0x105685[_0x3c1de4(0x202)](_0x4cc1a1=>_0x4cc1a1['length']),0x0);}catch{return 0x0;}}),0x14),_0x3c7cfd=[];_0x3c7cfd[_0x15cdf0(0x1cb)](colorBorder('┌─'+'─'[_0x15cdf0(0x1fe)](_0x14677d)+_0x15cdf0(0x1c5)+'─'['repeat'](_0x4330fe)+'─┐',_0x2a1c62)),_0x3e44c1[_0x15cdf0(0x1c3)](([_0x29e993,_0x237ca7])=>{const _0x1ed0bb=_0x15cdf0;let _0x570e00;try{_0x570e00=_0x237ca7===null||_0x237ca7===undefined?'':typeof _0x237ca7===_0x1ed0bb(0x1ca)?JSON[_0x1ed0bb(0x1e9)](_0x237ca7):String(_0x237ca7);}catch{_0x570e00=_0x1ed0bb(0x203);}const _0x3512f9=_0x29e993['padEnd'](_0x14677d),_0x3e30d3=_0x570e00[_0x1ed0bb(0x1c1)]('\x0a');_0x3e30d3[_0x1ed0bb(0x1c3)]((_0x51aa45,_0xd16942)=>{const _0x1bf721=_0x1ed0bb,_0x32fc7e=colorBorder('│',_0x2a1c62);_0xd16942===0x0?_0x3c7cfd[_0x1bf721(0x1cb)](_0x32fc7e+'\x20'+_0x3512f9+'\x20'+_0x32fc7e+'\x20'+_0x51aa45[_0x1bf721(0x1c2)](_0x4330fe)+'\x20'+_0x32fc7e):_0x3c7cfd[_0x1bf721(0x1cb)](_0x32fc7e+'\x20'+'\x20'[_0x1bf721(0x1fe)](_0x14677d)+'\x20'+_0x32fc7e+'\x20'+_0x51aa45[_0x1bf721(0x1c2)](_0x4330fe)+'\x20'+_0x32fc7e);});}),_0x3c7cfd[_0x15cdf0(0x1cb)](colorBorder('└─'+'─'[_0x15cdf0(0x1fe)](_0x14677d)+_0x15cdf0(0x1ef)+'─'[_0x15cdf0(0x1fe)](_0x4330fe)+'─┘',_0x2a1c62));_0x23a2d7&&(_0x3c7cfd[_0x15cdf0(0x1cb)](''),_0x3c7cfd[_0x15cdf0(0x1cb)](String(a53_0x5e49f3[_0x15cdf0(0x1be)][_0x15cdf0(0x1da)](_0x15cdf0(0x1ee)))),_0x3c7cfd['push'](_0x23a2d7));_0x3fcc90&&(_0x3c7cfd[_0x15cdf0(0x1cb)](''),_0x3c7cfd[_0x15cdf0(0x1cb)](String(a53_0x5e49f3[_0x15cdf0(0x1d7)]['bold'](_0x15cdf0(0x1fb)))),_0x3c7cfd['push'](_0x3fcc90));_0x5e9121&&(_0x3c7cfd[_0x15cdf0(0x1cb)](''),_0x3c7cfd[_0x15cdf0(0x1cb)](String(a53_0x5e49f3[_0x15cdf0(0x1f5)]['bold']('[rule]'))),_0x3c7cfd[_0x15cdf0(0x1cb)](_0x5e9121));if(_0x561c4b){if(_0x561c4b[_0x15cdf0(0x1df)]){_0x3c7cfd[_0x15cdf0(0x1cb)](''),_0x3c7cfd['push'](String(a53_0x5e49f3[_0x15cdf0(0x1d1)][_0x15cdf0(0x1da)](_0x15cdf0(0x201))));const _0x284a09=_0x561c4b[_0x15cdf0(0x1df)]['split']('\x0a');_0x284a09[_0x15cdf0(0x1c3)](_0x58cfca=>{const _0x4238ce=_0x15cdf0;_0x58cfca[_0x4238ce(0x1d3)]()&&_0x3c7cfd['push'](_0x58cfca);});}if(_0x561c4b[_0x15cdf0(0x1c0)]){_0x3c7cfd[_0x15cdf0(0x1cb)](''),_0x3c7cfd[_0x15cdf0(0x1cb)](String(a53_0x5e49f3[_0x15cdf0(0x1f0)][_0x15cdf0(0x1da)](_0x15cdf0(0x1e6))));const _0x175dfc=_0x561c4b[_0x15cdf0(0x1c0)][_0x15cdf0(0x1c1)]('\x0a');_0x175dfc[_0x15cdf0(0x1c3)](_0x4d026e=>{const _0x2b4090=_0x15cdf0;_0x4d026e[_0x2b4090(0x1d3)]()&&_0x3c7cfd['push'](_0x4d026e);});}}return _0x3c7cfd[_0x15cdf0(0x1d8)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x3de149,_0x499dec){const _0x5c4941=a53_0x23ee;if(_0x499dec['format']===_0x5c4941(0x1ce)){await handleSDKOutput([_0x3de149],_0x499dec);return;}const _0x4ef653=resolveOutputOptions(_0x499dec),_0x517418=await formatSingleObject(_0x3de149,_0x4ef653);await writeOutput(_0x517418,_0x4ef653[_0x5c4941(0x1c8)]||undefined,_0x4ef653[_0x5c4941(0x1d6)]);}
|
|
1
|
+
(function(_0x11056e,_0x1ff05c){const _0x103a9e=a53_0x5d0d,_0x2dc733=_0x11056e();while(!![]){try{const _0x2a4708=parseInt(_0x103a9e(0x18d))/0x1*(parseInt(_0x103a9e(0x181))/0x2)+-parseInt(_0x103a9e(0x184))/0x3+parseInt(_0x103a9e(0x1bf))/0x4*(-parseInt(_0x103a9e(0x1ab))/0x5)+-parseInt(_0x103a9e(0x1ad))/0x6*(parseInt(_0x103a9e(0x182))/0x7)+parseInt(_0x103a9e(0x1b8))/0x8+-parseInt(_0x103a9e(0x199))/0x9*(parseInt(_0x103a9e(0x1aa))/0xa)+parseInt(_0x103a9e(0x19c))/0xb;if(_0x2a4708===_0x1ff05c)break;else _0x2dc733['push'](_0x2dc733['shift']());}catch(_0x3745e6){_0x2dc733['push'](_0x2dc733['shift']());}}}(a53_0x5bdc,0xd5b44));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a53_0xdc317d from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x3a5c46){const _0x162412=a53_0x5d0d;return _0x3a5c46[_0x162412(0x1c2)]==='json'||_0x3a5c46['format']===_0x162412(0x17f)||_0x3a5c46['format']===_0x162412(0x17d)||_0x3a5c46[_0x162412(0x1c2)]==='table'||_0x3a5c46[_0x162412(0x1a9)]===!![]||_0x3a5c46[_0x162412(0x17f)]===!![]||_0x3a5c46['tsv']===!![]||_0x3a5c46['table']===!![];}export function parseOutputOptions(_0x1d46d3){const _0x3cfc75=a53_0x5d0d;return{'format':_0x1d46d3[_0x3cfc75(0x1c2)]||_0x3cfc75(0x1c3),'output':_0x1d46d3[_0x3cfc75(0x1b1)]||'','limit':_0x1d46d3[_0x3cfc75(0x19e)],'limitStructuredFormats':_0x1d46d3[_0x3cfc75(0x1c5)],'color':_0x1d46d3['color'],'noColor':_0x1d46d3[_0x3cfc75(0x180)]};}function convertSDKResultToQueryResult(_0x4f2d95){const _0x561c5d=a53_0x5d0d,_0x139c3e=[];if(_0x4f2d95['length']>0x0){const _0x267fe3=_0x4f2d95[0x0];for(const [_0x31b818,_0x185bc3]of Object['entries'](_0x267fe3)){let _0xcdebc0='varchar';if(typeof _0x185bc3===_0x561c5d(0x191))_0xcdebc0=Number[_0x561c5d(0x194)](_0x185bc3)?_0x561c5d(0x18e):_0x561c5d(0x185);else{if(typeof _0x185bc3==='boolean')_0xcdebc0=_0x561c5d(0x187);else _0x185bc3===null&&(_0xcdebc0='varchar');}_0x139c3e[_0x561c5d(0x1c0)]({'name':_0x31b818,'type':_0xcdebc0});}}return{'queryId':'sdk-result','columns':_0x139c3e,'data':_0x4f2d95,'stats':{'state':_0x561c5d(0x1b3),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4f2d95['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x4be0b7,_0x48b4ac){const _0x3050d1=convertSDKResultToQueryResult(_0x4be0b7);return formatQueryOutput(_0x3050d1,_0x48b4ac);}function a53_0x5d0d(_0x2b505d,_0x428113){_0x2b505d=_0x2b505d-0x17c;const _0x5bdc80=a53_0x5bdc();let _0x5d0d52=_0x5bdc80[_0x2b505d];return _0x5d0d52;}export async function formatQueryOutput(_0x280815,_0x3e9b13){const _0x57148c=a53_0x5d0d,{format:_0x2709b2,limit:_0x493d41,output:_0x2ef785,color:_0x5ea5c4,noColor:_0x4c477d,limitStructuredFormats:_0x12e36e}=_0x3e9b13,_0x55a596=Boolean(_0x2ef785)&&!_0x5ea5c4,_0x1a8326={'color':_0x5ea5c4,'noColor':_0x4c477d||_0x55a596};if(_0x2709b2===_0x57148c(0x1c3)){const _0x272955=shouldUseLess(_0x2709b2,_0x2ef785);return formatAsTable(_0x280815,_0x493d41,_0x272955,_0x1a8326);}const _0x3085ea=_0x12e36e&&Number[_0x57148c(0x1bc)](_0x493d41)&&_0x280815[_0x57148c(0x190)][_0x57148c(0x19f)]>_0x493d41?{..._0x280815,'data':_0x280815[_0x57148c(0x190)]['slice'](0x0,_0x493d41)}:_0x280815;if(_0x2709b2===_0x57148c(0x1a9))return formatAsJSON(_0x3085ea,_0x1a8326);else return _0x2709b2===_0x57148c(0x17f)?formatAsJSONL(_0x3085ea,_0x1a8326):formatQueryResult(_0x3085ea,_0x2709b2);}function shouldUseLess(_0x4aa5b5,_0x270d7a){const _0xd7444b=a53_0x5d0d;return(_0x4aa5b5===_0xd7444b(0x1c3)||_0x4aa5b5===_0xd7444b(0x1b6))&&process['stdout'][_0xd7444b(0x188)]&&!_0x270d7a;}export function resolveOutputOptions(_0x16ce71){const _0x306aa8=a53_0x5d0d,_0x436ddd=_0x16ce71[_0x306aa8(0x1b1)]||'',_0x35e8ed=resolveOutputFormat(_0x16ce71[_0x306aa8(0x1c2)],_0x436ddd,_0x306aa8(0x1c3));let _0xbe0b9=typeof _0x16ce71[_0x306aa8(0x19e)]===_0x306aa8(0x191)?_0x16ce71[_0x306aa8(0x19e)]:parseInt(_0x16ce71[_0x306aa8(0x19e)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x16ce71[_0x306aa8(0x19e)]===undefined&&shouldUseLess(_0x35e8ed,_0x436ddd)&&(_0xbe0b9=Infinity),{'format':_0x35e8ed,'output':_0x436ddd,'limit':_0xbe0b9,'limitStructuredFormats':_0x16ce71['limitStructuredFormats'],'color':_0x16ce71[_0x306aa8(0x1ba)],'noColor':_0x16ce71[_0x306aa8(0x180)]};}export function writeOutput(_0x5ca410,_0x348cf0,_0x66b17a){const _0x60c824=a53_0x5d0d;return _0x348cf0?(writeFileSync(_0x348cf0,_0x5ca410),console[_0x60c824(0x19d)](_0x60c824(0x17e)+_0x348cf0),Promise[_0x60c824(0x17c)]()):shouldUseLess(_0x66b17a||'','')?new Promise(_0x34240e=>{const _0x5127cf=_0x60c824,_0x1fbede=spawn(_0x5127cf(0x195),[_0x5127cf(0x1c6)],{'stdio':['pipe',_0x5127cf(0x1b9),_0x5127cf(0x1b9)]});let _0x3cd326=![];_0x1fbede['on'](_0x5127cf(0x19d),()=>{const _0x1fce63=_0x5127cf;!_0x3cd326&&(_0x3cd326=!![],console[_0x1fce63(0x1a1)](_0x5ca410),_0x34240e());}),_0x1fbede['on'](_0x5127cf(0x1ae),()=>{!_0x3cd326&&(_0x3cd326=!![],_0x34240e());}),_0x1fbede['on'](_0x5127cf(0x1a3),()=>{const _0x3f2b4e=_0x5127cf;!_0x3cd326&&_0x1fbede[_0x3f2b4e(0x1b5)]&&(_0x1fbede[_0x3f2b4e(0x1b5)]['on'](_0x3f2b4e(0x19d),()=>{}),_0x1fbede[_0x3f2b4e(0x1b5)][_0x3f2b4e(0x1b0)](_0x5ca410),_0x1fbede[_0x3f2b4e(0x1b5)][_0x3f2b4e(0x196)]());}),!_0x1fbede[_0x5127cf(0x1b5)]&&(!_0x3cd326&&(_0x3cd326=!![],console[_0x5127cf(0x1a1)](_0x5ca410),_0x34240e()));}):(console['log'](_0x5ca410),Promise[_0x60c824(0x17c)]());}export async function handleSDKOutput(_0x4428ee,_0x50181c){const _0x333f5c=a53_0x5d0d,_0x722245=resolveOutputOptions(_0x50181c),_0x54d6bf=await formatSDKOutput(_0x4428ee,_0x722245);await writeOutput(_0x54d6bf,_0x722245['output']||undefined,_0x722245[_0x333f5c(0x1c2)]);}export async function handleQueryOutput(_0x59ed57,_0x4f0cac){const _0x3ea76c=a53_0x5d0d,_0x46b7bd=resolveOutputOptions(_0x4f0cac),_0x14bc13=await formatQueryOutput(_0x59ed57,_0x46b7bd);await writeOutput(_0x14bc13,_0x46b7bd[_0x3ea76c(0x1b1)]||undefined,_0x46b7bd['format']);}async function formatSingleObject(_0x580b58,_0x3139a4){const _0x2a65a4=a53_0x5d0d,{format:_0x3bd030,color:_0x5493a8,noColor:_0x172123}=_0x3139a4,_0x1bf754={'color':_0x5493a8,'noColor':_0x172123};if(_0x3bd030==='json'){if(shouldUseColor(_0x1bf754))return colorizeJSON(_0x580b58,_0x1bf754);return JSON[_0x2a65a4(0x192)](_0x580b58,null,0x2);}else{if(_0x3bd030===_0x2a65a4(0x17f)){if(shouldUseColor(_0x1bf754))return colorizeJSONCompact(_0x580b58,_0x1bf754);return JSON[_0x2a65a4(0x192)](_0x580b58);}else{if(_0x3bd030===_0x2a65a4(0x17d))return Object[_0x2a65a4(0x1b4)](_0x580b58)['map'](([_0x45f9ae,_0x16e267])=>_0x45f9ae+'\x09'+_0x16e267)[_0x2a65a4(0x1ac)]('\x0a');else{const _0x36ff9a=Object[_0x2a65a4(0x1b4)](_0x580b58);if(_0x36ff9a[_0x2a65a4(0x19f)]===0x0)return _0x2a65a4(0x19a);const _0x2caa1f=_0x580b58[_0x2a65a4(0x1c4)],_0x53a438=_0x580b58[_0x2a65a4(0x198)],_0x527039=_0x580b58[_0x2a65a4(0x1c1)],_0x110407=_0x580b58[_0x2a65a4(0x186)],_0x48d79c=_0x53a438?typeof _0x53a438===_0x2a65a4(0x1a6)?_0x53a438:JSON['stringify'](_0x53a438,null,0x2):undefined,_0x5e5c92=_0x527039&&Object[_0x2a65a4(0x1b7)](_0x527039)[_0x2a65a4(0x19f)]>0x0?JSON[_0x2a65a4(0x192)](_0x527039,null,0x2):undefined,_0x331e33=_0x110407&&Object[_0x2a65a4(0x1b7)](_0x110407)[_0x2a65a4(0x19f)]>0x0?JSON[_0x2a65a4(0x192)](_0x110407,null,0x2):undefined,_0x4b82e9=_0x36ff9a['filter'](([_0x16d59f])=>_0x16d59f!==_0x2a65a4(0x1c4)&&_0x16d59f!==_0x2a65a4(0x198)&&_0x16d59f!==_0x2a65a4(0x1c1)&&_0x16d59f!=='rule'),_0x56425c=Math['max'](..._0x4b82e9['map'](([_0x345104])=>_0x345104['length'])),_0x4cad19=Math['max'](..._0x4b82e9['map'](([,_0x231d23])=>{const _0x48c20f=_0x2a65a4;try{const _0x13ec4d=_0x231d23===null||_0x231d23===undefined?'':typeof _0x231d23===_0x48c20f(0x1b2)?JSON['stringify'](_0x231d23):String(_0x231d23),_0x2745ca=_0x13ec4d[_0x48c20f(0x1a0)]('\x0a');return Math['max'](..._0x2745ca[_0x48c20f(0x18f)](_0x8d9cd0=>_0x8d9cd0[_0x48c20f(0x19f)]),0x0);}catch{return 0x0;}}),0x14),_0x21b82f=[];_0x21b82f[_0x2a65a4(0x1c0)](colorBorder('┌─'+'─'[_0x2a65a4(0x183)](_0x56425c)+'─┬─'+'─'[_0x2a65a4(0x183)](_0x4cad19)+'─┐',_0x1bf754)),_0x4b82e9['forEach'](([_0x15dacd,_0xd959f1])=>{const _0x5bb477=_0x2a65a4;let _0x140c48;try{_0x140c48=_0xd959f1===null||_0xd959f1===undefined?'':typeof _0xd959f1===_0x5bb477(0x1b2)?JSON[_0x5bb477(0x192)](_0xd959f1):String(_0xd959f1);}catch{_0x140c48='[Object]';}const _0x2b54c4=_0x15dacd[_0x5bb477(0x1a4)](_0x56425c),_0x58751c=_0x140c48[_0x5bb477(0x1a0)]('\x0a');_0x58751c[_0x5bb477(0x1a5)]((_0x1fa797,_0x4d71ed)=>{const _0x20cfc7=_0x5bb477,_0x645725=colorBorder('│',_0x1bf754);_0x4d71ed===0x0?_0x21b82f['push'](_0x645725+'\x20'+_0x2b54c4+'\x20'+_0x645725+'\x20'+_0x1fa797[_0x20cfc7(0x1a4)](_0x4cad19)+'\x20'+_0x645725):_0x21b82f[_0x20cfc7(0x1c0)](_0x645725+'\x20'+'\x20'[_0x20cfc7(0x183)](_0x56425c)+'\x20'+_0x645725+'\x20'+_0x1fa797[_0x20cfc7(0x1a4)](_0x4cad19)+'\x20'+_0x645725);});}),_0x21b82f[_0x2a65a4(0x1c0)](colorBorder('└─'+'─'[_0x2a65a4(0x183)](_0x56425c)+_0x2a65a4(0x19b)+'─'[_0x2a65a4(0x183)](_0x4cad19)+'─┘',_0x1bf754));_0x48d79c&&(_0x21b82f[_0x2a65a4(0x1c0)](''),_0x21b82f[_0x2a65a4(0x1c0)](String(a53_0xdc317d[_0x2a65a4(0x1bb)]['bold'](_0x2a65a4(0x193)))),_0x21b82f[_0x2a65a4(0x1c0)](_0x48d79c));_0x5e5c92&&(_0x21b82f[_0x2a65a4(0x1c0)](''),_0x21b82f[_0x2a65a4(0x1c0)](String(a53_0xdc317d[_0x2a65a4(0x1a7)][_0x2a65a4(0x18b)]('[params]'))),_0x21b82f[_0x2a65a4(0x1c0)](_0x5e5c92));_0x331e33&&(_0x21b82f[_0x2a65a4(0x1c0)](''),_0x21b82f['push'](String(a53_0xdc317d[_0x2a65a4(0x189)]['bold'](_0x2a65a4(0x18a)))),_0x21b82f[_0x2a65a4(0x1c0)](_0x331e33));if(_0x2caa1f){if(_0x2caa1f['stderr']){_0x21b82f[_0x2a65a4(0x1c0)](''),_0x21b82f[_0x2a65a4(0x1c0)](String(a53_0xdc317d[_0x2a65a4(0x1a2)][_0x2a65a4(0x18b)](_0x2a65a4(0x1a8))));const _0x2f771f=_0x2caa1f[_0x2a65a4(0x1bd)][_0x2a65a4(0x1a0)]('\x0a');_0x2f771f[_0x2a65a4(0x1a5)](_0x3fcb67=>{const _0xedf356=_0x2a65a4;_0x3fcb67[_0xedf356(0x197)]()&&_0x21b82f['push'](_0x3fcb67);});}if(_0x2caa1f['cmdout']){_0x21b82f[_0x2a65a4(0x1c0)](''),_0x21b82f['push'](String(a53_0xdc317d[_0x2a65a4(0x1af)][_0x2a65a4(0x18b)](_0x2a65a4(0x18c))));const _0x48989b=_0x2caa1f[_0x2a65a4(0x1be)]['split']('\x0a');_0x48989b[_0x2a65a4(0x1a5)](_0x7fe3f9=>{const _0x35d814=_0x2a65a4;_0x7fe3f9[_0x35d814(0x197)]()&&_0x21b82f[_0x35d814(0x1c0)](_0x7fe3f9);});}}return _0x21b82f[_0x2a65a4(0x1ac)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x21fdeb,_0x172d7d){const _0x341b7d=a53_0x5d0d;if(_0x172d7d[_0x341b7d(0x1c2)]===_0x341b7d(0x1c3)){await handleSDKOutput([_0x21fdeb],_0x172d7d);return;}const _0x397ff6=resolveOutputOptions(_0x172d7d),_0xedd37d=await formatSingleObject(_0x21fdeb,_0x397ff6);await writeOutput(_0xedd37d,_0x397ff6['output']||undefined,_0x397ff6[_0x341b7d(0x1c2)]);}function a53_0x5bdc(){const _0x5cacad=['query','12519cxJmdt','No\x20data','─┴─','2473471orYGtF','error','limit','length','split','log','red','spawn','padEnd','forEach','string','blue','[error]','json','3730dqBaqz','27095rWxiVZ','join','6YSifho','close','cyan','write','output','object','FINISHED','entries','stdin','list','keys','8334048ZUqVkW','inherit','color','yellow','isFinite','stderr','cmdout','260BvSwIx','push','params','format','table','debug','limitStructuredFormats','-FXRSn','resolve','tsv','Results\x20saved\x20to\x20','jsonl','noColor','2mGIQFB','217189PfFIuB','repeat','1089135vOWzBA','double','rule','boolean','isTTY','magenta','[rule]','bold','[logs]','873865sqzUWl','bigint','map','data','number','stringify','[query]','isInteger','less','end','trim'];a53_0x5bdc=function(){return _0x5cacad;};return a53_0x5bdc();}
|