@treasuredata/tdx 0.22.0 → 0.23.0
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/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/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.d.ts +11 -2
- package/dist/commands/parent-segment-command.d.ts.map +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/parent-segment-command.js.map +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/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.d.ts +1 -0
- package/dist/core/profile.d.ts.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/profile.js.map +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/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/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/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.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-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-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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.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.d.ts +24 -0
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/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/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a40_0x12bbdd=a40_0x4224;(function(_0x1dd600,_0x4e5ded){const _0x350cb8=a40_0x4224,_0x1368c5=_0x1dd600();while(!![]){try{const _0x2896f4=-parseInt(_0x350cb8(0xaf))/0x1+parseInt(_0x350cb8(0x7c))/0x2+parseInt(_0x350cb8(0xa5))/0x3*(parseInt(_0x350cb8(0xa6))/0x4)+parseInt(_0x350cb8(0x91))/0x5+-parseInt(_0x350cb8(0x77))/0x6+parseInt(_0x350cb8(0x8b))/0x7+-parseInt(_0x350cb8(0xac))/0x8*(parseInt(_0x350cb8(0xa7))/0x9);if(_0x2896f4===_0x4e5ded)break;else _0x1368c5['push'](_0x1368c5['shift']());}catch(_0x4fd2fa){_0x1368c5['push'](_0x1368c5['shift']());}}}(a40_0x1ff2,0x445f8));function a40_0x1ff2(){const _0x42c945=['(session:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','length','name','llm_project','database','agent','default','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Session\x20engage_workspace\x20set\x20to:\x20','Session\x20database\x20set\x20to:\x20','404259FhmMhu','4vKjgkO','252dWHfga','error','validate','Session\x20context\x20','session','151464BIysYQ','use','engage_workspace','13953fcGKzv','parent_segment','includes','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','.\x20Must\x20be\x20one\x20of:\x20','1398780ZAzjbl','dim','llm_agent','Session\x20agent\x20set\x20to:\x20','Invalid\x20resource:\x20','591816nmofSK','cleared','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','Default\x20site\x20set\x20to:\x20','profile','Session\x20site\x20set\x20to:\x20','\x27\x20does\x20not\x20exist','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Set\x20session-level\x20context','green','execute','description','tdx.json','\x0aSaved\x20to:\x20','895104DoJiqW','Session\x20llm_project\x20set\x20to:\x20','displayWithSources','Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently','Error:\x20Profile\x20\x27','site','2493650derXKh','\x27\x20to\x20save\x20permanently','join','display','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','log','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','debug'];a40_0x1ff2=function(){return _0x42c945;};return a40_0x1ff2();}import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';function a40_0x4224(_0x7ebda0,_0x57838a){_0x7ebda0=_0x7ebda0-0x76;const _0x1ff297=a40_0x1ff2();let _0x422438=_0x1ff297[_0x7ebda0];return _0x422438;}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0x4076c2 from'chalk';import*as a40_0x3f3168 from'node:path';export class UseCommand extends BaseCommand{[a40_0x12bbdd(0x9d)]=a40_0x12bbdd(0xad);[a40_0x12bbdd(0x88)]=a40_0x12bbdd(0x85);[a40_0x12bbdd(0xa9)](_0x332070){const _0x121108=a40_0x12bbdd,{args:_0x25fc7b,options:_0x2c54c2}=_0x332070,_0x4cb721=_0x2c54c2[_0x121108(0xa1)];if(_0x25fc7b[_0x121108(0x9c)]===0x0)return undefined;if(_0x25fc7b[_0x121108(0x9c)]===0x1)return _0x121108(0x97)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+_0x121108(0x9b)+_0x121108(0xb2)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x121108(0x98)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x5aa807=_0x25fc7b[0x0],_0x4d8b6b=['site',_0x121108(0x9f),_0x121108(0xb0),_0x121108(0x9e),_0x121108(0xa0),_0x121108(0x81),'engage_workspace'];if(!_0x4d8b6b[_0x121108(0xb1)](_0x5aa807))return _0x121108(0x7b)+_0x5aa807+_0x121108(0x76)+_0x4d8b6b[_0x121108(0x93)](',\x20');if(_0x4cb721&&_0x5aa807!==_0x121108(0x90)&&_0x5aa807!=='profile')return _0x121108(0x95);return undefined;}async[a40_0x12bbdd(0x87)](_0x1d184e){const _0x5a67e4=a40_0x12bbdd,{args:_0x2b3392,options:_0x475145}=_0x1d184e,_0x35cc7f=_0x475145[_0x5a67e4(0x99)],_0x5ea4ab=_0x475145['clear'],_0x4f9a53=_0x475145[_0x5a67e4(0xa1)];cleanExpiredSessions();try{if(_0x5ea4ab){clearSessionContext(_0x475145['session']);const _0x429599=getSessionID(_0x475145[_0x5a67e4(0xab)]);return console[_0x5a67e4(0x96)](_0x5a67e4(0xaa)+a40_0x4076c2['green'](_0x5a67e4(0x7d))+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)]('(session:\x20'+_0x429599+')')),0x0;}if(_0x2b3392[_0x5a67e4(0x9c)]===0x0){const _0x3e5f58=new GlobalContext(_0x475145);return _0x35cc7f?_0x3e5f58[_0x5a67e4(0x8d)]():_0x3e5f58[_0x5a67e4(0x94)](),console[_0x5a67e4(0x96)](a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x7e))),console['log'](a40_0x4076c2['dim'](_0x5a67e4(0x7f))),console[_0x5a67e4(0x96)](a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x8e))),0x0;}const _0x5d53ef=_0x2b3392[0x0],_0x487e25=_0x2b3392[0x1],_0x2e5745=a40_0x3f3168[_0x5a67e4(0x93)](getConfigDir(),_0x5a67e4(0x89));if(_0x4f9a53){if(_0x5d53ef===_0x5a67e4(0x90))return saveDefaultSiteToUserConfig(_0x487e25),console[_0x5a67e4(0x96)](_0x5a67e4(0x80)+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)),console['log'](a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x8a)+_0x2e5745)),0x0;if(_0x5d53ef===_0x5a67e4(0x81)){if(!profileExists(_0x487e25))return console[_0x5a67e4(0xa8)](_0x5a67e4(0x8f)+_0x487e25+_0x5a67e4(0x83)),console[_0x5a67e4(0xa8)](_0x5a67e4(0x84)),0x1;return saveActiveProfileToUserConfig(_0x487e25),console[_0x5a67e4(0x96)]('Default\x20profile\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)),console[_0x5a67e4(0x96)](a40_0x4076c2['dim'](_0x5a67e4(0x8a)+_0x2e5745)),0x0;}}if(_0x5d53ef===_0x5a67e4(0x90)){const _0x4446de=getSessionID(_0x475145[_0x5a67e4(0xab)]);return saveSessionContext({'site':_0x487e25},_0x475145[_0x5a67e4(0xab)]),console[_0x5a67e4(0x96)](_0x5a67e4(0x82)+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x9a)+_0x4446de+')')),console['log'](a40_0x4076c2[_0x5a67e4(0x78)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x487e25+_0x5a67e4(0x92))),0x0;}if(_0x5d53ef===_0x5a67e4(0x81)){if(!profileExists(_0x487e25))return console[_0x5a67e4(0xa8)](_0x5a67e4(0x8f)+_0x487e25+'\x27\x20does\x20not\x20exist'),console['error'](_0x5a67e4(0x84)),0x1;const _0x35f9b7=getSessionID(_0x475145[_0x5a67e4(0xab)]);return saveSessionContext({'profile':_0x487e25},_0x475145['session']),console[_0x5a67e4(0x96)]('Session\x20profile\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x9a)+_0x35f9b7+')')),console['log'](a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0xa2)+_0x487e25+_0x5a67e4(0x92))),0x0;}const _0x2c94b7={},_0x5967a8=getSessionID(_0x475145[_0x5a67e4(0xab)]);switch(_0x5d53ef){case'database':_0x2c94b7[_0x5a67e4(0x9f)]=_0x487e25,console['log'](_0x5a67e4(0xa4)+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2['dim'](_0x5a67e4(0x9a)+_0x5967a8+')'));break;case _0x5a67e4(0xb0):_0x2c94b7[_0x5a67e4(0xb0)]=_0x487e25,console['log']('Session\x20parent_segment\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)](_0x5a67e4(0x9a)+_0x5967a8+')'));break;case _0x5a67e4(0x9e):_0x2c94b7['llm_project']=_0x487e25,console['log']('Session\x20llm_project\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2['dim'](_0x5a67e4(0x9a)+_0x5967a8+')'));break;case'agent':{const {projectName:_0x28b27a,agentName:_0x22a799}=parseAgentRef(_0x487e25);_0x22a799?(_0x2c94b7[_0x5a67e4(0x9e)]=_0x28b27a,_0x2c94b7['llm_agent']=_0x22a799,console['log'](_0x5a67e4(0x8c)+a40_0x4076c2[_0x5a67e4(0x86)](_0x28b27a)+'\x20'+a40_0x4076c2['dim'](_0x5a67e4(0x9a)+_0x5967a8+')')),console[_0x5a67e4(0x96)](_0x5a67e4(0x7a)+a40_0x4076c2[_0x5a67e4(0x86)](_0x22a799)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)]('(session:\x20'+_0x5967a8+')'))):(_0x2c94b7[_0x5a67e4(0x79)]=_0x487e25,console[_0x5a67e4(0x96)]('Session\x20agent\x20set\x20to:\x20'+a40_0x4076c2[_0x5a67e4(0x86)](_0x487e25)+'\x20'+a40_0x4076c2['dim'](_0x5a67e4(0x9a)+_0x5967a8+')')));break;}case _0x5a67e4(0xae):_0x2c94b7[_0x5a67e4(0xae)]=_0x487e25,console[_0x5a67e4(0x96)](_0x5a67e4(0xa3)+a40_0x4076c2['green'](_0x487e25)+'\x20'+a40_0x4076c2[_0x5a67e4(0x78)]('(session:\x20'+_0x5967a8+')'));break;}return saveSessionContext(_0x2c94b7,_0x475145[_0x5a67e4(0xab)]),console[_0x5a67e4(0x96)](a40_0x4076c2[_0x5a67e4(0x78)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}catch(_0x16f2bf){return _0x16f2bf instanceof Error&&console[_0x5a67e4(0xa8)]('Error:\x20'+_0x16f2bf['message']),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x20f1c8=a41_0x4bfd;(function(_0x2c9d3c,_0xf78ae8){const _0x560bd6=a41_0x4bfd,_0x4fc886=_0x2c9d3c();while(!![]){try{const _0x100b57=parseInt(_0x560bd6(0x89))/0x1+parseInt(_0x560bd6(0x8f))/0x2+-parseInt(_0x560bd6(0x7a))/0x3+-parseInt(_0x560bd6(0x87))/0x4+parseInt(_0x560bd6(0x7c))/0x5*(parseInt(_0x560bd6(0x8e))/0x6)+-parseInt(_0x560bd6(0x83))/0x7+parseInt(_0x560bd6(0x8c))/0x8;if(_0x100b57===_0xf78ae8)break;else _0x4fc886['push'](_0x4fc886['shift']());}catch(_0xb2de2d){_0x4fc886['push'](_0x4fc886['shift']());}}}(a41_0xc0c9,0x9c2b7));import{BaseCommand}from'./command.js';function a41_0xc0c9(){const _0x344ff9=['3443940QHeTme','data','263651wwkMkS','error','getCurrent','3196064kawuFV','verbose','6JLIDHY','2284840sFPjmA','\x20\x20Cause:\x20','message','Show\x20current\x20user\x20information','cause','length','list','description','1530111RVjFcZ','name','6147165wJXRwO','Error:\x20','user','Listing\x20users...','List\x20all\x20users\x20in\x20the\x20account','Fetching\x20user\x20info...','✔\x20Found\x20','7170233ubuMmr','execute','user\x20list','\x20user'];a41_0xc0c9=function(){return _0x344ff9;};return a41_0xc0c9();}import{SDKError}from'../sdk/index.js';function a41_0x4bfd(_0x30f08c,_0xae69e0){_0x30f08c=_0x30f08c-0x75;const _0xc0c903=a41_0xc0c9();let _0x4bfdce=_0xc0c903[_0x30f08c];return _0x4bfdce;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x20f1c8(0x7b)]=a41_0x20f1c8(0x7e);['description']=a41_0x20f1c8(0x75);async[a41_0x20f1c8(0x84)](_0x1f2ac5){const _0x3c5943=a41_0x20f1c8,{options:_0x3b714f,tdx:_0x380a7d}=_0x1f2ac5;try{const _0x4934ca=await withSpinner(_0x3c5943(0x81),()=>_0x380a7d[_0x3c5943(0x7e)][_0x3c5943(0x8b)](),{'verbose':_0x3b714f[_0x3c5943(0x8d)]}),_0x121762=_0x4934ca[_0x3c5943(0x88)];return await handleSingleObjectOutput(_0x121762,_0x3b714f),0x0;}catch(_0x5c8ebd){if(_0x5c8ebd instanceof SDKError)return console[_0x3c5943(0x8a)]('Error:\x20'+_0x5c8ebd[_0x3c5943(0x91)]),_0x5c8ebd['cause']&&console[_0x3c5943(0x8a)](_0x3c5943(0x90)+_0x5c8ebd[_0x3c5943(0x76)]),0x1;throw _0x5c8ebd;}}}export class UserListCommand extends BaseCommand{[a41_0x20f1c8(0x7b)]=a41_0x20f1c8(0x85);[a41_0x20f1c8(0x79)]=a41_0x20f1c8(0x80);async[a41_0x20f1c8(0x84)](_0x268472){const _0x593123=a41_0x20f1c8,{options:_0x5052b9,tdx:_0x4f163c}=_0x268472;try{const _0x454a0a=await withSpinner(_0x593123(0x7f),()=>_0x4f163c[_0x593123(0x7e)][_0x593123(0x78)](),{'verbose':_0x5052b9[_0x593123(0x8d)]}),_0x281378=_0x454a0a['data'];return console[_0x593123(0x8a)](_0x593123(0x82)+_0x281378['length']+_0x593123(0x86)+(_0x281378[_0x593123(0x77)]!==0x1?'s':'')),await handleSDKOutput(_0x281378,_0x5052b9),0x0;}catch(_0x1e341f){if(_0x1e341f instanceof SDKError)return console[_0x593123(0x8a)](_0x593123(0x7d)+_0x1e341f[_0x593123(0x91)]),_0x1e341f['cause']&&console[_0x593123(0x8a)](_0x593123(0x90)+_0x1e341f['cause']),0x1;throw _0x1e341f;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a42_0x46b63f=a42_0x33bf;function a42_0xcd18(){const _0x474c67=['indexOf','projects','sort','floor','✔\x20Pushed\x20','Error:\x20Project\x20name\x20is\x20required','List\x20all\x20workflow\x20projects','\x20unchanged','json','No\x20sessions\x20found\x20for:\x20','executePushProject','navigateSessionsInteractive','dim','running','showWorkflowConsoleUrl','\x20\x20Target:\x20','modified','Updating\x20','Project\x20name:\x20','isNewProject','workflowProject','newProjectName','stat','\x20\x20tdx\x20wf\x20use\x20<project>','705333cTAUjX','1694328UVaYYk','diff','Resume\x20from:\x20','description','toLowerCase','Files\x20to\x20upload:\x20','has','keys','LABEL_MIN_SPACING','name','utf-8','No\x20attempts\x20found\x20for:\x20','\x20logs','total','\x20\x20Location:\x20','attempt','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','List\x20workflow\x20attempts','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','Target\x20directory:\x20','Deleting\x20project\x20','task','✔\x20Pull\x20complete','site','renderSingleTimeline','attemptId','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','taskName','\x20sessions\x20','Session\x20','session','unknown','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','workflow:kill','jsonl','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','filter','map','createdAt','existingProjectId','Pulling\x20project\x20','No\x20log\x20content\x20found','\x0aApply\x20these\x20changes?','renderSessionsTimeline','Getting\x20attempt\x20details...','Session\x20not\x20found:\x20','GUTTER','sessionTime','repeat','lastAttempt','cancelRequested','listSecrets','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','Show\x20specific\x20attempt\x20details','list','targetExists','relative','text','padStart','finishedAt','\x0a✔\x20No\x20changes\x20to\x20push','isTTY','📁\x20','splice','workflow:attempts','state','resolve','\x1b[1A\x1b[2K','delete','pollTimeline','generateSessionTimelineRows','Key\x20cannot\x20be\x20empty','fill','No\x20projects\x20match\x20pattern:\x20','4vnfzxz','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','msPerChar','cyan','Analyzing\x20changes...','💡\x20Tip:\x20Use\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','.\x20Expected\x20format:\x20KEY=VALUE','POLL_INTERVAL_MS','Error:\x20','\x20project','workflow:attempt','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','table','20SIqdVF','min','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','✔\x20Secret\x20\x27','Latest\x20session\x20has\x20no\x20attempt','\x0aFailed\x20to\x20fetch\x20attempt\x20data','resolveProjectDir','round','Downloading\x20logs...','Project\x20filter:\x20','green','reason','Validation:\x20skipped','parse','workflow:delete','revision','Project\x20directory:\x20','duration','Project:\x20','Downloading\x20project\x20','\x20from\x20session\x20','Expected\x20format:\x20--param\x20key=value','dryRun','Listing\x20workflow\x20projects...','sourceDir','download','window','pending','substring','\x0a✔\x20Attempt\x20complete','No\x20sessions\x20found','Listing\x20workflow\x20attempts...','Workflow:\x20','split',',\x20Workflow:\x20','\x20\x20Console:\x20','Include\x20retried:\x20yes','localeCompare','workflow:run','(unknown)','logFiles','path','summary','Show\x20tasks\x20for\x20an\x20attempt','group_error','No\x20attempts\x20found','startsWith','run','MAX_TASKS_DISPLAY','Error:','MAX_POLL_ITERATIONS','\x20\x20Workflow:\x20','index','1716VxBihx','key','✔\x20Project:\x20','canceling','follow','Task\x20name:\x20','Setting\x20secret...','No\x20log\x20files\x20found\x20for\x20this\x20attempt','param','Deleting\x20secret...','write','workflowName','limit','values','Filter:\x20project=','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','New\x20project\x20name:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','Writing\x20files...','Kill\x20a\x20running\x20attempt','set','No\x20sessions\x20found\x20in\x20project:\x20','resumeFrom','cwd','\x27...','Dry\x20run:\x20yes','setSecret','get','List\x20workflow\x20execution\x20sessions','✔\x20Workflow\x20project\x20set\x20to:\x20','start','Filter:\x20','workflow:timeline','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','14RPAEdG','\x0a✔\x20Already\x20up\x20to\x20date','---\x20','Pattern:\x20','workflow','Analyzing\x20project...','\x20of\x20','Invalid\x20format:\x20','log','stdout','Output\x20directory:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20tasks','\x22\x20to\x20new\x20project\x20\x22','\x0aPolling...\x20(','resolveProjectId','workflow:download','Getting\x20attempt\x20tasks...','getMonth','\x20task','/app/workflows/','\x20\x20Project\x20ID:\x20','attempts','Loading\x20session...','newProjectId','\x20\x20Changes:\x20','\x20-\x20','rows','output','join','Project\x20name\x20is\x20required','context','Source:\x20','status','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Target:\x20','params','readFile','resolveProject','Killing\x20attempt...','Listing\x20workflows...','planned','\x20\x20Session\x20ID:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Attempt:\x20','✔\x20Found\x20','\x20has\x20no\x20attempts','workflow:pull','title','displayLine','some','📋\x20','Loading\x20workflows...','match','146358ulCFqL','trim','Auto-selected\x20latest\x20session:\x20','workflow:push','→\x20New\x20project:\x20','type','data','Session\x20time:\x20','\x0aClone\x20\x22','yellow','Parameters:\x20','applyPullProject','columns','slice','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','trimEnd','Error:\x20Attempt\x20ID\x20is\x20required','retrySession','\x20\x20Revision:\x20','retryAttemptName','targetDir','every','isArray','startTime','Fetching\x20log\x20files...','getMinutes','workflow:sessions','skipValidation','startedAt','workflow:retry','renderTimeline','format','fileCount','Resolving\x20project\x20\x27','✔\x20Push\x20complete','value','getDate','\x20session','Attempt\x20ID:\x20','workflow:logs','\x20(use\x20--limit\x20to\x20show\x20more)','workflow:secrets:set','requireProject','sessions','execute','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','sys','blue','fullName','workflow:upload','workflow:use','Retrying\x20attempt...','No\x20matching\x20sessions\x20found','Using\x20attempt\x20','Retry\x20a\x20session\x20or\x20attempt','yes','retryAttempt','preparePushProject','\x0aDry\x20run\x20-\x20nothing\x20pushed','changes','metadata','projectName','(use\x20--limit\x20to\x20see\x20more)','attempt:','\x0a⚠\x20Project\x20\x22','Select\x20a\x20workflow\x20to\x20run','select','success','\x0aDry\x20run\x20-\x20no\x20project\x20created','Error:\x20Invalid\x20parameter\x20format:\x20','tasks','workflow:secrets:delete','27243564ncAtLF','\x22\x20with\x20new\x20revision?','Status:\x20','\x20\x20Attempt\x20ID:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','\x20is\x20not\x20a\x20directory','Source\x20directory\x20is\x20required','Show\x20logs\x20for\x20a\x20workflow\x20attempt','updatedAt','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Usage:\x20tdx\x20wf\x20use\x20<project>','\x20(system)','Total:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','/sessions/','getTime','message','now','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','-\x20no\x20files\x20written','parseProjectWorkflowPattern','sourceProjectName','project','\x27\x20from\x20project\x20\x27','getFullYear','Starting\x20workflow\x20run...','executeCloneProject','sessionId','includes','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','workflows','isDirectory','length','/attempt/','Error:\x20Secret\x20key\x20is\x20required','max','\x20\x20Source:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','...','white','filesExtracted','25290CWLiDB','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','verbose','hasChanges','Cancelled','⚠\x20Showing\x20first\x20','\x22\x20already\x20exists\x20(ID:\x20','red','No\x20workflows\x20found','LABEL_WIDTH_DIVISOR','getHours','fileSize','Key:\x20','ICON_WIDTH','✔\x20Showing\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','MAX_TIMELINE_WIDTH','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Cloning\x20to\x20','\x0aError:','error','projectId','MIN_TIMELINE_WIDTH','\x20\x20Project:\x20','push','Source\x20directory:\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','find','all','\x20\x20Session\x20context\x20set\x20to:\x20','2546600TXTDxf','done','From\x20task:\x20','\x20deleted','232qDYdsZ','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','TASK_NAME_WIDTH','Usage:\x20workflow:delete\x20<project-name-or-id>','\x20modified','15259qSzZBK','Start\x20a\x20workflow\x20run','workflow:projects','revision:\x20','force','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','unchanged','buildTimelineData','Revision:\x20','logs','✔\x20Project\x20updated','session:','toISOString'];a42_0xcd18=function(){return _0x474c67;};return a42_0xcd18();}(function(_0x254227,_0x474a67){const _0x591e1b=a42_0x33bf,_0x28b605=_0x254227();while(!![]){try{const _0x24447c=-parseInt(_0x591e1b(0x1e9))/0x1*(parseInt(_0x591e1b(0x269))/0x2)+parseInt(_0x591e1b(0x20e))/0x3*(parseInt(_0x591e1b(0x25a))/0x4)+-parseInt(_0x591e1b(0x1e0))/0x5+-parseInt(_0x591e1b(0x20f))/0x6*(parseInt(_0x591e1b(0x2c0))/0x7)+parseInt(_0x591e1b(0x1e4))/0x8*(-parseInt(_0x591e1b(0x2f6))/0x9)+parseInt(_0x591e1b(0x1c2))/0xa*(-parseInt(_0x591e1b(0x29e))/0xb)+parseInt(_0x591e1b(0x33e))/0xc;if(_0x24447c===_0x474a67)break;else _0x28b605['push'](_0x28b605['shift']());}catch(_0x4789a3){_0x28b605['push'](_0x28b605['shift']());}}}(a42_0xcd18,0x64bb8));import a42_0x5eecb4 from'chalk';import{existsSync}from'fs';import a42_0x15acaf 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 a42_0x2f989f from'prompts';function getAttemptStatusDisplay(_0x21f44a){const _0x13ec30=a42_0x33bf;if(!_0x21f44a)return{'icon':'⏳','text':''};const {done:_0x5846d5,success:_0x28123c,cancelRequested:_0x50e7a1}=_0x21f44a;if(!_0x5846d5)return _0x50e7a1?{'icon':'🛑','text':a42_0x5eecb4[_0x13ec30(0x2ff)](_0x13ec30(0x2a1))}:{'icon':'🔄','text':a42_0x5eecb4[_0x13ec30(0x325)]('running')};if(_0x28123c)return{'icon':'✅','text':a42_0x5eecb4['green'](_0x13ec30(0x339))};return{'icon':'❌','text':a42_0x5eecb4[_0x13ec30(0x1c9)](_0x13ec30(0x1d6))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x46b63f(0x2e6)](_0x5f9ef7,_0x2f984a,_0x1ee128=0x0){const _0x35834d=a42_0x46b63f;return _0x5f9ef7[_0x1ee128]||_0x2f984a[_0x35834d(0x20a)];}[a42_0x46b63f(0x320)](_0x349303,_0x29851c,_0x48597c=0x0){const _0x5295bd=a42_0x46b63f,_0x308e51=this['resolveProject'](_0x349303,_0x29851c,_0x48597c);if(!_0x308e51)return console['error'](a42_0x5eecb4[_0x5295bd(0x1c9)](_0x5295bd(0x29a)),_0x5295bd(0x2de)),console[_0x5295bd(0x1d6)](a42_0x5eecb4[_0x5295bd(0x202)](_0x5295bd(0x267))),null;return _0x308e51;}[a42_0x46b63f(0x354)](_0x1387c1,_0x43215b){const _0x197eb0=a42_0x46b63f;if(_0x1387c1[0x0]){const _0x5538b9=_0x1387c1[0x0]['split']('.');if(_0x5538b9[_0x197eb0(0x360)]===0x1)return{'projectName':_0x5538b9[0x0],'workflowName':undefined};else return _0x5538b9[_0x197eb0(0x360)]===0x2?{'projectName':_0x5538b9[0x0],'workflowName':_0x5538b9[0x1]}:(console[_0x197eb0(0x1d6)](a42_0x5eecb4[_0x197eb0(0x1c9)](_0x197eb0(0x29a)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x43215b['workflowProject'],'workflowName':undefined};}[a42_0x46b63f(0x26f)](_0x103673,_0x2407f1,_0x495bea=0x0){const _0x9eed5b=a42_0x46b63f;if(_0x103673[_0x495bea])return _0x103673[_0x495bea];if(_0x2407f1[_0x9eed5b(0x20a)]){const _0x2113b9=a42_0x15acaf['join'](process[_0x9eed5b(0x2b5)](),_0x9eed5b(0x35e),_0x2407f1[_0x9eed5b(0x20a)]);if(existsSync(a42_0x15acaf[_0x9eed5b(0x2dd)](_0x2113b9,'tdx.json')))return _0x2113b9;}return undefined;}async[a42_0x46b63f(0x204)](_0x363ae4,_0x5e78cb,_0x436b1d){const _0x591b45=a42_0x46b63f;try{const _0x27ccd9=await _0x363ae4[_0x591b45(0x2c4)]['workflows'](_0x5e78cb,{'limit':0x1});if(_0x27ccd9['length']>0x0){const _0x3525c1=_0x27ccd9[0x0]['id'],_0x33a9f2=getWorkflowUrl(_0x436b1d,_0x3525c1);console[_0x591b45(0x1d6)](_0x591b45(0x28c)+a42_0x5eecb4[_0x591b45(0x25d)](_0x33a9f2));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x328);[a42_0x46b63f(0x212)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a42_0x46b63f(0x322)](_0xd9ea9a){const _0x2471cc=a42_0x46b63f,{options:_0x325d21,args:_0x1b33d0,tdx:_0xae4467}=_0xd9ea9a,_0x5045d2=_0x1b33d0[0x0],_0x311ca0=_0x325d21['clear'];if(_0x311ca0)return saveSessionContext({'workflow_project':undefined},_0x325d21[_0x2471cc(0x22e)]),console[_0x2471cc(0x2c8)](a42_0x5eecb4['green']('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x5045d2)return console[_0x2471cc(0x1d6)](a42_0x5eecb4[_0x2471cc(0x1c9)](_0x2471cc(0x29a)),_0x2471cc(0x2de)),console[_0x2471cc(0x1d6)](a42_0x5eecb4['dim'](_0x2471cc(0x348))),console['error'](a42_0x5eecb4[_0x2471cc(0x202)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x3717b8=await withSpinner(_0x2471cc(0x317)+_0x5045d2+_0x2471cc(0x2b6),()=>_0xae4467[_0x2471cc(0x2c4)][_0x2471cc(0x2cf)](_0x5045d2),{'verbose':_0x325d21[_0x2471cc(0x1c4)]}),{name:_0x5e486e}=_0x3717b8[_0x2471cc(0x2fc)];return saveSessionContext({'workflow_project':_0x5e486e},_0x325d21['session']),console[_0x2471cc(0x2c8)](a42_0x5eecb4[_0x2471cc(0x273)](_0x2471cc(0x2bb)+a42_0x5eecb4['cyan'](_0x5e486e))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x1eb);['description']=a42_0x46b63f(0x1fc);async[a42_0x46b63f(0x322)](_0x45baa1){const _0x35cdc8=a42_0x46b63f,{options:_0x347fd4,args:_0x3177d0,tdx:_0x459459}=_0x45baa1,_0x309da9=_0x3177d0[0x0];_0x347fd4[_0x35cdc8(0x1c4)]&&_0x309da9&&console[_0x35cdc8(0x1d6)](_0x35cdc8(0x2c3)+_0x309da9);const _0x2e394d=await withSpinner(_0x35cdc8(0x280),()=>_0x459459[_0x35cdc8(0x2c4)][_0x35cdc8(0x1f7)](_0x309da9,{'limit':_0x347fd4['limit']}),{'verbose':_0x347fd4[_0x35cdc8(0x1c4)]});let _0x381c62=_0x2e394d[_0x35cdc8(0x2fc)];_0x381c62[_0x35cdc8(0x1f8)]((_0x1dac0a,_0x62422b)=>_0x1dac0a['name'][_0x35cdc8(0x28e)](_0x62422b['name']));const _0x857cc0=_0x347fd4['limit']||0x64,_0x4d8fa6=_0x381c62['length']>=_0x857cc0?a42_0x5eecb4[_0x35cdc8(0x202)](_0x35cdc8(0x31e)):'';console['error'](_0x35cdc8(0x2ed)+_0x381c62['length']+_0x35cdc8(0x264)+(_0x381c62[_0x35cdc8(0x360)]!==0x1?'s':'')+_0x4d8fa6);if(_0x347fd4['format']==='json'||_0x347fd4[_0x35cdc8(0x315)]==='jsonl'||_0x347fd4[_0x35cdc8(0x315)]==='table')await handleSDKOutput(_0x381c62,_0x347fd4);else{if(_0x381c62['length']===0x0)_0x309da9?console[_0x35cdc8(0x2c8)](_0x35cdc8(0x259)+_0x309da9):console[_0x35cdc8(0x2c8)]('No\x20workflow\x20projects\x20found');else{const _0x188554=_0x381c62['map'](_0x5a90ad=>{const _0x15d278=_0x35cdc8,_0x147404=_0x5a90ad[_0x15d278(0x332)]?.[_0x15d278(0x2f2)](_0x3ff0b5=>_0x3ff0b5[_0x15d278(0x29f)]===_0x15d278(0x324)),_0x759e0=_0x147404?a42_0x5eecb4[_0x15d278(0x202)](_0x15d278(0x349)):'';return _0x15d278(0x24e)+_0x5a90ad[_0x15d278(0x218)]+_0x759e0;});await writeOutput(_0x188554[_0x35cdc8(0x2dd)]('\x0a'),_0x347fd4['output'],_0x35cdc8(0x246));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]='workflow:workflows';[a42_0x46b63f(0x212)]='List\x20workflows';async[a42_0x46b63f(0x322)](_0x4023c9){const _0x2ebc1b=a42_0x46b63f,{options:_0x5b1a8d,args:_0xe07c3e,tdx:_0x21484e}=_0x4023c9,_0x1de064=this[_0x2ebc1b(0x2e6)](_0xe07c3e,_0x5b1a8d);_0x5b1a8d[_0x2ebc1b(0x1c4)]&&_0x1de064&&console[_0x2ebc1b(0x1d6)](_0x2ebc1b(0x272)+_0x1de064);const _0xbd6a8e=await withSpinner(_0x2ebc1b(0x2e8),()=>_0x21484e[_0x2ebc1b(0x2c4)]['workflows'](_0x1de064,{'limit':_0x5b1a8d[_0x2ebc1b(0x2aa)]}),{'verbose':_0x5b1a8d['verbose']});let _0x8ad89d=_0xbd6a8e[_0x2ebc1b(0x2fc)];_0x8ad89d[_0x2ebc1b(0x1f8)]((_0x3341c0,_0xee813d)=>{const _0x4d05ab=_0x2ebc1b,_0x5a73d9=_0x3341c0[_0x4d05ab(0x218)][_0x4d05ab(0x28e)](_0xee813d[_0x4d05ab(0x218)]);if(_0x5a73d9!==0x0)return _0x5a73d9;return(_0x3341c0[_0x4d05ab(0x356)]?.[_0x4d05ab(0x218)]||'')['localeCompare'](_0xee813d['project']?.[_0x4d05ab(0x218)]||'');});const _0xda2115=_0x5b1a8d[_0x2ebc1b(0x2aa)]||0x64,_0x50090c=_0x8ad89d['length']>=_0xda2115?a42_0x5eecb4[_0x2ebc1b(0x202)](_0x2ebc1b(0x31e)):'';console[_0x2ebc1b(0x1d6)](_0x2ebc1b(0x2ed)+_0x8ad89d[_0x2ebc1b(0x360)]+'\x20workflow'+(_0x8ad89d[_0x2ebc1b(0x360)]!==0x1?'s':'')+_0x50090c);if(_0x5b1a8d[_0x2ebc1b(0x315)]===_0x2ebc1b(0x1fe)||_0x5b1a8d[_0x2ebc1b(0x315)]===_0x2ebc1b(0x232)||_0x5b1a8d[_0x2ebc1b(0x315)]===_0x2ebc1b(0x268))await handleSDKOutput(_0x8ad89d,_0x5b1a8d);else{if(_0x8ad89d[_0x2ebc1b(0x360)]===0x0)_0x1de064?console['log']('No\x20workflows\x20found\x20in\x20project:\x20'+_0x1de064):console['log'](_0x2ebc1b(0x1ca));else{const _0x381637=_0x5b1a8d['site'],_0xd16ccd=_0x8ad89d['map'](_0x3fb0c6=>{const _0x3d8d78=_0x2ebc1b,_0xc9d098=a42_0x5eecb4['dim']('#'+_0x3fb0c6['id']),_0x565b3d=hyperlink(_0xc9d098,getWorkflowUrl(_0x381637,_0x3fb0c6['id'])),_0x116737=_0x3fb0c6[_0x3d8d78(0x356)]?.[_0x3d8d78(0x218)]?a42_0x5eecb4[_0x3d8d78(0x202)]('\x20('+_0x3fb0c6['project'][_0x3d8d78(0x218)]+')'):'';return _0x3d8d78(0x2f3)+_0x565b3d+'\x20'+_0x3fb0c6[_0x3d8d78(0x218)]+_0x116737;});await writeOutput(_0xd16ccd[_0x2ebc1b(0x2dd)]('\x0a'),_0x5b1a8d[_0x2ebc1b(0x2dc)],_0x2ebc1b(0x246));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x310);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x2ba);async[a42_0x46b63f(0x322)](_0x1d6d99){const _0x3e2bc1=a42_0x46b63f,{options:_0x310126,args:_0x5ed391,tdx:_0x34be62}=_0x1d6d99,_0x19d06f=this[_0x3e2bc1(0x354)](_0x5ed391,_0x310126);if(!_0x19d06f)return 0x1;const {projectName:_0x3a61f5,workflowName:_0x55566f}=_0x19d06f;if(_0x310126[_0x3e2bc1(0x1c4)]){if(_0x3a61f5&&_0x55566f)console[_0x3e2bc1(0x1d6)](_0x3e2bc1(0x2bd)+_0x3a61f5+'.'+_0x55566f);else _0x3a61f5&&console[_0x3e2bc1(0x1d6)](_0x3e2bc1(0x2ac)+_0x3a61f5);const _0x3827ee=_0x310126[_0x3e2bc1(0x2e1)];_0x3827ee&&console[_0x3e2bc1(0x1d6)](_0x3e2bc1(0x340)+_0x3827ee);}let _0x2836a4=0x28;if(process[_0x3e2bc1(0x2c9)][_0x3e2bc1(0x24d)]&&!_0x310126[_0x3e2bc1(0x2dc)]&&!_0x310126[_0x3e2bc1(0x315)]){const _0x579b3e=process[_0x3e2bc1(0x2c9)]['rows']||0x28;_0x2836a4=Math['max'](0x14,Math[_0x3e2bc1(0x1f9)](_0x579b3e*0x2/0x3));}const _0x13e358=_0x310126[_0x3e2bc1(0x2aa)]||_0x2836a4,_0xd49688=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x34be62[_0x3e2bc1(0x2c4)][_0x3e2bc1(0x321)]({'projectName':_0x3a61f5,'workflowName':_0x55566f,'status':_0x310126[_0x3e2bc1(0x2e1)],'fromTime':_0x310126['from'],'toTime':_0x310126['to'],'limit':_0x13e358}),{'verbose':_0x310126['verbose']}),_0x5eec3f=_0xd49688[_0x3e2bc1(0x2fc)];_0x5eec3f[_0x3e2bc1(0x1f8)]((_0xe6c260,_0x2e2b23)=>{const _0x554d20=_0x3e2bc1,_0x409bc5=_0xe6c260[_0x554d20(0x23f)]||'',_0x2532aa=_0x2e2b23[_0x554d20(0x23f)]||'';return _0x2532aa['localeCompare'](_0x409bc5);});_0x5eec3f[_0x3e2bc1(0x360)]>=_0x13e358?console[_0x3e2bc1(0x1d6)](_0x3e2bc1(0x1d0)+_0x5eec3f[_0x3e2bc1(0x360)]+_0x3e2bc1(0x22c)+a42_0x5eecb4[_0x3e2bc1(0x202)](_0x3e2bc1(0x334))):console[_0x3e2bc1(0x1d6)](_0x3e2bc1(0x2ed)+_0x5eec3f[_0x3e2bc1(0x360)]+_0x3e2bc1(0x31b)+(_0x5eec3f[_0x3e2bc1(0x360)]!==0x1?'s':''));if(_0x310126[_0x3e2bc1(0x315)]===_0x3e2bc1(0x1fe)||_0x310126[_0x3e2bc1(0x315)]==='jsonl'||_0x310126[_0x3e2bc1(0x315)]===_0x3e2bc1(0x268))await handleSDKOutput(_0x5eec3f,_0x310126);else{if(!process[_0x3e2bc1(0x2c9)]['isTTY']||_0x310126[_0x3e2bc1(0x2dc)]){if(_0x5eec3f[_0x3e2bc1(0x360)]===0x0){if(_0x3a61f5&&_0x55566f)console[_0x3e2bc1(0x2c8)](_0x3e2bc1(0x1ff)+_0x3a61f5+'.'+_0x55566f);else _0x3a61f5?console[_0x3e2bc1(0x2c8)](_0x3e2bc1(0x2b3)+_0x3a61f5):console['log'](_0x3e2bc1(0x287));}else{const _0x2e4c18=_0x310126['site'],_0x4ce882=this['renderSessionsTimeline'](_0x5eec3f,_0x2e4c18);_0x310126['output']?await writeOutput(_0x4ce882,_0x310126['output'],_0x3e2bc1(0x246)):console[_0x3e2bc1(0x2c8)](_0x4ce882);}!_0x3a61f5&&(console[_0x3e2bc1(0x1d6)](''),console[_0x3e2bc1(0x1d6)](a42_0x5eecb4[_0x3e2bc1(0x202)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x3e2bc1(0x1d6)](a42_0x5eecb4['dim'](_0x3e2bc1(0x1c3))+'or'+a42_0x5eecb4[_0x3e2bc1(0x202)](_0x3e2bc1(0x20d))));}else{if(_0x5eec3f[_0x3e2bc1(0x360)]===0x0){if(_0x3a61f5&&_0x55566f)console[_0x3e2bc1(0x2c8)](_0x3e2bc1(0x1ff)+_0x3a61f5+'.'+_0x55566f);else _0x3a61f5?console[_0x3e2bc1(0x2c8)](_0x3e2bc1(0x2b3)+_0x3a61f5):console[_0x3e2bc1(0x2c8)]('No\x20sessions\x20found');}else await this['navigateSessionsInteractive'](_0x5eec3f,_0x1d6d99,_0x3a61f5);}}return 0x0;}[a42_0x46b63f(0x23b)](_0xbe02a0,_0x22af37){const _0x959df7=a42_0x46b63f,_0x25ddff=[],_0x2c53bd=new Map();let _0x3c324a=Infinity,_0x365ea1=-Infinity;for(const _0x25923a of _0xbe02a0){if(_0x25923a[_0x959df7(0x241)]?.[_0x959df7(0x236)]){const _0x4983c5=new Date(_0x25923a['lastAttempt'][_0x959df7(0x236)])[_0x959df7(0x34f)](),_0x389e43=_0x25923a['lastAttempt'][_0x959df7(0x24b)]?new Date(_0x25923a[_0x959df7(0x241)]['finishedAt'])[_0x959df7(0x34f)]():Date[_0x959df7(0x351)](),_0x52fb27=_0x25923a[_0x959df7(0x356)]?.[_0x959df7(0x218)]||_0x959df7(0x290);!_0x2c53bd[_0x959df7(0x215)](_0x52fb27)&&_0x2c53bd[_0x959df7(0x2b2)](_0x52fb27,[]),_0x2c53bd[_0x959df7(0x2b9)](_0x52fb27)[_0x959df7(0x1da)]({'session':_0x25923a,'startTime':_0x4983c5,'endTime':_0x389e43,'duration':_0x389e43-_0x4983c5}),_0x3c324a=Math[_0x959df7(0x26a)](_0x3c324a,_0x4983c5),_0x365ea1=Math[_0x959df7(0x1bc)](_0x365ea1,_0x389e43);}}if(_0x2c53bd['size']===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0xb9b348=process[_0x959df7(0x2c9)][_0x959df7(0x302)]||0x78,_0x35a617=0x1e,_0x625082=0x32,_0x3d46ab=0x4,_0x5d27f2=Math['min'](_0x625082,Math[_0x959df7(0x1bc)](_0x35a617,Math['floor'](_0xb9b348*0.3))),_0x27c871=_0xb9b348-_0x5d27f2-TIMELINE_CONFIG[_0x959df7(0x23e)]-0x3-_0x3d46ab,_0x5bedce=_0x365ea1-_0x3c324a,_0x2fc0e3=_0x5bedce/_0x5d27f2,_0x498d6b=renderTimeAxis({'startTime':_0x3c324a,'endTime':_0x365ea1,'durationMs':_0x5bedce,'msPerChar':_0x2fc0e3},_0x5d27f2),_0x7d8450=[];for(const _0x497b9b of _0x2c53bd[_0x959df7(0x2ab)]()){_0x7d8450[_0x959df7(0x1da)](..._0x497b9b);}_0x7d8450[_0x959df7(0x1f8)]((_0x15a817,_0x1e556d)=>_0x1e556d[_0x959df7(0x30d)]-_0x15a817['startTime']);const _0x5b7b17=new Date(_0x3c324a),_0x21c655=formatDate(_0x5b7b17),_0x14d878=_0x3d46ab+TIMELINE_CONFIG[_0x959df7(0x1cf)]+TIMELINE_CONFIG['ICON_SPACING']+_0x27c871,_0x362b7f='\x20'['repeat'](_0x14d878-_0x21c655['length']),_0x599cb6=_0x362b7f+a42_0x5eecb4[_0x959df7(0x202)](_0x21c655)+'\x20'+_0x498d6b;_0x25ddff[_0x959df7(0x1da)](_0x599cb6);const _0x1d9c5b=0x16;let _0x2f1425=0x0;for(const _0x1dc2e4 of _0x7d8450){const _0x5601f1=_0x1dc2e4[_0x959df7(0x22e)][_0x959df7(0x356)]?.[_0x959df7(0x218)]||'?',_0x212782=Math[_0x959df7(0x26a)](stringWidth(_0x5601f1),_0x1d9c5b);_0x2f1425=Math[_0x959df7(0x1bc)](_0x2f1425,_0x212782);}for(const _0x44717d of _0x7d8450){const {session:_0x4488c9,startTime:_0x474fc3,endTime:_0x2a4f2a,duration:_0x37cf8e}=_0x44717d,_0x314147=_0x4488c9['project']?.['id'],_0x502569=_0x4488c9['id'],_0x2f5fc2=_0x4488c9[_0x959df7(0x356)]?.['name']||'?',_0x48f8d5=_0x4488c9['workflow']?.[_0x959df7(0x218)]||'?';let _0x3f07e2,_0x3940e9;if(_0x4488c9['lastAttempt']){const _0x17d22a=_0x4488c9['lastAttempt'];!_0x17d22a[_0x959df7(0x1e1)]?(_0x3f07e2=_0x17d22a[_0x959df7(0x242)]?'🛑':'🔄',_0x3940e9=_0x17d22a[_0x959df7(0x242)]?a42_0x5eecb4[_0x959df7(0x2ff)]:a42_0x5eecb4[_0x959df7(0x325)]):(_0x3f07e2=_0x17d22a[_0x959df7(0x339)]?'✅':'❌',_0x3940e9=_0x17d22a[_0x959df7(0x339)]?a42_0x5eecb4[_0x959df7(0x273)]:a42_0x5eecb4['red']);}else _0x3f07e2='⏳',_0x3940e9=a42_0x5eecb4['dim'];const _0x58a8a9='#'+_0x502569,_0x5a79c2=_0x314147?hyperlink(_0x58a8a9,getWorkflowSessionUrl(_0x22af37,_0x314147,_0x502569)):_0x58a8a9;let _0x190890=_0x2f5fc2;stringWidth(_0x2f5fc2)>_0x1d9c5b&&(_0x190890=_0x2f5fc2[_0x959df7(0x303)](0x0,_0x1d9c5b-0x1)+'…');const _0x5611c1=a42_0x5eecb4[_0x959df7(0x202)](_0x190890),_0x1e6779=stringWidth(_0x190890),_0xc8f45e='\x20'[_0x959df7(0x240)](_0x2f1425-stringWidth(_0x190890)+0x2),_0x578b38='('+formatElapsed(_0x37cf8e)+')',_0x3ff0fe=stringWidth(_0x578b38),_0x2e2b89=stringWidth(_0x58a8a9),_0x80f9c2=_0x2e2b89+0x1+_0x1e6779+_0xc8f45e[_0x959df7(0x360)],_0x117cfa=_0x27c871-_0x80f9c2-_0x3ff0fe-0x1-0x8;let _0x1bba30=_0x48f8d5;stringWidth(_0x1bba30)>_0x117cfa&&(_0x1bba30=_0x1bba30[_0x959df7(0x303)](0x0,_0x117cfa-0x1)+'…');const _0x7d4f3b=_0x5a79c2+'\x20'+_0x5611c1+_0xc8f45e+_0x1bba30,_0x35d131=stringWidth(_0x7d4f3b),_0x3ce66a=_0x27c871-_0x35d131-_0x3ff0fe,_0x516adb=_0x7d4f3b+'\x20'[_0x959df7(0x240)](Math[_0x959df7(0x1bc)](0x1,_0x3ce66a))+a42_0x5eecb4[_0x959df7(0x202)](_0x578b38),_0x24b558=Math[_0x959df7(0x1f9)]((_0x474fc3-_0x3c324a)/_0x2fc0e3),_0x5e4084=Math[_0x959df7(0x1f9)]((_0x2a4f2a-_0x3c324a)/_0x2fc0e3),_0x4eb388=Math[_0x959df7(0x1bc)](_0x24b558+0x1,_0x5e4084),_0x423409=new Array(_0x5d27f2)[_0x959df7(0x258)]('\x20');for(let _0x2cbf1c=_0x24b558;_0x2cbf1c<Math[_0x959df7(0x26a)](_0x4eb388,_0x5d27f2);_0x2cbf1c++){_0x423409[_0x2cbf1c]='─';}const _0x9b491d=_0x423409[_0x959df7(0x235)](_0x857ae2=>_0x857ae2==='\x20'?'\x20':_0x3940e9(_0x857ae2))['join']('');_0x25ddff[_0x959df7(0x1da)](_0x3f07e2+'\x20'+_0x516adb+'│'+_0x9b491d+'│');}return _0x25ddff[_0x959df7(0x2dd)]('\x0a');}async[a42_0x46b63f(0x201)](_0x246d71,_0x82d132,_0x450b68){const _0x244e9e=a42_0x46b63f,{options:_0xc480b4,tdx:_0x166362}=_0x82d132,_0x432cbe=_0xc480b4[_0x244e9e(0x227)],{timelineRows:_0x5030fe,timeAxisHeader:_0x3a04a6}=this[_0x244e9e(0x256)](_0x246d71,_0x432cbe),_0x52bf46=_0x5030fe[_0x244e9e(0x234)](_0xc4402d=>_0xc4402d[_0x244e9e(0x229)]);if(_0x52bf46[_0x244e9e(0x360)]===0x0){const _0x40e2fe=this[_0x244e9e(0x23b)](_0x246d71,_0x432cbe);console[_0x244e9e(0x2c8)](_0x40e2fe);!_0x450b68&&(console[_0x244e9e(0x1d6)](''),console['error'](a42_0x5eecb4[_0x244e9e(0x202)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a42_0x5eecb4[_0x244e9e(0x202)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0x5eecb4[_0x244e9e(0x202)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x3a04a6&&console[_0x244e9e(0x2c8)](_0x3a04a6);const _0x2ba728=_0x5030fe[_0x244e9e(0x234)](_0xb34776=>_0xb34776['attemptId'])[_0x244e9e(0x235)](_0x4a34ef=>({'title':_0x4a34ef[_0x244e9e(0x2f1)],'value':_0x4a34ef[_0x244e9e(0x229)]})),_0x480fe7=process[_0x244e9e(0x2c9)][_0x244e9e(0x2db)]||0x3c,_0x4252e2=Math[_0x244e9e(0x1bc)](0x28,Math[_0x244e9e(0x1f9)](_0x480fe7*0x2/0x3)),_0x2663d2=await a42_0x2f989f({'type':'autocomplete','name':'attemptId','message':_0x244e9e(0x2eb),'choices':_0x2ba728,'initial':-0x1,'limit':_0x4252e2,'clearFirst':!![],'fallback':{'title':_0x244e9e(0x32a),'value':null},'suggest':(_0x2a976f,_0x48ef51)=>{const _0x485e0a=_0x244e9e;if(!_0x2a976f)return Promise[_0x485e0a(0x252)](_0x48ef51);const _0x37d222=_0x48ef51[_0x485e0a(0x234)](_0x3a4d34=>{const _0x5885de=_0x485e0a,_0x706412=_0x3a4d34;return _0x706412[_0x5885de(0x2f0)][_0x5885de(0x213)]()[_0x5885de(0x35c)](_0x2a976f[_0x5885de(0x213)]());});return Promise[_0x485e0a(0x252)](_0x37d222);}}),_0x546c04=()=>{const _0x213f2a=_0x244e9e;process['stdout'][_0x213f2a(0x2a8)](_0x213f2a(0x253)),process[_0x213f2a(0x2c9)][_0x213f2a(0x2a8)](_0x213f2a(0x253)),process[_0x213f2a(0x2c9)][_0x213f2a(0x2a8)](_0x213f2a(0x253));},_0xe77ac6=_0x2663d2&&_0x2663d2['attemptId']&&_0x2663d2['attemptId']!==null&&_0x2663d2[_0x244e9e(0x229)][_0x244e9e(0x2f7)]()!=='';if(!_0xe77ac6){_0x546c04(),console['log'](a42_0x5eecb4['dim'](_0x244e9e(0x1c6)));return;}_0x546c04();const _0xe660f6=_0x246d71[_0x244e9e(0x1dd)](_0x546588=>_0x546588[_0x244e9e(0x241)]?.['id']===_0x2663d2[_0x244e9e(0x229)]);if(_0xe660f6){const _0x4ebb86=_0xe660f6['project']?.[_0x244e9e(0x218)]||'?',_0x5038fe=_0xe660f6[_0x244e9e(0x2c4)]?.[_0x244e9e(0x218)]||'?';console['log'](_0x244e9e(0x27b)+a42_0x5eecb4[_0x244e9e(0x202)](_0x4ebb86)+_0x244e9e(0x28b)+a42_0x5eecb4[_0x244e9e(0x202)](_0x5038fe));}const _0x2b8a27=new WorkflowTimelineCommand();await _0x2b8a27['execute']({'args':[],'options':{..._0xc480b4,'attemptId':_0x2663d2[_0x244e9e(0x229)]},'tdx':_0x166362});}[a42_0x46b63f(0x256)](_0x4fadb2,_0x1d0d8d){const _0x2f6ea3=a42_0x46b63f,_0x1488a=new Map();for(const _0x4e108e of _0x4fadb2){_0x4e108e['id']&&_0x4e108e[_0x2f6ea3(0x241)]?.['id']&&_0x1488a[_0x2f6ea3(0x2b2)](_0x4e108e['id'],_0x4e108e[_0x2f6ea3(0x241)]['id']);}const _0xc0acfa=[];let _0x16da02='';const _0x16b002=this['renderSessionsTimeline'](_0x4fadb2,_0x1d0d8d),_0x1fc603=_0x16b002[_0x2f6ea3(0x28a)]('\x0a');for(const _0x535738 of _0x1fc603){if(_0x535738['startsWith'](_0x2f6ea3(0x1d3))||_0x535738[_0x2f6ea3(0x2f5)](/^\s+\d{4}-\d{2}-\d{2}/))_0x16da02=_0x535738;else{if(_0x535738[_0x2f6ea3(0x2f5)](/^[✅❌🔄🛑⏳]/)){const _0x21d5d9=_0x535738[_0x2f6ea3(0x2f5)](/#(\d+)/),_0x491bee=_0x21d5d9?_0x21d5d9[0x1]:null,_0x4e51a7=_0x491bee?_0x1488a[_0x2f6ea3(0x2b9)](_0x491bee)||null:null,_0x54d332=_0x4fadb2['find'](_0x50c3b4=>_0x50c3b4['id']===_0x491bee),_0x8c30c2=_0x54d332?.[_0x2f6ea3(0x356)]?.[_0x2f6ea3(0x218)]||'';_0xc0acfa[_0x2f6ea3(0x1da)]({'displayLine':_0x535738,'attemptId':_0x4e51a7,'projectName':_0x8c30c2});}}}return{'timelineRows':_0xc0acfa,'timeAxisHeader':_0x16da02};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x250);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x220);async['execute'](_0x3ec781){const _0x59d9fd=a42_0x46b63f,{options:_0x5033c3,args:_0xc24dc6,tdx:_0xfe095f}=_0x3ec781,_0xb75d08=this[_0x59d9fd(0x354)](_0xc24dc6,_0x5033c3);if(!_0xb75d08)return 0x1;const {projectName:_0x22609d,workflowName:_0x17b7f4}=_0xb75d08,_0x2cde08=_0x5033c3['includeRetried'];if(_0x5033c3[_0x59d9fd(0x1c4)]){if(_0x22609d&&_0x17b7f4)console['error'](_0x59d9fd(0x2bd)+_0x22609d+'.'+_0x17b7f4);else _0x22609d&&console[_0x59d9fd(0x1d6)]('Filter:\x20project='+_0x22609d);_0x2cde08&&console['error'](_0x59d9fd(0x28d));}const _0xe7b217=await withSpinner(_0x59d9fd(0x288),()=>_0xfe095f[_0x59d9fd(0x2c4)][_0x59d9fd(0x2d6)]({'projectName':_0x22609d,'workflowName':_0x17b7f4,'includeRetried':_0x2cde08,'limit':_0x5033c3[_0x59d9fd(0x2aa)]}),{'verbose':_0x5033c3[_0x59d9fd(0x1c4)]}),_0x2d6112=_0xe7b217[_0x59d9fd(0x2fc)],_0x432464=_0x5033c3['limit']||0x64,_0x43456a=_0x2d6112[_0x59d9fd(0x360)]>=_0x432464?a42_0x5eecb4[_0x59d9fd(0x202)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x59d9fd(0x1d6)]('✔\x20Found\x20'+_0x2d6112['length']+'\x20attempt'+(_0x2d6112[_0x59d9fd(0x360)]!==0x1?'s':'')+_0x43456a);if(_0x5033c3[_0x59d9fd(0x315)]===_0x59d9fd(0x1fe)||_0x5033c3[_0x59d9fd(0x315)]===_0x59d9fd(0x232)||_0x5033c3['format']===_0x59d9fd(0x268))await handleSDKOutput(_0x2d6112,_0x5033c3);else{if(_0x2d6112[_0x59d9fd(0x360)]===0x0){if(_0x22609d&&_0x17b7f4)console[_0x59d9fd(0x2c8)](_0x59d9fd(0x21a)+_0x22609d+'.'+_0x17b7f4);else _0x22609d?console[_0x59d9fd(0x2c8)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x22609d):console[_0x59d9fd(0x2c8)](_0x59d9fd(0x296));}else{const _0x16604b=_0x5033c3['site'],_0x3a5db1=_0x2d6112[_0x59d9fd(0x235)](_0x573ba1=>{const _0x28ba20=_0x59d9fd,_0x389839=a42_0x5eecb4['dim']('#'+_0x573ba1['id']),_0x136ec0=_0x573ba1['project']?.['id'],_0x4050e0=_0x573ba1['session_id']||_0x573ba1['sessionId'],_0x23eae4=_0x136ec0&&_0x4050e0?hyperlink(_0x389839,getWorkflowAttemptUrl(_0x16604b,_0x136ec0,_0x4050e0,_0x573ba1['id'])):_0x389839,{icon:_0xf0a3b6,text:_0x2b93e3}=getAttemptStatusDisplay(_0x573ba1),_0x5ba86b=(_0x573ba1['project']?.[_0x28ba20(0x218)]||'?')+'.'+(_0x573ba1['workflow']?.[_0x28ba20(0x218)]||'?'),_0x1f672b=_0x573ba1[_0x28ba20(0x23f)]?a42_0x5eecb4[_0x28ba20(0x202)](_0x573ba1[_0x28ba20(0x23f)]):'';return(_0x23eae4+'\x20'+_0xf0a3b6+(_0x2b93e3?'\x20'+_0x2b93e3:'')+'\x20'+_0x5ba86b+'\x20'+_0x1f672b)[_0x28ba20(0x305)]();});await writeOutput(_0x3a5db1[_0x59d9fd(0x2dd)]('\x0a'),_0x5033c3['output'],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x265);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x245);async['execute'](_0x58ae09){const _0x496e97=a42_0x46b63f,{options:_0x40d555,args:_0x5ea307,tdx:_0x4b14e9}=_0x58ae09,_0xa535e4=_0x5ea307[0x0];if(!_0xa535e4)return console[_0x496e97(0x1d6)](_0x496e97(0x306)),0x1;_0x40d555['verbose']&&console[_0x496e97(0x1d6)](_0x496e97(0x31c)+_0xa535e4);const _0xb1fda9=await withSpinner(_0x496e97(0x23c),()=>_0x4b14e9[_0x496e97(0x2c4)][_0x496e97(0x21e)](_0xa535e4),{'verbose':_0x40d555[_0x496e97(0x1c4)]}),_0x2bcec3=_0xb1fda9[_0x496e97(0x2fc)];let _0x18d390;!_0x2bcec3['done']?_0x18d390=_0x2bcec3[_0x496e97(0x242)]?_0x496e97(0x2a1):_0x496e97(0x203):_0x18d390=_0x2bcec3[_0x496e97(0x339)]?_0x496e97(0x339):_0x496e97(0x1d6);let _0x54cd4e;if(_0x2bcec3['createdAt']&&_0x2bcec3['finishedAt']){const _0x20be01=new Date(_0x2bcec3[_0x496e97(0x236)])[_0x496e97(0x34f)](),_0xee677=new Date(_0x2bcec3[_0x496e97(0x24b)])[_0x496e97(0x34f)]();_0x54cd4e=Math[_0x496e97(0x270)]((_0xee677-_0x20be01)/0x3e8);}const _0x555bbb={'attempt_id':_0x2bcec3['id'],'status':_0x18d390,..._0x2bcec3['index']!==undefined&&{'index':_0x2bcec3[_0x496e97(0x29d)]},..._0x2bcec3[_0x496e97(0x356)]&&{'project':_0x2bcec3[_0x496e97(0x356)]['name']},..._0x2bcec3[_0x496e97(0x2c4)]&&{'workflow':_0x2bcec3[_0x496e97(0x2c4)][_0x496e97(0x218)]},..._0x2bcec3[_0x496e97(0x35b)]&&{'session_id':_0x2bcec3[_0x496e97(0x35b)]},..._0x2bcec3['sessionTime']&&{'session_time':_0x2bcec3[_0x496e97(0x23f)]},..._0x2bcec3['retryAttemptName']&&{'retry_attempt':_0x2bcec3[_0x496e97(0x309)]},..._0x54cd4e!==undefined&&{'duration_sec':_0x54cd4e},..._0x2bcec3[_0x496e97(0x236)]&&{'created_at':_0x2bcec3[_0x496e97(0x236)]},..._0x2bcec3[_0x496e97(0x24b)]&&{'finished_at':_0x2bcec3[_0x496e97(0x24b)]},...Object[_0x496e97(0x216)](_0x2bcec3[_0x496e97(0x2e4)])[_0x496e97(0x360)]>0x0&&{'params':_0x2bcec3['params']}};return await handleSingleObjectOutput(_0x555bbb,_0x40d555),0x0;}}function a42_0x33bf(_0x395a75,_0xda8fb3){_0x395a75=_0x395a75-0x1bc;const _0xcd189b=a42_0xcd18();let _0x33bf0c=_0xcd189b[_0x395a75];return _0x33bf0c;}export class WorkflowTasksCommand extends BaseCommand{['name']='workflow:tasks';[a42_0x46b63f(0x212)]=a42_0x46b63f(0x294);async[a42_0x46b63f(0x322)](_0x33613b){const _0x266990=a42_0x46b63f,{options:_0x484809,args:_0x3fbacb,tdx:_0x3c4f28}=_0x33613b,_0x1eec2a=_0x3fbacb[0x0];if(!_0x1eec2a)return console[_0x266990(0x1d6)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x41e61d=_0x484809['includeSubtasks'];_0x484809[_0x266990(0x1c4)]&&(console['error'](_0x266990(0x31c)+_0x1eec2a),_0x41e61d&&console['error']('Including\x20subtasks:\x20yes'));const _0x45cc65=await withSpinner(_0x266990(0x2d1),()=>_0x3c4f28[_0x266990(0x2c4)]['tasks'](_0x1eec2a,_0x41e61d||![]),{'verbose':_0x484809['verbose']}),_0x384ee3=_0x45cc65['data'];return console['error'](_0x266990(0x2ed)+_0x384ee3[_0x266990(0x360)]+_0x266990(0x2d3)+(_0x384ee3[_0x266990(0x360)]!==0x1?'s':'')),await handleSDKOutput(_0x384ee3,_0x484809),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a42_0x46b63f(0x31d);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x345);async[a42_0x46b63f(0x322)](_0x178679){const _0x315c95=a42_0x46b63f,{options:_0x2d3fc7,args:_0x288441,tdx:_0x4ea4da}=_0x178679,_0x50f354=_0x288441[0x0];let _0x75091e=_0x288441[0x1];if(!_0x50f354)return console['error'](_0x315c95(0x306)),0x1;_0x2d3fc7[_0x315c95(0x1c4)]&&(console['error'](_0x315c95(0x31c)+_0x50f354),_0x75091e&&console['error'](_0x315c95(0x2a3)+_0x75091e));const _0x585d75=await withSpinner(_0x315c95(0x30e),()=>_0x4ea4da[_0x315c95(0x2c4)][_0x315c95(0x291)](_0x50f354,_0x75091e),{'verbose':_0x2d3fc7[_0x315c95(0x1c4)]}),_0x291d76=_0x585d75[_0x315c95(0x2fc)];if(_0x291d76[_0x315c95(0x360)]===0x0)return console[_0x315c95(0x1d6)](_0x315c95(0x2a5)),0x0;if(!_0x75091e&&(_0x2d3fc7[_0x315c95(0x1fe)]||_0x2d3fc7[_0x315c95(0x315)]))return await handleSDKOutput(_0x291d76,_0x2d3fc7),0x0;if(!_0x75091e){const _0x2f0658=_0x291d76[_0x315c95(0x235)](_0x415962=>({'title':_0x415962[_0x315c95(0x22b)]+'\x20('+formatBytes(_0x415962[_0x315c95(0x1cd)])+')','value':_0x415962[_0x315c95(0x22b)]})),_0x260cb6=await a42_0x2f989f({'type':_0x315c95(0x338),'name':_0x315c95(0x225),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x2f0658});if(!_0x260cb6['task'])return console['error'](_0x315c95(0x1c6)),0x0;_0x75091e=_0x260cb6[_0x315c95(0x225)];}const _0x51db16=await withSpinner(_0x315c95(0x271),()=>_0x4ea4da[_0x315c95(0x2c4)][_0x315c95(0x1f2)](_0x50f354,_0x75091e),{'verbose':_0x2d3fc7[_0x315c95(0x1c4)]}),_0x5dec19=_0x51db16[_0x315c95(0x2fc)];return _0x5dec19?console['log'](_0x5dec19):console['error'](_0x315c95(0x239)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x231);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x2b1);async['execute'](_0x5bf732){const _0x1c1b09=a42_0x46b63f,{options:_0x193c57,args:_0x1a62a1,tdx:_0xd567a5}=_0x5bf732,_0x1ecbdf=_0x1a62a1[0x0];if(!_0x1ecbdf)return console[_0x1c1b09(0x1d6)](_0x1c1b09(0x306)),0x1;const _0xfcb29e=_0x193c57[_0x1c1b09(0x274)];_0x193c57[_0x1c1b09(0x1c4)]&&(console[_0x1c1b09(0x1d6)]('Attempt\x20ID:\x20'+_0x1ecbdf),_0xfcb29e&&console['error']('Reason:\x20'+_0xfcb29e));if(!_0x193c57[_0x1c1b09(0x32d)]){if(!isInteractive())return console['error'](a42_0x5eecb4[_0x1c1b09(0x1c9)](_0x1c1b09(0x1d5)),_0x1c1b09(0x323)),console[_0x1c1b09(0x1d6)](a42_0x5eecb4[_0x1c1b09(0x202)](_0x1c1b09(0x25b))),0x1;const _0x105f46=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x1ecbdf+'?');if(!_0x105f46)return console['error'](a42_0x5eecb4[_0x1c1b09(0x2ff)](_0x1c1b09(0x1c6))),0x1;}const _0x2bddb9=await withSpinner(_0x1c1b09(0x2e7),()=>_0xd567a5['workflow']['kill'](_0x1ecbdf,_0xfcb29e),{'verbose':_0x193c57[_0x1c1b09(0x1c4)]}),_0xb9df6f=_0x2bddb9[_0x1c1b09(0x2fc)];return console['error']('✔\x20'+_0xb9df6f),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a42_0x46b63f(0x313);['description']=a42_0x46b63f(0x32c);async[a42_0x46b63f(0x322)](_0x50dc6a){const _0x3b5349=a42_0x46b63f,{options:_0x57df1f,args:_0x48937b,tdx:_0x52e35d}=_0x50dc6a,_0x2347aa=_0x48937b[0x0];if(!_0x2347aa)return console[_0x3b5349(0x1d6)](_0x3b5349(0x1ee)),console[_0x3b5349(0x1d6)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x148098=![],_0x16b5fd=_0x2347aa;if(_0x2347aa[_0x3b5349(0x297)](_0x3b5349(0x1f4)))_0x148098=!![],_0x16b5fd=_0x2347aa[_0x3b5349(0x285)](0x8);else{if(_0x2347aa[_0x3b5349(0x297)](_0x3b5349(0x335)))_0x148098=![],_0x16b5fd=_0x2347aa['substring'](0x8);else return console['error']('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error'](_0x3b5349(0x2cb)),0x1;}const _0x301c2d=_0x57df1f['fromTask'],_0x566da8=_0x57df1f[_0x3b5349(0x2b4)],_0x314924=_0x57df1f[_0x3b5349(0x2e4)],_0x1c907a=_0x57df1f[_0x3b5349(0x1ed)];_0x57df1f[_0x3b5349(0x1c4)]&&(console[_0x3b5349(0x1d6)](_0x3b5349(0x2e3)+(_0x148098?_0x3b5349(0x22e):'attempt')+'\x20'+_0x16b5fd),_0x301c2d&&console[_0x3b5349(0x1d6)](_0x3b5349(0x1e2)+_0x301c2d),_0x566da8&&console[_0x3b5349(0x1d6)](_0x3b5349(0x211)+_0x566da8),_0x314924&&console[_0x3b5349(0x1d6)]('Params:\x20'+_0x314924),_0x1c907a&&console[_0x3b5349(0x1d6)]('Force:\x20yes'));let _0x23dc72;if(_0x314924)try{if(_0x314924[_0x3b5349(0x297)]('@')){const _0x17507c=await import('fs/promises'),_0x206774=_0x314924['substring'](0x1),_0x49e51d=await _0x17507c[_0x3b5349(0x2e5)](_0x206774,_0x3b5349(0x219));_0x23dc72=JSON[_0x3b5349(0x276)](_0x49e51d);}else _0x23dc72=JSON[_0x3b5349(0x276)](_0x314924);}catch{return console[_0x3b5349(0x1d6)](_0x3b5349(0x222)),0x1;}if(!_0x57df1f[_0x3b5349(0x32d)]){if(!isInteractive())return console[_0x3b5349(0x1d6)](a42_0x5eecb4[_0x3b5349(0x1c9)](_0x3b5349(0x1d5)),_0x3b5349(0x323)),console[_0x3b5349(0x1d6)](a42_0x5eecb4[_0x3b5349(0x202)](_0x3b5349(0x25b))),0x1;const _0x2d6c2e=await confirmKey(_0x3b5349(0x1d1)+(_0x148098?_0x3b5349(0x22e):_0x3b5349(0x21e))+'\x20'+_0x16b5fd+'?');if(!_0x2d6c2e)return console[_0x3b5349(0x1d6)](a42_0x5eecb4[_0x3b5349(0x2ff)]('Cancelled')),0x1;}let _0x3abc0d;_0x148098?_0x3abc0d=await withSpinner('Retrying\x20session...',()=>_0x52e35d[_0x3b5349(0x2c4)][_0x3b5349(0x307)](_0x16b5fd,{'fromTask':_0x301c2d,'retryParams':_0x23dc72}),{'verbose':_0x57df1f[_0x3b5349(0x1c4)]}):_0x3abc0d=await withSpinner(_0x3b5349(0x329),()=>_0x52e35d['workflow'][_0x3b5349(0x32e)](_0x16b5fd,{'resumeFrom':_0x566da8,'retryParams':_0x23dc72,'force':_0x1c907a}),{'verbose':_0x57df1f[_0x3b5349(0x1c4)]});const _0x5f13d6=_0x3abc0d['data'];return console[_0x3b5349(0x1d6)]('✔\x20Retry\x20started'),console[_0x3b5349(0x1d6)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x5f13d6[_0x3b5349(0x229)]),console[_0x3b5349(0x1d6)](_0x3b5349(0x2ea)+_0x5f13d6[_0x3b5349(0x35b)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x28f);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x1ea);async[a42_0x46b63f(0x322)](_0x1dd916){const _0x43ee92=a42_0x46b63f,{options:_0x544912,args:_0x536fba,tdx:_0x420714}=_0x1dd916;let _0x5b25b9=_0x536fba[0x0];if(!_0x5b25b9){const _0x418fae=this[_0x43ee92(0x2e6)]([],_0x544912),_0x3522eb=await withSpinner(_0x43ee92(0x2f4),()=>_0x420714[_0x43ee92(0x2c4)]['workflows'](_0x418fae,{'limit':_0x544912[_0x43ee92(0x2aa)]}),{'verbose':_0x544912[_0x43ee92(0x1c4)]}),_0x3426a0=_0x3522eb[_0x43ee92(0x2fc)];if(_0x3426a0['length']===0x0)return console[_0x43ee92(0x1d6)](_0x43ee92(0x1ca)),!_0x418fae&&console['error'](a42_0x5eecb4[_0x43ee92(0x202)](_0x43ee92(0x267))),0x1;const _0x3073b7=_0x3426a0['map'](_0xadcc89=>({'title':_0xadcc89[_0x43ee92(0x356)]?.['name']+'.'+_0xadcc89[_0x43ee92(0x218)],'value':_0xadcc89['project']?.[_0x43ee92(0x218)]+'.'+_0xadcc89[_0x43ee92(0x218)],'description':_0xadcc89['revision']?_0x43ee92(0x1ec)+_0xadcc89['revision']:undefined})),_0x1e0c5b=await a42_0x2f989f({'type':'select','name':_0x43ee92(0x2c4),'message':_0x43ee92(0x337),'choices':_0x3073b7});if(!_0x1e0c5b[_0x43ee92(0x2c4)])return 0x1;_0x5b25b9=_0x1e0c5b['workflow'];}if(!_0x5b25b9[_0x43ee92(0x35c)]('.')){const _0x1b0ff5=this[_0x43ee92(0x2e6)]([],_0x544912);if(_0x1b0ff5)_0x5b25b9=_0x1b0ff5+'.'+_0x5b25b9;else return console[_0x43ee92(0x1d6)](a42_0x5eecb4['red'](_0x43ee92(0x29a)),_0x43ee92(0x230)),console[_0x43ee92(0x1d6)](a42_0x5eecb4['dim'](_0x43ee92(0x267))),0x1;}const _0x25c8fc=_0x544912[_0x43ee92(0x2a6)],_0x5f4cdf=_0x544912['sessionTime'],_0x1395d7={};if(_0x25c8fc&&Array[_0x43ee92(0x30c)](_0x25c8fc))for(const _0x1a5066 of _0x25c8fc){const _0x2d0c1b=_0x1a5066[_0x43ee92(0x1f6)]('=');if(_0x2d0c1b===-0x1)return console[_0x43ee92(0x1d6)](_0x43ee92(0x33b)+_0x1a5066),console[_0x43ee92(0x1d6)](_0x43ee92(0x27e)),0x1;const _0x2b5a59=_0x1a5066['substring'](0x0,_0x2d0c1b),_0x5e8fa2=_0x1a5066[_0x43ee92(0x285)](_0x2d0c1b+0x1);try{_0x1395d7[_0x2b5a59]=JSON['parse'](_0x5e8fa2);}catch{_0x1395d7[_0x2b5a59]=_0x5e8fa2;}}_0x544912[_0x43ee92(0x1c4)]&&(console['error'](_0x43ee92(0x289)+_0x5b25b9),Object[_0x43ee92(0x216)](_0x1395d7)['length']>0x0&&console[_0x43ee92(0x1d6)](_0x43ee92(0x300)+JSON['stringify'](_0x1395d7)),_0x5f4cdf&&console[_0x43ee92(0x1d6)](_0x43ee92(0x2fd)+_0x5f4cdf));const _0x3d730b=await withSpinner(_0x43ee92(0x359),()=>_0x420714[_0x43ee92(0x2c4)][_0x43ee92(0x298)](_0x5b25b9,_0x1395d7,{'sessionTime':_0x5f4cdf}),{'verbose':_0x544912[_0x43ee92(0x1c4)]}),_0x271c1b=_0x3d730b[_0x43ee92(0x2fc)];console[_0x43ee92(0x1d6)]('✔\x20Workflow\x20run\x20started'),console[_0x43ee92(0x1d6)](_0x43ee92(0x341)+_0x271c1b['id']),console['error'](_0x43ee92(0x2ea)+_0x271c1b['sessionId']),console['error'](_0x43ee92(0x1d9)+_0x271c1b[_0x43ee92(0x356)]?.[_0x43ee92(0x218)]),console[_0x43ee92(0x1d6)](_0x43ee92(0x29c)+_0x271c1b[_0x43ee92(0x2c4)]?.[_0x43ee92(0x218)]);if(_0x271c1b[_0x43ee92(0x356)]?.['id']&&_0x271c1b['sessionId']&&_0x271c1b['id']){const _0x156449=_0x544912[_0x43ee92(0x227)],_0x5a9a6a=getConsoleUrl(_0x156449,_0x43ee92(0x2d4)+_0x271c1b[_0x43ee92(0x356)]['id']+_0x43ee92(0x34e)+_0x271c1b[_0x43ee92(0x35b)]+_0x43ee92(0x361)+_0x271c1b['id']);console[_0x43ee92(0x1d6)](_0x43ee92(0x28c)+a42_0x5eecb4[_0x43ee92(0x25d)](_0x5a9a6a));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x2d0);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x34d);async[a42_0x46b63f(0x322)](_0x22cdcd){const _0x340a14=a42_0x46b63f,{options:_0x537ce4,args:_0x4fb47e,tdx:_0x1c8b90}=_0x22cdcd,_0x1575ab=_0x4fb47e[0x0],_0x561589=_0x4fb47e[0x1]||'.';if(!_0x1575ab)return console[_0x340a14(0x1d6)](_0x340a14(0x1fb)),console[_0x340a14(0x1d6)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x2a57dd=_0x537ce4[_0x340a14(0x278)];_0x537ce4['verbose']&&(console['error'](_0x340a14(0x27b)+_0x1575ab),console[_0x340a14(0x1d6)](_0x340a14(0x2ca)+_0x561589),_0x2a57dd&&console[_0x340a14(0x1d6)]('Revision:\x20'+_0x2a57dd));const _0x4bb363=await withSpinner(_0x340a14(0x27c)+_0x1575ab+'...',()=>_0x1c8b90[_0x340a14(0x2c4)][_0x340a14(0x282)](_0x1575ab,_0x561589,{'revision':_0x2a57dd}),{'verbose':_0x537ce4[_0x340a14(0x1c4)]}),_0xaac767=_0x4bb363[_0x340a14(0x2fc)];return console[_0x340a14(0x1d6)]('✔\x20Downloaded\x20'+_0xaac767[_0x340a14(0x333)]),console['error'](_0x340a14(0x308)+_0xaac767[_0x340a14(0x278)]),console[_0x340a14(0x1d6)]('\x20\x20Files\x20extracted:\x20'+_0xaac767[_0x340a14(0x1c1)]),console[_0x340a14(0x1d6)](_0x340a14(0x21d)+_0x561589+'/'+_0xaac767['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a42_0x46b63f(0x327);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x352);async['execute'](_0x3d7fc3){const _0x212936=a42_0x46b63f,{options:_0x3f6da8,args:_0x6441e5,tdx:_0x5b57b7}=_0x3d7fc3;let _0x2fcb24='.',_0x519fc3=_0x3f6da8['name'];if(_0x6441e5[0x0]){const {promises:_0x582eaa}=await import('fs');try{const _0x1877ef=await _0x582eaa[_0x212936(0x20c)](_0x6441e5[0x0]);if(_0x1877ef[_0x212936(0x35f)]())_0x2fcb24=_0x6441e5[0x0];else return console[_0x212936(0x1d6)](_0x212936(0x263)+_0x6441e5[0x0]+_0x212936(0x343)),0x1;}catch{_0x519fc3=_0x6441e5[0x0],_0x2fcb24='.';}}const _0x4904a7=_0x3f6da8[_0x212936(0x278)],_0x3e90c1=_0x3f6da8[_0x212936(0x311)];_0x3f6da8['verbose']&&(console[_0x212936(0x1d6)](_0x212936(0x279)+_0x2fcb24),_0x519fc3&&console[_0x212936(0x1d6)](_0x212936(0x208)+_0x519fc3),_0x4904a7&&console['error']('Revision:\x20'+_0x4904a7),_0x3e90c1&&console[_0x212936(0x1d6)](_0x212936(0x275)));const _0x3ab6b4=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x5b57b7[_0x212936(0x2c4)][_0x212936(0x1da)](_0x2fcb24,{'projectName':_0x519fc3,'revision':_0x4904a7,'skipValidation':_0x3e90c1}),{'verbose':_0x3f6da8[_0x212936(0x1c4)]}),_0x1f222d=_0x3ab6b4['data'];return console[_0x212936(0x1d6)](_0x212936(0x1fa)+_0x1f222d[_0x212936(0x333)]),console[_0x212936(0x1d6)](_0x212936(0x2d5)+_0x1f222d[_0x212936(0x1d7)]),console['error'](_0x212936(0x308)+_0x1f222d[_0x212936(0x278)]),await this[_0x212936(0x204)](_0x5b57b7,_0x1f222d[_0x212936(0x333)],_0x3f6da8['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x2ef);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x2af);async['execute'](_0x1459e0){const _0x4ec808=a42_0x46b63f,{options:_0x26f887,args:_0x4231b5,tdx:_0x10d897}=_0x1459e0,_0x49feae=_0x4231b5[0x0],_0x40e801=_0x4231b5[0x1];if(!_0x49feae)return console[_0x4ec808(0x1d6)](a42_0x5eecb4[_0x4ec808(0x1c9)](_0x4ec808(0x29a)),_0x4ec808(0x2de)),console[_0x4ec808(0x1d6)](a42_0x5eecb4['dim']('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x3a63bd=_0x26f887[_0x4ec808(0x278)];_0x26f887[_0x4ec808(0x1c4)]&&(console[_0x4ec808(0x1d6)]('Project:\x20'+_0x49feae),_0x40e801&&console[_0x4ec808(0x1d6)](_0x4ec808(0x223)+_0x40e801),_0x3a63bd&&console[_0x4ec808(0x1d6)](_0x4ec808(0x1f1)+_0x3a63bd),_0x26f887['dryRun']&&console[_0x4ec808(0x1d6)]('Dry\x20run:\x20yes'));const _0x13b85e=await withSpinner(_0x4ec808(0x238)+_0x49feae+_0x4ec808(0x1bf),()=>_0x10d897[_0x4ec808(0x2c4)]['pullProject'](_0x49feae,{'targetDir':_0x40e801,'revision':_0x3a63bd}),{'verbose':_0x26f887[_0x4ec808(0x1c4)]}),_0xb2ca11=_0x13b85e[_0x4ec808(0x2fc)];_0xb2ca11[_0x4ec808(0x209)]?console[_0x4ec808(0x1d6)](_0x4ec808(0x2fa)+_0xb2ca11[_0x4ec808(0x333)]):console[_0x4ec808(0x1d6)]('→\x20Project:\x20'+_0xb2ca11['projectName']);console[_0x4ec808(0x1d6)](_0x4ec808(0x308)+_0xb2ca11[_0x4ec808(0x278)]),console[_0x4ec808(0x1d6)](_0x4ec808(0x205)+(a42_0x15acaf['relative'](process['cwd'](),_0xb2ca11['targetDir'])||'.')),console[_0x4ec808(0x1d6)](_0x4ec808(0x2d9)+a42_0x5eecb4[_0x4ec808(0x273)]('+'+_0xb2ca11[_0x4ec808(0x293)]['new']+'\x20new')+',\x20'+(a42_0x5eecb4[_0x4ec808(0x2ff)]('~'+_0xb2ca11[_0x4ec808(0x293)]['modified']+_0x4ec808(0x1e8))+',\x20')+(a42_0x5eecb4['red']('-'+_0xb2ca11[_0x4ec808(0x293)]['deleted']+_0x4ec808(0x1e3))+',\x20')+(''+a42_0x5eecb4[_0x4ec808(0x202)](_0xb2ca11[_0x4ec808(0x293)][_0x4ec808(0x1ef)]+_0x4ec808(0x1fd))));for(const _0x43ce0e of _0xb2ca11['changes']){_0x43ce0e['type']===_0x4ec808(0x206)&&_0x43ce0e[_0x4ec808(0x210)]&&(console[_0x4ec808(0x1d6)]('\x0a'+a42_0x5eecb4[_0x4ec808(0x25d)](_0x4ec808(0x2c2)+_0x43ce0e[_0x4ec808(0x292)])),console[_0x4ec808(0x1d6)](_0x43ce0e['diff']));}if(!_0xb2ca11[_0x4ec808(0x1c5)])return saveSessionContext({'workflow_project':_0xb2ca11[_0x4ec808(0x333)]},_0x26f887[_0x4ec808(0x22e)]),console[_0x4ec808(0x1d6)](a42_0x5eecb4[_0x4ec808(0x273)](_0x4ec808(0x2c1))),console['error'](a42_0x5eecb4[_0x4ec808(0x202)](_0x4ec808(0x1df)+_0xb2ca11[_0x4ec808(0x333)])),0x0;if(_0x26f887[_0x4ec808(0x27f)])return console[_0x4ec808(0x1d6)](a42_0x5eecb4['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x26f887[_0x4ec808(0x32d)]){if(!isInteractive())return console[_0x4ec808(0x1d6)](a42_0x5eecb4['red'](_0x4ec808(0x1d5)),_0x4ec808(0x323)),console[_0x4ec808(0x1d6)](a42_0x5eecb4['dim'](_0x4ec808(0x25b))),0x1;const _0x4205bf=await confirmKey(_0x4ec808(0x23a));if(!_0x4205bf)return console['error'](a42_0x5eecb4[_0x4ec808(0x2ff)](_0x4ec808(0x1c6)),_0x4ec808(0x353)),0x1;}await withSpinner(_0x4ec808(0x2b0),()=>_0x10d897[_0x4ec808(0x2c4)][_0x4ec808(0x301)](_0xb2ca11,{'revision':_0x3a63bd}),{'verbose':_0x26f887['verbose']}),saveSessionContext({'workflow_project':_0xb2ca11[_0x4ec808(0x333)]},_0x26f887[_0x4ec808(0x22e)]),console[_0x4ec808(0x1d6)](a42_0x5eecb4[_0x4ec808(0x273)](_0x4ec808(0x226)));const _0x3475de=a42_0x15acaf[_0x4ec808(0x248)](process[_0x4ec808(0x2b5)](),_0xb2ca11[_0x4ec808(0x30a)])||'.';return console['error'](a42_0x5eecb4[_0x4ec808(0x202)](_0x4ec808(0x21d)+_0x3475de)),console[_0x4ec808(0x1d6)](a42_0x5eecb4[_0x4ec808(0x202)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0xb2ca11[_0x4ec808(0x333)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x2f9);[a42_0x46b63f(0x212)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a42_0x46b63f(0x322)](_0x39e627){const _0x293d7d=a42_0x46b63f,{options:_0x5a871d,args:_0x33ff45,tdx:_0x3a7950}=_0x39e627,_0x32a0d3=this[_0x293d7d(0x26f)](_0x33ff45,_0x5a871d),_0x5201e2=_0x5a871d['revision'],_0x44d8d1=_0x5a871d[_0x293d7d(0x311)];_0x5a871d[_0x293d7d(0x1c4)]&&(_0x32a0d3&&console['error'](_0x293d7d(0x1db)+_0x32a0d3),_0x5201e2&&console[_0x293d7d(0x1d6)](_0x293d7d(0x1f1)+_0x5201e2),_0x5a871d[_0x293d7d(0x27f)]&&console[_0x293d7d(0x1d6)](_0x293d7d(0x2b7)),_0x44d8d1&&console[_0x293d7d(0x1d6)]('Validation:\x20skipped'));let _0x47d47d;try{_0x47d47d=await withSpinner(_0x293d7d(0x25e),()=>_0x3a7950[_0x293d7d(0x2c4)][_0x293d7d(0x32f)]({'sourceDir':_0x32a0d3,'revision':_0x5201e2,'skipValidation':_0x44d8d1}),{'verbose':_0x5a871d[_0x293d7d(0x1c4)]});}catch(_0x212c10){if(_0x212c10 instanceof Error&&_0x212c10[_0x293d7d(0x350)][_0x293d7d(0x35c)]('No\x20workflow\x20tdx.json\x20found'))return console['error'](a42_0x5eecb4['red']('Error:'),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x5a871d['workflowProject']?console[_0x293d7d(0x1d6)](a42_0x5eecb4[_0x293d7d(0x202)]('Tip:\x20cd\x20to\x20workflows/'+_0x5a871d[_0x293d7d(0x20a)]+_0x293d7d(0x233)+_0x5a871d[_0x293d7d(0x20a)]+'\x27')):console['error'](a42_0x5eecb4['dim'](_0x293d7d(0x21f))),0x1;throw _0x212c10;}const _0x27e935=_0x47d47d[_0x293d7d(0x2fc)];console[_0x293d7d(0x1d6)](_0x293d7d(0x2a0)+_0x27e935[_0x293d7d(0x333)]),console['error'](_0x293d7d(0x1bd)+_0x27e935[_0x293d7d(0x281)]),console[_0x293d7d(0x1d6)]('\x20\x20Revision:\x20'+_0x27e935[_0x293d7d(0x278)]),console[_0x293d7d(0x1d6)](_0x293d7d(0x2d9)+a42_0x5eecb4[_0x293d7d(0x273)]('+'+_0x27e935[_0x293d7d(0x293)]['new']+'\x20new')+',\x20'+(a42_0x5eecb4[_0x293d7d(0x2ff)]('~'+_0x27e935['summary'][_0x293d7d(0x206)]+_0x293d7d(0x1e8))+',\x20')+(a42_0x5eecb4['red']('-'+_0x27e935[_0x293d7d(0x293)]['deleted']+_0x293d7d(0x1e3))+',\x20')+(''+a42_0x5eecb4[_0x293d7d(0x202)](_0x27e935[_0x293d7d(0x293)][_0x293d7d(0x1ef)]+'\x20unchanged')));for(const _0x16151d of _0x27e935[_0x293d7d(0x331)]){_0x16151d[_0x293d7d(0x2fb)]===_0x293d7d(0x206)&&_0x16151d[_0x293d7d(0x210)]&&(console[_0x293d7d(0x1d6)]('\x0a'+a42_0x5eecb4['cyan'](_0x293d7d(0x2c2)+_0x16151d[_0x293d7d(0x292)])),console[_0x293d7d(0x1d6)](_0x16151d['diff']));}if(!_0x27e935[_0x293d7d(0x1c5)])return console[_0x293d7d(0x1d6)](a42_0x5eecb4[_0x293d7d(0x273)](_0x293d7d(0x24c))),await this[_0x293d7d(0x204)](_0x3a7950,_0x27e935[_0x293d7d(0x333)],_0x5a871d['site']),0x0;if(_0x5a871d['dryRun'])return console[_0x293d7d(0x1d6)](a42_0x5eecb4[_0x293d7d(0x2ff)](_0x293d7d(0x330))),0x0;if(!_0x5a871d[_0x293d7d(0x32d)]){if(!isInteractive())return console[_0x293d7d(0x1d6)](a42_0x5eecb4[_0x293d7d(0x1c9)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x293d7d(0x1d6)](a42_0x5eecb4['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1f4b82=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x1f4b82)return console[_0x293d7d(0x1d6)](a42_0x5eecb4[_0x293d7d(0x2ff)](_0x293d7d(0x1c6)),'-\x20nothing\x20pushed'),0x1;}const _0x5ed5cd=await withSpinner('Pushing\x20project...',()=>_0x3a7950['workflow'][_0x293d7d(0x200)](_0x27e935),{'verbose':_0x5a871d['verbose']}),_0x30dbaa=_0x5ed5cd['data'];return console[_0x293d7d(0x1d6)](a42_0x5eecb4[_0x293d7d(0x273)](_0x293d7d(0x318))),console[_0x293d7d(0x1d6)](_0x293d7d(0x2d5)+_0x30dbaa[_0x293d7d(0x1d7)]),console[_0x293d7d(0x1d6)](_0x293d7d(0x308)+_0x30dbaa['revision']),await this['showWorkflowConsoleUrl'](_0x3a7950,_0x30dbaa['projectName'],_0x5a871d[_0x293d7d(0x227)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]='workflow:clone';[a42_0x46b63f(0x212)]=a42_0x46b63f(0x22a);async[a42_0x46b63f(0x322)](_0xae04e5){const _0x594db4=a42_0x46b63f,{options:_0x54ef33,args:_0x2c251e,tdx:_0x5d34d3}=_0xae04e5,_0x3dcaef=this['resolveProjectDir'](_0x2c251e,_0x54ef33),_0x2b11a3=_0x54ef33[_0x594db4(0x218)],_0x3a89bf=_0x54ef33[_0x594db4(0x278)],_0x250503=_0x54ef33[_0x594db4(0x311)];if(!_0x3dcaef)return console['error'](a42_0x5eecb4[_0x594db4(0x1c9)](_0x594db4(0x29a)),_0x594db4(0x344)),console['error'](a42_0x5eecb4[_0x594db4(0x202)](_0x594db4(0x1e5))),console[_0x594db4(0x1d6)](a42_0x5eecb4[_0x594db4(0x202)](_0x594db4(0x342))),0x1;if(!_0x2b11a3)return console['error'](a42_0x5eecb4[_0x594db4(0x1c9)](_0x594db4(0x29a)),_0x594db4(0x347)),console['error'](a42_0x5eecb4[_0x594db4(0x202)](_0x594db4(0x1e5))),0x1;_0x54ef33[_0x594db4(0x1c4)]&&(console[_0x594db4(0x1d6)](_0x594db4(0x1db)+_0x3dcaef),console[_0x594db4(0x1d6)](_0x594db4(0x2ae)+_0x2b11a3),_0x3a89bf&&console[_0x594db4(0x1d6)]('Revision:\x20'+_0x3a89bf),_0x54ef33[_0x594db4(0x27f)]&&console['error'](_0x594db4(0x2b7)),_0x250503&&console[_0x594db4(0x1d6)]('Validation:\x20skipped'));const _0x49e726=await withSpinner(_0x594db4(0x2c5),()=>_0x5d34d3[_0x594db4(0x2c4)]['prepareCloneProject'](_0x3dcaef,_0x2b11a3,{'revision':_0x3a89bf,'skipValidation':_0x250503}),{'verbose':_0x54ef33[_0x594db4(0x1c4)]}),_0x1f6c40=_0x49e726[_0x594db4(0x2fc)];console[_0x594db4(0x1d6)](_0x594db4(0x2e0)+_0x1f6c40['sourceDir']);_0x1f6c40[_0x594db4(0x355)]&&console['error']('Source\x20project:\x20'+_0x1f6c40['sourceProjectName']);console[_0x594db4(0x1d6)](_0x594db4(0x2ae)+_0x1f6c40[_0x594db4(0x20b)]),console['error'](_0x594db4(0x1f1)+_0x1f6c40['revision']),console[_0x594db4(0x1d6)](_0x594db4(0x214)+_0x1f6c40[_0x594db4(0x316)]);_0x1f6c40[_0x594db4(0x247)]&&(console[_0x594db4(0x1d6)](a42_0x5eecb4[_0x594db4(0x2ff)](_0x594db4(0x336)+_0x1f6c40[_0x594db4(0x20b)]+_0x594db4(0x1c8)+_0x1f6c40[_0x594db4(0x237)]+')')),console[_0x594db4(0x1d6)](a42_0x5eecb4[_0x594db4(0x2ff)](_0x594db4(0x266))));if(_0x54ef33[_0x594db4(0x27f)])return console[_0x594db4(0x1d6)](a42_0x5eecb4[_0x594db4(0x2ff)](_0x594db4(0x33a))),0x0;if(!_0x54ef33[_0x594db4(0x32d)]){if(!isInteractive())return console['error'](a42_0x5eecb4[_0x594db4(0x1c9)]('\x0aError:'),_0x594db4(0x323)),console['error'](a42_0x5eecb4['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2a4c30=_0x1f6c40[_0x594db4(0x355)]||a42_0x15acaf['basename'](_0x3dcaef),_0x46a13d=_0x1f6c40[_0x594db4(0x247)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x2b11a3+_0x594db4(0x33f):_0x594db4(0x2fe)+_0x2a4c30+_0x594db4(0x2cd)+_0x2b11a3+'\x22?',_0x6f3f5b=await confirmKey(_0x46a13d);if(!_0x6f3f5b)return console['error'](a42_0x5eecb4[_0x594db4(0x2ff)](_0x594db4(0x1c6))),0x1;}const _0x12c11e=await withSpinner(_0x1f6c40[_0x594db4(0x247)]?_0x594db4(0x207)+_0x2b11a3+'...':_0x594db4(0x1d4)+_0x2b11a3+_0x594db4(0x1bf),()=>_0x5d34d3[_0x594db4(0x2c4)][_0x594db4(0x35a)](_0x1f6c40),{'verbose':_0x54ef33[_0x594db4(0x1c4)]}),_0x193246=_0x12c11e['data'];return console[_0x594db4(0x1d6)](a42_0x5eecb4[_0x594db4(0x273)](_0x1f6c40['targetExists']?_0x594db4(0x1f3):'✔\x20Clone\x20complete')),console[_0x594db4(0x1d6)](_0x594db4(0x1d9)+_0x193246[_0x594db4(0x20b)]),console['error'](_0x594db4(0x2d5)+_0x193246[_0x594db4(0x2d8)]),console[_0x594db4(0x1d6)]('\x20\x20Revision:\x20'+_0x193246[_0x594db4(0x278)]),await this[_0x594db4(0x204)](_0x5d34d3,_0x193246['newProjectName'],_0x54ef33['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x277);[a42_0x46b63f(0x212)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0x46b63f(0x322)](_0x3cef70){const _0x4f346d=a42_0x46b63f,{options:_0x12d4e8,args:_0x2bf3c2,tdx:_0x5ff85a}=_0x3cef70,_0x41b9b2=_0x2bf3c2[0x0];if(!_0x41b9b2)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x4f346d(0x1d6)](_0x4f346d(0x1e7)),0x1;_0x12d4e8[_0x4f346d(0x1c4)]&&console[_0x4f346d(0x1d6)]('Project:\x20'+_0x41b9b2);if(!_0x12d4e8['yes']){if(!isInteractive())return console[_0x4f346d(0x1d6)](a42_0x5eecb4[_0x4f346d(0x1c9)](_0x4f346d(0x1d5)),_0x4f346d(0x323)),console['error'](a42_0x5eecb4['dim'](_0x4f346d(0x25b))),0x1;const _0xeec48b=await confirmKey(_0x4f346d(0x34c)+_0x41b9b2+_0x4f346d(0x34b));if(!_0xeec48b)return console[_0x4f346d(0x1d6)](a42_0x5eecb4[_0x4f346d(0x2ff)](_0x4f346d(0x1c6))),0x1;}const _0x45d978=await withSpinner(_0x4f346d(0x224)+_0x41b9b2+_0x4f346d(0x1bf),()=>_0x5ff85a[_0x4f346d(0x2c4)][_0x4f346d(0x254)](_0x41b9b2),{'verbose':_0x12d4e8['verbose']}),_0x3144b3=_0x45d978[_0x4f346d(0x2fc)];return console[_0x4f346d(0x1d6)]('✔\x20Deleted\x20project\x20'+_0x3144b3[_0x4f346d(0x333)]),console[_0x4f346d(0x1d6)]('\x20\x20Project\x20ID:\x20'+_0x3144b3[_0x4f346d(0x1d7)]),0x0;}}export function parseKeyValue(_0x23cf1f){const _0x589648=a42_0x46b63f,_0x33add4=_0x23cf1f[_0x589648(0x1f6)]('=');if(_0x33add4===-0x1)throw new Error(_0x589648(0x2c7)+_0x23cf1f+_0x589648(0x261));const _0x177906=_0x23cf1f[_0x589648(0x285)](0x0,_0x33add4),_0x3d52f7=_0x23cf1f[_0x589648(0x285)](_0x33add4+0x1);if(!_0x177906)throw new Error(_0x589648(0x257));return{'key':_0x177906,'value':_0x3d52f7};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]='workflow:secrets:list';[a42_0x46b63f(0x212)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0x46b63f(0x322)](_0x4f378c){const _0x41520c=a42_0x46b63f,{options:_0x3d5a9f,args:_0x5355b7,tdx:_0x307430}=_0x4f378c,_0x53a616=this[_0x41520c(0x320)](_0x5355b7,_0x3d5a9f);if(!_0x53a616)return 0x1;_0x3d5a9f['verbose']&&console[_0x41520c(0x1d6)]('Project:\x20'+_0x53a616);const _0x21160a=await withSpinner('Listing\x20secrets...',()=>_0x307430[_0x41520c(0x2c4)][_0x41520c(0x243)](_0x53a616),{'verbose':_0x3d5a9f[_0x41520c(0x1c4)]}),{secrets:_0x3f861b}=_0x21160a[_0x41520c(0x2fc)];return console[_0x41520c(0x1d6)](_0x41520c(0x2ed)+_0x3f861b[_0x41520c(0x360)]+'\x20secret'+(_0x3f861b[_0x41520c(0x360)]!==0x1?'s':'')),await handleSDKOutput(_0x3f861b,_0x3d5a9f),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x31f);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x2ad);async[a42_0x46b63f(0x322)](_0x2af9fd){const _0x4a8638=a42_0x46b63f,{options:_0x4f6ea9,args:_0x2785e3,tdx:_0x384e4a}=_0x2af9fd;let _0x45a87f,_0x91912d;if(_0x2785e3[_0x4a8638(0x360)]>=0x2)_0x45a87f=_0x2785e3[0x0],_0x91912d=_0x2785e3[0x1];else{if(_0x2785e3[_0x4a8638(0x360)]===0x1&&_0x4f6ea9['workflowProject'])_0x45a87f=_0x4f6ea9[_0x4a8638(0x20a)],_0x91912d=_0x2785e3[0x0];else return _0x2785e3[_0x4a8638(0x360)]===0x1?(console[_0x4a8638(0x1d6)](_0x4a8638(0x1fb)),console[_0x4a8638(0x1d6)](_0x4a8638(0x267)),0x1):(console[_0x4a8638(0x1d6)]('Error:\x20KEY=VALUE\x20is\x20required'),console[_0x4a8638(0x1d6)](_0x4a8638(0x244)),0x1);}let _0x2590ec,_0xcf88af;try{({key:_0x2590ec,value:_0xcf88af}=parseKeyValue(_0x91912d));}catch(_0x537ed6){return _0x537ed6 instanceof Error&&console['error'](a42_0x5eecb4[_0x4a8638(0x1c9)](_0x4a8638(0x29a)),_0x537ed6[_0x4a8638(0x350)]),0x1;}_0x4f6ea9['verbose']&&(console[_0x4a8638(0x1d6)](_0x4a8638(0x27b)+_0x45a87f),console['error'](_0x4a8638(0x1ce)+_0x2590ec));const _0x2024b3=await withSpinner(_0x4a8638(0x2a4),()=>_0x384e4a[_0x4a8638(0x2c4)][_0x4a8638(0x2b8)](_0x45a87f,_0x2590ec,_0xcf88af),{'verbose':_0x4f6ea9[_0x4a8638(0x1c4)]}),_0x47c715=_0x2024b3[_0x4a8638(0x2fc)];return console[_0x4a8638(0x1d6)](_0x4a8638(0x26c)+_0x47c715[_0x4a8638(0x29f)]+_0x4a8638(0x35d)+_0x47c715[_0x4a8638(0x333)]+'\x27'),(_0x4f6ea9[_0x4a8638(0x1fe)]||_0x4f6ea9['jsonl'])&&await handleSingleObjectOutput(_0x47c715,_0x4f6ea9),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x33d);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x2e2);async[a42_0x46b63f(0x322)](_0x23d3eb){const _0x5880bb=a42_0x46b63f,{options:_0x20f49e,args:_0x3ac166,tdx:_0x47c9e3}=_0x23d3eb;let _0x43709e,_0x3d1883;if(_0x3ac166[_0x5880bb(0x360)]>=0x2)_0x43709e=_0x3ac166[0x0],_0x3d1883=_0x3ac166[0x1];else{if(_0x3ac166['length']===0x1&&_0x20f49e[_0x5880bb(0x20a)])_0x43709e=_0x20f49e[_0x5880bb(0x20a)],_0x3d1883=_0x3ac166[0x0];else return _0x3ac166[_0x5880bb(0x360)]===0x1?(console[_0x5880bb(0x1d6)](_0x5880bb(0x1fb)),console[_0x5880bb(0x1d6)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x5880bb(0x1d6)](_0x5880bb(0x362)),console[_0x5880bb(0x1d6)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x20f49e[_0x5880bb(0x1c4)]&&(console[_0x5880bb(0x1d6)]('Project:\x20'+_0x43709e),console[_0x5880bb(0x1d6)]('Key:\x20'+_0x3d1883));if(!_0x20f49e[_0x5880bb(0x32d)]){if(!isInteractive())return console['error'](a42_0x5eecb4['red'](_0x5880bb(0x1d5)),_0x5880bb(0x323)),console['error'](a42_0x5eecb4[_0x5880bb(0x202)](_0x5880bb(0x25b))),0x1;const _0x212236=await confirmKey(_0x5880bb(0x260)+_0x3d1883+_0x5880bb(0x357)+_0x43709e+'\x27?');if(!_0x212236)return console['error'](a42_0x5eecb4['yellow'](_0x5880bb(0x1c6))),0x1;}const _0x2a3d6f=await withSpinner(_0x5880bb(0x2a7),()=>_0x47c9e3[_0x5880bb(0x2c4)]['deleteSecret'](_0x43709e,_0x3d1883),{'verbose':_0x20f49e[_0x5880bb(0x1c4)]}),_0x15e6e6=_0x2a3d6f[_0x5880bb(0x2fc)];return console[_0x5880bb(0x1d6)]('✔\x20Secret\x20\x27'+_0x15e6e6[_0x5880bb(0x29f)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x15e6e6[_0x5880bb(0x333)]+'\x27'),(_0x20f49e[_0x5880bb(0x1fe)]||_0x20f49e[_0x5880bb(0x232)])&&await handleSingleObjectOutput(_0x15e6e6,_0x20f49e),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(_0x573b53){const _0x145538=a42_0x46b63f,_0x15918f=Math[_0x145538(0x1f9)](_0x573b53/0x3e8),_0x20400c=Math[_0x145538(0x1f9)](_0x15918f/0x3c),_0x56a158=Math[_0x145538(0x1f9)](_0x20400c/0x3c),_0x305b61=Math['floor'](_0x56a158/0x18);if(_0x305b61>0x0){const _0x531487=_0x56a158%0x18;return _0x531487>0x0?_0x305b61+'d\x20'+_0x531487+'h':_0x305b61+'d';}else{if(_0x56a158>0x0){const _0x198563=_0x20400c%0x3c;return _0x198563>0x0?_0x56a158+'h\x20'+_0x198563+'m':_0x56a158+'h';}else{if(_0x20400c>0x0){const _0x3183e6=_0x15918f%0x3c;return _0x3183e6>0x0?_0x20400c+'m\x20'+_0x3183e6+'s':_0x20400c+'m';}else return _0x15918f+'s';}}}function formatTimestamp(_0x2b6ed3,_0x231b26){const _0x3b8463=a42_0x46b63f,_0x2ece3e=new Date(_0x2b6ed3),_0x20414e=String(_0x2ece3e[_0x3b8463(0x1cc)]())[_0x3b8463(0x24a)](0x2,'0'),_0x34ada6=String(_0x2ece3e[_0x3b8463(0x30f)]())['padStart'](0x2,'0'),_0x3fbe75=_0x20414e+':'+_0x34ada6,_0x3b539c=_0x2ece3e[_0x3b8463(0x358)]()===_0x231b26['getFullYear']()&&_0x2ece3e[_0x3b8463(0x2d2)]()===_0x231b26[_0x3b8463(0x2d2)]()&&_0x2ece3e[_0x3b8463(0x31a)]()===_0x231b26[_0x3b8463(0x31a)]();if(_0x3b539c)return _0x3fbe75;else{const _0x10b7f3=String(_0x2ece3e[_0x3b8463(0x2d2)]()+0x1)['padStart'](0x2,'0'),_0x3e73f0=String(_0x2ece3e[_0x3b8463(0x31a)]())[_0x3b8463(0x24a)](0x2,'0');return _0x10b7f3+'-'+_0x3e73f0+'\x20'+_0x3fbe75;}}function formatDate(_0x3a139c){const _0x2a3d2b=a42_0x46b63f,_0xf21361=_0x3a139c[_0x2a3d2b(0x358)](),_0x13a9af=String(_0x3a139c['getMonth']()+0x1)[_0x2a3d2b(0x24a)](0x2,'0'),_0x101ecc=String(_0x3a139c['getDate']())[_0x2a3d2b(0x24a)](0x2,'0');return _0xf21361+'-'+_0x13a9af+'-'+_0x101ecc;}function getTaskStateIcon(_0x49e320){const _0x130aba={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x130aba[_0x49e320]||'⚪';}function getBarChar(_0x463241){const _0x3cdb26=a42_0x46b63f;return _0x463241===_0x3cdb26(0x1d6)||_0x463241==='group_error'?'×':'─';}function getBarColor(_0x115240){const _0x175fa8=a42_0x46b63f,_0x5e7bef={'success':a42_0x5eecb4[_0x175fa8(0x273)],'error':a42_0x5eecb4['red'],'group_error':a42_0x5eecb4[_0x175fa8(0x1c9)],'running':a42_0x5eecb4['blue'],'blocked':a42_0x5eecb4[_0x175fa8(0x2ff)],'planned':a42_0x5eecb4[_0x175fa8(0x202)],'canceling':a42_0x5eecb4[_0x175fa8(0x2ff)]};return _0x5e7bef[_0x115240]||a42_0x5eecb4[_0x175fa8(0x1c0)];}function parseTaskName(_0x14b467){const _0x345f32=a42_0x46b63f;let _0x14fc80=_0x14b467['replace'](/^\++/,'');const _0x2bce6c=_0x14fc80[_0x345f32(0x28a)]('+'),_0x1c5b61=_0x2bce6c[_0x345f32(0x360)]>0x1?_0x2bce6c['length']-0x2:0x0,_0x266c60=_0x2bce6c[_0x2bce6c[_0x345f32(0x360)]-0x1]||_0x14fc80;return{'level':_0x1c5b61,'name':'+'+_0x266c60};}function truncateTaskName(_0x3f3cfe,_0x20e35d){const _0xc5599e=stringWidth(_0x3f3cfe);if(_0xc5599e<=_0x20e35d)return _0x3f3cfe;let _0x2e8b16=_0x3f3cfe;while(stringWidth(_0x2e8b16+'…')>_0x20e35d&&_0x2e8b16['length']>0x0){_0x2e8b16=_0x2e8b16['slice'](0x0,-0x1);}return _0x2e8b16+'…';}function calculateTimeScale(_0x512902,_0x213ade){const _0x36b781=a42_0x46b63f;return{'startTime':_0x512902[_0x36b781(0x2bc)],'endTime':_0x512902['end'],'durationMs':_0x512902[_0x36b781(0x27a)],'msPerChar':_0x512902[_0x36b781(0x27a)]/_0x213ade};}function timeToPosition(_0x58716f,_0x42596f,_0x3f4ffe){const _0xf19fe0=a42_0x46b63f,_0x312a43=_0x58716f-_0x42596f[_0xf19fe0(0x30d)],_0x5e9c74=Math['floor'](_0x312a43/_0x42596f[_0xf19fe0(0x25c)]);return Math[_0xf19fe0(0x1bc)](0x0,Math[_0xf19fe0(0x26a)](_0x5e9c74,_0x3f4ffe));}function renderTimeAxis(_0xe540b6,_0x577b75){const _0x2c58f1=a42_0x46b63f,_0x177ff5=Math[_0x2c58f1(0x26a)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x2c58f1(0x1bc)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math['floor'](_0x577b75/TIMELINE_CONFIG[_0x2c58f1(0x1cb)]))),_0x5b3549=_0xe540b6['durationMs']/(_0x177ff5-0x1),_0x1ef5db=new Date(_0xe540b6[_0x2c58f1(0x30d)]),_0x52406c=[];for(let _0x292795=0x0;_0x292795<_0x177ff5;_0x292795++){const _0x1606ca=_0xe540b6[_0x2c58f1(0x30d)]+_0x292795*_0x5b3549,_0xc2c320=timeToPosition(_0x1606ca,_0xe540b6,_0x577b75),_0x5f258b=formatTimestamp(_0x1606ca,_0x1ef5db);_0x52406c[_0x2c58f1(0x1da)]({'pos':_0xc2c320,'text':_0x5f258b});}const _0x285516=new Array(_0x577b75)[_0x2c58f1(0x258)]('\x20');let _0x35f419=-0x1;for(const {pos:_0x41bc29,text:_0x5c56a0}of _0x52406c){let _0x200884=Math[_0x2c58f1(0x1bc)](0x0,_0x41bc29-Math[_0x2c58f1(0x1f9)](_0x5c56a0[_0x2c58f1(0x360)]/0x2));_0x200884<=_0x35f419+TIMELINE_CONFIG[_0x2c58f1(0x217)]&&(_0x200884=_0x35f419+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x200884+_0x5c56a0[_0x2c58f1(0x360)]>_0x577b75&&(_0x200884=_0x577b75-_0x5c56a0[_0x2c58f1(0x360)]);if(_0x200884>=0x0&&_0x200884+_0x5c56a0[_0x2c58f1(0x360)]<=_0x577b75&&_0x200884>_0x35f419){for(let _0x1f7c23=0x0;_0x1f7c23<_0x5c56a0[_0x2c58f1(0x360)];_0x1f7c23++){_0x285516[_0x200884+_0x1f7c23]=_0x5c56a0[_0x1f7c23];}_0x35f419=_0x200884+_0x5c56a0[_0x2c58f1(0x360)]-0x1;}}return _0x285516[_0x2c58f1(0x2dd)]('');}function renderTaskRow(_0x5d7242,_0x2aae2f,_0x4c3b2f,_0x3e3431){const _0x2df03f=a42_0x46b63f,{level:_0x5a46a9,name:_0x7cd1ba}=parseTaskName(_0x5d7242[_0x2df03f(0x218)]),_0x4741bd='\x20'[_0x2df03f(0x240)](_0x5a46a9),_0x4d4e35=_0x5d7242[_0x2df03f(0x283)]?'('+formatElapsed(_0x5d7242[_0x2df03f(0x283)][_0x2df03f(0x27a)])+')':'',_0x122c0d=stringWidth(_0x4d4e35),_0x11b0d6=_0x5a46a9*0x1,_0x3446d0=_0x3e3431-_0x11b0d6-_0x122c0d-0x1,_0xac50f2=truncateTaskName(_0x7cd1ba,_0x3446d0),_0x19fae4=_0x4741bd+_0xac50f2,_0x149f44=stringWidth(_0x19fae4),_0x14fbf4=_0x3e3431-_0x149f44-_0x122c0d,_0x1715ed=_0x19fae4+'\x20'[_0x2df03f(0x240)](Math[_0x2df03f(0x1bc)](0x1,_0x14fbf4))+a42_0x5eecb4[_0x2df03f(0x202)](_0x4d4e35),_0x227c93=getTaskStateIcon(_0x5d7242[_0x2df03f(0x251)]),_0x27d620=new Array(_0x4c3b2f)[_0x2df03f(0x258)]('\x20');if(_0x5d7242['window']){const _0x5022e7=timeToPosition(_0x5d7242[_0x2df03f(0x283)][_0x2df03f(0x2bc)],_0x2aae2f,_0x4c3b2f),_0x443fdf=timeToPosition(_0x5d7242['window']['end'],_0x2aae2f,_0x4c3b2f),_0x18f2af=getBarChar(_0x5d7242['state']),_0x33135d=Math[_0x2df03f(0x1bc)](_0x5022e7+0x1,_0x443fdf);for(let _0xd11dca=_0x5022e7;_0xd11dca<Math[_0x2df03f(0x26a)](_0x33135d,_0x4c3b2f);_0xd11dca++){_0x27d620[_0xd11dca]=_0x18f2af;}}const _0x27b870=getBarColor(_0x5d7242['state']),_0x279d90=_0x27d620[_0x2df03f(0x235)](_0x1bac4a=>_0x1bac4a==='\x20'?'\x20':_0x27b870(_0x1bac4a))[_0x2df03f(0x2dd)]('');return _0x227c93+'\x20'+_0x1715ed+'│'+_0x279d90+'│';}function calculateStats(_0x9efcbe){const _0x25c6dd=a42_0x46b63f,_0x428a47={'total':_0x9efcbe['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x1d6385 of _0x9efcbe){if(_0x1d6385['state']===_0x25c6dd(0x339))_0x428a47[_0x25c6dd(0x339)]++;else{if(_0x1d6385[_0x25c6dd(0x251)]==='error'||_0x1d6385[_0x25c6dd(0x251)]===_0x25c6dd(0x295))_0x428a47[_0x25c6dd(0x1d6)]++;else _0x1d6385[_0x25c6dd(0x251)]==='running'?_0x428a47[_0x25c6dd(0x203)]++:_0x428a47[_0x25c6dd(0x284)]++;}}return _0x428a47;}function formatStats(_0x5c0303){const _0x199c79=a42_0x46b63f;return[_0x199c79(0x34a)+_0x5c0303[_0x199c79(0x21c)],'✅\x20'+_0x5c0303['success'],'❌\x20'+_0x5c0303['error'],'🔄\x20'+_0x5c0303['running'],'⏳\x20'+_0x5c0303[_0x199c79(0x284)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x46b63f(0x218)]=a42_0x46b63f(0x2be);[a42_0x46b63f(0x212)]=a42_0x46b63f(0x2bf);async[a42_0x46b63f(0x322)](_0x321352){const _0x492d8f=a42_0x46b63f,{options:_0x1a0a88,args:_0x502933,tdx:_0x4210fb}=_0x321352;let _0xea73f8,_0xc79340,_0x787512=![];if(_0x502933[0x0]){if(_0x502933[0x0][_0x492d8f(0x35c)]('.')){const _0x354c17=this['parseProjectWorkflowPattern'](_0x502933,_0x1a0a88);if(!_0x354c17)return 0x1;_0xea73f8=_0x354c17['projectName'],_0xc79340=_0x354c17[_0x492d8f(0x2a9)];}else{_0xc79340=_0x502933[0x0],_0xea73f8=_0x1a0a88[_0x492d8f(0x20a)];if(!_0xea73f8)return console[_0x492d8f(0x1d6)](a42_0x5eecb4[_0x492d8f(0x1c9)]('Error:'),_0x492d8f(0x1be)),0x1;_0x787512=!![];}}else{const _0x5a78b5=this[_0x492d8f(0x354)](_0x502933,_0x1a0a88);if(!_0x5a78b5)return 0x1;_0xea73f8=_0x5a78b5[_0x492d8f(0x333)],_0xc79340=_0x5a78b5[_0x492d8f(0x2a9)];}if(_0x1a0a88[_0x492d8f(0x1c4)]){if(_0xea73f8&&_0xc79340)console[_0x492d8f(0x1d6)]('Filter:\x20'+_0xea73f8+'.'+_0xc79340);else _0xea73f8&&console[_0x492d8f(0x1d6)](_0x492d8f(0x2ac)+_0xea73f8);}const _0x32c13d=_0x1a0a88[_0x492d8f(0x229)],_0x29ddff=_0x1a0a88['sessionId'];if(_0x32c13d){_0x29ddff&&console[_0x492d8f(0x1d6)](a42_0x5eecb4[_0x492d8f(0x2ff)]('Warning:'),_0x492d8f(0x304));const _0x44bd0a=_0x1a0a88[_0x492d8f(0x2a2)];return _0x44bd0a?await this[_0x492d8f(0x255)](_0x321352,_0x32c13d):await this[_0x492d8f(0x228)](_0x321352,_0x32c13d,_0x1a0a88),0x0;}if(_0x29ddff){const _0x521183=await withSpinner(_0x492d8f(0x2d7),()=>_0x4210fb[_0x492d8f(0x2c4)][_0x492d8f(0x321)]({'projectName':_0xea73f8,'workflowName':_0xc79340,'limit':0x64}),{'verbose':_0x1a0a88['verbose']}),_0x23969c=_0x521183[_0x492d8f(0x2fc)][_0x492d8f(0x1dd)](_0x113101=>_0x113101['id']===_0x29ddff);if(!_0x23969c)return console[_0x492d8f(0x1d6)](a42_0x5eecb4['red'](_0x492d8f(0x29a)),_0x492d8f(0x23d)+_0x29ddff),0x1;if(!_0x23969c[_0x492d8f(0x241)]?.['id'])return console['error'](a42_0x5eecb4[_0x492d8f(0x1c9)](_0x492d8f(0x29a)),_0x492d8f(0x22d)+_0x29ddff+_0x492d8f(0x2ee)),0x1;const _0xb7c445=_0x23969c['lastAttempt']['id'];_0x1a0a88[_0x492d8f(0x1c4)]&&console[_0x492d8f(0x1d6)](_0x492d8f(0x32b)+_0xb7c445+_0x492d8f(0x27d)+_0x29ddff);const _0x2bcfb1=_0x1a0a88[_0x492d8f(0x2a2)];return _0x2bcfb1?await this['pollTimeline'](_0x321352,_0xb7c445):await this['renderSingleTimeline'](_0x321352,_0xb7c445,_0x1a0a88),0x0;}const _0x459bc8=await withSpinner('Loading\x20sessions...',()=>_0x4210fb[_0x492d8f(0x2c4)][_0x492d8f(0x321)]({'projectName':_0xea73f8,'workflowName':_0xc79340,'limit':_0x1a0a88[_0x492d8f(0x2aa)]||0x32}),{'verbose':_0x1a0a88[_0x492d8f(0x1c4)]}),_0x267838=_0x459bc8[_0x492d8f(0x2fc)];if(_0x267838[_0x492d8f(0x360)]===0x0){if(_0xea73f8&&_0xc79340)console['error'](_0x492d8f(0x1ff)+_0xea73f8+'.'+_0xc79340);else _0xea73f8?console[_0x492d8f(0x1d6)](_0x492d8f(0x2b3)+_0xea73f8):(console[_0x492d8f(0x1d6)]('No\x20workflow\x20sessions\x20found'),console[_0x492d8f(0x1d6)](a42_0x5eecb4[_0x492d8f(0x202)](_0x492d8f(0x1dc))));return 0x0;}_0x267838[_0x492d8f(0x1f8)]((_0x2258a8,_0x7ed1ed)=>{const _0x1c3912=_0x492d8f,_0x152765=_0x2258a8[_0x1c3912(0x23f)]||'',_0x5c7f5a=_0x7ed1ed[_0x1c3912(0x23f)]||'';return _0x5c7f5a[_0x1c3912(0x28e)](_0x152765);});if(_0x1a0a88[_0x492d8f(0x1fe)]||_0x1a0a88[_0x492d8f(0x232)])return await handleSDKOutput(_0x267838,_0x1a0a88),0x0;let _0x1e62be;if(_0x787512){const _0x4d9dcc=_0x267838[0x0];if(!_0x4d9dcc[_0x492d8f(0x241)]?.['id'])return console[_0x492d8f(0x1d6)](_0x492d8f(0x26d)),0x0;_0x1e62be=_0x4d9dcc['lastAttempt']['id'],_0x1a0a88[_0x492d8f(0x1c4)]&&console['error'](_0x492d8f(0x2f8)+_0x4d9dcc['sessionTime']);}else{const _0x1b5138=_0x267838['map'](_0x1b8c67=>{const _0x40aada=_0x492d8f,_0x5350cb=getAttemptStatusDisplay(_0x1b8c67[_0x40aada(0x241)]);return{'title':_0x1b8c67[_0x40aada(0x356)]?.['name']+'.'+_0x1b8c67['workflow']?.['name']+'\x20-\x20'+_0x1b8c67[_0x40aada(0x23f)]+'\x20'+_0x5350cb['icon'],'value':_0x1b8c67[_0x40aada(0x241)]?.['id']||'','description':_0x5350cb[_0x40aada(0x249)]};}),_0x35d0fa=await a42_0x2f989f({'type':_0x492d8f(0x338),'name':_0x492d8f(0x229),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x1b5138[_0x492d8f(0x234)](_0x75f230=>_0x75f230[_0x492d8f(0x319)]!=='')});if(!_0x35d0fa[_0x492d8f(0x229)])return 0x0;_0x1e62be=_0x35d0fa[_0x492d8f(0x229)];}const _0x104fb3=_0x1a0a88[_0x492d8f(0x2a2)];return _0x104fb3?await this['pollTimeline'](_0x321352,_0x1e62be):await this[_0x492d8f(0x228)](_0x321352,_0x1e62be,_0x1a0a88),0x0;}async[a42_0x46b63f(0x228)](_0x125220,_0x41ddc9,_0x2a9509){const _0x484244=a42_0x46b63f,{tdx:_0x85629c}=_0x125220;let _0x3558d5,_0xe7ba6b;try{[_0x3558d5,_0xe7ba6b]=await Promise['all']([_0x85629c[_0x484244(0x2c4)]['attempt'](_0x41ddc9),_0x85629c[_0x484244(0x2c4)][_0x484244(0x33c)](_0x41ddc9,![])]);}catch(_0x23aafb){console[_0x484244(0x1d6)](a42_0x5eecb4[_0x484244(0x1c9)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x2a9509['verbose']&&console[_0x484244(0x1d6)](_0x23aafb);throw _0x23aafb;}if(_0x2a9509['json']||_0x2a9509[_0x484244(0x232)]){const _0x1da49a=this[_0x484244(0x1f0)](_0x3558d5,_0xe7ba6b);await handleSDKOutput([_0x1da49a],_0x2a9509);return;}const _0xdc044e=_0x85629c['context'][_0x484244(0x227)],_0x5f2b40=this['renderTimeline'](_0x3558d5,_0xe7ba6b,_0xdc044e);console[_0x484244(0x2c8)](_0x5f2b40);}async['pollTimeline'](_0x4e7066,_0x3a1070){const _0x509e1d=a42_0x46b63f,{tdx:_0x534508}=_0x4e7066,_0x4a7269=TIMELINE_CONFIG[_0x509e1d(0x262)],_0x1f3242=TIMELINE_CONFIG[_0x509e1d(0x29b)];let _0x2d1666=0x0;while(_0x2d1666<_0x1f3242){process[_0x509e1d(0x2c9)][_0x509e1d(0x24d)]&&process['stdout'][_0x509e1d(0x2a8)]('\x1bc');let _0x15bf6e,_0x534c25;try{[_0x15bf6e,_0x534c25]=await Promise[_0x509e1d(0x1de)]([_0x534508[_0x509e1d(0x2c4)][_0x509e1d(0x21e)](_0x3a1070),_0x534508[_0x509e1d(0x2c4)][_0x509e1d(0x33c)](_0x3a1070,![])]);}catch(_0x231c8c){console[_0x509e1d(0x1d6)](a42_0x5eecb4[_0x509e1d(0x1c9)](_0x509e1d(0x26e)));_0x2d1666>0x0&&console[_0x509e1d(0x1d6)](a42_0x5eecb4[_0x509e1d(0x202)](_0x509e1d(0x221)+_0x2d1666));throw _0x231c8c;}const _0x185498=_0x534508[_0x509e1d(0x2df)][_0x509e1d(0x227)],_0x5aff5b=this[_0x509e1d(0x314)](_0x15bf6e,_0x534c25,_0x185498);console['log'](_0x5aff5b);const _0x5a7c27=_0x15bf6e['done']&&_0x534c25[_0x509e1d(0x30b)](_0x3d874b=>_0x3d874b[_0x509e1d(0x251)]!==_0x509e1d(0x203)&&_0x3d874b[_0x509e1d(0x251)]!==_0x509e1d(0x2e9));if(_0x5a7c27){console['error'](a42_0x5eecb4[_0x509e1d(0x273)](_0x509e1d(0x286)));break;}console[_0x509e1d(0x1d6)](a42_0x5eecb4[_0x509e1d(0x202)](_0x509e1d(0x2ce)+_0x2d1666*0x2+_0x509e1d(0x26b))),await new Promise(_0x3faf8c=>setTimeout(_0x3faf8c,_0x4a7269)),_0x2d1666++;}_0x2d1666>=_0x1f3242&&console[_0x509e1d(0x1d6)](a42_0x5eecb4[_0x509e1d(0x2ff)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0x46b63f(0x314)](_0x3e3895,_0xf4ed86,_0x17bc8e){const _0x37e84b=a42_0x46b63f,_0x5bd78f=[],_0x58713b=TIMELINE_CONFIG[_0x37e84b(0x1e6)],_0x4d5fab=0x5,_0x2e8f65=process[_0x37e84b(0x2c9)][_0x37e84b(0x302)]||0x78,_0x466aae=_0x2e8f65-_0x58713b-_0x4d5fab,_0x2b5d47=Math[_0x37e84b(0x1bc)](TIMELINE_CONFIG[_0x37e84b(0x1d8)],Math[_0x37e84b(0x26a)](_0x466aae,TIMELINE_CONFIG[_0x37e84b(0x1d2)])),_0x869236=new Date(_0x3e3895[_0x37e84b(0x236)])[_0x37e84b(0x34f)](),_0x53639c=_0x3e3895[_0x37e84b(0x24b)]?new Date(_0x3e3895[_0x37e84b(0x24b)])[_0x37e84b(0x34f)]():Date[_0x37e84b(0x351)](),_0x233084={'start':_0x869236,'end':_0x53639c,'duration':_0x53639c-_0x869236},_0xad543a=new Map(),_0x470c4=[];for(const _0x521d86 of _0xf4ed86){if(_0x521d86['startedAt']){const _0x2d3690=new Date(_0x521d86[_0x37e84b(0x312)])[_0x37e84b(0x34f)](),_0x361bff=_0x521d86[_0x37e84b(0x346)]?new Date(_0x521d86['updatedAt'])[_0x37e84b(0x34f)]():Date['now'](),_0x30c579={'start':_0x2d3690,'end':_0x361bff,'duration':_0x361bff-_0x2d3690};_0xad543a[_0x37e84b(0x2b2)](_0x521d86['id'],_0x30c579),_0x470c4[_0x37e84b(0x1da)]({'name':_0x521d86[_0x37e84b(0x326)],'state':_0x521d86[_0x37e84b(0x251)]||_0x37e84b(0x22f),'window':_0x30c579});}else _0x470c4[_0x37e84b(0x1da)]({'name':_0x521d86[_0x37e84b(0x326)],'state':_0x521d86['state']||'planned','window':undefined});}_0x470c4['sort']((_0x332363,_0x1e643d)=>{const _0x2916cd=_0x37e84b;if(!_0x332363['window'])return 0x1;if(!_0x1e643d[_0x2916cd(0x283)])return-0x1;return _0x332363[_0x2916cd(0x283)]['start']-_0x1e643d['window'][_0x2916cd(0x2bc)];});const _0xa04bab=_0x470c4[_0x37e84b(0x360)],_0x4baec5=_0xa04bab>TIMELINE_CONFIG[_0x37e84b(0x299)];_0x4baec5&&_0x470c4[_0x37e84b(0x24f)](TIMELINE_CONFIG[_0x37e84b(0x299)]);const _0x408750=calculateTimeScale(_0x233084,_0x2b5d47),_0x19b1f2=_0x3e3895[_0x37e84b(0x1e1)]?_0x3e3895['success']?a42_0x5eecb4['green'](_0x37e84b(0x339)):a42_0x5eecb4['red'](_0x37e84b(0x1d6)):a42_0x5eecb4['blue'](_0x37e84b(0x203)),_0xf704d3=_0x3e3895[_0x37e84b(0x356)]?.['id'],_0x1acc30=_0x3e3895[_0x37e84b(0x35b)];let _0x2f840a;if(_0xf704d3&&_0x1acc30){const _0x42331d=getWorkflowAttemptUrl(_0x17bc8e,_0xf704d3,_0x1acc30,_0x3e3895['id']);_0x2f840a=hyperlink(a42_0x5eecb4[_0x37e84b(0x202)](_0x3e3895['id']),_0x42331d);}else _0x2f840a=a42_0x5eecb4[_0x37e84b(0x202)](_0x3e3895['id']);_0x5bd78f['push'](_0x37e84b(0x2ec)+_0x2f840a+_0x37e84b(0x2da)+_0x19b1f2+'\x20-\x20'+formatElapsed(_0x233084[_0x37e84b(0x27a)]));if(_0x470c4[_0x37e84b(0x360)]>0x0){const _0x48f894=renderTimeAxis(_0x408750,_0x2b5d47),_0x2ecdbc=new Date(_0x233084['start']),_0x4e2966=formatDate(_0x2ecdbc),_0xdf014=TIMELINE_CONFIG[_0x37e84b(0x1cf)]+TIMELINE_CONFIG['ICON_SPACING']+_0x58713b,_0x6d7ec5=_0x4e2966['padStart'](_0xdf014),_0x502c20=a42_0x5eecb4[_0x37e84b(0x202)](_0x6d7ec5);_0x5bd78f[_0x37e84b(0x1da)](_0x502c20+'\x20'+_0x48f894);for(const _0x48c098 of _0x470c4){_0x5bd78f[_0x37e84b(0x1da)](renderTaskRow(_0x48c098,_0x408750,_0x2b5d47,_0x58713b));}const _0x4d925a=calculateStats(_0x470c4);_0x5bd78f[_0x37e84b(0x1da)](formatStats(_0x4d925a)),_0x4baec5&&_0x5bd78f[_0x37e84b(0x1da)](a42_0x5eecb4[_0x37e84b(0x2ff)](_0x37e84b(0x1c7)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x37e84b(0x2c6)+_0xa04bab+_0x37e84b(0x2cc))),_0x5bd78f['push'](''),_0x5bd78f[_0x37e84b(0x1da)](a42_0x5eecb4[_0x37e84b(0x202)](_0x37e84b(0x25f))+('tdx\x20wf\x20attempt\x20'+_0x3e3895['id']+_0x37e84b(0x21b))+a42_0x5eecb4[_0x37e84b(0x202)]('\x20to\x20see\x20detailed\x20logs'));}else _0x5bd78f[_0x37e84b(0x1da)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x5bd78f[_0x37e84b(0x2dd)]('\x0a');}[a42_0x46b63f(0x1f0)](_0xf27262,_0xad400d){const _0x438780=a42_0x46b63f,_0x33e65d=new Date(_0xf27262['createdAt'])['getTime'](),_0x304390=_0xf27262[_0x438780(0x24b)]?new Date(_0xf27262[_0x438780(0x24b)])[_0x438780(0x34f)]():Date[_0x438780(0x351)](),_0x57a493=_0x304390-_0x33e65d,_0x1f3ad9=[];for(const _0x3e9406 of _0xad400d){if(_0x3e9406['startedAt']){const _0x53de95=new Date(_0x3e9406[_0x438780(0x312)])[_0x438780(0x34f)](),_0x4168af=_0x3e9406[_0x438780(0x346)]?new Date(_0x3e9406[_0x438780(0x346)])['getTime']():Date[_0x438780(0x351)]();_0x1f3ad9['push']({'name':_0x3e9406[_0x438780(0x326)],'state':_0x3e9406['state']||_0x438780(0x22f),'window':{'start':_0x53de95,'end':_0x4168af,'duration':_0x4168af-_0x53de95}});}else _0x1f3ad9[_0x438780(0x1da)]({'name':_0x3e9406[_0x438780(0x326)],'state':_0x3e9406[_0x438780(0x251)]||'planned','window':undefined});}const _0xf907c9=calculateStats(_0x1f3ad9);return{'attempt':{'id':_0xf27262['id'],'status':_0xf27262[_0x438780(0x1e1)]?_0xf27262[_0x438780(0x339)]?_0x438780(0x339):'error':_0x438780(0x203),'createdAt':_0xf27262[_0x438780(0x236)],'finishedAt':_0xf27262[_0x438780(0x24b)],'duration_ms':_0x57a493},'tasks':_0x1f3ad9['map'](_0x539218=>({'name':_0x539218[_0x438780(0x218)],'state':_0x539218[_0x438780(0x251)],'startedAt':_0x539218['window']?new Date(_0x539218[_0x438780(0x283)][_0x438780(0x2bc)])[_0x438780(0x1f5)]():null,'updatedAt':_0x539218[_0x438780(0x283)]?new Date(_0x539218['window']['end'])[_0x438780(0x1f5)]():null,'duration_ms':_0x539218[_0x438780(0x283)]?.[_0x438780(0x27a)]||null})),'stats':_0xf907c9};}}
|
|
1
|
+
const a42_0x3d9e57=a42_0x5d83;(function(_0x3db320,_0x332fc2){const _0x35822a=a42_0x5d83,_0x3566de=_0x3db320();while(!![]){try{const _0x45146d=-parseInt(_0x35822a(0x1a0))/0x1+-parseInt(_0x35822a(0x23f))/0x2*(-parseInt(_0x35822a(0x237))/0x3)+-parseInt(_0x35822a(0x22b))/0x4+-parseInt(_0x35822a(0x30e))/0x5*(-parseInt(_0x35822a(0x2a5))/0x6)+parseInt(_0x35822a(0x2fe))/0x7*(-parseInt(_0x35822a(0x1c1))/0x8)+-parseInt(_0x35822a(0x222))/0x9*(parseInt(_0x35822a(0x1ef))/0xa)+parseInt(_0x35822a(0x20a))/0xb;if(_0x45146d===_0x332fc2)break;else _0x3566de['push'](_0x3566de['shift']());}catch(_0x1bad51){_0x3566de['push'](_0x3566de['shift']());}}}(a42_0x1dca,0x692cd));import a42_0x1f5ccf from'chalk';import{existsSync}from'fs';import a42_0x5b90c4 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 a42_0x40d5a1 from'prompts';function getAttemptStatusDisplay(_0x6c3dba){const _0x569e4d=a42_0x5d83;if(!_0x6c3dba)return{'icon':'⏳','text':''};const {done:_0x462a83,success:_0xc9dd75,cancelRequested:_0x2adb44}=_0x6c3dba;if(!_0x462a83)return _0x2adb44?{'icon':'🛑','text':a42_0x1f5ccf['yellow'](_0x569e4d(0x21a))}:{'icon':'🔄','text':a42_0x1f5ccf['blue'](_0x569e4d(0x249))};if(_0xc9dd75)return{'icon':'✅','text':a42_0x1f5ccf[_0x569e4d(0x2dc)]('success')};return{'icon':'❌','text':a42_0x1f5ccf[_0x569e4d(0x1ce)](_0x569e4d(0x1b4))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x3d9e57(0x2cc)](_0x5ca1e7,_0x237b15,_0x2936de=0x0){const _0x443e25=a42_0x3d9e57;return _0x5ca1e7[_0x2936de]||_0x237b15[_0x443e25(0x21f)];}[a42_0x3d9e57(0x2e6)](_0x70fa76,_0x1b7648,_0x1fbc81=0x0){const _0x14f070=a42_0x3d9e57,_0x474245=this['resolveProject'](_0x70fa76,_0x1b7648,_0x1fbc81);if(!_0x474245)return console['error'](a42_0x1f5ccf['red'](_0x14f070(0x2a7)),_0x14f070(0x203)),console[_0x14f070(0x1b4)](a42_0x1f5ccf['dim'](_0x14f070(0x20b))),null;return _0x474245;}[a42_0x3d9e57(0x28e)](_0x52b9a6,_0x44ec10){const _0x568e87=a42_0x3d9e57;if(_0x52b9a6[0x0]){const _0x29e929=_0x52b9a6[0x0][_0x568e87(0x2f3)]('.');if(_0x29e929['length']===0x1)return{'projectName':_0x29e929[0x0],'workflowName':undefined};else return _0x29e929[_0x568e87(0x1bd)]===0x2?{'projectName':_0x29e929[0x0],'workflowName':_0x29e929[0x1]}:(console[_0x568e87(0x1b4)](a42_0x1f5ccf['red'](_0x568e87(0x2a7)),_0x568e87(0x27e)),null);}return{'projectName':_0x44ec10[_0x568e87(0x21f)],'workflowName':undefined};}[a42_0x3d9e57(0x332)](_0x328361,_0x455aa1,_0x434ae5=0x0){const _0xde6b28=a42_0x3d9e57;if(_0x328361[_0x434ae5])return _0x328361[_0x434ae5];if(_0x455aa1['workflowProject']){const _0x4470ab=a42_0x5b90c4[_0xde6b28(0x288)](process[_0xde6b28(0x217)](),_0xde6b28(0x1cf),_0x455aa1[_0xde6b28(0x21f)]);if(existsSync(a42_0x5b90c4[_0xde6b28(0x288)](_0x4470ab,'tdx.json')))return _0x4470ab;}return undefined;}async[a42_0x3d9e57(0x1c0)](_0x14f632,_0x440105,_0x231c73){const _0x11ee07=a42_0x3d9e57;try{const _0x317d5c=await _0x14f632[_0x11ee07(0x20e)][_0x11ee07(0x1cf)](_0x440105,{'limit':0x1});if(_0x317d5c[_0x11ee07(0x1bd)]>0x0){const _0x3ec4a1=_0x317d5c[0x0]['id'],_0x875f61=getWorkflowUrl(_0x231c73,_0x3ec4a1);console[_0x11ee07(0x1b4)](_0x11ee07(0x200)+a42_0x1f5ccf[_0x11ee07(0x1b5)](_0x875f61));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a42_0x3d9e57(0x1b2);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1dd);async['execute'](_0x149c0f){const _0xf92b9b=a42_0x3d9e57,{options:_0x4ae2d1,args:_0x4cceac,tdx:_0x3678fb}=_0x149c0f,_0x4175e0=_0x4cceac[0x0],_0x488ed1=_0x4ae2d1['clear'];if(_0x488ed1)return saveSessionContext({'workflow_project':undefined},_0x4ae2d1[_0xf92b9b(0x2f1)]),console[_0xf92b9b(0x1d8)](a42_0x1f5ccf[_0xf92b9b(0x2dc)](_0xf92b9b(0x32b))),0x0;if(!_0x4175e0)return console[_0xf92b9b(0x1b4)](a42_0x1f5ccf[_0xf92b9b(0x1ce)]('Error:'),'Project\x20name\x20is\x20required'),console[_0xf92b9b(0x1b4)](a42_0x1f5ccf[_0xf92b9b(0x1fc)](_0xf92b9b(0x1ed))),console['error'](a42_0x1f5ccf['dim'](_0xf92b9b(0x2ae))),0x1;const _0x460a33=await withSpinner(_0xf92b9b(0x279)+_0x4175e0+_0xf92b9b(0x2d0),()=>_0x3678fb['workflow'][_0xf92b9b(0x1f2)](_0x4175e0),{'verbose':_0x4ae2d1[_0xf92b9b(0x271)]}),{name:_0x2cc548}=_0x460a33[_0xf92b9b(0x19c)];return saveSessionContext({'workflow_project':_0x2cc548},_0x4ae2d1[_0xf92b9b(0x2f1)]),console[_0xf92b9b(0x1d8)](a42_0x1f5ccf[_0xf92b9b(0x2dc)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a42_0x1f5ccf[_0xf92b9b(0x1b5)](_0x2cc548))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]='workflow:projects';[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1d0);async['execute'](_0x89e589){const _0x40f3a9=a42_0x3d9e57,{options:_0x289197,args:_0xb701fb,tdx:_0x94ec32}=_0x89e589,_0x2d7478=_0xb701fb[0x0];_0x289197[_0x40f3a9(0x271)]&&_0x2d7478&&console[_0x40f3a9(0x1b4)](_0x40f3a9(0x1ca)+_0x2d7478);const _0x5e6485=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x94ec32['workflow'][_0x40f3a9(0x1ec)](_0x2d7478,{'limit':_0x289197[_0x40f3a9(0x284)]}),{'verbose':_0x289197['verbose']});let _0x1f5d15=_0x5e6485[_0x40f3a9(0x19c)];_0x1f5d15[_0x40f3a9(0x229)]((_0x5ef6e4,_0x4047c2)=>_0x5ef6e4['name'][_0x40f3a9(0x207)](_0x4047c2[_0x40f3a9(0x2e0)]));const _0x318740=_0x289197[_0x40f3a9(0x284)]||0x64,_0x115945=_0x1f5d15[_0x40f3a9(0x1bd)]>=_0x318740?a42_0x1f5ccf['dim'](_0x40f3a9(0x1b8)):'';console[_0x40f3a9(0x1b4)](_0x40f3a9(0x1eb)+_0x1f5d15['length']+_0x40f3a9(0x2cf)+(_0x1f5d15[_0x40f3a9(0x1bd)]!==0x1?'s':'')+_0x115945);if(_0x289197[_0x40f3a9(0x233)]===_0x40f3a9(0x2b5)||_0x289197['format']==='jsonl'||_0x289197[_0x40f3a9(0x233)]===_0x40f3a9(0x2fa))await handleSDKOutput(_0x1f5d15,_0x289197);else{if(_0x1f5d15[_0x40f3a9(0x1bd)]===0x0)_0x2d7478?console[_0x40f3a9(0x1d8)]('No\x20projects\x20match\x20pattern:\x20'+_0x2d7478):console[_0x40f3a9(0x1d8)](_0x40f3a9(0x311));else{const _0x36953c=_0x1f5d15['map'](_0x548f8f=>{const _0x27dcbf=_0x40f3a9,_0x1453cc=_0x548f8f[_0x27dcbf(0x18d)]?.[_0x27dcbf(0x2ac)](_0x1aef60=>_0x1aef60[_0x27dcbf(0x32c)]===_0x27dcbf(0x305)),_0xcc9de8=_0x1453cc?a42_0x1f5ccf['dim']('\x20(system)'):'';return _0x27dcbf(0x258)+_0x548f8f['name']+_0xcc9de8;});await writeOutput(_0x36953c[_0x40f3a9(0x288)]('\x0a'),_0x289197['output'],_0x40f3a9(0x2ad));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x1d5);[a42_0x3d9e57(0x1f3)]='List\x20workflows';async[a42_0x3d9e57(0x190)](_0x32adfd){const _0x54ddab=a42_0x3d9e57,{options:_0x2893ff,args:_0x1acd33,tdx:_0x53511e}=_0x32adfd,_0x395b78=this['resolveProject'](_0x1acd33,_0x2893ff);_0x2893ff[_0x54ddab(0x271)]&&_0x395b78&&console[_0x54ddab(0x1b4)](_0x54ddab(0x2a2)+_0x395b78);const _0x1caa99=await withSpinner(_0x54ddab(0x28b),()=>_0x53511e[_0x54ddab(0x20e)]['workflows'](_0x395b78,{'limit':_0x2893ff[_0x54ddab(0x284)]}),{'verbose':_0x2893ff[_0x54ddab(0x271)]});let _0x21a6c8=_0x1caa99['data'];_0x21a6c8['sort']((_0x3578fd,_0x31dc46)=>{const _0x5bba86=_0x54ddab,_0x2039d7=_0x3578fd[_0x5bba86(0x2e0)]['localeCompare'](_0x31dc46[_0x5bba86(0x2e0)]);if(_0x2039d7!==0x0)return _0x2039d7;return(_0x3578fd[_0x5bba86(0x1c7)]?.[_0x5bba86(0x2e0)]||'')[_0x5bba86(0x207)](_0x31dc46[_0x5bba86(0x1c7)]?.[_0x5bba86(0x2e0)]||'');});const _0x1f7af6=_0x2893ff[_0x54ddab(0x284)]||0x64,_0x15df45=_0x21a6c8['length']>=_0x1f7af6?a42_0x1f5ccf[_0x54ddab(0x1fc)](_0x54ddab(0x1b8)):'';console[_0x54ddab(0x1b4)](_0x54ddab(0x1eb)+_0x21a6c8[_0x54ddab(0x1bd)]+_0x54ddab(0x22f)+(_0x21a6c8[_0x54ddab(0x1bd)]!==0x1?'s':'')+_0x15df45);if(_0x2893ff[_0x54ddab(0x233)]===_0x54ddab(0x2b5)||_0x2893ff[_0x54ddab(0x233)]===_0x54ddab(0x2aa)||_0x2893ff[_0x54ddab(0x233)]===_0x54ddab(0x2fa))await handleSDKOutput(_0x21a6c8,_0x2893ff);else{if(_0x21a6c8[_0x54ddab(0x1bd)]===0x0)_0x395b78?console[_0x54ddab(0x1d8)](_0x54ddab(0x1e7)+_0x395b78):console[_0x54ddab(0x1d8)](_0x54ddab(0x1bf));else{const _0x425a66=_0x2893ff['site'],_0x1d3b0=_0x21a6c8[_0x54ddab(0x198)](_0x4d433b=>{const _0xc60391=_0x54ddab,_0x2d9abd=a42_0x1f5ccf[_0xc60391(0x1fc)]('#'+_0x4d433b['id']),_0x489965=hyperlink(_0x2d9abd,getWorkflowUrl(_0x425a66,_0x4d433b['id'])),_0x2dfff1=_0x4d433b[_0xc60391(0x1c7)]?.[_0xc60391(0x2e0)]?a42_0x1f5ccf[_0xc60391(0x1fc)]('\x20('+_0x4d433b[_0xc60391(0x1c7)][_0xc60391(0x2e0)]+')'):'';return'📋\x20'+_0x489965+'\x20'+_0x4d433b['name']+_0x2dfff1;});await writeOutput(_0x1d3b0[_0x54ddab(0x288)]('\x0a'),_0x2893ff[_0x54ddab(0x2ca)],_0x54ddab(0x2ad));}}return 0x0;}}function a42_0x5d83(_0x5ca45b,_0x53b0a0){_0x5ca45b=_0x5ca45b-0x18c;const _0x1dca40=a42_0x1dca();let _0x5d8342=_0x1dca40[_0x5ca45b];return _0x5d8342;}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x2d2);['description']=a42_0x3d9e57(0x261);async[a42_0x3d9e57(0x190)](_0x2cabfc){const _0x46172b=a42_0x3d9e57,{options:_0x3f8779,args:_0x2f2f16,tdx:_0x2f67a7}=_0x2cabfc,_0x5319b3=this['parseProjectWorkflowPattern'](_0x2f2f16,_0x3f8779);if(!_0x5319b3)return 0x1;const {projectName:_0x1f7be8,workflowName:_0x4721c2}=_0x5319b3;if(_0x3f8779[_0x46172b(0x271)]){if(_0x1f7be8&&_0x4721c2)console[_0x46172b(0x1b4)](_0x46172b(0x2b7)+_0x1f7be8+'.'+_0x4721c2);else _0x1f7be8&&console[_0x46172b(0x1b4)](_0x46172b(0x1a2)+_0x1f7be8);const _0x404c4f=_0x3f8779[_0x46172b(0x223)];_0x404c4f&&console[_0x46172b(0x1b4)](_0x46172b(0x26d)+_0x404c4f);}let _0x920039=0x28;if(process[_0x46172b(0x1da)]['isTTY']&&!_0x3f8779[_0x46172b(0x2ca)]&&!_0x3f8779[_0x46172b(0x233)]){const _0x57519b=process['stdout'][_0x46172b(0x22d)]||0x28;_0x920039=Math['max'](0x14,Math[_0x46172b(0x2bf)](_0x57519b*0x2/0x3));}const _0x5e051e=_0x3f8779[_0x46172b(0x284)]||_0x920039,_0x4d510a=await withSpinner(_0x46172b(0x2b8),()=>_0x2f67a7[_0x46172b(0x20e)][_0x46172b(0x1ba)]({'projectName':_0x1f7be8,'workflowName':_0x4721c2,'status':_0x3f8779[_0x46172b(0x223)],'fromTime':_0x3f8779[_0x46172b(0x1ae)],'toTime':_0x3f8779['to'],'limit':_0x5e051e}),{'verbose':_0x3f8779['verbose']}),_0x376bdc=_0x4d510a[_0x46172b(0x19c)];_0x376bdc[_0x46172b(0x229)]((_0x26584d,_0x4cb1c3)=>{const _0x591c31=_0x46172b,_0xdadd3f=_0x26584d['sessionTime']||'',_0x26a465=_0x4cb1c3[_0x591c31(0x300)]||'';return _0x26a465[_0x591c31(0x207)](_0xdadd3f);});_0x376bdc[_0x46172b(0x1bd)]>=_0x5e051e?console['error']('✔\x20Showing\x20'+_0x376bdc['length']+'\x20sessions\x20'+a42_0x1f5ccf[_0x46172b(0x1fc)](_0x46172b(0x308))):console['error'](_0x46172b(0x1eb)+_0x376bdc[_0x46172b(0x1bd)]+_0x46172b(0x260)+(_0x376bdc[_0x46172b(0x1bd)]!==0x1?'s':''));if(_0x3f8779[_0x46172b(0x233)]===_0x46172b(0x2b5)||_0x3f8779[_0x46172b(0x233)]===_0x46172b(0x2aa)||_0x3f8779['format']===_0x46172b(0x2fa))await handleSDKOutput(_0x376bdc,_0x3f8779);else{if(!process[_0x46172b(0x1da)]['isTTY']||_0x3f8779[_0x46172b(0x2ca)]){if(_0x376bdc[_0x46172b(0x1bd)]===0x0){if(_0x1f7be8&&_0x4721c2)console[_0x46172b(0x1d8)](_0x46172b(0x294)+_0x1f7be8+'.'+_0x4721c2);else _0x1f7be8?console[_0x46172b(0x1d8)](_0x46172b(0x286)+_0x1f7be8):console['log'](_0x46172b(0x2b1));}else{const _0x373991=_0x3f8779[_0x46172b(0x2ed)],_0xaca2ee=this['renderSessionsTimeline'](_0x376bdc,_0x373991);_0x3f8779[_0x46172b(0x2ca)]?await writeOutput(_0xaca2ee,_0x3f8779[_0x46172b(0x2ca)],'list'):console[_0x46172b(0x1d8)](_0xaca2ee);}!_0x1f7be8&&(console[_0x46172b(0x1b4)](''),console[_0x46172b(0x1b4)](a42_0x1f5ccf[_0x46172b(0x1fc)](_0x46172b(0x230))),console[_0x46172b(0x1b4)](a42_0x1f5ccf['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0x1f5ccf[_0x46172b(0x1fc)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x376bdc[_0x46172b(0x1bd)]===0x0){if(_0x1f7be8&&_0x4721c2)console[_0x46172b(0x1d8)]('No\x20sessions\x20found\x20for:\x20'+_0x1f7be8+'.'+_0x4721c2);else _0x1f7be8?console[_0x46172b(0x1d8)](_0x46172b(0x286)+_0x1f7be8):console['log']('No\x20sessions\x20found');}else await this[_0x46172b(0x27a)](_0x376bdc,_0x2cabfc,_0x1f7be8);}}return 0x0;}[a42_0x3d9e57(0x1ad)](_0x2b99d1,_0xd17b26){const _0x292a87=a42_0x3d9e57,_0x266268=[],_0x326106=new Map();let _0x21c8a9=Infinity,_0x5483a5=-Infinity;for(const _0x58b5f8 of _0x2b99d1){if(_0x58b5f8['lastAttempt']?.[_0x292a87(0x318)]){const _0x2ae731=new Date(_0x58b5f8[_0x292a87(0x32d)][_0x292a87(0x318)])[_0x292a87(0x214)](),_0x5d73b1=_0x58b5f8['lastAttempt'][_0x292a87(0x2e4)]?new Date(_0x58b5f8[_0x292a87(0x32d)][_0x292a87(0x2e4)])[_0x292a87(0x214)]():Date[_0x292a87(0x2b9)](),_0x1b4329=_0x58b5f8[_0x292a87(0x1c7)]?.[_0x292a87(0x2e0)]||_0x292a87(0x1b9);!_0x326106['has'](_0x1b4329)&&_0x326106['set'](_0x1b4329,[]),_0x326106['get'](_0x1b4329)[_0x292a87(0x289)]({'session':_0x58b5f8,'startTime':_0x2ae731,'endTime':_0x5d73b1,'duration':_0x5d73b1-_0x2ae731}),_0x21c8a9=Math['min'](_0x21c8a9,_0x2ae731),_0x5483a5=Math['max'](_0x5483a5,_0x5d73b1);}}if(_0x326106['size']===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x1c4bc5=process['stdout']['columns']||0x78,_0x573a16=0x1e,_0x1438fb=0x32,_0x4a80d9=0x4,_0x5c5ff9=Math['min'](_0x1438fb,Math[_0x292a87(0x274)](_0x573a16,Math[_0x292a87(0x2bf)](_0x1c4bc5*0.3))),_0xac4837=_0x1c4bc5-_0x5c5ff9-TIMELINE_CONFIG['GUTTER']-0x3-_0x4a80d9,_0x515984=_0x5483a5-_0x21c8a9,_0x187403=_0x515984/_0x5c5ff9,_0x178932=renderTimeAxis({'startTime':_0x21c8a9,'endTime':_0x5483a5,'durationMs':_0x515984,'msPerChar':_0x187403},_0x5c5ff9),_0x7f1160=[];for(const _0x400640 of _0x326106[_0x292a87(0x1b0)]()){_0x7f1160[_0x292a87(0x289)](..._0x400640);}_0x7f1160[_0x292a87(0x229)]((_0x2c90c0,_0x4d0bd6)=>_0x4d0bd6[_0x292a87(0x245)]-_0x2c90c0[_0x292a87(0x245)]);const _0x46dd57=new Date(_0x21c8a9),_0x11dc8c=formatDate(_0x46dd57),_0xead811=_0x4a80d9+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x292a87(0x22e)]+_0xac4837,_0x409fba='\x20'[_0x292a87(0x1f4)](_0xead811-_0x11dc8c[_0x292a87(0x1bd)]),_0x3c409e=_0x409fba+a42_0x1f5ccf['dim'](_0x11dc8c)+'\x20'+_0x178932;_0x266268['push'](_0x3c409e);const _0x5b057a=0x16;let _0x1efbad=0x0;for(const _0x475996 of _0x7f1160){const _0x206902=_0x475996[_0x292a87(0x2f1)][_0x292a87(0x1c7)]?.[_0x292a87(0x2e0)]||'?',_0x1ceeab=Math['min'](stringWidth(_0x206902),_0x5b057a);_0x1efbad=Math[_0x292a87(0x274)](_0x1efbad,_0x1ceeab);}for(const _0x84178d of _0x7f1160){const {session:_0x9ae0bb,startTime:_0x12841c,endTime:_0x453fbb,duration:_0x143d3d}=_0x84178d,_0x5a47e4=_0x9ae0bb[_0x292a87(0x1c7)]?.['id'],_0x368924=_0x9ae0bb['id'],_0x5d87d5=_0x9ae0bb['project']?.['name']||'?',_0x2a829f=_0x9ae0bb[_0x292a87(0x20e)]?.[_0x292a87(0x2e0)]||'?';let _0x41a58d,_0x1ae2cf;if(_0x9ae0bb[_0x292a87(0x32d)]){const _0x4ade69=_0x9ae0bb[_0x292a87(0x32d)];!_0x4ade69[_0x292a87(0x29d)]?(_0x41a58d=_0x4ade69[_0x292a87(0x2b4)]?'🛑':'🔄',_0x1ae2cf=_0x4ade69['cancelRequested']?a42_0x1f5ccf['yellow']:a42_0x1f5ccf['blue']):(_0x41a58d=_0x4ade69[_0x292a87(0x1d1)]?'✅':'❌',_0x1ae2cf=_0x4ade69['success']?a42_0x1f5ccf[_0x292a87(0x2dc)]:a42_0x1f5ccf[_0x292a87(0x1ce)]);}else _0x41a58d='⏳',_0x1ae2cf=a42_0x1f5ccf['dim'];const _0x181b81='#'+_0x368924,_0x155c83=_0x5a47e4?hyperlink(_0x181b81,getWorkflowSessionUrl(_0xd17b26,_0x5a47e4,_0x368924)):_0x181b81;let _0x23a187=_0x5d87d5;stringWidth(_0x5d87d5)>_0x5b057a&&(_0x23a187=_0x5d87d5['slice'](0x0,_0x5b057a-0x1)+'…');const _0x181861=a42_0x1f5ccf[_0x292a87(0x1fc)](_0x23a187),_0x373aaf=stringWidth(_0x23a187),_0x594b61='\x20'[_0x292a87(0x1f4)](_0x1efbad-stringWidth(_0x23a187)+0x2),_0x480d25='('+formatElapsed(_0x143d3d)+')',_0x1672ce=stringWidth(_0x480d25),_0x38b9ec=stringWidth(_0x181b81),_0x3e193a=_0x38b9ec+0x1+_0x373aaf+_0x594b61[_0x292a87(0x1bd)],_0x135718=_0xac4837-_0x3e193a-_0x1672ce-0x1-0x8;let _0x3c92f9=_0x2a829f;stringWidth(_0x3c92f9)>_0x135718&&(_0x3c92f9=_0x3c92f9['slice'](0x0,_0x135718-0x1)+'…');const _0x5e3e45=_0x155c83+'\x20'+_0x181861+_0x594b61+_0x3c92f9,_0x11c28e=stringWidth(_0x5e3e45),_0x405c86=_0xac4837-_0x11c28e-_0x1672ce,_0x218a69=_0x5e3e45+'\x20'[_0x292a87(0x1f4)](Math[_0x292a87(0x274)](0x1,_0x405c86))+a42_0x1f5ccf[_0x292a87(0x1fc)](_0x480d25),_0x4f0626=Math[_0x292a87(0x2bf)]((_0x12841c-_0x21c8a9)/_0x187403),_0x2b4a29=Math[_0x292a87(0x2bf)]((_0x453fbb-_0x21c8a9)/_0x187403),_0x558148=Math[_0x292a87(0x274)](_0x4f0626+0x1,_0x2b4a29),_0x5c9728=new Array(_0x5c5ff9)['fill']('\x20');for(let _0x337c0d=_0x4f0626;_0x337c0d<Math[_0x292a87(0x316)](_0x558148,_0x5c5ff9);_0x337c0d++){_0x5c9728[_0x337c0d]='─';}const _0x223bab=_0x5c9728['map'](_0x5a13cd=>_0x5a13cd==='\x20'?'\x20':_0x1ae2cf(_0x5a13cd))[_0x292a87(0x288)]('');_0x266268[_0x292a87(0x289)](_0x41a58d+'\x20'+_0x218a69+'│'+_0x223bab+'│');}return _0x266268[_0x292a87(0x288)]('\x0a');}async[a42_0x3d9e57(0x27a)](_0x33ac5b,_0x55aec5,_0x4decdd){const _0x38c225=a42_0x3d9e57,{options:_0xdaf3b7,tdx:_0x295e3d}=_0x55aec5,_0x120d13=_0xdaf3b7['site'],{timelineRows:_0x1584bf,timeAxisHeader:_0x39b4da}=this[_0x38c225(0x267)](_0x33ac5b,_0x120d13),_0x19aa5f=_0x1584bf[_0x38c225(0x30a)](_0x57f5a1=>_0x57f5a1[_0x38c225(0x228)]);if(_0x19aa5f[_0x38c225(0x1bd)]===0x0){const _0x39ebd2=this[_0x38c225(0x1ad)](_0x33ac5b,_0x120d13);console[_0x38c225(0x1d8)](_0x39ebd2);!_0x4decdd&&(console[_0x38c225(0x1b4)](''),console['error'](a42_0x1f5ccf[_0x38c225(0x1fc)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x38c225(0x1b4)](a42_0x1f5ccf['dim'](_0x38c225(0x26c))+'or'+a42_0x1f5ccf[_0x38c225(0x1fc)](_0x38c225(0x265))));return;}_0x39b4da&&console[_0x38c225(0x1d8)](_0x39b4da);const _0x4ded9a=_0x1584bf[_0x38c225(0x30a)](_0x27b841=>_0x27b841[_0x38c225(0x228)])['map'](_0x5421e3=>({'title':_0x5421e3['displayLine'],'value':_0x5421e3['attemptId']})),_0x50f6b9=process[_0x38c225(0x1da)][_0x38c225(0x22d)]||0x3c,_0x4bba8e=Math[_0x38c225(0x274)](0x28,Math[_0x38c225(0x2bf)](_0x50f6b9*0x2/0x3)),_0x1ba0df=await a42_0x40d5a1({'type':_0x38c225(0x22a),'name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x4ded9a,'initial':-0x1,'limit':_0x4bba8e,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x4889d2,_0x5c5f47)=>{const _0x378700=_0x38c225;if(!_0x4889d2)return Promise[_0x378700(0x210)](_0x5c5f47);const _0x2cd635=_0x5c5f47['filter'](_0x1a94e4=>{const _0x12c3db=_0x378700,_0x26de75=_0x1a94e4;return _0x26de75[_0x12c3db(0x26a)][_0x12c3db(0x317)]()['includes'](_0x4889d2[_0x12c3db(0x317)]());});return Promise[_0x378700(0x210)](_0x2cd635);}}),_0x327774=()=>{const _0x4f72a6=_0x38c225;process[_0x4f72a6(0x1da)][_0x4f72a6(0x1f6)](_0x4f72a6(0x281)),process['stdout'][_0x4f72a6(0x1f6)](_0x4f72a6(0x281)),process[_0x4f72a6(0x1da)][_0x4f72a6(0x1f6)](_0x4f72a6(0x281));},_0x4eeabd=_0x1ba0df&&_0x1ba0df[_0x38c225(0x228)]&&_0x1ba0df[_0x38c225(0x228)]!==null&&_0x1ba0df['attemptId'][_0x38c225(0x2c0)]()!=='';if(!_0x4eeabd){_0x327774(),console[_0x38c225(0x1d8)](a42_0x1f5ccf[_0x38c225(0x1fc)](_0x38c225(0x238)));return;}_0x327774();const _0x644127=_0x33ac5b['find'](_0x509041=>_0x509041['lastAttempt']?.['id']===_0x1ba0df['attemptId']);if(_0x644127){const _0x4b929c=_0x644127[_0x38c225(0x1c7)]?.[_0x38c225(0x2e0)]||'?',_0x58e378=_0x644127[_0x38c225(0x20e)]?.[_0x38c225(0x2e0)]||'?';console[_0x38c225(0x1d8)](_0x38c225(0x2e5)+a42_0x1f5ccf[_0x38c225(0x1fc)](_0x4b929c)+_0x38c225(0x328)+a42_0x1f5ccf[_0x38c225(0x1fc)](_0x58e378));}const _0x541f17=new WorkflowTimelineCommand();await _0x541f17[_0x38c225(0x190)]({'args':[],'options':{..._0xdaf3b7,'attemptId':_0x1ba0df['attemptId']},'tdx':_0x295e3d});}['generateSessionTimelineRows'](_0x35e83e,_0x2f48fc){const _0x53e9ac=a42_0x3d9e57,_0x43754c=new Map();for(const _0x4181e2 of _0x35e83e){_0x4181e2['id']&&_0x4181e2[_0x53e9ac(0x32d)]?.['id']&&_0x43754c[_0x53e9ac(0x2b2)](_0x4181e2['id'],_0x4181e2[_0x53e9ac(0x32d)]['id']);}const _0xe0dcd2=[];let _0x381960='';const _0x1a842d=this[_0x53e9ac(0x1ad)](_0x35e83e,_0x2f48fc),_0x99585b=_0x1a842d['split']('\x0a');for(const _0x4ad8ca of _0x99585b){if(_0x4ad8ca[_0x53e9ac(0x20c)](_0x53e9ac(0x2be))||_0x4ad8ca['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x381960=_0x4ad8ca;else{if(_0x4ad8ca['match'](/^[✅❌🔄🛑⏳]/)){const _0x3d8b6e=_0x4ad8ca[_0x53e9ac(0x329)](/#(\d+)/),_0x250fd1=_0x3d8b6e?_0x3d8b6e[0x1]:null,_0x459923=_0x250fd1?_0x43754c[_0x53e9ac(0x216)](_0x250fd1)||null:null,_0x186724=_0x35e83e[_0x53e9ac(0x24f)](_0x13eed5=>_0x13eed5['id']===_0x250fd1),_0x53662e=_0x186724?.[_0x53e9ac(0x1c7)]?.[_0x53e9ac(0x2e0)]||'';_0xe0dcd2['push']({'displayLine':_0x4ad8ca,'attemptId':_0x459923,'projectName':_0x53662e});}}}return{'timelineRows':_0xe0dcd2,'timeAxisHeader':_0x381960};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a42_0x3d9e57(0x2b3);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x23c);async[a42_0x3d9e57(0x190)](_0x473796){const _0x1718c9=a42_0x3d9e57,{options:_0x2fdd7d,args:_0x21ee2a,tdx:_0x3ec4d2}=_0x473796,_0x36d224=this[_0x1718c9(0x28e)](_0x21ee2a,_0x2fdd7d);if(!_0x36d224)return 0x1;const {projectName:_0x13df16,workflowName:_0x4dc000}=_0x36d224,_0x49362e=_0x2fdd7d['includeRetried'];if(_0x2fdd7d[_0x1718c9(0x271)]){if(_0x13df16&&_0x4dc000)console[_0x1718c9(0x1b4)](_0x1718c9(0x2b7)+_0x13df16+'.'+_0x4dc000);else _0x13df16&&console['error'](_0x1718c9(0x1a2)+_0x13df16);_0x49362e&&console['error']('Include\x20retried:\x20yes');}const _0x1d526f=await withSpinner(_0x1718c9(0x2e8),()=>_0x3ec4d2[_0x1718c9(0x20e)]['attempts']({'projectName':_0x13df16,'workflowName':_0x4dc000,'includeRetried':_0x49362e,'limit':_0x2fdd7d['limit']}),{'verbose':_0x2fdd7d['verbose']}),_0x4aaa68=_0x1d526f[_0x1718c9(0x19c)],_0x52f6e5=_0x2fdd7d[_0x1718c9(0x284)]||0x64,_0x5e82b8=_0x4aaa68['length']>=_0x52f6e5?a42_0x1f5ccf[_0x1718c9(0x1fc)](_0x1718c9(0x1b8)):'';console[_0x1718c9(0x1b4)](_0x1718c9(0x1eb)+_0x4aaa68[_0x1718c9(0x1bd)]+_0x1718c9(0x23e)+(_0x4aaa68[_0x1718c9(0x1bd)]!==0x1?'s':'')+_0x5e82b8);if(_0x2fdd7d[_0x1718c9(0x233)]==='json'||_0x2fdd7d[_0x1718c9(0x233)]===_0x1718c9(0x2aa)||_0x2fdd7d[_0x1718c9(0x233)]===_0x1718c9(0x2fa))await handleSDKOutput(_0x4aaa68,_0x2fdd7d);else{if(_0x4aaa68['length']===0x0){if(_0x13df16&&_0x4dc000)console[_0x1718c9(0x1d8)]('No\x20attempts\x20found\x20for:\x20'+_0x13df16+'.'+_0x4dc000);else _0x13df16?console['log'](_0x1718c9(0x21b)+_0x13df16):console['log']('No\x20attempts\x20found');}else{const _0x495f9c=_0x2fdd7d[_0x1718c9(0x2ed)],_0x5b675a=_0x4aaa68[_0x1718c9(0x198)](_0x398024=>{const _0x180f92=_0x1718c9,_0x57ac29=a42_0x1f5ccf[_0x180f92(0x1fc)]('#'+_0x398024['id']),_0x5a1d8a=_0x398024[_0x180f92(0x1c7)]?.['id'],_0x5ee50c=_0x398024['session_id']||_0x398024['sessionId'],_0x35b3af=_0x5a1d8a&&_0x5ee50c?hyperlink(_0x57ac29,getWorkflowAttemptUrl(_0x495f9c,_0x5a1d8a,_0x5ee50c,_0x398024['id'])):_0x57ac29,{icon:_0x100786,text:_0x3d0f79}=getAttemptStatusDisplay(_0x398024),_0x4569cb=(_0x398024[_0x180f92(0x1c7)]?.['name']||'?')+'.'+(_0x398024[_0x180f92(0x20e)]?.[_0x180f92(0x2e0)]||'?'),_0x516b88=_0x398024[_0x180f92(0x300)]?a42_0x1f5ccf['dim'](_0x398024[_0x180f92(0x300)]):'';return(_0x35b3af+'\x20'+_0x100786+(_0x3d0f79?'\x20'+_0x3d0f79:'')+'\x20'+_0x4569cb+'\x20'+_0x516b88)['trimEnd']();});await writeOutput(_0x5b675a[_0x1718c9(0x288)]('\x0a'),_0x2fdd7d[_0x1718c9(0x2ca)],_0x1718c9(0x2ad));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]='workflow:attempt';[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x2dd);async['execute'](_0x4472af){const _0x909d9=a42_0x3d9e57,{options:_0x334d4e,args:_0x219f95,tdx:_0x2b4a82}=_0x4472af,_0x576645=_0x219f95[0x0];if(!_0x576645)return console[_0x909d9(0x1b4)](_0x909d9(0x275)),0x1;_0x334d4e[_0x909d9(0x271)]&&console[_0x909d9(0x1b4)](_0x909d9(0x292)+_0x576645);const _0x41679a=await withSpinner(_0x909d9(0x23d),()=>_0x2b4a82[_0x909d9(0x20e)][_0x909d9(0x26e)](_0x576645),{'verbose':_0x334d4e[_0x909d9(0x271)]}),_0x826802=_0x41679a['data'];let _0x1920cb;!_0x826802[_0x909d9(0x29d)]?_0x1920cb=_0x826802[_0x909d9(0x2b4)]?'canceling':'running':_0x1920cb=_0x826802[_0x909d9(0x1d1)]?'success':_0x909d9(0x1b4);let _0x201431;if(_0x826802[_0x909d9(0x318)]&&_0x826802['finishedAt']){const _0x2217a3=new Date(_0x826802['createdAt'])[_0x909d9(0x214)](),_0x49c9e2=new Date(_0x826802[_0x909d9(0x2e4)])[_0x909d9(0x214)]();_0x201431=Math[_0x909d9(0x2c2)]((_0x49c9e2-_0x2217a3)/0x3e8);}const _0xee6dad={'attempt_id':_0x826802['id'],'status':_0x1920cb,..._0x826802[_0x909d9(0x224)]!==undefined&&{'index':_0x826802[_0x909d9(0x224)]},..._0x826802['project']&&{'project':_0x826802[_0x909d9(0x1c7)][_0x909d9(0x2e0)]},..._0x826802[_0x909d9(0x20e)]&&{'workflow':_0x826802[_0x909d9(0x20e)][_0x909d9(0x2e0)]},..._0x826802[_0x909d9(0x21d)]&&{'session_id':_0x826802[_0x909d9(0x21d)]},..._0x826802['sessionTime']&&{'session_time':_0x826802[_0x909d9(0x300)]},..._0x826802[_0x909d9(0x218)]&&{'retry_attempt':_0x826802[_0x909d9(0x218)]},..._0x201431!==undefined&&{'duration_sec':_0x201431},..._0x826802[_0x909d9(0x318)]&&{'created_at':_0x826802['createdAt']},..._0x826802[_0x909d9(0x2e4)]&&{'finished_at':_0x826802[_0x909d9(0x2e4)]},...Object[_0x909d9(0x1c6)](_0x826802[_0x909d9(0x270)])[_0x909d9(0x1bd)]>0x0&&{'params':_0x826802['params']}};return await handleSingleObjectOutput(_0xee6dad,_0x334d4e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x205);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1c4);async[a42_0x3d9e57(0x190)](_0x5a5ad6){const _0x40f795=a42_0x3d9e57,{options:_0x12a9eb,args:_0x4d6a03,tdx:_0x2249f2}=_0x5a5ad6,_0x441e43=_0x4d6a03[0x0];if(!_0x441e43)return console[_0x40f795(0x1b4)](_0x40f795(0x275)),0x1;const _0x45b9af=_0x12a9eb[_0x40f795(0x1d4)];_0x12a9eb[_0x40f795(0x271)]&&(console[_0x40f795(0x1b4)](_0x40f795(0x292)+_0x441e43),_0x45b9af&&console[_0x40f795(0x1b4)]('Including\x20subtasks:\x20yes'));const _0x25b2ce=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x2249f2['workflow'][_0x40f795(0x1b7)](_0x441e43,_0x45b9af||![]),{'verbose':_0x12a9eb[_0x40f795(0x271)]}),_0x3175a7=_0x25b2ce[_0x40f795(0x19c)];return console[_0x40f795(0x1b4)](_0x40f795(0x1eb)+_0x3175a7[_0x40f795(0x1bd)]+_0x40f795(0x191)+(_0x3175a7[_0x40f795(0x1bd)]!==0x1?'s':'')),await handleSDKOutput(_0x3175a7,_0x12a9eb),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x29f);['description']=a42_0x3d9e57(0x287);async['execute'](_0x4dec40){const _0x370685=a42_0x3d9e57,{options:_0x392613,args:_0x3ed973,tdx:_0x24693d}=_0x4dec40,_0x1d25aa=_0x3ed973[0x0];let _0x1cf40b=_0x3ed973[0x1];if(!_0x1d25aa)return console[_0x370685(0x1b4)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x392613[_0x370685(0x271)]&&(console[_0x370685(0x1b4)](_0x370685(0x292)+_0x1d25aa),_0x1cf40b&&console[_0x370685(0x1b4)]('Task\x20name:\x20'+_0x1cf40b));const _0x2e21b9=await withSpinner(_0x370685(0x1dc),()=>_0x24693d[_0x370685(0x20e)][_0x370685(0x26b)](_0x1d25aa,_0x1cf40b),{'verbose':_0x392613[_0x370685(0x271)]}),_0x35b8cb=_0x2e21b9[_0x370685(0x19c)];if(_0x35b8cb['length']===0x0)return console['error']('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x1cf40b&&(_0x392613[_0x370685(0x2b5)]||_0x392613[_0x370685(0x233)]))return await handleSDKOutput(_0x35b8cb,_0x392613),0x0;if(!_0x1cf40b){const _0x3654d7=_0x35b8cb['map'](_0x429dd0=>({'title':_0x429dd0[_0x370685(0x1a1)]+'\x20('+formatBytes(_0x429dd0[_0x370685(0x307)])+')','value':_0x429dd0[_0x370685(0x1a1)]})),_0x52fa12=await a42_0x40d5a1({'type':_0x370685(0x29b),'name':'task','message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x3654d7});if(!_0x52fa12[_0x370685(0x21e)])return console[_0x370685(0x1b4)](_0x370685(0x238)),0x0;_0x1cf40b=_0x52fa12[_0x370685(0x21e)];}const _0x165f47=await withSpinner(_0x370685(0x22c),()=>_0x24693d[_0x370685(0x20e)][_0x370685(0x1b3)](_0x1d25aa,_0x1cf40b),{'verbose':_0x392613[_0x370685(0x271)]}),_0x47be96=_0x165f47[_0x370685(0x19c)];return _0x47be96?console['log'](_0x47be96):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']='workflow:kill';['description']=a42_0x3d9e57(0x31d);async[a42_0x3d9e57(0x190)](_0x312f32){const _0x1ca864=a42_0x3d9e57,{options:_0x684b74,args:_0x100070,tdx:_0x4f605e}=_0x312f32,_0x50c855=_0x100070[0x0];if(!_0x50c855)return console[_0x1ca864(0x1b4)](_0x1ca864(0x275)),0x1;const _0x13a235=_0x684b74[_0x1ca864(0x213)];_0x684b74[_0x1ca864(0x271)]&&(console[_0x1ca864(0x1b4)](_0x1ca864(0x292)+_0x50c855),_0x13a235&&console['error'](_0x1ca864(0x2bb)+_0x13a235));if(!_0x684b74[_0x1ca864(0x297)]){if(!isInteractive())return console[_0x1ca864(0x1b4)](a42_0x1f5ccf['red'](_0x1ca864(0x1e6)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a42_0x1f5ccf['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xac4343=await confirmKey(_0x1ca864(0x313)+_0x50c855+'?');if(!_0xac4343)return console[_0x1ca864(0x1b4)](a42_0x1f5ccf['yellow'](_0x1ca864(0x238))),0x1;}const _0x5f38cd=await withSpinner(_0x1ca864(0x29e),()=>_0x4f605e[_0x1ca864(0x20e)][_0x1ca864(0x241)](_0x50c855,_0x13a235),{'verbose':_0x684b74[_0x1ca864(0x271)]}),_0x5aa589=_0x5f38cd[_0x1ca864(0x19c)];return console[_0x1ca864(0x1b4)]('✔\x20'+_0x5aa589),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x1a9);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1e4);async[a42_0x3d9e57(0x190)](_0x3ebb5e){const _0xa6b582=a42_0x3d9e57,{options:_0x62b6ee,args:_0x5e8528,tdx:_0x8092aa}=_0x3ebb5e,_0x33a1bd=_0x5e8528[0x0];if(!_0x33a1bd)return console[_0xa6b582(0x1b4)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0xa6b582(0x1b4)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x75dbd=![],_0x251d1c=_0x33a1bd;if(_0x33a1bd[_0xa6b582(0x20c)](_0xa6b582(0x295)))_0x75dbd=!![],_0x251d1c=_0x33a1bd[_0xa6b582(0x2d1)](0x8);else{if(_0x33a1bd[_0xa6b582(0x20c)](_0xa6b582(0x206)))_0x75dbd=![],_0x251d1c=_0x33a1bd[_0xa6b582(0x2d1)](0x8);else return console['error'](_0xa6b582(0x2c7)),console['error'](_0xa6b582(0x236)),0x1;}const _0xb92a46=_0x62b6ee[_0xa6b582(0x1ea)],_0x21a9f6=_0x62b6ee[_0xa6b582(0x1c2)],_0x5bb20b=_0x62b6ee[_0xa6b582(0x270)],_0x909a7f=_0x62b6ee[_0xa6b582(0x2a3)];_0x62b6ee[_0xa6b582(0x271)]&&(console['error'](_0xa6b582(0x24b)+(_0x75dbd?_0xa6b582(0x2f1):_0xa6b582(0x26e))+'\x20'+_0x251d1c),_0xb92a46&&console['error'](_0xa6b582(0x2a9)+_0xb92a46),_0x21a9f6&&console[_0xa6b582(0x1b4)](_0xa6b582(0x31a)+_0x21a9f6),_0x5bb20b&&console[_0xa6b582(0x1b4)](_0xa6b582(0x215)+_0x5bb20b),_0x909a7f&&console[_0xa6b582(0x1b4)]('Force:\x20yes'));let _0x29a6db;if(_0x5bb20b)try{if(_0x5bb20b[_0xa6b582(0x20c)]('@')){const _0x541da9=await import(_0xa6b582(0x2d9)),_0x14b31e=_0x5bb20b[_0xa6b582(0x2d1)](0x1),_0x59e9f8=await _0x541da9[_0xa6b582(0x192)](_0x14b31e,'utf-8');_0x29a6db=JSON[_0xa6b582(0x32f)](_0x59e9f8);}else _0x29a6db=JSON['parse'](_0x5bb20b);}catch{return console[_0xa6b582(0x1b4)](_0xa6b582(0x27c)),0x1;}if(!_0x62b6ee[_0xa6b582(0x297)]){if(!isInteractive())return console[_0xa6b582(0x1b4)](a42_0x1f5ccf['red'](_0xa6b582(0x1e6)),_0xa6b582(0x2ff)),console[_0xa6b582(0x1b4)](a42_0x1f5ccf[_0xa6b582(0x1fc)](_0xa6b582(0x1b1))),0x1;const _0x230505=await confirmKey(_0xa6b582(0x2cd)+(_0x75dbd?'session':_0xa6b582(0x26e))+'\x20'+_0x251d1c+'?');if(!_0x230505)return console[_0xa6b582(0x1b4)](a42_0x1f5ccf['yellow'](_0xa6b582(0x238))),0x1;}let _0x160df6;_0x75dbd?_0x160df6=await withSpinner(_0xa6b582(0x310),()=>_0x8092aa[_0xa6b582(0x20e)][_0xa6b582(0x1a5)](_0x251d1c,{'fromTask':_0xb92a46,'retryParams':_0x29a6db}),{'verbose':_0x62b6ee[_0xa6b582(0x271)]}):_0x160df6=await withSpinner('Retrying\x20attempt...',()=>_0x8092aa[_0xa6b582(0x20e)]['retryAttempt'](_0x251d1c,{'resumeFrom':_0x21a9f6,'retryParams':_0x29a6db,'force':_0x909a7f}),{'verbose':_0x62b6ee[_0xa6b582(0x271)]});const _0x1ba093=_0x160df6[_0xa6b582(0x19c)];return console[_0xa6b582(0x1b4)](_0xa6b582(0x25e)),console[_0xa6b582(0x1b4)](_0xa6b582(0x1d6)+_0x1ba093[_0xa6b582(0x228)]),console[_0xa6b582(0x1b4)](_0xa6b582(0x29a)+_0x1ba093['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x1c8);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x28f);async[a42_0x3d9e57(0x190)](_0x40f0d8){const _0x28680e=a42_0x3d9e57,{options:_0x53205a,args:_0x1b1eee,tdx:_0x28ca64}=_0x40f0d8;let _0x37ab51=_0x1b1eee[0x0];if(!_0x37ab51){const _0x5ac21e=this[_0x28680e(0x2cc)]([],_0x53205a),_0x48aea2=await withSpinner(_0x28680e(0x1f7),()=>_0x28ca64[_0x28680e(0x20e)][_0x28680e(0x1cf)](_0x5ac21e,{'limit':_0x53205a[_0x28680e(0x284)]}),{'verbose':_0x53205a[_0x28680e(0x271)]}),_0xdacc17=_0x48aea2[_0x28680e(0x19c)];if(_0xdacc17[_0x28680e(0x1bd)]===0x0)return console['error']('No\x20workflows\x20found'),!_0x5ac21e&&console[_0x28680e(0x1b4)](a42_0x1f5ccf['dim'](_0x28680e(0x20b))),0x1;const _0xedce38=_0xdacc17[_0x28680e(0x198)](_0x2723dc=>({'title':_0x2723dc['project']?.['name']+'.'+_0x2723dc[_0x28680e(0x2e0)],'value':_0x2723dc[_0x28680e(0x1c7)]?.[_0x28680e(0x2e0)]+'.'+_0x2723dc[_0x28680e(0x2e0)],'description':_0x2723dc['revision']?_0x28680e(0x266)+_0x2723dc['revision']:undefined})),_0x32613d=await a42_0x40d5a1({'type':'select','name':_0x28680e(0x20e),'message':'Select\x20a\x20workflow\x20to\x20run','choices':_0xedce38});if(!_0x32613d[_0x28680e(0x20e)])return 0x1;_0x37ab51=_0x32613d[_0x28680e(0x20e)];}if(!_0x37ab51[_0x28680e(0x30d)]('.')){const _0x2c19a6=this['resolveProject']([],_0x53205a);if(_0x2c19a6)_0x37ab51=_0x2c19a6+'.'+_0x37ab51;else return console[_0x28680e(0x1b4)](a42_0x1f5ccf[_0x28680e(0x1ce)](_0x28680e(0x2a7)),_0x28680e(0x2f6)),console[_0x28680e(0x1b4)](a42_0x1f5ccf[_0x28680e(0x1fc)](_0x28680e(0x20b))),0x1;}const _0x19ede=_0x53205a[_0x28680e(0x243)],_0x50019b=_0x53205a[_0x28680e(0x300)],_0x3e9a4e={};if(_0x19ede&&Array[_0x28680e(0x2e7)](_0x19ede))for(const _0x550607 of _0x19ede){const _0x3a64e4=_0x550607[_0x28680e(0x225)]('=');if(_0x3a64e4===-0x1)return console[_0x28680e(0x1b4)](_0x28680e(0x25f)+_0x550607),console['error'](_0x28680e(0x19b)),0x1;const _0x190bf7=_0x550607[_0x28680e(0x2d1)](0x0,_0x3a64e4),_0x8f0b03=_0x550607[_0x28680e(0x2d1)](_0x3a64e4+0x1);try{_0x3e9a4e[_0x190bf7]=JSON['parse'](_0x8f0b03);}catch{_0x3e9a4e[_0x190bf7]=_0x8f0b03;}}_0x53205a[_0x28680e(0x271)]&&(console[_0x28680e(0x1b4)](_0x28680e(0x252)+_0x37ab51),Object[_0x28680e(0x1c6)](_0x3e9a4e)['length']>0x0&&console[_0x28680e(0x1b4)](_0x28680e(0x251)+JSON[_0x28680e(0x29c)](_0x3e9a4e)),_0x50019b&&console['error']('Session\x20time:\x20'+_0x50019b));const _0x44d864=await withSpinner(_0x28680e(0x209),()=>_0x28ca64[_0x28680e(0x20e)][_0x28680e(0x2f2)](_0x37ab51,_0x3e9a4e,{'sessionTime':_0x50019b}),{'verbose':_0x53205a['verbose']}),_0x17f11e=_0x44d864[_0x28680e(0x19c)];console[_0x28680e(0x1b4)](_0x28680e(0x291)),console[_0x28680e(0x1b4)](_0x28680e(0x326)+_0x17f11e['id']),console[_0x28680e(0x1b4)]('\x20\x20Session\x20ID:\x20'+_0x17f11e[_0x28680e(0x21d)]),console[_0x28680e(0x1b4)]('\x20\x20Project:\x20'+_0x17f11e[_0x28680e(0x1c7)]?.[_0x28680e(0x2e0)]),console[_0x28680e(0x1b4)](_0x28680e(0x219)+_0x17f11e[_0x28680e(0x20e)]?.[_0x28680e(0x2e0)]);if(_0x17f11e[_0x28680e(0x1c7)]?.['id']&&_0x17f11e[_0x28680e(0x21d)]&&_0x17f11e['id']){const _0x25be05=_0x53205a['site'],_0x195feb=getConsoleUrl(_0x25be05,_0x28680e(0x2bc)+_0x17f11e[_0x28680e(0x1c7)]['id']+_0x28680e(0x282)+_0x17f11e[_0x28680e(0x21d)]+'/attempt/'+_0x17f11e['id']);console[_0x28680e(0x1b4)](_0x28680e(0x200)+a42_0x1f5ccf[_0x28680e(0x1b5)](_0x195feb));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']='workflow:download';['description']=a42_0x3d9e57(0x24a);async[a42_0x3d9e57(0x190)](_0x19a93e){const _0x295457=a42_0x3d9e57,{options:_0xf739d7,args:_0x53a0ae,tdx:_0x1c10d7}=_0x19a93e,_0x200982=_0x53a0ae[0x0],_0x42b5bb=_0x53a0ae[0x1]||'.';if(!_0x200982)return console[_0x295457(0x1b4)](_0x295457(0x299)),console[_0x295457(0x1b4)](_0x295457(0x202)),0x1;const _0x290c94=_0xf739d7[_0x295457(0x280)];_0xf739d7['verbose']&&(console[_0x295457(0x1b4)]('Project:\x20'+_0x200982),console['error'](_0x295457(0x2d7)+_0x42b5bb),_0x290c94&&console['error'](_0x295457(0x1e3)+_0x290c94));const _0x4e8f9c=await withSpinner('Downloading\x20project\x20'+_0x200982+_0x295457(0x246),()=>_0x1c10d7[_0x295457(0x20e)]['download'](_0x200982,_0x42b5bb,{'revision':_0x290c94}),{'verbose':_0xf739d7['verbose']}),_0x4254bd=_0x4e8f9c[_0x295457(0x19c)];return console[_0x295457(0x1b4)](_0x295457(0x2e9)+_0x4254bd['projectName']),console['error'](_0x295457(0x1d3)+_0x4254bd[_0x295457(0x280)]),console[_0x295457(0x1b4)](_0x295457(0x254)+_0x4254bd[_0x295457(0x262)]),console[_0x295457(0x1b4)](_0x295457(0x19a)+_0x42b5bb+'/'+_0x4254bd[_0x295457(0x1af)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x204);['description']='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a42_0x3d9e57(0x190)](_0x284d6d){const _0x262e65=a42_0x3d9e57,{options:_0x487085,args:_0x192772,tdx:_0x4d9348}=_0x284d6d;let _0x52d9b9='.',_0x1e6faa=_0x487085['name'];if(_0x192772[0x0]){const {promises:_0x42ab0a}=await import('fs');try{const _0x555005=await _0x42ab0a[_0x262e65(0x250)](_0x192772[0x0]);if(_0x555005[_0x262e65(0x1bb)]())_0x52d9b9=_0x192772[0x0];else return console[_0x262e65(0x1b4)](_0x262e65(0x19f)+_0x192772[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x1e6faa=_0x192772[0x0],_0x52d9b9='.';}}const _0x5bdd1f=_0x487085[_0x262e65(0x280)],_0x399e0e=_0x487085['skipValidation'];_0x487085[_0x262e65(0x271)]&&(console[_0x262e65(0x1b4)](_0x262e65(0x2fc)+_0x52d9b9),_0x1e6faa&&console[_0x262e65(0x1b4)](_0x262e65(0x2c3)+_0x1e6faa),_0x5bdd1f&&console[_0x262e65(0x1b4)]('Revision:\x20'+_0x5bdd1f),_0x399e0e&&console[_0x262e65(0x1b4)]('Validation:\x20skipped'));const _0x584a50=await withSpinner(_0x262e65(0x2ec),()=>_0x4d9348[_0x262e65(0x20e)][_0x262e65(0x289)](_0x52d9b9,{'projectName':_0x1e6faa,'revision':_0x5bdd1f,'skipValidation':_0x399e0e}),{'verbose':_0x487085[_0x262e65(0x271)]}),_0x31e7c1=_0x584a50[_0x262e65(0x19c)];return console[_0x262e65(0x1b4)](_0x262e65(0x2a1)+_0x31e7c1[_0x262e65(0x1af)]),console[_0x262e65(0x1b4)](_0x262e65(0x2c6)+_0x31e7c1[_0x262e65(0x323)]),console['error'](_0x262e65(0x1d3)+_0x31e7c1['revision']),await this[_0x262e65(0x1c0)](_0x4d9348,_0x31e7c1[_0x262e65(0x1af)],_0x487085[_0x262e65(0x2ed)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x3d9e57(0x2e0)]='workflow:pull';['description']='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a42_0x3d9e57(0x190)](_0x44e5f7){const _0x56baa7=a42_0x3d9e57,{options:_0x12dc56,args:_0x2c6a56,tdx:_0x86c328}=_0x44e5f7,_0x27ccbd=_0x2c6a56[0x0],_0x223a98=_0x2c6a56[0x1];if(!_0x27ccbd)return console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1ce)](_0x56baa7(0x2a7)),_0x56baa7(0x203)),console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x2c9))),0x1;const _0x257953=_0x12dc56['revision'];_0x12dc56[_0x56baa7(0x271)]&&(console[_0x56baa7(0x1b4)]('Project:\x20'+_0x27ccbd),_0x223a98&&console['error'](_0x56baa7(0x20f)+_0x223a98),_0x257953&&console[_0x56baa7(0x1b4)](_0x56baa7(0x1e3)+_0x257953),_0x12dc56[_0x56baa7(0x27b)]&&console[_0x56baa7(0x1b4)](_0x56baa7(0x24c)));const _0x29d42d=await withSpinner(_0x56baa7(0x1f5)+_0x27ccbd+_0x56baa7(0x246),()=>_0x86c328[_0x56baa7(0x20e)][_0x56baa7(0x240)](_0x27ccbd,{'targetDir':_0x223a98,'revision':_0x257953}),{'verbose':_0x12dc56[_0x56baa7(0x271)]}),_0x492673=_0x29d42d[_0x56baa7(0x19c)];_0x492673['isNewProject']?console[_0x56baa7(0x1b4)]('→\x20New\x20project:\x20'+_0x492673[_0x56baa7(0x1af)]):console[_0x56baa7(0x1b4)](_0x56baa7(0x25b)+_0x492673[_0x56baa7(0x1af)]);console[_0x56baa7(0x1b4)](_0x56baa7(0x1d3)+_0x492673[_0x56baa7(0x280)]),console[_0x56baa7(0x1b4)](_0x56baa7(0x25a)+(a42_0x5b90c4[_0x56baa7(0x1df)](process[_0x56baa7(0x217)](),_0x492673[_0x56baa7(0x2d3)])||'.')),console[_0x56baa7(0x1b4)](_0x56baa7(0x2b0)+a42_0x1f5ccf[_0x56baa7(0x2dc)]('+'+_0x492673[_0x56baa7(0x2d5)][_0x56baa7(0x2e3)]+_0x56baa7(0x28a))+',\x20'+(a42_0x1f5ccf[_0x56baa7(0x220)]('~'+_0x492673[_0x56baa7(0x2d5)][_0x56baa7(0x23a)]+'\x20modified')+',\x20')+(a42_0x1f5ccf[_0x56baa7(0x1ce)]('-'+_0x492673['summary'][_0x56baa7(0x1cb)]+_0x56baa7(0x315))+',\x20')+(''+a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x492673[_0x56baa7(0x2d5)][_0x56baa7(0x1b6)]+_0x56baa7(0x32e))));for(const _0x2bb393 of _0x492673[_0x56baa7(0x2de)]){_0x2bb393[_0x56baa7(0x1be)]==='modified'&&_0x2bb393[_0x56baa7(0x1c9)]&&(console['error']('\x0a'+a42_0x1f5ccf[_0x56baa7(0x1b5)](_0x56baa7(0x1fb)+_0x2bb393[_0x56baa7(0x2eb)])),console[_0x56baa7(0x1b4)](_0x2bb393[_0x56baa7(0x1c9)]));}if(!_0x492673[_0x56baa7(0x273)])return saveSessionContext({'workflow_project':_0x492673[_0x56baa7(0x1af)]},_0x12dc56[_0x56baa7(0x2f1)]),console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x2dc)](_0x56baa7(0x27d))),console['error'](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x197)+_0x492673['projectName'])),0x0;if(_0x12dc56[_0x56baa7(0x27b)])return console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x220)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x12dc56[_0x56baa7(0x297)]){if(!isInteractive())return console['error'](a42_0x1f5ccf[_0x56baa7(0x1ce)](_0x56baa7(0x1e6)),_0x56baa7(0x2ff)),console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x1b1))),0x1;const _0x19b254=await confirmKey(_0x56baa7(0x21c));if(!_0x19b254)return console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x220)]('Cancelled'),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x56baa7(0x1fd),()=>_0x86c328[_0x56baa7(0x20e)]['applyPullProject'](_0x492673,{'revision':_0x257953}),{'verbose':_0x12dc56[_0x56baa7(0x271)]}),saveSessionContext({'workflow_project':_0x492673[_0x56baa7(0x1af)]},_0x12dc56[_0x56baa7(0x2f1)]),console['error'](a42_0x1f5ccf['green'](_0x56baa7(0x1f9)));const _0x28f7fd=a42_0x5b90c4[_0x56baa7(0x1df)](process[_0x56baa7(0x217)](),_0x492673['targetDir'])||'.';return console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x19a)+_0x28f7fd)),console[_0x56baa7(0x1b4)](a42_0x1f5ccf[_0x56baa7(0x1fc)](_0x56baa7(0x197)+_0x492673[_0x56baa7(0x1af)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x1d2);['description']='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async['execute'](_0x58f2b1){const _0x41f2a4=a42_0x3d9e57,{options:_0xa155a9,args:_0x3e7882,tdx:_0x1bbbf6}=_0x58f2b1,_0x4de411=this[_0x41f2a4(0x332)](_0x3e7882,_0xa155a9),_0x5ab06a=_0xa155a9[_0x41f2a4(0x280)],_0x2cf390=_0xa155a9[_0x41f2a4(0x2d8)];_0xa155a9[_0x41f2a4(0x271)]&&(_0x4de411&&console[_0x41f2a4(0x1b4)](_0x41f2a4(0x2fb)+_0x4de411),_0x5ab06a&&console['error'](_0x41f2a4(0x1e3)+_0x5ab06a),_0xa155a9['dryRun']&&console[_0x41f2a4(0x1b4)]('Dry\x20run:\x20yes'),_0x2cf390&&console[_0x41f2a4(0x1b4)](_0x41f2a4(0x2af)));let _0x5df36d;try{_0x5df36d=await withSpinner('Analyzing\x20changes...',()=>_0x1bbbf6[_0x41f2a4(0x20e)][_0x41f2a4(0x255)]({'sourceDir':_0x4de411,'revision':_0x5ab06a,'skipValidation':_0x2cf390}),{'verbose':_0xa155a9[_0x41f2a4(0x271)]});}catch(_0x1aa1e7){if(_0x1aa1e7 instanceof Error&&_0x1aa1e7[_0x41f2a4(0x2e1)][_0x41f2a4(0x30d)](_0x41f2a4(0x306)))return console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1ce)]('Error:'),_0x41f2a4(0x2cb)),_0xa155a9['workflowProject']?console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1fc)](_0x41f2a4(0x194)+_0xa155a9['workflowProject']+_0x41f2a4(0x248)+_0xa155a9[_0x41f2a4(0x21f)]+'\x27')):console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1fc)](_0x41f2a4(0x2a8))),0x1;throw _0x1aa1e7;}const _0x3ed5a5=_0x5df36d[_0x41f2a4(0x19c)];console[_0x41f2a4(0x1b4)](_0x41f2a4(0x231)+_0x3ed5a5['projectName']),console[_0x41f2a4(0x1b4)]('\x20\x20Source:\x20'+_0x3ed5a5[_0x41f2a4(0x298)]),console['error'](_0x41f2a4(0x1d3)+_0x3ed5a5[_0x41f2a4(0x280)]),console[_0x41f2a4(0x1b4)]('\x20\x20Changes:\x20'+a42_0x1f5ccf['green']('+'+_0x3ed5a5[_0x41f2a4(0x2d5)][_0x41f2a4(0x2e3)]+'\x20new')+',\x20'+(a42_0x1f5ccf['yellow']('~'+_0x3ed5a5[_0x41f2a4(0x2d5)]['modified']+_0x41f2a4(0x18e))+',\x20')+(a42_0x1f5ccf[_0x41f2a4(0x1ce)]('-'+_0x3ed5a5[_0x41f2a4(0x2d5)]['deleted']+_0x41f2a4(0x315))+',\x20')+(''+a42_0x1f5ccf[_0x41f2a4(0x1fc)](_0x3ed5a5[_0x41f2a4(0x2d5)]['unchanged']+_0x41f2a4(0x32e))));for(const _0x60d43c of _0x3ed5a5[_0x41f2a4(0x2de)]){_0x60d43c[_0x41f2a4(0x1be)]==='modified'&&_0x60d43c[_0x41f2a4(0x1c9)]&&(console[_0x41f2a4(0x1b4)]('\x0a'+a42_0x1f5ccf['cyan'](_0x41f2a4(0x1fb)+_0x60d43c[_0x41f2a4(0x2eb)])),console[_0x41f2a4(0x1b4)](_0x60d43c[_0x41f2a4(0x1c9)]));}if(!_0x3ed5a5['hasChanges'])return console['error'](a42_0x1f5ccf[_0x41f2a4(0x2dc)](_0x41f2a4(0x1e8))),await this[_0x41f2a4(0x1c0)](_0x1bbbf6,_0x3ed5a5[_0x41f2a4(0x1af)],_0xa155a9[_0x41f2a4(0x2ed)]),0x0;if(_0xa155a9[_0x41f2a4(0x27b)])return console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x220)](_0x41f2a4(0x2ab))),0x0;if(!_0xa155a9[_0x41f2a4(0x297)]){if(!isInteractive())return console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1ce)](_0x41f2a4(0x1e6)),_0x41f2a4(0x2ff)),console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x1fc)](_0x41f2a4(0x1b1))),0x1;const _0xb8cdc6=await confirmKey(_0x41f2a4(0x1cc));if(!_0xb8cdc6)return console['error'](a42_0x1f5ccf[_0x41f2a4(0x220)]('Cancelled'),_0x41f2a4(0x1f1)),0x1;}const _0x5ecb80=await withSpinner(_0x41f2a4(0x253),()=>_0x1bbbf6[_0x41f2a4(0x20e)][_0x41f2a4(0x232)](_0x3ed5a5),{'verbose':_0xa155a9[_0x41f2a4(0x271)]}),_0x4b057e=_0x5ecb80[_0x41f2a4(0x19c)];return console[_0x41f2a4(0x1b4)](a42_0x1f5ccf[_0x41f2a4(0x2dc)]('✔\x20Push\x20complete')),console[_0x41f2a4(0x1b4)](_0x41f2a4(0x2c6)+_0x4b057e['projectId']),console[_0x41f2a4(0x1b4)]('\x20\x20Revision:\x20'+_0x4b057e[_0x41f2a4(0x280)]),await this['showWorkflowConsoleUrl'](_0x1bbbf6,_0x4b057e[_0x41f2a4(0x1af)],_0xa155a9['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x24e);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x1fa);async[a42_0x3d9e57(0x190)](_0x597a00){const _0x37b7c0=a42_0x3d9e57,{options:_0x3d566d,args:_0x4f43cc,tdx:_0x55eba9}=_0x597a00,_0x399dd2=this['resolveProjectDir'](_0x4f43cc,_0x3d566d),_0x5927eb=_0x3d566d[_0x37b7c0(0x2e0)],_0x3e09df=_0x3d566d[_0x37b7c0(0x280)],_0x4995e0=_0x3d566d[_0x37b7c0(0x2d8)];if(!_0x399dd2)return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1ce)]('Error:'),_0x37b7c0(0x1ac)),console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1fc)](_0x37b7c0(0x1e5))),console['error'](a42_0x1f5ccf[_0x37b7c0(0x1fc)](_0x37b7c0(0x25d))),0x1;if(!_0x5927eb)return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf['red']('Error:'),_0x37b7c0(0x1e2)),console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1fc)](_0x37b7c0(0x1e5))),0x1;_0x3d566d[_0x37b7c0(0x271)]&&(console[_0x37b7c0(0x1b4)]('Source\x20directory:\x20'+_0x399dd2),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x272)+_0x5927eb),_0x3e09df&&console[_0x37b7c0(0x1b4)](_0x37b7c0(0x1e3)+_0x3e09df),_0x3d566d[_0x37b7c0(0x27b)]&&console[_0x37b7c0(0x1b4)](_0x37b7c0(0x24c)),_0x4995e0&&console['error'](_0x37b7c0(0x2af)));const _0x4e645b=await withSpinner('Analyzing\x20project...',()=>_0x55eba9['workflow'][_0x37b7c0(0x2da)](_0x399dd2,_0x5927eb,{'revision':_0x3e09df,'skipValidation':_0x4995e0}),{'verbose':_0x3d566d['verbose']}),_0x4bf50a=_0x4e645b[_0x37b7c0(0x19c)];console['error']('Source:\x20'+_0x4bf50a['sourceDir']);_0x4bf50a['sourceProjectName']&&console[_0x37b7c0(0x1b4)](_0x37b7c0(0x211)+_0x4bf50a[_0x37b7c0(0x333)]);console['error'](_0x37b7c0(0x272)+_0x4bf50a[_0x37b7c0(0x31f)]),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x1e3)+_0x4bf50a[_0x37b7c0(0x280)]),console[_0x37b7c0(0x1b4)]('Files\x20to\x20upload:\x20'+_0x4bf50a[_0x37b7c0(0x18f)]);_0x4bf50a[_0x37b7c0(0x1f8)]&&(console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x220)](_0x37b7c0(0x1de)+_0x4bf50a[_0x37b7c0(0x31f)]+_0x37b7c0(0x227)+_0x4bf50a['existingProjectId']+')')),console['error'](a42_0x1f5ccf[_0x37b7c0(0x220)](_0x37b7c0(0x2bd))));if(_0x3d566d[_0x37b7c0(0x27b)])return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x220)](_0x37b7c0(0x1d9))),0x0;if(!_0x3d566d[_0x37b7c0(0x297)]){if(!isInteractive())return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1ce)](_0x37b7c0(0x1e6)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x1fc)](_0x37b7c0(0x1b1))),0x1;const _0x1b606b=_0x4bf50a[_0x37b7c0(0x333)]||a42_0x5b90c4[_0x37b7c0(0x226)](_0x399dd2),_0x175a28=_0x4bf50a[_0x37b7c0(0x1f8)]?_0x37b7c0(0x2db)+_0x5927eb+_0x37b7c0(0x1cd):_0x37b7c0(0x259)+_0x1b606b+_0x37b7c0(0x330)+_0x5927eb+'\x22?',_0x1a727a=await confirmKey(_0x175a28);if(!_0x1a727a)return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x220)]('Cancelled')),0x1;}const _0x122f4b=await withSpinner(_0x4bf50a[_0x37b7c0(0x1f8)]?_0x37b7c0(0x19d)+_0x5927eb+_0x37b7c0(0x246):_0x37b7c0(0x302)+_0x5927eb+_0x37b7c0(0x246),()=>_0x55eba9[_0x37b7c0(0x20e)][_0x37b7c0(0x1fe)](_0x4bf50a),{'verbose':_0x3d566d[_0x37b7c0(0x271)]}),_0x567fed=_0x122f4b['data'];return console[_0x37b7c0(0x1b4)](a42_0x1f5ccf[_0x37b7c0(0x2dc)](_0x4bf50a['targetExists']?'✔\x20Project\x20updated':_0x37b7c0(0x30c))),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x301)+_0x567fed[_0x37b7c0(0x31f)]),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x2c6)+_0x567fed[_0x37b7c0(0x247)]),console[_0x37b7c0(0x1b4)](_0x37b7c0(0x1d3)+_0x567fed[_0x37b7c0(0x280)]),await this[_0x37b7c0(0x1c0)](_0x55eba9,_0x567fed[_0x37b7c0(0x31f)],_0x3d566d['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a42_0x3d9e57(0x31b);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x2ea);async[a42_0x3d9e57(0x190)](_0x4fd98b){const _0x814868=a42_0x3d9e57,{options:_0x43d8a2,args:_0x1e6618,tdx:_0x3754f6}=_0x4fd98b,_0xcbf015=_0x1e6618[0x0];if(!_0xcbf015)return console['error']('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x43d8a2[_0x814868(0x271)]&&console[_0x814868(0x1b4)](_0x814868(0x2e5)+_0xcbf015);if(!_0x43d8a2[_0x814868(0x297)]){if(!isInteractive())return console[_0x814868(0x1b4)](a42_0x1f5ccf['red'](_0x814868(0x1e6)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x814868(0x1b4)](a42_0x1f5ccf[_0x814868(0x1fc)](_0x814868(0x1b1))),0x1;const _0x3f8a84=await confirmKey(_0x814868(0x1e9)+_0xcbf015+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3f8a84)return console[_0x814868(0x1b4)](a42_0x1f5ccf[_0x814868(0x220)](_0x814868(0x238))),0x1;}const _0x388a09=await withSpinner(_0x814868(0x30f)+_0xcbf015+_0x814868(0x246),()=>_0x3754f6[_0x814868(0x20e)]['delete'](_0xcbf015),{'verbose':_0x43d8a2['verbose']}),_0xfdafab=_0x388a09['data'];return console[_0x814868(0x1b4)](_0x814868(0x27f)+_0xfdafab[_0x814868(0x1af)]),console['error'](_0x814868(0x2c6)+_0xfdafab[_0x814868(0x323)]),0x0;}}export function parseKeyValue(_0xb64d0f){const _0x5d0e7e=a42_0x3d9e57,_0x59315f=_0xb64d0f['indexOf']('=');if(_0x59315f===-0x1)throw new Error(_0x5d0e7e(0x1aa)+_0xb64d0f+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x3b24c7=_0xb64d0f[_0x5d0e7e(0x2d1)](0x0,_0x59315f),_0x480125=_0xb64d0f['substring'](_0x59315f+0x1);if(!_0x3b24c7)throw new Error(_0x5d0e7e(0x201));return{'key':_0x3b24c7,'value':_0x480125};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x28c);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x2c1);async[a42_0x3d9e57(0x190)](_0x3e54e2){const _0x28bf64=a42_0x3d9e57,{options:_0x577027,args:_0x311fd7,tdx:_0x2f9e49}=_0x3e54e2,_0x18262a=this['requireProject'](_0x311fd7,_0x577027);if(!_0x18262a)return 0x1;_0x577027[_0x28bf64(0x271)]&&console[_0x28bf64(0x1b4)]('Project:\x20'+_0x18262a);const _0x3b5854=await withSpinner(_0x28bf64(0x1a6),()=>_0x2f9e49[_0x28bf64(0x20e)]['listSecrets'](_0x18262a),{'verbose':_0x577027[_0x28bf64(0x271)]}),{secrets:_0x2a442c}=_0x3b5854[_0x28bf64(0x19c)];return console[_0x28bf64(0x1b4)](_0x28bf64(0x1eb)+_0x2a442c[_0x28bf64(0x1bd)]+'\x20secret'+(_0x2a442c[_0x28bf64(0x1bd)]!==0x1?'s':'')),await handleSDKOutput(_0x2a442c,_0x577027),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a42_0x3d9e57(0x331);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x278);async[a42_0x3d9e57(0x190)](_0x1f7d15){const _0x2ee59f=a42_0x3d9e57,{options:_0x30be40,args:_0x25e46b,tdx:_0x547356}=_0x1f7d15;let _0x582b95,_0x4ea9cb;if(_0x25e46b[_0x2ee59f(0x1bd)]>=0x2)_0x582b95=_0x25e46b[0x0],_0x4ea9cb=_0x25e46b[0x1];else{if(_0x25e46b[_0x2ee59f(0x1bd)]===0x1&&_0x30be40[_0x2ee59f(0x21f)])_0x582b95=_0x30be40[_0x2ee59f(0x21f)],_0x4ea9cb=_0x25e46b[0x0];else return _0x25e46b['length']===0x1?(console[_0x2ee59f(0x1b4)](_0x2ee59f(0x299)),console[_0x2ee59f(0x1b4)](_0x2ee59f(0x20b)),0x1):(console[_0x2ee59f(0x1b4)](_0x2ee59f(0x208)),console['error'](_0x2ee59f(0x296)),0x1);}let _0x3f79a9,_0x18e3d7;try{({key:_0x3f79a9,value:_0x18e3d7}=parseKeyValue(_0x4ea9cb));}catch(_0x2e23fe){return _0x2e23fe instanceof Error&&console[_0x2ee59f(0x1b4)](a42_0x1f5ccf[_0x2ee59f(0x1ce)]('Error:'),_0x2e23fe['message']),0x1;}_0x30be40[_0x2ee59f(0x271)]&&(console['error']('Project:\x20'+_0x582b95),console[_0x2ee59f(0x1b4)](_0x2ee59f(0x1c5)+_0x3f79a9));const _0x291640=await withSpinner(_0x2ee59f(0x1a7),()=>_0x547356[_0x2ee59f(0x20e)][_0x2ee59f(0x1a3)](_0x582b95,_0x3f79a9,_0x18e3d7),{'verbose':_0x30be40[_0x2ee59f(0x271)]}),_0x1545ab=_0x291640[_0x2ee59f(0x19c)];return console['error'](_0x2ee59f(0x277)+_0x1545ab[_0x2ee59f(0x32c)]+_0x2ee59f(0x2e2)+_0x1545ab[_0x2ee59f(0x1af)]+'\x27'),(_0x30be40[_0x2ee59f(0x2b5)]||_0x30be40[_0x2ee59f(0x2aa)])&&await handleSingleObjectOutput(_0x1545ab,_0x30be40),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x3d9e57(0x2e0)]=a42_0x3d9e57(0x283);[a42_0x3d9e57(0x1f3)]=a42_0x3d9e57(0x2fd);async[a42_0x3d9e57(0x190)](_0xf864fd){const _0x6f09e3=a42_0x3d9e57,{options:_0x1ee44d,args:_0x4ed6de,tdx:_0x1ee9e2}=_0xf864fd;let _0x5959d6,_0x4a720b;if(_0x4ed6de[_0x6f09e3(0x1bd)]>=0x2)_0x5959d6=_0x4ed6de[0x0],_0x4a720b=_0x4ed6de[0x1];else{if(_0x4ed6de[_0x6f09e3(0x1bd)]===0x1&&_0x1ee44d[_0x6f09e3(0x21f)])_0x5959d6=_0x1ee44d[_0x6f09e3(0x21f)],_0x4a720b=_0x4ed6de[0x0];else return _0x4ed6de['length']===0x1?(console['error'](_0x6f09e3(0x299)),console['error'](_0x6f09e3(0x20b)),0x1):(console[_0x6f09e3(0x1b4)](_0x6f09e3(0x26f)),console['error']('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x1ee44d[_0x6f09e3(0x271)]&&(console[_0x6f09e3(0x1b4)](_0x6f09e3(0x2e5)+_0x5959d6),console[_0x6f09e3(0x1b4)](_0x6f09e3(0x1c5)+_0x4a720b));if(!_0x1ee44d[_0x6f09e3(0x297)]){if(!isInteractive())return console[_0x6f09e3(0x1b4)](a42_0x1f5ccf[_0x6f09e3(0x1ce)](_0x6f09e3(0x1e6)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a42_0x1f5ccf['dim'](_0x6f09e3(0x1b1))),0x1;const _0x2f2e44=await confirmKey(_0x6f09e3(0x1f0)+_0x4a720b+_0x6f09e3(0x31c)+_0x5959d6+'\x27?');if(!_0x2f2e44)return console['error'](a42_0x1f5ccf[_0x6f09e3(0x220)](_0x6f09e3(0x238))),0x1;}const _0x3b321e=await withSpinner(_0x6f09e3(0x2a6),()=>_0x1ee9e2[_0x6f09e3(0x20e)][_0x6f09e3(0x1bc)](_0x5959d6,_0x4a720b),{'verbose':_0x1ee44d[_0x6f09e3(0x271)]}),_0x1338cf=_0x3b321e[_0x6f09e3(0x19c)];return console[_0x6f09e3(0x1b4)]('✔\x20Secret\x20\x27'+_0x1338cf[_0x6f09e3(0x32c)]+_0x6f09e3(0x31e)+_0x1338cf[_0x6f09e3(0x1af)]+'\x27'),(_0x1ee44d['json']||_0x1ee44d['jsonl'])&&await handleSingleObjectOutput(_0x1338cf,_0x1ee44d),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(_0x34b7b2){const _0x59995b=a42_0x3d9e57,_0x572263=Math[_0x59995b(0x2bf)](_0x34b7b2/0x3e8),_0x478987=Math[_0x59995b(0x2bf)](_0x572263/0x3c),_0x17128c=Math['floor'](_0x478987/0x3c),_0x39d84b=Math[_0x59995b(0x2bf)](_0x17128c/0x18);if(_0x39d84b>0x0){const _0x25689a=_0x17128c%0x18;return _0x25689a>0x0?_0x39d84b+'d\x20'+_0x25689a+'h':_0x39d84b+'d';}else{if(_0x17128c>0x0){const _0x192189=_0x478987%0x3c;return _0x192189>0x0?_0x17128c+'h\x20'+_0x192189+'m':_0x17128c+'h';}else{if(_0x478987>0x0){const _0x4e7b67=_0x572263%0x3c;return _0x4e7b67>0x0?_0x478987+'m\x20'+_0x4e7b67+'s':_0x478987+'m';}else return _0x572263+'s';}}}function formatTimestamp(_0x292270,_0x3d387a){const _0x45aa22=a42_0x3d9e57,_0x27119c=new Date(_0x292270),_0x4f6532=String(_0x27119c[_0x45aa22(0x244)]())[_0x45aa22(0x2ba)](0x2,'0'),_0x15cd3b=String(_0x27119c[_0x45aa22(0x1e0)]())[_0x45aa22(0x2ba)](0x2,'0'),_0x4eafe8=_0x4f6532+':'+_0x15cd3b,_0x31b941=_0x27119c[_0x45aa22(0x2f7)]()===_0x3d387a[_0x45aa22(0x2f7)]()&&_0x27119c[_0x45aa22(0x19e)]()===_0x3d387a['getMonth']()&&_0x27119c['getDate']()===_0x3d387a[_0x45aa22(0x2ef)]();if(_0x31b941)return _0x4eafe8;else{const _0x598aad=String(_0x27119c[_0x45aa22(0x19e)]()+0x1)[_0x45aa22(0x2ba)](0x2,'0'),_0x2d1a81=String(_0x27119c[_0x45aa22(0x2ef)]())['padStart'](0x2,'0');return _0x598aad+'-'+_0x2d1a81+'\x20'+_0x4eafe8;}}function formatDate(_0x530733){const _0x3bce8f=a42_0x3d9e57,_0x3d163d=_0x530733[_0x3bce8f(0x2f7)](),_0x116fca=String(_0x530733[_0x3bce8f(0x19e)]()+0x1)['padStart'](0x2,'0'),_0x23993b=String(_0x530733[_0x3bce8f(0x2ef)]())[_0x3bce8f(0x2ba)](0x2,'0');return _0x3d163d+'-'+_0x116fca+'-'+_0x23993b;}function getTaskStateIcon(_0x88c296){const _0x17c159={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x17c159[_0x88c296]||'⚪';}function getBarChar(_0x482cee){const _0x566f72=a42_0x3d9e57;return _0x482cee===_0x566f72(0x1b4)||_0x482cee==='group_error'?'×':'─';}function getBarColor(_0x440abb){const _0x448240=a42_0x3d9e57,_0x28e663={'success':a42_0x1f5ccf[_0x448240(0x2dc)],'error':a42_0x1f5ccf['red'],'group_error':a42_0x1f5ccf[_0x448240(0x1ce)],'running':a42_0x1f5ccf['blue'],'blocked':a42_0x1f5ccf[_0x448240(0x220)],'planned':a42_0x1f5ccf[_0x448240(0x1fc)],'canceling':a42_0x1f5ccf['yellow']};return _0x28e663[_0x440abb]||a42_0x1f5ccf[_0x448240(0x199)];}function parseTaskName(_0x29cf08){const _0x339cb5=a42_0x3d9e57;let _0x5db68b=_0x29cf08[_0x339cb5(0x2f8)](/^\++/,'');const _0x3e7c00=_0x5db68b['split']('+'),_0x501754=_0x3e7c00[_0x339cb5(0x1bd)]>0x1?_0x3e7c00[_0x339cb5(0x1bd)]-0x2:0x0,_0x19a833=_0x3e7c00[_0x3e7c00[_0x339cb5(0x1bd)]-0x1]||_0x5db68b;return{'level':_0x501754,'name':'+'+_0x19a833};}function a42_0x1dca(){const _0x4ae853=['Project\x20directory:\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','665TZIIUl','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','sessionTime','\x20\x20Project:\x20','Cloning\x20to\x20','Total:\x20','splice','sys','No\x20workflow\x20tdx.json\x20found','fileSize','(use\x20--limit\x20to\x20see\x20more)','text','filter','\x20has\x20no\x20attempts','✔\x20Clone\x20complete','includes','20CMrzQN','Deleting\x20project\x20','Retrying\x20session...','No\x20workflow\x20projects\x20found','all','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','slice','\x20deleted','min','toLowerCase','createdAt','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Resume\x20from:\x20','workflow:delete','\x27\x20from\x20project\x20\x27','Kill\x20a\x20running\x20attempt','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','newProjectName','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','renderSingleTimeline','LABEL_WIDTH_DIVISOR','projectId','\x20from\x20session\x20','\x20-\x20','\x20\x20Attempt\x20ID:\x20','state',',\x20Workflow:\x20','match','\x20of\x20','✔\x20Workflow\x20project\x20context\x20cleared.','key','lastAttempt','\x20unchanged','parse','\x22\x20to\x20new\x20project\x20\x22','workflow:secrets:set','resolveProjectDir','sourceProjectName','fullName','metadata','\x20modified','fileCount','execute','\x20task','readFile','pollTimeline','Tip:\x20cd\x20to\x20workflows/','updatedAt','renderTimeline','\x20\x20Session\x20context\x20set\x20to:\x20','map','white','\x20\x20Location:\x20','Expected\x20format:\x20--param\x20key=value','data','Updating\x20','getMonth','Error:\x20','734118CKiHwQ','taskName','Filter:\x20project=','setSecret','total','retrySession','Listing\x20secrets...','Setting\x20secret...','Latest\x20session\x20has\x20no\x20attempt','workflow:retry','Invalid\x20format:\x20','window','Source\x20directory\x20is\x20required','renderSessionsTimeline','from','projectName','values','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','workflow:use','logs','error','cyan','unchanged','tasks','\x20(use\x20--limit\x20to\x20show\x20more)','(unknown)','sessions','isDirectory','deleteSecret','length','type','No\x20workflows\x20found','showWorkflowConsoleUrl','57712GsmAyF','resumeFrom','isTTY','Show\x20tasks\x20for\x20an\x20attempt','Key:\x20','keys','project','workflow:run','diff','Pattern:\x20','deleted','\x0aPush\x20these\x20changes?','\x22\x20with\x20new\x20revision?','red','workflows','List\x20all\x20workflow\x20projects','success','workflow:push','\x20\x20Revision:\x20','includeSubtasks','workflow:workflows','\x20\x20New\x20attempt\x20ID:\x20','MAX_TASKS_DISPLAY','log','\x0aDry\x20run\x20-\x20no\x20project\x20created','stdout','value','Fetching\x20log\x20files...','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','\x0a⚠\x20Project\x20\x22','relative','getMinutes','Loading\x20sessions...','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Revision:\x20','Retry\x20a\x20session\x20or\x20attempt','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x0aError:','No\x20workflows\x20found\x20in\x20project:\x20','\x0a✔\x20No\x20changes\x20to\x20push','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','fromTask','✔\x20Found\x20','projects','Usage:\x20tdx\x20wf\x20use\x20<project>','Session\x20','760DEAiOs','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','-\x20nothing\x20pushed','resolveProjectId','description','repeat','Pulling\x20project\x20','write','Loading\x20workflows...','targetExists','✔\x20Pull\x20complete','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','---\x20','dim','Writing\x20files...','executeCloneProject','planned','\x20\x20Console:\x20','Key\x20cannot\x20be\x20empty','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Project\x20name\x20is\x20required','workflow:upload','workflow:tasks','attempt:','localeCompare','Error:\x20KEY=VALUE\x20is\x20required','Starting\x20workflow\x20run...','17852439rNNFml','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','startsWith','durationMs','workflow','Target\x20directory:\x20','resolve','Source\x20project:\x20','start','reason','getTime','Params:\x20','get','cwd','retryAttemptName','\x20\x20Workflow:\x20','canceling','No\x20attempts\x20found\x20in\x20project:\x20','\x0aApply\x20these\x20changes?','sessionId','task','workflowProject','yellow','pending','80019PGHhwv','status','index','indexOf','basename','\x22\x20already\x20exists\x20(ID:\x20','attemptId','sort','autocomplete','2189420BIWRmK','Downloading\x20logs...','rows','ICON_SPACING','\x20workflow','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','✔\x20Project:\x20','executePushProject','format','msPerChar','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','3qLThwy','Cancelled','toISOString','modified','end','List\x20workflow\x20attempts','Getting\x20attempt\x20details...','\x20attempt','1582942wvVRQe','pullProject','kill','LABEL_MIN_SPACING','param','getHours','startTime','...','newProjectId','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','running','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Target:\x20','Dry\x20run:\x20yes','fill','workflow:clone','find','stat','Parameters:\x20','Workflow:\x20','Pushing\x20project...','\x20\x20Files\x20extracted:\x20','preparePushProject','workflow:timeline','unknown','📁\x20','\x0aClone\x20\x22','\x20\x20Target:\x20','→\x20Project:\x20','context','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','✔\x20Retry\x20started','Error:\x20Invalid\x20parameter\x20format:\x20','\x20session','List\x20workflow\x20execution\x20sessions','filesExtracted','startedAt','blue','\x20\x20tdx\x20wf\x20use\x20<project>','revision:\x20','generateSessionTimelineRows','POLL_INTERVAL_MS','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','title','logFiles','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Status:\x20','attempt','Error:\x20Secret\x20key\x20is\x20required','params','verbose','New\x20project\x20name:\x20','hasChanges','max','Error:\x20Attempt\x20ID\x20is\x20required','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','✔\x20Secret\x20\x27','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Resolving\x20project\x20\x27','navigateSessionsInteractive','dryRun','Error:\x20Invalid\x20JSON\x20in\x20--params','\x0a✔\x20Already\x20up\x20to\x20date','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','✔\x20Deleted\x20project\x20','revision','\x1b[1A\x1b[2K','/sessions/','workflow:secrets:delete','limit','workflowName','No\x20sessions\x20found\x20in\x20project:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','join','push','\x20new','Listing\x20workflows...','workflow:secrets:list','columns','parseProjectWorkflowPattern','Start\x20a\x20workflow\x20run','follow','✔\x20Workflow\x20run\x20started','Attempt\x20ID:\x20','Attempt:\x20','No\x20sessions\x20found\x20for:\x20','session:','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','yes','sourceDir','Error:\x20Project\x20name\x20is\x20required','\x20\x20Session\x20ID:\x20','select','stringify','done','Killing\x20attempt...','workflow:logs','icon','✔\x20Pushed\x20','Project\x20filter:\x20','force','\x20to\x20see\x20detailed\x20logs','988344OsvaqX','Deleting\x20secret...','Error:','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','From\x20task:\x20','jsonl','\x0aDry\x20run\x20-\x20nothing\x20pushed','some','list','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Validation:\x20skipped','\x20\x20Changes:\x20','No\x20sessions\x20found','set','workflow:attempts','cancelRequested','json','MIN_LABEL_COUNT','Filter:\x20','Listing\x20workflow\x20sessions...','now','padStart','Reason:\x20','/app/workflows/','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','floor','trim','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','round','Project\x20name:\x20','MAX_TIMELINE_WIDTH','buildTimelineData','\x20\x20Project\x20ID:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','output','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','resolveProject','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Auto-selected\x20latest\x20session:\x20','\x20project','\x27...','substring','workflow:sessions','targetDir','MAX_LABEL_COUNT','summary','Select\x20a\x20session\x20to\x20view\x20timeline:','Output\x20directory:\x20','skipValidation','fs/promises','prepareCloneProject','\x0aUpdate\x20existing\x20project\x20\x22','green','Show\x20specific\x20attempt\x20details','changes','Session\x20not\x20found:\x20','name','message','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','new','finishedAt','Project:\x20','requireProject','isArray','Listing\x20workflow\x20attempts...','✔\x20Downloaded\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','path','Pushing\x20workflow\x20project...','site','MIN_TIMELINE_WIDTH','getDate','ICON_WIDTH','session','run','split','tdx\x20wf\x20attempt\x20','duration','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','getFullYear','replace','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','table','Source\x20directory:\x20'];a42_0x1dca=function(){return _0x4ae853;};return a42_0x1dca();}function truncateTaskName(_0x5a1c48,_0x386838){const _0x211db4=a42_0x3d9e57,_0x166e0f=stringWidth(_0x5a1c48);if(_0x166e0f<=_0x386838)return _0x5a1c48;let _0x5c9378=_0x5a1c48;while(stringWidth(_0x5c9378+'…')>_0x386838&&_0x5c9378[_0x211db4(0x1bd)]>0x0){_0x5c9378=_0x5c9378[_0x211db4(0x314)](0x0,-0x1);}return _0x5c9378+'…';}function calculateTimeScale(_0x16ebb9,_0x7bde69){const _0x5497bf=a42_0x3d9e57;return{'startTime':_0x16ebb9[_0x5497bf(0x212)],'endTime':_0x16ebb9[_0x5497bf(0x23b)],'durationMs':_0x16ebb9[_0x5497bf(0x2f5)],'msPerChar':_0x16ebb9[_0x5497bf(0x2f5)]/_0x7bde69};}function timeToPosition(_0x594301,_0x24e058,_0x37bddd){const _0x1b573d=a42_0x3d9e57,_0x1ca5a3=_0x594301-_0x24e058[_0x1b573d(0x245)],_0x58e09f=Math[_0x1b573d(0x2bf)](_0x1ca5a3/_0x24e058[_0x1b573d(0x234)]);return Math['max'](0x0,Math[_0x1b573d(0x316)](_0x58e09f,_0x37bddd));}function renderTimeAxis(_0x16528d,_0x500a18){const _0x572fc4=a42_0x3d9e57,_0x402fa9=Math[_0x572fc4(0x316)](TIMELINE_CONFIG[_0x572fc4(0x2d4)],Math[_0x572fc4(0x274)](TIMELINE_CONFIG[_0x572fc4(0x2b6)],Math[_0x572fc4(0x2bf)](_0x500a18/TIMELINE_CONFIG[_0x572fc4(0x322)]))),_0x23d260=_0x16528d[_0x572fc4(0x20d)]/(_0x402fa9-0x1),_0x449725=new Date(_0x16528d[_0x572fc4(0x245)]),_0x3364fd=[];for(let _0x283851=0x0;_0x283851<_0x402fa9;_0x283851++){const _0x176b70=_0x16528d[_0x572fc4(0x245)]+_0x283851*_0x23d260,_0x11c403=timeToPosition(_0x176b70,_0x16528d,_0x500a18),_0x233e32=formatTimestamp(_0x176b70,_0x449725);_0x3364fd[_0x572fc4(0x289)]({'pos':_0x11c403,'text':_0x233e32});}const _0x2530d2=new Array(_0x500a18)[_0x572fc4(0x24d)]('\x20');let _0x185b14=-0x1;for(const {pos:_0x24565b,text:_0x42f6b9}of _0x3364fd){let _0x288d2f=Math[_0x572fc4(0x274)](0x0,_0x24565b-Math[_0x572fc4(0x2bf)](_0x42f6b9['length']/0x2));_0x288d2f<=_0x185b14+TIMELINE_CONFIG[_0x572fc4(0x242)]&&(_0x288d2f=_0x185b14+TIMELINE_CONFIG[_0x572fc4(0x242)]+0x1);_0x288d2f+_0x42f6b9[_0x572fc4(0x1bd)]>_0x500a18&&(_0x288d2f=_0x500a18-_0x42f6b9[_0x572fc4(0x1bd)]);if(_0x288d2f>=0x0&&_0x288d2f+_0x42f6b9[_0x572fc4(0x1bd)]<=_0x500a18&&_0x288d2f>_0x185b14){for(let _0x437164=0x0;_0x437164<_0x42f6b9['length'];_0x437164++){_0x2530d2[_0x288d2f+_0x437164]=_0x42f6b9[_0x437164];}_0x185b14=_0x288d2f+_0x42f6b9[_0x572fc4(0x1bd)]-0x1;}}return _0x2530d2['join']('');}function renderTaskRow(_0x3d2df0,_0x5450cd,_0x246fac,_0x35b7c9){const _0x4c7117=a42_0x3d9e57,{level:_0x5789d5,name:_0x802896}=parseTaskName(_0x3d2df0[_0x4c7117(0x2e0)]),_0x3ed995='\x20'[_0x4c7117(0x1f4)](_0x5789d5),_0x57a71e=_0x3d2df0[_0x4c7117(0x1ab)]?'('+formatElapsed(_0x3d2df0[_0x4c7117(0x1ab)]['duration'])+')':'',_0x5e0a90=stringWidth(_0x57a71e),_0x31ee04=_0x5789d5*0x1,_0x1d7de0=_0x35b7c9-_0x31ee04-_0x5e0a90-0x1,_0x11c4b0=truncateTaskName(_0x802896,_0x1d7de0),_0x154860=_0x3ed995+_0x11c4b0,_0x3964a8=stringWidth(_0x154860),_0x5e6005=_0x35b7c9-_0x3964a8-_0x5e0a90,_0x34979c=_0x154860+'\x20'['repeat'](Math['max'](0x1,_0x5e6005))+a42_0x1f5ccf[_0x4c7117(0x1fc)](_0x57a71e),_0x2129a8=getTaskStateIcon(_0x3d2df0[_0x4c7117(0x327)]),_0x47f254=new Array(_0x246fac)[_0x4c7117(0x24d)]('\x20');if(_0x3d2df0[_0x4c7117(0x1ab)]){const _0x5232b8=timeToPosition(_0x3d2df0[_0x4c7117(0x1ab)][_0x4c7117(0x212)],_0x5450cd,_0x246fac),_0x538eff=timeToPosition(_0x3d2df0[_0x4c7117(0x1ab)][_0x4c7117(0x23b)],_0x5450cd,_0x246fac),_0x36bd20=getBarChar(_0x3d2df0[_0x4c7117(0x327)]),_0x51ea8b=Math[_0x4c7117(0x274)](_0x5232b8+0x1,_0x538eff);for(let _0x45db42=_0x5232b8;_0x45db42<Math['min'](_0x51ea8b,_0x246fac);_0x45db42++){_0x47f254[_0x45db42]=_0x36bd20;}}const _0x3471e6=getBarColor(_0x3d2df0['state']),_0x346dac=_0x47f254[_0x4c7117(0x198)](_0x2a646e=>_0x2a646e==='\x20'?'\x20':_0x3471e6(_0x2a646e))[_0x4c7117(0x288)]('');return _0x2129a8+'\x20'+_0x34979c+'│'+_0x346dac+'│';}function calculateStats(_0xe2329e){const _0x2a93ea=a42_0x3d9e57,_0x1d4d84={'total':_0xe2329e['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x47020b of _0xe2329e){if(_0x47020b[_0x2a93ea(0x327)]==='success')_0x1d4d84['success']++;else{if(_0x47020b[_0x2a93ea(0x327)]===_0x2a93ea(0x1b4)||_0x47020b['state']==='group_error')_0x1d4d84[_0x2a93ea(0x1b4)]++;else _0x47020b[_0x2a93ea(0x327)]===_0x2a93ea(0x249)?_0x1d4d84[_0x2a93ea(0x249)]++:_0x1d4d84[_0x2a93ea(0x221)]++;}}return _0x1d4d84;}function formatStats(_0x56ab3d){const _0x29e0f2=a42_0x3d9e57;return[_0x29e0f2(0x303)+_0x56ab3d[_0x29e0f2(0x1a4)],'✅\x20'+_0x56ab3d[_0x29e0f2(0x1d1)],'❌\x20'+_0x56ab3d[_0x29e0f2(0x1b4)],'🔄\x20'+_0x56ab3d[_0x29e0f2(0x249)],'⏳\x20'+_0x56ab3d[_0x29e0f2(0x221)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0x3d9e57(0x256);['description']=a42_0x3d9e57(0x235);async[a42_0x3d9e57(0x190)](_0x3c2375){const _0x3deda0=a42_0x3d9e57,{options:_0x114f6d,args:_0x1c857f,tdx:_0x12c76e}=_0x3c2375;let _0x139222,_0x21cde7,_0x6c46b7=![];if(_0x1c857f[0x0]){if(_0x1c857f[0x0]['includes']('.')){const _0x4474ee=this['parseProjectWorkflowPattern'](_0x1c857f,_0x114f6d);if(!_0x4474ee)return 0x1;_0x139222=_0x4474ee['projectName'],_0x21cde7=_0x4474ee[_0x3deda0(0x285)];}else{_0x21cde7=_0x1c857f[0x0],_0x139222=_0x114f6d['workflowProject'];if(!_0x139222)return console[_0x3deda0(0x1b4)](a42_0x1f5ccf[_0x3deda0(0x1ce)](_0x3deda0(0x2a7)),_0x3deda0(0x2f9)),0x1;_0x6c46b7=!![];}}else{const _0xd2792e=this['parseProjectWorkflowPattern'](_0x1c857f,_0x114f6d);if(!_0xd2792e)return 0x1;_0x139222=_0xd2792e[_0x3deda0(0x1af)],_0x21cde7=_0xd2792e[_0x3deda0(0x285)];}if(_0x114f6d[_0x3deda0(0x271)]){if(_0x139222&&_0x21cde7)console[_0x3deda0(0x1b4)]('Filter:\x20'+_0x139222+'.'+_0x21cde7);else _0x139222&&console[_0x3deda0(0x1b4)]('Filter:\x20project='+_0x139222);}const _0x3274b6=_0x114f6d[_0x3deda0(0x228)],_0xf9df7=_0x114f6d['sessionId'];if(_0x3274b6){_0xf9df7&&console['error'](a42_0x1f5ccf['yellow']('Warning:'),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x4961cb=_0x114f6d[_0x3deda0(0x290)];return _0x4961cb?await this[_0x3deda0(0x193)](_0x3c2375,_0x3274b6):await this['renderSingleTimeline'](_0x3c2375,_0x3274b6,_0x114f6d),0x0;}if(_0xf9df7){const _0x5317dc=await withSpinner('Loading\x20session...',()=>_0x12c76e[_0x3deda0(0x20e)][_0x3deda0(0x1ba)]({'projectName':_0x139222,'workflowName':_0x21cde7,'limit':0x64}),{'verbose':_0x114f6d[_0x3deda0(0x271)]}),_0x205b0d=_0x5317dc[_0x3deda0(0x19c)][_0x3deda0(0x24f)](_0x386d5e=>_0x386d5e['id']===_0xf9df7);if(!_0x205b0d)return console[_0x3deda0(0x1b4)](a42_0x1f5ccf['red'](_0x3deda0(0x2a7)),_0x3deda0(0x2df)+_0xf9df7),0x1;if(!_0x205b0d[_0x3deda0(0x32d)]?.['id'])return console['error'](a42_0x1f5ccf[_0x3deda0(0x1ce)](_0x3deda0(0x2a7)),_0x3deda0(0x1ee)+_0xf9df7+_0x3deda0(0x30b)),0x1;const _0x12a7a2=_0x205b0d[_0x3deda0(0x32d)]['id'];_0x114f6d[_0x3deda0(0x271)]&&console[_0x3deda0(0x1b4)]('Using\x20attempt\x20'+_0x12a7a2+_0x3deda0(0x324)+_0xf9df7);const _0x3f01c7=_0x114f6d[_0x3deda0(0x290)];return _0x3f01c7?await this[_0x3deda0(0x193)](_0x3c2375,_0x12a7a2):await this['renderSingleTimeline'](_0x3c2375,_0x12a7a2,_0x114f6d),0x0;}const _0x2f12e7=await withSpinner(_0x3deda0(0x1e1),()=>_0x12c76e['workflow'][_0x3deda0(0x1ba)]({'projectName':_0x139222,'workflowName':_0x21cde7,'limit':_0x114f6d[_0x3deda0(0x284)]||0x32}),{'verbose':_0x114f6d['verbose']}),_0x3366d1=_0x2f12e7[_0x3deda0(0x19c)];if(_0x3366d1['length']===0x0){if(_0x139222&&_0x21cde7)console[_0x3deda0(0x1b4)](_0x3deda0(0x294)+_0x139222+'.'+_0x21cde7);else _0x139222?console[_0x3deda0(0x1b4)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x139222):(console[_0x3deda0(0x1b4)]('No\x20workflow\x20sessions\x20found'),console[_0x3deda0(0x1b4)](a42_0x1f5ccf[_0x3deda0(0x1fc)](_0x3deda0(0x2c8))));return 0x0;}_0x3366d1[_0x3deda0(0x229)]((_0x273cb1,_0x235941)=>{const _0x201e9e=_0x273cb1['sessionTime']||'',_0x207b5a=_0x235941['sessionTime']||'';return _0x207b5a['localeCompare'](_0x201e9e);});if(_0x114f6d[_0x3deda0(0x2b5)]||_0x114f6d[_0x3deda0(0x2aa)])return await handleSDKOutput(_0x3366d1,_0x114f6d),0x0;let _0x76e38e;if(_0x6c46b7){const _0x40ebab=_0x3366d1[0x0];if(!_0x40ebab[_0x3deda0(0x32d)]?.['id'])return console['error'](_0x3deda0(0x1a8)),0x0;_0x76e38e=_0x40ebab['lastAttempt']['id'],_0x114f6d[_0x3deda0(0x271)]&&console[_0x3deda0(0x1b4)](_0x3deda0(0x2ce)+_0x40ebab['sessionTime']);}else{const _0x3baa1b=_0x3366d1[_0x3deda0(0x198)](_0x48ce72=>{const _0x193d47=_0x3deda0,_0x249199=getAttemptStatusDisplay(_0x48ce72[_0x193d47(0x32d)]);return{'title':_0x48ce72[_0x193d47(0x1c7)]?.['name']+'.'+_0x48ce72['workflow']?.[_0x193d47(0x2e0)]+_0x193d47(0x325)+_0x48ce72[_0x193d47(0x300)]+'\x20'+_0x249199[_0x193d47(0x2a0)],'value':_0x48ce72[_0x193d47(0x32d)]?.['id']||'','description':_0x249199[_0x193d47(0x309)]};}),_0x3159d9=await a42_0x40d5a1({'type':_0x3deda0(0x29b),'name':_0x3deda0(0x228),'message':_0x3deda0(0x2d6),'choices':_0x3baa1b[_0x3deda0(0x30a)](_0x562651=>_0x562651[_0x3deda0(0x1db)]!=='')});if(!_0x3159d9[_0x3deda0(0x228)])return 0x0;_0x76e38e=_0x3159d9[_0x3deda0(0x228)];}const _0x15ddeb=_0x114f6d[_0x3deda0(0x290)];return _0x15ddeb?await this['pollTimeline'](_0x3c2375,_0x76e38e):await this[_0x3deda0(0x321)](_0x3c2375,_0x76e38e,_0x114f6d),0x0;}async[a42_0x3d9e57(0x321)](_0x3fdefc,_0x28d22a,_0x11a617){const _0x42d359=a42_0x3d9e57,{tdx:_0x578053}=_0x3fdefc;let _0x18e9df,_0x16e623;try{[_0x18e9df,_0x16e623]=await Promise['all']([_0x578053['workflow']['attempt'](_0x28d22a),_0x578053[_0x42d359(0x20e)]['tasks'](_0x28d22a,![])]);}catch(_0x97e21c){console['error'](a42_0x1f5ccf[_0x42d359(0x1ce)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x11a617[_0x42d359(0x271)]&&console[_0x42d359(0x1b4)](_0x97e21c);throw _0x97e21c;}if(_0x11a617[_0x42d359(0x2b5)]||_0x11a617[_0x42d359(0x2aa)]){const _0x5cb388=this[_0x42d359(0x2c5)](_0x18e9df,_0x16e623);await handleSDKOutput([_0x5cb388],_0x11a617);return;}const _0x2eb610=_0x578053[_0x42d359(0x25c)][_0x42d359(0x2ed)],_0x51be3d=this[_0x42d359(0x196)](_0x18e9df,_0x16e623,_0x2eb610);console[_0x42d359(0x1d8)](_0x51be3d);}async[a42_0x3d9e57(0x193)](_0x210ce3,_0x4e8d59){const _0x560fab=a42_0x3d9e57,{tdx:_0x5707ad}=_0x210ce3,_0x50a39e=TIMELINE_CONFIG[_0x560fab(0x268)],_0xce58cd=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x568c77=0x0;while(_0x568c77<_0xce58cd){process[_0x560fab(0x1da)][_0x560fab(0x1c3)]&&process[_0x560fab(0x1da)][_0x560fab(0x1f6)]('\x1bc');let _0x8e9513,_0x4dbaf4;try{[_0x8e9513,_0x4dbaf4]=await Promise[_0x560fab(0x312)]([_0x5707ad[_0x560fab(0x20e)][_0x560fab(0x26e)](_0x4e8d59),_0x5707ad[_0x560fab(0x20e)][_0x560fab(0x1b7)](_0x4e8d59,![])]);}catch(_0x5ddabc){console['error'](a42_0x1f5ccf[_0x560fab(0x1ce)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x568c77>0x0&&console[_0x560fab(0x1b4)](a42_0x1f5ccf[_0x560fab(0x1fc)](_0x560fab(0x276)+_0x568c77));throw _0x5ddabc;}const _0x5ecbfd=_0x5707ad[_0x560fab(0x25c)]['site'],_0x3773aa=this['renderTimeline'](_0x8e9513,_0x4dbaf4,_0x5ecbfd);console[_0x560fab(0x1d8)](_0x3773aa);const _0x49a7fb=_0x8e9513[_0x560fab(0x29d)]&&_0x4dbaf4['every'](_0x2ccf27=>_0x2ccf27[_0x560fab(0x327)]!==_0x560fab(0x249)&&_0x2ccf27[_0x560fab(0x327)]!==_0x560fab(0x1ff));if(_0x49a7fb){console[_0x560fab(0x1b4)](a42_0x1f5ccf[_0x560fab(0x2dc)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x560fab(0x1b4)](a42_0x1f5ccf['dim']('\x0aPolling...\x20('+_0x568c77*0x2+_0x560fab(0x319))),await new Promise(_0x5c6004=>setTimeout(_0x5c6004,_0x50a39e)),_0x568c77++;}_0x568c77>=_0xce58cd&&console[_0x560fab(0x1b4)](a42_0x1f5ccf[_0x560fab(0x220)](_0x560fab(0x269)));}['renderTimeline'](_0x2e6249,_0x84bdd,_0x56397f){const _0x258a74=a42_0x3d9e57,_0xe9b9b2=[],_0x461f0a=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x20006b=0x5,_0x39f525=process['stdout'][_0x258a74(0x28d)]||0x78,_0x59df69=_0x39f525-_0x461f0a-_0x20006b,_0x45dec6=Math[_0x258a74(0x274)](TIMELINE_CONFIG[_0x258a74(0x2ee)],Math[_0x258a74(0x316)](_0x59df69,TIMELINE_CONFIG[_0x258a74(0x2c4)])),_0x59266e=new Date(_0x2e6249[_0x258a74(0x318)])[_0x258a74(0x214)](),_0x2d64e5=_0x2e6249[_0x258a74(0x2e4)]?new Date(_0x2e6249[_0x258a74(0x2e4)])['getTime']():Date['now'](),_0x37ac51={'start':_0x59266e,'end':_0x2d64e5,'duration':_0x2d64e5-_0x59266e},_0x2ae305=new Map(),_0x550019=[];for(const _0x9acc14 of _0x84bdd){if(_0x9acc14[_0x258a74(0x263)]){const _0x216dba=new Date(_0x9acc14[_0x258a74(0x263)])['getTime'](),_0x16be69=_0x9acc14[_0x258a74(0x195)]?new Date(_0x9acc14[_0x258a74(0x195)])['getTime']():Date[_0x258a74(0x2b9)](),_0x420031={'start':_0x216dba,'end':_0x16be69,'duration':_0x16be69-_0x216dba};_0x2ae305[_0x258a74(0x2b2)](_0x9acc14['id'],_0x420031),_0x550019[_0x258a74(0x289)]({'name':_0x9acc14[_0x258a74(0x18c)],'state':_0x9acc14['state']||_0x258a74(0x257),'window':_0x420031});}else _0x550019[_0x258a74(0x289)]({'name':_0x9acc14[_0x258a74(0x18c)],'state':_0x9acc14['state']||'planned','window':undefined});}_0x550019[_0x258a74(0x229)]((_0x2e96b7,_0x238e9e)=>{const _0x313ac9=_0x258a74;if(!_0x2e96b7['window'])return 0x1;if(!_0x238e9e['window'])return-0x1;return _0x2e96b7[_0x313ac9(0x1ab)][_0x313ac9(0x212)]-_0x238e9e[_0x313ac9(0x1ab)][_0x313ac9(0x212)];});const _0x2e0356=_0x550019[_0x258a74(0x1bd)],_0x425fdc=_0x2e0356>TIMELINE_CONFIG[_0x258a74(0x1d7)];_0x425fdc&&_0x550019[_0x258a74(0x304)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x3f406f=calculateTimeScale(_0x37ac51,_0x45dec6),_0x402c3b=_0x2e6249[_0x258a74(0x29d)]?_0x2e6249['success']?a42_0x1f5ccf[_0x258a74(0x2dc)](_0x258a74(0x1d1)):a42_0x1f5ccf[_0x258a74(0x1ce)](_0x258a74(0x1b4)):a42_0x1f5ccf[_0x258a74(0x264)](_0x258a74(0x249)),_0x28bb17=_0x2e6249[_0x258a74(0x1c7)]?.['id'],_0x208eeb=_0x2e6249[_0x258a74(0x21d)];let _0x9eca20;if(_0x28bb17&&_0x208eeb){const _0x5e3056=getWorkflowAttemptUrl(_0x56397f,_0x28bb17,_0x208eeb,_0x2e6249['id']);_0x9eca20=hyperlink(a42_0x1f5ccf[_0x258a74(0x1fc)](_0x2e6249['id']),_0x5e3056);}else _0x9eca20=a42_0x1f5ccf[_0x258a74(0x1fc)](_0x2e6249['id']);_0xe9b9b2['push'](_0x258a74(0x293)+_0x9eca20+_0x258a74(0x325)+_0x402c3b+_0x258a74(0x325)+formatElapsed(_0x37ac51['duration']));if(_0x550019[_0x258a74(0x1bd)]>0x0){const _0x2a7d4c=renderTimeAxis(_0x3f406f,_0x45dec6),_0x13c5f4=new Date(_0x37ac51['start']),_0xc94e1e=formatDate(_0x13c5f4),_0x13f974=TIMELINE_CONFIG[_0x258a74(0x2f0)]+TIMELINE_CONFIG[_0x258a74(0x22e)]+_0x461f0a,_0x2bc0be=_0xc94e1e[_0x258a74(0x2ba)](_0x13f974),_0x57d9be=a42_0x1f5ccf[_0x258a74(0x1fc)](_0x2bc0be);_0xe9b9b2[_0x258a74(0x289)](_0x57d9be+'\x20'+_0x2a7d4c);for(const _0xc1ab78 of _0x550019){_0xe9b9b2[_0x258a74(0x289)](renderTaskRow(_0xc1ab78,_0x3f406f,_0x45dec6,_0x461f0a));}const _0x28b289=calculateStats(_0x550019);_0xe9b9b2[_0x258a74(0x289)](formatStats(_0x28b289)),_0x425fdc&&_0xe9b9b2[_0x258a74(0x289)](a42_0x1f5ccf[_0x258a74(0x220)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x258a74(0x1d7)]+_0x258a74(0x32a)+_0x2e0356+'\x20tasks')),_0xe9b9b2[_0x258a74(0x289)](''),_0xe9b9b2[_0x258a74(0x289)](a42_0x1f5ccf[_0x258a74(0x1fc)]('💡\x20Tip:\x20Use\x20')+(_0x258a74(0x2f4)+_0x2e6249['id']+'\x20logs')+a42_0x1f5ccf[_0x258a74(0x1fc)](_0x258a74(0x2a4)));}else _0xe9b9b2[_0x258a74(0x289)](_0x258a74(0x320));return _0xe9b9b2[_0x258a74(0x288)]('\x0a');}['buildTimelineData'](_0x388633,_0xed0ff6){const _0x47630f=a42_0x3d9e57,_0x18ce16=new Date(_0x388633['createdAt'])[_0x47630f(0x214)](),_0xb1caf7=_0x388633[_0x47630f(0x2e4)]?new Date(_0x388633[_0x47630f(0x2e4)])[_0x47630f(0x214)]():Date[_0x47630f(0x2b9)](),_0x352cd4=_0xb1caf7-_0x18ce16,_0x35aa98=[];for(const _0x697bfb of _0xed0ff6){if(_0x697bfb[_0x47630f(0x263)]){const _0x1550d3=new Date(_0x697bfb[_0x47630f(0x263)])['getTime'](),_0x1d9824=_0x697bfb[_0x47630f(0x195)]?new Date(_0x697bfb[_0x47630f(0x195)])[_0x47630f(0x214)]():Date[_0x47630f(0x2b9)]();_0x35aa98[_0x47630f(0x289)]({'name':_0x697bfb[_0x47630f(0x18c)],'state':_0x697bfb[_0x47630f(0x327)]||'unknown','window':{'start':_0x1550d3,'end':_0x1d9824,'duration':_0x1d9824-_0x1550d3}});}else _0x35aa98['push']({'name':_0x697bfb[_0x47630f(0x18c)],'state':_0x697bfb['state']||_0x47630f(0x1ff),'window':undefined});}const _0x463b02=calculateStats(_0x35aa98);return{'attempt':{'id':_0x388633['id'],'status':_0x388633[_0x47630f(0x29d)]?_0x388633[_0x47630f(0x1d1)]?_0x47630f(0x1d1):_0x47630f(0x1b4):_0x47630f(0x249),'createdAt':_0x388633[_0x47630f(0x318)],'finishedAt':_0x388633[_0x47630f(0x2e4)],'duration_ms':_0x352cd4},'tasks':_0x35aa98[_0x47630f(0x198)](_0x3453bd=>({'name':_0x3453bd[_0x47630f(0x2e0)],'state':_0x3453bd[_0x47630f(0x327)],'startedAt':_0x3453bd[_0x47630f(0x1ab)]?new Date(_0x3453bd[_0x47630f(0x1ab)]['start'])[_0x47630f(0x239)]():null,'updatedAt':_0x3453bd[_0x47630f(0x1ab)]?new Date(_0x3453bd[_0x47630f(0x1ab)][_0x47630f(0x23b)])[_0x47630f(0x239)]():null,'duration_ms':_0x3453bd[_0x47630f(0x1ab)]?.[_0x47630f(0x2f5)]||null})),'stats':_0x463b02};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x177c61,_0x6cbc1b){const _0x54649a=a43_0x14fe,_0x1fb3d6=_0x177c61();while(!![]){try{const _0x4a2c0e=-parseInt(_0x54649a(0x1a8))/0x1*(-parseInt(_0x54649a(0x1ac))/0x2)+-parseInt(_0x54649a(0x1b2))/0x3+-parseInt(_0x54649a(0x1a4))/0x4+parseInt(_0x54649a(0x1b4))/0x5*(-parseInt(_0x54649a(0x1b5))/0x6)+-parseInt(_0x54649a(0x1a6))/0x7*(-parseInt(_0x54649a(0x1b6))/0x8)+parseInt(_0x54649a(0x1ae))/0x9+-parseInt(_0x54649a(0x1b0))/0xa*(-parseInt(_0x54649a(0x1a5))/0xb);if(_0x4a2c0e===_0x6cbc1b)break;else _0x1fb3d6['push'](_0x1fb3d6['shift']());}catch(_0x341ecd){_0x1fb3d6['push'](_0x1fb3d6['shift']());}}}(a43_0x4c37,0x1df6d));function a43_0x14fe(_0x22b37e,_0x34ddc9){_0x22b37e=_0x22b37e-0x1a4;const _0x4c3729=a43_0x4c37();let _0x14fee4=_0x4c3729[_0x22b37e];return _0x14fee4;}import{platform}from'os';import{getAPIKey}from'./config.js';function a43_0x4c37(){const _0x4925bc=['48WmunMi','481016NOiNpr','265463cxJDpG','156254zNkXgs','replace','107767kbGpwo','version','Authorization','entries','4gjGFIC',';\x20node/','401382XHgwrr','length','40odAplu','TD1\x20','481140cvynuT','tdx','22955XsuQfl','114BIsmfI'];a43_0x4c37=function(){return _0x4925bc;};return a43_0x4c37();}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x4543be=a43_0x14fe,_0x3a467d=getVersion(),_0x133157=platform(),_0x5e7c20=process[_0x4543be(0x1a9)][_0x4543be(0x1a7)]('v','');return'tdx/'+_0x3a467d+'\x20('+_0x133157+_0x4543be(0x1ad)+_0x5e7c20+')';}export function getAuthHeaders(_0xc90671,_0x1c1491){const _0x5bc42b=a43_0x14fe,_0x405c4f=getVersion(),_0x2ec0fd={'User-Agent':getUserAgent(),'X-TD-Client':_0x5bc42b(0x1b3),'X-TD-Client-Version':_0x405c4f};return _0x1c1491&&(_0x2ec0fd['Authorization']=_0x5bc42b(0x1b1)+_0x1c1491),_0x2ec0fd;}export function toHeaderRecord(_0x24f03b){const _0x3307b8=a43_0x14fe,_0x519ea2={};for(const [_0x51d22a,_0x1a815a]of Object[_0x3307b8(0x1ab)](_0x24f03b)){_0x1a815a!==undefined&&(_0x519ea2[_0x51d22a]=_0x1a815a);}return _0x519ea2;}export function getTrinoHeaders(_0x3cb37b,_0x13c111){const _0x40e1ac=a43_0x14fe,_0xc9c5aa=getAuthHeaders(_0x3cb37b,_0x13c111),_0x1300c7=toHeaderRecord(_0xc9c5aa);return delete _0x1300c7[_0x40e1ac(0x1aa)],_0x13c111&&(_0x1300c7['X-Trino-User']=_0x13c111),_0x1300c7;}export function hasAPIKey(_0x268db8){const _0x114e87=a43_0x14fe,_0x365b4b=getAPIKey();return _0x365b4b!==undefined&&_0x365b4b[_0x114e87(0x1af)]>0x0;}
|