@treasuredata/tdx 2026.4.10 → 2026.4.11
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/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/tools/work-create-item.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/access-tracker.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 a54_0x2a0943=a54_0x5ebb;(function(_0xf7ee2f,_0x24fdf7){const _0x49e936=a54_0x5ebb,_0x4a5c98=_0xf7ee2f();while(!![]){try{const _0x429980=-parseInt(_0x49e936(0x349))/0x1*(-parseInt(_0x49e936(0x344))/0x2)+-parseInt(_0x49e936(0x324))/0x3*(-parseInt(_0x49e936(0x1f6))/0x4)+-parseInt(_0x49e936(0x2f4))/0x5*(parseInt(_0x49e936(0x2b6))/0x6)+parseInt(_0x49e936(0x302))/0x7+parseInt(_0x49e936(0x2ce))/0x8+-parseInt(_0x49e936(0x28d))/0x9+-parseInt(_0x49e936(0x25f))/0xa;if(_0x429980===_0x24fdf7)break;else _0x4a5c98['push'](_0x4a5c98['shift']());}catch(_0x41ed50){_0x4a5c98['push'](_0x4a5c98['shift']());}}}(a54_0x2768,0x18a8a));import a54_0x13943d from'chalk';import{existsSync}from'fs';import a54_0x4c5432 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,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 a54_0x1b2330 from'prompts';function getAttemptStatusDisplay(_0x237b08){const _0x2a9055=a54_0x5ebb;if(!_0x237b08)return{'icon':'⏳','text':''};const {done:_0x51bb11,success:_0x3b75a5,cancelRequested:_0x5394ff}=_0x237b08;if(!_0x51bb11)return _0x5394ff?{'icon':'🛑','text':a54_0x13943d[_0x2a9055(0x2f5)](_0x2a9055(0x27c))}:{'icon':'🔄','text':a54_0x13943d[_0x2a9055(0x258)](_0x2a9055(0x2ea))};if(_0x3b75a5)return{'icon':'✅','text':a54_0x13943d['green']('success')};return{'icon':'❌','text':a54_0x13943d[_0x2a9055(0x1fc)](_0x2a9055(0x2ae))};}export class WorkflowBaseCommand extends BaseCommand{[a54_0x2a0943(0x1d4)](_0x3c5ae0,_0x443b93,_0x1987f0=0x0){const _0x30ebfd=a54_0x2a0943;return _0x3c5ae0[_0x1987f0]||_0x443b93[_0x30ebfd(0x2fb)];}[a54_0x2a0943(0x240)](_0x160bdf,_0x479379,_0x1354d0=0x0){const _0x5c76bb=a54_0x2a0943,_0x5ee826=this[_0x5c76bb(0x1d4)](_0x160bdf,_0x479379,_0x1354d0);if(!_0x5ee826)return console[_0x5c76bb(0x2ae)](a54_0x13943d[_0x5c76bb(0x1fc)](_0x5c76bb(0x33f)),_0x5c76bb(0x24c)),console['error'](a54_0x13943d[_0x5c76bb(0x31c)](_0x5c76bb(0x362))),null;return _0x5ee826;}[a54_0x2a0943(0x228)](_0x1c7874,_0x989f86){const _0x2450e8=a54_0x2a0943;if(_0x1c7874[0x0]){const _0x1f12af=_0x1c7874[0x0][_0x2450e8(0x2ca)]('.');if(_0x1f12af[_0x2450e8(0x2c2)]===0x1)return{'projectName':_0x1f12af[0x0],'workflowName':undefined};else return _0x1f12af[_0x2450e8(0x2c2)]===0x2?{'projectName':_0x1f12af[0x0],'workflowName':_0x1f12af[0x1]}:(console[_0x2450e8(0x2ae)](a54_0x13943d['red']('Error:'),_0x2450e8(0x2c5)),null);}return{'projectName':_0x989f86['workflowProject'],'workflowName':undefined};}['resolveProjectDir'](_0x53d13f,_0x176f0e,_0x126834=0x0){const _0x7b14df=a54_0x2a0943;if(_0x53d13f[_0x126834])return _0x53d13f[_0x126834];if(_0x176f0e['workflowProject']){const _0x70b7c5=a54_0x4c5432['join'](process['cwd'](),'workflows',_0x176f0e['workflowProject']);if(existsSync(a54_0x4c5432[_0x7b14df(0x219)](_0x70b7c5,'tdx.json')))return _0x70b7c5;}return undefined;}async[a54_0x2a0943(0x388)](_0x5b4900,_0x5a58d2,_0x329422){const _0x104a95=a54_0x2a0943;try{const _0xabac4b=await _0x5b4900['workflow']['workflows'](_0x5a58d2,{'limit':0x1});if(_0xabac4b[_0x104a95(0x2c2)]>0x0){const _0x3044aa=_0xabac4b[0x0]['id'],_0x4f7c9c=getWorkflowUrl(_0x329422,_0x3044aa);console[_0x104a95(0x2ae)](_0x104a95(0x2fd)+a54_0x13943d[_0x104a95(0x38a)](_0x4f7c9c));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x1c0);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x203);async[a54_0x2a0943(0x295)](_0x180536){const _0x2b13f3=a54_0x2a0943,{options:_0x4401af,args:_0x1c36f0,tdx:_0x46e025}=_0x180536,_0x234586=_0x1c36f0[0x0],_0x4c749e=_0x4401af[_0x2b13f3(0x213)];if(_0x4c749e)return saveSessionContext({'workflow_project':undefined},_0x4401af[_0x2b13f3(0x229)]),console[_0x2b13f3(0x31e)](a54_0x13943d[_0x2b13f3(0x211)](_0x2b13f3(0x31b))),0x0;if(!_0x234586)return console[_0x2b13f3(0x2ae)](a54_0x13943d['red'](_0x2b13f3(0x33f)),_0x2b13f3(0x24c)),console[_0x2b13f3(0x2ae)](a54_0x13943d['dim']('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x2b13f3(0x2ae)](a54_0x13943d[_0x2b13f3(0x31c)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x3cde08=await withSpinner(_0x2b13f3(0x2ac)+_0x234586+'\x27...',()=>_0x46e025[_0x2b13f3(0x2f9)][_0x2b13f3(0x260)](_0x234586),{'verbose':_0x4401af['verbose']}),{name:_0x48561f}=_0x3cde08[_0x2b13f3(0x2c0)];return saveSessionContext({'workflow_project':_0x48561f},_0x4401af['session']),console['log'](a54_0x13943d[_0x2b13f3(0x211)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a54_0x13943d[_0x2b13f3(0x38a)](_0x48561f))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a54_0x2a0943(0x366);['description']=a54_0x2a0943(0x37b);async[a54_0x2a0943(0x295)](_0x10f5e5){const _0x3e8c90=a54_0x2a0943,{options:_0x53d205,args:_0x4e4fc6,tdx:_0x335114}=_0x10f5e5,_0x58bd13=_0x4e4fc6[0x0];_0x53d205[_0x3e8c90(0x31f)]&&_0x58bd13&&console['error'](_0x3e8c90(0x1f3)+_0x58bd13);const _0x3ca647=await withSpinner(_0x3e8c90(0x387),()=>_0x335114['workflow'][_0x3e8c90(0x2d3)](_0x58bd13,{'limit':_0x53d205[_0x3e8c90(0x34d)]}),{'verbose':_0x53d205[_0x3e8c90(0x31f)]});let _0x5261f5=_0x3ca647['data'];_0x5261f5[_0x3e8c90(0x2ba)]((_0x372a24,_0x201975)=>_0x372a24[_0x3e8c90(0x1c3)][_0x3e8c90(0x351)](_0x201975[_0x3e8c90(0x1c3)]));const _0x1c9233=_0x53d205[_0x3e8c90(0x34d)]||0x64,_0x28492d=_0x5261f5['length']>=_0x1c9233?a54_0x13943d[_0x3e8c90(0x31c)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3e8c90(0x2ae)]('✔\x20Found\x20'+_0x5261f5[_0x3e8c90(0x2c2)]+_0x3e8c90(0x1ec)+(_0x5261f5[_0x3e8c90(0x2c2)]!==0x1?'s':'')+_0x28492d);if(_0x53d205[_0x3e8c90(0x352)]===_0x3e8c90(0x200)||_0x53d205[_0x3e8c90(0x352)]===_0x3e8c90(0x291)||_0x53d205[_0x3e8c90(0x352)]===_0x3e8c90(0x311))await handleSDKOutput(_0x5261f5,_0x53d205);else{if(_0x5261f5[_0x3e8c90(0x2c2)]===0x0)_0x58bd13?console[_0x3e8c90(0x31e)](_0x3e8c90(0x265)+_0x58bd13):console[_0x3e8c90(0x31e)](_0x3e8c90(0x243));else{const _0x1d7085=_0x5261f5[_0x3e8c90(0x285)](_0x3443c6=>{const _0x4bb3f1=_0x3e8c90,_0x5f54df=_0x3443c6[_0x4bb3f1(0x379)]?.[_0x4bb3f1(0x2f0)](_0x3aced6=>_0x3aced6[_0x4bb3f1(0x1d2)]===_0x4bb3f1(0x244)),_0x18d800=_0x5f54df?a54_0x13943d['dim'](_0x4bb3f1(0x325)):'';return'📁\x20'+_0x3443c6[_0x4bb3f1(0x1c3)]+_0x18d800;});await writeOutput(_0x1d7085[_0x3e8c90(0x219)]('\x0a'),_0x53d205['output'],_0x3e8c90(0x354));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x1ee);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x2bb);async[a54_0x2a0943(0x295)](_0x4f8c99){const _0x500944=a54_0x2a0943,{options:_0x36d714,args:_0x33c6c6,tdx:_0x1ed505}=_0x4f8c99,_0x24f3f6=this[_0x500944(0x1d4)](_0x33c6c6,_0x36d714);_0x36d714[_0x500944(0x31f)]&&_0x24f3f6&&console[_0x500944(0x2ae)](_0x500944(0x23b)+_0x24f3f6);const _0x3c40d2=await withSpinner(_0x500944(0x2b8),()=>_0x1ed505[_0x500944(0x2f9)][_0x500944(0x1d5)](_0x24f3f6,{'limit':_0x36d714[_0x500944(0x34d)]}),{'verbose':_0x36d714[_0x500944(0x31f)]});let _0x4615fa=_0x3c40d2['data'];_0x4615fa[_0x500944(0x2ba)]((_0x77ed16,_0x58c195)=>{const _0x1ffc44=_0x500944,_0x18a598=_0x77ed16[_0x1ffc44(0x1c3)][_0x1ffc44(0x351)](_0x58c195[_0x1ffc44(0x1c3)]);if(_0x18a598!==0x0)return _0x18a598;return(_0x77ed16[_0x1ffc44(0x330)]?.[_0x1ffc44(0x1c3)]||'')[_0x1ffc44(0x351)](_0x58c195['project']?.[_0x1ffc44(0x1c3)]||'');});const _0x3547f5=_0x36d714[_0x500944(0x34d)]||0x64,_0xdb6455=_0x4615fa[_0x500944(0x2c2)]>=_0x3547f5?a54_0x13943d[_0x500944(0x31c)](_0x500944(0x2e5)):'';console[_0x500944(0x2ae)](_0x500944(0x37e)+_0x4615fa[_0x500944(0x2c2)]+_0x500944(0x316)+(_0x4615fa[_0x500944(0x2c2)]!==0x1?'s':'')+_0xdb6455);if(_0x36d714[_0x500944(0x352)]===_0x500944(0x200)||_0x36d714['format']==='jsonl'||_0x36d714[_0x500944(0x352)]===_0x500944(0x311))await handleSDKOutput(_0x4615fa,_0x36d714);else{if(_0x4615fa[_0x500944(0x2c2)]===0x0)_0x24f3f6?console[_0x500944(0x31e)](_0x500944(0x232)+_0x24f3f6):console[_0x500944(0x31e)](_0x500944(0x293));else{const _0x4c6b1b=_0x36d714[_0x500944(0x1e2)],_0x3e995d=_0x4615fa[_0x500944(0x285)](_0x58110f=>{const _0x5edf10=_0x500944,_0x59e75e=a54_0x13943d[_0x5edf10(0x31c)]('#'+_0x58110f['id']),_0x4ff677=hyperlink(_0x59e75e,getWorkflowUrl(_0x4c6b1b,_0x58110f['id'])),_0x20daf6=_0x58110f[_0x5edf10(0x330)]?.[_0x5edf10(0x1c3)]?a54_0x13943d[_0x5edf10(0x31c)]('\x20('+_0x58110f[_0x5edf10(0x330)][_0x5edf10(0x1c3)]+')'):'';return _0x5edf10(0x381)+_0x4ff677+'\x20'+_0x58110f[_0x5edf10(0x1c3)]+_0x20daf6;});await writeOutput(_0x3e995d[_0x500944(0x219)]('\x0a'),_0x36d714[_0x500944(0x1bb)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x2a8);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x375);async[a54_0x2a0943(0x295)](_0x249da0){const _0x25f139=a54_0x2a0943,{options:_0x40dfbf,args:_0x5f0405,tdx:_0x150a8c}=_0x249da0,_0x33b2ef=this[_0x25f139(0x228)](_0x5f0405,_0x40dfbf);if(!_0x33b2ef)return 0x1;const {projectName:_0x13371e,workflowName:_0x56e521}=_0x33b2ef;if(_0x40dfbf['verbose']){if(_0x13371e&&_0x56e521)console['error'](_0x25f139(0x24f)+_0x13371e+'.'+_0x56e521);else _0x13371e&&console[_0x25f139(0x2ae)](_0x25f139(0x2d5)+_0x13371e);const _0x573065=_0x40dfbf[_0x25f139(0x2ec)];_0x573065&&console[_0x25f139(0x2ae)](_0x25f139(0x346)+_0x573065);}let _0x78ff48=0x28;if(process['stdout'][_0x25f139(0x2aa)]&&!_0x40dfbf[_0x25f139(0x1bb)]&&!_0x40dfbf['format']){const _0x2fbcea=process[_0x25f139(0x2fc)][_0x25f139(0x1fd)]||0x28;_0x78ff48=Math[_0x25f139(0x26c)](0x14,Math[_0x25f139(0x2bc)](_0x2fbcea*0x2/0x3));}const _0x253a20=_0x40dfbf[_0x25f139(0x34d)]||_0x78ff48,_0x405813=await withSpinner(_0x25f139(0x2cf),()=>_0x150a8c['workflow'][_0x25f139(0x296)]({'projectName':_0x13371e,'workflowName':_0x56e521,'status':_0x40dfbf[_0x25f139(0x2ec)],'fromTime':_0x40dfbf[_0x25f139(0x365)],'toTime':_0x40dfbf['to'],'limit':_0x253a20}),{'verbose':_0x40dfbf[_0x25f139(0x31f)]}),_0x2105cf=_0x405813[_0x25f139(0x2c0)];_0x2105cf[_0x25f139(0x2ba)]((_0x12ad63,_0x6dbe06)=>{const _0x415684=_0x25f139,_0x510ef1=_0x12ad63['sessionTime']||'',_0x48ccac=_0x6dbe06[_0x415684(0x36a)]||'';return _0x48ccac[_0x415684(0x351)](_0x510ef1);});_0x2105cf[_0x25f139(0x2c2)]>=_0x253a20?console[_0x25f139(0x2ae)](_0x25f139(0x2f1)+_0x2105cf[_0x25f139(0x2c2)]+_0x25f139(0x29d)+a54_0x13943d['dim'](_0x25f139(0x364))):console['error']('✔\x20Found\x20'+_0x2105cf[_0x25f139(0x2c2)]+_0x25f139(0x284)+(_0x2105cf['length']!==0x1?'s':''));if(_0x40dfbf[_0x25f139(0x352)]==='json'||_0x40dfbf[_0x25f139(0x352)]===_0x25f139(0x291)||_0x40dfbf[_0x25f139(0x352)]==='table')await handleSDKOutput(_0x2105cf,_0x40dfbf);else{if(!process[_0x25f139(0x2fc)][_0x25f139(0x2aa)]||_0x40dfbf['output']){if(_0x2105cf[_0x25f139(0x2c2)]===0x0){if(_0x13371e&&_0x56e521)console[_0x25f139(0x31e)](_0x25f139(0x234)+_0x13371e+'.'+_0x56e521);else _0x13371e?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x13371e):console[_0x25f139(0x31e)](_0x25f139(0x334));}else{const _0x27072e=_0x40dfbf[_0x25f139(0x1e2)],_0x423812=this[_0x25f139(0x227)](_0x2105cf,_0x27072e);_0x40dfbf[_0x25f139(0x1bb)]?await writeOutput(_0x423812,_0x40dfbf['output'],'list'):console[_0x25f139(0x31e)](_0x423812);}!_0x13371e&&(console[_0x25f139(0x2ae)](''),console[_0x25f139(0x2ae)](a54_0x13943d['dim'](_0x25f139(0x34c))),console[_0x25f139(0x2ae)](a54_0x13943d[_0x25f139(0x31c)](_0x25f139(0x2d8))+'or'+a54_0x13943d[_0x25f139(0x31c)](_0x25f139(0x264))));}else{if(_0x2105cf[_0x25f139(0x2c2)]===0x0){if(_0x13371e&&_0x56e521)console[_0x25f139(0x31e)](_0x25f139(0x234)+_0x13371e+'.'+_0x56e521);else _0x13371e?console['log'](_0x25f139(0x372)+_0x13371e):console[_0x25f139(0x31e)](_0x25f139(0x334));}else await this[_0x25f139(0x36c)](_0x2105cf,_0x249da0,_0x13371e);}}return 0x0;}[a54_0x2a0943(0x227)](_0x66f4da,_0x2ffd70){const _0x39407f=a54_0x2a0943,_0x2c6c5f=[],_0x1e155e=new Map();let _0x45787e=Infinity,_0x2e4428=-Infinity;for(const _0x3ee661 of _0x66f4da){if(_0x3ee661[_0x39407f(0x363)]?.['createdAt']){const _0xac8301=new Date(_0x3ee661['lastAttempt'][_0x39407f(0x34e)])[_0x39407f(0x29c)](),_0x24f7fc=_0x3ee661[_0x39407f(0x363)][_0x39407f(0x2e0)]?new Date(_0x3ee661['lastAttempt'][_0x39407f(0x2e0)])[_0x39407f(0x29c)]():Date[_0x39407f(0x22e)](),_0x4277c7=_0x3ee661[_0x39407f(0x330)]?.[_0x39407f(0x1c3)]||_0x39407f(0x1d8);!_0x1e155e[_0x39407f(0x383)](_0x4277c7)&&_0x1e155e[_0x39407f(0x2a7)](_0x4277c7,[]),_0x1e155e[_0x39407f(0x1bf)](_0x4277c7)[_0x39407f(0x377)]({'session':_0x3ee661,'startTime':_0xac8301,'endTime':_0x24f7fc,'duration':_0x24f7fc-_0xac8301}),_0x45787e=Math['min'](_0x45787e,_0xac8301),_0x2e4428=Math['max'](_0x2e4428,_0x24f7fc);}}if(_0x1e155e[_0x39407f(0x1e5)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x29e5d8=process[_0x39407f(0x2fc)][_0x39407f(0x34a)]||0x78,_0x299122=0x1e,_0x17ce2=0x32,_0x467ab6=0x4,_0x15202c=Math[_0x39407f(0x294)](_0x17ce2,Math['max'](_0x299122,Math[_0x39407f(0x2bc)](_0x29e5d8*0.3))),_0x4fddc6=_0x29e5d8-_0x15202c-TIMELINE_CONFIG['GUTTER']-0x3-_0x467ab6,_0xa3994f=_0x2e4428-_0x45787e,_0x509a76=_0xa3994f/_0x15202c,_0x43c7a2=renderTimeAxis({'startTime':_0x45787e,'endTime':_0x2e4428,'durationMs':_0xa3994f,'msPerChar':_0x509a76},_0x15202c),_0x3f98d7=[];for(const _0x1b92de of _0x1e155e[_0x39407f(0x34f)]()){_0x3f98d7[_0x39407f(0x377)](..._0x1b92de);}_0x3f98d7[_0x39407f(0x2ba)]((_0x1006db,_0x2fd758)=>_0x2fd758[_0x39407f(0x2c3)]-_0x1006db[_0x39407f(0x2c3)]);const _0x8e450e=new Date(_0x45787e),_0x26aaac=formatDate(_0x8e450e),_0x221479=_0x467ab6+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG['ICON_SPACING']+_0x4fddc6,_0x4352ab='\x20'[_0x39407f(0x297)](_0x221479-_0x26aaac[_0x39407f(0x2c2)]),_0x144798=_0x4352ab+a54_0x13943d[_0x39407f(0x31c)](_0x26aaac)+'\x20'+_0x43c7a2;_0x2c6c5f[_0x39407f(0x377)](_0x144798);const _0x3339e1=0x16;let _0x52e3b1=0x0;for(const _0x447c7b of _0x3f98d7){const _0x4cfbd7=_0x447c7b['session']['project']?.[_0x39407f(0x1c3)]||'?',_0xe8bf25=Math[_0x39407f(0x294)](stringWidth(_0x4cfbd7),_0x3339e1);_0x52e3b1=Math[_0x39407f(0x26c)](_0x52e3b1,_0xe8bf25);}for(const _0x35460b of _0x3f98d7){const {session:_0x195f02,startTime:_0xd431cc,endTime:_0x8b8e67,duration:_0x370413}=_0x35460b,_0x35ecc9=_0x195f02['project']?.['id'],_0x435ac9=_0x195f02['id'],_0x54318f=_0x195f02[_0x39407f(0x330)]?.[_0x39407f(0x1c3)]||'?',_0x2aea14=_0x195f02[_0x39407f(0x2f9)]?.[_0x39407f(0x1c3)]||'?';let _0x240654,_0x1283df;if(_0x195f02[_0x39407f(0x363)]){const _0x986773=_0x195f02['lastAttempt'];!_0x986773[_0x39407f(0x20a)]?(_0x240654=_0x986773['cancelRequested']?'🛑':'🔄',_0x1283df=_0x986773['cancelRequested']?a54_0x13943d[_0x39407f(0x2f5)]:a54_0x13943d[_0x39407f(0x258)]):(_0x240654=_0x986773[_0x39407f(0x204)]?'✅':'❌',_0x1283df=_0x986773[_0x39407f(0x204)]?a54_0x13943d[_0x39407f(0x211)]:a54_0x13943d[_0x39407f(0x1fc)]);}else _0x240654='⏳',_0x1283df=a54_0x13943d[_0x39407f(0x31c)];const _0x5cff45='#'+_0x435ac9,_0x2e9856=_0x35ecc9?hyperlink(_0x5cff45,getWorkflowSessionUrl(_0x2ffd70,_0x35ecc9,_0x435ac9)):_0x5cff45;let _0x4ff1f3=_0x54318f;stringWidth(_0x54318f)>_0x3339e1&&(_0x4ff1f3=_0x54318f['slice'](0x0,_0x3339e1-0x1)+'…');const _0x55817d=a54_0x13943d[_0x39407f(0x31c)](_0x4ff1f3),_0x5f6ca4=stringWidth(_0x4ff1f3),_0x52d5b6='\x20'[_0x39407f(0x297)](_0x52e3b1-stringWidth(_0x4ff1f3)+0x2),_0x442fef='('+formatElapsed(_0x370413)+')',_0x35ee77=stringWidth(_0x442fef),_0x2ddb15=stringWidth(_0x5cff45),_0x1ddb60=_0x2ddb15+0x1+_0x5f6ca4+_0x52d5b6[_0x39407f(0x2c2)],_0x4214eb=_0x4fddc6-_0x1ddb60-_0x35ee77-0x1-0x8;let _0x28b3be=_0x2aea14;stringWidth(_0x28b3be)>_0x4214eb&&(_0x28b3be=_0x28b3be['slice'](0x0,_0x4214eb-0x1)+'…');const _0x52e7e6=_0x2e9856+'\x20'+_0x55817d+_0x52d5b6+_0x28b3be,_0x176e42=stringWidth(_0x52e7e6),_0x5833fd=_0x4fddc6-_0x176e42-_0x35ee77,_0x2c1b1a=_0x52e7e6+'\x20'[_0x39407f(0x297)](Math[_0x39407f(0x26c)](0x1,_0x5833fd))+a54_0x13943d[_0x39407f(0x31c)](_0x442fef),_0x5900b3=Math[_0x39407f(0x2bc)]((_0xd431cc-_0x45787e)/_0x509a76),_0x4ee2ed=Math[_0x39407f(0x2bc)]((_0x8b8e67-_0x45787e)/_0x509a76),_0x286230=Math[_0x39407f(0x26c)](_0x5900b3+0x1,_0x4ee2ed),_0x1436ce=new Array(_0x15202c)['fill']('\x20');for(let _0x4deb3e=_0x5900b3;_0x4deb3e<Math[_0x39407f(0x294)](_0x286230,_0x15202c);_0x4deb3e++){_0x1436ce[_0x4deb3e]='─';}const _0x556149=_0x1436ce[_0x39407f(0x285)](_0x4fc93d=>_0x4fc93d==='\x20'?'\x20':_0x1283df(_0x4fc93d))[_0x39407f(0x219)]('');_0x2c6c5f[_0x39407f(0x377)](_0x240654+'\x20'+_0x2c1b1a+'│'+_0x556149+'│');}return _0x2c6c5f[_0x39407f(0x219)]('\x0a');}async['navigateSessionsInteractive'](_0x1cb770,_0x4ec489,_0xa6d679){const _0x305c9c=a54_0x2a0943,{options:_0x699f4e,tdx:_0x5ee484}=_0x4ec489,_0x5ad973=_0x699f4e[_0x305c9c(0x1e2)],{timelineRows:_0x47cb95,timeAxisHeader:_0x2db2f9}=this[_0x305c9c(0x389)](_0x1cb770,_0x5ad973),_0x3b188b=_0x47cb95['filter'](_0x26dec7=>_0x26dec7[_0x305c9c(0x20b)]);if(_0x3b188b[_0x305c9c(0x2c2)]===0x0){const _0x3addf3=this[_0x305c9c(0x227)](_0x1cb770,_0x5ad973);console[_0x305c9c(0x31e)](_0x3addf3);!_0xa6d679&&(console[_0x305c9c(0x2ae)](''),console[_0x305c9c(0x2ae)](a54_0x13943d['dim'](_0x305c9c(0x34c))),console['error'](a54_0x13943d[_0x305c9c(0x31c)](_0x305c9c(0x2d8))+'or'+a54_0x13943d['dim'](_0x305c9c(0x264))));return;}_0x2db2f9&&console[_0x305c9c(0x31e)](_0x2db2f9);const _0x16c9d3=_0x47cb95[_0x305c9c(0x2ed)](_0x5496d5=>_0x5496d5[_0x305c9c(0x20b)])[_0x305c9c(0x285)](_0x45c37d=>({'title':_0x45c37d[_0x305c9c(0x2b9)],'value':_0x45c37d['attemptId']})),_0x2397bd=process['stdout'][_0x305c9c(0x1fd)]||0x3c,_0x54ab0e=Math[_0x305c9c(0x26c)](0x28,Math[_0x305c9c(0x2bc)](_0x2397bd*0x2/0x3)),_0x44c8eb=await a54_0x1b2330({'type':_0x305c9c(0x214),'name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x16c9d3,'initial':-0x1,'limit':_0x54ab0e,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x3f551f,_0x13bb16)=>{const _0x26379a=_0x305c9c;if(!_0x3f551f)return Promise[_0x26379a(0x223)](_0x13bb16);const _0x5855dd=_0x13bb16['filter'](_0x8b1d02=>{const _0x2b7e91=_0x26379a,_0x489ffd=_0x8b1d02;return _0x489ffd['title'][_0x2b7e91(0x1ea)]()[_0x2b7e91(0x2c6)](_0x3f551f[_0x2b7e91(0x1ea)]());});return Promise[_0x26379a(0x223)](_0x5855dd);}}),_0x3e54dd=()=>{const _0x4c0835=_0x305c9c;process[_0x4c0835(0x2fc)][_0x4c0835(0x1d6)](_0x4c0835(0x2b2)),process[_0x4c0835(0x2fc)][_0x4c0835(0x1d6)]('\x1b[1A\x1b[2K'),process[_0x4c0835(0x2fc)][_0x4c0835(0x1d6)](_0x4c0835(0x2b2));},_0x196f26=_0x44c8eb&&_0x44c8eb[_0x305c9c(0x20b)]&&_0x44c8eb['attemptId']!==null&&_0x44c8eb[_0x305c9c(0x20b)][_0x305c9c(0x2c9)]()!=='';if(!_0x196f26){_0x3e54dd(),console[_0x305c9c(0x31e)](a54_0x13943d['dim']('Cancelled'));return;}_0x3e54dd();const _0x985979=_0x1cb770['find'](_0x2a5804=>_0x2a5804[_0x305c9c(0x363)]?.['id']===_0x44c8eb[_0x305c9c(0x20b)]);if(_0x985979){const _0x152590=_0x985979['project']?.[_0x305c9c(0x1c3)]||'?',_0x1ea567=_0x985979[_0x305c9c(0x2f9)]?.[_0x305c9c(0x1c3)]||'?';console[_0x305c9c(0x31e)](_0x305c9c(0x30e)+a54_0x13943d[_0x305c9c(0x31c)](_0x152590)+_0x305c9c(0x22a)+a54_0x13943d[_0x305c9c(0x31c)](_0x1ea567));}const _0x4a83f6=new WorkflowTimelineCommand();await _0x4a83f6[_0x305c9c(0x295)]({'args':[],'options':{..._0x699f4e,'attemptId':_0x44c8eb[_0x305c9c(0x20b)]},'tdx':_0x5ee484});}['generateSessionTimelineRows'](_0x3b0bc7,_0x1508fa){const _0x2e91c0=a54_0x2a0943,_0x1d3678=new Map();for(const _0x1f2ed5 of _0x3b0bc7){_0x1f2ed5['id']&&_0x1f2ed5[_0x2e91c0(0x363)]?.['id']&&_0x1d3678['set'](_0x1f2ed5['id'],_0x1f2ed5[_0x2e91c0(0x363)]['id']);}const _0x2b0afa=[];let _0x3eb66d='';const _0x2bc52e=this['renderSessionsTimeline'](_0x3b0bc7,_0x1508fa),_0x31e85e=_0x2bc52e[_0x2e91c0(0x2ca)]('\x0a');for(const _0x1bf963 of _0x31e85e){if(_0x1bf963['startsWith'](_0x2e91c0(0x350))||_0x1bf963[_0x2e91c0(0x2d4)](/^\s+\d{4}-\d{2}-\d{2}/))_0x3eb66d=_0x1bf963;else{if(_0x1bf963['match'](/^[✅❌🔄🛑⏳]/)){const _0x649a6b=_0x1bf963[_0x2e91c0(0x2d4)](/#(\d+)/),_0x77203d=_0x649a6b?_0x649a6b[0x1]:null,_0x56f129=_0x77203d?_0x1d3678[_0x2e91c0(0x1bf)](_0x77203d)||null:null,_0x39f0f8=_0x3b0bc7[_0x2e91c0(0x331)](_0x1824a3=>_0x1824a3['id']===_0x77203d),_0x477ee2=_0x39f0f8?.['project']?.[_0x2e91c0(0x1c3)]||'';_0x2b0afa[_0x2e91c0(0x377)]({'displayLine':_0x1bf963,'attemptId':_0x56f129,'projectName':_0x477ee2});}}}return{'timelineRows':_0x2b0afa,'timeAxisHeader':_0x3eb66d};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a54_0x2a0943(0x2b5);['description']=a54_0x2a0943(0x1d9);async[a54_0x2a0943(0x295)](_0x5a96c5){const _0x5eb72f=a54_0x2a0943,{options:_0x48e602,args:_0x349fc2,tdx:_0x56b2fc}=_0x5a96c5,_0x37ba8d=this['parseProjectWorkflowPattern'](_0x349fc2,_0x48e602);if(!_0x37ba8d)return 0x1;const {projectName:_0x406218,workflowName:_0x1c5053}=_0x37ba8d,_0xf4840b=_0x48e602['includeRetried'];if(_0x48e602[_0x5eb72f(0x31f)]){if(_0x406218&&_0x1c5053)console[_0x5eb72f(0x2ae)](_0x5eb72f(0x24f)+_0x406218+'.'+_0x1c5053);else _0x406218&&console[_0x5eb72f(0x2ae)](_0x5eb72f(0x2d5)+_0x406218);_0xf4840b&&console[_0x5eb72f(0x2ae)](_0x5eb72f(0x2e7));}const _0x1eb104=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x56b2fc[_0x5eb72f(0x2f9)]['attempts']({'projectName':_0x406218,'workflowName':_0x1c5053,'includeRetried':_0xf4840b,'limit':_0x48e602[_0x5eb72f(0x34d)]}),{'verbose':_0x48e602[_0x5eb72f(0x31f)]}),_0x267641=_0x1eb104[_0x5eb72f(0x2c0)],_0x3ed299=_0x48e602[_0x5eb72f(0x34d)]||0x64,_0x26c7f2=_0x267641['length']>=_0x3ed299?a54_0x13943d[_0x5eb72f(0x31c)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x5eb72f(0x2ae)]('✔\x20Found\x20'+_0x267641[_0x5eb72f(0x2c2)]+_0x5eb72f(0x212)+(_0x267641[_0x5eb72f(0x2c2)]!==0x1?'s':'')+_0x26c7f2);if(_0x48e602['format']===_0x5eb72f(0x200)||_0x48e602[_0x5eb72f(0x352)]===_0x5eb72f(0x291)||_0x48e602['format']===_0x5eb72f(0x311))await handleSDKOutput(_0x267641,_0x48e602);else{if(_0x267641[_0x5eb72f(0x2c2)]===0x0){if(_0x406218&&_0x1c5053)console['log'](_0x5eb72f(0x28a)+_0x406218+'.'+_0x1c5053);else _0x406218?console[_0x5eb72f(0x31e)](_0x5eb72f(0x1dd)+_0x406218):console[_0x5eb72f(0x31e)](_0x5eb72f(0x368));}else{const _0x52f395=_0x48e602[_0x5eb72f(0x1e2)],_0x29fde9=_0x267641[_0x5eb72f(0x285)](_0x1a715e=>{const _0x3273ce=_0x5eb72f,_0x5ccce1=a54_0x13943d[_0x3273ce(0x31c)]('#'+_0x1a715e['id']),_0x14fac3=_0x1a715e[_0x3273ce(0x330)]?.['id'],_0xe46731=_0x1a715e[_0x3273ce(0x1f8)]||_0x1a715e['sessionId'],_0x1eb4e0=_0x14fac3&&_0xe46731?hyperlink(_0x5ccce1,getWorkflowAttemptUrl(_0x52f395,_0x14fac3,_0xe46731,_0x1a715e['id'])):_0x5ccce1,{icon:_0x4a42b8,text:_0x3c3abb}=getAttemptStatusDisplay(_0x1a715e),_0x580766=(_0x1a715e[_0x3273ce(0x330)]?.['name']||'?')+'.'+(_0x1a715e[_0x3273ce(0x2f9)]?.[_0x3273ce(0x1c3)]||'?'),_0x3edb0c=_0x1a715e[_0x3273ce(0x36a)]?a54_0x13943d[_0x3273ce(0x31c)](_0x1a715e[_0x3273ce(0x36a)]):'';return(_0x1eb4e0+'\x20'+_0x4a42b8+(_0x3c3abb?'\x20'+_0x3c3abb:'')+'\x20'+_0x580766+'\x20'+_0x3edb0c)['trimEnd']();});await writeOutput(_0x29fde9[_0x5eb72f(0x219)]('\x0a'),_0x48e602['output'],_0x5eb72f(0x354));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x1c2);['description']='Show\x20specific\x20attempt\x20details';async['execute'](_0x3a3a83){const _0x10189d=a54_0x2a0943,{options:_0x5e1a10,args:_0x20c12d,tdx:_0x4b412c}=_0x3a3a83,_0x2c3234=_0x20c12d[0x0];if(!_0x2c3234)return console[_0x10189d(0x2ae)](_0x10189d(0x231)),0x1;_0x5e1a10['verbose']&&console[_0x10189d(0x2ae)](_0x10189d(0x310)+_0x2c3234);const _0x499f81=await withSpinner(_0x10189d(0x2f3),()=>_0x4b412c['workflow'][_0x10189d(0x1ff)](_0x2c3234),{'verbose':_0x5e1a10[_0x10189d(0x31f)]}),_0x1d2b73=_0x499f81[_0x10189d(0x2c0)];let _0x4d70dd;!_0x1d2b73['done']?_0x4d70dd=_0x1d2b73[_0x10189d(0x2a9)]?_0x10189d(0x27c):_0x10189d(0x2ea):_0x4d70dd=_0x1d2b73['success']?_0x10189d(0x204):_0x10189d(0x2ae);let _0x112131;if(_0x1d2b73[_0x10189d(0x34e)]&&_0x1d2b73[_0x10189d(0x2e0)]){const _0x4f9067=new Date(_0x1d2b73['createdAt'])['getTime'](),_0x120122=new Date(_0x1d2b73[_0x10189d(0x2e0)])[_0x10189d(0x29c)]();_0x112131=Math[_0x10189d(0x277)]((_0x120122-_0x4f9067)/0x3e8);}const _0x20712b={'attempt_id':_0x1d2b73['id'],'status':_0x4d70dd,..._0x1d2b73['index']!==undefined&&{'index':_0x1d2b73[_0x10189d(0x2bf)]},..._0x1d2b73[_0x10189d(0x330)]&&{'project':_0x1d2b73[_0x10189d(0x330)]['name']},..._0x1d2b73[_0x10189d(0x2f9)]&&{'workflow':_0x1d2b73[_0x10189d(0x2f9)]['name']},..._0x1d2b73[_0x10189d(0x1fe)]&&{'session_id':_0x1d2b73[_0x10189d(0x1fe)]},..._0x1d2b73[_0x10189d(0x36a)]&&{'session_time':_0x1d2b73[_0x10189d(0x36a)]},..._0x1d2b73[_0x10189d(0x358)]&&{'retry_attempt':_0x1d2b73[_0x10189d(0x358)]},..._0x112131!==undefined&&{'duration_sec':_0x112131},..._0x1d2b73[_0x10189d(0x34e)]&&{'created_at':_0x1d2b73[_0x10189d(0x34e)]},..._0x1d2b73['finishedAt']&&{'finished_at':_0x1d2b73[_0x10189d(0x2e0)]},...Object[_0x10189d(0x1c9)](_0x1d2b73[_0x10189d(0x253)])[_0x10189d(0x2c2)]>0x0&&{'params':_0x1d2b73[_0x10189d(0x253)]}};return await handleSingleObjectOutput(_0x20712b,_0x5e1a10),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a54_0x2a0943(0x23d);[a54_0x2a0943(0x337)]='Show\x20tasks\x20for\x20an\x20attempt';async[a54_0x2a0943(0x295)](_0x5d5f0b){const _0x3b4b8e=a54_0x2a0943,{options:_0x1d8e9d,args:_0x238534,tdx:_0x1fc44c}=_0x5d5f0b,_0x341448=_0x238534[0x0];if(!_0x341448)return console[_0x3b4b8e(0x2ae)](_0x3b4b8e(0x231)),0x1;const _0x40ddff=_0x1d8e9d[_0x3b4b8e(0x209)];_0x1d8e9d[_0x3b4b8e(0x31f)]&&(console[_0x3b4b8e(0x2ae)](_0x3b4b8e(0x310)+_0x341448),_0x40ddff&&console['error'](_0x3b4b8e(0x359)));const _0x2d1053=await withSpinner(_0x3b4b8e(0x371),()=>_0x1fc44c[_0x3b4b8e(0x2f9)]['tasks'](_0x341448,_0x40ddff||![]),{'verbose':_0x1d8e9d[_0x3b4b8e(0x31f)]}),_0x169f81=_0x2d1053['data'];return console[_0x3b4b8e(0x2ae)]('✔\x20Found\x20'+_0x169f81['length']+_0x3b4b8e(0x1de)+(_0x169f81['length']!==0x1?'s':'')),await handleSDKOutput(_0x169f81,_0x1d8e9d),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a54_0x2a0943(0x1c4);['description']=a54_0x2a0943(0x283);async[a54_0x2a0943(0x295)](_0x4483d1){const _0x472c3d=a54_0x2a0943,{options:_0x571506,args:_0xe8eb53,tdx:_0x3bdc4c}=_0x4483d1,_0x22aeae=_0xe8eb53[0x0];let _0x36ff36=_0xe8eb53[0x1];if(!_0x22aeae)return console['error'](_0x472c3d(0x231)),0x1;_0x571506['verbose']&&(console[_0x472c3d(0x2ae)](_0x472c3d(0x310)+_0x22aeae),_0x36ff36&&console[_0x472c3d(0x2ae)](_0x472c3d(0x308)+_0x36ff36));const _0x4a377f=await withSpinner(_0x472c3d(0x30c),()=>_0x3bdc4c['workflow'][_0x472c3d(0x286)](_0x22aeae,_0x36ff36),{'verbose':_0x571506[_0x472c3d(0x31f)]}),_0x47c28c=_0x4a377f[_0x472c3d(0x2c0)];if(_0x47c28c['length']===0x0)return console['error'](_0x472c3d(0x2a0)),0x0;if(!_0x36ff36&&(_0x571506[_0x472c3d(0x200)]||_0x571506['format']))return await handleSDKOutput(_0x47c28c,_0x571506),0x0;if(!_0x36ff36){const _0x114fe9=_0x47c28c['map'](_0x249ec2=>({'title':_0x249ec2[_0x472c3d(0x343)]+'\x20('+formatBytes(_0x249ec2[_0x472c3d(0x369)])+')','value':_0x249ec2[_0x472c3d(0x343)]})),_0x20716e=await a54_0x1b2330({'type':_0x472c3d(0x336),'name':_0x472c3d(0x27e),'message':_0x472c3d(0x236),'choices':_0x114fe9});if(!_0x20716e[_0x472c3d(0x27e)])return console[_0x472c3d(0x2ae)](_0x472c3d(0x22c)),0x0;_0x36ff36=_0x20716e[_0x472c3d(0x27e)];}const _0x21dd97=await withSpinner(_0x472c3d(0x1c5),()=>_0x3bdc4c[_0x472c3d(0x2f9)][_0x472c3d(0x1d1)](_0x22aeae,_0x36ff36),{'verbose':_0x571506[_0x472c3d(0x31f)]}),_0x308e06=_0x21dd97['data'];return _0x308e06?console[_0x472c3d(0x31e)](_0x308e06):console[_0x472c3d(0x2ae)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x386);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x24d);async[a54_0x2a0943(0x295)](_0xc63e18){const _0x1192f2=a54_0x2a0943,{options:_0x2d2927,args:_0x5b5d5a,tdx:_0x292140}=_0xc63e18,_0xd145ee=_0x5b5d5a[0x0];if(!_0xd145ee)return console[_0x1192f2(0x2ae)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x39eff5=_0x2d2927[_0x1192f2(0x254)];_0x2d2927[_0x1192f2(0x31f)]&&(console['error'](_0x1192f2(0x310)+_0xd145ee),_0x39eff5&&console[_0x1192f2(0x2ae)](_0x1192f2(0x2bd)+_0x39eff5));if(!_0x2d2927['yes']){if(!isInteractive())return console[_0x1192f2(0x2ae)](a54_0x13943d['red'](_0x1192f2(0x252)),_0x1192f2(0x2e4)),console[_0x1192f2(0x2ae)](a54_0x13943d[_0x1192f2(0x31c)](_0x1192f2(0x25d))),0x1;const _0x543766=await confirmKey(_0x1192f2(0x29b)+_0xd145ee+'?');if(!_0x543766)return console['error'](a54_0x13943d['yellow'](_0x1192f2(0x22c))),0x1;}const _0x4f132f=await withSpinner('Killing\x20attempt...',()=>_0x292140[_0x1192f2(0x2f9)][_0x1192f2(0x1f5)](_0xd145ee,_0x39eff5),{'verbose':_0x2d2927[_0x1192f2(0x31f)]}),_0x395540=_0x4f132f[_0x1192f2(0x2c0)];return console['error']('✔\x20'+_0x395540),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]='workflow:retry';['description']=a54_0x2a0943(0x255);async[a54_0x2a0943(0x295)](_0x2ec92c){const _0xcfac80=a54_0x2a0943,{options:_0x198308,args:_0x39c043,tdx:_0x306e7e}=_0x2ec92c,_0x31478a=_0x39c043[0x0];if(!_0x31478a)return console[_0xcfac80(0x2ae)](_0xcfac80(0x270)),console[_0xcfac80(0x2ae)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x14d630=![],_0x30a302=_0x31478a;if(_0x31478a[_0xcfac80(0x37d)](_0xcfac80(0x22f)))_0x14d630=!![],_0x30a302=_0x31478a[_0xcfac80(0x259)](0x8);else{if(_0x31478a[_0xcfac80(0x37d)](_0xcfac80(0x241)))_0x14d630=![],_0x30a302=_0x31478a['substring'](0x8);else return console['error'](_0xcfac80(0x342)),console[_0xcfac80(0x2ae)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x5dfb3e=_0x198308['fromTask'],_0x4945d4=_0x198308[_0xcfac80(0x220)],_0x31103b=_0x198308[_0xcfac80(0x253)],_0x2c6504=_0x198308[_0xcfac80(0x328)];_0x198308[_0xcfac80(0x31f)]&&(console[_0xcfac80(0x2ae)]('Target:\x20'+(_0x14d630?'session':_0xcfac80(0x1ff))+'\x20'+_0x30a302),_0x5dfb3e&&console[_0xcfac80(0x2ae)](_0xcfac80(0x35c)+_0x5dfb3e),_0x4945d4&&console[_0xcfac80(0x2ae)]('Resume\x20from:\x20'+_0x4945d4),_0x31103b&&console[_0xcfac80(0x2ae)]('Params:\x20'+_0x31103b),_0x2c6504&&console[_0xcfac80(0x2ae)](_0xcfac80(0x303)));let _0xf981ed;if(_0x31103b)try{if(_0x31103b[_0xcfac80(0x37d)]('@')){const _0x300e5c=await import(_0xcfac80(0x1f1)),_0x56a708=_0x31103b[_0xcfac80(0x259)](0x1),_0x19207c=await _0x300e5c[_0xcfac80(0x2e2)](_0x56a708,'utf-8');_0xf981ed=JSON['parse'](_0x19207c);}else _0xf981ed=JSON[_0xcfac80(0x1bd)](_0x31103b);}catch{return console[_0xcfac80(0x2ae)](_0xcfac80(0x24b)),0x1;}if(!_0x198308[_0xcfac80(0x340)]){if(!isInteractive())return console[_0xcfac80(0x2ae)](a54_0x13943d[_0xcfac80(0x1fc)](_0xcfac80(0x252)),_0xcfac80(0x2e4)),console[_0xcfac80(0x2ae)](a54_0x13943d['dim'](_0xcfac80(0x25d))),0x1;const _0x4f1441=await confirmKey(_0xcfac80(0x35b)+(_0x14d630?_0xcfac80(0x229):_0xcfac80(0x1ff))+'\x20'+_0x30a302+'?');if(!_0x4f1441)return console['error'](a54_0x13943d[_0xcfac80(0x2f5)](_0xcfac80(0x22c))),0x1;}let _0x928dec;_0x14d630?_0x928dec=await withSpinner(_0xcfac80(0x25b),()=>_0x306e7e[_0xcfac80(0x2f9)]['retrySession'](_0x30a302,{'fromTask':_0x5dfb3e,'retryParams':_0xf981ed}),{'verbose':_0x198308['verbose']}):_0x928dec=await withSpinner('Retrying\x20attempt...',()=>_0x306e7e[_0xcfac80(0x2f9)][_0xcfac80(0x281)](_0x30a302,{'resumeFrom':_0x4945d4,'retryParams':_0xf981ed,'force':_0x2c6504}),{'verbose':_0x198308[_0xcfac80(0x31f)]});const _0x597602=_0x928dec[_0xcfac80(0x2c0)];return console[_0xcfac80(0x2ae)](_0xcfac80(0x306)),console[_0xcfac80(0x2ae)](_0xcfac80(0x2d1)+_0x597602['attemptId']),console[_0xcfac80(0x2ae)]('\x20\x20Session\x20ID:\x20'+_0x597602[_0xcfac80(0x1fe)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x333);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x2ad);async[a54_0x2a0943(0x295)](_0x4aee00){const _0x331a3b=a54_0x2a0943,{options:_0x28eac7,args:_0x2679aa,tdx:_0x2dad9a}=_0x4aee00;let _0x44c783=_0x2679aa[0x0];if(!_0x44c783){const _0x3361c1=this[_0x331a3b(0x1d4)]([],_0x28eac7),_0x9a86fb=await withSpinner(_0x331a3b(0x341),()=>_0x2dad9a[_0x331a3b(0x2f9)][_0x331a3b(0x1d5)](_0x3361c1,{'limit':_0x28eac7[_0x331a3b(0x34d)]}),{'verbose':_0x28eac7['verbose']}),_0x96bd32=_0x9a86fb[_0x331a3b(0x2c0)];if(_0x96bd32[_0x331a3b(0x2c2)]===0x0)return console[_0x331a3b(0x2ae)](_0x331a3b(0x293)),!_0x3361c1&&console['error'](a54_0x13943d[_0x331a3b(0x31c)](_0x331a3b(0x362))),0x1;const _0xa1f094=_0x96bd32[_0x331a3b(0x285)](_0x4a8968=>({'title':_0x4a8968['project']?.[_0x331a3b(0x1c3)]+'.'+_0x4a8968[_0x331a3b(0x1c3)],'value':_0x4a8968[_0x331a3b(0x330)]?.[_0x331a3b(0x1c3)]+'.'+_0x4a8968[_0x331a3b(0x1c3)],'description':_0x4a8968['revision']?_0x331a3b(0x26b)+_0x4a8968[_0x331a3b(0x271)]:undefined})),_0x51a273=await a54_0x1b2330({'type':_0x331a3b(0x336),'name':'workflow','message':'Select\x20a\x20workflow\x20to\x20run','choices':_0xa1f094});if(!_0x51a273[_0x331a3b(0x2f9)])return 0x1;_0x44c783=_0x51a273[_0x331a3b(0x2f9)];}if(!_0x44c783[_0x331a3b(0x2c6)]('.')){const _0x58ea46=this[_0x331a3b(0x1d4)]([],_0x28eac7);if(_0x58ea46)_0x44c783=_0x58ea46+'.'+_0x44c783;else return console['error'](a54_0x13943d[_0x331a3b(0x1fc)](_0x331a3b(0x33f)),_0x331a3b(0x376)),console[_0x331a3b(0x2ae)](a54_0x13943d['dim'](_0x331a3b(0x362))),0x1;}const _0xfd6e51=_0x28eac7[_0x331a3b(0x21e)],_0x43ad2a=_0x28eac7[_0x331a3b(0x36a)],_0x401b11={};if(_0xfd6e51&&Array['isArray'](_0xfd6e51))for(const _0x2f60c7 of _0xfd6e51){const _0x2c4698=_0x2f60c7['indexOf']('=');if(_0x2c4698===-0x1)return console[_0x331a3b(0x2ae)](_0x331a3b(0x27f)+_0x2f60c7),console[_0x331a3b(0x2ae)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x1b5193=_0x2f60c7[_0x331a3b(0x259)](0x0,_0x2c4698),_0x30b29f=_0x2f60c7[_0x331a3b(0x259)](_0x2c4698+0x1);try{_0x401b11[_0x1b5193]=JSON[_0x331a3b(0x1bd)](_0x30b29f);}catch{_0x401b11[_0x1b5193]=_0x30b29f;}}_0x28eac7[_0x331a3b(0x31f)]&&(console['error'](_0x331a3b(0x27a)+_0x44c783),Object[_0x331a3b(0x1c9)](_0x401b11)['length']>0x0&&console[_0x331a3b(0x2ae)]('Parameters:\x20'+JSON[_0x331a3b(0x327)](_0x401b11)),_0x43ad2a&&console['error'](_0x331a3b(0x20d)+_0x43ad2a));const _0x151614=await withSpinner(_0x331a3b(0x22b),()=>_0x2dad9a['workflow'][_0x331a3b(0x28b)](_0x44c783,_0x401b11,{'sessionTime':_0x43ad2a}),{'verbose':_0x28eac7[_0x331a3b(0x31f)]}),_0x41c3fa=_0x151614[_0x331a3b(0x2c0)];console['error'](_0x331a3b(0x29e)),console[_0x331a3b(0x2ae)](_0x331a3b(0x2b7)+_0x41c3fa['id']),console['error'](_0x331a3b(0x256)+_0x41c3fa[_0x331a3b(0x1fe)]),console[_0x331a3b(0x2ae)](_0x331a3b(0x33b)+_0x41c3fa['project']?.[_0x331a3b(0x1c3)]),console['error'](_0x331a3b(0x35e)+_0x41c3fa[_0x331a3b(0x2f9)]?.['name']);if(_0x41c3fa[_0x331a3b(0x330)]?.['id']&&_0x41c3fa[_0x331a3b(0x1fe)]&&_0x41c3fa['id']){const _0x5ca5ae=_0x28eac7[_0x331a3b(0x1e2)],_0x4fe8cd=getConsoleUrl(_0x5ca5ae,_0x331a3b(0x33a)+_0x41c3fa[_0x331a3b(0x330)]['id']+_0x331a3b(0x1cd)+_0x41c3fa[_0x331a3b(0x1fe)]+_0x331a3b(0x2d0)+_0x41c3fa['id']);console[_0x331a3b(0x2ae)](_0x331a3b(0x2fd)+a54_0x13943d['cyan'](_0x4fe8cd));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x2be);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x2df);async[a54_0x2a0943(0x295)](_0x248ed9){const _0x453fa1=a54_0x2a0943,{options:_0x4410bf,args:_0x28b482,tdx:_0xa9dc0e}=_0x248ed9,_0x59629d=_0x28b482[0x0],_0x5a42d8=_0x28b482[0x1]||'.';if(!_0x59629d)return console[_0x453fa1(0x2ae)](_0x453fa1(0x21c)),console['error'](_0x453fa1(0x24a)),0x1;const _0x54d193=_0x4410bf[_0x453fa1(0x271)];_0x4410bf['verbose']&&(console['error']('Project:\x20'+_0x59629d),console[_0x453fa1(0x2ae)](_0x453fa1(0x36e)+_0x5a42d8),_0x54d193&&console[_0x453fa1(0x2ae)](_0x453fa1(0x20c)+_0x54d193));const _0x3cd632=await withSpinner(_0x453fa1(0x1ce)+_0x59629d+_0x453fa1(0x320),()=>_0xa9dc0e[_0x453fa1(0x2f9)][_0x453fa1(0x224)](_0x59629d,_0x5a42d8,{'revision':_0x54d193}),{'verbose':_0x4410bf[_0x453fa1(0x31f)]}),_0x128565=_0x3cd632[_0x453fa1(0x2c0)];return console[_0x453fa1(0x2ae)](_0x453fa1(0x32a)+_0x128565[_0x453fa1(0x282)]),console[_0x453fa1(0x2ae)](_0x453fa1(0x1f0)+_0x128565['revision']),console[_0x453fa1(0x2ae)](_0x453fa1(0x250)+_0x128565[_0x453fa1(0x2d6)]),console[_0x453fa1(0x2ae)](_0x453fa1(0x21b)+_0x5a42d8+'/'+_0x128565[_0x453fa1(0x282)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x357);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x1da);async[a54_0x2a0943(0x295)](_0x321086){const _0x14f715=a54_0x2a0943,{options:_0x1813d6,args:_0x11cf39,tdx:_0x3a3753}=_0x321086;let _0x407471='.',_0x36373c=_0x1813d6[_0x14f715(0x1c3)];if(_0x11cf39[0x0]){const {promises:_0x1a246c}=await import('fs');try{const _0x58b509=await _0x1a246c['stat'](_0x11cf39[0x0]);if(_0x58b509[_0x14f715(0x2af)]())_0x407471=_0x11cf39[0x0];else return console[_0x14f715(0x2ae)](_0x14f715(0x2cb)+_0x11cf39[0x0]+_0x14f715(0x276)),0x1;}catch{_0x36373c=_0x11cf39[0x0],_0x407471='.';}}const _0x3b4970=_0x1813d6[_0x14f715(0x271)],_0x410452=_0x1813d6[_0x14f715(0x251)];_0x1813d6['verbose']&&(console[_0x14f715(0x2ae)](_0x14f715(0x28c)+_0x407471),_0x36373c&&console[_0x14f715(0x2ae)](_0x14f715(0x345)+_0x36373c),_0x3b4970&&console[_0x14f715(0x2ae)](_0x14f715(0x20c)+_0x3b4970),_0x410452&&console['error'](_0x14f715(0x2e8)));const _0x15f00b=await withSpinner(_0x14f715(0x1c7),()=>_0x3a3753[_0x14f715(0x2f9)]['push'](_0x407471,{'projectName':_0x36373c,'revision':_0x3b4970,'skipValidation':_0x410452}),{'verbose':_0x1813d6[_0x14f715(0x31f)]}),_0x8ba727=_0x15f00b['data'];return console['error'](_0x14f715(0x25a)+_0x8ba727[_0x14f715(0x282)]),console[_0x14f715(0x2ae)](_0x14f715(0x2db)+_0x8ba727[_0x14f715(0x360)]),console[_0x14f715(0x2ae)]('\x20\x20Revision:\x20'+_0x8ba727[_0x14f715(0x271)]),await this[_0x14f715(0x388)](_0x3a3753,_0x8ba727['projectName'],_0x1813d6[_0x14f715(0x1e2)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x2c8);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x2fe);async['execute'](_0x49d05f){const _0x31e613=a54_0x2a0943,{options:_0x4eeb45,args:_0xf0d337,tdx:_0x2c0d0a}=_0x49d05f,_0x2014f7=_0xf0d337[0x0],_0x395c51=_0xf0d337[0x1];if(!_0x2014f7)return console['error'](a54_0x13943d[_0x31e613(0x1fc)](_0x31e613(0x33f)),_0x31e613(0x24c)),console[_0x31e613(0x2ae)](a54_0x13943d[_0x31e613(0x31c)](_0x31e613(0x207))),0x1;const _0x5c4ff3=_0x4eeb45[_0x31e613(0x271)];_0x4eeb45['verbose']&&(console[_0x31e613(0x2ae)]('Project:\x20'+_0x2014f7),_0x395c51&&console[_0x31e613(0x2ae)]('Target\x20directory:\x20'+_0x395c51),_0x5c4ff3&&console[_0x31e613(0x2ae)]('Revision:\x20'+_0x5c4ff3),_0x4eeb45[_0x31e613(0x21f)]&&console[_0x31e613(0x2ae)](_0x31e613(0x329)));const _0x15c4c7=await withSpinner(_0x31e613(0x272)+_0x2014f7+_0x31e613(0x320),()=>_0x2c0d0a[_0x31e613(0x2f9)][_0x31e613(0x1db)](_0x2014f7,{'targetDir':_0x395c51,'revision':_0x5c4ff3}),{'verbose':_0x4eeb45[_0x31e613(0x31f)]}),_0xa2dc45=_0x15c4c7['data'];_0xa2dc45['isNewProject']?console[_0x31e613(0x2ae)](_0x31e613(0x237)+_0xa2dc45[_0x31e613(0x282)]):console[_0x31e613(0x2ae)](_0x31e613(0x20f)+_0xa2dc45[_0x31e613(0x282)]);console['error'](_0x31e613(0x1f0)+_0xa2dc45[_0x31e613(0x271)]),console[_0x31e613(0x2ae)](_0x31e613(0x2cc)+(a54_0x4c5432[_0x31e613(0x1fa)](process['cwd'](),_0xa2dc45[_0x31e613(0x1c8)])||'.')),console[_0x31e613(0x2ae)](_0x31e613(0x2e3)+a54_0x13943d[_0x31e613(0x211)]('+'+_0xa2dc45['summary'][_0x31e613(0x384)]+_0x31e613(0x30a))+',\x20'+(a54_0x13943d[_0x31e613(0x2f5)]('~'+_0xa2dc45[_0x31e613(0x301)][_0x31e613(0x1cb)]+_0x31e613(0x378))+',\x20')+(a54_0x13943d[_0x31e613(0x1fc)]('-'+_0xa2dc45[_0x31e613(0x301)][_0x31e613(0x1e1)]+_0x31e613(0x29a))+',\x20')+(''+a54_0x13943d[_0x31e613(0x31c)](_0xa2dc45[_0x31e613(0x301)][_0x31e613(0x1dc)]+_0x31e613(0x1d0))));for(const _0x1c826d of _0xa2dc45[_0x31e613(0x2e1)]){_0x1c826d[_0x31e613(0x275)]===_0x31e613(0x1cb)&&_0x1c826d[_0x31e613(0x27b)]&&(console[_0x31e613(0x2ae)]('\x0a'+a54_0x13943d[_0x31e613(0x38a)](_0x31e613(0x2d7)+_0x1c826d[_0x31e613(0x26e)])),console['error'](_0x1c826d['diff']));}if(!_0xa2dc45['hasChanges'])return saveSessionContext({'workflow_project':_0xa2dc45[_0x31e613(0x282)]},_0x4eeb45[_0x31e613(0x229)]),console[_0x31e613(0x2ae)](a54_0x13943d['green']('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x31e613(0x2ae)](a54_0x13943d['dim'](_0x31e613(0x380)+_0xa2dc45['projectName'])),0x0;if(_0x4eeb45['dryRun'])return console[_0x31e613(0x2ae)](a54_0x13943d['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x4eeb45['yes']){if(!isInteractive())return console['error'](a54_0x13943d[_0x31e613(0x1fc)](_0x31e613(0x252)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a54_0x13943d[_0x31e613(0x31c)](_0x31e613(0x25d))),0x1;const _0x303dc1=await confirmKey(_0x31e613(0x206));if(!_0x303dc1)return console['error'](a54_0x13943d[_0x31e613(0x2f5)](_0x31e613(0x22c)),_0x31e613(0x2eb)),0x1;}await withSpinner('Writing\x20files...',()=>_0x2c0d0a['workflow'][_0x31e613(0x1b9)](_0xa2dc45,{'revision':_0x5c4ff3}),{'verbose':_0x4eeb45['verbose']}),saveSessionContext({'workflow_project':_0xa2dc45[_0x31e613(0x282)]},_0x4eeb45[_0x31e613(0x229)]),console[_0x31e613(0x2ae)](a54_0x13943d[_0x31e613(0x211)](_0x31e613(0x353)));const _0x3562af=a54_0x4c5432[_0x31e613(0x1fa)](process[_0x31e613(0x239)](),_0xa2dc45['targetDir'])||'.';return console['error'](a54_0x13943d[_0x31e613(0x31c)]('\x20\x20Location:\x20'+_0x3562af)),console[_0x31e613(0x2ae)](a54_0x13943d[_0x31e613(0x31c)](_0x31e613(0x380)+_0xa2dc45[_0x31e613(0x282)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x2f8);['description']=a54_0x2a0943(0x2ef);async['execute'](_0x33e279){const _0x417029=a54_0x2a0943,{options:_0x538de4,args:_0x8a2a78,tdx:_0x307cc4}=_0x33e279,_0x4f7bfd=this['resolveProjectDir'](_0x8a2a78,_0x538de4),_0x2467a0=_0x538de4[_0x417029(0x271)],_0x4af9d7=_0x538de4[_0x417029(0x251)];_0x538de4['verbose']&&(_0x4f7bfd&&console[_0x417029(0x2ae)](_0x417029(0x2a5)+_0x4f7bfd),_0x2467a0&&console[_0x417029(0x2ae)](_0x417029(0x20c)+_0x2467a0),_0x538de4[_0x417029(0x21f)]&&console['error'](_0x417029(0x329)),_0x4af9d7&&console[_0x417029(0x2ae)](_0x417029(0x2e8)));let _0xbb5d5c;try{_0xbb5d5c=await withSpinner(_0x417029(0x37c),()=>_0x307cc4['workflow']['preparePushProject']({'sourceDir':_0x4f7bfd,'revision':_0x2467a0,'skipValidation':_0x4af9d7}),{'verbose':_0x538de4[_0x417029(0x31f)]});}catch(_0x24f935){if(_0x24f935 instanceof Error&&_0x24f935[_0x417029(0x266)][_0x417029(0x2c6)](_0x417029(0x208)))return console['error'](a54_0x13943d[_0x417029(0x1fc)](_0x417029(0x33f)),_0x417029(0x278)),_0x538de4[_0x417029(0x2fb)]?console[_0x417029(0x2ae)](a54_0x13943d[_0x417029(0x31c)](_0x417029(0x2a4)+_0x538de4[_0x417029(0x2fb)]+_0x417029(0x247)+_0x538de4[_0x417029(0x2fb)]+'\x27')):console[_0x417029(0x2ae)](a54_0x13943d['dim'](_0x417029(0x210))),0x1;throw _0x24f935;}const _0x26df14=_0xbb5d5c[_0x417029(0x2c0)];console[_0x417029(0x2ae)](_0x417029(0x35a)+_0x26df14['projectName']),console[_0x417029(0x2ae)]('\x20\x20Source:\x20'+_0x26df14[_0x417029(0x1f2)]),console[_0x417029(0x2ae)]('\x20\x20Revision:\x20'+_0x26df14[_0x417029(0x271)]),console['error'](_0x417029(0x2e3)+a54_0x13943d['green']('+'+_0x26df14[_0x417029(0x301)]['new']+'\x20new')+',\x20'+(a54_0x13943d[_0x417029(0x2f5)]('~'+_0x26df14[_0x417029(0x301)][_0x417029(0x1cb)]+_0x417029(0x378))+',\x20')+(a54_0x13943d[_0x417029(0x1fc)]('-'+_0x26df14[_0x417029(0x301)][_0x417029(0x1e1)]+_0x417029(0x29a))+',\x20')+(''+a54_0x13943d[_0x417029(0x31c)](_0x26df14[_0x417029(0x301)]['unchanged']+_0x417029(0x1d0))));for(const _0x26c166 of _0x26df14['changes']){_0x26c166[_0x417029(0x275)]==='modified'&&_0x26c166[_0x417029(0x27b)]&&(console[_0x417029(0x2ae)]('\x0a'+a54_0x13943d['cyan'](_0x417029(0x2d7)+_0x26c166[_0x417029(0x26e)])),console[_0x417029(0x2ae)](_0x26c166['diff']));}if(!_0x26df14[_0x417029(0x25c)])return console['error'](a54_0x13943d[_0x417029(0x211)](_0x417029(0x249))),await this[_0x417029(0x388)](_0x307cc4,_0x26df14[_0x417029(0x282)],_0x538de4[_0x417029(0x1e2)]),0x0;if(_0x538de4[_0x417029(0x21f)])return console[_0x417029(0x2ae)](a54_0x13943d[_0x417029(0x2f5)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x538de4[_0x417029(0x340)]){if(!isInteractive())return console['error'](a54_0x13943d[_0x417029(0x1fc)]('\x0aError:'),_0x417029(0x2e4)),console[_0x417029(0x2ae)](a54_0x13943d[_0x417029(0x31c)](_0x417029(0x25d))),0x1;const _0x5a9b28=await confirmKey(_0x417029(0x21d));if(!_0x5a9b28)return console[_0x417029(0x2ae)](a54_0x13943d[_0x417029(0x2f5)](_0x417029(0x22c)),_0x417029(0x36d)),0x1;}const _0x36fbb6=await withSpinner(_0x417029(0x262),()=>_0x307cc4['workflow'][_0x417029(0x2b0)](_0x26df14),{'verbose':_0x538de4[_0x417029(0x31f)]}),_0x1e7828=_0x36fbb6[_0x417029(0x2c0)];return console['error'](a54_0x13943d[_0x417029(0x211)](_0x417029(0x292))),console['error'](_0x417029(0x2db)+_0x1e7828[_0x417029(0x360)]),console[_0x417029(0x2ae)](_0x417029(0x1f0)+_0x1e7828[_0x417029(0x271)]),await this[_0x417029(0x388)](_0x307cc4,_0x1e7828[_0x417029(0x282)],_0x538de4[_0x417029(0x1e2)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a54_0x2a0943(0x2f6);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x323);async[a54_0x2a0943(0x295)](_0x361acd){const _0x1cd8de=a54_0x2a0943,{options:_0x5ed3e8,args:_0x3df2d8,tdx:_0x31c5e5}=_0x361acd,_0x50dccf=this['resolveProjectDir'](_0x3df2d8,_0x5ed3e8),_0x29dafb=_0x5ed3e8[_0x1cd8de(0x1c3)],_0xab1196=_0x5ed3e8[_0x1cd8de(0x271)],_0x5509ac=_0x5ed3e8[_0x1cd8de(0x251)];if(!_0x50dccf)return console[_0x1cd8de(0x2ae)](a54_0x13943d[_0x1cd8de(0x1fc)]('Error:'),_0x1cd8de(0x385)),console[_0x1cd8de(0x2ae)](a54_0x13943d['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x1cd8de(0x2ae)](a54_0x13943d['dim'](_0x1cd8de(0x280))),0x1;if(!_0x29dafb)return console[_0x1cd8de(0x2ae)](a54_0x13943d[_0x1cd8de(0x1fc)](_0x1cd8de(0x33f)),_0x1cd8de(0x290)),console[_0x1cd8de(0x2ae)](a54_0x13943d['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x5ed3e8['verbose']&&(console['error'](_0x1cd8de(0x2a5)+_0x50dccf),console[_0x1cd8de(0x2ae)]('New\x20project\x20name:\x20'+_0x29dafb),_0xab1196&&console[_0x1cd8de(0x2ae)](_0x1cd8de(0x20c)+_0xab1196),_0x5ed3e8['dryRun']&&console[_0x1cd8de(0x2ae)](_0x1cd8de(0x329)),_0x5509ac&&console[_0x1cd8de(0x2ae)](_0x1cd8de(0x2e8)));const _0x3cffbf=await withSpinner(_0x1cd8de(0x2b3),()=>_0x31c5e5[_0x1cd8de(0x2f9)][_0x1cd8de(0x319)](_0x50dccf,_0x29dafb,{'revision':_0xab1196,'skipValidation':_0x5509ac}),{'verbose':_0x5ed3e8['verbose']}),_0x79d7cc=_0x3cffbf[_0x1cd8de(0x2c0)];console[_0x1cd8de(0x2ae)](_0x1cd8de(0x335)+_0x79d7cc['sourceDir']);_0x79d7cc[_0x1cd8de(0x2c7)]&&console[_0x1cd8de(0x2ae)]('Source\x20project:\x20'+_0x79d7cc[_0x1cd8de(0x2c7)]);console[_0x1cd8de(0x2ae)](_0x1cd8de(0x307)+_0x79d7cc[_0x1cd8de(0x1e7)]),console['error'](_0x1cd8de(0x20c)+_0x79d7cc[_0x1cd8de(0x271)]),console[_0x1cd8de(0x2ae)](_0x1cd8de(0x1e8)+_0x79d7cc[_0x1cd8de(0x24e)]);_0x79d7cc[_0x1cd8de(0x34b)]&&(console['error'](a54_0x13943d[_0x1cd8de(0x2f5)](_0x1cd8de(0x2a2)+_0x79d7cc[_0x1cd8de(0x1e7)]+_0x1cd8de(0x317)+_0x79d7cc[_0x1cd8de(0x202)]+')')),console[_0x1cd8de(0x2ae)](a54_0x13943d[_0x1cd8de(0x2f5)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x5ed3e8[_0x1cd8de(0x21f)])return console[_0x1cd8de(0x2ae)](a54_0x13943d[_0x1cd8de(0x2f5)](_0x1cd8de(0x1bc))),0x0;if(!_0x5ed3e8[_0x1cd8de(0x340)]){if(!isInteractive())return console['error'](a54_0x13943d['red'](_0x1cd8de(0x252)),_0x1cd8de(0x2e4)),console[_0x1cd8de(0x2ae)](a54_0x13943d[_0x1cd8de(0x31c)](_0x1cd8de(0x25d))),0x1;const _0x417e40=_0x79d7cc[_0x1cd8de(0x2c7)]||a54_0x4c5432[_0x1cd8de(0x32d)](_0x50dccf),_0x26769f=_0x79d7cc[_0x1cd8de(0x34b)]?_0x1cd8de(0x35f)+_0x29dafb+_0x1cd8de(0x2fa):_0x1cd8de(0x289)+_0x417e40+_0x1cd8de(0x2f2)+_0x29dafb+'\x22?',_0x527df8=await confirmKey(_0x26769f);if(!_0x527df8)return console[_0x1cd8de(0x2ae)](a54_0x13943d['yellow'](_0x1cd8de(0x22c))),0x1;}const _0x48cfe9=await withSpinner(_0x79d7cc['targetExists']?_0x1cd8de(0x205)+_0x29dafb+_0x1cd8de(0x320):_0x1cd8de(0x23e)+_0x29dafb+_0x1cd8de(0x320),()=>_0x31c5e5[_0x1cd8de(0x2f9)]['executeCloneProject'](_0x79d7cc),{'verbose':_0x5ed3e8[_0x1cd8de(0x31f)]}),_0x34b1f6=_0x48cfe9['data'];return console[_0x1cd8de(0x2ae)](a54_0x13943d[_0x1cd8de(0x211)](_0x79d7cc['targetExists']?_0x1cd8de(0x35d):'✔\x20Clone\x20complete')),console['error'](_0x1cd8de(0x33b)+_0x34b1f6['newProjectName']),console[_0x1cd8de(0x2ae)](_0x1cd8de(0x2db)+_0x34b1f6[_0x1cd8de(0x37f)]),console['error'](_0x1cd8de(0x1f0)+_0x34b1f6['revision']),await this['showWorkflowConsoleUrl'](_0x31c5e5,_0x34b1f6['newProjectName'],_0x5ed3e8['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x267);['description']=a54_0x2a0943(0x201);async['execute'](_0x87e2e6){const _0x2c4b1b=a54_0x2a0943,{options:_0x4aad55,args:_0x392a2d,tdx:_0x5b2b5a}=_0x87e2e6,_0x263a8d=_0x392a2d[0x0];if(!_0x263a8d)return console[_0x2c4b1b(0x2ae)](_0x2c4b1b(0x26d)),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x4aad55[_0x2c4b1b(0x31f)]&&console[_0x2c4b1b(0x2ae)](_0x2c4b1b(0x30e)+_0x263a8d);if(!_0x4aad55['yes']){if(!isInteractive())return console['error'](a54_0x13943d[_0x2c4b1b(0x1fc)](_0x2c4b1b(0x252)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x2c4b1b(0x2ae)](a54_0x13943d[_0x2c4b1b(0x31c)](_0x2c4b1b(0x25d))),0x1;const _0x52dbc4=await confirmKey(_0x2c4b1b(0x25e)+_0x263a8d+_0x2c4b1b(0x2a3));if(!_0x52dbc4)return console[_0x2c4b1b(0x2ae)](a54_0x13943d[_0x2c4b1b(0x2f5)](_0x2c4b1b(0x22c))),0x1;}const _0x486ead=await withSpinner(_0x2c4b1b(0x1df)+_0x263a8d+_0x2c4b1b(0x320),()=>_0x5b2b5a[_0x2c4b1b(0x2f9)]['delete'](_0x263a8d),{'verbose':_0x4aad55[_0x2c4b1b(0x31f)]}),_0x5ec44c=_0x486ead[_0x2c4b1b(0x2c0)];return console['error'](_0x2c4b1b(0x30b)+_0x5ec44c[_0x2c4b1b(0x282)]),console[_0x2c4b1b(0x2ae)](_0x2c4b1b(0x2db)+_0x5ec44c[_0x2c4b1b(0x360)]),0x0;}}export function parseKeyValue(_0x188d85){const _0x53e662=a54_0x2a0943,_0x3f29c3=_0x188d85[_0x53e662(0x2dc)]('=');if(_0x3f29c3===-0x1)throw new Error(_0x53e662(0x309)+_0x188d85+_0x53e662(0x36f));const _0x1eff98=_0x188d85[_0x53e662(0x259)](0x0,_0x3f29c3),_0x25fd0f=_0x188d85[_0x53e662(0x259)](_0x3f29c3+0x1);if(!_0x1eff98)throw new Error(_0x53e662(0x2ff));return{'key':_0x1eff98,'value':_0x25fd0f};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x373);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x287);async[a54_0x2a0943(0x295)](_0x4bd9ca){const _0x8379d4=a54_0x2a0943,{options:_0xd55625,args:_0x2a5171,tdx:_0x1f91d4}=_0x4bd9ca,_0x159300=this[_0x8379d4(0x240)](_0x2a5171,_0xd55625);if(!_0x159300)return 0x1;_0xd55625[_0x8379d4(0x31f)]&&console['error']('Project:\x20'+_0x159300);const _0x45a4ce=await withSpinner(_0x8379d4(0x1cf),()=>_0x1f91d4[_0x8379d4(0x2f9)]['listSecrets'](_0x159300),{'verbose':_0xd55625['verbose']}),{secrets:_0x35c5ba}=_0x45a4ce[_0x8379d4(0x2c0)];return console[_0x8379d4(0x2ae)](_0x8379d4(0x37e)+_0x35c5ba[_0x8379d4(0x2c2)]+'\x20secret'+(_0x35c5ba[_0x8379d4(0x2c2)]!==0x1?'s':'')),await handleSDKOutput(_0x35c5ba,_0xd55625),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a54_0x2a0943(0x31a);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x2ee);async[a54_0x2a0943(0x295)](_0x43399f){const _0x4aadcd=a54_0x2a0943,{options:_0x26314b,args:_0x3f9b52,tdx:_0x3e777d}=_0x43399f;let _0x4723ef,_0x44cac3;if(_0x3f9b52[_0x4aadcd(0x2c2)]>=0x1&&!_0x3f9b52[0x0][_0x4aadcd(0x2c6)]('='))_0x4723ef=_0x3f9b52[0x0],_0x44cac3=_0x3f9b52['slice'](0x1);else{if(_0x3f9b52['length']>=0x1&&_0x26314b['workflowProject'])_0x4723ef=_0x26314b[_0x4aadcd(0x2fb)],_0x44cac3=_0x3f9b52;else return _0x3f9b52[_0x4aadcd(0x2c2)]>=0x1?(console[_0x4aadcd(0x2ae)](_0x4aadcd(0x21c)),console[_0x4aadcd(0x2ae)](_0x4aadcd(0x362)),0x1):(console['error'](_0x4aadcd(0x32b)),console[_0x4aadcd(0x2ae)](_0x4aadcd(0x32c)),0x1);}if(_0x44cac3['length']===0x0)return console[_0x4aadcd(0x2ae)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x4aadcd(0x2ae)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x5e803e={};try{for(const _0x3a6cc7 of _0x44cac3){const {key:_0x2968c8,value:_0x34e61d}=parseKeyValue(_0x3a6cc7);_0x5e803e[_0x2968c8]=_0x34e61d;}}catch(_0x20cecc){return _0x20cecc instanceof Error&&console['error'](a54_0x13943d[_0x4aadcd(0x1fc)](_0x4aadcd(0x33f)),_0x20cecc[_0x4aadcd(0x266)]),0x1;}const _0x4d851e=Object[_0x4aadcd(0x1c9)](_0x5e803e);_0x26314b[_0x4aadcd(0x31f)]&&(console[_0x4aadcd(0x2ae)]('Project:\x20'+_0x4723ef),console[_0x4aadcd(0x2ae)]('Secrets\x20to\x20set:\x20'+_0x4d851e[_0x4aadcd(0x219)](',\x20')));const _0x33845e=await withSpinner(_0x4d851e[_0x4aadcd(0x2c2)]===0x1?_0x4aadcd(0x28e):_0x4aadcd(0x1e6)+_0x4d851e[_0x4aadcd(0x2c2)]+_0x4aadcd(0x332),()=>_0x3e777d['workflow'][_0x4aadcd(0x242)](_0x4723ef,_0x5e803e),{'verbose':_0x26314b[_0x4aadcd(0x31f)]}),_0x282326=_0x33845e[_0x4aadcd(0x2c0)];return console[_0x4aadcd(0x2ae)](_0x4d851e['length']===0x1?'✔\x20Secret\x20\x27'+_0x282326[_0x4aadcd(0x1c9)][0x0]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x282326[_0x4aadcd(0x282)]+'\x27':'✔\x20'+_0x282326[_0x4aadcd(0x1c9)][_0x4aadcd(0x2c2)]+_0x4aadcd(0x1eb)+_0x282326[_0x4aadcd(0x282)]+'\x27'),(_0x26314b['json']||_0x26314b[_0x4aadcd(0x291)])&&await handleSingleObjectOutput(_0x282326,_0x26314b),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x274);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x33c);async[a54_0x2a0943(0x295)](_0x4f1eaf){const _0x45b39b=a54_0x2a0943,{options:_0xb4501,args:_0x593655,tdx:_0x31cce8}=_0x4f1eaf;let _0xdfc62b,_0x1f550f;if(_0x593655[_0x45b39b(0x2c2)]>=0x2)_0xdfc62b=_0x593655[0x0],_0x1f550f=_0x593655[0x1];else{if(_0x593655[_0x45b39b(0x2c2)]===0x1&&_0xb4501[_0x45b39b(0x2fb)])_0xdfc62b=_0xb4501['workflowProject'],_0x1f550f=_0x593655[0x0];else return _0x593655['length']===0x1?(console[_0x45b39b(0x2ae)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x45b39b(0x2ae)](_0x45b39b(0x362)),0x1):(console[_0x45b39b(0x2ae)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x45b39b(0x2ae)](_0x45b39b(0x288)),0x1);}_0xb4501['verbose']&&(console['error'](_0x45b39b(0x30e)+_0xdfc62b),console['error']('Key:\x20'+_0x1f550f));if(!_0xb4501[_0x45b39b(0x340)]){if(!isInteractive())return console[_0x45b39b(0x2ae)](a54_0x13943d[_0x45b39b(0x1fc)](_0x45b39b(0x252)),_0x45b39b(0x2e4)),console['error'](a54_0x13943d[_0x45b39b(0x31c)](_0x45b39b(0x25d))),0x1;const _0xe74587=await confirmKey(_0x45b39b(0x2d9)+_0x1f550f+_0x45b39b(0x32f)+_0xdfc62b+'\x27?');if(!_0xe74587)return console[_0x45b39b(0x2ae)](a54_0x13943d[_0x45b39b(0x2f5)](_0x45b39b(0x22c))),0x1;}const _0x50f93c=await withSpinner('Deleting\x20secret...',()=>_0x31cce8[_0x45b39b(0x2f9)][_0x45b39b(0x33e)](_0xdfc62b,_0x1f550f),{'verbose':_0xb4501[_0x45b39b(0x31f)]}),_0x2a4d09=_0x50f93c[_0x45b39b(0x2c0)];return console[_0x45b39b(0x2ae)](_0x45b39b(0x304)+_0x2a4d09[_0x45b39b(0x1d2)]+_0x45b39b(0x20e)+_0x2a4d09[_0x45b39b(0x282)]+'\x27'),(_0xb4501[_0x45b39b(0x200)]||_0xb4501['jsonl'])&&await handleSingleObjectOutput(_0x2a4d09,_0xb4501),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(_0xd7b3a){const _0x1e4820=a54_0x2a0943,_0x1e1ba5=Math[_0x1e4820(0x2bc)](_0xd7b3a/0x3e8),_0x32b4a3=Math[_0x1e4820(0x2bc)](_0x1e1ba5/0x3c),_0xf07283=Math[_0x1e4820(0x2bc)](_0x32b4a3/0x3c),_0x197587=Math[_0x1e4820(0x2bc)](_0xf07283/0x18);if(_0x197587>0x0){const _0xbf2b49=_0xf07283%0x18;return _0xbf2b49>0x0?_0x197587+'d\x20'+_0xbf2b49+'h':_0x197587+'d';}else{if(_0xf07283>0x0){const _0x4d84ac=_0x32b4a3%0x3c;return _0x4d84ac>0x0?_0xf07283+'h\x20'+_0x4d84ac+'m':_0xf07283+'h';}else{if(_0x32b4a3>0x0){const _0x493e57=_0x1e1ba5%0x3c;return _0x493e57>0x0?_0x32b4a3+'m\x20'+_0x493e57+'s':_0x32b4a3+'m';}else return _0x1e1ba5+'s';}}}function formatTimestamp(_0x2e32f4,_0x4a3a2f){const _0x37b67e=a54_0x2a0943,_0x23dc13=new Date(_0x2e32f4),_0x522812=String(_0x23dc13[_0x37b67e(0x37a)]())[_0x37b67e(0x299)](0x2,'0'),_0x3943ec=String(_0x23dc13[_0x37b67e(0x27d)]())[_0x37b67e(0x299)](0x2,'0'),_0x5b244f=_0x522812+':'+_0x3943ec,_0x56344e=_0x23dc13['getFullYear']()===_0x4a3a2f['getFullYear']()&&_0x23dc13[_0x37b67e(0x30f)]()===_0x4a3a2f[_0x37b67e(0x30f)]()&&_0x23dc13[_0x37b67e(0x30d)]()===_0x4a3a2f['getDate']();if(_0x56344e)return _0x5b244f;else{const _0x8321e4=String(_0x23dc13[_0x37b67e(0x30f)]()+0x1)[_0x37b67e(0x299)](0x2,'0'),_0x35cbd2=String(_0x23dc13[_0x37b67e(0x30d)]())[_0x37b67e(0x299)](0x2,'0');return _0x8321e4+'-'+_0x35cbd2+'\x20'+_0x5b244f;}}function formatDate(_0x3b1e30){const _0x3b9c46=a54_0x2a0943,_0x33d973=_0x3b1e30[_0x3b9c46(0x1f4)](),_0x40c1de=String(_0x3b1e30[_0x3b9c46(0x30f)]()+0x1)[_0x3b9c46(0x299)](0x2,'0'),_0x29490f=String(_0x3b1e30[_0x3b9c46(0x30d)]())[_0x3b9c46(0x299)](0x2,'0');return _0x33d973+'-'+_0x40c1de+'-'+_0x29490f;}function a54_0x5ebb(_0x5da824,_0x212514){_0x5da824=_0x5da824-0x1b9;const _0x2768a6=a54_0x2768();let _0x5ebbc7=_0x2768a6[_0x5da824];return _0x5ebbc7;}function getTaskStateIcon(_0x15811b){const _0x7c925={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x7c925[_0x15811b]||'⚪';}function getBarChar(_0x386d2c){const _0xc9f643=a54_0x2a0943;return _0x386d2c===_0xc9f643(0x2ae)||_0x386d2c===_0xc9f643(0x1f9)?'×':'─';}function getBarColor(_0xf491c4){const _0x3f58a7=a54_0x2a0943,_0x47cc1a={'success':a54_0x13943d[_0x3f58a7(0x211)],'error':a54_0x13943d[_0x3f58a7(0x1fc)],'group_error':a54_0x13943d[_0x3f58a7(0x1fc)],'running':a54_0x13943d[_0x3f58a7(0x258)],'blocked':a54_0x13943d[_0x3f58a7(0x2f5)],'planned':a54_0x13943d['dim'],'canceling':a54_0x13943d[_0x3f58a7(0x2f5)]};return _0x47cc1a[_0xf491c4]||a54_0x13943d[_0x3f58a7(0x305)];}function parseTaskName(_0x3a2452){const _0x3b3eeb=a54_0x2a0943;let _0x5e057e=_0x3a2452[_0x3b3eeb(0x23f)](/^\++/,'');const _0x374383=_0x5e057e[_0x3b3eeb(0x2ca)]('+'),_0x10bbd3=_0x374383[_0x3b3eeb(0x2c2)]>0x1?_0x374383[_0x3b3eeb(0x2c2)]-0x2:0x0,_0x3bbf89=_0x374383[_0x374383[_0x3b3eeb(0x2c2)]-0x1]||_0x5e057e;return{'level':_0x10bbd3,'name':'+'+_0x3bbf89};}function truncateTaskName(_0x2f410c,_0x2c9748){const _0x342749=a54_0x2a0943,_0x3c2e41=stringWidth(_0x2f410c);if(_0x3c2e41<=_0x2c9748)return _0x2f410c;let _0x5e21f7=_0x2f410c;while(stringWidth(_0x5e21f7+'…')>_0x2c9748&&_0x5e21f7[_0x342749(0x2c2)]>0x0){_0x5e21f7=_0x5e21f7['slice'](0x0,-0x1);}return _0x5e21f7+'…';}function calculateTimeScale(_0x244b8c,_0x4e62d6){const _0x5a895b=a54_0x2a0943;return{'startTime':_0x244b8c['start'],'endTime':_0x244b8c[_0x5a895b(0x313)],'durationMs':_0x244b8c[_0x5a895b(0x298)],'msPerChar':_0x244b8c['duration']/_0x4e62d6};}function timeToPosition(_0x40bc4e,_0x3006fb,_0x5c9ab2){const _0x15e3f8=a54_0x2a0943,_0x4de0bc=_0x40bc4e-_0x3006fb[_0x15e3f8(0x2c3)],_0x37cd8c=Math[_0x15e3f8(0x2bc)](_0x4de0bc/_0x3006fb[_0x15e3f8(0x33d)]);return Math[_0x15e3f8(0x26c)](0x0,Math[_0x15e3f8(0x294)](_0x37cd8c,_0x5c9ab2));}function renderTimeAxis(_0x3c9608,_0x2d4ea2){const _0x435f96=a54_0x2a0943,_0x39bede=Math[_0x435f96(0x294)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x435f96(0x26c)](TIMELINE_CONFIG[_0x435f96(0x355)],Math[_0x435f96(0x2bc)](_0x2d4ea2/TIMELINE_CONFIG[_0x435f96(0x374)]))),_0x1932a6=_0x3c9608['durationMs']/(_0x39bede-0x1),_0x1bd023=new Date(_0x3c9608[_0x435f96(0x2c3)]),_0x56380f=[];for(let _0x4bd5c5=0x0;_0x4bd5c5<_0x39bede;_0x4bd5c5++){const _0x5b0289=_0x3c9608[_0x435f96(0x2c3)]+_0x4bd5c5*_0x1932a6,_0x35c2d2=timeToPosition(_0x5b0289,_0x3c9608,_0x2d4ea2),_0x458279=formatTimestamp(_0x5b0289,_0x1bd023);_0x56380f[_0x435f96(0x377)]({'pos':_0x35c2d2,'text':_0x458279});}const _0x14d98f=new Array(_0x2d4ea2)['fill']('\x20');let _0x56a80a=-0x1;for(const {pos:_0x211e87,text:_0x2e07ee}of _0x56380f){let _0x635068=Math['max'](0x0,_0x211e87-Math[_0x435f96(0x2bc)](_0x2e07ee[_0x435f96(0x2c2)]/0x2));_0x635068<=_0x56a80a+TIMELINE_CONFIG[_0x435f96(0x2c4)]&&(_0x635068=_0x56a80a+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x635068+_0x2e07ee[_0x435f96(0x2c2)]>_0x2d4ea2&&(_0x635068=_0x2d4ea2-_0x2e07ee[_0x435f96(0x2c2)]);if(_0x635068>=0x0&&_0x635068+_0x2e07ee[_0x435f96(0x2c2)]<=_0x2d4ea2&&_0x635068>_0x56a80a){for(let _0x21aba5=0x0;_0x21aba5<_0x2e07ee[_0x435f96(0x2c2)];_0x21aba5++){_0x14d98f[_0x635068+_0x21aba5]=_0x2e07ee[_0x21aba5];}_0x56a80a=_0x635068+_0x2e07ee[_0x435f96(0x2c2)]-0x1;}}return _0x14d98f[_0x435f96(0x219)]('');}function renderTaskRow(_0x5b9ae4,_0x95d3ac,_0x42bbd7,_0x569f94){const _0x2c46e2=a54_0x2a0943,{level:_0x2f8397,name:_0x28386b}=parseTaskName(_0x5b9ae4[_0x2c46e2(0x1c3)]),_0x5db911='\x20'[_0x2c46e2(0x297)](_0x2f8397),_0x750038=_0x5b9ae4['window']?'('+formatElapsed(_0x5b9ae4[_0x2c46e2(0x261)][_0x2c46e2(0x298)])+')':'',_0x40a193=stringWidth(_0x750038),_0x2c7b21=_0x2f8397*0x1,_0xd7906e=_0x569f94-_0x2c7b21-_0x40a193-0x1,_0x555026=truncateTaskName(_0x28386b,_0xd7906e),_0x3bbc29=_0x5db911+_0x555026,_0x443199=stringWidth(_0x3bbc29),_0x221de1=_0x569f94-_0x443199-_0x40a193,_0x535caa=_0x3bbc29+'\x20'[_0x2c46e2(0x297)](Math[_0x2c46e2(0x26c)](0x1,_0x221de1))+a54_0x13943d[_0x2c46e2(0x31c)](_0x750038),_0x4a7545=getTaskStateIcon(_0x5b9ae4['state']),_0x4982c5=new Array(_0x42bbd7)[_0x2c46e2(0x26a)]('\x20');if(_0x5b9ae4[_0x2c46e2(0x261)]){const _0x1b3d2d=timeToPosition(_0x5b9ae4[_0x2c46e2(0x261)][_0x2c46e2(0x273)],_0x95d3ac,_0x42bbd7),_0x51d019=timeToPosition(_0x5b9ae4[_0x2c46e2(0x261)]['end'],_0x95d3ac,_0x42bbd7),_0x3de04f=getBarChar(_0x5b9ae4['state']),_0x5a964b=Math[_0x2c46e2(0x26c)](_0x1b3d2d+0x1,_0x51d019);for(let _0x1bcdc8=_0x1b3d2d;_0x1bcdc8<Math['min'](_0x5a964b,_0x42bbd7);_0x1bcdc8++){_0x4982c5[_0x1bcdc8]=_0x3de04f;}}const _0x853598=getBarColor(_0x5b9ae4[_0x2c46e2(0x233)]),_0x6c7287=_0x4982c5['map'](_0x2e684e=>_0x2e684e==='\x20'?'\x20':_0x853598(_0x2e684e))['join']('');return _0x4a7545+'\x20'+_0x535caa+'│'+_0x6c7287+'│';}function a54_0x2768(){const _0x1524af=['getFullYear','kill','1248TaKfvg','MAX_TIMELINE_WIDTH','session_id','group_error','relative','value','red','rows','sessionId','attempt','json','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','existingProjectId','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','success','Updating\x20','\x0aApply\x20these\x20changes?','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','No\x20workflow\x20tdx.json\x20found','includeSubtasks','done','attemptId','Revision:\x20','Session\x20time:\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','→\x20Project:\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','green','\x20attempt','clear','autocomplete','renderTimeline','📅\x20#','all','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','join','context','\x20\x20Location:\x20','Error:\x20Project\x20name\x20is\x20required','\x0aPush\x20these\x20changes?','param','dryRun','resumeFrom','pending','Disable\x20a\x20workflow\x20schedule','resolve','download','updatedAt','listSchedules','renderSessionsTimeline','parseProjectWorkflowPattern','session',',\x20Workflow:\x20','Starting\x20workflow\x20run...','Cancelled','ICON_SPACING','now','session:','\x20to\x20see\x20detailed\x20logs','Error:\x20Attempt\x20ID\x20is\x20required','No\x20workflows\x20found\x20in\x20project:\x20','state','No\x20sessions\x20found\x20for:\x20','ICON_WIDTH','Select\x20a\x20task\x20to\x20view\x20logs:','→\x20New\x20project:\x20','\x20(disabled)','cwd','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Project\x20filter:\x20','\x20\x20Next\x20run:\x20','workflow:tasks','Cloning\x20to\x20','replace','requireProject','attempt:','setSecrets','No\x20workflow\x20projects\x20found','sys','renderSingleTimeline','\x20disabled\x20(','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Session\x20not\x20found:\x20','\x0a✔\x20No\x20changes\x20to\x20push','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Error:\x20Invalid\x20JSON\x20in\x20--params','Project\x20name\x20is\x20required','Kill\x20a\x20running\x20attempt','fileCount','Filter:\x20','\x20\x20Files\x20extracted:\x20','skipValidation','\x0aError:','params','reason','Retry\x20a\x20session\x20or\x20attempt','\x20\x20Session\x20ID:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','blue','substring','✔\x20Pushed\x20','Retrying\x20session...','hasChanges','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','3657380tVpBQz','resolveProjectId','window','Pushing\x20project...','unknown','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20projects\x20match\x20pattern:\x20','message','workflow:delete','Select\x20a\x20session\x20to\x20view\x20timeline:','\x20enabled\x20(','fill','revision:\x20','max','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','path','Schedule\x20ID\x20is\x20required','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','revision','Pulling\x20project\x20','start','workflow:secrets:delete','type','\x20is\x20not\x20a\x20directory','round','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Workflow:\x20','diff','canceling','getMinutes','task','Error:\x20Invalid\x20parameter\x20format:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','retryAttempt','projectName','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20session','map','logFiles','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x0aClone\x20\x22','No\x20attempts\x20found\x20for:\x20','run','Project\x20directory:\x20','979866RJuRzs','Setting\x20secret...','⚠\x20Showing\x20first\x20','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','jsonl','✔\x20Push\x20complete','No\x20workflows\x20found','min','execute','sessions','repeat','duration','padStart','\x20deleted','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','getTime','\x20sessions\x20','✔\x20Workflow\x20run\x20started','disabledAt','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Failed\x20to\x20fetch\x20attempt\x20data','\x0a⚠\x20Project\x20\x22','\x22?\x20This\x20cannot\x20be\x20undone.','Tip:\x20cd\x20to\x20workflows/','Source\x20directory:\x20','Listing\x20schedules...','set','workflow:sessions','cancelRequested','isTTY','enableSchedule','Resolving\x20project\x20\x27','Start\x20a\x20workflow\x20run','error','isDirectory','executePushProject','🔄\x20','\x1b[1A\x1b[2K','Analyzing\x20project...','\x20next:\x20','workflow:attempts','13116hHoiJL','\x20\x20Attempt\x20ID:\x20','Listing\x20workflows...','displayLine','sort','List\x20workflows','floor','Reason:\x20','workflow:download','index','data','List\x20workflow\x20schedules','length','startTime','LABEL_MIN_SPACING','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','includes','sourceProjectName','workflow:pull','trim','split','Error:\x20','\x20\x20Target:\x20','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','1476568kTRZIo','Listing\x20workflow\x20sessions...','/attempt/','\x20\x20New\x20attempt\x20ID:\x20','tasks','projects','match','Filter:\x20project=','filesExtracted','---\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x0aPolling...\x20(','\x20\x20Project\x20ID:\x20','indexOf','Loading\x20session...','\x20of\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','finishedAt','changes','readFile','\x20\x20Changes:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20(use\x20--limit\x20to\x20show\x20more)','pollTimeline','Include\x20retried:\x20yes','Validation:\x20skipped','MIN_TIMELINE_WIDTH','running','-\x20no\x20files\x20written','status','filter','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','some','✔\x20Showing\x20','\x22\x20to\x20new\x20project\x20\x22','Getting\x20attempt\x20details...','90pWCMxM','yellow','workflow:clone','Auto-selected\x20latest\x20session:\x20','workflow:push','workflow','\x22\x20with\x20new\x20revision?','workflowProject','stdout','\x20\x20Console:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','Key\x20cannot\x20be\x20empty','✔\x20Schedule\x20#','summary','468286ZVRJYk','Force:\x20yes','✔\x20Secret\x20\x27','white','✔\x20Retry\x20started','New\x20project\x20name:\x20','Task\x20name:\x20','Invalid\x20format:\x20','\x20new','✔\x20Deleted\x20project\x20','Fetching\x20log\x20files...','getDate','Project:\x20','getMonth','Attempt\x20ID:\x20','table','Latest\x20session\x20has\x20no\x20attempt','end','follow','workflowName','\x20workflow','\x22\x20already\x20exists\x20(ID:\x20','text','prepareCloneProject','workflow:secrets:set','✔\x20Workflow\x20project\x20context\x20cleared.','dim','workflow:schedules','log','verbose','...','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','No\x20workflow\x20sessions\x20found','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','1929UjJnrx','\x20(system)','buildTimelineData','stringify','force','Dry\x20run:\x20yes','✔\x20Downloaded\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','basename','Disabling\x20schedule\x20#','\x27\x20from\x20project\x20\x27','project','find','\x20secrets...','workflow:run','No\x20sessions\x20found','Source:\x20','select','description','\x20has\x20no\x20attempts','Session\x20','/app/workflows/','\x20\x20Project:\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','msPerChar','deleteSecret','Error:','yes','Loading\x20workflows...','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','taskName','325754OajneB','Project\x20name:\x20','Status:\x20','MAX_TASKS_DISPLAY','\x20-\x20','1aEWiBp','columns','targetExists','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','limit','createdAt','values','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','localeCompare','format','✔\x20Pull\x20complete','list','MIN_LABEL_COUNT','Attempt:\x20','workflow:upload','retryAttemptName','Including\x20subtasks:\x20yes','✔\x20Project:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','From\x20task:\x20','✔\x20Project\x20updated','\x20\x20Workflow:\x20','\x0aUpdate\x20existing\x20project\x20\x22','projectId','planned','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','lastAttempt','(use\x20--limit\x20to\x20see\x20more)','from','workflow:projects','Enable\x20a\x20workflow\x20schedule','No\x20attempts\x20found','fileSize','sessionTime','workflow:schedule:disable','navigateSessionsInteractive','-\x20nothing\x20pushed','Output\x20directory:\x20','.\x20Expected\x20format:\x20KEY=VALUE','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Getting\x20attempt\x20tasks...','No\x20sessions\x20found\x20in\x20project:\x20','workflow:secrets:list','LABEL_WIDTH_DIVISOR','List\x20workflow\x20execution\x20sessions','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','push','\x20modified','metadata','getHours','List\x20all\x20workflow\x20projects','Analyzing\x20changes...','startsWith','✔\x20Found\x20','newProjectId','\x20\x20Session\x20context\x20set\x20to:\x20','📋\x20','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','has','new','Source\x20directory\x20is\x20required','workflow:kill','Listing\x20workflow\x20projects...','showWorkflowConsoleUrl','generateSessionTimelineRows','cyan','applyPullProject','tdx\x20wf\x20attempt\x20','output','\x0aDry\x20run\x20-\x20no\x20project\x20created','parse','\x20from\x20session\x20','get','workflow:use','workflow:timeline','workflow:attempt','name','workflow:logs','Downloading\x20logs...','POLL_INTERVAL_MS','Pushing\x20workflow\x20project...','targetDir','keys','fullName','modified','💡\x20Tip:\x20Use\x20','/sessions/','Downloading\x20project\x20','Listing\x20secrets...','\x20unchanged','logs','key','nextRunTime','resolveProject','workflows','write','Loading\x20sessions...','(unknown)','List\x20workflow\x20attempts','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','pullProject','unchanged','No\x20attempts\x20found\x20in\x20project:\x20','\x20task','Deleting\x20project\x20','Enabling\x20schedule\x20#','deleted','site','toISOString','toLocaleString','size','Setting\x20','newProjectName','Files\x20to\x20upload:\x20','startedAt','toLowerCase','\x20secrets\x20set\x20for\x20project\x20\x27','\x20project','every','workflow:workflows','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x20\x20Revision:\x20','fs/promises','sourceDir','Pattern:\x20'];a54_0x2768=function(){return _0x1524af;};return a54_0x2768();}function calculateStats(_0x4d33b6){const _0x5b03db=a54_0x2a0943,_0x426611={'total':_0x4d33b6['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x433a91 of _0x4d33b6){if(_0x433a91[_0x5b03db(0x233)]===_0x5b03db(0x204))_0x426611[_0x5b03db(0x204)]++;else{if(_0x433a91[_0x5b03db(0x233)]==='error'||_0x433a91[_0x5b03db(0x233)]===_0x5b03db(0x1f9))_0x426611[_0x5b03db(0x2ae)]++;else _0x433a91[_0x5b03db(0x233)]===_0x5b03db(0x2ea)?_0x426611[_0x5b03db(0x2ea)]++:_0x426611[_0x5b03db(0x221)]++;}}return _0x426611;}function formatStats(_0x2d839b){const _0x282149=a54_0x2a0943;return['Total:\x20'+_0x2d839b['total'],'✅\x20'+_0x2d839b['success'],'❌\x20'+_0x2d839b['error'],_0x282149(0x2b1)+_0x2d839b[_0x282149(0x2ea)],'⏳\x20'+_0x2d839b[_0x282149(0x221)]][_0x282149(0x219)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x1c1);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x321);async[a54_0x2a0943(0x295)](_0x4904f4){const _0x45bc85=a54_0x2a0943,{options:_0x219e52,args:_0x87ca29,tdx:_0x366f38}=_0x4904f4;let _0x10a600,_0x4b4d74,_0x2c5e66=![];if(_0x87ca29[0x0]){if(_0x87ca29[0x0][_0x45bc85(0x2c6)]('.')){const _0x28f7dd=this['parseProjectWorkflowPattern'](_0x87ca29,_0x219e52);if(!_0x28f7dd)return 0x1;_0x10a600=_0x28f7dd[_0x45bc85(0x282)],_0x4b4d74=_0x28f7dd['workflowName'];}else{_0x4b4d74=_0x87ca29[0x0],_0x10a600=_0x219e52[_0x45bc85(0x2fb)];if(!_0x10a600)return console['error'](a54_0x13943d[_0x45bc85(0x1fc)](_0x45bc85(0x33f)),_0x45bc85(0x218)),0x1;_0x2c5e66=!![];}}else{const _0x310b3b=this[_0x45bc85(0x228)](_0x87ca29,_0x219e52);if(!_0x310b3b)return 0x1;_0x10a600=_0x310b3b[_0x45bc85(0x282)],_0x4b4d74=_0x310b3b[_0x45bc85(0x315)];}if(_0x219e52[_0x45bc85(0x31f)]){if(_0x10a600&&_0x4b4d74)console[_0x45bc85(0x2ae)](_0x45bc85(0x24f)+_0x10a600+'.'+_0x4b4d74);else _0x10a600&&console[_0x45bc85(0x2ae)](_0x45bc85(0x2d5)+_0x10a600);}const _0x21069e=_0x219e52[_0x45bc85(0x20b)],_0x4ab1ef=_0x219e52[_0x45bc85(0x1fe)];if(_0x21069e){_0x4ab1ef&&console[_0x45bc85(0x2ae)](a54_0x13943d[_0x45bc85(0x2f5)]('Warning:'),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x49dc99=_0x219e52['follow'];return _0x49dc99?await this[_0x45bc85(0x2e6)](_0x4904f4,_0x21069e):await this[_0x45bc85(0x245)](_0x4904f4,_0x21069e,_0x219e52),0x0;}if(_0x4ab1ef){const _0x2cd299=await withSpinner(_0x45bc85(0x2dd),()=>_0x366f38[_0x45bc85(0x2f9)][_0x45bc85(0x296)]({'projectName':_0x10a600,'workflowName':_0x4b4d74,'limit':0x64}),{'verbose':_0x219e52[_0x45bc85(0x31f)]}),_0x283b65=_0x2cd299[_0x45bc85(0x2c0)][_0x45bc85(0x331)](_0x3b095d=>_0x3b095d['id']===_0x4ab1ef);if(!_0x283b65)return console['error'](a54_0x13943d[_0x45bc85(0x1fc)](_0x45bc85(0x33f)),_0x45bc85(0x248)+_0x4ab1ef),0x1;if(!_0x283b65['lastAttempt']?.['id'])return console[_0x45bc85(0x2ae)](a54_0x13943d[_0x45bc85(0x1fc)]('Error:'),_0x45bc85(0x339)+_0x4ab1ef+_0x45bc85(0x338)),0x1;const _0x552d2e=_0x283b65[_0x45bc85(0x363)]['id'];_0x219e52['verbose']&&console[_0x45bc85(0x2ae)]('Using\x20attempt\x20'+_0x552d2e+_0x45bc85(0x1be)+_0x4ab1ef);const _0x553c28=_0x219e52[_0x45bc85(0x314)];return _0x553c28?await this[_0x45bc85(0x2e6)](_0x4904f4,_0x552d2e):await this[_0x45bc85(0x245)](_0x4904f4,_0x552d2e,_0x219e52),0x0;}const _0x3145d5=await withSpinner(_0x45bc85(0x1d7),()=>_0x366f38[_0x45bc85(0x2f9)]['sessions']({'projectName':_0x10a600,'workflowName':_0x4b4d74,'limit':_0x219e52[_0x45bc85(0x34d)]||0x32}),{'verbose':_0x219e52['verbose']}),_0x5a031e=_0x3145d5[_0x45bc85(0x2c0)];if(_0x5a031e[_0x45bc85(0x2c2)]===0x0){if(_0x10a600&&_0x4b4d74)console[_0x45bc85(0x2ae)]('No\x20sessions\x20found\x20for:\x20'+_0x10a600+'.'+_0x4b4d74);else _0x10a600?console[_0x45bc85(0x2ae)](_0x45bc85(0x372)+_0x10a600):(console[_0x45bc85(0x2ae)](_0x45bc85(0x322)),console['error'](a54_0x13943d['dim'](_0x45bc85(0x279))));return 0x0;}_0x5a031e[_0x45bc85(0x2ba)]((_0x451fff,_0x435b91)=>{const _0x100e18=_0x45bc85,_0x161623=_0x451fff['sessionTime']||'',_0x157664=_0x435b91[_0x100e18(0x36a)]||'';return _0x157664['localeCompare'](_0x161623);});if(_0x219e52[_0x45bc85(0x200)]||_0x219e52[_0x45bc85(0x291)])return await handleSDKOutput(_0x5a031e,_0x219e52),0x0;let _0x15f997;if(_0x2c5e66){const _0x33611c=_0x5a031e[0x0];if(!_0x33611c[_0x45bc85(0x363)]?.['id'])return console['error'](_0x45bc85(0x312)),0x0;_0x15f997=_0x33611c[_0x45bc85(0x363)]['id'],_0x219e52[_0x45bc85(0x31f)]&&console['error'](_0x45bc85(0x2f7)+_0x33611c['sessionTime']);}else{const _0x3ec5dd=_0x5a031e[_0x45bc85(0x285)](_0x167c82=>{const _0xee57bd=_0x45bc85,_0x54c205=getAttemptStatusDisplay(_0x167c82['lastAttempt']);return{'title':_0x167c82[_0xee57bd(0x330)]?.['name']+'.'+_0x167c82[_0xee57bd(0x2f9)]?.[_0xee57bd(0x1c3)]+'\x20-\x20'+_0x167c82['sessionTime']+'\x20'+_0x54c205['icon'],'value':_0x167c82[_0xee57bd(0x363)]?.['id']||'','description':_0x54c205[_0xee57bd(0x318)]};}),_0x577981=await a54_0x1b2330({'type':'select','name':_0x45bc85(0x20b),'message':_0x45bc85(0x268),'choices':_0x3ec5dd[_0x45bc85(0x2ed)](_0x386de9=>_0x386de9[_0x45bc85(0x1fb)]!=='')});if(!_0x577981['attemptId'])return 0x0;_0x15f997=_0x577981['attemptId'];}const _0x2a7056=_0x219e52[_0x45bc85(0x314)];return _0x2a7056?await this[_0x45bc85(0x2e6)](_0x4904f4,_0x15f997):await this[_0x45bc85(0x245)](_0x4904f4,_0x15f997,_0x219e52),0x0;}async[a54_0x2a0943(0x245)](_0x54d9bb,_0x504dac,_0x589595){const _0x3d97cc=a54_0x2a0943,{tdx:_0x3da4d1}=_0x54d9bb;let _0x54706a,_0x293598;try{[_0x54706a,_0x293598]=await Promise['all']([_0x3da4d1[_0x3d97cc(0x2f9)][_0x3d97cc(0x1ff)](_0x504dac),_0x3da4d1[_0x3d97cc(0x2f9)][_0x3d97cc(0x2d2)](_0x504dac,![])]);}catch(_0x365a1b){console[_0x3d97cc(0x2ae)](a54_0x13943d[_0x3d97cc(0x1fc)](_0x3d97cc(0x2a1)));_0x589595[_0x3d97cc(0x31f)]&&console[_0x3d97cc(0x2ae)](_0x365a1b);throw _0x365a1b;}if(_0x589595[_0x3d97cc(0x200)]||_0x589595['jsonl']){const _0x36473f=this[_0x3d97cc(0x326)](_0x54706a,_0x293598);await handleSDKOutput([_0x36473f],_0x589595);return;}const _0x5c0f69=_0x3da4d1[_0x3d97cc(0x21a)][_0x3d97cc(0x1e2)],_0x950c1c=this[_0x3d97cc(0x215)](_0x54706a,_0x293598,_0x5c0f69);console[_0x3d97cc(0x31e)](_0x950c1c);}async['pollTimeline'](_0x23e5d7,_0xdfbc3){const _0xd75e61=a54_0x2a0943,{tdx:_0x19df3c}=_0x23e5d7,_0x2f9685=TIMELINE_CONFIG[_0xd75e61(0x1c6)],_0x363a78=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x2fa3e3=0x0;while(_0x2fa3e3<_0x363a78){process[_0xd75e61(0x2fc)][_0xd75e61(0x2aa)]&&process[_0xd75e61(0x2fc)][_0xd75e61(0x1d6)]('\x1bc');let _0x3cc12f,_0x3bc1ff;try{[_0x3cc12f,_0x3bc1ff]=await Promise[_0xd75e61(0x217)]([_0x19df3c[_0xd75e61(0x2f9)]['attempt'](_0xdfbc3),_0x19df3c[_0xd75e61(0x2f9)][_0xd75e61(0x2d2)](_0xdfbc3,![])]);}catch(_0x56823d){console['error'](a54_0x13943d[_0xd75e61(0x1fc)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x2fa3e3>0x0&&console[_0xd75e61(0x2ae)](a54_0x13943d[_0xd75e61(0x31c)](_0xd75e61(0x370)+_0x2fa3e3));throw _0x56823d;}const _0xf1c96d=_0x19df3c[_0xd75e61(0x21a)][_0xd75e61(0x1e2)],_0x3ae908=this['renderTimeline'](_0x3cc12f,_0x3bc1ff,_0xf1c96d);console[_0xd75e61(0x31e)](_0x3ae908);const _0x59179c=_0x3cc12f[_0xd75e61(0x20a)]&&_0x3bc1ff[_0xd75e61(0x1ed)](_0x37256e=>_0x37256e['state']!==_0xd75e61(0x2ea)&&_0x37256e[_0xd75e61(0x233)]!==_0xd75e61(0x361));if(_0x59179c){console[_0xd75e61(0x2ae)](a54_0x13943d[_0xd75e61(0x211)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0xd75e61(0x2ae)](a54_0x13943d[_0xd75e61(0x31c)](_0xd75e61(0x2da)+_0x2fa3e3*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x3ee7f7=>setTimeout(_0x3ee7f7,_0x2f9685)),_0x2fa3e3++;}_0x2fa3e3>=_0x363a78&&console[_0xd75e61(0x2ae)](a54_0x13943d[_0xd75e61(0x2f5)](_0xd75e61(0x1ef)));}[a54_0x2a0943(0x215)](_0x4faa26,_0x817377,_0x4ba71d){const _0x5267ba=a54_0x2a0943,_0x1145d1=[],_0x1e9a31=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x5f36d9=0x5,_0x3badfb=process['stdout'][_0x5267ba(0x34a)]||0x78,_0x28acc8=_0x3badfb-_0x1e9a31-_0x5f36d9,_0x42151d=Math['max'](TIMELINE_CONFIG[_0x5267ba(0x2e9)],Math[_0x5267ba(0x294)](_0x28acc8,TIMELINE_CONFIG[_0x5267ba(0x1f7)])),_0x3c5586=new Date(_0x4faa26['createdAt'])[_0x5267ba(0x29c)](),_0x148b8c=_0x4faa26[_0x5267ba(0x2e0)]?new Date(_0x4faa26[_0x5267ba(0x2e0)])[_0x5267ba(0x29c)]():Date[_0x5267ba(0x22e)](),_0x130f0f={'start':_0x3c5586,'end':_0x148b8c,'duration':_0x148b8c-_0x3c5586},_0x1ee08a=new Map(),_0x94aa97=[];for(const _0x25a3f0 of _0x817377){if(_0x25a3f0['startedAt']){const _0x1871cc=new Date(_0x25a3f0[_0x5267ba(0x1e9)])['getTime'](),_0x30fd62=_0x25a3f0[_0x5267ba(0x225)]?new Date(_0x25a3f0[_0x5267ba(0x225)])[_0x5267ba(0x29c)]():Date[_0x5267ba(0x22e)](),_0x399a29={'start':_0x1871cc,'end':_0x30fd62,'duration':_0x30fd62-_0x1871cc};_0x1ee08a[_0x5267ba(0x2a7)](_0x25a3f0['id'],_0x399a29),_0x94aa97['push']({'name':_0x25a3f0[_0x5267ba(0x1ca)],'state':_0x25a3f0[_0x5267ba(0x233)]||_0x5267ba(0x263),'window':_0x399a29});}else _0x94aa97[_0x5267ba(0x377)]({'name':_0x25a3f0[_0x5267ba(0x1ca)],'state':_0x25a3f0['state']||_0x5267ba(0x361),'window':undefined});}_0x94aa97[_0x5267ba(0x2ba)]((_0x690f61,_0x39c56d)=>{const _0x527c97=_0x5267ba;if(!_0x690f61['window'])return 0x1;if(!_0x39c56d[_0x527c97(0x261)])return-0x1;return _0x690f61['window'][_0x527c97(0x273)]-_0x39c56d[_0x527c97(0x261)][_0x527c97(0x273)];});const _0x4867b3=_0x94aa97['length'],_0xaaf960=_0x4867b3>TIMELINE_CONFIG[_0x5267ba(0x347)];_0xaaf960&&_0x94aa97['splice'](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x3ede6a=calculateTimeScale(_0x130f0f,_0x42151d),_0x5ab640=_0x4faa26[_0x5267ba(0x20a)]?_0x4faa26['success']?a54_0x13943d['green'](_0x5267ba(0x204)):a54_0x13943d[_0x5267ba(0x1fc)]('error'):a54_0x13943d[_0x5267ba(0x258)](_0x5267ba(0x2ea)),_0x5417de=_0x4faa26[_0x5267ba(0x330)]?.['id'],_0xf83000=_0x4faa26[_0x5267ba(0x1fe)];let _0x10fd4a;if(_0x5417de&&_0xf83000){const _0x2822e8=getWorkflowAttemptUrl(_0x4ba71d,_0x5417de,_0xf83000,_0x4faa26['id']);_0x10fd4a=hyperlink(a54_0x13943d[_0x5267ba(0x31c)](_0x4faa26['id']),_0x2822e8);}else _0x10fd4a=a54_0x13943d[_0x5267ba(0x31c)](_0x4faa26['id']);_0x1145d1[_0x5267ba(0x377)](_0x5267ba(0x356)+_0x10fd4a+_0x5267ba(0x348)+_0x5ab640+'\x20-\x20'+formatElapsed(_0x130f0f[_0x5267ba(0x298)]));if(_0x94aa97['length']>0x0){const _0x3ceeeb=renderTimeAxis(_0x3ede6a,_0x42151d),_0x429bbe=new Date(_0x130f0f[_0x5267ba(0x273)]),_0x3eb942=formatDate(_0x429bbe),_0x6dde4d=TIMELINE_CONFIG[_0x5267ba(0x235)]+TIMELINE_CONFIG[_0x5267ba(0x22d)]+_0x1e9a31,_0x44fcaf=_0x3eb942['padStart'](_0x6dde4d),_0x38fba6=a54_0x13943d['dim'](_0x44fcaf);_0x1145d1['push'](_0x38fba6+'\x20'+_0x3ceeeb);for(const _0x2fb8b0 of _0x94aa97){_0x1145d1[_0x5267ba(0x377)](renderTaskRow(_0x2fb8b0,_0x3ede6a,_0x42151d,_0x1e9a31));}const _0x1fdba2=calculateStats(_0x94aa97);_0x1145d1[_0x5267ba(0x377)](formatStats(_0x1fdba2)),_0xaaf960&&_0x1145d1[_0x5267ba(0x377)](a54_0x13943d['yellow'](_0x5267ba(0x28f)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x5267ba(0x2de)+_0x4867b3+'\x20tasks')),_0x1145d1[_0x5267ba(0x377)](''),_0x1145d1[_0x5267ba(0x377)](a54_0x13943d[_0x5267ba(0x31c)](_0x5267ba(0x1cc))+(_0x5267ba(0x1ba)+_0x4faa26['id']+'\x20logs')+a54_0x13943d[_0x5267ba(0x31c)](_0x5267ba(0x230)));}else _0x1145d1[_0x5267ba(0x377)](_0x5267ba(0x257));return _0x1145d1[_0x5267ba(0x219)]('\x0a');}['buildTimelineData'](_0x5b2aa3,_0x36ba3a){const _0xd128cc=a54_0x2a0943,_0x290d6e=new Date(_0x5b2aa3['createdAt'])[_0xd128cc(0x29c)](),_0xe7debf=_0x5b2aa3['finishedAt']?new Date(_0x5b2aa3['finishedAt'])[_0xd128cc(0x29c)]():Date[_0xd128cc(0x22e)](),_0x2a8e4e=_0xe7debf-_0x290d6e,_0xae8e97=[];for(const _0x345bca of _0x36ba3a){if(_0x345bca[_0xd128cc(0x1e9)]){const _0x3e08a7=new Date(_0x345bca['startedAt'])['getTime'](),_0x1eed71=_0x345bca[_0xd128cc(0x225)]?new Date(_0x345bca[_0xd128cc(0x225)])['getTime']():Date['now']();_0xae8e97[_0xd128cc(0x377)]({'name':_0x345bca['fullName'],'state':_0x345bca[_0xd128cc(0x233)]||_0xd128cc(0x263),'window':{'start':_0x3e08a7,'end':_0x1eed71,'duration':_0x1eed71-_0x3e08a7}});}else _0xae8e97[_0xd128cc(0x377)]({'name':_0x345bca['fullName'],'state':_0x345bca[_0xd128cc(0x233)]||'planned','window':undefined});}const _0x2c67cd=calculateStats(_0xae8e97);return{'attempt':{'id':_0x5b2aa3['id'],'status':_0x5b2aa3[_0xd128cc(0x20a)]?_0x5b2aa3['success']?_0xd128cc(0x204):_0xd128cc(0x2ae):_0xd128cc(0x2ea),'createdAt':_0x5b2aa3[_0xd128cc(0x34e)],'finishedAt':_0x5b2aa3[_0xd128cc(0x2e0)],'duration_ms':_0x2a8e4e},'tasks':_0xae8e97[_0xd128cc(0x285)](_0x3c0215=>({'name':_0x3c0215['name'],'state':_0x3c0215['state'],'startedAt':_0x3c0215[_0xd128cc(0x261)]?new Date(_0x3c0215[_0xd128cc(0x261)][_0xd128cc(0x273)])[_0xd128cc(0x1e3)]():null,'updatedAt':_0x3c0215[_0xd128cc(0x261)]?new Date(_0x3c0215[_0xd128cc(0x261)]['end'])[_0xd128cc(0x1e3)]():null,'duration_ms':_0x3c0215[_0xd128cc(0x261)]?.[_0xd128cc(0x298)]||null})),'stats':_0x2c67cd};}}export class WorkflowSchedulesCommand extends BaseCommand{['name']=a54_0x2a0943(0x31d);[a54_0x2a0943(0x337)]=a54_0x2a0943(0x2c1);async['execute'](_0x2b70a4){const _0x13ac2d=a54_0x2a0943,{options:_0x32cf6b,tdx:_0x5f2035}=_0x2b70a4,_0x33a6cd=await withSpinner(_0x13ac2d(0x2a6),()=>_0x5f2035[_0x13ac2d(0x2f9)][_0x13ac2d(0x226)](),{'verbose':_0x32cf6b['verbose']}),_0x4ae562=_0x33a6cd[_0x13ac2d(0x2c0)];console[_0x13ac2d(0x2ae)]('✔\x20Found\x20'+_0x4ae562[_0x13ac2d(0x2c2)]+'\x20schedule'+(_0x4ae562[_0x13ac2d(0x2c2)]!==0x1?'s':''));if(isStructuredFormat(_0x32cf6b))await handleSDKOutput(_0x4ae562,_0x32cf6b);else{if(_0x4ae562[_0x13ac2d(0x2c2)]===0x0)console['log']('No\x20schedules\x20found');else for(const _0x5bad7c of _0x4ae562){const _0x36b644=_0x5bad7c[_0x13ac2d(0x29f)]?a54_0x13943d['yellow'](_0x13ac2d(0x238)):'',_0xf6d701=_0x5bad7c[_0x13ac2d(0x330)]?.['name']?a54_0x13943d[_0x13ac2d(0x31c)]('\x20['+_0x5bad7c[_0x13ac2d(0x330)]['name']+']'):'',_0x3c3c73=_0x5bad7c['nextRunTime']?a54_0x13943d['dim'](_0x13ac2d(0x2b4)+new Date(_0x5bad7c['nextRunTime'])[_0x13ac2d(0x1e4)]()):'';console['log'](_0x13ac2d(0x216)+_0x5bad7c['id']+'\x20'+(_0x5bad7c[_0x13ac2d(0x2f9)]?.[_0x13ac2d(0x1c3)]||'(unknown)')+_0xf6d701+_0x36b644+_0x3c3c73);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]='workflow:schedule:enable';['description']=a54_0x2a0943(0x367);async[a54_0x2a0943(0x295)](_0x1f52aa){const _0x1ef387=a54_0x2a0943,{options:_0x5e3975,args:_0x5153c8,tdx:_0x24a8ba}=_0x1f52aa,_0x57df67=_0x5153c8[0x0];if(!_0x57df67)return console[_0x1ef387(0x2ae)](a54_0x13943d[_0x1ef387(0x1fc)](_0x1ef387(0x33f)),_0x1ef387(0x26f)),console['error'](a54_0x13943d[_0x1ef387(0x31c)](_0x1ef387(0x2cd))),console['error'](a54_0x13943d[_0x1ef387(0x31c)](_0x1ef387(0x382))),0x1;const _0x108dd3=await withSpinner(_0x1ef387(0x1e0)+_0x57df67+_0x1ef387(0x320),()=>_0x24a8ba[_0x1ef387(0x2f9)][_0x1ef387(0x2ab)](_0x57df67),{'verbose':_0x5e3975[_0x1ef387(0x31f)]}),_0x3df794=_0x108dd3['data'];return isStructuredFormat(_0x5e3975)?await handleSingleObjectOutput(_0x3df794,_0x5e3975):(console['log']('✔\x20Schedule\x20#'+_0x57df67+_0x1ef387(0x269)+(_0x3df794[_0x1ef387(0x2f9)]?.[_0x1ef387(0x1c3)]||_0x1ef387(0x263))+')'),_0x3df794['nextRunTime']&&console[_0x1ef387(0x31e)](a54_0x13943d[_0x1ef387(0x31c)](_0x1ef387(0x23c)+new Date(_0x3df794[_0x1ef387(0x1d3)])[_0x1ef387(0x1e4)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a54_0x2a0943(0x1c3)]=a54_0x2a0943(0x36b);['description']=a54_0x2a0943(0x222);async['execute'](_0x350c4f){const _0x4e22fc=a54_0x2a0943,{options:_0x2c1a79,args:_0x5113f5,tdx:_0x573e81}=_0x350c4f,_0x4b573c=_0x5113f5[0x0];if(!_0x4b573c)return console[_0x4e22fc(0x2ae)](a54_0x13943d[_0x4e22fc(0x1fc)]('Error:'),'Schedule\x20ID\x20is\x20required'),console[_0x4e22fc(0x2ae)](a54_0x13943d[_0x4e22fc(0x31c)](_0x4e22fc(0x23a))),console[_0x4e22fc(0x2ae)](a54_0x13943d[_0x4e22fc(0x31c)](_0x4e22fc(0x382))),0x1;const _0x398386=await withSpinner(_0x4e22fc(0x32e)+_0x4b573c+'...',()=>_0x573e81[_0x4e22fc(0x2f9)]['disableSchedule'](_0x4b573c),{'verbose':_0x2c1a79['verbose']}),_0x4488fb=_0x398386[_0x4e22fc(0x2c0)];return isStructuredFormat(_0x2c1a79)?await handleSingleObjectOutput(_0x4488fb,_0x2c1a79):console[_0x4e22fc(0x31e)](_0x4e22fc(0x300)+_0x4b573c+_0x4e22fc(0x246)+(_0x4488fb['workflow']?.[_0x4e22fc(0x1c3)]||'unknown')+')'),0x0;}}
|
|
1
|
+
const a54_0x43a89d=a54_0x3318;(function(_0x5194b4,_0xde79a9){const _0x1b3de2=a54_0x3318,_0x46c40d=_0x5194b4();while(!![]){try{const _0x53490c=-parseInt(_0x1b3de2(0x124))/0x1+parseInt(_0x1b3de2(0x246))/0x2+-parseInt(_0x1b3de2(0x1cb))/0x3*(-parseInt(_0x1b3de2(0x1c7))/0x4)+parseInt(_0x1b3de2(0x24f))/0x5*(-parseInt(_0x1b3de2(0x18c))/0x6)+parseInt(_0x1b3de2(0x195))/0x7*(-parseInt(_0x1b3de2(0x136))/0x8)+-parseInt(_0x1b3de2(0x21d))/0x9+parseInt(_0x1b3de2(0x128))/0xa;if(_0x53490c===_0xde79a9)break;else _0x46c40d['push'](_0x46c40d['shift']());}catch(_0x378f86){_0x46c40d['push'](_0x46c40d['shift']());}}}(a54_0x4f75,0x40dcc));import a54_0x5efbd7 from'chalk';import{existsSync}from'fs';import a54_0x5981fe from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,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 a54_0x1897d from'prompts';function getAttemptStatusDisplay(_0x397380){const _0x41ae5e=a54_0x3318;if(!_0x397380)return{'icon':'⏳','text':''};const {done:_0x2b0252,success:_0x388fdd,cancelRequested:_0x4aed7d}=_0x397380;if(!_0x2b0252)return _0x4aed7d?{'icon':'🛑','text':a54_0x5efbd7[_0x41ae5e(0x191)](_0x41ae5e(0x111))}:{'icon':'🔄','text':a54_0x5efbd7[_0x41ae5e(0x27d)](_0x41ae5e(0x185))};if(_0x388fdd)return{'icon':'✅','text':a54_0x5efbd7['green'](_0x41ae5e(0x19e))};return{'icon':'❌','text':a54_0x5efbd7[_0x41ae5e(0xf0)](_0x41ae5e(0x25a))};}export class WorkflowBaseCommand extends BaseCommand{[a54_0x43a89d(0x1c3)](_0x578230,_0x461432,_0x42ade4=0x0){return _0x578230[_0x42ade4]||_0x461432['workflowProject'];}['requireProject'](_0x57621e,_0x4949f0,_0x3087ad=0x0){const _0x300698=a54_0x43a89d,_0x4cc863=this[_0x300698(0x1c3)](_0x57621e,_0x4949f0,_0x3087ad);if(!_0x4cc863)return console[_0x300698(0x25a)](a54_0x5efbd7['red']('Error:'),_0x300698(0x1c2)),console[_0x300698(0x25a)](a54_0x5efbd7[_0x300698(0x1cd)](_0x300698(0xd9))),null;return _0x4cc863;}[a54_0x43a89d(0x132)](_0x426783,_0x1ad43d){const _0x3c10c5=a54_0x43a89d;if(_0x426783[0x0]){const _0xa88cc4=_0x426783[0x0][_0x3c10c5(0x11a)]('.');if(_0xa88cc4[_0x3c10c5(0x201)]===0x1)return{'projectName':_0xa88cc4[0x0],'workflowName':undefined};else return _0xa88cc4[_0x3c10c5(0x201)]===0x2?{'projectName':_0xa88cc4[0x0],'workflowName':_0xa88cc4[0x1]}:(console[_0x3c10c5(0x25a)](a54_0x5efbd7[_0x3c10c5(0xf0)](_0x3c10c5(0xf5)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x1ad43d[_0x3c10c5(0x241)],'workflowName':undefined};}[a54_0x43a89d(0x146)](_0x4e9b02,_0x2f5c2b,_0x513097=0x0){const _0x1dbd54=a54_0x43a89d;if(_0x4e9b02[_0x513097])return _0x4e9b02[_0x513097];if(_0x2f5c2b[_0x1dbd54(0x241)]){const _0x644047=a54_0x5981fe[_0x1dbd54(0x205)](process[_0x1dbd54(0x1b0)](),'workflows',_0x2f5c2b[_0x1dbd54(0x241)]);if(existsSync(a54_0x5981fe[_0x1dbd54(0x205)](_0x644047,'tdx.json')))return _0x644047;}return undefined;}async[a54_0x43a89d(0x1b4)](_0x571bd7,_0x5cb549,_0x20fff0){const _0x43f10b=a54_0x43a89d;try{const _0x420011=await _0x571bd7['workflow'][_0x43f10b(0x268)](_0x5cb549,{'limit':0x1});if(_0x420011[_0x43f10b(0x201)]>0x0){const _0x29a6ce=_0x420011[0x0]['id'],_0x26b8a4=getWorkflowUrl(_0x20fff0,_0x29a6ce);console[_0x43f10b(0x25a)]('\x20\x20Console:\x20'+a54_0x5efbd7['cyan'](_0x26b8a4));}}catch{}}}function a54_0x4f75(){const _0x137f48=['revision','index','Project:\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','→\x20Project:\x20','key','clear','Analyzing\x20project...','toISOString','List\x20workflow\x20schedules','error','executeCloneProject','renderSingleTimeline','⚠\x20Showing\x20first\x20','Listing\x20schedules...','\x20tasks','min','From\x20task:\x20','includeSubtasks','attempt:','\x20attempt','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x20modified','\x0aDry\x20run\x20-\x20no\x20project\x20created','workflows','session_id','MAX_TASKS_DISPLAY','tdx\x20wf\x20attempt\x20','done','Error:\x20Secret\x20key\x20is\x20required','Killing\x20attempt...','executePushProject','finishedAt','Include\x20retried:\x20yes','readFile','\x20secrets\x20set\x20for\x20project\x20\x27','includes','Select\x20a\x20session\x20to\x20view\x20timeline:','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Schedule\x20ID\x20is\x20required','workflow:attempts','✔\x20Schedule\x20#','\x1b[1A\x1b[2K','\x22?\x20This\x20cannot\x20be\x20undone.','state','blue','getHours','repeat','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','projectName','select','\x20is\x20not\x20a\x20directory','targetDir','No\x20workflow\x20projects\x20found','workflow:sessions','relative','workflow:schedule:disable','Listing\x20secrets...','\x20schedule','sourceProjectName','No\x20workflows\x20found','updatedAt','stdout','output','---\x20','✔\x20Pull\x20complete','\x20\x20Project\x20ID:\x20','\x20workflow','/attempt/','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','prepareCloneProject','No\x20matching\x20sessions\x20found','Error:\x20Invalid\x20JSON\x20in\x20--params','Select\x20a\x20task\x20to\x20view\x20logs:','\x0a✔\x20Already\x20up\x20to\x20date','context','✔\x20Pushed\x20','\x20(system)','Project\x20name:\x20','now','✔\x20Showing\x20','POLL_INTERVAL_MS','data','Pattern:\x20','TASK_NAME_WIDTH','\x0a⚠\x20Project\x20\x22','basename','Params:\x20','rows','Enable\x20a\x20workflow\x20schedule','Source\x20directory:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','red','Retrying\x20session...','preparePushProject','Status:\x20','\x22\x20to\x20new\x20project\x20\x22','Error:','fileCount','disabledAt','disableSchedule','verbose','json','name','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','duration','kill','\x0aApply\x20these\x20changes?','keys','\x20has\x20no\x20attempts','\x20secrets...','Task\x20name:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','MAX_POLL_ITERATIONS','slice','.\x20Expected\x20format:\x20KEY=VALUE','cyan','Getting\x20attempt\x20tasks...','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','startedAt','toLowerCase','ICON_WIDTH','diff','fromTask','canceling','\x20-\x20','Key:\x20','renderSessionsTimeline','...','renderTimeline','match','LABEL_WIDTH_DIVISOR','Show\x20logs\x20for\x20a\x20workflow\x20attempt','split','MIN_LABEL_COUNT','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Project\x20filter:\x20','Pushing\x20workflow\x20project...','stringify','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','planned','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','metadata','500086Bhzvsj','isTTY','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Expected\x20format:\x20--param\x20key=value','7205600rUHRpE','Pulling\x20project\x20','Error:\x20Attempt\x20ID\x20is\x20required','(use\x20--limit\x20to\x20see\x20more)','unknown','Deleting\x20project\x20','→\x20New\x20project:\x20','message','filesExtracted','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','parseProjectWorkflowPattern','workflowName','nextRunTime','Starting\x20workflow\x20run...','3529264fmBoVn','No\x20sessions\x20found','yes','Loading\x20workflows...','requireProject','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','pullProject','getDate','Key\x20cannot\x20be\x20empty','task','-\x20nothing\x20pushed','start','Dry\x20run:\x20yes','set','workflow:download','substring','resolveProjectDir','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','revision:\x20','\x0a✔\x20No\x20changes\x20to\x20push','Source:\x20','\x20\x20Target:\x20','createdAt','sourceDir','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','\x20new','filter','toLocaleString','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','localeCompare','✔\x20Workflow\x20project\x20context\x20cleared.','workflow:kill','workflow:push','enableSchedule','new','map','tasks','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','workflow:attempt','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','icon','follow','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','type','MAX_LABEL_COUNT','floor','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','parse','Source\x20directory\x20is\x20required','✔\x20Workflow\x20project\x20set\x20to:\x20','Target\x20directory:\x20','No\x20sessions\x20with\x20timing\x20information','Secrets\x20to\x20set:\x20','Session\x20','retryAttemptName','attempts','msPerChar','skipValidation','listSecrets','📁\x20','fullName','No\x20log\x20content\x20found','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','list','resolve','sys','projectId','\x22\x20already\x20exists\x20(ID:\x20','retrySession','param','MIN_TIMELINE_WIDTH','\x20from\x20session\x20','group_error','No\x20workflow\x20tdx.json\x20found','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','end','No\x20sessions\x20found\x20in\x20project:\x20','✔\x20Push\x20complete','running','isNewProject','\x0aUpdate\x20existing\x20project\x20\x22','\x20\x20Project:\x20','workflow:use','Pull\x20workflow\x20project\x20to\x20local\x20folder','\x20(disabled)','84468NQybLf','Parameters:\x20','Getting\x20attempt\x20details...','attemptId','Warning:','yellow','\x20\x20Next\x20run:\x20','workflow','Filter:\x20','7RWPJZJ','Show\x20tasks\x20for\x20an\x20attempt','✔\x20Clone\x20complete','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','\x20secret','workflow:logs','fileSize','\x0a✔\x20Attempt\x20complete','includeRetried','success','\x20deleted','ICON_SPACING','Select\x20a\x20workflow\x20to\x20run','\x0aFailed\x20to\x20fetch\x20attempt\x20data','durationMs','getMonth','changes','workflow:clone','execute','taskName','Attempt\x20ID:\x20','Output\x20directory:\x20','fs/promises','(unknown)','New\x20project\x20name:\x20','\x20of\x20','force','cwd','\x20session','resolveProjectId','\x20project','showWorkflowConsoleUrl','projects','sessions','dryRun','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','summary','Resolving\x20project\x20\x27','Validation:\x20skipped','resumeFrom','\x20\x20Files\x20extracted:\x20','Writing\x20files...','Loading\x20sessions...','values','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Project\x20name\x20is\x20required','resolveProject','table','getFullYear','max','330520AMTTwX','description','utf-8','log','6PtvRjt','LABEL_MIN_SPACING','dim','Target:\x20','No\x20sessions\x20found\x20for:\x20','List\x20workflow\x20attempts','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Show\x20specific\x20attempt\x20details','MAX_TIMELINE_WIDTH','autocomplete','\x20\x20Workflow:\x20','Failed\x20to\x20fetch\x20attempt\x20data','logFiles','✔\x20Retry\x20started','path','Fetching\x20log\x20files...','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20\x20Location:\x20','\x20\x20Changes:\x20','Start\x20a\x20workflow\x20run','all','\x0aDry\x20run\x20-\x20nothing\x20pushed','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x20task','newProjectId','-\x20no\x20files\x20written','window','listSchedules','Attempt:\x20','workflow:run','\x20unchanged','\x0aPush\x20these\x20changes?','status','project','generateSessionTimelineRows','\x20\x20Session\x20ID:\x20','sessionTime','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','trim','sort','📋\x20','Retry\x20a\x20session\x20or\x20attempt','padStart','params','navigateSessionsInteractive','startTime','site','jsonl','workflow:schedules','lastAttempt','No\x20attempts\x20found\x20for:\x20','has','title','size','length','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','fill','\x20\x20tdx\x20wf\x20use\x20<project>','join','Usage:\x20tdx\x20wf\x20use\x20<project>','Deleting\x20secret...','download','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Cancelled','retryAttempt','find','Source\x20project:\x20','getMinutes','sessionId','Listing\x20workflow\x20projects...','No\x20schedules\x20found','applyPullProject','Including\x20subtasks:\x20yes','format','\x0aError:','cancelRequested','columns','Revision:\x20','Enabling\x20schedule\x20#','✔\x20Deleted\x20project\x20','\x20\x20Revision:\x20','session','558909TUdoXv','Error:\x20Project\x20name\x20is\x20required','Filter:\x20project=','buildTimelineData','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','setSecrets','List\x20workflow\x20execution\x20sessions','get','Auto-selected\x20latest\x20session:\x20','Project\x20directory:\x20','Session\x20not\x20found:\x20','Files\x20to\x20upload:\x20','push','Setting\x20','startsWith','hasChanges','\x20(use\x20--limit\x20to\x20show\x20more)','Kill\x20a\x20running\x20attempt','workflow:timeline','getTime','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','green','Tip:\x20cd\x20to\x20workflows/','modified','✔\x20Found\x20','💡\x20Tip:\x20Use\x20','✔\x20Secret\x20\x27','Listing\x20workflow\x20sessions...','unchanged','\x20logs','\x0aPolling...\x20(','\x20\x20Session\x20context\x20set\x20to:\x20','GUTTER','Workflow:\x20','No\x20projects\x20match\x20pattern:\x20','workflowProject','write','round','Setting\x20secret...','newProjectName','822714BQvhwr','value','attempt','pending','targetExists','📅\x20#','limit','pollTimeline','isDirectory','10EyPVIx'];a54_0x4f75=function(){return _0x137f48;};return a54_0x4f75();}export class WorkflowUseCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x189);['description']=a54_0x43a89d(0x1d1);async['execute'](_0x470b1b){const _0x433173=a54_0x43a89d,{options:_0x33b982,args:_0x2689f2,tdx:_0x28881d}=_0x470b1b,_0x4dd41a=_0x2689f2[0x0],_0x345d20=_0x33b982[_0x433173(0x256)];if(_0x345d20)return saveSessionContext({'workflow_project':undefined},_0x33b982[_0x433173(0x21c)]),console[_0x433173(0x1ca)](a54_0x5efbd7[_0x433173(0x233)](_0x433173(0x154))),0x0;if(!_0x4dd41a)return console[_0x433173(0x25a)](a54_0x5efbd7[_0x433173(0xf0)](_0x433173(0xf5)),'Project\x20name\x20is\x20required'),console[_0x433173(0x25a)](a54_0x5efbd7['dim'](_0x433173(0x206))),console[_0x433173(0x25a)](a54_0x5efbd7[_0x433173(0x1cd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x207bd7=await withSpinner(_0x433173(0x1ba)+_0x4dd41a+'\x27...',()=>_0x28881d[_0x433173(0x193)][_0x433173(0x1b2)](_0x4dd41a),{'verbose':_0x33b982[_0x433173(0xf9)]}),{name:_0x1862da}=_0x207bd7['data'];return saveSessionContext({'workflow_project':_0x1862da},_0x33b982[_0x433173(0x21c)]),console[_0x433173(0x1ca)](a54_0x5efbd7[_0x433173(0x233)](_0x433173(0x167)+a54_0x5efbd7['cyan'](_0x1862da))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a54_0x43a89d(0xfb)]='workflow:projects';[a54_0x43a89d(0x1c8)]='List\x20all\x20workflow\x20projects';async['execute'](_0x2d3d){const _0x5bc858=a54_0x43a89d,{options:_0x2f2e21,args:_0x3d32f0,tdx:_0xf97bbd}=_0x2d3d,_0x530b05=_0x3d32f0[0x0];_0x2f2e21[_0x5bc858(0xf9)]&&_0x530b05&&console['error'](_0x5bc858(0xe7)+_0x530b05);const _0x489f0c=await withSpinner(_0x5bc858(0x210),()=>_0xf97bbd['workflow'][_0x5bc858(0x1b5)](_0x530b05,{'limit':_0x2f2e21['limit']}),{'verbose':_0x2f2e21['verbose']});let _0x4d079e=_0x489f0c[_0x5bc858(0xe6)];_0x4d079e[_0x5bc858(0x1f2)]((_0x100382,_0x4694a7)=>_0x100382[_0x5bc858(0xfb)]['localeCompare'](_0x4694a7[_0x5bc858(0xfb)]));const _0x48bd44=_0x2f2e21[_0x5bc858(0x24c)]||0x64,_0x552caf=_0x4d079e['length']>=_0x48bd44?a54_0x5efbd7[_0x5bc858(0x1cd)](_0x5bc858(0x22e)):'';console[_0x5bc858(0x25a)](_0x5bc858(0x236)+_0x4d079e[_0x5bc858(0x201)]+_0x5bc858(0x1b3)+(_0x4d079e[_0x5bc858(0x201)]!==0x1?'s':'')+_0x552caf);if(_0x2f2e21[_0x5bc858(0x214)]===_0x5bc858(0xfa)||_0x2f2e21[_0x5bc858(0x214)]==='jsonl'||_0x2f2e21[_0x5bc858(0x214)]===_0x5bc858(0x1c4))await handleSDKOutput(_0x4d079e,_0x2f2e21);else{if(_0x4d079e['length']===0x0)_0x530b05?console[_0x5bc858(0x1ca)](_0x5bc858(0x240)+_0x530b05):console['log'](_0x5bc858(0xc9));else{const _0x300f68=_0x4d079e[_0x5bc858(0x159)](_0x1fdb2d=>{const _0x27a3d9=_0x5bc858,_0x469c88=_0x1fdb2d[_0x27a3d9(0x123)]?.['some'](_0x3f9a9d=>_0x3f9a9d[_0x27a3d9(0x255)]===_0x27a3d9(0x177)),_0x2d5941=_0x469c88?a54_0x5efbd7['dim'](_0x27a3d9(0xe1)):'';return _0x27a3d9(0x171)+_0x1fdb2d[_0x27a3d9(0xfb)]+_0x2d5941;});await writeOutput(_0x300f68[_0x5bc858(0x205)]('\x0a'),_0x2f2e21[_0x5bc858(0xd3)],_0x5bc858(0x175));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:workflows';[a54_0x43a89d(0x1c8)]='List\x20workflows';async[a54_0x43a89d(0x1a7)](_0x114f2b){const _0x1fa8da=a54_0x43a89d,{options:_0x800ea6,args:_0x5e5919,tdx:_0x337d19}=_0x114f2b,_0x1136f8=this[_0x1fa8da(0x1c3)](_0x5e5919,_0x800ea6);_0x800ea6['verbose']&&_0x1136f8&&console['error'](_0x1fa8da(0x11d)+_0x1136f8);const _0x1bf215=await withSpinner('Listing\x20workflows...',()=>_0x337d19[_0x1fa8da(0x193)][_0x1fa8da(0x268)](_0x1136f8,{'limit':_0x800ea6[_0x1fa8da(0x24c)]}),{'verbose':_0x800ea6[_0x1fa8da(0xf9)]});let _0x33079b=_0x1bf215['data'];_0x33079b[_0x1fa8da(0x1f2)]((_0x5f3364,_0x4d32be)=>{const _0x3a8c62=_0x1fa8da,_0xd62a8b=_0x5f3364[_0x3a8c62(0xfb)][_0x3a8c62(0x153)](_0x4d32be[_0x3a8c62(0xfb)]);if(_0xd62a8b!==0x0)return _0xd62a8b;return(_0x5f3364[_0x3a8c62(0x1ec)]?.['name']||'')[_0x3a8c62(0x153)](_0x4d32be['project']?.[_0x3a8c62(0xfb)]||'');});const _0x3b2967=_0x800ea6[_0x1fa8da(0x24c)]||0x64,_0x4cbaa1=_0x33079b[_0x1fa8da(0x201)]>=_0x3b2967?a54_0x5efbd7[_0x1fa8da(0x1cd)](_0x1fa8da(0x22e)):'';console['error']('✔\x20Found\x20'+_0x33079b[_0x1fa8da(0x201)]+_0x1fa8da(0xd7)+(_0x33079b[_0x1fa8da(0x201)]!==0x1?'s':'')+_0x4cbaa1);if(_0x800ea6[_0x1fa8da(0x214)]==='json'||_0x800ea6[_0x1fa8da(0x214)]===_0x1fa8da(0x1fa)||_0x800ea6['format']===_0x1fa8da(0x1c4))await handleSDKOutput(_0x33079b,_0x800ea6);else{if(_0x33079b['length']===0x0)_0x1136f8?console[_0x1fa8da(0x1ca)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x1136f8):console[_0x1fa8da(0x1ca)](_0x1fa8da(0xd0));else{const _0x2afed7=_0x800ea6[_0x1fa8da(0x1f9)],_0x4ea1c4=_0x33079b[_0x1fa8da(0x159)](_0x1cbe19=>{const _0x488c84=_0x1fa8da,_0x77e3a5=a54_0x5efbd7[_0x488c84(0x1cd)]('#'+_0x1cbe19['id']),_0x42e8fd=hyperlink(_0x77e3a5,getWorkflowUrl(_0x2afed7,_0x1cbe19['id'])),_0x406d98=_0x1cbe19[_0x488c84(0x1ec)]?.[_0x488c84(0xfb)]?a54_0x5efbd7[_0x488c84(0x1cd)]('\x20('+_0x1cbe19[_0x488c84(0x1ec)][_0x488c84(0xfb)]+')'):'';return _0x488c84(0x1f3)+_0x42e8fd+'\x20'+_0x1cbe19[_0x488c84(0xfb)]+_0x406d98;});await writeOutput(_0x4ea1c4[_0x1fa8da(0x205)]('\x0a'),_0x800ea6[_0x1fa8da(0xd3)],_0x1fa8da(0x175));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a54_0x43a89d(0xca);['description']=a54_0x43a89d(0x224);async[a54_0x43a89d(0x1a7)](_0xa1c917){const _0x21fd95=a54_0x43a89d,{options:_0x26c8e3,args:_0x55d176,tdx:_0x2e3dab}=_0xa1c917,_0x18933b=this[_0x21fd95(0x132)](_0x55d176,_0x26c8e3);if(!_0x18933b)return 0x1;const {projectName:_0x355491,workflowName:_0x14054c}=_0x18933b;if(_0x26c8e3[_0x21fd95(0xf9)]){if(_0x355491&&_0x14054c)console[_0x21fd95(0x25a)](_0x21fd95(0x194)+_0x355491+'.'+_0x14054c);else _0x355491&&console['error'](_0x21fd95(0x21f)+_0x355491);const _0x48f5d0=_0x26c8e3['status'];_0x48f5d0&&console[_0x21fd95(0x25a)](_0x21fd95(0xf3)+_0x48f5d0);}let _0x16f01c=0x28;if(process[_0x21fd95(0xd2)][_0x21fd95(0x125)]&&!_0x26c8e3[_0x21fd95(0xd3)]&&!_0x26c8e3[_0x21fd95(0x214)]){const _0x3ca4e1=process[_0x21fd95(0xd2)][_0x21fd95(0xec)]||0x28;_0x16f01c=Math[_0x21fd95(0x1c6)](0x14,Math[_0x21fd95(0x163)](_0x3ca4e1*0x2/0x3));}const _0x568f3c=_0x26c8e3[_0x21fd95(0x24c)]||_0x16f01c,_0x3c2eae=await withSpinner(_0x21fd95(0x239),()=>_0x2e3dab[_0x21fd95(0x193)][_0x21fd95(0x1b6)]({'projectName':_0x355491,'workflowName':_0x14054c,'status':_0x26c8e3[_0x21fd95(0x1eb)],'fromTime':_0x26c8e3['from'],'toTime':_0x26c8e3['to'],'limit':_0x568f3c}),{'verbose':_0x26c8e3['verbose']}),_0x18355e=_0x3c2eae[_0x21fd95(0xe6)];_0x18355e[_0x21fd95(0x1f2)]((_0x33d79b,_0x5cbe67)=>{const _0x3e1bd7=_0x21fd95,_0x29214b=_0x33d79b['sessionTime']||'',_0xc5a200=_0x5cbe67['sessionTime']||'';return _0xc5a200[_0x3e1bd7(0x153)](_0x29214b);});_0x18355e['length']>=_0x568f3c?console[_0x21fd95(0x25a)](_0x21fd95(0xe4)+_0x18355e['length']+'\x20sessions\x20'+a54_0x5efbd7[_0x21fd95(0x1cd)](_0x21fd95(0x12b))):console[_0x21fd95(0x25a)](_0x21fd95(0x236)+_0x18355e[_0x21fd95(0x201)]+_0x21fd95(0x1b1)+(_0x18355e[_0x21fd95(0x201)]!==0x1?'s':''));if(_0x26c8e3['format']==='json'||_0x26c8e3['format']==='jsonl'||_0x26c8e3[_0x21fd95(0x214)]===_0x21fd95(0x1c4))await handleSDKOutput(_0x18355e,_0x26c8e3);else{if(!process['stdout'][_0x21fd95(0x125)]||_0x26c8e3[_0x21fd95(0xd3)]){if(_0x18355e[_0x21fd95(0x201)]===0x0){if(_0x355491&&_0x14054c)console[_0x21fd95(0x1ca)](_0x21fd95(0x1cf)+_0x355491+'.'+_0x14054c);else _0x355491?console[_0x21fd95(0x1ca)](_0x21fd95(0x183)+_0x355491):console[_0x21fd95(0x1ca)](_0x21fd95(0x137));}else{const _0x443e81=_0x26c8e3['site'],_0x3ad1a2=this[_0x21fd95(0x114)](_0x18355e,_0x443e81);_0x26c8e3[_0x21fd95(0xd3)]?await writeOutput(_0x3ad1a2,_0x26c8e3[_0x21fd95(0xd3)],'list'):console[_0x21fd95(0x1ca)](_0x3ad1a2);}!_0x355491&&(console[_0x21fd95(0x25a)](''),console[_0x21fd95(0x25a)](a54_0x5efbd7[_0x21fd95(0x1cd)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x21fd95(0x25a)](a54_0x5efbd7[_0x21fd95(0x1cd)](_0x21fd95(0x180))+'or'+a54_0x5efbd7[_0x21fd95(0x1cd)](_0x21fd95(0x204))));}else{if(_0x18355e[_0x21fd95(0x201)]===0x0){if(_0x355491&&_0x14054c)console[_0x21fd95(0x1ca)](_0x21fd95(0x1cf)+_0x355491+'.'+_0x14054c);else _0x355491?console[_0x21fd95(0x1ca)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x355491):console[_0x21fd95(0x1ca)]('No\x20sessions\x20found');}else await this['navigateSessionsInteractive'](_0x18355e,_0xa1c917,_0x355491);}}return 0x0;}[a54_0x43a89d(0x114)](_0x1e8488,_0x617840){const _0x3ca59e=a54_0x43a89d,_0x324f55=[],_0x5582c5=new Map();let _0x1682c2=Infinity,_0x4e9bde=-Infinity;for(const _0x301f4b of _0x1e8488){if(_0x301f4b[_0x3ca59e(0x1fc)]?.[_0x3ca59e(0x14c)]){const _0x28e574=new Date(_0x301f4b[_0x3ca59e(0x1fc)][_0x3ca59e(0x14c)])[_0x3ca59e(0x231)](),_0x259ddf=_0x301f4b['lastAttempt'][_0x3ca59e(0x270)]?new Date(_0x301f4b['lastAttempt'][_0x3ca59e(0x270)])['getTime']():Date[_0x3ca59e(0xe3)](),_0x4c8624=_0x301f4b[_0x3ca59e(0x1ec)]?.[_0x3ca59e(0xfb)]||_0x3ca59e(0x1ac);!_0x5582c5[_0x3ca59e(0x1fe)](_0x4c8624)&&_0x5582c5[_0x3ca59e(0x143)](_0x4c8624,[]),_0x5582c5[_0x3ca59e(0x225)](_0x4c8624)['push']({'session':_0x301f4b,'startTime':_0x28e574,'endTime':_0x259ddf,'duration':_0x259ddf-_0x28e574}),_0x1682c2=Math[_0x3ca59e(0x260)](_0x1682c2,_0x28e574),_0x4e9bde=Math[_0x3ca59e(0x1c6)](_0x4e9bde,_0x259ddf);}}if(_0x5582c5[_0x3ca59e(0x200)]===0x0)return _0x3ca59e(0x169);const _0x812a02=process[_0x3ca59e(0xd2)][_0x3ca59e(0x217)]||0x78,_0x1e0b5e=0x1e,_0x3b7312=0x32,_0x25f095=0x4,_0x42e16c=Math[_0x3ca59e(0x260)](_0x3b7312,Math[_0x3ca59e(0x1c6)](_0x1e0b5e,Math[_0x3ca59e(0x163)](_0x812a02*0.3))),_0x1208c9=_0x812a02-_0x42e16c-TIMELINE_CONFIG[_0x3ca59e(0x23e)]-0x3-_0x25f095,_0x12bb1d=_0x4e9bde-_0x1682c2,_0x5c5231=_0x12bb1d/_0x42e16c,_0x2c3beb=renderTimeAxis({'startTime':_0x1682c2,'endTime':_0x4e9bde,'durationMs':_0x12bb1d,'msPerChar':_0x5c5231},_0x42e16c),_0x571475=[];for(const _0x1bb6f6 of _0x5582c5[_0x3ca59e(0x1c0)]()){_0x571475[_0x3ca59e(0x22a)](..._0x1bb6f6);}_0x571475['sort']((_0xf569e,_0x34315f)=>_0x34315f[_0x3ca59e(0x1f8)]-_0xf569e[_0x3ca59e(0x1f8)]);const _0x27aacd=new Date(_0x1682c2),_0xd230c9=formatDate(_0x27aacd),_0x117166=_0x25f095+TIMELINE_CONFIG[_0x3ca59e(0x10e)]+TIMELINE_CONFIG[_0x3ca59e(0x1a0)]+_0x1208c9,_0x50ec3c='\x20'[_0x3ca59e(0x27f)](_0x117166-_0xd230c9[_0x3ca59e(0x201)]),_0x360272=_0x50ec3c+a54_0x5efbd7[_0x3ca59e(0x1cd)](_0xd230c9)+'\x20'+_0x2c3beb;_0x324f55['push'](_0x360272);const _0x68ce6c=0x16;let _0x323a0=0x0;for(const _0xf48376 of _0x571475){const _0x3bee50=_0xf48376[_0x3ca59e(0x21c)][_0x3ca59e(0x1ec)]?.[_0x3ca59e(0xfb)]||'?',_0x14b92a=Math[_0x3ca59e(0x260)](stringWidth(_0x3bee50),_0x68ce6c);_0x323a0=Math[_0x3ca59e(0x1c6)](_0x323a0,_0x14b92a);}for(const _0x1d5122 of _0x571475){const {session:_0x36c852,startTime:_0x50b03c,endTime:_0x17ed07,duration:_0xf6fc1}=_0x1d5122,_0x21d049=_0x36c852[_0x3ca59e(0x1ec)]?.['id'],_0x2055db=_0x36c852['id'],_0x58cfb0=_0x36c852[_0x3ca59e(0x1ec)]?.[_0x3ca59e(0xfb)]||'?',_0xcdca1e=_0x36c852[_0x3ca59e(0x193)]?.[_0x3ca59e(0xfb)]||'?';let _0xa9f97a,_0x4434ee;if(_0x36c852[_0x3ca59e(0x1fc)]){const _0x3a021b=_0x36c852[_0x3ca59e(0x1fc)];!_0x3a021b[_0x3ca59e(0x26c)]?(_0xa9f97a=_0x3a021b[_0x3ca59e(0x216)]?'🛑':'🔄',_0x4434ee=_0x3a021b[_0x3ca59e(0x216)]?a54_0x5efbd7[_0x3ca59e(0x191)]:a54_0x5efbd7[_0x3ca59e(0x27d)]):(_0xa9f97a=_0x3a021b[_0x3ca59e(0x19e)]?'✅':'❌',_0x4434ee=_0x3a021b[_0x3ca59e(0x19e)]?a54_0x5efbd7[_0x3ca59e(0x233)]:a54_0x5efbd7[_0x3ca59e(0xf0)]);}else _0xa9f97a='⏳',_0x4434ee=a54_0x5efbd7[_0x3ca59e(0x1cd)];const _0x5f3f3a='#'+_0x2055db,_0x19fdd3=_0x21d049?hyperlink(_0x5f3f3a,getWorkflowSessionUrl(_0x617840,_0x21d049,_0x2055db)):_0x5f3f3a;let _0x16b197=_0x58cfb0;stringWidth(_0x58cfb0)>_0x68ce6c&&(_0x16b197=_0x58cfb0[_0x3ca59e(0x107)](0x0,_0x68ce6c-0x1)+'…');const _0x584f26=a54_0x5efbd7[_0x3ca59e(0x1cd)](_0x16b197),_0xac2a26=stringWidth(_0x16b197),_0x4496db='\x20'[_0x3ca59e(0x27f)](_0x323a0-stringWidth(_0x16b197)+0x2),_0x4a6a7d='('+formatElapsed(_0xf6fc1)+')',_0x5d8d70=stringWidth(_0x4a6a7d),_0x1aaff0=stringWidth(_0x5f3f3a),_0xf9ffb4=_0x1aaff0+0x1+_0xac2a26+_0x4496db[_0x3ca59e(0x201)],_0x1aad2b=_0x1208c9-_0xf9ffb4-_0x5d8d70-0x1-0x8;let _0x2c5fc2=_0xcdca1e;stringWidth(_0x2c5fc2)>_0x1aad2b&&(_0x2c5fc2=_0x2c5fc2['slice'](0x0,_0x1aad2b-0x1)+'…');const _0xed579a=_0x19fdd3+'\x20'+_0x584f26+_0x4496db+_0x2c5fc2,_0x50b7cd=stringWidth(_0xed579a),_0x4c3161=_0x1208c9-_0x50b7cd-_0x5d8d70,_0x24118d=_0xed579a+'\x20'['repeat'](Math['max'](0x1,_0x4c3161))+a54_0x5efbd7['dim'](_0x4a6a7d),_0xcaf03f=Math['floor']((_0x50b03c-_0x1682c2)/_0x5c5231),_0x2df850=Math[_0x3ca59e(0x163)]((_0x17ed07-_0x1682c2)/_0x5c5231),_0x1bd029=Math[_0x3ca59e(0x1c6)](_0xcaf03f+0x1,_0x2df850),_0x40719c=new Array(_0x42e16c)['fill']('\x20');for(let _0x58e163=_0xcaf03f;_0x58e163<Math['min'](_0x1bd029,_0x42e16c);_0x58e163++){_0x40719c[_0x58e163]='─';}const _0x1437c0=_0x40719c[_0x3ca59e(0x159)](_0xd1a6fc=>_0xd1a6fc==='\x20'?'\x20':_0x4434ee(_0xd1a6fc))[_0x3ca59e(0x205)]('');_0x324f55[_0x3ca59e(0x22a)](_0xa9f97a+'\x20'+_0x24118d+'│'+_0x1437c0+'│');}return _0x324f55[_0x3ca59e(0x205)]('\x0a');}async[a54_0x43a89d(0x1f7)](_0x5a1db7,_0x1e73d5,_0x43d464){const _0xab7598=a54_0x43a89d,{options:_0x18bf23,tdx:_0x2fb3bd}=_0x1e73d5,_0x38cd95=_0x18bf23[_0xab7598(0x1f9)],{timelineRows:_0x116725,timeAxisHeader:_0x476e74}=this[_0xab7598(0x1ed)](_0x5a1db7,_0x38cd95),_0x5249c6=_0x116725[_0xab7598(0x150)](_0x2c20be=>_0x2c20be[_0xab7598(0x18f)]);if(_0x5249c6[_0xab7598(0x201)]===0x0){const _0x2b29b2=this[_0xab7598(0x114)](_0x5a1db7,_0x38cd95);console['log'](_0x2b29b2);!_0x43d464&&(console[_0xab7598(0x25a)](''),console['error'](a54_0x5efbd7[_0xab7598(0x1cd)](_0xab7598(0x276))),console[_0xab7598(0x25a)](a54_0x5efbd7['dim'](_0xab7598(0x180))+'or'+a54_0x5efbd7[_0xab7598(0x1cd)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x476e74&&console[_0xab7598(0x1ca)](_0x476e74);const _0x1ed542=_0x116725[_0xab7598(0x150)](_0x523e7c=>_0x523e7c[_0xab7598(0x18f)])[_0xab7598(0x159)](_0x5527fa=>({'title':_0x5527fa['displayLine'],'value':_0x5527fa[_0xab7598(0x18f)]})),_0x477455=process[_0xab7598(0xd2)][_0xab7598(0xec)]||0x3c,_0x499914=Math['max'](0x28,Math[_0xab7598(0x163)](_0x477455*0x2/0x3)),_0x58878f=await a54_0x1897d({'type':_0xab7598(0x1d4),'name':_0xab7598(0x18f),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x1ed542,'initial':-0x1,'limit':_0x499914,'clearFirst':!![],'fallback':{'title':_0xab7598(0xdb),'value':null},'suggest':(_0x29427f,_0x1fa3b8)=>{const _0x12b551=_0xab7598;if(!_0x29427f)return Promise[_0x12b551(0x176)](_0x1fa3b8);const _0x3445c2=_0x1fa3b8[_0x12b551(0x150)](_0x4eafd4=>{const _0x171142=_0x12b551,_0x3df369=_0x4eafd4;return _0x3df369[_0x171142(0x1ff)][_0x171142(0x10d)]()[_0x171142(0x274)](_0x29427f[_0x171142(0x10d)]());});return Promise[_0x12b551(0x176)](_0x3445c2);}}),_0x35133e=()=>{const _0x1d677c=_0xab7598;process[_0x1d677c(0xd2)]['write'](_0x1d677c(0x27a)),process[_0x1d677c(0xd2)][_0x1d677c(0x242)](_0x1d677c(0x27a)),process[_0x1d677c(0xd2)]['write'](_0x1d677c(0x27a));},_0x28e0ad=_0x58878f&&_0x58878f[_0xab7598(0x18f)]&&_0x58878f[_0xab7598(0x18f)]!==null&&_0x58878f['attemptId'][_0xab7598(0x1f1)]()!=='';if(!_0x28e0ad){_0x35133e(),console['log'](a54_0x5efbd7[_0xab7598(0x1cd)](_0xab7598(0x20a)));return;}_0x35133e();const _0x8d243d=_0x5a1db7[_0xab7598(0x20c)](_0x4261fd=>_0x4261fd[_0xab7598(0x1fc)]?.['id']===_0x58878f[_0xab7598(0x18f)]);if(_0x8d243d){const _0x16604b=_0x8d243d[_0xab7598(0x1ec)]?.[_0xab7598(0xfb)]||'?',_0x3b02d7=_0x8d243d[_0xab7598(0x193)]?.[_0xab7598(0xfb)]||'?';console[_0xab7598(0x1ca)](_0xab7598(0x252)+a54_0x5efbd7[_0xab7598(0x1cd)](_0x16604b)+',\x20Workflow:\x20'+a54_0x5efbd7['dim'](_0x3b02d7));}const _0x301a2c=new WorkflowTimelineCommand();await _0x301a2c['execute']({'args':[],'options':{..._0x18bf23,'attemptId':_0x58878f[_0xab7598(0x18f)]},'tdx':_0x2fb3bd});}[a54_0x43a89d(0x1ed)](_0x533c41,_0x24fa50){const _0xc47940=a54_0x43a89d,_0x2070e7=new Map();for(const _0x1ea74b of _0x533c41){_0x1ea74b['id']&&_0x1ea74b[_0xc47940(0x1fc)]?.['id']&&_0x2070e7['set'](_0x1ea74b['id'],_0x1ea74b[_0xc47940(0x1fc)]['id']);}const _0x27d6f3=[];let _0x30e31e='';const _0x556960=this['renderSessionsTimeline'](_0x533c41,_0x24fa50),_0x113252=_0x556960[_0xc47940(0x11a)]('\x0a');for(const _0x16c10b of _0x113252){if(_0x16c10b[_0xc47940(0x22c)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x16c10b['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x30e31e=_0x16c10b;else{if(_0x16c10b[_0xc47940(0x117)](/^[✅❌🔄🛑⏳]/)){const _0x2a1a47=_0x16c10b[_0xc47940(0x117)](/#(\d+)/),_0x3fb261=_0x2a1a47?_0x2a1a47[0x1]:null,_0x29eb43=_0x3fb261?_0x2070e7['get'](_0x3fb261)||null:null,_0x5755e4=_0x533c41[_0xc47940(0x20c)](_0xe1bb78=>_0xe1bb78['id']===_0x3fb261),_0x39ea01=_0x5755e4?.[_0xc47940(0x1ec)]?.[_0xc47940(0xfb)]||'';_0x27d6f3[_0xc47940(0x22a)]({'displayLine':_0x16c10b,'attemptId':_0x29eb43,'projectName':_0x39ea01});}}}return{'timelineRows':_0x27d6f3,'timeAxisHeader':_0x30e31e};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x278);['description']=a54_0x43a89d(0x1d0);async['execute'](_0x360731){const _0x1de5d6=a54_0x43a89d,{options:_0x950eb6,args:_0xdb6ae,tdx:_0x6e59a2}=_0x360731,_0x8dcc5=this['parseProjectWorkflowPattern'](_0xdb6ae,_0x950eb6);if(!_0x8dcc5)return 0x1;const {projectName:_0x44efd4,workflowName:_0x35355b}=_0x8dcc5,_0x47ebbf=_0x950eb6[_0x1de5d6(0x19d)];if(_0x950eb6[_0x1de5d6(0xf9)]){if(_0x44efd4&&_0x35355b)console[_0x1de5d6(0x25a)](_0x1de5d6(0x194)+_0x44efd4+'.'+_0x35355b);else _0x44efd4&&console[_0x1de5d6(0x25a)](_0x1de5d6(0x21f)+_0x44efd4);_0x47ebbf&&console['error'](_0x1de5d6(0x271));}const _0x4cb8e8=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x6e59a2[_0x1de5d6(0x193)][_0x1de5d6(0x16d)]({'projectName':_0x44efd4,'workflowName':_0x35355b,'includeRetried':_0x47ebbf,'limit':_0x950eb6['limit']}),{'verbose':_0x950eb6[_0x1de5d6(0xf9)]}),_0x5ca6c0=_0x4cb8e8[_0x1de5d6(0xe6)],_0x30cf8d=_0x950eb6[_0x1de5d6(0x24c)]||0x64,_0x2eb109=_0x5ca6c0[_0x1de5d6(0x201)]>=_0x30cf8d?a54_0x5efbd7[_0x1de5d6(0x1cd)](_0x1de5d6(0x22e)):'';console[_0x1de5d6(0x25a)](_0x1de5d6(0x236)+_0x5ca6c0['length']+_0x1de5d6(0x264)+(_0x5ca6c0[_0x1de5d6(0x201)]!==0x1?'s':'')+_0x2eb109);if(_0x950eb6[_0x1de5d6(0x214)]===_0x1de5d6(0xfa)||_0x950eb6[_0x1de5d6(0x214)]===_0x1de5d6(0x1fa)||_0x950eb6[_0x1de5d6(0x214)]==='table')await handleSDKOutput(_0x5ca6c0,_0x950eb6);else{if(_0x5ca6c0[_0x1de5d6(0x201)]===0x0){if(_0x44efd4&&_0x35355b)console[_0x1de5d6(0x1ca)](_0x1de5d6(0x1fd)+_0x44efd4+'.'+_0x35355b);else _0x44efd4?console[_0x1de5d6(0x1ca)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x44efd4):console[_0x1de5d6(0x1ca)]('No\x20attempts\x20found');}else{const _0x2373fc=_0x950eb6['site'],_0x5aa671=_0x5ca6c0[_0x1de5d6(0x159)](_0x25e724=>{const _0x5bad90=_0x1de5d6,_0x2341c9=a54_0x5efbd7[_0x5bad90(0x1cd)]('#'+_0x25e724['id']),_0x4c5a37=_0x25e724['project']?.['id'],_0x5e7628=_0x25e724[_0x5bad90(0x269)]||_0x25e724[_0x5bad90(0x20f)],_0x254a61=_0x4c5a37&&_0x5e7628?hyperlink(_0x2341c9,getWorkflowAttemptUrl(_0x2373fc,_0x4c5a37,_0x5e7628,_0x25e724['id'])):_0x2341c9,{icon:_0x555e2c,text:_0x3206fe}=getAttemptStatusDisplay(_0x25e724),_0x26af6d=(_0x25e724[_0x5bad90(0x1ec)]?.['name']||'?')+'.'+(_0x25e724[_0x5bad90(0x193)]?.[_0x5bad90(0xfb)]||'?'),_0x4e0f58=_0x25e724['sessionTime']?a54_0x5efbd7[_0x5bad90(0x1cd)](_0x25e724['sessionTime']):'';return(_0x254a61+'\x20'+_0x555e2c+(_0x3206fe?'\x20'+_0x3206fe:'')+'\x20'+_0x26af6d+'\x20'+_0x4e0f58)['trimEnd']();});await writeOutput(_0x5aa671[_0x1de5d6(0x205)]('\x0a'),_0x950eb6['output'],_0x1de5d6(0x175));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x15c);['description']=a54_0x43a89d(0x1d2);async[a54_0x43a89d(0x1a7)](_0xdcff82){const _0x26c94c=a54_0x43a89d,{options:_0x579dca,args:_0x5186e2,tdx:_0x35246f}=_0xdcff82,_0xb07eb7=_0x5186e2[0x0];if(!_0xb07eb7)return console[_0x26c94c(0x25a)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x579dca['verbose']&&console['error']('Attempt\x20ID:\x20'+_0xb07eb7);const _0x580762=await withSpinner(_0x26c94c(0x18e),()=>_0x35246f[_0x26c94c(0x193)][_0x26c94c(0x248)](_0xb07eb7),{'verbose':_0x579dca[_0x26c94c(0xf9)]}),_0x463d1e=_0x580762[_0x26c94c(0xe6)];let _0x28fa57;!_0x463d1e[_0x26c94c(0x26c)]?_0x28fa57=_0x463d1e[_0x26c94c(0x216)]?_0x26c94c(0x111):'running':_0x28fa57=_0x463d1e['success']?_0x26c94c(0x19e):'error';let _0x2c5ce1;if(_0x463d1e[_0x26c94c(0x14c)]&&_0x463d1e['finishedAt']){const _0x399eb8=new Date(_0x463d1e['createdAt'])['getTime'](),_0x4972ea=new Date(_0x463d1e['finishedAt'])[_0x26c94c(0x231)]();_0x2c5ce1=Math[_0x26c94c(0x243)]((_0x4972ea-_0x399eb8)/0x3e8);}const _0x1dacf5={'attempt_id':_0x463d1e['id'],'status':_0x28fa57,..._0x463d1e[_0x26c94c(0x251)]!==undefined&&{'index':_0x463d1e[_0x26c94c(0x251)]},..._0x463d1e[_0x26c94c(0x1ec)]&&{'project':_0x463d1e['project'][_0x26c94c(0xfb)]},..._0x463d1e[_0x26c94c(0x193)]&&{'workflow':_0x463d1e['workflow'][_0x26c94c(0xfb)]},..._0x463d1e['sessionId']&&{'session_id':_0x463d1e[_0x26c94c(0x20f)]},..._0x463d1e[_0x26c94c(0x1ef)]&&{'session_time':_0x463d1e['sessionTime']},..._0x463d1e['retryAttemptName']&&{'retry_attempt':_0x463d1e[_0x26c94c(0x16c)]},..._0x2c5ce1!==undefined&&{'duration_sec':_0x2c5ce1},..._0x463d1e[_0x26c94c(0x14c)]&&{'created_at':_0x463d1e['createdAt']},..._0x463d1e[_0x26c94c(0x270)]&&{'finished_at':_0x463d1e[_0x26c94c(0x270)]},...Object[_0x26c94c(0x100)](_0x463d1e[_0x26c94c(0x1f6)])[_0x26c94c(0x201)]>0x0&&{'params':_0x463d1e[_0x26c94c(0x1f6)]}};return await handleSingleObjectOutput(_0x1dacf5,_0x579dca),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']='workflow:tasks';['description']=a54_0x43a89d(0x196);async[a54_0x43a89d(0x1a7)](_0x336e82){const _0x4d316f=a54_0x43a89d,{options:_0x23d801,args:_0x5529a3,tdx:_0xd85301}=_0x336e82,_0x14e8bc=_0x5529a3[0x0];if(!_0x14e8bc)return console[_0x4d316f(0x25a)](_0x4d316f(0x12a)),0x1;const _0x20ecb6=_0x23d801[_0x4d316f(0x262)];_0x23d801[_0x4d316f(0xf9)]&&(console[_0x4d316f(0x25a)](_0x4d316f(0x1a9)+_0x14e8bc),_0x20ecb6&&console[_0x4d316f(0x25a)](_0x4d316f(0x213)));const _0x12d902=await withSpinner(_0x4d316f(0x10a),()=>_0xd85301[_0x4d316f(0x193)]['tasks'](_0x14e8bc,_0x20ecb6||![]),{'verbose':_0x23d801[_0x4d316f(0xf9)]}),_0x22081f=_0x12d902['data'];return console[_0x4d316f(0x25a)](_0x4d316f(0x236)+_0x22081f['length']+_0x4d316f(0x1e2)+(_0x22081f[_0x4d316f(0x201)]!==0x1?'s':'')),await handleSDKOutput(_0x22081f,_0x23d801),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x19a);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x119);async[a54_0x43a89d(0x1a7)](_0x4d36bc){const _0x1a8092=a54_0x43a89d,{options:_0x10f206,args:_0x21674a,tdx:_0x57962d}=_0x4d36bc,_0x3015f1=_0x21674a[0x0];let _0x19f90b=_0x21674a[0x1];if(!_0x3015f1)return console[_0x1a8092(0x25a)](_0x1a8092(0x12a)),0x1;_0x10f206['verbose']&&(console[_0x1a8092(0x25a)](_0x1a8092(0x1a9)+_0x3015f1),_0x19f90b&&console[_0x1a8092(0x25a)](_0x1a8092(0x103)+_0x19f90b));const _0x55730=await withSpinner(_0x1a8092(0x1da),()=>_0x57962d['workflow'][_0x1a8092(0x1d7)](_0x3015f1,_0x19f90b),{'verbose':_0x10f206[_0x1a8092(0xf9)]}),_0x104faf=_0x55730['data'];if(_0x104faf[_0x1a8092(0x201)]===0x0)return console[_0x1a8092(0x25a)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x19f90b&&(_0x10f206[_0x1a8092(0xfa)]||_0x10f206[_0x1a8092(0x214)]))return await handleSDKOutput(_0x104faf,_0x10f206),0x0;if(!_0x19f90b){const _0x52211d=_0x104faf['map'](_0x590849=>({'title':_0x590849[_0x1a8092(0x1a8)]+'\x20('+formatBytes(_0x590849[_0x1a8092(0x19b)])+')','value':_0x590849[_0x1a8092(0x1a8)]})),_0x3811c1=await a54_0x1897d({'type':_0x1a8092(0xc6),'name':_0x1a8092(0x13f),'message':_0x1a8092(0xdd),'choices':_0x52211d});if(!_0x3811c1[_0x1a8092(0x13f)])return console['error'](_0x1a8092(0x20a)),0x0;_0x19f90b=_0x3811c1[_0x1a8092(0x13f)];}const _0x12a88e=await withSpinner('Downloading\x20logs...',()=>_0x57962d['workflow']['logs'](_0x3015f1,_0x19f90b),{'verbose':_0x10f206[_0x1a8092(0xf9)]}),_0x48f038=_0x12a88e[_0x1a8092(0xe6)];return _0x48f038?console[_0x1a8092(0x1ca)](_0x48f038):console[_0x1a8092(0x25a)](_0x1a8092(0x173)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x155);['description']=a54_0x43a89d(0x22f);async[a54_0x43a89d(0x1a7)](_0x159bad){const _0x1b8283=a54_0x43a89d,{options:_0x5a1a86,args:_0x518b09,tdx:_0xcc10b9}=_0x159bad,_0x2c6bd3=_0x518b09[0x0];if(!_0x2c6bd3)return console[_0x1b8283(0x25a)](_0x1b8283(0x12a)),0x1;const _0x3eae34=_0x5a1a86['reason'];_0x5a1a86[_0x1b8283(0xf9)]&&(console[_0x1b8283(0x25a)](_0x1b8283(0x1a9)+_0x2c6bd3),_0x3eae34&&console[_0x1b8283(0x25a)]('Reason:\x20'+_0x3eae34));if(!_0x5a1a86[_0x1b8283(0x138)]){if(!isInteractive())return console[_0x1b8283(0x25a)](a54_0x5efbd7[_0x1b8283(0xf0)](_0x1b8283(0x215)),_0x1b8283(0x202)),console[_0x1b8283(0x25a)](a54_0x5efbd7[_0x1b8283(0x1cd)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3ec9e3=await confirmKey(_0x1b8283(0x10b)+_0x2c6bd3+'?');if(!_0x3ec9e3)return console[_0x1b8283(0x25a)](a54_0x5efbd7[_0x1b8283(0x191)](_0x1b8283(0x20a))),0x1;}const _0x269217=await withSpinner(_0x1b8283(0x26e),()=>_0xcc10b9[_0x1b8283(0x193)][_0x1b8283(0xfe)](_0x2c6bd3,_0x3eae34),{'verbose':_0x5a1a86[_0x1b8283(0xf9)]}),_0x100fb5=_0x269217['data'];return console[_0x1b8283(0x25a)]('✔\x20'+_0x100fb5),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a54_0x43a89d(0xfb)]='workflow:retry';[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x1f4);async[a54_0x43a89d(0x1a7)](_0xd33817){const _0x5d7f0f=a54_0x43a89d,{options:_0x2d70ba,args:_0x349d12,tdx:_0x5d49e9}=_0xd33817,_0x54e6f8=_0x349d12[0x0];if(!_0x54e6f8)return console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x280)),console[_0x5d7f0f(0x25a)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x595a66=![],_0x2b108b=_0x54e6f8;if(_0x54e6f8['startsWith']('session:'))_0x595a66=!![],_0x2b108b=_0x54e6f8[_0x5d7f0f(0x145)](0x8);else{if(_0x54e6f8[_0x5d7f0f(0x22c)](_0x5d7f0f(0x263)))_0x595a66=![],_0x2b108b=_0x54e6f8[_0x5d7f0f(0x145)](0x8);else return console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x147)),console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x222)),0x1;}const _0x313d9d=_0x2d70ba[_0x5d7f0f(0x110)],_0x25b482=_0x2d70ba[_0x5d7f0f(0x1bc)],_0x21c4e4=_0x2d70ba['params'],_0x1ed942=_0x2d70ba[_0x5d7f0f(0x1af)];_0x2d70ba[_0x5d7f0f(0xf9)]&&(console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x1ce)+(_0x595a66?_0x5d7f0f(0x21c):'attempt')+'\x20'+_0x2b108b),_0x313d9d&&console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x261)+_0x313d9d),_0x25b482&&console[_0x5d7f0f(0x25a)]('Resume\x20from:\x20'+_0x25b482),_0x21c4e4&&console['error'](_0x5d7f0f(0xeb)+_0x21c4e4),_0x1ed942&&console[_0x5d7f0f(0x25a)]('Force:\x20yes'));let _0xa08db5;if(_0x21c4e4)try{if(_0x21c4e4[_0x5d7f0f(0x22c)]('@')){const _0x4a8d70=await import(_0x5d7f0f(0x1ab)),_0x58112f=_0x21c4e4[_0x5d7f0f(0x145)](0x1),_0x5cf36d=await _0x4a8d70[_0x5d7f0f(0x272)](_0x58112f,_0x5d7f0f(0x1c9));_0xa08db5=JSON['parse'](_0x5cf36d);}else _0xa08db5=JSON[_0x5d7f0f(0x165)](_0x21c4e4);}catch{return console['error'](_0x5d7f0f(0xdc)),0x1;}if(!_0x2d70ba['yes']){if(!isInteractive())return console['error'](a54_0x5efbd7['red'](_0x5d7f0f(0x215)),_0x5d7f0f(0x202)),console[_0x5d7f0f(0x25a)](a54_0x5efbd7[_0x5d7f0f(0x1cd)](_0x5d7f0f(0x174))),0x1;const _0x260772=await confirmKey(_0x5d7f0f(0xef)+(_0x595a66?_0x5d7f0f(0x21c):_0x5d7f0f(0x248))+'\x20'+_0x2b108b+'?');if(!_0x260772)return console[_0x5d7f0f(0x25a)](a54_0x5efbd7[_0x5d7f0f(0x191)]('Cancelled')),0x1;}let _0x31807f;_0x595a66?_0x31807f=await withSpinner(_0x5d7f0f(0xf1),()=>_0x5d49e9['workflow'][_0x5d7f0f(0x17a)](_0x2b108b,{'fromTask':_0x313d9d,'retryParams':_0xa08db5}),{'verbose':_0x2d70ba[_0x5d7f0f(0xf9)]}):_0x31807f=await withSpinner('Retrying\x20attempt...',()=>_0x5d49e9['workflow'][_0x5d7f0f(0x20b)](_0x2b108b,{'resumeFrom':_0x25b482,'retryParams':_0xa08db5,'force':_0x1ed942}),{'verbose':_0x2d70ba[_0x5d7f0f(0xf9)]});const _0x3cfc02=_0x31807f[_0x5d7f0f(0xe6)];return console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x1d8)),console[_0x5d7f0f(0x25a)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x3cfc02[_0x5d7f0f(0x18f)]),console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x1ee)+_0x3cfc02[_0x5d7f0f(0x20f)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x1e8);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x1de);async[a54_0x43a89d(0x1a7)](_0x37f6e4){const _0x27b3b8=a54_0x43a89d,{options:_0x5ccd72,args:_0x14362c,tdx:_0x2ff742}=_0x37f6e4;let _0x3893d5=_0x14362c[0x0];if(!_0x3893d5){const _0x5610ce=this[_0x27b3b8(0x1c3)]([],_0x5ccd72),_0x3f2909=await withSpinner(_0x27b3b8(0x139),()=>_0x2ff742[_0x27b3b8(0x193)][_0x27b3b8(0x268)](_0x5610ce,{'limit':_0x5ccd72[_0x27b3b8(0x24c)]}),{'verbose':_0x5ccd72[_0x27b3b8(0xf9)]}),_0x51386f=_0x3f2909[_0x27b3b8(0xe6)];if(_0x51386f[_0x27b3b8(0x201)]===0x0)return console['error'](_0x27b3b8(0xd0)),!_0x5610ce&&console[_0x27b3b8(0x25a)](a54_0x5efbd7['dim'](_0x27b3b8(0xd9))),0x1;const _0x250a3c=_0x51386f['map'](_0x11b924=>({'title':_0x11b924[_0x27b3b8(0x1ec)]?.['name']+'.'+_0x11b924[_0x27b3b8(0xfb)],'value':_0x11b924['project']?.['name']+'.'+_0x11b924[_0x27b3b8(0xfb)],'description':_0x11b924[_0x27b3b8(0x250)]?_0x27b3b8(0x148)+_0x11b924[_0x27b3b8(0x250)]:undefined})),_0x1ca58c=await a54_0x1897d({'type':_0x27b3b8(0xc6),'name':'workflow','message':_0x27b3b8(0x1a1),'choices':_0x250a3c});if(!_0x1ca58c['workflow'])return 0x1;_0x3893d5=_0x1ca58c[_0x27b3b8(0x193)];}if(!_0x3893d5[_0x27b3b8(0x274)]('.')){const _0x5cc073=this[_0x27b3b8(0x1c3)]([],_0x5ccd72);if(_0x5cc073)_0x3893d5=_0x5cc073+'.'+_0x3893d5;else return console[_0x27b3b8(0x25a)](a54_0x5efbd7[_0x27b3b8(0xf0)](_0x27b3b8(0xf5)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x27b3b8(0x25a)](a54_0x5efbd7['dim'](_0x27b3b8(0xd9))),0x1;}const _0x59c822=_0x5ccd72[_0x27b3b8(0x17b)],_0x44e39a=_0x5ccd72['sessionTime'],_0x58a93a={};if(_0x59c822&&Array['isArray'](_0x59c822))for(const _0x4c671d of _0x59c822){const _0x255fc1=_0x4c671d['indexOf']('=');if(_0x255fc1===-0x1)return console[_0x27b3b8(0x25a)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x4c671d),console[_0x27b3b8(0x25a)](_0x27b3b8(0x127)),0x1;const _0x2a2e30=_0x4c671d['substring'](0x0,_0x255fc1),_0x19b5dc=_0x4c671d['substring'](_0x255fc1+0x1);try{_0x58a93a[_0x2a2e30]=JSON[_0x27b3b8(0x165)](_0x19b5dc);}catch{_0x58a93a[_0x2a2e30]=_0x19b5dc;}}_0x5ccd72[_0x27b3b8(0xf9)]&&(console[_0x27b3b8(0x25a)](_0x27b3b8(0x23f)+_0x3893d5),Object[_0x27b3b8(0x100)](_0x58a93a)['length']>0x0&&console[_0x27b3b8(0x25a)](_0x27b3b8(0x18d)+JSON[_0x27b3b8(0x11f)](_0x58a93a)),_0x44e39a&&console[_0x27b3b8(0x25a)]('Session\x20time:\x20'+_0x44e39a));const _0x33f64f=await withSpinner(_0x27b3b8(0x135),()=>_0x2ff742[_0x27b3b8(0x193)]['run'](_0x3893d5,_0x58a93a,{'sessionTime':_0x44e39a}),{'verbose':_0x5ccd72['verbose']}),_0x215448=_0x33f64f['data'];console[_0x27b3b8(0x25a)]('✔\x20Workflow\x20run\x20started'),console['error']('\x20\x20Attempt\x20ID:\x20'+_0x215448['id']),console[_0x27b3b8(0x25a)](_0x27b3b8(0x1ee)+_0x215448['sessionId']),console[_0x27b3b8(0x25a)](_0x27b3b8(0x188)+_0x215448['project']?.['name']),console[_0x27b3b8(0x25a)](_0x27b3b8(0x1d5)+_0x215448[_0x27b3b8(0x193)]?.['name']);if(_0x215448['project']?.['id']&&_0x215448[_0x27b3b8(0x20f)]&&_0x215448['id']){const _0x4c9604=_0x5ccd72[_0x27b3b8(0x1f9)],_0xdfbcdb=getConsoleUrl(_0x4c9604,'/app/workflows/'+_0x215448[_0x27b3b8(0x1ec)]['id']+'/sessions/'+_0x215448[_0x27b3b8(0x20f)]+_0x27b3b8(0xd8)+_0x215448['id']);console[_0x27b3b8(0x25a)]('\x20\x20Console:\x20'+a54_0x5efbd7['cyan'](_0xdfbcdb));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x144);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x15d);async[a54_0x43a89d(0x1a7)](_0x2ce2b0){const _0x251dc7=a54_0x43a89d,{options:_0x3e55e1,args:_0x58dfad,tdx:_0x4eb81b}=_0x2ce2b0,_0x59a300=_0x58dfad[0x0],_0x2c024f=_0x58dfad[0x1]||'.';if(!_0x59a300)return console[_0x251dc7(0x25a)](_0x251dc7(0x21e)),console[_0x251dc7(0x25a)](_0x251dc7(0x164)),0x1;const _0x2c9396=_0x3e55e1[_0x251dc7(0x250)];_0x3e55e1[_0x251dc7(0xf9)]&&(console[_0x251dc7(0x25a)](_0x251dc7(0x252)+_0x59a300),console[_0x251dc7(0x25a)](_0x251dc7(0x1aa)+_0x2c024f),_0x2c9396&&console[_0x251dc7(0x25a)](_0x251dc7(0x218)+_0x2c9396));const _0x1cc5f8=await withSpinner('Downloading\x20project\x20'+_0x59a300+_0x251dc7(0x115),()=>_0x4eb81b[_0x251dc7(0x193)][_0x251dc7(0x208)](_0x59a300,_0x2c024f,{'revision':_0x2c9396}),{'verbose':_0x3e55e1[_0x251dc7(0xf9)]}),_0x4ce203=_0x1cc5f8[_0x251dc7(0xe6)];return console['error']('✔\x20Downloaded\x20'+_0x4ce203[_0x251dc7(0xc5)]),console[_0x251dc7(0x25a)]('\x20\x20Revision:\x20'+_0x4ce203[_0x251dc7(0x250)]),console[_0x251dc7(0x25a)](_0x251dc7(0x1bd)+_0x4ce203[_0x251dc7(0x130)]),console[_0x251dc7(0x25a)](_0x251dc7(0x1dc)+_0x2c024f+'/'+_0x4ce203[_0x251dc7(0xc5)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:upload';[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x221);async['execute'](_0x54037b){const _0x3bee5c=a54_0x43a89d,{options:_0x224f43,args:_0x2d8734,tdx:_0x391864}=_0x54037b;let _0x52f9d4='.',_0x5a7490=_0x224f43[_0x3bee5c(0xfb)];if(_0x2d8734[0x0]){const {promises:_0x1917d4}=await import('fs');try{const _0x424cff=await _0x1917d4['stat'](_0x2d8734[0x0]);if(_0x424cff[_0x3bee5c(0x24e)]())_0x52f9d4=_0x2d8734[0x0];else return console['error']('Error:\x20'+_0x2d8734[0x0]+_0x3bee5c(0xc7)),0x1;}catch{_0x5a7490=_0x2d8734[0x0],_0x52f9d4='.';}}const _0x5c522e=_0x224f43['revision'],_0x4803cc=_0x224f43[_0x3bee5c(0x16f)];_0x224f43[_0x3bee5c(0xf9)]&&(console[_0x3bee5c(0x25a)](_0x3bee5c(0x227)+_0x52f9d4),_0x5a7490&&console['error'](_0x3bee5c(0xe2)+_0x5a7490),_0x5c522e&&console[_0x3bee5c(0x25a)](_0x3bee5c(0x218)+_0x5c522e),_0x4803cc&&console['error'](_0x3bee5c(0x1bb)));const _0x583bce=await withSpinner(_0x3bee5c(0x11e),()=>_0x391864[_0x3bee5c(0x193)][_0x3bee5c(0x22a)](_0x52f9d4,{'projectName':_0x5a7490,'revision':_0x5c522e,'skipValidation':_0x4803cc}),{'verbose':_0x224f43[_0x3bee5c(0xf9)]}),_0x147bc5=_0x583bce[_0x3bee5c(0xe6)];return console[_0x3bee5c(0x25a)](_0x3bee5c(0xe0)+_0x147bc5[_0x3bee5c(0xc5)]),console[_0x3bee5c(0x25a)]('\x20\x20Project\x20ID:\x20'+_0x147bc5[_0x3bee5c(0x178)]),console[_0x3bee5c(0x25a)]('\x20\x20Revision:\x20'+_0x147bc5['revision']),await this[_0x3bee5c(0x1b4)](_0x391864,_0x147bc5[_0x3bee5c(0xc5)],_0x224f43['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a54_0x43a89d(0xfb)]='workflow:pull';[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x18a);async[a54_0x43a89d(0x1a7)](_0x4566bd){const _0xa3fa0b=a54_0x43a89d,{options:_0xe7b4fa,args:_0x1b66ea,tdx:_0x3b0af0}=_0x4566bd,_0x28bb4b=_0x1b66ea[0x0],_0x5b4836=_0x1b66ea[0x1];if(!_0x28bb4b)return console['error'](a54_0x5efbd7[_0xa3fa0b(0xf0)](_0xa3fa0b(0xf5)),_0xa3fa0b(0x1c2)),console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0x1cd)](_0xa3fa0b(0x232))),0x1;const _0x17a3b9=_0xe7b4fa['revision'];_0xe7b4fa[_0xa3fa0b(0xf9)]&&(console['error'](_0xa3fa0b(0x252)+_0x28bb4b),_0x5b4836&&console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x168)+_0x5b4836),_0x17a3b9&&console['error'](_0xa3fa0b(0x218)+_0x17a3b9),_0xe7b4fa[_0xa3fa0b(0x1b7)]&&console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x142)));const _0x56a2c4=await withSpinner(_0xa3fa0b(0x129)+_0x28bb4b+'...',()=>_0x3b0af0[_0xa3fa0b(0x193)][_0xa3fa0b(0x13c)](_0x28bb4b,{'targetDir':_0x5b4836,'revision':_0x17a3b9}),{'verbose':_0xe7b4fa[_0xa3fa0b(0xf9)]}),_0x1ae5e9=_0x56a2c4[_0xa3fa0b(0xe6)];_0x1ae5e9[_0xa3fa0b(0x186)]?console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x12e)+_0x1ae5e9[_0xa3fa0b(0xc5)]):console['error'](_0xa3fa0b(0x254)+_0x1ae5e9[_0xa3fa0b(0xc5)]);console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x21b)+_0x1ae5e9[_0xa3fa0b(0x250)]),console['error'](_0xa3fa0b(0x14b)+(a54_0x5981fe[_0xa3fa0b(0xcb)](process[_0xa3fa0b(0x1b0)](),_0x1ae5e9['targetDir'])||'.')),console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x1dd)+a54_0x5efbd7[_0xa3fa0b(0x233)]('+'+_0x1ae5e9[_0xa3fa0b(0x1b9)][_0xa3fa0b(0x158)]+_0xa3fa0b(0x14f))+',\x20'+(a54_0x5efbd7[_0xa3fa0b(0x191)]('~'+_0x1ae5e9[_0xa3fa0b(0x1b9)][_0xa3fa0b(0x235)]+_0xa3fa0b(0x266))+',\x20')+(a54_0x5efbd7[_0xa3fa0b(0xf0)]('-'+_0x1ae5e9[_0xa3fa0b(0x1b9)]['deleted']+_0xa3fa0b(0x19f))+',\x20')+(''+a54_0x5efbd7['dim'](_0x1ae5e9[_0xa3fa0b(0x1b9)][_0xa3fa0b(0x23a)]+_0xa3fa0b(0x1e9))));for(const _0x5f012a of _0x1ae5e9[_0xa3fa0b(0x1a5)]){_0x5f012a['type']===_0xa3fa0b(0x235)&&_0x5f012a['diff']&&(console[_0xa3fa0b(0x25a)]('\x0a'+a54_0x5efbd7[_0xa3fa0b(0x109)](_0xa3fa0b(0xd4)+_0x5f012a[_0xa3fa0b(0x1d9)])),console[_0xa3fa0b(0x25a)](_0x5f012a['diff']));}if(!_0x1ae5e9[_0xa3fa0b(0x22d)])return saveSessionContext({'workflow_project':_0x1ae5e9[_0xa3fa0b(0xc5)]},_0xe7b4fa['session']),console[_0xa3fa0b(0x25a)](a54_0x5efbd7['green'](_0xa3fa0b(0xde))),console['error'](a54_0x5efbd7[_0xa3fa0b(0x1cd)](_0xa3fa0b(0x23d)+_0x1ae5e9[_0xa3fa0b(0xc5)])),0x0;if(_0xe7b4fa['dryRun'])return console[_0xa3fa0b(0x25a)](a54_0x5efbd7['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0xe7b4fa['yes']){if(!isInteractive())return console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0xf0)](_0xa3fa0b(0x215)),_0xa3fa0b(0x202)),console[_0xa3fa0b(0x25a)](a54_0x5efbd7['dim'](_0xa3fa0b(0x174))),0x1;const _0xaf60=await confirmKey(_0xa3fa0b(0xff));if(!_0xaf60)return console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0x191)]('Cancelled'),_0xa3fa0b(0x1e4)),0x1;}await withSpinner(_0xa3fa0b(0x1be),()=>_0x3b0af0[_0xa3fa0b(0x193)][_0xa3fa0b(0x212)](_0x1ae5e9,{'revision':_0x17a3b9}),{'verbose':_0xe7b4fa['verbose']}),saveSessionContext({'workflow_project':_0x1ae5e9[_0xa3fa0b(0xc5)]},_0xe7b4fa['session']),console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0x233)](_0xa3fa0b(0xd5)));const _0x180604=a54_0x5981fe['relative'](process[_0xa3fa0b(0x1b0)](),_0x1ae5e9[_0xa3fa0b(0xc8)])||'.';return console[_0xa3fa0b(0x25a)](a54_0x5efbd7['dim'](_0xa3fa0b(0x1dc)+_0x180604)),console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0x1cd)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1ae5e9['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x156);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x265);async['execute'](_0x209a83){const _0x1eb770=a54_0x43a89d,{options:_0x1180bd,args:_0x479aa1,tdx:_0x4a2460}=_0x209a83,_0x19f51d=this[_0x1eb770(0x146)](_0x479aa1,_0x1180bd),_0x41b4d5=_0x1180bd[_0x1eb770(0x250)],_0x342edf=_0x1180bd[_0x1eb770(0x16f)];_0x1180bd[_0x1eb770(0xf9)]&&(_0x19f51d&&console[_0x1eb770(0x25a)](_0x1eb770(0xee)+_0x19f51d),_0x41b4d5&&console[_0x1eb770(0x25a)](_0x1eb770(0x218)+_0x41b4d5),_0x1180bd[_0x1eb770(0x1b7)]&&console[_0x1eb770(0x25a)](_0x1eb770(0x142)),_0x342edf&&console[_0x1eb770(0x25a)](_0x1eb770(0x1bb)));let _0x3e371f;try{_0x3e371f=await withSpinner('Analyzing\x20changes...',()=>_0x4a2460['workflow'][_0x1eb770(0xf2)]({'sourceDir':_0x19f51d,'revision':_0x41b4d5,'skipValidation':_0x342edf}),{'verbose':_0x1180bd['verbose']});}catch(_0x58b0d4){if(_0x58b0d4 instanceof Error&&_0x58b0d4[_0x1eb770(0x12f)]['includes'](_0x1eb770(0x17f)))return console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0xf0)](_0x1eb770(0xf5)),_0x1eb770(0x122)),_0x1180bd[_0x1eb770(0x241)]?console['error'](a54_0x5efbd7[_0x1eb770(0x1cd)](_0x1eb770(0x234)+_0x1180bd[_0x1eb770(0x241)]+_0x1eb770(0x13b)+_0x1180bd[_0x1eb770(0x241)]+'\x27')):console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0x1cd)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x58b0d4;}const _0x37261c=_0x3e371f[_0x1eb770(0xe6)];console[_0x1eb770(0x25a)]('✔\x20Project:\x20'+_0x37261c['projectName']),console['error']('\x20\x20Source:\x20'+_0x37261c['sourceDir']),console[_0x1eb770(0x25a)]('\x20\x20Revision:\x20'+_0x37261c[_0x1eb770(0x250)]),console[_0x1eb770(0x25a)](_0x1eb770(0x1dd)+a54_0x5efbd7['green']('+'+_0x37261c[_0x1eb770(0x1b9)][_0x1eb770(0x158)]+'\x20new')+',\x20'+(a54_0x5efbd7[_0x1eb770(0x191)]('~'+_0x37261c['summary'][_0x1eb770(0x235)]+_0x1eb770(0x266))+',\x20')+(a54_0x5efbd7[_0x1eb770(0xf0)]('-'+_0x37261c[_0x1eb770(0x1b9)]['deleted']+_0x1eb770(0x19f))+',\x20')+(''+a54_0x5efbd7[_0x1eb770(0x1cd)](_0x37261c[_0x1eb770(0x1b9)][_0x1eb770(0x23a)]+_0x1eb770(0x1e9))));for(const _0x50f5d4 of _0x37261c[_0x1eb770(0x1a5)]){_0x50f5d4[_0x1eb770(0x161)]==='modified'&&_0x50f5d4[_0x1eb770(0x10f)]&&(console[_0x1eb770(0x25a)]('\x0a'+a54_0x5efbd7['cyan'](_0x1eb770(0xd4)+_0x50f5d4['path'])),console[_0x1eb770(0x25a)](_0x50f5d4[_0x1eb770(0x10f)]));}if(!_0x37261c[_0x1eb770(0x22d)])return console[_0x1eb770(0x25a)](a54_0x5efbd7['green'](_0x1eb770(0x149))),await this[_0x1eb770(0x1b4)](_0x4a2460,_0x37261c['projectName'],_0x1180bd['site']),0x0;if(_0x1180bd[_0x1eb770(0x1b7)])return console[_0x1eb770(0x25a)](a54_0x5efbd7['yellow'](_0x1eb770(0x1e0))),0x0;if(!_0x1180bd[_0x1eb770(0x138)]){if(!isInteractive())return console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0xf0)](_0x1eb770(0x215)),_0x1eb770(0x202)),console[_0x1eb770(0x25a)](a54_0x5efbd7['dim'](_0x1eb770(0x174))),0x1;const _0x337da3=await confirmKey(_0x1eb770(0x1ea));if(!_0x337da3)return console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0x191)]('Cancelled'),_0x1eb770(0x140)),0x1;}const _0x422117=await withSpinner('Pushing\x20project...',()=>_0x4a2460[_0x1eb770(0x193)][_0x1eb770(0x26f)](_0x37261c),{'verbose':_0x1180bd[_0x1eb770(0xf9)]}),_0x52036a=_0x422117['data'];return console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0x233)](_0x1eb770(0x184))),console['error'](_0x1eb770(0xd6)+_0x52036a[_0x1eb770(0x178)]),console[_0x1eb770(0x25a)]('\x20\x20Revision:\x20'+_0x52036a[_0x1eb770(0x250)]),await this[_0x1eb770(0x1b4)](_0x4a2460,_0x52036a[_0x1eb770(0xc5)],_0x1180bd[_0x1eb770(0x1f9)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x1a6);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x105);async['execute'](_0x46a4b8){const _0x2bcf87=a54_0x43a89d,{options:_0x4c4725,args:_0x576fce,tdx:_0x486d8e}=_0x46a4b8,_0x213548=this[_0x2bcf87(0x146)](_0x576fce,_0x4c4725),_0x1d826c=_0x4c4725[_0x2bcf87(0xfb)],_0x296450=_0x4c4725[_0x2bcf87(0x250)],_0x345f89=_0x4c4725[_0x2bcf87(0x16f)];if(!_0x213548)return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0xf0)]('Error:'),_0x2bcf87(0x166)),console[_0x2bcf87(0x25a)](a54_0x5efbd7['dim'](_0x2bcf87(0x1db))),console['error'](a54_0x5efbd7[_0x2bcf87(0x1cd)](_0x2bcf87(0x198))),0x1;if(!_0x1d826c)return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0xf0)](_0x2bcf87(0xf5)),_0x2bcf87(0xfc)),console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x1cd)](_0x2bcf87(0x1db))),0x1;_0x4c4725['verbose']&&(console[_0x2bcf87(0x25a)](_0x2bcf87(0xee)+_0x213548),console[_0x2bcf87(0x25a)](_0x2bcf87(0x1ad)+_0x1d826c),_0x296450&&console[_0x2bcf87(0x25a)](_0x2bcf87(0x218)+_0x296450),_0x4c4725['dryRun']&&console['error']('Dry\x20run:\x20yes'),_0x345f89&&console[_0x2bcf87(0x25a)]('Validation:\x20skipped'));const _0x59051c=await withSpinner(_0x2bcf87(0x257),()=>_0x486d8e[_0x2bcf87(0x193)][_0x2bcf87(0xda)](_0x213548,_0x1d826c,{'revision':_0x296450,'skipValidation':_0x345f89}),{'verbose':_0x4c4725[_0x2bcf87(0xf9)]}),_0x434c14=_0x59051c['data'];console[_0x2bcf87(0x25a)](_0x2bcf87(0x14a)+_0x434c14[_0x2bcf87(0x14d)]);_0x434c14[_0x2bcf87(0xcf)]&&console[_0x2bcf87(0x25a)](_0x2bcf87(0x20d)+_0x434c14[_0x2bcf87(0xcf)]);console[_0x2bcf87(0x25a)](_0x2bcf87(0x1ad)+_0x434c14[_0x2bcf87(0x245)]),console[_0x2bcf87(0x25a)](_0x2bcf87(0x218)+_0x434c14[_0x2bcf87(0x250)]),console[_0x2bcf87(0x25a)](_0x2bcf87(0x229)+_0x434c14[_0x2bcf87(0xf6)]);_0x434c14[_0x2bcf87(0x24a)]&&(console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x191)](_0x2bcf87(0xe9)+_0x434c14[_0x2bcf87(0x245)]+_0x2bcf87(0x179)+_0x434c14['existingProjectId']+')')),console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x191)](_0x2bcf87(0x126))));if(_0x4c4725[_0x2bcf87(0x1b7)])return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x191)](_0x2bcf87(0x267))),0x0;if(!_0x4c4725[_0x2bcf87(0x138)]){if(!isInteractive())return console[_0x2bcf87(0x25a)](a54_0x5efbd7['red'](_0x2bcf87(0x215)),_0x2bcf87(0x202)),console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x1cd)](_0x2bcf87(0x174))),0x1;const _0x14ed72=_0x434c14[_0x2bcf87(0xcf)]||a54_0x5981fe[_0x2bcf87(0xea)](_0x213548),_0x5c0d1f=_0x434c14[_0x2bcf87(0x24a)]?_0x2bcf87(0x187)+_0x1d826c+'\x22\x20with\x20new\x20revision?':'\x0aClone\x20\x22'+_0x14ed72+_0x2bcf87(0xf4)+_0x1d826c+'\x22?',_0x39767d=await confirmKey(_0x5c0d1f);if(!_0x39767d)return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x191)](_0x2bcf87(0x20a))),0x1;}const _0x740418=await withSpinner(_0x434c14[_0x2bcf87(0x24a)]?'Updating\x20'+_0x1d826c+_0x2bcf87(0x115):'Cloning\x20to\x20'+_0x1d826c+_0x2bcf87(0x115),()=>_0x486d8e[_0x2bcf87(0x193)][_0x2bcf87(0x25b)](_0x434c14),{'verbose':_0x4c4725[_0x2bcf87(0xf9)]}),_0x1d8fff=_0x740418[_0x2bcf87(0xe6)];return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x233)](_0x434c14[_0x2bcf87(0x24a)]?'✔\x20Project\x20updated':_0x2bcf87(0x197))),console[_0x2bcf87(0x25a)](_0x2bcf87(0x188)+_0x1d8fff[_0x2bcf87(0x245)]),console[_0x2bcf87(0x25a)](_0x2bcf87(0xd6)+_0x1d8fff[_0x2bcf87(0x1e3)]),console[_0x2bcf87(0x25a)](_0x2bcf87(0x21b)+_0x1d8fff[_0x2bcf87(0x250)]),await this[_0x2bcf87(0x1b4)](_0x486d8e,_0x1d8fff[_0x2bcf87(0x245)],_0x4c4725['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a54_0x43a89d(0xfb)]='workflow:delete';[a54_0x43a89d(0x1c8)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a54_0x43a89d(0x1a7)](_0x1a257b){const _0x592f24=a54_0x43a89d,{options:_0x595e1b,args:_0xe31106,tdx:_0x49dc93}=_0x1a257b,_0xbf9fe1=_0xe31106[0x0];if(!_0xbf9fe1)return console[_0x592f24(0x25a)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x592f24(0x25a)](_0x592f24(0x181)),0x1;_0x595e1b[_0x592f24(0xf9)]&&console[_0x592f24(0x25a)](_0x592f24(0x252)+_0xbf9fe1);if(!_0x595e1b['yes']){if(!isInteractive())return console['error'](a54_0x5efbd7[_0x592f24(0xf0)]('\x0aError:'),_0x592f24(0x202)),console['error'](a54_0x5efbd7['dim'](_0x592f24(0x174))),0x1;const _0x2ae473=await confirmKey(_0x592f24(0x160)+_0xbf9fe1+_0x592f24(0x27b));if(!_0x2ae473)return console['error'](a54_0x5efbd7['yellow'](_0x592f24(0x20a))),0x1;}const _0xe4a468=await withSpinner(_0x592f24(0x12d)+_0xbf9fe1+_0x592f24(0x115),()=>_0x49dc93[_0x592f24(0x193)]['delete'](_0xbf9fe1),{'verbose':_0x595e1b[_0x592f24(0xf9)]}),_0x33d1ed=_0xe4a468[_0x592f24(0xe6)];return console[_0x592f24(0x25a)](_0x592f24(0x21a)+_0x33d1ed['projectName']),console['error'](_0x592f24(0xd6)+_0x33d1ed[_0x592f24(0x178)]),0x0;}}export function parseKeyValue(_0x229244){const _0x5d728f=a54_0x43a89d,_0x21b622=_0x229244['indexOf']('=');if(_0x21b622===-0x1)throw new Error('Invalid\x20format:\x20'+_0x229244+_0x5d728f(0x108));const _0x53a5ea=_0x229244[_0x5d728f(0x145)](0x0,_0x21b622),_0x3d88bf=_0x229244['substring'](_0x21b622+0x1);if(!_0x53a5ea)throw new Error(_0x5d728f(0x13e));return{'key':_0x53a5ea,'value':_0x3d88bf};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:secrets:list';[a54_0x43a89d(0x1c8)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a54_0x43a89d(0x1a7)](_0x1d1761){const _0x2be043=a54_0x43a89d,{options:_0x16c46c,args:_0x33fcb9,tdx:_0x140122}=_0x1d1761,_0x2d543a=this[_0x2be043(0x13a)](_0x33fcb9,_0x16c46c);if(!_0x2d543a)return 0x1;_0x16c46c[_0x2be043(0xf9)]&&console['error'](_0x2be043(0x252)+_0x2d543a);const _0x36f36b=await withSpinner(_0x2be043(0xcd),()=>_0x140122[_0x2be043(0x193)][_0x2be043(0x170)](_0x2d543a),{'verbose':_0x16c46c[_0x2be043(0xf9)]}),{secrets:_0x59dd96}=_0x36f36b[_0x2be043(0xe6)];return console[_0x2be043(0x25a)]('✔\x20Found\x20'+_0x59dd96[_0x2be043(0x201)]+_0x2be043(0x199)+(_0x59dd96[_0x2be043(0x201)]!==0x1?'s':'')),await handleSDKOutput(_0x59dd96,_0x16c46c),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:secrets:set';[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x1b8);async[a54_0x43a89d(0x1a7)](_0x2b4dbb){const _0x12b9f6=a54_0x43a89d,{options:_0x171c0e,args:_0x3403a1,tdx:_0xb961b8}=_0x2b4dbb;let _0x58af9c,_0x40f604;if(_0x3403a1[_0x12b9f6(0x201)]>=0x1&&!_0x3403a1[0x0][_0x12b9f6(0x274)]('='))_0x58af9c=_0x3403a1[0x0],_0x40f604=_0x3403a1[_0x12b9f6(0x107)](0x1);else{if(_0x3403a1[_0x12b9f6(0x201)]>=0x1&&_0x171c0e[_0x12b9f6(0x241)])_0x58af9c=_0x171c0e[_0x12b9f6(0x241)],_0x40f604=_0x3403a1;else return _0x3403a1['length']>=0x1?(console['error'](_0x12b9f6(0x21e)),console[_0x12b9f6(0x25a)](_0x12b9f6(0xd9)),0x1):(console[_0x12b9f6(0x25a)](_0x12b9f6(0x131)),console['error'](_0x12b9f6(0x11c)),0x1);}if(_0x40f604[_0x12b9f6(0x201)]===0x0)return console['error']('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x12b9f6(0x25a)](_0x12b9f6(0x11c)),0x1;const _0x358a70={};try{for(const _0xef3250 of _0x40f604){const {key:_0x3263c7,value:_0x3bb3fe}=parseKeyValue(_0xef3250);_0x358a70[_0x3263c7]=_0x3bb3fe;}}catch(_0x1851be){return _0x1851be instanceof Error&&console[_0x12b9f6(0x25a)](a54_0x5efbd7['red'](_0x12b9f6(0xf5)),_0x1851be[_0x12b9f6(0x12f)]),0x1;}const _0x15ab2a=Object[_0x12b9f6(0x100)](_0x358a70);_0x171c0e[_0x12b9f6(0xf9)]&&(console[_0x12b9f6(0x25a)](_0x12b9f6(0x252)+_0x58af9c),console['error'](_0x12b9f6(0x16a)+_0x15ab2a[_0x12b9f6(0x205)](',\x20')));const _0x388633=await withSpinner(_0x15ab2a[_0x12b9f6(0x201)]===0x1?_0x12b9f6(0x244):_0x12b9f6(0x22b)+_0x15ab2a[_0x12b9f6(0x201)]+_0x12b9f6(0x102),()=>_0xb961b8[_0x12b9f6(0x193)][_0x12b9f6(0x223)](_0x58af9c,_0x358a70),{'verbose':_0x171c0e['verbose']}),_0x115bf5=_0x388633[_0x12b9f6(0xe6)];return console['error'](_0x15ab2a[_0x12b9f6(0x201)]===0x1?'✔\x20Secret\x20\x27'+_0x115bf5['keys'][0x0]+_0x12b9f6(0x253)+_0x115bf5[_0x12b9f6(0xc5)]+'\x27':'✔\x20'+_0x115bf5['keys']['length']+_0x12b9f6(0x273)+_0x115bf5[_0x12b9f6(0xc5)]+'\x27'),(_0x171c0e[_0x12b9f6(0xfa)]||_0x171c0e[_0x12b9f6(0x1fa)])&&await handleSingleObjectOutput(_0x115bf5,_0x171c0e),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:secrets:delete';[a54_0x43a89d(0x1c8)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a54_0x43a89d(0x1a7)](_0x520680){const _0x4426f5=a54_0x43a89d,{options:_0x24adf3,args:_0x17347b,tdx:_0x3b31a3}=_0x520680;let _0x50fd3b,_0x3851b1;if(_0x17347b[_0x4426f5(0x201)]>=0x2)_0x50fd3b=_0x17347b[0x0],_0x3851b1=_0x17347b[0x1];else{if(_0x17347b[_0x4426f5(0x201)]===0x1&&_0x24adf3[_0x4426f5(0x241)])_0x50fd3b=_0x24adf3['workflowProject'],_0x3851b1=_0x17347b[0x0];else return _0x17347b[_0x4426f5(0x201)]===0x1?(console[_0x4426f5(0x25a)](_0x4426f5(0x21e)),console['error'](_0x4426f5(0xd9)),0x1):(console[_0x4426f5(0x25a)](_0x4426f5(0x26d)),console[_0x4426f5(0x25a)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x24adf3[_0x4426f5(0xf9)]&&(console['error'](_0x4426f5(0x252)+_0x50fd3b),console[_0x4426f5(0x25a)](_0x4426f5(0x113)+_0x3851b1));if(!_0x24adf3[_0x4426f5(0x138)]){if(!isInteractive())return console[_0x4426f5(0x25a)](a54_0x5efbd7[_0x4426f5(0xf0)]('\x0aError:'),_0x4426f5(0x202)),console[_0x4426f5(0x25a)](a54_0x5efbd7[_0x4426f5(0x1cd)](_0x4426f5(0x174))),0x1;const _0x81e443=await confirmKey(_0x4426f5(0x1e1)+_0x3851b1+'\x27\x20from\x20project\x20\x27'+_0x50fd3b+'\x27?');if(!_0x81e443)return console[_0x4426f5(0x25a)](a54_0x5efbd7[_0x4426f5(0x191)](_0x4426f5(0x20a))),0x1;}const _0x151253=await withSpinner(_0x4426f5(0x207),()=>_0x3b31a3['workflow']['deleteSecret'](_0x50fd3b,_0x3851b1),{'verbose':_0x24adf3[_0x4426f5(0xf9)]}),_0x4b5f4a=_0x151253[_0x4426f5(0xe6)];return console[_0x4426f5(0x25a)](_0x4426f5(0x238)+_0x4b5f4a['key']+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x4b5f4a[_0x4426f5(0xc5)]+'\x27'),(_0x24adf3[_0x4426f5(0xfa)]||_0x24adf3['jsonl'])&&await handleSingleObjectOutput(_0x4b5f4a,_0x24adf3),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(_0x6bce03){const _0x154867=a54_0x43a89d,_0x6c2e35=Math['floor'](_0x6bce03/0x3e8),_0xc6986c=Math[_0x154867(0x163)](_0x6c2e35/0x3c),_0x55fffa=Math[_0x154867(0x163)](_0xc6986c/0x3c),_0x44bebf=Math[_0x154867(0x163)](_0x55fffa/0x18);if(_0x44bebf>0x0){const _0x162095=_0x55fffa%0x18;return _0x162095>0x0?_0x44bebf+'d\x20'+_0x162095+'h':_0x44bebf+'d';}else{if(_0x55fffa>0x0){const _0x36e505=_0xc6986c%0x3c;return _0x36e505>0x0?_0x55fffa+'h\x20'+_0x36e505+'m':_0x55fffa+'h';}else{if(_0xc6986c>0x0){const _0x4b9bbc=_0x6c2e35%0x3c;return _0x4b9bbc>0x0?_0xc6986c+'m\x20'+_0x4b9bbc+'s':_0xc6986c+'m';}else return _0x6c2e35+'s';}}}function formatTimestamp(_0x236619,_0x304452){const _0x4ff854=a54_0x43a89d,_0x413fdc=new Date(_0x236619),_0x5553a8=String(_0x413fdc[_0x4ff854(0x27e)]())[_0x4ff854(0x1f5)](0x2,'0'),_0x5dfd0e=String(_0x413fdc[_0x4ff854(0x20e)]())['padStart'](0x2,'0'),_0xb8654e=_0x5553a8+':'+_0x5dfd0e,_0x3b4fb8=_0x413fdc[_0x4ff854(0x1c5)]()===_0x304452['getFullYear']()&&_0x413fdc[_0x4ff854(0x1a4)]()===_0x304452[_0x4ff854(0x1a4)]()&&_0x413fdc[_0x4ff854(0x13d)]()===_0x304452[_0x4ff854(0x13d)]();if(_0x3b4fb8)return _0xb8654e;else{const _0x1e5270=String(_0x413fdc['getMonth']()+0x1)[_0x4ff854(0x1f5)](0x2,'0'),_0x27f5e3=String(_0x413fdc[_0x4ff854(0x13d)]())['padStart'](0x2,'0');return _0x1e5270+'-'+_0x27f5e3+'\x20'+_0xb8654e;}}function formatDate(_0x1f72d8){const _0x4b515d=a54_0x43a89d,_0x484819=_0x1f72d8[_0x4b515d(0x1c5)](),_0x1ad2ea=String(_0x1f72d8[_0x4b515d(0x1a4)]()+0x1)['padStart'](0x2,'0'),_0x4f2352=String(_0x1f72d8[_0x4b515d(0x13d)]())[_0x4b515d(0x1f5)](0x2,'0');return _0x484819+'-'+_0x1ad2ea+'-'+_0x4f2352;}function getTaskStateIcon(_0x3f7358){const _0x6c74d8={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x6c74d8[_0x3f7358]||'⚪';}function getBarChar(_0x53194e){const _0x354563=a54_0x43a89d;return _0x53194e===_0x354563(0x25a)||_0x53194e===_0x354563(0x17e)?'×':'─';}function getBarColor(_0x16fc07){const _0x3025ba=a54_0x43a89d,_0x124bbe={'success':a54_0x5efbd7[_0x3025ba(0x233)],'error':a54_0x5efbd7[_0x3025ba(0xf0)],'group_error':a54_0x5efbd7['red'],'running':a54_0x5efbd7[_0x3025ba(0x27d)],'blocked':a54_0x5efbd7[_0x3025ba(0x191)],'planned':a54_0x5efbd7[_0x3025ba(0x1cd)],'canceling':a54_0x5efbd7['yellow']};return _0x124bbe[_0x16fc07]||a54_0x5efbd7['white'];}function parseTaskName(_0x279c29){const _0xb3e434=a54_0x43a89d;let _0xf32efb=_0x279c29['replace'](/^\++/,'');const _0x560e35=_0xf32efb['split']('+'),_0x43e63b=_0x560e35['length']>0x1?_0x560e35['length']-0x2:0x0,_0x4e4295=_0x560e35[_0x560e35[_0xb3e434(0x201)]-0x1]||_0xf32efb;return{'level':_0x43e63b,'name':'+'+_0x4e4295};}function truncateTaskName(_0x4dd84a,_0x1e6b17){const _0x598f89=a54_0x43a89d,_0x4b8ce5=stringWidth(_0x4dd84a);if(_0x4b8ce5<=_0x1e6b17)return _0x4dd84a;let _0x3e23ce=_0x4dd84a;while(stringWidth(_0x3e23ce+'…')>_0x1e6b17&&_0x3e23ce[_0x598f89(0x201)]>0x0){_0x3e23ce=_0x3e23ce['slice'](0x0,-0x1);}return _0x3e23ce+'…';}function calculateTimeScale(_0x494db2,_0x4d11b2){const _0x2b7377=a54_0x43a89d;return{'startTime':_0x494db2['start'],'endTime':_0x494db2[_0x2b7377(0x182)],'durationMs':_0x494db2[_0x2b7377(0xfd)],'msPerChar':_0x494db2['duration']/_0x4d11b2};}function timeToPosition(_0x11b87a,_0x3c859d,_0x30703c){const _0x193294=a54_0x43a89d,_0x3948cf=_0x11b87a-_0x3c859d['startTime'],_0x1ff065=Math[_0x193294(0x163)](_0x3948cf/_0x3c859d[_0x193294(0x16e)]);return Math[_0x193294(0x1c6)](0x0,Math[_0x193294(0x260)](_0x1ff065,_0x30703c));}function renderTimeAxis(_0x168ccd,_0x297f45){const _0x32fd19=a54_0x43a89d,_0x5be3a7=Math[_0x32fd19(0x260)](TIMELINE_CONFIG[_0x32fd19(0x162)],Math['max'](TIMELINE_CONFIG[_0x32fd19(0x11b)],Math['floor'](_0x297f45/TIMELINE_CONFIG[_0x32fd19(0x118)]))),_0x2a7242=_0x168ccd[_0x32fd19(0x1a3)]/(_0x5be3a7-0x1),_0x152dd8=new Date(_0x168ccd[_0x32fd19(0x1f8)]),_0x573d38=[];for(let _0x575c06=0x0;_0x575c06<_0x5be3a7;_0x575c06++){const _0x4da343=_0x168ccd[_0x32fd19(0x1f8)]+_0x575c06*_0x2a7242,_0x4a6a3a=timeToPosition(_0x4da343,_0x168ccd,_0x297f45),_0x30eef3=formatTimestamp(_0x4da343,_0x152dd8);_0x573d38[_0x32fd19(0x22a)]({'pos':_0x4a6a3a,'text':_0x30eef3});}const _0xfd6dec=new Array(_0x297f45)[_0x32fd19(0x203)]('\x20');let _0x16209e=-0x1;for(const {pos:_0x44a57e,text:_0x51bd14}of _0x573d38){let _0x5443b9=Math[_0x32fd19(0x1c6)](0x0,_0x44a57e-Math['floor'](_0x51bd14[_0x32fd19(0x201)]/0x2));_0x5443b9<=_0x16209e+TIMELINE_CONFIG[_0x32fd19(0x1cc)]&&(_0x5443b9=_0x16209e+TIMELINE_CONFIG[_0x32fd19(0x1cc)]+0x1);_0x5443b9+_0x51bd14['length']>_0x297f45&&(_0x5443b9=_0x297f45-_0x51bd14['length']);if(_0x5443b9>=0x0&&_0x5443b9+_0x51bd14[_0x32fd19(0x201)]<=_0x297f45&&_0x5443b9>_0x16209e){for(let _0x92f528=0x0;_0x92f528<_0x51bd14[_0x32fd19(0x201)];_0x92f528++){_0xfd6dec[_0x5443b9+_0x92f528]=_0x51bd14[_0x92f528];}_0x16209e=_0x5443b9+_0x51bd14['length']-0x1;}}return _0xfd6dec[_0x32fd19(0x205)]('');}function renderTaskRow(_0x5d1de8,_0x301910,_0xeabe9e,_0x57ea49){const _0x4422df=a54_0x43a89d,{level:_0x504f12,name:_0x1169bf}=parseTaskName(_0x5d1de8[_0x4422df(0xfb)]),_0x1fd689='\x20'[_0x4422df(0x27f)](_0x504f12),_0xd27710=_0x5d1de8['window']?'('+formatElapsed(_0x5d1de8[_0x4422df(0x1e5)][_0x4422df(0xfd)])+')':'',_0x3e9cb4=stringWidth(_0xd27710),_0x16af3c=_0x504f12*0x1,_0x320886=_0x57ea49-_0x16af3c-_0x3e9cb4-0x1,_0x45db7f=truncateTaskName(_0x1169bf,_0x320886),_0x1e9700=_0x1fd689+_0x45db7f,_0x3d9eb3=stringWidth(_0x1e9700),_0x1c1db7=_0x57ea49-_0x3d9eb3-_0x3e9cb4,_0x544574=_0x1e9700+'\x20'[_0x4422df(0x27f)](Math[_0x4422df(0x1c6)](0x1,_0x1c1db7))+a54_0x5efbd7[_0x4422df(0x1cd)](_0xd27710),_0x20448d=getTaskStateIcon(_0x5d1de8[_0x4422df(0x27c)]),_0x29c3d8=new Array(_0xeabe9e)[_0x4422df(0x203)]('\x20');if(_0x5d1de8[_0x4422df(0x1e5)]){const _0x324f05=timeToPosition(_0x5d1de8[_0x4422df(0x1e5)]['start'],_0x301910,_0xeabe9e),_0x22e6b9=timeToPosition(_0x5d1de8['window']['end'],_0x301910,_0xeabe9e),_0x1a4d8a=getBarChar(_0x5d1de8['state']),_0x51178f=Math['max'](_0x324f05+0x1,_0x22e6b9);for(let _0x1d49e8=_0x324f05;_0x1d49e8<Math['min'](_0x51178f,_0xeabe9e);_0x1d49e8++){_0x29c3d8[_0x1d49e8]=_0x1a4d8a;}}const _0x57519d=getBarColor(_0x5d1de8[_0x4422df(0x27c)]),_0x126354=_0x29c3d8[_0x4422df(0x159)](_0x262b30=>_0x262b30==='\x20'?'\x20':_0x57519d(_0x262b30))[_0x4422df(0x205)]('');return _0x20448d+'\x20'+_0x544574+'│'+_0x126354+'│';}function calculateStats(_0x427b37){const _0xa07ea2=a54_0x43a89d,_0x1a7469={'total':_0x427b37[_0xa07ea2(0x201)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3a4459 of _0x427b37){if(_0x3a4459[_0xa07ea2(0x27c)]==='success')_0x1a7469[_0xa07ea2(0x19e)]++;else{if(_0x3a4459[_0xa07ea2(0x27c)]==='error'||_0x3a4459[_0xa07ea2(0x27c)]===_0xa07ea2(0x17e))_0x1a7469['error']++;else _0x3a4459[_0xa07ea2(0x27c)]===_0xa07ea2(0x185)?_0x1a7469['running']++:_0x1a7469['pending']++;}}return _0x1a7469;}function formatStats(_0x82af55){const _0x1c6e25=a54_0x43a89d;return['Total:\x20'+_0x82af55['total'],'✅\x20'+_0x82af55['success'],'❌\x20'+_0x82af55[_0x1c6e25(0x25a)],'🔄\x20'+_0x82af55[_0x1c6e25(0x185)],'⏳\x20'+_0x82af55[_0x1c6e25(0x249)]][_0x1c6e25(0x205)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x230);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x15b);async[a54_0x43a89d(0x1a7)](_0xdbcbb9){const _0x173e02=a54_0x43a89d,{options:_0x3e5441,args:_0x342ff4,tdx:_0x1bed7e}=_0xdbcbb9;let _0x1e7f8e,_0x5c7989,_0x11ef84=![];if(_0x342ff4[0x0]){if(_0x342ff4[0x0][_0x173e02(0x274)]('.')){const _0x5a2a2f=this[_0x173e02(0x132)](_0x342ff4,_0x3e5441);if(!_0x5a2a2f)return 0x1;_0x1e7f8e=_0x5a2a2f[_0x173e02(0xc5)],_0x5c7989=_0x5a2a2f[_0x173e02(0x133)];}else{_0x5c7989=_0x342ff4[0x0],_0x1e7f8e=_0x3e5441[_0x173e02(0x241)];if(!_0x1e7f8e)return console[_0x173e02(0x25a)](a54_0x5efbd7[_0x173e02(0xf0)](_0x173e02(0xf5)),_0x173e02(0x104)),0x1;_0x11ef84=!![];}}else{const _0x430058=this[_0x173e02(0x132)](_0x342ff4,_0x3e5441);if(!_0x430058)return 0x1;_0x1e7f8e=_0x430058[_0x173e02(0xc5)],_0x5c7989=_0x430058[_0x173e02(0x133)];}if(_0x3e5441[_0x173e02(0xf9)]){if(_0x1e7f8e&&_0x5c7989)console[_0x173e02(0x25a)](_0x173e02(0x194)+_0x1e7f8e+'.'+_0x5c7989);else _0x1e7f8e&&console[_0x173e02(0x25a)]('Filter:\x20project='+_0x1e7f8e);}const _0x382697=_0x3e5441[_0x173e02(0x18f)],_0x86180f=_0x3e5441[_0x173e02(0x20f)];if(_0x382697){_0x86180f&&console[_0x173e02(0x25a)](a54_0x5efbd7[_0x173e02(0x191)](_0x173e02(0x190)),_0x173e02(0x1f0));const _0x55ecf3=_0x3e5441['follow'];return _0x55ecf3?await this[_0x173e02(0x24d)](_0xdbcbb9,_0x382697):await this[_0x173e02(0x25c)](_0xdbcbb9,_0x382697,_0x3e5441),0x0;}if(_0x86180f){const _0x4694aa=await withSpinner('Loading\x20session...',()=>_0x1bed7e[_0x173e02(0x193)]['sessions']({'projectName':_0x1e7f8e,'workflowName':_0x5c7989,'limit':0x64}),{'verbose':_0x3e5441[_0x173e02(0xf9)]}),_0x44d387=_0x4694aa[_0x173e02(0xe6)]['find'](_0xedfe56=>_0xedfe56['id']===_0x86180f);if(!_0x44d387)return console[_0x173e02(0x25a)](a54_0x5efbd7[_0x173e02(0xf0)]('Error:'),_0x173e02(0x228)+_0x86180f),0x1;if(!_0x44d387['lastAttempt']?.['id'])return console[_0x173e02(0x25a)](a54_0x5efbd7[_0x173e02(0xf0)](_0x173e02(0xf5)),_0x173e02(0x16b)+_0x86180f+_0x173e02(0x101)),0x1;const _0x327bc5=_0x44d387[_0x173e02(0x1fc)]['id'];_0x3e5441[_0x173e02(0xf9)]&&console[_0x173e02(0x25a)]('Using\x20attempt\x20'+_0x327bc5+_0x173e02(0x17d)+_0x86180f);const _0xf9f7e5=_0x3e5441[_0x173e02(0x15f)];return _0xf9f7e5?await this['pollTimeline'](_0xdbcbb9,_0x327bc5):await this[_0x173e02(0x25c)](_0xdbcbb9,_0x327bc5,_0x3e5441),0x0;}const _0x3be862=await withSpinner(_0x173e02(0x1bf),()=>_0x1bed7e[_0x173e02(0x193)][_0x173e02(0x1b6)]({'projectName':_0x1e7f8e,'workflowName':_0x5c7989,'limit':_0x3e5441[_0x173e02(0x24c)]||0x32}),{'verbose':_0x3e5441[_0x173e02(0xf9)]}),_0x416fcc=_0x3be862[_0x173e02(0xe6)];if(_0x416fcc[_0x173e02(0x201)]===0x0){if(_0x1e7f8e&&_0x5c7989)console[_0x173e02(0x25a)](_0x173e02(0x1cf)+_0x1e7f8e+'.'+_0x5c7989);else _0x1e7f8e?console[_0x173e02(0x25a)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x1e7f8e):(console[_0x173e02(0x25a)]('No\x20workflow\x20sessions\x20found'),console['error'](a54_0x5efbd7[_0x173e02(0x1cd)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x416fcc[_0x173e02(0x1f2)]((_0xa81a52,_0x44655a)=>{const _0x1b2854=_0x173e02,_0x5d1cb2=_0xa81a52[_0x1b2854(0x1ef)]||'',_0x2ce403=_0x44655a[_0x1b2854(0x1ef)]||'';return _0x2ce403[_0x1b2854(0x153)](_0x5d1cb2);});if(_0x3e5441[_0x173e02(0xfa)]||_0x3e5441[_0x173e02(0x1fa)])return await handleSDKOutput(_0x416fcc,_0x3e5441),0x0;let _0x417f3c;if(_0x11ef84){const _0x404bc5=_0x416fcc[0x0];if(!_0x404bc5['lastAttempt']?.['id'])return console[_0x173e02(0x25a)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x417f3c=_0x404bc5['lastAttempt']['id'],_0x3e5441[_0x173e02(0xf9)]&&console[_0x173e02(0x25a)](_0x173e02(0x226)+_0x404bc5[_0x173e02(0x1ef)]);}else{const _0x1a0dcd=_0x416fcc[_0x173e02(0x159)](_0x3edc4b=>{const _0x4bdaa0=_0x173e02,_0x4cea87=getAttemptStatusDisplay(_0x3edc4b[_0x4bdaa0(0x1fc)]);return{'title':_0x3edc4b[_0x4bdaa0(0x1ec)]?.[_0x4bdaa0(0xfb)]+'.'+_0x3edc4b['workflow']?.[_0x4bdaa0(0xfb)]+_0x4bdaa0(0x112)+_0x3edc4b[_0x4bdaa0(0x1ef)]+'\x20'+_0x4cea87[_0x4bdaa0(0x15e)],'value':_0x3edc4b[_0x4bdaa0(0x1fc)]?.['id']||'','description':_0x4cea87['text']};}),_0x5e24ab=await a54_0x1897d({'type':_0x173e02(0xc6),'name':_0x173e02(0x18f),'message':_0x173e02(0x275),'choices':_0x1a0dcd[_0x173e02(0x150)](_0x5f191d=>_0x5f191d[_0x173e02(0x247)]!=='')});if(!_0x5e24ab['attemptId'])return 0x0;_0x417f3c=_0x5e24ab[_0x173e02(0x18f)];}const _0x236822=_0x3e5441[_0x173e02(0x15f)];return _0x236822?await this[_0x173e02(0x24d)](_0xdbcbb9,_0x417f3c):await this[_0x173e02(0x25c)](_0xdbcbb9,_0x417f3c,_0x3e5441),0x0;}async[a54_0x43a89d(0x25c)](_0xa7b1a,_0x53aea9,_0x4609a5){const _0x1f7d85=a54_0x43a89d,{tdx:_0xa85aca}=_0xa7b1a;let _0x223af4,_0x18b2d2;try{[_0x223af4,_0x18b2d2]=await Promise[_0x1f7d85(0x1df)]([_0xa85aca[_0x1f7d85(0x193)][_0x1f7d85(0x248)](_0x53aea9),_0xa85aca['workflow'][_0x1f7d85(0x15a)](_0x53aea9,![])]);}catch(_0x3a708d){console[_0x1f7d85(0x25a)](a54_0x5efbd7[_0x1f7d85(0xf0)](_0x1f7d85(0x1d6)));_0x4609a5[_0x1f7d85(0xf9)]&&console[_0x1f7d85(0x25a)](_0x3a708d);throw _0x3a708d;}if(_0x4609a5[_0x1f7d85(0xfa)]||_0x4609a5[_0x1f7d85(0x1fa)]){const _0x379920=this[_0x1f7d85(0x220)](_0x223af4,_0x18b2d2);await handleSDKOutput([_0x379920],_0x4609a5);return;}const _0x356ba0=_0xa85aca['context'][_0x1f7d85(0x1f9)],_0x5d11f8=this[_0x1f7d85(0x116)](_0x223af4,_0x18b2d2,_0x356ba0);console[_0x1f7d85(0x1ca)](_0x5d11f8);}async[a54_0x43a89d(0x24d)](_0x5b8d56,_0x4eadbb){const _0x383927=a54_0x43a89d,{tdx:_0x4b3e7e}=_0x5b8d56,_0x3ebfed=TIMELINE_CONFIG[_0x383927(0xe5)],_0x48e442=TIMELINE_CONFIG[_0x383927(0x106)];let _0x1dbaed=0x0;while(_0x1dbaed<_0x48e442){process[_0x383927(0xd2)]['isTTY']&&process['stdout'][_0x383927(0x242)]('\x1bc');let _0x49b1e3,_0x4ee9d1;try{[_0x49b1e3,_0x4ee9d1]=await Promise[_0x383927(0x1df)]([_0x4b3e7e[_0x383927(0x193)][_0x383927(0x248)](_0x4eadbb),_0x4b3e7e[_0x383927(0x193)][_0x383927(0x15a)](_0x4eadbb,![])]);}catch(_0x4367e7){console[_0x383927(0x25a)](a54_0x5efbd7['red'](_0x383927(0x1a2)));_0x1dbaed>0x0&&console[_0x383927(0x25a)](a54_0x5efbd7[_0x383927(0x1cd)](_0x383927(0x209)+_0x1dbaed));throw _0x4367e7;}const _0x197e1e=_0x4b3e7e[_0x383927(0xdf)][_0x383927(0x1f9)],_0x36832e=this[_0x383927(0x116)](_0x49b1e3,_0x4ee9d1,_0x197e1e);console[_0x383927(0x1ca)](_0x36832e);const _0x5bb968=_0x49b1e3[_0x383927(0x26c)]&&_0x4ee9d1['every'](_0x400659=>_0x400659[_0x383927(0x27c)]!=='running'&&_0x400659[_0x383927(0x27c)]!==_0x383927(0x121));if(_0x5bb968){console['error'](a54_0x5efbd7[_0x383927(0x233)](_0x383927(0x19c)));break;}console[_0x383927(0x25a)](a54_0x5efbd7[_0x383927(0x1cd)](_0x383927(0x23c)+_0x1dbaed*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0xad7de1=>setTimeout(_0xad7de1,_0x3ebfed)),_0x1dbaed++;}_0x1dbaed>=_0x48e442&&console['error'](a54_0x5efbd7[_0x383927(0x191)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a54_0x43a89d(0x116)](_0x33e0cd,_0xba9441,_0x733ab8){const _0x315c12=a54_0x43a89d,_0x5c7dfe=[],_0x1ee1f5=TIMELINE_CONFIG[_0x315c12(0xe8)],_0x628ea5=0x5,_0x2259d9=process[_0x315c12(0xd2)][_0x315c12(0x217)]||0x78,_0x5c89e4=_0x2259d9-_0x1ee1f5-_0x628ea5,_0x57a442=Math[_0x315c12(0x1c6)](TIMELINE_CONFIG[_0x315c12(0x17c)],Math[_0x315c12(0x260)](_0x5c89e4,TIMELINE_CONFIG[_0x315c12(0x1d3)])),_0x271be0=new Date(_0x33e0cd[_0x315c12(0x14c)])[_0x315c12(0x231)](),_0x462fb7=_0x33e0cd[_0x315c12(0x270)]?new Date(_0x33e0cd['finishedAt'])[_0x315c12(0x231)]():Date['now'](),_0x5e7e78={'start':_0x271be0,'end':_0x462fb7,'duration':_0x462fb7-_0x271be0},_0xf4b42b=new Map(),_0x3bcb9c=[];for(const _0x52fb63 of _0xba9441){if(_0x52fb63[_0x315c12(0x10c)]){const _0x3825c7=new Date(_0x52fb63['startedAt'])[_0x315c12(0x231)](),_0x2324ac=_0x52fb63[_0x315c12(0xd1)]?new Date(_0x52fb63[_0x315c12(0xd1)])[_0x315c12(0x231)]():Date[_0x315c12(0xe3)](),_0x4973e2={'start':_0x3825c7,'end':_0x2324ac,'duration':_0x2324ac-_0x3825c7};_0xf4b42b['set'](_0x52fb63['id'],_0x4973e2),_0x3bcb9c[_0x315c12(0x22a)]({'name':_0x52fb63[_0x315c12(0x172)],'state':_0x52fb63['state']||_0x315c12(0x12c),'window':_0x4973e2});}else _0x3bcb9c[_0x315c12(0x22a)]({'name':_0x52fb63[_0x315c12(0x172)],'state':_0x52fb63[_0x315c12(0x27c)]||'planned','window':undefined});}_0x3bcb9c['sort']((_0x40cf82,_0x37c472)=>{const _0x4ad5bb=_0x315c12;if(!_0x40cf82[_0x4ad5bb(0x1e5)])return 0x1;if(!_0x37c472[_0x4ad5bb(0x1e5)])return-0x1;return _0x40cf82['window'][_0x4ad5bb(0x141)]-_0x37c472['window'][_0x4ad5bb(0x141)];});const _0x3e39b2=_0x3bcb9c[_0x315c12(0x201)],_0x1d22ee=_0x3e39b2>TIMELINE_CONFIG[_0x315c12(0x26a)];_0x1d22ee&&_0x3bcb9c['splice'](TIMELINE_CONFIG[_0x315c12(0x26a)]);const _0x58f995=calculateTimeScale(_0x5e7e78,_0x57a442),_0x134291=_0x33e0cd[_0x315c12(0x26c)]?_0x33e0cd[_0x315c12(0x19e)]?a54_0x5efbd7[_0x315c12(0x233)]('success'):a54_0x5efbd7[_0x315c12(0xf0)](_0x315c12(0x25a)):a54_0x5efbd7[_0x315c12(0x27d)](_0x315c12(0x185)),_0x47147c=_0x33e0cd[_0x315c12(0x1ec)]?.['id'],_0x106262=_0x33e0cd[_0x315c12(0x20f)];let _0x3d8df0;if(_0x47147c&&_0x106262){const _0x2c5194=getWorkflowAttemptUrl(_0x733ab8,_0x47147c,_0x106262,_0x33e0cd['id']);_0x3d8df0=hyperlink(a54_0x5efbd7[_0x315c12(0x1cd)](_0x33e0cd['id']),_0x2c5194);}else _0x3d8df0=a54_0x5efbd7[_0x315c12(0x1cd)](_0x33e0cd['id']);_0x5c7dfe[_0x315c12(0x22a)](_0x315c12(0x1e7)+_0x3d8df0+_0x315c12(0x112)+_0x134291+_0x315c12(0x112)+formatElapsed(_0x5e7e78[_0x315c12(0xfd)]));if(_0x3bcb9c['length']>0x0){const _0x51a132=renderTimeAxis(_0x58f995,_0x57a442),_0x586fd9=new Date(_0x5e7e78['start']),_0x29038b=formatDate(_0x586fd9),_0x26f68a=TIMELINE_CONFIG[_0x315c12(0x10e)]+TIMELINE_CONFIG[_0x315c12(0x1a0)]+_0x1ee1f5,_0x5b28fc=_0x29038b[_0x315c12(0x1f5)](_0x26f68a),_0x586046=a54_0x5efbd7[_0x315c12(0x1cd)](_0x5b28fc);_0x5c7dfe[_0x315c12(0x22a)](_0x586046+'\x20'+_0x51a132);for(const _0xc24ccf of _0x3bcb9c){_0x5c7dfe[_0x315c12(0x22a)](renderTaskRow(_0xc24ccf,_0x58f995,_0x57a442,_0x1ee1f5));}const _0x2a0d57=calculateStats(_0x3bcb9c);_0x5c7dfe[_0x315c12(0x22a)](formatStats(_0x2a0d57)),_0x1d22ee&&_0x5c7dfe[_0x315c12(0x22a)](a54_0x5efbd7[_0x315c12(0x191)](_0x315c12(0x25d)+TIMELINE_CONFIG[_0x315c12(0x26a)]+_0x315c12(0x1ae)+_0x3e39b2+_0x315c12(0x25f))),_0x5c7dfe[_0x315c12(0x22a)](''),_0x5c7dfe[_0x315c12(0x22a)](a54_0x5efbd7[_0x315c12(0x1cd)](_0x315c12(0x237))+(_0x315c12(0x26b)+_0x33e0cd['id']+_0x315c12(0x23b))+a54_0x5efbd7['dim']('\x20to\x20see\x20detailed\x20logs'));}else _0x5c7dfe['push'](_0x315c12(0x14e));return _0x5c7dfe['join']('\x0a');}[a54_0x43a89d(0x220)](_0x49a212,_0x494e6e){const _0x399701=a54_0x43a89d,_0x2e15c2=new Date(_0x49a212[_0x399701(0x14c)])[_0x399701(0x231)](),_0x12979b=_0x49a212[_0x399701(0x270)]?new Date(_0x49a212[_0x399701(0x270)])[_0x399701(0x231)]():Date[_0x399701(0xe3)](),_0x4e3fd3=_0x12979b-_0x2e15c2,_0x55b6c4=[];for(const _0x189308 of _0x494e6e){if(_0x189308[_0x399701(0x10c)]){const _0x2ce15e=new Date(_0x189308[_0x399701(0x10c)])['getTime'](),_0x2d3c64=_0x189308[_0x399701(0xd1)]?new Date(_0x189308[_0x399701(0xd1)])['getTime']():Date[_0x399701(0xe3)]();_0x55b6c4[_0x399701(0x22a)]({'name':_0x189308['fullName'],'state':_0x189308[_0x399701(0x27c)]||'unknown','window':{'start':_0x2ce15e,'end':_0x2d3c64,'duration':_0x2d3c64-_0x2ce15e}});}else _0x55b6c4[_0x399701(0x22a)]({'name':_0x189308[_0x399701(0x172)],'state':_0x189308[_0x399701(0x27c)]||'planned','window':undefined});}const _0x2dd639=calculateStats(_0x55b6c4);return{'attempt':{'id':_0x49a212['id'],'status':_0x49a212[_0x399701(0x26c)]?_0x49a212[_0x399701(0x19e)]?_0x399701(0x19e):_0x399701(0x25a):'running','createdAt':_0x49a212[_0x399701(0x14c)],'finishedAt':_0x49a212[_0x399701(0x270)],'duration_ms':_0x4e3fd3},'tasks':_0x55b6c4[_0x399701(0x159)](_0x3b5d49=>({'name':_0x3b5d49['name'],'state':_0x3b5d49[_0x399701(0x27c)],'startedAt':_0x3b5d49['window']?new Date(_0x3b5d49[_0x399701(0x1e5)][_0x399701(0x141)])[_0x399701(0x258)]():null,'updatedAt':_0x3b5d49[_0x399701(0x1e5)]?new Date(_0x3b5d49[_0x399701(0x1e5)]['end'])[_0x399701(0x258)]():null,'duration_ms':_0x3b5d49[_0x399701(0x1e5)]?.[_0x399701(0xfd)]||null})),'stats':_0x2dd639};}}export class WorkflowSchedulesCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x1fb);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x259);async[a54_0x43a89d(0x1a7)](_0x253221){const _0x27391c=a54_0x43a89d,{options:_0x190e8d,tdx:_0x1af8ac}=_0x253221,_0x5a8c86=await withSpinner(_0x27391c(0x25e),()=>_0x1af8ac[_0x27391c(0x193)][_0x27391c(0x1e6)](),{'verbose':_0x190e8d[_0x27391c(0xf9)]}),_0x2d325f=_0x5a8c86[_0x27391c(0xe6)];console[_0x27391c(0x25a)](_0x27391c(0x236)+_0x2d325f['length']+_0x27391c(0xce)+(_0x2d325f['length']!==0x1?'s':''));if(isStructuredFormat(_0x190e8d))await handleSDKOutput(_0x2d325f,_0x190e8d);else{if(_0x2d325f[_0x27391c(0x201)]===0x0)console[_0x27391c(0x1ca)](_0x27391c(0x211));else for(const _0x36c8cb of _0x2d325f){const _0x5ef38e=_0x36c8cb[_0x27391c(0xf7)]?a54_0x5efbd7[_0x27391c(0x191)](_0x27391c(0x18b)):'',_0x2759a5=_0x36c8cb['project']?.[_0x27391c(0xfb)]?a54_0x5efbd7['dim']('\x20['+_0x36c8cb[_0x27391c(0x1ec)][_0x27391c(0xfb)]+']'):'',_0x2749ac=_0x36c8cb[_0x27391c(0x134)]?a54_0x5efbd7[_0x27391c(0x1cd)]('\x20next:\x20'+new Date(_0x36c8cb[_0x27391c(0x134)])[_0x27391c(0x151)]()):'';console[_0x27391c(0x1ca)](_0x27391c(0x24b)+_0x36c8cb['id']+'\x20'+(_0x36c8cb[_0x27391c(0x193)]?.[_0x27391c(0xfb)]||_0x27391c(0x1ac))+_0x2759a5+_0x5ef38e+_0x2749ac);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{['name']='workflow:schedule:enable';['description']=a54_0x43a89d(0xed);async[a54_0x43a89d(0x1a7)](_0x2c9920){const _0xf35718=a54_0x43a89d,{options:_0x21f2dd,args:_0x49f985,tdx:_0xf77b1c}=_0x2c9920,_0x142a36=_0x49f985[0x0];if(!_0x142a36)return console['error'](a54_0x5efbd7[_0xf35718(0xf0)](_0xf35718(0xf5)),_0xf35718(0x277)),console['error'](a54_0x5efbd7[_0xf35718(0x1cd)](_0xf35718(0x152))),console['error'](a54_0x5efbd7['dim'](_0xf35718(0x120))),0x1;const _0x11e2db=await withSpinner(_0xf35718(0x219)+_0x142a36+'...',()=>_0xf77b1c[_0xf35718(0x193)][_0xf35718(0x157)](_0x142a36),{'verbose':_0x21f2dd[_0xf35718(0xf9)]}),_0xd520a=_0x11e2db['data'];return isStructuredFormat(_0x21f2dd)?await handleSingleObjectOutput(_0xd520a,_0x21f2dd):(console['log'](_0xf35718(0x279)+_0x142a36+'\x20enabled\x20('+(_0xd520a['workflow']?.[_0xf35718(0xfb)]||'unknown')+')'),_0xd520a['nextRunTime']&&console[_0xf35718(0x1ca)](a54_0x5efbd7[_0xf35718(0x1cd)](_0xf35718(0x192)+new Date(_0xd520a[_0xf35718(0x134)])['toLocaleString']()))),0x0;}}function a54_0x3318(_0x5300b8,_0x4b1e14){_0x5300b8=_0x5300b8-0xc5;const _0x4f7520=a54_0x4f75();let _0x331885=_0x4f7520[_0x5300b8];return _0x331885;}export class WorkflowScheduleDisableCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0xcc);[a54_0x43a89d(0x1c8)]='Disable\x20a\x20workflow\x20schedule';async[a54_0x43a89d(0x1a7)](_0x3ceba3){const _0x4f9c5c=a54_0x43a89d,{options:_0x464ddd,args:_0x44ecb2,tdx:_0x12eaec}=_0x3ceba3,_0x4377aa=_0x44ecb2[0x0];if(!_0x4377aa)return console[_0x4f9c5c(0x25a)](a54_0x5efbd7[_0x4f9c5c(0xf0)](_0x4f9c5c(0xf5)),_0x4f9c5c(0x277)),console['error'](a54_0x5efbd7[_0x4f9c5c(0x1cd)](_0x4f9c5c(0x1c1))),console[_0x4f9c5c(0x25a)](a54_0x5efbd7['dim'](_0x4f9c5c(0x120))),0x1;const _0xb724fb=await withSpinner('Disabling\x20schedule\x20#'+_0x4377aa+_0x4f9c5c(0x115),()=>_0x12eaec[_0x4f9c5c(0x193)][_0x4f9c5c(0xf8)](_0x4377aa),{'verbose':_0x464ddd[_0x4f9c5c(0xf9)]}),_0x5c41f5=_0xb724fb['data'];return isStructuredFormat(_0x464ddd)?await handleSingleObjectOutput(_0x5c41f5,_0x464ddd):console[_0x4f9c5c(0x1ca)](_0x4f9c5c(0x279)+_0x4377aa+'\x20disabled\x20('+(_0x5c41f5['workflow']?.[_0x4f9c5c(0xfb)]||'unknown')+')'),0x0;}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2812cd,_0x19b157){const _0x20605c=a55_0x35ef,_0x140f8b=_0x2812cd();while(!![]){try{const _0x2618f8=-parseInt(_0x20605c(0x1ac))/0x1+parseInt(_0x20605c(0x1a7))/0x2+-parseInt(_0x20605c(0x1b2))/0x3+parseInt(_0x20605c(0x1b1))/0x4*(-parseInt(_0x20605c(0x1a6))/0x5)+parseInt(_0x20605c(0x1af))/0x6+-parseInt(_0x20605c(0x1ae))/0x7*(parseInt(_0x20605c(0x1aa))/0x8)+-parseInt(_0x20605c(0x1b0))/0x9*(-parseInt(_0x20605c(0x1ab))/0xa);if(_0x2618f8===_0x19b157)break;else _0x140f8b['push'](_0x140f8b['shift']());}catch(_0x219746){_0x140f8b['push'](_0x140f8b['shift']());}}}(a55_0x4260,0xca63c));function a55_0x4260(){const _0x272a23=['1032621knkjee','replace','Bearer\x20','length','Authorization','entries','260230EpchlP','2617620ahCUIn','tdx/','version','8DQlIbw','20662130hKSryF','903194lSgkAV','TD1\x20','8884631gxvfHd','6693666tUVTeC','9DyzXJq','88kIJqHD'];a55_0x4260=function(){return _0x272a23;};return a55_0x4260();}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a55_0x35ef(_0x2c0460,_0x5b275d){_0x2c0460=_0x2c0460-0x1a4;const _0x426012=a55_0x4260();let _0x35efdb=_0x426012[_0x2c0460];return _0x35efdb;}export function getUserAgent(){const _0x2f9837=a55_0x35ef,_0xe67f30=getVersion(),_0x129d14=platform(),_0x2affac=process[_0x2f9837(0x1a9)][_0x2f9837(0x1b3)]('v','');return _0x2f9837(0x1a8)+_0xe67f30+'\x20('+_0x129d14+';\x20node/'+_0x2affac+')';}export function getAuthHeaders(_0x5945f7,_0x1574bd,_0x3bdd05){const _0x38e3c9=a55_0x35ef,_0x4e47ad=getVersion(),_0x1a7794={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x4e47ad};if(_0x3bdd05)_0x1a7794[_0x38e3c9(0x1a4)]=_0x38e3c9(0x1b4)+_0x3bdd05;else _0x1574bd&&(_0x1a7794[_0x38e3c9(0x1a4)]=_0x38e3c9(0x1ad)+_0x1574bd);return _0x1a7794;}export function toHeaderRecord(_0x5abf0b){const _0x42b505=a55_0x35ef,_0x46424c={};for(const [_0x37755a,_0x2129bd]of Object[_0x42b505(0x1a5)](_0x5abf0b)){_0x2129bd!==undefined&&(_0x46424c[_0x37755a]=_0x2129bd);}return _0x46424c;}export function getTrinoHeaders(_0x347c91,_0x5cdab7,_0x2aff94){const _0x317fb8=a55_0x35ef,_0xad1eb4=getAuthHeaders(_0x347c91),_0x48f6fc=toHeaderRecord(_0xad1eb4);if(_0x2aff94)_0x48f6fc[_0x317fb8(0x1a4)]=_0x317fb8(0x1b4)+_0x2aff94;else _0x5cdab7&&(_0x48f6fc['X-Trino-User']=_0x5cdab7);return _0x48f6fc;}export function hasAPIKey(_0x367013){const _0x71f036=a55_0x35ef,_0x38a9d1=getAPIKey();return _0x38a9d1!==undefined&&_0x38a9d1[_0x71f036(0x1b5)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5618e4,_0xaea572){const _0x8981cd=a56_0x3663,_0x277f83=_0x5618e4();while(!![]){try{const _0x3f0e7d=parseInt(_0x8981cd(0x93))/0x1*(parseInt(_0x8981cd(0xc0))/0x2)+-parseInt(_0x8981cd(0xb9))/0x3+parseInt(_0x8981cd(0xb3))/0x4*(-parseInt(_0x8981cd(0xa4))/0x5)+-parseInt(_0x8981cd(0xc1))/0x6+parseInt(_0x8981cd(0x9d))/0x7*(-parseInt(_0x8981cd(0xa0))/0x8)+-parseInt(_0x8981cd(0xb2))/0x9*(parseInt(_0x8981cd(0xbb))/0xa)+parseInt(_0x8981cd(0x91))/0xb;if(_0x3f0e7d===_0xaea572)break;else _0x277f83['push'](_0x277f83['shift']());}catch(_0x44b52b){_0x277f83['push'](_0x277f83['shift']());}}}(a56_0xbfa4,0x67841));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';function a56_0x3663(_0x3aebf4,_0x52ead9){_0x3aebf4=_0x3aebf4-0x8d;const _0xbfa40=a56_0xbfa4();let _0x366382=_0xbfa40[_0x3aebf4];return _0x366382;}import a56_0x5babab from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x35ee6e){const _0x8d2e9a=a56_0x3663;return _0x35ee6e['format']===_0x8d2e9a(0xa3)||_0x35ee6e[_0x8d2e9a(0x9e)]==='jsonl'||_0x35ee6e[_0x8d2e9a(0x9e)]===_0x8d2e9a(0xbe)||_0x35ee6e['format']===_0x8d2e9a(0xb7)||_0x35ee6e['json']===!![]||_0x35ee6e[_0x8d2e9a(0xce)]===!![]||_0x35ee6e[_0x8d2e9a(0xbe)]===!![]||_0x35ee6e[_0x8d2e9a(0xb7)]===!![];}export function parseOutputOptions(_0x42dc04){const _0x20f920=a56_0x3663;return{'format':_0x42dc04[_0x20f920(0x9e)]||_0x20f920(0xb7),'output':_0x42dc04[_0x20f920(0xcb)]||'','limit':_0x42dc04['limit'],'limitStructuredFormats':_0x42dc04[_0x20f920(0xd5)],'color':_0x42dc04[_0x20f920(0xa6)],'noColor':_0x42dc04['noColor']};}function convertSDKResultToQueryResult(_0x4f8f4d){const _0x1af600=a56_0x3663,_0x502e26=[];if(_0x4f8f4d[_0x1af600(0xa9)]>0x0){const _0x3b6af1=_0x4f8f4d[0x0];for(const [_0x10bb11,_0x1b61c2]of Object['entries'](_0x3b6af1)){let _0x9e1028=_0x1af600(0xc2);if(typeof _0x1b61c2==='number')_0x9e1028=Number[_0x1af600(0xd3)](_0x1b61c2)?_0x1af600(0xc8):_0x1af600(0xd7);else{if(typeof _0x1b61c2===_0x1af600(0xac))_0x9e1028='boolean';else _0x1b61c2===null&&(_0x9e1028=_0x1af600(0xc2));}_0x502e26[_0x1af600(0x96)]({'name':_0x10bb11,'type':_0x9e1028});}}return{'queryId':_0x1af600(0x90),'columns':_0x502e26,'data':_0x4f8f4d,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4f8f4d[_0x1af600(0xa9)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x2556c8,_0x59dcb7){const _0x4b06f7=convertSDKResultToQueryResult(_0x2556c8);return formatQueryOutput(_0x4b06f7,_0x59dcb7);}export async function formatQueryOutput(_0x148b1d,_0x73b2f2){const _0x2051b0=a56_0x3663,{format:_0x269399,limit:_0x23c94c,output:_0xb454af,color:_0x8a947e,noColor:_0x509bf0,limitStructuredFormats:_0x59848c}=_0x73b2f2,_0x3356cd=Boolean(_0xb454af)&&!_0x8a947e,_0x534ba2={'color':_0x8a947e,'noColor':_0x509bf0||_0x3356cd};if(_0x269399===_0x2051b0(0xb7)){const _0x120a2c=shouldUseLess(_0x269399,_0xb454af);return formatAsTable(_0x148b1d,_0x23c94c,_0x120a2c,_0x534ba2);}const _0x1a242b=_0x59848c&&Number[_0x2051b0(0xcf)](_0x23c94c)&&_0x148b1d[_0x2051b0(0xad)][_0x2051b0(0xa9)]>_0x23c94c?{..._0x148b1d,'data':_0x148b1d[_0x2051b0(0xad)][_0x2051b0(0xaf)](0x0,_0x23c94c)}:_0x148b1d;if(_0x269399===_0x2051b0(0xa3))return formatAsJSON(_0x1a242b,_0x534ba2);else return _0x269399==='jsonl'?formatAsJSONL(_0x1a242b,_0x534ba2):formatQueryResult(_0x1a242b,_0x269399);}function shouldUseLess(_0x2a5207,_0x1fcf58){const _0x351d6f=a56_0x3663;return(_0x2a5207===_0x351d6f(0xb7)||_0x2a5207===_0x351d6f(0xc6))&&process[_0x351d6f(0xb5)][_0x351d6f(0xa1)]&&!_0x1fcf58;}export function resolveOutputOptions(_0x22fbb5){const _0xf1688d=a56_0x3663,_0x120ddd=_0x22fbb5[_0xf1688d(0xcb)]||'',_0x3ca5dd=resolveOutputFormat(_0x22fbb5['format'],_0x120ddd,_0xf1688d(0xb7));let _0x42237d=typeof _0x22fbb5[_0xf1688d(0xa5)]===_0xf1688d(0xc9)?_0x22fbb5['limit']:parseInt(_0x22fbb5[_0xf1688d(0xa5)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x22fbb5[_0xf1688d(0xa5)]===undefined&&shouldUseLess(_0x3ca5dd,_0x120ddd)&&(_0x42237d=Infinity),{'format':_0x3ca5dd,'output':_0x120ddd,'limit':_0x42237d,'limitStructuredFormats':_0x22fbb5[_0xf1688d(0xd5)],'color':_0x22fbb5[_0xf1688d(0xa6)],'noColor':_0x22fbb5[_0xf1688d(0xa2)]};}export function writeOutput(_0x1f5b70,_0x5da70a,_0xbaf941){const _0x84c103=a56_0x3663;return _0x5da70a?(writeFileSync(_0x5da70a,_0x1f5b70),console[_0x84c103(0xd8)](_0x84c103(0xa7)+_0x5da70a),Promise['resolve']()):shouldUseLess(_0xbaf941||'','')?new Promise(_0x431529=>{const _0x15dc37=_0x84c103,_0x43ac3c=spawn(_0x15dc37(0xd9),[_0x15dc37(0xbd)],{'stdio':['pipe',_0x15dc37(0xd6),_0x15dc37(0xd6)]});let _0x246f93=![];_0x43ac3c['on']('error',()=>{const _0x41bec2=_0x15dc37;!_0x246f93&&(_0x246f93=!![],console[_0x41bec2(0xb8)](_0x1f5b70),_0x431529());}),_0x43ac3c['on'](_0x15dc37(0x9b),()=>{!_0x246f93&&(_0x246f93=!![],_0x431529());}),_0x43ac3c['on'](_0x15dc37(0xc7),()=>{const _0x23bd34=_0x15dc37;!_0x246f93&&_0x43ac3c['stdin']&&(_0x43ac3c[_0x23bd34(0x9c)]['on'](_0x23bd34(0xd8),()=>{}),_0x43ac3c['stdin'][_0x23bd34(0xd1)](_0x1f5b70),_0x43ac3c[_0x23bd34(0x9c)]['end']());}),!_0x43ac3c['stdin']&&(!_0x246f93&&(_0x246f93=!![],console[_0x15dc37(0xb8)](_0x1f5b70),_0x431529()));}):(console[_0x84c103(0xb8)](_0x1f5b70),Promise[_0x84c103(0x8f)]());}export async function handleSDKOutput(_0x15392e,_0x42d06e){const _0x36dd74=a56_0x3663,_0x54347c=resolveOutputOptions(_0x42d06e),_0x55bcdd=await formatSDKOutput(_0x15392e,_0x54347c);await writeOutput(_0x55bcdd,_0x54347c[_0x36dd74(0xcb)]||undefined,_0x54347c[_0x36dd74(0x9e)]);}export async function handleQueryOutput(_0x37cf51,_0x2a360b){const _0x1ecdb8=a56_0x3663,_0x53106b=resolveOutputOptions(_0x2a360b),_0x85350c=await formatQueryOutput(_0x37cf51,_0x53106b);await writeOutput(_0x85350c,_0x53106b[_0x1ecdb8(0xcb)]||undefined,_0x53106b[_0x1ecdb8(0x9e)]);}function a56_0xbfa4(){const _0x3aca5e=['─┴─','table','log','1386558AIGnla','[params]','30TFBnjG','filter','-FXRSn','tsv','cyan','2sGNAvY','4686516PQtptx','varchar','debug','─┬─','cmdout','list','spawn','bigint','number','entries','output','[Object]','blue','jsonl','isFinite','query','write','magenta','isInteger','trim','limitStructuredFormats','inherit','double','error','less','repeat','string','resolve','sdk-result','20269733SSVtIT','object','441293JxVTap','keys','bold','push','rule','[error]','split','forEach','close','stdin','42wmUXHV','format','stderr','81744YuDBJo','isTTY','noColor','json','308110sQEvvE','limit','color','Results\x20saved\x20to\x20','[logs]','length','stringify','map','boolean','data','red','slice','params','padEnd','741915VueuAz','20SkMzzX','max','stdout'];a56_0xbfa4=function(){return _0x3aca5e;};return a56_0xbfa4();}async function formatSingleObject(_0x360309,_0x554280){const _0x357f85=a56_0x3663,{format:_0x4d3b21,color:_0x34b718,noColor:_0x164824}=_0x554280,_0x43e337={'color':_0x34b718,'noColor':_0x164824};if(_0x4d3b21===_0x357f85(0xa3)){if(shouldUseColor(_0x43e337))return colorizeJSON(_0x360309,_0x43e337);return JSON[_0x357f85(0xaa)](_0x360309,null,0x2);}else{if(_0x4d3b21===_0x357f85(0xce)){if(shouldUseColor(_0x43e337))return colorizeJSONCompact(_0x360309,_0x43e337);return JSON[_0x357f85(0xaa)](_0x360309);}else{if(_0x4d3b21===_0x357f85(0xbe))return Object[_0x357f85(0xca)](_0x360309)[_0x357f85(0xab)](([_0x2e29c4,_0x18a687])=>_0x2e29c4+'\x09'+_0x18a687)['join']('\x0a');else{const _0x68fb91=Object[_0x357f85(0xca)](_0x360309);if(_0x68fb91[_0x357f85(0xa9)]===0x0)return'No\x20data';const _0x384523=_0x360309[_0x357f85(0xc3)],_0x1517d3=_0x360309[_0x357f85(0xd0)],_0x47cdcb=_0x360309[_0x357f85(0xb0)],_0xa2a8c9=_0x360309[_0x357f85(0x97)],_0x2f5706=_0x1517d3?typeof _0x1517d3===_0x357f85(0x8e)?_0x1517d3:JSON['stringify'](_0x1517d3,null,0x2):undefined,_0x1be428=_0x47cdcb&&Object[_0x357f85(0x94)](_0x47cdcb)[_0x357f85(0xa9)]>0x0?JSON[_0x357f85(0xaa)](_0x47cdcb,null,0x2):undefined,_0x51ce06=_0xa2a8c9&&Object[_0x357f85(0x94)](_0xa2a8c9)[_0x357f85(0xa9)]>0x0?JSON[_0x357f85(0xaa)](_0xa2a8c9,null,0x2):undefined,_0x71c480=_0x68fb91[_0x357f85(0xbc)](([_0x2f7d15])=>_0x2f7d15!==_0x357f85(0xc3)&&_0x2f7d15!=='query'&&_0x2f7d15!==_0x357f85(0xb0)&&_0x2f7d15!==_0x357f85(0x97)),_0x1eb905=Math[_0x357f85(0xb4)](..._0x71c480['map'](([_0x10df30])=>_0x10df30[_0x357f85(0xa9)])),_0x5b5f7a=Math[_0x357f85(0xb4)](..._0x71c480['map'](([,_0x42a589])=>{const _0x21c939=_0x357f85;try{const _0x10f0d4=_0x42a589===null||_0x42a589===undefined?'':typeof _0x42a589===_0x21c939(0x92)?JSON[_0x21c939(0xaa)](_0x42a589):String(_0x42a589),_0x2f945=_0x10f0d4['split']('\x0a');return Math[_0x21c939(0xb4)](..._0x2f945[_0x21c939(0xab)](_0x4c3b61=>_0x4c3b61[_0x21c939(0xa9)]),0x0);}catch{return 0x0;}}),0x14),_0x5b1fc2=[];_0x5b1fc2['push'](colorBorder('┌─'+'─'[_0x357f85(0x8d)](_0x1eb905)+_0x357f85(0xc4)+'─'[_0x357f85(0x8d)](_0x5b5f7a)+'─┐',_0x43e337)),_0x71c480[_0x357f85(0x9a)](([_0x2b366b,_0x3e5571])=>{const _0x14e35b=_0x357f85;let _0x5e7cbc;try{_0x5e7cbc=_0x3e5571===null||_0x3e5571===undefined?'':typeof _0x3e5571===_0x14e35b(0x92)?JSON[_0x14e35b(0xaa)](_0x3e5571):String(_0x3e5571);}catch{_0x5e7cbc=_0x14e35b(0xcc);}const _0x493e74=_0x2b366b['padEnd'](_0x1eb905),_0x396800=_0x5e7cbc[_0x14e35b(0x99)]('\x0a');_0x396800[_0x14e35b(0x9a)]((_0x10424d,_0x52c106)=>{const _0x48ae22=_0x14e35b,_0x592110=colorBorder('│',_0x43e337);_0x52c106===0x0?_0x5b1fc2[_0x48ae22(0x96)](_0x592110+'\x20'+_0x493e74+'\x20'+_0x592110+'\x20'+_0x10424d[_0x48ae22(0xb1)](_0x5b5f7a)+'\x20'+_0x592110):_0x5b1fc2['push'](_0x592110+'\x20'+'\x20'[_0x48ae22(0x8d)](_0x1eb905)+'\x20'+_0x592110+'\x20'+_0x10424d[_0x48ae22(0xb1)](_0x5b5f7a)+'\x20'+_0x592110);});}),_0x5b1fc2[_0x357f85(0x96)](colorBorder('└─'+'─'[_0x357f85(0x8d)](_0x1eb905)+_0x357f85(0xb6)+'─'[_0x357f85(0x8d)](_0x5b5f7a)+'─┘',_0x43e337));_0x2f5706&&(_0x5b1fc2['push'](''),_0x5b1fc2[_0x357f85(0x96)](String(a56_0x5babab['yellow']['bold']('[query]'))),_0x5b1fc2[_0x357f85(0x96)](_0x2f5706));_0x1be428&&(_0x5b1fc2['push'](''),_0x5b1fc2[_0x357f85(0x96)](String(a56_0x5babab[_0x357f85(0xcd)][_0x357f85(0x95)](_0x357f85(0xba)))),_0x5b1fc2[_0x357f85(0x96)](_0x1be428));_0x51ce06&&(_0x5b1fc2[_0x357f85(0x96)](''),_0x5b1fc2[_0x357f85(0x96)](String(a56_0x5babab[_0x357f85(0xd2)]['bold']('[rule]'))),_0x5b1fc2[_0x357f85(0x96)](_0x51ce06));if(_0x384523){if(_0x384523['stderr']){_0x5b1fc2[_0x357f85(0x96)](''),_0x5b1fc2[_0x357f85(0x96)](String(a56_0x5babab[_0x357f85(0xae)][_0x357f85(0x95)](_0x357f85(0x98))));const _0xf7601e=_0x384523[_0x357f85(0x9f)][_0x357f85(0x99)]('\x0a');_0xf7601e[_0x357f85(0x9a)](_0x1d18d7=>{const _0x22e8f2=_0x357f85;_0x1d18d7[_0x22e8f2(0xd4)]()&&_0x5b1fc2['push'](_0x1d18d7);});}if(_0x384523[_0x357f85(0xc5)]){_0x5b1fc2[_0x357f85(0x96)](''),_0x5b1fc2[_0x357f85(0x96)](String(a56_0x5babab[_0x357f85(0xbf)][_0x357f85(0x95)](_0x357f85(0xa8))));const _0x4b4970=_0x384523['cmdout'][_0x357f85(0x99)]('\x0a');_0x4b4970[_0x357f85(0x9a)](_0x59c3dd=>{const _0x1d4889=_0x357f85;_0x59c3dd['trim']()&&_0x5b1fc2[_0x1d4889(0x96)](_0x59c3dd);});}}return _0x5b1fc2['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x5b91c6,_0x3721c5){const _0x1b5349=a56_0x3663;if(_0x3721c5[_0x1b5349(0x9e)]===_0x1b5349(0xb7)){await handleSDKOutput([_0x5b91c6],_0x3721c5);return;}const _0x4ab00f=resolveOutputOptions(_0x3721c5),_0x58eae8=await formatSingleObject(_0x5b91c6,_0x4ab00f);await writeOutput(_0x58eae8,_0x4ab00f[_0x1b5349(0xcb)]||undefined,_0x4ab00f[_0x1b5349(0x9e)]);}
|
|
1
|
+
(function(_0xf9a2ed,_0x267afa){const _0x412667=a56_0x8171,_0x236bd0=_0xf9a2ed();while(!![]){try{const _0x219c12=-parseInt(_0x412667(0xc0))/0x1+-parseInt(_0x412667(0x9a))/0x2*(parseInt(_0x412667(0x92))/0x3)+-parseInt(_0x412667(0x90))/0x4*(-parseInt(_0x412667(0xba))/0x5)+parseInt(_0x412667(0xa4))/0x6+-parseInt(_0x412667(0xac))/0x7+parseInt(_0x412667(0xc9))/0x8+parseInt(_0x412667(0xc3))/0x9*(parseInt(_0x412667(0x93))/0xa);if(_0x219c12===_0x267afa)break;else _0x236bd0['push'](_0x236bd0['shift']());}catch(_0x2e316c){_0x236bd0['push'](_0x236bd0['shift']());}}}(a56_0x36c2,0x5754e));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 a56_0x1d5f8a from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1336dd){const _0x58eea3=a56_0x8171;return _0x1336dd[_0x58eea3(0xd1)]===_0x58eea3(0xd3)||_0x1336dd[_0x58eea3(0xd1)]===_0x58eea3(0x95)||_0x1336dd[_0x58eea3(0xd1)]===_0x58eea3(0xb9)||_0x1336dd[_0x58eea3(0xd1)]===_0x58eea3(0xa3)||_0x1336dd['json']===!![]||_0x1336dd[_0x58eea3(0x95)]===!![]||_0x1336dd[_0x58eea3(0xb9)]===!![]||_0x1336dd[_0x58eea3(0xa3)]===!![];}export function parseOutputOptions(_0x1cb790){const _0x1f8f66=a56_0x8171;return{'format':_0x1cb790[_0x1f8f66(0xd1)]||_0x1f8f66(0xa3),'output':_0x1cb790[_0x1f8f66(0xdc)]||'','limit':_0x1cb790[_0x1f8f66(0xc2)],'limitStructuredFormats':_0x1cb790['limitStructuredFormats'],'color':_0x1cb790['color'],'noColor':_0x1cb790[_0x1f8f66(0xb3)]};}function a56_0x36c2(){const _0x112683=['tsv','511015zDwpJp','─┴─','blue','color','sdk-result','stringify','273329GwDufn','error','limit','53208ERRVDJ','close','-FXRSn','─┬─','limitStructuredFormats','[query]','3200560sikOyS','[Object]','[rule]','yellow','stderr','list','join','rule','format','max','json','push','varchar','[error]','No\x20data','cmdout','repeat','end','bigint','output','boolean','spawn','12RYgWAX','data','433992fCfsZo','380PxCzHV','write','jsonl','entries','stdin','forEach','pipe','2zTFCCb','string','inherit','stdout','FINISHED','object','query','red','padEnd','table','3295020umfZhE','debug','trim','double','isInteger','isFinite','length','less','4933614JYjCqi','cyan','split','log','number','resolve','map','noColor','isTTY','params','bold','[params]','keys'];a56_0x36c2=function(){return _0x112683;};return a56_0x36c2();}function a56_0x8171(_0x3a0f53,_0x9bef6a){_0x3a0f53=_0x3a0f53-0x8f;const _0x36c23b=a56_0x36c2();let _0x817189=_0x36c23b[_0x3a0f53];return _0x817189;}function convertSDKResultToQueryResult(_0x32163e){const _0x340b2d=a56_0x8171,_0x1382d1=[];if(_0x32163e[_0x340b2d(0xaa)]>0x0){const _0x84833f=_0x32163e[0x0];for(const [_0x79d4c,_0x59c62d]of Object[_0x340b2d(0x96)](_0x84833f)){let _0x330ddc=_0x340b2d(0xd5);if(typeof _0x59c62d===_0x340b2d(0xb0))_0x330ddc=Number[_0x340b2d(0xa8)](_0x59c62d)?_0x340b2d(0xdb):_0x340b2d(0xa7);else{if(typeof _0x59c62d==='boolean')_0x330ddc=_0x340b2d(0xdd);else _0x59c62d===null&&(_0x330ddc='varchar');}_0x1382d1[_0x340b2d(0xd4)]({'name':_0x79d4c,'type':_0x330ddc});}}return{'queryId':_0x340b2d(0xbe),'columns':_0x1382d1,'data':_0x32163e,'stats':{'state':_0x340b2d(0x9e),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x32163e['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x22b054,_0x590536){const _0x2f65a6=convertSDKResultToQueryResult(_0x22b054);return formatQueryOutput(_0x2f65a6,_0x590536);}export async function formatQueryOutput(_0x58791a,_0x5e457a){const _0x3db04d=a56_0x8171,{format:_0x4fdd12,limit:_0x4b6f0e,output:_0x142189,color:_0x119572,noColor:_0x240efb,limitStructuredFormats:_0x5060d1}=_0x5e457a,_0x1d0182=Boolean(_0x142189)&&!_0x119572,_0x59f9e8={'color':_0x119572,'noColor':_0x240efb||_0x1d0182};if(_0x4fdd12==='table'){const _0x40c908=shouldUseLess(_0x4fdd12,_0x142189);return formatAsTable(_0x58791a,_0x4b6f0e,_0x40c908,_0x59f9e8);}const _0x59a2de=_0x5060d1&&Number[_0x3db04d(0xa9)](_0x4b6f0e)&&_0x58791a[_0x3db04d(0x91)][_0x3db04d(0xaa)]>_0x4b6f0e?{..._0x58791a,'data':_0x58791a[_0x3db04d(0x91)]['slice'](0x0,_0x4b6f0e)}:_0x58791a;if(_0x4fdd12===_0x3db04d(0xd3))return formatAsJSON(_0x59a2de,_0x59f9e8);else return _0x4fdd12===_0x3db04d(0x95)?formatAsJSONL(_0x59a2de,_0x59f9e8):formatQueryResult(_0x59a2de,_0x4fdd12);}function shouldUseLess(_0x9098cf,_0x5cbff2){const _0x1677b3=a56_0x8171;return(_0x9098cf===_0x1677b3(0xa3)||_0x9098cf===_0x1677b3(0xce))&&process[_0x1677b3(0x9d)][_0x1677b3(0xb4)]&&!_0x5cbff2;}export function resolveOutputOptions(_0x29e28c){const _0x444aba=a56_0x8171,_0x18a835=_0x29e28c['output']||'',_0x25b457=resolveOutputFormat(_0x29e28c[_0x444aba(0xd1)],_0x18a835,_0x444aba(0xa3));let _0x2d6907=typeof _0x29e28c[_0x444aba(0xc2)]===_0x444aba(0xb0)?_0x29e28c[_0x444aba(0xc2)]:parseInt(_0x29e28c[_0x444aba(0xc2)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x29e28c[_0x444aba(0xc2)]===undefined&&shouldUseLess(_0x25b457,_0x18a835)&&(_0x2d6907=Infinity),{'format':_0x25b457,'output':_0x18a835,'limit':_0x2d6907,'limitStructuredFormats':_0x29e28c[_0x444aba(0xc7)],'color':_0x29e28c[_0x444aba(0xbd)],'noColor':_0x29e28c[_0x444aba(0xb3)]};}export function writeOutput(_0x4cdc03,_0x3d27dd,_0x249b24){const _0x13403b=a56_0x8171;return _0x3d27dd?(writeFileSync(_0x3d27dd,_0x4cdc03),console[_0x13403b(0xc1)]('Results\x20saved\x20to\x20'+_0x3d27dd),Promise[_0x13403b(0xb1)]()):shouldUseLess(_0x249b24||'','')?new Promise(_0x2e1ab5=>{const _0x418a01=_0x13403b,_0x363e7f=spawn(_0x418a01(0xab),[_0x418a01(0xc5)],{'stdio':[_0x418a01(0x99),'inherit',_0x418a01(0x9c)]});let _0xc2d97=![];_0x363e7f['on'](_0x418a01(0xc1),()=>{const _0x5b1531=_0x418a01;!_0xc2d97&&(_0xc2d97=!![],console[_0x5b1531(0xaf)](_0x4cdc03),_0x2e1ab5());}),_0x363e7f['on'](_0x418a01(0xc4),()=>{!_0xc2d97&&(_0xc2d97=!![],_0x2e1ab5());}),_0x363e7f['on'](_0x418a01(0x8f),()=>{const _0x346272=_0x418a01;!_0xc2d97&&_0x363e7f[_0x346272(0x97)]&&(_0x363e7f[_0x346272(0x97)]['on']('error',()=>{}),_0x363e7f[_0x346272(0x97)][_0x346272(0x94)](_0x4cdc03),_0x363e7f[_0x346272(0x97)][_0x346272(0xda)]());}),!_0x363e7f[_0x418a01(0x97)]&&(!_0xc2d97&&(_0xc2d97=!![],console[_0x418a01(0xaf)](_0x4cdc03),_0x2e1ab5()));}):(console[_0x13403b(0xaf)](_0x4cdc03),Promise[_0x13403b(0xb1)]());}export async function handleSDKOutput(_0x4f9bdd,_0x1e3a54){const _0x431d00=a56_0x8171,_0xb9281c=resolveOutputOptions(_0x1e3a54),_0x1445be=await formatSDKOutput(_0x4f9bdd,_0xb9281c);await writeOutput(_0x1445be,_0xb9281c[_0x431d00(0xdc)]||undefined,_0xb9281c[_0x431d00(0xd1)]);}export async function handleQueryOutput(_0x17b53d,_0xa759f1){const _0x11d42b=a56_0x8171,_0x3e7621=resolveOutputOptions(_0xa759f1),_0x508ca6=await formatQueryOutput(_0x17b53d,_0x3e7621);await writeOutput(_0x508ca6,_0x3e7621[_0x11d42b(0xdc)]||undefined,_0x3e7621[_0x11d42b(0xd1)]);}async function formatSingleObject(_0x3137ec,_0x4df114){const _0x1b2512=a56_0x8171,{format:_0xbc14c8,color:_0x2c5cba,noColor:_0x1b7cf6}=_0x4df114,_0x4b2d6e={'color':_0x2c5cba,'noColor':_0x1b7cf6};if(_0xbc14c8===_0x1b2512(0xd3)){if(shouldUseColor(_0x4b2d6e))return colorizeJSON(_0x3137ec,_0x4b2d6e);return JSON[_0x1b2512(0xbf)](_0x3137ec,null,0x2);}else{if(_0xbc14c8==='jsonl'){if(shouldUseColor(_0x4b2d6e))return colorizeJSONCompact(_0x3137ec,_0x4b2d6e);return JSON[_0x1b2512(0xbf)](_0x3137ec);}else{if(_0xbc14c8===_0x1b2512(0xb9))return Object[_0x1b2512(0x96)](_0x3137ec)[_0x1b2512(0xb2)](([_0x1853e3,_0x10ceca])=>_0x1853e3+'\x09'+_0x10ceca)[_0x1b2512(0xcf)]('\x0a');else{const _0x3e371c=Object[_0x1b2512(0x96)](_0x3137ec);if(_0x3e371c['length']===0x0)return _0x1b2512(0xd7);const _0x165352=_0x3137ec['debug'],_0x169be5=_0x3137ec[_0x1b2512(0xa0)],_0x2d83b4=_0x3137ec[_0x1b2512(0xb5)],_0x26ffaf=_0x3137ec[_0x1b2512(0xd0)],_0x3198c6=_0x169be5?typeof _0x169be5===_0x1b2512(0x9b)?_0x169be5:JSON[_0x1b2512(0xbf)](_0x169be5,null,0x2):undefined,_0x353238=_0x2d83b4&&Object[_0x1b2512(0xb8)](_0x2d83b4)['length']>0x0?JSON[_0x1b2512(0xbf)](_0x2d83b4,null,0x2):undefined,_0x1d73a9=_0x26ffaf&&Object['keys'](_0x26ffaf)[_0x1b2512(0xaa)]>0x0?JSON[_0x1b2512(0xbf)](_0x26ffaf,null,0x2):undefined,_0x1834cd=_0x3e371c['filter'](([_0x16f9a3])=>_0x16f9a3!==_0x1b2512(0xa5)&&_0x16f9a3!==_0x1b2512(0xa0)&&_0x16f9a3!==_0x1b2512(0xb5)&&_0x16f9a3!==_0x1b2512(0xd0)),_0xed48ac=Math[_0x1b2512(0xd2)](..._0x1834cd[_0x1b2512(0xb2)](([_0x3f244e])=>_0x3f244e['length'])),_0x4dc00b=Math[_0x1b2512(0xd2)](..._0x1834cd['map'](([,_0x21d572])=>{const _0x3f129a=_0x1b2512;try{const _0x37a3c4=_0x21d572===null||_0x21d572===undefined?'':typeof _0x21d572===_0x3f129a(0x9f)?JSON[_0x3f129a(0xbf)](_0x21d572):String(_0x21d572),_0x11fba7=_0x37a3c4[_0x3f129a(0xae)]('\x0a');return Math[_0x3f129a(0xd2)](..._0x11fba7[_0x3f129a(0xb2)](_0x222f32=>_0x222f32[_0x3f129a(0xaa)]),0x0);}catch{return 0x0;}}),0x14),_0x57da52=[];_0x57da52[_0x1b2512(0xd4)](colorBorder('┌─'+'─'[_0x1b2512(0xd9)](_0xed48ac)+_0x1b2512(0xc6)+'─'[_0x1b2512(0xd9)](_0x4dc00b)+'─┐',_0x4b2d6e)),_0x1834cd[_0x1b2512(0x98)](([_0x43fdbc,_0x4618ad])=>{const _0x1181bc=_0x1b2512;let _0x3c843d;try{_0x3c843d=_0x4618ad===null||_0x4618ad===undefined?'':typeof _0x4618ad==='object'?JSON[_0x1181bc(0xbf)](_0x4618ad):String(_0x4618ad);}catch{_0x3c843d=_0x1181bc(0xca);}const _0x315ca5=_0x43fdbc['padEnd'](_0xed48ac),_0xac83e3=_0x3c843d[_0x1181bc(0xae)]('\x0a');_0xac83e3[_0x1181bc(0x98)]((_0x1fd424,_0x5dfb0b)=>{const _0x47f8c4=_0x1181bc,_0x458e62=colorBorder('│',_0x4b2d6e);_0x5dfb0b===0x0?_0x57da52[_0x47f8c4(0xd4)](_0x458e62+'\x20'+_0x315ca5+'\x20'+_0x458e62+'\x20'+_0x1fd424['padEnd'](_0x4dc00b)+'\x20'+_0x458e62):_0x57da52[_0x47f8c4(0xd4)](_0x458e62+'\x20'+'\x20'['repeat'](_0xed48ac)+'\x20'+_0x458e62+'\x20'+_0x1fd424[_0x47f8c4(0xa2)](_0x4dc00b)+'\x20'+_0x458e62);});}),_0x57da52[_0x1b2512(0xd4)](colorBorder('└─'+'─'[_0x1b2512(0xd9)](_0xed48ac)+_0x1b2512(0xbb)+'─'[_0x1b2512(0xd9)](_0x4dc00b)+'─┘',_0x4b2d6e));_0x3198c6&&(_0x57da52[_0x1b2512(0xd4)](''),_0x57da52[_0x1b2512(0xd4)](String(a56_0x1d5f8a[_0x1b2512(0xcc)][_0x1b2512(0xb6)](_0x1b2512(0xc8)))),_0x57da52[_0x1b2512(0xd4)](_0x3198c6));_0x353238&&(_0x57da52[_0x1b2512(0xd4)](''),_0x57da52[_0x1b2512(0xd4)](String(a56_0x1d5f8a[_0x1b2512(0xbc)][_0x1b2512(0xb6)](_0x1b2512(0xb7)))),_0x57da52[_0x1b2512(0xd4)](_0x353238));_0x1d73a9&&(_0x57da52[_0x1b2512(0xd4)](''),_0x57da52[_0x1b2512(0xd4)](String(a56_0x1d5f8a['magenta']['bold'](_0x1b2512(0xcb)))),_0x57da52[_0x1b2512(0xd4)](_0x1d73a9));if(_0x165352){if(_0x165352['stderr']){_0x57da52[_0x1b2512(0xd4)](''),_0x57da52['push'](String(a56_0x1d5f8a[_0x1b2512(0xa1)][_0x1b2512(0xb6)](_0x1b2512(0xd6))));const _0x3dd95b=_0x165352[_0x1b2512(0xcd)]['split']('\x0a');_0x3dd95b['forEach'](_0x163ef9=>{const _0x31039b=_0x1b2512;_0x163ef9[_0x31039b(0xa6)]()&&_0x57da52[_0x31039b(0xd4)](_0x163ef9);});}if(_0x165352[_0x1b2512(0xd8)]){_0x57da52['push'](''),_0x57da52['push'](String(a56_0x1d5f8a[_0x1b2512(0xad)][_0x1b2512(0xb6)]('[logs]')));const _0x196666=_0x165352[_0x1b2512(0xd8)][_0x1b2512(0xae)]('\x0a');_0x196666[_0x1b2512(0x98)](_0x117a4d=>{const _0x528a1d=_0x1b2512;_0x117a4d[_0x528a1d(0xa6)]()&&_0x57da52[_0x528a1d(0xd4)](_0x117a4d);});}}return _0x57da52[_0x1b2512(0xcf)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x2eee04,_0x43e57e){const _0x10f3a5=a56_0x8171;if(_0x43e57e['format']===_0x10f3a5(0xa3)){await handleSDKOutput([_0x2eee04],_0x43e57e);return;}const _0x20bcee=resolveOutputOptions(_0x43e57e),_0x24cd18=await formatSingleObject(_0x2eee04,_0x20bcee);await writeOutput(_0x24cd18,_0x20bcee[_0x10f3a5(0xdc)]||undefined,_0x20bcee['format']);}
|