@treasuredata/tdx 0.27.3 → 0.28.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.d.ts.map +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-command.js.map +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/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.d.ts.map +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/schedule-command.js.map +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.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.d.ts +48 -0
- package/dist/sdk/agent/agent-config.d.ts.map +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-config.js.map +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.d.ts.map +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-validator.js.map +1 -1
- package/dist/sdk/engage/campaign-yaml.d.ts.map +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js.map +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.d.ts +2 -2
- package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js.map +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.d.ts.map +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/index.js.map +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.d.ts +6 -1
- package/dist/sdk/segment/fields-display.d.ts.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/fields-display.js.map +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/segment-def.d.ts +12 -3
- package/dist/sdk/segment/types/segment-def.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- 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/cdp.d.ts +22 -3
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/engage.d.ts +7 -3
- package/dist/sdk/types/engage.d.ts.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/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
|
-
function a44_0x61e2(){const _0x37280c=['Invalid\x20release\x20channel:\x20','includes','next','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Verifying\x20workspace\x20\x27','database','Session\x20database\x20set\x20to:\x20','llm_project','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','163053ULhEOk','log','\x27\x20to\x20save\x20permanently','2920iyTEyB','profile','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','resolveWorkspaceId','green','Session\x20parent_segment\x20set\x20to:\x20','Release\x20channel\x20set\x20to:\x20','stable','Session\x20engage_workspace\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','dim','2256KCjzxt','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','tdx','3621897YpMjEu','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Error:\x20','Session\x20llm_project\x20set\x20to:\x20','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','103427AdLWgB','execute','cleared','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','24kMgxeD','1380UfWPib','name','display','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','llm_agent','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','parent_segment','Session\x20context\x20','1166669tOfsco','Session\x20site\x20set\x20to:\x20','description','8bgyMqU','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','35684LwpQcC','engage','clear','session','default','Default\x20profile\x20set\x20to:\x20','displayWithSources','\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','site','release_channel','\x0aSaved\x20to:\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','(session:\x20','NOT_FOUND','Session\x20agent\x20set\x20to:\x20','error','engage_workspace','INVALID_ARGUMENT','3139530Chnrxx','code','debug','message','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','\x27\x20does\x20not\x20exist','tdx.json','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','Error:\x20Profile\x20\x27','\x27...','agent','Session\x20profile\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently'];a44_0x61e2=function(){return _0x37280c;};return a44_0x61e2();}const a44_0x491b04=a44_0x3d4b;(function(_0x219c1a,_0x482f42){const _0x475571=a44_0x3d4b,_0x3c6c97=_0x219c1a();while(!![]){try{const _0x13da08=parseInt(_0x475571(0x119))/0x1*(parseInt(_0x475571(0x129))/0x2)+parseInt(_0x475571(0x154))/0x3+parseInt(_0x475571(0x111))/0x4*(parseInt(_0x475571(0x11e))/0x5)+parseInt(_0x475571(0x13d))/0x6+-parseInt(_0x475571(0x126))/0x7*(-parseInt(_0x475571(0x11d))/0x8)+-parseInt(_0x475571(0x114))/0x9+parseInt(_0x475571(0x157))/0xa*(-parseInt(_0x475571(0x12b))/0xb);if(_0x13da08===_0x482f42)break;else _0x3c6c97['push'](_0x3c6c97['shift']());}catch(_0x3d7439){_0x3c6c97['push'](_0x3c6c97['shift']());}}}(a44_0x61e2,0x48952));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 a44_0x3d4b(_0x3b1937,_0x1d38af){_0x3b1937=_0x3b1937-0x10d;const _0x61e206=a44_0x61e2();let _0x3d4b36=_0x61e206[_0x3b1937];return _0x3d4b36;}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x20d4bd from'chalk';import*as a44_0x3365f8 from'node:path';export class UseCommand extends BaseCommand{[a44_0x491b04(0x11f)]='use';[a44_0x491b04(0x128)]='Set\x20session-level\x20context';['validate'](_0xb487d4){const _0x92f824=a44_0x491b04,{args:_0x21c656,options:_0x2e9c7a}=_0xb487d4,_0x3629f4=_0x2e9c7a[_0x92f824(0x12f)];if(_0x21c656['length']===0x0)return undefined;if(_0x21c656['length']===0x1)return _0x92f824(0x14e)+_0x92f824(0x132)+_0x92f824(0x115)+_0x92f824(0x10f)+_0x92f824(0x141)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a'+_0x92f824(0x121)+_0x92f824(0x153);const _0x411bef=_0x21c656[0x0],_0x4afe92=['site',_0x92f824(0x150),_0x92f824(0x124),'llm_project',_0x92f824(0x147),'profile',_0x92f824(0x13b),_0x92f824(0x134)];if(!_0x4afe92[_0x92f824(0x14c)](_0x411bef))return'Invalid\x20resource:\x20'+_0x411bef+'.\x20Must\x20be\x20one\x20of:\x20'+_0x4afe92['join'](',\x20');if(_0x3629f4&&_0x411bef!==_0x92f824(0x133)&&_0x411bef!==_0x92f824(0x158)&&_0x411bef!=='release_channel')return _0x92f824(0x159);if(_0x411bef===_0x92f824(0x134)&&!_0x3629f4)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x411bef===_0x92f824(0x134)){const _0x413974=_0x21c656[0x1];if(_0x413974!==_0x92f824(0x10d)&&_0x413974!==_0x92f824(0x14d))return _0x92f824(0x14b)+_0x413974+_0x92f824(0x123);}return undefined;}async[a44_0x491b04(0x11a)](_0x3647d6){const _0x992f93=a44_0x491b04,{args:_0x59fb39,options:_0x1964b7}=_0x3647d6,_0x169773=_0x1964b7[_0x992f93(0x13f)],_0x2fdbe7=_0x1964b7[_0x992f93(0x12d)],_0x3db529=_0x1964b7[_0x992f93(0x12f)];cleanExpiredSessions();try{if(_0x2fdbe7){clearSessionContext(_0x1964b7['session']);const _0x364882=getSessionID(_0x1964b7[_0x992f93(0x12e)]);return console['log'](_0x992f93(0x125)+a44_0x20d4bd[_0x992f93(0x15b)](_0x992f93(0x11b))+'\x20'+a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x137)+_0x364882+')')),0x0;}if(_0x59fb39['length']===0x0){const _0x322dd7=new GlobalContext(_0x1964b7);return _0x169773?_0x322dd7[_0x992f93(0x131)]():_0x322dd7[_0x992f93(0x120)](),console[_0x992f93(0x155)](a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x136))),console[_0x992f93(0x155)](a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x118))),console['log'](a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x14a))),0x0;}const _0x5152b3=_0x59fb39[0x0],_0x21f157=_0x59fb39[0x1],_0x498037=a44_0x3365f8['join'](getConfigDir(),_0x992f93(0x143));if(_0x3db529){if(_0x5152b3===_0x992f93(0x133))return saveDefaultSiteToUserConfig(_0x21f157),console['log']('Default\x20site\x20set\x20to:\x20'+a44_0x20d4bd[_0x992f93(0x15b)](_0x21f157)),console[_0x992f93(0x155)](a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x135)+_0x498037)),0x0;if(_0x5152b3===_0x992f93(0x158)){if(!profileExists(_0x21f157))return console[_0x992f93(0x13a)](_0x992f93(0x145)+_0x21f157+_0x992f93(0x142)),console[_0x992f93(0x13a)](_0x992f93(0x12a)),0x1;return saveActiveProfileToUserConfig(_0x21f157),console[_0x992f93(0x155)](_0x992f93(0x130)+a44_0x20d4bd['green'](_0x21f157)),console[_0x992f93(0x155)](a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x135)+_0x498037)),0x0;}if(_0x5152b3==='release_channel')return saveReleaseChannel(_0x21f157),console[_0x992f93(0x155)](_0x992f93(0x15d)+a44_0x20d4bd[_0x992f93(0x15b)](_0x21f157)),console['log'](a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x135)+_0x498037)),_0x21f157===_0x992f93(0x14d)?(console[_0x992f93(0x155)](a44_0x20d4bd['dim']('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x992f93(0x155)](a44_0x20d4bd[_0x992f93(0x110)]('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console['log'](a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x144))),0x0;}if(_0x5152b3===_0x992f93(0x133)){const _0x27887b=getSessionID(_0x1964b7[_0x992f93(0x12e)]);return saveSessionContext({'site':_0x21f157},_0x1964b7[_0x992f93(0x12e)]),console[_0x992f93(0x155)](_0x992f93(0x127)+a44_0x20d4bd[_0x992f93(0x15b)](_0x21f157)+'\x20'+a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x137)+_0x27887b+')')),console[_0x992f93(0x155)](a44_0x20d4bd['dim'](_0x992f93(0x112)+_0x21f157+_0x992f93(0x156))),0x0;}if(_0x5152b3==='profile'){if(!profileExists(_0x21f157))return console[_0x992f93(0x13a)]('Error:\x20Profile\x20\x27'+_0x21f157+'\x27\x20does\x20not\x20exist'),console[_0x992f93(0x13a)](_0x992f93(0x12a)),0x1;const _0x468413=getSessionID(_0x1964b7[_0x992f93(0x12e)]);return saveSessionContext({'profile':_0x21f157},_0x1964b7[_0x992f93(0x12e)]),console[_0x992f93(0x155)](_0x992f93(0x148)+a44_0x20d4bd['green'](_0x21f157)+'\x20'+a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x137)+_0x468413+')')),console[_0x992f93(0x155)](a44_0x20d4bd['dim'](_0x992f93(0x149)+_0x21f157+_0x992f93(0x156))),0x0;}const _0x434f15={},_0x4da581=getSessionID(_0x1964b7[_0x992f93(0x12e)]);switch(_0x5152b3){case _0x992f93(0x150):_0x434f15[_0x992f93(0x150)]=_0x21f157,console[_0x992f93(0x155)](_0x992f93(0x151)+a44_0x20d4bd[_0x992f93(0x15b)](_0x21f157)+'\x20'+a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x137)+_0x4da581+')'));break;case _0x992f93(0x124):_0x434f15[_0x992f93(0x124)]=_0x21f157,console[_0x992f93(0x155)](_0x992f93(0x15c)+a44_0x20d4bd[_0x992f93(0x15b)](_0x21f157)+'\x20'+a44_0x20d4bd[_0x992f93(0x110)]('(session:\x20'+_0x4da581+')'));break;case _0x992f93(0x152):_0x434f15['llm_project']=_0x21f157,console[_0x992f93(0x155)](_0x992f93(0x117)+a44_0x20d4bd[_0x992f93(0x15b)](_0x21f157)+'\x20'+a44_0x20d4bd['dim']('(session:\x20'+_0x4da581+')'));break;case _0x992f93(0x147):{const {projectName:_0x57af84,agentName:_0x219b1c}=parseAgentRef(_0x21f157);_0x219b1c?(_0x434f15['llm_project']=_0x57af84,_0x434f15[_0x992f93(0x122)]=_0x219b1c,console[_0x992f93(0x155)]('Session\x20llm_project\x20set\x20to:\x20'+a44_0x20d4bd[_0x992f93(0x15b)](_0x57af84)+'\x20'+a44_0x20d4bd[_0x992f93(0x110)]('(session:\x20'+_0x4da581+')')),console[_0x992f93(0x155)](_0x992f93(0x139)+a44_0x20d4bd[_0x992f93(0x15b)](_0x219b1c)+'\x20'+a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x137)+_0x4da581+')'))):(_0x434f15['llm_agent']=_0x21f157,console['log'](_0x992f93(0x139)+a44_0x20d4bd[_0x992f93(0x15b)](_0x21f157)+'\x20'+a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x137)+_0x4da581+')')));break;}case _0x992f93(0x13b):{try{await withSpinner(_0x992f93(0x14f)+_0x21f157+_0x992f93(0x146),()=>_0x3647d6[_0x992f93(0x113)][_0x992f93(0x12c)][_0x992f93(0x15a)](_0x21f157));}catch(_0x462b6c){if(_0x462b6c instanceof SDKError&&(_0x462b6c[_0x992f93(0x13e)]===ErrorCode[_0x992f93(0x138)]||_0x462b6c['code']===ErrorCode[_0x992f93(0x13c)]))return console[_0x992f93(0x13a)](_0x992f93(0x116)+_0x462b6c[_0x992f93(0x140)]),console[_0x992f93(0x13a)]('\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces'),0x1;throw _0x462b6c;}_0x434f15[_0x992f93(0x13b)]=_0x21f157,console['log'](_0x992f93(0x10e)+a44_0x20d4bd[_0x992f93(0x15b)](_0x21f157)+'\x20'+a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x137)+_0x4da581+')'));break;}}return saveSessionContext(_0x434f15,_0x1964b7['session']),console[_0x992f93(0x155)](a44_0x20d4bd[_0x992f93(0x110)](_0x992f93(0x11c))),0x0;}catch(_0x4d0517){return _0x4d0517 instanceof Error&&console['error'](_0x992f93(0x116)+_0x4d0517[_0x992f93(0x140)]),0x1;}}}
|
|
1
|
+
const a44_0x5f1319=a44_0x19cd;(function(_0xaf36a4,_0x9d5a46){const _0xeab1a8=a44_0x19cd,_0x34445c=_0xaf36a4();while(!![]){try{const _0x410d2e=parseInt(_0xeab1a8(0xe9))/0x1*(parseInt(_0xeab1a8(0xdf))/0x2)+parseInt(_0xeab1a8(0x100))/0x3+-parseInt(_0xeab1a8(0xfa))/0x4+parseInt(_0xeab1a8(0x10e))/0x5*(parseInt(_0xeab1a8(0xf8))/0x6)+-parseInt(_0xeab1a8(0x105))/0x7*(parseInt(_0xeab1a8(0xd4))/0x8)+parseInt(_0xeab1a8(0x119))/0x9*(parseInt(_0xeab1a8(0x108))/0xa)+parseInt(_0xeab1a8(0x121))/0xb*(-parseInt(_0xeab1a8(0x10b))/0xc);if(_0x410d2e===_0x9d5a46)break;else _0x34445c['push'](_0x34445c['shift']());}catch(_0x535d3a){_0x34445c['push'](_0x34445c['shift']());}}}(a44_0x383f,0x24e9a));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';function a44_0x383f(){const _0x429443=['30678kIovTO','release_channel','579836FJohdC','engage_workspace','(session:\x20','includes','\x27\x20to\x20save\x20permanently','green','236178TOYlga','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','\x0aSaved\x20to:\x20','INVALID_ARGUMENT','Verifying\x20workspace\x20\x27','49581QiJSke','Release\x20channel\x20set\x20to:\x20','displayWithSources','2015910Btjjai','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','parent_segment','204cNSSjg','Session\x20profile\x20set\x20to:\x20','use','35pDTNVY','length','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Error:\x20Profile\x20\x27','Error:\x20','clear','agent','\x27\x20does\x20not\x20exist','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','9yEeWAs','tdx','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','log','llm_project','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','NOT_FOUND','40942fnLvPr','Session\x20agent\x20set\x20to:\x20','next','display','184KrkSlW','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','Invalid\x20release\x20channel:\x20','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','Session\x20context\x20','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Default\x20profile\x20set\x20to:\x20','\x27...','site','86RYTUwR','code','resolveWorkspaceId','profile','engage','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','error','join','4796RYTWGl','Invalid\x20resource:\x20','database','Session\x20database\x20set\x20to:\x20','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','session','Default\x20site\x20set\x20to:\x20','Session\x20llm_project\x20set\x20to:\x20','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','message','dim','Session\x20parent_segment\x20set\x20to:\x20','validate','tdx.json','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'];a44_0x383f=function(){return _0x429443;};return a44_0x383f();}import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';function a44_0x19cd(_0x3f2763,_0x27ccad){_0x3f2763=_0x3f2763-0xd1;const _0x383f37=a44_0x383f();let _0x19cd80=_0x383f37[_0x3f2763];return _0x19cd80;}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a44_0x2546f2 from'chalk';import*as a44_0x2ac267 from'node:path';export class UseCommand extends BaseCommand{['name']=a44_0x5f1319(0x10d);[a44_0x5f1319(0x11e)]='Set\x20session-level\x20context';[a44_0x5f1319(0xf5)](_0x2d97af){const _0x480c2d=a44_0x5f1319,{args:_0x1dd6f1,options:_0x3347a0}=_0x2d97af,_0x584fd1=_0x3347a0['default'];if(_0x1dd6f1['length']===0x0)return undefined;if(_0x1dd6f1[_0x480c2d(0x10f)]===0x1)return _0x480c2d(0xf7)+'\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'+_0x480c2d(0x11f)+_0x480c2d(0xe4)+_0x480c2d(0x111)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a'+_0x480c2d(0xd9)+_0x480c2d(0xed);const _0x3e591f=_0x1dd6f1[0x0],_0x5a6c6f=[_0x480c2d(0xde),_0x480c2d(0xeb),'parent_segment',_0x480c2d(0x11d),_0x480c2d(0x116),_0x480c2d(0xe2),_0x480c2d(0xfb),'release_channel'];if(!_0x5a6c6f[_0x480c2d(0xfd)](_0x3e591f))return _0x480c2d(0xea)+_0x3e591f+'.\x20Must\x20be\x20one\x20of:\x20'+_0x5a6c6f[_0x480c2d(0xe8)](',\x20');if(_0x584fd1&&_0x3e591f!==_0x480c2d(0xde)&&_0x3e591f!==_0x480c2d(0xe2)&&_0x3e591f!=='release_channel')return _0x480c2d(0xe5);if(_0x3e591f===_0x480c2d(0xf9)&&!_0x584fd1)return _0x480c2d(0x101);if(_0x3e591f==='release_channel'){const _0x49d266=_0x1dd6f1[0x1];if(_0x49d266!=='stable'&&_0x49d266!==_0x480c2d(0xd2))return _0x480c2d(0xd7)+_0x49d266+_0x480c2d(0x109);}return undefined;}async['execute'](_0x2ccc53){const _0xead35d=a44_0x5f1319,{args:_0xcae355,options:_0x36c35d}=_0x2ccc53,_0x359684=_0x36c35d['debug'],_0x55e289=_0x36c35d[_0xead35d(0x115)],_0x5bbea2=_0x36c35d['default'];cleanExpiredSessions();try{if(_0x55e289){clearSessionContext(_0x36c35d[_0xead35d(0xee)]);const _0x935aea=getSessionID(_0x36c35d[_0xead35d(0xee)]);return console['log'](_0xead35d(0xda)+a44_0x2546f2[_0xead35d(0xff)]('cleared')+'\x20'+a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0xfc)+_0x935aea+')')),0x0;}if(_0xcae355[_0xead35d(0x10f)]===0x0){const _0x23dd21=new GlobalContext(_0x36c35d);return _0x359684?_0x23dd21[_0xead35d(0x107)]():_0x23dd21[_0xead35d(0xd3)](),console[_0xead35d(0x11c)](a44_0x2546f2[_0xead35d(0xf3)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0xead35d(0x11c)](a44_0x2546f2['dim'](_0xead35d(0xf1))),console[_0xead35d(0x11c)](a44_0x2546f2['dim'](_0xead35d(0xd6))),0x0;}const _0x3e9930=_0xcae355[0x0],_0x1f4f9c=_0xcae355[0x1],_0x5515ba=a44_0x2ac267['join'](getConfigDir(),_0xead35d(0xf6));if(_0x5bbea2){if(_0x3e9930===_0xead35d(0xde))return saveDefaultSiteToUserConfig(_0x1f4f9c),console[_0xead35d(0x11c)](_0xead35d(0xef)+a44_0x2546f2['green'](_0x1f4f9c)),console[_0xead35d(0x11c)](a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0x102)+_0x5515ba)),0x0;if(_0x3e9930===_0xead35d(0xe2)){if(!profileExists(_0x1f4f9c))return console[_0xead35d(0xe7)](_0xead35d(0x113)+_0x1f4f9c+_0xead35d(0x117)),console[_0xead35d(0xe7)](_0xead35d(0x110)),0x1;return saveActiveProfileToUserConfig(_0x1f4f9c),console['log'](_0xead35d(0xdc)+a44_0x2546f2['green'](_0x1f4f9c)),console[_0xead35d(0x11c)](a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0x102)+_0x5515ba)),0x0;}if(_0x3e9930===_0xead35d(0xf9))return saveReleaseChannel(_0x1f4f9c),console[_0xead35d(0x11c)](_0xead35d(0x106)+a44_0x2546f2['green'](_0x1f4f9c)),console[_0xead35d(0x11c)](a44_0x2546f2['dim'](_0xead35d(0x102)+_0x5515ba)),_0x1f4f9c===_0xead35d(0xd2)?(console['log'](a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0xd8))),console[_0xead35d(0x11c)](a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0x118)))):console[_0xead35d(0x11c)](a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0x11b))),0x0;}if(_0x3e9930===_0xead35d(0xde)){const _0x4f9215=getSessionID(_0x36c35d['session']);return saveSessionContext({'site':_0x1f4f9c},_0x36c35d[_0xead35d(0xee)]),console[_0xead35d(0x11c)]('Session\x20site\x20set\x20to:\x20'+a44_0x2546f2['green'](_0x1f4f9c)+'\x20'+a44_0x2546f2['dim'](_0xead35d(0xfc)+_0x4f9215+')')),console[_0xead35d(0x11c)](a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0xe6)+_0x1f4f9c+_0xead35d(0xfe))),0x0;}if(_0x3e9930==='profile'){if(!profileExists(_0x1f4f9c))return console[_0xead35d(0xe7)](_0xead35d(0x113)+_0x1f4f9c+'\x27\x20does\x20not\x20exist'),console[_0xead35d(0xe7)](_0xead35d(0x110)),0x1;const _0x2cabe4=getSessionID(_0x36c35d[_0xead35d(0xee)]);return saveSessionContext({'profile':_0x1f4f9c},_0x36c35d[_0xead35d(0xee)]),console[_0xead35d(0x11c)](_0xead35d(0x10c)+a44_0x2546f2[_0xead35d(0xff)](_0x1f4f9c)+'\x20'+a44_0x2546f2[_0xead35d(0xf3)]('(session:\x20'+_0x2cabe4+')')),console['log'](a44_0x2546f2['dim'](_0xead35d(0xd5)+_0x1f4f9c+_0xead35d(0xfe))),0x0;}const _0x358240={},_0x431de6=getSessionID(_0x36c35d[_0xead35d(0xee)]);switch(_0x3e9930){case'database':_0x358240[_0xead35d(0xeb)]=_0x1f4f9c,console[_0xead35d(0x11c)](_0xead35d(0xec)+a44_0x2546f2[_0xead35d(0xff)](_0x1f4f9c)+'\x20'+a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0xfc)+_0x431de6+')'));break;case'parent_segment':_0x358240[_0xead35d(0x10a)]=_0x1f4f9c,console['log'](_0xead35d(0xf4)+a44_0x2546f2[_0xead35d(0xff)](_0x1f4f9c)+'\x20'+a44_0x2546f2[_0xead35d(0xf3)]('(session:\x20'+_0x431de6+')'));break;case _0xead35d(0x11d):_0x358240[_0xead35d(0x11d)]=_0x1f4f9c,console[_0xead35d(0x11c)](_0xead35d(0xf0)+a44_0x2546f2[_0xead35d(0xff)](_0x1f4f9c)+'\x20'+a44_0x2546f2['dim'](_0xead35d(0xfc)+_0x431de6+')'));break;case'agent':{const {projectName:_0x45670c,agentName:_0x4eeec3}=parseAgentRef(_0x1f4f9c);_0x4eeec3?(_0x358240[_0xead35d(0x11d)]=_0x45670c,_0x358240['llm_agent']=_0x4eeec3,console['log']('Session\x20llm_project\x20set\x20to:\x20'+a44_0x2546f2['green'](_0x45670c)+'\x20'+a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0xfc)+_0x431de6+')')),console[_0xead35d(0x11c)](_0xead35d(0xd1)+a44_0x2546f2[_0xead35d(0xff)](_0x4eeec3)+'\x20'+a44_0x2546f2['dim'](_0xead35d(0xfc)+_0x431de6+')'))):(_0x358240['llm_agent']=_0x1f4f9c,console[_0xead35d(0x11c)](_0xead35d(0xd1)+a44_0x2546f2['green'](_0x1f4f9c)+'\x20'+a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0xfc)+_0x431de6+')')));break;}case'engage_workspace':{try{await withSpinner(_0xead35d(0x104)+_0x1f4f9c+_0xead35d(0xdd),()=>_0x2ccc53[_0xead35d(0x11a)][_0xead35d(0xe3)][_0xead35d(0xe1)](_0x1f4f9c));}catch(_0x57681d){if(_0x57681d instanceof SDKError&&(_0x57681d['code']===ErrorCode[_0xead35d(0x120)]||_0x57681d[_0xead35d(0xe0)]===ErrorCode[_0xead35d(0x103)]))return console[_0xead35d(0xe7)](_0xead35d(0x114)+_0x57681d[_0xead35d(0xf2)]),console[_0xead35d(0xe7)](_0xead35d(0xdb)),0x1;throw _0x57681d;}_0x358240[_0xead35d(0xfb)]=_0x1f4f9c,console[_0xead35d(0x11c)]('Session\x20engage_workspace\x20set\x20to:\x20'+a44_0x2546f2[_0xead35d(0xff)](_0x1f4f9c)+'\x20'+a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0xfc)+_0x431de6+')'));break;}}return saveSessionContext(_0x358240,_0x36c35d[_0xead35d(0xee)]),console[_0xead35d(0x11c)](a44_0x2546f2[_0xead35d(0xf3)](_0xead35d(0x112))),0x0;}catch(_0xa982c0){return _0xa982c0 instanceof Error&&console[_0xead35d(0xe7)]('Error:\x20'+_0xa982c0[_0xead35d(0xf2)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x534e79=a45_0x47b4;(function(_0x1c2f49,_0x5ceb30){const _0x2f628a=a45_0x47b4,_0x2d6110=_0x1c2f49();while(!![]){try{const _0x430524=-parseInt(_0x2f628a(0xa0))/0x1*(parseInt(_0x2f628a(0x91))/0x2)+parseInt(_0x2f628a(0x93))/0x3*(-parseInt(_0x2f628a(0x8e))/0x4)+-parseInt(_0x2f628a(0xa3))/0x5+-parseInt(_0x2f628a(0x99))/0x6*(-parseInt(_0x2f628a(0xa8))/0x7)+parseInt(_0x2f628a(0x9a))/0x8*(parseInt(_0x2f628a(0xa2))/0x9)+parseInt(_0x2f628a(0x9b))/0xa*(-parseInt(_0x2f628a(0x98))/0xb)+-parseInt(_0x2f628a(0x96))/0xc*(-parseInt(_0x2f628a(0xa1))/0xd);if(_0x430524===_0x5ceb30)break;else _0x2d6110['push'](_0x2d6110['shift']());}catch(_0x490eda){_0x2d6110['push'](_0x2d6110['shift']());}}}(a45_0x945f,0x4f39d));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a45_0x47b4(_0x484745,_0x46514e){_0x484745=_0x484745-0x8d;const _0x945f9b=a45_0x945f();let _0x47b4b6=_0x945f9b[_0x484745];return _0x47b4b6;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a45_0x945f(){const _0x35d5e0=['90480hGkgto','user\x20list','error','message','Show\x20current\x20user\x20information','214298HKiflt','verbose','name','Fetching\x20user\x20info...','\x20\x20Cause:\x20','292krXaYx','length','\x20user','533686FNxRQF','List\x20all\x20users\x20in\x20the\x20account','12141SFJcGF','user','description','48gspJTk','✔\x20Found\x20','77mDkqsS','108bgiixF','113736AyCOPv','477980DeKsgG','execute','cause','list','Listing\x20users...','1mjJTPS','712569yKEUVe','297QNbUhW'];a45_0x945f=function(){return _0x35d5e0;};return a45_0x945f();}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a45_0x534e79(0xaa)]=a45_0x534e79(0x94);[a45_0x534e79(0x95)]=a45_0x534e79(0xa7);async[a45_0x534e79(0x9c)](_0x586c71){const _0x3b0ef8=a45_0x534e79,{options:_0x450a46,tdx:_0x1aa357}=_0x586c71;try{const _0x1a7266=await withSpinner(_0x3b0ef8(0xab),()=>_0x1aa357[_0x3b0ef8(0x94)]['getCurrent'](),{'verbose':_0x450a46[_0x3b0ef8(0xa9)]}),_0x304f20=_0x1a7266['data'];return await handleSingleObjectOutput(_0x304f20,_0x450a46),0x0;}catch(_0x4eae2d){if(_0x4eae2d instanceof SDKError)return console[_0x3b0ef8(0xa5)]('Error:\x20'+_0x4eae2d[_0x3b0ef8(0xa6)]),_0x4eae2d[_0x3b0ef8(0x9d)]&&console[_0x3b0ef8(0xa5)](_0x3b0ef8(0x8d)+_0x4eae2d[_0x3b0ef8(0x9d)]),0x1;throw _0x4eae2d;}}}export class UserListCommand extends BaseCommand{[a45_0x534e79(0xaa)]=a45_0x534e79(0xa4);[a45_0x534e79(0x95)]=a45_0x534e79(0x92);async[a45_0x534e79(0x9c)](_0x4f1fe8){const _0x3f4db6=a45_0x534e79,{options:_0x4f06fd,tdx:_0x2507b6}=_0x4f1fe8;try{const _0x3ef362=await withSpinner(_0x3f4db6(0x9f),()=>_0x2507b6[_0x3f4db6(0x94)][_0x3f4db6(0x9e)](),{'verbose':_0x4f06fd[_0x3f4db6(0xa9)]}),_0x27a0ae=_0x3ef362['data'];return console[_0x3f4db6(0xa5)](_0x3f4db6(0x97)+_0x27a0ae[_0x3f4db6(0x8f)]+_0x3f4db6(0x90)+(_0x27a0ae[_0x3f4db6(0x8f)]!==0x1?'s':'')),await handleSDKOutput(_0x27a0ae,_0x4f06fd),0x0;}catch(_0x43dd60){if(_0x43dd60 instanceof SDKError)return console[_0x3f4db6(0xa5)]('Error:\x20'+_0x43dd60[_0x3f4db6(0xa6)]),_0x43dd60['cause']&&console[_0x3f4db6(0xa5)](_0x3f4db6(0x8d)+_0x43dd60[_0x3f4db6(0x9d)]),0x1;throw _0x43dd60;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x45121c=a46_0x1beb;(function(_0x29b3b8,_0x339cbd){const _0x3fb822=a46_0x1beb,_0x334e4a=_0x29b3b8();while(!![]){try{const _0x252c43=-parseInt(_0x3fb822(0x304))/0x1*(-parseInt(_0x3fb822(0x29d))/0x2)+-parseInt(_0x3fb822(0x24d))/0x3*(-parseInt(_0x3fb822(0x1b4))/0x4)+-parseInt(_0x3fb822(0x2d8))/0x5*(parseInt(_0x3fb822(0x20f))/0x6)+-parseInt(_0x3fb822(0x2f2))/0x7*(-parseInt(_0x3fb822(0x238))/0x8)+parseInt(_0x3fb822(0x2d5))/0x9*(parseInt(_0x3fb822(0x313))/0xa)+parseInt(_0x3fb822(0x2b6))/0xb*(-parseInt(_0x3fb822(0x1ce))/0xc)+parseInt(_0x3fb822(0x2ad))/0xd*(-parseInt(_0x3fb822(0x2fd))/0xe);if(_0x252c43===_0x339cbd)break;else _0x334e4a['push'](_0x334e4a['shift']());}catch(_0x1ca9c6){_0x334e4a['push'](_0x334e4a['shift']());}}}(a46_0x43f5,0x6b2e8));import a46_0x303d4a from'chalk';import{existsSync}from'fs';import a46_0x2e56ba 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 a46_0x39082f from'prompts';function getAttemptStatusDisplay(_0x352d44){const _0x5d2b93=a46_0x1beb;if(!_0x352d44)return{'icon':'⏳','text':''};const {done:_0xc24710,success:_0x3f1be8,cancelRequested:_0x5a98ea}=_0x352d44;if(!_0xc24710)return _0x5a98ea?{'icon':'🛑','text':a46_0x303d4a[_0x5d2b93(0x1b0)](_0x5d2b93(0x330))}:{'icon':'🔄','text':a46_0x303d4a['blue']('running')};if(_0x3f1be8)return{'icon':'✅','text':a46_0x303d4a[_0x5d2b93(0x2f9)]('success')};return{'icon':'❌','text':a46_0x303d4a[_0x5d2b93(0x2ef)](_0x5d2b93(0x1a6))};}export class WorkflowBaseCommand extends BaseCommand{[a46_0x45121c(0x1ea)](_0x44cd64,_0x273fe0,_0x466d33=0x0){const _0x2b3c2d=a46_0x45121c;return _0x44cd64[_0x466d33]||_0x273fe0[_0x2b3c2d(0x322)];}[a46_0x45121c(0x27b)](_0x521ef6,_0x3f555f,_0x1d615d=0x0){const _0x53bfe9=a46_0x45121c,_0x13bc91=this[_0x53bfe9(0x1ea)](_0x521ef6,_0x3f555f,_0x1d615d);if(!_0x13bc91)return console[_0x53bfe9(0x1a6)](a46_0x303d4a[_0x53bfe9(0x2ef)]('Error:'),_0x53bfe9(0x2f6)),console[_0x53bfe9(0x1a6)](a46_0x303d4a['dim'](_0x53bfe9(0x340))),null;return _0x13bc91;}[a46_0x45121c(0x297)](_0x42b358,_0x4d018d){const _0x41b58c=a46_0x45121c;if(_0x42b358[0x0]){const _0x1509f7=_0x42b358[0x0]['split']('.');if(_0x1509f7['length']===0x1)return{'projectName':_0x1509f7[0x0],'workflowName':undefined};else return _0x1509f7[_0x41b58c(0x1e6)]===0x2?{'projectName':_0x1509f7[0x0],'workflowName':_0x1509f7[0x1]}:(console['error'](a46_0x303d4a[_0x41b58c(0x2ef)](_0x41b58c(0x295)),_0x41b58c(0x2aa)),null);}return{'projectName':_0x4d018d[_0x41b58c(0x322)],'workflowName':undefined};}[a46_0x45121c(0x331)](_0x2111cc,_0x29c05d,_0x34a85a=0x0){const _0x5e1f7d=a46_0x45121c;if(_0x2111cc[_0x34a85a])return _0x2111cc[_0x34a85a];if(_0x29c05d[_0x5e1f7d(0x322)]){const _0x4a211e=a46_0x2e56ba['join'](process[_0x5e1f7d(0x1a9)](),_0x5e1f7d(0x2b4),_0x29c05d['workflowProject']);if(existsSync(a46_0x2e56ba[_0x5e1f7d(0x1f7)](_0x4a211e,_0x5e1f7d(0x339))))return _0x4a211e;}return undefined;}async[a46_0x45121c(0x2c1)](_0x460803,_0x5404e0,_0x324272){const _0x36b516=a46_0x45121c;try{const _0x5da489=await _0x460803[_0x36b516(0x228)]['workflows'](_0x5404e0,{'limit':0x1});if(_0x5da489[_0x36b516(0x1e6)]>0x0){const _0x1b2f9e=_0x5da489[0x0]['id'],_0x1ec8cc=getWorkflowUrl(_0x324272,_0x1b2f9e);console[_0x36b516(0x1a6)](_0x36b516(0x341)+a46_0x303d4a['cyan'](_0x1ec8cc));}}catch{}}}function a46_0x43f5(){const _0x10e426=['Cloning\x20to\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','workflow:attempt','\x20deleted','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x20project','Error:','push','parseProjectWorkflowPattern','hasChanges','cyan','\x1b[1A\x1b[2K','MAX_TASKS_DISPLAY','workflowName','86JDhjJG','workflow:push','path','workflow:secrets:delete','No\x20sessions\x20found\x20in\x20project:\x20','retryAttempt','No\x20matching\x20sessions\x20found','sort','Attempt\x20ID:\x20','text','session','workflow:secrets:list','Fetching\x20log\x20files...','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Source:\x20','27053CpsOlA','workflow:use','stat','group_error','site','✔\x20Downloaded\x20','Loading\x20workflows...','workflows','fileSize','37257gPtQiS','summary','Pull\x20workflow\x20project\x20to\x20local\x20folder','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','status','getFullYear','Downloading\x20project\x20','filter','New\x20project\x20name:\x20','\x20modified','running','showWorkflowConsoleUrl','end','✔\x20Workflow\x20project\x20context\x20cleared.','planned','\x0a✔\x20Already\x20up\x20to\x20date','\x20secret','reason','Resolving\x20project\x20\x27','workflow:clone','getTime','\x20workflow','generateSessionTimelineRows','Error:\x20Attempt\x20ID\x20is\x20required','Getting\x20attempt\x20tasks...','Invalid\x20format:\x20','LABEL_MIN_SPACING','Usage:\x20workflow:delete\x20<project-name-or-id>','tasks','title','\x20sessions\x20','891KUYtWf','session:','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','33645IvAipF','execute','dim','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','✔\x20Secret\x20\x27','updatedAt','Workflow:\x20','Parameters:\x20','targetDir','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','total','\x20\x20Source:\x20','-\x20no\x20files\x20written','success','Expected\x20format:\x20--param\x20key=value','Including\x20subtasks:\x20yes','applyPullProject','Output\x20directory:\x20','now','yes','workflow:retry','Retry\x20a\x20session\x20or\x20attempt','includeSubtasks','red','Kill\x20a\x20running\x20attempt','limit','7rFPYQn','\x20-\x20','columns','GUTTER','Project\x20name\x20is\x20required','get','key','green','Error:\x20Project\x20name\x20is\x20required','new','listSecrets','5362OVGedO','buildTimelineData','workflow:download','Target:\x20','\x20\x20Session\x20context\x20set\x20to:\x20','Failed\x20to\x20fetch\x20attempt\x20data','workflow:tasks','17003qVdREk','Retrying\x20session...','Source\x20project:\x20','Status:\x20','MIN_TIMELINE_WIDTH','slice','Deleting\x20secret...','changes','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','projects','retryAttemptName','\x20\x20Session\x20ID:\x20','\x20\x20Project\x20ID:\x20','displayLine','\x20has\x20no\x20attempts','62100UughbA','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','resolve','delete','keys','projectId','\x0aError:','sourceProjectName','navigateSessionsInteractive','attempts','verbose','substring','Select\x20a\x20session\x20to\x20view\x20timeline:','has','fullName','workflowProject','\x20\x20Changes:\x20','projectName','stdout','workflow:workflows','sessions','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','includes','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','attempt','run','Target\x20directory:\x20','Filter:\x20','canceling','resolveProjectDir','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','basename','Warning:','Select\x20a\x20workflow\x20to\x20run','msPerChar','Deleting\x20project\x20','\x0aPolling...\x20(','tdx.json','📁\x20','No\x20workflows\x20found\x20in\x20project:\x20','getDate','fileCount','\x22\x20with\x20new\x20revision?','📋\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Console:\x20','✔\x20Pull\x20complete','dryRun','Listing\x20workflows...','Key\x20cannot\x20be\x20empty','padStart','✔\x20Project:\x20','unchanged','Project\x20name:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','No\x20sessions\x20with\x20timing\x20information','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Revision:\x20','split','Listing\x20workflow\x20sessions...','executePushProject','task','✔\x20Found\x20','attemptId','parse','force','Filter:\x20project=','json','error','POLL_INTERVAL_MS','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','cwd','diff','renderSingleTimeline','\x27...','start','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','startsWith','yellow','---\x20','\x20logs','Writing\x20files...','3916CEgPoJ','\x20of\x20','workflow:upload','state','min','ICON_WIDTH','pending','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','renderTimeline','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','deleteSecret','Latest\x20session\x20has\x20no\x20attempt','skipValidation','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Error:\x20KEY=VALUE\x20is\x20required','createdAt','Project:\x20','Using\x20attempt\x20','setSecret','blue','workflow:kill','cancelRequested','\x0a⚠\x20Project\x20\x22','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','sessionTime','Show\x20logs\x20for\x20a\x20workflow\x20attempt','2292AMivAu','TASK_NAME_WIDTH','jsonl','format','Source\x20directory:\x20','window','Getting\x20attempt\x20details...','set','MAX_LABEL_COUNT','Resume\x20from:\x20','/app/workflows/','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','workflow:attempts','workflow:run','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','type','session_id','lastAttempt','log','No\x20projects\x20match\x20pattern:\x20','\x20\x20New\x20attempt\x20ID:\x20','getHours','message','\x27\x20from\x20project\x20\x27','length','✔\x20Push\x20complete','list','modified','resolveProject','Error:\x20','localeCompare','\x0aClone\x20\x22','Attempt:\x20','retrySession','Error:\x20Secret\x20key\x20is\x20required','follow','output','-\x20nothing\x20pushed','duration','relative','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','join','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','toISOString','✔\x20Project\x20updated','No\x20sessions\x20found','write','tdx\x20wf\x20attempt\x20','executeCloneProject','workflow:sessions','existingProjectId','Error:\x20Invalid\x20JSON\x20in\x20--params','\x0a✔\x20No\x20changes\x20to\x20push','\x0aUpdate\x20existing\x20project\x20\x22','Killing\x20attempt...','\x20(system)','From\x20task:\x20','pollTimeline','stringify','workflow:timeline','splice','name','\x20task','newProjectName','getMonth','462Kockhv','match','resolveProjectId','renderSessionsTimeline','Show\x20specific\x20attempt\x20details','workflow:secrets:set','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','isTTY','finishedAt','round','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20new','Dry\x20run:\x20yes','metadata','(unknown)','No\x20workflow\x20tdx.json\x20found','unknown','Start\x20a\x20workflow\x20run','icon','floor','→\x20Project:\x20','prepareCloneProject','\x20(use\x20--limit\x20to\x20show\x20more)','all','revision','workflow','filesExtracted','...','readFile','find','deleted','index','Listing\x20workflow\x20attempts...','Project\x20filter:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','/attempt/','Listing\x20workflow\x20projects...','MAX_TIMELINE_WIDTH','✔\x20Pushed\x20','trimEnd','MAX_POLL_ITERATIONS','3092104kPsRUM','targetExists','max','Analyzing\x20changes...','\x20unchanged','Cancelled','\x20session','\x20attempt','\x22?\x20This\x20cannot\x20be\x20undone.','Validation:\x20skipped','fill','toLowerCase','select','Loading\x20session...','No\x20workflows\x20found','✔\x20Deleted\x20project\x20','clear','sourceDir','No\x20workflow\x20sessions\x20found','repeat','✔\x20Workflow\x20run\x20started','2049fTjWev','every','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','table','\x22\x20already\x20exists\x20(ID:\x20','kill','\x20\x20Location:\x20','Params:\x20','Pattern:\x20','No\x20attempts\x20found\x20in\x20project:\x20','download','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','\x20from\x20session\x20','Auto-selected\x20latest\x20session:\x20','Updating\x20','size','Include\x20retried:\x20yes','Show\x20tasks\x20for\x20an\x20attempt','List\x20workflow\x20execution\x20sessions','data','autocomplete','(use\x20--limit\x20to\x20see\x20more)','Error:\x20Invalid\x20parameter\x20format:\x20','No\x20sessions\x20found\x20for:\x20','\x20\x20Project:\x20','startedAt','Key:\x20','sessionId','description','params','done','Downloading\x20logs...','durationMs','logs','✔\x20Workflow\x20project\x20set\x20to:\x20','Session\x20time:\x20','project','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','startTime','Usage:\x20tdx\x20wf\x20use\x20<project>','getMinutes','\x20\x20Files\x20extracted:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','→\x20New\x20project:\x20','Files\x20to\x20upload:\x20','requireProject','\x20\x20Revision:\x20','\x20\x20tdx\x20wf\x20use\x20<project>','Reason:\x20','Session\x20','\x0aPush\x20these\x20changes?','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','attempt:','isDirectory','\x20\x20Attempt\x20ID:\x20','param','✔\x20Retry\x20started','map','Force:\x20yes','indexOf','ICON_SPACING','newProjectId','rows','💡\x20Tip:\x20Use\x20','pullProject'];a46_0x43f5=function(){return _0x10e426;};return a46_0x43f5();}export class WorkflowUseCommand extends BaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x2ae);['description']='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a46_0x45121c(0x2d9)](_0x25db12){const _0x24f5ee=a46_0x45121c,{options:_0xa0dc75,args:_0x29ff02,tdx:_0x48366f}=_0x25db12,_0x5e6821=_0x29ff02[0x0],_0x52db11=_0xa0dc75[_0x24f5ee(0x248)];if(_0x52db11)return saveSessionContext({'workflow_project':undefined},_0xa0dc75[_0x24f5ee(0x2a7)]),console[_0x24f5ee(0x1e0)](a46_0x303d4a['green'](_0x24f5ee(0x2c3))),0x0;if(!_0x5e6821)return console['error'](a46_0x303d4a['red']('Error:'),_0x24f5ee(0x2f6)),console[_0x24f5ee(0x1a6)](a46_0x303d4a[_0x24f5ee(0x2da)](_0x24f5ee(0x275))),console[_0x24f5ee(0x1a6)](a46_0x303d4a['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x276c12=await withSpinner(_0x24f5ee(0x2c8)+_0x5e6821+_0x24f5ee(0x1ac),()=>_0x48366f[_0x24f5ee(0x228)][_0x24f5ee(0x211)](_0x5e6821),{'verbose':_0xa0dc75[_0x24f5ee(0x31d)]}),{name:_0x56b812}=_0x276c12[_0x24f5ee(0x261)];return saveSessionContext({'workflow_project':_0x56b812},_0xa0dc75[_0x24f5ee(0x2a7)]),console['log'](a46_0x303d4a['green'](_0x24f5ee(0x270)+a46_0x303d4a['cyan'](_0x56b812))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a46_0x45121c(0x20b)]='workflow:projects';[a46_0x45121c(0x26a)]='List\x20all\x20workflow\x20projects';async[a46_0x45121c(0x2d9)](_0x29b535){const _0x47f177=a46_0x45121c,{options:_0x4c4530,args:_0x3b5a55,tdx:_0x1da27b}=_0x29b535,_0x5f3ffa=_0x3b5a55[0x0];_0x4c4530['verbose']&&_0x5f3ffa&&console['error'](_0x47f177(0x256)+_0x5f3ffa);const _0x1423a8=await withSpinner(_0x47f177(0x233),()=>_0x1da27b[_0x47f177(0x228)][_0x47f177(0x30d)](_0x5f3ffa,{'limit':_0x4c4530[_0x47f177(0x2f1)]}),{'verbose':_0x4c4530[_0x47f177(0x31d)]});let _0x2bf768=_0x1423a8[_0x47f177(0x261)];_0x2bf768['sort']((_0x393cd0,_0x46bdd1)=>_0x393cd0['name'][_0x47f177(0x1ec)](_0x46bdd1[_0x47f177(0x20b)]));const _0x1d6127=_0x4c4530[_0x47f177(0x2f1)]||0x64,_0x579a8a=_0x2bf768[_0x47f177(0x1e6)]>=_0x1d6127?a46_0x303d4a['dim'](_0x47f177(0x225)):'';console[_0x47f177(0x1a6)](_0x47f177(0x1a0)+_0x2bf768['length']+_0x47f177(0x294)+(_0x2bf768[_0x47f177(0x1e6)]!==0x1?'s':'')+_0x579a8a);if(_0x4c4530[_0x47f177(0x1d1)]===_0x47f177(0x1a5)||_0x4c4530[_0x47f177(0x1d1)]===_0x47f177(0x1d0)||_0x4c4530[_0x47f177(0x1d1)]===_0x47f177(0x251))await handleSDKOutput(_0x2bf768,_0x4c4530);else{if(_0x2bf768['length']===0x0)_0x5f3ffa?console[_0x47f177(0x1e0)](_0x47f177(0x1e1)+_0x5f3ffa):console[_0x47f177(0x1e0)]('No\x20workflow\x20projects\x20found');else{const _0x5bb5be=_0x2bf768[_0x47f177(0x287)](_0x35d7a9=>{const _0x3f9003=_0x47f177,_0x54b3d0=_0x35d7a9[_0x3f9003(0x21c)]?.['some'](_0x288feb=>_0x288feb[_0x3f9003(0x2f8)]==='sys'),_0xd20733=_0x54b3d0?a46_0x303d4a[_0x3f9003(0x2da)](_0x3f9003(0x205)):'';return _0x3f9003(0x33a)+_0x35d7a9[_0x3f9003(0x20b)]+_0xd20733;});await writeOutput(_0x5bb5be[_0x47f177(0x1f7)]('\x0a'),_0x4c4530[_0x47f177(0x1f2)],_0x47f177(0x1e8));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a46_0x45121c(0x326);[a46_0x45121c(0x26a)]='List\x20workflows';async[a46_0x45121c(0x2d9)](_0xfd4bb3){const _0x24d29f=a46_0x45121c,{options:_0xe2b35e,args:_0x354465,tdx:_0x221d53}=_0xfd4bb3,_0x313bdb=this[_0x24d29f(0x1ea)](_0x354465,_0xe2b35e);_0xe2b35e[_0x24d29f(0x31d)]&&_0x313bdb&&console[_0x24d29f(0x1a6)](_0x24d29f(0x230)+_0x313bdb);const _0xf83c33=await withSpinner(_0x24d29f(0x344),()=>_0x221d53['workflow'][_0x24d29f(0x2b4)](_0x313bdb,{'limit':_0xe2b35e[_0x24d29f(0x2f1)]}),{'verbose':_0xe2b35e['verbose']});let _0x2d306c=_0xf83c33['data'];_0x2d306c[_0x24d29f(0x2a4)]((_0x35aa7f,_0x5687c5)=>{const _0x55fdb5=_0x24d29f,_0x141fd0=_0x35aa7f[_0x55fdb5(0x20b)][_0x55fdb5(0x1ec)](_0x5687c5[_0x55fdb5(0x20b)]);if(_0x141fd0!==0x0)return _0x141fd0;return(_0x35aa7f[_0x55fdb5(0x272)]?.[_0x55fdb5(0x20b)]||'')[_0x55fdb5(0x1ec)](_0x5687c5[_0x55fdb5(0x272)]?.[_0x55fdb5(0x20b)]||'');});const _0x503385=_0xe2b35e[_0x24d29f(0x2f1)]||0x64,_0x132a16=_0x2d306c[_0x24d29f(0x1e6)]>=_0x503385?a46_0x303d4a[_0x24d29f(0x2da)](_0x24d29f(0x225)):'';console['error'](_0x24d29f(0x1a0)+_0x2d306c[_0x24d29f(0x1e6)]+_0x24d29f(0x2cb)+(_0x2d306c[_0x24d29f(0x1e6)]!==0x1?'s':'')+_0x132a16);if(_0xe2b35e[_0x24d29f(0x1d1)]==='json'||_0xe2b35e[_0x24d29f(0x1d1)]===_0x24d29f(0x1d0)||_0xe2b35e[_0x24d29f(0x1d1)]===_0x24d29f(0x251))await handleSDKOutput(_0x2d306c,_0xe2b35e);else{if(_0x2d306c[_0x24d29f(0x1e6)]===0x0)_0x313bdb?console[_0x24d29f(0x1e0)](_0x24d29f(0x33b)+_0x313bdb):console[_0x24d29f(0x1e0)]('No\x20workflows\x20found');else{const _0x10a812=_0xe2b35e[_0x24d29f(0x2b1)],_0x5819eb=_0x2d306c[_0x24d29f(0x287)](_0x51af13=>{const _0x32547c=_0x24d29f,_0xbafe5e=a46_0x303d4a[_0x32547c(0x2da)]('#'+_0x51af13['id']),_0x39a2c0=hyperlink(_0xbafe5e,getWorkflowUrl(_0x10a812,_0x51af13['id'])),_0x50f7b0=_0x51af13['project']?.[_0x32547c(0x20b)]?a46_0x303d4a['dim']('\x20('+_0x51af13['project']['name']+')'):'';return _0x32547c(0x33f)+_0x39a2c0+'\x20'+_0x51af13[_0x32547c(0x20b)]+_0x50f7b0;});await writeOutput(_0x5819eb['join']('\x0a'),_0xe2b35e[_0x24d29f(0x1f2)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x1ff);[a46_0x45121c(0x26a)]=a46_0x45121c(0x260);async[a46_0x45121c(0x2d9)](_0xa20cd8){const _0x2b525d=a46_0x45121c,{options:_0x2f3622,args:_0x5cef7d,tdx:_0x11269b}=_0xa20cd8,_0x53e4b7=this[_0x2b525d(0x297)](_0x5cef7d,_0x2f3622);if(!_0x53e4b7)return 0x1;const {projectName:_0x595cd5,workflowName:_0x253b15}=_0x53e4b7;if(_0x2f3622[_0x2b525d(0x31d)]){if(_0x595cd5&&_0x253b15)console[_0x2b525d(0x1a6)]('Filter:\x20'+_0x595cd5+'.'+_0x253b15);else _0x595cd5&&console['error']('Filter:\x20project='+_0x595cd5);const _0x2f331b=_0x2f3622[_0x2b525d(0x2ba)];_0x2f331b&&console[_0x2b525d(0x1a6)](_0x2b525d(0x307)+_0x2f331b);}let _0x44ecc2=0x28;if(process['stdout'][_0x2b525d(0x216)]&&!_0x2f3622[_0x2b525d(0x1f2)]&&!_0x2f3622[_0x2b525d(0x1d1)]){const _0x49c79b=process[_0x2b525d(0x325)][_0x2b525d(0x28c)]||0x28;_0x44ecc2=Math[_0x2b525d(0x23a)](0x14,Math['floor'](_0x49c79b*0x2/0x3));}const _0x314004=_0x2f3622[_0x2b525d(0x2f1)]||_0x44ecc2,_0x54de31=await withSpinner(_0x2b525d(0x19d),()=>_0x11269b[_0x2b525d(0x228)]['sessions']({'projectName':_0x595cd5,'workflowName':_0x253b15,'status':_0x2f3622[_0x2b525d(0x2ba)],'fromTime':_0x2f3622['from'],'toTime':_0x2f3622['to'],'limit':_0x314004}),{'verbose':_0x2f3622[_0x2b525d(0x31d)]}),_0x18ce7a=_0x54de31['data'];_0x18ce7a[_0x2b525d(0x2a4)]((_0x5b2235,_0x57a27b)=>{const _0x741cf2=_0x2b525d,_0x21dc46=_0x5b2235['sessionTime']||'',_0x2f55b1=_0x57a27b[_0x741cf2(0x1cc)]||'';return _0x2f55b1[_0x741cf2(0x1ec)](_0x21dc46);});_0x18ce7a[_0x2b525d(0x1e6)]>=_0x314004?console[_0x2b525d(0x1a6)]('✔\x20Showing\x20'+_0x18ce7a['length']+_0x2b525d(0x2d4)+a46_0x303d4a['dim'](_0x2b525d(0x263))):console['error'](_0x2b525d(0x1a0)+_0x18ce7a[_0x2b525d(0x1e6)]+_0x2b525d(0x23e)+(_0x18ce7a[_0x2b525d(0x1e6)]!==0x1?'s':''));if(_0x2f3622[_0x2b525d(0x1d1)]==='json'||_0x2f3622[_0x2b525d(0x1d1)]===_0x2b525d(0x1d0)||_0x2f3622[_0x2b525d(0x1d1)]==='table')await handleSDKOutput(_0x18ce7a,_0x2f3622);else{if(!process[_0x2b525d(0x325)]['isTTY']||_0x2f3622[_0x2b525d(0x1f2)]){if(_0x18ce7a['length']===0x0){if(_0x595cd5&&_0x253b15)console['log'](_0x2b525d(0x265)+_0x595cd5+'.'+_0x253b15);else _0x595cd5?console[_0x2b525d(0x1e0)](_0x2b525d(0x2a1)+_0x595cd5):console[_0x2b525d(0x1e0)](_0x2b525d(0x1fb));}else{const _0x3560db=_0x2f3622[_0x2b525d(0x2b1)],_0x1aaee5=this[_0x2b525d(0x212)](_0x18ce7a,_0x3560db);_0x2f3622[_0x2b525d(0x1f2)]?await writeOutput(_0x1aaee5,_0x2f3622['output'],_0x2b525d(0x1e8)):console[_0x2b525d(0x1e0)](_0x1aaee5);}!_0x595cd5&&(console[_0x2b525d(0x1a6)](''),console[_0x2b525d(0x1a6)](a46_0x303d4a[_0x2b525d(0x2da)](_0x2b525d(0x231))),console['error'](a46_0x303d4a[_0x2b525d(0x2da)](_0x2b525d(0x1f6))+'or'+a46_0x303d4a[_0x2b525d(0x2da)](_0x2b525d(0x27d))));}else{if(_0x18ce7a['length']===0x0){if(_0x595cd5&&_0x253b15)console[_0x2b525d(0x1e0)](_0x2b525d(0x265)+_0x595cd5+'.'+_0x253b15);else _0x595cd5?console[_0x2b525d(0x1e0)](_0x2b525d(0x2a1)+_0x595cd5):console['log']('No\x20sessions\x20found');}else await this['navigateSessionsInteractive'](_0x18ce7a,_0xa20cd8,_0x595cd5);}}return 0x0;}[a46_0x45121c(0x212)](_0x2ceaab,_0x3a718d){const _0x3cedde=a46_0x45121c,_0x41294c=[],_0xcd6ffe=new Map();let _0x5cbc42=Infinity,_0x523d3b=-Infinity;for(const _0x1258c1 of _0x2ceaab){if(_0x1258c1[_0x3cedde(0x1df)]?.['createdAt']){const _0x14363e=new Date(_0x1258c1['lastAttempt'][_0x3cedde(0x1c3)])['getTime'](),_0xc2bbd7=_0x1258c1[_0x3cedde(0x1df)][_0x3cedde(0x217)]?new Date(_0x1258c1[_0x3cedde(0x1df)][_0x3cedde(0x217)])[_0x3cedde(0x2ca)]():Date[_0x3cedde(0x2ea)](),_0x442b18=_0x1258c1['project']?.['name']||_0x3cedde(0x21d);!_0xcd6ffe[_0x3cedde(0x320)](_0x442b18)&&_0xcd6ffe[_0x3cedde(0x1d5)](_0x442b18,[]),_0xcd6ffe[_0x3cedde(0x2f7)](_0x442b18)['push']({'session':_0x1258c1,'startTime':_0x14363e,'endTime':_0xc2bbd7,'duration':_0xc2bbd7-_0x14363e}),_0x5cbc42=Math['min'](_0x5cbc42,_0x14363e),_0x523d3b=Math[_0x3cedde(0x23a)](_0x523d3b,_0xc2bbd7);}}if(_0xcd6ffe[_0x3cedde(0x25d)]===0x0)return _0x3cedde(0x199);const _0x44f8bd=process['stdout'][_0x3cedde(0x2f4)]||0x78,_0x29d4ac=0x1e,_0x17dddf=0x32,_0x5a8981=0x4,_0x324d2c=Math[_0x3cedde(0x1b8)](_0x17dddf,Math[_0x3cedde(0x23a)](_0x29d4ac,Math[_0x3cedde(0x222)](_0x44f8bd*0.3))),_0x37a61a=_0x44f8bd-_0x324d2c-TIMELINE_CONFIG[_0x3cedde(0x2f5)]-0x3-_0x5a8981,_0x521a5f=_0x523d3b-_0x5cbc42,_0x74f53c=_0x521a5f/_0x324d2c,_0x4cb609=renderTimeAxis({'startTime':_0x5cbc42,'endTime':_0x523d3b,'durationMs':_0x521a5f,'msPerChar':_0x74f53c},_0x324d2c),_0xe54c5e=[];for(const _0x3e2ccf of _0xcd6ffe['values']()){_0xe54c5e[_0x3cedde(0x296)](..._0x3e2ccf);}_0xe54c5e[_0x3cedde(0x2a4)]((_0xe03013,_0x294cc9)=>_0x294cc9[_0x3cedde(0x274)]-_0xe03013[_0x3cedde(0x274)]);const _0x2de8c4=new Date(_0x5cbc42),_0x4e2559=formatDate(_0x2de8c4),_0x4e623d=_0x5a8981+TIMELINE_CONFIG[_0x3cedde(0x1b9)]+TIMELINE_CONFIG[_0x3cedde(0x28a)]+_0x37a61a,_0x56f647='\x20'['repeat'](_0x4e623d-_0x4e2559[_0x3cedde(0x1e6)]),_0xcc0a13=_0x56f647+a46_0x303d4a[_0x3cedde(0x2da)](_0x4e2559)+'\x20'+_0x4cb609;_0x41294c[_0x3cedde(0x296)](_0xcc0a13);const _0x276e1a=0x16;let _0x1d63e4=0x0;for(const _0x325644 of _0xe54c5e){const _0x1b26b7=_0x325644[_0x3cedde(0x2a7)][_0x3cedde(0x272)]?.[_0x3cedde(0x20b)]||'?',_0x47eebf=Math['min'](stringWidth(_0x1b26b7),_0x276e1a);_0x1d63e4=Math[_0x3cedde(0x23a)](_0x1d63e4,_0x47eebf);}for(const _0x11d4be of _0xe54c5e){const {session:_0x4eb359,startTime:_0x72a0e,endTime:_0x1d5930,duration:_0x5e41e5}=_0x11d4be,_0x5c29ae=_0x4eb359['project']?.['id'],_0xe55ed8=_0x4eb359['id'],_0x5b79fb=_0x4eb359[_0x3cedde(0x272)]?.['name']||'?',_0x45a791=_0x4eb359[_0x3cedde(0x228)]?.[_0x3cedde(0x20b)]||'?';let _0x36f3de,_0xd7c331;if(_0x4eb359[_0x3cedde(0x1df)]){const _0x36f0b5=_0x4eb359[_0x3cedde(0x1df)];!_0x36f0b5[_0x3cedde(0x26c)]?(_0x36f3de=_0x36f0b5[_0x3cedde(0x1c9)]?'🛑':'🔄',_0xd7c331=_0x36f0b5[_0x3cedde(0x1c9)]?a46_0x303d4a[_0x3cedde(0x1b0)]:a46_0x303d4a[_0x3cedde(0x1c7)]):(_0x36f3de=_0x36f0b5[_0x3cedde(0x2e5)]?'✅':'❌',_0xd7c331=_0x36f0b5['success']?a46_0x303d4a['green']:a46_0x303d4a['red']);}else _0x36f3de='⏳',_0xd7c331=a46_0x303d4a[_0x3cedde(0x2da)];const _0x120cdc='#'+_0xe55ed8,_0x124eb5=_0x5c29ae?hyperlink(_0x120cdc,getWorkflowSessionUrl(_0x3a718d,_0x5c29ae,_0xe55ed8)):_0x120cdc;let _0x1012e7=_0x5b79fb;stringWidth(_0x5b79fb)>_0x276e1a&&(_0x1012e7=_0x5b79fb[_0x3cedde(0x309)](0x0,_0x276e1a-0x1)+'…');const _0x11e14b=a46_0x303d4a['dim'](_0x1012e7),_0x28c817=stringWidth(_0x1012e7),_0xa37e06='\x20'['repeat'](_0x1d63e4-stringWidth(_0x1012e7)+0x2),_0x5191eb='('+formatElapsed(_0x5e41e5)+')',_0x3c9461=stringWidth(_0x5191eb),_0x28fcc9=stringWidth(_0x120cdc),_0x3fb1d0=_0x28fcc9+0x1+_0x28c817+_0xa37e06[_0x3cedde(0x1e6)],_0x3264c4=_0x37a61a-_0x3fb1d0-_0x3c9461-0x1-0x8;let _0x4379ef=_0x45a791;stringWidth(_0x4379ef)>_0x3264c4&&(_0x4379ef=_0x4379ef[_0x3cedde(0x309)](0x0,_0x3264c4-0x1)+'…');const _0x1d73d8=_0x124eb5+'\x20'+_0x11e14b+_0xa37e06+_0x4379ef,_0xca8e26=stringWidth(_0x1d73d8),_0xcd402e=_0x37a61a-_0xca8e26-_0x3c9461,_0x325c7c=_0x1d73d8+'\x20'[_0x3cedde(0x24b)](Math[_0x3cedde(0x23a)](0x1,_0xcd402e))+a46_0x303d4a[_0x3cedde(0x2da)](_0x5191eb),_0x467ea4=Math[_0x3cedde(0x222)]((_0x72a0e-_0x5cbc42)/_0x74f53c),_0x27c977=Math[_0x3cedde(0x222)]((_0x1d5930-_0x5cbc42)/_0x74f53c),_0x2c0a1b=Math[_0x3cedde(0x23a)](_0x467ea4+0x1,_0x27c977),_0x3c22f1=new Array(_0x324d2c)[_0x3cedde(0x242)]('\x20');for(let _0x1f56a8=_0x467ea4;_0x1f56a8<Math['min'](_0x2c0a1b,_0x324d2c);_0x1f56a8++){_0x3c22f1[_0x1f56a8]='─';}const _0x12a158=_0x3c22f1['map'](_0x55019a=>_0x55019a==='\x20'?'\x20':_0xd7c331(_0x55019a))[_0x3cedde(0x1f7)]('');_0x41294c[_0x3cedde(0x296)](_0x36f3de+'\x20'+_0x325c7c+'│'+_0x12a158+'│');}return _0x41294c['join']('\x0a');}async[a46_0x45121c(0x31b)](_0x364ec6,_0x30ab8c,_0x5a39ce){const _0x3c3da9=a46_0x45121c,{options:_0x147ced,tdx:_0x5683af}=_0x30ab8c,_0x966469=_0x147ced[_0x3c3da9(0x2b1)],{timelineRows:_0x185b14,timeAxisHeader:_0x2140a7}=this[_0x3c3da9(0x2cc)](_0x364ec6,_0x966469),_0x2eb944=_0x185b14[_0x3c3da9(0x2bd)](_0x4dd8ce=>_0x4dd8ce[_0x3c3da9(0x1a1)]);if(_0x2eb944[_0x3c3da9(0x1e6)]===0x0){const _0x95cc06=this[_0x3c3da9(0x212)](_0x364ec6,_0x966469);console[_0x3c3da9(0x1e0)](_0x95cc06);!_0x5a39ce&&(console[_0x3c3da9(0x1a6)](''),console[_0x3c3da9(0x1a6)](a46_0x303d4a['dim'](_0x3c3da9(0x231))),console[_0x3c3da9(0x1a6)](a46_0x303d4a[_0x3c3da9(0x2da)](_0x3c3da9(0x1f6))+'or'+a46_0x303d4a[_0x3c3da9(0x2da)](_0x3c3da9(0x27d))));return;}_0x2140a7&&console['log'](_0x2140a7);const _0x36d2bb=_0x185b14[_0x3c3da9(0x2bd)](_0xeb058f=>_0xeb058f['attemptId'])[_0x3c3da9(0x287)](_0x445b4c=>({'title':_0x445b4c[_0x3c3da9(0x311)],'value':_0x445b4c['attemptId']})),_0x4309c8=process[_0x3c3da9(0x325)][_0x3c3da9(0x28c)]||0x3c,_0x216226=Math['max'](0x28,Math['floor'](_0x4309c8*0x2/0x3)),_0x5b2bed=await a46_0x39082f({'type':_0x3c3da9(0x262),'name':_0x3c3da9(0x1a1),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x36d2bb,'initial':-0x1,'limit':_0x216226,'clearFirst':!![],'fallback':{'title':_0x3c3da9(0x2a3),'value':null},'suggest':(_0x6ff922,_0x25f186)=>{const _0x4768f6=_0x3c3da9;if(!_0x6ff922)return Promise[_0x4768f6(0x315)](_0x25f186);const _0x25438f=_0x25f186[_0x4768f6(0x2bd)](_0x289291=>{const _0x2a2a86=_0x4768f6,_0x30446f=_0x289291;return _0x30446f[_0x2a2a86(0x2d3)][_0x2a2a86(0x243)]()['includes'](_0x6ff922[_0x2a2a86(0x243)]());});return Promise[_0x4768f6(0x315)](_0x25438f);}}),_0x220005=()=>{const _0x2aba78=_0x3c3da9;process[_0x2aba78(0x325)][_0x2aba78(0x1fc)](_0x2aba78(0x29a)),process[_0x2aba78(0x325)][_0x2aba78(0x1fc)](_0x2aba78(0x29a)),process['stdout'][_0x2aba78(0x1fc)](_0x2aba78(0x29a));},_0x51f667=_0x5b2bed&&_0x5b2bed[_0x3c3da9(0x1a1)]&&_0x5b2bed[_0x3c3da9(0x1a1)]!==null&&_0x5b2bed[_0x3c3da9(0x1a1)]['trim']()!=='';if(!_0x51f667){_0x220005(),console[_0x3c3da9(0x1e0)](a46_0x303d4a[_0x3c3da9(0x2da)](_0x3c3da9(0x23d)));return;}_0x220005();const _0x42ed56=_0x364ec6['find'](_0x3ef9eb=>_0x3ef9eb[_0x3c3da9(0x1df)]?.['id']===_0x5b2bed['attemptId']);if(_0x42ed56){const _0x2d27e0=_0x42ed56[_0x3c3da9(0x272)]?.[_0x3c3da9(0x20b)]||'?',_0x10351a=_0x42ed56[_0x3c3da9(0x228)]?.['name']||'?';console[_0x3c3da9(0x1e0)](_0x3c3da9(0x1c4)+a46_0x303d4a[_0x3c3da9(0x2da)](_0x2d27e0)+',\x20Workflow:\x20'+a46_0x303d4a['dim'](_0x10351a));}const _0xf8796a=new WorkflowTimelineCommand();await _0xf8796a['execute']({'args':[],'options':{..._0x147ced,'attemptId':_0x5b2bed[_0x3c3da9(0x1a1)]},'tdx':_0x5683af});}[a46_0x45121c(0x2cc)](_0x9c0c88,_0x1a6fe2){const _0x4086ec=a46_0x45121c,_0x1df7a0=new Map();for(const _0x3b5c2c of _0x9c0c88){_0x3b5c2c['id']&&_0x3b5c2c[_0x4086ec(0x1df)]?.['id']&&_0x1df7a0['set'](_0x3b5c2c['id'],_0x3b5c2c[_0x4086ec(0x1df)]['id']);}const _0x185612=[];let _0x23374e='';const _0x262d25=this[_0x4086ec(0x212)](_0x9c0c88,_0x1a6fe2),_0x1a5c12=_0x262d25[_0x4086ec(0x19c)]('\x0a');for(const _0x444eea of _0x1a5c12){if(_0x444eea[_0x4086ec(0x1af)](_0x4086ec(0x198))||_0x444eea[_0x4086ec(0x210)](/^\s+\d{4}-\d{2}-\d{2}/))_0x23374e=_0x444eea;else{if(_0x444eea[_0x4086ec(0x210)](/^[✅❌🔄🛑⏳]/)){const _0x2349fa=_0x444eea['match'](/#(\d+)/),_0x546537=_0x2349fa?_0x2349fa[0x1]:null,_0x4bd514=_0x546537?_0x1df7a0[_0x4086ec(0x2f7)](_0x546537)||null:null,_0x32604c=_0x9c0c88[_0x4086ec(0x22c)](_0x584b85=>_0x584b85['id']===_0x546537),_0xd00a1d=_0x32604c?.['project']?.[_0x4086ec(0x20b)]||'';_0x185612[_0x4086ec(0x296)]({'displayLine':_0x444eea,'attemptId':_0x4bd514,'projectName':_0xd00a1d});}}}return{'timelineRows':_0x185612,'timeAxisHeader':_0x23374e};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x1da);[a46_0x45121c(0x26a)]='List\x20workflow\x20attempts';async['execute'](_0x525195){const _0x3644ca=a46_0x45121c,{options:_0x5540c8,args:_0x34facf,tdx:_0x4605d0}=_0x525195,_0x625c94=this['parseProjectWorkflowPattern'](_0x34facf,_0x5540c8);if(!_0x625c94)return 0x1;const {projectName:_0x514169,workflowName:_0x4268c7}=_0x625c94,_0x4089af=_0x5540c8['includeRetried'];if(_0x5540c8[_0x3644ca(0x31d)]){if(_0x514169&&_0x4268c7)console[_0x3644ca(0x1a6)](_0x3644ca(0x32f)+_0x514169+'.'+_0x4268c7);else _0x514169&&console[_0x3644ca(0x1a6)](_0x3644ca(0x1a4)+_0x514169);_0x4089af&&console[_0x3644ca(0x1a6)](_0x3644ca(0x25e));}const _0x3a76ca=await withSpinner(_0x3644ca(0x22f),()=>_0x4605d0[_0x3644ca(0x228)][_0x3644ca(0x31c)]({'projectName':_0x514169,'workflowName':_0x4268c7,'includeRetried':_0x4089af,'limit':_0x5540c8[_0x3644ca(0x2f1)]}),{'verbose':_0x5540c8[_0x3644ca(0x31d)]}),_0x3f539e=_0x3a76ca[_0x3644ca(0x261)],_0x517f9d=_0x5540c8[_0x3644ca(0x2f1)]||0x64,_0x55d75b=_0x3f539e['length']>=_0x517f9d?a46_0x303d4a[_0x3644ca(0x2da)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3644ca(0x1a6)](_0x3644ca(0x1a0)+_0x3f539e[_0x3644ca(0x1e6)]+_0x3644ca(0x23f)+(_0x3f539e[_0x3644ca(0x1e6)]!==0x1?'s':'')+_0x55d75b);if(_0x5540c8[_0x3644ca(0x1d1)]===_0x3644ca(0x1a5)||_0x5540c8[_0x3644ca(0x1d1)]==='jsonl'||_0x5540c8['format']==='table')await handleSDKOutput(_0x3f539e,_0x5540c8);else{if(_0x3f539e['length']===0x0){if(_0x514169&&_0x4268c7)console[_0x3644ca(0x1e0)]('No\x20attempts\x20found\x20for:\x20'+_0x514169+'.'+_0x4268c7);else _0x514169?console[_0x3644ca(0x1e0)](_0x3644ca(0x257)+_0x514169):console[_0x3644ca(0x1e0)]('No\x20attempts\x20found');}else{const _0x18795c=_0x5540c8[_0x3644ca(0x2b1)],_0x224199=_0x3f539e['map'](_0xd924b6=>{const _0x1facfc=_0x3644ca,_0x24baf9=a46_0x303d4a[_0x1facfc(0x2da)]('#'+_0xd924b6['id']),_0x137380=_0xd924b6[_0x1facfc(0x272)]?.['id'],_0x5c1d10=_0xd924b6[_0x1facfc(0x1de)]||_0xd924b6[_0x1facfc(0x269)],_0x590a00=_0x137380&&_0x5c1d10?hyperlink(_0x24baf9,getWorkflowAttemptUrl(_0x18795c,_0x137380,_0x5c1d10,_0xd924b6['id'])):_0x24baf9,{icon:_0x36cf6c,text:_0x3df24f}=getAttemptStatusDisplay(_0xd924b6),_0x1c1e0a=(_0xd924b6['project']?.[_0x1facfc(0x20b)]||'?')+'.'+(_0xd924b6[_0x1facfc(0x228)]?.[_0x1facfc(0x20b)]||'?'),_0x19d0be=_0xd924b6['sessionTime']?a46_0x303d4a['dim'](_0xd924b6[_0x1facfc(0x1cc)]):'';return(_0x590a00+'\x20'+_0x36cf6c+(_0x3df24f?'\x20'+_0x3df24f:'')+'\x20'+_0x1c1e0a+'\x20'+_0x19d0be)[_0x1facfc(0x236)]();});await writeOutput(_0x224199['join']('\x0a'),_0x5540c8['output'],_0x3644ca(0x1e8));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x291);[a46_0x45121c(0x26a)]=a46_0x45121c(0x213);async[a46_0x45121c(0x2d9)](_0x7d9460){const _0x153db6=a46_0x45121c,{options:_0xb0bf0b,args:_0xb9d1a3,tdx:_0x6e3941}=_0x7d9460,_0x33b9ec=_0xb9d1a3[0x0];if(!_0x33b9ec)return console[_0x153db6(0x1a6)](_0x153db6(0x2cd)),0x1;_0xb0bf0b[_0x153db6(0x31d)]&&console[_0x153db6(0x1a6)](_0x153db6(0x2a5)+_0x33b9ec);const _0x32d5e8=await withSpinner(_0x153db6(0x1d4),()=>_0x6e3941[_0x153db6(0x228)]['attempt'](_0x33b9ec),{'verbose':_0xb0bf0b[_0x153db6(0x31d)]}),_0x5f54ac=_0x32d5e8['data'];let _0x3d7ddd;!_0x5f54ac[_0x153db6(0x26c)]?_0x3d7ddd=_0x5f54ac[_0x153db6(0x1c9)]?'canceling':_0x153db6(0x2c0):_0x3d7ddd=_0x5f54ac['success']?_0x153db6(0x2e5):_0x153db6(0x1a6);let _0x1dc04c;if(_0x5f54ac[_0x153db6(0x1c3)]&&_0x5f54ac['finishedAt']){const _0x1425a2=new Date(_0x5f54ac[_0x153db6(0x1c3)])[_0x153db6(0x2ca)](),_0x4cf747=new Date(_0x5f54ac[_0x153db6(0x217)])['getTime']();_0x1dc04c=Math[_0x153db6(0x218)]((_0x4cf747-_0x1425a2)/0x3e8);}const _0x35ea31={'attempt_id':_0x5f54ac['id'],'status':_0x3d7ddd,..._0x5f54ac[_0x153db6(0x22e)]!==undefined&&{'index':_0x5f54ac[_0x153db6(0x22e)]},..._0x5f54ac[_0x153db6(0x272)]&&{'project':_0x5f54ac['project'][_0x153db6(0x20b)]},..._0x5f54ac[_0x153db6(0x228)]&&{'workflow':_0x5f54ac[_0x153db6(0x228)]['name']},..._0x5f54ac[_0x153db6(0x269)]&&{'session_id':_0x5f54ac[_0x153db6(0x269)]},..._0x5f54ac[_0x153db6(0x1cc)]&&{'session_time':_0x5f54ac[_0x153db6(0x1cc)]},..._0x5f54ac[_0x153db6(0x30e)]&&{'retry_attempt':_0x5f54ac[_0x153db6(0x30e)]},..._0x1dc04c!==undefined&&{'duration_sec':_0x1dc04c},..._0x5f54ac[_0x153db6(0x1c3)]&&{'created_at':_0x5f54ac[_0x153db6(0x1c3)]},..._0x5f54ac[_0x153db6(0x217)]&&{'finished_at':_0x5f54ac[_0x153db6(0x217)]},...Object[_0x153db6(0x317)](_0x5f54ac[_0x153db6(0x26b)])[_0x153db6(0x1e6)]>0x0&&{'params':_0x5f54ac[_0x153db6(0x26b)]}};return await handleSingleObjectOutput(_0x35ea31,_0xb0bf0b),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x303);[a46_0x45121c(0x26a)]=a46_0x45121c(0x25f);async['execute'](_0x1f5f26){const _0x289f18=a46_0x45121c,{options:_0x6cd166,args:_0x1e1304,tdx:_0xc11a11}=_0x1f5f26,_0x260ec6=_0x1e1304[0x0];if(!_0x260ec6)return console[_0x289f18(0x1a6)](_0x289f18(0x2cd)),0x1;const _0x23d2cd=_0x6cd166[_0x289f18(0x2ee)];_0x6cd166[_0x289f18(0x31d)]&&(console[_0x289f18(0x1a6)](_0x289f18(0x2a5)+_0x260ec6),_0x23d2cd&&console[_0x289f18(0x1a6)](_0x289f18(0x2e7)));const _0x3ad32c=await withSpinner(_0x289f18(0x2ce),()=>_0xc11a11['workflow'][_0x289f18(0x2d2)](_0x260ec6,_0x23d2cd||![]),{'verbose':_0x6cd166['verbose']}),_0x2cfeb8=_0x3ad32c['data'];return console[_0x289f18(0x1a6)](_0x289f18(0x1a0)+_0x2cfeb8['length']+_0x289f18(0x20c)+(_0x2cfeb8[_0x289f18(0x1e6)]!==0x1?'s':'')),await handleSDKOutput(_0x2cfeb8,_0x6cd166),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a46_0x45121c(0x20b)]='workflow:logs';[a46_0x45121c(0x26a)]=a46_0x45121c(0x1cd);async[a46_0x45121c(0x2d9)](_0x10fecd){const _0x1ec7ae=a46_0x45121c,{options:_0x7ad6a1,args:_0x30ea38,tdx:_0xfc8a47}=_0x10fecd,_0xe086f3=_0x30ea38[0x0];let _0x376f2c=_0x30ea38[0x1];if(!_0xe086f3)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x7ad6a1[_0x1ec7ae(0x31d)]&&(console[_0x1ec7ae(0x1a6)](_0x1ec7ae(0x2a5)+_0xe086f3),_0x376f2c&&console['error']('Task\x20name:\x20'+_0x376f2c));const _0x339215=await withSpinner(_0x1ec7ae(0x2a9),()=>_0xfc8a47[_0x1ec7ae(0x228)]['logFiles'](_0xe086f3,_0x376f2c),{'verbose':_0x7ad6a1[_0x1ec7ae(0x31d)]}),_0x446801=_0x339215[_0x1ec7ae(0x261)];if(_0x446801[_0x1ec7ae(0x1e6)]===0x0)return console['error'](_0x1ec7ae(0x1c1)),0x0;if(!_0x376f2c&&(_0x7ad6a1['json']||_0x7ad6a1[_0x1ec7ae(0x1d1)]))return await handleSDKOutput(_0x446801,_0x7ad6a1),0x0;if(!_0x376f2c){const _0x2d4d6d=_0x446801[_0x1ec7ae(0x287)](_0x3d2bef=>({'title':_0x3d2bef['taskName']+'\x20('+formatBytes(_0x3d2bef[_0x1ec7ae(0x2b5)])+')','value':_0x3d2bef['taskName']})),_0x4f74de=await a46_0x39082f({'type':_0x1ec7ae(0x244),'name':'task','message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x2d4d6d});if(!_0x4f74de[_0x1ec7ae(0x19f)])return console[_0x1ec7ae(0x1a6)]('Cancelled'),0x0;_0x376f2c=_0x4f74de[_0x1ec7ae(0x19f)];}const _0x52f610=await withSpinner(_0x1ec7ae(0x26d),()=>_0xfc8a47[_0x1ec7ae(0x228)][_0x1ec7ae(0x26f)](_0xe086f3,_0x376f2c),{'verbose':_0x7ad6a1[_0x1ec7ae(0x31d)]}),_0x132cec=_0x52f610[_0x1ec7ae(0x261)];return _0x132cec?console['log'](_0x132cec):console[_0x1ec7ae(0x1a6)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x1c8);[a46_0x45121c(0x26a)]=a46_0x45121c(0x2f0);async[a46_0x45121c(0x2d9)](_0x26f7fb){const _0x3662c3=a46_0x45121c,{options:_0x4ce25d,args:_0x27dc2f,tdx:_0x14e38f}=_0x26f7fb,_0x274290=_0x27dc2f[0x0];if(!_0x274290)return console[_0x3662c3(0x1a6)](_0x3662c3(0x2cd)),0x1;const _0x5176a1=_0x4ce25d[_0x3662c3(0x2c7)];_0x4ce25d[_0x3662c3(0x31d)]&&(console['error'](_0x3662c3(0x2a5)+_0x274290),_0x5176a1&&console[_0x3662c3(0x1a6)](_0x3662c3(0x27e)+_0x5176a1));if(!_0x4ce25d[_0x3662c3(0x2eb)]){if(!isInteractive())return console[_0x3662c3(0x1a6)](a46_0x303d4a[_0x3662c3(0x2ef)](_0x3662c3(0x319)),_0x3662c3(0x219)),console[_0x3662c3(0x1a6)](a46_0x303d4a[_0x3662c3(0x2da)](_0x3662c3(0x1f8))),0x1;const _0x277016=await confirmKey(_0x3662c3(0x2b9)+_0x274290+'?');if(!_0x277016)return console[_0x3662c3(0x1a6)](a46_0x303d4a[_0x3662c3(0x1b0)](_0x3662c3(0x23d))),0x1;}const _0x5ef085=await withSpinner(_0x3662c3(0x204),()=>_0x14e38f[_0x3662c3(0x228)][_0x3662c3(0x253)](_0x274290,_0x5176a1),{'verbose':_0x4ce25d[_0x3662c3(0x31d)]}),_0x111cc0=_0x5ef085['data'];return console[_0x3662c3(0x1a6)]('✔\x20'+_0x111cc0),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x2ec);[a46_0x45121c(0x26a)]=a46_0x45121c(0x2ed);async[a46_0x45121c(0x2d9)](_0x3e9cf8){const _0x3b9fd9=a46_0x45121c,{options:_0x5cdd54,args:_0x46337b,tdx:_0x4ef0b4}=_0x3e9cf8,_0x294ef5=_0x46337b[0x0];if(!_0x294ef5)return console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x1dc)),console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x329)),0x1;let _0x582b9c=![],_0x23e31b=_0x294ef5;if(_0x294ef5['startsWith'](_0x3b9fd9(0x2d6)))_0x582b9c=!![],_0x23e31b=_0x294ef5['substring'](0x8);else{if(_0x294ef5[_0x3b9fd9(0x1af)](_0x3b9fd9(0x282)))_0x582b9c=![],_0x23e31b=_0x294ef5[_0x3b9fd9(0x31e)](0x8);else return console[_0x3b9fd9(0x1a6)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x329)),0x1;}const _0x1819af=_0x5cdd54['fromTask'],_0x12882f=_0x5cdd54['resumeFrom'],_0x28cdca=_0x5cdd54[_0x3b9fd9(0x26b)],_0x2e6ebe=_0x5cdd54[_0x3b9fd9(0x1a3)];_0x5cdd54[_0x3b9fd9(0x31d)]&&(console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x300)+(_0x582b9c?_0x3b9fd9(0x2a7):'attempt')+'\x20'+_0x23e31b),_0x1819af&&console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x206)+_0x1819af),_0x12882f&&console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x1d7)+_0x12882f),_0x28cdca&&console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x255)+_0x28cdca),_0x2e6ebe&&console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x288)));let _0x21bf97;if(_0x28cdca)try{if(_0x28cdca[_0x3b9fd9(0x1af)]('@')){const _0x2770a8=await import('fs/promises'),_0x4b7dc7=_0x28cdca[_0x3b9fd9(0x31e)](0x1),_0x2f2685=await _0x2770a8[_0x3b9fd9(0x22b)](_0x4b7dc7,'utf-8');_0x21bf97=JSON[_0x3b9fd9(0x1a2)](_0x2f2685);}else _0x21bf97=JSON[_0x3b9fd9(0x1a2)](_0x28cdca);}catch{return console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x201)),0x1;}if(!_0x5cdd54['yes']){if(!isInteractive())return console[_0x3b9fd9(0x1a6)](a46_0x303d4a[_0x3b9fd9(0x2ef)](_0x3b9fd9(0x319)),_0x3b9fd9(0x219)),console[_0x3b9fd9(0x1a6)](a46_0x303d4a[_0x3b9fd9(0x2da)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x538ef6=await confirmKey(_0x3b9fd9(0x24f)+(_0x582b9c?'session':'attempt')+'\x20'+_0x23e31b+'?');if(!_0x538ef6)return console[_0x3b9fd9(0x1a6)](a46_0x303d4a[_0x3b9fd9(0x1b0)]('Cancelled')),0x1;}let _0x6bfb7c;_0x582b9c?_0x6bfb7c=await withSpinner(_0x3b9fd9(0x305),()=>_0x4ef0b4[_0x3b9fd9(0x228)][_0x3b9fd9(0x1ef)](_0x23e31b,{'fromTask':_0x1819af,'retryParams':_0x21bf97}),{'verbose':_0x5cdd54[_0x3b9fd9(0x31d)]}):_0x6bfb7c=await withSpinner('Retrying\x20attempt...',()=>_0x4ef0b4[_0x3b9fd9(0x228)][_0x3b9fd9(0x2a2)](_0x23e31b,{'resumeFrom':_0x12882f,'retryParams':_0x21bf97,'force':_0x2e6ebe}),{'verbose':_0x5cdd54[_0x3b9fd9(0x31d)]});const _0x117a00=_0x6bfb7c[_0x3b9fd9(0x261)];return console[_0x3b9fd9(0x1a6)](_0x3b9fd9(0x286)),console['error'](_0x3b9fd9(0x1e2)+_0x117a00[_0x3b9fd9(0x1a1)]),console['error'](_0x3b9fd9(0x30f)+_0x117a00[_0x3b9fd9(0x269)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a46_0x45121c(0x1db);[a46_0x45121c(0x26a)]=a46_0x45121c(0x220);async[a46_0x45121c(0x2d9)](_0x3c1c1a){const _0x127df7=a46_0x45121c,{options:_0x467172,args:_0x51e4b8,tdx:_0x48b6ca}=_0x3c1c1a;let _0x47e28c=_0x51e4b8[0x0];if(!_0x47e28c){const _0x5c4e94=this[_0x127df7(0x1ea)]([],_0x467172),_0x5df13a=await withSpinner(_0x127df7(0x2b3),()=>_0x48b6ca[_0x127df7(0x228)][_0x127df7(0x2b4)](_0x5c4e94,{'limit':_0x467172[_0x127df7(0x2f1)]}),{'verbose':_0x467172[_0x127df7(0x31d)]}),_0x34fc23=_0x5df13a[_0x127df7(0x261)];if(_0x34fc23[_0x127df7(0x1e6)]===0x0)return console[_0x127df7(0x1a6)](_0x127df7(0x246)),!_0x5c4e94&&console['error'](a46_0x303d4a[_0x127df7(0x2da)](_0x127df7(0x340))),0x1;const _0x23fecd=_0x34fc23[_0x127df7(0x287)](_0xeac0d7=>({'title':_0xeac0d7[_0x127df7(0x272)]?.[_0x127df7(0x20b)]+'.'+_0xeac0d7[_0x127df7(0x20b)],'value':_0xeac0d7[_0x127df7(0x272)]?.[_0x127df7(0x20b)]+'.'+_0xeac0d7[_0x127df7(0x20b)],'description':_0xeac0d7['revision']?'revision:\x20'+_0xeac0d7[_0x127df7(0x227)]:undefined})),_0xbe9bba=await a46_0x39082f({'type':'select','name':'workflow','message':_0x127df7(0x335),'choices':_0x23fecd});if(!_0xbe9bba[_0x127df7(0x228)])return 0x1;_0x47e28c=_0xbe9bba[_0x127df7(0x228)];}if(!_0x47e28c['includes']('.')){const _0x213b98=this['resolveProject']([],_0x467172);if(_0x213b98)_0x47e28c=_0x213b98+'.'+_0x47e28c;else return console[_0x127df7(0x1a6)](a46_0x303d4a[_0x127df7(0x2ef)](_0x127df7(0x295)),_0x127df7(0x273)),console[_0x127df7(0x1a6)](a46_0x303d4a['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x5083e9=_0x467172[_0x127df7(0x285)],_0x52fdc3=_0x467172['sessionTime'],_0x17bb46={};if(_0x5083e9&&Array['isArray'](_0x5083e9))for(const _0x8bc2b5 of _0x5083e9){const _0x117236=_0x8bc2b5['indexOf']('=');if(_0x117236===-0x1)return console[_0x127df7(0x1a6)](_0x127df7(0x264)+_0x8bc2b5),console['error'](_0x127df7(0x2e6)),0x1;const _0xd346bc=_0x8bc2b5['substring'](0x0,_0x117236),_0x293c27=_0x8bc2b5[_0x127df7(0x31e)](_0x117236+0x1);try{_0x17bb46[_0xd346bc]=JSON[_0x127df7(0x1a2)](_0x293c27);}catch{_0x17bb46[_0xd346bc]=_0x293c27;}}_0x467172['verbose']&&(console[_0x127df7(0x1a6)](_0x127df7(0x2de)+_0x47e28c),Object[_0x127df7(0x317)](_0x17bb46)['length']>0x0&&console[_0x127df7(0x1a6)](_0x127df7(0x2df)+JSON[_0x127df7(0x208)](_0x17bb46)),_0x52fdc3&&console[_0x127df7(0x1a6)](_0x127df7(0x271)+_0x52fdc3));const _0x5c0630=await withSpinner('Starting\x20workflow\x20run...',()=>_0x48b6ca[_0x127df7(0x228)][_0x127df7(0x32d)](_0x47e28c,_0x17bb46,{'sessionTime':_0x52fdc3}),{'verbose':_0x467172[_0x127df7(0x31d)]}),_0x1cd516=_0x5c0630[_0x127df7(0x261)];console[_0x127df7(0x1a6)](_0x127df7(0x24c)),console[_0x127df7(0x1a6)](_0x127df7(0x284)+_0x1cd516['id']),console['error'](_0x127df7(0x30f)+_0x1cd516[_0x127df7(0x269)]),console['error']('\x20\x20Project:\x20'+_0x1cd516[_0x127df7(0x272)]?.['name']),console['error']('\x20\x20Workflow:\x20'+_0x1cd516[_0x127df7(0x228)]?.['name']);if(_0x1cd516[_0x127df7(0x272)]?.['id']&&_0x1cd516[_0x127df7(0x269)]&&_0x1cd516['id']){const _0x52cb1f=_0x467172[_0x127df7(0x2b1)],_0x1dc24a=getConsoleUrl(_0x52cb1f,_0x127df7(0x1d8)+_0x1cd516['project']['id']+'/sessions/'+_0x1cd516['sessionId']+_0x127df7(0x232)+_0x1cd516['id']);console[_0x127df7(0x1a6)](_0x127df7(0x341)+a46_0x303d4a[_0x127df7(0x299)](_0x1dc24a));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x2ff);[a46_0x45121c(0x26a)]=a46_0x45121c(0x197);async['execute'](_0x15b917){const _0x1a0cfa=a46_0x45121c,{options:_0x514d45,args:_0xe8b216,tdx:_0x4859dd}=_0x15b917,_0xa2402c=_0xe8b216[0x0],_0x30804a=_0xe8b216[0x1]||'.';if(!_0xa2402c)return console[_0x1a0cfa(0x1a6)](_0x1a0cfa(0x2fa)),console['error'](_0x1a0cfa(0x1bb)),0x1;const _0x3c038e=_0x514d45[_0x1a0cfa(0x227)];_0x514d45[_0x1a0cfa(0x31d)]&&(console[_0x1a0cfa(0x1a6)](_0x1a0cfa(0x1c4)+_0xa2402c),console[_0x1a0cfa(0x1a6)](_0x1a0cfa(0x2e9)+_0x30804a),_0x3c038e&&console[_0x1a0cfa(0x1a6)](_0x1a0cfa(0x19b)+_0x3c038e));const _0x43c9f1=await withSpinner(_0x1a0cfa(0x2bc)+_0xa2402c+'...',()=>_0x4859dd['workflow'][_0x1a0cfa(0x258)](_0xa2402c,_0x30804a,{'revision':_0x3c038e}),{'verbose':_0x514d45['verbose']}),_0x3e8534=_0x43c9f1[_0x1a0cfa(0x261)];return console[_0x1a0cfa(0x1a6)](_0x1a0cfa(0x2b2)+_0x3e8534[_0x1a0cfa(0x324)]),console['error'](_0x1a0cfa(0x27c)+_0x3e8534[_0x1a0cfa(0x227)]),console[_0x1a0cfa(0x1a6)](_0x1a0cfa(0x277)+_0x3e8534[_0x1a0cfa(0x229)]),console['error'](_0x1a0cfa(0x254)+_0x30804a+'/'+_0x3e8534['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a46_0x45121c(0x1b6);[a46_0x45121c(0x26a)]=a46_0x45121c(0x1a8);async['execute'](_0xd4957b){const _0x2442f9=a46_0x45121c,{options:_0x136699,args:_0x4b4cbf,tdx:_0x4bcc07}=_0xd4957b;let _0x5613c0='.',_0x57d0c3=_0x136699[_0x2442f9(0x20b)];if(_0x4b4cbf[0x0]){const {promises:_0x36b9da}=await import('fs');try{const _0x5ae63a=await _0x36b9da[_0x2442f9(0x2af)](_0x4b4cbf[0x0]);if(_0x5ae63a[_0x2442f9(0x283)]())_0x5613c0=_0x4b4cbf[0x0];else return console[_0x2442f9(0x1a6)](_0x2442f9(0x1eb)+_0x4b4cbf[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x57d0c3=_0x4b4cbf[0x0],_0x5613c0='.';}}const _0x57744f=_0x136699['revision'],_0x4832bd=_0x136699[_0x2442f9(0x1c0)];_0x136699[_0x2442f9(0x31d)]&&(console[_0x2442f9(0x1a6)]('Project\x20directory:\x20'+_0x5613c0),_0x57d0c3&&console[_0x2442f9(0x1a6)](_0x2442f9(0x196)+_0x57d0c3),_0x57744f&&console[_0x2442f9(0x1a6)]('Revision:\x20'+_0x57744f),_0x4832bd&&console[_0x2442f9(0x1a6)]('Validation:\x20skipped'));const _0x3550c9=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x4bcc07['workflow'][_0x2442f9(0x296)](_0x5613c0,{'projectName':_0x57d0c3,'revision':_0x57744f,'skipValidation':_0x4832bd}),{'verbose':_0x136699[_0x2442f9(0x31d)]}),_0x1bd07b=_0x3550c9['data'];return console[_0x2442f9(0x1a6)](_0x2442f9(0x235)+_0x1bd07b[_0x2442f9(0x324)]),console[_0x2442f9(0x1a6)](_0x2442f9(0x310)+_0x1bd07b[_0x2442f9(0x318)]),console[_0x2442f9(0x1a6)]('\x20\x20Revision:\x20'+_0x1bd07b[_0x2442f9(0x227)]),await this[_0x2442f9(0x2c1)](_0x4bcc07,_0x1bd07b['projectName'],_0x136699[_0x2442f9(0x2b1)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a46_0x45121c(0x20b)]='workflow:pull';[a46_0x45121c(0x26a)]=a46_0x45121c(0x2b8);async[a46_0x45121c(0x2d9)](_0x111184){const _0x25f939=a46_0x45121c,{options:_0x5350c5,args:_0x5740c7,tdx:_0x1944f8}=_0x111184,_0x489440=_0x5740c7[0x0],_0x537d12=_0x5740c7[0x1];if(!_0x489440)return console[_0x25f939(0x1a6)](a46_0x303d4a[_0x25f939(0x2ef)](_0x25f939(0x295)),_0x25f939(0x2f6)),console['error'](a46_0x303d4a[_0x25f939(0x2da)](_0x25f939(0x30c))),0x1;const _0x216e5b=_0x5350c5[_0x25f939(0x227)];_0x5350c5[_0x25f939(0x31d)]&&(console['error'](_0x25f939(0x1c4)+_0x489440),_0x537d12&&console[_0x25f939(0x1a6)](_0x25f939(0x32e)+_0x537d12),_0x216e5b&&console[_0x25f939(0x1a6)](_0x25f939(0x19b)+_0x216e5b),_0x5350c5['dryRun']&&console[_0x25f939(0x1a6)]('Dry\x20run:\x20yes'));const _0x2c8d45=await withSpinner('Pulling\x20project\x20'+_0x489440+_0x25f939(0x22a),()=>_0x1944f8[_0x25f939(0x228)][_0x25f939(0x28e)](_0x489440,{'targetDir':_0x537d12,'revision':_0x216e5b}),{'verbose':_0x5350c5[_0x25f939(0x31d)]}),_0x2e72df=_0x2c8d45[_0x25f939(0x261)];_0x2e72df['isNewProject']?console['error'](_0x25f939(0x279)+_0x2e72df[_0x25f939(0x324)]):console[_0x25f939(0x1a6)](_0x25f939(0x223)+_0x2e72df[_0x25f939(0x324)]);console[_0x25f939(0x1a6)](_0x25f939(0x27c)+_0x2e72df['revision']),console[_0x25f939(0x1a6)]('\x20\x20Target:\x20'+(a46_0x2e56ba[_0x25f939(0x1f5)](process['cwd'](),_0x2e72df['targetDir'])||'.')),console['error'](_0x25f939(0x323)+a46_0x303d4a[_0x25f939(0x2f9)]('+'+_0x2e72df[_0x25f939(0x2b7)][_0x25f939(0x2fb)]+_0x25f939(0x21a))+',\x20'+(a46_0x303d4a[_0x25f939(0x1b0)]('~'+_0x2e72df[_0x25f939(0x2b7)]['modified']+_0x25f939(0x2bf))+',\x20')+(a46_0x303d4a[_0x25f939(0x2ef)]('-'+_0x2e72df[_0x25f939(0x2b7)][_0x25f939(0x22d)]+_0x25f939(0x292))+',\x20')+(''+a46_0x303d4a['dim'](_0x2e72df[_0x25f939(0x2b7)]['unchanged']+'\x20unchanged')));for(const _0xdfd770 of _0x2e72df[_0x25f939(0x30b)]){_0xdfd770['type']==='modified'&&_0xdfd770[_0x25f939(0x1aa)]&&(console[_0x25f939(0x1a6)]('\x0a'+a46_0x303d4a[_0x25f939(0x299)](_0x25f939(0x1b1)+_0xdfd770['path'])),console[_0x25f939(0x1a6)](_0xdfd770[_0x25f939(0x1aa)]));}if(!_0x2e72df[_0x25f939(0x298)])return saveSessionContext({'workflow_project':_0x2e72df[_0x25f939(0x324)]},_0x5350c5[_0x25f939(0x2a7)]),console[_0x25f939(0x1a6)](a46_0x303d4a[_0x25f939(0x2f9)](_0x25f939(0x2c5))),console[_0x25f939(0x1a6)](a46_0x303d4a[_0x25f939(0x2da)](_0x25f939(0x301)+_0x2e72df[_0x25f939(0x324)])),0x0;if(_0x5350c5[_0x25f939(0x343)])return console[_0x25f939(0x1a6)](a46_0x303d4a['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x5350c5[_0x25f939(0x2eb)]){if(!isInteractive())return console[_0x25f939(0x1a6)](a46_0x303d4a[_0x25f939(0x2ef)]('\x0aError:'),_0x25f939(0x219)),console[_0x25f939(0x1a6)](a46_0x303d4a['dim'](_0x25f939(0x1f8))),0x1;const _0x28a1e2=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x28a1e2)return console[_0x25f939(0x1a6)](a46_0x303d4a[_0x25f939(0x1b0)](_0x25f939(0x23d)),_0x25f939(0x2e4)),0x1;}await withSpinner(_0x25f939(0x1b3),()=>_0x1944f8[_0x25f939(0x228)][_0x25f939(0x2e8)](_0x2e72df,{'revision':_0x216e5b}),{'verbose':_0x5350c5[_0x25f939(0x31d)]}),saveSessionContext({'workflow_project':_0x2e72df[_0x25f939(0x324)]},_0x5350c5['session']),console['error'](a46_0x303d4a['green'](_0x25f939(0x342)));const _0xb61b45=a46_0x2e56ba[_0x25f939(0x1f5)](process[_0x25f939(0x1a9)](),_0x2e72df[_0x25f939(0x2e0)])||'.';return console[_0x25f939(0x1a6)](a46_0x303d4a[_0x25f939(0x2da)]('\x20\x20Location:\x20'+_0xb61b45)),console[_0x25f939(0x1a6)](a46_0x303d4a[_0x25f939(0x2da)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x2e72df['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x29e);[a46_0x45121c(0x26a)]=a46_0x45121c(0x32b);async[a46_0x45121c(0x2d9)](_0xc45504){const _0x19221e=a46_0x45121c,{options:_0x250f16,args:_0x1e3977,tdx:_0xe7bc97}=_0xc45504,_0x52ff7e=this[_0x19221e(0x331)](_0x1e3977,_0x250f16),_0x23de60=_0x250f16['revision'],_0x2dd626=_0x250f16[_0x19221e(0x1c0)];_0x250f16[_0x19221e(0x31d)]&&(_0x52ff7e&&console['error'](_0x19221e(0x1d2)+_0x52ff7e),_0x23de60&&console[_0x19221e(0x1a6)](_0x19221e(0x19b)+_0x23de60),_0x250f16[_0x19221e(0x343)]&&console['error'](_0x19221e(0x21b)),_0x2dd626&&console[_0x19221e(0x1a6)](_0x19221e(0x241)));let _0x2ca2f2;try{_0x2ca2f2=await withSpinner(_0x19221e(0x23b),()=>_0xe7bc97[_0x19221e(0x228)]['preparePushProject']({'sourceDir':_0x52ff7e,'revision':_0x23de60,'skipValidation':_0x2dd626}),{'verbose':_0x250f16[_0x19221e(0x31d)]});}catch(_0x5bf973){if(_0x5bf973 instanceof Error&&_0x5bf973[_0x19221e(0x1e4)]['includes'](_0x19221e(0x21e)))return console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x2ef)](_0x19221e(0x295)),_0x19221e(0x215)),_0x250f16[_0x19221e(0x322)]?console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x2da)]('Tip:\x20cd\x20to\x20workflows/'+_0x250f16[_0x19221e(0x322)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x250f16[_0x19221e(0x322)]+'\x27')):console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x2da)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x5bf973;}const _0x213f66=_0x2ca2f2[_0x19221e(0x261)];console[_0x19221e(0x1a6)](_0x19221e(0x347)+_0x213f66[_0x19221e(0x324)]),console['error'](_0x19221e(0x2e3)+_0x213f66[_0x19221e(0x249)]),console[_0x19221e(0x1a6)]('\x20\x20Revision:\x20'+_0x213f66[_0x19221e(0x227)]),console[_0x19221e(0x1a6)](_0x19221e(0x323)+a46_0x303d4a['green']('+'+_0x213f66[_0x19221e(0x2b7)][_0x19221e(0x2fb)]+_0x19221e(0x21a))+',\x20'+(a46_0x303d4a[_0x19221e(0x1b0)]('~'+_0x213f66[_0x19221e(0x2b7)][_0x19221e(0x1e9)]+_0x19221e(0x2bf))+',\x20')+(a46_0x303d4a[_0x19221e(0x2ef)]('-'+_0x213f66[_0x19221e(0x2b7)][_0x19221e(0x22d)]+_0x19221e(0x292))+',\x20')+(''+a46_0x303d4a[_0x19221e(0x2da)](_0x213f66[_0x19221e(0x2b7)][_0x19221e(0x348)]+_0x19221e(0x23c))));for(const _0x365f7b of _0x213f66[_0x19221e(0x30b)]){_0x365f7b[_0x19221e(0x1dd)]===_0x19221e(0x1e9)&&_0x365f7b['diff']&&(console[_0x19221e(0x1a6)]('\x0a'+a46_0x303d4a[_0x19221e(0x299)](_0x19221e(0x1b1)+_0x365f7b[_0x19221e(0x29f)])),console['error'](_0x365f7b[_0x19221e(0x1aa)]));}if(!_0x213f66[_0x19221e(0x298)])return console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x2f9)](_0x19221e(0x202))),await this[_0x19221e(0x2c1)](_0xe7bc97,_0x213f66[_0x19221e(0x324)],_0x250f16[_0x19221e(0x2b1)]),0x0;if(_0x250f16['dryRun'])return console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x1b0)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x250f16[_0x19221e(0x2eb)]){if(!isInteractive())return console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x2ef)]('\x0aError:'),_0x19221e(0x219)),console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x2da)](_0x19221e(0x1f8))),0x1;const _0x586802=await confirmKey(_0x19221e(0x280));if(!_0x586802)return console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x1b0)](_0x19221e(0x23d)),_0x19221e(0x1f3)),0x1;}const _0x5396fc=await withSpinner('Pushing\x20project...',()=>_0xe7bc97[_0x19221e(0x228)][_0x19221e(0x19e)](_0x213f66),{'verbose':_0x250f16[_0x19221e(0x31d)]}),_0x3de662=_0x5396fc[_0x19221e(0x261)];return console[_0x19221e(0x1a6)](a46_0x303d4a[_0x19221e(0x2f9)](_0x19221e(0x1e7))),console[_0x19221e(0x1a6)](_0x19221e(0x310)+_0x3de662[_0x19221e(0x318)]),console[_0x19221e(0x1a6)](_0x19221e(0x27c)+_0x3de662['revision']),await this[_0x19221e(0x2c1)](_0xe7bc97,_0x3de662[_0x19221e(0x324)],_0x250f16[_0x19221e(0x2b1)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x2c9);[a46_0x45121c(0x26a)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a46_0x45121c(0x2d9)](_0x3f59a7){const _0x5e6005=a46_0x45121c,{options:_0x3c549d,args:_0xef2098,tdx:_0x4161fa}=_0x3f59a7,_0x3a1baf=this['resolveProjectDir'](_0xef2098,_0x3c549d),_0x485c10=_0x3c549d['name'],_0x3af637=_0x3c549d[_0x5e6005(0x227)],_0x183b57=_0x3c549d['skipValidation'];if(!_0x3a1baf)return console['error'](a46_0x303d4a['red']('Error:'),'Source\x20directory\x20is\x20required'),console[_0x5e6005(0x1a6)](a46_0x303d4a['dim'](_0x5e6005(0x2db))),console[_0x5e6005(0x1a6)](a46_0x303d4a['dim'](_0x5e6005(0x1d9))),0x1;if(!_0x485c10)return console[_0x5e6005(0x1a6)](a46_0x303d4a[_0x5e6005(0x2ef)](_0x5e6005(0x295)),_0x5e6005(0x2ab)),console[_0x5e6005(0x1a6)](a46_0x303d4a[_0x5e6005(0x2da)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x3c549d['verbose']&&(console[_0x5e6005(0x1a6)](_0x5e6005(0x1d2)+_0x3a1baf),console[_0x5e6005(0x1a6)](_0x5e6005(0x2be)+_0x485c10),_0x3af637&&console['error']('Revision:\x20'+_0x3af637),_0x3c549d[_0x5e6005(0x343)]&&console[_0x5e6005(0x1a6)](_0x5e6005(0x21b)),_0x183b57&&console[_0x5e6005(0x1a6)](_0x5e6005(0x241)));const _0x124ed8=await withSpinner('Analyzing\x20project...',()=>_0x4161fa[_0x5e6005(0x228)][_0x5e6005(0x224)](_0x3a1baf,_0x485c10,{'revision':_0x3af637,'skipValidation':_0x183b57}),{'verbose':_0x3c549d[_0x5e6005(0x31d)]}),_0x13ecd2=_0x124ed8['data'];console['error'](_0x5e6005(0x2ac)+_0x13ecd2['sourceDir']);_0x13ecd2[_0x5e6005(0x31a)]&&console[_0x5e6005(0x1a6)](_0x5e6005(0x306)+_0x13ecd2[_0x5e6005(0x31a)]);console[_0x5e6005(0x1a6)](_0x5e6005(0x2be)+_0x13ecd2[_0x5e6005(0x20d)]),console[_0x5e6005(0x1a6)](_0x5e6005(0x19b)+_0x13ecd2[_0x5e6005(0x227)]),console[_0x5e6005(0x1a6)](_0x5e6005(0x27a)+_0x13ecd2[_0x5e6005(0x33d)]);_0x13ecd2[_0x5e6005(0x239)]&&(console['error'](a46_0x303d4a[_0x5e6005(0x1b0)](_0x5e6005(0x1ca)+_0x13ecd2[_0x5e6005(0x20d)]+_0x5e6005(0x252)+_0x13ecd2[_0x5e6005(0x200)]+')')),console[_0x5e6005(0x1a6)](a46_0x303d4a['yellow']('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x3c549d[_0x5e6005(0x343)])return console[_0x5e6005(0x1a6)](a46_0x303d4a[_0x5e6005(0x1b0)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x3c549d['yes']){if(!isInteractive())return console[_0x5e6005(0x1a6)](a46_0x303d4a[_0x5e6005(0x2ef)]('\x0aError:'),_0x5e6005(0x219)),console['error'](a46_0x303d4a[_0x5e6005(0x2da)](_0x5e6005(0x1f8))),0x1;const _0x49bb2a=_0x13ecd2[_0x5e6005(0x31a)]||a46_0x2e56ba[_0x5e6005(0x333)](_0x3a1baf),_0x3c9781=_0x13ecd2[_0x5e6005(0x239)]?_0x5e6005(0x203)+_0x485c10+_0x5e6005(0x33e):_0x5e6005(0x1ed)+_0x49bb2a+'\x22\x20to\x20new\x20project\x20\x22'+_0x485c10+'\x22?',_0x54ca3d=await confirmKey(_0x3c9781);if(!_0x54ca3d)return console[_0x5e6005(0x1a6)](a46_0x303d4a[_0x5e6005(0x1b0)](_0x5e6005(0x23d))),0x1;}const _0x523fe6=await withSpinner(_0x13ecd2[_0x5e6005(0x239)]?_0x5e6005(0x25c)+_0x485c10+'...':_0x5e6005(0x28f)+_0x485c10+_0x5e6005(0x22a),()=>_0x4161fa['workflow'][_0x5e6005(0x1fe)](_0x13ecd2),{'verbose':_0x3c549d[_0x5e6005(0x31d)]}),_0x38315f=_0x523fe6[_0x5e6005(0x261)];return console['error'](a46_0x303d4a[_0x5e6005(0x2f9)](_0x13ecd2[_0x5e6005(0x239)]?_0x5e6005(0x1fa):'✔\x20Clone\x20complete')),console[_0x5e6005(0x1a6)](_0x5e6005(0x266)+_0x38315f['newProjectName']),console[_0x5e6005(0x1a6)](_0x5e6005(0x310)+_0x38315f[_0x5e6005(0x28b)]),console[_0x5e6005(0x1a6)](_0x5e6005(0x27c)+_0x38315f[_0x5e6005(0x227)]),await this['showWorkflowConsoleUrl'](_0x4161fa,_0x38315f[_0x5e6005(0x20d)],_0x3c549d[_0x5e6005(0x2b1)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a46_0x45121c(0x20b)]='workflow:delete';[a46_0x45121c(0x26a)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a46_0x45121c(0x2d9)](_0xb55373){const _0x1473dd=a46_0x45121c,{options:_0x45a644,args:_0x46e57f,tdx:_0x158b72}=_0xb55373,_0x2c05d8=_0x46e57f[0x0];if(!_0x2c05d8)return console[_0x1473dd(0x1a6)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x1473dd(0x1a6)](_0x1473dd(0x2d1)),0x1;_0x45a644[_0x1473dd(0x31d)]&&console[_0x1473dd(0x1a6)]('Project:\x20'+_0x2c05d8);if(!_0x45a644[_0x1473dd(0x2eb)]){if(!isInteractive())return console[_0x1473dd(0x1a6)](a46_0x303d4a[_0x1473dd(0x2ef)](_0x1473dd(0x319)),_0x1473dd(0x219)),console[_0x1473dd(0x1a6)](a46_0x303d4a[_0x1473dd(0x2da)](_0x1473dd(0x1f8))),0x1;const _0x4a5cac=await confirmKey(_0x1473dd(0x290)+_0x2c05d8+_0x1473dd(0x240));if(!_0x4a5cac)return console['error'](a46_0x303d4a[_0x1473dd(0x1b0)](_0x1473dd(0x23d))),0x1;}const _0x139588=await withSpinner(_0x1473dd(0x337)+_0x2c05d8+'...',()=>_0x158b72[_0x1473dd(0x228)][_0x1473dd(0x316)](_0x2c05d8),{'verbose':_0x45a644['verbose']}),_0x452390=_0x139588[_0x1473dd(0x261)];return console['error'](_0x1473dd(0x247)+_0x452390[_0x1473dd(0x324)]),console[_0x1473dd(0x1a6)](_0x1473dd(0x310)+_0x452390['projectId']),0x0;}}export function parseKeyValue(_0x23f533){const _0x5c303d=a46_0x45121c,_0x4096c8=_0x23f533[_0x5c303d(0x289)]('=');if(_0x4096c8===-0x1)throw new Error(_0x5c303d(0x2cf)+_0x23f533+'.\x20Expected\x20format:\x20KEY=VALUE');const _0xb0fcdf=_0x23f533['substring'](0x0,_0x4096c8),_0x194e01=_0x23f533['substring'](_0x4096c8+0x1);if(!_0xb0fcdf)throw new Error(_0x5c303d(0x345));return{'key':_0xb0fcdf,'value':_0x194e01};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a46_0x45121c(0x2a8);['description']=a46_0x45121c(0x259);async['execute'](_0x2f8902){const _0x39bdf7=a46_0x45121c,{options:_0x158f64,args:_0x16d9e2,tdx:_0x128537}=_0x2f8902,_0x397e6b=this[_0x39bdf7(0x27b)](_0x16d9e2,_0x158f64);if(!_0x397e6b)return 0x1;_0x158f64['verbose']&&console[_0x39bdf7(0x1a6)]('Project:\x20'+_0x397e6b);const _0x3da495=await withSpinner('Listing\x20secrets...',()=>_0x128537['workflow'][_0x39bdf7(0x2fc)](_0x397e6b),{'verbose':_0x158f64['verbose']}),{secrets:_0x469cb3}=_0x3da495[_0x39bdf7(0x261)];return console[_0x39bdf7(0x1a6)]('✔\x20Found\x20'+_0x469cb3[_0x39bdf7(0x1e6)]+_0x39bdf7(0x2c6)+(_0x469cb3[_0x39bdf7(0x1e6)]!==0x1?'s':'')),await handleSDKOutput(_0x469cb3,_0x158f64),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a46_0x45121c(0x214);[a46_0x45121c(0x26a)]=a46_0x45121c(0x2e1);async[a46_0x45121c(0x2d9)](_0x1e8140){const _0x4dc527=a46_0x45121c,{options:_0x1798ad,args:_0x5cc1d9,tdx:_0x5284af}=_0x1e8140;let _0x2216c5,_0x1bf3bf;if(_0x5cc1d9['length']>=0x2)_0x2216c5=_0x5cc1d9[0x0],_0x1bf3bf=_0x5cc1d9[0x1];else{if(_0x5cc1d9[_0x4dc527(0x1e6)]===0x1&&_0x1798ad[_0x4dc527(0x322)])_0x2216c5=_0x1798ad[_0x4dc527(0x322)],_0x1bf3bf=_0x5cc1d9[0x0];else return _0x5cc1d9['length']===0x1?(console[_0x4dc527(0x1a6)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x4dc527(0x1a6)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error'](_0x4dc527(0x1c2)),console[_0x4dc527(0x1a6)](_0x4dc527(0x1bd)),0x1);}let _0x1d2689,_0x4cad61;try{({key:_0x1d2689,value:_0x4cad61}=parseKeyValue(_0x1bf3bf));}catch(_0x58206e){return _0x58206e instanceof Error&&console['error'](a46_0x303d4a[_0x4dc527(0x2ef)](_0x4dc527(0x295)),_0x58206e['message']),0x1;}_0x1798ad[_0x4dc527(0x31d)]&&(console[_0x4dc527(0x1a6)](_0x4dc527(0x1c4)+_0x2216c5),console['error'](_0x4dc527(0x268)+_0x1d2689));const _0x46a8a4=await withSpinner('Setting\x20secret...',()=>_0x5284af[_0x4dc527(0x228)][_0x4dc527(0x1c6)](_0x2216c5,_0x1d2689,_0x4cad61),{'verbose':_0x1798ad['verbose']}),_0x1ff5e9=_0x46a8a4['data'];return console['error'](_0x4dc527(0x2dc)+_0x1ff5e9['key']+_0x4dc527(0x1ae)+_0x1ff5e9[_0x4dc527(0x324)]+'\x27'),(_0x1798ad['json']||_0x1798ad[_0x4dc527(0x1d0)])&&await handleSingleObjectOutput(_0x1ff5e9,_0x1798ad),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a46_0x45121c(0x2a0);[a46_0x45121c(0x26a)]=a46_0x45121c(0x293);async['execute'](_0x5e120f){const _0x3e3574=a46_0x45121c,{options:_0x45528a,args:_0x1bcc78,tdx:_0x4edba0}=_0x5e120f;let _0x59f4ed,_0x34a915;if(_0x1bcc78['length']>=0x2)_0x59f4ed=_0x1bcc78[0x0],_0x34a915=_0x1bcc78[0x1];else{if(_0x1bcc78[_0x3e3574(0x1e6)]===0x1&&_0x45528a[_0x3e3574(0x322)])_0x59f4ed=_0x45528a[_0x3e3574(0x322)],_0x34a915=_0x1bcc78[0x0];else return _0x1bcc78[_0x3e3574(0x1e6)]===0x1?(console['error'](_0x3e3574(0x2fa)),console[_0x3e3574(0x1a6)](_0x3e3574(0x340)),0x1):(console[_0x3e3574(0x1a6)](_0x3e3574(0x1f0)),console[_0x3e3574(0x1a6)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x45528a['verbose']&&(console['error'](_0x3e3574(0x1c4)+_0x59f4ed),console[_0x3e3574(0x1a6)](_0x3e3574(0x268)+_0x34a915));if(!_0x45528a['yes']){if(!isInteractive())return console[_0x3e3574(0x1a6)](a46_0x303d4a['red']('\x0aError:'),_0x3e3574(0x219)),console[_0x3e3574(0x1a6)](a46_0x303d4a[_0x3e3574(0x2da)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x11df4a=await confirmKey(_0x3e3574(0x314)+_0x34a915+_0x3e3574(0x1e5)+_0x59f4ed+'\x27?');if(!_0x11df4a)return console[_0x3e3574(0x1a6)](a46_0x303d4a[_0x3e3574(0x1b0)]('Cancelled')),0x1;}const _0x31d014=await withSpinner(_0x3e3574(0x30a),()=>_0x4edba0[_0x3e3574(0x228)][_0x3e3574(0x1be)](_0x59f4ed,_0x34a915),{'verbose':_0x45528a[_0x3e3574(0x31d)]}),_0x524aa2=_0x31d014[_0x3e3574(0x261)];return console[_0x3e3574(0x1a6)](_0x3e3574(0x2dc)+_0x524aa2[_0x3e3574(0x2f8)]+_0x3e3574(0x281)+_0x524aa2[_0x3e3574(0x324)]+'\x27'),(_0x45528a['json']||_0x45528a['jsonl'])&&await handleSingleObjectOutput(_0x524aa2,_0x45528a),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(_0x2d2f9e){const _0x1681fa=a46_0x45121c,_0x1a0abc=Math[_0x1681fa(0x222)](_0x2d2f9e/0x3e8),_0x101b47=Math['floor'](_0x1a0abc/0x3c),_0x4b1e8d=Math[_0x1681fa(0x222)](_0x101b47/0x3c),_0x2a565b=Math[_0x1681fa(0x222)](_0x4b1e8d/0x18);if(_0x2a565b>0x0){const _0x9676bf=_0x4b1e8d%0x18;return _0x9676bf>0x0?_0x2a565b+'d\x20'+_0x9676bf+'h':_0x2a565b+'d';}else{if(_0x4b1e8d>0x0){const _0x1fcf57=_0x101b47%0x3c;return _0x1fcf57>0x0?_0x4b1e8d+'h\x20'+_0x1fcf57+'m':_0x4b1e8d+'h';}else{if(_0x101b47>0x0){const _0x34c342=_0x1a0abc%0x3c;return _0x34c342>0x0?_0x101b47+'m\x20'+_0x34c342+'s':_0x101b47+'m';}else return _0x1a0abc+'s';}}}function formatTimestamp(_0x45b3b1,_0x3574b2){const _0x270756=a46_0x45121c,_0x14c9bd=new Date(_0x45b3b1),_0x4d912f=String(_0x14c9bd[_0x270756(0x1e3)]())[_0x270756(0x346)](0x2,'0'),_0x339c00=String(_0x14c9bd[_0x270756(0x276)]())[_0x270756(0x346)](0x2,'0'),_0x2adb41=_0x4d912f+':'+_0x339c00,_0x3c0c61=_0x14c9bd[_0x270756(0x2bb)]()===_0x3574b2['getFullYear']()&&_0x14c9bd[_0x270756(0x20e)]()===_0x3574b2[_0x270756(0x20e)]()&&_0x14c9bd[_0x270756(0x33c)]()===_0x3574b2['getDate']();if(_0x3c0c61)return _0x2adb41;else{const _0x4d95ae=String(_0x14c9bd[_0x270756(0x20e)]()+0x1)[_0x270756(0x346)](0x2,'0'),_0x8665f7=String(_0x14c9bd['getDate']())['padStart'](0x2,'0');return _0x4d95ae+'-'+_0x8665f7+'\x20'+_0x2adb41;}}function formatDate(_0x36d0){const _0x411988=a46_0x45121c,_0x287891=_0x36d0[_0x411988(0x2bb)](),_0x419bba=String(_0x36d0['getMonth']()+0x1)[_0x411988(0x346)](0x2,'0'),_0x192147=String(_0x36d0[_0x411988(0x33c)]())[_0x411988(0x346)](0x2,'0');return _0x287891+'-'+_0x419bba+'-'+_0x192147;}function getTaskStateIcon(_0x24e1f5){const _0x118e03={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x118e03[_0x24e1f5]||'⚪';}function getBarChar(_0x5eecee){const _0x4ac9a0=a46_0x45121c;return _0x5eecee===_0x4ac9a0(0x1a6)||_0x5eecee===_0x4ac9a0(0x2b0)?'×':'─';}function getBarColor(_0x47715f){const _0x304566=a46_0x45121c,_0x48ad51={'success':a46_0x303d4a[_0x304566(0x2f9)],'error':a46_0x303d4a[_0x304566(0x2ef)],'group_error':a46_0x303d4a[_0x304566(0x2ef)],'running':a46_0x303d4a[_0x304566(0x1c7)],'blocked':a46_0x303d4a[_0x304566(0x1b0)],'planned':a46_0x303d4a[_0x304566(0x2da)],'canceling':a46_0x303d4a[_0x304566(0x1b0)]};return _0x48ad51[_0x47715f]||a46_0x303d4a['white'];}function parseTaskName(_0x55d40b){const _0x31f69b=a46_0x45121c;let _0x53bd14=_0x55d40b['replace'](/^\++/,'');const _0x54fc95=_0x53bd14[_0x31f69b(0x19c)]('+'),_0x5ec003=_0x54fc95['length']>0x1?_0x54fc95[_0x31f69b(0x1e6)]-0x2:0x0,_0x36f3f=_0x54fc95[_0x54fc95[_0x31f69b(0x1e6)]-0x1]||_0x53bd14;return{'level':_0x5ec003,'name':'+'+_0x36f3f};}function truncateTaskName(_0x3cc5a5,_0x128ade){const _0xcc561c=a46_0x45121c,_0x5351b9=stringWidth(_0x3cc5a5);if(_0x5351b9<=_0x128ade)return _0x3cc5a5;let _0x4b31f9=_0x3cc5a5;while(stringWidth(_0x4b31f9+'…')>_0x128ade&&_0x4b31f9[_0xcc561c(0x1e6)]>0x0){_0x4b31f9=_0x4b31f9['slice'](0x0,-0x1);}return _0x4b31f9+'…';}function calculateTimeScale(_0x4b5e20,_0x2ee42e){const _0x1e50c3=a46_0x45121c;return{'startTime':_0x4b5e20[_0x1e50c3(0x1ad)],'endTime':_0x4b5e20[_0x1e50c3(0x2c2)],'durationMs':_0x4b5e20[_0x1e50c3(0x1f4)],'msPerChar':_0x4b5e20[_0x1e50c3(0x1f4)]/_0x2ee42e};}function timeToPosition(_0x4a9666,_0x8c6fd3,_0x49c9c4){const _0x36ddd8=a46_0x45121c,_0x490d9b=_0x4a9666-_0x8c6fd3[_0x36ddd8(0x274)],_0x3b343c=Math[_0x36ddd8(0x222)](_0x490d9b/_0x8c6fd3[_0x36ddd8(0x336)]);return Math['max'](0x0,Math[_0x36ddd8(0x1b8)](_0x3b343c,_0x49c9c4));}function a46_0x1beb(_0x9e56f,_0x3b36e8){_0x9e56f=_0x9e56f-0x196;const _0x43f532=a46_0x43f5();let _0x1beb1b=_0x43f532[_0x9e56f];return _0x1beb1b;}function renderTimeAxis(_0x4a4148,_0x1581b2){const _0x43f14f=a46_0x45121c,_0x563f00=Math['min'](TIMELINE_CONFIG[_0x43f14f(0x1d6)],Math[_0x43f14f(0x23a)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x43f14f(0x222)](_0x1581b2/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x414b95=_0x4a4148[_0x43f14f(0x26e)]/(_0x563f00-0x1),_0x527c73=new Date(_0x4a4148[_0x43f14f(0x274)]),_0x44700d=[];for(let _0x167943=0x0;_0x167943<_0x563f00;_0x167943++){const _0x2b239d=_0x4a4148[_0x43f14f(0x274)]+_0x167943*_0x414b95,_0x2813ba=timeToPosition(_0x2b239d,_0x4a4148,_0x1581b2),_0x217ac2=formatTimestamp(_0x2b239d,_0x527c73);_0x44700d['push']({'pos':_0x2813ba,'text':_0x217ac2});}const _0x524bad=new Array(_0x1581b2)['fill']('\x20');let _0x1204de=-0x1;for(const {pos:_0x295ff8,text:_0x2a4d5f}of _0x44700d){let _0x388247=Math[_0x43f14f(0x23a)](0x0,_0x295ff8-Math['floor'](_0x2a4d5f[_0x43f14f(0x1e6)]/0x2));_0x388247<=_0x1204de+TIMELINE_CONFIG[_0x43f14f(0x2d0)]&&(_0x388247=_0x1204de+TIMELINE_CONFIG[_0x43f14f(0x2d0)]+0x1);_0x388247+_0x2a4d5f[_0x43f14f(0x1e6)]>_0x1581b2&&(_0x388247=_0x1581b2-_0x2a4d5f['length']);if(_0x388247>=0x0&&_0x388247+_0x2a4d5f[_0x43f14f(0x1e6)]<=_0x1581b2&&_0x388247>_0x1204de){for(let _0x124eb3=0x0;_0x124eb3<_0x2a4d5f[_0x43f14f(0x1e6)];_0x124eb3++){_0x524bad[_0x388247+_0x124eb3]=_0x2a4d5f[_0x124eb3];}_0x1204de=_0x388247+_0x2a4d5f['length']-0x1;}}return _0x524bad['join']('');}function renderTaskRow(_0x5327f6,_0x12cafb,_0x331905,_0x4fefb1){const _0x3c6f4a=a46_0x45121c,{level:_0x1a1ae2,name:_0x5996ba}=parseTaskName(_0x5327f6[_0x3c6f4a(0x20b)]),_0x4e2bda='\x20'['repeat'](_0x1a1ae2),_0x54a128=_0x5327f6['window']?'('+formatElapsed(_0x5327f6['window'][_0x3c6f4a(0x1f4)])+')':'',_0x3d63b5=stringWidth(_0x54a128),_0x196401=_0x1a1ae2*0x1,_0x331990=_0x4fefb1-_0x196401-_0x3d63b5-0x1,_0x1002f3=truncateTaskName(_0x5996ba,_0x331990),_0x50a03a=_0x4e2bda+_0x1002f3,_0x592aa6=stringWidth(_0x50a03a),_0x59a801=_0x4fefb1-_0x592aa6-_0x3d63b5,_0x1a4c8a=_0x50a03a+'\x20'[_0x3c6f4a(0x24b)](Math[_0x3c6f4a(0x23a)](0x1,_0x59a801))+a46_0x303d4a[_0x3c6f4a(0x2da)](_0x54a128),_0x45cc97=getTaskStateIcon(_0x5327f6['state']),_0x41d1c3=new Array(_0x331905)[_0x3c6f4a(0x242)]('\x20');if(_0x5327f6[_0x3c6f4a(0x1d3)]){const _0x3237e0=timeToPosition(_0x5327f6['window']['start'],_0x12cafb,_0x331905),_0x497ff2=timeToPosition(_0x5327f6[_0x3c6f4a(0x1d3)]['end'],_0x12cafb,_0x331905),_0x10534d=getBarChar(_0x5327f6[_0x3c6f4a(0x1b7)]),_0x2647ed=Math[_0x3c6f4a(0x23a)](_0x3237e0+0x1,_0x497ff2);for(let _0x2efd80=_0x3237e0;_0x2efd80<Math[_0x3c6f4a(0x1b8)](_0x2647ed,_0x331905);_0x2efd80++){_0x41d1c3[_0x2efd80]=_0x10534d;}}const _0x452685=getBarColor(_0x5327f6['state']),_0x4225b6=_0x41d1c3[_0x3c6f4a(0x287)](_0x1cc089=>_0x1cc089==='\x20'?'\x20':_0x452685(_0x1cc089))[_0x3c6f4a(0x1f7)]('');return _0x45cc97+'\x20'+_0x1a4c8a+'│'+_0x4225b6+'│';}function calculateStats(_0x2f5453){const _0x25f9d7=a46_0x45121c,_0x35ce3c={'total':_0x2f5453[_0x25f9d7(0x1e6)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3adc28 of _0x2f5453){if(_0x3adc28['state']===_0x25f9d7(0x2e5))_0x35ce3c[_0x25f9d7(0x2e5)]++;else{if(_0x3adc28[_0x25f9d7(0x1b7)]===_0x25f9d7(0x1a6)||_0x3adc28[_0x25f9d7(0x1b7)]===_0x25f9d7(0x2b0))_0x35ce3c['error']++;else _0x3adc28[_0x25f9d7(0x1b7)]===_0x25f9d7(0x2c0)?_0x35ce3c[_0x25f9d7(0x2c0)]++:_0x35ce3c[_0x25f9d7(0x1ba)]++;}}return _0x35ce3c;}function formatStats(_0x1fa703){const _0x4c27b7=a46_0x45121c;return['Total:\x20'+_0x1fa703[_0x4c27b7(0x2e2)],'✅\x20'+_0x1fa703['success'],'❌\x20'+_0x1fa703[_0x4c27b7(0x1a6)],'🔄\x20'+_0x1fa703[_0x4c27b7(0x2c0)],'⏳\x20'+_0x1fa703[_0x4c27b7(0x1ba)]][_0x4c27b7(0x1f7)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a46_0x45121c(0x20b)]=a46_0x45121c(0x209);[a46_0x45121c(0x26a)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async['execute'](_0x4556aa){const _0x2885c7=a46_0x45121c,{options:_0x12fcdf,args:_0x355333,tdx:_0x15bdfb}=_0x4556aa;let _0x4a3667,_0x2a5183,_0x42e855=![];if(_0x355333[0x0]){if(_0x355333[0x0][_0x2885c7(0x32a)]('.')){const _0x3b775c=this[_0x2885c7(0x297)](_0x355333,_0x12fcdf);if(!_0x3b775c)return 0x1;_0x4a3667=_0x3b775c[_0x2885c7(0x324)],_0x2a5183=_0x3b775c[_0x2885c7(0x29c)];}else{_0x2a5183=_0x355333[0x0],_0x4a3667=_0x12fcdf[_0x2885c7(0x322)];if(!_0x4a3667)return console['error'](a46_0x303d4a[_0x2885c7(0x2ef)]('Error:'),_0x2885c7(0x2d7)),0x1;_0x42e855=!![];}}else{const _0x4dfbe4=this[_0x2885c7(0x297)](_0x355333,_0x12fcdf);if(!_0x4dfbe4)return 0x1;_0x4a3667=_0x4dfbe4[_0x2885c7(0x324)],_0x2a5183=_0x4dfbe4[_0x2885c7(0x29c)];}if(_0x12fcdf['verbose']){if(_0x4a3667&&_0x2a5183)console[_0x2885c7(0x1a6)]('Filter:\x20'+_0x4a3667+'.'+_0x2a5183);else _0x4a3667&&console['error'](_0x2885c7(0x1a4)+_0x4a3667);}const _0x36bb3a=_0x12fcdf['attemptId'],_0x4b56cf=_0x12fcdf[_0x2885c7(0x269)];if(_0x36bb3a){_0x4b56cf&&console['error'](a46_0x303d4a[_0x2885c7(0x1b0)](_0x2885c7(0x334)),_0x2885c7(0x19a));const _0x3e0449=_0x12fcdf[_0x2885c7(0x1f1)];return _0x3e0449?await this[_0x2885c7(0x207)](_0x4556aa,_0x36bb3a):await this[_0x2885c7(0x1ab)](_0x4556aa,_0x36bb3a,_0x12fcdf),0x0;}if(_0x4b56cf){const _0x5bfeff=await withSpinner(_0x2885c7(0x245),()=>_0x15bdfb[_0x2885c7(0x228)][_0x2885c7(0x327)]({'projectName':_0x4a3667,'workflowName':_0x2a5183,'limit':0x64}),{'verbose':_0x12fcdf[_0x2885c7(0x31d)]}),_0x30158a=_0x5bfeff[_0x2885c7(0x261)][_0x2885c7(0x22c)](_0x4a70ac=>_0x4a70ac['id']===_0x4b56cf);if(!_0x30158a)return console[_0x2885c7(0x1a6)](a46_0x303d4a[_0x2885c7(0x2ef)]('Error:'),'Session\x20not\x20found:\x20'+_0x4b56cf),0x1;if(!_0x30158a[_0x2885c7(0x1df)]?.['id'])return console[_0x2885c7(0x1a6)](a46_0x303d4a[_0x2885c7(0x2ef)](_0x2885c7(0x295)),_0x2885c7(0x27f)+_0x4b56cf+_0x2885c7(0x312)),0x1;const _0x1c5098=_0x30158a[_0x2885c7(0x1df)]['id'];_0x12fcdf[_0x2885c7(0x31d)]&&console['error'](_0x2885c7(0x1c5)+_0x1c5098+_0x2885c7(0x25a)+_0x4b56cf);const _0x8bdb20=_0x12fcdf[_0x2885c7(0x1f1)];return _0x8bdb20?await this[_0x2885c7(0x207)](_0x4556aa,_0x1c5098):await this[_0x2885c7(0x1ab)](_0x4556aa,_0x1c5098,_0x12fcdf),0x0;}const _0x1e332b=await withSpinner('Loading\x20sessions...',()=>_0x15bdfb[_0x2885c7(0x228)][_0x2885c7(0x327)]({'projectName':_0x4a3667,'workflowName':_0x2a5183,'limit':_0x12fcdf[_0x2885c7(0x2f1)]||0x32}),{'verbose':_0x12fcdf[_0x2885c7(0x31d)]}),_0x5dc0a7=_0x1e332b[_0x2885c7(0x261)];if(_0x5dc0a7[_0x2885c7(0x1e6)]===0x0){if(_0x4a3667&&_0x2a5183)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x4a3667+'.'+_0x2a5183);else _0x4a3667?console[_0x2885c7(0x1a6)](_0x2885c7(0x2a1)+_0x4a3667):(console[_0x2885c7(0x1a6)](_0x2885c7(0x24a)),console[_0x2885c7(0x1a6)](a46_0x303d4a[_0x2885c7(0x2da)](_0x2885c7(0x1cb))));return 0x0;}_0x5dc0a7[_0x2885c7(0x2a4)]((_0x43a246,_0x49290b)=>{const _0x44be5b=_0x2885c7,_0x48aa92=_0x43a246[_0x44be5b(0x1cc)]||'',_0x58c566=_0x49290b[_0x44be5b(0x1cc)]||'';return _0x58c566[_0x44be5b(0x1ec)](_0x48aa92);});if(_0x12fcdf[_0x2885c7(0x1a5)]||_0x12fcdf[_0x2885c7(0x1d0)])return await handleSDKOutput(_0x5dc0a7,_0x12fcdf),0x0;let _0x248cdf;if(_0x42e855){const _0x5684c0=_0x5dc0a7[0x0];if(!_0x5684c0['lastAttempt']?.['id'])return console['error'](_0x2885c7(0x1bf)),0x0;_0x248cdf=_0x5684c0[_0x2885c7(0x1df)]['id'],_0x12fcdf[_0x2885c7(0x31d)]&&console[_0x2885c7(0x1a6)](_0x2885c7(0x25b)+_0x5684c0[_0x2885c7(0x1cc)]);}else{const _0x1dc387=_0x5dc0a7[_0x2885c7(0x287)](_0x23a8a7=>{const _0x2b6019=_0x2885c7,_0x27914f=getAttemptStatusDisplay(_0x23a8a7[_0x2b6019(0x1df)]);return{'title':_0x23a8a7['project']?.[_0x2b6019(0x20b)]+'.'+_0x23a8a7[_0x2b6019(0x228)]?.[_0x2b6019(0x20b)]+_0x2b6019(0x2f3)+_0x23a8a7[_0x2b6019(0x1cc)]+'\x20'+_0x27914f[_0x2b6019(0x221)],'value':_0x23a8a7[_0x2b6019(0x1df)]?.['id']||'','description':_0x27914f[_0x2b6019(0x2a6)]};}),_0x424a38=await a46_0x39082f({'type':_0x2885c7(0x244),'name':_0x2885c7(0x1a1),'message':_0x2885c7(0x31f),'choices':_0x1dc387[_0x2885c7(0x2bd)](_0x56528c=>_0x56528c['value']!=='')});if(!_0x424a38['attemptId'])return 0x0;_0x248cdf=_0x424a38[_0x2885c7(0x1a1)];}const _0x50ebde=_0x12fcdf[_0x2885c7(0x1f1)];return _0x50ebde?await this[_0x2885c7(0x207)](_0x4556aa,_0x248cdf):await this[_0x2885c7(0x1ab)](_0x4556aa,_0x248cdf,_0x12fcdf),0x0;}async[a46_0x45121c(0x1ab)](_0x2bb3d0,_0x10b866,_0x133988){const _0x2c7a3d=a46_0x45121c,{tdx:_0x1d3896}=_0x2bb3d0;let _0x406ec1,_0x40dfb9;try{[_0x406ec1,_0x40dfb9]=await Promise[_0x2c7a3d(0x226)]([_0x1d3896[_0x2c7a3d(0x228)][_0x2c7a3d(0x32c)](_0x10b866),_0x1d3896['workflow'][_0x2c7a3d(0x2d2)](_0x10b866,![])]);}catch(_0x9eaafa){console[_0x2c7a3d(0x1a6)](a46_0x303d4a['red'](_0x2c7a3d(0x302)));_0x133988[_0x2c7a3d(0x31d)]&&console[_0x2c7a3d(0x1a6)](_0x9eaafa);throw _0x9eaafa;}if(_0x133988[_0x2c7a3d(0x1a5)]||_0x133988[_0x2c7a3d(0x1d0)]){const _0x312bba=this[_0x2c7a3d(0x2fe)](_0x406ec1,_0x40dfb9);await handleSDKOutput([_0x312bba],_0x133988);return;}const _0x1b3221=_0x1d3896['context'][_0x2c7a3d(0x2b1)],_0x4a4e91=this['renderTimeline'](_0x406ec1,_0x40dfb9,_0x1b3221);console[_0x2c7a3d(0x1e0)](_0x4a4e91);}async['pollTimeline'](_0x5ee4ff,_0xbc1534){const _0x499def=a46_0x45121c,{tdx:_0x1ec2fa}=_0x5ee4ff,_0x3e2bac=TIMELINE_CONFIG[_0x499def(0x1a7)],_0x5ba6fe=TIMELINE_CONFIG[_0x499def(0x237)];let _0x10287c=0x0;while(_0x10287c<_0x5ba6fe){process['stdout'][_0x499def(0x216)]&&process[_0x499def(0x325)][_0x499def(0x1fc)]('\x1bc');let _0x291410,_0x4dd72f;try{[_0x291410,_0x4dd72f]=await Promise[_0x499def(0x226)]([_0x1ec2fa[_0x499def(0x228)][_0x499def(0x32c)](_0xbc1534),_0x1ec2fa[_0x499def(0x228)][_0x499def(0x2d2)](_0xbc1534,![])]);}catch(_0x594a2f){console[_0x499def(0x1a6)](a46_0x303d4a[_0x499def(0x2ef)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x10287c>0x0&&console[_0x499def(0x1a6)](a46_0x303d4a[_0x499def(0x2da)](_0x499def(0x332)+_0x10287c));throw _0x594a2f;}const _0x530dbe=_0x1ec2fa['context']['site'],_0x51a8e5=this[_0x499def(0x1bc)](_0x291410,_0x4dd72f,_0x530dbe);console[_0x499def(0x1e0)](_0x51a8e5);const _0x16e4d2=_0x291410['done']&&_0x4dd72f[_0x499def(0x24e)](_0x50272f=>_0x50272f[_0x499def(0x1b7)]!==_0x499def(0x2c0)&&_0x50272f[_0x499def(0x1b7)]!==_0x499def(0x2c4));if(_0x16e4d2){console['error'](a46_0x303d4a[_0x499def(0x2f9)]('\x0a✔\x20Attempt\x20complete'));break;}console['error'](a46_0x303d4a[_0x499def(0x2da)](_0x499def(0x338)+_0x10287c*0x2+_0x499def(0x278))),await new Promise(_0x106760=>setTimeout(_0x106760,_0x3e2bac)),_0x10287c++;}_0x10287c>=_0x5ba6fe&&console[_0x499def(0x1a6)](a46_0x303d4a[_0x499def(0x1b0)](_0x499def(0x328)));}[a46_0x45121c(0x1bc)](_0x14e6ea,_0x134059,_0x5ad423){const _0x416c8d=a46_0x45121c,_0x41911f=[],_0x3c8761=TIMELINE_CONFIG[_0x416c8d(0x1cf)],_0x47e0e2=0x5,_0x2e626a=process[_0x416c8d(0x325)][_0x416c8d(0x2f4)]||0x78,_0x356535=_0x2e626a-_0x3c8761-_0x47e0e2,_0x1365d3=Math['max'](TIMELINE_CONFIG[_0x416c8d(0x308)],Math[_0x416c8d(0x1b8)](_0x356535,TIMELINE_CONFIG[_0x416c8d(0x234)])),_0x5dbc48=new Date(_0x14e6ea['createdAt'])[_0x416c8d(0x2ca)](),_0x5e248b=_0x14e6ea[_0x416c8d(0x217)]?new Date(_0x14e6ea['finishedAt'])[_0x416c8d(0x2ca)]():Date['now'](),_0x53df74={'start':_0x5dbc48,'end':_0x5e248b,'duration':_0x5e248b-_0x5dbc48},_0x50bd82=new Map(),_0x291bfe=[];for(const _0x5e9452 of _0x134059){if(_0x5e9452[_0x416c8d(0x267)]){const _0x1a2a36=new Date(_0x5e9452[_0x416c8d(0x267)])[_0x416c8d(0x2ca)](),_0x1aeb61=_0x5e9452[_0x416c8d(0x2dd)]?new Date(_0x5e9452['updatedAt'])['getTime']():Date[_0x416c8d(0x2ea)](),_0x2b284b={'start':_0x1a2a36,'end':_0x1aeb61,'duration':_0x1aeb61-_0x1a2a36};_0x50bd82['set'](_0x5e9452['id'],_0x2b284b),_0x291bfe[_0x416c8d(0x296)]({'name':_0x5e9452['fullName'],'state':_0x5e9452['state']||'unknown','window':_0x2b284b});}else _0x291bfe[_0x416c8d(0x296)]({'name':_0x5e9452[_0x416c8d(0x321)],'state':_0x5e9452[_0x416c8d(0x1b7)]||_0x416c8d(0x2c4),'window':undefined});}_0x291bfe[_0x416c8d(0x2a4)]((_0x5a99f0,_0x36b5a5)=>{const _0x135ea8=_0x416c8d;if(!_0x5a99f0[_0x135ea8(0x1d3)])return 0x1;if(!_0x36b5a5[_0x135ea8(0x1d3)])return-0x1;return _0x5a99f0['window'][_0x135ea8(0x1ad)]-_0x36b5a5['window']['start'];});const _0x2b20ea=_0x291bfe[_0x416c8d(0x1e6)],_0x40d1d1=_0x2b20ea>TIMELINE_CONFIG[_0x416c8d(0x29b)];_0x40d1d1&&_0x291bfe[_0x416c8d(0x20a)](TIMELINE_CONFIG[_0x416c8d(0x29b)]);const _0x1d7d1b=calculateTimeScale(_0x53df74,_0x1365d3),_0x102656=_0x14e6ea[_0x416c8d(0x26c)]?_0x14e6ea[_0x416c8d(0x2e5)]?a46_0x303d4a[_0x416c8d(0x2f9)]('success'):a46_0x303d4a[_0x416c8d(0x2ef)](_0x416c8d(0x1a6)):a46_0x303d4a['blue'](_0x416c8d(0x2c0)),_0x42793f=_0x14e6ea[_0x416c8d(0x272)]?.['id'],_0x270ec1=_0x14e6ea[_0x416c8d(0x269)];let _0x4ed906;if(_0x42793f&&_0x270ec1){const _0x427ad0=getWorkflowAttemptUrl(_0x5ad423,_0x42793f,_0x270ec1,_0x14e6ea['id']);_0x4ed906=hyperlink(a46_0x303d4a[_0x416c8d(0x2da)](_0x14e6ea['id']),_0x427ad0);}else _0x4ed906=a46_0x303d4a[_0x416c8d(0x2da)](_0x14e6ea['id']);_0x41911f[_0x416c8d(0x296)](_0x416c8d(0x1ee)+_0x4ed906+_0x416c8d(0x2f3)+_0x102656+_0x416c8d(0x2f3)+formatElapsed(_0x53df74[_0x416c8d(0x1f4)]));if(_0x291bfe[_0x416c8d(0x1e6)]>0x0){const _0x1d88ed=renderTimeAxis(_0x1d7d1b,_0x1365d3),_0x22b1f5=new Date(_0x53df74[_0x416c8d(0x1ad)]),_0x13ba45=formatDate(_0x22b1f5),_0x514abe=TIMELINE_CONFIG[_0x416c8d(0x1b9)]+TIMELINE_CONFIG[_0x416c8d(0x28a)]+_0x3c8761,_0x370434=_0x13ba45[_0x416c8d(0x346)](_0x514abe),_0x1f7811=a46_0x303d4a[_0x416c8d(0x2da)](_0x370434);_0x41911f[_0x416c8d(0x296)](_0x1f7811+'\x20'+_0x1d88ed);for(const _0x2a9e81 of _0x291bfe){_0x41911f[_0x416c8d(0x296)](renderTaskRow(_0x2a9e81,_0x1d7d1b,_0x1365d3,_0x3c8761));}const _0x5a209f=calculateStats(_0x291bfe);_0x41911f[_0x416c8d(0x296)](formatStats(_0x5a209f)),_0x40d1d1&&_0x41911f['push'](a46_0x303d4a[_0x416c8d(0x1b0)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x416c8d(0x29b)]+_0x416c8d(0x1b5)+_0x2b20ea+'\x20tasks')),_0x41911f['push'](''),_0x41911f['push'](a46_0x303d4a[_0x416c8d(0x2da)](_0x416c8d(0x28d))+(_0x416c8d(0x1fd)+_0x14e6ea['id']+_0x416c8d(0x1b2))+a46_0x303d4a[_0x416c8d(0x2da)]('\x20to\x20see\x20detailed\x20logs'));}else _0x41911f[_0x416c8d(0x296)](_0x416c8d(0x250));return _0x41911f[_0x416c8d(0x1f7)]('\x0a');}[a46_0x45121c(0x2fe)](_0x10c9e4,_0x3f4be1){const _0x215960=a46_0x45121c,_0x54c068=new Date(_0x10c9e4[_0x215960(0x1c3)])[_0x215960(0x2ca)](),_0x3856c7=_0x10c9e4[_0x215960(0x217)]?new Date(_0x10c9e4[_0x215960(0x217)])[_0x215960(0x2ca)]():Date['now'](),_0x13b833=_0x3856c7-_0x54c068,_0x16933b=[];for(const _0x5d5624 of _0x3f4be1){if(_0x5d5624[_0x215960(0x267)]){const _0x8c8fb0=new Date(_0x5d5624[_0x215960(0x267)])[_0x215960(0x2ca)](),_0x3206d0=_0x5d5624[_0x215960(0x2dd)]?new Date(_0x5d5624['updatedAt'])[_0x215960(0x2ca)]():Date[_0x215960(0x2ea)]();_0x16933b[_0x215960(0x296)]({'name':_0x5d5624[_0x215960(0x321)],'state':_0x5d5624[_0x215960(0x1b7)]||_0x215960(0x21f),'window':{'start':_0x8c8fb0,'end':_0x3206d0,'duration':_0x3206d0-_0x8c8fb0}});}else _0x16933b[_0x215960(0x296)]({'name':_0x5d5624[_0x215960(0x321)],'state':_0x5d5624[_0x215960(0x1b7)]||_0x215960(0x2c4),'window':undefined});}const _0x31b2c1=calculateStats(_0x16933b);return{'attempt':{'id':_0x10c9e4['id'],'status':_0x10c9e4[_0x215960(0x26c)]?_0x10c9e4[_0x215960(0x2e5)]?_0x215960(0x2e5):_0x215960(0x1a6):_0x215960(0x2c0),'createdAt':_0x10c9e4['createdAt'],'finishedAt':_0x10c9e4[_0x215960(0x217)],'duration_ms':_0x13b833},'tasks':_0x16933b[_0x215960(0x287)](_0x1b0b27=>({'name':_0x1b0b27[_0x215960(0x20b)],'state':_0x1b0b27[_0x215960(0x1b7)],'startedAt':_0x1b0b27[_0x215960(0x1d3)]?new Date(_0x1b0b27[_0x215960(0x1d3)][_0x215960(0x1ad)])[_0x215960(0x1f9)]():null,'updatedAt':_0x1b0b27[_0x215960(0x1d3)]?new Date(_0x1b0b27[_0x215960(0x1d3)][_0x215960(0x2c2)])[_0x215960(0x1f9)]():null,'duration_ms':_0x1b0b27['window']?.[_0x215960(0x1f4)]||null})),'stats':_0x31b2c1};}}
|
|
1
|
+
const a46_0x11de4d=a46_0x47c9;function a46_0x47c9(_0x55c284,_0x2ab626){_0x55c284=_0x55c284-0x169;const _0x5a96e1=a46_0x5a96();let _0x47c9bc=_0x5a96e1[_0x55c284];return _0x47c9bc;}(function(_0x4c71c9,_0x325011){const _0x138661=a46_0x47c9,_0x16c9f9=_0x4c71c9();while(!![]){try{const _0x591468=-parseInt(_0x138661(0x2e9))/0x1*(-parseInt(_0x138661(0x1ab))/0x2)+-parseInt(_0x138661(0x1db))/0x3+parseInt(_0x138661(0x1a6))/0x4+parseInt(_0x138661(0x17f))/0x5*(parseInt(_0x138661(0x1b9))/0x6)+parseInt(_0x138661(0x25c))/0x7+-parseInt(_0x138661(0x1c4))/0x8*(parseInt(_0x138661(0x2a4))/0x9)+-parseInt(_0x138661(0x2fe))/0xa*(parseInt(_0x138661(0x19b))/0xb);if(_0x591468===_0x325011)break;else _0x16c9f9['push'](_0x16c9f9['shift']());}catch(_0x581aff){_0x16c9f9['push'](_0x16c9f9['shift']());}}}(a46_0x5a96,0x34e7c));import a46_0x39c6a3 from'chalk';import{existsSync}from'fs';import a46_0x27c8a8 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 a46_0x4a1f33 from'prompts';function getAttemptStatusDisplay(_0x38a554){const _0x30c655=a46_0x47c9;if(!_0x38a554)return{'icon':'⏳','text':''};const {done:_0x9d8082,success:_0x1c4ca9,cancelRequested:_0x2e8431}=_0x38a554;if(!_0x9d8082)return _0x2e8431?{'icon':'🛑','text':a46_0x39c6a3[_0x30c655(0x16c)]('canceling')}:{'icon':'🔄','text':a46_0x39c6a3[_0x30c655(0x191)](_0x30c655(0x2e8))};if(_0x1c4ca9)return{'icon':'✅','text':a46_0x39c6a3[_0x30c655(0x2ea)](_0x30c655(0x221))};return{'icon':'❌','text':a46_0x39c6a3[_0x30c655(0x184)]('error')};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x175703,_0x5e83d3,_0x565b17=0x0){const _0xe545ec=a46_0x47c9;return _0x175703[_0x565b17]||_0x5e83d3[_0xe545ec(0x18c)];}[a46_0x11de4d(0x246)](_0x5abe96,_0x4a2b83,_0xf744e9=0x0){const _0x247556=a46_0x11de4d,_0x5cf8bd=this[_0x247556(0x1a3)](_0x5abe96,_0x4a2b83,_0xf744e9);if(!_0x5cf8bd)return console['error'](a46_0x39c6a3[_0x247556(0x184)](_0x247556(0x2f1)),'Project\x20name\x20is\x20required'),console[_0x247556(0x216)](a46_0x39c6a3[_0x247556(0x2c6)](_0x247556(0x1f2))),null;return _0x5cf8bd;}[a46_0x11de4d(0x201)](_0x2d5bb6,_0x47c75f){const _0x319462=a46_0x11de4d;if(_0x2d5bb6[0x0]){const _0x41b595=_0x2d5bb6[0x0][_0x319462(0x2ae)]('.');if(_0x41b595[_0x319462(0x284)]===0x1)return{'projectName':_0x41b595[0x0],'workflowName':undefined};else return _0x41b595[_0x319462(0x284)]===0x2?{'projectName':_0x41b595[0x0],'workflowName':_0x41b595[0x1]}:(console[_0x319462(0x216)](a46_0x39c6a3['red']('Error:'),_0x319462(0x262)),null);}return{'projectName':_0x47c75f[_0x319462(0x18c)],'workflowName':undefined};}['resolveProjectDir'](_0x2f9749,_0x42099f,_0x3b2499=0x0){const _0x356f7b=a46_0x11de4d;if(_0x2f9749[_0x3b2499])return _0x2f9749[_0x3b2499];if(_0x42099f[_0x356f7b(0x18c)]){const _0x290fde=a46_0x27c8a8[_0x356f7b(0x26a)](process[_0x356f7b(0x1b6)](),'workflows',_0x42099f['workflowProject']);if(existsSync(a46_0x27c8a8['join'](_0x290fde,_0x356f7b(0x1a1))))return _0x290fde;}return undefined;}async['showWorkflowConsoleUrl'](_0x43ff63,_0x163a0e,_0x5280ae){const _0x24ecf1=a46_0x11de4d;try{const _0x25a38b=await _0x43ff63[_0x24ecf1(0x1ec)][_0x24ecf1(0x1af)](_0x163a0e,{'limit':0x1});if(_0x25a38b['length']>0x0){const _0x186361=_0x25a38b[0x0]['id'],_0x272079=getWorkflowUrl(_0x5280ae,_0x186361);console[_0x24ecf1(0x216)](_0x24ecf1(0x2e6)+a46_0x39c6a3[_0x24ecf1(0x1dc)](_0x272079));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x220);[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x25d);async[a46_0x11de4d(0x249)](_0x56d568){const _0x2d5b36=a46_0x11de4d,{options:_0x49d5dd,args:_0x333e76,tdx:_0x216fe3}=_0x56d568,_0x163a45=_0x333e76[0x0],_0x5caad0=_0x49d5dd[_0x2d5b36(0x1f8)];if(_0x5caad0)return saveSessionContext({'workflow_project':undefined},_0x49d5dd[_0x2d5b36(0x190)]),console[_0x2d5b36(0x2f4)](a46_0x39c6a3[_0x2d5b36(0x2ea)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x163a45)return console[_0x2d5b36(0x216)](a46_0x39c6a3[_0x2d5b36(0x184)](_0x2d5b36(0x2f1)),_0x2d5b36(0x19c)),console[_0x2d5b36(0x216)](a46_0x39c6a3[_0x2d5b36(0x2c6)](_0x2d5b36(0x281))),console[_0x2d5b36(0x216)](a46_0x39c6a3['dim'](_0x2d5b36(0x2a0))),0x1;const _0x32dfef=await withSpinner(_0x2d5b36(0x208)+_0x163a45+'\x27...',()=>_0x216fe3[_0x2d5b36(0x1ec)]['resolveProjectId'](_0x163a45),{'verbose':_0x49d5dd['verbose']}),{name:_0x48bcff}=_0x32dfef['data'];return saveSessionContext({'workflow_project':_0x48bcff},_0x49d5dd[_0x2d5b36(0x190)]),console[_0x2d5b36(0x2f4)](a46_0x39c6a3[_0x2d5b36(0x2ea)](_0x2d5b36(0x250)+a46_0x39c6a3['cyan'](_0x48bcff))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a46_0x11de4d(0x1ad);[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x2d4);async['execute'](_0x4f2804){const _0x16b7c5=a46_0x11de4d,{options:_0x444067,args:_0x48fa7f,tdx:_0x1e135e}=_0x4f2804,_0x2223e1=_0x48fa7f[0x0];_0x444067[_0x16b7c5(0x2df)]&&_0x2223e1&&console[_0x16b7c5(0x216)](_0x16b7c5(0x2b4)+_0x2223e1);const _0x1c45af=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x1e135e['workflow'][_0x16b7c5(0x256)](_0x2223e1,{'limit':_0x444067[_0x16b7c5(0x1df)]}),{'verbose':_0x444067[_0x16b7c5(0x2df)]});let _0xca6137=_0x1c45af['data'];_0xca6137['sort']((_0x22d0dd,_0x28afe3)=>_0x22d0dd[_0x16b7c5(0x242)][_0x16b7c5(0x2d9)](_0x28afe3[_0x16b7c5(0x242)]));const _0x1d8aec=_0x444067[_0x16b7c5(0x1df)]||0x64,_0x47c9cd=_0xca6137[_0x16b7c5(0x284)]>=_0x1d8aec?a46_0x39c6a3[_0x16b7c5(0x2c6)](_0x16b7c5(0x29e)):'';console[_0x16b7c5(0x216)](_0x16b7c5(0x199)+_0xca6137[_0x16b7c5(0x284)]+'\x20project'+(_0xca6137[_0x16b7c5(0x284)]!==0x1?'s':'')+_0x47c9cd);if(_0x444067[_0x16b7c5(0x22f)]===_0x16b7c5(0x1bc)||_0x444067[_0x16b7c5(0x22f)]===_0x16b7c5(0x1f4)||_0x444067[_0x16b7c5(0x22f)]===_0x16b7c5(0x300))await handleSDKOutput(_0xca6137,_0x444067);else{if(_0xca6137[_0x16b7c5(0x284)]===0x0)_0x2223e1?console[_0x16b7c5(0x2f4)]('No\x20projects\x20match\x20pattern:\x20'+_0x2223e1):console['log'](_0x16b7c5(0x2c8));else{const _0x1d7779=_0xca6137[_0x16b7c5(0x192)](_0x6dbf39=>{const _0x59be6b=_0x16b7c5,_0x1d6c84=_0x6dbf39[_0x59be6b(0x1e8)]?.[_0x59be6b(0x1c6)](_0x17418a=>_0x17418a[_0x59be6b(0x277)]===_0x59be6b(0x260)),_0x1494a6=_0x1d6c84?a46_0x39c6a3[_0x59be6b(0x2c6)](_0x59be6b(0x23f)):'';return _0x59be6b(0x178)+_0x6dbf39[_0x59be6b(0x242)]+_0x1494a6;});await writeOutput(_0x1d7779[_0x16b7c5(0x26a)]('\x0a'),_0x444067[_0x16b7c5(0x1a9)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x24c);['description']='List\x20workflows';async[a46_0x11de4d(0x249)](_0x45207f){const _0x57057d=a46_0x11de4d,{options:_0x2d83eb,args:_0x25253e,tdx:_0x4f1812}=_0x45207f,_0x394fc3=this[_0x57057d(0x1a3)](_0x25253e,_0x2d83eb);_0x2d83eb['verbose']&&_0x394fc3&&console[_0x57057d(0x216)]('Project\x20filter:\x20'+_0x394fc3);const _0x5182cb=await withSpinner('Listing\x20workflows...',()=>_0x4f1812[_0x57057d(0x1ec)]['workflows'](_0x394fc3,{'limit':_0x2d83eb[_0x57057d(0x1df)]}),{'verbose':_0x2d83eb['verbose']});let _0x287db5=_0x5182cb[_0x57057d(0x2c3)];_0x287db5['sort']((_0x2d0403,_0x23eec4)=>{const _0x3a4961=_0x57057d,_0x535f2a=_0x2d0403[_0x3a4961(0x242)][_0x3a4961(0x2d9)](_0x23eec4['name']);if(_0x535f2a!==0x0)return _0x535f2a;return(_0x2d0403[_0x3a4961(0x1d6)]?.[_0x3a4961(0x242)]||'')[_0x3a4961(0x2d9)](_0x23eec4['project']?.[_0x3a4961(0x242)]||'');});const _0x2c14b1=_0x2d83eb[_0x57057d(0x1df)]||0x64,_0x45ede3=_0x287db5[_0x57057d(0x284)]>=_0x2c14b1?a46_0x39c6a3['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error']('✔\x20Found\x20'+_0x287db5[_0x57057d(0x284)]+_0x57057d(0x270)+(_0x287db5['length']!==0x1?'s':'')+_0x45ede3);if(_0x2d83eb['format']===_0x57057d(0x1bc)||_0x2d83eb[_0x57057d(0x22f)]===_0x57057d(0x1f4)||_0x2d83eb[_0x57057d(0x22f)]==='table')await handleSDKOutput(_0x287db5,_0x2d83eb);else{if(_0x287db5[_0x57057d(0x284)]===0x0)_0x394fc3?console[_0x57057d(0x2f4)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x394fc3):console[_0x57057d(0x2f4)]('No\x20workflows\x20found');else{const _0x480568=_0x2d83eb[_0x57057d(0x1b1)],_0x1ad1d9=_0x287db5[_0x57057d(0x192)](_0xd9fbb8=>{const _0x2d19ee=_0x57057d,_0x2607c8=a46_0x39c6a3[_0x2d19ee(0x2c6)]('#'+_0xd9fbb8['id']),_0x2faaba=hyperlink(_0x2607c8,getWorkflowUrl(_0x480568,_0xd9fbb8['id'])),_0x53d4c0=_0xd9fbb8[_0x2d19ee(0x1d6)]?.[_0x2d19ee(0x242)]?a46_0x39c6a3['dim']('\x20('+_0xd9fbb8[_0x2d19ee(0x1d6)][_0x2d19ee(0x242)]+')'):'';return _0x2d19ee(0x2d1)+_0x2faaba+'\x20'+_0xd9fbb8['name']+_0x53d4c0;});await writeOutput(_0x1ad1d9['join']('\x0a'),_0x2d83eb[_0x57057d(0x1a9)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x279);[a46_0x11de4d(0x1f7)]='List\x20workflow\x20execution\x20sessions';async['execute'](_0x227738){const _0x30d395=a46_0x11de4d,{options:_0x3d7c4d,args:_0x16ddc3,tdx:_0x5dc30b}=_0x227738,_0x37500e=this[_0x30d395(0x201)](_0x16ddc3,_0x3d7c4d);if(!_0x37500e)return 0x1;const {projectName:_0x1f5043,workflowName:_0x41947b}=_0x37500e;if(_0x3d7c4d[_0x30d395(0x2df)]){if(_0x1f5043&&_0x41947b)console[_0x30d395(0x216)](_0x30d395(0x29a)+_0x1f5043+'.'+_0x41947b);else _0x1f5043&&console[_0x30d395(0x216)](_0x30d395(0x1e4)+_0x1f5043);const _0x152f2a=_0x3d7c4d['status'];_0x152f2a&&console[_0x30d395(0x216)](_0x30d395(0x2d8)+_0x152f2a);}let _0xc70196=0x28;if(process[_0x30d395(0x2d3)][_0x30d395(0x1c8)]&&!_0x3d7c4d[_0x30d395(0x1a9)]&&!_0x3d7c4d[_0x30d395(0x22f)]){const _0x56401e=process[_0x30d395(0x2d3)][_0x30d395(0x264)]||0x28;_0xc70196=Math['max'](0x14,Math['floor'](_0x56401e*0x2/0x3));}const _0x4dd9ce=_0x3d7c4d[_0x30d395(0x1df)]||_0xc70196,_0x19fc4f=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x5dc30b['workflow'][_0x30d395(0x1cf)]({'projectName':_0x1f5043,'workflowName':_0x41947b,'status':_0x3d7c4d[_0x30d395(0x189)],'fromTime':_0x3d7c4d[_0x30d395(0x2dd)],'toTime':_0x3d7c4d['to'],'limit':_0x4dd9ce}),{'verbose':_0x3d7c4d['verbose']}),_0x5d79f7=_0x19fc4f[_0x30d395(0x2c3)];_0x5d79f7[_0x30d395(0x1fc)]((_0x4b981e,_0x525608)=>{const _0x14041c=_0x30d395,_0x393f9a=_0x4b981e[_0x14041c(0x21d)]||'',_0x155a14=_0x525608[_0x14041c(0x21d)]||'';return _0x155a14['localeCompare'](_0x393f9a);});_0x5d79f7['length']>=_0x4dd9ce?console[_0x30d395(0x216)](_0x30d395(0x2c1)+_0x5d79f7['length']+'\x20sessions\x20'+a46_0x39c6a3[_0x30d395(0x2c6)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x30d395(0x216)](_0x30d395(0x199)+_0x5d79f7[_0x30d395(0x284)]+'\x20session'+(_0x5d79f7[_0x30d395(0x284)]!==0x1?'s':''));if(_0x3d7c4d['format']===_0x30d395(0x1bc)||_0x3d7c4d[_0x30d395(0x22f)]===_0x30d395(0x1f4)||_0x3d7c4d[_0x30d395(0x22f)]===_0x30d395(0x300))await handleSDKOutput(_0x5d79f7,_0x3d7c4d);else{if(!process[_0x30d395(0x2d3)][_0x30d395(0x1c8)]||_0x3d7c4d[_0x30d395(0x1a9)]){if(_0x5d79f7[_0x30d395(0x284)]===0x0){if(_0x1f5043&&_0x41947b)console[_0x30d395(0x2f4)](_0x30d395(0x212)+_0x1f5043+'.'+_0x41947b);else _0x1f5043?console[_0x30d395(0x2f4)](_0x30d395(0x2ab)+_0x1f5043):console['log'](_0x30d395(0x2ec));}else{const _0x22a8a0=_0x3d7c4d['site'],_0x46bbe2=this[_0x30d395(0x213)](_0x5d79f7,_0x22a8a0);_0x3d7c4d[_0x30d395(0x1a9)]?await writeOutput(_0x46bbe2,_0x3d7c4d[_0x30d395(0x1a9)],_0x30d395(0x237)):console[_0x30d395(0x2f4)](_0x46bbe2);}!_0x1f5043&&(console[_0x30d395(0x216)](''),console[_0x30d395(0x216)](a46_0x39c6a3[_0x30d395(0x2c6)](_0x30d395(0x1b2))),console[_0x30d395(0x216)](a46_0x39c6a3[_0x30d395(0x2c6)](_0x30d395(0x230))+'or'+a46_0x39c6a3[_0x30d395(0x2c6)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x5d79f7[_0x30d395(0x284)]===0x0){if(_0x1f5043&&_0x41947b)console[_0x30d395(0x2f4)](_0x30d395(0x212)+_0x1f5043+'.'+_0x41947b);else _0x1f5043?console[_0x30d395(0x2f4)](_0x30d395(0x2ab)+_0x1f5043):console['log'](_0x30d395(0x2ec));}else await this[_0x30d395(0x2b5)](_0x5d79f7,_0x227738,_0x1f5043);}}return 0x0;}[a46_0x11de4d(0x213)](_0x19d323,_0x35b740){const _0x4b734e=a46_0x11de4d,_0x2e5268=[],_0x1d2c19=new Map();let _0x8a68bd=Infinity,_0x256f90=-Infinity;for(const _0x23733a of _0x19d323){if(_0x23733a[_0x4b734e(0x22e)]?.[_0x4b734e(0x282)]){const _0x5f5d1a=new Date(_0x23733a[_0x4b734e(0x22e)][_0x4b734e(0x282)])[_0x4b734e(0x188)](),_0x33b1da=_0x23733a['lastAttempt'][_0x4b734e(0x175)]?new Date(_0x23733a['lastAttempt'][_0x4b734e(0x175)])['getTime']():Date[_0x4b734e(0x2f3)](),_0x18c22a=_0x23733a[_0x4b734e(0x1d6)]?.[_0x4b734e(0x242)]||'(unknown)';!_0x1d2c19['has'](_0x18c22a)&&_0x1d2c19[_0x4b734e(0x1eb)](_0x18c22a,[]),_0x1d2c19['get'](_0x18c22a)[_0x4b734e(0x2f9)]({'session':_0x23733a,'startTime':_0x5f5d1a,'endTime':_0x33b1da,'duration':_0x33b1da-_0x5f5d1a}),_0x8a68bd=Math[_0x4b734e(0x247)](_0x8a68bd,_0x5f5d1a),_0x256f90=Math[_0x4b734e(0x198)](_0x256f90,_0x33b1da);}}if(_0x1d2c19[_0x4b734e(0x24f)]===0x0)return _0x4b734e(0x2bd);const _0x47d8be=process[_0x4b734e(0x2d3)][_0x4b734e(0x2e2)]||0x78,_0x4b29ba=0x1e,_0x33d10c=0x32,_0x1a7d99=0x4,_0x26f9b1=Math['min'](_0x33d10c,Math['max'](_0x4b29ba,Math[_0x4b734e(0x1e3)](_0x47d8be*0.3))),_0x11036e=_0x47d8be-_0x26f9b1-TIMELINE_CONFIG[_0x4b734e(0x1e1)]-0x3-_0x1a7d99,_0x51162a=_0x256f90-_0x8a68bd,_0x2b9e30=_0x51162a/_0x26f9b1,_0x32d130=renderTimeAxis({'startTime':_0x8a68bd,'endTime':_0x256f90,'durationMs':_0x51162a,'msPerChar':_0x2b9e30},_0x26f9b1),_0x2a6e04=[];for(const _0x125618 of _0x1d2c19[_0x4b734e(0x219)]()){_0x2a6e04[_0x4b734e(0x2f9)](..._0x125618);}_0x2a6e04[_0x4b734e(0x1fc)]((_0x5760a2,_0x48b30e)=>_0x48b30e[_0x4b734e(0x215)]-_0x5760a2[_0x4b734e(0x215)]);const _0x5fa8ec=new Date(_0x8a68bd),_0x316d83=formatDate(_0x5fa8ec),_0x379b4c=_0x1a7d99+TIMELINE_CONFIG[_0x4b734e(0x298)]+TIMELINE_CONFIG[_0x4b734e(0x1a0)]+_0x11036e,_0x2e15ba='\x20'[_0x4b734e(0x2bb)](_0x379b4c-_0x316d83['length']),_0x4c57af=_0x2e15ba+a46_0x39c6a3[_0x4b734e(0x2c6)](_0x316d83)+'\x20'+_0x32d130;_0x2e5268['push'](_0x4c57af);const _0x529107=0x16;let _0x17aff7=0x0;for(const _0x4f397d of _0x2a6e04){const _0x487c25=_0x4f397d[_0x4b734e(0x190)][_0x4b734e(0x1d6)]?.[_0x4b734e(0x242)]||'?',_0x1ab54f=Math[_0x4b734e(0x247)](stringWidth(_0x487c25),_0x529107);_0x17aff7=Math[_0x4b734e(0x198)](_0x17aff7,_0x1ab54f);}for(const _0x5bae06 of _0x2a6e04){const {session:_0xf15001,startTime:_0x3aea13,endTime:_0x10e0dc,duration:_0xe0adc9}=_0x5bae06,_0x44d08d=_0xf15001[_0x4b734e(0x1d6)]?.['id'],_0x350d79=_0xf15001['id'],_0x472d04=_0xf15001[_0x4b734e(0x1d6)]?.['name']||'?',_0x29b63c=_0xf15001[_0x4b734e(0x1ec)]?.[_0x4b734e(0x242)]||'?';let _0x22a5ae,_0x40496e;if(_0xf15001[_0x4b734e(0x22e)]){const _0x1bddd3=_0xf15001[_0x4b734e(0x22e)];!_0x1bddd3[_0x4b734e(0x1fb)]?(_0x22a5ae=_0x1bddd3[_0x4b734e(0x2a8)]?'🛑':'🔄',_0x40496e=_0x1bddd3[_0x4b734e(0x2a8)]?a46_0x39c6a3['yellow']:a46_0x39c6a3[_0x4b734e(0x191)]):(_0x22a5ae=_0x1bddd3[_0x4b734e(0x221)]?'✅':'❌',_0x40496e=_0x1bddd3[_0x4b734e(0x221)]?a46_0x39c6a3[_0x4b734e(0x2ea)]:a46_0x39c6a3[_0x4b734e(0x184)]);}else _0x22a5ae='⏳',_0x40496e=a46_0x39c6a3[_0x4b734e(0x2c6)];const _0x98c33a='#'+_0x350d79,_0x4a2944=_0x44d08d?hyperlink(_0x98c33a,getWorkflowSessionUrl(_0x35b740,_0x44d08d,_0x350d79)):_0x98c33a;let _0x28c14f=_0x472d04;stringWidth(_0x472d04)>_0x529107&&(_0x28c14f=_0x472d04['slice'](0x0,_0x529107-0x1)+'…');const _0x2ee689=a46_0x39c6a3[_0x4b734e(0x2c6)](_0x28c14f),_0x207644=stringWidth(_0x28c14f),_0x39281a='\x20'['repeat'](_0x17aff7-stringWidth(_0x28c14f)+0x2),_0x34c83e='('+formatElapsed(_0xe0adc9)+')',_0x4b11e5=stringWidth(_0x34c83e),_0x54ac9e=stringWidth(_0x98c33a),_0x919621=_0x54ac9e+0x1+_0x207644+_0x39281a[_0x4b734e(0x284)],_0x3dc2fd=_0x11036e-_0x919621-_0x4b11e5-0x1-0x8;let _0x2a9dff=_0x29b63c;stringWidth(_0x2a9dff)>_0x3dc2fd&&(_0x2a9dff=_0x2a9dff[_0x4b734e(0x19a)](0x0,_0x3dc2fd-0x1)+'…');const _0xa52eab=_0x4a2944+'\x20'+_0x2ee689+_0x39281a+_0x2a9dff,_0x2f526b=stringWidth(_0xa52eab),_0xbf99ec=_0x11036e-_0x2f526b-_0x4b11e5,_0xd91d94=_0xa52eab+'\x20'[_0x4b734e(0x2bb)](Math[_0x4b734e(0x198)](0x1,_0xbf99ec))+a46_0x39c6a3[_0x4b734e(0x2c6)](_0x34c83e),_0x227b3e=Math[_0x4b734e(0x1e3)]((_0x3aea13-_0x8a68bd)/_0x2b9e30),_0x224e24=Math[_0x4b734e(0x1e3)]((_0x10e0dc-_0x8a68bd)/_0x2b9e30),_0x2682a7=Math[_0x4b734e(0x198)](_0x227b3e+0x1,_0x224e24),_0x2d5e9f=new Array(_0x26f9b1)[_0x4b734e(0x2ca)]('\x20');for(let _0x41de2f=_0x227b3e;_0x41de2f<Math[_0x4b734e(0x247)](_0x2682a7,_0x26f9b1);_0x41de2f++){_0x2d5e9f[_0x41de2f]='─';}const _0x114234=_0x2d5e9f[_0x4b734e(0x192)](_0xd3e76b=>_0xd3e76b==='\x20'?'\x20':_0x40496e(_0xd3e76b))[_0x4b734e(0x26a)]('');_0x2e5268[_0x4b734e(0x2f9)](_0x22a5ae+'\x20'+_0xd91d94+'│'+_0x114234+'│');}return _0x2e5268['join']('\x0a');}async[a46_0x11de4d(0x2b5)](_0x2fb6ea,_0x549207,_0xd23af3){const _0x561f0e=a46_0x11de4d,{options:_0x1fa23a,tdx:_0x2362e2}=_0x549207,_0xafdfb7=_0x1fa23a[_0x561f0e(0x1b1)],{timelineRows:_0x11a477,timeAxisHeader:_0xce9686}=this[_0x561f0e(0x267)](_0x2fb6ea,_0xafdfb7),_0x5e0bbb=_0x11a477[_0x561f0e(0x1aa)](_0x387094=>_0x387094[_0x561f0e(0x1e9)]);if(_0x5e0bbb[_0x561f0e(0x284)]===0x0){const _0x4bc049=this[_0x561f0e(0x213)](_0x2fb6ea,_0xafdfb7);console[_0x561f0e(0x2f4)](_0x4bc049);!_0xd23af3&&(console[_0x561f0e(0x216)](''),console[_0x561f0e(0x216)](a46_0x39c6a3[_0x561f0e(0x2c6)](_0x561f0e(0x1b2))),console[_0x561f0e(0x216)](a46_0x39c6a3[_0x561f0e(0x2c6)](_0x561f0e(0x230))+'or'+a46_0x39c6a3[_0x561f0e(0x2c6)](_0x561f0e(0x286))));return;}_0xce9686&&console[_0x561f0e(0x2f4)](_0xce9686);const _0x50fb9b=_0x11a477[_0x561f0e(0x1aa)](_0xe768c1=>_0xe768c1['attemptId'])[_0x561f0e(0x192)](_0x3b5387=>({'title':_0x3b5387[_0x561f0e(0x1ef)],'value':_0x3b5387[_0x561f0e(0x1e9)]})),_0x569a48=process[_0x561f0e(0x2d3)]['rows']||0x3c,_0xf45a0e=Math['max'](0x28,Math[_0x561f0e(0x1e3)](_0x569a48*0x2/0x3)),_0x10d3de=await a46_0x4a1f33({'type':'autocomplete','name':_0x561f0e(0x1e9),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x50fb9b,'initial':-0x1,'limit':_0xf45a0e,'clearFirst':!![],'fallback':{'title':_0x561f0e(0x24b),'value':null},'suggest':(_0x2a716d,_0x2c955a)=>{const _0x8fb868=_0x561f0e;if(!_0x2a716d)return Promise[_0x8fb868(0x245)](_0x2c955a);const _0x3cf318=_0x2c955a[_0x8fb868(0x1aa)](_0x1b7026=>{const _0x14f86b=_0x8fb868,_0x43ed27=_0x1b7026;return _0x43ed27[_0x14f86b(0x2ad)]['toLowerCase']()[_0x14f86b(0x233)](_0x2a716d['toLowerCase']());});return Promise['resolve'](_0x3cf318);}}),_0x2bc70f=()=>{const _0x359bea=_0x561f0e;process[_0x359bea(0x2d3)]['write'](_0x359bea(0x26d)),process[_0x359bea(0x2d3)]['write'](_0x359bea(0x26d)),process[_0x359bea(0x2d3)]['write'](_0x359bea(0x26d));},_0x372639=_0x10d3de&&_0x10d3de['attemptId']&&_0x10d3de[_0x561f0e(0x1e9)]!==null&&_0x10d3de['attemptId'][_0x561f0e(0x25e)]()!=='';if(!_0x372639){_0x2bc70f(),console[_0x561f0e(0x2f4)](a46_0x39c6a3[_0x561f0e(0x2c6)](_0x561f0e(0x2e5)));return;}_0x2bc70f();const _0x3493b9=_0x2fb6ea[_0x561f0e(0x1be)](_0x3c31c2=>_0x3c31c2[_0x561f0e(0x22e)]?.['id']===_0x10d3de[_0x561f0e(0x1e9)]);if(_0x3493b9){const _0x5e0a2a=_0x3493b9[_0x561f0e(0x1d6)]?.[_0x561f0e(0x242)]||'?',_0x352029=_0x3493b9['workflow']?.[_0x561f0e(0x242)]||'?';console[_0x561f0e(0x2f4)](_0x561f0e(0x1ac)+a46_0x39c6a3[_0x561f0e(0x2c6)](_0x5e0a2a)+_0x561f0e(0x195)+a46_0x39c6a3[_0x561f0e(0x2c6)](_0x352029));}const _0xc71657=new WorkflowTimelineCommand();await _0xc71657['execute']({'args':[],'options':{..._0x1fa23a,'attemptId':_0x10d3de[_0x561f0e(0x1e9)]},'tdx':_0x2362e2});}['generateSessionTimelineRows'](_0x5af0b0,_0x5dcc6d){const _0x221a73=a46_0x11de4d,_0x4febb3=new Map();for(const _0x13ee63 of _0x5af0b0){_0x13ee63['id']&&_0x13ee63[_0x221a73(0x22e)]?.['id']&&_0x4febb3[_0x221a73(0x1eb)](_0x13ee63['id'],_0x13ee63[_0x221a73(0x22e)]['id']);}const _0xf9e548=[];let _0xb2b7d6='';const _0x328536=this[_0x221a73(0x213)](_0x5af0b0,_0x5dcc6d),_0x1d0455=_0x328536['split']('\x0a');for(const _0x32b71c of _0x1d0455){if(_0x32b71c[_0x221a73(0x174)](_0x221a73(0x301))||_0x32b71c['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0xb2b7d6=_0x32b71c;else{if(_0x32b71c[_0x221a73(0x231)](/^[✅❌🔄🛑⏳]/)){const _0x7af5bf=_0x32b71c['match'](/#(\d+)/),_0x5a790a=_0x7af5bf?_0x7af5bf[0x1]:null,_0x41f35a=_0x5a790a?_0x4febb3[_0x221a73(0x17b)](_0x5a790a)||null:null,_0x1beb34=_0x5af0b0[_0x221a73(0x1be)](_0x282a48=>_0x282a48['id']===_0x5a790a),_0x1544df=_0x1beb34?.[_0x221a73(0x1d6)]?.[_0x221a73(0x242)]||'';_0xf9e548[_0x221a73(0x2f9)]({'displayLine':_0x32b71c,'attemptId':_0x41f35a,'projectName':_0x1544df});}}}return{'timelineRows':_0xf9e548,'timeAxisHeader':_0xb2b7d6};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a46_0x11de4d(0x1b4);[a46_0x11de4d(0x1f7)]='List\x20workflow\x20attempts';async[a46_0x11de4d(0x249)](_0x2bbe46){const _0x397e77=a46_0x11de4d,{options:_0x4199e9,args:_0x18ee33,tdx:_0x57cc0b}=_0x2bbe46,_0x4aee77=this[_0x397e77(0x201)](_0x18ee33,_0x4199e9);if(!_0x4aee77)return 0x1;const {projectName:_0x3b3635,workflowName:_0x39f8df}=_0x4aee77,_0x18275f=_0x4199e9[_0x397e77(0x1e7)];if(_0x4199e9[_0x397e77(0x2df)]){if(_0x3b3635&&_0x39f8df)console[_0x397e77(0x216)]('Filter:\x20'+_0x3b3635+'.'+_0x39f8df);else _0x3b3635&&console[_0x397e77(0x216)](_0x397e77(0x1e4)+_0x3b3635);_0x18275f&&console[_0x397e77(0x216)]('Include\x20retried:\x20yes');}const _0x47a84b=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x57cc0b['workflow']['attempts']({'projectName':_0x3b3635,'workflowName':_0x39f8df,'includeRetried':_0x18275f,'limit':_0x4199e9[_0x397e77(0x1df)]}),{'verbose':_0x4199e9[_0x397e77(0x2df)]}),_0x1556df=_0x47a84b[_0x397e77(0x2c3)],_0xd21e3a=_0x4199e9[_0x397e77(0x1df)]||0x64,_0x3db0e0=_0x1556df[_0x397e77(0x284)]>=_0xd21e3a?a46_0x39c6a3[_0x397e77(0x2c6)](_0x397e77(0x29e)):'';console['error'](_0x397e77(0x199)+_0x1556df[_0x397e77(0x284)]+_0x397e77(0x234)+(_0x1556df[_0x397e77(0x284)]!==0x1?'s':'')+_0x3db0e0);if(_0x4199e9[_0x397e77(0x22f)]===_0x397e77(0x1bc)||_0x4199e9[_0x397e77(0x22f)]===_0x397e77(0x1f4)||_0x4199e9[_0x397e77(0x22f)]===_0x397e77(0x300))await handleSDKOutput(_0x1556df,_0x4199e9);else{if(_0x1556df['length']===0x0){if(_0x3b3635&&_0x39f8df)console['log']('No\x20attempts\x20found\x20for:\x20'+_0x3b3635+'.'+_0x39f8df);else _0x3b3635?console[_0x397e77(0x2f4)](_0x397e77(0x23c)+_0x3b3635):console[_0x397e77(0x2f4)](_0x397e77(0x272));}else{const _0x49cd3b=_0x4199e9[_0x397e77(0x1b1)],_0x460c5f=_0x1556df['map'](_0x441156=>{const _0x1e8a3b=_0x397e77,_0x342439=a46_0x39c6a3[_0x1e8a3b(0x2c6)]('#'+_0x441156['id']),_0x4f4645=_0x441156['project']?.['id'],_0x4e9fa8=_0x441156[_0x1e8a3b(0x1f1)]||_0x441156[_0x1e8a3b(0x1fa)],_0x3ab4d8=_0x4f4645&&_0x4e9fa8?hyperlink(_0x342439,getWorkflowAttemptUrl(_0x49cd3b,_0x4f4645,_0x4e9fa8,_0x441156['id'])):_0x342439,{icon:_0x3894de,text:_0x47671d}=getAttemptStatusDisplay(_0x441156),_0x1e0ed1=(_0x441156[_0x1e8a3b(0x1d6)]?.[_0x1e8a3b(0x242)]||'?')+'.'+(_0x441156[_0x1e8a3b(0x1ec)]?.[_0x1e8a3b(0x242)]||'?'),_0x5dd65f=_0x441156[_0x1e8a3b(0x21d)]?a46_0x39c6a3[_0x1e8a3b(0x2c6)](_0x441156[_0x1e8a3b(0x21d)]):'';return(_0x3ab4d8+'\x20'+_0x3894de+(_0x47671d?'\x20'+_0x47671d:'')+'\x20'+_0x1e0ed1+'\x20'+_0x5dd65f)[_0x1e8a3b(0x182)]();});await writeOutput(_0x460c5f[_0x397e77(0x26a)]('\x0a'),_0x4199e9['output'],_0x397e77(0x237));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x24e);[a46_0x11de4d(0x1f7)]='Show\x20specific\x20attempt\x20details';async[a46_0x11de4d(0x249)](_0x3187b8){const _0x32631e=a46_0x11de4d,{options:_0x1b6aa0,args:_0x9b5e10,tdx:_0x743aa8}=_0x3187b8,_0x5a1e23=_0x9b5e10[0x0];if(!_0x5a1e23)return console[_0x32631e(0x216)](_0x32631e(0x294)),0x1;_0x1b6aa0[_0x32631e(0x2df)]&&console['error'](_0x32631e(0x1ee)+_0x5a1e23);const _0x1f7d9a=await withSpinner(_0x32631e(0x1c2),()=>_0x743aa8[_0x32631e(0x1ec)][_0x32631e(0x2b6)](_0x5a1e23),{'verbose':_0x1b6aa0[_0x32631e(0x2df)]}),_0x440835=_0x1f7d9a['data'];let _0x9eafcc;!_0x440835[_0x32631e(0x1fb)]?_0x9eafcc=_0x440835[_0x32631e(0x2a8)]?'canceling':'running':_0x9eafcc=_0x440835['success']?'success':_0x32631e(0x216);let _0x214a7f;if(_0x440835[_0x32631e(0x282)]&&_0x440835['finishedAt']){const _0x1a69b9=new Date(_0x440835[_0x32631e(0x282)])[_0x32631e(0x188)](),_0x5c2cc2=new Date(_0x440835[_0x32631e(0x175)])[_0x32631e(0x188)]();_0x214a7f=Math[_0x32631e(0x2f0)]((_0x5c2cc2-_0x1a69b9)/0x3e8);}const _0x53eb49={'attempt_id':_0x440835['id'],'status':_0x9eafcc,..._0x440835[_0x32631e(0x25b)]!==undefined&&{'index':_0x440835[_0x32631e(0x25b)]},..._0x440835[_0x32631e(0x1d6)]&&{'project':_0x440835[_0x32631e(0x1d6)][_0x32631e(0x242)]},..._0x440835[_0x32631e(0x1ec)]&&{'workflow':_0x440835[_0x32631e(0x1ec)][_0x32631e(0x242)]},..._0x440835[_0x32631e(0x1fa)]&&{'session_id':_0x440835[_0x32631e(0x1fa)]},..._0x440835['sessionTime']&&{'session_time':_0x440835[_0x32631e(0x21d)]},..._0x440835['retryAttemptName']&&{'retry_attempt':_0x440835[_0x32631e(0x1b7)]},..._0x214a7f!==undefined&&{'duration_sec':_0x214a7f},..._0x440835[_0x32631e(0x282)]&&{'created_at':_0x440835['createdAt']},..._0x440835['finishedAt']&&{'finished_at':_0x440835[_0x32631e(0x175)]},...Object[_0x32631e(0x2c2)](_0x440835[_0x32631e(0x2af)])[_0x32631e(0x284)]>0x0&&{'params':_0x440835[_0x32631e(0x2af)]}};return await handleSingleObjectOutput(_0x53eb49,_0x1b6aa0),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x29b);[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x16d);async[a46_0x11de4d(0x249)](_0x360267){const _0x5121b2=a46_0x11de4d,{options:_0x34b083,args:_0x59435b,tdx:_0x560a5d}=_0x360267,_0x295190=_0x59435b[0x0];if(!_0x295190)return console[_0x5121b2(0x216)](_0x5121b2(0x294)),0x1;const _0x1742f1=_0x34b083[_0x5121b2(0x255)];_0x34b083[_0x5121b2(0x2df)]&&(console[_0x5121b2(0x216)](_0x5121b2(0x1ee)+_0x295190),_0x1742f1&&console[_0x5121b2(0x216)]('Including\x20subtasks:\x20yes'));const _0x184f46=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x560a5d['workflow'][_0x5121b2(0x1d9)](_0x295190,_0x1742f1||![]),{'verbose':_0x34b083['verbose']}),_0x5e2c5f=_0x184f46[_0x5121b2(0x2c3)];return console[_0x5121b2(0x216)](_0x5121b2(0x199)+_0x5e2c5f['length']+_0x5121b2(0x276)+(_0x5e2c5f['length']!==0x1?'s':'')),await handleSDKOutput(_0x5e2c5f,_0x34b083),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x177);['description']=a46_0x11de4d(0x287);async['execute'](_0xab5484){const _0x227b4b=a46_0x11de4d,{options:_0x45f4b4,args:_0x3ccbae,tdx:_0x11f492}=_0xab5484,_0x4c7946=_0x3ccbae[0x0];let _0x4b4a01=_0x3ccbae[0x1];if(!_0x4c7946)return console[_0x227b4b(0x216)](_0x227b4b(0x294)),0x1;_0x45f4b4[_0x227b4b(0x2df)]&&(console['error'](_0x227b4b(0x1ee)+_0x4c7946),_0x4b4a01&&console[_0x227b4b(0x216)](_0x227b4b(0x20c)+_0x4b4a01));const _0x1c5a85=await withSpinner(_0x227b4b(0x2cc),()=>_0x11f492[_0x227b4b(0x1ec)]['logFiles'](_0x4c7946,_0x4b4a01),{'verbose':_0x45f4b4[_0x227b4b(0x2df)]}),_0x4054b9=_0x1c5a85[_0x227b4b(0x2c3)];if(_0x4054b9[_0x227b4b(0x284)]===0x0)return console[_0x227b4b(0x216)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x4b4a01&&(_0x45f4b4[_0x227b4b(0x1bc)]||_0x45f4b4[_0x227b4b(0x22f)]))return await handleSDKOutput(_0x4054b9,_0x45f4b4),0x0;if(!_0x4b4a01){const _0x2a5c2c=_0x4054b9['map'](_0x20c9d6=>({'title':_0x20c9d6[_0x227b4b(0x2d2)]+'\x20('+formatBytes(_0x20c9d6[_0x227b4b(0x1b0)])+')','value':_0x20c9d6['taskName']})),_0x2122d8=await a46_0x4a1f33({'type':_0x227b4b(0x273),'name':_0x227b4b(0x1dd),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x2a5c2c});if(!_0x2122d8['task'])return console['error'](_0x227b4b(0x2e5)),0x0;_0x4b4a01=_0x2122d8[_0x227b4b(0x1dd)];}const _0x3a79b9=await withSpinner(_0x227b4b(0x183),()=>_0x11f492[_0x227b4b(0x1ec)][_0x227b4b(0x1d3)](_0x4c7946,_0x4b4a01),{'verbose':_0x45f4b4[_0x227b4b(0x2df)]}),_0x1e4351=_0x3a79b9[_0x227b4b(0x2c3)];return _0x1e4351?console[_0x227b4b(0x2f4)](_0x1e4351):console[_0x227b4b(0x216)]('No\x20log\x20content\x20found'),0x0;}}function a46_0x5a96(){const _0x497ebf=['Source\x20project:\x20','type','sessionTime','indexOf','setSecret','workflow:use','success','\x20tasks','write','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','executeCloneProject','getMonth','.\x20Expected\x20format:\x20KEY=VALUE','Resume\x20from:\x20','deleteSecret','Error:\x20Project\x20name\x20is\x20required','/sessions/','hasChanges','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','lastAttempt','format','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','match','pollTimeline','includes','\x20attempt','\x20has\x20no\x20attempts','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','list','resumeFrom','Project\x20name:\x20','/attempt/','✔\x20Project\x20updated','No\x20attempts\x20found\x20in\x20project:\x20','\x20deleted','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x20(system)','message','workflow:clone','name','total','parse','resolve','requireProject','min','\x0aPolling...\x20(','execute','executePushProject','No\x20matching\x20sessions\x20found','workflow:workflows','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','workflow:attempt','size','✔\x20Workflow\x20project\x20set\x20to:\x20','Analyzing\x20changes...','stringify','Params:\x20','resolveProjectDir','includeSubtasks','projects','Source:\x20','Key:\x20','→\x20New\x20project:\x20','\x20is\x20not\x20a\x20directory','index','2841769QXcpfH','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','trim','Error:\x20','sys','Validation:\x20skipped','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','every','rows','Source\x20directory:\x20','Dry\x20run:\x20yes','generateSessionTimelineRows','group_error','utf-8','join','\x20modified','\x0aPush\x20these\x20changes?','\x1b[1A\x1b[2K','\x0aFailed\x20to\x20fetch\x20attempt\x20data','fullName','\x20workflow','workflow:download','No\x20attempts\x20found','select','Failed\x20to\x20fetch\x20attempt\x20data','Force:\x20yes','\x20task','key','\x22?\x20This\x20cannot\x20be\x20undone.','workflow:sessions','listSecrets','planned','Loading\x20workflows...','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20\x20Location:\x20','\x20-\x20','end','Usage:\x20tdx\x20wf\x20use\x20<project>','createdAt','getHours','length','dryRun','\x20\x20tdx\x20wf\x20use\x20<project>','Show\x20logs\x20for\x20a\x20workflow\x20attempt','newProjectName','path','\x20\x20Changes:\x20','\x0aError:','Start\x20a\x20workflow\x20run','Pushing\x20workflow\x20project...','sourceDir','pending','workflow:secrets:set','✔\x20Pull\x20complete','duration','Select\x20a\x20workflow\x20to\x20run','Error:\x20Attempt\x20ID\x20is\x20required','No\x20workflows\x20found','\x20\x20Target:\x20','start','ICON_WIDTH','getFullYear','Filter:\x20','workflow:tasks','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','MAX_TASKS_DISPLAY','\x20(use\x20--limit\x20to\x20show\x20more)','getMinutes','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','MIN_LABEL_COUNT','Cloning\x20to\x20','reason','2007NzMlHa','MIN_TIMELINE_WIDTH','\x20\x20Session\x20ID:\x20','✔\x20Retry\x20started','cancelRequested','targetExists','Session\x20time:\x20','No\x20sessions\x20found\x20in\x20project:\x20','No\x20workflow\x20tdx.json\x20found','title','split','params','Error:\x20Secret\x20key\x20is\x20required','Reason:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','deleted','Pattern:\x20','navigateSessionsInteractive','attempt','Revision:\x20','padStart','\x0aDry\x20run\x20-\x20nothing\x20pushed','unchanged','repeat','filesExtracted','No\x20sessions\x20with\x20timing\x20information','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','workflowName','\x20\x20Workflow:\x20','✔\x20Showing\x20','keys','data','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','replace','dim','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','No\x20workflow\x20projects\x20found','✔\x20Workflow\x20run\x20started','fill','Invalid\x20format:\x20','Fetching\x20log\x20files...','text','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','\x0a✔\x20No\x20changes\x20to\x20push','Usage:\x20workflow:delete\x20<project-name-or-id>','📋\x20','taskName','stdout','List\x20all\x20workflow\x20projects','Pulling\x20project\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Total:\x20','Status:\x20','localeCompare','From\x20task:\x20','diff','Starting\x20workflow\x20run...','from','workflow:kill','verbose','✔\x20Pushed\x20','workflow:secrets:delete','columns','✔\x20Secret\x20\x27','pullProject','Cancelled','\x20\x20Console:\x20','\x20\x20Project:\x20','running','146UdLton','green','splice','No\x20sessions\x20found','Writing\x20files...','all','stat','round','Error:','\x20\x20Project\x20ID:\x20','now','log','workflow:upload','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','newProjectId','white','push','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Listing\x20secrets...','yes','5701240tyUSjP','renderSingleTimeline','table','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Killing\x20attempt...','modified','showWorkflowConsoleUrl','Workflow:\x20','Attempt:\x20','isArray','yellow','Show\x20tasks\x20for\x20an\x20attempt','new','\x20\x20Attempt\x20ID:\x20','✔\x20Project:\x20','workflow:secrets:list','\x22\x20to\x20new\x20project\x20\x22','Retrying\x20attempt...','startsWith','finishedAt','existingProjectId','workflow:logs','📁\x20','\x20from\x20session\x20','Parameters:\x20','get','Files\x20to\x20upload:\x20','renderTimeline','Target\x20directory:\x20','714860FzgMCr','force','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','trimEnd','Downloading\x20logs...','red','relative','Loading\x20sessions...','startedAt','getTime','status','window','updatedAt','workflowProject','Output\x20directory:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','session','blue','map','Target:\x20','\x20\x20Session\x20context\x20set\x20to:\x20',',\x20Workflow:\x20','...','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','max','✔\x20Found\x20','slice','11szsHfd','Project\x20name\x20is\x20required','LABEL_WIDTH_DIVISOR','summary','applyPullProject','ICON_SPACING','tdx.json','follow','resolveProject','\x20new','kill','1476100VtBwUG','---\x20','getDate','output','filter','2566DVdEne','Project:\x20','workflow:projects','readFile','workflows','fileSize','site','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','New\x20project\x20name:\x20','workflow:attempts','state','cwd','retryAttemptName','TASK_NAME_WIDTH','6vtmBLf','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','json','-\x20nothing\x20pushed','find','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x22\x20with\x20new\x20revision?','icon','Getting\x20attempt\x20details...','basename','3968dbdUUV','targetDir','some','buildTimelineData','isTTY','Latest\x20session\x20has\x20no\x20attempt','💡\x20Tip:\x20Use\x20','Updating\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','Pushing\x20project...','substring','sessions','projectId','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','skipValidation','logs','unknown','🔄\x20','project','Retry\x20a\x20session\x20or\x20attempt','Error:\x20Invalid\x20JSON\x20in\x20--params','tasks','No\x20workflow\x20sessions\x20found','623550awHCsS','cyan','task','\x20\x20Revision:\x20','limit','changes','GUTTER','value','floor','Filter:\x20project=','LABEL_MIN_SPACING','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','includeRetried','metadata','attemptId','projectName','set','workflow','workflow:push','Attempt\x20ID:\x20','displayLine','\x27\x20from\x20project\x20\x27','session_id','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Files\x20extracted:\x20','jsonl','run','\x0a⚠\x20Project\x20\x22','description','clear','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','sessionId','done','sort','fromTask','Session\x20','fs/promises','context','parseProjectWorkflowPattern','\x22\x20already\x20exists\x20(ID:\x20','workflow:retry','\x0aUpdate\x20existing\x20project\x20\x22','workflow:timeline','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','revision','Resolving\x20project\x20\x27','\x20\x20Source:\x20','sourceProjectName','MAX_POLL_ITERATIONS','Task\x20name:\x20','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','workflow:pull','Key\x20cannot\x20be\x20empty','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','isNewProject','No\x20sessions\x20found\x20for:\x20','renderSessionsTimeline','fileCount','startTime','error','Loading\x20session...','Session\x20not\x20found:\x20','values','Warning:'];a46_0x5a96=function(){return _0x497ebf;};return a46_0x5a96();}export class WorkflowKillCommand extends BaseCommand{['name']=a46_0x11de4d(0x2de);[a46_0x11de4d(0x1f7)]='Kill\x20a\x20running\x20attempt';async[a46_0x11de4d(0x249)](_0x469307){const _0x2d4fe2=a46_0x11de4d,{options:_0x2a73ec,args:_0x2e3658,tdx:_0x248f9b}=_0x469307,_0x101986=_0x2e3658[0x0];if(!_0x101986)return console[_0x2d4fe2(0x216)](_0x2d4fe2(0x294)),0x1;const _0x2a7bd3=_0x2a73ec[_0x2d4fe2(0x2a3)];_0x2a73ec[_0x2d4fe2(0x2df)]&&(console['error']('Attempt\x20ID:\x20'+_0x101986),_0x2a7bd3&&console[_0x2d4fe2(0x216)](_0x2d4fe2(0x2b1)+_0x2a7bd3));if(!_0x2a73ec['yes']){if(!isInteractive())return console[_0x2d4fe2(0x216)](a46_0x39c6a3[_0x2d4fe2(0x184)](_0x2d4fe2(0x28b)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a46_0x39c6a3[_0x2d4fe2(0x2c6)](_0x2d4fe2(0x1e6))),0x1;const _0x48ffed=await confirmKey(_0x2d4fe2(0x2b2)+_0x101986+'?');if(!_0x48ffed)return console[_0x2d4fe2(0x216)](a46_0x39c6a3[_0x2d4fe2(0x16c)](_0x2d4fe2(0x2e5))),0x1;}const _0x4d178a=await withSpinner(_0x2d4fe2(0x302),()=>_0x248f9b[_0x2d4fe2(0x1ec)][_0x2d4fe2(0x1a5)](_0x101986,_0x2a7bd3),{'verbose':_0x2a73ec[_0x2d4fe2(0x2df)]}),_0x318be4=_0x4d178a[_0x2d4fe2(0x2c3)];return console[_0x2d4fe2(0x216)]('✔\x20'+_0x318be4),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x203);['description']=a46_0x11de4d(0x1d7);async[a46_0x11de4d(0x249)](_0x1800bd){const _0x1c5dec=a46_0x11de4d,{options:_0x5abc42,args:_0x392cfc,tdx:_0x3e3078}=_0x1800bd,_0x47c764=_0x392cfc[0x0];if(!_0x47c764)return console[_0x1c5dec(0x216)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x1c5dec(0x216)](_0x1c5dec(0x27d)),0x1;let _0x1fc9c5=![],_0x50baf2=_0x47c764;if(_0x47c764['startsWith']('session:'))_0x1fc9c5=!![],_0x50baf2=_0x47c764[_0x1c5dec(0x1ce)](0x8);else{if(_0x47c764[_0x1c5dec(0x174)]('attempt:'))_0x1fc9c5=![],_0x50baf2=_0x47c764[_0x1c5dec(0x1ce)](0x8);else return console[_0x1c5dec(0x216)](_0x1c5dec(0x1bf)),console[_0x1c5dec(0x216)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0xa16512=_0x5abc42[_0x1c5dec(0x1fd)],_0xa222d=_0x5abc42[_0x1c5dec(0x238)],_0x220a7e=_0x5abc42[_0x1c5dec(0x2af)],_0xe68437=_0x5abc42[_0x1c5dec(0x180)];_0x5abc42['verbose']&&(console[_0x1c5dec(0x216)](_0x1c5dec(0x193)+(_0x1fc9c5?_0x1c5dec(0x190):_0x1c5dec(0x2b6))+'\x20'+_0x50baf2),_0xa16512&&console[_0x1c5dec(0x216)](_0x1c5dec(0x2da)+_0xa16512),_0xa222d&&console[_0x1c5dec(0x216)](_0x1c5dec(0x228)+_0xa222d),_0x220a7e&&console[_0x1c5dec(0x216)](_0x1c5dec(0x253)+_0x220a7e),_0xe68437&&console['error'](_0x1c5dec(0x275)));let _0x46077c;if(_0x220a7e)try{if(_0x220a7e[_0x1c5dec(0x174)]('@')){const _0x19df81=await import(_0x1c5dec(0x1ff)),_0x560563=_0x220a7e['substring'](0x1),_0x101431=await _0x19df81[_0x1c5dec(0x1ae)](_0x560563,_0x1c5dec(0x269));_0x46077c=JSON[_0x1c5dec(0x244)](_0x101431);}else _0x46077c=JSON[_0x1c5dec(0x244)](_0x220a7e);}catch{return console['error'](_0x1c5dec(0x1d8)),0x1;}if(!_0x5abc42[_0x1c5dec(0x2fd)]){if(!isInteractive())return console[_0x1c5dec(0x216)](a46_0x39c6a3[_0x1c5dec(0x184)](_0x1c5dec(0x28b)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1c5dec(0x216)](a46_0x39c6a3[_0x1c5dec(0x2c6)](_0x1c5dec(0x1e6))),0x1;const _0x3de3a3=await confirmKey(_0x1c5dec(0x18e)+(_0x1fc9c5?'session':'attempt')+'\x20'+_0x50baf2+'?');if(!_0x3de3a3)return console['error'](a46_0x39c6a3[_0x1c5dec(0x16c)]('Cancelled')),0x1;}let _0x291f46;_0x1fc9c5?_0x291f46=await withSpinner('Retrying\x20session...',()=>_0x3e3078['workflow']['retrySession'](_0x50baf2,{'fromTask':_0xa16512,'retryParams':_0x46077c}),{'verbose':_0x5abc42[_0x1c5dec(0x2df)]}):_0x291f46=await withSpinner(_0x1c5dec(0x173),()=>_0x3e3078[_0x1c5dec(0x1ec)]['retryAttempt'](_0x50baf2,{'resumeFrom':_0xa222d,'retryParams':_0x46077c,'force':_0xe68437}),{'verbose':_0x5abc42['verbose']});const _0x3a617a=_0x291f46[_0x1c5dec(0x2c3)];return console[_0x1c5dec(0x216)](_0x1c5dec(0x2a7)),console[_0x1c5dec(0x216)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x3a617a[_0x1c5dec(0x1e9)]),console['error'](_0x1c5dec(0x2a6)+_0x3a617a['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]='workflow:run';[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x28c);async['execute'](_0x40b51f){const _0x12d594=a46_0x11de4d,{options:_0x295993,args:_0x29a5c1,tdx:_0x29c014}=_0x40b51f;let _0xc722aa=_0x29a5c1[0x0];if(!_0xc722aa){const _0x48e26a=this[_0x12d594(0x1a3)]([],_0x295993),_0x1a2314=await withSpinner(_0x12d594(0x27c),()=>_0x29c014[_0x12d594(0x1ec)][_0x12d594(0x1af)](_0x48e26a,{'limit':_0x295993[_0x12d594(0x1df)]}),{'verbose':_0x295993['verbose']}),_0x1445a7=_0x1a2314[_0x12d594(0x2c3)];if(_0x1445a7['length']===0x0)return console['error'](_0x12d594(0x295)),!_0x48e26a&&console[_0x12d594(0x216)](a46_0x39c6a3['dim'](_0x12d594(0x1f2))),0x1;const _0x49c3a9=_0x1445a7[_0x12d594(0x192)](_0x312dfd=>({'title':_0x312dfd[_0x12d594(0x1d6)]?.[_0x12d594(0x242)]+'.'+_0x312dfd['name'],'value':_0x312dfd['project']?.['name']+'.'+_0x312dfd[_0x12d594(0x242)],'description':_0x312dfd[_0x12d594(0x207)]?'revision:\x20'+_0x312dfd[_0x12d594(0x207)]:undefined})),_0x389e97=await a46_0x4a1f33({'type':'select','name':_0x12d594(0x1ec),'message':_0x12d594(0x293),'choices':_0x49c3a9});if(!_0x389e97[_0x12d594(0x1ec)])return 0x1;_0xc722aa=_0x389e97[_0x12d594(0x1ec)];}if(!_0xc722aa[_0x12d594(0x233)]('.')){const _0x299791=this[_0x12d594(0x1a3)]([],_0x295993);if(_0x299791)_0xc722aa=_0x299791+'.'+_0xc722aa;else return console[_0x12d594(0x216)](a46_0x39c6a3[_0x12d594(0x184)](_0x12d594(0x2f1)),_0x12d594(0x20d)),console[_0x12d594(0x216)](a46_0x39c6a3['dim'](_0x12d594(0x1f2))),0x1;}const _0x4f37c1=_0x295993['param'],_0x1ab84f=_0x295993[_0x12d594(0x21d)],_0x3533ba={};if(_0x4f37c1&&Array[_0x12d594(0x16b)](_0x4f37c1))for(const _0x528c17 of _0x4f37c1){const _0x2a1fa8=_0x528c17[_0x12d594(0x21e)]('=');if(_0x2a1fa8===-0x1)return console['error']('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x528c17),console['error']('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x6ffb4b=_0x528c17[_0x12d594(0x1ce)](0x0,_0x2a1fa8),_0x475ce7=_0x528c17['substring'](_0x2a1fa8+0x1);try{_0x3533ba[_0x6ffb4b]=JSON[_0x12d594(0x244)](_0x475ce7);}catch{_0x3533ba[_0x6ffb4b]=_0x475ce7;}}_0x295993[_0x12d594(0x2df)]&&(console[_0x12d594(0x216)](_0x12d594(0x169)+_0xc722aa),Object['keys'](_0x3533ba)[_0x12d594(0x284)]>0x0&&console[_0x12d594(0x216)](_0x12d594(0x17a)+JSON[_0x12d594(0x252)](_0x3533ba)),_0x1ab84f&&console[_0x12d594(0x216)](_0x12d594(0x2aa)+_0x1ab84f));const _0x4a1fef=await withSpinner(_0x12d594(0x2dc),()=>_0x29c014[_0x12d594(0x1ec)][_0x12d594(0x1f5)](_0xc722aa,_0x3533ba,{'sessionTime':_0x1ab84f}),{'verbose':_0x295993[_0x12d594(0x2df)]}),_0x28e1a6=_0x4a1fef[_0x12d594(0x2c3)];console['error'](_0x12d594(0x2c9)),console[_0x12d594(0x216)](_0x12d594(0x16f)+_0x28e1a6['id']),console[_0x12d594(0x216)](_0x12d594(0x2a6)+_0x28e1a6['sessionId']),console[_0x12d594(0x216)](_0x12d594(0x2e7)+_0x28e1a6[_0x12d594(0x1d6)]?.[_0x12d594(0x242)]),console[_0x12d594(0x216)](_0x12d594(0x2c0)+_0x28e1a6[_0x12d594(0x1ec)]?.['name']);if(_0x28e1a6[_0x12d594(0x1d6)]?.['id']&&_0x28e1a6[_0x12d594(0x1fa)]&&_0x28e1a6['id']){const _0x4903b2=_0x295993[_0x12d594(0x1b1)],_0x5e6f29=getConsoleUrl(_0x4903b2,'/app/workflows/'+_0x28e1a6[_0x12d594(0x1d6)]['id']+_0x12d594(0x22b)+_0x28e1a6[_0x12d594(0x1fa)]+_0x12d594(0x23a)+_0x28e1a6['id']);console[_0x12d594(0x216)](_0x12d594(0x2e6)+a46_0x39c6a3[_0x12d594(0x1dc)](_0x5e6f29));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x271);['description']='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a46_0x11de4d(0x249)](_0x43fa8e){const _0x293730=a46_0x11de4d,{options:_0x3af347,args:_0x389115,tdx:_0x58e387}=_0x43fa8e,_0x130a40=_0x389115[0x0],_0x493b58=_0x389115[0x1]||'.';if(!_0x130a40)return console['error'](_0x293730(0x22a)),console[_0x293730(0x216)](_0x293730(0x206)),0x1;const _0x474a7e=_0x3af347[_0x293730(0x207)];_0x3af347[_0x293730(0x2df)]&&(console['error'](_0x293730(0x1ac)+_0x130a40),console[_0x293730(0x216)](_0x293730(0x18d)+_0x493b58),_0x474a7e&&console[_0x293730(0x216)](_0x293730(0x2b7)+_0x474a7e));const _0x21cd02=await withSpinner('Downloading\x20project\x20'+_0x130a40+'...',()=>_0x58e387[_0x293730(0x1ec)]['download'](_0x130a40,_0x493b58,{'revision':_0x474a7e}),{'verbose':_0x3af347[_0x293730(0x2df)]}),_0x57a191=_0x21cd02[_0x293730(0x2c3)];return console['error']('✔\x20Downloaded\x20'+_0x57a191[_0x293730(0x1ea)]),console[_0x293730(0x216)](_0x293730(0x1de)+_0x57a191[_0x293730(0x207)]),console[_0x293730(0x216)](_0x293730(0x1f3)+_0x57a191[_0x293730(0x2bc)]),console[_0x293730(0x216)](_0x293730(0x27e)+_0x493b58+'/'+_0x57a191[_0x293730(0x1ea)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a46_0x11de4d(0x2f5);[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x2c7);async[a46_0x11de4d(0x249)](_0x138318){const _0x56d0cc=a46_0x11de4d,{options:_0x77c101,args:_0x1f5042,tdx:_0x4fce2f}=_0x138318;let _0x31b791='.',_0x2c520c=_0x77c101[_0x56d0cc(0x242)];if(_0x1f5042[0x0]){const {promises:_0x4a6369}=await import('fs');try{const _0x1e1c73=await _0x4a6369[_0x56d0cc(0x2ef)](_0x1f5042[0x0]);if(_0x1e1c73['isDirectory']())_0x31b791=_0x1f5042[0x0];else return console[_0x56d0cc(0x216)](_0x56d0cc(0x25f)+_0x1f5042[0x0]+_0x56d0cc(0x25a)),0x1;}catch{_0x2c520c=_0x1f5042[0x0],_0x31b791='.';}}const _0x345f45=_0x77c101[_0x56d0cc(0x207)],_0x5d70d4=_0x77c101[_0x56d0cc(0x1d2)];_0x77c101[_0x56d0cc(0x2df)]&&(console[_0x56d0cc(0x216)]('Project\x20directory:\x20'+_0x31b791),_0x2c520c&&console['error'](_0x56d0cc(0x239)+_0x2c520c),_0x345f45&&console[_0x56d0cc(0x216)](_0x56d0cc(0x2b7)+_0x345f45),_0x5d70d4&&console[_0x56d0cc(0x216)](_0x56d0cc(0x261)));const _0x5e663c=await withSpinner(_0x56d0cc(0x28d),()=>_0x4fce2f[_0x56d0cc(0x1ec)]['push'](_0x31b791,{'projectName':_0x2c520c,'revision':_0x345f45,'skipValidation':_0x5d70d4}),{'verbose':_0x77c101[_0x56d0cc(0x2df)]}),_0x268ec8=_0x5e663c[_0x56d0cc(0x2c3)];return console[_0x56d0cc(0x216)](_0x56d0cc(0x2e0)+_0x268ec8['projectName']),console['error']('\x20\x20Project\x20ID:\x20'+_0x268ec8['projectId']),console[_0x56d0cc(0x216)]('\x20\x20Revision:\x20'+_0x268ec8[_0x56d0cc(0x207)]),await this['showWorkflowConsoleUrl'](_0x4fce2f,_0x268ec8[_0x56d0cc(0x1ea)],_0x77c101[_0x56d0cc(0x1b1)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x20e);['description']='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a46_0x11de4d(0x249)](_0x3e3dd2){const _0x24cef5=a46_0x11de4d,{options:_0x4c4577,args:_0x1d6ac0,tdx:_0x5c28f6}=_0x3e3dd2,_0x34bb82=_0x1d6ac0[0x0],_0x25f630=_0x1d6ac0[0x1];if(!_0x34bb82)return console[_0x24cef5(0x216)](a46_0x39c6a3['red']('Error:'),_0x24cef5(0x19c)),console[_0x24cef5(0x216)](a46_0x39c6a3[_0x24cef5(0x2c6)](_0x24cef5(0x181))),0x1;const _0x15f41a=_0x4c4577[_0x24cef5(0x207)];_0x4c4577[_0x24cef5(0x2df)]&&(console[_0x24cef5(0x216)](_0x24cef5(0x1ac)+_0x34bb82),_0x25f630&&console[_0x24cef5(0x216)](_0x24cef5(0x17e)+_0x25f630),_0x15f41a&&console[_0x24cef5(0x216)](_0x24cef5(0x2b7)+_0x15f41a),_0x4c4577[_0x24cef5(0x285)]&&console[_0x24cef5(0x216)]('Dry\x20run:\x20yes'));const _0x4a67f8=await withSpinner(_0x24cef5(0x2d5)+_0x34bb82+_0x24cef5(0x196),()=>_0x5c28f6['workflow'][_0x24cef5(0x2e4)](_0x34bb82,{'targetDir':_0x25f630,'revision':_0x15f41a}),{'verbose':_0x4c4577['verbose']}),_0x5da404=_0x4a67f8[_0x24cef5(0x2c3)];_0x5da404[_0x24cef5(0x211)]?console[_0x24cef5(0x216)](_0x24cef5(0x259)+_0x5da404[_0x24cef5(0x1ea)]):console[_0x24cef5(0x216)]('→\x20Project:\x20'+_0x5da404['projectName']);console[_0x24cef5(0x216)](_0x24cef5(0x1de)+_0x5da404[_0x24cef5(0x207)]),console[_0x24cef5(0x216)](_0x24cef5(0x296)+(a46_0x27c8a8[_0x24cef5(0x185)](process[_0x24cef5(0x1b6)](),_0x5da404[_0x24cef5(0x1c5)])||'.')),console['error']('\x20\x20Changes:\x20'+a46_0x39c6a3[_0x24cef5(0x2ea)]('+'+_0x5da404['summary'][_0x24cef5(0x16e)]+_0x24cef5(0x1a4))+',\x20'+(a46_0x39c6a3[_0x24cef5(0x16c)]('~'+_0x5da404[_0x24cef5(0x19e)][_0x24cef5(0x303)]+_0x24cef5(0x26b))+',\x20')+(a46_0x39c6a3[_0x24cef5(0x184)]('-'+_0x5da404[_0x24cef5(0x19e)][_0x24cef5(0x2b3)]+'\x20deleted')+',\x20')+(''+a46_0x39c6a3[_0x24cef5(0x2c6)](_0x5da404['summary'][_0x24cef5(0x2ba)]+'\x20unchanged')));for(const _0x40a555 of _0x5da404[_0x24cef5(0x1e0)]){_0x40a555[_0x24cef5(0x21c)]===_0x24cef5(0x303)&&_0x40a555['diff']&&(console[_0x24cef5(0x216)]('\x0a'+a46_0x39c6a3['cyan'](_0x24cef5(0x1a7)+_0x40a555[_0x24cef5(0x289)])),console['error'](_0x40a555['diff']));}if(!_0x5da404[_0x24cef5(0x22c)])return saveSessionContext({'workflow_project':_0x5da404[_0x24cef5(0x1ea)]},_0x4c4577[_0x24cef5(0x190)]),console[_0x24cef5(0x216)](a46_0x39c6a3[_0x24cef5(0x2ea)]('\x0a✔\x20Already\x20up\x20to\x20date')),console['error'](a46_0x39c6a3[_0x24cef5(0x2c6)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x5da404['projectName'])),0x0;if(_0x4c4577[_0x24cef5(0x285)])return console[_0x24cef5(0x216)](a46_0x39c6a3[_0x24cef5(0x16c)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x4c4577[_0x24cef5(0x2fd)]){if(!isInteractive())return console[_0x24cef5(0x216)](a46_0x39c6a3['red'](_0x24cef5(0x28b)),_0x24cef5(0x24d)),console[_0x24cef5(0x216)](a46_0x39c6a3[_0x24cef5(0x2c6)](_0x24cef5(0x1e6))),0x1;const _0x49709f=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x49709f)return console[_0x24cef5(0x216)](a46_0x39c6a3[_0x24cef5(0x16c)]('Cancelled'),'-\x20no\x20files\x20written'),0x1;}await withSpinner(_0x24cef5(0x2ed),()=>_0x5c28f6[_0x24cef5(0x1ec)][_0x24cef5(0x19f)](_0x5da404,{'revision':_0x15f41a}),{'verbose':_0x4c4577['verbose']}),saveSessionContext({'workflow_project':_0x5da404[_0x24cef5(0x1ea)]},_0x4c4577[_0x24cef5(0x190)]),console[_0x24cef5(0x216)](a46_0x39c6a3[_0x24cef5(0x2ea)](_0x24cef5(0x291)));const _0x1ba403=a46_0x27c8a8[_0x24cef5(0x185)](process[_0x24cef5(0x1b6)](),_0x5da404[_0x24cef5(0x1c5)])||'.';return console['error'](a46_0x39c6a3['dim']('\x20\x20Location:\x20'+_0x1ba403)),console[_0x24cef5(0x216)](a46_0x39c6a3[_0x24cef5(0x2c6)](_0x24cef5(0x194)+_0x5da404[_0x24cef5(0x1ea)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x1ed);[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x1d1);async['execute'](_0xc334ac){const _0x4620a4=a46_0x11de4d,{options:_0x4a5ad6,args:_0x2fd3ca,tdx:_0xf898b2}=_0xc334ac,_0x1fb581=this['resolveProjectDir'](_0x2fd3ca,_0x4a5ad6),_0x1d55ac=_0x4a5ad6['revision'],_0x46fece=_0x4a5ad6[_0x4620a4(0x1d2)];_0x4a5ad6[_0x4620a4(0x2df)]&&(_0x1fb581&&console['error'](_0x4620a4(0x265)+_0x1fb581),_0x1d55ac&&console[_0x4620a4(0x216)](_0x4620a4(0x2b7)+_0x1d55ac),_0x4a5ad6[_0x4620a4(0x285)]&&console[_0x4620a4(0x216)](_0x4620a4(0x266)),_0x46fece&&console['error'](_0x4620a4(0x261)));let _0x317b66;try{_0x317b66=await withSpinner(_0x4620a4(0x251),()=>_0xf898b2['workflow']['preparePushProject']({'sourceDir':_0x1fb581,'revision':_0x1d55ac,'skipValidation':_0x46fece}),{'verbose':_0x4a5ad6[_0x4620a4(0x2df)]});}catch(_0x5acf70){if(_0x5acf70 instanceof Error&&_0x5acf70['message']['includes'](_0x4620a4(0x2ac)))return console[_0x4620a4(0x216)](a46_0x39c6a3[_0x4620a4(0x184)]('Error:'),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x4a5ad6[_0x4620a4(0x18c)]?console[_0x4620a4(0x216)](a46_0x39c6a3['dim']('Tip:\x20cd\x20to\x20workflows/'+_0x4a5ad6[_0x4620a4(0x18c)]+_0x4620a4(0x210)+_0x4a5ad6[_0x4620a4(0x18c)]+'\x27')):console[_0x4620a4(0x216)](a46_0x39c6a3[_0x4620a4(0x2c6)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x5acf70;}const _0x209292=_0x317b66['data'];console[_0x4620a4(0x216)](_0x4620a4(0x170)+_0x209292[_0x4620a4(0x1ea)]),console['error'](_0x4620a4(0x209)+_0x209292['sourceDir']),console['error'](_0x4620a4(0x1de)+_0x209292[_0x4620a4(0x207)]),console[_0x4620a4(0x216)](_0x4620a4(0x28a)+a46_0x39c6a3[_0x4620a4(0x2ea)]('+'+_0x209292['summary'][_0x4620a4(0x16e)]+_0x4620a4(0x1a4))+',\x20'+(a46_0x39c6a3[_0x4620a4(0x16c)]('~'+_0x209292['summary'][_0x4620a4(0x303)]+'\x20modified')+',\x20')+(a46_0x39c6a3[_0x4620a4(0x184)]('-'+_0x209292[_0x4620a4(0x19e)]['deleted']+_0x4620a4(0x23d))+',\x20')+(''+a46_0x39c6a3[_0x4620a4(0x2c6)](_0x209292['summary'][_0x4620a4(0x2ba)]+'\x20unchanged')));for(const _0x3ec55d of _0x209292[_0x4620a4(0x1e0)]){_0x3ec55d[_0x4620a4(0x21c)]===_0x4620a4(0x303)&&_0x3ec55d[_0x4620a4(0x2db)]&&(console[_0x4620a4(0x216)]('\x0a'+a46_0x39c6a3[_0x4620a4(0x1dc)]('---\x20'+_0x3ec55d[_0x4620a4(0x289)])),console[_0x4620a4(0x216)](_0x3ec55d[_0x4620a4(0x2db)]));}if(!_0x209292[_0x4620a4(0x22c)])return console['error'](a46_0x39c6a3[_0x4620a4(0x2ea)](_0x4620a4(0x2cf))),await this[_0x4620a4(0x304)](_0xf898b2,_0x209292[_0x4620a4(0x1ea)],_0x4a5ad6[_0x4620a4(0x1b1)]),0x0;if(_0x4a5ad6[_0x4620a4(0x285)])return console[_0x4620a4(0x216)](a46_0x39c6a3['yellow'](_0x4620a4(0x2b9))),0x0;if(!_0x4a5ad6[_0x4620a4(0x2fd)]){if(!isInteractive())return console[_0x4620a4(0x216)](a46_0x39c6a3[_0x4620a4(0x184)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x4620a4(0x216)](a46_0x39c6a3['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3a3e92=await confirmKey(_0x4620a4(0x26c));if(!_0x3a3e92)return console['error'](a46_0x39c6a3[_0x4620a4(0x16c)](_0x4620a4(0x2e5)),_0x4620a4(0x1bd)),0x1;}const _0x72085f=await withSpinner(_0x4620a4(0x1cd),()=>_0xf898b2['workflow'][_0x4620a4(0x24a)](_0x209292),{'verbose':_0x4a5ad6[_0x4620a4(0x2df)]}),_0x2c22be=_0x72085f[_0x4620a4(0x2c3)];return console['error'](a46_0x39c6a3[_0x4620a4(0x2ea)]('✔\x20Push\x20complete')),console[_0x4620a4(0x216)](_0x4620a4(0x2f2)+_0x2c22be[_0x4620a4(0x1d0)]),console[_0x4620a4(0x216)]('\x20\x20Revision:\x20'+_0x2c22be[_0x4620a4(0x207)]),await this['showWorkflowConsoleUrl'](_0xf898b2,_0x2c22be[_0x4620a4(0x1ea)],_0x4a5ad6[_0x4620a4(0x1b1)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x241);[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x1f9);async[a46_0x11de4d(0x249)](_0x112df4){const _0x290780=a46_0x11de4d,{options:_0x1b1351,args:_0x2888ef,tdx:_0x17bc16}=_0x112df4,_0x381cfa=this[_0x290780(0x254)](_0x2888ef,_0x1b1351),_0x5f0fa1=_0x1b1351['name'],_0x412e19=_0x1b1351[_0x290780(0x207)],_0x267bda=_0x1b1351[_0x290780(0x1d2)];if(!_0x381cfa)return console[_0x290780(0x216)](a46_0x39c6a3[_0x290780(0x184)](_0x290780(0x2f1)),'Source\x20directory\x20is\x20required'),console[_0x290780(0x216)](a46_0x39c6a3['dim'](_0x290780(0x2be))),console[_0x290780(0x216)](a46_0x39c6a3['dim'](_0x290780(0x2c4))),0x1;if(!_0x5f0fa1)return console['error'](a46_0x39c6a3[_0x290780(0x184)](_0x290780(0x2f1)),_0x290780(0x1bb)),console[_0x290780(0x216)](a46_0x39c6a3['dim'](_0x290780(0x2be))),0x1;_0x1b1351['verbose']&&(console['error']('Source\x20directory:\x20'+_0x381cfa),console[_0x290780(0x216)](_0x290780(0x1b3)+_0x5f0fa1),_0x412e19&&console['error'](_0x290780(0x2b7)+_0x412e19),_0x1b1351[_0x290780(0x285)]&&console[_0x290780(0x216)](_0x290780(0x266)),_0x267bda&&console['error'](_0x290780(0x261)));const _0x3e968a=await withSpinner('Analyzing\x20project...',()=>_0x17bc16[_0x290780(0x1ec)]['prepareCloneProject'](_0x381cfa,_0x5f0fa1,{'revision':_0x412e19,'skipValidation':_0x267bda}),{'verbose':_0x1b1351[_0x290780(0x2df)]}),_0x2601f5=_0x3e968a[_0x290780(0x2c3)];console[_0x290780(0x216)](_0x290780(0x257)+_0x2601f5[_0x290780(0x28e)]);_0x2601f5[_0x290780(0x20a)]&&console[_0x290780(0x216)](_0x290780(0x21b)+_0x2601f5[_0x290780(0x20a)]);console[_0x290780(0x216)]('New\x20project\x20name:\x20'+_0x2601f5['newProjectName']),console[_0x290780(0x216)](_0x290780(0x2b7)+_0x2601f5['revision']),console[_0x290780(0x216)](_0x290780(0x17c)+_0x2601f5[_0x290780(0x214)]);_0x2601f5[_0x290780(0x2a9)]&&(console[_0x290780(0x216)](a46_0x39c6a3['yellow'](_0x290780(0x1f6)+_0x2601f5[_0x290780(0x288)]+_0x290780(0x202)+_0x2601f5[_0x290780(0x176)]+')')),console[_0x290780(0x216)](a46_0x39c6a3['yellow'](_0x290780(0x2ce))));if(_0x1b1351[_0x290780(0x285)])return console[_0x290780(0x216)](a46_0x39c6a3['yellow'](_0x290780(0x1cc))),0x0;if(!_0x1b1351[_0x290780(0x2fd)]){if(!isInteractive())return console[_0x290780(0x216)](a46_0x39c6a3[_0x290780(0x184)](_0x290780(0x28b)),_0x290780(0x24d)),console['error'](a46_0x39c6a3[_0x290780(0x2c6)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1e5a80=_0x2601f5[_0x290780(0x20a)]||a46_0x27c8a8[_0x290780(0x1c3)](_0x381cfa),_0x29f670=_0x2601f5[_0x290780(0x2a9)]?_0x290780(0x204)+_0x5f0fa1+_0x290780(0x1c0):'\x0aClone\x20\x22'+_0x1e5a80+_0x290780(0x172)+_0x5f0fa1+'\x22?',_0x3c9454=await confirmKey(_0x29f670);if(!_0x3c9454)return console['error'](a46_0x39c6a3[_0x290780(0x16c)]('Cancelled')),0x1;}const _0x44d8e6=await withSpinner(_0x2601f5[_0x290780(0x2a9)]?_0x290780(0x1cb)+_0x5f0fa1+_0x290780(0x196):_0x290780(0x2a2)+_0x5f0fa1+'...',()=>_0x17bc16[_0x290780(0x1ec)][_0x290780(0x225)](_0x2601f5),{'verbose':_0x1b1351[_0x290780(0x2df)]}),_0x51e7ce=_0x44d8e6[_0x290780(0x2c3)];return console['error'](a46_0x39c6a3[_0x290780(0x2ea)](_0x2601f5['targetExists']?_0x290780(0x23b):'✔\x20Clone\x20complete')),console[_0x290780(0x216)](_0x290780(0x2e7)+_0x51e7ce[_0x290780(0x288)]),console[_0x290780(0x216)](_0x290780(0x2f2)+_0x51e7ce[_0x290780(0x2f7)]),console[_0x290780(0x216)](_0x290780(0x1de)+_0x51e7ce[_0x290780(0x207)]),await this[_0x290780(0x304)](_0x17bc16,_0x51e7ce[_0x290780(0x288)],_0x1b1351[_0x290780(0x1b1)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a46_0x11de4d(0x242)]='workflow:delete';[a46_0x11de4d(0x1f7)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x2a7369){const _0x523a4a=a46_0x11de4d,{options:_0x2fa243,args:_0x107012,tdx:_0x44f2c1}=_0x2a7369,_0x54ccb8=_0x107012[0x0];if(!_0x54ccb8)return console[_0x523a4a(0x216)](_0x523a4a(0x224)),console[_0x523a4a(0x216)](_0x523a4a(0x2d0)),0x1;_0x2fa243[_0x523a4a(0x2df)]&&console['error'](_0x523a4a(0x1ac)+_0x54ccb8);if(!_0x2fa243['yes']){if(!isInteractive())return console['error'](a46_0x39c6a3[_0x523a4a(0x184)](_0x523a4a(0x28b)),_0x523a4a(0x24d)),console['error'](a46_0x39c6a3['dim'](_0x523a4a(0x1e6))),0x1;const _0x1e6eef=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x54ccb8+_0x523a4a(0x278));if(!_0x1e6eef)return console[_0x523a4a(0x216)](a46_0x39c6a3[_0x523a4a(0x16c)](_0x523a4a(0x2e5))),0x1;}const _0x4cfc4b=await withSpinner('Deleting\x20project\x20'+_0x54ccb8+'...',()=>_0x44f2c1['workflow']['delete'](_0x54ccb8),{'verbose':_0x2fa243[_0x523a4a(0x2df)]}),_0x315256=_0x4cfc4b[_0x523a4a(0x2c3)];return console[_0x523a4a(0x216)]('✔\x20Deleted\x20project\x20'+_0x315256['projectName']),console[_0x523a4a(0x216)](_0x523a4a(0x2f2)+_0x315256['projectId']),0x0;}}export function parseKeyValue(_0x1d8ffc){const _0x510055=a46_0x11de4d,_0x3fefc7=_0x1d8ffc['indexOf']('=');if(_0x3fefc7===-0x1)throw new Error(_0x510055(0x2cb)+_0x1d8ffc+_0x510055(0x227));const _0x32a1a0=_0x1d8ffc[_0x510055(0x1ce)](0x0,_0x3fefc7),_0x179a5a=_0x1d8ffc[_0x510055(0x1ce)](_0x3fefc7+0x1);if(!_0x32a1a0)throw new Error(_0x510055(0x20f));return{'key':_0x32a1a0,'value':_0x179a5a};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x171);['description']=a46_0x11de4d(0x2fb);async[a46_0x11de4d(0x249)](_0x2e428d){const _0x37183a=a46_0x11de4d,{options:_0x13135f,args:_0x1e2a2f,tdx:_0x497913}=_0x2e428d,_0xc2d20b=this[_0x37183a(0x246)](_0x1e2a2f,_0x13135f);if(!_0xc2d20b)return 0x1;_0x13135f['verbose']&&console[_0x37183a(0x216)]('Project:\x20'+_0xc2d20b);const _0x5085d5=await withSpinner(_0x37183a(0x2fc),()=>_0x497913[_0x37183a(0x1ec)][_0x37183a(0x27a)](_0xc2d20b),{'verbose':_0x13135f[_0x37183a(0x2df)]}),{secrets:_0x1bbe2a}=_0x5085d5[_0x37183a(0x2c3)];return console[_0x37183a(0x216)](_0x37183a(0x199)+_0x1bbe2a['length']+'\x20secret'+(_0x1bbe2a[_0x37183a(0x284)]!==0x1?'s':'')),await handleSDKOutput(_0x1bbe2a,_0x13135f),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x290);[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x18f);async[a46_0x11de4d(0x249)](_0x2124bc){const _0x95089=a46_0x11de4d,{options:_0x3a8374,args:_0x5ef971,tdx:_0x35b208}=_0x2124bc;let _0x214387,_0x46ce48;if(_0x5ef971[_0x95089(0x284)]>=0x2)_0x214387=_0x5ef971[0x0],_0x46ce48=_0x5ef971[0x1];else{if(_0x5ef971[_0x95089(0x284)]===0x1&&_0x3a8374[_0x95089(0x18c)])_0x214387=_0x3a8374[_0x95089(0x18c)],_0x46ce48=_0x5ef971[0x0];else return _0x5ef971['length']===0x1?(console[_0x95089(0x216)](_0x95089(0x22a)),console[_0x95089(0x216)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x95089(0x216)]('Error:\x20KEY=VALUE\x20is\x20required'),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE'),0x1);}let _0x5dd821,_0x58720e;try{({key:_0x5dd821,value:_0x58720e}=parseKeyValue(_0x46ce48));}catch(_0x453f34){return _0x453f34 instanceof Error&&console[_0x95089(0x216)](a46_0x39c6a3[_0x95089(0x184)](_0x95089(0x2f1)),_0x453f34[_0x95089(0x240)]),0x1;}_0x3a8374[_0x95089(0x2df)]&&(console[_0x95089(0x216)](_0x95089(0x1ac)+_0x214387),console[_0x95089(0x216)](_0x95089(0x258)+_0x5dd821));const _0x178b2e=await withSpinner('Setting\x20secret...',()=>_0x35b208['workflow'][_0x95089(0x21f)](_0x214387,_0x5dd821,_0x58720e),{'verbose':_0x3a8374[_0x95089(0x2df)]}),_0x1642a9=_0x178b2e[_0x95089(0x2c3)];return console[_0x95089(0x216)](_0x95089(0x2e3)+_0x1642a9[_0x95089(0x277)]+_0x95089(0x2d6)+_0x1642a9[_0x95089(0x1ea)]+'\x27'),(_0x3a8374[_0x95089(0x1bc)]||_0x3a8374[_0x95089(0x1f4)])&&await handleSingleObjectOutput(_0x1642a9,_0x3a8374),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x2e1);[a46_0x11de4d(0x1f7)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a46_0x11de4d(0x249)](_0x122fc2){const _0x174468=a46_0x11de4d,{options:_0x4b19cb,args:_0x557a59,tdx:_0x25df15}=_0x122fc2;let _0x3bc7b4,_0x1285fa;if(_0x557a59[_0x174468(0x284)]>=0x2)_0x3bc7b4=_0x557a59[0x0],_0x1285fa=_0x557a59[0x1];else{if(_0x557a59['length']===0x1&&_0x4b19cb['workflowProject'])_0x3bc7b4=_0x4b19cb[_0x174468(0x18c)],_0x1285fa=_0x557a59[0x0];else return _0x557a59[_0x174468(0x284)]===0x1?(console[_0x174468(0x216)](_0x174468(0x22a)),console[_0x174468(0x216)](_0x174468(0x1f2)),0x1):(console[_0x174468(0x216)](_0x174468(0x2b0)),console[_0x174468(0x216)](_0x174468(0x197)),0x1);}_0x4b19cb[_0x174468(0x2df)]&&(console['error'](_0x174468(0x1ac)+_0x3bc7b4),console[_0x174468(0x216)](_0x174468(0x258)+_0x1285fa));if(!_0x4b19cb[_0x174468(0x2fd)]){if(!isInteractive())return console[_0x174468(0x216)](a46_0x39c6a3[_0x174468(0x184)](_0x174468(0x28b)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x174468(0x216)](a46_0x39c6a3[_0x174468(0x2c6)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3457f3=await confirmKey(_0x174468(0x2f6)+_0x1285fa+_0x174468(0x1f0)+_0x3bc7b4+'\x27?');if(!_0x3457f3)return console[_0x174468(0x216)](a46_0x39c6a3['yellow'](_0x174468(0x2e5))),0x1;}const _0x3a02d8=await withSpinner('Deleting\x20secret...',()=>_0x25df15[_0x174468(0x1ec)][_0x174468(0x229)](_0x3bc7b4,_0x1285fa),{'verbose':_0x4b19cb['verbose']}),_0x1b6d17=_0x3a02d8[_0x174468(0x2c3)];return console[_0x174468(0x216)](_0x174468(0x2e3)+_0x1b6d17[_0x174468(0x277)]+_0x174468(0x23e)+_0x1b6d17[_0x174468(0x1ea)]+'\x27'),(_0x4b19cb[_0x174468(0x1bc)]||_0x4b19cb[_0x174468(0x1f4)])&&await handleSingleObjectOutput(_0x1b6d17,_0x4b19cb),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(_0x1fb88b){const _0x2a9c86=a46_0x11de4d,_0x4e279a=Math[_0x2a9c86(0x1e3)](_0x1fb88b/0x3e8),_0x39a5e9=Math[_0x2a9c86(0x1e3)](_0x4e279a/0x3c),_0xd8550e=Math[_0x2a9c86(0x1e3)](_0x39a5e9/0x3c),_0x25dfeb=Math[_0x2a9c86(0x1e3)](_0xd8550e/0x18);if(_0x25dfeb>0x0){const _0x2f746c=_0xd8550e%0x18;return _0x2f746c>0x0?_0x25dfeb+'d\x20'+_0x2f746c+'h':_0x25dfeb+'d';}else{if(_0xd8550e>0x0){const _0x33e728=_0x39a5e9%0x3c;return _0x33e728>0x0?_0xd8550e+'h\x20'+_0x33e728+'m':_0xd8550e+'h';}else{if(_0x39a5e9>0x0){const _0x5095c4=_0x4e279a%0x3c;return _0x5095c4>0x0?_0x39a5e9+'m\x20'+_0x5095c4+'s':_0x39a5e9+'m';}else return _0x4e279a+'s';}}}function formatTimestamp(_0x1173e3,_0x2de3a5){const _0x12fff5=a46_0x11de4d,_0x4a7b8d=new Date(_0x1173e3),_0x1a235d=String(_0x4a7b8d[_0x12fff5(0x283)]())['padStart'](0x2,'0'),_0x2e0a4d=String(_0x4a7b8d[_0x12fff5(0x29f)]())['padStart'](0x2,'0'),_0x1b2ded=_0x1a235d+':'+_0x2e0a4d,_0x1cd04e=_0x4a7b8d['getFullYear']()===_0x2de3a5[_0x12fff5(0x299)]()&&_0x4a7b8d['getMonth']()===_0x2de3a5[_0x12fff5(0x226)]()&&_0x4a7b8d[_0x12fff5(0x1a8)]()===_0x2de3a5['getDate']();if(_0x1cd04e)return _0x1b2ded;else{const _0x180064=String(_0x4a7b8d[_0x12fff5(0x226)]()+0x1)[_0x12fff5(0x2b8)](0x2,'0'),_0x13c21e=String(_0x4a7b8d[_0x12fff5(0x1a8)]())[_0x12fff5(0x2b8)](0x2,'0');return _0x180064+'-'+_0x13c21e+'\x20'+_0x1b2ded;}}function formatDate(_0x2a3929){const _0x51d09b=a46_0x11de4d,_0x31045d=_0x2a3929[_0x51d09b(0x299)](),_0x221109=String(_0x2a3929[_0x51d09b(0x226)]()+0x1)[_0x51d09b(0x2b8)](0x2,'0'),_0x37f777=String(_0x2a3929[_0x51d09b(0x1a8)]())[_0x51d09b(0x2b8)](0x2,'0');return _0x31045d+'-'+_0x221109+'-'+_0x37f777;}function getTaskStateIcon(_0xc4c225){const _0x20552a={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x20552a[_0xc4c225]||'⚪';}function getBarChar(_0x2cd6e6){const _0x8c0129=a46_0x11de4d;return _0x2cd6e6==='error'||_0x2cd6e6===_0x8c0129(0x268)?'×':'─';}function getBarColor(_0x1070a9){const _0x998821=a46_0x11de4d,_0x1be745={'success':a46_0x39c6a3['green'],'error':a46_0x39c6a3[_0x998821(0x184)],'group_error':a46_0x39c6a3[_0x998821(0x184)],'running':a46_0x39c6a3['blue'],'blocked':a46_0x39c6a3[_0x998821(0x16c)],'planned':a46_0x39c6a3[_0x998821(0x2c6)],'canceling':a46_0x39c6a3[_0x998821(0x16c)]};return _0x1be745[_0x1070a9]||a46_0x39c6a3[_0x998821(0x2f8)];}function parseTaskName(_0x18a859){const _0x123218=a46_0x11de4d;let _0x4fc9e7=_0x18a859[_0x123218(0x2c5)](/^\++/,'');const _0x4a6e7a=_0x4fc9e7[_0x123218(0x2ae)]('+'),_0xf80144=_0x4a6e7a[_0x123218(0x284)]>0x1?_0x4a6e7a[_0x123218(0x284)]-0x2:0x0,_0x9d604e=_0x4a6e7a[_0x4a6e7a[_0x123218(0x284)]-0x1]||_0x4fc9e7;return{'level':_0xf80144,'name':'+'+_0x9d604e};}function truncateTaskName(_0x122a29,_0x17f820){const _0x4f69fc=a46_0x11de4d,_0x3ee6e6=stringWidth(_0x122a29);if(_0x3ee6e6<=_0x17f820)return _0x122a29;let _0x4c0e4e=_0x122a29;while(stringWidth(_0x4c0e4e+'…')>_0x17f820&&_0x4c0e4e[_0x4f69fc(0x284)]>0x0){_0x4c0e4e=_0x4c0e4e[_0x4f69fc(0x19a)](0x0,-0x1);}return _0x4c0e4e+'…';}function calculateTimeScale(_0x4d951d,_0x686b47){const _0x40ac64=a46_0x11de4d;return{'startTime':_0x4d951d[_0x40ac64(0x297)],'endTime':_0x4d951d[_0x40ac64(0x280)],'durationMs':_0x4d951d[_0x40ac64(0x292)],'msPerChar':_0x4d951d['duration']/_0x686b47};}function timeToPosition(_0x49f967,_0x9b9b59,_0x38dbc6){const _0x31937e=a46_0x11de4d,_0x41f73b=_0x49f967-_0x9b9b59[_0x31937e(0x215)],_0x49002d=Math[_0x31937e(0x1e3)](_0x41f73b/_0x9b9b59['msPerChar']);return Math[_0x31937e(0x198)](0x0,Math[_0x31937e(0x247)](_0x49002d,_0x38dbc6));}function renderTimeAxis(_0x5a1330,_0x44fca7){const _0xbbd1aa=a46_0x11de4d,_0xcf4bb6=Math['min'](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0xbbd1aa(0x198)](TIMELINE_CONFIG[_0xbbd1aa(0x2a1)],Math['floor'](_0x44fca7/TIMELINE_CONFIG[_0xbbd1aa(0x19d)]))),_0x458c9c=_0x5a1330['durationMs']/(_0xcf4bb6-0x1),_0x567511=new Date(_0x5a1330[_0xbbd1aa(0x215)]),_0x32f9d8=[];for(let _0x19544c=0x0;_0x19544c<_0xcf4bb6;_0x19544c++){const _0x19ed35=_0x5a1330[_0xbbd1aa(0x215)]+_0x19544c*_0x458c9c,_0x304f95=timeToPosition(_0x19ed35,_0x5a1330,_0x44fca7),_0x16013b=formatTimestamp(_0x19ed35,_0x567511);_0x32f9d8[_0xbbd1aa(0x2f9)]({'pos':_0x304f95,'text':_0x16013b});}const _0x569905=new Array(_0x44fca7)['fill']('\x20');let _0x17a05c=-0x1;for(const {pos:_0x394145,text:_0x172b27}of _0x32f9d8){let _0x260361=Math[_0xbbd1aa(0x198)](0x0,_0x394145-Math[_0xbbd1aa(0x1e3)](_0x172b27[_0xbbd1aa(0x284)]/0x2));_0x260361<=_0x17a05c+TIMELINE_CONFIG[_0xbbd1aa(0x1e5)]&&(_0x260361=_0x17a05c+TIMELINE_CONFIG[_0xbbd1aa(0x1e5)]+0x1);_0x260361+_0x172b27[_0xbbd1aa(0x284)]>_0x44fca7&&(_0x260361=_0x44fca7-_0x172b27[_0xbbd1aa(0x284)]);if(_0x260361>=0x0&&_0x260361+_0x172b27[_0xbbd1aa(0x284)]<=_0x44fca7&&_0x260361>_0x17a05c){for(let _0x456b3d=0x0;_0x456b3d<_0x172b27[_0xbbd1aa(0x284)];_0x456b3d++){_0x569905[_0x260361+_0x456b3d]=_0x172b27[_0x456b3d];}_0x17a05c=_0x260361+_0x172b27['length']-0x1;}}return _0x569905[_0xbbd1aa(0x26a)]('');}function renderTaskRow(_0x1219f7,_0x3caae3,_0x1ec4bd,_0x415dc2){const _0x16ce1a=a46_0x11de4d,{level:_0x2ca214,name:_0x5d671e}=parseTaskName(_0x1219f7[_0x16ce1a(0x242)]),_0x429bf7='\x20'[_0x16ce1a(0x2bb)](_0x2ca214),_0x27c76e=_0x1219f7['window']?'('+formatElapsed(_0x1219f7['window']['duration'])+')':'',_0x114300=stringWidth(_0x27c76e),_0x36401c=_0x2ca214*0x1,_0x26e95d=_0x415dc2-_0x36401c-_0x114300-0x1,_0x429521=truncateTaskName(_0x5d671e,_0x26e95d),_0xe6143=_0x429bf7+_0x429521,_0xa3e8ae=stringWidth(_0xe6143),_0x585c6f=_0x415dc2-_0xa3e8ae-_0x114300,_0x4087d7=_0xe6143+'\x20'[_0x16ce1a(0x2bb)](Math[_0x16ce1a(0x198)](0x1,_0x585c6f))+a46_0x39c6a3[_0x16ce1a(0x2c6)](_0x27c76e),_0x21a146=getTaskStateIcon(_0x1219f7[_0x16ce1a(0x1b5)]),_0x2032d3=new Array(_0x1ec4bd)[_0x16ce1a(0x2ca)]('\x20');if(_0x1219f7['window']){const _0x767d4a=timeToPosition(_0x1219f7['window'][_0x16ce1a(0x297)],_0x3caae3,_0x1ec4bd),_0x1a5320=timeToPosition(_0x1219f7[_0x16ce1a(0x18a)][_0x16ce1a(0x280)],_0x3caae3,_0x1ec4bd),_0x291a37=getBarChar(_0x1219f7[_0x16ce1a(0x1b5)]),_0x19ba44=Math['max'](_0x767d4a+0x1,_0x1a5320);for(let _0x8d5f75=_0x767d4a;_0x8d5f75<Math['min'](_0x19ba44,_0x1ec4bd);_0x8d5f75++){_0x2032d3[_0x8d5f75]=_0x291a37;}}const _0x485472=getBarColor(_0x1219f7['state']),_0x945b55=_0x2032d3[_0x16ce1a(0x192)](_0x4d44c3=>_0x4d44c3==='\x20'?'\x20':_0x485472(_0x4d44c3))['join']('');return _0x21a146+'\x20'+_0x4087d7+'│'+_0x945b55+'│';}function calculateStats(_0x403d4a){const _0x4db818=a46_0x11de4d,_0x240e27={'total':_0x403d4a[_0x4db818(0x284)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x2ae775 of _0x403d4a){if(_0x2ae775[_0x4db818(0x1b5)]===_0x4db818(0x221))_0x240e27[_0x4db818(0x221)]++;else{if(_0x2ae775[_0x4db818(0x1b5)]===_0x4db818(0x216)||_0x2ae775['state']===_0x4db818(0x268))_0x240e27[_0x4db818(0x216)]++;else _0x2ae775[_0x4db818(0x1b5)]===_0x4db818(0x2e8)?_0x240e27[_0x4db818(0x2e8)]++:_0x240e27[_0x4db818(0x28f)]++;}}return _0x240e27;}function formatStats(_0x205e68){const _0x5fe376=a46_0x11de4d;return[_0x5fe376(0x2d7)+_0x205e68[_0x5fe376(0x243)],'✅\x20'+_0x205e68[_0x5fe376(0x221)],'❌\x20'+_0x205e68[_0x5fe376(0x216)],_0x5fe376(0x1d5)+_0x205e68['running'],'⏳\x20'+_0x205e68[_0x5fe376(0x28f)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a46_0x11de4d(0x242)]=a46_0x11de4d(0x205);[a46_0x11de4d(0x1f7)]=a46_0x11de4d(0x2fa);async['execute'](_0x3f71ea){const _0xcd1630=a46_0x11de4d,{options:_0x469ba8,args:_0x161457,tdx:_0x51d996}=_0x3f71ea;let _0x461f86,_0x4b8890,_0x391faa=![];if(_0x161457[0x0]){if(_0x161457[0x0]['includes']('.')){const _0x265245=this[_0xcd1630(0x201)](_0x161457,_0x469ba8);if(!_0x265245)return 0x1;_0x461f86=_0x265245[_0xcd1630(0x1ea)],_0x4b8890=_0x265245['workflowName'];}else{_0x4b8890=_0x161457[0x0],_0x461f86=_0x469ba8['workflowProject'];if(!_0x461f86)return console[_0xcd1630(0x216)](a46_0x39c6a3[_0xcd1630(0x184)](_0xcd1630(0x2f1)),_0xcd1630(0x22d)),0x1;_0x391faa=!![];}}else{const _0x2b94d6=this[_0xcd1630(0x201)](_0x161457,_0x469ba8);if(!_0x2b94d6)return 0x1;_0x461f86=_0x2b94d6['projectName'],_0x4b8890=_0x2b94d6[_0xcd1630(0x2bf)];}if(_0x469ba8[_0xcd1630(0x2df)]){if(_0x461f86&&_0x4b8890)console[_0xcd1630(0x216)](_0xcd1630(0x29a)+_0x461f86+'.'+_0x4b8890);else _0x461f86&&console[_0xcd1630(0x216)]('Filter:\x20project='+_0x461f86);}const _0x283937=_0x469ba8['attemptId'],_0x1b0005=_0x469ba8[_0xcd1630(0x1fa)];if(_0x283937){_0x1b0005&&console['error'](a46_0x39c6a3['yellow'](_0xcd1630(0x21a)),_0xcd1630(0x29c));const _0x2cf9af=_0x469ba8['follow'];return _0x2cf9af?await this[_0xcd1630(0x232)](_0x3f71ea,_0x283937):await this[_0xcd1630(0x2ff)](_0x3f71ea,_0x283937,_0x469ba8),0x0;}if(_0x1b0005){const _0xbd9a62=await withSpinner(_0xcd1630(0x217),()=>_0x51d996[_0xcd1630(0x1ec)][_0xcd1630(0x1cf)]({'projectName':_0x461f86,'workflowName':_0x4b8890,'limit':0x64}),{'verbose':_0x469ba8[_0xcd1630(0x2df)]}),_0x54dc31=_0xbd9a62[_0xcd1630(0x2c3)][_0xcd1630(0x1be)](_0x372365=>_0x372365['id']===_0x1b0005);if(!_0x54dc31)return console['error'](a46_0x39c6a3[_0xcd1630(0x184)](_0xcd1630(0x2f1)),_0xcd1630(0x218)+_0x1b0005),0x1;if(!_0x54dc31[_0xcd1630(0x22e)]?.['id'])return console[_0xcd1630(0x216)](a46_0x39c6a3['red'](_0xcd1630(0x2f1)),_0xcd1630(0x1fe)+_0x1b0005+_0xcd1630(0x235)),0x1;const _0x2b1472=_0x54dc31[_0xcd1630(0x22e)]['id'];_0x469ba8[_0xcd1630(0x2df)]&&console[_0xcd1630(0x216)]('Using\x20attempt\x20'+_0x2b1472+_0xcd1630(0x179)+_0x1b0005);const _0x574ed5=_0x469ba8[_0xcd1630(0x1a2)];return _0x574ed5?await this[_0xcd1630(0x232)](_0x3f71ea,_0x2b1472):await this['renderSingleTimeline'](_0x3f71ea,_0x2b1472,_0x469ba8),0x0;}const _0x373df2=await withSpinner(_0xcd1630(0x186),()=>_0x51d996[_0xcd1630(0x1ec)][_0xcd1630(0x1cf)]({'projectName':_0x461f86,'workflowName':_0x4b8890,'limit':_0x469ba8['limit']||0x32}),{'verbose':_0x469ba8[_0xcd1630(0x2df)]}),_0xae07fe=_0x373df2[_0xcd1630(0x2c3)];if(_0xae07fe[_0xcd1630(0x284)]===0x0){if(_0x461f86&&_0x4b8890)console[_0xcd1630(0x216)](_0xcd1630(0x212)+_0x461f86+'.'+_0x4b8890);else _0x461f86?console['error'](_0xcd1630(0x2ab)+_0x461f86):(console['error'](_0xcd1630(0x1da)),console['error'](a46_0x39c6a3[_0xcd1630(0x2c6)](_0xcd1630(0x1ba))));return 0x0;}_0xae07fe['sort']((_0x5aa666,_0x154c8f)=>{const _0x59f497=_0xcd1630,_0xdfda3c=_0x5aa666[_0x59f497(0x21d)]||'',_0x15494c=_0x154c8f[_0x59f497(0x21d)]||'';return _0x15494c['localeCompare'](_0xdfda3c);});if(_0x469ba8[_0xcd1630(0x1bc)]||_0x469ba8[_0xcd1630(0x1f4)])return await handleSDKOutput(_0xae07fe,_0x469ba8),0x0;let _0x5db4f9;if(_0x391faa){const _0x11686a=_0xae07fe[0x0];if(!_0x11686a[_0xcd1630(0x22e)]?.['id'])return console[_0xcd1630(0x216)](_0xcd1630(0x1c9)),0x0;_0x5db4f9=_0x11686a[_0xcd1630(0x22e)]['id'],_0x469ba8[_0xcd1630(0x2df)]&&console[_0xcd1630(0x216)]('Auto-selected\x20latest\x20session:\x20'+_0x11686a[_0xcd1630(0x21d)]);}else{const _0x34436a=_0xae07fe['map'](_0x1f3878=>{const _0x21126e=_0xcd1630,_0x287a86=getAttemptStatusDisplay(_0x1f3878[_0x21126e(0x22e)]);return{'title':_0x1f3878[_0x21126e(0x1d6)]?.[_0x21126e(0x242)]+'.'+_0x1f3878[_0x21126e(0x1ec)]?.[_0x21126e(0x242)]+'\x20-\x20'+_0x1f3878[_0x21126e(0x21d)]+'\x20'+_0x287a86[_0x21126e(0x1c1)],'value':_0x1f3878['lastAttempt']?.['id']||'','description':_0x287a86[_0x21126e(0x2cd)]};}),_0x407372=await a46_0x4a1f33({'type':_0xcd1630(0x273),'name':_0xcd1630(0x1e9),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x34436a[_0xcd1630(0x1aa)](_0x2aef7=>_0x2aef7[_0xcd1630(0x1e2)]!=='')});if(!_0x407372[_0xcd1630(0x1e9)])return 0x0;_0x5db4f9=_0x407372[_0xcd1630(0x1e9)];}const _0x50ebe5=_0x469ba8[_0xcd1630(0x1a2)];return _0x50ebe5?await this[_0xcd1630(0x232)](_0x3f71ea,_0x5db4f9):await this['renderSingleTimeline'](_0x3f71ea,_0x5db4f9,_0x469ba8),0x0;}async['renderSingleTimeline'](_0x25776d,_0x5bc9a3,_0x21fed3){const _0x4b3a89=a46_0x11de4d,{tdx:_0x1fbd5d}=_0x25776d;let _0x421a28,_0x47373f;try{[_0x421a28,_0x47373f]=await Promise[_0x4b3a89(0x2ee)]([_0x1fbd5d[_0x4b3a89(0x1ec)][_0x4b3a89(0x2b6)](_0x5bc9a3),_0x1fbd5d[_0x4b3a89(0x1ec)][_0x4b3a89(0x1d9)](_0x5bc9a3,![])]);}catch(_0x42ac06){console['error'](a46_0x39c6a3['red'](_0x4b3a89(0x274)));_0x21fed3[_0x4b3a89(0x2df)]&&console['error'](_0x42ac06);throw _0x42ac06;}if(_0x21fed3[_0x4b3a89(0x1bc)]||_0x21fed3[_0x4b3a89(0x1f4)]){const _0x29092d=this['buildTimelineData'](_0x421a28,_0x47373f);await handleSDKOutput([_0x29092d],_0x21fed3);return;}const _0x399d87=_0x1fbd5d[_0x4b3a89(0x200)]['site'],_0x111e4f=this[_0x4b3a89(0x17d)](_0x421a28,_0x47373f,_0x399d87);console['log'](_0x111e4f);}async['pollTimeline'](_0x38d2a9,_0x5cc25d){const _0xa81b71=a46_0x11de4d,{tdx:_0x27a438}=_0x38d2a9,_0x371cb5=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x2a1c3b=TIMELINE_CONFIG[_0xa81b71(0x20b)];let _0xfc9744=0x0;while(_0xfc9744<_0x2a1c3b){process['stdout'][_0xa81b71(0x1c8)]&&process[_0xa81b71(0x2d3)][_0xa81b71(0x223)]('\x1bc');let _0x3ae9a6,_0x4553a0;try{[_0x3ae9a6,_0x4553a0]=await Promise[_0xa81b71(0x2ee)]([_0x27a438['workflow']['attempt'](_0x5cc25d),_0x27a438[_0xa81b71(0x1ec)][_0xa81b71(0x1d9)](_0x5cc25d,![])]);}catch(_0x166e49){console['error'](a46_0x39c6a3[_0xa81b71(0x184)](_0xa81b71(0x26e)));_0xfc9744>0x0&&console[_0xa81b71(0x216)](a46_0x39c6a3['dim']('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0xfc9744));throw _0x166e49;}const _0x50c6ba=_0x27a438['context'][_0xa81b71(0x1b1)],_0x3e5851=this[_0xa81b71(0x17d)](_0x3ae9a6,_0x4553a0,_0x50c6ba);console[_0xa81b71(0x2f4)](_0x3e5851);const _0x512ef9=_0x3ae9a6['done']&&_0x4553a0[_0xa81b71(0x263)](_0x55f316=>_0x55f316['state']!==_0xa81b71(0x2e8)&&_0x55f316['state']!==_0xa81b71(0x27b));if(_0x512ef9){console[_0xa81b71(0x216)](a46_0x39c6a3[_0xa81b71(0x2ea)]('\x0a✔\x20Attempt\x20complete'));break;}console['error'](a46_0x39c6a3[_0xa81b71(0x2c6)](_0xa81b71(0x248)+_0xfc9744*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x586480=>setTimeout(_0x586480,_0x371cb5)),_0xfc9744++;}_0xfc9744>=_0x2a1c3b&&console['error'](a46_0x39c6a3[_0xa81b71(0x16c)](_0xa81b71(0x236)));}['renderTimeline'](_0x21372f,_0x364ffa,_0x4a43bb){const _0x1d9355=a46_0x11de4d,_0x142233=[],_0x41d6cf=TIMELINE_CONFIG[_0x1d9355(0x1b8)],_0x24c1df=0x5,_0x553d34=process[_0x1d9355(0x2d3)][_0x1d9355(0x2e2)]||0x78,_0x3b8b66=_0x553d34-_0x41d6cf-_0x24c1df,_0xd38545=Math[_0x1d9355(0x198)](TIMELINE_CONFIG[_0x1d9355(0x2a5)],Math[_0x1d9355(0x247)](_0x3b8b66,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x5d3ce1=new Date(_0x21372f['createdAt'])[_0x1d9355(0x188)](),_0x59f7ce=_0x21372f[_0x1d9355(0x175)]?new Date(_0x21372f['finishedAt'])[_0x1d9355(0x188)]():Date[_0x1d9355(0x2f3)](),_0x5c7b34={'start':_0x5d3ce1,'end':_0x59f7ce,'duration':_0x59f7ce-_0x5d3ce1},_0x150eb5=new Map(),_0x18d435=[];for(const _0xe8cd0e of _0x364ffa){if(_0xe8cd0e[_0x1d9355(0x187)]){const _0x57d5e0=new Date(_0xe8cd0e['startedAt'])['getTime'](),_0x55e833=_0xe8cd0e[_0x1d9355(0x18b)]?new Date(_0xe8cd0e[_0x1d9355(0x18b)])[_0x1d9355(0x188)]():Date[_0x1d9355(0x2f3)](),_0x7fd8f4={'start':_0x57d5e0,'end':_0x55e833,'duration':_0x55e833-_0x57d5e0};_0x150eb5[_0x1d9355(0x1eb)](_0xe8cd0e['id'],_0x7fd8f4),_0x18d435['push']({'name':_0xe8cd0e[_0x1d9355(0x26f)],'state':_0xe8cd0e[_0x1d9355(0x1b5)]||_0x1d9355(0x1d4),'window':_0x7fd8f4});}else _0x18d435[_0x1d9355(0x2f9)]({'name':_0xe8cd0e['fullName'],'state':_0xe8cd0e['state']||'planned','window':undefined});}_0x18d435[_0x1d9355(0x1fc)]((_0x482d26,_0x261ac2)=>{const _0x274c38=_0x1d9355;if(!_0x482d26[_0x274c38(0x18a)])return 0x1;if(!_0x261ac2[_0x274c38(0x18a)])return-0x1;return _0x482d26[_0x274c38(0x18a)][_0x274c38(0x297)]-_0x261ac2[_0x274c38(0x18a)][_0x274c38(0x297)];});const _0x5bc779=_0x18d435['length'],_0x3659e2=_0x5bc779>TIMELINE_CONFIG[_0x1d9355(0x29d)];_0x3659e2&&_0x18d435[_0x1d9355(0x2eb)](TIMELINE_CONFIG[_0x1d9355(0x29d)]);const _0x14131a=calculateTimeScale(_0x5c7b34,_0xd38545),_0x53d660=_0x21372f[_0x1d9355(0x1fb)]?_0x21372f['success']?a46_0x39c6a3['green'](_0x1d9355(0x221)):a46_0x39c6a3[_0x1d9355(0x184)](_0x1d9355(0x216)):a46_0x39c6a3[_0x1d9355(0x191)](_0x1d9355(0x2e8)),_0x31e117=_0x21372f[_0x1d9355(0x1d6)]?.['id'],_0x42932b=_0x21372f['sessionId'];let _0x33d239;if(_0x31e117&&_0x42932b){const _0x19cb8a=getWorkflowAttemptUrl(_0x4a43bb,_0x31e117,_0x42932b,_0x21372f['id']);_0x33d239=hyperlink(a46_0x39c6a3[_0x1d9355(0x2c6)](_0x21372f['id']),_0x19cb8a);}else _0x33d239=a46_0x39c6a3['dim'](_0x21372f['id']);_0x142233[_0x1d9355(0x2f9)](_0x1d9355(0x16a)+_0x33d239+_0x1d9355(0x27f)+_0x53d660+'\x20-\x20'+formatElapsed(_0x5c7b34[_0x1d9355(0x292)]));if(_0x18d435['length']>0x0){const _0x1e42d3=renderTimeAxis(_0x14131a,_0xd38545),_0x281ad2=new Date(_0x5c7b34['start']),_0x173ef3=formatDate(_0x281ad2),_0xfaad21=TIMELINE_CONFIG[_0x1d9355(0x298)]+TIMELINE_CONFIG['ICON_SPACING']+_0x41d6cf,_0x14f144=_0x173ef3[_0x1d9355(0x2b8)](_0xfaad21),_0x1d373d=a46_0x39c6a3[_0x1d9355(0x2c6)](_0x14f144);_0x142233['push'](_0x1d373d+'\x20'+_0x1e42d3);for(const _0xfa4f5d of _0x18d435){_0x142233[_0x1d9355(0x2f9)](renderTaskRow(_0xfa4f5d,_0x14131a,_0xd38545,_0x41d6cf));}const _0x4f3d1a=calculateStats(_0x18d435);_0x142233[_0x1d9355(0x2f9)](formatStats(_0x4f3d1a)),_0x3659e2&&_0x142233[_0x1d9355(0x2f9)](a46_0x39c6a3[_0x1d9355(0x16c)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x1d9355(0x29d)]+'\x20of\x20'+_0x5bc779+_0x1d9355(0x222))),_0x142233[_0x1d9355(0x2f9)](''),_0x142233['push'](a46_0x39c6a3['dim'](_0x1d9355(0x1ca))+('tdx\x20wf\x20attempt\x20'+_0x21372f['id']+'\x20logs')+a46_0x39c6a3[_0x1d9355(0x2c6)]('\x20to\x20see\x20detailed\x20logs'));}else _0x142233[_0x1d9355(0x2f9)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x142233[_0x1d9355(0x26a)]('\x0a');}[a46_0x11de4d(0x1c7)](_0x1a6cd7,_0x221357){const _0x3e14cc=a46_0x11de4d,_0x304d90=new Date(_0x1a6cd7[_0x3e14cc(0x282)])['getTime'](),_0x562f22=_0x1a6cd7['finishedAt']?new Date(_0x1a6cd7[_0x3e14cc(0x175)])[_0x3e14cc(0x188)]():Date[_0x3e14cc(0x2f3)](),_0x9bd385=_0x562f22-_0x304d90,_0xa76189=[];for(const _0x2fb72c of _0x221357){if(_0x2fb72c[_0x3e14cc(0x187)]){const _0x12e9ab=new Date(_0x2fb72c['startedAt'])['getTime'](),_0x44c12d=_0x2fb72c[_0x3e14cc(0x18b)]?new Date(_0x2fb72c[_0x3e14cc(0x18b)])[_0x3e14cc(0x188)]():Date[_0x3e14cc(0x2f3)]();_0xa76189[_0x3e14cc(0x2f9)]({'name':_0x2fb72c['fullName'],'state':_0x2fb72c['state']||'unknown','window':{'start':_0x12e9ab,'end':_0x44c12d,'duration':_0x44c12d-_0x12e9ab}});}else _0xa76189['push']({'name':_0x2fb72c[_0x3e14cc(0x26f)],'state':_0x2fb72c[_0x3e14cc(0x1b5)]||'planned','window':undefined});}const _0x275a09=calculateStats(_0xa76189);return{'attempt':{'id':_0x1a6cd7['id'],'status':_0x1a6cd7[_0x3e14cc(0x1fb)]?_0x1a6cd7[_0x3e14cc(0x221)]?_0x3e14cc(0x221):_0x3e14cc(0x216):'running','createdAt':_0x1a6cd7[_0x3e14cc(0x282)],'finishedAt':_0x1a6cd7['finishedAt'],'duration_ms':_0x9bd385},'tasks':_0xa76189[_0x3e14cc(0x192)](_0x3966c4=>({'name':_0x3966c4['name'],'state':_0x3966c4[_0x3e14cc(0x1b5)],'startedAt':_0x3966c4[_0x3e14cc(0x18a)]?new Date(_0x3966c4['window']['start'])['toISOString']():null,'updatedAt':_0x3966c4['window']?new Date(_0x3966c4[_0x3e14cc(0x18a)][_0x3e14cc(0x280)])['toISOString']():null,'duration_ms':_0x3966c4[_0x3e14cc(0x18a)]?.[_0x3e14cc(0x292)]||null})),'stats':_0x275a09};}}
|
package/dist/core/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ebb86,_0x37969c){const _0xcf1901=a47_0x6e72,_0x4e237d=_0x2ebb86();while(!![]){try{const _0x3a2d9a=-parseInt(_0xcf1901(0x130))/0x1+parseInt(_0xcf1901(0x13a))/0x2*(parseInt(_0xcf1901(0x131))/0x3)+parseInt(_0xcf1901(0x13f))/0x4+parseInt(_0xcf1901(0x140))/0x5+-parseInt(_0xcf1901(0x139))/0x6*(parseInt(_0xcf1901(0x13b))/0x7)+-parseInt(_0xcf1901(0x137))/0x8*(parseInt(_0xcf1901(0x138))/0x9)+parseInt(_0xcf1901(0x13d))/0xa;if(_0x3a2d9a===_0x37969c)break;else _0x4e237d['push'](_0x4e237d['shift']());}catch(_0x47804a){_0x4e237d['push'](_0x4e237d['shift']());}}}(a47_0x3ac6,0x7cf25));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';function a47_0x6e72(_0xde59cb,_0x2a549e){_0xde59cb=_0xde59cb-0x130;const _0x3ac682=a47_0x3ac6();let _0x6e7279=_0x3ac682[_0xde59cb];return _0x6e7279;}export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x4073e5=a47_0x6e72,_0xb8508b=getVersion(),_0x3f70fe=platform(),_0x918d9f=process[_0x4073e5(0x132)]['replace']('v','');return _0x4073e5(0x136)+_0xb8508b+'\x20('+_0x3f70fe+_0x4073e5(0x133)+_0x918d9f+')';}export function getAuthHeaders(_0x3a143d,_0x21e0c4){const _0x4a1e8e=a47_0x6e72,_0x58470b=getVersion(),_0x211a41={'User-Agent':getUserAgent(),'X-TD-Client':_0x4a1e8e(0x13e),'X-TD-Client-Version':_0x58470b};return _0x21e0c4&&(_0x211a41[_0x4a1e8e(0x134)]=_0x4a1e8e(0x13c)+_0x21e0c4),_0x211a41;}export function toHeaderRecord(_0x1fafd2){const _0x1f3ff3={};for(const [_0x3fc9be,_0x44eb6e]of Object['entries'](_0x1fafd2)){_0x44eb6e!==undefined&&(_0x1f3ff3[_0x3fc9be]=_0x44eb6e);}return _0x1f3ff3;}export function getTrinoHeaders(_0x504b4c,_0xf4b4b0){const _0x761408=a47_0x6e72,_0xaf71b5=getAuthHeaders(_0x504b4c,_0xf4b4b0),_0x4a00e2=toHeaderRecord(_0xaf71b5);return delete _0x4a00e2['Authorization'],_0xf4b4b0&&(_0x4a00e2[_0x761408(0x141)]=_0xf4b4b0),_0x4a00e2;}export function hasAPIKey(_0x4f76c1){const _0x592afb=a47_0x6e72,_0x570a96=getAPIKey();return _0x570a96!==undefined&&_0x570a96[_0x592afb(0x135)]>0x0;}function a47_0x3ac6(){const _0x5e0154=['1918920BgyVzE','1814385kQKitV','X-Trino-User','198937FJeyHc','1358340sjtKHq','version',';\x20node/','Authorization','length','tdx/','2672FRFKZL','25452znQaCv','70266dmTtfA','2QFiWjr','49HjiPvH','TD1\x20','4418600lhfNIU','tdx'];a47_0x3ac6=function(){return _0x5e0154;};return a47_0x3ac6();}
|