@treasuredata/tdx 2026.3.32 → 2026.3.33
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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.d.ts +1 -3
- package/dist/commands/work-command.d.ts.map +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/work-command.js.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +42 -19
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/types/workspace.js.map +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.d.ts +15 -0
- package/dist/sdk/workspace/git.d.ts.map +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/git.js.map +1 -1
- package/dist/sdk/workspace/index.d.ts +38 -21
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.d.ts +49 -0
- package/dist/sdk/workspace/weekly.d.ts.map +1 -0
- package/dist/sdk/workspace/weekly.js +1 -0
- package/dist/sdk/workspace/weekly.js.map +1 -0
- package/dist/sdk/workspace/wikilinks.d.ts +7 -2
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/sdk/workspace/wikilinks.js.map +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
- package/dist/sdk/workspace/skills.d.ts +0 -34
- package/dist/sdk/workspace/skills.d.ts.map +0 -1
- package/dist/sdk/workspace/skills.js +0 -1
- package/dist/sdk/workspace/skills.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a55_0x51cda1=a55_0x1db5;(function(_0x5e06e3,_0x38dc0a){const _0x9156af=a55_0x1db5,_0x43ec2c=_0x5e06e3();while(!![]){try{const _0x3173c4=parseInt(_0x9156af(0x268))/0x1*(-parseInt(_0x9156af(0x33f))/0x2)+-parseInt(_0x9156af(0x368))/0x3+parseInt(_0x9156af(0x286))/0x4*(-parseInt(_0x9156af(0x370))/0x5)+parseInt(_0x9156af(0x312))/0x6+-parseInt(_0x9156af(0x307))/0x7+-parseInt(_0x9156af(0x332))/0x8*(-parseInt(_0x9156af(0x298))/0x9)+-parseInt(_0x9156af(0x229))/0xa*(-parseInt(_0x9156af(0x378))/0xb);if(_0x3173c4===_0x38dc0a)break;else _0x43ec2c['push'](_0x43ec2c['shift']());}catch(_0x218b10){_0x43ec2c['push'](_0x43ec2c['shift']());}}}(a55_0x352b,0x4729a));import a55_0x169b33 from'chalk';import{existsSync}from'fs';import a55_0x2d2e63 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a55_0x4fbd47 from'prompts';function getAttemptStatusDisplay(_0x3316ae){const _0x3f516b=a55_0x1db5;if(!_0x3316ae)return{'icon':'⏳','text':''};const {done:_0x4d5cde,success:_0x2d8082,cancelRequested:_0x5c552d}=_0x3316ae;if(!_0x4d5cde)return _0x5c552d?{'icon':'🛑','text':a55_0x169b33[_0x3f516b(0x22d)]('canceling')}:{'icon':'🔄','text':a55_0x169b33[_0x3f516b(0x214)](_0x3f516b(0x36c))};if(_0x2d8082)return{'icon':'✅','text':a55_0x169b33[_0x3f516b(0x2cd)](_0x3f516b(0x271))};return{'icon':'❌','text':a55_0x169b33[_0x3f516b(0x352)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x51cda1(0x25c)](_0x476689,_0x5c972f,_0x423f9e=0x0){const _0x4a17a9=a55_0x51cda1;return _0x476689[_0x423f9e]||_0x5c972f[_0x4a17a9(0x272)];}[a55_0x51cda1(0x32a)](_0x5c5c38,_0x441b87,_0x3c9b92=0x0){const _0x1f80b0=a55_0x51cda1,_0x1d0c23=this[_0x1f80b0(0x25c)](_0x5c5c38,_0x441b87,_0x3c9b92);if(!_0x1d0c23)return console['error'](a55_0x169b33[_0x1f80b0(0x352)]('Error:'),_0x1f80b0(0x2f7)),console['error'](a55_0x169b33[_0x1f80b0(0x2df)](_0x1f80b0(0x290))),null;return _0x1d0c23;}[a55_0x51cda1(0x2d9)](_0x55133c,_0x1c2f6b){const _0x2e1730=a55_0x51cda1;if(_0x55133c[0x0]){const _0x58db51=_0x55133c[0x0][_0x2e1730(0x28a)]('.');if(_0x58db51[_0x2e1730(0x2e7)]===0x1)return{'projectName':_0x58db51[0x0],'workflowName':undefined};else return _0x58db51[_0x2e1730(0x2e7)]===0x2?{'projectName':_0x58db51[0x0],'workflowName':_0x58db51[0x1]}:(console[_0x2e1730(0x1f9)](a55_0x169b33[_0x2e1730(0x352)](_0x2e1730(0x249)),_0x2e1730(0x26a)),null);}return{'projectName':_0x1c2f6b[_0x2e1730(0x272)],'workflowName':undefined};}[a55_0x51cda1(0x383)](_0x55bf40,_0x281597,_0x575efe=0x0){const _0x4c81d7=a55_0x51cda1;if(_0x55bf40[_0x575efe])return _0x55bf40[_0x575efe];if(_0x281597[_0x4c81d7(0x272)]){const _0x2f1713=a55_0x2d2e63['join'](process['cwd'](),_0x4c81d7(0x2e4),_0x281597[_0x4c81d7(0x272)]);if(existsSync(a55_0x2d2e63['join'](_0x2f1713,_0x4c81d7(0x2c1))))return _0x2f1713;}return undefined;}async[a55_0x51cda1(0x348)](_0x219977,_0x40aeb0,_0x276203){const _0x3529ef=a55_0x51cda1;try{const _0x5bb4c3=await _0x219977[_0x3529ef(0x284)][_0x3529ef(0x2e4)](_0x40aeb0,{'limit':0x1});if(_0x5bb4c3[_0x3529ef(0x2e7)]>0x0){const _0x262f61=_0x5bb4c3[0x0]['id'],_0x16f917=getWorkflowUrl(_0x276203,_0x262f61);console[_0x3529ef(0x1f9)]('\x20\x20Console:\x20'+a55_0x169b33[_0x3529ef(0x219)](_0x16f917));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x51cda1(0x2d2)]='workflow:use';[a55_0x51cda1(0x2d1)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a55_0x51cda1(0x339)](_0x431d61){const _0x1b5994=a55_0x51cda1,{options:_0x348ff9,args:_0x1fec62,tdx:_0x19dea1}=_0x431d61,_0xfd7c89=_0x1fec62[0x0],_0x4619dd=_0x348ff9[_0x1b5994(0x37e)];if(_0x4619dd)return saveSessionContext({'workflow_project':undefined},_0x348ff9[_0x1b5994(0x29e)]),console[_0x1b5994(0x37f)](a55_0x169b33['green'](_0x1b5994(0x34f))),0x0;if(!_0xfd7c89)return console[_0x1b5994(0x1f9)](a55_0x169b33['red'](_0x1b5994(0x249)),_0x1b5994(0x2f7)),console['error'](a55_0x169b33['dim'](_0x1b5994(0x264))),console[_0x1b5994(0x1f9)](a55_0x169b33[_0x1b5994(0x2df)](_0x1b5994(0x255))),0x1;const _0x3fa7bc=await withSpinner(_0x1b5994(0x217)+_0xfd7c89+'\x27...',()=>_0x19dea1[_0x1b5994(0x284)][_0x1b5994(0x2ba)](_0xfd7c89),{'verbose':_0x348ff9[_0x1b5994(0x248)]}),{name:_0x28528c}=_0x3fa7bc[_0x1b5994(0x33a)];return saveSessionContext({'workflow_project':_0x28528c},_0x348ff9[_0x1b5994(0x29e)]),console['log'](a55_0x169b33['green']('✔\x20Workflow\x20project\x20set\x20to:\x20'+a55_0x169b33[_0x1b5994(0x219)](_0x28528c))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x237);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x22a);async[a55_0x51cda1(0x339)](_0x13521e){const _0x144975=a55_0x51cda1,{options:_0x1f474d,args:_0x1b68da,tdx:_0x238321}=_0x13521e,_0x34eb95=_0x1b68da[0x0];_0x1f474d[_0x144975(0x248)]&&_0x34eb95&&console[_0x144975(0x1f9)](_0x144975(0x1f7)+_0x34eb95);const _0x55ed36=await withSpinner(_0x144975(0x2ac),()=>_0x238321[_0x144975(0x284)][_0x144975(0x318)](_0x34eb95,{'limit':_0x1f474d[_0x144975(0x24f)]}),{'verbose':_0x1f474d[_0x144975(0x248)]});let _0x23ca9e=_0x55ed36[_0x144975(0x33a)];_0x23ca9e[_0x144975(0x324)]((_0x4fb29b,_0x146169)=>_0x4fb29b['name'][_0x144975(0x33c)](_0x146169[_0x144975(0x2d2)]));const _0xea336a=_0x1f474d[_0x144975(0x24f)]||0x64,_0x39129f=_0x23ca9e['length']>=_0xea336a?a55_0x169b33['dim'](_0x144975(0x319)):'';console[_0x144975(0x1f9)](_0x144975(0x32d)+_0x23ca9e['length']+_0x144975(0x26d)+(_0x23ca9e[_0x144975(0x2e7)]!==0x1?'s':'')+_0x39129f);if(_0x1f474d['format']===_0x144975(0x29b)||_0x1f474d[_0x144975(0x390)]==='jsonl'||_0x1f474d[_0x144975(0x390)]===_0x144975(0x2d5))await handleSDKOutput(_0x23ca9e,_0x1f474d);else{if(_0x23ca9e['length']===0x0)_0x34eb95?console[_0x144975(0x37f)](_0x144975(0x297)+_0x34eb95):console[_0x144975(0x37f)](_0x144975(0x257));else{const _0x1bfccb=_0x23ca9e[_0x144975(0x2cc)](_0x5d9645=>{const _0x2f3df9=_0x144975,_0x612344=_0x5d9645['metadata']?.['some'](_0x507f26=>_0x507f26[_0x2f3df9(0x3a0)]===_0x2f3df9(0x270)),_0x1170e9=_0x612344?a55_0x169b33['dim'](_0x2f3df9(0x32b)):'';return _0x2f3df9(0x2fa)+_0x5d9645['name']+_0x1170e9;});await writeOutput(_0x1bfccb[_0x144975(0x342)]('\x0a'),_0x1f474d[_0x144975(0x38d)],_0x144975(0x359));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x2bb);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x2c6);async[a55_0x51cda1(0x339)](_0x8738a9){const _0x49a177=a55_0x51cda1,{options:_0x1fa019,args:_0x4a3677,tdx:_0x5e230d}=_0x8738a9,_0x4a5a01=this[_0x49a177(0x25c)](_0x4a3677,_0x1fa019);_0x1fa019['verbose']&&_0x4a5a01&&console[_0x49a177(0x1f9)](_0x49a177(0x27f)+_0x4a5a01);const _0x322801=await withSpinner(_0x49a177(0x387),()=>_0x5e230d['workflow']['workflows'](_0x4a5a01,{'limit':_0x1fa019[_0x49a177(0x24f)]}),{'verbose':_0x1fa019[_0x49a177(0x248)]});let _0x38a419=_0x322801[_0x49a177(0x33a)];_0x38a419[_0x49a177(0x324)]((_0x19ff96,_0x2e651b)=>{const _0x412305=_0x49a177,_0x314f69=_0x19ff96[_0x412305(0x2d2)][_0x412305(0x33c)](_0x2e651b['name']);if(_0x314f69!==0x0)return _0x314f69;return(_0x19ff96[_0x412305(0x35e)]?.['name']||'')[_0x412305(0x33c)](_0x2e651b['project']?.['name']||'');});const _0x1032b2=_0x1fa019[_0x49a177(0x24f)]||0x64,_0x64b164=_0x38a419[_0x49a177(0x2e7)]>=_0x1032b2?a55_0x169b33[_0x49a177(0x2df)](_0x49a177(0x319)):'';console[_0x49a177(0x1f9)]('✔\x20Found\x20'+_0x38a419[_0x49a177(0x2e7)]+'\x20workflow'+(_0x38a419[_0x49a177(0x2e7)]!==0x1?'s':'')+_0x64b164);if(_0x1fa019[_0x49a177(0x390)]==='json'||_0x1fa019[_0x49a177(0x390)]==='jsonl'||_0x1fa019['format']===_0x49a177(0x2d5))await handleSDKOutput(_0x38a419,_0x1fa019);else{if(_0x38a419[_0x49a177(0x2e7)]===0x0)_0x4a5a01?console[_0x49a177(0x37f)](_0x49a177(0x397)+_0x4a5a01):console[_0x49a177(0x37f)](_0x49a177(0x2fd));else{const _0x17bfbc=_0x1fa019[_0x49a177(0x31c)],_0x36c7ab=_0x38a419[_0x49a177(0x2cc)](_0x5a61db=>{const _0x5ae989=_0x49a177,_0x5a1635=a55_0x169b33['dim']('#'+_0x5a61db['id']),_0x13ec9e=hyperlink(_0x5a1635,getWorkflowUrl(_0x17bfbc,_0x5a61db['id'])),_0x808e09=_0x5a61db[_0x5ae989(0x35e)]?.['name']?a55_0x169b33['dim']('\x20('+_0x5a61db[_0x5ae989(0x35e)][_0x5ae989(0x2d2)]+')'):'';return _0x5ae989(0x345)+_0x13ec9e+'\x20'+_0x5a61db[_0x5ae989(0x2d2)]+_0x808e09;});await writeOutput(_0x36c7ab[_0x49a177(0x342)]('\x0a'),_0x1fa019['output'],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]='workflow:sessions';[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x357);async['execute'](_0x79a39){const _0x53b306=a55_0x51cda1,{options:_0x41ede4,args:_0x311a55,tdx:_0x1105bc}=_0x79a39,_0x3bd76f=this[_0x53b306(0x2d9)](_0x311a55,_0x41ede4);if(!_0x3bd76f)return 0x1;const {projectName:_0x13c70e,workflowName:_0x1216ba}=_0x3bd76f;if(_0x41ede4['verbose']){if(_0x13c70e&&_0x1216ba)console[_0x53b306(0x1f9)](_0x53b306(0x308)+_0x13c70e+'.'+_0x1216ba);else _0x13c70e&&console[_0x53b306(0x1f9)](_0x53b306(0x23c)+_0x13c70e);const _0xb36edb=_0x41ede4[_0x53b306(0x37c)];_0xb36edb&&console[_0x53b306(0x1f9)](_0x53b306(0x36d)+_0xb36edb);}let _0x163853=0x28;if(process[_0x53b306(0x389)]['isTTY']&&!_0x41ede4[_0x53b306(0x38d)]&&!_0x41ede4[_0x53b306(0x390)]){const _0xbd7c16=process[_0x53b306(0x389)][_0x53b306(0x2f3)]||0x28;_0x163853=Math['max'](0x14,Math[_0x53b306(0x2e8)](_0xbd7c16*0x2/0x3));}const _0x3e4138=_0x41ede4[_0x53b306(0x24f)]||_0x163853,_0x3d421b=await withSpinner(_0x53b306(0x2c3),()=>_0x1105bc[_0x53b306(0x284)][_0x53b306(0x23a)]({'projectName':_0x13c70e,'workflowName':_0x1216ba,'status':_0x41ede4['status'],'fromTime':_0x41ede4[_0x53b306(0x2b1)],'toTime':_0x41ede4['to'],'limit':_0x3e4138}),{'verbose':_0x41ede4['verbose']}),_0xeec98b=_0x3d421b['data'];_0xeec98b[_0x53b306(0x324)]((_0x871ece,_0x5002a2)=>{const _0x329504=_0x53b306,_0x1b410e=_0x871ece[_0x329504(0x226)]||'',_0x4ba06f=_0x5002a2[_0x329504(0x226)]||'';return _0x4ba06f[_0x329504(0x33c)](_0x1b410e);});_0xeec98b[_0x53b306(0x2e7)]>=_0x3e4138?console['error']('✔\x20Showing\x20'+_0xeec98b['length']+'\x20sessions\x20'+a55_0x169b33['dim'](_0x53b306(0x395))):console[_0x53b306(0x1f9)](_0x53b306(0x32d)+_0xeec98b['length']+_0x53b306(0x333)+(_0xeec98b[_0x53b306(0x2e7)]!==0x1?'s':''));if(_0x41ede4[_0x53b306(0x390)]===_0x53b306(0x29b)||_0x41ede4[_0x53b306(0x390)]===_0x53b306(0x241)||_0x41ede4['format']===_0x53b306(0x2d5))await handleSDKOutput(_0xeec98b,_0x41ede4);else{if(!process['stdout'][_0x53b306(0x21d)]||_0x41ede4[_0x53b306(0x38d)]){if(_0xeec98b[_0x53b306(0x2e7)]===0x0){if(_0x13c70e&&_0x1216ba)console[_0x53b306(0x37f)](_0x53b306(0x2a5)+_0x13c70e+'.'+_0x1216ba);else _0x13c70e?console[_0x53b306(0x37f)](_0x53b306(0x295)+_0x13c70e):console['log']('No\x20sessions\x20found');}else{const _0x4cde13=_0x41ede4[_0x53b306(0x31c)],_0x2dba4f=this[_0x53b306(0x2a0)](_0xeec98b,_0x4cde13);_0x41ede4[_0x53b306(0x38d)]?await writeOutput(_0x2dba4f,_0x41ede4[_0x53b306(0x38d)],_0x53b306(0x359)):console[_0x53b306(0x37f)](_0x2dba4f);}!_0x13c70e&&(console['error'](''),console[_0x53b306(0x1f9)](a55_0x169b33[_0x53b306(0x2df)](_0x53b306(0x289))),console[_0x53b306(0x1f9)](a55_0x169b33[_0x53b306(0x2df)](_0x53b306(0x1f1))+'or'+a55_0x169b33[_0x53b306(0x2df)](_0x53b306(0x22e))));}else{if(_0xeec98b[_0x53b306(0x2e7)]===0x0){if(_0x13c70e&&_0x1216ba)console[_0x53b306(0x37f)](_0x53b306(0x2a5)+_0x13c70e+'.'+_0x1216ba);else _0x13c70e?console[_0x53b306(0x37f)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x13c70e):console['log'](_0x53b306(0x228));}else await this[_0x53b306(0x30a)](_0xeec98b,_0x79a39,_0x13c70e);}}return 0x0;}[a55_0x51cda1(0x2a0)](_0x53aa87,_0x4e40b8){const _0x50ace5=a55_0x51cda1,_0x5cd9f2=[],_0x40fb3b=new Map();let _0x95c213=Infinity,_0x3817bd=-Infinity;for(const _0x12da81 of _0x53aa87){if(_0x12da81[_0x50ace5(0x32c)]?.[_0x50ace5(0x1f5)]){const _0x53a1c7=new Date(_0x12da81[_0x50ace5(0x32c)]['createdAt'])[_0x50ace5(0x336)](),_0x173d57=_0x12da81['lastAttempt'][_0x50ace5(0x20b)]?new Date(_0x12da81['lastAttempt'][_0x50ace5(0x20b)])['getTime']():Date['now'](),_0x3e824e=_0x12da81[_0x50ace5(0x35e)]?.[_0x50ace5(0x2d2)]||'(unknown)';!_0x40fb3b[_0x50ace5(0x2a7)](_0x3e824e)&&_0x40fb3b['set'](_0x3e824e,[]),_0x40fb3b[_0x50ace5(0x328)](_0x3e824e)['push']({'session':_0x12da81,'startTime':_0x53a1c7,'endTime':_0x173d57,'duration':_0x173d57-_0x53a1c7}),_0x95c213=Math[_0x50ace5(0x2d8)](_0x95c213,_0x53a1c7),_0x3817bd=Math[_0x50ace5(0x20e)](_0x3817bd,_0x173d57);}}if(_0x40fb3b['size']===0x0)return _0x50ace5(0x37a);const _0x7f7ccd=process[_0x50ace5(0x389)][_0x50ace5(0x384)]||0x78,_0x49c778=0x1e,_0x5b4423=0x32,_0x380b35=0x4,_0x55d647=Math[_0x50ace5(0x2d8)](_0x5b4423,Math[_0x50ace5(0x20e)](_0x49c778,Math[_0x50ace5(0x2e8)](_0x7f7ccd*0.3))),_0x302edd=_0x7f7ccd-_0x55d647-TIMELINE_CONFIG[_0x50ace5(0x337)]-0x3-_0x380b35,_0x11ae6f=_0x3817bd-_0x95c213,_0x504c8e=_0x11ae6f/_0x55d647,_0x349b4e=renderTimeAxis({'startTime':_0x95c213,'endTime':_0x3817bd,'durationMs':_0x11ae6f,'msPerChar':_0x504c8e},_0x55d647),_0x5ea782=[];for(const _0xcb0732 of _0x40fb3b[_0x50ace5(0x34a)]()){_0x5ea782[_0x50ace5(0x1f4)](..._0xcb0732);}_0x5ea782[_0x50ace5(0x324)]((_0x2d6163,_0x4fb96d)=>_0x4fb96d[_0x50ace5(0x30d)]-_0x2d6163['startTime']);const _0x4e778c=new Date(_0x95c213),_0x53a08f=formatDate(_0x4e778c),_0x8b9111=_0x380b35+TIMELINE_CONFIG[_0x50ace5(0x2fb)]+TIMELINE_CONFIG[_0x50ace5(0x2a2)]+_0x302edd,_0x5c7855='\x20'[_0x50ace5(0x2dd)](_0x8b9111-_0x53a08f[_0x50ace5(0x2e7)]),_0x5f451a=_0x5c7855+a55_0x169b33[_0x50ace5(0x2df)](_0x53a08f)+'\x20'+_0x349b4e;_0x5cd9f2[_0x50ace5(0x1f4)](_0x5f451a);const _0x344bca=0x16;let _0x1aec65=0x0;for(const _0x184a2e of _0x5ea782){const _0x2b0104=_0x184a2e[_0x50ace5(0x29e)][_0x50ace5(0x35e)]?.['name']||'?',_0x2f8af5=Math[_0x50ace5(0x2d8)](stringWidth(_0x2b0104),_0x344bca);_0x1aec65=Math[_0x50ace5(0x20e)](_0x1aec65,_0x2f8af5);}for(const _0x43b3b7 of _0x5ea782){const {session:_0x2adfc9,startTime:_0x102277,endTime:_0x490f2d,duration:_0xb66a27}=_0x43b3b7,_0x23b88a=_0x2adfc9[_0x50ace5(0x35e)]?.['id'],_0x3e6800=_0x2adfc9['id'],_0x1054bb=_0x2adfc9[_0x50ace5(0x35e)]?.['name']||'?',_0x19d75c=_0x2adfc9[_0x50ace5(0x284)]?.[_0x50ace5(0x2d2)]||'?';let _0xb627cc,_0x44ae46;if(_0x2adfc9[_0x50ace5(0x32c)]){const _0x49a06c=_0x2adfc9[_0x50ace5(0x32c)];!_0x49a06c['done']?(_0xb627cc=_0x49a06c[_0x50ace5(0x24b)]?'🛑':'🔄',_0x44ae46=_0x49a06c[_0x50ace5(0x24b)]?a55_0x169b33[_0x50ace5(0x22d)]:a55_0x169b33[_0x50ace5(0x214)]):(_0xb627cc=_0x49a06c['success']?'✅':'❌',_0x44ae46=_0x49a06c[_0x50ace5(0x271)]?a55_0x169b33[_0x50ace5(0x2cd)]:a55_0x169b33[_0x50ace5(0x352)]);}else _0xb627cc='⏳',_0x44ae46=a55_0x169b33[_0x50ace5(0x2df)];const _0x536559='#'+_0x3e6800,_0x1d450c=_0x23b88a?hyperlink(_0x536559,getWorkflowSessionUrl(_0x4e40b8,_0x23b88a,_0x3e6800)):_0x536559;let _0x201d4f=_0x1054bb;stringWidth(_0x1054bb)>_0x344bca&&(_0x201d4f=_0x1054bb[_0x50ace5(0x392)](0x0,_0x344bca-0x1)+'…');const _0x4ff0c0=a55_0x169b33[_0x50ace5(0x2df)](_0x201d4f),_0x53ee7e=stringWidth(_0x201d4f),_0x520679='\x20'[_0x50ace5(0x2dd)](_0x1aec65-stringWidth(_0x201d4f)+0x2),_0x471efe='('+formatElapsed(_0xb66a27)+')',_0x2273e8=stringWidth(_0x471efe),_0x4a888d=stringWidth(_0x536559),_0x225d9f=_0x4a888d+0x1+_0x53ee7e+_0x520679['length'],_0x3ba7a2=_0x302edd-_0x225d9f-_0x2273e8-0x1-0x8;let _0x581a97=_0x19d75c;stringWidth(_0x581a97)>_0x3ba7a2&&(_0x581a97=_0x581a97['slice'](0x0,_0x3ba7a2-0x1)+'…');const _0x2bc2cd=_0x1d450c+'\x20'+_0x4ff0c0+_0x520679+_0x581a97,_0x3d2d08=stringWidth(_0x2bc2cd),_0x2dc024=_0x302edd-_0x3d2d08-_0x2273e8,_0x6a89b0=_0x2bc2cd+'\x20'[_0x50ace5(0x2dd)](Math[_0x50ace5(0x20e)](0x1,_0x2dc024))+a55_0x169b33[_0x50ace5(0x2df)](_0x471efe),_0x130baf=Math['floor']((_0x102277-_0x95c213)/_0x504c8e),_0x387ef9=Math[_0x50ace5(0x2e8)]((_0x490f2d-_0x95c213)/_0x504c8e),_0x19b7fb=Math['max'](_0x130baf+0x1,_0x387ef9),_0x76841b=new Array(_0x55d647)[_0x50ace5(0x327)]('\x20');for(let _0x1f4384=_0x130baf;_0x1f4384<Math[_0x50ace5(0x2d8)](_0x19b7fb,_0x55d647);_0x1f4384++){_0x76841b[_0x1f4384]='─';}const _0x46a40f=_0x76841b[_0x50ace5(0x2cc)](_0x148b2b=>_0x148b2b==='\x20'?'\x20':_0x44ae46(_0x148b2b))[_0x50ace5(0x342)]('');_0x5cd9f2[_0x50ace5(0x1f4)](_0xb627cc+'\x20'+_0x6a89b0+'│'+_0x46a40f+'│');}return _0x5cd9f2[_0x50ace5(0x342)]('\x0a');}async['navigateSessionsInteractive'](_0x21ed0f,_0x2bcab2,_0x1a1094){const _0x3a873e=a55_0x51cda1,{options:_0x210ddd,tdx:_0x380a58}=_0x2bcab2,_0x3d40a4=_0x210ddd[_0x3a873e(0x31c)],{timelineRows:_0x568bc6,timeAxisHeader:_0x167a2e}=this[_0x3a873e(0x21b)](_0x21ed0f,_0x3d40a4),_0x8634f3=_0x568bc6[_0x3a873e(0x2f2)](_0x5abc02=>_0x5abc02['attemptId']);if(_0x8634f3[_0x3a873e(0x2e7)]===0x0){const _0x36d00f=this[_0x3a873e(0x2a0)](_0x21ed0f,_0x3d40a4);console[_0x3a873e(0x37f)](_0x36d00f);!_0x1a1094&&(console[_0x3a873e(0x1f9)](''),console['error'](a55_0x169b33[_0x3a873e(0x2df)](_0x3a873e(0x289))),console[_0x3a873e(0x1f9)](a55_0x169b33[_0x3a873e(0x2df)](_0x3a873e(0x1f1))+'or'+a55_0x169b33[_0x3a873e(0x2df)](_0x3a873e(0x22e))));return;}_0x167a2e&&console['log'](_0x167a2e);const _0x2800a4=_0x568bc6[_0x3a873e(0x2f2)](_0x43b4c5=>_0x43b4c5[_0x3a873e(0x274)])[_0x3a873e(0x2cc)](_0x1a3cc0=>({'title':_0x1a3cc0[_0x3a873e(0x265)],'value':_0x1a3cc0['attemptId']})),_0x2d20fd=process[_0x3a873e(0x389)][_0x3a873e(0x2f3)]||0x3c,_0x276586=Math[_0x3a873e(0x20e)](0x28,Math[_0x3a873e(0x2e8)](_0x2d20fd*0x2/0x3)),_0x503b47=await a55_0x4fbd47({'type':_0x3a873e(0x335),'name':'attemptId','message':_0x3a873e(0x2f4),'choices':_0x2800a4,'initial':-0x1,'limit':_0x276586,'clearFirst':!![],'fallback':{'title':_0x3a873e(0x346),'value':null},'suggest':(_0x28bba3,_0x393726)=>{const _0x1c5d67=_0x3a873e;if(!_0x28bba3)return Promise['resolve'](_0x393726);const _0x57b3b1=_0x393726[_0x1c5d67(0x2f2)](_0xa1fb05=>{const _0xc880d6=_0x1c5d67,_0x27d02a=_0xa1fb05;return _0x27d02a[_0xc880d6(0x320)][_0xc880d6(0x30e)]()[_0xc880d6(0x386)](_0x28bba3[_0xc880d6(0x30e)]());});return Promise[_0x1c5d67(0x220)](_0x57b3b1);}}),_0x42c1b6=()=>{const _0x164080=_0x3a873e;process[_0x164080(0x389)][_0x164080(0x306)](_0x164080(0x2db)),process[_0x164080(0x389)][_0x164080(0x306)](_0x164080(0x2db)),process[_0x164080(0x389)][_0x164080(0x306)](_0x164080(0x2db));},_0x214c32=_0x503b47&&_0x503b47['attemptId']&&_0x503b47[_0x3a873e(0x274)]!==null&&_0x503b47['attemptId'][_0x3a873e(0x350)]()!=='';if(!_0x214c32){_0x42c1b6(),console[_0x3a873e(0x37f)](a55_0x169b33[_0x3a873e(0x2df)](_0x3a873e(0x33d)));return;}_0x42c1b6();const _0x439c9a=_0x21ed0f[_0x3a873e(0x372)](_0x4e83ec=>_0x4e83ec[_0x3a873e(0x32c)]?.['id']===_0x503b47[_0x3a873e(0x274)]);if(_0x439c9a){const _0x41ab25=_0x439c9a['project']?.[_0x3a873e(0x2d2)]||'?',_0x55d51c=_0x439c9a[_0x3a873e(0x284)]?.['name']||'?';console[_0x3a873e(0x37f)](_0x3a873e(0x23b)+a55_0x169b33[_0x3a873e(0x2df)](_0x41ab25)+_0x3a873e(0x34b)+a55_0x169b33[_0x3a873e(0x2df)](_0x55d51c));}const _0x511b8b=new WorkflowTimelineCommand();await _0x511b8b[_0x3a873e(0x339)]({'args':[],'options':{..._0x210ddd,'attemptId':_0x503b47['attemptId']},'tdx':_0x380a58});}[a55_0x51cda1(0x21b)](_0x1c5c9b,_0xe2f3e7){const _0x49a09e=a55_0x51cda1,_0x2c408b=new Map();for(const _0x32ec10 of _0x1c5c9b){_0x32ec10['id']&&_0x32ec10[_0x49a09e(0x32c)]?.['id']&&_0x2c408b[_0x49a09e(0x2e3)](_0x32ec10['id'],_0x32ec10['lastAttempt']['id']);}const _0x540e97=[];let _0x120e81='';const _0x448977=this[_0x49a09e(0x2a0)](_0x1c5c9b,_0xe2f3e7),_0x1828cc=_0x448977['split']('\x0a');for(const _0x4b1e19 of _0x1828cc){if(_0x4b1e19[_0x49a09e(0x282)](_0x49a09e(0x223))||_0x4b1e19[_0x49a09e(0x2b0)](/^\s+\d{4}-\d{2}-\d{2}/))_0x120e81=_0x4b1e19;else{if(_0x4b1e19[_0x49a09e(0x2b0)](/^[✅❌🔄🛑⏳]/)){const _0x23789d=_0x4b1e19[_0x49a09e(0x2b0)](/#(\d+)/),_0x299d3c=_0x23789d?_0x23789d[0x1]:null,_0x4f05cc=_0x299d3c?_0x2c408b['get'](_0x299d3c)||null:null,_0x58d163=_0x1c5c9b['find'](_0x13b6f4=>_0x13b6f4['id']===_0x299d3c),_0x35134c=_0x58d163?.[_0x49a09e(0x35e)]?.[_0x49a09e(0x2d2)]||'';_0x540e97[_0x49a09e(0x1f4)]({'displayLine':_0x4b1e19,'attemptId':_0x4f05cc,'projectName':_0x35134c});}}}return{'timelineRows':_0x540e97,'timeAxisHeader':_0x120e81};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a55_0x51cda1(0x244);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x3a2);async[a55_0x51cda1(0x339)](_0x41acd9){const _0x3f3fcf=a55_0x51cda1,{options:_0x3f136a,args:_0x20169c,tdx:_0x3c6af9}=_0x41acd9,_0x13928=this[_0x3f3fcf(0x2d9)](_0x20169c,_0x3f136a);if(!_0x13928)return 0x1;const {projectName:_0xd0c83b,workflowName:_0x2a999b}=_0x13928,_0x2e6c9a=_0x3f136a[_0x3f3fcf(0x311)];if(_0x3f136a['verbose']){if(_0xd0c83b&&_0x2a999b)console['error'](_0x3f3fcf(0x308)+_0xd0c83b+'.'+_0x2a999b);else _0xd0c83b&&console[_0x3f3fcf(0x1f9)](_0x3f3fcf(0x23c)+_0xd0c83b);_0x2e6c9a&&console[_0x3f3fcf(0x1f9)](_0x3f3fcf(0x242));}const _0x5294a5=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x3c6af9[_0x3f3fcf(0x284)]['attempts']({'projectName':_0xd0c83b,'workflowName':_0x2a999b,'includeRetried':_0x2e6c9a,'limit':_0x3f136a[_0x3f3fcf(0x24f)]}),{'verbose':_0x3f136a[_0x3f3fcf(0x248)]}),_0x4fcf09=_0x5294a5['data'],_0x64287c=_0x3f136a[_0x3f3fcf(0x24f)]||0x64,_0x4a7eca=_0x4fcf09['length']>=_0x64287c?a55_0x169b33[_0x3f3fcf(0x2df)](_0x3f3fcf(0x319)):'';console[_0x3f3fcf(0x1f9)](_0x3f3fcf(0x32d)+_0x4fcf09[_0x3f3fcf(0x2e7)]+_0x3f3fcf(0x22b)+(_0x4fcf09[_0x3f3fcf(0x2e7)]!==0x1?'s':'')+_0x4a7eca);if(_0x3f136a[_0x3f3fcf(0x390)]===_0x3f3fcf(0x29b)||_0x3f136a[_0x3f3fcf(0x390)]===_0x3f3fcf(0x241)||_0x3f136a[_0x3f3fcf(0x390)]===_0x3f3fcf(0x2d5))await handleSDKOutput(_0x4fcf09,_0x3f136a);else{if(_0x4fcf09[_0x3f3fcf(0x2e7)]===0x0){if(_0xd0c83b&&_0x2a999b)console[_0x3f3fcf(0x37f)](_0x3f3fcf(0x39d)+_0xd0c83b+'.'+_0x2a999b);else _0xd0c83b?console[_0x3f3fcf(0x37f)](_0x3f3fcf(0x326)+_0xd0c83b):console['log'](_0x3f3fcf(0x30c));}else{const _0x1904b3=_0x3f136a[_0x3f3fcf(0x31c)],_0x399a8d=_0x4fcf09['map'](_0x113631=>{const _0x40cb2f=_0x3f3fcf,_0x2af5db=a55_0x169b33['dim']('#'+_0x113631['id']),_0x36a125=_0x113631[_0x40cb2f(0x35e)]?.['id'],_0x5aa3aa=_0x113631['session_id']||_0x113631[_0x40cb2f(0x29f)],_0x146eaf=_0x36a125&&_0x5aa3aa?hyperlink(_0x2af5db,getWorkflowAttemptUrl(_0x1904b3,_0x36a125,_0x5aa3aa,_0x113631['id'])):_0x2af5db,{icon:_0x279c9c,text:_0x2dfbc6}=getAttemptStatusDisplay(_0x113631),_0x320706=(_0x113631[_0x40cb2f(0x35e)]?.[_0x40cb2f(0x2d2)]||'?')+'.'+(_0x113631[_0x40cb2f(0x284)]?.['name']||'?'),_0x9d09df=_0x113631[_0x40cb2f(0x226)]?a55_0x169b33['dim'](_0x113631[_0x40cb2f(0x226)]):'';return(_0x146eaf+'\x20'+_0x279c9c+(_0x2dfbc6?'\x20'+_0x2dfbc6:'')+'\x20'+_0x320706+'\x20'+_0x9d09df)['trimEnd']();});await writeOutput(_0x399a8d[_0x3f3fcf(0x342)]('\x0a'),_0x3f136a['output'],_0x3f3fcf(0x359));}}return 0x0;}}function a55_0x1db5(_0x350b5d,_0x53930f){_0x350b5d=_0x350b5d-0x1ef;const _0x352bcb=a55_0x352b();let _0x1db508=_0x352bcb[_0x350b5d];return _0x1db508;}export class WorkflowAttemptCommand extends BaseCommand{[a55_0x51cda1(0x2d2)]='workflow:attempt';[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x34d);async[a55_0x51cda1(0x339)](_0x513675){const _0x52bc7f=a55_0x51cda1,{options:_0x41c093,args:_0x35e863,tdx:_0x4c1ef1}=_0x513675,_0x1107e2=_0x35e863[0x0];if(!_0x1107e2)return console['error'](_0x52bc7f(0x280)),0x1;_0x41c093[_0x52bc7f(0x248)]&&console['error'](_0x52bc7f(0x28b)+_0x1107e2);const _0x42f353=await withSpinner('Getting\x20attempt\x20details...',()=>_0x4c1ef1['workflow'][_0x52bc7f(0x2ee)](_0x1107e2),{'verbose':_0x41c093[_0x52bc7f(0x248)]}),_0x3ff346=_0x42f353['data'];let _0x3f1c5b;!_0x3ff346['done']?_0x3f1c5b=_0x3ff346['cancelRequested']?_0x52bc7f(0x365):'running':_0x3f1c5b=_0x3ff346[_0x52bc7f(0x271)]?'success':_0x52bc7f(0x1f9);let _0x78f2a5;if(_0x3ff346[_0x52bc7f(0x1f5)]&&_0x3ff346[_0x52bc7f(0x20b)]){const _0x108f0f=new Date(_0x3ff346['createdAt'])[_0x52bc7f(0x336)](),_0x4a33c4=new Date(_0x3ff346['finishedAt'])[_0x52bc7f(0x336)]();_0x78f2a5=Math[_0x52bc7f(0x2b7)]((_0x4a33c4-_0x108f0f)/0x3e8);}const _0x476119={'attempt_id':_0x3ff346['id'],'status':_0x3f1c5b,..._0x3ff346[_0x52bc7f(0x25b)]!==undefined&&{'index':_0x3ff346[_0x52bc7f(0x25b)]},..._0x3ff346[_0x52bc7f(0x35e)]&&{'project':_0x3ff346[_0x52bc7f(0x35e)][_0x52bc7f(0x2d2)]},..._0x3ff346['workflow']&&{'workflow':_0x3ff346[_0x52bc7f(0x284)][_0x52bc7f(0x2d2)]},..._0x3ff346[_0x52bc7f(0x29f)]&&{'session_id':_0x3ff346[_0x52bc7f(0x29f)]},..._0x3ff346['sessionTime']&&{'session_time':_0x3ff346[_0x52bc7f(0x226)]},..._0x3ff346[_0x52bc7f(0x252)]&&{'retry_attempt':_0x3ff346[_0x52bc7f(0x252)]},..._0x78f2a5!==undefined&&{'duration_sec':_0x78f2a5},..._0x3ff346[_0x52bc7f(0x1f5)]&&{'created_at':_0x3ff346[_0x52bc7f(0x1f5)]},..._0x3ff346['finishedAt']&&{'finished_at':_0x3ff346[_0x52bc7f(0x20b)]},...Object[_0x52bc7f(0x31e)](_0x3ff346[_0x52bc7f(0x2f0)])[_0x52bc7f(0x2e7)]>0x0&&{'params':_0x3ff346[_0x52bc7f(0x2f0)]}};return await handleSingleObjectOutput(_0x476119,_0x41c093),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x2d6);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x26c);async[a55_0x51cda1(0x339)](_0x135998){const _0x391009=a55_0x51cda1,{options:_0x598ce8,args:_0x4730d8,tdx:_0x278da5}=_0x135998,_0x5d9e60=_0x4730d8[0x0];if(!_0x5d9e60)return console[_0x391009(0x1f9)](_0x391009(0x280)),0x1;const _0x8da947=_0x598ce8[_0x391009(0x302)];_0x598ce8[_0x391009(0x248)]&&(console[_0x391009(0x1f9)](_0x391009(0x28b)+_0x5d9e60),_0x8da947&&console['error'](_0x391009(0x29c)));const _0x26f4af=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x278da5[_0x391009(0x284)][_0x391009(0x292)](_0x5d9e60,_0x8da947||![]),{'verbose':_0x598ce8['verbose']}),_0x2bbeea=_0x26f4af['data'];return console['error'](_0x391009(0x32d)+_0x2bbeea[_0x391009(0x2e7)]+_0x391009(0x256)+(_0x2bbeea[_0x391009(0x2e7)]!==0x1?'s':'')),await handleSDKOutput(_0x2bbeea,_0x598ce8),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x21a);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x353);async[a55_0x51cda1(0x339)](_0x278b1d){const _0x2f1653=a55_0x51cda1,{options:_0x2fd716,args:_0x1968c0,tdx:_0x1d3029}=_0x278b1d,_0xbc53a3=_0x1968c0[0x0];let _0x5aed97=_0x1968c0[0x1];if(!_0xbc53a3)return console[_0x2f1653(0x1f9)](_0x2f1653(0x280)),0x1;_0x2fd716[_0x2f1653(0x248)]&&(console[_0x2f1653(0x1f9)](_0x2f1653(0x28b)+_0xbc53a3),_0x5aed97&&console[_0x2f1653(0x1f9)]('Task\x20name:\x20'+_0x5aed97));const _0x1e76f6=await withSpinner(_0x2f1653(0x20d),()=>_0x1d3029[_0x2f1653(0x284)]['logFiles'](_0xbc53a3,_0x5aed97),{'verbose':_0x2fd716[_0x2f1653(0x248)]}),_0x9e1d5=_0x1e76f6[_0x2f1653(0x33a)];if(_0x9e1d5[_0x2f1653(0x2e7)]===0x0)return console[_0x2f1653(0x1f9)](_0x2f1653(0x32f)),0x0;if(!_0x5aed97&&(_0x2fd716[_0x2f1653(0x29b)]||_0x2fd716['format']))return await handleSDKOutput(_0x9e1d5,_0x2fd716),0x0;if(!_0x5aed97){const _0x587a0e=_0x9e1d5[_0x2f1653(0x2cc)](_0x51dc35=>({'title':_0x51dc35[_0x2f1653(0x2ec)]+'\x20('+formatBytes(_0x51dc35[_0x2f1653(0x26e)])+')','value':_0x51dc35[_0x2f1653(0x2ec)]})),_0x476530=await a55_0x4fbd47({'type':_0x2f1653(0x22c),'name':_0x2f1653(0x1f6),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x587a0e});if(!_0x476530[_0x2f1653(0x1f6)])return console['error'](_0x2f1653(0x33d)),0x0;_0x5aed97=_0x476530['task'];}const _0x27a277=await withSpinner('Downloading\x20logs...',()=>_0x1d3029['workflow']['logs'](_0xbc53a3,_0x5aed97),{'verbose':_0x2fd716[_0x2f1653(0x248)]}),_0x4215e1=_0x27a277[_0x2f1653(0x33a)];return _0x4215e1?console[_0x2f1653(0x37f)](_0x4215e1):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x2b9);[a55_0x51cda1(0x2d1)]='Kill\x20a\x20running\x20attempt';async[a55_0x51cda1(0x339)](_0x5e1d34){const _0x37c626=a55_0x51cda1,{options:_0x1d5702,args:_0x3d3f30,tdx:_0xa208dc}=_0x5e1d34,_0x209b99=_0x3d3f30[0x0];if(!_0x209b99)return console[_0x37c626(0x1f9)](_0x37c626(0x280)),0x1;const _0x23d57a=_0x1d5702[_0x37c626(0x262)];_0x1d5702[_0x37c626(0x248)]&&(console[_0x37c626(0x1f9)](_0x37c626(0x28b)+_0x209b99),_0x23d57a&&console[_0x37c626(0x1f9)]('Reason:\x20'+_0x23d57a));if(!_0x1d5702[_0x37c626(0x254)]){if(!isInteractive())return console[_0x37c626(0x1f9)](a55_0x169b33[_0x37c626(0x352)](_0x37c626(0x303)),_0x37c626(0x316)),console[_0x37c626(0x1f9)](a55_0x169b33[_0x37c626(0x2df)](_0x37c626(0x38e))),0x1;const _0x26c5d1=await confirmKey(_0x37c626(0x27a)+_0x209b99+'?');if(!_0x26c5d1)return console[_0x37c626(0x1f9)](a55_0x169b33[_0x37c626(0x22d)](_0x37c626(0x33d))),0x1;}const _0x47d986=await withSpinner(_0x37c626(0x1fb),()=>_0xa208dc[_0x37c626(0x284)][_0x37c626(0x382)](_0x209b99,_0x23d57a),{'verbose':_0x1d5702[_0x37c626(0x248)]}),_0x16f3f0=_0x47d986['data'];return console[_0x37c626(0x1f9)]('✔\x20'+_0x16f3f0),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x1f8);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x201);async[a55_0x51cda1(0x339)](_0x396f92){const _0x5d79a3=a55_0x51cda1,{options:_0x54a865,args:_0x3f2c3e,tdx:_0x5dda0}=_0x396f92,_0x5d8c8f=_0x3f2c3e[0x0];if(!_0x5d8c8f)return console['error'](_0x5d79a3(0x358)),console[_0x5d79a3(0x1f9)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x5c31c6=![],_0x32bd24=_0x5d8c8f;if(_0x5d8c8f[_0x5d79a3(0x282)]('session:'))_0x5c31c6=!![],_0x32bd24=_0x5d8c8f[_0x5d79a3(0x2e6)](0x8);else{if(_0x5d8c8f[_0x5d79a3(0x282)](_0x5d79a3(0x375)))_0x5c31c6=![],_0x32bd24=_0x5d8c8f['substring'](0x8);else return console[_0x5d79a3(0x1f9)](_0x5d79a3(0x300)),console[_0x5d79a3(0x1f9)](_0x5d79a3(0x2ce)),0x1;}const _0x25c16c=_0x54a865[_0x5d79a3(0x209)],_0x5f2a34=_0x54a865[_0x5d79a3(0x39f)],_0x459afb=_0x54a865[_0x5d79a3(0x2f0)],_0x25f358=_0x54a865[_0x5d79a3(0x37d)];_0x54a865['verbose']&&(console[_0x5d79a3(0x1f9)](_0x5d79a3(0x31b)+(_0x5c31c6?_0x5d79a3(0x29e):_0x5d79a3(0x2ee))+'\x20'+_0x32bd24),_0x25c16c&&console[_0x5d79a3(0x1f9)](_0x5d79a3(0x304)+_0x25c16c),_0x5f2a34&&console[_0x5d79a3(0x1f9)](_0x5d79a3(0x323)+_0x5f2a34),_0x459afb&&console[_0x5d79a3(0x1f9)]('Params:\x20'+_0x459afb),_0x25f358&&console[_0x5d79a3(0x1f9)]('Force:\x20yes'));let _0xa1d4bc;if(_0x459afb)try{if(_0x459afb[_0x5d79a3(0x282)]('@')){const _0x402273=await import(_0x5d79a3(0x251)),_0x1a82dd=_0x459afb['substring'](0x1),_0x237b7a=await _0x402273['readFile'](_0x1a82dd,_0x5d79a3(0x31a));_0xa1d4bc=JSON['parse'](_0x237b7a);}else _0xa1d4bc=JSON['parse'](_0x459afb);}catch{return console[_0x5d79a3(0x1f9)](_0x5d79a3(0x2e2)),0x1;}if(!_0x54a865[_0x5d79a3(0x254)]){if(!isInteractive())return console[_0x5d79a3(0x1f9)](a55_0x169b33['red'](_0x5d79a3(0x303)),_0x5d79a3(0x316)),console[_0x5d79a3(0x1f9)](a55_0x169b33[_0x5d79a3(0x2df)](_0x5d79a3(0x38e))),0x1;const _0x179b24=await confirmKey(_0x5d79a3(0x230)+(_0x5c31c6?_0x5d79a3(0x29e):_0x5d79a3(0x2ee))+'\x20'+_0x32bd24+'?');if(!_0x179b24)return console[_0x5d79a3(0x1f9)](a55_0x169b33[_0x5d79a3(0x22d)](_0x5d79a3(0x33d))),0x1;}let _0x34b09c;_0x5c31c6?_0x34b09c=await withSpinner(_0x5d79a3(0x2c7),()=>_0x5dda0[_0x5d79a3(0x284)][_0x5d79a3(0x341)](_0x32bd24,{'fromTask':_0x25c16c,'retryParams':_0xa1d4bc}),{'verbose':_0x54a865[_0x5d79a3(0x248)]}):_0x34b09c=await withSpinner(_0x5d79a3(0x354),()=>_0x5dda0['workflow'][_0x5d79a3(0x2ae)](_0x32bd24,{'resumeFrom':_0x5f2a34,'retryParams':_0xa1d4bc,'force':_0x25f358}),{'verbose':_0x54a865[_0x5d79a3(0x248)]});const _0x2b317d=_0x34b09c[_0x5d79a3(0x33a)];return console[_0x5d79a3(0x1f9)](_0x5d79a3(0x2ca)),console[_0x5d79a3(0x1f9)](_0x5d79a3(0x34c)+_0x2b317d[_0x5d79a3(0x274)]),console[_0x5d79a3(0x1f9)](_0x5d79a3(0x36e)+_0x2b317d[_0x5d79a3(0x29f)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]='workflow:run';[a55_0x51cda1(0x2d1)]='Start\x20a\x20workflow\x20run';async[a55_0x51cda1(0x339)](_0x5664b0){const _0x27e714=a55_0x51cda1,{options:_0x10023d,args:_0x4a6f32,tdx:_0x1ad6fd}=_0x5664b0;let _0x4df97d=_0x4a6f32[0x0];if(!_0x4df97d){const _0x4622e3=this[_0x27e714(0x25c)]([],_0x10023d),_0x5ab479=await withSpinner(_0x27e714(0x21c),()=>_0x1ad6fd[_0x27e714(0x284)][_0x27e714(0x2e4)](_0x4622e3,{'limit':_0x10023d[_0x27e714(0x24f)]}),{'verbose':_0x10023d['verbose']}),_0xea46e1=_0x5ab479[_0x27e714(0x33a)];if(_0xea46e1[_0x27e714(0x2e7)]===0x0)return console[_0x27e714(0x1f9)](_0x27e714(0x2fd)),!_0x4622e3&&console['error'](a55_0x169b33[_0x27e714(0x2df)](_0x27e714(0x290))),0x1;const _0x5f946a=_0xea46e1['map'](_0x70ec26=>({'title':_0x70ec26[_0x27e714(0x35e)]?.['name']+'.'+_0x70ec26[_0x27e714(0x2d2)],'value':_0x70ec26[_0x27e714(0x35e)]?.[_0x27e714(0x2d2)]+'.'+_0x70ec26['name'],'description':_0x70ec26['revision']?_0x27e714(0x24d)+_0x70ec26[_0x27e714(0x20c)]:undefined})),_0x418a06=await a55_0x4fbd47({'type':'select','name':_0x27e714(0x284),'message':_0x27e714(0x20f),'choices':_0x5f946a});if(!_0x418a06[_0x27e714(0x284)])return 0x1;_0x4df97d=_0x418a06['workflow'];}if(!_0x4df97d[_0x27e714(0x386)]('.')){const _0x562711=this[_0x27e714(0x25c)]([],_0x10023d);if(_0x562711)_0x4df97d=_0x562711+'.'+_0x4df97d;else return console['error'](a55_0x169b33[_0x27e714(0x352)](_0x27e714(0x249)),_0x27e714(0x2a6)),console[_0x27e714(0x1f9)](a55_0x169b33[_0x27e714(0x2df)](_0x27e714(0x290))),0x1;}const _0x5b5181=_0x10023d['param'],_0x594375=_0x10023d[_0x27e714(0x226)],_0x52f066={};if(_0x5b5181&&Array['isArray'](_0x5b5181))for(const _0xff2172 of _0x5b5181){const _0x7ff132=_0xff2172[_0x27e714(0x203)]('=');if(_0x7ff132===-0x1)return console['error'](_0x27e714(0x340)+_0xff2172),console['error']('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x4e62d4=_0xff2172[_0x27e714(0x2e6)](0x0,_0x7ff132),_0x3cb026=_0xff2172[_0x27e714(0x2e6)](_0x7ff132+0x1);try{_0x52f066[_0x4e62d4]=JSON['parse'](_0x3cb026);}catch{_0x52f066[_0x4e62d4]=_0x3cb026;}}_0x10023d[_0x27e714(0x248)]&&(console[_0x27e714(0x1f9)](_0x27e714(0x253)+_0x4df97d),Object[_0x27e714(0x31e)](_0x52f066)[_0x27e714(0x2e7)]>0x0&&console['error'](_0x27e714(0x278)+JSON['stringify'](_0x52f066)),_0x594375&&console[_0x27e714(0x1f9)](_0x27e714(0x2a9)+_0x594375));const _0x4e0f45=await withSpinner(_0x27e714(0x291),()=>_0x1ad6fd['workflow'][_0x27e714(0x224)](_0x4df97d,_0x52f066,{'sessionTime':_0x594375}),{'verbose':_0x10023d[_0x27e714(0x248)]}),_0x25ae8c=_0x4e0f45[_0x27e714(0x33a)];console[_0x27e714(0x1f9)](_0x27e714(0x25d)),console[_0x27e714(0x1f9)](_0x27e714(0x1fc)+_0x25ae8c['id']),console[_0x27e714(0x1f9)](_0x27e714(0x36e)+_0x25ae8c[_0x27e714(0x29f)]),console[_0x27e714(0x1f9)](_0x27e714(0x36a)+_0x25ae8c['project']?.['name']),console[_0x27e714(0x1f9)](_0x27e714(0x329)+_0x25ae8c[_0x27e714(0x284)]?.[_0x27e714(0x2d2)]);if(_0x25ae8c[_0x27e714(0x35e)]?.['id']&&_0x25ae8c[_0x27e714(0x29f)]&&_0x25ae8c['id']){const _0x30e545=_0x10023d['site'],_0x594e64=getConsoleUrl(_0x30e545,'/app/workflows/'+_0x25ae8c['project']['id']+'/sessions/'+_0x25ae8c[_0x27e714(0x29f)]+_0x27e714(0x305)+_0x25ae8c['id']);console[_0x27e714(0x1f9)](_0x27e714(0x279)+a55_0x169b33[_0x27e714(0x219)](_0x594e64));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a55_0x51cda1(0x281);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x334);async[a55_0x51cda1(0x339)](_0x21fe71){const _0x5675c2=a55_0x51cda1,{options:_0x9130ff,args:_0x36f111,tdx:_0x24fd87}=_0x21fe71,_0xf5bbac=_0x36f111[0x0],_0x11551b=_0x36f111[0x1]||'.';if(!_0xf5bbac)return console['error'](_0x5675c2(0x33b)),console[_0x5675c2(0x1f9)](_0x5675c2(0x396)),0x1;const _0x578b65=_0x9130ff['revision'];_0x9130ff[_0x5675c2(0x248)]&&(console[_0x5675c2(0x1f9)]('Project:\x20'+_0xf5bbac),console[_0x5675c2(0x1f9)]('Output\x20directory:\x20'+_0x11551b),_0x578b65&&console[_0x5675c2(0x1f9)](_0x5675c2(0x344)+_0x578b65));const _0x298717=await withSpinner(_0x5675c2(0x347)+_0xf5bbac+_0x5675c2(0x35d),()=>_0x24fd87['workflow']['download'](_0xf5bbac,_0x11551b,{'revision':_0x578b65}),{'verbose':_0x9130ff[_0x5675c2(0x248)]}),_0x49789a=_0x298717[_0x5675c2(0x33a)];return console[_0x5675c2(0x1f9)](_0x5675c2(0x377)+_0x49789a['projectName']),console[_0x5675c2(0x1f9)]('\x20\x20Revision:\x20'+_0x49789a['revision']),console[_0x5675c2(0x1f9)](_0x5675c2(0x2c5)+_0x49789a[_0x5675c2(0x20a)]),console[_0x5675c2(0x1f9)](_0x5675c2(0x24c)+_0x11551b+'/'+_0x49789a['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x325);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x380);async[a55_0x51cda1(0x339)](_0xab3c53){const _0x5c6d38=a55_0x51cda1,{options:_0x202a6b,args:_0x27da64,tdx:_0x3f89f4}=_0xab3c53;let _0x336833='.',_0x19a618=_0x202a6b['name'];if(_0x27da64[0x0]){const {promises:_0xb0b76}=await import('fs');try{const _0x48b0c0=await _0xb0b76[_0x5c6d38(0x1f3)](_0x27da64[0x0]);if(_0x48b0c0[_0x5c6d38(0x2bf)]())_0x336833=_0x27da64[0x0];else return console[_0x5c6d38(0x1f9)](_0x5c6d38(0x2aa)+_0x27da64[0x0]+_0x5c6d38(0x366)),0x1;}catch{_0x19a618=_0x27da64[0x0],_0x336833='.';}}const _0x303573=_0x202a6b[_0x5c6d38(0x20c)],_0x57901d=_0x202a6b[_0x5c6d38(0x393)];_0x202a6b[_0x5c6d38(0x248)]&&(console[_0x5c6d38(0x1f9)](_0x5c6d38(0x234)+_0x336833),_0x19a618&&console[_0x5c6d38(0x1f9)](_0x5c6d38(0x2cf)+_0x19a618),_0x303573&&console[_0x5c6d38(0x1f9)](_0x5c6d38(0x344)+_0x303573),_0x57901d&&console[_0x5c6d38(0x1f9)]('Validation:\x20skipped'));const _0x180e7d=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x3f89f4[_0x5c6d38(0x284)][_0x5c6d38(0x1f4)](_0x336833,{'projectName':_0x19a618,'revision':_0x303573,'skipValidation':_0x57901d}),{'verbose':_0x202a6b[_0x5c6d38(0x248)]}),_0x36817c=_0x180e7d[_0x5c6d38(0x33a)];return console['error'](_0x5c6d38(0x32e)+_0x36817c['projectName']),console[_0x5c6d38(0x1f9)]('\x20\x20Project\x20ID:\x20'+_0x36817c[_0x5c6d38(0x360)]),console[_0x5c6d38(0x1f9)](_0x5c6d38(0x28e)+_0x36817c[_0x5c6d38(0x20c)]),await this[_0x5c6d38(0x348)](_0x3f89f4,_0x36817c[_0x5c6d38(0x27c)],_0x202a6b[_0x5c6d38(0x31c)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x51cda1(0x2d2)]='workflow:pull';[a55_0x51cda1(0x2d1)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async['execute'](_0x3f3da3){const _0x586eab=a55_0x51cda1,{options:_0x16ad94,args:_0x557896,tdx:_0x115b49}=_0x3f3da3,_0x5b980a=_0x557896[0x0],_0x358067=_0x557896[0x1];if(!_0x5b980a)return console['error'](a55_0x169b33[_0x586eab(0x352)](_0x586eab(0x249)),_0x586eab(0x2f7)),console[_0x586eab(0x1f9)](a55_0x169b33['dim'](_0x586eab(0x24a))),0x1;const _0x3ffc27=_0x16ad94[_0x586eab(0x20c)];_0x16ad94[_0x586eab(0x248)]&&(console[_0x586eab(0x1f9)](_0x586eab(0x23b)+_0x5b980a),_0x358067&&console[_0x586eab(0x1f9)]('Target\x20directory:\x20'+_0x358067),_0x3ffc27&&console['error']('Revision:\x20'+_0x3ffc27),_0x16ad94['dryRun']&&console['error'](_0x586eab(0x2b5)));const _0x7efa7e=await withSpinner(_0x586eab(0x205)+_0x5b980a+_0x586eab(0x35d),()=>_0x115b49['workflow'][_0x586eab(0x2dc)](_0x5b980a,{'targetDir':_0x358067,'revision':_0x3ffc27}),{'verbose':_0x16ad94[_0x586eab(0x248)]}),_0x12e484=_0x7efa7e[_0x586eab(0x33a)];_0x12e484['isNewProject']?console['error'](_0x586eab(0x211)+_0x12e484[_0x586eab(0x27c)]):console[_0x586eab(0x1f9)](_0x586eab(0x2f1)+_0x12e484['projectName']);console[_0x586eab(0x1f9)]('\x20\x20Revision:\x20'+_0x12e484[_0x586eab(0x20c)]),console[_0x586eab(0x1f9)](_0x586eab(0x374)+(a55_0x2d2e63[_0x586eab(0x2e9)](process['cwd'](),_0x12e484[_0x586eab(0x2a3)])||'.')),console['error'](_0x586eab(0x369)+a55_0x169b33['green']('+'+_0x12e484['summary'][_0x586eab(0x26f)]+_0x586eab(0x236))+',\x20'+(a55_0x169b33['yellow']('~'+_0x12e484[_0x586eab(0x2eb)]['modified']+_0x586eab(0x391))+',\x20')+(a55_0x169b33[_0x586eab(0x352)]('-'+_0x12e484[_0x586eab(0x2eb)]['deleted']+_0x586eab(0x276))+',\x20')+(''+a55_0x169b33[_0x586eab(0x2df)](_0x12e484[_0x586eab(0x2eb)][_0x586eab(0x2bc)]+_0x586eab(0x261))));for(const _0x49c0fb of _0x12e484[_0x586eab(0x1fa)]){_0x49c0fb[_0x586eab(0x1fd)]==='modified'&&_0x49c0fb['diff']&&(console[_0x586eab(0x1f9)]('\x0a'+a55_0x169b33[_0x586eab(0x219)]('---\x20'+_0x49c0fb['path'])),console[_0x586eab(0x1f9)](_0x49c0fb[_0x586eab(0x28f)]));}if(!_0x12e484[_0x586eab(0x373)])return saveSessionContext({'workflow_project':_0x12e484[_0x586eab(0x27c)]},_0x16ad94[_0x586eab(0x29e)]),console['error'](a55_0x169b33['green'](_0x586eab(0x39a))),console[_0x586eab(0x1f9)](a55_0x169b33[_0x586eab(0x2df)](_0x586eab(0x35a)+_0x12e484[_0x586eab(0x27c)])),0x0;if(_0x16ad94[_0x586eab(0x2af)])return console[_0x586eab(0x1f9)](a55_0x169b33['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x16ad94['yes']){if(!isInteractive())return console[_0x586eab(0x1f9)](a55_0x169b33['red'](_0x586eab(0x303)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x586eab(0x1f9)](a55_0x169b33[_0x586eab(0x2df)](_0x586eab(0x38e))),0x1;const _0x474fac=await confirmKey(_0x586eab(0x1ff));if(!_0x474fac)return console[_0x586eab(0x1f9)](a55_0x169b33['yellow'](_0x586eab(0x33d)),_0x586eab(0x204)),0x1;}await withSpinner(_0x586eab(0x398),()=>_0x115b49[_0x586eab(0x284)][_0x586eab(0x351)](_0x12e484,{'revision':_0x3ffc27}),{'verbose':_0x16ad94['verbose']}),saveSessionContext({'workflow_project':_0x12e484[_0x586eab(0x27c)]},_0x16ad94[_0x586eab(0x29e)]),console['error'](a55_0x169b33['green'](_0x586eab(0x239)));const _0x155ef5=a55_0x2d2e63[_0x586eab(0x2e9)](process[_0x586eab(0x2d7)](),_0x12e484[_0x586eab(0x2a3)])||'.';return console[_0x586eab(0x1f9)](a55_0x169b33[_0x586eab(0x2df)](_0x586eab(0x24c)+_0x155ef5)),console[_0x586eab(0x1f9)](a55_0x169b33[_0x586eab(0x2df)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x12e484[_0x586eab(0x27c)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x310);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x2fe);async[a55_0x51cda1(0x339)](_0x46ed79){const _0x41a95f=a55_0x51cda1,{options:_0x1d9785,args:_0x460b85,tdx:_0x5997c2}=_0x46ed79,_0x19b693=this[_0x41a95f(0x383)](_0x460b85,_0x1d9785),_0x3d1fe6=_0x1d9785['revision'],_0x296e21=_0x1d9785[_0x41a95f(0x393)];_0x1d9785['verbose']&&(_0x19b693&&console[_0x41a95f(0x1f9)](_0x41a95f(0x2ad)+_0x19b693),_0x3d1fe6&&console[_0x41a95f(0x1f9)](_0x41a95f(0x344)+_0x3d1fe6),_0x1d9785['dryRun']&&console[_0x41a95f(0x1f9)](_0x41a95f(0x2b5)),_0x296e21&&console[_0x41a95f(0x1f9)](_0x41a95f(0x36b)));let _0x844102;try{_0x844102=await withSpinner(_0x41a95f(0x215),()=>_0x5997c2[_0x41a95f(0x284)]['preparePushProject']({'sourceDir':_0x19b693,'revision':_0x3d1fe6,'skipValidation':_0x296e21}),{'verbose':_0x1d9785[_0x41a95f(0x248)]});}catch(_0xecef05){if(_0xecef05 instanceof Error&&_0xecef05[_0x41a95f(0x2a1)]['includes'](_0x41a95f(0x207)))return console[_0x41a95f(0x1f9)](a55_0x169b33[_0x41a95f(0x352)](_0x41a95f(0x249)),_0x41a95f(0x23e)),_0x1d9785[_0x41a95f(0x272)]?console['error'](a55_0x169b33[_0x41a95f(0x2df)](_0x41a95f(0x288)+_0x1d9785['workflowProject']+_0x41a95f(0x2f8)+_0x1d9785[_0x41a95f(0x272)]+'\x27')):console[_0x41a95f(0x1f9)](a55_0x169b33[_0x41a95f(0x2df)](_0x41a95f(0x206))),0x1;throw _0xecef05;}const _0x54a11=_0x844102[_0x41a95f(0x33a)];console[_0x41a95f(0x1f9)](_0x41a95f(0x36f)+_0x54a11[_0x41a95f(0x27c)]),console[_0x41a95f(0x1f9)](_0x41a95f(0x235)+_0x54a11[_0x41a95f(0x2b3)]),console[_0x41a95f(0x1f9)](_0x41a95f(0x28e)+_0x54a11['revision']),console['error'](_0x41a95f(0x369)+a55_0x169b33[_0x41a95f(0x2cd)]('+'+_0x54a11['summary']['new']+'\x20new')+',\x20'+(a55_0x169b33['yellow']('~'+_0x54a11[_0x41a95f(0x2eb)][_0x41a95f(0x23d)]+_0x41a95f(0x391))+',\x20')+(a55_0x169b33[_0x41a95f(0x352)]('-'+_0x54a11[_0x41a95f(0x2eb)][_0x41a95f(0x3a1)]+_0x41a95f(0x276))+',\x20')+(''+a55_0x169b33[_0x41a95f(0x2df)](_0x54a11[_0x41a95f(0x2eb)][_0x41a95f(0x2bc)]+_0x41a95f(0x261))));for(const _0x344c0e of _0x54a11['changes']){_0x344c0e['type']===_0x41a95f(0x23d)&&_0x344c0e[_0x41a95f(0x28f)]&&(console[_0x41a95f(0x1f9)]('\x0a'+a55_0x169b33['cyan'](_0x41a95f(0x269)+_0x344c0e[_0x41a95f(0x227)])),console['error'](_0x344c0e['diff']));}if(!_0x54a11[_0x41a95f(0x373)])return console['error'](a55_0x169b33[_0x41a95f(0x2cd)](_0x41a95f(0x2d4))),await this[_0x41a95f(0x348)](_0x5997c2,_0x54a11[_0x41a95f(0x27c)],_0x1d9785[_0x41a95f(0x31c)]),0x0;if(_0x1d9785['dryRun'])return console[_0x41a95f(0x1f9)](a55_0x169b33[_0x41a95f(0x22d)](_0x41a95f(0x294))),0x0;if(!_0x1d9785['yes']){if(!isInteractive())return console['error'](a55_0x169b33[_0x41a95f(0x352)](_0x41a95f(0x303)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x41a95f(0x1f9)](a55_0x169b33[_0x41a95f(0x2df)](_0x41a95f(0x38e))),0x1;const _0x4405de=await confirmKey(_0x41a95f(0x371));if(!_0x4405de)return console[_0x41a95f(0x1f9)](a55_0x169b33['yellow'](_0x41a95f(0x33d)),'-\x20nothing\x20pushed'),0x1;}const _0x16d426=await withSpinner(_0x41a95f(0x313),()=>_0x5997c2[_0x41a95f(0x284)]['executePushProject'](_0x54a11),{'verbose':_0x1d9785[_0x41a95f(0x248)]}),_0x56acfb=_0x16d426['data'];return console['error'](a55_0x169b33[_0x41a95f(0x2cd)]('✔\x20Push\x20complete')),console[_0x41a95f(0x1f9)]('\x20\x20Project\x20ID:\x20'+_0x56acfb[_0x41a95f(0x360)]),console['error'](_0x41a95f(0x28e)+_0x56acfb[_0x41a95f(0x20c)]),await this[_0x41a95f(0x348)](_0x5997c2,_0x56acfb[_0x41a95f(0x27c)],_0x1d9785[_0x41a95f(0x31c)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]='workflow:clone';['description']=a55_0x51cda1(0x293);async[a55_0x51cda1(0x339)](_0x20693a){const _0x5ddd7c=a55_0x51cda1,{options:_0x1046f,args:_0x26a096,tdx:_0x16d5ac}=_0x20693a,_0x1ceb27=this['resolveProjectDir'](_0x26a096,_0x1046f),_0xc61163=_0x1046f[_0x5ddd7c(0x2d2)],_0x33efe8=_0x1046f[_0x5ddd7c(0x20c)],_0x527c06=_0x1046f[_0x5ddd7c(0x393)];if(!_0x1ceb27)return console[_0x5ddd7c(0x1f9)](a55_0x169b33['red'](_0x5ddd7c(0x249)),_0x5ddd7c(0x2cb)),console['error'](a55_0x169b33[_0x5ddd7c(0x2df)](_0x5ddd7c(0x35b))),console['error'](a55_0x169b33[_0x5ddd7c(0x2df)](_0x5ddd7c(0x1fe))),0x1;if(!_0xc61163)return console[_0x5ddd7c(0x1f9)](a55_0x169b33['red'](_0x5ddd7c(0x249)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x5ddd7c(0x1f9)](a55_0x169b33['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x1046f[_0x5ddd7c(0x248)]&&(console[_0x5ddd7c(0x1f9)](_0x5ddd7c(0x2ad)+_0x1ceb27),console[_0x5ddd7c(0x1f9)](_0x5ddd7c(0x287)+_0xc61163),_0x33efe8&&console['error']('Revision:\x20'+_0x33efe8),_0x1046f['dryRun']&&console[_0x5ddd7c(0x1f9)]('Dry\x20run:\x20yes'),_0x527c06&&console[_0x5ddd7c(0x1f9)](_0x5ddd7c(0x36b)));const _0x4b6213=await withSpinner(_0x5ddd7c(0x266),()=>_0x16d5ac['workflow'][_0x5ddd7c(0x285)](_0x1ceb27,_0xc61163,{'revision':_0x33efe8,'skipValidation':_0x527c06}),{'verbose':_0x1046f['verbose']}),_0x25e631=_0x4b6213[_0x5ddd7c(0x33a)];console[_0x5ddd7c(0x1f9)](_0x5ddd7c(0x213)+_0x25e631[_0x5ddd7c(0x2b3)]);_0x25e631[_0x5ddd7c(0x394)]&&console[_0x5ddd7c(0x1f9)](_0x5ddd7c(0x299)+_0x25e631[_0x5ddd7c(0x394)]);console[_0x5ddd7c(0x1f9)]('New\x20project\x20name:\x20'+_0x25e631[_0x5ddd7c(0x2f6)]),console[_0x5ddd7c(0x1f9)](_0x5ddd7c(0x344)+_0x25e631[_0x5ddd7c(0x20c)]),console[_0x5ddd7c(0x1f9)](_0x5ddd7c(0x2a8)+_0x25e631[_0x5ddd7c(0x31d)]);_0x25e631['targetExists']&&(console[_0x5ddd7c(0x1f9)](a55_0x169b33[_0x5ddd7c(0x22d)](_0x5ddd7c(0x338)+_0x25e631[_0x5ddd7c(0x2f6)]+_0x5ddd7c(0x2ea)+_0x25e631[_0x5ddd7c(0x38b)]+')')),console[_0x5ddd7c(0x1f9)](a55_0x169b33[_0x5ddd7c(0x22d)](_0x5ddd7c(0x2c4))));if(_0x1046f['dryRun'])return console[_0x5ddd7c(0x1f9)](a55_0x169b33[_0x5ddd7c(0x22d)](_0x5ddd7c(0x38f))),0x0;if(!_0x1046f['yes']){if(!isInteractive())return console[_0x5ddd7c(0x1f9)](a55_0x169b33['red'](_0x5ddd7c(0x303)),_0x5ddd7c(0x316)),console[_0x5ddd7c(0x1f9)](a55_0x169b33[_0x5ddd7c(0x2df)](_0x5ddd7c(0x38e))),0x1;const _0x1f74da=_0x25e631[_0x5ddd7c(0x394)]||a55_0x2d2e63[_0x5ddd7c(0x25e)](_0x1ceb27),_0x402297=_0x25e631[_0x5ddd7c(0x309)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0xc61163+_0x5ddd7c(0x243):_0x5ddd7c(0x267)+_0x1f74da+_0x5ddd7c(0x21f)+_0xc61163+'\x22?',_0x325f4d=await confirmKey(_0x402297);if(!_0x325f4d)return console['error'](a55_0x169b33[_0x5ddd7c(0x22d)](_0x5ddd7c(0x33d))),0x1;}const _0x1fb117=await withSpinner(_0x25e631[_0x5ddd7c(0x309)]?_0x5ddd7c(0x258)+_0xc61163+_0x5ddd7c(0x35d):_0x5ddd7c(0x263)+_0xc61163+_0x5ddd7c(0x35d),()=>_0x16d5ac[_0x5ddd7c(0x284)][_0x5ddd7c(0x2da)](_0x25e631),{'verbose':_0x1046f[_0x5ddd7c(0x248)]}),_0x8b63a0=_0x1fb117[_0x5ddd7c(0x33a)];return console[_0x5ddd7c(0x1f9)](a55_0x169b33[_0x5ddd7c(0x2cd)](_0x25e631[_0x5ddd7c(0x309)]?_0x5ddd7c(0x23f):_0x5ddd7c(0x28d))),console[_0x5ddd7c(0x1f9)](_0x5ddd7c(0x36a)+_0x8b63a0['newProjectName']),console[_0x5ddd7c(0x1f9)]('\x20\x20Project\x20ID:\x20'+_0x8b63a0[_0x5ddd7c(0x24e)]),console[_0x5ddd7c(0x1f9)]('\x20\x20Revision:\x20'+_0x8b63a0[_0x5ddd7c(0x20c)]),await this['showWorkflowConsoleUrl'](_0x16d5ac,_0x8b63a0[_0x5ddd7c(0x2f6)],_0x1046f[_0x5ddd7c(0x31c)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a55_0x51cda1(0x238);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x39e);async['execute'](_0x1f1ead){const _0x1d3b4e=a55_0x51cda1,{options:_0x4b5df0,args:_0x2af7c8,tdx:_0x19503e}=_0x1f1ead,_0x492de7=_0x2af7c8[0x0];if(!_0x492de7)return console[_0x1d3b4e(0x1f9)](_0x1d3b4e(0x2f9)),console['error'](_0x1d3b4e(0x1f2)),0x1;_0x4b5df0[_0x1d3b4e(0x248)]&&console[_0x1d3b4e(0x1f9)]('Project:\x20'+_0x492de7);if(!_0x4b5df0[_0x1d3b4e(0x254)]){if(!isInteractive())return console[_0x1d3b4e(0x1f9)](a55_0x169b33[_0x1d3b4e(0x352)](_0x1d3b4e(0x303)),_0x1d3b4e(0x316)),console[_0x1d3b4e(0x1f9)](a55_0x169b33[_0x1d3b4e(0x2df)](_0x1d3b4e(0x38e))),0x1;const _0x5c707a=await confirmKey(_0x1d3b4e(0x246)+_0x492de7+_0x1d3b4e(0x2ef));if(!_0x5c707a)return console[_0x1d3b4e(0x1f9)](a55_0x169b33[_0x1d3b4e(0x22d)](_0x1d3b4e(0x33d))),0x1;}const _0x45c353=await withSpinner(_0x1d3b4e(0x208)+_0x492de7+_0x1d3b4e(0x35d),()=>_0x19503e['workflow']['delete'](_0x492de7),{'verbose':_0x4b5df0[_0x1d3b4e(0x248)]}),_0x55d0a0=_0x45c353[_0x1d3b4e(0x33a)];return console['error']('✔\x20Deleted\x20project\x20'+_0x55d0a0[_0x1d3b4e(0x27c)]),console[_0x1d3b4e(0x1f9)](_0x1d3b4e(0x216)+_0x55d0a0['projectId']),0x0;}}export function parseKeyValue(_0x5a01bf){const _0x57dcd9=a55_0x51cda1,_0x168f1e=_0x5a01bf['indexOf']('=');if(_0x168f1e===-0x1)throw new Error('Invalid\x20format:\x20'+_0x5a01bf+_0x57dcd9(0x2c2));const _0x540f20=_0x5a01bf['substring'](0x0,_0x168f1e),_0x2d20a0=_0x5a01bf['substring'](_0x168f1e+0x1);if(!_0x540f20)throw new Error(_0x57dcd9(0x330));return{'key':_0x540f20,'value':_0x2d20a0};}function a55_0x352b(){const _0x30b944=['Analyzing\x20changes...','\x20\x20Project\x20ID:\x20','Resolving\x20project\x20\x27','Setting\x20secret...','cyan','workflow:logs','generateSessionTimelineRows','Loading\x20workflows...','isTTY','LABEL_WIDTH_DIVISOR','\x22\x20to\x20new\x20project\x20\x22','resolve','\x20-\x20','POLL_INTERVAL_MS','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','run','unknown','sessionTime','path','No\x20sessions\x20found','950AcmNNt','List\x20all\x20workflow\x20projects','\x20attempt','select','yellow','\x20\x20tdx\x20wf\x20use\x20<project>','context','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Secrets\x20to\x20set:\x20','Loading\x20session...','✔\x20Secret\x20\x27','Project\x20directory:\x20','\x20\x20Source:\x20','\x20new','workflow:projects','workflow:delete','✔\x20Pull\x20complete','sessions','Project:\x20','Filter:\x20project=','modified','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','✔\x20Project\x20updated','fullName','jsonl','Include\x20retried:\x20yes','\x22\x20with\x20new\x20revision?','workflow:attempts','now','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','workflowName','verbose','Error:','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','cancelRequested','\x20\x20Location:\x20','revision:\x20','newProjectId','limit','Warning:','fs/promises','retryAttemptName','Workflow:\x20','yes','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','\x20task','No\x20workflow\x20projects\x20found','Updating\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','getMinutes','index','resolveProject','✔\x20Workflow\x20run\x20started','basename','\x0a✔\x20Attempt\x20complete','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','\x20unchanged','reason','Cloning\x20to\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','displayLine','Analyzing\x20project...','\x0aClone\x20\x22','373yNwDcl','---\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','renderSingleTimeline','Show\x20tasks\x20for\x20an\x20attempt','\x20project','fileSize','new','sys','success','workflowProject','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','attemptId','workflow:secrets:set','\x20deleted','\x20of\x20','Parameters:\x20','\x20\x20Console:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','white','projectName','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','state','Project\x20filter:\x20','Error:\x20Attempt\x20ID\x20is\x20required','workflow:download','startsWith','\x0aPolling...\x20(','workflow','prepareCloneProject','68860oVwtTq','New\x20project\x20name:\x20','Tip:\x20cd\x20to\x20workflows/','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','split','Attempt\x20ID:\x20','msPerChar','✔\x20Clone\x20complete','\x20\x20Revision:\x20','diff','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Starting\x20workflow\x20run...','tasks','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x0aDry\x20run\x20-\x20nothing\x20pushed','No\x20sessions\x20found\x20in\x20project:\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','No\x20projects\x20match\x20pattern:\x20','180pidgIm','Source\x20project:\x20','renderTimeline','json','Including\x20subtasks:\x20yes','buildTimelineData','session','sessionId','renderSessionsTimeline','message','ICON_SPACING','targetDir','toISOString','No\x20sessions\x20found\x20for:\x20','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','has','Files\x20to\x20upload:\x20','Session\x20time:\x20','Error:\x20','deleteSecret','Listing\x20workflow\x20projects...','Source\x20directory:\x20','retryAttempt','dryRun','match','from','Select\x20a\x20session\x20to\x20view\x20timeline:','sourceDir','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Dry\x20run:\x20yes','Session\x20','round','padStart','workflow:kill','resolveProjectId','workflow:workflows','unchanged','window','MAX_TASKS_DISPLAY','isDirectory','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','tdx.json','.\x20Expected\x20format:\x20KEY=VALUE','Listing\x20workflow\x20sessions...','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','\x20\x20Files\x20extracted:\x20','List\x20workflows','Retrying\x20session...','💡\x20Tip:\x20Use\x20','startedAt','✔\x20Retry\x20started','Source\x20directory\x20is\x20required','map','green','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Project\x20name:\x20','tdx\x20wf\x20attempt\x20','description','name','Failed\x20to\x20fetch\x20attempt\x20data','\x0a✔\x20No\x20changes\x20to\x20push','table','workflow:tasks','cwd','min','parseProjectWorkflowPattern','executeCloneProject','\x1b[1A\x1b[2K','pullProject','repeat','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','dim','pending','Loading\x20sessions...','Error:\x20Invalid\x20JSON\x20in\x20--params','set','workflows','text','substring','length','floor','relative','\x22\x20already\x20exists\x20(ID:\x20','summary','taskName','LABEL_MIN_SPACING','attempt','\x22?\x20This\x20cannot\x20be\x20undone.','params','→\x20Project:\x20','filter','rows','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','follow','newProjectName','Project\x20name\x20is\x20required','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','📁\x20','ICON_WIDTH','Session\x20not\x20found:\x20','No\x20workflows\x20found','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','end','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','value','includeSubtasks','\x0aError:','From\x20task:\x20','/attempt/','write','3099005fahuHe','Filter:\x20','targetExists','navigateSessionsInteractive','\x0aFailed\x20to\x20fetch\x20attempt\x20data','No\x20attempts\x20found','startTime','toLowerCase','start','workflow:push','includeRetried','701886NiIggI','Pushing\x20project...','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','durationMs','projects','\x20(use\x20--limit\x20to\x20show\x20more)','utf-8','Target:\x20','site','fileCount','keys','No\x20workflow\x20sessions\x20found','title','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Setting\x20','Resume\x20from:\x20','sort','workflow:upload','No\x20attempts\x20found\x20in\x20project:\x20','fill','get','\x20\x20Workflow:\x20','requireProject','\x20(system)','lastAttempt','✔\x20Found\x20','✔\x20Pushed\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Key\x20cannot\x20be\x20empty','setSecrets','25552nCbtrX','\x20session','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','autocomplete','getTime','GUTTER','\x0a⚠\x20Project\x20\x22','execute','data','Error:\x20Project\x20name\x20is\x20required','localeCompare','Cancelled','pollTimeline','794pFvWmE','Error:\x20Invalid\x20parameter\x20format:\x20','retrySession','join','Using\x20attempt\x20','Revision:\x20','📋\x20','No\x20matching\x20sessions\x20found','Downloading\x20project\x20','showWorkflowConsoleUrl','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','values',',\x20Workflow:\x20','\x20\x20New\x20attempt\x20ID:\x20','Show\x20specific\x20attempt\x20details','total','✔\x20Workflow\x20project\x20context\x20cleared.','trim','applyPullProject','red','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Retrying\x20attempt...','Key:\x20','⚠\x20Showing\x20first\x20','List\x20workflow\x20execution\x20sessions','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','list','\x20\x20Session\x20context\x20set\x20to:\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20from\x20session\x20','...','project','workflow:secrets:delete','projectId','updatedAt','workflow:timeline','getDate','\x20tasks','canceling','\x20is\x20not\x20a\x20directory','getFullYear','909834quwAOp','\x20\x20Changes:\x20','\x20\x20Project:\x20','Validation:\x20skipped','running','Status:\x20','\x20\x20Session\x20ID:\x20','✔\x20Project:\x20','30GDjjkn','\x0aPush\x20these\x20changes?','find','hasChanges','\x20\x20Target:\x20','attempt:','done','✔\x20Downloaded\x20','128293JLeZCk','\x27\x20from\x20project\x20\x27','No\x20sessions\x20with\x20timing\x20information','MAX_POLL_ITERATIONS','status','force','clear','log','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','\x20secret','kill','resolveProjectDir','columns','MIN_LABEL_COUNT','includes','Listing\x20workflows...','getMonth','stdout','replace','existingProjectId','workflow:secrets:list','output','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x0aDry\x20run\x20-\x20no\x20project\x20created','format','\x20modified','slice','skipValidation','sourceProjectName','(use\x20--limit\x20to\x20see\x20more)','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','No\x20workflows\x20found\x20in\x20project:\x20','Writing\x20files...','\x20to\x20see\x20detailed\x20logs','\x0a✔\x20Already\x20up\x20to\x20date','all','duration','No\x20attempts\x20found\x20for:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','resumeFrom','key','deleted','List\x20workflow\x20attempts','planned','MAX_LABEL_COUNT','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','stat','push','createdAt','task','Pattern:\x20','workflow:retry','error','changes','Killing\x20attempt...','\x20\x20Attempt\x20ID:\x20','type','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','\x0aApply\x20these\x20changes?','Attempt:\x20','Retry\x20a\x20session\x20or\x20attempt','Total:\x20','indexOf','-\x20no\x20files\x20written','Pulling\x20project\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','No\x20workflow\x20tdx.json\x20found','Deleting\x20project\x20','fromTask','filesExtracted','finishedAt','revision','Fetching\x20log\x20files...','max','Select\x20a\x20workflow\x20to\x20run','\x20secrets\x20set\x20for\x20project\x20\x27','→\x20New\x20project:\x20','Listing\x20secrets...','Source:\x20','blue'];a55_0x352b=function(){return _0x30b944;};return a55_0x352b();}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a55_0x51cda1(0x38c);[a55_0x51cda1(0x2d1)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a55_0x51cda1(0x339)](_0x1d7526){const _0x501ace=a55_0x51cda1,{options:_0x528221,args:_0x261713,tdx:_0x543ed0}=_0x1d7526,_0x369bc1=this[_0x501ace(0x32a)](_0x261713,_0x528221);if(!_0x369bc1)return 0x1;_0x528221[_0x501ace(0x248)]&&console[_0x501ace(0x1f9)](_0x501ace(0x23b)+_0x369bc1);const _0xcbd684=await withSpinner(_0x501ace(0x212),()=>_0x543ed0[_0x501ace(0x284)]['listSecrets'](_0x369bc1),{'verbose':_0x528221[_0x501ace(0x248)]}),{secrets:_0x14720a}=_0xcbd684['data'];return console[_0x501ace(0x1f9)](_0x501ace(0x32d)+_0x14720a['length']+_0x501ace(0x381)+(_0x14720a[_0x501ace(0x2e7)]!==0x1?'s':'')),await handleSDKOutput(_0x14720a,_0x528221),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x275);[a55_0x51cda1(0x2d1)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async[a55_0x51cda1(0x339)](_0x3bc4a6){const _0x734ef1=a55_0x51cda1,{options:_0x1b2a0b,args:_0x1b5d43,tdx:_0x2ffb15}=_0x3bc4a6;let _0x37f281,_0x5e8a07;if(_0x1b5d43[_0x734ef1(0x2e7)]>=0x1&&!_0x1b5d43[0x0][_0x734ef1(0x386)]('='))_0x37f281=_0x1b5d43[0x0],_0x5e8a07=_0x1b5d43['slice'](0x1);else{if(_0x1b5d43[_0x734ef1(0x2e7)]>=0x1&&_0x1b2a0b[_0x734ef1(0x272)])_0x37f281=_0x1b2a0b['workflowProject'],_0x5e8a07=_0x1b5d43;else return _0x1b5d43[_0x734ef1(0x2e7)]>=0x1?(console[_0x734ef1(0x1f9)](_0x734ef1(0x33b)),console[_0x734ef1(0x1f9)](_0x734ef1(0x290)),0x1):(console[_0x734ef1(0x1f9)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x734ef1(0x1f9)](_0x734ef1(0x260)),0x1);}if(_0x5e8a07[_0x734ef1(0x2e7)]===0x0)return console[_0x734ef1(0x1f9)](_0x734ef1(0x259)),console[_0x734ef1(0x1f9)](_0x734ef1(0x260)),0x1;const _0x55d07e={};try{for(const _0x17519c of _0x5e8a07){const {key:_0x2c7dc9,value:_0x1d7cca}=parseKeyValue(_0x17519c);_0x55d07e[_0x2c7dc9]=_0x1d7cca;}}catch(_0x2fe4ff){return _0x2fe4ff instanceof Error&&console[_0x734ef1(0x1f9)](a55_0x169b33[_0x734ef1(0x352)](_0x734ef1(0x249)),_0x2fe4ff['message']),0x1;}const _0x51ffcd=Object[_0x734ef1(0x31e)](_0x55d07e);_0x1b2a0b[_0x734ef1(0x248)]&&(console[_0x734ef1(0x1f9)](_0x734ef1(0x23b)+_0x37f281),console[_0x734ef1(0x1f9)](_0x734ef1(0x231)+_0x51ffcd[_0x734ef1(0x342)](',\x20')));const _0x556380=await withSpinner(_0x51ffcd[_0x734ef1(0x2e7)]===0x1?_0x734ef1(0x218):_0x734ef1(0x322)+_0x51ffcd[_0x734ef1(0x2e7)]+'\x20secrets...',()=>_0x2ffb15[_0x734ef1(0x284)][_0x734ef1(0x331)](_0x37f281,_0x55d07e),{'verbose':_0x1b2a0b[_0x734ef1(0x248)]}),_0x45bd44=_0x556380[_0x734ef1(0x33a)];return console['error'](_0x51ffcd['length']===0x1?'✔\x20Secret\x20\x27'+_0x45bd44[_0x734ef1(0x31e)][0x0]+_0x734ef1(0x296)+_0x45bd44[_0x734ef1(0x27c)]+'\x27':'✔\x20'+_0x45bd44[_0x734ef1(0x31e)][_0x734ef1(0x2e7)]+_0x734ef1(0x210)+_0x45bd44[_0x734ef1(0x27c)]+'\x27'),(_0x1b2a0b[_0x734ef1(0x29b)]||_0x1b2a0b[_0x734ef1(0x241)])&&await handleSingleObjectOutput(_0x45bd44,_0x1b2a0b),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x35f);['description']=a55_0x51cda1(0x2c0);async[a55_0x51cda1(0x339)](_0x49c284){const _0x5027cc=a55_0x51cda1,{options:_0x1067d3,args:_0x4d24a3,tdx:_0x4a783b}=_0x49c284;let _0x3d9650,_0x3050c7;if(_0x4d24a3['length']>=0x2)_0x3d9650=_0x4d24a3[0x0],_0x3050c7=_0x4d24a3[0x1];else{if(_0x4d24a3[_0x5027cc(0x2e7)]===0x1&&_0x1067d3['workflowProject'])_0x3d9650=_0x1067d3[_0x5027cc(0x272)],_0x3050c7=_0x4d24a3[0x0];else return _0x4d24a3[_0x5027cc(0x2e7)]===0x1?(console[_0x5027cc(0x1f9)](_0x5027cc(0x33b)),console[_0x5027cc(0x1f9)](_0x5027cc(0x290)),0x1):(console[_0x5027cc(0x1f9)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x5027cc(0x1f9)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x1067d3[_0x5027cc(0x248)]&&(console[_0x5027cc(0x1f9)](_0x5027cc(0x23b)+_0x3d9650),console[_0x5027cc(0x1f9)](_0x5027cc(0x355)+_0x3050c7));if(!_0x1067d3[_0x5027cc(0x254)]){if(!isInteractive())return console[_0x5027cc(0x1f9)](a55_0x169b33[_0x5027cc(0x352)](_0x5027cc(0x303)),_0x5027cc(0x316)),console[_0x5027cc(0x1f9)](a55_0x169b33['dim'](_0x5027cc(0x38e))),0x1;const _0x2d80c4=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x3050c7+_0x5027cc(0x379)+_0x3d9650+'\x27?');if(!_0x2d80c4)return console['error'](a55_0x169b33['yellow'](_0x5027cc(0x33d))),0x1;}const _0x1f98d6=await withSpinner('Deleting\x20secret...',()=>_0x4a783b['workflow'][_0x5027cc(0x2ab)](_0x3d9650,_0x3050c7),{'verbose':_0x1067d3[_0x5027cc(0x248)]}),_0x387e3e=_0x1f98d6[_0x5027cc(0x33a)];return console[_0x5027cc(0x1f9)](_0x5027cc(0x233)+_0x387e3e[_0x5027cc(0x3a0)]+_0x5027cc(0x2de)+_0x387e3e[_0x5027cc(0x27c)]+'\x27'),(_0x1067d3[_0x5027cc(0x29b)]||_0x1067d3[_0x5027cc(0x241)])&&await handleSingleObjectOutput(_0x387e3e,_0x1067d3),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(_0x743fb4){const _0x7fb966=a55_0x51cda1,_0xcbd950=Math['floor'](_0x743fb4/0x3e8),_0x519afc=Math[_0x7fb966(0x2e8)](_0xcbd950/0x3c),_0x3badfe=Math[_0x7fb966(0x2e8)](_0x519afc/0x3c),_0x25f1fd=Math[_0x7fb966(0x2e8)](_0x3badfe/0x18);if(_0x25f1fd>0x0){const _0x55800c=_0x3badfe%0x18;return _0x55800c>0x0?_0x25f1fd+'d\x20'+_0x55800c+'h':_0x25f1fd+'d';}else{if(_0x3badfe>0x0){const _0x3a87d6=_0x519afc%0x3c;return _0x3a87d6>0x0?_0x3badfe+'h\x20'+_0x3a87d6+'m':_0x3badfe+'h';}else{if(_0x519afc>0x0){const _0x3efaae=_0xcbd950%0x3c;return _0x3efaae>0x0?_0x519afc+'m\x20'+_0x3efaae+'s':_0x519afc+'m';}else return _0xcbd950+'s';}}}function formatTimestamp(_0x109086,_0x2be490){const _0x15977b=a55_0x51cda1,_0x1376f3=new Date(_0x109086),_0x229178=String(_0x1376f3['getHours']())[_0x15977b(0x2b8)](0x2,'0'),_0x1fcba6=String(_0x1376f3[_0x15977b(0x25a)]())[_0x15977b(0x2b8)](0x2,'0'),_0x1f75bc=_0x229178+':'+_0x1fcba6,_0x4f5dd2=_0x1376f3[_0x15977b(0x367)]()===_0x2be490[_0x15977b(0x367)]()&&_0x1376f3['getMonth']()===_0x2be490['getMonth']()&&_0x1376f3['getDate']()===_0x2be490[_0x15977b(0x363)]();if(_0x4f5dd2)return _0x1f75bc;else{const _0x201d31=String(_0x1376f3['getMonth']()+0x1)[_0x15977b(0x2b8)](0x2,'0'),_0x46ff07=String(_0x1376f3[_0x15977b(0x363)]())[_0x15977b(0x2b8)](0x2,'0');return _0x201d31+'-'+_0x46ff07+'\x20'+_0x1f75bc;}}function formatDate(_0x3845d6){const _0x1d05e8=a55_0x51cda1,_0x2bada1=_0x3845d6[_0x1d05e8(0x367)](),_0x49800f=String(_0x3845d6[_0x1d05e8(0x388)]()+0x1)[_0x1d05e8(0x2b8)](0x2,'0'),_0x4ae60f=String(_0x3845d6['getDate']())[_0x1d05e8(0x2b8)](0x2,'0');return _0x2bada1+'-'+_0x49800f+'-'+_0x4ae60f;}function getTaskStateIcon(_0x49df9d){const _0x5b4d8c={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x5b4d8c[_0x49df9d]||'⚪';}function getBarChar(_0x584eec){const _0x2e1279=a55_0x51cda1;return _0x584eec===_0x2e1279(0x1f9)||_0x584eec==='group_error'?'×':'─';}function getBarColor(_0x4c8e73){const _0xfc9e94=a55_0x51cda1,_0x40904d={'success':a55_0x169b33[_0xfc9e94(0x2cd)],'error':a55_0x169b33[_0xfc9e94(0x352)],'group_error':a55_0x169b33[_0xfc9e94(0x352)],'running':a55_0x169b33[_0xfc9e94(0x214)],'blocked':a55_0x169b33[_0xfc9e94(0x22d)],'planned':a55_0x169b33[_0xfc9e94(0x2df)],'canceling':a55_0x169b33[_0xfc9e94(0x22d)]};return _0x40904d[_0x4c8e73]||a55_0x169b33[_0xfc9e94(0x27b)];}function parseTaskName(_0x4d34b1){const _0x347302=a55_0x51cda1;let _0x24e45d=_0x4d34b1[_0x347302(0x38a)](/^\++/,'');const _0x44c1c7=_0x24e45d[_0x347302(0x28a)]('+'),_0x4029ca=_0x44c1c7[_0x347302(0x2e7)]>0x1?_0x44c1c7[_0x347302(0x2e7)]-0x2:0x0,_0x3dcbba=_0x44c1c7[_0x44c1c7[_0x347302(0x2e7)]-0x1]||_0x24e45d;return{'level':_0x4029ca,'name':'+'+_0x3dcbba};}function truncateTaskName(_0x5c34de,_0x384c13){const _0x155828=a55_0x51cda1,_0x55256c=stringWidth(_0x5c34de);if(_0x55256c<=_0x384c13)return _0x5c34de;let _0x1a72b0=_0x5c34de;while(stringWidth(_0x1a72b0+'…')>_0x384c13&&_0x1a72b0[_0x155828(0x2e7)]>0x0){_0x1a72b0=_0x1a72b0[_0x155828(0x392)](0x0,-0x1);}return _0x1a72b0+'…';}function calculateTimeScale(_0x4add3e,_0x4c8a5b){const _0x48f5be=a55_0x51cda1;return{'startTime':_0x4add3e[_0x48f5be(0x30f)],'endTime':_0x4add3e[_0x48f5be(0x2ff)],'durationMs':_0x4add3e[_0x48f5be(0x39c)],'msPerChar':_0x4add3e[_0x48f5be(0x39c)]/_0x4c8a5b};}function timeToPosition(_0x586cbf,_0x5de98f,_0x2e8b6a){const _0x1cedc7=a55_0x51cda1,_0x42d0f4=_0x586cbf-_0x5de98f[_0x1cedc7(0x30d)],_0x2f8ace=Math[_0x1cedc7(0x2e8)](_0x42d0f4/_0x5de98f[_0x1cedc7(0x28c)]);return Math[_0x1cedc7(0x20e)](0x0,Math[_0x1cedc7(0x2d8)](_0x2f8ace,_0x2e8b6a));}function renderTimeAxis(_0x3da495,_0x37e342){const _0x101b8f=a55_0x51cda1,_0x1163c9=Math['min'](TIMELINE_CONFIG[_0x101b8f(0x1f0)],Math[_0x101b8f(0x20e)](TIMELINE_CONFIG[_0x101b8f(0x385)],Math['floor'](_0x37e342/TIMELINE_CONFIG[_0x101b8f(0x21e)]))),_0x45c5df=_0x3da495[_0x101b8f(0x317)]/(_0x1163c9-0x1),_0x17f802=new Date(_0x3da495[_0x101b8f(0x30d)]),_0xdadc5d=[];for(let _0x422563=0x0;_0x422563<_0x1163c9;_0x422563++){const _0x29f455=_0x3da495[_0x101b8f(0x30d)]+_0x422563*_0x45c5df,_0x56d68e=timeToPosition(_0x29f455,_0x3da495,_0x37e342),_0x59a9bc=formatTimestamp(_0x29f455,_0x17f802);_0xdadc5d[_0x101b8f(0x1f4)]({'pos':_0x56d68e,'text':_0x59a9bc});}const _0x326d2b=new Array(_0x37e342)[_0x101b8f(0x327)]('\x20');let _0x4a9e51=-0x1;for(const {pos:_0x4a3eca,text:_0x5d2e1c}of _0xdadc5d){let _0x568b4a=Math[_0x101b8f(0x20e)](0x0,_0x4a3eca-Math[_0x101b8f(0x2e8)](_0x5d2e1c[_0x101b8f(0x2e7)]/0x2));_0x568b4a<=_0x4a9e51+TIMELINE_CONFIG[_0x101b8f(0x2ed)]&&(_0x568b4a=_0x4a9e51+TIMELINE_CONFIG[_0x101b8f(0x2ed)]+0x1);_0x568b4a+_0x5d2e1c[_0x101b8f(0x2e7)]>_0x37e342&&(_0x568b4a=_0x37e342-_0x5d2e1c[_0x101b8f(0x2e7)]);if(_0x568b4a>=0x0&&_0x568b4a+_0x5d2e1c[_0x101b8f(0x2e7)]<=_0x37e342&&_0x568b4a>_0x4a9e51){for(let _0x6de8fc=0x0;_0x6de8fc<_0x5d2e1c['length'];_0x6de8fc++){_0x326d2b[_0x568b4a+_0x6de8fc]=_0x5d2e1c[_0x6de8fc];}_0x4a9e51=_0x568b4a+_0x5d2e1c[_0x101b8f(0x2e7)]-0x1;}}return _0x326d2b[_0x101b8f(0x342)]('');}function renderTaskRow(_0x316823,_0x5e0cd7,_0x58fdf4,_0x196c3a){const _0x434381=a55_0x51cda1,{level:_0x412016,name:_0x3693c1}=parseTaskName(_0x316823[_0x434381(0x2d2)]),_0xb5b7ea='\x20'[_0x434381(0x2dd)](_0x412016),_0x3e5695=_0x316823[_0x434381(0x2bd)]?'('+formatElapsed(_0x316823['window']['duration'])+')':'',_0x3e8fae=stringWidth(_0x3e5695),_0x50a0b7=_0x412016*0x1,_0x568b15=_0x196c3a-_0x50a0b7-_0x3e8fae-0x1,_0x5595c3=truncateTaskName(_0x3693c1,_0x568b15),_0x4f30b6=_0xb5b7ea+_0x5595c3,_0xae66e2=stringWidth(_0x4f30b6),_0x550ed8=_0x196c3a-_0xae66e2-_0x3e8fae,_0x7dfa7=_0x4f30b6+'\x20'[_0x434381(0x2dd)](Math['max'](0x1,_0x550ed8))+a55_0x169b33['dim'](_0x3e5695),_0x5c81e2=getTaskStateIcon(_0x316823[_0x434381(0x27e)]),_0x24035a=new Array(_0x58fdf4)[_0x434381(0x327)]('\x20');if(_0x316823['window']){const _0x1244cd=timeToPosition(_0x316823[_0x434381(0x2bd)][_0x434381(0x30f)],_0x5e0cd7,_0x58fdf4),_0x362051=timeToPosition(_0x316823[_0x434381(0x2bd)]['end'],_0x5e0cd7,_0x58fdf4),_0xd0c572=getBarChar(_0x316823[_0x434381(0x27e)]),_0x129baa=Math['max'](_0x1244cd+0x1,_0x362051);for(let _0x3837db=_0x1244cd;_0x3837db<Math[_0x434381(0x2d8)](_0x129baa,_0x58fdf4);_0x3837db++){_0x24035a[_0x3837db]=_0xd0c572;}}const _0x87ddba=getBarColor(_0x316823[_0x434381(0x27e)]),_0x5cd95c=_0x24035a[_0x434381(0x2cc)](_0x27f25d=>_0x27f25d==='\x20'?'\x20':_0x87ddba(_0x27f25d))['join']('');return _0x5c81e2+'\x20'+_0x7dfa7+'│'+_0x5cd95c+'│';}function calculateStats(_0x2cae51){const _0x123f34=a55_0x51cda1,_0x4c905d={'total':_0x2cae51[_0x123f34(0x2e7)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x226fdd of _0x2cae51){if(_0x226fdd[_0x123f34(0x27e)]===_0x123f34(0x271))_0x4c905d['success']++;else{if(_0x226fdd['state']===_0x123f34(0x1f9)||_0x226fdd[_0x123f34(0x27e)]==='group_error')_0x4c905d[_0x123f34(0x1f9)]++;else _0x226fdd[_0x123f34(0x27e)]==='running'?_0x4c905d[_0x123f34(0x36c)]++:_0x4c905d[_0x123f34(0x2e0)]++;}}return _0x4c905d;}function formatStats(_0x4f4663){const _0x136d7a=a55_0x51cda1;return[_0x136d7a(0x202)+_0x4f4663[_0x136d7a(0x34e)],'✅\x20'+_0x4f4663[_0x136d7a(0x271)],'❌\x20'+_0x4f4663[_0x136d7a(0x1f9)],'🔄\x20'+_0x4f4663['running'],'⏳\x20'+_0x4f4663[_0x136d7a(0x2e0)]][_0x136d7a(0x342)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x51cda1(0x2d2)]=a55_0x51cda1(0x362);[a55_0x51cda1(0x2d1)]=a55_0x51cda1(0x314);async['execute'](_0x3917b6){const _0x3f4c43=a55_0x51cda1,{options:_0x402cdf,args:_0x27ba87,tdx:_0x2900bc}=_0x3917b6;let _0x380340,_0x1b8df4,_0x1fd4a3=![];if(_0x27ba87[0x0]){if(_0x27ba87[0x0][_0x3f4c43(0x386)]('.')){const _0x34ff8e=this[_0x3f4c43(0x2d9)](_0x27ba87,_0x402cdf);if(!_0x34ff8e)return 0x1;_0x380340=_0x34ff8e[_0x3f4c43(0x27c)],_0x1b8df4=_0x34ff8e[_0x3f4c43(0x247)];}else{_0x1b8df4=_0x27ba87[0x0],_0x380340=_0x402cdf[_0x3f4c43(0x272)];if(!_0x380340)return console[_0x3f4c43(0x1f9)](a55_0x169b33[_0x3f4c43(0x352)](_0x3f4c43(0x249)),_0x3f4c43(0x321)),0x1;_0x1fd4a3=!![];}}else{const _0xef189e=this[_0x3f4c43(0x2d9)](_0x27ba87,_0x402cdf);if(!_0xef189e)return 0x1;_0x380340=_0xef189e[_0x3f4c43(0x27c)],_0x1b8df4=_0xef189e['workflowName'];}if(_0x402cdf[_0x3f4c43(0x248)]){if(_0x380340&&_0x1b8df4)console[_0x3f4c43(0x1f9)](_0x3f4c43(0x308)+_0x380340+'.'+_0x1b8df4);else _0x380340&&console['error'](_0x3f4c43(0x23c)+_0x380340);}const _0x494fcb=_0x402cdf[_0x3f4c43(0x274)],_0x1babbf=_0x402cdf[_0x3f4c43(0x29f)];if(_0x494fcb){_0x1babbf&&console[_0x3f4c43(0x1f9)](a55_0x169b33[_0x3f4c43(0x22d)](_0x3f4c43(0x250)),_0x3f4c43(0x2b4));const _0x508c0c=_0x402cdf[_0x3f4c43(0x2f5)];return _0x508c0c?await this[_0x3f4c43(0x33e)](_0x3917b6,_0x494fcb):await this['renderSingleTimeline'](_0x3917b6,_0x494fcb,_0x402cdf),0x0;}if(_0x1babbf){const _0x513f85=await withSpinner(_0x3f4c43(0x232),()=>_0x2900bc[_0x3f4c43(0x284)][_0x3f4c43(0x23a)]({'projectName':_0x380340,'workflowName':_0x1b8df4,'limit':0x64}),{'verbose':_0x402cdf[_0x3f4c43(0x248)]}),_0x334e2f=_0x513f85[_0x3f4c43(0x33a)]['find'](_0x3dc766=>_0x3dc766['id']===_0x1babbf);if(!_0x334e2f)return console[_0x3f4c43(0x1f9)](a55_0x169b33['red']('Error:'),_0x3f4c43(0x2fc)+_0x1babbf),0x1;if(!_0x334e2f[_0x3f4c43(0x32c)]?.['id'])return console['error'](a55_0x169b33['red']('Error:'),_0x3f4c43(0x2b6)+_0x1babbf+'\x20has\x20no\x20attempts'),0x1;const _0x3c6de9=_0x334e2f[_0x3f4c43(0x32c)]['id'];_0x402cdf[_0x3f4c43(0x248)]&&console[_0x3f4c43(0x1f9)](_0x3f4c43(0x343)+_0x3c6de9+_0x3f4c43(0x35c)+_0x1babbf);const _0x1a4b5d=_0x402cdf[_0x3f4c43(0x2f5)];return _0x1a4b5d?await this[_0x3f4c43(0x33e)](_0x3917b6,_0x3c6de9):await this['renderSingleTimeline'](_0x3917b6,_0x3c6de9,_0x402cdf),0x0;}const _0xe73baa=await withSpinner(_0x3f4c43(0x2e1),()=>_0x2900bc[_0x3f4c43(0x284)][_0x3f4c43(0x23a)]({'projectName':_0x380340,'workflowName':_0x1b8df4,'limit':_0x402cdf['limit']||0x32}),{'verbose':_0x402cdf[_0x3f4c43(0x248)]}),_0x38532f=_0xe73baa[_0x3f4c43(0x33a)];if(_0x38532f['length']===0x0){if(_0x380340&&_0x1b8df4)console[_0x3f4c43(0x1f9)]('No\x20sessions\x20found\x20for:\x20'+_0x380340+'.'+_0x1b8df4);else _0x380340?console[_0x3f4c43(0x1f9)](_0x3f4c43(0x295)+_0x380340):(console[_0x3f4c43(0x1f9)](_0x3f4c43(0x31f)),console[_0x3f4c43(0x1f9)](a55_0x169b33[_0x3f4c43(0x2df)](_0x3f4c43(0x27d))));return 0x0;}_0x38532f[_0x3f4c43(0x324)]((_0x55666f,_0x3a12be)=>{const _0x4d602b=_0x3f4c43,_0x495647=_0x55666f[_0x4d602b(0x226)]||'',_0x5200d4=_0x3a12be[_0x4d602b(0x226)]||'';return _0x5200d4[_0x4d602b(0x33c)](_0x495647);});if(_0x402cdf['json']||_0x402cdf['jsonl'])return await handleSDKOutput(_0x38532f,_0x402cdf),0x0;let _0x1c7b13;if(_0x1fd4a3){const _0x83ab72=_0x38532f[0x0];if(!_0x83ab72['lastAttempt']?.['id'])return console[_0x3f4c43(0x1f9)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x1c7b13=_0x83ab72[_0x3f4c43(0x32c)]['id'],_0x402cdf[_0x3f4c43(0x248)]&&console[_0x3f4c43(0x1f9)]('Auto-selected\x20latest\x20session:\x20'+_0x83ab72[_0x3f4c43(0x226)]);}else{const _0x1f4e80=_0x38532f['map'](_0x546b54=>{const _0x599a9a=_0x3f4c43,_0x249d48=getAttemptStatusDisplay(_0x546b54[_0x599a9a(0x32c)]);return{'title':_0x546b54['project']?.[_0x599a9a(0x2d2)]+'.'+_0x546b54[_0x599a9a(0x284)]?.[_0x599a9a(0x2d2)]+'\x20-\x20'+_0x546b54[_0x599a9a(0x226)]+'\x20'+_0x249d48['icon'],'value':_0x546b54['lastAttempt']?.['id']||'','description':_0x249d48[_0x599a9a(0x2e5)]};}),_0x4ca2e3=await a55_0x4fbd47({'type':'select','name':'attemptId','message':_0x3f4c43(0x2b2),'choices':_0x1f4e80[_0x3f4c43(0x2f2)](_0x4ca60c=>_0x4ca60c[_0x3f4c43(0x301)]!=='')});if(!_0x4ca2e3['attemptId'])return 0x0;_0x1c7b13=_0x4ca2e3['attemptId'];}const _0x1eb8b7=_0x402cdf[_0x3f4c43(0x2f5)];return _0x1eb8b7?await this[_0x3f4c43(0x33e)](_0x3917b6,_0x1c7b13):await this[_0x3f4c43(0x26b)](_0x3917b6,_0x1c7b13,_0x402cdf),0x0;}async[a55_0x51cda1(0x26b)](_0xf1d766,_0x5c4e15,_0x14eed4){const _0x35bf59=a55_0x51cda1,{tdx:_0x3dbb6f}=_0xf1d766;let _0x602f8a,_0x40d18f;try{[_0x602f8a,_0x40d18f]=await Promise[_0x35bf59(0x39b)]([_0x3dbb6f[_0x35bf59(0x284)]['attempt'](_0x5c4e15),_0x3dbb6f['workflow'][_0x35bf59(0x292)](_0x5c4e15,![])]);}catch(_0x23f575){console[_0x35bf59(0x1f9)](a55_0x169b33[_0x35bf59(0x352)](_0x35bf59(0x2d3)));_0x14eed4[_0x35bf59(0x248)]&&console[_0x35bf59(0x1f9)](_0x23f575);throw _0x23f575;}if(_0x14eed4[_0x35bf59(0x29b)]||_0x14eed4[_0x35bf59(0x241)]){const _0x9aba60=this['buildTimelineData'](_0x602f8a,_0x40d18f);await handleSDKOutput([_0x9aba60],_0x14eed4);return;}const _0x112e12=_0x3dbb6f[_0x35bf59(0x22f)][_0x35bf59(0x31c)],_0x59aa58=this[_0x35bf59(0x29a)](_0x602f8a,_0x40d18f,_0x112e12);console['log'](_0x59aa58);}async[a55_0x51cda1(0x33e)](_0x407721,_0x46324b){const _0x59e996=a55_0x51cda1,{tdx:_0x18855d}=_0x407721,_0x2f6e18=TIMELINE_CONFIG[_0x59e996(0x222)],_0x2bfd18=TIMELINE_CONFIG[_0x59e996(0x37b)];let _0x1a3621=0x0;while(_0x1a3621<_0x2bfd18){process['stdout'][_0x59e996(0x21d)]&&process[_0x59e996(0x389)][_0x59e996(0x306)]('\x1bc');let _0x7418ea,_0x40f8f2;try{[_0x7418ea,_0x40f8f2]=await Promise[_0x59e996(0x39b)]([_0x18855d['workflow'][_0x59e996(0x2ee)](_0x46324b),_0x18855d[_0x59e996(0x284)][_0x59e996(0x292)](_0x46324b,![])]);}catch(_0x288ce1){console[_0x59e996(0x1f9)](a55_0x169b33['red'](_0x59e996(0x30b)));_0x1a3621>0x0&&console['error'](a55_0x169b33[_0x59e996(0x2df)](_0x59e996(0x349)+_0x1a3621));throw _0x288ce1;}const _0x48234f=_0x18855d['context'][_0x59e996(0x31c)],_0x4dde92=this['renderTimeline'](_0x7418ea,_0x40f8f2,_0x48234f);console[_0x59e996(0x37f)](_0x4dde92);const _0xec30d3=_0x7418ea[_0x59e996(0x376)]&&_0x40f8f2['every'](_0x359bdf=>_0x359bdf['state']!==_0x59e996(0x36c)&&_0x359bdf[_0x59e996(0x27e)]!==_0x59e996(0x1ef));if(_0xec30d3){console['error'](a55_0x169b33['green'](_0x59e996(0x25f)));break;}console[_0x59e996(0x1f9)](a55_0x169b33[_0x59e996(0x2df)](_0x59e996(0x283)+_0x1a3621*0x2+_0x59e996(0x273))),await new Promise(_0x46ca9f=>setTimeout(_0x46ca9f,_0x2f6e18)),_0x1a3621++;}_0x1a3621>=_0x2bfd18&&console['error'](a55_0x169b33[_0x59e996(0x22d)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}['renderTimeline'](_0x2c0d82,_0x222d57,_0x4f06a7){const _0x154d82=a55_0x51cda1,_0x17f56a=[],_0x3a73a8=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x4974d5=0x5,_0x5d806f=process[_0x154d82(0x389)][_0x154d82(0x384)]||0x78,_0x455f71=_0x5d806f-_0x3a73a8-_0x4974d5,_0xf8149f=Math[_0x154d82(0x20e)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x154d82(0x2d8)](_0x455f71,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x37a276=new Date(_0x2c0d82[_0x154d82(0x1f5)])[_0x154d82(0x336)](),_0x2ae487=_0x2c0d82[_0x154d82(0x20b)]?new Date(_0x2c0d82[_0x154d82(0x20b)])[_0x154d82(0x336)]():Date[_0x154d82(0x245)](),_0xec53a9={'start':_0x37a276,'end':_0x2ae487,'duration':_0x2ae487-_0x37a276},_0x169ee0=new Map(),_0x1ec22c=[];for(const _0x876745 of _0x222d57){if(_0x876745[_0x154d82(0x2c9)]){const _0x27758d=new Date(_0x876745[_0x154d82(0x2c9)])[_0x154d82(0x336)](),_0x6cf9aa=_0x876745[_0x154d82(0x361)]?new Date(_0x876745[_0x154d82(0x361)])['getTime']():Date[_0x154d82(0x245)](),_0xb5b7d2={'start':_0x27758d,'end':_0x6cf9aa,'duration':_0x6cf9aa-_0x27758d};_0x169ee0[_0x154d82(0x2e3)](_0x876745['id'],_0xb5b7d2),_0x1ec22c[_0x154d82(0x1f4)]({'name':_0x876745['fullName'],'state':_0x876745[_0x154d82(0x27e)]||_0x154d82(0x225),'window':_0xb5b7d2});}else _0x1ec22c[_0x154d82(0x1f4)]({'name':_0x876745[_0x154d82(0x240)],'state':_0x876745[_0x154d82(0x27e)]||'planned','window':undefined});}_0x1ec22c[_0x154d82(0x324)]((_0x4e237a,_0xbaac59)=>{const _0x3bd3e3=_0x154d82;if(!_0x4e237a['window'])return 0x1;if(!_0xbaac59[_0x3bd3e3(0x2bd)])return-0x1;return _0x4e237a[_0x3bd3e3(0x2bd)][_0x3bd3e3(0x30f)]-_0xbaac59[_0x3bd3e3(0x2bd)][_0x3bd3e3(0x30f)];});const _0x365c06=_0x1ec22c[_0x154d82(0x2e7)],_0x35296d=_0x365c06>TIMELINE_CONFIG[_0x154d82(0x2be)];_0x35296d&&_0x1ec22c['splice'](TIMELINE_CONFIG[_0x154d82(0x2be)]);const _0x448902=calculateTimeScale(_0xec53a9,_0xf8149f),_0x33ff41=_0x2c0d82[_0x154d82(0x376)]?_0x2c0d82[_0x154d82(0x271)]?a55_0x169b33[_0x154d82(0x2cd)](_0x154d82(0x271)):a55_0x169b33[_0x154d82(0x352)]('error'):a55_0x169b33[_0x154d82(0x214)](_0x154d82(0x36c)),_0x46c256=_0x2c0d82[_0x154d82(0x35e)]?.['id'],_0x19e0b1=_0x2c0d82[_0x154d82(0x29f)];let _0x195952;if(_0x46c256&&_0x19e0b1){const _0x1f8905=getWorkflowAttemptUrl(_0x4f06a7,_0x46c256,_0x19e0b1,_0x2c0d82['id']);_0x195952=hyperlink(a55_0x169b33[_0x154d82(0x2df)](_0x2c0d82['id']),_0x1f8905);}else _0x195952=a55_0x169b33[_0x154d82(0x2df)](_0x2c0d82['id']);_0x17f56a['push'](_0x154d82(0x200)+_0x195952+_0x154d82(0x221)+_0x33ff41+_0x154d82(0x221)+formatElapsed(_0xec53a9[_0x154d82(0x39c)]));if(_0x1ec22c[_0x154d82(0x2e7)]>0x0){const _0xe2f0e3=renderTimeAxis(_0x448902,_0xf8149f),_0x251efa=new Date(_0xec53a9['start']),_0x31eed6=formatDate(_0x251efa),_0x41d0e5=TIMELINE_CONFIG[_0x154d82(0x2fb)]+TIMELINE_CONFIG[_0x154d82(0x2a2)]+_0x3a73a8,_0x49bf60=_0x31eed6['padStart'](_0x41d0e5),_0x487dc9=a55_0x169b33[_0x154d82(0x2df)](_0x49bf60);_0x17f56a['push'](_0x487dc9+'\x20'+_0xe2f0e3);for(const _0x2f8b9f of _0x1ec22c){_0x17f56a[_0x154d82(0x1f4)](renderTaskRow(_0x2f8b9f,_0x448902,_0xf8149f,_0x3a73a8));}const _0x1a4bbd=calculateStats(_0x1ec22c);_0x17f56a[_0x154d82(0x1f4)](formatStats(_0x1a4bbd)),_0x35296d&&_0x17f56a['push'](a55_0x169b33[_0x154d82(0x22d)](_0x154d82(0x356)+TIMELINE_CONFIG[_0x154d82(0x2be)]+_0x154d82(0x277)+_0x365c06+_0x154d82(0x364))),_0x17f56a[_0x154d82(0x1f4)](''),_0x17f56a['push'](a55_0x169b33['dim'](_0x154d82(0x2c8))+(_0x154d82(0x2d0)+_0x2c0d82['id']+'\x20logs')+a55_0x169b33['dim'](_0x154d82(0x399)));}else _0x17f56a[_0x154d82(0x1f4)](_0x154d82(0x315));return _0x17f56a[_0x154d82(0x342)]('\x0a');}[a55_0x51cda1(0x29d)](_0x43125a,_0x37037c){const _0x32bf12=a55_0x51cda1,_0x311f25=new Date(_0x43125a[_0x32bf12(0x1f5)])[_0x32bf12(0x336)](),_0x535c0e=_0x43125a[_0x32bf12(0x20b)]?new Date(_0x43125a[_0x32bf12(0x20b)])['getTime']():Date[_0x32bf12(0x245)](),_0x4b8a65=_0x535c0e-_0x311f25,_0x14622a=[];for(const _0x22bf64 of _0x37037c){if(_0x22bf64[_0x32bf12(0x2c9)]){const _0xf689c3=new Date(_0x22bf64[_0x32bf12(0x2c9)])[_0x32bf12(0x336)](),_0x6544bd=_0x22bf64['updatedAt']?new Date(_0x22bf64[_0x32bf12(0x361)])[_0x32bf12(0x336)]():Date[_0x32bf12(0x245)]();_0x14622a['push']({'name':_0x22bf64[_0x32bf12(0x240)],'state':_0x22bf64['state']||'unknown','window':{'start':_0xf689c3,'end':_0x6544bd,'duration':_0x6544bd-_0xf689c3}});}else _0x14622a[_0x32bf12(0x1f4)]({'name':_0x22bf64[_0x32bf12(0x240)],'state':_0x22bf64[_0x32bf12(0x27e)]||'planned','window':undefined});}const _0x2808bc=calculateStats(_0x14622a);return{'attempt':{'id':_0x43125a['id'],'status':_0x43125a[_0x32bf12(0x376)]?_0x43125a[_0x32bf12(0x271)]?_0x32bf12(0x271):_0x32bf12(0x1f9):_0x32bf12(0x36c),'createdAt':_0x43125a[_0x32bf12(0x1f5)],'finishedAt':_0x43125a[_0x32bf12(0x20b)],'duration_ms':_0x4b8a65},'tasks':_0x14622a[_0x32bf12(0x2cc)](_0x24471d=>({'name':_0x24471d[_0x32bf12(0x2d2)],'state':_0x24471d['state'],'startedAt':_0x24471d[_0x32bf12(0x2bd)]?new Date(_0x24471d[_0x32bf12(0x2bd)]['start'])[_0x32bf12(0x2a4)]():null,'updatedAt':_0x24471d[_0x32bf12(0x2bd)]?new Date(_0x24471d[_0x32bf12(0x2bd)][_0x32bf12(0x2ff)])[_0x32bf12(0x2a4)]():null,'duration_ms':_0x24471d[_0x32bf12(0x2bd)]?.[_0x32bf12(0x39c)]||null})),'stats':_0x2808bc};}}
|
|
1
|
+
const a55_0x12a07c=a55_0x9a77;(function(_0x194de4,_0x3cfd62){const _0x4534a4=a55_0x9a77,_0x52f169=_0x194de4();while(!![]){try{const _0xe295fb=-parseInt(_0x4534a4(0x1d0))/0x1+-parseInt(_0x4534a4(0x223))/0x2+parseInt(_0x4534a4(0x152))/0x3+parseInt(_0x4534a4(0x195))/0x4*(parseInt(_0x4534a4(0x29d))/0x5)+parseInt(_0x4534a4(0x2ae))/0x6+parseInt(_0x4534a4(0x1a8))/0x7+-parseInt(_0x4534a4(0x1fd))/0x8;if(_0xe295fb===_0x3cfd62)break;else _0x52f169['push'](_0x52f169['shift']());}catch(_0x3a154a){_0x52f169['push'](_0x52f169['shift']());}}}(a55_0x2b68,0x49615));import a55_0x14c788 from'chalk';import{existsSync}from'fs';import a55_0x1eacd5 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';function a55_0x9a77(_0x4ce74c,_0x450d62){_0x4ce74c=_0x4ce74c-0x126;const _0x2b6895=a55_0x2b68();let _0x9a77f4=_0x2b6895[_0x4ce74c];return _0x9a77f4;}import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a55_0x2ff8e5 from'prompts';function getAttemptStatusDisplay(_0x47cbec){const _0x3c93c1=a55_0x9a77;if(!_0x47cbec)return{'icon':'⏳','text':''};const {done:_0x17add6,success:_0x1a9a6f,cancelRequested:_0x51d5a7}=_0x47cbec;if(!_0x17add6)return _0x51d5a7?{'icon':'🛑','text':a55_0x14c788[_0x3c93c1(0x1cb)]('canceling')}:{'icon':'🔄','text':a55_0x14c788[_0x3c93c1(0x156)](_0x3c93c1(0x258))};if(_0x1a9a6f)return{'icon':'✅','text':a55_0x14c788[_0x3c93c1(0x266)](_0x3c93c1(0x1f4))};return{'icon':'❌','text':a55_0x14c788[_0x3c93c1(0x13b)]('error')};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0xf0e84c,_0x1aa1cd,_0x4567f3=0x0){const _0x318e46=a55_0x9a77;return _0xf0e84c[_0x4567f3]||_0x1aa1cd[_0x318e46(0x25e)];}[a55_0x12a07c(0x277)](_0x1c3c47,_0x3018b5,_0x336f13=0x0){const _0x489e73=a55_0x12a07c,_0x187e7c=this[_0x489e73(0x1b4)](_0x1c3c47,_0x3018b5,_0x336f13);if(!_0x187e7c)return console[_0x489e73(0x2a9)](a55_0x14c788[_0x489e73(0x13b)]('Error:'),_0x489e73(0x130)),console[_0x489e73(0x2a9)](a55_0x14c788[_0x489e73(0x246)](_0x489e73(0x262))),null;return _0x187e7c;}[a55_0x12a07c(0x1fc)](_0x21b225,_0x534f93){const _0x1186c6=a55_0x12a07c;if(_0x21b225[0x0]){const _0x2e8af6=_0x21b225[0x0][_0x1186c6(0x142)]('.');if(_0x2e8af6['length']===0x1)return{'projectName':_0x2e8af6[0x0],'workflowName':undefined};else return _0x2e8af6[_0x1186c6(0x263)]===0x2?{'projectName':_0x2e8af6[0x0],'workflowName':_0x2e8af6[0x1]}:(console[_0x1186c6(0x2a9)](a55_0x14c788[_0x1186c6(0x13b)]('Error:'),_0x1186c6(0x1c2)),null);}return{'projectName':_0x534f93[_0x1186c6(0x25e)],'workflowName':undefined};}[a55_0x12a07c(0x21b)](_0x281d23,_0x1c290f,_0x2e68d3=0x0){const _0x40a9e3=a55_0x12a07c;if(_0x281d23[_0x2e68d3])return _0x281d23[_0x2e68d3];if(_0x1c290f[_0x40a9e3(0x25e)]){const _0x380ad1=a55_0x1eacd5['join'](process['cwd'](),_0x40a9e3(0x1e4),_0x1c290f[_0x40a9e3(0x25e)]);if(existsSync(a55_0x1eacd5['join'](_0x380ad1,'tdx.json')))return _0x380ad1;}return undefined;}async['showWorkflowConsoleUrl'](_0x4e412a,_0x377383,_0xce9c0){const _0x450743=a55_0x12a07c;try{const _0x1094f5=await _0x4e412a['workflow'][_0x450743(0x1e4)](_0x377383,{'limit':0x1});if(_0x1094f5[_0x450743(0x263)]>0x0){const _0x5297bc=_0x1094f5[0x0]['id'],_0x439553=getWorkflowUrl(_0xce9c0,_0x5297bc);console[_0x450743(0x2a9)](_0x450743(0x211)+a55_0x14c788[_0x450743(0x294)](_0x439553));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x12a07c(0x1a1)]='workflow:use';['description']='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a55_0x12a07c(0x19e)](_0x34e5f6){const _0x459bb6=a55_0x12a07c,{options:_0x42e2e1,args:_0x67b907,tdx:_0xe26a90}=_0x34e5f6,_0x142be4=_0x67b907[0x0],_0x1a90bd=_0x42e2e1[_0x459bb6(0x26e)];if(_0x1a90bd)return saveSessionContext({'workflow_project':undefined},_0x42e2e1['session']),console[_0x459bb6(0x185)](a55_0x14c788[_0x459bb6(0x266)](_0x459bb6(0x1e8))),0x0;if(!_0x142be4)return console[_0x459bb6(0x2a9)](a55_0x14c788[_0x459bb6(0x13b)](_0x459bb6(0x2a8)),_0x459bb6(0x130)),console['error'](a55_0x14c788[_0x459bb6(0x246)](_0x459bb6(0x1c8))),console[_0x459bb6(0x2a9)](a55_0x14c788[_0x459bb6(0x246)](_0x459bb6(0x199))),0x1;const _0x4dce96=await withSpinner('Resolving\x20project\x20\x27'+_0x142be4+'\x27...',()=>_0xe26a90['workflow'][_0x459bb6(0x179)](_0x142be4),{'verbose':_0x42e2e1['verbose']}),{name:_0x556a7b}=_0x4dce96[_0x459bb6(0x241)];return saveSessionContext({'workflow_project':_0x556a7b},_0x42e2e1[_0x459bb6(0x178)]),console[_0x459bb6(0x185)](a55_0x14c788['green']('✔\x20Workflow\x20project\x20set\x20to:\x20'+a55_0x14c788[_0x459bb6(0x294)](_0x556a7b))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x12a07c(0x1a1)]='workflow:projects';[a55_0x12a07c(0x269)]=a55_0x12a07c(0x27c);async['execute'](_0xf0940a){const _0x2c54ee=a55_0x12a07c,{options:_0x285665,args:_0xdac5e8,tdx:_0x2085b0}=_0xf0940a,_0x1001b6=_0xdac5e8[0x0];_0x285665[_0x2c54ee(0x13d)]&&_0x1001b6&&console[_0x2c54ee(0x2a9)](_0x2c54ee(0x158)+_0x1001b6);const _0x2da105=await withSpinner(_0x2c54ee(0x14a),()=>_0x2085b0[_0x2c54ee(0x20c)][_0x2c54ee(0x163)](_0x1001b6,{'limit':_0x285665[_0x2c54ee(0x21a)]}),{'verbose':_0x285665['verbose']});let _0x4eaf60=_0x2da105['data'];_0x4eaf60[_0x2c54ee(0x1ea)]((_0x456933,_0x5bb46f)=>_0x456933[_0x2c54ee(0x1a1)][_0x2c54ee(0x1d2)](_0x5bb46f[_0x2c54ee(0x1a1)]));const _0x4cc330=_0x285665['limit']||0x64,_0x1ac1f8=_0x4eaf60[_0x2c54ee(0x263)]>=_0x4cc330?a55_0x14c788[_0x2c54ee(0x246)](_0x2c54ee(0x1cd)):'';console[_0x2c54ee(0x2a9)](_0x2c54ee(0x198)+_0x4eaf60[_0x2c54ee(0x263)]+_0x2c54ee(0x2bf)+(_0x4eaf60['length']!==0x1?'s':'')+_0x1ac1f8);if(_0x285665[_0x2c54ee(0x2a4)]===_0x2c54ee(0x237)||_0x285665[_0x2c54ee(0x2a4)]==='jsonl'||_0x285665[_0x2c54ee(0x2a4)]===_0x2c54ee(0x25c))await handleSDKOutput(_0x4eaf60,_0x285665);else{if(_0x4eaf60['length']===0x0)_0x1001b6?console[_0x2c54ee(0x185)](_0x2c54ee(0x1a9)+_0x1001b6):console[_0x2c54ee(0x185)](_0x2c54ee(0x28a));else{const _0x53a163=_0x4eaf60[_0x2c54ee(0x23e)](_0x28e5d5=>{const _0x3ad724=_0x2c54ee,_0x148963=_0x28e5d5['metadata']?.[_0x3ad724(0x16b)](_0x581f0a=>_0x581f0a['key']===_0x3ad724(0x283)),_0xf492cf=_0x148963?a55_0x14c788['dim'](_0x3ad724(0x1c3)):'';return _0x3ad724(0x12b)+_0x28e5d5[_0x3ad724(0x1a1)]+_0xf492cf;});await writeOutput(_0x53a163[_0x2c54ee(0x14f)]('\x0a'),_0x285665[_0x2c54ee(0x160)],_0x2c54ee(0x18c));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x12a07c(0x1a1)]='workflow:workflows';[a55_0x12a07c(0x269)]=a55_0x12a07c(0x1ce);async[a55_0x12a07c(0x19e)](_0x3e5e23){const _0x3b4288=a55_0x12a07c,{options:_0x3135a7,args:_0x2abb1b,tdx:_0x48b256}=_0x3e5e23,_0x450eef=this[_0x3b4288(0x1b4)](_0x2abb1b,_0x3135a7);_0x3135a7['verbose']&&_0x450eef&&console['error'](_0x3b4288(0x1f1)+_0x450eef);const _0x4ef249=await withSpinner(_0x3b4288(0x140),()=>_0x48b256['workflow'][_0x3b4288(0x1e4)](_0x450eef,{'limit':_0x3135a7[_0x3b4288(0x21a)]}),{'verbose':_0x3135a7[_0x3b4288(0x13d)]});let _0x140709=_0x4ef249[_0x3b4288(0x241)];_0x140709[_0x3b4288(0x1ea)]((_0x425ba0,_0x48120e)=>{const _0x1ce57b=_0x3b4288,_0x2e35cc=_0x425ba0[_0x1ce57b(0x1a1)][_0x1ce57b(0x1d2)](_0x48120e[_0x1ce57b(0x1a1)]);if(_0x2e35cc!==0x0)return _0x2e35cc;return(_0x425ba0[_0x1ce57b(0x19a)]?.[_0x1ce57b(0x1a1)]||'')[_0x1ce57b(0x1d2)](_0x48120e[_0x1ce57b(0x19a)]?.[_0x1ce57b(0x1a1)]||'');});const _0x51ef6f=_0x3135a7[_0x3b4288(0x21a)]||0x64,_0x4aca8f=_0x140709[_0x3b4288(0x263)]>=_0x51ef6f?a55_0x14c788[_0x3b4288(0x246)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error']('✔\x20Found\x20'+_0x140709[_0x3b4288(0x263)]+_0x3b4288(0x15f)+(_0x140709[_0x3b4288(0x263)]!==0x1?'s':'')+_0x4aca8f);if(_0x3135a7[_0x3b4288(0x2a4)]===_0x3b4288(0x237)||_0x3135a7[_0x3b4288(0x2a4)]==='jsonl'||_0x3135a7[_0x3b4288(0x2a4)]===_0x3b4288(0x25c))await handleSDKOutput(_0x140709,_0x3135a7);else{if(_0x140709['length']===0x0)_0x450eef?console['log'](_0x3b4288(0x2a7)+_0x450eef):console[_0x3b4288(0x185)](_0x3b4288(0x29f));else{const _0x50733=_0x3135a7[_0x3b4288(0x1c9)],_0x405e1b=_0x140709[_0x3b4288(0x23e)](_0x228502=>{const _0x29916a=_0x3b4288,_0x265502=a55_0x14c788[_0x29916a(0x246)]('#'+_0x228502['id']),_0x2ee00b=hyperlink(_0x265502,getWorkflowUrl(_0x50733,_0x228502['id'])),_0x5e0362=_0x228502[_0x29916a(0x19a)]?.[_0x29916a(0x1a1)]?a55_0x14c788[_0x29916a(0x246)]('\x20('+_0x228502['project'][_0x29916a(0x1a1)]+')'):'';return _0x29916a(0x265)+_0x2ee00b+'\x20'+_0x228502[_0x29916a(0x1a1)]+_0x5e0362;});await writeOutput(_0x405e1b[_0x3b4288(0x14f)]('\x0a'),_0x3135a7[_0x3b4288(0x160)],_0x3b4288(0x18c));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x12a07c(0x1a1)]='workflow:sessions';['description']=a55_0x12a07c(0x19f);async[a55_0x12a07c(0x19e)](_0x3c335a){const _0x4e9f6c=a55_0x12a07c,{options:_0x148c8a,args:_0x2b719a,tdx:_0x255300}=_0x3c335a,_0x132ceb=this['parseProjectWorkflowPattern'](_0x2b719a,_0x148c8a);if(!_0x132ceb)return 0x1;const {projectName:_0x1c661e,workflowName:_0x1e1a88}=_0x132ceb;if(_0x148c8a[_0x4e9f6c(0x13d)]){if(_0x1c661e&&_0x1e1a88)console[_0x4e9f6c(0x2a9)](_0x4e9f6c(0x1f7)+_0x1c661e+'.'+_0x1e1a88);else _0x1c661e&&console['error']('Filter:\x20project='+_0x1c661e);const _0x2e1ec6=_0x148c8a[_0x4e9f6c(0x143)];_0x2e1ec6&&console[_0x4e9f6c(0x2a9)](_0x4e9f6c(0x28c)+_0x2e1ec6);}let _0x3fc2e6=0x28;if(process[_0x4e9f6c(0x129)]['isTTY']&&!_0x148c8a[_0x4e9f6c(0x160)]&&!_0x148c8a[_0x4e9f6c(0x2a4)]){const _0x3a8f85=process['stdout'][_0x4e9f6c(0x2aa)]||0x28;_0x3fc2e6=Math[_0x4e9f6c(0x296)](0x14,Math[_0x4e9f6c(0x270)](_0x3a8f85*0x2/0x3));}const _0x5a2940=_0x148c8a['limit']||_0x3fc2e6,_0x1b0d30=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x255300[_0x4e9f6c(0x20c)]['sessions']({'projectName':_0x1c661e,'workflowName':_0x1e1a88,'status':_0x148c8a[_0x4e9f6c(0x143)],'fromTime':_0x148c8a['from'],'toTime':_0x148c8a['to'],'limit':_0x5a2940}),{'verbose':_0x148c8a[_0x4e9f6c(0x13d)]}),_0x175aef=_0x1b0d30[_0x4e9f6c(0x241)];_0x175aef[_0x4e9f6c(0x1ea)]((_0x3869b5,_0xf91826)=>{const _0x2539be=_0x4e9f6c,_0x1f4740=_0x3869b5[_0x2539be(0x1e1)]||'',_0xcfccbd=_0xf91826[_0x2539be(0x1e1)]||'';return _0xcfccbd[_0x2539be(0x1d2)](_0x1f4740);});_0x175aef[_0x4e9f6c(0x263)]>=_0x5a2940?console[_0x4e9f6c(0x2a9)](_0x4e9f6c(0x18e)+_0x175aef['length']+_0x4e9f6c(0x167)+a55_0x14c788['dim']('(use\x20--limit\x20to\x20see\x20more)')):console[_0x4e9f6c(0x2a9)](_0x4e9f6c(0x198)+_0x175aef[_0x4e9f6c(0x263)]+_0x4e9f6c(0x1b6)+(_0x175aef[_0x4e9f6c(0x263)]!==0x1?'s':''));if(_0x148c8a[_0x4e9f6c(0x2a4)]===_0x4e9f6c(0x237)||_0x148c8a[_0x4e9f6c(0x2a4)]==='jsonl'||_0x148c8a['format']==='table')await handleSDKOutput(_0x175aef,_0x148c8a);else{if(!process[_0x4e9f6c(0x129)][_0x4e9f6c(0x226)]||_0x148c8a[_0x4e9f6c(0x160)]){if(_0x175aef[_0x4e9f6c(0x263)]===0x0){if(_0x1c661e&&_0x1e1a88)console[_0x4e9f6c(0x185)](_0x4e9f6c(0x22d)+_0x1c661e+'.'+_0x1e1a88);else _0x1c661e?console[_0x4e9f6c(0x185)](_0x4e9f6c(0x23c)+_0x1c661e):console[_0x4e9f6c(0x185)](_0x4e9f6c(0x298));}else{const _0x2497aa=_0x148c8a[_0x4e9f6c(0x1c9)],_0x1ad073=this['renderSessionsTimeline'](_0x175aef,_0x2497aa);_0x148c8a[_0x4e9f6c(0x160)]?await writeOutput(_0x1ad073,_0x148c8a[_0x4e9f6c(0x160)],_0x4e9f6c(0x18c)):console[_0x4e9f6c(0x185)](_0x1ad073);}!_0x1c661e&&(console[_0x4e9f6c(0x2a9)](''),console[_0x4e9f6c(0x2a9)](a55_0x14c788[_0x4e9f6c(0x246)](_0x4e9f6c(0x16d))),console[_0x4e9f6c(0x2a9)](a55_0x14c788['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a55_0x14c788['dim'](_0x4e9f6c(0x252))));}else{if(_0x175aef[_0x4e9f6c(0x263)]===0x0){if(_0x1c661e&&_0x1e1a88)console['log'](_0x4e9f6c(0x22d)+_0x1c661e+'.'+_0x1e1a88);else _0x1c661e?console[_0x4e9f6c(0x185)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x1c661e):console[_0x4e9f6c(0x185)](_0x4e9f6c(0x298));}else await this[_0x4e9f6c(0x2b1)](_0x175aef,_0x3c335a,_0x1c661e);}}return 0x0;}['renderSessionsTimeline'](_0x88db8f,_0x297d6f){const _0x507f41=a55_0x12a07c,_0x2020a6=[],_0xaa3cd4=new Map();let _0x6fbc25=Infinity,_0x38979e=-Infinity;for(const _0x3e873f of _0x88db8f){if(_0x3e873f['lastAttempt']?.['createdAt']){const _0x36e22a=new Date(_0x3e873f[_0x507f41(0x192)][_0x507f41(0x1c1)])['getTime'](),_0x1b7647=_0x3e873f[_0x507f41(0x192)][_0x507f41(0x189)]?new Date(_0x3e873f[_0x507f41(0x192)]['finishedAt'])['getTime']():Date[_0x507f41(0x282)](),_0x192565=_0x3e873f[_0x507f41(0x19a)]?.[_0x507f41(0x1a1)]||_0x507f41(0x297);!_0xaa3cd4[_0x507f41(0x13f)](_0x192565)&&_0xaa3cd4[_0x507f41(0x220)](_0x192565,[]),_0xaa3cd4[_0x507f41(0x2b8)](_0x192565)[_0x507f41(0x27e)]({'session':_0x3e873f,'startTime':_0x36e22a,'endTime':_0x1b7647,'duration':_0x1b7647-_0x36e22a}),_0x6fbc25=Math['min'](_0x6fbc25,_0x36e22a),_0x38979e=Math[_0x507f41(0x296)](_0x38979e,_0x1b7647);}}if(_0xaa3cd4['size']===0x0)return _0x507f41(0x184);const _0x39cb62=process[_0x507f41(0x129)][_0x507f41(0x279)]||0x78,_0x267499=0x1e,_0x2bac0c=0x32,_0x1c9919=0x4,_0x6cc869=Math[_0x507f41(0x22e)](_0x2bac0c,Math[_0x507f41(0x296)](_0x267499,Math[_0x507f41(0x270)](_0x39cb62*0.3))),_0x3ddccb=_0x39cb62-_0x6cc869-TIMELINE_CONFIG[_0x507f41(0x141)]-0x3-_0x1c9919,_0x5a8882=_0x38979e-_0x6fbc25,_0x5c096b=_0x5a8882/_0x6cc869,_0x2a0ebd=renderTimeAxis({'startTime':_0x6fbc25,'endTime':_0x38979e,'durationMs':_0x5a8882,'msPerChar':_0x5c096b},_0x6cc869),_0x5069dc=[];for(const _0x4c3cc0 of _0xaa3cd4[_0x507f41(0x22f)]()){_0x5069dc['push'](..._0x4c3cc0);}_0x5069dc['sort']((_0x4146e0,_0x4d5d64)=>_0x4d5d64['startTime']-_0x4146e0['startTime']);const _0x59e758=new Date(_0x6fbc25),_0x574cac=formatDate(_0x59e758),_0x5273d7=_0x1c9919+TIMELINE_CONFIG[_0x507f41(0x1e2)]+TIMELINE_CONFIG[_0x507f41(0x19c)]+_0x3ddccb,_0x1dbb53='\x20'[_0x507f41(0x1f8)](_0x5273d7-_0x574cac['length']),_0x51e2e3=_0x1dbb53+a55_0x14c788[_0x507f41(0x246)](_0x574cac)+'\x20'+_0x2a0ebd;_0x2020a6[_0x507f41(0x27e)](_0x51e2e3);const _0x20d475=0x16;let _0x3c533b=0x0;for(const _0x4c5466 of _0x5069dc){const _0x3d2487=_0x4c5466[_0x507f41(0x178)][_0x507f41(0x19a)]?.['name']||'?',_0x1a6c85=Math[_0x507f41(0x22e)](stringWidth(_0x3d2487),_0x20d475);_0x3c533b=Math[_0x507f41(0x296)](_0x3c533b,_0x1a6c85);}for(const _0x4ee142 of _0x5069dc){const {session:_0x42bc78,startTime:_0x37b94b,endTime:_0x30602a,duration:_0x46855c}=_0x4ee142,_0x17f000=_0x42bc78[_0x507f41(0x19a)]?.['id'],_0x31fa48=_0x42bc78['id'],_0xf79291=_0x42bc78[_0x507f41(0x19a)]?.[_0x507f41(0x1a1)]||'?',_0x4860a8=_0x42bc78[_0x507f41(0x20c)]?.[_0x507f41(0x1a1)]||'?';let _0x3771cc,_0x1bea9c;if(_0x42bc78[_0x507f41(0x192)]){const _0xc4b04b=_0x42bc78[_0x507f41(0x192)];!_0xc4b04b[_0x507f41(0x20a)]?(_0x3771cc=_0xc4b04b[_0x507f41(0x145)]?'🛑':'🔄',_0x1bea9c=_0xc4b04b[_0x507f41(0x145)]?a55_0x14c788[_0x507f41(0x1cb)]:a55_0x14c788[_0x507f41(0x156)]):(_0x3771cc=_0xc4b04b[_0x507f41(0x1f4)]?'✅':'❌',_0x1bea9c=_0xc4b04b[_0x507f41(0x1f4)]?a55_0x14c788[_0x507f41(0x266)]:a55_0x14c788['red']);}else _0x3771cc='⏳',_0x1bea9c=a55_0x14c788[_0x507f41(0x246)];const _0x4eb20d='#'+_0x31fa48,_0x30858e=_0x17f000?hyperlink(_0x4eb20d,getWorkflowSessionUrl(_0x297d6f,_0x17f000,_0x31fa48)):_0x4eb20d;let _0x13c989=_0xf79291;stringWidth(_0xf79291)>_0x20d475&&(_0x13c989=_0xf79291[_0x507f41(0x14d)](0x0,_0x20d475-0x1)+'…');const _0x394c31=a55_0x14c788['dim'](_0x13c989),_0x1ae667=stringWidth(_0x13c989),_0x1055a5='\x20'[_0x507f41(0x1f8)](_0x3c533b-stringWidth(_0x13c989)+0x2),_0x55bc19='('+formatElapsed(_0x46855c)+')',_0x26c0b6=stringWidth(_0x55bc19),_0x13fbe6=stringWidth(_0x4eb20d),_0x152124=_0x13fbe6+0x1+_0x1ae667+_0x1055a5[_0x507f41(0x263)],_0x44e731=_0x3ddccb-_0x152124-_0x26c0b6-0x1-0x8;let _0x2a8371=_0x4860a8;stringWidth(_0x2a8371)>_0x44e731&&(_0x2a8371=_0x2a8371[_0x507f41(0x14d)](0x0,_0x44e731-0x1)+'…');const _0x2d9a39=_0x30858e+'\x20'+_0x394c31+_0x1055a5+_0x2a8371,_0x1f9d21=stringWidth(_0x2d9a39),_0x27f82c=_0x3ddccb-_0x1f9d21-_0x26c0b6,_0x10f1f4=_0x2d9a39+'\x20'['repeat'](Math[_0x507f41(0x296)](0x1,_0x27f82c))+a55_0x14c788[_0x507f41(0x246)](_0x55bc19),_0x14d4bd=Math['floor']((_0x37b94b-_0x6fbc25)/_0x5c096b),_0x2a12b7=Math[_0x507f41(0x270)]((_0x30602a-_0x6fbc25)/_0x5c096b),_0x372ab3=Math[_0x507f41(0x296)](_0x14d4bd+0x1,_0x2a12b7),_0x731ff6=new Array(_0x6cc869)[_0x507f41(0x23a)]('\x20');for(let _0x10b38d=_0x14d4bd;_0x10b38d<Math[_0x507f41(0x22e)](_0x372ab3,_0x6cc869);_0x10b38d++){_0x731ff6[_0x10b38d]='─';}const _0xb73e14=_0x731ff6[_0x507f41(0x23e)](_0x8409c6=>_0x8409c6==='\x20'?'\x20':_0x1bea9c(_0x8409c6))['join']('');_0x2020a6[_0x507f41(0x27e)](_0x3771cc+'\x20'+_0x10f1f4+'│'+_0xb73e14+'│');}return _0x2020a6[_0x507f41(0x14f)]('\x0a');}async[a55_0x12a07c(0x2b1)](_0x329396,_0x549c0f,_0x1bc433){const _0x79f58a=a55_0x12a07c,{options:_0x1355ca,tdx:_0x77c8f2}=_0x549c0f,_0x1f2803=_0x1355ca[_0x79f58a(0x1c9)],{timelineRows:_0x3f50ad,timeAxisHeader:_0x7f17a0}=this[_0x79f58a(0x1b1)](_0x329396,_0x1f2803),_0x29ece6=_0x3f50ad['filter'](_0x111320=>_0x111320[_0x79f58a(0x1f2)]);if(_0x29ece6[_0x79f58a(0x263)]===0x0){const _0x198e85=this['renderSessionsTimeline'](_0x329396,_0x1f2803);console[_0x79f58a(0x185)](_0x198e85);!_0x1bc433&&(console[_0x79f58a(0x2a9)](''),console[_0x79f58a(0x2a9)](a55_0x14c788['dim'](_0x79f58a(0x16d))),console[_0x79f58a(0x2a9)](a55_0x14c788[_0x79f58a(0x246)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a55_0x14c788[_0x79f58a(0x246)](_0x79f58a(0x252))));return;}_0x7f17a0&&console[_0x79f58a(0x185)](_0x7f17a0);const _0x2504a6=_0x3f50ad[_0x79f58a(0x248)](_0x4260eb=>_0x4260eb[_0x79f58a(0x1f2)])['map'](_0xb61914=>({'title':_0xb61914[_0x79f58a(0x193)],'value':_0xb61914[_0x79f58a(0x1f2)]})),_0x8ceb40=process[_0x79f58a(0x129)][_0x79f58a(0x2aa)]||0x3c,_0x2bda0a=Math[_0x79f58a(0x296)](0x28,Math[_0x79f58a(0x270)](_0x8ceb40*0x2/0x3)),_0x743464=await a55_0x2ff8e5({'type':_0x79f58a(0x154),'name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x2504a6,'initial':-0x1,'limit':_0x2bda0a,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x5bef13,_0x291d5c)=>{const _0x5abbb2=_0x79f58a;if(!_0x5bef13)return Promise[_0x5abbb2(0x227)](_0x291d5c);const _0x1557c3=_0x291d5c['filter'](_0x1c0ad8=>{const _0x1eb6bf=_0x5abbb2,_0x2d66bb=_0x1c0ad8;return _0x2d66bb[_0x1eb6bf(0x208)]['toLowerCase']()[_0x1eb6bf(0x28f)](_0x5bef13[_0x1eb6bf(0x1af)]());});return Promise['resolve'](_0x1557c3);}}),_0x5993b1=()=>{const _0x33e446=_0x79f58a;process[_0x33e446(0x129)]['write'](_0x33e446(0x1fa)),process['stdout'][_0x33e446(0x188)]('\x1b[1A\x1b[2K'),process[_0x33e446(0x129)][_0x33e446(0x188)]('\x1b[1A\x1b[2K');},_0x192186=_0x743464&&_0x743464[_0x79f58a(0x1f2)]&&_0x743464[_0x79f58a(0x1f2)]!==null&&_0x743464['attemptId'][_0x79f58a(0x155)]()!=='';if(!_0x192186){_0x5993b1(),console[_0x79f58a(0x185)](a55_0x14c788[_0x79f58a(0x246)](_0x79f58a(0x26f)));return;}_0x5993b1();const _0x58d825=_0x329396[_0x79f58a(0x21f)](_0x2b919f=>_0x2b919f['lastAttempt']?.['id']===_0x743464[_0x79f58a(0x1f2)]);if(_0x58d825){const _0x56ac0e=_0x58d825[_0x79f58a(0x19a)]?.[_0x79f58a(0x1a1)]||'?',_0x3d7da5=_0x58d825['workflow']?.[_0x79f58a(0x1a1)]||'?';console[_0x79f58a(0x185)]('Project:\x20'+a55_0x14c788['dim'](_0x56ac0e)+',\x20Workflow:\x20'+a55_0x14c788['dim'](_0x3d7da5));}const _0x64e96c=new WorkflowTimelineCommand();await _0x64e96c[_0x79f58a(0x19e)]({'args':[],'options':{..._0x1355ca,'attemptId':_0x743464['attemptId']},'tdx':_0x77c8f2});}['generateSessionTimelineRows'](_0x437628,_0x22bf63){const _0x434a66=a55_0x12a07c,_0x36ccdd=new Map();for(const _0x192d56 of _0x437628){_0x192d56['id']&&_0x192d56[_0x434a66(0x192)]?.['id']&&_0x36ccdd['set'](_0x192d56['id'],_0x192d56[_0x434a66(0x192)]['id']);}const _0x576783=[];let _0x4797cc='';const _0x2fc3ef=this[_0x434a66(0x26c)](_0x437628,_0x22bf63),_0x43d50c=_0x2fc3ef[_0x434a66(0x142)]('\x0a');for(const _0x35bfd5 of _0x43d50c){if(_0x35bfd5[_0x434a66(0x1de)](_0x434a66(0x144))||_0x35bfd5[_0x434a66(0x1bc)](/^\s+\d{4}-\d{2}-\d{2}/))_0x4797cc=_0x35bfd5;else{if(_0x35bfd5[_0x434a66(0x1bc)](/^[✅❌🔄🛑⏳]/)){const _0x423f5c=_0x35bfd5[_0x434a66(0x1bc)](/#(\d+)/),_0x44ce1f=_0x423f5c?_0x423f5c[0x1]:null,_0x526172=_0x44ce1f?_0x36ccdd['get'](_0x44ce1f)||null:null,_0x2521fc=_0x437628[_0x434a66(0x21f)](_0x39074a=>_0x39074a['id']===_0x44ce1f),_0xfdad7b=_0x2521fc?.[_0x434a66(0x19a)]?.[_0x434a66(0x1a1)]||'';_0x576783[_0x434a66(0x27e)]({'displayLine':_0x35bfd5,'attemptId':_0x526172,'projectName':_0xfdad7b});}}}return{'timelineRows':_0x576783,'timeAxisHeader':_0x4797cc};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x12a07c(0x1a1)]='workflow:attempts';[a55_0x12a07c(0x269)]=a55_0x12a07c(0x2bc);async[a55_0x12a07c(0x19e)](_0x433e30){const _0x2d3ffc=a55_0x12a07c,{options:_0x3681f8,args:_0x1287ce,tdx:_0x4a4534}=_0x433e30,_0x48be12=this['parseProjectWorkflowPattern'](_0x1287ce,_0x3681f8);if(!_0x48be12)return 0x1;const {projectName:_0xdca51d,workflowName:_0x41be08}=_0x48be12,_0x181c51=_0x3681f8['includeRetried'];if(_0x3681f8[_0x2d3ffc(0x13d)]){if(_0xdca51d&&_0x41be08)console[_0x2d3ffc(0x2a9)]('Filter:\x20'+_0xdca51d+'.'+_0x41be08);else _0xdca51d&&console[_0x2d3ffc(0x2a9)](_0x2d3ffc(0x12d)+_0xdca51d);_0x181c51&&console[_0x2d3ffc(0x2a9)]('Include\x20retried:\x20yes');}const _0xe99dea=await withSpinner(_0x2d3ffc(0x2b7),()=>_0x4a4534[_0x2d3ffc(0x20c)][_0x2d3ffc(0x190)]({'projectName':_0xdca51d,'workflowName':_0x41be08,'includeRetried':_0x181c51,'limit':_0x3681f8['limit']}),{'verbose':_0x3681f8[_0x2d3ffc(0x13d)]}),_0x48ae3a=_0xe99dea[_0x2d3ffc(0x241)],_0x32d771=_0x3681f8[_0x2d3ffc(0x21a)]||0x64,_0x4a98e9=_0x48ae3a[_0x2d3ffc(0x263)]>=_0x32d771?a55_0x14c788[_0x2d3ffc(0x246)](_0x2d3ffc(0x1cd)):'';console[_0x2d3ffc(0x2a9)]('✔\x20Found\x20'+_0x48ae3a[_0x2d3ffc(0x263)]+_0x2d3ffc(0x285)+(_0x48ae3a['length']!==0x1?'s':'')+_0x4a98e9);if(_0x3681f8['format']===_0x2d3ffc(0x237)||_0x3681f8['format']==='jsonl'||_0x3681f8[_0x2d3ffc(0x2a4)]==='table')await handleSDKOutput(_0x48ae3a,_0x3681f8);else{if(_0x48ae3a['length']===0x0){if(_0xdca51d&&_0x41be08)console[_0x2d3ffc(0x185)](_0x2d3ffc(0x276)+_0xdca51d+'.'+_0x41be08);else _0xdca51d?console['log'](_0x2d3ffc(0x183)+_0xdca51d):console['log']('No\x20attempts\x20found');}else{const _0x1b2d55=_0x3681f8['site'],_0x4ee262=_0x48ae3a[_0x2d3ffc(0x23e)](_0x518e1b=>{const _0x32ad34=_0x2d3ffc,_0x2f049f=a55_0x14c788[_0x32ad34(0x246)]('#'+_0x518e1b['id']),_0x378342=_0x518e1b[_0x32ad34(0x19a)]?.['id'],_0x172bb1=_0x518e1b[_0x32ad34(0x212)]||_0x518e1b[_0x32ad34(0x135)],_0x42fb2b=_0x378342&&_0x172bb1?hyperlink(_0x2f049f,getWorkflowAttemptUrl(_0x1b2d55,_0x378342,_0x172bb1,_0x518e1b['id'])):_0x2f049f,{icon:_0x2caa61,text:_0x57b43d}=getAttemptStatusDisplay(_0x518e1b),_0x8ce655=(_0x518e1b[_0x32ad34(0x19a)]?.[_0x32ad34(0x1a1)]||'?')+'.'+(_0x518e1b[_0x32ad34(0x20c)]?.[_0x32ad34(0x1a1)]||'?'),_0x236c24=_0x518e1b[_0x32ad34(0x1e1)]?a55_0x14c788[_0x32ad34(0x246)](_0x518e1b[_0x32ad34(0x1e1)]):'';return(_0x42fb2b+'\x20'+_0x2caa61+(_0x57b43d?'\x20'+_0x57b43d:'')+'\x20'+_0x8ce655+'\x20'+_0x236c24)['trimEnd']();});await writeOutput(_0x4ee262[_0x2d3ffc(0x14f)]('\x0a'),_0x3681f8['output'],_0x2d3ffc(0x18c));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a55_0x12a07c(0x269)]='Show\x20specific\x20attempt\x20details';async[a55_0x12a07c(0x19e)](_0x42f4ad){const _0x25a074=a55_0x12a07c,{options:_0x39fb2e,args:_0x40a77f,tdx:_0x4d20f4}=_0x42f4ad,_0x4e1bf9=_0x40a77f[0x0];if(!_0x4e1bf9)return console[_0x25a074(0x2a9)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x39fb2e['verbose']&&console['error']('Attempt\x20ID:\x20'+_0x4e1bf9);const _0x1affc8=await withSpinner(_0x25a074(0x29c),()=>_0x4d20f4['workflow']['attempt'](_0x4e1bf9),{'verbose':_0x39fb2e['verbose']}),_0xee6144=_0x1affc8[_0x25a074(0x241)];let _0x3c271e;!_0xee6144[_0x25a074(0x20a)]?_0x3c271e=_0xee6144[_0x25a074(0x145)]?_0x25a074(0x1cf):_0x25a074(0x258):_0x3c271e=_0xee6144[_0x25a074(0x1f4)]?_0x25a074(0x1f4):_0x25a074(0x2a9);let _0x595872;if(_0xee6144['createdAt']&&_0xee6144[_0x25a074(0x189)]){const _0x521c5d=new Date(_0xee6144[_0x25a074(0x1c1)])[_0x25a074(0x18d)](),_0x31afd4=new Date(_0xee6144[_0x25a074(0x189)])[_0x25a074(0x18d)]();_0x595872=Math[_0x25a074(0x1f5)]((_0x31afd4-_0x521c5d)/0x3e8);}const _0x22107d={'attempt_id':_0xee6144['id'],'status':_0x3c271e,..._0xee6144[_0x25a074(0x1b5)]!==undefined&&{'index':_0xee6144[_0x25a074(0x1b5)]},..._0xee6144[_0x25a074(0x19a)]&&{'project':_0xee6144[_0x25a074(0x19a)]['name']},..._0xee6144[_0x25a074(0x20c)]&&{'workflow':_0xee6144[_0x25a074(0x20c)]['name']},..._0xee6144[_0x25a074(0x135)]&&{'session_id':_0xee6144[_0x25a074(0x135)]},..._0xee6144[_0x25a074(0x1e1)]&&{'session_time':_0xee6144['sessionTime']},..._0xee6144[_0x25a074(0x131)]&&{'retry_attempt':_0xee6144[_0x25a074(0x131)]},..._0x595872!==undefined&&{'duration_sec':_0x595872},..._0xee6144['createdAt']&&{'created_at':_0xee6144['createdAt']},..._0xee6144[_0x25a074(0x189)]&&{'finished_at':_0xee6144[_0x25a074(0x189)]},...Object[_0x25a074(0x27a)](_0xee6144['params'])[_0x25a074(0x263)]>0x0&&{'params':_0xee6144['params']}};return await handleSingleObjectOutput(_0x22107d,_0x39fb2e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x12a07c(0x1a1)]=a55_0x12a07c(0x235);[a55_0x12a07c(0x269)]=a55_0x12a07c(0x2a0);async[a55_0x12a07c(0x19e)](_0x1c7a25){const _0x4b3d5a=a55_0x12a07c,{options:_0x43d29d,args:_0x1edfad,tdx:_0xe5b0d1}=_0x1c7a25,_0x524c0b=_0x1edfad[0x0];if(!_0x524c0b)return console[_0x4b3d5a(0x2a9)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x267dbf=_0x43d29d['includeSubtasks'];_0x43d29d[_0x4b3d5a(0x13d)]&&(console['error']('Attempt\x20ID:\x20'+_0x524c0b),_0x267dbf&&console[_0x4b3d5a(0x2a9)](_0x4b3d5a(0x23f)));const _0xc3377a=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0xe5b0d1['workflow'][_0x4b3d5a(0x219)](_0x524c0b,_0x267dbf||![]),{'verbose':_0x43d29d['verbose']}),_0xacee95=_0xc3377a[_0x4b3d5a(0x241)];return console[_0x4b3d5a(0x2a9)](_0x4b3d5a(0x198)+_0xacee95['length']+_0x4b3d5a(0x1ab)+(_0xacee95[_0x4b3d5a(0x263)]!==0x1?'s':'')),await handleSDKOutput(_0xacee95,_0x43d29d),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x12a07c(0x1a1)]='workflow:logs';[a55_0x12a07c(0x269)]=a55_0x12a07c(0x13c);async['execute'](_0x3255de){const _0x13af32=a55_0x12a07c,{options:_0x42e8b8,args:_0x16e577,tdx:_0x531485}=_0x3255de,_0x17c6de=_0x16e577[0x0];let _0x91e70b=_0x16e577[0x1];if(!_0x17c6de)return console[_0x13af32(0x2a9)](_0x13af32(0x1df)),0x1;_0x42e8b8['verbose']&&(console[_0x13af32(0x2a9)](_0x13af32(0x1a7)+_0x17c6de),_0x91e70b&&console[_0x13af32(0x2a9)]('Task\x20name:\x20'+_0x91e70b));const _0xefdc1=await withSpinner(_0x13af32(0x187),()=>_0x531485[_0x13af32(0x20c)][_0x13af32(0x1ef)](_0x17c6de,_0x91e70b),{'verbose':_0x42e8b8[_0x13af32(0x13d)]}),_0x5a1048=_0xefdc1[_0x13af32(0x241)];if(_0x5a1048['length']===0x0)return console[_0x13af32(0x2a9)](_0x13af32(0x217)),0x0;if(!_0x91e70b&&(_0x42e8b8[_0x13af32(0x237)]||_0x42e8b8[_0x13af32(0x2a4)]))return await handleSDKOutput(_0x5a1048,_0x42e8b8),0x0;if(!_0x91e70b){const _0x405cd8=_0x5a1048['map'](_0x511f21=>({'title':_0x511f21[_0x13af32(0x19d)]+'\x20('+formatBytes(_0x511f21[_0x13af32(0x26d)])+')','value':_0x511f21[_0x13af32(0x19d)]})),_0x5ac8b1=await a55_0x2ff8e5({'type':_0x13af32(0x15a),'name':'task','message':_0x13af32(0x29e),'choices':_0x405cd8});if(!_0x5ac8b1['task'])return console['error']('Cancelled'),0x0;_0x91e70b=_0x5ac8b1[_0x13af32(0x1e7)];}const _0x19f5a1=await withSpinner(_0x13af32(0x1ac),()=>_0x531485[_0x13af32(0x20c)]['logs'](_0x17c6de,_0x91e70b),{'verbose':_0x42e8b8[_0x13af32(0x13d)]}),_0x4e4e1f=_0x19f5a1[_0x13af32(0x241)];return _0x4e4e1f?console[_0x13af32(0x185)](_0x4e4e1f):console[_0x13af32(0x2a9)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x12a07c(0x1a1)]='workflow:kill';[a55_0x12a07c(0x269)]=a55_0x12a07c(0x1b3);async['execute'](_0x489c37){const _0x863341=a55_0x12a07c,{options:_0x478764,args:_0x500f65,tdx:_0x41f2c1}=_0x489c37,_0x40a95b=_0x500f65[0x0];if(!_0x40a95b)return console[_0x863341(0x2a9)](_0x863341(0x1df)),0x1;const _0x25ff86=_0x478764[_0x863341(0x1bf)];_0x478764[_0x863341(0x13d)]&&(console[_0x863341(0x2a9)](_0x863341(0x1a7)+_0x40a95b),_0x25ff86&&console[_0x863341(0x2a9)]('Reason:\x20'+_0x25ff86));if(!_0x478764[_0x863341(0x281)]){if(!isInteractive())return console[_0x863341(0x2a9)](a55_0x14c788[_0x863341(0x13b)](_0x863341(0x17d)),_0x863341(0x161)),console['error'](a55_0x14c788[_0x863341(0x246)](_0x863341(0x18f))),0x1;const _0x3be087=await confirmKey(_0x863341(0x202)+_0x40a95b+'?');if(!_0x3be087)return console['error'](a55_0x14c788['yellow'](_0x863341(0x26f))),0x1;}const _0x55bd25=await withSpinner(_0x863341(0x17a),()=>_0x41f2c1[_0x863341(0x20c)][_0x863341(0x275)](_0x40a95b,_0x25ff86),{'verbose':_0x478764[_0x863341(0x13d)]}),_0x2dd3bb=_0x55bd25[_0x863341(0x241)];return console[_0x863341(0x2a9)]('✔\x20'+_0x2dd3bb),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']='workflow:retry';[a55_0x12a07c(0x269)]=a55_0x12a07c(0x20d);async[a55_0x12a07c(0x19e)](_0x11f4c2){const _0x427363=a55_0x12a07c,{options:_0x89e67b,args:_0x47a57f,tdx:_0x14de86}=_0x11f4c2,_0x1209e5=_0x47a57f[0x0];if(!_0x1209e5)return console[_0x427363(0x2a9)](_0x427363(0x291)),console[_0x427363(0x2a9)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x4b4def=![],_0x4e7604=_0x1209e5;if(_0x1209e5[_0x427363(0x1de)](_0x427363(0x206)))_0x4b4def=!![],_0x4e7604=_0x1209e5[_0x427363(0x1a3)](0x8);else{if(_0x1209e5['startsWith']('attempt:'))_0x4b4def=![],_0x4e7604=_0x1209e5[_0x427363(0x1a3)](0x8);else return console[_0x427363(0x2a9)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error'](_0x427363(0x1fb)),0x1;}const _0x5aa967=_0x89e67b[_0x427363(0x213)],_0x2e4e93=_0x89e67b[_0x427363(0x15b)],_0x59085a=_0x89e67b[_0x427363(0x2c3)],_0x5182c7=_0x89e67b[_0x427363(0x177)];_0x89e67b[_0x427363(0x13d)]&&(console[_0x427363(0x2a9)](_0x427363(0x172)+(_0x4b4def?_0x427363(0x178):'attempt')+'\x20'+_0x4e7604),_0x5aa967&&console['error'](_0x427363(0x28e)+_0x5aa967),_0x2e4e93&&console['error'](_0x427363(0x272)+_0x2e4e93),_0x59085a&&console[_0x427363(0x2a9)](_0x427363(0x267)+_0x59085a),_0x5182c7&&console[_0x427363(0x2a9)](_0x427363(0x1aa)));let _0x37bc78;if(_0x59085a)try{if(_0x59085a[_0x427363(0x1de)]('@')){const _0x5b2d85=await import('fs/promises'),_0x2af08d=_0x59085a[_0x427363(0x1a3)](0x1),_0x3dc083=await _0x5b2d85[_0x427363(0x132)](_0x2af08d,_0x427363(0x17f));_0x37bc78=JSON[_0x427363(0x29a)](_0x3dc083);}else _0x37bc78=JSON[_0x427363(0x29a)](_0x59085a);}catch{return console[_0x427363(0x2a9)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x89e67b[_0x427363(0x281)]){if(!isInteractive())return console[_0x427363(0x2a9)](a55_0x14c788['red'](_0x427363(0x17d)),_0x427363(0x161)),console[_0x427363(0x2a9)](a55_0x14c788[_0x427363(0x246)](_0x427363(0x18f))),0x1;const _0x3e6934=await confirmKey(_0x427363(0x1e3)+(_0x4b4def?'session':_0x427363(0x16f))+'\x20'+_0x4e7604+'?');if(!_0x3e6934)return console['error'](a55_0x14c788[_0x427363(0x1cb)](_0x427363(0x26f))),0x1;}let _0xc762ff;_0x4b4def?_0xc762ff=await withSpinner('Retrying\x20session...',()=>_0x14de86['workflow'][_0x427363(0x22a)](_0x4e7604,{'fromTask':_0x5aa967,'retryParams':_0x37bc78}),{'verbose':_0x89e67b[_0x427363(0x13d)]}):_0xc762ff=await withSpinner(_0x427363(0x1c6),()=>_0x14de86['workflow'][_0x427363(0x1ad)](_0x4e7604,{'resumeFrom':_0x2e4e93,'retryParams':_0x37bc78,'force':_0x5182c7}),{'verbose':_0x89e67b[_0x427363(0x13d)]});const _0x589896=_0xc762ff[_0x427363(0x241)];return console[_0x427363(0x2a9)]('✔\x20Retry\x20started'),console[_0x427363(0x2a9)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x589896[_0x427363(0x1f2)]),console['error']('\x20\x20Session\x20ID:\x20'+_0x589896['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x12a07c(0x1a1)]=a55_0x12a07c(0x24a);[a55_0x12a07c(0x269)]=a55_0x12a07c(0x194);async[a55_0x12a07c(0x19e)](_0x4f3e0d){const _0x377dd6=a55_0x12a07c,{options:_0x41b97b,args:_0xe3ba03,tdx:_0x276a2d}=_0x4f3e0d;let _0x429906=_0xe3ba03[0x0];if(!_0x429906){const _0x2360d1=this[_0x377dd6(0x1b4)]([],_0x41b97b),_0x3af57c=await withSpinner('Loading\x20workflows...',()=>_0x276a2d['workflow'][_0x377dd6(0x1e4)](_0x2360d1,{'limit':_0x41b97b[_0x377dd6(0x21a)]}),{'verbose':_0x41b97b[_0x377dd6(0x13d)]}),_0x1e935c=_0x3af57c[_0x377dd6(0x241)];if(_0x1e935c['length']===0x0)return console[_0x377dd6(0x2a9)]('No\x20workflows\x20found'),!_0x2360d1&&console[_0x377dd6(0x2a9)](a55_0x14c788[_0x377dd6(0x246)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0xd83e5d=_0x1e935c[_0x377dd6(0x23e)](_0x1775c8=>({'title':_0x1775c8[_0x377dd6(0x19a)]?.[_0x377dd6(0x1a1)]+'.'+_0x1775c8['name'],'value':_0x1775c8['project']?.[_0x377dd6(0x1a1)]+'.'+_0x1775c8[_0x377dd6(0x1a1)],'description':_0x1775c8['revision']?'revision:\x20'+_0x1775c8[_0x377dd6(0x148)]:undefined})),_0x3be092=await a55_0x2ff8e5({'type':_0x377dd6(0x15a),'name':_0x377dd6(0x20c),'message':_0x377dd6(0x24b),'choices':_0xd83e5d});if(!_0x3be092[_0x377dd6(0x20c)])return 0x1;_0x429906=_0x3be092[_0x377dd6(0x20c)];}if(!_0x429906[_0x377dd6(0x28f)]('.')){const _0x4da1f1=this[_0x377dd6(0x1b4)]([],_0x41b97b);if(_0x4da1f1)_0x429906=_0x4da1f1+'.'+_0x429906;else return console[_0x377dd6(0x2a9)](a55_0x14c788[_0x377dd6(0x13b)]('Error:'),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a55_0x14c788[_0x377dd6(0x246)](_0x377dd6(0x262))),0x1;}const _0x3555e9=_0x41b97b[_0x377dd6(0x222)],_0x4207a6=_0x41b97b[_0x377dd6(0x1e1)],_0x1df8ca={};if(_0x3555e9&&Array[_0x377dd6(0x2af)](_0x3555e9))for(const _0x4c3089 of _0x3555e9){const _0x186573=_0x4c3089['indexOf']('=');if(_0x186573===-0x1)return console['error'](_0x377dd6(0x1a4)+_0x4c3089),console[_0x377dd6(0x2a9)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x2abd5f=_0x4c3089['substring'](0x0,_0x186573),_0xaf9b39=_0x4c3089[_0x377dd6(0x1a3)](_0x186573+0x1);try{_0x1df8ca[_0x2abd5f]=JSON['parse'](_0xaf9b39);}catch{_0x1df8ca[_0x2abd5f]=_0xaf9b39;}}_0x41b97b[_0x377dd6(0x13d)]&&(console[_0x377dd6(0x2a9)](_0x377dd6(0x1e5)+_0x429906),Object[_0x377dd6(0x27a)](_0x1df8ca)[_0x377dd6(0x263)]>0x0&&console['error'](_0x377dd6(0x2c0)+JSON[_0x377dd6(0x218)](_0x1df8ca)),_0x4207a6&&console['error'](_0x377dd6(0x224)+_0x4207a6));const _0x12dc84=await withSpinner(_0x377dd6(0x2ac),()=>_0x276a2d[_0x377dd6(0x20c)][_0x377dd6(0x204)](_0x429906,_0x1df8ca,{'sessionTime':_0x4207a6}),{'verbose':_0x41b97b[_0x377dd6(0x13d)]}),_0xa47a0b=_0x12dc84['data'];console[_0x377dd6(0x2a9)](_0x377dd6(0x14b)),console[_0x377dd6(0x2a9)]('\x20\x20Attempt\x20ID:\x20'+_0xa47a0b['id']),console[_0x377dd6(0x2a9)](_0x377dd6(0x181)+_0xa47a0b[_0x377dd6(0x135)]),console['error'](_0x377dd6(0x1ba)+_0xa47a0b[_0x377dd6(0x19a)]?.[_0x377dd6(0x1a1)]),console[_0x377dd6(0x2a9)]('\x20\x20Workflow:\x20'+_0xa47a0b['workflow']?.[_0x377dd6(0x1a1)]);if(_0xa47a0b[_0x377dd6(0x19a)]?.['id']&&_0xa47a0b[_0x377dd6(0x135)]&&_0xa47a0b['id']){const _0x4d2b84=_0x41b97b[_0x377dd6(0x1c9)],_0x57d810=getConsoleUrl(_0x4d2b84,_0x377dd6(0x15d)+_0xa47a0b['project']['id']+_0x377dd6(0x180)+_0xa47a0b['sessionId']+_0x377dd6(0x1d5)+_0xa47a0b['id']);console[_0x377dd6(0x2a9)]('\x20\x20Console:\x20'+a55_0x14c788[_0x377dd6(0x294)](_0x57d810));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x12a07c(0x1a1)]=a55_0x12a07c(0x274);[a55_0x12a07c(0x269)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a55_0x12a07c(0x19e)](_0x2f3844){const _0xfa59f5=a55_0x12a07c,{options:_0x1e73ab,args:_0x5153be,tdx:_0x1a278b}=_0x2f3844,_0x23dd20=_0x5153be[0x0],_0x1a064e=_0x5153be[0x1]||'.';if(!_0x23dd20)return console[_0xfa59f5(0x2a9)](_0xfa59f5(0x1a6)),console[_0xfa59f5(0x2a9)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x32389c=_0x1e73ab['revision'];_0x1e73ab[_0xfa59f5(0x13d)]&&(console['error'](_0xfa59f5(0x1ca)+_0x23dd20),console['error'](_0xfa59f5(0x169)+_0x1a064e),_0x32389c&&console[_0xfa59f5(0x2a9)]('Revision:\x20'+_0x32389c));const _0x3025e1=await withSpinner(_0xfa59f5(0x27d)+_0x23dd20+_0xfa59f5(0x2a5),()=>_0x1a278b['workflow'][_0xfa59f5(0x256)](_0x23dd20,_0x1a064e,{'revision':_0x32389c}),{'verbose':_0x1e73ab['verbose']}),_0x297eb3=_0x3025e1[_0xfa59f5(0x241)];return console[_0xfa59f5(0x2a9)](_0xfa59f5(0x1a5)+_0x297eb3[_0xfa59f5(0x174)]),console[_0xfa59f5(0x2a9)](_0xfa59f5(0x210)+_0x297eb3[_0xfa59f5(0x148)]),console['error'](_0xfa59f5(0x240)+_0x297eb3['filesExtracted']),console[_0xfa59f5(0x2a9)](_0xfa59f5(0x157)+_0x1a064e+'/'+_0x297eb3[_0xfa59f5(0x174)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x12a07c(0x1a1)]=a55_0x12a07c(0x15c);[a55_0x12a07c(0x269)]=a55_0x12a07c(0x299);async[a55_0x12a07c(0x19e)](_0x8fe5f0){const _0x52cc3e=a55_0x12a07c,{options:_0x38c100,args:_0x403f17,tdx:_0x52157a}=_0x8fe5f0;let _0x571e0a='.',_0x38735e=_0x38c100['name'];if(_0x403f17[0x0]){const {promises:_0x16f64f}=await import('fs');try{const _0x44a909=await _0x16f64f['stat'](_0x403f17[0x0]);if(_0x44a909[_0x52cc3e(0x1db)]())_0x571e0a=_0x403f17[0x0];else return console[_0x52cc3e(0x2a9)]('Error:\x20'+_0x403f17[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x38735e=_0x403f17[0x0],_0x571e0a='.';}}const _0x59b062=_0x38c100[_0x52cc3e(0x148)],_0x4ab24b=_0x38c100['skipValidation'];_0x38c100['verbose']&&(console[_0x52cc3e(0x2a9)]('Project\x20directory:\x20'+_0x571e0a),_0x38735e&&console[_0x52cc3e(0x2a9)](_0x52cc3e(0x137)+_0x38735e),_0x59b062&&console['error']('Revision:\x20'+_0x59b062),_0x4ab24b&&console[_0x52cc3e(0x2a9)](_0x52cc3e(0x2b6)));const _0x595906=await withSpinner(_0x52cc3e(0x12a),()=>_0x52157a['workflow']['push'](_0x571e0a,{'projectName':_0x38735e,'revision':_0x59b062,'skipValidation':_0x4ab24b}),{'verbose':_0x38c100['verbose']}),_0x1ae8a3=_0x595906[_0x52cc3e(0x241)];return console[_0x52cc3e(0x2a9)]('✔\x20Pushed\x20'+_0x1ae8a3[_0x52cc3e(0x174)]),console[_0x52cc3e(0x2a9)]('\x20\x20Project\x20ID:\x20'+_0x1ae8a3['projectId']),console[_0x52cc3e(0x2a9)]('\x20\x20Revision:\x20'+_0x1ae8a3[_0x52cc3e(0x148)]),await this[_0x52cc3e(0x16a)](_0x52157a,_0x1ae8a3['projectName'],_0x38c100[_0x52cc3e(0x1c9)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x12a07c(0x1a1)]=a55_0x12a07c(0x126);[a55_0x12a07c(0x269)]=a55_0x12a07c(0x17e);async[a55_0x12a07c(0x19e)](_0x5e09d9){const _0x23746f=a55_0x12a07c,{options:_0x21d057,args:_0x86c0ab,tdx:_0x32494e}=_0x5e09d9,_0x1091d9=_0x86c0ab[0x0],_0x4b20d5=_0x86c0ab[0x1];if(!_0x1091d9)return console[_0x23746f(0x2a9)](a55_0x14c788['red'](_0x23746f(0x2a8)),_0x23746f(0x130)),console[_0x23746f(0x2a9)](a55_0x14c788[_0x23746f(0x246)](_0x23746f(0x1ff))),0x1;const _0x17058a=_0x21d057[_0x23746f(0x148)];_0x21d057['verbose']&&(console[_0x23746f(0x2a9)]('Project:\x20'+_0x1091d9),_0x4b20d5&&console[_0x23746f(0x2a9)](_0x23746f(0x19b)+_0x4b20d5),_0x17058a&&console[_0x23746f(0x2a9)](_0x23746f(0x170)+_0x17058a),_0x21d057['dryRun']&&console[_0x23746f(0x2a9)]('Dry\x20run:\x20yes'));const _0x23d372=await withSpinner(_0x23746f(0x173)+_0x1091d9+'...',()=>_0x32494e[_0x23746f(0x20c)][_0x23746f(0x1d9)](_0x1091d9,{'targetDir':_0x4b20d5,'revision':_0x17058a}),{'verbose':_0x21d057[_0x23746f(0x13d)]}),_0x58ae79=_0x23d372[_0x23746f(0x241)];_0x58ae79[_0x23746f(0x1cc)]?console['error'](_0x23746f(0x21d)+_0x58ae79[_0x23746f(0x174)]):console[_0x23746f(0x2a9)](_0x23746f(0x2bb)+_0x58ae79[_0x23746f(0x174)]);console[_0x23746f(0x2a9)](_0x23746f(0x210)+_0x58ae79[_0x23746f(0x148)]),console[_0x23746f(0x2a9)]('\x20\x20Target:\x20'+(a55_0x1eacd5['relative'](process[_0x23746f(0x1b9)](),_0x58ae79['targetDir'])||'.')),console[_0x23746f(0x2a9)](_0x23746f(0x14e)+a55_0x14c788[_0x23746f(0x266)]('+'+_0x58ae79[_0x23746f(0x1d7)][_0x23746f(0x254)]+_0x23746f(0x2c2))+',\x20'+(a55_0x14c788['yellow']('~'+_0x58ae79[_0x23746f(0x1d7)][_0x23746f(0x24c)]+'\x20modified')+',\x20')+(a55_0x14c788[_0x23746f(0x13b)]('-'+_0x58ae79[_0x23746f(0x1d7)][_0x23746f(0x2c4)]+'\x20deleted')+',\x20')+(''+a55_0x14c788[_0x23746f(0x246)](_0x58ae79[_0x23746f(0x1d7)][_0x23746f(0x147)]+_0x23746f(0x153))));for(const _0x1acf2f of _0x58ae79[_0x23746f(0x1b0)]){_0x1acf2f[_0x23746f(0x264)]===_0x23746f(0x24c)&&_0x1acf2f[_0x23746f(0x1ae)]&&(console[_0x23746f(0x2a9)]('\x0a'+a55_0x14c788[_0x23746f(0x294)](_0x23746f(0x259)+_0x1acf2f['path'])),console[_0x23746f(0x2a9)](_0x1acf2f['diff']));}if(!_0x58ae79[_0x23746f(0x257)])return saveSessionContext({'workflow_project':_0x58ae79[_0x23746f(0x174)]},_0x21d057[_0x23746f(0x178)]),console[_0x23746f(0x2a9)](a55_0x14c788['green'](_0x23746f(0x278))),console[_0x23746f(0x2a9)](a55_0x14c788[_0x23746f(0x246)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x58ae79[_0x23746f(0x174)])),0x0;if(_0x21d057[_0x23746f(0x13a)])return console[_0x23746f(0x2a9)](a55_0x14c788['yellow'](_0x23746f(0x1d6))),0x0;if(!_0x21d057[_0x23746f(0x281)]){if(!isInteractive())return console[_0x23746f(0x2a9)](a55_0x14c788['red']('\x0aError:'),_0x23746f(0x161)),console[_0x23746f(0x2a9)](a55_0x14c788['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x370c5d=await confirmKey(_0x23746f(0x128));if(!_0x370c5d)return console[_0x23746f(0x2a9)](a55_0x14c788['yellow'](_0x23746f(0x26f)),'-\x20no\x20files\x20written'),0x1;}await withSpinner('Writing\x20files...',()=>_0x32494e[_0x23746f(0x20c)][_0x23746f(0x24d)](_0x58ae79,{'revision':_0x17058a}),{'verbose':_0x21d057['verbose']}),saveSessionContext({'workflow_project':_0x58ae79[_0x23746f(0x174)]},_0x21d057[_0x23746f(0x178)]),console[_0x23746f(0x2a9)](a55_0x14c788['green'](_0x23746f(0x1c5)));const _0x2b0d7b=a55_0x1eacd5['relative'](process[_0x23746f(0x1b9)](),_0x58ae79['targetDir'])||'.';return console[_0x23746f(0x2a9)](a55_0x14c788[_0x23746f(0x246)](_0x23746f(0x157)+_0x2b0d7b)),console[_0x23746f(0x2a9)](a55_0x14c788[_0x23746f(0x246)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x58ae79['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']='workflow:push';[a55_0x12a07c(0x269)]=a55_0x12a07c(0x27f);async[a55_0x12a07c(0x19e)](_0x55aa9f){const _0xf09ef6=a55_0x12a07c,{options:_0x51d4ec,args:_0x2fd059,tdx:_0x4c5a36}=_0x55aa9f,_0x176a09=this['resolveProjectDir'](_0x2fd059,_0x51d4ec),_0x103c07=_0x51d4ec[_0xf09ef6(0x148)],_0x5a97f3=_0x51d4ec[_0xf09ef6(0x1f6)];_0x51d4ec[_0xf09ef6(0x13d)]&&(_0x176a09&&console['error']('Source\x20directory:\x20'+_0x176a09),_0x103c07&&console[_0xf09ef6(0x2a9)]('Revision:\x20'+_0x103c07),_0x51d4ec[_0xf09ef6(0x13a)]&&console['error']('Dry\x20run:\x20yes'),_0x5a97f3&&console[_0xf09ef6(0x2a9)](_0xf09ef6(0x2b6)));let _0x29c279;try{_0x29c279=await withSpinner(_0xf09ef6(0x1c0),()=>_0x4c5a36[_0xf09ef6(0x20c)]['preparePushProject']({'sourceDir':_0x176a09,'revision':_0x103c07,'skipValidation':_0x5a97f3}),{'verbose':_0x51d4ec['verbose']});}catch(_0x3926aa){if(_0x3926aa instanceof Error&&_0x3926aa[_0xf09ef6(0x13e)][_0xf09ef6(0x28f)]('No\x20workflow\x20tdx.json\x20found'))return console[_0xf09ef6(0x2a9)](a55_0x14c788[_0xf09ef6(0x13b)](_0xf09ef6(0x2a8)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x51d4ec[_0xf09ef6(0x25e)]?console[_0xf09ef6(0x2a9)](a55_0x14c788['dim'](_0xf09ef6(0x280)+_0x51d4ec[_0xf09ef6(0x25e)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x51d4ec[_0xf09ef6(0x25e)]+'\x27')):console[_0xf09ef6(0x2a9)](a55_0x14c788[_0xf09ef6(0x246)](_0xf09ef6(0x207))),0x1;throw _0x3926aa;}const _0x24e665=_0x29c279[_0xf09ef6(0x241)];console[_0xf09ef6(0x2a9)]('✔\x20Project:\x20'+_0x24e665['projectName']),console[_0xf09ef6(0x2a9)](_0xf09ef6(0x231)+_0x24e665[_0xf09ef6(0x21e)]),console[_0xf09ef6(0x2a9)]('\x20\x20Revision:\x20'+_0x24e665['revision']),console[_0xf09ef6(0x2a9)]('\x20\x20Changes:\x20'+a55_0x14c788[_0xf09ef6(0x266)]('+'+_0x24e665[_0xf09ef6(0x1d7)][_0xf09ef6(0x254)]+_0xf09ef6(0x2c2))+',\x20'+(a55_0x14c788[_0xf09ef6(0x1cb)]('~'+_0x24e665[_0xf09ef6(0x1d7)][_0xf09ef6(0x24c)]+_0xf09ef6(0x18b))+',\x20')+(a55_0x14c788[_0xf09ef6(0x13b)]('-'+_0x24e665['summary'][_0xf09ef6(0x2c4)]+_0xf09ef6(0x284))+',\x20')+(''+a55_0x14c788[_0xf09ef6(0x246)](_0x24e665[_0xf09ef6(0x1d7)]['unchanged']+'\x20unchanged')));for(const _0x308959 of _0x24e665[_0xf09ef6(0x1b0)]){_0x308959[_0xf09ef6(0x264)]===_0xf09ef6(0x24c)&&_0x308959[_0xf09ef6(0x1ae)]&&(console[_0xf09ef6(0x2a9)]('\x0a'+a55_0x14c788[_0xf09ef6(0x294)](_0xf09ef6(0x259)+_0x308959['path'])),console['error'](_0x308959[_0xf09ef6(0x1ae)]));}if(!_0x24e665[_0xf09ef6(0x257)])return console['error'](a55_0x14c788[_0xf09ef6(0x266)](_0xf09ef6(0x150))),await this[_0xf09ef6(0x16a)](_0x4c5a36,_0x24e665[_0xf09ef6(0x174)],_0x51d4ec[_0xf09ef6(0x1c9)]),0x0;if(_0x51d4ec[_0xf09ef6(0x13a)])return console[_0xf09ef6(0x2a9)](a55_0x14c788[_0xf09ef6(0x1cb)](_0xf09ef6(0x1ee))),0x0;if(!_0x51d4ec[_0xf09ef6(0x281)]){if(!isInteractive())return console['error'](a55_0x14c788[_0xf09ef6(0x13b)]('\x0aError:'),_0xf09ef6(0x161)),console[_0xf09ef6(0x2a9)](a55_0x14c788[_0xf09ef6(0x246)](_0xf09ef6(0x18f))),0x1;const _0x4462ce=await confirmKey(_0xf09ef6(0x233));if(!_0x4462ce)return console['error'](a55_0x14c788['yellow']('Cancelled'),_0xf09ef6(0x2a1)),0x1;}const _0x47fc2e=await withSpinner('Pushing\x20project...',()=>_0x4c5a36['workflow']['executePushProject'](_0x24e665),{'verbose':_0x51d4ec['verbose']}),_0xe0dc9e=_0x47fc2e[_0xf09ef6(0x241)];return console[_0xf09ef6(0x2a9)](a55_0x14c788['green'](_0xf09ef6(0x20b))),console[_0xf09ef6(0x2a9)]('\x20\x20Project\x20ID:\x20'+_0xe0dc9e[_0xf09ef6(0x1c4)]),console[_0xf09ef6(0x2a9)](_0xf09ef6(0x210)+_0xe0dc9e[_0xf09ef6(0x148)]),await this[_0xf09ef6(0x16a)](_0x4c5a36,_0xe0dc9e[_0xf09ef6(0x174)],_0x51d4ec[_0xf09ef6(0x1c9)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x12a07c(0x1a1)]=a55_0x12a07c(0x14c);[a55_0x12a07c(0x269)]=a55_0x12a07c(0x286);async[a55_0x12a07c(0x19e)](_0x25f87b){const _0x2a985d=a55_0x12a07c,{options:_0x378749,args:_0x4f0ddc,tdx:_0x5912d4}=_0x25f87b,_0x42999b=this[_0x2a985d(0x21b)](_0x4f0ddc,_0x378749),_0x55bfc0=_0x378749[_0x2a985d(0x1a1)],_0x279a16=_0x378749[_0x2a985d(0x148)],_0x33ed24=_0x378749['skipValidation'];if(!_0x42999b)return console[_0x2a985d(0x2a9)](a55_0x14c788['red']('Error:'),_0x2a985d(0x18a)),console['error'](a55_0x14c788[_0x2a985d(0x246)](_0x2a985d(0x203))),console['error'](a55_0x14c788[_0x2a985d(0x246)](_0x2a985d(0x242))),0x1;if(!_0x55bfc0)return console[_0x2a985d(0x2a9)](a55_0x14c788[_0x2a985d(0x13b)](_0x2a985d(0x2a8)),_0x2a985d(0x17c)),console[_0x2a985d(0x2a9)](a55_0x14c788[_0x2a985d(0x246)](_0x2a985d(0x203))),0x1;_0x378749[_0x2a985d(0x13d)]&&(console['error']('Source\x20directory:\x20'+_0x42999b),console[_0x2a985d(0x2a9)](_0x2a985d(0x26b)+_0x55bfc0),_0x279a16&&console[_0x2a985d(0x2a9)]('Revision:\x20'+_0x279a16),_0x378749[_0x2a985d(0x13a)]&&console['error'](_0x2a985d(0x164)),_0x33ed24&&console[_0x2a985d(0x2a9)](_0x2a985d(0x2b6)));const _0x556841=await withSpinner(_0x2a985d(0x22c),()=>_0x5912d4[_0x2a985d(0x20c)][_0x2a985d(0x273)](_0x42999b,_0x55bfc0,{'revision':_0x279a16,'skipValidation':_0x33ed24}),{'verbose':_0x378749[_0x2a985d(0x13d)]}),_0x28b5f3=_0x556841[_0x2a985d(0x241)];console['error']('Source:\x20'+_0x28b5f3[_0x2a985d(0x21e)]);_0x28b5f3[_0x2a985d(0x2b2)]&&console['error'](_0x2a985d(0x2ad)+_0x28b5f3[_0x2a985d(0x2b2)]);console['error'](_0x2a985d(0x26b)+_0x28b5f3[_0x2a985d(0x25d)]),console[_0x2a985d(0x2a9)](_0x2a985d(0x170)+_0x28b5f3[_0x2a985d(0x148)]),console[_0x2a985d(0x2a9)](_0x2a985d(0x1c7)+_0x28b5f3[_0x2a985d(0x136)]);_0x28b5f3[_0x2a985d(0x23d)]&&(console[_0x2a985d(0x2a9)](a55_0x14c788[_0x2a985d(0x1cb)](_0x2a985d(0x162)+_0x28b5f3['newProjectName']+_0x2a985d(0x239)+_0x28b5f3[_0x2a985d(0x1ed)]+')')),console[_0x2a985d(0x2a9)](a55_0x14c788[_0x2a985d(0x1cb)](_0x2a985d(0x290))));if(_0x378749[_0x2a985d(0x13a)])return console[_0x2a985d(0x2a9)](a55_0x14c788[_0x2a985d(0x1cb)](_0x2a985d(0x287))),0x0;if(!_0x378749[_0x2a985d(0x281)]){if(!isInteractive())return console['error'](a55_0x14c788[_0x2a985d(0x13b)](_0x2a985d(0x17d)),_0x2a985d(0x161)),console[_0x2a985d(0x2a9)](a55_0x14c788[_0x2a985d(0x246)](_0x2a985d(0x18f))),0x1;const _0x5288fe=_0x28b5f3[_0x2a985d(0x2b2)]||a55_0x1eacd5[_0x2a985d(0x165)](_0x42999b),_0x19f9d5=_0x28b5f3[_0x2a985d(0x23d)]?_0x2a985d(0x1e9)+_0x55bfc0+_0x2a985d(0x1bd):_0x2a985d(0x134)+_0x5288fe+_0x2a985d(0x1be)+_0x55bfc0+'\x22?',_0x5b29fb=await confirmKey(_0x19f9d5);if(!_0x5b29fb)return console[_0x2a985d(0x2a9)](a55_0x14c788['yellow'](_0x2a985d(0x26f))),0x1;}const _0x16bbc0=await withSpinner(_0x28b5f3[_0x2a985d(0x23d)]?_0x2a985d(0x288)+_0x55bfc0+'...':_0x2a985d(0x292)+_0x55bfc0+'...',()=>_0x5912d4[_0x2a985d(0x20c)][_0x2a985d(0x1b8)](_0x28b5f3),{'verbose':_0x378749[_0x2a985d(0x13d)]}),_0x62af2c=_0x16bbc0['data'];return console[_0x2a985d(0x2a9)](a55_0x14c788['green'](_0x28b5f3[_0x2a985d(0x23d)]?_0x2a985d(0x127):_0x2a985d(0x1f3))),console[_0x2a985d(0x2a9)](_0x2a985d(0x1ba)+_0x62af2c['newProjectName']),console[_0x2a985d(0x2a9)](_0x2a985d(0x221)+_0x62af2c[_0x2a985d(0x209)]),console[_0x2a985d(0x2a9)](_0x2a985d(0x210)+_0x62af2c[_0x2a985d(0x148)]),await this[_0x2a985d(0x16a)](_0x5912d4,_0x62af2c['newProjectName'],_0x378749[_0x2a985d(0x1c9)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a55_0x12a07c(0x1a1)]=a55_0x12a07c(0x1d8);[a55_0x12a07c(0x269)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a55_0x12a07c(0x19e)](_0x40519f){const _0x4dbda0=a55_0x12a07c,{options:_0x587df6,args:_0x1008c7,tdx:_0x29dd96}=_0x40519f,_0xf33877=_0x1008c7[0x0];if(!_0xf33877)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x4dbda0(0x2a9)](_0x4dbda0(0x243)),0x1;_0x587df6['verbose']&&console[_0x4dbda0(0x2a9)](_0x4dbda0(0x1ca)+_0xf33877);if(!_0x587df6[_0x4dbda0(0x281)]){if(!isInteractive())return console[_0x4dbda0(0x2a9)](a55_0x14c788[_0x4dbda0(0x13b)](_0x4dbda0(0x17d)),_0x4dbda0(0x161)),console[_0x4dbda0(0x2a9)](a55_0x14c788['dim'](_0x4dbda0(0x18f))),0x1;const _0x5409c9=await confirmKey(_0x4dbda0(0x1a2)+_0xf33877+_0x4dbda0(0x228));if(!_0x5409c9)return console[_0x4dbda0(0x2a9)](a55_0x14c788[_0x4dbda0(0x1cb)](_0x4dbda0(0x26f))),0x1;}const _0x5e140e=await withSpinner('Deleting\x20project\x20'+_0xf33877+_0x4dbda0(0x2a5),()=>_0x29dd96[_0x4dbda0(0x20c)]['delete'](_0xf33877),{'verbose':_0x587df6[_0x4dbda0(0x13d)]}),_0x58a091=_0x5e140e['data'];return console[_0x4dbda0(0x2a9)](_0x4dbda0(0x244)+_0x58a091[_0x4dbda0(0x174)]),console[_0x4dbda0(0x2a9)](_0x4dbda0(0x221)+_0x58a091['projectId']),0x0;}}export function parseKeyValue(_0xbc46ec){const _0x443c97=a55_0x12a07c,_0x435d40=_0xbc46ec[_0x443c97(0x205)]('=');if(_0x435d40===-0x1)throw new Error('Invalid\x20format:\x20'+_0xbc46ec+_0x443c97(0x1f0));const _0x418188=_0xbc46ec[_0x443c97(0x1a3)](0x0,_0x435d40),_0x4c14b7=_0xbc46ec['substring'](_0x435d40+0x1);if(!_0x418188)throw new Error(_0x443c97(0x236));return{'key':_0x418188,'value':_0x4c14b7};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a55_0x12a07c(0x1dd);[a55_0x12a07c(0x269)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a55_0x12a07c(0x19e)](_0x49fec5){const _0x3fe5b3=a55_0x12a07c,{options:_0x475849,args:_0x4664db,tdx:_0xd26560}=_0x49fec5,_0x539ee9=this[_0x3fe5b3(0x277)](_0x4664db,_0x475849);if(!_0x539ee9)return 0x1;_0x475849[_0x3fe5b3(0x13d)]&&console['error'](_0x3fe5b3(0x1ca)+_0x539ee9);const _0x3abdf3=await withSpinner(_0x3fe5b3(0x225),()=>_0xd26560[_0x3fe5b3(0x20c)][_0x3fe5b3(0x249)](_0x539ee9),{'verbose':_0x475849[_0x3fe5b3(0x13d)]}),{secrets:_0x2a564f}=_0x3abdf3['data'];return console[_0x3fe5b3(0x2a9)](_0x3fe5b3(0x198)+_0x2a564f[_0x3fe5b3(0x263)]+'\x20secret'+(_0x2a564f[_0x3fe5b3(0x263)]!==0x1?'s':'')),await handleSDKOutput(_0x2a564f,_0x475849),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x12a07c(0x1a1)]=a55_0x12a07c(0x191);['description']='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async['execute'](_0x46eb35){const _0x1f7440=a55_0x12a07c,{options:_0x29322b,args:_0xad5062,tdx:_0x308225}=_0x46eb35;let _0x572227,_0x28b594;if(_0xad5062['length']>=0x1&&!_0xad5062[0x0][_0x1f7440(0x28f)]('='))_0x572227=_0xad5062[0x0],_0x28b594=_0xad5062[_0x1f7440(0x14d)](0x1);else{if(_0xad5062[_0x1f7440(0x263)]>=0x1&&_0x29322b[_0x1f7440(0x25e)])_0x572227=_0x29322b[_0x1f7440(0x25e)],_0x28b594=_0xad5062;else return _0xad5062['length']>=0x1?(console[_0x1f7440(0x2a9)](_0x1f7440(0x1a6)),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x1f7440(0x2a9)](_0x1f7440(0x1b7)),console[_0x1f7440(0x2a9)](_0x1f7440(0x1ec)),0x1);}if(_0x28b594[_0x1f7440(0x263)]===0x0)return console[_0x1f7440(0x2a9)](_0x1f7440(0x1b7)),console[_0x1f7440(0x2a9)](_0x1f7440(0x1ec)),0x1;const _0x407e59={};try{for(const _0x14b21a of _0x28b594){const {key:_0x2dc243,value:_0x3532af}=parseKeyValue(_0x14b21a);_0x407e59[_0x2dc243]=_0x3532af;}}catch(_0x439e2b){return _0x439e2b instanceof Error&&console[_0x1f7440(0x2a9)](a55_0x14c788[_0x1f7440(0x13b)](_0x1f7440(0x2a8)),_0x439e2b['message']),0x1;}const _0x140337=Object['keys'](_0x407e59);_0x29322b[_0x1f7440(0x13d)]&&(console[_0x1f7440(0x2a9)](_0x1f7440(0x1ca)+_0x572227),console[_0x1f7440(0x2a9)](_0x1f7440(0x1eb)+_0x140337[_0x1f7440(0x14f)](',\x20')));const _0x51ad53=await withSpinner(_0x140337[_0x1f7440(0x263)]===0x1?_0x1f7440(0x139):'Setting\x20'+_0x140337[_0x1f7440(0x263)]+_0x1f7440(0x293),()=>_0x308225[_0x1f7440(0x20c)][_0x1f7440(0x171)](_0x572227,_0x407e59),{'verbose':_0x29322b[_0x1f7440(0x13d)]}),_0x3ae337=_0x51ad53[_0x1f7440(0x241)];return console[_0x1f7440(0x2a9)](_0x140337['length']===0x1?_0x1f7440(0x1fe)+_0x3ae337[_0x1f7440(0x27a)][0x0]+_0x1f7440(0x289)+_0x3ae337[_0x1f7440(0x174)]+'\x27':'✔\x20'+_0x3ae337[_0x1f7440(0x27a)][_0x1f7440(0x263)]+_0x1f7440(0x230)+_0x3ae337[_0x1f7440(0x174)]+'\x27'),(_0x29322b[_0x1f7440(0x237)]||_0x29322b[_0x1f7440(0x182)])&&await handleSingleObjectOutput(_0x3ae337,_0x29322b),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a55_0x12a07c(0x1a1)]='workflow:secrets:delete';[a55_0x12a07c(0x269)]=a55_0x12a07c(0x20f);async['execute'](_0x1cc413){const _0x1b9875=a55_0x12a07c,{options:_0x3aad0e,args:_0x591594,tdx:_0x584503}=_0x1cc413;let _0x940fa6,_0x5dac09;if(_0x591594['length']>=0x2)_0x940fa6=_0x591594[0x0],_0x5dac09=_0x591594[0x1];else{if(_0x591594[_0x1b9875(0x263)]===0x1&&_0x3aad0e[_0x1b9875(0x25e)])_0x940fa6=_0x3aad0e[_0x1b9875(0x25e)],_0x5dac09=_0x591594[0x0];else return _0x591594[_0x1b9875(0x263)]===0x1?(console['error'](_0x1b9875(0x1a6)),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error']('Error:\x20Secret\x20key\x20is\x20required'),console[_0x1b9875(0x2a9)](_0x1b9875(0x247)),0x1);}_0x3aad0e[_0x1b9875(0x13d)]&&(console['error'](_0x1b9875(0x1ca)+_0x940fa6),console[_0x1b9875(0x2a9)](_0x1b9875(0x2ba)+_0x5dac09));if(!_0x3aad0e[_0x1b9875(0x281)]){if(!isInteractive())return console[_0x1b9875(0x2a9)](a55_0x14c788[_0x1b9875(0x13b)](_0x1b9875(0x17d)),_0x1b9875(0x161)),console[_0x1b9875(0x2a9)](a55_0x14c788[_0x1b9875(0x246)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x484acb=await confirmKey(_0x1b9875(0x24f)+_0x5dac09+_0x1b9875(0x151)+_0x940fa6+'\x27?');if(!_0x484acb)return console['error'](a55_0x14c788[_0x1b9875(0x1cb)](_0x1b9875(0x26f))),0x1;}const _0x14fde9=await withSpinner(_0x1b9875(0x268),()=>_0x584503[_0x1b9875(0x20c)][_0x1b9875(0x214)](_0x940fa6,_0x5dac09),{'verbose':_0x3aad0e[_0x1b9875(0x13d)]}),_0x51bd5b=_0x14fde9[_0x1b9875(0x241)];return console[_0x1b9875(0x2a9)](_0x1b9875(0x1fe)+_0x51bd5b['key']+_0x1b9875(0x216)+_0x51bd5b[_0x1b9875(0x174)]+'\x27'),(_0x3aad0e[_0x1b9875(0x237)]||_0x3aad0e[_0x1b9875(0x182)])&&await handleSingleObjectOutput(_0x51bd5b,_0x3aad0e),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(_0x9fbcb6){const _0x513055=a55_0x12a07c,_0x1c82c6=Math[_0x513055(0x270)](_0x9fbcb6/0x3e8),_0x14505b=Math['floor'](_0x1c82c6/0x3c),_0x7add20=Math[_0x513055(0x270)](_0x14505b/0x3c),_0x293b8f=Math['floor'](_0x7add20/0x18);if(_0x293b8f>0x0){const _0x13a8ed=_0x7add20%0x18;return _0x13a8ed>0x0?_0x293b8f+'d\x20'+_0x13a8ed+'h':_0x293b8f+'d';}else{if(_0x7add20>0x0){const _0x11ee9d=_0x14505b%0x3c;return _0x11ee9d>0x0?_0x7add20+'h\x20'+_0x11ee9d+'m':_0x7add20+'h';}else{if(_0x14505b>0x0){const _0x1a2e80=_0x1c82c6%0x3c;return _0x1a2e80>0x0?_0x14505b+'m\x20'+_0x1a2e80+'s':_0x14505b+'m';}else return _0x1c82c6+'s';}}}function formatTimestamp(_0x51ae33,_0x59365d){const _0x472e05=a55_0x12a07c,_0x3d498b=new Date(_0x51ae33),_0x2d629c=String(_0x3d498b[_0x472e05(0x1d3)]())[_0x472e05(0x2b5)](0x2,'0'),_0x4e0a36=String(_0x3d498b[_0x472e05(0x250)]())[_0x472e05(0x2b5)](0x2,'0'),_0x4c51b8=_0x2d629c+':'+_0x4e0a36,_0x22cbc2=_0x3d498b[_0x472e05(0x253)]()===_0x59365d[_0x472e05(0x253)]()&&_0x3d498b[_0x472e05(0x2a2)]()===_0x59365d[_0x472e05(0x2a2)]()&&_0x3d498b[_0x472e05(0x2be)]()===_0x59365d[_0x472e05(0x2be)]();if(_0x22cbc2)return _0x4c51b8;else{const _0x569b26=String(_0x3d498b['getMonth']()+0x1)[_0x472e05(0x2b5)](0x2,'0'),_0x452bb9=String(_0x3d498b[_0x472e05(0x2be)]())['padStart'](0x2,'0');return _0x569b26+'-'+_0x452bb9+'\x20'+_0x4c51b8;}}function formatDate(_0xeca981){const _0x3e9e0e=a55_0x12a07c,_0x4b06e4=_0xeca981[_0x3e9e0e(0x253)](),_0x5741b3=String(_0xeca981[_0x3e9e0e(0x2a2)]()+0x1)[_0x3e9e0e(0x2b5)](0x2,'0'),_0x1e8a56=String(_0xeca981[_0x3e9e0e(0x2be)]())['padStart'](0x2,'0');return _0x4b06e4+'-'+_0x5741b3+'-'+_0x1e8a56;}function getTaskStateIcon(_0x3fd5e6){const _0x5463ed={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x5463ed[_0x3fd5e6]||'⚪';}function getBarChar(_0x40d49d){const _0x96e591=a55_0x12a07c;return _0x40d49d===_0x96e591(0x2a9)||_0x40d49d===_0x96e591(0x12e)?'×':'─';}function a55_0x2b68(){const _0x1f93df=['Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Project\x20name\x20is\x20required','retryAttemptName','readFile','planned','\x0aClone\x20\x22','sessionId','fileCount','Project\x20name:\x20','\x20to\x20see\x20detailed\x20logs','Setting\x20secret...','dryRun','red','Show\x20logs\x20for\x20a\x20workflow\x20attempt','verbose','message','has','Listing\x20workflows...','GUTTER','split','status','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','cancelRequested','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','unchanged','revision','⚠\x20Showing\x20first\x20','Listing\x20workflow\x20projects...','✔\x20Workflow\x20run\x20started','workflow:clone','slice','\x20\x20Changes:\x20','join','\x0a✔\x20No\x20changes\x20to\x20push','\x27\x20from\x20project\x20\x27','1157964ZjdCqy','\x20unchanged','autocomplete','trim','blue','\x20\x20Location:\x20','Pattern:\x20','LABEL_WIDTH_DIVISOR','select','resumeFrom','workflow:upload','/app/workflows/','renderTimeline','\x20workflow','output','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x0a⚠\x20Project\x20\x22','projects','Dry\x20run:\x20yes','basename','updatedAt','\x20sessions\x20','startTime','Output\x20directory:\x20','showWorkflowConsoleUrl','some','MAX_POLL_ITERATIONS','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','start','attempt','Revision:\x20','setSecrets','Target:\x20','Pulling\x20project\x20','projectName','Using\x20attempt\x20','Warning:','force','session','resolveProjectId','Killing\x20attempt...','\x20tasks','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','\x0aError:','Pull\x20workflow\x20project\x20to\x20local\x20folder','utf-8','/sessions/','\x20\x20Session\x20ID:\x20','jsonl','No\x20attempts\x20found\x20in\x20project:\x20','No\x20sessions\x20with\x20timing\x20information','log','toISOString','Fetching\x20log\x20files...','write','finishedAt','Source\x20directory\x20is\x20required','\x20modified','list','getTime','✔\x20Showing\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','attempts','workflow:secrets:set','lastAttempt','displayLine','Start\x20a\x20workflow\x20run','208FWjavZ','\x0a✔\x20Attempt\x20complete','🔄\x20','✔\x20Found\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','project','Target\x20directory:\x20','ICON_SPACING','taskName','execute','List\x20workflow\x20execution\x20sessions','fullName','name','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','substring','Error:\x20Invalid\x20parameter\x20format:\x20','✔\x20Downloaded\x20','Error:\x20Project\x20name\x20is\x20required','Attempt\x20ID:\x20','2100315CDjDfq','No\x20projects\x20match\x20pattern:\x20','Force:\x20yes','\x20task','Downloading\x20logs...','retryAttempt','diff','toLowerCase','changes','generateSessionTimelineRows','context','Kill\x20a\x20running\x20attempt','resolveProject','index','\x20session','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','executeCloneProject','cwd','\x20\x20Project:\x20','text','match','\x22\x20with\x20new\x20revision?','\x22\x20to\x20new\x20project\x20\x22','reason','Analyzing\x20changes...','createdAt','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','\x20(system)','projectId','✔\x20Pull\x20complete','Retrying\x20attempt...','Files\x20to\x20upload:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','site','Project:\x20','yellow','isNewProject','\x20(use\x20--limit\x20to\x20show\x20more)','List\x20workflows','canceling','75631LVPaJs','Latest\x20session\x20has\x20no\x20attempt','localeCompare','getHours','MAX_TASKS_DISPLAY','/attempt/','\x0aDry\x20run\x20-\x20no\x20files\x20written','summary','workflow:delete','pullProject','Session\x20','isDirectory','\x0aFailed\x20to\x20fetch\x20attempt\x20data','workflow:secrets:list','startsWith','Error:\x20Attempt\x20ID\x20is\x20required','total','sessionTime','ICON_WIDTH','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflows','Workflow:\x20','\x20logs','task','✔\x20Workflow\x20project\x20context\x20cleared.','\x0aUpdate\x20existing\x20project\x20\x22','sort','Secrets\x20to\x20set:\x20','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','existingProjectId','\x0aDry\x20run\x20-\x20nothing\x20pushed','logFiles','.\x20Expected\x20format:\x20KEY=VALUE','Project\x20filter:\x20','attemptId','✔\x20Clone\x20complete','success','round','skipValidation','Filter:\x20','repeat','LABEL_MIN_SPACING','\x1b[1A\x1b[2K','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','parseProjectWorkflowPattern','1790504gMiTHd','✔\x20Secret\x20\x27','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','sessions','TASK_NAME_WIDTH','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','run','indexOf','session:','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','title','newProjectId','done','✔\x20Push\x20complete','workflow','Retry\x20a\x20session\x20or\x20attempt','POLL_INTERVAL_MS','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x20\x20Revision:\x20','\x20\x20Console:\x20','session_id','fromTask','deleteSecret','💡\x20Tip:\x20Use\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','No\x20log\x20files\x20found\x20for\x20this\x20attempt','stringify','tasks','limit','resolveProjectDir','value','→\x20New\x20project:\x20','sourceDir','find','set','\x20\x20Project\x20ID:\x20','param','1123526NGNumr','Session\x20time:\x20','Listing\x20secrets...','isTTY','resolve','\x22?\x20This\x20cannot\x20be\x20undone.','pending','retrySession','Select\x20a\x20session\x20to\x20view\x20timeline:','Analyzing\x20project...','No\x20sessions\x20found\x20for:\x20','min','values','\x20secrets\x20set\x20for\x20project\x20\x27','\x20\x20Source:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','\x0aPush\x20these\x20changes?','window','workflow:tasks','Key\x20cannot\x20be\x20empty','json','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x22\x20already\x20exists\x20(ID:\x20','fill','Failed\x20to\x20fetch\x20attempt\x20data','No\x20sessions\x20found\x20in\x20project:\x20','targetExists','map','Including\x20subtasks:\x20yes','\x20\x20Files\x20extracted:\x20','data','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Usage:\x20workflow:delete\x20<project-name-or-id>','✔\x20Deleted\x20project\x20','state','dim','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','filter','listSecrets','workflow:run','Select\x20a\x20workflow\x20to\x20run','modified','applyPullProject','workflowName','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','getMinutes','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20tdx\x20wf\x20use\x20<project>','getFullYear','new','icon','download','hasChanges','running','---\x20','tdx\x20wf\x20attempt\x20','renderSingleTimeline','table','newProjectName','workflowProject','durationMs','\x0aPolling...\x20(','MAX_LABEL_COUNT','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','length','type','📋\x20','green','Params:\x20','Deleting\x20secret...','description','Attempt:\x20','New\x20project\x20name:\x20','renderSessionsTimeline','fileSize','clear','Cancelled','floor','all','Resume\x20from:\x20','prepareCloneProject','workflow:download','kill','No\x20attempts\x20found\x20for:\x20','requireProject','\x0a✔\x20Already\x20up\x20to\x20date','columns','keys','unknown','List\x20all\x20workflow\x20projects','Downloading\x20project\x20','push','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Tip:\x20cd\x20to\x20workflows/','yes','now','sys','\x20deleted','\x20attempt','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x0aDry\x20run\x20-\x20no\x20project\x20created','Updating\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','No\x20workflow\x20projects\x20found','startedAt','Status:\x20','Total:\x20','From\x20task:\x20','includes','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Cloning\x20to\x20','\x20secrets...','cyan','MAX_TIMELINE_WIDTH','max','(unknown)','No\x20sessions\x20found','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','parse','\x20-\x20','Getting\x20attempt\x20details...','42710hwpNGC','Select\x20a\x20task\x20to\x20view\x20logs:','No\x20workflows\x20found','Show\x20tasks\x20for\x20an\x20attempt','-\x20nothing\x20pushed','getMonth','splice','format','...','end','No\x20workflows\x20found\x20in\x20project:\x20','Error:','error','rows','every','Starting\x20workflow\x20run...','Source\x20project:\x20','189330aVTDex','isArray','follow','navigateSessionsInteractive','sourceProjectName','Session\x20not\x20found:\x20','No\x20workflow\x20sessions\x20found','padStart','Validation:\x20skipped','Listing\x20workflow\x20attempts...','get','pollTimeline','Key:\x20','→\x20Project:\x20','List\x20workflow\x20attempts','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','getDate','\x20project','Parameters:\x20','duration','\x20new','params','deleted','workflow:pull','✔\x20Project\x20updated','\x0aApply\x20these\x20changes?','stdout','Pushing\x20workflow\x20project...','📁\x20','buildTimelineData','Filter:\x20project=','group_error'];a55_0x2b68=function(){return _0x1f93df;};return a55_0x2b68();}function getBarColor(_0xdea32c){const _0x2a1082=a55_0x12a07c,_0x311ee8={'success':a55_0x14c788[_0x2a1082(0x266)],'error':a55_0x14c788['red'],'group_error':a55_0x14c788['red'],'running':a55_0x14c788[_0x2a1082(0x156)],'blocked':a55_0x14c788[_0x2a1082(0x1cb)],'planned':a55_0x14c788[_0x2a1082(0x246)],'canceling':a55_0x14c788[_0x2a1082(0x1cb)]};return _0x311ee8[_0xdea32c]||a55_0x14c788['white'];}function parseTaskName(_0x6e5a68){const _0x37221f=a55_0x12a07c;let _0x1caed0=_0x6e5a68['replace'](/^\++/,'');const _0x3a6afd=_0x1caed0[_0x37221f(0x142)]('+'),_0x2c6865=_0x3a6afd[_0x37221f(0x263)]>0x1?_0x3a6afd[_0x37221f(0x263)]-0x2:0x0,_0x484248=_0x3a6afd[_0x3a6afd['length']-0x1]||_0x1caed0;return{'level':_0x2c6865,'name':'+'+_0x484248};}function truncateTaskName(_0x4ed8b1,_0x5c1c83){const _0x5168cb=a55_0x12a07c,_0x2bdfe8=stringWidth(_0x4ed8b1);if(_0x2bdfe8<=_0x5c1c83)return _0x4ed8b1;let _0x59d8ee=_0x4ed8b1;while(stringWidth(_0x59d8ee+'…')>_0x5c1c83&&_0x59d8ee[_0x5168cb(0x263)]>0x0){_0x59d8ee=_0x59d8ee[_0x5168cb(0x14d)](0x0,-0x1);}return _0x59d8ee+'…';}function calculateTimeScale(_0x1319bd,_0x8913ff){const _0x1278ed=a55_0x12a07c;return{'startTime':_0x1319bd[_0x1278ed(0x16e)],'endTime':_0x1319bd[_0x1278ed(0x2a6)],'durationMs':_0x1319bd[_0x1278ed(0x2c1)],'msPerChar':_0x1319bd[_0x1278ed(0x2c1)]/_0x8913ff};}function timeToPosition(_0x5646ab,_0x26eea6,_0x3192d5){const _0x9f28b3=a55_0x12a07c,_0x58f0ce=_0x5646ab-_0x26eea6['startTime'],_0x444a1d=Math[_0x9f28b3(0x270)](_0x58f0ce/_0x26eea6['msPerChar']);return Math['max'](0x0,Math['min'](_0x444a1d,_0x3192d5));}function renderTimeAxis(_0xc305e1,_0x465bbe){const _0x3b526e=a55_0x12a07c,_0x46e6c4=Math[_0x3b526e(0x22e)](TIMELINE_CONFIG[_0x3b526e(0x261)],Math[_0x3b526e(0x296)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x3b526e(0x270)](_0x465bbe/TIMELINE_CONFIG[_0x3b526e(0x159)]))),_0x429828=_0xc305e1[_0x3b526e(0x25f)]/(_0x46e6c4-0x1),_0x5a4478=new Date(_0xc305e1[_0x3b526e(0x168)]),_0x26c17c=[];for(let _0x159657=0x0;_0x159657<_0x46e6c4;_0x159657++){const _0x5af9b4=_0xc305e1[_0x3b526e(0x168)]+_0x159657*_0x429828,_0x30ddf7=timeToPosition(_0x5af9b4,_0xc305e1,_0x465bbe),_0x4ccd9a=formatTimestamp(_0x5af9b4,_0x5a4478);_0x26c17c[_0x3b526e(0x27e)]({'pos':_0x30ddf7,'text':_0x4ccd9a});}const _0x4d3b20=new Array(_0x465bbe)[_0x3b526e(0x23a)]('\x20');let _0x3a936b=-0x1;for(const {pos:_0x10ef9b,text:_0x45d786}of _0x26c17c){let _0x5d7089=Math['max'](0x0,_0x10ef9b-Math[_0x3b526e(0x270)](_0x45d786[_0x3b526e(0x263)]/0x2));_0x5d7089<=_0x3a936b+TIMELINE_CONFIG[_0x3b526e(0x1f9)]&&(_0x5d7089=_0x3a936b+TIMELINE_CONFIG[_0x3b526e(0x1f9)]+0x1);_0x5d7089+_0x45d786[_0x3b526e(0x263)]>_0x465bbe&&(_0x5d7089=_0x465bbe-_0x45d786[_0x3b526e(0x263)]);if(_0x5d7089>=0x0&&_0x5d7089+_0x45d786[_0x3b526e(0x263)]<=_0x465bbe&&_0x5d7089>_0x3a936b){for(let _0x3126be=0x0;_0x3126be<_0x45d786[_0x3b526e(0x263)];_0x3126be++){_0x4d3b20[_0x5d7089+_0x3126be]=_0x45d786[_0x3126be];}_0x3a936b=_0x5d7089+_0x45d786[_0x3b526e(0x263)]-0x1;}}return _0x4d3b20[_0x3b526e(0x14f)]('');}function renderTaskRow(_0x5d39c0,_0x13d4be,_0x50d27a,_0x329915){const _0xe2f352=a55_0x12a07c,{level:_0x656de7,name:_0x1188b0}=parseTaskName(_0x5d39c0[_0xe2f352(0x1a1)]),_0x5e42fb='\x20'[_0xe2f352(0x1f8)](_0x656de7),_0x33ed6c=_0x5d39c0[_0xe2f352(0x234)]?'('+formatElapsed(_0x5d39c0[_0xe2f352(0x234)][_0xe2f352(0x2c1)])+')':'',_0x111a8e=stringWidth(_0x33ed6c),_0x320dab=_0x656de7*0x1,_0x470c1b=_0x329915-_0x320dab-_0x111a8e-0x1,_0x4bf48b=truncateTaskName(_0x1188b0,_0x470c1b),_0xd5833c=_0x5e42fb+_0x4bf48b,_0x84bf5=stringWidth(_0xd5833c),_0x162383=_0x329915-_0x84bf5-_0x111a8e,_0x13e6ef=_0xd5833c+'\x20'[_0xe2f352(0x1f8)](Math[_0xe2f352(0x296)](0x1,_0x162383))+a55_0x14c788['dim'](_0x33ed6c),_0x2040d4=getTaskStateIcon(_0x5d39c0[_0xe2f352(0x245)]),_0x1c41c4=new Array(_0x50d27a)[_0xe2f352(0x23a)]('\x20');if(_0x5d39c0['window']){const _0x4de858=timeToPosition(_0x5d39c0[_0xe2f352(0x234)][_0xe2f352(0x16e)],_0x13d4be,_0x50d27a),_0x58e4ea=timeToPosition(_0x5d39c0['window'][_0xe2f352(0x2a6)],_0x13d4be,_0x50d27a),_0x563970=getBarChar(_0x5d39c0['state']),_0xa31d77=Math[_0xe2f352(0x296)](_0x4de858+0x1,_0x58e4ea);for(let _0x4fed1a=_0x4de858;_0x4fed1a<Math[_0xe2f352(0x22e)](_0xa31d77,_0x50d27a);_0x4fed1a++){_0x1c41c4[_0x4fed1a]=_0x563970;}}const _0xc09c76=getBarColor(_0x5d39c0['state']),_0x37b3f4=_0x1c41c4[_0xe2f352(0x23e)](_0x5a8a8a=>_0x5a8a8a==='\x20'?'\x20':_0xc09c76(_0x5a8a8a))['join']('');return _0x2040d4+'\x20'+_0x13e6ef+'│'+_0x37b3f4+'│';}function calculateStats(_0x55319f){const _0x53e66b=a55_0x12a07c,_0x9d666c={'total':_0x55319f[_0x53e66b(0x263)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0xb93a8f of _0x55319f){if(_0xb93a8f[_0x53e66b(0x245)]===_0x53e66b(0x1f4))_0x9d666c[_0x53e66b(0x1f4)]++;else{if(_0xb93a8f[_0x53e66b(0x245)]===_0x53e66b(0x2a9)||_0xb93a8f[_0x53e66b(0x245)]===_0x53e66b(0x12e))_0x9d666c[_0x53e66b(0x2a9)]++;else _0xb93a8f[_0x53e66b(0x245)]===_0x53e66b(0x258)?_0x9d666c[_0x53e66b(0x258)]++:_0x9d666c[_0x53e66b(0x229)]++;}}return _0x9d666c;}function formatStats(_0x3416ec){const _0x2c203b=a55_0x12a07c;return[_0x2c203b(0x28d)+_0x3416ec[_0x2c203b(0x1e0)],'✅\x20'+_0x3416ec[_0x2c203b(0x1f4)],'❌\x20'+_0x3416ec['error'],_0x2c203b(0x197)+_0x3416ec[_0x2c203b(0x258)],'⏳\x20'+_0x3416ec[_0x2c203b(0x229)]][_0x2c203b(0x14f)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']='workflow:timeline';[a55_0x12a07c(0x269)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a55_0x12a07c(0x19e)](_0x168f6e){const _0x3d9c00=a55_0x12a07c,{options:_0x45df65,args:_0x388eee,tdx:_0x38ab1d}=_0x168f6e;let _0x1290f5,_0x5379a1,_0x4ab748=![];if(_0x388eee[0x0]){if(_0x388eee[0x0][_0x3d9c00(0x28f)]('.')){const _0x2be84d=this[_0x3d9c00(0x1fc)](_0x388eee,_0x45df65);if(!_0x2be84d)return 0x1;_0x1290f5=_0x2be84d[_0x3d9c00(0x174)],_0x5379a1=_0x2be84d[_0x3d9c00(0x24e)];}else{_0x5379a1=_0x388eee[0x0],_0x1290f5=_0x45df65[_0x3d9c00(0x25e)];if(!_0x1290f5)return console['error'](a55_0x14c788['red'](_0x3d9c00(0x2a8)),_0x3d9c00(0x251)),0x1;_0x4ab748=!![];}}else{const _0x2a3322=this[_0x3d9c00(0x1fc)](_0x388eee,_0x45df65);if(!_0x2a3322)return 0x1;_0x1290f5=_0x2a3322[_0x3d9c00(0x174)],_0x5379a1=_0x2a3322[_0x3d9c00(0x24e)];}if(_0x45df65['verbose']){if(_0x1290f5&&_0x5379a1)console[_0x3d9c00(0x2a9)](_0x3d9c00(0x1f7)+_0x1290f5+'.'+_0x5379a1);else _0x1290f5&&console['error']('Filter:\x20project='+_0x1290f5);}const _0x22962e=_0x45df65[_0x3d9c00(0x1f2)],_0x588924=_0x45df65['sessionId'];if(_0x22962e){_0x588924&&console['error'](a55_0x14c788[_0x3d9c00(0x1cb)](_0x3d9c00(0x176)),_0x3d9c00(0x146));const _0xe2be73=_0x45df65[_0x3d9c00(0x2b0)];return _0xe2be73?await this[_0x3d9c00(0x2b9)](_0x168f6e,_0x22962e):await this['renderSingleTimeline'](_0x168f6e,_0x22962e,_0x45df65),0x0;}if(_0x588924){const _0x25f83c=await withSpinner('Loading\x20session...',()=>_0x38ab1d[_0x3d9c00(0x20c)][_0x3d9c00(0x200)]({'projectName':_0x1290f5,'workflowName':_0x5379a1,'limit':0x64}),{'verbose':_0x45df65['verbose']}),_0x54efc9=_0x25f83c['data'][_0x3d9c00(0x21f)](_0x1f10f6=>_0x1f10f6['id']===_0x588924);if(!_0x54efc9)return console[_0x3d9c00(0x2a9)](a55_0x14c788[_0x3d9c00(0x13b)]('Error:'),_0x3d9c00(0x2b3)+_0x588924),0x1;if(!_0x54efc9['lastAttempt']?.['id'])return console[_0x3d9c00(0x2a9)](a55_0x14c788[_0x3d9c00(0x13b)]('Error:'),_0x3d9c00(0x1da)+_0x588924+'\x20has\x20no\x20attempts'),0x1;const _0xa1f895=_0x54efc9[_0x3d9c00(0x192)]['id'];_0x45df65[_0x3d9c00(0x13d)]&&console['error'](_0x3d9c00(0x175)+_0xa1f895+'\x20from\x20session\x20'+_0x588924);const _0x116387=_0x45df65[_0x3d9c00(0x2b0)];return _0x116387?await this['pollTimeline'](_0x168f6e,_0xa1f895):await this[_0x3d9c00(0x25b)](_0x168f6e,_0xa1f895,_0x45df65),0x0;}const _0x3cb9ee=await withSpinner('Loading\x20sessions...',()=>_0x38ab1d[_0x3d9c00(0x20c)][_0x3d9c00(0x200)]({'projectName':_0x1290f5,'workflowName':_0x5379a1,'limit':_0x45df65['limit']||0x32}),{'verbose':_0x45df65[_0x3d9c00(0x13d)]}),_0x50fdf1=_0x3cb9ee['data'];if(_0x50fdf1[_0x3d9c00(0x263)]===0x0){if(_0x1290f5&&_0x5379a1)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x1290f5+'.'+_0x5379a1);else _0x1290f5?console[_0x3d9c00(0x2a9)](_0x3d9c00(0x23c)+_0x1290f5):(console[_0x3d9c00(0x2a9)](_0x3d9c00(0x2b4)),console[_0x3d9c00(0x2a9)](a55_0x14c788[_0x3d9c00(0x246)](_0x3d9c00(0x12f))));return 0x0;}_0x50fdf1[_0x3d9c00(0x1ea)]((_0x741771,_0x303230)=>{const _0x547f60=_0x3d9c00,_0x422100=_0x741771[_0x547f60(0x1e1)]||'',_0x46c878=_0x303230[_0x547f60(0x1e1)]||'';return _0x46c878[_0x547f60(0x1d2)](_0x422100);});if(_0x45df65[_0x3d9c00(0x237)]||_0x45df65[_0x3d9c00(0x182)])return await handleSDKOutput(_0x50fdf1,_0x45df65),0x0;let _0x4e8ab3;if(_0x4ab748){const _0x1feaaa=_0x50fdf1[0x0];if(!_0x1feaaa[_0x3d9c00(0x192)]?.['id'])return console[_0x3d9c00(0x2a9)](_0x3d9c00(0x1d1)),0x0;_0x4e8ab3=_0x1feaaa[_0x3d9c00(0x192)]['id'],_0x45df65['verbose']&&console[_0x3d9c00(0x2a9)]('Auto-selected\x20latest\x20session:\x20'+_0x1feaaa['sessionTime']);}else{const _0x39907d=_0x50fdf1[_0x3d9c00(0x23e)](_0x24ea97=>{const _0x3c6f3a=_0x3d9c00,_0x1df135=getAttemptStatusDisplay(_0x24ea97['lastAttempt']);return{'title':_0x24ea97[_0x3c6f3a(0x19a)]?.['name']+'.'+_0x24ea97[_0x3c6f3a(0x20c)]?.[_0x3c6f3a(0x1a1)]+_0x3c6f3a(0x29b)+_0x24ea97['sessionTime']+'\x20'+_0x1df135[_0x3c6f3a(0x255)],'value':_0x24ea97[_0x3c6f3a(0x192)]?.['id']||'','description':_0x1df135[_0x3c6f3a(0x1bb)]};}),_0x5ca85b=await a55_0x2ff8e5({'type':_0x3d9c00(0x15a),'name':_0x3d9c00(0x1f2),'message':_0x3d9c00(0x22b),'choices':_0x39907d['filter'](_0x29eb50=>_0x29eb50[_0x3d9c00(0x21c)]!=='')});if(!_0x5ca85b[_0x3d9c00(0x1f2)])return 0x0;_0x4e8ab3=_0x5ca85b[_0x3d9c00(0x1f2)];}const _0x19f5a8=_0x45df65['follow'];return _0x19f5a8?await this['pollTimeline'](_0x168f6e,_0x4e8ab3):await this[_0x3d9c00(0x25b)](_0x168f6e,_0x4e8ab3,_0x45df65),0x0;}async[a55_0x12a07c(0x25b)](_0x9e6030,_0x1756d5,_0x2e63f9){const _0x1a68d8=a55_0x12a07c,{tdx:_0x29c4fc}=_0x9e6030;let _0x475fb0,_0x3e1615;try{[_0x475fb0,_0x3e1615]=await Promise[_0x1a68d8(0x271)]([_0x29c4fc['workflow']['attempt'](_0x1756d5),_0x29c4fc[_0x1a68d8(0x20c)][_0x1a68d8(0x219)](_0x1756d5,![])]);}catch(_0x3023a9){console[_0x1a68d8(0x2a9)](a55_0x14c788[_0x1a68d8(0x13b)](_0x1a68d8(0x23b)));_0x2e63f9[_0x1a68d8(0x13d)]&&console[_0x1a68d8(0x2a9)](_0x3023a9);throw _0x3023a9;}if(_0x2e63f9[_0x1a68d8(0x237)]||_0x2e63f9[_0x1a68d8(0x182)]){const _0x49816a=this[_0x1a68d8(0x12c)](_0x475fb0,_0x3e1615);await handleSDKOutput([_0x49816a],_0x2e63f9);return;}const _0x429613=_0x29c4fc['context'][_0x1a68d8(0x1c9)],_0x29ed69=this[_0x1a68d8(0x15e)](_0x475fb0,_0x3e1615,_0x429613);console[_0x1a68d8(0x185)](_0x29ed69);}async[a55_0x12a07c(0x2b9)](_0x3131bc,_0x12893d){const _0x22ccdc=a55_0x12a07c,{tdx:_0x19d08e}=_0x3131bc,_0x1e34a3=TIMELINE_CONFIG[_0x22ccdc(0x20e)],_0x4d034b=TIMELINE_CONFIG[_0x22ccdc(0x16c)];let _0x1479e9=0x0;while(_0x1479e9<_0x4d034b){process[_0x22ccdc(0x129)][_0x22ccdc(0x226)]&&process[_0x22ccdc(0x129)][_0x22ccdc(0x188)]('\x1bc');let _0x2a745e,_0x290466;try{[_0x2a745e,_0x290466]=await Promise[_0x22ccdc(0x271)]([_0x19d08e[_0x22ccdc(0x20c)][_0x22ccdc(0x16f)](_0x12893d),_0x19d08e['workflow'][_0x22ccdc(0x219)](_0x12893d,![])]);}catch(_0x361284){console[_0x22ccdc(0x2a9)](a55_0x14c788[_0x22ccdc(0x13b)](_0x22ccdc(0x1dc)));_0x1479e9>0x0&&console[_0x22ccdc(0x2a9)](a55_0x14c788[_0x22ccdc(0x246)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x1479e9));throw _0x361284;}const _0x2d264f=_0x19d08e[_0x22ccdc(0x1b2)][_0x22ccdc(0x1c9)],_0x408bfd=this['renderTimeline'](_0x2a745e,_0x290466,_0x2d264f);console[_0x22ccdc(0x185)](_0x408bfd);const _0x23af0e=_0x2a745e[_0x22ccdc(0x20a)]&&_0x290466[_0x22ccdc(0x2ab)](_0x55a1c4=>_0x55a1c4[_0x22ccdc(0x245)]!==_0x22ccdc(0x258)&&_0x55a1c4['state']!==_0x22ccdc(0x133));if(_0x23af0e){console['error'](a55_0x14c788[_0x22ccdc(0x266)](_0x22ccdc(0x196)));break;}console[_0x22ccdc(0x2a9)](a55_0x14c788['dim'](_0x22ccdc(0x260)+_0x1479e9*0x2+_0x22ccdc(0x2bd))),await new Promise(_0x39314b=>setTimeout(_0x39314b,_0x1e34a3)),_0x1479e9++;}_0x1479e9>=_0x4d034b&&console[_0x22ccdc(0x2a9)](a55_0x14c788[_0x22ccdc(0x1cb)](_0x22ccdc(0x238)));}[a55_0x12a07c(0x15e)](_0x3a1fea,_0x17af46,_0x50a899){const _0x3c0ac6=a55_0x12a07c,_0x1002d5=[],_0x33a70c=TIMELINE_CONFIG[_0x3c0ac6(0x201)],_0x2b6ce9=0x5,_0x18ce2a=process[_0x3c0ac6(0x129)][_0x3c0ac6(0x279)]||0x78,_0x42a75e=_0x18ce2a-_0x33a70c-_0x2b6ce9,_0x537d5c=Math[_0x3c0ac6(0x296)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math['min'](_0x42a75e,TIMELINE_CONFIG[_0x3c0ac6(0x295)])),_0x45a2ff=new Date(_0x3a1fea['createdAt'])['getTime'](),_0xb4018d=_0x3a1fea['finishedAt']?new Date(_0x3a1fea['finishedAt'])['getTime']():Date['now'](),_0x27a2e2={'start':_0x45a2ff,'end':_0xb4018d,'duration':_0xb4018d-_0x45a2ff},_0x3cd45f=new Map(),_0x2d7a71=[];for(const _0x4af2a7 of _0x17af46){if(_0x4af2a7[_0x3c0ac6(0x28b)]){const _0x1adf43=new Date(_0x4af2a7[_0x3c0ac6(0x28b)])['getTime'](),_0x10ac51=_0x4af2a7['updatedAt']?new Date(_0x4af2a7[_0x3c0ac6(0x166)])['getTime']():Date[_0x3c0ac6(0x282)](),_0x4f14d0={'start':_0x1adf43,'end':_0x10ac51,'duration':_0x10ac51-_0x1adf43};_0x3cd45f['set'](_0x4af2a7['id'],_0x4f14d0),_0x2d7a71[_0x3c0ac6(0x27e)]({'name':_0x4af2a7[_0x3c0ac6(0x1a0)],'state':_0x4af2a7[_0x3c0ac6(0x245)]||_0x3c0ac6(0x27b),'window':_0x4f14d0});}else _0x2d7a71[_0x3c0ac6(0x27e)]({'name':_0x4af2a7[_0x3c0ac6(0x1a0)],'state':_0x4af2a7['state']||_0x3c0ac6(0x133),'window':undefined});}_0x2d7a71[_0x3c0ac6(0x1ea)]((_0x13b07b,_0x4bb959)=>{const _0x50fbe4=_0x3c0ac6;if(!_0x13b07b[_0x50fbe4(0x234)])return 0x1;if(!_0x4bb959[_0x50fbe4(0x234)])return-0x1;return _0x13b07b['window'][_0x50fbe4(0x16e)]-_0x4bb959[_0x50fbe4(0x234)][_0x50fbe4(0x16e)];});const _0x52b9d1=_0x2d7a71[_0x3c0ac6(0x263)],_0x339eba=_0x52b9d1>TIMELINE_CONFIG[_0x3c0ac6(0x1d4)];_0x339eba&&_0x2d7a71[_0x3c0ac6(0x2a3)](TIMELINE_CONFIG[_0x3c0ac6(0x1d4)]);const _0x2d6f96=calculateTimeScale(_0x27a2e2,_0x537d5c),_0x58fd05=_0x3a1fea[_0x3c0ac6(0x20a)]?_0x3a1fea[_0x3c0ac6(0x1f4)]?a55_0x14c788[_0x3c0ac6(0x266)](_0x3c0ac6(0x1f4)):a55_0x14c788[_0x3c0ac6(0x13b)](_0x3c0ac6(0x2a9)):a55_0x14c788['blue'](_0x3c0ac6(0x258)),_0x3d4365=_0x3a1fea[_0x3c0ac6(0x19a)]?.['id'],_0xe0ac3=_0x3a1fea['sessionId'];let _0x5dccc3;if(_0x3d4365&&_0xe0ac3){const _0xc08034=getWorkflowAttemptUrl(_0x50a899,_0x3d4365,_0xe0ac3,_0x3a1fea['id']);_0x5dccc3=hyperlink(a55_0x14c788['dim'](_0x3a1fea['id']),_0xc08034);}else _0x5dccc3=a55_0x14c788[_0x3c0ac6(0x246)](_0x3a1fea['id']);_0x1002d5[_0x3c0ac6(0x27e)](_0x3c0ac6(0x26a)+_0x5dccc3+_0x3c0ac6(0x29b)+_0x58fd05+_0x3c0ac6(0x29b)+formatElapsed(_0x27a2e2[_0x3c0ac6(0x2c1)]));if(_0x2d7a71[_0x3c0ac6(0x263)]>0x0){const _0x4be1ef=renderTimeAxis(_0x2d6f96,_0x537d5c),_0x2a2319=new Date(_0x27a2e2[_0x3c0ac6(0x16e)]),_0x1f7471=formatDate(_0x2a2319),_0x47f390=TIMELINE_CONFIG[_0x3c0ac6(0x1e2)]+TIMELINE_CONFIG[_0x3c0ac6(0x19c)]+_0x33a70c,_0x4c73f8=_0x1f7471[_0x3c0ac6(0x2b5)](_0x47f390),_0x4c02a6=a55_0x14c788[_0x3c0ac6(0x246)](_0x4c73f8);_0x1002d5[_0x3c0ac6(0x27e)](_0x4c02a6+'\x20'+_0x4be1ef);for(const _0xe6333 of _0x2d7a71){_0x1002d5[_0x3c0ac6(0x27e)](renderTaskRow(_0xe6333,_0x2d6f96,_0x537d5c,_0x33a70c));}const _0x2f1531=calculateStats(_0x2d7a71);_0x1002d5[_0x3c0ac6(0x27e)](formatStats(_0x2f1531)),_0x339eba&&_0x1002d5[_0x3c0ac6(0x27e)](a55_0x14c788['yellow'](_0x3c0ac6(0x149)+TIMELINE_CONFIG[_0x3c0ac6(0x1d4)]+'\x20of\x20'+_0x52b9d1+_0x3c0ac6(0x17b))),_0x1002d5[_0x3c0ac6(0x27e)](''),_0x1002d5['push'](a55_0x14c788['dim'](_0x3c0ac6(0x215))+(_0x3c0ac6(0x25a)+_0x3a1fea['id']+_0x3c0ac6(0x1e6))+a55_0x14c788['dim'](_0x3c0ac6(0x138)));}else _0x1002d5[_0x3c0ac6(0x27e)](_0x3c0ac6(0x232));return _0x1002d5[_0x3c0ac6(0x14f)]('\x0a');}[a55_0x12a07c(0x12c)](_0x5d1f15,_0x614233){const _0x5c6d90=a55_0x12a07c,_0xdca6f7=new Date(_0x5d1f15[_0x5c6d90(0x1c1)])[_0x5c6d90(0x18d)](),_0x199fe8=_0x5d1f15[_0x5c6d90(0x189)]?new Date(_0x5d1f15[_0x5c6d90(0x189)])[_0x5c6d90(0x18d)]():Date[_0x5c6d90(0x282)](),_0x4b8c6a=_0x199fe8-_0xdca6f7,_0x4fe9ac=[];for(const _0x5e5c27 of _0x614233){if(_0x5e5c27[_0x5c6d90(0x28b)]){const _0xb3feff=new Date(_0x5e5c27['startedAt'])[_0x5c6d90(0x18d)](),_0x3e2680=_0x5e5c27[_0x5c6d90(0x166)]?new Date(_0x5e5c27['updatedAt'])[_0x5c6d90(0x18d)]():Date[_0x5c6d90(0x282)]();_0x4fe9ac['push']({'name':_0x5e5c27[_0x5c6d90(0x1a0)],'state':_0x5e5c27[_0x5c6d90(0x245)]||_0x5c6d90(0x27b),'window':{'start':_0xb3feff,'end':_0x3e2680,'duration':_0x3e2680-_0xb3feff}});}else _0x4fe9ac[_0x5c6d90(0x27e)]({'name':_0x5e5c27['fullName'],'state':_0x5e5c27[_0x5c6d90(0x245)]||_0x5c6d90(0x133),'window':undefined});}const _0x2e1cb8=calculateStats(_0x4fe9ac);return{'attempt':{'id':_0x5d1f15['id'],'status':_0x5d1f15[_0x5c6d90(0x20a)]?_0x5d1f15[_0x5c6d90(0x1f4)]?'success':_0x5c6d90(0x2a9):_0x5c6d90(0x258),'createdAt':_0x5d1f15[_0x5c6d90(0x1c1)],'finishedAt':_0x5d1f15[_0x5c6d90(0x189)],'duration_ms':_0x4b8c6a},'tasks':_0x4fe9ac[_0x5c6d90(0x23e)](_0x5cbdac=>({'name':_0x5cbdac[_0x5c6d90(0x1a1)],'state':_0x5cbdac['state'],'startedAt':_0x5cbdac['window']?new Date(_0x5cbdac[_0x5c6d90(0x234)][_0x5c6d90(0x16e)])[_0x5c6d90(0x186)]():null,'updatedAt':_0x5cbdac['window']?new Date(_0x5cbdac['window']['end'])[_0x5c6d90(0x186)]():null,'duration_ms':_0x5cbdac[_0x5c6d90(0x234)]?.[_0x5c6d90(0x2c1)]||null})),'stats':_0x2e1cb8};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x305460,_0x44326c){const _0x48fddb=a56_0x2d59,_0x4b556d=_0x305460();while(!![]){try{const _0x23dadf=parseInt(_0x48fddb(0x1bb))/0x1*(parseInt(_0x48fddb(0x1b8))/0x2)+-parseInt(_0x48fddb(0x1b9))/0x3+parseInt(_0x48fddb(0x1c0))/0x4+-parseInt(_0x48fddb(0x1be))/0x5+-parseInt(_0x48fddb(0x1b4))/0x6+-parseInt(_0x48fddb(0x1bc))/0x7+-parseInt(_0x48fddb(0x1c1))/0x8*(-parseInt(_0x48fddb(0x1bf))/0x9);if(_0x23dadf===_0x44326c)break;else _0x4b556d['push'](_0x4b556d['shift']());}catch(_0x3ae4f5){_0x4b556d['push'](_0x4b556d['shift']());}}}(a56_0x4daf,0x3e4f3));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';function a56_0x2d59(_0x43e0c1,_0x54a221){_0x43e0c1=_0x43e0c1-0x1b1;const _0x4daf7e=a56_0x4daf();let _0x2d5959=_0x4daf7e[_0x43e0c1];return _0x2d5959;}export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x3110f2=a56_0x2d59,_0x2e33f7=getVersion(),_0x608c70=platform(),_0x52a76f=process[_0x3110f2(0x1b3)][_0x3110f2(0x1b7)]('v','');return _0x3110f2(0x1b2)+_0x2e33f7+'\x20('+_0x608c70+_0x3110f2(0x1c2)+_0x52a76f+')';}function a56_0x4daf(){const _0x39af04=['Bearer\x20','568030sXqwAq','9qoLRUI','1957036OwMDXb','1093912azcrtL',';\x20node/','TD1\x20','entries','tdx/','version','725580diZlMe','Authorization','tdx','replace','2kibwWs','361794pqRMSk','X-Trino-User','348070jgtSaO','2546005LMMsqj'];a56_0x4daf=function(){return _0x39af04;};return a56_0x4daf();}export function getAuthHeaders(_0x355d9f,_0x120f20,_0x25a520){const _0x35c9e3=a56_0x2d59,_0x1813f9=getVersion(),_0x3df2ca={'User-Agent':getUserAgent(),'X-TD-Client':_0x35c9e3(0x1b6),'X-TD-Client-Version':_0x1813f9};if(_0x25a520)_0x3df2ca['Authorization']='Bearer\x20'+_0x25a520;else _0x120f20&&(_0x3df2ca['Authorization']=_0x35c9e3(0x1c3)+_0x120f20);return _0x3df2ca;}export function toHeaderRecord(_0x306d2e){const _0x314908=a56_0x2d59,_0x5f0355={};for(const [_0x511a29,_0x3ea8a2]of Object[_0x314908(0x1b1)](_0x306d2e)){_0x3ea8a2!==undefined&&(_0x5f0355[_0x511a29]=_0x3ea8a2);}return _0x5f0355;}export function getTrinoHeaders(_0x1b96ff,_0x397536,_0xd15159){const _0x6856b1=a56_0x2d59,_0x3ae621=getAuthHeaders(_0x1b96ff),_0x14963e=toHeaderRecord(_0x3ae621);if(_0xd15159)_0x14963e[_0x6856b1(0x1b5)]=_0x6856b1(0x1bd)+_0xd15159;else _0x397536&&(_0x14963e[_0x6856b1(0x1ba)]=_0x397536);return _0x14963e;}export function hasAPIKey(_0x2a33d4){const _0x22c402=getAPIKey();return _0x22c402!==undefined&&_0x22c402['length']>0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xe8b0f1,_0x524c0d){const _0x479d4b=a57_0x3e82,_0x4915e6=_0xe8b0f1();while(!![]){try{const _0x470edd=-parseInt(_0x479d4b(0x206))/0x1+parseInt(_0x479d4b(0x20e))/0x2+parseInt(_0x479d4b(0x1f1))/0x3+-parseInt(_0x479d4b(0x207))/0x4+-parseInt(_0x479d4b(0x237))/0x5+-parseInt(_0x479d4b(0x20a))/0x6*(parseInt(_0x479d4b(0x226))/0x7)+-parseInt(_0x479d4b(0x1f5))/0x8*(-parseInt(_0x479d4b(0x22c))/0x9);if(_0x470edd===_0x524c0d)break;else _0x4915e6['push'](_0x4915e6['shift']());}catch(_0x46ba38){_0x4915e6['push'](_0x4915e6['shift']());}}}(a57_0x3ed5,0x6a97b));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a57_0x33f4e1 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1dd45a){const _0x5e51e8=a57_0x3e82;return _0x1dd45a[_0x5e51e8(0x201)]===_0x5e51e8(0x235)||_0x1dd45a[_0x5e51e8(0x201)]===_0x5e51e8(0x234)||_0x1dd45a[_0x5e51e8(0x201)]===_0x5e51e8(0x217)||_0x1dd45a[_0x5e51e8(0x201)]===_0x5e51e8(0x211)||_0x1dd45a[_0x5e51e8(0x235)]===!![]||_0x1dd45a['jsonl']===!![]||_0x1dd45a[_0x5e51e8(0x217)]===!![]||_0x1dd45a[_0x5e51e8(0x211)]===!![];}function a57_0x3e82(_0x29e4ae,_0x9bf435){_0x29e4ae=_0x29e4ae-0x1ec;const _0x3ed59a=a57_0x3ed5();let _0x3e82e3=_0x3ed59a[_0x29e4ae];return _0x3e82e3;}export function parseOutputOptions(_0x103735){const _0x141817=a57_0x3e82;return{'format':_0x103735[_0x141817(0x201)]||'table','output':_0x103735[_0x141817(0x1f8)]||'','limit':_0x103735['limit'],'limitStructuredFormats':_0x103735['limitStructuredFormats'],'color':_0x103735['color'],'noColor':_0x103735[_0x141817(0x233)]};}function convertSDKResultToQueryResult(_0x1f6956){const _0x167fb9=a57_0x3e82,_0x231d65=[];if(_0x1f6956[_0x167fb9(0x222)]>0x0){const _0x452e23=_0x1f6956[0x0];for(const [_0x10282e,_0x23afdc]of Object['entries'](_0x452e23)){let _0x42dc10=_0x167fb9(0x209);if(typeof _0x23afdc===_0x167fb9(0x203))_0x42dc10=Number[_0x167fb9(0x21d)](_0x23afdc)?_0x167fb9(0x216):'double';else{if(typeof _0x23afdc===_0x167fb9(0x1ff))_0x42dc10='boolean';else _0x23afdc===null&&(_0x42dc10=_0x167fb9(0x209));}_0x231d65[_0x167fb9(0x20f)]({'name':_0x10282e,'type':_0x42dc10});}}return{'queryId':_0x167fb9(0x1fc),'columns':_0x231d65,'data':_0x1f6956,'stats':{'state':_0x167fb9(0x210),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1f6956[_0x167fb9(0x222)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x45eafd,_0x27d621){const _0x30cc5c=convertSDKResultToQueryResult(_0x45eafd);return formatQueryOutput(_0x30cc5c,_0x27d621);}export async function formatQueryOutput(_0x1aeff4,_0x16fdb2){const _0x63938=a57_0x3e82,{format:_0x624ddc,limit:_0x42ef2f,output:_0x3e2618,color:_0x493817,noColor:_0x308642,limitStructuredFormats:_0x5d6e05}=_0x16fdb2,_0x5697d0=Boolean(_0x3e2618)&&!_0x493817,_0x218ad3={'color':_0x493817,'noColor':_0x308642||_0x5697d0};if(_0x624ddc===_0x63938(0x211)){const _0x2998ae=shouldUseLess(_0x624ddc,_0x3e2618);return formatAsTable(_0x1aeff4,_0x42ef2f,_0x2998ae,_0x218ad3);}const _0x4098c4=_0x5d6e05&&Number['isFinite'](_0x42ef2f)&&_0x1aeff4[_0x63938(0x22f)]['length']>_0x42ef2f?{..._0x1aeff4,'data':_0x1aeff4['data'][_0x63938(0x220)](0x0,_0x42ef2f)}:_0x1aeff4;if(_0x624ddc===_0x63938(0x235))return formatAsJSON(_0x4098c4,_0x218ad3);else return _0x624ddc==='jsonl'?formatAsJSONL(_0x4098c4,_0x218ad3):formatQueryResult(_0x4098c4,_0x624ddc);}function shouldUseLess(_0x17a292,_0x3e9730){const _0x3354a8=a57_0x3e82;return(_0x17a292===_0x3354a8(0x211)||_0x17a292===_0x3354a8(0x22b))&&process[_0x3354a8(0x1fb)][_0x3354a8(0x1ec)]&&!_0x3e9730;}export function resolveOutputOptions(_0x33e9fa){const _0x3ce079=a57_0x3e82,_0x24d227=_0x33e9fa['output']||'',_0x501814=resolveOutputFormat(_0x33e9fa['format'],_0x24d227,_0x3ce079(0x211));let _0x4d9236=typeof _0x33e9fa['limit']===_0x3ce079(0x203)?_0x33e9fa[_0x3ce079(0x230)]:parseInt(_0x33e9fa['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x33e9fa['limit']===undefined&&shouldUseLess(_0x501814,_0x24d227)&&(_0x4d9236=Infinity),{'format':_0x501814,'output':_0x24d227,'limit':_0x4d9236,'limitStructuredFormats':_0x33e9fa[_0x3ce079(0x202)],'color':_0x33e9fa[_0x3ce079(0x1fa)],'noColor':_0x33e9fa['noColor']};}export function writeOutput(_0x2daa60,_0x1c3764,_0x57df57){const _0x5ada7e=a57_0x3e82;return _0x1c3764?(writeFileSync(_0x1c3764,_0x2daa60),console[_0x5ada7e(0x1f6)](_0x5ada7e(0x200)+_0x1c3764),Promise[_0x5ada7e(0x21a)]()):shouldUseLess(_0x57df57||'','')?new Promise(_0x4b8f2f=>{const _0x5e2ec7=_0x5ada7e,_0x27ac24=spawn(_0x5e2ec7(0x1ed),[_0x5e2ec7(0x221)],{'stdio':[_0x5e2ec7(0x1f9),_0x5e2ec7(0x20d),_0x5e2ec7(0x20d)]});let _0x4ceb14=![];_0x27ac24['on'](_0x5e2ec7(0x1f6),()=>{const _0x5c4349=_0x5e2ec7;!_0x4ceb14&&(_0x4ceb14=!![],console[_0x5c4349(0x236)](_0x2daa60),_0x4b8f2f());}),_0x27ac24['on'](_0x5e2ec7(0x22e),()=>{!_0x4ceb14&&(_0x4ceb14=!![],_0x4b8f2f());}),_0x27ac24['on']('spawn',()=>{const _0x28dc1e=_0x5e2ec7;!_0x4ceb14&&_0x27ac24['stdin']&&(_0x27ac24[_0x28dc1e(0x212)]['on'](_0x28dc1e(0x1f6),()=>{}),_0x27ac24[_0x28dc1e(0x212)]['write'](_0x2daa60),_0x27ac24['stdin']['end']());}),!_0x27ac24[_0x5e2ec7(0x212)]&&(!_0x4ceb14&&(_0x4ceb14=!![],console[_0x5e2ec7(0x236)](_0x2daa60),_0x4b8f2f()));}):(console[_0x5ada7e(0x236)](_0x2daa60),Promise[_0x5ada7e(0x21a)]());}export async function handleSDKOutput(_0x471aae,_0x4e8a02){const _0x49b43f=a57_0x3e82,_0x10cf28=resolveOutputOptions(_0x4e8a02),_0x67aded=await formatSDKOutput(_0x471aae,_0x10cf28);await writeOutput(_0x67aded,_0x10cf28[_0x49b43f(0x1f8)]||undefined,_0x10cf28[_0x49b43f(0x201)]);}function a57_0x3ed5(){const _0x5e8a97=['join','varchar','30UCAeux','max','query','inherit','1114048Vpanrs','push','FINISHED','table','stdin','[params]','stderr','No\x20data','bigint','tsv','cmdout','split','resolve','debug','[query]','isInteger','map','padEnd','slice','-FXRSn','length','stringify','red','string','1077181nkqCky','cyan','rule','[rule]','magenta','list','18TyHtAw','forEach','close','data','limit','trim','keys','noColor','jsonl','json','log','557155hSRBjV','isTTY','less','filter','repeat','object','2286867hhSMOv','bold','[logs]','params','4070544jibGCd','error','[Object]','output','pipe','color','stdout','sdk-result','entries','─┴─','boolean','Results\x20saved\x20to\x20','format','limitStructuredFormats','number','yellow','─┬─','302465RSbgKj','2868140dgqiwu'];a57_0x3ed5=function(){return _0x5e8a97;};return a57_0x3ed5();}export async function handleQueryOutput(_0x318318,_0x281e91){const _0x2f48c3=a57_0x3e82,_0x370b79=resolveOutputOptions(_0x281e91),_0x38002f=await formatQueryOutput(_0x318318,_0x370b79);await writeOutput(_0x38002f,_0x370b79[_0x2f48c3(0x1f8)]||undefined,_0x370b79[_0x2f48c3(0x201)]);}async function formatSingleObject(_0x42bc30,_0x367204){const _0x5ca976=a57_0x3e82,{format:_0x4effc3,color:_0x13b222,noColor:_0x375011}=_0x367204,_0x1d9226={'color':_0x13b222,'noColor':_0x375011};if(_0x4effc3===_0x5ca976(0x235)){if(shouldUseColor(_0x1d9226))return colorizeJSON(_0x42bc30,_0x1d9226);return JSON[_0x5ca976(0x223)](_0x42bc30,null,0x2);}else{if(_0x4effc3==='jsonl'){if(shouldUseColor(_0x1d9226))return colorizeJSONCompact(_0x42bc30,_0x1d9226);return JSON[_0x5ca976(0x223)](_0x42bc30);}else{if(_0x4effc3===_0x5ca976(0x217))return Object[_0x5ca976(0x1fd)](_0x42bc30)[_0x5ca976(0x21e)](([_0xf925e5,_0x145304])=>_0xf925e5+'\x09'+_0x145304)[_0x5ca976(0x208)]('\x0a');else{const _0x9af6cd=Object[_0x5ca976(0x1fd)](_0x42bc30);if(_0x9af6cd[_0x5ca976(0x222)]===0x0)return _0x5ca976(0x215);const _0x58be7e=_0x42bc30['debug'],_0x1d7378=_0x42bc30[_0x5ca976(0x20c)],_0x486d23=_0x42bc30[_0x5ca976(0x1f4)],_0xf28b1=_0x42bc30['rule'],_0x3c2237=_0x1d7378?typeof _0x1d7378===_0x5ca976(0x225)?_0x1d7378:JSON['stringify'](_0x1d7378,null,0x2):undefined,_0x12416f=_0x486d23&&Object[_0x5ca976(0x232)](_0x486d23)[_0x5ca976(0x222)]>0x0?JSON[_0x5ca976(0x223)](_0x486d23,null,0x2):undefined,_0x5e3323=_0xf28b1&&Object[_0x5ca976(0x232)](_0xf28b1)['length']>0x0?JSON[_0x5ca976(0x223)](_0xf28b1,null,0x2):undefined,_0x564d63=_0x9af6cd[_0x5ca976(0x1ee)](([_0x1e9068])=>_0x1e9068!==_0x5ca976(0x21b)&&_0x1e9068!=='query'&&_0x1e9068!==_0x5ca976(0x1f4)&&_0x1e9068!==_0x5ca976(0x228)),_0x3ebc77=Math[_0x5ca976(0x20b)](..._0x564d63[_0x5ca976(0x21e)](([_0x66ac9b])=>_0x66ac9b[_0x5ca976(0x222)])),_0x34ac01=Math[_0x5ca976(0x20b)](..._0x564d63[_0x5ca976(0x21e)](([,_0x47bf2f])=>{const _0x2df5ce=_0x5ca976;try{const _0x1a2db0=_0x47bf2f===null||_0x47bf2f===undefined?'':typeof _0x47bf2f===_0x2df5ce(0x1f0)?JSON[_0x2df5ce(0x223)](_0x47bf2f):String(_0x47bf2f),_0x4ec666=_0x1a2db0[_0x2df5ce(0x219)]('\x0a');return Math[_0x2df5ce(0x20b)](..._0x4ec666[_0x2df5ce(0x21e)](_0x4833b8=>_0x4833b8['length']),0x0);}catch{return 0x0;}}),0x14),_0x40e401=[];_0x40e401['push'](colorBorder('┌─'+'─'['repeat'](_0x3ebc77)+_0x5ca976(0x205)+'─'[_0x5ca976(0x1ef)](_0x34ac01)+'─┐',_0x1d9226)),_0x564d63[_0x5ca976(0x22d)](([_0xac35fd,_0x201a4f])=>{const _0xc6c1b5=_0x5ca976;let _0x1e5e3c;try{_0x1e5e3c=_0x201a4f===null||_0x201a4f===undefined?'':typeof _0x201a4f==='object'?JSON[_0xc6c1b5(0x223)](_0x201a4f):String(_0x201a4f);}catch{_0x1e5e3c=_0xc6c1b5(0x1f7);}const _0x1f9ebe=_0xac35fd[_0xc6c1b5(0x21f)](_0x3ebc77),_0x351865=_0x1e5e3c[_0xc6c1b5(0x219)]('\x0a');_0x351865[_0xc6c1b5(0x22d)]((_0x11ca77,_0x2484e8)=>{const _0x3c4791=_0xc6c1b5,_0x1a1ae7=colorBorder('│',_0x1d9226);_0x2484e8===0x0?_0x40e401[_0x3c4791(0x20f)](_0x1a1ae7+'\x20'+_0x1f9ebe+'\x20'+_0x1a1ae7+'\x20'+_0x11ca77['padEnd'](_0x34ac01)+'\x20'+_0x1a1ae7):_0x40e401[_0x3c4791(0x20f)](_0x1a1ae7+'\x20'+'\x20'[_0x3c4791(0x1ef)](_0x3ebc77)+'\x20'+_0x1a1ae7+'\x20'+_0x11ca77['padEnd'](_0x34ac01)+'\x20'+_0x1a1ae7);});}),_0x40e401[_0x5ca976(0x20f)](colorBorder('└─'+'─'[_0x5ca976(0x1ef)](_0x3ebc77)+_0x5ca976(0x1fe)+'─'[_0x5ca976(0x1ef)](_0x34ac01)+'─┘',_0x1d9226));_0x3c2237&&(_0x40e401['push'](''),_0x40e401[_0x5ca976(0x20f)](String(a57_0x33f4e1[_0x5ca976(0x204)][_0x5ca976(0x1f2)](_0x5ca976(0x21c)))),_0x40e401[_0x5ca976(0x20f)](_0x3c2237));_0x12416f&&(_0x40e401['push'](''),_0x40e401[_0x5ca976(0x20f)](String(a57_0x33f4e1['blue'][_0x5ca976(0x1f2)](_0x5ca976(0x213)))),_0x40e401['push'](_0x12416f));_0x5e3323&&(_0x40e401[_0x5ca976(0x20f)](''),_0x40e401['push'](String(a57_0x33f4e1[_0x5ca976(0x22a)][_0x5ca976(0x1f2)](_0x5ca976(0x229)))),_0x40e401[_0x5ca976(0x20f)](_0x5e3323));if(_0x58be7e){if(_0x58be7e[_0x5ca976(0x214)]){_0x40e401['push'](''),_0x40e401[_0x5ca976(0x20f)](String(a57_0x33f4e1[_0x5ca976(0x224)][_0x5ca976(0x1f2)]('[error]')));const _0x27fe06=_0x58be7e['stderr'][_0x5ca976(0x219)]('\x0a');_0x27fe06[_0x5ca976(0x22d)](_0x5e7863=>{const _0x25932b=_0x5ca976;_0x5e7863[_0x25932b(0x231)]()&&_0x40e401[_0x25932b(0x20f)](_0x5e7863);});}if(_0x58be7e[_0x5ca976(0x218)]){_0x40e401[_0x5ca976(0x20f)](''),_0x40e401[_0x5ca976(0x20f)](String(a57_0x33f4e1[_0x5ca976(0x227)][_0x5ca976(0x1f2)](_0x5ca976(0x1f3))));const _0xcfe197=_0x58be7e[_0x5ca976(0x218)][_0x5ca976(0x219)]('\x0a');_0xcfe197['forEach'](_0x52493b=>{_0x52493b['trim']()&&_0x40e401['push'](_0x52493b);});}}return _0x40e401[_0x5ca976(0x208)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x10f124,_0xada018){const _0x215352=a57_0x3e82;if(_0xada018[_0x215352(0x201)]===_0x215352(0x211)){await handleSDKOutput([_0x10f124],_0xada018);return;}const _0x46fe1f=resolveOutputOptions(_0xada018),_0x16b00a=await formatSingleObject(_0x10f124,_0x46fe1f);await writeOutput(_0x16b00a,_0x46fe1f[_0x215352(0x1f8)]||undefined,_0x46fe1f[_0x215352(0x201)]);}
|
|
1
|
+
(function(_0x24b06f,_0x46712d){const _0x1ec448=a57_0x4e59,_0x4e48ac=_0x24b06f();while(!![]){try{const _0xb5e9c9=-parseInt(_0x1ec448(0x1a3))/0x1+-parseInt(_0x1ec448(0x1a5))/0x2*(-parseInt(_0x1ec448(0x1b0))/0x3)+-parseInt(_0x1ec448(0x1a7))/0x4+parseInt(_0x1ec448(0x198))/0x5+-parseInt(_0x1ec448(0x181))/0x6+parseInt(_0x1ec448(0x1c6))/0x7*(parseInt(_0x1ec448(0x1bc))/0x8)+parseInt(_0x1ec448(0x1a8))/0x9*(-parseInt(_0x1ec448(0x18f))/0xa);if(_0xb5e9c9===_0x46712d)break;else _0x4e48ac['push'](_0x4e48ac['shift']());}catch(_0x5a9a34){_0x4e48ac['push'](_0x4e48ac['shift']());}}}(a57_0x5626,0xf2b71));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a57_0x4e59(_0x4c3238,_0x5eadf3){_0x4c3238=_0x4c3238-0x180;const _0x56268c=a57_0x5626();let _0x4e59f4=_0x56268c[_0x4c3238];return _0x4e59f4;}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a57_0x28f6ba from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1e4bd1){const _0x578ffb=a57_0x4e59;return _0x1e4bd1[_0x578ffb(0x19f)]==='json'||_0x1e4bd1[_0x578ffb(0x19f)]==='jsonl'||_0x1e4bd1[_0x578ffb(0x19f)]===_0x578ffb(0x1a9)||_0x1e4bd1[_0x578ffb(0x19f)]==='table'||_0x1e4bd1[_0x578ffb(0x1ac)]===!![]||_0x1e4bd1['jsonl']===!![]||_0x1e4bd1['tsv']===!![]||_0x1e4bd1[_0x578ffb(0x1aa)]===!![];}export function parseOutputOptions(_0x4e3f82){const _0x108a67=a57_0x4e59;return{'format':_0x4e3f82['format']||'table','output':_0x4e3f82[_0x108a67(0x18a)]||'','limit':_0x4e3f82['limit'],'limitStructuredFormats':_0x4e3f82['limitStructuredFormats'],'color':_0x4e3f82[_0x108a67(0x195)],'noColor':_0x4e3f82['noColor']};}function convertSDKResultToQueryResult(_0x31c048){const _0x5ac48e=a57_0x4e59,_0x2964e8=[];if(_0x31c048[_0x5ac48e(0x197)]>0x0){const _0x255385=_0x31c048[0x0];for(const [_0x5a1c66,_0x472237]of Object[_0x5ac48e(0x194)](_0x255385)){let _0x25f01a=_0x5ac48e(0x18e);if(typeof _0x472237===_0x5ac48e(0x1ab))_0x25f01a=Number['isInteger'](_0x472237)?_0x5ac48e(0x190):_0x5ac48e(0x1c5);else{if(typeof _0x472237==='boolean')_0x25f01a=_0x5ac48e(0x19d);else _0x472237===null&&(_0x25f01a='varchar');}_0x2964e8['push']({'name':_0x5a1c66,'type':_0x25f01a});}}return{'queryId':_0x5ac48e(0x1bf),'columns':_0x2964e8,'data':_0x31c048,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x31c048[_0x5ac48e(0x197)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x3daeed,_0x556729){const _0x480b3e=convertSDKResultToQueryResult(_0x3daeed);return formatQueryOutput(_0x480b3e,_0x556729);}export async function formatQueryOutput(_0x43005c,_0x4a6b72){const _0x283efc=a57_0x4e59,{format:_0x2e8302,limit:_0x2fd45a,output:_0x3d42f9,color:_0x49c07f,noColor:_0x197a83,limitStructuredFormats:_0x59f3b9}=_0x4a6b72,_0x4ee886=Boolean(_0x3d42f9)&&!_0x49c07f,_0x560bc8={'color':_0x49c07f,'noColor':_0x197a83||_0x4ee886};if(_0x2e8302===_0x283efc(0x1aa)){const _0x517817=shouldUseLess(_0x2e8302,_0x3d42f9);return formatAsTable(_0x43005c,_0x2fd45a,_0x517817,_0x560bc8);}const _0x3efca1=_0x59f3b9&&Number[_0x283efc(0x18d)](_0x2fd45a)&&_0x43005c[_0x283efc(0x180)][_0x283efc(0x197)]>_0x2fd45a?{..._0x43005c,'data':_0x43005c[_0x283efc(0x180)]['slice'](0x0,_0x2fd45a)}:_0x43005c;if(_0x2e8302===_0x283efc(0x1ac))return formatAsJSON(_0x3efca1,_0x560bc8);else return _0x2e8302===_0x283efc(0x1c3)?formatAsJSONL(_0x3efca1,_0x560bc8):formatQueryResult(_0x3efca1,_0x2e8302);}function shouldUseLess(_0x341d04,_0x23b2c9){const _0x18c285=a57_0x4e59;return(_0x341d04===_0x18c285(0x1aa)||_0x341d04===_0x18c285(0x19b))&&process['stdout'][_0x18c285(0x1ad)]&&!_0x23b2c9;}function a57_0x5626(){const _0xc7888=['color','repeat','length','9768430iNswQZ','max','─┬─','list','Results\x20saved\x20to\x20','boolean','inherit','format','bold','red','filter','1271346KghIBb','write','232PsKnjk','stdin','865880ZrQbNP','351cOPudp','tsv','table','number','json','isTTY','push','trim','38487YCZOFH','object','less','magenta','[query]','query','resolve','limit','params','[params]','error','map','19720xXCvjR','close','padEnd','sdk-result','-FXRSn','log','keys','jsonl','No\x20data','double','2156RqUyiz','split','data','4312692ilXkEc','blue','noColor','[error]','debug','spawn','─┴─','cmdout','[rule]','output','stderr','stringify','isFinite','varchar','256490LnlxiR','bigint','end','join','forEach','entries'];a57_0x5626=function(){return _0xc7888;};return a57_0x5626();}export function resolveOutputOptions(_0x9b3016){const _0x46f713=a57_0x4e59,_0x2e3f6f=_0x9b3016['output']||'',_0x10afd8=resolveOutputFormat(_0x9b3016[_0x46f713(0x19f)],_0x2e3f6f,_0x46f713(0x1aa));let _0x4dfb5f=typeof _0x9b3016[_0x46f713(0x1b7)]==='number'?_0x9b3016[_0x46f713(0x1b7)]:parseInt(_0x9b3016[_0x46f713(0x1b7)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x9b3016[_0x46f713(0x1b7)]===undefined&&shouldUseLess(_0x10afd8,_0x2e3f6f)&&(_0x4dfb5f=Infinity),{'format':_0x10afd8,'output':_0x2e3f6f,'limit':_0x4dfb5f,'limitStructuredFormats':_0x9b3016['limitStructuredFormats'],'color':_0x9b3016[_0x46f713(0x195)],'noColor':_0x9b3016[_0x46f713(0x183)]};}export function writeOutput(_0x506da5,_0x6efba,_0x53917a){const _0x234496=a57_0x4e59;return _0x6efba?(writeFileSync(_0x6efba,_0x506da5),console[_0x234496(0x1ba)](_0x234496(0x19c)+_0x6efba),Promise['resolve']()):shouldUseLess(_0x53917a||'','')?new Promise(_0x17d01c=>{const _0x8ae9fe=_0x234496,_0x58f8b2=spawn(_0x8ae9fe(0x1b2),[_0x8ae9fe(0x1c0)],{'stdio':['pipe',_0x8ae9fe(0x19e),_0x8ae9fe(0x19e)]});let _0x5e5d5d=![];_0x58f8b2['on'](_0x8ae9fe(0x1ba),()=>{const _0x594226=_0x8ae9fe;!_0x5e5d5d&&(_0x5e5d5d=!![],console[_0x594226(0x1c1)](_0x506da5),_0x17d01c());}),_0x58f8b2['on'](_0x8ae9fe(0x1bd),()=>{!_0x5e5d5d&&(_0x5e5d5d=!![],_0x17d01c());}),_0x58f8b2['on'](_0x8ae9fe(0x186),()=>{const _0x41ac1d=_0x8ae9fe;!_0x5e5d5d&&_0x58f8b2[_0x41ac1d(0x1a6)]&&(_0x58f8b2['stdin']['on'](_0x41ac1d(0x1ba),()=>{}),_0x58f8b2[_0x41ac1d(0x1a6)][_0x41ac1d(0x1a4)](_0x506da5),_0x58f8b2[_0x41ac1d(0x1a6)][_0x41ac1d(0x191)]());}),!_0x58f8b2[_0x8ae9fe(0x1a6)]&&(!_0x5e5d5d&&(_0x5e5d5d=!![],console['log'](_0x506da5),_0x17d01c()));}):(console['log'](_0x506da5),Promise[_0x234496(0x1b6)]());}export async function handleSDKOutput(_0x4ddd55,_0x128291){const _0x4cc8a5=a57_0x4e59,_0x1067c9=resolveOutputOptions(_0x128291),_0x1f620c=await formatSDKOutput(_0x4ddd55,_0x1067c9);await writeOutput(_0x1f620c,_0x1067c9[_0x4cc8a5(0x18a)]||undefined,_0x1067c9[_0x4cc8a5(0x19f)]);}export async function handleQueryOutput(_0x181fc4,_0xee480c){const _0xb2c8e1=a57_0x4e59,_0x33ba8b=resolveOutputOptions(_0xee480c),_0x5ae5fa=await formatQueryOutput(_0x181fc4,_0x33ba8b);await writeOutput(_0x5ae5fa,_0x33ba8b['output']||undefined,_0x33ba8b[_0xb2c8e1(0x19f)]);}async function formatSingleObject(_0x285140,_0x34c9d9){const _0x160d1e=a57_0x4e59,{format:_0x469047,color:_0x8f1fd8,noColor:_0x406ca1}=_0x34c9d9,_0x5d1abd={'color':_0x8f1fd8,'noColor':_0x406ca1};if(_0x469047==='json'){if(shouldUseColor(_0x5d1abd))return colorizeJSON(_0x285140,_0x5d1abd);return JSON[_0x160d1e(0x18c)](_0x285140,null,0x2);}else{if(_0x469047===_0x160d1e(0x1c3)){if(shouldUseColor(_0x5d1abd))return colorizeJSONCompact(_0x285140,_0x5d1abd);return JSON[_0x160d1e(0x18c)](_0x285140);}else{if(_0x469047===_0x160d1e(0x1a9))return Object['entries'](_0x285140)['map'](([_0x1eecfd,_0x13c6fa])=>_0x1eecfd+'\x09'+_0x13c6fa)[_0x160d1e(0x192)]('\x0a');else{const _0x5bd9ed=Object[_0x160d1e(0x194)](_0x285140);if(_0x5bd9ed[_0x160d1e(0x197)]===0x0)return _0x160d1e(0x1c4);const _0x4effba=_0x285140[_0x160d1e(0x185)],_0x58c520=_0x285140[_0x160d1e(0x1b5)],_0x55dbaa=_0x285140[_0x160d1e(0x1b8)],_0x4ccfdd=_0x285140['rule'],_0x3fb406=_0x58c520?typeof _0x58c520==='string'?_0x58c520:JSON[_0x160d1e(0x18c)](_0x58c520,null,0x2):undefined,_0x13fa4a=_0x55dbaa&&Object[_0x160d1e(0x1c2)](_0x55dbaa)[_0x160d1e(0x197)]>0x0?JSON[_0x160d1e(0x18c)](_0x55dbaa,null,0x2):undefined,_0x1b72b9=_0x4ccfdd&&Object['keys'](_0x4ccfdd)[_0x160d1e(0x197)]>0x0?JSON[_0x160d1e(0x18c)](_0x4ccfdd,null,0x2):undefined,_0x1ece0f=_0x5bd9ed[_0x160d1e(0x1a2)](([_0x1594be])=>_0x1594be!==_0x160d1e(0x185)&&_0x1594be!==_0x160d1e(0x1b5)&&_0x1594be!=='params'&&_0x1594be!=='rule'),_0x2183aa=Math[_0x160d1e(0x199)](..._0x1ece0f[_0x160d1e(0x1bb)](([_0x5b578c])=>_0x5b578c[_0x160d1e(0x197)])),_0x28b9a9=Math[_0x160d1e(0x199)](..._0x1ece0f[_0x160d1e(0x1bb)](([,_0x49c6bd])=>{const _0x38a564=_0x160d1e;try{const _0x1c3c05=_0x49c6bd===null||_0x49c6bd===undefined?'':typeof _0x49c6bd===_0x38a564(0x1b1)?JSON[_0x38a564(0x18c)](_0x49c6bd):String(_0x49c6bd),_0x1ff1e1=_0x1c3c05[_0x38a564(0x1c7)]('\x0a');return Math[_0x38a564(0x199)](..._0x1ff1e1[_0x38a564(0x1bb)](_0x586a02=>_0x586a02[_0x38a564(0x197)]),0x0);}catch{return 0x0;}}),0x14),_0x339235=[];_0x339235[_0x160d1e(0x1ae)](colorBorder('┌─'+'─'['repeat'](_0x2183aa)+_0x160d1e(0x19a)+'─'[_0x160d1e(0x196)](_0x28b9a9)+'─┐',_0x5d1abd)),_0x1ece0f[_0x160d1e(0x193)](([_0x54a22e,_0x31adf8])=>{const _0x1d7adc=_0x160d1e;let _0x3a2150;try{_0x3a2150=_0x31adf8===null||_0x31adf8===undefined?'':typeof _0x31adf8==='object'?JSON[_0x1d7adc(0x18c)](_0x31adf8):String(_0x31adf8);}catch{_0x3a2150='[Object]';}const _0xc3813c=_0x54a22e[_0x1d7adc(0x1be)](_0x2183aa),_0xb3a16d=_0x3a2150[_0x1d7adc(0x1c7)]('\x0a');_0xb3a16d[_0x1d7adc(0x193)]((_0x4c2d8b,_0xd4a9ba)=>{const _0x47de5d=_0x1d7adc,_0x343c1c=colorBorder('│',_0x5d1abd);_0xd4a9ba===0x0?_0x339235['push'](_0x343c1c+'\x20'+_0xc3813c+'\x20'+_0x343c1c+'\x20'+_0x4c2d8b[_0x47de5d(0x1be)](_0x28b9a9)+'\x20'+_0x343c1c):_0x339235[_0x47de5d(0x1ae)](_0x343c1c+'\x20'+'\x20'[_0x47de5d(0x196)](_0x2183aa)+'\x20'+_0x343c1c+'\x20'+_0x4c2d8b[_0x47de5d(0x1be)](_0x28b9a9)+'\x20'+_0x343c1c);});}),_0x339235[_0x160d1e(0x1ae)](colorBorder('└─'+'─'[_0x160d1e(0x196)](_0x2183aa)+_0x160d1e(0x187)+'─'['repeat'](_0x28b9a9)+'─┘',_0x5d1abd));_0x3fb406&&(_0x339235['push'](''),_0x339235[_0x160d1e(0x1ae)](String(a57_0x28f6ba['yellow'][_0x160d1e(0x1a0)](_0x160d1e(0x1b4)))),_0x339235['push'](_0x3fb406));_0x13fa4a&&(_0x339235[_0x160d1e(0x1ae)](''),_0x339235['push'](String(a57_0x28f6ba[_0x160d1e(0x182)][_0x160d1e(0x1a0)](_0x160d1e(0x1b9)))),_0x339235['push'](_0x13fa4a));_0x1b72b9&&(_0x339235[_0x160d1e(0x1ae)](''),_0x339235[_0x160d1e(0x1ae)](String(a57_0x28f6ba[_0x160d1e(0x1b3)][_0x160d1e(0x1a0)](_0x160d1e(0x189)))),_0x339235[_0x160d1e(0x1ae)](_0x1b72b9));if(_0x4effba){if(_0x4effba[_0x160d1e(0x18b)]){_0x339235[_0x160d1e(0x1ae)](''),_0x339235[_0x160d1e(0x1ae)](String(a57_0x28f6ba[_0x160d1e(0x1a1)][_0x160d1e(0x1a0)](_0x160d1e(0x184))));const _0x35df2a=_0x4effba[_0x160d1e(0x18b)][_0x160d1e(0x1c7)]('\x0a');_0x35df2a[_0x160d1e(0x193)](_0x153c87=>{const _0x2b4dad=_0x160d1e;_0x153c87[_0x2b4dad(0x1af)]()&&_0x339235[_0x2b4dad(0x1ae)](_0x153c87);});}if(_0x4effba[_0x160d1e(0x188)]){_0x339235[_0x160d1e(0x1ae)](''),_0x339235[_0x160d1e(0x1ae)](String(a57_0x28f6ba['cyan'][_0x160d1e(0x1a0)]('[logs]')));const _0x5c223d=_0x4effba[_0x160d1e(0x188)][_0x160d1e(0x1c7)]('\x0a');_0x5c223d['forEach'](_0x4aa666=>{const _0x38b39d=_0x160d1e;_0x4aa666[_0x38b39d(0x1af)]()&&_0x339235[_0x38b39d(0x1ae)](_0x4aa666);});}}return _0x339235[_0x160d1e(0x192)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x36b571,_0x470363){const _0x1f207d=a57_0x4e59;if(_0x470363[_0x1f207d(0x19f)]==='table'){await handleSDKOutput([_0x36b571],_0x470363);return;}const _0x19c292=resolveOutputOptions(_0x470363),_0x1e794f=await formatSingleObject(_0x36b571,_0x19c292);await writeOutput(_0x1e794f,_0x19c292['output']||undefined,_0x19c292[_0x1f207d(0x19f)]);}
|