@treasuredata/tdx 0.29.2 → 0.29.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.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/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.d.ts +17 -0
- package/dist/utils/github-releases.d.ts.map +1 -0
- package/dist/utils/github-releases.js +1 -0
- package/dist/utils/github-releases.js.map +1 -0
- 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 a47_0x3f412b=a47_0x4c19;(function(_0xfa0699,_0xa7a5c7){const _0x4d5282=a47_0x4c19,_0x1fcc67=_0xfa0699();while(!![]){try{const _0x35f2f2=-parseInt(_0x4d5282(0x117))/0x1+parseInt(_0x4d5282(0x183))/0x2*(-parseInt(_0x4d5282(0x1ab))/0x3)+parseInt(_0x4d5282(0x286))/0x4+parseInt(_0x4d5282(0x13e))/0x5*(-parseInt(_0x4d5282(0x1e9))/0x6)+-parseInt(_0x4d5282(0x225))/0x7+parseInt(_0x4d5282(0x197))/0x8+parseInt(_0x4d5282(0x28b))/0x9;if(_0x35f2f2===_0xa7a5c7)break;else _0x1fcc67['push'](_0x1fcc67['shift']());}catch(_0x221563){_0x1fcc67['push'](_0x1fcc67['shift']());}}}(a47_0x3e77,0x9ab9e));import a47_0x2874bf from'chalk';import{existsSync}from'fs';import a47_0x19d684 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a47_0x5ff89f from'prompts';function getAttemptStatusDisplay(_0x27edec){const _0x37bba6=a47_0x4c19;if(!_0x27edec)return{'icon':'⏳','text':''};const {done:_0x2427e2,success:_0x3c368f,cancelRequested:_0x3d1d4e}=_0x27edec;if(!_0x2427e2)return _0x3d1d4e?{'icon':'🛑','text':a47_0x2874bf[_0x37bba6(0x23d)](_0x37bba6(0x283))}:{'icon':'🔄','text':a47_0x2874bf[_0x37bba6(0x147)](_0x37bba6(0x1e3))};if(_0x3c368f)return{'icon':'✅','text':a47_0x2874bf[_0x37bba6(0x11b)](_0x37bba6(0x137))};return{'icon':'❌','text':a47_0x2874bf[_0x37bba6(0x148)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a47_0x3f412b(0x10e)](_0x2b4e25,_0x506f01,_0x59088a=0x0){const _0x31e0aa=a47_0x3f412b;return _0x2b4e25[_0x59088a]||_0x506f01[_0x31e0aa(0x144)];}[a47_0x3f412b(0xf6)](_0x1c8366,_0x10c594,_0x9cfa89=0x0){const _0x472f6c=a47_0x3f412b,_0x32d0a6=this[_0x472f6c(0x10e)](_0x1c8366,_0x10c594,_0x9cfa89);if(!_0x32d0a6)return console['error'](a47_0x2874bf[_0x472f6c(0x148)](_0x472f6c(0x133)),'Project\x20name\x20is\x20required'),console['error'](a47_0x2874bf[_0x472f6c(0x297)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x32d0a6;}[a47_0x3f412b(0x263)](_0x39bf0e,_0x4b6602){const _0x2a32d4=a47_0x3f412b;if(_0x39bf0e[0x0]){const _0x38b9b5=_0x39bf0e[0x0]['split']('.');if(_0x38b9b5[_0x2a32d4(0x25d)]===0x1)return{'projectName':_0x38b9b5[0x0],'workflowName':undefined};else return _0x38b9b5[_0x2a32d4(0x25d)]===0x2?{'projectName':_0x38b9b5[0x0],'workflowName':_0x38b9b5[0x1]}:(console[_0x2a32d4(0x1a3)](a47_0x2874bf[_0x2a32d4(0x148)](_0x2a32d4(0x133)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x4b6602['workflowProject'],'workflowName':undefined};}[a47_0x3f412b(0x1ce)](_0x1ad84d,_0x38ff65,_0x270f2a=0x0){const _0x454a17=a47_0x3f412b;if(_0x1ad84d[_0x270f2a])return _0x1ad84d[_0x270f2a];if(_0x38ff65['workflowProject']){const _0xa11a55=a47_0x19d684[_0x454a17(0x1b4)](process[_0x454a17(0x22e)](),_0x454a17(0x125),_0x38ff65[_0x454a17(0x144)]);if(existsSync(a47_0x19d684[_0x454a17(0x1b4)](_0xa11a55,_0x454a17(0x22b))))return _0xa11a55;}return undefined;}async[a47_0x3f412b(0x1fc)](_0x30fbcb,_0x4b34ba,_0x5b3ed5){const _0x596a95=a47_0x3f412b;try{const _0x45b14a=await _0x30fbcb[_0x596a95(0x184)][_0x596a95(0x125)](_0x4b34ba,{'limit':0x1});if(_0x45b14a[_0x596a95(0x25d)]>0x0){const _0x56aa5b=_0x45b14a[0x0]['id'],_0x2a1ff4=getWorkflowUrl(_0x5b3ed5,_0x56aa5b);console[_0x596a95(0x1a3)](_0x596a95(0xf7)+a47_0x2874bf['cyan'](_0x2a1ff4));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x24d);[a47_0x3f412b(0xf3)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a47_0x3f412b(0x207)](_0x2d1cd5){const _0x2d711d=a47_0x3f412b,{options:_0x3a7c6b,args:_0x4957ce,tdx:_0x227360}=_0x2d1cd5,_0x4fc619=_0x4957ce[0x0],_0x17d24d=_0x3a7c6b[_0x2d711d(0x14d)];if(_0x17d24d)return saveSessionContext({'workflow_project':undefined},_0x3a7c6b[_0x2d711d(0x1cc)]),console[_0x2d711d(0x104)](a47_0x2874bf['green'](_0x2d711d(0x10d))),0x0;if(!_0x4fc619)return console[_0x2d711d(0x1a3)](a47_0x2874bf[_0x2d711d(0x148)]('Error:'),'Project\x20name\x20is\x20required'),console[_0x2d711d(0x1a3)](a47_0x2874bf[_0x2d711d(0x297)](_0x2d711d(0x1d8))),console[_0x2d711d(0x1a3)](a47_0x2874bf[_0x2d711d(0x297)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x5ce145=await withSpinner(_0x2d711d(0x1bd)+_0x4fc619+_0x2d711d(0x1b9),()=>_0x227360['workflow'][_0x2d711d(0x195)](_0x4fc619),{'verbose':_0x3a7c6b[_0x2d711d(0x1aa)]}),{name:_0x4f1e45}=_0x5ce145[_0x2d711d(0x276)];return saveSessionContext({'workflow_project':_0x4f1e45},_0x3a7c6b[_0x2d711d(0x1cc)]),console[_0x2d711d(0x104)](a47_0x2874bf['green'](_0x2d711d(0x174)+a47_0x2874bf['cyan'](_0x4f1e45))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a47_0x3f412b(0x200);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x212);async[a47_0x3f412b(0x207)](_0x3090f9){const _0x527d9a=a47_0x3f412b,{options:_0x40fb14,args:_0x36bdfa,tdx:_0x4f803f}=_0x3090f9,_0xc19dba=_0x36bdfa[0x0];_0x40fb14[_0x527d9a(0x1aa)]&&_0xc19dba&&console['error'](_0x527d9a(0x11c)+_0xc19dba);const _0x296fe8=await withSpinner(_0x527d9a(0x180),()=>_0x4f803f[_0x527d9a(0x184)]['projects'](_0xc19dba,{'limit':_0x40fb14[_0x527d9a(0x1f8)]}),{'verbose':_0x40fb14[_0x527d9a(0x1aa)]});let _0xa44ed1=_0x296fe8[_0x527d9a(0x276)];_0xa44ed1['sort']((_0x279fd9,_0x1f65a0)=>_0x279fd9['name']['localeCompare'](_0x1f65a0[_0x527d9a(0x280)]));const _0x40d1a3=_0x40fb14['limit']||0x64,_0x2c64ce=_0xa44ed1[_0x527d9a(0x25d)]>=_0x40d1a3?a47_0x2874bf['dim'](_0x527d9a(0x187)):'';console[_0x527d9a(0x1a3)](_0x527d9a(0x1db)+_0xa44ed1[_0x527d9a(0x25d)]+'\x20project'+(_0xa44ed1['length']!==0x1?'s':'')+_0x2c64ce);if(_0x40fb14[_0x527d9a(0x281)]===_0x527d9a(0x1a8)||_0x40fb14[_0x527d9a(0x281)]===_0x527d9a(0x13d)||_0x40fb14[_0x527d9a(0x281)]===_0x527d9a(0x1e0))await handleSDKOutput(_0xa44ed1,_0x40fb14);else{if(_0xa44ed1[_0x527d9a(0x25d)]===0x0)_0xc19dba?console[_0x527d9a(0x104)](_0x527d9a(0x16b)+_0xc19dba):console[_0x527d9a(0x104)]('No\x20workflow\x20projects\x20found');else{const _0x541d35=_0xa44ed1[_0x527d9a(0x11e)](_0x1351f1=>{const _0x1e8d6a=_0x527d9a,_0x3e9a00=_0x1351f1['metadata']?.[_0x1e8d6a(0x273)](_0x194ec4=>_0x194ec4['key']===_0x1e8d6a(0x16c)),_0x5e92ad=_0x3e9a00?a47_0x2874bf[_0x1e8d6a(0x297)](_0x1e8d6a(0x236)):'';return _0x1e8d6a(0x264)+_0x1351f1[_0x1e8d6a(0x280)]+_0x5e92ad;});await writeOutput(_0x541d35[_0x527d9a(0x1b4)]('\x0a'),_0x40fb14['output'],_0x527d9a(0x288));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x169);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x210);async[a47_0x3f412b(0x207)](_0x26e9e7){const _0x489524=a47_0x3f412b,{options:_0x1965c7,args:_0x5f2b67,tdx:_0x2b2300}=_0x26e9e7,_0x2cad4c=this[_0x489524(0x10e)](_0x5f2b67,_0x1965c7);_0x1965c7[_0x489524(0x1aa)]&&_0x2cad4c&&console[_0x489524(0x1a3)](_0x489524(0x134)+_0x2cad4c);const _0x53b883=await withSpinner(_0x489524(0x21a),()=>_0x2b2300['workflow'][_0x489524(0x125)](_0x2cad4c,{'limit':_0x1965c7[_0x489524(0x1f8)]}),{'verbose':_0x1965c7['verbose']});let _0x2f5ccf=_0x53b883[_0x489524(0x276)];_0x2f5ccf[_0x489524(0x298)]((_0x1665b7,_0x48ab28)=>{const _0x3f84a4=_0x489524,_0x24b86c=_0x1665b7[_0x3f84a4(0x280)]['localeCompare'](_0x48ab28[_0x3f84a4(0x280)]);if(_0x24b86c!==0x0)return _0x24b86c;return(_0x1665b7[_0x3f84a4(0x1d2)]?.['name']||'')[_0x3f84a4(0x15c)](_0x48ab28['project']?.['name']||'');});const _0x5ab667=_0x1965c7[_0x489524(0x1f8)]||0x64,_0x38ef69=_0x2f5ccf[_0x489524(0x25d)]>=_0x5ab667?a47_0x2874bf[_0x489524(0x297)](_0x489524(0x187)):'';console[_0x489524(0x1a3)]('✔\x20Found\x20'+_0x2f5ccf[_0x489524(0x25d)]+_0x489524(0x108)+(_0x2f5ccf['length']!==0x1?'s':'')+_0x38ef69);if(_0x1965c7['format']==='json'||_0x1965c7[_0x489524(0x281)]===_0x489524(0x13d)||_0x1965c7[_0x489524(0x281)]==='table')await handleSDKOutput(_0x2f5ccf,_0x1965c7);else{if(_0x2f5ccf[_0x489524(0x25d)]===0x0)_0x2cad4c?console['log'](_0x489524(0x18f)+_0x2cad4c):console['log'](_0x489524(0x24a));else{const _0x3848de=_0x1965c7[_0x489524(0x1dd)],_0x49d9e7=_0x2f5ccf[_0x489524(0x11e)](_0x217af1=>{const _0x566cc4=_0x489524,_0x31ade7=a47_0x2874bf['dim']('#'+_0x217af1['id']),_0x4e94d5=hyperlink(_0x31ade7,getWorkflowUrl(_0x3848de,_0x217af1['id'])),_0x46cdda=_0x217af1[_0x566cc4(0x1d2)]?.[_0x566cc4(0x280)]?a47_0x2874bf[_0x566cc4(0x297)]('\x20('+_0x217af1[_0x566cc4(0x1d2)][_0x566cc4(0x280)]+')'):'';return _0x566cc4(0x27d)+_0x4e94d5+'\x20'+_0x217af1[_0x566cc4(0x280)]+_0x46cdda;});await writeOutput(_0x49d9e7[_0x489524(0x1b4)]('\x0a'),_0x1965c7[_0x489524(0x220)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a47_0x3f412b(0x274);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x1d1);async['execute'](_0x228b5e){const _0x20fa10=a47_0x3f412b,{options:_0xfb6934,args:_0x332a2e,tdx:_0x4c69e7}=_0x228b5e,_0x5f5161=this[_0x20fa10(0x263)](_0x332a2e,_0xfb6934);if(!_0x5f5161)return 0x1;const {projectName:_0x5b8e82,workflowName:_0x4ce1c4}=_0x5f5161;if(_0xfb6934[_0x20fa10(0x1aa)]){if(_0x5b8e82&&_0x4ce1c4)console[_0x20fa10(0x1a3)](_0x20fa10(0x216)+_0x5b8e82+'.'+_0x4ce1c4);else _0x5b8e82&&console[_0x20fa10(0x1a3)](_0x20fa10(0x250)+_0x5b8e82);const _0x490790=_0xfb6934[_0x20fa10(0xec)];_0x490790&&console[_0x20fa10(0x1a3)]('Status:\x20'+_0x490790);}let _0xf2b76a=0x28;if(process[_0x20fa10(0x243)][_0x20fa10(0x232)]&&!_0xfb6934[_0x20fa10(0x220)]&&!_0xfb6934[_0x20fa10(0x281)]){const _0x3c0198=process[_0x20fa10(0x243)][_0x20fa10(0x143)]||0x28;_0xf2b76a=Math[_0x20fa10(0x12b)](0x14,Math[_0x20fa10(0x21d)](_0x3c0198*0x2/0x3));}const _0x427c46=_0xfb6934[_0x20fa10(0x1f8)]||_0xf2b76a,_0x273b04=await withSpinner(_0x20fa10(0x272),()=>_0x4c69e7[_0x20fa10(0x184)]['sessions']({'projectName':_0x5b8e82,'workflowName':_0x4ce1c4,'status':_0xfb6934[_0x20fa10(0xec)],'fromTime':_0xfb6934[_0x20fa10(0x24c)],'toTime':_0xfb6934['to'],'limit':_0x427c46}),{'verbose':_0xfb6934[_0x20fa10(0x1aa)]}),_0x499cf8=_0x273b04['data'];_0x499cf8[_0x20fa10(0x298)]((_0x4b203b,_0xb9117e)=>{const _0x33cd27=_0x20fa10,_0x18de4d=_0x4b203b[_0x33cd27(0x122)]||'',_0x56baea=_0xb9117e['sessionTime']||'';return _0x56baea[_0x33cd27(0x15c)](_0x18de4d);});_0x499cf8[_0x20fa10(0x25d)]>=_0x427c46?console['error'](_0x20fa10(0x132)+_0x499cf8[_0x20fa10(0x25d)]+_0x20fa10(0xf2)+a47_0x2874bf[_0x20fa10(0x297)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x20fa10(0x1a3)](_0x20fa10(0x1db)+_0x499cf8[_0x20fa10(0x25d)]+_0x20fa10(0x268)+(_0x499cf8[_0x20fa10(0x25d)]!==0x1?'s':''));if(_0xfb6934[_0x20fa10(0x281)]===_0x20fa10(0x1a8)||_0xfb6934[_0x20fa10(0x281)]==='jsonl'||_0xfb6934[_0x20fa10(0x281)]===_0x20fa10(0x1e0))await handleSDKOutput(_0x499cf8,_0xfb6934);else{if(!process[_0x20fa10(0x243)][_0x20fa10(0x232)]||_0xfb6934['output']){if(_0x499cf8[_0x20fa10(0x25d)]===0x0){if(_0x5b8e82&&_0x4ce1c4)console['log'](_0x20fa10(0x142)+_0x5b8e82+'.'+_0x4ce1c4);else _0x5b8e82?console[_0x20fa10(0x104)](_0x20fa10(0x21b)+_0x5b8e82):console[_0x20fa10(0x104)](_0x20fa10(0x269));}else{const _0xb6745f=_0xfb6934['site'],_0x1c4ef9=this[_0x20fa10(0x1cd)](_0x499cf8,_0xb6745f);_0xfb6934[_0x20fa10(0x220)]?await writeOutput(_0x1c4ef9,_0xfb6934[_0x20fa10(0x220)],'list'):console[_0x20fa10(0x104)](_0x1c4ef9);}!_0x5b8e82&&(console[_0x20fa10(0x1a3)](''),console[_0x20fa10(0x1a3)](a47_0x2874bf[_0x20fa10(0x297)](_0x20fa10(0x196))),console[_0x20fa10(0x1a3)](a47_0x2874bf['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a47_0x2874bf[_0x20fa10(0x297)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x499cf8[_0x20fa10(0x25d)]===0x0){if(_0x5b8e82&&_0x4ce1c4)console[_0x20fa10(0x104)](_0x20fa10(0x142)+_0x5b8e82+'.'+_0x4ce1c4);else _0x5b8e82?console[_0x20fa10(0x104)](_0x20fa10(0x21b)+_0x5b8e82):console[_0x20fa10(0x104)](_0x20fa10(0x269));}else await this[_0x20fa10(0x284)](_0x499cf8,_0x228b5e,_0x5b8e82);}}return 0x0;}[a47_0x3f412b(0x1cd)](_0x8cbbe,_0x2dcabe){const _0x1afc12=a47_0x3f412b,_0x1f5f7a=[],_0xb76d03=new Map();let _0x367889=Infinity,_0x5c3007=-Infinity;for(const _0x1367a6 of _0x8cbbe){if(_0x1367a6[_0x1afc12(0x202)]?.[_0x1afc12(0x194)]){const _0x17ffac=new Date(_0x1367a6[_0x1afc12(0x202)][_0x1afc12(0x194)])[_0x1afc12(0x241)](),_0x207b14=_0x1367a6[_0x1afc12(0x202)][_0x1afc12(0x27b)]?new Date(_0x1367a6[_0x1afc12(0x202)][_0x1afc12(0x27b)])[_0x1afc12(0x241)]():Date[_0x1afc12(0xf4)](),_0x14a89e=_0x1367a6[_0x1afc12(0x1d2)]?.[_0x1afc12(0x280)]||_0x1afc12(0x199);!_0xb76d03[_0x1afc12(0x266)](_0x14a89e)&&_0xb76d03['set'](_0x14a89e,[]),_0xb76d03[_0x1afc12(0x252)](_0x14a89e)['push']({'session':_0x1367a6,'startTime':_0x17ffac,'endTime':_0x207b14,'duration':_0x207b14-_0x17ffac}),_0x367889=Math[_0x1afc12(0x146)](_0x367889,_0x17ffac),_0x5c3007=Math[_0x1afc12(0x12b)](_0x5c3007,_0x207b14);}}if(_0xb76d03[_0x1afc12(0x1b2)]===0x0)return _0x1afc12(0x251);const _0x66fad0=process[_0x1afc12(0x243)][_0x1afc12(0x221)]||0x78,_0x78dba2=0x1e,_0x45a9ae=0x32,_0x350d5f=0x4,_0x5a0212=Math[_0x1afc12(0x146)](_0x45a9ae,Math['max'](_0x78dba2,Math[_0x1afc12(0x21d)](_0x66fad0*0.3))),_0x2ce053=_0x66fad0-_0x5a0212-TIMELINE_CONFIG[_0x1afc12(0x138)]-0x3-_0x350d5f,_0x3a68a4=_0x5c3007-_0x367889,_0x28631b=_0x3a68a4/_0x5a0212,_0x564236=renderTimeAxis({'startTime':_0x367889,'endTime':_0x5c3007,'durationMs':_0x3a68a4,'msPerChar':_0x28631b},_0x5a0212),_0x3f99c5=[];for(const _0x552f47 of _0xb76d03[_0x1afc12(0x1ed)]()){_0x3f99c5[_0x1afc12(0x119)](..._0x552f47);}_0x3f99c5[_0x1afc12(0x298)]((_0x758188,_0x59e35d)=>_0x59e35d['startTime']-_0x758188[_0x1afc12(0x233)]);const _0x3781e6=new Date(_0x367889),_0x400c0f=formatDate(_0x3781e6),_0x493477=_0x350d5f+TIMELINE_CONFIG[_0x1afc12(0x279)]+TIMELINE_CONFIG['ICON_SPACING']+_0x2ce053,_0x32ea58='\x20'['repeat'](_0x493477-_0x400c0f[_0x1afc12(0x25d)]),_0x30561f=_0x32ea58+a47_0x2874bf[_0x1afc12(0x297)](_0x400c0f)+'\x20'+_0x564236;_0x1f5f7a[_0x1afc12(0x119)](_0x30561f);const _0x4111d0=0x16;let _0x437c6c=0x0;for(const _0x10fc6c of _0x3f99c5){const _0x7770a3=_0x10fc6c[_0x1afc12(0x1cc)][_0x1afc12(0x1d2)]?.[_0x1afc12(0x280)]||'?',_0x282366=Math['min'](stringWidth(_0x7770a3),_0x4111d0);_0x437c6c=Math[_0x1afc12(0x12b)](_0x437c6c,_0x282366);}for(const _0x145b03 of _0x3f99c5){const {session:_0x503794,startTime:_0x224448,endTime:_0x4e5fc5,duration:_0x1e6277}=_0x145b03,_0x40fe8f=_0x503794[_0x1afc12(0x1d2)]?.['id'],_0x11242a=_0x503794['id'],_0x521021=_0x503794[_0x1afc12(0x1d2)]?.[_0x1afc12(0x280)]||'?',_0x5984a0=_0x503794[_0x1afc12(0x184)]?.['name']||'?';let _0x45553c,_0x7f172;if(_0x503794[_0x1afc12(0x202)]){const _0x210ca8=_0x503794['lastAttempt'];!_0x210ca8[_0x1afc12(0x237)]?(_0x45553c=_0x210ca8[_0x1afc12(0x214)]?'🛑':'🔄',_0x7f172=_0x210ca8[_0x1afc12(0x214)]?a47_0x2874bf[_0x1afc12(0x23d)]:a47_0x2874bf[_0x1afc12(0x147)]):(_0x45553c=_0x210ca8[_0x1afc12(0x137)]?'✅':'❌',_0x7f172=_0x210ca8[_0x1afc12(0x137)]?a47_0x2874bf['green']:a47_0x2874bf[_0x1afc12(0x148)]);}else _0x45553c='⏳',_0x7f172=a47_0x2874bf['dim'];const _0x374f8d='#'+_0x11242a,_0x35a39b=_0x40fe8f?hyperlink(_0x374f8d,getWorkflowSessionUrl(_0x2dcabe,_0x40fe8f,_0x11242a)):_0x374f8d;let _0x5aa9c0=_0x521021;stringWidth(_0x521021)>_0x4111d0&&(_0x5aa9c0=_0x521021['slice'](0x0,_0x4111d0-0x1)+'…');const _0x3f5f20=a47_0x2874bf[_0x1afc12(0x297)](_0x5aa9c0),_0x36b6fa=stringWidth(_0x5aa9c0),_0x3642eb='\x20'[_0x1afc12(0x157)](_0x437c6c-stringWidth(_0x5aa9c0)+0x2),_0x2d219f='('+formatElapsed(_0x1e6277)+')',_0x995459=stringWidth(_0x2d219f),_0x29fa0f=stringWidth(_0x374f8d),_0x24e3a6=_0x29fa0f+0x1+_0x36b6fa+_0x3642eb[_0x1afc12(0x25d)],_0x1488b0=_0x2ce053-_0x24e3a6-_0x995459-0x1-0x8;let _0x34b4d7=_0x5984a0;stringWidth(_0x34b4d7)>_0x1488b0&&(_0x34b4d7=_0x34b4d7[_0x1afc12(0x23e)](0x0,_0x1488b0-0x1)+'…');const _0x3740c2=_0x35a39b+'\x20'+_0x3f5f20+_0x3642eb+_0x34b4d7,_0x112fa4=stringWidth(_0x3740c2),_0x38afbb=_0x2ce053-_0x112fa4-_0x995459,_0x51e4bb=_0x3740c2+'\x20'[_0x1afc12(0x157)](Math[_0x1afc12(0x12b)](0x1,_0x38afbb))+a47_0x2874bf[_0x1afc12(0x297)](_0x2d219f),_0x4417f0=Math[_0x1afc12(0x21d)]((_0x224448-_0x367889)/_0x28631b),_0xb7836e=Math[_0x1afc12(0x21d)]((_0x4e5fc5-_0x367889)/_0x28631b),_0x243686=Math[_0x1afc12(0x12b)](_0x4417f0+0x1,_0xb7836e),_0x2a3ff8=new Array(_0x5a0212)[_0x1afc12(0x11a)]('\x20');for(let _0x1c30a6=_0x4417f0;_0x1c30a6<Math[_0x1afc12(0x146)](_0x243686,_0x5a0212);_0x1c30a6++){_0x2a3ff8[_0x1c30a6]='─';}const _0x4d85e0=_0x2a3ff8[_0x1afc12(0x11e)](_0x586cb9=>_0x586cb9==='\x20'?'\x20':_0x7f172(_0x586cb9))['join']('');_0x1f5f7a['push'](_0x45553c+'\x20'+_0x51e4bb+'│'+_0x4d85e0+'│');}return _0x1f5f7a[_0x1afc12(0x1b4)]('\x0a');}async[a47_0x3f412b(0x284)](_0x23ebd9,_0x3312b2,_0x4dee37){const _0x53c28e=a47_0x3f412b,{options:_0x314359,tdx:_0x2bb854}=_0x3312b2,_0x1a392f=_0x314359[_0x53c28e(0x1dd)],{timelineRows:_0x35627b,timeAxisHeader:_0x1df1ed}=this[_0x53c28e(0xfd)](_0x23ebd9,_0x1a392f),_0x94a4fb=_0x35627b[_0x53c28e(0x167)](_0xc00489=>_0xc00489[_0x53c28e(0x22c)]);if(_0x94a4fb[_0x53c28e(0x25d)]===0x0){const _0x330fc0=this['renderSessionsTimeline'](_0x23ebd9,_0x1a392f);console[_0x53c28e(0x104)](_0x330fc0);!_0x4dee37&&(console[_0x53c28e(0x1a3)](''),console[_0x53c28e(0x1a3)](a47_0x2874bf[_0x53c28e(0x297)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x53c28e(0x1a3)](a47_0x2874bf['dim'](_0x53c28e(0x171))+'or'+a47_0x2874bf[_0x53c28e(0x297)](_0x53c28e(0x1c9))));return;}_0x1df1ed&&console['log'](_0x1df1ed);const _0x1cb127=_0x35627b[_0x53c28e(0x167)](_0x4d4419=>_0x4d4419['attemptId'])[_0x53c28e(0x11e)](_0x542327=>({'title':_0x542327[_0x53c28e(0x1a2)],'value':_0x542327['attemptId']})),_0x5ab4e=process[_0x53c28e(0x243)][_0x53c28e(0x143)]||0x3c,_0x419aee=Math[_0x53c28e(0x12b)](0x28,Math[_0x53c28e(0x21d)](_0x5ab4e*0x2/0x3)),_0x3d267f=await a47_0x5ff89f({'type':'autocomplete','name':_0x53c28e(0x22c),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x1cb127,'initial':-0x1,'limit':_0x419aee,'clearFirst':!![],'fallback':{'title':_0x53c28e(0x181),'value':null},'suggest':(_0x329091,_0x324c30)=>{const _0x445479=_0x53c28e;if(!_0x329091)return Promise[_0x445479(0x16d)](_0x324c30);const _0xa20a2f=_0x324c30[_0x445479(0x167)](_0x2f5985=>{const _0x19d9f0=_0x445479,_0x12f780=_0x2f5985;return _0x12f780[_0x19d9f0(0x219)][_0x19d9f0(0x1c0)]()[_0x19d9f0(0x25a)](_0x329091[_0x19d9f0(0x1c0)]());});return Promise[_0x445479(0x16d)](_0xa20a2f);}}),_0x13d876=()=>{const _0x245075=_0x53c28e;process[_0x245075(0x243)][_0x245075(0x135)]('\x1b[1A\x1b[2K'),process[_0x245075(0x243)][_0x245075(0x135)](_0x245075(0xfa)),process[_0x245075(0x243)][_0x245075(0x135)](_0x245075(0xfa));},_0x4f834=_0x3d267f&&_0x3d267f[_0x53c28e(0x22c)]&&_0x3d267f[_0x53c28e(0x22c)]!==null&&_0x3d267f[_0x53c28e(0x22c)]['trim']()!=='';if(!_0x4f834){_0x13d876(),console[_0x53c28e(0x104)](a47_0x2874bf[_0x53c28e(0x297)](_0x53c28e(0x139)));return;}_0x13d876();const _0x5530d=_0x23ebd9['find'](_0x58e017=>_0x58e017[_0x53c28e(0x202)]?.['id']===_0x3d267f[_0x53c28e(0x22c)]);if(_0x5530d){const _0x4d2961=_0x5530d[_0x53c28e(0x1d2)]?.[_0x53c28e(0x280)]||'?',_0x240018=_0x5530d[_0x53c28e(0x184)]?.[_0x53c28e(0x280)]||'?';console[_0x53c28e(0x104)](_0x53c28e(0x222)+a47_0x2874bf['dim'](_0x4d2961)+',\x20Workflow:\x20'+a47_0x2874bf[_0x53c28e(0x297)](_0x240018));}const _0xf0678d=new WorkflowTimelineCommand();await _0xf0678d['execute']({'args':[],'options':{..._0x314359,'attemptId':_0x3d267f[_0x53c28e(0x22c)]},'tdx':_0x2bb854});}[a47_0x3f412b(0xfd)](_0xfc5480,_0x3d89ae){const _0x283277=a47_0x3f412b,_0x8deba=new Map();for(const _0x399acf of _0xfc5480){_0x399acf['id']&&_0x399acf[_0x283277(0x202)]?.['id']&&_0x8deba[_0x283277(0x1e1)](_0x399acf['id'],_0x399acf[_0x283277(0x202)]['id']);}const _0x19d2b6=[];let _0x5edfa0='';const _0x169a65=this[_0x283277(0x1cd)](_0xfc5480,_0x3d89ae),_0x9d8a2e=_0x169a65[_0x283277(0x1a0)]('\x0a');for(const _0x580b03 of _0x9d8a2e){if(_0x580b03[_0x283277(0x177)](_0x283277(0x15b))||_0x580b03['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x5edfa0=_0x580b03;else{if(_0x580b03[_0x283277(0x141)](/^[✅❌🔄🛑⏳]/)){const _0x5bd25e=_0x580b03[_0x283277(0x141)](/#(\d+)/),_0x30fa04=_0x5bd25e?_0x5bd25e[0x1]:null,_0x1918fe=_0x30fa04?_0x8deba[_0x283277(0x252)](_0x30fa04)||null:null,_0x58d41c=_0xfc5480['find'](_0x3c12e3=>_0x3c12e3['id']===_0x30fa04),_0x9e7baa=_0x58d41c?.[_0x283277(0x1d2)]?.[_0x283277(0x280)]||'';_0x19d2b6['push']({'displayLine':_0x580b03,'attemptId':_0x1918fe,'projectName':_0x9e7baa});}}}return{'timelineRows':_0x19d2b6,'timeAxisHeader':_0x5edfa0};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x1be);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x27c);async[a47_0x3f412b(0x207)](_0x2e1464){const _0x78ff31=a47_0x3f412b,{options:_0x3f7bbd,args:_0x3eb336,tdx:_0x579174}=_0x2e1464,_0x52495f=this['parseProjectWorkflowPattern'](_0x3eb336,_0x3f7bbd);if(!_0x52495f)return 0x1;const {projectName:_0x2f762c,workflowName:_0x3b2edc}=_0x52495f,_0x56448f=_0x3f7bbd[_0x78ff31(0x28e)];if(_0x3f7bbd['verbose']){if(_0x2f762c&&_0x3b2edc)console[_0x78ff31(0x1a3)]('Filter:\x20'+_0x2f762c+'.'+_0x3b2edc);else _0x2f762c&&console[_0x78ff31(0x1a3)](_0x78ff31(0x250)+_0x2f762c);_0x56448f&&console[_0x78ff31(0x1a3)](_0x78ff31(0x107));}const _0x172080=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x579174[_0x78ff31(0x184)][_0x78ff31(0x289)]({'projectName':_0x2f762c,'workflowName':_0x3b2edc,'includeRetried':_0x56448f,'limit':_0x3f7bbd[_0x78ff31(0x1f8)]}),{'verbose':_0x3f7bbd[_0x78ff31(0x1aa)]}),_0x4f3fdf=_0x172080[_0x78ff31(0x276)],_0x3588e6=_0x3f7bbd[_0x78ff31(0x1f8)]||0x64,_0x594d94=_0x4f3fdf[_0x78ff31(0x25d)]>=_0x3588e6?a47_0x2874bf[_0x78ff31(0x297)](_0x78ff31(0x187)):'';console[_0x78ff31(0x1a3)](_0x78ff31(0x1db)+_0x4f3fdf['length']+_0x78ff31(0x118)+(_0x4f3fdf[_0x78ff31(0x25d)]!==0x1?'s':'')+_0x594d94);if(_0x3f7bbd[_0x78ff31(0x281)]===_0x78ff31(0x1a8)||_0x3f7bbd[_0x78ff31(0x281)]===_0x78ff31(0x13d)||_0x3f7bbd[_0x78ff31(0x281)]===_0x78ff31(0x1e0))await handleSDKOutput(_0x4f3fdf,_0x3f7bbd);else{if(_0x4f3fdf[_0x78ff31(0x25d)]===0x0){if(_0x2f762c&&_0x3b2edc)console[_0x78ff31(0x104)](_0x78ff31(0x1a6)+_0x2f762c+'.'+_0x3b2edc);else _0x2f762c?console[_0x78ff31(0x104)](_0x78ff31(0x1eb)+_0x2f762c):console['log'](_0x78ff31(0x20d));}else{const _0x266e46=_0x3f7bbd['site'],_0x1fdc9d=_0x4f3fdf['map'](_0x4f2480=>{const _0x5da280=_0x78ff31,_0x11783d=a47_0x2874bf['dim']('#'+_0x4f2480['id']),_0x3456ab=_0x4f2480[_0x5da280(0x1d2)]?.['id'],_0x203e64=_0x4f2480[_0x5da280(0x1d7)]||_0x4f2480[_0x5da280(0x1f7)],_0x2043cd=_0x3456ab&&_0x203e64?hyperlink(_0x11783d,getWorkflowAttemptUrl(_0x266e46,_0x3456ab,_0x203e64,_0x4f2480['id'])):_0x11783d,{icon:_0x4eaf1c,text:_0x1718ed}=getAttemptStatusDisplay(_0x4f2480),_0x1cac03=(_0x4f2480[_0x5da280(0x1d2)]?.[_0x5da280(0x280)]||'?')+'.'+(_0x4f2480[_0x5da280(0x184)]?.[_0x5da280(0x280)]||'?'),_0x50cb7f=_0x4f2480[_0x5da280(0x122)]?a47_0x2874bf['dim'](_0x4f2480[_0x5da280(0x122)]):'';return(_0x2043cd+'\x20'+_0x4eaf1c+(_0x1718ed?'\x20'+_0x1718ed:'')+'\x20'+_0x1cac03+'\x20'+_0x50cb7f)['trimEnd']();});await writeOutput(_0x1fdc9d[_0x78ff31(0x1b4)]('\x0a'),_0x3f7bbd[_0x78ff31(0x220)],_0x78ff31(0x288));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x1e8);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x140);async[a47_0x3f412b(0x207)](_0x3ba893){const _0x59e292=a47_0x3f412b,{options:_0x2bb521,args:_0x2d2cbd,tdx:_0x530ce4}=_0x3ba893,_0x562c7e=_0x2d2cbd[0x0];if(!_0x562c7e)return console[_0x59e292(0x1a3)](_0x59e292(0x27e)),0x1;_0x2bb521[_0x59e292(0x1aa)]&&console[_0x59e292(0x1a3)](_0x59e292(0x17b)+_0x562c7e);const _0xe3322e=await withSpinner('Getting\x20attempt\x20details...',()=>_0x530ce4[_0x59e292(0x184)][_0x59e292(0x12c)](_0x562c7e),{'verbose':_0x2bb521[_0x59e292(0x1aa)]}),_0x280983=_0xe3322e[_0x59e292(0x276)];let _0x243fae;!_0x280983[_0x59e292(0x237)]?_0x243fae=_0x280983[_0x59e292(0x214)]?_0x59e292(0x283):_0x59e292(0x1e3):_0x243fae=_0x280983[_0x59e292(0x137)]?_0x59e292(0x137):_0x59e292(0x1a3);let _0x5243c7;if(_0x280983['createdAt']&&_0x280983[_0x59e292(0x27b)]){const _0x4a76f1=new Date(_0x280983[_0x59e292(0x194)])['getTime'](),_0x2f483a=new Date(_0x280983['finishedAt'])['getTime']();_0x5243c7=Math[_0x59e292(0x1f1)]((_0x2f483a-_0x4a76f1)/0x3e8);}const _0x131096={'attempt_id':_0x280983['id'],'status':_0x243fae,..._0x280983['index']!==undefined&&{'index':_0x280983[_0x59e292(0x22d)]},..._0x280983['project']&&{'project':_0x280983[_0x59e292(0x1d2)]['name']},..._0x280983[_0x59e292(0x184)]&&{'workflow':_0x280983['workflow']['name']},..._0x280983[_0x59e292(0x1f7)]&&{'session_id':_0x280983['sessionId']},..._0x280983['sessionTime']&&{'session_time':_0x280983[_0x59e292(0x122)]},..._0x280983['retryAttemptName']&&{'retry_attempt':_0x280983[_0x59e292(0x229)]},..._0x5243c7!==undefined&&{'duration_sec':_0x5243c7},..._0x280983[_0x59e292(0x194)]&&{'created_at':_0x280983[_0x59e292(0x194)]},..._0x280983['finishedAt']&&{'finished_at':_0x280983[_0x59e292(0x27b)]},...Object[_0x59e292(0x1d0)](_0x280983['params'])[_0x59e292(0x25d)]>0x0&&{'params':_0x280983[_0x59e292(0x128)]}};return await handleSingleObjectOutput(_0x131096,_0x2bb521),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a47_0x3f412b(0x280)]='workflow:tasks';['description']=a47_0x3f412b(0x1d9);async[a47_0x3f412b(0x207)](_0x4df13d){const _0x1065e6=a47_0x3f412b,{options:_0x5a5aaa,args:_0x13c354,tdx:_0x123c84}=_0x4df13d,_0x738304=_0x13c354[0x0];if(!_0x738304)return console['error'](_0x1065e6(0x27e)),0x1;const _0xe6cb75=_0x5a5aaa[_0x1065e6(0x226)];_0x5a5aaa[_0x1065e6(0x1aa)]&&(console['error'](_0x1065e6(0x17b)+_0x738304),_0xe6cb75&&console[_0x1065e6(0x1a3)](_0x1065e6(0x105)));const _0x3d42ad=await withSpinner(_0x1065e6(0x293),()=>_0x123c84[_0x1065e6(0x184)][_0x1065e6(0x1b5)](_0x738304,_0xe6cb75||![]),{'verbose':_0x5a5aaa[_0x1065e6(0x1aa)]}),_0xbdaf0d=_0x3d42ad[_0x1065e6(0x276)];return console[_0x1065e6(0x1a3)](_0x1065e6(0x1db)+_0xbdaf0d[_0x1065e6(0x25d)]+'\x20task'+(_0xbdaf0d[_0x1065e6(0x25d)]!==0x1?'s':'')),await handleSDKOutput(_0xbdaf0d,_0x5a5aaa),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a47_0x3f412b(0x112);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x106);async[a47_0x3f412b(0x207)](_0x5efb62){const _0x84baa2=a47_0x3f412b,{options:_0x465d69,args:_0x18f52d,tdx:_0x431da3}=_0x5efb62,_0x4040e9=_0x18f52d[0x0];let _0x49e132=_0x18f52d[0x1];if(!_0x4040e9)return console[_0x84baa2(0x1a3)](_0x84baa2(0x27e)),0x1;_0x465d69[_0x84baa2(0x1aa)]&&(console[_0x84baa2(0x1a3)](_0x84baa2(0x17b)+_0x4040e9),_0x49e132&&console['error'](_0x84baa2(0x271)+_0x49e132));const _0x3fd139=await withSpinner('Fetching\x20log\x20files...',()=>_0x431da3[_0x84baa2(0x184)]['logFiles'](_0x4040e9,_0x49e132),{'verbose':_0x465d69['verbose']}),_0x329316=_0x3fd139[_0x84baa2(0x276)];if(_0x329316['length']===0x0)return console[_0x84baa2(0x1a3)](_0x84baa2(0x239)),0x0;if(!_0x49e132&&(_0x465d69[_0x84baa2(0x1a8)]||_0x465d69[_0x84baa2(0x281)]))return await handleSDKOutput(_0x329316,_0x465d69),0x0;if(!_0x49e132){const _0x5e02a2=_0x329316[_0x84baa2(0x11e)](_0x5671c1=>({'title':_0x5671c1['taskName']+'\x20('+formatBytes(_0x5671c1[_0x84baa2(0x161)])+')','value':_0x5671c1['taskName']})),_0x5d95d1=await a47_0x5ff89f({'type':_0x84baa2(0x168),'name':'task','message':_0x84baa2(0x203),'choices':_0x5e02a2});if(!_0x5d95d1[_0x84baa2(0x27a)])return console[_0x84baa2(0x1a3)]('Cancelled'),0x0;_0x49e132=_0x5d95d1[_0x84baa2(0x27a)];}const _0x5198f6=await withSpinner(_0x84baa2(0x178),()=>_0x431da3['workflow']['logs'](_0x4040e9,_0x49e132),{'verbose':_0x465d69[_0x84baa2(0x1aa)]}),_0xa73f6b=_0x5198f6[_0x84baa2(0x276)];return _0xa73f6b?console[_0x84baa2(0x104)](_0xa73f6b):console[_0x84baa2(0x1a3)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x150);['description']='Kill\x20a\x20running\x20attempt';async['execute'](_0x3c1218){const _0x41baba=a47_0x3f412b,{options:_0x3ebc71,args:_0x2554ad,tdx:_0x47fce7}=_0x3c1218,_0x182fbd=_0x2554ad[0x0];if(!_0x182fbd)return console[_0x41baba(0x1a3)](_0x41baba(0x27e)),0x1;const _0x154ac3=_0x3ebc71['reason'];_0x3ebc71[_0x41baba(0x1aa)]&&(console['error']('Attempt\x20ID:\x20'+_0x182fbd),_0x154ac3&&console[_0x41baba(0x1a3)](_0x41baba(0x267)+_0x154ac3));if(!_0x3ebc71[_0x41baba(0x245)]){if(!isInteractive())return console[_0x41baba(0x1a3)](a47_0x2874bf[_0x41baba(0x148)](_0x41baba(0x1de)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a47_0x2874bf[_0x41baba(0x297)](_0x41baba(0x23f))),0x1;const _0x8a4b5b=await confirmKey(_0x41baba(0x1df)+_0x182fbd+'?');if(!_0x8a4b5b)return console[_0x41baba(0x1a3)](a47_0x2874bf[_0x41baba(0x23d)](_0x41baba(0x139))),0x1;}const _0x4cc780=await withSpinner(_0x41baba(0x282),()=>_0x47fce7['workflow'][_0x41baba(0x18a)](_0x182fbd,_0x154ac3),{'verbose':_0x3ebc71[_0x41baba(0x1aa)]}),_0x2880cd=_0x4cc780[_0x41baba(0x276)];return console['error']('✔\x20'+_0x2880cd),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a47_0x3f412b(0x280)]='workflow:retry';['description']=a47_0x3f412b(0x12e);async[a47_0x3f412b(0x207)](_0x2578ba){const _0x2e59ff=a47_0x3f412b,{options:_0x2590ac,args:_0x3c0be9,tdx:_0x3d4ad5}=_0x2578ba,_0x12a640=_0x3c0be9[0x0];if(!_0x12a640)return console[_0x2e59ff(0x1a3)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x2e59ff(0x1a3)](_0x2e59ff(0x290)),0x1;let _0x36336b=![],_0x52ca24=_0x12a640;if(_0x12a640['startsWith']('session:'))_0x36336b=!![],_0x52ca24=_0x12a640[_0x2e59ff(0x191)](0x8);else{if(_0x12a640[_0x2e59ff(0x177)](_0x2e59ff(0x1fd)))_0x36336b=![],_0x52ca24=_0x12a640[_0x2e59ff(0x191)](0x8);else return console[_0x2e59ff(0x1a3)](_0x2e59ff(0xee)),console[_0x2e59ff(0x1a3)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x5a7cfc=_0x2590ac[_0x2e59ff(0x158)],_0x2e19f0=_0x2590ac[_0x2e59ff(0x22a)],_0x15d794=_0x2590ac[_0x2e59ff(0x128)],_0x38340c=_0x2590ac[_0x2e59ff(0x260)];_0x2590ac[_0x2e59ff(0x1aa)]&&(console[_0x2e59ff(0x1a3)](_0x2e59ff(0x285)+(_0x36336b?_0x2e59ff(0x1cc):_0x2e59ff(0x12c))+'\x20'+_0x52ca24),_0x5a7cfc&&console[_0x2e59ff(0x1a3)](_0x2e59ff(0x294)+_0x5a7cfc),_0x2e19f0&&console[_0x2e59ff(0x1a3)]('Resume\x20from:\x20'+_0x2e19f0),_0x15d794&&console['error']('Params:\x20'+_0x15d794),_0x38340c&&console[_0x2e59ff(0x1a3)](_0x2e59ff(0x17c)));let _0x36f7b6;if(_0x15d794)try{if(_0x15d794['startsWith']('@')){const _0x352e48=await import(_0x2e59ff(0x242)),_0x1e641a=_0x15d794['substring'](0x1),_0x12e70a=await _0x352e48[_0x2e59ff(0x287)](_0x1e641a,'utf-8');_0x36f7b6=JSON[_0x2e59ff(0x131)](_0x12e70a);}else _0x36f7b6=JSON[_0x2e59ff(0x131)](_0x15d794);}catch{return console[_0x2e59ff(0x1a3)](_0x2e59ff(0x1f4)),0x1;}if(!_0x2590ac['yes']){if(!isInteractive())return console['error'](a47_0x2874bf[_0x2e59ff(0x148)](_0x2e59ff(0x1de)),_0x2e59ff(0x201)),console[_0x2e59ff(0x1a3)](a47_0x2874bf['dim'](_0x2e59ff(0x23f))),0x1;const _0x3f9792=await confirmKey(_0x2e59ff(0x159)+(_0x36336b?_0x2e59ff(0x1cc):'attempt')+'\x20'+_0x52ca24+'?');if(!_0x3f9792)return console[_0x2e59ff(0x1a3)](a47_0x2874bf['yellow']('Cancelled')),0x1;}let _0x50ccb3;_0x36336b?_0x50ccb3=await withSpinner(_0x2e59ff(0x18d),()=>_0x3d4ad5['workflow'][_0x2e59ff(0x13c)](_0x52ca24,{'fromTask':_0x5a7cfc,'retryParams':_0x36f7b6}),{'verbose':_0x2590ac[_0x2e59ff(0x1aa)]}):_0x50ccb3=await withSpinner(_0x2e59ff(0x130),()=>_0x3d4ad5['workflow'][_0x2e59ff(0x257)](_0x52ca24,{'resumeFrom':_0x2e19f0,'retryParams':_0x36f7b6,'force':_0x38340c}),{'verbose':_0x2590ac['verbose']});const _0x35a3e9=_0x50ccb3[_0x2e59ff(0x276)];return console[_0x2e59ff(0x1a3)](_0x2e59ff(0x1d4)),console[_0x2e59ff(0x1a3)](_0x2e59ff(0x1ee)+_0x35a3e9['attemptId']),console[_0x2e59ff(0x1a3)](_0x2e59ff(0x224)+_0x35a3e9[_0x2e59ff(0x1f7)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']='workflow:run';[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x116);async[a47_0x3f412b(0x207)](_0x565309){const _0x4b8c20=a47_0x3f412b,{options:_0x5af472,args:_0x412d44,tdx:_0xe3b221}=_0x565309;let _0x3507b4=_0x412d44[0x0];if(!_0x3507b4){const _0xe51ff7=this[_0x4b8c20(0x10e)]([],_0x5af472),_0xe44948=await withSpinner(_0x4b8c20(0x151),()=>_0xe3b221[_0x4b8c20(0x184)][_0x4b8c20(0x125)](_0xe51ff7,{'limit':_0x5af472[_0x4b8c20(0x1f8)]}),{'verbose':_0x5af472[_0x4b8c20(0x1aa)]}),_0x77626=_0xe44948[_0x4b8c20(0x276)];if(_0x77626[_0x4b8c20(0x25d)]===0x0)return console[_0x4b8c20(0x1a3)](_0x4b8c20(0x24a)),!_0xe51ff7&&console[_0x4b8c20(0x1a3)](a47_0x2874bf[_0x4b8c20(0x297)](_0x4b8c20(0x1e2))),0x1;const _0x516dfa=_0x77626[_0x4b8c20(0x11e)](_0x21b989=>({'title':_0x21b989[_0x4b8c20(0x1d2)]?.[_0x4b8c20(0x280)]+'.'+_0x21b989[_0x4b8c20(0x280)],'value':_0x21b989[_0x4b8c20(0x1d2)]?.[_0x4b8c20(0x280)]+'.'+_0x21b989[_0x4b8c20(0x280)],'description':_0x21b989[_0x4b8c20(0x11f)]?_0x4b8c20(0x1cf)+_0x21b989[_0x4b8c20(0x11f)]:undefined})),_0x45ce11=await a47_0x5ff89f({'type':_0x4b8c20(0x168),'name':_0x4b8c20(0x184),'message':_0x4b8c20(0x172),'choices':_0x516dfa});if(!_0x45ce11['workflow'])return 0x1;_0x3507b4=_0x45ce11[_0x4b8c20(0x184)];}if(!_0x3507b4[_0x4b8c20(0x25a)]('.')){const _0x3453f5=this['resolveProject']([],_0x5af472);if(_0x3453f5)_0x3507b4=_0x3453f5+'.'+_0x3507b4;else return console['error'](a47_0x2874bf[_0x4b8c20(0x148)](_0x4b8c20(0x133)),_0x4b8c20(0x156)),console[_0x4b8c20(0x1a3)](a47_0x2874bf[_0x4b8c20(0x297)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x3ff05f=_0x5af472[_0x4b8c20(0x292)],_0x504ea6=_0x5af472[_0x4b8c20(0x122)],_0x399a63={};if(_0x3ff05f&&Array['isArray'](_0x3ff05f))for(const _0x511df4 of _0x3ff05f){const _0x18010f=_0x511df4[_0x4b8c20(0x129)]('=');if(_0x18010f===-0x1)return console[_0x4b8c20(0x1a3)](_0x4b8c20(0x1f2)+_0x511df4),console['error'](_0x4b8c20(0x240)),0x1;const _0x87970=_0x511df4[_0x4b8c20(0x191)](0x0,_0x18010f),_0x20ce7a=_0x511df4[_0x4b8c20(0x191)](_0x18010f+0x1);try{_0x399a63[_0x87970]=JSON[_0x4b8c20(0x131)](_0x20ce7a);}catch{_0x399a63[_0x87970]=_0x20ce7a;}}_0x5af472[_0x4b8c20(0x1aa)]&&(console[_0x4b8c20(0x1a3)](_0x4b8c20(0x1ea)+_0x3507b4),Object['keys'](_0x399a63)[_0x4b8c20(0x25d)]>0x0&&console[_0x4b8c20(0x1a3)]('Parameters:\x20'+JSON['stringify'](_0x399a63)),_0x504ea6&&console[_0x4b8c20(0x1a3)](_0x4b8c20(0x162)+_0x504ea6));const _0x2a2145=await withSpinner('Starting\x20workflow\x20run...',()=>_0xe3b221[_0x4b8c20(0x184)]['run'](_0x3507b4,_0x399a63,{'sessionTime':_0x504ea6}),{'verbose':_0x5af472[_0x4b8c20(0x1aa)]}),_0x4b302d=_0x2a2145[_0x4b8c20(0x276)];console[_0x4b8c20(0x1a3)]('✔\x20Workflow\x20run\x20started'),console[_0x4b8c20(0x1a3)](_0x4b8c20(0x259)+_0x4b302d['id']),console[_0x4b8c20(0x1a3)](_0x4b8c20(0x224)+_0x4b302d[_0x4b8c20(0x1f7)]),console[_0x4b8c20(0x1a3)]('\x20\x20Project:\x20'+_0x4b302d['project']?.[_0x4b8c20(0x280)]),console[_0x4b8c20(0x1a3)]('\x20\x20Workflow:\x20'+_0x4b302d[_0x4b8c20(0x184)]?.['name']);if(_0x4b302d['project']?.['id']&&_0x4b302d[_0x4b8c20(0x1f7)]&&_0x4b302d['id']){const _0x59f975=_0x5af472[_0x4b8c20(0x1dd)],_0x5292c7=getConsoleUrl(_0x59f975,_0x4b8c20(0x111)+_0x4b302d[_0x4b8c20(0x1d2)]['id']+_0x4b8c20(0x21f)+_0x4b302d[_0x4b8c20(0x1f7)]+_0x4b8c20(0xea)+_0x4b302d['id']);console[_0x4b8c20(0x1a3)](_0x4b8c20(0xf7)+a47_0x2874bf['cyan'](_0x5292c7));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a47_0x3f412b(0x16a);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x153);async[a47_0x3f412b(0x207)](_0x27675a){const _0x1172bc=a47_0x3f412b,{options:_0x2b3374,args:_0x5937b0,tdx:_0x465800}=_0x27675a,_0x3e7bc5=_0x5937b0[0x0],_0x95eeb0=_0x5937b0[0x1]||'.';if(!_0x3e7bc5)return console[_0x1172bc(0x1a3)](_0x1172bc(0x22f)),console[_0x1172bc(0x1a3)](_0x1172bc(0x1ec)),0x1;const _0x181fe0=_0x2b3374[_0x1172bc(0x11f)];_0x2b3374[_0x1172bc(0x1aa)]&&(console[_0x1172bc(0x1a3)]('Project:\x20'+_0x3e7bc5),console[_0x1172bc(0x1a3)](_0x1172bc(0x1c2)+_0x95eeb0),_0x181fe0&&console[_0x1172bc(0x1a3)](_0x1172bc(0x1a7)+_0x181fe0));const _0x4cc682=await withSpinner(_0x1172bc(0x16e)+_0x3e7bc5+_0x1172bc(0xf1),()=>_0x465800['workflow'][_0x1172bc(0x103)](_0x3e7bc5,_0x95eeb0,{'revision':_0x181fe0}),{'verbose':_0x2b3374[_0x1172bc(0x1aa)]}),_0x52874b=_0x4cc682[_0x1172bc(0x276)];return console['error'](_0x1172bc(0x192)+_0x52874b[_0x1172bc(0x20e)]),console['error'](_0x1172bc(0x25f)+_0x52874b[_0x1172bc(0x11f)]),console[_0x1172bc(0x1a3)]('\x20\x20Files\x20extracted:\x20'+_0x52874b[_0x1172bc(0x258)]),console['error'](_0x1172bc(0x1fb)+_0x95eeb0+'/'+_0x52874b[_0x1172bc(0x20e)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x165);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0xeb);async[a47_0x3f412b(0x207)](_0x1e7986){const _0x2081b9=a47_0x3f412b,{options:_0x135d86,args:_0x2d26f8,tdx:_0x3f0d7f}=_0x1e7986;let _0x67e7a4='.',_0x2c64cc=_0x135d86[_0x2081b9(0x280)];if(_0x2d26f8[0x0]){const {promises:_0x51539e}=await import('fs');try{const _0x20c8b2=await _0x51539e[_0x2081b9(0x28f)](_0x2d26f8[0x0]);if(_0x20c8b2[_0x2081b9(0x1b6)]())_0x67e7a4=_0x2d26f8[0x0];else return console['error'](_0x2081b9(0x19e)+_0x2d26f8[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x2c64cc=_0x2d26f8[0x0],_0x67e7a4='.';}}const _0x2d709c=_0x135d86['revision'],_0x4fc7c2=_0x135d86[_0x2081b9(0x15d)];_0x135d86[_0x2081b9(0x1aa)]&&(console[_0x2081b9(0x1a3)](_0x2081b9(0x291)+_0x67e7a4),_0x2c64cc&&console[_0x2081b9(0x1a3)](_0x2081b9(0x20b)+_0x2c64cc),_0x2d709c&&console[_0x2081b9(0x1a3)](_0x2081b9(0x1a7)+_0x2d709c),_0x4fc7c2&&console[_0x2081b9(0x1a3)](_0x2081b9(0x1c5)));const _0x3f507e=await withSpinner(_0x2081b9(0x126),()=>_0x3f0d7f[_0x2081b9(0x184)][_0x2081b9(0x119)](_0x67e7a4,{'projectName':_0x2c64cc,'revision':_0x2d709c,'skipValidation':_0x4fc7c2}),{'verbose':_0x135d86['verbose']}),_0x4a95a4=_0x3f507e[_0x2081b9(0x276)];return console[_0x2081b9(0x1a3)](_0x2081b9(0x28d)+_0x4a95a4[_0x2081b9(0x20e)]),console['error'](_0x2081b9(0x227)+_0x4a95a4[_0x2081b9(0x231)]),console['error'](_0x2081b9(0x25f)+_0x4a95a4['revision']),await this[_0x2081b9(0x1fc)](_0x3f0d7f,_0x4a95a4[_0x2081b9(0x20e)],_0x135d86[_0x2081b9(0x1dd)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x193);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x1ae);async['execute'](_0x9041ca){const _0xd30d32=a47_0x3f412b,{options:_0x2f57d3,args:_0x54d103,tdx:_0x41ef15}=_0x9041ca,_0x4fd646=_0x54d103[0x0],_0x1203f8=_0x54d103[0x1];if(!_0x4fd646)return console[_0xd30d32(0x1a3)](a47_0x2874bf[_0xd30d32(0x148)](_0xd30d32(0x133)),_0xd30d32(0x19f)),console['error'](a47_0x2874bf[_0xd30d32(0x297)](_0xd30d32(0x1d5))),0x1;const _0x23f175=_0x2f57d3[_0xd30d32(0x11f)];_0x2f57d3['verbose']&&(console[_0xd30d32(0x1a3)](_0xd30d32(0x222)+_0x4fd646),_0x1203f8&&console[_0xd30d32(0x1a3)](_0xd30d32(0x1fe)+_0x1203f8),_0x23f175&&console[_0xd30d32(0x1a3)](_0xd30d32(0x1a7)+_0x23f175),_0x2f57d3[_0xd30d32(0x25b)]&&console[_0xd30d32(0x1a3)](_0xd30d32(0x19d)));const _0x1dea20=await withSpinner(_0xd30d32(0x13b)+_0x4fd646+_0xd30d32(0xf1),()=>_0x41ef15[_0xd30d32(0x184)][_0xd30d32(0x209)](_0x4fd646,{'targetDir':_0x1203f8,'revision':_0x23f175}),{'verbose':_0x2f57d3[_0xd30d32(0x1aa)]}),_0x545f7e=_0x1dea20[_0xd30d32(0x276)];_0x545f7e[_0xd30d32(0x256)]?console[_0xd30d32(0x1a3)]('→\x20New\x20project:\x20'+_0x545f7e[_0xd30d32(0x20e)]):console['error']('→\x20Project:\x20'+_0x545f7e[_0xd30d32(0x20e)]);console['error'](_0xd30d32(0x25f)+_0x545f7e['revision']),console[_0xd30d32(0x1a3)](_0xd30d32(0x228)+(a47_0x19d684[_0xd30d32(0x160)](process[_0xd30d32(0x22e)](),_0x545f7e[_0xd30d32(0x230)])||'.')),console[_0xd30d32(0x1a3)](_0xd30d32(0x1ac)+a47_0x2874bf[_0xd30d32(0x11b)]('+'+_0x545f7e['summary'][_0xd30d32(0x28a)]+_0xd30d32(0x164))+',\x20'+(a47_0x2874bf[_0xd30d32(0x23d)]('~'+_0x545f7e[_0xd30d32(0x27f)][_0xd30d32(0x1e7)]+_0xd30d32(0x12a))+',\x20')+(a47_0x2874bf[_0xd30d32(0x148)]('-'+_0x545f7e[_0xd30d32(0x27f)][_0xd30d32(0x185)]+_0xd30d32(0x1bb))+',\x20')+(''+a47_0x2874bf[_0xd30d32(0x297)](_0x545f7e[_0xd30d32(0x27f)][_0xd30d32(0x1af)]+_0xd30d32(0x17e))));for(const _0x29f4f6 of _0x545f7e[_0xd30d32(0x186)]){_0x29f4f6[_0xd30d32(0x204)]===_0xd30d32(0x1e7)&&_0x29f4f6[_0xd30d32(0xfc)]&&(console[_0xd30d32(0x1a3)]('\x0a'+a47_0x2874bf[_0xd30d32(0x1b8)](_0xd30d32(0x14b)+_0x29f4f6[_0xd30d32(0x1c8)])),console['error'](_0x29f4f6['diff']));}if(!_0x545f7e[_0xd30d32(0x234)])return saveSessionContext({'workflow_project':_0x545f7e[_0xd30d32(0x20e)]},_0x2f57d3[_0xd30d32(0x1cc)]),console[_0xd30d32(0x1a3)](a47_0x2874bf[_0xd30d32(0x11b)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0xd30d32(0x1a3)](a47_0x2874bf[_0xd30d32(0x297)](_0xd30d32(0x1ba)+_0x545f7e['projectName'])),0x0;if(_0x2f57d3[_0xd30d32(0x25b)])return console[_0xd30d32(0x1a3)](a47_0x2874bf['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x2f57d3[_0xd30d32(0x245)]){if(!isInteractive())return console[_0xd30d32(0x1a3)](a47_0x2874bf[_0xd30d32(0x148)](_0xd30d32(0x1de)),_0xd30d32(0x201)),console[_0xd30d32(0x1a3)](a47_0x2874bf[_0xd30d32(0x297)](_0xd30d32(0x23f))),0x1;const _0xfc6575=await confirmKey(_0xd30d32(0x270));if(!_0xfc6575)return console[_0xd30d32(0x1a3)](a47_0x2874bf[_0xd30d32(0x23d)](_0xd30d32(0x139)),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0xd30d32(0x10a),()=>_0x41ef15['workflow'][_0xd30d32(0x247)](_0x545f7e,{'revision':_0x23f175}),{'verbose':_0x2f57d3['verbose']}),saveSessionContext({'workflow_project':_0x545f7e[_0xd30d32(0x20e)]},_0x2f57d3[_0xd30d32(0x1cc)]),console[_0xd30d32(0x1a3)](a47_0x2874bf[_0xd30d32(0x11b)]('✔\x20Pull\x20complete'));const _0x4c5b42=a47_0x19d684['relative'](process[_0xd30d32(0x22e)](),_0x545f7e['targetDir'])||'.';return console[_0xd30d32(0x1a3)](a47_0x2874bf['dim'](_0xd30d32(0x1fb)+_0x4c5b42)),console[_0xd30d32(0x1a3)](a47_0x2874bf['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x545f7e[_0xd30d32(0x20e)])),0x0;}}function a47_0x4c19(_0x30b9f7,_0x560eb4){_0x30b9f7=_0x30b9f7-0xea;const _0x3e774c=a47_0x3e77();let _0x4c1960=_0x3e774c[_0x30b9f7];return _0x4c1960;}export class WorkflowPushCommand extends WorkflowBaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x15e);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x149);async[a47_0x3f412b(0x207)](_0x9d43bf){const _0x3a58ba=a47_0x3f412b,{options:_0x12ebad,args:_0x32a155,tdx:_0x337d0b}=_0x9d43bf,_0x41b9b7=this[_0x3a58ba(0x1ce)](_0x32a155,_0x12ebad),_0x652333=_0x12ebad[_0x3a58ba(0x11f)],_0x161c70=_0x12ebad[_0x3a58ba(0x15d)];_0x12ebad[_0x3a58ba(0x1aa)]&&(_0x41b9b7&&console[_0x3a58ba(0x1a3)]('Source\x20directory:\x20'+_0x41b9b7),_0x652333&&console[_0x3a58ba(0x1a3)](_0x3a58ba(0x1a7)+_0x652333),_0x12ebad[_0x3a58ba(0x25b)]&&console[_0x3a58ba(0x1a3)](_0x3a58ba(0x19d)),_0x161c70&&console[_0x3a58ba(0x1a3)](_0x3a58ba(0x1c5)));let _0x430fa6;try{_0x430fa6=await withSpinner(_0x3a58ba(0x173),()=>_0x337d0b[_0x3a58ba(0x184)][_0x3a58ba(0x1f5)]({'sourceDir':_0x41b9b7,'revision':_0x652333,'skipValidation':_0x161c70}),{'verbose':_0x12ebad[_0x3a58ba(0x1aa)]});}catch(_0x39f260){if(_0x39f260 instanceof Error&&_0x39f260[_0x3a58ba(0x26f)][_0x3a58ba(0x25a)](_0x3a58ba(0x102)))return console['error'](a47_0x2874bf[_0x3a58ba(0x148)](_0x3a58ba(0x133)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x12ebad['workflowProject']?console['error'](a47_0x2874bf['dim'](_0x3a58ba(0x1ff)+_0x12ebad['workflowProject']+_0x3a58ba(0x206)+_0x12ebad['workflowProject']+'\x27')):console[_0x3a58ba(0x1a3)](a47_0x2874bf[_0x3a58ba(0x297)](_0x3a58ba(0x1b1))),0x1;throw _0x39f260;}const _0x566a6d=_0x430fa6[_0x3a58ba(0x276)];console[_0x3a58ba(0x1a3)](_0x3a58ba(0x124)+_0x566a6d[_0x3a58ba(0x20e)]),console[_0x3a58ba(0x1a3)](_0x3a58ba(0x1fa)+_0x566a6d['sourceDir']),console[_0x3a58ba(0x1a3)](_0x3a58ba(0x25f)+_0x566a6d[_0x3a58ba(0x11f)]),console[_0x3a58ba(0x1a3)](_0x3a58ba(0x1ac)+a47_0x2874bf[_0x3a58ba(0x11b)]('+'+_0x566a6d[_0x3a58ba(0x27f)][_0x3a58ba(0x28a)]+_0x3a58ba(0x164))+',\x20'+(a47_0x2874bf[_0x3a58ba(0x23d)]('~'+_0x566a6d[_0x3a58ba(0x27f)]['modified']+_0x3a58ba(0x12a))+',\x20')+(a47_0x2874bf[_0x3a58ba(0x148)]('-'+_0x566a6d[_0x3a58ba(0x27f)]['deleted']+_0x3a58ba(0x1bb))+',\x20')+(''+a47_0x2874bf[_0x3a58ba(0x297)](_0x566a6d[_0x3a58ba(0x27f)][_0x3a58ba(0x1af)]+_0x3a58ba(0x17e))));for(const _0x3d8f6a of _0x566a6d[_0x3a58ba(0x186)]){_0x3d8f6a[_0x3a58ba(0x204)]==='modified'&&_0x3d8f6a[_0x3a58ba(0xfc)]&&(console['error']('\x0a'+a47_0x2874bf[_0x3a58ba(0x1b8)]('---\x20'+_0x3d8f6a[_0x3a58ba(0x1c8)])),console['error'](_0x3d8f6a[_0x3a58ba(0xfc)]));}if(!_0x566a6d[_0x3a58ba(0x234)])return console[_0x3a58ba(0x1a3)](a47_0x2874bf[_0x3a58ba(0x11b)](_0x3a58ba(0x21e))),await this[_0x3a58ba(0x1fc)](_0x337d0b,_0x566a6d['projectName'],_0x12ebad[_0x3a58ba(0x1dd)]),0x0;if(_0x12ebad[_0x3a58ba(0x25b)])return console[_0x3a58ba(0x1a3)](a47_0x2874bf[_0x3a58ba(0x23d)](_0x3a58ba(0x14a))),0x0;if(!_0x12ebad['yes']){if(!isInteractive())return console[_0x3a58ba(0x1a3)](a47_0x2874bf['red'](_0x3a58ba(0x1de)),_0x3a58ba(0x201)),console['error'](a47_0x2874bf[_0x3a58ba(0x297)](_0x3a58ba(0x23f))),0x1;const _0x1af69c=await confirmKey(_0x3a58ba(0x15f));if(!_0x1af69c)return console[_0x3a58ba(0x1a3)](a47_0x2874bf['yellow'](_0x3a58ba(0x139)),_0x3a58ba(0x28c)),0x1;}const _0x2e91b7=await withSpinner(_0x3a58ba(0x205),()=>_0x337d0b[_0x3a58ba(0x184)][_0x3a58ba(0x1d6)](_0x566a6d),{'verbose':_0x12ebad[_0x3a58ba(0x1aa)]}),_0x421e73=_0x2e91b7['data'];return console[_0x3a58ba(0x1a3)](a47_0x2874bf[_0x3a58ba(0x11b)](_0x3a58ba(0x255))),console[_0x3a58ba(0x1a3)]('\x20\x20Project\x20ID:\x20'+_0x421e73[_0x3a58ba(0x231)]),console['error'](_0x3a58ba(0x25f)+_0x421e73[_0x3a58ba(0x11f)]),await this[_0x3a58ba(0x1fc)](_0x337d0b,_0x421e73[_0x3a58ba(0x20e)],_0x12ebad[_0x3a58ba(0x1dd)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']='workflow:clone';[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x213);async[a47_0x3f412b(0x207)](_0x5a6575){const _0x2a7304=a47_0x3f412b,{options:_0x2bf6e5,args:_0x17d67a,tdx:_0xab0e62}=_0x5a6575,_0xafa21b=this[_0x2a7304(0x1ce)](_0x17d67a,_0x2bf6e5),_0x1706a9=_0x2bf6e5['name'],_0xd00b87=_0x2bf6e5[_0x2a7304(0x11f)],_0x429d41=_0x2bf6e5[_0x2a7304(0x15d)];if(!_0xafa21b)return console['error'](a47_0x2874bf['red']('Error:'),_0x2a7304(0x170)),console[_0x2a7304(0x1a3)](a47_0x2874bf[_0x2a7304(0x297)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x2a7304(0x1a3)](a47_0x2874bf[_0x2a7304(0x297)](_0x2a7304(0x24b))),0x1;if(!_0x1706a9)return console['error'](a47_0x2874bf[_0x2a7304(0x148)](_0x2a7304(0x133)),_0x2a7304(0x1bc)),console[_0x2a7304(0x1a3)](a47_0x2874bf[_0x2a7304(0x297)](_0x2a7304(0x1c4))),0x1;_0x2bf6e5[_0x2a7304(0x1aa)]&&(console[_0x2a7304(0x1a3)](_0x2a7304(0xf8)+_0xafa21b),console[_0x2a7304(0x1a3)](_0x2a7304(0x1b3)+_0x1706a9),_0xd00b87&&console[_0x2a7304(0x1a3)]('Revision:\x20'+_0xd00b87),_0x2bf6e5['dryRun']&&console[_0x2a7304(0x1a3)]('Dry\x20run:\x20yes'),_0x429d41&&console[_0x2a7304(0x1a3)](_0x2a7304(0x1c5)));const _0x1c4e77=await withSpinner(_0x2a7304(0x152),()=>_0xab0e62['workflow']['prepareCloneProject'](_0xafa21b,_0x1706a9,{'revision':_0xd00b87,'skipValidation':_0x429d41}),{'verbose':_0x2bf6e5[_0x2a7304(0x1aa)]}),_0x30bf7c=_0x1c4e77[_0x2a7304(0x276)];console['error'](_0x2a7304(0x265)+_0x30bf7c[_0x2a7304(0x136)]);_0x30bf7c['sourceProjectName']&&console[_0x2a7304(0x1a3)](_0x2a7304(0x1e6)+_0x30bf7c[_0x2a7304(0x155)]);console[_0x2a7304(0x1a3)](_0x2a7304(0x1b3)+_0x30bf7c[_0x2a7304(0x1dc)]),console[_0x2a7304(0x1a3)]('Revision:\x20'+_0x30bf7c[_0x2a7304(0x11f)]),console[_0x2a7304(0x1a3)](_0x2a7304(0x176)+_0x30bf7c[_0x2a7304(0x16f)]);_0x30bf7c['targetExists']&&(console['error'](a47_0x2874bf[_0x2a7304(0x23d)](_0x2a7304(0x1da)+_0x30bf7c[_0x2a7304(0x1dc)]+_0x2a7304(0x1f9)+_0x30bf7c[_0x2a7304(0x299)]+')')),console[_0x2a7304(0x1a3)](a47_0x2874bf[_0x2a7304(0x23d)](_0x2a7304(0x12f))));if(_0x2bf6e5[_0x2a7304(0x25b)])return console[_0x2a7304(0x1a3)](a47_0x2874bf[_0x2a7304(0x23d)](_0x2a7304(0x189))),0x0;if(!_0x2bf6e5['yes']){if(!isInteractive())return console[_0x2a7304(0x1a3)](a47_0x2874bf[_0x2a7304(0x148)](_0x2a7304(0x1de)),_0x2a7304(0x201)),console['error'](a47_0x2874bf[_0x2a7304(0x297)](_0x2a7304(0x23f))),0x1;const _0x212938=_0x30bf7c[_0x2a7304(0x155)]||a47_0x19d684[_0x2a7304(0xf0)](_0xafa21b),_0x535e99=_0x30bf7c[_0x2a7304(0x1b0)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x1706a9+_0x2a7304(0x1c7):_0x2a7304(0x127)+_0x212938+_0x2a7304(0x115)+_0x1706a9+'\x22?',_0x38f5d7=await confirmKey(_0x535e99);if(!_0x38f5d7)return console[_0x2a7304(0x1a3)](a47_0x2874bf[_0x2a7304(0x23d)](_0x2a7304(0x139))),0x1;}const _0xba9e3c=await withSpinner(_0x30bf7c[_0x2a7304(0x1b0)]?_0x2a7304(0x295)+_0x1706a9+'...':_0x2a7304(0x110)+_0x1706a9+'...',()=>_0xab0e62[_0x2a7304(0x184)][_0x2a7304(0x26d)](_0x30bf7c),{'verbose':_0x2bf6e5['verbose']}),_0x736ace=_0xba9e3c[_0x2a7304(0x276)];return console[_0x2a7304(0x1a3)](a47_0x2874bf[_0x2a7304(0x11b)](_0x30bf7c[_0x2a7304(0x1b0)]?_0x2a7304(0x29a):_0x2a7304(0x10c))),console[_0x2a7304(0x1a3)](_0x2a7304(0xfe)+_0x736ace[_0x2a7304(0x1dc)]),console[_0x2a7304(0x1a3)](_0x2a7304(0x227)+_0x736ace[_0x2a7304(0x1cb)]),console['error']('\x20\x20Revision:\x20'+_0x736ace[_0x2a7304(0x11f)]),await this['showWorkflowConsoleUrl'](_0xab0e62,_0x736ace['newProjectName'],_0x2bf6e5['site']),0x0;}}function a47_0x3e77(){const _0x461153=['ICON_WIDTH','task','finishedAt','List\x20workflow\x20attempts','📋\x20','Error:\x20Attempt\x20ID\x20is\x20required','summary','name','format','Killing\x20attempt...','canceling','navigateSessionsInteractive','Target:\x20','2938500RiIoLe','readFile','list','attempts','new','17991594QhFbAj','-\x20nothing\x20pushed','✔\x20Pushed\x20','includeRetried','stat','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Project\x20directory:\x20','param','Getting\x20attempt\x20tasks...','From\x20task:\x20','Updating\x20','Session\x20','dim','sort','existingProjectId','✔\x20Project\x20updated','/attempt/','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','status','find','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','duration','basename','...','\x20sessions\x20','description','now','pollTimeline','requireProject','\x20\x20Console:\x20','Source\x20directory:\x20','updatedAt','\x1b[1A\x1b[2K','fullName','diff','generateSessionTimelineRows','\x20\x20Project:\x20','\x27\x20from\x20project\x20\x27','delete','workflow:secrets:delete','No\x20workflow\x20tdx.json\x20found','download','log','Including\x20subtasks:\x20yes','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Include\x20retried:\x20yes','\x20workflow','unknown','Writing\x20files...','\x0aFailed\x20to\x20fetch\x20attempt\x20data','✔\x20Clone\x20complete','✔\x20Workflow\x20project\x20context\x20cleared.','resolveProject','.\x20Expected\x20format:\x20KEY=VALUE','Cloning\x20to\x20','/app/workflows/','workflow:logs','Attempt:\x20','🔄\x20','\x22\x20to\x20new\x20project\x20\x22','Start\x20a\x20workflow\x20run','926091EMlIPr','\x20attempt','push','fill','green','Pattern:\x20','workflow:secrets:list','map','revision','Key:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','sessionTime','\x20-\x20','✔\x20Project:\x20','workflows','Pushing\x20workflow\x20project...','\x0aClone\x20\x22','params','indexOf','\x20modified','max','attempt','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Retry\x20a\x20session\x20or\x20attempt','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Retrying\x20attempt...','parse','✔\x20Showing\x20','Error:','Project\x20filter:\x20','write','sourceDir','success','GUTTER','Cancelled','start','Pulling\x20project\x20','retrySession','jsonl','5oZVqTl','Setting\x20secret...','Show\x20specific\x20attempt\x20details','match','No\x20sessions\x20found\x20for:\x20','rows','workflowProject','text','min','blue','red','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x0aDry\x20run\x20-\x20nothing\x20pushed','---\x20','icon','clear','key','getFullYear','workflow:kill','Loading\x20workflows...','Analyzing\x20project...','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','toISOString','sourceProjectName','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','repeat','fromTask','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','getMonth','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','localeCompare','skipValidation','workflow:push','\x0aPush\x20these\x20changes?','relative','fileSize','Session\x20time:\x20','end','\x20new','workflow:upload','workflowName','filter','select','workflow:workflows','workflow:download','No\x20projects\x20match\x20pattern:\x20','sys','resolve','Downloading\x20project\x20','fileCount','Source\x20directory\x20is\x20required','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Select\x20a\x20workflow\x20to\x20run','Analyzing\x20changes...','✔\x20Workflow\x20project\x20set\x20to:\x20','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Files\x20to\x20upload:\x20','startsWith','Downloading\x20logs...','POLL_INTERVAL_MS','LABEL_MIN_SPACING','Attempt\x20ID:\x20','Force:\x20yes','ICON_SPACING','\x20unchanged','LABEL_WIDTH_DIVISOR','Listing\x20workflow\x20projects...','No\x20matching\x20sessions\x20found','\x20secret','178CPdsLH','workflow','deleted','changes','\x20(use\x20--limit\x20to\x20show\x20more)','\x20from\x20session\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','kill','\x0aPolling...\x20(','Deleting\x20secret...','Retrying\x20session...','context','No\x20workflows\x20found\x20in\x20project:\x20','renderSingleTimeline','substring','✔\x20Downloaded\x20','workflow:pull','createdAt','resolveProjectId','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','2685736kIIBBB','white','(unknown)','Latest\x20session\x20has\x20no\x20attempt','Auto-selected\x20latest\x20session:\x20','startedAt','Dry\x20run:\x20yes','Error:\x20','Project\x20name\x20is\x20required','split','follow','displayLine','error','renderTimeline','\x20tasks','No\x20attempts\x20found\x20for:\x20','Revision:\x20','json','tdx\x20wf\x20attempt\x20','verbose','24141DbpUDi','\x20\x20Changes:\x20','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Pull\x20workflow\x20project\x20to\x20local\x20folder','unchanged','targetExists','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','size','New\x20project\x20name:\x20','join','tasks','isDirectory','\x0a✔\x20Attempt\x20complete','cyan','\x27...','\x20\x20Session\x20context\x20set\x20to:\x20','\x20deleted','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Resolving\x20project\x20\x27','workflow:attempts','No\x20workflow\x20sessions\x20found','toLowerCase','Session\x20not\x20found:\x20','Output\x20directory:\x20','workflow:timeline','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Validation:\x20skipped','getHours','\x22\x20with\x20new\x20revision?','path','\x20\x20tdx\x20wf\x20use\x20<project>','Select\x20a\x20session\x20to\x20view\x20timeline:','newProjectId','session','renderSessionsTimeline','resolveProjectDir','revision:\x20','keys','List\x20workflow\x20execution\x20sessions','project','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','✔\x20Retry\x20started','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','executePushProject','session_id','Usage:\x20tdx\x20wf\x20use\x20<project>','Show\x20tasks\x20for\x20an\x20attempt','\x0a⚠\x20Project\x20\x22','✔\x20Found\x20','newProjectName','site','\x0aError:','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','table','set','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','running','Warning:','Error:\x20Secret\x20key\x20is\x20required','Source\x20project:\x20','modified','workflow:attempt','4426434vQSVtM','Workflow:\x20','No\x20attempts\x20found\x20in\x20project:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','values','\x20\x20New\x20attempt\x20ID:\x20','every','MAX_TASKS_DISPLAY','round','Error:\x20Invalid\x20parameter\x20format:\x20','Listing\x20secrets...','Error:\x20Invalid\x20JSON\x20in\x20--params','preparePushProject','Key\x20cannot\x20be\x20empty','sessionId','limit','\x22\x20already\x20exists\x20(ID:\x20','\x20\x20Source:\x20','\x20\x20Location:\x20','showWorkflowConsoleUrl','attempt:','Target\x20directory:\x20','Tip:\x20cd\x20to\x20workflows/','workflow:projects','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','lastAttempt','Select\x20a\x20task\x20to\x20view\x20logs:','type','Pushing\x20project...','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','execute','all','pullProject','Error:\x20KEY=VALUE\x20is\x20required','Project\x20name:\x20','MAX_POLL_ITERATIONS','No\x20attempts\x20found','projectName','getMinutes','List\x20workflows','state','List\x20all\x20workflow\x20projects','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','cancelRequested','⚠\x20Showing\x20first\x20','Filter:\x20','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x22?\x20This\x20cannot\x20be\x20undone.','title','Listing\x20workflows...','No\x20sessions\x20found\x20in\x20project:\x20','padStart','floor','\x0a✔\x20No\x20changes\x20to\x20push','/sessions/','output','columns','Project:\x20','group_error','\x20\x20Session\x20ID:\x20','389459sDzzwO','includeSubtasks','\x20\x20Project\x20ID:\x20','\x20\x20Target:\x20','retryAttemptName','resumeFrom','tdx.json','attemptId','index','cwd','Error:\x20Project\x20name\x20is\x20required','targetDir','projectId','isTTY','startTime','hasChanges','💡\x20Tip:\x20Use\x20','\x20(system)','done','workflow:secrets:set','No\x20log\x20files\x20found\x20for\x20this\x20attempt','workflow:delete','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','yellow','slice','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Expected\x20format:\x20--param\x20key=value','getTime','fs/promises','stdout','\x20has\x20no\x20attempts','yes','buildTimelineData','applyPullProject','splice','Failed\x20to\x20fetch\x20attempt\x20data','No\x20workflows\x20found','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','from','workflow:use','deleteSecret','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Filter:\x20project=','No\x20sessions\x20with\x20timing\x20information','get','planned','pending','✔\x20Push\x20complete','isNewProject','retryAttempt','filesExtracted','\x20\x20Attempt\x20ID:\x20','includes','dryRun','sessions','length','✔\x20Deleted\x20project\x20','\x20\x20Revision:\x20','force','\x20of\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','parseProjectWorkflowPattern','📁\x20','Source:\x20','has','Reason:\x20','\x20session','No\x20sessions\x20found','Loading\x20session...','listSecrets','window','executeCloneProject','Usage:\x20workflow:delete\x20<project-name-or-id>','message','\x0aApply\x20these\x20changes?','Task\x20name:\x20','Listing\x20workflow\x20sessions...','some','workflow:sessions','setSecret','data','total','Last\x20successful\x20update\x20was\x20at\x20iteration\x20'];a47_0x3e77=function(){return _0x461153;};return a47_0x3e77();}export class WorkflowDeleteCommand extends BaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x23a);['description']='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a47_0x3f412b(0x207)](_0x4891a1){const _0x5dfcf9=a47_0x3f412b,{options:_0x59d6d5,args:_0x30a804,tdx:_0x309135}=_0x4891a1,_0x49d296=_0x30a804[0x0];if(!_0x49d296)return console[_0x5dfcf9(0x1a3)](_0x5dfcf9(0x23c)),console['error'](_0x5dfcf9(0x26e)),0x1;_0x59d6d5[_0x5dfcf9(0x1aa)]&&console[_0x5dfcf9(0x1a3)]('Project:\x20'+_0x49d296);if(!_0x59d6d5[_0x5dfcf9(0x245)]){if(!isInteractive())return console[_0x5dfcf9(0x1a3)](a47_0x2874bf[_0x5dfcf9(0x148)]('\x0aError:'),_0x5dfcf9(0x201)),console[_0x5dfcf9(0x1a3)](a47_0x2874bf[_0x5dfcf9(0x297)](_0x5dfcf9(0x23f))),0x1;const _0x8b9989=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x49d296+_0x5dfcf9(0x218));if(!_0x8b9989)return console[_0x5dfcf9(0x1a3)](a47_0x2874bf['yellow'](_0x5dfcf9(0x139))),0x1;}const _0x32bb9e=await withSpinner('Deleting\x20project\x20'+_0x49d296+_0x5dfcf9(0xf1),()=>_0x309135['workflow'][_0x5dfcf9(0x100)](_0x49d296),{'verbose':_0x59d6d5[_0x5dfcf9(0x1aa)]}),_0x4b823c=_0x32bb9e[_0x5dfcf9(0x276)];return console[_0x5dfcf9(0x1a3)](_0x5dfcf9(0x25e)+_0x4b823c['projectName']),console[_0x5dfcf9(0x1a3)](_0x5dfcf9(0x227)+_0x4b823c[_0x5dfcf9(0x231)]),0x0;}}export function parseKeyValue(_0x1e5add){const _0x29e8b5=a47_0x3f412b,_0x37c64a=_0x1e5add[_0x29e8b5(0x129)]('=');if(_0x37c64a===-0x1)throw new Error('Invalid\x20format:\x20'+_0x1e5add+_0x29e8b5(0x10f));const _0x1b7a0e=_0x1e5add[_0x29e8b5(0x191)](0x0,_0x37c64a),_0x1f2561=_0x1e5add[_0x29e8b5(0x191)](_0x37c64a+0x1);if(!_0x1b7a0e)throw new Error(_0x29e8b5(0x1f6));return{'key':_0x1b7a0e,'value':_0x1f2561};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x11d);['description']=a47_0x3f412b(0x175);async[a47_0x3f412b(0x207)](_0x27595b){const _0x4fe9a4=a47_0x3f412b,{options:_0x1d0997,args:_0x524664,tdx:_0x3b8cf3}=_0x27595b,_0x46cdec=this[_0x4fe9a4(0xf6)](_0x524664,_0x1d0997);if(!_0x46cdec)return 0x1;_0x1d0997['verbose']&&console['error'](_0x4fe9a4(0x222)+_0x46cdec);const _0x5dfa6f=await withSpinner(_0x4fe9a4(0x1f3),()=>_0x3b8cf3[_0x4fe9a4(0x184)][_0x4fe9a4(0x26b)](_0x46cdec),{'verbose':_0x1d0997[_0x4fe9a4(0x1aa)]}),{secrets:_0xeb3cff}=_0x5dfa6f[_0x4fe9a4(0x276)];return console[_0x4fe9a4(0x1a3)]('✔\x20Found\x20'+_0xeb3cff[_0x4fe9a4(0x25d)]+_0x4fe9a4(0x182)+(_0xeb3cff[_0x4fe9a4(0x25d)]!==0x1?'s':'')),await handleSDKOutput(_0xeb3cff,_0x1d0997),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x238);[a47_0x3f412b(0xf3)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async['execute'](_0x31a81b){const _0x3b119a=a47_0x3f412b,{options:_0xd048a2,args:_0x345c6f,tdx:_0x6c6dad}=_0x31a81b;let _0x501012,_0x63705f;if(_0x345c6f[_0x3b119a(0x25d)]>=0x2)_0x501012=_0x345c6f[0x0],_0x63705f=_0x345c6f[0x1];else{if(_0x345c6f[_0x3b119a(0x25d)]===0x1&&_0xd048a2[_0x3b119a(0x144)])_0x501012=_0xd048a2[_0x3b119a(0x144)],_0x63705f=_0x345c6f[0x0];else return _0x345c6f[_0x3b119a(0x25d)]===0x1?(console[_0x3b119a(0x1a3)](_0x3b119a(0x22f)),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x3b119a(0x1a3)](_0x3b119a(0x20a)),console[_0x3b119a(0x1a3)](_0x3b119a(0x1d3)),0x1);}let _0x237739,_0x2281e8;try{({key:_0x237739,value:_0x2281e8}=parseKeyValue(_0x63705f));}catch(_0x99d737){return _0x99d737 instanceof Error&&console[_0x3b119a(0x1a3)](a47_0x2874bf[_0x3b119a(0x148)](_0x3b119a(0x133)),_0x99d737[_0x3b119a(0x26f)]),0x1;}_0xd048a2[_0x3b119a(0x1aa)]&&(console[_0x3b119a(0x1a3)](_0x3b119a(0x222)+_0x501012),console[_0x3b119a(0x1a3)](_0x3b119a(0x120)+_0x237739));const _0x43c445=await withSpinner(_0x3b119a(0x13f),()=>_0x6c6dad['workflow'][_0x3b119a(0x275)](_0x501012,_0x237739,_0x2281e8),{'verbose':_0xd048a2['verbose']}),_0x396035=_0x43c445[_0x3b119a(0x276)];return console[_0x3b119a(0x1a3)]('✔\x20Secret\x20\x27'+_0x396035[_0x3b119a(0x14e)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x396035[_0x3b119a(0x20e)]+'\x27'),(_0xd048a2['json']||_0xd048a2['jsonl'])&&await handleSingleObjectOutput(_0x396035,_0xd048a2),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x101);[a47_0x3f412b(0xf3)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a47_0x3f412b(0x207)](_0x41d070){const _0x252a3c=a47_0x3f412b,{options:_0x2b7f99,args:_0x571aba,tdx:_0x20cefa}=_0x41d070;let _0x20f445,_0x5e7448;if(_0x571aba[_0x252a3c(0x25d)]>=0x2)_0x20f445=_0x571aba[0x0],_0x5e7448=_0x571aba[0x1];else{if(_0x571aba[_0x252a3c(0x25d)]===0x1&&_0x2b7f99['workflowProject'])_0x20f445=_0x2b7f99[_0x252a3c(0x144)],_0x5e7448=_0x571aba[0x0];else return _0x571aba[_0x252a3c(0x25d)]===0x1?(console['error'](_0x252a3c(0x22f)),console[_0x252a3c(0x1a3)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x252a3c(0x1a3)](_0x252a3c(0x1e5)),console[_0x252a3c(0x1a3)](_0x252a3c(0x24f)),0x1);}_0x2b7f99['verbose']&&(console[_0x252a3c(0x1a3)]('Project:\x20'+_0x20f445),console[_0x252a3c(0x1a3)](_0x252a3c(0x120)+_0x5e7448));if(!_0x2b7f99[_0x252a3c(0x245)]){if(!isInteractive())return console[_0x252a3c(0x1a3)](a47_0x2874bf['red'](_0x252a3c(0x1de)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x252a3c(0x1a3)](a47_0x2874bf[_0x252a3c(0x297)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3471bc=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x5e7448+_0x252a3c(0xff)+_0x20f445+'\x27?');if(!_0x3471bc)return console[_0x252a3c(0x1a3)](a47_0x2874bf[_0x252a3c(0x23d)]('Cancelled')),0x1;}const _0x54cff1=await withSpinner(_0x252a3c(0x18c),()=>_0x20cefa['workflow'][_0x252a3c(0x24e)](_0x20f445,_0x5e7448),{'verbose':_0x2b7f99[_0x252a3c(0x1aa)]}),_0x2bb957=_0x54cff1['data'];return console[_0x252a3c(0x1a3)]('✔\x20Secret\x20\x27'+_0x2bb957[_0x252a3c(0x14e)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x2bb957[_0x252a3c(0x20e)]+'\x27'),(_0x2b7f99[_0x252a3c(0x1a8)]||_0x2b7f99['jsonl'])&&await handleSingleObjectOutput(_0x2bb957,_0x2b7f99),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(_0x441d47){const _0x2e871c=a47_0x3f412b,_0x2fb387=Math['floor'](_0x441d47/0x3e8),_0x2380d5=Math['floor'](_0x2fb387/0x3c),_0x41f4cd=Math['floor'](_0x2380d5/0x3c),_0x189b49=Math[_0x2e871c(0x21d)](_0x41f4cd/0x18);if(_0x189b49>0x0){const _0x5b9663=_0x41f4cd%0x18;return _0x5b9663>0x0?_0x189b49+'d\x20'+_0x5b9663+'h':_0x189b49+'d';}else{if(_0x41f4cd>0x0){const _0x3b40ce=_0x2380d5%0x3c;return _0x3b40ce>0x0?_0x41f4cd+'h\x20'+_0x3b40ce+'m':_0x41f4cd+'h';}else{if(_0x2380d5>0x0){const _0x505c97=_0x2fb387%0x3c;return _0x505c97>0x0?_0x2380d5+'m\x20'+_0x505c97+'s':_0x2380d5+'m';}else return _0x2fb387+'s';}}}function formatTimestamp(_0x42ce5c,_0x40a75f){const _0x1d7b70=a47_0x3f412b,_0x2ee9c9=new Date(_0x42ce5c),_0x1dc50d=String(_0x2ee9c9[_0x1d7b70(0x1c6)]())[_0x1d7b70(0x21c)](0x2,'0'),_0x318895=String(_0x2ee9c9[_0x1d7b70(0x20f)]())[_0x1d7b70(0x21c)](0x2,'0'),_0x49d975=_0x1dc50d+':'+_0x318895,_0x1c4b6e=_0x2ee9c9[_0x1d7b70(0x14f)]()===_0x40a75f[_0x1d7b70(0x14f)]()&&_0x2ee9c9[_0x1d7b70(0x15a)]()===_0x40a75f[_0x1d7b70(0x15a)]()&&_0x2ee9c9['getDate']()===_0x40a75f['getDate']();if(_0x1c4b6e)return _0x49d975;else{const _0xb85c5=String(_0x2ee9c9[_0x1d7b70(0x15a)]()+0x1)[_0x1d7b70(0x21c)](0x2,'0'),_0x25ec3f=String(_0x2ee9c9['getDate']())[_0x1d7b70(0x21c)](0x2,'0');return _0xb85c5+'-'+_0x25ec3f+'\x20'+_0x49d975;}}function formatDate(_0x2f31f3){const _0x1ff30d=a47_0x3f412b,_0xab5166=_0x2f31f3['getFullYear'](),_0x59566e=String(_0x2f31f3[_0x1ff30d(0x15a)]()+0x1)[_0x1ff30d(0x21c)](0x2,'0'),_0x3689ea=String(_0x2f31f3['getDate']())[_0x1ff30d(0x21c)](0x2,'0');return _0xab5166+'-'+_0x59566e+'-'+_0x3689ea;}function getTaskStateIcon(_0x49e2af){const _0x2f5a5b={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x2f5a5b[_0x49e2af]||'⚪';}function getBarChar(_0x55eb72){const _0x119c25=a47_0x3f412b;return _0x55eb72===_0x119c25(0x1a3)||_0x55eb72===_0x119c25(0x223)?'×':'─';}function getBarColor(_0x32ad2a){const _0x260a72=a47_0x3f412b,_0x34f5da={'success':a47_0x2874bf[_0x260a72(0x11b)],'error':a47_0x2874bf[_0x260a72(0x148)],'group_error':a47_0x2874bf[_0x260a72(0x148)],'running':a47_0x2874bf['blue'],'blocked':a47_0x2874bf['yellow'],'planned':a47_0x2874bf[_0x260a72(0x297)],'canceling':a47_0x2874bf[_0x260a72(0x23d)]};return _0x34f5da[_0x32ad2a]||a47_0x2874bf[_0x260a72(0x198)];}function parseTaskName(_0x57a34d){const _0x315f56=a47_0x3f412b;let _0x1519f1=_0x57a34d['replace'](/^\++/,'');const _0x48d189=_0x1519f1[_0x315f56(0x1a0)]('+'),_0x48b6ce=_0x48d189[_0x315f56(0x25d)]>0x1?_0x48d189['length']-0x2:0x0,_0x41b1d3=_0x48d189[_0x48d189[_0x315f56(0x25d)]-0x1]||_0x1519f1;return{'level':_0x48b6ce,'name':'+'+_0x41b1d3};}function truncateTaskName(_0x55087d,_0x425183){const _0x4e92b9=stringWidth(_0x55087d);if(_0x4e92b9<=_0x425183)return _0x55087d;let _0x2e5140=_0x55087d;while(stringWidth(_0x2e5140+'…')>_0x425183&&_0x2e5140['length']>0x0){_0x2e5140=_0x2e5140['slice'](0x0,-0x1);}return _0x2e5140+'…';}function calculateTimeScale(_0x5d7fa6,_0x3812d6){const _0x5431f0=a47_0x3f412b;return{'startTime':_0x5d7fa6[_0x5431f0(0x13a)],'endTime':_0x5d7fa6[_0x5431f0(0x163)],'durationMs':_0x5d7fa6[_0x5431f0(0xef)],'msPerChar':_0x5d7fa6['duration']/_0x3812d6};}function timeToPosition(_0x1c9def,_0x1f17c1,_0x1abd77){const _0x3d6e61=a47_0x3f412b,_0x255144=_0x1c9def-_0x1f17c1[_0x3d6e61(0x233)],_0x267f5c=Math[_0x3d6e61(0x21d)](_0x255144/_0x1f17c1['msPerChar']);return Math[_0x3d6e61(0x12b)](0x0,Math[_0x3d6e61(0x146)](_0x267f5c,_0x1abd77));}function renderTimeAxis(_0x41c645,_0x4ef57e){const _0x52d9b5=a47_0x3f412b,_0x334a63=Math[_0x52d9b5(0x146)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x52d9b5(0x12b)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x52d9b5(0x21d)](_0x4ef57e/TIMELINE_CONFIG[_0x52d9b5(0x17f)]))),_0x23b678=_0x41c645['durationMs']/(_0x334a63-0x1),_0x37c72=new Date(_0x41c645['startTime']),_0x107603=[];for(let _0xff8cfe=0x0;_0xff8cfe<_0x334a63;_0xff8cfe++){const _0x3e747c=_0x41c645[_0x52d9b5(0x233)]+_0xff8cfe*_0x23b678,_0x2c7eec=timeToPosition(_0x3e747c,_0x41c645,_0x4ef57e),_0x5ba7db=formatTimestamp(_0x3e747c,_0x37c72);_0x107603[_0x52d9b5(0x119)]({'pos':_0x2c7eec,'text':_0x5ba7db});}const _0x274892=new Array(_0x4ef57e)['fill']('\x20');let _0x11e88e=-0x1;for(const {pos:_0x5f379a,text:_0x120323}of _0x107603){let _0x1fddd9=Math['max'](0x0,_0x5f379a-Math[_0x52d9b5(0x21d)](_0x120323['length']/0x2));_0x1fddd9<=_0x11e88e+TIMELINE_CONFIG[_0x52d9b5(0x17a)]&&(_0x1fddd9=_0x11e88e+TIMELINE_CONFIG[_0x52d9b5(0x17a)]+0x1);_0x1fddd9+_0x120323['length']>_0x4ef57e&&(_0x1fddd9=_0x4ef57e-_0x120323[_0x52d9b5(0x25d)]);if(_0x1fddd9>=0x0&&_0x1fddd9+_0x120323[_0x52d9b5(0x25d)]<=_0x4ef57e&&_0x1fddd9>_0x11e88e){for(let _0x352897=0x0;_0x352897<_0x120323[_0x52d9b5(0x25d)];_0x352897++){_0x274892[_0x1fddd9+_0x352897]=_0x120323[_0x352897];}_0x11e88e=_0x1fddd9+_0x120323[_0x52d9b5(0x25d)]-0x1;}}return _0x274892[_0x52d9b5(0x1b4)]('');}function renderTaskRow(_0x5d0423,_0x28a133,_0x2a862c,_0x26aaba){const _0x4b26e2=a47_0x3f412b,{level:_0x12e635,name:_0x3224a3}=parseTaskName(_0x5d0423['name']),_0x2e67e3='\x20'['repeat'](_0x12e635),_0x127246=_0x5d0423['window']?'('+formatElapsed(_0x5d0423[_0x4b26e2(0x26c)]['duration'])+')':'',_0x282f34=stringWidth(_0x127246),_0x2caec2=_0x12e635*0x1,_0x1a2dab=_0x26aaba-_0x2caec2-_0x282f34-0x1,_0x5a7073=truncateTaskName(_0x3224a3,_0x1a2dab),_0x320b64=_0x2e67e3+_0x5a7073,_0x4e974f=stringWidth(_0x320b64),_0x163150=_0x26aaba-_0x4e974f-_0x282f34,_0x5ac60c=_0x320b64+'\x20'[_0x4b26e2(0x157)](Math[_0x4b26e2(0x12b)](0x1,_0x163150))+a47_0x2874bf[_0x4b26e2(0x297)](_0x127246),_0x52cfa2=getTaskStateIcon(_0x5d0423[_0x4b26e2(0x211)]),_0x4a7892=new Array(_0x2a862c)[_0x4b26e2(0x11a)]('\x20');if(_0x5d0423[_0x4b26e2(0x26c)]){const _0x3bb514=timeToPosition(_0x5d0423[_0x4b26e2(0x26c)][_0x4b26e2(0x13a)],_0x28a133,_0x2a862c),_0x3905c3=timeToPosition(_0x5d0423['window'][_0x4b26e2(0x163)],_0x28a133,_0x2a862c),_0x4b1a6d=getBarChar(_0x5d0423[_0x4b26e2(0x211)]),_0x197356=Math[_0x4b26e2(0x12b)](_0x3bb514+0x1,_0x3905c3);for(let _0x169f9e=_0x3bb514;_0x169f9e<Math[_0x4b26e2(0x146)](_0x197356,_0x2a862c);_0x169f9e++){_0x4a7892[_0x169f9e]=_0x4b1a6d;}}const _0x24828a=getBarColor(_0x5d0423[_0x4b26e2(0x211)]),_0x3f373c=_0x4a7892[_0x4b26e2(0x11e)](_0x3d64c3=>_0x3d64c3==='\x20'?'\x20':_0x24828a(_0x3d64c3))[_0x4b26e2(0x1b4)]('');return _0x52cfa2+'\x20'+_0x5ac60c+'│'+_0x3f373c+'│';}function calculateStats(_0x1b6811){const _0x417420=a47_0x3f412b,_0x362f70={'total':_0x1b6811[_0x417420(0x25d)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x56c76d of _0x1b6811){if(_0x56c76d['state']===_0x417420(0x137))_0x362f70[_0x417420(0x137)]++;else{if(_0x56c76d[_0x417420(0x211)]==='error'||_0x56c76d[_0x417420(0x211)]===_0x417420(0x223))_0x362f70[_0x417420(0x1a3)]++;else _0x56c76d[_0x417420(0x211)]==='running'?_0x362f70[_0x417420(0x1e3)]++:_0x362f70[_0x417420(0x254)]++;}}return _0x362f70;}function formatStats(_0x191d88){const _0x56e964=a47_0x3f412b;return['Total:\x20'+_0x191d88[_0x56e964(0x277)],'✅\x20'+_0x191d88[_0x56e964(0x137)],'❌\x20'+_0x191d88[_0x56e964(0x1a3)],_0x56e964(0x114)+_0x191d88['running'],'⏳\x20'+_0x191d88['pending']][_0x56e964(0x1b4)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a47_0x3f412b(0x280)]=a47_0x3f412b(0x1c3);[a47_0x3f412b(0xf3)]=a47_0x3f412b(0x1ad);async['execute'](_0x1a6c39){const _0xe796ea=a47_0x3f412b,{options:_0x4fa541,args:_0x1828a5,tdx:_0x55731d}=_0x1a6c39;let _0x20e054,_0x2ef4ca,_0x2f4e25=![];if(_0x1828a5[0x0]){if(_0x1828a5[0x0][_0xe796ea(0x25a)]('.')){const _0x44200d=this[_0xe796ea(0x263)](_0x1828a5,_0x4fa541);if(!_0x44200d)return 0x1;_0x20e054=_0x44200d['projectName'],_0x2ef4ca=_0x44200d[_0xe796ea(0x166)];}else{_0x2ef4ca=_0x1828a5[0x0],_0x20e054=_0x4fa541[_0xe796ea(0x144)];if(!_0x20e054)return console['error'](a47_0x2874bf['red'](_0xe796ea(0x133)),_0xe796ea(0x262)),0x1;_0x2f4e25=!![];}}else{const _0x1e9e31=this[_0xe796ea(0x263)](_0x1828a5,_0x4fa541);if(!_0x1e9e31)return 0x1;_0x20e054=_0x1e9e31[_0xe796ea(0x20e)],_0x2ef4ca=_0x1e9e31[_0xe796ea(0x166)];}if(_0x4fa541[_0xe796ea(0x1aa)]){if(_0x20e054&&_0x2ef4ca)console['error']('Filter:\x20'+_0x20e054+'.'+_0x2ef4ca);else _0x20e054&&console[_0xe796ea(0x1a3)]('Filter:\x20project='+_0x20e054);}const _0x46df86=_0x4fa541[_0xe796ea(0x22c)],_0x477d10=_0x4fa541[_0xe796ea(0x1f7)];if(_0x46df86){_0x477d10&&console[_0xe796ea(0x1a3)](a47_0x2874bf['yellow'](_0xe796ea(0x1e4)),_0xe796ea(0x12d));const _0xb5528f=_0x4fa541[_0xe796ea(0x1a1)];return _0xb5528f?await this['pollTimeline'](_0x1a6c39,_0x46df86):await this['renderSingleTimeline'](_0x1a6c39,_0x46df86,_0x4fa541),0x0;}if(_0x477d10){const _0x5ad802=await withSpinner(_0xe796ea(0x26a),()=>_0x55731d[_0xe796ea(0x184)][_0xe796ea(0x25c)]({'projectName':_0x20e054,'workflowName':_0x2ef4ca,'limit':0x64}),{'verbose':_0x4fa541[_0xe796ea(0x1aa)]}),_0x41caab=_0x5ad802[_0xe796ea(0x276)][_0xe796ea(0xed)](_0x3b17ff=>_0x3b17ff['id']===_0x477d10);if(!_0x41caab)return console['error'](a47_0x2874bf[_0xe796ea(0x148)](_0xe796ea(0x133)),_0xe796ea(0x1c1)+_0x477d10),0x1;if(!_0x41caab[_0xe796ea(0x202)]?.['id'])return console['error'](a47_0x2874bf['red']('Error:'),_0xe796ea(0x296)+_0x477d10+_0xe796ea(0x244)),0x1;const _0x459296=_0x41caab[_0xe796ea(0x202)]['id'];_0x4fa541[_0xe796ea(0x1aa)]&&console['error']('Using\x20attempt\x20'+_0x459296+_0xe796ea(0x188)+_0x477d10);const _0x23cc38=_0x4fa541['follow'];return _0x23cc38?await this[_0xe796ea(0xf5)](_0x1a6c39,_0x459296):await this[_0xe796ea(0x190)](_0x1a6c39,_0x459296,_0x4fa541),0x0;}const _0x5c0878=await withSpinner('Loading\x20sessions...',()=>_0x55731d[_0xe796ea(0x184)][_0xe796ea(0x25c)]({'projectName':_0x20e054,'workflowName':_0x2ef4ca,'limit':_0x4fa541[_0xe796ea(0x1f8)]||0x32}),{'verbose':_0x4fa541['verbose']}),_0xb04a6=_0x5c0878[_0xe796ea(0x276)];if(_0xb04a6['length']===0x0){if(_0x20e054&&_0x2ef4ca)console[_0xe796ea(0x1a3)](_0xe796ea(0x142)+_0x20e054+'.'+_0x2ef4ca);else _0x20e054?console[_0xe796ea(0x1a3)](_0xe796ea(0x21b)+_0x20e054):(console[_0xe796ea(0x1a3)](_0xe796ea(0x1bf)),console[_0xe796ea(0x1a3)](a47_0x2874bf[_0xe796ea(0x297)](_0xe796ea(0x23b))));return 0x0;}_0xb04a6[_0xe796ea(0x298)]((_0x1ef9c6,_0xe3de5d)=>{const _0x382d77=_0xe796ea,_0x2e799b=_0x1ef9c6['sessionTime']||'',_0x2c8a8b=_0xe3de5d[_0x382d77(0x122)]||'';return _0x2c8a8b[_0x382d77(0x15c)](_0x2e799b);});if(_0x4fa541['json']||_0x4fa541['jsonl'])return await handleSDKOutput(_0xb04a6,_0x4fa541),0x0;let _0x31d0d3;if(_0x2f4e25){const _0x4272f7=_0xb04a6[0x0];if(!_0x4272f7[_0xe796ea(0x202)]?.['id'])return console[_0xe796ea(0x1a3)](_0xe796ea(0x19a)),0x0;_0x31d0d3=_0x4272f7[_0xe796ea(0x202)]['id'],_0x4fa541[_0xe796ea(0x1aa)]&&console[_0xe796ea(0x1a3)](_0xe796ea(0x19b)+_0x4272f7['sessionTime']);}else{const _0x5b074f=_0xb04a6[_0xe796ea(0x11e)](_0x1a30ae=>{const _0x294d84=_0xe796ea,_0x2e0799=getAttemptStatusDisplay(_0x1a30ae['lastAttempt']);return{'title':_0x1a30ae[_0x294d84(0x1d2)]?.[_0x294d84(0x280)]+'.'+_0x1a30ae[_0x294d84(0x184)]?.[_0x294d84(0x280)]+_0x294d84(0x123)+_0x1a30ae[_0x294d84(0x122)]+'\x20'+_0x2e0799[_0x294d84(0x14c)],'value':_0x1a30ae[_0x294d84(0x202)]?.['id']||'','description':_0x2e0799[_0x294d84(0x145)]};}),_0x2a84ca=await a47_0x5ff89f({'type':_0xe796ea(0x168),'name':'attemptId','message':_0xe796ea(0x1ca),'choices':_0x5b074f[_0xe796ea(0x167)](_0x444b1d=>_0x444b1d['value']!=='')});if(!_0x2a84ca[_0xe796ea(0x22c)])return 0x0;_0x31d0d3=_0x2a84ca[_0xe796ea(0x22c)];}const _0x39b83e=_0x4fa541['follow'];return _0x39b83e?await this[_0xe796ea(0xf5)](_0x1a6c39,_0x31d0d3):await this[_0xe796ea(0x190)](_0x1a6c39,_0x31d0d3,_0x4fa541),0x0;}async[a47_0x3f412b(0x190)](_0x10f0cb,_0x4d3a77,_0x343381){const _0x4abd60=a47_0x3f412b,{tdx:_0x531fb3}=_0x10f0cb;let _0x181941,_0x116b11;try{[_0x181941,_0x116b11]=await Promise['all']([_0x531fb3[_0x4abd60(0x184)][_0x4abd60(0x12c)](_0x4d3a77),_0x531fb3[_0x4abd60(0x184)][_0x4abd60(0x1b5)](_0x4d3a77,![])]);}catch(_0x320d5f){console[_0x4abd60(0x1a3)](a47_0x2874bf[_0x4abd60(0x148)](_0x4abd60(0x249)));_0x343381[_0x4abd60(0x1aa)]&&console[_0x4abd60(0x1a3)](_0x320d5f);throw _0x320d5f;}if(_0x343381[_0x4abd60(0x1a8)]||_0x343381[_0x4abd60(0x13d)]){const _0x50f3c4=this[_0x4abd60(0x246)](_0x181941,_0x116b11);await handleSDKOutput([_0x50f3c4],_0x343381);return;}const _0x4194fb=_0x531fb3[_0x4abd60(0x18e)]['site'],_0x573564=this['renderTimeline'](_0x181941,_0x116b11,_0x4194fb);console[_0x4abd60(0x104)](_0x573564);}async[a47_0x3f412b(0xf5)](_0x5f36d5,_0x364988){const _0x20de9a=a47_0x3f412b,{tdx:_0x168bbe}=_0x5f36d5,_0x5510d8=TIMELINE_CONFIG[_0x20de9a(0x179)],_0x250d0f=TIMELINE_CONFIG[_0x20de9a(0x20c)];let _0x2d169b=0x0;while(_0x2d169b<_0x250d0f){process[_0x20de9a(0x243)][_0x20de9a(0x232)]&&process[_0x20de9a(0x243)]['write']('\x1bc');let _0xd1ab0,_0x20db92;try{[_0xd1ab0,_0x20db92]=await Promise[_0x20de9a(0x208)]([_0x168bbe[_0x20de9a(0x184)][_0x20de9a(0x12c)](_0x364988),_0x168bbe[_0x20de9a(0x184)][_0x20de9a(0x1b5)](_0x364988,![])]);}catch(_0x406276){console[_0x20de9a(0x1a3)](a47_0x2874bf[_0x20de9a(0x148)](_0x20de9a(0x10b)));_0x2d169b>0x0&&console[_0x20de9a(0x1a3)](a47_0x2874bf[_0x20de9a(0x297)](_0x20de9a(0x278)+_0x2d169b));throw _0x406276;}const _0x5bb38a=_0x168bbe[_0x20de9a(0x18e)][_0x20de9a(0x1dd)],_0x43faee=this[_0x20de9a(0x1a4)](_0xd1ab0,_0x20db92,_0x5bb38a);console[_0x20de9a(0x104)](_0x43faee);const _0x104a1f=_0xd1ab0['done']&&_0x20db92[_0x20de9a(0x1ef)](_0x177deb=>_0x177deb[_0x20de9a(0x211)]!==_0x20de9a(0x1e3)&&_0x177deb[_0x20de9a(0x211)]!==_0x20de9a(0x253));if(_0x104a1f){console[_0x20de9a(0x1a3)](a47_0x2874bf[_0x20de9a(0x11b)](_0x20de9a(0x1b7)));break;}console['error'](a47_0x2874bf[_0x20de9a(0x297)](_0x20de9a(0x18b)+_0x2d169b*0x2+_0x20de9a(0x121))),await new Promise(_0xd4c954=>setTimeout(_0xd4c954,_0x5510d8)),_0x2d169b++;}_0x2d169b>=_0x250d0f&&console[_0x20de9a(0x1a3)](a47_0x2874bf[_0x20de9a(0x23d)](_0x20de9a(0x217)));}[a47_0x3f412b(0x1a4)](_0x123b2c,_0x3a02e8,_0x6b0914){const _0x29cf17=a47_0x3f412b,_0x1959b3=[],_0x368662=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x4e6481=0x5,_0x554aa9=process['stdout'][_0x29cf17(0x221)]||0x78,_0x5dfef3=_0x554aa9-_0x368662-_0x4e6481,_0x212e3e=Math[_0x29cf17(0x12b)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math['min'](_0x5dfef3,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x36062c=new Date(_0x123b2c['createdAt'])[_0x29cf17(0x241)](),_0x4e9c73=_0x123b2c['finishedAt']?new Date(_0x123b2c[_0x29cf17(0x27b)])[_0x29cf17(0x241)]():Date['now'](),_0x281fef={'start':_0x36062c,'end':_0x4e9c73,'duration':_0x4e9c73-_0x36062c},_0x116e54=new Map(),_0xda05bf=[];for(const _0x331f25 of _0x3a02e8){if(_0x331f25[_0x29cf17(0x19c)]){const _0x2055da=new Date(_0x331f25[_0x29cf17(0x19c)])[_0x29cf17(0x241)](),_0x4c00d9=_0x331f25[_0x29cf17(0xf9)]?new Date(_0x331f25['updatedAt'])[_0x29cf17(0x241)]():Date[_0x29cf17(0xf4)](),_0x1552fa={'start':_0x2055da,'end':_0x4c00d9,'duration':_0x4c00d9-_0x2055da};_0x116e54['set'](_0x331f25['id'],_0x1552fa),_0xda05bf[_0x29cf17(0x119)]({'name':_0x331f25[_0x29cf17(0xfb)],'state':_0x331f25['state']||_0x29cf17(0x109),'window':_0x1552fa});}else _0xda05bf['push']({'name':_0x331f25[_0x29cf17(0xfb)],'state':_0x331f25[_0x29cf17(0x211)]||_0x29cf17(0x253),'window':undefined});}_0xda05bf[_0x29cf17(0x298)]((_0x6ecfb8,_0x3cbae7)=>{const _0x578eea=_0x29cf17;if(!_0x6ecfb8['window'])return 0x1;if(!_0x3cbae7[_0x578eea(0x26c)])return-0x1;return _0x6ecfb8['window']['start']-_0x3cbae7[_0x578eea(0x26c)][_0x578eea(0x13a)];});const _0x45a65d=_0xda05bf[_0x29cf17(0x25d)],_0x426390=_0x45a65d>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x426390&&_0xda05bf[_0x29cf17(0x248)](TIMELINE_CONFIG[_0x29cf17(0x1f0)]);const _0x1fba73=calculateTimeScale(_0x281fef,_0x212e3e),_0x32c640=_0x123b2c['done']?_0x123b2c['success']?a47_0x2874bf[_0x29cf17(0x11b)](_0x29cf17(0x137)):a47_0x2874bf['red']('error'):a47_0x2874bf[_0x29cf17(0x147)](_0x29cf17(0x1e3)),_0x7c3cb0=_0x123b2c[_0x29cf17(0x1d2)]?.['id'],_0x58c467=_0x123b2c[_0x29cf17(0x1f7)];let _0x4f975d;if(_0x7c3cb0&&_0x58c467){const _0x50ccee=getWorkflowAttemptUrl(_0x6b0914,_0x7c3cb0,_0x58c467,_0x123b2c['id']);_0x4f975d=hyperlink(a47_0x2874bf[_0x29cf17(0x297)](_0x123b2c['id']),_0x50ccee);}else _0x4f975d=a47_0x2874bf[_0x29cf17(0x297)](_0x123b2c['id']);_0x1959b3['push'](_0x29cf17(0x113)+_0x4f975d+'\x20-\x20'+_0x32c640+_0x29cf17(0x123)+formatElapsed(_0x281fef[_0x29cf17(0xef)]));if(_0xda05bf[_0x29cf17(0x25d)]>0x0){const _0x50720b=renderTimeAxis(_0x1fba73,_0x212e3e),_0x538756=new Date(_0x281fef[_0x29cf17(0x13a)]),_0x12cb89=formatDate(_0x538756),_0x47dfec=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x29cf17(0x17d)]+_0x368662,_0x1b9a6b=_0x12cb89[_0x29cf17(0x21c)](_0x47dfec),_0x58cb23=a47_0x2874bf[_0x29cf17(0x297)](_0x1b9a6b);_0x1959b3[_0x29cf17(0x119)](_0x58cb23+'\x20'+_0x50720b);for(const _0x4d0867 of _0xda05bf){_0x1959b3['push'](renderTaskRow(_0x4d0867,_0x1fba73,_0x212e3e,_0x368662));}const _0x422922=calculateStats(_0xda05bf);_0x1959b3[_0x29cf17(0x119)](formatStats(_0x422922)),_0x426390&&_0x1959b3[_0x29cf17(0x119)](a47_0x2874bf[_0x29cf17(0x23d)](_0x29cf17(0x215)+TIMELINE_CONFIG[_0x29cf17(0x1f0)]+_0x29cf17(0x261)+_0x45a65d+_0x29cf17(0x1a5))),_0x1959b3[_0x29cf17(0x119)](''),_0x1959b3[_0x29cf17(0x119)](a47_0x2874bf[_0x29cf17(0x297)](_0x29cf17(0x235))+(_0x29cf17(0x1a9)+_0x123b2c['id']+'\x20logs')+a47_0x2874bf[_0x29cf17(0x297)]('\x20to\x20see\x20detailed\x20logs'));}else _0x1959b3[_0x29cf17(0x119)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x1959b3['join']('\x0a');}[a47_0x3f412b(0x246)](_0x7c6da6,_0x310f16){const _0x11dd6e=a47_0x3f412b,_0x515d2a=new Date(_0x7c6da6[_0x11dd6e(0x194)])[_0x11dd6e(0x241)](),_0xef6cbc=_0x7c6da6[_0x11dd6e(0x27b)]?new Date(_0x7c6da6[_0x11dd6e(0x27b)])[_0x11dd6e(0x241)]():Date['now'](),_0x2cb0a3=_0xef6cbc-_0x515d2a,_0x37cf33=[];for(const _0x4df5cd of _0x310f16){if(_0x4df5cd[_0x11dd6e(0x19c)]){const _0x252384=new Date(_0x4df5cd[_0x11dd6e(0x19c)])[_0x11dd6e(0x241)](),_0x3abaa0=_0x4df5cd[_0x11dd6e(0xf9)]?new Date(_0x4df5cd[_0x11dd6e(0xf9)])[_0x11dd6e(0x241)]():Date['now']();_0x37cf33[_0x11dd6e(0x119)]({'name':_0x4df5cd['fullName'],'state':_0x4df5cd['state']||_0x11dd6e(0x109),'window':{'start':_0x252384,'end':_0x3abaa0,'duration':_0x3abaa0-_0x252384}});}else _0x37cf33['push']({'name':_0x4df5cd[_0x11dd6e(0xfb)],'state':_0x4df5cd[_0x11dd6e(0x211)]||'planned','window':undefined});}const _0x553389=calculateStats(_0x37cf33);return{'attempt':{'id':_0x7c6da6['id'],'status':_0x7c6da6[_0x11dd6e(0x237)]?_0x7c6da6[_0x11dd6e(0x137)]?'success':_0x11dd6e(0x1a3):'running','createdAt':_0x7c6da6[_0x11dd6e(0x194)],'finishedAt':_0x7c6da6[_0x11dd6e(0x27b)],'duration_ms':_0x2cb0a3},'tasks':_0x37cf33[_0x11dd6e(0x11e)](_0x480752=>({'name':_0x480752[_0x11dd6e(0x280)],'state':_0x480752[_0x11dd6e(0x211)],'startedAt':_0x480752[_0x11dd6e(0x26c)]?new Date(_0x480752['window'][_0x11dd6e(0x13a)])['toISOString']():null,'updatedAt':_0x480752[_0x11dd6e(0x26c)]?new Date(_0x480752[_0x11dd6e(0x26c)]['end'])[_0x11dd6e(0x154)]():null,'duration_ms':_0x480752[_0x11dd6e(0x26c)]?.['duration']||null})),'stats':_0x553389};}}
|
|
1
|
+
const a47_0x575465=a47_0x1e0b;(function(_0x4b370f,_0x592449){const _0x50ec85=a47_0x1e0b,_0x5797e3=_0x4b370f();while(!![]){try{const _0x2077f2=-parseInt(_0x50ec85(0x23e))/0x1+parseInt(_0x50ec85(0x1ea))/0x2*(parseInt(_0x50ec85(0x283))/0x3)+-parseInt(_0x50ec85(0x250))/0x4+-parseInt(_0x50ec85(0x17e))/0x5*(parseInt(_0x50ec85(0x27b))/0x6)+parseInt(_0x50ec85(0x285))/0x7*(parseInt(_0x50ec85(0x1ae))/0x8)+-parseInt(_0x50ec85(0x1c9))/0x9*(parseInt(_0x50ec85(0x25d))/0xa)+parseInt(_0x50ec85(0x1a7))/0xb*(parseInt(_0x50ec85(0x1b4))/0xc);if(_0x2077f2===_0x592449)break;else _0x5797e3['push'](_0x5797e3['shift']());}catch(_0x10019a){_0x5797e3['push'](_0x5797e3['shift']());}}}(a47_0x2ddc,0x54640));import a47_0x587877 from'chalk';import{existsSync}from'fs';import a47_0x110fcc from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';function a47_0x1e0b(_0xc1d9fe,_0x3d14d5){_0xc1d9fe=_0xc1d9fe-0x16b;const _0x2ddcd5=a47_0x2ddc();let _0x1e0bf1=_0x2ddcd5[_0xc1d9fe];return _0x1e0bf1;}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 a47_0x14d0cb from'prompts';function getAttemptStatusDisplay(_0x415c69){const _0x2ad127=a47_0x1e0b;if(!_0x415c69)return{'icon':'⏳','text':''};const {done:_0x5d8b7a,success:_0x50cf8e,cancelRequested:_0x2635fc}=_0x415c69;if(!_0x5d8b7a)return _0x2635fc?{'icon':'🛑','text':a47_0x587877[_0x2ad127(0x213)](_0x2ad127(0x235))}:{'icon':'🔄','text':a47_0x587877[_0x2ad127(0x253)](_0x2ad127(0x2c9))};if(_0x50cf8e)return{'icon':'✅','text':a47_0x587877[_0x2ad127(0x1e5)]('success')};return{'icon':'❌','text':a47_0x587877[_0x2ad127(0x289)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a47_0x575465(0x2d7)](_0x1b8223,_0x182005,_0x3d41da=0x0){const _0xefb83e=a47_0x575465;return _0x1b8223[_0x3d41da]||_0x182005[_0xefb83e(0x25a)];}[a47_0x575465(0x218)](_0xeb36d,_0x12c6b6,_0x308cb8=0x0){const _0x441a25=a47_0x575465,_0x17de8a=this['resolveProject'](_0xeb36d,_0x12c6b6,_0x308cb8);if(!_0x17de8a)return console['error'](a47_0x587877[_0x441a25(0x289)](_0x441a25(0x1fb)),_0x441a25(0x207)),console[_0x441a25(0x18b)](a47_0x587877[_0x441a25(0x1e3)](_0x441a25(0x191))),null;return _0x17de8a;}[a47_0x575465(0x234)](_0x3d1140,_0x38eae9){const _0x470542=a47_0x575465;if(_0x3d1140[0x0]){const _0xcc90d0=_0x3d1140[0x0][_0x470542(0x1ee)]('.');if(_0xcc90d0[_0x470542(0x203)]===0x1)return{'projectName':_0xcc90d0[0x0],'workflowName':undefined};else return _0xcc90d0[_0x470542(0x203)]===0x2?{'projectName':_0xcc90d0[0x0],'workflowName':_0xcc90d0[0x1]}:(console[_0x470542(0x18b)](a47_0x587877[_0x470542(0x289)](_0x470542(0x1fb)),_0x470542(0x2f2)),null);}return{'projectName':_0x38eae9[_0x470542(0x25a)],'workflowName':undefined};}[a47_0x575465(0x182)](_0x5de4c2,_0x392dc0,_0x1d9f6f=0x0){const _0x588460=a47_0x575465;if(_0x5de4c2[_0x1d9f6f])return _0x5de4c2[_0x1d9f6f];if(_0x392dc0[_0x588460(0x25a)]){const _0x441615=a47_0x110fcc['join'](process['cwd'](),_0x588460(0x280),_0x392dc0[_0x588460(0x25a)]);if(existsSync(a47_0x110fcc[_0x588460(0x1e2)](_0x441615,_0x588460(0x22f))))return _0x441615;}return undefined;}async[a47_0x575465(0x2f1)](_0x545c3e,_0x6666a2,_0x5edb6e){const _0x391c33=a47_0x575465;try{const _0x3214f8=await _0x545c3e[_0x391c33(0x238)][_0x391c33(0x280)](_0x6666a2,{'limit':0x1});if(_0x3214f8['length']>0x0){const _0x2bd903=_0x3214f8[0x0]['id'],_0x20f93a=getWorkflowUrl(_0x5edb6e,_0x2bd903);console[_0x391c33(0x18b)]('\x20\x20Console:\x20'+a47_0x587877[_0x391c33(0x200)](_0x20f93a));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x231);[a47_0x575465(0x257)]=a47_0x575465(0x30d);async[a47_0x575465(0x28f)](_0xf6a699){const _0x10e924=a47_0x575465,{options:_0x35a2d1,args:_0x191ce6,tdx:_0x57fe1d}=_0xf6a699,_0x4fb9c6=_0x191ce6[0x0],_0x183ce8=_0x35a2d1['clear'];if(_0x183ce8)return saveSessionContext({'workflow_project':undefined},_0x35a2d1['session']),console[_0x10e924(0x28a)](a47_0x587877[_0x10e924(0x1e5)](_0x10e924(0x1bb))),0x0;if(!_0x4fb9c6)return console[_0x10e924(0x18b)](a47_0x587877[_0x10e924(0x289)](_0x10e924(0x1fb)),'Project\x20name\x20is\x20required'),console[_0x10e924(0x18b)](a47_0x587877['dim']('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x10e924(0x18b)](a47_0x587877[_0x10e924(0x1e3)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x5a9646=await withSpinner(_0x10e924(0x217)+_0x4fb9c6+_0x10e924(0x2d5),()=>_0x57fe1d[_0x10e924(0x238)]['resolveProjectId'](_0x4fb9c6),{'verbose':_0x35a2d1['verbose']}),{name:_0x25bf50}=_0x5a9646[_0x10e924(0x308)];return saveSessionContext({'workflow_project':_0x25bf50},_0x35a2d1['session']),console[_0x10e924(0x28a)](a47_0x587877[_0x10e924(0x1e5)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a47_0x587877[_0x10e924(0x200)](_0x25bf50))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x1db);[a47_0x575465(0x257)]=a47_0x575465(0x29b);async[a47_0x575465(0x28f)](_0x5312dd){const _0x18ff08=a47_0x575465,{options:_0x2800f5,args:_0x424f82,tdx:_0x530aeb}=_0x5312dd,_0x59ad98=_0x424f82[0x0];_0x2800f5[_0x18ff08(0x246)]&&_0x59ad98&&console['error'](_0x18ff08(0x2c5)+_0x59ad98);const _0x260c08=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x530aeb['workflow']['projects'](_0x59ad98,{'limit':_0x2800f5[_0x18ff08(0x19a)]}),{'verbose':_0x2800f5[_0x18ff08(0x246)]});let _0x3d4a95=_0x260c08[_0x18ff08(0x308)];_0x3d4a95['sort']((_0x3f10be,_0x531056)=>_0x3f10be[_0x18ff08(0x311)][_0x18ff08(0x1c7)](_0x531056[_0x18ff08(0x311)]));const _0x577f57=_0x2800f5[_0x18ff08(0x19a)]||0x64,_0x403796=_0x3d4a95[_0x18ff08(0x203)]>=_0x577f57?a47_0x587877[_0x18ff08(0x1e3)](_0x18ff08(0x205)):'';console[_0x18ff08(0x18b)]('✔\x20Found\x20'+_0x3d4a95[_0x18ff08(0x203)]+_0x18ff08(0x2d4)+(_0x3d4a95[_0x18ff08(0x203)]!==0x1?'s':'')+_0x403796);if(_0x2800f5[_0x18ff08(0x1c3)]===_0x18ff08(0x2f5)||_0x2800f5[_0x18ff08(0x1c3)]==='jsonl'||_0x2800f5['format']===_0x18ff08(0x1b5))await handleSDKOutput(_0x3d4a95,_0x2800f5);else{if(_0x3d4a95[_0x18ff08(0x203)]===0x0)_0x59ad98?console[_0x18ff08(0x28a)]('No\x20projects\x20match\x20pattern:\x20'+_0x59ad98):console[_0x18ff08(0x28a)](_0x18ff08(0x19b));else{const _0x5deead=_0x3d4a95['map'](_0x4b0be6=>{const _0x485827=_0x18ff08,_0x5abd4e=_0x4b0be6[_0x485827(0x177)]?.[_0x485827(0x2f7)](_0x4109c5=>_0x4109c5[_0x485827(0x29c)]===_0x485827(0x16e)),_0x4deadb=_0x5abd4e?a47_0x587877[_0x485827(0x1e3)](_0x485827(0x248)):'';return _0x485827(0x1ef)+_0x4b0be6['name']+_0x4deadb;});await writeOutput(_0x5deead['join']('\x0a'),_0x2800f5[_0x18ff08(0x307)],_0x18ff08(0x29d));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x1a9);['description']=a47_0x575465(0x1fa);async[a47_0x575465(0x28f)](_0xeea51c){const _0x9fa979=a47_0x575465,{options:_0x4b8d89,args:_0x36d05e,tdx:_0x5d0c5e}=_0xeea51c,_0x240407=this['resolveProject'](_0x36d05e,_0x4b8d89);_0x4b8d89[_0x9fa979(0x246)]&&_0x240407&&console[_0x9fa979(0x18b)]('Project\x20filter:\x20'+_0x240407);const _0x14a898=await withSpinner('Listing\x20workflows...',()=>_0x5d0c5e[_0x9fa979(0x238)][_0x9fa979(0x280)](_0x240407,{'limit':_0x4b8d89[_0x9fa979(0x19a)]}),{'verbose':_0x4b8d89[_0x9fa979(0x246)]});let _0x2f3af8=_0x14a898[_0x9fa979(0x308)];_0x2f3af8[_0x9fa979(0x2bc)]((_0x4817a9,_0x36a810)=>{const _0x193605=_0x9fa979,_0xa1b707=_0x4817a9[_0x193605(0x311)]['localeCompare'](_0x36a810['name']);if(_0xa1b707!==0x0)return _0xa1b707;return(_0x4817a9[_0x193605(0x212)]?.['name']||'')[_0x193605(0x1c7)](_0x36a810[_0x193605(0x212)]?.['name']||'');});const _0x35d175=_0x4b8d89[_0x9fa979(0x19a)]||0x64,_0x24cf0a=_0x2f3af8[_0x9fa979(0x203)]>=_0x35d175?a47_0x587877[_0x9fa979(0x1e3)](_0x9fa979(0x205)):'';console[_0x9fa979(0x18b)](_0x9fa979(0x2fc)+_0x2f3af8[_0x9fa979(0x203)]+_0x9fa979(0x224)+(_0x2f3af8[_0x9fa979(0x203)]!==0x1?'s':'')+_0x24cf0a);if(_0x4b8d89[_0x9fa979(0x1c3)]===_0x9fa979(0x2f5)||_0x4b8d89[_0x9fa979(0x1c3)]===_0x9fa979(0x279)||_0x4b8d89[_0x9fa979(0x1c3)]==='table')await handleSDKOutput(_0x2f3af8,_0x4b8d89);else{if(_0x2f3af8['length']===0x0)_0x240407?console[_0x9fa979(0x28a)](_0x9fa979(0x2e0)+_0x240407):console['log']('No\x20workflows\x20found');else{const _0x270f88=_0x4b8d89['site'],_0x488d0c=_0x2f3af8[_0x9fa979(0x302)](_0x4573db=>{const _0x2d6ad9=_0x9fa979,_0x5093b7=a47_0x587877[_0x2d6ad9(0x1e3)]('#'+_0x4573db['id']),_0xe45de2=hyperlink(_0x5093b7,getWorkflowUrl(_0x270f88,_0x4573db['id'])),_0x10c473=_0x4573db[_0x2d6ad9(0x212)]?.['name']?a47_0x587877[_0x2d6ad9(0x1e3)]('\x20('+_0x4573db[_0x2d6ad9(0x212)][_0x2d6ad9(0x311)]+')'):'';return'📋\x20'+_0xe45de2+'\x20'+_0x4573db['name']+_0x10c473;});await writeOutput(_0x488d0c[_0x9fa979(0x1e2)]('\x0a'),_0x4b8d89[_0x9fa979(0x307)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x1d4);[a47_0x575465(0x257)]=a47_0x575465(0x1a0);async[a47_0x575465(0x28f)](_0x4e8cd1){const _0x1688fa=a47_0x575465,{options:_0x291eff,args:_0x721933,tdx:_0x5c3ecd}=_0x4e8cd1,_0x82fc61=this['parseProjectWorkflowPattern'](_0x721933,_0x291eff);if(!_0x82fc61)return 0x1;const {projectName:_0x339ae7,workflowName:_0x429452}=_0x82fc61;if(_0x291eff[_0x1688fa(0x246)]){if(_0x339ae7&&_0x429452)console[_0x1688fa(0x18b)](_0x1688fa(0x240)+_0x339ae7+'.'+_0x429452);else _0x339ae7&&console[_0x1688fa(0x18b)]('Filter:\x20project='+_0x339ae7);const _0x453f2c=_0x291eff['status'];_0x453f2c&&console[_0x1688fa(0x18b)](_0x1688fa(0x251)+_0x453f2c);}let _0xc49a7c=0x28;if(process[_0x1688fa(0x17f)][_0x1688fa(0x189)]&&!_0x291eff[_0x1688fa(0x307)]&&!_0x291eff[_0x1688fa(0x1c3)]){const _0x5f3cd6=process['stdout'][_0x1688fa(0x2d3)]||0x28;_0xc49a7c=Math[_0x1688fa(0x27d)](0x14,Math[_0x1688fa(0x1ba)](_0x5f3cd6*0x2/0x3));}const _0x3db177=_0x291eff['limit']||_0xc49a7c,_0x4a8afc=await withSpinner(_0x1688fa(0x1e6),()=>_0x5c3ecd['workflow'][_0x1688fa(0x179)]({'projectName':_0x339ae7,'workflowName':_0x429452,'status':_0x291eff[_0x1688fa(0x214)],'fromTime':_0x291eff[_0x1688fa(0x1e0)],'toTime':_0x291eff['to'],'limit':_0x3db177}),{'verbose':_0x291eff[_0x1688fa(0x246)]}),_0x63534f=_0x4a8afc[_0x1688fa(0x308)];_0x63534f[_0x1688fa(0x2bc)]((_0x9cc86e,_0x4dc9ed)=>{const _0x2abfe8=_0x1688fa,_0x28f95b=_0x9cc86e[_0x2abfe8(0x28c)]||'',_0x261bac=_0x4dc9ed[_0x2abfe8(0x28c)]||'';return _0x261bac[_0x2abfe8(0x1c7)](_0x28f95b);});_0x63534f[_0x1688fa(0x203)]>=_0x3db177?console['error']('✔\x20Showing\x20'+_0x63534f['length']+_0x1688fa(0x1b0)+a47_0x587877[_0x1688fa(0x1e3)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x1688fa(0x18b)]('✔\x20Found\x20'+_0x63534f[_0x1688fa(0x203)]+_0x1688fa(0x2d9)+(_0x63534f[_0x1688fa(0x203)]!==0x1?'s':''));if(_0x291eff[_0x1688fa(0x1c3)]===_0x1688fa(0x2f5)||_0x291eff[_0x1688fa(0x1c3)]===_0x1688fa(0x279)||_0x291eff['format']===_0x1688fa(0x1b5))await handleSDKOutput(_0x63534f,_0x291eff);else{if(!process[_0x1688fa(0x17f)][_0x1688fa(0x189)]||_0x291eff[_0x1688fa(0x307)]){if(_0x63534f[_0x1688fa(0x203)]===0x0){if(_0x339ae7&&_0x429452)console[_0x1688fa(0x28a)](_0x1688fa(0x16b)+_0x339ae7+'.'+_0x429452);else _0x339ae7?console[_0x1688fa(0x28a)](_0x1688fa(0x2e9)+_0x339ae7):console[_0x1688fa(0x28a)](_0x1688fa(0x1f8));}else{const _0x155b18=_0x291eff['site'],_0x5eee21=this['renderSessionsTimeline'](_0x63534f,_0x155b18);_0x291eff[_0x1688fa(0x307)]?await writeOutput(_0x5eee21,_0x291eff[_0x1688fa(0x307)],'list'):console[_0x1688fa(0x28a)](_0x5eee21);}!_0x339ae7&&(console[_0x1688fa(0x18b)](''),console[_0x1688fa(0x18b)](a47_0x587877[_0x1688fa(0x1e3)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x1688fa(0x18b)](a47_0x587877[_0x1688fa(0x1e3)](_0x1688fa(0x20f))+'or'+a47_0x587877['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x63534f[_0x1688fa(0x203)]===0x0){if(_0x339ae7&&_0x429452)console[_0x1688fa(0x28a)](_0x1688fa(0x16b)+_0x339ae7+'.'+_0x429452);else _0x339ae7?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x339ae7):console[_0x1688fa(0x28a)](_0x1688fa(0x1f8));}else await this[_0x1688fa(0x263)](_0x63534f,_0x4e8cd1,_0x339ae7);}}return 0x0;}[a47_0x575465(0x282)](_0x443ab7,_0x2d37dd){const _0x414bd7=a47_0x575465,_0x58c875=[],_0x26adf3=new Map();let _0x557f1c=Infinity,_0x1d2666=-Infinity;for(const _0x4a817a of _0x443ab7){if(_0x4a817a[_0x414bd7(0x2af)]?.[_0x414bd7(0x186)]){const _0x4538d6=new Date(_0x4a817a[_0x414bd7(0x2af)][_0x414bd7(0x186)])[_0x414bd7(0x23a)](),_0x35bc05=_0x4a817a[_0x414bd7(0x2af)][_0x414bd7(0x2ca)]?new Date(_0x4a817a[_0x414bd7(0x2af)]['finishedAt'])[_0x414bd7(0x23a)]():Date['now'](),_0x5f67a=_0x4a817a[_0x414bd7(0x212)]?.[_0x414bd7(0x311)]||_0x414bd7(0x230);!_0x26adf3['has'](_0x5f67a)&&_0x26adf3[_0x414bd7(0x2da)](_0x5f67a,[]),_0x26adf3[_0x414bd7(0x288)](_0x5f67a)[_0x414bd7(0x294)]({'session':_0x4a817a,'startTime':_0x4538d6,'endTime':_0x35bc05,'duration':_0x35bc05-_0x4538d6}),_0x557f1c=Math[_0x414bd7(0x259)](_0x557f1c,_0x4538d6),_0x1d2666=Math[_0x414bd7(0x27d)](_0x1d2666,_0x35bc05);}}if(_0x26adf3['size']===0x0)return _0x414bd7(0x2b2);const _0x406790=process[_0x414bd7(0x17f)]['columns']||0x78,_0x1c3189=0x1e,_0x13e65d=0x32,_0xab62e1=0x4,_0x309e78=Math['min'](_0x13e65d,Math[_0x414bd7(0x27d)](_0x1c3189,Math[_0x414bd7(0x1ba)](_0x406790*0.3))),_0x6c8e56=_0x406790-_0x309e78-TIMELINE_CONFIG['GUTTER']-0x3-_0xab62e1,_0x419b23=_0x1d2666-_0x557f1c,_0xaeae60=_0x419b23/_0x309e78,_0x1575ed=renderTimeAxis({'startTime':_0x557f1c,'endTime':_0x1d2666,'durationMs':_0x419b23,'msPerChar':_0xaeae60},_0x309e78),_0x1279be=[];for(const _0x703859 of _0x26adf3[_0x414bd7(0x223)]()){_0x1279be['push'](..._0x703859);}_0x1279be[_0x414bd7(0x2bc)]((_0x3de5f5,_0x408d18)=>_0x408d18[_0x414bd7(0x28d)]-_0x3de5f5[_0x414bd7(0x28d)]);const _0x2c8917=new Date(_0x557f1c),_0x2fb484=formatDate(_0x2c8917),_0x2d0858=_0xab62e1+TIMELINE_CONFIG[_0x414bd7(0x2ae)]+TIMELINE_CONFIG[_0x414bd7(0x1b2)]+_0x6c8e56,_0x8246e8='\x20'[_0x414bd7(0x1d0)](_0x2d0858-_0x2fb484['length']),_0x117b78=_0x8246e8+a47_0x587877[_0x414bd7(0x1e3)](_0x2fb484)+'\x20'+_0x1575ed;_0x58c875['push'](_0x117b78);const _0x2cc3ba=0x16;let _0xc2be33=0x0;for(const _0x12b1ff of _0x1279be){const _0x3876f0=_0x12b1ff[_0x414bd7(0x264)][_0x414bd7(0x212)]?.[_0x414bd7(0x311)]||'?',_0x2b8acc=Math[_0x414bd7(0x259)](stringWidth(_0x3876f0),_0x2cc3ba);_0xc2be33=Math[_0x414bd7(0x27d)](_0xc2be33,_0x2b8acc);}for(const _0x7eb19e of _0x1279be){const {session:_0x9d0427,startTime:_0x310700,endTime:_0x3d0d45,duration:_0x15d2c6}=_0x7eb19e,_0x1f4c88=_0x9d0427[_0x414bd7(0x212)]?.['id'],_0x656175=_0x9d0427['id'],_0x1881a4=_0x9d0427['project']?.[_0x414bd7(0x311)]||'?',_0x3220a1=_0x9d0427[_0x414bd7(0x238)]?.[_0x414bd7(0x311)]||'?';let _0x38dfc4,_0x3e9057;if(_0x9d0427['lastAttempt']){const _0x1d8990=_0x9d0427[_0x414bd7(0x2af)];!_0x1d8990[_0x414bd7(0x1cc)]?(_0x38dfc4=_0x1d8990[_0x414bd7(0x2cd)]?'🛑':'🔄',_0x3e9057=_0x1d8990[_0x414bd7(0x2cd)]?a47_0x587877[_0x414bd7(0x213)]:a47_0x587877[_0x414bd7(0x253)]):(_0x38dfc4=_0x1d8990[_0x414bd7(0x1d9)]?'✅':'❌',_0x3e9057=_0x1d8990[_0x414bd7(0x1d9)]?a47_0x587877[_0x414bd7(0x1e5)]:a47_0x587877[_0x414bd7(0x289)]);}else _0x38dfc4='⏳',_0x3e9057=a47_0x587877[_0x414bd7(0x1e3)];const _0xd8ddc6='#'+_0x656175,_0x4e4e46=_0x1f4c88?hyperlink(_0xd8ddc6,getWorkflowSessionUrl(_0x2d37dd,_0x1f4c88,_0x656175)):_0xd8ddc6;let _0x1a5c37=_0x1881a4;stringWidth(_0x1881a4)>_0x2cc3ba&&(_0x1a5c37=_0x1881a4[_0x414bd7(0x2cc)](0x0,_0x2cc3ba-0x1)+'…');const _0x1efefe=a47_0x587877[_0x414bd7(0x1e3)](_0x1a5c37),_0x284e02=stringWidth(_0x1a5c37),_0x17b869='\x20'[_0x414bd7(0x1d0)](_0xc2be33-stringWidth(_0x1a5c37)+0x2),_0x135fca='('+formatElapsed(_0x15d2c6)+')',_0x84581c=stringWidth(_0x135fca),_0x385508=stringWidth(_0xd8ddc6),_0x491bb2=_0x385508+0x1+_0x284e02+_0x17b869[_0x414bd7(0x203)],_0x44e8a8=_0x6c8e56-_0x491bb2-_0x84581c-0x1-0x8;let _0x2a1798=_0x3220a1;stringWidth(_0x2a1798)>_0x44e8a8&&(_0x2a1798=_0x2a1798[_0x414bd7(0x2cc)](0x0,_0x44e8a8-0x1)+'…');const _0x1eb040=_0x4e4e46+'\x20'+_0x1efefe+_0x17b869+_0x2a1798,_0x3e1bee=stringWidth(_0x1eb040),_0x3f3747=_0x6c8e56-_0x3e1bee-_0x84581c,_0x276bb5=_0x1eb040+'\x20'['repeat'](Math['max'](0x1,_0x3f3747))+a47_0x587877[_0x414bd7(0x1e3)](_0x135fca),_0x3c2224=Math[_0x414bd7(0x1ba)]((_0x310700-_0x557f1c)/_0xaeae60),_0xc3ea2d=Math[_0x414bd7(0x1ba)]((_0x3d0d45-_0x557f1c)/_0xaeae60),_0x1ea9ad=Math[_0x414bd7(0x27d)](_0x3c2224+0x1,_0xc3ea2d),_0x33e92f=new Array(_0x309e78)[_0x414bd7(0x297)]('\x20');for(let _0x252003=_0x3c2224;_0x252003<Math[_0x414bd7(0x259)](_0x1ea9ad,_0x309e78);_0x252003++){_0x33e92f[_0x252003]='─';}const _0x194ce6=_0x33e92f[_0x414bd7(0x302)](_0x2e0602=>_0x2e0602==='\x20'?'\x20':_0x3e9057(_0x2e0602))[_0x414bd7(0x1e2)]('');_0x58c875['push'](_0x38dfc4+'\x20'+_0x276bb5+'│'+_0x194ce6+'│');}return _0x58c875[_0x414bd7(0x1e2)]('\x0a');}async['navigateSessionsInteractive'](_0x395d58,_0x41b7c0,_0x31c72b){const _0x166a4e=a47_0x575465,{options:_0x108667,tdx:_0x52f3d4}=_0x41b7c0,_0x242cd0=_0x108667['site'],{timelineRows:_0x289e43,timeAxisHeader:_0x540b0f}=this[_0x166a4e(0x312)](_0x395d58,_0x242cd0),_0x379dc6=_0x289e43['filter'](_0xe3405b=>_0xe3405b['attemptId']);if(_0x379dc6[_0x166a4e(0x203)]===0x0){const _0x34277f=this[_0x166a4e(0x282)](_0x395d58,_0x242cd0);console[_0x166a4e(0x28a)](_0x34277f);!_0x31c72b&&(console[_0x166a4e(0x18b)](''),console[_0x166a4e(0x18b)](a47_0x587877['dim'](_0x166a4e(0x1a1))),console['error'](a47_0x587877[_0x166a4e(0x1e3)](_0x166a4e(0x20f))+'or'+a47_0x587877[_0x166a4e(0x1e3)](_0x166a4e(0x1a2))));return;}_0x540b0f&&console[_0x166a4e(0x28a)](_0x540b0f);const _0x887228=_0x289e43[_0x166a4e(0x184)](_0xb43476=>_0xb43476[_0x166a4e(0x1da)])[_0x166a4e(0x302)](_0x1a2f0f=>({'title':_0x1a2f0f[_0x166a4e(0x1f7)],'value':_0x1a2f0f['attemptId']})),_0x263eda=process[_0x166a4e(0x17f)][_0x166a4e(0x2d3)]||0x3c,_0x1897bb=Math[_0x166a4e(0x27d)](0x28,Math[_0x166a4e(0x1ba)](_0x263eda*0x2/0x3)),_0x493cfc=await a47_0x14d0cb({'type':_0x166a4e(0x262),'name':_0x166a4e(0x1da),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x887228,'initial':-0x1,'limit':_0x1897bb,'clearFirst':!![],'fallback':{'title':_0x166a4e(0x20d),'value':null},'suggest':(_0x215e73,_0x14a3e1)=>{const _0x4ee84f=_0x166a4e;if(!_0x215e73)return Promise[_0x4ee84f(0x17a)](_0x14a3e1);const _0x240199=_0x14a3e1[_0x4ee84f(0x184)](_0x15a92=>{const _0x3fc004=_0x4ee84f,_0x5ee9f6=_0x15a92;return _0x5ee9f6[_0x3fc004(0x243)]['toLowerCase']()[_0x3fc004(0x188)](_0x215e73[_0x3fc004(0x1dd)]());});return Promise[_0x4ee84f(0x17a)](_0x240199);}}),_0x1b2129=()=>{const _0x2b5800=_0x166a4e;process[_0x2b5800(0x17f)]['write']('\x1b[1A\x1b[2K'),process['stdout'][_0x2b5800(0x270)](_0x2b5800(0x1d5)),process[_0x2b5800(0x17f)][_0x2b5800(0x270)](_0x2b5800(0x1d5));},_0x45dbbe=_0x493cfc&&_0x493cfc['attemptId']&&_0x493cfc[_0x166a4e(0x1da)]!==null&&_0x493cfc[_0x166a4e(0x1da)][_0x166a4e(0x2a2)]()!=='';if(!_0x45dbbe){_0x1b2129(),console[_0x166a4e(0x28a)](a47_0x587877['dim'](_0x166a4e(0x18d)));return;}_0x1b2129();const _0x376bfb=_0x395d58['find'](_0x5b251a=>_0x5b251a[_0x166a4e(0x2af)]?.['id']===_0x493cfc[_0x166a4e(0x1da)]);if(_0x376bfb){const _0x2e3fea=_0x376bfb[_0x166a4e(0x212)]?.[_0x166a4e(0x311)]||'?',_0x178e23=_0x376bfb[_0x166a4e(0x238)]?.[_0x166a4e(0x311)]||'?';console[_0x166a4e(0x28a)](_0x166a4e(0x22b)+a47_0x587877[_0x166a4e(0x1e3)](_0x2e3fea)+',\x20Workflow:\x20'+a47_0x587877[_0x166a4e(0x1e3)](_0x178e23));}const _0x1868ee=new WorkflowTimelineCommand();await _0x1868ee[_0x166a4e(0x28f)]({'args':[],'options':{..._0x108667,'attemptId':_0x493cfc[_0x166a4e(0x1da)]},'tdx':_0x52f3d4});}[a47_0x575465(0x312)](_0x2a2cae,_0x41ddfd){const _0x3d2ad1=a47_0x575465,_0x19064e=new Map();for(const _0x57391b of _0x2a2cae){_0x57391b['id']&&_0x57391b[_0x3d2ad1(0x2af)]?.['id']&&_0x19064e[_0x3d2ad1(0x2da)](_0x57391b['id'],_0x57391b['lastAttempt']['id']);}const _0x1e1502=[];let _0x28b8ed='';const _0x3c92c8=this[_0x3d2ad1(0x282)](_0x2a2cae,_0x41ddfd),_0x358f0f=_0x3c92c8[_0x3d2ad1(0x1ee)]('\x0a');for(const _0x3c096b of _0x358f0f){if(_0x3c096b[_0x3d2ad1(0x1b8)](_0x3d2ad1(0x21f))||_0x3c096b[_0x3d2ad1(0x20e)](/^\s+\d{4}-\d{2}-\d{2}/))_0x28b8ed=_0x3c096b;else{if(_0x3c096b[_0x3d2ad1(0x20e)](/^[✅❌🔄🛑⏳]/)){const _0x26e927=_0x3c096b[_0x3d2ad1(0x20e)](/#(\d+)/),_0x295b06=_0x26e927?_0x26e927[0x1]:null,_0x37a613=_0x295b06?_0x19064e[_0x3d2ad1(0x288)](_0x295b06)||null:null,_0x4bbf33=_0x2a2cae['find'](_0x1799f6=>_0x1799f6['id']===_0x295b06),_0x1e614c=_0x4bbf33?.[_0x3d2ad1(0x212)]?.['name']||'';_0x1e1502[_0x3d2ad1(0x294)]({'displayLine':_0x3c096b,'attemptId':_0x37a613,'projectName':_0x1e614c});}}}return{'timelineRows':_0x1e1502,'timeAxisHeader':_0x28b8ed};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a47_0x575465(0x2c4);[a47_0x575465(0x257)]=a47_0x575465(0x1b6);async[a47_0x575465(0x28f)](_0x3a3f48){const _0x113831=a47_0x575465,{options:_0x2506a3,args:_0x5af021,tdx:_0x32c28a}=_0x3a3f48,_0x178d5a=this[_0x113831(0x234)](_0x5af021,_0x2506a3);if(!_0x178d5a)return 0x1;const {projectName:_0x534e0b,workflowName:_0x3cd8dd}=_0x178d5a,_0x2bae23=_0x2506a3[_0x113831(0x2bf)];if(_0x2506a3['verbose']){if(_0x534e0b&&_0x3cd8dd)console[_0x113831(0x18b)](_0x113831(0x240)+_0x534e0b+'.'+_0x3cd8dd);else _0x534e0b&&console[_0x113831(0x18b)](_0x113831(0x233)+_0x534e0b);_0x2bae23&&console[_0x113831(0x18b)](_0x113831(0x1cf));}const _0x48654f=await withSpinner(_0x113831(0x25c),()=>_0x32c28a['workflow'][_0x113831(0x252)]({'projectName':_0x534e0b,'workflowName':_0x3cd8dd,'includeRetried':_0x2bae23,'limit':_0x2506a3['limit']}),{'verbose':_0x2506a3[_0x113831(0x246)]}),_0x63a49c=_0x48654f[_0x113831(0x308)],_0x45e2ce=_0x2506a3[_0x113831(0x19a)]||0x64,_0x4ff9e8=_0x63a49c[_0x113831(0x203)]>=_0x45e2ce?a47_0x587877[_0x113831(0x1e3)](_0x113831(0x205)):'';console[_0x113831(0x18b)](_0x113831(0x2fc)+_0x63a49c[_0x113831(0x203)]+_0x113831(0x275)+(_0x63a49c[_0x113831(0x203)]!==0x1?'s':'')+_0x4ff9e8);if(_0x2506a3[_0x113831(0x1c3)]==='json'||_0x2506a3[_0x113831(0x1c3)]==='jsonl'||_0x2506a3[_0x113831(0x1c3)]==='table')await handleSDKOutput(_0x63a49c,_0x2506a3);else{if(_0x63a49c[_0x113831(0x203)]===0x0){if(_0x534e0b&&_0x3cd8dd)console['log'](_0x113831(0x278)+_0x534e0b+'.'+_0x3cd8dd);else _0x534e0b?console['log']('No\x20attempts\x20found\x20in\x20project:\x20'+_0x534e0b):console[_0x113831(0x28a)](_0x113831(0x2f6));}else{const _0x4494f7=_0x2506a3[_0x113831(0x180)],_0x16be11=_0x63a49c[_0x113831(0x302)](_0x453cbd=>{const _0x30a1d7=_0x113831,_0x51473b=a47_0x587877[_0x30a1d7(0x1e3)]('#'+_0x453cbd['id']),_0x972d4d=_0x453cbd[_0x30a1d7(0x212)]?.['id'],_0x489c5c=_0x453cbd[_0x30a1d7(0x24e)]||_0x453cbd[_0x30a1d7(0x1d1)],_0x44e2cd=_0x972d4d&&_0x489c5c?hyperlink(_0x51473b,getWorkflowAttemptUrl(_0x4494f7,_0x972d4d,_0x489c5c,_0x453cbd['id'])):_0x51473b,{icon:_0x2bb5ba,text:_0x4698df}=getAttemptStatusDisplay(_0x453cbd),_0x23f582=(_0x453cbd[_0x30a1d7(0x212)]?.['name']||'?')+'.'+(_0x453cbd[_0x30a1d7(0x238)]?.[_0x30a1d7(0x311)]||'?'),_0xad7127=_0x453cbd['sessionTime']?a47_0x587877[_0x30a1d7(0x1e3)](_0x453cbd[_0x30a1d7(0x28c)]):'';return(_0x44e2cd+'\x20'+_0x2bb5ba+(_0x4698df?'\x20'+_0x4698df:'')+'\x20'+_0x23f582+'\x20'+_0xad7127)[_0x30a1d7(0x1d6)]();});await writeOutput(_0x16be11[_0x113831(0x1e2)]('\x0a'),_0x2506a3['output'],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a47_0x575465(0x311)]='workflow:attempt';[a47_0x575465(0x257)]=a47_0x575465(0x1fd);async['execute'](_0x1da668){const _0x28d3cc=a47_0x575465,{options:_0x3677c0,args:_0xc75e75,tdx:_0x1c8ff2}=_0x1da668,_0x4691f2=_0xc75e75[0x0];if(!_0x4691f2)return console[_0x28d3cc(0x18b)](_0x28d3cc(0x2a4)),0x1;_0x3677c0[_0x28d3cc(0x246)]&&console[_0x28d3cc(0x18b)]('Attempt\x20ID:\x20'+_0x4691f2);const _0x10b585=await withSpinner('Getting\x20attempt\x20details...',()=>_0x1c8ff2[_0x28d3cc(0x238)]['attempt'](_0x4691f2),{'verbose':_0x3677c0[_0x28d3cc(0x246)]}),_0x582b63=_0x10b585[_0x28d3cc(0x308)];let _0x316c5d;!_0x582b63[_0x28d3cc(0x1cc)]?_0x316c5d=_0x582b63['cancelRequested']?_0x28d3cc(0x235):_0x28d3cc(0x2c9):_0x316c5d=_0x582b63[_0x28d3cc(0x1d9)]?_0x28d3cc(0x1d9):_0x28d3cc(0x18b);let _0xdc2088;if(_0x582b63[_0x28d3cc(0x186)]&&_0x582b63['finishedAt']){const _0xf9d7ee=new Date(_0x582b63[_0x28d3cc(0x186)])[_0x28d3cc(0x23a)](),_0x4311d2=new Date(_0x582b63[_0x28d3cc(0x2ca)])[_0x28d3cc(0x23a)]();_0xdc2088=Math[_0x28d3cc(0x28e)]((_0x4311d2-_0xf9d7ee)/0x3e8);}const _0x14e101={'attempt_id':_0x582b63['id'],'status':_0x316c5d,..._0x582b63[_0x28d3cc(0x30f)]!==undefined&&{'index':_0x582b63[_0x28d3cc(0x30f)]},..._0x582b63['project']&&{'project':_0x582b63['project'][_0x28d3cc(0x311)]},..._0x582b63[_0x28d3cc(0x238)]&&{'workflow':_0x582b63[_0x28d3cc(0x238)][_0x28d3cc(0x311)]},..._0x582b63[_0x28d3cc(0x1d1)]&&{'session_id':_0x582b63[_0x28d3cc(0x1d1)]},..._0x582b63['sessionTime']&&{'session_time':_0x582b63['sessionTime']},..._0x582b63[_0x28d3cc(0x1b3)]&&{'retry_attempt':_0x582b63[_0x28d3cc(0x1b3)]},..._0xdc2088!==undefined&&{'duration_sec':_0xdc2088},..._0x582b63[_0x28d3cc(0x186)]&&{'created_at':_0x582b63[_0x28d3cc(0x186)]},..._0x582b63[_0x28d3cc(0x2ca)]&&{'finished_at':_0x582b63['finishedAt']},...Object[_0x28d3cc(0x1e1)](_0x582b63[_0x28d3cc(0x1df)])[_0x28d3cc(0x203)]>0x0&&{'params':_0x582b63[_0x28d3cc(0x1df)]}};return await handleSingleObjectOutput(_0x14e101,_0x3677c0),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x1de);[a47_0x575465(0x257)]=a47_0x575465(0x272);async[a47_0x575465(0x28f)](_0x55eff6){const _0x40a267=a47_0x575465,{options:_0x453cfa,args:_0x119694,tdx:_0x4c36e8}=_0x55eff6,_0x16048c=_0x119694[0x0];if(!_0x16048c)return console[_0x40a267(0x18b)](_0x40a267(0x2a4)),0x1;const _0x2f7431=_0x453cfa['includeSubtasks'];_0x453cfa[_0x40a267(0x246)]&&(console[_0x40a267(0x18b)](_0x40a267(0x19c)+_0x16048c),_0x2f7431&&console[_0x40a267(0x18b)]('Including\x20subtasks:\x20yes'));const _0x866f46=await withSpinner(_0x40a267(0x24c),()=>_0x4c36e8['workflow'][_0x40a267(0x1f5)](_0x16048c,_0x2f7431||![]),{'verbose':_0x453cfa[_0x40a267(0x246)]}),_0xffa0fa=_0x866f46[_0x40a267(0x308)];return console[_0x40a267(0x18b)](_0x40a267(0x2fc)+_0xffa0fa[_0x40a267(0x203)]+_0x40a267(0x24b)+(_0xffa0fa['length']!==0x1?'s':'')),await handleSDKOutput(_0xffa0fa,_0x453cfa),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x2a5);[a47_0x575465(0x257)]=a47_0x575465(0x273);async['execute'](_0x54dd43){const _0x927fb6=a47_0x575465,{options:_0x27df39,args:_0x1360d4,tdx:_0x4a11fb}=_0x54dd43,_0xca525=_0x1360d4[0x0];let _0xca346=_0x1360d4[0x1];if(!_0xca525)return console['error'](_0x927fb6(0x2a4)),0x1;_0x27df39[_0x927fb6(0x246)]&&(console[_0x927fb6(0x18b)]('Attempt\x20ID:\x20'+_0xca525),_0xca346&&console[_0x927fb6(0x18b)](_0x927fb6(0x2e7)+_0xca346));const _0x2add8a=await withSpinner('Fetching\x20log\x20files...',()=>_0x4a11fb[_0x927fb6(0x238)][_0x927fb6(0x1bd)](_0xca525,_0xca346),{'verbose':_0x27df39[_0x927fb6(0x246)]}),_0x343414=_0x2add8a['data'];if(_0x343414['length']===0x0)return console[_0x927fb6(0x18b)](_0x927fb6(0x21b)),0x0;if(!_0xca346&&(_0x27df39[_0x927fb6(0x2f5)]||_0x27df39[_0x927fb6(0x1c3)]))return await handleSDKOutput(_0x343414,_0x27df39),0x0;if(!_0xca346){const _0x447923=_0x343414[_0x927fb6(0x302)](_0x16eb17=>({'title':_0x16eb17['taskName']+'\x20('+formatBytes(_0x16eb17['fileSize'])+')','value':_0x16eb17[_0x927fb6(0x1d2)]})),_0xc1a871=await a47_0x14d0cb({'type':_0x927fb6(0x219),'name':'task','message':_0x927fb6(0x2c3),'choices':_0x447923});if(!_0xc1a871[_0x927fb6(0x2e3)])return console[_0x927fb6(0x18b)](_0x927fb6(0x18d)),0x0;_0xca346=_0xc1a871[_0x927fb6(0x2e3)];}const _0x2b532f=await withSpinner('Downloading\x20logs...',()=>_0x4a11fb['workflow'][_0x927fb6(0x30e)](_0xca525,_0xca346),{'verbose':_0x27df39[_0x927fb6(0x246)]}),_0x25f454=_0x2b532f[_0x927fb6(0x308)];return _0x25f454?console[_0x927fb6(0x28a)](_0x25f454):console[_0x927fb6(0x18b)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a47_0x575465(0x17d);[a47_0x575465(0x257)]=a47_0x575465(0x295);async[a47_0x575465(0x28f)](_0x1f637d){const _0xcf33b9=a47_0x575465,{options:_0x4efd79,args:_0x1706c9,tdx:_0x4e156b}=_0x1f637d,_0x28304a=_0x1706c9[0x0];if(!_0x28304a)return console[_0xcf33b9(0x18b)](_0xcf33b9(0x2a4)),0x1;const _0xaf2eb7=_0x4efd79[_0xcf33b9(0x29e)];_0x4efd79['verbose']&&(console[_0xcf33b9(0x18b)]('Attempt\x20ID:\x20'+_0x28304a),_0xaf2eb7&&console['error'](_0xcf33b9(0x29a)+_0xaf2eb7));if(!_0x4efd79[_0xcf33b9(0x1cd)]){if(!isInteractive())return console[_0xcf33b9(0x18b)](a47_0x587877['red'](_0xcf33b9(0x2e8)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xcf33b9(0x18b)](a47_0x587877['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x38e09c=await confirmKey(_0xcf33b9(0x23b)+_0x28304a+'?');if(!_0x38e09c)return console[_0xcf33b9(0x18b)](a47_0x587877[_0xcf33b9(0x213)](_0xcf33b9(0x18d))),0x1;}const _0x10e4d3=await withSpinner(_0xcf33b9(0x198),()=>_0x4e156b[_0xcf33b9(0x238)]['kill'](_0x28304a,_0xaf2eb7),{'verbose':_0x4efd79[_0xcf33b9(0x246)]}),_0x31735b=_0x10e4d3['data'];return console[_0xcf33b9(0x18b)]('✔\x20'+_0x31735b),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x19e);[a47_0x575465(0x257)]='Retry\x20a\x20session\x20or\x20attempt';async[a47_0x575465(0x28f)](_0x2afc07){const _0x5db9ed=a47_0x575465,{options:_0x2442ca,args:_0x5eecaa,tdx:_0x495ed5}=_0x2afc07,_0x101871=_0x5eecaa[0x0];if(!_0x101871)return console[_0x5db9ed(0x18b)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x5db9ed(0x18b)](_0x5db9ed(0x22d)),0x1;let _0x58f159=![],_0x2033f7=_0x101871;if(_0x101871['startsWith']('session:'))_0x58f159=!![],_0x2033f7=_0x101871[_0x5db9ed(0x194)](0x8);else{if(_0x101871['startsWith'](_0x5db9ed(0x1aa)))_0x58f159=![],_0x2033f7=_0x101871[_0x5db9ed(0x194)](0x8);else return console[_0x5db9ed(0x18b)](_0x5db9ed(0x2b6)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x274cd2=_0x2442ca[_0x5db9ed(0x181)],_0x5506e4=_0x2442ca[_0x5db9ed(0x2ec)],_0x56388a=_0x2442ca[_0x5db9ed(0x1df)],_0x283480=_0x2442ca['force'];_0x2442ca[_0x5db9ed(0x246)]&&(console[_0x5db9ed(0x18b)](_0x5db9ed(0x2ee)+(_0x58f159?'session':_0x5db9ed(0x222))+'\x20'+_0x2033f7),_0x274cd2&&console[_0x5db9ed(0x18b)](_0x5db9ed(0x1ac)+_0x274cd2),_0x5506e4&&console['error'](_0x5db9ed(0x2d8)+_0x5506e4),_0x56388a&&console[_0x5db9ed(0x18b)](_0x5db9ed(0x216)+_0x56388a),_0x283480&&console[_0x5db9ed(0x18b)](_0x5db9ed(0x2b8)));let _0x337ed2;if(_0x56388a)try{if(_0x56388a['startsWith']('@')){const _0x5744e4=await import(_0x5db9ed(0x22c)),_0x4a354c=_0x56388a['substring'](0x1),_0x589b0f=await _0x5744e4[_0x5db9ed(0x284)](_0x4a354c,'utf-8');_0x337ed2=JSON['parse'](_0x589b0f);}else _0x337ed2=JSON[_0x5db9ed(0x2b9)](_0x56388a);}catch{return console[_0x5db9ed(0x18b)](_0x5db9ed(0x1a5)),0x1;}if(!_0x2442ca['yes']){if(!isInteractive())return console['error'](a47_0x587877[_0x5db9ed(0x289)](_0x5db9ed(0x2e8)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5db9ed(0x18b)](a47_0x587877[_0x5db9ed(0x1e3)](_0x5db9ed(0x306))),0x1;const _0x3fbc8a=await confirmKey(_0x5db9ed(0x1ed)+(_0x58f159?_0x5db9ed(0x264):_0x5db9ed(0x222))+'\x20'+_0x2033f7+'?');if(!_0x3fbc8a)return console[_0x5db9ed(0x18b)](a47_0x587877['yellow'](_0x5db9ed(0x18d))),0x1;}let _0x569295;_0x58f159?_0x569295=await withSpinner(_0x5db9ed(0x1d8),()=>_0x495ed5[_0x5db9ed(0x238)][_0x5db9ed(0x2a6)](_0x2033f7,{'fromTask':_0x274cd2,'retryParams':_0x337ed2}),{'verbose':_0x2442ca[_0x5db9ed(0x246)]}):_0x569295=await withSpinner(_0x5db9ed(0x183),()=>_0x495ed5[_0x5db9ed(0x238)]['retryAttempt'](_0x2033f7,{'resumeFrom':_0x5506e4,'retryParams':_0x337ed2,'force':_0x283480}),{'verbose':_0x2442ca[_0x5db9ed(0x246)]});const _0x1d3b10=_0x569295['data'];return console[_0x5db9ed(0x18b)](_0x5db9ed(0x172)),console['error']('\x20\x20New\x20attempt\x20ID:\x20'+_0x1d3b10['attemptId']),console[_0x5db9ed(0x18b)](_0x5db9ed(0x26f)+_0x1d3b10[_0x5db9ed(0x1d1)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x21c);[a47_0x575465(0x257)]='Start\x20a\x20workflow\x20run';async['execute'](_0x58a040){const _0x4e0e3c=a47_0x575465,{options:_0x343d4d,args:_0x5cab3c,tdx:_0x175052}=_0x58a040;let _0x1f4571=_0x5cab3c[0x0];if(!_0x1f4571){const _0x18a161=this[_0x4e0e3c(0x2d7)]([],_0x343d4d),_0x4c1203=await withSpinner(_0x4e0e3c(0x305),()=>_0x175052['workflow'][_0x4e0e3c(0x280)](_0x18a161,{'limit':_0x343d4d[_0x4e0e3c(0x19a)]}),{'verbose':_0x343d4d['verbose']}),_0x36e6a8=_0x4c1203[_0x4e0e3c(0x308)];if(_0x36e6a8['length']===0x0)return console[_0x4e0e3c(0x18b)](_0x4e0e3c(0x2d2)),!_0x18a161&&console[_0x4e0e3c(0x18b)](a47_0x587877[_0x4e0e3c(0x1e3)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x4bdaef=_0x36e6a8[_0x4e0e3c(0x302)](_0x32d4c8=>({'title':_0x32d4c8[_0x4e0e3c(0x212)]?.[_0x4e0e3c(0x311)]+'.'+_0x32d4c8['name'],'value':_0x32d4c8[_0x4e0e3c(0x212)]?.['name']+'.'+_0x32d4c8[_0x4e0e3c(0x311)],'description':_0x32d4c8['revision']?_0x4e0e3c(0x286)+_0x32d4c8['revision']:undefined})),_0x5cd6b5=await a47_0x14d0cb({'type':_0x4e0e3c(0x219),'name':_0x4e0e3c(0x238),'message':_0x4e0e3c(0x208),'choices':_0x4bdaef});if(!_0x5cd6b5[_0x4e0e3c(0x238)])return 0x1;_0x1f4571=_0x5cd6b5[_0x4e0e3c(0x238)];}if(!_0x1f4571['includes']('.')){const _0x1ff68b=this[_0x4e0e3c(0x2d7)]([],_0x343d4d);if(_0x1ff68b)_0x1f4571=_0x1ff68b+'.'+_0x1f4571;else return console[_0x4e0e3c(0x18b)](a47_0x587877[_0x4e0e3c(0x289)]('Error:'),_0x4e0e3c(0x20a)),console[_0x4e0e3c(0x18b)](a47_0x587877[_0x4e0e3c(0x1e3)](_0x4e0e3c(0x191))),0x1;}const _0xa307ed=_0x343d4d[_0x4e0e3c(0x30a)],_0x3e48fd=_0x343d4d[_0x4e0e3c(0x28c)],_0x491faa={};if(_0xa307ed&&Array[_0x4e0e3c(0x1b7)](_0xa307ed))for(const _0x281c95 of _0xa307ed){const _0x5dd017=_0x281c95['indexOf']('=');if(_0x5dd017===-0x1)return console[_0x4e0e3c(0x18b)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x281c95),console[_0x4e0e3c(0x18b)](_0x4e0e3c(0x2de)),0x1;const _0x332c80=_0x281c95['substring'](0x0,_0x5dd017),_0x3910dd=_0x281c95[_0x4e0e3c(0x194)](_0x5dd017+0x1);try{_0x491faa[_0x332c80]=JSON[_0x4e0e3c(0x2b9)](_0x3910dd);}catch{_0x491faa[_0x332c80]=_0x3910dd;}}_0x343d4d[_0x4e0e3c(0x246)]&&(console[_0x4e0e3c(0x18b)](_0x4e0e3c(0x300)+_0x1f4571),Object[_0x4e0e3c(0x1e1)](_0x491faa)[_0x4e0e3c(0x203)]>0x0&&console[_0x4e0e3c(0x18b)](_0x4e0e3c(0x290)+JSON[_0x4e0e3c(0x19f)](_0x491faa)),_0x3e48fd&&console['error'](_0x4e0e3c(0x1ad)+_0x3e48fd));const _0x2aef8f=await withSpinner(_0x4e0e3c(0x260),()=>_0x175052[_0x4e0e3c(0x238)]['run'](_0x1f4571,_0x491faa,{'sessionTime':_0x3e48fd}),{'verbose':_0x343d4d['verbose']}),_0x39f9af=_0x2aef8f[_0x4e0e3c(0x308)];console['error']('✔\x20Workflow\x20run\x20started'),console[_0x4e0e3c(0x18b)]('\x20\x20Attempt\x20ID:\x20'+_0x39f9af['id']),console[_0x4e0e3c(0x18b)](_0x4e0e3c(0x26f)+_0x39f9af['sessionId']),console['error']('\x20\x20Project:\x20'+_0x39f9af['project']?.[_0x4e0e3c(0x311)]),console[_0x4e0e3c(0x18b)](_0x4e0e3c(0x1a8)+_0x39f9af[_0x4e0e3c(0x238)]?.[_0x4e0e3c(0x311)]);if(_0x39f9af[_0x4e0e3c(0x212)]?.['id']&&_0x39f9af[_0x4e0e3c(0x1d1)]&&_0x39f9af['id']){const _0x51dfd2=_0x343d4d[_0x4e0e3c(0x180)],_0x26e0fe=getConsoleUrl(_0x51dfd2,'/app/workflows/'+_0x39f9af[_0x4e0e3c(0x212)]['id']+_0x4e0e3c(0x28b)+_0x39f9af[_0x4e0e3c(0x1d1)]+_0x4e0e3c(0x16c)+_0x39f9af['id']);console[_0x4e0e3c(0x18b)](_0x4e0e3c(0x17c)+a47_0x587877[_0x4e0e3c(0x200)](_0x26e0fe));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a47_0x575465(0x2cf);[a47_0x575465(0x257)]=a47_0x575465(0x18f);async[a47_0x575465(0x28f)](_0x1d7ffd){const _0x578a63=a47_0x575465,{options:_0x16fcb5,args:_0x32edd8,tdx:_0x51de98}=_0x1d7ffd,_0x2f2590=_0x32edd8[0x0],_0x4d9974=_0x32edd8[0x1]||'.';if(!_0x2f2590)return console[_0x578a63(0x18b)](_0x578a63(0x261)),console[_0x578a63(0x18b)](_0x578a63(0x2b3)),0x1;const _0x2ef307=_0x16fcb5[_0x578a63(0x2ea)];_0x16fcb5[_0x578a63(0x246)]&&(console[_0x578a63(0x18b)](_0x578a63(0x22b)+_0x2f2590),console[_0x578a63(0x18b)](_0x578a63(0x1eb)+_0x4d9974),_0x2ef307&&console['error'](_0x578a63(0x244)+_0x2ef307));const _0x597789=await withSpinner(_0x578a63(0x1b9)+_0x2f2590+_0x578a63(0x195),()=>_0x51de98['workflow'][_0x578a63(0x199)](_0x2f2590,_0x4d9974,{'revision':_0x2ef307}),{'verbose':_0x16fcb5[_0x578a63(0x246)]}),_0x101c68=_0x597789['data'];return console[_0x578a63(0x18b)](_0x578a63(0x23d)+_0x101c68[_0x578a63(0x196)]),console[_0x578a63(0x18b)](_0x578a63(0x2f0)+_0x101c68[_0x578a63(0x2ea)]),console[_0x578a63(0x18b)](_0x578a63(0x2e1)+_0x101c68[_0x578a63(0x174)]),console[_0x578a63(0x18b)](_0x578a63(0x204)+_0x4d9974+'/'+_0x101c68[_0x578a63(0x196)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a47_0x575465(0x20b);[a47_0x575465(0x257)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a47_0x575465(0x28f)](_0x1aff1e){const _0x141605=a47_0x575465,{options:_0x43bfb2,args:_0x5cad4d,tdx:_0x4f6238}=_0x1aff1e;let _0x17d23c='.',_0x3adad0=_0x43bfb2[_0x141605(0x311)];if(_0x5cad4d[0x0]){const {promises:_0x3bbd06}=await import('fs');try{const _0x6a9ca8=await _0x3bbd06[_0x141605(0x16d)](_0x5cad4d[0x0]);if(_0x6a9ca8['isDirectory']())_0x17d23c=_0x5cad4d[0x0];else return console['error']('Error:\x20'+_0x5cad4d[0x0]+_0x141605(0x2a0)),0x1;}catch{_0x3adad0=_0x5cad4d[0x0],_0x17d23c='.';}}const _0x2dd42a=_0x43bfb2[_0x141605(0x2ea)],_0x507050=_0x43bfb2[_0x141605(0x2cb)];_0x43bfb2[_0x141605(0x246)]&&(console[_0x141605(0x18b)]('Project\x20directory:\x20'+_0x17d23c),_0x3adad0&&console['error'](_0x141605(0x227)+_0x3adad0),_0x2dd42a&&console[_0x141605(0x18b)](_0x141605(0x244)+_0x2dd42a),_0x507050&&console['error'](_0x141605(0x30c)));const _0x4cb16f=await withSpinner(_0x141605(0x1a4),()=>_0x4f6238[_0x141605(0x238)][_0x141605(0x294)](_0x17d23c,{'projectName':_0x3adad0,'revision':_0x2dd42a,'skipValidation':_0x507050}),{'verbose':_0x43bfb2[_0x141605(0x246)]}),_0x2b347d=_0x4cb16f[_0x141605(0x308)];return console[_0x141605(0x18b)]('✔\x20Pushed\x20'+_0x2b347d[_0x141605(0x196)]),console['error'](_0x141605(0x1af)+_0x2b347d[_0x141605(0x2f9)]),console[_0x141605(0x18b)](_0x141605(0x2f0)+_0x2b347d['revision']),await this[_0x141605(0x2f1)](_0x4f6238,_0x2b347d[_0x141605(0x196)],_0x43bfb2['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x2db);[a47_0x575465(0x257)]=a47_0x575465(0x2ad);async[a47_0x575465(0x28f)](_0x21f58e){const _0x4d1cbc=a47_0x575465,{options:_0x1e32ff,args:_0x46b6b2,tdx:_0x5f2a77}=_0x21f58e,_0x5d23d1=_0x46b6b2[0x0],_0x4bbffc=_0x46b6b2[0x1];if(!_0x5d23d1)return console[_0x4d1cbc(0x18b)](a47_0x587877[_0x4d1cbc(0x289)](_0x4d1cbc(0x1fb)),_0x4d1cbc(0x207)),console[_0x4d1cbc(0x18b)](a47_0x587877[_0x4d1cbc(0x1e3)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x277290=_0x1e32ff[_0x4d1cbc(0x2ea)];_0x1e32ff[_0x4d1cbc(0x246)]&&(console[_0x4d1cbc(0x18b)](_0x4d1cbc(0x22b)+_0x5d23d1),_0x4bbffc&&console['error'](_0x4d1cbc(0x18c)+_0x4bbffc),_0x277290&&console[_0x4d1cbc(0x18b)](_0x4d1cbc(0x244)+_0x277290),_0x1e32ff[_0x4d1cbc(0x2b5)]&&console[_0x4d1cbc(0x18b)]('Dry\x20run:\x20yes'));const _0x1f8d56=await withSpinner(_0x4d1cbc(0x291)+_0x5d23d1+'...',()=>_0x5f2a77[_0x4d1cbc(0x238)][_0x4d1cbc(0x2b0)](_0x5d23d1,{'targetDir':_0x4bbffc,'revision':_0x277290}),{'verbose':_0x1e32ff[_0x4d1cbc(0x246)]}),_0x130e07=_0x1f8d56['data'];_0x130e07[_0x4d1cbc(0x236)]?console['error'](_0x4d1cbc(0x1f9)+_0x130e07['projectName']):console['error'](_0x4d1cbc(0x24d)+_0x130e07[_0x4d1cbc(0x196)]);console[_0x4d1cbc(0x18b)](_0x4d1cbc(0x2f0)+_0x130e07[_0x4d1cbc(0x2ea)]),console[_0x4d1cbc(0x18b)](_0x4d1cbc(0x21d)+(a47_0x110fcc[_0x4d1cbc(0x1a3)](process[_0x4d1cbc(0x25f)](),_0x130e07[_0x4d1cbc(0x27c)])||'.')),console[_0x4d1cbc(0x18b)](_0x4d1cbc(0x310)+a47_0x587877[_0x4d1cbc(0x1e5)]('+'+_0x130e07[_0x4d1cbc(0x256)][_0x4d1cbc(0x1d3)]+'\x20new')+',\x20'+(a47_0x587877[_0x4d1cbc(0x213)]('~'+_0x130e07[_0x4d1cbc(0x256)][_0x4d1cbc(0x1e9)]+_0x4d1cbc(0x2c8))+',\x20')+(a47_0x587877['red']('-'+_0x130e07[_0x4d1cbc(0x256)][_0x4d1cbc(0x2c0)]+'\x20deleted')+',\x20')+(''+a47_0x587877['dim'](_0x130e07[_0x4d1cbc(0x256)][_0x4d1cbc(0x1fc)]+_0x4d1cbc(0x2fb))));for(const _0x2cd491 of _0x130e07[_0x4d1cbc(0x1c4)]){_0x2cd491[_0x4d1cbc(0x173)]==='modified'&&_0x2cd491[_0x4d1cbc(0x237)]&&(console[_0x4d1cbc(0x18b)]('\x0a'+a47_0x587877[_0x4d1cbc(0x200)](_0x4d1cbc(0x18e)+_0x2cd491[_0x4d1cbc(0x1bf)])),console['error'](_0x2cd491[_0x4d1cbc(0x237)]));}if(!_0x130e07[_0x4d1cbc(0x271)])return saveSessionContext({'workflow_project':_0x130e07['projectName']},_0x1e32ff[_0x4d1cbc(0x264)]),console[_0x4d1cbc(0x18b)](a47_0x587877['green']('\x0a✔\x20Already\x20up\x20to\x20date')),console['error'](a47_0x587877[_0x4d1cbc(0x1e3)](_0x4d1cbc(0x1ab)+_0x130e07['projectName'])),0x0;if(_0x1e32ff[_0x4d1cbc(0x2b5)])return console[_0x4d1cbc(0x18b)](a47_0x587877['yellow'](_0x4d1cbc(0x2ef))),0x0;if(!_0x1e32ff[_0x4d1cbc(0x1cd)]){if(!isInteractive())return console[_0x4d1cbc(0x18b)](a47_0x587877[_0x4d1cbc(0x289)](_0x4d1cbc(0x2e8)),_0x4d1cbc(0x17b)),console[_0x4d1cbc(0x18b)](a47_0x587877[_0x4d1cbc(0x1e3)](_0x4d1cbc(0x306))),0x1;const _0x563117=await confirmKey(_0x4d1cbc(0x2c1));if(!_0x563117)return console['error'](a47_0x587877[_0x4d1cbc(0x213)](_0x4d1cbc(0x18d)),_0x4d1cbc(0x27a)),0x1;}await withSpinner('Writing\x20files...',()=>_0x5f2a77[_0x4d1cbc(0x238)]['applyPullProject'](_0x130e07,{'revision':_0x277290}),{'verbose':_0x1e32ff['verbose']}),saveSessionContext({'workflow_project':_0x130e07[_0x4d1cbc(0x196)]},_0x1e32ff[_0x4d1cbc(0x264)]),console[_0x4d1cbc(0x18b)](a47_0x587877[_0x4d1cbc(0x1e5)](_0x4d1cbc(0x1c5)));const _0x1ee7d0=a47_0x110fcc[_0x4d1cbc(0x1a3)](process['cwd'](),_0x130e07[_0x4d1cbc(0x27c)])||'.';return console[_0x4d1cbc(0x18b)](a47_0x587877[_0x4d1cbc(0x1e3)]('\x20\x20Location:\x20'+_0x1ee7d0)),console[_0x4d1cbc(0x18b)](a47_0x587877[_0x4d1cbc(0x1e3)](_0x4d1cbc(0x1ab)+_0x130e07[_0x4d1cbc(0x196)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']='workflow:push';[a47_0x575465(0x257)]=a47_0x575465(0x1ec);async[a47_0x575465(0x28f)](_0x19389c){const _0x5d765e=a47_0x575465,{options:_0x2b00bf,args:_0x11bdcb,tdx:_0x1a41fd}=_0x19389c,_0x593a8c=this['resolveProjectDir'](_0x11bdcb,_0x2b00bf),_0x321935=_0x2b00bf[_0x5d765e(0x2ea)],_0x2562d5=_0x2b00bf[_0x5d765e(0x2cb)];_0x2b00bf[_0x5d765e(0x246)]&&(_0x593a8c&&console[_0x5d765e(0x18b)](_0x5d765e(0x269)+_0x593a8c),_0x321935&&console[_0x5d765e(0x18b)](_0x5d765e(0x244)+_0x321935),_0x2b00bf[_0x5d765e(0x2b5)]&&console[_0x5d765e(0x18b)](_0x5d765e(0x299)),_0x2562d5&&console['error'](_0x5d765e(0x30c)));let _0x55971e;try{_0x55971e=await withSpinner('Analyzing\x20changes...',()=>_0x1a41fd[_0x5d765e(0x238)][_0x5d765e(0x2a8)]({'sourceDir':_0x593a8c,'revision':_0x321935,'skipValidation':_0x2562d5}),{'verbose':_0x2b00bf[_0x5d765e(0x246)]});}catch(_0x378abb){if(_0x378abb instanceof Error&&_0x378abb[_0x5d765e(0x242)][_0x5d765e(0x188)](_0x5d765e(0x301)))return console[_0x5d765e(0x18b)](a47_0x587877[_0x5d765e(0x289)]('Error:'),_0x5d765e(0x1c6)),_0x2b00bf[_0x5d765e(0x25a)]?console[_0x5d765e(0x18b)](a47_0x587877['dim'](_0x5d765e(0x303)+_0x2b00bf[_0x5d765e(0x25a)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x2b00bf[_0x5d765e(0x25a)]+'\x27')):console[_0x5d765e(0x18b)](a47_0x587877[_0x5d765e(0x1e3)](_0x5d765e(0x2be))),0x1;throw _0x378abb;}const _0x2cf0f9=_0x55971e['data'];console['error']('✔\x20Project:\x20'+_0x2cf0f9[_0x5d765e(0x196)]),console['error'](_0x5d765e(0x2f3)+_0x2cf0f9['sourceDir']),console['error'](_0x5d765e(0x2f0)+_0x2cf0f9['revision']),console[_0x5d765e(0x18b)](_0x5d765e(0x310)+a47_0x587877[_0x5d765e(0x1e5)]('+'+_0x2cf0f9[_0x5d765e(0x256)][_0x5d765e(0x1d3)]+_0x5d765e(0x26d))+',\x20'+(a47_0x587877['yellow']('~'+_0x2cf0f9['summary']['modified']+_0x5d765e(0x2c8))+',\x20')+(a47_0x587877[_0x5d765e(0x289)]('-'+_0x2cf0f9[_0x5d765e(0x256)]['deleted']+_0x5d765e(0x228))+',\x20')+(''+a47_0x587877[_0x5d765e(0x1e3)](_0x2cf0f9['summary'][_0x5d765e(0x1fc)]+_0x5d765e(0x2fb))));for(const _0x195f08 of _0x2cf0f9['changes']){_0x195f08[_0x5d765e(0x173)]==='modified'&&_0x195f08[_0x5d765e(0x237)]&&(console[_0x5d765e(0x18b)]('\x0a'+a47_0x587877[_0x5d765e(0x200)]('---\x20'+_0x195f08['path'])),console['error'](_0x195f08[_0x5d765e(0x237)]));}if(!_0x2cf0f9[_0x5d765e(0x271)])return console['error'](a47_0x587877[_0x5d765e(0x1e5)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x5d765e(0x2f1)](_0x1a41fd,_0x2cf0f9['projectName'],_0x2b00bf[_0x5d765e(0x180)]),0x0;if(_0x2b00bf[_0x5d765e(0x2b5)])return console['error'](a47_0x587877[_0x5d765e(0x213)](_0x5d765e(0x255))),0x0;if(!_0x2b00bf[_0x5d765e(0x1cd)]){if(!isInteractive())return console['error'](a47_0x587877['red'](_0x5d765e(0x2e8)),_0x5d765e(0x17b)),console['error'](a47_0x587877[_0x5d765e(0x1e3)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x9558ff=await confirmKey(_0x5d765e(0x26a));if(!_0x9558ff)return console[_0x5d765e(0x18b)](a47_0x587877[_0x5d765e(0x213)]('Cancelled'),'-\x20nothing\x20pushed'),0x1;}const _0x1c0f57=await withSpinner(_0x5d765e(0x315),()=>_0x1a41fd['workflow'][_0x5d765e(0x1cb)](_0x2cf0f9),{'verbose':_0x2b00bf[_0x5d765e(0x246)]}),_0x3e6922=_0x1c0f57[_0x5d765e(0x308)];return console['error'](a47_0x587877['green']('✔\x20Push\x20complete')),console[_0x5d765e(0x18b)](_0x5d765e(0x1af)+_0x3e6922[_0x5d765e(0x2f9)]),console[_0x5d765e(0x18b)](_0x5d765e(0x2f0)+_0x3e6922['revision']),await this[_0x5d765e(0x2f1)](_0x1a41fd,_0x3e6922['projectName'],_0x2b00bf[_0x5d765e(0x180)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x314);[a47_0x575465(0x257)]=a47_0x575465(0x254);async['execute'](_0x2e40da){const _0x1eed36=a47_0x575465,{options:_0x3abd1a,args:_0x56b9e1,tdx:_0x47fdde}=_0x2e40da,_0x4509d8=this[_0x1eed36(0x182)](_0x56b9e1,_0x3abd1a),_0x3ff544=_0x3abd1a[_0x1eed36(0x311)],_0x2a03dd=_0x3abd1a['revision'],_0x214078=_0x3abd1a['skipValidation'];if(!_0x4509d8)return console[_0x1eed36(0x18b)](a47_0x587877['red'](_0x1eed36(0x1fb)),_0x1eed36(0x25e)),console[_0x1eed36(0x18b)](a47_0x587877['dim'](_0x1eed36(0x2b7))),console[_0x1eed36(0x18b)](a47_0x587877[_0x1eed36(0x1e3)](_0x1eed36(0x220))),0x1;if(!_0x3ff544)return console[_0x1eed36(0x18b)](a47_0x587877[_0x1eed36(0x289)](_0x1eed36(0x1fb)),_0x1eed36(0x1ff)),console[_0x1eed36(0x18b)](a47_0x587877[_0x1eed36(0x1e3)](_0x1eed36(0x2b7))),0x1;_0x3abd1a[_0x1eed36(0x246)]&&(console[_0x1eed36(0x18b)](_0x1eed36(0x269)+_0x4509d8),console[_0x1eed36(0x18b)](_0x1eed36(0x193)+_0x3ff544),_0x2a03dd&&console[_0x1eed36(0x18b)](_0x1eed36(0x244)+_0x2a03dd),_0x3abd1a['dryRun']&&console[_0x1eed36(0x18b)]('Dry\x20run:\x20yes'),_0x214078&&console[_0x1eed36(0x18b)]('Validation:\x20skipped'));const _0x3e4a98=await withSpinner(_0x1eed36(0x1f0),()=>_0x47fdde[_0x1eed36(0x238)][_0x1eed36(0x281)](_0x4509d8,_0x3ff544,{'revision':_0x2a03dd,'skipValidation':_0x214078}),{'verbose':_0x3abd1a[_0x1eed36(0x246)]}),_0x59e7e4=_0x3e4a98[_0x1eed36(0x308)];console[_0x1eed36(0x18b)](_0x1eed36(0x1f2)+_0x59e7e4[_0x1eed36(0x2fd)]);_0x59e7e4[_0x1eed36(0x24f)]&&console[_0x1eed36(0x18b)](_0x1eed36(0x2f4)+_0x59e7e4[_0x1eed36(0x24f)]);console[_0x1eed36(0x18b)](_0x1eed36(0x193)+_0x59e7e4[_0x1eed36(0x277)]),console[_0x1eed36(0x18b)](_0x1eed36(0x244)+_0x59e7e4[_0x1eed36(0x2ea)]),console['error'](_0x1eed36(0x1ce)+_0x59e7e4['fileCount']);_0x59e7e4['targetExists']&&(console[_0x1eed36(0x18b)](a47_0x587877[_0x1eed36(0x213)](_0x1eed36(0x287)+_0x59e7e4[_0x1eed36(0x277)]+_0x1eed36(0x170)+_0x59e7e4[_0x1eed36(0x265)]+')')),console[_0x1eed36(0x18b)](a47_0x587877[_0x1eed36(0x213)](_0x1eed36(0x2c2))));if(_0x3abd1a[_0x1eed36(0x2b5)])return console[_0x1eed36(0x18b)](a47_0x587877[_0x1eed36(0x213)](_0x1eed36(0x20c))),0x0;if(!_0x3abd1a['yes']){if(!isInteractive())return console['error'](a47_0x587877[_0x1eed36(0x289)]('\x0aError:'),_0x1eed36(0x17b)),console[_0x1eed36(0x18b)](a47_0x587877[_0x1eed36(0x1e3)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2e8657=_0x59e7e4[_0x1eed36(0x24f)]||a47_0x110fcc[_0x1eed36(0x21e)](_0x4509d8),_0x3adc29=_0x59e7e4[_0x1eed36(0x171)]?_0x1eed36(0x30b)+_0x3ff544+'\x22\x20with\x20new\x20revision?':_0x1eed36(0x2df)+_0x2e8657+_0x1eed36(0x2b1)+_0x3ff544+'\x22?',_0x6548f8=await confirmKey(_0x3adc29);if(!_0x6548f8)return console[_0x1eed36(0x18b)](a47_0x587877[_0x1eed36(0x213)]('Cancelled')),0x1;}const _0x491e9b=await withSpinner(_0x59e7e4[_0x1eed36(0x171)]?_0x1eed36(0x2a9)+_0x3ff544+'...':_0x1eed36(0x1e7)+_0x3ff544+_0x1eed36(0x195),()=>_0x47fdde[_0x1eed36(0x238)][_0x1eed36(0x2fa)](_0x59e7e4),{'verbose':_0x3abd1a[_0x1eed36(0x246)]}),_0x3b739a=_0x491e9b[_0x1eed36(0x308)];return console[_0x1eed36(0x18b)](a47_0x587877['green'](_0x59e7e4['targetExists']?_0x1eed36(0x2fe):'✔\x20Clone\x20complete')),console['error'](_0x1eed36(0x2aa)+_0x3b739a['newProjectName']),console['error']('\x20\x20Project\x20ID:\x20'+_0x3b739a[_0x1eed36(0x313)]),console[_0x1eed36(0x18b)](_0x1eed36(0x2f0)+_0x3b739a[_0x1eed36(0x2ea)]),await this['showWorkflowConsoleUrl'](_0x47fdde,_0x3b739a[_0x1eed36(0x277)],_0x3abd1a[_0x1eed36(0x180)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a47_0x575465(0x311)]='workflow:delete';['description']=a47_0x575465(0x229);async[a47_0x575465(0x28f)](_0x46715a){const _0x42190c=a47_0x575465,{options:_0x3ee8e0,args:_0x58ffb1,tdx:_0x4bdbb4}=_0x46715a,_0x504a11=_0x58ffb1[0x0];if(!_0x504a11)return console[_0x42190c(0x18b)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x42190c(0x18b)](_0x42190c(0x2e4)),0x1;_0x3ee8e0[_0x42190c(0x246)]&&console[_0x42190c(0x18b)]('Project:\x20'+_0x504a11);if(!_0x3ee8e0['yes']){if(!isInteractive())return console[_0x42190c(0x18b)](a47_0x587877[_0x42190c(0x289)](_0x42190c(0x2e8)),_0x42190c(0x17b)),console['error'](a47_0x587877[_0x42190c(0x1e3)](_0x42190c(0x306))),0x1;const _0x46bb43=await confirmKey(_0x42190c(0x309)+_0x504a11+_0x42190c(0x211));if(!_0x46bb43)return console['error'](a47_0x587877[_0x42190c(0x213)](_0x42190c(0x18d))),0x1;}const _0xc0c94d=await withSpinner(_0x42190c(0x22e)+_0x504a11+_0x42190c(0x195),()=>_0x4bdbb4[_0x42190c(0x238)]['delete'](_0x504a11),{'verbose':_0x3ee8e0[_0x42190c(0x246)]}),_0xf55182=_0xc0c94d[_0x42190c(0x308)];return console[_0x42190c(0x18b)](_0x42190c(0x1c2)+_0xf55182[_0x42190c(0x196)]),console[_0x42190c(0x18b)](_0x42190c(0x1af)+_0xf55182[_0x42190c(0x2f9)]),0x0;}}export function parseKeyValue(_0x5f2797){const _0x19c185=a47_0x575465,_0x2e383b=_0x5f2797['indexOf']('=');if(_0x2e383b===-0x1)throw new Error(_0x19c185(0x1dc)+_0x5f2797+_0x19c185(0x2bb));const _0x4da747=_0x5f2797[_0x19c185(0x194)](0x0,_0x2e383b),_0x35defd=_0x5f2797['substring'](_0x2e383b+0x1);if(!_0x4da747)throw new Error(_0x19c185(0x1e8));return{'key':_0x4da747,'value':_0x35defd};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a47_0x575465(0x29f);[a47_0x575465(0x257)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a47_0x575465(0x28f)](_0x46c9c2){const _0x59ab99=a47_0x575465,{options:_0x3d639e,args:_0xcb8a6,tdx:_0x23390a}=_0x46c9c2,_0x207ae=this['requireProject'](_0xcb8a6,_0x3d639e);if(!_0x207ae)return 0x1;_0x3d639e[_0x59ab99(0x246)]&&console[_0x59ab99(0x18b)](_0x59ab99(0x22b)+_0x207ae);const _0x307088=await withSpinner(_0x59ab99(0x1b1),()=>_0x23390a['workflow'][_0x59ab99(0x2ab)](_0x207ae),{'verbose':_0x3d639e['verbose']}),{secrets:_0x174215}=_0x307088['data'];return console[_0x59ab99(0x18b)](_0x59ab99(0x2fc)+_0x174215['length']+_0x59ab99(0x247)+(_0x174215['length']!==0x1?'s':'')),await handleSDKOutput(_0x174215,_0x3d639e),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a47_0x575465(0x311)]=a47_0x575465(0x2e2);[a47_0x575465(0x257)]=a47_0x575465(0x210);async[a47_0x575465(0x28f)](_0x20b931){const _0x18e13d=a47_0x575465,{options:_0x10dfa1,args:_0x52cdb6,tdx:_0x528165}=_0x20b931;let _0x17cf13,_0x258193;if(_0x52cdb6[_0x18e13d(0x203)]>=0x2)_0x17cf13=_0x52cdb6[0x0],_0x258193=_0x52cdb6[0x1];else{if(_0x52cdb6[_0x18e13d(0x203)]===0x1&&_0x10dfa1['workflowProject'])_0x17cf13=_0x10dfa1[_0x18e13d(0x25a)],_0x258193=_0x52cdb6[0x0];else return _0x52cdb6[_0x18e13d(0x203)]===0x1?(console[_0x18e13d(0x18b)](_0x18e13d(0x261)),console[_0x18e13d(0x18b)](_0x18e13d(0x191)),0x1):(console['error'](_0x18e13d(0x215)),console[_0x18e13d(0x18b)](_0x18e13d(0x296)),0x1);}let _0x13046d,_0x55733b;try{({key:_0x13046d,value:_0x55733b}=parseKeyValue(_0x258193));}catch(_0x2f85ce){return _0x2f85ce instanceof Error&&console[_0x18e13d(0x18b)](a47_0x587877['red'](_0x18e13d(0x1fb)),_0x2f85ce[_0x18e13d(0x242)]),0x1;}_0x10dfa1[_0x18e13d(0x246)]&&(console[_0x18e13d(0x18b)](_0x18e13d(0x22b)+_0x17cf13),console['error'](_0x18e13d(0x23c)+_0x13046d));const _0x189f00=await withSpinner(_0x18e13d(0x2e5),()=>_0x528165['workflow'][_0x18e13d(0x241)](_0x17cf13,_0x13046d,_0x55733b),{'verbose':_0x10dfa1[_0x18e13d(0x246)]}),_0x4dc463=_0x189f00[_0x18e13d(0x308)];return console[_0x18e13d(0x18b)](_0x18e13d(0x21a)+_0x4dc463[_0x18e13d(0x29c)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x4dc463[_0x18e13d(0x196)]+'\x27'),(_0x10dfa1['json']||_0x10dfa1['jsonl'])&&await handleSingleObjectOutput(_0x4dc463,_0x10dfa1),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a47_0x575465(0x16f);[a47_0x575465(0x257)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async['execute'](_0x208ff7){const _0x3be180=a47_0x575465,{options:_0x414cbd,args:_0x34a0aa,tdx:_0x122c42}=_0x208ff7;let _0x3b2701,_0x251573;if(_0x34a0aa[_0x3be180(0x203)]>=0x2)_0x3b2701=_0x34a0aa[0x0],_0x251573=_0x34a0aa[0x1];else{if(_0x34a0aa[_0x3be180(0x203)]===0x1&&_0x414cbd[_0x3be180(0x25a)])_0x3b2701=_0x414cbd[_0x3be180(0x25a)],_0x251573=_0x34a0aa[0x0];else return _0x34a0aa[_0x3be180(0x203)]===0x1?(console['error']('Error:\x20Project\x20name\x20is\x20required'),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x3be180(0x18b)](_0x3be180(0x2dc)),console[_0x3be180(0x18b)](_0x3be180(0x26e)),0x1);}_0x414cbd[_0x3be180(0x246)]&&(console[_0x3be180(0x18b)]('Project:\x20'+_0x3b2701),console[_0x3be180(0x18b)](_0x3be180(0x23c)+_0x251573));if(!_0x414cbd['yes']){if(!isInteractive())return console[_0x3be180(0x18b)](a47_0x587877[_0x3be180(0x289)](_0x3be180(0x2e8)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x3be180(0x18b)](a47_0x587877[_0x3be180(0x1e3)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3c57e0=await confirmKey(_0x3be180(0x27f)+_0x251573+'\x27\x20from\x20project\x20\x27'+_0x3b2701+'\x27?');if(!_0x3c57e0)return console[_0x3be180(0x18b)](a47_0x587877['yellow'](_0x3be180(0x18d))),0x1;}const _0x741d74=await withSpinner('Deleting\x20secret...',()=>_0x122c42[_0x3be180(0x238)][_0x3be180(0x268)](_0x3b2701,_0x251573),{'verbose':_0x414cbd[_0x3be180(0x246)]}),_0x39de97=_0x741d74[_0x3be180(0x308)];return console[_0x3be180(0x18b)](_0x3be180(0x21a)+_0x39de97[_0x3be180(0x29c)]+_0x3be180(0x1e4)+_0x39de97[_0x3be180(0x196)]+'\x27'),(_0x414cbd['json']||_0x414cbd['jsonl'])&&await handleSingleObjectOutput(_0x39de97,_0x414cbd),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(_0x3f34b6){const _0x2c6174=a47_0x575465,_0x13c2c2=Math[_0x2c6174(0x1ba)](_0x3f34b6/0x3e8),_0x4a758a=Math[_0x2c6174(0x1ba)](_0x13c2c2/0x3c),_0x55ea1d=Math['floor'](_0x4a758a/0x3c),_0x4b5138=Math[_0x2c6174(0x1ba)](_0x55ea1d/0x18);if(_0x4b5138>0x0){const _0x163379=_0x55ea1d%0x18;return _0x163379>0x0?_0x4b5138+'d\x20'+_0x163379+'h':_0x4b5138+'d';}else{if(_0x55ea1d>0x0){const _0x5ba263=_0x4a758a%0x3c;return _0x5ba263>0x0?_0x55ea1d+'h\x20'+_0x5ba263+'m':_0x55ea1d+'h';}else{if(_0x4a758a>0x0){const _0xe0ce4f=_0x13c2c2%0x3c;return _0xe0ce4f>0x0?_0x4a758a+'m\x20'+_0xe0ce4f+'s':_0x4a758a+'m';}else return _0x13c2c2+'s';}}}function formatTimestamp(_0x26ed3e,_0x2dff29){const _0x41319b=a47_0x575465,_0x2f3654=new Date(_0x26ed3e),_0xee3880=String(_0x2f3654['getHours']())['padStart'](0x2,'0'),_0x3a8100=String(_0x2f3654[_0x41319b(0x2bd)]())['padStart'](0x2,'0'),_0x462e96=_0xee3880+':'+_0x3a8100,_0x28ff53=_0x2f3654['getFullYear']()===_0x2dff29[_0x41319b(0x185)]()&&_0x2f3654[_0x41319b(0x1a6)]()===_0x2dff29[_0x41319b(0x1a6)]()&&_0x2f3654[_0x41319b(0x209)]()===_0x2dff29[_0x41319b(0x209)]();if(_0x28ff53)return _0x462e96;else{const _0x426943=String(_0x2f3654['getMonth']()+0x1)[_0x41319b(0x304)](0x2,'0'),_0x180214=String(_0x2f3654[_0x41319b(0x209)]())[_0x41319b(0x304)](0x2,'0');return _0x426943+'-'+_0x180214+'\x20'+_0x462e96;}}function formatDate(_0x396b90){const _0x169d9d=a47_0x575465,_0x4d6233=_0x396b90[_0x169d9d(0x185)](),_0x3df9bb=String(_0x396b90[_0x169d9d(0x1a6)]()+0x1)[_0x169d9d(0x304)](0x2,'0'),_0x464e5c=String(_0x396b90[_0x169d9d(0x209)]())[_0x169d9d(0x304)](0x2,'0');return _0x4d6233+'-'+_0x3df9bb+'-'+_0x464e5c;}function a47_0x2ddc(){const _0x1a78bc=['workflows','prepareCloneProject','renderSessionsTimeline','24QimbUo','readFile','77PeUNqS','revision:\x20','\x0a⚠\x20Project\x20\x22','get','red','log','/sessions/','sessionTime','startTime','round','execute','Parameters:\x20','Pulling\x20project\x20','planned','fullName','push','Kill\x20a\x20running\x20attempt','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','fill','columns','Dry\x20run:\x20yes','Reason:\x20','List\x20all\x20workflow\x20projects','key','list','reason','workflow:secrets:list','\x20is\x20not\x20a\x20directory','\x20logs','trim','duration','Error:\x20Attempt\x20ID\x20is\x20required','workflow:logs','retrySession','MAX_LABEL_COUNT','preparePushProject','Updating\x20','\x20\x20Project:\x20','listSecrets','startedAt','Pull\x20workflow\x20project\x20to\x20local\x20folder','ICON_WIDTH','lastAttempt','pullProject','\x22\x20to\x20new\x20project\x20\x22','No\x20sessions\x20with\x20timing\x20information','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','end','dryRun','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Force:\x20yes','parse','pending','.\x20Expected\x20format:\x20KEY=VALUE','sort','getMinutes','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','includeRetried','deleted','\x0aApply\x20these\x20changes?','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Select\x20a\x20task\x20to\x20view\x20logs:','workflow:attempts','Pattern:\x20','context','LABEL_WIDTH_DIVISOR','\x20modified','running','finishedAt','skipValidation','slice','cancelRequested','Auto-selected\x20latest\x20session:\x20','workflow:download','find','all','No\x20workflows\x20found','rows','\x20project','\x27...','updatedAt','resolveProject','Resume\x20from:\x20','\x20session','set','workflow:pull','Error:\x20Secret\x20key\x20is\x20required','\x20-\x20','Expected\x20format:\x20--param\x20key=value','\x0aClone\x20\x22','No\x20workflows\x20found\x20in\x20project:\x20','\x20\x20Files\x20extracted:\x20','workflow:secrets:set','task','Usage:\x20workflow:delete\x20<project-name-or-id>','Setting\x20secret...','pollTimeline','Task\x20name:\x20','\x0aError:','No\x20sessions\x20found\x20in\x20project:\x20','revision','window','resumeFrom','renderTimeline','Target:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','\x20\x20Revision:\x20','showWorkflowConsoleUrl','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','\x20\x20Source:\x20','Source\x20project:\x20','json','No\x20attempts\x20found','some','white','projectId','executeCloneProject','\x20unchanged','✔\x20Found\x20','sourceDir','✔\x20Project\x20updated','Using\x20attempt\x20','Workflow:\x20','No\x20workflow\x20tdx.json\x20found','map','Tip:\x20cd\x20to\x20workflows/','padStart','Loading\x20workflows...','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','output','data','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','param','\x0aUpdate\x20existing\x20project\x20\x22','Validation:\x20skipped','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','logs','index','\x20\x20Changes:\x20','name','generateSessionTimelineRows','newProjectId','workflow:clone','Pushing\x20project...','No\x20sessions\x20found\x20for:\x20','/attempt/','stat','sys','workflow:secrets:delete','\x22\x20already\x20exists\x20(ID:\x20','targetExists','✔\x20Retry\x20started','type','filesExtracted','TASK_NAME_WIDTH','workflowName','metadata','buildTimelineData','sessions','resolve','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20Console:\x20','workflow:kill','5biTPii','stdout','site','fromTask','resolveProjectDir','Retrying\x20attempt...','filter','getFullYear','createdAt','unknown','includes','isTTY','tdx\x20wf\x20attempt\x20','error','Target\x20directory:\x20','Cancelled','---\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','MAX_TASKS_DISPLAY','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','replace','New\x20project\x20name:\x20','substring','...','projectName','Failed\x20to\x20fetch\x20attempt\x20data','Killing\x20attempt...','download','limit','No\x20workflow\x20projects\x20found','Attempt\x20ID:\x20','Session\x20not\x20found:\x20','workflow:retry','stringify','List\x20workflow\x20execution\x20sessions','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20\x20tdx\x20wf\x20use\x20<project>','relative','Pushing\x20workflow\x20project...','Error:\x20Invalid\x20JSON\x20in\x20--params','getMonth','7117143GlinDk','\x20\x20Workflow:\x20','workflow:workflows','attempt:','\x20\x20Session\x20context\x20set\x20to:\x20','From\x20task:\x20','Session\x20time:\x20','499368Yshoey','\x20\x20Project\x20ID:\x20','\x20sessions\x20','Listing\x20secrets...','ICON_SPACING','retryAttemptName','12gkemhC','table','List\x20workflow\x20attempts','isArray','startsWith','Downloading\x20project\x20','floor','✔\x20Workflow\x20project\x20context\x20cleared.','⚠\x20Showing\x20first\x20','logFiles','renderSingleTimeline','path','state','follow','✔\x20Deleted\x20project\x20','format','changes','✔\x20Pull\x20complete','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','localeCompare','No\x20workflow\x20sessions\x20found','13797FvHwGK','🔄\x20','executePushProject','done','yes','Files\x20to\x20upload:\x20','Include\x20retried:\x20yes','repeat','sessionId','taskName','new','workflow:sessions','\x1b[1A\x1b[2K','trimEnd','Warning:','Retrying\x20session...','success','attemptId','workflow:projects','Invalid\x20format:\x20','toLowerCase','workflow:tasks','params','from','keys','join','dim','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','green','Listing\x20workflow\x20sessions...','Cloning\x20to\x20','Key\x20cannot\x20be\x20empty','modified','110630DNacfa','Output\x20directory:\x20','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','split','📁\x20','Analyzing\x20project...','Session\x20','Source:\x20','MIN_LABEL_COUNT','Latest\x20session\x20has\x20no\x20attempt','tasks','MAX_POLL_ITERATIONS','displayLine','No\x20sessions\x20found','→\x20New\x20project:\x20','List\x20workflows','Error:','unchanged','Show\x20specific\x20attempt\x20details','Select\x20a\x20session\x20to\x20view\x20timeline:','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','cyan','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Loading\x20session...','length','\x20\x20Location:\x20','\x20(use\x20--limit\x20to\x20show\x20more)','splice','Project\x20name\x20is\x20required','Select\x20a\x20workflow\x20to\x20run','getDate','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','workflow:upload','\x0aDry\x20run\x20-\x20no\x20project\x20created','No\x20matching\x20sessions\x20found','match','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x22?\x20This\x20cannot\x20be\x20undone.','project','yellow','status','Error:\x20KEY=VALUE\x20is\x20required','Params:\x20','Resolving\x20project\x20\x27','requireProject','select','✔\x20Secret\x20\x27','No\x20log\x20files\x20found\x20for\x20this\x20attempt','workflow:run','\x20\x20Target:\x20','basename','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','group_error','attempt','values','\x20workflow','\x0aFailed\x20to\x20fetch\x20attempt\x20data','durationMs','Project\x20name:\x20','\x20deleted','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','💡\x20Tip:\x20Use\x20','Project:\x20','fs/promises','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Deleting\x20project\x20','tdx.json','(unknown)','workflow:use','now','Filter:\x20project=','parseProjectWorkflowPattern','canceling','isNewProject','diff','workflow','\x0a✔\x20Attempt\x20complete','getTime','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Key:\x20','✔\x20Downloaded\x20','635051HAMhWc','text','Filter:\x20','setSecret','message','title','Revision:\x20','toISOString','verbose','\x20secret','\x20(system)','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x20task','Getting\x20attempt\x20tasks...','→\x20Project:\x20','session_id','sourceProjectName','280604DRpwQe','Status:\x20','attempts','blue','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x0aDry\x20run\x20-\x20nothing\x20pushed','summary','description','workflow:timeline','min','workflowProject','msPerChar','Listing\x20workflow\x20attempts...','1570RlWeeK','Source\x20directory\x20is\x20required','cwd','Starting\x20workflow\x20run...','Error:\x20Project\x20name\x20is\x20required','autocomplete','navigateSessionsInteractive','session','existingProjectId','start','POLL_INTERVAL_MS','deleteSecret','Source\x20directory:\x20','\x0aPush\x20these\x20changes?','\x20has\x20no\x20attempts','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20new','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x20\x20Session\x20ID:\x20','write','hasChanges','Show\x20tasks\x20for\x20an\x20attempt','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','\x20attempt','MIN_TIMELINE_WIDTH','newProjectName','No\x20attempts\x20found\x20for:\x20','jsonl','-\x20no\x20files\x20written','2907702LwZstP','targetDir','max','icon','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'];a47_0x2ddc=function(){return _0x1a78bc;};return a47_0x2ddc();}function getTaskStateIcon(_0x26e18d){const _0xdc27f4={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0xdc27f4[_0x26e18d]||'⚪';}function getBarChar(_0x37a08a){const _0x5f4093=a47_0x575465;return _0x37a08a===_0x5f4093(0x18b)||_0x37a08a==='group_error'?'×':'─';}function getBarColor(_0x3fc818){const _0x34c094=a47_0x575465,_0x5eca17={'success':a47_0x587877[_0x34c094(0x1e5)],'error':a47_0x587877[_0x34c094(0x289)],'group_error':a47_0x587877[_0x34c094(0x289)],'running':a47_0x587877[_0x34c094(0x253)],'blocked':a47_0x587877[_0x34c094(0x213)],'planned':a47_0x587877['dim'],'canceling':a47_0x587877['yellow']};return _0x5eca17[_0x3fc818]||a47_0x587877[_0x34c094(0x2f8)];}function parseTaskName(_0x3e7929){const _0xa41f27=a47_0x575465;let _0x10fdfd=_0x3e7929[_0xa41f27(0x192)](/^\++/,'');const _0x2c3c4c=_0x10fdfd[_0xa41f27(0x1ee)]('+'),_0x12a266=_0x2c3c4c['length']>0x1?_0x2c3c4c['length']-0x2:0x0,_0x4835ae=_0x2c3c4c[_0x2c3c4c[_0xa41f27(0x203)]-0x1]||_0x10fdfd;return{'level':_0x12a266,'name':'+'+_0x4835ae};}function truncateTaskName(_0x5d2a9b,_0x4b445a){const _0x1edd61=a47_0x575465,_0x5a4dd1=stringWidth(_0x5d2a9b);if(_0x5a4dd1<=_0x4b445a)return _0x5d2a9b;let _0x324bd4=_0x5d2a9b;while(stringWidth(_0x324bd4+'…')>_0x4b445a&&_0x324bd4[_0x1edd61(0x203)]>0x0){_0x324bd4=_0x324bd4[_0x1edd61(0x2cc)](0x0,-0x1);}return _0x324bd4+'…';}function calculateTimeScale(_0x5878a6,_0x5752aa){const _0x3616b1=a47_0x575465;return{'startTime':_0x5878a6['start'],'endTime':_0x5878a6['end'],'durationMs':_0x5878a6[_0x3616b1(0x2a3)],'msPerChar':_0x5878a6[_0x3616b1(0x2a3)]/_0x5752aa};}function timeToPosition(_0x20bb2f,_0x20247b,_0x9ea5e6){const _0x3a5a2c=a47_0x575465,_0x4aa196=_0x20bb2f-_0x20247b[_0x3a5a2c(0x28d)],_0xe7c1ed=Math['floor'](_0x4aa196/_0x20247b[_0x3a5a2c(0x25b)]);return Math[_0x3a5a2c(0x27d)](0x0,Math[_0x3a5a2c(0x259)](_0xe7c1ed,_0x9ea5e6));}function renderTimeAxis(_0x345990,_0x519cf6){const _0x4c7bb7=a47_0x575465,_0xf64ad0=Math[_0x4c7bb7(0x259)](TIMELINE_CONFIG[_0x4c7bb7(0x2a7)],Math[_0x4c7bb7(0x27d)](TIMELINE_CONFIG[_0x4c7bb7(0x1f3)],Math[_0x4c7bb7(0x1ba)](_0x519cf6/TIMELINE_CONFIG[_0x4c7bb7(0x2c7)]))),_0x57ddfe=_0x345990[_0x4c7bb7(0x226)]/(_0xf64ad0-0x1),_0x3d9ed4=new Date(_0x345990[_0x4c7bb7(0x28d)]),_0x2e287f=[];for(let _0x13d182=0x0;_0x13d182<_0xf64ad0;_0x13d182++){const _0x31b67f=_0x345990[_0x4c7bb7(0x28d)]+_0x13d182*_0x57ddfe,_0x3cc0c7=timeToPosition(_0x31b67f,_0x345990,_0x519cf6),_0xc7bced=formatTimestamp(_0x31b67f,_0x3d9ed4);_0x2e287f[_0x4c7bb7(0x294)]({'pos':_0x3cc0c7,'text':_0xc7bced});}const _0x19cb30=new Array(_0x519cf6)[_0x4c7bb7(0x297)]('\x20');let _0x34458b=-0x1;for(const {pos:_0x86d989,text:_0xda12c7}of _0x2e287f){let _0x4e1194=Math['max'](0x0,_0x86d989-Math[_0x4c7bb7(0x1ba)](_0xda12c7[_0x4c7bb7(0x203)]/0x2));_0x4e1194<=_0x34458b+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x4e1194=_0x34458b+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x4e1194+_0xda12c7[_0x4c7bb7(0x203)]>_0x519cf6&&(_0x4e1194=_0x519cf6-_0xda12c7[_0x4c7bb7(0x203)]);if(_0x4e1194>=0x0&&_0x4e1194+_0xda12c7[_0x4c7bb7(0x203)]<=_0x519cf6&&_0x4e1194>_0x34458b){for(let _0x4ab79c=0x0;_0x4ab79c<_0xda12c7['length'];_0x4ab79c++){_0x19cb30[_0x4e1194+_0x4ab79c]=_0xda12c7[_0x4ab79c];}_0x34458b=_0x4e1194+_0xda12c7[_0x4c7bb7(0x203)]-0x1;}}return _0x19cb30[_0x4c7bb7(0x1e2)]('');}function renderTaskRow(_0x2a16e9,_0x16e71e,_0x3e8477,_0x2a7807){const _0x5a1c3e=a47_0x575465,{level:_0xcca5d7,name:_0x45351f}=parseTaskName(_0x2a16e9[_0x5a1c3e(0x311)]),_0x3607ba='\x20'[_0x5a1c3e(0x1d0)](_0xcca5d7),_0x16e082=_0x2a16e9[_0x5a1c3e(0x2eb)]?'('+formatElapsed(_0x2a16e9[_0x5a1c3e(0x2eb)][_0x5a1c3e(0x2a3)])+')':'',_0x196fcc=stringWidth(_0x16e082),_0x55a00b=_0xcca5d7*0x1,_0x2e0eff=_0x2a7807-_0x55a00b-_0x196fcc-0x1,_0x4ad332=truncateTaskName(_0x45351f,_0x2e0eff),_0x27c03e=_0x3607ba+_0x4ad332,_0x1e573e=stringWidth(_0x27c03e),_0x4f9877=_0x2a7807-_0x1e573e-_0x196fcc,_0x2ecb94=_0x27c03e+'\x20'[_0x5a1c3e(0x1d0)](Math['max'](0x1,_0x4f9877))+a47_0x587877[_0x5a1c3e(0x1e3)](_0x16e082),_0x1ae0f2=getTaskStateIcon(_0x2a16e9[_0x5a1c3e(0x1c0)]),_0x40d550=new Array(_0x3e8477)[_0x5a1c3e(0x297)]('\x20');if(_0x2a16e9[_0x5a1c3e(0x2eb)]){const _0x53ed0c=timeToPosition(_0x2a16e9['window']['start'],_0x16e71e,_0x3e8477),_0x284864=timeToPosition(_0x2a16e9[_0x5a1c3e(0x2eb)][_0x5a1c3e(0x2b4)],_0x16e71e,_0x3e8477),_0x372041=getBarChar(_0x2a16e9[_0x5a1c3e(0x1c0)]),_0xa52cac=Math[_0x5a1c3e(0x27d)](_0x53ed0c+0x1,_0x284864);for(let _0x37425d=_0x53ed0c;_0x37425d<Math[_0x5a1c3e(0x259)](_0xa52cac,_0x3e8477);_0x37425d++){_0x40d550[_0x37425d]=_0x372041;}}const _0x267d57=getBarColor(_0x2a16e9['state']),_0x489e27=_0x40d550[_0x5a1c3e(0x302)](_0x2f912c=>_0x2f912c==='\x20'?'\x20':_0x267d57(_0x2f912c))[_0x5a1c3e(0x1e2)]('');return _0x1ae0f2+'\x20'+_0x2ecb94+'│'+_0x489e27+'│';}function calculateStats(_0x4f2018){const _0x496c90=a47_0x575465,_0x424d58={'total':_0x4f2018[_0x496c90(0x203)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3ec0cb of _0x4f2018){if(_0x3ec0cb[_0x496c90(0x1c0)]===_0x496c90(0x1d9))_0x424d58[_0x496c90(0x1d9)]++;else{if(_0x3ec0cb[_0x496c90(0x1c0)]===_0x496c90(0x18b)||_0x3ec0cb['state']===_0x496c90(0x221))_0x424d58['error']++;else _0x3ec0cb[_0x496c90(0x1c0)]==='running'?_0x424d58['running']++:_0x424d58['pending']++;}}return _0x424d58;}function formatStats(_0x58f70b){const _0x4fbb56=a47_0x575465;return['Total:\x20'+_0x58f70b['total'],'✅\x20'+_0x58f70b['success'],'❌\x20'+_0x58f70b[_0x4fbb56(0x18b)],_0x4fbb56(0x1ca)+_0x58f70b[_0x4fbb56(0x2c9)],'⏳\x20'+_0x58f70b[_0x4fbb56(0x2ba)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a47_0x575465(0x258);[a47_0x575465(0x257)]=a47_0x575465(0x26c);async[a47_0x575465(0x28f)](_0x3fddce){const _0x1cfdf0=a47_0x575465,{options:_0x4c2360,args:_0x1b20c9,tdx:_0x2190f0}=_0x3fddce;let _0x462211,_0x1eb901,_0x2d2864=![];if(_0x1b20c9[0x0]){if(_0x1b20c9[0x0][_0x1cfdf0(0x188)]('.')){const _0xd82181=this[_0x1cfdf0(0x234)](_0x1b20c9,_0x4c2360);if(!_0xd82181)return 0x1;_0x462211=_0xd82181[_0x1cfdf0(0x196)],_0x1eb901=_0xd82181[_0x1cfdf0(0x176)];}else{_0x1eb901=_0x1b20c9[0x0],_0x462211=_0x4c2360[_0x1cfdf0(0x25a)];if(!_0x462211)return console[_0x1cfdf0(0x18b)](a47_0x587877[_0x1cfdf0(0x289)](_0x1cfdf0(0x1fb)),_0x1cfdf0(0x201)),0x1;_0x2d2864=!![];}}else{const _0x43ca20=this[_0x1cfdf0(0x234)](_0x1b20c9,_0x4c2360);if(!_0x43ca20)return 0x1;_0x462211=_0x43ca20[_0x1cfdf0(0x196)],_0x1eb901=_0x43ca20[_0x1cfdf0(0x176)];}if(_0x4c2360[_0x1cfdf0(0x246)]){if(_0x462211&&_0x1eb901)console['error'](_0x1cfdf0(0x240)+_0x462211+'.'+_0x1eb901);else _0x462211&&console[_0x1cfdf0(0x18b)](_0x1cfdf0(0x233)+_0x462211);}const _0x5cd7b0=_0x4c2360['attemptId'],_0x44b5e6=_0x4c2360[_0x1cfdf0(0x1d1)];if(_0x5cd7b0){_0x44b5e6&&console[_0x1cfdf0(0x18b)](a47_0x587877[_0x1cfdf0(0x213)](_0x1cfdf0(0x1d7)),_0x1cfdf0(0x274));const _0xc9b0f5=_0x4c2360[_0x1cfdf0(0x1c1)];return _0xc9b0f5?await this[_0x1cfdf0(0x2e6)](_0x3fddce,_0x5cd7b0):await this[_0x1cfdf0(0x1be)](_0x3fddce,_0x5cd7b0,_0x4c2360),0x0;}if(_0x44b5e6){const _0x201c9c=await withSpinner(_0x1cfdf0(0x202),()=>_0x2190f0[_0x1cfdf0(0x238)][_0x1cfdf0(0x179)]({'projectName':_0x462211,'workflowName':_0x1eb901,'limit':0x64}),{'verbose':_0x4c2360['verbose']}),_0x4fd0a8=_0x201c9c[_0x1cfdf0(0x308)][_0x1cfdf0(0x2d0)](_0x4de025=>_0x4de025['id']===_0x44b5e6);if(!_0x4fd0a8)return console[_0x1cfdf0(0x18b)](a47_0x587877[_0x1cfdf0(0x289)](_0x1cfdf0(0x1fb)),_0x1cfdf0(0x19d)+_0x44b5e6),0x1;if(!_0x4fd0a8[_0x1cfdf0(0x2af)]?.['id'])return console['error'](a47_0x587877[_0x1cfdf0(0x289)]('Error:'),_0x1cfdf0(0x1f1)+_0x44b5e6+_0x1cfdf0(0x26b)),0x1;const _0x534625=_0x4fd0a8['lastAttempt']['id'];_0x4c2360[_0x1cfdf0(0x246)]&&console[_0x1cfdf0(0x18b)](_0x1cfdf0(0x2ff)+_0x534625+'\x20from\x20session\x20'+_0x44b5e6);const _0x4a2cde=_0x4c2360[_0x1cfdf0(0x1c1)];return _0x4a2cde?await this[_0x1cfdf0(0x2e6)](_0x3fddce,_0x534625):await this['renderSingleTimeline'](_0x3fddce,_0x534625,_0x4c2360),0x0;}const _0x5bc05c=await withSpinner('Loading\x20sessions...',()=>_0x2190f0[_0x1cfdf0(0x238)]['sessions']({'projectName':_0x462211,'workflowName':_0x1eb901,'limit':_0x4c2360[_0x1cfdf0(0x19a)]||0x32}),{'verbose':_0x4c2360[_0x1cfdf0(0x246)]}),_0x3a1919=_0x5bc05c[_0x1cfdf0(0x308)];if(_0x3a1919[_0x1cfdf0(0x203)]===0x0){if(_0x462211&&_0x1eb901)console[_0x1cfdf0(0x18b)](_0x1cfdf0(0x16b)+_0x462211+'.'+_0x1eb901);else _0x462211?console[_0x1cfdf0(0x18b)](_0x1cfdf0(0x2e9)+_0x462211):(console[_0x1cfdf0(0x18b)](_0x1cfdf0(0x1c8)),console[_0x1cfdf0(0x18b)](a47_0x587877[_0x1cfdf0(0x1e3)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x3a1919['sort']((_0x5883a0,_0x172e70)=>{const _0x2b0a4a=_0x1cfdf0,_0x4f6fde=_0x5883a0['sessionTime']||'',_0x61d1cd=_0x172e70[_0x2b0a4a(0x28c)]||'';return _0x61d1cd[_0x2b0a4a(0x1c7)](_0x4f6fde);});if(_0x4c2360['json']||_0x4c2360[_0x1cfdf0(0x279)])return await handleSDKOutput(_0x3a1919,_0x4c2360),0x0;let _0x3c88ee;if(_0x2d2864){const _0x672c03=_0x3a1919[0x0];if(!_0x672c03[_0x1cfdf0(0x2af)]?.['id'])return console[_0x1cfdf0(0x18b)](_0x1cfdf0(0x1f4)),0x0;_0x3c88ee=_0x672c03[_0x1cfdf0(0x2af)]['id'],_0x4c2360['verbose']&&console['error'](_0x1cfdf0(0x2ce)+_0x672c03[_0x1cfdf0(0x28c)]);}else{const _0x198b87=_0x3a1919['map'](_0x3c4b8e=>{const _0x3cd091=_0x1cfdf0,_0x3fcee=getAttemptStatusDisplay(_0x3c4b8e[_0x3cd091(0x2af)]);return{'title':_0x3c4b8e[_0x3cd091(0x212)]?.[_0x3cd091(0x311)]+'.'+_0x3c4b8e[_0x3cd091(0x238)]?.[_0x3cd091(0x311)]+_0x3cd091(0x2dd)+_0x3c4b8e['sessionTime']+'\x20'+_0x3fcee[_0x3cd091(0x27e)],'value':_0x3c4b8e[_0x3cd091(0x2af)]?.['id']||'','description':_0x3fcee[_0x3cd091(0x23f)]};}),_0x49a9d3=await a47_0x14d0cb({'type':_0x1cfdf0(0x219),'name':_0x1cfdf0(0x1da),'message':_0x1cfdf0(0x1fe),'choices':_0x198b87[_0x1cfdf0(0x184)](_0x209f70=>_0x209f70['value']!=='')});if(!_0x49a9d3['attemptId'])return 0x0;_0x3c88ee=_0x49a9d3[_0x1cfdf0(0x1da)];}const _0x501c4c=_0x4c2360[_0x1cfdf0(0x1c1)];return _0x501c4c?await this[_0x1cfdf0(0x2e6)](_0x3fddce,_0x3c88ee):await this[_0x1cfdf0(0x1be)](_0x3fddce,_0x3c88ee,_0x4c2360),0x0;}async['renderSingleTimeline'](_0x88bce4,_0x43b322,_0xa41d1a){const _0x31a2d0=a47_0x575465,{tdx:_0x58e9cf}=_0x88bce4;let _0x13904c,_0x2f1974;try{[_0x13904c,_0x2f1974]=await Promise[_0x31a2d0(0x2d1)]([_0x58e9cf[_0x31a2d0(0x238)][_0x31a2d0(0x222)](_0x43b322),_0x58e9cf[_0x31a2d0(0x238)]['tasks'](_0x43b322,![])]);}catch(_0x4e9b66){console[_0x31a2d0(0x18b)](a47_0x587877[_0x31a2d0(0x289)](_0x31a2d0(0x197)));_0xa41d1a[_0x31a2d0(0x246)]&&console[_0x31a2d0(0x18b)](_0x4e9b66);throw _0x4e9b66;}if(_0xa41d1a[_0x31a2d0(0x2f5)]||_0xa41d1a[_0x31a2d0(0x279)]){const _0x5c645c=this[_0x31a2d0(0x178)](_0x13904c,_0x2f1974);await handleSDKOutput([_0x5c645c],_0xa41d1a);return;}const _0x9380b9=_0x58e9cf[_0x31a2d0(0x2c6)]['site'],_0x29fe2a=this[_0x31a2d0(0x2ed)](_0x13904c,_0x2f1974,_0x9380b9);console[_0x31a2d0(0x28a)](_0x29fe2a);}async['pollTimeline'](_0x57aa7e,_0x2db6d2){const _0x2861e5=a47_0x575465,{tdx:_0x1acf92}=_0x57aa7e,_0x50ea50=TIMELINE_CONFIG[_0x2861e5(0x267)],_0x4612fd=TIMELINE_CONFIG[_0x2861e5(0x1f6)];let _0x487137=0x0;while(_0x487137<_0x4612fd){process[_0x2861e5(0x17f)][_0x2861e5(0x189)]&&process[_0x2861e5(0x17f)][_0x2861e5(0x270)]('\x1bc');let _0x12a1d3,_0xa06260;try{[_0x12a1d3,_0xa06260]=await Promise[_0x2861e5(0x2d1)]([_0x1acf92[_0x2861e5(0x238)][_0x2861e5(0x222)](_0x2db6d2),_0x1acf92[_0x2861e5(0x238)][_0x2861e5(0x1f5)](_0x2db6d2,![])]);}catch(_0x278cb0){console[_0x2861e5(0x18b)](a47_0x587877[_0x2861e5(0x289)](_0x2861e5(0x225)));_0x487137>0x0&&console[_0x2861e5(0x18b)](a47_0x587877['dim'](_0x2861e5(0x249)+_0x487137));throw _0x278cb0;}const _0x8c8f09=_0x1acf92[_0x2861e5(0x2c6)][_0x2861e5(0x180)],_0x304443=this[_0x2861e5(0x2ed)](_0x12a1d3,_0xa06260,_0x8c8f09);console[_0x2861e5(0x28a)](_0x304443);const _0x4eba7f=_0x12a1d3[_0x2861e5(0x1cc)]&&_0xa06260['every'](_0x2fffdf=>_0x2fffdf['state']!=='running'&&_0x2fffdf[_0x2861e5(0x1c0)]!==_0x2861e5(0x292));if(_0x4eba7f){console[_0x2861e5(0x18b)](a47_0x587877[_0x2861e5(0x1e5)](_0x2861e5(0x239)));break;}console[_0x2861e5(0x18b)](a47_0x587877[_0x2861e5(0x1e3)]('\x0aPolling...\x20('+_0x487137*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x24aa05=>setTimeout(_0x24aa05,_0x50ea50)),_0x487137++;}_0x487137>=_0x4612fd&&console[_0x2861e5(0x18b)](a47_0x587877[_0x2861e5(0x213)](_0x2861e5(0x24a)));}['renderTimeline'](_0x229597,_0x228194,_0x3fbc75){const _0x12949d=a47_0x575465,_0x4c6917=[],_0x34165c=TIMELINE_CONFIG[_0x12949d(0x175)],_0x1b19e8=0x5,_0x393803=process['stdout'][_0x12949d(0x298)]||0x78,_0x4c35da=_0x393803-_0x34165c-_0x1b19e8,_0x12335d=Math[_0x12949d(0x27d)](TIMELINE_CONFIG[_0x12949d(0x276)],Math[_0x12949d(0x259)](_0x4c35da,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x264d73=new Date(_0x229597[_0x12949d(0x186)])[_0x12949d(0x23a)](),_0x644f11=_0x229597[_0x12949d(0x2ca)]?new Date(_0x229597[_0x12949d(0x2ca)])[_0x12949d(0x23a)]():Date[_0x12949d(0x232)](),_0x166a1d={'start':_0x264d73,'end':_0x644f11,'duration':_0x644f11-_0x264d73},_0x45940e=new Map(),_0x556573=[];for(const _0x2f77fd of _0x228194){if(_0x2f77fd[_0x12949d(0x2ac)]){const _0x2258c=new Date(_0x2f77fd[_0x12949d(0x2ac)])[_0x12949d(0x23a)](),_0xade39b=_0x2f77fd[_0x12949d(0x2d6)]?new Date(_0x2f77fd[_0x12949d(0x2d6)])[_0x12949d(0x23a)]():Date[_0x12949d(0x232)](),_0x38ad67={'start':_0x2258c,'end':_0xade39b,'duration':_0xade39b-_0x2258c};_0x45940e[_0x12949d(0x2da)](_0x2f77fd['id'],_0x38ad67),_0x556573[_0x12949d(0x294)]({'name':_0x2f77fd[_0x12949d(0x293)],'state':_0x2f77fd[_0x12949d(0x1c0)]||'unknown','window':_0x38ad67});}else _0x556573[_0x12949d(0x294)]({'name':_0x2f77fd[_0x12949d(0x293)],'state':_0x2f77fd['state']||_0x12949d(0x292),'window':undefined});}_0x556573[_0x12949d(0x2bc)]((_0x135ca1,_0x1e516b)=>{const _0x26b112=_0x12949d;if(!_0x135ca1[_0x26b112(0x2eb)])return 0x1;if(!_0x1e516b[_0x26b112(0x2eb)])return-0x1;return _0x135ca1[_0x26b112(0x2eb)][_0x26b112(0x266)]-_0x1e516b[_0x26b112(0x2eb)][_0x26b112(0x266)];});const _0x8e3f79=_0x556573['length'],_0x2db3d4=_0x8e3f79>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x2db3d4&&_0x556573[_0x12949d(0x206)](TIMELINE_CONFIG[_0x12949d(0x190)]);const _0x21d007=calculateTimeScale(_0x166a1d,_0x12335d),_0x4c2853=_0x229597[_0x12949d(0x1cc)]?_0x229597[_0x12949d(0x1d9)]?a47_0x587877[_0x12949d(0x1e5)]('success'):a47_0x587877['red']('error'):a47_0x587877['blue'](_0x12949d(0x2c9)),_0x5d5018=_0x229597[_0x12949d(0x212)]?.['id'],_0x36d498=_0x229597['sessionId'];let _0x36230f;if(_0x5d5018&&_0x36d498){const _0x96536d=getWorkflowAttemptUrl(_0x3fbc75,_0x5d5018,_0x36d498,_0x229597['id']);_0x36230f=hyperlink(a47_0x587877[_0x12949d(0x1e3)](_0x229597['id']),_0x96536d);}else _0x36230f=a47_0x587877[_0x12949d(0x1e3)](_0x229597['id']);_0x4c6917['push']('Attempt:\x20'+_0x36230f+_0x12949d(0x2dd)+_0x4c2853+_0x12949d(0x2dd)+formatElapsed(_0x166a1d[_0x12949d(0x2a3)]));if(_0x556573[_0x12949d(0x203)]>0x0){const _0x1b730b=renderTimeAxis(_0x21d007,_0x12335d),_0x1ab479=new Date(_0x166a1d[_0x12949d(0x266)]),_0xb8f8f4=formatDate(_0x1ab479),_0x44556a=TIMELINE_CONFIG[_0x12949d(0x2ae)]+TIMELINE_CONFIG[_0x12949d(0x1b2)]+_0x34165c,_0x4d8272=_0xb8f8f4['padStart'](_0x44556a),_0x212e0b=a47_0x587877[_0x12949d(0x1e3)](_0x4d8272);_0x4c6917['push'](_0x212e0b+'\x20'+_0x1b730b);for(const _0x285a7b of _0x556573){_0x4c6917[_0x12949d(0x294)](renderTaskRow(_0x285a7b,_0x21d007,_0x12335d,_0x34165c));}const _0xaadac7=calculateStats(_0x556573);_0x4c6917[_0x12949d(0x294)](formatStats(_0xaadac7)),_0x2db3d4&&_0x4c6917[_0x12949d(0x294)](a47_0x587877[_0x12949d(0x213)](_0x12949d(0x1bc)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+'\x20of\x20'+_0x8e3f79+'\x20tasks')),_0x4c6917['push'](''),_0x4c6917[_0x12949d(0x294)](a47_0x587877[_0x12949d(0x1e3)](_0x12949d(0x22a))+(_0x12949d(0x18a)+_0x229597['id']+_0x12949d(0x2a1))+a47_0x587877['dim']('\x20to\x20see\x20detailed\x20logs'));}else _0x4c6917[_0x12949d(0x294)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x4c6917['join']('\x0a');}[a47_0x575465(0x178)](_0x2a2906,_0x131396){const _0x8b6427=a47_0x575465,_0x18c20c=new Date(_0x2a2906[_0x8b6427(0x186)])[_0x8b6427(0x23a)](),_0x508fbc=_0x2a2906[_0x8b6427(0x2ca)]?new Date(_0x2a2906[_0x8b6427(0x2ca)])[_0x8b6427(0x23a)]():Date['now'](),_0x50f92d=_0x508fbc-_0x18c20c,_0xa218c3=[];for(const _0xc8f4e7 of _0x131396){if(_0xc8f4e7[_0x8b6427(0x2ac)]){const _0x255a34=new Date(_0xc8f4e7[_0x8b6427(0x2ac)])[_0x8b6427(0x23a)](),_0x4e60cf=_0xc8f4e7[_0x8b6427(0x2d6)]?new Date(_0xc8f4e7[_0x8b6427(0x2d6)])[_0x8b6427(0x23a)]():Date[_0x8b6427(0x232)]();_0xa218c3[_0x8b6427(0x294)]({'name':_0xc8f4e7['fullName'],'state':_0xc8f4e7['state']||_0x8b6427(0x187),'window':{'start':_0x255a34,'end':_0x4e60cf,'duration':_0x4e60cf-_0x255a34}});}else _0xa218c3[_0x8b6427(0x294)]({'name':_0xc8f4e7[_0x8b6427(0x293)],'state':_0xc8f4e7[_0x8b6427(0x1c0)]||_0x8b6427(0x292),'window':undefined});}const _0x222cb3=calculateStats(_0xa218c3);return{'attempt':{'id':_0x2a2906['id'],'status':_0x2a2906[_0x8b6427(0x1cc)]?_0x2a2906['success']?_0x8b6427(0x1d9):_0x8b6427(0x18b):_0x8b6427(0x2c9),'createdAt':_0x2a2906[_0x8b6427(0x186)],'finishedAt':_0x2a2906[_0x8b6427(0x2ca)],'duration_ms':_0x50f92d},'tasks':_0xa218c3['map'](_0x104cad=>({'name':_0x104cad[_0x8b6427(0x311)],'state':_0x104cad[_0x8b6427(0x1c0)],'startedAt':_0x104cad[_0x8b6427(0x2eb)]?new Date(_0x104cad[_0x8b6427(0x2eb)]['start'])['toISOString']():null,'updatedAt':_0x104cad['window']?new Date(_0x104cad[_0x8b6427(0x2eb)][_0x8b6427(0x2b4)])[_0x8b6427(0x245)]():null,'duration_ms':_0x104cad[_0x8b6427(0x2eb)]?.[_0x8b6427(0x2a3)]||null})),'stats':_0x222cb3};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x48f7(){const _0x11a95e=[';\x20node/','1970868ohknNq','4dfimBW','Authorization','53432FieeIW','replace','18vPfMKP','1719QxPZeo','length','tdx','23784ngEARz','3453219AZSFhk','X-Trino-User','2534335QcWmwu','1392868WHVoSQ','entries','version','1MlpxiA','1683JDqewn','7849040CcKKEp'];a48_0x48f7=function(){return _0x11a95e;};return a48_0x48f7();}(function(_0x45a73f,_0x2d19de){const _0x9303d0=a48_0x57e6,_0xf323fb=_0x45a73f();while(!![]){try{const _0xc12674=-parseInt(_0x9303d0(0x1ed))/0x1*(parseInt(_0x9303d0(0x1ea))/0x2)+-parseInt(_0x9303d0(0x1f1))/0x3*(-parseInt(_0x9303d0(0x1f2))/0x4)+-parseInt(_0x9303d0(0x1fd))/0x5*(-parseInt(_0x9303d0(0x1f6))/0x6)+-parseInt(_0x9303d0(0x1fb))/0x7+parseInt(_0x9303d0(0x1f4))/0x8*(-parseInt(_0x9303d0(0x1f7))/0x9)+parseInt(_0x9303d0(0x1ef))/0xa+parseInt(_0x9303d0(0x1ee))/0xb*(parseInt(_0x9303d0(0x1fa))/0xc);if(_0xc12674===_0x2d19de)break;else _0xf323fb['push'](_0xf323fb['shift']());}catch(_0x12e574){_0xf323fb['push'](_0xf323fb['shift']());}}}(a48_0x48f7,0xc360b));import{platform}from'os';import{getAPIKey}from'./config.js';function a48_0x57e6(_0x4ec39a,_0x50ecdc){_0x4ec39a=_0x4ec39a-0x1ea;const _0x48f72d=a48_0x48f7();let _0x57e672=_0x48f72d[_0x4ec39a];return _0x57e672;}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x29acfd=a48_0x57e6,_0x35e987=getVersion(),_0x5bb5c3=platform(),_0x300834=process[_0x29acfd(0x1ec)][_0x29acfd(0x1f5)]('v','');return'tdx/'+_0x35e987+'\x20('+_0x5bb5c3+_0x29acfd(0x1f0)+_0x300834+')';}export function getAuthHeaders(_0x5ee7c1,_0x49a93a){const _0x2b0488=a48_0x57e6,_0x387e87=getVersion(),_0x4671fd={'User-Agent':getUserAgent(),'X-TD-Client':_0x2b0488(0x1f9),'X-TD-Client-Version':_0x387e87};return _0x49a93a&&(_0x4671fd[_0x2b0488(0x1f3)]='TD1\x20'+_0x49a93a),_0x4671fd;}export function toHeaderRecord(_0x57dbec){const _0x4b4ed4=a48_0x57e6,_0x5171fc={};for(const [_0x36044,_0x28caf5]of Object[_0x4b4ed4(0x1eb)](_0x57dbec)){_0x28caf5!==undefined&&(_0x5171fc[_0x36044]=_0x28caf5);}return _0x5171fc;}export function getTrinoHeaders(_0x1a18ea,_0x562e31){const _0x3facd9=a48_0x57e6,_0x3e0bf5=getAuthHeaders(_0x1a18ea,_0x562e31),_0x1846e6=toHeaderRecord(_0x3e0bf5);return delete _0x1846e6['Authorization'],_0x562e31&&(_0x1846e6[_0x3facd9(0x1fc)]=_0x562e31),_0x1846e6;}export function hasAPIKey(_0x3da4d4){const _0x257a12=a48_0x57e6,_0xc3e9c7=getAPIKey();return _0xc3e9c7!==undefined&&_0xc3e9c7[_0x257a12(0x1f8)]>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1355f2,_0x2c14f7){const _0x28f952=a49_0x1a14,_0x522592=_0x1355f2();while(!![]){try{const _0x6cffbf=-parseInt(_0x28f952(0x88))/0x1+-parseInt(_0x28f952(0x80))/0x2+-parseInt(_0x28f952(0xb6))/0x3+-parseInt(_0x28f952(0xb3))/0x4+-parseInt(_0x28f952(0x87))/0x5*(parseInt(_0x28f952(0x8f))/0x6)+-parseInt(_0x28f952(0xad))/0x7*(-parseInt(_0x28f952(0x9a))/0x8)+-parseInt(_0x28f952(0xbd))/0x9*(-parseInt(_0x28f952(0x9b))/0xa);if(_0x6cffbf===_0x2c14f7)break;else _0x522592['push'](_0x522592['shift']());}catch(_0x5ea287){_0x522592['push'](_0x522592['shift']());}}}(a49_0x77ff,0x6b9f9));function a49_0x1a14(_0x297795,_0x33cbf8){_0x297795=_0x297795-0x7b;const _0x77ff3=a49_0x77ff();let _0x1a14d4=_0x77ff3[_0x297795];return _0x1a14d4;}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 a49_0x556910 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x4beebb){const _0x463624=a49_0x1a14;return _0x4beebb['format']===_0x463624(0x8b)||_0x4beebb[_0x463624(0x84)]===_0x463624(0x7c)||_0x4beebb[_0x463624(0x84)]===_0x463624(0xa1)||_0x4beebb[_0x463624(0x84)]==='table'||_0x4beebb['json']===!![]||_0x4beebb['jsonl']===!![]||_0x4beebb[_0x463624(0xa1)]===!![]||_0x4beebb[_0x463624(0xb5)]===!![];}export function parseOutputOptions(_0x55d7e7){const _0x29b683=a49_0x1a14;return{'format':_0x55d7e7[_0x29b683(0x84)]||_0x29b683(0xb5),'output':_0x55d7e7[_0x29b683(0xbb)]||'','limit':_0x55d7e7[_0x29b683(0x8d)],'color':_0x55d7e7['color'],'noColor':_0x55d7e7['noColor']};}function convertSDKResultToQueryResult(_0xfb21b3){const _0x3bc2c0=a49_0x1a14,_0x4cc0e3=[];if(_0xfb21b3[_0x3bc2c0(0x9f)]>0x0){const _0x27327d=_0xfb21b3[0x0];for(const [_0x36bd1b,_0x24379b]of Object[_0x3bc2c0(0xaf)](_0x27327d)){let _0x1e1078=_0x3bc2c0(0xb1);if(typeof _0x24379b===_0x3bc2c0(0x97))_0x1e1078=Number['isInteger'](_0x24379b)?_0x3bc2c0(0xbc):_0x3bc2c0(0x7f);else{if(typeof _0x24379b===_0x3bc2c0(0x7e))_0x1e1078=_0x3bc2c0(0x7e);else _0x24379b===null&&(_0x1e1078=_0x3bc2c0(0xb1));}_0x4cc0e3[_0x3bc2c0(0x90)]({'name':_0x36bd1b,'type':_0x1e1078});}}return{'queryId':_0x3bc2c0(0x8a),'columns':_0x4cc0e3,'data':_0xfb21b3,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0xfb21b3[_0x3bc2c0(0x9f)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x2f77af,_0x391880){const _0x28fd09=convertSDKResultToQueryResult(_0x2f77af);return formatQueryOutput(_0x28fd09,_0x391880);}export async function formatQueryOutput(_0x1dcd3b,_0x17c659){const _0x5e11e=a49_0x1a14,{format:_0x4d1803,limit:_0x49941e,output:_0x43ef06,color:_0x167f21,noColor:_0xfb4e1b}=_0x17c659,_0x8a830a=Boolean(_0x43ef06)&&!_0x167f21,_0x1161e4={'color':_0x167f21,'noColor':_0xfb4e1b||_0x8a830a};if(_0x4d1803===_0x5e11e(0xb5)){const _0x3bb312=shouldUseLess(_0x4d1803,_0x43ef06);return formatAsTable(_0x1dcd3b,_0x49941e,_0x3bb312,_0x1161e4);}else{if(_0x4d1803===_0x5e11e(0x8b))return formatAsJSON(_0x1dcd3b,_0x1161e4);else return _0x4d1803===_0x5e11e(0x7c)?formatAsJSONL(_0x1dcd3b,_0x1161e4):formatQueryResult(_0x1dcd3b,_0x4d1803);}}function shouldUseLess(_0x23f194,_0x154202){const _0x1c9f36=a49_0x1a14;return(_0x23f194===_0x1c9f36(0xb5)||_0x23f194==='list')&&process[_0x1c9f36(0xbf)][_0x1c9f36(0xb7)]&&!_0x154202;}export function resolveOutputOptions(_0x2b8adc){const _0x1568ad=a49_0x1a14,_0x1473fd=resolveOutputFormat(_0x2b8adc[_0x1568ad(0x84)],_0x2b8adc['output'],'table');let _0x2b4e5e=typeof _0x2b8adc[_0x1568ad(0x8d)]===_0x1568ad(0x97)?_0x2b8adc[_0x1568ad(0x8d)]:parseInt(_0x2b8adc['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x22b5f2=_0x2b8adc[_0x1568ad(0xbb)]||'';return shouldUseLess(_0x1473fd,_0x22b5f2)&&(_0x2b4e5e=Infinity),{'format':_0x1473fd,'output':_0x22b5f2,'limit':_0x2b4e5e,'color':_0x2b8adc[_0x1568ad(0xa4)],'noColor':_0x2b8adc[_0x1568ad(0x96)]};}export function writeOutput(_0x49a5a1,_0x28f1a7,_0x1b6ffb){const _0x686d88=a49_0x1a14;return _0x28f1a7?(writeFileSync(_0x28f1a7,_0x49a5a1),console[_0x686d88(0xb0)](_0x686d88(0xa9)+_0x28f1a7),Promise['resolve']()):shouldUseLess(_0x1b6ffb||'','')?new Promise(_0x22b04c=>{const _0xc452e2=_0x686d88,_0x359828=spawn(_0xc452e2(0x89),[_0xc452e2(0xa2)],{'stdio':[_0xc452e2(0xba),'inherit','inherit']});let _0x563461=![];_0x359828['on'](_0xc452e2(0xb0),()=>{const _0x2ee514=_0xc452e2;!_0x563461&&(_0x563461=!![],console[_0x2ee514(0xae)](_0x49a5a1),_0x22b04c());}),_0x359828['on']('close',()=>{!_0x563461&&(_0x563461=!![],_0x22b04c());}),_0x359828['on'](_0xc452e2(0xa8),()=>{const _0x57e72f=_0xc452e2;!_0x563461&&_0x359828[_0x57e72f(0x94)]&&(_0x359828[_0x57e72f(0x94)]['on'](_0x57e72f(0xb0),()=>{}),_0x359828[_0x57e72f(0x94)][_0x57e72f(0xaa)](_0x49a5a1),_0x359828[_0x57e72f(0x94)][_0x57e72f(0x92)]());}),!_0x359828[_0xc452e2(0x94)]&&(!_0x563461&&(_0x563461=!![],console[_0xc452e2(0xae)](_0x49a5a1),_0x22b04c()));}):(console[_0x686d88(0xae)](_0x49a5a1),Promise[_0x686d88(0xa7)]());}export async function handleSDKOutput(_0x3722a4,_0x4d7de2){const _0x25e07e=a49_0x1a14,_0x13427d=resolveOutputOptions(_0x4d7de2),_0x508f95=await formatSDKOutput(_0x3722a4,_0x13427d);await writeOutput(_0x508f95,_0x13427d['output']||undefined,_0x13427d[_0x25e07e(0x84)]);}export async function handleQueryOutput(_0x654af9,_0x2882fd){const _0x41d66d=a49_0x1a14,_0x409303=resolveOutputOptions(_0x2882fd),_0x3f0e97=await formatQueryOutput(_0x654af9,_0x409303);await writeOutput(_0x3f0e97,_0x409303[_0x41d66d(0xbb)]||undefined,_0x409303['format']);}async function formatSingleObject(_0x37eda4,_0x42657e){const _0xb43da3=a49_0x1a14,{format:_0x111440,color:_0x34d3e0,noColor:_0x50c752}=_0x42657e,_0x26427b={'color':_0x34d3e0,'noColor':_0x50c752};if(_0x111440===_0xb43da3(0x8b)){if(shouldUseColor(_0x26427b))return colorizeJSON(_0x37eda4,_0x26427b);return JSON[_0xb43da3(0xb8)](_0x37eda4,null,0x2);}else{if(_0x111440===_0xb43da3(0x7c)){if(shouldUseColor(_0x26427b))return colorizeJSONCompact(_0x37eda4,_0x26427b);return JSON['stringify'](_0x37eda4);}else{if(_0x111440===_0xb43da3(0xa1))return Object[_0xb43da3(0xaf)](_0x37eda4)['map'](([_0x13cfba,_0x412c93])=>_0x13cfba+'\x09'+_0x412c93)[_0xb43da3(0x8e)]('\x0a');else{const _0x299cc4=Object[_0xb43da3(0xaf)](_0x37eda4);if(_0x299cc4['length']===0x0)return _0xb43da3(0x82);const _0x23826b=_0x37eda4['debug'],_0x5bc666=_0x37eda4[_0xb43da3(0xb4)],_0x35047b=_0x37eda4['params'],_0x54a5e9=_0x37eda4[_0xb43da3(0x9d)],_0x5ab2e8=_0x5bc666?typeof _0x5bc666===_0xb43da3(0xa5)?_0x5bc666:JSON['stringify'](_0x5bc666,null,0x2):undefined,_0x187252=_0x35047b&&Object[_0xb43da3(0xac)](_0x35047b)[_0xb43da3(0x9f)]>0x0?JSON[_0xb43da3(0xb8)](_0x35047b,null,0x2):undefined,_0x32e915=_0x54a5e9&&Object[_0xb43da3(0xac)](_0x54a5e9)['length']>0x0?JSON[_0xb43da3(0xb8)](_0x54a5e9,null,0x2):undefined,_0x4aebb2=_0x299cc4[_0xb43da3(0x86)](([_0xad9280])=>_0xad9280!==_0xb43da3(0x9c)&&_0xad9280!==_0xb43da3(0xb4)&&_0xad9280!==_0xb43da3(0xa0)&&_0xad9280!==_0xb43da3(0x9d)),_0x5c19e4=Math['max'](..._0x4aebb2['map'](([_0x3cc01d])=>_0x3cc01d[_0xb43da3(0x9f)])),_0x3cf454=Math[_0xb43da3(0xc2)](..._0x4aebb2[_0xb43da3(0x81)](([,_0x5d0ab8])=>{const _0x512db6=_0xb43da3;try{const _0x188d91=_0x5d0ab8===null||_0x5d0ab8===undefined?'':typeof _0x5d0ab8===_0x512db6(0x9e)?JSON[_0x512db6(0xb8)](_0x5d0ab8):String(_0x5d0ab8),_0xf76f5b=_0x188d91[_0x512db6(0x99)]('\x0a');return Math[_0x512db6(0xc2)](..._0xf76f5b[_0x512db6(0x81)](_0xe1e298=>_0xe1e298['length']),0x0);}catch{return 0x0;}}),0x14),_0x5c1357=[];_0x5c1357[_0xb43da3(0x90)](colorBorder('┌─'+'─'[_0xb43da3(0x91)](_0x5c19e4)+_0xb43da3(0x93)+'─'[_0xb43da3(0x91)](_0x3cf454)+'─┐',_0x26427b)),_0x4aebb2[_0xb43da3(0xc0)](([_0x50d12b,_0x5384bd])=>{const _0x5d04b2=_0xb43da3;let _0x2bda75;try{_0x2bda75=_0x5384bd===null||_0x5384bd===undefined?'':typeof _0x5384bd===_0x5d04b2(0x9e)?JSON[_0x5d04b2(0xb8)](_0x5384bd):String(_0x5384bd);}catch{_0x2bda75=_0x5d04b2(0xb2);}const _0x2a9121=_0x50d12b['padEnd'](_0x5c19e4),_0x5b6e64=_0x2bda75[_0x5d04b2(0x99)]('\x0a');_0x5b6e64[_0x5d04b2(0xc0)]((_0x3d93db,_0x461555)=>{const _0x37d009=_0x5d04b2,_0x103de4=colorBorder('│',_0x26427b);_0x461555===0x0?_0x5c1357[_0x37d009(0x90)](_0x103de4+'\x20'+_0x2a9121+'\x20'+_0x103de4+'\x20'+_0x3d93db[_0x37d009(0x83)](_0x3cf454)+'\x20'+_0x103de4):_0x5c1357[_0x37d009(0x90)](_0x103de4+'\x20'+'\x20'[_0x37d009(0x91)](_0x5c19e4)+'\x20'+_0x103de4+'\x20'+_0x3d93db[_0x37d009(0x83)](_0x3cf454)+'\x20'+_0x103de4);});}),_0x5c1357[_0xb43da3(0x90)](colorBorder('└─'+'─'['repeat'](_0x5c19e4)+'─┴─'+'─'[_0xb43da3(0x91)](_0x3cf454)+'─┘',_0x26427b));_0x5ab2e8&&(_0x5c1357['push'](''),_0x5c1357['push'](String(a49_0x556910[_0xb43da3(0xbe)]['bold'](_0xb43da3(0xa6)))),_0x5c1357[_0xb43da3(0x90)](_0x5ab2e8));_0x187252&&(_0x5c1357[_0xb43da3(0x90)](''),_0x5c1357[_0xb43da3(0x90)](String(a49_0x556910['blue'][_0xb43da3(0x7b)](_0xb43da3(0xc1)))),_0x5c1357['push'](_0x187252));_0x32e915&&(_0x5c1357[_0xb43da3(0x90)](''),_0x5c1357[_0xb43da3(0x90)](String(a49_0x556910['magenta'][_0xb43da3(0x7b)](_0xb43da3(0x98)))),_0x5c1357[_0xb43da3(0x90)](_0x32e915));if(_0x23826b){if(_0x23826b['stderr']){_0x5c1357['push'](''),_0x5c1357[_0xb43da3(0x90)](String(a49_0x556910[_0xb43da3(0x7d)][_0xb43da3(0x7b)](_0xb43da3(0xa3))));const _0x44a3fd=_0x23826b[_0xb43da3(0x95)]['split']('\x0a');_0x44a3fd[_0xb43da3(0xc0)](_0x2e4666=>{const _0x3f29fd=_0xb43da3;_0x2e4666[_0x3f29fd(0x8c)]()&&_0x5c1357[_0x3f29fd(0x90)](_0x2e4666);});}if(_0x23826b[_0xb43da3(0x85)]){_0x5c1357[_0xb43da3(0x90)](''),_0x5c1357[_0xb43da3(0x90)](String(a49_0x556910[_0xb43da3(0xb9)][_0xb43da3(0x7b)](_0xb43da3(0xab))));const _0x48d92c=_0x23826b['cmdout'][_0xb43da3(0x99)]('\x0a');_0x48d92c[_0xb43da3(0xc0)](_0x5b5707=>{const _0x197be1=_0xb43da3;_0x5b5707[_0x197be1(0x8c)]()&&_0x5c1357[_0x197be1(0x90)](_0x5b5707);});}}return _0x5c1357[_0xb43da3(0x8e)]('\x0a');}}}}function a49_0x77ff(){const _0xe37891=['1867116BGojUy','query','table','657915jDvdZa','isTTY','stringify','cyan','pipe','output','bigint','1440XqQmjT','yellow','stdout','forEach','[params]','max','bold','jsonl','red','boolean','double','944860qlUmFP','map','No\x20data','padEnd','format','cmdout','filter','2795JIviTt','829752AySbsf','less','sdk-result','json','trim','limit','join','1374KkcWXu','push','repeat','end','─┬─','stdin','stderr','noColor','number','[rule]','split','16WEBYIQ','136520ioRmZx','debug','rule','object','length','params','tsv','-FXRSn','[error]','color','string','[query]','resolve','spawn','Results\x20saved\x20to\x20','write','[logs]','keys','1304737EMTPRF','log','entries','error','varchar','[Object]'];a49_0x77ff=function(){return _0xe37891;};return a49_0x77ff();}export async function handleSingleObjectOutput(_0x2c9541,_0x3bc023){const _0xeb5333=a49_0x1a14;if(_0x3bc023[_0xeb5333(0x84)]==='table'){await handleSDKOutput([_0x2c9541],_0x3bc023);return;}const _0x3b05f5=resolveOutputOptions(_0x3bc023),_0x39aef1=await formatSingleObject(_0x2c9541,_0x3b05f5);await writeOutput(_0x39aef1,_0x3b05f5[_0xeb5333(0xbb)]||undefined,_0x3b05f5[_0xeb5333(0x84)]);}
|
|
1
|
+
function a49_0x12ac(){const _0x336621=['limit','No\x20data','stringify','number','[Object]','keys','noColor','log','format','query','90EZXdBQ','─┬─','table','1307224kCYoUd','24409pGDuRR','forEach','stderr','tsv','cyan','join','output','red','params','stdin','[error]','object','cmdout','list','jsonl','padEnd','pipe','2274ypPtBt','isTTY','trim','154552oajvXS','49617BTfYFc','max','1337826iXWOhR','[rule]','length','write','bold','blue','error','boolean','inherit','close','double','json','1mnpHzj','repeat','entries','-FXRSn','resolve','split','map','[params]','FINISHED','2735732qFlnnf','push','─┴─','60pwowns','varchar','string','8994920HESBdp','magenta','less','bigint','[query]','rule','debug','yellow'];a49_0x12ac=function(){return _0x336621;};return a49_0x12ac();}(function(_0x13b13a,_0x4527ab){const _0x21d7e5=a49_0x569e,_0x5f22e1=_0x13b13a();while(!![]){try{const _0xb09bd7=parseInt(_0x21d7e5(0xb3))/0x1*(-parseInt(_0x21d7e5(0xbc))/0x2)+-parseInt(_0x21d7e5(0xef))/0x3+-parseInt(_0x21d7e5(0xec))/0x4*(-parseInt(_0x21d7e5(0xbf))/0x5)+parseInt(_0x21d7e5(0xe9))/0x6*(parseInt(_0x21d7e5(0xd8))/0x7)+parseInt(_0x21d7e5(0xd7))/0x8+-parseInt(_0x21d7e5(0xed))/0x9*(parseInt(_0x21d7e5(0xd4))/0xa)+parseInt(_0x21d7e5(0xc2))/0xb;if(_0xb09bd7===_0x4527ab)break;else _0x5f22e1['push'](_0x5f22e1['shift']());}catch(_0x44dc92){_0x5f22e1['push'](_0x5f22e1['shift']());}}}(a49_0x12ac,0xdc70f));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a49_0x569e(_0x3127fa,_0x4fc18e){_0x3127fa=_0x3127fa-0xaa;const _0x12ac96=a49_0x12ac();let _0x569eee=_0x12ac96[_0x3127fa];return _0x569eee;}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a49_0x1f9139 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1829ec){const _0x3fe3b0=a49_0x569e;return _0x1829ec['format']===_0x3fe3b0(0xb2)||_0x1829ec[_0x3fe3b0(0xd2)]==='jsonl'||_0x1829ec['format']===_0x3fe3b0(0xdb)||_0x1829ec[_0x3fe3b0(0xd2)]===_0x3fe3b0(0xd6)||_0x1829ec['json']===!![]||_0x1829ec[_0x3fe3b0(0xe6)]===!![]||_0x1829ec['tsv']===!![]||_0x1829ec['table']===!![];}export function parseOutputOptions(_0x530507){const _0x1007c4=a49_0x569e;return{'format':_0x530507[_0x1007c4(0xd2)]||_0x1007c4(0xd6),'output':_0x530507[_0x1007c4(0xde)]||'','limit':_0x530507[_0x1007c4(0xca)],'color':_0x530507['color'],'noColor':_0x530507[_0x1007c4(0xd0)]};}function convertSDKResultToQueryResult(_0x47b62b){const _0x3d39d6=a49_0x569e,_0x226e10=[];if(_0x47b62b[_0x3d39d6(0xf1)]>0x0){const _0x17fdff=_0x47b62b[0x0];for(const [_0xc97b8b,_0x3e0b95]of Object[_0x3d39d6(0xb5)](_0x17fdff)){let _0x339c1b=_0x3d39d6(0xc0);if(typeof _0x3e0b95===_0x3d39d6(0xcd))_0x339c1b=Number['isInteger'](_0x3e0b95)?_0x3d39d6(0xc5):_0x3d39d6(0xb1);else{if(typeof _0x3e0b95==='boolean')_0x339c1b=_0x3d39d6(0xae);else _0x3e0b95===null&&(_0x339c1b=_0x3d39d6(0xc0));}_0x226e10[_0x3d39d6(0xbd)]({'name':_0xc97b8b,'type':_0x339c1b});}}return{'queryId':'sdk-result','columns':_0x226e10,'data':_0x47b62b,'stats':{'state':_0x3d39d6(0xbb),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x47b62b[_0x3d39d6(0xf1)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x491f14,_0x49c95c){const _0x443591=convertSDKResultToQueryResult(_0x491f14);return formatQueryOutput(_0x443591,_0x49c95c);}export async function formatQueryOutput(_0x3b8581,_0x9e857e){const _0x1450af=a49_0x569e,{format:_0x32a77d,limit:_0x1e6f59,output:_0x43b98a,color:_0x462f3d,noColor:_0x49c5ec}=_0x9e857e,_0x468a19=Boolean(_0x43b98a)&&!_0x462f3d,_0x1f634a={'color':_0x462f3d,'noColor':_0x49c5ec||_0x468a19};if(_0x32a77d===_0x1450af(0xd6)){const _0x2599da=shouldUseLess(_0x32a77d,_0x43b98a);return formatAsTable(_0x3b8581,_0x1e6f59,_0x2599da,_0x1f634a);}else{if(_0x32a77d===_0x1450af(0xb2))return formatAsJSON(_0x3b8581,_0x1f634a);else return _0x32a77d==='jsonl'?formatAsJSONL(_0x3b8581,_0x1f634a):formatQueryResult(_0x3b8581,_0x32a77d);}}function shouldUseLess(_0x6d8dff,_0x455340){const _0x54d553=a49_0x569e;return(_0x6d8dff===_0x54d553(0xd6)||_0x6d8dff===_0x54d553(0xe5))&&process['stdout'][_0x54d553(0xea)]&&!_0x455340;}export function resolveOutputOptions(_0x2c37e1){const _0x13a642=a49_0x569e,_0x479d01=resolveOutputFormat(_0x2c37e1[_0x13a642(0xd2)],_0x2c37e1[_0x13a642(0xde)],_0x13a642(0xd6));let _0x22e725=typeof _0x2c37e1[_0x13a642(0xca)]===_0x13a642(0xcd)?_0x2c37e1[_0x13a642(0xca)]:parseInt(_0x2c37e1['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x26f7cc=_0x2c37e1['output']||'';return shouldUseLess(_0x479d01,_0x26f7cc)&&(_0x22e725=Infinity),{'format':_0x479d01,'output':_0x26f7cc,'limit':_0x22e725,'color':_0x2c37e1['color'],'noColor':_0x2c37e1[_0x13a642(0xd0)]};}export function writeOutput(_0x4abc9c,_0x4a4647,_0x160253){const _0x53a7fe=a49_0x569e;return _0x4a4647?(writeFileSync(_0x4a4647,_0x4abc9c),console['error']('Results\x20saved\x20to\x20'+_0x4a4647),Promise['resolve']()):shouldUseLess(_0x160253||'','')?new Promise(_0x3f6c79=>{const _0x3e8d19=a49_0x569e,_0x47dfd5=spawn(_0x3e8d19(0xc4),[_0x3e8d19(0xb6)],{'stdio':[_0x3e8d19(0xe8),_0x3e8d19(0xaf),'inherit']});let _0x4f1ce7=![];_0x47dfd5['on'](_0x3e8d19(0xad),()=>{const _0x106fde=_0x3e8d19;!_0x4f1ce7&&(_0x4f1ce7=!![],console[_0x106fde(0xd1)](_0x4abc9c),_0x3f6c79());}),_0x47dfd5['on'](_0x3e8d19(0xb0),()=>{!_0x4f1ce7&&(_0x4f1ce7=!![],_0x3f6c79());}),_0x47dfd5['on']('spawn',()=>{const _0x58b533=_0x3e8d19;!_0x4f1ce7&&_0x47dfd5['stdin']&&(_0x47dfd5[_0x58b533(0xe1)]['on'](_0x58b533(0xad),()=>{}),_0x47dfd5[_0x58b533(0xe1)][_0x58b533(0xaa)](_0x4abc9c),_0x47dfd5[_0x58b533(0xe1)]['end']());}),!_0x47dfd5[_0x3e8d19(0xe1)]&&(!_0x4f1ce7&&(_0x4f1ce7=!![],console[_0x3e8d19(0xd1)](_0x4abc9c),_0x3f6c79()));}):(console[_0x53a7fe(0xd1)](_0x4abc9c),Promise[_0x53a7fe(0xb7)]());}export async function handleSDKOutput(_0x2f52a4,_0x59691a){const _0x40116f=a49_0x569e,_0x1aa248=resolveOutputOptions(_0x59691a),_0x4c9460=await formatSDKOutput(_0x2f52a4,_0x1aa248);await writeOutput(_0x4c9460,_0x1aa248['output']||undefined,_0x1aa248[_0x40116f(0xd2)]);}export async function handleQueryOutput(_0x181105,_0x29dbdf){const _0x12aef9=a49_0x569e,_0x155795=resolveOutputOptions(_0x29dbdf),_0x561245=await formatQueryOutput(_0x181105,_0x155795);await writeOutput(_0x561245,_0x155795[_0x12aef9(0xde)]||undefined,_0x155795['format']);}async function formatSingleObject(_0x55f924,_0x260459){const _0x303b8=a49_0x569e,{format:_0x12b44e,color:_0x4200a5,noColor:_0x3d9b8a}=_0x260459,_0x317670={'color':_0x4200a5,'noColor':_0x3d9b8a};if(_0x12b44e===_0x303b8(0xb2)){if(shouldUseColor(_0x317670))return colorizeJSON(_0x55f924,_0x317670);return JSON[_0x303b8(0xcc)](_0x55f924,null,0x2);}else{if(_0x12b44e===_0x303b8(0xe6)){if(shouldUseColor(_0x317670))return colorizeJSONCompact(_0x55f924,_0x317670);return JSON[_0x303b8(0xcc)](_0x55f924);}else{if(_0x12b44e===_0x303b8(0xdb))return Object[_0x303b8(0xb5)](_0x55f924)[_0x303b8(0xb9)](([_0x19af8a,_0x1646ad])=>_0x19af8a+'\x09'+_0x1646ad)[_0x303b8(0xdd)]('\x0a');else{const _0x33df68=Object[_0x303b8(0xb5)](_0x55f924);if(_0x33df68[_0x303b8(0xf1)]===0x0)return _0x303b8(0xcb);const _0x5adaea=_0x55f924[_0x303b8(0xc8)],_0x13c054=_0x55f924[_0x303b8(0xd3)],_0x1f1c01=_0x55f924[_0x303b8(0xe0)],_0x2e819f=_0x55f924[_0x303b8(0xc7)],_0x4335e6=_0x13c054?typeof _0x13c054===_0x303b8(0xc1)?_0x13c054:JSON[_0x303b8(0xcc)](_0x13c054,null,0x2):undefined,_0x2e58fb=_0x1f1c01&&Object['keys'](_0x1f1c01)[_0x303b8(0xf1)]>0x0?JSON[_0x303b8(0xcc)](_0x1f1c01,null,0x2):undefined,_0x4e46af=_0x2e819f&&Object[_0x303b8(0xcf)](_0x2e819f)[_0x303b8(0xf1)]>0x0?JSON[_0x303b8(0xcc)](_0x2e819f,null,0x2):undefined,_0xde4c58=_0x33df68['filter'](([_0x5f117a])=>_0x5f117a!==_0x303b8(0xc8)&&_0x5f117a!=='query'&&_0x5f117a!=='params'&&_0x5f117a!==_0x303b8(0xc7)),_0x2add9c=Math[_0x303b8(0xee)](..._0xde4c58['map'](([_0x1cca1c])=>_0x1cca1c[_0x303b8(0xf1)])),_0x3044f8=Math[_0x303b8(0xee)](..._0xde4c58[_0x303b8(0xb9)](([,_0x57ba78])=>{const _0x5291a3=_0x303b8;try{const _0x2ad41f=_0x57ba78===null||_0x57ba78===undefined?'':typeof _0x57ba78==='object'?JSON['stringify'](_0x57ba78):String(_0x57ba78),_0x3e6ac3=_0x2ad41f[_0x5291a3(0xb8)]('\x0a');return Math['max'](..._0x3e6ac3['map'](_0x163085=>_0x163085[_0x5291a3(0xf1)]),0x0);}catch{return 0x0;}}),0x14),_0x14a76f=[];_0x14a76f['push'](colorBorder('┌─'+'─'[_0x303b8(0xb4)](_0x2add9c)+_0x303b8(0xd5)+'─'[_0x303b8(0xb4)](_0x3044f8)+'─┐',_0x317670)),_0xde4c58[_0x303b8(0xd9)](([_0x4eaeae,_0xfd3a84])=>{const _0x5dc1bc=_0x303b8;let _0x254890;try{_0x254890=_0xfd3a84===null||_0xfd3a84===undefined?'':typeof _0xfd3a84===_0x5dc1bc(0xe3)?JSON[_0x5dc1bc(0xcc)](_0xfd3a84):String(_0xfd3a84);}catch{_0x254890=_0x5dc1bc(0xce);}const _0x2e0448=_0x4eaeae[_0x5dc1bc(0xe7)](_0x2add9c),_0x168396=_0x254890[_0x5dc1bc(0xb8)]('\x0a');_0x168396[_0x5dc1bc(0xd9)]((_0x4bfaa7,_0x34f4b3)=>{const _0x86ff8d=_0x5dc1bc,_0x456030=colorBorder('│',_0x317670);_0x34f4b3===0x0?_0x14a76f['push'](_0x456030+'\x20'+_0x2e0448+'\x20'+_0x456030+'\x20'+_0x4bfaa7['padEnd'](_0x3044f8)+'\x20'+_0x456030):_0x14a76f[_0x86ff8d(0xbd)](_0x456030+'\x20'+'\x20'[_0x86ff8d(0xb4)](_0x2add9c)+'\x20'+_0x456030+'\x20'+_0x4bfaa7[_0x86ff8d(0xe7)](_0x3044f8)+'\x20'+_0x456030);});}),_0x14a76f[_0x303b8(0xbd)](colorBorder('└─'+'─'[_0x303b8(0xb4)](_0x2add9c)+_0x303b8(0xbe)+'─'['repeat'](_0x3044f8)+'─┘',_0x317670));_0x4335e6&&(_0x14a76f['push'](''),_0x14a76f['push'](String(a49_0x1f9139[_0x303b8(0xc9)]['bold'](_0x303b8(0xc6)))),_0x14a76f['push'](_0x4335e6));_0x2e58fb&&(_0x14a76f['push'](''),_0x14a76f[_0x303b8(0xbd)](String(a49_0x1f9139[_0x303b8(0xac)]['bold'](_0x303b8(0xba)))),_0x14a76f[_0x303b8(0xbd)](_0x2e58fb));_0x4e46af&&(_0x14a76f[_0x303b8(0xbd)](''),_0x14a76f[_0x303b8(0xbd)](String(a49_0x1f9139[_0x303b8(0xc3)][_0x303b8(0xab)](_0x303b8(0xf0)))),_0x14a76f[_0x303b8(0xbd)](_0x4e46af));if(_0x5adaea){if(_0x5adaea['stderr']){_0x14a76f[_0x303b8(0xbd)](''),_0x14a76f[_0x303b8(0xbd)](String(a49_0x1f9139[_0x303b8(0xdf)][_0x303b8(0xab)](_0x303b8(0xe2))));const _0x125d56=_0x5adaea[_0x303b8(0xda)][_0x303b8(0xb8)]('\x0a');_0x125d56['forEach'](_0x4196c3=>{const _0x4b42c0=_0x303b8;_0x4196c3[_0x4b42c0(0xeb)]()&&_0x14a76f['push'](_0x4196c3);});}if(_0x5adaea[_0x303b8(0xe4)]){_0x14a76f['push'](''),_0x14a76f['push'](String(a49_0x1f9139[_0x303b8(0xdc)][_0x303b8(0xab)]('[logs]')));const _0x3c9fd7=_0x5adaea[_0x303b8(0xe4)][_0x303b8(0xb8)]('\x0a');_0x3c9fd7['forEach'](_0x1a3b67=>{const _0x46cc67=_0x303b8;_0x1a3b67['trim']()&&_0x14a76f[_0x46cc67(0xbd)](_0x1a3b67);});}}return _0x14a76f[_0x303b8(0xdd)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x4618b1,_0x1972a6){const _0x4aaa38=a49_0x569e;if(_0x1972a6['format']===_0x4aaa38(0xd6)){await handleSDKOutput([_0x4618b1],_0x1972a6);return;}const _0xf4a00e=resolveOutputOptions(_0x1972a6),_0x285f87=await formatSingleObject(_0x4618b1,_0xf4a00e);await writeOutput(_0x285f87,_0xf4a00e[_0x4aaa38(0xde)]||undefined,_0xf4a00e[_0x4aaa38(0xd2)]);}
|