@treasuredata/tdx 2026.3.35 → 2026.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.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/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x1e66bb=a55_0x2594;(function(_0x2a15e6,_0x5249a4){const _0x2449f1=a55_0x2594,_0x44618e=_0x2a15e6();while(!![]){try{const _0x4d7cb5=parseInt(_0x2449f1(0x27c))/0x1+parseInt(_0x2449f1(0x2fc))/0x2*(-parseInt(_0x2449f1(0x258))/0x3)+parseInt(_0x2449f1(0x292))/0x4+parseInt(_0x2449f1(0x1c9))/0x5*(-parseInt(_0x2449f1(0x2e0))/0x6)+-parseInt(_0x2449f1(0x226))/0x7+parseInt(_0x2449f1(0x32e))/0x8*(-parseInt(_0x2449f1(0x2b1))/0x9)+-parseInt(_0x2449f1(0x331))/0xa*(-parseInt(_0x2449f1(0x351))/0xb);if(_0x4d7cb5===_0x5249a4)break;else _0x44618e['push'](_0x44618e['shift']());}catch(_0x427c6b){_0x44618e['push'](_0x44618e['shift']());}}}(a55_0x453e,0xecd1f));import a55_0x4b0078 from'chalk';import{existsSync}from'fs';import a55_0x596494 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 a55_0x264e0e from'prompts';function getAttemptStatusDisplay(_0x18631e){const _0x47b87d=a55_0x2594;if(!_0x18631e)return{'icon':'⏳','text':''};const {done:_0x33b5df,success:_0x556c67,cancelRequested:_0x5d51be}=_0x18631e;if(!_0x33b5df)return _0x5d51be?{'icon':'🛑','text':a55_0x4b0078[_0x47b87d(0x26e)](_0x47b87d(0x2a8))}:{'icon':'🔄','text':a55_0x4b0078[_0x47b87d(0x340)](_0x47b87d(0x2e1))};if(_0x556c67)return{'icon':'✅','text':a55_0x4b0078['green'](_0x47b87d(0x2bb))};return{'icon':'❌','text':a55_0x4b0078[_0x47b87d(0x1bf)](_0x47b87d(0x26a))};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x1e66bb(0x200)](_0x4eb964,_0x381e68,_0x452846=0x0){const _0x527750=a55_0x1e66bb;return _0x4eb964[_0x452846]||_0x381e68[_0x527750(0x1fe)];}[a55_0x1e66bb(0x254)](_0x235818,_0x57db21,_0x12cd24=0x0){const _0x2c28a1=a55_0x1e66bb,_0x3283ad=this[_0x2c28a1(0x200)](_0x235818,_0x57db21,_0x12cd24);if(!_0x3283ad)return console[_0x2c28a1(0x26a)](a55_0x4b0078[_0x2c28a1(0x1bf)](_0x2c28a1(0x290)),_0x2c28a1(0x276)),console['error'](a55_0x4b0078[_0x2c28a1(0x35c)](_0x2c28a1(0x245))),null;return _0x3283ad;}[a55_0x1e66bb(0x22b)](_0x2a527e,_0x4dc025){const _0x1c11ab=a55_0x1e66bb;if(_0x2a527e[0x0]){const _0x52eceb=_0x2a527e[0x0][_0x1c11ab(0x1bc)]('.');if(_0x52eceb[_0x1c11ab(0x2b4)]===0x1)return{'projectName':_0x52eceb[0x0],'workflowName':undefined};else return _0x52eceb[_0x1c11ab(0x2b4)]===0x2?{'projectName':_0x52eceb[0x0],'workflowName':_0x52eceb[0x1]}:(console[_0x1c11ab(0x26a)](a55_0x4b0078[_0x1c11ab(0x1bf)](_0x1c11ab(0x290)),_0x1c11ab(0x1c5)),null);}return{'projectName':_0x4dc025[_0x1c11ab(0x1fe)],'workflowName':undefined};}[a55_0x1e66bb(0x347)](_0xa4fbe1,_0x4c14ab,_0x5e53a4=0x0){const _0x504833=a55_0x1e66bb;if(_0xa4fbe1[_0x5e53a4])return _0xa4fbe1[_0x5e53a4];if(_0x4c14ab[_0x504833(0x1fe)]){const _0x207208=a55_0x596494['join'](process[_0x504833(0x203)](),_0x504833(0x252),_0x4c14ab['workflowProject']);if(existsSync(a55_0x596494['join'](_0x207208,_0x504833(0x291))))return _0x207208;}return undefined;}async[a55_0x1e66bb(0x33f)](_0x76bfca,_0x2901e7,_0x32452e){const _0x379d38=a55_0x1e66bb;try{const _0x2cf3fe=await _0x76bfca[_0x379d38(0x2a5)][_0x379d38(0x252)](_0x2901e7,{'limit':0x1});if(_0x2cf3fe[_0x379d38(0x2b4)]>0x0){const _0x121ce1=_0x2cf3fe[0x0]['id'],_0x34c974=getWorkflowUrl(_0x32452e,_0x121ce1);console[_0x379d38(0x26a)](_0x379d38(0x1d8)+a55_0x4b0078['cyan'](_0x34c974));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x28c);[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x2f4);async[a55_0x1e66bb(0x2a0)](_0x33ba88){const _0x17f1ef=a55_0x1e66bb,{options:_0x1a5fec,args:_0x244b6a,tdx:_0x45ae02}=_0x33ba88,_0x55f228=_0x244b6a[0x0],_0x194c9a=_0x1a5fec['clear'];if(_0x194c9a)return saveSessionContext({'workflow_project':undefined},_0x1a5fec[_0x17f1ef(0x1f0)]),console[_0x17f1ef(0x289)](a55_0x4b0078['green'](_0x17f1ef(0x2aa))),0x0;if(!_0x55f228)return console[_0x17f1ef(0x26a)](a55_0x4b0078[_0x17f1ef(0x1bf)](_0x17f1ef(0x290)),'Project\x20name\x20is\x20required'),console['error'](a55_0x4b0078[_0x17f1ef(0x35c)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x17f1ef(0x26a)](a55_0x4b0078['dim'](_0x17f1ef(0x28d))),0x1;const _0xfcaa4a=await withSpinner(_0x17f1ef(0x2a1)+_0x55f228+_0x17f1ef(0x24f),()=>_0x45ae02['workflow'][_0x17f1ef(0x2e7)](_0x55f228),{'verbose':_0x1a5fec[_0x17f1ef(0x328)]}),{name:_0x2d04eb}=_0xfcaa4a[_0x17f1ef(0x1cd)];return saveSessionContext({'workflow_project':_0x2d04eb},_0x1a5fec[_0x17f1ef(0x1f0)]),console['log'](a55_0x4b0078[_0x17f1ef(0x357)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a55_0x4b0078[_0x17f1ef(0x2ed)](_0x2d04eb))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x242);[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x34d);async['execute'](_0x37cea3){const _0x21f003=a55_0x1e66bb,{options:_0x3918df,args:_0x30b0ad,tdx:_0x178a13}=_0x37cea3,_0x2f7c30=_0x30b0ad[0x0];_0x3918df[_0x21f003(0x328)]&&_0x2f7c30&&console[_0x21f003(0x26a)]('Pattern:\x20'+_0x2f7c30);const _0x528b95=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x178a13['workflow'][_0x21f003(0x1dc)](_0x2f7c30,{'limit':_0x3918df[_0x21f003(0x2e8)]}),{'verbose':_0x3918df[_0x21f003(0x328)]});let _0x54d2bf=_0x528b95[_0x21f003(0x1cd)];_0x54d2bf[_0x21f003(0x311)]((_0x59d221,_0x6b396e)=>_0x59d221[_0x21f003(0x293)]['localeCompare'](_0x6b396e[_0x21f003(0x293)]));const _0xe20614=_0x3918df[_0x21f003(0x2e8)]||0x64,_0x3d148e=_0x54d2bf[_0x21f003(0x2b4)]>=_0xe20614?a55_0x4b0078[_0x21f003(0x35c)](_0x21f003(0x25e)):'';console[_0x21f003(0x26a)](_0x21f003(0x244)+_0x54d2bf['length']+_0x21f003(0x1bd)+(_0x54d2bf[_0x21f003(0x2b4)]!==0x1?'s':'')+_0x3d148e);if(_0x3918df[_0x21f003(0x1de)]==='json'||_0x3918df['format']===_0x21f003(0x32a)||_0x3918df[_0x21f003(0x1de)]===_0x21f003(0x2d0))await handleSDKOutput(_0x54d2bf,_0x3918df);else{if(_0x54d2bf['length']===0x0)_0x2f7c30?console[_0x21f003(0x289)](_0x21f003(0x307)+_0x2f7c30):console[_0x21f003(0x289)](_0x21f003(0x259));else{const _0x5206e6=_0x54d2bf[_0x21f003(0x23e)](_0x421a52=>{const _0x3355ae=_0x21f003,_0x265363=_0x421a52['metadata']?.[_0x3355ae(0x1fc)](_0x3e7e5a=>_0x3e7e5a['key']===_0x3355ae(0x28b)),_0x455b92=_0x265363?a55_0x4b0078[_0x3355ae(0x35c)](_0x3355ae(0x34a)):'';return _0x3355ae(0x364)+_0x421a52[_0x3355ae(0x293)]+_0x455b92;});await writeOutput(_0x5206e6[_0x21f003(0x2ff)]('\x0a'),_0x3918df[_0x21f003(0x30c)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a55_0x1e66bb(0x248);['description']=a55_0x1e66bb(0x343);async[a55_0x1e66bb(0x2a0)](_0x1019a1){const _0x3e2437=a55_0x1e66bb,{options:_0x498fd5,args:_0x43a7cb,tdx:_0x3d868e}=_0x1019a1,_0x24125f=this[_0x3e2437(0x200)](_0x43a7cb,_0x498fd5);_0x498fd5['verbose']&&_0x24125f&&console[_0x3e2437(0x26a)]('Project\x20filter:\x20'+_0x24125f);const _0x1574d8=await withSpinner('Listing\x20workflows...',()=>_0x3d868e['workflow']['workflows'](_0x24125f,{'limit':_0x498fd5[_0x3e2437(0x2e8)]}),{'verbose':_0x498fd5[_0x3e2437(0x328)]});let _0x4bf020=_0x1574d8[_0x3e2437(0x1cd)];_0x4bf020[_0x3e2437(0x311)]((_0x49f1ff,_0x2950a4)=>{const _0x343367=_0x3e2437,_0x188561=_0x49f1ff[_0x343367(0x293)][_0x343367(0x257)](_0x2950a4['name']);if(_0x188561!==0x0)return _0x188561;return(_0x49f1ff[_0x343367(0x1db)]?.[_0x343367(0x293)]||'')[_0x343367(0x257)](_0x2950a4['project']?.[_0x343367(0x293)]||'');});const _0x48253d=_0x498fd5['limit']||0x64,_0x3a6e63=_0x4bf020[_0x3e2437(0x2b4)]>=_0x48253d?a55_0x4b0078['dim'](_0x3e2437(0x25e)):'';console[_0x3e2437(0x26a)]('✔\x20Found\x20'+_0x4bf020[_0x3e2437(0x2b4)]+_0x3e2437(0x2e3)+(_0x4bf020[_0x3e2437(0x2b4)]!==0x1?'s':'')+_0x3a6e63);if(_0x498fd5[_0x3e2437(0x1de)]===_0x3e2437(0x247)||_0x498fd5[_0x3e2437(0x1de)]==='jsonl'||_0x498fd5[_0x3e2437(0x1de)]===_0x3e2437(0x2d0))await handleSDKOutput(_0x4bf020,_0x498fd5);else{if(_0x4bf020[_0x3e2437(0x2b4)]===0x0)_0x24125f?console[_0x3e2437(0x289)](_0x3e2437(0x33a)+_0x24125f):console[_0x3e2437(0x289)](_0x3e2437(0x335));else{const _0x4b57ae=_0x498fd5['site'],_0x4047ab=_0x4bf020[_0x3e2437(0x23e)](_0x1d75a1=>{const _0x1fd8ec=_0x3e2437,_0x5c238f=a55_0x4b0078['dim']('#'+_0x1d75a1['id']),_0x198235=hyperlink(_0x5c238f,getWorkflowUrl(_0x4b57ae,_0x1d75a1['id'])),_0x13f4ee=_0x1d75a1[_0x1fd8ec(0x1db)]?.[_0x1fd8ec(0x293)]?a55_0x4b0078[_0x1fd8ec(0x35c)]('\x20('+_0x1d75a1['project']['name']+')'):'';return _0x1fd8ec(0x249)+_0x198235+'\x20'+_0x1d75a1[_0x1fd8ec(0x293)]+_0x13f4ee;});await writeOutput(_0x4047ab[_0x3e2437(0x2ff)]('\x0a'),_0x498fd5[_0x3e2437(0x30c)],_0x3e2437(0x362));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x23d);[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x204);async[a55_0x1e66bb(0x2a0)](_0x37f539){const _0x38bc61=a55_0x1e66bb,{options:_0x1a99c3,args:_0x3a0222,tdx:_0x5d4184}=_0x37f539,_0x29ede1=this[_0x38bc61(0x22b)](_0x3a0222,_0x1a99c3);if(!_0x29ede1)return 0x1;const {projectName:_0x4b3312,workflowName:_0x524778}=_0x29ede1;if(_0x1a99c3[_0x38bc61(0x328)]){if(_0x4b3312&&_0x524778)console[_0x38bc61(0x26a)]('Filter:\x20'+_0x4b3312+'.'+_0x524778);else _0x4b3312&&console['error'](_0x38bc61(0x1ca)+_0x4b3312);const _0x124d85=_0x1a99c3[_0x38bc61(0x2c4)];_0x124d85&&console[_0x38bc61(0x26a)]('Status:\x20'+_0x124d85);}let _0x3d2094=0x28;if(process[_0x38bc61(0x256)][_0x38bc61(0x24a)]&&!_0x1a99c3[_0x38bc61(0x30c)]&&!_0x1a99c3[_0x38bc61(0x1de)]){const _0x10aa59=process[_0x38bc61(0x256)][_0x38bc61(0x306)]||0x28;_0x3d2094=Math[_0x38bc61(0x1c2)](0x14,Math[_0x38bc61(0x309)](_0x10aa59*0x2/0x3));}const _0x257690=_0x1a99c3[_0x38bc61(0x2e8)]||_0x3d2094,_0x2a42a6=await withSpinner(_0x38bc61(0x2ef),()=>_0x5d4184[_0x38bc61(0x2a5)][_0x38bc61(0x20f)]({'projectName':_0x4b3312,'workflowName':_0x524778,'status':_0x1a99c3[_0x38bc61(0x2c4)],'fromTime':_0x1a99c3[_0x38bc61(0x2ce)],'toTime':_0x1a99c3['to'],'limit':_0x257690}),{'verbose':_0x1a99c3[_0x38bc61(0x328)]}),_0x482e0d=_0x2a42a6[_0x38bc61(0x1cd)];_0x482e0d[_0x38bc61(0x311)]((_0x1adbb7,_0x4f4cd2)=>{const _0x28d6d6=_0x38bc61,_0x82160a=_0x1adbb7[_0x28d6d6(0x360)]||'',_0x2ca76c=_0x4f4cd2[_0x28d6d6(0x360)]||'';return _0x2ca76c['localeCompare'](_0x82160a);});_0x482e0d[_0x38bc61(0x2b4)]>=_0x257690?console['error'](_0x38bc61(0x2fd)+_0x482e0d[_0x38bc61(0x2b4)]+_0x38bc61(0x36c)+a55_0x4b0078['dim'](_0x38bc61(0x1ea))):console['error'](_0x38bc61(0x244)+_0x482e0d[_0x38bc61(0x2b4)]+_0x38bc61(0x2e4)+(_0x482e0d[_0x38bc61(0x2b4)]!==0x1?'s':''));if(_0x1a99c3[_0x38bc61(0x1de)]===_0x38bc61(0x247)||_0x1a99c3[_0x38bc61(0x1de)]===_0x38bc61(0x32a)||_0x1a99c3['format']===_0x38bc61(0x2d0))await handleSDKOutput(_0x482e0d,_0x1a99c3);else{if(!process[_0x38bc61(0x256)]['isTTY']||_0x1a99c3[_0x38bc61(0x30c)]){if(_0x482e0d[_0x38bc61(0x2b4)]===0x0){if(_0x4b3312&&_0x524778)console[_0x38bc61(0x289)](_0x38bc61(0x264)+_0x4b3312+'.'+_0x524778);else _0x4b3312?console[_0x38bc61(0x289)](_0x38bc61(0x28f)+_0x4b3312):console[_0x38bc61(0x289)](_0x38bc61(0x2c6));}else{const _0x4e9bf3=_0x1a99c3[_0x38bc61(0x319)],_0x45a546=this[_0x38bc61(0x34b)](_0x482e0d,_0x4e9bf3);_0x1a99c3[_0x38bc61(0x30c)]?await writeOutput(_0x45a546,_0x1a99c3[_0x38bc61(0x30c)],'list'):console[_0x38bc61(0x289)](_0x45a546);}!_0x4b3312&&(console[_0x38bc61(0x26a)](''),console[_0x38bc61(0x26a)](a55_0x4b0078[_0x38bc61(0x35c)](_0x38bc61(0x206))),console['error'](a55_0x4b0078[_0x38bc61(0x35c)](_0x38bc61(0x270))+'or'+a55_0x4b0078[_0x38bc61(0x35c)](_0x38bc61(0x29c))));}else{if(_0x482e0d[_0x38bc61(0x2b4)]===0x0){if(_0x4b3312&&_0x524778)console['log'](_0x38bc61(0x264)+_0x4b3312+'.'+_0x524778);else _0x4b3312?console[_0x38bc61(0x289)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x4b3312):console[_0x38bc61(0x289)](_0x38bc61(0x2c6));}else await this[_0x38bc61(0x219)](_0x482e0d,_0x37f539,_0x4b3312);}}return 0x0;}['renderSessionsTimeline'](_0x14a7a8,_0x37a0a0){const _0x151784=a55_0x1e66bb,_0x4184cf=[],_0x2ce742=new Map();let _0x105f15=Infinity,_0x1ce3af=-Infinity;for(const _0x56b507 of _0x14a7a8){if(_0x56b507[_0x151784(0x1f8)]?.[_0x151784(0x269)]){const _0x47570d=new Date(_0x56b507[_0x151784(0x1f8)][_0x151784(0x269)])[_0x151784(0x1fa)](),_0x498a63=_0x56b507['lastAttempt'][_0x151784(0x1d0)]?new Date(_0x56b507[_0x151784(0x1f8)][_0x151784(0x1d0)])[_0x151784(0x1fa)]():Date[_0x151784(0x33c)](),_0x5059c3=_0x56b507['project']?.['name']||_0x151784(0x1c4);!_0x2ce742['has'](_0x5059c3)&&_0x2ce742[_0x151784(0x35d)](_0x5059c3,[]),_0x2ce742['get'](_0x5059c3)['push']({'session':_0x56b507,'startTime':_0x47570d,'endTime':_0x498a63,'duration':_0x498a63-_0x47570d}),_0x105f15=Math['min'](_0x105f15,_0x47570d),_0x1ce3af=Math[_0x151784(0x1c2)](_0x1ce3af,_0x498a63);}}if(_0x2ce742['size']===0x0)return _0x151784(0x1e9);const _0x1fc9d7=process[_0x151784(0x256)][_0x151784(0x232)]||0x78,_0x21146a=0x1e,_0x190e15=0x32,_0x3d0e1d=0x4,_0x5cd4e4=Math['min'](_0x190e15,Math[_0x151784(0x1c2)](_0x21146a,Math[_0x151784(0x309)](_0x1fc9d7*0.3))),_0x1f3834=_0x1fc9d7-_0x5cd4e4-TIMELINE_CONFIG[_0x151784(0x2e5)]-0x3-_0x3d0e1d,_0x3447d2=_0x1ce3af-_0x105f15,_0xd8f5c4=_0x3447d2/_0x5cd4e4,_0xf0e6d3=renderTimeAxis({'startTime':_0x105f15,'endTime':_0x1ce3af,'durationMs':_0x3447d2,'msPerChar':_0xd8f5c4},_0x5cd4e4),_0x50eae0=[];for(const _0x144c80 of _0x2ce742[_0x151784(0x23b)]()){_0x50eae0['push'](..._0x144c80);}_0x50eae0[_0x151784(0x311)]((_0x304984,_0x4acf5a)=>_0x4acf5a[_0x151784(0x239)]-_0x304984[_0x151784(0x239)]);const _0x5ce631=new Date(_0x105f15),_0x3f9da0=formatDate(_0x5ce631),_0x5ecc85=_0x3d0e1d+TIMELINE_CONFIG[_0x151784(0x221)]+TIMELINE_CONFIG[_0x151784(0x1f1)]+_0x1f3834,_0x1993a7='\x20'['repeat'](_0x5ecc85-_0x3f9da0['length']),_0x1902e9=_0x1993a7+a55_0x4b0078[_0x151784(0x35c)](_0x3f9da0)+'\x20'+_0xf0e6d3;_0x4184cf[_0x151784(0x1d3)](_0x1902e9);const _0x12671e=0x16;let _0x41048c=0x0;for(const _0x4ed8a6 of _0x50eae0){const _0xb323dc=_0x4ed8a6[_0x151784(0x1f0)][_0x151784(0x1db)]?.[_0x151784(0x293)]||'?',_0x4977a3=Math[_0x151784(0x301)](stringWidth(_0xb323dc),_0x12671e);_0x41048c=Math[_0x151784(0x1c2)](_0x41048c,_0x4977a3);}for(const _0x55e9d9 of _0x50eae0){const {session:_0x1af2f7,startTime:_0x5e0233,endTime:_0x3e1eeb,duration:_0x4ee1f6}=_0x55e9d9,_0x2e8a97=_0x1af2f7[_0x151784(0x1db)]?.['id'],_0x2bf7e8=_0x1af2f7['id'],_0x126bba=_0x1af2f7[_0x151784(0x1db)]?.[_0x151784(0x293)]||'?',_0xf3562f=_0x1af2f7[_0x151784(0x2a5)]?.[_0x151784(0x293)]||'?';let _0x2762eb,_0x50dbd9;if(_0x1af2f7[_0x151784(0x1f8)]){const _0x3b910b=_0x1af2f7[_0x151784(0x1f8)];!_0x3b910b[_0x151784(0x341)]?(_0x2762eb=_0x3b910b[_0x151784(0x1e5)]?'🛑':'🔄',_0x50dbd9=_0x3b910b['cancelRequested']?a55_0x4b0078[_0x151784(0x26e)]:a55_0x4b0078[_0x151784(0x340)]):(_0x2762eb=_0x3b910b[_0x151784(0x2bb)]?'✅':'❌',_0x50dbd9=_0x3b910b['success']?a55_0x4b0078[_0x151784(0x357)]:a55_0x4b0078[_0x151784(0x1bf)]);}else _0x2762eb='⏳',_0x50dbd9=a55_0x4b0078[_0x151784(0x35c)];const _0x3a1fca='#'+_0x2bf7e8,_0x179a22=_0x2e8a97?hyperlink(_0x3a1fca,getWorkflowSessionUrl(_0x37a0a0,_0x2e8a97,_0x2bf7e8)):_0x3a1fca;let _0x3f7d79=_0x126bba;stringWidth(_0x126bba)>_0x12671e&&(_0x3f7d79=_0x126bba[_0x151784(0x1ce)](0x0,_0x12671e-0x1)+'…');const _0x30907f=a55_0x4b0078[_0x151784(0x35c)](_0x3f7d79),_0x7f3f1c=stringWidth(_0x3f7d79),_0x3a20b2='\x20'[_0x151784(0x20b)](_0x41048c-stringWidth(_0x3f7d79)+0x2),_0x57929c='('+formatElapsed(_0x4ee1f6)+')',_0x309a15=stringWidth(_0x57929c),_0xfbf79f=stringWidth(_0x3a1fca),_0x515ccc=_0xfbf79f+0x1+_0x7f3f1c+_0x3a20b2[_0x151784(0x2b4)],_0x14af50=_0x1f3834-_0x515ccc-_0x309a15-0x1-0x8;let _0x300da6=_0xf3562f;stringWidth(_0x300da6)>_0x14af50&&(_0x300da6=_0x300da6[_0x151784(0x1ce)](0x0,_0x14af50-0x1)+'…');const _0xc5395c=_0x179a22+'\x20'+_0x30907f+_0x3a20b2+_0x300da6,_0x5902a4=stringWidth(_0xc5395c),_0x521f34=_0x1f3834-_0x5902a4-_0x309a15,_0x3ea9b7=_0xc5395c+'\x20'[_0x151784(0x20b)](Math[_0x151784(0x1c2)](0x1,_0x521f34))+a55_0x4b0078[_0x151784(0x35c)](_0x57929c),_0xca6c9e=Math[_0x151784(0x309)]((_0x5e0233-_0x105f15)/_0xd8f5c4),_0x4c1cf9=Math[_0x151784(0x309)]((_0x3e1eeb-_0x105f15)/_0xd8f5c4),_0x5dd06d=Math['max'](_0xca6c9e+0x1,_0x4c1cf9),_0xc07ce7=new Array(_0x5cd4e4)['fill']('\x20');for(let _0x123203=_0xca6c9e;_0x123203<Math['min'](_0x5dd06d,_0x5cd4e4);_0x123203++){_0xc07ce7[_0x123203]='─';}const _0x1395a6=_0xc07ce7[_0x151784(0x23e)](_0x9af85d=>_0x9af85d==='\x20'?'\x20':_0x50dbd9(_0x9af85d))[_0x151784(0x2ff)]('');_0x4184cf[_0x151784(0x1d3)](_0x2762eb+'\x20'+_0x3ea9b7+'│'+_0x1395a6+'│');}return _0x4184cf[_0x151784(0x2ff)]('\x0a');}async[a55_0x1e66bb(0x219)](_0x384f3b,_0x591fe9,_0x5f31bd){const _0x2bdd60=a55_0x1e66bb,{options:_0x288198,tdx:_0x349c52}=_0x591fe9,_0x4a0af2=_0x288198[_0x2bdd60(0x319)],{timelineRows:_0x18df61,timeAxisHeader:_0x21ca58}=this[_0x2bdd60(0x1c0)](_0x384f3b,_0x4a0af2),_0x3d9708=_0x18df61['filter'](_0x38d4a9=>_0x38d4a9['attemptId']);if(_0x3d9708[_0x2bdd60(0x2b4)]===0x0){const _0x28cbc4=this['renderSessionsTimeline'](_0x384f3b,_0x4a0af2);console[_0x2bdd60(0x289)](_0x28cbc4);!_0x5f31bd&&(console['error'](''),console[_0x2bdd60(0x26a)](a55_0x4b0078[_0x2bdd60(0x35c)](_0x2bdd60(0x206))),console[_0x2bdd60(0x26a)](a55_0x4b0078[_0x2bdd60(0x35c)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a55_0x4b0078[_0x2bdd60(0x35c)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x21ca58&&console[_0x2bdd60(0x289)](_0x21ca58);const _0x41a30c=_0x18df61['filter'](_0x57ab11=>_0x57ab11[_0x2bdd60(0x1ec)])[_0x2bdd60(0x23e)](_0xda9f79=>({'title':_0xda9f79['displayLine'],'value':_0xda9f79[_0x2bdd60(0x1ec)]})),_0x13011d=process[_0x2bdd60(0x256)][_0x2bdd60(0x306)]||0x3c,_0x185d3c=Math[_0x2bdd60(0x1c2)](0x28,Math[_0x2bdd60(0x309)](_0x13011d*0x2/0x3)),_0x1e524e=await a55_0x264e0e({'type':_0x2bdd60(0x322),'name':_0x2bdd60(0x1ec),'message':_0x2bdd60(0x1e8),'choices':_0x41a30c,'initial':-0x1,'limit':_0x185d3c,'clearFirst':!![],'fallback':{'title':_0x2bdd60(0x342),'value':null},'suggest':(_0x335d63,_0x1f0d00)=>{const _0x422087=_0x2bdd60;if(!_0x335d63)return Promise[_0x422087(0x1cf)](_0x1f0d00);const _0x8cd4a1=_0x1f0d00[_0x422087(0x218)](_0x457ffb=>{const _0x4c7286=_0x422087,_0x469b72=_0x457ffb;return _0x469b72[_0x4c7286(0x1c3)][_0x4c7286(0x265)]()[_0x4c7286(0x210)](_0x335d63['toLowerCase']());});return Promise[_0x422087(0x1cf)](_0x8cd4a1);}}),_0x4a4494=()=>{const _0x2cc280=_0x2bdd60;process[_0x2cc280(0x256)][_0x2cc280(0x274)]('\x1b[1A\x1b[2K'),process['stdout']['write'](_0x2cc280(0x25c)),process['stdout']['write'](_0x2cc280(0x25c));},_0x2383aa=_0x1e524e&&_0x1e524e[_0x2bdd60(0x1ec)]&&_0x1e524e[_0x2bdd60(0x1ec)]!==null&&_0x1e524e[_0x2bdd60(0x1ec)][_0x2bdd60(0x23f)]()!=='';if(!_0x2383aa){_0x4a4494(),console['log'](a55_0x4b0078[_0x2bdd60(0x35c)](_0x2bdd60(0x2dd)));return;}_0x4a4494();const _0x422d01=_0x384f3b['find'](_0x48739b=>_0x48739b['lastAttempt']?.['id']===_0x1e524e['attemptId']);if(_0x422d01){const _0x318d11=_0x422d01[_0x2bdd60(0x1db)]?.[_0x2bdd60(0x293)]||'?',_0x53e82d=_0x422d01[_0x2bdd60(0x2a5)]?.[_0x2bdd60(0x293)]||'?';console[_0x2bdd60(0x289)](_0x2bdd60(0x2c2)+a55_0x4b0078[_0x2bdd60(0x35c)](_0x318d11)+_0x2bdd60(0x2b6)+a55_0x4b0078[_0x2bdd60(0x35c)](_0x53e82d));}const _0x436076=new WorkflowTimelineCommand();await _0x436076[_0x2bdd60(0x2a0)]({'args':[],'options':{..._0x288198,'attemptId':_0x1e524e['attemptId']},'tdx':_0x349c52});}[a55_0x1e66bb(0x1c0)](_0x39cdfb,_0x1ef637){const _0x54693b=a55_0x1e66bb,_0x321ed9=new Map();for(const _0x19fe66 of _0x39cdfb){_0x19fe66['id']&&_0x19fe66[_0x54693b(0x1f8)]?.['id']&&_0x321ed9[_0x54693b(0x35d)](_0x19fe66['id'],_0x19fe66[_0x54693b(0x1f8)]['id']);}const _0x4821aa=[];let _0xe43479='';const _0xe96b98=this[_0x54693b(0x34b)](_0x39cdfb,_0x1ef637),_0xe5b318=_0xe96b98[_0x54693b(0x1bc)]('\x0a');for(const _0x3c3bb2 of _0xe5b318){if(_0x3c3bb2[_0x54693b(0x32b)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x3c3bb2[_0x54693b(0x29f)](/^\s+\d{4}-\d{2}-\d{2}/))_0xe43479=_0x3c3bb2;else{if(_0x3c3bb2[_0x54693b(0x29f)](/^[✅❌🔄🛑⏳]/)){const _0x105c2e=_0x3c3bb2[_0x54693b(0x29f)](/#(\d+)/),_0x32c825=_0x105c2e?_0x105c2e[0x1]:null,_0x1c70c4=_0x32c825?_0x321ed9[_0x54693b(0x325)](_0x32c825)||null:null,_0x300ea2=_0x39cdfb[_0x54693b(0x1eb)](_0x1ef8c0=>_0x1ef8c0['id']===_0x32c825),_0x543f89=_0x300ea2?.[_0x54693b(0x1db)]?.[_0x54693b(0x293)]||'';_0x4821aa['push']({'displayLine':_0x3c3bb2,'attemptId':_0x1c70c4,'projectName':_0x543f89});}}}return{'timelineRows':_0x4821aa,'timeAxisHeader':_0xe43479};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x1e66bb(0x293)]='workflow:attempts';[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x315);async[a55_0x1e66bb(0x2a0)](_0x3915b5){const _0x13e995=a55_0x1e66bb,{options:_0x35a799,args:_0x46ddaa,tdx:_0x27d99b}=_0x3915b5,_0x18d5d2=this[_0x13e995(0x22b)](_0x46ddaa,_0x35a799);if(!_0x18d5d2)return 0x1;const {projectName:_0x49782b,workflowName:_0xf8d229}=_0x18d5d2,_0x4f1947=_0x35a799[_0x13e995(0x1f5)];if(_0x35a799['verbose']){if(_0x49782b&&_0xf8d229)console[_0x13e995(0x26a)]('Filter:\x20'+_0x49782b+'.'+_0xf8d229);else _0x49782b&&console[_0x13e995(0x26a)](_0x13e995(0x1ca)+_0x49782b);_0x4f1947&&console['error']('Include\x20retried:\x20yes');}const _0x26d75c=await withSpinner(_0x13e995(0x201),()=>_0x27d99b[_0x13e995(0x2a5)][_0x13e995(0x1e0)]({'projectName':_0x49782b,'workflowName':_0xf8d229,'includeRetried':_0x4f1947,'limit':_0x35a799['limit']}),{'verbose':_0x35a799['verbose']}),_0x4954ed=_0x26d75c[_0x13e995(0x1cd)],_0x3deafb=_0x35a799[_0x13e995(0x2e8)]||0x64,_0xb27853=_0x4954ed['length']>=_0x3deafb?a55_0x4b0078[_0x13e995(0x35c)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error'](_0x13e995(0x244)+_0x4954ed[_0x13e995(0x2b4)]+_0x13e995(0x1e6)+(_0x4954ed[_0x13e995(0x2b4)]!==0x1?'s':'')+_0xb27853);if(_0x35a799[_0x13e995(0x1de)]===_0x13e995(0x247)||_0x35a799[_0x13e995(0x1de)]===_0x13e995(0x32a)||_0x35a799[_0x13e995(0x1de)]===_0x13e995(0x2d0))await handleSDKOutput(_0x4954ed,_0x35a799);else{if(_0x4954ed[_0x13e995(0x2b4)]===0x0){if(_0x49782b&&_0xf8d229)console[_0x13e995(0x289)](_0x13e995(0x215)+_0x49782b+'.'+_0xf8d229);else _0x49782b?console['log']('No\x20attempts\x20found\x20in\x20project:\x20'+_0x49782b):console[_0x13e995(0x289)](_0x13e995(0x283));}else{const _0xdae507=_0x35a799[_0x13e995(0x319)],_0x217c83=_0x4954ed[_0x13e995(0x23e)](_0x25c31b=>{const _0x546107=_0x13e995,_0x1e483f=a55_0x4b0078[_0x546107(0x35c)]('#'+_0x25c31b['id']),_0x5f3aeb=_0x25c31b[_0x546107(0x1db)]?.['id'],_0x42ca65=_0x25c31b[_0x546107(0x2b2)]||_0x25c31b[_0x546107(0x25d)],_0x1c128f=_0x5f3aeb&&_0x42ca65?hyperlink(_0x1e483f,getWorkflowAttemptUrl(_0xdae507,_0x5f3aeb,_0x42ca65,_0x25c31b['id'])):_0x1e483f,{icon:_0x46dade,text:_0x4845ff}=getAttemptStatusDisplay(_0x25c31b),_0x23ebd5=(_0x25c31b[_0x546107(0x1db)]?.['name']||'?')+'.'+(_0x25c31b['workflow']?.[_0x546107(0x293)]||'?'),_0x4bac06=_0x25c31b[_0x546107(0x360)]?a55_0x4b0078[_0x546107(0x35c)](_0x25c31b[_0x546107(0x360)]):'';return(_0x1c128f+'\x20'+_0x46dade+(_0x4845ff?'\x20'+_0x4845ff:'')+'\x20'+_0x23ebd5+'\x20'+_0x4bac06)[_0x546107(0x35a)]();});await writeOutput(_0x217c83['join']('\x0a'),_0x35a799[_0x13e995(0x30c)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a55_0x1e66bb(0x293)]='workflow:attempt';['description']=a55_0x1e66bb(0x286);async[a55_0x1e66bb(0x2a0)](_0x3ef5a9){const _0x1b35a5=a55_0x1e66bb,{options:_0x4cf516,args:_0x4792a7,tdx:_0x57d707}=_0x3ef5a9,_0x1eb3f3=_0x4792a7[0x0];if(!_0x1eb3f3)return console[_0x1b35a5(0x26a)](_0x1b35a5(0x359)),0x1;_0x4cf516['verbose']&&console['error']('Attempt\x20ID:\x20'+_0x1eb3f3);const _0x12d67f=await withSpinner(_0x1b35a5(0x365),()=>_0x57d707[_0x1b35a5(0x2a5)][_0x1b35a5(0x255)](_0x1eb3f3),{'verbose':_0x4cf516['verbose']}),_0x51add3=_0x12d67f[_0x1b35a5(0x1cd)];let _0x3748b6;!_0x51add3[_0x1b35a5(0x341)]?_0x3748b6=_0x51add3[_0x1b35a5(0x1e5)]?'canceling':_0x1b35a5(0x2e1):_0x3748b6=_0x51add3[_0x1b35a5(0x2bb)]?_0x1b35a5(0x2bb):_0x1b35a5(0x26a);let _0x2990ee;if(_0x51add3[_0x1b35a5(0x269)]&&_0x51add3[_0x1b35a5(0x1d0)]){const _0x2a5790=new Date(_0x51add3[_0x1b35a5(0x269)])[_0x1b35a5(0x1fa)](),_0x2f7880=new Date(_0x51add3['finishedAt'])[_0x1b35a5(0x1fa)]();_0x2990ee=Math[_0x1b35a5(0x334)]((_0x2f7880-_0x2a5790)/0x3e8);}const _0x3d516f={'attempt_id':_0x51add3['id'],'status':_0x3748b6,..._0x51add3[_0x1b35a5(0x352)]!==undefined&&{'index':_0x51add3['index']},..._0x51add3[_0x1b35a5(0x1db)]&&{'project':_0x51add3['project']['name']},..._0x51add3[_0x1b35a5(0x2a5)]&&{'workflow':_0x51add3['workflow'][_0x1b35a5(0x293)]},..._0x51add3[_0x1b35a5(0x25d)]&&{'session_id':_0x51add3[_0x1b35a5(0x25d)]},..._0x51add3[_0x1b35a5(0x360)]&&{'session_time':_0x51add3[_0x1b35a5(0x360)]},..._0x51add3[_0x1b35a5(0x344)]&&{'retry_attempt':_0x51add3[_0x1b35a5(0x344)]},..._0x2990ee!==undefined&&{'duration_sec':_0x2990ee},..._0x51add3['createdAt']&&{'created_at':_0x51add3['createdAt']},..._0x51add3[_0x1b35a5(0x1d0)]&&{'finished_at':_0x51add3[_0x1b35a5(0x1d0)]},...Object['keys'](_0x51add3[_0x1b35a5(0x33b)])[_0x1b35a5(0x2b4)]>0x0&&{'params':_0x51add3[_0x1b35a5(0x33b)]}};return await handleSingleObjectOutput(_0x3d516f,_0x4cf516),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']='workflow:tasks';[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x30b);async['execute'](_0xe67978){const _0x59089b=a55_0x1e66bb,{options:_0x89cfa0,args:_0x4301a8,tdx:_0x38ad8a}=_0xe67978,_0xc3d1c=_0x4301a8[0x0];if(!_0xc3d1c)return console['error'](_0x59089b(0x359)),0x1;const _0x35d379=_0x89cfa0[_0x59089b(0x211)];_0x89cfa0[_0x59089b(0x328)]&&(console[_0x59089b(0x26a)](_0x59089b(0x34f)+_0xc3d1c),_0x35d379&&console['error'](_0x59089b(0x2de)));const _0x303c10=await withSpinner(_0x59089b(0x29d),()=>_0x38ad8a[_0x59089b(0x2a5)][_0x59089b(0x2fa)](_0xc3d1c,_0x35d379||![]),{'verbose':_0x89cfa0['verbose']}),_0x3f6339=_0x303c10['data'];return console[_0x59089b(0x26a)](_0x59089b(0x244)+_0x3f6339[_0x59089b(0x2b4)]+_0x59089b(0x209)+(_0x3f6339[_0x59089b(0x2b4)]!==0x1?'s':'')),await handleSDKOutput(_0x3f6339,_0x89cfa0),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x1f9);['description']=a55_0x1e66bb(0x2ea);async[a55_0x1e66bb(0x2a0)](_0x57e68c){const _0x394d4e=a55_0x1e66bb,{options:_0x1eb5e2,args:_0x4b6d79,tdx:_0xdc6a02}=_0x57e68c,_0x3893ed=_0x4b6d79[0x0];let _0x49c43d=_0x4b6d79[0x1];if(!_0x3893ed)return console[_0x394d4e(0x26a)](_0x394d4e(0x359)),0x1;_0x1eb5e2[_0x394d4e(0x328)]&&(console[_0x394d4e(0x26a)](_0x394d4e(0x34f)+_0x3893ed),_0x49c43d&&console[_0x394d4e(0x26a)](_0x394d4e(0x234)+_0x49c43d));const _0x70a9b1=await withSpinner(_0x394d4e(0x350),()=>_0xdc6a02[_0x394d4e(0x2a5)]['logFiles'](_0x3893ed,_0x49c43d),{'verbose':_0x1eb5e2[_0x394d4e(0x328)]}),_0xa5939d=_0x70a9b1['data'];if(_0xa5939d[_0x394d4e(0x2b4)]===0x0)return console[_0x394d4e(0x26a)](_0x394d4e(0x2c9)),0x0;if(!_0x49c43d&&(_0x1eb5e2['json']||_0x1eb5e2['format']))return await handleSDKOutput(_0xa5939d,_0x1eb5e2),0x0;if(!_0x49c43d){const _0x18c4a3=_0xa5939d[_0x394d4e(0x23e)](_0x42dd52=>({'title':_0x42dd52[_0x394d4e(0x28e)]+'\x20('+formatBytes(_0x42dd52['fileSize'])+')','value':_0x42dd52[_0x394d4e(0x28e)]})),_0x48683e=await a55_0x264e0e({'type':_0x394d4e(0x29b),'name':_0x394d4e(0x31f),'message':_0x394d4e(0x2bf),'choices':_0x18c4a3});if(!_0x48683e['task'])return console[_0x394d4e(0x26a)]('Cancelled'),0x0;_0x49c43d=_0x48683e[_0x394d4e(0x31f)];}const _0x1a0a81=await withSpinner('Downloading\x20logs...',()=>_0xdc6a02[_0x394d4e(0x2a5)]['logs'](_0x3893ed,_0x49c43d),{'verbose':_0x1eb5e2['verbose']}),_0x7c58e6=_0x1a0a81['data'];return _0x7c58e6?console[_0x394d4e(0x289)](_0x7c58e6):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x2c8);['description']=a55_0x1e66bb(0x2f3);async['execute'](_0x5aab38){const _0xba11bf=a55_0x1e66bb,{options:_0x14baa8,args:_0x44180e,tdx:_0x1a442b}=_0x5aab38,_0x90418=_0x44180e[0x0];if(!_0x90418)return console[_0xba11bf(0x26a)](_0xba11bf(0x359)),0x1;const _0x51460a=_0x14baa8['reason'];_0x14baa8[_0xba11bf(0x328)]&&(console[_0xba11bf(0x26a)](_0xba11bf(0x34f)+_0x90418),_0x51460a&&console['error'](_0xba11bf(0x277)+_0x51460a));if(!_0x14baa8['yes']){if(!isInteractive())return console['error'](a55_0x4b0078[_0xba11bf(0x1bf)](_0xba11bf(0x261)),_0xba11bf(0x2d1)),console[_0xba11bf(0x26a)](a55_0x4b0078[_0xba11bf(0x35c)](_0xba11bf(0x2b0))),0x1;const _0x3ddc59=await confirmKey(_0xba11bf(0x2eb)+_0x90418+'?');if(!_0x3ddc59)return console['error'](a55_0x4b0078['yellow'](_0xba11bf(0x2dd))),0x1;}const _0x4e0292=await withSpinner(_0xba11bf(0x35f),()=>_0x1a442b[_0xba11bf(0x2a5)][_0xba11bf(0x296)](_0x90418,_0x51460a),{'verbose':_0x14baa8[_0xba11bf(0x328)]}),_0xb667ad=_0x4e0292['data'];return console[_0xba11bf(0x26a)]('✔\x20'+_0xb667ad),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x1e66bb(0x293)]='workflow:retry';[a55_0x1e66bb(0x2f7)]='Retry\x20a\x20session\x20or\x20attempt';async[a55_0x1e66bb(0x2a0)](_0x20b347){const _0x4fb56f=a55_0x1e66bb,{options:_0x4bc3ea,args:_0x47be2b,tdx:_0x3d54bc}=_0x20b347,_0x525bf7=_0x47be2b[0x0];if(!_0x525bf7)return console[_0x4fb56f(0x26a)](_0x4fb56f(0x1d4)),console[_0x4fb56f(0x26a)](_0x4fb56f(0x1f2)),0x1;let _0x2c2c63=![],_0x54be9a=_0x525bf7;if(_0x525bf7['startsWith']('session:'))_0x2c2c63=!![],_0x54be9a=_0x525bf7['substring'](0x8);else{if(_0x525bf7[_0x4fb56f(0x32b)]('attempt:'))_0x2c2c63=![],_0x54be9a=_0x525bf7[_0x4fb56f(0x363)](0x8);else return console[_0x4fb56f(0x26a)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x4fb56f(0x26a)](_0x4fb56f(0x1f2)),0x1;}const _0x71c72e=_0x4bc3ea[_0x4fb56f(0x36b)],_0x574eae=_0x4bc3ea[_0x4fb56f(0x26d)],_0xbc7aa1=_0x4bc3ea[_0x4fb56f(0x33b)],_0x4902ef=_0x4bc3ea['force'];_0x4bc3ea[_0x4fb56f(0x328)]&&(console[_0x4fb56f(0x26a)](_0x4fb56f(0x33d)+(_0x2c2c63?_0x4fb56f(0x1f0):_0x4fb56f(0x255))+'\x20'+_0x54be9a),_0x71c72e&&console['error']('From\x20task:\x20'+_0x71c72e),_0x574eae&&console[_0x4fb56f(0x26a)](_0x4fb56f(0x2ac)+_0x574eae),_0xbc7aa1&&console[_0x4fb56f(0x26a)](_0x4fb56f(0x323)+_0xbc7aa1),_0x4902ef&&console[_0x4fb56f(0x26a)](_0x4fb56f(0x21b)));let _0x5d930b;if(_0xbc7aa1)try{if(_0xbc7aa1[_0x4fb56f(0x32b)]('@')){const _0xc823fa=await import('fs/promises'),_0x134338=_0xbc7aa1[_0x4fb56f(0x363)](0x1),_0x4947d8=await _0xc823fa[_0x4fb56f(0x1ed)](_0x134338,_0x4fb56f(0x2c0));_0x5d930b=JSON[_0x4fb56f(0x2c1)](_0x4947d8);}else _0x5d930b=JSON[_0x4fb56f(0x2c1)](_0xbc7aa1);}catch{return console[_0x4fb56f(0x26a)](_0x4fb56f(0x20a)),0x1;}if(!_0x4bc3ea['yes']){if(!isInteractive())return console[_0x4fb56f(0x26a)](a55_0x4b0078['red'](_0x4fb56f(0x261)),_0x4fb56f(0x2d1)),console[_0x4fb56f(0x26a)](a55_0x4b0078[_0x4fb56f(0x35c)](_0x4fb56f(0x2b0))),0x1;const _0x52f676=await confirmKey(_0x4fb56f(0x2ab)+(_0x2c2c63?_0x4fb56f(0x1f0):'attempt')+'\x20'+_0x54be9a+'?');if(!_0x52f676)return console[_0x4fb56f(0x26a)](a55_0x4b0078[_0x4fb56f(0x26e)](_0x4fb56f(0x2dd))),0x1;}let _0x3e30c8;_0x2c2c63?_0x3e30c8=await withSpinner(_0x4fb56f(0x294),()=>_0x3d54bc[_0x4fb56f(0x2a5)][_0x4fb56f(0x225)](_0x54be9a,{'fromTask':_0x71c72e,'retryParams':_0x5d930b}),{'verbose':_0x4bc3ea['verbose']}):_0x3e30c8=await withSpinner('Retrying\x20attempt...',()=>_0x3d54bc[_0x4fb56f(0x2a5)][_0x4fb56f(0x30e)](_0x54be9a,{'resumeFrom':_0x574eae,'retryParams':_0x5d930b,'force':_0x4902ef}),{'verbose':_0x4bc3ea[_0x4fb56f(0x328)]});const _0x454909=_0x3e30c8[_0x4fb56f(0x1cd)];return console['error'](_0x4fb56f(0x2da)),console[_0x4fb56f(0x26a)](_0x4fb56f(0x2a2)+_0x454909[_0x4fb56f(0x1ec)]),console['error'](_0x4fb56f(0x27a)+_0x454909[_0x4fb56f(0x25d)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a55_0x1e66bb(0x223);[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x25f);async[a55_0x1e66bb(0x2a0)](_0x5f1c6e){const _0x2119ab=a55_0x1e66bb,{options:_0x4bf1d6,args:_0x8f37e2,tdx:_0x56f5e2}=_0x5f1c6e;let _0x31bf5b=_0x8f37e2[0x0];if(!_0x31bf5b){const _0x2e81b0=this[_0x2119ab(0x200)]([],_0x4bf1d6),_0x487b78=await withSpinner(_0x2119ab(0x355),()=>_0x56f5e2[_0x2119ab(0x2a5)][_0x2119ab(0x252)](_0x2e81b0,{'limit':_0x4bf1d6['limit']}),{'verbose':_0x4bf1d6['verbose']}),_0x586286=_0x487b78['data'];if(_0x586286[_0x2119ab(0x2b4)]===0x0)return console[_0x2119ab(0x26a)](_0x2119ab(0x335)),!_0x2e81b0&&console[_0x2119ab(0x26a)](a55_0x4b0078[_0x2119ab(0x35c)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x2f9cdf=_0x586286['map'](_0x4d8e26=>({'title':_0x4d8e26[_0x2119ab(0x1db)]?.[_0x2119ab(0x293)]+'.'+_0x4d8e26[_0x2119ab(0x293)],'value':_0x4d8e26[_0x2119ab(0x1db)]?.[_0x2119ab(0x293)]+'.'+_0x4d8e26['name'],'description':_0x4d8e26['revision']?'revision:\x20'+_0x4d8e26[_0x2119ab(0x2f1)]:undefined})),_0x5d40d7=await a55_0x264e0e({'type':'select','name':_0x2119ab(0x2a5),'message':_0x2119ab(0x1d1),'choices':_0x2f9cdf});if(!_0x5d40d7[_0x2119ab(0x2a5)])return 0x1;_0x31bf5b=_0x5d40d7[_0x2119ab(0x2a5)];}if(!_0x31bf5b[_0x2119ab(0x210)]('.')){const _0x39ff82=this['resolveProject']([],_0x4bf1d6);if(_0x39ff82)_0x31bf5b=_0x39ff82+'.'+_0x31bf5b;else return console[_0x2119ab(0x26a)](a55_0x4b0078[_0x2119ab(0x1bf)]('Error:'),_0x2119ab(0x285)),console['error'](a55_0x4b0078[_0x2119ab(0x35c)](_0x2119ab(0x245))),0x1;}const _0x39b34b=_0x4bf1d6[_0x2119ab(0x2cd)],_0x29670e=_0x4bf1d6[_0x2119ab(0x360)],_0x42c876={};if(_0x39b34b&&Array['isArray'](_0x39b34b))for(const _0x5536d6 of _0x39b34b){const _0x15e35a=_0x5536d6[_0x2119ab(0x2fb)]('=');if(_0x15e35a===-0x1)return console[_0x2119ab(0x26a)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x5536d6),console[_0x2119ab(0x26a)](_0x2119ab(0x330)),0x1;const _0x3adb42=_0x5536d6[_0x2119ab(0x363)](0x0,_0x15e35a),_0x348e51=_0x5536d6['substring'](_0x15e35a+0x1);try{_0x42c876[_0x3adb42]=JSON[_0x2119ab(0x2c1)](_0x348e51);}catch{_0x42c876[_0x3adb42]=_0x348e51;}}_0x4bf1d6[_0x2119ab(0x328)]&&(console[_0x2119ab(0x26a)](_0x2119ab(0x349)+_0x31bf5b),Object['keys'](_0x42c876)[_0x2119ab(0x2b4)]>0x0&&console[_0x2119ab(0x26a)](_0x2119ab(0x34e)+JSON[_0x2119ab(0x30a)](_0x42c876)),_0x29670e&&console[_0x2119ab(0x26a)](_0x2119ab(0x26c)+_0x29670e));const _0x2b80df=await withSpinner(_0x2119ab(0x217),()=>_0x56f5e2['workflow'][_0x2119ab(0x299)](_0x31bf5b,_0x42c876,{'sessionTime':_0x29670e}),{'verbose':_0x4bf1d6[_0x2119ab(0x328)]}),_0x30b3de=_0x2b80df[_0x2119ab(0x1cd)];console[_0x2119ab(0x26a)](_0x2119ab(0x31e)),console[_0x2119ab(0x26a)]('\x20\x20Attempt\x20ID:\x20'+_0x30b3de['id']),console['error'](_0x2119ab(0x27a)+_0x30b3de[_0x2119ab(0x25d)]),console['error'](_0x2119ab(0x21e)+_0x30b3de[_0x2119ab(0x1db)]?.['name']),console[_0x2119ab(0x26a)]('\x20\x20Workflow:\x20'+_0x30b3de[_0x2119ab(0x2a5)]?.[_0x2119ab(0x293)]);if(_0x30b3de['project']?.['id']&&_0x30b3de[_0x2119ab(0x25d)]&&_0x30b3de['id']){const _0x1742bb=_0x4bf1d6[_0x2119ab(0x319)],_0xed48c1=getConsoleUrl(_0x1742bb,'/app/workflows/'+_0x30b3de[_0x2119ab(0x1db)]['id']+_0x2119ab(0x243)+_0x30b3de['sessionId']+_0x2119ab(0x310)+_0x30b3de['id']);console[_0x2119ab(0x26a)](_0x2119ab(0x1d8)+a55_0x4b0078[_0x2119ab(0x2ed)](_0xed48c1));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x28a);['description']=a55_0x1e66bb(0x2af);async[a55_0x1e66bb(0x2a0)](_0x5dc01f){const _0x3cd78b=a55_0x1e66bb,{options:_0x5a00d5,args:_0x588d53,tdx:_0x3453ed}=_0x5dc01f,_0x2b4693=_0x588d53[0x0],_0x500a7e=_0x588d53[0x1]||'.';if(!_0x2b4693)return console[_0x3cd78b(0x26a)](_0x3cd78b(0x237)),console[_0x3cd78b(0x26a)](_0x3cd78b(0x1fd)),0x1;const _0x33b599=_0x5a00d5[_0x3cd78b(0x2f1)];_0x5a00d5['verbose']&&(console[_0x3cd78b(0x26a)](_0x3cd78b(0x2c2)+_0x2b4693),console[_0x3cd78b(0x26a)](_0x3cd78b(0x2f0)+_0x500a7e),_0x33b599&&console[_0x3cd78b(0x26a)]('Revision:\x20'+_0x33b599));const _0x3bbff4=await withSpinner(_0x3cd78b(0x1d7)+_0x2b4693+'...',()=>_0x3453ed[_0x3cd78b(0x2a5)][_0x3cd78b(0x2b9)](_0x2b4693,_0x500a7e,{'revision':_0x33b599}),{'verbose':_0x5a00d5[_0x3cd78b(0x328)]}),_0x3d759c=_0x3bbff4[_0x3cd78b(0x1cd)];return console['error'](_0x3cd78b(0x298)+_0x3d759c[_0x3cd78b(0x1e7)]),console['error'](_0x3cd78b(0x22e)+_0x3d759c[_0x3cd78b(0x2f1)]),console[_0x3cd78b(0x26a)](_0x3cd78b(0x25a)+_0x3d759c[_0x3cd78b(0x24e)]),console[_0x3cd78b(0x26a)](_0x3cd78b(0x1dd)+_0x500a7e+'/'+_0x3d759c[_0x3cd78b(0x1e7)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x205);[a55_0x1e66bb(0x2f7)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a55_0x1e66bb(0x2a0)](_0x10d4c6){const _0x4fd448=a55_0x1e66bb,{options:_0x693b00,args:_0x2629d2,tdx:_0x2fd7c3}=_0x10d4c6;let _0x17f387='.',_0x5d09e0=_0x693b00[_0x4fd448(0x293)];if(_0x2629d2[0x0]){const {promises:_0x3d9e2e}=await import('fs');try{const _0x274125=await _0x3d9e2e[_0x4fd448(0x21c)](_0x2629d2[0x0]);if(_0x274125[_0x4fd448(0x332)]())_0x17f387=_0x2629d2[0x0];else return console['error'](_0x4fd448(0x27f)+_0x2629d2[0x0]+_0x4fd448(0x2bc)),0x1;}catch{_0x5d09e0=_0x2629d2[0x0],_0x17f387='.';}}const _0x38bd13=_0x693b00[_0x4fd448(0x2f1)],_0x51cbf2=_0x693b00[_0x4fd448(0x316)];_0x693b00[_0x4fd448(0x328)]&&(console[_0x4fd448(0x26a)]('Project\x20directory:\x20'+_0x17f387),_0x5d09e0&&console[_0x4fd448(0x26a)](_0x4fd448(0x2c5)+_0x5d09e0),_0x38bd13&&console[_0x4fd448(0x26a)](_0x4fd448(0x20c)+_0x38bd13),_0x51cbf2&&console[_0x4fd448(0x26a)](_0x4fd448(0x31c)));const _0x2486e3=await withSpinner(_0x4fd448(0x313),()=>_0x2fd7c3[_0x4fd448(0x2a5)][_0x4fd448(0x1d3)](_0x17f387,{'projectName':_0x5d09e0,'revision':_0x38bd13,'skipValidation':_0x51cbf2}),{'verbose':_0x693b00[_0x4fd448(0x328)]}),_0x126ce2=_0x2486e3[_0x4fd448(0x1cd)];return console[_0x4fd448(0x26a)](_0x4fd448(0x2b8)+_0x126ce2[_0x4fd448(0x1e7)]),console[_0x4fd448(0x26a)](_0x4fd448(0x2cc)+_0x126ce2[_0x4fd448(0x297)]),console[_0x4fd448(0x26a)](_0x4fd448(0x22e)+_0x126ce2[_0x4fd448(0x2f1)]),await this[_0x4fd448(0x33f)](_0x2fd7c3,_0x126ce2[_0x4fd448(0x1e7)],_0x693b00[_0x4fd448(0x319)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x366);[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x314);async[a55_0x1e66bb(0x2a0)](_0x47eb0d){const _0x583ec4=a55_0x1e66bb,{options:_0x3bdf6d,args:_0x21e9e7,tdx:_0x4592bb}=_0x47eb0d,_0x105a71=_0x21e9e7[0x0],_0x114b46=_0x21e9e7[0x1];if(!_0x105a71)return console[_0x583ec4(0x26a)](a55_0x4b0078[_0x583ec4(0x1bf)](_0x583ec4(0x290)),_0x583ec4(0x276)),console[_0x583ec4(0x26a)](a55_0x4b0078['dim'](_0x583ec4(0x2a4))),0x1;const _0x2fd308=_0x3bdf6d[_0x583ec4(0x2f1)];_0x3bdf6d[_0x583ec4(0x328)]&&(console['error'](_0x583ec4(0x2c2)+_0x105a71),_0x114b46&&console[_0x583ec4(0x26a)]('Target\x20directory:\x20'+_0x114b46),_0x2fd308&&console[_0x583ec4(0x26a)](_0x583ec4(0x20c)+_0x2fd308),_0x3bdf6d[_0x583ec4(0x22f)]&&console[_0x583ec4(0x26a)](_0x583ec4(0x31d)));const _0x23d0f4=await withSpinner(_0x583ec4(0x251)+_0x105a71+_0x583ec4(0x2ae),()=>_0x4592bb['workflow']['pullProject'](_0x105a71,{'targetDir':_0x114b46,'revision':_0x2fd308}),{'verbose':_0x3bdf6d[_0x583ec4(0x328)]}),_0x451d3a=_0x23d0f4[_0x583ec4(0x1cd)];_0x451d3a[_0x583ec4(0x275)]?console[_0x583ec4(0x26a)](_0x583ec4(0x333)+_0x451d3a[_0x583ec4(0x1e7)]):console[_0x583ec4(0x26a)](_0x583ec4(0x29e)+_0x451d3a[_0x583ec4(0x1e7)]);console[_0x583ec4(0x26a)](_0x583ec4(0x22e)+_0x451d3a['revision']),console[_0x583ec4(0x26a)](_0x583ec4(0x236)+(a55_0x596494['relative'](process['cwd'](),_0x451d3a[_0x583ec4(0x1d6)])||'.')),console[_0x583ec4(0x26a)](_0x583ec4(0x213)+a55_0x4b0078[_0x583ec4(0x357)]('+'+_0x451d3a['summary']['new']+_0x583ec4(0x1ff))+',\x20'+(a55_0x4b0078[_0x583ec4(0x26e)]('~'+_0x451d3a[_0x583ec4(0x1e3)][_0x583ec4(0x2bd)]+'\x20modified')+',\x20')+(a55_0x4b0078[_0x583ec4(0x1bf)]('-'+_0x451d3a[_0x583ec4(0x1e3)][_0x583ec4(0x346)]+_0x583ec4(0x207))+',\x20')+(''+a55_0x4b0078[_0x583ec4(0x35c)](_0x451d3a[_0x583ec4(0x1e3)]['unchanged']+'\x20unchanged')));for(const _0x4c420c of _0x451d3a[_0x583ec4(0x33e)]){_0x4c420c[_0x583ec4(0x1cb)]===_0x583ec4(0x2bd)&&_0x4c420c['diff']&&(console[_0x583ec4(0x26a)]('\x0a'+a55_0x4b0078['cyan']('---\x20'+_0x4c420c[_0x583ec4(0x1ee)])),console[_0x583ec4(0x26a)](_0x4c420c[_0x583ec4(0x30d)]));}if(!_0x451d3a['hasChanges'])return saveSessionContext({'workflow_project':_0x451d3a[_0x583ec4(0x1e7)]},_0x3bdf6d['session']),console['error'](a55_0x4b0078[_0x583ec4(0x357)](_0x583ec4(0x336))),console[_0x583ec4(0x26a)](a55_0x4b0078['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x451d3a[_0x583ec4(0x1e7)])),0x0;if(_0x3bdf6d[_0x583ec4(0x22f)])return console['error'](a55_0x4b0078[_0x583ec4(0x26e)](_0x583ec4(0x1df))),0x0;if(!_0x3bdf6d[_0x583ec4(0x214)]){if(!isInteractive())return console['error'](a55_0x4b0078['red'](_0x583ec4(0x261)),_0x583ec4(0x2d1)),console['error'](a55_0x4b0078['dim'](_0x583ec4(0x2b0))),0x1;const _0x4b5546=await confirmKey(_0x583ec4(0x361));if(!_0x4b5546)return console[_0x583ec4(0x26a)](a55_0x4b0078[_0x583ec4(0x26e)](_0x583ec4(0x2dd)),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x583ec4(0x2e6),()=>_0x4592bb[_0x583ec4(0x2a5)][_0x583ec4(0x1e4)](_0x451d3a,{'revision':_0x2fd308}),{'verbose':_0x3bdf6d[_0x583ec4(0x328)]}),saveSessionContext({'workflow_project':_0x451d3a[_0x583ec4(0x1e7)]},_0x3bdf6d['session']),console['error'](a55_0x4b0078[_0x583ec4(0x357)](_0x583ec4(0x34c)));const _0x108835=a55_0x596494[_0x583ec4(0x280)](process[_0x583ec4(0x203)](),_0x451d3a[_0x583ec4(0x1d6)])||'.';return console[_0x583ec4(0x26a)](a55_0x4b0078[_0x583ec4(0x35c)](_0x583ec4(0x1dd)+_0x108835)),console[_0x583ec4(0x26a)](a55_0x4b0078[_0x583ec4(0x35c)](_0x583ec4(0x267)+_0x451d3a[_0x583ec4(0x1e7)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x246);[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x21d);async[a55_0x1e66bb(0x2a0)](_0x49b6ac){const _0x425238=a55_0x1e66bb,{options:_0x56494f,args:_0x318fee,tdx:_0x453900}=_0x49b6ac,_0x1836c5=this[_0x425238(0x347)](_0x318fee,_0x56494f),_0x22e88f=_0x56494f[_0x425238(0x2f1)],_0x2efd9e=_0x56494f[_0x425238(0x316)];_0x56494f['verbose']&&(_0x1836c5&&console[_0x425238(0x26a)](_0x425238(0x241)+_0x1836c5),_0x22e88f&&console[_0x425238(0x26a)]('Revision:\x20'+_0x22e88f),_0x56494f['dryRun']&&console['error'](_0x425238(0x31d)),_0x2efd9e&&console[_0x425238(0x26a)]('Validation:\x20skipped'));let _0x3c4844;try{_0x3c4844=await withSpinner(_0x425238(0x235),()=>_0x453900[_0x425238(0x2a5)][_0x425238(0x288)]({'sourceDir':_0x1836c5,'revision':_0x22e88f,'skipValidation':_0x2efd9e}),{'verbose':_0x56494f[_0x425238(0x328)]});}catch(_0xe9c3fb){if(_0xe9c3fb instanceof Error&&_0xe9c3fb['message'][_0x425238(0x210)](_0x425238(0x312)))return console[_0x425238(0x26a)](a55_0x4b0078[_0x425238(0x1bf)](_0x425238(0x290)),_0x425238(0x2cb)),_0x56494f[_0x425238(0x1fe)]?console['error'](a55_0x4b0078[_0x425238(0x35c)](_0x425238(0x304)+_0x56494f[_0x425238(0x1fe)]+_0x425238(0x295)+_0x56494f[_0x425238(0x1fe)]+'\x27')):console[_0x425238(0x26a)](a55_0x4b0078[_0x425238(0x35c)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0xe9c3fb;}const _0x18898b=_0x3c4844[_0x425238(0x1cd)];console['error'](_0x425238(0x30f)+_0x18898b[_0x425238(0x1e7)]),console['error'](_0x425238(0x1e2)+_0x18898b[_0x425238(0x35b)]),console[_0x425238(0x26a)](_0x425238(0x22e)+_0x18898b[_0x425238(0x2f1)]),console[_0x425238(0x26a)](_0x425238(0x213)+a55_0x4b0078[_0x425238(0x357)]('+'+_0x18898b[_0x425238(0x1e3)][_0x425238(0x27b)]+_0x425238(0x1ff))+',\x20'+(a55_0x4b0078[_0x425238(0x26e)]('~'+_0x18898b[_0x425238(0x1e3)][_0x425238(0x2bd)]+'\x20modified')+',\x20')+(a55_0x4b0078[_0x425238(0x1bf)]('-'+_0x18898b[_0x425238(0x1e3)][_0x425238(0x346)]+_0x425238(0x207))+',\x20')+(''+a55_0x4b0078[_0x425238(0x35c)](_0x18898b[_0x425238(0x1e3)][_0x425238(0x2fe)]+_0x425238(0x233))));for(const _0x2c602e of _0x18898b[_0x425238(0x33e)]){_0x2c602e[_0x425238(0x1cb)]==='modified'&&_0x2c602e[_0x425238(0x30d)]&&(console['error']('\x0a'+a55_0x4b0078['cyan']('---\x20'+_0x2c602e[_0x425238(0x1ee)])),console[_0x425238(0x26a)](_0x2c602e[_0x425238(0x30d)]));}if(!_0x18898b[_0x425238(0x202)])return console[_0x425238(0x26a)](a55_0x4b0078['green']('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x425238(0x33f)](_0x453900,_0x18898b[_0x425238(0x1e7)],_0x56494f['site']),0x0;if(_0x56494f[_0x425238(0x22f)])return console[_0x425238(0x26a)](a55_0x4b0078[_0x425238(0x26e)](_0x425238(0x1f4))),0x0;if(!_0x56494f[_0x425238(0x214)]){if(!isInteractive())return console[_0x425238(0x26a)](a55_0x4b0078[_0x425238(0x1bf)](_0x425238(0x261)),_0x425238(0x2d1)),console['error'](a55_0x4b0078[_0x425238(0x35c)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xaf3296=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0xaf3296)return console['error'](a55_0x4b0078[_0x425238(0x26e)]('Cancelled'),_0x425238(0x2ba)),0x1;}const _0x4f736d=await withSpinner('Pushing\x20project...',()=>_0x453900[_0x425238(0x2a5)][_0x425238(0x227)](_0x18898b),{'verbose':_0x56494f['verbose']}),_0x1c1f40=_0x4f736d['data'];return console['error'](a55_0x4b0078[_0x425238(0x357)](_0x425238(0x2a9))),console['error'](_0x425238(0x2cc)+_0x1c1f40['projectId']),console[_0x425238(0x26a)](_0x425238(0x22e)+_0x1c1f40[_0x425238(0x2f1)]),await this[_0x425238(0x33f)](_0x453900,_0x1c1f40[_0x425238(0x1e7)],_0x56494f[_0x425238(0x319)]),0x0;}}function a55_0x2594(_0x1614ae,_0x383748){_0x1614ae=_0x1614ae-0x1bc;const _0x453eec=a55_0x453e();let _0x259430=_0x453eec[_0x1614ae];return _0x259430;}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a55_0x1e66bb(0x1fb);[a55_0x1e66bb(0x2f7)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a55_0x1e66bb(0x2a0)](_0x372d07){const _0x506190=a55_0x1e66bb,{options:_0x5a7bf9,args:_0x1104ba,tdx:_0x301c2c}=_0x372d07,_0x4d63e9=this[_0x506190(0x347)](_0x1104ba,_0x5a7bf9),_0x8c8628=_0x5a7bf9[_0x506190(0x293)],_0xebb8f1=_0x5a7bf9[_0x506190(0x2f1)],_0x28ed52=_0x5a7bf9[_0x506190(0x316)];if(!_0x4d63e9)return console[_0x506190(0x26a)](a55_0x4b0078[_0x506190(0x1bf)](_0x506190(0x290)),_0x506190(0x228)),console[_0x506190(0x26a)](a55_0x4b0078['dim'](_0x506190(0x271))),console[_0x506190(0x26a)](a55_0x4b0078[_0x506190(0x35c)](_0x506190(0x1da))),0x1;if(!_0x8c8628)return console[_0x506190(0x26a)](a55_0x4b0078[_0x506190(0x1bf)]('Error:'),_0x506190(0x220)),console[_0x506190(0x26a)](a55_0x4b0078['dim'](_0x506190(0x271))),0x1;_0x5a7bf9[_0x506190(0x328)]&&(console[_0x506190(0x26a)](_0x506190(0x241)+_0x4d63e9),console['error'](_0x506190(0x345)+_0x8c8628),_0xebb8f1&&console[_0x506190(0x26a)](_0x506190(0x20c)+_0xebb8f1),_0x5a7bf9['dryRun']&&console['error'](_0x506190(0x31d)),_0x28ed52&&console['error'](_0x506190(0x31c)));const _0xcb6efc=await withSpinner(_0x506190(0x23a),()=>_0x301c2c[_0x506190(0x2a5)][_0x506190(0x2d3)](_0x4d63e9,_0x8c8628,{'revision':_0xebb8f1,'skipValidation':_0x28ed52}),{'verbose':_0x5a7bf9[_0x506190(0x328)]}),_0x1dcb61=_0xcb6efc[_0x506190(0x1cd)];console['error'](_0x506190(0x212)+_0x1dcb61[_0x506190(0x35b)]);_0x1dcb61[_0x506190(0x22a)]&&console[_0x506190(0x26a)]('Source\x20project:\x20'+_0x1dcb61[_0x506190(0x22a)]);console['error'](_0x506190(0x345)+_0x1dcb61[_0x506190(0x35e)]),console[_0x506190(0x26a)](_0x506190(0x20c)+_0x1dcb61[_0x506190(0x2f1)]),console[_0x506190(0x26a)](_0x506190(0x281)+_0x1dcb61['fileCount']);_0x1dcb61[_0x506190(0x216)]&&(console['error'](a55_0x4b0078[_0x506190(0x26e)]('\x0a⚠\x20Project\x20\x22'+_0x1dcb61[_0x506190(0x35e)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x1dcb61['existingProjectId']+')')),console[_0x506190(0x26a)](a55_0x4b0078[_0x506190(0x26e)](_0x506190(0x302))));if(_0x5a7bf9[_0x506190(0x22f)])return console[_0x506190(0x26a)](a55_0x4b0078[_0x506190(0x26e)](_0x506190(0x268))),0x0;if(!_0x5a7bf9[_0x506190(0x214)]){if(!isInteractive())return console[_0x506190(0x26a)](a55_0x4b0078[_0x506190(0x1bf)](_0x506190(0x261)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x506190(0x26a)](a55_0x4b0078[_0x506190(0x35c)](_0x506190(0x2b0))),0x1;const _0x227417=_0x1dcb61['sourceProjectName']||a55_0x596494[_0x506190(0x368)](_0x4d63e9),_0x4b7916=_0x1dcb61['targetExists']?_0x506190(0x1e1)+_0x8c8628+_0x506190(0x300):_0x506190(0x284)+_0x227417+_0x506190(0x224)+_0x8c8628+'\x22?',_0xc87702=await confirmKey(_0x4b7916);if(!_0xc87702)return console[_0x506190(0x26a)](a55_0x4b0078['yellow']('Cancelled')),0x1;}const _0x13808d=await withSpinner(_0x1dcb61['targetExists']?'Updating\x20'+_0x8c8628+'...':_0x506190(0x31a)+_0x8c8628+'...',()=>_0x301c2c[_0x506190(0x2a5)][_0x506190(0x324)](_0x1dcb61),{'verbose':_0x5a7bf9[_0x506190(0x328)]}),_0x4fc19b=_0x13808d[_0x506190(0x1cd)];return console['error'](a55_0x4b0078[_0x506190(0x357)](_0x1dcb61[_0x506190(0x216)]?_0x506190(0x2db):_0x506190(0x338))),console[_0x506190(0x26a)](_0x506190(0x21e)+_0x4fc19b[_0x506190(0x35e)]),console['error'](_0x506190(0x2cc)+_0x4fc19b[_0x506190(0x29a)]),console[_0x506190(0x26a)](_0x506190(0x22e)+_0x4fc19b['revision']),await this[_0x506190(0x33f)](_0x301c2c,_0x4fc19b[_0x506190(0x35e)],_0x5a7bf9['site']),0x0;}}function a55_0x453e(){const _0x4b80d5=['run','newProjectId','select','\x20\x20tdx\x20wf\x20use\x20<project>','Getting\x20attempt\x20tasks...','→\x20Project:\x20','match','execute','Resolving\x20project\x20\x27','\x20\x20New\x20attempt\x20ID:\x20','getHours','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','workflow','replace','getMonth','canceling','✔\x20Push\x20complete','✔\x20Workflow\x20project\x20context\x20cleared.','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Resume\x20from:\x20','Auto-selected\x20latest\x20session:\x20','...','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','666FXZxKM','session_id','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','length','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required',',\x20Workflow:\x20','TASK_NAME_WIDTH','✔\x20Pushed\x20','download','-\x20nothing\x20pushed','success','\x20is\x20not\x20a\x20directory','modified','message','Select\x20a\x20task\x20to\x20view\x20logs:','utf-8','parse','Project:\x20','MAX_TASKS_DISPLAY','status','Project\x20name:\x20','No\x20sessions\x20found','padStart','workflow:kill','No\x20log\x20files\x20found\x20for\x20this\x20attempt','⚠\x20Showing\x20first\x20','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','\x20\x20Project\x20ID:\x20','param','from','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','table','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','fullName','prepareCloneProject','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','splice','context','\x0a✔\x20Attempt\x20complete','Listing\x20secrets...','Deleting\x20secret...','✔\x20Retry\x20started','✔\x20Project\x20updated','\x20of\x20','Cancelled','Including\x20subtasks:\x20yes','durationMs','194874HibdUc','running','keys','\x20workflow','\x20session','GUTTER','Writing\x20files...','resolveProjectId','limit','renderSingleTimeline','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','workflow:secrets:set','cyan','MIN_TIMELINE_WIDTH','Listing\x20workflow\x20sessions...','Output\x20directory:\x20','revision','getMinutes','Kill\x20a\x20running\x20attempt','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Warning:','description','white','Key\x20cannot\x20be\x20empty','tasks','indexOf','39298YihxZn','✔\x20Showing\x20','unchanged','join','\x22\x20with\x20new\x20revision?','min','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','follow','Tip:\x20cd\x20to\x20workflows/','fill','rows','No\x20projects\x20match\x20pattern:\x20','\x20-\x20','floor','stringify','Show\x20tasks\x20for\x20an\x20attempt','output','diff','retryAttempt','✔\x20Project:\x20','/attempt/','sort','No\x20workflow\x20tdx.json\x20found','Pushing\x20workflow\x20project...','Pull\x20workflow\x20project\x20to\x20local\x20folder','List\x20workflow\x20attempts','skipValidation','group_error','getDate','site','Cloning\x20to\x20','pollTimeline','Validation:\x20skipped','Dry\x20run:\x20yes','✔\x20Workflow\x20run\x20started','task','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Total:\x20','autocomplete','Params:\x20','executeCloneProject','get','workflow:timeline','deleteSecret','verbose','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','jsonl','startsWith','\x20from\x20session\x20','workflowName','86096vqtYZs','getFullYear','Expected\x20format:\x20--param\x20key=value','450pPybdE','isDirectory','→\x20New\x20project:\x20','round','No\x20workflows\x20found','\x0a✔\x20Already\x20up\x20to\x20date','buildTimelineData','✔\x20Clone\x20complete','updatedAt','No\x20workflows\x20found\x20in\x20project:\x20','params','now','Target:\x20','changes','showWorkflowConsoleUrl','blue','done','No\x20matching\x20sessions\x20found','List\x20workflows','retryAttemptName','New\x20project\x20name:\x20','deleted','resolveProjectDir','Setting\x20secret...','Workflow:\x20','\x20(system)','renderSessionsTimeline','✔\x20Pull\x20complete','List\x20all\x20workflow\x20projects','Parameters:\x20','Attempt\x20ID:\x20','Fetching\x20log\x20files...','1106699uqoKlj','index','POLL_INTERVAL_MS','Latest\x20session\x20has\x20no\x20attempt','Loading\x20workflows...','Attempt:\x20','green','planned','Error:\x20Attempt\x20ID\x20is\x20required','trimEnd','sourceDir','dim','set','newProjectName','Killing\x20attempt...','sessionTime','\x0aApply\x20these\x20changes?','list','substring','📁\x20','Getting\x20attempt\x20details...','workflow:pull','Failed\x20to\x20fetch\x20attempt\x20data','basename','listSecrets','Select\x20a\x20session\x20to\x20view\x20timeline:','fromTask','\x20sessions\x20','split','\x20project','workflow:delete','red','generateSessionTimelineRows','workflow:secrets:delete','max','title','(unknown)','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','all','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','170BIpfvy','Filter:\x20project=','type','setSecrets','data','slice','resolve','finishedAt','Select\x20a\x20workflow\x20to\x20run','start','push','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','targetDir','Downloading\x20project\x20','\x20\x20Console:\x20','duration','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','project','projects','\x20\x20Location:\x20','format','\x0aDry\x20run\x20-\x20no\x20files\x20written','attempts','\x0aUpdate\x20existing\x20project\x20\x22','\x20\x20Source:\x20','summary','applyPullProject','cancelRequested','\x20attempt','projectName','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','No\x20sessions\x20with\x20timing\x20information','(use\x20--limit\x20to\x20see\x20more)','find','attemptId','readFile','path','every','session','ICON_SPACING','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20logs','\x0aDry\x20run\x20-\x20nothing\x20pushed','includeRetried','toISOString','\x20secrets\x20set\x20for\x20project\x20\x27','lastAttempt','workflow:logs','getTime','workflow:clone','some','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','workflowProject','\x20new','resolveProject','Listing\x20workflow\x20attempts...','hasChanges','cwd','List\x20workflow\x20execution\x20sessions','workflow:upload','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20deleted','Filter:\x20','\x20task','Error:\x20Invalid\x20JSON\x20in\x20--params','repeat','Revision:\x20','workflow:secrets:list','Deleting\x20project\x20','sessions','includes','includeSubtasks','Source:\x20','\x20\x20Changes:\x20','yes','No\x20attempts\x20found\x20for:\x20','targetExists','Starting\x20workflow\x20run...','filter','navigateSessionsInteractive','delete','Force:\x20yes','stat','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x20\x20Project:\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','ICON_WIDTH','unknown','workflow:run','\x22\x20to\x20new\x20project\x20\x22','retrySession','8473164MEhjFp','executePushProject','Source\x20directory\x20is\x20required','Setting\x20','sourceProjectName','parseProjectWorkflowPattern','window','LABEL_MIN_SPACING','\x20\x20Revision:\x20','dryRun','total','Session\x20not\x20found:\x20','columns','\x20unchanged','Task\x20name:\x20','Analyzing\x20changes...','\x20\x20Target:\x20','Error:\x20Project\x20name\x20is\x20required','\x20secrets...','startTime','Analyzing\x20project...','values','\x27\x20from\x20project\x20\x27','workflow:sessions','map','trim','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Source\x20directory:\x20','workflow:projects','/sessions/','✔\x20Found\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','workflow:push','json','workflow:workflows','📋\x20','isTTY','Session\x20','renderTimeline','MAX_LABEL_COUNT','filesExtracted','\x27...','🔄\x20','Pulling\x20project\x20','workflows','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','requireProject','attempt','stdout','localeCompare','267kqjuvC','No\x20workflow\x20projects\x20found','\x20\x20Files\x20extracted:\x20','\x20to\x20see\x20detailed\x20logs','\x1b[1A\x1b[2K','sessionId','\x20(use\x20--limit\x20to\x20show\x20more)','Start\x20a\x20workflow\x20run','startedAt','\x0aError:','Loading\x20sessions...','value','No\x20sessions\x20found\x20for:\x20','toLowerCase','pending','\x20\x20Session\x20context\x20set\x20to:\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','createdAt','error','Error:\x20Secret\x20key\x20is\x20required','Session\x20time:\x20','resumeFrom','yellow','MAX_POLL_ITERATIONS','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x0aFailed\x20to\x20fetch\x20attempt\x20data','MIN_LABEL_COUNT','write','isNewProject','Project\x20name\x20is\x20required','Reason:\x20','Using\x20attempt\x20','text','\x20\x20Session\x20ID:\x20','new','652082KwgYHb','✔\x20Secret\x20\x27','end','Error:\x20','relative','Files\x20to\x20upload:\x20','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','No\x20attempts\x20found','\x0aClone\x20\x22','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Show\x20specific\x20attempt\x20details','state','preparePushProject','log','workflow:download','sys','workflow:use','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','taskName','No\x20sessions\x20found\x20in\x20project:\x20','Error:','tdx.json','2601660IKHXHw','name','Retrying\x20session...','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','kill','projectId','✔\x20Downloaded\x20'];a55_0x453e=function(){return _0x4b80d5;};return a55_0x453e();}export class WorkflowDeleteCommand extends BaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x1be);['description']=a55_0x1e66bb(0x329);async[a55_0x1e66bb(0x2a0)](_0x5136b6){const _0x20da29=a55_0x1e66bb,{options:_0x47c202,args:_0x126cf6,tdx:_0x54129b}=_0x5136b6,_0x165343=_0x126cf6[0x0];if(!_0x165343)return console[_0x20da29(0x26a)](_0x20da29(0x2b5)),console[_0x20da29(0x26a)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x47c202['verbose']&&console[_0x20da29(0x26a)](_0x20da29(0x2c2)+_0x165343);if(!_0x47c202[_0x20da29(0x214)]){if(!isInteractive())return console[_0x20da29(0x26a)](a55_0x4b0078[_0x20da29(0x1bf)](_0x20da29(0x261)),_0x20da29(0x2d1)),console[_0x20da29(0x26a)](a55_0x4b0078[_0x20da29(0x35c)](_0x20da29(0x2b0))),0x1;const _0x58a328=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x165343+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x58a328)return console[_0x20da29(0x26a)](a55_0x4b0078[_0x20da29(0x26e)](_0x20da29(0x2dd))),0x1;}const _0x5aaf50=await withSpinner(_0x20da29(0x20e)+_0x165343+'...',()=>_0x54129b[_0x20da29(0x2a5)][_0x20da29(0x21a)](_0x165343),{'verbose':_0x47c202[_0x20da29(0x328)]}),_0x5e0b29=_0x5aaf50['data'];return console['error']('✔\x20Deleted\x20project\x20'+_0x5e0b29[_0x20da29(0x1e7)]),console['error'](_0x20da29(0x2cc)+_0x5e0b29[_0x20da29(0x297)]),0x0;}}export function parseKeyValue(_0x1ae098){const _0x2b3b5c=a55_0x1e66bb,_0x446a9a=_0x1ae098['indexOf']('=');if(_0x446a9a===-0x1)throw new Error('Invalid\x20format:\x20'+_0x1ae098+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x350656=_0x1ae098[_0x2b3b5c(0x363)](0x0,_0x446a9a),_0x460da6=_0x1ae098['substring'](_0x446a9a+0x1);if(!_0x350656)throw new Error(_0x2b3b5c(0x2f9));return{'key':_0x350656,'value':_0x460da6};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x20d);['description']='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a55_0x1e66bb(0x2a0)](_0x50b659){const _0xa96d46=a55_0x1e66bb,{options:_0x25fb1d,args:_0x2ccc24,tdx:_0x370338}=_0x50b659,_0x387b68=this[_0xa96d46(0x254)](_0x2ccc24,_0x25fb1d);if(!_0x387b68)return 0x1;_0x25fb1d['verbose']&&console['error'](_0xa96d46(0x2c2)+_0x387b68);const _0xc2bdf9=await withSpinner(_0xa96d46(0x2d8),()=>_0x370338[_0xa96d46(0x2a5)][_0xa96d46(0x369)](_0x387b68),{'verbose':_0x25fb1d[_0xa96d46(0x328)]}),{secrets:_0x42614a}=_0xc2bdf9[_0xa96d46(0x1cd)];return console[_0xa96d46(0x26a)](_0xa96d46(0x244)+_0x42614a[_0xa96d46(0x2b4)]+'\x20secret'+(_0x42614a[_0xa96d46(0x2b4)]!==0x1?'s':'')),await handleSDKOutput(_0x42614a,_0x25fb1d),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x2ec);[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x2d4);async[a55_0x1e66bb(0x2a0)](_0x33f3e6){const _0x32a58e=a55_0x1e66bb,{options:_0x396418,args:_0x440ef2,tdx:_0x16acee}=_0x33f3e6;let _0x43ef9b,_0x4b576f;if(_0x440ef2[_0x32a58e(0x2b4)]>=0x1&&!_0x440ef2[0x0]['includes']('='))_0x43ef9b=_0x440ef2[0x0],_0x4b576f=_0x440ef2['slice'](0x1);else{if(_0x440ef2['length']>=0x1&&_0x396418[_0x32a58e(0x1fe)])_0x43ef9b=_0x396418[_0x32a58e(0x1fe)],_0x4b576f=_0x440ef2;else return _0x440ef2['length']>=0x1?(console['error'](_0x32a58e(0x237)),console['error'](_0x32a58e(0x245)),0x1):(console[_0x32a58e(0x26a)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x32a58e(0x26a)](_0x32a58e(0x253)),0x1);}if(_0x4b576f['length']===0x0)return console[_0x32a58e(0x26a)](_0x32a58e(0x1c6)),console[_0x32a58e(0x26a)](_0x32a58e(0x253)),0x1;const _0x10d1f5={};try{for(const _0x17f90c of _0x4b576f){const {key:_0x190dae,value:_0x1b8333}=parseKeyValue(_0x17f90c);_0x10d1f5[_0x190dae]=_0x1b8333;}}catch(_0x587ed6){return _0x587ed6 instanceof Error&&console[_0x32a58e(0x26a)](a55_0x4b0078['red'](_0x32a58e(0x290)),_0x587ed6[_0x32a58e(0x2be)]),0x1;}const _0x2f43c1=Object['keys'](_0x10d1f5);_0x396418[_0x32a58e(0x328)]&&(console[_0x32a58e(0x26a)](_0x32a58e(0x2c2)+_0x43ef9b),console[_0x32a58e(0x26a)]('Secrets\x20to\x20set:\x20'+_0x2f43c1[_0x32a58e(0x2ff)](',\x20')));const _0xdb177e=await withSpinner(_0x2f43c1[_0x32a58e(0x2b4)]===0x1?_0x32a58e(0x348):_0x32a58e(0x229)+_0x2f43c1[_0x32a58e(0x2b4)]+_0x32a58e(0x238),()=>_0x16acee[_0x32a58e(0x2a5)][_0x32a58e(0x1cc)](_0x43ef9b,_0x10d1f5),{'verbose':_0x396418[_0x32a58e(0x328)]}),_0x479253=_0xdb177e[_0x32a58e(0x1cd)];return console['error'](_0x2f43c1[_0x32a58e(0x2b4)]===0x1?_0x32a58e(0x27d)+_0x479253[_0x32a58e(0x2e2)][0x0]+_0x32a58e(0x2cf)+_0x479253['projectName']+'\x27':'✔\x20'+_0x479253[_0x32a58e(0x2e2)][_0x32a58e(0x2b4)]+_0x32a58e(0x1f7)+_0x479253[_0x32a58e(0x1e7)]+'\x27'),(_0x396418[_0x32a58e(0x247)]||_0x396418[_0x32a58e(0x32a)])&&await handleSingleObjectOutput(_0x479253,_0x396418),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a55_0x1e66bb(0x1c1);[a55_0x1e66bb(0x2f7)]=a55_0x1e66bb(0x21f);async[a55_0x1e66bb(0x2a0)](_0x2227d0){const _0x41e45b=a55_0x1e66bb,{options:_0x328372,args:_0x1a5d09,tdx:_0x26ceee}=_0x2227d0;let _0x204b8f,_0x1da1f5;if(_0x1a5d09[_0x41e45b(0x2b4)]>=0x2)_0x204b8f=_0x1a5d09[0x0],_0x1da1f5=_0x1a5d09[0x1];else{if(_0x1a5d09['length']===0x1&&_0x328372[_0x41e45b(0x1fe)])_0x204b8f=_0x328372['workflowProject'],_0x1da1f5=_0x1a5d09[0x0];else return _0x1a5d09['length']===0x1?(console[_0x41e45b(0x26a)](_0x41e45b(0x237)),console[_0x41e45b(0x26a)](_0x41e45b(0x245)),0x1):(console[_0x41e45b(0x26a)](_0x41e45b(0x26b)),console[_0x41e45b(0x26a)](_0x41e45b(0x320)),0x1);}_0x328372[_0x41e45b(0x328)]&&(console['error'](_0x41e45b(0x2c2)+_0x204b8f),console[_0x41e45b(0x26a)]('Key:\x20'+_0x1da1f5));if(!_0x328372[_0x41e45b(0x214)]){if(!isInteractive())return console['error'](a55_0x4b0078[_0x41e45b(0x1bf)](_0x41e45b(0x261)),_0x41e45b(0x2d1)),console[_0x41e45b(0x26a)](a55_0x4b0078['dim'](_0x41e45b(0x2b0))),0x1;const _0x2d88a9=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x1da1f5+_0x41e45b(0x23c)+_0x204b8f+'\x27?');if(!_0x2d88a9)return console[_0x41e45b(0x26a)](a55_0x4b0078['yellow'](_0x41e45b(0x2dd))),0x1;}const _0x4d820e=await withSpinner(_0x41e45b(0x2d9),()=>_0x26ceee[_0x41e45b(0x2a5)][_0x41e45b(0x327)](_0x204b8f,_0x1da1f5),{'verbose':_0x328372[_0x41e45b(0x328)]}),_0x58b7e6=_0x4d820e[_0x41e45b(0x1cd)];return console[_0x41e45b(0x26a)](_0x41e45b(0x27d)+_0x58b7e6['key']+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x58b7e6[_0x41e45b(0x1e7)]+'\x27'),(_0x328372[_0x41e45b(0x247)]||_0x328372[_0x41e45b(0x32a)])&&await handleSingleObjectOutput(_0x58b7e6,_0x328372),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(_0x317979){const _0x318dfa=a55_0x1e66bb,_0x183374=Math[_0x318dfa(0x309)](_0x317979/0x3e8),_0x22d1a2=Math[_0x318dfa(0x309)](_0x183374/0x3c),_0x378ea5=Math['floor'](_0x22d1a2/0x3c),_0x11c5f4=Math[_0x318dfa(0x309)](_0x378ea5/0x18);if(_0x11c5f4>0x0){const _0x1fac3b=_0x378ea5%0x18;return _0x1fac3b>0x0?_0x11c5f4+'d\x20'+_0x1fac3b+'h':_0x11c5f4+'d';}else{if(_0x378ea5>0x0){const _0x5a52d3=_0x22d1a2%0x3c;return _0x5a52d3>0x0?_0x378ea5+'h\x20'+_0x5a52d3+'m':_0x378ea5+'h';}else{if(_0x22d1a2>0x0){const _0x552b12=_0x183374%0x3c;return _0x552b12>0x0?_0x22d1a2+'m\x20'+_0x552b12+'s':_0x22d1a2+'m';}else return _0x183374+'s';}}}function formatTimestamp(_0x1911ae,_0x9793da){const _0xa064a3=a55_0x1e66bb,_0x2f6084=new Date(_0x1911ae),_0x2fcafa=String(_0x2f6084[_0xa064a3(0x2a3)]())[_0xa064a3(0x2c7)](0x2,'0'),_0x4503da=String(_0x2f6084[_0xa064a3(0x2f2)]())['padStart'](0x2,'0'),_0x26c172=_0x2fcafa+':'+_0x4503da,_0x59fcda=_0x2f6084[_0xa064a3(0x32f)]()===_0x9793da[_0xa064a3(0x32f)]()&&_0x2f6084[_0xa064a3(0x2a7)]()===_0x9793da[_0xa064a3(0x2a7)]()&&_0x2f6084[_0xa064a3(0x318)]()===_0x9793da[_0xa064a3(0x318)]();if(_0x59fcda)return _0x26c172;else{const _0x3dcc46=String(_0x2f6084[_0xa064a3(0x2a7)]()+0x1)[_0xa064a3(0x2c7)](0x2,'0'),_0x320d9d=String(_0x2f6084[_0xa064a3(0x318)]())[_0xa064a3(0x2c7)](0x2,'0');return _0x3dcc46+'-'+_0x320d9d+'\x20'+_0x26c172;}}function formatDate(_0x5b5123){const _0x3a0497=a55_0x1e66bb,_0x9c7eb3=_0x5b5123[_0x3a0497(0x32f)](),_0x438939=String(_0x5b5123[_0x3a0497(0x2a7)]()+0x1)[_0x3a0497(0x2c7)](0x2,'0'),_0x1c9ada=String(_0x5b5123[_0x3a0497(0x318)]())[_0x3a0497(0x2c7)](0x2,'0');return _0x9c7eb3+'-'+_0x438939+'-'+_0x1c9ada;}function getTaskStateIcon(_0xfd2d7f){const _0x1a14ea={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1a14ea[_0xfd2d7f]||'⚪';}function getBarChar(_0x32ff25){const _0x920ce6=a55_0x1e66bb;return _0x32ff25===_0x920ce6(0x26a)||_0x32ff25===_0x920ce6(0x317)?'×':'─';}function getBarColor(_0x31270d){const _0xb2ca70=a55_0x1e66bb,_0x23c295={'success':a55_0x4b0078['green'],'error':a55_0x4b0078['red'],'group_error':a55_0x4b0078['red'],'running':a55_0x4b0078[_0xb2ca70(0x340)],'blocked':a55_0x4b0078[_0xb2ca70(0x26e)],'planned':a55_0x4b0078[_0xb2ca70(0x35c)],'canceling':a55_0x4b0078[_0xb2ca70(0x26e)]};return _0x23c295[_0x31270d]||a55_0x4b0078[_0xb2ca70(0x2f8)];}function parseTaskName(_0x1c40dd){const _0x258852=a55_0x1e66bb;let _0xf88fe1=_0x1c40dd[_0x258852(0x2a6)](/^\++/,'');const _0x4d3e8a=_0xf88fe1['split']('+'),_0x1c995a=_0x4d3e8a[_0x258852(0x2b4)]>0x1?_0x4d3e8a[_0x258852(0x2b4)]-0x2:0x0,_0x3541f7=_0x4d3e8a[_0x4d3e8a[_0x258852(0x2b4)]-0x1]||_0xf88fe1;return{'level':_0x1c995a,'name':'+'+_0x3541f7};}function truncateTaskName(_0x561e88,_0x2295f6){const _0x19a782=a55_0x1e66bb,_0x12ae68=stringWidth(_0x561e88);if(_0x12ae68<=_0x2295f6)return _0x561e88;let _0x319b23=_0x561e88;while(stringWidth(_0x319b23+'…')>_0x2295f6&&_0x319b23[_0x19a782(0x2b4)]>0x0){_0x319b23=_0x319b23['slice'](0x0,-0x1);}return _0x319b23+'…';}function calculateTimeScale(_0x49e66c,_0x283ead){const _0x3f6ed4=a55_0x1e66bb;return{'startTime':_0x49e66c[_0x3f6ed4(0x1d2)],'endTime':_0x49e66c[_0x3f6ed4(0x27e)],'durationMs':_0x49e66c[_0x3f6ed4(0x1d9)],'msPerChar':_0x49e66c[_0x3f6ed4(0x1d9)]/_0x283ead};}function timeToPosition(_0xc549fe,_0x473aa5,_0x80a7f6){const _0x2502e0=a55_0x1e66bb,_0x4c83ff=_0xc549fe-_0x473aa5[_0x2502e0(0x239)],_0x587298=Math[_0x2502e0(0x309)](_0x4c83ff/_0x473aa5['msPerChar']);return Math[_0x2502e0(0x1c2)](0x0,Math[_0x2502e0(0x301)](_0x587298,_0x80a7f6));}function renderTimeAxis(_0x53b48e,_0x267ec1){const _0xb625cb=a55_0x1e66bb,_0x1aaebc=Math[_0xb625cb(0x301)](TIMELINE_CONFIG[_0xb625cb(0x24d)],Math['max'](TIMELINE_CONFIG[_0xb625cb(0x273)],Math[_0xb625cb(0x309)](_0x267ec1/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x1d912a=_0x53b48e[_0xb625cb(0x2df)]/(_0x1aaebc-0x1),_0x379aba=new Date(_0x53b48e[_0xb625cb(0x239)]),_0x484d83=[];for(let _0x2649ab=0x0;_0x2649ab<_0x1aaebc;_0x2649ab++){const _0x1a8cb3=_0x53b48e[_0xb625cb(0x239)]+_0x2649ab*_0x1d912a,_0xb7f563=timeToPosition(_0x1a8cb3,_0x53b48e,_0x267ec1),_0x55a660=formatTimestamp(_0x1a8cb3,_0x379aba);_0x484d83[_0xb625cb(0x1d3)]({'pos':_0xb7f563,'text':_0x55a660});}const _0x34a69e=new Array(_0x267ec1)[_0xb625cb(0x305)]('\x20');let _0x3ea35b=-0x1;for(const {pos:_0x145c4f,text:_0x5602d5}of _0x484d83){let _0x5d64e0=Math[_0xb625cb(0x1c2)](0x0,_0x145c4f-Math[_0xb625cb(0x309)](_0x5602d5[_0xb625cb(0x2b4)]/0x2));_0x5d64e0<=_0x3ea35b+TIMELINE_CONFIG[_0xb625cb(0x22d)]&&(_0x5d64e0=_0x3ea35b+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x5d64e0+_0x5602d5['length']>_0x267ec1&&(_0x5d64e0=_0x267ec1-_0x5602d5[_0xb625cb(0x2b4)]);if(_0x5d64e0>=0x0&&_0x5d64e0+_0x5602d5[_0xb625cb(0x2b4)]<=_0x267ec1&&_0x5d64e0>_0x3ea35b){for(let _0x50ebaf=0x0;_0x50ebaf<_0x5602d5[_0xb625cb(0x2b4)];_0x50ebaf++){_0x34a69e[_0x5d64e0+_0x50ebaf]=_0x5602d5[_0x50ebaf];}_0x3ea35b=_0x5d64e0+_0x5602d5[_0xb625cb(0x2b4)]-0x1;}}return _0x34a69e[_0xb625cb(0x2ff)]('');}function renderTaskRow(_0x4adc76,_0x472a56,_0x3f597f,_0x564900){const _0x3926a7=a55_0x1e66bb,{level:_0x518b80,name:_0x1ac7fe}=parseTaskName(_0x4adc76['name']),_0x2afbf8='\x20'[_0x3926a7(0x20b)](_0x518b80),_0x18d432=_0x4adc76[_0x3926a7(0x22c)]?'('+formatElapsed(_0x4adc76[_0x3926a7(0x22c)][_0x3926a7(0x1d9)])+')':'',_0x2a6da6=stringWidth(_0x18d432),_0x560c2f=_0x518b80*0x1,_0x192294=_0x564900-_0x560c2f-_0x2a6da6-0x1,_0x3946ec=truncateTaskName(_0x1ac7fe,_0x192294),_0x56b21b=_0x2afbf8+_0x3946ec,_0x380f22=stringWidth(_0x56b21b),_0x569744=_0x564900-_0x380f22-_0x2a6da6,_0x2ab686=_0x56b21b+'\x20'[_0x3926a7(0x20b)](Math[_0x3926a7(0x1c2)](0x1,_0x569744))+a55_0x4b0078['dim'](_0x18d432),_0x413652=getTaskStateIcon(_0x4adc76[_0x3926a7(0x287)]),_0x1d9b28=new Array(_0x3f597f)['fill']('\x20');if(_0x4adc76[_0x3926a7(0x22c)]){const _0x389b3c=timeToPosition(_0x4adc76['window'][_0x3926a7(0x1d2)],_0x472a56,_0x3f597f),_0x5e8d47=timeToPosition(_0x4adc76[_0x3926a7(0x22c)][_0x3926a7(0x27e)],_0x472a56,_0x3f597f),_0x24f64e=getBarChar(_0x4adc76[_0x3926a7(0x287)]),_0x1145c0=Math[_0x3926a7(0x1c2)](_0x389b3c+0x1,_0x5e8d47);for(let _0x2dccfc=_0x389b3c;_0x2dccfc<Math[_0x3926a7(0x301)](_0x1145c0,_0x3f597f);_0x2dccfc++){_0x1d9b28[_0x2dccfc]=_0x24f64e;}}const _0x4ff6dc=getBarColor(_0x4adc76[_0x3926a7(0x287)]),_0x4125ca=_0x1d9b28[_0x3926a7(0x23e)](_0xf0dc80=>_0xf0dc80==='\x20'?'\x20':_0x4ff6dc(_0xf0dc80))[_0x3926a7(0x2ff)]('');return _0x413652+'\x20'+_0x2ab686+'│'+_0x4125ca+'│';}function calculateStats(_0x51f186){const _0x5b3f8d=a55_0x1e66bb,_0x560cab={'total':_0x51f186['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x9649b7 of _0x51f186){if(_0x9649b7[_0x5b3f8d(0x287)]==='success')_0x560cab['success']++;else{if(_0x9649b7[_0x5b3f8d(0x287)]==='error'||_0x9649b7[_0x5b3f8d(0x287)]===_0x5b3f8d(0x317))_0x560cab[_0x5b3f8d(0x26a)]++;else _0x9649b7['state']===_0x5b3f8d(0x2e1)?_0x560cab[_0x5b3f8d(0x2e1)]++:_0x560cab[_0x5b3f8d(0x266)]++;}}return _0x560cab;}function formatStats(_0x28335a){const _0x3a8cce=a55_0x1e66bb;return[_0x3a8cce(0x321)+_0x28335a[_0x3a8cce(0x230)],'✅\x20'+_0x28335a[_0x3a8cce(0x2bb)],'❌\x20'+_0x28335a[_0x3a8cce(0x26a)],_0x3a8cce(0x250)+_0x28335a['running'],'⏳\x20'+_0x28335a[_0x3a8cce(0x266)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x1e66bb(0x293)]=a55_0x1e66bb(0x326);['description']=a55_0x1e66bb(0x2f5);async[a55_0x1e66bb(0x2a0)](_0x3a3a82){const _0x1bf29d=a55_0x1e66bb,{options:_0x54411d,args:_0x3afd46,tdx:_0x87a5e0}=_0x3a3a82;let _0x3e5966,_0x59ccbc,_0x4401c2=![];if(_0x3afd46[0x0]){if(_0x3afd46[0x0][_0x1bf29d(0x210)]('.')){const _0x33a89e=this[_0x1bf29d(0x22b)](_0x3afd46,_0x54411d);if(!_0x33a89e)return 0x1;_0x3e5966=_0x33a89e[_0x1bf29d(0x1e7)],_0x59ccbc=_0x33a89e[_0x1bf29d(0x32d)];}else{_0x59ccbc=_0x3afd46[0x0],_0x3e5966=_0x54411d[_0x1bf29d(0x1fe)];if(!_0x3e5966)return console[_0x1bf29d(0x26a)](a55_0x4b0078[_0x1bf29d(0x1bf)](_0x1bf29d(0x290)),_0x1bf29d(0x1c8)),0x1;_0x4401c2=!![];}}else{const _0x16a909=this[_0x1bf29d(0x22b)](_0x3afd46,_0x54411d);if(!_0x16a909)return 0x1;_0x3e5966=_0x16a909[_0x1bf29d(0x1e7)],_0x59ccbc=_0x16a909['workflowName'];}if(_0x54411d[_0x1bf29d(0x328)]){if(_0x3e5966&&_0x59ccbc)console['error'](_0x1bf29d(0x208)+_0x3e5966+'.'+_0x59ccbc);else _0x3e5966&&console[_0x1bf29d(0x26a)](_0x1bf29d(0x1ca)+_0x3e5966);}const _0x197031=_0x54411d['attemptId'],_0x54362d=_0x54411d[_0x1bf29d(0x25d)];if(_0x197031){_0x54362d&&console[_0x1bf29d(0x26a)](a55_0x4b0078[_0x1bf29d(0x26e)](_0x1bf29d(0x2f6)),_0x1bf29d(0x282));const _0x3645e5=_0x54411d[_0x1bf29d(0x303)];return _0x3645e5?await this[_0x1bf29d(0x31b)](_0x3a3a82,_0x197031):await this['renderSingleTimeline'](_0x3a3a82,_0x197031,_0x54411d),0x0;}if(_0x54362d){const _0x4047f8=await withSpinner('Loading\x20session...',()=>_0x87a5e0[_0x1bf29d(0x2a5)]['sessions']({'projectName':_0x3e5966,'workflowName':_0x59ccbc,'limit':0x64}),{'verbose':_0x54411d[_0x1bf29d(0x328)]}),_0x2d5c71=_0x4047f8[_0x1bf29d(0x1cd)][_0x1bf29d(0x1eb)](_0x3c661c=>_0x3c661c['id']===_0x54362d);if(!_0x2d5c71)return console[_0x1bf29d(0x26a)](a55_0x4b0078[_0x1bf29d(0x1bf)](_0x1bf29d(0x290)),_0x1bf29d(0x231)+_0x54362d),0x1;if(!_0x2d5c71[_0x1bf29d(0x1f8)]?.['id'])return console[_0x1bf29d(0x26a)](a55_0x4b0078['red'](_0x1bf29d(0x290)),_0x1bf29d(0x24b)+_0x54362d+'\x20has\x20no\x20attempts'),0x1;const _0x59179b=_0x2d5c71[_0x1bf29d(0x1f8)]['id'];_0x54411d['verbose']&&console[_0x1bf29d(0x26a)](_0x1bf29d(0x278)+_0x59179b+_0x1bf29d(0x32c)+_0x54362d);const _0x1dc8fd=_0x54411d[_0x1bf29d(0x303)];return _0x1dc8fd?await this[_0x1bf29d(0x31b)](_0x3a3a82,_0x59179b):await this[_0x1bf29d(0x2e9)](_0x3a3a82,_0x59179b,_0x54411d),0x0;}const _0x33b0f1=await withSpinner(_0x1bf29d(0x262),()=>_0x87a5e0['workflow'][_0x1bf29d(0x20f)]({'projectName':_0x3e5966,'workflowName':_0x59ccbc,'limit':_0x54411d[_0x1bf29d(0x2e8)]||0x32}),{'verbose':_0x54411d['verbose']}),_0x2829ba=_0x33b0f1[_0x1bf29d(0x1cd)];if(_0x2829ba[_0x1bf29d(0x2b4)]===0x0){if(_0x3e5966&&_0x59ccbc)console[_0x1bf29d(0x26a)]('No\x20sessions\x20found\x20for:\x20'+_0x3e5966+'.'+_0x59ccbc);else _0x3e5966?console[_0x1bf29d(0x26a)](_0x1bf29d(0x28f)+_0x3e5966):(console[_0x1bf29d(0x26a)]('No\x20workflow\x20sessions\x20found'),console[_0x1bf29d(0x26a)](a55_0x4b0078['dim'](_0x1bf29d(0x1d5))));return 0x0;}_0x2829ba[_0x1bf29d(0x311)]((_0x365259,_0x18bff3)=>{const _0x1bec93=_0x1bf29d,_0x137afb=_0x365259['sessionTime']||'',_0x4a3c92=_0x18bff3[_0x1bec93(0x360)]||'';return _0x4a3c92[_0x1bec93(0x257)](_0x137afb);});if(_0x54411d[_0x1bf29d(0x247)]||_0x54411d['jsonl'])return await handleSDKOutput(_0x2829ba,_0x54411d),0x0;let _0x3ac238;if(_0x4401c2){const _0x19d1b3=_0x2829ba[0x0];if(!_0x19d1b3[_0x1bf29d(0x1f8)]?.['id'])return console[_0x1bf29d(0x26a)](_0x1bf29d(0x354)),0x0;_0x3ac238=_0x19d1b3[_0x1bf29d(0x1f8)]['id'],_0x54411d['verbose']&&console[_0x1bf29d(0x26a)](_0x1bf29d(0x2ad)+_0x19d1b3[_0x1bf29d(0x360)]);}else{const _0x3b8cf9=_0x2829ba['map'](_0xfbdb92=>{const _0x462915=_0x1bf29d,_0x3e35a9=getAttemptStatusDisplay(_0xfbdb92[_0x462915(0x1f8)]);return{'title':_0xfbdb92[_0x462915(0x1db)]?.[_0x462915(0x293)]+'.'+_0xfbdb92[_0x462915(0x2a5)]?.[_0x462915(0x293)]+_0x462915(0x308)+_0xfbdb92[_0x462915(0x360)]+'\x20'+_0x3e35a9['icon'],'value':_0xfbdb92['lastAttempt']?.['id']||'','description':_0x3e35a9[_0x462915(0x279)]};}),_0x3fb39d=await a55_0x264e0e({'type':_0x1bf29d(0x29b),'name':'attemptId','message':_0x1bf29d(0x36a),'choices':_0x3b8cf9[_0x1bf29d(0x218)](_0x5ad3ee=>_0x5ad3ee[_0x1bf29d(0x263)]!=='')});if(!_0x3fb39d['attemptId'])return 0x0;_0x3ac238=_0x3fb39d[_0x1bf29d(0x1ec)];}const _0x566fc1=_0x54411d[_0x1bf29d(0x303)];return _0x566fc1?await this[_0x1bf29d(0x31b)](_0x3a3a82,_0x3ac238):await this[_0x1bf29d(0x2e9)](_0x3a3a82,_0x3ac238,_0x54411d),0x0;}async['renderSingleTimeline'](_0x5805c6,_0x4c227e,_0x102a85){const _0x194ad3=a55_0x1e66bb,{tdx:_0x2aa1b9}=_0x5805c6;let _0x1b9df1,_0x3716cd;try{[_0x1b9df1,_0x3716cd]=await Promise[_0x194ad3(0x1c7)]([_0x2aa1b9[_0x194ad3(0x2a5)][_0x194ad3(0x255)](_0x4c227e),_0x2aa1b9['workflow'][_0x194ad3(0x2fa)](_0x4c227e,![])]);}catch(_0x460b7f){console[_0x194ad3(0x26a)](a55_0x4b0078[_0x194ad3(0x1bf)](_0x194ad3(0x367)));_0x102a85[_0x194ad3(0x328)]&&console[_0x194ad3(0x26a)](_0x460b7f);throw _0x460b7f;}if(_0x102a85[_0x194ad3(0x247)]||_0x102a85['jsonl']){const _0xb090ad=this[_0x194ad3(0x337)](_0x1b9df1,_0x3716cd);await handleSDKOutput([_0xb090ad],_0x102a85);return;}const _0x528b38=_0x2aa1b9[_0x194ad3(0x2d6)][_0x194ad3(0x319)],_0x2033b1=this[_0x194ad3(0x24c)](_0x1b9df1,_0x3716cd,_0x528b38);console[_0x194ad3(0x289)](_0x2033b1);}async[a55_0x1e66bb(0x31b)](_0x3f516e,_0xa16a7e){const _0x17df44=a55_0x1e66bb,{tdx:_0x18a43c}=_0x3f516e,_0x29dfeb=TIMELINE_CONFIG[_0x17df44(0x353)],_0x58aec6=TIMELINE_CONFIG[_0x17df44(0x26f)];let _0x460a60=0x0;while(_0x460a60<_0x58aec6){process[_0x17df44(0x256)][_0x17df44(0x24a)]&&process['stdout'][_0x17df44(0x274)]('\x1bc');let _0x399061,_0x10c100;try{[_0x399061,_0x10c100]=await Promise[_0x17df44(0x1c7)]([_0x18a43c[_0x17df44(0x2a5)][_0x17df44(0x255)](_0xa16a7e),_0x18a43c[_0x17df44(0x2a5)][_0x17df44(0x2fa)](_0xa16a7e,![])]);}catch(_0x1bf659){console['error'](a55_0x4b0078[_0x17df44(0x1bf)](_0x17df44(0x272)));_0x460a60>0x0&&console['error'](a55_0x4b0078[_0x17df44(0x35c)](_0x17df44(0x240)+_0x460a60));throw _0x1bf659;}const _0x2cf795=_0x18a43c[_0x17df44(0x2d6)][_0x17df44(0x319)],_0x54d035=this[_0x17df44(0x24c)](_0x399061,_0x10c100,_0x2cf795);console[_0x17df44(0x289)](_0x54d035);const _0x31edbc=_0x399061['done']&&_0x10c100[_0x17df44(0x1ef)](_0xcdf2b3=>_0xcdf2b3[_0x17df44(0x287)]!=='running'&&_0xcdf2b3[_0x17df44(0x287)]!==_0x17df44(0x358));if(_0x31edbc){console['error'](a55_0x4b0078[_0x17df44(0x357)](_0x17df44(0x2d7)));break;}console[_0x17df44(0x26a)](a55_0x4b0078[_0x17df44(0x35c)]('\x0aPolling...\x20('+_0x460a60*0x2+_0x17df44(0x2b3))),await new Promise(_0x49a09b=>setTimeout(_0x49a09b,_0x29dfeb)),_0x460a60++;}_0x460a60>=_0x58aec6&&console[_0x17df44(0x26a)](a55_0x4b0078['yellow']('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a55_0x1e66bb(0x24c)](_0x3a202a,_0x1ba180,_0x1fbb42){const _0x540210=a55_0x1e66bb,_0x4cd7e5=[],_0x233bc6=TIMELINE_CONFIG[_0x540210(0x2b7)],_0x2ca332=0x5,_0x44c174=process[_0x540210(0x256)][_0x540210(0x232)]||0x78,_0x3d6098=_0x44c174-_0x233bc6-_0x2ca332,_0x1dba7c=Math['max'](TIMELINE_CONFIG[_0x540210(0x2ee)],Math['min'](_0x3d6098,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x1e07fa=new Date(_0x3a202a['createdAt'])[_0x540210(0x1fa)](),_0x3b24ab=_0x3a202a['finishedAt']?new Date(_0x3a202a[_0x540210(0x1d0)])['getTime']():Date[_0x540210(0x33c)](),_0xbf5641={'start':_0x1e07fa,'end':_0x3b24ab,'duration':_0x3b24ab-_0x1e07fa},_0x4c4258=new Map(),_0x5e6bc8=[];for(const _0x260a85 of _0x1ba180){if(_0x260a85[_0x540210(0x260)]){const _0x1ed494=new Date(_0x260a85[_0x540210(0x260)])[_0x540210(0x1fa)](),_0x1b06bc=_0x260a85['updatedAt']?new Date(_0x260a85['updatedAt'])['getTime']():Date[_0x540210(0x33c)](),_0x29efc1={'start':_0x1ed494,'end':_0x1b06bc,'duration':_0x1b06bc-_0x1ed494};_0x4c4258['set'](_0x260a85['id'],_0x29efc1),_0x5e6bc8[_0x540210(0x1d3)]({'name':_0x260a85[_0x540210(0x2d2)],'state':_0x260a85[_0x540210(0x287)]||_0x540210(0x222),'window':_0x29efc1});}else _0x5e6bc8[_0x540210(0x1d3)]({'name':_0x260a85[_0x540210(0x2d2)],'state':_0x260a85[_0x540210(0x287)]||_0x540210(0x358),'window':undefined});}_0x5e6bc8[_0x540210(0x311)]((_0x243405,_0x576ba6)=>{const _0x23247e=_0x540210;if(!_0x243405[_0x23247e(0x22c)])return 0x1;if(!_0x576ba6['window'])return-0x1;return _0x243405[_0x23247e(0x22c)]['start']-_0x576ba6[_0x23247e(0x22c)][_0x23247e(0x1d2)];});const _0xfad85c=_0x5e6bc8[_0x540210(0x2b4)],_0x5bddb1=_0xfad85c>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x5bddb1&&_0x5e6bc8[_0x540210(0x2d5)](TIMELINE_CONFIG[_0x540210(0x2c3)]);const _0xa1c9e9=calculateTimeScale(_0xbf5641,_0x1dba7c),_0x3fb46c=_0x3a202a[_0x540210(0x341)]?_0x3a202a[_0x540210(0x2bb)]?a55_0x4b0078[_0x540210(0x357)](_0x540210(0x2bb)):a55_0x4b0078['red'](_0x540210(0x26a)):a55_0x4b0078['blue'](_0x540210(0x2e1)),_0x403426=_0x3a202a[_0x540210(0x1db)]?.['id'],_0x49853d=_0x3a202a[_0x540210(0x25d)];let _0x457023;if(_0x403426&&_0x49853d){const _0x3c0d58=getWorkflowAttemptUrl(_0x1fbb42,_0x403426,_0x49853d,_0x3a202a['id']);_0x457023=hyperlink(a55_0x4b0078[_0x540210(0x35c)](_0x3a202a['id']),_0x3c0d58);}else _0x457023=a55_0x4b0078[_0x540210(0x35c)](_0x3a202a['id']);_0x4cd7e5[_0x540210(0x1d3)](_0x540210(0x356)+_0x457023+_0x540210(0x308)+_0x3fb46c+_0x540210(0x308)+formatElapsed(_0xbf5641['duration']));if(_0x5e6bc8[_0x540210(0x2b4)]>0x0){const _0x5dea22=renderTimeAxis(_0xa1c9e9,_0x1dba7c),_0x1d7f01=new Date(_0xbf5641[_0x540210(0x1d2)]),_0x5a197e=formatDate(_0x1d7f01),_0x582df3=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x540210(0x1f1)]+_0x233bc6,_0xfd6566=_0x5a197e['padStart'](_0x582df3),_0x5482f3=a55_0x4b0078[_0x540210(0x35c)](_0xfd6566);_0x4cd7e5[_0x540210(0x1d3)](_0x5482f3+'\x20'+_0x5dea22);for(const _0x492347 of _0x5e6bc8){_0x4cd7e5[_0x540210(0x1d3)](renderTaskRow(_0x492347,_0xa1c9e9,_0x1dba7c,_0x233bc6));}const _0x3017d4=calculateStats(_0x5e6bc8);_0x4cd7e5[_0x540210(0x1d3)](formatStats(_0x3017d4)),_0x5bddb1&&_0x4cd7e5['push'](a55_0x4b0078[_0x540210(0x26e)](_0x540210(0x2ca)+TIMELINE_CONFIG[_0x540210(0x2c3)]+_0x540210(0x2dc)+_0xfad85c+'\x20tasks')),_0x4cd7e5['push'](''),_0x4cd7e5[_0x540210(0x1d3)](a55_0x4b0078['dim']('💡\x20Tip:\x20Use\x20')+('tdx\x20wf\x20attempt\x20'+_0x3a202a['id']+_0x540210(0x1f3))+a55_0x4b0078['dim'](_0x540210(0x25b)));}else _0x4cd7e5[_0x540210(0x1d3)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x4cd7e5['join']('\x0a');}[a55_0x1e66bb(0x337)](_0x129249,_0x362429){const _0x268d48=a55_0x1e66bb,_0x58c37d=new Date(_0x129249[_0x268d48(0x269)])[_0x268d48(0x1fa)](),_0x15323a=_0x129249[_0x268d48(0x1d0)]?new Date(_0x129249[_0x268d48(0x1d0)])[_0x268d48(0x1fa)]():Date[_0x268d48(0x33c)](),_0x1c3478=_0x15323a-_0x58c37d,_0x5a9a9f=[];for(const _0x346f5a of _0x362429){if(_0x346f5a[_0x268d48(0x260)]){const _0x250c99=new Date(_0x346f5a[_0x268d48(0x260)])[_0x268d48(0x1fa)](),_0x27a94b=_0x346f5a[_0x268d48(0x339)]?new Date(_0x346f5a['updatedAt'])[_0x268d48(0x1fa)]():Date[_0x268d48(0x33c)]();_0x5a9a9f['push']({'name':_0x346f5a[_0x268d48(0x2d2)],'state':_0x346f5a['state']||_0x268d48(0x222),'window':{'start':_0x250c99,'end':_0x27a94b,'duration':_0x27a94b-_0x250c99}});}else _0x5a9a9f[_0x268d48(0x1d3)]({'name':_0x346f5a['fullName'],'state':_0x346f5a[_0x268d48(0x287)]||_0x268d48(0x358),'window':undefined});}const _0x5e2faf=calculateStats(_0x5a9a9f);return{'attempt':{'id':_0x129249['id'],'status':_0x129249['done']?_0x129249['success']?_0x268d48(0x2bb):_0x268d48(0x26a):_0x268d48(0x2e1),'createdAt':_0x129249[_0x268d48(0x269)],'finishedAt':_0x129249[_0x268d48(0x1d0)],'duration_ms':_0x1c3478},'tasks':_0x5a9a9f[_0x268d48(0x23e)](_0x368041=>({'name':_0x368041[_0x268d48(0x293)],'state':_0x368041[_0x268d48(0x287)],'startedAt':_0x368041[_0x268d48(0x22c)]?new Date(_0x368041[_0x268d48(0x22c)][_0x268d48(0x1d2)])[_0x268d48(0x1f6)]():null,'updatedAt':_0x368041['window']?new Date(_0x368041[_0x268d48(0x22c)][_0x268d48(0x27e)])['toISOString']():null,'duration_ms':_0x368041['window']?.[_0x268d48(0x1d9)]||null})),'stats':_0x5e2faf};}}
|
|
1
|
+
const a55_0x497f19=a55_0x480f;(function(_0x4d6c36,_0x116936){const _0x1e46f4=a55_0x480f,_0xd1f72d=_0x4d6c36();while(!![]){try{const _0x214684=parseInt(_0x1e46f4(0x85))/0x1+parseInt(_0x1e46f4(0x1e9))/0x2+-parseInt(_0x1e46f4(0x129))/0x3+parseInt(_0x1e46f4(0x1cb))/0x4+-parseInt(_0x1e46f4(0x147))/0x5+parseInt(_0x1e46f4(0x141))/0x6+-parseInt(_0x1e46f4(0x1c7))/0x7*(parseInt(_0x1e46f4(0xa9))/0x8);if(_0x214684===_0x116936)break;else _0xd1f72d['push'](_0xd1f72d['shift']());}catch(_0x2e2591){_0xd1f72d['push'](_0xd1f72d['shift']());}}}(a55_0x1c9b,0xa898e));import a55_0x3c6ccd from'chalk';import{existsSync}from'fs';import a55_0x26cc2e 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';function a55_0x480f(_0x1d1ce2,_0x30d0f9){_0x1d1ce2=_0x1d1ce2-0x6c;const _0x1c9bed=a55_0x1c9b();let _0x480f1b=_0x1c9bed[_0x1d1ce2];return _0x480f1b;}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 a55_0x1641e4 from'prompts';function getAttemptStatusDisplay(_0x10ec40){const _0x3ebec9=a55_0x480f;if(!_0x10ec40)return{'icon':'⏳','text':''};const {done:_0x11a4bd,success:_0x332a5b,cancelRequested:_0x10e29a}=_0x10ec40;if(!_0x11a4bd)return _0x10e29a?{'icon':'🛑','text':a55_0x3c6ccd[_0x3ebec9(0x99)](_0x3ebec9(0x8f))}:{'icon':'🔄','text':a55_0x3c6ccd[_0x3ebec9(0x1db)](_0x3ebec9(0xe2))};if(_0x332a5b)return{'icon':'✅','text':a55_0x3c6ccd['green'](_0x3ebec9(0x1fa))};return{'icon':'❌','text':a55_0x3c6ccd[_0x3ebec9(0xa6)](_0x3ebec9(0x83))};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x497f19(0x19f)](_0x16ac10,_0x453cc1,_0x3ca2ca=0x0){return _0x16ac10[_0x3ca2ca]||_0x453cc1['workflowProject'];}[a55_0x497f19(0x158)](_0x5b4bcc,_0x274d9e,_0x5a49e5=0x0){const _0x4d05c6=a55_0x497f19,_0x9aa003=this['resolveProject'](_0x5b4bcc,_0x274d9e,_0x5a49e5);if(!_0x9aa003)return console[_0x4d05c6(0x83)](a55_0x3c6ccd[_0x4d05c6(0xa6)](_0x4d05c6(0x14d)),_0x4d05c6(0x134)),console[_0x4d05c6(0x83)](a55_0x3c6ccd['dim'](_0x4d05c6(0x1af))),null;return _0x9aa003;}[a55_0x497f19(0x1c9)](_0x2a4a37,_0x7ba12e){const _0x6868b5=a55_0x497f19;if(_0x2a4a37[0x0]){const _0x32b107=_0x2a4a37[0x0]['split']('.');if(_0x32b107[_0x6868b5(0xf4)]===0x1)return{'projectName':_0x32b107[0x0],'workflowName':undefined};else return _0x32b107[_0x6868b5(0xf4)]===0x2?{'projectName':_0x32b107[0x0],'workflowName':_0x32b107[0x1]}:(console[_0x6868b5(0x83)](a55_0x3c6ccd[_0x6868b5(0xa6)]('Error:'),_0x6868b5(0x20c)),null);}return{'projectName':_0x7ba12e[_0x6868b5(0xbf)],'workflowName':undefined};}[a55_0x497f19(0x1f2)](_0xad8f38,_0x5a9abb,_0x1bf71d=0x0){const _0x2561c2=a55_0x497f19;if(_0xad8f38[_0x1bf71d])return _0xad8f38[_0x1bf71d];if(_0x5a9abb[_0x2561c2(0xbf)]){const _0x1c8df5=a55_0x26cc2e[_0x2561c2(0x80)](process['cwd'](),_0x2561c2(0x1ca),_0x5a9abb[_0x2561c2(0xbf)]);if(existsSync(a55_0x26cc2e[_0x2561c2(0x80)](_0x1c8df5,_0x2561c2(0x109))))return _0x1c8df5;}return undefined;}async[a55_0x497f19(0xe1)](_0x4850c3,_0x4fbb7f,_0x3f20d6){const _0x1cc7b7=a55_0x497f19;try{const _0x1f37a6=await _0x4850c3[_0x1cc7b7(0x117)][_0x1cc7b7(0x1ca)](_0x4fbb7f,{'limit':0x1});if(_0x1f37a6[_0x1cc7b7(0xf4)]>0x0){const _0x549ddc=_0x1f37a6[0x0]['id'],_0x17f4f9=getWorkflowUrl(_0x3f20d6,_0x549ddc);console[_0x1cc7b7(0x83)](_0x1cc7b7(0x187)+a55_0x3c6ccd[_0x1cc7b7(0x16e)](_0x17f4f9));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a55_0x497f19(0x1f5);[a55_0x497f19(0x1b7)]=a55_0x497f19(0x1ae);async[a55_0x497f19(0x1c1)](_0x45de61){const _0x566379=a55_0x497f19,{options:_0x2c063f,args:_0x524149,tdx:_0x540b16}=_0x45de61,_0x4ab825=_0x524149[0x0],_0xe61a29=_0x2c063f[_0x566379(0xdc)];if(_0xe61a29)return saveSessionContext({'workflow_project':undefined},_0x2c063f[_0x566379(0x1a2)]),console[_0x566379(0x114)](a55_0x3c6ccd[_0x566379(0xa3)](_0x566379(0xa4))),0x0;if(!_0x4ab825)return console[_0x566379(0x83)](a55_0x3c6ccd['red']('Error:'),_0x566379(0x134)),console[_0x566379(0x83)](a55_0x3c6ccd[_0x566379(0x1df)](_0x566379(0x13b))),console[_0x566379(0x83)](a55_0x3c6ccd[_0x566379(0x1df)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x495be4=await withSpinner(_0x566379(0x1f3)+_0x4ab825+_0x566379(0x11c),()=>_0x540b16[_0x566379(0x117)][_0x566379(0xb1)](_0x4ab825),{'verbose':_0x2c063f['verbose']}),{name:_0x396d9e}=_0x495be4[_0x566379(0x1d5)];return saveSessionContext({'workflow_project':_0x396d9e},_0x2c063f['session']),console['log'](a55_0x3c6ccd[_0x566379(0xa3)](_0x566379(0x13d)+a55_0x3c6ccd[_0x566379(0x16e)](_0x396d9e))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x161);[a55_0x497f19(0x1b7)]='List\x20all\x20workflow\x20projects';async[a55_0x497f19(0x1c1)](_0x41b03e){const _0xac0c46=a55_0x497f19,{options:_0x452f5f,args:_0x55c085,tdx:_0x5bdf9f}=_0x41b03e,_0x49fb75=_0x55c085[0x0];_0x452f5f[_0xac0c46(0x1d4)]&&_0x49fb75&&console[_0xac0c46(0x83)](_0xac0c46(0x103)+_0x49fb75);const _0x1dbbfe=await withSpinner(_0xac0c46(0x1fd),()=>_0x5bdf9f[_0xac0c46(0x117)]['projects'](_0x49fb75,{'limit':_0x452f5f['limit']}),{'verbose':_0x452f5f[_0xac0c46(0x1d4)]});let _0x9cec8b=_0x1dbbfe[_0xac0c46(0x1d5)];_0x9cec8b['sort']((_0x2b2d4c,_0x12a348)=>_0x2b2d4c['name'][_0xac0c46(0x1fb)](_0x12a348['name']));const _0x43ba2e=_0x452f5f[_0xac0c46(0xff)]||0x64,_0x3996a8=_0x9cec8b[_0xac0c46(0xf4)]>=_0x43ba2e?a55_0x3c6ccd['dim'](_0xac0c46(0x6f)):'';console['error'](_0xac0c46(0xb9)+_0x9cec8b[_0xac0c46(0xf4)]+'\x20project'+(_0x9cec8b[_0xac0c46(0xf4)]!==0x1?'s':'')+_0x3996a8);if(_0x452f5f[_0xac0c46(0x1ad)]===_0xac0c46(0x1c2)||_0x452f5f[_0xac0c46(0x1ad)]===_0xac0c46(0x1ce)||_0x452f5f[_0xac0c46(0x1ad)]===_0xac0c46(0xf0))await handleSDKOutput(_0x9cec8b,_0x452f5f);else{if(_0x9cec8b[_0xac0c46(0xf4)]===0x0)_0x49fb75?console[_0xac0c46(0x114)]('No\x20projects\x20match\x20pattern:\x20'+_0x49fb75):console[_0xac0c46(0x114)](_0xac0c46(0x19b));else{const _0xc46c1d=_0x9cec8b[_0xac0c46(0x127)](_0x225acf=>{const _0x23f08f=_0xac0c46,_0x4bfde7=_0x225acf['metadata']?.['some'](_0x4a672c=>_0x4a672c[_0x23f08f(0x12e)]===_0x23f08f(0xf9)),_0x4daf7a=_0x4bfde7?a55_0x3c6ccd[_0x23f08f(0x1df)]('\x20(system)'):'';return _0x23f08f(0xfe)+_0x225acf['name']+_0x4daf7a;});await writeOutput(_0xc46c1d['join']('\x0a'),_0x452f5f[_0xac0c46(0x1ea)],_0xac0c46(0x9e));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x19c);[a55_0x497f19(0x1b7)]=a55_0x497f19(0x1a5);async['execute'](_0x1e4f2f){const _0x351f85=a55_0x497f19,{options:_0x528e21,args:_0x4533ea,tdx:_0x4016fb}=_0x1e4f2f,_0x50c6d3=this[_0x351f85(0x19f)](_0x4533ea,_0x528e21);_0x528e21[_0x351f85(0x1d4)]&&_0x50c6d3&&console['error'](_0x351f85(0x14f)+_0x50c6d3);const _0x3cd238=await withSpinner(_0x351f85(0xcd),()=>_0x4016fb[_0x351f85(0x117)][_0x351f85(0x1ca)](_0x50c6d3,{'limit':_0x528e21[_0x351f85(0xff)]}),{'verbose':_0x528e21[_0x351f85(0x1d4)]});let _0x40ada0=_0x3cd238['data'];_0x40ada0[_0x351f85(0xe8)]((_0x58fef3,_0x1021e5)=>{const _0x354d68=_0x351f85,_0x18a6f4=_0x58fef3[_0x354d68(0x1ab)][_0x354d68(0x1fb)](_0x1021e5[_0x354d68(0x1ab)]);if(_0x18a6f4!==0x0)return _0x18a6f4;return(_0x58fef3['project']?.[_0x354d68(0x1ab)]||'')[_0x354d68(0x1fb)](_0x1021e5[_0x354d68(0x164)]?.[_0x354d68(0x1ab)]||'');});const _0x4eece8=_0x528e21[_0x351f85(0xff)]||0x64,_0x47514d=_0x40ada0[_0x351f85(0xf4)]>=_0x4eece8?a55_0x3c6ccd['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x351f85(0x83)](_0x351f85(0xb9)+_0x40ada0[_0x351f85(0xf4)]+'\x20workflow'+(_0x40ada0[_0x351f85(0xf4)]!==0x1?'s':'')+_0x47514d);if(_0x528e21['format']==='json'||_0x528e21[_0x351f85(0x1ad)]==='jsonl'||_0x528e21[_0x351f85(0x1ad)]===_0x351f85(0xf0))await handleSDKOutput(_0x40ada0,_0x528e21);else{if(_0x40ada0[_0x351f85(0xf4)]===0x0)_0x50c6d3?console['log'](_0x351f85(0x1ff)+_0x50c6d3):console[_0x351f85(0x114)]('No\x20workflows\x20found');else{const _0x5ba198=_0x528e21['site'],_0x4106f3=_0x40ada0[_0x351f85(0x127)](_0x834fd3=>{const _0x2f69ae=_0x351f85,_0x40de7d=a55_0x3c6ccd[_0x2f69ae(0x1df)]('#'+_0x834fd3['id']),_0x218684=hyperlink(_0x40de7d,getWorkflowUrl(_0x5ba198,_0x834fd3['id'])),_0x5cf174=_0x834fd3[_0x2f69ae(0x164)]?.[_0x2f69ae(0x1ab)]?a55_0x3c6ccd[_0x2f69ae(0x1df)]('\x20('+_0x834fd3[_0x2f69ae(0x164)][_0x2f69ae(0x1ab)]+')'):'';return _0x2f69ae(0x138)+_0x218684+'\x20'+_0x834fd3[_0x2f69ae(0x1ab)]+_0x5cf174;});await writeOutput(_0x4106f3[_0x351f85(0x80)]('\x0a'),_0x528e21[_0x351f85(0x1ea)],_0x351f85(0x9e));}}return 0x0;}}function a55_0x1c9b(){const _0x4b8ffa=['\x20is\x20not\x20a\x20directory','Secrets\x20to\x20set:\x20','lastAttempt','resolve','Loading\x20workflows...','\x20\x20tdx\x20wf\x20use\x20<project>','resolveProjectDir','Resolving\x20project\x20\x27','Target:\x20','workflow:use','readFile','param','targetExists','\x0aPolling...\x20(','success','localeCompare','getTime','Listing\x20workflow\x20projects...','LABEL_MIN_SPACING','No\x20workflows\x20found\x20in\x20project:\x20','MIN_TIMELINE_WIDTH','sessionTime','\x0aPush\x20these\x20changes?','Source\x20directory\x20is\x20required','\x0a✔\x20Attempt\x20complete','\x0aUpdate\x20existing\x20project\x20\x22','title','setSecrets','\x0aError:','Select\x20a\x20workflow\x20to\x20run','\x20from\x20session\x20','No\x20workflow\x20tdx.json\x20found','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Key\x20cannot\x20be\x20empty','\x20unchanged','...','done','\x20(use\x20--limit\x20to\x20show\x20more)','type','TASK_NAME_WIDTH','workflow:secrets:delete','Latest\x20session\x20has\x20no\x20attempt','MAX_POLL_ITERATIONS','\x0aDry\x20run\x20-\x20no\x20project\x20created','Writing\x20files...','-\x20no\x20files\x20written','attempt','getFullYear','⚠\x20Showing\x20first\x20','Analyzing\x20changes...','from','\x20to\x20see\x20detailed\x20logs','includeSubtasks','columns','join','generateSessionTimelineRows','MAX_LABEL_COUNT','error','window','964288tNXLVf','executePushProject','getHours','substring','targetDir','workflow:kill','updatedAt','unchanged','executeCloneProject','indexOf','canceling','changes','Loading\x20session...','value','Failed\x20to\x20fetch\x20attempt\x20data','min','set','No\x20attempts\x20found\x20in\x20project:\x20','retrySession','navigateSessionsInteractive','yellow','List\x20workflow\x20execution\x20sessions','\x20\x20Source:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','✔\x20Secret\x20\x27','list','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','workflowName','Files\x20to\x20upload:\x20','max','green','✔\x20Workflow\x20project\x20context\x20cleared.','→\x20New\x20project:\x20','red','Filter:\x20','size','64KwvmUk','\x0a✔\x20Already\x20up\x20to\x20date','cwd','✔\x20Project\x20updated','\x20-\x20','MAX_TIMELINE_WIDTH','repeat','\x20secrets...','resolveProjectId','stringify','\x27\x20from\x20project\x20\x27','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','trimEnd','Force:\x20yes','workflow:download','No\x20sessions\x20found','✔\x20Found\x20','✔\x20Deleted\x20project\x20','workflow:clone','summary','startsWith','Select\x20a\x20session\x20to\x20view\x20timeline:','workflowProject','filter','→\x20Project:\x20','✔\x20Project:\x20','filesExtracted','Dry\x20run:\x20yes','Cancelled','pollTimeline','Show\x20specific\x20attempt\x20details','stat','msPerChar','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','diff','text','Listing\x20workflows...','retryAttemptName','includes','run','fill','Key:\x20','\x20\x20Revision:\x20','Output\x20directory:\x20','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','status','Project:\x20','No\x20workflows\x20found','Retrying\x20attempt...','Tip:\x20cd\x20to\x20workflows/','keys','clear','white','preparePushProject','taskName','delete','showWorkflowConsoleUrl','running','Source\x20directory:\x20','sessionId','Downloading\x20project\x20','round','Start\x20a\x20workflow\x20run','sort','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20\x20Workflow:\x20','No\x20sessions\x20found\x20for:\x20','Killing\x20attempt...','hasChanges','duration','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','table','pending','unknown','message','length','workflow:tasks','\x20has\x20no\x20attempts','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','MIN_LABEL_COUNT','sys','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20session','renderSessionsTimeline','find','📁\x20','limit','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','attempt:','\x1b[1A\x1b[2K','Pattern:\x20','workflow:secrets:list','Setting\x20secret...','deleteSecret','Auto-selected\x20latest\x20session:\x20','ICON_WIDTH','tdx.json','deleted','planned','✔\x20Clone\x20complete','skipValidation','createdAt','✔\x20Pushed\x20','path','has','fromTask','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','log','logFiles','\x20\x20Project\x20ID:\x20','workflow','sessions','(use\x20--limit\x20to\x20see\x20more)','\x20deleted','relative','\x27...','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','session:','LABEL_WIDTH_DIVISOR','rows','write','From\x20task:\x20','\x20secrets\x20set\x20for\x20project\x20\x27','isArray','workflow:run','MAX_TASKS_DISPLAY','map','split','2676174BWVnil','attempts','values','\x22\x20already\x20exists\x20(ID:\x20','match','key','Pull\x20workflow\x20project\x20to\x20local\x20folder','Listing\x20workflow\x20sessions...','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','---\x20','index','Project\x20name\x20is\x20required','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Show\x20tasks\x20for\x20an\x20attempt','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','📋\x20','\x20tasks','sourceDir','Usage:\x20tdx\x20wf\x20use\x20<project>','yes','✔\x20Workflow\x20project\x20set\x20to:\x20','New\x20project\x20name:\x20','stdout','all','5337852TDOWEy','/attempt/','Pushing\x20workflow\x20project...','workflow:retry','No\x20matching\x20sessions\x20found','✔\x20Retry\x20started','5215105iqbNol','-\x20nothing\x20pushed','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x0aApply\x20these\x20changes?','tasks','isTTY','Error:','No\x20sessions\x20with\x20timing\x20information','Project\x20filter:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Params:\x20','Revision:\x20','trim','\x20task','basename','newProjectId','\x22\x20to\x20new\x20project\x20\x22','requireProject','end','Using\x20attempt\x20','dryRun','Task\x20name:\x20','Analyzing\x20project...','startTime','Invalid\x20format:\x20','state','workflow:projects','Source\x20project:\x20','✔\x20Workflow\x20run\x20started','project','getMonth','Error:\x20Attempt\x20ID\x20is\x20required','Project\x20directory:\x20','Error:\x20Secret\x20key\x20is\x20required','Session\x20time:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','No\x20sessions\x20found\x20in\x20project:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Starting\x20workflow\x20run...','cyan','sourceProjectName','newProjectName','getMinutes','\x20attempt','renderSingleTimeline','\x20\x20Attempt\x20ID:\x20','Warning:','\x0a✔\x20No\x20changes\x20to\x20push','\x0aClone\x20\x22','✔\x20Push\x20complete','toLowerCase','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Parameters:\x20','workflow:delete','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','No\x20attempts\x20found\x20for:\x20','revision','Getting\x20attempt\x20details...','🔄\x20','Validation:\x20skipped','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','\x20logs','💡\x20Tip:\x20Use\x20','listSecrets','\x20\x20Console:\x20','context','total','\x20\x20Session\x20context\x20set\x20to:\x20','\x20\x20Files\x20extracted:\x20','start','\x20\x20Session\x20ID:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','workflow:push','task','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Listing\x20workflow\x20attempts...','projectId','cancelRequested','Status:\x20','/sessions/','site','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','session_id','renderTimeline','No\x20workflow\x20projects\x20found','workflow:workflows','\x20\x20Location:\x20','splice','resolveProject','includeRetried','ICON_SPACING','session','prepareCloneProject','Session\x20not\x20found:\x20','List\x20workflows','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflow:timeline','get','floor','Include\x20retried:\x20yes','name','group_error','format','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20sessions\x20','fileCount','attemptId','workflow:pull','Pulling\x20project\x20','icon','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','description','getDate','List\x20workflow\x20attempts','buildTimelineData','\x20secret','No\x20log\x20content\x20found','finishedAt','new','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','workflow:sessions','execute','json','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','✔\x20Downloaded\x20','follow','modified','1505441yElUET','POLL_INTERVAL_MS','parseProjectWorkflowPattern','workflows','5176660hUuBxl','projectName','workflow:secrets:set','jsonl','slice','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','parse','\x0aDry\x20run\x20-\x20nothing\x20pushed','No\x20log\x20files\x20found\x20for\x20this\x20attempt','verbose','data','padStart','\x20\x20New\x20attempt\x20ID:\x20','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Filter:\x20project=','select','blue','now','fullName','No\x20attempts\x20found','dim','download','Usage:\x20workflow:delete\x20<project-name-or-id>','Retry\x20a\x20session\x20or\x20attempt','Listing\x20secrets...','Attempt\x20ID:\x20','push','pullProject','logs','\x20new','2396124BPVSUF','output','Error:\x20Project\x20name\x20is\x20required'];a55_0x1c9b=function(){return _0x4b8ffa;};return a55_0x1c9b();}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x1c0);[a55_0x497f19(0x1b7)]=a55_0x497f19(0x9a);async['execute'](_0x11b537){const _0x1067eb=a55_0x497f19,{options:_0x1307af,args:_0x5329a6,tdx:_0x36ef9a}=_0x11b537,_0x4bd94c=this['parseProjectWorkflowPattern'](_0x5329a6,_0x1307af);if(!_0x4bd94c)return 0x1;const {projectName:_0x5de6f6,workflowName:_0x408190}=_0x4bd94c;if(_0x1307af['verbose']){if(_0x5de6f6&&_0x408190)console['error']('Filter:\x20'+_0x5de6f6+'.'+_0x408190);else _0x5de6f6&&console['error'](_0x1067eb(0x1d9)+_0x5de6f6);const _0x17329b=_0x1307af[_0x1067eb(0xd6)];_0x17329b&&console['error'](_0x1067eb(0x195)+_0x17329b);}let _0x541821=0x28;if(process[_0x1067eb(0x13f)][_0x1067eb(0x14c)]&&!_0x1307af[_0x1067eb(0x1ea)]&&!_0x1307af[_0x1067eb(0x1ad)]){const _0x334894=process[_0x1067eb(0x13f)]['rows']||0x28;_0x541821=Math[_0x1067eb(0xa2)](0x14,Math[_0x1067eb(0x1a9)](_0x334894*0x2/0x3));}const _0x347d11=_0x1307af[_0x1067eb(0xff)]||_0x541821,_0x5d660f=await withSpinner(_0x1067eb(0x130),()=>_0x36ef9a['workflow'][_0x1067eb(0x118)]({'projectName':_0x5de6f6,'workflowName':_0x408190,'status':_0x1307af[_0x1067eb(0xd6)],'fromTime':_0x1307af[_0x1067eb(0x7c)],'toTime':_0x1307af['to'],'limit':_0x347d11}),{'verbose':_0x1307af[_0x1067eb(0x1d4)]}),_0x3d8009=_0x5d660f[_0x1067eb(0x1d5)];_0x3d8009[_0x1067eb(0xe8)]((_0x4971e3,_0x32bb9c)=>{const _0x1fdd18=_0x1067eb,_0x270308=_0x4971e3[_0x1fdd18(0x201)]||'',_0x2e69a3=_0x32bb9c[_0x1fdd18(0x201)]||'';return _0x2e69a3[_0x1fdd18(0x1fb)](_0x270308);});_0x3d8009['length']>=_0x347d11?console[_0x1067eb(0x83)]('✔\x20Showing\x20'+_0x3d8009[_0x1067eb(0xf4)]+_0x1067eb(0x1b0)+a55_0x3c6ccd[_0x1067eb(0x1df)](_0x1067eb(0x119))):console[_0x1067eb(0x83)]('✔\x20Found\x20'+_0x3d8009['length']+_0x1067eb(0xfb)+(_0x3d8009[_0x1067eb(0xf4)]!==0x1?'s':''));if(_0x1307af['format']===_0x1067eb(0x1c2)||_0x1307af[_0x1067eb(0x1ad)]==='jsonl'||_0x1307af[_0x1067eb(0x1ad)]===_0x1067eb(0xf0))await handleSDKOutput(_0x3d8009,_0x1307af);else{if(!process[_0x1067eb(0x13f)][_0x1067eb(0x14c)]||_0x1307af['output']){if(_0x3d8009[_0x1067eb(0xf4)]===0x0){if(_0x5de6f6&&_0x408190)console[_0x1067eb(0x114)](_0x1067eb(0xeb)+_0x5de6f6+'.'+_0x408190);else _0x5de6f6?console[_0x1067eb(0x114)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x5de6f6):console[_0x1067eb(0x114)](_0x1067eb(0xb8));}else{const _0x19c702=_0x1307af['site'],_0x2e2a76=this[_0x1067eb(0xfc)](_0x3d8009,_0x19c702);_0x1307af[_0x1067eb(0x1ea)]?await writeOutput(_0x2e2a76,_0x1307af['output'],'list'):console[_0x1067eb(0x114)](_0x2e2a76);}!_0x5de6f6&&(console['error'](''),console[_0x1067eb(0x83)](a55_0x3c6ccd['dim']('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x1067eb(0x83)](a55_0x3c6ccd[_0x1067eb(0x1df)](_0x1067eb(0x137))+'or'+a55_0x3c6ccd[_0x1067eb(0x1df)](_0x1067eb(0x1f1))));}else{if(_0x3d8009[_0x1067eb(0xf4)]===0x0){if(_0x5de6f6&&_0x408190)console[_0x1067eb(0x114)](_0x1067eb(0xeb)+_0x5de6f6+'.'+_0x408190);else _0x5de6f6?console['log'](_0x1067eb(0x16b)+_0x5de6f6):console['log'](_0x1067eb(0xb8));}else await this[_0x1067eb(0x98)](_0x3d8009,_0x11b537,_0x5de6f6);}}return 0x0;}[a55_0x497f19(0xfc)](_0x4b20e2,_0x39b3d4){const _0x4a807b=a55_0x497f19,_0x4a8ec1=[],_0x1a5845=new Map();let _0xe02b4f=Infinity,_0x2b05c0=-Infinity;for(const _0x4a8099 of _0x4b20e2){if(_0x4a8099[_0x4a807b(0x1ee)]?.['createdAt']){const _0x41edb1=new Date(_0x4a8099[_0x4a807b(0x1ee)]['createdAt'])[_0x4a807b(0x1fc)](),_0x3ed2ec=_0x4a8099['lastAttempt'][_0x4a807b(0x1bd)]?new Date(_0x4a8099[_0x4a807b(0x1ee)]['finishedAt'])[_0x4a807b(0x1fc)]():Date[_0x4a807b(0x1dc)](),_0x2e4fcd=_0x4a8099['project']?.[_0x4a807b(0x1ab)]||'(unknown)';!_0x1a5845[_0x4a807b(0x111)](_0x2e4fcd)&&_0x1a5845[_0x4a807b(0x95)](_0x2e4fcd,[]),_0x1a5845[_0x4a807b(0x1a8)](_0x2e4fcd)[_0x4a807b(0x1e5)]({'session':_0x4a8099,'startTime':_0x41edb1,'endTime':_0x3ed2ec,'duration':_0x3ed2ec-_0x41edb1}),_0xe02b4f=Math['min'](_0xe02b4f,_0x41edb1),_0x2b05c0=Math['max'](_0x2b05c0,_0x3ed2ec);}}if(_0x1a5845[_0x4a807b(0xa8)]===0x0)return _0x4a807b(0x14e);const _0x377d6b=process[_0x4a807b(0x13f)][_0x4a807b(0x7f)]||0x78,_0x26cbe1=0x1e,_0x56690e=0x32,_0x426329=0x4,_0x3faca1=Math[_0x4a807b(0x94)](_0x56690e,Math[_0x4a807b(0xa2)](_0x26cbe1,Math[_0x4a807b(0x1a9)](_0x377d6b*0.3))),_0x2f0bd3=_0x377d6b-_0x3faca1-TIMELINE_CONFIG['GUTTER']-0x3-_0x426329,_0x5588f5=_0x2b05c0-_0xe02b4f,_0x3733ee=_0x5588f5/_0x3faca1,_0x47217c=renderTimeAxis({'startTime':_0xe02b4f,'endTime':_0x2b05c0,'durationMs':_0x5588f5,'msPerChar':_0x3733ee},_0x3faca1),_0x1503d8=[];for(const _0x1bbe7e of _0x1a5845[_0x4a807b(0x12b)]()){_0x1503d8['push'](..._0x1bbe7e);}_0x1503d8[_0x4a807b(0xe8)]((_0x52b8be,_0x96c436)=>_0x96c436[_0x4a807b(0x15e)]-_0x52b8be[_0x4a807b(0x15e)]);const _0x4902a0=new Date(_0xe02b4f),_0x4e3473=formatDate(_0x4902a0),_0x6e7948=_0x426329+TIMELINE_CONFIG[_0x4a807b(0x108)]+TIMELINE_CONFIG[_0x4a807b(0x1a1)]+_0x2f0bd3,_0x36aa64='\x20'[_0x4a807b(0xaf)](_0x6e7948-_0x4e3473[_0x4a807b(0xf4)]),_0x294036=_0x36aa64+a55_0x3c6ccd[_0x4a807b(0x1df)](_0x4e3473)+'\x20'+_0x47217c;_0x4a8ec1[_0x4a807b(0x1e5)](_0x294036);const _0x3a56b6=0x16;let _0x357fb1=0x0;for(const _0x46fe97 of _0x1503d8){const _0x1ba7dc=_0x46fe97[_0x4a807b(0x1a2)][_0x4a807b(0x164)]?.['name']||'?',_0xb08fc8=Math['min'](stringWidth(_0x1ba7dc),_0x3a56b6);_0x357fb1=Math[_0x4a807b(0xa2)](_0x357fb1,_0xb08fc8);}for(const _0x442fa1 of _0x1503d8){const {session:_0x3413de,startTime:_0x1fdeef,endTime:_0x27a866,duration:_0x3e6cd5}=_0x442fa1,_0xeb582c=_0x3413de['project']?.['id'],_0x5a4db8=_0x3413de['id'],_0x36e525=_0x3413de[_0x4a807b(0x164)]?.[_0x4a807b(0x1ab)]||'?',_0x3a2644=_0x3413de[_0x4a807b(0x117)]?.[_0x4a807b(0x1ab)]||'?';let _0x36f8e2,_0x33f31d;if(_0x3413de[_0x4a807b(0x1ee)]){const _0x260fe2=_0x3413de[_0x4a807b(0x1ee)];!_0x260fe2[_0x4a807b(0x6e)]?(_0x36f8e2=_0x260fe2[_0x4a807b(0x194)]?'🛑':'🔄',_0x33f31d=_0x260fe2[_0x4a807b(0x194)]?a55_0x3c6ccd[_0x4a807b(0x99)]:a55_0x3c6ccd[_0x4a807b(0x1db)]):(_0x36f8e2=_0x260fe2[_0x4a807b(0x1fa)]?'✅':'❌',_0x33f31d=_0x260fe2[_0x4a807b(0x1fa)]?a55_0x3c6ccd[_0x4a807b(0xa3)]:a55_0x3c6ccd[_0x4a807b(0xa6)]);}else _0x36f8e2='⏳',_0x33f31d=a55_0x3c6ccd['dim'];const _0x5e24c4='#'+_0x5a4db8,_0x2c5963=_0xeb582c?hyperlink(_0x5e24c4,getWorkflowSessionUrl(_0x39b3d4,_0xeb582c,_0x5a4db8)):_0x5e24c4;let _0x6efeac=_0x36e525;stringWidth(_0x36e525)>_0x3a56b6&&(_0x6efeac=_0x36e525['slice'](0x0,_0x3a56b6-0x1)+'…');const _0x54b9ad=a55_0x3c6ccd[_0x4a807b(0x1df)](_0x6efeac),_0x4cae9e=stringWidth(_0x6efeac),_0x56b9eb='\x20'['repeat'](_0x357fb1-stringWidth(_0x6efeac)+0x2),_0x25388b='('+formatElapsed(_0x3e6cd5)+')',_0xab6956=stringWidth(_0x25388b),_0x295f44=stringWidth(_0x5e24c4),_0x44c287=_0x295f44+0x1+_0x4cae9e+_0x56b9eb[_0x4a807b(0xf4)],_0x1cf3bc=_0x2f0bd3-_0x44c287-_0xab6956-0x1-0x8;let _0x197ebb=_0x3a2644;stringWidth(_0x197ebb)>_0x1cf3bc&&(_0x197ebb=_0x197ebb[_0x4a807b(0x1cf)](0x0,_0x1cf3bc-0x1)+'…');const _0xd25c02=_0x2c5963+'\x20'+_0x54b9ad+_0x56b9eb+_0x197ebb,_0x156935=stringWidth(_0xd25c02),_0x44bbec=_0x2f0bd3-_0x156935-_0xab6956,_0x504abe=_0xd25c02+'\x20'[_0x4a807b(0xaf)](Math[_0x4a807b(0xa2)](0x1,_0x44bbec))+a55_0x3c6ccd[_0x4a807b(0x1df)](_0x25388b),_0x33bd38=Math[_0x4a807b(0x1a9)]((_0x1fdeef-_0xe02b4f)/_0x3733ee),_0x4b6ce1=Math[_0x4a807b(0x1a9)]((_0x27a866-_0xe02b4f)/_0x3733ee),_0xe52051=Math[_0x4a807b(0xa2)](_0x33bd38+0x1,_0x4b6ce1),_0x5c89c8=new Array(_0x3faca1)[_0x4a807b(0xd1)]('\x20');for(let _0x47d52a=_0x33bd38;_0x47d52a<Math[_0x4a807b(0x94)](_0xe52051,_0x3faca1);_0x47d52a++){_0x5c89c8[_0x47d52a]='─';}const _0xa4463d=_0x5c89c8[_0x4a807b(0x127)](_0x319ff2=>_0x319ff2==='\x20'?'\x20':_0x33f31d(_0x319ff2))[_0x4a807b(0x80)]('');_0x4a8ec1['push'](_0x36f8e2+'\x20'+_0x504abe+'│'+_0xa4463d+'│');}return _0x4a8ec1[_0x4a807b(0x80)]('\x0a');}async[a55_0x497f19(0x98)](_0xf90d33,_0x2a677f,_0x193ddd){const _0x4a1d50=a55_0x497f19,{options:_0x105c34,tdx:_0x3b1406}=_0x2a677f,_0x13b0b7=_0x105c34[_0x4a1d50(0x197)],{timelineRows:_0x29e604,timeAxisHeader:_0x28c6fc}=this[_0x4a1d50(0x81)](_0xf90d33,_0x13b0b7),_0x59914e=_0x29e604[_0x4a1d50(0xc0)](_0x3987f4=>_0x3987f4[_0x4a1d50(0x1b2)]);if(_0x59914e[_0x4a1d50(0xf4)]===0x0){const _0x36d4f9=this[_0x4a1d50(0xfc)](_0xf90d33,_0x13b0b7);console[_0x4a1d50(0x114)](_0x36d4f9);!_0x193ddd&&(console['error'](''),console[_0x4a1d50(0x83)](a55_0x3c6ccd['dim']('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x4a1d50(0x83)](a55_0x3c6ccd[_0x4a1d50(0x1df)](_0x4a1d50(0x137))+'or'+a55_0x3c6ccd[_0x4a1d50(0x1df)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x28c6fc&&console[_0x4a1d50(0x114)](_0x28c6fc);const _0x55033b=_0x29e604[_0x4a1d50(0xc0)](_0x2aeccc=>_0x2aeccc[_0x4a1d50(0x1b2)])[_0x4a1d50(0x127)](_0x505b60=>({'title':_0x505b60['displayLine'],'value':_0x505b60[_0x4a1d50(0x1b2)]})),_0x4da13a=process[_0x4a1d50(0x13f)][_0x4a1d50(0x120)]||0x3c,_0xb1f47c=Math[_0x4a1d50(0xa2)](0x28,Math['floor'](_0x4da13a*0x2/0x3)),_0x397ecb=await a55_0x1641e4({'type':'autocomplete','name':_0x4a1d50(0x1b2),'message':_0x4a1d50(0x17d),'choices':_0x55033b,'initial':-0x1,'limit':_0xb1f47c,'clearFirst':!![],'fallback':{'title':_0x4a1d50(0x145),'value':null},'suggest':(_0x2776f4,_0xb1d8e5)=>{const _0xb80b0b=_0x4a1d50;if(!_0x2776f4)return Promise[_0xb80b0b(0x1ef)](_0xb1d8e5);const _0x44257b=_0xb1d8e5['filter'](_0x3f4af7=>{const _0x3969ea=_0xb80b0b,_0x4af28b=_0x3f4af7;return _0x4af28b[_0x3969ea(0x206)]['toLowerCase']()[_0x3969ea(0xcf)](_0x2776f4[_0x3969ea(0x179)]());});return Promise[_0xb80b0b(0x1ef)](_0x44257b);}}),_0x3789ba=()=>{const _0x38d2b7=_0x4a1d50;process['stdout'][_0x38d2b7(0x121)](_0x38d2b7(0x102)),process[_0x38d2b7(0x13f)][_0x38d2b7(0x121)](_0x38d2b7(0x102)),process[_0x38d2b7(0x13f)][_0x38d2b7(0x121)](_0x38d2b7(0x102));},_0x513a96=_0x397ecb&&_0x397ecb[_0x4a1d50(0x1b2)]&&_0x397ecb[_0x4a1d50(0x1b2)]!==null&&_0x397ecb['attemptId'][_0x4a1d50(0x153)]()!=='';if(!_0x513a96){_0x3789ba(),console[_0x4a1d50(0x114)](a55_0x3c6ccd[_0x4a1d50(0x1df)](_0x4a1d50(0xc5)));return;}_0x3789ba();const _0x48e94=_0xf90d33['find'](_0x109afd=>_0x109afd['lastAttempt']?.['id']===_0x397ecb['attemptId']);if(_0x48e94){const _0x4fbd0d=_0x48e94[_0x4a1d50(0x164)]?.['name']||'?',_0x3e0d23=_0x48e94[_0x4a1d50(0x117)]?.[_0x4a1d50(0x1ab)]||'?';console[_0x4a1d50(0x114)](_0x4a1d50(0xd7)+a55_0x3c6ccd[_0x4a1d50(0x1df)](_0x4fbd0d)+',\x20Workflow:\x20'+a55_0x3c6ccd[_0x4a1d50(0x1df)](_0x3e0d23));}const _0x26b02c=new WorkflowTimelineCommand();await _0x26b02c[_0x4a1d50(0x1c1)]({'args':[],'options':{..._0x105c34,'attemptId':_0x397ecb[_0x4a1d50(0x1b2)]},'tdx':_0x3b1406});}[a55_0x497f19(0x81)](_0x469e4c,_0x30d292){const _0x617c=a55_0x497f19,_0x3bf06c=new Map();for(const _0x5bde0c of _0x469e4c){_0x5bde0c['id']&&_0x5bde0c[_0x617c(0x1ee)]?.['id']&&_0x3bf06c[_0x617c(0x95)](_0x5bde0c['id'],_0x5bde0c[_0x617c(0x1ee)]['id']);}const _0xde6dae=[];let _0x181dff='';const _0x50154d=this[_0x617c(0xfc)](_0x469e4c,_0x30d292),_0x4028c1=_0x50154d[_0x617c(0x128)]('\x0a');for(const _0x81ba2e of _0x4028c1){if(_0x81ba2e[_0x617c(0xbd)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x81ba2e[_0x617c(0x12d)](/^\s+\d{4}-\d{2}-\d{2}/))_0x181dff=_0x81ba2e;else{if(_0x81ba2e[_0x617c(0x12d)](/^[✅❌🔄🛑⏳]/)){const _0x1614ca=_0x81ba2e[_0x617c(0x12d)](/#(\d+)/),_0x2b6357=_0x1614ca?_0x1614ca[0x1]:null,_0x4a238a=_0x2b6357?_0x3bf06c[_0x617c(0x1a8)](_0x2b6357)||null:null,_0x28cad0=_0x469e4c[_0x617c(0xfd)](_0xd98af3=>_0xd98af3['id']===_0x2b6357),_0x5d0d98=_0x28cad0?.[_0x617c(0x164)]?.['name']||'';_0xde6dae[_0x617c(0x1e5)]({'displayLine':_0x81ba2e,'attemptId':_0x4a238a,'projectName':_0x5d0d98});}}}return{'timelineRows':_0xde6dae,'timeAxisHeader':_0x181dff};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']='workflow:attempts';[a55_0x497f19(0x1b7)]=a55_0x497f19(0x1b9);async['execute'](_0x3f4cc5){const _0x4c4777=a55_0x497f19,{options:_0x3c5cce,args:_0x53c58e,tdx:_0x1a5851}=_0x3f4cc5,_0x5a9f0d=this[_0x4c4777(0x1c9)](_0x53c58e,_0x3c5cce);if(!_0x5a9f0d)return 0x1;const {projectName:_0x37de13,workflowName:_0x2e0cd1}=_0x5a9f0d,_0x5bccfd=_0x3c5cce[_0x4c4777(0x1a0)];if(_0x3c5cce[_0x4c4777(0x1d4)]){if(_0x37de13&&_0x2e0cd1)console[_0x4c4777(0x83)]('Filter:\x20'+_0x37de13+'.'+_0x2e0cd1);else _0x37de13&&console[_0x4c4777(0x83)](_0x4c4777(0x1d9)+_0x37de13);_0x5bccfd&&console[_0x4c4777(0x83)](_0x4c4777(0x1aa));}const _0x50eea5=await withSpinner(_0x4c4777(0x192),()=>_0x1a5851[_0x4c4777(0x117)][_0x4c4777(0x12a)]({'projectName':_0x37de13,'workflowName':_0x2e0cd1,'includeRetried':_0x5bccfd,'limit':_0x3c5cce[_0x4c4777(0xff)]}),{'verbose':_0x3c5cce[_0x4c4777(0x1d4)]}),_0x4553b4=_0x50eea5[_0x4c4777(0x1d5)],_0x46ddcd=_0x3c5cce[_0x4c4777(0xff)]||0x64,_0x1fb866=_0x4553b4[_0x4c4777(0xf4)]>=_0x46ddcd?a55_0x3c6ccd[_0x4c4777(0x1df)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error']('✔\x20Found\x20'+_0x4553b4[_0x4c4777(0xf4)]+_0x4c4777(0x172)+(_0x4553b4[_0x4c4777(0xf4)]!==0x1?'s':'')+_0x1fb866);if(_0x3c5cce[_0x4c4777(0x1ad)]===_0x4c4777(0x1c2)||_0x3c5cce['format']===_0x4c4777(0x1ce)||_0x3c5cce[_0x4c4777(0x1ad)]===_0x4c4777(0xf0))await handleSDKOutput(_0x4553b4,_0x3c5cce);else{if(_0x4553b4['length']===0x0){if(_0x37de13&&_0x2e0cd1)console[_0x4c4777(0x114)](_0x4c4777(0x17e)+_0x37de13+'.'+_0x2e0cd1);else _0x37de13?console[_0x4c4777(0x114)](_0x4c4777(0x96)+_0x37de13):console['log'](_0x4c4777(0x1de));}else{const _0x45ea4c=_0x3c5cce['site'],_0x30257c=_0x4553b4[_0x4c4777(0x127)](_0x2553ee=>{const _0x252dde=_0x4c4777,_0x4d9d2b=a55_0x3c6ccd[_0x252dde(0x1df)]('#'+_0x2553ee['id']),_0x41facc=_0x2553ee[_0x252dde(0x164)]?.['id'],_0x43f8f1=_0x2553ee[_0x252dde(0x199)]||_0x2553ee['sessionId'],_0x20575e=_0x41facc&&_0x43f8f1?hyperlink(_0x4d9d2b,getWorkflowAttemptUrl(_0x45ea4c,_0x41facc,_0x43f8f1,_0x2553ee['id'])):_0x4d9d2b,{icon:_0x4dee90,text:_0x5f4c3e}=getAttemptStatusDisplay(_0x2553ee),_0x4407d8=(_0x2553ee[_0x252dde(0x164)]?.['name']||'?')+'.'+(_0x2553ee[_0x252dde(0x117)]?.[_0x252dde(0x1ab)]||'?'),_0x150362=_0x2553ee[_0x252dde(0x201)]?a55_0x3c6ccd['dim'](_0x2553ee[_0x252dde(0x201)]):'';return(_0x20575e+'\x20'+_0x4dee90+(_0x5f4c3e?'\x20'+_0x5f4c3e:'')+'\x20'+_0x4407d8+'\x20'+_0x150362)[_0x252dde(0xb5)]();});await writeOutput(_0x30257c[_0x4c4777(0x80)]('\x0a'),_0x3c5cce[_0x4c4777(0x1ea)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a55_0x497f19(0x1ab)]='workflow:attempt';[a55_0x497f19(0x1b7)]=a55_0x497f19(0xc7);async[a55_0x497f19(0x1c1)](_0x5a7f9e){const _0x580070=a55_0x497f19,{options:_0x137a7c,args:_0x47d283,tdx:_0x34cf43}=_0x5a7f9e,_0x5d4ddb=_0x47d283[0x0];if(!_0x5d4ddb)return console[_0x580070(0x83)](_0x580070(0x166)),0x1;_0x137a7c[_0x580070(0x1d4)]&&console[_0x580070(0x83)](_0x580070(0x1e4)+_0x5d4ddb);const _0x941197=await withSpinner(_0x580070(0x180),()=>_0x34cf43[_0x580070(0x117)][_0x580070(0x78)](_0x5d4ddb),{'verbose':_0x137a7c[_0x580070(0x1d4)]}),_0x4974ec=_0x941197[_0x580070(0x1d5)];let _0x1e0f2e;!_0x4974ec[_0x580070(0x6e)]?_0x1e0f2e=_0x4974ec[_0x580070(0x194)]?_0x580070(0x8f):_0x580070(0xe2):_0x1e0f2e=_0x4974ec[_0x580070(0x1fa)]?_0x580070(0x1fa):_0x580070(0x83);let _0x205e3f;if(_0x4974ec[_0x580070(0x10e)]&&_0x4974ec[_0x580070(0x1bd)]){const _0x4fc496=new Date(_0x4974ec[_0x580070(0x10e)])[_0x580070(0x1fc)](),_0x1c72d4=new Date(_0x4974ec[_0x580070(0x1bd)])[_0x580070(0x1fc)]();_0x205e3f=Math[_0x580070(0xe6)]((_0x1c72d4-_0x4fc496)/0x3e8);}const _0x1bca67={'attempt_id':_0x4974ec['id'],'status':_0x1e0f2e,..._0x4974ec[_0x580070(0x133)]!==undefined&&{'index':_0x4974ec[_0x580070(0x133)]},..._0x4974ec['project']&&{'project':_0x4974ec[_0x580070(0x164)][_0x580070(0x1ab)]},..._0x4974ec[_0x580070(0x117)]&&{'workflow':_0x4974ec[_0x580070(0x117)]['name']},..._0x4974ec[_0x580070(0xe4)]&&{'session_id':_0x4974ec[_0x580070(0xe4)]},..._0x4974ec[_0x580070(0x201)]&&{'session_time':_0x4974ec['sessionTime']},..._0x4974ec[_0x580070(0xce)]&&{'retry_attempt':_0x4974ec[_0x580070(0xce)]},..._0x205e3f!==undefined&&{'duration_sec':_0x205e3f},..._0x4974ec[_0x580070(0x10e)]&&{'created_at':_0x4974ec[_0x580070(0x10e)]},..._0x4974ec[_0x580070(0x1bd)]&&{'finished_at':_0x4974ec[_0x580070(0x1bd)]},...Object[_0x580070(0xdb)](_0x4974ec['params'])['length']>0x0&&{'params':_0x4974ec['params']}};return await handleSingleObjectOutput(_0x1bca67,_0x137a7c),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0xf5);['description']=a55_0x497f19(0x136);async['execute'](_0x4c8c92){const _0x1496e8=a55_0x497f19,{options:_0x212d91,args:_0xc576dd,tdx:_0x4120af}=_0x4c8c92,_0x50d9b4=_0xc576dd[0x0];if(!_0x50d9b4)return console[_0x1496e8(0x83)](_0x1496e8(0x166)),0x1;const _0x8ba5fd=_0x212d91[_0x1496e8(0x7e)];_0x212d91[_0x1496e8(0x1d4)]&&(console[_0x1496e8(0x83)](_0x1496e8(0x1e4)+_0x50d9b4),_0x8ba5fd&&console[_0x1496e8(0x83)]('Including\x20subtasks:\x20yes'));const _0x337111=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x4120af[_0x1496e8(0x117)]['tasks'](_0x50d9b4,_0x8ba5fd||![]),{'verbose':_0x212d91[_0x1496e8(0x1d4)]}),_0xd7f34e=_0x337111[_0x1496e8(0x1d5)];return console[_0x1496e8(0x83)](_0x1496e8(0xb9)+_0xd7f34e['length']+_0x1496e8(0x154)+(_0xd7f34e[_0x1496e8(0xf4)]!==0x1?'s':'')),await handleSDKOutput(_0xd7f34e,_0x212d91),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']='workflow:logs';[a55_0x497f19(0x1b7)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a55_0x497f19(0x1c1)](_0x539ecc){const _0x1940f1=a55_0x497f19,{options:_0x4b8a31,args:_0x215582,tdx:_0x1b823f}=_0x539ecc,_0x837a3f=_0x215582[0x0];let _0x5b868d=_0x215582[0x1];if(!_0x837a3f)return console[_0x1940f1(0x83)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x4b8a31[_0x1940f1(0x1d4)]&&(console[_0x1940f1(0x83)](_0x1940f1(0x1e4)+_0x837a3f),_0x5b868d&&console[_0x1940f1(0x83)](_0x1940f1(0x15c)+_0x5b868d));const _0x594dee=await withSpinner('Fetching\x20log\x20files...',()=>_0x1b823f[_0x1940f1(0x117)][_0x1940f1(0x115)](_0x837a3f,_0x5b868d),{'verbose':_0x4b8a31[_0x1940f1(0x1d4)]}),_0x2e25a2=_0x594dee[_0x1940f1(0x1d5)];if(_0x2e25a2[_0x1940f1(0xf4)]===0x0)return console[_0x1940f1(0x83)](_0x1940f1(0x1d3)),0x0;if(!_0x5b868d&&(_0x4b8a31[_0x1940f1(0x1c2)]||_0x4b8a31[_0x1940f1(0x1ad)]))return await handleSDKOutput(_0x2e25a2,_0x4b8a31),0x0;if(!_0x5b868d){const _0x47ee04=_0x2e25a2['map'](_0x311747=>({'title':_0x311747['taskName']+'\x20('+formatBytes(_0x311747['fileSize'])+')','value':_0x311747[_0x1940f1(0xdf)]})),_0xd2e3b1=await a55_0x1641e4({'type':_0x1940f1(0x1da),'name':'task','message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x47ee04});if(!_0xd2e3b1['task'])return console[_0x1940f1(0x83)](_0x1940f1(0xc5)),0x0;_0x5b868d=_0xd2e3b1[_0x1940f1(0x190)];}const _0x3c875c=await withSpinner('Downloading\x20logs...',()=>_0x1b823f[_0x1940f1(0x117)][_0x1940f1(0x1e7)](_0x837a3f,_0x5b868d),{'verbose':_0x4b8a31[_0x1940f1(0x1d4)]}),_0x9b81c8=_0x3c875c['data'];return _0x9b81c8?console[_0x1940f1(0x114)](_0x9b81c8):console[_0x1940f1(0x83)](_0x1940f1(0x1bc)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a55_0x497f19(0x8a);[a55_0x497f19(0x1b7)]='Kill\x20a\x20running\x20attempt';async[a55_0x497f19(0x1c1)](_0x42dd7a){const _0x5d300d=a55_0x497f19,{options:_0x5655bd,args:_0x22a4b0,tdx:_0x5348d1}=_0x42dd7a,_0x507209=_0x22a4b0[0x0];if(!_0x507209)return console[_0x5d300d(0x83)](_0x5d300d(0x166)),0x1;const _0x257364=_0x5655bd['reason'];_0x5655bd['verbose']&&(console[_0x5d300d(0x83)]('Attempt\x20ID:\x20'+_0x507209),_0x257364&&console[_0x5d300d(0x83)]('Reason:\x20'+_0x257364));if(!_0x5655bd['yes']){if(!isInteractive())return console[_0x5d300d(0x83)](a55_0x3c6ccd[_0x5d300d(0xa6)](_0x5d300d(0x208)),_0x5d300d(0x150)),console['error'](a55_0x3c6ccd[_0x5d300d(0x1df)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2d20de=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x507209+'?');if(!_0x2d20de)return console[_0x5d300d(0x83)](a55_0x3c6ccd['yellow'](_0x5d300d(0xc5))),0x1;}const _0x50de2c=await withSpinner(_0x5d300d(0xec),()=>_0x5348d1[_0x5d300d(0x117)]['kill'](_0x507209,_0x257364),{'verbose':_0x5655bd[_0x5d300d(0x1d4)]}),_0x583ee1=_0x50de2c[_0x5d300d(0x1d5)];return console[_0x5d300d(0x83)]('✔\x20'+_0x583ee1),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x144);['description']=a55_0x497f19(0x1e2);async[a55_0x497f19(0x1c1)](_0x2161ce){const _0xb73e92=a55_0x497f19,{options:_0x587248,args:_0x44413e,tdx:_0x590071}=_0x2161ce,_0x53919b=_0x44413e[0x0];if(!_0x53919b)return console[_0xb73e92(0x83)](_0xb73e92(0xfa)),console[_0xb73e92(0x83)](_0xb73e92(0x9c)),0x1;let _0x2b2abc=![],_0x9b8d92=_0x53919b;if(_0x53919b[_0xb73e92(0xbd)](_0xb73e92(0x11e)))_0x2b2abc=!![],_0x9b8d92=_0x53919b[_0xb73e92(0x88)](0x8);else{if(_0x53919b[_0xb73e92(0xbd)](_0xb73e92(0x101)))_0x2b2abc=![],_0x9b8d92=_0x53919b[_0xb73e92(0x88)](0x8);else return console[_0xb73e92(0x83)](_0xb73e92(0x1b6)),console[_0xb73e92(0x83)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x570980=_0x587248[_0xb73e92(0x112)],_0x1fa3a1=_0x587248['resumeFrom'],_0x2dd598=_0x587248['params'],_0x395c8e=_0x587248['force'];_0x587248['verbose']&&(console[_0xb73e92(0x83)](_0xb73e92(0x1f4)+(_0x2b2abc?'session':_0xb73e92(0x78))+'\x20'+_0x9b8d92),_0x570980&&console[_0xb73e92(0x83)](_0xb73e92(0x122)+_0x570980),_0x1fa3a1&&console[_0xb73e92(0x83)]('Resume\x20from:\x20'+_0x1fa3a1),_0x2dd598&&console[_0xb73e92(0x83)](_0xb73e92(0x151)+_0x2dd598),_0x395c8e&&console[_0xb73e92(0x83)](_0xb73e92(0xb6)));let _0x4a523a;if(_0x2dd598)try{if(_0x2dd598['startsWith']('@')){const _0x2edb53=await import('fs/promises'),_0x2f949b=_0x2dd598[_0xb73e92(0x88)](0x1),_0x1e6fa1=await _0x2edb53[_0xb73e92(0x1f6)](_0x2f949b,'utf-8');_0x4a523a=JSON[_0xb73e92(0x1d1)](_0x1e6fa1);}else _0x4a523a=JSON[_0xb73e92(0x1d1)](_0x2dd598);}catch{return console['error'](_0xb73e92(0xe9)),0x1;}if(!_0x587248[_0xb73e92(0x13c)]){if(!isInteractive())return console[_0xb73e92(0x83)](a55_0x3c6ccd[_0xb73e92(0xa6)]('\x0aError:'),_0xb73e92(0x150)),console[_0xb73e92(0x83)](a55_0x3c6ccd[_0xb73e92(0x1df)](_0xb73e92(0x9f))),0x1;const _0x3fc543=await confirmKey(_0xb73e92(0x1a6)+(_0x2b2abc?_0xb73e92(0x1a2):_0xb73e92(0x78))+'\x20'+_0x9b8d92+'?');if(!_0x3fc543)return console[_0xb73e92(0x83)](a55_0x3c6ccd[_0xb73e92(0x99)](_0xb73e92(0xc5))),0x1;}let _0x20c208;_0x2b2abc?_0x20c208=await withSpinner('Retrying\x20session...',()=>_0x590071[_0xb73e92(0x117)][_0xb73e92(0x97)](_0x9b8d92,{'fromTask':_0x570980,'retryParams':_0x4a523a}),{'verbose':_0x587248[_0xb73e92(0x1d4)]}):_0x20c208=await withSpinner(_0xb73e92(0xd9),()=>_0x590071['workflow']['retryAttempt'](_0x9b8d92,{'resumeFrom':_0x1fa3a1,'retryParams':_0x4a523a,'force':_0x395c8e}),{'verbose':_0x587248[_0xb73e92(0x1d4)]});const _0x249667=_0x20c208['data'];return console[_0xb73e92(0x83)](_0xb73e92(0x146)),console[_0xb73e92(0x83)](_0xb73e92(0x1d7)+_0x249667[_0xb73e92(0x1b2)]),console[_0xb73e92(0x83)](_0xb73e92(0x18d)+_0x249667[_0xb73e92(0xe4)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x125);[a55_0x497f19(0x1b7)]=a55_0x497f19(0xe7);async[a55_0x497f19(0x1c1)](_0x1f80de){const _0x3288c8=a55_0x497f19,{options:_0x21330e,args:_0x25783e,tdx:_0x489281}=_0x1f80de;let _0x1117fe=_0x25783e[0x0];if(!_0x1117fe){const _0x173df3=this[_0x3288c8(0x19f)]([],_0x21330e),_0x1d680d=await withSpinner(_0x3288c8(0x1f0),()=>_0x489281['workflow'][_0x3288c8(0x1ca)](_0x173df3,{'limit':_0x21330e[_0x3288c8(0xff)]}),{'verbose':_0x21330e['verbose']}),_0x2f183a=_0x1d680d[_0x3288c8(0x1d5)];if(_0x2f183a[_0x3288c8(0xf4)]===0x0)return console[_0x3288c8(0x83)](_0x3288c8(0xd8)),!_0x173df3&&console['error'](a55_0x3c6ccd[_0x3288c8(0x1df)](_0x3288c8(0x1af))),0x1;const _0x249e60=_0x2f183a[_0x3288c8(0x127)](_0x3c95b5=>({'title':_0x3c95b5[_0x3288c8(0x164)]?.['name']+'.'+_0x3c95b5[_0x3288c8(0x1ab)],'value':_0x3c95b5[_0x3288c8(0x164)]?.['name']+'.'+_0x3c95b5['name'],'description':_0x3c95b5[_0x3288c8(0x17f)]?'revision:\x20'+_0x3c95b5[_0x3288c8(0x17f)]:undefined})),_0xf6d9b8=await a55_0x1641e4({'type':_0x3288c8(0x1da),'name':_0x3288c8(0x117),'message':_0x3288c8(0x209),'choices':_0x249e60});if(!_0xf6d9b8[_0x3288c8(0x117)])return 0x1;_0x1117fe=_0xf6d9b8[_0x3288c8(0x117)];}if(!_0x1117fe[_0x3288c8(0xcf)]('.')){const _0x20ef4d=this[_0x3288c8(0x19f)]([],_0x21330e);if(_0x20ef4d)_0x1117fe=_0x20ef4d+'.'+_0x1117fe;else return console[_0x3288c8(0x83)](a55_0x3c6ccd[_0x3288c8(0xa6)](_0x3288c8(0x14d)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a55_0x3c6ccd[_0x3288c8(0x1df)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x5a61bb=_0x21330e[_0x3288c8(0x1f7)],_0x1af1cc=_0x21330e[_0x3288c8(0x201)],_0x3d9e70={};if(_0x5a61bb&&Array[_0x3288c8(0x124)](_0x5a61bb))for(const _0x3aad06 of _0x5a61bb){const _0x437448=_0x3aad06[_0x3288c8(0x8e)]('=');if(_0x437448===-0x1)return console['error']('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x3aad06),console[_0x3288c8(0x83)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x563035=_0x3aad06[_0x3288c8(0x88)](0x0,_0x437448),_0x1d4205=_0x3aad06[_0x3288c8(0x88)](_0x437448+0x1);try{_0x3d9e70[_0x563035]=JSON[_0x3288c8(0x1d1)](_0x1d4205);}catch{_0x3d9e70[_0x563035]=_0x1d4205;}}_0x21330e[_0x3288c8(0x1d4)]&&(console[_0x3288c8(0x83)]('Workflow:\x20'+_0x1117fe),Object[_0x3288c8(0xdb)](_0x3d9e70)['length']>0x0&&console[_0x3288c8(0x83)](_0x3288c8(0x17b)+JSON[_0x3288c8(0xb2)](_0x3d9e70)),_0x1af1cc&&console[_0x3288c8(0x83)](_0x3288c8(0x169)+_0x1af1cc));const _0x377139=await withSpinner(_0x3288c8(0x16d),()=>_0x489281[_0x3288c8(0x117)][_0x3288c8(0xd0)](_0x1117fe,_0x3d9e70,{'sessionTime':_0x1af1cc}),{'verbose':_0x21330e['verbose']}),_0x241082=_0x377139['data'];console['error'](_0x3288c8(0x163)),console[_0x3288c8(0x83)](_0x3288c8(0x174)+_0x241082['id']),console['error'](_0x3288c8(0x18d)+_0x241082[_0x3288c8(0xe4)]),console[_0x3288c8(0x83)]('\x20\x20Project:\x20'+_0x241082[_0x3288c8(0x164)]?.['name']),console[_0x3288c8(0x83)](_0x3288c8(0xea)+_0x241082['workflow']?.['name']);if(_0x241082[_0x3288c8(0x164)]?.['id']&&_0x241082[_0x3288c8(0xe4)]&&_0x241082['id']){const _0x40e273=_0x21330e[_0x3288c8(0x197)],_0x190443=getConsoleUrl(_0x40e273,'/app/workflows/'+_0x241082[_0x3288c8(0x164)]['id']+_0x3288c8(0x196)+_0x241082[_0x3288c8(0xe4)]+_0x3288c8(0x142)+_0x241082['id']);console[_0x3288c8(0x83)](_0x3288c8(0x187)+a55_0x3c6ccd['cyan'](_0x190443));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0xb7);['description']=a55_0x497f19(0x135);async[a55_0x497f19(0x1c1)](_0x508b6b){const _0x145ab7=a55_0x497f19,{options:_0x3adf4,args:_0x11c523,tdx:_0x4cd95e}=_0x508b6b,_0x417285=_0x11c523[0x0],_0x241f8f=_0x11c523[0x1]||'.';if(!_0x417285)return console['error'](_0x145ab7(0x1eb)),console[_0x145ab7(0x83)](_0x145ab7(0x16a)),0x1;const _0x51ee1f=_0x3adf4[_0x145ab7(0x17f)];_0x3adf4['verbose']&&(console[_0x145ab7(0x83)](_0x145ab7(0xd7)+_0x417285),console[_0x145ab7(0x83)](_0x145ab7(0xd4)+_0x241f8f),_0x51ee1f&&console[_0x145ab7(0x83)]('Revision:\x20'+_0x51ee1f));const _0x1d7e1a=await withSpinner(_0x145ab7(0xe5)+_0x417285+'...',()=>_0x4cd95e['workflow'][_0x145ab7(0x1e0)](_0x417285,_0x241f8f,{'revision':_0x51ee1f}),{'verbose':_0x3adf4[_0x145ab7(0x1d4)]}),_0x2507dd=_0x1d7e1a[_0x145ab7(0x1d5)];return console[_0x145ab7(0x83)](_0x145ab7(0x1c4)+_0x2507dd['projectName']),console[_0x145ab7(0x83)](_0x145ab7(0xd3)+_0x2507dd['revision']),console[_0x145ab7(0x83)](_0x145ab7(0x18b)+_0x2507dd[_0x145ab7(0xc3)]),console['error'](_0x145ab7(0x19d)+_0x241f8f+'/'+_0x2507dd['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x497f19(0x1ab)]='workflow:upload';[a55_0x497f19(0x1b7)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a55_0x497f19(0x1c1)](_0x106906){const _0x5e032c=a55_0x497f19,{options:_0x5893c3,args:_0x13668a,tdx:_0x3ecb96}=_0x106906;let _0x447277='.',_0x22ab32=_0x5893c3[_0x5e032c(0x1ab)];if(_0x13668a[0x0]){const {promises:_0x330595}=await import('fs');try{const _0x49b06c=await _0x330595[_0x5e032c(0xc8)](_0x13668a[0x0]);if(_0x49b06c['isDirectory']())_0x447277=_0x13668a[0x0];else return console[_0x5e032c(0x83)]('Error:\x20'+_0x13668a[0x0]+_0x5e032c(0x1ec)),0x1;}catch{_0x22ab32=_0x13668a[0x0],_0x447277='.';}}const _0x3cf673=_0x5893c3[_0x5e032c(0x17f)],_0x5b5e50=_0x5893c3[_0x5e032c(0x10d)];_0x5893c3[_0x5e032c(0x1d4)]&&(console[_0x5e032c(0x83)](_0x5e032c(0x167)+_0x447277),_0x22ab32&&console['error']('Project\x20name:\x20'+_0x22ab32),_0x3cf673&&console[_0x5e032c(0x83)]('Revision:\x20'+_0x3cf673),_0x5b5e50&&console['error'](_0x5e032c(0x182)));const _0x1292c0=await withSpinner(_0x5e032c(0x143),()=>_0x3ecb96[_0x5e032c(0x117)][_0x5e032c(0x1e5)](_0x447277,{'projectName':_0x22ab32,'revision':_0x3cf673,'skipValidation':_0x5b5e50}),{'verbose':_0x5893c3['verbose']}),_0x20ab02=_0x1292c0[_0x5e032c(0x1d5)];return console[_0x5e032c(0x83)](_0x5e032c(0x10f)+_0x20ab02[_0x5e032c(0x1cc)]),console[_0x5e032c(0x83)](_0x5e032c(0x116)+_0x20ab02[_0x5e032c(0x193)]),console[_0x5e032c(0x83)](_0x5e032c(0xd3)+_0x20ab02[_0x5e032c(0x17f)]),await this[_0x5e032c(0xe1)](_0x3ecb96,_0x20ab02[_0x5e032c(0x1cc)],_0x5893c3[_0x5e032c(0x197)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x1b3);[a55_0x497f19(0x1b7)]=a55_0x497f19(0x12f);async['execute'](_0x5ca44c){const _0x5d9b8d=a55_0x497f19,{options:_0x5ad8ca,args:_0x1bf865,tdx:_0xd91a7f}=_0x5ca44c,_0x3adfe1=_0x1bf865[0x0],_0xc5c346=_0x1bf865[0x1];if(!_0x3adfe1)return console[_0x5d9b8d(0x83)](a55_0x3c6ccd['red'](_0x5d9b8d(0x14d)),'Project\x20name\x20is\x20required'),console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0x1df)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x1c46d0=_0x5ad8ca['revision'];_0x5ad8ca[_0x5d9b8d(0x1d4)]&&(console['error'](_0x5d9b8d(0xd7)+_0x3adfe1),_0xc5c346&&console[_0x5d9b8d(0x83)]('Target\x20directory:\x20'+_0xc5c346),_0x1c46d0&&console[_0x5d9b8d(0x83)](_0x5d9b8d(0x152)+_0x1c46d0),_0x5ad8ca[_0x5d9b8d(0x15b)]&&console[_0x5d9b8d(0x83)]('Dry\x20run:\x20yes'));const _0xdd71cc=await withSpinner(_0x5d9b8d(0x1b4)+_0x3adfe1+_0x5d9b8d(0x6d),()=>_0xd91a7f['workflow'][_0x5d9b8d(0x1e6)](_0x3adfe1,{'targetDir':_0xc5c346,'revision':_0x1c46d0}),{'verbose':_0x5ad8ca[_0x5d9b8d(0x1d4)]}),_0x50586a=_0xdd71cc['data'];_0x50586a['isNewProject']?console[_0x5d9b8d(0x83)](_0x5d9b8d(0xa5)+_0x50586a[_0x5d9b8d(0x1cc)]):console['error'](_0x5d9b8d(0xc1)+_0x50586a['projectName']);console[_0x5d9b8d(0x83)](_0x5d9b8d(0xd3)+_0x50586a[_0x5d9b8d(0x17f)]),console[_0x5d9b8d(0x83)]('\x20\x20Target:\x20'+(a55_0x26cc2e[_0x5d9b8d(0x11b)](process[_0x5d9b8d(0xab)](),_0x50586a[_0x5d9b8d(0x89)])||'.')),console[_0x5d9b8d(0x83)]('\x20\x20Changes:\x20'+a55_0x3c6ccd[_0x5d9b8d(0xa3)]('+'+_0x50586a[_0x5d9b8d(0xbc)][_0x5d9b8d(0x1be)]+'\x20new')+',\x20'+(a55_0x3c6ccd[_0x5d9b8d(0x99)]('~'+_0x50586a[_0x5d9b8d(0xbc)]['modified']+'\x20modified')+',\x20')+(a55_0x3c6ccd['red']('-'+_0x50586a['summary'][_0x5d9b8d(0x10a)]+_0x5d9b8d(0x11a))+',\x20')+(''+a55_0x3c6ccd['dim'](_0x50586a[_0x5d9b8d(0xbc)]['unchanged']+_0x5d9b8d(0x6c))));for(const _0x31fb0d of _0x50586a[_0x5d9b8d(0x90)]){_0x31fb0d[_0x5d9b8d(0x70)]===_0x5d9b8d(0x1c6)&&_0x31fb0d[_0x5d9b8d(0xcb)]&&(console[_0x5d9b8d(0x83)]('\x0a'+a55_0x3c6ccd[_0x5d9b8d(0x16e)](_0x5d9b8d(0x132)+_0x31fb0d[_0x5d9b8d(0x110)])),console['error'](_0x31fb0d[_0x5d9b8d(0xcb)]));}if(!_0x50586a[_0x5d9b8d(0xed)])return saveSessionContext({'workflow_project':_0x50586a[_0x5d9b8d(0x1cc)]},_0x5ad8ca[_0x5d9b8d(0x1a2)]),console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0xa3)](_0x5d9b8d(0xaa))),console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0x1df)](_0x5d9b8d(0x18a)+_0x50586a[_0x5d9b8d(0x1cc)])),0x0;if(_0x5ad8ca[_0x5d9b8d(0x15b)])return console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0x99)](_0x5d9b8d(0x18e))),0x0;if(!_0x5ad8ca['yes']){if(!isInteractive())return console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0xa6)](_0x5d9b8d(0x208)),_0x5d9b8d(0x150)),console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0x1df)](_0x5d9b8d(0x9f))),0x1;const _0x235ef2=await confirmKey(_0x5d9b8d(0x14a));if(!_0x235ef2)return console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0x99)](_0x5d9b8d(0xc5)),_0x5d9b8d(0x77)),0x1;}await withSpinner(_0x5d9b8d(0x76),()=>_0xd91a7f[_0x5d9b8d(0x117)]['applyPullProject'](_0x50586a,{'revision':_0x1c46d0}),{'verbose':_0x5ad8ca['verbose']}),saveSessionContext({'workflow_project':_0x50586a[_0x5d9b8d(0x1cc)]},_0x5ad8ca['session']),console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0xa3)]('✔\x20Pull\x20complete'));const _0x1e0933=a55_0x26cc2e['relative'](process[_0x5d9b8d(0xab)](),_0x50586a['targetDir'])||'.';return console['error'](a55_0x3c6ccd[_0x5d9b8d(0x1df)]('\x20\x20Location:\x20'+_0x1e0933)),console[_0x5d9b8d(0x83)](a55_0x3c6ccd[_0x5d9b8d(0x1df)](_0x5d9b8d(0x18a)+_0x50586a[_0x5d9b8d(0x1cc)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x18f);['description']=a55_0x497f19(0x198);async[a55_0x497f19(0x1c1)](_0x4a9fc4){const _0x44ec1c=a55_0x497f19,{options:_0x181a71,args:_0x4de3f1,tdx:_0x50f702}=_0x4a9fc4,_0x837747=this[_0x44ec1c(0x1f2)](_0x4de3f1,_0x181a71),_0x5c96ee=_0x181a71[_0x44ec1c(0x17f)],_0x3fae50=_0x181a71[_0x44ec1c(0x10d)];_0x181a71[_0x44ec1c(0x1d4)]&&(_0x837747&&console[_0x44ec1c(0x83)](_0x44ec1c(0xe3)+_0x837747),_0x5c96ee&&console['error'](_0x44ec1c(0x152)+_0x5c96ee),_0x181a71[_0x44ec1c(0x15b)]&&console['error'](_0x44ec1c(0xc4)),_0x3fae50&&console['error'](_0x44ec1c(0x182)));let _0x328046;try{_0x328046=await withSpinner(_0x44ec1c(0x7b),()=>_0x50f702[_0x44ec1c(0x117)][_0x44ec1c(0xde)]({'sourceDir':_0x837747,'revision':_0x5c96ee,'skipValidation':_0x3fae50}),{'verbose':_0x181a71[_0x44ec1c(0x1d4)]});}catch(_0xb438e9){if(_0xb438e9 instanceof Error&&_0xb438e9[_0x44ec1c(0xf3)][_0x44ec1c(0xcf)](_0x44ec1c(0x20b)))return console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0xa6)]('Error:'),_0x44ec1c(0x1d8)),_0x181a71[_0x44ec1c(0xbf)]?console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0x1df)](_0x44ec1c(0xda)+_0x181a71[_0x44ec1c(0xbf)]+_0x44ec1c(0x1bf)+_0x181a71[_0x44ec1c(0xbf)]+'\x27')):console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0x1df)](_0x44ec1c(0xf7))),0x1;throw _0xb438e9;}const _0x251861=_0x328046[_0x44ec1c(0x1d5)];console[_0x44ec1c(0x83)](_0x44ec1c(0xc2)+_0x251861[_0x44ec1c(0x1cc)]),console[_0x44ec1c(0x83)](_0x44ec1c(0x9b)+_0x251861['sourceDir']),console[_0x44ec1c(0x83)]('\x20\x20Revision:\x20'+_0x251861[_0x44ec1c(0x17f)]),console['error']('\x20\x20Changes:\x20'+a55_0x3c6ccd[_0x44ec1c(0xa3)]('+'+_0x251861['summary'][_0x44ec1c(0x1be)]+_0x44ec1c(0x1e8))+',\x20'+(a55_0x3c6ccd[_0x44ec1c(0x99)]('~'+_0x251861['summary']['modified']+'\x20modified')+',\x20')+(a55_0x3c6ccd[_0x44ec1c(0xa6)]('-'+_0x251861[_0x44ec1c(0xbc)][_0x44ec1c(0x10a)]+_0x44ec1c(0x11a))+',\x20')+(''+a55_0x3c6ccd[_0x44ec1c(0x1df)](_0x251861['summary'][_0x44ec1c(0x8c)]+'\x20unchanged')));for(const _0x468b53 of _0x251861[_0x44ec1c(0x90)]){_0x468b53['type']===_0x44ec1c(0x1c6)&&_0x468b53[_0x44ec1c(0xcb)]&&(console[_0x44ec1c(0x83)]('\x0a'+a55_0x3c6ccd[_0x44ec1c(0x16e)]('---\x20'+_0x468b53[_0x44ec1c(0x110)])),console[_0x44ec1c(0x83)](_0x468b53[_0x44ec1c(0xcb)]));}if(!_0x251861[_0x44ec1c(0xed)])return console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0xa3)](_0x44ec1c(0x176))),await this['showWorkflowConsoleUrl'](_0x50f702,_0x251861[_0x44ec1c(0x1cc)],_0x181a71[_0x44ec1c(0x197)]),0x0;if(_0x181a71['dryRun'])return console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0x99)](_0x44ec1c(0x1d2))),0x0;if(!_0x181a71[_0x44ec1c(0x13c)]){if(!isInteractive())return console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0xa6)](_0x44ec1c(0x208)),_0x44ec1c(0x150)),console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0x1df)](_0x44ec1c(0x9f))),0x1;const _0x3800b6=await confirmKey(_0x44ec1c(0x202));if(!_0x3800b6)return console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0x99)](_0x44ec1c(0xc5)),_0x44ec1c(0x148)),0x1;}const _0x1c2ed6=await withSpinner('Pushing\x20project...',()=>_0x50f702[_0x44ec1c(0x117)][_0x44ec1c(0x86)](_0x251861),{'verbose':_0x181a71[_0x44ec1c(0x1d4)]}),_0x32e247=_0x1c2ed6['data'];return console[_0x44ec1c(0x83)](a55_0x3c6ccd[_0x44ec1c(0xa3)](_0x44ec1c(0x178))),console['error'](_0x44ec1c(0x116)+_0x32e247[_0x44ec1c(0x193)]),console['error'](_0x44ec1c(0xd3)+_0x32e247[_0x44ec1c(0x17f)]),await this[_0x44ec1c(0xe1)](_0x50f702,_0x32e247[_0x44ec1c(0x1cc)],_0x181a71['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0xbb);['description']='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a55_0x497f19(0x1c1)](_0xf246b){const _0x3b0a1b=a55_0x497f19,{options:_0x1e5eb6,args:_0x375bd6,tdx:_0x33e081}=_0xf246b,_0x164f51=this[_0x3b0a1b(0x1f2)](_0x375bd6,_0x1e5eb6),_0x223414=_0x1e5eb6[_0x3b0a1b(0x1ab)],_0x5dd562=_0x1e5eb6['revision'],_0x7ebb10=_0x1e5eb6[_0x3b0a1b(0x10d)];if(!_0x164f51)return console['error'](a55_0x3c6ccd[_0x3b0a1b(0xa6)](_0x3b0a1b(0x14d)),_0x3b0a1b(0x203)),console['error'](a55_0x3c6ccd[_0x3b0a1b(0x1df)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x3b0a1b(0x83)](a55_0x3c6ccd[_0x3b0a1b(0x1df)](_0x3b0a1b(0x16c))),0x1;if(!_0x223414)return console[_0x3b0a1b(0x83)](a55_0x3c6ccd[_0x3b0a1b(0xa6)]('Error:'),_0x3b0a1b(0x183)),console['error'](a55_0x3c6ccd['dim'](_0x3b0a1b(0x191))),0x1;_0x1e5eb6[_0x3b0a1b(0x1d4)]&&(console[_0x3b0a1b(0x83)](_0x3b0a1b(0xe3)+_0x164f51),console[_0x3b0a1b(0x83)](_0x3b0a1b(0x13e)+_0x223414),_0x5dd562&&console[_0x3b0a1b(0x83)]('Revision:\x20'+_0x5dd562),_0x1e5eb6[_0x3b0a1b(0x15b)]&&console[_0x3b0a1b(0x83)](_0x3b0a1b(0xc4)),_0x7ebb10&&console[_0x3b0a1b(0x83)](_0x3b0a1b(0x182)));const _0x420b1f=await withSpinner(_0x3b0a1b(0x15d),()=>_0x33e081[_0x3b0a1b(0x117)][_0x3b0a1b(0x1a3)](_0x164f51,_0x223414,{'revision':_0x5dd562,'skipValidation':_0x7ebb10}),{'verbose':_0x1e5eb6[_0x3b0a1b(0x1d4)]}),_0x478859=_0x420b1f[_0x3b0a1b(0x1d5)];console[_0x3b0a1b(0x83)]('Source:\x20'+_0x478859[_0x3b0a1b(0x13a)]);_0x478859[_0x3b0a1b(0x16f)]&&console[_0x3b0a1b(0x83)](_0x3b0a1b(0x162)+_0x478859[_0x3b0a1b(0x16f)]);console[_0x3b0a1b(0x83)](_0x3b0a1b(0x13e)+_0x478859[_0x3b0a1b(0x170)]),console[_0x3b0a1b(0x83)]('Revision:\x20'+_0x478859[_0x3b0a1b(0x17f)]),console[_0x3b0a1b(0x83)](_0x3b0a1b(0xa1)+_0x478859[_0x3b0a1b(0x1b1)]);_0x478859[_0x3b0a1b(0x1f8)]&&(console[_0x3b0a1b(0x83)](a55_0x3c6ccd[_0x3b0a1b(0x99)]('\x0a⚠\x20Project\x20\x22'+_0x478859[_0x3b0a1b(0x170)]+_0x3b0a1b(0x12c)+_0x478859['existingProjectId']+')')),console[_0x3b0a1b(0x83)](a55_0x3c6ccd['yellow'](_0x3b0a1b(0xef))));if(_0x1e5eb6[_0x3b0a1b(0x15b)])return console['error'](a55_0x3c6ccd['yellow'](_0x3b0a1b(0x75))),0x0;if(!_0x1e5eb6[_0x3b0a1b(0x13c)]){if(!isInteractive())return console[_0x3b0a1b(0x83)](a55_0x3c6ccd[_0x3b0a1b(0xa6)](_0x3b0a1b(0x208)),_0x3b0a1b(0x150)),console[_0x3b0a1b(0x83)](a55_0x3c6ccd['dim'](_0x3b0a1b(0x9f))),0x1;const _0x59eeb1=_0x478859['sourceProjectName']||a55_0x26cc2e[_0x3b0a1b(0x155)](_0x164f51),_0x1fb4ff=_0x478859[_0x3b0a1b(0x1f8)]?_0x3b0a1b(0x205)+_0x223414+'\x22\x20with\x20new\x20revision?':_0x3b0a1b(0x177)+_0x59eeb1+_0x3b0a1b(0x157)+_0x223414+'\x22?',_0x45f63f=await confirmKey(_0x1fb4ff);if(!_0x45f63f)return console[_0x3b0a1b(0x83)](a55_0x3c6ccd[_0x3b0a1b(0x99)](_0x3b0a1b(0xc5))),0x1;}const _0x509324=await withSpinner(_0x478859['targetExists']?'Updating\x20'+_0x223414+'...':'Cloning\x20to\x20'+_0x223414+_0x3b0a1b(0x6d),()=>_0x33e081['workflow'][_0x3b0a1b(0x8d)](_0x478859),{'verbose':_0x1e5eb6[_0x3b0a1b(0x1d4)]}),_0x44ac4e=_0x509324[_0x3b0a1b(0x1d5)];return console[_0x3b0a1b(0x83)](a55_0x3c6ccd[_0x3b0a1b(0xa3)](_0x478859[_0x3b0a1b(0x1f8)]?_0x3b0a1b(0xac):_0x3b0a1b(0x10c))),console['error']('\x20\x20Project:\x20'+_0x44ac4e[_0x3b0a1b(0x170)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x44ac4e[_0x3b0a1b(0x156)]),console[_0x3b0a1b(0x83)](_0x3b0a1b(0xd3)+_0x44ac4e['revision']),await this[_0x3b0a1b(0xe1)](_0x33e081,_0x44ac4e['newProjectName'],_0x1e5eb6[_0x3b0a1b(0x197)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x17c);[a55_0x497f19(0x1b7)]=a55_0x497f19(0x11d);async[a55_0x497f19(0x1c1)](_0x1fcf69){const _0x3d23e2=a55_0x497f19,{options:_0x31ecf3,args:_0x1cf6e3,tdx:_0x171734}=_0x1fcf69,_0x141f4a=_0x1cf6e3[0x0];if(!_0x141f4a)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x3d23e2(0x83)](_0x3d23e2(0x1e1)),0x1;_0x31ecf3[_0x3d23e2(0x1d4)]&&console['error'](_0x3d23e2(0xd7)+_0x141f4a);if(!_0x31ecf3[_0x3d23e2(0x13c)]){if(!isInteractive())return console['error'](a55_0x3c6ccd[_0x3d23e2(0xa6)]('\x0aError:'),_0x3d23e2(0x150)),console[_0x3d23e2(0x83)](a55_0x3c6ccd[_0x3d23e2(0x1df)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3235c2=await confirmKey(_0x3d23e2(0x131)+_0x141f4a+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3235c2)return console[_0x3d23e2(0x83)](a55_0x3c6ccd[_0x3d23e2(0x99)](_0x3d23e2(0xc5))),0x1;}const _0x2948a6=await withSpinner('Deleting\x20project\x20'+_0x141f4a+_0x3d23e2(0x6d),()=>_0x171734[_0x3d23e2(0x117)][_0x3d23e2(0xe0)](_0x141f4a),{'verbose':_0x31ecf3[_0x3d23e2(0x1d4)]}),_0xdfbd4d=_0x2948a6[_0x3d23e2(0x1d5)];return console[_0x3d23e2(0x83)](_0x3d23e2(0xba)+_0xdfbd4d['projectName']),console['error'](_0x3d23e2(0x116)+_0xdfbd4d[_0x3d23e2(0x193)]),0x0;}}export function parseKeyValue(_0x3a47b1){const _0x45453a=a55_0x497f19,_0x4d849d=_0x3a47b1['indexOf']('=');if(_0x4d849d===-0x1)throw new Error(_0x45453a(0x15f)+_0x3a47b1+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x3aba96=_0x3a47b1['substring'](0x0,_0x4d849d),_0x24dc83=_0x3a47b1[_0x45453a(0x88)](_0x4d849d+0x1);if(!_0x3aba96)throw new Error(_0x45453a(0x20d));return{'key':_0x3aba96,'value':_0x24dc83};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x104);[a55_0x497f19(0x1b7)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a55_0x497f19(0x1c1)](_0x5662d1){const _0x5bc1d0=a55_0x497f19,{options:_0x40ac00,args:_0x437d15,tdx:_0x1c87bf}=_0x5662d1,_0x1bef6d=this[_0x5bc1d0(0x158)](_0x437d15,_0x40ac00);if(!_0x1bef6d)return 0x1;_0x40ac00[_0x5bc1d0(0x1d4)]&&console['error'](_0x5bc1d0(0xd7)+_0x1bef6d);const _0x26e75b=await withSpinner(_0x5bc1d0(0x1e3),()=>_0x1c87bf[_0x5bc1d0(0x117)][_0x5bc1d0(0x186)](_0x1bef6d),{'verbose':_0x40ac00[_0x5bc1d0(0x1d4)]}),{secrets:_0x22f9c5}=_0x26e75b[_0x5bc1d0(0x1d5)];return console[_0x5bc1d0(0x83)]('✔\x20Found\x20'+_0x22f9c5['length']+_0x5bc1d0(0x1bb)+(_0x22f9c5['length']!==0x1?'s':'')),await handleSDKOutput(_0x22f9c5,_0x40ac00),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a55_0x497f19(0x1cd);[a55_0x497f19(0x1b7)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async[a55_0x497f19(0x1c1)](_0x23c31b){const _0x319dee=a55_0x497f19,{options:_0xc3fea3,args:_0x2d58f8,tdx:_0x3b6d20}=_0x23c31b;let _0xe359c8,_0x4b0a7a;if(_0x2d58f8['length']>=0x1&&!_0x2d58f8[0x0][_0x319dee(0xcf)]('='))_0xe359c8=_0x2d58f8[0x0],_0x4b0a7a=_0x2d58f8[_0x319dee(0x1cf)](0x1);else{if(_0x2d58f8['length']>=0x1&&_0xc3fea3[_0x319dee(0xbf)])_0xe359c8=_0xc3fea3[_0x319dee(0xbf)],_0x4b0a7a=_0x2d58f8;else return _0x2d58f8[_0x319dee(0xf4)]>=0x1?(console[_0x319dee(0x83)](_0x319dee(0x1eb)),console[_0x319dee(0x83)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x319dee(0x83)](_0x319dee(0xca)),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x4b0a7a[_0x319dee(0xf4)]===0x0)return console[_0x319dee(0x83)](_0x319dee(0xca)),console['error'](_0x319dee(0x113)),0x1;const _0x3bc71a={};try{for(const _0x1305ee of _0x4b0a7a){const {key:_0x48e946,value:_0x3f1f4d}=parseKeyValue(_0x1305ee);_0x3bc71a[_0x48e946]=_0x3f1f4d;}}catch(_0x495177){return _0x495177 instanceof Error&&console['error'](a55_0x3c6ccd[_0x319dee(0xa6)](_0x319dee(0x14d)),_0x495177[_0x319dee(0xf3)]),0x1;}const _0x2b67ef=Object['keys'](_0x3bc71a);_0xc3fea3[_0x319dee(0x1d4)]&&(console[_0x319dee(0x83)](_0x319dee(0xd7)+_0xe359c8),console['error'](_0x319dee(0x1ed)+_0x2b67ef[_0x319dee(0x80)](',\x20')));const _0x49041c=await withSpinner(_0x2b67ef[_0x319dee(0xf4)]===0x1?_0x319dee(0x105):'Setting\x20'+_0x2b67ef['length']+_0x319dee(0xb0),()=>_0x3b6d20[_0x319dee(0x117)][_0x319dee(0x207)](_0xe359c8,_0x3bc71a),{'verbose':_0xc3fea3[_0x319dee(0x1d4)]}),_0x304bce=_0x49041c[_0x319dee(0x1d5)];return console[_0x319dee(0x83)](_0x2b67ef['length']===0x1?'✔\x20Secret\x20\x27'+_0x304bce['keys'][0x0]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x304bce[_0x319dee(0x1cc)]+'\x27':'✔\x20'+_0x304bce['keys'][_0x319dee(0xf4)]+_0x319dee(0x123)+_0x304bce[_0x319dee(0x1cc)]+'\x27'),(_0xc3fea3[_0x319dee(0x1c2)]||_0xc3fea3[_0x319dee(0x1ce)])&&await handleSingleObjectOutput(_0x304bce,_0xc3fea3),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a55_0x497f19(0x1ab)]=a55_0x497f19(0x72);[a55_0x497f19(0x1b7)]=a55_0x497f19(0xb4);async[a55_0x497f19(0x1c1)](_0x428b67){const _0x401aae=a55_0x497f19,{options:_0x153831,args:_0x27369c,tdx:_0xbc3b91}=_0x428b67;let _0x3fadc2,_0x1bf07d;if(_0x27369c[_0x401aae(0xf4)]>=0x2)_0x3fadc2=_0x27369c[0x0],_0x1bf07d=_0x27369c[0x1];else{if(_0x27369c[_0x401aae(0xf4)]===0x1&&_0x153831[_0x401aae(0xbf)])_0x3fadc2=_0x153831['workflowProject'],_0x1bf07d=_0x27369c[0x0];else return _0x27369c[_0x401aae(0xf4)]===0x1?(console[_0x401aae(0x83)](_0x401aae(0x1eb)),console[_0x401aae(0x83)](_0x401aae(0x1af)),0x1):(console['error'](_0x401aae(0x168)),console[_0x401aae(0x83)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x153831[_0x401aae(0x1d4)]&&(console[_0x401aae(0x83)]('Project:\x20'+_0x3fadc2),console['error'](_0x401aae(0xd2)+_0x1bf07d));if(!_0x153831[_0x401aae(0x13c)]){if(!isInteractive())return console['error'](a55_0x3c6ccd[_0x401aae(0xa6)](_0x401aae(0x208)),_0x401aae(0x150)),console['error'](a55_0x3c6ccd[_0x401aae(0x1df)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x34b40e=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x1bf07d+_0x401aae(0xb3)+_0x3fadc2+'\x27?');if(!_0x34b40e)return console[_0x401aae(0x83)](a55_0x3c6ccd[_0x401aae(0x99)](_0x401aae(0xc5))),0x1;}const _0x40d7e1=await withSpinner('Deleting\x20secret...',()=>_0xbc3b91[_0x401aae(0x117)][_0x401aae(0x106)](_0x3fadc2,_0x1bf07d),{'verbose':_0x153831['verbose']}),_0x200df7=_0x40d7e1[_0x401aae(0x1d5)];return console[_0x401aae(0x83)](_0x401aae(0x9d)+_0x200df7[_0x401aae(0x12e)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x200df7[_0x401aae(0x1cc)]+'\x27'),(_0x153831['json']||_0x153831[_0x401aae(0x1ce)])&&await handleSingleObjectOutput(_0x200df7,_0x153831),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(_0x45ff45){const _0x348f4d=a55_0x497f19,_0x15218d=Math[_0x348f4d(0x1a9)](_0x45ff45/0x3e8),_0x114e21=Math['floor'](_0x15218d/0x3c),_0x510b01=Math[_0x348f4d(0x1a9)](_0x114e21/0x3c),_0x57e43a=Math[_0x348f4d(0x1a9)](_0x510b01/0x18);if(_0x57e43a>0x0){const _0x12f7ef=_0x510b01%0x18;return _0x12f7ef>0x0?_0x57e43a+'d\x20'+_0x12f7ef+'h':_0x57e43a+'d';}else{if(_0x510b01>0x0){const _0x5c5049=_0x114e21%0x3c;return _0x5c5049>0x0?_0x510b01+'h\x20'+_0x5c5049+'m':_0x510b01+'h';}else{if(_0x114e21>0x0){const _0xce1775=_0x15218d%0x3c;return _0xce1775>0x0?_0x114e21+'m\x20'+_0xce1775+'s':_0x114e21+'m';}else return _0x15218d+'s';}}}function formatTimestamp(_0x59e139,_0x19991d){const _0x3ed2f7=a55_0x497f19,_0x2185ae=new Date(_0x59e139),_0x37de6f=String(_0x2185ae[_0x3ed2f7(0x87)]())[_0x3ed2f7(0x1d6)](0x2,'0'),_0x47a603=String(_0x2185ae[_0x3ed2f7(0x171)]())['padStart'](0x2,'0'),_0x20cc81=_0x37de6f+':'+_0x47a603,_0x46b501=_0x2185ae[_0x3ed2f7(0x79)]()===_0x19991d[_0x3ed2f7(0x79)]()&&_0x2185ae[_0x3ed2f7(0x165)]()===_0x19991d['getMonth']()&&_0x2185ae['getDate']()===_0x19991d[_0x3ed2f7(0x1b8)]();if(_0x46b501)return _0x20cc81;else{const _0x46864d=String(_0x2185ae['getMonth']()+0x1)['padStart'](0x2,'0'),_0x16df52=String(_0x2185ae[_0x3ed2f7(0x1b8)]())[_0x3ed2f7(0x1d6)](0x2,'0');return _0x46864d+'-'+_0x16df52+'\x20'+_0x20cc81;}}function formatDate(_0x502445){const _0xe365c5=a55_0x497f19,_0x13caaf=_0x502445[_0xe365c5(0x79)](),_0x2cebe7=String(_0x502445[_0xe365c5(0x165)]()+0x1)[_0xe365c5(0x1d6)](0x2,'0'),_0x57ba9c=String(_0x502445[_0xe365c5(0x1b8)]())['padStart'](0x2,'0');return _0x13caaf+'-'+_0x2cebe7+'-'+_0x57ba9c;}function getTaskStateIcon(_0x36f77f){const _0x5bd886={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x5bd886[_0x36f77f]||'⚪';}function getBarChar(_0x117d50){const _0x5e2335=a55_0x497f19;return _0x117d50==='error'||_0x117d50===_0x5e2335(0x1ac)?'×':'─';}function getBarColor(_0x570de9){const _0x1c90bc=a55_0x497f19,_0x107579={'success':a55_0x3c6ccd[_0x1c90bc(0xa3)],'error':a55_0x3c6ccd[_0x1c90bc(0xa6)],'group_error':a55_0x3c6ccd[_0x1c90bc(0xa6)],'running':a55_0x3c6ccd[_0x1c90bc(0x1db)],'blocked':a55_0x3c6ccd[_0x1c90bc(0x99)],'planned':a55_0x3c6ccd[_0x1c90bc(0x1df)],'canceling':a55_0x3c6ccd[_0x1c90bc(0x99)]};return _0x107579[_0x570de9]||a55_0x3c6ccd[_0x1c90bc(0xdd)];}function parseTaskName(_0x2cec21){const _0x14d897=a55_0x497f19;let _0x4c22fd=_0x2cec21['replace'](/^\++/,'');const _0x498d60=_0x4c22fd['split']('+'),_0x5e1217=_0x498d60['length']>0x1?_0x498d60[_0x14d897(0xf4)]-0x2:0x0,_0x193a06=_0x498d60[_0x498d60[_0x14d897(0xf4)]-0x1]||_0x4c22fd;return{'level':_0x5e1217,'name':'+'+_0x193a06};}function truncateTaskName(_0x1abd44,_0x26de9c){const _0x1b7fcb=a55_0x497f19,_0x39b7ed=stringWidth(_0x1abd44);if(_0x39b7ed<=_0x26de9c)return _0x1abd44;let _0x23e0ea=_0x1abd44;while(stringWidth(_0x23e0ea+'…')>_0x26de9c&&_0x23e0ea[_0x1b7fcb(0xf4)]>0x0){_0x23e0ea=_0x23e0ea[_0x1b7fcb(0x1cf)](0x0,-0x1);}return _0x23e0ea+'…';}function calculateTimeScale(_0x31c89e,_0x242d85){const _0x13dae6=a55_0x497f19;return{'startTime':_0x31c89e[_0x13dae6(0x18c)],'endTime':_0x31c89e[_0x13dae6(0x159)],'durationMs':_0x31c89e[_0x13dae6(0xee)],'msPerChar':_0x31c89e['duration']/_0x242d85};}function timeToPosition(_0x3d2b10,_0x1e1af7,_0x290dff){const _0x8de146=a55_0x497f19,_0x93f4d2=_0x3d2b10-_0x1e1af7['startTime'],_0x3aee8e=Math['floor'](_0x93f4d2/_0x1e1af7[_0x8de146(0xc9)]);return Math[_0x8de146(0xa2)](0x0,Math[_0x8de146(0x94)](_0x3aee8e,_0x290dff));}function renderTimeAxis(_0x3fdd58,_0x494397){const _0x16fb7a=a55_0x497f19,_0x2ef588=Math[_0x16fb7a(0x94)](TIMELINE_CONFIG[_0x16fb7a(0x82)],Math[_0x16fb7a(0xa2)](TIMELINE_CONFIG[_0x16fb7a(0xf8)],Math['floor'](_0x494397/TIMELINE_CONFIG[_0x16fb7a(0x11f)]))),_0x56d35b=_0x3fdd58['durationMs']/(_0x2ef588-0x1),_0x4df57d=new Date(_0x3fdd58[_0x16fb7a(0x15e)]),_0x530729=[];for(let _0x425d9a=0x0;_0x425d9a<_0x2ef588;_0x425d9a++){const _0x32bd2e=_0x3fdd58['startTime']+_0x425d9a*_0x56d35b,_0x295bb8=timeToPosition(_0x32bd2e,_0x3fdd58,_0x494397),_0x5471e8=formatTimestamp(_0x32bd2e,_0x4df57d);_0x530729['push']({'pos':_0x295bb8,'text':_0x5471e8});}const _0xb82773=new Array(_0x494397)[_0x16fb7a(0xd1)]('\x20');let _0x21f423=-0x1;for(const {pos:_0x50e6f4,text:_0x67cf8e}of _0x530729){let _0x3bd9b7=Math['max'](0x0,_0x50e6f4-Math['floor'](_0x67cf8e[_0x16fb7a(0xf4)]/0x2));_0x3bd9b7<=_0x21f423+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x3bd9b7=_0x21f423+TIMELINE_CONFIG[_0x16fb7a(0x1fe)]+0x1);_0x3bd9b7+_0x67cf8e[_0x16fb7a(0xf4)]>_0x494397&&(_0x3bd9b7=_0x494397-_0x67cf8e['length']);if(_0x3bd9b7>=0x0&&_0x3bd9b7+_0x67cf8e[_0x16fb7a(0xf4)]<=_0x494397&&_0x3bd9b7>_0x21f423){for(let _0x2c1508=0x0;_0x2c1508<_0x67cf8e[_0x16fb7a(0xf4)];_0x2c1508++){_0xb82773[_0x3bd9b7+_0x2c1508]=_0x67cf8e[_0x2c1508];}_0x21f423=_0x3bd9b7+_0x67cf8e[_0x16fb7a(0xf4)]-0x1;}}return _0xb82773['join']('');}function renderTaskRow(_0x195d5a,_0x524391,_0x3936fd,_0x45f856){const _0x46c72e=a55_0x497f19,{level:_0x288278,name:_0x1fcc5f}=parseTaskName(_0x195d5a[_0x46c72e(0x1ab)]),_0x461698='\x20'[_0x46c72e(0xaf)](_0x288278),_0x7b053a=_0x195d5a[_0x46c72e(0x84)]?'('+formatElapsed(_0x195d5a['window'][_0x46c72e(0xee)])+')':'',_0x53d1df=stringWidth(_0x7b053a),_0x81a5cf=_0x288278*0x1,_0x3400cd=_0x45f856-_0x81a5cf-_0x53d1df-0x1,_0x37b6c9=truncateTaskName(_0x1fcc5f,_0x3400cd),_0x4d2098=_0x461698+_0x37b6c9,_0xf9d17f=stringWidth(_0x4d2098),_0x22b400=_0x45f856-_0xf9d17f-_0x53d1df,_0x189c54=_0x4d2098+'\x20'[_0x46c72e(0xaf)](Math[_0x46c72e(0xa2)](0x1,_0x22b400))+a55_0x3c6ccd[_0x46c72e(0x1df)](_0x7b053a),_0x53e01a=getTaskStateIcon(_0x195d5a['state']),_0x210ffe=new Array(_0x3936fd)[_0x46c72e(0xd1)]('\x20');if(_0x195d5a['window']){const _0x537526=timeToPosition(_0x195d5a[_0x46c72e(0x84)][_0x46c72e(0x18c)],_0x524391,_0x3936fd),_0x11065e=timeToPosition(_0x195d5a[_0x46c72e(0x84)][_0x46c72e(0x159)],_0x524391,_0x3936fd),_0x2b4dcc=getBarChar(_0x195d5a[_0x46c72e(0x160)]),_0x31c583=Math['max'](_0x537526+0x1,_0x11065e);for(let _0x19441f=_0x537526;_0x19441f<Math[_0x46c72e(0x94)](_0x31c583,_0x3936fd);_0x19441f++){_0x210ffe[_0x19441f]=_0x2b4dcc;}}const _0x1d55f4=getBarColor(_0x195d5a['state']),_0x134dcc=_0x210ffe[_0x46c72e(0x127)](_0xb29b1e=>_0xb29b1e==='\x20'?'\x20':_0x1d55f4(_0xb29b1e))[_0x46c72e(0x80)]('');return _0x53e01a+'\x20'+_0x189c54+'│'+_0x134dcc+'│';}function calculateStats(_0x4bbbaf){const _0x1e22ae=a55_0x497f19,_0x2a424e={'total':_0x4bbbaf[_0x1e22ae(0xf4)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3211eb of _0x4bbbaf){if(_0x3211eb[_0x1e22ae(0x160)]==='success')_0x2a424e[_0x1e22ae(0x1fa)]++;else{if(_0x3211eb['state']==='error'||_0x3211eb[_0x1e22ae(0x160)]===_0x1e22ae(0x1ac))_0x2a424e[_0x1e22ae(0x83)]++;else _0x3211eb[_0x1e22ae(0x160)]==='running'?_0x2a424e[_0x1e22ae(0xe2)]++:_0x2a424e[_0x1e22ae(0xf1)]++;}}return _0x2a424e;}function formatStats(_0x15975c){const _0x1e659c=a55_0x497f19;return['Total:\x20'+_0x15975c[_0x1e659c(0x189)],'✅\x20'+_0x15975c[_0x1e659c(0x1fa)],'❌\x20'+_0x15975c[_0x1e659c(0x83)],_0x1e659c(0x181)+_0x15975c[_0x1e659c(0xe2)],'⏳\x20'+_0x15975c[_0x1e659c(0xf1)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a55_0x497f19(0x1a7);['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a55_0x497f19(0x1c1)](_0x3cf8b0){const _0x5518fe=a55_0x497f19,{options:_0x4f4b65,args:_0x30be4f,tdx:_0x2008df}=_0x3cf8b0;let _0x511a5e,_0x123306,_0x2cf9fa=![];if(_0x30be4f[0x0]){if(_0x30be4f[0x0]['includes']('.')){const _0x152c99=this[_0x5518fe(0x1c9)](_0x30be4f,_0x4f4b65);if(!_0x152c99)return 0x1;_0x511a5e=_0x152c99['projectName'],_0x123306=_0x152c99[_0x5518fe(0xa0)];}else{_0x123306=_0x30be4f[0x0],_0x511a5e=_0x4f4b65[_0x5518fe(0xbf)];if(!_0x511a5e)return console['error'](a55_0x3c6ccd[_0x5518fe(0xa6)](_0x5518fe(0x14d)),_0x5518fe(0x149)),0x1;_0x2cf9fa=!![];}}else{const _0x22603f=this[_0x5518fe(0x1c9)](_0x30be4f,_0x4f4b65);if(!_0x22603f)return 0x1;_0x511a5e=_0x22603f[_0x5518fe(0x1cc)],_0x123306=_0x22603f[_0x5518fe(0xa0)];}if(_0x4f4b65[_0x5518fe(0x1d4)]){if(_0x511a5e&&_0x123306)console[_0x5518fe(0x83)](_0x5518fe(0xa7)+_0x511a5e+'.'+_0x123306);else _0x511a5e&&console[_0x5518fe(0x83)]('Filter:\x20project='+_0x511a5e);}const _0x6a15da=_0x4f4b65['attemptId'],_0x5e30b0=_0x4f4b65[_0x5518fe(0xe4)];if(_0x6a15da){_0x5e30b0&&console[_0x5518fe(0x83)](a55_0x3c6ccd[_0x5518fe(0x99)](_0x5518fe(0x175)),_0x5518fe(0xd5));const _0x498c5e=_0x4f4b65[_0x5518fe(0x1c5)];return _0x498c5e?await this[_0x5518fe(0xc6)](_0x3cf8b0,_0x6a15da):await this[_0x5518fe(0x173)](_0x3cf8b0,_0x6a15da,_0x4f4b65),0x0;}if(_0x5e30b0){const _0x2a6d18=await withSpinner(_0x5518fe(0x91),()=>_0x2008df[_0x5518fe(0x117)]['sessions']({'projectName':_0x511a5e,'workflowName':_0x123306,'limit':0x64}),{'verbose':_0x4f4b65[_0x5518fe(0x1d4)]}),_0x5b1116=_0x2a6d18['data'][_0x5518fe(0xfd)](_0x30b683=>_0x30b683['id']===_0x5e30b0);if(!_0x5b1116)return console[_0x5518fe(0x83)](a55_0x3c6ccd[_0x5518fe(0xa6)]('Error:'),_0x5518fe(0x1a4)+_0x5e30b0),0x1;if(!_0x5b1116[_0x5518fe(0x1ee)]?.['id'])return console[_0x5518fe(0x83)](a55_0x3c6ccd['red'](_0x5518fe(0x14d)),'Session\x20'+_0x5e30b0+_0x5518fe(0xf6)),0x1;const _0x5eb2f5=_0x5b1116[_0x5518fe(0x1ee)]['id'];_0x4f4b65[_0x5518fe(0x1d4)]&&console[_0x5518fe(0x83)](_0x5518fe(0x15a)+_0x5eb2f5+_0x5518fe(0x20a)+_0x5e30b0);const _0x35d7e1=_0x4f4b65['follow'];return _0x35d7e1?await this[_0x5518fe(0xc6)](_0x3cf8b0,_0x5eb2f5):await this[_0x5518fe(0x173)](_0x3cf8b0,_0x5eb2f5,_0x4f4b65),0x0;}const _0x49fd08=await withSpinner('Loading\x20sessions...',()=>_0x2008df[_0x5518fe(0x117)]['sessions']({'projectName':_0x511a5e,'workflowName':_0x123306,'limit':_0x4f4b65[_0x5518fe(0xff)]||0x32}),{'verbose':_0x4f4b65[_0x5518fe(0x1d4)]}),_0x303d9b=_0x49fd08[_0x5518fe(0x1d5)];if(_0x303d9b[_0x5518fe(0xf4)]===0x0){if(_0x511a5e&&_0x123306)console[_0x5518fe(0x83)]('No\x20sessions\x20found\x20for:\x20'+_0x511a5e+'.'+_0x123306);else _0x511a5e?console[_0x5518fe(0x83)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x511a5e):(console[_0x5518fe(0x83)]('No\x20workflow\x20sessions\x20found'),console[_0x5518fe(0x83)](a55_0x3c6ccd[_0x5518fe(0x1df)](_0x5518fe(0x1d0))));return 0x0;}_0x303d9b[_0x5518fe(0xe8)]((_0x293d47,_0x13d195)=>{const _0x222521=_0x5518fe,_0x292650=_0x293d47[_0x222521(0x201)]||'',_0x55a734=_0x13d195[_0x222521(0x201)]||'';return _0x55a734[_0x222521(0x1fb)](_0x292650);});if(_0x4f4b65['json']||_0x4f4b65[_0x5518fe(0x1ce)])return await handleSDKOutput(_0x303d9b,_0x4f4b65),0x0;let _0x1ae41a;if(_0x2cf9fa){const _0x21783a=_0x303d9b[0x0];if(!_0x21783a[_0x5518fe(0x1ee)]?.['id'])return console[_0x5518fe(0x83)](_0x5518fe(0x73)),0x0;_0x1ae41a=_0x21783a[_0x5518fe(0x1ee)]['id'],_0x4f4b65[_0x5518fe(0x1d4)]&&console[_0x5518fe(0x83)](_0x5518fe(0x107)+_0x21783a['sessionTime']);}else{const _0x31b983=_0x303d9b[_0x5518fe(0x127)](_0x3e676a=>{const _0xd8e708=_0x5518fe,_0x168435=getAttemptStatusDisplay(_0x3e676a['lastAttempt']);return{'title':_0x3e676a[_0xd8e708(0x164)]?.[_0xd8e708(0x1ab)]+'.'+_0x3e676a[_0xd8e708(0x117)]?.[_0xd8e708(0x1ab)]+_0xd8e708(0xad)+_0x3e676a[_0xd8e708(0x201)]+'\x20'+_0x168435[_0xd8e708(0x1b5)],'value':_0x3e676a[_0xd8e708(0x1ee)]?.['id']||'','description':_0x168435[_0xd8e708(0xcc)]};}),_0x137c7f=await a55_0x1641e4({'type':'select','name':_0x5518fe(0x1b2),'message':_0x5518fe(0xbe),'choices':_0x31b983[_0x5518fe(0xc0)](_0x2a1c56=>_0x2a1c56[_0x5518fe(0x92)]!=='')});if(!_0x137c7f[_0x5518fe(0x1b2)])return 0x0;_0x1ae41a=_0x137c7f[_0x5518fe(0x1b2)];}const _0x27b3fe=_0x4f4b65[_0x5518fe(0x1c5)];return _0x27b3fe?await this[_0x5518fe(0xc6)](_0x3cf8b0,_0x1ae41a):await this['renderSingleTimeline'](_0x3cf8b0,_0x1ae41a,_0x4f4b65),0x0;}async['renderSingleTimeline'](_0x397df9,_0x1060c1,_0x558f86){const _0x58f657=a55_0x497f19,{tdx:_0x363f56}=_0x397df9;let _0x4f7dd4,_0x2202a9;try{[_0x4f7dd4,_0x2202a9]=await Promise['all']([_0x363f56['workflow'][_0x58f657(0x78)](_0x1060c1),_0x363f56[_0x58f657(0x117)][_0x58f657(0x14b)](_0x1060c1,![])]);}catch(_0x7fd64a){console[_0x58f657(0x83)](a55_0x3c6ccd[_0x58f657(0xa6)](_0x58f657(0x93)));_0x558f86[_0x58f657(0x1d4)]&&console[_0x58f657(0x83)](_0x7fd64a);throw _0x7fd64a;}if(_0x558f86[_0x58f657(0x1c2)]||_0x558f86[_0x58f657(0x1ce)]){const _0x59682f=this[_0x58f657(0x1ba)](_0x4f7dd4,_0x2202a9);await handleSDKOutput([_0x59682f],_0x558f86);return;}const _0x5db247=_0x363f56[_0x58f657(0x188)][_0x58f657(0x197)],_0x2f5fe3=this[_0x58f657(0x19a)](_0x4f7dd4,_0x2202a9,_0x5db247);console[_0x58f657(0x114)](_0x2f5fe3);}async[a55_0x497f19(0xc6)](_0x321c62,_0x26f1c4){const _0x3a92f3=a55_0x497f19,{tdx:_0x5586a5}=_0x321c62,_0x1de36b=TIMELINE_CONFIG[_0x3a92f3(0x1c8)],_0x299459=TIMELINE_CONFIG[_0x3a92f3(0x74)];let _0x3ca19b=0x0;while(_0x3ca19b<_0x299459){process['stdout'][_0x3a92f3(0x14c)]&&process[_0x3a92f3(0x13f)][_0x3a92f3(0x121)]('\x1bc');let _0x1b0a19,_0xd50c8d;try{[_0x1b0a19,_0xd50c8d]=await Promise[_0x3a92f3(0x140)]([_0x5586a5[_0x3a92f3(0x117)]['attempt'](_0x26f1c4),_0x5586a5[_0x3a92f3(0x117)]['tasks'](_0x26f1c4,![])]);}catch(_0x4d4469){console[_0x3a92f3(0x83)](a55_0x3c6ccd[_0x3a92f3(0xa6)](_0x3a92f3(0x17a)));_0x3ca19b>0x0&&console[_0x3a92f3(0x83)](a55_0x3c6ccd[_0x3a92f3(0x1df)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x3ca19b));throw _0x4d4469;}const _0x3f96c7=_0x5586a5[_0x3a92f3(0x188)]['site'],_0x43abbd=this['renderTimeline'](_0x1b0a19,_0xd50c8d,_0x3f96c7);console[_0x3a92f3(0x114)](_0x43abbd);const _0x5742b1=_0x1b0a19[_0x3a92f3(0x6e)]&&_0xd50c8d['every'](_0x480f09=>_0x480f09[_0x3a92f3(0x160)]!==_0x3a92f3(0xe2)&&_0x480f09[_0x3a92f3(0x160)]!==_0x3a92f3(0x10b));if(_0x5742b1){console['error'](a55_0x3c6ccd['green'](_0x3a92f3(0x204)));break;}console[_0x3a92f3(0x83)](a55_0x3c6ccd[_0x3a92f3(0x1df)](_0x3a92f3(0x1f9)+_0x3ca19b*0x2+_0x3a92f3(0x1c3))),await new Promise(_0x3371d3=>setTimeout(_0x3371d3,_0x1de36b)),_0x3ca19b++;}_0x3ca19b>=_0x299459&&console[_0x3a92f3(0x83)](a55_0x3c6ccd[_0x3a92f3(0x99)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a55_0x497f19(0x19a)](_0x3e951b,_0x57d020,_0x5e1534){const _0x59b0b0=a55_0x497f19,_0x58ae1f=[],_0x17d06f=TIMELINE_CONFIG[_0x59b0b0(0x71)],_0x4c3cde=0x5,_0x378b44=process[_0x59b0b0(0x13f)][_0x59b0b0(0x7f)]||0x78,_0x4ce87a=_0x378b44-_0x17d06f-_0x4c3cde,_0xa5dd2b=Math[_0x59b0b0(0xa2)](TIMELINE_CONFIG[_0x59b0b0(0x200)],Math[_0x59b0b0(0x94)](_0x4ce87a,TIMELINE_CONFIG[_0x59b0b0(0xae)])),_0x2565a4=new Date(_0x3e951b[_0x59b0b0(0x10e)])[_0x59b0b0(0x1fc)](),_0xb2acee=_0x3e951b['finishedAt']?new Date(_0x3e951b[_0x59b0b0(0x1bd)])['getTime']():Date['now'](),_0x509ac4={'start':_0x2565a4,'end':_0xb2acee,'duration':_0xb2acee-_0x2565a4},_0x314f62=new Map(),_0x49d2a6=[];for(const _0x258897 of _0x57d020){if(_0x258897['startedAt']){const _0x4f2352=new Date(_0x258897['startedAt'])[_0x59b0b0(0x1fc)](),_0x5b584c=_0x258897['updatedAt']?new Date(_0x258897['updatedAt'])['getTime']():Date[_0x59b0b0(0x1dc)](),_0x4bbc74={'start':_0x4f2352,'end':_0x5b584c,'duration':_0x5b584c-_0x4f2352};_0x314f62[_0x59b0b0(0x95)](_0x258897['id'],_0x4bbc74),_0x49d2a6[_0x59b0b0(0x1e5)]({'name':_0x258897[_0x59b0b0(0x1dd)],'state':_0x258897[_0x59b0b0(0x160)]||_0x59b0b0(0xf2),'window':_0x4bbc74});}else _0x49d2a6['push']({'name':_0x258897['fullName'],'state':_0x258897['state']||'planned','window':undefined});}_0x49d2a6[_0x59b0b0(0xe8)]((_0xdba03d,_0x5eee14)=>{const _0x480ba9=_0x59b0b0;if(!_0xdba03d[_0x480ba9(0x84)])return 0x1;if(!_0x5eee14[_0x480ba9(0x84)])return-0x1;return _0xdba03d[_0x480ba9(0x84)]['start']-_0x5eee14[_0x480ba9(0x84)][_0x480ba9(0x18c)];});const _0x47b888=_0x49d2a6['length'],_0x332dc4=_0x47b888>TIMELINE_CONFIG[_0x59b0b0(0x126)];_0x332dc4&&_0x49d2a6[_0x59b0b0(0x19e)](TIMELINE_CONFIG[_0x59b0b0(0x126)]);const _0x3585bb=calculateTimeScale(_0x509ac4,_0xa5dd2b),_0x4090eb=_0x3e951b[_0x59b0b0(0x6e)]?_0x3e951b['success']?a55_0x3c6ccd[_0x59b0b0(0xa3)](_0x59b0b0(0x1fa)):a55_0x3c6ccd[_0x59b0b0(0xa6)](_0x59b0b0(0x83)):a55_0x3c6ccd[_0x59b0b0(0x1db)](_0x59b0b0(0xe2)),_0x2add03=_0x3e951b[_0x59b0b0(0x164)]?.['id'],_0x4eca1d=_0x3e951b['sessionId'];let _0x3e0a6d;if(_0x2add03&&_0x4eca1d){const _0xf9190=getWorkflowAttemptUrl(_0x5e1534,_0x2add03,_0x4eca1d,_0x3e951b['id']);_0x3e0a6d=hyperlink(a55_0x3c6ccd['dim'](_0x3e951b['id']),_0xf9190);}else _0x3e0a6d=a55_0x3c6ccd[_0x59b0b0(0x1df)](_0x3e951b['id']);_0x58ae1f['push']('Attempt:\x20'+_0x3e0a6d+_0x59b0b0(0xad)+_0x4090eb+_0x59b0b0(0xad)+formatElapsed(_0x509ac4[_0x59b0b0(0xee)]));if(_0x49d2a6[_0x59b0b0(0xf4)]>0x0){const _0x5cac11=renderTimeAxis(_0x3585bb,_0xa5dd2b),_0x418e5f=new Date(_0x509ac4[_0x59b0b0(0x18c)]),_0x479595=formatDate(_0x418e5f),_0x20af46=TIMELINE_CONFIG[_0x59b0b0(0x108)]+TIMELINE_CONFIG[_0x59b0b0(0x1a1)]+_0x17d06f,_0x1a69a5=_0x479595[_0x59b0b0(0x1d6)](_0x20af46),_0x3a60ab=a55_0x3c6ccd[_0x59b0b0(0x1df)](_0x1a69a5);_0x58ae1f[_0x59b0b0(0x1e5)](_0x3a60ab+'\x20'+_0x5cac11);for(const _0x174c07 of _0x49d2a6){_0x58ae1f[_0x59b0b0(0x1e5)](renderTaskRow(_0x174c07,_0x3585bb,_0xa5dd2b,_0x17d06f));}const _0x2a246d=calculateStats(_0x49d2a6);_0x58ae1f[_0x59b0b0(0x1e5)](formatStats(_0x2a246d)),_0x332dc4&&_0x58ae1f[_0x59b0b0(0x1e5)](a55_0x3c6ccd[_0x59b0b0(0x99)](_0x59b0b0(0x7a)+TIMELINE_CONFIG[_0x59b0b0(0x126)]+'\x20of\x20'+_0x47b888+_0x59b0b0(0x139))),_0x58ae1f['push'](''),_0x58ae1f[_0x59b0b0(0x1e5)](a55_0x3c6ccd[_0x59b0b0(0x1df)](_0x59b0b0(0x185))+('tdx\x20wf\x20attempt\x20'+_0x3e951b['id']+_0x59b0b0(0x184))+a55_0x3c6ccd['dim'](_0x59b0b0(0x7d)));}else _0x58ae1f[_0x59b0b0(0x1e5)](_0x59b0b0(0x100));return _0x58ae1f[_0x59b0b0(0x80)]('\x0a');}['buildTimelineData'](_0x1dc32e,_0x12aa3a){const _0x57ecc8=a55_0x497f19,_0x53e8c2=new Date(_0x1dc32e['createdAt'])[_0x57ecc8(0x1fc)](),_0x214cfa=_0x1dc32e[_0x57ecc8(0x1bd)]?new Date(_0x1dc32e[_0x57ecc8(0x1bd)])[_0x57ecc8(0x1fc)]():Date[_0x57ecc8(0x1dc)](),_0x5727fd=_0x214cfa-_0x53e8c2,_0x56d0b6=[];for(const _0x92ed96 of _0x12aa3a){if(_0x92ed96['startedAt']){const _0x489662=new Date(_0x92ed96['startedAt'])[_0x57ecc8(0x1fc)](),_0x1c053a=_0x92ed96[_0x57ecc8(0x8b)]?new Date(_0x92ed96[_0x57ecc8(0x8b)])['getTime']():Date[_0x57ecc8(0x1dc)]();_0x56d0b6['push']({'name':_0x92ed96['fullName'],'state':_0x92ed96['state']||_0x57ecc8(0xf2),'window':{'start':_0x489662,'end':_0x1c053a,'duration':_0x1c053a-_0x489662}});}else _0x56d0b6['push']({'name':_0x92ed96['fullName'],'state':_0x92ed96['state']||_0x57ecc8(0x10b),'window':undefined});}const _0x5d8457=calculateStats(_0x56d0b6);return{'attempt':{'id':_0x1dc32e['id'],'status':_0x1dc32e[_0x57ecc8(0x6e)]?_0x1dc32e[_0x57ecc8(0x1fa)]?'success':_0x57ecc8(0x83):'running','createdAt':_0x1dc32e['createdAt'],'finishedAt':_0x1dc32e['finishedAt'],'duration_ms':_0x5727fd},'tasks':_0x56d0b6[_0x57ecc8(0x127)](_0x196feb=>({'name':_0x196feb[_0x57ecc8(0x1ab)],'state':_0x196feb[_0x57ecc8(0x160)],'startedAt':_0x196feb[_0x57ecc8(0x84)]?new Date(_0x196feb['window']['start'])['toISOString']():null,'updatedAt':_0x196feb[_0x57ecc8(0x84)]?new Date(_0x196feb['window'][_0x57ecc8(0x159)])['toISOString']():null,'duration_ms':_0x196feb['window']?.['duration']||null})),'stats':_0x5d8457};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x529cc3,_0x5017bc){const _0x2af1a6=a56_0x17f7,_0x59b1c9=_0x529cc3();while(!![]){try{const _0x3ba647=parseInt(_0x2af1a6(0x13f))/0x1*(parseInt(_0x2af1a6(0x138))/0x2)+parseInt(_0x2af1a6(0x13e))/0x3+-parseInt(_0x2af1a6(0x144))/0x4+parseInt(_0x2af1a6(0x135))/0x5+-parseInt(_0x2af1a6(0x141))/0x6+parseInt(_0x2af1a6(0x145))/0x7*(-parseInt(_0x2af1a6(0x137))/0x8)+-parseInt(_0x2af1a6(0x143))/0x9*(-parseInt(_0x2af1a6(0x147))/0xa);if(_0x3ba647===_0x5017bc)break;else _0x59b1c9['push'](_0x59b1c9['shift']());}catch(_0x22215e){_0x59b1c9['push'](_0x59b1c9['shift']());}}}(a56_0x31fd,0x8f0ec));function a56_0x17f7(_0x31d81d,_0x3cac88){_0x31d81d=_0x31d81d-0x134;const _0x31fd53=a56_0x31fd();let _0x17f7c1=_0x31fd53[_0x31d81d];return _0x17f7c1;}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a56_0x31fd(){const _0x3474eb=['tdx','2248qsDGoJ','4hPXGqH','X-Trino-User','entries','length','tdx/','version','3255045mvDVMl','398401GPvIrV','Authorization','4393752ODbBlu','TD1\x20','3186TPRSQO','2561568TACWbD','22043hOYyof',';\x20node/','5800KTkGSe','Bearer\x20','3781900gPDCrO'];a56_0x31fd=function(){return _0x3474eb;};return a56_0x31fd();}export function getUserAgent(){const _0xbf6e09=a56_0x17f7,_0x184102=getVersion(),_0x4ad634=platform(),_0x1006f9=process[_0xbf6e09(0x13d)]['replace']('v','');return _0xbf6e09(0x13c)+_0x184102+'\x20('+_0x4ad634+_0xbf6e09(0x146)+_0x1006f9+')';}export function getAuthHeaders(_0x323f7e,_0x2ed530,_0xc12e51){const _0x1c5feb=a56_0x17f7,_0x52fa4f=getVersion(),_0x4a4647={'User-Agent':getUserAgent(),'X-TD-Client':_0x1c5feb(0x136),'X-TD-Client-Version':_0x52fa4f};if(_0xc12e51)_0x4a4647[_0x1c5feb(0x140)]=_0x1c5feb(0x134)+_0xc12e51;else _0x2ed530&&(_0x4a4647[_0x1c5feb(0x140)]=_0x1c5feb(0x142)+_0x2ed530);return _0x4a4647;}export function toHeaderRecord(_0x2175f9){const _0x39a256=a56_0x17f7,_0x420fd7={};for(const [_0x8a68d7,_0x13032d]of Object[_0x39a256(0x13a)](_0x2175f9)){_0x13032d!==undefined&&(_0x420fd7[_0x8a68d7]=_0x13032d);}return _0x420fd7;}export function getTrinoHeaders(_0x16d0d7,_0x1d6a2c,_0x45b7c2){const _0x576a62=a56_0x17f7,_0x2e4394=getAuthHeaders(_0x16d0d7),_0x27cdfe=toHeaderRecord(_0x2e4394);if(_0x45b7c2)_0x27cdfe[_0x576a62(0x140)]=_0x576a62(0x134)+_0x45b7c2;else _0x1d6a2c&&(_0x27cdfe[_0x576a62(0x139)]=_0x1d6a2c);return _0x27cdfe;}export function hasAPIKey(_0x21210e){const _0x3ecf99=a56_0x17f7,_0x2389ed=getAPIKey();return _0x2389ed!==undefined&&_0x2389ed[_0x3ecf99(0x13b)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x15224e,_0x144cd5){const _0x442df7=a57_0x1312,_0x5d1097=_0x15224e();while(!![]){try{const _0x27be25=parseInt(_0x442df7(0x1b6))/0x1*(parseInt(_0x442df7(0x1b4))/0x2)+parseInt(_0x442df7(0x1b8))/0x3+parseInt(_0x442df7(0x1b9))/0x4+parseInt(_0x442df7(0x1ae))/0x5+parseInt(_0x442df7(0x1c7))/0x6+parseInt(_0x442df7(0x1ac))/0x7*(parseInt(_0x442df7(0x1d9))/0x8)+parseInt(_0x442df7(0x1bc))/0x9*(-parseInt(_0x442df7(0x1bd))/0xa);if(_0x27be25===_0x144cd5)break;else _0x5d1097['push'](_0x5d1097['shift']());}catch(_0x11f3bd){_0x5d1097['push'](_0x5d1097['shift']());}}}(a57_0x5512,0x7c2a4));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 a57_0x2b6a7b from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x2bb05b){const _0x2e3e90=a57_0x1312;return _0x2bb05b['format']==='json'||_0x2bb05b[_0x2e3e90(0x1ba)]===_0x2e3e90(0x1d0)||_0x2bb05b[_0x2e3e90(0x1ba)]===_0x2e3e90(0x1c1)||_0x2bb05b[_0x2e3e90(0x1ba)]===_0x2e3e90(0x198)||_0x2bb05b[_0x2e3e90(0x1ca)]===!![]||_0x2bb05b[_0x2e3e90(0x1d0)]===!![]||_0x2bb05b[_0x2e3e90(0x1c1)]===!![]||_0x2bb05b[_0x2e3e90(0x198)]===!![];}export function parseOutputOptions(_0x36e22c){const _0x4d59bb=a57_0x1312;return{'format':_0x36e22c[_0x4d59bb(0x1ba)]||'table','output':_0x36e22c[_0x4d59bb(0x1cd)]||'','limit':_0x36e22c[_0x4d59bb(0x1c0)],'limitStructuredFormats':_0x36e22c['limitStructuredFormats'],'color':_0x36e22c[_0x4d59bb(0x196)],'noColor':_0x36e22c[_0x4d59bb(0x1bb)]};}function convertSDKResultToQueryResult(_0x2ba486){const _0x1696c7=a57_0x1312,_0x4d385b=[];if(_0x2ba486[_0x1696c7(0x1bf)]>0x0){const _0x88d148=_0x2ba486[0x0];for(const [_0x2e96ac,_0x4ec50e]of Object['entries'](_0x88d148)){let _0x507690=_0x1696c7(0x1a2);if(typeof _0x4ec50e===_0x1696c7(0x1b0))_0x507690=Number[_0x1696c7(0x19c)](_0x4ec50e)?_0x1696c7(0x1b1):'double';else{if(typeof _0x4ec50e===_0x1696c7(0x1d3))_0x507690=_0x1696c7(0x1d3);else _0x4ec50e===null&&(_0x507690=_0x1696c7(0x1a2));}_0x4d385b['push']({'name':_0x2e96ac,'type':_0x507690});}}return{'queryId':'sdk-result','columns':_0x4d385b,'data':_0x2ba486,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x2ba486['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x4dd038,_0x13edf9){const _0x4e358c=convertSDKResultToQueryResult(_0x4dd038);return formatQueryOutput(_0x4e358c,_0x13edf9);}export async function formatQueryOutput(_0x350df1,_0x1693e4){const _0x3c9f46=a57_0x1312,{format:_0x11fc4a,limit:_0x64705a,output:_0x36b012,color:_0x3cb631,noColor:_0x471f48,limitStructuredFormats:_0x540499}=_0x1693e4,_0x4f0eac=Boolean(_0x36b012)&&!_0x3cb631,_0x335913={'color':_0x3cb631,'noColor':_0x471f48||_0x4f0eac};if(_0x11fc4a===_0x3c9f46(0x198)){const _0x399545=shouldUseLess(_0x11fc4a,_0x36b012);return formatAsTable(_0x350df1,_0x64705a,_0x399545,_0x335913);}const _0x12ffb6=_0x540499&&Number['isFinite'](_0x64705a)&&_0x350df1[_0x3c9f46(0x1b7)][_0x3c9f46(0x1bf)]>_0x64705a?{..._0x350df1,'data':_0x350df1[_0x3c9f46(0x1b7)][_0x3c9f46(0x1ce)](0x0,_0x64705a)}:_0x350df1;if(_0x11fc4a===_0x3c9f46(0x1ca))return formatAsJSON(_0x12ffb6,_0x335913);else return _0x11fc4a==='jsonl'?formatAsJSONL(_0x12ffb6,_0x335913):formatQueryResult(_0x12ffb6,_0x11fc4a);}function shouldUseLess(_0x1416b1,_0xf9f4d8){const _0x18568c=a57_0x1312;return(_0x1416b1===_0x18568c(0x198)||_0x1416b1===_0x18568c(0x1c5))&&process[_0x18568c(0x1a7)][_0x18568c(0x1a8)]&&!_0xf9f4d8;}export function resolveOutputOptions(_0x2b2b39){const _0x255a1b=a57_0x1312,_0x5e035d=_0x2b2b39['output']||'',_0x12cfc3=resolveOutputFormat(_0x2b2b39[_0x255a1b(0x1ba)],_0x5e035d,_0x255a1b(0x198));let _0x41aca1=typeof _0x2b2b39[_0x255a1b(0x1c0)]===_0x255a1b(0x1b0)?_0x2b2b39[_0x255a1b(0x1c0)]:parseInt(_0x2b2b39['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x2b2b39['limit']===undefined&&shouldUseLess(_0x12cfc3,_0x5e035d)&&(_0x41aca1=Infinity),{'format':_0x12cfc3,'output':_0x5e035d,'limit':_0x41aca1,'limitStructuredFormats':_0x2b2b39[_0x255a1b(0x1aa)],'color':_0x2b2b39['color'],'noColor':_0x2b2b39[_0x255a1b(0x1bb)]};}function a57_0x1312(_0x543d23,_0x34fac5){_0x543d23=_0x543d23-0x195;const _0x551265=a57_0x5512();let _0x131219=_0x551265[_0x543d23];return _0x131219;}function a57_0x5512(){const _0x235832=['data','979845QZwJaf','1958468wvwEUR','format','noColor','18335223afnpEX','10uwtNWC','push','length','limit','tsv','split','padEnd','string','list','debug','4477026LBRQwF','-FXRSn','keys','json','error','stderr','output','slice','inherit','jsonl','less','cmdout','boolean','cyan','spawn','No\x20data','[query]','pipe','13096KXEvUo','log','[error]','trim','end','forEach','[logs]','color','stdin','table','magenta','resolve','map','isInteger','stringify','repeat','params','─┬─','filter','varchar','[params]','bold','─┴─','red','stdout','isTTY','rule','limitStructuredFormats','[Object]','266Xkzzcf','max','866465XPPWka','query','number','bigint','write','join','1495850hdCJMc','entries','1iRMHEI'];a57_0x5512=function(){return _0x235832;};return a57_0x5512();}export function writeOutput(_0x1e11de,_0x25675e,_0x5900a6){const _0x5d5db0=a57_0x1312;return _0x25675e?(writeFileSync(_0x25675e,_0x1e11de),console[_0x5d5db0(0x1cb)]('Results\x20saved\x20to\x20'+_0x25675e),Promise[_0x5d5db0(0x19a)]()):shouldUseLess(_0x5900a6||'','')?new Promise(_0x595e6a=>{const _0x3e2f62=_0x5d5db0,_0x1b3f2c=spawn(_0x3e2f62(0x1d1),[_0x3e2f62(0x1c8)],{'stdio':[_0x3e2f62(0x1d8),_0x3e2f62(0x1cf),_0x3e2f62(0x1cf)]});let _0x516434=![];_0x1b3f2c['on'](_0x3e2f62(0x1cb),()=>{const _0x2e1abd=_0x3e2f62;!_0x516434&&(_0x516434=!![],console[_0x2e1abd(0x1da)](_0x1e11de),_0x595e6a());}),_0x1b3f2c['on']('close',()=>{!_0x516434&&(_0x516434=!![],_0x595e6a());}),_0x1b3f2c['on'](_0x3e2f62(0x1d5),()=>{const _0x4349e8=_0x3e2f62;!_0x516434&&_0x1b3f2c[_0x4349e8(0x197)]&&(_0x1b3f2c[_0x4349e8(0x197)]['on'](_0x4349e8(0x1cb),()=>{}),_0x1b3f2c['stdin'][_0x4349e8(0x1b2)](_0x1e11de),_0x1b3f2c['stdin'][_0x4349e8(0x1dd)]());}),!_0x1b3f2c[_0x3e2f62(0x197)]&&(!_0x516434&&(_0x516434=!![],console['log'](_0x1e11de),_0x595e6a()));}):(console[_0x5d5db0(0x1da)](_0x1e11de),Promise[_0x5d5db0(0x19a)]());}export async function handleSDKOutput(_0x2542fd,_0x4d1983){const _0x9be8e8=a57_0x1312,_0x1c4818=resolveOutputOptions(_0x4d1983),_0x43b88e=await formatSDKOutput(_0x2542fd,_0x1c4818);await writeOutput(_0x43b88e,_0x1c4818[_0x9be8e8(0x1cd)]||undefined,_0x1c4818['format']);}export async function handleQueryOutput(_0x274c91,_0x44d958){const _0x489b87=a57_0x1312,_0x127a8f=resolveOutputOptions(_0x44d958),_0x36830b=await formatQueryOutput(_0x274c91,_0x127a8f);await writeOutput(_0x36830b,_0x127a8f[_0x489b87(0x1cd)]||undefined,_0x127a8f['format']);}async function formatSingleObject(_0x2f84d0,_0x25c88e){const _0x53dce5=a57_0x1312,{format:_0x17c8d1,color:_0x419a89,noColor:_0x59f2db}=_0x25c88e,_0xefe756={'color':_0x419a89,'noColor':_0x59f2db};if(_0x17c8d1===_0x53dce5(0x1ca)){if(shouldUseColor(_0xefe756))return colorizeJSON(_0x2f84d0,_0xefe756);return JSON['stringify'](_0x2f84d0,null,0x2);}else{if(_0x17c8d1==='jsonl'){if(shouldUseColor(_0xefe756))return colorizeJSONCompact(_0x2f84d0,_0xefe756);return JSON[_0x53dce5(0x19d)](_0x2f84d0);}else{if(_0x17c8d1===_0x53dce5(0x1c1))return Object[_0x53dce5(0x1b5)](_0x2f84d0)[_0x53dce5(0x19b)](([_0x1ba082,_0x122acd])=>_0x1ba082+'\x09'+_0x122acd)[_0x53dce5(0x1b3)]('\x0a');else{const _0xd6e611=Object[_0x53dce5(0x1b5)](_0x2f84d0);if(_0xd6e611['length']===0x0)return _0x53dce5(0x1d6);const _0x2d559a=_0x2f84d0[_0x53dce5(0x1c6)],_0x473747=_0x2f84d0[_0x53dce5(0x1af)],_0x4ec085=_0x2f84d0[_0x53dce5(0x19f)],_0x414509=_0x2f84d0[_0x53dce5(0x1a9)],_0x20e9b8=_0x473747?typeof _0x473747===_0x53dce5(0x1c4)?_0x473747:JSON['stringify'](_0x473747,null,0x2):undefined,_0x3cce1e=_0x4ec085&&Object[_0x53dce5(0x1c9)](_0x4ec085)[_0x53dce5(0x1bf)]>0x0?JSON[_0x53dce5(0x19d)](_0x4ec085,null,0x2):undefined,_0x4d6c15=_0x414509&&Object[_0x53dce5(0x1c9)](_0x414509)[_0x53dce5(0x1bf)]>0x0?JSON[_0x53dce5(0x19d)](_0x414509,null,0x2):undefined,_0x532e74=_0xd6e611[_0x53dce5(0x1a1)](([_0x1b4f29])=>_0x1b4f29!==_0x53dce5(0x1c6)&&_0x1b4f29!==_0x53dce5(0x1af)&&_0x1b4f29!=='params'&&_0x1b4f29!=='rule'),_0x32831c=Math[_0x53dce5(0x1ad)](..._0x532e74[_0x53dce5(0x19b)](([_0x32cc44])=>_0x32cc44[_0x53dce5(0x1bf)])),_0x2ff08b=Math[_0x53dce5(0x1ad)](..._0x532e74['map'](([,_0x1ba4d9])=>{const _0x4f81bc=_0x53dce5;try{const _0x3cf9ae=_0x1ba4d9===null||_0x1ba4d9===undefined?'':typeof _0x1ba4d9==='object'?JSON['stringify'](_0x1ba4d9):String(_0x1ba4d9),_0x219a25=_0x3cf9ae[_0x4f81bc(0x1c2)]('\x0a');return Math[_0x4f81bc(0x1ad)](..._0x219a25['map'](_0x280a20=>_0x280a20[_0x4f81bc(0x1bf)]),0x0);}catch{return 0x0;}}),0x14),_0x4e3260=[];_0x4e3260[_0x53dce5(0x1be)](colorBorder('┌─'+'─'[_0x53dce5(0x19e)](_0x32831c)+_0x53dce5(0x1a0)+'─'['repeat'](_0x2ff08b)+'─┐',_0xefe756)),_0x532e74[_0x53dce5(0x1de)](([_0x5a436f,_0x2056dc])=>{const _0x342b82=_0x53dce5;let _0x120910;try{_0x120910=_0x2056dc===null||_0x2056dc===undefined?'':typeof _0x2056dc==='object'?JSON[_0x342b82(0x19d)](_0x2056dc):String(_0x2056dc);}catch{_0x120910=_0x342b82(0x1ab);}const _0x18b642=_0x5a436f[_0x342b82(0x1c3)](_0x32831c),_0x4a5227=_0x120910[_0x342b82(0x1c2)]('\x0a');_0x4a5227[_0x342b82(0x1de)]((_0x4146af,_0x2e2f73)=>{const _0x39b105=_0x342b82,_0x4bcf07=colorBorder('│',_0xefe756);_0x2e2f73===0x0?_0x4e3260[_0x39b105(0x1be)](_0x4bcf07+'\x20'+_0x18b642+'\x20'+_0x4bcf07+'\x20'+_0x4146af[_0x39b105(0x1c3)](_0x2ff08b)+'\x20'+_0x4bcf07):_0x4e3260[_0x39b105(0x1be)](_0x4bcf07+'\x20'+'\x20'[_0x39b105(0x19e)](_0x32831c)+'\x20'+_0x4bcf07+'\x20'+_0x4146af[_0x39b105(0x1c3)](_0x2ff08b)+'\x20'+_0x4bcf07);});}),_0x4e3260[_0x53dce5(0x1be)](colorBorder('└─'+'─'[_0x53dce5(0x19e)](_0x32831c)+_0x53dce5(0x1a5)+'─'[_0x53dce5(0x19e)](_0x2ff08b)+'─┘',_0xefe756));_0x20e9b8&&(_0x4e3260[_0x53dce5(0x1be)](''),_0x4e3260[_0x53dce5(0x1be)](String(a57_0x2b6a7b['yellow']['bold'](_0x53dce5(0x1d7)))),_0x4e3260[_0x53dce5(0x1be)](_0x20e9b8));_0x3cce1e&&(_0x4e3260[_0x53dce5(0x1be)](''),_0x4e3260[_0x53dce5(0x1be)](String(a57_0x2b6a7b['blue']['bold'](_0x53dce5(0x1a3)))),_0x4e3260[_0x53dce5(0x1be)](_0x3cce1e));_0x4d6c15&&(_0x4e3260[_0x53dce5(0x1be)](''),_0x4e3260['push'](String(a57_0x2b6a7b[_0x53dce5(0x199)]['bold']('[rule]'))),_0x4e3260[_0x53dce5(0x1be)](_0x4d6c15));if(_0x2d559a){if(_0x2d559a[_0x53dce5(0x1cc)]){_0x4e3260[_0x53dce5(0x1be)](''),_0x4e3260['push'](String(a57_0x2b6a7b[_0x53dce5(0x1a6)][_0x53dce5(0x1a4)](_0x53dce5(0x1db))));const _0x3c651b=_0x2d559a['stderr'][_0x53dce5(0x1c2)]('\x0a');_0x3c651b[_0x53dce5(0x1de)](_0x5b6358=>{const _0x38f5f8=_0x53dce5;_0x5b6358[_0x38f5f8(0x1dc)]()&&_0x4e3260[_0x38f5f8(0x1be)](_0x5b6358);});}if(_0x2d559a[_0x53dce5(0x1d2)]){_0x4e3260['push'](''),_0x4e3260['push'](String(a57_0x2b6a7b[_0x53dce5(0x1d4)]['bold'](_0x53dce5(0x195))));const _0x448d64=_0x2d559a[_0x53dce5(0x1d2)][_0x53dce5(0x1c2)]('\x0a');_0x448d64['forEach'](_0x49ebc9=>{const _0x349135=_0x53dce5;_0x49ebc9['trim']()&&_0x4e3260[_0x349135(0x1be)](_0x49ebc9);});}}return _0x4e3260[_0x53dce5(0x1b3)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x3f660,_0x112c83){const _0x5f038f=a57_0x1312;if(_0x112c83['format']===_0x5f038f(0x198)){await handleSDKOutput([_0x3f660],_0x112c83);return;}const _0x1bfc30=resolveOutputOptions(_0x112c83),_0x48a959=await formatSingleObject(_0x3f660,_0x1bfc30);await writeOutput(_0x48a959,_0x1bfc30[_0x5f038f(0x1cd)]||undefined,_0x1bfc30[_0x5f038f(0x1ba)]);}
|
|
1
|
+
(function(_0x244ebd,_0x4f711c){const _0x578ae1=a57_0x2412,_0xbf655=_0x244ebd();while(!![]){try{const _0x15aad5=parseInt(_0x578ae1(0x93))/0x1*(-parseInt(_0x578ae1(0xb9))/0x2)+parseInt(_0x578ae1(0x85))/0x3+parseInt(_0x578ae1(0xbf))/0x4*(parseInt(_0x578ae1(0x97))/0x5)+-parseInt(_0x578ae1(0x82))/0x6*(-parseInt(_0x578ae1(0xb8))/0x7)+parseInt(_0x578ae1(0xbb))/0x8+-parseInt(_0x578ae1(0x8d))/0x9+parseInt(_0x578ae1(0x80))/0xa;if(_0x15aad5===_0x4f711c)break;else _0xbf655['push'](_0xbf655['shift']());}catch(_0x2ad19f){_0xbf655['push'](_0xbf655['shift']());}}}(a57_0x1987,0xe45dd));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 a57_0x463cc4 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';function a57_0x1987(){const _0x1b01da=['repeat','object','data','forEach','rule','query','stringify','list','limitStructuredFormats','sdk-result','join','close','less','varchar','number','jsonl','tsv','limit','[query]','filter','max','output','FINISHED','spawn','push','error','isFinite','[logs]','273NQsnfP','2450DjvhKv','padEnd','3492280sSQJuN','length','[params]','keys','830528kZQOJo','Results\x20saved\x20to\x20','format','-FXRSn','entries','bigint','log','boolean','json','inherit','3800660FTdqLC','write','102918rjFQFZ','noColor','red','1847295dIxhcs','stdin','trim','string','color','blue','split','stderr','4313835VUXXoK','table','map','bold','cmdout','resolve','1069pcwHSF','stdout','double','slice','15urllAU','debug','─┴─','[error]','─┬─'];a57_0x1987=function(){return _0x1b01da;};return a57_0x1987();}export function isStructuredFormat(_0x19a7ab){const _0x1f90c5=a57_0x2412;return _0x19a7ab['format']===_0x1f90c5(0x7e)||_0x19a7ab[_0x1f90c5(0x78)]===_0x1f90c5(0xab)||_0x19a7ab[_0x1f90c5(0x78)]===_0x1f90c5(0xac)||_0x19a7ab[_0x1f90c5(0x78)]===_0x1f90c5(0x8e)||_0x19a7ab[_0x1f90c5(0x7e)]===!![]||_0x19a7ab[_0x1f90c5(0xab)]===!![]||_0x19a7ab['tsv']===!![]||_0x19a7ab[_0x1f90c5(0x8e)]===!![];}export function parseOutputOptions(_0x1804c6){const _0x3650ad=a57_0x2412;return{'format':_0x1804c6['format']||_0x3650ad(0x8e),'output':_0x1804c6['output']||'','limit':_0x1804c6[_0x3650ad(0xad)],'limitStructuredFormats':_0x1804c6[_0x3650ad(0xa4)],'color':_0x1804c6['color'],'noColor':_0x1804c6[_0x3650ad(0x83)]};}function convertSDKResultToQueryResult(_0x30907b){const _0x424365=a57_0x2412,_0x1d5382=[];if(_0x30907b[_0x424365(0xbc)]>0x0){const _0x5299a1=_0x30907b[0x0];for(const [_0x146986,_0x42a50e]of Object['entries'](_0x5299a1)){let _0x3622cd=_0x424365(0xa9);if(typeof _0x42a50e==='number')_0x3622cd=Number['isInteger'](_0x42a50e)?_0x424365(0x7b):_0x424365(0x95);else{if(typeof _0x42a50e===_0x424365(0x7d))_0x3622cd=_0x424365(0x7d);else _0x42a50e===null&&(_0x3622cd=_0x424365(0xa9));}_0x1d5382[_0x424365(0xb4)]({'name':_0x146986,'type':_0x3622cd});}}return{'queryId':_0x424365(0xa5),'columns':_0x1d5382,'data':_0x30907b,'stats':{'state':_0x424365(0xb2),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x30907b[_0x424365(0xbc)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0xc397c2,_0x2541f2){const _0x89dbad=convertSDKResultToQueryResult(_0xc397c2);return formatQueryOutput(_0x89dbad,_0x2541f2);}export async function formatQueryOutput(_0x5f1f6c,_0xb3558d){const _0x34c136=a57_0x2412,{format:_0x2402be,limit:_0x19fbd9,output:_0x4427c5,color:_0x317d78,noColor:_0x1695aa,limitStructuredFormats:_0x789175}=_0xb3558d,_0x3c824f=Boolean(_0x4427c5)&&!_0x317d78,_0x10168f={'color':_0x317d78,'noColor':_0x1695aa||_0x3c824f};if(_0x2402be==='table'){const _0x4d3830=shouldUseLess(_0x2402be,_0x4427c5);return formatAsTable(_0x5f1f6c,_0x19fbd9,_0x4d3830,_0x10168f);}const _0x2487a1=_0x789175&&Number[_0x34c136(0xb6)](_0x19fbd9)&&_0x5f1f6c[_0x34c136(0x9e)][_0x34c136(0xbc)]>_0x19fbd9?{..._0x5f1f6c,'data':_0x5f1f6c[_0x34c136(0x9e)][_0x34c136(0x96)](0x0,_0x19fbd9)}:_0x5f1f6c;if(_0x2402be===_0x34c136(0x7e))return formatAsJSON(_0x2487a1,_0x10168f);else return _0x2402be===_0x34c136(0xab)?formatAsJSONL(_0x2487a1,_0x10168f):formatQueryResult(_0x2487a1,_0x2402be);}function shouldUseLess(_0x11e9de,_0x4d1f2c){const _0x54cc3a=a57_0x2412;return(_0x11e9de===_0x54cc3a(0x8e)||_0x11e9de===_0x54cc3a(0xa3))&&process[_0x54cc3a(0x94)]['isTTY']&&!_0x4d1f2c;}function a57_0x2412(_0x475c7e,_0x142259){_0x475c7e=_0x475c7e-0x78;const _0x198774=a57_0x1987();let _0x2412ff=_0x198774[_0x475c7e];return _0x2412ff;}export function resolveOutputOptions(_0x4b9733){const _0x22e850=a57_0x2412,_0x4ff831=_0x4b9733['output']||'',_0x250611=resolveOutputFormat(_0x4b9733[_0x22e850(0x78)],_0x4ff831,_0x22e850(0x8e));let _0xa4638b=typeof _0x4b9733[_0x22e850(0xad)]===_0x22e850(0xaa)?_0x4b9733[_0x22e850(0xad)]:parseInt(_0x4b9733['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x4b9733[_0x22e850(0xad)]===undefined&&shouldUseLess(_0x250611,_0x4ff831)&&(_0xa4638b=Infinity),{'format':_0x250611,'output':_0x4ff831,'limit':_0xa4638b,'limitStructuredFormats':_0x4b9733['limitStructuredFormats'],'color':_0x4b9733[_0x22e850(0x89)],'noColor':_0x4b9733['noColor']};}export function writeOutput(_0x3c7eaa,_0x2910f6,_0x5786f9){const _0x2a165d=a57_0x2412;return _0x2910f6?(writeFileSync(_0x2910f6,_0x3c7eaa),console[_0x2a165d(0xb5)](_0x2a165d(0xc0)+_0x2910f6),Promise[_0x2a165d(0x92)]()):shouldUseLess(_0x5786f9||'','')?new Promise(_0x3bc236=>{const _0x3531ad=_0x2a165d,_0x3101b=spawn(_0x3531ad(0xa8),[_0x3531ad(0x79)],{'stdio':['pipe',_0x3531ad(0x7f),_0x3531ad(0x7f)]});let _0x3bca05=![];_0x3101b['on'](_0x3531ad(0xb5),()=>{const _0x238e31=_0x3531ad;!_0x3bca05&&(_0x3bca05=!![],console[_0x238e31(0x7c)](_0x3c7eaa),_0x3bc236());}),_0x3101b['on'](_0x3531ad(0xa7),()=>{!_0x3bca05&&(_0x3bca05=!![],_0x3bc236());}),_0x3101b['on'](_0x3531ad(0xb3),()=>{const _0x22baeb=_0x3531ad;!_0x3bca05&&_0x3101b[_0x22baeb(0x86)]&&(_0x3101b['stdin']['on']('error',()=>{}),_0x3101b[_0x22baeb(0x86)][_0x22baeb(0x81)](_0x3c7eaa),_0x3101b[_0x22baeb(0x86)]['end']());}),!_0x3101b[_0x3531ad(0x86)]&&(!_0x3bca05&&(_0x3bca05=!![],console[_0x3531ad(0x7c)](_0x3c7eaa),_0x3bc236()));}):(console[_0x2a165d(0x7c)](_0x3c7eaa),Promise['resolve']());}export async function handleSDKOutput(_0x1cc8c6,_0x2aab2b){const _0x4f7cd9=a57_0x2412,_0x4868d0=resolveOutputOptions(_0x2aab2b),_0x2c1e92=await formatSDKOutput(_0x1cc8c6,_0x4868d0);await writeOutput(_0x2c1e92,_0x4868d0[_0x4f7cd9(0xb1)]||undefined,_0x4868d0['format']);}export async function handleQueryOutput(_0x1a2393,_0x3ea7fb){const _0x3031db=a57_0x2412,_0x97df6b=resolveOutputOptions(_0x3ea7fb),_0x473881=await formatQueryOutput(_0x1a2393,_0x97df6b);await writeOutput(_0x473881,_0x97df6b[_0x3031db(0xb1)]||undefined,_0x97df6b[_0x3031db(0x78)]);}async function formatSingleObject(_0x5b2d5c,_0x1cd90f){const _0x2c844b=a57_0x2412,{format:_0x56ef31,color:_0x40095d,noColor:_0xc58daa}=_0x1cd90f,_0x55993c={'color':_0x40095d,'noColor':_0xc58daa};if(_0x56ef31===_0x2c844b(0x7e)){if(shouldUseColor(_0x55993c))return colorizeJSON(_0x5b2d5c,_0x55993c);return JSON[_0x2c844b(0xa2)](_0x5b2d5c,null,0x2);}else{if(_0x56ef31===_0x2c844b(0xab)){if(shouldUseColor(_0x55993c))return colorizeJSONCompact(_0x5b2d5c,_0x55993c);return JSON['stringify'](_0x5b2d5c);}else{if(_0x56ef31===_0x2c844b(0xac))return Object[_0x2c844b(0x7a)](_0x5b2d5c)[_0x2c844b(0x8f)](([_0x383a0f,_0x3317d9])=>_0x383a0f+'\x09'+_0x3317d9)[_0x2c844b(0xa6)]('\x0a');else{const _0x4f4749=Object['entries'](_0x5b2d5c);if(_0x4f4749['length']===0x0)return'No\x20data';const _0x509858=_0x5b2d5c[_0x2c844b(0x98)],_0x4877f6=_0x5b2d5c[_0x2c844b(0xa1)],_0x448138=_0x5b2d5c['params'],_0x196db4=_0x5b2d5c[_0x2c844b(0xa0)],_0x4b4e31=_0x4877f6?typeof _0x4877f6===_0x2c844b(0x88)?_0x4877f6:JSON[_0x2c844b(0xa2)](_0x4877f6,null,0x2):undefined,_0x5b3865=_0x448138&&Object[_0x2c844b(0xbe)](_0x448138)['length']>0x0?JSON[_0x2c844b(0xa2)](_0x448138,null,0x2):undefined,_0x20c7b2=_0x196db4&&Object[_0x2c844b(0xbe)](_0x196db4)[_0x2c844b(0xbc)]>0x0?JSON[_0x2c844b(0xa2)](_0x196db4,null,0x2):undefined,_0x430d7b=_0x4f4749[_0x2c844b(0xaf)](([_0x584b1c])=>_0x584b1c!==_0x2c844b(0x98)&&_0x584b1c!==_0x2c844b(0xa1)&&_0x584b1c!=='params'&&_0x584b1c!=='rule'),_0x5e43a8=Math[_0x2c844b(0xb0)](..._0x430d7b[_0x2c844b(0x8f)](([_0x2d26ab])=>_0x2d26ab[_0x2c844b(0xbc)])),_0x5a11a4=Math[_0x2c844b(0xb0)](..._0x430d7b[_0x2c844b(0x8f)](([,_0x549c49])=>{const _0x43c945=_0x2c844b;try{const _0x47a918=_0x549c49===null||_0x549c49===undefined?'':typeof _0x549c49==='object'?JSON[_0x43c945(0xa2)](_0x549c49):String(_0x549c49),_0x80a438=_0x47a918[_0x43c945(0x8b)]('\x0a');return Math[_0x43c945(0xb0)](..._0x80a438[_0x43c945(0x8f)](_0x142755=>_0x142755[_0x43c945(0xbc)]),0x0);}catch{return 0x0;}}),0x14),_0x283158=[];_0x283158[_0x2c844b(0xb4)](colorBorder('┌─'+'─'[_0x2c844b(0x9c)](_0x5e43a8)+_0x2c844b(0x9b)+'─'['repeat'](_0x5a11a4)+'─┐',_0x55993c)),_0x430d7b[_0x2c844b(0x9f)](([_0x449571,_0x5e28d3])=>{const _0x19231c=_0x2c844b;let _0x3d4f20;try{_0x3d4f20=_0x5e28d3===null||_0x5e28d3===undefined?'':typeof _0x5e28d3===_0x19231c(0x9d)?JSON['stringify'](_0x5e28d3):String(_0x5e28d3);}catch{_0x3d4f20='[Object]';}const _0x2464e9=_0x449571[_0x19231c(0xba)](_0x5e43a8),_0x49feda=_0x3d4f20[_0x19231c(0x8b)]('\x0a');_0x49feda[_0x19231c(0x9f)]((_0x390143,_0x40ee31)=>{const _0xd02e1e=_0x19231c,_0x5a2501=colorBorder('│',_0x55993c);_0x40ee31===0x0?_0x283158[_0xd02e1e(0xb4)](_0x5a2501+'\x20'+_0x2464e9+'\x20'+_0x5a2501+'\x20'+_0x390143[_0xd02e1e(0xba)](_0x5a11a4)+'\x20'+_0x5a2501):_0x283158[_0xd02e1e(0xb4)](_0x5a2501+'\x20'+'\x20'[_0xd02e1e(0x9c)](_0x5e43a8)+'\x20'+_0x5a2501+'\x20'+_0x390143[_0xd02e1e(0xba)](_0x5a11a4)+'\x20'+_0x5a2501);});}),_0x283158['push'](colorBorder('└─'+'─'[_0x2c844b(0x9c)](_0x5e43a8)+_0x2c844b(0x99)+'─'[_0x2c844b(0x9c)](_0x5a11a4)+'─┘',_0x55993c));_0x4b4e31&&(_0x283158[_0x2c844b(0xb4)](''),_0x283158[_0x2c844b(0xb4)](String(a57_0x463cc4['yellow'][_0x2c844b(0x90)](_0x2c844b(0xae)))),_0x283158['push'](_0x4b4e31));_0x5b3865&&(_0x283158['push'](''),_0x283158[_0x2c844b(0xb4)](String(a57_0x463cc4[_0x2c844b(0x8a)][_0x2c844b(0x90)](_0x2c844b(0xbd)))),_0x283158[_0x2c844b(0xb4)](_0x5b3865));_0x20c7b2&&(_0x283158[_0x2c844b(0xb4)](''),_0x283158[_0x2c844b(0xb4)](String(a57_0x463cc4['magenta'][_0x2c844b(0x90)]('[rule]'))),_0x283158[_0x2c844b(0xb4)](_0x20c7b2));if(_0x509858){if(_0x509858['stderr']){_0x283158[_0x2c844b(0xb4)](''),_0x283158[_0x2c844b(0xb4)](String(a57_0x463cc4[_0x2c844b(0x84)]['bold'](_0x2c844b(0x9a))));const _0x5c2c23=_0x509858[_0x2c844b(0x8c)][_0x2c844b(0x8b)]('\x0a');_0x5c2c23[_0x2c844b(0x9f)](_0x233982=>{const _0xe71214=_0x2c844b;_0x233982[_0xe71214(0x87)]()&&_0x283158['push'](_0x233982);});}if(_0x509858[_0x2c844b(0x91)]){_0x283158[_0x2c844b(0xb4)](''),_0x283158[_0x2c844b(0xb4)](String(a57_0x463cc4['cyan'][_0x2c844b(0x90)](_0x2c844b(0xb7))));const _0x19b5f7=_0x509858[_0x2c844b(0x91)][_0x2c844b(0x8b)]('\x0a');_0x19b5f7[_0x2c844b(0x9f)](_0x2bc193=>{const _0x137762=_0x2c844b;_0x2bc193[_0x137762(0x87)]()&&_0x283158[_0x137762(0xb4)](_0x2bc193);});}}return _0x283158[_0x2c844b(0xa6)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x324eeb,_0x42964){const _0xb7294d=a57_0x2412;if(_0x42964[_0xb7294d(0x78)]===_0xb7294d(0x8e)){await handleSDKOutput([_0x324eeb],_0x42964);return;}const _0x3b204c=resolveOutputOptions(_0x42964),_0x122402=await formatSingleObject(_0x324eeb,_0x3b204c);await writeOutput(_0x122402,_0x3b204c[_0xb7294d(0xb1)]||undefined,_0x3b204c[_0xb7294d(0x78)]);}
|