@treasuredata/tdx 0.14.8 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/README.md +21 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli-categories.d.ts +1 -1
  5. package/dist/cli-categories.js +1 -1
  6. package/dist/cli-categories.js.map +1 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/agent-command.d.ts.map +1 -1
  12. package/dist/commands/agent-command.js +1 -1
  13. package/dist/commands/agent-command.js.map +1 -1
  14. package/dist/commands/agent-test-command.d.ts +16 -0
  15. package/dist/commands/agent-test-command.d.ts.map +1 -0
  16. package/dist/commands/agent-test-command.js +1 -0
  17. package/dist/commands/agent-test-command.js.map +1 -0
  18. package/dist/commands/api-command.js +1 -1
  19. package/dist/commands/auth-command.js +1 -1
  20. package/dist/commands/chat-command.js +1 -1
  21. package/dist/commands/claude-command.js +1 -1
  22. package/dist/commands/claude-statusline-command.js +1 -1
  23. package/dist/commands/claude-usage-command.js +1 -1
  24. package/dist/commands/command.js +1 -1
  25. package/dist/commands/connection-command.js +1 -1
  26. package/dist/commands/databases.js +1 -1
  27. package/dist/commands/describe.js +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/journey-command.js +1 -1
  31. package/dist/commands/journey-validate-command.js +1 -1
  32. package/dist/commands/llm-command.js +1 -1
  33. package/dist/commands/llm-proxy.js +1 -1
  34. package/dist/commands/mcp-command.d.ts +19 -0
  35. package/dist/commands/mcp-command.d.ts.map +1 -0
  36. package/dist/commands/mcp-command.js +1 -0
  37. package/dist/commands/mcp-command.js.map +1 -0
  38. package/dist/commands/parent-segment-command.js +1 -1
  39. package/dist/commands/profile-command.js +1 -1
  40. package/dist/commands/profiles-command.js +1 -1
  41. package/dist/commands/query-command.js +1 -1
  42. package/dist/commands/segment-command.js +1 -1
  43. package/dist/commands/segment-create-command.js +1 -1
  44. package/dist/commands/segment-fields-command.js +1 -1
  45. package/dist/commands/segment-pull-command.js +1 -1
  46. package/dist/commands/segment-push-command.js +1 -1
  47. package/dist/commands/segment-update-command.js +1 -1
  48. package/dist/commands/segment-use-command.js +1 -1
  49. package/dist/commands/segment-validate-command.js +1 -1
  50. package/dist/commands/segments.js +1 -1
  51. package/dist/commands/show.js +1 -1
  52. package/dist/commands/tables.js +1 -1
  53. package/dist/commands/unset-command.js +1 -1
  54. package/dist/commands/use-command.js +1 -1
  55. package/dist/commands/user-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/profile.js +1 -1
  66. package/dist/core/project-config.js +1 -1
  67. package/dist/core/session.js +1 -1
  68. package/dist/core/user-cache.js +1 -1
  69. package/dist/core/version.js +1 -1
  70. package/dist/index.js +1 -1
  71. package/dist/mcp/server.d.ts +31 -0
  72. package/dist/mcp/server.d.ts.map +1 -0
  73. package/dist/mcp/server.js +1 -0
  74. package/dist/mcp/server.js.map +1 -0
  75. package/dist/mcp/tools/index.d.ts +10 -0
  76. package/dist/mcp/tools/index.d.ts.map +1 -0
  77. package/dist/mcp/tools/index.js +1 -0
  78. package/dist/mcp/tools/index.js.map +1 -0
  79. package/dist/mcp/tools/tdx-run.d.ts +35 -0
  80. package/dist/mcp/tools/tdx-run.d.ts.map +1 -0
  81. package/dist/mcp/tools/tdx-run.js +1 -0
  82. package/dist/mcp/tools/tdx-run.js.map +1 -0
  83. package/dist/mcp/tools/tdx-search.d.ts +42 -0
  84. package/dist/mcp/tools/tdx-search.d.ts.map +1 -0
  85. package/dist/mcp/tools/tdx-search.js +1 -0
  86. package/dist/mcp/tools/tdx-search.js.map +1 -0
  87. package/dist/mcp/utils.d.ts +35 -0
  88. package/dist/mcp/utils.d.ts.map +1 -0
  89. package/dist/mcp/utils.js +1 -0
  90. package/dist/mcp/utils.js.map +1 -0
  91. package/dist/proxy/anthropic-adapter.js +1 -1
  92. package/dist/proxy/claude-usage-tracker.js +1 -1
  93. package/dist/proxy/context-signature.js +1 -1
  94. package/dist/proxy/conversation-utils.js +1 -1
  95. package/dist/proxy/passthrough-server.js +1 -1
  96. package/dist/proxy/server.js +1 -1
  97. package/dist/proxy/session-cache.js +1 -1
  98. package/dist/proxy/sse-usage-parser.js +1 -1
  99. package/dist/sdk/agent/agent-config.d.ts +46 -0
  100. package/dist/sdk/agent/agent-config.d.ts.map +1 -1
  101. package/dist/sdk/agent/agent-config.js +1 -1
  102. package/dist/sdk/agent/agent-config.js.map +1 -1
  103. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  104. package/dist/sdk/agent/agent-yaml.js +1 -1
  105. package/dist/sdk/agent/test/evaluator.d.ts +55 -0
  106. package/dist/sdk/agent/test/evaluator.d.ts.map +1 -0
  107. package/dist/sdk/agent/test/evaluator.js +1 -0
  108. package/dist/sdk/agent/test/evaluator.js.map +1 -0
  109. package/dist/sdk/agent/test/executor.d.ts +73 -0
  110. package/dist/sdk/agent/test/executor.d.ts.map +1 -0
  111. package/dist/sdk/agent/test/executor.js +1 -0
  112. package/dist/sdk/agent/test/executor.js.map +1 -0
  113. package/dist/sdk/agent/test/index.d.ts +12 -0
  114. package/dist/sdk/agent/test/index.d.ts.map +1 -0
  115. package/dist/sdk/agent/test/index.js +1 -0
  116. package/dist/sdk/agent/test/index.js.map +1 -0
  117. package/dist/sdk/agent/test/output.d.ts +19 -0
  118. package/dist/sdk/agent/test/output.d.ts.map +1 -0
  119. package/dist/sdk/agent/test/output.js +1 -0
  120. package/dist/sdk/agent/test/output.js.map +1 -0
  121. package/dist/sdk/agent/test/parser.d.ts +55 -0
  122. package/dist/sdk/agent/test/parser.d.ts.map +1 -0
  123. package/dist/sdk/agent/test/parser.js +1 -0
  124. package/dist/sdk/agent/test/parser.js.map +1 -0
  125. package/dist/sdk/agent/test/types.d.ts +169 -0
  126. package/dist/sdk/agent/test/types.d.ts.map +1 -0
  127. package/dist/sdk/agent/test/types.js +1 -0
  128. package/dist/sdk/agent/test/types.js.map +1 -0
  129. package/dist/sdk/api.js +1 -1
  130. package/dist/sdk/claude-agent/claude-agent-client.d.ts +42 -0
  131. package/dist/sdk/claude-agent/claude-agent-client.d.ts.map +1 -0
  132. package/dist/sdk/claude-agent/claude-agent-client.js +1 -0
  133. package/dist/sdk/claude-agent/claude-agent-client.js.map +1 -0
  134. package/dist/sdk/claude-agent/environment.d.ts +50 -0
  135. package/dist/sdk/claude-agent/environment.d.ts.map +1 -0
  136. package/dist/sdk/claude-agent/environment.js +1 -0
  137. package/dist/sdk/claude-agent/environment.js.map +1 -0
  138. package/dist/sdk/claude-agent/index.d.ts +14 -0
  139. package/dist/sdk/claude-agent/index.d.ts.map +1 -0
  140. package/dist/sdk/claude-agent/index.js +1 -0
  141. package/dist/sdk/claude-agent/index.js.map +1 -0
  142. package/dist/sdk/claude-agent/system-prompts.d.ts +22 -0
  143. package/dist/sdk/claude-agent/system-prompts.d.ts.map +1 -0
  144. package/dist/sdk/claude-agent/system-prompts.js +1 -0
  145. package/dist/sdk/claude-agent/system-prompts.js.map +1 -0
  146. package/dist/sdk/claude-agent/types.d.ts +72 -0
  147. package/dist/sdk/claude-agent/types.d.ts.map +1 -0
  148. package/dist/sdk/claude-agent/types.js +1 -0
  149. package/dist/sdk/claude-agent/types.js.map +1 -0
  150. package/dist/sdk/client/cdp-api-client.js +1 -1
  151. package/dist/sdk/client/endpoints.d.ts +17 -0
  152. package/dist/sdk/client/endpoints.d.ts.map +1 -1
  153. package/dist/sdk/client/endpoints.js +1 -1
  154. package/dist/sdk/client/endpoints.js.map +1 -1
  155. package/dist/sdk/client/engage-api-client.js +1 -1
  156. package/dist/sdk/client/http-client.js +1 -1
  157. package/dist/sdk/client/llm-api-client.d.ts +6 -0
  158. package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
  159. package/dist/sdk/client/llm-api-client.js +1 -1
  160. package/dist/sdk/client/llm-api-client.js.map +1 -1
  161. package/dist/sdk/client/rate-limiter.js +1 -1
  162. package/dist/sdk/client/td-api-client.js +1 -1
  163. package/dist/sdk/client/trino-api-client.d.ts.map +1 -1
  164. package/dist/sdk/client/trino-api-client.js +1 -1
  165. package/dist/sdk/client/trino-api-client.js.map +1 -1
  166. package/dist/sdk/client/workflow-client.js +1 -1
  167. package/dist/sdk/connection-validator.js +1 -1
  168. package/dist/sdk/connection.js +1 -1
  169. package/dist/sdk/engage.js +1 -1
  170. package/dist/sdk/errors.d.ts +2 -0
  171. package/dist/sdk/errors.d.ts.map +1 -1
  172. package/dist/sdk/errors.js +1 -1
  173. package/dist/sdk/errors.js.map +1 -1
  174. package/dist/sdk/index.d.ts +3 -1
  175. package/dist/sdk/index.d.ts.map +1 -1
  176. package/dist/sdk/index.js +1 -1
  177. package/dist/sdk/index.js.map +1 -1
  178. package/dist/sdk/io/index.js +1 -1
  179. package/dist/sdk/io/node-filesystem.js +1 -1
  180. package/dist/sdk/job.js +1 -1
  181. package/dist/sdk/journey.js +1 -1
  182. package/dist/sdk/llm/chat-cache.js +1 -1
  183. package/dist/sdk/llm/index.d.ts +9 -1
  184. package/dist/sdk/llm/index.d.ts.map +1 -1
  185. package/dist/sdk/llm/index.js +1 -1
  186. package/dist/sdk/llm/index.js.map +1 -1
  187. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  188. package/dist/sdk/llm/model-aliases.js +1 -1
  189. package/dist/sdk/llm/model-factors.js +1 -1
  190. package/dist/sdk/query/index.js +1 -1
  191. package/dist/sdk/query/sql-parser.js +1 -1
  192. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  193. package/dist/sdk/segment/fields-display.js +1 -1
  194. package/dist/sdk/segment/file-discovery.js +1 -1
  195. package/dist/sdk/segment/journey-utils.js +1 -1
  196. package/dist/sdk/segment/journey-yaml.js +1 -1
  197. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  198. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  199. package/dist/sdk/segment/pull-workflow.js +1 -1
  200. package/dist/sdk/segment/push-workflow.js +1 -1
  201. package/dist/sdk/segment/resolution-context.js +1 -1
  202. package/dist/sdk/segment/segment-path-parser.js +1 -1
  203. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  204. package/dist/sdk/segment/target-resolution.js +1 -1
  205. package/dist/sdk/segment/tdx-config.js +1 -1
  206. package/dist/sdk/segment/validate-files.js +1 -1
  207. package/dist/sdk/segment/yaml-validator.js +1 -1
  208. package/dist/sdk/segment.js +1 -1
  209. package/dist/sdk/types/index.js +1 -1
  210. package/dist/sdk/types/progress.js +1 -1
  211. package/dist/sdk/user.js +1 -1
  212. package/dist/sdk/util/format-detector.js +1 -1
  213. package/dist/sdk/util/formatters.js +1 -1
  214. package/dist/sdk/util/index.js +1 -1
  215. package/dist/sdk/util/tree-formatter.js +1 -1
  216. package/dist/sdk/workflow/clone-workflow.js +1 -1
  217. package/dist/sdk/workflow/index.js +1 -1
  218. package/dist/sdk/workflow/pull-workflow.js +1 -1
  219. package/dist/sdk/workflow/push-workflow.js +1 -1
  220. package/dist/sdk/workflow/tdx-config.js +1 -1
  221. package/dist/sdk/workflow/workflow-utils.js +1 -1
  222. package/dist/utils/async.js +1 -1
  223. package/dist/utils/colors.d.ts +2 -1
  224. package/dist/utils/colors.d.ts.map +1 -1
  225. package/dist/utils/colors.js +1 -1
  226. package/dist/utils/colors.js.map +1 -1
  227. package/dist/utils/diff.js +1 -1
  228. package/dist/utils/file-permissions.js +1 -1
  229. package/dist/utils/json-loader.js +1 -1
  230. package/dist/utils/option-validation.js +1 -1
  231. package/dist/utils/port.js +1 -1
  232. package/dist/utils/process.js +1 -1
  233. package/dist/utils/prompt.js +1 -1
  234. package/dist/utils/spinner.js +1 -1
  235. package/dist/utils/sse-parser.js +1 -1
  236. package/dist/utils/string-utils.js +1 -1
  237. package/dist/utils/table-ref-parser.js +1 -1
  238. package/dist/utils/tdx-logger.d.ts +12 -1
  239. package/dist/utils/tdx-logger.d.ts.map +1 -1
  240. package/dist/utils/tdx-logger.js +1 -1
  241. package/dist/utils/tdx-logger.js.map +1 -1
  242. package/dist/utils/version-check.js +1 -1
  243. package/package.json +4 -2
@@ -1 +1 @@
1
- const a39_0x1b0c43=a39_0x5863;(function(_0x361a49,_0x1930d4){const _0x20d49a=a39_0x5863,_0x93c9cb=_0x361a49();while(!![]){try{const _0x52a4e7=-parseInt(_0x20d49a(0x269))/0x1*(-parseInt(_0x20d49a(0x158))/0x2)+-parseInt(_0x20d49a(0x243))/0x3*(-parseInt(_0x20d49a(0x251))/0x4)+parseInt(_0x20d49a(0x257))/0x5*(parseInt(_0x20d49a(0x12e))/0x6)+parseInt(_0x20d49a(0x1fb))/0x7*(-parseInt(_0x20d49a(0x17d))/0x8)+parseInt(_0x20d49a(0x1f2))/0x9*(parseInt(_0x20d49a(0x1f9))/0xa)+parseInt(_0x20d49a(0x176))/0xb+-parseInt(_0x20d49a(0x1df))/0xc*(parseInt(_0x20d49a(0x245))/0xd);if(_0x52a4e7===_0x1930d4)break;else _0x93c9cb['push'](_0x93c9cb['shift']());}catch(_0x3a966a){_0x93c9cb['push'](_0x93c9cb['shift']());}}}(a39_0x2f76,0x53dd3));import a39_0x4049ae from'chalk';import{existsSync}from'fs';import a39_0x613a32 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 a39_0x4a9c7f from'prompts';function getAttemptStatusDisplay(_0x28b960){const _0x30ca30=a39_0x5863;if(!_0x28b960)return{'icon':'⏳','text':''};const {done:_0x1ab7bb,success:_0x121688,cancelRequested:_0x575aae}=_0x28b960;if(!_0x1ab7bb)return _0x575aae?{'icon':'🛑','text':a39_0x4049ae['yellow'](_0x30ca30(0xfc))}:{'icon':'🔄','text':a39_0x4049ae[_0x30ca30(0x255)](_0x30ca30(0x1b7))};if(_0x121688)return{'icon':'✅','text':a39_0x4049ae['green']('success')};return{'icon':'❌','text':a39_0x4049ae[_0x30ca30(0x213)](_0x30ca30(0x280))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x404810,_0x40e3ee,_0x1d71af=0x0){const _0x42af60=a39_0x5863;return _0x404810[_0x1d71af]||_0x40e3ee[_0x42af60(0x110)];}[a39_0x1b0c43(0x25a)](_0x521731,_0xd64a32,_0x127fd1=0x0){const _0x1562b5=a39_0x1b0c43,_0x37836e=this[_0x1562b5(0x115)](_0x521731,_0xd64a32,_0x127fd1);if(!_0x37836e)return console[_0x1562b5(0x280)](a39_0x4049ae[_0x1562b5(0x213)]('Error:'),_0x1562b5(0x16f)),console[_0x1562b5(0x280)](a39_0x4049ae[_0x1562b5(0x239)](_0x1562b5(0x15c))),null;return _0x37836e;}[a39_0x1b0c43(0x242)](_0x190223,_0x579023){const _0x1ca5d1=a39_0x1b0c43;if(_0x190223[0x0]){const _0xe7c951=_0x190223[0x0][_0x1ca5d1(0x2a5)]('.');if(_0xe7c951[_0x1ca5d1(0x21b)]===0x1)return{'projectName':_0xe7c951[0x0],'workflowName':undefined};else return _0xe7c951[_0x1ca5d1(0x21b)]===0x2?{'projectName':_0xe7c951[0x0],'workflowName':_0xe7c951[0x1]}:(console[_0x1ca5d1(0x280)](a39_0x4049ae[_0x1ca5d1(0x213)](_0x1ca5d1(0x12a)),_0x1ca5d1(0x1e5)),null);}return{'projectName':_0x579023[_0x1ca5d1(0x110)],'workflowName':undefined};}['resolveProjectDir'](_0x5673e3,_0x2e63c3,_0x2209c6=0x0){const _0x510241=a39_0x1b0c43;if(_0x5673e3[_0x2209c6])return _0x5673e3[_0x2209c6];if(_0x2e63c3[_0x510241(0x110)]){const _0x4411a4=a39_0x613a32[_0x510241(0x1a5)](process[_0x510241(0x1e2)](),_0x510241(0x15e),_0x2e63c3[_0x510241(0x110)]);if(existsSync(a39_0x613a32[_0x510241(0x1a5)](_0x4411a4,_0x510241(0x101))))return _0x4411a4;}return undefined;}async[a39_0x1b0c43(0x199)](_0x4991c8,_0x2ac9aa,_0x2447c7){const _0x2aa230=a39_0x1b0c43;try{const _0x54efbd=await _0x4991c8[_0x2aa230(0x132)]['workflows'](_0x2ac9aa,{'limit':0x1});if(_0x54efbd['length']>0x0){const _0x5ace8f=_0x54efbd[0x0]['id'],_0x346585=getWorkflowUrl(_0x2447c7,_0x5ace8f);console[_0x2aa230(0x280)](_0x2aa230(0x20d)+a39_0x4049ae[_0x2aa230(0x22b)](_0x346585));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x161);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x169);async['execute'](_0x1ceef7){const _0x5f232d=a39_0x1b0c43,{options:_0x215b4b,args:_0x5b8040,tdx:_0x169b0d}=_0x1ceef7,_0x43e89e=_0x5b8040[0x0],_0x258013=_0x215b4b['clear'];if(_0x258013)return saveSessionContext({'workflow_project':undefined},_0x215b4b[_0x5f232d(0x1dd)]),console[_0x5f232d(0x21e)](a39_0x4049ae[_0x5f232d(0x293)](_0x5f232d(0x1f1))),0x0;if(!_0x43e89e)return console[_0x5f232d(0x280)](a39_0x4049ae[_0x5f232d(0x213)]('Error:'),_0x5f232d(0x16f)),console[_0x5f232d(0x280)](a39_0x4049ae[_0x5f232d(0x239)](_0x5f232d(0x128))),console[_0x5f232d(0x280)](a39_0x4049ae[_0x5f232d(0x239)](_0x5f232d(0x1ea))),0x1;const _0x34b4b0=await withSpinner(_0x5f232d(0x299)+_0x43e89e+_0x5f232d(0x1ec),()=>_0x169b0d[_0x5f232d(0x132)][_0x5f232d(0x298)](_0x43e89e),{'verbose':_0x215b4b['verbose']}),{name:_0x156517}=_0x34b4b0[_0x5f232d(0x29a)];return saveSessionContext({'workflow_project':_0x156517},_0x215b4b[_0x5f232d(0x1dd)]),console[_0x5f232d(0x21e)](a39_0x4049ae[_0x5f232d(0x293)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a39_0x4049ae[_0x5f232d(0x22b)](_0x156517))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x203);['description']='List\x20all\x20workflow\x20projects';async[a39_0x1b0c43(0x260)](_0x20d324){const _0x5d563e=a39_0x1b0c43,{options:_0x19d11d,args:_0x2c09ae,tdx:_0x24dad0}=_0x20d324,_0x5d501d=_0x2c09ae[0x0];_0x19d11d['verbose']&&_0x5d501d&&console['error'](_0x5d563e(0x1b1)+_0x5d501d);const _0x2c14fd=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x24dad0[_0x5d563e(0x132)]['projects'](_0x5d501d,{'limit':_0x19d11d['limit']}),{'verbose':_0x19d11d[_0x5d563e(0x130)]});let _0x19b416=_0x2c14fd['data'];_0x19b416[_0x5d563e(0x150)]((_0x304fa4,_0x59ad00)=>_0x304fa4['name'][_0x5d563e(0x291)](_0x59ad00['name']));const _0x3d4ac2=_0x19d11d[_0x5d563e(0x1a8)]||0x64,_0x18ca49=_0x19b416[_0x5d563e(0x21b)]>=_0x3d4ac2?a39_0x4049ae[_0x5d563e(0x239)](_0x5d563e(0x191)):'';console[_0x5d563e(0x280)]('✔\x20Found\x20'+_0x19b416[_0x5d563e(0x21b)]+'\x20project'+(_0x19b416['length']!==0x1?'s':'')+_0x18ca49);if(_0x19d11d['format']===_0x5d563e(0x20b)||_0x19d11d[_0x5d563e(0x210)]==='jsonl'||_0x19d11d['format']===_0x5d563e(0x216))await handleSDKOutput(_0x19b416,_0x19d11d);else{if(_0x19b416['length']===0x0)_0x5d501d?console[_0x5d563e(0x21e)](_0x5d563e(0x177)+_0x5d501d):console[_0x5d563e(0x21e)](_0x5d563e(0x1ba));else{const _0x516ab9=_0x19b416[_0x5d563e(0x24a)](_0x6808f9=>{const _0x4f5d2d=_0x5d563e,_0xe33be2=_0x6808f9[_0x4f5d2d(0x133)]?.['some'](_0x1e9b4a=>_0x1e9b4a[_0x4f5d2d(0x121)]===_0x4f5d2d(0x1ad)),_0x3107ab=_0xe33be2?a39_0x4049ae['dim']('\x20(system)'):'';return'📁\x20'+_0x6808f9[_0x4f5d2d(0x238)]+_0x3107ab;});await writeOutput(_0x516ab9[_0x5d563e(0x1a5)]('\x0a'),_0x19d11d[_0x5d563e(0x283)],_0x5d563e(0x1d7));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]='workflow:workflows';['description']='List\x20workflows';async[a39_0x1b0c43(0x260)](_0x521ad3){const _0x2997d7=a39_0x1b0c43,{options:_0x27c889,args:_0x104f86,tdx:_0x2ddb5c}=_0x521ad3,_0x4a49f4=this[_0x2997d7(0x115)](_0x104f86,_0x27c889);_0x27c889['verbose']&&_0x4a49f4&&console['error'](_0x2997d7(0x231)+_0x4a49f4);const _0x18efd6=await withSpinner('Listing\x20workflows...',()=>_0x2ddb5c[_0x2997d7(0x132)][_0x2997d7(0x15e)](_0x4a49f4,{'limit':_0x27c889[_0x2997d7(0x1a8)]}),{'verbose':_0x27c889[_0x2997d7(0x130)]});let _0x15b8dc=_0x18efd6[_0x2997d7(0x29a)];_0x15b8dc[_0x2997d7(0x150)]((_0x54f00c,_0x4a3183)=>{const _0x11db3f=_0x2997d7,_0x53e664=_0x54f00c['name'][_0x11db3f(0x291)](_0x4a3183[_0x11db3f(0x238)]);if(_0x53e664!==0x0)return _0x53e664;return(_0x54f00c[_0x11db3f(0x14d)]?.[_0x11db3f(0x238)]||'')[_0x11db3f(0x291)](_0x4a3183['project']?.[_0x11db3f(0x238)]||'');});const _0x16f74a=_0x27c889[_0x2997d7(0x1a8)]||0x64,_0x1f6a41=_0x15b8dc[_0x2997d7(0x21b)]>=_0x16f74a?a39_0x4049ae[_0x2997d7(0x239)](_0x2997d7(0x191)):'';console[_0x2997d7(0x280)](_0x2997d7(0x2a6)+_0x15b8dc[_0x2997d7(0x21b)]+_0x2997d7(0x1ca)+(_0x15b8dc['length']!==0x1?'s':'')+_0x1f6a41);if(_0x27c889[_0x2997d7(0x210)]===_0x2997d7(0x20b)||_0x27c889[_0x2997d7(0x210)]===_0x2997d7(0x24b)||_0x27c889[_0x2997d7(0x210)]===_0x2997d7(0x216))await handleSDKOutput(_0x15b8dc,_0x27c889);else{if(_0x15b8dc[_0x2997d7(0x21b)]===0x0)_0x4a49f4?console[_0x2997d7(0x21e)](_0x2997d7(0x226)+_0x4a49f4):console[_0x2997d7(0x21e)]('No\x20workflows\x20found');else{const _0x37d145=_0x27c889[_0x2997d7(0x1cc)],_0x3d44ec=_0x15b8dc['map'](_0x17d37f=>{const _0x2037f5=_0x2997d7,_0x508264=a39_0x4049ae['dim']('#'+_0x17d37f['id']),_0x4e30e7=hyperlink(_0x508264,getWorkflowUrl(_0x37d145,_0x17d37f['id'])),_0x17f4bd=_0x17d37f[_0x2037f5(0x14d)]?.[_0x2037f5(0x238)]?a39_0x4049ae[_0x2037f5(0x239)]('\x20('+_0x17d37f[_0x2037f5(0x14d)][_0x2037f5(0x238)]+')'):'';return _0x2037f5(0x17b)+_0x4e30e7+'\x20'+_0x17d37f[_0x2037f5(0x238)]+_0x17f4bd;});await writeOutput(_0x3d44ec[_0x2997d7(0x1a5)]('\x0a'),_0x27c889[_0x2997d7(0x283)],_0x2997d7(0x1d7));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x285);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x14a);async[a39_0x1b0c43(0x260)](_0x21cf6b){const _0x146256=a39_0x1b0c43,{options:_0x450bbe,args:_0x343977,tdx:_0x506bfd}=_0x21cf6b,_0x87b045=this[_0x146256(0x242)](_0x343977,_0x450bbe);if(!_0x87b045)return 0x1;const {projectName:_0x78a8bf,workflowName:_0x142daa}=_0x87b045;if(_0x450bbe[_0x146256(0x130)]){if(_0x78a8bf&&_0x142daa)console['error']('Filter:\x20'+_0x78a8bf+'.'+_0x142daa);else _0x78a8bf&&console[_0x146256(0x280)]('Filter:\x20project='+_0x78a8bf);const _0x4c69b7=_0x450bbe[_0x146256(0x20c)];_0x4c69b7&&console[_0x146256(0x280)]('Status:\x20'+_0x4c69b7);}let _0x4f73c2=0x28;if(process[_0x146256(0x21f)][_0x146256(0x140)]&&!_0x450bbe['output']&&!_0x450bbe[_0x146256(0x210)]){const _0x1d55fc=process[_0x146256(0x21f)][_0x146256(0x18d)]||0x28;_0x4f73c2=Math[_0x146256(0x1e7)](0x14,Math[_0x146256(0x1c0)](_0x1d55fc*0x2/0x3));}const _0x189fc4=_0x450bbe[_0x146256(0x1a8)]||_0x4f73c2,_0x1ad029=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x506bfd['workflow'][_0x146256(0x10f)]({'projectName':_0x78a8bf,'workflowName':_0x142daa,'status':_0x450bbe[_0x146256(0x20c)],'fromTime':_0x450bbe[_0x146256(0x13d)],'toTime':_0x450bbe['to'],'limit':_0x189fc4}),{'verbose':_0x450bbe['verbose']}),_0x44288e=_0x1ad029[_0x146256(0x29a)];_0x44288e[_0x146256(0x150)]((_0x1009d8,_0x22fd1a)=>{const _0x291c10=_0x146256,_0xb80d5d=_0x1009d8['sessionTime']||'',_0x46a02b=_0x22fd1a[_0x291c10(0x1c8)]||'';return _0x46a02b[_0x291c10(0x291)](_0xb80d5d);});_0x44288e[_0x146256(0x21b)]>=_0x189fc4?console[_0x146256(0x280)](_0x146256(0x123)+_0x44288e[_0x146256(0x21b)]+_0x146256(0x1a1)+a39_0x4049ae[_0x146256(0x239)](_0x146256(0x1ef))):console[_0x146256(0x280)](_0x146256(0x2a6)+_0x44288e[_0x146256(0x21b)]+_0x146256(0x111)+(_0x44288e[_0x146256(0x21b)]!==0x1?'s':''));if(_0x450bbe[_0x146256(0x210)]===_0x146256(0x20b)||_0x450bbe['format']==='jsonl'||_0x450bbe[_0x146256(0x210)]===_0x146256(0x216))await handleSDKOutput(_0x44288e,_0x450bbe);else{if(!process['stdout']['isTTY']||_0x450bbe[_0x146256(0x283)]){if(_0x44288e[_0x146256(0x21b)]===0x0){if(_0x78a8bf&&_0x142daa)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x78a8bf+'.'+_0x142daa);else _0x78a8bf?console[_0x146256(0x21e)](_0x146256(0x117)+_0x78a8bf):console['log'](_0x146256(0x294));}else{const _0x174af9=_0x450bbe[_0x146256(0x1cc)],_0x3b7f81=this['renderSessionsTimeline'](_0x44288e,_0x174af9);_0x450bbe[_0x146256(0x283)]?await writeOutput(_0x3b7f81,_0x450bbe[_0x146256(0x283)],'list'):console[_0x146256(0x21e)](_0x3b7f81);}!_0x78a8bf&&(console[_0x146256(0x280)](''),console['error'](a39_0x4049ae[_0x146256(0x239)](_0x146256(0x142))),console['error'](a39_0x4049ae[_0x146256(0x239)](_0x146256(0x235))+'or'+a39_0x4049ae[_0x146256(0x239)](_0x146256(0x209))));}else{if(_0x44288e['length']===0x0){if(_0x78a8bf&&_0x142daa)console[_0x146256(0x21e)]('No\x20sessions\x20found\x20for:\x20'+_0x78a8bf+'.'+_0x142daa);else _0x78a8bf?console[_0x146256(0x21e)](_0x146256(0x117)+_0x78a8bf):console[_0x146256(0x21e)]('No\x20sessions\x20found');}else await this[_0x146256(0x1e8)](_0x44288e,_0x21cf6b,_0x78a8bf);}}return 0x0;}['renderSessionsTimeline'](_0x59e567,_0x594d3d){const _0x552bfc=a39_0x1b0c43,_0x4fabdb=[],_0x5e05f4=new Map();let _0x5066ad=Infinity,_0x260d8f=-Infinity;for(const _0x24435c of _0x59e567){if(_0x24435c[_0x552bfc(0x1fc)]?.[_0x552bfc(0x17f)]){const _0x5291f0=new Date(_0x24435c['lastAttempt']['createdAt'])[_0x552bfc(0x151)](),_0x1d54be=_0x24435c['lastAttempt'][_0x552bfc(0x124)]?new Date(_0x24435c['lastAttempt'][_0x552bfc(0x124)])['getTime']():Date[_0x552bfc(0x106)](),_0x410707=_0x24435c[_0x552bfc(0x14d)]?.[_0x552bfc(0x238)]||'(unknown)';!_0x5e05f4[_0x552bfc(0x205)](_0x410707)&&_0x5e05f4[_0x552bfc(0x275)](_0x410707,[]),_0x5e05f4[_0x552bfc(0x264)](_0x410707)[_0x552bfc(0x262)]({'session':_0x24435c,'startTime':_0x5291f0,'endTime':_0x1d54be,'duration':_0x1d54be-_0x5291f0}),_0x5066ad=Math[_0x552bfc(0x16a)](_0x5066ad,_0x5291f0),_0x260d8f=Math[_0x552bfc(0x1e7)](_0x260d8f,_0x1d54be);}}if(_0x5e05f4[_0x552bfc(0x145)]===0x0)return _0x552bfc(0x1a4);const _0x407955=process['stdout'][_0x552bfc(0x200)]||0x78,_0x366423=0x1e,_0x40d76e=0x32,_0x38fdea=0x4,_0x31e7a2=Math['min'](_0x40d76e,Math[_0x552bfc(0x1e7)](_0x366423,Math[_0x552bfc(0x1c0)](_0x407955*0.3))),_0x301a5d=_0x407955-_0x31e7a2-TIMELINE_CONFIG[_0x552bfc(0x19a)]-0x3-_0x38fdea,_0x1278a4=_0x260d8f-_0x5066ad,_0x2f005d=_0x1278a4/_0x31e7a2,_0x3bfbbd=renderTimeAxis({'startTime':_0x5066ad,'endTime':_0x260d8f,'durationMs':_0x1278a4,'msPerChar':_0x2f005d},_0x31e7a2),_0x467625=[];for(const _0x1468b9 of _0x5e05f4[_0x552bfc(0x1d0)]()){_0x467625[_0x552bfc(0x262)](..._0x1468b9);}_0x467625[_0x552bfc(0x150)]((_0x548d56,_0x140758)=>_0x140758[_0x552bfc(0x192)]-_0x548d56['startTime']);const _0x13bb93=new Date(_0x5066ad),_0x30d407=formatDate(_0x13bb93),_0x1579ab=_0x38fdea+TIMELINE_CONFIG[_0x552bfc(0x1c5)]+TIMELINE_CONFIG['ICON_SPACING']+_0x301a5d,_0x3c36d3='\x20'[_0x552bfc(0x12f)](_0x1579ab-_0x30d407[_0x552bfc(0x21b)]),_0x438621=_0x3c36d3+a39_0x4049ae[_0x552bfc(0x239)](_0x30d407)+'\x20'+_0x3bfbbd;_0x4fabdb['push'](_0x438621);const _0x48d9dc=0x16;let _0x50f36f=0x0;for(const _0x5e3983 of _0x467625){const _0x405706=_0x5e3983[_0x552bfc(0x1dd)][_0x552bfc(0x14d)]?.['name']||'?',_0x11a1c6=Math[_0x552bfc(0x16a)](stringWidth(_0x405706),_0x48d9dc);_0x50f36f=Math['max'](_0x50f36f,_0x11a1c6);}for(const _0xe0966c of _0x467625){const {session:_0x38c463,startTime:_0x117f05,endTime:_0x1dddd1,duration:_0x95ee1c}=_0xe0966c,_0x5518e6=_0x38c463[_0x552bfc(0x14d)]?.['id'],_0x2b94a7=_0x38c463['id'],_0xfd8ba5=_0x38c463[_0x552bfc(0x14d)]?.[_0x552bfc(0x238)]||'?',_0x45b148=_0x38c463[_0x552bfc(0x132)]?.[_0x552bfc(0x238)]||'?';let _0x59e785,_0x445e9d;if(_0x38c463['lastAttempt']){const _0x5bd4dd=_0x38c463[_0x552bfc(0x1fc)];!_0x5bd4dd[_0x552bfc(0x20e)]?(_0x59e785=_0x5bd4dd[_0x552bfc(0x19d)]?'🛑':'🔄',_0x445e9d=_0x5bd4dd[_0x552bfc(0x19d)]?a39_0x4049ae[_0x552bfc(0x1a2)]:a39_0x4049ae['blue']):(_0x59e785=_0x5bd4dd[_0x552bfc(0x182)]?'✅':'❌',_0x445e9d=_0x5bd4dd['success']?a39_0x4049ae[_0x552bfc(0x293)]:a39_0x4049ae[_0x552bfc(0x213)]);}else _0x59e785='⏳',_0x445e9d=a39_0x4049ae['dim'];const _0x58af9a='#'+_0x2b94a7,_0x4bc869=_0x5518e6?hyperlink(_0x58af9a,getWorkflowSessionUrl(_0x594d3d,_0x5518e6,_0x2b94a7)):_0x58af9a;let _0x163f1b=_0xfd8ba5;stringWidth(_0xfd8ba5)>_0x48d9dc&&(_0x163f1b=_0xfd8ba5[_0x552bfc(0x272)](0x0,_0x48d9dc-0x1)+'…');const _0x27139a=a39_0x4049ae[_0x552bfc(0x239)](_0x163f1b),_0x5c2342=stringWidth(_0x163f1b),_0x607907='\x20'[_0x552bfc(0x12f)](_0x50f36f-stringWidth(_0x163f1b)+0x2),_0x29df20='('+formatElapsed(_0x95ee1c)+')',_0x55afa8=stringWidth(_0x29df20),_0x4d2212=stringWidth(_0x58af9a),_0x507df0=_0x4d2212+0x1+_0x5c2342+_0x607907[_0x552bfc(0x21b)],_0x366ff5=_0x301a5d-_0x507df0-_0x55afa8-0x1-0x8;let _0x48a731=_0x45b148;stringWidth(_0x48a731)>_0x366ff5&&(_0x48a731=_0x48a731['slice'](0x0,_0x366ff5-0x1)+'…');const _0x34c403=_0x4bc869+'\x20'+_0x27139a+_0x607907+_0x48a731,_0x17a824=stringWidth(_0x34c403),_0x19c901=_0x301a5d-_0x17a824-_0x55afa8,_0x4ecfc7=_0x34c403+'\x20'[_0x552bfc(0x12f)](Math['max'](0x1,_0x19c901))+a39_0x4049ae[_0x552bfc(0x239)](_0x29df20),_0x597db2=Math[_0x552bfc(0x1c0)]((_0x117f05-_0x5066ad)/_0x2f005d),_0x3682a7=Math['floor']((_0x1dddd1-_0x5066ad)/_0x2f005d),_0x33f7e3=Math['max'](_0x597db2+0x1,_0x3682a7),_0xf17d54=new Array(_0x31e7a2)[_0x552bfc(0x228)]('\x20');for(let _0x526a97=_0x597db2;_0x526a97<Math[_0x552bfc(0x16a)](_0x33f7e3,_0x31e7a2);_0x526a97++){_0xf17d54[_0x526a97]='─';}const _0x4e30ef=_0xf17d54[_0x552bfc(0x24a)](_0x49cd0f=>_0x49cd0f==='\x20'?'\x20':_0x445e9d(_0x49cd0f))[_0x552bfc(0x1a5)]('');_0x4fabdb[_0x552bfc(0x262)](_0x59e785+'\x20'+_0x4ecfc7+'│'+_0x4e30ef+'│');}return _0x4fabdb['join']('\x0a');}async['navigateSessionsInteractive'](_0xde8712,_0x5a04cd,_0x265d7b){const _0x387009=a39_0x1b0c43,{options:_0xcc83c8,tdx:_0xfa45e2}=_0x5a04cd,_0x51a59b=_0xcc83c8['site'],{timelineRows:_0x1e79c8,timeAxisHeader:_0x281225}=this[_0x387009(0x1bd)](_0xde8712,_0x51a59b),_0x5a985f=_0x1e79c8[_0x387009(0x160)](_0x1b2c1e=>_0x1b2c1e['attemptId']);if(_0x5a985f['length']===0x0){const _0xb6211a=this[_0x387009(0x171)](_0xde8712,_0x51a59b);console[_0x387009(0x21e)](_0xb6211a);!_0x265d7b&&(console['error'](''),console['error'](a39_0x4049ae[_0x387009(0x239)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x387009(0x280)](a39_0x4049ae['dim'](_0x387009(0x235))+'or'+a39_0x4049ae[_0x387009(0x239)](_0x387009(0x209))));return;}_0x281225&&console[_0x387009(0x21e)](_0x281225);const _0x336f81=_0x1e79c8[_0x387009(0x160)](_0x459f55=>_0x459f55['attemptId'])['map'](_0x5530e7=>({'title':_0x5530e7[_0x387009(0x278)],'value':_0x5530e7[_0x387009(0x126)]})),_0x4b4de7=process[_0x387009(0x21f)]['rows']||0x3c,_0x415154=Math[_0x387009(0x1e7)](0x28,Math['floor'](_0x4b4de7*0x2/0x3)),_0x1419b4=await a39_0x4a9c7f({'type':_0x387009(0x174),'name':_0x387009(0x126),'message':_0x387009(0x18f),'choices':_0x336f81,'initial':-0x1,'limit':_0x415154,'clearFirst':!![],'fallback':{'title':_0x387009(0x207),'value':null},'suggest':(_0x9cc2aa,_0x8735d9)=>{const _0x2417fb=_0x387009;if(!_0x9cc2aa)return Promise['resolve'](_0x8735d9);const _0x371ac0=_0x8735d9[_0x2417fb(0x160)](_0x533841=>{const _0x319554=_0x2417fb,_0x133cb2=_0x533841;return _0x133cb2[_0x319554(0x25c)][_0x319554(0x107)]()[_0x319554(0x14f)](_0x9cc2aa[_0x319554(0x107)]());});return Promise[_0x2417fb(0x144)](_0x371ac0);}}),_0x4dafe5=()=>{const _0x19582d=_0x387009;process[_0x19582d(0x21f)]['write'](_0x19582d(0x13e)),process[_0x19582d(0x21f)][_0x19582d(0x1de)](_0x19582d(0x13e)),process[_0x19582d(0x21f)][_0x19582d(0x1de)](_0x19582d(0x13e));},_0x40ab99=_0x1419b4&&_0x1419b4[_0x387009(0x126)]&&_0x1419b4[_0x387009(0x126)]!==null&&_0x1419b4['attemptId'][_0x387009(0x1ce)]()!=='';if(!_0x40ab99){_0x4dafe5(),console[_0x387009(0x21e)](a39_0x4049ae[_0x387009(0x239)]('Cancelled'));return;}_0x4dafe5();const _0x5ec63e=_0xde8712[_0x387009(0x1b2)](_0x5c968c=>_0x5c968c[_0x387009(0x1fc)]?.['id']===_0x1419b4[_0x387009(0x126)]);if(_0x5ec63e){const _0x430892=_0x5ec63e[_0x387009(0x14d)]?.[_0x387009(0x238)]||'?',_0x50c08d=_0x5ec63e[_0x387009(0x132)]?.['name']||'?';console['log'](_0x387009(0x2a0)+a39_0x4049ae[_0x387009(0x239)](_0x430892)+_0x387009(0x1e1)+a39_0x4049ae['dim'](_0x50c08d));}const _0x98405a=new WorkflowTimelineCommand();await _0x98405a[_0x387009(0x260)]({'args':[],'options':{..._0xcc83c8,'attemptId':_0x1419b4[_0x387009(0x126)]},'tdx':_0xfa45e2});}[a39_0x1b0c43(0x1bd)](_0x13ebc1,_0x3dd4ba){const _0x40c3a5=a39_0x1b0c43,_0x4b79ae=new Map();for(const _0x6bc8de of _0x13ebc1){_0x6bc8de['id']&&_0x6bc8de[_0x40c3a5(0x1fc)]?.['id']&&_0x4b79ae[_0x40c3a5(0x275)](_0x6bc8de['id'],_0x6bc8de[_0x40c3a5(0x1fc)]['id']);}const _0xa55042=[];let _0x4df38a='';const _0x153f65=this[_0x40c3a5(0x171)](_0x13ebc1,_0x3dd4ba),_0x52d67c=_0x153f65[_0x40c3a5(0x2a5)]('\x0a');for(const _0x3252d3 of _0x52d67c){if(_0x3252d3[_0x40c3a5(0x2a4)](_0x40c3a5(0x26f))||_0x3252d3[_0x40c3a5(0x241)](/^\s+\d{4}-\d{2}-\d{2}/))_0x4df38a=_0x3252d3;else{if(_0x3252d3['match'](/^[✅❌🔄🛑⏳]/)){const _0x36830d=_0x3252d3[_0x40c3a5(0x241)](/#(\d+)/),_0x1b20e7=_0x36830d?_0x36830d[0x1]:null,_0x4282e9=_0x1b20e7?_0x4b79ae[_0x40c3a5(0x264)](_0x1b20e7)||null:null,_0x3b82ec=_0x13ebc1['find'](_0x345db0=>_0x345db0['id']===_0x1b20e7),_0x39752f=_0x3b82ec?.[_0x40c3a5(0x14d)]?.['name']||'';_0xa55042['push']({'displayLine':_0x3252d3,'attemptId':_0x4282e9,'projectName':_0x39752f});}}}return{'timelineRows':_0xa55042,'timeAxisHeader':_0x4df38a};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x178);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x1ee);async[a39_0x1b0c43(0x260)](_0x3f3338){const _0x3f4860=a39_0x1b0c43,{options:_0x5741ee,args:_0x1e0278,tdx:_0x53b3fa}=_0x3f3338,_0x156a0e=this[_0x3f4860(0x242)](_0x1e0278,_0x5741ee);if(!_0x156a0e)return 0x1;const {projectName:_0x1818c8,workflowName:_0x28a937}=_0x156a0e,_0x4653ac=_0x5741ee[_0x3f4860(0x28a)];if(_0x5741ee[_0x3f4860(0x130)]){if(_0x1818c8&&_0x28a937)console[_0x3f4860(0x280)](_0x3f4860(0x25f)+_0x1818c8+'.'+_0x28a937);else _0x1818c8&&console['error'](_0x3f4860(0x292)+_0x1818c8);_0x4653ac&&console[_0x3f4860(0x280)](_0x3f4860(0x223));}const _0xc24ff4=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x53b3fa['workflow']['attempts']({'projectName':_0x1818c8,'workflowName':_0x28a937,'includeRetried':_0x4653ac,'limit':_0x5741ee[_0x3f4860(0x1a8)]}),{'verbose':_0x5741ee[_0x3f4860(0x130)]}),_0x3b6308=_0xc24ff4[_0x3f4860(0x29a)],_0x57fa52=_0x5741ee[_0x3f4860(0x1a8)]||0x64,_0x4fd4f6=_0x3b6308[_0x3f4860(0x21b)]>=_0x57fa52?a39_0x4049ae[_0x3f4860(0x239)](_0x3f4860(0x191)):'';console[_0x3f4860(0x280)](_0x3f4860(0x2a6)+_0x3b6308[_0x3f4860(0x21b)]+_0x3f4860(0x11c)+(_0x3b6308[_0x3f4860(0x21b)]!==0x1?'s':'')+_0x4fd4f6);if(_0x5741ee['format']==='json'||_0x5741ee[_0x3f4860(0x210)]===_0x3f4860(0x24b)||_0x5741ee['format']===_0x3f4860(0x216))await handleSDKOutput(_0x3b6308,_0x5741ee);else{if(_0x3b6308[_0x3f4860(0x21b)]===0x0){if(_0x1818c8&&_0x28a937)console[_0x3f4860(0x21e)]('No\x20attempts\x20found\x20for:\x20'+_0x1818c8+'.'+_0x28a937);else _0x1818c8?console['log'](_0x3f4860(0x284)+_0x1818c8):console[_0x3f4860(0x21e)](_0x3f4860(0x1bf));}else{const _0x3ddb7d=_0x5741ee[_0x3f4860(0x1cc)],_0x4036cd=_0x3b6308[_0x3f4860(0x24a)](_0x49f9db=>{const _0x45f5ce=_0x3f4860,_0x227f8a=a39_0x4049ae[_0x45f5ce(0x239)]('#'+_0x49f9db['id']),_0x40ce2c=_0x49f9db[_0x45f5ce(0x14d)]?.['id'],_0x370d84=_0x49f9db[_0x45f5ce(0x208)]||_0x49f9db[_0x45f5ce(0x1b5)],_0xd98647=_0x40ce2c&&_0x370d84?hyperlink(_0x227f8a,getWorkflowAttemptUrl(_0x3ddb7d,_0x40ce2c,_0x370d84,_0x49f9db['id'])):_0x227f8a,{icon:_0x585de4,text:_0x4af103}=getAttemptStatusDisplay(_0x49f9db),_0x38d7ce=(_0x49f9db[_0x45f5ce(0x14d)]?.[_0x45f5ce(0x238)]||'?')+'.'+(_0x49f9db[_0x45f5ce(0x132)]?.[_0x45f5ce(0x238)]||'?'),_0xd8f94b=_0x49f9db[_0x45f5ce(0x1c8)]?a39_0x4049ae[_0x45f5ce(0x239)](_0x49f9db['sessionTime']):'';return(_0xd98647+'\x20'+_0x585de4+(_0x4af103?'\x20'+_0x4af103:'')+'\x20'+_0x38d7ce+'\x20'+_0xd8f94b)['trimEnd']();});await writeOutput(_0x4036cd[_0x3f4860(0x1a5)]('\x0a'),_0x5741ee['output'],_0x3f4860(0x1d7));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x220);async[a39_0x1b0c43(0x260)](_0xf3ba0f){const _0x211d24=a39_0x1b0c43,{options:_0x116272,args:_0x5654ea,tdx:_0x32b25f}=_0xf3ba0f,_0x7fca3f=_0x5654ea[0x0];if(!_0x7fca3f)return console['error'](_0x211d24(0x1fe)),0x1;_0x116272[_0x211d24(0x130)]&&console['error']('Attempt\x20ID:\x20'+_0x7fca3f);const _0x5839dd=await withSpinner(_0x211d24(0x1a7),()=>_0x32b25f[_0x211d24(0x132)][_0x211d24(0x17e)](_0x7fca3f),{'verbose':_0x116272['verbose']}),_0x206baf=_0x5839dd[_0x211d24(0x29a)];let _0x46cb7a;!_0x206baf[_0x211d24(0x20e)]?_0x46cb7a=_0x206baf[_0x211d24(0x19d)]?'canceling':_0x211d24(0x1b7):_0x46cb7a=_0x206baf['success']?_0x211d24(0x182):'error';let _0x536e75;if(_0x206baf[_0x211d24(0x17f)]&&_0x206baf[_0x211d24(0x124)]){const _0x538231=new Date(_0x206baf[_0x211d24(0x17f)])['getTime'](),_0x347322=new Date(_0x206baf[_0x211d24(0x124)])['getTime']();_0x536e75=Math[_0x211d24(0x11a)]((_0x347322-_0x538231)/0x3e8);}const _0x13b5a2={'attempt_id':_0x206baf['id'],'status':_0x46cb7a,..._0x206baf[_0x211d24(0x29b)]!==undefined&&{'index':_0x206baf['index']},..._0x206baf[_0x211d24(0x14d)]&&{'project':_0x206baf[_0x211d24(0x14d)][_0x211d24(0x238)]},..._0x206baf[_0x211d24(0x132)]&&{'workflow':_0x206baf['workflow'][_0x211d24(0x238)]},..._0x206baf['sessionId']&&{'session_id':_0x206baf[_0x211d24(0x1b5)]},..._0x206baf[_0x211d24(0x1c8)]&&{'session_time':_0x206baf['sessionTime']},..._0x206baf['retryAttemptName']&&{'retry_attempt':_0x206baf['retryAttemptName']},..._0x536e75!==undefined&&{'duration_sec':_0x536e75},..._0x206baf[_0x211d24(0x17f)]&&{'created_at':_0x206baf[_0x211d24(0x17f)]},..._0x206baf[_0x211d24(0x124)]&&{'finished_at':_0x206baf[_0x211d24(0x124)]},...Object['keys'](_0x206baf[_0x211d24(0x16c)])['length']>0x0&&{'params':_0x206baf[_0x211d24(0x16c)]}};return await handleSingleObjectOutput(_0x13b5a2,_0x116272),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x100);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x202);async[a39_0x1b0c43(0x260)](_0x13174c){const _0x14cabe=a39_0x1b0c43,{options:_0x9ebf54,args:_0x21e817,tdx:_0x524c7a}=_0x13174c,_0xa20654=_0x21e817[0x0];if(!_0xa20654)return console['error'](_0x14cabe(0x1fe)),0x1;const _0x1e823a=_0x9ebf54['includeSubtasks'];_0x9ebf54[_0x14cabe(0x130)]&&(console[_0x14cabe(0x280)](_0x14cabe(0x1b8)+_0xa20654),_0x1e823a&&console[_0x14cabe(0x280)](_0x14cabe(0x125)));const _0x26d6e9=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x524c7a[_0x14cabe(0x132)][_0x14cabe(0x159)](_0xa20654,_0x1e823a||![]),{'verbose':_0x9ebf54[_0x14cabe(0x130)]}),_0x57f5f3=_0x26d6e9[_0x14cabe(0x29a)];return console[_0x14cabe(0x280)](_0x14cabe(0x2a6)+_0x57f5f3[_0x14cabe(0x21b)]+_0x14cabe(0x1b0)+(_0x57f5f3[_0x14cabe(0x21b)]!==0x1?'s':'')),await handleSDKOutput(_0x57f5f3,_0x9ebf54),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a39_0x1b0c43(0x289);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x18b);async['execute'](_0x5adf19){const _0x35a8c0=a39_0x1b0c43,{options:_0x185d45,args:_0x34135a,tdx:_0x5c64c2}=_0x5adf19,_0x49148c=_0x34135a[0x0];let _0x1fc212=_0x34135a[0x1];if(!_0x49148c)return console[_0x35a8c0(0x280)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x185d45[_0x35a8c0(0x130)]&&(console[_0x35a8c0(0x280)](_0x35a8c0(0x1b8)+_0x49148c),_0x1fc212&&console[_0x35a8c0(0x280)](_0x35a8c0(0x253)+_0x1fc212));const _0x8c9b1f=await withSpinner(_0x35a8c0(0x27e),()=>_0x5c64c2[_0x35a8c0(0x132)][_0x35a8c0(0x215)](_0x49148c,_0x1fc212),{'verbose':_0x185d45[_0x35a8c0(0x130)]}),_0x506ace=_0x8c9b1f[_0x35a8c0(0x29a)];if(_0x506ace['length']===0x0)return console[_0x35a8c0(0x280)](_0x35a8c0(0x1f5)),0x0;if(!_0x1fc212&&(_0x185d45['json']||_0x185d45[_0x35a8c0(0x210)]))return await handleSDKOutput(_0x506ace,_0x185d45),0x0;if(!_0x1fc212){const _0x520748=_0x506ace[_0x35a8c0(0x24a)](_0x3e8d9e=>({'title':_0x3e8d9e['taskName']+'\x20('+formatBytes(_0x3e8d9e['fileSize'])+')','value':_0x3e8d9e['taskName']})),_0x3b4e89=await a39_0x4a9c7f({'type':_0x35a8c0(0x170),'name':_0x35a8c0(0xfe),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x520748});if(!_0x3b4e89[_0x35a8c0(0xfe)])return console[_0x35a8c0(0x280)](_0x35a8c0(0x232)),0x0;_0x1fc212=_0x3b4e89[_0x35a8c0(0xfe)];}const _0x495872=await withSpinner('Downloading\x20logs...',()=>_0x5c64c2[_0x35a8c0(0x132)]['logs'](_0x49148c,_0x1fc212),{'verbose':_0x185d45['verbose']}),_0x1715ab=_0x495872['data'];return _0x1715ab?console[_0x35a8c0(0x21e)](_0x1715ab):console[_0x35a8c0(0x280)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x10d);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x173);async[a39_0x1b0c43(0x260)](_0x22a5d4){const _0x4f92a1=a39_0x1b0c43,{options:_0x190858,args:_0x473287,tdx:_0x121da2}=_0x22a5d4,_0x68ed46=_0x473287[0x0];if(!_0x68ed46)return console[_0x4f92a1(0x280)](_0x4f92a1(0x1fe)),0x1;const _0x332649=_0x190858['reason'];_0x190858[_0x4f92a1(0x130)]&&(console[_0x4f92a1(0x280)](_0x4f92a1(0x1b8)+_0x68ed46),_0x332649&&console['error'](_0x4f92a1(0x274)+_0x332649));if(!_0x190858[_0x4f92a1(0x180)]){const _0x156810=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x68ed46+'?');if(!_0x156810)return console[_0x4f92a1(0x280)](_0x4f92a1(0x232)),0x0;}const _0x29bee2=await withSpinner(_0x4f92a1(0x27d),()=>_0x121da2[_0x4f92a1(0x132)][_0x4f92a1(0x297)](_0x68ed46,_0x332649),{'verbose':_0x190858[_0x4f92a1(0x130)]}),_0x3fd1fc=_0x29bee2['data'];return console[_0x4f92a1(0x280)]('✔\x20'+_0x3fd1fc),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']='workflow:retry';['description']='Retry\x20a\x20session\x20or\x20attempt';async[a39_0x1b0c43(0x260)](_0x25456f){const _0x59f41a=a39_0x1b0c43,{options:_0x380028,args:_0x2464b5,tdx:_0x3338b8}=_0x25456f,_0x5361ee=_0x2464b5[0x0];if(!_0x5361ee)return console['error'](_0x59f41a(0x184)),console[_0x59f41a(0x280)](_0x59f41a(0x153)),0x1;let _0x23ff09=![],_0x606b5a=_0x5361ee;if(_0x5361ee['startsWith'](_0x59f41a(0x29d)))_0x23ff09=!![],_0x606b5a=_0x5361ee[_0x59f41a(0x23c)](0x8);else{if(_0x5361ee[_0x59f41a(0x2a4)](_0x59f41a(0x212)))_0x23ff09=![],_0x606b5a=_0x5361ee['substring'](0x8);else return console[_0x59f41a(0x280)](_0x59f41a(0x15b)),console['error'](_0x59f41a(0x153)),0x1;}const _0x49a800=_0x380028[_0x59f41a(0x225)],_0x2ee911=_0x380028[_0x59f41a(0x1ed)],_0x15afec=_0x380028['params'],_0x1d8701=_0x380028[_0x59f41a(0x270)];_0x380028[_0x59f41a(0x130)]&&(console[_0x59f41a(0x280)](_0x59f41a(0x236)+(_0x23ff09?_0x59f41a(0x1dd):'attempt')+'\x20'+_0x606b5a),_0x49a800&&console['error'](_0x59f41a(0x1d3)+_0x49a800),_0x2ee911&&console['error']('Resume\x20from:\x20'+_0x2ee911),_0x15afec&&console[_0x59f41a(0x280)]('Params:\x20'+_0x15afec),_0x1d8701&&console[_0x59f41a(0x280)](_0x59f41a(0x1b4)));let _0x44cad3;if(_0x15afec)try{if(_0x15afec[_0x59f41a(0x2a4)]('@')){const _0x3a3d84=await import(_0x59f41a(0x167)),_0x28cbe6=_0x15afec['substring'](0x1),_0x1176ad=await _0x3a3d84[_0x59f41a(0x1e6)](_0x28cbe6,_0x59f41a(0x1dc));_0x44cad3=JSON[_0x59f41a(0x247)](_0x1176ad);}else _0x44cad3=JSON[_0x59f41a(0x247)](_0x15afec);}catch{return console[_0x59f41a(0x280)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x380028['yes']){const _0x204c39=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x23ff09?_0x59f41a(0x1dd):_0x59f41a(0x17e))+'\x20'+_0x606b5a+'?');if(!_0x204c39)return console[_0x59f41a(0x280)](_0x59f41a(0x232)),0x0;}let _0x389e0d;_0x23ff09?_0x389e0d=await withSpinner(_0x59f41a(0x198),()=>_0x3338b8[_0x59f41a(0x132)]['retrySession'](_0x606b5a,{'fromTask':_0x49a800,'retryParams':_0x44cad3}),{'verbose':_0x380028['verbose']}):_0x389e0d=await withSpinner(_0x59f41a(0x261),()=>_0x3338b8[_0x59f41a(0x132)]['retryAttempt'](_0x606b5a,{'resumeFrom':_0x2ee911,'retryParams':_0x44cad3,'force':_0x1d8701}),{'verbose':_0x380028[_0x59f41a(0x130)]});const _0x1a29a1=_0x389e0d[_0x59f41a(0x29a)];return console[_0x59f41a(0x280)]('✔\x20Retry\x20started'),console[_0x59f41a(0x280)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x1a29a1[_0x59f41a(0x126)]),console[_0x59f41a(0x280)](_0x59f41a(0x221)+_0x1a29a1['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]='workflow:run';[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x1b3);async['execute'](_0x2a0e59){const _0x5b1eb9=a39_0x1b0c43,{options:_0x12100f,args:_0x2dd247,tdx:_0x1babc1}=_0x2a0e59;let _0x508267=_0x2dd247[0x0];if(!_0x508267){const _0x483e44=this[_0x5b1eb9(0x115)]([],_0x12100f),_0x3da9f5=await withSpinner(_0x5b1eb9(0x113),()=>_0x1babc1['workflow']['workflows'](_0x483e44,{'limit':_0x12100f['limit']}),{'verbose':_0x12100f[_0x5b1eb9(0x130)]}),_0x5aa4b7=_0x3da9f5[_0x5b1eb9(0x29a)];if(_0x5aa4b7[_0x5b1eb9(0x21b)]===0x0)return console[_0x5b1eb9(0x280)]('No\x20workflows\x20found'),!_0x483e44&&console[_0x5b1eb9(0x280)](a39_0x4049ae[_0x5b1eb9(0x239)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x27f47c=_0x5aa4b7[_0x5b1eb9(0x24a)](_0x3bf17e=>({'title':_0x3bf17e[_0x5b1eb9(0x14d)]?.['name']+'.'+_0x3bf17e[_0x5b1eb9(0x238)],'value':_0x3bf17e[_0x5b1eb9(0x14d)]?.[_0x5b1eb9(0x238)]+'.'+_0x3bf17e['name'],'description':_0x3bf17e[_0x5b1eb9(0x15a)]?_0x5b1eb9(0x116)+_0x3bf17e[_0x5b1eb9(0x15a)]:undefined})),_0x2f0954=await a39_0x4a9c7f({'type':_0x5b1eb9(0x170),'name':_0x5b1eb9(0x132),'message':_0x5b1eb9(0x246),'choices':_0x27f47c});if(!_0x2f0954[_0x5b1eb9(0x132)])return 0x1;_0x508267=_0x2f0954[_0x5b1eb9(0x132)];}if(!_0x508267[_0x5b1eb9(0x14f)]('.')){const _0x3f0b19=this[_0x5b1eb9(0x115)]([],_0x12100f);if(_0x3f0b19)_0x508267=_0x3f0b19+'.'+_0x508267;else return console[_0x5b1eb9(0x280)](a39_0x4049ae['red'](_0x5b1eb9(0x12a)),_0x5b1eb9(0x190)),console[_0x5b1eb9(0x280)](a39_0x4049ae[_0x5b1eb9(0x239)](_0x5b1eb9(0x15c))),0x1;}const _0x2b0a82=_0x12100f[_0x5b1eb9(0x229)],_0x10f600=_0x12100f[_0x5b1eb9(0x1c8)],_0x1e7c08={};if(_0x2b0a82&&Array['isArray'](_0x2b0a82))for(const _0x341946 of _0x2b0a82){const _0x268685=_0x341946['indexOf']('=');if(_0x268685===-0x1)return console['error']('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x341946),console[_0x5b1eb9(0x280)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x2e4507=_0x341946['substring'](0x0,_0x268685),_0x1654d4=_0x341946['substring'](_0x268685+0x1);try{_0x1e7c08[_0x2e4507]=JSON['parse'](_0x1654d4);}catch{_0x1e7c08[_0x2e4507]=_0x1654d4;}}_0x12100f[_0x5b1eb9(0x130)]&&(console[_0x5b1eb9(0x280)](_0x5b1eb9(0x134)+_0x508267),Object[_0x5b1eb9(0x143)](_0x1e7c08)[_0x5b1eb9(0x21b)]>0x0&&console[_0x5b1eb9(0x280)](_0x5b1eb9(0x1aa)+JSON[_0x5b1eb9(0x2a1)](_0x1e7c08)),_0x10f600&&console[_0x5b1eb9(0x280)](_0x5b1eb9(0x211)+_0x10f600));const _0x1b58e1=await withSpinner('Starting\x20workflow\x20run...',()=>_0x1babc1[_0x5b1eb9(0x132)][_0x5b1eb9(0x230)](_0x508267,_0x1e7c08,{'sessionTime':_0x10f600}),{'verbose':_0x12100f[_0x5b1eb9(0x130)]}),_0x1ffc8a=_0x1b58e1[_0x5b1eb9(0x29a)];console[_0x5b1eb9(0x280)](_0x5b1eb9(0x266)),console[_0x5b1eb9(0x280)](_0x5b1eb9(0x11d)+_0x1ffc8a['id']),console['error']('\x20\x20Session\x20ID:\x20'+_0x1ffc8a[_0x5b1eb9(0x1b5)]),console[_0x5b1eb9(0x280)]('\x20\x20Project:\x20'+_0x1ffc8a[_0x5b1eb9(0x14d)]?.['name']),console['error'](_0x5b1eb9(0x181)+_0x1ffc8a[_0x5b1eb9(0x132)]?.[_0x5b1eb9(0x238)]);if(_0x1ffc8a['project']?.['id']&&_0x1ffc8a['sessionId']&&_0x1ffc8a['id']){const _0x340835=_0x12100f[_0x5b1eb9(0x1cc)],_0x4ab95e=getConsoleUrl(_0x340835,_0x5b1eb9(0x218)+_0x1ffc8a[_0x5b1eb9(0x14d)]['id']+_0x5b1eb9(0x189)+_0x1ffc8a[_0x5b1eb9(0x1b5)]+_0x5b1eb9(0xfd)+_0x1ffc8a['id']);console[_0x5b1eb9(0x280)]('\x20\x20Console:\x20'+a39_0x4049ae['cyan'](_0x4ab95e));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x10c);[a39_0x1b0c43(0x252)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a39_0x1b0c43(0x260)](_0x3a7dac){const _0x5d4e69=a39_0x1b0c43,{options:_0x2a23f2,args:_0x5cc325,tdx:_0x44f142}=_0x3a7dac,_0x4803ac=_0x5cc325[0x0],_0x59bdbb=_0x5cc325[0x1]||'.';if(!_0x4803ac)return console[_0x5d4e69(0x280)](_0x5d4e69(0x1c7)),console[_0x5d4e69(0x280)](_0x5d4e69(0x16d)),0x1;const _0x3f1e71=_0x2a23f2[_0x5d4e69(0x15a)];_0x2a23f2[_0x5d4e69(0x130)]&&(console[_0x5d4e69(0x280)]('Project:\x20'+_0x4803ac),console[_0x5d4e69(0x280)](_0x5d4e69(0x1ab)+_0x59bdbb),_0x3f1e71&&console[_0x5d4e69(0x280)](_0x5d4e69(0x13f)+_0x3f1e71));const _0x563b97=await withSpinner(_0x5d4e69(0x1fd)+_0x4803ac+_0x5d4e69(0x29f),()=>_0x44f142[_0x5d4e69(0x132)][_0x5d4e69(0x1b6)](_0x4803ac,_0x59bdbb,{'revision':_0x3f1e71}),{'verbose':_0x2a23f2[_0x5d4e69(0x130)]}),_0x4dd655=_0x563b97[_0x5d4e69(0x29a)];return console[_0x5d4e69(0x280)]('✔\x20Downloaded\x20'+_0x4dd655['projectName']),console[_0x5d4e69(0x280)]('\x20\x20Revision:\x20'+_0x4dd655[_0x5d4e69(0x15a)]),console[_0x5d4e69(0x280)](_0x5d4e69(0x222)+_0x4dd655[_0x5d4e69(0x14c)]),console[_0x5d4e69(0x280)](_0x5d4e69(0x217)+_0x59bdbb+'/'+_0x4dd655['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x1f0);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x16e);async[a39_0x1b0c43(0x260)](_0x576a3e){const _0x518a56=a39_0x1b0c43,{options:_0x284e08,args:_0x4f334f,tdx:_0x1451f7}=_0x576a3e;let _0x27cb46='.',_0x2a1afa=_0x284e08[_0x518a56(0x238)];if(_0x4f334f[0x0]){const {promises:_0x1c6256}=await import('fs');try{const _0x1b92f4=await _0x1c6256[_0x518a56(0x28e)](_0x4f334f[0x0]);if(_0x1b92f4['isDirectory']())_0x27cb46=_0x4f334f[0x0];else return console[_0x518a56(0x280)](_0x518a56(0x20a)+_0x4f334f[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x2a1afa=_0x4f334f[0x0],_0x27cb46='.';}}const _0xcb822f=_0x284e08['revision'],_0x1be940=_0x284e08['skipValidation'];_0x284e08[_0x518a56(0x130)]&&(console[_0x518a56(0x280)](_0x518a56(0x1fa)+_0x27cb46),_0x2a1afa&&console[_0x518a56(0x280)](_0x518a56(0x28f)+_0x2a1afa),_0xcb822f&&console[_0x518a56(0x280)](_0x518a56(0x13f)+_0xcb822f),_0x1be940&&console[_0x518a56(0x280)](_0x518a56(0x2a2)));const _0x9cebc=await withSpinner(_0x518a56(0x119),()=>_0x1451f7[_0x518a56(0x132)][_0x518a56(0x262)](_0x27cb46,{'projectName':_0x2a1afa,'revision':_0xcb822f,'skipValidation':_0x1be940}),{'verbose':_0x284e08[_0x518a56(0x130)]}),_0x10cb72=_0x9cebc[_0x518a56(0x29a)];return console['error'](_0x518a56(0x22c)+_0x10cb72[_0x518a56(0x183)]),console['error'](_0x518a56(0x26c)+_0x10cb72[_0x518a56(0x26b)]),console[_0x518a56(0x280)]('\x20\x20Revision:\x20'+_0x10cb72[_0x518a56(0x15a)]),await this[_0x518a56(0x199)](_0x1451f7,_0x10cb72[_0x518a56(0x183)],_0x284e08[_0x518a56(0x1cc)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x139);['description']=a39_0x1b0c43(0x29c);async['execute'](_0x3e3cad){const _0x48c68a=a39_0x1b0c43,{options:_0x5862d9,args:_0x2c754c,tdx:_0x16c082}=_0x3e3cad,_0x2ce2f2=_0x2c754c[0x0],_0x48cd07=_0x2c754c[0x1];if(!_0x2ce2f2)return console[_0x48c68a(0x280)](a39_0x4049ae['red'](_0x48c68a(0x12a)),_0x48c68a(0x16f)),console[_0x48c68a(0x280)](a39_0x4049ae[_0x48c68a(0x239)](_0x48c68a(0x237))),0x1;const _0x36cb2d=_0x5862d9[_0x48c68a(0x15a)];_0x5862d9[_0x48c68a(0x130)]&&(console[_0x48c68a(0x280)](_0x48c68a(0x2a0)+_0x2ce2f2),_0x48cd07&&console['error'](_0x48c68a(0x259)+_0x48cd07),_0x36cb2d&&console['error'](_0x48c68a(0x13f)+_0x36cb2d),_0x5862d9['dryRun']&&console[_0x48c68a(0x280)](_0x48c68a(0x1c9)));const _0x19201a=await withSpinner(_0x48c68a(0x248)+_0x2ce2f2+_0x48c68a(0x29f),()=>_0x16c082['workflow'][_0x48c68a(0x175)](_0x2ce2f2,{'targetDir':_0x48cd07,'revision':_0x36cb2d}),{'verbose':_0x5862d9[_0x48c68a(0x130)]}),_0x4df355=_0x19201a[_0x48c68a(0x29a)];_0x4df355[_0x48c68a(0x163)]?console[_0x48c68a(0x280)](_0x48c68a(0x25b)+_0x4df355[_0x48c68a(0x183)]):console[_0x48c68a(0x280)]('✔\x20Project:\x20'+_0x4df355[_0x48c68a(0x183)]);console[_0x48c68a(0x280)](_0x48c68a(0x136)+_0x4df355[_0x48c68a(0x15a)]),console['error'](_0x48c68a(0x279)+(a39_0x613a32[_0x48c68a(0x1e3)](process['cwd'](),_0x4df355[_0x48c68a(0x1d4)])||'.')),console['error'](_0x48c68a(0x1c2)+a39_0x4049ae[_0x48c68a(0x293)]('+'+_0x4df355[_0x48c68a(0x103)]['new']+_0x48c68a(0x1b9))+',\x20'+(a39_0x4049ae[_0x48c68a(0x1a2)]('~'+_0x4df355[_0x48c68a(0x103)][_0x48c68a(0x19c)]+_0x48c68a(0x156))+',\x20')+(a39_0x4049ae['red']('-'+_0x4df355[_0x48c68a(0x103)][_0x48c68a(0x1d1)]+'\x20deleted')+',\x20')+(''+a39_0x4049ae['dim'](_0x4df355[_0x48c68a(0x103)][_0x48c68a(0x27a)]+_0x48c68a(0x187))));for(const _0x19f44b of _0x4df355['changes']){_0x19f44b['type']===_0x48c68a(0x19c)&&_0x19f44b[_0x48c68a(0x206)]&&(console[_0x48c68a(0x280)]('\x0a'+a39_0x4049ae[_0x48c68a(0x22b)](_0x48c68a(0x13a)+_0x19f44b[_0x48c68a(0x1bb)])),console['error'](_0x19f44b['diff']));}if(!_0x4df355[_0x48c68a(0x1d8)])return saveSessionContext({'workflow_project':_0x4df355[_0x48c68a(0x183)]},_0x5862d9[_0x48c68a(0x1dd)]),console['error'](a39_0x4049ae[_0x48c68a(0x293)](_0x48c68a(0x201))),console[_0x48c68a(0x280)](a39_0x4049ae[_0x48c68a(0x239)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x4df355[_0x48c68a(0x183)])),0x0;if(_0x5862d9[_0x48c68a(0x1a6)])return console[_0x48c68a(0x280)](a39_0x4049ae['yellow'](_0x48c68a(0x295))),0x0;if(!_0x5862d9[_0x48c68a(0x180)]){const _0x28a4e2=await confirmKey(_0x48c68a(0x22e));if(!_0x28a4e2)return console['error']('Cancelled'),0x0;}await withSpinner(_0x48c68a(0x256),()=>_0x16c082['workflow'][_0x48c68a(0x129)](_0x4df355,{'revision':_0x36cb2d}),{'verbose':_0x5862d9[_0x48c68a(0x130)]}),saveSessionContext({'workflow_project':_0x4df355[_0x48c68a(0x183)]},_0x5862d9['session']),console['error'](a39_0x4049ae[_0x48c68a(0x293)](_0x48c68a(0x168)));const _0x38203e=a39_0x613a32[_0x48c68a(0x1e3)](process[_0x48c68a(0x1e2)](),_0x4df355[_0x48c68a(0x1d4)])||'.';return console[_0x48c68a(0x280)](a39_0x4049ae['dim'](_0x48c68a(0x217)+_0x38203e)),console['error'](a39_0x4049ae[_0x48c68a(0x239)](_0x48c68a(0x1da)+_0x4df355[_0x48c68a(0x183)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x109);['description']='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a39_0x1b0c43(0x260)](_0x26347d){const _0x5f0e86=a39_0x1b0c43,{options:_0x289330,args:_0x28ff89,tdx:_0x2ec63a}=_0x26347d,_0x1ea406=this['resolveProjectDir'](_0x28ff89,_0x289330),_0x32f631=_0x289330[_0x5f0e86(0x15a)],_0x357d1e=_0x289330[_0x5f0e86(0x19e)];_0x289330['verbose']&&(_0x1ea406&&console[_0x5f0e86(0x280)](_0x5f0e86(0x290)+_0x1ea406),_0x32f631&&console[_0x5f0e86(0x280)](_0x5f0e86(0x13f)+_0x32f631),_0x289330[_0x5f0e86(0x1a6)]&&console[_0x5f0e86(0x280)](_0x5f0e86(0x1c9)),_0x357d1e&&console['error'](_0x5f0e86(0x2a2)));let _0x18f0ad;try{_0x18f0ad=await withSpinner('Analyzing\x20changes...',()=>_0x2ec63a[_0x5f0e86(0x132)][_0x5f0e86(0x162)]({'sourceDir':_0x1ea406,'revision':_0x32f631,'skipValidation':_0x357d1e}),{'verbose':_0x289330['verbose']});}catch(_0x168f92){if(_0x168f92 instanceof Error&&_0x168f92['message'][_0x5f0e86(0x14f)](_0x5f0e86(0x214)))return console[_0x5f0e86(0x280)](a39_0x4049ae[_0x5f0e86(0x213)]('Error:'),_0x5f0e86(0x254)),_0x289330['workflowProject']?console[_0x5f0e86(0x280)](a39_0x4049ae['dim'](_0x5f0e86(0x114)+_0x289330[_0x5f0e86(0x110)]+_0x5f0e86(0x1be)+_0x289330[_0x5f0e86(0x110)]+'\x27')):console[_0x5f0e86(0x280)](a39_0x4049ae['dim'](_0x5f0e86(0x22f))),0x1;throw _0x168f92;}const _0x2b0b95=_0x18f0ad[_0x5f0e86(0x29a)];console[_0x5f0e86(0x280)](_0x5f0e86(0x18e)+_0x2b0b95[_0x5f0e86(0x183)]),console['error'](_0x5f0e86(0x149)+_0x2b0b95[_0x5f0e86(0x1f7)]),console['error'](_0x5f0e86(0x136)+_0x2b0b95[_0x5f0e86(0x15a)]),console[_0x5f0e86(0x280)](_0x5f0e86(0x1c2)+a39_0x4049ae[_0x5f0e86(0x293)]('+'+_0x2b0b95[_0x5f0e86(0x103)][_0x5f0e86(0x11f)]+_0x5f0e86(0x1b9))+',\x20'+(a39_0x4049ae['yellow']('~'+_0x2b0b95[_0x5f0e86(0x103)][_0x5f0e86(0x19c)]+_0x5f0e86(0x156))+',\x20')+(a39_0x4049ae[_0x5f0e86(0x213)]('-'+_0x2b0b95[_0x5f0e86(0x103)][_0x5f0e86(0x1d1)]+_0x5f0e86(0x25e))+',\x20')+(''+a39_0x4049ae[_0x5f0e86(0x239)](_0x2b0b95[_0x5f0e86(0x103)][_0x5f0e86(0x27a)]+_0x5f0e86(0x187))));for(const _0x1d5a51 of _0x2b0b95[_0x5f0e86(0x17c)]){_0x1d5a51[_0x5f0e86(0x240)]===_0x5f0e86(0x19c)&&_0x1d5a51[_0x5f0e86(0x206)]&&(console['error']('\x0a'+a39_0x4049ae['cyan']('---\x20'+_0x1d5a51['path'])),console[_0x5f0e86(0x280)](_0x1d5a51[_0x5f0e86(0x206)]));}if(!_0x2b0b95['hasChanges'])return console[_0x5f0e86(0x280)](a39_0x4049ae[_0x5f0e86(0x293)](_0x5f0e86(0x10e))),await this['showWorkflowConsoleUrl'](_0x2ec63a,_0x2b0b95['projectName'],_0x289330[_0x5f0e86(0x1cc)]),0x0;if(_0x289330[_0x5f0e86(0x1a6)])return console[_0x5f0e86(0x280)](a39_0x4049ae['yellow'](_0x5f0e86(0x233))),0x0;if(!_0x289330[_0x5f0e86(0x180)]){const _0x28ed08=await confirmKey(_0x5f0e86(0x141));if(!_0x28ed08)return console[_0x5f0e86(0x280)](_0x5f0e86(0x232)),0x0;}const _0x506ffc=await withSpinner('Pushing\x20project...',()=>_0x2ec63a[_0x5f0e86(0x132)]['executePushProject'](_0x2b0b95),{'verbose':_0x289330[_0x5f0e86(0x130)]}),_0x3a2d19=_0x506ffc['data'];return console[_0x5f0e86(0x280)](a39_0x4049ae[_0x5f0e86(0x293)](_0x5f0e86(0x277))),console['error'](_0x5f0e86(0x26c)+_0x3a2d19['projectId']),console[_0x5f0e86(0x280)](_0x5f0e86(0x136)+_0x3a2d19['revision']),await this[_0x5f0e86(0x199)](_0x2ec63a,_0x3a2d19[_0x5f0e86(0x183)],_0x289330[_0x5f0e86(0x1cc)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x21c);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x1d2);async[a39_0x1b0c43(0x260)](_0x23a2f8){const _0x1f11f7=a39_0x1b0c43,{options:_0x29a820,args:_0x5cf12e,tdx:_0x5002b8}=_0x23a2f8,_0x393792=this[_0x1f11f7(0x23b)](_0x5cf12e,_0x29a820),_0x2083d8=_0x29a820['name'],_0x1551eb=_0x29a820[_0x1f11f7(0x15a)],_0x3c9757=_0x29a820[_0x1f11f7(0x19e)];if(!_0x393792)return console['error'](a39_0x4049ae[_0x1f11f7(0x213)](_0x1f11f7(0x12a)),_0x1f11f7(0x104)),console[_0x1f11f7(0x280)](a39_0x4049ae[_0x1f11f7(0x239)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x1f11f7(0x280)](a39_0x4049ae['dim'](_0x1f11f7(0x21d))),0x1;if(!_0x2083d8)return console[_0x1f11f7(0x280)](a39_0x4049ae[_0x1f11f7(0x213)]('Error:'),_0x1f11f7(0x263)),console[_0x1f11f7(0x280)](a39_0x4049ae[_0x1f11f7(0x239)](_0x1f11f7(0x18a))),0x1;_0x29a820[_0x1f11f7(0x130)]&&(console[_0x1f11f7(0x280)](_0x1f11f7(0x290)+_0x393792),console[_0x1f11f7(0x280)](_0x1f11f7(0x23a)+_0x2083d8),_0x1551eb&&console[_0x1f11f7(0x280)](_0x1f11f7(0x13f)+_0x1551eb),_0x29a820[_0x1f11f7(0x1a6)]&&console[_0x1f11f7(0x280)](_0x1f11f7(0x1c9)),_0x3c9757&&console[_0x1f11f7(0x280)]('Validation:\x20skipped'));const _0x49c69e=await withSpinner(_0x1f11f7(0x11b),()=>_0x5002b8['workflow']['prepareCloneProject'](_0x393792,_0x2083d8,{'revision':_0x1551eb,'skipValidation':_0x3c9757}),{'verbose':_0x29a820[_0x1f11f7(0x130)]}),_0x2f39a1=_0x49c69e[_0x1f11f7(0x29a)];console['error'](_0x1f11f7(0x185)+_0x2f39a1['sourceDir']);_0x2f39a1[_0x1f11f7(0x234)]&&console['error'](_0x1f11f7(0x1e0)+_0x2f39a1[_0x1f11f7(0x234)]);console['error'](_0x1f11f7(0x23a)+_0x2f39a1[_0x1f11f7(0x1cf)]),console[_0x1f11f7(0x280)](_0x1f11f7(0x13f)+_0x2f39a1['revision']),console[_0x1f11f7(0x280)](_0x1f11f7(0x219)+_0x2f39a1['fileCount']);_0x2f39a1[_0x1f11f7(0x165)]&&(console['error'](a39_0x4049ae[_0x1f11f7(0x1a2)](_0x1f11f7(0x14e)+_0x2f39a1[_0x1f11f7(0x1cf)]+_0x1f11f7(0x102)+_0x2f39a1[_0x1f11f7(0x1a0)]+')')),console[_0x1f11f7(0x280)](a39_0x4049ae[_0x1f11f7(0x1a2)](_0x1f11f7(0x1f4))));if(_0x29a820[_0x1f11f7(0x1a6)])return console[_0x1f11f7(0x280)](a39_0x4049ae[_0x1f11f7(0x1a2)](_0x1f11f7(0x18c))),0x0;if(!_0x29a820['yes']){const _0x3a4dd8=_0x2f39a1[_0x1f11f7(0x234)]||a39_0x613a32[_0x1f11f7(0x15f)](_0x393792),_0x295d8a=_0x2f39a1['targetExists']?_0x1f11f7(0x131)+_0x2083d8+_0x1f11f7(0x224):_0x1f11f7(0x1f8)+_0x3a4dd8+_0x1f11f7(0x194)+_0x2083d8+'\x22?',_0x2ff6c2=await confirmKey(_0x295d8a);if(!_0x2ff6c2)return console[_0x1f11f7(0x280)](_0x1f11f7(0x232)),0x0;}const _0x4cc55c=await withSpinner(_0x2f39a1[_0x1f11f7(0x165)]?'Updating\x20'+_0x2083d8+_0x1f11f7(0x29f):_0x1f11f7(0x1ae)+_0x2083d8+_0x1f11f7(0x29f),()=>_0x5002b8[_0x1f11f7(0x132)][_0x1f11f7(0x118)](_0x2f39a1),{'verbose':_0x29a820['verbose']}),_0x27f4dd=_0x4cc55c[_0x1f11f7(0x29a)];return console['error'](a39_0x4049ae[_0x1f11f7(0x293)](_0x2f39a1[_0x1f11f7(0x165)]?_0x1f11f7(0x188):_0x1f11f7(0x1c4))),console['error'](_0x1f11f7(0x193)+_0x27f4dd[_0x1f11f7(0x1cf)]),console['error'](_0x1f11f7(0x26c)+_0x27f4dd[_0x1f11f7(0x1c6)]),console[_0x1f11f7(0x280)](_0x1f11f7(0x136)+_0x27f4dd[_0x1f11f7(0x15a)]),await this['showWorkflowConsoleUrl'](_0x5002b8,_0x27f4dd[_0x1f11f7(0x1cf)],_0x29a820[_0x1f11f7(0x1cc)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a39_0x1b0c43(0x238)]='workflow:delete';[a39_0x1b0c43(0x252)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a39_0x1b0c43(0x260)](_0x41ca89){const _0x358b37=a39_0x1b0c43,{options:_0xd92f5e,args:_0x3f6836,tdx:_0x1e3642}=_0x41ca89,_0x4845c3=_0x3f6836[0x0];if(!_0x4845c3)return console[_0x358b37(0x280)](_0x358b37(0x27b)),console[_0x358b37(0x280)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0xd92f5e['verbose']&&console[_0x358b37(0x280)](_0x358b37(0x2a0)+_0x4845c3);if(!_0xd92f5e['yes']){const _0x34dccb=await confirmKey(_0x358b37(0x271)+_0x4845c3+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x34dccb)return console['error']('Cancelled'),0x0;}const _0x60f160=await withSpinner(_0x358b37(0x1e4)+_0x4845c3+'...',()=>_0x1e3642[_0x358b37(0x132)]['delete'](_0x4845c3),{'verbose':_0xd92f5e['verbose']}),_0x35efd4=_0x60f160[_0x358b37(0x29a)];return console['error'](_0x358b37(0x282)+_0x35efd4['projectName']),console['error'](_0x358b37(0x26c)+_0x35efd4['projectId']),0x0;}}export function parseKeyValue(_0x36d9f2){const _0x56083d=a39_0x1b0c43,_0x3a7701=_0x36d9f2[_0x56083d(0x286)]('=');if(_0x3a7701===-0x1)throw new Error(_0x56083d(0x2a3)+_0x36d9f2+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x149cac=_0x36d9f2[_0x56083d(0x23c)](0x0,_0x3a7701),_0x9c6a6e=_0x36d9f2[_0x56083d(0x23c)](_0x3a7701+0x1);if(!_0x149cac)throw new Error(_0x56083d(0x10b));return{'key':_0x149cac,'value':_0x9c6a6e};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0xfb);[a39_0x1b0c43(0x252)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a39_0x1b0c43(0x260)](_0x153d8f){const _0x40de2d=a39_0x1b0c43,{options:_0x1a6f72,args:_0x2b05f1,tdx:_0x30eac1}=_0x153d8f,_0x143177=this[_0x40de2d(0x25a)](_0x2b05f1,_0x1a6f72);if(!_0x143177)return 0x1;_0x1a6f72[_0x40de2d(0x130)]&&console[_0x40de2d(0x280)](_0x40de2d(0x2a0)+_0x143177);const _0x1d633f=await withSpinner(_0x40de2d(0x186),()=>_0x30eac1[_0x40de2d(0x132)][_0x40de2d(0x17a)](_0x143177),{'verbose':_0x1a6f72['verbose']}),{secrets:_0x5951a0}=_0x1d633f['data'];return console[_0x40de2d(0x280)](_0x40de2d(0x2a6)+_0x5951a0[_0x40de2d(0x21b)]+_0x40de2d(0x265)+(_0x5951a0['length']!==0x1?'s':'')),await handleSDKOutput(_0x5951a0,_0x1a6f72),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x28b);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x148);async[a39_0x1b0c43(0x260)](_0x2f4692){const _0x2db2e2=a39_0x1b0c43,{options:_0x3183bc,args:_0x277a6a,tdx:_0x2e549d}=_0x2f4692;let _0x12ff2f,_0x2b194e;if(_0x277a6a['length']>=0x2)_0x12ff2f=_0x277a6a[0x0],_0x2b194e=_0x277a6a[0x1];else{if(_0x277a6a[_0x2db2e2(0x21b)]===0x1&&_0x3183bc['workflowProject'])_0x12ff2f=_0x3183bc[_0x2db2e2(0x110)],_0x2b194e=_0x277a6a[0x0];else return _0x277a6a[_0x2db2e2(0x21b)]===0x1?(console['error'](_0x2db2e2(0x1c7)),console[_0x2db2e2(0x280)](_0x2db2e2(0x15c)),0x1):(console[_0x2db2e2(0x280)]('Error:\x20KEY=VALUE\x20is\x20required'),console['error'](_0x2db2e2(0x23e)),0x1);}let _0x3cf617,_0x3387e5;try{({key:_0x3cf617,value:_0x3387e5}=parseKeyValue(_0x2b194e));}catch(_0x3bbe68){return _0x3bbe68 instanceof Error&&console[_0x2db2e2(0x280)](a39_0x4049ae['red'](_0x2db2e2(0x12a)),_0x3bbe68[_0x2db2e2(0x1c1)]),0x1;}_0x3183bc[_0x2db2e2(0x130)]&&(console['error'](_0x2db2e2(0x2a0)+_0x12ff2f),console[_0x2db2e2(0x280)](_0x2db2e2(0x24d)+_0x3cf617));const _0x1f1734=await withSpinner(_0x2db2e2(0x12d),()=>_0x2e549d[_0x2db2e2(0x132)]['setSecret'](_0x12ff2f,_0x3cf617,_0x3387e5),{'verbose':_0x3183bc[_0x2db2e2(0x130)]}),_0x258c16=_0x1f1734[_0x2db2e2(0x29a)];return console[_0x2db2e2(0x280)](_0x2db2e2(0x28d)+_0x258c16['key']+_0x2db2e2(0x273)+_0x258c16['projectName']+'\x27'),(_0x3183bc[_0x2db2e2(0x20b)]||_0x3183bc[_0x2db2e2(0x24b)])&&await handleSingleObjectOutput(_0x258c16,_0x3183bc),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]='workflow:secrets:delete';[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x204);async[a39_0x1b0c43(0x260)](_0x82de5){const _0x40408b=a39_0x1b0c43,{options:_0x303454,args:_0x1b0801,tdx:_0x4ee01e}=_0x82de5;let _0x33ee8f,_0x518382;if(_0x1b0801['length']>=0x2)_0x33ee8f=_0x1b0801[0x0],_0x518382=_0x1b0801[0x1];else{if(_0x1b0801[_0x40408b(0x21b)]===0x1&&_0x303454['workflowProject'])_0x33ee8f=_0x303454['workflowProject'],_0x518382=_0x1b0801[0x0];else return _0x1b0801[_0x40408b(0x21b)]===0x1?(console[_0x40408b(0x280)](_0x40408b(0x1c7)),console[_0x40408b(0x280)](_0x40408b(0x15c)),0x1):(console[_0x40408b(0x280)](_0x40408b(0x13c)),console['error'](_0x40408b(0x288)),0x1);}_0x303454['verbose']&&(console[_0x40408b(0x280)](_0x40408b(0x2a0)+_0x33ee8f),console[_0x40408b(0x280)](_0x40408b(0x24d)+_0x518382));if(!_0x303454[_0x40408b(0x180)]){const _0x2bfdd6=await confirmKey(_0x40408b(0x1eb)+_0x518382+'\x27\x20from\x20project\x20\x27'+_0x33ee8f+'\x27?');if(!_0x2bfdd6)return console[_0x40408b(0x280)]('Cancelled'),0x0;}const _0x445fc8=await withSpinner(_0x40408b(0x157),()=>_0x4ee01e[_0x40408b(0x132)]['deleteSecret'](_0x33ee8f,_0x518382),{'verbose':_0x303454['verbose']}),_0x3266da=_0x445fc8[_0x40408b(0x29a)];return console['error'](_0x40408b(0x28d)+_0x3266da[_0x40408b(0x121)]+_0x40408b(0x267)+_0x3266da[_0x40408b(0x183)]+'\x27'),(_0x303454['json']||_0x303454[_0x40408b(0x24b)])&&await handleSingleObjectOutput(_0x3266da,_0x303454),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(_0x4f4441){const _0x15aa3f=a39_0x1b0c43,_0x1a51c1=Math[_0x15aa3f(0x1c0)](_0x4f4441/0x3e8),_0x5060fb=Math['floor'](_0x1a51c1/0x3c),_0x34fba8=Math['floor'](_0x5060fb/0x3c),_0xdae76=Math[_0x15aa3f(0x1c0)](_0x34fba8/0x18);if(_0xdae76>0x0){const _0x3a9d4d=_0x34fba8%0x18;return _0x3a9d4d>0x0?_0xdae76+'d\x20'+_0x3a9d4d+'h':_0xdae76+'d';}else{if(_0x34fba8>0x0){const _0x4b3cc1=_0x5060fb%0x3c;return _0x4b3cc1>0x0?_0x34fba8+'h\x20'+_0x4b3cc1+'m':_0x34fba8+'h';}else{if(_0x5060fb>0x0){const _0x2f3e43=_0x1a51c1%0x3c;return _0x2f3e43>0x0?_0x5060fb+'m\x20'+_0x2f3e43+'s':_0x5060fb+'m';}else return _0x1a51c1+'s';}}}function formatTimestamp(_0x361995,_0x2aecce){const _0x24bc48=a39_0x1b0c43,_0x5d320f=new Date(_0x361995),_0x39699f=String(_0x5d320f['getHours']())[_0x24bc48(0x250)](0x2,'0'),_0xb449a9=String(_0x5d320f[_0x24bc48(0x27c)]())['padStart'](0x2,'0'),_0x5e2594=_0x39699f+':'+_0xb449a9,_0x2bc064=_0x5d320f[_0x24bc48(0x127)]()===_0x2aecce[_0x24bc48(0x127)]()&&_0x5d320f[_0x24bc48(0x249)]()===_0x2aecce[_0x24bc48(0x249)]()&&_0x5d320f['getDate']()===_0x2aecce[_0x24bc48(0x112)]();if(_0x2bc064)return _0x5e2594;else{const _0x10c4cd=String(_0x5d320f[_0x24bc48(0x249)]()+0x1)['padStart'](0x2,'0'),_0x4d5ba7=String(_0x5d320f[_0x24bc48(0x112)]())[_0x24bc48(0x250)](0x2,'0');return _0x10c4cd+'-'+_0x4d5ba7+'\x20'+_0x5e2594;}}function formatDate(_0x2f4b08){const _0x46b5f1=a39_0x1b0c43,_0x5484a7=_0x2f4b08['getFullYear'](),_0x40ea17=String(_0x2f4b08[_0x46b5f1(0x249)]()+0x1)[_0x46b5f1(0x250)](0x2,'0'),_0x50b90e=String(_0x2f4b08['getDate']())[_0x46b5f1(0x250)](0x2,'0');return _0x5484a7+'-'+_0x40ea17+'-'+_0x50b90e;}function a39_0x2f76(){const _0xe18944=['Deleting\x20secret...','436874IvUUvD','tasks','revision','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','duration','workflows','basename','filter','workflow:use','preparePushProject','isNewProject','No\x20sessions\x20found\x20for:\x20','targetExists','state','fs/promises','✔\x20Pull\x20complete','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','min','MAX_LABEL_COUNT','params','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Project\x20name\x20is\x20required','select','renderSessionsTimeline','every','Kill\x20a\x20running\x20attempt','autocomplete','pullProject','1056264iAFmjl','No\x20projects\x20match\x20pattern:\x20','workflow:attempts','planned','listSecrets','📋\x20','changes','104pCUaJO','attempt','createdAt','yes','\x20\x20Workflow:\x20','success','projectName','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Source:\x20','Listing\x20secrets...','\x20unchanged','✔\x20Project\x20updated','/sessions/','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x0aDry\x20run\x20-\x20no\x20project\x20created','rows','✔\x20Project:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','\x20(use\x20--limit\x20to\x20show\x20more)','startTime','\x20\x20Project:\x20','\x22\x20to\x20new\x20project\x20\x22','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','💡\x20Tip:\x20Use\x20','MAX_TASKS_DISPLAY','Retrying\x20session...','showWorkflowConsoleUrl','GUTTER','msPerChar','modified','cancelRequested','skipValidation','MIN_TIMELINE_WIDTH','existingProjectId','\x20sessions\x20','yellow','🔄\x20','No\x20sessions\x20with\x20timing\x20information','join','dryRun','Getting\x20attempt\x20details...','limit','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Parameters:\x20','Output\x20directory:\x20','Total:\x20','sys','Cloning\x20to\x20','value','\x20task','Pattern:\x20','find','Start\x20a\x20workflow\x20run','Force:\x20yes','sessionId','download','running','Attempt\x20ID:\x20','\x20new','No\x20workflow\x20projects\x20found','path','icon','generateSessionTimelineRows','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','No\x20attempts\x20found','floor','message','\x20\x20Changes:\x20','Latest\x20session\x20has\x20no\x20attempt','✔\x20Clone\x20complete','ICON_WIDTH','newProjectId','Error:\x20Project\x20name\x20is\x20required','sessionTime','Dry\x20run:\x20yes','\x20workflow','pending','site','LABEL_MIN_SPACING','trim','newProjectName','values','deleted','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','From\x20task:\x20','targetDir','Using\x20attempt\x20','renderSingleTimeline','list','hasChanges','ICON_SPACING','\x20\x20Session\x20context\x20set\x20to:\x20','group_error','utf-8','session','write','60DctDDi','Source\x20project:\x20',',\x20Workflow:\x20','cwd','relative','Deleting\x20project\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','readFile','max','navigateSessionsInteractive','workflow:timeline','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x27...','resumeFrom','List\x20workflow\x20attempts','(use\x20--limit\x20to\x20see\x20more)','workflow:upload','✔\x20Workflow\x20project\x20context\x20cleared.','442881UUTFxg','\x20tasks','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','sourceDir','\x0aClone\x20\x22','10vCcauT','Project\x20directory:\x20','12754pFYLil','lastAttempt','Downloading\x20project\x20','Error:\x20Attempt\x20ID\x20is\x20required','all','columns','\x0a✔\x20Already\x20up\x20to\x20date','Show\x20tasks\x20for\x20an\x20attempt','workflow:projects','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','has','diff','No\x20matching\x20sessions\x20found','session_id','\x20\x20tdx\x20wf\x20use\x20<project>','Error:\x20','json','status','\x20\x20Console:\x20','done','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','format','Session\x20time:\x20','attempt:','red','No\x20workflow\x20tdx.json\x20found','logFiles','table','\x20\x20Location:\x20','/app/workflows/','Files\x20to\x20upload:\x20','\x20logs','length','workflow:clone','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','log','stdout','Show\x20specific\x20attempt\x20details','\x20\x20Session\x20ID:\x20','\x20\x20Files\x20extracted:\x20','Include\x20retried:\x20yes','\x22\x20with\x20new\x20revision?','fromTask','No\x20workflows\x20found\x20in\x20project:\x20','Auto-selected\x20latest\x20session:\x20','fill','param','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','cyan','✔\x20Pushed\x20','Select\x20a\x20session\x20to\x20view\x20timeline:','\x0aApply\x20these\x20changes?','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','run','Project\x20filter:\x20','Cancelled','\x0aDry\x20run\x20-\x20nothing\x20pushed','sourceProjectName','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Target:\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','name','dim','New\x20project\x20name:\x20','resolveProjectDir','substring','end','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','\x20has\x20no\x20attempts','type','match','parseProjectWorkflowPattern','30djbtfT','LABEL_WIDTH_DIVISOR','2211716cfnhIW','Select\x20a\x20workflow\x20to\x20run','parse','Pulling\x20project\x20','getMonth','map','jsonl','toISOString','Key:\x20','pollTimeline','Session\x20','padStart','123092vvrBnF','description','Task\x20name:\x20','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','blue','Writing\x20files...','555lYUXCY','\x20to\x20see\x20detailed\x20logs','Target\x20directory:\x20','requireProject','✔\x20New\x20project:\x20','title','renderTimeline','\x20deleted','Filter:\x20','execute','Retrying\x20attempt...','push','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','get','\x20secret','✔\x20Workflow\x20run\x20started','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','startedAt','1GiRpJd','TASK_NAME_WIDTH','projectId','\x20\x20Project\x20ID:\x20','MAX_POLL_ITERATIONS','follow','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','force','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','slice','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Reason:\x20','set','⚠\x20Showing\x20first\x20','✔\x20Push\x20complete','displayLine','\x20\x20Target:\x20','unchanged','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','getMinutes','Killing\x20attempt...','Fetching\x20log\x20files...','Loading\x20session...','error','workflowName','✔\x20Deleted\x20project\x20','output','No\x20attempts\x20found\x20in\x20project:\x20','workflow:sessions','indexOf','\x0aPolling...\x20(','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','workflow:logs','includeRetried','workflow:secrets:set','start','✔\x20Secret\x20\x27','stat','Project\x20name:\x20','Source\x20directory:\x20','localeCompare','Filter:\x20project=','green','No\x20sessions\x20found','\x0aDry\x20run\x20-\x20no\x20files\x20written','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','kill','resolveProjectId','Resolving\x20project\x20\x27','data','index','Pull\x20workflow\x20project\x20to\x20local\x20folder','session:','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','...','Project:\x20','stringify','Validation:\x20skipped','Invalid\x20format:\x20','startsWith','split','✔\x20Found\x20','MAX_TIMELINE_WIDTH','workflow:secrets:list','canceling','/attempt/','task','\x20-\x20','workflow:tasks','tdx.json','\x22\x20already\x20exists\x20(ID:\x20','summary','Source\x20directory\x20is\x20required','POLL_INTERVAL_MS','now','toLowerCase','No\x20workflow\x20sessions\x20found','workflow:push','splice','Key\x20cannot\x20be\x20empty','workflow:download','workflow:kill','\x0a✔\x20No\x20changes\x20to\x20push','sessions','workflowProject','\x20session','getDate','Loading\x20workflows...','Tip:\x20cd\x20to\x20workflows/','resolveProject','revision:\x20','No\x20sessions\x20found\x20in\x20project:\x20','executeCloneProject','Pushing\x20workflow\x20project...','round','Analyzing\x20project...','\x20attempt','\x20\x20Attempt\x20ID:\x20','text','new','buildTimelineData','key','durationMs','✔\x20Showing\x20','finishedAt','Including\x20subtasks:\x20yes','attemptId','getFullYear','Usage:\x20tdx\x20wf\x20use\x20<project>','applyPullProject','Error:','updatedAt','MIN_LABEL_COUNT','Setting\x20secret...','29538owiPlV','repeat','verbose','\x0aUpdate\x20existing\x20project\x20\x22','workflow','metadata','Workflow:\x20','\x20of\x20','\x20\x20Revision:\x20','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Session\x20not\x20found:\x20','workflow:pull','---\x20','total','Error:\x20Secret\x20key\x20is\x20required','from','\x1b[1A\x1b[2K','Revision:\x20','isTTY','\x0aPush\x20these\x20changes?','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','keys','resolve','size','Failed\x20to\x20fetch\x20attempt\x20data','fullName','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x20\x20Source:\x20','List\x20workflow\x20execution\x20sessions','window','filesExtracted','project','\x0a⚠\x20Project\x20\x22','includes','sort','getTime','Warning:','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','tdx\x20wf\x20attempt\x20','unknown','\x20modified'];a39_0x2f76=function(){return _0xe18944;};return a39_0x2f76();}function getTaskStateIcon(_0x32dcbd){const _0x520c1a={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x520c1a[_0x32dcbd]||'⚪';}function getBarChar(_0x5f0241){const _0x42c5e0=a39_0x1b0c43;return _0x5f0241===_0x42c5e0(0x280)||_0x5f0241===_0x42c5e0(0x1db)?'×':'─';}function getBarColor(_0x2ae4ea){const _0x348979=a39_0x1b0c43,_0x388e54={'success':a39_0x4049ae[_0x348979(0x293)],'error':a39_0x4049ae[_0x348979(0x213)],'group_error':a39_0x4049ae[_0x348979(0x213)],'running':a39_0x4049ae[_0x348979(0x255)],'blocked':a39_0x4049ae[_0x348979(0x1a2)],'planned':a39_0x4049ae[_0x348979(0x239)],'canceling':a39_0x4049ae['yellow']};return _0x388e54[_0x2ae4ea]||a39_0x4049ae['white'];}function a39_0x5863(_0x18ef02,_0x2ff721){_0x18ef02=_0x18ef02-0xfb;const _0x2f76f9=a39_0x2f76();let _0x5863e6=_0x2f76f9[_0x18ef02];return _0x5863e6;}function parseTaskName(_0x4ef752){const _0x3315d0=a39_0x1b0c43;let _0x20a1a3=_0x4ef752['replace'](/^\++/,'');const _0x201948=_0x20a1a3[_0x3315d0(0x2a5)]('+'),_0x5a4077=_0x201948[_0x3315d0(0x21b)]>0x1?_0x201948[_0x3315d0(0x21b)]-0x2:0x0,_0x20aa07=_0x201948[_0x201948['length']-0x1]||_0x20a1a3;return{'level':_0x5a4077,'name':'+'+_0x20aa07};}function truncateTaskName(_0x311b60,_0x2e84c2){const _0x12ce9f=a39_0x1b0c43,_0x29d725=stringWidth(_0x311b60);if(_0x29d725<=_0x2e84c2)return _0x311b60;let _0x2b41b9=_0x311b60;while(stringWidth(_0x2b41b9+'…')>_0x2e84c2&&_0x2b41b9['length']>0x0){_0x2b41b9=_0x2b41b9[_0x12ce9f(0x272)](0x0,-0x1);}return _0x2b41b9+'…';}function calculateTimeScale(_0x26f566,_0x23ba90){const _0x3bbae0=a39_0x1b0c43;return{'startTime':_0x26f566[_0x3bbae0(0x28c)],'endTime':_0x26f566['end'],'durationMs':_0x26f566['duration'],'msPerChar':_0x26f566['duration']/_0x23ba90};}function timeToPosition(_0x533c86,_0xce1df1,_0x369381){const _0xbd3d35=a39_0x1b0c43,_0xb54919=_0x533c86-_0xce1df1['startTime'],_0x4053c5=Math[_0xbd3d35(0x1c0)](_0xb54919/_0xce1df1[_0xbd3d35(0x19b)]);return Math[_0xbd3d35(0x1e7)](0x0,Math[_0xbd3d35(0x16a)](_0x4053c5,_0x369381));}function renderTimeAxis(_0x1f9a0c,_0x1163ac){const _0x1d18b3=a39_0x1b0c43,_0x3d5698=Math['min'](TIMELINE_CONFIG[_0x1d18b3(0x16b)],Math['max'](TIMELINE_CONFIG[_0x1d18b3(0x12c)],Math[_0x1d18b3(0x1c0)](_0x1163ac/TIMELINE_CONFIG[_0x1d18b3(0x244)]))),_0x10c5f0=_0x1f9a0c[_0x1d18b3(0x122)]/(_0x3d5698-0x1),_0x2df645=new Date(_0x1f9a0c['startTime']),_0x547b22=[];for(let _0xc085f=0x0;_0xc085f<_0x3d5698;_0xc085f++){const _0x57e1b2=_0x1f9a0c[_0x1d18b3(0x192)]+_0xc085f*_0x10c5f0,_0x12160a=timeToPosition(_0x57e1b2,_0x1f9a0c,_0x1163ac),_0x4d5977=formatTimestamp(_0x57e1b2,_0x2df645);_0x547b22['push']({'pos':_0x12160a,'text':_0x4d5977});}const _0x16a7bf=new Array(_0x1163ac)['fill']('\x20');let _0x4d8d5e=-0x1;for(const {pos:_0x478fc2,text:_0x2f443b}of _0x547b22){let _0x3eb54a=Math[_0x1d18b3(0x1e7)](0x0,_0x478fc2-Math[_0x1d18b3(0x1c0)](_0x2f443b[_0x1d18b3(0x21b)]/0x2));_0x3eb54a<=_0x4d8d5e+TIMELINE_CONFIG[_0x1d18b3(0x1cd)]&&(_0x3eb54a=_0x4d8d5e+TIMELINE_CONFIG[_0x1d18b3(0x1cd)]+0x1);_0x3eb54a+_0x2f443b[_0x1d18b3(0x21b)]>_0x1163ac&&(_0x3eb54a=_0x1163ac-_0x2f443b[_0x1d18b3(0x21b)]);if(_0x3eb54a>=0x0&&_0x3eb54a+_0x2f443b[_0x1d18b3(0x21b)]<=_0x1163ac&&_0x3eb54a>_0x4d8d5e){for(let _0x3d8488=0x0;_0x3d8488<_0x2f443b[_0x1d18b3(0x21b)];_0x3d8488++){_0x16a7bf[_0x3eb54a+_0x3d8488]=_0x2f443b[_0x3d8488];}_0x4d8d5e=_0x3eb54a+_0x2f443b[_0x1d18b3(0x21b)]-0x1;}}return _0x16a7bf['join']('');}function renderTaskRow(_0x3f54eb,_0xc0a407,_0x19cbbc,_0x51ba94){const _0x1159ba=a39_0x1b0c43,{level:_0x5e380d,name:_0x1d1537}=parseTaskName(_0x3f54eb[_0x1159ba(0x238)]),_0x3d8ea9='\x20'['repeat'](_0x5e380d),_0x43168e=_0x3f54eb[_0x1159ba(0x14b)]?'('+formatElapsed(_0x3f54eb['window'][_0x1159ba(0x15d)])+')':'',_0x1f0ed0=stringWidth(_0x43168e),_0x48d495=_0x5e380d*0x1,_0x354ccc=_0x51ba94-_0x48d495-_0x1f0ed0-0x1,_0x504a81=truncateTaskName(_0x1d1537,_0x354ccc),_0xe8406c=_0x3d8ea9+_0x504a81,_0x3ed3f8=stringWidth(_0xe8406c),_0x45042c=_0x51ba94-_0x3ed3f8-_0x1f0ed0,_0x25a8cc=_0xe8406c+'\x20'[_0x1159ba(0x12f)](Math[_0x1159ba(0x1e7)](0x1,_0x45042c))+a39_0x4049ae[_0x1159ba(0x239)](_0x43168e),_0x134b2=getTaskStateIcon(_0x3f54eb['state']),_0xb4d2dc=new Array(_0x19cbbc)[_0x1159ba(0x228)]('\x20');if(_0x3f54eb[_0x1159ba(0x14b)]){const _0x3c3972=timeToPosition(_0x3f54eb['window']['start'],_0xc0a407,_0x19cbbc),_0xc139d0=timeToPosition(_0x3f54eb[_0x1159ba(0x14b)][_0x1159ba(0x23d)],_0xc0a407,_0x19cbbc),_0x4040f0=getBarChar(_0x3f54eb[_0x1159ba(0x166)]),_0x597260=Math[_0x1159ba(0x1e7)](_0x3c3972+0x1,_0xc139d0);for(let _0x281cf4=_0x3c3972;_0x281cf4<Math[_0x1159ba(0x16a)](_0x597260,_0x19cbbc);_0x281cf4++){_0xb4d2dc[_0x281cf4]=_0x4040f0;}}const _0x55feee=getBarColor(_0x3f54eb[_0x1159ba(0x166)]),_0x2e5201=_0xb4d2dc[_0x1159ba(0x24a)](_0x1cb33d=>_0x1cb33d==='\x20'?'\x20':_0x55feee(_0x1cb33d))[_0x1159ba(0x1a5)]('');return _0x134b2+'\x20'+_0x25a8cc+'│'+_0x2e5201+'│';}function calculateStats(_0xbcb12f){const _0x3f17be=a39_0x1b0c43,_0x84bdfb={'total':_0xbcb12f[_0x3f17be(0x21b)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x5969d6 of _0xbcb12f){if(_0x5969d6[_0x3f17be(0x166)]==='success')_0x84bdfb['success']++;else{if(_0x5969d6[_0x3f17be(0x166)]==='error'||_0x5969d6[_0x3f17be(0x166)]==='group_error')_0x84bdfb['error']++;else _0x5969d6['state']===_0x3f17be(0x1b7)?_0x84bdfb[_0x3f17be(0x1b7)]++:_0x84bdfb[_0x3f17be(0x1cb)]++;}}return _0x84bdfb;}function formatStats(_0x31a020){const _0x1e0078=a39_0x1b0c43;return[_0x1e0078(0x1ac)+_0x31a020[_0x1e0078(0x13b)],'✅\x20'+_0x31a020[_0x1e0078(0x182)],'❌\x20'+_0x31a020[_0x1e0078(0x280)],_0x1e0078(0x1a3)+_0x31a020[_0x1e0078(0x1b7)],'⏳\x20'+_0x31a020['pending']]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a39_0x1b0c43(0x238)]=a39_0x1b0c43(0x1e9);[a39_0x1b0c43(0x252)]=a39_0x1b0c43(0x1f6);async[a39_0x1b0c43(0x260)](_0x453a77){const _0x37a4af=a39_0x1b0c43,{options:_0x229df2,args:_0x471888,tdx:_0x14d276}=_0x453a77;let _0x588fb8,_0x227a48,_0x42ba7c=![];if(_0x471888[0x0]){if(_0x471888[0x0][_0x37a4af(0x14f)]('.')){const _0x3f43d7=this[_0x37a4af(0x242)](_0x471888,_0x229df2);if(!_0x3f43d7)return 0x1;_0x588fb8=_0x3f43d7['projectName'],_0x227a48=_0x3f43d7[_0x37a4af(0x281)];}else{_0x227a48=_0x471888[0x0],_0x588fb8=_0x229df2[_0x37a4af(0x110)];if(!_0x588fb8)return console[_0x37a4af(0x280)](a39_0x4049ae['red'](_0x37a4af(0x12a)),_0x37a4af(0x296)),0x1;_0x42ba7c=!![];}}else{const _0x5e4551=this[_0x37a4af(0x242)](_0x471888,_0x229df2);if(!_0x5e4551)return 0x1;_0x588fb8=_0x5e4551[_0x37a4af(0x183)],_0x227a48=_0x5e4551[_0x37a4af(0x281)];}if(_0x229df2[_0x37a4af(0x130)]){if(_0x588fb8&&_0x227a48)console[_0x37a4af(0x280)](_0x37a4af(0x25f)+_0x588fb8+'.'+_0x227a48);else _0x588fb8&&console[_0x37a4af(0x280)](_0x37a4af(0x292)+_0x588fb8);}const _0x3bb13b=_0x229df2[_0x37a4af(0x126)],_0xbd2c29=_0x229df2[_0x37a4af(0x1b5)];if(_0x3bb13b){_0xbd2c29&&console[_0x37a4af(0x280)](a39_0x4049ae[_0x37a4af(0x1a2)](_0x37a4af(0x152)),_0x37a4af(0x1a9));const _0x5d4d47=_0x229df2['follow'];return _0x5d4d47?await this['pollTimeline'](_0x453a77,_0x3bb13b):await this[_0x37a4af(0x1d6)](_0x453a77,_0x3bb13b,_0x229df2),0x0;}if(_0xbd2c29){const _0x4ec90f=await withSpinner(_0x37a4af(0x27f),()=>_0x14d276['workflow'][_0x37a4af(0x10f)]({'projectName':_0x588fb8,'workflowName':_0x227a48,'limit':0x64}),{'verbose':_0x229df2['verbose']}),_0x51fcbf=_0x4ec90f[_0x37a4af(0x29a)][_0x37a4af(0x1b2)](_0x2e652c=>_0x2e652c['id']===_0xbd2c29);if(!_0x51fcbf)return console[_0x37a4af(0x280)](a39_0x4049ae[_0x37a4af(0x213)](_0x37a4af(0x12a)),_0x37a4af(0x138)+_0xbd2c29),0x1;if(!_0x51fcbf[_0x37a4af(0x1fc)]?.['id'])return console[_0x37a4af(0x280)](a39_0x4049ae[_0x37a4af(0x213)]('Error:'),_0x37a4af(0x24f)+_0xbd2c29+_0x37a4af(0x23f)),0x1;const _0x22f88f=_0x51fcbf[_0x37a4af(0x1fc)]['id'];_0x229df2[_0x37a4af(0x130)]&&console[_0x37a4af(0x280)](_0x37a4af(0x1d5)+_0x22f88f+'\x20from\x20session\x20'+_0xbd2c29);const _0x30ddf3=_0x229df2[_0x37a4af(0x26e)];return _0x30ddf3?await this['pollTimeline'](_0x453a77,_0x22f88f):await this[_0x37a4af(0x1d6)](_0x453a77,_0x22f88f,_0x229df2),0x0;}const _0x194222=await withSpinner('Loading\x20sessions...',()=>_0x14d276['workflow']['sessions']({'projectName':_0x588fb8,'workflowName':_0x227a48,'limit':_0x229df2[_0x37a4af(0x1a8)]||0x32}),{'verbose':_0x229df2[_0x37a4af(0x130)]}),_0x45b93d=_0x194222[_0x37a4af(0x29a)];if(_0x45b93d[_0x37a4af(0x21b)]===0x0){if(_0x588fb8&&_0x227a48)console['error'](_0x37a4af(0x164)+_0x588fb8+'.'+_0x227a48);else _0x588fb8?console[_0x37a4af(0x280)](_0x37a4af(0x117)+_0x588fb8):(console[_0x37a4af(0x280)](_0x37a4af(0x108)),console['error'](a39_0x4049ae[_0x37a4af(0x239)](_0x37a4af(0x20f))));return 0x0;}_0x45b93d[_0x37a4af(0x150)]((_0x15380c,_0x515b4a)=>{const _0x595ee5=_0x37a4af,_0x557c39=_0x15380c[_0x595ee5(0x1c8)]||'',_0x1f14a3=_0x515b4a[_0x595ee5(0x1c8)]||'';return _0x1f14a3[_0x595ee5(0x291)](_0x557c39);});if(_0x229df2[_0x37a4af(0x20b)]||_0x229df2[_0x37a4af(0x24b)])return await handleSDKOutput(_0x45b93d,_0x229df2),0x0;let _0x55bbf1;if(_0x42ba7c){const _0x3f19be=_0x45b93d[0x0];if(!_0x3f19be[_0x37a4af(0x1fc)]?.['id'])return console[_0x37a4af(0x280)](_0x37a4af(0x1c3)),0x0;_0x55bbf1=_0x3f19be[_0x37a4af(0x1fc)]['id'],_0x229df2[_0x37a4af(0x130)]&&console[_0x37a4af(0x280)](_0x37a4af(0x227)+_0x3f19be[_0x37a4af(0x1c8)]);}else{const _0x4008b6=_0x45b93d[_0x37a4af(0x24a)](_0x515fe2=>{const _0x3ab1ce=_0x37a4af,_0x2139ea=getAttemptStatusDisplay(_0x515fe2[_0x3ab1ce(0x1fc)]);return{'title':_0x515fe2['project']?.[_0x3ab1ce(0x238)]+'.'+_0x515fe2[_0x3ab1ce(0x132)]?.['name']+_0x3ab1ce(0xff)+_0x515fe2[_0x3ab1ce(0x1c8)]+'\x20'+_0x2139ea[_0x3ab1ce(0x1bc)],'value':_0x515fe2[_0x3ab1ce(0x1fc)]?.['id']||'','description':_0x2139ea[_0x3ab1ce(0x11e)]};}),_0xb3b48a=await a39_0x4a9c7f({'type':_0x37a4af(0x170),'name':_0x37a4af(0x126),'message':_0x37a4af(0x22d),'choices':_0x4008b6['filter'](_0x1d4296=>_0x1d4296[_0x37a4af(0x1af)]!=='')});if(!_0xb3b48a[_0x37a4af(0x126)])return 0x0;_0x55bbf1=_0xb3b48a['attemptId'];}const _0xc42142=_0x229df2[_0x37a4af(0x26e)];return _0xc42142?await this[_0x37a4af(0x24e)](_0x453a77,_0x55bbf1):await this[_0x37a4af(0x1d6)](_0x453a77,_0x55bbf1,_0x229df2),0x0;}async['renderSingleTimeline'](_0xaceeaa,_0x291fb7,_0x3499f7){const _0x158b70=a39_0x1b0c43,{tdx:_0x23a11e}=_0xaceeaa;let _0x17381f,_0x35bed9;try{[_0x17381f,_0x35bed9]=await Promise[_0x158b70(0x1ff)]([_0x23a11e[_0x158b70(0x132)]['attempt'](_0x291fb7),_0x23a11e[_0x158b70(0x132)][_0x158b70(0x159)](_0x291fb7,![])]);}catch(_0x2c54f9){console[_0x158b70(0x280)](a39_0x4049ae[_0x158b70(0x213)](_0x158b70(0x146)));_0x3499f7['verbose']&&console['error'](_0x2c54f9);throw _0x2c54f9;}if(_0x3499f7[_0x158b70(0x20b)]||_0x3499f7['jsonl']){const _0x1ac42d=this[_0x158b70(0x120)](_0x17381f,_0x35bed9);await handleSDKOutput([_0x1ac42d],_0x3499f7);return;}const _0x24fe61=_0x23a11e['context'][_0x158b70(0x1cc)],_0x342a09=this['renderTimeline'](_0x17381f,_0x35bed9,_0x24fe61);console[_0x158b70(0x21e)](_0x342a09);}async[a39_0x1b0c43(0x24e)](_0x525295,_0x542786){const _0x40d5c4=a39_0x1b0c43,{tdx:_0x2935de}=_0x525295,_0x4a50a8=TIMELINE_CONFIG[_0x40d5c4(0x105)],_0x3c573a=TIMELINE_CONFIG[_0x40d5c4(0x26d)];let _0x1318cb=0x0;while(_0x1318cb<_0x3c573a){process[_0x40d5c4(0x21f)][_0x40d5c4(0x140)]&&process['stdout'][_0x40d5c4(0x1de)]('\x1bc');let _0x40ac40,_0x31fec2;try{[_0x40ac40,_0x31fec2]=await Promise[_0x40d5c4(0x1ff)]([_0x2935de['workflow'][_0x40d5c4(0x17e)](_0x542786),_0x2935de[_0x40d5c4(0x132)][_0x40d5c4(0x159)](_0x542786,![])]);}catch(_0x592b5c){console[_0x40d5c4(0x280)](a39_0x4049ae[_0x40d5c4(0x213)](_0x40d5c4(0x137)));_0x1318cb>0x0&&console[_0x40d5c4(0x280)](a39_0x4049ae[_0x40d5c4(0x239)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x1318cb));throw _0x592b5c;}const _0xcb7327=_0x2935de['context'][_0x40d5c4(0x1cc)],_0x2a18b4=this[_0x40d5c4(0x25d)](_0x40ac40,_0x31fec2,_0xcb7327);console['log'](_0x2a18b4);const _0x57abc1=_0x40ac40[_0x40d5c4(0x20e)]&&_0x31fec2[_0x40d5c4(0x172)](_0xe35bd6=>_0xe35bd6[_0x40d5c4(0x166)]!==_0x40d5c4(0x1b7)&&_0xe35bd6[_0x40d5c4(0x166)]!==_0x40d5c4(0x179));if(_0x57abc1){console['error'](a39_0x4049ae['green']('\x0a✔\x20Attempt\x20complete'));break;}console[_0x40d5c4(0x280)](a39_0x4049ae[_0x40d5c4(0x239)](_0x40d5c4(0x287)+_0x1318cb*0x2+_0x40d5c4(0x195))),await new Promise(_0x100d63=>setTimeout(_0x100d63,_0x4a50a8)),_0x1318cb++;}_0x1318cb>=_0x3c573a&&console[_0x40d5c4(0x280)](a39_0x4049ae[_0x40d5c4(0x1a2)](_0x40d5c4(0x22a)));}[a39_0x1b0c43(0x25d)](_0x19aea4,_0x3fecc8,_0x1a45bf){const _0x1d10f2=a39_0x1b0c43,_0x39e84d=[],_0x53653b=TIMELINE_CONFIG[_0x1d10f2(0x26a)],_0x3811e9=0x5,_0x3a2d17=process[_0x1d10f2(0x21f)][_0x1d10f2(0x200)]||0x78,_0x2c09ed=_0x3a2d17-_0x53653b-_0x3811e9,_0x238a52=Math[_0x1d10f2(0x1e7)](TIMELINE_CONFIG[_0x1d10f2(0x19f)],Math['min'](_0x2c09ed,TIMELINE_CONFIG[_0x1d10f2(0x2a7)])),_0x5f184d=new Date(_0x19aea4[_0x1d10f2(0x17f)])[_0x1d10f2(0x151)](),_0x396337=_0x19aea4[_0x1d10f2(0x124)]?new Date(_0x19aea4[_0x1d10f2(0x124)])[_0x1d10f2(0x151)]():Date[_0x1d10f2(0x106)](),_0x5008be={'start':_0x5f184d,'end':_0x396337,'duration':_0x396337-_0x5f184d},_0x4873b7=new Map(),_0x459325=[];for(const _0x4f52be of _0x3fecc8){if(_0x4f52be[_0x1d10f2(0x268)]){const _0x4d400b=new Date(_0x4f52be['startedAt'])[_0x1d10f2(0x151)](),_0x22636e=_0x4f52be[_0x1d10f2(0x12b)]?new Date(_0x4f52be[_0x1d10f2(0x12b)])[_0x1d10f2(0x151)]():Date[_0x1d10f2(0x106)](),_0x540862={'start':_0x4d400b,'end':_0x22636e,'duration':_0x22636e-_0x4d400b};_0x4873b7[_0x1d10f2(0x275)](_0x4f52be['id'],_0x540862),_0x459325[_0x1d10f2(0x262)]({'name':_0x4f52be[_0x1d10f2(0x147)],'state':_0x4f52be[_0x1d10f2(0x166)]||_0x1d10f2(0x155),'window':_0x540862});}else _0x459325['push']({'name':_0x4f52be['fullName'],'state':_0x4f52be[_0x1d10f2(0x166)]||_0x1d10f2(0x179),'window':undefined});}_0x459325[_0x1d10f2(0x150)]((_0x1c059a,_0x498f88)=>{const _0x114ad4=_0x1d10f2;if(!_0x1c059a[_0x114ad4(0x14b)])return 0x1;if(!_0x498f88[_0x114ad4(0x14b)])return-0x1;return _0x1c059a[_0x114ad4(0x14b)][_0x114ad4(0x28c)]-_0x498f88[_0x114ad4(0x14b)]['start'];});const _0x691445=_0x459325[_0x1d10f2(0x21b)],_0x123716=_0x691445>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x123716&&_0x459325[_0x1d10f2(0x10a)](TIMELINE_CONFIG[_0x1d10f2(0x197)]);const _0x10f748=calculateTimeScale(_0x5008be,_0x238a52),_0x388240=_0x19aea4['done']?_0x19aea4[_0x1d10f2(0x182)]?a39_0x4049ae[_0x1d10f2(0x293)](_0x1d10f2(0x182)):a39_0x4049ae['red'](_0x1d10f2(0x280)):a39_0x4049ae[_0x1d10f2(0x255)](_0x1d10f2(0x1b7)),_0x224de3=_0x19aea4[_0x1d10f2(0x14d)]?.['id'],_0x22247e=_0x19aea4[_0x1d10f2(0x1b5)];let _0x2b6dba;if(_0x224de3&&_0x22247e){const _0x57336f=getWorkflowAttemptUrl(_0x1a45bf,_0x224de3,_0x22247e,_0x19aea4['id']);_0x2b6dba=hyperlink(a39_0x4049ae['dim'](_0x19aea4['id']),_0x57336f);}else _0x2b6dba=a39_0x4049ae[_0x1d10f2(0x239)](_0x19aea4['id']);_0x39e84d[_0x1d10f2(0x262)]('Attempt:\x20'+_0x2b6dba+_0x1d10f2(0xff)+_0x388240+_0x1d10f2(0xff)+formatElapsed(_0x5008be[_0x1d10f2(0x15d)]));if(_0x459325['length']>0x0){const _0x61ad9d=renderTimeAxis(_0x10f748,_0x238a52),_0x176432=new Date(_0x5008be['start']),_0x729f03=formatDate(_0x176432),_0x1d7753=TIMELINE_CONFIG[_0x1d10f2(0x1c5)]+TIMELINE_CONFIG[_0x1d10f2(0x1d9)]+_0x53653b,_0xc7a465=_0x729f03['padStart'](_0x1d7753),_0x2020f5=a39_0x4049ae['dim'](_0xc7a465);_0x39e84d['push'](_0x2020f5+'\x20'+_0x61ad9d);for(const _0x51eea8 of _0x459325){_0x39e84d[_0x1d10f2(0x262)](renderTaskRow(_0x51eea8,_0x10f748,_0x238a52,_0x53653b));}const _0x3cb61f=calculateStats(_0x459325);_0x39e84d[_0x1d10f2(0x262)](formatStats(_0x3cb61f)),_0x123716&&_0x39e84d[_0x1d10f2(0x262)](a39_0x4049ae[_0x1d10f2(0x1a2)](_0x1d10f2(0x276)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x1d10f2(0x135)+_0x691445+_0x1d10f2(0x1f3))),_0x39e84d[_0x1d10f2(0x262)](''),_0x39e84d[_0x1d10f2(0x262)](a39_0x4049ae[_0x1d10f2(0x239)](_0x1d10f2(0x196))+(_0x1d10f2(0x154)+_0x19aea4['id']+_0x1d10f2(0x21a))+a39_0x4049ae[_0x1d10f2(0x239)](_0x1d10f2(0x258)));}else _0x39e84d[_0x1d10f2(0x262)](_0x1d10f2(0x29e));return _0x39e84d[_0x1d10f2(0x1a5)]('\x0a');}[a39_0x1b0c43(0x120)](_0x5be960,_0x55fca3){const _0x549a4c=a39_0x1b0c43,_0x20e56f=new Date(_0x5be960[_0x549a4c(0x17f)])[_0x549a4c(0x151)](),_0x268d21=_0x5be960[_0x549a4c(0x124)]?new Date(_0x5be960[_0x549a4c(0x124)])[_0x549a4c(0x151)]():Date['now'](),_0x31d052=_0x268d21-_0x20e56f,_0x28fb9c=[];for(const _0x3d0f34 of _0x55fca3){if(_0x3d0f34['startedAt']){const _0x4a941b=new Date(_0x3d0f34['startedAt'])[_0x549a4c(0x151)](),_0x35b5b2=_0x3d0f34[_0x549a4c(0x12b)]?new Date(_0x3d0f34[_0x549a4c(0x12b)])[_0x549a4c(0x151)]():Date[_0x549a4c(0x106)]();_0x28fb9c[_0x549a4c(0x262)]({'name':_0x3d0f34[_0x549a4c(0x147)],'state':_0x3d0f34[_0x549a4c(0x166)]||_0x549a4c(0x155),'window':{'start':_0x4a941b,'end':_0x35b5b2,'duration':_0x35b5b2-_0x4a941b}});}else _0x28fb9c[_0x549a4c(0x262)]({'name':_0x3d0f34[_0x549a4c(0x147)],'state':_0x3d0f34[_0x549a4c(0x166)]||_0x549a4c(0x179),'window':undefined});}const _0x43bf4f=calculateStats(_0x28fb9c);return{'attempt':{'id':_0x5be960['id'],'status':_0x5be960[_0x549a4c(0x20e)]?_0x5be960[_0x549a4c(0x182)]?_0x549a4c(0x182):_0x549a4c(0x280):_0x549a4c(0x1b7),'createdAt':_0x5be960[_0x549a4c(0x17f)],'finishedAt':_0x5be960['finishedAt'],'duration_ms':_0x31d052},'tasks':_0x28fb9c['map'](_0x73fae2=>({'name':_0x73fae2[_0x549a4c(0x238)],'state':_0x73fae2['state'],'startedAt':_0x73fae2[_0x549a4c(0x14b)]?new Date(_0x73fae2['window'][_0x549a4c(0x28c)])[_0x549a4c(0x24c)]():null,'updatedAt':_0x73fae2['window']?new Date(_0x73fae2['window'][_0x549a4c(0x23d)])[_0x549a4c(0x24c)]():null,'duration_ms':_0x73fae2[_0x549a4c(0x14b)]?.[_0x549a4c(0x15d)]||null})),'stats':_0x43bf4f};}}
1
+ const a41_0x50f62=a41_0x5857;(function(_0x51964c,_0x1eba99){const _0x5c237d=a41_0x5857,_0x1722f9=_0x51964c();while(!![]){try{const _0x4e6a8d=-parseInt(_0x5c237d(0x159))/0x1*(parseInt(_0x5c237d(0x2b0))/0x2)+-parseInt(_0x5c237d(0x24a))/0x3+-parseInt(_0x5c237d(0x203))/0x4+-parseInt(_0x5c237d(0x208))/0x5+-parseInt(_0x5c237d(0x1a6))/0x6+-parseInt(_0x5c237d(0x21b))/0x7+parseInt(_0x5c237d(0x2a0))/0x8;if(_0x4e6a8d===_0x1eba99)break;else _0x1722f9['push'](_0x1722f9['shift']());}catch(_0x568dcf){_0x1722f9['push'](_0x1722f9['shift']());}}}(a41_0x138c,0x64417));import a41_0x536097 from'chalk';import{existsSync}from'fs';import a41_0x149b54 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 a41_0x3c8366 from'prompts';function getAttemptStatusDisplay(_0x41021d){const _0x29ea64=a41_0x5857;if(!_0x41021d)return{'icon':'⏳','text':''};const {done:_0x458bff,success:_0x3d02ee,cancelRequested:_0x3888af}=_0x41021d;if(!_0x458bff)return _0x3888af?{'icon':'🛑','text':a41_0x536097[_0x29ea64(0x13f)](_0x29ea64(0x2b3))}:{'icon':'🔄','text':a41_0x536097[_0x29ea64(0x222)](_0x29ea64(0x16b))};if(_0x3d02ee)return{'icon':'✅','text':a41_0x536097['green'](_0x29ea64(0x285))};return{'icon':'❌','text':a41_0x536097[_0x29ea64(0x1bc)](_0x29ea64(0x1f1))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x55e58b,_0x13dc55,_0x293db8=0x0){const _0x7d2131=a41_0x5857;return _0x55e58b[_0x293db8]||_0x13dc55[_0x7d2131(0x247)];}[a41_0x50f62(0x1e9)](_0x129b8f,_0x37c56a,_0x2f6a18=0x0){const _0x4fe650=a41_0x50f62,_0x2e027d=this[_0x4fe650(0x19d)](_0x129b8f,_0x37c56a,_0x2f6a18);if(!_0x2e027d)return console[_0x4fe650(0x1f1)](a41_0x536097[_0x4fe650(0x1bc)](_0x4fe650(0x15c)),_0x4fe650(0x2be)),console[_0x4fe650(0x1f1)](a41_0x536097['dim'](_0x4fe650(0x18e))),null;return _0x2e027d;}['parseProjectWorkflowPattern'](_0x28fbd7,_0xaac454){const _0x3e5747=a41_0x50f62;if(_0x28fbd7[0x0]){const _0x51dca7=_0x28fbd7[0x0][_0x3e5747(0x281)]('.');if(_0x51dca7[_0x3e5747(0x21c)]===0x1)return{'projectName':_0x51dca7[0x0],'workflowName':undefined};else return _0x51dca7[_0x3e5747(0x21c)]===0x2?{'projectName':_0x51dca7[0x0],'workflowName':_0x51dca7[0x1]}:(console['error'](a41_0x536097[_0x3e5747(0x1bc)](_0x3e5747(0x15c)),_0x3e5747(0x1bb)),null);}return{'projectName':_0xaac454[_0x3e5747(0x247)],'workflowName':undefined};}[a41_0x50f62(0x1ca)](_0x55e156,_0x22e9d2,_0x14b41f=0x0){const _0x51ea29=a41_0x50f62;if(_0x55e156[_0x14b41f])return _0x55e156[_0x14b41f];if(_0x22e9d2[_0x51ea29(0x247)]){const _0x5ce295=a41_0x149b54[_0x51ea29(0x1f5)](process[_0x51ea29(0x15f)](),_0x51ea29(0x27a),_0x22e9d2[_0x51ea29(0x247)]);if(existsSync(a41_0x149b54[_0x51ea29(0x1f5)](_0x5ce295,_0x51ea29(0x167))))return _0x5ce295;}return undefined;}async[a41_0x50f62(0x2a6)](_0x4227ea,_0x375a90,_0x3ed17f){const _0x5d3ac9=a41_0x50f62;try{const _0x44e63b=await _0x4227ea['workflow'][_0x5d3ac9(0x27a)](_0x375a90,{'limit':0x1});if(_0x44e63b[_0x5d3ac9(0x21c)]>0x0){const _0x99df1f=_0x44e63b[0x0]['id'],_0xd3d808=getWorkflowUrl(_0x3ed17f,_0x99df1f);console[_0x5d3ac9(0x1f1)](_0x5d3ac9(0x126)+a41_0x536097[_0x5d3ac9(0x21f)](_0xd3d808));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x177);[a41_0x50f62(0x19c)]=a41_0x50f62(0x22f);async['execute'](_0x34976f){const _0x4986e6=a41_0x50f62,{options:_0xa6c86b,args:_0x1767fb,tdx:_0x337ba4}=_0x34976f,_0x3a66fb=_0x1767fb[0x0],_0x507d30=_0xa6c86b[_0x4986e6(0x143)];if(_0x507d30)return saveSessionContext({'workflow_project':undefined},_0xa6c86b['session']),console[_0x4986e6(0x197)](a41_0x536097[_0x4986e6(0x26c)](_0x4986e6(0x161))),0x0;if(!_0x3a66fb)return console[_0x4986e6(0x1f1)](a41_0x536097[_0x4986e6(0x1bc)](_0x4986e6(0x15c)),_0x4986e6(0x2be)),console['error'](a41_0x536097[_0x4986e6(0x1be)](_0x4986e6(0x26b))),console[_0x4986e6(0x1f1)](a41_0x536097[_0x4986e6(0x1be)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x5f306f=await withSpinner('Resolving\x20project\x20\x27'+_0x3a66fb+_0x4986e6(0x123),()=>_0x337ba4[_0x4986e6(0x278)]['resolveProjectId'](_0x3a66fb),{'verbose':_0xa6c86b[_0x4986e6(0x146)]}),{name:_0x392ea6}=_0x5f306f['data'];return saveSessionContext({'workflow_project':_0x392ea6},_0xa6c86b[_0x4986e6(0x1ab)]),console['log'](a41_0x536097['green'](_0x4986e6(0x2c2)+a41_0x536097[_0x4986e6(0x21f)](_0x392ea6))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x174);[a41_0x50f62(0x19c)]=a41_0x50f62(0x277);async[a41_0x50f62(0x22e)](_0x1fc9e5){const _0x3761d7=a41_0x50f62,{options:_0x1feb15,args:_0x393859,tdx:_0x5e9f78}=_0x1fc9e5,_0x10ee48=_0x393859[0x0];_0x1feb15[_0x3761d7(0x146)]&&_0x10ee48&&console[_0x3761d7(0x1f1)]('Pattern:\x20'+_0x10ee48);const _0xcb5ed9=await withSpinner(_0x3761d7(0x11d),()=>_0x5e9f78[_0x3761d7(0x278)]['projects'](_0x10ee48,{'limit':_0x1feb15['limit']}),{'verbose':_0x1feb15[_0x3761d7(0x146)]});let _0x50f8f6=_0xcb5ed9[_0x3761d7(0x217)];_0x50f8f6['sort']((_0x523bdc,_0x29f526)=>_0x523bdc[_0x3761d7(0x1ea)][_0x3761d7(0x1c5)](_0x29f526[_0x3761d7(0x1ea)]));const _0x58dcba=_0x1feb15[_0x3761d7(0x1a9)]||0x64,_0x455223=_0x50f8f6['length']>=_0x58dcba?a41_0x536097['dim'](_0x3761d7(0x241)):'';console[_0x3761d7(0x1f1)](_0x3761d7(0x1ee)+_0x50f8f6[_0x3761d7(0x21c)]+_0x3761d7(0x14b)+(_0x50f8f6['length']!==0x1?'s':'')+_0x455223);if(_0x1feb15['format']===_0x3761d7(0x23c)||_0x1feb15[_0x3761d7(0x125)]===_0x3761d7(0x13c)||_0x1feb15[_0x3761d7(0x125)]===_0x3761d7(0x19b))await handleSDKOutput(_0x50f8f6,_0x1feb15);else{if(_0x50f8f6[_0x3761d7(0x21c)]===0x0)_0x10ee48?console[_0x3761d7(0x197)](_0x3761d7(0x215)+_0x10ee48):console[_0x3761d7(0x197)](_0x3761d7(0x120));else{const _0x5bfa2f=_0x50f8f6[_0x3761d7(0x249)](_0x4e9a1c=>{const _0x1483d6=_0x3761d7,_0x29c258=_0x4e9a1c[_0x1483d6(0x1ed)]?.[_0x1483d6(0x22d)](_0xcc3211=>_0xcc3211[_0x1483d6(0x13d)]===_0x1483d6(0x25a)),_0x4f163e=_0x29c258?a41_0x536097[_0x1483d6(0x1be)](_0x1483d6(0x27b)):'';return _0x1483d6(0x122)+_0x4e9a1c['name']+_0x4f163e;});await writeOutput(_0x5bfa2f[_0x3761d7(0x1f5)]('\x0a'),_0x1feb15[_0x3761d7(0x1d1)],_0x3761d7(0x1a7));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a41_0x50f62(0x1ea)]='workflow:workflows';['description']=a41_0x50f62(0x133);async[a41_0x50f62(0x22e)](_0x14dc44){const _0x3445cd=a41_0x50f62,{options:_0x21e28b,args:_0x1af475,tdx:_0x148089}=_0x14dc44,_0x2099af=this['resolveProject'](_0x1af475,_0x21e28b);_0x21e28b[_0x3445cd(0x146)]&&_0x2099af&&console[_0x3445cd(0x1f1)](_0x3445cd(0x13a)+_0x2099af);const _0x164582=await withSpinner(_0x3445cd(0x1db),()=>_0x148089[_0x3445cd(0x278)][_0x3445cd(0x27a)](_0x2099af,{'limit':_0x21e28b['limit']}),{'verbose':_0x21e28b[_0x3445cd(0x146)]});let _0x2afc82=_0x164582[_0x3445cd(0x217)];_0x2afc82['sort']((_0x245025,_0x27bb53)=>{const _0x476a1c=_0x3445cd,_0x4dc89b=_0x245025[_0x476a1c(0x1ea)][_0x476a1c(0x1c5)](_0x27bb53[_0x476a1c(0x1ea)]);if(_0x4dc89b!==0x0)return _0x4dc89b;return(_0x245025[_0x476a1c(0x14f)]?.[_0x476a1c(0x1ea)]||'')[_0x476a1c(0x1c5)](_0x27bb53[_0x476a1c(0x14f)]?.[_0x476a1c(0x1ea)]||'');});const _0x35b514=_0x21e28b[_0x3445cd(0x1a9)]||0x64,_0x49aaef=_0x2afc82[_0x3445cd(0x21c)]>=_0x35b514?a41_0x536097[_0x3445cd(0x1be)](_0x3445cd(0x241)):'';console[_0x3445cd(0x1f1)](_0x3445cd(0x1ee)+_0x2afc82[_0x3445cd(0x21c)]+_0x3445cd(0x156)+(_0x2afc82[_0x3445cd(0x21c)]!==0x1?'s':'')+_0x49aaef);if(_0x21e28b[_0x3445cd(0x125)]==='json'||_0x21e28b[_0x3445cd(0x125)]===_0x3445cd(0x13c)||_0x21e28b[_0x3445cd(0x125)]===_0x3445cd(0x19b))await handleSDKOutput(_0x2afc82,_0x21e28b);else{if(_0x2afc82[_0x3445cd(0x21c)]===0x0)_0x2099af?console[_0x3445cd(0x197)](_0x3445cd(0x248)+_0x2099af):console[_0x3445cd(0x197)](_0x3445cd(0x24e));else{const _0x3d654f=_0x21e28b[_0x3445cd(0x17b)],_0x444fed=_0x2afc82[_0x3445cd(0x249)](_0x5399ca=>{const _0x1297c6=_0x3445cd,_0x4b84ff=a41_0x536097[_0x1297c6(0x1be)]('#'+_0x5399ca['id']),_0x5da45d=hyperlink(_0x4b84ff,getWorkflowUrl(_0x3d654f,_0x5399ca['id'])),_0x5a5380=_0x5399ca[_0x1297c6(0x14f)]?.[_0x1297c6(0x1ea)]?a41_0x536097['dim']('\x20('+_0x5399ca[_0x1297c6(0x14f)][_0x1297c6(0x1ea)]+')'):'';return _0x1297c6(0x2b2)+_0x5da45d+'\x20'+_0x5399ca[_0x1297c6(0x1ea)]+_0x5a5380;});await writeOutput(_0x444fed[_0x3445cd(0x1f5)]('\x0a'),_0x21e28b['output'],_0x3445cd(0x1a7));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x163);[a41_0x50f62(0x19c)]=a41_0x50f62(0x227);async[a41_0x50f62(0x22e)](_0x4f4cb3){const _0x522b32=a41_0x50f62,{options:_0x1f1c57,args:_0x279642,tdx:_0x5e2951}=_0x4f4cb3,_0x499bc8=this['parseProjectWorkflowPattern'](_0x279642,_0x1f1c57);if(!_0x499bc8)return 0x1;const {projectName:_0x5ce16a,workflowName:_0x52dbf3}=_0x499bc8;if(_0x1f1c57[_0x522b32(0x146)]){if(_0x5ce16a&&_0x52dbf3)console[_0x522b32(0x1f1)](_0x522b32(0x205)+_0x5ce16a+'.'+_0x52dbf3);else _0x5ce16a&&console['error']('Filter:\x20project='+_0x5ce16a);const _0x118332=_0x1f1c57[_0x522b32(0x1e3)];_0x118332&&console[_0x522b32(0x1f1)](_0x522b32(0x1de)+_0x118332);}let _0x125e70=0x28;if(process[_0x522b32(0x24f)][_0x522b32(0x28f)]&&!_0x1f1c57[_0x522b32(0x1d1)]&&!_0x1f1c57['format']){const _0x41ea4f=process[_0x522b32(0x24f)][_0x522b32(0x1c1)]||0x28;_0x125e70=Math[_0x522b32(0x1f3)](0x14,Math[_0x522b32(0x1a8)](_0x41ea4f*0x2/0x3));}const _0x4bcbb7=_0x1f1c57[_0x522b32(0x1a9)]||_0x125e70,_0x546d06=await withSpinner(_0x522b32(0x257),()=>_0x5e2951[_0x522b32(0x278)][_0x522b32(0x29d)]({'projectName':_0x5ce16a,'workflowName':_0x52dbf3,'status':_0x1f1c57[_0x522b32(0x1e3)],'fromTime':_0x1f1c57[_0x522b32(0x1ac)],'toTime':_0x1f1c57['to'],'limit':_0x4bcbb7}),{'verbose':_0x1f1c57[_0x522b32(0x146)]}),_0x44abcc=_0x546d06[_0x522b32(0x217)];_0x44abcc[_0x522b32(0x1d9)]((_0x43e535,_0x198442)=>{const _0xe0c38a=_0x522b32,_0x2f2068=_0x43e535[_0xe0c38a(0x1c4)]||'',_0x3c4862=_0x198442[_0xe0c38a(0x1c4)]||'';return _0x3c4862['localeCompare'](_0x2f2068);});_0x44abcc[_0x522b32(0x21c)]>=_0x4bcbb7?console['error']('✔\x20Showing\x20'+_0x44abcc[_0x522b32(0x21c)]+'\x20sessions\x20'+a41_0x536097[_0x522b32(0x1be)](_0x522b32(0x148))):console[_0x522b32(0x1f1)](_0x522b32(0x1ee)+_0x44abcc[_0x522b32(0x21c)]+_0x522b32(0x2b1)+(_0x44abcc[_0x522b32(0x21c)]!==0x1?'s':''));if(_0x1f1c57[_0x522b32(0x125)]==='json'||_0x1f1c57['format']===_0x522b32(0x13c)||_0x1f1c57[_0x522b32(0x125)]===_0x522b32(0x19b))await handleSDKOutput(_0x44abcc,_0x1f1c57);else{if(!process['stdout'][_0x522b32(0x28f)]||_0x1f1c57[_0x522b32(0x1d1)]){if(_0x44abcc[_0x522b32(0x21c)]===0x0){if(_0x5ce16a&&_0x52dbf3)console[_0x522b32(0x197)](_0x522b32(0x216)+_0x5ce16a+'.'+_0x52dbf3);else _0x5ce16a?console['log'](_0x522b32(0x14d)+_0x5ce16a):console[_0x522b32(0x197)](_0x522b32(0x28e));}else{const _0xfdd57b=_0x1f1c57[_0x522b32(0x17b)],_0x4a07de=this[_0x522b32(0x28c)](_0x44abcc,_0xfdd57b);_0x1f1c57[_0x522b32(0x1d1)]?await writeOutput(_0x4a07de,_0x1f1c57[_0x522b32(0x1d1)],'list'):console[_0x522b32(0x197)](_0x4a07de);}!_0x5ce16a&&(console['error'](''),console['error'](a41_0x536097[_0x522b32(0x1be)](_0x522b32(0x266))),console[_0x522b32(0x1f1)](a41_0x536097[_0x522b32(0x1be)](_0x522b32(0x1b9))+'or'+a41_0x536097[_0x522b32(0x1be)](_0x522b32(0x231))));}else{if(_0x44abcc[_0x522b32(0x21c)]===0x0){if(_0x5ce16a&&_0x52dbf3)console['log'](_0x522b32(0x216)+_0x5ce16a+'.'+_0x52dbf3);else _0x5ce16a?console[_0x522b32(0x197)](_0x522b32(0x14d)+_0x5ce16a):console['log']('No\x20sessions\x20found');}else await this['navigateSessionsInteractive'](_0x44abcc,_0x4f4cb3,_0x5ce16a);}}return 0x0;}[a41_0x50f62(0x28c)](_0x2d79e8,_0x1cb5f4){const _0x5a774a=a41_0x50f62,_0x21c119=[],_0x69b9e3=new Map();let _0x377c11=Infinity,_0x1483a3=-Infinity;for(const _0x2519ab of _0x2d79e8){if(_0x2519ab['lastAttempt']?.[_0x5a774a(0x271)]){const _0x11ea93=new Date(_0x2519ab[_0x5a774a(0x130)]['createdAt'])[_0x5a774a(0x18b)](),_0x463c71=_0x2519ab['lastAttempt'][_0x5a774a(0x265)]?new Date(_0x2519ab['lastAttempt']['finishedAt'])[_0x5a774a(0x18b)]():Date[_0x5a774a(0x1ba)](),_0x429449=_0x2519ab['project']?.['name']||_0x5a774a(0x191);!_0x69b9e3['has'](_0x429449)&&_0x69b9e3['set'](_0x429449,[]),_0x69b9e3[_0x5a774a(0x184)](_0x429449)['push']({'session':_0x2519ab,'startTime':_0x11ea93,'endTime':_0x463c71,'duration':_0x463c71-_0x11ea93}),_0x377c11=Math[_0x5a774a(0x21a)](_0x377c11,_0x11ea93),_0x1483a3=Math['max'](_0x1483a3,_0x463c71);}}if(_0x69b9e3[_0x5a774a(0x139)]===0x0)return _0x5a774a(0x233);const _0x41ccbf=process[_0x5a774a(0x24f)][_0x5a774a(0x2a3)]||0x78,_0x3908a8=0x1e,_0x4f93e9=0x32,_0x11c887=0x4,_0x116bef=Math['min'](_0x4f93e9,Math['max'](_0x3908a8,Math[_0x5a774a(0x1a8)](_0x41ccbf*0.3))),_0x7e44b3=_0x41ccbf-_0x116bef-TIMELINE_CONFIG[_0x5a774a(0x1e1)]-0x3-_0x11c887,_0x37f072=_0x1483a3-_0x377c11,_0x42eb8f=_0x37f072/_0x116bef,_0x574dbb=renderTimeAxis({'startTime':_0x377c11,'endTime':_0x1483a3,'durationMs':_0x37f072,'msPerChar':_0x42eb8f},_0x116bef),_0x1beb4d=[];for(const _0x10bcb1 of _0x69b9e3[_0x5a774a(0x251)]()){_0x1beb4d[_0x5a774a(0x228)](..._0x10bcb1);}_0x1beb4d['sort']((_0xa5eeb9,_0x1a462e)=>_0x1a462e[_0x5a774a(0x200)]-_0xa5eeb9[_0x5a774a(0x200)]);const _0x1aff79=new Date(_0x377c11),_0x3fef85=formatDate(_0x1aff79),_0x1cd11f=_0x11c887+TIMELINE_CONFIG[_0x5a774a(0x189)]+TIMELINE_CONFIG[_0x5a774a(0x261)]+_0x7e44b3,_0xb43c49='\x20'[_0x5a774a(0x2b5)](_0x1cd11f-_0x3fef85[_0x5a774a(0x21c)]),_0x602b1f=_0xb43c49+a41_0x536097[_0x5a774a(0x1be)](_0x3fef85)+'\x20'+_0x574dbb;_0x21c119[_0x5a774a(0x228)](_0x602b1f);const _0x461694=0x16;let _0x2fe425=0x0;for(const _0x342d49 of _0x1beb4d){const _0x758f5a=_0x342d49[_0x5a774a(0x1ab)][_0x5a774a(0x14f)]?.[_0x5a774a(0x1ea)]||'?',_0x1ac0e8=Math[_0x5a774a(0x21a)](stringWidth(_0x758f5a),_0x461694);_0x2fe425=Math[_0x5a774a(0x1f3)](_0x2fe425,_0x1ac0e8);}for(const _0x3829d5 of _0x1beb4d){const {session:_0x5a55f7,startTime:_0x4fac0d,endTime:_0x578cda,duration:_0x46fe0b}=_0x3829d5,_0x3f8951=_0x5a55f7['project']?.['id'],_0x499cdd=_0x5a55f7['id'],_0x2fc9c9=_0x5a55f7[_0x5a774a(0x14f)]?.[_0x5a774a(0x1ea)]||'?',_0xb45b38=_0x5a55f7[_0x5a774a(0x278)]?.[_0x5a774a(0x1ea)]||'?';let _0x4580a1,_0xeec84d;if(_0x5a55f7[_0x5a774a(0x130)]){const _0x19f517=_0x5a55f7[_0x5a774a(0x130)];!_0x19f517[_0x5a774a(0x27d)]?(_0x4580a1=_0x19f517[_0x5a774a(0x239)]?'🛑':'🔄',_0xeec84d=_0x19f517[_0x5a774a(0x239)]?a41_0x536097['yellow']:a41_0x536097[_0x5a774a(0x222)]):(_0x4580a1=_0x19f517[_0x5a774a(0x285)]?'✅':'❌',_0xeec84d=_0x19f517[_0x5a774a(0x285)]?a41_0x536097[_0x5a774a(0x26c)]:a41_0x536097[_0x5a774a(0x1bc)]);}else _0x4580a1='⏳',_0xeec84d=a41_0x536097[_0x5a774a(0x1be)];const _0x40e014='#'+_0x499cdd,_0x30a2c4=_0x3f8951?hyperlink(_0x40e014,getWorkflowSessionUrl(_0x1cb5f4,_0x3f8951,_0x499cdd)):_0x40e014;let _0x125cac=_0x2fc9c9;stringWidth(_0x2fc9c9)>_0x461694&&(_0x125cac=_0x2fc9c9[_0x5a774a(0x1c3)](0x0,_0x461694-0x1)+'…');const _0x3d03ae=a41_0x536097[_0x5a774a(0x1be)](_0x125cac),_0x227407=stringWidth(_0x125cac),_0x27f06b='\x20'[_0x5a774a(0x2b5)](_0x2fe425-stringWidth(_0x125cac)+0x2),_0x2c85f9='('+formatElapsed(_0x46fe0b)+')',_0x5a277f=stringWidth(_0x2c85f9),_0x216f26=stringWidth(_0x40e014),_0x31d699=_0x216f26+0x1+_0x227407+_0x27f06b['length'],_0x32f490=_0x7e44b3-_0x31d699-_0x5a277f-0x1-0x8;let _0x1b6fd6=_0xb45b38;stringWidth(_0x1b6fd6)>_0x32f490&&(_0x1b6fd6=_0x1b6fd6['slice'](0x0,_0x32f490-0x1)+'…');const _0x24f4a2=_0x30a2c4+'\x20'+_0x3d03ae+_0x27f06b+_0x1b6fd6,_0x10ea38=stringWidth(_0x24f4a2),_0x2c9f3c=_0x7e44b3-_0x10ea38-_0x5a277f,_0x45480b=_0x24f4a2+'\x20'['repeat'](Math['max'](0x1,_0x2c9f3c))+a41_0x536097[_0x5a774a(0x1be)](_0x2c85f9),_0x591c29=Math[_0x5a774a(0x1a8)]((_0x4fac0d-_0x377c11)/_0x42eb8f),_0x808cc7=Math[_0x5a774a(0x1a8)]((_0x578cda-_0x377c11)/_0x42eb8f),_0x2f066b=Math[_0x5a774a(0x1f3)](_0x591c29+0x1,_0x808cc7),_0x5ca245=new Array(_0x116bef)[_0x5a774a(0x2b4)]('\x20');for(let _0x115abb=_0x591c29;_0x115abb<Math[_0x5a774a(0x21a)](_0x2f066b,_0x116bef);_0x115abb++){_0x5ca245[_0x115abb]='─';}const _0x3f0544=_0x5ca245[_0x5a774a(0x249)](_0x2261ed=>_0x2261ed==='\x20'?'\x20':_0xeec84d(_0x2261ed))[_0x5a774a(0x1f5)]('');_0x21c119['push'](_0x4580a1+'\x20'+_0x45480b+'│'+_0x3f0544+'│');}return _0x21c119[_0x5a774a(0x1f5)]('\x0a');}async[a41_0x50f62(0x20e)](_0x429f59,_0x1e84e7,_0x2be95a){const _0x2f40cc=a41_0x50f62,{options:_0x5103ef,tdx:_0x567c66}=_0x1e84e7,_0x28fd11=_0x5103ef[_0x2f40cc(0x17b)],{timelineRows:_0x1d7666,timeAxisHeader:_0x8615d3}=this[_0x2f40cc(0x273)](_0x429f59,_0x28fd11),_0x3d19c7=_0x1d7666['filter'](_0x24655c=>_0x24655c['attemptId']);if(_0x3d19c7[_0x2f40cc(0x21c)]===0x0){const _0x193051=this['renderSessionsTimeline'](_0x429f59,_0x28fd11);console[_0x2f40cc(0x197)](_0x193051);!_0x2be95a&&(console[_0x2f40cc(0x1f1)](''),console[_0x2f40cc(0x1f1)](a41_0x536097['dim'](_0x2f40cc(0x266))),console[_0x2f40cc(0x1f1)](a41_0x536097['dim'](_0x2f40cc(0x1b9))+'or'+a41_0x536097[_0x2f40cc(0x1be)](_0x2f40cc(0x231))));return;}_0x8615d3&&console[_0x2f40cc(0x197)](_0x8615d3);const _0x153e5e=_0x1d7666[_0x2f40cc(0x1c8)](_0x11e4f3=>_0x11e4f3[_0x2f40cc(0x1f2)])[_0x2f40cc(0x249)](_0x51ab62=>({'title':_0x51ab62[_0x2f40cc(0x1ec)],'value':_0x51ab62['attemptId']})),_0x72d5ed=process[_0x2f40cc(0x24f)][_0x2f40cc(0x1c1)]||0x3c,_0x561644=Math[_0x2f40cc(0x1f3)](0x28,Math[_0x2f40cc(0x1a8)](_0x72d5ed*0x2/0x3)),_0x37ba06=await a41_0x3c8366({'type':_0x2f40cc(0x202),'name':'attemptId','message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x153e5e,'initial':-0x1,'limit':_0x561644,'clearFirst':!![],'fallback':{'title':_0x2f40cc(0x279),'value':null},'suggest':(_0x319e81,_0x1e2a86)=>{const _0x646bc1=_0x2f40cc;if(!_0x319e81)return Promise[_0x646bc1(0x226)](_0x1e2a86);const _0x56c402=_0x1e2a86[_0x646bc1(0x1c8)](_0xf1da2c=>{const _0xb3d9d0=_0x646bc1,_0x587c04=_0xf1da2c;return _0x587c04[_0xb3d9d0(0x173)][_0xb3d9d0(0x1a2)]()[_0xb3d9d0(0x268)](_0x319e81[_0xb3d9d0(0x1a2)]());});return Promise[_0x646bc1(0x226)](_0x56c402);}}),_0xfa891c=()=>{const _0x47a463=_0x2f40cc;process[_0x47a463(0x24f)][_0x47a463(0x218)](_0x47a463(0x288)),process[_0x47a463(0x24f)][_0x47a463(0x218)](_0x47a463(0x288)),process[_0x47a463(0x24f)][_0x47a463(0x218)](_0x47a463(0x288));},_0x2d0d3c=_0x37ba06&&_0x37ba06[_0x2f40cc(0x1f2)]&&_0x37ba06['attemptId']!==null&&_0x37ba06[_0x2f40cc(0x1f2)][_0x2f40cc(0x2b8)]()!=='';if(!_0x2d0d3c){_0xfa891c(),console[_0x2f40cc(0x197)](a41_0x536097[_0x2f40cc(0x1be)]('Cancelled'));return;}_0xfa891c();const _0x1c72a0=_0x429f59[_0x2f40cc(0x23e)](_0x2e832a=>_0x2e832a[_0x2f40cc(0x130)]?.['id']===_0x37ba06['attemptId']);if(_0x1c72a0){const _0x10c4c9=_0x1c72a0[_0x2f40cc(0x14f)]?.[_0x2f40cc(0x1ea)]||'?',_0x1e7304=_0x1c72a0['workflow']?.[_0x2f40cc(0x1ea)]||'?';console[_0x2f40cc(0x197)](_0x2f40cc(0x199)+a41_0x536097['dim'](_0x10c4c9)+_0x2f40cc(0x1a0)+a41_0x536097[_0x2f40cc(0x1be)](_0x1e7304));}const _0x18ac59=new WorkflowTimelineCommand();await _0x18ac59[_0x2f40cc(0x22e)]({'args':[],'options':{..._0x5103ef,'attemptId':_0x37ba06[_0x2f40cc(0x1f2)]},'tdx':_0x567c66});}[a41_0x50f62(0x273)](_0x561169,_0x42213b){const _0x5b58ac=a41_0x50f62,_0x4e00d6=new Map();for(const _0x654fe4 of _0x561169){_0x654fe4['id']&&_0x654fe4[_0x5b58ac(0x130)]?.['id']&&_0x4e00d6[_0x5b58ac(0x17f)](_0x654fe4['id'],_0x654fe4[_0x5b58ac(0x130)]['id']);}const _0x47d932=[];let _0x8a7dfb='';const _0x599662=this['renderSessionsTimeline'](_0x561169,_0x42213b),_0x2ade24=_0x599662[_0x5b58ac(0x281)]('\x0a');for(const _0x55d19d of _0x2ade24){if(_0x55d19d[_0x5b58ac(0x26f)](_0x5b58ac(0x127))||_0x55d19d[_0x5b58ac(0x255)](/^\s+\d{4}-\d{2}-\d{2}/))_0x8a7dfb=_0x55d19d;else{if(_0x55d19d['match'](/^[✅❌🔄🛑⏳]/)){const _0xbd185b=_0x55d19d['match'](/#(\d+)/),_0x447278=_0xbd185b?_0xbd185b[0x1]:null,_0x1ae040=_0x447278?_0x4e00d6[_0x5b58ac(0x184)](_0x447278)||null:null,_0x17cbbc=_0x561169['find'](_0x9b64a9=>_0x9b64a9['id']===_0x447278),_0x3067e7=_0x17cbbc?.[_0x5b58ac(0x14f)]?.['name']||'';_0x47d932[_0x5b58ac(0x228)]({'displayLine':_0x55d19d,'attemptId':_0x1ae040,'projectName':_0x3067e7});}}}return{'timelineRows':_0x47d932,'timeAxisHeader':_0x8a7dfb};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a41_0x50f62(0x12d);[a41_0x50f62(0x19c)]=a41_0x50f62(0x256);async[a41_0x50f62(0x22e)](_0x50535e){const _0x5a7afa=a41_0x50f62,{options:_0x4df11a,args:_0x37a7fa,tdx:_0x1b57d6}=_0x50535e,_0x507c90=this['parseProjectWorkflowPattern'](_0x37a7fa,_0x4df11a);if(!_0x507c90)return 0x1;const {projectName:_0x31b211,workflowName:_0x4f085b}=_0x507c90,_0x35f13b=_0x4df11a[_0x5a7afa(0x2c5)];if(_0x4df11a[_0x5a7afa(0x146)]){if(_0x31b211&&_0x4f085b)console[_0x5a7afa(0x1f1)]('Filter:\x20'+_0x31b211+'.'+_0x4f085b);else _0x31b211&&console[_0x5a7afa(0x1f1)](_0x5a7afa(0x2bd)+_0x31b211);_0x35f13b&&console[_0x5a7afa(0x1f1)]('Include\x20retried:\x20yes');}const _0x3d5dd2=await withSpinner(_0x5a7afa(0x195),()=>_0x1b57d6[_0x5a7afa(0x278)][_0x5a7afa(0x26e)]({'projectName':_0x31b211,'workflowName':_0x4f085b,'includeRetried':_0x35f13b,'limit':_0x4df11a[_0x5a7afa(0x1a9)]}),{'verbose':_0x4df11a[_0x5a7afa(0x146)]}),_0x51fa2b=_0x3d5dd2['data'],_0x513360=_0x4df11a[_0x5a7afa(0x1a9)]||0x64,_0x2f36b6=_0x51fa2b[_0x5a7afa(0x21c)]>=_0x513360?a41_0x536097[_0x5a7afa(0x1be)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error'](_0x5a7afa(0x1ee)+_0x51fa2b['length']+_0x5a7afa(0x2bc)+(_0x51fa2b[_0x5a7afa(0x21c)]!==0x1?'s':'')+_0x2f36b6);if(_0x4df11a[_0x5a7afa(0x125)]===_0x5a7afa(0x23c)||_0x4df11a[_0x5a7afa(0x125)]===_0x5a7afa(0x13c)||_0x4df11a['format']===_0x5a7afa(0x19b))await handleSDKOutput(_0x51fa2b,_0x4df11a);else{if(_0x51fa2b[_0x5a7afa(0x21c)]===0x0){if(_0x31b211&&_0x4f085b)console['log'](_0x5a7afa(0x1b2)+_0x31b211+'.'+_0x4f085b);else _0x31b211?console[_0x5a7afa(0x197)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x31b211):console['log'](_0x5a7afa(0x164));}else{const _0x44e961=_0x4df11a[_0x5a7afa(0x17b)],_0x16ebae=_0x51fa2b[_0x5a7afa(0x249)](_0x3d9a77=>{const _0x11189b=_0x5a7afa,_0x4126c1=a41_0x536097['dim']('#'+_0x3d9a77['id']),_0x435e39=_0x3d9a77[_0x11189b(0x14f)]?.['id'],_0x4eac2c=_0x3d9a77[_0x11189b(0x1e6)]||_0x3d9a77[_0x11189b(0x162)],_0xedbb17=_0x435e39&&_0x4eac2c?hyperlink(_0x4126c1,getWorkflowAttemptUrl(_0x44e961,_0x435e39,_0x4eac2c,_0x3d9a77['id'])):_0x4126c1,{icon:_0x5929c1,text:_0x5be6c1}=getAttemptStatusDisplay(_0x3d9a77),_0xd0962f=(_0x3d9a77[_0x11189b(0x14f)]?.[_0x11189b(0x1ea)]||'?')+'.'+(_0x3d9a77['workflow']?.[_0x11189b(0x1ea)]||'?'),_0xb5e517=_0x3d9a77['sessionTime']?a41_0x536097[_0x11189b(0x1be)](_0x3d9a77[_0x11189b(0x1c4)]):'';return(_0xedbb17+'\x20'+_0x5929c1+(_0x5be6c1?'\x20'+_0x5be6c1:'')+'\x20'+_0xd0962f+'\x20'+_0xb5e517)[_0x11189b(0x2a2)]();});await writeOutput(_0x16ebae[_0x5a7afa(0x1f5)]('\x0a'),_0x4df11a['output'],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a41_0x50f62(0x1ea)]='workflow:attempt';[a41_0x50f62(0x19c)]='Show\x20specific\x20attempt\x20details';async[a41_0x50f62(0x22e)](_0x54548a){const _0x46bfce=a41_0x50f62,{options:_0x4f1af3,args:_0x3b014a,tdx:_0x1557bf}=_0x54548a,_0x159e48=_0x3b014a[0x0];if(!_0x159e48)return console[_0x46bfce(0x1f1)](_0x46bfce(0x141)),0x1;_0x4f1af3[_0x46bfce(0x146)]&&console[_0x46bfce(0x1f1)](_0x46bfce(0x124)+_0x159e48);const _0x2ec538=await withSpinner(_0x46bfce(0x290),()=>_0x1557bf['workflow'][_0x46bfce(0x1d3)](_0x159e48),{'verbose':_0x4f1af3[_0x46bfce(0x146)]}),_0x3c1e77=_0x2ec538[_0x46bfce(0x217)];let _0x2a78b9;!_0x3c1e77[_0x46bfce(0x27d)]?_0x2a78b9=_0x3c1e77[_0x46bfce(0x239)]?_0x46bfce(0x2b3):'running':_0x2a78b9=_0x3c1e77[_0x46bfce(0x285)]?_0x46bfce(0x285):_0x46bfce(0x1f1);let _0x5a0f1d;if(_0x3c1e77[_0x46bfce(0x271)]&&_0x3c1e77[_0x46bfce(0x265)]){const _0x28ecce=new Date(_0x3c1e77['createdAt'])['getTime'](),_0x2f28d1=new Date(_0x3c1e77[_0x46bfce(0x265)])[_0x46bfce(0x18b)]();_0x5a0f1d=Math[_0x46bfce(0x234)]((_0x2f28d1-_0x28ecce)/0x3e8);}const _0x1c28d0={'attempt_id':_0x3c1e77['id'],'status':_0x2a78b9,..._0x3c1e77[_0x46bfce(0x145)]!==undefined&&{'index':_0x3c1e77['index']},..._0x3c1e77[_0x46bfce(0x14f)]&&{'project':_0x3c1e77[_0x46bfce(0x14f)][_0x46bfce(0x1ea)]},..._0x3c1e77[_0x46bfce(0x278)]&&{'workflow':_0x3c1e77[_0x46bfce(0x278)][_0x46bfce(0x1ea)]},..._0x3c1e77['sessionId']&&{'session_id':_0x3c1e77[_0x46bfce(0x162)]},..._0x3c1e77[_0x46bfce(0x1c4)]&&{'session_time':_0x3c1e77[_0x46bfce(0x1c4)]},..._0x3c1e77[_0x46bfce(0x150)]&&{'retry_attempt':_0x3c1e77[_0x46bfce(0x150)]},..._0x5a0f1d!==undefined&&{'duration_sec':_0x5a0f1d},..._0x3c1e77[_0x46bfce(0x271)]&&{'created_at':_0x3c1e77[_0x46bfce(0x271)]},..._0x3c1e77[_0x46bfce(0x265)]&&{'finished_at':_0x3c1e77['finishedAt']},...Object[_0x46bfce(0x132)](_0x3c1e77[_0x46bfce(0x293)])[_0x46bfce(0x21c)]>0x0&&{'params':_0x3c1e77['params']}};return await handleSingleObjectOutput(_0x1c28d0,_0x4f1af3),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x1fb);[a41_0x50f62(0x19c)]='Show\x20tasks\x20for\x20an\x20attempt';async[a41_0x50f62(0x22e)](_0x3ac44d){const _0x4b5711=a41_0x50f62,{options:_0x2254c1,args:_0x5a6232,tdx:_0x1fdd67}=_0x3ac44d,_0x153204=_0x5a6232[0x0];if(!_0x153204)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x547a81=_0x2254c1[_0x4b5711(0x2a1)];_0x2254c1[_0x4b5711(0x146)]&&(console['error'](_0x4b5711(0x124)+_0x153204),_0x547a81&&console[_0x4b5711(0x1f1)](_0x4b5711(0x23d)));const _0x3c0b9d=await withSpinner(_0x4b5711(0x25e),()=>_0x1fdd67[_0x4b5711(0x278)][_0x4b5711(0x1b5)](_0x153204,_0x547a81||![]),{'verbose':_0x2254c1[_0x4b5711(0x146)]}),_0x2c7ac6=_0x3c0b9d[_0x4b5711(0x217)];return console[_0x4b5711(0x1f1)](_0x4b5711(0x1ee)+_0x2c7ac6[_0x4b5711(0x21c)]+'\x20task'+(_0x2c7ac6[_0x4b5711(0x21c)]!==0x1?'s':'')),await handleSDKOutput(_0x2c7ac6,_0x2254c1),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a41_0x50f62(0x198);[a41_0x50f62(0x19c)]=a41_0x50f62(0x17c);async[a41_0x50f62(0x22e)](_0x4c4dbb){const _0x9954ef=a41_0x50f62,{options:_0x760203,args:_0x23462e,tdx:_0x39e277}=_0x4c4dbb,_0x330034=_0x23462e[0x0];let _0x34ec4e=_0x23462e[0x1];if(!_0x330034)return console[_0x9954ef(0x1f1)](_0x9954ef(0x141)),0x1;_0x760203[_0x9954ef(0x146)]&&(console[_0x9954ef(0x1f1)](_0x9954ef(0x124)+_0x330034),_0x34ec4e&&console[_0x9954ef(0x1f1)](_0x9954ef(0x204)+_0x34ec4e));const _0x46bd87=await withSpinner(_0x9954ef(0x262),()=>_0x39e277[_0x9954ef(0x278)][_0x9954ef(0x212)](_0x330034,_0x34ec4e),{'verbose':_0x760203[_0x9954ef(0x146)]}),_0x2988b8=_0x46bd87['data'];if(_0x2988b8[_0x9954ef(0x21c)]===0x0)return console[_0x9954ef(0x1f1)](_0x9954ef(0x214)),0x0;if(!_0x34ec4e&&(_0x760203['json']||_0x760203['format']))return await handleSDKOutput(_0x2988b8,_0x760203),0x0;if(!_0x34ec4e){const _0x1f7392=_0x2988b8[_0x9954ef(0x249)](_0x35091f=>({'title':_0x35091f['taskName']+'\x20('+formatBytes(_0x35091f[_0x9954ef(0x28a)])+')','value':_0x35091f['taskName']})),_0x64e221=await a41_0x3c8366({'type':'select','name':'task','message':_0x9954ef(0x15a),'choices':_0x1f7392});if(!_0x64e221[_0x9954ef(0x128)])return console['error'](_0x9954ef(0x240)),0x0;_0x34ec4e=_0x64e221[_0x9954ef(0x128)];}const _0x3700bd=await withSpinner(_0x9954ef(0x26d),()=>_0x39e277[_0x9954ef(0x278)][_0x9954ef(0x221)](_0x330034,_0x34ec4e),{'verbose':_0x760203[_0x9954ef(0x146)]}),_0x427696=_0x3700bd[_0x9954ef(0x217)];return _0x427696?console[_0x9954ef(0x197)](_0x427696):console[_0x9954ef(0x1f1)](_0x9954ef(0x17e)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a41_0x50f62(0x1ea)]='workflow:kill';['description']='Kill\x20a\x20running\x20attempt';async['execute'](_0x1a15d9){const _0x145c24=a41_0x50f62,{options:_0x2fa942,args:_0x179262,tdx:_0x4b5ac6}=_0x1a15d9,_0x7ea9c9=_0x179262[0x0];if(!_0x7ea9c9)return console[_0x145c24(0x1f1)](_0x145c24(0x141)),0x1;const _0x29e59c=_0x2fa942['reason'];_0x2fa942[_0x145c24(0x146)]&&(console[_0x145c24(0x1f1)]('Attempt\x20ID:\x20'+_0x7ea9c9),_0x29e59c&&console[_0x145c24(0x1f1)](_0x145c24(0x284)+_0x29e59c));if(!_0x2fa942[_0x145c24(0x1dc)]){const _0x371b48=await confirmKey(_0x145c24(0x20c)+_0x7ea9c9+'?');if(!_0x371b48)return console[_0x145c24(0x1f1)](_0x145c24(0x240)),0x0;}const _0xffe865=await withSpinner('Killing\x20attempt...',()=>_0x4b5ac6[_0x145c24(0x278)][_0x145c24(0x1ce)](_0x7ea9c9,_0x29e59c),{'verbose':_0x2fa942[_0x145c24(0x146)]}),_0x2dfb1d=_0xffe865[_0x145c24(0x217)];return console[_0x145c24(0x1f1)]('✔\x20'+_0x2dfb1d),0x0;}}function a41_0x138c(){const _0x493891=['sort','replace','Listing\x20workflows...','yes','Revision:\x20','Status:\x20','revision:\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','GUTTER','\x20of\x20','status','workflow:secrets:list','force','session_id','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','toISOString','requireProject','name','dryRun','displayLine','metadata','✔\x20Found\x20','MAX_TASKS_DISPLAY','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','error','attemptId','max','stringify','join','Key:\x20','\x20\x20Project\x20ID:\x20','\x20-\x20','executeCloneProject','duration','workflow:tasks','/sessions/','white','✔\x20Pushed\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','startTime','Error:\x20Secret\x20key\x20is\x20required','autocomplete','608404fKMHGs','Task\x20name:\x20','Filter:\x20','/app/workflows/','listSecrets','424035orEuti','workflowName','workflow:run','unknown','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Session\x20not\x20found:\x20','navigateSessionsInteractive','\x27\x20from\x20project\x20\x27','param','Error:\x20Invalid\x20JSON\x20in\x20--params','logFiles','projectName','No\x20log\x20files\x20found\x20for\x20this\x20attempt','No\x20projects\x20match\x20pattern:\x20','No\x20sessions\x20found\x20for:\x20','data','write','Validation:\x20skipped','min','4088896wPhXRt','length','unchanged','projectId','cyan','context','logs','blue','Parameters:\x20','workflow:pull','newProjectName','resolve','List\x20workflow\x20execution\x20sessions','push','workflow:timeline','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','hasChanges','MAX_POLL_ITERATIONS','some','execute','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Downloading\x20project\x20','\x20\x20tdx\x20wf\x20use\x20<project>','\x20\x20Location:\x20','No\x20sessions\x20with\x20timing\x20information','round','New\x20project\x20name:\x20','pending','every','isArray','cancelRequested','getMinutes','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','json','Including\x20subtasks:\x20yes','find','✔\x20Deleted\x20project\x20','Cancelled','\x20(use\x20--limit\x20to\x20show\x20more)','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','MAX_TIMELINE_WIDTH','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Failed\x20to\x20fetch\x20attempt\x20data','workflowProject','No\x20workflows\x20found\x20in\x20project:\x20','map','1706049YqdlDj','Force:\x20yes','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','run','No\x20workflows\x20found','stdout','message','values','select','Tip:\x20cd\x20to\x20workflows/','\x0aDry\x20run\x20-\x20no\x20project\x20created','match','List\x20workflow\x20attempts','Listing\x20workflow\x20sessions...','✔\x20Clone\x20complete','workflow:download','sys','renderSingleTimeline','sourceDir','padStart','Getting\x20attempt\x20tasks...','\x0aDry\x20run\x20-\x20nothing\x20pushed','preparePushProject','ICON_SPACING','Fetching\x20log\x20files...','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Auto-selected\x20latest\x20session:\x20','finishedAt','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','TASK_NAME_WIDTH','includes','Latest\x20session\x20has\x20no\x20attempt','skipValidation','Usage:\x20tdx\x20wf\x20use\x20<project>','green','Downloading\x20logs...','attempts','startsWith','deleteSecret','createdAt','\x0aClone\x20\x22','generateSessionTimelineRows','type','✔\x20Downloaded\x20','renderTimeline','List\x20all\x20workflow\x20projects','workflow','No\x20matching\x20sessions\x20found','workflows','\x20(system)','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','done','tdx\x20wf\x20attempt\x20','sourceProjectName','all','split','revision','deleted','Reason:\x20','success','isNewProject','Select\x20a\x20session\x20to\x20view\x20timeline:','\x1b[1A\x1b[2K','substring','fileSize','Source\x20directory:\x20','renderSessionsTimeline','path','No\x20sessions\x20found','isTTY','Getting\x20attempt\x20details...','No\x20workflow\x20tdx.json\x20found','From\x20task:\x20','params','Project\x20directory:\x20','\x0a⚠\x20Project\x20\x22','\x20\x20New\x20attempt\x20ID:\x20','\x20secret','Output\x20directory:\x20','Workflow:\x20','Deleting\x20project\x20','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','\x20\x20Session\x20ID:\x20','sessions','\x0aDry\x20run\x20-\x20no\x20files\x20written','workflow:delete','20645288kNmoKN','includeSubtasks','trimEnd','columns','basename','attempt:','showWorkflowConsoleUrl','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','start','Loading\x20workflows...','workflow:upload','Select\x20a\x20workflow\x20to\x20run','Session\x20','delete','new','pullProject','10502VwLUHg','\x20session','📋\x20','canceling','fill','repeat','startedAt','\x20\x20Session\x20context\x20set\x20to:\x20','trim','targetExists','\x22?\x20This\x20cannot\x20be\x20undone.','stat','\x20attempt','Filter:\x20project=','Project\x20name\x20is\x20required','\x0a✔\x20No\x20changes\x20to\x20push','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','getMonth','✔\x20Workflow\x20project\x20set\x20to:\x20','---\x20','download','includeRetried','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Listing\x20workflow\x20projects...','fullName','⚠\x20Showing\x20first\x20','No\x20workflow\x20projects\x20found','No\x20workflow\x20sessions\x20found','📁\x20','\x27...','Attempt\x20ID:\x20','format','\x20\x20Console:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','task','Project\x20name:\x20','follow','\x20deleted','POLL_INTERVAL_MS','workflow:attempts','✔\x20Project:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','lastAttempt','filesExtracted','keys','List\x20workflows','\x0aPush\x20these\x20changes?','\x20logs','Error:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Attempt:\x20','size','Project\x20filter:\x20','summary','jsonl','key','Error:\x20Invalid\x20parameter\x20format:\x20','yellow','\x20\x20Target:\x20','Error:\x20Attempt\x20ID\x20is\x20required','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','clear','value','index','verbose','\x20\x20Changes:\x20','(use\x20--limit\x20to\x20see\x20more)','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','\x20project','end','No\x20sessions\x20found\x20in\x20project:\x20','msPerChar','project','retryAttemptName','getDate','diff','Loading\x20sessions...','Listing\x20secrets...','workflow:push','\x20workflow','Expected\x20format:\x20--param\x20key=value','Target:\x20','131IYTLSQ','Select\x20a\x20task\x20to\x20view\x20logs:','total','Error:','splice','✔\x20Workflow\x20run\x20started','cwd','session:','✔\x20Workflow\x20project\x20context\x20cleared.','sessionId','workflow:sessions','No\x20attempts\x20found','Writing\x20files...','window','tdx.json','\x20tasks','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','running','planned','\x20\x20Workflow:\x20','Starting\x20workflow\x20run...','parseProjectWorkflowPattern','LABEL_WIDTH_DIVISOR','Analyzing\x20changes...','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','title','workflow:projects','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','state','workflow:use','workflow:secrets:delete','Pushing\x20project...','\x20\x20Revision:\x20','site','Show\x20logs\x20for\x20a\x20workflow\x20attempt','fileCount','No\x20log\x20content\x20found','set','\x20\x20Source:\x20','...','\x20has\x20no\x20attempts','indexOf','get','applyPullProject','Loading\x20session...','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','ICON_WIDTH','Usage:\x20workflow:delete\x20<project-name-or-id>','getTime','Dry\x20run:\x20yes','\x20unchanged','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','prepareCloneProject','\x20\x20Project:\x20','(unknown)','newProjectId','parse','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','Listing\x20workflow\x20attempts...','updatedAt','log','workflow:logs','Project:\x20','\x20is\x20not\x20a\x20directory','table','description','resolveProject','Setting\x20secret...','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22',',\x20Workflow:\x20','targetDir','toLowerCase','retrySession','Files\x20to\x20upload:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','554484sxHDVt','list','floor','limit','.\x20Expected\x20format:\x20KEY=VALUE','session','from','Error:\x20KEY=VALUE\x20is\x20required','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','relative','Source:\x20','workflow:retry','No\x20attempts\x20found\x20for:\x20','Warning:','\x20to\x20see\x20detailed\x20logs','tasks','Error:\x20Project\x20name\x20is\x20required','MIN_TIMELINE_WIDTH','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','now','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','red','Retrying\x20session...','dim','Invalid\x20format:\x20','existingProjectId','rows','Cloning\x20to\x20','slice','sessionTime','localeCompare','modified','🔄\x20','filter','Retry\x20a\x20session\x20or\x20attempt','resolveProjectDir','\x20modified','pollTimeline','executePushProject','kill','Resume\x20from:\x20','MIN_LABEL_COUNT','output','getHours','attempt','fs/promises','Source\x20directory\x20is\x20required','/attempt/','\x0aFailed\x20to\x20fetch\x20attempt\x20data','LABEL_MIN_SPACING'];a41_0x138c=function(){return _0x493891;};return a41_0x138c();}export class WorkflowRetryCommand extends BaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x1b1);[a41_0x50f62(0x19c)]=a41_0x50f62(0x1c9);async['execute'](_0x5ea305){const _0x58b3ec=a41_0x50f62,{options:_0x2ca53f,args:_0x3409bf,tdx:_0x5c9bf5}=_0x5ea305,_0x324bca=_0x3409bf[0x0];if(!_0x324bca)return console[_0x58b3ec(0x1f1)](_0x58b3ec(0x137)),console['error'](_0x58b3ec(0x2c0)),0x1;let _0x3cbf03=![],_0x342baa=_0x324bca;if(_0x324bca[_0x58b3ec(0x26f)](_0x58b3ec(0x160)))_0x3cbf03=!![],_0x342baa=_0x324bca[_0x58b3ec(0x289)](0x8);else{if(_0x324bca['startsWith'](_0x58b3ec(0x2a5)))_0x3cbf03=![],_0x342baa=_0x324bca[_0x58b3ec(0x289)](0x8);else return console['error'](_0x58b3ec(0x1ff)),console['error'](_0x58b3ec(0x2c0)),0x1;}const _0x916d77=_0x2ca53f['fromTask'],_0x585eb9=_0x2ca53f['resumeFrom'],_0xb66123=_0x2ca53f['params'],_0x408ae5=_0x2ca53f[_0x58b3ec(0x1e5)];_0x2ca53f['verbose']&&(console[_0x58b3ec(0x1f1)](_0x58b3ec(0x158)+(_0x3cbf03?'session':_0x58b3ec(0x1d3))+'\x20'+_0x342baa),_0x916d77&&console[_0x58b3ec(0x1f1)](_0x58b3ec(0x292)+_0x916d77),_0x585eb9&&console[_0x58b3ec(0x1f1)](_0x58b3ec(0x1cf)+_0x585eb9),_0xb66123&&console[_0x58b3ec(0x1f1)]('Params:\x20'+_0xb66123),_0x408ae5&&console['error'](_0x58b3ec(0x24b)));let _0x566e8b;if(_0xb66123)try{if(_0xb66123[_0x58b3ec(0x26f)]('@')){const _0x47cfa9=await import(_0x58b3ec(0x1d4)),_0x395a01=_0xb66123[_0x58b3ec(0x289)](0x1),_0x8a7f04=await _0x47cfa9['readFile'](_0x395a01,'utf-8');_0x566e8b=JSON[_0x58b3ec(0x193)](_0x8a7f04);}else _0x566e8b=JSON[_0x58b3ec(0x193)](_0xb66123);}catch{return console[_0x58b3ec(0x1f1)](_0x58b3ec(0x211)),0x1;}if(!_0x2ca53f[_0x58b3ec(0x1dc)]){const _0x248848=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x3cbf03?'session':_0x58b3ec(0x1d3))+'\x20'+_0x342baa+'?');if(!_0x248848)return console[_0x58b3ec(0x1f1)](_0x58b3ec(0x240)),0x0;}let _0x2529e2;_0x3cbf03?_0x2529e2=await withSpinner(_0x58b3ec(0x1bd),()=>_0x5c9bf5[_0x58b3ec(0x278)][_0x58b3ec(0x1a3)](_0x342baa,{'fromTask':_0x916d77,'retryParams':_0x566e8b}),{'verbose':_0x2ca53f[_0x58b3ec(0x146)]}):_0x2529e2=await withSpinner('Retrying\x20attempt...',()=>_0x5c9bf5['workflow']['retryAttempt'](_0x342baa,{'resumeFrom':_0x585eb9,'retryParams':_0x566e8b,'force':_0x408ae5}),{'verbose':_0x2ca53f[_0x58b3ec(0x146)]});const _0x1f8c0e=_0x2529e2['data'];return console['error']('✔\x20Retry\x20started'),console[_0x58b3ec(0x1f1)](_0x58b3ec(0x296)+_0x1f8c0e[_0x58b3ec(0x1f2)]),console['error'](_0x58b3ec(0x29c)+_0x1f8c0e[_0x58b3ec(0x162)]),0x0;}}function a41_0x5857(_0x338ce0,_0x1b69c9){_0x338ce0=_0x338ce0-0x11d;const _0x138cbf=a41_0x138c();let _0x585720=_0x138cbf[_0x338ce0];return _0x585720;}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a41_0x50f62(0x20a);[a41_0x50f62(0x19c)]='Start\x20a\x20workflow\x20run';async[a41_0x50f62(0x22e)](_0x5760e6){const _0x4f6310=a41_0x50f62,{options:_0x4dfd6a,args:_0x1bf49a,tdx:_0x1151ed}=_0x5760e6;let _0x5ab962=_0x1bf49a[0x0];if(!_0x5ab962){const _0x332d77=this['resolveProject']([],_0x4dfd6a),_0x8ee7f8=await withSpinner(_0x4f6310(0x2a9),()=>_0x1151ed[_0x4f6310(0x278)][_0x4f6310(0x27a)](_0x332d77,{'limit':_0x4dfd6a[_0x4f6310(0x1a9)]}),{'verbose':_0x4dfd6a[_0x4f6310(0x146)]}),_0xfa834b=_0x8ee7f8[_0x4f6310(0x217)];if(_0xfa834b[_0x4f6310(0x21c)]===0x0)return console['error']('No\x20workflows\x20found'),!_0x332d77&&console[_0x4f6310(0x1f1)](a41_0x536097[_0x4f6310(0x1be)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x410225=_0xfa834b[_0x4f6310(0x249)](_0x41565e=>({'title':_0x41565e[_0x4f6310(0x14f)]?.[_0x4f6310(0x1ea)]+'.'+_0x41565e['name'],'value':_0x41565e[_0x4f6310(0x14f)]?.['name']+'.'+_0x41565e[_0x4f6310(0x1ea)],'description':_0x41565e['revision']?_0x4f6310(0x1df)+_0x41565e['revision']:undefined})),_0x4985af=await a41_0x3c8366({'type':_0x4f6310(0x252),'name':_0x4f6310(0x278),'message':_0x4f6310(0x2ab),'choices':_0x410225});if(!_0x4985af[_0x4f6310(0x278)])return 0x1;_0x5ab962=_0x4985af[_0x4f6310(0x278)];}if(!_0x5ab962[_0x4f6310(0x268)]('.')){const _0x1b97c1=this['resolveProject']([],_0x4dfd6a);if(_0x1b97c1)_0x5ab962=_0x1b97c1+'.'+_0x5ab962;else return console[_0x4f6310(0x1f1)](a41_0x536097[_0x4f6310(0x1bc)]('Error:'),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x4f6310(0x1f1)](a41_0x536097['dim'](_0x4f6310(0x18e))),0x1;}const _0x37b644=_0x4dfd6a[_0x4f6310(0x210)],_0x43ae3c=_0x4dfd6a[_0x4f6310(0x1c4)],_0xaf162b={};if(_0x37b644&&Array[_0x4f6310(0x238)](_0x37b644))for(const _0x43af71 of _0x37b644){const _0x243c22=_0x43af71[_0x4f6310(0x183)]('=');if(_0x243c22===-0x1)return console[_0x4f6310(0x1f1)](_0x4f6310(0x13e)+_0x43af71),console['error'](_0x4f6310(0x157)),0x1;const _0x906cb3=_0x43af71[_0x4f6310(0x289)](0x0,_0x243c22),_0x4926ce=_0x43af71[_0x4f6310(0x289)](_0x243c22+0x1);try{_0xaf162b[_0x906cb3]=JSON['parse'](_0x4926ce);}catch{_0xaf162b[_0x906cb3]=_0x4926ce;}}_0x4dfd6a[_0x4f6310(0x146)]&&(console[_0x4f6310(0x1f1)](_0x4f6310(0x299)+_0x5ab962),Object[_0x4f6310(0x132)](_0xaf162b)['length']>0x0&&console[_0x4f6310(0x1f1)](_0x4f6310(0x223)+JSON[_0x4f6310(0x1f4)](_0xaf162b)),_0x43ae3c&&console[_0x4f6310(0x1f1)]('Session\x20time:\x20'+_0x43ae3c));const _0x5efa38=await withSpinner(_0x4f6310(0x16e),()=>_0x1151ed[_0x4f6310(0x278)][_0x4f6310(0x24d)](_0x5ab962,_0xaf162b,{'sessionTime':_0x43ae3c}),{'verbose':_0x4dfd6a[_0x4f6310(0x146)]}),_0x3e8c0b=_0x5efa38[_0x4f6310(0x217)];console['error'](_0x4f6310(0x15e)),console[_0x4f6310(0x1f1)]('\x20\x20Attempt\x20ID:\x20'+_0x3e8c0b['id']),console[_0x4f6310(0x1f1)]('\x20\x20Session\x20ID:\x20'+_0x3e8c0b['sessionId']),console[_0x4f6310(0x1f1)](_0x4f6310(0x190)+_0x3e8c0b[_0x4f6310(0x14f)]?.[_0x4f6310(0x1ea)]),console[_0x4f6310(0x1f1)](_0x4f6310(0x16d)+_0x3e8c0b[_0x4f6310(0x278)]?.[_0x4f6310(0x1ea)]);if(_0x3e8c0b[_0x4f6310(0x14f)]?.['id']&&_0x3e8c0b[_0x4f6310(0x162)]&&_0x3e8c0b['id']){const _0x21feba=_0x4dfd6a[_0x4f6310(0x17b)],_0x18225e=getConsoleUrl(_0x21feba,_0x4f6310(0x206)+_0x3e8c0b['project']['id']+_0x4f6310(0x1fc)+_0x3e8c0b[_0x4f6310(0x162)]+_0x4f6310(0x1d6)+_0x3e8c0b['id']);console[_0x4f6310(0x1f1)]('\x20\x20Console:\x20'+a41_0x536097['cyan'](_0x18225e));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x259);[a41_0x50f62(0x19c)]=a41_0x50f62(0x1a5);async[a41_0x50f62(0x22e)](_0x27c8cb){const _0x243d16=a41_0x50f62,{options:_0x4e5103,args:_0x27f04d,tdx:_0x18e367}=_0x27c8cb,_0x48bf9a=_0x27f04d[0x0],_0x182a4d=_0x27f04d[0x1]||'.';if(!_0x48bf9a)return console[_0x243d16(0x1f1)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x243d16(0x1f1)](_0x243d16(0x243)),0x1;const _0x37fb0b=_0x4e5103['revision'];_0x4e5103['verbose']&&(console[_0x243d16(0x1f1)](_0x243d16(0x199)+_0x48bf9a),console[_0x243d16(0x1f1)](_0x243d16(0x298)+_0x182a4d),_0x37fb0b&&console['error'](_0x243d16(0x1dd)+_0x37fb0b));const _0x1239a2=await withSpinner(_0x243d16(0x230)+_0x48bf9a+_0x243d16(0x181),()=>_0x18e367['workflow'][_0x243d16(0x2c4)](_0x48bf9a,_0x182a4d,{'revision':_0x37fb0b}),{'verbose':_0x4e5103[_0x243d16(0x146)]}),_0x1b4249=_0x1239a2[_0x243d16(0x217)];return console[_0x243d16(0x1f1)](_0x243d16(0x275)+_0x1b4249['projectName']),console[_0x243d16(0x1f1)](_0x243d16(0x17a)+_0x1b4249[_0x243d16(0x282)]),console[_0x243d16(0x1f1)]('\x20\x20Files\x20extracted:\x20'+_0x1b4249[_0x243d16(0x131)]),console['error'](_0x243d16(0x232)+_0x182a4d+'/'+_0x1b4249[_0x243d16(0x213)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x2aa);[a41_0x50f62(0x19c)]=a41_0x50f62(0x1e7);async['execute'](_0x1acc82){const _0x2885bb=a41_0x50f62,{options:_0x396d04,args:_0x35c068,tdx:_0xde735c}=_0x1acc82;let _0x4f4d3a='.',_0x376a6e=_0x396d04[_0x2885bb(0x1ea)];if(_0x35c068[0x0]){const {promises:_0x81ca54}=await import('fs');try{const _0x5a0bda=await _0x81ca54[_0x2885bb(0x2bb)](_0x35c068[0x0]);if(_0x5a0bda['isDirectory']())_0x4f4d3a=_0x35c068[0x0];else return console[_0x2885bb(0x1f1)](_0x2885bb(0x136)+_0x35c068[0x0]+_0x2885bb(0x19a)),0x1;}catch{_0x376a6e=_0x35c068[0x0],_0x4f4d3a='.';}}const _0x49dc84=_0x396d04[_0x2885bb(0x282)],_0x1addee=_0x396d04[_0x2885bb(0x26a)];_0x396d04['verbose']&&(console[_0x2885bb(0x1f1)](_0x2885bb(0x294)+_0x4f4d3a),_0x376a6e&&console[_0x2885bb(0x1f1)](_0x2885bb(0x129)+_0x376a6e),_0x49dc84&&console[_0x2885bb(0x1f1)](_0x2885bb(0x1dd)+_0x49dc84),_0x1addee&&console['error']('Validation:\x20skipped'));const _0x2ce49c=await withSpinner('Pushing\x20workflow\x20project...',()=>_0xde735c[_0x2885bb(0x278)][_0x2885bb(0x228)](_0x4f4d3a,{'projectName':_0x376a6e,'revision':_0x49dc84,'skipValidation':_0x1addee}),{'verbose':_0x396d04['verbose']}),_0x595446=_0x2ce49c['data'];return console[_0x2885bb(0x1f1)](_0x2885bb(0x1fe)+_0x595446['projectName']),console[_0x2885bb(0x1f1)](_0x2885bb(0x1f7)+_0x595446[_0x2885bb(0x21e)]),console[_0x2885bb(0x1f1)](_0x2885bb(0x17a)+_0x595446['revision']),await this[_0x2885bb(0x2a6)](_0xde735c,_0x595446[_0x2885bb(0x213)],_0x396d04['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a41_0x50f62(0x224);['description']=a41_0x50f62(0x12f);async[a41_0x50f62(0x22e)](_0x46b8a5){const _0x57879f=a41_0x50f62,{options:_0x3c9f52,args:_0x2c11f1,tdx:_0x443ef8}=_0x46b8a5,_0x33dce8=_0x2c11f1[0x0],_0x1b8ca7=_0x2c11f1[0x1];if(!_0x33dce8)return console[_0x57879f(0x1f1)](a41_0x536097[_0x57879f(0x1bc)](_0x57879f(0x15c)),_0x57879f(0x2be)),console[_0x57879f(0x1f1)](a41_0x536097[_0x57879f(0x1be)](_0x57879f(0x1b8))),0x1;const _0x53c05f=_0x3c9f52[_0x57879f(0x282)];_0x3c9f52['verbose']&&(console[_0x57879f(0x1f1)](_0x57879f(0x199)+_0x33dce8),_0x1b8ca7&&console[_0x57879f(0x1f1)]('Target\x20directory:\x20'+_0x1b8ca7),_0x53c05f&&console['error'](_0x57879f(0x1dd)+_0x53c05f),_0x3c9f52[_0x57879f(0x1eb)]&&console[_0x57879f(0x1f1)]('Dry\x20run:\x20yes'));const _0x3b0396=await withSpinner('Pulling\x20project\x20'+_0x33dce8+'...',()=>_0x443ef8[_0x57879f(0x278)][_0x57879f(0x2af)](_0x33dce8,{'targetDir':_0x1b8ca7,'revision':_0x53c05f}),{'verbose':_0x3c9f52[_0x57879f(0x146)]}),_0x82cf71=_0x3b0396['data'];_0x82cf71[_0x57879f(0x286)]?console[_0x57879f(0x1f1)]('✔\x20New\x20project:\x20'+_0x82cf71[_0x57879f(0x213)]):console[_0x57879f(0x1f1)](_0x57879f(0x12e)+_0x82cf71['projectName']);console['error'](_0x57879f(0x17a)+_0x82cf71[_0x57879f(0x282)]),console['error'](_0x57879f(0x140)+(a41_0x149b54[_0x57879f(0x1af)](process[_0x57879f(0x15f)](),_0x82cf71['targetDir'])||'.')),console[_0x57879f(0x1f1)](_0x57879f(0x147)+a41_0x536097[_0x57879f(0x26c)]('+'+_0x82cf71[_0x57879f(0x13b)][_0x57879f(0x2ae)]+'\x20new')+',\x20'+(a41_0x536097[_0x57879f(0x13f)]('~'+_0x82cf71['summary'][_0x57879f(0x1c6)]+_0x57879f(0x1cb))+',\x20')+(a41_0x536097[_0x57879f(0x1bc)]('-'+_0x82cf71[_0x57879f(0x13b)][_0x57879f(0x283)]+_0x57879f(0x12b))+',\x20')+(''+a41_0x536097[_0x57879f(0x1be)](_0x82cf71['summary'][_0x57879f(0x21d)]+_0x57879f(0x18d))));for(const _0x31e57 of _0x82cf71['changes']){_0x31e57[_0x57879f(0x274)]==='modified'&&_0x31e57[_0x57879f(0x152)]&&(console[_0x57879f(0x1f1)]('\x0a'+a41_0x536097[_0x57879f(0x21f)](_0x57879f(0x2c3)+_0x31e57[_0x57879f(0x28d)])),console[_0x57879f(0x1f1)](_0x31e57[_0x57879f(0x152)]));}if(!_0x82cf71[_0x57879f(0x22b)])return saveSessionContext({'workflow_project':_0x82cf71[_0x57879f(0x213)]},_0x3c9f52['session']),console[_0x57879f(0x1f1)](a41_0x536097[_0x57879f(0x26c)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x57879f(0x1f1)](a41_0x536097[_0x57879f(0x1be)](_0x57879f(0x2b7)+_0x82cf71[_0x57879f(0x213)])),0x0;if(_0x3c9f52[_0x57879f(0x1eb)])return console[_0x57879f(0x1f1)](a41_0x536097[_0x57879f(0x13f)](_0x57879f(0x29e))),0x0;if(!_0x3c9f52['yes']){const _0x4719ff=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x4719ff)return console[_0x57879f(0x1f1)](_0x57879f(0x240)),0x0;}await withSpinner(_0x57879f(0x165),()=>_0x443ef8['workflow'][_0x57879f(0x185)](_0x82cf71,{'revision':_0x53c05f}),{'verbose':_0x3c9f52[_0x57879f(0x146)]}),saveSessionContext({'workflow_project':_0x82cf71[_0x57879f(0x213)]},_0x3c9f52[_0x57879f(0x1ab)]),console['error'](a41_0x536097['green']('✔\x20Pull\x20complete'));const _0x39d435=a41_0x149b54[_0x57879f(0x1af)](process[_0x57879f(0x15f)](),_0x82cf71[_0x57879f(0x1a1)])||'.';return console[_0x57879f(0x1f1)](a41_0x536097[_0x57879f(0x1be)](_0x57879f(0x232)+_0x39d435)),console['error'](a41_0x536097[_0x57879f(0x1be)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x82cf71[_0x57879f(0x213)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x155);[a41_0x50f62(0x19c)]=a41_0x50f62(0x23b);async[a41_0x50f62(0x22e)](_0x313509){const _0x4aa578=a41_0x50f62,{options:_0x3b6d0d,args:_0x1ea53d,tdx:_0x5b2391}=_0x313509,_0x1e0619=this['resolveProjectDir'](_0x1ea53d,_0x3b6d0d),_0x3acd4b=_0x3b6d0d[_0x4aa578(0x282)],_0x1e09a2=_0x3b6d0d['skipValidation'];_0x3b6d0d[_0x4aa578(0x146)]&&(_0x1e0619&&console[_0x4aa578(0x1f1)](_0x4aa578(0x28b)+_0x1e0619),_0x3acd4b&&console[_0x4aa578(0x1f1)](_0x4aa578(0x1dd)+_0x3acd4b),_0x3b6d0d[_0x4aa578(0x1eb)]&&console[_0x4aa578(0x1f1)]('Dry\x20run:\x20yes'),_0x1e09a2&&console[_0x4aa578(0x1f1)](_0x4aa578(0x219)));let _0xa69c61;try{_0xa69c61=await withSpinner(_0x4aa578(0x171),()=>_0x5b2391[_0x4aa578(0x278)][_0x4aa578(0x260)]({'sourceDir':_0x1e0619,'revision':_0x3acd4b,'skipValidation':_0x1e09a2}),{'verbose':_0x3b6d0d[_0x4aa578(0x146)]});}catch(_0x13bf0f){if(_0x13bf0f instanceof Error&&_0x13bf0f[_0x4aa578(0x250)][_0x4aa578(0x268)](_0x4aa578(0x291)))return console[_0x4aa578(0x1f1)](a41_0x536097[_0x4aa578(0x1bc)](_0x4aa578(0x15c)),_0x4aa578(0x24c)),_0x3b6d0d[_0x4aa578(0x247)]?console[_0x4aa578(0x1f1)](a41_0x536097[_0x4aa578(0x1be)](_0x4aa578(0x253)+_0x3b6d0d[_0x4aa578(0x247)]+_0x4aa578(0x22a)+_0x3b6d0d['workflowProject']+'\x27')):console[_0x4aa578(0x1f1)](a41_0x536097[_0x4aa578(0x1be)](_0x4aa578(0x149))),0x1;throw _0x13bf0f;}const _0x41e2cc=_0xa69c61[_0x4aa578(0x217)];console[_0x4aa578(0x1f1)]('✔\x20Project:\x20'+_0x41e2cc[_0x4aa578(0x213)]),console[_0x4aa578(0x1f1)](_0x4aa578(0x180)+_0x41e2cc[_0x4aa578(0x25c)]),console[_0x4aa578(0x1f1)](_0x4aa578(0x17a)+_0x41e2cc[_0x4aa578(0x282)]),console[_0x4aa578(0x1f1)]('\x20\x20Changes:\x20'+a41_0x536097[_0x4aa578(0x26c)]('+'+_0x41e2cc['summary'][_0x4aa578(0x2ae)]+'\x20new')+',\x20'+(a41_0x536097[_0x4aa578(0x13f)]('~'+_0x41e2cc[_0x4aa578(0x13b)]['modified']+'\x20modified')+',\x20')+(a41_0x536097[_0x4aa578(0x1bc)]('-'+_0x41e2cc['summary']['deleted']+_0x4aa578(0x12b))+',\x20')+(''+a41_0x536097[_0x4aa578(0x1be)](_0x41e2cc['summary'][_0x4aa578(0x21d)]+_0x4aa578(0x18d))));for(const _0x234412 of _0x41e2cc['changes']){_0x234412[_0x4aa578(0x274)]===_0x4aa578(0x1c6)&&_0x234412[_0x4aa578(0x152)]&&(console['error']('\x0a'+a41_0x536097[_0x4aa578(0x21f)]('---\x20'+_0x234412[_0x4aa578(0x28d)])),console['error'](_0x234412[_0x4aa578(0x152)]));}if(!_0x41e2cc[_0x4aa578(0x22b)])return console['error'](a41_0x536097[_0x4aa578(0x26c)](_0x4aa578(0x2bf))),await this['showWorkflowConsoleUrl'](_0x5b2391,_0x41e2cc[_0x4aa578(0x213)],_0x3b6d0d['site']),0x0;if(_0x3b6d0d[_0x4aa578(0x1eb)])return console[_0x4aa578(0x1f1)](a41_0x536097[_0x4aa578(0x13f)](_0x4aa578(0x25f))),0x0;if(!_0x3b6d0d['yes']){const _0x412823=await confirmKey(_0x4aa578(0x134));if(!_0x412823)return console[_0x4aa578(0x1f1)](_0x4aa578(0x240)),0x0;}const _0x1ee115=await withSpinner(_0x4aa578(0x179),()=>_0x5b2391['workflow'][_0x4aa578(0x1cd)](_0x41e2cc),{'verbose':_0x3b6d0d['verbose']}),_0x5ab17f=_0x1ee115['data'];return console['error'](a41_0x536097[_0x4aa578(0x26c)]('✔\x20Push\x20complete')),console[_0x4aa578(0x1f1)](_0x4aa578(0x1f7)+_0x5ab17f['projectId']),console[_0x4aa578(0x1f1)](_0x4aa578(0x17a)+_0x5ab17f[_0x4aa578(0x282)]),await this[_0x4aa578(0x2a6)](_0x5b2391,_0x5ab17f['projectName'],_0x3b6d0d[_0x4aa578(0x17b)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{['name']='workflow:clone';[a41_0x50f62(0x19c)]=a41_0x50f62(0x194);async['execute'](_0x185f16){const _0x218cf5=a41_0x50f62,{options:_0x5b64d9,args:_0x16e095,tdx:_0x328fb8}=_0x185f16,_0x490143=this[_0x218cf5(0x1ca)](_0x16e095,_0x5b64d9),_0x217d4b=_0x5b64d9[_0x218cf5(0x1ea)],_0x49fe36=_0x5b64d9[_0x218cf5(0x282)],_0x3456f6=_0x5b64d9[_0x218cf5(0x26a)];if(!_0x490143)return console[_0x218cf5(0x1f1)](a41_0x536097[_0x218cf5(0x1bc)]('Error:'),_0x218cf5(0x1d5)),console['error'](a41_0x536097[_0x218cf5(0x1be)](_0x218cf5(0x175))),console[_0x218cf5(0x1f1)](a41_0x536097[_0x218cf5(0x1be)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x217d4b)return console[_0x218cf5(0x1f1)](a41_0x536097[_0x218cf5(0x1bc)](_0x218cf5(0x15c)),_0x218cf5(0x172)),console[_0x218cf5(0x1f1)](a41_0x536097[_0x218cf5(0x1be)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x5b64d9['verbose']&&(console[_0x218cf5(0x1f1)]('Source\x20directory:\x20'+_0x490143),console[_0x218cf5(0x1f1)](_0x218cf5(0x235)+_0x217d4b),_0x49fe36&&console[_0x218cf5(0x1f1)](_0x218cf5(0x1dd)+_0x49fe36),_0x5b64d9[_0x218cf5(0x1eb)]&&console[_0x218cf5(0x1f1)](_0x218cf5(0x18c)),_0x3456f6&&console[_0x218cf5(0x1f1)](_0x218cf5(0x219)));const _0x2bff4e=await withSpinner('Analyzing\x20project...',()=>_0x328fb8[_0x218cf5(0x278)][_0x218cf5(0x18f)](_0x490143,_0x217d4b,{'revision':_0x49fe36,'skipValidation':_0x3456f6}),{'verbose':_0x5b64d9['verbose']}),_0x25ecf1=_0x2bff4e[_0x218cf5(0x217)];console[_0x218cf5(0x1f1)](_0x218cf5(0x1b0)+_0x25ecf1[_0x218cf5(0x25c)]);_0x25ecf1[_0x218cf5(0x27f)]&&console[_0x218cf5(0x1f1)]('Source\x20project:\x20'+_0x25ecf1['sourceProjectName']);console[_0x218cf5(0x1f1)](_0x218cf5(0x235)+_0x25ecf1[_0x218cf5(0x225)]),console['error'](_0x218cf5(0x1dd)+_0x25ecf1['revision']),console[_0x218cf5(0x1f1)](_0x218cf5(0x1a4)+_0x25ecf1[_0x218cf5(0x17d)]);_0x25ecf1[_0x218cf5(0x2b9)]&&(console[_0x218cf5(0x1f1)](a41_0x536097[_0x218cf5(0x13f)](_0x218cf5(0x295)+_0x25ecf1[_0x218cf5(0x225)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x25ecf1[_0x218cf5(0x1c0)]+')')),console[_0x218cf5(0x1f1)](a41_0x536097[_0x218cf5(0x13f)](_0x218cf5(0x188))));if(_0x5b64d9[_0x218cf5(0x1eb)])return console[_0x218cf5(0x1f1)](a41_0x536097[_0x218cf5(0x13f)](_0x218cf5(0x254))),0x0;if(!_0x5b64d9[_0x218cf5(0x1dc)]){const _0x73b491=_0x25ecf1[_0x218cf5(0x27f)]||a41_0x149b54[_0x218cf5(0x2a4)](_0x490143),_0x2c89d5=_0x25ecf1['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x217d4b+'\x22\x20with\x20new\x20revision?':_0x218cf5(0x272)+_0x73b491+'\x22\x20to\x20new\x20project\x20\x22'+_0x217d4b+'\x22?',_0x41eae6=await confirmKey(_0x2c89d5);if(!_0x41eae6)return console['error']('Cancelled'),0x0;}const _0x4eb429=await withSpinner(_0x25ecf1[_0x218cf5(0x2b9)]?'Updating\x20'+_0x217d4b+_0x218cf5(0x181):_0x218cf5(0x1c2)+_0x217d4b+_0x218cf5(0x181),()=>_0x328fb8[_0x218cf5(0x278)][_0x218cf5(0x1f9)](_0x25ecf1),{'verbose':_0x5b64d9[_0x218cf5(0x146)]}),_0x19e4a1=_0x4eb429['data'];return console[_0x218cf5(0x1f1)](a41_0x536097['green'](_0x25ecf1[_0x218cf5(0x2b9)]?'✔\x20Project\x20updated':_0x218cf5(0x258))),console[_0x218cf5(0x1f1)](_0x218cf5(0x190)+_0x19e4a1[_0x218cf5(0x225)]),console[_0x218cf5(0x1f1)]('\x20\x20Project\x20ID:\x20'+_0x19e4a1[_0x218cf5(0x192)]),console[_0x218cf5(0x1f1)](_0x218cf5(0x17a)+_0x19e4a1[_0x218cf5(0x282)]),await this['showWorkflowConsoleUrl'](_0x328fb8,_0x19e4a1[_0x218cf5(0x225)],_0x5b64d9[_0x218cf5(0x17b)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a41_0x50f62(0x29f);[a41_0x50f62(0x19c)]=a41_0x50f62(0x187);async[a41_0x50f62(0x22e)](_0x518651){const _0x3ee817=a41_0x50f62,{options:_0x263c9a,args:_0x5d3e23,tdx:_0xc7405e}=_0x518651,_0x264853=_0x5d3e23[0x0];if(!_0x264853)return console[_0x3ee817(0x1f1)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x3ee817(0x1f1)](_0x3ee817(0x18a)),0x1;_0x263c9a['verbose']&&console['error'](_0x3ee817(0x199)+_0x264853);if(!_0x263c9a['yes']){const _0x257735=await confirmKey(_0x3ee817(0x19f)+_0x264853+_0x3ee817(0x2ba));if(!_0x257735)return console['error'](_0x3ee817(0x240)),0x0;}const _0x231571=await withSpinner(_0x3ee817(0x29a)+_0x264853+_0x3ee817(0x181),()=>_0xc7405e[_0x3ee817(0x278)][_0x3ee817(0x2ad)](_0x264853),{'verbose':_0x263c9a[_0x3ee817(0x146)]}),_0x2cbf18=_0x231571['data'];return console[_0x3ee817(0x1f1)](_0x3ee817(0x23f)+_0x2cbf18[_0x3ee817(0x213)]),console[_0x3ee817(0x1f1)]('\x20\x20Project\x20ID:\x20'+_0x2cbf18[_0x3ee817(0x21e)]),0x0;}}export function parseKeyValue(_0x49dc8f){const _0x54708a=a41_0x50f62,_0x465d75=_0x49dc8f[_0x54708a(0x183)]('=');if(_0x465d75===-0x1)throw new Error(_0x54708a(0x1bf)+_0x49dc8f+_0x54708a(0x1aa));const _0x3705fb=_0x49dc8f[_0x54708a(0x289)](0x0,_0x465d75),_0x14c6db=_0x49dc8f[_0x54708a(0x289)](_0x465d75+0x1);if(!_0x3705fb)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x3705fb,'value':_0x14c6db};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x1e4);[a41_0x50f62(0x19c)]=a41_0x50f62(0x14a);async[a41_0x50f62(0x22e)](_0x14e48c){const _0x128c04=a41_0x50f62,{options:_0x558234,args:_0x1dad95,tdx:_0x5bc66f}=_0x14e48c,_0x5a3fda=this['requireProject'](_0x1dad95,_0x558234);if(!_0x5a3fda)return 0x1;_0x558234['verbose']&&console[_0x128c04(0x1f1)](_0x128c04(0x199)+_0x5a3fda);const _0x2bdc01=await withSpinner(_0x128c04(0x154),()=>_0x5bc66f[_0x128c04(0x278)][_0x128c04(0x207)](_0x5a3fda),{'verbose':_0x558234[_0x128c04(0x146)]}),{secrets:_0x14a75d}=_0x2bdc01[_0x128c04(0x217)];return console[_0x128c04(0x1f1)](_0x128c04(0x1ee)+_0x14a75d[_0x128c04(0x21c)]+_0x128c04(0x297)+(_0x14a75d[_0x128c04(0x21c)]!==0x1?'s':'')),await handleSDKOutput(_0x14a75d,_0x558234),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a41_0x50f62(0x1ea)]='workflow:secrets:set';[a41_0x50f62(0x19c)]=a41_0x50f62(0x169);async[a41_0x50f62(0x22e)](_0x40dbdb){const _0xd7da09=a41_0x50f62,{options:_0x545a5a,args:_0x198085,tdx:_0x117161}=_0x40dbdb;let _0x2e570a,_0x1eab69;if(_0x198085['length']>=0x2)_0x2e570a=_0x198085[0x0],_0x1eab69=_0x198085[0x1];else{if(_0x198085['length']===0x1&&_0x545a5a[_0xd7da09(0x247)])_0x2e570a=_0x545a5a['workflowProject'],_0x1eab69=_0x198085[0x0];else return _0x198085[_0xd7da09(0x21c)]===0x1?(console['error']('Error:\x20Project\x20name\x20is\x20required'),console[_0xd7da09(0x1f1)](_0xd7da09(0x18e)),0x1):(console[_0xd7da09(0x1f1)](_0xd7da09(0x1ad)),console[_0xd7da09(0x1f1)](_0xd7da09(0x1f0)),0x1);}let _0x4cfc4e,_0x4fe0d3;try{({key:_0x4cfc4e,value:_0x4fe0d3}=parseKeyValue(_0x1eab69));}catch(_0x29ba50){return _0x29ba50 instanceof Error&&console[_0xd7da09(0x1f1)](a41_0x536097['red'](_0xd7da09(0x15c)),_0x29ba50[_0xd7da09(0x250)]),0x1;}_0x545a5a['verbose']&&(console[_0xd7da09(0x1f1)](_0xd7da09(0x199)+_0x2e570a),console[_0xd7da09(0x1f1)](_0xd7da09(0x1f6)+_0x4cfc4e));const _0x4d93b1=await withSpinner(_0xd7da09(0x19e),()=>_0x117161['workflow']['setSecret'](_0x2e570a,_0x4cfc4e,_0x4fe0d3),{'verbose':_0x545a5a['verbose']}),_0x511511=_0x4d93b1[_0xd7da09(0x217)];return console[_0xd7da09(0x1f1)]('✔\x20Secret\x20\x27'+_0x511511['key']+_0xd7da09(0x142)+_0x511511[_0xd7da09(0x213)]+'\x27'),(_0x545a5a[_0xd7da09(0x23c)]||_0x545a5a[_0xd7da09(0x13c)])&&await handleSingleObjectOutput(_0x511511,_0x545a5a),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a41_0x50f62(0x1ea)]=a41_0x50f62(0x178);[a41_0x50f62(0x19c)]=a41_0x50f62(0x16a);async[a41_0x50f62(0x22e)](_0x15f7d6){const _0x1d5e2c=a41_0x50f62,{options:_0x4b40fa,args:_0x199147,tdx:_0x4c01d7}=_0x15f7d6;let _0x450fd4,_0x5e4eec;if(_0x199147['length']>=0x2)_0x450fd4=_0x199147[0x0],_0x5e4eec=_0x199147[0x1];else{if(_0x199147[_0x1d5e2c(0x21c)]===0x1&&_0x4b40fa[_0x1d5e2c(0x247)])_0x450fd4=_0x4b40fa[_0x1d5e2c(0x247)],_0x5e4eec=_0x199147[0x0];else return _0x199147[_0x1d5e2c(0x21c)]===0x1?(console['error'](_0x1d5e2c(0x1b6)),console[_0x1d5e2c(0x1f1)](_0x1d5e2c(0x18e)),0x1):(console['error'](_0x1d5e2c(0x201)),console[_0x1d5e2c(0x1f1)](_0x1d5e2c(0x1e0)),0x1);}_0x4b40fa[_0x1d5e2c(0x146)]&&(console['error'](_0x1d5e2c(0x199)+_0x450fd4),console[_0x1d5e2c(0x1f1)](_0x1d5e2c(0x1f6)+_0x5e4eec));if(!_0x4b40fa[_0x1d5e2c(0x1dc)]){const _0x336de2=await confirmKey(_0x1d5e2c(0x2c6)+_0x5e4eec+_0x1d5e2c(0x20f)+_0x450fd4+'\x27?');if(!_0x336de2)return console[_0x1d5e2c(0x1f1)](_0x1d5e2c(0x240)),0x0;}const _0x5c7c27=await withSpinner('Deleting\x20secret...',()=>_0x4c01d7[_0x1d5e2c(0x278)][_0x1d5e2c(0x270)](_0x450fd4,_0x5e4eec),{'verbose':_0x4b40fa[_0x1d5e2c(0x146)]}),_0x490078=_0x5c7c27['data'];return console[_0x1d5e2c(0x1f1)]('✔\x20Secret\x20\x27'+_0x490078[_0x1d5e2c(0x13d)]+_0x1d5e2c(0x263)+_0x490078[_0x1d5e2c(0x213)]+'\x27'),(_0x4b40fa['json']||_0x4b40fa['jsonl'])&&await handleSingleObjectOutput(_0x490078,_0x4b40fa),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(_0x382eb3){const _0x53f156=a41_0x50f62,_0xb26082=Math[_0x53f156(0x1a8)](_0x382eb3/0x3e8),_0x294828=Math[_0x53f156(0x1a8)](_0xb26082/0x3c),_0x5e2f24=Math['floor'](_0x294828/0x3c),_0x2a405a=Math[_0x53f156(0x1a8)](_0x5e2f24/0x18);if(_0x2a405a>0x0){const _0x1198a0=_0x5e2f24%0x18;return _0x1198a0>0x0?_0x2a405a+'d\x20'+_0x1198a0+'h':_0x2a405a+'d';}else{if(_0x5e2f24>0x0){const _0x3aa537=_0x294828%0x3c;return _0x3aa537>0x0?_0x5e2f24+'h\x20'+_0x3aa537+'m':_0x5e2f24+'h';}else{if(_0x294828>0x0){const _0xc9fa16=_0xb26082%0x3c;return _0xc9fa16>0x0?_0x294828+'m\x20'+_0xc9fa16+'s':_0x294828+'m';}else return _0xb26082+'s';}}}function formatTimestamp(_0x479390,_0x299ae9){const _0x5013e7=a41_0x50f62,_0x5d9053=new Date(_0x479390),_0x288009=String(_0x5d9053[_0x5013e7(0x1d2)]())[_0x5013e7(0x25d)](0x2,'0'),_0x1d290e=String(_0x5d9053[_0x5013e7(0x23a)]())[_0x5013e7(0x25d)](0x2,'0'),_0x33e1ba=_0x288009+':'+_0x1d290e,_0x421800=_0x5d9053['getFullYear']()===_0x299ae9['getFullYear']()&&_0x5d9053[_0x5013e7(0x2c1)]()===_0x299ae9['getMonth']()&&_0x5d9053[_0x5013e7(0x151)]()===_0x299ae9[_0x5013e7(0x151)]();if(_0x421800)return _0x33e1ba;else{const _0x15d253=String(_0x5d9053['getMonth']()+0x1)[_0x5013e7(0x25d)](0x2,'0'),_0x5197fa=String(_0x5d9053[_0x5013e7(0x151)]())['padStart'](0x2,'0');return _0x15d253+'-'+_0x5197fa+'\x20'+_0x33e1ba;}}function formatDate(_0x2b885c){const _0x1b8c65=a41_0x50f62,_0x154f31=_0x2b885c['getFullYear'](),_0x695f9a=String(_0x2b885c[_0x1b8c65(0x2c1)]()+0x1)['padStart'](0x2,'0'),_0x523c45=String(_0x2b885c['getDate']())['padStart'](0x2,'0');return _0x154f31+'-'+_0x695f9a+'-'+_0x523c45;}function getTaskStateIcon(_0x5477b5){const _0x3e28d1={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x3e28d1[_0x5477b5]||'⚪';}function getBarChar(_0x4b8cd1){return _0x4b8cd1==='error'||_0x4b8cd1==='group_error'?'×':'─';}function getBarColor(_0x3c2c49){const _0x338331=a41_0x50f62,_0x32c5ac={'success':a41_0x536097['green'],'error':a41_0x536097[_0x338331(0x1bc)],'group_error':a41_0x536097['red'],'running':a41_0x536097[_0x338331(0x222)],'blocked':a41_0x536097[_0x338331(0x13f)],'planned':a41_0x536097[_0x338331(0x1be)],'canceling':a41_0x536097[_0x338331(0x13f)]};return _0x32c5ac[_0x3c2c49]||a41_0x536097[_0x338331(0x1fd)];}function parseTaskName(_0x4bc154){const _0x53d221=a41_0x50f62;let _0xca75ab=_0x4bc154[_0x53d221(0x1da)](/^\++/,'');const _0x5e2b73=_0xca75ab[_0x53d221(0x281)]('+'),_0x1e9154=_0x5e2b73[_0x53d221(0x21c)]>0x1?_0x5e2b73[_0x53d221(0x21c)]-0x2:0x0,_0x50e9ec=_0x5e2b73[_0x5e2b73[_0x53d221(0x21c)]-0x1]||_0xca75ab;return{'level':_0x1e9154,'name':'+'+_0x50e9ec};}function truncateTaskName(_0x1baf2a,_0x4cc4b7){const _0x50b6e9=a41_0x50f62,_0x311e9b=stringWidth(_0x1baf2a);if(_0x311e9b<=_0x4cc4b7)return _0x1baf2a;let _0x10df49=_0x1baf2a;while(stringWidth(_0x10df49+'…')>_0x4cc4b7&&_0x10df49[_0x50b6e9(0x21c)]>0x0){_0x10df49=_0x10df49[_0x50b6e9(0x1c3)](0x0,-0x1);}return _0x10df49+'…';}function calculateTimeScale(_0x5c7dd9,_0x54026c){const _0x557ec2=a41_0x50f62;return{'startTime':_0x5c7dd9[_0x557ec2(0x2a8)],'endTime':_0x5c7dd9['end'],'durationMs':_0x5c7dd9['duration'],'msPerChar':_0x5c7dd9['duration']/_0x54026c};}function timeToPosition(_0x1cb95f,_0x30636d,_0x350ad1){const _0x37f745=a41_0x50f62,_0x4a70e5=_0x1cb95f-_0x30636d['startTime'],_0x372c65=Math[_0x37f745(0x1a8)](_0x4a70e5/_0x30636d[_0x37f745(0x14e)]);return Math['max'](0x0,Math[_0x37f745(0x21a)](_0x372c65,_0x350ad1));}function renderTimeAxis(_0x1cf2b9,_0x815b9e){const _0x13c444=a41_0x50f62,_0x50faf8=Math[_0x13c444(0x21a)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x13c444(0x1f3)](TIMELINE_CONFIG[_0x13c444(0x1d0)],Math[_0x13c444(0x1a8)](_0x815b9e/TIMELINE_CONFIG[_0x13c444(0x170)]))),_0x292a46=_0x1cf2b9['durationMs']/(_0x50faf8-0x1),_0x3bfa5d=new Date(_0x1cf2b9['startTime']),_0x1edb76=[];for(let _0x4d2a43=0x0;_0x4d2a43<_0x50faf8;_0x4d2a43++){const _0x19e4c4=_0x1cf2b9['startTime']+_0x4d2a43*_0x292a46,_0x27d7e0=timeToPosition(_0x19e4c4,_0x1cf2b9,_0x815b9e),_0x419a8c=formatTimestamp(_0x19e4c4,_0x3bfa5d);_0x1edb76[_0x13c444(0x228)]({'pos':_0x27d7e0,'text':_0x419a8c});}const _0x1e6c30=new Array(_0x815b9e)[_0x13c444(0x2b4)]('\x20');let _0x55599c=-0x1;for(const {pos:_0x201be4,text:_0x18eaaa}of _0x1edb76){let _0x53ac4c=Math[_0x13c444(0x1f3)](0x0,_0x201be4-Math['floor'](_0x18eaaa[_0x13c444(0x21c)]/0x2));_0x53ac4c<=_0x55599c+TIMELINE_CONFIG[_0x13c444(0x1d8)]&&(_0x53ac4c=_0x55599c+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x53ac4c+_0x18eaaa[_0x13c444(0x21c)]>_0x815b9e&&(_0x53ac4c=_0x815b9e-_0x18eaaa[_0x13c444(0x21c)]);if(_0x53ac4c>=0x0&&_0x53ac4c+_0x18eaaa[_0x13c444(0x21c)]<=_0x815b9e&&_0x53ac4c>_0x55599c){for(let _0x4da7a1=0x0;_0x4da7a1<_0x18eaaa[_0x13c444(0x21c)];_0x4da7a1++){_0x1e6c30[_0x53ac4c+_0x4da7a1]=_0x18eaaa[_0x4da7a1];}_0x55599c=_0x53ac4c+_0x18eaaa[_0x13c444(0x21c)]-0x1;}}return _0x1e6c30[_0x13c444(0x1f5)]('');}function renderTaskRow(_0x4f06dd,_0x3e4484,_0x1d0158,_0x11d003){const _0x1dd0b3=a41_0x50f62,{level:_0x5ab914,name:_0x16a69f}=parseTaskName(_0x4f06dd[_0x1dd0b3(0x1ea)]),_0xdac420='\x20'['repeat'](_0x5ab914),_0x376b15=_0x4f06dd[_0x1dd0b3(0x166)]?'('+formatElapsed(_0x4f06dd['window'][_0x1dd0b3(0x1fa)])+')':'',_0x1510e8=stringWidth(_0x376b15),_0x1e89dd=_0x5ab914*0x1,_0x2b2fdd=_0x11d003-_0x1e89dd-_0x1510e8-0x1,_0x17beb3=truncateTaskName(_0x16a69f,_0x2b2fdd),_0x27ba5f=_0xdac420+_0x17beb3,_0x491246=stringWidth(_0x27ba5f),_0x2a6bfe=_0x11d003-_0x491246-_0x1510e8,_0x4072a1=_0x27ba5f+'\x20'[_0x1dd0b3(0x2b5)](Math[_0x1dd0b3(0x1f3)](0x1,_0x2a6bfe))+a41_0x536097['dim'](_0x376b15),_0x5030a3=getTaskStateIcon(_0x4f06dd[_0x1dd0b3(0x176)]),_0x25f2ca=new Array(_0x1d0158)[_0x1dd0b3(0x2b4)]('\x20');if(_0x4f06dd[_0x1dd0b3(0x166)]){const _0x668895=timeToPosition(_0x4f06dd['window'][_0x1dd0b3(0x2a8)],_0x3e4484,_0x1d0158),_0x2f732b=timeToPosition(_0x4f06dd[_0x1dd0b3(0x166)][_0x1dd0b3(0x14c)],_0x3e4484,_0x1d0158),_0x5f5058=getBarChar(_0x4f06dd[_0x1dd0b3(0x176)]),_0x2292c2=Math['max'](_0x668895+0x1,_0x2f732b);for(let _0x4ce540=_0x668895;_0x4ce540<Math['min'](_0x2292c2,_0x1d0158);_0x4ce540++){_0x25f2ca[_0x4ce540]=_0x5f5058;}}const _0x2cf26f=getBarColor(_0x4f06dd['state']),_0x30180b=_0x25f2ca[_0x1dd0b3(0x249)](_0xb50aa7=>_0xb50aa7==='\x20'?'\x20':_0x2cf26f(_0xb50aa7))[_0x1dd0b3(0x1f5)]('');return _0x5030a3+'\x20'+_0x4072a1+'│'+_0x30180b+'│';}function calculateStats(_0x3d1cce){const _0x4720d1=a41_0x50f62,_0x1bd63c={'total':_0x3d1cce[_0x4720d1(0x21c)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3eefc7 of _0x3d1cce){if(_0x3eefc7['state']==='success')_0x1bd63c[_0x4720d1(0x285)]++;else{if(_0x3eefc7['state']===_0x4720d1(0x1f1)||_0x3eefc7['state']==='group_error')_0x1bd63c[_0x4720d1(0x1f1)]++;else _0x3eefc7['state']===_0x4720d1(0x16b)?_0x1bd63c[_0x4720d1(0x16b)]++:_0x1bd63c[_0x4720d1(0x236)]++;}}return _0x1bd63c;}function formatStats(_0x20ba22){const _0x1fe722=a41_0x50f62;return['Total:\x20'+_0x20ba22[_0x1fe722(0x15b)],'✅\x20'+_0x20ba22[_0x1fe722(0x285)],'❌\x20'+_0x20ba22[_0x1fe722(0x1f1)],_0x1fe722(0x1c7)+_0x20ba22[_0x1fe722(0x16b)],'⏳\x20'+_0x20ba22[_0x1fe722(0x236)]][_0x1fe722(0x1f5)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a41_0x50f62(0x229);['description']='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a41_0x50f62(0x22e)](_0x101b38){const _0x4a5aa5=a41_0x50f62,{options:_0x4bba03,args:_0x276eb0,tdx:_0x254be5}=_0x101b38;let _0x18596b,_0x442a00,_0xd2912e=![];if(_0x276eb0[0x0]){if(_0x276eb0[0x0][_0x4a5aa5(0x268)]('.')){const _0x3c618a=this[_0x4a5aa5(0x16f)](_0x276eb0,_0x4bba03);if(!_0x3c618a)return 0x1;_0x18596b=_0x3c618a[_0x4a5aa5(0x213)],_0x442a00=_0x3c618a[_0x4a5aa5(0x209)];}else{_0x442a00=_0x276eb0[0x0],_0x18596b=_0x4bba03[_0x4a5aa5(0x247)];if(!_0x18596b)return console[_0x4a5aa5(0x1f1)](a41_0x536097[_0x4a5aa5(0x1bc)](_0x4a5aa5(0x15c)),_0x4a5aa5(0x27c)),0x1;_0xd2912e=!![];}}else{const _0x183370=this[_0x4a5aa5(0x16f)](_0x276eb0,_0x4bba03);if(!_0x183370)return 0x1;_0x18596b=_0x183370[_0x4a5aa5(0x213)],_0x442a00=_0x183370[_0x4a5aa5(0x209)];}if(_0x4bba03[_0x4a5aa5(0x146)]){if(_0x18596b&&_0x442a00)console[_0x4a5aa5(0x1f1)]('Filter:\x20'+_0x18596b+'.'+_0x442a00);else _0x18596b&&console[_0x4a5aa5(0x1f1)](_0x4a5aa5(0x2bd)+_0x18596b);}const _0x6115d0=_0x4bba03[_0x4a5aa5(0x1f2)],_0x8ef34a=_0x4bba03['sessionId'];if(_0x6115d0){_0x8ef34a&&console[_0x4a5aa5(0x1f1)](a41_0x536097[_0x4a5aa5(0x13f)](_0x4a5aa5(0x1b3)),_0x4a5aa5(0x2a7));const _0x34c13b=_0x4bba03['follow'];return _0x34c13b?await this['pollTimeline'](_0x101b38,_0x6115d0):await this[_0x4a5aa5(0x25b)](_0x101b38,_0x6115d0,_0x4bba03),0x0;}if(_0x8ef34a){const _0x32976e=await withSpinner(_0x4a5aa5(0x186),()=>_0x254be5[_0x4a5aa5(0x278)]['sessions']({'projectName':_0x18596b,'workflowName':_0x442a00,'limit':0x64}),{'verbose':_0x4bba03[_0x4a5aa5(0x146)]}),_0xba4b79=_0x32976e[_0x4a5aa5(0x217)][_0x4a5aa5(0x23e)](_0x179c5e=>_0x179c5e['id']===_0x8ef34a);if(!_0xba4b79)return console[_0x4a5aa5(0x1f1)](a41_0x536097[_0x4a5aa5(0x1bc)](_0x4a5aa5(0x15c)),_0x4a5aa5(0x20d)+_0x8ef34a),0x1;if(!_0xba4b79[_0x4a5aa5(0x130)]?.['id'])return console[_0x4a5aa5(0x1f1)](a41_0x536097[_0x4a5aa5(0x1bc)]('Error:'),_0x4a5aa5(0x2ac)+_0x8ef34a+_0x4a5aa5(0x182)),0x1;const _0x1ac95f=_0xba4b79['lastAttempt']['id'];_0x4bba03[_0x4a5aa5(0x146)]&&console[_0x4a5aa5(0x1f1)]('Using\x20attempt\x20'+_0x1ac95f+'\x20from\x20session\x20'+_0x8ef34a);const _0x20574b=_0x4bba03[_0x4a5aa5(0x12a)];return _0x20574b?await this[_0x4a5aa5(0x1cc)](_0x101b38,_0x1ac95f):await this[_0x4a5aa5(0x25b)](_0x101b38,_0x1ac95f,_0x4bba03),0x0;}const _0x221d38=await withSpinner(_0x4a5aa5(0x153),()=>_0x254be5[_0x4a5aa5(0x278)][_0x4a5aa5(0x29d)]({'projectName':_0x18596b,'workflowName':_0x442a00,'limit':_0x4bba03[_0x4a5aa5(0x1a9)]||0x32}),{'verbose':_0x4bba03[_0x4a5aa5(0x146)]}),_0xab960a=_0x221d38[_0x4a5aa5(0x217)];if(_0xab960a[_0x4a5aa5(0x21c)]===0x0){if(_0x18596b&&_0x442a00)console[_0x4a5aa5(0x1f1)]('No\x20sessions\x20found\x20for:\x20'+_0x18596b+'.'+_0x442a00);else _0x18596b?console[_0x4a5aa5(0x1f1)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x18596b):(console['error'](_0x4a5aa5(0x121)),console['error'](a41_0x536097['dim'](_0x4a5aa5(0x245))));return 0x0;}_0xab960a[_0x4a5aa5(0x1d9)]((_0x5a1556,_0x534291)=>{const _0x1ae27f=_0x4a5aa5,_0x2221b0=_0x5a1556[_0x1ae27f(0x1c4)]||'',_0x3a8efa=_0x534291['sessionTime']||'';return _0x3a8efa[_0x1ae27f(0x1c5)](_0x2221b0);});if(_0x4bba03['json']||_0x4bba03[_0x4a5aa5(0x13c)])return await handleSDKOutput(_0xab960a,_0x4bba03),0x0;let _0x65c8b;if(_0xd2912e){const _0x14c140=_0xab960a[0x0];if(!_0x14c140['lastAttempt']?.['id'])return console['error'](_0x4a5aa5(0x269)),0x0;_0x65c8b=_0x14c140[_0x4a5aa5(0x130)]['id'],_0x4bba03[_0x4a5aa5(0x146)]&&console[_0x4a5aa5(0x1f1)](_0x4a5aa5(0x264)+_0x14c140[_0x4a5aa5(0x1c4)]);}else{const _0x56ac71=_0xab960a[_0x4a5aa5(0x249)](_0x11071e=>{const _0x388105=_0x4a5aa5,_0x95bac3=getAttemptStatusDisplay(_0x11071e[_0x388105(0x130)]);return{'title':_0x11071e[_0x388105(0x14f)]?.[_0x388105(0x1ea)]+'.'+_0x11071e['workflow']?.[_0x388105(0x1ea)]+_0x388105(0x1f8)+_0x11071e[_0x388105(0x1c4)]+'\x20'+_0x95bac3['icon'],'value':_0x11071e[_0x388105(0x130)]?.['id']||'','description':_0x95bac3['text']};}),_0x516be2=await a41_0x3c8366({'type':_0x4a5aa5(0x252),'name':_0x4a5aa5(0x1f2),'message':_0x4a5aa5(0x287),'choices':_0x56ac71['filter'](_0xc69743=>_0xc69743[_0x4a5aa5(0x144)]!=='')});if(!_0x516be2['attemptId'])return 0x0;_0x65c8b=_0x516be2[_0x4a5aa5(0x1f2)];}const _0x350043=_0x4bba03[_0x4a5aa5(0x12a)];return _0x350043?await this['pollTimeline'](_0x101b38,_0x65c8b):await this[_0x4a5aa5(0x25b)](_0x101b38,_0x65c8b,_0x4bba03),0x0;}async[a41_0x50f62(0x25b)](_0x2155ad,_0x5b331c,_0x5142d0){const _0x3f8f40=a41_0x50f62,{tdx:_0x45a8f0}=_0x2155ad;let _0x2ed01c,_0x2fc7cf;try{[_0x2ed01c,_0x2fc7cf]=await Promise[_0x3f8f40(0x280)]([_0x45a8f0[_0x3f8f40(0x278)][_0x3f8f40(0x1d3)](_0x5b331c),_0x45a8f0['workflow'][_0x3f8f40(0x1b5)](_0x5b331c,![])]);}catch(_0xd143f9){console[_0x3f8f40(0x1f1)](a41_0x536097[_0x3f8f40(0x1bc)](_0x3f8f40(0x246)));_0x5142d0[_0x3f8f40(0x146)]&&console[_0x3f8f40(0x1f1)](_0xd143f9);throw _0xd143f9;}if(_0x5142d0[_0x3f8f40(0x23c)]||_0x5142d0[_0x3f8f40(0x13c)]){const _0x288327=this['buildTimelineData'](_0x2ed01c,_0x2fc7cf);await handleSDKOutput([_0x288327],_0x5142d0);return;}const _0x3a2aa5=_0x45a8f0[_0x3f8f40(0x220)]['site'],_0x3436fa=this[_0x3f8f40(0x276)](_0x2ed01c,_0x2fc7cf,_0x3a2aa5);console[_0x3f8f40(0x197)](_0x3436fa);}async['pollTimeline'](_0x5edbf4,_0x2cef){const _0x5a649b=a41_0x50f62,{tdx:_0x1c057f}=_0x5edbf4,_0x7c57a9=TIMELINE_CONFIG[_0x5a649b(0x12c)],_0x19030f=TIMELINE_CONFIG[_0x5a649b(0x22c)];let _0x4917af=0x0;while(_0x4917af<_0x19030f){process[_0x5a649b(0x24f)]['isTTY']&&process[_0x5a649b(0x24f)][_0x5a649b(0x218)]('\x1bc');let _0x2ec3d4,_0x38e13c;try{[_0x2ec3d4,_0x38e13c]=await Promise[_0x5a649b(0x280)]([_0x1c057f[_0x5a649b(0x278)][_0x5a649b(0x1d3)](_0x2cef),_0x1c057f[_0x5a649b(0x278)]['tasks'](_0x2cef,![])]);}catch(_0x13b33a){console[_0x5a649b(0x1f1)](a41_0x536097[_0x5a649b(0x1bc)](_0x5a649b(0x1d7)));_0x4917af>0x0&&console[_0x5a649b(0x1f1)](a41_0x536097[_0x5a649b(0x1be)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x4917af));throw _0x13b33a;}const _0x2a8a8b=_0x1c057f[_0x5a649b(0x220)][_0x5a649b(0x17b)],_0x4957a8=this[_0x5a649b(0x276)](_0x2ec3d4,_0x38e13c,_0x2a8a8b);console['log'](_0x4957a8);const _0x1286ae=_0x2ec3d4[_0x5a649b(0x27d)]&&_0x38e13c[_0x5a649b(0x237)](_0x4a53eb=>_0x4a53eb[_0x5a649b(0x176)]!==_0x5a649b(0x16b)&&_0x4a53eb[_0x5a649b(0x176)]!==_0x5a649b(0x16c));if(_0x1286ae){console[_0x5a649b(0x1f1)](a41_0x536097[_0x5a649b(0x26c)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x5a649b(0x1f1)](a41_0x536097['dim']('\x0aPolling...\x20('+_0x4917af*0x2+_0x5a649b(0x242))),await new Promise(_0x52fda8=>setTimeout(_0x52fda8,_0x7c57a9)),_0x4917af++;}_0x4917af>=_0x19030f&&console[_0x5a649b(0x1f1)](a41_0x536097[_0x5a649b(0x13f)](_0x5a649b(0x29b)));}[a41_0x50f62(0x276)](_0x383538,_0x288f8c,_0xa88bd){const _0x2af0d6=a41_0x50f62,_0x16a5fd=[],_0x384c3f=TIMELINE_CONFIG[_0x2af0d6(0x267)],_0x31b32d=0x5,_0x5daa4e=process[_0x2af0d6(0x24f)]['columns']||0x78,_0x27e040=_0x5daa4e-_0x384c3f-_0x31b32d,_0x511e0b=Math[_0x2af0d6(0x1f3)](TIMELINE_CONFIG[_0x2af0d6(0x1b7)],Math[_0x2af0d6(0x21a)](_0x27e040,TIMELINE_CONFIG[_0x2af0d6(0x244)])),_0x571850=new Date(_0x383538[_0x2af0d6(0x271)])['getTime'](),_0xb5955=_0x383538[_0x2af0d6(0x265)]?new Date(_0x383538[_0x2af0d6(0x265)])[_0x2af0d6(0x18b)]():Date[_0x2af0d6(0x1ba)](),_0x388e4e={'start':_0x571850,'end':_0xb5955,'duration':_0xb5955-_0x571850},_0x188e51=new Map(),_0x7f2a00=[];for(const _0x2c9629 of _0x288f8c){if(_0x2c9629[_0x2af0d6(0x2b6)]){const _0x8edffd=new Date(_0x2c9629[_0x2af0d6(0x2b6)])[_0x2af0d6(0x18b)](),_0x489a7c=_0x2c9629['updatedAt']?new Date(_0x2c9629[_0x2af0d6(0x196)])[_0x2af0d6(0x18b)]():Date[_0x2af0d6(0x1ba)](),_0x32f9ac={'start':_0x8edffd,'end':_0x489a7c,'duration':_0x489a7c-_0x8edffd};_0x188e51[_0x2af0d6(0x17f)](_0x2c9629['id'],_0x32f9ac),_0x7f2a00['push']({'name':_0x2c9629[_0x2af0d6(0x11e)],'state':_0x2c9629[_0x2af0d6(0x176)]||_0x2af0d6(0x20b),'window':_0x32f9ac});}else _0x7f2a00[_0x2af0d6(0x228)]({'name':_0x2c9629[_0x2af0d6(0x11e)],'state':_0x2c9629[_0x2af0d6(0x176)]||_0x2af0d6(0x16c),'window':undefined});}_0x7f2a00[_0x2af0d6(0x1d9)]((_0x28e58c,_0x5aa39d)=>{const _0x5c97c=_0x2af0d6;if(!_0x28e58c[_0x5c97c(0x166)])return 0x1;if(!_0x5aa39d[_0x5c97c(0x166)])return-0x1;return _0x28e58c[_0x5c97c(0x166)]['start']-_0x5aa39d[_0x5c97c(0x166)][_0x5c97c(0x2a8)];});const _0x3a5772=_0x7f2a00[_0x2af0d6(0x21c)],_0xf875c0=_0x3a5772>TIMELINE_CONFIG[_0x2af0d6(0x1ef)];_0xf875c0&&_0x7f2a00[_0x2af0d6(0x15d)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x9f8858=calculateTimeScale(_0x388e4e,_0x511e0b),_0x432b89=_0x383538[_0x2af0d6(0x27d)]?_0x383538['success']?a41_0x536097[_0x2af0d6(0x26c)](_0x2af0d6(0x285)):a41_0x536097['red'](_0x2af0d6(0x1f1)):a41_0x536097[_0x2af0d6(0x222)]('running'),_0x14ae8c=_0x383538[_0x2af0d6(0x14f)]?.['id'],_0x6ea170=_0x383538[_0x2af0d6(0x162)];let _0x4fbb6d;if(_0x14ae8c&&_0x6ea170){const _0x295cc2=getWorkflowAttemptUrl(_0xa88bd,_0x14ae8c,_0x6ea170,_0x383538['id']);_0x4fbb6d=hyperlink(a41_0x536097[_0x2af0d6(0x1be)](_0x383538['id']),_0x295cc2);}else _0x4fbb6d=a41_0x536097[_0x2af0d6(0x1be)](_0x383538['id']);_0x16a5fd[_0x2af0d6(0x228)](_0x2af0d6(0x138)+_0x4fbb6d+_0x2af0d6(0x1f8)+_0x432b89+_0x2af0d6(0x1f8)+formatElapsed(_0x388e4e[_0x2af0d6(0x1fa)]));if(_0x7f2a00['length']>0x0){const _0x24de40=renderTimeAxis(_0x9f8858,_0x511e0b),_0x4318f9=new Date(_0x388e4e[_0x2af0d6(0x2a8)]),_0x3d8c54=formatDate(_0x4318f9),_0x15f1dc=TIMELINE_CONFIG[_0x2af0d6(0x189)]+TIMELINE_CONFIG[_0x2af0d6(0x261)]+_0x384c3f,_0x2f4cda=_0x3d8c54['padStart'](_0x15f1dc),_0x4a589b=a41_0x536097[_0x2af0d6(0x1be)](_0x2f4cda);_0x16a5fd[_0x2af0d6(0x228)](_0x4a589b+'\x20'+_0x24de40);for(const _0x418dac of _0x7f2a00){_0x16a5fd[_0x2af0d6(0x228)](renderTaskRow(_0x418dac,_0x9f8858,_0x511e0b,_0x384c3f));}const _0x43b049=calculateStats(_0x7f2a00);_0x16a5fd['push'](formatStats(_0x43b049)),_0xf875c0&&_0x16a5fd['push'](a41_0x536097['yellow'](_0x2af0d6(0x11f)+TIMELINE_CONFIG[_0x2af0d6(0x1ef)]+_0x2af0d6(0x1e2)+_0x3a5772+_0x2af0d6(0x168))),_0x16a5fd[_0x2af0d6(0x228)](''),_0x16a5fd[_0x2af0d6(0x228)](a41_0x536097['dim']('💡\x20Tip:\x20Use\x20')+(_0x2af0d6(0x27e)+_0x383538['id']+_0x2af0d6(0x135))+a41_0x536097[_0x2af0d6(0x1be)](_0x2af0d6(0x1b4)));}else _0x16a5fd['push'](_0x2af0d6(0x1ae));return _0x16a5fd[_0x2af0d6(0x1f5)]('\x0a');}['buildTimelineData'](_0x305f90,_0x3f9f52){const _0x36f2fb=a41_0x50f62,_0x25ad92=new Date(_0x305f90[_0x36f2fb(0x271)])[_0x36f2fb(0x18b)](),_0x100728=_0x305f90[_0x36f2fb(0x265)]?new Date(_0x305f90[_0x36f2fb(0x265)])[_0x36f2fb(0x18b)]():Date['now'](),_0x50c6a7=_0x100728-_0x25ad92,_0x54127f=[];for(const _0x1fdf36 of _0x3f9f52){if(_0x1fdf36[_0x36f2fb(0x2b6)]){const _0x4eab45=new Date(_0x1fdf36[_0x36f2fb(0x2b6)])[_0x36f2fb(0x18b)](),_0x5c2914=_0x1fdf36[_0x36f2fb(0x196)]?new Date(_0x1fdf36[_0x36f2fb(0x196)])[_0x36f2fb(0x18b)]():Date[_0x36f2fb(0x1ba)]();_0x54127f[_0x36f2fb(0x228)]({'name':_0x1fdf36[_0x36f2fb(0x11e)],'state':_0x1fdf36['state']||_0x36f2fb(0x20b),'window':{'start':_0x4eab45,'end':_0x5c2914,'duration':_0x5c2914-_0x4eab45}});}else _0x54127f['push']({'name':_0x1fdf36[_0x36f2fb(0x11e)],'state':_0x1fdf36[_0x36f2fb(0x176)]||_0x36f2fb(0x16c),'window':undefined});}const _0x164c6d=calculateStats(_0x54127f);return{'attempt':{'id':_0x305f90['id'],'status':_0x305f90[_0x36f2fb(0x27d)]?_0x305f90[_0x36f2fb(0x285)]?_0x36f2fb(0x285):_0x36f2fb(0x1f1):_0x36f2fb(0x16b),'createdAt':_0x305f90[_0x36f2fb(0x271)],'finishedAt':_0x305f90[_0x36f2fb(0x265)],'duration_ms':_0x50c6a7},'tasks':_0x54127f[_0x36f2fb(0x249)](_0x753e97=>({'name':_0x753e97[_0x36f2fb(0x1ea)],'state':_0x753e97[_0x36f2fb(0x176)],'startedAt':_0x753e97[_0x36f2fb(0x166)]?new Date(_0x753e97[_0x36f2fb(0x166)][_0x36f2fb(0x2a8)])[_0x36f2fb(0x1e8)]():null,'updatedAt':_0x753e97[_0x36f2fb(0x166)]?new Date(_0x753e97[_0x36f2fb(0x166)][_0x36f2fb(0x14c)])[_0x36f2fb(0x1e8)]():null,'duration_ms':_0x753e97[_0x36f2fb(0x166)]?.[_0x36f2fb(0x1fa)]||null})),'stats':_0x164c6d};}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x9dfb6b,_0x3a9f5a){const _0x3596f0=a40_0x3937,_0x131702=_0x9dfb6b();while(!![]){try{const _0x1a06d7=parseInt(_0x3596f0(0x1be))/0x1*(parseInt(_0x3596f0(0x1c0))/0x2)+parseInt(_0x3596f0(0x1bd))/0x3*(parseInt(_0x3596f0(0x1b8))/0x4)+-parseInt(_0x3596f0(0x1b9))/0x5+-parseInt(_0x3596f0(0x1c4))/0x6+-parseInt(_0x3596f0(0x1b4))/0x7+-parseInt(_0x3596f0(0x1bb))/0x8*(-parseInt(_0x3596f0(0x1c1))/0x9)+-parseInt(_0x3596f0(0x1c2))/0xa;if(_0x1a06d7===_0x3a9f5a)break;else _0x131702['push'](_0x131702['shift']());}catch(_0x383775){_0x131702['push'](_0x131702['shift']());}}}(a40_0x5c9d,0x56e75));function a40_0x3937(_0x978f03,_0xcea0a2){_0x978f03=_0x978f03-0x1b4;const _0x5c9dbf=a40_0x5c9d();let _0x3937cd=_0x5c9dbf[_0x978f03];return _0x3937cd;}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x298d49=a40_0x3937,_0x3c531e=getVersion(),_0x54a36d=platform(),_0x20e26d=process[_0x298d49(0x1c3)]['replace']('v','');return _0x298d49(0x1c5)+_0x3c531e+'\x20('+_0x54a36d+_0x298d49(0x1b7)+_0x20e26d+')';}export function getAuthHeaders(_0x244831,_0x216a8e){const _0x5c8de1=a40_0x3937,_0x451b55=getVersion(),_0x172ce1={'User-Agent':getUserAgent(),'X-TD-Client':_0x5c8de1(0x1b6),'X-TD-Client-Version':_0x451b55};return _0x216a8e&&(_0x172ce1[_0x5c8de1(0x1bf)]=_0x5c8de1(0x1b5)+_0x216a8e),_0x172ce1;}function a40_0x5c9d(){const _0x4b753c=['TD1\x20','tdx',';\x20node/','12QKMVVT','1638705wkYqPB','length','749320cCLvSt','X-Trino-User','575109kjIgjc','6TaPgiI','Authorization','167452zSdBpI','45dszQEi','64060YoBvEy','version','1311306khlggk','tdx/','entries','4459945NtgIOq'];a40_0x5c9d=function(){return _0x4b753c;};return a40_0x5c9d();}export function toHeaderRecord(_0x46faa8){const _0x2a3c22=a40_0x3937,_0x264cdb={};for(const [_0x524fe6,_0x2c0161]of Object[_0x2a3c22(0x1c6)](_0x46faa8)){_0x2c0161!==undefined&&(_0x264cdb[_0x524fe6]=_0x2c0161);}return _0x264cdb;}export function getTrinoHeaders(_0x4d0ddc,_0x473d6f){const _0x5356f8=a40_0x3937,_0x5e0537=getAuthHeaders(_0x4d0ddc,_0x473d6f),_0xcbeb08=toHeaderRecord(_0x5e0537);return delete _0xcbeb08[_0x5356f8(0x1bf)],_0x473d6f&&(_0xcbeb08[_0x5356f8(0x1bc)]=_0x473d6f),_0xcbeb08;}export function hasAPIKey(_0xd1fee3){const _0x11f685=a40_0x3937,_0x24b40a=getAPIKey(_0xd1fee3);return _0x24b40a!==undefined&&_0x24b40a[_0x11f685(0x1ba)]>0x0;}
1
+ function a42_0x1eb7(){const _0x344f4a=['809577nDNZCX','123590EUJlta','tdx/','24fePRdn',';\x20node/','77BrwHOt','length','33ldLMme','replace','TD1\x20','tdx','4UrIwbx','entries','Authorization','63978uLIrxV','92215UeaZOA','100176nITjjj','99hVWTHS','75286uoOhMU','389016ToURja'];a42_0x1eb7=function(){return _0x344f4a;};return a42_0x1eb7();}(function(_0x138053,_0x495891){const _0x1d3aa9=a42_0x2841,_0x5cef54=_0x138053();while(!![]){try{const _0x39f91d=parseInt(_0x1d3aa9(0x98))/0x1*(-parseInt(_0x1d3aa9(0x9f))/0x2)+parseInt(_0x1d3aa9(0xa1))/0x3+-parseInt(_0x1d3aa9(0xa4))/0x4*(-parseInt(_0x1d3aa9(0x9c))/0x5)+-parseInt(_0x1d3aa9(0x9b))/0x6*(-parseInt(_0x1d3aa9(0xa6))/0x7)+-parseInt(_0x1d3aa9(0x9d))/0x8*(parseInt(_0x1d3aa9(0x9e))/0x9)+parseInt(_0x1d3aa9(0xa2))/0xa*(-parseInt(_0x1d3aa9(0x94))/0xb)+parseInt(_0x1d3aa9(0xa0))/0xc;if(_0x39f91d===_0x495891)break;else _0x5cef54['push'](_0x5cef54['shift']());}catch(_0x4758b0){_0x5cef54['push'](_0x5cef54['shift']());}}}(a42_0x1eb7,0x32025));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';function a42_0x2841(_0x269e8d,_0x26a37f){_0x269e8d=_0x269e8d-0x93;const _0x1eb7ac=a42_0x1eb7();let _0x28414d=_0x1eb7ac[_0x269e8d];return _0x28414d;}export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x2a1f0c=a42_0x2841,_0x2ab420=getVersion(),_0x4c037e=platform(),_0x2649b4=process['version'][_0x2a1f0c(0x95)]('v','');return _0x2a1f0c(0xa3)+_0x2ab420+'\x20('+_0x4c037e+_0x2a1f0c(0xa5)+_0x2649b4+')';}export function getAuthHeaders(_0x39824b,_0x2c0ae8){const _0x48dea2=a42_0x2841,_0x118c94=getVersion(),_0x4d96f6={'User-Agent':getUserAgent(),'X-TD-Client':_0x48dea2(0x97),'X-TD-Client-Version':_0x118c94};return _0x2c0ae8&&(_0x4d96f6[_0x48dea2(0x9a)]=_0x48dea2(0x96)+_0x2c0ae8),_0x4d96f6;}export function toHeaderRecord(_0x3e35fb){const _0x337e48=a42_0x2841,_0x2a8a83={};for(const [_0x20213c,_0x2cf860]of Object[_0x337e48(0x99)](_0x3e35fb)){_0x2cf860!==undefined&&(_0x2a8a83[_0x20213c]=_0x2cf860);}return _0x2a8a83;}export function getTrinoHeaders(_0x2f2a5c,_0x15df78){const _0x4851fc=a42_0x2841,_0x21fe99=getAuthHeaders(_0x2f2a5c,_0x15df78),_0x40587b=toHeaderRecord(_0x21fe99);return delete _0x40587b[_0x4851fc(0x9a)],_0x15df78&&(_0x40587b['X-Trino-User']=_0x15df78),_0x40587b;}export function hasAPIKey(_0x557379){const _0x345b02=a42_0x2841,_0x9bb38=getAPIKey(_0x557379);return _0x9bb38!==undefined&&_0x9bb38[_0x345b02(0x93)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x571cdc,_0x37b252){const _0x373d47=a41_0x1368,_0x36b67d=_0x571cdc();while(!![]){try{const _0x46b1ae=parseInt(_0x373d47(0xd3))/0x1*(-parseInt(_0x373d47(0xda))/0x2)+parseInt(_0x373d47(0x105))/0x3*(parseInt(_0x373d47(0xee))/0x4)+-parseInt(_0x373d47(0x114))/0x5*(-parseInt(_0x373d47(0xf8))/0x6)+parseInt(_0x373d47(0xf5))/0x7*(parseInt(_0x373d47(0xd1))/0x8)+parseInt(_0x373d47(0xef))/0x9*(-parseInt(_0x373d47(0x112))/0xa)+parseInt(_0x373d47(0xea))/0xb+-parseInt(_0x373d47(0xdc))/0xc*(-parseInt(_0x373d47(0xf9))/0xd);if(_0x46b1ae===_0x37b252)break;else _0x36b67d['push'](_0x36b67d['shift']());}catch(_0x1e6324){_0x36b67d['push'](_0x36b67d['shift']());}}}(a41_0x5c4e,0x20fed));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';function a41_0x5c4e(){const _0xbd03f1=['stderr','[logs]','padEnd','noColor','[rule]','red','rule','varchar','jsonl','1556907fdALuN','map','join','end','1132QxhRMH','747ArAIfu','yellow','isTTY','max','list','filter','205471bbXZKi','boolean','keys','6gVPyDB','26IjgzRT','pipe','stdout','json','error','debug','stringify','length','format','number','color','tsv','1857wnXMDa','trim','forEach','query','sdk-result','log','output','stdin','inherit','resolve','less','[query]','-FXRSn','11350IwUnKC','write','72455QRvsKq','split','table','repeat','limit','8jQtzYt','No\x20data','69570nclcHs','entries','cmdout','string','[Object]','object','params','6OhGBkm','[error]','465036FCjyTM','push','bold','blue','FINISHED'];a41_0x5c4e=function(){return _0xbd03f1;};return a41_0x5c4e();}import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a41_0x59ae3d from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1718a2){const _0x17c207=a41_0x1368;return _0x1718a2[_0x17c207(0x101)]===_0x17c207(0xfc)||_0x1718a2[_0x17c207(0x101)]===_0x17c207(0xe9)||_0x1718a2[_0x17c207(0x101)]===_0x17c207(0x104)||_0x1718a2[_0x17c207(0x101)]===_0x17c207(0x116)||_0x1718a2[_0x17c207(0xfc)]===!![]||_0x1718a2[_0x17c207(0xe9)]===!![]||_0x1718a2['tsv']===!![]||_0x1718a2[_0x17c207(0x116)]===!![];}export function parseOutputOptions(_0x3c6383){const _0x51b638=a41_0x1368;return{'format':_0x3c6383[_0x51b638(0x101)]||_0x51b638(0x116),'output':_0x3c6383[_0x51b638(0x10b)]||'','limit':_0x3c6383['limit'],'color':_0x3c6383[_0x51b638(0x103)],'noColor':_0x3c6383[_0x51b638(0xe4)]};}function convertSDKResultToQueryResult(_0x3c6045){const _0x5a07b4=a41_0x1368,_0x4ef229=[];if(_0x3c6045[_0x5a07b4(0x100)]>0x0){const _0x6d98e5=_0x3c6045[0x0];for(const [_0x4534bd,_0x274701]of Object['entries'](_0x6d98e5)){let _0x305754=_0x5a07b4(0xe8);if(typeof _0x274701===_0x5a07b4(0x102))_0x305754=Number['isInteger'](_0x274701)?'bigint':'double';else{if(typeof _0x274701===_0x5a07b4(0xf6))_0x305754=_0x5a07b4(0xf6);else _0x274701===null&&(_0x305754='varchar');}_0x4ef229[_0x5a07b4(0xdd)]({'name':_0x4534bd,'type':_0x305754});}}return{'queryId':_0x5a07b4(0x109),'columns':_0x4ef229,'data':_0x3c6045,'stats':{'state':_0x5a07b4(0xe0),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3c6045[_0x5a07b4(0x100)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x4a767b,_0x338d24){const _0x2b3857=convertSDKResultToQueryResult(_0x4a767b);return formatQueryOutput(_0x2b3857,_0x338d24);}export async function formatQueryOutput(_0x3affba,_0x53a97b){const _0x1423de=a41_0x1368,{format:_0x33640b,limit:_0xd209b5,output:_0x1e0e8b,color:_0x6e545d,noColor:_0x147150}=_0x53a97b,_0x1a329b=Boolean(_0x1e0e8b)&&!_0x6e545d,_0x466282={'color':_0x6e545d,'noColor':_0x147150||_0x1a329b};if(_0x33640b===_0x1423de(0x116)){const _0x25e2e0=shouldUseLess(_0x33640b,_0x1e0e8b);return formatAsTable(_0x3affba,_0xd209b5,_0x25e2e0,_0x466282);}else{if(_0x33640b===_0x1423de(0xfc))return formatAsJSON(_0x3affba,_0x466282);else return _0x33640b==='jsonl'?formatAsJSONL(_0x3affba,_0x466282):formatQueryResult(_0x3affba,_0x33640b);}}function shouldUseLess(_0x21c61b,_0x309fc8){const _0x27f9ff=a41_0x1368;return(_0x21c61b===_0x27f9ff(0x116)||_0x21c61b===_0x27f9ff(0xf3))&&process[_0x27f9ff(0xfb)][_0x27f9ff(0xf1)]&&!_0x309fc8;}export function resolveOutputOptions(_0x3fc95b){const _0x511c79=a41_0x1368,_0x46e70c=resolveOutputFormat(_0x3fc95b[_0x511c79(0x101)],_0x3fc95b['output'],'table');let _0x38d375=typeof _0x3fc95b[_0x511c79(0x118)]===_0x511c79(0x102)?_0x3fc95b[_0x511c79(0x118)]:parseInt(_0x3fc95b['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x582098=_0x3fc95b[_0x511c79(0x10b)]||'';return shouldUseLess(_0x46e70c,_0x582098)&&(_0x38d375=Infinity),{'format':_0x46e70c,'output':_0x582098,'limit':_0x38d375,'color':_0x3fc95b[_0x511c79(0x103)],'noColor':_0x3fc95b[_0x511c79(0xe4)]};}function a41_0x1368(_0x437b32,_0xc12778){_0x437b32=_0x437b32-0xd1;const _0x5c4e66=a41_0x5c4e();let _0x136898=_0x5c4e66[_0x437b32];return _0x136898;}export function writeOutput(_0x1e36a6,_0x329893,_0x205e12){const _0x267152=a41_0x1368;return _0x329893?(writeFileSync(_0x329893,_0x1e36a6),console['error']('Results\x20saved\x20to\x20'+_0x329893),Promise[_0x267152(0x10e)]()):shouldUseLess(_0x205e12||'','')?new Promise(_0x3828d0=>{const _0x841226=_0x267152,_0xc4b313=spawn(_0x841226(0x10f),[_0x841226(0x111)],{'stdio':[_0x841226(0xfa),'inherit',_0x841226(0x10d)]});let _0x55966b=![];_0xc4b313['on'](_0x841226(0xfd),()=>{!_0x55966b&&(_0x55966b=!![],console['log'](_0x1e36a6),_0x3828d0());}),_0xc4b313['on']('close',()=>{!_0x55966b&&(_0x55966b=!![],_0x3828d0());}),_0xc4b313['on']('spawn',()=>{const _0xb97066=_0x841226;!_0x55966b&&_0xc4b313['stdin']&&(_0xc4b313[_0xb97066(0x10c)]['on'](_0xb97066(0xfd),()=>{}),_0xc4b313['stdin'][_0xb97066(0x113)](_0x1e36a6),_0xc4b313[_0xb97066(0x10c)][_0xb97066(0xed)]());}),!_0xc4b313[_0x841226(0x10c)]&&(!_0x55966b&&(_0x55966b=!![],console[_0x841226(0x10a)](_0x1e36a6),_0x3828d0()));}):(console[_0x267152(0x10a)](_0x1e36a6),Promise[_0x267152(0x10e)]());}export async function handleSDKOutput(_0x554817,_0x1a5f09){const _0xaa5991=a41_0x1368,_0x4d977f=resolveOutputOptions(_0x1a5f09),_0x103a53=await formatSDKOutput(_0x554817,_0x4d977f);await writeOutput(_0x103a53,_0x4d977f[_0xaa5991(0x10b)]||undefined,_0x4d977f[_0xaa5991(0x101)]);}export async function handleQueryOutput(_0x2fec9a,_0x254723){const _0xd2e931=a41_0x1368,_0x1d4953=resolveOutputOptions(_0x254723),_0x2cbdc6=await formatQueryOutput(_0x2fec9a,_0x1d4953);await writeOutput(_0x2cbdc6,_0x1d4953['output']||undefined,_0x1d4953[_0xd2e931(0x101)]);}async function formatSingleObject(_0x5d7880,_0x49db0f){const _0x319367=a41_0x1368,{format:_0x2a5a4c,color:_0x469c40,noColor:_0x1ab9e8}=_0x49db0f,_0x434435={'color':_0x469c40,'noColor':_0x1ab9e8};if(_0x2a5a4c===_0x319367(0xfc)){if(shouldUseColor(_0x434435))return colorizeJSON(_0x5d7880,_0x434435);return JSON['stringify'](_0x5d7880,null,0x2);}else{if(_0x2a5a4c==='jsonl'){if(shouldUseColor(_0x434435))return colorizeJSONCompact(_0x5d7880,_0x434435);return JSON['stringify'](_0x5d7880);}else{if(_0x2a5a4c===_0x319367(0x104))return Object[_0x319367(0xd4)](_0x5d7880)[_0x319367(0xeb)](([_0x567320,_0xab26de])=>_0x567320+'\x09'+_0xab26de)[_0x319367(0xec)]('\x0a');else{const _0x5af293=Object[_0x319367(0xd4)](_0x5d7880);if(_0x5af293[_0x319367(0x100)]===0x0)return _0x319367(0xd2);const _0x12fb82=_0x5d7880[_0x319367(0xfe)],_0x121bb6=_0x5d7880[_0x319367(0x108)],_0x23ab77=_0x5d7880[_0x319367(0xd9)],_0x386e33=_0x5d7880[_0x319367(0xe7)],_0x4040c5=_0x121bb6?typeof _0x121bb6===_0x319367(0xd6)?_0x121bb6:JSON[_0x319367(0xff)](_0x121bb6,null,0x2):undefined,_0x452a46=_0x23ab77&&Object[_0x319367(0xf7)](_0x23ab77)['length']>0x0?JSON['stringify'](_0x23ab77,null,0x2):undefined,_0x58a290=_0x386e33&&Object[_0x319367(0xf7)](_0x386e33)['length']>0x0?JSON[_0x319367(0xff)](_0x386e33,null,0x2):undefined,_0x18bb0a=_0x5af293[_0x319367(0xf4)](([_0x1ad966])=>_0x1ad966!=='debug'&&_0x1ad966!=='query'&&_0x1ad966!=='params'&&_0x1ad966!==_0x319367(0xe7)),_0x298f87=Math[_0x319367(0xf2)](..._0x18bb0a[_0x319367(0xeb)](([_0x407b28])=>_0x407b28[_0x319367(0x100)])),_0x13b567=Math[_0x319367(0xf2)](..._0x18bb0a[_0x319367(0xeb)](([,_0x1f1518])=>{const _0xdf3cbc=_0x319367;try{const _0x415881=_0x1f1518===null||_0x1f1518===undefined?'':typeof _0x1f1518===_0xdf3cbc(0xd8)?JSON[_0xdf3cbc(0xff)](_0x1f1518):String(_0x1f1518),_0x5df29e=_0x415881[_0xdf3cbc(0x115)]('\x0a');return Math[_0xdf3cbc(0xf2)](..._0x5df29e[_0xdf3cbc(0xeb)](_0x375678=>_0x375678[_0xdf3cbc(0x100)]),0x0);}catch{return 0x0;}}),0x14),_0x59a84b=[];_0x59a84b[_0x319367(0xdd)](colorBorder('┌─'+'─'['repeat'](_0x298f87)+'─┬─'+'─'[_0x319367(0x117)](_0x13b567)+'─┐',_0x434435)),_0x18bb0a[_0x319367(0x107)](([_0x4db874,_0x37ad7d])=>{const _0x15b488=_0x319367;let _0x2c0739;try{_0x2c0739=_0x37ad7d===null||_0x37ad7d===undefined?'':typeof _0x37ad7d===_0x15b488(0xd8)?JSON['stringify'](_0x37ad7d):String(_0x37ad7d);}catch{_0x2c0739=_0x15b488(0xd7);}const _0x430686=_0x4db874[_0x15b488(0xe3)](_0x298f87),_0x30b7e5=_0x2c0739[_0x15b488(0x115)]('\x0a');_0x30b7e5[_0x15b488(0x107)]((_0x297ca7,_0x19b60a)=>{const _0xee3521=_0x15b488,_0x39b8f1=colorBorder('│',_0x434435);_0x19b60a===0x0?_0x59a84b[_0xee3521(0xdd)](_0x39b8f1+'\x20'+_0x430686+'\x20'+_0x39b8f1+'\x20'+_0x297ca7['padEnd'](_0x13b567)+'\x20'+_0x39b8f1):_0x59a84b[_0xee3521(0xdd)](_0x39b8f1+'\x20'+'\x20'['repeat'](_0x298f87)+'\x20'+_0x39b8f1+'\x20'+_0x297ca7[_0xee3521(0xe3)](_0x13b567)+'\x20'+_0x39b8f1);});}),_0x59a84b[_0x319367(0xdd)](colorBorder('└─'+'─'[_0x319367(0x117)](_0x298f87)+'─┴─'+'─'['repeat'](_0x13b567)+'─┘',_0x434435));_0x4040c5&&(_0x59a84b[_0x319367(0xdd)](''),_0x59a84b['push'](String(a41_0x59ae3d[_0x319367(0xf0)][_0x319367(0xde)](_0x319367(0x110)))),_0x59a84b[_0x319367(0xdd)](_0x4040c5));_0x452a46&&(_0x59a84b[_0x319367(0xdd)](''),_0x59a84b[_0x319367(0xdd)](String(a41_0x59ae3d[_0x319367(0xdf)][_0x319367(0xde)]('[params]'))),_0x59a84b['push'](_0x452a46));_0x58a290&&(_0x59a84b[_0x319367(0xdd)](''),_0x59a84b[_0x319367(0xdd)](String(a41_0x59ae3d['magenta'][_0x319367(0xde)](_0x319367(0xe5)))),_0x59a84b['push'](_0x58a290));if(_0x12fb82){if(_0x12fb82[_0x319367(0xe1)]){_0x59a84b[_0x319367(0xdd)](''),_0x59a84b[_0x319367(0xdd)](String(a41_0x59ae3d[_0x319367(0xe6)][_0x319367(0xde)](_0x319367(0xdb))));const _0x2307a1=_0x12fb82[_0x319367(0xe1)]['split']('\x0a');_0x2307a1[_0x319367(0x107)](_0x3707f2=>{const _0x5e0168=_0x319367;_0x3707f2[_0x5e0168(0x106)]()&&_0x59a84b[_0x5e0168(0xdd)](_0x3707f2);});}if(_0x12fb82['cmdout']){_0x59a84b['push'](''),_0x59a84b['push'](String(a41_0x59ae3d['cyan'][_0x319367(0xde)](_0x319367(0xe2))));const _0x351c4f=_0x12fb82[_0x319367(0xd5)][_0x319367(0x115)]('\x0a');_0x351c4f[_0x319367(0x107)](_0x5961a5=>{const _0x3d3a9a=_0x319367;_0x5961a5[_0x3d3a9a(0x106)]()&&_0x59a84b['push'](_0x5961a5);});}}return _0x59a84b[_0x319367(0xec)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x49d2da,_0x264e59){const _0x337c7e=a41_0x1368;if(_0x264e59[_0x337c7e(0x101)]===_0x337c7e(0x116)){await handleSDKOutput([_0x49d2da],_0x264e59);return;}const _0x4f85da=resolveOutputOptions(_0x264e59),_0x3c020d=await formatSingleObject(_0x49d2da,_0x4f85da);await writeOutput(_0x3c020d,_0x4f85da[_0x337c7e(0x10b)]||undefined,_0x4f85da[_0x337c7e(0x101)]);}
1
+ (function(_0x286dd1,_0x2f0d83){const _0x5464e8=a43_0x45a2,_0x40e8f6=_0x286dd1();while(!![]){try{const _0x1383f8=-parseInt(_0x5464e8(0x130))/0x1+parseInt(_0x5464e8(0x12c))/0x2+parseInt(_0x5464e8(0x148))/0x3+parseInt(_0x5464e8(0x129))/0x4+parseInt(_0x5464e8(0x119))/0x5+parseInt(_0x5464e8(0x139))/0x6*(-parseInt(_0x5464e8(0x12e))/0x7)+-parseInt(_0x5464e8(0x155))/0x8;if(_0x1383f8===_0x2f0d83)break;else _0x40e8f6['push'](_0x40e8f6['shift']());}catch(_0x100ac9){_0x40e8f6['push'](_0x40e8f6['shift']());}}}(a43_0x527f,0xc69c6));import{writeFileSync}from'fs';function a43_0x527f(){const _0x44248a=['yellow','list','[rule]','varchar','4205916CUvFgi','stringify','[query]','stderr','spawn','rule','red','No\x20data','bigint','close','entries','split','table','519536sdVqff','output','filter','end','forEach','jsonl','padEnd','resolve','map','6554325eHgCfq','repeat','json','write','bold','isTTY','debug','max','[Object]','inherit','format','query','join','params','log','boolean','2396292HmpYFc','noColor','[error]','119052RuxUiI','color','951013EewofJ','isInteger','998535JOPmqz','cmdout','cyan','tsv','limit','number','error','-FXRSn','─┴─','66HzbZqe','less','FINISHED','trim','magenta','blue','stdin','push','[logs]','object','length'];a43_0x527f=function(){return _0x44248a;};return a43_0x527f();}import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a43_0x104a6d from'chalk';function a43_0x45a2(_0x27b88b,_0x350379){_0x27b88b=_0x27b88b-0x114;const _0x527fcc=a43_0x527f();let _0x45a25b=_0x527fcc[_0x27b88b];return _0x45a25b;}import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x43c2a9){const _0x472ad2=a43_0x45a2;return _0x43c2a9[_0x472ad2(0x123)]===_0x472ad2(0x11b)||_0x43c2a9[_0x472ad2(0x123)]==='jsonl'||_0x43c2a9[_0x472ad2(0x123)]==='tsv'||_0x43c2a9[_0x472ad2(0x123)]===_0x472ad2(0x154)||_0x43c2a9[_0x472ad2(0x11b)]===!![]||_0x43c2a9[_0x472ad2(0x115)]===!![]||_0x43c2a9[_0x472ad2(0x133)]===!![]||_0x43c2a9[_0x472ad2(0x154)]===!![];}export function parseOutputOptions(_0x3a87d9){const _0x3b80d0=a43_0x45a2;return{'format':_0x3a87d9[_0x3b80d0(0x123)]||_0x3b80d0(0x154),'output':_0x3a87d9[_0x3b80d0(0x156)]||'','limit':_0x3a87d9[_0x3b80d0(0x134)],'color':_0x3a87d9['color'],'noColor':_0x3a87d9[_0x3b80d0(0x12a)]};}function convertSDKResultToQueryResult(_0x457073){const _0xafbabc=a43_0x45a2,_0x588645=[];if(_0x457073['length']>0x0){const _0x1bd074=_0x457073[0x0];for(const [_0x12136e,_0x157881]of Object[_0xafbabc(0x152)](_0x1bd074)){let _0xd54ac4=_0xafbabc(0x147);if(typeof _0x157881===_0xafbabc(0x135))_0xd54ac4=Number[_0xafbabc(0x12f)](_0x157881)?_0xafbabc(0x150):'double';else{if(typeof _0x157881==='boolean')_0xd54ac4=_0xafbabc(0x128);else _0x157881===null&&(_0xd54ac4=_0xafbabc(0x147));}_0x588645['push']({'name':_0x12136e,'type':_0xd54ac4});}}return{'queryId':'sdk-result','columns':_0x588645,'data':_0x457073,'stats':{'state':_0xafbabc(0x13b),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x457073[_0xafbabc(0x143)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x27105f,_0x519416){const _0x3dd050=convertSDKResultToQueryResult(_0x27105f);return formatQueryOutput(_0x3dd050,_0x519416);}export async function formatQueryOutput(_0x26af4d,_0x1164f5){const _0xc2830d=a43_0x45a2,{format:_0x1709e8,limit:_0x71c6aa,output:_0x94bc01,color:_0x2a34e0,noColor:_0x539a99}=_0x1164f5,_0x8202e5=Boolean(_0x94bc01)&&!_0x2a34e0,_0x44a8e3={'color':_0x2a34e0,'noColor':_0x539a99||_0x8202e5};if(_0x1709e8===_0xc2830d(0x154)){const _0x1913af=shouldUseLess(_0x1709e8,_0x94bc01);return formatAsTable(_0x26af4d,_0x71c6aa,_0x1913af,_0x44a8e3);}else{if(_0x1709e8===_0xc2830d(0x11b))return formatAsJSON(_0x26af4d,_0x44a8e3);else return _0x1709e8==='jsonl'?formatAsJSONL(_0x26af4d,_0x44a8e3):formatQueryResult(_0x26af4d,_0x1709e8);}}function shouldUseLess(_0x13f198,_0x1e6c7b){const _0x155857=a43_0x45a2;return(_0x13f198===_0x155857(0x154)||_0x13f198===_0x155857(0x145))&&process['stdout'][_0x155857(0x11e)]&&!_0x1e6c7b;}export function resolveOutputOptions(_0x4b685a){const _0x33c374=a43_0x45a2,_0x1d8f87=resolveOutputFormat(_0x4b685a[_0x33c374(0x123)],_0x4b685a[_0x33c374(0x156)],_0x33c374(0x154));let _0x50c570=typeof _0x4b685a[_0x33c374(0x134)]==='number'?_0x4b685a[_0x33c374(0x134)]:parseInt(_0x4b685a[_0x33c374(0x134)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x5c169f=_0x4b685a[_0x33c374(0x156)]||'';return shouldUseLess(_0x1d8f87,_0x5c169f)&&(_0x50c570=Infinity),{'format':_0x1d8f87,'output':_0x5c169f,'limit':_0x50c570,'color':_0x4b685a[_0x33c374(0x12d)],'noColor':_0x4b685a['noColor']};}export function writeOutput(_0x4dc71d,_0x4f6f76,_0x30ce79){const _0x17f391=a43_0x45a2;return _0x4f6f76?(writeFileSync(_0x4f6f76,_0x4dc71d),console['error']('Results\x20saved\x20to\x20'+_0x4f6f76),Promise['resolve']()):shouldUseLess(_0x30ce79||'','')?new Promise(_0x2ee33e=>{const _0x3d122d=a43_0x45a2,_0x2af6a3=spawn(_0x3d122d(0x13a),[_0x3d122d(0x137)],{'stdio':['pipe','inherit',_0x3d122d(0x122)]});let _0xdfe0f6=![];_0x2af6a3['on'](_0x3d122d(0x136),()=>{!_0xdfe0f6&&(_0xdfe0f6=!![],console['log'](_0x4dc71d),_0x2ee33e());}),_0x2af6a3['on'](_0x3d122d(0x151),()=>{!_0xdfe0f6&&(_0xdfe0f6=!![],_0x2ee33e());}),_0x2af6a3['on'](_0x3d122d(0x14c),()=>{const _0x3ad924=_0x3d122d;!_0xdfe0f6&&_0x2af6a3['stdin']&&(_0x2af6a3[_0x3ad924(0x13f)]['on'](_0x3ad924(0x136),()=>{}),_0x2af6a3[_0x3ad924(0x13f)][_0x3ad924(0x11c)](_0x4dc71d),_0x2af6a3[_0x3ad924(0x13f)][_0x3ad924(0x158)]());}),!_0x2af6a3[_0x3d122d(0x13f)]&&(!_0xdfe0f6&&(_0xdfe0f6=!![],console['log'](_0x4dc71d),_0x2ee33e()));}):(console[_0x17f391(0x127)](_0x4dc71d),Promise[_0x17f391(0x117)]());}export async function handleSDKOutput(_0x452944,_0x477f6c){const _0x5cac7c=resolveOutputOptions(_0x477f6c),_0x420c3b=await formatSDKOutput(_0x452944,_0x5cac7c);await writeOutput(_0x420c3b,_0x5cac7c['output']||undefined,_0x5cac7c['format']);}export async function handleQueryOutput(_0x4ad10e,_0x1df7cc){const _0x58ed47=a43_0x45a2,_0x22caf0=resolveOutputOptions(_0x1df7cc),_0x578d03=await formatQueryOutput(_0x4ad10e,_0x22caf0);await writeOutput(_0x578d03,_0x22caf0[_0x58ed47(0x156)]||undefined,_0x22caf0['format']);}async function formatSingleObject(_0x292dee,_0x2fdb23){const _0x3d40e0=a43_0x45a2,{format:_0x2542f9,color:_0x3aab14,noColor:_0x525014}=_0x2fdb23,_0x51b12d={'color':_0x3aab14,'noColor':_0x525014};if(_0x2542f9===_0x3d40e0(0x11b)){if(shouldUseColor(_0x51b12d))return colorizeJSON(_0x292dee,_0x51b12d);return JSON[_0x3d40e0(0x149)](_0x292dee,null,0x2);}else{if(_0x2542f9==='jsonl'){if(shouldUseColor(_0x51b12d))return colorizeJSONCompact(_0x292dee,_0x51b12d);return JSON[_0x3d40e0(0x149)](_0x292dee);}else{if(_0x2542f9===_0x3d40e0(0x133))return Object[_0x3d40e0(0x152)](_0x292dee)['map'](([_0x3bac0e,_0x3ce31e])=>_0x3bac0e+'\x09'+_0x3ce31e)['join']('\x0a');else{const _0x558e5a=Object['entries'](_0x292dee);if(_0x558e5a[_0x3d40e0(0x143)]===0x0)return _0x3d40e0(0x14f);const _0x2e3b66=_0x292dee[_0x3d40e0(0x11f)],_0x547759=_0x292dee['query'],_0x1eb9a1=_0x292dee['params'],_0x4b0848=_0x292dee[_0x3d40e0(0x14d)],_0x907405=_0x547759?typeof _0x547759==='string'?_0x547759:JSON[_0x3d40e0(0x149)](_0x547759,null,0x2):undefined,_0x2b9ac0=_0x1eb9a1&&Object['keys'](_0x1eb9a1)['length']>0x0?JSON[_0x3d40e0(0x149)](_0x1eb9a1,null,0x2):undefined,_0x2fba6e=_0x4b0848&&Object['keys'](_0x4b0848)[_0x3d40e0(0x143)]>0x0?JSON['stringify'](_0x4b0848,null,0x2):undefined,_0x3f675a=_0x558e5a[_0x3d40e0(0x157)](([_0x55f23e])=>_0x55f23e!==_0x3d40e0(0x11f)&&_0x55f23e!==_0x3d40e0(0x124)&&_0x55f23e!==_0x3d40e0(0x126)&&_0x55f23e!=='rule'),_0x4d828d=Math[_0x3d40e0(0x120)](..._0x3f675a['map'](([_0x34a555])=>_0x34a555['length'])),_0x33f5a7=Math[_0x3d40e0(0x120)](..._0x3f675a['map'](([,_0x4f62b4])=>{const _0x339713=_0x3d40e0;try{const _0x83e838=_0x4f62b4===null||_0x4f62b4===undefined?'':typeof _0x4f62b4===_0x339713(0x142)?JSON['stringify'](_0x4f62b4):String(_0x4f62b4),_0x5a8c98=_0x83e838[_0x339713(0x153)]('\x0a');return Math[_0x339713(0x120)](..._0x5a8c98[_0x339713(0x118)](_0x5c1747=>_0x5c1747[_0x339713(0x143)]),0x0);}catch{return 0x0;}}),0x14),_0x475f54=[];_0x475f54[_0x3d40e0(0x140)](colorBorder('┌─'+'─'[_0x3d40e0(0x11a)](_0x4d828d)+'─┬─'+'─'[_0x3d40e0(0x11a)](_0x33f5a7)+'─┐',_0x51b12d)),_0x3f675a['forEach'](([_0xfe2346,_0x2473e1])=>{const _0x2d2ed0=_0x3d40e0;let _0x2eac3e;try{_0x2eac3e=_0x2473e1===null||_0x2473e1===undefined?'':typeof _0x2473e1==='object'?JSON[_0x2d2ed0(0x149)](_0x2473e1):String(_0x2473e1);}catch{_0x2eac3e=_0x2d2ed0(0x121);}const _0x2aae02=_0xfe2346[_0x2d2ed0(0x116)](_0x4d828d),_0x42f847=_0x2eac3e[_0x2d2ed0(0x153)]('\x0a');_0x42f847[_0x2d2ed0(0x114)]((_0x148a38,_0x42be8b)=>{const _0x44aa3=_0x2d2ed0,_0xe8e15f=colorBorder('│',_0x51b12d);_0x42be8b===0x0?_0x475f54['push'](_0xe8e15f+'\x20'+_0x2aae02+'\x20'+_0xe8e15f+'\x20'+_0x148a38['padEnd'](_0x33f5a7)+'\x20'+_0xe8e15f):_0x475f54[_0x44aa3(0x140)](_0xe8e15f+'\x20'+'\x20'[_0x44aa3(0x11a)](_0x4d828d)+'\x20'+_0xe8e15f+'\x20'+_0x148a38['padEnd'](_0x33f5a7)+'\x20'+_0xe8e15f);});}),_0x475f54['push'](colorBorder('└─'+'─'['repeat'](_0x4d828d)+_0x3d40e0(0x138)+'─'[_0x3d40e0(0x11a)](_0x33f5a7)+'─┘',_0x51b12d));_0x907405&&(_0x475f54[_0x3d40e0(0x140)](''),_0x475f54[_0x3d40e0(0x140)](String(a43_0x104a6d[_0x3d40e0(0x144)][_0x3d40e0(0x11d)](_0x3d40e0(0x14a)))),_0x475f54[_0x3d40e0(0x140)](_0x907405));_0x2b9ac0&&(_0x475f54['push'](''),_0x475f54['push'](String(a43_0x104a6d[_0x3d40e0(0x13e)][_0x3d40e0(0x11d)]('[params]'))),_0x475f54[_0x3d40e0(0x140)](_0x2b9ac0));_0x2fba6e&&(_0x475f54['push'](''),_0x475f54['push'](String(a43_0x104a6d[_0x3d40e0(0x13d)][_0x3d40e0(0x11d)](_0x3d40e0(0x146)))),_0x475f54[_0x3d40e0(0x140)](_0x2fba6e));if(_0x2e3b66){if(_0x2e3b66[_0x3d40e0(0x14b)]){_0x475f54['push'](''),_0x475f54[_0x3d40e0(0x140)](String(a43_0x104a6d[_0x3d40e0(0x14e)][_0x3d40e0(0x11d)](_0x3d40e0(0x12b))));const _0x228fa2=_0x2e3b66[_0x3d40e0(0x14b)][_0x3d40e0(0x153)]('\x0a');_0x228fa2[_0x3d40e0(0x114)](_0x56b20f=>{const _0x262041=_0x3d40e0;_0x56b20f['trim']()&&_0x475f54[_0x262041(0x140)](_0x56b20f);});}if(_0x2e3b66[_0x3d40e0(0x131)]){_0x475f54[_0x3d40e0(0x140)](''),_0x475f54['push'](String(a43_0x104a6d[_0x3d40e0(0x132)][_0x3d40e0(0x11d)](_0x3d40e0(0x141))));const _0x32e468=_0x2e3b66[_0x3d40e0(0x131)]['split']('\x0a');_0x32e468[_0x3d40e0(0x114)](_0x42f857=>{const _0x153f9e=_0x3d40e0;_0x42f857[_0x153f9e(0x13c)]()&&_0x475f54[_0x153f9e(0x140)](_0x42f857);});}}return _0x475f54[_0x3d40e0(0x125)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x30833c,_0x23a712){const _0x42f8e9=a43_0x45a2;if(_0x23a712[_0x42f8e9(0x123)]===_0x42f8e9(0x154)){await handleSDKOutput([_0x30833c],_0x23a712);return;}const _0x29fc11=resolveOutputOptions(_0x23a712),_0x408407=await formatSingleObject(_0x30833c,_0x29fc11);await writeOutput(_0x408407,_0x29fc11['output']||undefined,_0x29fc11[_0x42f8e9(0x123)]);}