@treasuredata/tdx 0.16.9 → 0.16.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/README.md +3 -2
  2. package/dist/bin.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli-categories.js +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/commands/activations.js +1 -1
  7. package/dist/commands/agent-command.js +1 -1
  8. package/dist/commands/agent-test-command.js +1 -1
  9. package/dist/commands/api-command.js +1 -1
  10. package/dist/commands/auth-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/claude-statusline-command.js +1 -1
  14. package/dist/commands/claude-usage-command.d.ts.map +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/claude-usage-command.js.map +1 -1
  17. package/dist/commands/command.js +1 -1
  18. package/dist/commands/connection-command.js +1 -1
  19. package/dist/commands/databases.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-command.js +1 -1
  22. package/dist/commands/job-command.js +1 -1
  23. package/dist/commands/journey-command.js +1 -1
  24. package/dist/commands/journey-validate-command.js +1 -1
  25. package/dist/commands/llm-command.js +1 -1
  26. package/dist/commands/llm-proxy.js +1 -1
  27. package/dist/commands/mcp-command.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profile-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/segment-command.js +1 -1
  33. package/dist/commands/segment-create-command.js +1 -1
  34. package/dist/commands/segment-fields-command.js +1 -1
  35. package/dist/commands/segment-pull-command.js +1 -1
  36. package/dist/commands/segment-push-command.js +1 -1
  37. package/dist/commands/segment-update-command.js +1 -1
  38. package/dist/commands/segment-use-command.js +1 -1
  39. package/dist/commands/segment-validate-command.js +1 -1
  40. package/dist/commands/segments.js +1 -1
  41. package/dist/commands/show.js +1 -1
  42. package/dist/commands/status-command.js +1 -1
  43. package/dist/commands/tables.js +1 -1
  44. package/dist/commands/unset-command.js +1 -1
  45. package/dist/commands/use-command.js +1 -1
  46. package/dist/commands/user-command.js +1 -1
  47. package/dist/commands/workflow-command.js +1 -1
  48. package/dist/core/auth.js +1 -1
  49. package/dist/core/command-output.js +1 -1
  50. package/dist/core/config.js +1 -1
  51. package/dist/core/connection-cache.js +1 -1
  52. package/dist/core/constants.js +1 -1
  53. package/dist/core/credential-cache.js +1 -1
  54. package/dist/core/global-context.js +1 -1
  55. package/dist/core/keychain.js +1 -1
  56. package/dist/core/profile.js +1 -1
  57. package/dist/core/project-config.js +1 -1
  58. package/dist/core/session.js +1 -1
  59. package/dist/core/user-cache.js +1 -1
  60. package/dist/core/version.js +1 -1
  61. package/dist/index.js +1 -1
  62. package/dist/mcp/server.js +1 -1
  63. package/dist/mcp/tools/index.js +1 -1
  64. package/dist/mcp/tools/tdx-run.js +1 -1
  65. package/dist/mcp/tools/tdx-search.js +1 -1
  66. package/dist/mcp/utils.js +1 -1
  67. package/dist/proxy/anthropic-adapter.js +1 -1
  68. package/dist/proxy/claude-usage-tracker.d.ts +31 -0
  69. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  70. package/dist/proxy/claude-usage-tracker.js +1 -1
  71. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  72. package/dist/proxy/context-signature.js +1 -1
  73. package/dist/proxy/conversation-utils.js +1 -1
  74. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  75. package/dist/proxy/passthrough-server.js +1 -1
  76. package/dist/proxy/passthrough-server.js.map +1 -1
  77. package/dist/proxy/server.js +1 -1
  78. package/dist/proxy/session-cache.js +1 -1
  79. package/dist/proxy/sse-usage-parser.js +1 -1
  80. package/dist/sdk/agent/agent-config.js +1 -1
  81. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  82. package/dist/sdk/agent/agent-yaml.js +1 -1
  83. package/dist/sdk/agent/test/evaluator.js +1 -1
  84. package/dist/sdk/agent/test/executor.js +1 -1
  85. package/dist/sdk/agent/test/index.js +1 -1
  86. package/dist/sdk/agent/test/output.js +1 -1
  87. package/dist/sdk/agent/test/parser.js +1 -1
  88. package/dist/sdk/api.js +1 -1
  89. package/dist/sdk/client/cdp-api-client.js +1 -1
  90. package/dist/sdk/client/endpoints.js +1 -1
  91. package/dist/sdk/client/engage-api-client.js +1 -1
  92. package/dist/sdk/client/http-client.js +1 -1
  93. package/dist/sdk/client/llm-api-client.js +1 -1
  94. package/dist/sdk/client/rate-limiter.js +1 -1
  95. package/dist/sdk/client/td-api-client.js +1 -1
  96. package/dist/sdk/client/trino-api-client.js +1 -1
  97. package/dist/sdk/client/workflow-client.js +1 -1
  98. package/dist/sdk/connection-validator.js +1 -1
  99. package/dist/sdk/connection.js +1 -1
  100. package/dist/sdk/engage.js +1 -1
  101. package/dist/sdk/errors.js +1 -1
  102. package/dist/sdk/index.d.ts +0 -1
  103. package/dist/sdk/index.d.ts.map +1 -1
  104. package/dist/sdk/index.js +1 -1
  105. package/dist/sdk/index.js.map +1 -1
  106. package/dist/sdk/io/index.js +1 -1
  107. package/dist/sdk/io/node-filesystem.js +1 -1
  108. package/dist/sdk/job.js +1 -1
  109. package/dist/sdk/journey.js +1 -1
  110. package/dist/sdk/llm/chat-cache.js +1 -1
  111. package/dist/sdk/llm/index.js +1 -1
  112. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  113. package/dist/sdk/llm/model-aliases.js +1 -1
  114. package/dist/sdk/llm/model-factors.js +1 -1
  115. package/dist/sdk/query/index.js +1 -1
  116. package/dist/sdk/query/sql-parser.js +1 -1
  117. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  118. package/dist/sdk/segment/fields-display.js +1 -1
  119. package/dist/sdk/segment/file-discovery.js +1 -1
  120. package/dist/sdk/segment/journey-utils.js +1 -1
  121. package/dist/sdk/segment/journey-yaml.js +1 -1
  122. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  123. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  124. package/dist/sdk/segment/pull-workflow.js +1 -1
  125. package/dist/sdk/segment/push-workflow.js +1 -1
  126. package/dist/sdk/segment/resolution-context.js +1 -1
  127. package/dist/sdk/segment/segment-path-parser.js +1 -1
  128. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  129. package/dist/sdk/segment/target-resolution.js +1 -1
  130. package/dist/sdk/segment/tdx-config.js +1 -1
  131. package/dist/sdk/segment/validate-files.js +1 -1
  132. package/dist/sdk/segment/yaml-validator.js +1 -1
  133. package/dist/sdk/segment.js +1 -1
  134. package/dist/sdk/types/index.js +1 -1
  135. package/dist/sdk/types/progress.js +1 -1
  136. package/dist/sdk/user.js +1 -1
  137. package/dist/sdk/util/format-detector.js +1 -1
  138. package/dist/sdk/util/formatters.js +1 -1
  139. package/dist/sdk/util/index.js +1 -1
  140. package/dist/sdk/util/tree-formatter.js +1 -1
  141. package/dist/sdk/workflow/clone-workflow.js +1 -1
  142. package/dist/sdk/workflow/index.js +1 -1
  143. package/dist/sdk/workflow/pull-workflow.js +1 -1
  144. package/dist/sdk/workflow/push-workflow.js +1 -1
  145. package/dist/sdk/workflow/tdx-config.js +1 -1
  146. package/dist/sdk/workflow/workflow-utils.js +1 -1
  147. package/dist/test-utils/command-runner.js +1 -1
  148. package/dist/test-utils/factories.js +1 -1
  149. package/dist/test-utils/fixtures.js +1 -1
  150. package/dist/test-utils/http-mock.js +1 -1
  151. package/dist/test-utils/index.js +1 -1
  152. package/dist/utils/async.js +1 -1
  153. package/dist/utils/colors.js +1 -1
  154. package/dist/utils/diff.js +1 -1
  155. package/dist/utils/file-permissions.js +1 -1
  156. package/dist/utils/global-cache.js +1 -1
  157. package/dist/utils/json-loader.js +1 -1
  158. package/dist/utils/local-cache.js +1 -1
  159. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  160. package/dist/utils/logger/formatters/index.js +1 -1
  161. package/dist/utils/logger/handlers/console-handler.js +1 -1
  162. package/dist/utils/logger/handlers/file-handler.js +1 -1
  163. package/dist/utils/logger/handlers/index.js +1 -1
  164. package/dist/utils/logger/handlers/null-handler.js +1 -1
  165. package/dist/utils/logger/index.js +1 -1
  166. package/dist/utils/logger/logger.js +1 -1
  167. package/dist/utils/logger/types.js +1 -1
  168. package/dist/utils/option-validation.js +1 -1
  169. package/dist/utils/port.js +1 -1
  170. package/dist/utils/process.js +1 -1
  171. package/dist/utils/prompt.js +1 -1
  172. package/dist/utils/spinner.js +1 -1
  173. package/dist/utils/sse-parser.js +1 -1
  174. package/dist/utils/string-utils.js +1 -1
  175. package/dist/utils/table-ref-parser.js +1 -1
  176. package/dist/utils/tdx-logger.js +1 -1
  177. package/dist/utils/version-check.js +1 -1
  178. package/package.json +1 -1
  179. package/dist/sdk/claude-agent/claude-agent-client.d.ts +0 -73
  180. package/dist/sdk/claude-agent/claude-agent-client.d.ts.map +0 -1
  181. package/dist/sdk/claude-agent/claude-agent-client.js +0 -1
  182. package/dist/sdk/claude-agent/claude-agent-client.js.map +0 -1
  183. package/dist/sdk/claude-agent/environment.d.ts +0 -59
  184. package/dist/sdk/claude-agent/environment.d.ts.map +0 -1
  185. package/dist/sdk/claude-agent/environment.js +0 -1
  186. package/dist/sdk/claude-agent/environment.js.map +0 -1
  187. package/dist/sdk/claude-agent/index.d.ts +0 -15
  188. package/dist/sdk/claude-agent/index.d.ts.map +0 -1
  189. package/dist/sdk/claude-agent/index.js +0 -1
  190. package/dist/sdk/claude-agent/index.js.map +0 -1
  191. package/dist/sdk/claude-agent/system-prompts.d.ts +0 -22
  192. package/dist/sdk/claude-agent/system-prompts.d.ts.map +0 -1
  193. package/dist/sdk/claude-agent/system-prompts.js +0 -1
  194. package/dist/sdk/claude-agent/system-prompts.js.map +0 -1
  195. package/dist/sdk/claude-agent/types.d.ts +0 -107
  196. package/dist/sdk/claude-agent/types.d.ts.map +0 -1
  197. package/dist/sdk/claude-agent/types.js +0 -1
  198. package/dist/sdk/claude-agent/types.js.map +0 -1
@@ -1 +1 @@
1
- const a40_0x3f8248=a40_0x6455;(function(_0x8c914a,_0x31cad1){const _0x139b0b=a40_0x6455,_0x4bb7de=_0x8c914a();while(!![]){try{const _0x3d4471=-parseInt(_0x139b0b(0x1ba))/0x1*(-parseInt(_0x139b0b(0x1e0))/0x2)+parseInt(_0x139b0b(0x1da))/0x3+parseInt(_0x139b0b(0x1dc))/0x4+-parseInt(_0x139b0b(0x1b5))/0x5*(parseInt(_0x139b0b(0x1d3))/0x6)+-parseInt(_0x139b0b(0x1e1))/0x7+parseInt(_0x139b0b(0x1d2))/0x8+parseInt(_0x139b0b(0x1d5))/0x9;if(_0x3d4471===_0x31cad1)break;else _0x4bb7de['push'](_0x4bb7de['shift']());}catch(_0x2344f2){_0x4bb7de['push'](_0x4bb7de['shift']());}}}(a40_0x39c2,0xea3f5));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';function a40_0x39c2(){const _0x6463c6=['\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','\x27\x20to\x20save\x20permanently','Session\x20profile\x20set\x20to:\x20','engage_workspace','\x27\x20does\x20not\x20exist','Session\x20engage_workspace\x20set\x20to:\x20','Session\x20agent\x20set\x20to:\x20','toString','Session\x20parent_segment\x20set\x20to:\x20','Default\x20site\x20set\x20to:\x20','Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently','use','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Session\x20database\x20set\x20to:\x20','Error:\x20Profile\x20\x27','5773152wWHSIY','6FAvPet','default','6508314IIhzfx','database','length','(session:\x20','join','3480627SYRFtx','parent_segment','2292716SEmYji','description','Session\x20llm_project\x20set\x20to:\x20','Session\x20context\x20','304324QOxmMH','10406333bedCsc','displayWithSources','includes','execute','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','profile','site','session','\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','green','display','log','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','Session\x20site\x20set\x20to:\x20','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','llm_project','clear','Invalid\x20resource:\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','error','Set\x20session-level\x20context','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','4421220sTilUM','agent','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','1cZRtvO','tdx.json','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Default\x20profile\x20set\x20to:\x20','llm_agent','name','validate'];a40_0x39c2=function(){return _0x6463c6;};return a40_0x39c2();}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';function a40_0x6455(_0x4e187c,_0x558f6b){_0x4e187c=_0x4e187c-0x1ab;const _0x39c25e=a40_0x39c2();let _0x64555f=_0x39c25e[_0x4e187c];return _0x64555f;}import{getConfigDir}from'../core/config.js';import a40_0x154954 from'chalk';import*as a40_0x523d89 from'node:path';export class UseCommand extends BaseCommand{[a40_0x3f8248(0x1c0)]=a40_0x3f8248(0x1cd);[a40_0x3f8248(0x1dd)]=a40_0x3f8248(0x1b3);[a40_0x3f8248(0x1c1)](_0x380cce){const _0x1c5253=a40_0x3f8248,{args:_0x572abc,options:_0x3e3a1b}=_0x380cce,_0x4dd599=_0x3e3a1b[_0x1c5253(0x1d4)];if(_0x572abc[_0x1c5253(0x1d7)]===0x0)return undefined;if(_0x572abc[_0x1c5253(0x1d7)]===0x1)return _0x1c5253(0x1cf)+_0x1c5253(0x1e9)+_0x1c5253(0x1b8)+_0x1c5253(0x1bc)+_0x1c5253(0x1c2)+_0x1c5253(0x1ad)+_0x1c5253(0x1bd);const _0xb28bef=_0x572abc[0x0],_0x25cd9e=['site',_0x1c5253(0x1d6),_0x1c5253(0x1db),_0x1c5253(0x1ae),_0x1c5253(0x1b6),_0x1c5253(0x1e6),'engage_workspace'];if(!_0x25cd9e[_0x1c5253(0x1e3)](_0xb28bef))return _0x1c5253(0x1b0)+_0xb28bef+'.\x20Must\x20be\x20one\x20of:\x20'+_0x25cd9e[_0x1c5253(0x1d9)](',\x20');if(_0x4dd599&&_0xb28bef!==_0x1c5253(0x1e7)&&_0xb28bef!==_0x1c5253(0x1e6))return _0x1c5253(0x1ab);return undefined;}async[a40_0x3f8248(0x1e4)](_0x3323a2){const _0x4fdbce=a40_0x3f8248,{args:_0x307a29,options:_0x190545}=_0x3323a2,_0x1a9233=_0x190545['debug'],_0x56203c=_0x190545[_0x4fdbce(0x1af)],_0xb59291=_0x190545[_0x4fdbce(0x1d4)];cleanExpiredSessions();try{if(_0x56203c){clearSessionContext(_0x190545[_0x4fdbce(0x1e8)]);const _0x2d007f=_0x190545['session']||getCurrentSessionPID()[_0x4fdbce(0x1c9)]();return console['log'](_0x4fdbce(0x1df)+a40_0x154954[_0x4fdbce(0x1ea)]('cleared')+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)]('(session:\x20'+_0x2d007f+')')),0x0;}if(_0x307a29['length']===0x0){const _0x35628f=new GlobalContext(_0x190545);return _0x1a9233?_0x35628f[_0x4fdbce(0x1e2)]():_0x35628f[_0x4fdbce(0x1eb)](),console[_0x4fdbce(0x1ec)](a40_0x154954[_0x4fdbce(0x1b7)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console['log'](a40_0x154954['dim'](_0x4fdbce(0x1ce))),console[_0x4fdbce(0x1ec)](a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1cc))),0x0;}const _0x59fab5=_0x307a29[0x0],_0x4c9c6c=_0x307a29[0x1],_0x3d27f0=a40_0x523d89[_0x4fdbce(0x1d9)](getConfigDir(),_0x4fdbce(0x1bb));if(_0xb59291){if(_0x59fab5==='site')return saveDefaultSiteToUserConfig(_0x4c9c6c),console[_0x4fdbce(0x1ec)](_0x4fdbce(0x1cb)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)),console[_0x4fdbce(0x1ec)](a40_0x154954[_0x4fdbce(0x1b7)]('\x0aSaved\x20to:\x20'+_0x3d27f0)),0x0;if(_0x59fab5===_0x4fdbce(0x1e6)){if(!profileExists(_0x4c9c6c))return console['error'](_0x4fdbce(0x1d1)+_0x4c9c6c+'\x27\x20does\x20not\x20exist'),console[_0x4fdbce(0x1b2)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x4c9c6c),console['log'](_0x4fdbce(0x1be)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)),console[_0x4fdbce(0x1ec)](a40_0x154954[_0x4fdbce(0x1b7)]('\x0aSaved\x20to:\x20'+_0x3d27f0)),0x0;}}if(_0x59fab5===_0x4fdbce(0x1e7)){const _0x3bc2fb=_0x190545['session']||getCurrentSessionPID()[_0x4fdbce(0x1c9)]();return saveSessionContext({'site':_0x4c9c6c},_0x190545[_0x4fdbce(0x1e8)]),console[_0x4fdbce(0x1ec)](_0x4fdbce(0x1ac)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1d8)+_0x3bc2fb+')')),console[_0x4fdbce(0x1ec)](a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1e5)+_0x4c9c6c+_0x4fdbce(0x1c3))),0x0;}if(_0x59fab5===_0x4fdbce(0x1e6)){if(!profileExists(_0x4c9c6c))return console[_0x4fdbce(0x1b2)](_0x4fdbce(0x1d1)+_0x4c9c6c+_0x4fdbce(0x1c6)),console[_0x4fdbce(0x1b2)](_0x4fdbce(0x1b1)),0x1;const _0x8339b9=_0x190545[_0x4fdbce(0x1e8)]||getCurrentSessionPID()[_0x4fdbce(0x1c9)]();return saveSessionContext({'profile':_0x4c9c6c},_0x190545[_0x4fdbce(0x1e8)]),console[_0x4fdbce(0x1ec)](_0x4fdbce(0x1c4)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)+'\x20'+a40_0x154954['dim'](_0x4fdbce(0x1d8)+_0x8339b9+')')),console[_0x4fdbce(0x1ec)](a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1b4)+_0x4c9c6c+'\x27\x20to\x20save\x20permanently')),0x0;}const _0x4f6855={},_0x25433b=_0x190545['session']||getCurrentSessionPID()[_0x4fdbce(0x1c9)]();switch(_0x59fab5){case _0x4fdbce(0x1d6):_0x4f6855[_0x4fdbce(0x1d6)]=_0x4c9c6c,console['log'](_0x4fdbce(0x1d0)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1d8)+_0x25433b+')'));break;case _0x4fdbce(0x1db):_0x4f6855[_0x4fdbce(0x1db)]=_0x4c9c6c,console[_0x4fdbce(0x1ec)](_0x4fdbce(0x1ca)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1d8)+_0x25433b+')'));break;case'llm_project':_0x4f6855[_0x4fdbce(0x1ae)]=_0x4c9c6c,console[_0x4fdbce(0x1ec)](_0x4fdbce(0x1de)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)]('(session:\x20'+_0x25433b+')'));break;case _0x4fdbce(0x1b6):{const {projectName:_0x52673d,agentName:_0xbfc07f}=parseAgentRef(_0x4c9c6c);_0xbfc07f?(_0x4f6855['llm_project']=_0x52673d,_0x4f6855[_0x4fdbce(0x1bf)]=_0xbfc07f,console['log'](_0x4fdbce(0x1de)+a40_0x154954['green'](_0x52673d)+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1d8)+_0x25433b+')')),console[_0x4fdbce(0x1ec)](_0x4fdbce(0x1c8)+a40_0x154954[_0x4fdbce(0x1ea)](_0xbfc07f)+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1d8)+_0x25433b+')'))):(_0x4f6855[_0x4fdbce(0x1bf)]=_0x4c9c6c,console['log'](_0x4fdbce(0x1c8)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1d8)+_0x25433b+')')));break;}case _0x4fdbce(0x1c5):_0x4f6855['engage_workspace']=_0x4c9c6c,console[_0x4fdbce(0x1ec)](_0x4fdbce(0x1c7)+a40_0x154954[_0x4fdbce(0x1ea)](_0x4c9c6c)+'\x20'+a40_0x154954[_0x4fdbce(0x1b7)](_0x4fdbce(0x1d8)+_0x25433b+')'));break;}return saveSessionContext(_0x4f6855,_0x190545[_0x4fdbce(0x1e8)]),console[_0x4fdbce(0x1ec)](a40_0x154954['dim'](_0x4fdbce(0x1b9))),0x0;}catch(_0x434014){return _0x434014 instanceof Error&&console[_0x4fdbce(0x1b2)]('Error:\x20'+_0x434014['message']),0x1;}}}
1
+ const a40_0x500eab=a40_0x4022;(function(_0x5faf50,_0x5aaf49){const _0x2689e8=a40_0x4022,_0x4232db=_0x5faf50();while(!![]){try{const _0x2dc7d4=-parseInt(_0x2689e8(0x15d))/0x1+-parseInt(_0x2689e8(0x16a))/0x2*(-parseInt(_0x2689e8(0x192))/0x3)+-parseInt(_0x2689e8(0x191))/0x4+parseInt(_0x2689e8(0x161))/0x5*(parseInt(_0x2689e8(0x173))/0x6)+-parseInt(_0x2689e8(0x16d))/0x7*(parseInt(_0x2689e8(0x17d))/0x8)+-parseInt(_0x2689e8(0x15a))/0x9*(-parseInt(_0x2689e8(0x195))/0xa)+-parseInt(_0x2689e8(0x178))/0xb*(-parseInt(_0x2689e8(0x169))/0xc);if(_0x2dc7d4===_0x5aaf49)break;else _0x4232db['push'](_0x4232db['shift']());}catch(_0x35ec31){_0x4232db['push'](_0x4232db['shift']());}}}(a40_0x6a06,0x2ec32));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';function a40_0x4022(_0x58b871,_0x13183b){_0x58b871=_0x58b871-0x15a;const _0x6a062a=a40_0x6a06();let _0x4022e8=_0x6a062a[_0x58b871];return _0x4022e8;}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';function a40_0x6a06(){const _0x3488d5=['(session:\x20','agent','Default\x20profile\x20set\x20to:\x20','toString','21192dsAIzh','6gdJUyu','\x27\x20to\x20save\x20permanently','site','1026487uKaVFE','Default\x20site\x20set\x20to:\x20','llm_agent','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','display','Session\x20parent_segment\x20set\x20to:\x20','12VcSFHG','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','database','Session\x20agent\x20set\x20to:\x20','\x0aSaved\x20to:\x20','2959EDsSDc','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20context\x20','Invalid\x20resource:\x20','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','16YjckxA','Session\x20engage_workspace\x20set\x20to:\x20','llm_project','use','green','session','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','Error:\x20Profile\x20\x27','default','validate','profile','displayWithSources','length','description','clear','.\x20Must\x20be\x20one\x20of:\x20','\x27\x20does\x20not\x20exist','debug','includes','335260RlYtMg','113877UKQPdR','join','Session\x20llm_project\x20set\x20to:\x20','14230hwUnXg','execute','\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','message','parent_segment','engage_workspace','63wZKvsU','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','91735GBMUBy','Session\x20database\x20set\x20to:\x20','tdx.json','cleared','153695FFxkqr','dim','error','log'];a40_0x6a06=function(){return _0x3488d5;};return a40_0x6a06();}import{getConfigDir}from'../core/config.js';import a40_0x523bed from'chalk';import*as a40_0x2fa8a2 from'node:path';export class UseCommand extends BaseCommand{['name']=a40_0x500eab(0x180);[a40_0x500eab(0x18b)]='Set\x20session-level\x20context';[a40_0x500eab(0x187)](_0x147902){const _0xb9353d=a40_0x500eab,{args:_0x2f6374,options:_0x8f82c9}=_0x147902,_0x4f5622=_0x8f82c9[_0xb9353d(0x186)];if(_0x2f6374[_0xb9353d(0x18a)]===0x0)return undefined;if(_0x2f6374[_0xb9353d(0x18a)]===0x1)return _0xb9353d(0x174)+_0xb9353d(0x197)+_0xb9353d(0x179)+_0xb9353d(0x184)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0xb9353d(0x17c)+_0xb9353d(0x183);const _0x1fd582=_0x2f6374[0x0],_0x1ad97a=['site',_0xb9353d(0x175),_0xb9353d(0x199),_0xb9353d(0x17f),_0xb9353d(0x166),_0xb9353d(0x188),_0xb9353d(0x19a)];if(!_0x1ad97a[_0xb9353d(0x190)](_0x1fd582))return _0xb9353d(0x17b)+_0x1fd582+_0xb9353d(0x18d)+_0x1ad97a[_0xb9353d(0x193)](',\x20');if(_0x4f5622&&_0x1fd582!==_0xb9353d(0x16c)&&_0x1fd582!=='profile')return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a40_0x500eab(0x196)](_0x5d45dd){const _0x451d7c=a40_0x500eab,{args:_0x641e9c,options:_0x1d2f00}=_0x5d45dd,_0x3d6930=_0x1d2f00[_0x451d7c(0x18f)],_0x475d88=_0x1d2f00[_0x451d7c(0x18c)],_0x59c024=_0x1d2f00['default'];cleanExpiredSessions();try{if(_0x475d88){clearSessionContext(_0x1d2f00[_0x451d7c(0x182)]);const _0x547f0f=_0x1d2f00[_0x451d7c(0x182)]||getCurrentSessionPID()['toString']();return console[_0x451d7c(0x164)](_0x451d7c(0x17a)+a40_0x523bed[_0x451d7c(0x181)](_0x451d7c(0x160))+'\x20'+a40_0x523bed[_0x451d7c(0x162)]('(session:\x20'+_0x547f0f+')')),0x0;}if(_0x641e9c['length']===0x0){const _0x37a3b0=new GlobalContext(_0x1d2f00);return _0x3d6930?_0x37a3b0[_0x451d7c(0x189)]():_0x37a3b0[_0x451d7c(0x171)](),console[_0x451d7c(0x164)](a40_0x523bed['dim'](_0x451d7c(0x15c))),console['log'](a40_0x523bed[_0x451d7c(0x162)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace')),console[_0x451d7c(0x164)](a40_0x523bed[_0x451d7c(0x162)]('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0x2b18cc=_0x641e9c[0x0],_0x232882=_0x641e9c[0x1],_0x1ec8c1=a40_0x2fa8a2[_0x451d7c(0x193)](getConfigDir(),_0x451d7c(0x15f));if(_0x59c024){if(_0x2b18cc===_0x451d7c(0x16c))return saveDefaultSiteToUserConfig(_0x232882),console[_0x451d7c(0x164)](_0x451d7c(0x16e)+a40_0x523bed['green'](_0x232882)),console[_0x451d7c(0x164)](a40_0x523bed['dim'](_0x451d7c(0x177)+_0x1ec8c1)),0x0;if(_0x2b18cc===_0x451d7c(0x188)){if(!profileExists(_0x232882))return console[_0x451d7c(0x163)](_0x451d7c(0x185)+_0x232882+_0x451d7c(0x18e)),console[_0x451d7c(0x163)](_0x451d7c(0x15b)),0x1;return saveActiveProfileToUserConfig(_0x232882),console[_0x451d7c(0x164)](_0x451d7c(0x167)+a40_0x523bed[_0x451d7c(0x181)](_0x232882)),console[_0x451d7c(0x164)](a40_0x523bed[_0x451d7c(0x162)]('\x0aSaved\x20to:\x20'+_0x1ec8c1)),0x0;}}if(_0x2b18cc===_0x451d7c(0x16c)){const _0x5cdd8b=_0x1d2f00[_0x451d7c(0x182)]||getCurrentSessionPID()[_0x451d7c(0x168)]();return saveSessionContext({'site':_0x232882},_0x1d2f00[_0x451d7c(0x182)]),console[_0x451d7c(0x164)]('Session\x20site\x20set\x20to:\x20'+a40_0x523bed[_0x451d7c(0x181)](_0x232882)+'\x20'+a40_0x523bed['dim']('(session:\x20'+_0x5cdd8b+')')),console[_0x451d7c(0x164)](a40_0x523bed['dim']('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x232882+_0x451d7c(0x16b))),0x0;}if(_0x2b18cc===_0x451d7c(0x188)){if(!profileExists(_0x232882))return console[_0x451d7c(0x163)]('Error:\x20Profile\x20\x27'+_0x232882+_0x451d7c(0x18e)),console['error'](_0x451d7c(0x15b)),0x1;const _0x49edbe=_0x1d2f00[_0x451d7c(0x182)]||getCurrentSessionPID()[_0x451d7c(0x168)]();return saveSessionContext({'profile':_0x232882},_0x1d2f00[_0x451d7c(0x182)]),console['log']('Session\x20profile\x20set\x20to:\x20'+a40_0x523bed['green'](_0x232882)+'\x20'+a40_0x523bed['dim'](_0x451d7c(0x165)+_0x49edbe+')')),console[_0x451d7c(0x164)](a40_0x523bed[_0x451d7c(0x162)](_0x451d7c(0x170)+_0x232882+_0x451d7c(0x16b))),0x0;}const _0x26b04a={},_0xd90c3=_0x1d2f00[_0x451d7c(0x182)]||getCurrentSessionPID()[_0x451d7c(0x168)]();switch(_0x2b18cc){case _0x451d7c(0x175):_0x26b04a['database']=_0x232882,console[_0x451d7c(0x164)](_0x451d7c(0x15e)+a40_0x523bed[_0x451d7c(0x181)](_0x232882)+'\x20'+a40_0x523bed[_0x451d7c(0x162)](_0x451d7c(0x165)+_0xd90c3+')'));break;case _0x451d7c(0x199):_0x26b04a[_0x451d7c(0x199)]=_0x232882,console[_0x451d7c(0x164)](_0x451d7c(0x172)+a40_0x523bed['green'](_0x232882)+'\x20'+a40_0x523bed[_0x451d7c(0x162)](_0x451d7c(0x165)+_0xd90c3+')'));break;case'llm_project':_0x26b04a['llm_project']=_0x232882,console[_0x451d7c(0x164)](_0x451d7c(0x194)+a40_0x523bed[_0x451d7c(0x181)](_0x232882)+'\x20'+a40_0x523bed[_0x451d7c(0x162)](_0x451d7c(0x165)+_0xd90c3+')'));break;case _0x451d7c(0x166):{const {projectName:_0x2a51c6,agentName:_0xe061c1}=parseAgentRef(_0x232882);_0xe061c1?(_0x26b04a[_0x451d7c(0x17f)]=_0x2a51c6,_0x26b04a['llm_agent']=_0xe061c1,console[_0x451d7c(0x164)](_0x451d7c(0x194)+a40_0x523bed[_0x451d7c(0x181)](_0x2a51c6)+'\x20'+a40_0x523bed[_0x451d7c(0x162)](_0x451d7c(0x165)+_0xd90c3+')')),console[_0x451d7c(0x164)](_0x451d7c(0x176)+a40_0x523bed[_0x451d7c(0x181)](_0xe061c1)+'\x20'+a40_0x523bed[_0x451d7c(0x162)](_0x451d7c(0x165)+_0xd90c3+')'))):(_0x26b04a[_0x451d7c(0x16f)]=_0x232882,console[_0x451d7c(0x164)](_0x451d7c(0x176)+a40_0x523bed[_0x451d7c(0x181)](_0x232882)+'\x20'+a40_0x523bed[_0x451d7c(0x162)](_0x451d7c(0x165)+_0xd90c3+')')));break;}case _0x451d7c(0x19a):_0x26b04a[_0x451d7c(0x19a)]=_0x232882,console[_0x451d7c(0x164)](_0x451d7c(0x17e)+a40_0x523bed[_0x451d7c(0x181)](_0x232882)+'\x20'+a40_0x523bed[_0x451d7c(0x162)](_0x451d7c(0x165)+_0xd90c3+')'));break;}return saveSessionContext(_0x26b04a,_0x1d2f00['session']),console['log'](a40_0x523bed[_0x451d7c(0x162)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}catch(_0x51658a){return _0x51658a instanceof Error&&console[_0x451d7c(0x163)]('Error:\x20'+_0x51658a[_0x451d7c(0x198)]),0x1;}}}
@@ -1 +1 @@
1
- const a41_0x3a8115=a41_0x5127;(function(_0xed8e2,_0x578417){const _0x3877de=a41_0x5127,_0x1e3c21=_0xed8e2();while(!![]){try{const _0x4982dc=-parseInt(_0x3877de(0x87))/0x1+-parseInt(_0x3877de(0x88))/0x2*(-parseInt(_0x3877de(0x94))/0x3)+parseInt(_0x3877de(0x84))/0x4*(parseInt(_0x3877de(0x7e))/0x5)+-parseInt(_0x3877de(0x8a))/0x6+-parseInt(_0x3877de(0x81))/0x7+parseInt(_0x3877de(0x7c))/0x8*(parseInt(_0x3877de(0x91))/0x9)+parseInt(_0x3877de(0x95))/0xa;if(_0x4982dc===_0x578417)break;else _0x1e3c21['push'](_0x1e3c21['shift']());}catch(_0x29cd17){_0x1e3c21['push'](_0x1e3c21['shift']());}}}(a41_0x1b0e,0xc7075));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x3a8115(0x8d)]=a41_0x3a8115(0x90);['description']=a41_0x3a8115(0x7f);async[a41_0x3a8115(0x86)](_0x27be76){const _0x2020e7=a41_0x3a8115,{options:_0x4feb9b,tdx:_0x11b0f6}=_0x27be76;try{const _0x5e2796=await withSpinner(_0x2020e7(0x83),()=>_0x11b0f6[_0x2020e7(0x90)][_0x2020e7(0x96)](),{'verbose':_0x4feb9b['verbose']}),_0x150e58=_0x5e2796[_0x2020e7(0x93)];return await handleSingleObjectOutput(_0x150e58,_0x4feb9b),0x0;}catch(_0x2e3b07){if(_0x2e3b07 instanceof SDKError)return console[_0x2020e7(0x8f)](_0x2020e7(0x80)+_0x2e3b07['message']),_0x2e3b07[_0x2020e7(0x89)]&&console[_0x2020e7(0x8f)](_0x2020e7(0x92)+_0x2e3b07[_0x2020e7(0x89)]),0x1;throw _0x2e3b07;}}}function a41_0x5127(_0x22268c,_0x51053f){_0x22268c=_0x22268c-0x7c;const _0x1b0e59=a41_0x1b0e();let _0x512723=_0x1b0e59[_0x22268c];return _0x512723;}function a41_0x1b0e(){const _0xc27019=['643846UVfqcr','cause','5089854zXlKCS','message','✔\x20Found\x20','name','description','error','user','126BrCcQG','\x20\x20Cause:\x20','data','12NLopvv','10384870RFVZFJ','getCurrent','370680ybmidv','length','5uWBjeb','Show\x20current\x20user\x20information','Error:\x20','6119379oXyics','Listing\x20users...','Fetching\x20user\x20info...','136432eubVPC','\x20user','execute','471250dzhGrW'];a41_0x1b0e=function(){return _0xc27019;};return a41_0x1b0e();}export class UserListCommand extends BaseCommand{[a41_0x3a8115(0x8d)]='user\x20list';[a41_0x3a8115(0x8e)]='List\x20all\x20users\x20in\x20the\x20account';async[a41_0x3a8115(0x86)](_0x22ab42){const _0x5185c7=a41_0x3a8115,{options:_0x3992fd,tdx:_0x2d6b3a}=_0x22ab42;try{const _0x238cba=await withSpinner(_0x5185c7(0x82),()=>_0x2d6b3a[_0x5185c7(0x90)]['list'](),{'verbose':_0x3992fd['verbose']}),_0x3af65e=_0x238cba[_0x5185c7(0x93)];return console[_0x5185c7(0x8f)](_0x5185c7(0x8c)+_0x3af65e['length']+_0x5185c7(0x85)+(_0x3af65e[_0x5185c7(0x7d)]!==0x1?'s':'')),await handleSDKOutput(_0x3af65e,_0x3992fd),0x0;}catch(_0x27dee6){if(_0x27dee6 instanceof SDKError)return console[_0x5185c7(0x8f)](_0x5185c7(0x80)+_0x27dee6[_0x5185c7(0x8b)]),_0x27dee6[_0x5185c7(0x89)]&&console[_0x5185c7(0x8f)]('\x20\x20Cause:\x20'+_0x27dee6[_0x5185c7(0x89)]),0x1;throw _0x27dee6;}}}
1
+ const a41_0x2da2b7=a41_0x5da7;function a41_0x2703(){const _0x51429c=['77eTBzyG','user','114xtFoIC','Listing\x20users...','1668fYBXUz','Show\x20current\x20user\x20information','1387224CSBuev','1723584mdGkxo','description','List\x20all\x20users\x20in\x20the\x20account','151779diWnQF','message','7KHCOJf','name','Fetching\x20user\x20info...','verbose','✔\x20Found\x20','315920ebzogZ','\x20\x20Cause:\x20','20xLIliy','2582dbAyRP','8715mjOyHX','\x20user','2676504IfUwGG','length','cause','error','Error:\x20','data','list','user\x20list'];a41_0x2703=function(){return _0x51429c;};return a41_0x2703();}(function(_0x79f1d1,_0x247875){const _0xc40945=a41_0x5da7,_0x1b0000=_0x79f1d1();while(!![]){try{const _0x387b8d=parseInt(_0xc40945(0x168))/0x1*(parseInt(_0xc40945(0x17a))/0x2)+parseInt(_0xc40945(0x170))/0x3*(-parseInt(_0xc40945(0x179))/0x4)+-parseInt(_0xc40945(0x17b))/0x5*(-parseInt(_0xc40945(0x16a))/0x6)+-parseInt(_0xc40945(0x172))/0x7*(parseInt(_0xc40945(0x15e))/0x8)+-parseInt(_0xc40945(0x16c))/0x9+parseInt(_0xc40945(0x177))/0xa*(parseInt(_0xc40945(0x166))/0xb)+parseInt(_0xc40945(0x16d))/0xc;if(_0x387b8d===_0x247875)break;else _0x1b0000['push'](_0x1b0000['shift']());}catch(_0x312b79){_0x1b0000['push'](_0x1b0000['shift']());}}}(a41_0x2703,0x3e378));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x2da2b7(0x173)]=a41_0x2da2b7(0x167);[a41_0x2da2b7(0x16e)]=a41_0x2da2b7(0x16b);async['execute'](_0x5b85d3){const _0x1781e8=a41_0x2da2b7,{options:_0x269987,tdx:_0x3b23e6}=_0x5b85d3;try{const _0x243d9d=await withSpinner(_0x1781e8(0x174),()=>_0x3b23e6['user']['getCurrent'](),{'verbose':_0x269987[_0x1781e8(0x175)]}),_0xaf5bc7=_0x243d9d['data'];return await handleSingleObjectOutput(_0xaf5bc7,_0x269987),0x0;}catch(_0x46440a){if(_0x46440a instanceof SDKError)return console[_0x1781e8(0x161)](_0x1781e8(0x162)+_0x46440a[_0x1781e8(0x171)]),_0x46440a['cause']&&console[_0x1781e8(0x161)](_0x1781e8(0x178)+_0x46440a[_0x1781e8(0x160)]),0x1;throw _0x46440a;}}}function a41_0x5da7(_0x460948,_0x1033c8){_0x460948=_0x460948-0x15d;const _0x2703a6=a41_0x2703();let _0x5da7ba=_0x2703a6[_0x460948];return _0x5da7ba;}export class UserListCommand extends BaseCommand{['name']=a41_0x2da2b7(0x165);[a41_0x2da2b7(0x16e)]=a41_0x2da2b7(0x16f);async['execute'](_0x4cb9db){const _0x32f6db=a41_0x2da2b7,{options:_0xe590,tdx:_0x152319}=_0x4cb9db;try{const _0x78137c=await withSpinner(_0x32f6db(0x169),()=>_0x152319[_0x32f6db(0x167)][_0x32f6db(0x164)](),{'verbose':_0xe590['verbose']}),_0x10d883=_0x78137c[_0x32f6db(0x163)];return console['error'](_0x32f6db(0x176)+_0x10d883[_0x32f6db(0x15f)]+_0x32f6db(0x15d)+(_0x10d883[_0x32f6db(0x15f)]!==0x1?'s':'')),await handleSDKOutput(_0x10d883,_0xe590),0x0;}catch(_0x1a6443){if(_0x1a6443 instanceof SDKError)return console['error'](_0x32f6db(0x162)+_0x1a6443[_0x32f6db(0x171)]),_0x1a6443[_0x32f6db(0x160)]&&console[_0x32f6db(0x161)](_0x32f6db(0x178)+_0x1a6443['cause']),0x1;throw _0x1a6443;}}}
@@ -1 +1 @@
1
- const a42_0x5d907a=a42_0x3b57;(function(_0x5f07f9,_0x2db9c9){const _0x47de16=a42_0x3b57,_0x54c939=_0x5f07f9();while(!![]){try{const _0x5a6429=-parseInt(_0x47de16(0x208))/0x1+parseInt(_0x47de16(0x168))/0x2*(-parseInt(_0x47de16(0x2ba))/0x3)+-parseInt(_0x47de16(0x2fb))/0x4*(parseInt(_0x47de16(0x17c))/0x5)+-parseInt(_0x47de16(0x202))/0x6*(parseInt(_0x47de16(0x309))/0x7)+-parseInt(_0x47de16(0x274))/0x8*(-parseInt(_0x47de16(0x1ac))/0x9)+-parseInt(_0x47de16(0x205))/0xa+parseInt(_0x47de16(0x20f))/0xb;if(_0x5a6429===_0x2db9c9)break;else _0x54c939['push'](_0x54c939['shift']());}catch(_0x3ca546){_0x54c939['push'](_0x54c939['shift']());}}}(a42_0x4b0d,0xa61c7));import a42_0x52dc99 from'chalk';import{existsSync}from'fs';import a42_0x5d30f9 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}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x3ff555 from'prompts';function getAttemptStatusDisplay(_0x4b550d){const _0x12e86c=a42_0x3b57;if(!_0x4b550d)return{'icon':'⏳','text':''};const {done:_0x28706d,success:_0x1182b4,cancelRequested:_0x264bb0}=_0x4b550d;if(!_0x28706d)return _0x264bb0?{'icon':'🛑','text':a42_0x52dc99[_0x12e86c(0x1b5)](_0x12e86c(0x163))}:{'icon':'🔄','text':a42_0x52dc99[_0x12e86c(0x1a9)](_0x12e86c(0x21b))};if(_0x1182b4)return{'icon':'✅','text':a42_0x52dc99['green']('success')};return{'icon':'❌','text':a42_0x52dc99[_0x12e86c(0x2ef)]('error')};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x53f3b2,_0x5620ee,_0x2d9dd0=0x0){const _0x414c81=a42_0x3b57;return _0x53f3b2[_0x2d9dd0]||_0x5620ee[_0x414c81(0x171)];}[a42_0x5d907a(0x24b)](_0xf780a3,_0x248d2c,_0xd03db9=0x0){const _0x77d9f4=a42_0x5d907a,_0x49857d=this[_0x77d9f4(0x2b1)](_0xf780a3,_0x248d2c,_0xd03db9);if(!_0x49857d)return console[_0x77d9f4(0x2d9)](a42_0x52dc99[_0x77d9f4(0x2ef)](_0x77d9f4(0x2f7)),_0x77d9f4(0x2f1)),console[_0x77d9f4(0x2d9)](a42_0x52dc99[_0x77d9f4(0x1bf)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x49857d;}[a42_0x5d907a(0x2a3)](_0x51b9e0,_0x1c3802){const _0x1dc3d6=a42_0x5d907a;if(_0x51b9e0[0x0]){const _0x41354e=_0x51b9e0[0x0][_0x1dc3d6(0x228)]('.');if(_0x41354e[_0x1dc3d6(0x235)]===0x1)return{'projectName':_0x41354e[0x0],'workflowName':undefined};else return _0x41354e['length']===0x2?{'projectName':_0x41354e[0x0],'workflowName':_0x41354e[0x1]}:(console[_0x1dc3d6(0x2d9)](a42_0x52dc99[_0x1dc3d6(0x2ef)](_0x1dc3d6(0x2f7)),_0x1dc3d6(0x294)),null);}return{'projectName':_0x1c3802[_0x1dc3d6(0x171)],'workflowName':undefined};}[a42_0x5d907a(0x2eb)](_0x277e4a,_0x5ab742,_0x15413e=0x0){const _0x3fd9ba=a42_0x5d907a;if(_0x277e4a[_0x15413e])return _0x277e4a[_0x15413e];if(_0x5ab742[_0x3fd9ba(0x171)]){const _0x1e38ea=a42_0x5d30f9['join'](process[_0x3fd9ba(0x262)](),_0x3fd9ba(0x30d),_0x5ab742[_0x3fd9ba(0x171)]);if(existsSync(a42_0x5d30f9['join'](_0x1e38ea,_0x3fd9ba(0x2b5))))return _0x1e38ea;}return undefined;}async['showWorkflowConsoleUrl'](_0x3aa03d,_0x3ef56f,_0x1bbfd7){const _0x192789=a42_0x5d907a;try{const _0x3ff4c6=await _0x3aa03d[_0x192789(0x2de)]['workflows'](_0x3ef56f,{'limit':0x1});if(_0x3ff4c6[_0x192789(0x235)]>0x0){const _0x378690=_0x3ff4c6[0x0]['id'],_0x120503=getWorkflowUrl(_0x1bbfd7,_0x378690);console['error'](_0x192789(0x2a4)+a42_0x52dc99['cyan'](_0x120503));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x2b8);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x239);async[a42_0x5d907a(0x1b3)](_0x5242fb){const _0x314165=a42_0x5d907a,{options:_0x493a6b,args:_0x33a256,tdx:_0x49ec21}=_0x5242fb,_0x1efa0f=_0x33a256[0x0],_0x2e43b5=_0x493a6b[_0x314165(0x29a)];if(_0x2e43b5)return saveSessionContext({'workflow_project':undefined},_0x493a6b['session']),console[_0x314165(0x1e0)](a42_0x52dc99['green'](_0x314165(0x28a))),0x0;if(!_0x1efa0f)return console['error'](a42_0x52dc99[_0x314165(0x2ef)]('Error:'),_0x314165(0x2f1)),console['error'](a42_0x52dc99[_0x314165(0x1bf)](_0x314165(0x2cd))),console[_0x314165(0x2d9)](a42_0x52dc99[_0x314165(0x1bf)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x4be569=await withSpinner(_0x314165(0x2a8)+_0x1efa0f+'\x27...',()=>_0x49ec21[_0x314165(0x2de)][_0x314165(0x1d0)](_0x1efa0f),{'verbose':_0x493a6b[_0x314165(0x211)]}),{name:_0x57bf98}=_0x4be569[_0x314165(0x187)];return saveSessionContext({'workflow_project':_0x57bf98},_0x493a6b[_0x314165(0x2e6)]),console[_0x314165(0x1e0)](a42_0x52dc99['green'](_0x314165(0x2ed)+a42_0x52dc99[_0x314165(0x22d)](_0x57bf98))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x268);[a42_0x5d907a(0x1e7)]='List\x20all\x20workflow\x20projects';async[a42_0x5d907a(0x1b3)](_0xae864){const _0x22d1c2=a42_0x5d907a,{options:_0x2f957b,args:_0x5d28ed,tdx:_0x1b9cac}=_0xae864,_0x3d91c2=_0x5d28ed[0x0];_0x2f957b[_0x22d1c2(0x211)]&&_0x3d91c2&&console[_0x22d1c2(0x2d9)](_0x22d1c2(0x20d)+_0x3d91c2);const _0x49730b=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x1b9cac['workflow'][_0x22d1c2(0x304)](_0x3d91c2,{'limit':_0x2f957b[_0x22d1c2(0x24f)]}),{'verbose':_0x2f957b[_0x22d1c2(0x211)]});let _0x69a911=_0x49730b[_0x22d1c2(0x187)];_0x69a911[_0x22d1c2(0x2cc)]((_0x4d9db6,_0x3225d1)=>_0x4d9db6[_0x22d1c2(0x1fc)][_0x22d1c2(0x200)](_0x3225d1['name']));const _0x1b848b=_0x2f957b[_0x22d1c2(0x24f)]||0x64,_0x529f30=_0x69a911[_0x22d1c2(0x235)]>=_0x1b848b?a42_0x52dc99['dim'](_0x22d1c2(0x186)):'';console[_0x22d1c2(0x2d9)](_0x22d1c2(0x1f2)+_0x69a911[_0x22d1c2(0x235)]+_0x22d1c2(0x1ec)+(_0x69a911['length']!==0x1?'s':'')+_0x529f30);if(_0x2f957b[_0x22d1c2(0x269)]===_0x22d1c2(0x26c)||_0x2f957b['format']==='jsonl'||_0x2f957b[_0x22d1c2(0x269)]==='table')await handleSDKOutput(_0x69a911,_0x2f957b);else{if(_0x69a911[_0x22d1c2(0x235)]===0x0)_0x3d91c2?console[_0x22d1c2(0x1e0)]('No\x20projects\x20match\x20pattern:\x20'+_0x3d91c2):console[_0x22d1c2(0x1e0)]('No\x20workflow\x20projects\x20found');else{const _0x3c89a9=_0x69a911['map'](_0x468dcd=>{const _0x5ac8ed=_0x22d1c2,_0x46cbb1=_0x468dcd[_0x5ac8ed(0x300)]?.[_0x5ac8ed(0x2fa)](_0x2a5427=>_0x2a5427[_0x5ac8ed(0x222)]==='sys'),_0x55230e=_0x46cbb1?a42_0x52dc99[_0x5ac8ed(0x1bf)]('\x20(system)'):'';return'📁\x20'+_0x468dcd[_0x5ac8ed(0x1fc)]+_0x55230e;});await writeOutput(_0x3c89a9[_0x22d1c2(0x275)]('\x0a'),_0x2f957b[_0x22d1c2(0x273)],_0x22d1c2(0x252));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x2e3);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x1ea);async['execute'](_0x11a40e){const _0x2ef8ce=a42_0x5d907a,{options:_0x50a955,args:_0xadfbec,tdx:_0x3b276c}=_0x11a40e,_0x1bcf50=this['resolveProject'](_0xadfbec,_0x50a955);_0x50a955['verbose']&&_0x1bcf50&&console[_0x2ef8ce(0x2d9)](_0x2ef8ce(0x2a1)+_0x1bcf50);const _0xccb6b1=await withSpinner(_0x2ef8ce(0x25d),()=>_0x3b276c[_0x2ef8ce(0x2de)]['workflows'](_0x1bcf50,{'limit':_0x50a955['limit']}),{'verbose':_0x50a955['verbose']});let _0x2e9c3e=_0xccb6b1['data'];_0x2e9c3e[_0x2ef8ce(0x2cc)]((_0x172337,_0x4ee12d)=>{const _0x1699a2=_0x2ef8ce,_0x2996c9=_0x172337['name'][_0x1699a2(0x200)](_0x4ee12d[_0x1699a2(0x1fc)]);if(_0x2996c9!==0x0)return _0x2996c9;return(_0x172337[_0x1699a2(0x167)]?.['name']||'')[_0x1699a2(0x200)](_0x4ee12d['project']?.['name']||'');});const _0x30ef3a=_0x50a955[_0x2ef8ce(0x24f)]||0x64,_0x54e792=_0x2e9c3e[_0x2ef8ce(0x235)]>=_0x30ef3a?a42_0x52dc99[_0x2ef8ce(0x1bf)](_0x2ef8ce(0x186)):'';console['error'](_0x2ef8ce(0x1f2)+_0x2e9c3e[_0x2ef8ce(0x235)]+_0x2ef8ce(0x1b0)+(_0x2e9c3e['length']!==0x1?'s':'')+_0x54e792);if(_0x50a955['format']===_0x2ef8ce(0x26c)||_0x50a955[_0x2ef8ce(0x269)]===_0x2ef8ce(0x2ce)||_0x50a955[_0x2ef8ce(0x269)]===_0x2ef8ce(0x233))await handleSDKOutput(_0x2e9c3e,_0x50a955);else{if(_0x2e9c3e[_0x2ef8ce(0x235)]===0x0)_0x1bcf50?console[_0x2ef8ce(0x1e0)](_0x2ef8ce(0x23d)+_0x1bcf50):console[_0x2ef8ce(0x1e0)](_0x2ef8ce(0x21f));else{const _0x1b272d=_0x50a955[_0x2ef8ce(0x2f0)],_0x4ac2cd=_0x2e9c3e[_0x2ef8ce(0x18a)](_0x113d62=>{const _0x56f9f6=_0x2ef8ce,_0x57b9f6=a42_0x52dc99['dim']('#'+_0x113d62['id']),_0x2b3d05=hyperlink(_0x57b9f6,getWorkflowUrl(_0x1b272d,_0x113d62['id'])),_0x4276f3=_0x113d62[_0x56f9f6(0x167)]?.[_0x56f9f6(0x1fc)]?a42_0x52dc99[_0x56f9f6(0x1bf)]('\x20('+_0x113d62[_0x56f9f6(0x167)][_0x56f9f6(0x1fc)]+')'):'';return'📋\x20'+_0x2b3d05+'\x20'+_0x113d62[_0x56f9f6(0x1fc)]+_0x4276f3;});await writeOutput(_0x4ac2cd[_0x2ef8ce(0x275)]('\x0a'),_0x50a955[_0x2ef8ce(0x273)],_0x2ef8ce(0x252));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x1c8);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x1a2);async[a42_0x5d907a(0x1b3)](_0x173eb7){const _0x767d5d=a42_0x5d907a,{options:_0x46a9a7,args:_0x1747b6,tdx:_0x462d08}=_0x173eb7,_0x13a51c=this[_0x767d5d(0x2a3)](_0x1747b6,_0x46a9a7);if(!_0x13a51c)return 0x1;const {projectName:_0x1b18ed,workflowName:_0x5862bc}=_0x13a51c;if(_0x46a9a7[_0x767d5d(0x211)]){if(_0x1b18ed&&_0x5862bc)console[_0x767d5d(0x2d9)](_0x767d5d(0x1f4)+_0x1b18ed+'.'+_0x5862bc);else _0x1b18ed&&console[_0x767d5d(0x2d9)](_0x767d5d(0x196)+_0x1b18ed);const _0xbf19fa=_0x46a9a7[_0x767d5d(0x2b3)];_0xbf19fa&&console['error'](_0x767d5d(0x21c)+_0xbf19fa);}let _0x172382=0x28;if(process['stdout'][_0x767d5d(0x1fb)]&&!_0x46a9a7['output']&&!_0x46a9a7[_0x767d5d(0x269)]){const _0x268cfe=process[_0x767d5d(0x286)][_0x767d5d(0x29e)]||0x28;_0x172382=Math[_0x767d5d(0x1e3)](0x14,Math[_0x767d5d(0x1d9)](_0x268cfe*0x2/0x3));}const _0x357d5a=_0x46a9a7[_0x767d5d(0x24f)]||_0x172382,_0x557581=await withSpinner(_0x767d5d(0x263),()=>_0x462d08[_0x767d5d(0x2de)][_0x767d5d(0x213)]({'projectName':_0x1b18ed,'workflowName':_0x5862bc,'status':_0x46a9a7['status'],'fromTime':_0x46a9a7[_0x767d5d(0x243)],'toTime':_0x46a9a7['to'],'limit':_0x357d5a}),{'verbose':_0x46a9a7['verbose']}),_0x11cdd8=_0x557581[_0x767d5d(0x187)];_0x11cdd8[_0x767d5d(0x2cc)]((_0x3f40e9,_0x50d274)=>{const _0x285822=_0x767d5d,_0x30bfb8=_0x3f40e9[_0x285822(0x27a)]||'',_0x42fab9=_0x50d274[_0x285822(0x27a)]||'';return _0x42fab9[_0x285822(0x200)](_0x30bfb8);});_0x11cdd8[_0x767d5d(0x235)]>=_0x357d5a?console['error'](_0x767d5d(0x225)+_0x11cdd8[_0x767d5d(0x235)]+'\x20sessions\x20'+a42_0x52dc99['dim']('(use\x20--limit\x20to\x20see\x20more)')):console['error']('✔\x20Found\x20'+_0x11cdd8['length']+'\x20session'+(_0x11cdd8[_0x767d5d(0x235)]!==0x1?'s':''));if(_0x46a9a7[_0x767d5d(0x269)]===_0x767d5d(0x26c)||_0x46a9a7[_0x767d5d(0x269)]==='jsonl'||_0x46a9a7[_0x767d5d(0x269)]===_0x767d5d(0x233))await handleSDKOutput(_0x11cdd8,_0x46a9a7);else{if(!process[_0x767d5d(0x286)][_0x767d5d(0x1fb)]||_0x46a9a7[_0x767d5d(0x273)]){if(_0x11cdd8['length']===0x0){if(_0x1b18ed&&_0x5862bc)console[_0x767d5d(0x1e0)]('No\x20sessions\x20found\x20for:\x20'+_0x1b18ed+'.'+_0x5862bc);else _0x1b18ed?console[_0x767d5d(0x1e0)](_0x767d5d(0x28d)+_0x1b18ed):console[_0x767d5d(0x1e0)](_0x767d5d(0x2c6));}else{const _0x321922=_0x46a9a7[_0x767d5d(0x2f0)],_0x44eab4=this[_0x767d5d(0x2ad)](_0x11cdd8,_0x321922);_0x46a9a7[_0x767d5d(0x273)]?await writeOutput(_0x44eab4,_0x46a9a7[_0x767d5d(0x273)],'list'):console[_0x767d5d(0x1e0)](_0x44eab4);}!_0x1b18ed&&(console['error'](''),console[_0x767d5d(0x2d9)](a42_0x52dc99[_0x767d5d(0x1bf)](_0x767d5d(0x253))),console[_0x767d5d(0x2d9)](a42_0x52dc99[_0x767d5d(0x1bf)](_0x767d5d(0x236))+'or'+a42_0x52dc99['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x11cdd8['length']===0x0){if(_0x1b18ed&&_0x5862bc)console[_0x767d5d(0x1e0)](_0x767d5d(0x185)+_0x1b18ed+'.'+_0x5862bc);else _0x1b18ed?console[_0x767d5d(0x1e0)](_0x767d5d(0x28d)+_0x1b18ed):console[_0x767d5d(0x1e0)](_0x767d5d(0x2c6));}else await this[_0x767d5d(0x189)](_0x11cdd8,_0x173eb7,_0x1b18ed);}}return 0x0;}[a42_0x5d907a(0x2ad)](_0x4a3e41,_0x5c7af9){const _0x2f4fa5=a42_0x5d907a,_0x58712e=[],_0x5acde8=new Map();let _0x3d0f76=Infinity,_0x1d3375=-Infinity;for(const _0x25e7b3 of _0x4a3e41){if(_0x25e7b3[_0x2f4fa5(0x276)]?.[_0x2f4fa5(0x2a5)]){const _0x5cd540=new Date(_0x25e7b3[_0x2f4fa5(0x276)]['createdAt'])[_0x2f4fa5(0x2f8)](),_0x1f5b44=_0x25e7b3[_0x2f4fa5(0x276)]['finishedAt']?new Date(_0x25e7b3[_0x2f4fa5(0x276)][_0x2f4fa5(0x169)])[_0x2f4fa5(0x2f8)]():Date[_0x2f4fa5(0x296)](),_0x1f3946=_0x25e7b3[_0x2f4fa5(0x167)]?.[_0x2f4fa5(0x1fc)]||_0x2f4fa5(0x1ff);!_0x5acde8[_0x2f4fa5(0x282)](_0x1f3946)&&_0x5acde8[_0x2f4fa5(0x2bc)](_0x1f3946,[]),_0x5acde8['get'](_0x1f3946)['push']({'session':_0x25e7b3,'startTime':_0x5cd540,'endTime':_0x1f5b44,'duration':_0x1f5b44-_0x5cd540}),_0x3d0f76=Math[_0x2f4fa5(0x221)](_0x3d0f76,_0x5cd540),_0x1d3375=Math[_0x2f4fa5(0x1e3)](_0x1d3375,_0x1f5b44);}}if(_0x5acde8[_0x2f4fa5(0x17b)]===0x0)return _0x2f4fa5(0x1d6);const _0x156c03=process['stdout'][_0x2f4fa5(0x19f)]||0x78,_0x306e97=0x1e,_0x1610b6=0x32,_0x4be246=0x4,_0x341817=Math[_0x2f4fa5(0x221)](_0x1610b6,Math[_0x2f4fa5(0x1e3)](_0x306e97,Math[_0x2f4fa5(0x1d9)](_0x156c03*0.3))),_0x491fa6=_0x156c03-_0x341817-TIMELINE_CONFIG[_0x2f4fa5(0x1e5)]-0x3-_0x4be246,_0x2287c7=_0x1d3375-_0x3d0f76,_0x37fe94=_0x2287c7/_0x341817,_0x402e8e=renderTimeAxis({'startTime':_0x3d0f76,'endTime':_0x1d3375,'durationMs':_0x2287c7,'msPerChar':_0x37fe94},_0x341817),_0xb2ca42=[];for(const _0x815aca of _0x5acde8[_0x2f4fa5(0x2f4)]()){_0xb2ca42[_0x2f4fa5(0x19c)](..._0x815aca);}_0xb2ca42[_0x2f4fa5(0x2cc)]((_0x19e008,_0x3510ac)=>_0x3510ac['startTime']-_0x19e008[_0x2f4fa5(0x2dc)]);const _0x232636=new Date(_0x3d0f76),_0xc6524f=formatDate(_0x232636),_0x4eb658=_0x4be246+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x2f4fa5(0x20a)]+_0x491fa6,_0x51f9e6='\x20'[_0x2f4fa5(0x2a7)](_0x4eb658-_0xc6524f[_0x2f4fa5(0x235)]),_0xf9ebc6=_0x51f9e6+a42_0x52dc99['dim'](_0xc6524f)+'\x20'+_0x402e8e;_0x58712e[_0x2f4fa5(0x19c)](_0xf9ebc6);const _0x26f43d=0x16;let _0x17194a=0x0;for(const _0x3654db of _0xb2ca42){const _0x29cd50=_0x3654db[_0x2f4fa5(0x2e6)][_0x2f4fa5(0x167)]?.[_0x2f4fa5(0x1fc)]||'?',_0x571792=Math[_0x2f4fa5(0x221)](stringWidth(_0x29cd50),_0x26f43d);_0x17194a=Math['max'](_0x17194a,_0x571792);}for(const _0x56c60e of _0xb2ca42){const {session:_0x2f2293,startTime:_0x1b2e0e,endTime:_0x347209,duration:_0x304bb1}=_0x56c60e,_0x2f0f99=_0x2f2293[_0x2f4fa5(0x167)]?.['id'],_0x4eae9f=_0x2f2293['id'],_0x4ab130=_0x2f2293[_0x2f4fa5(0x167)]?.[_0x2f4fa5(0x1fc)]||'?',_0x5b005d=_0x2f2293['workflow']?.[_0x2f4fa5(0x1fc)]||'?';let _0x44128d,_0xe6756d;if(_0x2f2293[_0x2f4fa5(0x276)]){const _0x12538b=_0x2f2293[_0x2f4fa5(0x276)];!_0x12538b[_0x2f4fa5(0x2b9)]?(_0x44128d=_0x12538b[_0x2f4fa5(0x295)]?'🛑':'🔄',_0xe6756d=_0x12538b[_0x2f4fa5(0x295)]?a42_0x52dc99['yellow']:a42_0x52dc99['blue']):(_0x44128d=_0x12538b['success']?'✅':'❌',_0xe6756d=_0x12538b[_0x2f4fa5(0x25c)]?a42_0x52dc99[_0x2f4fa5(0x164)]:a42_0x52dc99[_0x2f4fa5(0x2ef)]);}else _0x44128d='⏳',_0xe6756d=a42_0x52dc99['dim'];const _0x4a2007='#'+_0x4eae9f,_0x298cbd=_0x2f0f99?hyperlink(_0x4a2007,getWorkflowSessionUrl(_0x5c7af9,_0x2f0f99,_0x4eae9f)):_0x4a2007;let _0x3fd187=_0x4ab130;stringWidth(_0x4ab130)>_0x26f43d&&(_0x3fd187=_0x4ab130[_0x2f4fa5(0x1f7)](0x0,_0x26f43d-0x1)+'…');const _0x1127a0=a42_0x52dc99[_0x2f4fa5(0x1bf)](_0x3fd187),_0x19f44c=stringWidth(_0x3fd187),_0x52d41c='\x20'[_0x2f4fa5(0x2a7)](_0x17194a-stringWidth(_0x3fd187)+0x2),_0x1368d7='('+formatElapsed(_0x304bb1)+')',_0x8a6225=stringWidth(_0x1368d7),_0x57b3a1=stringWidth(_0x4a2007),_0x2969e4=_0x57b3a1+0x1+_0x19f44c+_0x52d41c[_0x2f4fa5(0x235)],_0x5ba543=_0x491fa6-_0x2969e4-_0x8a6225-0x1-0x8;let _0x3f5028=_0x5b005d;stringWidth(_0x3f5028)>_0x5ba543&&(_0x3f5028=_0x3f5028[_0x2f4fa5(0x1f7)](0x0,_0x5ba543-0x1)+'…');const _0x2c2594=_0x298cbd+'\x20'+_0x1127a0+_0x52d41c+_0x3f5028,_0xc4cff3=stringWidth(_0x2c2594),_0x545006=_0x491fa6-_0xc4cff3-_0x8a6225,_0x522486=_0x2c2594+'\x20'[_0x2f4fa5(0x2a7)](Math[_0x2f4fa5(0x1e3)](0x1,_0x545006))+a42_0x52dc99[_0x2f4fa5(0x1bf)](_0x1368d7),_0x18b32b=Math[_0x2f4fa5(0x1d9)]((_0x1b2e0e-_0x3d0f76)/_0x37fe94),_0x4f10d6=Math['floor']((_0x347209-_0x3d0f76)/_0x37fe94),_0x5cf4a1=Math['max'](_0x18b32b+0x1,_0x4f10d6),_0xe03f06=new Array(_0x341817)[_0x2f4fa5(0x23a)]('\x20');for(let _0x2b6dae=_0x18b32b;_0x2b6dae<Math[_0x2f4fa5(0x221)](_0x5cf4a1,_0x341817);_0x2b6dae++){_0xe03f06[_0x2b6dae]='─';}const _0x5967b7=_0xe03f06[_0x2f4fa5(0x18a)](_0x1f49e6=>_0x1f49e6==='\x20'?'\x20':_0xe6756d(_0x1f49e6))[_0x2f4fa5(0x275)]('');_0x58712e[_0x2f4fa5(0x19c)](_0x44128d+'\x20'+_0x522486+'│'+_0x5967b7+'│');}return _0x58712e[_0x2f4fa5(0x275)]('\x0a');}async[a42_0x5d907a(0x189)](_0x10579a,_0x3403e1,_0x4e5d1b){const _0x3e582e=a42_0x5d907a,{options:_0x1a13c4,tdx:_0x36f8dd}=_0x3403e1,_0x5babaf=_0x1a13c4[_0x3e582e(0x2f0)],{timelineRows:_0x1e275d,timeAxisHeader:_0x4d6beb}=this[_0x3e582e(0x175)](_0x10579a,_0x5babaf),_0x2319c4=_0x1e275d['filter'](_0x420b5e=>_0x420b5e[_0x3e582e(0x230)]);if(_0x2319c4[_0x3e582e(0x235)]===0x0){const _0x568fdb=this[_0x3e582e(0x2ad)](_0x10579a,_0x5babaf);console['log'](_0x568fdb);!_0x4e5d1b&&(console[_0x3e582e(0x2d9)](''),console['error'](a42_0x52dc99[_0x3e582e(0x1bf)](_0x3e582e(0x253))),console[_0x3e582e(0x2d9)](a42_0x52dc99[_0x3e582e(0x1bf)](_0x3e582e(0x236))+'or'+a42_0x52dc99['dim'](_0x3e582e(0x2b4))));return;}_0x4d6beb&&console[_0x3e582e(0x1e0)](_0x4d6beb);const _0x19b649=_0x1e275d[_0x3e582e(0x1af)](_0x3ecbac=>_0x3ecbac[_0x3e582e(0x230)])[_0x3e582e(0x18a)](_0xb9c2d0=>({'title':_0xb9c2d0[_0x3e582e(0x1cd)],'value':_0xb9c2d0[_0x3e582e(0x230)]})),_0x306dcf=process[_0x3e582e(0x286)]['rows']||0x3c,_0x13bff7=Math[_0x3e582e(0x1e3)](0x28,Math[_0x3e582e(0x1d9)](_0x306dcf*0x2/0x3)),_0x784b3c=await a42_0x3ff555({'type':_0x3e582e(0x201),'name':_0x3e582e(0x230),'message':_0x3e582e(0x183),'choices':_0x19b649,'initial':-0x1,'limit':_0x13bff7,'clearFirst':!![],'fallback':{'title':_0x3e582e(0x23c),'value':null},'suggest':(_0x3ea75f,_0x8cd7e5)=>{const _0x3880e4=_0x3e582e;if(!_0x3ea75f)return Promise[_0x3880e4(0x284)](_0x8cd7e5);const _0xfedfcc=_0x8cd7e5[_0x3880e4(0x1af)](_0x40fb57=>{const _0x2c34ce=_0x3880e4,_0x49b90b=_0x40fb57;return _0x49b90b[_0x2c34ce(0x280)][_0x2c34ce(0x2fc)]()[_0x2c34ce(0x28f)](_0x3ea75f['toLowerCase']());});return Promise[_0x3880e4(0x284)](_0xfedfcc);}}),_0x5efd79=()=>{const _0x12b179=_0x3e582e;process[_0x12b179(0x286)]['write'](_0x12b179(0x30b)),process[_0x12b179(0x286)]['write'](_0x12b179(0x30b)),process[_0x12b179(0x286)][_0x12b179(0x2ec)](_0x12b179(0x30b));},_0x2801f7=_0x784b3c&&_0x784b3c[_0x3e582e(0x230)]&&_0x784b3c[_0x3e582e(0x230)]!==null&&_0x784b3c['attemptId'][_0x3e582e(0x184)]()!=='';if(!_0x2801f7){_0x5efd79(),console[_0x3e582e(0x1e0)](a42_0x52dc99[_0x3e582e(0x1bf)]('Cancelled'));return;}_0x5efd79();const _0x49e3a1=_0x10579a[_0x3e582e(0x206)](_0x120cb9=>_0x120cb9[_0x3e582e(0x276)]?.['id']===_0x784b3c[_0x3e582e(0x230)]);if(_0x49e3a1){const _0x33db42=_0x49e3a1[_0x3e582e(0x167)]?.[_0x3e582e(0x1fc)]||'?',_0x1bcfe3=_0x49e3a1[_0x3e582e(0x2de)]?.['name']||'?';console[_0x3e582e(0x1e0)](_0x3e582e(0x1de)+a42_0x52dc99[_0x3e582e(0x1bf)](_0x33db42)+',\x20Workflow:\x20'+a42_0x52dc99[_0x3e582e(0x1bf)](_0x1bcfe3));}const _0x4d1dce=new WorkflowTimelineCommand();await _0x4d1dce[_0x3e582e(0x1b3)]({'args':[],'options':{..._0x1a13c4,'attemptId':_0x784b3c[_0x3e582e(0x230)]},'tdx':_0x36f8dd});}[a42_0x5d907a(0x175)](_0x5bfeec,_0x3c120c){const _0x3722c8=a42_0x5d907a,_0x856597=new Map();for(const _0x52d8ca of _0x5bfeec){_0x52d8ca['id']&&_0x52d8ca['lastAttempt']?.['id']&&_0x856597['set'](_0x52d8ca['id'],_0x52d8ca[_0x3722c8(0x276)]['id']);}const _0x2dbbcc=[];let _0x3cc0fc='';const _0x3cc2df=this[_0x3722c8(0x2ad)](_0x5bfeec,_0x3c120c),_0x4ac366=_0x3cc2df[_0x3722c8(0x228)]('\x0a');for(const _0x51ed5f of _0x4ac366){if(_0x51ed5f['startsWith'](_0x3722c8(0x1c9))||_0x51ed5f[_0x3722c8(0x19a)](/^\s+\d{4}-\d{2}-\d{2}/))_0x3cc0fc=_0x51ed5f;else{if(_0x51ed5f[_0x3722c8(0x19a)](/^[✅❌🔄🛑⏳]/)){const _0x2390c1=_0x51ed5f[_0x3722c8(0x19a)](/#(\d+)/),_0x5d2301=_0x2390c1?_0x2390c1[0x1]:null,_0x511f50=_0x5d2301?_0x856597[_0x3722c8(0x2f3)](_0x5d2301)||null:null,_0x10950f=_0x5bfeec[_0x3722c8(0x206)](_0x5ab3f1=>_0x5ab3f1['id']===_0x5d2301),_0x1a5d0c=_0x10950f?.[_0x3722c8(0x167)]?.['name']||'';_0x2dbbcc[_0x3722c8(0x19c)]({'displayLine':_0x51ed5f,'attemptId':_0x511f50,'projectName':_0x1a5d0c});}}}return{'timelineRows':_0x2dbbcc,'timeAxisHeader':_0x3cc0fc};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x195);['description']=a42_0x5d907a(0x16b);async['execute'](_0x51356c){const _0x262b45=a42_0x5d907a,{options:_0x17d5e9,args:_0x3dfc4d,tdx:_0xaa9f5d}=_0x51356c,_0xcdfe9a=this['parseProjectWorkflowPattern'](_0x3dfc4d,_0x17d5e9);if(!_0xcdfe9a)return 0x1;const {projectName:_0x5f20d7,workflowName:_0x4e371c}=_0xcdfe9a,_0x24a343=_0x17d5e9[_0x262b45(0x1d3)];if(_0x17d5e9[_0x262b45(0x211)]){if(_0x5f20d7&&_0x4e371c)console[_0x262b45(0x2d9)](_0x262b45(0x1f4)+_0x5f20d7+'.'+_0x4e371c);else _0x5f20d7&&console['error'](_0x262b45(0x196)+_0x5f20d7);_0x24a343&&console[_0x262b45(0x2d9)](_0x262b45(0x20e));}const _0x52a720=await withSpinner(_0x262b45(0x2bf),()=>_0xaa9f5d[_0x262b45(0x2de)][_0x262b45(0x18c)]({'projectName':_0x5f20d7,'workflowName':_0x4e371c,'includeRetried':_0x24a343,'limit':_0x17d5e9['limit']}),{'verbose':_0x17d5e9[_0x262b45(0x211)]}),_0x5a8387=_0x52a720[_0x262b45(0x187)],_0x151dea=_0x17d5e9[_0x262b45(0x24f)]||0x64,_0x47cdaf=_0x5a8387[_0x262b45(0x235)]>=_0x151dea?a42_0x52dc99[_0x262b45(0x1bf)](_0x262b45(0x186)):'';console['error'](_0x262b45(0x1f2)+_0x5a8387[_0x262b45(0x235)]+'\x20attempt'+(_0x5a8387[_0x262b45(0x235)]!==0x1?'s':'')+_0x47cdaf);if(_0x17d5e9[_0x262b45(0x269)]===_0x262b45(0x26c)||_0x17d5e9[_0x262b45(0x269)]===_0x262b45(0x2ce)||_0x17d5e9['format']===_0x262b45(0x233))await handleSDKOutput(_0x5a8387,_0x17d5e9);else{if(_0x5a8387[_0x262b45(0x235)]===0x0){if(_0x5f20d7&&_0x4e371c)console[_0x262b45(0x1e0)](_0x262b45(0x2e7)+_0x5f20d7+'.'+_0x4e371c);else _0x5f20d7?console[_0x262b45(0x1e0)](_0x262b45(0x1bb)+_0x5f20d7):console[_0x262b45(0x1e0)](_0x262b45(0x2e2));}else{const _0x2ce4dc=_0x17d5e9[_0x262b45(0x2f0)],_0xa5a361=_0x5a8387[_0x262b45(0x18a)](_0x2cd4ab=>{const _0x39f754=_0x262b45,_0x39217c=a42_0x52dc99[_0x39f754(0x1bf)]('#'+_0x2cd4ab['id']),_0x4b48be=_0x2cd4ab[_0x39f754(0x167)]?.['id'],_0x442ccb=_0x2cd4ab[_0x39f754(0x1d8)]||_0x2cd4ab[_0x39f754(0x1f6)],_0x5a55f4=_0x4b48be&&_0x442ccb?hyperlink(_0x39217c,getWorkflowAttemptUrl(_0x2ce4dc,_0x4b48be,_0x442ccb,_0x2cd4ab['id'])):_0x39217c,{icon:_0x1024af,text:_0x5422cc}=getAttemptStatusDisplay(_0x2cd4ab),_0x4f1f1a=(_0x2cd4ab['project']?.['name']||'?')+'.'+(_0x2cd4ab[_0x39f754(0x2de)]?.[_0x39f754(0x1fc)]||'?'),_0x372c83=_0x2cd4ab['sessionTime']?a42_0x52dc99[_0x39f754(0x1bf)](_0x2cd4ab[_0x39f754(0x27a)]):'';return(_0x5a55f4+'\x20'+_0x1024af+(_0x5422cc?'\x20'+_0x5422cc:'')+'\x20'+_0x4f1f1a+'\x20'+_0x372c83)[_0x39f754(0x292)]();});await writeOutput(_0xa5a361[_0x262b45(0x275)]('\x0a'),_0x17d5e9[_0x262b45(0x273)],_0x262b45(0x252));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a42_0x5d907a(0x250);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x2af);async[a42_0x5d907a(0x1b3)](_0x225034){const _0x4d47e5=a42_0x5d907a,{options:_0x21a8b6,args:_0x7d8549,tdx:_0x33f7f3}=_0x225034,_0x46efdb=_0x7d8549[0x0];if(!_0x46efdb)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x21a8b6['verbose']&&console[_0x4d47e5(0x2d9)]('Attempt\x20ID:\x20'+_0x46efdb);const _0x450691=await withSpinner(_0x4d47e5(0x18f),()=>_0x33f7f3['workflow']['attempt'](_0x46efdb),{'verbose':_0x21a8b6[_0x4d47e5(0x211)]}),_0x18a703=_0x450691[_0x4d47e5(0x187)];let _0x56e8b1;!_0x18a703[_0x4d47e5(0x2b9)]?_0x56e8b1=_0x18a703[_0x4d47e5(0x295)]?_0x4d47e5(0x163):_0x4d47e5(0x21b):_0x56e8b1=_0x18a703[_0x4d47e5(0x25c)]?'success':_0x4d47e5(0x2d9);let _0x1f8a4a;if(_0x18a703[_0x4d47e5(0x2a5)]&&_0x18a703['finishedAt']){const _0x33b23a=new Date(_0x18a703[_0x4d47e5(0x2a5)])[_0x4d47e5(0x2f8)](),_0x3fd2f4=new Date(_0x18a703['finishedAt'])['getTime']();_0x1f8a4a=Math['round']((_0x3fd2f4-_0x33b23a)/0x3e8);}const _0x4cc807={'attempt_id':_0x18a703['id'],'status':_0x56e8b1,..._0x18a703[_0x4d47e5(0x2e8)]!==undefined&&{'index':_0x18a703['index']},..._0x18a703[_0x4d47e5(0x167)]&&{'project':_0x18a703['project']['name']},..._0x18a703[_0x4d47e5(0x2de)]&&{'workflow':_0x18a703['workflow'][_0x4d47e5(0x1fc)]},..._0x18a703[_0x4d47e5(0x1f6)]&&{'session_id':_0x18a703[_0x4d47e5(0x1f6)]},..._0x18a703[_0x4d47e5(0x27a)]&&{'session_time':_0x18a703[_0x4d47e5(0x27a)]},..._0x18a703[_0x4d47e5(0x272)]&&{'retry_attempt':_0x18a703[_0x4d47e5(0x272)]},..._0x1f8a4a!==undefined&&{'duration_sec':_0x1f8a4a},..._0x18a703[_0x4d47e5(0x2a5)]&&{'created_at':_0x18a703[_0x4d47e5(0x2a5)]},..._0x18a703[_0x4d47e5(0x169)]&&{'finished_at':_0x18a703[_0x4d47e5(0x169)]},...Object['keys'](_0x18a703['params'])['length']>0x0&&{'params':_0x18a703[_0x4d47e5(0x16a)]}};return await handleSingleObjectOutput(_0x4cc807,_0x21a8b6),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a42_0x5d907a(0x2d3);[a42_0x5d907a(0x1e7)]='Show\x20tasks\x20for\x20an\x20attempt';async['execute'](_0x39a36e){const _0x1a085b=a42_0x5d907a,{options:_0x4e8903,args:_0x519983,tdx:_0x240c50}=_0x39a36e,_0x4519d0=_0x519983[0x0];if(!_0x4519d0)return console[_0x1a085b(0x2d9)](_0x1a085b(0x2c9)),0x1;const _0x1bfcc8=_0x4e8903['includeSubtasks'];_0x4e8903['verbose']&&(console['error']('Attempt\x20ID:\x20'+_0x4519d0),_0x1bfcc8&&console[_0x1a085b(0x2d9)](_0x1a085b(0x25e)));const _0xc74a50=await withSpinner(_0x1a085b(0x2ae),()=>_0x240c50[_0x1a085b(0x2de)][_0x1a085b(0x24a)](_0x4519d0,_0x1bfcc8||![]),{'verbose':_0x4e8903[_0x1a085b(0x211)]}),_0x60b801=_0xc74a50[_0x1a085b(0x187)];return console[_0x1a085b(0x2d9)](_0x1a085b(0x1f2)+_0x60b801[_0x1a085b(0x235)]+_0x1a085b(0x240)+(_0x60b801[_0x1a085b(0x235)]!==0x1?'s':'')),await handleSDKOutput(_0x60b801,_0x4e8903),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]='workflow:logs';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x265);async['execute'](_0x1cef88){const _0x72a90f=a42_0x5d907a,{options:_0xe10f20,args:_0x12a590,tdx:_0xace8db}=_0x1cef88,_0x52233c=_0x12a590[0x0];let _0xf6932f=_0x12a590[0x1];if(!_0x52233c)return console[_0x72a90f(0x2d9)](_0x72a90f(0x2c9)),0x1;_0xe10f20[_0x72a90f(0x211)]&&(console[_0x72a90f(0x2d9)](_0x72a90f(0x2cf)+_0x52233c),_0xf6932f&&console[_0x72a90f(0x2d9)](_0x72a90f(0x259)+_0xf6932f));const _0x2876a5=await withSpinner(_0x72a90f(0x2bb),()=>_0xace8db[_0x72a90f(0x2de)]['logFiles'](_0x52233c,_0xf6932f),{'verbose':_0xe10f20[_0x72a90f(0x211)]}),_0x479d62=_0x2876a5[_0x72a90f(0x187)];if(_0x479d62[_0x72a90f(0x235)]===0x0)return console[_0x72a90f(0x2d9)](_0x72a90f(0x2f2)),0x0;if(!_0xf6932f&&(_0xe10f20[_0x72a90f(0x26c)]||_0xe10f20[_0x72a90f(0x269)]))return await handleSDKOutput(_0x479d62,_0xe10f20),0x0;if(!_0xf6932f){const _0x592d8d=_0x479d62[_0x72a90f(0x18a)](_0x399a74=>({'title':_0x399a74[_0x72a90f(0x178)]+'\x20('+formatBytes(_0x399a74['fileSize'])+')','value':_0x399a74[_0x72a90f(0x178)]})),_0x2c18a0=await a42_0x3ff555({'type':'select','name':_0x72a90f(0x237),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x592d8d});if(!_0x2c18a0[_0x72a90f(0x237)])return console[_0x72a90f(0x2d9)]('Cancelled'),0x0;_0xf6932f=_0x2c18a0['task'];}const _0x5abd57=await withSpinner('Downloading\x20logs...',()=>_0xace8db['workflow'][_0x72a90f(0x180)](_0x52233c,_0xf6932f),{'verbose':_0xe10f20[_0x72a90f(0x211)]}),_0x3cc08c=_0x5abd57[_0x72a90f(0x187)];return _0x3cc08c?console[_0x72a90f(0x1e0)](_0x3cc08c):console[_0x72a90f(0x2d9)](_0x72a90f(0x19d)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a42_0x5d907a(0x293);[a42_0x5d907a(0x1e7)]='Kill\x20a\x20running\x20attempt';async[a42_0x5d907a(0x1b3)](_0x240470){const _0xf0cbf=a42_0x5d907a,{options:_0x4602a2,args:_0x5f05ac,tdx:_0x1c40e8}=_0x240470,_0x21539e=_0x5f05ac[0x0];if(!_0x21539e)return console[_0xf0cbf(0x2d9)](_0xf0cbf(0x2c9)),0x1;const _0x1d3957=_0x4602a2['reason'];_0x4602a2[_0xf0cbf(0x211)]&&(console[_0xf0cbf(0x2d9)](_0xf0cbf(0x2cf)+_0x21539e),_0x1d3957&&console[_0xf0cbf(0x2d9)](_0xf0cbf(0x215)+_0x1d3957));if(!_0x4602a2['yes']){const _0x52a8b4=await confirmKey(_0xf0cbf(0x21e)+_0x21539e+'?');if(!_0x52a8b4)return console[_0xf0cbf(0x2d9)](_0xf0cbf(0x209)),0x0;}const _0x203864=await withSpinner(_0xf0cbf(0x1d7),()=>_0x1c40e8['workflow'][_0xf0cbf(0x28e)](_0x21539e,_0x1d3957),{'verbose':_0x4602a2['verbose']}),_0x45a8ad=_0x203864[_0xf0cbf(0x187)];return console[_0xf0cbf(0x2d9)]('✔\x20'+_0x45a8ad),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]='workflow:retry';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x27f);async[a42_0x5d907a(0x1b3)](_0x7fefaf){const _0x5d19c2=a42_0x5d907a,{options:_0xac0159,args:_0x8bbf9f,tdx:_0x2e8094}=_0x7fefaf,_0x30cb3e=_0x8bbf9f[0x0];if(!_0x30cb3e)return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x1b1)),console[_0x5d19c2(0x2d9)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x537b7e=![],_0x564a3b=_0x30cb3e;if(_0x30cb3e[_0x5d19c2(0x220)]('session:'))_0x537b7e=!![],_0x564a3b=_0x30cb3e[_0x5d19c2(0x1dd)](0x8);else{if(_0x30cb3e[_0x5d19c2(0x220)]('attempt:'))_0x537b7e=![],_0x564a3b=_0x30cb3e[_0x5d19c2(0x1dd)](0x8);else return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x2df)),console['error'](_0x5d19c2(0x1d4)),0x1;}const _0x5d4bbb=_0xac0159[_0x5d19c2(0x27b)],_0x392b5c=_0xac0159[_0x5d19c2(0x1c4)],_0x3d1dce=_0xac0159[_0x5d19c2(0x16a)],_0x263766=_0xac0159[_0x5d19c2(0x2d7)];_0xac0159[_0x5d19c2(0x211)]&&(console['error'](_0x5d19c2(0x203)+(_0x537b7e?_0x5d19c2(0x2e6):'attempt')+'\x20'+_0x564a3b),_0x5d4bbb&&console[_0x5d19c2(0x2d9)]('From\x20task:\x20'+_0x5d4bbb),_0x392b5c&&console[_0x5d19c2(0x2d9)]('Resume\x20from:\x20'+_0x392b5c),_0x3d1dce&&console[_0x5d19c2(0x2d9)](_0x5d19c2(0x1c6)+_0x3d1dce),_0x263766&&console[_0x5d19c2(0x2d9)](_0x5d19c2(0x1a5)));let _0x525eb5;if(_0x3d1dce)try{if(_0x3d1dce[_0x5d19c2(0x220)]('@')){const _0x22a014=await import(_0x5d19c2(0x267)),_0x23572a=_0x3d1dce[_0x5d19c2(0x1dd)](0x1),_0x549734=await _0x22a014[_0x5d19c2(0x307)](_0x23572a,_0x5d19c2(0x1d1));_0x525eb5=JSON['parse'](_0x549734);}else _0x525eb5=JSON[_0x5d19c2(0x1fa)](_0x3d1dce);}catch{return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x22e)),0x1;}if(!_0xac0159[_0x5d19c2(0x219)]){const _0x50514e=await confirmKey(_0x5d19c2(0x2b0)+(_0x537b7e?'session':_0x5d19c2(0x247))+'\x20'+_0x564a3b+'?');if(!_0x50514e)return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x209)),0x0;}let _0x58203c;_0x537b7e?_0x58203c=await withSpinner(_0x5d19c2(0x24c),()=>_0x2e8094[_0x5d19c2(0x2de)]['retrySession'](_0x564a3b,{'fromTask':_0x5d4bbb,'retryParams':_0x525eb5}),{'verbose':_0xac0159[_0x5d19c2(0x211)]}):_0x58203c=await withSpinner('Retrying\x20attempt...',()=>_0x2e8094['workflow']['retryAttempt'](_0x564a3b,{'resumeFrom':_0x392b5c,'retryParams':_0x525eb5,'force':_0x263766}),{'verbose':_0xac0159[_0x5d19c2(0x211)]});const _0x394d65=_0x58203c[_0x5d19c2(0x187)];return console[_0x5d19c2(0x2d9)](_0x5d19c2(0x214)),console[_0x5d19c2(0x2d9)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x394d65[_0x5d19c2(0x230)]),console['error'](_0x5d19c2(0x26e)+_0x394d65['sessionId']),0x0;}}function a42_0x4b0d(){const _0x3efacf=['logs','fullName','\x20from\x20session\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','trim','No\x20sessions\x20found\x20for:\x20','\x20(use\x20--limit\x20to\x20show\x20more)','data','POLL_INTERVAL_MS','navigateSessionsInteractive','map','stat','attempts','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','/attempt/','Getting\x20attempt\x20details...','MIN_LABEL_COUNT','✔\x20New\x20project:\x20','getMonth','isDirectory','buildTimelineData','workflow:attempts','Filter:\x20project=','Updating\x20','\x27\x20from\x20project\x20\x27','filesExtracted','match','Latest\x20session\x20has\x20no\x20attempt','push','No\x20log\x20content\x20found','deleted','columns','delete','workflow:run','List\x20workflow\x20execution\x20sessions','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Key\x20cannot\x20be\x20empty','Force:\x20yes','\x20of\x20','Session\x20','workflow:push','blue','workflow:secrets:delete','follow','9UpPzeZ','Dry\x20run:\x20yes','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','filter','\x20workflow','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20tasks','execute','keys','yellow','skipValidation','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','revision','getFullYear','sourceProjectName','No\x20attempts\x20found\x20in\x20project:\x20','LABEL_WIDTH_DIVISOR','projectName','Pushing\x20project...','dim','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','diff','sourceDir','context','resumeFrom','.\x20Expected\x20format:\x20KEY=VALUE','Params:\x20','unchanged','workflow:sessions','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','type','Writing\x20files...','Error:\x20Secret\x20key\x20is\x20required','displayLine','prepareCloneProject','planned','resolveProjectId','utf-8','✔\x20Project:\x20','includeRetried','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','updatedAt','No\x20sessions\x20with\x20timing\x20information','Killing\x20attempt...','session_id','floor','Deleting\x20project\x20','\x20\x20Session\x20context\x20set\x20to:\x20','showWorkflowConsoleUrl','substring','Project:\x20','param','log','💡\x20Tip:\x20Use\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','max','revision:\x20','GUTTER','durationMs','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','indexOf','List\x20workflows','toISOString','\x20project','\x0aFailed\x20to\x20fetch\x20attempt\x20data','\x0aPolling...\x20(','\x22\x20to\x20new\x20project\x20\x22','MAX_TIMELINE_WIDTH','pending','✔\x20Found\x20','\x20\x20Location:\x20','Filter:\x20','\x0a✔\x20Already\x20up\x20to\x20date','sessionId','slice','\x0aDry\x20run\x20-\x20nothing\x20pushed','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','parse','isTTY','name','end','Deleting\x20secret...','(unknown)','localeCompare','autocomplete','115134MhrqfB','Target:\x20','targetDir','7572890YBFuNc','find','Loading\x20session...','636511xgTTzx','Cancelled','ICON_SPACING','\x0aDry\x20run\x20-\x20no\x20files\x20written','msPerChar','Pattern:\x20','Include\x20retried:\x20yes','31851622OzDWkS','Error:\x20Invalid\x20parameter\x20format:\x20','verbose','\x22\x20already\x20exists\x20(ID:\x20','sessions','✔\x20Retry\x20started','Reason:\x20','modified','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','MAX_POLL_ITERATIONS','yes','Pull\x20workflow\x20project\x20to\x20local\x20folder','running','Status:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','No\x20workflows\x20found','startsWith','min','key','every','LABEL_MIN_SPACING','✔\x20Showing\x20','Source\x20project:\x20','Cloning\x20to\x20','split','message','Total:\x20','\x20\x20Project\x20ID:\x20','getHours','cyan','Error:\x20Invalid\x20JSON\x20in\x20--params','Select\x20a\x20workflow\x20to\x20run','attemptId','Select\x20a\x20session\x20to\x20view\x20timeline:','renderTimeline','table','Session\x20time:\x20','length','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','task','Validation:\x20skipped','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','fill','workflowName','No\x20matching\x20sessions\x20found','No\x20workflows\x20found\x20in\x20project:\x20','\x20deleted','state','\x20task','applyPullProject','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','from','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','summary','\x0aUpdate\x20existing\x20project\x20\x22','attempt','Loading\x20workflows...','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','tasks','requireProject','Retrying\x20session...','\x20\x20Changes:\x20','Error:\x20KEY=VALUE\x20is\x20required','limit','workflow:attempt','✔\x20Secret\x20\x27','list','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','getDate','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Pulling\x20project\x20','\x20\x20Attempt\x20ID:\x20','Task\x20name:\x20','getMinutes','Attempt:\x20','success','Listing\x20workflows...','Including\x20subtasks:\x20yes','download','\x22?\x20This\x20cannot\x20be\x20undone.','---\x20','cwd','Listing\x20workflow\x20sessions...','newProjectName','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20\x20Source:\x20','fs/promises','workflow:projects','format','text','workflow:download','json','\x20has\x20no\x20attempts','\x20\x20Session\x20ID:\x20','Pushing\x20workflow\x20project...','workflow:delete','Workflow:\x20','retryAttemptName','output','10062328cufQfW','join','lastAttempt','Setting\x20secret...','Loading\x20sessions...','renderSingleTimeline','sessionTime','fromTask','duration','Analyzing\x20changes...','run','Retry\x20a\x20session\x20or\x20attempt','title','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','has','\x22\x20with\x20new\x20revision?','resolve','✔\x20Pull\x20complete','stdout','Expected\x20format:\x20--param\x20key=value','Tip:\x20cd\x20to\x20workflows/','path','✔\x20Workflow\x20project\x20context\x20cleared.','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','stringify','No\x20sessions\x20found\x20in\x20project:\x20','kill','includes','Using\x20attempt\x20','Project\x20name:\x20','trimEnd','workflow:kill','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','cancelRequested','now','Source\x20directory:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Downloaded\x20','clear','Starting\x20workflow\x20run...','deleteSecret','New\x20project\x20name:\x20','rows','✔\x20Deleted\x20project\x20','projectId','Project\x20filter:\x20','executePushProject','parseProjectWorkflowPattern','\x20\x20Console:\x20','createdAt','No\x20workflow\x20sessions\x20found','repeat','Resolving\x20project\x20\x27','unknown','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','No\x20workflow\x20tdx.json\x20found','\x20\x20Project:\x20','renderSessionsTimeline','Getting\x20attempt\x20tasks...','Show\x20specific\x20attempt\x20details','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','resolveProject','padStart','status','\x20\x20tdx\x20wf\x20use\x20<project>','tdx.json','splice','targetExists','workflow:use','done','3XrKzzh','Fetching\x20log\x20files...','set','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','✔\x20Push\x20complete','Listing\x20workflow\x20attempts...','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Error:\x20Project\x20name\x20is\x20required','changes','✔\x20Project\x20updated','/app/workflows/','\x20to\x20see\x20detailed\x20logs','No\x20sessions\x20found','Session\x20not\x20found:\x20','ICON_WIDTH','Error:\x20Attempt\x20ID\x20is\x20required','relative','Usage:\x20workflow:delete\x20<project-name-or-id>','sort','Usage:\x20tdx\x20wf\x20use\x20<project>','jsonl','Attempt\x20ID:\x20','Revision:\x20','Output\x20directory:\x20','MAX_TASKS_DISPLAY','workflow:tasks','workflow:timeline','Failed\x20to\x20fetch\x20attempt\x20data','\x0a✔\x20No\x20changes\x20to\x20push','force','pullProject','error','\x20modified','window','startTime','hasChanges','workflow','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Files\x20to\x20upload:\x20','group_error','No\x20attempts\x20found','workflow:workflows','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Files\x20extracted:\x20','session','No\x20attempts\x20found\x20for:\x20','index','🔄\x20','\x0aApply\x20these\x20changes?','resolveProjectDir','write','✔\x20Workflow\x20project\x20set\x20to:\x20','start','red','site','Project\x20name\x20is\x20required','No\x20log\x20files\x20found\x20for\x20this\x20attempt','get','values','✔\x20Workflow\x20run\x20started','...','Error:','getTime','\x20\x20Revision:\x20','some','201904nksyLz','toLowerCase','\x0aDry\x20run\x20-\x20no\x20project\x20created','Analyzing\x20project...','select','metadata','\x20new','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Invalid\x20format:\x20','projects','basename','pollTimeline','readFile','dryRun','35rGdkvD','Source:\x20','\x1b[1A\x1b[2K','value','workflows','canceling','green','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','project','1644618kcrZbi','finishedAt','params','List\x20workflow\x20attempts','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','✔\x20Pushed\x20','\x20unchanged','workflow:pull','workflowProject','tdx\x20wf\x20attempt\x20','TASK_NAME_WIDTH','new','generateSessionTimelineRows','Error:\x20','setSecret','taskName','Parameters:\x20','startedAt','size','115ZCeRrF','\x20-\x20','\x0a⚠\x20Project\x20\x22','Start\x20a\x20workflow\x20run'];a42_0x4b0d=function(){return _0x3efacf;};return a42_0x4b0d();}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x1a1);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x17f);async[a42_0x5d907a(0x1b3)](_0x15ddbb){const _0x3bd956=a42_0x5d907a,{options:_0xa408ff,args:_0xf4e3fc,tdx:_0x125c46}=_0x15ddbb;let _0x4b0f6b=_0xf4e3fc[0x0];if(!_0x4b0f6b){const _0x3d6646=this[_0x3bd956(0x2b1)]([],_0xa408ff),_0x3fe773=await withSpinner(_0x3bd956(0x248),()=>_0x125c46['workflow']['workflows'](_0x3d6646,{'limit':_0xa408ff[_0x3bd956(0x24f)]}),{'verbose':_0xa408ff[_0x3bd956(0x211)]}),_0x34ed13=_0x3fe773[_0x3bd956(0x187)];if(_0x34ed13[_0x3bd956(0x235)]===0x0)return console[_0x3bd956(0x2d9)](_0x3bd956(0x21f)),!_0x3d6646&&console[_0x3bd956(0x2d9)](a42_0x52dc99[_0x3bd956(0x1bf)](_0x3bd956(0x1a3))),0x1;const _0x209ff5=_0x34ed13[_0x3bd956(0x18a)](_0x19ccad=>({'title':_0x19ccad['project']?.[_0x3bd956(0x1fc)]+'.'+_0x19ccad[_0x3bd956(0x1fc)],'value':_0x19ccad[_0x3bd956(0x167)]?.['name']+'.'+_0x19ccad[_0x3bd956(0x1fc)],'description':_0x19ccad[_0x3bd956(0x1b8)]?_0x3bd956(0x1e4)+_0x19ccad[_0x3bd956(0x1b8)]:undefined})),_0x24e23a=await a42_0x3ff555({'type':_0x3bd956(0x2ff),'name':'workflow','message':_0x3bd956(0x22f),'choices':_0x209ff5});if(!_0x24e23a['workflow'])return 0x1;_0x4b0f6b=_0x24e23a['workflow'];}if(!_0x4b0f6b[_0x3bd956(0x28f)]('.')){const _0x2de949=this[_0x3bd956(0x2b1)]([],_0xa408ff);if(_0x2de949)_0x4b0f6b=_0x2de949+'.'+_0x4b0f6b;else return console[_0x3bd956(0x2d9)](a42_0x52dc99['red']('Error:'),_0x3bd956(0x16c)),console['error'](a42_0x52dc99[_0x3bd956(0x1bf)](_0x3bd956(0x1a3))),0x1;}const _0x41c145=_0xa408ff[_0x3bd956(0x1df)],_0x58aeed=_0xa408ff[_0x3bd956(0x27a)],_0x1dd392={};if(_0x41c145&&Array['isArray'](_0x41c145))for(const _0xb66d50 of _0x41c145){const _0x38ed6f=_0xb66d50[_0x3bd956(0x1e9)]('=');if(_0x38ed6f===-0x1)return console[_0x3bd956(0x2d9)](_0x3bd956(0x210)+_0xb66d50),console[_0x3bd956(0x2d9)](_0x3bd956(0x287)),0x1;const _0x412e55=_0xb66d50[_0x3bd956(0x1dd)](0x0,_0x38ed6f),_0x2a973c=_0xb66d50[_0x3bd956(0x1dd)](_0x38ed6f+0x1);try{_0x1dd392[_0x412e55]=JSON['parse'](_0x2a973c);}catch{_0x1dd392[_0x412e55]=_0x2a973c;}}_0xa408ff[_0x3bd956(0x211)]&&(console['error'](_0x3bd956(0x271)+_0x4b0f6b),Object[_0x3bd956(0x1b4)](_0x1dd392)['length']>0x0&&console[_0x3bd956(0x2d9)](_0x3bd956(0x179)+JSON[_0x3bd956(0x28c)](_0x1dd392)),_0x58aeed&&console['error'](_0x3bd956(0x234)+_0x58aeed));const _0x4b05e9=await withSpinner(_0x3bd956(0x29b),()=>_0x125c46[_0x3bd956(0x2de)][_0x3bd956(0x27e)](_0x4b0f6b,_0x1dd392,{'sessionTime':_0x58aeed}),{'verbose':_0xa408ff[_0x3bd956(0x211)]}),_0x3835bd=_0x4b05e9['data'];console[_0x3bd956(0x2d9)](_0x3bd956(0x2f5)),console['error'](_0x3bd956(0x258)+_0x3835bd['id']),console[_0x3bd956(0x2d9)](_0x3bd956(0x26e)+_0x3835bd[_0x3bd956(0x1f6)]),console[_0x3bd956(0x2d9)](_0x3bd956(0x2ac)+_0x3835bd[_0x3bd956(0x167)]?.[_0x3bd956(0x1fc)]),console[_0x3bd956(0x2d9)]('\x20\x20Workflow:\x20'+_0x3835bd['workflow']?.[_0x3bd956(0x1fc)]);if(_0x3835bd[_0x3bd956(0x167)]?.['id']&&_0x3835bd[_0x3bd956(0x1f6)]&&_0x3835bd['id']){const _0x6dc4d6=_0xa408ff[_0x3bd956(0x2f0)],_0x27e818=getConsoleUrl(_0x6dc4d6,_0x3bd956(0x2c4)+_0x3835bd[_0x3bd956(0x167)]['id']+'/sessions/'+_0x3835bd[_0x3bd956(0x1f6)]+_0x3bd956(0x18e)+_0x3835bd['id']);console[_0x3bd956(0x2d9)](_0x3bd956(0x2a4)+a42_0x52dc99[_0x3bd956(0x22d)](_0x27e818));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x26b);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x21d);async[a42_0x5d907a(0x1b3)](_0x49f38a){const _0x35292c=a42_0x5d907a,{options:_0x45d443,args:_0x3adbc5,tdx:_0x20c846}=_0x49f38a,_0x5b80d1=_0x3adbc5[0x0],_0x43eb27=_0x3adbc5[0x1]||'.';if(!_0x5b80d1)return console[_0x35292c(0x2d9)](_0x35292c(0x2c1)),console[_0x35292c(0x2d9)](_0x35292c(0x256)),0x1;const _0x29373d=_0x45d443[_0x35292c(0x1b8)];_0x45d443[_0x35292c(0x211)]&&(console[_0x35292c(0x2d9)](_0x35292c(0x1de)+_0x5b80d1),console['error'](_0x35292c(0x2d1)+_0x43eb27),_0x29373d&&console[_0x35292c(0x2d9)](_0x35292c(0x2d0)+_0x29373d));const _0x38b290=await withSpinner('Downloading\x20project\x20'+_0x5b80d1+_0x35292c(0x2f6),()=>_0x20c846['workflow'][_0x35292c(0x25f)](_0x5b80d1,_0x43eb27,{'revision':_0x29373d}),{'verbose':_0x45d443[_0x35292c(0x211)]}),_0x3e4b05=_0x38b290[_0x35292c(0x187)];return console[_0x35292c(0x2d9)](_0x35292c(0x299)+_0x3e4b05['projectName']),console[_0x35292c(0x2d9)]('\x20\x20Revision:\x20'+_0x3e4b05[_0x35292c(0x1b8)]),console['error'](_0x35292c(0x2e5)+_0x3e4b05[_0x35292c(0x199)]),console['error'](_0x35292c(0x1f3)+_0x43eb27+'/'+_0x3e4b05[_0x35292c(0x1bd)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']='workflow:upload';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x281);async['execute'](_0x32e9a6){const _0x48fcee=a42_0x5d907a,{options:_0x206468,args:_0x2af660,tdx:_0x3fb90d}=_0x32e9a6;let _0x3259a3='.',_0x15aec6=_0x206468[_0x48fcee(0x1fc)];if(_0x2af660[0x0]){const {promises:_0x2d1bb6}=await import('fs');try{const _0x5dd6cd=await _0x2d1bb6[_0x48fcee(0x18b)](_0x2af660[0x0]);if(_0x5dd6cd[_0x48fcee(0x193)]())_0x3259a3=_0x2af660[0x0];else return console[_0x48fcee(0x2d9)](_0x48fcee(0x176)+_0x2af660[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x15aec6=_0x2af660[0x0],_0x3259a3='.';}}const _0x516045=_0x206468['revision'],_0x276a93=_0x206468[_0x48fcee(0x1b6)];_0x206468['verbose']&&(console[_0x48fcee(0x2d9)]('Project\x20directory:\x20'+_0x3259a3),_0x15aec6&&console['error'](_0x48fcee(0x291)+_0x15aec6),_0x516045&&console[_0x48fcee(0x2d9)](_0x48fcee(0x2d0)+_0x516045),_0x276a93&&console[_0x48fcee(0x2d9)](_0x48fcee(0x238)));const _0x446782=await withSpinner(_0x48fcee(0x26f),()=>_0x3fb90d[_0x48fcee(0x2de)][_0x48fcee(0x19c)](_0x3259a3,{'projectName':_0x15aec6,'revision':_0x516045,'skipValidation':_0x276a93}),{'verbose':_0x206468[_0x48fcee(0x211)]}),_0x5877bc=_0x446782[_0x48fcee(0x187)];return console[_0x48fcee(0x2d9)](_0x48fcee(0x16e)+_0x5877bc['projectName']),console['error'](_0x48fcee(0x22b)+_0x5877bc[_0x48fcee(0x2a0)]),console[_0x48fcee(0x2d9)](_0x48fcee(0x2f9)+_0x5877bc[_0x48fcee(0x1b8)]),await this[_0x48fcee(0x1dc)](_0x3fb90d,_0x5877bc[_0x48fcee(0x1bd)],_0x206468[_0x48fcee(0x2f0)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x170);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x21a);async[a42_0x5d907a(0x1b3)](_0x36c741){const _0xf9ac3=a42_0x5d907a,{options:_0x44cfd3,args:_0x2e49c9,tdx:_0x4e68ff}=_0x36c741,_0x128702=_0x2e49c9[0x0],_0x2a19cb=_0x2e49c9[0x1];if(!_0x128702)return console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x2ef)](_0xf9ac3(0x2f7)),_0xf9ac3(0x2f1)),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x1bf)](_0xf9ac3(0x2aa))),0x1;const _0x4bd4e2=_0x44cfd3['revision'];_0x44cfd3[_0xf9ac3(0x211)]&&(console[_0xf9ac3(0x2d9)](_0xf9ac3(0x1de)+_0x128702),_0x2a19cb&&console['error']('Target\x20directory:\x20'+_0x2a19cb),_0x4bd4e2&&console[_0xf9ac3(0x2d9)](_0xf9ac3(0x2d0)+_0x4bd4e2),_0x44cfd3[_0xf9ac3(0x308)]&&console[_0xf9ac3(0x2d9)](_0xf9ac3(0x1ad)));const _0x4b182e=await withSpinner(_0xf9ac3(0x257)+_0x128702+'...',()=>_0x4e68ff[_0xf9ac3(0x2de)][_0xf9ac3(0x2d8)](_0x128702,{'targetDir':_0x2a19cb,'revision':_0x4bd4e2}),{'verbose':_0x44cfd3[_0xf9ac3(0x211)]}),_0x4cc98b=_0x4b182e[_0xf9ac3(0x187)];_0x4cc98b['isNewProject']?console[_0xf9ac3(0x2d9)](_0xf9ac3(0x191)+_0x4cc98b[_0xf9ac3(0x1bd)]):console[_0xf9ac3(0x2d9)](_0xf9ac3(0x1d2)+_0x4cc98b[_0xf9ac3(0x1bd)]);console[_0xf9ac3(0x2d9)](_0xf9ac3(0x2f9)+_0x4cc98b[_0xf9ac3(0x1b8)]),console[_0xf9ac3(0x2d9)]('\x20\x20Target:\x20'+(a42_0x5d30f9[_0xf9ac3(0x2ca)](process[_0xf9ac3(0x262)](),_0x4cc98b[_0xf9ac3(0x204)])||'.')),console[_0xf9ac3(0x2d9)](_0xf9ac3(0x24d)+a42_0x52dc99['green']('+'+_0x4cc98b[_0xf9ac3(0x245)][_0xf9ac3(0x174)]+'\x20new')+',\x20'+(a42_0x52dc99['yellow']('~'+_0x4cc98b[_0xf9ac3(0x245)][_0xf9ac3(0x216)]+'\x20modified')+',\x20')+(a42_0x52dc99[_0xf9ac3(0x2ef)]('-'+_0x4cc98b['summary']['deleted']+_0xf9ac3(0x23e))+',\x20')+(''+a42_0x52dc99[_0xf9ac3(0x1bf)](_0x4cc98b[_0xf9ac3(0x245)][_0xf9ac3(0x1c7)]+_0xf9ac3(0x16f))));for(const _0x4fa398 of _0x4cc98b[_0xf9ac3(0x2c2)]){_0x4fa398[_0xf9ac3(0x1ca)]===_0xf9ac3(0x216)&&_0x4fa398['diff']&&(console[_0xf9ac3(0x2d9)]('\x0a'+a42_0x52dc99[_0xf9ac3(0x22d)](_0xf9ac3(0x261)+_0x4fa398[_0xf9ac3(0x289)])),console['error'](_0x4fa398[_0xf9ac3(0x1c1)]));}if(!_0x4cc98b[_0xf9ac3(0x2dd)])return saveSessionContext({'workflow_project':_0x4cc98b[_0xf9ac3(0x1bd)]},_0x44cfd3[_0xf9ac3(0x2e6)]),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x164)](_0xf9ac3(0x1f5))),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x1bf)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x4cc98b[_0xf9ac3(0x1bd)])),0x0;if(_0x44cfd3['dryRun'])return console[_0xf9ac3(0x2d9)](a42_0x52dc99['yellow'](_0xf9ac3(0x20b))),0x0;if(!_0x44cfd3[_0xf9ac3(0x219)]){const _0x3d4f52=await confirmKey(_0xf9ac3(0x2ea));if(!_0x3d4f52)return console[_0xf9ac3(0x2d9)]('Cancelled'),0x0;}await withSpinner(_0xf9ac3(0x1cb),()=>_0x4e68ff[_0xf9ac3(0x2de)][_0xf9ac3(0x241)](_0x4cc98b,{'revision':_0x4bd4e2}),{'verbose':_0x44cfd3['verbose']}),saveSessionContext({'workflow_project':_0x4cc98b[_0xf9ac3(0x1bd)]},_0x44cfd3[_0xf9ac3(0x2e6)]),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x164)](_0xf9ac3(0x285)));const _0x443583=a42_0x5d30f9[_0xf9ac3(0x2ca)](process[_0xf9ac3(0x262)](),_0x4cc98b[_0xf9ac3(0x204)])||'.';return console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x1bf)](_0xf9ac3(0x1f3)+_0x443583)),console[_0xf9ac3(0x2d9)](a42_0x52dc99[_0xf9ac3(0x1bf)](_0xf9ac3(0x1db)+_0x4cc98b[_0xf9ac3(0x1bd)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x1a8);[a42_0x5d907a(0x1e7)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a42_0x5d907a(0x1b3)](_0x6df6c3){const _0x105e31=a42_0x5d907a,{options:_0x5c1e91,args:_0x10234a,tdx:_0x312de9}=_0x6df6c3,_0x1ed787=this[_0x105e31(0x2eb)](_0x10234a,_0x5c1e91),_0x21af4c=_0x5c1e91[_0x105e31(0x1b8)],_0x10e3ba=_0x5c1e91['skipValidation'];_0x5c1e91[_0x105e31(0x211)]&&(_0x1ed787&&console[_0x105e31(0x2d9)](_0x105e31(0x297)+_0x1ed787),_0x21af4c&&console['error']('Revision:\x20'+_0x21af4c),_0x5c1e91[_0x105e31(0x308)]&&console[_0x105e31(0x2d9)](_0x105e31(0x1ad)),_0x10e3ba&&console['error']('Validation:\x20skipped'));let _0x374cda;try{_0x374cda=await withSpinner(_0x105e31(0x27d),()=>_0x312de9['workflow']['preparePushProject']({'sourceDir':_0x1ed787,'revision':_0x21af4c,'skipValidation':_0x10e3ba}),{'verbose':_0x5c1e91['verbose']});}catch(_0x3ffe23){if(_0x3ffe23 instanceof Error&&_0x3ffe23['message']['includes'](_0x105e31(0x2ab)))return console['error'](a42_0x52dc99[_0x105e31(0x2ef)](_0x105e31(0x2f7)),_0x105e31(0x16d)),_0x5c1e91[_0x105e31(0x171)]?console[_0x105e31(0x2d9)](a42_0x52dc99['dim'](_0x105e31(0x288)+_0x5c1e91['workflowProject']+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x5c1e91[_0x105e31(0x171)]+'\x27')):console[_0x105e31(0x2d9)](a42_0x52dc99[_0x105e31(0x1bf)](_0x105e31(0x1f9))),0x1;throw _0x3ffe23;}const _0x52532b=_0x374cda[_0x105e31(0x187)];console['error'](_0x105e31(0x1d2)+_0x52532b[_0x105e31(0x1bd)]),console[_0x105e31(0x2d9)](_0x105e31(0x266)+_0x52532b[_0x105e31(0x1c2)]),console[_0x105e31(0x2d9)]('\x20\x20Revision:\x20'+_0x52532b['revision']),console[_0x105e31(0x2d9)](_0x105e31(0x24d)+a42_0x52dc99[_0x105e31(0x164)]('+'+_0x52532b[_0x105e31(0x245)][_0x105e31(0x174)]+_0x105e31(0x301))+',\x20'+(a42_0x52dc99[_0x105e31(0x1b5)]('~'+_0x52532b[_0x105e31(0x245)]['modified']+_0x105e31(0x2da))+',\x20')+(a42_0x52dc99[_0x105e31(0x2ef)]('-'+_0x52532b['summary'][_0x105e31(0x19e)]+_0x105e31(0x23e))+',\x20')+(''+a42_0x52dc99[_0x105e31(0x1bf)](_0x52532b[_0x105e31(0x245)][_0x105e31(0x1c7)]+_0x105e31(0x16f))));for(const _0xf97a9e of _0x52532b[_0x105e31(0x2c2)]){_0xf97a9e[_0x105e31(0x1ca)]===_0x105e31(0x216)&&_0xf97a9e['diff']&&(console['error']('\x0a'+a42_0x52dc99[_0x105e31(0x22d)](_0x105e31(0x261)+_0xf97a9e['path'])),console[_0x105e31(0x2d9)](_0xf97a9e['diff']));}if(!_0x52532b['hasChanges'])return console[_0x105e31(0x2d9)](a42_0x52dc99[_0x105e31(0x164)](_0x105e31(0x2d6))),await this[_0x105e31(0x1dc)](_0x312de9,_0x52532b[_0x105e31(0x1bd)],_0x5c1e91[_0x105e31(0x2f0)]),0x0;if(_0x5c1e91[_0x105e31(0x308)])return console[_0x105e31(0x2d9)](a42_0x52dc99[_0x105e31(0x1b5)](_0x105e31(0x1f8))),0x0;if(!_0x5c1e91[_0x105e31(0x219)]){const _0x22f4aa=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x22f4aa)return console['error'](_0x105e31(0x209)),0x0;}const _0xc33af8=await withSpinner(_0x105e31(0x1be),()=>_0x312de9[_0x105e31(0x2de)][_0x105e31(0x2a2)](_0x52532b),{'verbose':_0x5c1e91[_0x105e31(0x211)]}),_0x2d4c59=_0xc33af8[_0x105e31(0x187)];return console[_0x105e31(0x2d9)](a42_0x52dc99['green'](_0x105e31(0x2be))),console[_0x105e31(0x2d9)](_0x105e31(0x22b)+_0x2d4c59[_0x105e31(0x2a0)]),console['error'](_0x105e31(0x2f9)+_0x2d4c59[_0x105e31(0x1b8)]),await this[_0x105e31(0x1dc)](_0x312de9,_0x2d4c59[_0x105e31(0x1bd)],_0x5c1e91['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']='workflow:clone';['description']=a42_0x5d907a(0x2bd);async[a42_0x5d907a(0x1b3)](_0x4e2697){const _0x1958b5=a42_0x5d907a,{options:_0x369871,args:_0x45611b,tdx:_0x118999}=_0x4e2697,_0x7153e3=this[_0x1958b5(0x2eb)](_0x45611b,_0x369871),_0x48c489=_0x369871[_0x1958b5(0x1fc)],_0x332924=_0x369871[_0x1958b5(0x1b8)],_0x105cb1=_0x369871['skipValidation'];if(!_0x7153e3)return console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x2ef)](_0x1958b5(0x2f7)),'Source\x20directory\x20is\x20required'),console['error'](a42_0x52dc99['dim'](_0x1958b5(0x1ae))),console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x1bf)](_0x1958b5(0x1e8))),0x1;if(!_0x48c489)return console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x2ef)](_0x1958b5(0x2f7)),_0x1958b5(0x1b7)),console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x1bf)](_0x1958b5(0x1ae))),0x1;_0x369871[_0x1958b5(0x211)]&&(console[_0x1958b5(0x2d9)](_0x1958b5(0x297)+_0x7153e3),console['error']('New\x20project\x20name:\x20'+_0x48c489),_0x332924&&console[_0x1958b5(0x2d9)]('Revision:\x20'+_0x332924),_0x369871['dryRun']&&console[_0x1958b5(0x2d9)](_0x1958b5(0x1ad)),_0x105cb1&&console['error'](_0x1958b5(0x238)));const _0x440534=await withSpinner(_0x1958b5(0x2fe),()=>_0x118999['workflow'][_0x1958b5(0x1ce)](_0x7153e3,_0x48c489,{'revision':_0x332924,'skipValidation':_0x105cb1}),{'verbose':_0x369871['verbose']}),_0x2266d2=_0x440534[_0x1958b5(0x187)];console[_0x1958b5(0x2d9)](_0x1958b5(0x30a)+_0x2266d2[_0x1958b5(0x1c2)]);_0x2266d2[_0x1958b5(0x1ba)]&&console[_0x1958b5(0x2d9)](_0x1958b5(0x226)+_0x2266d2[_0x1958b5(0x1ba)]);console[_0x1958b5(0x2d9)](_0x1958b5(0x29d)+_0x2266d2[_0x1958b5(0x264)]),console['error'](_0x1958b5(0x2d0)+_0x2266d2['revision']),console['error'](_0x1958b5(0x2e0)+_0x2266d2['fileCount']);_0x2266d2[_0x1958b5(0x2b7)]&&(console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x1b5)](_0x1958b5(0x17e)+_0x2266d2['newProjectName']+_0x1958b5(0x212)+_0x2266d2['existingProjectId']+')')),console['error'](a42_0x52dc99[_0x1958b5(0x1b5)](_0x1958b5(0x1c0))));if(_0x369871[_0x1958b5(0x308)])return console['error'](a42_0x52dc99[_0x1958b5(0x1b5)](_0x1958b5(0x2fd))),0x0;if(!_0x369871[_0x1958b5(0x219)]){const _0x2a4a6d=_0x2266d2[_0x1958b5(0x1ba)]||a42_0x5d30f9[_0x1958b5(0x305)](_0x7153e3),_0x185c9a=_0x2266d2[_0x1958b5(0x2b7)]?_0x1958b5(0x246)+_0x48c489+_0x1958b5(0x283):'\x0aClone\x20\x22'+_0x2a4a6d+_0x1958b5(0x1ef)+_0x48c489+'\x22?',_0x4f9095=await confirmKey(_0x185c9a);if(!_0x4f9095)return console['error'](_0x1958b5(0x209)),0x0;}const _0x2d3d5e=await withSpinner(_0x2266d2[_0x1958b5(0x2b7)]?_0x1958b5(0x197)+_0x48c489+_0x1958b5(0x2f6):_0x1958b5(0x227)+_0x48c489+'...',()=>_0x118999[_0x1958b5(0x2de)]['executeCloneProject'](_0x2266d2),{'verbose':_0x369871[_0x1958b5(0x211)]}),_0x52243b=_0x2d3d5e[_0x1958b5(0x187)];return console[_0x1958b5(0x2d9)](a42_0x52dc99[_0x1958b5(0x164)](_0x2266d2[_0x1958b5(0x2b7)]?_0x1958b5(0x2c3):'✔\x20Clone\x20complete')),console[_0x1958b5(0x2d9)](_0x1958b5(0x2ac)+_0x52243b['newProjectName']),console[_0x1958b5(0x2d9)](_0x1958b5(0x22b)+_0x52243b['newProjectId']),console[_0x1958b5(0x2d9)]('\x20\x20Revision:\x20'+_0x52243b[_0x1958b5(0x1b8)]),await this[_0x1958b5(0x1dc)](_0x118999,_0x52243b['newProjectName'],_0x369871[_0x1958b5(0x2f0)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x270);[a42_0x5d907a(0x1e7)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0x5d907a(0x1b3)](_0x492059){const _0x3e77b9=a42_0x5d907a,{options:_0x549753,args:_0x498eb9,tdx:_0x5e8b0e}=_0x492059,_0x353b1e=_0x498eb9[0x0];if(!_0x353b1e)return console[_0x3e77b9(0x2d9)](_0x3e77b9(0x2e4)),console[_0x3e77b9(0x2d9)](_0x3e77b9(0x2cb)),0x1;_0x549753[_0x3e77b9(0x211)]&&console[_0x3e77b9(0x2d9)](_0x3e77b9(0x1de)+_0x353b1e);if(!_0x549753[_0x3e77b9(0x219)]){const _0x39f498=await confirmKey(_0x3e77b9(0x298)+_0x353b1e+_0x3e77b9(0x260));if(!_0x39f498)return console[_0x3e77b9(0x2d9)]('Cancelled'),0x0;}const _0xee991e=await withSpinner(_0x3e77b9(0x1da)+_0x353b1e+'...',()=>_0x5e8b0e[_0x3e77b9(0x2de)][_0x3e77b9(0x1a0)](_0x353b1e),{'verbose':_0x549753[_0x3e77b9(0x211)]}),_0x405e0c=_0xee991e[_0x3e77b9(0x187)];return console[_0x3e77b9(0x2d9)](_0x3e77b9(0x29f)+_0x405e0c['projectName']),console['error'](_0x3e77b9(0x22b)+_0x405e0c[_0x3e77b9(0x2a0)]),0x0;}}export function parseKeyValue(_0x13baf0){const _0x569961=a42_0x5d907a,_0xe085c7=_0x13baf0['indexOf']('=');if(_0xe085c7===-0x1)throw new Error(_0x569961(0x303)+_0x13baf0+_0x569961(0x1c5));const _0x421df1=_0x13baf0[_0x569961(0x1dd)](0x0,_0xe085c7),_0x1d578b=_0x13baf0[_0x569961(0x1dd)](_0xe085c7+0x1);if(!_0x421df1)throw new Error(_0x569961(0x1a4));return{'key':_0x421df1,'value':_0x1d578b};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']='workflow:secrets:list';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x242);async['execute'](_0x43307b){const _0x11fb1b=a42_0x5d907a,{options:_0x10646d,args:_0x206f10,tdx:_0xeae172}=_0x43307b,_0x49f434=this[_0x11fb1b(0x24b)](_0x206f10,_0x10646d);if(!_0x49f434)return 0x1;_0x10646d['verbose']&&console[_0x11fb1b(0x2d9)]('Project:\x20'+_0x49f434);const _0x36d1d4=await withSpinner('Listing\x20secrets...',()=>_0xeae172['workflow']['listSecrets'](_0x49f434),{'verbose':_0x10646d[_0x11fb1b(0x211)]}),{secrets:_0x4f2ca0}=_0x36d1d4[_0x11fb1b(0x187)];return console[_0x11fb1b(0x2d9)](_0x11fb1b(0x1f2)+_0x4f2ca0[_0x11fb1b(0x235)]+'\x20secret'+(_0x4f2ca0[_0x11fb1b(0x235)]!==0x1?'s':'')),await handleSDKOutput(_0x4f2ca0,_0x10646d),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]='workflow:secrets:set';[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x2c0);async[a42_0x5d907a(0x1b3)](_0x1805ae){const _0x55f44c=a42_0x5d907a,{options:_0x21437d,args:_0x9afa0e,tdx:_0x13452a}=_0x1805ae;let _0x2f9b1b,_0x466fdc;if(_0x9afa0e['length']>=0x2)_0x2f9b1b=_0x9afa0e[0x0],_0x466fdc=_0x9afa0e[0x1];else{if(_0x9afa0e[_0x55f44c(0x235)]===0x1&&_0x21437d[_0x55f44c(0x171)])_0x2f9b1b=_0x21437d[_0x55f44c(0x171)],_0x466fdc=_0x9afa0e[0x0];else return _0x9afa0e[_0x55f44c(0x235)]===0x1?(console['error'](_0x55f44c(0x2c1)),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x55f44c(0x2d9)](_0x55f44c(0x24e)),console[_0x55f44c(0x2d9)](_0x55f44c(0x28b)),0x1);}let _0x35e197,_0x2042f7;try{({key:_0x35e197,value:_0x2042f7}=parseKeyValue(_0x466fdc));}catch(_0x48fbd3){return _0x48fbd3 instanceof Error&&console[_0x55f44c(0x2d9)](a42_0x52dc99[_0x55f44c(0x2ef)](_0x55f44c(0x2f7)),_0x48fbd3[_0x55f44c(0x229)]),0x1;}_0x21437d[_0x55f44c(0x211)]&&(console[_0x55f44c(0x2d9)](_0x55f44c(0x1de)+_0x2f9b1b),console[_0x55f44c(0x2d9)]('Key:\x20'+_0x35e197));const _0x5e009b=await withSpinner(_0x55f44c(0x277),()=>_0x13452a[_0x55f44c(0x2de)][_0x55f44c(0x177)](_0x2f9b1b,_0x35e197,_0x2042f7),{'verbose':_0x21437d[_0x55f44c(0x211)]}),_0x1a1f67=_0x5e009b[_0x55f44c(0x187)];return console['error']('✔\x20Secret\x20\x27'+_0x1a1f67['key']+_0x55f44c(0x1e2)+_0x1a1f67[_0x55f44c(0x1bd)]+'\x27'),(_0x21437d[_0x55f44c(0x26c)]||_0x21437d[_0x55f44c(0x2ce)])&&await handleSingleObjectOutput(_0x1a1f67,_0x21437d),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x5d907a(0x1fc)]=a42_0x5d907a(0x1aa);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x165);async[a42_0x5d907a(0x1b3)](_0xdb62a){const _0x3174cf=a42_0x5d907a,{options:_0x1ad31c,args:_0x526948,tdx:_0x261e13}=_0xdb62a;let _0x5f59fc,_0xe998c9;if(_0x526948[_0x3174cf(0x235)]>=0x2)_0x5f59fc=_0x526948[0x0],_0xe998c9=_0x526948[0x1];else{if(_0x526948[_0x3174cf(0x235)]===0x1&&_0x1ad31c[_0x3174cf(0x171)])_0x5f59fc=_0x1ad31c[_0x3174cf(0x171)],_0xe998c9=_0x526948[0x0];else return _0x526948['length']===0x1?(console['error'](_0x3174cf(0x2c1)),console[_0x3174cf(0x2d9)](_0x3174cf(0x1a3)),0x1):(console[_0x3174cf(0x2d9)](_0x3174cf(0x1cc)),console[_0x3174cf(0x2d9)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x1ad31c['verbose']&&(console[_0x3174cf(0x2d9)](_0x3174cf(0x1de)+_0x5f59fc),console['error']('Key:\x20'+_0xe998c9));if(!_0x1ad31c['yes']){const _0x4b04f1=await confirmKey(_0x3174cf(0x302)+_0xe998c9+_0x3174cf(0x198)+_0x5f59fc+'\x27?');if(!_0x4b04f1)return console[_0x3174cf(0x2d9)](_0x3174cf(0x209)),0x0;}const _0x4c558c=await withSpinner(_0x3174cf(0x1fe),()=>_0x261e13['workflow'][_0x3174cf(0x29c)](_0x5f59fc,_0xe998c9),{'verbose':_0x1ad31c[_0x3174cf(0x211)]}),_0x1442bb=_0x4c558c[_0x3174cf(0x187)];return console[_0x3174cf(0x2d9)](_0x3174cf(0x251)+_0x1442bb[_0x3174cf(0x222)]+_0x3174cf(0x217)+_0x1442bb[_0x3174cf(0x1bd)]+'\x27'),(_0x1ad31c[_0x3174cf(0x26c)]||_0x1ad31c[_0x3174cf(0x2ce)])&&await handleSingleObjectOutput(_0x1442bb,_0x1ad31c),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(_0x5ce3d8){const _0x5085b0=a42_0x5d907a,_0x12d333=Math[_0x5085b0(0x1d9)](_0x5ce3d8/0x3e8),_0x204aa7=Math['floor'](_0x12d333/0x3c),_0x2707f1=Math[_0x5085b0(0x1d9)](_0x204aa7/0x3c),_0x185cdc=Math[_0x5085b0(0x1d9)](_0x2707f1/0x18);if(_0x185cdc>0x0){const _0x2589d9=_0x2707f1%0x18;return _0x2589d9>0x0?_0x185cdc+'d\x20'+_0x2589d9+'h':_0x185cdc+'d';}else{if(_0x2707f1>0x0){const _0x56be53=_0x204aa7%0x3c;return _0x56be53>0x0?_0x2707f1+'h\x20'+_0x56be53+'m':_0x2707f1+'h';}else{if(_0x204aa7>0x0){const _0x51db30=_0x12d333%0x3c;return _0x51db30>0x0?_0x204aa7+'m\x20'+_0x51db30+'s':_0x204aa7+'m';}else return _0x12d333+'s';}}}function formatTimestamp(_0x2ea384,_0x2907a4){const _0x50fb8f=a42_0x5d907a,_0x5d1518=new Date(_0x2ea384),_0x5f2013=String(_0x5d1518[_0x50fb8f(0x22c)]())['padStart'](0x2,'0'),_0x5d4318=String(_0x5d1518[_0x50fb8f(0x25a)]())[_0x50fb8f(0x2b2)](0x2,'0'),_0x39fcb8=_0x5f2013+':'+_0x5d4318,_0x547d87=_0x5d1518[_0x50fb8f(0x1b9)]()===_0x2907a4[_0x50fb8f(0x1b9)]()&&_0x5d1518[_0x50fb8f(0x192)]()===_0x2907a4[_0x50fb8f(0x192)]()&&_0x5d1518[_0x50fb8f(0x254)]()===_0x2907a4[_0x50fb8f(0x254)]();if(_0x547d87)return _0x39fcb8;else{const _0x1a0142=String(_0x5d1518['getMonth']()+0x1)['padStart'](0x2,'0'),_0x2f9c93=String(_0x5d1518['getDate']())['padStart'](0x2,'0');return _0x1a0142+'-'+_0x2f9c93+'\x20'+_0x39fcb8;}}function formatDate(_0xcc5257){const _0x2e7ab0=a42_0x5d907a,_0x329f01=_0xcc5257[_0x2e7ab0(0x1b9)](),_0x13848f=String(_0xcc5257[_0x2e7ab0(0x192)]()+0x1)[_0x2e7ab0(0x2b2)](0x2,'0'),_0x3031f1=String(_0xcc5257[_0x2e7ab0(0x254)]())[_0x2e7ab0(0x2b2)](0x2,'0');return _0x329f01+'-'+_0x13848f+'-'+_0x3031f1;}function getTaskStateIcon(_0x3fe504){const _0x41266b={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x41266b[_0x3fe504]||'⚪';}function a42_0x3b57(_0x1e2d28,_0x2ee5d9){_0x1e2d28=_0x1e2d28-0x163;const _0x4b0db6=a42_0x4b0d();let _0x3b5760=_0x4b0db6[_0x1e2d28];return _0x3b5760;}function getBarChar(_0x14831a){const _0x3c7217=a42_0x5d907a;return _0x14831a===_0x3c7217(0x2d9)||_0x14831a===_0x3c7217(0x2e1)?'×':'─';}function getBarColor(_0x789b56){const _0xf88e24=a42_0x5d907a,_0x42a860={'success':a42_0x52dc99[_0xf88e24(0x164)],'error':a42_0x52dc99['red'],'group_error':a42_0x52dc99[_0xf88e24(0x2ef)],'running':a42_0x52dc99['blue'],'blocked':a42_0x52dc99['yellow'],'planned':a42_0x52dc99[_0xf88e24(0x1bf)],'canceling':a42_0x52dc99[_0xf88e24(0x1b5)]};return _0x42a860[_0x789b56]||a42_0x52dc99['white'];}function parseTaskName(_0x3683ed){const _0x3a28f8=a42_0x5d907a;let _0x2e0813=_0x3683ed['replace'](/^\++/,'');const _0x206774=_0x2e0813[_0x3a28f8(0x228)]('+'),_0x3f17ca=_0x206774[_0x3a28f8(0x235)]>0x1?_0x206774['length']-0x2:0x0,_0x2b1af6=_0x206774[_0x206774[_0x3a28f8(0x235)]-0x1]||_0x2e0813;return{'level':_0x3f17ca,'name':'+'+_0x2b1af6};}function truncateTaskName(_0x38af89,_0x149e17){const _0x193759=a42_0x5d907a,_0x4e53f6=stringWidth(_0x38af89);if(_0x4e53f6<=_0x149e17)return _0x38af89;let _0x2022b0=_0x38af89;while(stringWidth(_0x2022b0+'…')>_0x149e17&&_0x2022b0[_0x193759(0x235)]>0x0){_0x2022b0=_0x2022b0[_0x193759(0x1f7)](0x0,-0x1);}return _0x2022b0+'…';}function calculateTimeScale(_0x5519aa,_0x358c6){const _0x53087c=a42_0x5d907a;return{'startTime':_0x5519aa['start'],'endTime':_0x5519aa[_0x53087c(0x1fd)],'durationMs':_0x5519aa[_0x53087c(0x27c)],'msPerChar':_0x5519aa['duration']/_0x358c6};}function timeToPosition(_0x1740fa,_0x50ea18,_0x3e07e6){const _0x176006=a42_0x5d907a,_0x3fb097=_0x1740fa-_0x50ea18[_0x176006(0x2dc)],_0x18fcbe=Math[_0x176006(0x1d9)](_0x3fb097/_0x50ea18[_0x176006(0x20c)]);return Math[_0x176006(0x1e3)](0x0,Math[_0x176006(0x221)](_0x18fcbe,_0x3e07e6));}function renderTimeAxis(_0xe246b1,_0x292eb6){const _0x32ea87=a42_0x5d907a,_0x2486ad=Math[_0x32ea87(0x221)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x32ea87(0x1e3)](TIMELINE_CONFIG[_0x32ea87(0x190)],Math[_0x32ea87(0x1d9)](_0x292eb6/TIMELINE_CONFIG[_0x32ea87(0x1bc)]))),_0x90e510=_0xe246b1[_0x32ea87(0x1e6)]/(_0x2486ad-0x1),_0x591948=new Date(_0xe246b1['startTime']),_0x32f8d9=[];for(let _0x33dc51=0x0;_0x33dc51<_0x2486ad;_0x33dc51++){const _0x25b407=_0xe246b1[_0x32ea87(0x2dc)]+_0x33dc51*_0x90e510,_0x2bd916=timeToPosition(_0x25b407,_0xe246b1,_0x292eb6),_0x1e9a5e=formatTimestamp(_0x25b407,_0x591948);_0x32f8d9[_0x32ea87(0x19c)]({'pos':_0x2bd916,'text':_0x1e9a5e});}const _0x549077=new Array(_0x292eb6)['fill']('\x20');let _0x4295c5=-0x1;for(const {pos:_0x300585,text:_0x36d797}of _0x32f8d9){let _0x5e4bf1=Math[_0x32ea87(0x1e3)](0x0,_0x300585-Math[_0x32ea87(0x1d9)](_0x36d797['length']/0x2));_0x5e4bf1<=_0x4295c5+TIMELINE_CONFIG[_0x32ea87(0x224)]&&(_0x5e4bf1=_0x4295c5+TIMELINE_CONFIG[_0x32ea87(0x224)]+0x1);_0x5e4bf1+_0x36d797[_0x32ea87(0x235)]>_0x292eb6&&(_0x5e4bf1=_0x292eb6-_0x36d797[_0x32ea87(0x235)]);if(_0x5e4bf1>=0x0&&_0x5e4bf1+_0x36d797[_0x32ea87(0x235)]<=_0x292eb6&&_0x5e4bf1>_0x4295c5){for(let _0x396560=0x0;_0x396560<_0x36d797[_0x32ea87(0x235)];_0x396560++){_0x549077[_0x5e4bf1+_0x396560]=_0x36d797[_0x396560];}_0x4295c5=_0x5e4bf1+_0x36d797[_0x32ea87(0x235)]-0x1;}}return _0x549077[_0x32ea87(0x275)]('');}function renderTaskRow(_0x4d17d6,_0x28a73d,_0x16b821,_0x34875c){const _0x58a190=a42_0x5d907a,{level:_0x3232bb,name:_0x36aea9}=parseTaskName(_0x4d17d6[_0x58a190(0x1fc)]),_0xdd6a8='\x20'[_0x58a190(0x2a7)](_0x3232bb),_0x4cc082=_0x4d17d6[_0x58a190(0x2db)]?'('+formatElapsed(_0x4d17d6['window'][_0x58a190(0x27c)])+')':'',_0x3bc425=stringWidth(_0x4cc082),_0x410636=_0x3232bb*0x1,_0x5b6ced=_0x34875c-_0x410636-_0x3bc425-0x1,_0xc33a26=truncateTaskName(_0x36aea9,_0x5b6ced),_0x277b1e=_0xdd6a8+_0xc33a26,_0x2c431f=stringWidth(_0x277b1e),_0x114300=_0x34875c-_0x2c431f-_0x3bc425,_0x3b048e=_0x277b1e+'\x20'[_0x58a190(0x2a7)](Math['max'](0x1,_0x114300))+a42_0x52dc99[_0x58a190(0x1bf)](_0x4cc082),_0x40351e=getTaskStateIcon(_0x4d17d6[_0x58a190(0x23f)]),_0x4d427e=new Array(_0x16b821)[_0x58a190(0x23a)]('\x20');if(_0x4d17d6['window']){const _0x4ce1b8=timeToPosition(_0x4d17d6[_0x58a190(0x2db)][_0x58a190(0x2ee)],_0x28a73d,_0x16b821),_0x4feaa3=timeToPosition(_0x4d17d6[_0x58a190(0x2db)][_0x58a190(0x1fd)],_0x28a73d,_0x16b821),_0xdb40d9=getBarChar(_0x4d17d6[_0x58a190(0x23f)]),_0x4ba6cf=Math[_0x58a190(0x1e3)](_0x4ce1b8+0x1,_0x4feaa3);for(let _0x5b0dfd=_0x4ce1b8;_0x5b0dfd<Math['min'](_0x4ba6cf,_0x16b821);_0x5b0dfd++){_0x4d427e[_0x5b0dfd]=_0xdb40d9;}}const _0x4c4e21=getBarColor(_0x4d17d6['state']),_0x2529c2=_0x4d427e[_0x58a190(0x18a)](_0x396c32=>_0x396c32==='\x20'?'\x20':_0x4c4e21(_0x396c32))[_0x58a190(0x275)]('');return _0x40351e+'\x20'+_0x3b048e+'│'+_0x2529c2+'│';}function calculateStats(_0x3d8baf){const _0x5b49b9=a42_0x5d907a,_0x667f01={'total':_0x3d8baf[_0x5b49b9(0x235)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x40fcae of _0x3d8baf){if(_0x40fcae[_0x5b49b9(0x23f)]===_0x5b49b9(0x25c))_0x667f01[_0x5b49b9(0x25c)]++;else{if(_0x40fcae[_0x5b49b9(0x23f)]===_0x5b49b9(0x2d9)||_0x40fcae[_0x5b49b9(0x23f)]===_0x5b49b9(0x2e1))_0x667f01[_0x5b49b9(0x2d9)]++;else _0x40fcae[_0x5b49b9(0x23f)]===_0x5b49b9(0x21b)?_0x667f01[_0x5b49b9(0x21b)]++:_0x667f01[_0x5b49b9(0x1f1)]++;}}return _0x667f01;}function formatStats(_0x19cbc5){const _0x36ebf4=a42_0x5d907a;return[_0x36ebf4(0x22a)+_0x19cbc5['total'],'✅\x20'+_0x19cbc5[_0x36ebf4(0x25c)],'❌\x20'+_0x19cbc5[_0x36ebf4(0x2d9)],_0x36ebf4(0x2e9)+_0x19cbc5[_0x36ebf4(0x21b)],'⏳\x20'+_0x19cbc5['pending']]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0x5d907a(0x2d4);[a42_0x5d907a(0x1e7)]=a42_0x5d907a(0x18d);async[a42_0x5d907a(0x1b3)](_0x31f8e1){const _0x442ff7=a42_0x5d907a,{options:_0x4dc5ec,args:_0x54e449,tdx:_0xc5551f}=_0x31f8e1;let _0x54f8cf,_0x1bd045,_0x56b869=![];if(_0x54e449[0x0]){if(_0x54e449[0x0]['includes']('.')){const _0xf43622=this[_0x442ff7(0x2a3)](_0x54e449,_0x4dc5ec);if(!_0xf43622)return 0x1;_0x54f8cf=_0xf43622['projectName'],_0x1bd045=_0xf43622[_0x442ff7(0x23b)];}else{_0x1bd045=_0x54e449[0x0],_0x54f8cf=_0x4dc5ec[_0x442ff7(0x171)];if(!_0x54f8cf)return console[_0x442ff7(0x2d9)](a42_0x52dc99['red'](_0x442ff7(0x2f7)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x56b869=!![];}}else{const _0x6be29b=this[_0x442ff7(0x2a3)](_0x54e449,_0x4dc5ec);if(!_0x6be29b)return 0x1;_0x54f8cf=_0x6be29b[_0x442ff7(0x1bd)],_0x1bd045=_0x6be29b[_0x442ff7(0x23b)];}if(_0x4dc5ec[_0x442ff7(0x211)]){if(_0x54f8cf&&_0x1bd045)console[_0x442ff7(0x2d9)](_0x442ff7(0x1f4)+_0x54f8cf+'.'+_0x1bd045);else _0x54f8cf&&console[_0x442ff7(0x2d9)](_0x442ff7(0x196)+_0x54f8cf);}const _0x4d2604=_0x4dc5ec[_0x442ff7(0x230)],_0x681bd7=_0x4dc5ec[_0x442ff7(0x1f6)];if(_0x4d2604){_0x681bd7&&console[_0x442ff7(0x2d9)](a42_0x52dc99[_0x442ff7(0x1b5)]('Warning:'),_0x442ff7(0x166));const _0xb358cb=_0x4dc5ec[_0x442ff7(0x1ab)];return _0xb358cb?await this[_0x442ff7(0x306)](_0x31f8e1,_0x4d2604):await this['renderSingleTimeline'](_0x31f8e1,_0x4d2604,_0x4dc5ec),0x0;}if(_0x681bd7){const _0x102225=await withSpinner(_0x442ff7(0x207),()=>_0xc5551f[_0x442ff7(0x2de)][_0x442ff7(0x213)]({'projectName':_0x54f8cf,'workflowName':_0x1bd045,'limit':0x64}),{'verbose':_0x4dc5ec[_0x442ff7(0x211)]}),_0x20daa6=_0x102225['data'][_0x442ff7(0x206)](_0x4bc139=>_0x4bc139['id']===_0x681bd7);if(!_0x20daa6)return console['error'](a42_0x52dc99[_0x442ff7(0x2ef)](_0x442ff7(0x2f7)),_0x442ff7(0x2c7)+_0x681bd7),0x1;if(!_0x20daa6[_0x442ff7(0x276)]?.['id'])return console[_0x442ff7(0x2d9)](a42_0x52dc99['red'](_0x442ff7(0x2f7)),_0x442ff7(0x1a7)+_0x681bd7+_0x442ff7(0x26d)),0x1;const _0x1b3b6a=_0x20daa6[_0x442ff7(0x276)]['id'];_0x4dc5ec[_0x442ff7(0x211)]&&console[_0x442ff7(0x2d9)](_0x442ff7(0x290)+_0x1b3b6a+_0x442ff7(0x182)+_0x681bd7);const _0xb19973=_0x4dc5ec[_0x442ff7(0x1ab)];return _0xb19973?await this['pollTimeline'](_0x31f8e1,_0x1b3b6a):await this['renderSingleTimeline'](_0x31f8e1,_0x1b3b6a,_0x4dc5ec),0x0;}const _0x1ecc5c=await withSpinner(_0x442ff7(0x278),()=>_0xc5551f['workflow'][_0x442ff7(0x213)]({'projectName':_0x54f8cf,'workflowName':_0x1bd045,'limit':_0x4dc5ec[_0x442ff7(0x24f)]||0x32}),{'verbose':_0x4dc5ec[_0x442ff7(0x211)]}),_0x4be9e7=_0x1ecc5c['data'];if(_0x4be9e7[_0x442ff7(0x235)]===0x0){if(_0x54f8cf&&_0x1bd045)console[_0x442ff7(0x2d9)](_0x442ff7(0x185)+_0x54f8cf+'.'+_0x1bd045);else _0x54f8cf?console[_0x442ff7(0x2d9)](_0x442ff7(0x28d)+_0x54f8cf):(console[_0x442ff7(0x2d9)](_0x442ff7(0x2a6)),console['error'](a42_0x52dc99['dim'](_0x442ff7(0x255))));return 0x0;}_0x4be9e7['sort']((_0x25930c,_0xddad64)=>{const _0x2e1f19=_0x442ff7,_0x37f233=_0x25930c[_0x2e1f19(0x27a)]||'',_0x281354=_0xddad64[_0x2e1f19(0x27a)]||'';return _0x281354[_0x2e1f19(0x200)](_0x37f233);});if(_0x4dc5ec[_0x442ff7(0x26c)]||_0x4dc5ec[_0x442ff7(0x2ce)])return await handleSDKOutput(_0x4be9e7,_0x4dc5ec),0x0;let _0x4babf7;if(_0x56b869){const _0x18205c=_0x4be9e7[0x0];if(!_0x18205c[_0x442ff7(0x276)]?.['id'])return console[_0x442ff7(0x2d9)](_0x442ff7(0x19b)),0x0;_0x4babf7=_0x18205c[_0x442ff7(0x276)]['id'],_0x4dc5ec[_0x442ff7(0x211)]&&console['error']('Auto-selected\x20latest\x20session:\x20'+_0x18205c['sessionTime']);}else{const _0x341f6a=_0x4be9e7[_0x442ff7(0x18a)](_0x17ec44=>{const _0xea3a2c=_0x442ff7,_0x1c4fcf=getAttemptStatusDisplay(_0x17ec44[_0xea3a2c(0x276)]);return{'title':_0x17ec44[_0xea3a2c(0x167)]?.[_0xea3a2c(0x1fc)]+'.'+_0x17ec44['workflow']?.[_0xea3a2c(0x1fc)]+'\x20-\x20'+_0x17ec44[_0xea3a2c(0x27a)]+'\x20'+_0x1c4fcf['icon'],'value':_0x17ec44[_0xea3a2c(0x276)]?.['id']||'','description':_0x1c4fcf[_0xea3a2c(0x26a)]};}),_0x28eda8=await a42_0x3ff555({'type':_0x442ff7(0x2ff),'name':_0x442ff7(0x230),'message':_0x442ff7(0x231),'choices':_0x341f6a['filter'](_0x107096=>_0x107096[_0x442ff7(0x30c)]!=='')});if(!_0x28eda8[_0x442ff7(0x230)])return 0x0;_0x4babf7=_0x28eda8[_0x442ff7(0x230)];}const _0xfec7ab=_0x4dc5ec[_0x442ff7(0x1ab)];return _0xfec7ab?await this[_0x442ff7(0x306)](_0x31f8e1,_0x4babf7):await this[_0x442ff7(0x279)](_0x31f8e1,_0x4babf7,_0x4dc5ec),0x0;}async['renderSingleTimeline'](_0x337ee1,_0x47828e,_0x54d25d){const _0x5dbaf8=a42_0x5d907a,{tdx:_0x126e96}=_0x337ee1;let _0x3cb2b3,_0x6947e4;try{[_0x3cb2b3,_0x6947e4]=await Promise['all']([_0x126e96[_0x5dbaf8(0x2de)]['attempt'](_0x47828e),_0x126e96['workflow'][_0x5dbaf8(0x24a)](_0x47828e,![])]);}catch(_0x55da0b){console[_0x5dbaf8(0x2d9)](a42_0x52dc99[_0x5dbaf8(0x2ef)](_0x5dbaf8(0x2d5)));_0x54d25d[_0x5dbaf8(0x211)]&&console[_0x5dbaf8(0x2d9)](_0x55da0b);throw _0x55da0b;}if(_0x54d25d[_0x5dbaf8(0x26c)]||_0x54d25d[_0x5dbaf8(0x2ce)]){const _0x36dc91=this[_0x5dbaf8(0x194)](_0x3cb2b3,_0x6947e4);await handleSDKOutput([_0x36dc91],_0x54d25d);return;}const _0x4fc7e4=_0x126e96[_0x5dbaf8(0x1c3)][_0x5dbaf8(0x2f0)],_0x5cd7bd=this['renderTimeline'](_0x3cb2b3,_0x6947e4,_0x4fc7e4);console['log'](_0x5cd7bd);}async[a42_0x5d907a(0x306)](_0xbcf882,_0x1015db){const _0x5410f=a42_0x5d907a,{tdx:_0x1819a6}=_0xbcf882,_0x5b709f=TIMELINE_CONFIG[_0x5410f(0x188)],_0xb133d8=TIMELINE_CONFIG[_0x5410f(0x218)];let _0x28992c=0x0;while(_0x28992c<_0xb133d8){process[_0x5410f(0x286)]['isTTY']&&process[_0x5410f(0x286)][_0x5410f(0x2ec)]('\x1bc');let _0x132066,_0x5d933f;try{[_0x132066,_0x5d933f]=await Promise['all']([_0x1819a6[_0x5410f(0x2de)][_0x5410f(0x247)](_0x1015db),_0x1819a6[_0x5410f(0x2de)][_0x5410f(0x24a)](_0x1015db,![])]);}catch(_0x354deb){console[_0x5410f(0x2d9)](a42_0x52dc99[_0x5410f(0x2ef)](_0x5410f(0x1ed)));_0x28992c>0x0&&console[_0x5410f(0x2d9)](a42_0x52dc99['dim'](_0x5410f(0x249)+_0x28992c));throw _0x354deb;}const _0x5bee70=_0x1819a6['context']['site'],_0x2158c0=this[_0x5410f(0x232)](_0x132066,_0x5d933f,_0x5bee70);console[_0x5410f(0x1e0)](_0x2158c0);const _0x1002cf=_0x132066[_0x5410f(0x2b9)]&&_0x5d933f[_0x5410f(0x223)](_0x2217e2=>_0x2217e2[_0x5410f(0x23f)]!=='running'&&_0x2217e2[_0x5410f(0x23f)]!=='planned');if(_0x1002cf){console['error'](a42_0x52dc99[_0x5410f(0x164)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x5410f(0x2d9)](a42_0x52dc99[_0x5410f(0x1bf)](_0x5410f(0x1ee)+_0x28992c*0x2+_0x5410f(0x244))),await new Promise(_0x82326d=>setTimeout(_0x82326d,_0x5b709f)),_0x28992c++;}_0x28992c>=_0xb133d8&&console[_0x5410f(0x2d9)](a42_0x52dc99[_0x5410f(0x1b5)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0x5d907a(0x232)](_0x2f42a1,_0x31cc3a,_0x587569){const _0x11edd5=a42_0x5d907a,_0x45ccfd=[],_0x507f4f=TIMELINE_CONFIG[_0x11edd5(0x173)],_0x2e1d56=0x5,_0x1762fd=process[_0x11edd5(0x286)][_0x11edd5(0x19f)]||0x78,_0x522f9e=_0x1762fd-_0x507f4f-_0x2e1d56,_0x4bacbd=Math[_0x11edd5(0x1e3)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x11edd5(0x221)](_0x522f9e,TIMELINE_CONFIG[_0x11edd5(0x1f0)])),_0x43f871=new Date(_0x2f42a1[_0x11edd5(0x2a5)])[_0x11edd5(0x2f8)](),_0x4c2f4a=_0x2f42a1[_0x11edd5(0x169)]?new Date(_0x2f42a1[_0x11edd5(0x169)])[_0x11edd5(0x2f8)]():Date[_0x11edd5(0x296)](),_0x57d5ad={'start':_0x43f871,'end':_0x4c2f4a,'duration':_0x4c2f4a-_0x43f871},_0x1c02da=new Map(),_0x1e33a8=[];for(const _0x39da31 of _0x31cc3a){if(_0x39da31[_0x11edd5(0x17a)]){const _0x12f32a=new Date(_0x39da31['startedAt'])[_0x11edd5(0x2f8)](),_0x1c13fa=_0x39da31[_0x11edd5(0x1d5)]?new Date(_0x39da31[_0x11edd5(0x1d5)])[_0x11edd5(0x2f8)]():Date[_0x11edd5(0x296)](),_0x3cb17a={'start':_0x12f32a,'end':_0x1c13fa,'duration':_0x1c13fa-_0x12f32a};_0x1c02da[_0x11edd5(0x2bc)](_0x39da31['id'],_0x3cb17a),_0x1e33a8['push']({'name':_0x39da31['fullName'],'state':_0x39da31[_0x11edd5(0x23f)]||_0x11edd5(0x2a9),'window':_0x3cb17a});}else _0x1e33a8['push']({'name':_0x39da31[_0x11edd5(0x181)],'state':_0x39da31['state']||_0x11edd5(0x1cf),'window':undefined});}_0x1e33a8[_0x11edd5(0x2cc)]((_0xed4b2c,_0x1b16b4)=>{const _0x30328d=_0x11edd5;if(!_0xed4b2c[_0x30328d(0x2db)])return 0x1;if(!_0x1b16b4[_0x30328d(0x2db)])return-0x1;return _0xed4b2c[_0x30328d(0x2db)][_0x30328d(0x2ee)]-_0x1b16b4[_0x30328d(0x2db)]['start'];});const _0x1bbb25=_0x1e33a8[_0x11edd5(0x235)],_0x371e42=_0x1bbb25>TIMELINE_CONFIG[_0x11edd5(0x2d2)];_0x371e42&&_0x1e33a8[_0x11edd5(0x2b6)](TIMELINE_CONFIG[_0x11edd5(0x2d2)]);const _0x55aa69=calculateTimeScale(_0x57d5ad,_0x4bacbd),_0x5ddaae=_0x2f42a1['done']?_0x2f42a1[_0x11edd5(0x25c)]?a42_0x52dc99[_0x11edd5(0x164)](_0x11edd5(0x25c)):a42_0x52dc99[_0x11edd5(0x2ef)]('error'):a42_0x52dc99[_0x11edd5(0x1a9)]('running'),_0x4cb947=_0x2f42a1['project']?.['id'],_0x551235=_0x2f42a1[_0x11edd5(0x1f6)];let _0x326beb;if(_0x4cb947&&_0x551235){const _0x2ffd9a=getWorkflowAttemptUrl(_0x587569,_0x4cb947,_0x551235,_0x2f42a1['id']);_0x326beb=hyperlink(a42_0x52dc99['dim'](_0x2f42a1['id']),_0x2ffd9a);}else _0x326beb=a42_0x52dc99[_0x11edd5(0x1bf)](_0x2f42a1['id']);_0x45ccfd[_0x11edd5(0x19c)](_0x11edd5(0x25b)+_0x326beb+_0x11edd5(0x17d)+_0x5ddaae+_0x11edd5(0x17d)+formatElapsed(_0x57d5ad[_0x11edd5(0x27c)]));if(_0x1e33a8['length']>0x0){const _0x5005ac=renderTimeAxis(_0x55aa69,_0x4bacbd),_0x471d8e=new Date(_0x57d5ad[_0x11edd5(0x2ee)]),_0x1ec238=formatDate(_0x471d8e),_0x15bc9e=TIMELINE_CONFIG[_0x11edd5(0x2c8)]+TIMELINE_CONFIG[_0x11edd5(0x20a)]+_0x507f4f,_0x298483=_0x1ec238[_0x11edd5(0x2b2)](_0x15bc9e),_0x5ed378=a42_0x52dc99[_0x11edd5(0x1bf)](_0x298483);_0x45ccfd['push'](_0x5ed378+'\x20'+_0x5005ac);for(const _0x9ac724 of _0x1e33a8){_0x45ccfd['push'](renderTaskRow(_0x9ac724,_0x55aa69,_0x4bacbd,_0x507f4f));}const _0x9b085f=calculateStats(_0x1e33a8);_0x45ccfd[_0x11edd5(0x19c)](formatStats(_0x9b085f)),_0x371e42&&_0x45ccfd['push'](a42_0x52dc99['yellow']('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x11edd5(0x1a6)+_0x1bbb25+_0x11edd5(0x1b2))),_0x45ccfd['push'](''),_0x45ccfd[_0x11edd5(0x19c)](a42_0x52dc99[_0x11edd5(0x1bf)](_0x11edd5(0x1e1))+(_0x11edd5(0x172)+_0x2f42a1['id']+'\x20logs')+a42_0x52dc99[_0x11edd5(0x1bf)](_0x11edd5(0x2c5)));}else _0x45ccfd[_0x11edd5(0x19c)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x45ccfd['join']('\x0a');}[a42_0x5d907a(0x194)](_0x37207c,_0x33c31b){const _0xa6e1de=a42_0x5d907a,_0x3263a2=new Date(_0x37207c[_0xa6e1de(0x2a5)])[_0xa6e1de(0x2f8)](),_0xe4bcda=_0x37207c[_0xa6e1de(0x169)]?new Date(_0x37207c[_0xa6e1de(0x169)])[_0xa6e1de(0x2f8)]():Date[_0xa6e1de(0x296)](),_0x35d169=_0xe4bcda-_0x3263a2,_0xe673d7=[];for(const _0x7b72d6 of _0x33c31b){if(_0x7b72d6[_0xa6e1de(0x17a)]){const _0xafac7e=new Date(_0x7b72d6[_0xa6e1de(0x17a)])[_0xa6e1de(0x2f8)](),_0x2e1d00=_0x7b72d6[_0xa6e1de(0x1d5)]?new Date(_0x7b72d6['updatedAt'])[_0xa6e1de(0x2f8)]():Date[_0xa6e1de(0x296)]();_0xe673d7[_0xa6e1de(0x19c)]({'name':_0x7b72d6['fullName'],'state':_0x7b72d6['state']||_0xa6e1de(0x2a9),'window':{'start':_0xafac7e,'end':_0x2e1d00,'duration':_0x2e1d00-_0xafac7e}});}else _0xe673d7['push']({'name':_0x7b72d6[_0xa6e1de(0x181)],'state':_0x7b72d6[_0xa6e1de(0x23f)]||_0xa6e1de(0x1cf),'window':undefined});}const _0x325eda=calculateStats(_0xe673d7);return{'attempt':{'id':_0x37207c['id'],'status':_0x37207c['done']?_0x37207c['success']?_0xa6e1de(0x25c):_0xa6e1de(0x2d9):'running','createdAt':_0x37207c[_0xa6e1de(0x2a5)],'finishedAt':_0x37207c[_0xa6e1de(0x169)],'duration_ms':_0x35d169},'tasks':_0xe673d7['map'](_0x41bec8=>({'name':_0x41bec8[_0xa6e1de(0x1fc)],'state':_0x41bec8['state'],'startedAt':_0x41bec8[_0xa6e1de(0x2db)]?new Date(_0x41bec8[_0xa6e1de(0x2db)]['start'])[_0xa6e1de(0x1eb)]():null,'updatedAt':_0x41bec8['window']?new Date(_0x41bec8[_0xa6e1de(0x2db)][_0xa6e1de(0x1fd)])['toISOString']():null,'duration_ms':_0x41bec8[_0xa6e1de(0x2db)]?.[_0xa6e1de(0x27c)]||null})),'stats':_0x325eda};}}
1
+ const a42_0xb2f7ca=a42_0x1b8c;(function(_0x4a13f5,_0x1286bf){const _0x53382c=a42_0x1b8c,_0x1cf0aa=_0x4a13f5();while(!![]){try{const _0x10f87c=parseInt(_0x53382c(0x18d))/0x1*(-parseInt(_0x53382c(0xee))/0x2)+-parseInt(_0x53382c(0x158))/0x3+-parseInt(_0x53382c(0x133))/0x4+-parseInt(_0x53382c(0x1c7))/0x5+-parseInt(_0x53382c(0x200))/0x6*(parseInt(_0x53382c(0xf1))/0x7)+parseInt(_0x53382c(0x21c))/0x8+-parseInt(_0x53382c(0xfb))/0x9*(-parseInt(_0x53382c(0x22a))/0xa);if(_0x10f87c===_0x1286bf)break;else _0x1cf0aa['push'](_0x1cf0aa['shift']());}catch(_0x2b9389){_0x1cf0aa['push'](_0x1cf0aa['shift']());}}}(a42_0xee86,0x92959));import a42_0x5a0170 from'chalk';import{existsSync}from'fs';import a42_0x47b982 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}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x36a210 from'prompts';function getAttemptStatusDisplay(_0x194002){const _0xacdac4=a42_0x1b8c;if(!_0x194002)return{'icon':'⏳','text':''};const {done:_0x33634f,success:_0x3dcc11,cancelRequested:_0x4fc79d}=_0x194002;if(!_0x33634f)return _0x4fc79d?{'icon':'🛑','text':a42_0x5a0170[_0xacdac4(0xec)](_0xacdac4(0x1c9))}:{'icon':'🔄','text':a42_0x5a0170['blue']('running')};if(_0x3dcc11)return{'icon':'✅','text':a42_0x5a0170[_0xacdac4(0x12e)](_0xacdac4(0x231))};return{'icon':'❌','text':a42_0x5a0170[_0xacdac4(0x154)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a42_0xb2f7ca(0x1f2)](_0x52f5c4,_0x3aa1d4,_0x49d77a=0x0){const _0x508c43=a42_0xb2f7ca;return _0x52f5c4[_0x49d77a]||_0x3aa1d4[_0x508c43(0x1ea)];}['requireProject'](_0x33e941,_0x1978dd,_0x1e1524=0x0){const _0x41d4bb=a42_0xb2f7ca,_0x33fd1a=this[_0x41d4bb(0x1f2)](_0x33e941,_0x1978dd,_0x1e1524);if(!_0x33fd1a)return console['error'](a42_0x5a0170['red']('Error:'),_0x41d4bb(0x229)),console[_0x41d4bb(0x160)](a42_0x5a0170[_0x41d4bb(0xdd)](_0x41d4bb(0x1e3))),null;return _0x33fd1a;}[a42_0xb2f7ca(0x1d4)](_0x3fae82,_0xf14864){const _0x3a4bfe=a42_0xb2f7ca;if(_0x3fae82[0x0]){const _0x5e4bea=_0x3fae82[0x0][_0x3a4bfe(0xfa)]('.');if(_0x5e4bea[_0x3a4bfe(0xff)]===0x1)return{'projectName':_0x5e4bea[0x0],'workflowName':undefined};else return _0x5e4bea['length']===0x2?{'projectName':_0x5e4bea[0x0],'workflowName':_0x5e4bea[0x1]}:(console[_0x3a4bfe(0x160)](a42_0x5a0170['red']('Error:'),_0x3a4bfe(0x262)),null);}return{'projectName':_0xf14864[_0x3a4bfe(0x1ea)],'workflowName':undefined};}[a42_0xb2f7ca(0x21b)](_0x5690bb,_0x200ebd,_0xbe71f3=0x0){const _0x3d9c32=a42_0xb2f7ca;if(_0x5690bb[_0xbe71f3])return _0x5690bb[_0xbe71f3];if(_0x200ebd[_0x3d9c32(0x1ea)]){const _0x136aac=a42_0x47b982[_0x3d9c32(0x131)](process[_0x3d9c32(0x12c)](),_0x3d9c32(0x1bf),_0x200ebd[_0x3d9c32(0x1ea)]);if(existsSync(a42_0x47b982[_0x3d9c32(0x131)](_0x136aac,_0x3d9c32(0x13e))))return _0x136aac;}return undefined;}async[a42_0xb2f7ca(0x11f)](_0x86a8e5,_0x3b5d82,_0x496f3d){const _0xfbda57=a42_0xb2f7ca;try{const _0x1dd063=await _0x86a8e5[_0xfbda57(0xeb)][_0xfbda57(0x1bf)](_0x3b5d82,{'limit':0x1});if(_0x1dd063[_0xfbda57(0xff)]>0x0){const _0x31adb9=_0x1dd063[0x0]['id'],_0x3becd2=getWorkflowUrl(_0x496f3d,_0x31adb9);console[_0xfbda57(0x160)](_0xfbda57(0x21e)+a42_0x5a0170[_0xfbda57(0x169)](_0x3becd2));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a42_0xb2f7ca(0x273);[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0x25f);async[a42_0xb2f7ca(0xe6)](_0x1f3436){const _0x2b9c5a=a42_0xb2f7ca,{options:_0x541fc5,args:_0xd33b14,tdx:_0x5c7b6d}=_0x1f3436,_0x35fa59=_0xd33b14[0x0],_0x57a20a=_0x541fc5['clear'];if(_0x57a20a)return saveSessionContext({'workflow_project':undefined},_0x541fc5[_0x2b9c5a(0xce)]),console[_0x2b9c5a(0x1df)](a42_0x5a0170[_0x2b9c5a(0x12e)](_0x2b9c5a(0x1c2))),0x0;if(!_0x35fa59)return console[_0x2b9c5a(0x160)](a42_0x5a0170[_0x2b9c5a(0x154)](_0x2b9c5a(0x19a)),_0x2b9c5a(0x229)),console[_0x2b9c5a(0x160)](a42_0x5a0170['dim']('Usage:\x20tdx\x20wf\x20use\x20<project>')),console['error'](a42_0x5a0170['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x117f13=await withSpinner(_0x2b9c5a(0x189)+_0x35fa59+_0x2b9c5a(0xd3),()=>_0x5c7b6d[_0x2b9c5a(0xeb)][_0x2b9c5a(0x1fb)](_0x35fa59),{'verbose':_0x541fc5['verbose']}),{name:_0x4d4e4b}=_0x117f13[_0x2b9c5a(0x269)];return saveSessionContext({'workflow_project':_0x4d4e4b},_0x541fc5[_0x2b9c5a(0xce)]),console['log'](a42_0x5a0170[_0x2b9c5a(0x12e)](_0x2b9c5a(0x194)+a42_0x5a0170[_0x2b9c5a(0x169)](_0x4d4e4b))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x108);['description']=a42_0xb2f7ca(0x183);async['execute'](_0x25680b){const _0x3f607e=a42_0xb2f7ca,{options:_0x2e8312,args:_0x4db591,tdx:_0x4a2be6}=_0x25680b,_0x5d630c=_0x4db591[0x0];_0x2e8312['verbose']&&_0x5d630c&&console[_0x3f607e(0x160)](_0x3f607e(0x16b)+_0x5d630c);const _0x1d7b7b=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x4a2be6[_0x3f607e(0xeb)][_0x3f607e(0x245)](_0x5d630c,{'limit':_0x2e8312[_0x3f607e(0x14c)]}),{'verbose':_0x2e8312['verbose']});let _0x34481b=_0x1d7b7b[_0x3f607e(0x269)];_0x34481b[_0x3f607e(0x264)]((_0x218e2f,_0x5d8c1f)=>_0x218e2f['name'][_0x3f607e(0x1b5)](_0x5d8c1f[_0x3f607e(0x110)]));const _0x835831=_0x2e8312['limit']||0x64,_0x315aa9=_0x34481b[_0x3f607e(0xff)]>=_0x835831?a42_0x5a0170['dim'](_0x3f607e(0x107)):'';console[_0x3f607e(0x160)](_0x3f607e(0x212)+_0x34481b['length']+_0x3f607e(0x13f)+(_0x34481b[_0x3f607e(0xff)]!==0x1?'s':'')+_0x315aa9);if(_0x2e8312['format']==='json'||_0x2e8312[_0x3f607e(0x1ab)]===_0x3f607e(0x239)||_0x2e8312[_0x3f607e(0x1ab)]===_0x3f607e(0x274))await handleSDKOutput(_0x34481b,_0x2e8312);else{if(_0x34481b[_0x3f607e(0xff)]===0x0)_0x5d630c?console[_0x3f607e(0x1df)](_0x3f607e(0x23a)+_0x5d630c):console[_0x3f607e(0x1df)](_0x3f607e(0x1c5));else{const _0x207de3=_0x34481b['map'](_0x5bfee0=>{const _0x193a38=_0x3f607e,_0x1f2cb3=_0x5bfee0['metadata']?.[_0x193a38(0x123)](_0xb11df3=>_0xb11df3[_0x193a38(0x1f6)]===_0x193a38(0x162)),_0x11dea4=_0x1f2cb3?a42_0x5a0170[_0x193a38(0xdd)](_0x193a38(0x163)):'';return _0x193a38(0x179)+_0x5bfee0[_0x193a38(0x110)]+_0x11dea4;});await writeOutput(_0x207de3[_0x3f607e(0x131)]('\x0a'),_0x2e8312[_0x3f607e(0x1a9)],_0x3f607e(0x20b));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a42_0xb2f7ca(0x171);[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0x170);async[a42_0xb2f7ca(0xe6)](_0x927a6f){const _0x267e17=a42_0xb2f7ca,{options:_0x27c41e,args:_0x4033c7,tdx:_0x22877a}=_0x927a6f,_0x28ec94=this[_0x267e17(0x1f2)](_0x4033c7,_0x27c41e);_0x27c41e['verbose']&&_0x28ec94&&console[_0x267e17(0x160)](_0x267e17(0x1b2)+_0x28ec94);const _0x326568=await withSpinner('Listing\x20workflows...',()=>_0x22877a[_0x267e17(0xeb)][_0x267e17(0x1bf)](_0x28ec94,{'limit':_0x27c41e['limit']}),{'verbose':_0x27c41e[_0x267e17(0x26f)]});let _0x396fa=_0x326568['data'];_0x396fa[_0x267e17(0x264)]((_0x3d69e9,_0x371be3)=>{const _0x2ba66f=_0x267e17,_0x1a0a29=_0x3d69e9['name'][_0x2ba66f(0x1b5)](_0x371be3[_0x2ba66f(0x110)]);if(_0x1a0a29!==0x0)return _0x1a0a29;return(_0x3d69e9[_0x2ba66f(0x102)]?.['name']||'')[_0x2ba66f(0x1b5)](_0x371be3[_0x2ba66f(0x102)]?.[_0x2ba66f(0x110)]||'');});const _0x2da835=_0x27c41e['limit']||0x64,_0x5c7695=_0x396fa[_0x267e17(0xff)]>=_0x2da835?a42_0x5a0170[_0x267e17(0xdd)](_0x267e17(0x107)):'';console[_0x267e17(0x160)]('✔\x20Found\x20'+_0x396fa[_0x267e17(0xff)]+_0x267e17(0x168)+(_0x396fa[_0x267e17(0xff)]!==0x1?'s':'')+_0x5c7695);if(_0x27c41e['format']===_0x267e17(0x20d)||_0x27c41e['format']===_0x267e17(0x239)||_0x27c41e[_0x267e17(0x1ab)]===_0x267e17(0x274))await handleSDKOutput(_0x396fa,_0x27c41e);else{if(_0x396fa[_0x267e17(0xff)]===0x0)_0x28ec94?console[_0x267e17(0x1df)](_0x267e17(0xf3)+_0x28ec94):console[_0x267e17(0x1df)](_0x267e17(0x1af));else{const _0x42fd29=_0x27c41e[_0x267e17(0x156)],_0xb6ab34=_0x396fa[_0x267e17(0x260)](_0x353692=>{const _0x891600=_0x267e17,_0x51718a=a42_0x5a0170[_0x891600(0xdd)]('#'+_0x353692['id']),_0x55957e=hyperlink(_0x51718a,getWorkflowUrl(_0x42fd29,_0x353692['id'])),_0x44395e=_0x353692[_0x891600(0x102)]?.[_0x891600(0x110)]?a42_0x5a0170[_0x891600(0xdd)]('\x20('+_0x353692[_0x891600(0x102)][_0x891600(0x110)]+')'):'';return _0x891600(0x128)+_0x55957e+'\x20'+_0x353692[_0x891600(0x110)]+_0x44395e;});await writeOutput(_0xb6ab34[_0x267e17(0x131)]('\x0a'),_0x27c41e[_0x267e17(0x1a9)],_0x267e17(0x20b));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']='workflow:sessions';['description']=a42_0xb2f7ca(0x278);async['execute'](_0x52c3c0){const _0x340f9e=a42_0xb2f7ca,{options:_0x1f624c,args:_0x533006,tdx:_0x120ddf}=_0x52c3c0,_0x2117b5=this[_0x340f9e(0x1d4)](_0x533006,_0x1f624c);if(!_0x2117b5)return 0x1;const {projectName:_0x19551e,workflowName:_0x50cb1d}=_0x2117b5;if(_0x1f624c[_0x340f9e(0x26f)]){if(_0x19551e&&_0x50cb1d)console[_0x340f9e(0x160)]('Filter:\x20'+_0x19551e+'.'+_0x50cb1d);else _0x19551e&&console[_0x340f9e(0x160)](_0x340f9e(0x258)+_0x19551e);const _0x406b73=_0x1f624c[_0x340f9e(0x136)];_0x406b73&&console[_0x340f9e(0x160)](_0x340f9e(0x147)+_0x406b73);}let _0x55849b=0x28;if(process[_0x340f9e(0xf2)]['isTTY']&&!_0x1f624c[_0x340f9e(0x1a9)]&&!_0x1f624c[_0x340f9e(0x1ab)]){const _0x5698ec=process[_0x340f9e(0xf2)]['rows']||0x28;_0x55849b=Math[_0x340f9e(0x1d8)](0x14,Math['floor'](_0x5698ec*0x2/0x3));}const _0x4c88a1=_0x1f624c[_0x340f9e(0x14c)]||_0x55849b,_0x1ec557=await withSpinner(_0x340f9e(0xf0),()=>_0x120ddf['workflow'][_0x340f9e(0x1db)]({'projectName':_0x19551e,'workflowName':_0x50cb1d,'status':_0x1f624c['status'],'fromTime':_0x1f624c[_0x340f9e(0x159)],'toTime':_0x1f624c['to'],'limit':_0x4c88a1}),{'verbose':_0x1f624c[_0x340f9e(0x26f)]}),_0x53d372=_0x1ec557['data'];_0x53d372[_0x340f9e(0x264)]((_0x336462,_0x4e31f5)=>{const _0x27dae3=_0x340f9e,_0xfc590c=_0x336462['sessionTime']||'',_0x2fa9f4=_0x4e31f5[_0x27dae3(0x1ba)]||'';return _0x2fa9f4['localeCompare'](_0xfc590c);});_0x53d372['length']>=_0x4c88a1?console['error'](_0x340f9e(0x22c)+_0x53d372[_0x340f9e(0xff)]+'\x20sessions\x20'+a42_0x5a0170[_0x340f9e(0xdd)](_0x340f9e(0xf9))):console['error']('✔\x20Found\x20'+_0x53d372[_0x340f9e(0xff)]+_0x340f9e(0x1d1)+(_0x53d372[_0x340f9e(0xff)]!==0x1?'s':''));if(_0x1f624c[_0x340f9e(0x1ab)]===_0x340f9e(0x20d)||_0x1f624c['format']===_0x340f9e(0x239)||_0x1f624c['format']==='table')await handleSDKOutput(_0x53d372,_0x1f624c);else{if(!process[_0x340f9e(0xf2)][_0x340f9e(0x1f9)]||_0x1f624c['output']){if(_0x53d372[_0x340f9e(0xff)]===0x0){if(_0x19551e&&_0x50cb1d)console[_0x340f9e(0x1df)]('No\x20sessions\x20found\x20for:\x20'+_0x19551e+'.'+_0x50cb1d);else _0x19551e?console['log'](_0x340f9e(0x1a1)+_0x19551e):console[_0x340f9e(0x1df)](_0x340f9e(0x141));}else{const _0x241555=_0x1f624c[_0x340f9e(0x156)],_0x496aaf=this[_0x340f9e(0x145)](_0x53d372,_0x241555);_0x1f624c[_0x340f9e(0x1a9)]?await writeOutput(_0x496aaf,_0x1f624c[_0x340f9e(0x1a9)],'list'):console['log'](_0x496aaf);}!_0x19551e&&(console[_0x340f9e(0x160)](''),console[_0x340f9e(0x160)](a42_0x5a0170[_0x340f9e(0xdd)](_0x340f9e(0x1bb))),console[_0x340f9e(0x160)](a42_0x5a0170[_0x340f9e(0xdd)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0x5a0170[_0x340f9e(0xdd)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x53d372['length']===0x0){if(_0x19551e&&_0x50cb1d)console[_0x340f9e(0x1df)](_0x340f9e(0xda)+_0x19551e+'.'+_0x50cb1d);else _0x19551e?console[_0x340f9e(0x1df)](_0x340f9e(0x1a1)+_0x19551e):console[_0x340f9e(0x1df)]('No\x20sessions\x20found');}else await this[_0x340f9e(0x15c)](_0x53d372,_0x52c3c0,_0x19551e);}}return 0x0;}[a42_0xb2f7ca(0x145)](_0x51618d,_0x1b3aa){const _0x51dc3d=a42_0xb2f7ca,_0x301672=[],_0x46db3e=new Map();let _0x466f93=Infinity,_0x565ed4=-Infinity;for(const _0x576cb6 of _0x51618d){if(_0x576cb6[_0x51dc3d(0x16a)]?.['createdAt']){const _0xbe53ed=new Date(_0x576cb6[_0x51dc3d(0x16a)]['createdAt'])['getTime'](),_0x4dacd6=_0x576cb6[_0x51dc3d(0x16a)]['finishedAt']?new Date(_0x576cb6[_0x51dc3d(0x16a)]['finishedAt'])[_0x51dc3d(0x180)]():Date['now'](),_0x10d1cc=_0x576cb6[_0x51dc3d(0x102)]?.['name']||'(unknown)';!_0x46db3e[_0x51dc3d(0x240)](_0x10d1cc)&&_0x46db3e[_0x51dc3d(0x23c)](_0x10d1cc,[]),_0x46db3e[_0x51dc3d(0x277)](_0x10d1cc)[_0x51dc3d(0x1a2)]({'session':_0x576cb6,'startTime':_0xbe53ed,'endTime':_0x4dacd6,'duration':_0x4dacd6-_0xbe53ed}),_0x466f93=Math[_0x51dc3d(0x1e2)](_0x466f93,_0xbe53ed),_0x565ed4=Math['max'](_0x565ed4,_0x4dacd6);}}if(_0x46db3e[_0x51dc3d(0x1ac)]===0x0)return _0x51dc3d(0x151);const _0x5ceac6=process[_0x51dc3d(0xf2)][_0x51dc3d(0x1d0)]||0x78,_0x2126ad=0x1e,_0x50e55d=0x32,_0x214ca0=0x4,_0x3bcdbc=Math['min'](_0x50e55d,Math[_0x51dc3d(0x1d8)](_0x2126ad,Math['floor'](_0x5ceac6*0.3))),_0x14dcc5=_0x5ceac6-_0x3bcdbc-TIMELINE_CONFIG[_0x51dc3d(0x114)]-0x3-_0x214ca0,_0xc9cd69=_0x565ed4-_0x466f93,_0x4bc4fd=_0xc9cd69/_0x3bcdbc,_0x47fcee=renderTimeAxis({'startTime':_0x466f93,'endTime':_0x565ed4,'durationMs':_0xc9cd69,'msPerChar':_0x4bc4fd},_0x3bcdbc),_0x243c5e=[];for(const _0x51c899 of _0x46db3e[_0x51dc3d(0x219)]()){_0x243c5e[_0x51dc3d(0x1a2)](..._0x51c899);}_0x243c5e['sort']((_0x3c9bca,_0x5f1dba)=>_0x5f1dba[_0x51dc3d(0xe4)]-_0x3c9bca[_0x51dc3d(0xe4)]);const _0x4cfc67=new Date(_0x466f93),_0x5561c5=formatDate(_0x4cfc67),_0x2514ad=_0x214ca0+TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x51dc3d(0x1da)]+_0x14dcc5,_0x37f9cc='\x20'['repeat'](_0x2514ad-_0x5561c5[_0x51dc3d(0xff)]),_0x4bfd7e=_0x37f9cc+a42_0x5a0170[_0x51dc3d(0xdd)](_0x5561c5)+'\x20'+_0x47fcee;_0x301672[_0x51dc3d(0x1a2)](_0x4bfd7e);const _0x1b221e=0x16;let _0x1f9ea5=0x0;for(const _0x16f80e of _0x243c5e){const _0x509c5a=_0x16f80e[_0x51dc3d(0xce)][_0x51dc3d(0x102)]?.[_0x51dc3d(0x110)]||'?',_0x5e27ab=Math['min'](stringWidth(_0x509c5a),_0x1b221e);_0x1f9ea5=Math[_0x51dc3d(0x1d8)](_0x1f9ea5,_0x5e27ab);}for(const _0x156a3e of _0x243c5e){const {session:_0x51100c,startTime:_0x22b48d,endTime:_0x4099d5,duration:_0x41c452}=_0x156a3e,_0x71d140=_0x51100c[_0x51dc3d(0x102)]?.['id'],_0x30dd6c=_0x51100c['id'],_0x596c2b=_0x51100c['project']?.[_0x51dc3d(0x110)]||'?',_0xea95d5=_0x51100c['workflow']?.['name']||'?';let _0x3458fa,_0x5b7f96;if(_0x51100c[_0x51dc3d(0x16a)]){const _0xbbe2fb=_0x51100c[_0x51dc3d(0x16a)];!_0xbbe2fb[_0x51dc3d(0x24e)]?(_0x3458fa=_0xbbe2fb[_0x51dc3d(0x11c)]?'🛑':'🔄',_0x5b7f96=_0xbbe2fb[_0x51dc3d(0x11c)]?a42_0x5a0170[_0x51dc3d(0xec)]:a42_0x5a0170[_0x51dc3d(0x1cc)]):(_0x3458fa=_0xbbe2fb[_0x51dc3d(0x231)]?'✅':'❌',_0x5b7f96=_0xbbe2fb[_0x51dc3d(0x231)]?a42_0x5a0170[_0x51dc3d(0x12e)]:a42_0x5a0170['red']);}else _0x3458fa='⏳',_0x5b7f96=a42_0x5a0170['dim'];const _0x583959='#'+_0x30dd6c,_0x434389=_0x71d140?hyperlink(_0x583959,getWorkflowSessionUrl(_0x1b3aa,_0x71d140,_0x30dd6c)):_0x583959;let _0x4754b8=_0x596c2b;stringWidth(_0x596c2b)>_0x1b221e&&(_0x4754b8=_0x596c2b['slice'](0x0,_0x1b221e-0x1)+'…');const _0x2da12e=a42_0x5a0170[_0x51dc3d(0xdd)](_0x4754b8),_0x30513c=stringWidth(_0x4754b8),_0x1cce41='\x20'['repeat'](_0x1f9ea5-stringWidth(_0x4754b8)+0x2),_0x35bbb2='('+formatElapsed(_0x41c452)+')',_0x31f357=stringWidth(_0x35bbb2),_0x3e0afb=stringWidth(_0x583959),_0x120866=_0x3e0afb+0x1+_0x30513c+_0x1cce41[_0x51dc3d(0xff)],_0x37976f=_0x14dcc5-_0x120866-_0x31f357-0x1-0x8;let _0x70fda6=_0xea95d5;stringWidth(_0x70fda6)>_0x37976f&&(_0x70fda6=_0x70fda6[_0x51dc3d(0x1fe)](0x0,_0x37976f-0x1)+'…');const _0x418a01=_0x434389+'\x20'+_0x2da12e+_0x1cce41+_0x70fda6,_0xaed5b4=stringWidth(_0x418a01),_0x1e13c0=_0x14dcc5-_0xaed5b4-_0x31f357,_0x450cd5=_0x418a01+'\x20'[_0x51dc3d(0x10a)](Math[_0x51dc3d(0x1d8)](0x1,_0x1e13c0))+a42_0x5a0170[_0x51dc3d(0xdd)](_0x35bbb2),_0x500e13=Math['floor']((_0x22b48d-_0x466f93)/_0x4bc4fd),_0x5a84c6=Math[_0x51dc3d(0x140)]((_0x4099d5-_0x466f93)/_0x4bc4fd),_0x5031b3=Math[_0x51dc3d(0x1d8)](_0x500e13+0x1,_0x5a84c6),_0xf51639=new Array(_0x3bcdbc)[_0x51dc3d(0x190)]('\x20');for(let _0x2c66f5=_0x500e13;_0x2c66f5<Math[_0x51dc3d(0x1e2)](_0x5031b3,_0x3bcdbc);_0x2c66f5++){_0xf51639[_0x2c66f5]='─';}const _0x16045b=_0xf51639[_0x51dc3d(0x260)](_0xa8d83=>_0xa8d83==='\x20'?'\x20':_0x5b7f96(_0xa8d83))[_0x51dc3d(0x131)]('');_0x301672[_0x51dc3d(0x1a2)](_0x3458fa+'\x20'+_0x450cd5+'│'+_0x16045b+'│');}return _0x301672[_0x51dc3d(0x131)]('\x0a');}async[a42_0xb2f7ca(0x15c)](_0x1a3db1,_0x246d36,_0x287e7a){const _0x4f3be4=a42_0xb2f7ca,{options:_0x1e1379,tdx:_0x52a525}=_0x246d36,_0x1e5ce8=_0x1e1379[_0x4f3be4(0x156)],{timelineRows:_0xe96457,timeAxisHeader:_0x412d0b}=this[_0x4f3be4(0x263)](_0x1a3db1,_0x1e5ce8),_0x329226=_0xe96457[_0x4f3be4(0x226)](_0x291365=>_0x291365[_0x4f3be4(0x1c0)]);if(_0x329226[_0x4f3be4(0xff)]===0x0){const _0x522f03=this[_0x4f3be4(0x145)](_0x1a3db1,_0x1e5ce8);console[_0x4f3be4(0x1df)](_0x522f03);!_0x287e7a&&(console[_0x4f3be4(0x160)](''),console[_0x4f3be4(0x160)](a42_0x5a0170[_0x4f3be4(0xdd)](_0x4f3be4(0x1bb))),console['error'](a42_0x5a0170['dim'](_0x4f3be4(0x1f4))+'or'+a42_0x5a0170['dim'](_0x4f3be4(0xd5))));return;}_0x412d0b&&console['log'](_0x412d0b);const _0x3feea9=_0xe96457['filter'](_0x3a7c64=>_0x3a7c64[_0x4f3be4(0x1c0)])[_0x4f3be4(0x260)](_0xa5669a=>({'title':_0xa5669a['displayLine'],'value':_0xa5669a[_0x4f3be4(0x1c0)]})),_0x5227c1=process[_0x4f3be4(0xf2)][_0x4f3be4(0x19b)]||0x3c,_0x1d8953=Math[_0x4f3be4(0x1d8)](0x28,Math[_0x4f3be4(0x140)](_0x5227c1*0x2/0x3)),_0x35474f=await a42_0x36a210({'type':'autocomplete','name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x3feea9,'initial':-0x1,'limit':_0x1d8953,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x2c3f80,_0x1727ff)=>{const _0x2ca11e=_0x4f3be4;if(!_0x2c3f80)return Promise['resolve'](_0x1727ff);const _0x23d1e4=_0x1727ff[_0x2ca11e(0x226)](_0x4492b0=>{const _0x150a71=_0x2ca11e,_0xe63617=_0x4492b0;return _0xe63617['title'][_0x150a71(0x13b)]()[_0x150a71(0x18b)](_0x2c3f80[_0x150a71(0x13b)]());});return Promise[_0x2ca11e(0x13c)](_0x23d1e4);}}),_0x29646d=()=>{const _0x2de7dd=_0x4f3be4;process['stdout'][_0x2de7dd(0x146)]('\x1b[1A\x1b[2K'),process[_0x2de7dd(0xf2)][_0x2de7dd(0x146)](_0x2de7dd(0xcf)),process[_0x2de7dd(0xf2)][_0x2de7dd(0x146)](_0x2de7dd(0xcf));},_0x546fae=_0x35474f&&_0x35474f['attemptId']&&_0x35474f[_0x4f3be4(0x1c0)]!==null&&_0x35474f[_0x4f3be4(0x1c0)][_0x4f3be4(0x221)]()!=='';if(!_0x546fae){_0x29646d(),console['log'](a42_0x5a0170[_0x4f3be4(0xdd)](_0x4f3be4(0x15f)));return;}_0x29646d();const _0x167bba=_0x1a3db1[_0x4f3be4(0x143)](_0x410d5f=>_0x410d5f['lastAttempt']?.['id']===_0x35474f[_0x4f3be4(0x1c0)]);if(_0x167bba){const _0x6bb1b5=_0x167bba[_0x4f3be4(0x102)]?.[_0x4f3be4(0x110)]||'?',_0x430364=_0x167bba[_0x4f3be4(0xeb)]?.[_0x4f3be4(0x110)]||'?';console[_0x4f3be4(0x1df)](_0x4f3be4(0x1e7)+a42_0x5a0170[_0x4f3be4(0xdd)](_0x6bb1b5)+_0x4f3be4(0x1e0)+a42_0x5a0170[_0x4f3be4(0xdd)](_0x430364));}const _0x4c897b=new WorkflowTimelineCommand();await _0x4c897b[_0x4f3be4(0xe6)]({'args':[],'options':{..._0x1e1379,'attemptId':_0x35474f[_0x4f3be4(0x1c0)]},'tdx':_0x52a525});}['generateSessionTimelineRows'](_0x1a2c63,_0x5d06a0){const _0x3b255b=a42_0xb2f7ca,_0x2a5901=new Map();for(const _0xe2af4a of _0x1a2c63){_0xe2af4a['id']&&_0xe2af4a[_0x3b255b(0x16a)]?.['id']&&_0x2a5901['set'](_0xe2af4a['id'],_0xe2af4a[_0x3b255b(0x16a)]['id']);}const _0x997811=[];let _0x1d1af3='';const _0x19b768=this[_0x3b255b(0x145)](_0x1a2c63,_0x5d06a0),_0x284025=_0x19b768['split']('\x0a');for(const _0x4496c6 of _0x284025){if(_0x4496c6[_0x3b255b(0x268)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x4496c6[_0x3b255b(0x265)](/^\s+\d{4}-\d{2}-\d{2}/))_0x1d1af3=_0x4496c6;else{if(_0x4496c6[_0x3b255b(0x265)](/^[✅❌🔄🛑⏳]/)){const _0x2e9843=_0x4496c6[_0x3b255b(0x265)](/#(\d+)/),_0xa42417=_0x2e9843?_0x2e9843[0x1]:null,_0x4fedcd=_0xa42417?_0x2a5901[_0x3b255b(0x277)](_0xa42417)||null:null,_0x1034d3=_0x1a2c63['find'](_0x33b78c=>_0x33b78c['id']===_0xa42417),_0x3bcbc7=_0x1034d3?.[_0x3b255b(0x102)]?.[_0x3b255b(0x110)]||'';_0x997811[_0x3b255b(0x1a2)]({'displayLine':_0x4496c6,'attemptId':_0x4fedcd,'projectName':_0x3bcbc7});}}}return{'timelineRows':_0x997811,'timeAxisHeader':_0x1d1af3};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x1ae);['description']=a42_0xb2f7ca(0x105);async[a42_0xb2f7ca(0xe6)](_0x2a24a6){const _0x4f668f=a42_0xb2f7ca,{options:_0x111192,args:_0x4a337b,tdx:_0x48b7b0}=_0x2a24a6,_0x3baa64=this[_0x4f668f(0x1d4)](_0x4a337b,_0x111192);if(!_0x3baa64)return 0x1;const {projectName:_0xb071bc,workflowName:_0x2953f4}=_0x3baa64,_0x3c997c=_0x111192[_0x4f668f(0x1cf)];if(_0x111192[_0x4f668f(0x26f)]){if(_0xb071bc&&_0x2953f4)console[_0x4f668f(0x160)](_0x4f668f(0x22d)+_0xb071bc+'.'+_0x2953f4);else _0xb071bc&&console['error'](_0x4f668f(0x258)+_0xb071bc);_0x3c997c&&console[_0x4f668f(0x160)](_0x4f668f(0x21f));}const _0xddfb0a=await withSpinner(_0x4f668f(0x14a),()=>_0x48b7b0['workflow']['attempts']({'projectName':_0xb071bc,'workflowName':_0x2953f4,'includeRetried':_0x3c997c,'limit':_0x111192[_0x4f668f(0x14c)]}),{'verbose':_0x111192[_0x4f668f(0x26f)]}),_0x51a598=_0xddfb0a[_0x4f668f(0x269)],_0x532e16=_0x111192[_0x4f668f(0x14c)]||0x64,_0x4a57f2=_0x51a598['length']>=_0x532e16?a42_0x5a0170[_0x4f668f(0xdd)](_0x4f668f(0x107)):'';console['error'](_0x4f668f(0x212)+_0x51a598[_0x4f668f(0xff)]+'\x20attempt'+(_0x51a598['length']!==0x1?'s':'')+_0x4a57f2);if(_0x111192['format']===_0x4f668f(0x20d)||_0x111192['format']===_0x4f668f(0x239)||_0x111192['format']==='table')await handleSDKOutput(_0x51a598,_0x111192);else{if(_0x51a598['length']===0x0){if(_0xb071bc&&_0x2953f4)console[_0x4f668f(0x1df)](_0x4f668f(0x1b9)+_0xb071bc+'.'+_0x2953f4);else _0xb071bc?console[_0x4f668f(0x1df)](_0x4f668f(0x10d)+_0xb071bc):console[_0x4f668f(0x1df)]('No\x20attempts\x20found');}else{const _0x10b176=_0x111192[_0x4f668f(0x156)],_0x49cec0=_0x51a598[_0x4f668f(0x260)](_0x1e894c=>{const _0x121c31=_0x4f668f,_0x50bbd5=a42_0x5a0170[_0x121c31(0xdd)]('#'+_0x1e894c['id']),_0x148036=_0x1e894c['project']?.['id'],_0xc9f1de=_0x1e894c[_0x121c31(0x174)]||_0x1e894c[_0x121c31(0xf4)],_0x4f4b92=_0x148036&&_0xc9f1de?hyperlink(_0x50bbd5,getWorkflowAttemptUrl(_0x10b176,_0x148036,_0xc9f1de,_0x1e894c['id'])):_0x50bbd5,{icon:_0x514ede,text:_0x5e0243}=getAttemptStatusDisplay(_0x1e894c),_0x40af69=(_0x1e894c[_0x121c31(0x102)]?.[_0x121c31(0x110)]||'?')+'.'+(_0x1e894c[_0x121c31(0xeb)]?.[_0x121c31(0x110)]||'?'),_0x574bbb=_0x1e894c['sessionTime']?a42_0x5a0170[_0x121c31(0xdd)](_0x1e894c[_0x121c31(0x1ba)]):'';return(_0x4f4b92+'\x20'+_0x514ede+(_0x5e0243?'\x20'+_0x5e0243:'')+'\x20'+_0x40af69+'\x20'+_0x574bbb)[_0x121c31(0xde)]();});await writeOutput(_0x49cec0[_0x4f668f(0x131)]('\x0a'),_0x111192[_0x4f668f(0x1a9)],_0x4f668f(0x20b));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x218);[a42_0xb2f7ca(0xe8)]='Show\x20specific\x20attempt\x20details';async[a42_0xb2f7ca(0xe6)](_0x45312f){const _0x4bac0c=a42_0xb2f7ca,{options:_0x550690,args:_0xe1b405,tdx:_0x355a13}=_0x45312f,_0x2152fb=_0xe1b405[0x0];if(!_0x2152fb)return console[_0x4bac0c(0x160)](_0x4bac0c(0x1c3)),0x1;_0x550690['verbose']&&console[_0x4bac0c(0x160)](_0x4bac0c(0x1dd)+_0x2152fb);const _0x221c3a=await withSpinner(_0x4bac0c(0x195),()=>_0x355a13['workflow']['attempt'](_0x2152fb),{'verbose':_0x550690[_0x4bac0c(0x26f)]}),_0x5c985d=_0x221c3a[_0x4bac0c(0x269)];let _0x53a832;!_0x5c985d['done']?_0x53a832=_0x5c985d[_0x4bac0c(0x11c)]?_0x4bac0c(0x1c9):_0x4bac0c(0x227):_0x53a832=_0x5c985d[_0x4bac0c(0x231)]?_0x4bac0c(0x231):_0x4bac0c(0x160);let _0x1644f8;if(_0x5c985d['createdAt']&&_0x5c985d[_0x4bac0c(0x1bc)]){const _0x306601=new Date(_0x5c985d[_0x4bac0c(0xdf)])[_0x4bac0c(0x180)](),_0xbbb37f=new Date(_0x5c985d[_0x4bac0c(0x1bc)])['getTime']();_0x1644f8=Math[_0x4bac0c(0x215)]((_0xbbb37f-_0x306601)/0x3e8);}const _0x3ffac6={'attempt_id':_0x5c985d['id'],'status':_0x53a832,..._0x5c985d['index']!==undefined&&{'index':_0x5c985d[_0x4bac0c(0x1f1)]},..._0x5c985d[_0x4bac0c(0x102)]&&{'project':_0x5c985d[_0x4bac0c(0x102)][_0x4bac0c(0x110)]},..._0x5c985d[_0x4bac0c(0xeb)]&&{'workflow':_0x5c985d[_0x4bac0c(0xeb)][_0x4bac0c(0x110)]},..._0x5c985d['sessionId']&&{'session_id':_0x5c985d[_0x4bac0c(0xf4)]},..._0x5c985d['sessionTime']&&{'session_time':_0x5c985d[_0x4bac0c(0x1ba)]},..._0x5c985d['retryAttemptName']&&{'retry_attempt':_0x5c985d[_0x4bac0c(0x153)]},..._0x1644f8!==undefined&&{'duration_sec':_0x1644f8},..._0x5c985d['createdAt']&&{'created_at':_0x5c985d['createdAt']},..._0x5c985d[_0x4bac0c(0x1bc)]&&{'finished_at':_0x5c985d[_0x4bac0c(0x1bc)]},...Object['keys'](_0x5c985d['params'])['length']>0x0&&{'params':_0x5c985d['params']}};return await handleSingleObjectOutput(_0x3ffac6,_0x550690),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a42_0xb2f7ca(0x130);[a42_0xb2f7ca(0xe8)]='Show\x20tasks\x20for\x20an\x20attempt';async[a42_0xb2f7ca(0xe6)](_0x49591d){const _0x103c45=a42_0xb2f7ca,{options:_0x9fc315,args:_0x19c193,tdx:_0x56dc47}=_0x49591d,_0x3965f3=_0x19c193[0x0];if(!_0x3965f3)return console[_0x103c45(0x160)](_0x103c45(0x1c3)),0x1;const _0x581185=_0x9fc315[_0x103c45(0xf6)];_0x9fc315[_0x103c45(0x26f)]&&(console[_0x103c45(0x160)](_0x103c45(0x1dd)+_0x3965f3),_0x581185&&console[_0x103c45(0x160)](_0x103c45(0x1d3)));const _0x53db38=await withSpinner(_0x103c45(0x23b),()=>_0x56dc47['workflow'][_0x103c45(0x254)](_0x3965f3,_0x581185||![]),{'verbose':_0x9fc315[_0x103c45(0x26f)]}),_0x5670d8=_0x53db38[_0x103c45(0x269)];return console['error'](_0x103c45(0x212)+_0x5670d8['length']+_0x103c45(0x1e4)+(_0x5670d8[_0x103c45(0xff)]!==0x1?'s':'')),await handleSDKOutput(_0x5670d8,_0x9fc315),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x10f);[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0x1ed);async[a42_0xb2f7ca(0xe6)](_0x16b784){const _0x4d1f03=a42_0xb2f7ca,{options:_0x576f9b,args:_0x16021d,tdx:_0x3289fb}=_0x16b784,_0x39b9d8=_0x16021d[0x0];let _0x30bf01=_0x16021d[0x1];if(!_0x39b9d8)return console[_0x4d1f03(0x160)](_0x4d1f03(0x1c3)),0x1;_0x576f9b['verbose']&&(console['error'](_0x4d1f03(0x1dd)+_0x39b9d8),_0x30bf01&&console[_0x4d1f03(0x160)](_0x4d1f03(0x164)+_0x30bf01));const _0x3855d9=await withSpinner(_0x4d1f03(0x135),()=>_0x3289fb[_0x4d1f03(0xeb)][_0x4d1f03(0x1b6)](_0x39b9d8,_0x30bf01),{'verbose':_0x576f9b[_0x4d1f03(0x26f)]}),_0x309001=_0x3855d9[_0x4d1f03(0x269)];if(_0x309001[_0x4d1f03(0xff)]===0x0)return console['error'](_0x4d1f03(0x16d)),0x0;if(!_0x30bf01&&(_0x576f9b[_0x4d1f03(0x20d)]||_0x576f9b[_0x4d1f03(0x1ab)]))return await handleSDKOutput(_0x309001,_0x576f9b),0x0;if(!_0x30bf01){const _0x3887ba=_0x309001[_0x4d1f03(0x260)](_0x5ca821=>({'title':_0x5ca821['taskName']+'\x20('+formatBytes(_0x5ca821[_0x4d1f03(0xf8)])+')','value':_0x5ca821[_0x4d1f03(0x175)]})),_0x26faac=await a42_0x36a210({'type':'select','name':_0x4d1f03(0x17a),'message':_0x4d1f03(0x116),'choices':_0x3887ba});if(!_0x26faac['task'])return console[_0x4d1f03(0x160)](_0x4d1f03(0x15f)),0x0;_0x30bf01=_0x26faac[_0x4d1f03(0x17a)];}const _0x424e58=await withSpinner(_0x4d1f03(0x181),()=>_0x3289fb['workflow']['logs'](_0x39b9d8,_0x30bf01),{'verbose':_0x576f9b[_0x4d1f03(0x26f)]}),_0x51d288=_0x424e58[_0x4d1f03(0x269)];return _0x51d288?console[_0x4d1f03(0x1df)](_0x51d288):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x192);[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0x1a8);async[a42_0xb2f7ca(0xe6)](_0x2856c4){const _0x27aa0d=a42_0xb2f7ca,{options:_0x452706,args:_0x10ccc2,tdx:_0x76bfb1}=_0x2856c4,_0x3ced1b=_0x10ccc2[0x0];if(!_0x3ced1b)return console[_0x27aa0d(0x160)](_0x27aa0d(0x1c3)),0x1;const _0x3a9287=_0x452706['reason'];_0x452706[_0x27aa0d(0x26f)]&&(console[_0x27aa0d(0x160)]('Attempt\x20ID:\x20'+_0x3ced1b),_0x3a9287&&console['error'](_0x27aa0d(0x1ad)+_0x3a9287));if(!_0x452706[_0x27aa0d(0x17c)]){const _0x29bd60=await confirmKey(_0x27aa0d(0x106)+_0x3ced1b+'?');if(!_0x29bd60)return console[_0x27aa0d(0x160)](_0x27aa0d(0x15f)),0x0;}const _0x5ee07d=await withSpinner(_0x27aa0d(0x120),()=>_0x76bfb1[_0x27aa0d(0xeb)][_0x27aa0d(0x122)](_0x3ced1b,_0x3a9287),{'verbose':_0x452706['verbose']}),_0x1841cf=_0x5ee07d[_0x27aa0d(0x269)];return console[_0x27aa0d(0x160)]('✔\x20'+_0x1841cf),0x0;}}function a42_0x1b8c(_0x14c6c4,_0x57fc80){_0x14c6c4=_0x14c6c4-0xcd;const _0xee86bb=a42_0xee86();let _0x1b8cdf=_0xee86bb[_0x14c6c4];return _0x1b8cdf;}export class WorkflowRetryCommand extends BaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x271);[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0xd6);async['execute'](_0x184908){const _0x54b33=a42_0xb2f7ca,{options:_0x23e597,args:_0x1b0b4a,tdx:_0x4d8763}=_0x184908,_0x5608b0=_0x1b0b4a[0x0];if(!_0x5608b0)return console[_0x54b33(0x160)](_0x54b33(0x243)),console[_0x54b33(0x160)](_0x54b33(0x124)),0x1;let _0x4e02f9=![],_0xcb6254=_0x5608b0;if(_0x5608b0[_0x54b33(0x268)]('session:'))_0x4e02f9=!![],_0xcb6254=_0x5608b0[_0x54b33(0xf5)](0x8);else{if(_0x5608b0['startsWith'](_0x54b33(0x21d)))_0x4e02f9=![],_0xcb6254=_0x5608b0[_0x54b33(0xf5)](0x8);else return console[_0x54b33(0x160)](_0x54b33(0x1c8)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x3af216=_0x23e597[_0x54b33(0x267)],_0x1a6b90=_0x23e597[_0x54b33(0xd9)],_0x4af23e=_0x23e597[_0x54b33(0x142)],_0x396380=_0x23e597[_0x54b33(0x150)];_0x23e597[_0x54b33(0x26f)]&&(console[_0x54b33(0x160)](_0x54b33(0x144)+(_0x4e02f9?_0x54b33(0xce):'attempt')+'\x20'+_0xcb6254),_0x3af216&&console[_0x54b33(0x160)]('From\x20task:\x20'+_0x3af216),_0x1a6b90&&console[_0x54b33(0x160)](_0x54b33(0x26c)+_0x1a6b90),_0x4af23e&&console[_0x54b33(0x160)]('Params:\x20'+_0x4af23e),_0x396380&&console[_0x54b33(0x160)](_0x54b33(0x1c1)));let _0x369b92;if(_0x4af23e)try{if(_0x4af23e['startsWith']('@')){const _0x17e0af=await import(_0x54b33(0x242)),_0x964ba0=_0x4af23e['substring'](0x1),_0x5b6935=await _0x17e0af[_0x54b33(0x248)](_0x964ba0,_0x54b33(0x126));_0x369b92=JSON[_0x54b33(0xd8)](_0x5b6935);}else _0x369b92=JSON[_0x54b33(0xd8)](_0x4af23e);}catch{return console[_0x54b33(0x160)](_0x54b33(0x1a5)),0x1;}if(!_0x23e597[_0x54b33(0x17c)]){const _0x2de01d=await confirmKey(_0x54b33(0x12f)+(_0x4e02f9?_0x54b33(0xce):_0x54b33(0xf7))+'\x20'+_0xcb6254+'?');if(!_0x2de01d)return console[_0x54b33(0x160)](_0x54b33(0x15f)),0x0;}let _0x3caefc;_0x4e02f9?_0x3caefc=await withSpinner('Retrying\x20session...',()=>_0x4d8763[_0x54b33(0xeb)][_0x54b33(0x178)](_0xcb6254,{'fromTask':_0x3af216,'retryParams':_0x369b92}),{'verbose':_0x23e597[_0x54b33(0x26f)]}):_0x3caefc=await withSpinner(_0x54b33(0xdc),()=>_0x4d8763[_0x54b33(0xeb)][_0x54b33(0x201)](_0xcb6254,{'resumeFrom':_0x1a6b90,'retryParams':_0x369b92,'force':_0x396380}),{'verbose':_0x23e597[_0x54b33(0x26f)]});const _0x1dcdf7=_0x3caefc[_0x54b33(0x269)];return console['error'](_0x54b33(0x22f)),console[_0x54b33(0x160)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x1dcdf7[_0x54b33(0x1c0)]),console['error'](_0x54b33(0x252)+_0x1dcdf7[_0x54b33(0xf4)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']='workflow:run';['description']=a42_0xb2f7ca(0x187);async[a42_0xb2f7ca(0xe6)](_0xfdd0b4){const _0x460341=a42_0xb2f7ca,{options:_0x1beda6,args:_0x51cb35,tdx:_0x349fd1}=_0xfdd0b4;let _0x2f7b15=_0x51cb35[0x0];if(!_0x2f7b15){const _0x262834=this[_0x460341(0x1f2)]([],_0x1beda6),_0x19ffe3=await withSpinner('Loading\x20workflows...',()=>_0x349fd1['workflow']['workflows'](_0x262834,{'limit':_0x1beda6[_0x460341(0x14c)]}),{'verbose':_0x1beda6[_0x460341(0x26f)]}),_0x3e00c6=_0x19ffe3[_0x460341(0x269)];if(_0x3e00c6['length']===0x0)return console[_0x460341(0x160)](_0x460341(0x1af)),!_0x262834&&console[_0x460341(0x160)](a42_0x5a0170[_0x460341(0xdd)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x37aca1=_0x3e00c6['map'](_0x360b1=>({'title':_0x360b1[_0x460341(0x102)]?.['name']+'.'+_0x360b1[_0x460341(0x110)],'value':_0x360b1['project']?.[_0x460341(0x110)]+'.'+_0x360b1['name'],'description':_0x360b1[_0x460341(0x20f)]?'revision:\x20'+_0x360b1[_0x460341(0x20f)]:undefined})),_0x18e99b=await a42_0x36a210({'type':_0x460341(0xd0),'name':'workflow','message':_0x460341(0x1fc),'choices':_0x37aca1});if(!_0x18e99b[_0x460341(0xeb)])return 0x1;_0x2f7b15=_0x18e99b[_0x460341(0xeb)];}if(!_0x2f7b15[_0x460341(0x18b)]('.')){const _0x190751=this[_0x460341(0x1f2)]([],_0x1beda6);if(_0x190751)_0x2f7b15=_0x190751+'.'+_0x2f7b15;else return console['error'](a42_0x5a0170[_0x460341(0x154)](_0x460341(0x19a)),_0x460341(0x1d6)),console['error'](a42_0x5a0170[_0x460341(0xdd)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x31e0e4=_0x1beda6[_0x460341(0x138)],_0x41950e=_0x1beda6[_0x460341(0x1ba)],_0x154dfd={};if(_0x31e0e4&&Array[_0x460341(0x210)](_0x31e0e4))for(const _0xc10dc6 of _0x31e0e4){const _0x164b72=_0xc10dc6[_0x460341(0x22e)]('=');if(_0x164b72===-0x1)return console[_0x460341(0x160)](_0x460341(0x109)+_0xc10dc6),console[_0x460341(0x160)](_0x460341(0x1d9)),0x1;const _0x5f2087=_0xc10dc6[_0x460341(0xf5)](0x0,_0x164b72),_0x43343f=_0xc10dc6['substring'](_0x164b72+0x1);try{_0x154dfd[_0x5f2087]=JSON['parse'](_0x43343f);}catch{_0x154dfd[_0x5f2087]=_0x43343f;}}_0x1beda6['verbose']&&(console['error'](_0x460341(0x119)+_0x2f7b15),Object[_0x460341(0x1ca)](_0x154dfd)['length']>0x0&&console[_0x460341(0x160)](_0x460341(0x111)+JSON['stringify'](_0x154dfd)),_0x41950e&&console[_0x460341(0x160)](_0x460341(0x197)+_0x41950e));const _0x27389d=await withSpinner(_0x460341(0x18f),()=>_0x349fd1[_0x460341(0xeb)][_0x460341(0x275)](_0x2f7b15,_0x154dfd,{'sessionTime':_0x41950e}),{'verbose':_0x1beda6['verbose']}),_0x2ebcb7=_0x27389d[_0x460341(0x269)];console[_0x460341(0x160)]('✔\x20Workflow\x20run\x20started'),console[_0x460341(0x160)](_0x460341(0x24f)+_0x2ebcb7['id']),console['error'](_0x460341(0x252)+_0x2ebcb7[_0x460341(0xf4)]),console[_0x460341(0x160)](_0x460341(0x11a)+_0x2ebcb7[_0x460341(0x102)]?.['name']),console[_0x460341(0x160)](_0x460341(0x16e)+_0x2ebcb7[_0x460341(0xeb)]?.['name']);if(_0x2ebcb7['project']?.['id']&&_0x2ebcb7[_0x460341(0xf4)]&&_0x2ebcb7['id']){const _0x431255=_0x1beda6[_0x460341(0x156)],_0x5815cd=getConsoleUrl(_0x431255,_0x460341(0x26a)+_0x2ebcb7[_0x460341(0x102)]['id']+_0x460341(0x176)+_0x2ebcb7[_0x460341(0xf4)]+_0x460341(0xfd)+_0x2ebcb7['id']);console[_0x460341(0x160)]('\x20\x20Console:\x20'+a42_0x5a0170[_0x460341(0x169)](_0x5815cd));}return 0x0;}}function a42_0xee86(){const _0xc64824=['yes','✔\x20Deleted\x20project\x20','LABEL_WIDTH_DIVISOR','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','getTime','Downloading\x20logs...','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','List\x20all\x20workflow\x20projects','Latest\x20session\x20has\x20no\x20attempt','Key\x20cannot\x20be\x20empty','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Start\x20a\x20workflow\x20run','newProjectName','Resolving\x20project\x20\x27','getDate','includes','Dry\x20run:\x20yes','1340uudxbQ','✔\x20Pushed\x20','Starting\x20workflow\x20run...','fill','now','workflow:kill','Session\x20not\x20found:\x20','✔\x20Workflow\x20project\x20set\x20to:\x20','Getting\x20attempt\x20details...','getMinutes','Session\x20time:\x20','\x20-\x20','listSecrets','Error:','rows','sourceProjectName','relative','summary','Listing\x20secrets...','Writing\x20files...','No\x20sessions\x20found\x20in\x20project:\x20','push','\x20is\x20not\x20a\x20directory','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Error:\x20Invalid\x20JSON\x20in\x20--params','workflow:pull','executePushProject','Kill\x20a\x20running\x20attempt','output','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','format','size','Reason:\x20','workflow:attempts','No\x20workflows\x20found','\x20\x20Location:\x20','workflow:clone','Project\x20filter:\x20','MIN_TIMELINE_WIDTH','projectName','localeCompare','logFiles','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','setSecret','No\x20attempts\x20found\x20for:\x20','sessionTime','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','finishedAt','Revision:\x20','Files\x20to\x20upload:\x20','workflows','attemptId','Force:\x20yes','✔\x20Workflow\x20project\x20context\x20cleared.','Error:\x20Attempt\x20ID\x20is\x20required','ICON_WIDTH','No\x20workflow\x20projects\x20found','Source\x20directory\x20is\x20required','357145YEchgx','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','canceling','keys','MAX_TIMELINE_WIDTH','blue','✔\x20Downloaded\x20','\x20\x20Files\x20extracted:\x20','includeRetried','columns','\x20session','Analyzing\x20project...','Including\x20subtasks:\x20yes','parseProjectWorkflowPattern','MAX_TASKS_DISPLAY','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Error:\x20','max','Expected\x20format:\x20--param\x20key=value','ICON_SPACING','sessions','\x0aApply\x20these\x20changes?','Attempt\x20ID:\x20','...','log',',\x20Workflow:\x20','dryRun','min','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20task','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','\x20\x20Project\x20ID:\x20','Project:\x20','padStart','duration','workflowProject','\x0aClone\x20\x22','Project\x20directory:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20logs','MIN_LABEL_COUNT','\x20deleted','index','resolveProject','POLL_INTERVAL_MS','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','planned','key','targetDir','Output\x20directory:\x20','isTTY','workflow:timeline','resolveProjectId','Select\x20a\x20workflow\x20to\x20run','✔\x20Clone\x20complete','slice','Source\x20directory:\x20','732912RxUZUt','retryAttempt','Error:\x20KEY=VALUE\x20is\x20required','path','executeCloneProject','TASK_NAME_WIDTH','Error:\x20Project\x20name\x20is\x20required','Pushing\x20project...','text','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x20\x20Target:\x20','list','\x0aPush\x20these\x20changes?','json','Loading\x20session...','revision','isArray','\x0aUpdate\x20existing\x20project\x20\x22','✔\x20Found\x20','\x22?\x20This\x20cannot\x20be\x20undone.','✔\x20Push\x20complete','round','\x0aDry\x20run\x20-\x20no\x20files\x20written','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','workflow:attempt','values','getMonth','resolveProjectDir','832352ZZRmXf','attempt:','\x20\x20Console:\x20','Include\x20retried:\x20yes','✔\x20Secret\x20\x27','trim','end','sourceDir','basename','✔\x20Project:\x20','filter','running','workflow:secrets:list','Project\x20name\x20is\x20required','1640zNkvuC','Setting\x20secret...','✔\x20Showing\x20','Filter:\x20','indexOf','✔\x20Retry\x20started','\x20new','success','isDirectory','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Pull\x20workflow\x20project\x20to\x20local\x20folder','splice','fileCount','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Tip:\x20cd\x20to\x20workflows/','jsonl','No\x20projects\x20match\x20pattern:\x20','Getting\x20attempt\x20tasks...','set','\x20from\x20session\x20','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Warning:','has','value','fs/promises','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20\x20Session\x20context\x20set\x20to:\x20','projects','No\x20workflow\x20tdx.json\x20found','stat','readFile','\x0a⚠\x20Project\x20\x22','💡\x20Tip:\x20Use\x20','isNewProject','\x22\x20already\x20exists\x20(ID:\x20','\x20\x20Source:\x20','done','\x20\x20Attempt\x20ID:\x20','msPerChar','modified','\x20\x20Session\x20ID:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','tasks','replace','hasChanges','existingProjectId','Filter:\x20project=','---\x20','toISOString','renderSingleTimeline','skipValidation','\x22\x20with\x20new\x20revision?','changes','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','map','fullName','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','generateSessionTimelineRows','sort','match','No\x20workflow\x20sessions\x20found','fromTask','startsWith','data','/app/workflows/','✔\x20New\x20project:\x20','Resume\x20from:\x20','Auto-selected\x20latest\x20session:\x20','⚠\x20Showing\x20first\x20','verbose','Invalid\x20format:\x20','workflow:retry','\x20\x20Revision:\x20','workflow:use','table','run','all','get','List\x20workflow\x20execution\x20sessions','pending','\x20unchanged','Updating\x20','session','\x1b[1A\x1b[2K','select','MAX_LABEL_COUNT','\x20has\x20no\x20attempts','\x27...','Failed\x20to\x20fetch\x20attempt\x20data','\x20\x20tdx\x20wf\x20use\x20<project>','Retry\x20a\x20session\x20or\x20attempt','Validation:\x20skipped','parse','resumeFrom','No\x20sessions\x20found\x20for:\x20','new','Retrying\x20attempt...','dim','trimEnd','createdAt','Select\x20a\x20session\x20to\x20view\x20timeline:','MAX_POLL_ITERATIONS','type','total','startTime','\x20secret','execute','targetExists','description','\x0aDry\x20run\x20-\x20nothing\x20pushed','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','workflow','yellow','state','566LRwKow','\x0aPolling...\x20(','Listing\x20workflow\x20sessions...','21UUBLuO','stdout','No\x20workflows\x20found\x20in\x20project:\x20','sessionId','substring','includeSubtasks','attempt','fileSize','(use\x20--limit\x20to\x20see\x20more)','split','169011ocOmEV','\x20to\x20see\x20detailed\x20logs','/attempt/','\x20modified','length','deleted','diff','project','\x0aDry\x20run\x20-\x20no\x20project\x20created','renderTimeline','List\x20workflow\x20attempts','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','\x20(use\x20--limit\x20to\x20show\x20more)','workflow:projects','Error:\x20Invalid\x20parameter\x20format:\x20','repeat','Total:\x20','workflow:upload','No\x20attempts\x20found\x20in\x20project:\x20','Error:\x20Secret\x20key\x20is\x20required','workflow:logs','name','Parameters:\x20','updatedAt','requireProject','GUTTER','Attempt:\x20','Select\x20a\x20task\x20to\x20view\x20logs:','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Deleting\x20project\x20','Workflow:\x20','\x20\x20Project:\x20','filesExtracted','cancelRequested','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Deleting\x20secret...','showWorkflowConsoleUrl','Killing\x20attempt...','getHours','kill','some','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','utf-8','prepareCloneProject','📋\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Target\x20directory:\x20','Downloading\x20project\x20','cwd','unchanged','green','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','workflow:tasks','join','applyPullProject','2936036emMQpu','workflow:delete','Fetching\x20log\x20files...','status','preparePushProject','param','Project\x20name:\x20','download','toLowerCase','resolve','start','tdx.json','\x20project','floor','No\x20sessions\x20found','params','find','Target:\x20','renderSessionsTimeline','write','Status:\x20','group_error','workflow:secrets:set','Listing\x20workflow\x20attempts...','projectId','limit','follow','window','getFullYear','force','No\x20sessions\x20with\x20timing\x20information','delete','retryAttemptName','red','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','site','New\x20project\x20name:\x20','3096831rFHkpQ','from','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','\x20\x20Changes:\x20','navigateSessionsInteractive','durationMs','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Cancelled','error','workflowName','sys','\x20(system)','Task\x20name:\x20','startedAt','unknown','LABEL_MIN_SPACING','\x20workflow','cyan','lastAttempt','Pattern:\x20','message','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x20\x20Workflow:\x20','Key:\x20','List\x20workflows','workflow:workflows','pollTimeline','\x0a✔\x20Already\x20up\x20to\x20date','session_id','taskName','/sessions/','buildTimelineData','retrySession','📁\x20','task','.\x20Expected\x20format:\x20KEY=VALUE'];a42_0xee86=function(){return _0xc64824;};return a42_0xee86();}export class WorkflowDownloadCommand extends BaseCommand{[a42_0xb2f7ca(0x110)]='workflow:download';[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0x117);async[a42_0xb2f7ca(0xe6)](_0x4c75e1){const _0x2865fd=a42_0xb2f7ca,{options:_0x227672,args:_0x5a845c,tdx:_0x142e47}=_0x4c75e1,_0x3a72b0=_0x5a845c[0x0],_0x5c1c00=_0x5a845c[0x1]||'.';if(!_0x3a72b0)return console[_0x2865fd(0x160)](_0x2865fd(0x206)),console['error'](_0x2865fd(0x186)),0x1;const _0x1c0f74=_0x227672[_0x2865fd(0x20f)];_0x227672['verbose']&&(console['error'](_0x2865fd(0x1e7)+_0x3a72b0),console[_0x2865fd(0x160)](_0x2865fd(0x1f8)+_0x5c1c00),_0x1c0f74&&console['error'](_0x2865fd(0x1bd)+_0x1c0f74));const _0x30a9d0=await withSpinner(_0x2865fd(0x12b)+_0x3a72b0+'...',()=>_0x142e47[_0x2865fd(0xeb)][_0x2865fd(0x13a)](_0x3a72b0,_0x5c1c00,{'revision':_0x1c0f74}),{'verbose':_0x227672[_0x2865fd(0x26f)]}),_0x57c38a=_0x30a9d0[_0x2865fd(0x269)];return console[_0x2865fd(0x160)](_0x2865fd(0x1cd)+_0x57c38a[_0x2865fd(0x1b4)]),console[_0x2865fd(0x160)]('\x20\x20Revision:\x20'+_0x57c38a[_0x2865fd(0x20f)]),console[_0x2865fd(0x160)](_0x2865fd(0x1ce)+_0x57c38a[_0x2865fd(0x11b)]),console[_0x2865fd(0x160)](_0x2865fd(0x1b0)+_0x5c1c00+'/'+_0x57c38a['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x10c);[a42_0xb2f7ca(0xe8)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async['execute'](_0x531244){const _0x12244f=a42_0xb2f7ca,{options:_0x1647da,args:_0x23e54f,tdx:_0x4a1f6d}=_0x531244;let _0x3c6918='.',_0x13681d=_0x1647da[_0x12244f(0x110)];if(_0x23e54f[0x0]){const {promises:_0x234633}=await import('fs');try{const _0x180a13=await _0x234633[_0x12244f(0x247)](_0x23e54f[0x0]);if(_0x180a13[_0x12244f(0x232)]())_0x3c6918=_0x23e54f[0x0];else return console[_0x12244f(0x160)](_0x12244f(0x1d7)+_0x23e54f[0x0]+_0x12244f(0x1a3)),0x1;}catch{_0x13681d=_0x23e54f[0x0],_0x3c6918='.';}}const _0x438c71=_0x1647da['revision'],_0x5702d8=_0x1647da['skipValidation'];_0x1647da[_0x12244f(0x26f)]&&(console['error'](_0x12244f(0x1ec)+_0x3c6918),_0x13681d&&console[_0x12244f(0x160)](_0x12244f(0x139)+_0x13681d),_0x438c71&&console[_0x12244f(0x160)](_0x12244f(0x1bd)+_0x438c71),_0x5702d8&&console[_0x12244f(0x160)](_0x12244f(0xd7)));const _0x29f106=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x4a1f6d['workflow'][_0x12244f(0x1a2)](_0x3c6918,{'projectName':_0x13681d,'revision':_0x438c71,'skipValidation':_0x5702d8}),{'verbose':_0x1647da[_0x12244f(0x26f)]}),_0x57fa45=_0x29f106[_0x12244f(0x269)];return console['error'](_0x12244f(0x18e)+_0x57fa45[_0x12244f(0x1b4)]),console['error'](_0x12244f(0x1e6)+_0x57fa45[_0x12244f(0x14b)]),console['error'](_0x12244f(0x272)+_0x57fa45[_0x12244f(0x20f)]),await this[_0x12244f(0x11f)](_0x4a1f6d,_0x57fa45[_0x12244f(0x1b4)],_0x1647da[_0x12244f(0x156)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x1a6);[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0x234);async[a42_0xb2f7ca(0xe6)](_0x1ec9ba){const _0x5cd277=a42_0xb2f7ca,{options:_0x4983ad,args:_0x51c37a,tdx:_0x50d547}=_0x1ec9ba,_0x34f86b=_0x51c37a[0x0],_0x2067dc=_0x51c37a[0x1];if(!_0x34f86b)return console[_0x5cd277(0x160)](a42_0x5a0170[_0x5cd277(0x154)]('Error:'),_0x5cd277(0x229)),console[_0x5cd277(0x160)](a42_0x5a0170[_0x5cd277(0xdd)](_0x5cd277(0xea))),0x1;const _0xd9606f=_0x4983ad[_0x5cd277(0x20f)];_0x4983ad[_0x5cd277(0x26f)]&&(console[_0x5cd277(0x160)](_0x5cd277(0x1e7)+_0x34f86b),_0x2067dc&&console[_0x5cd277(0x160)](_0x5cd277(0x12a)+_0x2067dc),_0xd9606f&&console['error'](_0x5cd277(0x1bd)+_0xd9606f),_0x4983ad[_0x5cd277(0x1e1)]&&console[_0x5cd277(0x160)](_0x5cd277(0x18c)));const _0x15c6da=await withSpinner('Pulling\x20project\x20'+_0x34f86b+'...',()=>_0x50d547[_0x5cd277(0xeb)]['pullProject'](_0x34f86b,{'targetDir':_0x2067dc,'revision':_0xd9606f}),{'verbose':_0x4983ad[_0x5cd277(0x26f)]}),_0x49a032=_0x15c6da['data'];_0x49a032[_0x5cd277(0x24b)]?console[_0x5cd277(0x160)](_0x5cd277(0x26b)+_0x49a032[_0x5cd277(0x1b4)]):console[_0x5cd277(0x160)](_0x5cd277(0x225)+_0x49a032[_0x5cd277(0x1b4)]);console[_0x5cd277(0x160)](_0x5cd277(0x272)+_0x49a032[_0x5cd277(0x20f)]),console[_0x5cd277(0x160)](_0x5cd277(0x20a)+(a42_0x47b982[_0x5cd277(0x19d)](process[_0x5cd277(0x12c)](),_0x49a032[_0x5cd277(0x1f7)])||'.')),console[_0x5cd277(0x160)](_0x5cd277(0x15b)+a42_0x5a0170[_0x5cd277(0x12e)]('+'+_0x49a032[_0x5cd277(0x19e)][_0x5cd277(0xdb)]+_0x5cd277(0x230))+',\x20'+(a42_0x5a0170[_0x5cd277(0xec)]('~'+_0x49a032[_0x5cd277(0x19e)][_0x5cd277(0x251)]+_0x5cd277(0xfe))+',\x20')+(a42_0x5a0170[_0x5cd277(0x154)]('-'+_0x49a032['summary'][_0x5cd277(0x100)]+_0x5cd277(0x1f0))+',\x20')+(''+a42_0x5a0170['dim'](_0x49a032[_0x5cd277(0x19e)]['unchanged']+_0x5cd277(0x27a))));for(const _0x23d52e of _0x49a032['changes']){_0x23d52e['type']===_0x5cd277(0x251)&&_0x23d52e['diff']&&(console[_0x5cd277(0x160)]('\x0a'+a42_0x5a0170[_0x5cd277(0x169)](_0x5cd277(0x259)+_0x23d52e[_0x5cd277(0x203)])),console['error'](_0x23d52e[_0x5cd277(0x101)]));}if(!_0x49a032[_0x5cd277(0x256)])return saveSessionContext({'workflow_project':_0x49a032[_0x5cd277(0x1b4)]},_0x4983ad[_0x5cd277(0xce)]),console[_0x5cd277(0x160)](a42_0x5a0170[_0x5cd277(0x12e)](_0x5cd277(0x173))),console[_0x5cd277(0x160)](a42_0x5a0170['dim'](_0x5cd277(0x244)+_0x49a032[_0x5cd277(0x1b4)])),0x0;if(_0x4983ad[_0x5cd277(0x1e1)])return console['error'](a42_0x5a0170['yellow'](_0x5cd277(0x216))),0x0;if(!_0x4983ad[_0x5cd277(0x17c)]){const _0x2fa301=await confirmKey(_0x5cd277(0x1dc));if(!_0x2fa301)return console[_0x5cd277(0x160)](_0x5cd277(0x15f)),0x0;}await withSpinner(_0x5cd277(0x1a0),()=>_0x50d547[_0x5cd277(0xeb)][_0x5cd277(0x132)](_0x49a032,{'revision':_0xd9606f}),{'verbose':_0x4983ad[_0x5cd277(0x26f)]}),saveSessionContext({'workflow_project':_0x49a032[_0x5cd277(0x1b4)]},_0x4983ad[_0x5cd277(0xce)]),console[_0x5cd277(0x160)](a42_0x5a0170[_0x5cd277(0x12e)]('✔\x20Pull\x20complete'));const _0x2b39e5=a42_0x47b982[_0x5cd277(0x19d)](process[_0x5cd277(0x12c)](),_0x49a032[_0x5cd277(0x1f7)])||'.';return console['error'](a42_0x5a0170['dim'](_0x5cd277(0x1b0)+_0x2b39e5)),console[_0x5cd277(0x160)](a42_0x5a0170[_0x5cd277(0xdd)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x49a032[_0x5cd277(0x1b4)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0xb2f7ca(0x110)]='workflow:push';[a42_0xb2f7ca(0xe8)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async['execute'](_0x5707e2){const _0xa49ec1=a42_0xb2f7ca,{options:_0x3ffa50,args:_0x3d4b4c,tdx:_0x5ca567}=_0x5707e2,_0x1369cc=this[_0xa49ec1(0x21b)](_0x3d4b4c,_0x3ffa50),_0x4e5bde=_0x3ffa50[_0xa49ec1(0x20f)],_0x3c6d48=_0x3ffa50[_0xa49ec1(0x25c)];_0x3ffa50[_0xa49ec1(0x26f)]&&(_0x1369cc&&console[_0xa49ec1(0x160)](_0xa49ec1(0x1ff)+_0x1369cc),_0x4e5bde&&console[_0xa49ec1(0x160)]('Revision:\x20'+_0x4e5bde),_0x3ffa50[_0xa49ec1(0x1e1)]&&console['error']('Dry\x20run:\x20yes'),_0x3c6d48&&console[_0xa49ec1(0x160)](_0xa49ec1(0xd7)));let _0x426133;try{_0x426133=await withSpinner('Analyzing\x20changes...',()=>_0x5ca567[_0xa49ec1(0xeb)][_0xa49ec1(0x137)]({'sourceDir':_0x1369cc,'revision':_0x4e5bde,'skipValidation':_0x3c6d48}),{'verbose':_0x3ffa50[_0xa49ec1(0x26f)]});}catch(_0x167b6e){if(_0x167b6e instanceof Error&&_0x167b6e[_0xa49ec1(0x16c)][_0xa49ec1(0x18b)](_0xa49ec1(0x246)))return console[_0xa49ec1(0x160)](a42_0x5a0170[_0xa49ec1(0x154)]('Error:'),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x3ffa50['workflowProject']?console[_0xa49ec1(0x160)](a42_0x5a0170[_0xa49ec1(0xdd)](_0xa49ec1(0x238)+_0x3ffa50[_0xa49ec1(0x1ea)]+_0xa49ec1(0x17f)+_0x3ffa50[_0xa49ec1(0x1ea)]+'\x27')):console[_0xa49ec1(0x160)](a42_0x5a0170[_0xa49ec1(0xdd)](_0xa49ec1(0x15e))),0x1;throw _0x167b6e;}const _0x405f16=_0x426133[_0xa49ec1(0x269)];console['error'](_0xa49ec1(0x225)+_0x405f16[_0xa49ec1(0x1b4)]),console[_0xa49ec1(0x160)](_0xa49ec1(0x24d)+_0x405f16[_0xa49ec1(0x223)]),console[_0xa49ec1(0x160)](_0xa49ec1(0x272)+_0x405f16[_0xa49ec1(0x20f)]),console[_0xa49ec1(0x160)](_0xa49ec1(0x15b)+a42_0x5a0170[_0xa49ec1(0x12e)]('+'+_0x405f16[_0xa49ec1(0x19e)][_0xa49ec1(0xdb)]+'\x20new')+',\x20'+(a42_0x5a0170[_0xa49ec1(0xec)]('~'+_0x405f16['summary'][_0xa49ec1(0x251)]+_0xa49ec1(0xfe))+',\x20')+(a42_0x5a0170['red']('-'+_0x405f16[_0xa49ec1(0x19e)][_0xa49ec1(0x100)]+'\x20deleted')+',\x20')+(''+a42_0x5a0170[_0xa49ec1(0xdd)](_0x405f16['summary'][_0xa49ec1(0x12d)]+'\x20unchanged')));for(const _0x2189a5 of _0x405f16[_0xa49ec1(0x25e)]){_0x2189a5[_0xa49ec1(0xe2)]==='modified'&&_0x2189a5[_0xa49ec1(0x101)]&&(console['error']('\x0a'+a42_0x5a0170[_0xa49ec1(0x169)](_0xa49ec1(0x259)+_0x2189a5[_0xa49ec1(0x203)])),console['error'](_0x2189a5['diff']));}if(!_0x405f16['hasChanges'])return console[_0xa49ec1(0x160)](a42_0x5a0170[_0xa49ec1(0x12e)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this['showWorkflowConsoleUrl'](_0x5ca567,_0x405f16['projectName'],_0x3ffa50[_0xa49ec1(0x156)]),0x0;if(_0x3ffa50[_0xa49ec1(0x1e1)])return console['error'](a42_0x5a0170['yellow'](_0xa49ec1(0xe9))),0x0;if(!_0x3ffa50[_0xa49ec1(0x17c)]){const _0x142709=await confirmKey(_0xa49ec1(0x20c));if(!_0x142709)return console[_0xa49ec1(0x160)](_0xa49ec1(0x15f)),0x0;}const _0x243f41=await withSpinner(_0xa49ec1(0x207),()=>_0x5ca567[_0xa49ec1(0xeb)][_0xa49ec1(0x1a7)](_0x405f16),{'verbose':_0x3ffa50[_0xa49ec1(0x26f)]}),_0x4fa8ec=_0x243f41[_0xa49ec1(0x269)];return console['error'](a42_0x5a0170[_0xa49ec1(0x12e)](_0xa49ec1(0x214))),console[_0xa49ec1(0x160)](_0xa49ec1(0x1e6)+_0x4fa8ec[_0xa49ec1(0x14b)]),console['error'](_0xa49ec1(0x272)+_0x4fa8ec[_0xa49ec1(0x20f)]),await this[_0xa49ec1(0x11f)](_0x5ca567,_0x4fa8ec['projectName'],_0x3ffa50[_0xa49ec1(0x156)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a42_0xb2f7ca(0x1b1);['description']='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a42_0xb2f7ca(0xe6)](_0x5e4b73){const _0x2ffe42=a42_0xb2f7ca,{options:_0x3273a2,args:_0x5ef8f8,tdx:_0x2dcd6d}=_0x5e4b73,_0x23079f=this[_0x2ffe42(0x21b)](_0x5ef8f8,_0x3273a2),_0x4f8712=_0x3273a2[_0x2ffe42(0x110)],_0x572e67=_0x3273a2[_0x2ffe42(0x20f)],_0x2d5507=_0x3273a2[_0x2ffe42(0x25c)];if(!_0x23079f)return console['error'](a42_0x5a0170[_0x2ffe42(0x154)](_0x2ffe42(0x19a)),_0x2ffe42(0x1c6)),console['error'](a42_0x5a0170[_0x2ffe42(0xdd)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x2ffe42(0x160)](a42_0x5a0170['dim'](_0x2ffe42(0x155))),0x1;if(!_0x4f8712)return console[_0x2ffe42(0x160)](a42_0x5a0170[_0x2ffe42(0x154)]('Error:'),_0x2ffe42(0x11d)),console['error'](a42_0x5a0170['dim'](_0x2ffe42(0x125))),0x1;_0x3273a2[_0x2ffe42(0x26f)]&&(console[_0x2ffe42(0x160)](_0x2ffe42(0x1ff)+_0x23079f),console[_0x2ffe42(0x160)](_0x2ffe42(0x157)+_0x4f8712),_0x572e67&&console['error'](_0x2ffe42(0x1bd)+_0x572e67),_0x3273a2[_0x2ffe42(0x1e1)]&&console[_0x2ffe42(0x160)]('Dry\x20run:\x20yes'),_0x2d5507&&console[_0x2ffe42(0x160)](_0x2ffe42(0xd7)));const _0x21aaa3=await withSpinner(_0x2ffe42(0x1d2),()=>_0x2dcd6d[_0x2ffe42(0xeb)][_0x2ffe42(0x127)](_0x23079f,_0x4f8712,{'revision':_0x572e67,'skipValidation':_0x2d5507}),{'verbose':_0x3273a2[_0x2ffe42(0x26f)]}),_0x8ddec9=_0x21aaa3[_0x2ffe42(0x269)];console[_0x2ffe42(0x160)]('Source:\x20'+_0x8ddec9[_0x2ffe42(0x223)]);_0x8ddec9[_0x2ffe42(0x19c)]&&console[_0x2ffe42(0x160)]('Source\x20project:\x20'+_0x8ddec9['sourceProjectName']);console['error'](_0x2ffe42(0x157)+_0x8ddec9[_0x2ffe42(0x188)]),console[_0x2ffe42(0x160)](_0x2ffe42(0x1bd)+_0x8ddec9['revision']),console['error'](_0x2ffe42(0x1be)+_0x8ddec9[_0x2ffe42(0x236)]);_0x8ddec9[_0x2ffe42(0xe7)]&&(console[_0x2ffe42(0x160)](a42_0x5a0170['yellow'](_0x2ffe42(0x249)+_0x8ddec9['newProjectName']+_0x2ffe42(0x24c)+_0x8ddec9[_0x2ffe42(0x257)]+')')),console[_0x2ffe42(0x160)](a42_0x5a0170['yellow'](_0x2ffe42(0x1a4))));if(_0x3273a2[_0x2ffe42(0x1e1)])return console[_0x2ffe42(0x160)](a42_0x5a0170[_0x2ffe42(0xec)](_0x2ffe42(0x103))),0x0;if(!_0x3273a2[_0x2ffe42(0x17c)]){const _0x32a2cc=_0x8ddec9[_0x2ffe42(0x19c)]||a42_0x47b982[_0x2ffe42(0x224)](_0x23079f),_0xeaac78=_0x8ddec9[_0x2ffe42(0xe7)]?_0x2ffe42(0x211)+_0x4f8712+_0x2ffe42(0x25d):_0x2ffe42(0x1eb)+_0x32a2cc+'\x22\x20to\x20new\x20project\x20\x22'+_0x4f8712+'\x22?',_0x267519=await confirmKey(_0xeaac78);if(!_0x267519)return console['error'](_0x2ffe42(0x15f)),0x0;}const _0x44b30a=await withSpinner(_0x8ddec9[_0x2ffe42(0xe7)]?_0x2ffe42(0xcd)+_0x4f8712+'...':'Cloning\x20to\x20'+_0x4f8712+_0x2ffe42(0x1de),()=>_0x2dcd6d[_0x2ffe42(0xeb)][_0x2ffe42(0x204)](_0x8ddec9),{'verbose':_0x3273a2[_0x2ffe42(0x26f)]}),_0x29ea7a=_0x44b30a[_0x2ffe42(0x269)];return console[_0x2ffe42(0x160)](a42_0x5a0170['green'](_0x8ddec9['targetExists']?'✔\x20Project\x20updated':_0x2ffe42(0x1fd))),console[_0x2ffe42(0x160)](_0x2ffe42(0x11a)+_0x29ea7a['newProjectName']),console[_0x2ffe42(0x160)](_0x2ffe42(0x1e6)+_0x29ea7a['newProjectId']),console[_0x2ffe42(0x160)](_0x2ffe42(0x272)+_0x29ea7a[_0x2ffe42(0x20f)]),await this[_0x2ffe42(0x11f)](_0x2dcd6d,_0x29ea7a[_0x2ffe42(0x188)],_0x3273a2[_0x2ffe42(0x156)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x134);[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0x233);async[a42_0xb2f7ca(0xe6)](_0xc0bbf2){const _0x578c3b=a42_0xb2f7ca,{options:_0x35b734,args:_0x146e5b,tdx:_0x626852}=_0xc0bbf2,_0x4b0639=_0x146e5b[0x0];if(!_0x4b0639)return console[_0x578c3b(0x160)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x578c3b(0x160)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x35b734[_0x578c3b(0x26f)]&&console[_0x578c3b(0x160)](_0x578c3b(0x1e7)+_0x4b0639);if(!_0x35b734[_0x578c3b(0x17c)]){const _0x3fbae7=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x4b0639+_0x578c3b(0x213));if(!_0x3fbae7)return console[_0x578c3b(0x160)](_0x578c3b(0x15f)),0x0;}const _0x2f74c4=await withSpinner(_0x578c3b(0x118)+_0x4b0639+_0x578c3b(0x1de),()=>_0x626852[_0x578c3b(0xeb)][_0x578c3b(0x152)](_0x4b0639),{'verbose':_0x35b734[_0x578c3b(0x26f)]}),_0x145840=_0x2f74c4['data'];return console['error'](_0x578c3b(0x17d)+_0x145840[_0x578c3b(0x1b4)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x145840[_0x578c3b(0x14b)]),0x0;}}export function parseKeyValue(_0x422cc5){const _0x29bbce=a42_0xb2f7ca,_0x2af872=_0x422cc5[_0x29bbce(0x22e)]('=');if(_0x2af872===-0x1)throw new Error(_0x29bbce(0x270)+_0x422cc5+_0x29bbce(0x17b));const _0x3724be=_0x422cc5[_0x29bbce(0xf5)](0x0,_0x2af872),_0x23ad08=_0x422cc5['substring'](_0x2af872+0x1);if(!_0x3724be)throw new Error(_0x29bbce(0x185));return{'key':_0x3724be,'value':_0x23ad08};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x228);['description']=a42_0xb2f7ca(0x237);async[a42_0xb2f7ca(0xe6)](_0x5f2eaa){const _0x29271e=a42_0xb2f7ca,{options:_0x4e8983,args:_0x745180,tdx:_0x31282c}=_0x5f2eaa,_0x25deff=this[_0x29271e(0x113)](_0x745180,_0x4e8983);if(!_0x25deff)return 0x1;_0x4e8983['verbose']&&console['error'](_0x29271e(0x1e7)+_0x25deff);const _0x1f5233=await withSpinner(_0x29271e(0x19f),()=>_0x31282c[_0x29271e(0xeb)][_0x29271e(0x199)](_0x25deff),{'verbose':_0x4e8983[_0x29271e(0x26f)]}),{secrets:_0x4b1a54}=_0x1f5233['data'];return console[_0x29271e(0x160)](_0x29271e(0x212)+_0x4b1a54[_0x29271e(0xff)]+_0x29271e(0xe5)+(_0x4b1a54[_0x29271e(0xff)]!==0x1?'s':'')),await handleSDKOutput(_0x4b1a54,_0x4e8983),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x149);[a42_0xb2f7ca(0xe8)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async['execute'](_0xeea8ee){const _0x4884fb=a42_0xb2f7ca,{options:_0x474dd1,args:_0x426da5,tdx:_0x4b24a6}=_0xeea8ee;let _0x3f75cf,_0x2a7b93;if(_0x426da5[_0x4884fb(0xff)]>=0x2)_0x3f75cf=_0x426da5[0x0],_0x2a7b93=_0x426da5[0x1];else{if(_0x426da5[_0x4884fb(0xff)]===0x1&&_0x474dd1[_0x4884fb(0x1ea)])_0x3f75cf=_0x474dd1[_0x4884fb(0x1ea)],_0x2a7b93=_0x426da5[0x0];else return _0x426da5['length']===0x1?(console['error'](_0x4884fb(0x206)),console['error'](_0x4884fb(0x1e3)),0x1):(console[_0x4884fb(0x160)](_0x4884fb(0x202)),console[_0x4884fb(0x160)](_0x4884fb(0x1b7)),0x1);}let _0x405daf,_0xe7b64b;try{({key:_0x405daf,value:_0xe7b64b}=parseKeyValue(_0x2a7b93));}catch(_0x5d2df6){return _0x5d2df6 instanceof Error&&console[_0x4884fb(0x160)](a42_0x5a0170[_0x4884fb(0x154)](_0x4884fb(0x19a)),_0x5d2df6[_0x4884fb(0x16c)]),0x1;}_0x474dd1[_0x4884fb(0x26f)]&&(console[_0x4884fb(0x160)]('Project:\x20'+_0x3f75cf),console[_0x4884fb(0x160)]('Key:\x20'+_0x405daf));const _0x3aa0bf=await withSpinner(_0x4884fb(0x22b),()=>_0x4b24a6[_0x4884fb(0xeb)][_0x4884fb(0x1b8)](_0x3f75cf,_0x405daf,_0xe7b64b),{'verbose':_0x474dd1[_0x4884fb(0x26f)]}),_0x4159f7=_0x3aa0bf[_0x4884fb(0x269)];return console['error'](_0x4884fb(0x220)+_0x4159f7['key']+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x4159f7[_0x4884fb(0x1b4)]+'\x27'),(_0x474dd1['json']||_0x474dd1[_0x4884fb(0x239)])&&await handleSingleObjectOutput(_0x4159f7,_0x474dd1),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0xb2f7ca(0x110)]='workflow:secrets:delete';[a42_0xb2f7ca(0xe8)]=a42_0xb2f7ca(0x209);async['execute'](_0x4daa40){const _0x4f2750=a42_0xb2f7ca,{options:_0x28a7d9,args:_0x10f662,tdx:_0x524939}=_0x4daa40;let _0x40ce63,_0x1ac4f5;if(_0x10f662[_0x4f2750(0xff)]>=0x2)_0x40ce63=_0x10f662[0x0],_0x1ac4f5=_0x10f662[0x1];else{if(_0x10f662['length']===0x1&&_0x28a7d9[_0x4f2750(0x1ea)])_0x40ce63=_0x28a7d9['workflowProject'],_0x1ac4f5=_0x10f662[0x0];else return _0x10f662['length']===0x1?(console[_0x4f2750(0x160)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x4f2750(0x160)](_0x4f2750(0x1e3)),0x1):(console[_0x4f2750(0x160)](_0x4f2750(0x10e)),console[_0x4f2750(0x160)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x28a7d9[_0x4f2750(0x26f)]&&(console[_0x4f2750(0x160)](_0x4f2750(0x1e7)+_0x40ce63),console[_0x4f2750(0x160)](_0x4f2750(0x16f)+_0x1ac4f5));if(!_0x28a7d9[_0x4f2750(0x17c)]){const _0x3ee408=await confirmKey(_0x4f2750(0x253)+_0x1ac4f5+'\x27\x20from\x20project\x20\x27'+_0x40ce63+'\x27?');if(!_0x3ee408)return console[_0x4f2750(0x160)](_0x4f2750(0x15f)),0x0;}const _0x24cc13=await withSpinner(_0x4f2750(0x11e),()=>_0x524939[_0x4f2750(0xeb)]['deleteSecret'](_0x40ce63,_0x1ac4f5),{'verbose':_0x28a7d9['verbose']}),_0x314e8d=_0x24cc13[_0x4f2750(0x269)];return console['error'](_0x4f2750(0x220)+_0x314e8d[_0x4f2750(0x1f6)]+_0x4f2750(0x129)+_0x314e8d['projectName']+'\x27'),(_0x28a7d9[_0x4f2750(0x20d)]||_0x28a7d9[_0x4f2750(0x239)])&&await handleSingleObjectOutput(_0x314e8d,_0x28a7d9),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(_0x309f9f){const _0x31cf39=a42_0xb2f7ca,_0x112c3b=Math[_0x31cf39(0x140)](_0x309f9f/0x3e8),_0x358ad0=Math[_0x31cf39(0x140)](_0x112c3b/0x3c),_0x3e39ad=Math[_0x31cf39(0x140)](_0x358ad0/0x3c),_0x5693a0=Math[_0x31cf39(0x140)](_0x3e39ad/0x18);if(_0x5693a0>0x0){const _0x5e8437=_0x3e39ad%0x18;return _0x5e8437>0x0?_0x5693a0+'d\x20'+_0x5e8437+'h':_0x5693a0+'d';}else{if(_0x3e39ad>0x0){const _0x254b08=_0x358ad0%0x3c;return _0x254b08>0x0?_0x3e39ad+'h\x20'+_0x254b08+'m':_0x3e39ad+'h';}else{if(_0x358ad0>0x0){const _0x565c2f=_0x112c3b%0x3c;return _0x565c2f>0x0?_0x358ad0+'m\x20'+_0x565c2f+'s':_0x358ad0+'m';}else return _0x112c3b+'s';}}}function formatTimestamp(_0x8f8094,_0x53b136){const _0x3e0f01=a42_0xb2f7ca,_0xf26371=new Date(_0x8f8094),_0x29ff3a=String(_0xf26371[_0x3e0f01(0x121)]())[_0x3e0f01(0x1e8)](0x2,'0'),_0x48b589=String(_0xf26371[_0x3e0f01(0x196)]())[_0x3e0f01(0x1e8)](0x2,'0'),_0x313d12=_0x29ff3a+':'+_0x48b589,_0x4a2edc=_0xf26371[_0x3e0f01(0x14f)]()===_0x53b136[_0x3e0f01(0x14f)]()&&_0xf26371[_0x3e0f01(0x21a)]()===_0x53b136[_0x3e0f01(0x21a)]()&&_0xf26371[_0x3e0f01(0x18a)]()===_0x53b136[_0x3e0f01(0x18a)]();if(_0x4a2edc)return _0x313d12;else{const _0x57d5f9=String(_0xf26371[_0x3e0f01(0x21a)]()+0x1)[_0x3e0f01(0x1e8)](0x2,'0'),_0x59c478=String(_0xf26371[_0x3e0f01(0x18a)]())[_0x3e0f01(0x1e8)](0x2,'0');return _0x57d5f9+'-'+_0x59c478+'\x20'+_0x313d12;}}function formatDate(_0x2845c2){const _0x254988=a42_0xb2f7ca,_0x330307=_0x2845c2[_0x254988(0x14f)](),_0x3a4c52=String(_0x2845c2['getMonth']()+0x1)['padStart'](0x2,'0'),_0x54ae42=String(_0x2845c2[_0x254988(0x18a)]())[_0x254988(0x1e8)](0x2,'0');return _0x330307+'-'+_0x3a4c52+'-'+_0x54ae42;}function getTaskStateIcon(_0x332dba){const _0x134eec={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x134eec[_0x332dba]||'⚪';}function getBarChar(_0x2ea9a6){const _0x45207f=a42_0xb2f7ca;return _0x2ea9a6===_0x45207f(0x160)||_0x2ea9a6===_0x45207f(0x148)?'×':'─';}function getBarColor(_0x4f2732){const _0x46fdb7=a42_0xb2f7ca,_0x5222f9={'success':a42_0x5a0170[_0x46fdb7(0x12e)],'error':a42_0x5a0170['red'],'group_error':a42_0x5a0170[_0x46fdb7(0x154)],'running':a42_0x5a0170[_0x46fdb7(0x1cc)],'blocked':a42_0x5a0170[_0x46fdb7(0xec)],'planned':a42_0x5a0170['dim'],'canceling':a42_0x5a0170['yellow']};return _0x5222f9[_0x4f2732]||a42_0x5a0170['white'];}function parseTaskName(_0x528ab7){const _0x5353d4=a42_0xb2f7ca;let _0x1a3eba=_0x528ab7[_0x5353d4(0x255)](/^\++/,'');const _0x353670=_0x1a3eba[_0x5353d4(0xfa)]('+'),_0x27d818=_0x353670['length']>0x1?_0x353670['length']-0x2:0x0,_0x3b2e66=_0x353670[_0x353670['length']-0x1]||_0x1a3eba;return{'level':_0x27d818,'name':'+'+_0x3b2e66};}function truncateTaskName(_0x259acb,_0x29832f){const _0x20ae05=a42_0xb2f7ca,_0x1dfb91=stringWidth(_0x259acb);if(_0x1dfb91<=_0x29832f)return _0x259acb;let _0x25cbe8=_0x259acb;while(stringWidth(_0x25cbe8+'…')>_0x29832f&&_0x25cbe8[_0x20ae05(0xff)]>0x0){_0x25cbe8=_0x25cbe8[_0x20ae05(0x1fe)](0x0,-0x1);}return _0x25cbe8+'…';}function calculateTimeScale(_0x58f8d0,_0x2ae319){const _0x5e8dc4=a42_0xb2f7ca;return{'startTime':_0x58f8d0[_0x5e8dc4(0x13d)],'endTime':_0x58f8d0['end'],'durationMs':_0x58f8d0['duration'],'msPerChar':_0x58f8d0[_0x5e8dc4(0x1e9)]/_0x2ae319};}function timeToPosition(_0x23024c,_0x3fac9f,_0xaf82a2){const _0x1a718a=a42_0xb2f7ca,_0x1c31fb=_0x23024c-_0x3fac9f[_0x1a718a(0xe4)],_0x1f29cd=Math[_0x1a718a(0x140)](_0x1c31fb/_0x3fac9f[_0x1a718a(0x250)]);return Math['max'](0x0,Math['min'](_0x1f29cd,_0xaf82a2));}function renderTimeAxis(_0x2644c6,_0x16a2ca){const _0x17b1b5=a42_0xb2f7ca,_0x1623e2=Math[_0x17b1b5(0x1e2)](TIMELINE_CONFIG[_0x17b1b5(0xd1)],Math[_0x17b1b5(0x1d8)](TIMELINE_CONFIG[_0x17b1b5(0x1ef)],Math[_0x17b1b5(0x140)](_0x16a2ca/TIMELINE_CONFIG[_0x17b1b5(0x17e)]))),_0x1119bf=_0x2644c6[_0x17b1b5(0x15d)]/(_0x1623e2-0x1),_0x47a89f=new Date(_0x2644c6[_0x17b1b5(0xe4)]),_0x459c56=[];for(let _0x1375e7=0x0;_0x1375e7<_0x1623e2;_0x1375e7++){const _0x13d656=_0x2644c6[_0x17b1b5(0xe4)]+_0x1375e7*_0x1119bf,_0x308d0a=timeToPosition(_0x13d656,_0x2644c6,_0x16a2ca),_0x3cfe7d=formatTimestamp(_0x13d656,_0x47a89f);_0x459c56[_0x17b1b5(0x1a2)]({'pos':_0x308d0a,'text':_0x3cfe7d});}const _0x59902b=new Array(_0x16a2ca)['fill']('\x20');let _0x5baed6=-0x1;for(const {pos:_0x6db8e1,text:_0x3b60a5}of _0x459c56){let _0x26b62b=Math[_0x17b1b5(0x1d8)](0x0,_0x6db8e1-Math[_0x17b1b5(0x140)](_0x3b60a5[_0x17b1b5(0xff)]/0x2));_0x26b62b<=_0x5baed6+TIMELINE_CONFIG[_0x17b1b5(0x167)]&&(_0x26b62b=_0x5baed6+TIMELINE_CONFIG[_0x17b1b5(0x167)]+0x1);_0x26b62b+_0x3b60a5[_0x17b1b5(0xff)]>_0x16a2ca&&(_0x26b62b=_0x16a2ca-_0x3b60a5[_0x17b1b5(0xff)]);if(_0x26b62b>=0x0&&_0x26b62b+_0x3b60a5[_0x17b1b5(0xff)]<=_0x16a2ca&&_0x26b62b>_0x5baed6){for(let _0x1ca15e=0x0;_0x1ca15e<_0x3b60a5[_0x17b1b5(0xff)];_0x1ca15e++){_0x59902b[_0x26b62b+_0x1ca15e]=_0x3b60a5[_0x1ca15e];}_0x5baed6=_0x26b62b+_0x3b60a5[_0x17b1b5(0xff)]-0x1;}}return _0x59902b[_0x17b1b5(0x131)]('');}function renderTaskRow(_0x50da0c,_0x252d6c,_0x2f5a58,_0x1c00e2){const _0x1da0c5=a42_0xb2f7ca,{level:_0x430ea4,name:_0x583c13}=parseTaskName(_0x50da0c[_0x1da0c5(0x110)]),_0x976e4c='\x20'[_0x1da0c5(0x10a)](_0x430ea4),_0x1f8a9e=_0x50da0c[_0x1da0c5(0x14e)]?'('+formatElapsed(_0x50da0c[_0x1da0c5(0x14e)]['duration'])+')':'',_0x4d83ef=stringWidth(_0x1f8a9e),_0x3d0df8=_0x430ea4*0x1,_0x1af58d=_0x1c00e2-_0x3d0df8-_0x4d83ef-0x1,_0x29ea17=truncateTaskName(_0x583c13,_0x1af58d),_0xef30e1=_0x976e4c+_0x29ea17,_0x3dea7c=stringWidth(_0xef30e1),_0x3bfd1c=_0x1c00e2-_0x3dea7c-_0x4d83ef,_0x43b431=_0xef30e1+'\x20'[_0x1da0c5(0x10a)](Math[_0x1da0c5(0x1d8)](0x1,_0x3bfd1c))+a42_0x5a0170['dim'](_0x1f8a9e),_0x550bd0=getTaskStateIcon(_0x50da0c[_0x1da0c5(0xed)]),_0x21c3db=new Array(_0x2f5a58)['fill']('\x20');if(_0x50da0c['window']){const _0x23d5bc=timeToPosition(_0x50da0c['window'][_0x1da0c5(0x13d)],_0x252d6c,_0x2f5a58),_0x4bc88a=timeToPosition(_0x50da0c[_0x1da0c5(0x14e)]['end'],_0x252d6c,_0x2f5a58),_0x248681=getBarChar(_0x50da0c[_0x1da0c5(0xed)]),_0x9d7153=Math['max'](_0x23d5bc+0x1,_0x4bc88a);for(let _0x40f449=_0x23d5bc;_0x40f449<Math[_0x1da0c5(0x1e2)](_0x9d7153,_0x2f5a58);_0x40f449++){_0x21c3db[_0x40f449]=_0x248681;}}const _0x5ad0e2=getBarColor(_0x50da0c[_0x1da0c5(0xed)]),_0x4208e2=_0x21c3db[_0x1da0c5(0x260)](_0x3d7a4f=>_0x3d7a4f==='\x20'?'\x20':_0x5ad0e2(_0x3d7a4f))['join']('');return _0x550bd0+'\x20'+_0x43b431+'│'+_0x4208e2+'│';}function calculateStats(_0x19421b){const _0x50691f=a42_0xb2f7ca,_0x298f00={'total':_0x19421b[_0x50691f(0xff)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x11bf20 of _0x19421b){if(_0x11bf20[_0x50691f(0xed)]===_0x50691f(0x231))_0x298f00[_0x50691f(0x231)]++;else{if(_0x11bf20[_0x50691f(0xed)]===_0x50691f(0x160)||_0x11bf20[_0x50691f(0xed)]===_0x50691f(0x148))_0x298f00['error']++;else _0x11bf20[_0x50691f(0xed)]===_0x50691f(0x227)?_0x298f00[_0x50691f(0x227)]++:_0x298f00[_0x50691f(0x279)]++;}}return _0x298f00;}function formatStats(_0x1ee05f){const _0x98175=a42_0xb2f7ca;return[_0x98175(0x10b)+_0x1ee05f[_0x98175(0xe3)],'✅\x20'+_0x1ee05f[_0x98175(0x231)],'❌\x20'+_0x1ee05f['error'],'🔄\x20'+_0x1ee05f['running'],'⏳\x20'+_0x1ee05f[_0x98175(0x279)]][_0x98175(0x131)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0xb2f7ca(0x110)]=a42_0xb2f7ca(0x1fa);['description']=a42_0xb2f7ca(0x23e);async['execute'](_0x446732){const _0x154521=a42_0xb2f7ca,{options:_0x3cbe32,args:_0x1db10d,tdx:_0x53bde3}=_0x446732;let _0x5aed7b,_0x4205ad,_0xdada01=![];if(_0x1db10d[0x0]){if(_0x1db10d[0x0][_0x154521(0x18b)]('.')){const _0x4e3875=this['parseProjectWorkflowPattern'](_0x1db10d,_0x3cbe32);if(!_0x4e3875)return 0x1;_0x5aed7b=_0x4e3875[_0x154521(0x1b4)],_0x4205ad=_0x4e3875[_0x154521(0x161)];}else{_0x4205ad=_0x1db10d[0x0],_0x5aed7b=_0x3cbe32['workflowProject'];if(!_0x5aed7b)return console[_0x154521(0x160)](a42_0x5a0170[_0x154521(0x154)](_0x154521(0x19a)),_0x154521(0x182)),0x1;_0xdada01=!![];}}else{const _0x18ed94=this[_0x154521(0x1d4)](_0x1db10d,_0x3cbe32);if(!_0x18ed94)return 0x1;_0x5aed7b=_0x18ed94['projectName'],_0x4205ad=_0x18ed94[_0x154521(0x161)];}if(_0x3cbe32[_0x154521(0x26f)]){if(_0x5aed7b&&_0x4205ad)console[_0x154521(0x160)](_0x154521(0x22d)+_0x5aed7b+'.'+_0x4205ad);else _0x5aed7b&&console[_0x154521(0x160)]('Filter:\x20project='+_0x5aed7b);}const _0x340332=_0x3cbe32['attemptId'],_0x286471=_0x3cbe32[_0x154521(0xf4)];if(_0x340332){_0x286471&&console[_0x154521(0x160)](a42_0x5a0170[_0x154521(0xec)](_0x154521(0x23f)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x25df81=_0x3cbe32[_0x154521(0x14d)];return _0x25df81?await this[_0x154521(0x172)](_0x446732,_0x340332):await this['renderSingleTimeline'](_0x446732,_0x340332,_0x3cbe32),0x0;}if(_0x286471){const _0x46b740=await withSpinner(_0x154521(0x20e),()=>_0x53bde3['workflow']['sessions']({'projectName':_0x5aed7b,'workflowName':_0x4205ad,'limit':0x64}),{'verbose':_0x3cbe32[_0x154521(0x26f)]}),_0x3ece46=_0x46b740[_0x154521(0x269)][_0x154521(0x143)](_0x42ee23=>_0x42ee23['id']===_0x286471);if(!_0x3ece46)return console[_0x154521(0x160)](a42_0x5a0170[_0x154521(0x154)](_0x154521(0x19a)),_0x154521(0x193)+_0x286471),0x1;if(!_0x3ece46[_0x154521(0x16a)]?.['id'])return console[_0x154521(0x160)](a42_0x5a0170[_0x154521(0x154)]('Error:'),'Session\x20'+_0x286471+_0x154521(0xd2)),0x1;const _0x45f2d6=_0x3ece46[_0x154521(0x16a)]['id'];_0x3cbe32[_0x154521(0x26f)]&&console[_0x154521(0x160)]('Using\x20attempt\x20'+_0x45f2d6+_0x154521(0x23d)+_0x286471);const _0x210716=_0x3cbe32[_0x154521(0x14d)];return _0x210716?await this['pollTimeline'](_0x446732,_0x45f2d6):await this[_0x154521(0x25b)](_0x446732,_0x45f2d6,_0x3cbe32),0x0;}const _0x504dd3=await withSpinner('Loading\x20sessions...',()=>_0x53bde3[_0x154521(0xeb)][_0x154521(0x1db)]({'projectName':_0x5aed7b,'workflowName':_0x4205ad,'limit':_0x3cbe32['limit']||0x32}),{'verbose':_0x3cbe32[_0x154521(0x26f)]}),_0x247c9e=_0x504dd3[_0x154521(0x269)];if(_0x247c9e[_0x154521(0xff)]===0x0){if(_0x5aed7b&&_0x4205ad)console[_0x154521(0x160)]('No\x20sessions\x20found\x20for:\x20'+_0x5aed7b+'.'+_0x4205ad);else _0x5aed7b?console[_0x154521(0x160)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x5aed7b):(console[_0x154521(0x160)](_0x154521(0x266)),console[_0x154521(0x160)](a42_0x5a0170['dim'](_0x154521(0x1e5))));return 0x0;}_0x247c9e['sort']((_0x2fa910,_0x5ef8bd)=>{const _0x10360d=_0x154521,_0x34c366=_0x2fa910[_0x10360d(0x1ba)]||'',_0x1936e1=_0x5ef8bd[_0x10360d(0x1ba)]||'';return _0x1936e1[_0x10360d(0x1b5)](_0x34c366);});if(_0x3cbe32[_0x154521(0x20d)]||_0x3cbe32[_0x154521(0x239)])return await handleSDKOutput(_0x247c9e,_0x3cbe32),0x0;let _0x40b1e9;if(_0xdada01){const _0x1e81ea=_0x247c9e[0x0];if(!_0x1e81ea[_0x154521(0x16a)]?.['id'])return console[_0x154521(0x160)](_0x154521(0x184)),0x0;_0x40b1e9=_0x1e81ea[_0x154521(0x16a)]['id'],_0x3cbe32['verbose']&&console[_0x154521(0x160)](_0x154521(0x26d)+_0x1e81ea[_0x154521(0x1ba)]);}else{const _0x262274=_0x247c9e[_0x154521(0x260)](_0x4f679c=>{const _0x45b1a3=_0x154521,_0x30fa0f=getAttemptStatusDisplay(_0x4f679c[_0x45b1a3(0x16a)]);return{'title':_0x4f679c[_0x45b1a3(0x102)]?.[_0x45b1a3(0x110)]+'.'+_0x4f679c[_0x45b1a3(0xeb)]?.[_0x45b1a3(0x110)]+_0x45b1a3(0x198)+_0x4f679c[_0x45b1a3(0x1ba)]+'\x20'+_0x30fa0f['icon'],'value':_0x4f679c[_0x45b1a3(0x16a)]?.['id']||'','description':_0x30fa0f[_0x45b1a3(0x208)]};}),_0x526fb8=await a42_0x36a210({'type':_0x154521(0xd0),'name':'attemptId','message':_0x154521(0xe0),'choices':_0x262274['filter'](_0x379267=>_0x379267[_0x154521(0x241)]!=='')});if(!_0x526fb8[_0x154521(0x1c0)])return 0x0;_0x40b1e9=_0x526fb8[_0x154521(0x1c0)];}const _0x20ef20=_0x3cbe32[_0x154521(0x14d)];return _0x20ef20?await this[_0x154521(0x172)](_0x446732,_0x40b1e9):await this[_0x154521(0x25b)](_0x446732,_0x40b1e9,_0x3cbe32),0x0;}async[a42_0xb2f7ca(0x25b)](_0x483cd2,_0x14c379,_0x36492a){const _0x446ca8=a42_0xb2f7ca,{tdx:_0x34b48d}=_0x483cd2;let _0x290088,_0x4ef134;try{[_0x290088,_0x4ef134]=await Promise[_0x446ca8(0x276)]([_0x34b48d['workflow'][_0x446ca8(0xf7)](_0x14c379),_0x34b48d[_0x446ca8(0xeb)][_0x446ca8(0x254)](_0x14c379,![])]);}catch(_0x488a4c){console['error'](a42_0x5a0170['red'](_0x446ca8(0xd4)));_0x36492a[_0x446ca8(0x26f)]&&console['error'](_0x488a4c);throw _0x488a4c;}if(_0x36492a[_0x446ca8(0x20d)]||_0x36492a[_0x446ca8(0x239)]){const _0x2e74e1=this[_0x446ca8(0x177)](_0x290088,_0x4ef134);await handleSDKOutput([_0x2e74e1],_0x36492a);return;}const _0x5d9477=_0x34b48d['context']['site'],_0x112311=this[_0x446ca8(0x104)](_0x290088,_0x4ef134,_0x5d9477);console[_0x446ca8(0x1df)](_0x112311);}async[a42_0xb2f7ca(0x172)](_0x34be81,_0x4604d7){const _0x36e1ea=a42_0xb2f7ca,{tdx:_0x3ea367}=_0x34be81,_0x3516b0=TIMELINE_CONFIG[_0x36e1ea(0x1f3)],_0x57fad2=TIMELINE_CONFIG[_0x36e1ea(0xe1)];let _0xa7678f=0x0;while(_0xa7678f<_0x57fad2){process[_0x36e1ea(0xf2)][_0x36e1ea(0x1f9)]&&process[_0x36e1ea(0xf2)]['write']('\x1bc');let _0x311c31,_0x2cde3c;try{[_0x311c31,_0x2cde3c]=await Promise[_0x36e1ea(0x276)]([_0x3ea367[_0x36e1ea(0xeb)]['attempt'](_0x4604d7),_0x3ea367['workflow'][_0x36e1ea(0x254)](_0x4604d7,![])]);}catch(_0x2266c6){console[_0x36e1ea(0x160)](a42_0x5a0170[_0x36e1ea(0x154)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0xa7678f>0x0&&console[_0x36e1ea(0x160)](a42_0x5a0170[_0x36e1ea(0xdd)](_0x36e1ea(0x217)+_0xa7678f));throw _0x2266c6;}const _0x4b9d8f=_0x3ea367['context'][_0x36e1ea(0x156)],_0x5d9366=this[_0x36e1ea(0x104)](_0x311c31,_0x2cde3c,_0x4b9d8f);console[_0x36e1ea(0x1df)](_0x5d9366);const _0x64329=_0x311c31[_0x36e1ea(0x24e)]&&_0x2cde3c['every'](_0x90581f=>_0x90581f[_0x36e1ea(0xed)]!==_0x36e1ea(0x227)&&_0x90581f[_0x36e1ea(0xed)]!==_0x36e1ea(0x1f5));if(_0x64329){console[_0x36e1ea(0x160)](a42_0x5a0170[_0x36e1ea(0x12e)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x36e1ea(0x160)](a42_0x5a0170[_0x36e1ea(0xdd)](_0x36e1ea(0xef)+_0xa7678f*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x384148=>setTimeout(_0x384148,_0x3516b0)),_0xa7678f++;}_0xa7678f>=_0x57fad2&&console[_0x36e1ea(0x160)](a42_0x5a0170['yellow'](_0x36e1ea(0x1aa)));}[a42_0xb2f7ca(0x104)](_0x382008,_0x1bd97e,_0xa76a2b){const _0x46ddf5=a42_0xb2f7ca,_0x1167a4=[],_0x127fa2=TIMELINE_CONFIG[_0x46ddf5(0x205)],_0x404013=0x5,_0x574c5b=process[_0x46ddf5(0xf2)][_0x46ddf5(0x1d0)]||0x78,_0x2f9def=_0x574c5b-_0x127fa2-_0x404013,_0x598689=Math[_0x46ddf5(0x1d8)](TIMELINE_CONFIG[_0x46ddf5(0x1b3)],Math[_0x46ddf5(0x1e2)](_0x2f9def,TIMELINE_CONFIG[_0x46ddf5(0x1cb)])),_0x1d18bd=new Date(_0x382008['createdAt'])['getTime'](),_0x334d8c=_0x382008[_0x46ddf5(0x1bc)]?new Date(_0x382008[_0x46ddf5(0x1bc)])[_0x46ddf5(0x180)]():Date[_0x46ddf5(0x191)](),_0x3933ad={'start':_0x1d18bd,'end':_0x334d8c,'duration':_0x334d8c-_0x1d18bd},_0x30bfc6=new Map(),_0x35f114=[];for(const _0x22c417 of _0x1bd97e){if(_0x22c417[_0x46ddf5(0x165)]){const _0x56f162=new Date(_0x22c417['startedAt'])[_0x46ddf5(0x180)](),_0x3c2234=_0x22c417[_0x46ddf5(0x112)]?new Date(_0x22c417['updatedAt'])['getTime']():Date['now'](),_0xe5a7c6={'start':_0x56f162,'end':_0x3c2234,'duration':_0x3c2234-_0x56f162};_0x30bfc6[_0x46ddf5(0x23c)](_0x22c417['id'],_0xe5a7c6),_0x35f114[_0x46ddf5(0x1a2)]({'name':_0x22c417['fullName'],'state':_0x22c417['state']||_0x46ddf5(0x166),'window':_0xe5a7c6});}else _0x35f114[_0x46ddf5(0x1a2)]({'name':_0x22c417['fullName'],'state':_0x22c417[_0x46ddf5(0xed)]||_0x46ddf5(0x1f5),'window':undefined});}_0x35f114[_0x46ddf5(0x264)]((_0x32dfa0,_0x2ebdb7)=>{const _0x1c508a=_0x46ddf5;if(!_0x32dfa0[_0x1c508a(0x14e)])return 0x1;if(!_0x2ebdb7['window'])return-0x1;return _0x32dfa0[_0x1c508a(0x14e)][_0x1c508a(0x13d)]-_0x2ebdb7[_0x1c508a(0x14e)][_0x1c508a(0x13d)];});const _0x26ae75=_0x35f114[_0x46ddf5(0xff)],_0x5baf48=_0x26ae75>TIMELINE_CONFIG[_0x46ddf5(0x1d5)];_0x5baf48&&_0x35f114[_0x46ddf5(0x235)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x4f4d98=calculateTimeScale(_0x3933ad,_0x598689),_0x22cb15=_0x382008[_0x46ddf5(0x24e)]?_0x382008['success']?a42_0x5a0170[_0x46ddf5(0x12e)]('success'):a42_0x5a0170[_0x46ddf5(0x154)](_0x46ddf5(0x160)):a42_0x5a0170[_0x46ddf5(0x1cc)](_0x46ddf5(0x227)),_0x536e45=_0x382008[_0x46ddf5(0x102)]?.['id'],_0x152233=_0x382008[_0x46ddf5(0xf4)];let _0x45e007;if(_0x536e45&&_0x152233){const _0x2e278a=getWorkflowAttemptUrl(_0xa76a2b,_0x536e45,_0x152233,_0x382008['id']);_0x45e007=hyperlink(a42_0x5a0170[_0x46ddf5(0xdd)](_0x382008['id']),_0x2e278a);}else _0x45e007=a42_0x5a0170[_0x46ddf5(0xdd)](_0x382008['id']);_0x1167a4[_0x46ddf5(0x1a2)](_0x46ddf5(0x115)+_0x45e007+'\x20-\x20'+_0x22cb15+_0x46ddf5(0x198)+formatElapsed(_0x3933ad['duration']));if(_0x35f114[_0x46ddf5(0xff)]>0x0){const _0x22b012=renderTimeAxis(_0x4f4d98,_0x598689),_0x1328d2=new Date(_0x3933ad[_0x46ddf5(0x13d)]),_0x307e21=formatDate(_0x1328d2),_0x427bc1=TIMELINE_CONFIG[_0x46ddf5(0x1c4)]+TIMELINE_CONFIG[_0x46ddf5(0x1da)]+_0x127fa2,_0x28a8a5=_0x307e21['padStart'](_0x427bc1),_0x1080aa=a42_0x5a0170[_0x46ddf5(0xdd)](_0x28a8a5);_0x1167a4[_0x46ddf5(0x1a2)](_0x1080aa+'\x20'+_0x22b012);for(const _0x232287 of _0x35f114){_0x1167a4[_0x46ddf5(0x1a2)](renderTaskRow(_0x232287,_0x4f4d98,_0x598689,_0x127fa2));}const _0x151610=calculateStats(_0x35f114);_0x1167a4['push'](formatStats(_0x151610)),_0x5baf48&&_0x1167a4[_0x46ddf5(0x1a2)](a42_0x5a0170['yellow'](_0x46ddf5(0x26e)+TIMELINE_CONFIG[_0x46ddf5(0x1d5)]+'\x20of\x20'+_0x26ae75+'\x20tasks')),_0x1167a4[_0x46ddf5(0x1a2)](''),_0x1167a4[_0x46ddf5(0x1a2)](a42_0x5a0170[_0x46ddf5(0xdd)](_0x46ddf5(0x24a))+('tdx\x20wf\x20attempt\x20'+_0x382008['id']+_0x46ddf5(0x1ee))+a42_0x5a0170[_0x46ddf5(0xdd)](_0x46ddf5(0xfc)));}else _0x1167a4['push'](_0x46ddf5(0x15a));return _0x1167a4[_0x46ddf5(0x131)]('\x0a');}[a42_0xb2f7ca(0x177)](_0x234c05,_0xe1f98b){const _0x4c7eda=a42_0xb2f7ca,_0x2f8e33=new Date(_0x234c05[_0x4c7eda(0xdf)])[_0x4c7eda(0x180)](),_0x170e22=_0x234c05['finishedAt']?new Date(_0x234c05[_0x4c7eda(0x1bc)])['getTime']():Date[_0x4c7eda(0x191)](),_0x1e05c1=_0x170e22-_0x2f8e33,_0x24e003=[];for(const _0x17834a of _0xe1f98b){if(_0x17834a[_0x4c7eda(0x165)]){const _0x6e0651=new Date(_0x17834a[_0x4c7eda(0x165)])[_0x4c7eda(0x180)](),_0x68f6bc=_0x17834a[_0x4c7eda(0x112)]?new Date(_0x17834a[_0x4c7eda(0x112)])[_0x4c7eda(0x180)]():Date[_0x4c7eda(0x191)]();_0x24e003[_0x4c7eda(0x1a2)]({'name':_0x17834a[_0x4c7eda(0x261)],'state':_0x17834a['state']||'unknown','window':{'start':_0x6e0651,'end':_0x68f6bc,'duration':_0x68f6bc-_0x6e0651}});}else _0x24e003[_0x4c7eda(0x1a2)]({'name':_0x17834a[_0x4c7eda(0x261)],'state':_0x17834a['state']||_0x4c7eda(0x1f5),'window':undefined});}const _0x13a09f=calculateStats(_0x24e003);return{'attempt':{'id':_0x234c05['id'],'status':_0x234c05[_0x4c7eda(0x24e)]?_0x234c05[_0x4c7eda(0x231)]?'success':'error':_0x4c7eda(0x227),'createdAt':_0x234c05[_0x4c7eda(0xdf)],'finishedAt':_0x234c05[_0x4c7eda(0x1bc)],'duration_ms':_0x1e05c1},'tasks':_0x24e003[_0x4c7eda(0x260)](_0x50b924=>({'name':_0x50b924[_0x4c7eda(0x110)],'state':_0x50b924[_0x4c7eda(0xed)],'startedAt':_0x50b924['window']?new Date(_0x50b924[_0x4c7eda(0x14e)][_0x4c7eda(0x13d)])['toISOString']():null,'updatedAt':_0x50b924['window']?new Date(_0x50b924['window'][_0x4c7eda(0x222)])[_0x4c7eda(0x25a)]():null,'duration_ms':_0x50b924[_0x4c7eda(0x14e)]?.[_0x4c7eda(0x1e9)]||null})),'stats':_0x13a09f};}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0xed453,_0x524a6a){const _0x49a3ce=a43_0x3aa9,_0x206c24=_0xed453();while(!![]){try{const _0x35d653=-parseInt(_0x49a3ce(0x9a))/0x1*(parseInt(_0x49a3ce(0xa1))/0x2)+parseInt(_0x49a3ce(0xa6))/0x3+-parseInt(_0x49a3ce(0x96))/0x4*(parseInt(_0x49a3ce(0x9b))/0x5)+parseInt(_0x49a3ce(0xa3))/0x6+-parseInt(_0x49a3ce(0xa0))/0x7+-parseInt(_0x49a3ce(0x98))/0x8+-parseInt(_0x49a3ce(0x9d))/0x9*(-parseInt(_0x49a3ce(0x9f))/0xa);if(_0x35d653===_0x524a6a)break;else _0x206c24['push'](_0x206c24['shift']());}catch(_0x139e6d){_0x206c24['push'](_0x206c24['shift']());}}}(a43_0x2b56,0x3315c));import{platform}from'os';function a43_0x3aa9(_0x3ed214,_0x5bb255){_0x3ed214=_0x3ed214-0x95;const _0x2b5697=a43_0x2b56();let _0x3aa9bf=_0x2b5697[_0x3ed214];return _0x3aa9bf;}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0xc1018f=a43_0x3aa9,_0x586123=getVersion(),_0x1886ef=platform(),_0x35f706=process[_0xc1018f(0x97)][_0xc1018f(0xa4)]('v','');return _0xc1018f(0x9c)+_0x586123+'\x20('+_0x1886ef+_0xc1018f(0xa2)+_0x35f706+')';}function a43_0x2b56(){const _0x46306c=['tdx/','93060spyyAC','length','610nfqTym','478289leDeyY','25106NOrQMK',';\x20node/','1979712ikUbyd','replace','TD1\x20','156945CIFzpc','Authorization','tdx','1996qRfsmq','version','2489912KVQuHR','X-Trino-User','7rMpwHU','3370dKnaCg'];a43_0x2b56=function(){return _0x46306c;};return a43_0x2b56();}export function getAuthHeaders(_0x34b1dd,_0x3070ff){const _0x2d63f2=a43_0x3aa9,_0x551524=getVersion(),_0x4ed93b={'User-Agent':getUserAgent(),'X-TD-Client':_0x2d63f2(0x95),'X-TD-Client-Version':_0x551524};return _0x3070ff&&(_0x4ed93b[_0x2d63f2(0xa7)]=_0x2d63f2(0xa5)+_0x3070ff),_0x4ed93b;}export function toHeaderRecord(_0x3dac00){const _0x5a9eb6={};for(const [_0x240cf5,_0x2a0897]of Object['entries'](_0x3dac00)){_0x2a0897!==undefined&&(_0x5a9eb6[_0x240cf5]=_0x2a0897);}return _0x5a9eb6;}export function getTrinoHeaders(_0x441f53,_0x8e4624){const _0x20b8c5=a43_0x3aa9,_0x4c5d35=getAuthHeaders(_0x441f53,_0x8e4624),_0x4368df=toHeaderRecord(_0x4c5d35);return delete _0x4368df[_0x20b8c5(0xa7)],_0x8e4624&&(_0x4368df[_0x20b8c5(0x99)]=_0x8e4624),_0x4368df;}export function hasAPIKey(_0x942977){const _0x33d417=a43_0x3aa9,_0xa22561=getAPIKey(_0x942977);return _0xa22561!==undefined&&_0xa22561[_0x33d417(0x9e)]>0x0;}
1
+ (function(_0x2c165e,_0x4a1860){const _0x46ca2f=a43_0x5ac1,_0x362ecf=_0x2c165e();while(!![]){try{const _0x576785=parseInt(_0x46ca2f(0x1ee))/0x1+-parseInt(_0x46ca2f(0x1eb))/0x2*(-parseInt(_0x46ca2f(0x1f8))/0x3)+-parseInt(_0x46ca2f(0x1e9))/0x4*(-parseInt(_0x46ca2f(0x1f4))/0x5)+-parseInt(_0x46ca2f(0x1f5))/0x6+-parseInt(_0x46ca2f(0x1f6))/0x7*(-parseInt(_0x46ca2f(0x1f9))/0x8)+-parseInt(_0x46ca2f(0x1ed))/0x9*(-parseInt(_0x46ca2f(0x1fa))/0xa)+-parseInt(_0x46ca2f(0x1ec))/0xb;if(_0x576785===_0x4a1860)break;else _0x362ecf['push'](_0x362ecf['shift']());}catch(_0x27cb58){_0x362ecf['push'](_0x362ecf['shift']());}}}(a43_0x776c,0xe5f89));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a43_0x5ac1(_0x5d07a2,_0x20b406){_0x5d07a2=_0x5d07a2-0x1e9;const _0x776c30=a43_0x776c();let _0x5ac153=_0x776c30[_0x5d07a2];return _0x5ac153;}export function getUserAgent(){const _0x184dba=a43_0x5ac1,_0x5ddf03=getVersion(),_0x4f7958=platform(),_0x6bb2c5=process[_0x184dba(0x1f0)][_0x184dba(0x1f7)]('v','');return _0x184dba(0x1f3)+_0x5ddf03+'\x20('+_0x4f7958+_0x184dba(0x1f1)+_0x6bb2c5+')';}export function getAuthHeaders(_0x5933ae,_0x3769cd){const _0xc1a6e7=a43_0x5ac1,_0x2bca69=getVersion(),_0x1b73a8={'User-Agent':getUserAgent(),'X-TD-Client':_0xc1a6e7(0x1ea),'X-TD-Client-Version':_0x2bca69};return _0x3769cd&&(_0x1b73a8[_0xc1a6e7(0x1f2)]=_0xc1a6e7(0x1ef)+_0x3769cd),_0x1b73a8;}export function toHeaderRecord(_0x145d92){const _0x475caf=a43_0x5ac1,_0x2d4662={};for(const [_0x681cb2,_0x46be72]of Object[_0x475caf(0x1fb)](_0x145d92)){_0x46be72!==undefined&&(_0x2d4662[_0x681cb2]=_0x46be72);}return _0x2d4662;}export function getTrinoHeaders(_0x184c53,_0x326af3){const _0xb1755e=a43_0x5ac1,_0x292614=getAuthHeaders(_0x184c53,_0x326af3),_0x1fcbf5=toHeaderRecord(_0x292614);return delete _0x1fcbf5[_0xb1755e(0x1f2)],_0x326af3&&(_0x1fcbf5['X-Trino-User']=_0x326af3),_0x1fcbf5;}function a43_0x776c(){const _0x238b0f=['tdx','508150BqtCia','55077682dalxOr','14505507uegDCL','1337291ROIXaI','TD1\x20','version',';\x20node/','Authorization','tdx/','37025smZtLM','3318318dXUXjA','42889xlcDHy','replace','21OwTpVB','2288bdwUrq','10DHNoDt','entries','12noQvkK'];a43_0x776c=function(){return _0x238b0f;};return a43_0x776c();}export function hasAPIKey(_0x389fa4){const _0x294bd3=getAPIKey(_0x389fa4);return _0x294bd3!==undefined&&_0x294bd3['length']>0x0;}