@treasuredata/tdx 0.16.9 → 0.16.10

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_0x5d4458=a40_0x5f20;(function(_0x2e0bfd,_0x7b6d67){const _0x3c37c5=a40_0x5f20,_0x23c7ba=_0x2e0bfd();while(!![]){try{const _0x3e3d4f=-parseInt(_0x3c37c5(0x81))/0x1+parseInt(_0x3c37c5(0xa7))/0x2+parseInt(_0x3c37c5(0x8f))/0x3*(-parseInt(_0x3c37c5(0x96))/0x4)+parseInt(_0x3c37c5(0x92))/0x5+parseInt(_0x3c37c5(0x9f))/0x6*(parseInt(_0x3c37c5(0x74))/0x7)+-parseInt(_0x3c37c5(0x72))/0x8+-parseInt(_0x3c37c5(0xa4))/0x9;if(_0x3e3d4f===_0x7b6d67)break;else _0x23c7ba['push'](_0x23c7ba['shift']());}catch(_0x1d738b){_0x23c7ba['push'](_0x23c7ba['shift']());}}}(a40_0x1579,0xe3814));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';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir}from'../core/config.js';import a40_0xd48cbd from'chalk';import*as a40_0x4c0939 from'node:path';function a40_0x5f20(_0x148897,_0x35c8b1){_0x148897=_0x148897-0x6a;const _0x15791a=a40_0x1579();let _0x5f201c=_0x15791a[_0x148897];return _0x5f201c;}export class UseCommand extends BaseCommand{['name']='use';[a40_0x5d4458(0x76)]=a40_0x5d4458(0x8b);[a40_0x5d4458(0x7c)](_0x3a31dc){const _0x506ee7=a40_0x5d4458,{args:_0x4d59d7,options:_0x5d26f6}=_0x3a31dc,_0x5c7e50=_0x5d26f6[_0x506ee7(0x90)];if(_0x4d59d7['length']===0x0)return undefined;if(_0x4d59d7['length']===0x1)return _0x506ee7(0x6b)+_0x506ee7(0x7b)+_0x506ee7(0x98)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0x506ee7(0x93)+_0x506ee7(0xa0)+_0x506ee7(0x73);const _0x50db36=_0x4d59d7[0x0],_0x556c9f=['site',_0x506ee7(0xa1),_0x506ee7(0x6c),_0x506ee7(0x94),_0x506ee7(0x8a),_0x506ee7(0xa6),_0x506ee7(0x86)];if(!_0x556c9f[_0x506ee7(0x7e)](_0x50db36))return _0x506ee7(0x8e)+_0x50db36+_0x506ee7(0x9a)+_0x556c9f[_0x506ee7(0x9d)](',\x20');if(_0x5c7e50&&_0x50db36!==_0x506ee7(0x83)&&_0x50db36!==_0x506ee7(0xa6))return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async[a40_0x5d4458(0x7f)](_0x168276){const _0x53836c=a40_0x5d4458,{args:_0x16f150,options:_0xedb9a8}=_0x168276,_0x405861=_0xedb9a8[_0x53836c(0x95)],_0x3aa90b=_0xedb9a8[_0x53836c(0x7a)],_0x9e73b1=_0xedb9a8[_0x53836c(0x90)];cleanExpiredSessions();try{if(_0x3aa90b){clearSessionContext(_0xedb9a8['session']);const _0x59cda2=_0xedb9a8['session']||getCurrentSessionPID()['toString']();return console['log'](_0x53836c(0x9b)+a40_0xd48cbd['green']('cleared')+'\x20'+a40_0xd48cbd[_0x53836c(0xa2)]('(session:\x20'+_0x59cda2+')')),0x0;}if(_0x16f150['length']===0x0){const _0x149138=new GlobalContext(_0xedb9a8);return _0x405861?_0x149138[_0x53836c(0xa5)]():_0x149138['display'](),console['log'](a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x9c))),console[_0x53836c(0x87)](a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x75))),console[_0x53836c(0x87)](a40_0xd48cbd['dim']('Use\x20--default\x20with\x20site\x20or\x20profile\x20to\x20save\x20permanently')),0x0;}const _0xe4e984=_0x16f150[0x0],_0x2a326e=_0x16f150[0x1],_0x31f601=a40_0x4c0939[_0x53836c(0x9d)](getConfigDir(),_0x53836c(0x88));if(_0x9e73b1){if(_0xe4e984===_0x53836c(0x83))return saveDefaultSiteToUserConfig(_0x2a326e),console[_0x53836c(0x87)]('Default\x20site\x20set\x20to:\x20'+a40_0xd48cbd[_0x53836c(0x6e)](_0x2a326e)),console[_0x53836c(0x87)](a40_0xd48cbd[_0x53836c(0xa2)]('\x0aSaved\x20to:\x20'+_0x31f601)),0x0;if(_0xe4e984===_0x53836c(0xa6)){if(!profileExists(_0x2a326e))return console[_0x53836c(0x89)]('Error:\x20Profile\x20\x27'+_0x2a326e+'\x27\x20does\x20not\x20exist'),console[_0x53836c(0x89)](_0x53836c(0x80)),0x1;return saveActiveProfileToUserConfig(_0x2a326e),console[_0x53836c(0x87)](_0x53836c(0x85)+a40_0xd48cbd[_0x53836c(0x6e)](_0x2a326e)),console['log'](a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x9e)+_0x31f601)),0x0;}}if(_0xe4e984===_0x53836c(0x83)){const _0x5090c2=_0xedb9a8[_0x53836c(0x8c)]||getCurrentSessionPID()[_0x53836c(0x91)]();return saveSessionContext({'site':_0x2a326e},_0xedb9a8[_0x53836c(0x8c)]),console[_0x53836c(0x87)](_0x53836c(0xa3)+a40_0xd48cbd[_0x53836c(0x6e)](_0x2a326e)+'\x20'+a40_0xd48cbd['dim'](_0x53836c(0x99)+_0x5090c2+')')),console[_0x53836c(0x87)](a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x6f)+_0x2a326e+_0x53836c(0x7d))),0x0;}if(_0xe4e984===_0x53836c(0xa6)){if(!profileExists(_0x2a326e))return console[_0x53836c(0x89)](_0x53836c(0x6a)+_0x2a326e+_0x53836c(0x78)),console['error'](_0x53836c(0x80)),0x1;const _0x2ac51f=_0xedb9a8[_0x53836c(0x8c)]||getCurrentSessionPID()[_0x53836c(0x91)]();return saveSessionContext({'profile':_0x2a326e},_0xedb9a8[_0x53836c(0x8c)]),console[_0x53836c(0x87)](_0x53836c(0x6d)+a40_0xd48cbd[_0x53836c(0x6e)](_0x2a326e)+'\x20'+a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x99)+_0x2ac51f+')')),console[_0x53836c(0x87)](a40_0xd48cbd['dim'](_0x53836c(0x84)+_0x2a326e+_0x53836c(0x7d))),0x0;}const _0x24369c={},_0x2d30c0=_0xedb9a8['session']||getCurrentSessionPID()[_0x53836c(0x91)]();switch(_0xe4e984){case'database':_0x24369c[_0x53836c(0xa1)]=_0x2a326e,console[_0x53836c(0x87)](_0x53836c(0x97)+a40_0xd48cbd['green'](_0x2a326e)+'\x20'+a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x99)+_0x2d30c0+')'));break;case'parent_segment':_0x24369c[_0x53836c(0x6c)]=_0x2a326e,console[_0x53836c(0x87)]('Session\x20parent_segment\x20set\x20to:\x20'+a40_0xd48cbd[_0x53836c(0x6e)](_0x2a326e)+'\x20'+a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x99)+_0x2d30c0+')'));break;case _0x53836c(0x94):_0x24369c[_0x53836c(0x94)]=_0x2a326e,console[_0x53836c(0x87)](_0x53836c(0x70)+a40_0xd48cbd['green'](_0x2a326e)+'\x20'+a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x99)+_0x2d30c0+')'));break;case _0x53836c(0x8a):{const {projectName:_0x554ac0,agentName:_0x24b005}=parseAgentRef(_0x2a326e);_0x24b005?(_0x24369c[_0x53836c(0x94)]=_0x554ac0,_0x24369c[_0x53836c(0x82)]=_0x24b005,console[_0x53836c(0x87)](_0x53836c(0x70)+a40_0xd48cbd[_0x53836c(0x6e)](_0x554ac0)+'\x20'+a40_0xd48cbd['dim'](_0x53836c(0x99)+_0x2d30c0+')')),console['log']('Session\x20agent\x20set\x20to:\x20'+a40_0xd48cbd[_0x53836c(0x6e)](_0x24b005)+'\x20'+a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x99)+_0x2d30c0+')'))):(_0x24369c[_0x53836c(0x82)]=_0x2a326e,console[_0x53836c(0x87)](_0x53836c(0x8d)+a40_0xd48cbd[_0x53836c(0x6e)](_0x2a326e)+'\x20'+a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x99)+_0x2d30c0+')')));break;}case _0x53836c(0x86):_0x24369c['engage_workspace']=_0x2a326e,console[_0x53836c(0x87)](_0x53836c(0x79)+a40_0xd48cbd[_0x53836c(0x6e)](_0x2a326e)+'\x20'+a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x99)+_0x2d30c0+')'));break;}return saveSessionContext(_0x24369c,_0xedb9a8[_0x53836c(0x8c)]),console[_0x53836c(0x87)](a40_0xd48cbd[_0x53836c(0xa2)](_0x53836c(0x77))),0x0;}catch(_0x2d6a87){return _0x2d6a87 instanceof Error&&console[_0x53836c(0x89)]('Error:\x20'+_0x2d6a87[_0x53836c(0x71)]),0x1;}}}function a40_0x1579(){const _0x295f38=['Session\x20site\x20set\x20to:\x20','1180053cqIaMo','displayWithSources','profile','2122664zrHueP','Error:\x20Profile\x20\x27','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','parent_segment','Session\x20profile\x20set\x20to:\x20','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Session\x20llm_project\x20set\x20to:\x20','message','9235296oIhEMv','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','84EPhxdI','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace','description','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x27\x20does\x20not\x20exist','Session\x20engage_workspace\x20set\x20to:\x20','clear','\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','validate','\x27\x20to\x20save\x20permanently','includes','execute','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','1266185drQCTZ','llm_agent','site','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Default\x20profile\x20set\x20to:\x20','engage_workspace','log','tdx.json','error','agent','Set\x20session-level\x20context','session','Session\x20agent\x20set\x20to:\x20','Invalid\x20resource:\x20','3fdXNds','default','toString','6860275jmYvCQ','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','llm_project','debug','1357412aEUPrc','Session\x20database\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','(session:\x20','.\x20Must\x20be\x20one\x20of:\x20','Session\x20context\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','join','\x0aSaved\x20to:\x20','694770mYrehI','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','database','dim'];a40_0x1579=function(){return _0x295f38;};return a40_0x1579();}
@@ -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_0x4d0945=a41_0x3d63;(function(_0xee524e,_0x34cdab){const _0x1fd1fc=a41_0x3d63,_0x2de3f6=_0xee524e();while(!![]){try{const _0x48a365=-parseInt(_0x1fd1fc(0x149))/0x1*(-parseInt(_0x1fd1fc(0x14b))/0x2)+parseInt(_0x1fd1fc(0x155))/0x3+parseInt(_0x1fd1fc(0x147))/0x4+parseInt(_0x1fd1fc(0x153))/0x5*(-parseInt(_0x1fd1fc(0x150))/0x6)+parseInt(_0x1fd1fc(0x13c))/0x7+parseInt(_0x1fd1fc(0x143))/0x8+-parseInt(_0x1fd1fc(0x142))/0x9*(parseInt(_0x1fd1fc(0x151))/0xa);if(_0x48a365===_0x34cdab)break;else _0x2de3f6['push'](_0x2de3f6['shift']());}catch(_0x58e516){_0x2de3f6['push'](_0x2de3f6['shift']());}}}(a41_0x3472,0xec822));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a41_0x3d63(_0x2c0b42,_0x31d7c4){_0x2c0b42=_0x2c0b42-0x13c;const _0x3472f1=a41_0x3472();let _0x3d6338=_0x3472f1[_0x2c0b42];return _0x3d6338;}function a41_0x3472(){const _0x271c1f=['4902464rQJlJp','description','user\x20list','getCurrent','Listing\x20users...','\x20\x20Cause:\x20','55557ySBLTT','8424696gnsVCc','\x20user','user','error','678068skVySx','message','1VbQkpU','data','1163704lYTOAr','list','List\x20all\x20users\x20in\x20the\x20account','length','verbose','468ACGxvB','3790HmMbRu','cause','31385qRJUOH','execute','3879309odCgHF','name','Show\x20current\x20user\x20information','Error:\x20'];a41_0x3472=function(){return _0x271c1f;};return a41_0x3472();}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{['name']=a41_0x4d0945(0x145);[a41_0x4d0945(0x13d)]=a41_0x4d0945(0x157);async[a41_0x4d0945(0x154)](_0x46b296){const _0x1b0b57=a41_0x4d0945,{options:_0x5d06a7,tdx:_0x1fcc6c}=_0x46b296;try{const _0x28db6e=await withSpinner('Fetching\x20user\x20info...',()=>_0x1fcc6c[_0x1b0b57(0x145)][_0x1b0b57(0x13f)](),{'verbose':_0x5d06a7[_0x1b0b57(0x14f)]}),_0x41aa49=_0x28db6e[_0x1b0b57(0x14a)];return await handleSingleObjectOutput(_0x41aa49,_0x5d06a7),0x0;}catch(_0x726363){if(_0x726363 instanceof SDKError)return console['error']('Error:\x20'+_0x726363['message']),_0x726363['cause']&&console[_0x1b0b57(0x146)](_0x1b0b57(0x141)+_0x726363[_0x1b0b57(0x152)]),0x1;throw _0x726363;}}}export class UserListCommand extends BaseCommand{[a41_0x4d0945(0x156)]=a41_0x4d0945(0x13e);[a41_0x4d0945(0x13d)]=a41_0x4d0945(0x14d);async[a41_0x4d0945(0x154)](_0x1f1898){const _0x31fa49=a41_0x4d0945,{options:_0x141d14,tdx:_0x578e3a}=_0x1f1898;try{const _0x5b4a50=await withSpinner(_0x31fa49(0x140),()=>_0x578e3a[_0x31fa49(0x145)][_0x31fa49(0x14c)](),{'verbose':_0x141d14[_0x31fa49(0x14f)]}),_0x28716b=_0x5b4a50[_0x31fa49(0x14a)];return console[_0x31fa49(0x146)]('✔\x20Found\x20'+_0x28716b[_0x31fa49(0x14e)]+_0x31fa49(0x144)+(_0x28716b['length']!==0x1?'s':'')),await handleSDKOutput(_0x28716b,_0x141d14),0x0;}catch(_0x20de7e){if(_0x20de7e instanceof SDKError)return console[_0x31fa49(0x146)](_0x31fa49(0x158)+_0x20de7e[_0x31fa49(0x148)]),_0x20de7e[_0x31fa49(0x152)]&&console[_0x31fa49(0x146)]('\x20\x20Cause:\x20'+_0x20de7e[_0x31fa49(0x152)]),0x1;throw _0x20de7e;}}}
@@ -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_0x54c1ae=a42_0x207d;(function(_0x515ed9,_0x5a5d5c){const _0x1eeb87=a42_0x207d,_0x2c7df4=_0x515ed9();while(!![]){try{const _0x56e54c=parseInt(_0x1eeb87(0x19c))/0x1*(-parseInt(_0x1eeb87(0x1bd))/0x2)+-parseInt(_0x1eeb87(0x208))/0x3*(parseInt(_0x1eeb87(0x1ce))/0x4)+-parseInt(_0x1eeb87(0x1d5))/0x5*(parseInt(_0x1eeb87(0x2d3))/0x6)+parseInt(_0x1eeb87(0x1e9))/0x7+-parseInt(_0x1eeb87(0x2c9))/0x8+parseInt(_0x1eeb87(0x250))/0x9*(parseInt(_0x1eeb87(0x209))/0xa)+-parseInt(_0x1eeb87(0x24e))/0xb*(-parseInt(_0x1eeb87(0x135))/0xc);if(_0x56e54c===_0x5a5d5c)break;else _0x2c7df4['push'](_0x2c7df4['shift']());}catch(_0x3a5294){_0x2c7df4['push'](_0x2c7df4['shift']());}}}(a42_0x7041,0xe35ce));import a42_0x484372 from'chalk';import{existsSync}from'fs';import a42_0x42ed95 from'path';import{BaseCommand}from'./command.js';function a42_0x207d(_0x4bf056,_0x246967){_0x4bf056=_0x4bf056-0x12b;const _0x704181=a42_0x7041();let _0x207dda=_0x704181[_0x4bf056];return _0x207dda;}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_0x21f77b from'prompts';function getAttemptStatusDisplay(_0x30b0fd){const _0x3f8811=a42_0x207d;if(!_0x30b0fd)return{'icon':'⏳','text':''};const {done:_0x52ac99,success:_0x4079a8,cancelRequested:_0xfb8ace}=_0x30b0fd;if(!_0x52ac99)return _0xfb8ace?{'icon':'🛑','text':a42_0x484372[_0x3f8811(0x285)](_0x3f8811(0x2a8))}:{'icon':'🔄','text':a42_0x484372['blue'](_0x3f8811(0x19a))};if(_0x4079a8)return{'icon':'✅','text':a42_0x484372[_0x3f8811(0x282)](_0x3f8811(0x20d))};return{'icon':'❌','text':a42_0x484372[_0x3f8811(0x130)](_0x3f8811(0x272))};}export class WorkflowBaseCommand extends BaseCommand{[a42_0x54c1ae(0x2c8)](_0x39a72a,_0x4f607c,_0x475931=0x0){return _0x39a72a[_0x475931]||_0x4f607c['workflowProject'];}[a42_0x54c1ae(0x189)](_0x5b3082,_0x2d183e,_0xeaf724=0x0){const _0x138a85=a42_0x54c1ae,_0x5d3942=this[_0x138a85(0x2c8)](_0x5b3082,_0x2d183e,_0xeaf724);if(!_0x5d3942)return console[_0x138a85(0x272)](a42_0x484372[_0x138a85(0x130)](_0x138a85(0x241)),_0x138a85(0x206)),console[_0x138a85(0x272)](a42_0x484372[_0x138a85(0x257)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x5d3942;}[a42_0x54c1ae(0x1bf)](_0x54d9e1,_0x3428aa){const _0x18d01f=a42_0x54c1ae;if(_0x54d9e1[0x0]){const _0x5a1e82=_0x54d9e1[0x0][_0x18d01f(0x1e7)]('.');if(_0x5a1e82[_0x18d01f(0x2d2)]===0x1)return{'projectName':_0x5a1e82[0x0],'workflowName':undefined};else return _0x5a1e82[_0x18d01f(0x2d2)]===0x2?{'projectName':_0x5a1e82[0x0],'workflowName':_0x5a1e82[0x1]}:(console[_0x18d01f(0x272)](a42_0x484372['red']('Error:'),_0x18d01f(0x1b7)),null);}return{'projectName':_0x3428aa[_0x18d01f(0x133)],'workflowName':undefined};}['resolveProjectDir'](_0x42eb22,_0xcdfb82,_0x1ff6d=0x0){const _0x278949=a42_0x54c1ae;if(_0x42eb22[_0x1ff6d])return _0x42eb22[_0x1ff6d];if(_0xcdfb82[_0x278949(0x133)]){const _0x1afa88=a42_0x42ed95[_0x278949(0x253)](process['cwd'](),_0x278949(0x259),_0xcdfb82[_0x278949(0x133)]);if(existsSync(a42_0x42ed95[_0x278949(0x253)](_0x1afa88,_0x278949(0x278))))return _0x1afa88;}return undefined;}async[a42_0x54c1ae(0x2b2)](_0x534f78,_0x2a29d5,_0x436abe){const _0x38fce9=a42_0x54c1ae;try{const _0x5bcdc9=await _0x534f78['workflow'][_0x38fce9(0x259)](_0x2a29d5,{'limit':0x1});if(_0x5bcdc9['length']>0x0){const _0x724b62=_0x5bcdc9[0x0]['id'],_0x5e3499=getWorkflowUrl(_0x436abe,_0x724b62);console[_0x38fce9(0x272)](_0x38fce9(0x2ce)+a42_0x484372['cyan'](_0x5e3499));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x2af);['description']=a42_0x54c1ae(0x258);async[a42_0x54c1ae(0x17a)](_0x55d0e6){const _0x1a22e0=a42_0x54c1ae,{options:_0x155190,args:_0x42fca2,tdx:_0x2eb314}=_0x55d0e6,_0x3bf528=_0x42fca2[0x0],_0xe3e9c3=_0x155190[_0x1a22e0(0x1ba)];if(_0xe3e9c3)return saveSessionContext({'workflow_project':undefined},_0x155190[_0x1a22e0(0x231)]),console[_0x1a22e0(0x27c)](a42_0x484372[_0x1a22e0(0x282)](_0x1a22e0(0x205))),0x0;if(!_0x3bf528)return console[_0x1a22e0(0x272)](a42_0x484372['red'](_0x1a22e0(0x241)),'Project\x20name\x20is\x20required'),console['error'](a42_0x484372['dim'](_0x1a22e0(0x2ac))),console[_0x1a22e0(0x272)](a42_0x484372[_0x1a22e0(0x257)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x59522a=await withSpinner(_0x1a22e0(0x264)+_0x3bf528+_0x1a22e0(0x2c7),()=>_0x2eb314['workflow'][_0x1a22e0(0x12b)](_0x3bf528),{'verbose':_0x155190[_0x1a22e0(0x222)]}),{name:_0x38191e}=_0x59522a[_0x1a22e0(0x150)];return saveSessionContext({'workflow_project':_0x38191e},_0x155190[_0x1a22e0(0x231)]),console[_0x1a22e0(0x27c)](a42_0x484372[_0x1a22e0(0x282)](_0x1a22e0(0x14a)+a42_0x484372[_0x1a22e0(0x28c)](_0x38191e))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x54c1ae(0x236)]='workflow:projects';[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x18b);async[a42_0x54c1ae(0x17a)](_0x55d8c6){const _0x30e828=a42_0x54c1ae,{options:_0x16483f,args:_0x1f75a4,tdx:_0x3adb94}=_0x55d8c6,_0x1d9c32=_0x1f75a4[0x0];_0x16483f[_0x30e828(0x222)]&&_0x1d9c32&&console[_0x30e828(0x272)](_0x30e828(0x29d)+_0x1d9c32);const _0x570e29=await withSpinner(_0x30e828(0x18d),()=>_0x3adb94['workflow'][_0x30e828(0x267)](_0x1d9c32,{'limit':_0x16483f[_0x30e828(0x211)]}),{'verbose':_0x16483f[_0x30e828(0x222)]});let _0x2fd026=_0x570e29[_0x30e828(0x150)];_0x2fd026[_0x30e828(0x1ea)]((_0x270b8f,_0x1d54c0)=>_0x270b8f[_0x30e828(0x236)][_0x30e828(0x13e)](_0x1d54c0[_0x30e828(0x236)]));const _0x1a82bb=_0x16483f[_0x30e828(0x211)]||0x64,_0x177b47=_0x2fd026[_0x30e828(0x2d2)]>=_0x1a82bb?a42_0x484372[_0x30e828(0x257)](_0x30e828(0x262)):'';console[_0x30e828(0x272)]('✔\x20Found\x20'+_0x2fd026['length']+_0x30e828(0x20a)+(_0x2fd026['length']!==0x1?'s':'')+_0x177b47);if(_0x16483f[_0x30e828(0x197)]===_0x30e828(0x1f0)||_0x16483f[_0x30e828(0x197)]===_0x30e828(0x2b1)||_0x16483f[_0x30e828(0x197)]==='table')await handleSDKOutput(_0x2fd026,_0x16483f);else{if(_0x2fd026[_0x30e828(0x2d2)]===0x0)_0x1d9c32?console[_0x30e828(0x27c)]('No\x20projects\x20match\x20pattern:\x20'+_0x1d9c32):console[_0x30e828(0x27c)](_0x30e828(0x19d));else{const _0x5f3083=_0x2fd026[_0x30e828(0x25c)](_0x3996bf=>{const _0x2ca64c=_0x30e828,_0x3b87e8=_0x3996bf[_0x2ca64c(0x292)]?.[_0x2ca64c(0x2ca)](_0x4cd93f=>_0x4cd93f[_0x2ca64c(0x178)]===_0x2ca64c(0x1e8)),_0x1bdc9a=_0x3b87e8?a42_0x484372['dim'](_0x2ca64c(0x23c)):'';return _0x2ca64c(0x1f6)+_0x3996bf[_0x2ca64c(0x236)]+_0x1bdc9a;});await writeOutput(_0x5f3083['join']('\x0a'),_0x16483f[_0x30e828(0x204)],_0x30e828(0x295));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x54c1ae(0x236)]='workflow:workflows';[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x2ad);async[a42_0x54c1ae(0x17a)](_0x1e5755){const _0x1fcfb9=a42_0x54c1ae,{options:_0x54d0c8,args:_0x483a32,tdx:_0x3702e5}=_0x1e5755,_0xfd09eb=this['resolveProject'](_0x483a32,_0x54d0c8);_0x54d0c8[_0x1fcfb9(0x222)]&&_0xfd09eb&&console[_0x1fcfb9(0x272)]('Project\x20filter:\x20'+_0xfd09eb);const _0x156fb5=await withSpinner(_0x1fcfb9(0x1af),()=>_0x3702e5[_0x1fcfb9(0x247)][_0x1fcfb9(0x259)](_0xfd09eb,{'limit':_0x54d0c8[_0x1fcfb9(0x211)]}),{'verbose':_0x54d0c8[_0x1fcfb9(0x222)]});let _0x1dfc6a=_0x156fb5[_0x1fcfb9(0x150)];_0x1dfc6a['sort']((_0x4ad062,_0x48c0e0)=>{const _0x95922d=_0x1fcfb9,_0x3151ec=_0x4ad062[_0x95922d(0x236)][_0x95922d(0x13e)](_0x48c0e0['name']);if(_0x3151ec!==0x0)return _0x3151ec;return(_0x4ad062[_0x95922d(0x196)]?.['name']||'')[_0x95922d(0x13e)](_0x48c0e0[_0x95922d(0x196)]?.[_0x95922d(0x236)]||'');});const _0x41601f=_0x54d0c8[_0x1fcfb9(0x211)]||0x64,_0x4e6c50=_0x1dfc6a[_0x1fcfb9(0x2d2)]>=_0x41601f?a42_0x484372[_0x1fcfb9(0x257)](_0x1fcfb9(0x262)):'';console[_0x1fcfb9(0x272)](_0x1fcfb9(0x1d0)+_0x1dfc6a['length']+_0x1fcfb9(0x2a6)+(_0x1dfc6a['length']!==0x1?'s':'')+_0x4e6c50);if(_0x54d0c8['format']===_0x1fcfb9(0x1f0)||_0x54d0c8[_0x1fcfb9(0x197)]===_0x1fcfb9(0x2b1)||_0x54d0c8[_0x1fcfb9(0x197)]===_0x1fcfb9(0x192))await handleSDKOutput(_0x1dfc6a,_0x54d0c8);else{if(_0x1dfc6a[_0x1fcfb9(0x2d2)]===0x0)_0xfd09eb?console[_0x1fcfb9(0x27c)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0xfd09eb):console['log'](_0x1fcfb9(0x2d4));else{const _0x56d274=_0x54d0c8['site'],_0x2343c5=_0x1dfc6a[_0x1fcfb9(0x25c)](_0x5f3100=>{const _0x2325e2=_0x1fcfb9,_0x1910cf=a42_0x484372['dim']('#'+_0x5f3100['id']),_0x330beb=hyperlink(_0x1910cf,getWorkflowUrl(_0x56d274,_0x5f3100['id'])),_0x1db756=_0x5f3100[_0x2325e2(0x196)]?.[_0x2325e2(0x236)]?a42_0x484372[_0x2325e2(0x257)]('\x20('+_0x5f3100['project']['name']+')'):'';return'📋\x20'+_0x330beb+'\x20'+_0x5f3100['name']+_0x1db756;});await writeOutput(_0x2343c5['join']('\x0a'),_0x54d0c8[_0x1fcfb9(0x204)],_0x1fcfb9(0x295));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']='workflow:sessions';[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x2b7);async['execute'](_0x4e6631){const _0x30af55=a42_0x54c1ae,{options:_0x53cd1a,args:_0x119a50,tdx:_0x3d887e}=_0x4e6631,_0xebc00a=this[_0x30af55(0x1bf)](_0x119a50,_0x53cd1a);if(!_0xebc00a)return 0x1;const {projectName:_0x5a46c7,workflowName:_0x4ce0f3}=_0xebc00a;if(_0x53cd1a[_0x30af55(0x222)]){if(_0x5a46c7&&_0x4ce0f3)console[_0x30af55(0x272)](_0x30af55(0x225)+_0x5a46c7+'.'+_0x4ce0f3);else _0x5a46c7&&console['error'](_0x30af55(0x1a4)+_0x5a46c7);const _0x4f15e9=_0x53cd1a[_0x30af55(0x224)];_0x4f15e9&&console[_0x30af55(0x272)](_0x30af55(0x153)+_0x4f15e9);}let _0x4ba33b=0x28;if(process[_0x30af55(0x169)]['isTTY']&&!_0x53cd1a[_0x30af55(0x204)]&&!_0x53cd1a[_0x30af55(0x197)]){const _0x43f010=process[_0x30af55(0x169)]['rows']||0x28;_0x4ba33b=Math[_0x30af55(0x1a8)](0x14,Math[_0x30af55(0x19e)](_0x43f010*0x2/0x3));}const _0x1642c0=_0x53cd1a[_0x30af55(0x211)]||_0x4ba33b,_0xa4113=await withSpinner(_0x30af55(0x1e6),()=>_0x3d887e['workflow'][_0x30af55(0x26d)]({'projectName':_0x5a46c7,'workflowName':_0x4ce0f3,'status':_0x53cd1a[_0x30af55(0x224)],'fromTime':_0x53cd1a['from'],'toTime':_0x53cd1a['to'],'limit':_0x1642c0}),{'verbose':_0x53cd1a[_0x30af55(0x222)]}),_0x2d54e8=_0xa4113['data'];_0x2d54e8[_0x30af55(0x1ea)]((_0x2bfd25,_0x2bef19)=>{const _0x512e4e=_0x30af55,_0x352252=_0x2bfd25[_0x512e4e(0x266)]||'',_0x556ab7=_0x2bef19[_0x512e4e(0x266)]||'';return _0x556ab7[_0x512e4e(0x13e)](_0x352252);});_0x2d54e8[_0x30af55(0x2d2)]>=_0x1642c0?console[_0x30af55(0x272)](_0x30af55(0x254)+_0x2d54e8[_0x30af55(0x2d2)]+_0x30af55(0x1ff)+a42_0x484372[_0x30af55(0x257)](_0x30af55(0x2ae))):console[_0x30af55(0x272)](_0x30af55(0x1d0)+_0x2d54e8[_0x30af55(0x2d2)]+_0x30af55(0x2b6)+(_0x2d54e8[_0x30af55(0x2d2)]!==0x1?'s':''));if(_0x53cd1a[_0x30af55(0x197)]===_0x30af55(0x1f0)||_0x53cd1a[_0x30af55(0x197)]===_0x30af55(0x2b1)||_0x53cd1a[_0x30af55(0x197)]===_0x30af55(0x192))await handleSDKOutput(_0x2d54e8,_0x53cd1a);else{if(!process[_0x30af55(0x169)]['isTTY']||_0x53cd1a[_0x30af55(0x204)]){if(_0x2d54e8['length']===0x0){if(_0x5a46c7&&_0x4ce0f3)console['log'](_0x30af55(0x171)+_0x5a46c7+'.'+_0x4ce0f3);else _0x5a46c7?console['log'](_0x30af55(0x145)+_0x5a46c7):console['log'](_0x30af55(0x131));}else{const _0x33f111=_0x53cd1a[_0x30af55(0x1ed)],_0x31b0ea=this[_0x30af55(0x180)](_0x2d54e8,_0x33f111);_0x53cd1a['output']?await writeOutput(_0x31b0ea,_0x53cd1a[_0x30af55(0x204)],_0x30af55(0x295)):console[_0x30af55(0x27c)](_0x31b0ea);}!_0x5a46c7&&(console[_0x30af55(0x272)](''),console[_0x30af55(0x272)](a42_0x484372[_0x30af55(0x257)](_0x30af55(0x29c))),console[_0x30af55(0x272)](a42_0x484372[_0x30af55(0x257)](_0x30af55(0x21a))+'or'+a42_0x484372[_0x30af55(0x257)](_0x30af55(0x201))));}else{if(_0x2d54e8[_0x30af55(0x2d2)]===0x0){if(_0x5a46c7&&_0x4ce0f3)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x5a46c7+'.'+_0x4ce0f3);else _0x5a46c7?console[_0x30af55(0x27c)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x5a46c7):console[_0x30af55(0x27c)](_0x30af55(0x131));}else await this['navigateSessionsInteractive'](_0x2d54e8,_0x4e6631,_0x5a46c7);}}return 0x0;}[a42_0x54c1ae(0x180)](_0xafbed1,_0x5b92ef){const _0xf1ea07=a42_0x54c1ae,_0x5dff76=[],_0x598499=new Map();let _0x13a0ec=Infinity,_0x3bf662=-Infinity;for(const _0x5b6aa3 of _0xafbed1){if(_0x5b6aa3['lastAttempt']?.['createdAt']){const _0x5ae479=new Date(_0x5b6aa3['lastAttempt']['createdAt'])[_0xf1ea07(0x28a)](),_0x20e2c8=_0x5b6aa3['lastAttempt']['finishedAt']?new Date(_0x5b6aa3['lastAttempt']['finishedAt'])[_0xf1ea07(0x28a)]():Date[_0xf1ea07(0x255)](),_0xb3411a=_0x5b6aa3[_0xf1ea07(0x196)]?.[_0xf1ea07(0x236)]||_0xf1ea07(0x263);!_0x598499[_0xf1ea07(0x154)](_0xb3411a)&&_0x598499['set'](_0xb3411a,[]),_0x598499[_0xf1ea07(0x1d1)](_0xb3411a)[_0xf1ea07(0x1de)]({'session':_0x5b6aa3,'startTime':_0x5ae479,'endTime':_0x20e2c8,'duration':_0x20e2c8-_0x5ae479}),_0x13a0ec=Math[_0xf1ea07(0x298)](_0x13a0ec,_0x5ae479),_0x3bf662=Math['max'](_0x3bf662,_0x20e2c8);}}if(_0x598499[_0xf1ea07(0x161)]===0x0)return _0xf1ea07(0x244);const _0x307ab3=process[_0xf1ea07(0x169)]['columns']||0x78,_0x183106=0x1e,_0x55d691=0x32,_0x34ee01=0x4,_0xbe2a2a=Math[_0xf1ea07(0x298)](_0x55d691,Math['max'](_0x183106,Math[_0xf1ea07(0x19e)](_0x307ab3*0.3))),_0x272654=_0x307ab3-_0xbe2a2a-TIMELINE_CONFIG[_0xf1ea07(0x1c9)]-0x3-_0x34ee01,_0x533946=_0x3bf662-_0x13a0ec,_0x5a7fac=_0x533946/_0xbe2a2a,_0x520c13=renderTimeAxis({'startTime':_0x13a0ec,'endTime':_0x3bf662,'durationMs':_0x533946,'msPerChar':_0x5a7fac},_0xbe2a2a),_0x5e4a04=[];for(const _0x4af0ac of _0x598499[_0xf1ea07(0x2bf)]()){_0x5e4a04[_0xf1ea07(0x1de)](..._0x4af0ac);}_0x5e4a04['sort']((_0x1e00d4,_0x2f7ef2)=>_0x2f7ef2[_0xf1ea07(0x157)]-_0x1e00d4[_0xf1ea07(0x157)]);const _0x133beb=new Date(_0x13a0ec),_0x4e8a7f=formatDate(_0x133beb),_0x49d634=_0x34ee01+TIMELINE_CONFIG[_0xf1ea07(0x182)]+TIMELINE_CONFIG['ICON_SPACING']+_0x272654,_0x275329='\x20'['repeat'](_0x49d634-_0x4e8a7f[_0xf1ea07(0x2d2)]),_0x2baf08=_0x275329+a42_0x484372[_0xf1ea07(0x257)](_0x4e8a7f)+'\x20'+_0x520c13;_0x5dff76[_0xf1ea07(0x1de)](_0x2baf08);const _0x5e4de8=0x16;let _0x116174=0x0;for(const _0x1f221c of _0x5e4a04){const _0x3537d4=_0x1f221c[_0xf1ea07(0x231)][_0xf1ea07(0x196)]?.[_0xf1ea07(0x236)]||'?',_0xe24a6=Math[_0xf1ea07(0x298)](stringWidth(_0x3537d4),_0x5e4de8);_0x116174=Math[_0xf1ea07(0x1a8)](_0x116174,_0xe24a6);}for(const _0x3f94ae of _0x5e4a04){const {session:_0x4c1ee4,startTime:_0x1f8f7c,endTime:_0x53b4ab,duration:_0x3179f8}=_0x3f94ae,_0x5f07bb=_0x4c1ee4[_0xf1ea07(0x196)]?.['id'],_0x29665f=_0x4c1ee4['id'],_0x461087=_0x4c1ee4[_0xf1ea07(0x196)]?.['name']||'?',_0x253666=_0x4c1ee4[_0xf1ea07(0x247)]?.['name']||'?';let _0x2b9c5e,_0x53824b;if(_0x4c1ee4[_0xf1ea07(0x2be)]){const _0x52ddfe=_0x4c1ee4[_0xf1ea07(0x2be)];!_0x52ddfe['done']?(_0x2b9c5e=_0x52ddfe['cancelRequested']?'🛑':'🔄',_0x53824b=_0x52ddfe[_0xf1ea07(0x203)]?a42_0x484372[_0xf1ea07(0x285)]:a42_0x484372[_0xf1ea07(0x2a1)]):(_0x2b9c5e=_0x52ddfe['success']?'✅':'❌',_0x53824b=_0x52ddfe[_0xf1ea07(0x20d)]?a42_0x484372[_0xf1ea07(0x282)]:a42_0x484372[_0xf1ea07(0x130)]);}else _0x2b9c5e='⏳',_0x53824b=a42_0x484372[_0xf1ea07(0x257)];const _0x2bef57='#'+_0x29665f,_0x23f12d=_0x5f07bb?hyperlink(_0x2bef57,getWorkflowSessionUrl(_0x5b92ef,_0x5f07bb,_0x29665f)):_0x2bef57;let _0x3269a7=_0x461087;stringWidth(_0x461087)>_0x5e4de8&&(_0x3269a7=_0x461087[_0xf1ea07(0x1f1)](0x0,_0x5e4de8-0x1)+'…');const _0x467292=a42_0x484372['dim'](_0x3269a7),_0x11c0b2=stringWidth(_0x3269a7),_0x4c94e1='\x20'[_0xf1ea07(0x200)](_0x116174-stringWidth(_0x3269a7)+0x2),_0x363750='('+formatElapsed(_0x3179f8)+')',_0x25c1f2=stringWidth(_0x363750),_0x44c911=stringWidth(_0x2bef57),_0x45469f=_0x44c911+0x1+_0x11c0b2+_0x4c94e1[_0xf1ea07(0x2d2)],_0x247ae5=_0x272654-_0x45469f-_0x25c1f2-0x1-0x8;let _0x40a95f=_0x253666;stringWidth(_0x40a95f)>_0x247ae5&&(_0x40a95f=_0x40a95f[_0xf1ea07(0x1f1)](0x0,_0x247ae5-0x1)+'…');const _0x58550b=_0x23f12d+'\x20'+_0x467292+_0x4c94e1+_0x40a95f,_0x310a99=stringWidth(_0x58550b),_0x1b0c56=_0x272654-_0x310a99-_0x25c1f2,_0x35829b=_0x58550b+'\x20'[_0xf1ea07(0x200)](Math[_0xf1ea07(0x1a8)](0x1,_0x1b0c56))+a42_0x484372['dim'](_0x363750),_0x5b7389=Math[_0xf1ea07(0x19e)]((_0x1f8f7c-_0x13a0ec)/_0x5a7fac),_0x1edc4e=Math[_0xf1ea07(0x19e)]((_0x53b4ab-_0x13a0ec)/_0x5a7fac),_0x31870b=Math[_0xf1ea07(0x1a8)](_0x5b7389+0x1,_0x1edc4e),_0x2692df=new Array(_0xbe2a2a)[_0xf1ea07(0x29b)]('\x20');for(let _0x5e845f=_0x5b7389;_0x5e845f<Math[_0xf1ea07(0x298)](_0x31870b,_0xbe2a2a);_0x5e845f++){_0x2692df[_0x5e845f]='─';}const _0x4bed13=_0x2692df[_0xf1ea07(0x25c)](_0x3357a0=>_0x3357a0==='\x20'?'\x20':_0x53824b(_0x3357a0))[_0xf1ea07(0x253)]('');_0x5dff76['push'](_0x2b9c5e+'\x20'+_0x35829b+'│'+_0x4bed13+'│');}return _0x5dff76[_0xf1ea07(0x253)]('\x0a');}async[a42_0x54c1ae(0x27d)](_0x438dc7,_0x273529,_0x1015d0){const _0x25dc5=a42_0x54c1ae,{options:_0x4862cc,tdx:_0x22abf0}=_0x273529,_0x2191ec=_0x4862cc[_0x25dc5(0x1ed)],{timelineRows:_0x351380,timeAxisHeader:_0x18c2e4}=this[_0x25dc5(0x226)](_0x438dc7,_0x2191ec),_0x35d4d1=_0x351380['filter'](_0x5bb864=>_0x5bb864['attemptId']);if(_0x35d4d1[_0x25dc5(0x2d2)]===0x0){const _0x10b838=this[_0x25dc5(0x180)](_0x438dc7,_0x2191ec);console[_0x25dc5(0x27c)](_0x10b838);!_0x1015d0&&(console[_0x25dc5(0x272)](''),console[_0x25dc5(0x272)](a42_0x484372[_0x25dc5(0x257)](_0x25dc5(0x29c))),console[_0x25dc5(0x272)](a42_0x484372[_0x25dc5(0x257)](_0x25dc5(0x21a))+'or'+a42_0x484372[_0x25dc5(0x257)](_0x25dc5(0x201))));return;}_0x18c2e4&&console[_0x25dc5(0x27c)](_0x18c2e4);const _0x498fe2=_0x351380[_0x25dc5(0x280)](_0xaa7be3=>_0xaa7be3['attemptId'])[_0x25dc5(0x25c)](_0x56eef2=>({'title':_0x56eef2[_0x25dc5(0x299)],'value':_0x56eef2['attemptId']})),_0x389803=process[_0x25dc5(0x169)][_0x25dc5(0x216)]||0x3c,_0x13d228=Math[_0x25dc5(0x1a8)](0x28,Math['floor'](_0x389803*0x2/0x3)),_0x318580=await a42_0x21f77b({'type':_0x25dc5(0x174),'name':_0x25dc5(0x156),'message':_0x25dc5(0x146),'choices':_0x498fe2,'initial':-0x1,'limit':_0x13d228,'clearFirst':!![],'fallback':{'title':_0x25dc5(0x1c0),'value':null},'suggest':(_0x555a53,_0x3d3fbe)=>{const _0x2549d8=_0x25dc5;if(!_0x555a53)return Promise[_0x2549d8(0x12f)](_0x3d3fbe);const _0x513b04=_0x3d3fbe[_0x2549d8(0x280)](_0x516798=>{const _0x366257=_0x2549d8,_0x3fb4d4=_0x516798;return _0x3fb4d4[_0x366257(0x1db)][_0x366257(0x202)]()['includes'](_0x555a53['toLowerCase']());});return Promise[_0x2549d8(0x12f)](_0x513b04);}}),_0x4dbc64=()=>{const _0x26ee28=_0x25dc5;process[_0x26ee28(0x169)][_0x26ee28(0x1d6)](_0x26ee28(0x1bc)),process['stdout'][_0x26ee28(0x1d6)](_0x26ee28(0x1bc)),process[_0x26ee28(0x169)][_0x26ee28(0x1d6)](_0x26ee28(0x1bc));},_0x216aef=_0x318580&&_0x318580['attemptId']&&_0x318580[_0x25dc5(0x156)]!==null&&_0x318580[_0x25dc5(0x156)][_0x25dc5(0x22e)]()!=='';if(!_0x216aef){_0x4dbc64(),console['log'](a42_0x484372['dim'](_0x25dc5(0x273)));return;}_0x4dbc64();const _0x209ac7=_0x438dc7[_0x25dc5(0x207)](_0x4422c0=>_0x4422c0['lastAttempt']?.['id']===_0x318580[_0x25dc5(0x156)]);if(_0x209ac7){const _0x4d403b=_0x209ac7[_0x25dc5(0x196)]?.['name']||'?',_0x18aa23=_0x209ac7[_0x25dc5(0x247)]?.[_0x25dc5(0x236)]||'?';console[_0x25dc5(0x27c)](_0x25dc5(0x275)+a42_0x484372[_0x25dc5(0x257)](_0x4d403b)+_0x25dc5(0x1b5)+a42_0x484372['dim'](_0x18aa23));}const _0x14403e=new WorkflowTimelineCommand();await _0x14403e['execute']({'args':[],'options':{..._0x4862cc,'attemptId':_0x318580['attemptId']},'tdx':_0x22abf0});}[a42_0x54c1ae(0x226)](_0x32dbbf,_0x2b4389){const _0x5774dc=a42_0x54c1ae,_0x283aaa=new Map();for(const _0x319bc0 of _0x32dbbf){_0x319bc0['id']&&_0x319bc0['lastAttempt']?.['id']&&_0x283aaa[_0x5774dc(0x149)](_0x319bc0['id'],_0x319bc0[_0x5774dc(0x2be)]['id']);}const _0x553ca1=[];let _0x484363='';const _0x1750ad=this[_0x5774dc(0x180)](_0x32dbbf,_0x2b4389),_0x36be93=_0x1750ad['split']('\x0a');for(const _0x1bdd94 of _0x36be93){if(_0x1bdd94['startsWith'](_0x5774dc(0x1e5))||_0x1bdd94[_0x5774dc(0x2a0)](/^\s+\d{4}-\d{2}-\d{2}/))_0x484363=_0x1bdd94;else{if(_0x1bdd94[_0x5774dc(0x2a0)](/^[✅❌🔄🛑⏳]/)){const _0x26c298=_0x1bdd94[_0x5774dc(0x2a0)](/#(\d+)/),_0x12e7d3=_0x26c298?_0x26c298[0x1]:null,_0x4fac55=_0x12e7d3?_0x283aaa[_0x5774dc(0x1d1)](_0x12e7d3)||null:null,_0x347e93=_0x32dbbf['find'](_0x2b7d8c=>_0x2b7d8c['id']===_0x12e7d3),_0x1e8c6b=_0x347e93?.['project']?.[_0x5774dc(0x236)]||'';_0x553ca1[_0x5774dc(0x1de)]({'displayLine':_0x1bdd94,'attemptId':_0x4fac55,'projectName':_0x1e8c6b});}}}return{'timelineRows':_0x553ca1,'timeAxisHeader':_0x484363};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x17e);[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x172);async['execute'](_0x404c98){const _0x1d9ecb=a42_0x54c1ae,{options:_0x1c0f79,args:_0x4dc127,tdx:_0x5b4955}=_0x404c98,_0xae1816=this['parseProjectWorkflowPattern'](_0x4dc127,_0x1c0f79);if(!_0xae1816)return 0x1;const {projectName:_0x45ce1c,workflowName:_0x39cb66}=_0xae1816,_0x40e427=_0x1c0f79[_0x1d9ecb(0x14b)];if(_0x1c0f79[_0x1d9ecb(0x222)]){if(_0x45ce1c&&_0x39cb66)console[_0x1d9ecb(0x272)](_0x1d9ecb(0x225)+_0x45ce1c+'.'+_0x39cb66);else _0x45ce1c&&console['error'](_0x1d9ecb(0x1a4)+_0x45ce1c);_0x40e427&&console['error'](_0x1d9ecb(0x2c0));}const _0x1f3760=await withSpinner(_0x1d9ecb(0x164),()=>_0x5b4955[_0x1d9ecb(0x247)][_0x1d9ecb(0x238)]({'projectName':_0x45ce1c,'workflowName':_0x39cb66,'includeRetried':_0x40e427,'limit':_0x1c0f79['limit']}),{'verbose':_0x1c0f79[_0x1d9ecb(0x222)]}),_0x55fdbd=_0x1f3760[_0x1d9ecb(0x150)],_0x157e48=_0x1c0f79[_0x1d9ecb(0x211)]||0x64,_0x57f131=_0x55fdbd[_0x1d9ecb(0x2d2)]>=_0x157e48?a42_0x484372['dim'](_0x1d9ecb(0x262)):'';console['error']('✔\x20Found\x20'+_0x55fdbd['length']+_0x1d9ecb(0x27b)+(_0x55fdbd[_0x1d9ecb(0x2d2)]!==0x1?'s':'')+_0x57f131);if(_0x1c0f79[_0x1d9ecb(0x197)]==='json'||_0x1c0f79['format']==='jsonl'||_0x1c0f79['format']===_0x1d9ecb(0x192))await handleSDKOutput(_0x55fdbd,_0x1c0f79);else{if(_0x55fdbd['length']===0x0){if(_0x45ce1c&&_0x39cb66)console[_0x1d9ecb(0x27c)](_0x1d9ecb(0x24c)+_0x45ce1c+'.'+_0x39cb66);else _0x45ce1c?console[_0x1d9ecb(0x27c)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x45ce1c):console[_0x1d9ecb(0x27c)](_0x1d9ecb(0x1ad));}else{const _0x5f2b2a=_0x1c0f79[_0x1d9ecb(0x1ed)],_0x2c1d23=_0x55fdbd['map'](_0x49bf7a=>{const _0x55a13f=_0x1d9ecb,_0x780508=a42_0x484372[_0x55a13f(0x257)]('#'+_0x49bf7a['id']),_0x3eaab0=_0x49bf7a[_0x55a13f(0x196)]?.['id'],_0x4a7976=_0x49bf7a[_0x55a13f(0x148)]||_0x49bf7a[_0x55a13f(0x1eb)],_0x5f0933=_0x3eaab0&&_0x4a7976?hyperlink(_0x780508,getWorkflowAttemptUrl(_0x5f2b2a,_0x3eaab0,_0x4a7976,_0x49bf7a['id'])):_0x780508,{icon:_0x697ba1,text:_0x319591}=getAttemptStatusDisplay(_0x49bf7a),_0x121d78=(_0x49bf7a[_0x55a13f(0x196)]?.[_0x55a13f(0x236)]||'?')+'.'+(_0x49bf7a[_0x55a13f(0x247)]?.[_0x55a13f(0x236)]||'?'),_0x566109=_0x49bf7a['sessionTime']?a42_0x484372[_0x55a13f(0x257)](_0x49bf7a[_0x55a13f(0x266)]):'';return(_0x5f0933+'\x20'+_0x697ba1+(_0x319591?'\x20'+_0x319591:'')+'\x20'+_0x121d78+'\x20'+_0x566109)[_0x55a13f(0x2c1)]();});await writeOutput(_0x2c1d23['join']('\x0a'),_0x1c0f79[_0x1d9ecb(0x204)],_0x1d9ecb(0x295));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x190);[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x1f4);async[a42_0x54c1ae(0x17a)](_0x3635ad){const _0x11d5d0=a42_0x54c1ae,{options:_0x381c6e,args:_0x5455d7,tdx:_0x2a2e8b}=_0x3635ad,_0x539881=_0x5455d7[0x0];if(!_0x539881)return console[_0x11d5d0(0x272)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x381c6e[_0x11d5d0(0x222)]&&console[_0x11d5d0(0x272)](_0x11d5d0(0x21d)+_0x539881);const _0x5533d1=await withSpinner(_0x11d5d0(0x132),()=>_0x2a2e8b[_0x11d5d0(0x247)][_0x11d5d0(0x28d)](_0x539881),{'verbose':_0x381c6e[_0x11d5d0(0x222)]}),_0x5138c4=_0x5533d1['data'];let _0x1d12d9;!_0x5138c4[_0x11d5d0(0x1ef)]?_0x1d12d9=_0x5138c4[_0x11d5d0(0x203)]?_0x11d5d0(0x2a8):_0x11d5d0(0x19a):_0x1d12d9=_0x5138c4[_0x11d5d0(0x20d)]?'success':_0x11d5d0(0x272);let _0x1df9d3;if(_0x5138c4[_0x11d5d0(0x1ec)]&&_0x5138c4[_0x11d5d0(0x2d9)]){const _0x54b711=new Date(_0x5138c4[_0x11d5d0(0x1ec)])[_0x11d5d0(0x28a)](),_0x17f59a=new Date(_0x5138c4['finishedAt'])[_0x11d5d0(0x28a)]();_0x1df9d3=Math['round']((_0x17f59a-_0x54b711)/0x3e8);}const _0x57e6b4={'attempt_id':_0x5138c4['id'],'status':_0x1d12d9,..._0x5138c4[_0x11d5d0(0x16e)]!==undefined&&{'index':_0x5138c4[_0x11d5d0(0x16e)]},..._0x5138c4[_0x11d5d0(0x196)]&&{'project':_0x5138c4[_0x11d5d0(0x196)][_0x11d5d0(0x236)]},..._0x5138c4['workflow']&&{'workflow':_0x5138c4[_0x11d5d0(0x247)][_0x11d5d0(0x236)]},..._0x5138c4[_0x11d5d0(0x1eb)]&&{'session_id':_0x5138c4['sessionId']},..._0x5138c4[_0x11d5d0(0x266)]&&{'session_time':_0x5138c4[_0x11d5d0(0x266)]},..._0x5138c4[_0x11d5d0(0x293)]&&{'retry_attempt':_0x5138c4[_0x11d5d0(0x293)]},..._0x1df9d3!==undefined&&{'duration_sec':_0x1df9d3},..._0x5138c4[_0x11d5d0(0x1ec)]&&{'created_at':_0x5138c4[_0x11d5d0(0x1ec)]},..._0x5138c4[_0x11d5d0(0x2d9)]&&{'finished_at':_0x5138c4[_0x11d5d0(0x2d9)]},...Object['keys'](_0x5138c4['params'])[_0x11d5d0(0x2d2)]>0x0&&{'params':_0x5138c4[_0x11d5d0(0x15b)]}};return await handleSingleObjectOutput(_0x57e6b4,_0x381c6e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x12e);['description']='Show\x20tasks\x20for\x20an\x20attempt';async[a42_0x54c1ae(0x17a)](_0x3337ac){const _0x15d7f4=a42_0x54c1ae,{options:_0x1875b3,args:_0x38ac42,tdx:_0x156ab4}=_0x3337ac,_0x3fc510=_0x38ac42[0x0];if(!_0x3fc510)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x38dbc5=_0x1875b3[_0x15d7f4(0x1cf)];_0x1875b3[_0x15d7f4(0x222)]&&(console['error'](_0x15d7f4(0x21d)+_0x3fc510),_0x38dbc5&&console[_0x15d7f4(0x272)](_0x15d7f4(0x22b)));const _0x3ff846=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x156ab4[_0x15d7f4(0x247)]['tasks'](_0x3fc510,_0x38dbc5||![]),{'verbose':_0x1875b3[_0x15d7f4(0x222)]}),_0x1576bc=_0x3ff846['data'];return console[_0x15d7f4(0x272)]('✔\x20Found\x20'+_0x1576bc[_0x15d7f4(0x2d2)]+_0x15d7f4(0x1cd)+(_0x1576bc[_0x15d7f4(0x2d2)]!==0x1?'s':'')),await handleSDKOutput(_0x1576bc,_0x1875b3),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x54c1ae(0x236)]='workflow:logs';[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x1b4);async[a42_0x54c1ae(0x17a)](_0x338444){const _0x3b82d9=a42_0x54c1ae,{options:_0x47c0f7,args:_0x2e818f,tdx:_0x1e08a2}=_0x338444,_0x50d76=_0x2e818f[0x0];let _0x199f7c=_0x2e818f[0x1];if(!_0x50d76)return console[_0x3b82d9(0x272)](_0x3b82d9(0x28b)),0x1;_0x47c0f7[_0x3b82d9(0x222)]&&(console[_0x3b82d9(0x272)](_0x3b82d9(0x21d)+_0x50d76),_0x199f7c&&console[_0x3b82d9(0x272)]('Task\x20name:\x20'+_0x199f7c));const _0x2ba20e=await withSpinner('Fetching\x20log\x20files...',()=>_0x1e08a2[_0x3b82d9(0x247)][_0x3b82d9(0x2cd)](_0x50d76,_0x199f7c),{'verbose':_0x47c0f7['verbose']}),_0x251ecb=_0x2ba20e[_0x3b82d9(0x150)];if(_0x251ecb['length']===0x0)return console[_0x3b82d9(0x272)](_0x3b82d9(0x1e4)),0x0;if(!_0x199f7c&&(_0x47c0f7[_0x3b82d9(0x1f0)]||_0x47c0f7[_0x3b82d9(0x197)]))return await handleSDKOutput(_0x251ecb,_0x47c0f7),0x0;if(!_0x199f7c){const _0x4f1217=_0x251ecb[_0x3b82d9(0x25c)](_0x44f8d3=>({'title':_0x44f8d3[_0x3b82d9(0x1cc)]+'\x20('+formatBytes(_0x44f8d3[_0x3b82d9(0x2d8)])+')','value':_0x44f8d3[_0x3b82d9(0x1cc)]})),_0x5e6fb9=await a42_0x21f77b({'type':_0x3b82d9(0x143),'name':'task','message':_0x3b82d9(0x22f),'choices':_0x4f1217});if(!_0x5e6fb9['task'])return console[_0x3b82d9(0x272)](_0x3b82d9(0x273)),0x0;_0x199f7c=_0x5e6fb9[_0x3b82d9(0x269)];}const _0x19f84b=await withSpinner(_0x3b82d9(0x1fd),()=>_0x1e08a2[_0x3b82d9(0x247)][_0x3b82d9(0x289)](_0x50d76,_0x199f7c),{'verbose':_0x47c0f7[_0x3b82d9(0x222)]}),_0x4e605b=_0x19f84b['data'];return _0x4e605b?console[_0x3b82d9(0x27c)](_0x4e605b):console[_0x3b82d9(0x272)](_0x3b82d9(0x1c1)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a42_0x54c1ae(0x29e);['description']=a42_0x54c1ae(0x188);async[a42_0x54c1ae(0x17a)](_0xcf9b84){const _0x13f649=a42_0x54c1ae,{options:_0x5230fd,args:_0x1167ef,tdx:_0x29fd2b}=_0xcf9b84,_0x10010d=_0x1167ef[0x0];if(!_0x10010d)return console[_0x13f649(0x272)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x3eea03=_0x5230fd[_0x13f649(0x20b)];_0x5230fd[_0x13f649(0x222)]&&(console['error']('Attempt\x20ID:\x20'+_0x10010d),_0x3eea03&&console[_0x13f649(0x272)](_0x13f649(0x210)+_0x3eea03));if(!_0x5230fd[_0x13f649(0x140)]){const _0x41120d=await confirmKey(_0x13f649(0x198)+_0x10010d+'?');if(!_0x41120d)return console[_0x13f649(0x272)](_0x13f649(0x273)),0x0;}const _0x1de949=await withSpinner(_0x13f649(0x177),()=>_0x29fd2b[_0x13f649(0x247)][_0x13f649(0x17f)](_0x10010d,_0x3eea03),{'verbose':_0x5230fd[_0x13f649(0x222)]}),_0x7daab9=_0x1de949['data'];return console[_0x13f649(0x272)]('✔\x20'+_0x7daab9),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x1f7);['description']=a42_0x54c1ae(0x2d5);async[a42_0x54c1ae(0x17a)](_0x3fff0b){const _0x26045b=a42_0x54c1ae,{options:_0x186ba5,args:_0x16e21d,tdx:_0x22f1ff}=_0x3fff0b,_0x3db57a=_0x16e21d[0x0];if(!_0x3db57a)return console[_0x26045b(0x272)](_0x26045b(0x2d6)),console[_0x26045b(0x272)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x35417a=![],_0x53f1d6=_0x3db57a;if(_0x3db57a[_0x26045b(0x181)]('session:'))_0x35417a=!![],_0x53f1d6=_0x3db57a['substring'](0x8);else{if(_0x3db57a['startsWith'](_0x26045b(0x1b1)))_0x35417a=![],_0x53f1d6=_0x3db57a[_0x26045b(0x175)](0x8);else return console['error'](_0x26045b(0x291)),console['error'](_0x26045b(0x290)),0x1;}const _0x2c6266=_0x186ba5[_0x26045b(0x15e)],_0x293a6d=_0x186ba5[_0x26045b(0x13c)],_0x32c205=_0x186ba5[_0x26045b(0x15b)],_0x4b5f81=_0x186ba5[_0x26045b(0x138)];_0x186ba5[_0x26045b(0x222)]&&(console['error'](_0x26045b(0x15a)+(_0x35417a?_0x26045b(0x231):_0x26045b(0x28d))+'\x20'+_0x53f1d6),_0x2c6266&&console['error'](_0x26045b(0x256)+_0x2c6266),_0x293a6d&&console[_0x26045b(0x272)](_0x26045b(0x137)+_0x293a6d),_0x32c205&&console[_0x26045b(0x272)](_0x26045b(0x294)+_0x32c205),_0x4b5f81&&console[_0x26045b(0x272)]('Force:\x20yes'));let _0x3146b2;if(_0x32c205)try{if(_0x32c205[_0x26045b(0x181)]('@')){const _0x3ea60a=await import(_0x26045b(0x167)),_0x159022=_0x32c205[_0x26045b(0x175)](0x1),_0x23b3a9=await _0x3ea60a[_0x26045b(0x1b8)](_0x159022,_0x26045b(0x274));_0x3146b2=JSON[_0x26045b(0x1dc)](_0x23b3a9);}else _0x3146b2=JSON[_0x26045b(0x1dc)](_0x32c205);}catch{return console[_0x26045b(0x272)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x186ba5[_0x26045b(0x140)]){const _0x5f23a2=await confirmKey(_0x26045b(0x1fc)+(_0x35417a?_0x26045b(0x231):_0x26045b(0x28d))+'\x20'+_0x53f1d6+'?');if(!_0x5f23a2)return console['error'](_0x26045b(0x273)),0x0;}let _0x3fedf7;_0x35417a?_0x3fedf7=await withSpinner('Retrying\x20session...',()=>_0x22f1ff[_0x26045b(0x247)][_0x26045b(0x1dd)](_0x53f1d6,{'fromTask':_0x2c6266,'retryParams':_0x3146b2}),{'verbose':_0x186ba5[_0x26045b(0x222)]}):_0x3fedf7=await withSpinner(_0x26045b(0x26c),()=>_0x22f1ff[_0x26045b(0x247)][_0x26045b(0x232)](_0x53f1d6,{'resumeFrom':_0x293a6d,'retryParams':_0x3146b2,'force':_0x4b5f81}),{'verbose':_0x186ba5[_0x26045b(0x222)]});const _0x3a6e03=_0x3fedf7[_0x26045b(0x150)];return console[_0x26045b(0x272)]('✔\x20Retry\x20started'),console['error'](_0x26045b(0x2a9)+_0x3a6e03[_0x26045b(0x156)]),console['error'](_0x26045b(0x220)+_0x3a6e03['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x1be);[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x15c);async[a42_0x54c1ae(0x17a)](_0x2b4ac2){const _0x216212=a42_0x54c1ae,{options:_0x425b46,args:_0x3adb02,tdx:_0x2857bb}=_0x2b4ac2;let _0x59fbe8=_0x3adb02[0x0];if(!_0x59fbe8){const _0x596d47=this[_0x216212(0x2c8)]([],_0x425b46),_0xec5729=await withSpinner(_0x216212(0x23f),()=>_0x2857bb[_0x216212(0x247)]['workflows'](_0x596d47,{'limit':_0x425b46['limit']}),{'verbose':_0x425b46['verbose']}),_0x1d3e9c=_0xec5729[_0x216212(0x150)];if(_0x1d3e9c[_0x216212(0x2d2)]===0x0)return console[_0x216212(0x272)](_0x216212(0x2d4)),!_0x596d47&&console[_0x216212(0x272)](a42_0x484372[_0x216212(0x257)](_0x216212(0x27a))),0x1;const _0x1c4ce0=_0x1d3e9c[_0x216212(0x25c)](_0x1c86ad=>({'title':_0x1c86ad[_0x216212(0x196)]?.[_0x216212(0x236)]+'.'+_0x1c86ad[_0x216212(0x236)],'value':_0x1c86ad['project']?.[_0x216212(0x236)]+'.'+_0x1c86ad[_0x216212(0x236)],'description':_0x1c86ad[_0x216212(0x13b)]?_0x216212(0x246)+_0x1c86ad[_0x216212(0x13b)]:undefined})),_0x50cc5c=await a42_0x21f77b({'type':_0x216212(0x143),'name':_0x216212(0x247),'message':_0x216212(0x1ae),'choices':_0x1c4ce0});if(!_0x50cc5c['workflow'])return 0x1;_0x59fbe8=_0x50cc5c[_0x216212(0x247)];}if(!_0x59fbe8['includes']('.')){const _0x4d4fb0=this[_0x216212(0x2c8)]([],_0x425b46);if(_0x4d4fb0)_0x59fbe8=_0x4d4fb0+'.'+_0x59fbe8;else return console[_0x216212(0x272)](a42_0x484372[_0x216212(0x130)](_0x216212(0x241)),_0x216212(0x1a5)),console['error'](a42_0x484372[_0x216212(0x257)](_0x216212(0x27a))),0x1;}const _0x5567b8=_0x425b46[_0x216212(0x2a4)],_0x40f6fd=_0x425b46[_0x216212(0x266)],_0x27e578={};if(_0x5567b8&&Array['isArray'](_0x5567b8))for(const _0x3588a6 of _0x5567b8){const _0x440b25=_0x3588a6[_0x216212(0x13a)]('=');if(_0x440b25===-0x1)return console[_0x216212(0x272)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x3588a6),console[_0x216212(0x272)](_0x216212(0x151)),0x1;const _0x561673=_0x3588a6[_0x216212(0x175)](0x0,_0x440b25),_0x4115de=_0x3588a6[_0x216212(0x175)](_0x440b25+0x1);try{_0x27e578[_0x561673]=JSON['parse'](_0x4115de);}catch{_0x27e578[_0x561673]=_0x4115de;}}_0x425b46[_0x216212(0x222)]&&(console[_0x216212(0x272)](_0x216212(0x186)+_0x59fbe8),Object['keys'](_0x27e578)[_0x216212(0x2d2)]>0x0&&console[_0x216212(0x272)](_0x216212(0x170)+JSON[_0x216212(0x13d)](_0x27e578)),_0x40f6fd&&console[_0x216212(0x272)](_0x216212(0x2a3)+_0x40f6fd));const _0x40c959=await withSpinner('Starting\x20workflow\x20run...',()=>_0x2857bb['workflow'][_0x216212(0x297)](_0x59fbe8,_0x27e578,{'sessionTime':_0x40f6fd}),{'verbose':_0x425b46[_0x216212(0x222)]}),_0x1dff0d=_0x40c959[_0x216212(0x150)];console[_0x216212(0x272)](_0x216212(0x23a)),console[_0x216212(0x272)](_0x216212(0x234)+_0x1dff0d['id']),console['error']('\x20\x20Session\x20ID:\x20'+_0x1dff0d[_0x216212(0x1eb)]),console[_0x216212(0x272)](_0x216212(0x1f9)+_0x1dff0d[_0x216212(0x196)]?.[_0x216212(0x236)]),console[_0x216212(0x272)]('\x20\x20Workflow:\x20'+_0x1dff0d[_0x216212(0x247)]?.[_0x216212(0x236)]);if(_0x1dff0d[_0x216212(0x196)]?.['id']&&_0x1dff0d[_0x216212(0x1eb)]&&_0x1dff0d['id']){const _0x243eda=_0x425b46[_0x216212(0x1ed)],_0x2464f7=getConsoleUrl(_0x243eda,'/app/workflows/'+_0x1dff0d['project']['id']+'/sessions/'+_0x1dff0d[_0x216212(0x1eb)]+_0x216212(0x215)+_0x1dff0d['id']);console['error'](_0x216212(0x2ce)+a42_0x484372[_0x216212(0x28c)](_0x2464f7));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x24d);['description']=a42_0x54c1ae(0x14d);async[a42_0x54c1ae(0x17a)](_0x34e913){const _0x579482=a42_0x54c1ae,{options:_0x342fba,args:_0x154c40,tdx:_0x20ae5f}=_0x34e913,_0x119478=_0x154c40[0x0],_0xf319d=_0x154c40[0x1]||'.';if(!_0x119478)return console['error']('Error:\x20Project\x20name\x20is\x20required'),console[_0x579482(0x272)](_0x579482(0x25f)),0x1;const _0x4d2f96=_0x342fba[_0x579482(0x13b)];_0x342fba[_0x579482(0x222)]&&(console['error']('Project:\x20'+_0x119478),console[_0x579482(0x272)](_0x579482(0x2c6)+_0xf319d),_0x4d2f96&&console[_0x579482(0x272)](_0x579482(0x219)+_0x4d2f96));const _0x1a62e3=await withSpinner('Downloading\x20project\x20'+_0x119478+'...',()=>_0x20ae5f['workflow'][_0x579482(0x25d)](_0x119478,_0xf319d,{'revision':_0x4d2f96}),{'verbose':_0x342fba[_0x579482(0x222)]}),_0x3724c7=_0x1a62e3[_0x579482(0x150)];return console['error'](_0x579482(0x194)+_0x3724c7[_0x579482(0x1c5)]),console[_0x579482(0x272)](_0x579482(0x229)+_0x3724c7[_0x579482(0x13b)]),console[_0x579482(0x272)]('\x20\x20Files\x20extracted:\x20'+_0x3724c7[_0x579482(0x29f)]),console[_0x579482(0x272)](_0x579482(0x223)+_0xf319d+'/'+_0x3724c7['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']='workflow:upload';[a42_0x54c1ae(0x2ba)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async['execute'](_0x3fd4cf){const _0x548528=a42_0x54c1ae,{options:_0x1fd66f,args:_0x268f1d,tdx:_0x4c4dad}=_0x3fd4cf;let _0xf923ec='.',_0x25f416=_0x1fd66f[_0x548528(0x236)];if(_0x268f1d[0x0]){const {promises:_0xb83b95}=await import('fs');try{const _0xd2e778=await _0xb83b95[_0x548528(0x286)](_0x268f1d[0x0]);if(_0xd2e778[_0x548528(0x2d7)]())_0xf923ec=_0x268f1d[0x0];else return console['error']('Error:\x20'+_0x268f1d[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x25f416=_0x268f1d[0x0],_0xf923ec='.';}}const _0x2dfef2=_0x1fd66f[_0x548528(0x13b)],_0x1e2573=_0x1fd66f[_0x548528(0x242)];_0x1fd66f[_0x548528(0x222)]&&(console[_0x548528(0x272)]('Project\x20directory:\x20'+_0xf923ec),_0x25f416&&console[_0x548528(0x272)]('Project\x20name:\x20'+_0x25f416),_0x2dfef2&&console[_0x548528(0x272)]('Revision:\x20'+_0x2dfef2),_0x1e2573&&console[_0x548528(0x272)](_0x548528(0x281)));const _0x283cfa=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x4c4dad[_0x548528(0x247)]['push'](_0xf923ec,{'projectName':_0x25f416,'revision':_0x2dfef2,'skipValidation':_0x1e2573}),{'verbose':_0x1fd66f[_0x548528(0x222)]}),_0x230bb9=_0x283cfa[_0x548528(0x150)];return console[_0x548528(0x272)](_0x548528(0x16a)+_0x230bb9[_0x548528(0x1c5)]),console[_0x548528(0x272)](_0x548528(0x20f)+_0x230bb9['projectId']),console[_0x548528(0x272)](_0x548528(0x229)+_0x230bb9[_0x548528(0x13b)]),await this[_0x548528(0x2b2)](_0x4c4dad,_0x230bb9[_0x548528(0x1c5)],_0x1fd66f[_0x548528(0x1ed)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x1d7);['description']='Pull\x20workflow\x20project\x20to\x20local\x20folder';async['execute'](_0x3eba13){const _0x537ffd=a42_0x54c1ae,{options:_0x3df975,args:_0x5843f2,tdx:_0x25e4c4}=_0x3eba13,_0x2370fb=_0x5843f2[0x0],_0x386bff=_0x5843f2[0x1];if(!_0x2370fb)return console[_0x537ffd(0x272)](a42_0x484372['red'](_0x537ffd(0x241)),_0x537ffd(0x206)),console['error'](a42_0x484372[_0x537ffd(0x257)](_0x537ffd(0x22c))),0x1;const _0x463aa8=_0x3df975[_0x537ffd(0x13b)];_0x3df975[_0x537ffd(0x222)]&&(console[_0x537ffd(0x272)](_0x537ffd(0x275)+_0x2370fb),_0x386bff&&console[_0x537ffd(0x272)]('Target\x20directory:\x20'+_0x386bff),_0x463aa8&&console[_0x537ffd(0x272)]('Revision:\x20'+_0x463aa8),_0x3df975[_0x537ffd(0x134)]&&console[_0x537ffd(0x272)](_0x537ffd(0x230)));const _0x1c50d5=await withSpinner(_0x537ffd(0x1a6)+_0x2370fb+_0x537ffd(0x20e),()=>_0x25e4c4[_0x537ffd(0x247)][_0x537ffd(0x1b9)](_0x2370fb,{'targetDir':_0x386bff,'revision':_0x463aa8}),{'verbose':_0x3df975['verbose']}),_0xe619a5=_0x1c50d5['data'];_0xe619a5[_0x537ffd(0x26a)]?console[_0x537ffd(0x272)](_0x537ffd(0x279)+_0xe619a5[_0x537ffd(0x1c5)]):console[_0x537ffd(0x272)](_0x537ffd(0x16c)+_0xe619a5[_0x537ffd(0x1c5)]);console[_0x537ffd(0x272)](_0x537ffd(0x229)+_0xe619a5[_0x537ffd(0x13b)]),console[_0x537ffd(0x272)](_0x537ffd(0x1b3)+(a42_0x42ed95[_0x537ffd(0x160)](process['cwd'](),_0xe619a5[_0x537ffd(0x276)])||'.')),console['error'](_0x537ffd(0x159)+a42_0x484372[_0x537ffd(0x282)]('+'+_0xe619a5[_0x537ffd(0x1ac)][_0x537ffd(0x18a)]+'\x20new')+',\x20'+(a42_0x484372[_0x537ffd(0x285)]('~'+_0xe619a5['summary'][_0x537ffd(0x1e1)]+_0x537ffd(0x17c))+',\x20')+(a42_0x484372['red']('-'+_0xe619a5[_0x537ffd(0x1ac)][_0x537ffd(0x2a7)]+_0x537ffd(0x147))+',\x20')+(''+a42_0x484372[_0x537ffd(0x257)](_0xe619a5[_0x537ffd(0x1ac)][_0x537ffd(0x265)]+_0x537ffd(0x195))));for(const _0x18e347 of _0xe619a5[_0x537ffd(0x1ca)]){_0x18e347[_0x537ffd(0x1b2)]===_0x537ffd(0x1e1)&&_0x18e347['diff']&&(console[_0x537ffd(0x272)]('\x0a'+a42_0x484372['cyan'](_0x537ffd(0x162)+_0x18e347['path'])),console[_0x537ffd(0x272)](_0x18e347[_0x537ffd(0x228)]));}if(!_0xe619a5['hasChanges'])return saveSessionContext({'workflow_project':_0xe619a5[_0x537ffd(0x1c5)]},_0x3df975[_0x537ffd(0x231)]),console[_0x537ffd(0x272)](a42_0x484372[_0x537ffd(0x282)](_0x537ffd(0x18f))),console[_0x537ffd(0x272)](a42_0x484372[_0x537ffd(0x257)](_0x537ffd(0x1c3)+_0xe619a5['projectName'])),0x0;if(_0x3df975[_0x537ffd(0x134)])return console[_0x537ffd(0x272)](a42_0x484372[_0x537ffd(0x285)](_0x537ffd(0x23d))),0x0;if(!_0x3df975[_0x537ffd(0x140)]){const _0x390d14=await confirmKey(_0x537ffd(0x22d));if(!_0x390d14)return console[_0x537ffd(0x272)](_0x537ffd(0x273)),0x0;}await withSpinner(_0x537ffd(0x1e2),()=>_0x25e4c4[_0x537ffd(0x247)][_0x537ffd(0x1ab)](_0xe619a5,{'revision':_0x463aa8}),{'verbose':_0x3df975[_0x537ffd(0x222)]}),saveSessionContext({'workflow_project':_0xe619a5[_0x537ffd(0x1c5)]},_0x3df975[_0x537ffd(0x231)]),console[_0x537ffd(0x272)](a42_0x484372['green'](_0x537ffd(0x23b)));const _0x12e7cf=a42_0x42ed95[_0x537ffd(0x160)](process['cwd'](),_0xe619a5['targetDir'])||'.';return console[_0x537ffd(0x272)](a42_0x484372[_0x537ffd(0x257)]('\x20\x20Location:\x20'+_0x12e7cf)),console[_0x537ffd(0x272)](a42_0x484372['dim'](_0x537ffd(0x1c3)+_0xe619a5[_0x537ffd(0x1c5)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x54c1ae(0x236)]='workflow:push';[a42_0x54c1ae(0x2ba)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a42_0x54c1ae(0x17a)](_0x34f338){const _0x1e1c15=a42_0x54c1ae,{options:_0x5192c9,args:_0x4f46bb,tdx:_0xb20dc0}=_0x34f338,_0x35584e=this[_0x1e1c15(0x166)](_0x4f46bb,_0x5192c9),_0x2dc76b=_0x5192c9['revision'],_0x411020=_0x5192c9['skipValidation'];_0x5192c9[_0x1e1c15(0x222)]&&(_0x35584e&&console[_0x1e1c15(0x272)](_0x1e1c15(0x142)+_0x35584e),_0x2dc76b&&console[_0x1e1c15(0x272)](_0x1e1c15(0x219)+_0x2dc76b),_0x5192c9['dryRun']&&console[_0x1e1c15(0x272)](_0x1e1c15(0x230)),_0x411020&&console[_0x1e1c15(0x272)](_0x1e1c15(0x281)));let _0x299b8a;try{_0x299b8a=await withSpinner('Analyzing\x20changes...',()=>_0xb20dc0[_0x1e1c15(0x247)][_0x1e1c15(0x176)]({'sourceDir':_0x35584e,'revision':_0x2dc76b,'skipValidation':_0x411020}),{'verbose':_0x5192c9[_0x1e1c15(0x222)]});}catch(_0x22164c){if(_0x22164c instanceof Error&&_0x22164c[_0x1e1c15(0x1fa)]['includes'](_0x1e1c15(0x1d9)))return console[_0x1e1c15(0x272)](a42_0x484372[_0x1e1c15(0x130)](_0x1e1c15(0x241)),_0x1e1c15(0x1bb)),_0x5192c9[_0x1e1c15(0x133)]?console[_0x1e1c15(0x272)](a42_0x484372[_0x1e1c15(0x257)]('Tip:\x20cd\x20to\x20workflows/'+_0x5192c9[_0x1e1c15(0x133)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x5192c9[_0x1e1c15(0x133)]+'\x27')):console[_0x1e1c15(0x272)](a42_0x484372[_0x1e1c15(0x257)](_0x1e1c15(0x1b6))),0x1;throw _0x22164c;}const _0x58a5aa=_0x299b8a['data'];console[_0x1e1c15(0x272)](_0x1e1c15(0x16c)+_0x58a5aa[_0x1e1c15(0x1c5)]),console[_0x1e1c15(0x272)](_0x1e1c15(0x1df)+_0x58a5aa[_0x1e1c15(0x24a)]),console[_0x1e1c15(0x272)]('\x20\x20Revision:\x20'+_0x58a5aa['revision']),console[_0x1e1c15(0x272)]('\x20\x20Changes:\x20'+a42_0x484372[_0x1e1c15(0x282)]('+'+_0x58a5aa['summary'][_0x1e1c15(0x18a)]+_0x1e1c15(0x24b))+',\x20'+(a42_0x484372[_0x1e1c15(0x285)]('~'+_0x58a5aa['summary'][_0x1e1c15(0x1e1)]+_0x1e1c15(0x17c))+',\x20')+(a42_0x484372[_0x1e1c15(0x130)]('-'+_0x58a5aa['summary'][_0x1e1c15(0x2a7)]+_0x1e1c15(0x147))+',\x20')+(''+a42_0x484372[_0x1e1c15(0x257)](_0x58a5aa['summary']['unchanged']+_0x1e1c15(0x195))));for(const _0x20855c of _0x58a5aa[_0x1e1c15(0x1ca)]){_0x20855c[_0x1e1c15(0x1b2)]===_0x1e1c15(0x1e1)&&_0x20855c['diff']&&(console[_0x1e1c15(0x272)]('\x0a'+a42_0x484372[_0x1e1c15(0x28c)](_0x1e1c15(0x162)+_0x20855c[_0x1e1c15(0x183)])),console['error'](_0x20855c[_0x1e1c15(0x228)]));}if(!_0x58a5aa['hasChanges'])return console[_0x1e1c15(0x272)](a42_0x484372['green'](_0x1e1c15(0x22a))),await this[_0x1e1c15(0x2b2)](_0xb20dc0,_0x58a5aa[_0x1e1c15(0x1c5)],_0x5192c9[_0x1e1c15(0x1ed)]),0x0;if(_0x5192c9[_0x1e1c15(0x134)])return console[_0x1e1c15(0x272)](a42_0x484372[_0x1e1c15(0x285)](_0x1e1c15(0x16f))),0x0;if(!_0x5192c9[_0x1e1c15(0x140)]){const _0x2952f4=await confirmKey(_0x1e1c15(0x25b));if(!_0x2952f4)return console[_0x1e1c15(0x272)](_0x1e1c15(0x273)),0x0;}const _0x219832=await withSpinner('Pushing\x20project...',()=>_0xb20dc0[_0x1e1c15(0x247)]['executePushProject'](_0x58a5aa),{'verbose':_0x5192c9[_0x1e1c15(0x222)]}),_0x441ba9=_0x219832[_0x1e1c15(0x150)];return console['error'](a42_0x484372['green'](_0x1e1c15(0x17d))),console[_0x1e1c15(0x272)](_0x1e1c15(0x20f)+_0x441ba9['projectId']),console[_0x1e1c15(0x272)](_0x1e1c15(0x229)+_0x441ba9[_0x1e1c15(0x13b)]),await this['showWorkflowConsoleUrl'](_0xb20dc0,_0x441ba9['projectName'],_0x5192c9[_0x1e1c15(0x1ed)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']=a42_0x54c1ae(0x2c5);[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x152);async['execute'](_0x1a1bd8){const _0x32203f=a42_0x54c1ae,{options:_0x361c06,args:_0x5746d2,tdx:_0x1b99c2}=_0x1a1bd8,_0xfe34a0=this[_0x32203f(0x166)](_0x5746d2,_0x361c06),_0x14298f=_0x361c06[_0x32203f(0x236)],_0x5658bf=_0x361c06[_0x32203f(0x13b)],_0x12845a=_0x361c06['skipValidation'];if(!_0xfe34a0)return console[_0x32203f(0x272)](a42_0x484372[_0x32203f(0x130)](_0x32203f(0x241)),_0x32203f(0x1b0)),console[_0x32203f(0x272)](a42_0x484372[_0x32203f(0x257)](_0x32203f(0x2b9))),console[_0x32203f(0x272)](a42_0x484372[_0x32203f(0x257)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x14298f)return console[_0x32203f(0x272)](a42_0x484372[_0x32203f(0x130)](_0x32203f(0x241)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console['error'](a42_0x484372[_0x32203f(0x257)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x361c06['verbose']&&(console[_0x32203f(0x272)](_0x32203f(0x142)+_0xfe34a0),console[_0x32203f(0x272)](_0x32203f(0x1c8)+_0x14298f),_0x5658bf&&console[_0x32203f(0x272)]('Revision:\x20'+_0x5658bf),_0x361c06[_0x32203f(0x134)]&&console[_0x32203f(0x272)](_0x32203f(0x230)),_0x12845a&&console[_0x32203f(0x272)](_0x32203f(0x281)));const _0x31cad1=await withSpinner(_0x32203f(0x277),()=>_0x1b99c2[_0x32203f(0x247)][_0x32203f(0x19f)](_0xfe34a0,_0x14298f,{'revision':_0x5658bf,'skipValidation':_0x12845a}),{'verbose':_0x361c06[_0x32203f(0x222)]}),_0x46bbd0=_0x31cad1[_0x32203f(0x150)];console['error'](_0x32203f(0x16b)+_0x46bbd0[_0x32203f(0x24a)]);_0x46bbd0[_0x32203f(0x2cc)]&&console[_0x32203f(0x272)](_0x32203f(0x1a1)+_0x46bbd0[_0x32203f(0x2cc)]);console[_0x32203f(0x272)](_0x32203f(0x1c8)+_0x46bbd0[_0x32203f(0x26f)]),console['error'](_0x32203f(0x219)+_0x46bbd0[_0x32203f(0x13b)]),console[_0x32203f(0x272)](_0x32203f(0x243)+_0x46bbd0['fileCount']);_0x46bbd0[_0x32203f(0x237)]&&(console[_0x32203f(0x272)](a42_0x484372[_0x32203f(0x285)](_0x32203f(0x252)+_0x46bbd0[_0x32203f(0x26f)]+_0x32203f(0x141)+_0x46bbd0[_0x32203f(0x2a2)]+')')),console[_0x32203f(0x272)](a42_0x484372['yellow']('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x361c06[_0x32203f(0x134)])return console[_0x32203f(0x272)](a42_0x484372[_0x32203f(0x285)](_0x32203f(0x16d))),0x0;if(!_0x361c06['yes']){const _0x3aa514=_0x46bbd0[_0x32203f(0x2cc)]||a42_0x42ed95[_0x32203f(0x2c3)](_0xfe34a0),_0x207689=_0x46bbd0[_0x32203f(0x237)]?_0x32203f(0x270)+_0x14298f+_0x32203f(0x2da):_0x32203f(0x1cb)+_0x3aa514+'\x22\x20to\x20new\x20project\x20\x22'+_0x14298f+'\x22?',_0x4f294e=await confirmKey(_0x207689);if(!_0x4f294e)return console[_0x32203f(0x272)](_0x32203f(0x273)),0x0;}const _0x5a0dd3=await withSpinner(_0x46bbd0[_0x32203f(0x237)]?_0x32203f(0x240)+_0x14298f+'...':_0x32203f(0x28e)+_0x14298f+_0x32203f(0x20e),()=>_0x1b99c2[_0x32203f(0x247)]['executeCloneProject'](_0x46bbd0),{'verbose':_0x361c06['verbose']}),_0x40d739=_0x5a0dd3[_0x32203f(0x150)];return console['error'](a42_0x484372[_0x32203f(0x282)](_0x46bbd0['targetExists']?_0x32203f(0x28f):_0x32203f(0x251))),console[_0x32203f(0x272)]('\x20\x20Project:\x20'+_0x40d739[_0x32203f(0x26f)]),console[_0x32203f(0x272)](_0x32203f(0x20f)+_0x40d739[_0x32203f(0x12d)]),console[_0x32203f(0x272)](_0x32203f(0x229)+_0x40d739[_0x32203f(0x13b)]),await this['showWorkflowConsoleUrl'](_0x1b99c2,_0x40d739[_0x32203f(0x26f)],_0x361c06['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x1a2);[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x227);async[a42_0x54c1ae(0x17a)](_0x5ef64a){const _0x99f7d9=a42_0x54c1ae,{options:_0x4bf703,args:_0x11dc0c,tdx:_0x1bd787}=_0x5ef64a,_0x52d47c=_0x11dc0c[0x0];if(!_0x52d47c)return console['error'](_0x99f7d9(0x218)),console[_0x99f7d9(0x272)](_0x99f7d9(0x14e)),0x1;_0x4bf703[_0x99f7d9(0x222)]&&console[_0x99f7d9(0x272)](_0x99f7d9(0x275)+_0x52d47c);if(!_0x4bf703[_0x99f7d9(0x140)]){const _0x55ad25=await confirmKey(_0x99f7d9(0x20c)+_0x52d47c+_0x99f7d9(0x1f8));if(!_0x55ad25)return console[_0x99f7d9(0x272)](_0x99f7d9(0x273)),0x0;}const _0x46da24=await withSpinner(_0x99f7d9(0x2bc)+_0x52d47c+_0x99f7d9(0x20e),()=>_0x1bd787['workflow']['delete'](_0x52d47c),{'verbose':_0x4bf703[_0x99f7d9(0x222)]}),_0x19f7b9=_0x46da24[_0x99f7d9(0x150)];return console['error'](_0x99f7d9(0x21e)+_0x19f7b9['projectName']),console[_0x99f7d9(0x272)](_0x99f7d9(0x20f)+_0x19f7b9['projectId']),0x0;}}export function parseKeyValue(_0x1419ea){const _0x5abdff=a42_0x54c1ae,_0x3bf01a=_0x1419ea[_0x5abdff(0x13a)]('=');if(_0x3bf01a===-0x1)throw new Error('Invalid\x20format:\x20'+_0x1419ea+_0x5abdff(0x24f));const _0x35b39f=_0x1419ea['substring'](0x0,_0x3bf01a),_0x12c38d=_0x1419ea['substring'](_0x3bf01a+0x1);if(!_0x35b39f)throw new Error(_0x5abdff(0x139));return{'key':_0x35b39f,'value':_0x12c38d};}function a42_0x7041(){const _0x43650d=['renderTimeline','getDate','sourceDir','\x20new','No\x20attempts\x20found\x20for:\x20','workflow:download','1054988vvYhJG','.\x20Expected\x20format:\x20KEY=VALUE','36FCrOry','✔\x20Clone\x20complete','\x0a⚠\x20Project\x20\x22','join','✔\x20Showing\x20','now','From\x20task:\x20','dim','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','workflows','MAX_TIMELINE_WIDTH','\x0aPush\x20these\x20changes?','map','download','\x27\x20from\x20project\x20\x27','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','columns','POLL_INTERVAL_MS','\x20(use\x20--limit\x20to\x20show\x20more)','(unknown)','Resolving\x20project\x20\x27','unchanged','sessionTime','projects','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','task','isNewProject','pending','Retrying\x20attempt...','sessions','isTTY','newProjectName','\x0aUpdate\x20existing\x20project\x20\x22','getFullYear','error','Cancelled','utf-8','Project:\x20','targetDir','Analyzing\x20project...','tdx.json','✔\x20New\x20project:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20attempt','log','navigateSessionsInteractive','renderSingleTimeline','follow','filter','Validation:\x20skipped','green','duration','replace','yellow','stat','ICON_SPACING','✔\x20Secret\x20\x27','logs','getTime','Error:\x20Attempt\x20ID\x20is\x20required','cyan','attempt','Cloning\x20to\x20','✔\x20Project\x20updated','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','metadata','retryAttemptName','Params:\x20','list','\x20has\x20no\x20attempts','run','min','displayLine','Using\x20attempt\x20','fill','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Pattern:\x20','workflow:kill','filesExtracted','match','blue','existingProjectId','Session\x20time:\x20','param','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20workflow','deleted','canceling','\x20\x20New\x20attempt\x20ID:\x20','state','fullName','Usage:\x20tdx\x20wf\x20use\x20<project>','List\x20workflows','(use\x20--limit\x20to\x20see\x20more)','workflow:use','includes','jsonl','showWorkflowConsoleUrl','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Listing\x20secrets...','buildTimelineData','\x20session','List\x20workflow\x20execution\x20sessions','workflow:secrets:set','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','description','getHours','Deleting\x20project\x20','MIN_TIMELINE_WIDTH','lastAttempt','values','Include\x20retried:\x20yes','trimEnd','💡\x20Tip:\x20Use\x20','basename','workflow:secrets:delete','workflow:clone','Output\x20directory:\x20','\x27...','resolveProject','7519864qQhELD','some','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','sourceProjectName','logFiles','\x20\x20Console:\x20','startedAt','splice','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','length','30Kxdyyn','No\x20workflows\x20found','Retry\x20a\x20session\x20or\x20attempt','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','isDirectory','fileSize','finishedAt','\x22\x20with\x20new\x20revision?','Setting\x20secret...','resolveProjectId','LABEL_MIN_SPACING','newProjectId','workflow:tasks','resolve','red','No\x20sessions\x20found','Getting\x20attempt\x20details...','workflowProject','dryRun','192HgpzsN','\x20secret','Resume\x20from:\x20','force','Key\x20cannot\x20be\x20empty','indexOf','revision','resumeFrom','stringify','localeCompare','getMonth','yes','\x22\x20already\x20exists\x20(ID:\x20','Source\x20directory:\x20','select','Loading\x20session...','No\x20sessions\x20found\x20in\x20project:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','\x20deleted','session_id','set','✔\x20Workflow\x20project\x20set\x20to:\x20','includeRetried','Error:\x20KEY=VALUE\x20is\x20required','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Usage:\x20workflow:delete\x20<project-name-or-id>','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','data','Expected\x20format:\x20--param\x20key=value','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','Status:\x20','has','group_error','attemptId','startTime','context','\x20\x20Changes:\x20','Target:\x20','params','Start\x20a\x20workflow\x20run','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','fromTask','Auto-selected\x20latest\x20session:\x20','relative','size','---\x20','TASK_NAME_WIDTH','Listing\x20workflow\x20attempts...','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','resolveProjectDir','fs/promises','Session\x20','stdout','✔\x20Pushed\x20','Source:\x20','✔\x20Project:\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','index','\x0aDry\x20run\x20-\x20nothing\x20pushed','Parameters:\x20','No\x20sessions\x20found\x20for:\x20','List\x20workflow\x20attempts','workflow:timeline','autocomplete','substring','preparePushProject','Killing\x20attempt...','key','start','execute','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20modified','✔\x20Push\x20complete','workflow:attempts','kill','renderSessionsTimeline','startsWith','ICON_WIDTH','path','pollTimeline','value','Workflow:\x20','tdx\x20wf\x20attempt\x20','Kill\x20a\x20running\x20attempt','requireProject','new','List\x20all\x20workflow\x20projects','end','Listing\x20workflow\x20projects...','Loading\x20sessions...','\x0a✔\x20Already\x20up\x20to\x20date','workflow:attempt','Total:\x20','table','unknown','✔\x20Downloaded\x20','\x20unchanged','project','format','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Session\x20not\x20found:\x20','running','\x20-\x20','473066KiAqNx','No\x20workflow\x20projects\x20found','floor','prepareCloneProject','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','Source\x20project:\x20','workflow:delete','white','Filter:\x20project=','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Pulling\x20project\x20','text','max','\x20of\x20','🔄\x20','applyPullProject','summary','No\x20attempts\x20found','Select\x20a\x20workflow\x20to\x20run','Listing\x20workflows...','Source\x20directory\x20is\x20required','attempt:','type','\x20\x20Target:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt',',\x20Workflow:\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','readFile','pullProject','clear','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','\x1b[1A\x1b[2K','2BbjyfT','workflow:run','parseProjectWorkflowPattern','No\x20matching\x20sessions\x20found','No\x20log\x20content\x20found','durationMs','\x20\x20Session\x20context\x20set\x20to:\x20','updatedAt','projectName','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','tasks','New\x20project\x20name:\x20','GUTTER','changes','\x0aClone\x20\x22','taskName','\x20task','7512RhThns','includeSubtasks','✔\x20Found\x20','get','Key:\x20','window','all','1853535DRYuAK','write','workflow:pull','padStart','No\x20workflow\x20tdx.json\x20found','getMinutes','title','parse','retrySession','push','\x20\x20Source:\x20','Error:\x20Project\x20name\x20is\x20required','modified','Writing\x20files...','\x0a✔\x20Attempt\x20complete','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Listing\x20workflow\x20sessions...','split','sys','12884564DFLisq','sort','sessionId','createdAt','site','\x20tasks','done','json','slice','MAX_TASKS_DISPLAY','MAX_LABEL_COUNT','Show\x20specific\x20attempt\x20details','\x20from\x20session\x20','📁\x20','workflow:retry','\x22?\x20This\x20cannot\x20be\x20undone.','\x20\x20Project:\x20','message','deleteSecret','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Downloading\x20logs...','\x0aPolling...\x20(','\x20sessions\x20','repeat','\x20\x20tdx\x20wf\x20use\x20<project>','toLowerCase','cancelRequested','output','✔\x20Workflow\x20project\x20context\x20cleared.','Project\x20name\x20is\x20required','find','1041ZMLSLp','3685870ppXUwm','\x20project','reason','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','success','...','\x20\x20Project\x20ID:\x20','Reason:\x20','limit','No\x20workflow\x20sessions\x20found','icon','total','/attempt/','rows','listSecrets','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Revision:\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','toISOString','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Attempt\x20ID:\x20','✔\x20Deleted\x20project\x20','Attempt:\x20','\x20\x20Session\x20ID:\x20','planned','verbose','\x20\x20Location:\x20','status','Filter:\x20','generateSessionTimelineRows','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','diff','\x20\x20Revision:\x20','\x0a✔\x20No\x20changes\x20to\x20push','Including\x20subtasks:\x20yes','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x0aApply\x20these\x20changes?','trim','Select\x20a\x20task\x20to\x20view\x20logs:','Dry\x20run:\x20yes','session','retryAttempt','\x20to\x20see\x20detailed\x20logs','\x20\x20Attempt\x20ID:\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','name','targetExists','attempts','setSecret','✔\x20Workflow\x20run\x20started','✔\x20Pull\x20complete','\x20(system)','\x0aDry\x20run\x20-\x20no\x20files\x20written','workflowName','Loading\x20workflows...','Updating\x20','Error:','skipValidation','Files\x20to\x20upload:\x20','No\x20sessions\x20with\x20timing\x20information','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','revision:\x20','workflow'];a42_0x7041=function(){return _0x43650d;};return a42_0x7041();}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x54c1ae(0x236)]='workflow:secrets:list';[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x14f);async[a42_0x54c1ae(0x17a)](_0x4cbd7e){const _0x1bd786=a42_0x54c1ae,{options:_0x83107f,args:_0x30a895,tdx:_0x3c30b7}=_0x4cbd7e,_0x51b1e7=this[_0x1bd786(0x189)](_0x30a895,_0x83107f);if(!_0x51b1e7)return 0x1;_0x83107f[_0x1bd786(0x222)]&&console[_0x1bd786(0x272)](_0x1bd786(0x275)+_0x51b1e7);const _0x42a267=await withSpinner(_0x1bd786(0x2b4),()=>_0x3c30b7['workflow'][_0x1bd786(0x217)](_0x51b1e7),{'verbose':_0x83107f[_0x1bd786(0x222)]}),{secrets:_0x550e41}=_0x42a267[_0x1bd786(0x150)];return console[_0x1bd786(0x272)](_0x1bd786(0x1d0)+_0x550e41['length']+_0x1bd786(0x136)+(_0x550e41[_0x1bd786(0x2d2)]!==0x1?'s':'')),await handleSDKOutput(_0x550e41,_0x83107f),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x2b8);['description']='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async['execute'](_0x2fbcb8){const _0x1dbc66=a42_0x54c1ae,{options:_0x2f4a5a,args:_0x300572,tdx:_0x19d754}=_0x2fbcb8;let _0x1947fd,_0x2b9044;if(_0x300572['length']>=0x2)_0x1947fd=_0x300572[0x0],_0x2b9044=_0x300572[0x1];else{if(_0x300572['length']===0x1&&_0x2f4a5a[_0x1dbc66(0x133)])_0x1947fd=_0x2f4a5a[_0x1dbc66(0x133)],_0x2b9044=_0x300572[0x0];else return _0x300572['length']===0x1?(console[_0x1dbc66(0x272)](_0x1dbc66(0x1e0)),console[_0x1dbc66(0x272)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x1dbc66(0x272)](_0x1dbc66(0x14c)),console[_0x1dbc66(0x272)](_0x1dbc66(0x1a0)),0x1);}let _0x2fe243,_0x5cd7a2;try{({key:_0x2fe243,value:_0x5cd7a2}=parseKeyValue(_0x2b9044));}catch(_0xd3f14){return _0xd3f14 instanceof Error&&console[_0x1dbc66(0x272)](a42_0x484372[_0x1dbc66(0x130)](_0x1dbc66(0x241)),_0xd3f14[_0x1dbc66(0x1fa)]),0x1;}_0x2f4a5a['verbose']&&(console[_0x1dbc66(0x272)]('Project:\x20'+_0x1947fd),console['error'](_0x1dbc66(0x1d2)+_0x2fe243));const _0x325dbe=await withSpinner(_0x1dbc66(0x2db),()=>_0x19d754[_0x1dbc66(0x247)][_0x1dbc66(0x239)](_0x1947fd,_0x2fe243,_0x5cd7a2),{'verbose':_0x2f4a5a['verbose']}),_0x3bc1dc=_0x325dbe[_0x1dbc66(0x150)];return console[_0x1dbc66(0x272)](_0x1dbc66(0x288)+_0x3bc1dc[_0x1dbc66(0x178)]+_0x1dbc66(0x15d)+_0x3bc1dc['projectName']+'\x27'),(_0x2f4a5a[_0x1dbc66(0x1f0)]||_0x2f4a5a['jsonl'])&&await handleSingleObjectOutput(_0x3bc1dc,_0x2f4a5a),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x2c4);['description']=a42_0x54c1ae(0x268);async['execute'](_0x136b99){const _0x56546e=a42_0x54c1ae,{options:_0x331896,args:_0xa55291,tdx:_0x886f3a}=_0x136b99;let _0x266749,_0x3c542f;if(_0xa55291[_0x56546e(0x2d2)]>=0x2)_0x266749=_0xa55291[0x0],_0x3c542f=_0xa55291[0x1];else{if(_0xa55291[_0x56546e(0x2d2)]===0x1&&_0x331896[_0x56546e(0x133)])_0x266749=_0x331896[_0x56546e(0x133)],_0x3c542f=_0xa55291[0x0];else return _0xa55291[_0x56546e(0x2d2)]===0x1?(console[_0x56546e(0x272)](_0x56546e(0x1e0)),console[_0x56546e(0x272)](_0x56546e(0x27a)),0x1):(console[_0x56546e(0x272)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x56546e(0x272)](_0x56546e(0x2b3)),0x1);}_0x331896[_0x56546e(0x222)]&&(console[_0x56546e(0x272)](_0x56546e(0x275)+_0x266749),console[_0x56546e(0x272)]('Key:\x20'+_0x3c542f));if(!_0x331896['yes']){const _0x5b165e=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x3c542f+_0x56546e(0x25e)+_0x266749+'\x27?');if(!_0x5b165e)return console[_0x56546e(0x272)](_0x56546e(0x273)),0x0;}const _0x2e6b1e=await withSpinner('Deleting\x20secret...',()=>_0x886f3a[_0x56546e(0x247)][_0x56546e(0x1fb)](_0x266749,_0x3c542f),{'verbose':_0x331896[_0x56546e(0x222)]}),_0x3e8e9a=_0x2e6b1e[_0x56546e(0x150)];return console[_0x56546e(0x272)](_0x56546e(0x288)+_0x3e8e9a['key']+_0x56546e(0x235)+_0x3e8e9a['projectName']+'\x27'),(_0x331896[_0x56546e(0x1f0)]||_0x331896[_0x56546e(0x2b1)])&&await handleSingleObjectOutput(_0x3e8e9a,_0x331896),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(_0xd5826c){const _0x3a15a7=a42_0x54c1ae,_0xbeb821=Math[_0x3a15a7(0x19e)](_0xd5826c/0x3e8),_0x1e2f06=Math[_0x3a15a7(0x19e)](_0xbeb821/0x3c),_0x40a3da=Math[_0x3a15a7(0x19e)](_0x1e2f06/0x3c),_0x3f6d95=Math[_0x3a15a7(0x19e)](_0x40a3da/0x18);if(_0x3f6d95>0x0){const _0x354404=_0x40a3da%0x18;return _0x354404>0x0?_0x3f6d95+'d\x20'+_0x354404+'h':_0x3f6d95+'d';}else{if(_0x40a3da>0x0){const _0x23887d=_0x1e2f06%0x3c;return _0x23887d>0x0?_0x40a3da+'h\x20'+_0x23887d+'m':_0x40a3da+'h';}else{if(_0x1e2f06>0x0){const _0x545ca9=_0xbeb821%0x3c;return _0x545ca9>0x0?_0x1e2f06+'m\x20'+_0x545ca9+'s':_0x1e2f06+'m';}else return _0xbeb821+'s';}}}function formatTimestamp(_0x157e50,_0x3d7a4d){const _0x2891c1=a42_0x54c1ae,_0x3c50d4=new Date(_0x157e50),_0x2e9df4=String(_0x3c50d4[_0x2891c1(0x2bb)]())['padStart'](0x2,'0'),_0x4bdc5c=String(_0x3c50d4[_0x2891c1(0x1da)]())[_0x2891c1(0x1d8)](0x2,'0'),_0x26c8ce=_0x2e9df4+':'+_0x4bdc5c,_0x3fc6ac=_0x3c50d4['getFullYear']()===_0x3d7a4d[_0x2891c1(0x271)]()&&_0x3c50d4[_0x2891c1(0x13f)]()===_0x3d7a4d[_0x2891c1(0x13f)]()&&_0x3c50d4['getDate']()===_0x3d7a4d[_0x2891c1(0x249)]();if(_0x3fc6ac)return _0x26c8ce;else{const _0x3ff68f=String(_0x3c50d4[_0x2891c1(0x13f)]()+0x1)['padStart'](0x2,'0'),_0x123943=String(_0x3c50d4[_0x2891c1(0x249)]())[_0x2891c1(0x1d8)](0x2,'0');return _0x3ff68f+'-'+_0x123943+'\x20'+_0x26c8ce;}}function formatDate(_0x11960e){const _0x4917e3=a42_0x54c1ae,_0x11d092=_0x11960e[_0x4917e3(0x271)](),_0x495e4e=String(_0x11960e[_0x4917e3(0x13f)]()+0x1)[_0x4917e3(0x1d8)](0x2,'0'),_0x56cf34=String(_0x11960e[_0x4917e3(0x249)]())[_0x4917e3(0x1d8)](0x2,'0');return _0x11d092+'-'+_0x495e4e+'-'+_0x56cf34;}function getTaskStateIcon(_0x457802){const _0x54cbde={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x54cbde[_0x457802]||'⚪';}function getBarChar(_0x10d844){const _0x4a9e20=a42_0x54c1ae;return _0x10d844===_0x4a9e20(0x272)||_0x10d844===_0x4a9e20(0x155)?'×':'─';}function getBarColor(_0x59abd9){const _0x262160=a42_0x54c1ae,_0x2666e2={'success':a42_0x484372[_0x262160(0x282)],'error':a42_0x484372['red'],'group_error':a42_0x484372['red'],'running':a42_0x484372[_0x262160(0x2a1)],'blocked':a42_0x484372['yellow'],'planned':a42_0x484372[_0x262160(0x257)],'canceling':a42_0x484372[_0x262160(0x285)]};return _0x2666e2[_0x59abd9]||a42_0x484372[_0x262160(0x1a3)];}function parseTaskName(_0x11ff10){const _0x4ee4df=a42_0x54c1ae;let _0x208f0e=_0x11ff10[_0x4ee4df(0x284)](/^\++/,'');const _0x621643=_0x208f0e[_0x4ee4df(0x1e7)]('+'),_0xa90e98=_0x621643[_0x4ee4df(0x2d2)]>0x1?_0x621643[_0x4ee4df(0x2d2)]-0x2:0x0,_0x2d561f=_0x621643[_0x621643['length']-0x1]||_0x208f0e;return{'level':_0xa90e98,'name':'+'+_0x2d561f};}function truncateTaskName(_0x296aca,_0x11c8ae){const _0x129ef1=a42_0x54c1ae,_0x52d157=stringWidth(_0x296aca);if(_0x52d157<=_0x11c8ae)return _0x296aca;let _0x2b9360=_0x296aca;while(stringWidth(_0x2b9360+'…')>_0x11c8ae&&_0x2b9360['length']>0x0){_0x2b9360=_0x2b9360[_0x129ef1(0x1f1)](0x0,-0x1);}return _0x2b9360+'…';}function calculateTimeScale(_0x5b344e,_0x4994b9){const _0x4e0f47=a42_0x54c1ae;return{'startTime':_0x5b344e[_0x4e0f47(0x179)],'endTime':_0x5b344e[_0x4e0f47(0x18c)],'durationMs':_0x5b344e[_0x4e0f47(0x283)],'msPerChar':_0x5b344e['duration']/_0x4994b9};}function timeToPosition(_0x27c489,_0xd19dbb,_0x59e0db){const _0x4cfe71=a42_0x54c1ae,_0x452197=_0x27c489-_0xd19dbb[_0x4cfe71(0x157)],_0x17db0a=Math[_0x4cfe71(0x19e)](_0x452197/_0xd19dbb['msPerChar']);return Math[_0x4cfe71(0x1a8)](0x0,Math[_0x4cfe71(0x298)](_0x17db0a,_0x59e0db));}function renderTimeAxis(_0x56e52a,_0x3081b2){const _0x21927d=a42_0x54c1ae,_0x7abbd5=Math['min'](TIMELINE_CONFIG[_0x21927d(0x1f3)],Math['max'](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x21927d(0x19e)](_0x3081b2/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x2a9803=_0x56e52a[_0x21927d(0x1c2)]/(_0x7abbd5-0x1),_0x365ddb=new Date(_0x56e52a[_0x21927d(0x157)]),_0xa745ee=[];for(let _0x5024ec=0x0;_0x5024ec<_0x7abbd5;_0x5024ec++){const _0xb37b1d=_0x56e52a['startTime']+_0x5024ec*_0x2a9803,_0x1e8b94=timeToPosition(_0xb37b1d,_0x56e52a,_0x3081b2),_0x38edd8=formatTimestamp(_0xb37b1d,_0x365ddb);_0xa745ee[_0x21927d(0x1de)]({'pos':_0x1e8b94,'text':_0x38edd8});}const _0xf6540e=new Array(_0x3081b2)[_0x21927d(0x29b)]('\x20');let _0x2a6ced=-0x1;for(const {pos:_0x18cff2,text:_0x34c03d}of _0xa745ee){let _0x39b185=Math[_0x21927d(0x1a8)](0x0,_0x18cff2-Math[_0x21927d(0x19e)](_0x34c03d['length']/0x2));_0x39b185<=_0x2a6ced+TIMELINE_CONFIG[_0x21927d(0x12c)]&&(_0x39b185=_0x2a6ced+TIMELINE_CONFIG[_0x21927d(0x12c)]+0x1);_0x39b185+_0x34c03d['length']>_0x3081b2&&(_0x39b185=_0x3081b2-_0x34c03d[_0x21927d(0x2d2)]);if(_0x39b185>=0x0&&_0x39b185+_0x34c03d[_0x21927d(0x2d2)]<=_0x3081b2&&_0x39b185>_0x2a6ced){for(let _0x17b418=0x0;_0x17b418<_0x34c03d[_0x21927d(0x2d2)];_0x17b418++){_0xf6540e[_0x39b185+_0x17b418]=_0x34c03d[_0x17b418];}_0x2a6ced=_0x39b185+_0x34c03d[_0x21927d(0x2d2)]-0x1;}}return _0xf6540e[_0x21927d(0x253)]('');}function renderTaskRow(_0x2761aa,_0x14ee03,_0x138128,_0x22357b){const _0x18241f=a42_0x54c1ae,{level:_0x32eea2,name:_0x5d768e}=parseTaskName(_0x2761aa[_0x18241f(0x236)]),_0x18d575='\x20'[_0x18241f(0x200)](_0x32eea2),_0x1be3d0=_0x2761aa['window']?'('+formatElapsed(_0x2761aa[_0x18241f(0x1d3)]['duration'])+')':'',_0x5fa805=stringWidth(_0x1be3d0),_0x41db15=_0x32eea2*0x1,_0x1e2325=_0x22357b-_0x41db15-_0x5fa805-0x1,_0x58273d=truncateTaskName(_0x5d768e,_0x1e2325),_0x1c75c0=_0x18d575+_0x58273d,_0x11e6a6=stringWidth(_0x1c75c0),_0x1604e8=_0x22357b-_0x11e6a6-_0x5fa805,_0x23572e=_0x1c75c0+'\x20'[_0x18241f(0x200)](Math[_0x18241f(0x1a8)](0x1,_0x1604e8))+a42_0x484372[_0x18241f(0x257)](_0x1be3d0),_0x3c441e=getTaskStateIcon(_0x2761aa[_0x18241f(0x2aa)]),_0x2af8db=new Array(_0x138128)[_0x18241f(0x29b)]('\x20');if(_0x2761aa['window']){const _0x31d8d7=timeToPosition(_0x2761aa['window']['start'],_0x14ee03,_0x138128),_0xaa1709=timeToPosition(_0x2761aa[_0x18241f(0x1d3)][_0x18241f(0x18c)],_0x14ee03,_0x138128),_0x49524f=getBarChar(_0x2761aa[_0x18241f(0x2aa)]),_0x130d16=Math[_0x18241f(0x1a8)](_0x31d8d7+0x1,_0xaa1709);for(let _0x5b62a5=_0x31d8d7;_0x5b62a5<Math[_0x18241f(0x298)](_0x130d16,_0x138128);_0x5b62a5++){_0x2af8db[_0x5b62a5]=_0x49524f;}}const _0x38e695=getBarColor(_0x2761aa[_0x18241f(0x2aa)]),_0x178517=_0x2af8db[_0x18241f(0x25c)](_0x29e6eb=>_0x29e6eb==='\x20'?'\x20':_0x38e695(_0x29e6eb))[_0x18241f(0x253)]('');return _0x3c441e+'\x20'+_0x23572e+'│'+_0x178517+'│';}function calculateStats(_0x230f29){const _0x30a475=a42_0x54c1ae,_0x24aefe={'total':_0x230f29['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x4a01eb of _0x230f29){if(_0x4a01eb['state']==='success')_0x24aefe[_0x30a475(0x20d)]++;else{if(_0x4a01eb[_0x30a475(0x2aa)]===_0x30a475(0x272)||_0x4a01eb[_0x30a475(0x2aa)]===_0x30a475(0x155))_0x24aefe[_0x30a475(0x272)]++;else _0x4a01eb[_0x30a475(0x2aa)]===_0x30a475(0x19a)?_0x24aefe[_0x30a475(0x19a)]++:_0x24aefe[_0x30a475(0x26b)]++;}}return _0x24aefe;}function formatStats(_0x2ba752){const _0x36744b=a42_0x54c1ae;return[_0x36744b(0x191)+_0x2ba752[_0x36744b(0x214)],'✅\x20'+_0x2ba752[_0x36744b(0x20d)],'❌\x20'+_0x2ba752['error'],_0x36744b(0x1aa)+_0x2ba752[_0x36744b(0x19a)],'⏳\x20'+_0x2ba752[_0x36744b(0x26b)]][_0x36744b(0x253)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x54c1ae(0x236)]=a42_0x54c1ae(0x173);[a42_0x54c1ae(0x2ba)]=a42_0x54c1ae(0x2a5);async[a42_0x54c1ae(0x17a)](_0xbd80d){const _0x48e537=a42_0x54c1ae,{options:_0xd21f12,args:_0x37c29d,tdx:_0x4ba679}=_0xbd80d;let _0x589038,_0x1eee05,_0x5f0d2c=![];if(_0x37c29d[0x0]){if(_0x37c29d[0x0][_0x48e537(0x2b0)]('.')){const _0x311217=this[_0x48e537(0x1bf)](_0x37c29d,_0xd21f12);if(!_0x311217)return 0x1;_0x589038=_0x311217[_0x48e537(0x1c5)],_0x1eee05=_0x311217['workflowName'];}else{_0x1eee05=_0x37c29d[0x0],_0x589038=_0xd21f12[_0x48e537(0x133)];if(!_0x589038)return console[_0x48e537(0x272)](a42_0x484372[_0x48e537(0x130)](_0x48e537(0x241)),_0x48e537(0x17b)),0x1;_0x5f0d2c=!![];}}else{const _0x49ceff=this['parseProjectWorkflowPattern'](_0x37c29d,_0xd21f12);if(!_0x49ceff)return 0x1;_0x589038=_0x49ceff['projectName'],_0x1eee05=_0x49ceff[_0x48e537(0x23e)];}if(_0xd21f12[_0x48e537(0x222)]){if(_0x589038&&_0x1eee05)console['error'](_0x48e537(0x225)+_0x589038+'.'+_0x1eee05);else _0x589038&&console['error'](_0x48e537(0x1a4)+_0x589038);}const _0x2a8809=_0xd21f12[_0x48e537(0x156)],_0x596b14=_0xd21f12[_0x48e537(0x1eb)];if(_0x2a8809){_0x596b14&&console['error'](a42_0x484372[_0x48e537(0x285)]('Warning:'),_0x48e537(0x165));const _0x3c3563=_0xd21f12[_0x48e537(0x27f)];return _0x3c3563?await this[_0x48e537(0x184)](_0xbd80d,_0x2a8809):await this[_0x48e537(0x27e)](_0xbd80d,_0x2a8809,_0xd21f12),0x0;}if(_0x596b14){const _0x12688a=await withSpinner(_0x48e537(0x144),()=>_0x4ba679['workflow'][_0x48e537(0x26d)]({'projectName':_0x589038,'workflowName':_0x1eee05,'limit':0x64}),{'verbose':_0xd21f12['verbose']}),_0x2de0d1=_0x12688a[_0x48e537(0x150)]['find'](_0x3432aa=>_0x3432aa['id']===_0x596b14);if(!_0x2de0d1)return console[_0x48e537(0x272)](a42_0x484372['red'](_0x48e537(0x241)),_0x48e537(0x199)+_0x596b14),0x1;if(!_0x2de0d1[_0x48e537(0x2be)]?.['id'])return console[_0x48e537(0x272)](a42_0x484372[_0x48e537(0x130)]('Error:'),_0x48e537(0x168)+_0x596b14+_0x48e537(0x296)),0x1;const _0x3d25d3=_0x2de0d1['lastAttempt']['id'];_0xd21f12[_0x48e537(0x222)]&&console['error'](_0x48e537(0x29a)+_0x3d25d3+_0x48e537(0x1f5)+_0x596b14);const _0x56c7af=_0xd21f12[_0x48e537(0x27f)];return _0x56c7af?await this[_0x48e537(0x184)](_0xbd80d,_0x3d25d3):await this['renderSingleTimeline'](_0xbd80d,_0x3d25d3,_0xd21f12),0x0;}const _0x5473be=await withSpinner(_0x48e537(0x18e),()=>_0x4ba679['workflow']['sessions']({'projectName':_0x589038,'workflowName':_0x1eee05,'limit':_0xd21f12[_0x48e537(0x211)]||0x32}),{'verbose':_0xd21f12[_0x48e537(0x222)]}),_0xc3e223=_0x5473be[_0x48e537(0x150)];if(_0xc3e223[_0x48e537(0x2d2)]===0x0){if(_0x589038&&_0x1eee05)console['error'](_0x48e537(0x171)+_0x589038+'.'+_0x1eee05);else _0x589038?console[_0x48e537(0x272)](_0x48e537(0x145)+_0x589038):(console[_0x48e537(0x272)](_0x48e537(0x212)),console[_0x48e537(0x272)](a42_0x484372['dim'](_0x48e537(0x21c))));return 0x0;}_0xc3e223[_0x48e537(0x1ea)]((_0x27c5ec,_0x5852bb)=>{const _0x959871=_0x48e537,_0x430cfa=_0x27c5ec['sessionTime']||'',_0x497906=_0x5852bb['sessionTime']||'';return _0x497906[_0x959871(0x13e)](_0x430cfa);});if(_0xd21f12['json']||_0xd21f12[_0x48e537(0x2b1)])return await handleSDKOutput(_0xc3e223,_0xd21f12),0x0;let _0x592de8;if(_0x5f0d2c){const _0x548ff0=_0xc3e223[0x0];if(!_0x548ff0[_0x48e537(0x2be)]?.['id'])return console[_0x48e537(0x272)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x592de8=_0x548ff0[_0x48e537(0x2be)]['id'],_0xd21f12[_0x48e537(0x222)]&&console[_0x48e537(0x272)](_0x48e537(0x15f)+_0x548ff0[_0x48e537(0x266)]);}else{const _0x4eedd8=_0xc3e223[_0x48e537(0x25c)](_0x5257fc=>{const _0x294361=_0x48e537,_0x2e4c09=getAttemptStatusDisplay(_0x5257fc['lastAttempt']);return{'title':_0x5257fc['project']?.[_0x294361(0x236)]+'.'+_0x5257fc[_0x294361(0x247)]?.[_0x294361(0x236)]+_0x294361(0x19b)+_0x5257fc[_0x294361(0x266)]+'\x20'+_0x2e4c09[_0x294361(0x213)],'value':_0x5257fc[_0x294361(0x2be)]?.['id']||'','description':_0x2e4c09[_0x294361(0x1a7)]};}),_0x2f81ab=await a42_0x21f77b({'type':_0x48e537(0x143),'name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x4eedd8[_0x48e537(0x280)](_0x516602=>_0x516602[_0x48e537(0x185)]!=='')});if(!_0x2f81ab['attemptId'])return 0x0;_0x592de8=_0x2f81ab['attemptId'];}const _0x1e582a=_0xd21f12['follow'];return _0x1e582a?await this[_0x48e537(0x184)](_0xbd80d,_0x592de8):await this['renderSingleTimeline'](_0xbd80d,_0x592de8,_0xd21f12),0x0;}async['renderSingleTimeline'](_0x4dd7c8,_0xa916c7,_0x1be694){const _0xb1a679=a42_0x54c1ae,{tdx:_0x3c2b77}=_0x4dd7c8;let _0x2facc5,_0x5d3bba;try{[_0x2facc5,_0x5d3bba]=await Promise[_0xb1a679(0x1d4)]([_0x3c2b77[_0xb1a679(0x247)][_0xb1a679(0x28d)](_0xa916c7),_0x3c2b77[_0xb1a679(0x247)][_0xb1a679(0x1c7)](_0xa916c7,![])]);}catch(_0x1ed130){console[_0xb1a679(0x272)](a42_0x484372[_0xb1a679(0x130)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x1be694['verbose']&&console[_0xb1a679(0x272)](_0x1ed130);throw _0x1ed130;}if(_0x1be694[_0xb1a679(0x1f0)]||_0x1be694['jsonl']){const _0x11a3c5=this[_0xb1a679(0x2b5)](_0x2facc5,_0x5d3bba);await handleSDKOutput([_0x11a3c5],_0x1be694);return;}const _0x3c8b60=_0x3c2b77[_0xb1a679(0x158)][_0xb1a679(0x1ed)],_0xede583=this[_0xb1a679(0x248)](_0x2facc5,_0x5d3bba,_0x3c8b60);console[_0xb1a679(0x27c)](_0xede583);}async[a42_0x54c1ae(0x184)](_0x3a3e07,_0x4763a1){const _0x1c311f=a42_0x54c1ae,{tdx:_0x2b61e7}=_0x3a3e07,_0x5b3887=TIMELINE_CONFIG[_0x1c311f(0x261)],_0x3d2c20=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0xaa4302=0x0;while(_0xaa4302<_0x3d2c20){process['stdout'][_0x1c311f(0x26e)]&&process['stdout'][_0x1c311f(0x1d6)]('\x1bc');let _0x1152b2,_0x122145;try{[_0x1152b2,_0x122145]=await Promise[_0x1c311f(0x1d4)]([_0x2b61e7['workflow'][_0x1c311f(0x28d)](_0x4763a1),_0x2b61e7[_0x1c311f(0x247)][_0x1c311f(0x1c7)](_0x4763a1,![])]);}catch(_0x36ab77){console[_0x1c311f(0x272)](a42_0x484372['red']('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0xaa4302>0x0&&console['error'](a42_0x484372['dim'](_0x1c311f(0x2cb)+_0xaa4302));throw _0x36ab77;}const _0x7dc13=_0x2b61e7['context'][_0x1c311f(0x1ed)],_0x1307a2=this['renderTimeline'](_0x1152b2,_0x122145,_0x7dc13);console[_0x1c311f(0x27c)](_0x1307a2);const _0xee7103=_0x1152b2[_0x1c311f(0x1ef)]&&_0x122145['every'](_0x3b62e4=>_0x3b62e4[_0x1c311f(0x2aa)]!==_0x1c311f(0x19a)&&_0x3b62e4['state']!==_0x1c311f(0x221));if(_0xee7103){console[_0x1c311f(0x272)](a42_0x484372[_0x1c311f(0x282)](_0x1c311f(0x1e3)));break;}console[_0x1c311f(0x272)](a42_0x484372[_0x1c311f(0x257)](_0x1c311f(0x1fe)+_0xaa4302*0x2+_0x1c311f(0x1c6))),await new Promise(_0x333379=>setTimeout(_0x333379,_0x5b3887)),_0xaa4302++;}_0xaa4302>=_0x3d2c20&&console['error'](a42_0x484372['yellow'](_0x1c311f(0x2d1)));}[a42_0x54c1ae(0x248)](_0x2ccf5e,_0x1841ce,_0x18b2dd){const _0x4db6b7=a42_0x54c1ae,_0x28c7e1=[],_0x39e921=TIMELINE_CONFIG[_0x4db6b7(0x163)],_0x4faee3=0x5,_0xd4a017=process['stdout'][_0x4db6b7(0x260)]||0x78,_0x1b8c4e=_0xd4a017-_0x39e921-_0x4faee3,_0x46afad=Math[_0x4db6b7(0x1a8)](TIMELINE_CONFIG[_0x4db6b7(0x2bd)],Math[_0x4db6b7(0x298)](_0x1b8c4e,TIMELINE_CONFIG[_0x4db6b7(0x25a)])),_0x16c989=new Date(_0x2ccf5e[_0x4db6b7(0x1ec)])['getTime'](),_0x1c43e5=_0x2ccf5e[_0x4db6b7(0x2d9)]?new Date(_0x2ccf5e[_0x4db6b7(0x2d9)])[_0x4db6b7(0x28a)]():Date['now'](),_0x4610e9={'start':_0x16c989,'end':_0x1c43e5,'duration':_0x1c43e5-_0x16c989},_0x21f06e=new Map(),_0x3f9702=[];for(const _0x124653 of _0x1841ce){if(_0x124653[_0x4db6b7(0x2cf)]){const _0x5bca5c=new Date(_0x124653[_0x4db6b7(0x2cf)])[_0x4db6b7(0x28a)](),_0x37fb4a=_0x124653['updatedAt']?new Date(_0x124653[_0x4db6b7(0x1c4)])[_0x4db6b7(0x28a)]():Date[_0x4db6b7(0x255)](),_0x1f29fc={'start':_0x5bca5c,'end':_0x37fb4a,'duration':_0x37fb4a-_0x5bca5c};_0x21f06e[_0x4db6b7(0x149)](_0x124653['id'],_0x1f29fc),_0x3f9702[_0x4db6b7(0x1de)]({'name':_0x124653[_0x4db6b7(0x2ab)],'state':_0x124653[_0x4db6b7(0x2aa)]||_0x4db6b7(0x193),'window':_0x1f29fc});}else _0x3f9702[_0x4db6b7(0x1de)]({'name':_0x124653[_0x4db6b7(0x2ab)],'state':_0x124653['state']||_0x4db6b7(0x221),'window':undefined});}_0x3f9702[_0x4db6b7(0x1ea)]((_0x28b885,_0x53b34f)=>{const _0x33737f=_0x4db6b7;if(!_0x28b885[_0x33737f(0x1d3)])return 0x1;if(!_0x53b34f[_0x33737f(0x1d3)])return-0x1;return _0x28b885[_0x33737f(0x1d3)][_0x33737f(0x179)]-_0x53b34f[_0x33737f(0x1d3)]['start'];});const _0x5e43cc=_0x3f9702[_0x4db6b7(0x2d2)],_0x1c21c5=_0x5e43cc>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x1c21c5&&_0x3f9702[_0x4db6b7(0x2d0)](TIMELINE_CONFIG[_0x4db6b7(0x1f2)]);const _0xcaf733=calculateTimeScale(_0x4610e9,_0x46afad),_0x43fa32=_0x2ccf5e[_0x4db6b7(0x1ef)]?_0x2ccf5e[_0x4db6b7(0x20d)]?a42_0x484372[_0x4db6b7(0x282)]('success'):a42_0x484372[_0x4db6b7(0x130)](_0x4db6b7(0x272)):a42_0x484372['blue']('running'),_0x4462ad=_0x2ccf5e['project']?.['id'],_0x40629f=_0x2ccf5e['sessionId'];let _0x321ae9;if(_0x4462ad&&_0x40629f){const _0x38bdd3=getWorkflowAttemptUrl(_0x18b2dd,_0x4462ad,_0x40629f,_0x2ccf5e['id']);_0x321ae9=hyperlink(a42_0x484372[_0x4db6b7(0x257)](_0x2ccf5e['id']),_0x38bdd3);}else _0x321ae9=a42_0x484372['dim'](_0x2ccf5e['id']);_0x28c7e1[_0x4db6b7(0x1de)](_0x4db6b7(0x21f)+_0x321ae9+_0x4db6b7(0x19b)+_0x43fa32+_0x4db6b7(0x19b)+formatElapsed(_0x4610e9[_0x4db6b7(0x283)]));if(_0x3f9702[_0x4db6b7(0x2d2)]>0x0){const _0x52276d=renderTimeAxis(_0xcaf733,_0x46afad),_0x109562=new Date(_0x4610e9['start']),_0x2bce7b=formatDate(_0x109562),_0xa250fe=TIMELINE_CONFIG[_0x4db6b7(0x182)]+TIMELINE_CONFIG[_0x4db6b7(0x287)]+_0x39e921,_0x566c21=_0x2bce7b[_0x4db6b7(0x1d8)](_0xa250fe),_0x42a99b=a42_0x484372[_0x4db6b7(0x257)](_0x566c21);_0x28c7e1[_0x4db6b7(0x1de)](_0x42a99b+'\x20'+_0x52276d);for(const _0x31b5f0 of _0x3f9702){_0x28c7e1[_0x4db6b7(0x1de)](renderTaskRow(_0x31b5f0,_0xcaf733,_0x46afad,_0x39e921));}const _0x85a589=calculateStats(_0x3f9702);_0x28c7e1[_0x4db6b7(0x1de)](formatStats(_0x85a589)),_0x1c21c5&&_0x28c7e1[_0x4db6b7(0x1de)](a42_0x484372[_0x4db6b7(0x285)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x4db6b7(0x1f2)]+_0x4db6b7(0x1a9)+_0x5e43cc+_0x4db6b7(0x1ee))),_0x28c7e1[_0x4db6b7(0x1de)](''),_0x28c7e1[_0x4db6b7(0x1de)](a42_0x484372[_0x4db6b7(0x257)](_0x4db6b7(0x2c2))+(_0x4db6b7(0x187)+_0x2ccf5e['id']+'\x20logs')+a42_0x484372[_0x4db6b7(0x257)](_0x4db6b7(0x233)));}else _0x28c7e1[_0x4db6b7(0x1de)](_0x4db6b7(0x245));return _0x28c7e1[_0x4db6b7(0x253)]('\x0a');}[a42_0x54c1ae(0x2b5)](_0x3db33f,_0x3c65fb){const _0x1c90f7=a42_0x54c1ae,_0x2c313e=new Date(_0x3db33f[_0x1c90f7(0x1ec)])[_0x1c90f7(0x28a)](),_0x45ff70=_0x3db33f[_0x1c90f7(0x2d9)]?new Date(_0x3db33f[_0x1c90f7(0x2d9)])['getTime']():Date[_0x1c90f7(0x255)](),_0x295f1b=_0x45ff70-_0x2c313e,_0x53d252=[];for(const _0x4e6779 of _0x3c65fb){if(_0x4e6779[_0x1c90f7(0x2cf)]){const _0x52faea=new Date(_0x4e6779[_0x1c90f7(0x2cf)])[_0x1c90f7(0x28a)](),_0x28b821=_0x4e6779['updatedAt']?new Date(_0x4e6779[_0x1c90f7(0x1c4)])[_0x1c90f7(0x28a)]():Date['now']();_0x53d252['push']({'name':_0x4e6779['fullName'],'state':_0x4e6779[_0x1c90f7(0x2aa)]||_0x1c90f7(0x193),'window':{'start':_0x52faea,'end':_0x28b821,'duration':_0x28b821-_0x52faea}});}else _0x53d252[_0x1c90f7(0x1de)]({'name':_0x4e6779[_0x1c90f7(0x2ab)],'state':_0x4e6779['state']||_0x1c90f7(0x221),'window':undefined});}const _0x17efd8=calculateStats(_0x53d252);return{'attempt':{'id':_0x3db33f['id'],'status':_0x3db33f[_0x1c90f7(0x1ef)]?_0x3db33f['success']?_0x1c90f7(0x20d):_0x1c90f7(0x272):_0x1c90f7(0x19a),'createdAt':_0x3db33f[_0x1c90f7(0x1ec)],'finishedAt':_0x3db33f['finishedAt'],'duration_ms':_0x295f1b},'tasks':_0x53d252[_0x1c90f7(0x25c)](_0xc0933b=>({'name':_0xc0933b['name'],'state':_0xc0933b[_0x1c90f7(0x2aa)],'startedAt':_0xc0933b[_0x1c90f7(0x1d3)]?new Date(_0xc0933b['window']['start'])[_0x1c90f7(0x21b)]():null,'updatedAt':_0xc0933b[_0x1c90f7(0x1d3)]?new Date(_0xc0933b[_0x1c90f7(0x1d3)][_0x1c90f7(0x18c)])[_0x1c90f7(0x21b)]():null,'duration_ms':_0xc0933b[_0x1c90f7(0x1d3)]?.['duration']||null})),'stats':_0x17efd8};}}
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(_0x15ed01,_0x258d73){const _0x8b3902=a43_0x4b40,_0xff3e76=_0x15ed01();while(!![]){try{const _0x5a62de=-parseInt(_0x8b3902(0x1cb))/0x1+parseInt(_0x8b3902(0x1bb))/0x2*(-parseInt(_0x8b3902(0x1ba))/0x3)+parseInt(_0x8b3902(0x1ca))/0x4*(parseInt(_0x8b3902(0x1b8))/0x5)+parseInt(_0x8b3902(0x1c3))/0x6*(parseInt(_0x8b3902(0x1c6))/0x7)+parseInt(_0x8b3902(0x1bc))/0x8+-parseInt(_0x8b3902(0x1c1))/0x9*(-parseInt(_0x8b3902(0x1c2))/0xa)+parseInt(_0x8b3902(0x1c4))/0xb*(-parseInt(_0x8b3902(0x1c0))/0xc);if(_0x5a62de===_0x258d73)break;else _0xff3e76['push'](_0xff3e76['shift']());}catch(_0x3b8883){_0xff3e76['push'](_0xff3e76['shift']());}}}(a43_0x2522,0x96313));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';function a43_0x4b40(_0x2516c1,_0x173995){_0x2516c1=_0x2516c1-0x1b8;const _0x252269=a43_0x2522();let _0x4b4035=_0x252269[_0x2516c1];return _0x4b4035;}function a43_0x2522(){const _0x3bdeb0=['265888uLkxXu','287138mHncmF','replace','40MUBSBE',';\x20node/','408879eptCaJ','10EiorvE','3840808PJEANc','tdx/','X-Trino-User','Authorization','36mDhvfs','54CyHcVu','1798970DQiMyq','376788wzlTqO','2781757fKPbLL','version','28iQegml','entries','TD1\x20','length'];a43_0x2522=function(){return _0x3bdeb0;};return a43_0x2522();}export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x3ac56c=a43_0x4b40,_0x1c838f=getVersion(),_0x1105c3=platform(),_0x42b7d9=process[_0x3ac56c(0x1c5)][_0x3ac56c(0x1cc)]('v','');return _0x3ac56c(0x1bd)+_0x1c838f+'\x20('+_0x1105c3+_0x3ac56c(0x1b9)+_0x42b7d9+')';}export function getAuthHeaders(_0x4d3a0e,_0x269cac){const _0x5995c5=a43_0x4b40,_0x1a8ef8=getVersion(),_0x1097d4={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x1a8ef8};return _0x269cac&&(_0x1097d4['Authorization']=_0x5995c5(0x1c8)+_0x269cac),_0x1097d4;}export function toHeaderRecord(_0x146229){const _0x3bed32=a43_0x4b40,_0x3602be={};for(const [_0x19fc46,_0x2e37ac]of Object[_0x3bed32(0x1c7)](_0x146229)){_0x2e37ac!==undefined&&(_0x3602be[_0x19fc46]=_0x2e37ac);}return _0x3602be;}export function getTrinoHeaders(_0x58ac31,_0x36c82e){const _0x199278=a43_0x4b40,_0x511ba2=getAuthHeaders(_0x58ac31,_0x36c82e),_0x5d1ae7=toHeaderRecord(_0x511ba2);return delete _0x5d1ae7[_0x199278(0x1bf)],_0x36c82e&&(_0x5d1ae7[_0x199278(0x1be)]=_0x36c82e),_0x5d1ae7;}export function hasAPIKey(_0x5b78e9){const _0x205994=a43_0x4b40,_0x4c173a=getAPIKey(_0x5b78e9);return _0x4c173a!==undefined&&_0x4c173a[_0x205994(0x1c9)]>0x0;}