@treasuredata/tdx 2026.3.0 → 2026.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.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/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.d.ts +4 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/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.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/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 a50_0x24004d=a50_0x2df8;(function(_0x4e39c1,_0x3f8ab4){const _0x314212=a50_0x2df8,_0xf6d9c7=_0x4e39c1();while(!![]){try{const _0x169bdc=parseInt(_0x314212(0x12c))/0x1*(parseInt(_0x314212(0x1c5))/0x2)+parseInt(_0x314212(0x227))/0x3+-parseInt(_0x314212(0x192))/0x4+-parseInt(_0x314212(0x21d))/0x5+-parseInt(_0x314212(0x1a3))/0x6*(parseInt(_0x314212(0x254))/0x7)+-parseInt(_0x314212(0x206))/0x8*(-parseInt(_0x314212(0x195))/0x9)+parseInt(_0x314212(0x230))/0xa;if(_0x169bdc===_0x3f8ab4)break;else _0xf6d9c7['push'](_0xf6d9c7['shift']());}catch(_0x22f711){_0xf6d9c7['push'](_0xf6d9c7['shift']());}}}(a50_0x542f,0x67705));import a50_0x328f98 from'chalk';import{existsSync}from'fs';import a50_0x1a7fff 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 a50_0x245fe1 from'prompts';function getAttemptStatusDisplay(_0x4edd46){const _0x4fb992=a50_0x2df8;if(!_0x4edd46)return{'icon':'⏳','text':''};const {done:_0x4c6eae,success:_0x5f49a0,cancelRequested:_0x193fb2}=_0x4edd46;if(!_0x4c6eae)return _0x193fb2?{'icon':'🛑','text':a50_0x328f98[_0x4fb992(0x1fb)](_0x4fb992(0x153))}:{'icon':'🔄','text':a50_0x328f98[_0x4fb992(0x1f1)](_0x4fb992(0x136))};if(_0x5f49a0)return{'icon':'✅','text':a50_0x328f98[_0x4fb992(0x19d)]('success')};return{'icon':'❌','text':a50_0x328f98[_0x4fb992(0x1cb)](_0x4fb992(0xce))};}export class WorkflowBaseCommand extends BaseCommand{[a50_0x24004d(0x246)](_0x149cac,_0x950356,_0x21e907=0x0){const _0x465e2e=a50_0x24004d;return _0x149cac[_0x21e907]||_0x950356[_0x465e2e(0x1a9)];}[a50_0x24004d(0x159)](_0x5144a,_0x332659,_0x3cc92e=0x0){const _0x375f98=a50_0x24004d,_0x5a6c84=this['resolveProject'](_0x5144a,_0x332659,_0x3cc92e);if(!_0x5a6c84)return console['error'](a50_0x328f98[_0x375f98(0x1cb)](_0x375f98(0x253)),_0x375f98(0x14c)),console[_0x375f98(0xce)](a50_0x328f98[_0x375f98(0x142)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x5a6c84;}[a50_0x24004d(0x203)](_0x1cdce0,_0x312c02){const _0x152f81=a50_0x24004d;if(_0x1cdce0[0x0]){const _0x364fa2=_0x1cdce0[0x0][_0x152f81(0x1cf)]('.');if(_0x364fa2['length']===0x1)return{'projectName':_0x364fa2[0x0],'workflowName':undefined};else return _0x364fa2[_0x152f81(0xdf)]===0x2?{'projectName':_0x364fa2[0x0],'workflowName':_0x364fa2[0x1]}:(console[_0x152f81(0xce)](a50_0x328f98[_0x152f81(0x1cb)]('Error:'),_0x152f81(0x15d)),null);}return{'projectName':_0x312c02[_0x152f81(0x1a9)],'workflowName':undefined};}[a50_0x24004d(0x16d)](_0x2d55f4,_0xdaca10,_0x3f1e30=0x0){const _0x59b8e7=a50_0x24004d;if(_0x2d55f4[_0x3f1e30])return _0x2d55f4[_0x3f1e30];if(_0xdaca10[_0x59b8e7(0x1a9)]){const _0x5b35b7=a50_0x1a7fff['join'](process[_0x59b8e7(0x23f)](),_0x59b8e7(0x1ec),_0xdaca10[_0x59b8e7(0x1a9)]);if(existsSync(a50_0x1a7fff['join'](_0x5b35b7,_0x59b8e7(0xc0))))return _0x5b35b7;}return undefined;}async['showWorkflowConsoleUrl'](_0x484133,_0x3617eb,_0x27763f){const _0x3ab397=a50_0x24004d;try{const _0x37fa0a=await _0x484133[_0x3ab397(0x13a)][_0x3ab397(0x1ec)](_0x3617eb,{'limit':0x1});if(_0x37fa0a['length']>0x0){const _0x25757f=_0x37fa0a[0x0]['id'],_0x354f3e=getWorkflowUrl(_0x27763f,_0x25757f);console[_0x3ab397(0xce)](_0x3ab397(0xba)+a50_0x328f98[_0x3ab397(0x135)](_0x354f3e));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0x182);[a50_0x24004d(0x226)]=a50_0x24004d(0xb8);async[a50_0x24004d(0x251)](_0x423361){const _0xa25454=a50_0x24004d,{options:_0x3f87cb,args:_0x2add4b,tdx:_0x195a13}=_0x423361,_0x3e0971=_0x2add4b[0x0],_0x13da45=_0x3f87cb[_0xa25454(0x220)];if(_0x13da45)return saveSessionContext({'workflow_project':undefined},_0x3f87cb[_0xa25454(0x201)]),console[_0xa25454(0xfb)](a50_0x328f98[_0xa25454(0x19d)](_0xa25454(0x13c))),0x0;if(!_0x3e0971)return console['error'](a50_0x328f98['red'](_0xa25454(0x253)),'Project\x20name\x20is\x20required'),console[_0xa25454(0xce)](a50_0x328f98['dim']('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0xa25454(0xce)](a50_0x328f98[_0xa25454(0x142)](_0xa25454(0x217))),0x1;const _0x345701=await withSpinner(_0xa25454(0x1e2)+_0x3e0971+'\x27...',()=>_0x195a13[_0xa25454(0x13a)][_0xa25454(0x213)](_0x3e0971),{'verbose':_0x3f87cb[_0xa25454(0x1e0)]}),{name:_0x28bb5f}=_0x345701[_0xa25454(0x19c)];return saveSessionContext({'workflow_project':_0x28bb5f},_0x3f87cb[_0xa25454(0x201)]),console[_0xa25454(0xfb)](a50_0x328f98[_0xa25454(0x19d)](_0xa25454(0x255)+a50_0x328f98[_0xa25454(0x135)](_0x28bb5f))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a50_0x24004d(0x13d);[a50_0x24004d(0x226)]=a50_0x24004d(0x111);async[a50_0x24004d(0x251)](_0x4813a7){const _0x1df319=a50_0x24004d,{options:_0x51b6a9,args:_0xaee826,tdx:_0x2d16ef}=_0x4813a7,_0x118022=_0xaee826[0x0];_0x51b6a9[_0x1df319(0x1e0)]&&_0x118022&&console['error'](_0x1df319(0x250)+_0x118022);const _0x1d8c0c=await withSpinner(_0x1df319(0xbe),()=>_0x2d16ef[_0x1df319(0x13a)][_0x1df319(0x1a0)](_0x118022,{'limit':_0x51b6a9['limit']}),{'verbose':_0x51b6a9[_0x1df319(0x1e0)]});let _0x55b0b4=_0x1d8c0c[_0x1df319(0x19c)];_0x55b0b4['sort']((_0x161f57,_0xf0a9a5)=>_0x161f57[_0x1df319(0xf1)][_0x1df319(0x1f6)](_0xf0a9a5[_0x1df319(0xf1)]));const _0x5641d8=_0x51b6a9['limit']||0x64,_0x13e66d=_0x55b0b4[_0x1df319(0xdf)]>=_0x5641d8?a50_0x328f98[_0x1df319(0x142)](_0x1df319(0xeb)):'';console['error'](_0x1df319(0x138)+_0x55b0b4['length']+_0x1df319(0x127)+(_0x55b0b4['length']!==0x1?'s':'')+_0x13e66d);if(_0x51b6a9[_0x1df319(0x249)]==='json'||_0x51b6a9[_0x1df319(0x249)]===_0x1df319(0x232)||_0x51b6a9[_0x1df319(0x249)]==='table')await handleSDKOutput(_0x55b0b4,_0x51b6a9);else{if(_0x55b0b4['length']===0x0)_0x118022?console['log']('No\x20projects\x20match\x20pattern:\x20'+_0x118022):console[_0x1df319(0xfb)](_0x1df319(0x143));else{const _0x9c911a=_0x55b0b4[_0x1df319(0xf8)](_0x257999=>{const _0xf4b16e=_0x1df319,_0x3a61e9=_0x257999[_0xf4b16e(0x15b)]?.[_0xf4b16e(0x1db)](_0x1923ec=>_0x1923ec[_0xf4b16e(0xe8)]===_0xf4b16e(0x1eb)),_0x88e62e=_0x3a61e9?a50_0x328f98[_0xf4b16e(0x142)](_0xf4b16e(0x188)):'';return _0xf4b16e(0x1d1)+_0x257999[_0xf4b16e(0xf1)]+_0x88e62e;});await writeOutput(_0x9c911a[_0x1df319(0x121)]('\x0a'),_0x51b6a9[_0x1df319(0x134)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0x231);[a50_0x24004d(0x226)]=a50_0x24004d(0x18f);async['execute'](_0xf36002){const _0x3d643a=a50_0x24004d,{options:_0x199987,args:_0x122079,tdx:_0x34914b}=_0xf36002,_0x2df072=this[_0x3d643a(0x246)](_0x122079,_0x199987);_0x199987[_0x3d643a(0x1e0)]&&_0x2df072&&console['error'](_0x3d643a(0x1d2)+_0x2df072);const _0x3285e5=await withSpinner(_0x3d643a(0xe9),()=>_0x34914b[_0x3d643a(0x13a)][_0x3d643a(0x1ec)](_0x2df072,{'limit':_0x199987[_0x3d643a(0x1df)]}),{'verbose':_0x199987['verbose']});let _0x17cb51=_0x3285e5[_0x3d643a(0x19c)];_0x17cb51[_0x3d643a(0x17b)]((_0x3fba4a,_0x25d554)=>{const _0xc8f6af=_0x3d643a,_0x6ae818=_0x3fba4a[_0xc8f6af(0xf1)][_0xc8f6af(0x1f6)](_0x25d554[_0xc8f6af(0xf1)]);if(_0x6ae818!==0x0)return _0x6ae818;return(_0x3fba4a[_0xc8f6af(0x259)]?.[_0xc8f6af(0xf1)]||'')[_0xc8f6af(0x1f6)](_0x25d554[_0xc8f6af(0x259)]?.['name']||'');});const _0x1f503c=_0x199987[_0x3d643a(0x1df)]||0x64,_0x3bbf7a=_0x17cb51['length']>=_0x1f503c?a50_0x328f98[_0x3d643a(0x142)](_0x3d643a(0xeb)):'';console['error'](_0x3d643a(0x138)+_0x17cb51['length']+'\x20workflow'+(_0x17cb51['length']!==0x1?'s':'')+_0x3bbf7a);if(_0x199987['format']==='json'||_0x199987[_0x3d643a(0x249)]===_0x3d643a(0x232)||_0x199987['format']===_0x3d643a(0x146))await handleSDKOutput(_0x17cb51,_0x199987);else{if(_0x17cb51['length']===0x0)_0x2df072?console['log'](_0x3d643a(0xb1)+_0x2df072):console[_0x3d643a(0xfb)]('No\x20workflows\x20found');else{const _0x4a0537=_0x199987['site'],_0x4e6948=_0x17cb51[_0x3d643a(0xf8)](_0x49a8b0=>{const _0x5ac2f7=_0x3d643a,_0x4a8066=a50_0x328f98[_0x5ac2f7(0x142)]('#'+_0x49a8b0['id']),_0x3680d3=hyperlink(_0x4a8066,getWorkflowUrl(_0x4a0537,_0x49a8b0['id'])),_0x56f711=_0x49a8b0[_0x5ac2f7(0x259)]?.['name']?a50_0x328f98['dim']('\x20('+_0x49a8b0[_0x5ac2f7(0x259)][_0x5ac2f7(0xf1)]+')'):'';return _0x5ac2f7(0xc4)+_0x3680d3+'\x20'+_0x49a8b0[_0x5ac2f7(0xf1)]+_0x56f711;});await writeOutput(_0x4e6948[_0x3d643a(0x121)]('\x0a'),_0x199987[_0x3d643a(0x134)],_0x3d643a(0x19a));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a50_0x24004d(0x204);[a50_0x24004d(0x226)]=a50_0x24004d(0x126);async['execute'](_0x332410){const _0x581121=a50_0x24004d,{options:_0x228b66,args:_0x1a8560,tdx:_0x284a00}=_0x332410,_0x4835bb=this[_0x581121(0x203)](_0x1a8560,_0x228b66);if(!_0x4835bb)return 0x1;const {projectName:_0x1de14e,workflowName:_0x179e6f}=_0x4835bb;if(_0x228b66['verbose']){if(_0x1de14e&&_0x179e6f)console[_0x581121(0xce)](_0x581121(0xda)+_0x1de14e+'.'+_0x179e6f);else _0x1de14e&&console[_0x581121(0xce)](_0x581121(0x1ca)+_0x1de14e);const _0x1e0656=_0x228b66[_0x581121(0x23b)];_0x1e0656&&console['error'](_0x581121(0x1d0)+_0x1e0656);}let _0x47bb74=0x28;if(process[_0x581121(0x132)][_0x581121(0xe1)]&&!_0x228b66[_0x581121(0x134)]&&!_0x228b66[_0x581121(0x249)]){const _0x48c5b5=process[_0x581121(0x132)][_0x581121(0x166)]||0x28;_0x47bb74=Math[_0x581121(0x124)](0x14,Math[_0x581121(0x20a)](_0x48c5b5*0x2/0x3));}const _0x52dad5=_0x228b66[_0x581121(0x1df)]||_0x47bb74,_0x5e2b3e=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x284a00['workflow']['sessions']({'projectName':_0x1de14e,'workflowName':_0x179e6f,'status':_0x228b66['status'],'fromTime':_0x228b66[_0x581121(0x16b)],'toTime':_0x228b66['to'],'limit':_0x52dad5}),{'verbose':_0x228b66[_0x581121(0x1e0)]}),_0x5a5e47=_0x5e2b3e['data'];_0x5a5e47[_0x581121(0x17b)]((_0x194b16,_0x463631)=>{const _0x8edb8f=_0x581121,_0x202282=_0x194b16[_0x8edb8f(0x24c)]||'',_0x24d19d=_0x463631[_0x8edb8f(0x24c)]||'';return _0x24d19d[_0x8edb8f(0x1f6)](_0x202282);});_0x5a5e47['length']>=_0x52dad5?console[_0x581121(0xce)](_0x581121(0x181)+_0x5a5e47[_0x581121(0xdf)]+_0x581121(0xbd)+a50_0x328f98[_0x581121(0x142)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x581121(0xce)]('✔\x20Found\x20'+_0x5a5e47[_0x581121(0xdf)]+'\x20session'+(_0x5a5e47[_0x581121(0xdf)]!==0x1?'s':''));if(_0x228b66['format']==='json'||_0x228b66[_0x581121(0x249)]==='jsonl'||_0x228b66['format']===_0x581121(0x146))await handleSDKOutput(_0x5a5e47,_0x228b66);else{if(!process[_0x581121(0x132)]['isTTY']||_0x228b66[_0x581121(0x134)]){if(_0x5a5e47[_0x581121(0xdf)]===0x0){if(_0x1de14e&&_0x179e6f)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x1de14e+'.'+_0x179e6f);else _0x1de14e?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x1de14e):console[_0x581121(0xfb)](_0x581121(0x193));}else{const _0x284a77=_0x228b66[_0x581121(0x137)],_0x26c798=this['renderSessionsTimeline'](_0x5a5e47,_0x284a77);_0x228b66[_0x581121(0x134)]?await writeOutput(_0x26c798,_0x228b66[_0x581121(0x134)],_0x581121(0x19a)):console[_0x581121(0xfb)](_0x26c798);}!_0x1de14e&&(console[_0x581121(0xce)](''),console[_0x581121(0xce)](a50_0x328f98[_0x581121(0x142)](_0x581121(0x202))),console['error'](a50_0x328f98[_0x581121(0x142)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a50_0x328f98['dim'](_0x581121(0x1c7))));}else{if(_0x5a5e47[_0x581121(0xdf)]===0x0){if(_0x1de14e&&_0x179e6f)console[_0x581121(0xfb)](_0x581121(0x25c)+_0x1de14e+'.'+_0x179e6f);else _0x1de14e?console[_0x581121(0xfb)](_0x581121(0x218)+_0x1de14e):console[_0x581121(0xfb)](_0x581121(0x193));}else await this['navigateSessionsInteractive'](_0x5a5e47,_0x332410,_0x1de14e);}}return 0x0;}['renderSessionsTimeline'](_0x444a00,_0x160515){const _0x2ef70a=a50_0x24004d,_0x4439bc=[],_0x47a539=new Map();let _0x4aa97b=Infinity,_0x1e46c6=-Infinity;for(const _0x285d26 of _0x444a00){if(_0x285d26[_0x2ef70a(0x1ed)]?.[_0x2ef70a(0x1d3)]){const _0x36b4c4=new Date(_0x285d26['lastAttempt']['createdAt'])[_0x2ef70a(0x116)](),_0xf4f200=_0x285d26[_0x2ef70a(0x1ed)][_0x2ef70a(0x1e5)]?new Date(_0x285d26[_0x2ef70a(0x1ed)][_0x2ef70a(0x1e5)])['getTime']():Date['now'](),_0x226151=_0x285d26[_0x2ef70a(0x259)]?.[_0x2ef70a(0xf1)]||_0x2ef70a(0xb9);!_0x47a539[_0x2ef70a(0x16f)](_0x226151)&&_0x47a539[_0x2ef70a(0xfa)](_0x226151,[]),_0x47a539[_0x2ef70a(0x163)](_0x226151)[_0x2ef70a(0x117)]({'session':_0x285d26,'startTime':_0x36b4c4,'endTime':_0xf4f200,'duration':_0xf4f200-_0x36b4c4}),_0x4aa97b=Math[_0x2ef70a(0x198)](_0x4aa97b,_0x36b4c4),_0x1e46c6=Math[_0x2ef70a(0x124)](_0x1e46c6,_0xf4f200);}}if(_0x47a539[_0x2ef70a(0x14d)]===0x0)return _0x2ef70a(0x140);const _0x54a3e0=process[_0x2ef70a(0x132)][_0x2ef70a(0x120)]||0x78,_0x15fb0b=0x1e,_0x47fcb1=0x32,_0x45710d=0x4,_0xce59e0=Math[_0x2ef70a(0x198)](_0x47fcb1,Math['max'](_0x15fb0b,Math[_0x2ef70a(0x20a)](_0x54a3e0*0.3))),_0x4bd0fc=_0x54a3e0-_0xce59e0-TIMELINE_CONFIG[_0x2ef70a(0xd2)]-0x3-_0x45710d,_0x3be04f=_0x1e46c6-_0x4aa97b,_0x23db2e=_0x3be04f/_0xce59e0,_0x1f06a5=renderTimeAxis({'startTime':_0x4aa97b,'endTime':_0x1e46c6,'durationMs':_0x3be04f,'msPerChar':_0x23db2e},_0xce59e0),_0x5ddb5a=[];for(const _0x493db0 of _0x47a539['values']()){_0x5ddb5a[_0x2ef70a(0x117)](..._0x493db0);}_0x5ddb5a[_0x2ef70a(0x17b)]((_0x1fee8f,_0x28779f)=>_0x28779f[_0x2ef70a(0x21f)]-_0x1fee8f[_0x2ef70a(0x21f)]);const _0x3b7cbf=new Date(_0x4aa97b),_0x2d12a7=formatDate(_0x3b7cbf),_0x3a2d68=_0x45710d+TIMELINE_CONFIG[_0x2ef70a(0x118)]+TIMELINE_CONFIG[_0x2ef70a(0x157)]+_0x4bd0fc,_0x2ba136='\x20'[_0x2ef70a(0x243)](_0x3a2d68-_0x2d12a7[_0x2ef70a(0xdf)]),_0x5f27cb=_0x2ba136+a50_0x328f98[_0x2ef70a(0x142)](_0x2d12a7)+'\x20'+_0x1f06a5;_0x4439bc['push'](_0x5f27cb);const _0xe6cc0c=0x16;let _0x3d0873=0x0;for(const _0x237c92 of _0x5ddb5a){const _0x4a7ac5=_0x237c92[_0x2ef70a(0x201)][_0x2ef70a(0x259)]?.['name']||'?',_0x2a4d7a=Math['min'](stringWidth(_0x4a7ac5),_0xe6cc0c);_0x3d0873=Math['max'](_0x3d0873,_0x2a4d7a);}for(const _0x1f74a5 of _0x5ddb5a){const {session:_0x4ebe42,startTime:_0x122f4e,endTime:_0x3b5ca2,duration:_0x3d07ca}=_0x1f74a5,_0x41ad48=_0x4ebe42['project']?.['id'],_0x559357=_0x4ebe42['id'],_0x527b4a=_0x4ebe42[_0x2ef70a(0x259)]?.[_0x2ef70a(0xf1)]||'?',_0x5af4cb=_0x4ebe42['workflow']?.[_0x2ef70a(0xf1)]||'?';let _0x50139e,_0x2f31e0;if(_0x4ebe42[_0x2ef70a(0x1ed)]){const _0x551ad6=_0x4ebe42[_0x2ef70a(0x1ed)];!_0x551ad6['done']?(_0x50139e=_0x551ad6['cancelRequested']?'🛑':'🔄',_0x2f31e0=_0x551ad6[_0x2ef70a(0x176)]?a50_0x328f98['yellow']:a50_0x328f98[_0x2ef70a(0x1f1)]):(_0x50139e=_0x551ad6['success']?'✅':'❌',_0x2f31e0=_0x551ad6[_0x2ef70a(0x19f)]?a50_0x328f98['green']:a50_0x328f98['red']);}else _0x50139e='⏳',_0x2f31e0=a50_0x328f98['dim'];const _0x993a77='#'+_0x559357,_0x269671=_0x41ad48?hyperlink(_0x993a77,getWorkflowSessionUrl(_0x160515,_0x41ad48,_0x559357)):_0x993a77;let _0xb57162=_0x527b4a;stringWidth(_0x527b4a)>_0xe6cc0c&&(_0xb57162=_0x527b4a['slice'](0x0,_0xe6cc0c-0x1)+'…');const _0x5996e9=a50_0x328f98['dim'](_0xb57162),_0x94df9c=stringWidth(_0xb57162),_0x4ef751='\x20'[_0x2ef70a(0x243)](_0x3d0873-stringWidth(_0xb57162)+0x2),_0x1cd2c1='('+formatElapsed(_0x3d07ca)+')',_0x34ba1c=stringWidth(_0x1cd2c1),_0xfb8d2a=stringWidth(_0x993a77),_0x38d80f=_0xfb8d2a+0x1+_0x94df9c+_0x4ef751['length'],_0x294799=_0x4bd0fc-_0x38d80f-_0x34ba1c-0x1-0x8;let _0x31cd7b=_0x5af4cb;stringWidth(_0x31cd7b)>_0x294799&&(_0x31cd7b=_0x31cd7b['slice'](0x0,_0x294799-0x1)+'…');const _0x3357db=_0x269671+'\x20'+_0x5996e9+_0x4ef751+_0x31cd7b,_0x182347=stringWidth(_0x3357db),_0x3dee12=_0x4bd0fc-_0x182347-_0x34ba1c,_0x104c32=_0x3357db+'\x20'['repeat'](Math[_0x2ef70a(0x124)](0x1,_0x3dee12))+a50_0x328f98[_0x2ef70a(0x142)](_0x1cd2c1),_0x213ec4=Math['floor']((_0x122f4e-_0x4aa97b)/_0x23db2e),_0x45927a=Math[_0x2ef70a(0x20a)]((_0x3b5ca2-_0x4aa97b)/_0x23db2e),_0x1310f0=Math[_0x2ef70a(0x124)](_0x213ec4+0x1,_0x45927a),_0x568b57=new Array(_0xce59e0)[_0x2ef70a(0x1f0)]('\x20');for(let _0xb58689=_0x213ec4;_0xb58689<Math['min'](_0x1310f0,_0xce59e0);_0xb58689++){_0x568b57[_0xb58689]='─';}const _0x9d9c49=_0x568b57[_0x2ef70a(0xf8)](_0xb79e22=>_0xb79e22==='\x20'?'\x20':_0x2f31e0(_0xb79e22))['join']('');_0x4439bc[_0x2ef70a(0x117)](_0x50139e+'\x20'+_0x104c32+'│'+_0x9d9c49+'│');}return _0x4439bc[_0x2ef70a(0x121)]('\x0a');}async[a50_0x24004d(0x1f2)](_0x5a3238,_0x5427ca,_0x2933b0){const _0x411151=a50_0x24004d,{options:_0x2758a2,tdx:_0x2888a4}=_0x5427ca,_0x4f1d28=_0x2758a2[_0x411151(0x137)],{timelineRows:_0x2d6a59,timeAxisHeader:_0x43d284}=this['generateSessionTimelineRows'](_0x5a3238,_0x4f1d28),_0x514081=_0x2d6a59[_0x411151(0xc5)](_0x1e201b=>_0x1e201b[_0x411151(0x167)]);if(_0x514081[_0x411151(0xdf)]===0x0){const _0x29681a=this['renderSessionsTimeline'](_0x5a3238,_0x4f1d28);console['log'](_0x29681a);!_0x2933b0&&(console[_0x411151(0xce)](''),console[_0x411151(0xce)](a50_0x328f98[_0x411151(0x142)](_0x411151(0x202))),console[_0x411151(0xce)](a50_0x328f98['dim'](_0x411151(0xd3))+'or'+a50_0x328f98[_0x411151(0x142)](_0x411151(0x1c7))));return;}_0x43d284&&console[_0x411151(0xfb)](_0x43d284);const _0x4f5c92=_0x2d6a59[_0x411151(0xc5)](_0x5d54dc=>_0x5d54dc['attemptId'])[_0x411151(0xf8)](_0x452de2=>({'title':_0x452de2['displayLine'],'value':_0x452de2[_0x411151(0x167)]})),_0x139851=process['stdout']['rows']||0x3c,_0x477cae=Math['max'](0x28,Math[_0x411151(0x20a)](_0x139851*0x2/0x3)),_0x4fee02=await a50_0x245fe1({'type':'autocomplete','name':_0x411151(0x167),'message':_0x411151(0x10d),'choices':_0x4f5c92,'initial':-0x1,'limit':_0x477cae,'clearFirst':!![],'fallback':{'title':_0x411151(0x24f),'value':null},'suggest':(_0x550e8e,_0x3822df)=>{const _0x2b02cb=_0x411151;if(!_0x550e8e)return Promise[_0x2b02cb(0x1ab)](_0x3822df);const _0x3b2215=_0x3822df['filter'](_0x16361c=>{const _0x120bd2=_0x2b02cb,_0x588d64=_0x16361c;return _0x588d64['title'][_0x120bd2(0x1b9)]()['includes'](_0x550e8e[_0x120bd2(0x1b9)]());});return Promise[_0x2b02cb(0x1ab)](_0x3b2215);}}),_0x23f6cc=()=>{const _0x48e391=_0x411151;process[_0x48e391(0x132)][_0x48e391(0x23c)](_0x48e391(0x1ee)),process['stdout'][_0x48e391(0x23c)](_0x48e391(0x1ee)),process[_0x48e391(0x132)]['write'](_0x48e391(0x1ee));},_0x1867f0=_0x4fee02&&_0x4fee02['attemptId']&&_0x4fee02[_0x411151(0x167)]!==null&&_0x4fee02[_0x411151(0x167)]['trim']()!=='';if(!_0x1867f0){_0x23f6cc(),console[_0x411151(0xfb)](a50_0x328f98[_0x411151(0x142)]('Cancelled'));return;}_0x23f6cc();const _0x4ec2ea=_0x5a3238['find'](_0x52f0f4=>_0x52f0f4[_0x411151(0x1ed)]?.['id']===_0x4fee02[_0x411151(0x167)]);if(_0x4ec2ea){const _0x316ffb=_0x4ec2ea['project']?.[_0x411151(0xf1)]||'?',_0x22f6c5=_0x4ec2ea[_0x411151(0x13a)]?.[_0x411151(0xf1)]||'?';console[_0x411151(0xfb)](_0x411151(0x23e)+a50_0x328f98[_0x411151(0x142)](_0x316ffb)+_0x411151(0x1ea)+a50_0x328f98[_0x411151(0x142)](_0x22f6c5));}const _0x42bb16=new WorkflowTimelineCommand();await _0x42bb16[_0x411151(0x251)]({'args':[],'options':{..._0x2758a2,'attemptId':_0x4fee02['attemptId']},'tdx':_0x2888a4});}['generateSessionTimelineRows'](_0x4647df,_0x44ff89){const _0x254a45=a50_0x24004d,_0x12d78b=new Map();for(const _0x459b04 of _0x4647df){_0x459b04['id']&&_0x459b04['lastAttempt']?.['id']&&_0x12d78b[_0x254a45(0xfa)](_0x459b04['id'],_0x459b04[_0x254a45(0x1ed)]['id']);}const _0x4a3fbc=[];let _0x2d3a16='';const _0x272391=this[_0x254a45(0x1a4)](_0x4647df,_0x44ff89),_0x4a4c11=_0x272391[_0x254a45(0x1cf)]('\x0a');for(const _0x4fd4a8 of _0x4a4c11){if(_0x4fd4a8[_0x254a45(0x18c)](_0x254a45(0x21e))||_0x4fd4a8[_0x254a45(0x12d)](/^\s+\d{4}-\d{2}-\d{2}/))_0x2d3a16=_0x4fd4a8;else{if(_0x4fd4a8['match'](/^[✅❌🔄🛑⏳]/)){const _0x29d368=_0x4fd4a8['match'](/#(\d+)/),_0x3becee=_0x29d368?_0x29d368[0x1]:null,_0x1180db=_0x3becee?_0x12d78b[_0x254a45(0x163)](_0x3becee)||null:null,_0x144b14=_0x4647df[_0x254a45(0x1c6)](_0x5f42a8=>_0x5f42a8['id']===_0x3becee),_0x1b25b1=_0x144b14?.[_0x254a45(0x259)]?.[_0x254a45(0xf1)]||'';_0x4a3fbc[_0x254a45(0x117)]({'displayLine':_0x4fd4a8,'attemptId':_0x1180db,'projectName':_0x1b25b1});}}}return{'timelineRows':_0x4a3fbc,'timeAxisHeader':_0x2d3a16};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a50_0x24004d(0x225);[a50_0x24004d(0x226)]=a50_0x24004d(0x158);async[a50_0x24004d(0x251)](_0x4676a3){const _0x6d6954=a50_0x24004d,{options:_0x2d244e,args:_0x25ed1f,tdx:_0x4c2a39}=_0x4676a3,_0x4ffa47=this['parseProjectWorkflowPattern'](_0x25ed1f,_0x2d244e);if(!_0x4ffa47)return 0x1;const {projectName:_0x44c93b,workflowName:_0x56d05c}=_0x4ffa47,_0x3ea8c7=_0x2d244e[_0x6d6954(0x1f7)];if(_0x2d244e[_0x6d6954(0x1e0)]){if(_0x44c93b&&_0x56d05c)console[_0x6d6954(0xce)](_0x6d6954(0xda)+_0x44c93b+'.'+_0x56d05c);else _0x44c93b&&console['error'](_0x6d6954(0x1ca)+_0x44c93b);_0x3ea8c7&&console['error'](_0x6d6954(0x1d8));}const _0x35b59d=await withSpinner(_0x6d6954(0x10c),()=>_0x4c2a39['workflow'][_0x6d6954(0x170)]({'projectName':_0x44c93b,'workflowName':_0x56d05c,'includeRetried':_0x3ea8c7,'limit':_0x2d244e[_0x6d6954(0x1df)]}),{'verbose':_0x2d244e[_0x6d6954(0x1e0)]}),_0x45cea2=_0x35b59d['data'],_0x53189c=_0x2d244e[_0x6d6954(0x1df)]||0x64,_0xacd960=_0x45cea2['length']>=_0x53189c?a50_0x328f98[_0x6d6954(0x142)](_0x6d6954(0xeb)):'';console[_0x6d6954(0xce)](_0x6d6954(0x138)+_0x45cea2['length']+_0x6d6954(0x190)+(_0x45cea2['length']!==0x1?'s':'')+_0xacd960);if(_0x2d244e[_0x6d6954(0x249)]===_0x6d6954(0xb3)||_0x2d244e[_0x6d6954(0x249)]===_0x6d6954(0x232)||_0x2d244e[_0x6d6954(0x249)]===_0x6d6954(0x146))await handleSDKOutput(_0x45cea2,_0x2d244e);else{if(_0x45cea2[_0x6d6954(0xdf)]===0x0){if(_0x44c93b&&_0x56d05c)console[_0x6d6954(0xfb)](_0x6d6954(0x1da)+_0x44c93b+'.'+_0x56d05c);else _0x44c93b?console['log'](_0x6d6954(0xdd)+_0x44c93b):console['log'](_0x6d6954(0xf4));}else{const _0x4c3c0e=_0x2d244e[_0x6d6954(0x137)],_0x3d0b08=_0x45cea2['map'](_0x15c193=>{const _0x572995=_0x6d6954,_0x4ca076=a50_0x328f98['dim']('#'+_0x15c193['id']),_0xbf90a4=_0x15c193[_0x572995(0x259)]?.['id'],_0x10ff65=_0x15c193[_0x572995(0x18d)]||_0x15c193['sessionId'],_0x456082=_0xbf90a4&&_0x10ff65?hyperlink(_0x4ca076,getWorkflowAttemptUrl(_0x4c3c0e,_0xbf90a4,_0x10ff65,_0x15c193['id'])):_0x4ca076,{icon:_0x554002,text:_0x4a6275}=getAttemptStatusDisplay(_0x15c193),_0x557233=(_0x15c193[_0x572995(0x259)]?.[_0x572995(0xf1)]||'?')+'.'+(_0x15c193[_0x572995(0x13a)]?.['name']||'?'),_0x4ca5df=_0x15c193[_0x572995(0x24c)]?a50_0x328f98[_0x572995(0x142)](_0x15c193[_0x572995(0x24c)]):'';return(_0x456082+'\x20'+_0x554002+(_0x4a6275?'\x20'+_0x4a6275:'')+'\x20'+_0x557233+'\x20'+_0x4ca5df)[_0x572995(0x10b)]();});await writeOutput(_0x3d0b08[_0x6d6954(0x121)]('\x0a'),_0x2d244e[_0x6d6954(0x134)],_0x6d6954(0x19a));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a50_0x24004d(0xf1)]='workflow:attempt';[a50_0x24004d(0x226)]='Show\x20specific\x20attempt\x20details';async[a50_0x24004d(0x251)](_0x1bc513){const _0x22e3df=a50_0x24004d,{options:_0x2197b0,args:_0x26345d,tdx:_0x942a81}=_0x1bc513,_0x5d09ba=_0x26345d[0x0];if(!_0x5d09ba)return console[_0x22e3df(0xce)](_0x22e3df(0x258)),0x1;_0x2197b0[_0x22e3df(0x1e0)]&&console[_0x22e3df(0xce)]('Attempt\x20ID:\x20'+_0x5d09ba);const _0x441e1b=await withSpinner(_0x22e3df(0x1b1),()=>_0x942a81[_0x22e3df(0x13a)]['attempt'](_0x5d09ba),{'verbose':_0x2197b0[_0x22e3df(0x1e0)]}),_0x492120=_0x441e1b[_0x22e3df(0x19c)];let _0x497ce7;!_0x492120[_0x22e3df(0x145)]?_0x497ce7=_0x492120[_0x22e3df(0x176)]?_0x22e3df(0x153):'running':_0x497ce7=_0x492120['success']?_0x22e3df(0x19f):_0x22e3df(0xce);let _0x27107b;if(_0x492120[_0x22e3df(0x1d3)]&&_0x492120[_0x22e3df(0x1e5)]){const _0x2229c5=new Date(_0x492120['createdAt'])[_0x22e3df(0x116)](),_0x272a53=new Date(_0x492120[_0x22e3df(0x1e5)])[_0x22e3df(0x116)]();_0x27107b=Math[_0x22e3df(0xc2)]((_0x272a53-_0x2229c5)/0x3e8);}const _0x56ab90={'attempt_id':_0x492120['id'],'status':_0x497ce7,..._0x492120['index']!==undefined&&{'index':_0x492120['index']},..._0x492120[_0x22e3df(0x259)]&&{'project':_0x492120['project'][_0x22e3df(0xf1)]},..._0x492120['workflow']&&{'workflow':_0x492120['workflow'][_0x22e3df(0xf1)]},..._0x492120[_0x22e3df(0x1de)]&&{'session_id':_0x492120[_0x22e3df(0x1de)]},..._0x492120['sessionTime']&&{'session_time':_0x492120[_0x22e3df(0x24c)]},..._0x492120[_0x22e3df(0x1f5)]&&{'retry_attempt':_0x492120['retryAttemptName']},..._0x27107b!==undefined&&{'duration_sec':_0x27107b},..._0x492120[_0x22e3df(0x1d3)]&&{'created_at':_0x492120['createdAt']},..._0x492120[_0x22e3df(0x1e5)]&&{'finished_at':_0x492120[_0x22e3df(0x1e5)]},...Object[_0x22e3df(0x155)](_0x492120[_0x22e3df(0x25b)])[_0x22e3df(0xdf)]>0x0&&{'params':_0x492120[_0x22e3df(0x25b)]}};return await handleSingleObjectOutput(_0x56ab90,_0x2197b0),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0xc1);[a50_0x24004d(0x226)]=a50_0x24004d(0x152);async[a50_0x24004d(0x251)](_0x51aa30){const _0x852b28=a50_0x24004d,{options:_0x42e31d,args:_0x5ad4df,tdx:_0x338a51}=_0x51aa30,_0x325c8b=_0x5ad4df[0x0];if(!_0x325c8b)return console[_0x852b28(0xce)](_0x852b28(0x258)),0x1;const _0x1d35c7=_0x42e31d[_0x852b28(0xf6)];_0x42e31d[_0x852b28(0x1e0)]&&(console[_0x852b28(0xce)]('Attempt\x20ID:\x20'+_0x325c8b),_0x1d35c7&&console[_0x852b28(0xce)](_0x852b28(0x205)));const _0x5b95b6=await withSpinner(_0x852b28(0x1b4),()=>_0x338a51['workflow'][_0x852b28(0x1b0)](_0x325c8b,_0x1d35c7||![]),{'verbose':_0x42e31d[_0x852b28(0x1e0)]}),_0x20d64c=_0x5b95b6['data'];return console['error'](_0x852b28(0x138)+_0x20d64c[_0x852b28(0xdf)]+'\x20task'+(_0x20d64c['length']!==0x1?'s':'')),await handleSDKOutput(_0x20d64c,_0x42e31d),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0x109);[a50_0x24004d(0x226)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a50_0x24004d(0x251)](_0x8d4b5){const _0x972b91=a50_0x24004d,{options:_0x54dc7f,args:_0x140bff,tdx:_0x58444e}=_0x8d4b5,_0x577f00=_0x140bff[0x0];let _0x43d9f6=_0x140bff[0x1];if(!_0x577f00)return console['error'](_0x972b91(0x258)),0x1;_0x54dc7f[_0x972b91(0x1e0)]&&(console[_0x972b91(0xce)](_0x972b91(0x1c9)+_0x577f00),_0x43d9f6&&console[_0x972b91(0xce)](_0x972b91(0x16e)+_0x43d9f6));const _0xfbd32c=await withSpinner(_0x972b91(0x1b3),()=>_0x58444e[_0x972b91(0x13a)][_0x972b91(0x1ff)](_0x577f00,_0x43d9f6),{'verbose':_0x54dc7f[_0x972b91(0x1e0)]}),_0x559ab1=_0xfbd32c[_0x972b91(0x19c)];if(_0x559ab1['length']===0x0)return console['error'](_0x972b91(0x11d)),0x0;if(!_0x43d9f6&&(_0x54dc7f['json']||_0x54dc7f[_0x972b91(0x249)]))return await handleSDKOutput(_0x559ab1,_0x54dc7f),0x0;if(!_0x43d9f6){const _0x6fa7a6=_0x559ab1[_0x972b91(0xf8)](_0x2be155=>({'title':_0x2be155['taskName']+'\x20('+formatBytes(_0x2be155[_0x972b91(0x1ef)])+')','value':_0x2be155['taskName']})),_0x2441cc=await a50_0x245fe1({'type':'select','name':_0x972b91(0x262),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x6fa7a6});if(!_0x2441cc[_0x972b91(0x262)])return console[_0x972b91(0xce)](_0x972b91(0xb6)),0x0;_0x43d9f6=_0x2441cc[_0x972b91(0x262)];}const _0x3610a1=await withSpinner(_0x972b91(0x11c),()=>_0x58444e[_0x972b91(0x13a)][_0x972b91(0xc3)](_0x577f00,_0x43d9f6),{'verbose':_0x54dc7f[_0x972b91(0x1e0)]}),_0xfdf246=_0x3610a1[_0x972b91(0x19c)];return _0xfdf246?console[_0x972b91(0xfb)](_0xfdf246):console['error'](_0x972b91(0x180)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0xf0);[a50_0x24004d(0x226)]=a50_0x24004d(0x189);async[a50_0x24004d(0x251)](_0x1cf1b7){const _0x966a80=a50_0x24004d,{options:_0x4339f5,args:_0x561202,tdx:_0x58dab9}=_0x1cf1b7,_0x2a4a2c=_0x561202[0x0];if(!_0x2a4a2c)return console[_0x966a80(0xce)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x4a017f=_0x4339f5[_0x966a80(0x244)];_0x4339f5[_0x966a80(0x1e0)]&&(console[_0x966a80(0xce)](_0x966a80(0x1c9)+_0x2a4a2c),_0x4a017f&&console['error'](_0x966a80(0x25a)+_0x4a017f));if(!_0x4339f5[_0x966a80(0x1f4)]){if(!isInteractive())return console['error'](a50_0x328f98[_0x966a80(0x1cb)](_0x966a80(0x236)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a50_0x328f98[_0x966a80(0x142)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xbbe333=await confirmKey(_0x966a80(0x215)+_0x2a4a2c+'?');if(!_0xbbe333)return console[_0x966a80(0xce)](a50_0x328f98[_0x966a80(0x1fb)](_0x966a80(0xb6))),0x1;}const _0x397300=await withSpinner(_0x966a80(0x1fd),()=>_0x58dab9['workflow'][_0x966a80(0xc9)](_0x2a4a2c,_0x4a017f),{'verbose':_0x4339f5['verbose']}),_0x590033=_0x397300['data'];return console[_0x966a80(0xce)]('✔\x20'+_0x590033),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a50_0x24004d(0xf1)]='workflow:retry';[a50_0x24004d(0x226)]=a50_0x24004d(0x16c);async['execute'](_0x492d32){const _0x5caee6=a50_0x24004d,{options:_0x97646b,args:_0x1c97cb,tdx:_0xa75f33}=_0x492d32,_0x1a8f78=_0x1c97cb[0x0];if(!_0x1a8f78)return console[_0x5caee6(0xce)](_0x5caee6(0x11a)),console[_0x5caee6(0xce)](_0x5caee6(0x150)),0x1;let _0x4a6495=![],_0x30b406=_0x1a8f78;if(_0x1a8f78[_0x5caee6(0x18c)](_0x5caee6(0x149)))_0x4a6495=!![],_0x30b406=_0x1a8f78[_0x5caee6(0xfd)](0x8);else{if(_0x1a8f78[_0x5caee6(0x18c)]('attempt:'))_0x4a6495=![],_0x30b406=_0x1a8f78[_0x5caee6(0xfd)](0x8);else return console['error'](_0x5caee6(0x1cc)),console[_0x5caee6(0xce)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x22441c=_0x97646b[_0x5caee6(0x1e9)],_0x452688=_0x97646b[_0x5caee6(0x208)],_0x5ea9ba=_0x97646b[_0x5caee6(0x25b)],_0x30c3bc=_0x97646b['force'];_0x97646b['verbose']&&(console[_0x5caee6(0xce)](_0x5caee6(0x179)+(_0x4a6495?_0x5caee6(0x201):'attempt')+'\x20'+_0x30b406),_0x22441c&&console[_0x5caee6(0xce)](_0x5caee6(0x10f)+_0x22441c),_0x452688&&console[_0x5caee6(0xce)](_0x5caee6(0x1a2)+_0x452688),_0x5ea9ba&&console[_0x5caee6(0xce)](_0x5caee6(0x242)+_0x5ea9ba),_0x30c3bc&&console['error'](_0x5caee6(0x1aa)));let _0x22abaf;if(_0x5ea9ba)try{if(_0x5ea9ba[_0x5caee6(0x18c)]('@')){const _0x45195a=await import(_0x5caee6(0x1e6)),_0x4b49e6=_0x5ea9ba['substring'](0x1),_0x38c87d=await _0x45195a[_0x5caee6(0x14f)](_0x4b49e6,'utf-8');_0x22abaf=JSON[_0x5caee6(0x162)](_0x38c87d);}else _0x22abaf=JSON[_0x5caee6(0x162)](_0x5ea9ba);}catch{return console[_0x5caee6(0xce)](_0x5caee6(0xcb)),0x1;}if(!_0x97646b[_0x5caee6(0x1f4)]){if(!isInteractive())return console[_0x5caee6(0xce)](a50_0x328f98[_0x5caee6(0x1cb)]('\x0aError:'),_0x5caee6(0x17f)),console['error'](a50_0x328f98[_0x5caee6(0x142)](_0x5caee6(0x172))),0x1;const _0xf0080b=await confirmKey(_0x5caee6(0x1e7)+(_0x4a6495?_0x5caee6(0x201):'attempt')+'\x20'+_0x30b406+'?');if(!_0xf0080b)return console[_0x5caee6(0xce)](a50_0x328f98[_0x5caee6(0x1fb)](_0x5caee6(0xb6))),0x1;}let _0x2dc654;_0x4a6495?_0x2dc654=await withSpinner(_0x5caee6(0x173),()=>_0xa75f33['workflow'][_0x5caee6(0x257)](_0x30b406,{'fromTask':_0x22441c,'retryParams':_0x22abaf}),{'verbose':_0x97646b['verbose']}):_0x2dc654=await withSpinner(_0x5caee6(0x1a1),()=>_0xa75f33['workflow']['retryAttempt'](_0x30b406,{'resumeFrom':_0x452688,'retryParams':_0x22abaf,'force':_0x30c3bc}),{'verbose':_0x97646b['verbose']});const _0x104169=_0x2dc654[_0x5caee6(0x19c)];return console['error'](_0x5caee6(0x1d7)),console[_0x5caee6(0xce)](_0x5caee6(0x223)+_0x104169['attemptId']),console[_0x5caee6(0xce)](_0x5caee6(0x1e4)+_0x104169['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a50_0x24004d(0xf1)]='workflow:run';[a50_0x24004d(0x226)]='Start\x20a\x20workflow\x20run';async['execute'](_0x53282a){const _0x5cc22d=a50_0x24004d,{options:_0x359535,args:_0x1acdad,tdx:_0x5921e5}=_0x53282a;let _0x2e57b3=_0x1acdad[0x0];if(!_0x2e57b3){const _0x25fcb0=this[_0x5cc22d(0x246)]([],_0x359535),_0x390088=await withSpinner(_0x5cc22d(0x1f3),()=>_0x5921e5[_0x5cc22d(0x13a)]['workflows'](_0x25fcb0,{'limit':_0x359535['limit']}),{'verbose':_0x359535[_0x5cc22d(0x1e0)]}),_0x5f473a=_0x390088[_0x5cc22d(0x19c)];if(_0x5f473a[_0x5cc22d(0xdf)]===0x0)return console[_0x5cc22d(0xce)]('No\x20workflows\x20found'),!_0x25fcb0&&console[_0x5cc22d(0xce)](a50_0x328f98['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x5c1447=_0x5f473a[_0x5cc22d(0xf8)](_0x5ecc09=>({'title':_0x5ecc09['project']?.['name']+'.'+_0x5ecc09[_0x5cc22d(0xf1)],'value':_0x5ecc09[_0x5cc22d(0x259)]?.[_0x5cc22d(0xf1)]+'.'+_0x5ecc09['name'],'description':_0x5ecc09[_0x5cc22d(0xde)]?'revision:\x20'+_0x5ecc09['revision']:undefined})),_0xa1e80b=await a50_0x245fe1({'type':_0x5cc22d(0x131),'name':'workflow','message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x5c1447});if(!_0xa1e80b[_0x5cc22d(0x13a)])return 0x1;_0x2e57b3=_0xa1e80b[_0x5cc22d(0x13a)];}if(!_0x2e57b3['includes']('.')){const _0x4f610e=this['resolveProject']([],_0x359535);if(_0x4f610e)_0x2e57b3=_0x4f610e+'.'+_0x2e57b3;else return console[_0x5cc22d(0xce)](a50_0x328f98[_0x5cc22d(0x1cb)](_0x5cc22d(0x253)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x5cc22d(0xce)](a50_0x328f98['dim'](_0x5cc22d(0x1dc))),0x1;}const _0x5c7b1a=_0x359535[_0x5cc22d(0x12a)],_0x4c34dc=_0x359535['sessionTime'],_0x33af96={};if(_0x5c7b1a&&Array[_0x5cc22d(0x14b)](_0x5c7b1a))for(const _0xb2d1c0 of _0x5c7b1a){const _0x5d9c2f=_0xb2d1c0['indexOf']('=');if(_0x5d9c2f===-0x1)return console[_0x5cc22d(0xce)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0xb2d1c0),console[_0x5cc22d(0xce)](_0x5cc22d(0x17e)),0x1;const _0xf93195=_0xb2d1c0['substring'](0x0,_0x5d9c2f),_0x19bdc1=_0xb2d1c0[_0x5cc22d(0xfd)](_0x5d9c2f+0x1);try{_0x33af96[_0xf93195]=JSON[_0x5cc22d(0x162)](_0x19bdc1);}catch{_0x33af96[_0xf93195]=_0x19bdc1;}}_0x359535['verbose']&&(console[_0x5cc22d(0xce)](_0x5cc22d(0x187)+_0x2e57b3),Object[_0x5cc22d(0x155)](_0x33af96)[_0x5cc22d(0xdf)]>0x0&&console[_0x5cc22d(0xce)](_0x5cc22d(0x224)+JSON[_0x5cc22d(0x260)](_0x33af96)),_0x4c34dc&&console[_0x5cc22d(0xce)](_0x5cc22d(0x210)+_0x4c34dc));const _0x5a0aea=await withSpinner(_0x5cc22d(0xe7),()=>_0x5921e5[_0x5cc22d(0x13a)][_0x5cc22d(0xd9)](_0x2e57b3,_0x33af96,{'sessionTime':_0x4c34dc}),{'verbose':_0x359535[_0x5cc22d(0x1e0)]}),_0x218264=_0x5a0aea[_0x5cc22d(0x19c)];console[_0x5cc22d(0xce)](_0x5cc22d(0x178)),console['error']('\x20\x20Attempt\x20ID:\x20'+_0x218264['id']),console[_0x5cc22d(0xce)](_0x5cc22d(0x1e4)+_0x218264[_0x5cc22d(0x1de)]),console[_0x5cc22d(0xce)](_0x5cc22d(0xd5)+_0x218264[_0x5cc22d(0x259)]?.[_0x5cc22d(0xf1)]),console[_0x5cc22d(0xce)](_0x5cc22d(0x1c2)+_0x218264[_0x5cc22d(0x13a)]?.['name']);if(_0x218264[_0x5cc22d(0x259)]?.['id']&&_0x218264[_0x5cc22d(0x1de)]&&_0x218264['id']){const _0x4d4a8f=_0x359535[_0x5cc22d(0x137)],_0xcd0bf5=getConsoleUrl(_0x4d4a8f,'/app/workflows/'+_0x218264[_0x5cc22d(0x259)]['id']+_0x5cc22d(0x168)+_0x218264['sessionId']+_0x5cc22d(0x1c0)+_0x218264['id']);console[_0x5cc22d(0xce)](_0x5cc22d(0xba)+a50_0x328f98[_0x5cc22d(0x135)](_0xcd0bf5));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a50_0x24004d(0xf1)]='workflow:download';[a50_0x24004d(0x226)]=a50_0x24004d(0x239);async['execute'](_0x226f92){const _0x187f62=a50_0x24004d,{options:_0x1ec9ec,args:_0x6d7097,tdx:_0x19beb7}=_0x226f92,_0x220bc0=_0x6d7097[0x0],_0xc329a5=_0x6d7097[0x1]||'.';if(!_0x220bc0)return console[_0x187f62(0xce)](_0x187f62(0x194)),console['error'](_0x187f62(0x228)),0x1;const _0x76ef1e=_0x1ec9ec[_0x187f62(0xde)];_0x1ec9ec['verbose']&&(console['error'](_0x187f62(0x23e)+_0x220bc0),console['error'](_0x187f62(0x233)+_0xc329a5),_0x76ef1e&&console[_0x187f62(0xce)](_0x187f62(0x133)+_0x76ef1e));const _0x200b13=await withSpinner(_0x187f62(0xee)+_0x220bc0+_0x187f62(0x221),()=>_0x19beb7[_0x187f62(0x13a)]['download'](_0x220bc0,_0xc329a5,{'revision':_0x76ef1e}),{'verbose':_0x1ec9ec[_0x187f62(0x1e0)]}),_0xc0f3b2=_0x200b13['data'];return console[_0x187f62(0xce)](_0x187f62(0x185)+_0xc0f3b2['projectName']),console[_0x187f62(0xce)](_0x187f62(0x252)+_0xc0f3b2[_0x187f62(0xde)]),console[_0x187f62(0xce)](_0x187f62(0x1f8)+_0xc0f3b2[_0x187f62(0x19b)]),console[_0x187f62(0xce)](_0x187f62(0xbc)+_0xc329a5+'/'+_0xc0f3b2[_0x187f62(0x148)]),0x0;}}function a50_0x2df8(_0x51d7d6,_0x2cc469){_0x51d7d6=_0x51d7d6-0xb1;const _0x542fa8=a50_0x542f();let _0x2df8fb=_0x542fa8[_0x51d7d6];return _0x2df8fb;}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0x1e1);[a50_0x24004d(0x226)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a50_0x24004d(0x251)](_0x340afe){const _0x225945=a50_0x24004d,{options:_0x4dcb7e,args:_0x18edd6,tdx:_0x53ffa5}=_0x340afe;let _0x21b328='.',_0x323a03=_0x4dcb7e['name'];if(_0x18edd6[0x0]){const {promises:_0x47d24a}=await import('fs');try{const _0x2b35c9=await _0x47d24a[_0x225945(0x20e)](_0x18edd6[0x0]);if(_0x2b35c9[_0x225945(0x24a)]())_0x21b328=_0x18edd6[0x0];else return console[_0x225945(0xce)](_0x225945(0xed)+_0x18edd6[0x0]+_0x225945(0x23a)),0x1;}catch{_0x323a03=_0x18edd6[0x0],_0x21b328='.';}}const _0x198934=_0x4dcb7e[_0x225945(0xde)],_0x35b728=_0x4dcb7e[_0x225945(0x169)];_0x4dcb7e['verbose']&&(console[_0x225945(0xce)](_0x225945(0x183)+_0x21b328),_0x323a03&&console[_0x225945(0xce)]('Project\x20name:\x20'+_0x323a03),_0x198934&&console[_0x225945(0xce)](_0x225945(0x133)+_0x198934),_0x35b728&&console[_0x225945(0xce)](_0x225945(0x209)));const _0x8e698d=await withSpinner(_0x225945(0x112),()=>_0x53ffa5[_0x225945(0x13a)][_0x225945(0x117)](_0x21b328,{'projectName':_0x323a03,'revision':_0x198934,'skipValidation':_0x35b728}),{'verbose':_0x4dcb7e['verbose']}),_0x5574d9=_0x8e698d[_0x225945(0x19c)];return console['error'](_0x225945(0x1e8)+_0x5574d9[_0x225945(0x148)]),console['error'](_0x225945(0x1d5)+_0x5574d9[_0x225945(0x1a6)]),console['error']('\x20\x20Revision:\x20'+_0x5574d9[_0x225945(0xde)]),await this['showWorkflowConsoleUrl'](_0x53ffa5,_0x5574d9[_0x225945(0x148)],_0x4dcb7e[_0x225945(0x137)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a50_0x24004d(0xf1)]='workflow:pull';[a50_0x24004d(0x226)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a50_0x24004d(0x251)](_0x36cca3){const _0xbcd09f=a50_0x24004d,{options:_0x5f3edc,args:_0x31d3f0,tdx:_0x1c2b61}=_0x36cca3,_0x53b593=_0x31d3f0[0x0],_0x394793=_0x31d3f0[0x1];if(!_0x53b593)return console['error'](a50_0x328f98[_0xbcd09f(0x1cb)](_0xbcd09f(0x253)),_0xbcd09f(0x14c)),console[_0xbcd09f(0xce)](a50_0x328f98[_0xbcd09f(0x142)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x450339=_0x5f3edc[_0xbcd09f(0xde)];_0x5f3edc[_0xbcd09f(0x1e0)]&&(console['error'](_0xbcd09f(0x23e)+_0x53b593),_0x394793&&console[_0xbcd09f(0xce)](_0xbcd09f(0x1b8)+_0x394793),_0x450339&&console[_0xbcd09f(0xce)]('Revision:\x20'+_0x450339),_0x5f3edc[_0xbcd09f(0x22a)]&&console['error'](_0xbcd09f(0xb4)));const _0x435438=await withSpinner(_0xbcd09f(0x1ba)+_0x53b593+_0xbcd09f(0x221),()=>_0x1c2b61[_0xbcd09f(0x13a)][_0xbcd09f(0x151)](_0x53b593,{'targetDir':_0x394793,'revision':_0x450339}),{'verbose':_0x5f3edc['verbose']}),_0x48cb43=_0x435438[_0xbcd09f(0x19c)];_0x48cb43[_0xbcd09f(0x1bf)]?console[_0xbcd09f(0xce)](_0xbcd09f(0x212)+_0x48cb43['projectName']):console['error']('→\x20Project:\x20'+_0x48cb43['projectName']);console['error'](_0xbcd09f(0x252)+_0x48cb43[_0xbcd09f(0xde)]),console['error'](_0xbcd09f(0x184)+(a50_0x1a7fff['relative'](process[_0xbcd09f(0x23f)](),_0x48cb43['targetDir'])||'.')),console[_0xbcd09f(0xce)](_0xbcd09f(0x261)+a50_0x328f98[_0xbcd09f(0x19d)]('+'+_0x48cb43[_0xbcd09f(0xf3)][_0xbcd09f(0x1fc)]+'\x20new')+',\x20'+(a50_0x328f98[_0xbcd09f(0x1fb)]('~'+_0x48cb43[_0xbcd09f(0xf3)]['modified']+_0xbcd09f(0x207))+',\x20')+(a50_0x328f98[_0xbcd09f(0x1cb)]('-'+_0x48cb43[_0xbcd09f(0xf3)][_0xbcd09f(0x104)]+_0xbcd09f(0x240))+',\x20')+(''+a50_0x328f98[_0xbcd09f(0x142)](_0x48cb43[_0xbcd09f(0xf3)][_0xbcd09f(0x128)]+_0xbcd09f(0x245))));for(const _0xaa5b15 of _0x48cb43[_0xbcd09f(0xe4)]){_0xaa5b15[_0xbcd09f(0xe2)]===_0xbcd09f(0x214)&&_0xaa5b15[_0xbcd09f(0x15e)]&&(console[_0xbcd09f(0xce)]('\x0a'+a50_0x328f98[_0xbcd09f(0x135)](_0xbcd09f(0x130)+_0xaa5b15[_0xbcd09f(0x10a)])),console[_0xbcd09f(0xce)](_0xaa5b15[_0xbcd09f(0x15e)]));}if(!_0x48cb43[_0xbcd09f(0x12f)])return saveSessionContext({'workflow_project':_0x48cb43[_0xbcd09f(0x148)]},_0x5f3edc[_0xbcd09f(0x201)]),console[_0xbcd09f(0xce)](a50_0x328f98[_0xbcd09f(0x19d)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0xbcd09f(0xce)](a50_0x328f98[_0xbcd09f(0x142)](_0xbcd09f(0xcc)+_0x48cb43[_0xbcd09f(0x148)])),0x0;if(_0x5f3edc[_0xbcd09f(0x22a)])return console[_0xbcd09f(0xce)](a50_0x328f98['yellow'](_0xbcd09f(0x174))),0x0;if(!_0x5f3edc[_0xbcd09f(0x1f4)]){if(!isInteractive())return console[_0xbcd09f(0xce)](a50_0x328f98['red'](_0xbcd09f(0x236)),_0xbcd09f(0x17f)),console[_0xbcd09f(0xce)](a50_0x328f98[_0xbcd09f(0x142)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5b36c0=await confirmKey(_0xbcd09f(0xd1));if(!_0x5b36c0)return console['error'](a50_0x328f98['yellow'](_0xbcd09f(0xb6)),_0xbcd09f(0x11e)),0x1;}await withSpinner(_0xbcd09f(0x18a),()=>_0x1c2b61[_0xbcd09f(0x13a)][_0xbcd09f(0x105)](_0x48cb43,{'revision':_0x450339}),{'verbose':_0x5f3edc[_0xbcd09f(0x1e0)]}),saveSessionContext({'workflow_project':_0x48cb43[_0xbcd09f(0x148)]},_0x5f3edc[_0xbcd09f(0x201)]),console[_0xbcd09f(0xce)](a50_0x328f98[_0xbcd09f(0x19d)](_0xbcd09f(0x234)));const _0x179fae=a50_0x1a7fff[_0xbcd09f(0x100)](process['cwd'](),_0x48cb43[_0xbcd09f(0x1dd)])||'.';return console[_0xbcd09f(0xce)](a50_0x328f98['dim'](_0xbcd09f(0xbc)+_0x179fae)),console[_0xbcd09f(0xce)](a50_0x328f98[_0xbcd09f(0x142)](_0xbcd09f(0xcc)+_0x48cb43['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0x20d);['description']=a50_0x24004d(0x1a7);async['execute'](_0x2d16ae){const _0x4f596f=a50_0x24004d,{options:_0x24ac46,args:_0xbe25da,tdx:_0x1d551f}=_0x2d16ae,_0x3ba01e=this['resolveProjectDir'](_0xbe25da,_0x24ac46),_0x2ced1e=_0x24ac46['revision'],_0x598954=_0x24ac46[_0x4f596f(0x169)];_0x24ac46[_0x4f596f(0x1e0)]&&(_0x3ba01e&&console[_0x4f596f(0xce)]('Source\x20directory:\x20'+_0x3ba01e),_0x2ced1e&&console['error']('Revision:\x20'+_0x2ced1e),_0x24ac46[_0x4f596f(0x22a)]&&console['error']('Dry\x20run:\x20yes'),_0x598954&&console['error'](_0x4f596f(0x209)));let _0x13c4c6;try{_0x13c4c6=await withSpinner(_0x4f596f(0xf5),()=>_0x1d551f[_0x4f596f(0x13a)][_0x4f596f(0x1c8)]({'sourceDir':_0x3ba01e,'revision':_0x2ced1e,'skipValidation':_0x598954}),{'verbose':_0x24ac46[_0x4f596f(0x1e0)]});}catch(_0x199e27){if(_0x199e27 instanceof Error&&_0x199e27[_0x4f596f(0x1ac)][_0x4f596f(0x247)](_0x4f596f(0x238)))return console['error'](a50_0x328f98[_0x4f596f(0x1cb)]('Error:'),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x24ac46['workflowProject']?console[_0x4f596f(0xce)](a50_0x328f98[_0x4f596f(0x142)](_0x4f596f(0x256)+_0x24ac46[_0x4f596f(0x1a9)]+_0x4f596f(0xfe)+_0x24ac46[_0x4f596f(0x1a9)]+'\x27')):console['error'](a50_0x328f98[_0x4f596f(0x142)](_0x4f596f(0x1ce))),0x1;throw _0x199e27;}const _0x40b394=_0x13c4c6['data'];console[_0x4f596f(0xce)](_0x4f596f(0xfc)+_0x40b394[_0x4f596f(0x148)]),console['error'](_0x4f596f(0x248)+_0x40b394['sourceDir']),console[_0x4f596f(0xce)](_0x4f596f(0x252)+_0x40b394[_0x4f596f(0xde)]),console['error'](_0x4f596f(0x261)+a50_0x328f98[_0x4f596f(0x19d)]('+'+_0x40b394[_0x4f596f(0xf3)][_0x4f596f(0x1fc)]+_0x4f596f(0x1b7))+',\x20'+(a50_0x328f98[_0x4f596f(0x1fb)]('~'+_0x40b394[_0x4f596f(0xf3)][_0x4f596f(0x214)]+_0x4f596f(0x207))+',\x20')+(a50_0x328f98['red']('-'+_0x40b394['summary']['deleted']+'\x20deleted')+',\x20')+(''+a50_0x328f98[_0x4f596f(0x142)](_0x40b394['summary']['unchanged']+_0x4f596f(0x245))));for(const _0x45af8c of _0x40b394[_0x4f596f(0xe4)]){_0x45af8c['type']===_0x4f596f(0x214)&&_0x45af8c[_0x4f596f(0x15e)]&&(console[_0x4f596f(0xce)]('\x0a'+a50_0x328f98[_0x4f596f(0x135)](_0x4f596f(0x130)+_0x45af8c['path'])),console[_0x4f596f(0xce)](_0x45af8c[_0x4f596f(0x15e)]));}if(!_0x40b394[_0x4f596f(0x12f)])return console[_0x4f596f(0xce)](a50_0x328f98['green']('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x4f596f(0x139)](_0x1d551f,_0x40b394[_0x4f596f(0x148)],_0x24ac46[_0x4f596f(0x137)]),0x0;if(_0x24ac46['dryRun'])return console[_0x4f596f(0xce)](a50_0x328f98['yellow'](_0x4f596f(0x17c))),0x0;if(!_0x24ac46[_0x4f596f(0x1f4)]){if(!isInteractive())return console[_0x4f596f(0xce)](a50_0x328f98['red'](_0x4f596f(0x236)),_0x4f596f(0x17f)),console['error'](a50_0x328f98['dim'](_0x4f596f(0x172))),0x1;const _0x3b2905=await confirmKey(_0x4f596f(0x22e));if(!_0x3b2905)return console[_0x4f596f(0xce)](a50_0x328f98[_0x4f596f(0x1fb)](_0x4f596f(0xb6)),'-\x20nothing\x20pushed'),0x1;}const _0x576fe2=await withSpinner(_0x4f596f(0xec),()=>_0x1d551f[_0x4f596f(0x13a)][_0x4f596f(0x24d)](_0x40b394),{'verbose':_0x24ac46[_0x4f596f(0x1e0)]}),_0x2f4bba=_0x576fe2[_0x4f596f(0x19c)];return console[_0x4f596f(0xce)](a50_0x328f98[_0x4f596f(0x19d)](_0x4f596f(0x177))),console[_0x4f596f(0xce)]('\x20\x20Project\x20ID:\x20'+_0x2f4bba[_0x4f596f(0x1a6)]),console['error'](_0x4f596f(0x252)+_0x2f4bba[_0x4f596f(0xde)]),await this[_0x4f596f(0x139)](_0x1d551f,_0x2f4bba[_0x4f596f(0x148)],_0x24ac46[_0x4f596f(0x137)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a50_0x24004d(0x18b);['description']=a50_0x24004d(0x22c);async[a50_0x24004d(0x251)](_0x9654d4){const _0x54eb4b=a50_0x24004d,{options:_0x5d56c3,args:_0x542496,tdx:_0x1ea2bd}=_0x9654d4,_0x30edac=this[_0x54eb4b(0x16d)](_0x542496,_0x5d56c3),_0x1e88f9=_0x5d56c3[_0x54eb4b(0xf1)],_0x12ea3f=_0x5d56c3[_0x54eb4b(0xde)],_0x2038e5=_0x5d56c3[_0x54eb4b(0x169)];if(!_0x30edac)return console[_0x54eb4b(0xce)](a50_0x328f98[_0x54eb4b(0x1cb)](_0x54eb4b(0x253)),_0x54eb4b(0xea)),console[_0x54eb4b(0xce)](a50_0x328f98[_0x54eb4b(0x142)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x54eb4b(0xce)](a50_0x328f98[_0x54eb4b(0x142)](_0x54eb4b(0x1c3))),0x1;if(!_0x1e88f9)return console[_0x54eb4b(0xce)](a50_0x328f98[_0x54eb4b(0x1cb)](_0x54eb4b(0x253)),_0x54eb4b(0x19e)),console[_0x54eb4b(0xce)](a50_0x328f98[_0x54eb4b(0x142)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x5d56c3['verbose']&&(console[_0x54eb4b(0xce)](_0x54eb4b(0x108)+_0x30edac),console[_0x54eb4b(0xce)]('New\x20project\x20name:\x20'+_0x1e88f9),_0x12ea3f&&console['error'](_0x54eb4b(0x133)+_0x12ea3f),_0x5d56c3['dryRun']&&console[_0x54eb4b(0xce)](_0x54eb4b(0xb4)),_0x2038e5&&console[_0x54eb4b(0xce)](_0x54eb4b(0x209)));const _0xf23c55=await withSpinner('Analyzing\x20project...',()=>_0x1ea2bd[_0x54eb4b(0x13a)][_0x54eb4b(0x22b)](_0x30edac,_0x1e88f9,{'revision':_0x12ea3f,'skipValidation':_0x2038e5}),{'verbose':_0x5d56c3[_0x54eb4b(0x1e0)]}),_0x1e0624=_0xf23c55[_0x54eb4b(0x19c)];console['error'](_0x54eb4b(0x199)+_0x1e0624[_0x54eb4b(0x1d9)]);_0x1e0624[_0x54eb4b(0xca)]&&console[_0x54eb4b(0xce)](_0x54eb4b(0xb7)+_0x1e0624[_0x54eb4b(0xca)]);console[_0x54eb4b(0xce)](_0x54eb4b(0xc6)+_0x1e0624[_0x54eb4b(0x165)]),console[_0x54eb4b(0xce)](_0x54eb4b(0x133)+_0x1e0624[_0x54eb4b(0xde)]),console[_0x54eb4b(0xce)](_0x54eb4b(0x22d)+_0x1e0624['fileCount']);_0x1e0624[_0x54eb4b(0x147)]&&(console[_0x54eb4b(0xce)](a50_0x328f98[_0x54eb4b(0x1fb)]('\x0a⚠\x20Project\x20\x22'+_0x1e0624[_0x54eb4b(0x165)]+_0x54eb4b(0x1f9)+_0x1e0624[_0x54eb4b(0xd0)]+')')),console[_0x54eb4b(0xce)](a50_0x328f98[_0x54eb4b(0x1fb)](_0x54eb4b(0xe6))));if(_0x5d56c3['dryRun'])return console['error'](a50_0x328f98[_0x54eb4b(0x1fb)](_0x54eb4b(0x144))),0x0;if(!_0x5d56c3[_0x54eb4b(0x1f4)]){if(!isInteractive())return console[_0x54eb4b(0xce)](a50_0x328f98['red']('\x0aError:'),_0x54eb4b(0x17f)),console[_0x54eb4b(0xce)](a50_0x328f98['dim'](_0x54eb4b(0x172))),0x1;const _0xfd70dd=_0x1e0624[_0x54eb4b(0xca)]||a50_0x1a7fff['basename'](_0x30edac),_0x319b0d=_0x1e0624[_0x54eb4b(0x147)]?_0x54eb4b(0x24b)+_0x1e88f9+'\x22\x20with\x20new\x20revision?':_0x54eb4b(0x13e)+_0xfd70dd+_0x54eb4b(0x1e3)+_0x1e88f9+'\x22?',_0x7e07fd=await confirmKey(_0x319b0d);if(!_0x7e07fd)return console[_0x54eb4b(0xce)](a50_0x328f98['yellow'](_0x54eb4b(0xb6))),0x1;}const _0xff19e=await withSpinner(_0x1e0624['targetExists']?_0x54eb4b(0x196)+_0x1e88f9+_0x54eb4b(0x221):_0x54eb4b(0x22f)+_0x1e88f9+_0x54eb4b(0x221),()=>_0x1ea2bd['workflow'][_0x54eb4b(0x1bc)](_0x1e0624),{'verbose':_0x5d56c3[_0x54eb4b(0x1e0)]}),_0x589566=_0xff19e[_0x54eb4b(0x19c)];return console[_0x54eb4b(0xce)](a50_0x328f98[_0x54eb4b(0x19d)](_0x1e0624[_0x54eb4b(0x147)]?_0x54eb4b(0x24e):'✔\x20Clone\x20complete')),console['error'](_0x54eb4b(0xd5)+_0x589566['newProjectName']),console[_0x54eb4b(0xce)]('\x20\x20Project\x20ID:\x20'+_0x589566[_0x54eb4b(0x119)]),console[_0x54eb4b(0xce)](_0x54eb4b(0x252)+_0x589566[_0x54eb4b(0xde)]),await this[_0x54eb4b(0x139)](_0x1ea2bd,_0x589566[_0x54eb4b(0x165)],_0x5d56c3[_0x54eb4b(0x137)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a50_0x24004d(0xf1)]='workflow:delete';[a50_0x24004d(0x226)]=a50_0x24004d(0x1a5);async[a50_0x24004d(0x251)](_0x3a5f76){const _0xdbf280=a50_0x24004d,{options:_0x38e1e1,args:_0x578dd7,tdx:_0x39ee4d}=_0x3a5f76,_0x2df370=_0x578dd7[0x0];if(!_0x2df370)return console[_0xdbf280(0xce)](_0xdbf280(0x129)),console[_0xdbf280(0xce)](_0xdbf280(0x1af)),0x1;_0x38e1e1[_0xdbf280(0x1e0)]&&console[_0xdbf280(0xce)](_0xdbf280(0x23e)+_0x2df370);if(!_0x38e1e1[_0xdbf280(0x1f4)]){if(!isInteractive())return console[_0xdbf280(0xce)](a50_0x328f98[_0xdbf280(0x1cb)](_0xdbf280(0x236)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xdbf280(0xce)](a50_0x328f98[_0xdbf280(0x142)](_0xdbf280(0x172))),0x1;const _0x2c9452=await confirmKey(_0xdbf280(0x1b5)+_0x2df370+_0xdbf280(0x235));if(!_0x2c9452)return console[_0xdbf280(0xce)](a50_0x328f98[_0xdbf280(0x1fb)](_0xdbf280(0xb6))),0x1;}const _0x48c7fb=await withSpinner(_0xdbf280(0x160)+_0x2df370+'...',()=>_0x39ee4d[_0xdbf280(0x13a)][_0xdbf280(0xe3)](_0x2df370),{'verbose':_0x38e1e1[_0xdbf280(0x1e0)]}),_0x4bd0a8=_0x48c7fb['data'];return console['error'](_0xdbf280(0x216)+_0x4bd0a8['projectName']),console[_0xdbf280(0xce)](_0xdbf280(0x1d5)+_0x4bd0a8['projectId']),0x0;}}export function parseKeyValue(_0x120c0d){const _0x540cb9=a50_0x24004d,_0x4a3ecb=_0x120c0d['indexOf']('=');if(_0x4a3ecb===-0x1)throw new Error(_0x540cb9(0xd8)+_0x120c0d+_0x540cb9(0x1fa));const _0x336c6a=_0x120c0d['substring'](0x0,_0x4a3ecb),_0x43e81a=_0x120c0d[_0x540cb9(0xfd)](_0x4a3ecb+0x1);if(!_0x336c6a)throw new Error(_0x540cb9(0xdc));return{'key':_0x336c6a,'value':_0x43e81a};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']='workflow:secrets:list';[a50_0x24004d(0x226)]=a50_0x24004d(0x1ae);async['execute'](_0x383560){const _0x36656e=a50_0x24004d,{options:_0x31a233,args:_0x3349ce,tdx:_0x36bac4}=_0x383560,_0x5bf0b4=this[_0x36656e(0x159)](_0x3349ce,_0x31a233);if(!_0x5bf0b4)return 0x1;_0x31a233['verbose']&&console[_0x36656e(0xce)]('Project:\x20'+_0x5bf0b4);const _0x24417e=await withSpinner('Listing\x20secrets...',()=>_0x36bac4['workflow'][_0x36656e(0x21c)](_0x5bf0b4),{'verbose':_0x31a233[_0x36656e(0x1e0)]}),{secrets:_0x4c3a4d}=_0x24417e['data'];return console['error']('✔\x20Found\x20'+_0x4c3a4d[_0x36656e(0xdf)]+'\x20secret'+(_0x4c3a4d[_0x36656e(0xdf)]!==0x1?'s':'')),await handleSDKOutput(_0x4c3a4d,_0x31a233),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0x110);[a50_0x24004d(0x226)]=a50_0x24004d(0x122);async[a50_0x24004d(0x251)](_0x46f2a1){const _0x13d1bc=a50_0x24004d,{options:_0x36b6af,args:_0x2c39e7,tdx:_0x3d0a6a}=_0x46f2a1;let _0x57d1fe,_0x54a5a4;if(_0x2c39e7['length']>=0x2)_0x57d1fe=_0x2c39e7[0x0],_0x54a5a4=_0x2c39e7[0x1];else{if(_0x2c39e7[_0x13d1bc(0xdf)]===0x1&&_0x36b6af[_0x13d1bc(0x1a9)])_0x57d1fe=_0x36b6af[_0x13d1bc(0x1a9)],_0x54a5a4=_0x2c39e7[0x0];else return _0x2c39e7['length']===0x1?(console[_0x13d1bc(0xce)](_0x13d1bc(0x194)),console[_0x13d1bc(0xce)](_0x13d1bc(0x1dc)),0x1):(console['error'](_0x13d1bc(0x101)),console[_0x13d1bc(0xce)](_0x13d1bc(0x18e)),0x1);}let _0xff234c,_0x23ce28;try{({key:_0xff234c,value:_0x23ce28}=parseKeyValue(_0x54a5a4));}catch(_0x4469d9){return _0x4469d9 instanceof Error&&console['error'](a50_0x328f98[_0x13d1bc(0x1cb)]('Error:'),_0x4469d9[_0x13d1bc(0x1ac)]),0x1;}_0x36b6af[_0x13d1bc(0x1e0)]&&(console[_0x13d1bc(0xce)](_0x13d1bc(0x23e)+_0x57d1fe),console[_0x13d1bc(0xce)]('Key:\x20'+_0xff234c));const _0x454d78=await withSpinner(_0x13d1bc(0xcf),()=>_0x3d0a6a[_0x13d1bc(0x13a)][_0x13d1bc(0xd4)](_0x57d1fe,_0xff234c,_0x23ce28),{'verbose':_0x36b6af[_0x13d1bc(0x1e0)]}),_0x5289bc=_0x454d78[_0x13d1bc(0x19c)];return console[_0x13d1bc(0xce)]('✔\x20Secret\x20\x27'+_0x5289bc[_0x13d1bc(0xe8)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x5289bc[_0x13d1bc(0x148)]+'\x27'),(_0x36b6af[_0x13d1bc(0xb3)]||_0x36b6af['jsonl'])&&await handleSingleObjectOutput(_0x5289bc,_0x36b6af),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0xf7);[a50_0x24004d(0x226)]=a50_0x24004d(0xf9);async[a50_0x24004d(0x251)](_0x48bb3c){const _0x3befd3=a50_0x24004d,{options:_0x41af56,args:_0x49c456,tdx:_0x3290b9}=_0x48bb3c;let _0x39ee6f,_0x260a0b;if(_0x49c456[_0x3befd3(0xdf)]>=0x2)_0x39ee6f=_0x49c456[0x0],_0x260a0b=_0x49c456[0x1];else{if(_0x49c456[_0x3befd3(0xdf)]===0x1&&_0x41af56['workflowProject'])_0x39ee6f=_0x41af56[_0x3befd3(0x1a9)],_0x260a0b=_0x49c456[0x0];else return _0x49c456['length']===0x1?(console['error'](_0x3befd3(0x194)),console[_0x3befd3(0xce)](_0x3befd3(0x1dc)),0x1):(console[_0x3befd3(0xce)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x3befd3(0xce)](_0x3befd3(0x102)),0x1);}_0x41af56[_0x3befd3(0x1e0)]&&(console['error'](_0x3befd3(0x23e)+_0x39ee6f),console[_0x3befd3(0xce)]('Key:\x20'+_0x260a0b));if(!_0x41af56[_0x3befd3(0x1f4)]){if(!isInteractive())return console['error'](a50_0x328f98[_0x3befd3(0x1cb)](_0x3befd3(0x236)),_0x3befd3(0x17f)),console[_0x3befd3(0xce)](a50_0x328f98[_0x3befd3(0x142)](_0x3befd3(0x172))),0x1;const _0x1cc2b9=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x260a0b+_0x3befd3(0x1d6)+_0x39ee6f+'\x27?');if(!_0x1cc2b9)return console[_0x3befd3(0xce)](a50_0x328f98[_0x3befd3(0x1fb)](_0x3befd3(0xb6))),0x1;}const _0x64f6ca=await withSpinner(_0x3befd3(0x1c1),()=>_0x3290b9[_0x3befd3(0x13a)][_0x3befd3(0x14e)](_0x39ee6f,_0x260a0b),{'verbose':_0x41af56['verbose']}),_0xcf7b29=_0x64f6ca['data'];return console[_0x3befd3(0xce)](_0x3befd3(0x1c4)+_0xcf7b29['key']+_0x3befd3(0x186)+_0xcf7b29[_0x3befd3(0x148)]+'\x27'),(_0x41af56[_0x3befd3(0xb3)]||_0x41af56['jsonl'])&&await handleSingleObjectOutput(_0xcf7b29,_0x41af56),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(_0xf4a897){const _0x31d091=a50_0x24004d,_0x3e9f90=Math[_0x31d091(0x20a)](_0xf4a897/0x3e8),_0x250e7b=Math[_0x31d091(0x20a)](_0x3e9f90/0x3c),_0x1f452e=Math['floor'](_0x250e7b/0x3c),_0x51780f=Math[_0x31d091(0x20a)](_0x1f452e/0x18);if(_0x51780f>0x0){const _0x6566f0=_0x1f452e%0x18;return _0x6566f0>0x0?_0x51780f+'d\x20'+_0x6566f0+'h':_0x51780f+'d';}else{if(_0x1f452e>0x0){const _0x5b9dfa=_0x250e7b%0x3c;return _0x5b9dfa>0x0?_0x1f452e+'h\x20'+_0x5b9dfa+'m':_0x1f452e+'h';}else{if(_0x250e7b>0x0){const _0x344951=_0x3e9f90%0x3c;return _0x344951>0x0?_0x250e7b+'m\x20'+_0x344951+'s':_0x250e7b+'m';}else return _0x3e9f90+'s';}}}function formatTimestamp(_0x44697d,_0x537334){const _0x3bb222=a50_0x24004d,_0x359558=new Date(_0x44697d),_0x3b984e=String(_0x359558[_0x3bb222(0x164)]())['padStart'](0x2,'0'),_0x46982d=String(_0x359558[_0x3bb222(0x15f)]())['padStart'](0x2,'0'),_0x42ddf6=_0x3b984e+':'+_0x46982d,_0x20057c=_0x359558['getFullYear']()===_0x537334[_0x3bb222(0x141)]()&&_0x359558[_0x3bb222(0x25e)]()===_0x537334[_0x3bb222(0x25e)]()&&_0x359558['getDate']()===_0x537334[_0x3bb222(0x13f)]();if(_0x20057c)return _0x42ddf6;else{const _0x1203c9=String(_0x359558[_0x3bb222(0x25e)]()+0x1)[_0x3bb222(0x161)](0x2,'0'),_0x2e1c02=String(_0x359558[_0x3bb222(0x13f)]())[_0x3bb222(0x161)](0x2,'0');return _0x1203c9+'-'+_0x2e1c02+'\x20'+_0x42ddf6;}}function formatDate(_0x2f4b47){const _0x1cf731=a50_0x24004d,_0x854011=_0x2f4b47['getFullYear'](),_0x4a2f4c=String(_0x2f4b47[_0x1cf731(0x25e)]()+0x1)[_0x1cf731(0x161)](0x2,'0'),_0x5ad6fc=String(_0x2f4b47['getDate']())[_0x1cf731(0x161)](0x2,'0');return _0x854011+'-'+_0x4a2f4c+'-'+_0x5ad6fc;}function getTaskStateIcon(_0x1f657c){const _0x15a78c={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x15a78c[_0x1f657c]||'⚪';}function getBarChar(_0xcfbff1){const _0x2725e9=a50_0x24004d;return _0xcfbff1===_0x2725e9(0xce)||_0xcfbff1===_0x2725e9(0x25d)?'×':'─';}function getBarColor(_0x580181){const _0x30a32d=a50_0x24004d,_0x536b79={'success':a50_0x328f98['green'],'error':a50_0x328f98[_0x30a32d(0x1cb)],'group_error':a50_0x328f98[_0x30a32d(0x1cb)],'running':a50_0x328f98[_0x30a32d(0x1f1)],'blocked':a50_0x328f98[_0x30a32d(0x1fb)],'planned':a50_0x328f98[_0x30a32d(0x142)],'canceling':a50_0x328f98[_0x30a32d(0x1fb)]};return _0x536b79[_0x580181]||a50_0x328f98[_0x30a32d(0xd6)];}function a50_0x542f(){const _0x1a4d51=['dim','No\x20workflow\x20projects\x20found','\x0aDry\x20run\x20-\x20no\x20project\x20created','done','table','targetExists','projectName','session:','\x0a✔\x20Attempt\x20complete','isArray','Project\x20name\x20is\x20required','size','deleteSecret','readFile','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','pullProject','Show\x20tasks\x20for\x20an\x20attempt','canceling','startedAt','keys','Using\x20attempt\x20','ICON_SPACING','List\x20workflow\x20attempts','requireProject','updatedAt','metadata','start','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','diff','getMinutes','Deleting\x20project\x20','padStart','parse','get','getHours','newProjectName','rows','attemptId','/sessions/','skipValidation','window','from','Retry\x20a\x20session\x20or\x20attempt','resolveProjectDir','Task\x20name:\x20','has','attempts','\x0aPolling...\x20(','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Retrying\x20session...','\x0aDry\x20run\x20-\x20no\x20files\x20written','msPerChar','cancelRequested','✔\x20Push\x20complete','✔\x20Workflow\x20run\x20started','Target:\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','sort','\x0aDry\x20run\x20-\x20nothing\x20pushed','MIN_TIMELINE_WIDTH','Expected\x20format:\x20--param\x20key=value','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','No\x20log\x20content\x20found','✔\x20Showing\x20','workflow:use','Project\x20directory:\x20','\x20\x20Target:\x20','✔\x20Downloaded\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Workflow:\x20','\x20(system)','Kill\x20a\x20running\x20attempt','Writing\x20files...','workflow:clone','startsWith','session_id','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','List\x20workflows','\x20attempt','\x20logs','1897372dnLnnk','No\x20sessions\x20found','Error:\x20Project\x20name\x20is\x20required','1705563FuiBGp','Updating\x20','planned','min','Source:\x20','list','filesExtracted','data','green','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','success','projects','Retrying\x20attempt...','Resume\x20from:\x20','1136082sjZHRN','renderSessionsTimeline','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','projectId','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x0aFailed\x20to\x20fetch\x20attempt\x20data','workflowProject','Force:\x20yes','resolve','message','icon','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Usage:\x20workflow:delete\x20<project-name-or-id>','tasks','Getting\x20attempt\x20details...','🔄\x20','Fetching\x20log\x20files...','Getting\x20attempt\x20tasks...','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','context','\x20new','Target\x20directory:\x20','toLowerCase','Pulling\x20project\x20','text','executeCloneProject','Attempt:\x20','fullName','isNewProject','/attempt/','Deleting\x20secret...','\x20\x20Workflow:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','✔\x20Secret\x20\x27','1662488kBmpqg','find','\x20\x20tdx\x20wf\x20use\x20<project>','preparePushProject','Attempt\x20ID:\x20','Filter:\x20project=','red','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Loading\x20session...','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','split','Status:\x20','📁\x20','Project\x20filter:\x20','createdAt','POLL_INTERVAL_MS','\x20\x20Project\x20ID:\x20','\x27\x20from\x20project\x20\x27','✔\x20Retry\x20started','Include\x20retried:\x20yes','sourceDir','No\x20attempts\x20found\x20for:\x20','some','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','targetDir','sessionId','limit','verbose','workflow:upload','Resolving\x20project\x20\x27','\x22\x20to\x20new\x20project\x20\x22','\x20\x20Session\x20ID:\x20','finishedAt','fs/promises','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','✔\x20Pushed\x20','fromTask',',\x20Workflow:\x20','sys','workflows','lastAttempt','\x1b[1A\x1b[2K','fileSize','fill','blue','navigateSessionsInteractive','Loading\x20workflows...','yes','retryAttemptName','localeCompare','includeRetried','\x20\x20Files\x20extracted:\x20','\x22\x20already\x20exists\x20(ID:\x20','.\x20Expected\x20format:\x20KEY=VALUE','yellow','new','Killing\x20attempt...','Auto-selected\x20latest\x20session:\x20','logFiles','MAX_TASKS_DISPLAY','session','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','parseProjectWorkflowPattern','workflow:sessions','Including\x20subtasks:\x20yes','8kAKidA','\x20modified','resumeFrom','Validation:\x20skipped','floor','workflowName','follow','workflow:push','stat','duration','Session\x20time:\x20','Total:\x20','→\x20New\x20project:\x20','resolveProjectId','modified','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','✔\x20Deleted\x20project\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','No\x20sessions\x20found\x20in\x20project:\x20','state','splice','buildTimelineData','listSecrets','1667420omVyvZ','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','startTime','clear','...','durationMs','\x20\x20New\x20attempt\x20ID:\x20','Parameters:\x20','workflow:attempts','description','275496XfrGjc','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','replace','dryRun','prepareCloneProject','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','Files\x20to\x20upload:\x20','\x0aPush\x20these\x20changes?','Cloning\x20to\x20','3082760NwkSMp','workflow:workflows','jsonl','Output\x20directory:\x20','✔\x20Pull\x20complete','\x22?\x20This\x20cannot\x20be\x20undone.','\x0aError:','\x20from\x20session\x20','No\x20workflow\x20tdx.json\x20found','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20is\x20not\x20a\x20directory','status','write','renderTimeline','Project:\x20','cwd','\x20deleted','sessions','Params:\x20','repeat','reason','\x20unchanged','resolveProject','includes','\x20\x20Source:\x20','format','isDirectory','\x0aUpdate\x20existing\x20project\x20\x22','sessionTime','executePushProject','✔\x20Project\x20updated','No\x20matching\x20sessions\x20found','Pattern:\x20','execute','\x20\x20Revision:\x20','Error:','7rFoJeB','✔\x20Workflow\x20project\x20set\x20to:\x20','Tip:\x20cd\x20to\x20workflows/','retrySession','Error:\x20Attempt\x20ID\x20is\x20required','project','Reason:\x20','params','No\x20sessions\x20found\x20for:\x20','group_error','getMonth','workflow:timeline','stringify','\x20\x20Changes:\x20','task','No\x20workflows\x20found\x20in\x20project:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','json','Dry\x20run:\x20yes','\x20-\x20','Cancelled','Source\x20project:\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','(unknown)','\x20\x20Console:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Location:\x20','\x20sessions\x20','Listing\x20workflow\x20projects...','now','tdx.json','workflow:tasks','round','logs','📋\x20','filter','New\x20project\x20name:\x20','MAX_LABEL_COUNT','all','kill','sourceProjectName','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20\x20Session\x20context\x20set\x20to:\x20','Warning:','error','Setting\x20secret...','existingProjectId','\x0aApply\x20these\x20changes?','GUTTER','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','setSecret','\x20\x20Project:\x20','white','⚠\x20Showing\x20first\x20','Invalid\x20format:\x20','run','Filter:\x20','pollTimeline','Key\x20cannot\x20be\x20empty','No\x20attempts\x20found\x20in\x20project:\x20','revision','length','value','isTTY','type','delete','changes','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Starting\x20workflow\x20run...','key','Listing\x20workflows...','Source\x20directory\x20is\x20required','\x20(use\x20--limit\x20to\x20show\x20more)','Pushing\x20project...','Error:\x20','Downloading\x20project\x20','end','workflow:kill','name','renderSingleTimeline','summary','No\x20attempts\x20found','Analyzing\x20changes...','includeSubtasks','workflow:secrets:delete','map','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','set','log','✔\x20Project:\x20','substring','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','relative','Error:\x20KEY=VALUE\x20is\x20required','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','LABEL_MIN_SPACING','deleted','applyPullProject','MIN_LABEL_COUNT','unknown','Source\x20directory:\x20','workflow:logs','path','trimEnd','Listing\x20workflow\x20attempts...','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','attempt','From\x20task:\x20','workflow:secrets:set','List\x20all\x20workflow\x20projects','Pushing\x20workflow\x20project...','MAX_TIMELINE_WIDTH','\x20tasks','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','getTime','push','ICON_WIDTH','newProjectId','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','💡\x20Tip:\x20Use\x20','Downloading\x20logs...','No\x20log\x20files\x20found\x20for\x20this\x20attempt','-\x20no\x20files\x20written','total','columns','join','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','pending','max','Latest\x20session\x20has\x20no\x20attempt','List\x20workflow\x20execution\x20sessions','\x20project','unchanged','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','param','Session\x20not\x20found:\x20','1DkTTVC','match','\x20of\x20','hasChanges','---\x20','select','stdout','Revision:\x20','output','cyan','running','site','✔\x20Found\x20','showWorkflowConsoleUrl','workflow','LABEL_WIDTH_DIVISOR','✔\x20Workflow\x20project\x20context\x20cleared.','workflow:projects','\x0aClone\x20\x22','getDate','No\x20sessions\x20with\x20timing\x20information','getFullYear'];a50_0x542f=function(){return _0x1a4d51;};return a50_0x542f();}function parseTaskName(_0x7724a2){const _0x370453=a50_0x24004d;let _0xb6f700=_0x7724a2[_0x370453(0x229)](/^\++/,'');const _0x2651ef=_0xb6f700[_0x370453(0x1cf)]('+'),_0x414724=_0x2651ef['length']>0x1?_0x2651ef['length']-0x2:0x0,_0x45d17d=_0x2651ef[_0x2651ef[_0x370453(0xdf)]-0x1]||_0xb6f700;return{'level':_0x414724,'name':'+'+_0x45d17d};}function truncateTaskName(_0x5f1059,_0x210393){const _0xc6fc39=a50_0x24004d,_0x1a2562=stringWidth(_0x5f1059);if(_0x1a2562<=_0x210393)return _0x5f1059;let _0x13842c=_0x5f1059;while(stringWidth(_0x13842c+'…')>_0x210393&&_0x13842c[_0xc6fc39(0xdf)]>0x0){_0x13842c=_0x13842c['slice'](0x0,-0x1);}return _0x13842c+'…';}function calculateTimeScale(_0x3a6ccb,_0x236a5c){const _0x592aa3=a50_0x24004d;return{'startTime':_0x3a6ccb[_0x592aa3(0x15c)],'endTime':_0x3a6ccb[_0x592aa3(0xef)],'durationMs':_0x3a6ccb['duration'],'msPerChar':_0x3a6ccb[_0x592aa3(0x20f)]/_0x236a5c};}function timeToPosition(_0x4089b1,_0x632c24,_0x1fd480){const _0x4e84fb=a50_0x24004d,_0x407145=_0x4089b1-_0x632c24['startTime'],_0x58a88a=Math[_0x4e84fb(0x20a)](_0x407145/_0x632c24[_0x4e84fb(0x175)]);return Math[_0x4e84fb(0x124)](0x0,Math[_0x4e84fb(0x198)](_0x58a88a,_0x1fd480));}function renderTimeAxis(_0x2df836,_0x558b9b){const _0x5059f4=a50_0x24004d,_0x129477=Math[_0x5059f4(0x198)](TIMELINE_CONFIG[_0x5059f4(0xc7)],Math['max'](TIMELINE_CONFIG[_0x5059f4(0x106)],Math[_0x5059f4(0x20a)](_0x558b9b/TIMELINE_CONFIG[_0x5059f4(0x13b)]))),_0x2e1136=_0x2df836[_0x5059f4(0x222)]/(_0x129477-0x1),_0x1bfd14=new Date(_0x2df836[_0x5059f4(0x21f)]),_0x20ddb9=[];for(let _0x12842a=0x0;_0x12842a<_0x129477;_0x12842a++){const _0x24facb=_0x2df836[_0x5059f4(0x21f)]+_0x12842a*_0x2e1136,_0x23ad19=timeToPosition(_0x24facb,_0x2df836,_0x558b9b),_0x4bdd44=formatTimestamp(_0x24facb,_0x1bfd14);_0x20ddb9[_0x5059f4(0x117)]({'pos':_0x23ad19,'text':_0x4bdd44});}const _0x5d2458=new Array(_0x558b9b)[_0x5059f4(0x1f0)]('\x20');let _0x40bbb1=-0x1;for(const {pos:_0x554d51,text:_0xfa4eb7}of _0x20ddb9){let _0x58a287=Math[_0x5059f4(0x124)](0x0,_0x554d51-Math[_0x5059f4(0x20a)](_0xfa4eb7['length']/0x2));_0x58a287<=_0x40bbb1+TIMELINE_CONFIG[_0x5059f4(0x103)]&&(_0x58a287=_0x40bbb1+TIMELINE_CONFIG[_0x5059f4(0x103)]+0x1);_0x58a287+_0xfa4eb7[_0x5059f4(0xdf)]>_0x558b9b&&(_0x58a287=_0x558b9b-_0xfa4eb7['length']);if(_0x58a287>=0x0&&_0x58a287+_0xfa4eb7[_0x5059f4(0xdf)]<=_0x558b9b&&_0x58a287>_0x40bbb1){for(let _0x3e1e6c=0x0;_0x3e1e6c<_0xfa4eb7[_0x5059f4(0xdf)];_0x3e1e6c++){_0x5d2458[_0x58a287+_0x3e1e6c]=_0xfa4eb7[_0x3e1e6c];}_0x40bbb1=_0x58a287+_0xfa4eb7[_0x5059f4(0xdf)]-0x1;}}return _0x5d2458[_0x5059f4(0x121)]('');}function renderTaskRow(_0x16c16e,_0x4e3976,_0x47fc5b,_0x2a798b){const _0x31b5e0=a50_0x24004d,{level:_0x482478,name:_0xeee208}=parseTaskName(_0x16c16e[_0x31b5e0(0xf1)]),_0x226ba2='\x20'['repeat'](_0x482478),_0x266ccc=_0x16c16e[_0x31b5e0(0x16a)]?'('+formatElapsed(_0x16c16e[_0x31b5e0(0x16a)]['duration'])+')':'',_0x4ab57e=stringWidth(_0x266ccc),_0x7ad434=_0x482478*0x1,_0x445d65=_0x2a798b-_0x7ad434-_0x4ab57e-0x1,_0x3d1525=truncateTaskName(_0xeee208,_0x445d65),_0x2faeac=_0x226ba2+_0x3d1525,_0x96b43a=stringWidth(_0x2faeac),_0x4988cd=_0x2a798b-_0x96b43a-_0x4ab57e,_0x564655=_0x2faeac+'\x20'[_0x31b5e0(0x243)](Math[_0x31b5e0(0x124)](0x1,_0x4988cd))+a50_0x328f98[_0x31b5e0(0x142)](_0x266ccc),_0x5822c0=getTaskStateIcon(_0x16c16e[_0x31b5e0(0x219)]),_0x14ca2d=new Array(_0x47fc5b)[_0x31b5e0(0x1f0)]('\x20');if(_0x16c16e['window']){const _0x248486=timeToPosition(_0x16c16e[_0x31b5e0(0x16a)]['start'],_0x4e3976,_0x47fc5b),_0x4f8a06=timeToPosition(_0x16c16e[_0x31b5e0(0x16a)][_0x31b5e0(0xef)],_0x4e3976,_0x47fc5b),_0xc2dcce=getBarChar(_0x16c16e['state']),_0x98f0d7=Math[_0x31b5e0(0x124)](_0x248486+0x1,_0x4f8a06);for(let _0x50748a=_0x248486;_0x50748a<Math[_0x31b5e0(0x198)](_0x98f0d7,_0x47fc5b);_0x50748a++){_0x14ca2d[_0x50748a]=_0xc2dcce;}}const _0x52b0bd=getBarColor(_0x16c16e[_0x31b5e0(0x219)]),_0x20cb12=_0x14ca2d[_0x31b5e0(0xf8)](_0x11edcb=>_0x11edcb==='\x20'?'\x20':_0x52b0bd(_0x11edcb))['join']('');return _0x5822c0+'\x20'+_0x564655+'│'+_0x20cb12+'│';}function calculateStats(_0xfedb3f){const _0x10981e=a50_0x24004d,_0x448424={'total':_0xfedb3f[_0x10981e(0xdf)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x36c5ef of _0xfedb3f){if(_0x36c5ef[_0x10981e(0x219)]===_0x10981e(0x19f))_0x448424[_0x10981e(0x19f)]++;else{if(_0x36c5ef[_0x10981e(0x219)]===_0x10981e(0xce)||_0x36c5ef[_0x10981e(0x219)]===_0x10981e(0x25d))_0x448424['error']++;else _0x36c5ef[_0x10981e(0x219)]==='running'?_0x448424[_0x10981e(0x136)]++:_0x448424[_0x10981e(0x123)]++;}}return _0x448424;}function formatStats(_0x2bfb61){const _0x50a88c=a50_0x24004d;return[_0x50a88c(0x211)+_0x2bfb61[_0x50a88c(0x11f)],'✅\x20'+_0x2bfb61[_0x50a88c(0x19f)],'❌\x20'+_0x2bfb61[_0x50a88c(0xce)],_0x50a88c(0x1b2)+_0x2bfb61[_0x50a88c(0x136)],'⏳\x20'+_0x2bfb61['pending']]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a50_0x24004d(0xf1)]=a50_0x24004d(0x25f);['description']=a50_0x24004d(0x115);async['execute'](_0x2e48e5){const _0x5e1ce2=a50_0x24004d,{options:_0x39a3b7,args:_0x1189ac,tdx:_0x47cc4f}=_0x2e48e5;let _0x21afff,_0x523477,_0x4637fd=![];if(_0x1189ac[0x0]){if(_0x1189ac[0x0][_0x5e1ce2(0x247)]('.')){const _0x2a8560=this[_0x5e1ce2(0x203)](_0x1189ac,_0x39a3b7);if(!_0x2a8560)return 0x1;_0x21afff=_0x2a8560[_0x5e1ce2(0x148)],_0x523477=_0x2a8560[_0x5e1ce2(0x20b)];}else{_0x523477=_0x1189ac[0x0],_0x21afff=_0x39a3b7[_0x5e1ce2(0x1a9)];if(!_0x21afff)return console[_0x5e1ce2(0xce)](a50_0x328f98[_0x5e1ce2(0x1cb)](_0x5e1ce2(0x253)),_0x5e1ce2(0xbb)),0x1;_0x4637fd=!![];}}else{const _0x62f2de=this[_0x5e1ce2(0x203)](_0x1189ac,_0x39a3b7);if(!_0x62f2de)return 0x1;_0x21afff=_0x62f2de[_0x5e1ce2(0x148)],_0x523477=_0x62f2de[_0x5e1ce2(0x20b)];}if(_0x39a3b7[_0x5e1ce2(0x1e0)]){if(_0x21afff&&_0x523477)console[_0x5e1ce2(0xce)](_0x5e1ce2(0xda)+_0x21afff+'.'+_0x523477);else _0x21afff&&console['error']('Filter:\x20project='+_0x21afff);}const _0x381248=_0x39a3b7[_0x5e1ce2(0x167)],_0x44c78a=_0x39a3b7['sessionId'];if(_0x381248){_0x44c78a&&console[_0x5e1ce2(0xce)](a50_0x328f98['yellow'](_0x5e1ce2(0xcd)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x3faeaa=_0x39a3b7[_0x5e1ce2(0x20c)];return _0x3faeaa?await this[_0x5e1ce2(0xdb)](_0x2e48e5,_0x381248):await this[_0x5e1ce2(0xf2)](_0x2e48e5,_0x381248,_0x39a3b7),0x0;}if(_0x44c78a){const _0x14f0c9=await withSpinner(_0x5e1ce2(0x1cd),()=>_0x47cc4f[_0x5e1ce2(0x13a)][_0x5e1ce2(0x241)]({'projectName':_0x21afff,'workflowName':_0x523477,'limit':0x64}),{'verbose':_0x39a3b7[_0x5e1ce2(0x1e0)]}),_0x13c072=_0x14f0c9[_0x5e1ce2(0x19c)]['find'](_0x4fa3fd=>_0x4fa3fd['id']===_0x44c78a);if(!_0x13c072)return console['error'](a50_0x328f98[_0x5e1ce2(0x1cb)](_0x5e1ce2(0x253)),_0x5e1ce2(0x12b)+_0x44c78a),0x1;if(!_0x13c072[_0x5e1ce2(0x1ed)]?.['id'])return console[_0x5e1ce2(0xce)](a50_0x328f98[_0x5e1ce2(0x1cb)](_0x5e1ce2(0x253)),'Session\x20'+_0x44c78a+'\x20has\x20no\x20attempts'),0x1;const _0x46b3aa=_0x13c072[_0x5e1ce2(0x1ed)]['id'];_0x39a3b7[_0x5e1ce2(0x1e0)]&&console[_0x5e1ce2(0xce)](_0x5e1ce2(0x156)+_0x46b3aa+_0x5e1ce2(0x237)+_0x44c78a);const _0x2db825=_0x39a3b7[_0x5e1ce2(0x20c)];return _0x2db825?await this[_0x5e1ce2(0xdb)](_0x2e48e5,_0x46b3aa):await this[_0x5e1ce2(0xf2)](_0x2e48e5,_0x46b3aa,_0x39a3b7),0x0;}const _0x54cbb9=await withSpinner('Loading\x20sessions...',()=>_0x47cc4f['workflow'][_0x5e1ce2(0x241)]({'projectName':_0x21afff,'workflowName':_0x523477,'limit':_0x39a3b7[_0x5e1ce2(0x1df)]||0x32}),{'verbose':_0x39a3b7[_0x5e1ce2(0x1e0)]}),_0x27543b=_0x54cbb9[_0x5e1ce2(0x19c)];if(_0x27543b[_0x5e1ce2(0xdf)]===0x0){if(_0x21afff&&_0x523477)console['error'](_0x5e1ce2(0x25c)+_0x21afff+'.'+_0x523477);else _0x21afff?console[_0x5e1ce2(0xce)](_0x5e1ce2(0x218)+_0x21afff):(console[_0x5e1ce2(0xce)]('No\x20workflow\x20sessions\x20found'),console['error'](a50_0x328f98[_0x5e1ce2(0x142)](_0x5e1ce2(0x17a))));return 0x0;}_0x27543b[_0x5e1ce2(0x17b)]((_0xee8e13,_0x762549)=>{const _0x376032=_0x5e1ce2,_0x52d39b=_0xee8e13[_0x376032(0x24c)]||'',_0x1fb925=_0x762549[_0x376032(0x24c)]||'';return _0x1fb925['localeCompare'](_0x52d39b);});if(_0x39a3b7[_0x5e1ce2(0xb3)]||_0x39a3b7[_0x5e1ce2(0x232)])return await handleSDKOutput(_0x27543b,_0x39a3b7),0x0;let _0x20cb6f;if(_0x4637fd){const _0x3ad064=_0x27543b[0x0];if(!_0x3ad064[_0x5e1ce2(0x1ed)]?.['id'])return console[_0x5e1ce2(0xce)](_0x5e1ce2(0x125)),0x0;_0x20cb6f=_0x3ad064['lastAttempt']['id'],_0x39a3b7['verbose']&&console[_0x5e1ce2(0xce)](_0x5e1ce2(0x1fe)+_0x3ad064[_0x5e1ce2(0x24c)]);}else{const _0x551508=_0x27543b[_0x5e1ce2(0xf8)](_0x246a85=>{const _0x5515e3=_0x5e1ce2,_0x417508=getAttemptStatusDisplay(_0x246a85[_0x5515e3(0x1ed)]);return{'title':_0x246a85['project']?.[_0x5515e3(0xf1)]+'.'+_0x246a85['workflow']?.[_0x5515e3(0xf1)]+'\x20-\x20'+_0x246a85[_0x5515e3(0x24c)]+'\x20'+_0x417508[_0x5515e3(0x1ad)],'value':_0x246a85[_0x5515e3(0x1ed)]?.['id']||'','description':_0x417508[_0x5515e3(0x1bb)]};}),_0x46b48f=await a50_0x245fe1({'type':'select','name':_0x5e1ce2(0x167),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x551508[_0x5e1ce2(0xc5)](_0x3b3872=>_0x3b3872[_0x5e1ce2(0xe0)]!=='')});if(!_0x46b48f[_0x5e1ce2(0x167)])return 0x0;_0x20cb6f=_0x46b48f['attemptId'];}const _0x4c73f6=_0x39a3b7[_0x5e1ce2(0x20c)];return _0x4c73f6?await this[_0x5e1ce2(0xdb)](_0x2e48e5,_0x20cb6f):await this['renderSingleTimeline'](_0x2e48e5,_0x20cb6f,_0x39a3b7),0x0;}async[a50_0x24004d(0xf2)](_0x640e3f,_0x10c11c,_0x49487b){const _0x243d5f=a50_0x24004d,{tdx:_0x136807}=_0x640e3f;let _0x43e5ad,_0x3a4ba0;try{[_0x43e5ad,_0x3a4ba0]=await Promise[_0x243d5f(0xc8)]([_0x136807[_0x243d5f(0x13a)][_0x243d5f(0x10e)](_0x10c11c),_0x136807[_0x243d5f(0x13a)][_0x243d5f(0x1b0)](_0x10c11c,![])]);}catch(_0x1c72b4){console[_0x243d5f(0xce)](a50_0x328f98[_0x243d5f(0x1cb)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x49487b['verbose']&&console['error'](_0x1c72b4);throw _0x1c72b4;}if(_0x49487b[_0x243d5f(0xb3)]||_0x49487b[_0x243d5f(0x232)]){const _0x13ba93=this[_0x243d5f(0x21b)](_0x43e5ad,_0x3a4ba0);await handleSDKOutput([_0x13ba93],_0x49487b);return;}const _0x42a638=_0x136807[_0x243d5f(0x1b6)]['site'],_0x80d76d=this[_0x243d5f(0x23d)](_0x43e5ad,_0x3a4ba0,_0x42a638);console[_0x243d5f(0xfb)](_0x80d76d);}async['pollTimeline'](_0x241350,_0x2b71d1){const _0x58686f=a50_0x24004d,{tdx:_0x4e85ac}=_0x241350,_0x20f546=TIMELINE_CONFIG[_0x58686f(0x1d4)],_0x493b26=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x1f51c6=0x0;while(_0x1f51c6<_0x493b26){process[_0x58686f(0x132)][_0x58686f(0xe1)]&&process[_0x58686f(0x132)][_0x58686f(0x23c)]('\x1bc');let _0x126351,_0x2e95f2;try{[_0x126351,_0x2e95f2]=await Promise[_0x58686f(0xc8)]([_0x4e85ac['workflow'][_0x58686f(0x10e)](_0x2b71d1),_0x4e85ac[_0x58686f(0x13a)]['tasks'](_0x2b71d1,![])]);}catch(_0x4dc04e){console['error'](a50_0x328f98[_0x58686f(0x1cb)](_0x58686f(0x1a8)));_0x1f51c6>0x0&&console[_0x58686f(0xce)](a50_0x328f98[_0x58686f(0x142)](_0x58686f(0xff)+_0x1f51c6));throw _0x4dc04e;}const _0x123125=_0x4e85ac[_0x58686f(0x1b6)][_0x58686f(0x137)],_0x4e9e69=this[_0x58686f(0x23d)](_0x126351,_0x2e95f2,_0x123125);console[_0x58686f(0xfb)](_0x4e9e69);const _0x35d666=_0x126351['done']&&_0x2e95f2['every'](_0x30638f=>_0x30638f[_0x58686f(0x219)]!==_0x58686f(0x136)&&_0x30638f['state']!=='planned');if(_0x35d666){console['error'](a50_0x328f98[_0x58686f(0x19d)](_0x58686f(0x14a)));break;}console[_0x58686f(0xce)](a50_0x328f98['dim'](_0x58686f(0x171)+_0x1f51c6*0x2+_0x58686f(0xb2))),await new Promise(_0x594df0=>setTimeout(_0x594df0,_0x20f546)),_0x1f51c6++;}_0x1f51c6>=_0x493b26&&console[_0x58686f(0xce)](a50_0x328f98[_0x58686f(0x1fb)](_0x58686f(0xe5)));}[a50_0x24004d(0x23d)](_0x58a7c6,_0x1d2f1c,_0x3e202d){const _0x27a5b0=a50_0x24004d,_0x39ac7e=[],_0x27829b=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x35ad57=0x5,_0x30f6f5=process[_0x27a5b0(0x132)][_0x27a5b0(0x120)]||0x78,_0x122249=_0x30f6f5-_0x27829b-_0x35ad57,_0x1b5037=Math['max'](TIMELINE_CONFIG[_0x27a5b0(0x17d)],Math[_0x27a5b0(0x198)](_0x122249,TIMELINE_CONFIG[_0x27a5b0(0x113)])),_0x4daee4=new Date(_0x58a7c6[_0x27a5b0(0x1d3)])[_0x27a5b0(0x116)](),_0x436325=_0x58a7c6[_0x27a5b0(0x1e5)]?new Date(_0x58a7c6[_0x27a5b0(0x1e5)])[_0x27a5b0(0x116)]():Date[_0x27a5b0(0xbf)](),_0x3f0cf1={'start':_0x4daee4,'end':_0x436325,'duration':_0x436325-_0x4daee4},_0x36410=new Map(),_0x3f7f79=[];for(const _0x43e159 of _0x1d2f1c){if(_0x43e159[_0x27a5b0(0x154)]){const _0x2c879f=new Date(_0x43e159[_0x27a5b0(0x154)])['getTime'](),_0x2a189a=_0x43e159['updatedAt']?new Date(_0x43e159[_0x27a5b0(0x15a)])[_0x27a5b0(0x116)]():Date[_0x27a5b0(0xbf)](),_0x35f3f5={'start':_0x2c879f,'end':_0x2a189a,'duration':_0x2a189a-_0x2c879f};_0x36410[_0x27a5b0(0xfa)](_0x43e159['id'],_0x35f3f5),_0x3f7f79['push']({'name':_0x43e159[_0x27a5b0(0x1be)],'state':_0x43e159[_0x27a5b0(0x219)]||_0x27a5b0(0x107),'window':_0x35f3f5});}else _0x3f7f79[_0x27a5b0(0x117)]({'name':_0x43e159[_0x27a5b0(0x1be)],'state':_0x43e159[_0x27a5b0(0x219)]||_0x27a5b0(0x197),'window':undefined});}_0x3f7f79[_0x27a5b0(0x17b)]((_0x33f2bc,_0x1190b9)=>{const _0x243168=_0x27a5b0;if(!_0x33f2bc[_0x243168(0x16a)])return 0x1;if(!_0x1190b9[_0x243168(0x16a)])return-0x1;return _0x33f2bc[_0x243168(0x16a)][_0x243168(0x15c)]-_0x1190b9['window'][_0x243168(0x15c)];});const _0x1ae6b8=_0x3f7f79[_0x27a5b0(0xdf)],_0x5694fb=_0x1ae6b8>TIMELINE_CONFIG[_0x27a5b0(0x200)];_0x5694fb&&_0x3f7f79[_0x27a5b0(0x21a)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x543433=calculateTimeScale(_0x3f0cf1,_0x1b5037),_0x2f37a9=_0x58a7c6[_0x27a5b0(0x145)]?_0x58a7c6['success']?a50_0x328f98[_0x27a5b0(0x19d)](_0x27a5b0(0x19f)):a50_0x328f98[_0x27a5b0(0x1cb)](_0x27a5b0(0xce)):a50_0x328f98['blue'](_0x27a5b0(0x136)),_0x576ecf=_0x58a7c6['project']?.['id'],_0x3ec7ef=_0x58a7c6[_0x27a5b0(0x1de)];let _0x1b0d9b;if(_0x576ecf&&_0x3ec7ef){const _0x2ff56=getWorkflowAttemptUrl(_0x3e202d,_0x576ecf,_0x3ec7ef,_0x58a7c6['id']);_0x1b0d9b=hyperlink(a50_0x328f98[_0x27a5b0(0x142)](_0x58a7c6['id']),_0x2ff56);}else _0x1b0d9b=a50_0x328f98[_0x27a5b0(0x142)](_0x58a7c6['id']);_0x39ac7e['push'](_0x27a5b0(0x1bd)+_0x1b0d9b+_0x27a5b0(0xb5)+_0x2f37a9+_0x27a5b0(0xb5)+formatElapsed(_0x3f0cf1['duration']));if(_0x3f7f79['length']>0x0){const _0x12c5d8=renderTimeAxis(_0x543433,_0x1b5037),_0x34b374=new Date(_0x3f0cf1[_0x27a5b0(0x15c)]),_0x57d8b0=formatDate(_0x34b374),_0x49f5f9=TIMELINE_CONFIG[_0x27a5b0(0x118)]+TIMELINE_CONFIG['ICON_SPACING']+_0x27829b,_0x39e9c5=_0x57d8b0[_0x27a5b0(0x161)](_0x49f5f9),_0x56b1c3=a50_0x328f98[_0x27a5b0(0x142)](_0x39e9c5);_0x39ac7e[_0x27a5b0(0x117)](_0x56b1c3+'\x20'+_0x12c5d8);for(const _0x3bb9f8 of _0x3f7f79){_0x39ac7e[_0x27a5b0(0x117)](renderTaskRow(_0x3bb9f8,_0x543433,_0x1b5037,_0x27829b));}const _0x5ec891=calculateStats(_0x3f7f79);_0x39ac7e['push'](formatStats(_0x5ec891)),_0x5694fb&&_0x39ac7e[_0x27a5b0(0x117)](a50_0x328f98[_0x27a5b0(0x1fb)](_0x27a5b0(0xd7)+TIMELINE_CONFIG[_0x27a5b0(0x200)]+_0x27a5b0(0x12e)+_0x1ae6b8+_0x27a5b0(0x114))),_0x39ac7e[_0x27a5b0(0x117)](''),_0x39ac7e[_0x27a5b0(0x117)](a50_0x328f98[_0x27a5b0(0x142)](_0x27a5b0(0x11b))+('tdx\x20wf\x20attempt\x20'+_0x58a7c6['id']+_0x27a5b0(0x191))+a50_0x328f98[_0x27a5b0(0x142)]('\x20to\x20see\x20detailed\x20logs'));}else _0x39ac7e[_0x27a5b0(0x117)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x39ac7e[_0x27a5b0(0x121)]('\x0a');}['buildTimelineData'](_0x161867,_0x17314c){const _0x1817c2=a50_0x24004d,_0x58aaae=new Date(_0x161867[_0x1817c2(0x1d3)])[_0x1817c2(0x116)](),_0x1e47c4=_0x161867[_0x1817c2(0x1e5)]?new Date(_0x161867[_0x1817c2(0x1e5)])[_0x1817c2(0x116)]():Date[_0x1817c2(0xbf)](),_0x4689ee=_0x1e47c4-_0x58aaae,_0x226e0e=[];for(const _0x5d284e of _0x17314c){if(_0x5d284e[_0x1817c2(0x154)]){const _0x2e43ef=new Date(_0x5d284e[_0x1817c2(0x154)])['getTime'](),_0xdffcfe=_0x5d284e['updatedAt']?new Date(_0x5d284e['updatedAt'])['getTime']():Date[_0x1817c2(0xbf)]();_0x226e0e[_0x1817c2(0x117)]({'name':_0x5d284e[_0x1817c2(0x1be)],'state':_0x5d284e[_0x1817c2(0x219)]||_0x1817c2(0x107),'window':{'start':_0x2e43ef,'end':_0xdffcfe,'duration':_0xdffcfe-_0x2e43ef}});}else _0x226e0e[_0x1817c2(0x117)]({'name':_0x5d284e['fullName'],'state':_0x5d284e[_0x1817c2(0x219)]||_0x1817c2(0x197),'window':undefined});}const _0x2253f2=calculateStats(_0x226e0e);return{'attempt':{'id':_0x161867['id'],'status':_0x161867[_0x1817c2(0x145)]?_0x161867[_0x1817c2(0x19f)]?'success':_0x1817c2(0xce):_0x1817c2(0x136),'createdAt':_0x161867[_0x1817c2(0x1d3)],'finishedAt':_0x161867['finishedAt'],'duration_ms':_0x4689ee},'tasks':_0x226e0e[_0x1817c2(0xf8)](_0x1985ba=>({'name':_0x1985ba[_0x1817c2(0xf1)],'state':_0x1985ba[_0x1817c2(0x219)],'startedAt':_0x1985ba[_0x1817c2(0x16a)]?new Date(_0x1985ba[_0x1817c2(0x16a)][_0x1817c2(0x15c)])['toISOString']():null,'updatedAt':_0x1985ba[_0x1817c2(0x16a)]?new Date(_0x1985ba['window']['end'])['toISOString']():null,'duration_ms':_0x1985ba[_0x1817c2(0x16a)]?.[_0x1817c2(0x20f)]||null})),'stats':_0x2253f2};}}
|
|
1
|
+
const a50_0x3913c0=a50_0x1ab4;(function(_0x554a0a,_0xa9acda){const _0x5deab7=a50_0x1ab4,_0x5aa671=_0x554a0a();while(!![]){try{const _0x14a62d=parseInt(_0x5deab7(0x271))/0x1*(-parseInt(_0x5deab7(0x1fb))/0x2)+parseInt(_0x5deab7(0x296))/0x3*(parseInt(_0x5deab7(0x174))/0x4)+-parseInt(_0x5deab7(0x2cc))/0x5+-parseInt(_0x5deab7(0x252))/0x6+-parseInt(_0x5deab7(0x2ec))/0x7+parseInt(_0x5deab7(0x2a5))/0x8+parseInt(_0x5deab7(0x308))/0x9*(parseInt(_0x5deab7(0x251))/0xa);if(_0x14a62d===_0xa9acda)break;else _0x5aa671['push'](_0x5aa671['shift']());}catch(_0x55b73c){_0x5aa671['push'](_0x5aa671['shift']());}}}(a50_0x31cb,0x7ec0d));import a50_0x3545cd from'chalk';import{existsSync}from'fs';function a50_0x31cb(){const _0x3135ae=['Project\x20name:\x20','green','filter','index','Starting\x20workflow\x20run...','ICON_SPACING','MAX_POLL_ITERATIONS','MAX_TASKS_DISPLAY','\x20is\x20not\x20a\x20directory','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Show\x20tasks\x20for\x20an\x20attempt','Invalid\x20format:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','generateSessionTimelineRows','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','attemptId','Select\x20a\x20session\x20to\x20view\x20timeline:','displayLine','cwd','navigateSessionsInteractive','values','\x0aDry\x20run\x20-\x20no\x20project\x20created','resolve','log','pending','hasChanges','Error:\x20Invalid\x20parameter\x20format:\x20','3966370cCtoYg','2861694dodAfE','Downloading\x20project\x20','workflow:push','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20modified','Deleting\x20project\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','group_error','MIN_TIMELINE_WIDTH','workflow:secrets:set','context','\x20new','value','\x0a✔\x20Already\x20up\x20to\x20date','workflow:attempts','changes','Pushing\x20project...','💡\x20Tip:\x20Use\x20','\x22?\x20This\x20cannot\x20be\x20undone.','sessions','getTime','/app/workflows/','Killing\x20attempt...','workflow:projects','includeRetried','projectId','No\x20sessions\x20with\x20timing\x20information','workflowName','cyan','isArray','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','163GzNxhJ','min','listSecrets','workflow:logs','session:','name','Updating\x20','sourceDir','targetDir','\x20deleted','prepareCloneProject','renderSessionsTimeline','stat','Deleting\x20secret...','red','workflow:clone','\x20\x20Session\x20context\x20set\x20to:\x20','summary','workflow:kill','getDate','force','list','table','sessionId','LABEL_WIDTH_DIVISOR','renderTimeline','\x20attempt','Workflow:\x20','showWorkflowConsoleUrl','type','sort','\x0a✔\x20No\x20changes\x20to\x20push','Setting\x20secret...','yellow','workflow:workflows','Writing\x20files...','isNewProject','12OXCxps','Loading\x20sessions...','Warning:','workflow:tasks','workflow:delete','Tip:\x20cd\x20to\x20workflows/','task','⚠\x20Showing\x20first\x20','TASK_NAME_WIDTH','-\x20no\x20files\x20written','existingProjectId','✔\x20Workflow\x20run\x20started','attempt:','Source:\x20','Session\x20not\x20found:\x20','7710888RDiYnO','Downloading\x20logs...','params','Failed\x20to\x20fetch\x20attempt\x20data','deleteSecret','json','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x20unchanged','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20Target:\x20','\x20\x20tdx\x20wf\x20use\x20<project>','\x20workflow','write','resolveProject','Listing\x20workflow\x20attempts...','...','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','state','\x20task','fill','unknown','duration','Retrying\x20session...','preparePushProject','getMonth','✔\x20Secret\x20\x27','\x20project','workflow:retry','MAX_LABEL_COUNT','finishedAt','pollTimeline','workflowProject','renderSingleTimeline','No\x20matching\x20sessions\x20found','No\x20attempts\x20found\x20in\x20project:\x20','Force:\x20yes','Project\x20directory:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','\x20\x20Changes:\x20','3600105IAgOlJ','No\x20sessions\x20found','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Parameters:\x20','(use\x20--limit\x20to\x20see\x20more)','metadata','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','param','from','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','find','\x1b[1A\x1b[2K','ICON_WIDTH','logFiles','\x0aPush\x20these\x20changes?','padStart','status','No\x20workflow\x20sessions\x20found','path','Including\x20subtasks:\x20yes','Include\x20retried:\x20yes','\x20logs','revision','get','unchanged','data','size','Revision:\x20','Source\x20directory:\x20','startTime','verbose','getHours','5237575ZkbNvh','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','applyPullProject','resolveProjectId','dryRun','Key\x20cannot\x20be\x20empty','\x20sessions\x20','\x20secret','Source\x20directory\x20is\x20required','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','LABEL_MIN_SPACING','No\x20workflow\x20projects\x20found','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','executeCloneProject','match','\x0a✔\x20Attempt\x20complete','set','\x0aPolling...\x20(','Attempt\x20ID:\x20','No\x20projects\x20match\x20pattern:\x20','startsWith','tdx\x20wf\x20attempt\x20','retrySession','start','window','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','\x0aError:','Select\x20a\x20task\x20to\x20view\x20logs:','36jQnTSS','Error:\x20','No\x20log\x20content\x20found','retryAttempt','columns','diff','jsonl','workflow:pull','session_id','MIN_LABEL_COUNT','\x20-\x20','Start\x20a\x20workflow\x20run','Analyzing\x20project...','fileCount','has','Filter:\x20','tasks','workflows','Error:\x20Secret\x20key\x20is\x20required','Error:\x20Attempt\x20ID\x20is\x20required','Loading\x20session...','isTTY','buildTimelineData','No\x20workflows\x20found','Listing\x20workflows...','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','output','keys','getMinutes','\x27\x20from\x20project\x20\x27','split','reason','\x0aDry\x20run\x20-\x20nothing\x20pushed','toISOString','durationMs','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Listing\x20secrets...','✔\x20Clone\x20complete','select','project','Cancelled','📋\x20','855944DSnaEz','No\x20sessions\x20found\x20in\x20project:\x20','Target:\x20','some','✔\x20Pull\x20complete','✔\x20Push\x20complete','canceling','success','icon','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','No\x20sessions\x20found\x20for:\x20','attempts','sourceProjectName','newProjectName','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x20session','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','\x20\x20Project:\x20','\x20\x20Session\x20ID:\x20','New\x20project\x20name:\x20','splice','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','newProjectId','\x20\x20Console:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','POLL_INTERVAL_MS','limit','basename','/attempt/','Reason:\x20','🔄\x20','modified','✔\x20Deleted\x20project\x20','workflow:attempt','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Error:','trim','Pull\x20workflow\x20project\x20to\x20local\x20folder','end','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','map','GUTTER','Latest\x20session\x20has\x20no\x20attempt','\x27...','Project:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Dry\x20run:\x20yes','Kill\x20a\x20running\x20attempt','description',',\x20Workflow:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Location:\x20','\x20from\x20session\x20','relative','sessionTime','length','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','filesExtracted','projectName','List\x20all\x20workflow\x20projects','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','lastAttempt','deleted','substring','Listing\x20workflow\x20sessions...','Task\x20name:\x20','targetExists','✔\x20Project\x20updated','Session\x20','\x20to\x20see\x20detailed\x20logs','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','Fetching\x20log\x20files...','planned','done','List\x20workflow\x20execution\x20sessions','\x20\x20Project\x20ID:\x20','skipValidation','error','Source\x20project:\x20','execute','\x20has\x20no\x20attempts','\x0aUpdate\x20existing\x20project\x20\x22','\x20\x20Workflow:\x20','utf-8','resolveProjectDir','session','→\x20Project:\x20','No\x20attempts\x20found','yes','\x20(system)','all','title','\x0a⚠\x20Project\x20\x22','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','rows','join','\x0aFailed\x20to\x20fetch\x20attempt\x20data','No\x20workflow\x20tdx.json\x20found','Usage:\x20workflow:delete\x20<project-name-or-id>','Key:\x20','→\x20New\x20project:\x20','workflow:use','running','parse','-\x20nothing\x20pushed','\x22\x20already\x20exists\x20(ID:\x20','round','✔\x20Workflow\x20project\x20context\x20cleared.','fullName','✔\x20Downloaded\x20','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','cancelRequested','download','MAX_TIMELINE_WIDTH','floor','No\x20workflows\x20found\x20in\x20project:\x20','blue','slice','Total:\x20','msPerChar','requireProject','tdx.json','max','Error:\x20KEY=VALUE\x20is\x20required','✔\x20Workflow\x20project\x20set\x20to:\x20','message','Getting\x20attempt\x20tasks...','parseProjectWorkflowPattern','📁\x20','pullProject','push','Retry\x20a\x20session\x20or\x20attempt','retryAttemptName','11558KlrPom','key','revision:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Output\x20directory:\x20','follow','attempt','now','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','format','site','getFullYear','trimEnd','sys','Select\x20a\x20workflow\x20to\x20run','indexOf','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','readFile','startedAt','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','fs/promises','Project\x20name\x20is\x20required','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Pushing\x20workflow\x20project...','workflow:sessions','stringify','toLowerCase','✔\x20Retry\x20started','dim','\x20\x20Revision:\x20','clear','fileSize','createdAt','stdout','every','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Filter:\x20project=','updatedAt','\x20\x20Files\x20extracted:\x20','Error:\x20Project\x20name\x20is\x20required','\x20(use\x20--limit\x20to\x20show\x20more)','Retrying\x20attempt...','workflow:run','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','workflow','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','No\x20log\x20files\x20found\x20for\x20this\x20attempt','---\x20','text','taskName','Auto-selected\x20latest\x20session:\x20','resumeFrom','repeat','new','Show\x20specific\x20attempt\x20details','localeCompare','✔\x20Found\x20','Session\x20time:\x20'];a50_0x31cb=function(){return _0x3135ae;};return a50_0x31cb();}import a50_0x44ead0 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 a50_0x5c8662 from'prompts';function getAttemptStatusDisplay(_0x1bfa37){const _0x30dba1=a50_0x1ab4;if(!_0x1bfa37)return{'icon':'⏳','text':''};const {done:_0x3462a5,success:_0x5d99d2,cancelRequested:_0x3300ed}=_0x1bfa37;if(!_0x3462a5)return _0x3300ed?{'icon':'🛑','text':a50_0x3545cd[_0x30dba1(0x292)]('canceling')}:{'icon':'🔄','text':a50_0x3545cd[_0x30dba1(0x1ea)]('running')};if(_0x5d99d2)return{'icon':'✅','text':a50_0x3545cd[_0x30dba1(0x237)]('success')};return{'icon':'❌','text':a50_0x3545cd[_0x30dba1(0x27f)](_0x30dba1(0x1c3))};}export class WorkflowBaseCommand extends BaseCommand{[a50_0x3913c0(0x2b2)](_0x475000,_0x5c0999,_0x1ef3d9=0x0){const _0x5e0e7b=a50_0x3913c0;return _0x475000[_0x1ef3d9]||_0x5c0999[_0x5e0e7b(0x2c4)];}['requireProject'](_0x4ec57e,_0x43dd5b,_0x547991=0x0){const _0x21a75b=a50_0x3913c0,_0x21f4c1=this[_0x21a75b(0x2b2)](_0x4ec57e,_0x43dd5b,_0x547991);if(!_0x21f4c1)return console[_0x21a75b(0x1c3)](a50_0x3545cd[_0x21a75b(0x27f)](_0x21a75b(0x197)),_0x21a75b(0x210)),console[_0x21a75b(0x1c3)](a50_0x3545cd[_0x21a75b(0x218)](_0x21a75b(0x163))),null;return _0x21f4c1;}[a50_0x3913c0(0x1f5)](_0x2e75dc,_0x4a8974){const _0x29a54e=a50_0x3913c0;if(_0x2e75dc[0x0]){const _0x567167=_0x2e75dc[0x0]['split']('.');if(_0x567167[_0x29a54e(0x1ab)]===0x1)return{'projectName':_0x567167[0x0],'workflowName':undefined};else return _0x567167[_0x29a54e(0x1ab)]===0x2?{'projectName':_0x567167[0x0],'workflowName':_0x567167[0x1]}:(console[_0x29a54e(0x1c3)](a50_0x3545cd[_0x29a54e(0x27f)](_0x29a54e(0x197)),_0x29a54e(0x23f)),null);}return{'projectName':_0x4a8974[_0x29a54e(0x2c4)],'workflowName':undefined};}[a50_0x3913c0(0x1ca)](_0x3d810e,_0x921f78,_0xb0361e=0x0){const _0x1b38f7=a50_0x3913c0;if(_0x3d810e[_0xb0361e])return _0x3d810e[_0xb0361e];if(_0x921f78[_0x1b38f7(0x2c4)]){const _0x47fc7b=a50_0x44ead0[_0x1b38f7(0x1d5)](process[_0x1b38f7(0x248)](),_0x1b38f7(0x15b),_0x921f78['workflowProject']);if(existsSync(a50_0x44ead0['join'](_0x47fc7b,_0x1b38f7(0x1ef))))return _0x47fc7b;}return undefined;}async[a50_0x3913c0(0x28d)](_0xe9080b,_0x223865,_0x2258c3){const _0x3d9d81=a50_0x3913c0;try{const _0xce96eb=await _0xe9080b[_0x3d9d81(0x228)][_0x3d9d81(0x15b)](_0x223865,{'limit':0x1});if(_0xce96eb[_0x3d9d81(0x1ab)]>0x0){const _0x151d79=_0xce96eb[0x0]['id'],_0x2cae00=getWorkflowUrl(_0x2258c3,_0x151d79);console[_0x3d9d81(0x1c3)]('\x20\x20Console:\x20'+a50_0x3545cd[_0x3d9d81(0x26e)](_0x2cae00));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x1db);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x19b);async[a50_0x3913c0(0x1c5)](_0x3a5cb3){const _0xc13088=a50_0x3913c0,{options:_0x5628b2,args:_0x556cf3,tdx:_0x2b524e}=_0x3a5cb3,_0x1eaf2e=_0x556cf3[0x0],_0x1703a8=_0x5628b2[_0xc13088(0x21a)];if(_0x1703a8)return saveSessionContext({'workflow_project':undefined},_0x5628b2[_0xc13088(0x1cb)]),console[_0xc13088(0x24d)](a50_0x3545cd['green'](_0xc13088(0x1e1))),0x0;if(!_0x1eaf2e)return console[_0xc13088(0x1c3)](a50_0x3545cd[_0xc13088(0x27f)](_0xc13088(0x197)),'Project\x20name\x20is\x20required'),console['error'](a50_0x3545cd[_0xc13088(0x218)](_0xc13088(0x1a6))),console['error'](a50_0x3545cd['dim'](_0xc13088(0x305))),0x1;const _0x412b9a=await withSpinner('Resolving\x20project\x20\x27'+_0x1eaf2e+_0xc13088(0x19f),()=>_0x2b524e[_0xc13088(0x228)][_0xc13088(0x2ef)](_0x1eaf2e),{'verbose':_0x5628b2[_0xc13088(0x2ea)]}),{name:_0x1a2796}=_0x412b9a[_0xc13088(0x2e5)];return saveSessionContext({'workflow_project':_0x1a2796},_0x5628b2[_0xc13088(0x1cb)]),console['log'](a50_0x3545cd[_0xc13088(0x237)](_0xc13088(0x1f2)+a50_0x3545cd[_0xc13088(0x26e)](_0x1a2796))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a50_0x3913c0(0x269);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x1af);async[a50_0x3913c0(0x1c5)](_0xbc7391){const _0x29a999=a50_0x3913c0,{options:_0x103a83,args:_0x6fd92b,tdx:_0x46147f}=_0xbc7391,_0x382297=_0x6fd92b[0x0];_0x103a83[_0x29a999(0x2ea)]&&_0x382297&&console[_0x29a999(0x1c3)]('Pattern:\x20'+_0x382297);const _0x1c0d28=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x46147f[_0x29a999(0x228)]['projects'](_0x382297,{'limit':_0x103a83[_0x29a999(0x18e)]}),{'verbose':_0x103a83[_0x29a999(0x2ea)]});let _0x48a947=_0x1c0d28[_0x29a999(0x2e5)];_0x48a947[_0x29a999(0x28f)]((_0x4c5a3c,_0x1681e2)=>_0x4c5a3c[_0x29a999(0x276)][_0x29a999(0x233)](_0x1681e2[_0x29a999(0x276)]));const _0x46c588=_0x103a83[_0x29a999(0x18e)]||0x64,_0x47f3b1=_0x48a947[_0x29a999(0x1ab)]>=_0x46c588?a50_0x3545cd[_0x29a999(0x218)](_0x29a999(0x224)):'';console['error'](_0x29a999(0x234)+_0x48a947[_0x29a999(0x1ab)]+_0x29a999(0x2bf)+(_0x48a947[_0x29a999(0x1ab)]!==0x1?'s':'')+_0x47f3b1);if(_0x103a83[_0x29a999(0x204)]===_0x29a999(0x2aa)||_0x103a83[_0x29a999(0x204)]===_0x29a999(0x30e)||_0x103a83[_0x29a999(0x204)]===_0x29a999(0x287))await handleSDKOutput(_0x48a947,_0x103a83);else{if(_0x48a947[_0x29a999(0x1ab)]===0x0)_0x382297?console[_0x29a999(0x24d)](_0x29a999(0x2ff)+_0x382297):console[_0x29a999(0x24d)](_0x29a999(0x2f7));else{const _0x25ed42=_0x48a947['map'](_0x229fd4=>{const _0x54f2ab=_0x29a999,_0x46b6a=_0x229fd4[_0x54f2ab(0x2d1)]?.[_0x54f2ab(0x177)](_0x19caf6=>_0x19caf6['key']===_0x54f2ab(0x208)),_0x1bba03=_0x46b6a?a50_0x3545cd[_0x54f2ab(0x218)](_0x54f2ab(0x1cf)):'';return _0x54f2ab(0x1f6)+_0x229fd4[_0x54f2ab(0x276)]+_0x1bba03;});await writeOutput(_0x25ed42[_0x29a999(0x1d5)]('\x0a'),_0x103a83[_0x29a999(0x164)],_0x29a999(0x286));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x293);[a50_0x3913c0(0x1a4)]='List\x20workflows';async[a50_0x3913c0(0x1c5)](_0x52e1c5){const _0x1ca30f=a50_0x3913c0,{options:_0x8ee7e8,args:_0x1a4bfe,tdx:_0xbd1e7}=_0x52e1c5,_0x412ea8=this[_0x1ca30f(0x2b2)](_0x1a4bfe,_0x8ee7e8);_0x8ee7e8[_0x1ca30f(0x2ea)]&&_0x412ea8&&console[_0x1ca30f(0x1c3)]('Project\x20filter:\x20'+_0x412ea8);const _0x3d365d=await withSpinner(_0x1ca30f(0x162),()=>_0xbd1e7[_0x1ca30f(0x228)][_0x1ca30f(0x15b)](_0x412ea8,{'limit':_0x8ee7e8[_0x1ca30f(0x18e)]}),{'verbose':_0x8ee7e8['verbose']});let _0x2d56ef=_0x3d365d['data'];_0x2d56ef['sort']((_0x5b155d,_0x3b408c)=>{const _0x6d8b7d=_0x1ca30f,_0xe5152e=_0x5b155d[_0x6d8b7d(0x276)][_0x6d8b7d(0x233)](_0x3b408c[_0x6d8b7d(0x276)]);if(_0xe5152e!==0x0)return _0xe5152e;return(_0x5b155d['project']?.[_0x6d8b7d(0x276)]||'')[_0x6d8b7d(0x233)](_0x3b408c[_0x6d8b7d(0x171)]?.[_0x6d8b7d(0x276)]||'');});const _0x843a69=_0x8ee7e8[_0x1ca30f(0x18e)]||0x64,_0x41c25b=_0x2d56ef['length']>=_0x843a69?a50_0x3545cd[_0x1ca30f(0x218)](_0x1ca30f(0x224)):'';console[_0x1ca30f(0x1c3)](_0x1ca30f(0x234)+_0x2d56ef[_0x1ca30f(0x1ab)]+_0x1ca30f(0x2b0)+(_0x2d56ef[_0x1ca30f(0x1ab)]!==0x1?'s':'')+_0x41c25b);if(_0x8ee7e8[_0x1ca30f(0x204)]===_0x1ca30f(0x2aa)||_0x8ee7e8[_0x1ca30f(0x204)]===_0x1ca30f(0x30e)||_0x8ee7e8[_0x1ca30f(0x204)]==='table')await handleSDKOutput(_0x2d56ef,_0x8ee7e8);else{if(_0x2d56ef[_0x1ca30f(0x1ab)]===0x0)_0x412ea8?console[_0x1ca30f(0x24d)](_0x1ca30f(0x1e9)+_0x412ea8):console[_0x1ca30f(0x24d)](_0x1ca30f(0x161));else{const _0x3b46c1=_0x8ee7e8[_0x1ca30f(0x205)],_0x305629=_0x2d56ef[_0x1ca30f(0x19c)](_0x4b091a=>{const _0x26b54c=_0x1ca30f,_0x39de1b=a50_0x3545cd[_0x26b54c(0x218)]('#'+_0x4b091a['id']),_0x2ef252=hyperlink(_0x39de1b,getWorkflowUrl(_0x3b46c1,_0x4b091a['id'])),_0x274e1c=_0x4b091a[_0x26b54c(0x171)]?.[_0x26b54c(0x276)]?a50_0x3545cd[_0x26b54c(0x218)]('\x20('+_0x4b091a[_0x26b54c(0x171)][_0x26b54c(0x276)]+')'):'';return _0x26b54c(0x173)+_0x2ef252+'\x20'+_0x4b091a[_0x26b54c(0x276)]+_0x274e1c;});await writeOutput(_0x305629[_0x1ca30f(0x1d5)]('\x0a'),_0x8ee7e8[_0x1ca30f(0x164)],_0x1ca30f(0x286));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x214);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x1c0);async['execute'](_0x35f107){const _0x2fcb6b=a50_0x3913c0,{options:_0x5225cd,args:_0x4eb904,tdx:_0x2d1288}=_0x35f107,_0x4cc456=this[_0x2fcb6b(0x1f5)](_0x4eb904,_0x5225cd);if(!_0x4cc456)return 0x1;const {projectName:_0x2b85d6,workflowName:_0x450cda}=_0x4cc456;if(_0x5225cd[_0x2fcb6b(0x2ea)]){if(_0x2b85d6&&_0x450cda)console[_0x2fcb6b(0x1c3)](_0x2fcb6b(0x159)+_0x2b85d6+'.'+_0x450cda);else _0x2b85d6&&console[_0x2fcb6b(0x1c3)](_0x2fcb6b(0x220)+_0x2b85d6);const _0x112850=_0x5225cd[_0x2fcb6b(0x2dc)];_0x112850&&console[_0x2fcb6b(0x1c3)]('Status:\x20'+_0x112850);}let _0x4766dd=0x28;if(process['stdout'][_0x2fcb6b(0x15f)]&&!_0x5225cd[_0x2fcb6b(0x164)]&&!_0x5225cd[_0x2fcb6b(0x204)]){const _0x87a38e=process[_0x2fcb6b(0x21d)][_0x2fcb6b(0x1d4)]||0x28;_0x4766dd=Math[_0x2fcb6b(0x1f0)](0x14,Math['floor'](_0x87a38e*0x2/0x3));}const _0x2abb31=_0x5225cd[_0x2fcb6b(0x18e)]||_0x4766dd,_0x3bcc79=await withSpinner(_0x2fcb6b(0x1b4),()=>_0x2d1288[_0x2fcb6b(0x228)][_0x2fcb6b(0x265)]({'projectName':_0x2b85d6,'workflowName':_0x450cda,'status':_0x5225cd['status'],'fromTime':_0x5225cd[_0x2fcb6b(0x2d4)],'toTime':_0x5225cd['to'],'limit':_0x2abb31}),{'verbose':_0x5225cd[_0x2fcb6b(0x2ea)]}),_0x5120b6=_0x3bcc79[_0x2fcb6b(0x2e5)];_0x5120b6[_0x2fcb6b(0x28f)]((_0x102033,_0x4db785)=>{const _0x47be72=_0x2fcb6b,_0x4e668c=_0x102033[_0x47be72(0x1aa)]||'',_0x128f4c=_0x4db785['sessionTime']||'';return _0x128f4c[_0x47be72(0x233)](_0x4e668c);});_0x5120b6['length']>=_0x2abb31?console[_0x2fcb6b(0x1c3)]('✔\x20Showing\x20'+_0x5120b6[_0x2fcb6b(0x1ab)]+_0x2fcb6b(0x2f2)+a50_0x3545cd['dim'](_0x2fcb6b(0x2d0))):console[_0x2fcb6b(0x1c3)](_0x2fcb6b(0x234)+_0x5120b6[_0x2fcb6b(0x1ab)]+_0x2fcb6b(0x183)+(_0x5120b6['length']!==0x1?'s':''));if(_0x5225cd['format']===_0x2fcb6b(0x2aa)||_0x5225cd[_0x2fcb6b(0x204)]===_0x2fcb6b(0x30e)||_0x5225cd[_0x2fcb6b(0x204)]===_0x2fcb6b(0x287))await handleSDKOutput(_0x5120b6,_0x5225cd);else{if(!process[_0x2fcb6b(0x21d)][_0x2fcb6b(0x15f)]||_0x5225cd[_0x2fcb6b(0x164)]){if(_0x5120b6[_0x2fcb6b(0x1ab)]===0x0){if(_0x2b85d6&&_0x450cda)console[_0x2fcb6b(0x24d)](_0x2fcb6b(0x17e)+_0x2b85d6+'.'+_0x450cda);else _0x2b85d6?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x2b85d6):console[_0x2fcb6b(0x24d)](_0x2fcb6b(0x2cd));}else{const _0x211977=_0x5225cd[_0x2fcb6b(0x205)],_0x485d90=this[_0x2fcb6b(0x27c)](_0x5120b6,_0x211977);_0x5225cd['output']?await writeOutput(_0x485d90,_0x5225cd[_0x2fcb6b(0x164)],_0x2fcb6b(0x286)):console[_0x2fcb6b(0x24d)](_0x485d90);}!_0x2b85d6&&(console['error'](''),console[_0x2fcb6b(0x1c3)](a50_0x3545cd[_0x2fcb6b(0x218)](_0x2fcb6b(0x242))),console[_0x2fcb6b(0x1c3)](a50_0x3545cd[_0x2fcb6b(0x218)](_0x2fcb6b(0x196))+'or'+a50_0x3545cd['dim'](_0x2fcb6b(0x2af))));}else{if(_0x5120b6[_0x2fcb6b(0x1ab)]===0x0){if(_0x2b85d6&&_0x450cda)console[_0x2fcb6b(0x24d)]('No\x20sessions\x20found\x20for:\x20'+_0x2b85d6+'.'+_0x450cda);else _0x2b85d6?console['log'](_0x2fcb6b(0x175)+_0x2b85d6):console[_0x2fcb6b(0x24d)](_0x2fcb6b(0x2cd));}else await this[_0x2fcb6b(0x249)](_0x5120b6,_0x35f107,_0x2b85d6);}}return 0x0;}[a50_0x3913c0(0x27c)](_0x40beea,_0x28ce51){const _0x29e57c=a50_0x3913c0,_0x2c7c1b=[],_0x3b9ca4=new Map();let _0x382e5b=Infinity,_0x556d9d=-Infinity;for(const _0x4ab080 of _0x40beea){if(_0x4ab080[_0x29e57c(0x1b1)]?.[_0x29e57c(0x21c)]){const _0x1cb473=new Date(_0x4ab080[_0x29e57c(0x1b1)]['createdAt'])[_0x29e57c(0x266)](),_0x7f532f=_0x4ab080[_0x29e57c(0x1b1)][_0x29e57c(0x2c2)]?new Date(_0x4ab080[_0x29e57c(0x1b1)][_0x29e57c(0x2c2)])[_0x29e57c(0x266)]():Date[_0x29e57c(0x202)](),_0x3148bd=_0x4ab080['project']?.['name']||'(unknown)';!_0x3b9ca4[_0x29e57c(0x158)](_0x3148bd)&&_0x3b9ca4[_0x29e57c(0x2fc)](_0x3148bd,[]),_0x3b9ca4[_0x29e57c(0x2e3)](_0x3148bd)[_0x29e57c(0x1f8)]({'session':_0x4ab080,'startTime':_0x1cb473,'endTime':_0x7f532f,'duration':_0x7f532f-_0x1cb473}),_0x382e5b=Math['min'](_0x382e5b,_0x1cb473),_0x556d9d=Math[_0x29e57c(0x1f0)](_0x556d9d,_0x7f532f);}}if(_0x3b9ca4[_0x29e57c(0x2e6)]===0x0)return _0x29e57c(0x26c);const _0x3b0ed7=process[_0x29e57c(0x21d)][_0x29e57c(0x30c)]||0x78,_0x1ad6be=0x1e,_0x2832d2=0x32,_0x5eec5c=0x4,_0xcce952=Math[_0x29e57c(0x272)](_0x2832d2,Math['max'](_0x1ad6be,Math[_0x29e57c(0x1e8)](_0x3b0ed7*0.3))),_0x384f8a=_0x3b0ed7-_0xcce952-TIMELINE_CONFIG[_0x29e57c(0x19d)]-0x3-_0x5eec5c,_0x3c85aa=_0x556d9d-_0x382e5b,_0xa0c2a4=_0x3c85aa/_0xcce952,_0x2e086c=renderTimeAxis({'startTime':_0x382e5b,'endTime':_0x556d9d,'durationMs':_0x3c85aa,'msPerChar':_0xa0c2a4},_0xcce952),_0x3bcc35=[];for(const _0x3dcb42 of _0x3b9ca4[_0x29e57c(0x24a)]()){_0x3bcc35[_0x29e57c(0x1f8)](..._0x3dcb42);}_0x3bcc35['sort']((_0x4ee920,_0x3e1c24)=>_0x3e1c24[_0x29e57c(0x2e9)]-_0x4ee920['startTime']);const _0x326842=new Date(_0x382e5b),_0x2f2f8f=formatDate(_0x326842),_0x10d921=_0x5eec5c+TIMELINE_CONFIG[_0x29e57c(0x2d8)]+TIMELINE_CONFIG[_0x29e57c(0x23b)]+_0x384f8a,_0x5be378='\x20'[_0x29e57c(0x230)](_0x10d921-_0x2f2f8f[_0x29e57c(0x1ab)]),_0xb13d2a=_0x5be378+a50_0x3545cd[_0x29e57c(0x218)](_0x2f2f8f)+'\x20'+_0x2e086c;_0x2c7c1b[_0x29e57c(0x1f8)](_0xb13d2a);const _0x2d9f55=0x16;let _0x466ce8=0x0;for(const _0x34e181 of _0x3bcc35){const _0x1b7c21=_0x34e181['session'][_0x29e57c(0x171)]?.[_0x29e57c(0x276)]||'?',_0x3f6356=Math[_0x29e57c(0x272)](stringWidth(_0x1b7c21),_0x2d9f55);_0x466ce8=Math['max'](_0x466ce8,_0x3f6356);}for(const _0x44c8de of _0x3bcc35){const {session:_0xb6c01e,startTime:_0x35e7d3,endTime:_0x2fe36d,duration:_0x2d5914}=_0x44c8de,_0x23da8f=_0xb6c01e[_0x29e57c(0x171)]?.['id'],_0x27278b=_0xb6c01e['id'],_0x1a33a9=_0xb6c01e[_0x29e57c(0x171)]?.['name']||'?',_0x4ce197=_0xb6c01e[_0x29e57c(0x228)]?.['name']||'?';let _0x66f2e5,_0x571f61;if(_0xb6c01e[_0x29e57c(0x1b1)]){const _0x1a233a=_0xb6c01e['lastAttempt'];!_0x1a233a[_0x29e57c(0x1bf)]?(_0x66f2e5=_0x1a233a[_0x29e57c(0x1e5)]?'🛑':'🔄',_0x571f61=_0x1a233a[_0x29e57c(0x1e5)]?a50_0x3545cd['yellow']:a50_0x3545cd[_0x29e57c(0x1ea)]):(_0x66f2e5=_0x1a233a['success']?'✅':'❌',_0x571f61=_0x1a233a[_0x29e57c(0x17b)]?a50_0x3545cd[_0x29e57c(0x237)]:a50_0x3545cd[_0x29e57c(0x27f)]);}else _0x66f2e5='⏳',_0x571f61=a50_0x3545cd[_0x29e57c(0x218)];const _0x16f7ea='#'+_0x27278b,_0x441868=_0x23da8f?hyperlink(_0x16f7ea,getWorkflowSessionUrl(_0x28ce51,_0x23da8f,_0x27278b)):_0x16f7ea;let _0x17e975=_0x1a33a9;stringWidth(_0x1a33a9)>_0x2d9f55&&(_0x17e975=_0x1a33a9[_0x29e57c(0x1eb)](0x0,_0x2d9f55-0x1)+'…');const _0xfa6b9b=a50_0x3545cd[_0x29e57c(0x218)](_0x17e975),_0x1119ec=stringWidth(_0x17e975),_0x96e601='\x20'[_0x29e57c(0x230)](_0x466ce8-stringWidth(_0x17e975)+0x2),_0x37c33e='('+formatElapsed(_0x2d5914)+')',_0x2185a5=stringWidth(_0x37c33e),_0x9f9a96=stringWidth(_0x16f7ea),_0x21e949=_0x9f9a96+0x1+_0x1119ec+_0x96e601[_0x29e57c(0x1ab)],_0x10f1c6=_0x384f8a-_0x21e949-_0x2185a5-0x1-0x8;let _0x5ece7f=_0x4ce197;stringWidth(_0x5ece7f)>_0x10f1c6&&(_0x5ece7f=_0x5ece7f[_0x29e57c(0x1eb)](0x0,_0x10f1c6-0x1)+'…');const _0x5289e5=_0x441868+'\x20'+_0xfa6b9b+_0x96e601+_0x5ece7f,_0x373845=stringWidth(_0x5289e5),_0x4b9531=_0x384f8a-_0x373845-_0x2185a5,_0x21ab49=_0x5289e5+'\x20'[_0x29e57c(0x230)](Math['max'](0x1,_0x4b9531))+a50_0x3545cd[_0x29e57c(0x218)](_0x37c33e),_0x1f35fd=Math['floor']((_0x35e7d3-_0x382e5b)/_0xa0c2a4),_0x142dda=Math[_0x29e57c(0x1e8)]((_0x2fe36d-_0x382e5b)/_0xa0c2a4),_0x55b209=Math[_0x29e57c(0x1f0)](_0x1f35fd+0x1,_0x142dda),_0x5c6723=new Array(_0xcce952)['fill']('\x20');for(let _0x1a3de1=_0x1f35fd;_0x1a3de1<Math[_0x29e57c(0x272)](_0x55b209,_0xcce952);_0x1a3de1++){_0x5c6723[_0x1a3de1]='─';}const _0x390bc3=_0x5c6723[_0x29e57c(0x19c)](_0x1892d2=>_0x1892d2==='\x20'?'\x20':_0x571f61(_0x1892d2))['join']('');_0x2c7c1b[_0x29e57c(0x1f8)](_0x66f2e5+'\x20'+_0x21ab49+'│'+_0x390bc3+'│');}return _0x2c7c1b['join']('\x0a');}async[a50_0x3913c0(0x249)](_0x33629f,_0x2c95c2,_0x315ef4){const _0x3301ab=a50_0x3913c0,{options:_0x17cb5f,tdx:_0x5d100f}=_0x2c95c2,_0x47c551=_0x17cb5f[_0x3301ab(0x205)],{timelineRows:_0x7d26e8,timeAxisHeader:_0x311298}=this[_0x3301ab(0x243)](_0x33629f,_0x47c551),_0x5e15c4=_0x7d26e8[_0x3301ab(0x238)](_0x5ee9a4=>_0x5ee9a4[_0x3301ab(0x245)]);if(_0x5e15c4['length']===0x0){const _0x2799a7=this[_0x3301ab(0x27c)](_0x33629f,_0x47c551);console[_0x3301ab(0x24d)](_0x2799a7);!_0x315ef4&&(console[_0x3301ab(0x1c3)](''),console[_0x3301ab(0x1c3)](a50_0x3545cd[_0x3301ab(0x218)](_0x3301ab(0x242))),console[_0x3301ab(0x1c3)](a50_0x3545cd[_0x3301ab(0x218)](_0x3301ab(0x196))+'or'+a50_0x3545cd[_0x3301ab(0x218)](_0x3301ab(0x2af))));return;}_0x311298&&console[_0x3301ab(0x24d)](_0x311298);const _0x2d5e06=_0x7d26e8[_0x3301ab(0x238)](_0x4f5407=>_0x4f5407['attemptId'])['map'](_0x499bb8=>({'title':_0x499bb8[_0x3301ab(0x247)],'value':_0x499bb8[_0x3301ab(0x245)]})),_0xcdb463=process[_0x3301ab(0x21d)][_0x3301ab(0x1d4)]||0x3c,_0x42492a=Math[_0x3301ab(0x1f0)](0x28,Math[_0x3301ab(0x1e8)](_0xcdb463*0x2/0x3)),_0x463da=await a50_0x5c8662({'type':'autocomplete','name':_0x3301ab(0x245),'message':_0x3301ab(0x1d3),'choices':_0x2d5e06,'initial':-0x1,'limit':_0x42492a,'clearFirst':!![],'fallback':{'title':_0x3301ab(0x2c6),'value':null},'suggest':(_0x55c849,_0x1aa29d)=>{const _0x224344=_0x3301ab;if(!_0x55c849)return Promise[_0x224344(0x24c)](_0x1aa29d);const _0x5efb65=_0x1aa29d[_0x224344(0x238)](_0x4b5a9a=>{const _0x1497ae=_0x224344,_0x490067=_0x4b5a9a;return _0x490067[_0x1497ae(0x1d1)][_0x1497ae(0x216)]()['includes'](_0x55c849[_0x1497ae(0x216)]());});return Promise[_0x224344(0x24c)](_0x5efb65);}}),_0x3af0fc=()=>{const _0x248853=_0x3301ab;process['stdout']['write'](_0x248853(0x2d7)),process[_0x248853(0x21d)][_0x248853(0x2b1)](_0x248853(0x2d7)),process['stdout'][_0x248853(0x2b1)]('\x1b[1A\x1b[2K');},_0x3f460d=_0x463da&&_0x463da[_0x3301ab(0x245)]&&_0x463da[_0x3301ab(0x245)]!==null&&_0x463da[_0x3301ab(0x245)][_0x3301ab(0x198)]()!=='';if(!_0x3f460d){_0x3af0fc(),console['log'](a50_0x3545cd[_0x3301ab(0x218)](_0x3301ab(0x172)));return;}_0x3af0fc();const _0x339432=_0x33629f[_0x3301ab(0x2d6)](_0x1b9abb=>_0x1b9abb['lastAttempt']?.['id']===_0x463da[_0x3301ab(0x245)]);if(_0x339432){const _0x444058=_0x339432[_0x3301ab(0x171)]?.['name']||'?',_0xac2d44=_0x339432[_0x3301ab(0x228)]?.[_0x3301ab(0x276)]||'?';console[_0x3301ab(0x24d)](_0x3301ab(0x1a0)+a50_0x3545cd[_0x3301ab(0x218)](_0x444058)+_0x3301ab(0x1a5)+a50_0x3545cd[_0x3301ab(0x218)](_0xac2d44));}const _0x47e896=new WorkflowTimelineCommand();await _0x47e896['execute']({'args':[],'options':{..._0x17cb5f,'attemptId':_0x463da['attemptId']},'tdx':_0x5d100f});}[a50_0x3913c0(0x243)](_0x3130e6,_0xf81160){const _0x1c7d14=a50_0x3913c0,_0x3163b3=new Map();for(const _0x2d0a6d of _0x3130e6){_0x2d0a6d['id']&&_0x2d0a6d[_0x1c7d14(0x1b1)]?.['id']&&_0x3163b3[_0x1c7d14(0x2fc)](_0x2d0a6d['id'],_0x2d0a6d[_0x1c7d14(0x1b1)]['id']);}const _0x4fb446=[];let _0x44b27f='';const _0x1f3894=this[_0x1c7d14(0x27c)](_0x3130e6,_0xf81160),_0x47df8d=_0x1f3894[_0x1c7d14(0x168)]('\x0a');for(const _0x5e3f1d of _0x47df8d){if(_0x5e3f1d[_0x1c7d14(0x300)](_0x1c7d14(0x2d2))||_0x5e3f1d[_0x1c7d14(0x2fa)](/^\s+\d{4}-\d{2}-\d{2}/))_0x44b27f=_0x5e3f1d;else{if(_0x5e3f1d['match'](/^[✅❌🔄🛑⏳]/)){const _0x529260=_0x5e3f1d[_0x1c7d14(0x2fa)](/#(\d+)/),_0x135221=_0x529260?_0x529260[0x1]:null,_0x2350f0=_0x135221?_0x3163b3['get'](_0x135221)||null:null,_0x3431f0=_0x3130e6[_0x1c7d14(0x2d6)](_0x39804a=>_0x39804a['id']===_0x135221),_0x12690b=_0x3431f0?.[_0x1c7d14(0x171)]?.['name']||'';_0x4fb446[_0x1c7d14(0x1f8)]({'displayLine':_0x5e3f1d,'attemptId':_0x2350f0,'projectName':_0x12690b});}}}return{'timelineRows':_0x4fb446,'timeAxisHeader':_0x44b27f};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a50_0x3913c0(0x260);[a50_0x3913c0(0x1a4)]='List\x20workflow\x20attempts';async[a50_0x3913c0(0x1c5)](_0x59ff5d){const _0x1be513=a50_0x3913c0,{options:_0x1f93f0,args:_0x50221c,tdx:_0x2d7b99}=_0x59ff5d,_0x1500ce=this[_0x1be513(0x1f5)](_0x50221c,_0x1f93f0);if(!_0x1500ce)return 0x1;const {projectName:_0x208167,workflowName:_0x32b187}=_0x1500ce,_0xcc0a8a=_0x1f93f0[_0x1be513(0x26a)];if(_0x1f93f0[_0x1be513(0x2ea)]){if(_0x208167&&_0x32b187)console[_0x1be513(0x1c3)](_0x1be513(0x159)+_0x208167+'.'+_0x32b187);else _0x208167&&console[_0x1be513(0x1c3)]('Filter:\x20project='+_0x208167);_0xcc0a8a&&console[_0x1be513(0x1c3)](_0x1be513(0x2e0));}const _0x4c144c=await withSpinner(_0x1be513(0x2b3),()=>_0x2d7b99[_0x1be513(0x228)][_0x1be513(0x17f)]({'projectName':_0x208167,'workflowName':_0x32b187,'includeRetried':_0xcc0a8a,'limit':_0x1f93f0[_0x1be513(0x18e)]}),{'verbose':_0x1f93f0['verbose']}),_0x103959=_0x4c144c['data'],_0x1fdbc4=_0x1f93f0['limit']||0x64,_0x133096=_0x103959['length']>=_0x1fdbc4?a50_0x3545cd[_0x1be513(0x218)](_0x1be513(0x224)):'';console['error'](_0x1be513(0x234)+_0x103959[_0x1be513(0x1ab)]+_0x1be513(0x28b)+(_0x103959[_0x1be513(0x1ab)]!==0x1?'s':'')+_0x133096);if(_0x1f93f0['format']===_0x1be513(0x2aa)||_0x1f93f0['format']===_0x1be513(0x30e)||_0x1f93f0['format']==='table')await handleSDKOutput(_0x103959,_0x1f93f0);else{if(_0x103959[_0x1be513(0x1ab)]===0x0){if(_0x208167&&_0x32b187)console[_0x1be513(0x24d)]('No\x20attempts\x20found\x20for:\x20'+_0x208167+'.'+_0x32b187);else _0x208167?console[_0x1be513(0x24d)](_0x1be513(0x2c7)+_0x208167):console[_0x1be513(0x24d)](_0x1be513(0x1cd));}else{const _0x39ac9a=_0x1f93f0[_0x1be513(0x205)],_0x4acfd1=_0x103959[_0x1be513(0x19c)](_0x5588cf=>{const _0x268444=_0x1be513,_0x59b2c4=a50_0x3545cd['dim']('#'+_0x5588cf['id']),_0x13877a=_0x5588cf[_0x268444(0x171)]?.['id'],_0x264310=_0x5588cf[_0x268444(0x310)]||_0x5588cf['sessionId'],_0x1fdfea=_0x13877a&&_0x264310?hyperlink(_0x59b2c4,getWorkflowAttemptUrl(_0x39ac9a,_0x13877a,_0x264310,_0x5588cf['id'])):_0x59b2c4,{icon:_0x1217d3,text:_0x3e4b7f}=getAttemptStatusDisplay(_0x5588cf),_0x582cb3=(_0x5588cf[_0x268444(0x171)]?.[_0x268444(0x276)]||'?')+'.'+(_0x5588cf[_0x268444(0x228)]?.['name']||'?'),_0x4f4842=_0x5588cf[_0x268444(0x1aa)]?a50_0x3545cd['dim'](_0x5588cf['sessionTime']):'';return(_0x1fdfea+'\x20'+_0x1217d3+(_0x3e4b7f?'\x20'+_0x3e4b7f:'')+'\x20'+_0x582cb3+'\x20'+_0x4f4842)[_0x268444(0x207)]();});await writeOutput(_0x4acfd1['join']('\x0a'),_0x1f93f0[_0x1be513(0x164)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x195);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x232);async[a50_0x3913c0(0x1c5)](_0x424762){const _0x3b9f84=a50_0x3913c0,{options:_0x18bbd0,args:_0x25baf0,tdx:_0x1a2e81}=_0x424762,_0x3a3dbd=_0x25baf0[0x0];if(!_0x3a3dbd)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x18bbd0[_0x3b9f84(0x2ea)]&&console['error']('Attempt\x20ID:\x20'+_0x3a3dbd);const _0x4b4bc3=await withSpinner('Getting\x20attempt\x20details...',()=>_0x1a2e81[_0x3b9f84(0x228)]['attempt'](_0x3a3dbd),{'verbose':_0x18bbd0[_0x3b9f84(0x2ea)]}),_0x5bbef8=_0x4b4bc3[_0x3b9f84(0x2e5)];let _0xd6b976;!_0x5bbef8['done']?_0xd6b976=_0x5bbef8[_0x3b9f84(0x1e5)]?_0x3b9f84(0x17a):_0x3b9f84(0x1dc):_0xd6b976=_0x5bbef8[_0x3b9f84(0x17b)]?_0x3b9f84(0x17b):_0x3b9f84(0x1c3);let _0x5733ac;if(_0x5bbef8[_0x3b9f84(0x21c)]&&_0x5bbef8[_0x3b9f84(0x2c2)]){const _0x136d09=new Date(_0x5bbef8[_0x3b9f84(0x21c)])[_0x3b9f84(0x266)](),_0x1c3586=new Date(_0x5bbef8[_0x3b9f84(0x2c2)])[_0x3b9f84(0x266)]();_0x5733ac=Math[_0x3b9f84(0x1e0)]((_0x1c3586-_0x136d09)/0x3e8);}const _0x30825f={'attempt_id':_0x5bbef8['id'],'status':_0xd6b976,..._0x5bbef8['index']!==undefined&&{'index':_0x5bbef8[_0x3b9f84(0x239)]},..._0x5bbef8[_0x3b9f84(0x171)]&&{'project':_0x5bbef8[_0x3b9f84(0x171)][_0x3b9f84(0x276)]},..._0x5bbef8[_0x3b9f84(0x228)]&&{'workflow':_0x5bbef8[_0x3b9f84(0x228)]['name']},..._0x5bbef8['sessionId']&&{'session_id':_0x5bbef8[_0x3b9f84(0x288)]},..._0x5bbef8[_0x3b9f84(0x1aa)]&&{'session_time':_0x5bbef8[_0x3b9f84(0x1aa)]},..._0x5bbef8[_0x3b9f84(0x1fa)]&&{'retry_attempt':_0x5bbef8[_0x3b9f84(0x1fa)]},..._0x5733ac!==undefined&&{'duration_sec':_0x5733ac},..._0x5bbef8[_0x3b9f84(0x21c)]&&{'created_at':_0x5bbef8[_0x3b9f84(0x21c)]},..._0x5bbef8[_0x3b9f84(0x2c2)]&&{'finished_at':_0x5bbef8['finishedAt']},...Object[_0x3b9f84(0x165)](_0x5bbef8['params'])['length']>0x0&&{'params':_0x5bbef8['params']}};return await handleSingleObjectOutput(_0x30825f,_0x18bbd0),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x299);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x240);async[a50_0x3913c0(0x1c5)](_0x2cbc68){const _0x2be815=a50_0x3913c0,{options:_0x1c02a0,args:_0x3d3b6e,tdx:_0x41a55e}=_0x2cbc68,_0x2c5b85=_0x3d3b6e[0x0];if(!_0x2c5b85)return console[_0x2be815(0x1c3)](_0x2be815(0x15d)),0x1;const _0x29563e=_0x1c02a0['includeSubtasks'];_0x1c02a0[_0x2be815(0x2ea)]&&(console[_0x2be815(0x1c3)](_0x2be815(0x2fe)+_0x2c5b85),_0x29563e&&console['error'](_0x2be815(0x2df)));const _0xd0b208=await withSpinner(_0x2be815(0x1f4),()=>_0x41a55e[_0x2be815(0x228)][_0x2be815(0x15a)](_0x2c5b85,_0x29563e||![]),{'verbose':_0x1c02a0['verbose']}),_0x35e595=_0xd0b208[_0x2be815(0x2e5)];return console['error']('✔\x20Found\x20'+_0x35e595[_0x2be815(0x1ab)]+_0x2be815(0x2b7)+(_0x35e595[_0x2be815(0x1ab)]!==0x1?'s':'')),await handleSDKOutput(_0x35e595,_0x1c02a0),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x274);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x212);async[a50_0x3913c0(0x1c5)](_0x27751b){const _0x4e5918=a50_0x3913c0,{options:_0x3e5bf9,args:_0x502e87,tdx:_0x4bb58c}=_0x27751b,_0x91307=_0x502e87[0x0];let _0x3311cc=_0x502e87[0x1];if(!_0x91307)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x3e5bf9['verbose']&&(console[_0x4e5918(0x1c3)](_0x4e5918(0x2fe)+_0x91307),_0x3311cc&&console['error'](_0x4e5918(0x1b5)+_0x3311cc));const _0x366f50=await withSpinner(_0x4e5918(0x1bd),()=>_0x4bb58c['workflow'][_0x4e5918(0x2d9)](_0x91307,_0x3311cc),{'verbose':_0x3e5bf9['verbose']}),_0x332c99=_0x366f50[_0x4e5918(0x2e5)];if(_0x332c99[_0x4e5918(0x1ab)]===0x0)return console[_0x4e5918(0x1c3)](_0x4e5918(0x22a)),0x0;if(!_0x3311cc&&(_0x3e5bf9[_0x4e5918(0x2aa)]||_0x3e5bf9[_0x4e5918(0x204)]))return await handleSDKOutput(_0x332c99,_0x3e5bf9),0x0;if(!_0x3311cc){const _0x3779fb=_0x332c99[_0x4e5918(0x19c)](_0x402a55=>({'title':_0x402a55[_0x4e5918(0x22d)]+'\x20('+formatBytes(_0x402a55[_0x4e5918(0x21b)])+')','value':_0x402a55[_0x4e5918(0x22d)]})),_0x4b6a8c=await a50_0x5c8662({'type':_0x4e5918(0x170),'name':_0x4e5918(0x29c),'message':_0x4e5918(0x307),'choices':_0x3779fb});if(!_0x4b6a8c[_0x4e5918(0x29c)])return console[_0x4e5918(0x1c3)](_0x4e5918(0x172)),0x0;_0x3311cc=_0x4b6a8c[_0x4e5918(0x29c)];}const _0x34ac20=await withSpinner(_0x4e5918(0x2a6),()=>_0x4bb58c[_0x4e5918(0x228)]['logs'](_0x91307,_0x3311cc),{'verbose':_0x3e5bf9[_0x4e5918(0x2ea)]}),_0x2f3dd4=_0x34ac20[_0x4e5918(0x2e5)];return _0x2f3dd4?console[_0x4e5918(0x24d)](_0x2f3dd4):console['error'](_0x4e5918(0x30a)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x283);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x1a3);async[a50_0x3913c0(0x1c5)](_0x9c8bed){const _0x48a741=a50_0x3913c0,{options:_0x4e723d,args:_0x4af19f,tdx:_0x117066}=_0x9c8bed,_0x591e9c=_0x4af19f[0x0];if(!_0x591e9c)return console[_0x48a741(0x1c3)](_0x48a741(0x15d)),0x1;const _0x41af65=_0x4e723d[_0x48a741(0x169)];_0x4e723d['verbose']&&(console[_0x48a741(0x1c3)]('Attempt\x20ID:\x20'+_0x591e9c),_0x41af65&&console['error'](_0x48a741(0x191)+_0x41af65));if(!_0x4e723d[_0x48a741(0x1ce)]){if(!isInteractive())return console[_0x48a741(0x1c3)](a50_0x3545cd[_0x48a741(0x27f)]('\x0aError:'),_0x48a741(0x1ba)),console[_0x48a741(0x1c3)](a50_0x3545cd[_0x48a741(0x218)](_0x48a741(0x2ce))),0x1;const _0x3ab3bc=await confirmKey(_0x48a741(0x203)+_0x591e9c+'?');if(!_0x3ab3bc)return console[_0x48a741(0x1c3)](a50_0x3545cd[_0x48a741(0x292)](_0x48a741(0x172))),0x1;}const _0x3a872c=await withSpinner(_0x48a741(0x268),()=>_0x117066[_0x48a741(0x228)]['kill'](_0x591e9c,_0x41af65),{'verbose':_0x4e723d[_0x48a741(0x2ea)]}),_0x4b24e9=_0x3a872c['data'];return console['error']('✔\x20'+_0x4b24e9),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x2c0);['description']=a50_0x3913c0(0x1f9);async[a50_0x3913c0(0x1c5)](_0x390990){const _0x1d91bd=a50_0x3913c0,{options:_0x2f0e8a,args:_0x5a4c87,tdx:_0x532592}=_0x390990,_0xb0d411=_0x5a4c87[0x0];if(!_0xb0d411)return console[_0x1d91bd(0x1c3)](_0x1d91bd(0x1a1)),console[_0x1d91bd(0x1c3)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x4da7ab=![],_0x1c13f8=_0xb0d411;if(_0xb0d411['startsWith'](_0x1d91bd(0x275)))_0x4da7ab=!![],_0x1c13f8=_0xb0d411['substring'](0x8);else{if(_0xb0d411[_0x1d91bd(0x300)](_0x1d91bd(0x2a2)))_0x4da7ab=![],_0x1c13f8=_0xb0d411[_0x1d91bd(0x1b3)](0x8);else return console[_0x1d91bd(0x1c3)](_0x1d91bd(0x1bb)),console[_0x1d91bd(0x1c3)](_0x1d91bd(0x20b)),0x1;}const _0x21e4e8=_0x2f0e8a['fromTask'],_0x5a47f3=_0x2f0e8a[_0x1d91bd(0x22f)],_0x26b859=_0x2f0e8a[_0x1d91bd(0x2a7)],_0x1fcda2=_0x2f0e8a[_0x1d91bd(0x285)];_0x2f0e8a['verbose']&&(console['error'](_0x1d91bd(0x176)+(_0x4da7ab?_0x1d91bd(0x1cb):_0x1d91bd(0x201))+'\x20'+_0x1c13f8),_0x21e4e8&&console[_0x1d91bd(0x1c3)]('From\x20task:\x20'+_0x21e4e8),_0x5a47f3&&console['error']('Resume\x20from:\x20'+_0x5a47f3),_0x26b859&&console['error']('Params:\x20'+_0x26b859),_0x1fcda2&&console['error'](_0x1d91bd(0x2c8)));let _0x59c8df;if(_0x26b859)try{if(_0x26b859[_0x1d91bd(0x300)]('@')){const _0x118351=await import(_0x1d91bd(0x20f)),_0x2af666=_0x26b859[_0x1d91bd(0x1b3)](0x1),_0x294a46=await _0x118351[_0x1d91bd(0x20c)](_0x2af666,_0x1d91bd(0x1c9));_0x59c8df=JSON['parse'](_0x294a46);}else _0x59c8df=JSON[_0x1d91bd(0x1dd)](_0x26b859);}catch{return console[_0x1d91bd(0x1c3)](_0x1d91bd(0x255)),0x1;}if(!_0x2f0e8a['yes']){if(!isInteractive())return console[_0x1d91bd(0x1c3)](a50_0x3545cd[_0x1d91bd(0x27f)]('\x0aError:'),_0x1d91bd(0x1ba)),console['error'](a50_0x3545cd['dim'](_0x1d91bd(0x2ce))),0x1;const _0x142824=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x4da7ab?_0x1d91bd(0x1cb):_0x1d91bd(0x201))+'\x20'+_0x1c13f8+'?');if(!_0x142824)return console[_0x1d91bd(0x1c3)](a50_0x3545cd[_0x1d91bd(0x292)]('Cancelled')),0x1;}let _0x4b1023;_0x4da7ab?_0x4b1023=await withSpinner(_0x1d91bd(0x2bb),()=>_0x532592[_0x1d91bd(0x228)][_0x1d91bd(0x302)](_0x1c13f8,{'fromTask':_0x21e4e8,'retryParams':_0x59c8df}),{'verbose':_0x2f0e8a['verbose']}):_0x4b1023=await withSpinner(_0x1d91bd(0x225),()=>_0x532592['workflow'][_0x1d91bd(0x30b)](_0x1c13f8,{'resumeFrom':_0x5a47f3,'retryParams':_0x59c8df,'force':_0x1fcda2}),{'verbose':_0x2f0e8a[_0x1d91bd(0x2ea)]});const _0x4e2920=_0x4b1023['data'];return console[_0x1d91bd(0x1c3)](_0x1d91bd(0x217)),console['error']('\x20\x20New\x20attempt\x20ID:\x20'+_0x4e2920[_0x1d91bd(0x245)]),console[_0x1d91bd(0x1c3)]('\x20\x20Session\x20ID:\x20'+_0x4e2920[_0x1d91bd(0x288)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x226);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x313);async[a50_0x3913c0(0x1c5)](_0x2b30aa){const _0x43fa62=a50_0x3913c0,{options:_0x121b72,args:_0x20efa3,tdx:_0x19b225}=_0x2b30aa;let _0x3327d7=_0x20efa3[0x0];if(!_0x3327d7){const _0x2e7081=this[_0x43fa62(0x2b2)]([],_0x121b72),_0x37932c=await withSpinner('Loading\x20workflows...',()=>_0x19b225['workflow'][_0x43fa62(0x15b)](_0x2e7081,{'limit':_0x121b72[_0x43fa62(0x18e)]}),{'verbose':_0x121b72[_0x43fa62(0x2ea)]}),_0x429ab5=_0x37932c['data'];if(_0x429ab5[_0x43fa62(0x1ab)]===0x0)return console[_0x43fa62(0x1c3)](_0x43fa62(0x161)),!_0x2e7081&&console[_0x43fa62(0x1c3)](a50_0x3545cd[_0x43fa62(0x218)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x285def=_0x429ab5[_0x43fa62(0x19c)](_0xc3f071=>({'title':_0xc3f071['project']?.[_0x43fa62(0x276)]+'.'+_0xc3f071[_0x43fa62(0x276)],'value':_0xc3f071['project']?.[_0x43fa62(0x276)]+'.'+_0xc3f071[_0x43fa62(0x276)],'description':_0xc3f071[_0x43fa62(0x2e2)]?_0x43fa62(0x1fd)+_0xc3f071['revision']:undefined})),_0xc5feb1=await a50_0x5c8662({'type':_0x43fa62(0x170),'name':_0x43fa62(0x228),'message':_0x43fa62(0x209),'choices':_0x285def});if(!_0xc5feb1[_0x43fa62(0x228)])return 0x1;_0x3327d7=_0xc5feb1[_0x43fa62(0x228)];}if(!_0x3327d7['includes']('.')){const _0x29f17a=this[_0x43fa62(0x2b2)]([],_0x121b72);if(_0x29f17a)_0x3327d7=_0x29f17a+'.'+_0x3327d7;else return console[_0x43fa62(0x1c3)](a50_0x3545cd[_0x43fa62(0x27f)](_0x43fa62(0x197)),_0x43fa62(0x2d5)),console[_0x43fa62(0x1c3)](a50_0x3545cd[_0x43fa62(0x218)](_0x43fa62(0x163))),0x1;}const _0x3e45e2=_0x121b72[_0x43fa62(0x2d3)],_0x5a8cb8=_0x121b72['sessionTime'],_0x18dd0a={};if(_0x3e45e2&&Array[_0x43fa62(0x26f)](_0x3e45e2))for(const _0x4d4de9 of _0x3e45e2){const _0x26b0f0=_0x4d4de9[_0x43fa62(0x20a)]('=');if(_0x26b0f0===-0x1)return console[_0x43fa62(0x1c3)](_0x43fa62(0x250)+_0x4d4de9),console['error']('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x30cc22=_0x4d4de9[_0x43fa62(0x1b3)](0x0,_0x26b0f0),_0xee39c8=_0x4d4de9[_0x43fa62(0x1b3)](_0x26b0f0+0x1);try{_0x18dd0a[_0x30cc22]=JSON['parse'](_0xee39c8);}catch{_0x18dd0a[_0x30cc22]=_0xee39c8;}}_0x121b72['verbose']&&(console[_0x43fa62(0x1c3)](_0x43fa62(0x28c)+_0x3327d7),Object[_0x43fa62(0x165)](_0x18dd0a)[_0x43fa62(0x1ab)]>0x0&&console[_0x43fa62(0x1c3)](_0x43fa62(0x2cf)+JSON[_0x43fa62(0x215)](_0x18dd0a)),_0x5a8cb8&&console['error'](_0x43fa62(0x235)+_0x5a8cb8));const _0x83655e=await withSpinner(_0x43fa62(0x23a),()=>_0x19b225[_0x43fa62(0x228)]['run'](_0x3327d7,_0x18dd0a,{'sessionTime':_0x5a8cb8}),{'verbose':_0x121b72[_0x43fa62(0x2ea)]}),_0x1e87af=_0x83655e['data'];console[_0x43fa62(0x1c3)](_0x43fa62(0x2a1)),console[_0x43fa62(0x1c3)]('\x20\x20Attempt\x20ID:\x20'+_0x1e87af['id']),console['error'](_0x43fa62(0x186)+_0x1e87af['sessionId']),console[_0x43fa62(0x1c3)]('\x20\x20Project:\x20'+_0x1e87af[_0x43fa62(0x171)]?.[_0x43fa62(0x276)]),console[_0x43fa62(0x1c3)](_0x43fa62(0x1c8)+_0x1e87af[_0x43fa62(0x228)]?.[_0x43fa62(0x276)]);if(_0x1e87af[_0x43fa62(0x171)]?.['id']&&_0x1e87af['sessionId']&&_0x1e87af['id']){const _0x491869=_0x121b72[_0x43fa62(0x205)],_0x15d92f=getConsoleUrl(_0x491869,_0x43fa62(0x267)+_0x1e87af[_0x43fa62(0x171)]['id']+'/sessions/'+_0x1e87af['sessionId']+_0x43fa62(0x190)+_0x1e87af['id']);console[_0x43fa62(0x1c3)](_0x43fa62(0x18b)+a50_0x3545cd[_0x43fa62(0x26e)](_0x15d92f));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a50_0x3913c0(0x276)]='workflow:download';[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x2ad);async[a50_0x3913c0(0x1c5)](_0x2c85e9){const _0x38f322=a50_0x3913c0,{options:_0x5227de,args:_0x19dff7,tdx:_0x3d1210}=_0x2c85e9,_0x3ee18a=_0x19dff7[0x0],_0x3feb58=_0x19dff7[0x1]||'.';if(!_0x3ee18a)return console[_0x38f322(0x1c3)](_0x38f322(0x223)),console[_0x38f322(0x1c3)](_0x38f322(0x21f)),0x1;const _0x15067d=_0x5227de[_0x38f322(0x2e2)];_0x5227de[_0x38f322(0x2ea)]&&(console[_0x38f322(0x1c3)]('Project:\x20'+_0x3ee18a),console['error'](_0x38f322(0x1ff)+_0x3feb58),_0x15067d&&console[_0x38f322(0x1c3)](_0x38f322(0x2e7)+_0x15067d));const _0x305dcf=await withSpinner(_0x38f322(0x253)+_0x3ee18a+'...',()=>_0x3d1210['workflow'][_0x38f322(0x1e6)](_0x3ee18a,_0x3feb58,{'revision':_0x15067d}),{'verbose':_0x5227de['verbose']}),_0x5de6a6=_0x305dcf[_0x38f322(0x2e5)];return console[_0x38f322(0x1c3)](_0x38f322(0x1e3)+_0x5de6a6['projectName']),console[_0x38f322(0x1c3)](_0x38f322(0x219)+_0x5de6a6[_0x38f322(0x2e2)]),console[_0x38f322(0x1c3)](_0x38f322(0x222)+_0x5de6a6[_0x38f322(0x1ad)]),console['error'](_0x38f322(0x1a7)+_0x3feb58+'/'+_0x5de6a6[_0x38f322(0x1ae)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]='workflow:upload';[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x258);async[a50_0x3913c0(0x1c5)](_0x4a766d){const _0x47bc5d=a50_0x3913c0,{options:_0x62ad9f,args:_0x451f4c,tdx:_0x2e79fc}=_0x4a766d;let _0x247a87='.',_0x510008=_0x62ad9f[_0x47bc5d(0x276)];if(_0x451f4c[0x0]){const {promises:_0x57b41f}=await import('fs');try{const _0x14e23c=await _0x57b41f[_0x47bc5d(0x27d)](_0x451f4c[0x0]);if(_0x14e23c['isDirectory']())_0x247a87=_0x451f4c[0x0];else return console[_0x47bc5d(0x1c3)](_0x47bc5d(0x309)+_0x451f4c[0x0]+_0x47bc5d(0x23e)),0x1;}catch{_0x510008=_0x451f4c[0x0],_0x247a87='.';}}const _0x4adb91=_0x62ad9f[_0x47bc5d(0x2e2)],_0x4d3865=_0x62ad9f['skipValidation'];_0x62ad9f['verbose']&&(console[_0x47bc5d(0x1c3)](_0x47bc5d(0x2c9)+_0x247a87),_0x510008&&console[_0x47bc5d(0x1c3)](_0x47bc5d(0x236)+_0x510008),_0x4adb91&&console[_0x47bc5d(0x1c3)](_0x47bc5d(0x2e7)+_0x4adb91),_0x4d3865&&console[_0x47bc5d(0x1c3)]('Validation:\x20skipped'));const _0x792a8a=await withSpinner(_0x47bc5d(0x213),()=>_0x2e79fc[_0x47bc5d(0x228)][_0x47bc5d(0x1f8)](_0x247a87,{'projectName':_0x510008,'revision':_0x4adb91,'skipValidation':_0x4d3865}),{'verbose':_0x62ad9f[_0x47bc5d(0x2ea)]}),_0x181eb4=_0x792a8a[_0x47bc5d(0x2e5)];return console[_0x47bc5d(0x1c3)]('✔\x20Pushed\x20'+_0x181eb4['projectName']),console[_0x47bc5d(0x1c3)](_0x47bc5d(0x1c1)+_0x181eb4[_0x47bc5d(0x26b)]),console[_0x47bc5d(0x1c3)](_0x47bc5d(0x219)+_0x181eb4['revision']),await this[_0x47bc5d(0x28d)](_0x2e79fc,_0x181eb4[_0x47bc5d(0x1ae)],_0x62ad9f[_0x47bc5d(0x205)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x30f);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x199);async[a50_0x3913c0(0x1c5)](_0x3d9644){const _0x25b86a=a50_0x3913c0,{options:_0x15702b,args:_0xbfc211,tdx:_0x21762f}=_0x3d9644,_0x5c0475=_0xbfc211[0x0],_0x5e68ab=_0xbfc211[0x1];if(!_0x5c0475)return console[_0x25b86a(0x1c3)](a50_0x3545cd[_0x25b86a(0x27f)](_0x25b86a(0x197)),_0x25b86a(0x210)),console[_0x25b86a(0x1c3)](a50_0x3545cd[_0x25b86a(0x218)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x3bacdf=_0x15702b[_0x25b86a(0x2e2)];_0x15702b['verbose']&&(console[_0x25b86a(0x1c3)](_0x25b86a(0x1a0)+_0x5c0475),_0x5e68ab&&console[_0x25b86a(0x1c3)]('Target\x20directory:\x20'+_0x5e68ab),_0x3bacdf&&console[_0x25b86a(0x1c3)](_0x25b86a(0x2e7)+_0x3bacdf),_0x15702b['dryRun']&&console['error'](_0x25b86a(0x1a2)));const _0xa47635=await withSpinner('Pulling\x20project\x20'+_0x5c0475+_0x25b86a(0x2b4),()=>_0x21762f['workflow'][_0x25b86a(0x1f7)](_0x5c0475,{'targetDir':_0x5e68ab,'revision':_0x3bacdf}),{'verbose':_0x15702b['verbose']}),_0x1c21c0=_0xa47635['data'];_0x1c21c0[_0x25b86a(0x295)]?console['error'](_0x25b86a(0x1da)+_0x1c21c0[_0x25b86a(0x1ae)]):console[_0x25b86a(0x1c3)](_0x25b86a(0x1cc)+_0x1c21c0['projectName']);console[_0x25b86a(0x1c3)]('\x20\x20Revision:\x20'+_0x1c21c0[_0x25b86a(0x2e2)]),console[_0x25b86a(0x1c3)](_0x25b86a(0x2ae)+(a50_0x44ead0[_0x25b86a(0x1a9)](process[_0x25b86a(0x248)](),_0x1c21c0[_0x25b86a(0x279)])||'.')),console[_0x25b86a(0x1c3)](_0x25b86a(0x2cb)+a50_0x3545cd[_0x25b86a(0x237)]('+'+_0x1c21c0[_0x25b86a(0x282)][_0x25b86a(0x231)]+_0x25b86a(0x25d))+',\x20'+(a50_0x3545cd['yellow']('~'+_0x1c21c0['summary']['modified']+_0x25b86a(0x256))+',\x20')+(a50_0x3545cd[_0x25b86a(0x27f)]('-'+_0x1c21c0[_0x25b86a(0x282)][_0x25b86a(0x1b2)]+_0x25b86a(0x27a))+',\x20')+(''+a50_0x3545cd[_0x25b86a(0x218)](_0x1c21c0[_0x25b86a(0x282)][_0x25b86a(0x2e4)]+_0x25b86a(0x2ac))));for(const _0x563598 of _0x1c21c0[_0x25b86a(0x261)]){_0x563598['type']===_0x25b86a(0x193)&&_0x563598[_0x25b86a(0x30d)]&&(console['error']('\x0a'+a50_0x3545cd[_0x25b86a(0x26e)](_0x25b86a(0x22b)+_0x563598[_0x25b86a(0x2de)])),console[_0x25b86a(0x1c3)](_0x563598[_0x25b86a(0x30d)]));}if(!_0x1c21c0[_0x25b86a(0x24f)])return saveSessionContext({'workflow_project':_0x1c21c0[_0x25b86a(0x1ae)]},_0x15702b[_0x25b86a(0x1cb)]),console['error'](a50_0x3545cd['green'](_0x25b86a(0x25f))),console[_0x25b86a(0x1c3)](a50_0x3545cd['dim'](_0x25b86a(0x281)+_0x1c21c0[_0x25b86a(0x1ae)])),0x0;if(_0x15702b[_0x25b86a(0x2f0)])return console['error'](a50_0x3545cd[_0x25b86a(0x292)](_0x25b86a(0x2ca))),0x0;if(!_0x15702b[_0x25b86a(0x1ce)]){if(!isInteractive())return console[_0x25b86a(0x1c3)](a50_0x3545cd[_0x25b86a(0x27f)](_0x25b86a(0x306)),_0x25b86a(0x1ba)),console[_0x25b86a(0x1c3)](a50_0x3545cd[_0x25b86a(0x218)](_0x25b86a(0x2ce))),0x1;const _0x4e6447=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x4e6447)return console[_0x25b86a(0x1c3)](a50_0x3545cd[_0x25b86a(0x292)](_0x25b86a(0x172)),_0x25b86a(0x29f)),0x1;}await withSpinner(_0x25b86a(0x294),()=>_0x21762f[_0x25b86a(0x228)][_0x25b86a(0x2ee)](_0x1c21c0,{'revision':_0x3bacdf}),{'verbose':_0x15702b[_0x25b86a(0x2ea)]}),saveSessionContext({'workflow_project':_0x1c21c0[_0x25b86a(0x1ae)]},_0x15702b[_0x25b86a(0x1cb)]),console['error'](a50_0x3545cd[_0x25b86a(0x237)](_0x25b86a(0x178)));const _0x2702a0=a50_0x44ead0[_0x25b86a(0x1a9)](process[_0x25b86a(0x248)](),_0x1c21c0[_0x25b86a(0x279)])||'.';return console['error'](a50_0x3545cd[_0x25b86a(0x218)](_0x25b86a(0x1a7)+_0x2702a0)),console[_0x25b86a(0x1c3)](a50_0x3545cd[_0x25b86a(0x218)](_0x25b86a(0x281)+_0x1c21c0[_0x25b86a(0x1ae)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x254);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x1e4);async[a50_0x3913c0(0x1c5)](_0x181615){const _0x264aa7=a50_0x3913c0,{options:_0x5e0b13,args:_0x221617,tdx:_0x1420b4}=_0x181615,_0x1b12c0=this[_0x264aa7(0x1ca)](_0x221617,_0x5e0b13),_0x648dff=_0x5e0b13[_0x264aa7(0x2e2)],_0x337632=_0x5e0b13[_0x264aa7(0x1c2)];_0x5e0b13[_0x264aa7(0x2ea)]&&(_0x1b12c0&&console[_0x264aa7(0x1c3)](_0x264aa7(0x2e8)+_0x1b12c0),_0x648dff&&console[_0x264aa7(0x1c3)](_0x264aa7(0x2e7)+_0x648dff),_0x5e0b13[_0x264aa7(0x2f0)]&&console['error'](_0x264aa7(0x1a2)),_0x337632&&console[_0x264aa7(0x1c3)]('Validation:\x20skipped'));let _0x4a1e9b;try{_0x4a1e9b=await withSpinner('Analyzing\x20changes...',()=>_0x1420b4[_0x264aa7(0x228)][_0x264aa7(0x2bc)]({'sourceDir':_0x1b12c0,'revision':_0x648dff,'skipValidation':_0x337632}),{'verbose':_0x5e0b13[_0x264aa7(0x2ea)]});}catch(_0x2f433c){if(_0x2f433c instanceof Error&&_0x2f433c[_0x264aa7(0x1f3)]['includes'](_0x264aa7(0x1d7)))return console[_0x264aa7(0x1c3)](a50_0x3545cd[_0x264aa7(0x27f)](_0x264aa7(0x197)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x5e0b13[_0x264aa7(0x2c4)]?console['error'](a50_0x3545cd[_0x264aa7(0x218)](_0x264aa7(0x29b)+_0x5e0b13[_0x264aa7(0x2c4)]+_0x264aa7(0x16d)+_0x5e0b13[_0x264aa7(0x2c4)]+'\x27')):console[_0x264aa7(0x1c3)](a50_0x3545cd['dim']('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x2f433c;}const _0x6e94f3=_0x4a1e9b[_0x264aa7(0x2e5)];console[_0x264aa7(0x1c3)]('✔\x20Project:\x20'+_0x6e94f3['projectName']),console[_0x264aa7(0x1c3)]('\x20\x20Source:\x20'+_0x6e94f3[_0x264aa7(0x278)]),console[_0x264aa7(0x1c3)](_0x264aa7(0x219)+_0x6e94f3[_0x264aa7(0x2e2)]),console[_0x264aa7(0x1c3)](_0x264aa7(0x2cb)+a50_0x3545cd[_0x264aa7(0x237)]('+'+_0x6e94f3[_0x264aa7(0x282)]['new']+_0x264aa7(0x25d))+',\x20'+(a50_0x3545cd[_0x264aa7(0x292)]('~'+_0x6e94f3['summary'][_0x264aa7(0x193)]+_0x264aa7(0x256))+',\x20')+(a50_0x3545cd['red']('-'+_0x6e94f3[_0x264aa7(0x282)][_0x264aa7(0x1b2)]+'\x20deleted')+',\x20')+(''+a50_0x3545cd['dim'](_0x6e94f3[_0x264aa7(0x282)]['unchanged']+_0x264aa7(0x2ac))));for(const _0x52962e of _0x6e94f3[_0x264aa7(0x261)]){_0x52962e[_0x264aa7(0x28e)]===_0x264aa7(0x193)&&_0x52962e['diff']&&(console[_0x264aa7(0x1c3)]('\x0a'+a50_0x3545cd[_0x264aa7(0x26e)]('---\x20'+_0x52962e[_0x264aa7(0x2de)])),console['error'](_0x52962e[_0x264aa7(0x30d)]));}if(!_0x6e94f3[_0x264aa7(0x24f)])return console[_0x264aa7(0x1c3)](a50_0x3545cd['green'](_0x264aa7(0x290))),await this[_0x264aa7(0x28d)](_0x1420b4,_0x6e94f3[_0x264aa7(0x1ae)],_0x5e0b13['site']),0x0;if(_0x5e0b13[_0x264aa7(0x2f0)])return console['error'](a50_0x3545cd['yellow'](_0x264aa7(0x16a))),0x0;if(!_0x5e0b13[_0x264aa7(0x1ce)]){if(!isInteractive())return console[_0x264aa7(0x1c3)](a50_0x3545cd['red'](_0x264aa7(0x306)),_0x264aa7(0x1ba)),console['error'](a50_0x3545cd[_0x264aa7(0x218)](_0x264aa7(0x2ce))),0x1;const _0x3a84d7=await confirmKey(_0x264aa7(0x2da));if(!_0x3a84d7)return console['error'](a50_0x3545cd['yellow'](_0x264aa7(0x172)),_0x264aa7(0x1de)),0x1;}const _0x160359=await withSpinner(_0x264aa7(0x262),()=>_0x1420b4[_0x264aa7(0x228)]['executePushProject'](_0x6e94f3),{'verbose':_0x5e0b13[_0x264aa7(0x2ea)]}),_0x330c9a=_0x160359[_0x264aa7(0x2e5)];return console[_0x264aa7(0x1c3)](a50_0x3545cd[_0x264aa7(0x237)](_0x264aa7(0x179))),console[_0x264aa7(0x1c3)](_0x264aa7(0x1c1)+_0x330c9a[_0x264aa7(0x26b)]),console['error'](_0x264aa7(0x219)+_0x330c9a['revision']),await this[_0x264aa7(0x28d)](_0x1420b4,_0x330c9a[_0x264aa7(0x1ae)],_0x5e0b13[_0x264aa7(0x205)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x280);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x1bc);async[a50_0x3913c0(0x1c5)](_0x5d23bd){const _0xcca397=a50_0x3913c0,{options:_0x151bd5,args:_0x496149,tdx:_0x13ca0b}=_0x5d23bd,_0x4a1f5c=this[_0xcca397(0x1ca)](_0x496149,_0x151bd5),_0x5884d7=_0x151bd5['name'],_0x13bbbf=_0x151bd5['revision'],_0x2e5d74=_0x151bd5[_0xcca397(0x1c2)];if(!_0x4a1f5c)return console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x27f)](_0xcca397(0x197)),_0xcca397(0x2f4)),console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x218)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x218)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x5884d7)return console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x27f)](_0xcca397(0x197)),_0xcca397(0x2ed)),console[_0xcca397(0x1c3)](a50_0x3545cd['dim'](_0xcca397(0x270))),0x1;_0x151bd5[_0xcca397(0x2ea)]&&(console[_0xcca397(0x1c3)](_0xcca397(0x2e8)+_0x4a1f5c),console[_0xcca397(0x1c3)](_0xcca397(0x187)+_0x5884d7),_0x13bbbf&&console[_0xcca397(0x1c3)](_0xcca397(0x2e7)+_0x13bbbf),_0x151bd5['dryRun']&&console[_0xcca397(0x1c3)]('Dry\x20run:\x20yes'),_0x2e5d74&&console[_0xcca397(0x1c3)]('Validation:\x20skipped'));const _0x305dc4=await withSpinner(_0xcca397(0x314),()=>_0x13ca0b[_0xcca397(0x228)][_0xcca397(0x27b)](_0x4a1f5c,_0x5884d7,{'revision':_0x13bbbf,'skipValidation':_0x2e5d74}),{'verbose':_0x151bd5[_0xcca397(0x2ea)]}),_0x13d193=_0x305dc4[_0xcca397(0x2e5)];console[_0xcca397(0x1c3)](_0xcca397(0x2a3)+_0x13d193['sourceDir']);_0x13d193[_0xcca397(0x180)]&&console[_0xcca397(0x1c3)](_0xcca397(0x1c4)+_0x13d193[_0xcca397(0x180)]);console[_0xcca397(0x1c3)](_0xcca397(0x187)+_0x13d193[_0xcca397(0x181)]),console[_0xcca397(0x1c3)]('Revision:\x20'+_0x13d193[_0xcca397(0x2e2)]),console[_0xcca397(0x1c3)]('Files\x20to\x20upload:\x20'+_0x13d193[_0xcca397(0x157)]);_0x13d193['targetExists']&&(console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x292)](_0xcca397(0x1d2)+_0x13d193[_0xcca397(0x181)]+_0xcca397(0x1df)+_0x13d193[_0xcca397(0x2a0)]+')')),console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x292)](_0xcca397(0x1ac))));if(_0x151bd5['dryRun'])return console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x292)](_0xcca397(0x24b))),0x0;if(!_0x151bd5[_0xcca397(0x1ce)]){if(!isInteractive())return console['error'](a50_0x3545cd['red'](_0xcca397(0x306)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x218)](_0xcca397(0x2ce))),0x1;const _0x4dedbf=_0x13d193[_0xcca397(0x180)]||a50_0x44ead0[_0xcca397(0x18f)](_0x4a1f5c),_0x48d613=_0x13d193[_0xcca397(0x1b6)]?_0xcca397(0x1c7)+_0x5884d7+'\x22\x20with\x20new\x20revision?':'\x0aClone\x20\x22'+_0x4dedbf+'\x22\x20to\x20new\x20project\x20\x22'+_0x5884d7+'\x22?',_0x2c59dd=await confirmKey(_0x48d613);if(!_0x2c59dd)return console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x292)](_0xcca397(0x172))),0x1;}const _0x4f06b0=await withSpinner(_0x13d193['targetExists']?_0xcca397(0x277)+_0x5884d7+'...':'Cloning\x20to\x20'+_0x5884d7+_0xcca397(0x2b4),()=>_0x13ca0b[_0xcca397(0x228)][_0xcca397(0x2f9)](_0x13d193),{'verbose':_0x151bd5[_0xcca397(0x2ea)]}),_0x432d62=_0x4f06b0[_0xcca397(0x2e5)];return console[_0xcca397(0x1c3)](a50_0x3545cd[_0xcca397(0x237)](_0x13d193[_0xcca397(0x1b6)]?_0xcca397(0x1b7):_0xcca397(0x16f))),console[_0xcca397(0x1c3)](_0xcca397(0x185)+_0x432d62['newProjectName']),console['error'](_0xcca397(0x1c1)+_0x432d62[_0xcca397(0x18a)]),console[_0xcca397(0x1c3)](_0xcca397(0x219)+_0x432d62[_0xcca397(0x2e2)]),await this['showWorkflowConsoleUrl'](_0x13ca0b,_0x432d62[_0xcca397(0x181)],_0x151bd5[_0xcca397(0x205)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a50_0x3913c0(0x29a);[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x189);async['execute'](_0x44774d){const _0x5c6512=a50_0x3913c0,{options:_0x5311fa,args:_0x3c1447,tdx:_0x9bbb0a}=_0x44774d,_0x12f3b4=_0x3c1447[0x0];if(!_0x12f3b4)return console[_0x5c6512(0x1c3)](_0x5c6512(0x244)),console[_0x5c6512(0x1c3)](_0x5c6512(0x1d8)),0x1;_0x5311fa[_0x5c6512(0x2ea)]&&console[_0x5c6512(0x1c3)](_0x5c6512(0x1a0)+_0x12f3b4);if(!_0x5311fa[_0x5c6512(0x1ce)]){if(!isInteractive())return console[_0x5c6512(0x1c3)](a50_0x3545cd['red'](_0x5c6512(0x306)),_0x5c6512(0x1ba)),console[_0x5c6512(0x1c3)](a50_0x3545cd[_0x5c6512(0x218)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4478ba=await confirmKey(_0x5c6512(0x1fe)+_0x12f3b4+_0x5c6512(0x264));if(!_0x4478ba)return console[_0x5c6512(0x1c3)](a50_0x3545cd['yellow'](_0x5c6512(0x172))),0x1;}const _0x4178f3=await withSpinner(_0x5c6512(0x257)+_0x12f3b4+'...',()=>_0x9bbb0a[_0x5c6512(0x228)]['delete'](_0x12f3b4),{'verbose':_0x5311fa['verbose']}),_0x32674b=_0x4178f3[_0x5c6512(0x2e5)];return console[_0x5c6512(0x1c3)](_0x5c6512(0x194)+_0x32674b[_0x5c6512(0x1ae)]),console[_0x5c6512(0x1c3)](_0x5c6512(0x1c1)+_0x32674b[_0x5c6512(0x26b)]),0x0;}}export function parseKeyValue(_0x18d66b){const _0xdf293e=a50_0x3913c0,_0x3e66e1=_0x18d66b[_0xdf293e(0x20a)]('=');if(_0x3e66e1===-0x1)throw new Error(_0xdf293e(0x241)+_0x18d66b+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x53b84d=_0x18d66b[_0xdf293e(0x1b3)](0x0,_0x3e66e1),_0x3e7efb=_0x18d66b[_0xdf293e(0x1b3)](_0x3e66e1+0x1);if(!_0x53b84d)throw new Error(_0xdf293e(0x2f1));return{'key':_0x53b84d,'value':_0x3e7efb};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]='workflow:secrets:list';[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x211);async[a50_0x3913c0(0x1c5)](_0xcc9345){const _0xee8349=a50_0x3913c0,{options:_0x124c55,args:_0x1c87da,tdx:_0x4ad009}=_0xcc9345,_0x258a8c=this[_0xee8349(0x1ee)](_0x1c87da,_0x124c55);if(!_0x258a8c)return 0x1;_0x124c55[_0xee8349(0x2ea)]&&console[_0xee8349(0x1c3)](_0xee8349(0x1a0)+_0x258a8c);const _0x47ea43=await withSpinner(_0xee8349(0x16e),()=>_0x4ad009[_0xee8349(0x228)][_0xee8349(0x273)](_0x258a8c),{'verbose':_0x124c55[_0xee8349(0x2ea)]}),{secrets:_0x4f791b}=_0x47ea43[_0xee8349(0x2e5)];return console[_0xee8349(0x1c3)](_0xee8349(0x234)+_0x4f791b[_0xee8349(0x1ab)]+_0xee8349(0x2f3)+(_0x4f791b['length']!==0x1?'s':'')),await handleSDKOutput(_0x4f791b,_0x124c55),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]=a50_0x3913c0(0x25b);['description']=a50_0x3913c0(0x2ab);async[a50_0x3913c0(0x1c5)](_0xf81133){const _0x5cf0c4=a50_0x3913c0,{options:_0x2c8c9a,args:_0x3a9a5c,tdx:_0x3244f6}=_0xf81133;let _0x21c783,_0x30e870;if(_0x3a9a5c[_0x5cf0c4(0x1ab)]>=0x2)_0x21c783=_0x3a9a5c[0x0],_0x30e870=_0x3a9a5c[0x1];else{if(_0x3a9a5c[_0x5cf0c4(0x1ab)]===0x1&&_0x2c8c9a[_0x5cf0c4(0x2c4)])_0x21c783=_0x2c8c9a[_0x5cf0c4(0x2c4)],_0x30e870=_0x3a9a5c[0x0];else return _0x3a9a5c[_0x5cf0c4(0x1ab)]===0x1?(console[_0x5cf0c4(0x1c3)](_0x5cf0c4(0x223)),console[_0x5cf0c4(0x1c3)](_0x5cf0c4(0x163)),0x1):(console[_0x5cf0c4(0x1c3)](_0x5cf0c4(0x1f1)),console['error'](_0x5cf0c4(0x184)),0x1);}let _0x5e6840,_0x4a3e61;try{({key:_0x5e6840,value:_0x4a3e61}=parseKeyValue(_0x30e870));}catch(_0x17009d){return _0x17009d instanceof Error&&console['error'](a50_0x3545cd['red']('Error:'),_0x17009d[_0x5cf0c4(0x1f3)]),0x1;}_0x2c8c9a[_0x5cf0c4(0x2ea)]&&(console[_0x5cf0c4(0x1c3)](_0x5cf0c4(0x1a0)+_0x21c783),console[_0x5cf0c4(0x1c3)](_0x5cf0c4(0x1d9)+_0x5e6840));const _0x4ec85e=await withSpinner(_0x5cf0c4(0x291),()=>_0x3244f6[_0x5cf0c4(0x228)]['setSecret'](_0x21c783,_0x5e6840,_0x4a3e61),{'verbose':_0x2c8c9a[_0x5cf0c4(0x2ea)]}),_0x8ea6b3=_0x4ec85e[_0x5cf0c4(0x2e5)];return console['error']('✔\x20Secret\x20\x27'+_0x8ea6b3['key']+_0x5cf0c4(0x1b0)+_0x8ea6b3['projectName']+'\x27'),(_0x2c8c9a[_0x5cf0c4(0x2aa)]||_0x2c8c9a['jsonl'])&&await handleSingleObjectOutput(_0x8ea6b3,_0x2c8c9a),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']='workflow:secrets:delete';[a50_0x3913c0(0x1a4)]=a50_0x3913c0(0x20e);async[a50_0x3913c0(0x1c5)](_0xfe8b8){const _0x324e43=a50_0x3913c0,{options:_0x4ba9de,args:_0x5c1d1b,tdx:_0x4cd71d}=_0xfe8b8;let _0x4e97e2,_0x211f9c;if(_0x5c1d1b[_0x324e43(0x1ab)]>=0x2)_0x4e97e2=_0x5c1d1b[0x0],_0x211f9c=_0x5c1d1b[0x1];else{if(_0x5c1d1b['length']===0x1&&_0x4ba9de['workflowProject'])_0x4e97e2=_0x4ba9de[_0x324e43(0x2c4)],_0x211f9c=_0x5c1d1b[0x0];else return _0x5c1d1b[_0x324e43(0x1ab)]===0x1?(console[_0x324e43(0x1c3)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x324e43(0x1c3)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error'](_0x324e43(0x15c)),console['error'](_0x324e43(0x17d)),0x1);}_0x4ba9de['verbose']&&(console[_0x324e43(0x1c3)](_0x324e43(0x1a0)+_0x4e97e2),console[_0x324e43(0x1c3)](_0x324e43(0x1d9)+_0x211f9c));if(!_0x4ba9de[_0x324e43(0x1ce)]){if(!isInteractive())return console[_0x324e43(0x1c3)](a50_0x3545cd[_0x324e43(0x27f)](_0x324e43(0x306)),_0x324e43(0x1ba)),console['error'](a50_0x3545cd[_0x324e43(0x218)](_0x324e43(0x2ce))),0x1;const _0x555cfa=await confirmKey(_0x324e43(0x2f8)+_0x211f9c+_0x324e43(0x167)+_0x4e97e2+'\x27?');if(!_0x555cfa)return console[_0x324e43(0x1c3)](a50_0x3545cd[_0x324e43(0x292)]('Cancelled')),0x1;}const _0x266fa1=await withSpinner(_0x324e43(0x27e),()=>_0x4cd71d[_0x324e43(0x228)][_0x324e43(0x2a9)](_0x4e97e2,_0x211f9c),{'verbose':_0x4ba9de[_0x324e43(0x2ea)]}),_0x5d1e0a=_0x266fa1[_0x324e43(0x2e5)];return console[_0x324e43(0x1c3)](_0x324e43(0x2be)+_0x5d1e0a[_0x324e43(0x1fc)]+_0x324e43(0x182)+_0x5d1e0a[_0x324e43(0x1ae)]+'\x27'),(_0x4ba9de[_0x324e43(0x2aa)]||_0x4ba9de[_0x324e43(0x30e)])&&await handleSingleObjectOutput(_0x5d1e0a,_0x4ba9de),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(_0x47c888){const _0x4376ee=a50_0x3913c0,_0x3f64c4=Math[_0x4376ee(0x1e8)](_0x47c888/0x3e8),_0xf8116a=Math[_0x4376ee(0x1e8)](_0x3f64c4/0x3c),_0x5d4753=Math['floor'](_0xf8116a/0x3c),_0x3a53ed=Math[_0x4376ee(0x1e8)](_0x5d4753/0x18);if(_0x3a53ed>0x0){const _0x21025e=_0x5d4753%0x18;return _0x21025e>0x0?_0x3a53ed+'d\x20'+_0x21025e+'h':_0x3a53ed+'d';}else{if(_0x5d4753>0x0){const _0x45b19b=_0xf8116a%0x3c;return _0x45b19b>0x0?_0x5d4753+'h\x20'+_0x45b19b+'m':_0x5d4753+'h';}else{if(_0xf8116a>0x0){const _0x4b87a3=_0x3f64c4%0x3c;return _0x4b87a3>0x0?_0xf8116a+'m\x20'+_0x4b87a3+'s':_0xf8116a+'m';}else return _0x3f64c4+'s';}}}function formatTimestamp(_0x238e3a,_0x24f9c2){const _0x1bd8ca=a50_0x3913c0,_0x228e69=new Date(_0x238e3a),_0x282319=String(_0x228e69[_0x1bd8ca(0x2eb)]())[_0x1bd8ca(0x2db)](0x2,'0'),_0x335647=String(_0x228e69[_0x1bd8ca(0x166)]())[_0x1bd8ca(0x2db)](0x2,'0'),_0x17b8dc=_0x282319+':'+_0x335647,_0x53b66e=_0x228e69[_0x1bd8ca(0x206)]()===_0x24f9c2[_0x1bd8ca(0x206)]()&&_0x228e69['getMonth']()===_0x24f9c2[_0x1bd8ca(0x2bd)]()&&_0x228e69[_0x1bd8ca(0x284)]()===_0x24f9c2[_0x1bd8ca(0x284)]();if(_0x53b66e)return _0x17b8dc;else{const _0xbd942b=String(_0x228e69[_0x1bd8ca(0x2bd)]()+0x1)[_0x1bd8ca(0x2db)](0x2,'0'),_0x386766=String(_0x228e69[_0x1bd8ca(0x284)]())['padStart'](0x2,'0');return _0xbd942b+'-'+_0x386766+'\x20'+_0x17b8dc;}}function formatDate(_0x56aa06){const _0x45fd1d=a50_0x3913c0,_0x1b6602=_0x56aa06[_0x45fd1d(0x206)](),_0x4211cf=String(_0x56aa06[_0x45fd1d(0x2bd)]()+0x1)['padStart'](0x2,'0'),_0x3878cf=String(_0x56aa06[_0x45fd1d(0x284)]())[_0x45fd1d(0x2db)](0x2,'0');return _0x1b6602+'-'+_0x4211cf+'-'+_0x3878cf;}function getTaskStateIcon(_0x3ab5ab){const _0x2f4deb={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x2f4deb[_0x3ab5ab]||'⚪';}function getBarChar(_0x1c1033){const _0x34f79b=a50_0x3913c0;return _0x1c1033===_0x34f79b(0x1c3)||_0x1c1033===_0x34f79b(0x259)?'×':'─';}function getBarColor(_0x41ad58){const _0x3f4de3=a50_0x3913c0,_0x589eb8={'success':a50_0x3545cd[_0x3f4de3(0x237)],'error':a50_0x3545cd['red'],'group_error':a50_0x3545cd[_0x3f4de3(0x27f)],'running':a50_0x3545cd[_0x3f4de3(0x1ea)],'blocked':a50_0x3545cd['yellow'],'planned':a50_0x3545cd['dim'],'canceling':a50_0x3545cd['yellow']};return _0x589eb8[_0x41ad58]||a50_0x3545cd['white'];}function parseTaskName(_0x47fd68){const _0x1cb388=a50_0x3913c0;let _0x27cfbf=_0x47fd68['replace'](/^\++/,'');const _0xc00406=_0x27cfbf[_0x1cb388(0x168)]('+'),_0x4ddd7a=_0xc00406[_0x1cb388(0x1ab)]>0x1?_0xc00406[_0x1cb388(0x1ab)]-0x2:0x0,_0x12ecf6=_0xc00406[_0xc00406[_0x1cb388(0x1ab)]-0x1]||_0x27cfbf;return{'level':_0x4ddd7a,'name':'+'+_0x12ecf6};}function truncateTaskName(_0xa112a1,_0x1ca5bf){const _0x336057=a50_0x3913c0,_0xb8d8a0=stringWidth(_0xa112a1);if(_0xb8d8a0<=_0x1ca5bf)return _0xa112a1;let _0x48a719=_0xa112a1;while(stringWidth(_0x48a719+'…')>_0x1ca5bf&&_0x48a719[_0x336057(0x1ab)]>0x0){_0x48a719=_0x48a719[_0x336057(0x1eb)](0x0,-0x1);}return _0x48a719+'…';}function calculateTimeScale(_0x55f228,_0x24bc21){const _0x248c15=a50_0x3913c0;return{'startTime':_0x55f228['start'],'endTime':_0x55f228[_0x248c15(0x19a)],'durationMs':_0x55f228[_0x248c15(0x2ba)],'msPerChar':_0x55f228['duration']/_0x24bc21};}function timeToPosition(_0x4361a0,_0x260b3a,_0x23c5d3){const _0x4beeb2=a50_0x3913c0,_0x4a667c=_0x4361a0-_0x260b3a['startTime'],_0x41321a=Math['floor'](_0x4a667c/_0x260b3a[_0x4beeb2(0x1ed)]);return Math[_0x4beeb2(0x1f0)](0x0,Math['min'](_0x41321a,_0x23c5d3));}function renderTimeAxis(_0x2ab877,_0x74b0c){const _0xcb9c90=a50_0x3913c0,_0x17b0f0=Math[_0xcb9c90(0x272)](TIMELINE_CONFIG[_0xcb9c90(0x2c1)],Math[_0xcb9c90(0x1f0)](TIMELINE_CONFIG[_0xcb9c90(0x311)],Math[_0xcb9c90(0x1e8)](_0x74b0c/TIMELINE_CONFIG[_0xcb9c90(0x289)]))),_0x51bbba=_0x2ab877[_0xcb9c90(0x16c)]/(_0x17b0f0-0x1),_0x470bb9=new Date(_0x2ab877[_0xcb9c90(0x2e9)]),_0x45bf90=[];for(let _0x5f4418=0x0;_0x5f4418<_0x17b0f0;_0x5f4418++){const _0x3c4a8f=_0x2ab877[_0xcb9c90(0x2e9)]+_0x5f4418*_0x51bbba,_0x17fc45=timeToPosition(_0x3c4a8f,_0x2ab877,_0x74b0c),_0x39b6d5=formatTimestamp(_0x3c4a8f,_0x470bb9);_0x45bf90['push']({'pos':_0x17fc45,'text':_0x39b6d5});}const _0x1ce9fe=new Array(_0x74b0c)[_0xcb9c90(0x2b8)]('\x20');let _0x9f671f=-0x1;for(const {pos:_0x32d001,text:_0x520322}of _0x45bf90){let _0x23f0ee=Math[_0xcb9c90(0x1f0)](0x0,_0x32d001-Math['floor'](_0x520322[_0xcb9c90(0x1ab)]/0x2));_0x23f0ee<=_0x9f671f+TIMELINE_CONFIG[_0xcb9c90(0x2f6)]&&(_0x23f0ee=_0x9f671f+TIMELINE_CONFIG[_0xcb9c90(0x2f6)]+0x1);_0x23f0ee+_0x520322[_0xcb9c90(0x1ab)]>_0x74b0c&&(_0x23f0ee=_0x74b0c-_0x520322['length']);if(_0x23f0ee>=0x0&&_0x23f0ee+_0x520322[_0xcb9c90(0x1ab)]<=_0x74b0c&&_0x23f0ee>_0x9f671f){for(let _0x247481=0x0;_0x247481<_0x520322['length'];_0x247481++){_0x1ce9fe[_0x23f0ee+_0x247481]=_0x520322[_0x247481];}_0x9f671f=_0x23f0ee+_0x520322[_0xcb9c90(0x1ab)]-0x1;}}return _0x1ce9fe[_0xcb9c90(0x1d5)]('');}function renderTaskRow(_0x535897,_0x1864dd,_0x2de352,_0x3f839a){const _0x568b4d=a50_0x3913c0,{level:_0x481f81,name:_0x436254}=parseTaskName(_0x535897['name']),_0x4c67e5='\x20'[_0x568b4d(0x230)](_0x481f81),_0x3fda2b=_0x535897['window']?'('+formatElapsed(_0x535897[_0x568b4d(0x304)][_0x568b4d(0x2ba)])+')':'',_0x21ab79=stringWidth(_0x3fda2b),_0x32f42c=_0x481f81*0x1,_0x4870a2=_0x3f839a-_0x32f42c-_0x21ab79-0x1,_0x32d246=truncateTaskName(_0x436254,_0x4870a2),_0x361c8a=_0x4c67e5+_0x32d246,_0x57069e=stringWidth(_0x361c8a),_0x43871d=_0x3f839a-_0x57069e-_0x21ab79,_0x242653=_0x361c8a+'\x20'[_0x568b4d(0x230)](Math['max'](0x1,_0x43871d))+a50_0x3545cd[_0x568b4d(0x218)](_0x3fda2b),_0x2a4171=getTaskStateIcon(_0x535897[_0x568b4d(0x2b6)]),_0x157474=new Array(_0x2de352)['fill']('\x20');if(_0x535897[_0x568b4d(0x304)]){const _0x18cec1=timeToPosition(_0x535897['window']['start'],_0x1864dd,_0x2de352),_0x4b3494=timeToPosition(_0x535897[_0x568b4d(0x304)][_0x568b4d(0x19a)],_0x1864dd,_0x2de352),_0x1295e2=getBarChar(_0x535897[_0x568b4d(0x2b6)]),_0x5d1303=Math[_0x568b4d(0x1f0)](_0x18cec1+0x1,_0x4b3494);for(let _0x10194b=_0x18cec1;_0x10194b<Math[_0x568b4d(0x272)](_0x5d1303,_0x2de352);_0x10194b++){_0x157474[_0x10194b]=_0x1295e2;}}const _0x2ebe1f=getBarColor(_0x535897[_0x568b4d(0x2b6)]),_0x1b5a42=_0x157474['map'](_0x41b1b5=>_0x41b1b5==='\x20'?'\x20':_0x2ebe1f(_0x41b1b5))[_0x568b4d(0x1d5)]('');return _0x2a4171+'\x20'+_0x242653+'│'+_0x1b5a42+'│';}function a50_0x1ab4(_0x301d9a,_0x16fe58){_0x301d9a=_0x301d9a-0x157;const _0x31cb3c=a50_0x31cb();let _0x1ab414=_0x31cb3c[_0x301d9a];return _0x1ab414;}function calculateStats(_0x132d31){const _0x102b7f=a50_0x3913c0,_0x23c18b={'total':_0x132d31[_0x102b7f(0x1ab)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x46079d of _0x132d31){if(_0x46079d[_0x102b7f(0x2b6)]===_0x102b7f(0x17b))_0x23c18b[_0x102b7f(0x17b)]++;else{if(_0x46079d[_0x102b7f(0x2b6)]===_0x102b7f(0x1c3)||_0x46079d[_0x102b7f(0x2b6)]===_0x102b7f(0x259))_0x23c18b[_0x102b7f(0x1c3)]++;else _0x46079d[_0x102b7f(0x2b6)]===_0x102b7f(0x1dc)?_0x23c18b[_0x102b7f(0x1dc)]++:_0x23c18b[_0x102b7f(0x24e)]++;}}return _0x23c18b;}function formatStats(_0x3a1a1f){const _0x235a55=a50_0x3913c0;return[_0x235a55(0x1ec)+_0x3a1a1f['total'],'✅\x20'+_0x3a1a1f[_0x235a55(0x17b)],'❌\x20'+_0x3a1a1f[_0x235a55(0x1c3)],_0x235a55(0x192)+_0x3a1a1f['running'],'⏳\x20'+_0x3a1a1f[_0x235a55(0x24e)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a50_0x3913c0(0x276)]='workflow:timeline';[a50_0x3913c0(0x1a4)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a50_0x3913c0(0x1c5)](_0x1abcdc){const _0x2f3a79=a50_0x3913c0,{options:_0x1a34c5,args:_0x4a6611,tdx:_0x21c4b6}=_0x1abcdc;let _0x147bce,_0x2838ed,_0x2230d0=![];if(_0x4a6611[0x0]){if(_0x4a6611[0x0]['includes']('.')){const _0x280b97=this[_0x2f3a79(0x1f5)](_0x4a6611,_0x1a34c5);if(!_0x280b97)return 0x1;_0x147bce=_0x280b97[_0x2f3a79(0x1ae)],_0x2838ed=_0x280b97[_0x2f3a79(0x26d)];}else{_0x2838ed=_0x4a6611[0x0],_0x147bce=_0x1a34c5[_0x2f3a79(0x2c4)];if(!_0x147bce)return console[_0x2f3a79(0x1c3)](a50_0x3545cd[_0x2f3a79(0x27f)](_0x2f3a79(0x197)),_0x2f3a79(0x2b5)),0x1;_0x2230d0=!![];}}else{const _0x5d0677=this['parseProjectWorkflowPattern'](_0x4a6611,_0x1a34c5);if(!_0x5d0677)return 0x1;_0x147bce=_0x5d0677[_0x2f3a79(0x1ae)],_0x2838ed=_0x5d0677[_0x2f3a79(0x26d)];}if(_0x1a34c5[_0x2f3a79(0x2ea)]){if(_0x147bce&&_0x2838ed)console[_0x2f3a79(0x1c3)](_0x2f3a79(0x159)+_0x147bce+'.'+_0x2838ed);else _0x147bce&&console[_0x2f3a79(0x1c3)](_0x2f3a79(0x220)+_0x147bce);}const _0x54ab77=_0x1a34c5['attemptId'],_0x17e8cc=_0x1a34c5[_0x2f3a79(0x288)];if(_0x54ab77){_0x17e8cc&&console['error'](a50_0x3545cd[_0x2f3a79(0x292)](_0x2f3a79(0x298)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x56ca17=_0x1a34c5[_0x2f3a79(0x200)];return _0x56ca17?await this[_0x2f3a79(0x2c3)](_0x1abcdc,_0x54ab77):await this['renderSingleTimeline'](_0x1abcdc,_0x54ab77,_0x1a34c5),0x0;}if(_0x17e8cc){const _0x2fa370=await withSpinner(_0x2f3a79(0x15e),()=>_0x21c4b6[_0x2f3a79(0x228)][_0x2f3a79(0x265)]({'projectName':_0x147bce,'workflowName':_0x2838ed,'limit':0x64}),{'verbose':_0x1a34c5[_0x2f3a79(0x2ea)]}),_0x4ec9da=_0x2fa370['data']['find'](_0x1d2702=>_0x1d2702['id']===_0x17e8cc);if(!_0x4ec9da)return console[_0x2f3a79(0x1c3)](a50_0x3545cd['red'](_0x2f3a79(0x197)),_0x2f3a79(0x2a4)+_0x17e8cc),0x1;if(!_0x4ec9da['lastAttempt']?.['id'])return console['error'](a50_0x3545cd[_0x2f3a79(0x27f)](_0x2f3a79(0x197)),_0x2f3a79(0x1b8)+_0x17e8cc+_0x2f3a79(0x1c6)),0x1;const _0x10bfe8=_0x4ec9da[_0x2f3a79(0x1b1)]['id'];_0x1a34c5[_0x2f3a79(0x2ea)]&&console[_0x2f3a79(0x1c3)]('Using\x20attempt\x20'+_0x10bfe8+_0x2f3a79(0x1a8)+_0x17e8cc);const _0x209d44=_0x1a34c5[_0x2f3a79(0x200)];return _0x209d44?await this[_0x2f3a79(0x2c3)](_0x1abcdc,_0x10bfe8):await this['renderSingleTimeline'](_0x1abcdc,_0x10bfe8,_0x1a34c5),0x0;}const _0x37bb89=await withSpinner(_0x2f3a79(0x297),()=>_0x21c4b6[_0x2f3a79(0x228)][_0x2f3a79(0x265)]({'projectName':_0x147bce,'workflowName':_0x2838ed,'limit':_0x1a34c5[_0x2f3a79(0x18e)]||0x32}),{'verbose':_0x1a34c5[_0x2f3a79(0x2ea)]}),_0x32553b=_0x37bb89['data'];if(_0x32553b[_0x2f3a79(0x1ab)]===0x0){if(_0x147bce&&_0x2838ed)console[_0x2f3a79(0x1c3)](_0x2f3a79(0x17e)+_0x147bce+'.'+_0x2838ed);else _0x147bce?console[_0x2f3a79(0x1c3)](_0x2f3a79(0x175)+_0x147bce):(console['error'](_0x2f3a79(0x2dd)),console[_0x2f3a79(0x1c3)](a50_0x3545cd[_0x2f3a79(0x218)](_0x2f3a79(0x229))));return 0x0;}_0x32553b[_0x2f3a79(0x28f)]((_0x42b158,_0x13d2fa)=>{const _0x2d39ef=_0x2f3a79,_0x6ee01c=_0x42b158['sessionTime']||'',_0x23d175=_0x13d2fa['sessionTime']||'';return _0x23d175[_0x2d39ef(0x233)](_0x6ee01c);});if(_0x1a34c5[_0x2f3a79(0x2aa)]||_0x1a34c5['jsonl'])return await handleSDKOutput(_0x32553b,_0x1a34c5),0x0;let _0x4bca3a;if(_0x2230d0){const _0x25cd05=_0x32553b[0x0];if(!_0x25cd05[_0x2f3a79(0x1b1)]?.['id'])return console['error'](_0x2f3a79(0x19e)),0x0;_0x4bca3a=_0x25cd05[_0x2f3a79(0x1b1)]['id'],_0x1a34c5['verbose']&&console['error'](_0x2f3a79(0x22e)+_0x25cd05[_0x2f3a79(0x1aa)]);}else{const _0x217c32=_0x32553b[_0x2f3a79(0x19c)](_0x13a4d8=>{const _0x3d7127=_0x2f3a79,_0x2e311d=getAttemptStatusDisplay(_0x13a4d8[_0x3d7127(0x1b1)]);return{'title':_0x13a4d8[_0x3d7127(0x171)]?.['name']+'.'+_0x13a4d8['workflow']?.['name']+_0x3d7127(0x312)+_0x13a4d8[_0x3d7127(0x1aa)]+'\x20'+_0x2e311d[_0x3d7127(0x17c)],'value':_0x13a4d8[_0x3d7127(0x1b1)]?.['id']||'','description':_0x2e311d[_0x3d7127(0x22c)]};}),_0x1508ae=await a50_0x5c8662({'type':_0x2f3a79(0x170),'name':'attemptId','message':_0x2f3a79(0x246),'choices':_0x217c32[_0x2f3a79(0x238)](_0x1c6a1d=>_0x1c6a1d[_0x2f3a79(0x25e)]!=='')});if(!_0x1508ae[_0x2f3a79(0x245)])return 0x0;_0x4bca3a=_0x1508ae['attemptId'];}const _0x3c5a08=_0x1a34c5['follow'];return _0x3c5a08?await this['pollTimeline'](_0x1abcdc,_0x4bca3a):await this[_0x2f3a79(0x2c5)](_0x1abcdc,_0x4bca3a,_0x1a34c5),0x0;}async[a50_0x3913c0(0x2c5)](_0x366d29,_0x1dc5aa,_0x1373a7){const _0x249435=a50_0x3913c0,{tdx:_0xd848d6}=_0x366d29;let _0x142afd,_0x3191b1;try{[_0x142afd,_0x3191b1]=await Promise[_0x249435(0x1d0)]([_0xd848d6[_0x249435(0x228)][_0x249435(0x201)](_0x1dc5aa),_0xd848d6[_0x249435(0x228)][_0x249435(0x15a)](_0x1dc5aa,![])]);}catch(_0x5be7d8){console[_0x249435(0x1c3)](a50_0x3545cd['red'](_0x249435(0x2a8)));_0x1373a7['verbose']&&console['error'](_0x5be7d8);throw _0x5be7d8;}if(_0x1373a7['json']||_0x1373a7[_0x249435(0x30e)]){const _0x554ba1=this[_0x249435(0x160)](_0x142afd,_0x3191b1);await handleSDKOutput([_0x554ba1],_0x1373a7);return;}const _0x25e1a9=_0xd848d6['context'][_0x249435(0x205)],_0x11383a=this[_0x249435(0x28a)](_0x142afd,_0x3191b1,_0x25e1a9);console[_0x249435(0x24d)](_0x11383a);}async['pollTimeline'](_0x38fc42,_0x29eb2c){const _0x423762=a50_0x3913c0,{tdx:_0x204bc2}=_0x38fc42,_0xf3bc61=TIMELINE_CONFIG[_0x423762(0x18d)],_0xb875a4=TIMELINE_CONFIG[_0x423762(0x23c)];let _0x356055=0x0;while(_0x356055<_0xb875a4){process[_0x423762(0x21d)][_0x423762(0x15f)]&&process[_0x423762(0x21d)]['write']('\x1bc');let _0x845bf4,_0x5cfd1c;try{[_0x845bf4,_0x5cfd1c]=await Promise[_0x423762(0x1d0)]([_0x204bc2[_0x423762(0x228)][_0x423762(0x201)](_0x29eb2c),_0x204bc2[_0x423762(0x228)][_0x423762(0x15a)](_0x29eb2c,![])]);}catch(_0x249475){console['error'](a50_0x3545cd['red'](_0x423762(0x1d6)));_0x356055>0x0&&console[_0x423762(0x1c3)](a50_0x3545cd[_0x423762(0x218)](_0x423762(0x227)+_0x356055));throw _0x249475;}const _0x3cb3db=_0x204bc2[_0x423762(0x25c)][_0x423762(0x205)],_0x281f98=this[_0x423762(0x28a)](_0x845bf4,_0x5cfd1c,_0x3cb3db);console['log'](_0x281f98);const _0x410ea6=_0x845bf4['done']&&_0x5cfd1c[_0x423762(0x21e)](_0x60f28b=>_0x60f28b[_0x423762(0x2b6)]!==_0x423762(0x1dc)&&_0x60f28b[_0x423762(0x2b6)]!==_0x423762(0x1be));if(_0x410ea6){console[_0x423762(0x1c3)](a50_0x3545cd['green'](_0x423762(0x2fb)));break;}console[_0x423762(0x1c3)](a50_0x3545cd[_0x423762(0x218)](_0x423762(0x2fd)+_0x356055*0x2+_0x423762(0x2f5))),await new Promise(_0x1eccca=>setTimeout(_0x1eccca,_0xf3bc61)),_0x356055++;}_0x356055>=_0xb875a4&&console[_0x423762(0x1c3)](a50_0x3545cd['yellow']('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a50_0x3913c0(0x28a)](_0x5e20eb,_0x52edc1,_0x2a248f){const _0x243b1b=a50_0x3913c0,_0x2bd311=[],_0x3ad5e3=TIMELINE_CONFIG[_0x243b1b(0x29e)],_0x3531cd=0x5,_0x2305a9=process[_0x243b1b(0x21d)][_0x243b1b(0x30c)]||0x78,_0x558e8c=_0x2305a9-_0x3ad5e3-_0x3531cd,_0x458a0b=Math[_0x243b1b(0x1f0)](TIMELINE_CONFIG[_0x243b1b(0x25a)],Math[_0x243b1b(0x272)](_0x558e8c,TIMELINE_CONFIG[_0x243b1b(0x1e7)])),_0x3aed4c=new Date(_0x5e20eb['createdAt'])[_0x243b1b(0x266)](),_0x354e0a=_0x5e20eb[_0x243b1b(0x2c2)]?new Date(_0x5e20eb[_0x243b1b(0x2c2)])[_0x243b1b(0x266)]():Date['now'](),_0x20d280={'start':_0x3aed4c,'end':_0x354e0a,'duration':_0x354e0a-_0x3aed4c},_0x2ec0b5=new Map(),_0x80b6be=[];for(const _0x18a7b4 of _0x52edc1){if(_0x18a7b4[_0x243b1b(0x20d)]){const _0x401bc5=new Date(_0x18a7b4[_0x243b1b(0x20d)])[_0x243b1b(0x266)](),_0x3c216e=_0x18a7b4['updatedAt']?new Date(_0x18a7b4[_0x243b1b(0x221)])[_0x243b1b(0x266)]():Date[_0x243b1b(0x202)](),_0x28afc8={'start':_0x401bc5,'end':_0x3c216e,'duration':_0x3c216e-_0x401bc5};_0x2ec0b5[_0x243b1b(0x2fc)](_0x18a7b4['id'],_0x28afc8),_0x80b6be[_0x243b1b(0x1f8)]({'name':_0x18a7b4[_0x243b1b(0x1e2)],'state':_0x18a7b4[_0x243b1b(0x2b6)]||_0x243b1b(0x2b9),'window':_0x28afc8});}else _0x80b6be[_0x243b1b(0x1f8)]({'name':_0x18a7b4[_0x243b1b(0x1e2)],'state':_0x18a7b4[_0x243b1b(0x2b6)]||_0x243b1b(0x1be),'window':undefined});}_0x80b6be[_0x243b1b(0x28f)]((_0x187b39,_0x29a9a2)=>{const _0x88cf39=_0x243b1b;if(!_0x187b39[_0x88cf39(0x304)])return 0x1;if(!_0x29a9a2[_0x88cf39(0x304)])return-0x1;return _0x187b39[_0x88cf39(0x304)][_0x88cf39(0x303)]-_0x29a9a2['window'][_0x88cf39(0x303)];});const _0x3d2146=_0x80b6be[_0x243b1b(0x1ab)],_0x36c3ef=_0x3d2146>TIMELINE_CONFIG[_0x243b1b(0x23d)];_0x36c3ef&&_0x80b6be[_0x243b1b(0x188)](TIMELINE_CONFIG[_0x243b1b(0x23d)]);const _0x43d34f=calculateTimeScale(_0x20d280,_0x458a0b),_0xcc46be=_0x5e20eb[_0x243b1b(0x1bf)]?_0x5e20eb['success']?a50_0x3545cd['green'](_0x243b1b(0x17b)):a50_0x3545cd[_0x243b1b(0x27f)]('error'):a50_0x3545cd[_0x243b1b(0x1ea)](_0x243b1b(0x1dc)),_0x5e7adb=_0x5e20eb[_0x243b1b(0x171)]?.['id'],_0x42987f=_0x5e20eb[_0x243b1b(0x288)];let _0x29052c;if(_0x5e7adb&&_0x42987f){const _0x1c3345=getWorkflowAttemptUrl(_0x2a248f,_0x5e7adb,_0x42987f,_0x5e20eb['id']);_0x29052c=hyperlink(a50_0x3545cd[_0x243b1b(0x218)](_0x5e20eb['id']),_0x1c3345);}else _0x29052c=a50_0x3545cd[_0x243b1b(0x218)](_0x5e20eb['id']);_0x2bd311[_0x243b1b(0x1f8)]('Attempt:\x20'+_0x29052c+_0x243b1b(0x312)+_0xcc46be+_0x243b1b(0x312)+formatElapsed(_0x20d280[_0x243b1b(0x2ba)]));if(_0x80b6be['length']>0x0){const _0x4f5bce=renderTimeAxis(_0x43d34f,_0x458a0b),_0x26ee86=new Date(_0x20d280[_0x243b1b(0x303)]),_0xd1cd9d=formatDate(_0x26ee86),_0x2ffd16=TIMELINE_CONFIG[_0x243b1b(0x2d8)]+TIMELINE_CONFIG[_0x243b1b(0x23b)]+_0x3ad5e3,_0x381175=_0xd1cd9d['padStart'](_0x2ffd16),_0x1cc11d=a50_0x3545cd[_0x243b1b(0x218)](_0x381175);_0x2bd311[_0x243b1b(0x1f8)](_0x1cc11d+'\x20'+_0x4f5bce);for(const _0x31efe8 of _0x80b6be){_0x2bd311['push'](renderTaskRow(_0x31efe8,_0x43d34f,_0x458a0b,_0x3ad5e3));}const _0x163f0e=calculateStats(_0x80b6be);_0x2bd311[_0x243b1b(0x1f8)](formatStats(_0x163f0e)),_0x36c3ef&&_0x2bd311[_0x243b1b(0x1f8)](a50_0x3545cd[_0x243b1b(0x292)](_0x243b1b(0x29d)+TIMELINE_CONFIG[_0x243b1b(0x23d)]+'\x20of\x20'+_0x3d2146+'\x20tasks')),_0x2bd311[_0x243b1b(0x1f8)](''),_0x2bd311[_0x243b1b(0x1f8)](a50_0x3545cd[_0x243b1b(0x218)](_0x243b1b(0x263))+(_0x243b1b(0x301)+_0x5e20eb['id']+_0x243b1b(0x2e1))+a50_0x3545cd[_0x243b1b(0x218)](_0x243b1b(0x1b9)));}else _0x2bd311[_0x243b1b(0x1f8)](_0x243b1b(0x18c));return _0x2bd311['join']('\x0a');}['buildTimelineData'](_0x33a866,_0x5c60e5){const _0x2db789=a50_0x3913c0,_0x4a69f4=new Date(_0x33a866[_0x2db789(0x21c)])[_0x2db789(0x266)](),_0x32a8a4=_0x33a866[_0x2db789(0x2c2)]?new Date(_0x33a866[_0x2db789(0x2c2)])['getTime']():Date['now'](),_0xcea7aa=_0x32a8a4-_0x4a69f4,_0x2b44f5=[];for(const _0x53b561 of _0x5c60e5){if(_0x53b561[_0x2db789(0x20d)]){const _0x4fb081=new Date(_0x53b561['startedAt'])[_0x2db789(0x266)](),_0x25651a=_0x53b561[_0x2db789(0x221)]?new Date(_0x53b561[_0x2db789(0x221)])[_0x2db789(0x266)]():Date[_0x2db789(0x202)]();_0x2b44f5[_0x2db789(0x1f8)]({'name':_0x53b561[_0x2db789(0x1e2)],'state':_0x53b561['state']||_0x2db789(0x2b9),'window':{'start':_0x4fb081,'end':_0x25651a,'duration':_0x25651a-_0x4fb081}});}else _0x2b44f5[_0x2db789(0x1f8)]({'name':_0x53b561[_0x2db789(0x1e2)],'state':_0x53b561[_0x2db789(0x2b6)]||_0x2db789(0x1be),'window':undefined});}const _0x274b24=calculateStats(_0x2b44f5);return{'attempt':{'id':_0x33a866['id'],'status':_0x33a866[_0x2db789(0x1bf)]?_0x33a866[_0x2db789(0x17b)]?_0x2db789(0x17b):_0x2db789(0x1c3):_0x2db789(0x1dc),'createdAt':_0x33a866[_0x2db789(0x21c)],'finishedAt':_0x33a866[_0x2db789(0x2c2)],'duration_ms':_0xcea7aa},'tasks':_0x2b44f5[_0x2db789(0x19c)](_0x3e8dad=>({'name':_0x3e8dad[_0x2db789(0x276)],'state':_0x3e8dad['state'],'startedAt':_0x3e8dad[_0x2db789(0x304)]?new Date(_0x3e8dad[_0x2db789(0x304)]['start'])[_0x2db789(0x16b)]():null,'updatedAt':_0x3e8dad['window']?new Date(_0x3e8dad['window']['end'])['toISOString']():null,'duration_ms':_0x3e8dad[_0x2db789(0x304)]?.[_0x2db789(0x2ba)]||null})),'stats':_0x274b24};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0x1a4c(_0xed3078,_0x31768a){_0xed3078=_0xed3078-0x143;const _0x42d838=a51_0x42d8();let _0x1a4c90=_0x42d838[_0xed3078];return _0x1a4c90;}(function(_0x3d16a6,_0x3137f4){const _0x5a8633=a51_0x1a4c,_0x5526b3=_0x3d16a6();while(!![]){try{const _0x3d289e=parseInt(_0x5a8633(0x14b))/0x1+parseInt(_0x5a8633(0x14c))/0x2+-parseInt(_0x5a8633(0x151))/0x3*(-parseInt(_0x5a8633(0x149))/0x4)+parseInt(_0x5a8633(0x14e))/0x5*(-parseInt(_0x5a8633(0x148))/0x6)+-parseInt(_0x5a8633(0x14f))/0x7+-parseInt(_0x5a8633(0x14d))/0x8+parseInt(_0x5a8633(0x147))/0x9;if(_0x3d289e===_0x3137f4)break;else _0x5526b3['push'](_0x5526b3['shift']());}catch(_0x3cafb3){_0x5526b3['push'](_0x5526b3['shift']());}}}(a51_0x42d8,0x99814));import{platform}from'os';import{getAPIKey}from'./config.js';function a51_0x42d8(){const _0x473187=['Authorization','190947tWtnyM','replace','length','entries','Bearer\x20','6326136poDyXa','48JjKCxX','56UkQdOW','version','401015fDbNrB','1277364LqBcNG','6492856Vvghvu','16480qQteho','8168692AvIsbM'];a51_0x42d8=function(){return _0x473187;};return a51_0x42d8();}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x2e9beb=a51_0x1a4c,_0x231295=getVersion(),_0x2be9ca=platform(),_0x176077=process[_0x2e9beb(0x14a)][_0x2e9beb(0x143)]('v','');return'tdx/'+_0x231295+'\x20('+_0x2be9ca+';\x20node/'+_0x176077+')';}export function getAuthHeaders(_0x418f24,_0x3f83a8,_0x32218b){const _0x317b8c=a51_0x1a4c,_0x346253=getVersion(),_0x26276a={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x346253};if(_0x32218b)_0x26276a[_0x317b8c(0x150)]=_0x317b8c(0x146)+_0x32218b;else _0x3f83a8&&(_0x26276a[_0x317b8c(0x150)]='TD1\x20'+_0x3f83a8);return _0x26276a;}export function toHeaderRecord(_0x37baef){const _0x20ffa6=a51_0x1a4c,_0x12a4b8={};for(const [_0x49fc7b,_0x4841a0]of Object[_0x20ffa6(0x145)](_0x37baef)){_0x4841a0!==undefined&&(_0x12a4b8[_0x49fc7b]=_0x4841a0);}return _0x12a4b8;}export function getTrinoHeaders(_0x2426bf,_0x53c70c,_0x432693){const _0x4a8e54=a51_0x1a4c,_0x6f8ea5=getAuthHeaders(_0x2426bf),_0xcbb649=toHeaderRecord(_0x6f8ea5);if(_0x432693)_0xcbb649[_0x4a8e54(0x150)]=_0x4a8e54(0x146)+_0x432693;else _0x53c70c&&(_0xcbb649['X-Trino-User']=_0x53c70c);return _0xcbb649;}export function hasAPIKey(_0x40f579){const _0x172fa8=a51_0x1a4c,_0x2d2f43=getAPIKey();return _0x2d2f43!==undefined&&_0x2d2f43[_0x172fa8(0x144)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x14ca6f,_0x12fc96){const _0x389835=a52_0x2331,_0x230b9e=_0x14ca6f();while(!![]){try{const _0x134085=-parseInt(_0x389835(0x112))/0x1+parseInt(_0x389835(0x10e))/0x2+-parseInt(_0x389835(0x120))/0x3*(-parseInt(_0x389835(0x12a))/0x4)+parseInt(_0x389835(0x10d))/0x5*(parseInt(_0x389835(0x11e))/0x6)+-parseInt(_0x389835(0x11d))/0x7*(parseInt(_0x389835(0x114))/0x8)+-parseInt(_0x389835(0xec))/0x9+parseInt(_0x389835(0x11f))/0xa*(parseInt(_0x389835(0xf3))/0xb);if(_0x134085===_0x12fc96)break;else _0x230b9e['push'](_0x230b9e['shift']());}catch(_0x43c6b4){_0x230b9e['push'](_0x230b9e['shift']());}}}(a52_0x3b5f,0x7899e));function a52_0x2331(_0x67ff9c,_0x24056a){_0x67ff9c=_0x67ff9c-0xe7;const _0x3b5fd8=a52_0x3b5f();let _0x233142=_0x3b5fd8[_0x67ff9c];return _0x233142;}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 a52_0x862dcf from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x2f2831){const _0x42278f=a52_0x2331;return _0x2f2831[_0x42278f(0xeb)]===_0x42278f(0x10f)||_0x2f2831[_0x42278f(0xeb)]===_0x42278f(0x121)||_0x2f2831[_0x42278f(0xeb)]==='tsv'||_0x2f2831['format']==='table'||_0x2f2831[_0x42278f(0x10f)]===!![]||_0x2f2831[_0x42278f(0x121)]===!![]||_0x2f2831[_0x42278f(0x11a)]===!![]||_0x2f2831[_0x42278f(0x127)]===!![];}export function parseOutputOptions(_0x58826a){const _0x2e466e=a52_0x2331;return{'format':_0x58826a[_0x2e466e(0xeb)]||_0x2e466e(0x127),'output':_0x58826a[_0x2e466e(0x10c)]||'','limit':_0x58826a['limit'],'limitStructuredFormats':_0x58826a[_0x2e466e(0xf2)],'color':_0x58826a[_0x2e466e(0xff)],'noColor':_0x58826a[_0x2e466e(0x109)]};}function convertSDKResultToQueryResult(_0x356119){const _0x24e0c0=a52_0x2331,_0x59152d=[];if(_0x356119[_0x24e0c0(0x100)]>0x0){const _0x2bafb3=_0x356119[0x0];for(const [_0x5f014d,_0x1e50a6]of Object[_0x24e0c0(0xf9)](_0x2bafb3)){let _0x3390e5=_0x24e0c0(0x12c);if(typeof _0x1e50a6===_0x24e0c0(0xfb))_0x3390e5=Number[_0x24e0c0(0x119)](_0x1e50a6)?'bigint':_0x24e0c0(0x125);else{if(typeof _0x1e50a6===_0x24e0c0(0x110))_0x3390e5=_0x24e0c0(0x110);else _0x1e50a6===null&&(_0x3390e5=_0x24e0c0(0x12c));}_0x59152d[_0x24e0c0(0xf6)]({'name':_0x5f014d,'type':_0x3390e5});}}return{'queryId':_0x24e0c0(0x117),'columns':_0x59152d,'data':_0x356119,'stats':{'state':_0x24e0c0(0x108),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x356119[_0x24e0c0(0x100)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x2df1c1,_0x19a8ea){const _0x46f2f7=convertSDKResultToQueryResult(_0x2df1c1);return formatQueryOutput(_0x46f2f7,_0x19a8ea);}export async function formatQueryOutput(_0x4cdd0c,_0x4ba474){const _0x1b654f=a52_0x2331,{format:_0x4096bb,limit:_0x55c98d,output:_0x2d147c,color:_0x719ea1,noColor:_0x12e7b1,limitStructuredFormats:_0x564088}=_0x4ba474,_0x113615=Boolean(_0x2d147c)&&!_0x719ea1,_0x1d768e={'color':_0x719ea1,'noColor':_0x12e7b1||_0x113615};if(_0x4096bb===_0x1b654f(0x127)){const _0x12d0e1=shouldUseLess(_0x4096bb,_0x2d147c);return formatAsTable(_0x4cdd0c,_0x55c98d,_0x12d0e1,_0x1d768e);}const _0x2b388b=_0x564088&&Number[_0x1b654f(0x124)](_0x55c98d)&&_0x4cdd0c[_0x1b654f(0x115)][_0x1b654f(0x100)]>_0x55c98d?{..._0x4cdd0c,'data':_0x4cdd0c[_0x1b654f(0x115)][_0x1b654f(0x102)](0x0,_0x55c98d)}:_0x4cdd0c;if(_0x4096bb==='json')return formatAsJSON(_0x2b388b,_0x1d768e);else return _0x4096bb===_0x1b654f(0x121)?formatAsJSONL(_0x2b388b,_0x1d768e):formatQueryResult(_0x2b388b,_0x4096bb);}function shouldUseLess(_0x1e6342,_0x358122){const _0x3f96e1=a52_0x2331;return(_0x1e6342===_0x3f96e1(0x127)||_0x1e6342===_0x3f96e1(0xee))&&process['stdout'][_0x3f96e1(0x116)]&&!_0x358122;}export function resolveOutputOptions(_0x6f7578){const _0x43d4ff=a52_0x2331,_0x41327d=_0x6f7578[_0x43d4ff(0x10c)]||'',_0x20ac6a=resolveOutputFormat(_0x6f7578['format'],_0x41327d,'table');let _0x3cf4a5=typeof _0x6f7578[_0x43d4ff(0x129)]===_0x43d4ff(0xfb)?_0x6f7578[_0x43d4ff(0x129)]:parseInt(_0x6f7578[_0x43d4ff(0x129)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x6f7578['limit']===undefined&&shouldUseLess(_0x20ac6a,_0x41327d)&&(_0x3cf4a5=Infinity),{'format':_0x20ac6a,'output':_0x41327d,'limit':_0x3cf4a5,'limitStructuredFormats':_0x6f7578[_0x43d4ff(0xf2)],'color':_0x6f7578[_0x43d4ff(0xff)],'noColor':_0x6f7578[_0x43d4ff(0x109)]};}function a52_0x3b5f(){const _0x465e27=['bold','format','4985100iHfRAx','stringify','list','stderr','inherit','repeat','limitStructuredFormats','11CeRXnq','less','params','push','rule','map','entries','max','number','spawn','query','forEach','color','length','write','slice','keys','object','close','red','yellow','FINISHED','noColor','join','pipe','output','15VDLJUi','1080712SBFUuV','json','boolean','[logs]','457361ageosI','stdin','50680rihsZh','data','isTTY','sdk-result','end','isInteger','tsv','error','cmdout','658LxUZZt','472596cTfYdd','10339880jSPAnZ','3epMZBW','jsonl','[params]','padEnd','isFinite','double','resolve','table','debug','limit','1160364pdZBdH','split','varchar','cyan','-FXRSn','No\x20data','[error]','log'];a52_0x3b5f=function(){return _0x465e27;};return a52_0x3b5f();}export function writeOutput(_0x35146e,_0x12ef61,_0x3e34be){const _0x391307=a52_0x2331;return _0x12ef61?(writeFileSync(_0x12ef61,_0x35146e),console[_0x391307(0x11b)]('Results\x20saved\x20to\x20'+_0x12ef61),Promise[_0x391307(0x126)]()):shouldUseLess(_0x3e34be||'','')?new Promise(_0x1d6e76=>{const _0x2b677d=_0x391307,_0x13d7a8=spawn(_0x2b677d(0xf4),[_0x2b677d(0x12e)],{'stdio':[_0x2b677d(0x10b),_0x2b677d(0xf0),_0x2b677d(0xf0)]});let _0x112f63=![];_0x13d7a8['on'](_0x2b677d(0x11b),()=>{const _0x5b6e1f=_0x2b677d;!_0x112f63&&(_0x112f63=!![],console[_0x5b6e1f(0xe9)](_0x35146e),_0x1d6e76());}),_0x13d7a8['on'](_0x2b677d(0x105),()=>{!_0x112f63&&(_0x112f63=!![],_0x1d6e76());}),_0x13d7a8['on'](_0x2b677d(0xfc),()=>{const _0x2cb831=_0x2b677d;!_0x112f63&&_0x13d7a8[_0x2cb831(0x113)]&&(_0x13d7a8[_0x2cb831(0x113)]['on']('error',()=>{}),_0x13d7a8[_0x2cb831(0x113)][_0x2cb831(0x101)](_0x35146e),_0x13d7a8[_0x2cb831(0x113)][_0x2cb831(0x118)]());}),!_0x13d7a8[_0x2b677d(0x113)]&&(!_0x112f63&&(_0x112f63=!![],console[_0x2b677d(0xe9)](_0x35146e),_0x1d6e76()));}):(console['log'](_0x35146e),Promise[_0x391307(0x126)]());}export async function handleSDKOutput(_0x4aada1,_0x245d04){const _0x257414=a52_0x2331,_0x3f207a=resolveOutputOptions(_0x245d04),_0x379faa=await formatSDKOutput(_0x4aada1,_0x3f207a);await writeOutput(_0x379faa,_0x3f207a[_0x257414(0x10c)]||undefined,_0x3f207a[_0x257414(0xeb)]);}export async function handleQueryOutput(_0x4f083a,_0x3c0f63){const _0x4d061a=a52_0x2331,_0x43f9aa=resolveOutputOptions(_0x3c0f63),_0x3239b8=await formatQueryOutput(_0x4f083a,_0x43f9aa);await writeOutput(_0x3239b8,_0x43f9aa[_0x4d061a(0x10c)]||undefined,_0x43f9aa['format']);}async function formatSingleObject(_0x59ba02,_0x8afc2d){const _0x21fc8c=a52_0x2331,{format:_0x53a131,color:_0xa36595,noColor:_0x2d1f9f}=_0x8afc2d,_0x121876={'color':_0xa36595,'noColor':_0x2d1f9f};if(_0x53a131===_0x21fc8c(0x10f)){if(shouldUseColor(_0x121876))return colorizeJSON(_0x59ba02,_0x121876);return JSON['stringify'](_0x59ba02,null,0x2);}else{if(_0x53a131===_0x21fc8c(0x121)){if(shouldUseColor(_0x121876))return colorizeJSONCompact(_0x59ba02,_0x121876);return JSON['stringify'](_0x59ba02);}else{if(_0x53a131===_0x21fc8c(0x11a))return Object['entries'](_0x59ba02)['map'](([_0x27521f,_0x39b130])=>_0x27521f+'\x09'+_0x39b130)[_0x21fc8c(0x10a)]('\x0a');else{const _0x535987=Object['entries'](_0x59ba02);if(_0x535987[_0x21fc8c(0x100)]===0x0)return _0x21fc8c(0xe7);const _0x553bfa=_0x59ba02[_0x21fc8c(0x128)],_0x47543b=_0x59ba02[_0x21fc8c(0xfd)],_0xb775d2=_0x59ba02[_0x21fc8c(0xf5)],_0x1c38ad=_0x59ba02[_0x21fc8c(0xf7)],_0xe48d72=_0x47543b?typeof _0x47543b==='string'?_0x47543b:JSON['stringify'](_0x47543b,null,0x2):undefined,_0x24a054=_0xb775d2&&Object[_0x21fc8c(0x103)](_0xb775d2)[_0x21fc8c(0x100)]>0x0?JSON[_0x21fc8c(0xed)](_0xb775d2,null,0x2):undefined,_0x55dd7a=_0x1c38ad&&Object[_0x21fc8c(0x103)](_0x1c38ad)[_0x21fc8c(0x100)]>0x0?JSON['stringify'](_0x1c38ad,null,0x2):undefined,_0x3b22b2=_0x535987['filter'](([_0x4ffebf])=>_0x4ffebf!==_0x21fc8c(0x128)&&_0x4ffebf!==_0x21fc8c(0xfd)&&_0x4ffebf!==_0x21fc8c(0xf5)&&_0x4ffebf!==_0x21fc8c(0xf7)),_0x10efcb=Math[_0x21fc8c(0xfa)](..._0x3b22b2['map'](([_0x4fbef8])=>_0x4fbef8['length'])),_0x5aac00=Math[_0x21fc8c(0xfa)](..._0x3b22b2[_0x21fc8c(0xf8)](([,_0x16dd83])=>{const _0x45653d=_0x21fc8c;try{const _0xbda56e=_0x16dd83===null||_0x16dd83===undefined?'':typeof _0x16dd83===_0x45653d(0x104)?JSON[_0x45653d(0xed)](_0x16dd83):String(_0x16dd83),_0x11d29f=_0xbda56e[_0x45653d(0x12b)]('\x0a');return Math['max'](..._0x11d29f[_0x45653d(0xf8)](_0x39eb21=>_0x39eb21[_0x45653d(0x100)]),0x0);}catch{return 0x0;}}),0x14),_0x2ef494=[];_0x2ef494[_0x21fc8c(0xf6)](colorBorder('┌─'+'─'[_0x21fc8c(0xf1)](_0x10efcb)+'─┬─'+'─'['repeat'](_0x5aac00)+'─┐',_0x121876)),_0x3b22b2[_0x21fc8c(0xfe)](([_0x31448f,_0x2cdc1c])=>{const _0x57532f=_0x21fc8c;let _0x23d75d;try{_0x23d75d=_0x2cdc1c===null||_0x2cdc1c===undefined?'':typeof _0x2cdc1c===_0x57532f(0x104)?JSON['stringify'](_0x2cdc1c):String(_0x2cdc1c);}catch{_0x23d75d='[Object]';}const _0x340cfe=_0x31448f['padEnd'](_0x10efcb),_0x5e35a9=_0x23d75d['split']('\x0a');_0x5e35a9[_0x57532f(0xfe)]((_0x29308b,_0x445b27)=>{const _0x40f0f7=_0x57532f,_0x213105=colorBorder('│',_0x121876);_0x445b27===0x0?_0x2ef494['push'](_0x213105+'\x20'+_0x340cfe+'\x20'+_0x213105+'\x20'+_0x29308b[_0x40f0f7(0x123)](_0x5aac00)+'\x20'+_0x213105):_0x2ef494[_0x40f0f7(0xf6)](_0x213105+'\x20'+'\x20'[_0x40f0f7(0xf1)](_0x10efcb)+'\x20'+_0x213105+'\x20'+_0x29308b[_0x40f0f7(0x123)](_0x5aac00)+'\x20'+_0x213105);});}),_0x2ef494[_0x21fc8c(0xf6)](colorBorder('└─'+'─'[_0x21fc8c(0xf1)](_0x10efcb)+'─┴─'+'─'[_0x21fc8c(0xf1)](_0x5aac00)+'─┘',_0x121876));_0xe48d72&&(_0x2ef494[_0x21fc8c(0xf6)](''),_0x2ef494['push'](String(a52_0x862dcf[_0x21fc8c(0x107)][_0x21fc8c(0xea)]('[query]'))),_0x2ef494[_0x21fc8c(0xf6)](_0xe48d72));_0x24a054&&(_0x2ef494[_0x21fc8c(0xf6)](''),_0x2ef494[_0x21fc8c(0xf6)](String(a52_0x862dcf['blue'][_0x21fc8c(0xea)](_0x21fc8c(0x122)))),_0x2ef494[_0x21fc8c(0xf6)](_0x24a054));_0x55dd7a&&(_0x2ef494[_0x21fc8c(0xf6)](''),_0x2ef494['push'](String(a52_0x862dcf['magenta'][_0x21fc8c(0xea)]('[rule]'))),_0x2ef494[_0x21fc8c(0xf6)](_0x55dd7a));if(_0x553bfa){if(_0x553bfa['stderr']){_0x2ef494[_0x21fc8c(0xf6)](''),_0x2ef494[_0x21fc8c(0xf6)](String(a52_0x862dcf[_0x21fc8c(0x106)][_0x21fc8c(0xea)](_0x21fc8c(0xe8))));const _0x3930c0=_0x553bfa[_0x21fc8c(0xef)][_0x21fc8c(0x12b)]('\x0a');_0x3930c0[_0x21fc8c(0xfe)](_0x526c2c=>{const _0x5c6b69=_0x21fc8c;_0x526c2c['trim']()&&_0x2ef494[_0x5c6b69(0xf6)](_0x526c2c);});}if(_0x553bfa[_0x21fc8c(0x11c)]){_0x2ef494[_0x21fc8c(0xf6)](''),_0x2ef494[_0x21fc8c(0xf6)](String(a52_0x862dcf[_0x21fc8c(0x12d)]['bold'](_0x21fc8c(0x111))));const _0x1997c2=_0x553bfa[_0x21fc8c(0x11c)][_0x21fc8c(0x12b)]('\x0a');_0x1997c2[_0x21fc8c(0xfe)](_0x46001e=>{_0x46001e['trim']()&&_0x2ef494['push'](_0x46001e);});}}return _0x2ef494[_0x21fc8c(0x10a)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x27776f,_0x49a38b){const _0x100951=a52_0x2331;if(_0x49a38b[_0x100951(0xeb)]==='table'){await handleSDKOutput([_0x27776f],_0x49a38b);return;}const _0x18ca53=resolveOutputOptions(_0x49a38b),_0x170d9a=await formatSingleObject(_0x27776f,_0x18ca53);await writeOutput(_0x170d9a,_0x18ca53[_0x100951(0x10c)]||undefined,_0x18ca53['format']);}
|
|
1
|
+
function a52_0x5b74(_0xb2279d,_0x3d6ce9){_0xb2279d=_0xb2279d-0x64;const _0x2be756=a52_0x2be7();let _0x5b7479=_0x2be756[_0xb2279d];return _0x5b7479;}(function(_0x47675d,_0x580420){const _0xe5594=a52_0x5b74,_0x19ebd9=_0x47675d();while(!![]){try{const _0xa6e377=-parseInt(_0xe5594(0x88))/0x1*(parseInt(_0xe5594(0xa2))/0x2)+-parseInt(_0xe5594(0xa0))/0x3*(parseInt(_0xe5594(0x80))/0x4)+-parseInt(_0xe5594(0x71))/0x5*(parseInt(_0xe5594(0xa3))/0x6)+-parseInt(_0xe5594(0x66))/0x7+parseInt(_0xe5594(0x85))/0x8*(-parseInt(_0xe5594(0xa9))/0x9)+parseInt(_0xe5594(0x92))/0xa*(parseInt(_0xe5594(0x90))/0xb)+-parseInt(_0xe5594(0x6b))/0xc*(-parseInt(_0xe5594(0x98))/0xd);if(_0xa6e377===_0x580420)break;else _0x19ebd9['push'](_0x19ebd9['shift']());}catch(_0x83bf53){_0x19ebd9['push'](_0x19ebd9['shift']());}}}(a52_0x2be7,0xa1caa));function a52_0x2be7(){const _0x5c4425=['isFinite','59068BkemnB','[error]','[params]','cyan','split','56QoOIIM','forEach','format','1NUqOqE','color','output','FINISHED','length','keys','join','end','205469WBKCEn','isInteger','50zgLHGb','padEnd','data','[Object]','varchar','json','52yLrVSb','double','sdk-result','push','No\x20data','debug','params','magenta','42iNomAY','log','308586VsMFcW','1601346rWruDV','repeat','yellow','table','red','spawn','894555YqlFwz','boolean','noColor','list','number','stderr','8989477qXVaLJ','stdin','object','map','inherit','10332276cwAsQI','max','stdout','─┬─','bold','[rule]','10BJbGZM','rule','resolve','error','jsonl','cmdout','filter','close','limit','query','stringify','string','isTTY','tsv'];a52_0x2be7=function(){return _0x5c4425;};return a52_0x2be7();}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 a52_0x5f0b9b from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1cefde){const _0x4bdecc=a52_0x5b74;return _0x1cefde[_0x4bdecc(0x87)]===_0x4bdecc(0x97)||_0x1cefde[_0x4bdecc(0x87)]===_0x4bdecc(0x75)||_0x1cefde['format']===_0x4bdecc(0x7e)||_0x1cefde[_0x4bdecc(0x87)]===_0x4bdecc(0xa6)||_0x1cefde[_0x4bdecc(0x97)]===!![]||_0x1cefde[_0x4bdecc(0x75)]===!![]||_0x1cefde[_0x4bdecc(0x7e)]===!![]||_0x1cefde['table']===!![];}export function parseOutputOptions(_0x7e1043){const _0x3857a9=a52_0x5b74;return{'format':_0x7e1043['format']||_0x3857a9(0xa6),'output':_0x7e1043[_0x3857a9(0x8a)]||'','limit':_0x7e1043[_0x3857a9(0x79)],'limitStructuredFormats':_0x7e1043['limitStructuredFormats'],'color':_0x7e1043[_0x3857a9(0x89)],'noColor':_0x7e1043[_0x3857a9(0xab)]};}function convertSDKResultToQueryResult(_0x4c1123){const _0xc2448c=a52_0x5b74,_0x53d28d=[];if(_0x4c1123['length']>0x0){const _0x40afdf=_0x4c1123[0x0];for(const [_0x3e055d,_0x262f7e]of Object['entries'](_0x40afdf)){let _0x427811=_0xc2448c(0x96);if(typeof _0x262f7e===_0xc2448c(0x64))_0x427811=Number[_0xc2448c(0x91)](_0x262f7e)?'bigint':_0xc2448c(0x99);else{if(typeof _0x262f7e===_0xc2448c(0xaa))_0x427811=_0xc2448c(0xaa);else _0x262f7e===null&&(_0x427811=_0xc2448c(0x96));}_0x53d28d[_0xc2448c(0x9b)]({'name':_0x3e055d,'type':_0x427811});}}return{'queryId':_0xc2448c(0x9a),'columns':_0x53d28d,'data':_0x4c1123,'stats':{'state':_0xc2448c(0x8b),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4c1123['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x575724,_0x3b1445){const _0x3169ae=convertSDKResultToQueryResult(_0x575724);return formatQueryOutput(_0x3169ae,_0x3b1445);}export async function formatQueryOutput(_0xf56567,_0x1ce16d){const _0x3bf27e=a52_0x5b74,{format:_0x5d8d3a,limit:_0x100935,output:_0x2f64dc,color:_0x200894,noColor:_0x307960,limitStructuredFormats:_0x4bb4e0}=_0x1ce16d,_0x32468b=Boolean(_0x2f64dc)&&!_0x200894,_0x2df14={'color':_0x200894,'noColor':_0x307960||_0x32468b};if(_0x5d8d3a===_0x3bf27e(0xa6)){const _0x449f19=shouldUseLess(_0x5d8d3a,_0x2f64dc);return formatAsTable(_0xf56567,_0x100935,_0x449f19,_0x2df14);}const _0x15d888=_0x4bb4e0&&Number[_0x3bf27e(0x7f)](_0x100935)&&_0xf56567[_0x3bf27e(0x94)]['length']>_0x100935?{..._0xf56567,'data':_0xf56567[_0x3bf27e(0x94)]['slice'](0x0,_0x100935)}:_0xf56567;if(_0x5d8d3a===_0x3bf27e(0x97))return formatAsJSON(_0x15d888,_0x2df14);else return _0x5d8d3a==='jsonl'?formatAsJSONL(_0x15d888,_0x2df14):formatQueryResult(_0x15d888,_0x5d8d3a);}function shouldUseLess(_0x212e09,_0x472e22){const _0x1fe3ff=a52_0x5b74;return(_0x212e09==='table'||_0x212e09===_0x1fe3ff(0xac))&&process[_0x1fe3ff(0x6d)][_0x1fe3ff(0x7d)]&&!_0x472e22;}export function resolveOutputOptions(_0x53c728){const _0x22f66c=a52_0x5b74,_0x10ee33=_0x53c728[_0x22f66c(0x8a)]||'',_0x8f9ada=resolveOutputFormat(_0x53c728['format'],_0x10ee33,_0x22f66c(0xa6));let _0x22bc33=typeof _0x53c728[_0x22f66c(0x79)]===_0x22f66c(0x64)?_0x53c728[_0x22f66c(0x79)]:parseInt(_0x53c728['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x53c728['limit']===undefined&&shouldUseLess(_0x8f9ada,_0x10ee33)&&(_0x22bc33=Infinity),{'format':_0x8f9ada,'output':_0x10ee33,'limit':_0x22bc33,'limitStructuredFormats':_0x53c728['limitStructuredFormats'],'color':_0x53c728['color'],'noColor':_0x53c728[_0x22f66c(0xab)]};}export function writeOutput(_0x1607fa,_0x3142da,_0xd909b7){const _0x205675=a52_0x5b74;return _0x3142da?(writeFileSync(_0x3142da,_0x1607fa),console[_0x205675(0x74)]('Results\x20saved\x20to\x20'+_0x3142da),Promise['resolve']()):shouldUseLess(_0xd909b7||'','')?new Promise(_0x3f9715=>{const _0xc26432=_0x205675,_0x233a05=spawn('less',['-FXRSn'],{'stdio':['pipe','inherit',_0xc26432(0x6a)]});let _0x4bc921=![];_0x233a05['on'](_0xc26432(0x74),()=>{const _0x49fd07=_0xc26432;!_0x4bc921&&(_0x4bc921=!![],console[_0x49fd07(0xa1)](_0x1607fa),_0x3f9715());}),_0x233a05['on'](_0xc26432(0x78),()=>{!_0x4bc921&&(_0x4bc921=!![],_0x3f9715());}),_0x233a05['on'](_0xc26432(0xa8),()=>{const _0x4bd897=_0xc26432;!_0x4bc921&&_0x233a05[_0x4bd897(0x67)]&&(_0x233a05[_0x4bd897(0x67)]['on'](_0x4bd897(0x74),()=>{}),_0x233a05[_0x4bd897(0x67)]['write'](_0x1607fa),_0x233a05['stdin'][_0x4bd897(0x8f)]());}),!_0x233a05['stdin']&&(!_0x4bc921&&(_0x4bc921=!![],console[_0xc26432(0xa1)](_0x1607fa),_0x3f9715()));}):(console['log'](_0x1607fa),Promise[_0x205675(0x73)]());}export async function handleSDKOutput(_0x14a0e4,_0x1ed117){const _0x4fc67a=a52_0x5b74,_0xf2950c=resolveOutputOptions(_0x1ed117),_0x1af1e3=await formatSDKOutput(_0x14a0e4,_0xf2950c);await writeOutput(_0x1af1e3,_0xf2950c['output']||undefined,_0xf2950c[_0x4fc67a(0x87)]);}export async function handleQueryOutput(_0x7fb32c,_0x11d07c){const _0x1c6de5=a52_0x5b74,_0x3e2b82=resolveOutputOptions(_0x11d07c),_0x552733=await formatQueryOutput(_0x7fb32c,_0x3e2b82);await writeOutput(_0x552733,_0x3e2b82[_0x1c6de5(0x8a)]||undefined,_0x3e2b82[_0x1c6de5(0x87)]);}async function formatSingleObject(_0x26132c,_0x326b12){const _0x18c0ae=a52_0x5b74,{format:_0x3c650c,color:_0x498c9f,noColor:_0x4222ef}=_0x326b12,_0x61fd4c={'color':_0x498c9f,'noColor':_0x4222ef};if(_0x3c650c==='json'){if(shouldUseColor(_0x61fd4c))return colorizeJSON(_0x26132c,_0x61fd4c);return JSON[_0x18c0ae(0x7b)](_0x26132c,null,0x2);}else{if(_0x3c650c===_0x18c0ae(0x75)){if(shouldUseColor(_0x61fd4c))return colorizeJSONCompact(_0x26132c,_0x61fd4c);return JSON[_0x18c0ae(0x7b)](_0x26132c);}else{if(_0x3c650c===_0x18c0ae(0x7e))return Object['entries'](_0x26132c)[_0x18c0ae(0x69)](([_0x29cf29,_0x38c1e9])=>_0x29cf29+'\x09'+_0x38c1e9)[_0x18c0ae(0x8e)]('\x0a');else{const _0x1c68ec=Object['entries'](_0x26132c);if(_0x1c68ec[_0x18c0ae(0x8c)]===0x0)return _0x18c0ae(0x9c);const _0x3df6a4=_0x26132c[_0x18c0ae(0x9d)],_0x275902=_0x26132c['query'],_0x14b35b=_0x26132c[_0x18c0ae(0x9e)],_0x2e9df3=_0x26132c[_0x18c0ae(0x72)],_0x13cd4a=_0x275902?typeof _0x275902===_0x18c0ae(0x7c)?_0x275902:JSON['stringify'](_0x275902,null,0x2):undefined,_0xe0d354=_0x14b35b&&Object[_0x18c0ae(0x8d)](_0x14b35b)['length']>0x0?JSON[_0x18c0ae(0x7b)](_0x14b35b,null,0x2):undefined,_0x44cb5c=_0x2e9df3&&Object[_0x18c0ae(0x8d)](_0x2e9df3)[_0x18c0ae(0x8c)]>0x0?JSON[_0x18c0ae(0x7b)](_0x2e9df3,null,0x2):undefined,_0x16f271=_0x1c68ec[_0x18c0ae(0x77)](([_0x101d0e])=>_0x101d0e!==_0x18c0ae(0x9d)&&_0x101d0e!==_0x18c0ae(0x7a)&&_0x101d0e!==_0x18c0ae(0x9e)&&_0x101d0e!==_0x18c0ae(0x72)),_0x19d713=Math['max'](..._0x16f271[_0x18c0ae(0x69)](([_0x1abf36])=>_0x1abf36[_0x18c0ae(0x8c)])),_0x5c6b5b=Math[_0x18c0ae(0x6c)](..._0x16f271[_0x18c0ae(0x69)](([,_0x59b47c])=>{const _0x340f9d=_0x18c0ae;try{const _0x4f4c88=_0x59b47c===null||_0x59b47c===undefined?'':typeof _0x59b47c===_0x340f9d(0x68)?JSON['stringify'](_0x59b47c):String(_0x59b47c),_0x26a6a9=_0x4f4c88[_0x340f9d(0x84)]('\x0a');return Math[_0x340f9d(0x6c)](..._0x26a6a9[_0x340f9d(0x69)](_0x4c5a4d=>_0x4c5a4d[_0x340f9d(0x8c)]),0x0);}catch{return 0x0;}}),0x14),_0x2a6438=[];_0x2a6438[_0x18c0ae(0x9b)](colorBorder('┌─'+'─'[_0x18c0ae(0xa4)](_0x19d713)+_0x18c0ae(0x6e)+'─'[_0x18c0ae(0xa4)](_0x5c6b5b)+'─┐',_0x61fd4c)),_0x16f271[_0x18c0ae(0x86)](([_0x83231b,_0x125890])=>{const _0x339bdc=_0x18c0ae;let _0x11c97b;try{_0x11c97b=_0x125890===null||_0x125890===undefined?'':typeof _0x125890==='object'?JSON[_0x339bdc(0x7b)](_0x125890):String(_0x125890);}catch{_0x11c97b=_0x339bdc(0x95);}const _0x187977=_0x83231b[_0x339bdc(0x93)](_0x19d713),_0x5e7424=_0x11c97b[_0x339bdc(0x84)]('\x0a');_0x5e7424[_0x339bdc(0x86)]((_0x14297e,_0x3f7102)=>{const _0x29c163=_0x339bdc,_0x83c188=colorBorder('│',_0x61fd4c);_0x3f7102===0x0?_0x2a6438['push'](_0x83c188+'\x20'+_0x187977+'\x20'+_0x83c188+'\x20'+_0x14297e[_0x29c163(0x93)](_0x5c6b5b)+'\x20'+_0x83c188):_0x2a6438[_0x29c163(0x9b)](_0x83c188+'\x20'+'\x20'['repeat'](_0x19d713)+'\x20'+_0x83c188+'\x20'+_0x14297e['padEnd'](_0x5c6b5b)+'\x20'+_0x83c188);});}),_0x2a6438[_0x18c0ae(0x9b)](colorBorder('└─'+'─'['repeat'](_0x19d713)+'─┴─'+'─'['repeat'](_0x5c6b5b)+'─┘',_0x61fd4c));_0x13cd4a&&(_0x2a6438[_0x18c0ae(0x9b)](''),_0x2a6438['push'](String(a52_0x5f0b9b[_0x18c0ae(0xa5)][_0x18c0ae(0x6f)]('[query]'))),_0x2a6438[_0x18c0ae(0x9b)](_0x13cd4a));_0xe0d354&&(_0x2a6438['push'](''),_0x2a6438[_0x18c0ae(0x9b)](String(a52_0x5f0b9b['blue'][_0x18c0ae(0x6f)](_0x18c0ae(0x82)))),_0x2a6438[_0x18c0ae(0x9b)](_0xe0d354));_0x44cb5c&&(_0x2a6438[_0x18c0ae(0x9b)](''),_0x2a6438[_0x18c0ae(0x9b)](String(a52_0x5f0b9b[_0x18c0ae(0x9f)][_0x18c0ae(0x6f)](_0x18c0ae(0x70)))),_0x2a6438[_0x18c0ae(0x9b)](_0x44cb5c));if(_0x3df6a4){if(_0x3df6a4[_0x18c0ae(0x65)]){_0x2a6438[_0x18c0ae(0x9b)](''),_0x2a6438[_0x18c0ae(0x9b)](String(a52_0x5f0b9b[_0x18c0ae(0xa7)][_0x18c0ae(0x6f)](_0x18c0ae(0x81))));const _0x24eefe=_0x3df6a4[_0x18c0ae(0x65)][_0x18c0ae(0x84)]('\x0a');_0x24eefe[_0x18c0ae(0x86)](_0x3befee=>{const _0x3a3119=_0x18c0ae;_0x3befee['trim']()&&_0x2a6438[_0x3a3119(0x9b)](_0x3befee);});}if(_0x3df6a4[_0x18c0ae(0x76)]){_0x2a6438[_0x18c0ae(0x9b)](''),_0x2a6438[_0x18c0ae(0x9b)](String(a52_0x5f0b9b[_0x18c0ae(0x83)]['bold']('[logs]')));const _0x3ab587=_0x3df6a4[_0x18c0ae(0x76)][_0x18c0ae(0x84)]('\x0a');_0x3ab587[_0x18c0ae(0x86)](_0x33a08d=>{const _0x3a8132=_0x18c0ae;_0x33a08d['trim']()&&_0x2a6438[_0x3a8132(0x9b)](_0x33a08d);});}}return _0x2a6438['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x1a67cb,_0x357fd6){const _0x1316a9=a52_0x5b74;if(_0x357fd6[_0x1316a9(0x87)]===_0x1316a9(0xa6)){await handleSDKOutput([_0x1a67cb],_0x357fd6);return;}const _0x30d50d=resolveOutputOptions(_0x357fd6),_0x4eb9a9=await formatSingleObject(_0x1a67cb,_0x30d50d);await writeOutput(_0x4eb9a9,_0x30d50d[_0x1316a9(0x8a)]||undefined,_0x30d50d[_0x1316a9(0x87)]);}
|
package/dist/core/config.d.ts
CHANGED
|
@@ -145,8 +145,8 @@ export interface AccessTokenResult {
|
|
|
145
145
|
* Resolve access token from environment variables with source information
|
|
146
146
|
*
|
|
147
147
|
* Priority order:
|
|
148
|
-
* 1.
|
|
149
|
-
* 2.
|
|
148
|
+
* 1. TDX_ACCESS_TOKEN_<PROFILE> (profile-specific env var)
|
|
149
|
+
* 2. TDX_ACCESS_TOKEN (generic env var, CI/CD fallback)
|
|
150
150
|
*
|
|
151
151
|
* @param profileName - Optional profile name
|
|
152
152
|
* @returns AccessTokenResult with token and source, or null if not found
|
|
@@ -195,8 +195,8 @@ export interface APIKeyResult {
|
|
|
195
195
|
* take precedence over API keys (TD1 auth).
|
|
196
196
|
*
|
|
197
197
|
* Priority order:
|
|
198
|
-
* 1.
|
|
199
|
-
* 2.
|
|
198
|
+
* 1. TDX_ACCESS_TOKEN_<PROFILE> (profile-specific access token env var)
|
|
199
|
+
* 2. TDX_ACCESS_TOKEN (generic access token env var)
|
|
200
200
|
* 3. TDX_API_KEY_<PROFILE> (profile-specific API key env var)
|
|
201
201
|
* Profile names are normalized: @tdx-studio:us01:1234 -> TDX_API_KEY__TDX_STUDIO_US01_1234
|
|
202
202
|
* 4. Profile keychain credential (when profile specified)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAO/D;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAG9D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAOD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAMlF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,IAAI,CAMN;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAOD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAW9E;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,IAAI,CAMN;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAM1D;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAQD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAMhF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAa9F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8BpE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA0BrD;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAuBjF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAiBlE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAkF9B;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG7B;AA0ED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CA8BnF;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAYf;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,SAAS,CA4BtC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,SAAS,CAcpD;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,cAAc,CAwBnD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAsBhE"}
|