@treasuredata/tdx 2026.4.19 → 2026.4.21

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 (252) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.js +1 -1
  16. package/dist/commands/claude-statusline-command.js +1 -1
  17. package/dist/commands/claude-usage-command.js +1 -1
  18. package/dist/commands/command.js +1 -1
  19. package/dist/commands/connection-command.js +1 -1
  20. package/dist/commands/databases.js +1 -1
  21. package/dist/commands/delivery-command.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-campaign-pull-command.js +1 -1
  24. package/dist/commands/engage-campaign-push-command.js +1 -1
  25. package/dist/commands/engage-campaign-validate-command.js +1 -1
  26. package/dist/commands/engage-command.d.ts +47 -0
  27. package/dist/commands/engage-command.d.ts.map +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/engage-command.js.map +1 -1
  30. package/dist/commands/engage-template-pull-command.js +1 -1
  31. package/dist/commands/engage-template-push-command.js +1 -1
  32. package/dist/commands/engage-template-validate-command.js +1 -1
  33. package/dist/commands/job-command.js +1 -1
  34. package/dist/commands/journey-command.d.ts +1 -0
  35. package/dist/commands/journey-command.d.ts.map +1 -1
  36. package/dist/commands/journey-command.js +1 -1
  37. package/dist/commands/journey-command.js.map +1 -1
  38. package/dist/commands/journey-validate-command.js +1 -1
  39. package/dist/commands/llm-command.js +1 -1
  40. package/dist/commands/mcp-command.js +1 -1
  41. package/dist/commands/parent-segment-command.js +1 -1
  42. package/dist/commands/policy-command.js +1 -1
  43. package/dist/commands/profile-command.js +1 -1
  44. package/dist/commands/profiles-command.js +1 -1
  45. package/dist/commands/query-command.js +1 -1
  46. package/dist/commands/schedule-command.js +1 -1
  47. package/dist/commands/segment-command.js +1 -1
  48. package/dist/commands/segment-create-command.js +1 -1
  49. package/dist/commands/segment-fields-command.js +1 -1
  50. package/dist/commands/segment-pull-command.js +1 -1
  51. package/dist/commands/segment-push-command.js +1 -1
  52. package/dist/commands/segment-update-command.js +1 -1
  53. package/dist/commands/segment-use-command.js +1 -1
  54. package/dist/commands/segment-validate-command.js +1 -1
  55. package/dist/commands/segments.js +1 -1
  56. package/dist/commands/show.js +1 -1
  57. package/dist/commands/status-command.js +1 -1
  58. package/dist/commands/tables.js +1 -1
  59. package/dist/commands/unset-command.js +1 -1
  60. package/dist/commands/upgrade-command.js +1 -1
  61. package/dist/commands/use-command.js +1 -1
  62. package/dist/commands/user-command.js +1 -1
  63. package/dist/commands/work-command.js +1 -1
  64. package/dist/commands/workflow-command.d.ts +1 -0
  65. package/dist/commands/workflow-command.d.ts.map +1 -1
  66. package/dist/commands/workflow-command.js +1 -1
  67. package/dist/commands/workflow-command.js.map +1 -1
  68. package/dist/core/auth.js +1 -1
  69. package/dist/core/command-output.js +1 -1
  70. package/dist/core/config.js +1 -1
  71. package/dist/core/connection-cache.js +1 -1
  72. package/dist/core/constants.js +1 -1
  73. package/dist/core/credential-cache.js +1 -1
  74. package/dist/core/global-context.js +1 -1
  75. package/dist/core/keychain.js +1 -1
  76. package/dist/core/oauth-keychain.js +1 -1
  77. package/dist/core/oauth.js +1 -1
  78. package/dist/core/profile.js +1 -1
  79. package/dist/core/project-config.js +1 -1
  80. package/dist/core/session.js +1 -1
  81. package/dist/core/user-cache.js +1 -1
  82. package/dist/core/version.js +1 -1
  83. package/dist/index.js +1 -1
  84. package/dist/mcp/server.js +1 -1
  85. package/dist/mcp/tools/index.js +1 -1
  86. package/dist/mcp/tools/tdx-run.js +1 -1
  87. package/dist/mcp/tools/tdx-search.js +1 -1
  88. package/dist/mcp/tools/work-create-item.js +1 -1
  89. package/dist/mcp/utils.js +1 -1
  90. package/dist/proxy/claude-usage-tracker.js +1 -1
  91. package/dist/proxy/passthrough-server.js +1 -1
  92. package/dist/proxy/sse-usage-parser.js +1 -1
  93. package/dist/sdk/agent/agent-config.js +1 -1
  94. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  95. package/dist/sdk/agent/agent-yaml.js +1 -1
  96. package/dist/sdk/agent/test/evaluator.js +1 -1
  97. package/dist/sdk/agent/test/executor.js +1 -1
  98. package/dist/sdk/agent/test/index.js +1 -1
  99. package/dist/sdk/agent/test/output.js +1 -1
  100. package/dist/sdk/agent/test/parser.js +1 -1
  101. package/dist/sdk/agent/tool-target-registry.js +1 -1
  102. package/dist/sdk/api.js +1 -1
  103. package/dist/sdk/cas/cas-api-client.js +1 -1
  104. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  105. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  106. package/dist/sdk/cas/index.js +1 -1
  107. package/dist/sdk/cas/pull-workflow.js +1 -1
  108. package/dist/sdk/cas/push-workflow.js +1 -1
  109. package/dist/sdk/client/cdp-api-client.js +1 -1
  110. package/dist/sdk/client/delivery-api-client.js +1 -1
  111. package/dist/sdk/client/endpoints.js +1 -1
  112. package/dist/sdk/client/engage-api-client.d.ts +50 -1
  113. package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
  114. package/dist/sdk/client/engage-api-client.js +1 -1
  115. package/dist/sdk/client/engage-api-client.js.map +1 -1
  116. package/dist/sdk/client/http-client.js +1 -1
  117. package/dist/sdk/client/llm-api-client.js +1 -1
  118. package/dist/sdk/client/oauth-refresh.js +1 -1
  119. package/dist/sdk/client/rate-limiter.js +1 -1
  120. package/dist/sdk/client/td-api-client.js +1 -1
  121. package/dist/sdk/client/trino-api-client.js +1 -1
  122. package/dist/sdk/client/workflow-client.d.ts +7 -0
  123. package/dist/sdk/client/workflow-client.d.ts.map +1 -1
  124. package/dist/sdk/client/workflow-client.js +1 -1
  125. package/dist/sdk/client/workflow-client.js.map +1 -1
  126. package/dist/sdk/connection-validator.js +1 -1
  127. package/dist/sdk/connection.js +1 -1
  128. package/dist/sdk/delivery.js +1 -1
  129. package/dist/sdk/engage/campaign-pull.js +1 -1
  130. package/dist/sdk/engage/campaign-push.js +1 -1
  131. package/dist/sdk/engage/campaign-validator.js +1 -1
  132. package/dist/sdk/engage/campaign-yaml.js +1 -1
  133. package/dist/sdk/engage/template-pull.js +1 -1
  134. package/dist/sdk/engage/template-push.js +1 -1
  135. package/dist/sdk/engage/template-validator.js +1 -1
  136. package/dist/sdk/engage/template-yaml.js +1 -1
  137. package/dist/sdk/engage/types/campaign-def.js +1 -1
  138. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  139. package/dist/sdk/engage/types/template-schema.js +1 -1
  140. package/dist/sdk/engage.d.ts +35 -1
  141. package/dist/sdk/engage.d.ts.map +1 -1
  142. package/dist/sdk/engage.js +1 -1
  143. package/dist/sdk/engage.js.map +1 -1
  144. package/dist/sdk/errors.js +1 -1
  145. package/dist/sdk/index.js +1 -1
  146. package/dist/sdk/io/index.js +1 -1
  147. package/dist/sdk/io/node-filesystem.js +1 -1
  148. package/dist/sdk/job.js +1 -1
  149. package/dist/sdk/journey.js +1 -1
  150. package/dist/sdk/llm/chat-cache.js +1 -1
  151. package/dist/sdk/llm/index.js +1 -1
  152. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  153. package/dist/sdk/llm/model-factors.js +1 -1
  154. package/dist/sdk/personalization.js +1 -1
  155. package/dist/sdk/policy.js +1 -1
  156. package/dist/sdk/query/index.js +1 -1
  157. package/dist/sdk/query/sql-parser.js +1 -1
  158. package/dist/sdk/realtime.js +1 -1
  159. package/dist/sdk/schedule.js +1 -1
  160. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  161. package/dist/sdk/segment/fields-display.js +1 -1
  162. package/dist/sdk/segment/file-discovery.js +1 -1
  163. package/dist/sdk/segment/journey-utils.js +1 -1
  164. package/dist/sdk/segment/journey-validator.js +1 -1
  165. package/dist/sdk/segment/journey-yaml.js +1 -1
  166. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  167. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  168. package/dist/sdk/segment/pull-workflow.js +1 -1
  169. package/dist/sdk/segment/push-recovery.js +1 -1
  170. package/dist/sdk/segment/push-workflow.js +1 -1
  171. package/dist/sdk/segment/resolution-context.js +1 -1
  172. package/dist/sdk/segment/segment-path-parser.js +1 -1
  173. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  174. package/dist/sdk/segment/segment-validator.js +1 -1
  175. package/dist/sdk/segment/target-resolution.js +1 -1
  176. package/dist/sdk/segment/tdx-config.js +1 -1
  177. package/dist/sdk/segment/types/activation-schema.js +1 -1
  178. package/dist/sdk/segment/types/journey-def.js +1 -1
  179. package/dist/sdk/segment/types/journey-schema.js +1 -1
  180. package/dist/sdk/segment/types/segment-def.js +1 -1
  181. package/dist/sdk/segment/types/segment-schema.js +1 -1
  182. package/dist/sdk/segment/validate-files.js +1 -1
  183. package/dist/sdk/segment/yaml-validator.js +1 -1
  184. package/dist/sdk/segment.js +1 -1
  185. package/dist/sdk/types/engage.d.ts +53 -0
  186. package/dist/sdk/types/engage.d.ts.map +1 -1
  187. package/dist/sdk/types/index.d.ts +1 -1
  188. package/dist/sdk/types/index.d.ts.map +1 -1
  189. package/dist/sdk/types/index.js +1 -1
  190. package/dist/sdk/types/index.js.map +1 -1
  191. package/dist/sdk/types/progress.js +1 -1
  192. package/dist/sdk/types/workspace.js +1 -1
  193. package/dist/sdk/user.js +1 -1
  194. package/dist/sdk/util/format-detector.js +1 -1
  195. package/dist/sdk/util/formatters.js +1 -1
  196. package/dist/sdk/util/index.js +1 -1
  197. package/dist/sdk/util/paginate.js +1 -1
  198. package/dist/sdk/util/tree-formatter.js +1 -1
  199. package/dist/sdk/workflow/archive-validation.js +1 -1
  200. package/dist/sdk/workflow/clone-workflow.js +1 -1
  201. package/dist/sdk/workflow/index.d.ts +14 -1
  202. package/dist/sdk/workflow/index.d.ts.map +1 -1
  203. package/dist/sdk/workflow/index.js +1 -1
  204. package/dist/sdk/workflow/index.js.map +1 -1
  205. package/dist/sdk/workflow/pull-workflow.js +1 -1
  206. package/dist/sdk/workflow/push-workflow.js +1 -1
  207. package/dist/sdk/workflow/task-graph.d.ts +65 -0
  208. package/dist/sdk/workflow/task-graph.d.ts.map +1 -0
  209. package/dist/sdk/workflow/task-graph.js +1 -0
  210. package/dist/sdk/workflow/task-graph.js.map +1 -0
  211. package/dist/sdk/workflow/tdx-config.js +1 -1
  212. package/dist/sdk/workflow/workflow-utils.js +1 -1
  213. package/dist/sdk/workspace/access-tracker.js +1 -1
  214. package/dist/sdk/workspace/frontmatter.js +1 -1
  215. package/dist/sdk/workspace/git.js +1 -1
  216. package/dist/sdk/workspace/index.js +1 -1
  217. package/dist/sdk/workspace/templates.js +1 -1
  218. package/dist/sdk/workspace/weekly.js +1 -1
  219. package/dist/sdk/workspace/wikilinks.js +1 -1
  220. package/dist/test-utils/command-runner.js +1 -1
  221. package/dist/test-utils/factories.js +1 -1
  222. package/dist/test-utils/fixtures.js +1 -1
  223. package/dist/test-utils/http-mock.js +1 -1
  224. package/dist/test-utils/index.js +1 -1
  225. package/dist/utils/async.js +1 -1
  226. package/dist/utils/colors.js +1 -1
  227. package/dist/utils/diff.js +1 -1
  228. package/dist/utils/file-permissions.js +1 -1
  229. package/dist/utils/file-reader.js +1 -1
  230. package/dist/utils/github-releases.js +1 -1
  231. package/dist/utils/global-cache.js +1 -1
  232. package/dist/utils/json-loader.js +1 -1
  233. package/dist/utils/local-cache.js +1 -1
  234. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  235. package/dist/utils/logger/formatters/index.js +1 -1
  236. package/dist/utils/logger/handlers/console-handler.js +1 -1
  237. package/dist/utils/logger/handlers/file-handler.js +1 -1
  238. package/dist/utils/logger/handlers/index.js +1 -1
  239. package/dist/utils/logger/handlers/null-handler.js +1 -1
  240. package/dist/utils/logger/index.js +1 -1
  241. package/dist/utils/logger/logger.js +1 -1
  242. package/dist/utils/logger/types.js +1 -1
  243. package/dist/utils/option-validation.js +1 -1
  244. package/dist/utils/process.js +1 -1
  245. package/dist/utils/prompt.js +1 -1
  246. package/dist/utils/spinner.js +1 -1
  247. package/dist/utils/sse-parser.js +1 -1
  248. package/dist/utils/string-utils.js +1 -1
  249. package/dist/utils/table-ref-parser.js +1 -1
  250. package/dist/utils/tdx-logger.js +1 -1
  251. package/dist/utils/version-check.js +1 -1
  252. package/package.json +1 -1
@@ -1 +1 @@
1
- const a54_0x141bbb=a54_0x3172;(function(_0x45dbd5,_0x1c3055){const _0x1e5974=a54_0x3172,_0x5635c8=_0x45dbd5();while(!![]){try{const _0x5bcaf6=parseInt(_0x1e5974(0x1fd))/0x1+parseInt(_0x1e5974(0x2e0))/0x2*(-parseInt(_0x1e5974(0x33e))/0x3)+-parseInt(_0x1e5974(0x201))/0x4*(-parseInt(_0x1e5974(0x1d4))/0x5)+-parseInt(_0x1e5974(0x2d5))/0x6+-parseInt(_0x1e5974(0x214))/0x7+parseInt(_0x1e5974(0x2e3))/0x8*(-parseInt(_0x1e5974(0x345))/0x9)+-parseInt(_0x1e5974(0x1ae))/0xa*(-parseInt(_0x1e5974(0x202))/0xb);if(_0x5bcaf6===_0x1c3055)break;else _0x5635c8['push'](_0x5635c8['shift']());}catch(_0xdff002){_0x5635c8['push'](_0x5635c8['shift']());}}}(a54_0xc7bf,0xac61d));import a54_0x467bd9 from'chalk';import{existsSync}from'fs';import a54_0x20d6ee from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a54_0x20ee9d from'prompts';function getAttemptStatusDisplay(_0x2216d4){const _0x405301=a54_0x3172;if(!_0x2216d4)return{'icon':'⏳','text':''};const {done:_0x118afe,success:_0x20360b,cancelRequested:_0x1ad05a}=_0x2216d4;if(!_0x118afe)return _0x1ad05a?{'icon':'🛑','text':a54_0x467bd9[_0x405301(0x371)]('canceling')}:{'icon':'🔄','text':a54_0x467bd9[_0x405301(0x370)](_0x405301(0x295))};if(_0x20360b)return{'icon':'✅','text':a54_0x467bd9[_0x405301(0x20d)](_0x405301(0x346))};return{'icon':'❌','text':a54_0x467bd9['red'](_0x405301(0x2fc))};}export class WorkflowBaseCommand extends BaseCommand{[a54_0x141bbb(0x327)](_0x5357f4,_0x4a369f,_0x4279a8=0x0){const _0x5df392=a54_0x141bbb;return _0x5357f4[_0x4279a8]||_0x4a369f[_0x5df392(0x1d8)];}[a54_0x141bbb(0x374)](_0xee7a6a,_0x12aec2,_0xb4ef5c=0x0){const _0xa8824b=a54_0x141bbb,_0x1c2240=this[_0xa8824b(0x327)](_0xee7a6a,_0x12aec2,_0xb4ef5c);if(!_0x1c2240)return console[_0xa8824b(0x2fc)](a54_0x467bd9['red']('Error:'),_0xa8824b(0x2ef)),console[_0xa8824b(0x2fc)](a54_0x467bd9[_0xa8824b(0x293)](_0xa8824b(0x2cd))),null;return _0x1c2240;}['parseProjectWorkflowPattern'](_0x3bfa35,_0x111f6d){const _0x259e06=a54_0x141bbb;if(_0x3bfa35[0x0]){const _0x3ac1b4=_0x3bfa35[0x0]['split']('.');if(_0x3ac1b4[_0x259e06(0x1fa)]===0x1)return{'projectName':_0x3ac1b4[0x0],'workflowName':undefined};else return _0x3ac1b4[_0x259e06(0x1fa)]===0x2?{'projectName':_0x3ac1b4[0x0],'workflowName':_0x3ac1b4[0x1]}:(console[_0x259e06(0x2fc)](a54_0x467bd9[_0x259e06(0x2ac)](_0x259e06(0x20a)),_0x259e06(0x35e)),null);}return{'projectName':_0x111f6d[_0x259e06(0x1d8)],'workflowName':undefined};}[a54_0x141bbb(0x37a)](_0x381ada,_0x3b9515,_0x3f382d=0x0){const _0x5bed97=a54_0x141bbb;if(_0x381ada[_0x3f382d])return _0x381ada[_0x3f382d];if(_0x3b9515[_0x5bed97(0x1d8)]){const _0x5b51a4=a54_0x20d6ee['join'](process[_0x5bed97(0x34e)](),_0x5bed97(0x31c),_0x3b9515['workflowProject']);if(existsSync(a54_0x20d6ee[_0x5bed97(0x337)](_0x5b51a4,_0x5bed97(0x2dd))))return _0x5b51a4;}return undefined;}async[a54_0x141bbb(0x1da)](_0x2460d6,_0x2f0651,_0x5b0cbf){const _0x459abe=a54_0x141bbb;try{const _0x325173=await _0x2460d6[_0x459abe(0x22f)][_0x459abe(0x31c)](_0x2f0651,{'limit':0x1});if(_0x325173['length']>0x0){const _0x4c2248=_0x325173[0x0]['id'],_0x17f4f3=getWorkflowUrl(_0x5b0cbf,_0x4c2248);console[_0x459abe(0x2fc)](_0x459abe(0x28c)+a54_0x467bd9[_0x459abe(0x1cf)](_0x17f4f3));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x2a4);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x342);async['execute'](_0x48eeb1){const _0x6b85e3=a54_0x141bbb,{options:_0x302e4a,args:_0x247fb2,tdx:_0xca48a7}=_0x48eeb1,_0x2ff1d3=_0x247fb2[0x0],_0x5d97b1=_0x302e4a[_0x6b85e3(0x357)];if(_0x5d97b1)return saveSessionContext({'workflow_project':undefined},_0x302e4a[_0x6b85e3(0x34f)]),console[_0x6b85e3(0x2b9)](a54_0x467bd9[_0x6b85e3(0x20d)](_0x6b85e3(0x2c2))),0x0;if(!_0x2ff1d3)return console[_0x6b85e3(0x2fc)](a54_0x467bd9[_0x6b85e3(0x2ac)](_0x6b85e3(0x20a)),_0x6b85e3(0x2ef)),console['error'](a54_0x467bd9[_0x6b85e3(0x293)](_0x6b85e3(0x2f2))),console[_0x6b85e3(0x2fc)](a54_0x467bd9['dim'](_0x6b85e3(0x32f))),0x1;const _0x478991=await withSpinner(_0x6b85e3(0x32e)+_0x2ff1d3+'\x27...',()=>_0xca48a7[_0x6b85e3(0x22f)][_0x6b85e3(0x36a)](_0x2ff1d3),{'verbose':_0x302e4a['verbose']}),{name:_0x4af760}=_0x478991[_0x6b85e3(0x227)];return saveSessionContext({'workflow_project':_0x4af760},_0x302e4a[_0x6b85e3(0x34f)]),console[_0x6b85e3(0x2b9)](a54_0x467bd9[_0x6b85e3(0x20d)](_0x6b85e3(0x298)+a54_0x467bd9[_0x6b85e3(0x1cf)](_0x4af760))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x1d2);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x225);async[a54_0x141bbb(0x21d)](_0x43cdb2){const _0x2ff851=a54_0x141bbb,{options:_0x3b1211,args:_0x243b26,tdx:_0x4f2400}=_0x43cdb2,_0x4667f6=_0x243b26[0x0];_0x3b1211[_0x2ff851(0x2c5)]&&_0x4667f6&&console['error'](_0x2ff851(0x2f3)+_0x4667f6);const _0x2f7cd3=await withSpinner(_0x2ff851(0x2d9),()=>_0x4f2400[_0x2ff851(0x22f)]['projects'](_0x4667f6,{'limit':_0x3b1211[_0x2ff851(0x280)]}),{'verbose':_0x3b1211[_0x2ff851(0x2c5)]});let _0x3faade=_0x2f7cd3['data'];_0x3faade[_0x2ff851(0x2d7)]((_0x43835b,_0x3b08f5)=>_0x43835b[_0x2ff851(0x34d)][_0x2ff851(0x204)](_0x3b08f5[_0x2ff851(0x34d)]));const _0x5c9b94=_0x3b1211['limit']||0x64,_0x388e67=_0x3faade[_0x2ff851(0x1fa)]>=_0x5c9b94?a54_0x467bd9[_0x2ff851(0x293)](_0x2ff851(0x31a)):'';console[_0x2ff851(0x2fc)](_0x2ff851(0x35d)+_0x3faade[_0x2ff851(0x1fa)]+_0x2ff851(0x1cb)+(_0x3faade[_0x2ff851(0x1fa)]!==0x1?'s':'')+_0x388e67);if(_0x3b1211['format']===_0x2ff851(0x1f1)||_0x3b1211[_0x2ff851(0x244)]===_0x2ff851(0x26d)||_0x3b1211[_0x2ff851(0x244)]===_0x2ff851(0x331))await handleSDKOutput(_0x3faade,_0x3b1211);else{if(_0x3faade['length']===0x0)_0x4667f6?console[_0x2ff851(0x2b9)](_0x2ff851(0x27a)+_0x4667f6):console[_0x2ff851(0x2b9)](_0x2ff851(0x318));else{const _0x3aec22=_0x3faade[_0x2ff851(0x2b6)](_0x2291cf=>{const _0x1f4fe2=_0x2ff851,_0x488dc3=_0x2291cf['metadata']?.[_0x1f4fe2(0x310)](_0x26ce76=>_0x26ce76[_0x1f4fe2(0x24f)]===_0x1f4fe2(0x2ca)),_0x5e8e9e=_0x488dc3?a54_0x467bd9[_0x1f4fe2(0x293)](_0x1f4fe2(0x288)):'';return _0x1f4fe2(0x29a)+_0x2291cf[_0x1f4fe2(0x34d)]+_0x5e8e9e;});await writeOutput(_0x3aec22['join']('\x0a'),_0x3b1211[_0x2ff851(0x1d3)],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x2a2);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x1c7);async[a54_0x141bbb(0x21d)](_0x20ae68){const _0x346a31=a54_0x141bbb,{options:_0x176c74,args:_0x551eb7,tdx:_0xc69fba}=_0x20ae68,_0x580d59=this[_0x346a31(0x327)](_0x551eb7,_0x176c74);_0x176c74[_0x346a31(0x2c5)]&&_0x580d59&&console[_0x346a31(0x2fc)](_0x346a31(0x28f)+_0x580d59);const _0x4a1a23=await withSpinner(_0x346a31(0x335),()=>_0xc69fba['workflow'][_0x346a31(0x31c)](_0x580d59,{'limit':_0x176c74['limit']}),{'verbose':_0x176c74[_0x346a31(0x2c5)]});let _0x531259=_0x4a1a23['data'];_0x531259[_0x346a31(0x2d7)]((_0x3f72f9,_0x387471)=>{const _0x5c7d08=_0x346a31,_0x5d05d9=_0x3f72f9[_0x5c7d08(0x34d)][_0x5c7d08(0x204)](_0x387471['name']);if(_0x5d05d9!==0x0)return _0x5d05d9;return(_0x3f72f9['project']?.['name']||'')[_0x5c7d08(0x204)](_0x387471[_0x5c7d08(0x250)]?.['name']||'');});const _0x12e464=_0x176c74['limit']||0x64,_0x400618=_0x531259[_0x346a31(0x1fa)]>=_0x12e464?a54_0x467bd9[_0x346a31(0x293)](_0x346a31(0x31a)):'';console[_0x346a31(0x2fc)](_0x346a31(0x35d)+_0x531259[_0x346a31(0x1fa)]+_0x346a31(0x234)+(_0x531259['length']!==0x1?'s':'')+_0x400618);if(_0x176c74[_0x346a31(0x244)]===_0x346a31(0x1f1)||_0x176c74['format']===_0x346a31(0x26d)||_0x176c74['format']===_0x346a31(0x331))await handleSDKOutput(_0x531259,_0x176c74);else{if(_0x531259[_0x346a31(0x1fa)]===0x0)_0x580d59?console['log'](_0x346a31(0x21a)+_0x580d59):console[_0x346a31(0x2b9)]('No\x20workflows\x20found');else{const _0xe9d31f=_0x176c74[_0x346a31(0x1f4)],_0x369e34=_0x531259[_0x346a31(0x2b6)](_0x19362e=>{const _0x4b5dfa=_0x346a31,_0x5a5ebe=a54_0x467bd9[_0x4b5dfa(0x293)]('#'+_0x19362e['id']),_0x3fcec4=hyperlink(_0x5a5ebe,getWorkflowUrl(_0xe9d31f,_0x19362e['id'])),_0x2392a4=_0x19362e[_0x4b5dfa(0x250)]?.['name']?a54_0x467bd9[_0x4b5dfa(0x293)]('\x20('+_0x19362e[_0x4b5dfa(0x250)][_0x4b5dfa(0x34d)]+')'):'';return'📋\x20'+_0x3fcec4+'\x20'+_0x19362e[_0x4b5dfa(0x34d)]+_0x2392a4;});await writeOutput(_0x369e34[_0x346a31(0x337)]('\x0a'),_0x176c74['output'],_0x346a31(0x24e));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x1d9);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x2e6);async[a54_0x141bbb(0x21d)](_0x35155b){const _0x25e21f=a54_0x141bbb,{options:_0x24b6a3,args:_0x4e78bd,tdx:_0x3e71d2}=_0x35155b,_0x1742eb=this[_0x25e21f(0x25b)](_0x4e78bd,_0x24b6a3);if(!_0x1742eb)return 0x1;const {projectName:_0xae13d2,workflowName:_0x39953f}=_0x1742eb;if(_0x24b6a3['verbose']){if(_0xae13d2&&_0x39953f)console[_0x25e21f(0x2fc)]('Filter:\x20'+_0xae13d2+'.'+_0x39953f);else _0xae13d2&&console[_0x25e21f(0x2fc)]('Filter:\x20project='+_0xae13d2);const _0x2d3e6b=_0x24b6a3[_0x25e21f(0x304)];_0x2d3e6b&&console['error']('Status:\x20'+_0x2d3e6b);}let _0x3e2579=0x28;if(process[_0x25e21f(0x324)]['isTTY']&&!_0x24b6a3['output']&&!_0x24b6a3['format']){const _0x209aba=process[_0x25e21f(0x324)][_0x25e21f(0x241)]||0x28;_0x3e2579=Math['max'](0x14,Math[_0x25e21f(0x2d0)](_0x209aba*0x2/0x3));}const _0x2b70e7=_0x24b6a3['limit']||_0x3e2579,_0x477886=await withSpinner(_0x25e21f(0x283),()=>_0x3e71d2[_0x25e21f(0x22f)]['sessions']({'projectName':_0xae13d2,'workflowName':_0x39953f,'status':_0x24b6a3[_0x25e21f(0x304)],'fromTime':_0x24b6a3['from'],'toTime':_0x24b6a3['to'],'limit':_0x2b70e7}),{'verbose':_0x24b6a3[_0x25e21f(0x2c5)]}),_0x1237e4=_0x477886[_0x25e21f(0x227)];_0x1237e4[_0x25e21f(0x2d7)]((_0x12728c,_0x5eafd3)=>{const _0x221959=_0x25e21f,_0x2d4cb1=_0x12728c['sessionTime']||'',_0x562f0f=_0x5eafd3[_0x221959(0x321)]||'';return _0x562f0f['localeCompare'](_0x2d4cb1);});_0x1237e4[_0x25e21f(0x1fa)]>=_0x2b70e7?console[_0x25e21f(0x2fc)](_0x25e21f(0x367)+_0x1237e4['length']+'\x20sessions\x20'+a54_0x467bd9['dim']('(use\x20--limit\x20to\x20see\x20more)')):console[_0x25e21f(0x2fc)](_0x25e21f(0x35d)+_0x1237e4[_0x25e21f(0x1fa)]+'\x20session'+(_0x1237e4[_0x25e21f(0x1fa)]!==0x1?'s':''));if(_0x24b6a3[_0x25e21f(0x244)]===_0x25e21f(0x1f1)||_0x24b6a3['format']===_0x25e21f(0x26d)||_0x24b6a3[_0x25e21f(0x244)]===_0x25e21f(0x331))await handleSDKOutput(_0x1237e4,_0x24b6a3);else{if(!process[_0x25e21f(0x324)][_0x25e21f(0x1ad)]||_0x24b6a3['output']){if(_0x1237e4[_0x25e21f(0x1fa)]===0x0){if(_0xae13d2&&_0x39953f)console[_0x25e21f(0x2b9)](_0x25e21f(0x349)+_0xae13d2+'.'+_0x39953f);else _0xae13d2?console[_0x25e21f(0x2b9)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0xae13d2):console[_0x25e21f(0x2b9)](_0x25e21f(0x1c0));}else{const _0x2cf062=_0x24b6a3[_0x25e21f(0x1f4)],_0x172cde=this[_0x25e21f(0x2e4)](_0x1237e4,_0x2cf062);_0x24b6a3[_0x25e21f(0x1d3)]?await writeOutput(_0x172cde,_0x24b6a3[_0x25e21f(0x1d3)],_0x25e21f(0x24e)):console[_0x25e21f(0x2b9)](_0x172cde);}!_0xae13d2&&(console['error'](''),console[_0x25e21f(0x2fc)](a54_0x467bd9[_0x25e21f(0x293)](_0x25e21f(0x2e7))),console['error'](a54_0x467bd9[_0x25e21f(0x293)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a54_0x467bd9[_0x25e21f(0x293)](_0x25e21f(0x2a0))));}else{if(_0x1237e4[_0x25e21f(0x1fa)]===0x0){if(_0xae13d2&&_0x39953f)console[_0x25e21f(0x2b9)](_0x25e21f(0x349)+_0xae13d2+'.'+_0x39953f);else _0xae13d2?console[_0x25e21f(0x2b9)](_0x25e21f(0x235)+_0xae13d2):console[_0x25e21f(0x2b9)]('No\x20sessions\x20found');}else await this[_0x25e21f(0x273)](_0x1237e4,_0x35155b,_0xae13d2);}}return 0x0;}[a54_0x141bbb(0x2e4)](_0x2110f6,_0x3989f7){const _0x4e75f0=a54_0x141bbb,_0x1e838a=[],_0x3c9712=new Map();let _0x1c38f3=Infinity,_0x8fa22a=-Infinity;for(const _0x1cfd53 of _0x2110f6){if(_0x1cfd53[_0x4e75f0(0x313)]?.[_0x4e75f0(0x36f)]){const _0xf5fda4=new Date(_0x1cfd53['lastAttempt'][_0x4e75f0(0x36f)])[_0x4e75f0(0x2f4)](),_0x2a6778=_0x1cfd53[_0x4e75f0(0x313)][_0x4e75f0(0x2a7)]?new Date(_0x1cfd53[_0x4e75f0(0x313)][_0x4e75f0(0x2a7)])[_0x4e75f0(0x2f4)]():Date[_0x4e75f0(0x2b2)](),_0x55461e=_0x1cfd53[_0x4e75f0(0x250)]?.['name']||'(unknown)';!_0x3c9712[_0x4e75f0(0x29e)](_0x55461e)&&_0x3c9712[_0x4e75f0(0x1dc)](_0x55461e,[]),_0x3c9712[_0x4e75f0(0x34a)](_0x55461e)[_0x4e75f0(0x1be)]({'session':_0x1cfd53,'startTime':_0xf5fda4,'endTime':_0x2a6778,'duration':_0x2a6778-_0xf5fda4}),_0x1c38f3=Math[_0x4e75f0(0x301)](_0x1c38f3,_0xf5fda4),_0x8fa22a=Math[_0x4e75f0(0x36c)](_0x8fa22a,_0x2a6778);}}if(_0x3c9712[_0x4e75f0(0x1ea)]===0x0)return _0x4e75f0(0x1b9);const _0x46d91a=process['stdout'][_0x4e75f0(0x1cc)]||0x78,_0x45a46a=0x1e,_0x40a338=0x32,_0x1186a0=0x4,_0xf63f18=Math[_0x4e75f0(0x301)](_0x40a338,Math[_0x4e75f0(0x36c)](_0x45a46a,Math[_0x4e75f0(0x2d0)](_0x46d91a*0.3))),_0x5ee41e=_0x46d91a-_0xf63f18-TIMELINE_CONFIG[_0x4e75f0(0x340)]-0x3-_0x1186a0,_0x3d118f=_0x8fa22a-_0x1c38f3,_0xee498b=_0x3d118f/_0xf63f18,_0x327221=renderTimeAxis({'startTime':_0x1c38f3,'endTime':_0x8fa22a,'durationMs':_0x3d118f,'msPerChar':_0xee498b},_0xf63f18),_0x39c057=[];for(const _0x10d0bf of _0x3c9712[_0x4e75f0(0x229)]()){_0x39c057[_0x4e75f0(0x1be)](..._0x10d0bf);}_0x39c057[_0x4e75f0(0x2d7)]((_0x360a91,_0x34c9b7)=>_0x34c9b7[_0x4e75f0(0x254)]-_0x360a91[_0x4e75f0(0x254)]);const _0x1ad29b=new Date(_0x1c38f3),_0x5c3962=formatDate(_0x1ad29b),_0x149ff4=_0x1186a0+TIMELINE_CONFIG[_0x4e75f0(0x343)]+TIMELINE_CONFIG[_0x4e75f0(0x1ce)]+_0x5ee41e,_0x3cacb2='\x20'[_0x4e75f0(0x22c)](_0x149ff4-_0x5c3962[_0x4e75f0(0x1fa)]),_0x340380=_0x3cacb2+a54_0x467bd9[_0x4e75f0(0x293)](_0x5c3962)+'\x20'+_0x327221;_0x1e838a['push'](_0x340380);const _0xe2ad09=0x16;let _0x49da33=0x0;for(const _0x330a6a of _0x39c057){const _0x3a6d97=_0x330a6a[_0x4e75f0(0x34f)][_0x4e75f0(0x250)]?.[_0x4e75f0(0x34d)]||'?',_0x1df153=Math[_0x4e75f0(0x301)](stringWidth(_0x3a6d97),_0xe2ad09);_0x49da33=Math[_0x4e75f0(0x36c)](_0x49da33,_0x1df153);}for(const _0x26cf1d of _0x39c057){const {session:_0x1e0554,startTime:_0x5a25bd,endTime:_0x26d26b,duration:_0x226122}=_0x26cf1d,_0x2ce0e9=_0x1e0554['project']?.['id'],_0x3e5b63=_0x1e0554['id'],_0x490fe7=_0x1e0554[_0x4e75f0(0x250)]?.[_0x4e75f0(0x34d)]||'?',_0x4c6e35=_0x1e0554[_0x4e75f0(0x22f)]?.['name']||'?';let _0x321c19,_0x45baf5;if(_0x1e0554['lastAttempt']){const _0x27b9db=_0x1e0554[_0x4e75f0(0x313)];!_0x27b9db[_0x4e75f0(0x22e)]?(_0x321c19=_0x27b9db['cancelRequested']?'🛑':'🔄',_0x45baf5=_0x27b9db[_0x4e75f0(0x27b)]?a54_0x467bd9[_0x4e75f0(0x371)]:a54_0x467bd9['blue']):(_0x321c19=_0x27b9db[_0x4e75f0(0x346)]?'✅':'❌',_0x45baf5=_0x27b9db['success']?a54_0x467bd9[_0x4e75f0(0x20d)]:a54_0x467bd9['red']);}else _0x321c19='⏳',_0x45baf5=a54_0x467bd9['dim'];const _0x51a8d9='#'+_0x3e5b63,_0x5f5405=_0x2ce0e9?hyperlink(_0x51a8d9,getWorkflowSessionUrl(_0x3989f7,_0x2ce0e9,_0x3e5b63)):_0x51a8d9;let _0x5762fd=_0x490fe7;stringWidth(_0x490fe7)>_0xe2ad09&&(_0x5762fd=_0x490fe7[_0x4e75f0(0x338)](0x0,_0xe2ad09-0x1)+'…');const _0x27d97d=a54_0x467bd9[_0x4e75f0(0x293)](_0x5762fd),_0x13cc85=stringWidth(_0x5762fd),_0x2180c1='\x20'[_0x4e75f0(0x22c)](_0x49da33-stringWidth(_0x5762fd)+0x2),_0x9fbbdc='('+formatElapsed(_0x226122)+')',_0x35f1c8=stringWidth(_0x9fbbdc),_0x2f21d1=stringWidth(_0x51a8d9),_0x529b37=_0x2f21d1+0x1+_0x13cc85+_0x2180c1[_0x4e75f0(0x1fa)],_0x27fff7=_0x5ee41e-_0x529b37-_0x35f1c8-0x1-0x8;let _0xf1b35e=_0x4c6e35;stringWidth(_0xf1b35e)>_0x27fff7&&(_0xf1b35e=_0xf1b35e[_0x4e75f0(0x338)](0x0,_0x27fff7-0x1)+'…');const _0x9d36d6=_0x5f5405+'\x20'+_0x27d97d+_0x2180c1+_0xf1b35e,_0x30f385=stringWidth(_0x9d36d6),_0x194afc=_0x5ee41e-_0x30f385-_0x35f1c8,_0x23a3e1=_0x9d36d6+'\x20'[_0x4e75f0(0x22c)](Math[_0x4e75f0(0x36c)](0x1,_0x194afc))+a54_0x467bd9['dim'](_0x9fbbdc),_0x425c68=Math['floor']((_0x5a25bd-_0x1c38f3)/_0xee498b),_0x1fff8b=Math[_0x4e75f0(0x2d0)]((_0x26d26b-_0x1c38f3)/_0xee498b),_0x5b2dde=Math[_0x4e75f0(0x36c)](_0x425c68+0x1,_0x1fff8b),_0x188df9=new Array(_0xf63f18)[_0x4e75f0(0x248)]('\x20');for(let _0x1bfa9a=_0x425c68;_0x1bfa9a<Math[_0x4e75f0(0x301)](_0x5b2dde,_0xf63f18);_0x1bfa9a++){_0x188df9[_0x1bfa9a]='─';}const _0x58d18b=_0x188df9['map'](_0x34d6fc=>_0x34d6fc==='\x20'?'\x20':_0x45baf5(_0x34d6fc))[_0x4e75f0(0x337)]('');_0x1e838a[_0x4e75f0(0x1be)](_0x321c19+'\x20'+_0x23a3e1+'│'+_0x58d18b+'│');}return _0x1e838a[_0x4e75f0(0x337)]('\x0a');}async['navigateSessionsInteractive'](_0x5abd3f,_0x24961a,_0x15431a){const _0x36ca73=a54_0x141bbb,{options:_0x426b36,tdx:_0x228903}=_0x24961a,_0x5ba464=_0x426b36['site'],{timelineRows:_0x52ef38,timeAxisHeader:_0x498edc}=this[_0x36ca73(0x322)](_0x5abd3f,_0x5ba464),_0x3c33f9=_0x52ef38[_0x36ca73(0x1fe)](_0x36f924=>_0x36f924[_0x36ca73(0x2f0)]);if(_0x3c33f9[_0x36ca73(0x1fa)]===0x0){const _0x24d19f=this[_0x36ca73(0x2e4)](_0x5abd3f,_0x5ba464);console[_0x36ca73(0x2b9)](_0x24d19f);!_0x15431a&&(console[_0x36ca73(0x2fc)](''),console['error'](a54_0x467bd9[_0x36ca73(0x293)](_0x36ca73(0x2e7))),console['error'](a54_0x467bd9['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a54_0x467bd9['dim'](_0x36ca73(0x2a0))));return;}_0x498edc&&console[_0x36ca73(0x2b9)](_0x498edc);const _0x4cfaca=_0x52ef38[_0x36ca73(0x1fe)](_0x22e045=>_0x22e045[_0x36ca73(0x2f0)])['map'](_0x17fe54=>({'title':_0x17fe54[_0x36ca73(0x2f6)],'value':_0x17fe54[_0x36ca73(0x2f0)]})),_0x2669a0=process[_0x36ca73(0x324)]['rows']||0x3c,_0x4c14e1=Math[_0x36ca73(0x36c)](0x28,Math[_0x36ca73(0x2d0)](_0x2669a0*0x2/0x3)),_0x106a9f=await a54_0x20ee9d({'type':_0x36ca73(0x23a),'name':'attemptId','message':_0x36ca73(0x29f),'choices':_0x4cfaca,'initial':-0x1,'limit':_0x4c14e1,'clearFirst':!![],'fallback':{'title':_0x36ca73(0x2c3),'value':null},'suggest':(_0x30280a,_0x395c22)=>{const _0x2d1e90=_0x36ca73;if(!_0x30280a)return Promise[_0x2d1e90(0x34b)](_0x395c22);const _0x2d2413=_0x395c22[_0x2d1e90(0x1fe)](_0x1e1ca2=>{const _0x4a8300=_0x2d1e90,_0xf51107=_0x1e1ca2;return _0xf51107[_0x4a8300(0x212)][_0x4a8300(0x2f8)]()[_0x4a8300(0x238)](_0x30280a[_0x4a8300(0x2f8)]());});return Promise['resolve'](_0x2d2413);}}),_0x3d37c1=()=>{const _0x56ef9b=_0x36ca73;process[_0x56ef9b(0x324)][_0x56ef9b(0x1ee)](_0x56ef9b(0x266)),process[_0x56ef9b(0x324)][_0x56ef9b(0x1ee)]('\x1b[1A\x1b[2K'),process[_0x56ef9b(0x324)][_0x56ef9b(0x1ee)]('\x1b[1A\x1b[2K');},_0x1eeb11=_0x106a9f&&_0x106a9f[_0x36ca73(0x2f0)]&&_0x106a9f[_0x36ca73(0x2f0)]!==null&&_0x106a9f[_0x36ca73(0x2f0)][_0x36ca73(0x1ca)]()!=='';if(!_0x1eeb11){_0x3d37c1(),console['log'](a54_0x467bd9[_0x36ca73(0x293)](_0x36ca73(0x362)));return;}_0x3d37c1();const _0x2e7ff8=_0x5abd3f[_0x36ca73(0x1ab)](_0x22e917=>_0x22e917['lastAttempt']?.['id']===_0x106a9f[_0x36ca73(0x2f0)]);if(_0x2e7ff8){const _0x369462=_0x2e7ff8[_0x36ca73(0x250)]?.[_0x36ca73(0x34d)]||'?',_0x4bf493=_0x2e7ff8['workflow']?.[_0x36ca73(0x34d)]||'?';console[_0x36ca73(0x2b9)]('Project:\x20'+a54_0x467bd9[_0x36ca73(0x293)](_0x369462)+_0x36ca73(0x378)+a54_0x467bd9[_0x36ca73(0x293)](_0x4bf493));}const _0x5e7cc2=new WorkflowTimelineCommand();await _0x5e7cc2[_0x36ca73(0x21d)]({'args':[],'options':{..._0x426b36,'attemptId':_0x106a9f['attemptId']},'tdx':_0x228903});}[a54_0x141bbb(0x322)](_0x148a36,_0x3e321e){const _0x25e5dc=a54_0x141bbb,_0x354e8d=new Map();for(const _0x5f0cbc of _0x148a36){_0x5f0cbc['id']&&_0x5f0cbc['lastAttempt']?.['id']&&_0x354e8d[_0x25e5dc(0x1dc)](_0x5f0cbc['id'],_0x5f0cbc[_0x25e5dc(0x313)]['id']);}const _0x1a3113=[];let _0x52da37='';const _0x5d0cd1=this[_0x25e5dc(0x2e4)](_0x148a36,_0x3e321e),_0x29664a=_0x5d0cd1['split']('\x0a');for(const _0x2f0911 of _0x29664a){if(_0x2f0911[_0x25e5dc(0x33d)](_0x25e5dc(0x2db))||_0x2f0911[_0x25e5dc(0x27d)](/^\s+\d{4}-\d{2}-\d{2}/))_0x52da37=_0x2f0911;else{if(_0x2f0911[_0x25e5dc(0x27d)](/^[✅❌🔄🛑⏳]/)){const _0x14243f=_0x2f0911[_0x25e5dc(0x27d)](/#(\d+)/),_0x4950f6=_0x14243f?_0x14243f[0x1]:null,_0xfeeaf5=_0x4950f6?_0x354e8d[_0x25e5dc(0x34a)](_0x4950f6)||null:null,_0x151686=_0x148a36[_0x25e5dc(0x1ab)](_0x3179ba=>_0x3179ba['id']===_0x4950f6),_0x2718bf=_0x151686?.['project']?.['name']||'';_0x1a3113[_0x25e5dc(0x1be)]({'displayLine':_0x2f0911,'attemptId':_0xfeeaf5,'projectName':_0x2718bf});}}}return{'timelineRows':_0x1a3113,'timeAxisHeader':_0x52da37};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x28d);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x2b1);async[a54_0x141bbb(0x21d)](_0x3dcb02){const _0x54c10b=a54_0x141bbb,{options:_0x267250,args:_0x58c12f,tdx:_0x478d9c}=_0x3dcb02,_0x301668=this[_0x54c10b(0x25b)](_0x58c12f,_0x267250);if(!_0x301668)return 0x1;const {projectName:_0x1c0c04,workflowName:_0x2b35ca}=_0x301668,_0x4438dd=_0x267250[_0x54c10b(0x21f)];if(_0x267250['verbose']){if(_0x1c0c04&&_0x2b35ca)console[_0x54c10b(0x2fc)](_0x54c10b(0x25f)+_0x1c0c04+'.'+_0x2b35ca);else _0x1c0c04&&console[_0x54c10b(0x2fc)]('Filter:\x20project='+_0x1c0c04);_0x4438dd&&console[_0x54c10b(0x2fc)](_0x54c10b(0x208));}const _0x3ce52b=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x478d9c[_0x54c10b(0x22f)][_0x54c10b(0x2b4)]({'projectName':_0x1c0c04,'workflowName':_0x2b35ca,'includeRetried':_0x4438dd,'limit':_0x267250['limit']}),{'verbose':_0x267250[_0x54c10b(0x2c5)]}),_0x565119=_0x3ce52b[_0x54c10b(0x227)],_0x2d9f42=_0x267250['limit']||0x64,_0x293268=_0x565119[_0x54c10b(0x1fa)]>=_0x2d9f42?a54_0x467bd9[_0x54c10b(0x293)](_0x54c10b(0x31a)):'';console['error'](_0x54c10b(0x35d)+_0x565119[_0x54c10b(0x1fa)]+_0x54c10b(0x222)+(_0x565119[_0x54c10b(0x1fa)]!==0x1?'s':'')+_0x293268);if(_0x267250[_0x54c10b(0x244)]===_0x54c10b(0x1f1)||_0x267250[_0x54c10b(0x244)]===_0x54c10b(0x26d)||_0x267250['format']==='table')await handleSDKOutput(_0x565119,_0x267250);else{if(_0x565119[_0x54c10b(0x1fa)]===0x0){if(_0x1c0c04&&_0x2b35ca)console['log'](_0x54c10b(0x224)+_0x1c0c04+'.'+_0x2b35ca);else _0x1c0c04?console['log'](_0x54c10b(0x30c)+_0x1c0c04):console['log'](_0x54c10b(0x2a9));}else{const _0x3dd650=_0x267250[_0x54c10b(0x1f4)],_0x55bce7=_0x565119['map'](_0x1c557c=>{const _0x345912=_0x54c10b,_0xe8ee2a=a54_0x467bd9[_0x345912(0x293)]('#'+_0x1c557c['id']),_0x3b1832=_0x1c557c[_0x345912(0x250)]?.['id'],_0x214015=_0x1c557c[_0x345912(0x1f3)]||_0x1c557c[_0x345912(0x223)],_0x133a6d=_0x3b1832&&_0x214015?hyperlink(_0xe8ee2a,getWorkflowAttemptUrl(_0x3dd650,_0x3b1832,_0x214015,_0x1c557c['id'])):_0xe8ee2a,{icon:_0x24db55,text:_0x395edd}=getAttemptStatusDisplay(_0x1c557c),_0x10aa5a=(_0x1c557c[_0x345912(0x250)]?.[_0x345912(0x34d)]||'?')+'.'+(_0x1c557c[_0x345912(0x22f)]?.[_0x345912(0x34d)]||'?'),_0x3859bb=_0x1c557c['sessionTime']?a54_0x467bd9['dim'](_0x1c557c[_0x345912(0x321)]):'';return(_0x133a6d+'\x20'+_0x24db55+(_0x395edd?'\x20'+_0x395edd:'')+'\x20'+_0x10aa5a+'\x20'+_0x3859bb)['trimEnd']();});await writeOutput(_0x55bce7[_0x54c10b(0x337)]('\x0a'),_0x267250[_0x54c10b(0x1d3)],_0x54c10b(0x24e));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0x141bbb(0x34d)]='workflow:attempt';[a54_0x141bbb(0x20b)]='Show\x20specific\x20attempt\x20details';async['execute'](_0x3902a0){const _0x7df58c=a54_0x141bbb,{options:_0x1b5d0e,args:_0x50dc9b,tdx:_0x27cfcb}=_0x3902a0,_0x5eb47e=_0x50dc9b[0x0];if(!_0x5eb47e)return console[_0x7df58c(0x2fc)](_0x7df58c(0x23f)),0x1;_0x1b5d0e[_0x7df58c(0x2c5)]&&console[_0x7df58c(0x2fc)]('Attempt\x20ID:\x20'+_0x5eb47e);const _0x58c21a=await withSpinner(_0x7df58c(0x297),()=>_0x27cfcb[_0x7df58c(0x22f)][_0x7df58c(0x366)](_0x5eb47e),{'verbose':_0x1b5d0e[_0x7df58c(0x2c5)]}),_0x57120f=_0x58c21a[_0x7df58c(0x227)];let _0x8bdda5;!_0x57120f['done']?_0x8bdda5=_0x57120f[_0x7df58c(0x27b)]?_0x7df58c(0x1de):_0x7df58c(0x295):_0x8bdda5=_0x57120f['success']?_0x7df58c(0x346):_0x7df58c(0x2fc);let _0x4cde1f;if(_0x57120f[_0x7df58c(0x36f)]&&_0x57120f[_0x7df58c(0x2a7)]){const _0x368653=new Date(_0x57120f[_0x7df58c(0x36f)])[_0x7df58c(0x2f4)](),_0x1d41f1=new Date(_0x57120f['finishedAt'])['getTime']();_0x4cde1f=Math[_0x7df58c(0x26e)]((_0x1d41f1-_0x368653)/0x3e8);}const _0x3e7f73={'attempt_id':_0x57120f['id'],'status':_0x8bdda5,..._0x57120f[_0x7df58c(0x251)]!==undefined&&{'index':_0x57120f[_0x7df58c(0x251)]},..._0x57120f['project']&&{'project':_0x57120f[_0x7df58c(0x250)][_0x7df58c(0x34d)]},..._0x57120f[_0x7df58c(0x22f)]&&{'workflow':_0x57120f[_0x7df58c(0x22f)][_0x7df58c(0x34d)]},..._0x57120f['sessionId']&&{'session_id':_0x57120f[_0x7df58c(0x223)]},..._0x57120f[_0x7df58c(0x321)]&&{'session_time':_0x57120f[_0x7df58c(0x321)]},..._0x57120f[_0x7df58c(0x350)]&&{'retry_attempt':_0x57120f['retryAttemptName']},..._0x4cde1f!==undefined&&{'duration_sec':_0x4cde1f},..._0x57120f[_0x7df58c(0x36f)]&&{'created_at':_0x57120f[_0x7df58c(0x36f)]},..._0x57120f[_0x7df58c(0x2a7)]&&{'finished_at':_0x57120f[_0x7df58c(0x2a7)]},...Object[_0x7df58c(0x1e4)](_0x57120f[_0x7df58c(0x2cc)])[_0x7df58c(0x1fa)]>0x0&&{'params':_0x57120f[_0x7df58c(0x2cc)]}};return await handleSingleObjectOutput(_0x3e7f73,_0x1b5d0e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a54_0x141bbb(0x226);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x1c2);async[a54_0x141bbb(0x21d)](_0x271732){const _0x44a286=a54_0x141bbb,{options:_0x376c4c,args:_0x407e16,tdx:_0x3f55f9}=_0x271732,_0x38fd25=_0x407e16[0x0];if(!_0x38fd25)return console[_0x44a286(0x2fc)](_0x44a286(0x23f)),0x1;const _0x251eaf=_0x376c4c['includeSubtasks'];_0x376c4c[_0x44a286(0x2c5)]&&(console[_0x44a286(0x2fc)]('Attempt\x20ID:\x20'+_0x38fd25),_0x251eaf&&console[_0x44a286(0x2fc)](_0x44a286(0x1d1)));const _0x24e912=await withSpinner(_0x44a286(0x2c0),()=>_0x3f55f9[_0x44a286(0x22f)]['tasks'](_0x38fd25,_0x251eaf||![]),{'verbose':_0x376c4c[_0x44a286(0x2c5)]}),_0x406a6c=_0x24e912[_0x44a286(0x227)];return console[_0x44a286(0x2fc)](_0x44a286(0x35d)+_0x406a6c[_0x44a286(0x1fa)]+_0x44a286(0x34c)+(_0x406a6c[_0x44a286(0x1fa)]!==0x1?'s':'')),await handleSDKOutput(_0x406a6c,_0x376c4c),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0x141bbb(0x34d)]='workflow:logs';[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x2a5);async[a54_0x141bbb(0x21d)](_0x58d5e8){const _0x27cfee=a54_0x141bbb,{options:_0x3a8544,args:_0x30aa7d,tdx:_0x2a1ca1}=_0x58d5e8,_0x3ddee2=_0x30aa7d[0x0];let _0x58aa85=_0x30aa7d[0x1];if(!_0x3ddee2)return console[_0x27cfee(0x2fc)](_0x27cfee(0x23f)),0x1;_0x3a8544[_0x27cfee(0x2c5)]&&(console[_0x27cfee(0x2fc)](_0x27cfee(0x2b7)+_0x3ddee2),_0x58aa85&&console[_0x27cfee(0x2fc)]('Task\x20name:\x20'+_0x58aa85));const _0x451afa=await withSpinner(_0x27cfee(0x243),()=>_0x2a1ca1[_0x27cfee(0x22f)][_0x27cfee(0x1e1)](_0x3ddee2,_0x58aa85),{'verbose':_0x3a8544[_0x27cfee(0x2c5)]}),_0xf21edf=_0x451afa[_0x27cfee(0x227)];if(_0xf21edf[_0x27cfee(0x1fa)]===0x0)return console[_0x27cfee(0x2fc)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x58aa85&&(_0x3a8544['json']||_0x3a8544[_0x27cfee(0x244)]))return await handleSDKOutput(_0xf21edf,_0x3a8544),0x0;if(!_0x58aa85){const _0x395fb2=_0xf21edf[_0x27cfee(0x2b6)](_0x13aa5d=>({'title':_0x13aa5d[_0x27cfee(0x1dd)]+'\x20('+formatBytes(_0x13aa5d[_0x27cfee(0x29c)])+')','value':_0x13aa5d[_0x27cfee(0x1dd)]})),_0x1b5383=await a54_0x20ee9d({'type':_0x27cfee(0x1f6),'name':_0x27cfee(0x354),'message':_0x27cfee(0x249),'choices':_0x395fb2});if(!_0x1b5383['task'])return console['error'](_0x27cfee(0x362)),0x0;_0x58aa85=_0x1b5383[_0x27cfee(0x354)];}const _0xbd960b=await withSpinner(_0x27cfee(0x1ec),()=>_0x2a1ca1[_0x27cfee(0x22f)][_0x27cfee(0x2a8)](_0x3ddee2,_0x58aa85),{'verbose':_0x3a8544[_0x27cfee(0x2c5)]}),_0x23f0cf=_0xbd960b['data'];return _0x23f0cf?console[_0x27cfee(0x2b9)](_0x23f0cf):console[_0x27cfee(0x2fc)](_0x27cfee(0x347)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x2ce);[a54_0x141bbb(0x20b)]='Kill\x20a\x20running\x20attempt';async[a54_0x141bbb(0x21d)](_0x44d3ba){const _0x5079cd=a54_0x141bbb,{options:_0x2cd4cc,args:_0x2f424f,tdx:_0x16d7f9}=_0x44d3ba,_0x58ecc1=_0x2f424f[0x0];if(!_0x58ecc1)return console[_0x5079cd(0x2fc)](_0x5079cd(0x23f)),0x1;const _0xdc1688=_0x2cd4cc['reason'];_0x2cd4cc[_0x5079cd(0x2c5)]&&(console['error']('Attempt\x20ID:\x20'+_0x58ecc1),_0xdc1688&&console[_0x5079cd(0x2fc)](_0x5079cd(0x291)+_0xdc1688));if(!_0x2cd4cc['yes']){if(!isInteractive())return console[_0x5079cd(0x2fc)](a54_0x467bd9['red'](_0x5079cd(0x317)),_0x5079cd(0x275)),console[_0x5079cd(0x2fc)](a54_0x467bd9[_0x5079cd(0x293)](_0x5079cd(0x1af))),0x1;const _0x573dea=await confirmKey(_0x5079cd(0x299)+_0x58ecc1+'?');if(!_0x573dea)return console['error'](a54_0x467bd9[_0x5079cd(0x371)](_0x5079cd(0x362))),0x1;}const _0x5a97a6=await withSpinner(_0x5079cd(0x30b),()=>_0x16d7f9[_0x5079cd(0x22f)][_0x5079cd(0x311)](_0x58ecc1,_0xdc1688),{'verbose':_0x2cd4cc[_0x5079cd(0x2c5)]}),_0x552393=_0x5a97a6['data'];return console[_0x5079cd(0x2fc)]('✔\x20'+_0x552393),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x372);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x2fe);async[a54_0x141bbb(0x21d)](_0x124e9d){const _0x5a320b=a54_0x141bbb,{options:_0x500a5c,args:_0x361a09,tdx:_0x367109}=_0x124e9d,_0x1f7de6=_0x361a09[0x0];if(!_0x1f7de6)return console['error']('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x5a320b(0x2fc)](_0x5a320b(0x246)),0x1;let _0x4bee22=![],_0x1d52d3=_0x1f7de6;if(_0x1f7de6[_0x5a320b(0x33d)](_0x5a320b(0x360)))_0x4bee22=!![],_0x1d52d3=_0x1f7de6['substring'](0x8);else{if(_0x1f7de6[_0x5a320b(0x33d)]('attempt:'))_0x4bee22=![],_0x1d52d3=_0x1f7de6[_0x5a320b(0x1ff)](0x8);else return console[_0x5a320b(0x2fc)](_0x5a320b(0x22b)),console['error'](_0x5a320b(0x246)),0x1;}const _0x4a59c6=_0x500a5c[_0x5a320b(0x1c8)],_0x88808=_0x500a5c[_0x5a320b(0x33b)],_0x5eb745=_0x500a5c[_0x5a320b(0x2cc)],_0x19fef5=_0x500a5c[_0x5a320b(0x289)];_0x500a5c[_0x5a320b(0x2c5)]&&(console[_0x5a320b(0x2fc)](_0x5a320b(0x209)+(_0x4bee22?_0x5a320b(0x34f):'attempt')+'\x20'+_0x1d52d3),_0x4a59c6&&console[_0x5a320b(0x2fc)](_0x5a320b(0x218)+_0x4a59c6),_0x88808&&console[_0x5a320b(0x2fc)](_0x5a320b(0x28e)+_0x88808),_0x5eb745&&console[_0x5a320b(0x2fc)](_0x5a320b(0x274)+_0x5eb745),_0x19fef5&&console[_0x5a320b(0x2fc)](_0x5a320b(0x2e9)));let _0x203372;if(_0x5eb745)try{if(_0x5eb745[_0x5a320b(0x33d)]('@')){const _0x406bcf=await import(_0x5a320b(0x231)),_0x56a369=_0x5eb745[_0x5a320b(0x1ff)](0x1),_0x2d0666=await _0x406bcf['readFile'](_0x56a369,_0x5a320b(0x320));_0x203372=JSON[_0x5a320b(0x281)](_0x2d0666);}else _0x203372=JSON[_0x5a320b(0x281)](_0x5eb745);}catch{return console[_0x5a320b(0x2fc)](_0x5a320b(0x287)),0x1;}if(!_0x500a5c[_0x5a320b(0x269)]){if(!isInteractive())return console[_0x5a320b(0x2fc)](a54_0x467bd9[_0x5a320b(0x2ac)](_0x5a320b(0x317)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a54_0x467bd9[_0x5a320b(0x293)](_0x5a320b(0x1af))),0x1;const _0x107707=await confirmKey(_0x5a320b(0x2c8)+(_0x4bee22?_0x5a320b(0x34f):'attempt')+'\x20'+_0x1d52d3+'?');if(!_0x107707)return console[_0x5a320b(0x2fc)](a54_0x467bd9['yellow'](_0x5a320b(0x362))),0x1;}let _0x339c4f;_0x4bee22?_0x339c4f=await withSpinner(_0x5a320b(0x292),()=>_0x367109[_0x5a320b(0x22f)]['retrySession'](_0x1d52d3,{'fromTask':_0x4a59c6,'retryParams':_0x203372}),{'verbose':_0x500a5c['verbose']}):_0x339c4f=await withSpinner(_0x5a320b(0x28b),()=>_0x367109[_0x5a320b(0x22f)][_0x5a320b(0x2be)](_0x1d52d3,{'resumeFrom':_0x88808,'retryParams':_0x203372,'force':_0x19fef5}),{'verbose':_0x500a5c[_0x5a320b(0x2c5)]});const _0x34a031=_0x339c4f[_0x5a320b(0x227)];return console[_0x5a320b(0x2fc)]('✔\x20Retry\x20started'),console['error']('\x20\x20New\x20attempt\x20ID:\x20'+_0x34a031[_0x5a320b(0x2f0)]),console[_0x5a320b(0x2fc)]('\x20\x20Session\x20ID:\x20'+_0x34a031[_0x5a320b(0x223)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x1bb);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x302);async[a54_0x141bbb(0x21d)](_0x12d938){const _0x2ff7be=a54_0x141bbb,{options:_0x5419f0,args:_0x4f86e5,tdx:_0x2eef71}=_0x12d938;let _0x4a605c=_0x4f86e5[0x0];if(!_0x4a605c){const _0x27d620=this[_0x2ff7be(0x327)]([],_0x5419f0),_0x3cb002=await withSpinner('Loading\x20workflows...',()=>_0x2eef71[_0x2ff7be(0x22f)][_0x2ff7be(0x31c)](_0x27d620,{'limit':_0x5419f0['limit']}),{'verbose':_0x5419f0[_0x2ff7be(0x2c5)]}),_0x4de4c6=_0x3cb002[_0x2ff7be(0x227)];if(_0x4de4c6[_0x2ff7be(0x1fa)]===0x0)return console['error'](_0x2ff7be(0x25c)),!_0x27d620&&console[_0x2ff7be(0x2fc)](a54_0x467bd9['dim'](_0x2ff7be(0x2cd))),0x1;const _0x463163=_0x4de4c6[_0x2ff7be(0x2b6)](_0x3ed53f=>({'title':_0x3ed53f[_0x2ff7be(0x250)]?.['name']+'.'+_0x3ed53f[_0x2ff7be(0x34d)],'value':_0x3ed53f[_0x2ff7be(0x250)]?.[_0x2ff7be(0x34d)]+'.'+_0x3ed53f['name'],'description':_0x3ed53f['revision']?_0x2ff7be(0x1b6)+_0x3ed53f[_0x2ff7be(0x2cb)]:undefined})),_0x5c1fa1=await a54_0x20ee9d({'type':_0x2ff7be(0x1f6),'name':_0x2ff7be(0x22f),'message':_0x2ff7be(0x1c4),'choices':_0x463163});if(!_0x5c1fa1[_0x2ff7be(0x22f)])return 0x1;_0x4a605c=_0x5c1fa1[_0x2ff7be(0x22f)];}if(!_0x4a605c[_0x2ff7be(0x238)]('.')){const _0x185078=this[_0x2ff7be(0x327)]([],_0x5419f0);if(_0x185078)_0x4a605c=_0x185078+'.'+_0x4a605c;else return console[_0x2ff7be(0x2fc)](a54_0x467bd9[_0x2ff7be(0x2ac)]('Error:'),_0x2ff7be(0x267)),console[_0x2ff7be(0x2fc)](a54_0x467bd9[_0x2ff7be(0x293)](_0x2ff7be(0x2cd))),0x1;}const _0x268c46=_0x5419f0[_0x2ff7be(0x361)],_0x26e4ca=_0x5419f0[_0x2ff7be(0x321)],_0x1018f2={};if(_0x268c46&&Array[_0x2ff7be(0x359)](_0x268c46))for(const _0x3d190f of _0x268c46){const _0x43bf1a=_0x3d190f[_0x2ff7be(0x30d)]('=');if(_0x43bf1a===-0x1)return console[_0x2ff7be(0x2fc)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x3d190f),console[_0x2ff7be(0x2fc)](_0x2ff7be(0x25a)),0x1;const _0x55813d=_0x3d190f[_0x2ff7be(0x1ff)](0x0,_0x43bf1a),_0x4da2a9=_0x3d190f[_0x2ff7be(0x1ff)](_0x43bf1a+0x1);try{_0x1018f2[_0x55813d]=JSON[_0x2ff7be(0x281)](_0x4da2a9);}catch{_0x1018f2[_0x55813d]=_0x4da2a9;}}_0x5419f0['verbose']&&(console['error'](_0x2ff7be(0x28a)+_0x4a605c),Object[_0x2ff7be(0x1e4)](_0x1018f2)[_0x2ff7be(0x1fa)]>0x0&&console['error'](_0x2ff7be(0x2c9)+JSON[_0x2ff7be(0x1bc)](_0x1018f2)),_0x26e4ca&&console[_0x2ff7be(0x2fc)](_0x2ff7be(0x2ff)+_0x26e4ca));const _0x4092b8=await withSpinner('Starting\x20workflow\x20run...',()=>_0x2eef71['workflow'][_0x2ff7be(0x239)](_0x4a605c,_0x1018f2,{'sessionTime':_0x26e4ca}),{'verbose':_0x5419f0[_0x2ff7be(0x2c5)]}),_0x4bfd86=_0x4092b8[_0x2ff7be(0x227)];console[_0x2ff7be(0x2fc)]('✔\x20Workflow\x20run\x20started'),console[_0x2ff7be(0x2fc)]('\x20\x20Attempt\x20ID:\x20'+_0x4bfd86['id']),console[_0x2ff7be(0x2fc)]('\x20\x20Session\x20ID:\x20'+_0x4bfd86[_0x2ff7be(0x223)]),console['error'](_0x2ff7be(0x1d6)+_0x4bfd86[_0x2ff7be(0x250)]?.[_0x2ff7be(0x34d)]),console[_0x2ff7be(0x2fc)](_0x2ff7be(0x36e)+_0x4bfd86[_0x2ff7be(0x22f)]?.[_0x2ff7be(0x34d)]);if(_0x4bfd86['project']?.['id']&&_0x4bfd86[_0x2ff7be(0x223)]&&_0x4bfd86['id']){const _0x4cf364=_0x5419f0['site'],_0x1be062=getConsoleUrl(_0x4cf364,'/app/workflows/'+_0x4bfd86['project']['id']+_0x2ff7be(0x2d3)+_0x4bfd86[_0x2ff7be(0x223)]+_0x2ff7be(0x32a)+_0x4bfd86['id']);console[_0x2ff7be(0x2fc)](_0x2ff7be(0x28c)+a54_0x467bd9[_0x2ff7be(0x1cf)](_0x1be062));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x272);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x2ea);async[a54_0x141bbb(0x21d)](_0x401c82){const _0x48962e=a54_0x141bbb,{options:_0xd9183a,args:_0xb7784,tdx:_0x1f9403}=_0x401c82,_0x5ad7a7=_0xb7784[0x0],_0x12db71=_0xb7784[0x1]||'.';if(!_0x5ad7a7)return console[_0x48962e(0x2fc)](_0x48962e(0x220)),console[_0x48962e(0x2fc)](_0x48962e(0x1b0)),0x1;const _0x5f20e5=_0xd9183a[_0x48962e(0x2cb)];_0xd9183a[_0x48962e(0x2c5)]&&(console[_0x48962e(0x2fc)](_0x48962e(0x2c7)+_0x5ad7a7),console[_0x48962e(0x2fc)](_0x48962e(0x300)+_0x12db71),_0x5f20e5&&console[_0x48962e(0x2fc)](_0x48962e(0x247)+_0x5f20e5));const _0x319b46=await withSpinner(_0x48962e(0x2fa)+_0x5ad7a7+_0x48962e(0x21e),()=>_0x1f9403[_0x48962e(0x22f)][_0x48962e(0x24a)](_0x5ad7a7,_0x12db71,{'revision':_0x5f20e5}),{'verbose':_0xd9183a[_0x48962e(0x2c5)]}),_0x515005=_0x319b46[_0x48962e(0x227)];return console[_0x48962e(0x2fc)](_0x48962e(0x2af)+_0x515005[_0x48962e(0x296)]),console[_0x48962e(0x2fc)](_0x48962e(0x37b)+_0x515005['revision']),console[_0x48962e(0x2fc)](_0x48962e(0x1bf)+_0x515005['filesExtracted']),console[_0x48962e(0x2fc)](_0x48962e(0x1c5)+_0x12db71+'/'+_0x515005[_0x48962e(0x296)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]='workflow:upload';[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x30a);async['execute'](_0x30f3e7){const _0x3c8dcc=a54_0x141bbb,{options:_0x18d902,args:_0x2a61ad,tdx:_0x55b3a2}=_0x30f3e7;let _0x25bd6e='.',_0x161bbf=_0x18d902[_0x3c8dcc(0x34d)];if(_0x2a61ad[0x0]){const {promises:_0xef2697}=await import('fs');try{const _0x48d775=await _0xef2697[_0x3c8dcc(0x2a1)](_0x2a61ad[0x0]);if(_0x48d775[_0x3c8dcc(0x25e)]())_0x25bd6e=_0x2a61ad[0x0];else return console['error']('Error:\x20'+_0x2a61ad[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x161bbf=_0x2a61ad[0x0],_0x25bd6e='.';}}const _0x21a38b=_0x18d902[_0x3c8dcc(0x2cb)],_0x1cd60c=_0x18d902['skipValidation'];_0x18d902['verbose']&&(console[_0x3c8dcc(0x2fc)](_0x3c8dcc(0x315)+_0x25bd6e),_0x161bbf&&console[_0x3c8dcc(0x2fc)](_0x3c8dcc(0x2e5)+_0x161bbf),_0x21a38b&&console[_0x3c8dcc(0x2fc)]('Revision:\x20'+_0x21a38b),_0x1cd60c&&console[_0x3c8dcc(0x2fc)]('Validation:\x20skipped'));const _0x5d6149=await withSpinner(_0x3c8dcc(0x245),()=>_0x55b3a2[_0x3c8dcc(0x22f)][_0x3c8dcc(0x1be)](_0x25bd6e,{'projectName':_0x161bbf,'revision':_0x21a38b,'skipValidation':_0x1cd60c}),{'verbose':_0x18d902[_0x3c8dcc(0x2c5)]}),_0x3e1c1c=_0x5d6149[_0x3c8dcc(0x227)];return console[_0x3c8dcc(0x2fc)]('✔\x20Pushed\x20'+_0x3e1c1c[_0x3c8dcc(0x296)]),console[_0x3c8dcc(0x2fc)]('\x20\x20Project\x20ID:\x20'+_0x3e1c1c[_0x3c8dcc(0x2d2)]),console[_0x3c8dcc(0x2fc)]('\x20\x20Revision:\x20'+_0x3e1c1c['revision']),await this['showWorkflowConsoleUrl'](_0x55b3a2,_0x3e1c1c[_0x3c8dcc(0x296)],_0x18d902[_0x3c8dcc(0x1f4)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x1f5);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x2c6);async[a54_0x141bbb(0x21d)](_0x1c0b76){const _0xe4f053=a54_0x141bbb,{options:_0xbdd43,args:_0x5e19b3,tdx:_0x266efe}=_0x1c0b76,_0x45bf18=_0x5e19b3[0x0],_0x197442=_0x5e19b3[0x1];if(!_0x45bf18)return console[_0xe4f053(0x2fc)](a54_0x467bd9[_0xe4f053(0x2ac)](_0xe4f053(0x20a)),'Project\x20name\x20is\x20required'),console[_0xe4f053(0x2fc)](a54_0x467bd9[_0xe4f053(0x293)](_0xe4f053(0x284))),0x1;const _0x4fa3de=_0xbdd43[_0xe4f053(0x2cb)];_0xbdd43[_0xe4f053(0x2c5)]&&(console['error']('Project:\x20'+_0x45bf18),_0x197442&&console[_0xe4f053(0x2fc)](_0xe4f053(0x1b5)+_0x197442),_0x4fa3de&&console[_0xe4f053(0x2fc)](_0xe4f053(0x247)+_0x4fa3de),_0xbdd43[_0xe4f053(0x228)]&&console[_0xe4f053(0x2fc)]('Dry\x20run:\x20yes'));const _0x42057b=await withSpinner(_0xe4f053(0x36d)+_0x45bf18+'...',()=>_0x266efe[_0xe4f053(0x22f)]['pullProject'](_0x45bf18,{'targetDir':_0x197442,'revision':_0x4fa3de}),{'verbose':_0xbdd43[_0xe4f053(0x2c5)]}),_0x2b57ea=_0x42057b[_0xe4f053(0x227)];_0x2b57ea['isNewProject']?console['error'](_0xe4f053(0x27c)+_0x2b57ea[_0xe4f053(0x296)]):console['error'](_0xe4f053(0x33a)+_0x2b57ea['projectName']);console['error'](_0xe4f053(0x37b)+_0x2b57ea[_0xe4f053(0x2cb)]),console[_0xe4f053(0x2fc)](_0xe4f053(0x232)+(a54_0x20d6ee['relative'](process[_0xe4f053(0x34e)](),_0x2b57ea[_0xe4f053(0x253)])||'.')),console[_0xe4f053(0x2fc)]('\x20\x20Changes:\x20'+a54_0x467bd9['green']('+'+_0x2b57ea[_0xe4f053(0x240)][_0xe4f053(0x26c)]+_0xe4f053(0x328))+',\x20'+(a54_0x467bd9[_0xe4f053(0x371)]('~'+_0x2b57ea['summary'][_0xe4f053(0x268)]+'\x20modified')+',\x20')+(a54_0x467bd9['red']('-'+_0x2b57ea[_0xe4f053(0x240)][_0xe4f053(0x333)]+_0xe4f053(0x219))+',\x20')+(''+a54_0x467bd9[_0xe4f053(0x293)](_0x2b57ea[_0xe4f053(0x240)][_0xe4f053(0x2cf)]+_0xe4f053(0x31b))));for(const _0x4144a1 of _0x2b57ea[_0xe4f053(0x2bd)]){_0x4144a1['type']===_0xe4f053(0x268)&&_0x4144a1[_0xe4f053(0x2fd)]&&(console['error']('\x0a'+a54_0x467bd9[_0xe4f053(0x1cf)](_0xe4f053(0x1b8)+_0x4144a1[_0xe4f053(0x258)])),console[_0xe4f053(0x2fc)](_0x4144a1[_0xe4f053(0x2fd)]));}if(!_0x2b57ea['hasChanges'])return saveSessionContext({'workflow_project':_0x2b57ea[_0xe4f053(0x296)]},_0xbdd43['session']),console['error'](a54_0x467bd9['green'](_0xe4f053(0x236))),console['error'](a54_0x467bd9['dim'](_0xe4f053(0x33f)+_0x2b57ea[_0xe4f053(0x296)])),0x0;if(_0xbdd43[_0xe4f053(0x228)])return console['error'](a54_0x467bd9[_0xe4f053(0x371)](_0xe4f053(0x368))),0x0;if(!_0xbdd43[_0xe4f053(0x269)]){if(!isInteractive())return console[_0xe4f053(0x2fc)](a54_0x467bd9['red'](_0xe4f053(0x317)),_0xe4f053(0x275)),console['error'](a54_0x467bd9[_0xe4f053(0x293)](_0xe4f053(0x1af))),0x1;const _0x3a8410=await confirmKey(_0xe4f053(0x1ac));if(!_0x3a8410)return console[_0xe4f053(0x2fc)](a54_0x467bd9[_0xe4f053(0x371)](_0xe4f053(0x362)),_0xe4f053(0x1e5)),0x1;}await withSpinner(_0xe4f053(0x277),()=>_0x266efe[_0xe4f053(0x22f)][_0xe4f053(0x1fb)](_0x2b57ea,{'revision':_0x4fa3de}),{'verbose':_0xbdd43[_0xe4f053(0x2c5)]}),saveSessionContext({'workflow_project':_0x2b57ea['projectName']},_0xbdd43[_0xe4f053(0x34f)]),console[_0xe4f053(0x2fc)](a54_0x467bd9[_0xe4f053(0x20d)](_0xe4f053(0x334)));const _0x5b9315=a54_0x20d6ee['relative'](process[_0xe4f053(0x34e)](),_0x2b57ea[_0xe4f053(0x253)])||'.';return console['error'](a54_0x467bd9[_0xe4f053(0x293)](_0xe4f053(0x1c5)+_0x5b9315)),console[_0xe4f053(0x2fc)](a54_0x467bd9['dim'](_0xe4f053(0x33f)+_0x2b57ea[_0xe4f053(0x296)])),0x0;}}function a54_0xc7bf(){const _0xcbc242=['65IuJrBH','Files\x20to\x20upload:\x20','\x20\x20Project:\x20','✔\x20Push\x20complete','workflowProject','workflow:sessions','showWorkflowConsoleUrl','\x20-\x20','set','taskName','canceling','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','text','logFiles','MAX_TASKS_DISPLAY','\x20tasks','keys','-\x20no\x20files\x20written','Deleting\x20secret...','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Enable\x20a\x20workflow\x20schedule','\x20of\x20','size','executePushProject','Downloading\x20logs...','start','write','\x0a✔\x20No\x20changes\x20to\x20push','Key:\x20','json','\x22\x20to\x20new\x20project\x20\x22','session_id','site','workflow:pull','select','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x20modified','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','length','applyPullProject','✔\x20Secret\x20\x27','799628OwaMqm','filter','substring','targetExists','35600rOdaRD','22lMNNjh','Schedule\x20ID\x20is\x20required','localeCompare','\x0aFailed\x20to\x20fetch\x20attempt\x20data','unknown','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','Include\x20retried:\x20yes','Target:\x20','Error:','description','TASK_NAME_WIDTH','green','Filter:\x20project=','\x20from\x20session\x20','\x20has\x20no\x20attempts','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','title','\x20secret','4543763YLtzWy','every','durationMs','updatedAt','From\x20task:\x20','\x20deleted','No\x20workflows\x20found\x20in\x20project:\x20','💡\x20Tip:\x20Use\x20','listSecrets','execute','...','includeRetried','Error:\x20Project\x20name\x20is\x20required','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','\x20attempt','sessionId','No\x20attempts\x20found\x20for:\x20','List\x20all\x20workflow\x20projects','workflow:tasks','data','dryRun','values','MIN_LABEL_COUNT','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','repeat','getFullYear','done','workflow','workflow:secrets:set','fs/promises','\x20\x20Target:\x20','No\x20workflow\x20sessions\x20found','\x20workflow','No\x20sessions\x20found\x20in\x20project:\x20','\x0a✔\x20Already\x20up\x20to\x20date','Source:\x20','includes','run','autocomplete','\x0a✔\x20Attempt\x20complete','workflow:schedule:disable','msPerChar','\x0aPolling...\x20(','Error:\x20Attempt\x20ID\x20is\x20required','summary','rows','fullName','Fetching\x20log\x20files...','format','Pushing\x20workflow\x20project...','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Revision:\x20','fill','Select\x20a\x20task\x20to\x20view\x20logs:','download','executeCloneProject','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','Latest\x20session\x20has\x20no\x20attempt','list','key','project','index','Failed\x20to\x20fetch\x20attempt\x20data','targetDir','startTime','Dry\x20run:\x20yes','Source\x20directory:\x20','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','path','Validation:\x20skipped','Expected\x20format:\x20--param\x20key=value','parseProjectWorkflowPattern','No\x20workflows\x20found','startedAt','isDirectory','Filter:\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','padStart','getMonth','\x0a⚠\x20Project\x20\x22','🔄\x20','toLocaleString','\x1b[1A\x1b[2K','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','modified','yes','window','\x20\x20Project\x20ID:\x20','new','jsonl','round','\x22?\x20This\x20cannot\x20be\x20undone.','white','Invalid\x20format:\x20','workflow:download','navigateSessionsInteractive','Params:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Pushing\x20project...','Writing\x20files...','\x20next:\x20','Disabling\x20schedule\x20#','No\x20projects\x20match\x20pattern:\x20','cancelRequested','→\x20New\x20project:\x20','match','basename','planned','limit','parse','No\x20schedules\x20found','Listing\x20workflow\x20sessions...','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','tasks','Using\x20attempt\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20(system)','force','Workflow:\x20','Retrying\x20attempt...','\x20\x20Console:\x20','workflow:attempts','Resume\x20from:\x20','Project\x20filter:\x20','setSecrets','Reason:\x20','Retrying\x20session...','dim','workflow:secrets:delete','running','projectName','Getting\x20attempt\x20details...','✔\x20Workflow\x20project\x20set\x20to:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','📁\x20','\x22\x20with\x20new\x20revision?','fileSize','(unknown)','has','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','\x20\x20tdx\x20wf\x20use\x20<project>','stat','workflow:workflows','Key\x20cannot\x20be\x20empty','workflow:use','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','finishedAt','logs','No\x20attempts\x20found','✔\x20Deleted\x20project\x20','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','red','disableSchedule','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','✔\x20Downloaded\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','List\x20workflow\x20attempts','now','POLL_INTERVAL_MS','attempts','\x20secrets\x20set\x20for\x20project\x20\x27','map','Attempt\x20ID:\x20','toISOString','log','Updating\x20','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','workflow:push','changes','retryAttempt','\x0aDry\x20run\x20-\x20no\x20project\x20created','Getting\x20attempt\x20tasks...','Loading\x20session...','✔\x20Workflow\x20project\x20context\x20cleared.','No\x20matching\x20sessions\x20found','Warning:','verbose','Pull\x20workflow\x20project\x20to\x20local\x20folder','Project:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Parameters:\x20','sys','revision','params','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','workflow:kill','unchanged','floor','message','projectId','/sessions/','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','1478964EpDchP','\x20to\x20see\x20detailed\x20logs','sort','getDate','Listing\x20workflow\x20projects...','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','tdx.json','Analyzing\x20project...','\x20\x20Next\x20run:\x20','185844cekjoA','total','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','8imLgzE','renderSessionsTimeline','Project\x20name:\x20','List\x20workflow\x20execution\x20sessions','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','MAX_TIMELINE_WIDTH','Force:\x20yes','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','tdx\x20wf\x20attempt\x20','Listing\x20secrets...','group_error','sourceProjectName','Project\x20name\x20is\x20required','attemptId','Total:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','Pattern:\x20','getTime','follow','displayLine','Listing\x20schedules...','toLowerCase','type','Downloading\x20project\x20','workflow:clone','error','diff','Retry\x20a\x20session\x20or\x20attempt','Session\x20time:\x20','Output\x20directory:\x20','min','Start\x20a\x20workflow\x20run','end','status','context','New\x20project\x20name:\x20','split','listSchedules','LABEL_WIDTH_DIVISOR','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Killing\x20attempt...','No\x20attempts\x20found\x20in\x20project:\x20','indexOf','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Usage:\x20workflow:delete\x20<project-name-or-id>','some','kill','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','lastAttempt','\x0aUpdate\x20existing\x20project\x20\x22','Project\x20directory:\x20','Enabling\x20schedule\x20#','\x0aError:','No\x20workflow\x20projects\x20found','Tip:\x20cd\x20to\x20workflows/','\x20(use\x20--limit\x20to\x20show\x20more)','\x20unchanged','workflows','workflow:schedule:enable','workflowName','getMinutes','utf-8','sessionTime','generateSessionTimelineRows','\x20\x20Changes:\x20','stdout','\x27\x20from\x20project\x20\x27','\x20secrets...','resolveProject','\x20new','pollTimeline','/attempt/','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','renderSingleTimeline','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Resolving\x20project\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Source\x20directory\x20is\x20required','table','prepareCloneProject','deleted','✔\x20Pull\x20complete','Listing\x20workflows...','✔\x20Project:\x20','join','slice','MIN_TIMELINE_WIDTH','→\x20Project:\x20','resumeFrom','Setting\x20','startsWith','9YknvWz','\x20\x20Session\x20context\x20set\x20to:\x20','GUTTER','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','ICON_WIDTH','Session\x20','12412854qbkhbv','success','No\x20log\x20content\x20found','nextRunTime','No\x20sessions\x20found\x20for:\x20','get','resolve','\x20task','name','cwd','session','retryAttemptName','duration','skipValidation','getHours','task','Analyzing\x20changes...','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','clear','pending','isArray','Loading\x20sessions...','LABEL_MIN_SPACING','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','✔\x20Found\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','✔\x20Schedule\x20#','session:','param','Cancelled','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','⚠\x20Showing\x20first\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','attempt','✔\x20Showing\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','fileCount','resolveProjectId','all','max','Pulling\x20project\x20','\x20\x20Workflow:\x20','createdAt','blue','yellow','workflow:retry','\x20schedule','requireProject','buildTimelineData','delete','icon',',\x20Workflow:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','resolveProjectDir','\x20\x20Revision:\x20','find','\x0aApply\x20these\x20changes?','isTTY','11721620zJXHzO','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','workflow:schedules','List\x20workflow\x20schedules','\x20disabled\x20(','newProjectId','Target\x20directory:\x20','revision:\x20','workflow:timeline','---\x20','No\x20sessions\x20with\x20timing\x20information','Auto-selected\x20latest\x20session:\x20','workflow:run','stringify','workflow:secrets:list','push','\x20\x20Files\x20extracted:\x20','No\x20sessions\x20found','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','Show\x20tasks\x20for\x20an\x20attempt','MAX_POLL_ITERATIONS','Select\x20a\x20workflow\x20to\x20run','\x20\x20Location:\x20','state','List\x20workflows','fromTask','Select\x20a\x20session\x20to\x20view\x20timeline:','trim','\x20project','columns','newProjectName','ICON_SPACING','cyan','renderTimeline','Including\x20subtasks:\x20yes','workflow:projects','output'];a54_0xc7bf=function(){return _0xcbc242;};return a54_0xc7bf();}export class WorkflowPushCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x2bc);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x24c);async[a54_0x141bbb(0x21d)](_0x35c3d6){const _0x5a6c5b=a54_0x141bbb,{options:_0x39383b,args:_0x92f883,tdx:_0xc8c15d}=_0x35c3d6,_0x5f0864=this[_0x5a6c5b(0x37a)](_0x92f883,_0x39383b),_0x6a35d1=_0x39383b['revision'],_0x1d83f7=_0x39383b[_0x5a6c5b(0x352)];_0x39383b['verbose']&&(_0x5f0864&&console[_0x5a6c5b(0x2fc)](_0x5a6c5b(0x256)+_0x5f0864),_0x6a35d1&&console[_0x5a6c5b(0x2fc)]('Revision:\x20'+_0x6a35d1),_0x39383b[_0x5a6c5b(0x228)]&&console[_0x5a6c5b(0x2fc)](_0x5a6c5b(0x255)),_0x1d83f7&&console['error'](_0x5a6c5b(0x259)));let _0x44c424;try{_0x44c424=await withSpinner(_0x5a6c5b(0x355),()=>_0xc8c15d[_0x5a6c5b(0x22f)]['preparePushProject']({'sourceDir':_0x5f0864,'revision':_0x6a35d1,'skipValidation':_0x1d83f7}),{'verbose':_0x39383b[_0x5a6c5b(0x2c5)]});}catch(_0x220b02){if(_0x220b02 instanceof Error&&_0x220b02[_0x5a6c5b(0x2d1)][_0x5a6c5b(0x238)]('No\x20workflow\x20tdx.json\x20found'))return console[_0x5a6c5b(0x2fc)](a54_0x467bd9['red'](_0x5a6c5b(0x20a)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x39383b[_0x5a6c5b(0x1d8)]?console[_0x5a6c5b(0x2fc)](a54_0x467bd9[_0x5a6c5b(0x293)](_0x5a6c5b(0x319)+_0x39383b['workflowProject']+_0x5a6c5b(0x356)+_0x39383b[_0x5a6c5b(0x1d8)]+'\x27')):console[_0x5a6c5b(0x2fc)](a54_0x467bd9[_0x5a6c5b(0x293)](_0x5a6c5b(0x35c))),0x1;throw _0x220b02;}const _0x2465c5=_0x44c424[_0x5a6c5b(0x227)];console['error'](_0x5a6c5b(0x336)+_0x2465c5[_0x5a6c5b(0x296)]),console[_0x5a6c5b(0x2fc)]('\x20\x20Source:\x20'+_0x2465c5['sourceDir']),console[_0x5a6c5b(0x2fc)](_0x5a6c5b(0x37b)+_0x2465c5[_0x5a6c5b(0x2cb)]),console[_0x5a6c5b(0x2fc)](_0x5a6c5b(0x323)+a54_0x467bd9['green']('+'+_0x2465c5[_0x5a6c5b(0x240)]['new']+_0x5a6c5b(0x328))+',\x20'+(a54_0x467bd9[_0x5a6c5b(0x371)]('~'+_0x2465c5[_0x5a6c5b(0x240)]['modified']+_0x5a6c5b(0x1f8))+',\x20')+(a54_0x467bd9[_0x5a6c5b(0x2ac)]('-'+_0x2465c5[_0x5a6c5b(0x240)][_0x5a6c5b(0x333)]+_0x5a6c5b(0x219))+',\x20')+(''+a54_0x467bd9['dim'](_0x2465c5[_0x5a6c5b(0x240)][_0x5a6c5b(0x2cf)]+'\x20unchanged')));for(const _0x1da1b6 of _0x2465c5[_0x5a6c5b(0x2bd)]){_0x1da1b6[_0x5a6c5b(0x2f9)]===_0x5a6c5b(0x268)&&_0x1da1b6['diff']&&(console['error']('\x0a'+a54_0x467bd9[_0x5a6c5b(0x1cf)](_0x5a6c5b(0x1b8)+_0x1da1b6[_0x5a6c5b(0x258)])),console[_0x5a6c5b(0x2fc)](_0x1da1b6[_0x5a6c5b(0x2fd)]));}if(!_0x2465c5['hasChanges'])return console['error'](a54_0x467bd9[_0x5a6c5b(0x20d)](_0x5a6c5b(0x1ef))),await this[_0x5a6c5b(0x1da)](_0xc8c15d,_0x2465c5[_0x5a6c5b(0x296)],_0x39383b[_0x5a6c5b(0x1f4)]),0x0;if(_0x39383b[_0x5a6c5b(0x228)])return console[_0x5a6c5b(0x2fc)](a54_0x467bd9[_0x5a6c5b(0x371)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x39383b[_0x5a6c5b(0x269)]){if(!isInteractive())return console[_0x5a6c5b(0x2fc)](a54_0x467bd9['red'](_0x5a6c5b(0x317)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5a6c5b(0x2fc)](a54_0x467bd9[_0x5a6c5b(0x293)](_0x5a6c5b(0x1af))),0x1;const _0x16adb6=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x16adb6)return console[_0x5a6c5b(0x2fc)](a54_0x467bd9[_0x5a6c5b(0x371)]('Cancelled'),'-\x20nothing\x20pushed'),0x1;}const _0x426915=await withSpinner(_0x5a6c5b(0x276),()=>_0xc8c15d[_0x5a6c5b(0x22f)][_0x5a6c5b(0x1eb)](_0x2465c5),{'verbose':_0x39383b[_0x5a6c5b(0x2c5)]}),_0x1a25ca=_0x426915[_0x5a6c5b(0x227)];return console[_0x5a6c5b(0x2fc)](a54_0x467bd9[_0x5a6c5b(0x20d)](_0x5a6c5b(0x1d7))),console[_0x5a6c5b(0x2fc)]('\x20\x20Project\x20ID:\x20'+_0x1a25ca['projectId']),console['error'](_0x5a6c5b(0x37b)+_0x1a25ca['revision']),await this[_0x5a6c5b(0x1da)](_0xc8c15d,_0x1a25ca['projectName'],_0x39383b[_0x5a6c5b(0x1f4)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x2fb);['description']=a54_0x141bbb(0x2ab);async['execute'](_0x201025){const _0x120f16=a54_0x141bbb,{options:_0x517651,args:_0x5e343d,tdx:_0x1d79a3}=_0x201025,_0x1fc536=this[_0x120f16(0x37a)](_0x5e343d,_0x517651),_0x32c35f=_0x517651[_0x120f16(0x34d)],_0x8282c7=_0x517651[_0x120f16(0x2cb)],_0x567c8e=_0x517651[_0x120f16(0x352)];if(!_0x1fc536)return console[_0x120f16(0x2fc)](a54_0x467bd9[_0x120f16(0x2ac)](_0x120f16(0x20a)),_0x120f16(0x330)),console[_0x120f16(0x2fc)](a54_0x467bd9[_0x120f16(0x293)](_0x120f16(0x365))),console['error'](a54_0x467bd9[_0x120f16(0x293)](_0x120f16(0x341))),0x1;if(!_0x32c35f)return console[_0x120f16(0x2fc)](a54_0x467bd9[_0x120f16(0x2ac)]('Error:'),_0x120f16(0x2e2)),console['error'](a54_0x467bd9[_0x120f16(0x293)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x517651[_0x120f16(0x2c5)]&&(console[_0x120f16(0x2fc)](_0x120f16(0x256)+_0x1fc536),console[_0x120f16(0x2fc)](_0x120f16(0x306)+_0x32c35f),_0x8282c7&&console[_0x120f16(0x2fc)](_0x120f16(0x247)+_0x8282c7),_0x517651[_0x120f16(0x228)]&&console[_0x120f16(0x2fc)](_0x120f16(0x255)),_0x567c8e&&console['error'](_0x120f16(0x259)));const _0x3971d7=await withSpinner(_0x120f16(0x2de),()=>_0x1d79a3[_0x120f16(0x22f)][_0x120f16(0x332)](_0x1fc536,_0x32c35f,{'revision':_0x8282c7,'skipValidation':_0x567c8e}),{'verbose':_0x517651[_0x120f16(0x2c5)]}),_0x3b400d=_0x3971d7[_0x120f16(0x227)];console[_0x120f16(0x2fc)](_0x120f16(0x237)+_0x3b400d['sourceDir']);_0x3b400d[_0x120f16(0x2ee)]&&console[_0x120f16(0x2fc)]('Source\x20project:\x20'+_0x3b400d[_0x120f16(0x2ee)]);console[_0x120f16(0x2fc)](_0x120f16(0x306)+_0x3b400d['newProjectName']),console[_0x120f16(0x2fc)](_0x120f16(0x247)+_0x3b400d[_0x120f16(0x2cb)]),console['error'](_0x120f16(0x1d5)+_0x3b400d[_0x120f16(0x369)]);_0x3b400d[_0x120f16(0x200)]&&(console[_0x120f16(0x2fc)](a54_0x467bd9['yellow'](_0x120f16(0x263)+_0x3b400d[_0x120f16(0x1cd)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x3b400d['existingProjectId']+')')),console[_0x120f16(0x2fc)](a54_0x467bd9[_0x120f16(0x371)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x517651[_0x120f16(0x228)])return console[_0x120f16(0x2fc)](a54_0x467bd9['yellow'](_0x120f16(0x2bf))),0x0;if(!_0x517651[_0x120f16(0x269)]){if(!isInteractive())return console[_0x120f16(0x2fc)](a54_0x467bd9[_0x120f16(0x2ac)](_0x120f16(0x317)),_0x120f16(0x275)),console[_0x120f16(0x2fc)](a54_0x467bd9[_0x120f16(0x293)](_0x120f16(0x1af))),0x1;const _0x8fbf7c=_0x3b400d[_0x120f16(0x2ee)]||a54_0x20d6ee[_0x120f16(0x27e)](_0x1fc536),_0x74c86c=_0x3b400d[_0x120f16(0x200)]?_0x120f16(0x314)+_0x32c35f+_0x120f16(0x29b):'\x0aClone\x20\x22'+_0x8fbf7c+_0x120f16(0x1f2)+_0x32c35f+'\x22?',_0x1f1ca6=await confirmKey(_0x74c86c);if(!_0x1f1ca6)return console[_0x120f16(0x2fc)](a54_0x467bd9[_0x120f16(0x371)](_0x120f16(0x362))),0x1;}const _0x296e6d=await withSpinner(_0x3b400d[_0x120f16(0x200)]?_0x120f16(0x2ba)+_0x32c35f+'...':'Cloning\x20to\x20'+_0x32c35f+_0x120f16(0x21e),()=>_0x1d79a3[_0x120f16(0x22f)][_0x120f16(0x24b)](_0x3b400d),{'verbose':_0x517651[_0x120f16(0x2c5)]}),_0x4542d5=_0x296e6d['data'];return console[_0x120f16(0x2fc)](a54_0x467bd9[_0x120f16(0x20d)](_0x3b400d[_0x120f16(0x200)]?'✔\x20Project\x20updated':'✔\x20Clone\x20complete')),console[_0x120f16(0x2fc)]('\x20\x20Project:\x20'+_0x4542d5[_0x120f16(0x1cd)]),console[_0x120f16(0x2fc)](_0x120f16(0x26b)+_0x4542d5[_0x120f16(0x1b4)]),console[_0x120f16(0x2fc)](_0x120f16(0x37b)+_0x4542d5[_0x120f16(0x2cb)]),await this[_0x120f16(0x1da)](_0x1d79a3,_0x4542d5[_0x120f16(0x1cd)],_0x517651['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']='workflow:delete';[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x2a6);async[a54_0x141bbb(0x21d)](_0x1b165c){const _0x16063b=a54_0x141bbb,{options:_0x52f942,args:_0x44d4b6,tdx:_0x448871}=_0x1b165c,_0x108966=_0x44d4b6[0x0];if(!_0x108966)return console['error'](_0x16063b(0x363)),console[_0x16063b(0x2fc)](_0x16063b(0x30f)),0x1;_0x52f942['verbose']&&console[_0x16063b(0x2fc)](_0x16063b(0x2c7)+_0x108966);if(!_0x52f942[_0x16063b(0x269)]){if(!isInteractive())return console['error'](a54_0x467bd9[_0x16063b(0x2ac)](_0x16063b(0x317)),_0x16063b(0x275)),console[_0x16063b(0x2fc)](a54_0x467bd9[_0x16063b(0x293)](_0x16063b(0x1af))),0x1;const _0x5397fc=await confirmKey(_0x16063b(0x1e7)+_0x108966+_0x16063b(0x26f));if(!_0x5397fc)return console[_0x16063b(0x2fc)](a54_0x467bd9['yellow'](_0x16063b(0x362))),0x1;}const _0x3c075a=await withSpinner('Deleting\x20project\x20'+_0x108966+_0x16063b(0x21e),()=>_0x448871['workflow'][_0x16063b(0x376)](_0x108966),{'verbose':_0x52f942['verbose']}),_0x440134=_0x3c075a[_0x16063b(0x227)];return console['error'](_0x16063b(0x2aa)+_0x440134[_0x16063b(0x296)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x440134[_0x16063b(0x2d2)]),0x0;}}export function parseKeyValue(_0x4ca56e){const _0x1e255a=a54_0x141bbb,_0x3606c6=_0x4ca56e[_0x1e255a(0x30d)]('=');if(_0x3606c6===-0x1)throw new Error(_0x1e255a(0x271)+_0x4ca56e+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x2f77fe=_0x4ca56e[_0x1e255a(0x1ff)](0x0,_0x3606c6),_0x32f8db=_0x4ca56e[_0x1e255a(0x1ff)](_0x3606c6+0x1);if(!_0x2f77fe)throw new Error(_0x1e255a(0x2a3));return{'key':_0x2f77fe,'value':_0x32f8db};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x1bd);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x2d4);async[a54_0x141bbb(0x21d)](_0x21ae27){const _0x4ad8dc=a54_0x141bbb,{options:_0x42b899,args:_0x25cbe6,tdx:_0x22546a}=_0x21ae27,_0x42730d=this[_0x4ad8dc(0x374)](_0x25cbe6,_0x42b899);if(!_0x42730d)return 0x1;_0x42b899[_0x4ad8dc(0x2c5)]&&console[_0x4ad8dc(0x2fc)](_0x4ad8dc(0x2c7)+_0x42730d);const _0x19ab4a=await withSpinner(_0x4ad8dc(0x2ec),()=>_0x22546a[_0x4ad8dc(0x22f)][_0x4ad8dc(0x21c)](_0x42730d),{'verbose':_0x42b899[_0x4ad8dc(0x2c5)]}),{secrets:_0x5f5cef}=_0x19ab4a['data'];return console[_0x4ad8dc(0x2fc)]('✔\x20Found\x20'+_0x5f5cef[_0x4ad8dc(0x1fa)]+_0x4ad8dc(0x213)+(_0x5f5cef['length']!==0x1?'s':'')),await handleSDKOutput(_0x5f5cef,_0x42b899),0x0;}}function a54_0x3172(_0x3890f7,_0x58f4ce){_0x3890f7=_0x3890f7-0x1ab;const _0xc7bf89=a54_0xc7bf();let _0x317221=_0xc7bf89[_0x3890f7];return _0x317221;}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x230);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x312);async[a54_0x141bbb(0x21d)](_0x511584){const _0x2ce568=a54_0x141bbb,{options:_0x239980,args:_0x3b79db,tdx:_0x5ee9f3}=_0x511584;let _0x6b72aa,_0xbd4a3f;if(_0x3b79db[_0x2ce568(0x1fa)]>=0x1&&!_0x3b79db[0x0]['includes']('='))_0x6b72aa=_0x3b79db[0x0],_0xbd4a3f=_0x3b79db[_0x2ce568(0x338)](0x1);else{if(_0x3b79db[_0x2ce568(0x1fa)]>=0x1&&_0x239980[_0x2ce568(0x1d8)])_0x6b72aa=_0x239980[_0x2ce568(0x1d8)],_0xbd4a3f=_0x3b79db;else return _0x3b79db['length']>=0x1?(console[_0x2ce568(0x2fc)](_0x2ce568(0x220)),console['error']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x2ce568(0x2fc)](_0x2ce568(0x32b)),console['error'](_0x2ce568(0x1f9)),0x1);}if(_0xbd4a3f[_0x2ce568(0x1fa)]===0x0)return console[_0x2ce568(0x2fc)](_0x2ce568(0x32b)),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x609bab={};try{for(const _0x5e6e97 of _0xbd4a3f){const {key:_0x86f865,value:_0x2f70de}=parseKeyValue(_0x5e6e97);_0x609bab[_0x86f865]=_0x2f70de;}}catch(_0x26395b){return _0x26395b instanceof Error&&console[_0x2ce568(0x2fc)](a54_0x467bd9[_0x2ce568(0x2ac)](_0x2ce568(0x20a)),_0x26395b[_0x2ce568(0x2d1)]),0x1;}const _0x468d71=Object['keys'](_0x609bab);_0x239980['verbose']&&(console[_0x2ce568(0x2fc)](_0x2ce568(0x2c7)+_0x6b72aa),console[_0x2ce568(0x2fc)]('Secrets\x20to\x20set:\x20'+_0x468d71[_0x2ce568(0x337)](',\x20')));const _0x27bd40=await withSpinner(_0x468d71[_0x2ce568(0x1fa)]===0x1?'Setting\x20secret...':_0x2ce568(0x33c)+_0x468d71[_0x2ce568(0x1fa)]+_0x2ce568(0x326),()=>_0x5ee9f3[_0x2ce568(0x22f)][_0x2ce568(0x290)](_0x6b72aa,_0x609bab),{'verbose':_0x239980[_0x2ce568(0x2c5)]}),_0xfba83b=_0x27bd40['data'];return console['error'](_0x468d71[_0x2ce568(0x1fa)]===0x1?_0x2ce568(0x1fc)+_0xfba83b[_0x2ce568(0x1e4)][0x0]+_0x2ce568(0x2b0)+_0xfba83b[_0x2ce568(0x296)]+'\x27':'✔\x20'+_0xfba83b[_0x2ce568(0x1e4)][_0x2ce568(0x1fa)]+_0x2ce568(0x2b5)+_0xfba83b[_0x2ce568(0x296)]+'\x27'),(_0x239980[_0x2ce568(0x1f1)]||_0x239980[_0x2ce568(0x26d)])&&await handleSingleObjectOutput(_0xfba83b,_0x239980),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x294);['description']=a54_0x141bbb(0x2da);async['execute'](_0x4feb4d){const _0x1807c6=a54_0x141bbb,{options:_0x548cf4,args:_0x2a35cc,tdx:_0x2314b4}=_0x4feb4d;let _0x19661b,_0x6c5ffe;if(_0x2a35cc[_0x1807c6(0x1fa)]>=0x2)_0x19661b=_0x2a35cc[0x0],_0x6c5ffe=_0x2a35cc[0x1];else{if(_0x2a35cc[_0x1807c6(0x1fa)]===0x1&&_0x548cf4[_0x1807c6(0x1d8)])_0x19661b=_0x548cf4[_0x1807c6(0x1d8)],_0x6c5ffe=_0x2a35cc[0x0];else return _0x2a35cc[_0x1807c6(0x1fa)]===0x1?(console[_0x1807c6(0x2fc)](_0x1807c6(0x220)),console[_0x1807c6(0x2fc)](_0x1807c6(0x2cd)),0x1):(console[_0x1807c6(0x2fc)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x1807c6(0x2fc)](_0x1807c6(0x260)),0x1);}_0x548cf4[_0x1807c6(0x2c5)]&&(console[_0x1807c6(0x2fc)](_0x1807c6(0x2c7)+_0x19661b),console[_0x1807c6(0x2fc)](_0x1807c6(0x1f0)+_0x6c5ffe));if(!_0x548cf4['yes']){if(!isInteractive())return console[_0x1807c6(0x2fc)](a54_0x467bd9['red'](_0x1807c6(0x317)),_0x1807c6(0x275)),console[_0x1807c6(0x2fc)](a54_0x467bd9['dim'](_0x1807c6(0x1af))),0x1;const _0x5d64d9=await confirmKey(_0x1807c6(0x2dc)+_0x6c5ffe+_0x1807c6(0x325)+_0x19661b+'\x27?');if(!_0x5d64d9)return console[_0x1807c6(0x2fc)](a54_0x467bd9[_0x1807c6(0x371)]('Cancelled')),0x1;}const _0x4b3292=await withSpinner(_0x1807c6(0x1e6),()=>_0x2314b4[_0x1807c6(0x22f)]['deleteSecret'](_0x19661b,_0x6c5ffe),{'verbose':_0x548cf4['verbose']}),_0x40795a=_0x4b3292[_0x1807c6(0x227)];return console[_0x1807c6(0x2fc)](_0x1807c6(0x1fc)+_0x40795a[_0x1807c6(0x24f)]+_0x1807c6(0x1f7)+_0x40795a[_0x1807c6(0x296)]+'\x27'),(_0x548cf4[_0x1807c6(0x1f1)]||_0x548cf4[_0x1807c6(0x26d)])&&await handleSingleObjectOutput(_0x40795a,_0x548cf4),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(_0xc918c1){const _0x37effe=a54_0x141bbb,_0x2c5de4=Math[_0x37effe(0x2d0)](_0xc918c1/0x3e8),_0x4affa6=Math[_0x37effe(0x2d0)](_0x2c5de4/0x3c),_0x352d1b=Math[_0x37effe(0x2d0)](_0x4affa6/0x3c),_0x456077=Math[_0x37effe(0x2d0)](_0x352d1b/0x18);if(_0x456077>0x0){const _0x4ebd7c=_0x352d1b%0x18;return _0x4ebd7c>0x0?_0x456077+'d\x20'+_0x4ebd7c+'h':_0x456077+'d';}else{if(_0x352d1b>0x0){const _0x1a7da2=_0x4affa6%0x3c;return _0x1a7da2>0x0?_0x352d1b+'h\x20'+_0x1a7da2+'m':_0x352d1b+'h';}else{if(_0x4affa6>0x0){const _0x460c8d=_0x2c5de4%0x3c;return _0x460c8d>0x0?_0x4affa6+'m\x20'+_0x460c8d+'s':_0x4affa6+'m';}else return _0x2c5de4+'s';}}}function formatTimestamp(_0x5bbcfc,_0x438b6f){const _0x26e657=a54_0x141bbb,_0x19e81d=new Date(_0x5bbcfc),_0x69c3d9=String(_0x19e81d[_0x26e657(0x353)]())[_0x26e657(0x261)](0x2,'0'),_0x22aa5f=String(_0x19e81d[_0x26e657(0x31f)]())[_0x26e657(0x261)](0x2,'0'),_0x30e847=_0x69c3d9+':'+_0x22aa5f,_0x2a53ec=_0x19e81d[_0x26e657(0x22d)]()===_0x438b6f[_0x26e657(0x22d)]()&&_0x19e81d[_0x26e657(0x262)]()===_0x438b6f[_0x26e657(0x262)]()&&_0x19e81d[_0x26e657(0x2d8)]()===_0x438b6f['getDate']();if(_0x2a53ec)return _0x30e847;else{const _0x26dfbf=String(_0x19e81d[_0x26e657(0x262)]()+0x1)['padStart'](0x2,'0'),_0x373b1d=String(_0x19e81d[_0x26e657(0x2d8)]())[_0x26e657(0x261)](0x2,'0');return _0x26dfbf+'-'+_0x373b1d+'\x20'+_0x30e847;}}function formatDate(_0x517b89){const _0x3eecb9=a54_0x141bbb,_0x12067b=_0x517b89[_0x3eecb9(0x22d)](),_0x2e9d5a=String(_0x517b89['getMonth']()+0x1)[_0x3eecb9(0x261)](0x2,'0'),_0x448a6f=String(_0x517b89[_0x3eecb9(0x2d8)]())[_0x3eecb9(0x261)](0x2,'0');return _0x12067b+'-'+_0x2e9d5a+'-'+_0x448a6f;}function getTaskStateIcon(_0x27a96e){const _0x55882c={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x55882c[_0x27a96e]||'⚪';}function getBarChar(_0x2d8c89){const _0x59865a=a54_0x141bbb;return _0x2d8c89===_0x59865a(0x2fc)||_0x2d8c89==='group_error'?'×':'─';}function getBarColor(_0x52bcf6){const _0x20e790=a54_0x141bbb,_0x25ff6e={'success':a54_0x467bd9[_0x20e790(0x20d)],'error':a54_0x467bd9[_0x20e790(0x2ac)],'group_error':a54_0x467bd9[_0x20e790(0x2ac)],'running':a54_0x467bd9['blue'],'blocked':a54_0x467bd9[_0x20e790(0x371)],'planned':a54_0x467bd9['dim'],'canceling':a54_0x467bd9[_0x20e790(0x371)]};return _0x25ff6e[_0x52bcf6]||a54_0x467bd9[_0x20e790(0x270)];}function parseTaskName(_0x4b2297){const _0x32ec8e=a54_0x141bbb;let _0xffc18=_0x4b2297['replace'](/^\++/,'');const _0x53c724=_0xffc18[_0x32ec8e(0x307)]('+'),_0x38b9fa=_0x53c724[_0x32ec8e(0x1fa)]>0x1?_0x53c724[_0x32ec8e(0x1fa)]-0x2:0x0,_0x56699d=_0x53c724[_0x53c724[_0x32ec8e(0x1fa)]-0x1]||_0xffc18;return{'level':_0x38b9fa,'name':'+'+_0x56699d};}function truncateTaskName(_0x5ab7bf,_0x2bea9b){const _0x483b32=a54_0x141bbb,_0x310dc3=stringWidth(_0x5ab7bf);if(_0x310dc3<=_0x2bea9b)return _0x5ab7bf;let _0x190c3f=_0x5ab7bf;while(stringWidth(_0x190c3f+'…')>_0x2bea9b&&_0x190c3f[_0x483b32(0x1fa)]>0x0){_0x190c3f=_0x190c3f['slice'](0x0,-0x1);}return _0x190c3f+'…';}function calculateTimeScale(_0x3d7d4c,_0x5a84f2){const _0x2df57d=a54_0x141bbb;return{'startTime':_0x3d7d4c[_0x2df57d(0x1ed)],'endTime':_0x3d7d4c[_0x2df57d(0x303)],'durationMs':_0x3d7d4c['duration'],'msPerChar':_0x3d7d4c[_0x2df57d(0x351)]/_0x5a84f2};}function timeToPosition(_0x331206,_0x3b4909,_0x1c1fef){const _0x3b181f=a54_0x141bbb,_0x2fca46=_0x331206-_0x3b4909['startTime'],_0x1ea7c0=Math[_0x3b181f(0x2d0)](_0x2fca46/_0x3b4909[_0x3b181f(0x23d)]);return Math['max'](0x0,Math[_0x3b181f(0x301)](_0x1ea7c0,_0x1c1fef));}function renderTimeAxis(_0x4a73e5,_0x3106e9){const _0x1584a5=a54_0x141bbb,_0x5090b1=Math['min'](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math['max'](TIMELINE_CONFIG[_0x1584a5(0x22a)],Math[_0x1584a5(0x2d0)](_0x3106e9/TIMELINE_CONFIG[_0x1584a5(0x309)]))),_0x2768ba=_0x4a73e5[_0x1584a5(0x216)]/(_0x5090b1-0x1),_0x111e5c=new Date(_0x4a73e5[_0x1584a5(0x254)]),_0x5dbcc6=[];for(let _0x2f86a1=0x0;_0x2f86a1<_0x5090b1;_0x2f86a1++){const _0x3422e=_0x4a73e5[_0x1584a5(0x254)]+_0x2f86a1*_0x2768ba,_0xed35d1=timeToPosition(_0x3422e,_0x4a73e5,_0x3106e9),_0x7bae50=formatTimestamp(_0x3422e,_0x111e5c);_0x5dbcc6[_0x1584a5(0x1be)]({'pos':_0xed35d1,'text':_0x7bae50});}const _0x40cfd7=new Array(_0x3106e9)[_0x1584a5(0x248)]('\x20');let _0x51e69f=-0x1;for(const {pos:_0x3e59ac,text:_0x108a54}of _0x5dbcc6){let _0x52d73a=Math[_0x1584a5(0x36c)](0x0,_0x3e59ac-Math[_0x1584a5(0x2d0)](_0x108a54[_0x1584a5(0x1fa)]/0x2));_0x52d73a<=_0x51e69f+TIMELINE_CONFIG[_0x1584a5(0x35b)]&&(_0x52d73a=_0x51e69f+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x52d73a+_0x108a54[_0x1584a5(0x1fa)]>_0x3106e9&&(_0x52d73a=_0x3106e9-_0x108a54[_0x1584a5(0x1fa)]);if(_0x52d73a>=0x0&&_0x52d73a+_0x108a54[_0x1584a5(0x1fa)]<=_0x3106e9&&_0x52d73a>_0x51e69f){for(let _0x312fc9=0x0;_0x312fc9<_0x108a54[_0x1584a5(0x1fa)];_0x312fc9++){_0x40cfd7[_0x52d73a+_0x312fc9]=_0x108a54[_0x312fc9];}_0x51e69f=_0x52d73a+_0x108a54['length']-0x1;}}return _0x40cfd7[_0x1584a5(0x337)]('');}function renderTaskRow(_0x21cb5e,_0x31404e,_0x21facc,_0x1dfec7){const _0x58ab04=a54_0x141bbb,{level:_0x6f1da0,name:_0x2fc22f}=parseTaskName(_0x21cb5e[_0x58ab04(0x34d)]),_0x27e495='\x20'['repeat'](_0x6f1da0),_0x1d02a9=_0x21cb5e[_0x58ab04(0x26a)]?'('+formatElapsed(_0x21cb5e[_0x58ab04(0x26a)][_0x58ab04(0x351)])+')':'',_0x5cd40f=stringWidth(_0x1d02a9),_0x4dd4d9=_0x6f1da0*0x1,_0x3e25b2=_0x1dfec7-_0x4dd4d9-_0x5cd40f-0x1,_0x51f030=truncateTaskName(_0x2fc22f,_0x3e25b2),_0x228db1=_0x27e495+_0x51f030,_0x47b12b=stringWidth(_0x228db1),_0x4cdb2a=_0x1dfec7-_0x47b12b-_0x5cd40f,_0x333452=_0x228db1+'\x20'[_0x58ab04(0x22c)](Math[_0x58ab04(0x36c)](0x1,_0x4cdb2a))+a54_0x467bd9[_0x58ab04(0x293)](_0x1d02a9),_0x52a69c=getTaskStateIcon(_0x21cb5e[_0x58ab04(0x1c6)]),_0x23eb78=new Array(_0x21facc)[_0x58ab04(0x248)]('\x20');if(_0x21cb5e['window']){const _0x36ff26=timeToPosition(_0x21cb5e[_0x58ab04(0x26a)][_0x58ab04(0x1ed)],_0x31404e,_0x21facc),_0xd7f05e=timeToPosition(_0x21cb5e['window'][_0x58ab04(0x303)],_0x31404e,_0x21facc),_0x309830=getBarChar(_0x21cb5e[_0x58ab04(0x1c6)]),_0x591d0f=Math[_0x58ab04(0x36c)](_0x36ff26+0x1,_0xd7f05e);for(let _0x45ceb2=_0x36ff26;_0x45ceb2<Math['min'](_0x591d0f,_0x21facc);_0x45ceb2++){_0x23eb78[_0x45ceb2]=_0x309830;}}const _0x507707=getBarColor(_0x21cb5e['state']),_0x470158=_0x23eb78[_0x58ab04(0x2b6)](_0xcd7191=>_0xcd7191==='\x20'?'\x20':_0x507707(_0xcd7191))[_0x58ab04(0x337)]('');return _0x52a69c+'\x20'+_0x333452+'│'+_0x470158+'│';}function calculateStats(_0x2abe66){const _0x23c7e0=a54_0x141bbb,_0x5d0734={'total':_0x2abe66[_0x23c7e0(0x1fa)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x436960 of _0x2abe66){if(_0x436960[_0x23c7e0(0x1c6)]==='success')_0x5d0734[_0x23c7e0(0x346)]++;else{if(_0x436960[_0x23c7e0(0x1c6)]===_0x23c7e0(0x2fc)||_0x436960[_0x23c7e0(0x1c6)]===_0x23c7e0(0x2ed))_0x5d0734[_0x23c7e0(0x2fc)]++;else _0x436960[_0x23c7e0(0x1c6)]===_0x23c7e0(0x295)?_0x5d0734[_0x23c7e0(0x295)]++:_0x5d0734[_0x23c7e0(0x358)]++;}}return _0x5d0734;}function formatStats(_0x2f0263){const _0x476e51=a54_0x141bbb;return[_0x476e51(0x2f1)+_0x2f0263[_0x476e51(0x2e1)],'✅\x20'+_0x2f0263[_0x476e51(0x346)],'❌\x20'+_0x2f0263[_0x476e51(0x2fc)],_0x476e51(0x264)+_0x2f0263[_0x476e51(0x295)],'⏳\x20'+_0x2f0263[_0x476e51(0x358)]][_0x476e51(0x337)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x1b7);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x1c1);async[a54_0x141bbb(0x21d)](_0x21e4d8){const _0x2ce5ff=a54_0x141bbb,{options:_0x5ec3a8,args:_0x493863,tdx:_0x311a41}=_0x21e4d8;let _0x900397,_0x5a4f19,_0x56a1c6=![];if(_0x493863[0x0]){if(_0x493863[0x0]['includes']('.')){const _0x54b827=this[_0x2ce5ff(0x25b)](_0x493863,_0x5ec3a8);if(!_0x54b827)return 0x1;_0x900397=_0x54b827[_0x2ce5ff(0x296)],_0x5a4f19=_0x54b827[_0x2ce5ff(0x31e)];}else{_0x5a4f19=_0x493863[0x0],_0x900397=_0x5ec3a8[_0x2ce5ff(0x1d8)];if(!_0x900397)return console['error'](a54_0x467bd9[_0x2ce5ff(0x2ac)](_0x2ce5ff(0x20a)),_0x2ce5ff(0x32d)),0x1;_0x56a1c6=!![];}}else{const _0x23553b=this[_0x2ce5ff(0x25b)](_0x493863,_0x5ec3a8);if(!_0x23553b)return 0x1;_0x900397=_0x23553b[_0x2ce5ff(0x296)],_0x5a4f19=_0x23553b[_0x2ce5ff(0x31e)];}if(_0x5ec3a8[_0x2ce5ff(0x2c5)]){if(_0x900397&&_0x5a4f19)console['error'](_0x2ce5ff(0x25f)+_0x900397+'.'+_0x5a4f19);else _0x900397&&console[_0x2ce5ff(0x2fc)](_0x2ce5ff(0x20e)+_0x900397);}const _0x489818=_0x5ec3a8['attemptId'],_0xa256ed=_0x5ec3a8['sessionId'];if(_0x489818){_0xa256ed&&console[_0x2ce5ff(0x2fc)](a54_0x467bd9[_0x2ce5ff(0x371)](_0x2ce5ff(0x2c4)),_0x2ce5ff(0x221));const _0x489bd7=_0x5ec3a8[_0x2ce5ff(0x2f5)];return _0x489bd7?await this[_0x2ce5ff(0x329)](_0x21e4d8,_0x489818):await this[_0x2ce5ff(0x32c)](_0x21e4d8,_0x489818,_0x5ec3a8),0x0;}if(_0xa256ed){const _0x76051c=await withSpinner(_0x2ce5ff(0x2c1),()=>_0x311a41[_0x2ce5ff(0x22f)]['sessions']({'projectName':_0x900397,'workflowName':_0x5a4f19,'limit':0x64}),{'verbose':_0x5ec3a8[_0x2ce5ff(0x2c5)]}),_0x27a01f=_0x76051c[_0x2ce5ff(0x227)][_0x2ce5ff(0x1ab)](_0x1e0a87=>_0x1e0a87['id']===_0xa256ed);if(!_0x27a01f)return console[_0x2ce5ff(0x2fc)](a54_0x467bd9[_0x2ce5ff(0x2ac)](_0x2ce5ff(0x20a)),'Session\x20not\x20found:\x20'+_0xa256ed),0x1;if(!_0x27a01f[_0x2ce5ff(0x313)]?.['id'])return console[_0x2ce5ff(0x2fc)](a54_0x467bd9[_0x2ce5ff(0x2ac)](_0x2ce5ff(0x20a)),_0x2ce5ff(0x344)+_0xa256ed+_0x2ce5ff(0x210)),0x1;const _0x1d795d=_0x27a01f[_0x2ce5ff(0x313)]['id'];_0x5ec3a8[_0x2ce5ff(0x2c5)]&&console[_0x2ce5ff(0x2fc)](_0x2ce5ff(0x286)+_0x1d795d+_0x2ce5ff(0x20f)+_0xa256ed);const _0x9a59e8=_0x5ec3a8[_0x2ce5ff(0x2f5)];return _0x9a59e8?await this[_0x2ce5ff(0x329)](_0x21e4d8,_0x1d795d):await this[_0x2ce5ff(0x32c)](_0x21e4d8,_0x1d795d,_0x5ec3a8),0x0;}const _0x182784=await withSpinner(_0x2ce5ff(0x35a),()=>_0x311a41[_0x2ce5ff(0x22f)]['sessions']({'projectName':_0x900397,'workflowName':_0x5a4f19,'limit':_0x5ec3a8['limit']||0x32}),{'verbose':_0x5ec3a8[_0x2ce5ff(0x2c5)]}),_0x42938c=_0x182784[_0x2ce5ff(0x227)];if(_0x42938c[_0x2ce5ff(0x1fa)]===0x0){if(_0x900397&&_0x5a4f19)console[_0x2ce5ff(0x2fc)]('No\x20sessions\x20found\x20for:\x20'+_0x900397+'.'+_0x5a4f19);else _0x900397?console[_0x2ce5ff(0x2fc)](_0x2ce5ff(0x235)+_0x900397):(console['error'](_0x2ce5ff(0x233)),console[_0x2ce5ff(0x2fc)](a54_0x467bd9[_0x2ce5ff(0x293)](_0x2ce5ff(0x1df))));return 0x0;}_0x42938c[_0x2ce5ff(0x2d7)]((_0x8d1081,_0x363cc7)=>{const _0x394090=_0x2ce5ff,_0x422acc=_0x8d1081[_0x394090(0x321)]||'',_0x4e0204=_0x363cc7[_0x394090(0x321)]||'';return _0x4e0204[_0x394090(0x204)](_0x422acc);});if(_0x5ec3a8[_0x2ce5ff(0x1f1)]||_0x5ec3a8[_0x2ce5ff(0x26d)])return await handleSDKOutput(_0x42938c,_0x5ec3a8),0x0;let _0x7d53f6;if(_0x56a1c6){const _0x318662=_0x42938c[0x0];if(!_0x318662['lastAttempt']?.['id'])return console[_0x2ce5ff(0x2fc)](_0x2ce5ff(0x24d)),0x0;_0x7d53f6=_0x318662[_0x2ce5ff(0x313)]['id'],_0x5ec3a8[_0x2ce5ff(0x2c5)]&&console[_0x2ce5ff(0x2fc)](_0x2ce5ff(0x1ba)+_0x318662[_0x2ce5ff(0x321)]);}else{const _0x1745ab=_0x42938c['map'](_0x40d41b=>{const _0x232230=_0x2ce5ff,_0x39ffd3=getAttemptStatusDisplay(_0x40d41b[_0x232230(0x313)]);return{'title':_0x40d41b[_0x232230(0x250)]?.['name']+'.'+_0x40d41b[_0x232230(0x22f)]?.[_0x232230(0x34d)]+_0x232230(0x1db)+_0x40d41b[_0x232230(0x321)]+'\x20'+_0x39ffd3[_0x232230(0x377)],'value':_0x40d41b[_0x232230(0x313)]?.['id']||'','description':_0x39ffd3[_0x232230(0x1e0)]};}),_0x2889a5=await a54_0x20ee9d({'type':_0x2ce5ff(0x1f6),'name':_0x2ce5ff(0x2f0),'message':_0x2ce5ff(0x1c9),'choices':_0x1745ab[_0x2ce5ff(0x1fe)](_0x4dbe19=>_0x4dbe19['value']!=='')});if(!_0x2889a5[_0x2ce5ff(0x2f0)])return 0x0;_0x7d53f6=_0x2889a5[_0x2ce5ff(0x2f0)];}const _0xe35408=_0x5ec3a8[_0x2ce5ff(0x2f5)];return _0xe35408?await this[_0x2ce5ff(0x329)](_0x21e4d8,_0x7d53f6):await this[_0x2ce5ff(0x32c)](_0x21e4d8,_0x7d53f6,_0x5ec3a8),0x0;}async[a54_0x141bbb(0x32c)](_0x6162b,_0x46e257,_0x10509c){const _0x50046c=a54_0x141bbb,{tdx:_0x1ada31}=_0x6162b;let _0x37d43b,_0x59a441;try{[_0x37d43b,_0x59a441]=await Promise[_0x50046c(0x36b)]([_0x1ada31['workflow'][_0x50046c(0x366)](_0x46e257),_0x1ada31[_0x50046c(0x22f)]['tasks'](_0x46e257,![])]);}catch(_0x449022){console[_0x50046c(0x2fc)](a54_0x467bd9[_0x50046c(0x2ac)](_0x50046c(0x252)));_0x10509c[_0x50046c(0x2c5)]&&console[_0x50046c(0x2fc)](_0x449022);throw _0x449022;}if(_0x10509c['json']||_0x10509c[_0x50046c(0x26d)]){const _0x57e00e=this['buildTimelineData'](_0x37d43b,_0x59a441);await handleSDKOutput([_0x57e00e],_0x10509c);return;}const _0x1602fc=_0x1ada31[_0x50046c(0x305)][_0x50046c(0x1f4)],_0x432f3b=this[_0x50046c(0x1d0)](_0x37d43b,_0x59a441,_0x1602fc);console[_0x50046c(0x2b9)](_0x432f3b);}async[a54_0x141bbb(0x329)](_0x5364ed,_0x193ec9){const _0x4adde4=a54_0x141bbb,{tdx:_0x3c0a5f}=_0x5364ed,_0x4949d3=TIMELINE_CONFIG[_0x4adde4(0x2b3)],_0x2463c9=TIMELINE_CONFIG[_0x4adde4(0x1c3)];let _0x2f2d99=0x0;while(_0x2f2d99<_0x2463c9){process[_0x4adde4(0x324)][_0x4adde4(0x1ad)]&&process['stdout'][_0x4adde4(0x1ee)]('\x1bc');let _0x54f94c,_0x568f7;try{[_0x54f94c,_0x568f7]=await Promise['all']([_0x3c0a5f[_0x4adde4(0x22f)]['attempt'](_0x193ec9),_0x3c0a5f[_0x4adde4(0x22f)][_0x4adde4(0x285)](_0x193ec9,![])]);}catch(_0x59d0b8){console[_0x4adde4(0x2fc)](a54_0x467bd9['red'](_0x4adde4(0x205)));_0x2f2d99>0x0&&console[_0x4adde4(0x2fc)](a54_0x467bd9[_0x4adde4(0x293)](_0x4adde4(0x257)+_0x2f2d99));throw _0x59d0b8;}const _0x194f6a=_0x3c0a5f[_0x4adde4(0x305)][_0x4adde4(0x1f4)],_0x5bc4c2=this[_0x4adde4(0x1d0)](_0x54f94c,_0x568f7,_0x194f6a);console[_0x4adde4(0x2b9)](_0x5bc4c2);const _0x64ebc5=_0x54f94c[_0x4adde4(0x22e)]&&_0x568f7[_0x4adde4(0x215)](_0x43c2fb=>_0x43c2fb[_0x4adde4(0x1c6)]!==_0x4adde4(0x295)&&_0x43c2fb[_0x4adde4(0x1c6)]!==_0x4adde4(0x27f));if(_0x64ebc5){console[_0x4adde4(0x2fc)](a54_0x467bd9[_0x4adde4(0x20d)](_0x4adde4(0x23b)));break;}console[_0x4adde4(0x2fc)](a54_0x467bd9['dim'](_0x4adde4(0x23e)+_0x2f2d99*0x2+_0x4adde4(0x379))),await new Promise(_0x28f2ab=>setTimeout(_0x28f2ab,_0x4949d3)),_0x2f2d99++;}_0x2f2d99>=_0x2463c9&&console[_0x4adde4(0x2fc)](a54_0x467bd9[_0x4adde4(0x371)](_0x4adde4(0x2bb)));}[a54_0x141bbb(0x1d0)](_0x5878b2,_0x5ec9cc,_0xfcb382){const _0x500dbb=a54_0x141bbb,_0xa09992=[],_0x27b8a9=TIMELINE_CONFIG[_0x500dbb(0x20c)],_0x15a7a1=0x5,_0x2f83bc=process[_0x500dbb(0x324)][_0x500dbb(0x1cc)]||0x78,_0x215742=_0x2f83bc-_0x27b8a9-_0x15a7a1,_0x20e235=Math[_0x500dbb(0x36c)](TIMELINE_CONFIG[_0x500dbb(0x339)],Math['min'](_0x215742,TIMELINE_CONFIG[_0x500dbb(0x2e8)])),_0x378f9d=new Date(_0x5878b2[_0x500dbb(0x36f)])[_0x500dbb(0x2f4)](),_0x6fada=_0x5878b2[_0x500dbb(0x2a7)]?new Date(_0x5878b2[_0x500dbb(0x2a7)])[_0x500dbb(0x2f4)]():Date['now'](),_0x822462={'start':_0x378f9d,'end':_0x6fada,'duration':_0x6fada-_0x378f9d},_0x5ca56d=new Map(),_0x3f88a7=[];for(const _0x580d7e of _0x5ec9cc){if(_0x580d7e[_0x500dbb(0x25d)]){const _0x32b270=new Date(_0x580d7e['startedAt'])['getTime'](),_0x5d85b0=_0x580d7e['updatedAt']?new Date(_0x580d7e[_0x500dbb(0x217)])[_0x500dbb(0x2f4)]():Date[_0x500dbb(0x2b2)](),_0x5502f1={'start':_0x32b270,'end':_0x5d85b0,'duration':_0x5d85b0-_0x32b270};_0x5ca56d[_0x500dbb(0x1dc)](_0x580d7e['id'],_0x5502f1),_0x3f88a7[_0x500dbb(0x1be)]({'name':_0x580d7e[_0x500dbb(0x242)],'state':_0x580d7e[_0x500dbb(0x1c6)]||_0x500dbb(0x206),'window':_0x5502f1});}else _0x3f88a7['push']({'name':_0x580d7e[_0x500dbb(0x242)],'state':_0x580d7e[_0x500dbb(0x1c6)]||_0x500dbb(0x27f),'window':undefined});}_0x3f88a7[_0x500dbb(0x2d7)]((_0x1967a6,_0x29f6c6)=>{const _0x1cfc6b=_0x500dbb;if(!_0x1967a6[_0x1cfc6b(0x26a)])return 0x1;if(!_0x29f6c6[_0x1cfc6b(0x26a)])return-0x1;return _0x1967a6['window'][_0x1cfc6b(0x1ed)]-_0x29f6c6['window']['start'];});const _0x233a45=_0x3f88a7[_0x500dbb(0x1fa)],_0x229529=_0x233a45>TIMELINE_CONFIG[_0x500dbb(0x1e2)];_0x229529&&_0x3f88a7['splice'](TIMELINE_CONFIG[_0x500dbb(0x1e2)]);const _0x471e3d=calculateTimeScale(_0x822462,_0x20e235),_0x2edaaa=_0x5878b2[_0x500dbb(0x22e)]?_0x5878b2[_0x500dbb(0x346)]?a54_0x467bd9[_0x500dbb(0x20d)](_0x500dbb(0x346)):a54_0x467bd9[_0x500dbb(0x2ac)](_0x500dbb(0x2fc)):a54_0x467bd9[_0x500dbb(0x370)](_0x500dbb(0x295)),_0x5e9ffb=_0x5878b2['project']?.['id'],_0x32756d=_0x5878b2[_0x500dbb(0x223)];let _0x55146c;if(_0x5e9ffb&&_0x32756d){const _0x3833a2=getWorkflowAttemptUrl(_0xfcb382,_0x5e9ffb,_0x32756d,_0x5878b2['id']);_0x55146c=hyperlink(a54_0x467bd9['dim'](_0x5878b2['id']),_0x3833a2);}else _0x55146c=a54_0x467bd9[_0x500dbb(0x293)](_0x5878b2['id']);_0xa09992[_0x500dbb(0x1be)]('Attempt:\x20'+_0x55146c+_0x500dbb(0x1db)+_0x2edaaa+'\x20-\x20'+formatElapsed(_0x822462['duration']));if(_0x3f88a7['length']>0x0){const _0x19ea88=renderTimeAxis(_0x471e3d,_0x20e235),_0x1941c2=new Date(_0x822462[_0x500dbb(0x1ed)]),_0xc24c6c=formatDate(_0x1941c2),_0xcca4d2=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x500dbb(0x1ce)]+_0x27b8a9,_0x21aa52=_0xc24c6c[_0x500dbb(0x261)](_0xcca4d2),_0x434d66=a54_0x467bd9[_0x500dbb(0x293)](_0x21aa52);_0xa09992['push'](_0x434d66+'\x20'+_0x19ea88);for(const _0x1f7e33 of _0x3f88a7){_0xa09992['push'](renderTaskRow(_0x1f7e33,_0x471e3d,_0x20e235,_0x27b8a9));}const _0x62dc74=calculateStats(_0x3f88a7);_0xa09992[_0x500dbb(0x1be)](formatStats(_0x62dc74)),_0x229529&&_0xa09992[_0x500dbb(0x1be)](a54_0x467bd9[_0x500dbb(0x371)](_0x500dbb(0x364)+TIMELINE_CONFIG[_0x500dbb(0x1e2)]+_0x500dbb(0x1e9)+_0x233a45+_0x500dbb(0x1e3))),_0xa09992[_0x500dbb(0x1be)](''),_0xa09992[_0x500dbb(0x1be)](a54_0x467bd9[_0x500dbb(0x293)](_0x500dbb(0x21b))+(_0x500dbb(0x2eb)+_0x5878b2['id']+'\x20logs')+a54_0x467bd9[_0x500dbb(0x293)](_0x500dbb(0x2d6)));}else _0xa09992['push'](_0x500dbb(0x30e));return _0xa09992[_0x500dbb(0x337)]('\x0a');}[a54_0x141bbb(0x375)](_0x29032d,_0xa9438d){const _0x43497f=a54_0x141bbb,_0x1f3bb6=new Date(_0x29032d[_0x43497f(0x36f)])[_0x43497f(0x2f4)](),_0x56596c=_0x29032d[_0x43497f(0x2a7)]?new Date(_0x29032d['finishedAt'])[_0x43497f(0x2f4)]():Date[_0x43497f(0x2b2)](),_0x12d642=_0x56596c-_0x1f3bb6,_0x26903d=[];for(const _0x15e872 of _0xa9438d){if(_0x15e872[_0x43497f(0x25d)]){const _0x2faa75=new Date(_0x15e872['startedAt'])[_0x43497f(0x2f4)](),_0xcb67a9=_0x15e872[_0x43497f(0x217)]?new Date(_0x15e872[_0x43497f(0x217)])['getTime']():Date[_0x43497f(0x2b2)]();_0x26903d[_0x43497f(0x1be)]({'name':_0x15e872[_0x43497f(0x242)],'state':_0x15e872[_0x43497f(0x1c6)]||_0x43497f(0x206),'window':{'start':_0x2faa75,'end':_0xcb67a9,'duration':_0xcb67a9-_0x2faa75}});}else _0x26903d[_0x43497f(0x1be)]({'name':_0x15e872[_0x43497f(0x242)],'state':_0x15e872[_0x43497f(0x1c6)]||'planned','window':undefined});}const _0x19ee2e=calculateStats(_0x26903d);return{'attempt':{'id':_0x29032d['id'],'status':_0x29032d[_0x43497f(0x22e)]?_0x29032d[_0x43497f(0x346)]?'success':_0x43497f(0x2fc):_0x43497f(0x295),'createdAt':_0x29032d['createdAt'],'finishedAt':_0x29032d[_0x43497f(0x2a7)],'duration_ms':_0x12d642},'tasks':_0x26903d[_0x43497f(0x2b6)](_0x202cdc=>({'name':_0x202cdc[_0x43497f(0x34d)],'state':_0x202cdc[_0x43497f(0x1c6)],'startedAt':_0x202cdc[_0x43497f(0x26a)]?new Date(_0x202cdc[_0x43497f(0x26a)]['start'])[_0x43497f(0x2b8)]():null,'updatedAt':_0x202cdc['window']?new Date(_0x202cdc[_0x43497f(0x26a)][_0x43497f(0x303)])[_0x43497f(0x2b8)]():null,'duration_ms':_0x202cdc['window']?.[_0x43497f(0x351)]||null})),'stats':_0x19ee2e};}}export class WorkflowSchedulesCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x1b1);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x1b2);async['execute'](_0xbd47f2){const _0x4e2fce=a54_0x141bbb,{options:_0x2487d9,tdx:_0x19aea8}=_0xbd47f2,_0x59a0e2=await withSpinner(_0x4e2fce(0x2f7),()=>_0x19aea8[_0x4e2fce(0x22f)][_0x4e2fce(0x308)](),{'verbose':_0x2487d9[_0x4e2fce(0x2c5)]}),_0x2a78f3=_0x59a0e2['data'];console['error']('✔\x20Found\x20'+_0x2a78f3[_0x4e2fce(0x1fa)]+_0x4e2fce(0x373)+(_0x2a78f3[_0x4e2fce(0x1fa)]!==0x1?'s':''));if(isStructuredFormat(_0x2487d9))await handleSDKOutput(_0x2a78f3,_0x2487d9);else{if(_0x2a78f3[_0x4e2fce(0x1fa)]===0x0)console[_0x4e2fce(0x2b9)](_0x4e2fce(0x282));else for(const _0x12a99f of _0x2a78f3){const _0x2176b1=_0x12a99f['disabledAt']?a54_0x467bd9[_0x4e2fce(0x371)]('\x20(disabled)'):'',_0x5dfdb1=_0x12a99f['project']?.['name']?a54_0x467bd9['dim']('\x20['+_0x12a99f[_0x4e2fce(0x250)]['name']+']'):'',_0x3eb806=_0x12a99f[_0x4e2fce(0x348)]?a54_0x467bd9['dim'](_0x4e2fce(0x278)+new Date(_0x12a99f['nextRunTime'])[_0x4e2fce(0x265)]()):'';console[_0x4e2fce(0x2b9)]('📅\x20#'+_0x12a99f['id']+'\x20'+(_0x12a99f[_0x4e2fce(0x22f)]?.[_0x4e2fce(0x34d)]||_0x4e2fce(0x29d))+_0x5dfdb1+_0x2176b1+_0x3eb806);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x31d);[a54_0x141bbb(0x20b)]=a54_0x141bbb(0x1e8);async[a54_0x141bbb(0x21d)](_0x441fa6){const _0x5e28cc=a54_0x141bbb,{options:_0x11aa0b,args:_0x9f3baa,tdx:_0x4e24a4}=_0x441fa6,_0x81723d=_0x9f3baa[0x0];if(!_0x81723d)return console[_0x5e28cc(0x2fc)](a54_0x467bd9[_0x5e28cc(0x2ac)](_0x5e28cc(0x20a)),_0x5e28cc(0x203)),console[_0x5e28cc(0x2fc)](a54_0x467bd9[_0x5e28cc(0x293)](_0x5e28cc(0x207))),console[_0x5e28cc(0x2fc)](a54_0x467bd9[_0x5e28cc(0x293)](_0x5e28cc(0x211))),0x1;const _0x588dd6=await withSpinner(_0x5e28cc(0x316)+_0x81723d+'...',()=>_0x4e24a4[_0x5e28cc(0x22f)]['enableSchedule'](_0x81723d),{'verbose':_0x11aa0b[_0x5e28cc(0x2c5)]}),_0x5d6644=_0x588dd6[_0x5e28cc(0x227)];return isStructuredFormat(_0x11aa0b)?await handleSingleObjectOutput(_0x5d6644,_0x11aa0b):(console[_0x5e28cc(0x2b9)]('✔\x20Schedule\x20#'+_0x81723d+'\x20enabled\x20('+(_0x5d6644['workflow']?.[_0x5e28cc(0x34d)]||'unknown')+')'),_0x5d6644[_0x5e28cc(0x348)]&&console['log'](a54_0x467bd9[_0x5e28cc(0x293)](_0x5e28cc(0x2df)+new Date(_0x5d6644[_0x5e28cc(0x348)])['toLocaleString']()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a54_0x141bbb(0x34d)]=a54_0x141bbb(0x23c);[a54_0x141bbb(0x20b)]='Disable\x20a\x20workflow\x20schedule';async[a54_0x141bbb(0x21d)](_0x49db29){const _0x33f6da=a54_0x141bbb,{options:_0x270659,args:_0x42732d,tdx:_0x7cd318}=_0x49db29,_0x8ecdfb=_0x42732d[0x0];if(!_0x8ecdfb)return console[_0x33f6da(0x2fc)](a54_0x467bd9[_0x33f6da(0x2ac)](_0x33f6da(0x20a)),_0x33f6da(0x203)),console[_0x33f6da(0x2fc)](a54_0x467bd9[_0x33f6da(0x293)](_0x33f6da(0x2ae))),console[_0x33f6da(0x2fc)](a54_0x467bd9[_0x33f6da(0x293)]('Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs')),0x1;const _0xa604ef=await withSpinner(_0x33f6da(0x279)+_0x8ecdfb+'...',()=>_0x7cd318[_0x33f6da(0x22f)][_0x33f6da(0x2ad)](_0x8ecdfb),{'verbose':_0x270659[_0x33f6da(0x2c5)]}),_0x316c7c=_0xa604ef[_0x33f6da(0x227)];return isStructuredFormat(_0x270659)?await handleSingleObjectOutput(_0x316c7c,_0x270659):console[_0x33f6da(0x2b9)](_0x33f6da(0x35f)+_0x8ecdfb+_0x33f6da(0x1b3)+(_0x316c7c['workflow']?.[_0x33f6da(0x34d)]||_0x33f6da(0x206))+')'),0x0;}}
1
+ const a54_0x3dd44c=a54_0x2242;(function(_0x2f6a77,_0x229ce5){const _0x1b741d=a54_0x2242,_0x36dac0=_0x2f6a77();while(!![]){try{const _0x352fc7=-parseInt(_0x1b741d(0x293))/0x1*(parseInt(_0x1b741d(0x11d))/0x2)+parseInt(_0x1b741d(0x1b4))/0x3*(parseInt(_0x1b741d(0x130))/0x4)+parseInt(_0x1b741d(0x1b5))/0x5+parseInt(_0x1b741d(0x26e))/0x6*(-parseInt(_0x1b741d(0x1ce))/0x7)+parseInt(_0x1b741d(0x183))/0x8+parseInt(_0x1b741d(0x1a2))/0x9*(parseInt(_0x1b741d(0xf2))/0xa)+-parseInt(_0x1b741d(0x1e1))/0xb*(parseInt(_0x1b741d(0xf8))/0xc);if(_0x352fc7===_0x229ce5)break;else _0x36dac0['push'](_0x36dac0['shift']());}catch(_0x434e34){_0x36dac0['push'](_0x36dac0['shift']());}}}(a54_0x550a,0xbf7cd));import a54_0x33d044 from'chalk';function a54_0x2242(_0x28fa53,_0x1d63e2){_0x28fa53=_0x28fa53-0xdc;const _0x550a34=a54_0x550a();let _0x22425b=_0x550a34[_0x28fa53];return _0x22425b;}import{existsSync}from'fs';import a54_0x3af23b from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import{parseTaskGraph,formatTaskGraph,summarizeTaskGraph,formatWarningSummary}from'../sdk/workflow/task-graph.js';import a54_0x2596be from'prompts';function getAttemptStatusDisplay(_0x45054e){const _0x451896=a54_0x2242;if(!_0x45054e)return{'icon':'⏳','text':''};const {done:_0x36c377,success:_0x1a7257,cancelRequested:_0x1dbed5}=_0x45054e;if(!_0x36c377)return _0x1dbed5?{'icon':'🛑','text':a54_0x33d044[_0x451896(0x114)]('canceling')}:{'icon':'🔄','text':a54_0x33d044[_0x451896(0x246)](_0x451896(0x21c))};if(_0x1a7257)return{'icon':'✅','text':a54_0x33d044[_0x451896(0xfd)](_0x451896(0x1ee))};return{'icon':'❌','text':a54_0x33d044[_0x451896(0xf6)](_0x451896(0x125))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x54e511,_0x532a58,_0x3f53ef=0x0){const _0x43852c=a54_0x2242;return _0x54e511[_0x3f53ef]||_0x532a58[_0x43852c(0x1d5)];}[a54_0x3dd44c(0x140)](_0x14ecfd,_0x53f824,_0x4652b5=0x0){const _0x4f5b6e=a54_0x3dd44c,_0x331a3d=this[_0x4f5b6e(0x25a)](_0x14ecfd,_0x53f824,_0x4652b5);if(!_0x331a3d)return console[_0x4f5b6e(0x125)](a54_0x33d044[_0x4f5b6e(0xf6)](_0x4f5b6e(0x1ab)),_0x4f5b6e(0x1bc)),console[_0x4f5b6e(0x125)](a54_0x33d044['dim'](_0x4f5b6e(0x257))),null;return _0x331a3d;}[a54_0x3dd44c(0x251)](_0x15ed87,_0xa82a77){const _0x4eca95=a54_0x3dd44c;if(_0x15ed87[0x0]){const _0x326fc1=_0x15ed87[0x0][_0x4eca95(0x29e)]('.');if(_0x326fc1[_0x4eca95(0x1d0)]===0x1)return{'projectName':_0x326fc1[0x0],'workflowName':undefined};else return _0x326fc1[_0x4eca95(0x1d0)]===0x2?{'projectName':_0x326fc1[0x0],'workflowName':_0x326fc1[0x1]}:(console[_0x4eca95(0x125)](a54_0x33d044['red'](_0x4eca95(0x1ab)),_0x4eca95(0x16e)),null);}return{'projectName':_0xa82a77['workflowProject'],'workflowName':undefined};}[a54_0x3dd44c(0x1f3)](_0x466531,_0x3d4da8,_0x261526=0x0){const _0x61f2dd=a54_0x3dd44c;if(_0x466531[_0x261526])return _0x466531[_0x261526];if(_0x3d4da8['workflowProject']){const _0x584544=a54_0x3af23b[_0x61f2dd(0x227)](process[_0x61f2dd(0x2a0)](),_0x61f2dd(0x2a6),_0x3d4da8['workflowProject']);if(existsSync(a54_0x3af23b[_0x61f2dd(0x227)](_0x584544,_0x61f2dd(0x131))))return _0x584544;}return undefined;}async['showWorkflowConsoleUrl'](_0x58b821,_0x4243ca,_0x16d912){const _0x13b52d=a54_0x3dd44c;try{const _0x5192e7=await _0x58b821[_0x13b52d(0x1f2)][_0x13b52d(0x2a6)](_0x4243ca,{'limit':0x1});if(_0x5192e7[_0x13b52d(0x1d0)]>0x0){const _0x5d8603=_0x5192e7[0x0]['id'],_0x5eb26b=getWorkflowUrl(_0x16d912,_0x5d8603);console[_0x13b52d(0x125)](_0x13b52d(0x205)+a54_0x33d044[_0x13b52d(0x210)](_0x5eb26b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x22f);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x29a);async['execute'](_0x3e97ec){const _0x4cb97b=a54_0x3dd44c,{options:_0x1aa059,args:_0x213f38,tdx:_0x220712}=_0x3e97ec,_0x47da2e=_0x213f38[0x0],_0x97abaf=_0x1aa059[_0x4cb97b(0x21a)];if(_0x97abaf)return saveSessionContext({'workflow_project':undefined},_0x1aa059['session']),console[_0x4cb97b(0x2a7)](a54_0x33d044[_0x4cb97b(0xfd)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x47da2e)return console[_0x4cb97b(0x125)](a54_0x33d044[_0x4cb97b(0xf6)]('Error:'),_0x4cb97b(0x1bc)),console[_0x4cb97b(0x125)](a54_0x33d044[_0x4cb97b(0x146)](_0x4cb97b(0x11f))),console['error'](a54_0x33d044[_0x4cb97b(0x146)](_0x4cb97b(0x291))),0x1;const _0x2551ff=await withSpinner(_0x4cb97b(0x218)+_0x47da2e+'\x27...',()=>_0x220712[_0x4cb97b(0x1f2)][_0x4cb97b(0x26d)](_0x47da2e),{'verbose':_0x1aa059[_0x4cb97b(0x1e5)]}),{name:_0x57fd54}=_0x2551ff['data'];return saveSessionContext({'workflow_project':_0x57fd54},_0x1aa059[_0x4cb97b(0x25c)]),console[_0x4cb97b(0x2a7)](a54_0x33d044[_0x4cb97b(0xfd)](_0x4cb97b(0x209)+a54_0x33d044[_0x4cb97b(0x210)](_0x57fd54))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x1bf);['description']='List\x20all\x20workflow\x20projects';async[a54_0x3dd44c(0x1ff)](_0xbe035a){const _0x3d585d=a54_0x3dd44c,{options:_0x11e8d9,args:_0x10c3ef,tdx:_0x40da32}=_0xbe035a,_0x33d007=_0x10c3ef[0x0];_0x11e8d9[_0x3d585d(0x1e5)]&&_0x33d007&&console['error']('Pattern:\x20'+_0x33d007);const _0x3e8dc0=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x40da32[_0x3d585d(0x1f2)][_0x3d585d(0x15b)](_0x33d007,{'limit':_0x11e8d9[_0x3d585d(0x22e)]}),{'verbose':_0x11e8d9[_0x3d585d(0x1e5)]});let _0x430c98=_0x3e8dc0[_0x3d585d(0x193)];_0x430c98[_0x3d585d(0x236)]((_0x21b20d,_0x2ee96f)=>_0x21b20d[_0x3d585d(0x237)]['localeCompare'](_0x2ee96f[_0x3d585d(0x237)]));const _0x15b0ee=_0x11e8d9['limit']||0x64,_0x2c08b9=_0x430c98[_0x3d585d(0x1d0)]>=_0x15b0ee?a54_0x33d044['dim'](_0x3d585d(0x253)):'';console[_0x3d585d(0x125)](_0x3d585d(0x274)+_0x430c98[_0x3d585d(0x1d0)]+_0x3d585d(0x1a3)+(_0x430c98['length']!==0x1?'s':'')+_0x2c08b9);if(_0x11e8d9[_0x3d585d(0x1d8)]===_0x3d585d(0x252)||_0x11e8d9[_0x3d585d(0x1d8)]===_0x3d585d(0x25f)||_0x11e8d9[_0x3d585d(0x1d8)]===_0x3d585d(0x228))await handleSDKOutput(_0x430c98,_0x11e8d9);else{if(_0x430c98[_0x3d585d(0x1d0)]===0x0)_0x33d007?console[_0x3d585d(0x2a7)](_0x3d585d(0x297)+_0x33d007):console['log'](_0x3d585d(0x1ef));else{const _0x1582b1=_0x430c98[_0x3d585d(0x23c)](_0x5188b5=>{const _0x25356b=_0x3d585d,_0x2ad191=_0x5188b5[_0x25356b(0x16c)]?.['some'](_0x26a904=>_0x26a904['key']==='sys'),_0x462ef1=_0x2ad191?a54_0x33d044['dim'](_0x25356b(0x188)):'';return _0x25356b(0x16d)+_0x5188b5[_0x25356b(0x237)]+_0x462ef1;});await writeOutput(_0x1582b1['join']('\x0a'),_0x11e8d9[_0x3d585d(0x27e)],_0x3d585d(0x230));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x150);['description']=a54_0x3dd44c(0x173);async[a54_0x3dd44c(0x1ff)](_0x180641){const _0x35aa1f=a54_0x3dd44c,{options:_0x21f3dd,args:_0x4c4691,tdx:_0x49235f}=_0x180641,_0x181b89=this[_0x35aa1f(0x25a)](_0x4c4691,_0x21f3dd);_0x21f3dd['verbose']&&_0x181b89&&console[_0x35aa1f(0x125)](_0x35aa1f(0xef)+_0x181b89);const _0x1faab7=await withSpinner(_0x35aa1f(0x22c),()=>_0x49235f[_0x35aa1f(0x1f2)]['workflows'](_0x181b89,{'limit':_0x21f3dd[_0x35aa1f(0x22e)]}),{'verbose':_0x21f3dd['verbose']});let _0x2d9783=_0x1faab7[_0x35aa1f(0x193)];_0x2d9783[_0x35aa1f(0x236)]((_0x25aa30,_0x592605)=>{const _0x81f287=_0x35aa1f,_0x19a6a7=_0x25aa30[_0x81f287(0x237)][_0x81f287(0x1d6)](_0x592605[_0x81f287(0x237)]);if(_0x19a6a7!==0x0)return _0x19a6a7;return(_0x25aa30['project']?.['name']||'')[_0x81f287(0x1d6)](_0x592605[_0x81f287(0x104)]?.[_0x81f287(0x237)]||'');});const _0x290498=_0x21f3dd[_0x35aa1f(0x22e)]||0x64,_0x5607d4=_0x2d9783['length']>=_0x290498?a54_0x33d044[_0x35aa1f(0x146)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error']('✔\x20Found\x20'+_0x2d9783[_0x35aa1f(0x1d0)]+_0x35aa1f(0x23a)+(_0x2d9783['length']!==0x1?'s':'')+_0x5607d4);if(_0x21f3dd[_0x35aa1f(0x1d8)]===_0x35aa1f(0x252)||_0x21f3dd[_0x35aa1f(0x1d8)]===_0x35aa1f(0x25f)||_0x21f3dd[_0x35aa1f(0x1d8)]===_0x35aa1f(0x228))await handleSDKOutput(_0x2d9783,_0x21f3dd);else{if(_0x2d9783[_0x35aa1f(0x1d0)]===0x0)_0x181b89?console[_0x35aa1f(0x2a7)](_0x35aa1f(0x1fa)+_0x181b89):console[_0x35aa1f(0x2a7)](_0x35aa1f(0x249));else{const _0x3c8901=_0x21f3dd['site'],_0xa2d1fb=_0x2d9783[_0x35aa1f(0x23c)](_0x5babe7=>{const _0x870ad2=_0x35aa1f,_0x150517=a54_0x33d044[_0x870ad2(0x146)]('#'+_0x5babe7['id']),_0x7c3c4b=hyperlink(_0x150517,getWorkflowUrl(_0x3c8901,_0x5babe7['id'])),_0x5110d4=_0x5babe7['project']?.[_0x870ad2(0x237)]?a54_0x33d044['dim']('\x20('+_0x5babe7[_0x870ad2(0x104)][_0x870ad2(0x237)]+')'):'';return _0x870ad2(0x24d)+_0x7c3c4b+'\x20'+_0x5babe7['name']+_0x5110d4;});await writeOutput(_0xa2d1fb[_0x35aa1f(0x227)]('\x0a'),_0x21f3dd[_0x35aa1f(0x27e)],_0x35aa1f(0x230));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x24e);['description']='List\x20workflow\x20execution\x20sessions';async['execute'](_0x1e17a4){const _0x20d50b=a54_0x3dd44c,{options:_0x358595,args:_0x4504f5,tdx:_0x4fa2a9}=_0x1e17a4,_0x5bb343=this[_0x20d50b(0x251)](_0x4504f5,_0x358595);if(!_0x5bb343)return 0x1;const {projectName:_0x783d42,workflowName:_0x5c3f7e}=_0x5bb343;if(_0x358595[_0x20d50b(0x1e5)]){if(_0x783d42&&_0x5c3f7e)console['error']('Filter:\x20'+_0x783d42+'.'+_0x5c3f7e);else _0x783d42&&console[_0x20d50b(0x125)](_0x20d50b(0x11c)+_0x783d42);const _0x3519ac=_0x358595[_0x20d50b(0x1fd)];_0x3519ac&&console[_0x20d50b(0x125)](_0x20d50b(0x1e2)+_0x3519ac);}let _0x21dbb0=0x28;if(process[_0x20d50b(0x1ed)][_0x20d50b(0x26b)]&&!_0x358595[_0x20d50b(0x27e)]&&!_0x358595[_0x20d50b(0x1d8)]){const _0x1c15f4=process['stdout'][_0x20d50b(0x200)]||0x28;_0x21dbb0=Math['max'](0x14,Math['floor'](_0x1c15f4*0x2/0x3));}const _0x3b0042=_0x358595['limit']||_0x21dbb0,_0x239092=await withSpinner(_0x20d50b(0x141),()=>_0x4fa2a9[_0x20d50b(0x1f2)][_0x20d50b(0x172)]({'projectName':_0x783d42,'workflowName':_0x5c3f7e,'status':_0x358595[_0x20d50b(0x1fd)],'fromTime':_0x358595[_0x20d50b(0x276)],'toTime':_0x358595['to'],'limit':_0x3b0042}),{'verbose':_0x358595[_0x20d50b(0x1e5)]}),_0x7a68ec=_0x239092[_0x20d50b(0x193)];_0x7a68ec[_0x20d50b(0x236)]((_0x66418a,_0x2a900e)=>{const _0x559b2c=_0x20d50b,_0x2569ba=_0x66418a[_0x559b2c(0x12a)]||'',_0x551e74=_0x2a900e[_0x559b2c(0x12a)]||'';return _0x551e74[_0x559b2c(0x1d6)](_0x2569ba);});_0x7a68ec[_0x20d50b(0x1d0)]>=_0x3b0042?console[_0x20d50b(0x125)](_0x20d50b(0x214)+_0x7a68ec['length']+_0x20d50b(0x12b)+a54_0x33d044[_0x20d50b(0x146)](_0x20d50b(0x196))):console[_0x20d50b(0x125)](_0x20d50b(0x274)+_0x7a68ec['length']+_0x20d50b(0x1a6)+(_0x7a68ec[_0x20d50b(0x1d0)]!==0x1?'s':''));if(_0x358595[_0x20d50b(0x1d8)]===_0x20d50b(0x252)||_0x358595[_0x20d50b(0x1d8)]===_0x20d50b(0x25f)||_0x358595['format']===_0x20d50b(0x228))await handleSDKOutput(_0x7a68ec,_0x358595);else{if(!process['stdout'][_0x20d50b(0x26b)]||_0x358595['output']){if(_0x7a68ec[_0x20d50b(0x1d0)]===0x0){if(_0x783d42&&_0x5c3f7e)console[_0x20d50b(0x2a7)](_0x20d50b(0x211)+_0x783d42+'.'+_0x5c3f7e);else _0x783d42?console['log'](_0x20d50b(0x263)+_0x783d42):console[_0x20d50b(0x2a7)](_0x20d50b(0xf4));}else{const _0x1d8d8d=_0x358595['site'],_0x4c19cd=this[_0x20d50b(0x124)](_0x7a68ec,_0x1d8d8d);_0x358595[_0x20d50b(0x27e)]?await writeOutput(_0x4c19cd,_0x358595[_0x20d50b(0x27e)],_0x20d50b(0x230)):console[_0x20d50b(0x2a7)](_0x4c19cd);}!_0x783d42&&(console[_0x20d50b(0x125)](''),console[_0x20d50b(0x125)](a54_0x33d044[_0x20d50b(0x146)](_0x20d50b(0x111))),console[_0x20d50b(0x125)](a54_0x33d044[_0x20d50b(0x146)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a54_0x33d044[_0x20d50b(0x146)](_0x20d50b(0xfc))));}else{if(_0x7a68ec[_0x20d50b(0x1d0)]===0x0){if(_0x783d42&&_0x5c3f7e)console[_0x20d50b(0x2a7)](_0x20d50b(0x211)+_0x783d42+'.'+_0x5c3f7e);else _0x783d42?console['log'](_0x20d50b(0x263)+_0x783d42):console[_0x20d50b(0x2a7)]('No\x20sessions\x20found');}else await this[_0x20d50b(0x29b)](_0x7a68ec,_0x1e17a4,_0x783d42);}}return 0x0;}['renderSessionsTimeline'](_0x46afc5,_0x443d6d){const _0x216d75=a54_0x3dd44c,_0x363d16=[],_0x465284=new Map();let _0x3d8fc2=Infinity,_0x42b729=-Infinity;for(const _0xacdc35 of _0x46afc5){if(_0xacdc35[_0x216d75(0x1ea)]?.[_0x216d75(0xe7)]){const _0x17d6c8=new Date(_0xacdc35[_0x216d75(0x1ea)]['createdAt'])[_0x216d75(0x1b1)](),_0x562464=_0xacdc35[_0x216d75(0x1ea)][_0x216d75(0x2a4)]?new Date(_0xacdc35['lastAttempt'][_0x216d75(0x2a4)])['getTime']():Date[_0x216d75(0x272)](),_0xa35ab5=_0xacdc35['project']?.[_0x216d75(0x237)]||_0x216d75(0x1de);!_0x465284[_0x216d75(0x10a)](_0xa35ab5)&&_0x465284[_0x216d75(0x22a)](_0xa35ab5,[]),_0x465284[_0x216d75(0x192)](_0xa35ab5)[_0x216d75(0x1e8)]({'session':_0xacdc35,'startTime':_0x17d6c8,'endTime':_0x562464,'duration':_0x562464-_0x17d6c8}),_0x3d8fc2=Math['min'](_0x3d8fc2,_0x17d6c8),_0x42b729=Math[_0x216d75(0x25d)](_0x42b729,_0x562464);}}if(_0x465284[_0x216d75(0x1a9)]===0x0)return _0x216d75(0x19d);const _0x52a493=process[_0x216d75(0x1ed)][_0x216d75(0x2ad)]||0x78,_0x6f254e=0x1e,_0x322f79=0x32,_0x3e1307=0x4,_0x18734b=Math[_0x216d75(0x21b)](_0x322f79,Math[_0x216d75(0x25d)](_0x6f254e,Math[_0x216d75(0x16f)](_0x52a493*0.3))),_0x24a374=_0x52a493-_0x18734b-TIMELINE_CONFIG[_0x216d75(0x2a5)]-0x3-_0x3e1307,_0x32371d=_0x42b729-_0x3d8fc2,_0x30ba34=_0x32371d/_0x18734b,_0x42aa9d=renderTimeAxis({'startTime':_0x3d8fc2,'endTime':_0x42b729,'durationMs':_0x32371d,'msPerChar':_0x30ba34},_0x18734b),_0xf9c92=[];for(const _0x3bc339 of _0x465284['values']()){_0xf9c92[_0x216d75(0x1e8)](..._0x3bc339);}_0xf9c92[_0x216d75(0x236)]((_0x4b1fd5,_0x3c03e8)=>_0x3c03e8[_0x216d75(0x21f)]-_0x4b1fd5['startTime']);const _0x27eb91=new Date(_0x3d8fc2),_0x2ea081=formatDate(_0x27eb91),_0x1a23a2=_0x3e1307+TIMELINE_CONFIG[_0x216d75(0x269)]+TIMELINE_CONFIG[_0x216d75(0x170)]+_0x24a374,_0x3f527a='\x20'[_0x216d75(0x10c)](_0x1a23a2-_0x2ea081[_0x216d75(0x1d0)]),_0x434ec6=_0x3f527a+a54_0x33d044[_0x216d75(0x146)](_0x2ea081)+'\x20'+_0x42aa9d;_0x363d16[_0x216d75(0x1e8)](_0x434ec6);const _0x1f5632=0x16;let _0x394ea7=0x0;for(const _0x5ba19c of _0xf9c92){const _0x45c37d=_0x5ba19c[_0x216d75(0x25c)][_0x216d75(0x104)]?.[_0x216d75(0x237)]||'?',_0x1aba27=Math[_0x216d75(0x21b)](stringWidth(_0x45c37d),_0x1f5632);_0x394ea7=Math['max'](_0x394ea7,_0x1aba27);}for(const _0x4e0794 of _0xf9c92){const {session:_0xbca2d8,startTime:_0x4c932b,endTime:_0x4a9030,duration:_0x54f64b}=_0x4e0794,_0x480978=_0xbca2d8['project']?.['id'],_0x4d2b0b=_0xbca2d8['id'],_0x3985ea=_0xbca2d8[_0x216d75(0x104)]?.[_0x216d75(0x237)]||'?',_0x5692ad=_0xbca2d8[_0x216d75(0x1f2)]?.[_0x216d75(0x237)]||'?';let _0x5ca940,_0x528c62;if(_0xbca2d8[_0x216d75(0x1ea)]){const _0x2264f3=_0xbca2d8[_0x216d75(0x1ea)];!_0x2264f3[_0x216d75(0x10d)]?(_0x5ca940=_0x2264f3['cancelRequested']?'🛑':'🔄',_0x528c62=_0x2264f3[_0x216d75(0x280)]?a54_0x33d044['yellow']:a54_0x33d044[_0x216d75(0x246)]):(_0x5ca940=_0x2264f3['success']?'✅':'❌',_0x528c62=_0x2264f3[_0x216d75(0x1ee)]?a54_0x33d044[_0x216d75(0xfd)]:a54_0x33d044[_0x216d75(0xf6)]);}else _0x5ca940='⏳',_0x528c62=a54_0x33d044['dim'];const _0x2b86bb='#'+_0x4d2b0b,_0x362968=_0x480978?hyperlink(_0x2b86bb,getWorkflowSessionUrl(_0x443d6d,_0x480978,_0x4d2b0b)):_0x2b86bb;let _0x4aa554=_0x3985ea;stringWidth(_0x3985ea)>_0x1f5632&&(_0x4aa554=_0x3985ea['slice'](0x0,_0x1f5632-0x1)+'…');const _0x4326b9=a54_0x33d044[_0x216d75(0x146)](_0x4aa554),_0x106fb2=stringWidth(_0x4aa554),_0x2f6ae8='\x20'[_0x216d75(0x10c)](_0x394ea7-stringWidth(_0x4aa554)+0x2),_0x27a79='('+formatElapsed(_0x54f64b)+')',_0x909601=stringWidth(_0x27a79),_0x19bad3=stringWidth(_0x2b86bb),_0x5135ff=_0x19bad3+0x1+_0x106fb2+_0x2f6ae8[_0x216d75(0x1d0)],_0x1011e9=_0x24a374-_0x5135ff-_0x909601-0x1-0x8;let _0x297820=_0x5692ad;stringWidth(_0x297820)>_0x1011e9&&(_0x297820=_0x297820[_0x216d75(0x121)](0x0,_0x1011e9-0x1)+'…');const _0x610a8c=_0x362968+'\x20'+_0x4326b9+_0x2f6ae8+_0x297820,_0xfa38e5=stringWidth(_0x610a8c),_0xde31e=_0x24a374-_0xfa38e5-_0x909601,_0x36618c=_0x610a8c+'\x20'[_0x216d75(0x10c)](Math[_0x216d75(0x25d)](0x1,_0xde31e))+a54_0x33d044[_0x216d75(0x146)](_0x27a79),_0x2ec66f=Math[_0x216d75(0x16f)]((_0x4c932b-_0x3d8fc2)/_0x30ba34),_0x707fdd=Math[_0x216d75(0x16f)]((_0x4a9030-_0x3d8fc2)/_0x30ba34),_0xcb3047=Math['max'](_0x2ec66f+0x1,_0x707fdd),_0x53e9fa=new Array(_0x18734b)['fill']('\x20');for(let _0x23d320=_0x2ec66f;_0x23d320<Math[_0x216d75(0x21b)](_0xcb3047,_0x18734b);_0x23d320++){_0x53e9fa[_0x23d320]='─';}const _0x186ac9=_0x53e9fa['map'](_0x274c54=>_0x274c54==='\x20'?'\x20':_0x528c62(_0x274c54))['join']('');_0x363d16[_0x216d75(0x1e8)](_0x5ca940+'\x20'+_0x36618c+'│'+_0x186ac9+'│');}return _0x363d16[_0x216d75(0x227)]('\x0a');}async[a54_0x3dd44c(0x29b)](_0x1bc014,_0x4ffcd6,_0x303a15){const _0x15e3b=a54_0x3dd44c,{options:_0x4b60bd,tdx:_0x37452e}=_0x4ffcd6,_0x1059b2=_0x4b60bd[_0x15e3b(0x283)],{timelineRows:_0x3082d8,timeAxisHeader:_0xd7f27e}=this[_0x15e3b(0x1fb)](_0x1bc014,_0x1059b2),_0x5a5b2b=_0x3082d8[_0x15e3b(0x14d)](_0xf69cf6=>_0xf69cf6[_0x15e3b(0x18a)]);if(_0x5a5b2b[_0x15e3b(0x1d0)]===0x0){const _0x229e10=this[_0x15e3b(0x124)](_0x1bc014,_0x1059b2);console[_0x15e3b(0x2a7)](_0x229e10);!_0x303a15&&(console[_0x15e3b(0x125)](''),console['error'](a54_0x33d044['dim'](_0x15e3b(0x111))),console[_0x15e3b(0x125)](a54_0x33d044[_0x15e3b(0x146)](_0x15e3b(0x20e))+'or'+a54_0x33d044[_0x15e3b(0x146)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0xd7f27e&&console[_0x15e3b(0x2a7)](_0xd7f27e);const _0x27e756=_0x3082d8['filter'](_0x17ffc2=>_0x17ffc2[_0x15e3b(0x18a)])['map'](_0x4c9c3a=>({'title':_0x4c9c3a['displayLine'],'value':_0x4c9c3a[_0x15e3b(0x18a)]})),_0x3dd8ee=process[_0x15e3b(0x1ed)][_0x15e3b(0x200)]||0x3c,_0x2ed523=Math[_0x15e3b(0x25d)](0x28,Math['floor'](_0x3dd8ee*0x2/0x3)),_0x6287c=await a54_0x2596be({'type':_0x15e3b(0x17d),'name':_0x15e3b(0x18a),'message':_0x15e3b(0x182),'choices':_0x27e756,'initial':-0x1,'limit':_0x2ed523,'clearFirst':!![],'fallback':{'title':_0x15e3b(0x151),'value':null},'suggest':(_0x119c1a,_0x1f6108)=>{const _0x47eeb8=_0x15e3b;if(!_0x119c1a)return Promise[_0x47eeb8(0x1f5)](_0x1f6108);const _0x262b4d=_0x1f6108['filter'](_0x38f340=>{const _0x430f41=_0x47eeb8,_0x50c833=_0x38f340;return _0x50c833[_0x430f41(0x20b)][_0x430f41(0x12d)]()[_0x430f41(0xfa)](_0x119c1a[_0x430f41(0x12d)]());});return Promise[_0x47eeb8(0x1f5)](_0x262b4d);}}),_0x111cc2=()=>{const _0x5e8971=_0x15e3b;process[_0x5e8971(0x1ed)][_0x5e8971(0x12c)](_0x5e8971(0x115)),process['stdout'][_0x5e8971(0x12c)](_0x5e8971(0x115)),process['stdout'][_0x5e8971(0x12c)]('\x1b[1A\x1b[2K');},_0x5616f6=_0x6287c&&_0x6287c[_0x15e3b(0x18a)]&&_0x6287c[_0x15e3b(0x18a)]!==null&&_0x6287c[_0x15e3b(0x18a)]['trim']()!=='';if(!_0x5616f6){_0x111cc2(),console['log'](a54_0x33d044[_0x15e3b(0x146)]('Cancelled'));return;}_0x111cc2();const _0x2b22e1=_0x1bc014['find'](_0x1aef5a=>_0x1aef5a[_0x15e3b(0x1ea)]?.['id']===_0x6287c[_0x15e3b(0x18a)]);if(_0x2b22e1){const _0x51691a=_0x2b22e1['project']?.[_0x15e3b(0x237)]||'?',_0x521680=_0x2b22e1['workflow']?.[_0x15e3b(0x237)]||'?';console['log'](_0x15e3b(0x118)+a54_0x33d044['dim'](_0x51691a)+_0x15e3b(0x264)+a54_0x33d044[_0x15e3b(0x146)](_0x521680));}const _0x5fee34=new WorkflowTimelineCommand();await _0x5fee34[_0x15e3b(0x1ff)]({'args':[],'options':{..._0x4b60bd,'attemptId':_0x6287c['attemptId']},'tdx':_0x37452e});}['generateSessionTimelineRows'](_0x2c387b,_0x2f2397){const _0x493d6d=a54_0x3dd44c,_0x20edbb=new Map();for(const _0x4f6af0 of _0x2c387b){_0x4f6af0['id']&&_0x4f6af0[_0x493d6d(0x1ea)]?.['id']&&_0x20edbb[_0x493d6d(0x22a)](_0x4f6af0['id'],_0x4f6af0[_0x493d6d(0x1ea)]['id']);}const _0x4aab12=[];let _0x410a02='';const _0x43b1d6=this[_0x493d6d(0x124)](_0x2c387b,_0x2f2397),_0x25c1e3=_0x43b1d6[_0x493d6d(0x29e)]('\x0a');for(const _0x8dde3d of _0x25c1e3){if(_0x8dde3d[_0x493d6d(0x223)](_0x493d6d(0x178))||_0x8dde3d['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x410a02=_0x8dde3d;else{if(_0x8dde3d[_0x493d6d(0x17b)](/^[✅❌🔄🛑⏳]/)){const _0x2d1f71=_0x8dde3d[_0x493d6d(0x17b)](/#(\d+)/),_0x662aaa=_0x2d1f71?_0x2d1f71[0x1]:null,_0x227e0c=_0x662aaa?_0x20edbb['get'](_0x662aaa)||null:null,_0x3f7c69=_0x2c387b[_0x493d6d(0x198)](_0x3a6e19=>_0x3a6e19['id']===_0x662aaa),_0x229380=_0x3f7c69?.['project']?.['name']||'';_0x4aab12[_0x493d6d(0x1e8)]({'displayLine':_0x8dde3d,'attemptId':_0x227e0c,'projectName':_0x229380});}}}return{'timelineRows':_0x4aab12,'timeAxisHeader':_0x410a02};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]='workflow:attempts';[a54_0x3dd44c(0x1c0)]='List\x20workflow\x20attempts';async[a54_0x3dd44c(0x1ff)](_0x34279f){const _0x3998b2=a54_0x3dd44c,{options:_0x1daf52,args:_0x17158f,tdx:_0x3a9c1e}=_0x34279f,_0x2c2eee=this['parseProjectWorkflowPattern'](_0x17158f,_0x1daf52);if(!_0x2c2eee)return 0x1;const {projectName:_0x23fe94,workflowName:_0x27f557}=_0x2c2eee,_0x10d900=_0x1daf52[_0x3998b2(0x19f)];if(_0x1daf52[_0x3998b2(0x1e5)]){if(_0x23fe94&&_0x27f557)console['error'](_0x3998b2(0x143)+_0x23fe94+'.'+_0x27f557);else _0x23fe94&&console[_0x3998b2(0x125)](_0x3998b2(0x11c)+_0x23fe94);_0x10d900&&console[_0x3998b2(0x125)](_0x3998b2(0x145));}const _0x1d8394=await withSpinner(_0x3998b2(0x231),()=>_0x3a9c1e[_0x3998b2(0x1f2)][_0x3998b2(0x144)]({'projectName':_0x23fe94,'workflowName':_0x27f557,'includeRetried':_0x10d900,'limit':_0x1daf52['limit']}),{'verbose':_0x1daf52['verbose']}),_0x56cd99=_0x1d8394[_0x3998b2(0x193)],_0x5b4ed5=_0x1daf52[_0x3998b2(0x22e)]||0x64,_0x374546=_0x56cd99[_0x3998b2(0x1d0)]>=_0x5b4ed5?a54_0x33d044[_0x3998b2(0x146)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error'](_0x3998b2(0x274)+_0x56cd99[_0x3998b2(0x1d0)]+'\x20attempt'+(_0x56cd99['length']!==0x1?'s':'')+_0x374546);if(_0x1daf52[_0x3998b2(0x1d8)]===_0x3998b2(0x252)||_0x1daf52[_0x3998b2(0x1d8)]===_0x3998b2(0x25f)||_0x1daf52[_0x3998b2(0x1d8)]==='table')await handleSDKOutput(_0x56cd99,_0x1daf52);else{if(_0x56cd99[_0x3998b2(0x1d0)]===0x0){if(_0x23fe94&&_0x27f557)console[_0x3998b2(0x2a7)]('No\x20attempts\x20found\x20for:\x20'+_0x23fe94+'.'+_0x27f557);else _0x23fe94?console[_0x3998b2(0x2a7)](_0x3998b2(0x292)+_0x23fe94):console[_0x3998b2(0x2a7)]('No\x20attempts\x20found');}else{const _0x3a4bb3=_0x1daf52[_0x3998b2(0x283)],_0x54be11=_0x56cd99[_0x3998b2(0x23c)](_0x591dda=>{const _0x334fc8=_0x3998b2,_0x34ecff=a54_0x33d044[_0x334fc8(0x146)]('#'+_0x591dda['id']),_0x3aea51=_0x591dda['project']?.['id'],_0x4bd28d=_0x591dda['session_id']||_0x591dda[_0x334fc8(0x233)],_0x4c54dd=_0x3aea51&&_0x4bd28d?hyperlink(_0x34ecff,getWorkflowAttemptUrl(_0x3a4bb3,_0x3aea51,_0x4bd28d,_0x591dda['id'])):_0x34ecff,{icon:_0x25ed8d,text:_0xca7267}=getAttemptStatusDisplay(_0x591dda),_0x4162bb=(_0x591dda[_0x334fc8(0x104)]?.[_0x334fc8(0x237)]||'?')+'.'+(_0x591dda[_0x334fc8(0x1f2)]?.[_0x334fc8(0x237)]||'?'),_0x380985=_0x591dda[_0x334fc8(0x12a)]?a54_0x33d044[_0x334fc8(0x146)](_0x591dda['sessionTime']):'';return(_0x4c54dd+'\x20'+_0x25ed8d+(_0xca7267?'\x20'+_0xca7267:'')+'\x20'+_0x4162bb+'\x20'+_0x380985)['trimEnd']();});await writeOutput(_0x54be11[_0x3998b2(0x227)]('\x0a'),_0x1daf52[_0x3998b2(0x27e)],_0x3998b2(0x230));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x26c);[a54_0x3dd44c(0x1c0)]='Show\x20specific\x20attempt\x20details';async['execute'](_0x8236f7){const _0x5877cf=a54_0x3dd44c,{options:_0x41f489,args:_0x17bc51,tdx:_0x3021f5}=_0x8236f7,_0x4695de=_0x17bc51[0x0];if(!_0x4695de)return console[_0x5877cf(0x125)](_0x5877cf(0x17a)),0x1;_0x41f489['verbose']&&console[_0x5877cf(0x125)](_0x5877cf(0x1a1)+_0x4695de);const _0x13a293=await withSpinner(_0x5877cf(0x2ac),()=>_0x3021f5['workflow'][_0x5877cf(0x1e7)](_0x4695de),{'verbose':_0x41f489[_0x5877cf(0x1e5)]}),_0x56cf7f=_0x13a293[_0x5877cf(0x193)];let _0x56732d;!_0x56cf7f[_0x5877cf(0x10d)]?_0x56732d=_0x56cf7f[_0x5877cf(0x280)]?_0x5877cf(0x279):_0x5877cf(0x21c):_0x56732d=_0x56cf7f[_0x5877cf(0x1ee)]?'success':_0x5877cf(0x125);let _0x468f6d;if(_0x56cf7f[_0x5877cf(0xe7)]&&_0x56cf7f['finishedAt']){const _0x5002b9=new Date(_0x56cf7f[_0x5877cf(0xe7)])[_0x5877cf(0x1b1)](),_0x5db1bd=new Date(_0x56cf7f[_0x5877cf(0x2a4)])['getTime']();_0x468f6d=Math[_0x5877cf(0x185)]((_0x5db1bd-_0x5002b9)/0x3e8);}const _0x44fefe={'attempt_id':_0x56cf7f['id'],'status':_0x56732d,..._0x56cf7f[_0x5877cf(0x288)]!==undefined&&{'index':_0x56cf7f[_0x5877cf(0x288)]},..._0x56cf7f['project']&&{'project':_0x56cf7f[_0x5877cf(0x104)][_0x5877cf(0x237)]},..._0x56cf7f['workflow']&&{'workflow':_0x56cf7f[_0x5877cf(0x1f2)][_0x5877cf(0x237)]},..._0x56cf7f['sessionId']&&{'session_id':_0x56cf7f['sessionId']},..._0x56cf7f[_0x5877cf(0x12a)]&&{'session_time':_0x56cf7f[_0x5877cf(0x12a)]},..._0x56cf7f[_0x5877cf(0x186)]&&{'retry_attempt':_0x56cf7f['retryAttemptName']},..._0x468f6d!==undefined&&{'duration_sec':_0x468f6d},..._0x56cf7f['createdAt']&&{'created_at':_0x56cf7f['createdAt']},..._0x56cf7f['finishedAt']&&{'finished_at':_0x56cf7f[_0x5877cf(0x2a4)]},...Object['keys'](_0x56cf7f[_0x5877cf(0x20a)])[_0x5877cf(0x1d0)]>0x0&&{'params':_0x56cf7f[_0x5877cf(0x20a)]}};return await handleSingleObjectOutput(_0x44fefe,_0x41f489),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x1f6);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0xe8);async['execute'](_0x56c533){const _0x1d5d53=a54_0x3dd44c,{options:_0xaa34c5,args:_0x9465b,tdx:_0xd7902c}=_0x56c533,_0x1165b2=_0x9465b[0x0];if(!_0x1165b2)return console[_0x1d5d53(0x125)](_0x1d5d53(0x17a)),0x1;const _0x24e96f=_0xaa34c5[_0x1d5d53(0x273)];_0xaa34c5[_0x1d5d53(0x1e5)]&&(console['error'](_0x1d5d53(0x1a1)+_0x1165b2),_0x24e96f&&console['error'](_0x1d5d53(0x1f8)));const _0x25571a=await withSpinner(_0x1d5d53(0x290),()=>_0xd7902c[_0x1d5d53(0x1f2)][_0x1d5d53(0x2a9)](_0x1165b2,_0x24e96f||![]),{'verbose':_0xaa34c5['verbose']}),_0x356e23=_0x25571a[_0x1d5d53(0x193)];return console['error'](_0x1d5d53(0x274)+_0x356e23[_0x1d5d53(0x1d0)]+_0x1d5d53(0x29d)+(_0x356e23[_0x1d5d53(0x1d0)]!==0x1?'s':'')),await handleSDKOutput(_0x356e23,_0xaa34c5),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x1a8);[a54_0x3dd44c(0x1c0)]='Show\x20logs\x20for\x20a\x20workflow\x20attempt';async[a54_0x3dd44c(0x1ff)](_0x309bb9){const _0x167b89=a54_0x3dd44c,{options:_0x24c77a,args:_0x1db6aa,tdx:_0x191044}=_0x309bb9,_0x69adbc=_0x1db6aa[0x0];let _0x3af80c=_0x1db6aa[0x1];if(!_0x69adbc)return console[_0x167b89(0x125)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x24c77a[_0x167b89(0x1e5)]&&(console[_0x167b89(0x125)](_0x167b89(0x1a1)+_0x69adbc),_0x3af80c&&console[_0x167b89(0x125)]('Task\x20name:\x20'+_0x3af80c));const _0x20be60=await withSpinner(_0x167b89(0x256),()=>_0x191044[_0x167b89(0x1f2)][_0x167b89(0x168)](_0x69adbc,_0x3af80c),{'verbose':_0x24c77a[_0x167b89(0x1e5)]}),_0x431164=_0x20be60['data'];if(_0x431164[_0x167b89(0x1d0)]===0x0)return console[_0x167b89(0x125)](_0x167b89(0x155)),0x0;if(!_0x3af80c&&(_0x24c77a[_0x167b89(0x252)]||_0x24c77a[_0x167b89(0x1d8)]))return await handleSDKOutput(_0x431164,_0x24c77a),0x0;if(!_0x3af80c){const _0x2417ef=_0x431164[_0x167b89(0x23c)](_0x4e262e=>({'title':_0x4e262e[_0x167b89(0x26a)]+'\x20('+formatBytes(_0x4e262e[_0x167b89(0x255)])+')','value':_0x4e262e[_0x167b89(0x26a)]})),_0x433456=await a54_0x2596be({'type':'select','name':_0x167b89(0x216),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x2417ef});if(!_0x433456[_0x167b89(0x216)])return console[_0x167b89(0x125)](_0x167b89(0x241)),0x0;_0x3af80c=_0x433456[_0x167b89(0x216)];}const _0x46f9c7=await withSpinner(_0x167b89(0x1cc),()=>_0x191044[_0x167b89(0x1f2)][_0x167b89(0x20c)](_0x69adbc,_0x3af80c),{'verbose':_0x24c77a['verbose']}),_0x29e83d=_0x46f9c7[_0x167b89(0x193)];return _0x29e83d?console[_0x167b89(0x2a7)](_0x29e83d):console[_0x167b89(0x125)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x17c);['description']=a54_0x3dd44c(0x1a4);async['execute'](_0x26ad27){const _0x4cf73f=a54_0x3dd44c,{options:_0x2d2e11,args:_0x4d30f0,tdx:_0x1e0a71}=_0x26ad27,_0x8c9bda=_0x4d30f0[0x0];if(!_0x8c9bda)return console[_0x4cf73f(0x125)](_0x4cf73f(0x17a)),0x1;const _0x14e1bc=_0x2d2e11[_0x4cf73f(0x282)];_0x2d2e11[_0x4cf73f(0x1e5)]&&(console['error'](_0x4cf73f(0x1a1)+_0x8c9bda),_0x14e1bc&&console[_0x4cf73f(0x125)](_0x4cf73f(0x19c)+_0x14e1bc));if(!_0x2d2e11[_0x4cf73f(0x202)]){if(!isInteractive())return console[_0x4cf73f(0x125)](a54_0x33d044[_0x4cf73f(0xf6)]('\x0aError:'),_0x4cf73f(0x103)),console[_0x4cf73f(0x125)](a54_0x33d044[_0x4cf73f(0x146)](_0x4cf73f(0x1c2))),0x1;const _0x38f422=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x8c9bda+'?');if(!_0x38f422)return console[_0x4cf73f(0x125)](a54_0x33d044[_0x4cf73f(0x114)](_0x4cf73f(0x241))),0x1;}const _0x5270cf=await withSpinner(_0x4cf73f(0x166),()=>_0x1e0a71[_0x4cf73f(0x1f2)][_0x4cf73f(0x23b)](_0x8c9bda,_0x14e1bc),{'verbose':_0x2d2e11[_0x4cf73f(0x1e5)]}),_0x5da078=_0x5270cf['data'];return console[_0x4cf73f(0x125)]('✔\x20'+_0x5da078),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']='workflow:retry';['description']='Retry\x20a\x20session\x20or\x20attempt';async[a54_0x3dd44c(0x1ff)](_0x523019){const _0x1fa77f=a54_0x3dd44c,{options:_0x113c76,args:_0x6d433d,tdx:_0x1319dd}=_0x523019,_0x38a627=_0x6d433d[0x0];if(!_0x38a627)return console['error'](_0x1fa77f(0x1c5)),console[_0x1fa77f(0x125)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x2e64fc=![],_0x24a670=_0x38a627;if(_0x38a627['startsWith'](_0x1fa77f(0x275)))_0x2e64fc=!![],_0x24a670=_0x38a627['substring'](0x8);else{if(_0x38a627[_0x1fa77f(0x223)]('attempt:'))_0x2e64fc=![],_0x24a670=_0x38a627['substring'](0x8);else return console[_0x1fa77f(0x125)](_0x1fa77f(0x18f)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x130eeb=_0x113c76[_0x1fa77f(0x134)],_0x298ca2=_0x113c76[_0x1fa77f(0x181)],_0x3108b8=_0x113c76[_0x1fa77f(0x20a)],_0x4e55ce=_0x113c76['force'];_0x113c76[_0x1fa77f(0x1e5)]&&(console['error']('Target:\x20'+(_0x2e64fc?_0x1fa77f(0x25c):_0x1fa77f(0x1e7))+'\x20'+_0x24a670),_0x130eeb&&console[_0x1fa77f(0x125)](_0x1fa77f(0x110)+_0x130eeb),_0x298ca2&&console[_0x1fa77f(0x125)](_0x1fa77f(0xea)+_0x298ca2),_0x3108b8&&console[_0x1fa77f(0x125)]('Params:\x20'+_0x3108b8),_0x4e55ce&&console[_0x1fa77f(0x125)]('Force:\x20yes'));let _0x2f6a09;if(_0x3108b8)try{if(_0x3108b8['startsWith']('@')){const _0x56296b=await import(_0x1fa77f(0x29f)),_0x5f1f5a=_0x3108b8[_0x1fa77f(0x1f7)](0x1),_0x249353=await _0x56296b[_0x1fa77f(0x270)](_0x5f1f5a,'utf-8');_0x2f6a09=JSON[_0x1fa77f(0x21e)](_0x249353);}else _0x2f6a09=JSON[_0x1fa77f(0x21e)](_0x3108b8);}catch{return console[_0x1fa77f(0x125)](_0x1fa77f(0x226)),0x1;}if(!_0x113c76[_0x1fa77f(0x202)]){if(!isInteractive())return console[_0x1fa77f(0x125)](a54_0x33d044[_0x1fa77f(0xf6)]('\x0aError:'),_0x1fa77f(0x103)),console[_0x1fa77f(0x125)](a54_0x33d044[_0x1fa77f(0x146)](_0x1fa77f(0x1c2))),0x1;const _0x31a341=await confirmKey(_0x1fa77f(0x161)+(_0x2e64fc?'session':_0x1fa77f(0x1e7))+'\x20'+_0x24a670+'?');if(!_0x31a341)return console[_0x1fa77f(0x125)](a54_0x33d044[_0x1fa77f(0x114)](_0x1fa77f(0x241))),0x1;}let _0x5ea892;_0x2e64fc?_0x5ea892=await withSpinner('Retrying\x20session...',()=>_0x1319dd[_0x1fa77f(0x1f2)][_0x1fa77f(0x190)](_0x24a670,{'fromTask':_0x130eeb,'retryParams':_0x2f6a09}),{'verbose':_0x113c76[_0x1fa77f(0x1e5)]}):_0x5ea892=await withSpinner(_0x1fa77f(0xe0),()=>_0x1319dd[_0x1fa77f(0x1f2)][_0x1fa77f(0x244)](_0x24a670,{'resumeFrom':_0x298ca2,'retryParams':_0x2f6a09,'force':_0x4e55ce}),{'verbose':_0x113c76[_0x1fa77f(0x1e5)]});const _0x3b8a2a=_0x5ea892[_0x1fa77f(0x193)];return console[_0x1fa77f(0x125)](_0x1fa77f(0x234)),console[_0x1fa77f(0x125)](_0x1fa77f(0x212)+_0x3b8a2a[_0x1fa77f(0x18a)]),console[_0x1fa77f(0x125)](_0x1fa77f(0x266)+_0x3b8a2a[_0x1fa77f(0x233)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x281);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x207);async[a54_0x3dd44c(0x1ff)](_0x10367b){const _0x5d5e25=a54_0x3dd44c,{options:_0x15190f,args:_0x36ef6d,tdx:_0x18b880}=_0x10367b;let _0x29642a=_0x36ef6d[0x0];if(!_0x29642a){const _0x2d7ac2=this[_0x5d5e25(0x25a)]([],_0x15190f),_0x2f0ead=await withSpinner(_0x5d5e25(0x27f),()=>_0x18b880[_0x5d5e25(0x1f2)]['workflows'](_0x2d7ac2,{'limit':_0x15190f[_0x5d5e25(0x22e)]}),{'verbose':_0x15190f[_0x5d5e25(0x1e5)]}),_0x1586b8=_0x2f0ead[_0x5d5e25(0x193)];if(_0x1586b8[_0x5d5e25(0x1d0)]===0x0)return console['error'](_0x5d5e25(0x249)),!_0x2d7ac2&&console[_0x5d5e25(0x125)](a54_0x33d044[_0x5d5e25(0x146)](_0x5d5e25(0x257))),0x1;const _0x4b7643=_0x1586b8[_0x5d5e25(0x23c)](_0x552f51=>({'title':_0x552f51[_0x5d5e25(0x104)]?.[_0x5d5e25(0x237)]+'.'+_0x552f51[_0x5d5e25(0x237)],'value':_0x552f51[_0x5d5e25(0x104)]?.[_0x5d5e25(0x237)]+'.'+_0x552f51[_0x5d5e25(0x237)],'description':_0x552f51[_0x5d5e25(0x149)]?_0x5d5e25(0x176)+_0x552f51['revision']:undefined})),_0x5dd432=await a54_0x2596be({'type':_0x5d5e25(0x199),'name':'workflow','message':_0x5d5e25(0x1b7),'choices':_0x4b7643});if(!_0x5dd432[_0x5d5e25(0x1f2)])return 0x1;_0x29642a=_0x5dd432[_0x5d5e25(0x1f2)];}if(!_0x29642a[_0x5d5e25(0xfa)]('.')){const _0x20f07e=this[_0x5d5e25(0x25a)]([],_0x15190f);if(_0x20f07e)_0x29642a=_0x20f07e+'.'+_0x29642a;else return console['error'](a54_0x33d044['red'](_0x5d5e25(0x1ab)),_0x5d5e25(0xe9)),console[_0x5d5e25(0x125)](a54_0x33d044['dim'](_0x5d5e25(0x257))),0x1;}const _0x19082e=_0x15190f[_0x5d5e25(0x1cb)],_0x4dd70e=_0x15190f[_0x5d5e25(0x12a)],_0x2d6534={};if(_0x19082e&&Array[_0x5d5e25(0xeb)](_0x19082e))for(const _0x164a11 of _0x19082e){const _0x3f667e=_0x164a11[_0x5d5e25(0x277)]('=');if(_0x3f667e===-0x1)return console[_0x5d5e25(0x125)](_0x5d5e25(0x113)+_0x164a11),console[_0x5d5e25(0x125)](_0x5d5e25(0x175)),0x1;const _0x458844=_0x164a11['substring'](0x0,_0x3f667e),_0x1ab315=_0x164a11[_0x5d5e25(0x1f7)](_0x3f667e+0x1);try{_0x2d6534[_0x458844]=JSON[_0x5d5e25(0x21e)](_0x1ab315);}catch{_0x2d6534[_0x458844]=_0x1ab315;}}_0x15190f[_0x5d5e25(0x1e5)]&&(console[_0x5d5e25(0x125)](_0x5d5e25(0x1f1)+_0x29642a),Object[_0x5d5e25(0x2a2)](_0x2d6534)[_0x5d5e25(0x1d0)]>0x0&&console['error'](_0x5d5e25(0x259)+JSON[_0x5d5e25(0xff)](_0x2d6534)),_0x4dd70e&&console[_0x5d5e25(0x125)](_0x5d5e25(0xf0)+_0x4dd70e));if(_0x15190f[_0x5d5e25(0x2a3)])return await this[_0x5d5e25(0x15f)](_0x10367b,_0x29642a,_0x2d6534,_0x4dd70e);const _0x4c32d4=await withSpinner(_0x5d5e25(0x147),()=>_0x18b880[_0x5d5e25(0x1f2)][_0x5d5e25(0x165)](_0x29642a,_0x2d6534,{'sessionTime':_0x4dd70e}),{'verbose':_0x15190f[_0x5d5e25(0x1e5)]}),_0x13b4a9=_0x4c32d4[_0x5d5e25(0x193)];console[_0x5d5e25(0x125)](_0x5d5e25(0x28b)),console[_0x5d5e25(0x125)](_0x5d5e25(0x112)+_0x13b4a9['id']),console[_0x5d5e25(0x125)](_0x5d5e25(0x266)+_0x13b4a9[_0x5d5e25(0x233)]),console[_0x5d5e25(0x125)]('\x20\x20Project:\x20'+_0x13b4a9[_0x5d5e25(0x104)]?.['name']),console[_0x5d5e25(0x125)](_0x5d5e25(0x242)+_0x13b4a9[_0x5d5e25(0x1f2)]?.[_0x5d5e25(0x237)]);if(_0x13b4a9[_0x5d5e25(0x104)]?.['id']&&_0x13b4a9[_0x5d5e25(0x233)]&&_0x13b4a9['id']){const _0x55962f=_0x15190f[_0x5d5e25(0x283)],_0x440609=getConsoleUrl(_0x55962f,'/app/workflows/'+_0x13b4a9['project']['id']+'/sessions/'+_0x13b4a9[_0x5d5e25(0x233)]+_0x5d5e25(0x1d4)+_0x13b4a9['id']);console['error'](_0x5d5e25(0x205)+a54_0x33d044[_0x5d5e25(0x210)](_0x440609));}return 0x0;}async[a54_0x3dd44c(0x15f)](_0x147533,_0x34d52b,_0x57690f,_0x32b646){const _0xb08b4c=a54_0x3dd44c,{options:_0x166ef5,tdx:_0x6aca5b}=_0x147533,_0x26ec87=await withSpinner(_0xb08b4c(0x179)+_0x34d52b+_0xb08b4c(0x123),()=>_0x6aca5b[_0xb08b4c(0x1f2)][_0xb08b4c(0x245)](_0x34d52b),{'verbose':_0x166ef5['verbose']}),_0x43e82d=_0x26ec87[_0xb08b4c(0x193)],_0x2d3dff=_0x32b646??new Date()[_0xb08b4c(0x1b2)]();console[_0xb08b4c(0x2a7)](a54_0x33d044['bold'](_0xb08b4c(0x187)),_0x34d52b),console[_0xb08b4c(0x2a7)](a54_0x33d044['bold']('Session\x20time:'),_0x2d3dff),console['log'](a54_0x33d044['bold'](_0xb08b4c(0x1bd)),JSON[_0xb08b4c(0xff)](_0x57690f)),console[_0xb08b4c(0x2a7)](''),console[_0xb08b4c(0x2a7)](a54_0x33d044[_0xb08b4c(0x15d)](_0xb08b4c(0x102)));const _0x481393=parseTaskGraph(_0x43e82d[_0xb08b4c(0x27c)]??null);if(_0x481393[_0xb08b4c(0x1d0)]===0x0)console[_0xb08b4c(0x2a7)](a54_0x33d044['dim']('\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)'));else for(const _0x4e909e of formatTaskGraph(_0x481393)){console[_0xb08b4c(0x2a7)](_0x4e909e);}const _0x1d8a1d=summarizeTaskGraph(_0x481393),_0xd7e87f=formatWarningSummary(_0x1d8a1d);return _0xd7e87f&&(console[_0xb08b4c(0x2a7)](''),console[_0xb08b4c(0x2a7)](a54_0x33d044[_0xb08b4c(0x114)](_0xd7e87f))),console['log'](a54_0x33d044[_0xb08b4c(0x114)](_0xb08b4c(0x1dd))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a54_0x3dd44c(0xfe);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x221);async[a54_0x3dd44c(0x1ff)](_0x2e8317){const _0xf383dc=a54_0x3dd44c,{options:_0x12abcc,args:_0x406eaa,tdx:_0x28d222}=_0x2e8317,_0x1bbdb4=_0x406eaa[0x0],_0x46721a=_0x406eaa[0x1]||'.';if(!_0x1bbdb4)return console['error'](_0xf383dc(0x28a)),console[_0xf383dc(0x125)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x5874da=_0x12abcc[_0xf383dc(0x149)];_0x12abcc[_0xf383dc(0x1e5)]&&(console[_0xf383dc(0x125)](_0xf383dc(0x118)+_0x1bbdb4),console[_0xf383dc(0x125)](_0xf383dc(0x136)+_0x46721a),_0x5874da&&console[_0xf383dc(0x125)](_0xf383dc(0x1ac)+_0x5874da));const _0x5b976e=await withSpinner('Downloading\x20project\x20'+_0x1bbdb4+_0xf383dc(0x123),()=>_0x28d222['workflow']['download'](_0x1bbdb4,_0x46721a,{'revision':_0x5874da}),{'verbose':_0x12abcc['verbose']}),_0x4fe055=_0x5b976e[_0xf383dc(0x193)];return console[_0xf383dc(0x125)](_0xf383dc(0x215)+_0x4fe055[_0xf383dc(0x139)]),console[_0xf383dc(0x125)](_0xf383dc(0x1db)+_0x4fe055[_0xf383dc(0x149)]),console[_0xf383dc(0x125)]('\x20\x20Files\x20extracted:\x20'+_0x4fe055[_0xf383dc(0x18c)]),console[_0xf383dc(0x125)](_0xf383dc(0x18b)+_0x46721a+'/'+_0x4fe055[_0xf383dc(0x139)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x171);[a54_0x3dd44c(0x1c0)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a54_0x3dd44c(0x1ff)](_0x313e81){const _0x8375fd=a54_0x3dd44c,{options:_0x502016,args:_0x5798a4,tdx:_0x437cd8}=_0x313e81;let _0x1622b4='.',_0x1f5508=_0x502016[_0x8375fd(0x237)];if(_0x5798a4[0x0]){const {promises:_0x4ff98e}=await import('fs');try{const _0x4f5c39=await _0x4ff98e[_0x8375fd(0x232)](_0x5798a4[0x0]);if(_0x4f5c39[_0x8375fd(0x159)]())_0x1622b4=_0x5798a4[0x0];else return console['error'](_0x8375fd(0x18d)+_0x5798a4[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x1f5508=_0x5798a4[0x0],_0x1622b4='.';}}const _0x37682b=_0x502016[_0x8375fd(0x149)],_0x569e70=_0x502016[_0x8375fd(0x19b)];_0x502016[_0x8375fd(0x1e5)]&&(console['error']('Project\x20directory:\x20'+_0x1622b4),_0x1f5508&&console[_0x8375fd(0x125)](_0x8375fd(0x13c)+_0x1f5508),_0x37682b&&console['error'](_0x8375fd(0x1ac)+_0x37682b),_0x569e70&&console[_0x8375fd(0x125)](_0x8375fd(0x191)));const _0x236599=await withSpinner(_0x8375fd(0x261),()=>_0x437cd8['workflow']['push'](_0x1622b4,{'projectName':_0x1f5508,'revision':_0x37682b,'skipValidation':_0x569e70}),{'verbose':_0x502016[_0x8375fd(0x1e5)]}),_0x2c3038=_0x236599[_0x8375fd(0x193)];return console[_0x8375fd(0x125)](_0x8375fd(0x16b)+_0x2c3038[_0x8375fd(0x139)]),console[_0x8375fd(0x125)](_0x8375fd(0x169)+_0x2c3038[_0x8375fd(0x1be)]),console[_0x8375fd(0x125)]('\x20\x20Revision:\x20'+_0x2c3038[_0x8375fd(0x149)]),await this['showWorkflowConsoleUrl'](_0x437cd8,_0x2c3038[_0x8375fd(0x139)],_0x502016['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a54_0x3dd44c(0x1a7);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0xde);async[a54_0x3dd44c(0x1ff)](_0x16d09c){const _0x559cdf=a54_0x3dd44c,{options:_0x2f4acd,args:_0x524c61,tdx:_0x462097}=_0x16d09c,_0x2cd6cf=_0x524c61[0x0],_0x4dfa0d=_0x524c61[0x1];if(!_0x2cd6cf)return console[_0x559cdf(0x125)](a54_0x33d044[_0x559cdf(0xf6)]('Error:'),_0x559cdf(0x1bc)),console[_0x559cdf(0x125)](a54_0x33d044[_0x559cdf(0x146)](_0x559cdf(0x204))),0x1;const _0x107711=_0x2f4acd[_0x559cdf(0x149)];_0x2f4acd[_0x559cdf(0x1e5)]&&(console[_0x559cdf(0x125)](_0x559cdf(0x118)+_0x2cd6cf),_0x4dfa0d&&console[_0x559cdf(0x125)](_0x559cdf(0x152)+_0x4dfa0d),_0x107711&&console[_0x559cdf(0x125)]('Revision:\x20'+_0x107711),_0x2f4acd[_0x559cdf(0x2a3)]&&console[_0x559cdf(0x125)](_0x559cdf(0x14c)));const _0x29aedc=await withSpinner(_0x559cdf(0x2a1)+_0x2cd6cf+_0x559cdf(0x123),()=>_0x462097[_0x559cdf(0x1f2)]['pullProject'](_0x2cd6cf,{'targetDir':_0x4dfa0d,'revision':_0x107711}),{'verbose':_0x2f4acd[_0x559cdf(0x1e5)]}),_0x492df3=_0x29aedc[_0x559cdf(0x193)];_0x492df3[_0x559cdf(0x160)]?console['error'](_0x559cdf(0x294)+_0x492df3[_0x559cdf(0x139)]):console[_0x559cdf(0x125)](_0x559cdf(0x1e9)+_0x492df3[_0x559cdf(0x139)]);console[_0x559cdf(0x125)](_0x559cdf(0x1db)+_0x492df3[_0x559cdf(0x149)]),console[_0x559cdf(0x125)](_0x559cdf(0x10f)+(a54_0x3af23b[_0x559cdf(0x21d)](process[_0x559cdf(0x2a0)](),_0x492df3[_0x559cdf(0x298)])||'.')),console['error'](_0x559cdf(0x13a)+a54_0x33d044[_0x559cdf(0xfd)]('+'+_0x492df3[_0x559cdf(0x2aa)][_0x559cdf(0x20f)]+'\x20new')+',\x20'+(a54_0x33d044[_0x559cdf(0x114)]('~'+_0x492df3[_0x559cdf(0x2aa)]['modified']+_0x559cdf(0x1b6))+',\x20')+(a54_0x33d044[_0x559cdf(0xf6)]('-'+_0x492df3['summary'][_0x559cdf(0x19e)]+'\x20deleted')+',\x20')+(''+a54_0x33d044[_0x559cdf(0x146)](_0x492df3['summary']['unchanged']+'\x20unchanged')));for(const _0x56e977 of _0x492df3[_0x559cdf(0x25e)]){_0x56e977[_0x559cdf(0x220)]===_0x559cdf(0x267)&&_0x56e977['diff']&&(console[_0x559cdf(0x125)]('\x0a'+a54_0x33d044['cyan']('---\x20'+_0x56e977['path'])),console[_0x559cdf(0x125)](_0x56e977[_0x559cdf(0x28c)]));}if(!_0x492df3[_0x559cdf(0x219)])return saveSessionContext({'workflow_project':_0x492df3['projectName']},_0x2f4acd[_0x559cdf(0x25c)]),console['error'](a54_0x33d044[_0x559cdf(0xfd)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0x559cdf(0x125)](a54_0x33d044['dim'](_0x559cdf(0x137)+_0x492df3['projectName'])),0x0;if(_0x2f4acd[_0x559cdf(0x2a3)])return console[_0x559cdf(0x125)](a54_0x33d044['yellow'](_0x559cdf(0x15e))),0x0;if(!_0x2f4acd['yes']){if(!isInteractive())return console[_0x559cdf(0x125)](a54_0x33d044[_0x559cdf(0xf6)]('\x0aError:'),_0x559cdf(0x103)),console['error'](a54_0x33d044[_0x559cdf(0x146)](_0x559cdf(0x1c2))),0x1;const _0x37120f=await confirmKey(_0x559cdf(0x2af));if(!_0x37120f)return console['error'](a54_0x33d044[_0x559cdf(0x114)](_0x559cdf(0x241)),_0x559cdf(0x26f)),0x1;}await withSpinner(_0x559cdf(0x28e),()=>_0x462097['workflow'][_0x559cdf(0x17e)](_0x492df3,{'revision':_0x107711}),{'verbose':_0x2f4acd[_0x559cdf(0x1e5)]}),saveSessionContext({'workflow_project':_0x492df3[_0x559cdf(0x139)]},_0x2f4acd[_0x559cdf(0x25c)]),console[_0x559cdf(0x125)](a54_0x33d044[_0x559cdf(0xfd)](_0x559cdf(0x1c1)));const _0x921dda=a54_0x3af23b['relative'](process['cwd'](),_0x492df3['targetDir'])||'.';return console['error'](a54_0x33d044[_0x559cdf(0x146)]('\x20\x20Location:\x20'+_0x921dda)),console['error'](a54_0x33d044[_0x559cdf(0x146)](_0x559cdf(0x137)+_0x492df3[_0x559cdf(0x139)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x1c7);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x180);async[a54_0x3dd44c(0x1ff)](_0x1b45d2){const _0x1525d3=a54_0x3dd44c,{options:_0x268efb,args:_0x1b0e08,tdx:_0xfe5132}=_0x1b45d2,_0x791d9b=this[_0x1525d3(0x1f3)](_0x1b0e08,_0x268efb),_0x1b3d6a=_0x268efb[_0x1525d3(0x149)],_0x165d57=_0x268efb[_0x1525d3(0x19b)];_0x268efb['verbose']&&(_0x791d9b&&console[_0x1525d3(0x125)]('Source\x20directory:\x20'+_0x791d9b),_0x1b3d6a&&console['error']('Revision:\x20'+_0x1b3d6a),_0x268efb[_0x1525d3(0x2a3)]&&console[_0x1525d3(0x125)](_0x1525d3(0x14c)),_0x165d57&&console['error'](_0x1525d3(0x191)));let _0x3d95fd;try{_0x3d95fd=await withSpinner(_0x1525d3(0x162),()=>_0xfe5132[_0x1525d3(0x1f2)][_0x1525d3(0x248)]({'sourceDir':_0x791d9b,'revision':_0x1b3d6a,'skipValidation':_0x165d57}),{'verbose':_0x268efb[_0x1525d3(0x1e5)]});}catch(_0x508a84){if(_0x508a84 instanceof Error&&_0x508a84[_0x1525d3(0x1eb)]['includes'](_0x1525d3(0x296)))return console['error'](a54_0x33d044[_0x1525d3(0xf6)]('Error:'),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x268efb[_0x1525d3(0x1d5)]?console['error'](a54_0x33d044[_0x1525d3(0x146)](_0x1525d3(0xf5)+_0x268efb[_0x1525d3(0x1d5)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0x268efb[_0x1525d3(0x1d5)]+'\x27')):console['error'](a54_0x33d044['dim']('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x508a84;}const _0xa8e4a9=_0x3d95fd[_0x1525d3(0x193)];console[_0x1525d3(0x125)](_0x1525d3(0x284)+_0xa8e4a9[_0x1525d3(0x139)]),console[_0x1525d3(0x125)](_0x1525d3(0x156)+_0xa8e4a9['sourceDir']),console[_0x1525d3(0x125)](_0x1525d3(0x1db)+_0xa8e4a9['revision']),console[_0x1525d3(0x125)](_0x1525d3(0x13a)+a54_0x33d044[_0x1525d3(0xfd)]('+'+_0xa8e4a9[_0x1525d3(0x2aa)]['new']+_0x1525d3(0x154))+',\x20'+(a54_0x33d044[_0x1525d3(0x114)]('~'+_0xa8e4a9[_0x1525d3(0x2aa)][_0x1525d3(0x267)]+_0x1525d3(0x1b6))+',\x20')+(a54_0x33d044['red']('-'+_0xa8e4a9[_0x1525d3(0x2aa)][_0x1525d3(0x19e)]+_0x1525d3(0x299))+',\x20')+(''+a54_0x33d044[_0x1525d3(0x146)](_0xa8e4a9['summary'][_0x1525d3(0xe3)]+_0x1525d3(0x1ba))));for(const _0xbb29ad of _0xa8e4a9[_0x1525d3(0x25e)]){_0xbb29ad['type']===_0x1525d3(0x267)&&_0xbb29ad[_0x1525d3(0x28c)]&&(console[_0x1525d3(0x125)]('\x0a'+a54_0x33d044[_0x1525d3(0x210)](_0x1525d3(0x222)+_0xbb29ad['path'])),console[_0x1525d3(0x125)](_0xbb29ad['diff']));}if(!_0xa8e4a9[_0x1525d3(0x219)])return console[_0x1525d3(0x125)](a54_0x33d044['green'](_0x1525d3(0x184))),await this['showWorkflowConsoleUrl'](_0xfe5132,_0xa8e4a9[_0x1525d3(0x139)],_0x268efb[_0x1525d3(0x283)]),0x0;if(_0x268efb[_0x1525d3(0x2a3)])return console['error'](a54_0x33d044[_0x1525d3(0x114)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x268efb[_0x1525d3(0x202)]){if(!isInteractive())return console[_0x1525d3(0x125)](a54_0x33d044[_0x1525d3(0xf6)](_0x1525d3(0x278)),_0x1525d3(0x103)),console[_0x1525d3(0x125)](a54_0x33d044[_0x1525d3(0x146)](_0x1525d3(0x1c2))),0x1;const _0x4ca541=await confirmKey(_0x1525d3(0x106));if(!_0x4ca541)return console['error'](a54_0x33d044['yellow'](_0x1525d3(0x241)),_0x1525d3(0x19a)),0x1;}const _0x42d5ec=await withSpinner(_0x1525d3(0x2ab),()=>_0xfe5132[_0x1525d3(0x1f2)][_0x1525d3(0x240)](_0xa8e4a9),{'verbose':_0x268efb['verbose']}),_0x2702b7=_0x42d5ec[_0x1525d3(0x193)];return console[_0x1525d3(0x125)](a54_0x33d044['green'](_0x1525d3(0x17f))),console[_0x1525d3(0x125)]('\x20\x20Project\x20ID:\x20'+_0x2702b7[_0x1525d3(0x1be)]),console[_0x1525d3(0x125)]('\x20\x20Revision:\x20'+_0x2702b7[_0x1525d3(0x149)]),await this['showWorkflowConsoleUrl'](_0xfe5132,_0x2702b7[_0x1525d3(0x139)],_0x268efb[_0x1525d3(0x283)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x254);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x120);async[a54_0x3dd44c(0x1ff)](_0xd7b540){const _0x41e8ca=a54_0x3dd44c,{options:_0x65ed80,args:_0x3352ba,tdx:_0x5a76f4}=_0xd7b540,_0x1f6bf5=this[_0x41e8ca(0x1f3)](_0x3352ba,_0x65ed80),_0x57d98d=_0x65ed80[_0x41e8ca(0x237)],_0x2b3e84=_0x65ed80[_0x41e8ca(0x149)],_0xfc5d1b=_0x65ed80[_0x41e8ca(0x19b)];if(!_0x1f6bf5)return console[_0x41e8ca(0x125)](a54_0x33d044[_0x41e8ca(0xf6)](_0x41e8ca(0x1ab)),_0x41e8ca(0x1fc)),console[_0x41e8ca(0x125)](a54_0x33d044[_0x41e8ca(0x146)](_0x41e8ca(0x1e3))),console[_0x41e8ca(0x125)](a54_0x33d044['dim'](_0x41e8ca(0x24b))),0x1;if(!_0x57d98d)return console[_0x41e8ca(0x125)](a54_0x33d044['red'](_0x41e8ca(0x1ab)),_0x41e8ca(0x177)),console[_0x41e8ca(0x125)](a54_0x33d044['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x65ed80[_0x41e8ca(0x1e5)]&&(console['error'](_0x41e8ca(0x158)+_0x1f6bf5),console[_0x41e8ca(0x125)](_0x41e8ca(0x11a)+_0x57d98d),_0x2b3e84&&console['error'](_0x41e8ca(0x1ac)+_0x2b3e84),_0x65ed80[_0x41e8ca(0x2a3)]&&console[_0x41e8ca(0x125)](_0x41e8ca(0x14c)),_0xfc5d1b&&console[_0x41e8ca(0x125)](_0x41e8ca(0x191)));const _0x1892a3=await withSpinner(_0x41e8ca(0x126),()=>_0x5a76f4['workflow']['prepareCloneProject'](_0x1f6bf5,_0x57d98d,{'revision':_0x2b3e84,'skipValidation':_0xfc5d1b}),{'verbose':_0x65ed80[_0x41e8ca(0x1e5)]}),_0x3edafe=_0x1892a3[_0x41e8ca(0x193)];console[_0x41e8ca(0x125)]('Source:\x20'+_0x3edafe[_0x41e8ca(0xf1)]);_0x3edafe[_0x41e8ca(0x25b)]&&console['error'](_0x41e8ca(0x15c)+_0x3edafe[_0x41e8ca(0x25b)]);console[_0x41e8ca(0x125)](_0x41e8ca(0x11a)+_0x3edafe[_0x41e8ca(0x12e)]),console[_0x41e8ca(0x125)](_0x41e8ca(0x1ac)+_0x3edafe[_0x41e8ca(0x149)]),console[_0x41e8ca(0x125)]('Files\x20to\x20upload:\x20'+_0x3edafe[_0x41e8ca(0x164)]);_0x3edafe[_0x41e8ca(0xdc)]&&(console['error'](a54_0x33d044[_0x41e8ca(0x114)](_0x41e8ca(0x12f)+_0x3edafe[_0x41e8ca(0x12e)]+_0x41e8ca(0x289)+_0x3edafe['existingProjectId']+')')),console['error'](a54_0x33d044[_0x41e8ca(0x114)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x65ed80['dryRun'])return console[_0x41e8ca(0x125)](a54_0x33d044[_0x41e8ca(0x114)](_0x41e8ca(0xf3))),0x0;if(!_0x65ed80['yes']){if(!isInteractive())return console[_0x41e8ca(0x125)](a54_0x33d044['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a54_0x33d044[_0x41e8ca(0x146)](_0x41e8ca(0x1c2))),0x1;const _0x494347=_0x3edafe[_0x41e8ca(0x25b)]||a54_0x3af23b[_0x41e8ca(0x262)](_0x1f6bf5),_0x59d79f=_0x3edafe['targetExists']?_0x41e8ca(0xed)+_0x57d98d+'\x22\x20with\x20new\x20revision?':_0x41e8ca(0x174)+_0x494347+'\x22\x20to\x20new\x20project\x20\x22'+_0x57d98d+'\x22?',_0x13f19b=await confirmKey(_0x59d79f);if(!_0x13f19b)return console[_0x41e8ca(0x125)](a54_0x33d044[_0x41e8ca(0x114)](_0x41e8ca(0x241))),0x1;}const _0x10dc76=await withSpinner(_0x3edafe['targetExists']?_0x41e8ca(0x128)+_0x57d98d+_0x41e8ca(0x123):_0x41e8ca(0x119)+_0x57d98d+_0x41e8ca(0x123),()=>_0x5a76f4['workflow'][_0x41e8ca(0x197)](_0x3edafe),{'verbose':_0x65ed80[_0x41e8ca(0x1e5)]}),_0x44bb41=_0x10dc76[_0x41e8ca(0x193)];return console[_0x41e8ca(0x125)](a54_0x33d044[_0x41e8ca(0xfd)](_0x3edafe[_0x41e8ca(0xdc)]?'✔\x20Project\x20updated':_0x41e8ca(0x18e))),console[_0x41e8ca(0x125)]('\x20\x20Project:\x20'+_0x44bb41[_0x41e8ca(0x12e)]),console[_0x41e8ca(0x125)](_0x41e8ca(0x169)+_0x44bb41[_0x41e8ca(0x229)]),console['error'](_0x41e8ca(0x1db)+_0x44bb41[_0x41e8ca(0x149)]),await this[_0x41e8ca(0x1aa)](_0x5a76f4,_0x44bb41[_0x41e8ca(0x12e)],_0x65ed80[_0x41e8ca(0x283)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x208);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x157);async[a54_0x3dd44c(0x1ff)](_0x44c52d){const _0xaae390=a54_0x3dd44c,{options:_0x22b00e,args:_0x460ed6,tdx:_0x5e6520}=_0x44c52d,_0x39f0af=_0x460ed6[0x0];if(!_0x39f0af)return console[_0xaae390(0x125)](_0xaae390(0x1d1)),console['error'](_0xaae390(0x109)),0x1;_0x22b00e[_0xaae390(0x1e5)]&&console[_0xaae390(0x125)](_0xaae390(0x118)+_0x39f0af);if(!_0x22b00e[_0xaae390(0x202)]){if(!isInteractive())return console[_0xaae390(0x125)](a54_0x33d044[_0xaae390(0xf6)](_0xaae390(0x278)),_0xaae390(0x103)),console[_0xaae390(0x125)](a54_0x33d044[_0xaae390(0x146)](_0xaae390(0x1c2))),0x1;const _0x955dd3=await confirmKey(_0xaae390(0x1d7)+_0x39f0af+_0xaae390(0x1b0));if(!_0x955dd3)return console[_0xaae390(0x125)](a54_0x33d044['yellow'](_0xaae390(0x241))),0x1;}const _0xcfe6b7=await withSpinner(_0xaae390(0x22b)+_0x39f0af+'...',()=>_0x5e6520['workflow'][_0xaae390(0x148)](_0x39f0af),{'verbose':_0x22b00e[_0xaae390(0x1e5)]}),_0x227ec4=_0xcfe6b7[_0xaae390(0x193)];return console[_0xaae390(0x125)](_0xaae390(0x1f9)+_0x227ec4['projectName']),console[_0xaae390(0x125)](_0xaae390(0x169)+_0x227ec4[_0xaae390(0x1be)]),0x0;}}export function parseKeyValue(_0x14443c){const _0x11d4d1=a54_0x3dd44c,_0x3f386b=_0x14443c['indexOf']('=');if(_0x3f386b===-0x1)throw new Error(_0x11d4d1(0x1b9)+_0x14443c+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x494701=_0x14443c[_0x11d4d1(0x1f7)](0x0,_0x3f386b),_0xe87e77=_0x14443c[_0x11d4d1(0x1f7)](_0x3f386b+0x1);if(!_0x494701)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x494701,'value':_0xe87e77};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a54_0x3dd44c(0x203);['description']=a54_0x3dd44c(0x268);async[a54_0x3dd44c(0x1ff)](_0x443afb){const _0x48086f=a54_0x3dd44c,{options:_0x31df5b,args:_0x5e9d8f,tdx:_0x6225b6}=_0x443afb,_0x3e673c=this['requireProject'](_0x5e9d8f,_0x31df5b);if(!_0x3e673c)return 0x1;_0x31df5b['verbose']&&console[_0x48086f(0x125)](_0x48086f(0x118)+_0x3e673c);const _0xbf0919=await withSpinner('Listing\x20secrets...',()=>_0x6225b6[_0x48086f(0x1f2)]['listSecrets'](_0x3e673c),{'verbose':_0x31df5b[_0x48086f(0x1e5)]}),{secrets:_0x2a868a}=_0xbf0919[_0x48086f(0x193)];return console[_0x48086f(0x125)](_0x48086f(0x274)+_0x2a868a[_0x48086f(0x1d0)]+_0x48086f(0x14f)+(_0x2a868a[_0x48086f(0x1d0)]!==0x1?'s':'')),await handleSDKOutput(_0x2a868a,_0x31df5b),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a54_0x3dd44c(0x27b);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x1c9);async[a54_0x3dd44c(0x1ff)](_0x3a9940){const _0x13690c=a54_0x3dd44c,{options:_0x2e16ff,args:_0x40be68,tdx:_0x488037}=_0x3a9940;let _0x135ad2,_0x44a4b9;if(_0x40be68[_0x13690c(0x1d0)]>=0x1&&!_0x40be68[0x0][_0x13690c(0xfa)]('='))_0x135ad2=_0x40be68[0x0],_0x44a4b9=_0x40be68[_0x13690c(0x121)](0x1);else{if(_0x40be68[_0x13690c(0x1d0)]>=0x1&&_0x2e16ff[_0x13690c(0x1d5)])_0x135ad2=_0x2e16ff['workflowProject'],_0x44a4b9=_0x40be68;else return _0x40be68[_0x13690c(0x1d0)]>=0x1?(console[_0x13690c(0x125)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x13690c(0x257)),0x1):(console[_0x13690c(0x125)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console['error'](_0x13690c(0x265)),0x1);}if(_0x44a4b9[_0x13690c(0x1d0)]===0x0)return console[_0x13690c(0x125)](_0x13690c(0x101)),console[_0x13690c(0x125)](_0x13690c(0x265)),0x1;const _0x2a3ddb={};try{for(const _0x3071f of _0x44a4b9){const {key:_0x5f2130,value:_0x299c4f}=parseKeyValue(_0x3071f);_0x2a3ddb[_0x5f2130]=_0x299c4f;}}catch(_0x210feb){return _0x210feb instanceof Error&&console[_0x13690c(0x125)](a54_0x33d044[_0x13690c(0xf6)](_0x13690c(0x1ab)),_0x210feb[_0x13690c(0x1eb)]),0x1;}const _0x20fd29=Object['keys'](_0x2a3ddb);_0x2e16ff[_0x13690c(0x1e5)]&&(console['error']('Project:\x20'+_0x135ad2),console[_0x13690c(0x125)](_0x13690c(0x1b3)+_0x20fd29[_0x13690c(0x227)](',\x20')));const _0x2bce6d=await withSpinner(_0x20fd29[_0x13690c(0x1d0)]===0x1?_0x13690c(0x258):_0x13690c(0xe4)+_0x20fd29['length']+_0x13690c(0x250),()=>_0x488037[_0x13690c(0x1f2)][_0x13690c(0x100)](_0x135ad2,_0x2a3ddb),{'verbose':_0x2e16ff[_0x13690c(0x1e5)]}),_0x46a619=_0x2bce6d[_0x13690c(0x193)];return console[_0x13690c(0x125)](_0x20fd29['length']===0x1?_0x13690c(0x13d)+_0x46a619[_0x13690c(0x2a2)][0x0]+_0x13690c(0xec)+_0x46a619[_0x13690c(0x139)]+'\x27':'✔\x20'+_0x46a619['keys'][_0x13690c(0x1d0)]+_0x13690c(0x1da)+_0x46a619[_0x13690c(0x139)]+'\x27'),(_0x2e16ff['json']||_0x2e16ff[_0x13690c(0x25f)])&&await handleSingleObjectOutput(_0x46a619,_0x2e16ff),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x1ca);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x11b);async[a54_0x3dd44c(0x1ff)](_0x48d9f7){const _0x31bd7a=a54_0x3dd44c,{options:_0x5dcb6a,args:_0x1a5145,tdx:_0x4fbed5}=_0x48d9f7;let _0x42172f,_0x891ab6;if(_0x1a5145['length']>=0x2)_0x42172f=_0x1a5145[0x0],_0x891ab6=_0x1a5145[0x1];else{if(_0x1a5145[_0x31bd7a(0x1d0)]===0x1&&_0x5dcb6a[_0x31bd7a(0x1d5)])_0x42172f=_0x5dcb6a[_0x31bd7a(0x1d5)],_0x891ab6=_0x1a5145[0x0];else return _0x1a5145[_0x31bd7a(0x1d0)]===0x1?(console[_0x31bd7a(0x125)](_0x31bd7a(0x28a)),console[_0x31bd7a(0x125)](_0x31bd7a(0x257)),0x1):(console[_0x31bd7a(0x125)](_0x31bd7a(0x14a)),console['error'](_0x31bd7a(0x142)),0x1);}_0x5dcb6a[_0x31bd7a(0x1e5)]&&(console[_0x31bd7a(0x125)](_0x31bd7a(0x118)+_0x42172f),console[_0x31bd7a(0x125)]('Key:\x20'+_0x891ab6));if(!_0x5dcb6a[_0x31bd7a(0x202)]){if(!isInteractive())return console[_0x31bd7a(0x125)](a54_0x33d044[_0x31bd7a(0xf6)](_0x31bd7a(0x278)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x31bd7a(0x125)](a54_0x33d044[_0x31bd7a(0x146)](_0x31bd7a(0x1c2))),0x1;const _0x49ad8f=await confirmKey(_0x31bd7a(0x14e)+_0x891ab6+_0x31bd7a(0x1ad)+_0x42172f+'\x27?');if(!_0x49ad8f)return console[_0x31bd7a(0x125)](a54_0x33d044[_0x31bd7a(0x114)]('Cancelled')),0x1;}const _0x55b389=await withSpinner(_0x31bd7a(0x285),()=>_0x4fbed5['workflow'][_0x31bd7a(0x11e)](_0x42172f,_0x891ab6),{'verbose':_0x5dcb6a['verbose']}),_0x4116d8=_0x55b389[_0x31bd7a(0x193)];return console[_0x31bd7a(0x125)](_0x31bd7a(0x13d)+_0x4116d8[_0x31bd7a(0x1a0)]+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x4116d8['projectName']+'\x27'),(_0x5dcb6a[_0x31bd7a(0x252)]||_0x5dcb6a['jsonl'])&&await handleSingleObjectOutput(_0x4116d8,_0x5dcb6a),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(_0x5333a2){const _0x2642a0=a54_0x3dd44c,_0x307351=Math[_0x2642a0(0x16f)](_0x5333a2/0x3e8),_0x18f2a8=Math[_0x2642a0(0x16f)](_0x307351/0x3c),_0x2a38a4=Math[_0x2642a0(0x16f)](_0x18f2a8/0x3c),_0x2c9dc3=Math['floor'](_0x2a38a4/0x18);if(_0x2c9dc3>0x0){const _0x1d75f2=_0x2a38a4%0x18;return _0x1d75f2>0x0?_0x2c9dc3+'d\x20'+_0x1d75f2+'h':_0x2c9dc3+'d';}else{if(_0x2a38a4>0x0){const _0x45da85=_0x18f2a8%0x3c;return _0x45da85>0x0?_0x2a38a4+'h\x20'+_0x45da85+'m':_0x2a38a4+'h';}else{if(_0x18f2a8>0x0){const _0x162a22=_0x307351%0x3c;return _0x162a22>0x0?_0x18f2a8+'m\x20'+_0x162a22+'s':_0x18f2a8+'m';}else return _0x307351+'s';}}}function formatTimestamp(_0x265639,_0x1c32b1){const _0x1513a7=a54_0x3dd44c,_0x4c451d=new Date(_0x265639),_0x4e7299=String(_0x4c451d[_0x1513a7(0x195)]())[_0x1513a7(0x10b)](0x2,'0'),_0x39ca0a=String(_0x4c451d[_0x1513a7(0xf7)]())[_0x1513a7(0x10b)](0x2,'0'),_0x29df10=_0x4e7299+':'+_0x39ca0a,_0x1798dd=_0x4c451d[_0x1513a7(0x20d)]()===_0x1c32b1[_0x1513a7(0x20d)]()&&_0x4c451d[_0x1513a7(0x27a)]()===_0x1c32b1['getMonth']()&&_0x4c451d[_0x1513a7(0x127)]()===_0x1c32b1[_0x1513a7(0x127)]();if(_0x1798dd)return _0x29df10;else{const _0x10df0b=String(_0x4c451d[_0x1513a7(0x27a)]()+0x1)['padStart'](0x2,'0'),_0x19d797=String(_0x4c451d[_0x1513a7(0x127)]())['padStart'](0x2,'0');return _0x10df0b+'-'+_0x19d797+'\x20'+_0x29df10;}}function formatDate(_0x3b14a4){const _0x569135=a54_0x3dd44c,_0x4686b6=_0x3b14a4[_0x569135(0x20d)](),_0x59d3bf=String(_0x3b14a4[_0x569135(0x27a)]()+0x1)['padStart'](0x2,'0'),_0x4dae3d=String(_0x3b14a4[_0x569135(0x127)]())[_0x569135(0x10b)](0x2,'0');return _0x4686b6+'-'+_0x59d3bf+'-'+_0x4dae3d;}function getTaskStateIcon(_0x465bba){const _0x2d232b={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x2d232b[_0x465bba]||'⚪';}function getBarChar(_0x29cfa1){const _0x3ae7da=a54_0x3dd44c;return _0x29cfa1===_0x3ae7da(0x125)||_0x29cfa1===_0x3ae7da(0x1c4)?'×':'─';}function a54_0x550a(){const _0xe2274b=['Expected\x20format:\x20--param\x20key=value','revision:\x20','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Fetching\x20workflow\x20','Error:\x20Attempt\x20ID\x20is\x20required','match','workflow:kill','autocomplete','applyPullProject','✔\x20Push\x20complete','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','resumeFrom','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','2609968AZDcyF','\x0a✔\x20No\x20changes\x20to\x20push','round','retryAttemptName','Workflow:','\x20(system)','startedAt','attemptId','\x20\x20Location:\x20','filesExtracted','Error:\x20','✔\x20Clone\x20complete','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','retrySession','Validation:\x20skipped','get','data','updatedAt','getHours','(use\x20--limit\x20to\x20see\x20more)','executeCloneProject','find','select','-\x20nothing\x20pushed','skipValidation','Reason:\x20','No\x20sessions\x20with\x20timing\x20information','deleted','includeRetried','key','Attempt\x20ID:\x20','5067tiCRLd','\x20project','Kill\x20a\x20running\x20attempt','workflow:schedule:enable','\x20session','workflow:pull','workflow:logs','size','showWorkflowConsoleUrl','Error:','Revision:\x20','\x27\x20from\x20project\x20\x27','tdx\x20wf\x20attempt\x20','⚠\x20Showing\x20first\x20','\x22?\x20This\x20cannot\x20be\x20undone.','getTime','toISOString','Secrets\x20to\x20set:\x20','82803LZiYEL','7131890shCdwj','\x20modified','Select\x20a\x20workflow\x20to\x20run','enableSchedule','Invalid\x20format:\x20','\x20unchanged','Disable\x20a\x20workflow\x20schedule','Project\x20name\x20is\x20required','Parameters:','projectId','workflow:projects','description','✔\x20Pull\x20complete','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','renderSingleTimeline','group_error','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20-\x20','workflow:push','Listing\x20schedules...','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','workflow:secrets:delete','param','Downloading\x20logs...','POLL_INTERVAL_MS','6510406Blxvaj','value','length','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20next:\x20','workflowName','/attempt/','workflowProject','localeCompare','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','format','fullName','\x20secrets\x20set\x20for\x20project\x20\x27','\x20\x20Revision:\x20','buildTimelineData','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','(unknown)','text','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','491689KNPHGI','Status:\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Attempt:\x20','verbose','white','attempt','push','→\x20Project:\x20','lastAttempt','message','workflow:schedule:disable','stdout','success','No\x20workflow\x20projects\x20found','every','Workflow:\x20','workflow','resolveProjectDir','\x20of\x20','resolve','workflow:tasks','substring','Including\x20subtasks:\x20yes','✔\x20Deleted\x20project\x20','No\x20workflows\x20found\x20in\x20project:\x20','generateSessionTimelineRows','Source\x20directory\x20is\x20required','status','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','execute','rows','Failed\x20to\x20fetch\x20attempt\x20data','yes','workflow:secrets:list','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x20\x20Console:\x20','MAX_TASKS_DISPLAY','Start\x20a\x20workflow\x20run','workflow:delete','✔\x20Workflow\x20project\x20set\x20to:\x20','params','title','logs','getFullYear','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','new','cyan','No\x20sessions\x20found\x20for:\x20','\x20\x20New\x20attempt\x20ID:\x20','toLocaleString','✔\x20Showing\x20','✔\x20Downloaded\x20','task','Enable\x20a\x20workflow\x20schedule','Resolving\x20project\x20\x27','hasChanges','clear','min','running','relative','parse','startTime','type','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','---\x20','startsWith','nextRunTime','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Error:\x20Invalid\x20JSON\x20in\x20--params','join','table','newProjectId','set','Deleting\x20project\x20','Listing\x20workflows...','state','limit','workflow:use','list','Listing\x20workflow\x20attempts...','stat','sessionId','✔\x20Retry\x20started','LABEL_MIN_SPACING','sort','name','replace','unknown','\x20workflow','kill','map','💡\x20Tip:\x20Use\x20','Select\x20a\x20session\x20to\x20view\x20timeline:','TASK_NAME_WIDTH','executePushProject','Cancelled','\x20\x20Workflow:\x20','\x0aFailed\x20to\x20fetch\x20attempt\x20data','retryAttempt','getWorkflow','blue','follow','preparePushProject','No\x20workflows\x20found','renderTimeline','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','MAX_TIMELINE_WIDTH','📋\x20','workflow:sessions','window','\x20secrets...','parseProjectWorkflowPattern','json','\x20(use\x20--limit\x20to\x20show\x20more)','workflow:clone','fileSize','Fetching\x20log\x20files...','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Setting\x20secret...','Parameters:\x20','resolveProject','sourceProjectName','session','max','changes','jsonl','listSchedules','Pushing\x20workflow\x20project...','basename','No\x20sessions\x20found\x20in\x20project:\x20',',\x20Workflow:\x20','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','\x20\x20Session\x20ID:\x20','modified','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','ICON_WIDTH','taskName','isTTY','workflow:attempt','resolveProjectId','6hDzWXF','-\x20no\x20files\x20written','readFile','Loading\x20sessions...','now','includeSubtasks','✔\x20Found\x20','session:','from','indexOf','\x0aError:','canceling','getMonth','workflow:secrets:set','config','workflow:timeline','output','Loading\x20workflows...','cancelRequested','workflow:run','reason','site','✔\x20Project:\x20','Deleting\x20secret...','total','\x20enabled\x20(','index','\x22\x20already\x20exists\x20(ID:\x20','Error:\x20Project\x20name\x20is\x20required','✔\x20Workflow\x20run\x20started','diff','🔄\x20','Writing\x20files...','planned','Getting\x20attempt\x20tasks...','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','No\x20attempts\x20found\x20in\x20project:\x20','15542hNzcCq','→\x20New\x20project:\x20','start','No\x20workflow\x20tdx.json\x20found','No\x20projects\x20match\x20pattern:\x20','targetDir','\x20deleted','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','navigateSessionsInteractive','Schedule\x20ID\x20is\x20required','\x20task','split','fs/promises','cwd','Pulling\x20project\x20','keys','dryRun','finishedAt','GUTTER','workflows','log','\x20from\x20session\x20','tasks','summary','Pushing\x20project...','Getting\x20attempt\x20details...','columns','No\x20workflow\x20sessions\x20found','\x0aApply\x20these\x20changes?','targetExists','pollTimeline','Pull\x20workflow\x20project\x20to\x20local\x20folder','\x20\x20Next\x20run:\x20','Retrying\x20attempt...','icon','Disabling\x20schedule\x20#','unchanged','Setting\x20','end','all','createdAt','Show\x20tasks\x20for\x20an\x20attempt','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Resume\x20from:\x20','isArray','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','\x0aUpdate\x20existing\x20project\x20\x22','disabledAt','Project\x20filter:\x20','Session\x20time:\x20','sourceDir','21050EaFRXB','\x0aDry\x20run\x20-\x20no\x20project\x20created','No\x20sessions\x20found','Tip:\x20cd\x20to\x20workflows/','red','getMinutes','540gvKsyv','Loading\x20session...','includes','pending','\x20\x20tdx\x20wf\x20use\x20<project>','green','workflow:download','stringify','setSecrets','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','Task\x20graph:','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','project','Auto-selected\x20latest\x20session:\x20','\x0aPush\x20these\x20changes?','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','duration','Usage:\x20workflow:delete\x20<project-name-or-id>','has','padStart','repeat','done','\x0a✔\x20Attempt\x20complete','\x20\x20Target:\x20','From\x20task:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20\x20Attempt\x20ID:\x20','Error:\x20Invalid\x20parameter\x20format:\x20','yellow','\x1b[1A\x1b[2K','MIN_LABEL_COUNT','✔\x20Schedule\x20#','Project:\x20','Cloning\x20to\x20','New\x20project\x20name:\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Filter:\x20project=','30SGugCZ','deleteSecret','Usage:\x20tdx\x20wf\x20use\x20<project>','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','slice','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','...','renderSessionsTimeline','error','Analyzing\x20project...','getDate','Updating\x20','splice','sessionTime','\x20sessions\x20','write','toLowerCase','newProjectName','\x0a⚠\x20Project\x20\x22','148QHSucg','tdx.json','\x20logs','MAX_LABEL_COUNT','fromTask','\x20(disabled)','Output\x20directory:\x20','\x20\x20Session\x20context\x20set\x20to:\x20','msPerChar','projectName','\x20\x20Changes:\x20','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Project\x20name:\x20','✔\x20Secret\x20\x27','\x20tasks','fill','requireProject','Listing\x20workflow\x20sessions...','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Filter:\x20','attempts','Include\x20retried:\x20yes','dim','Starting\x20workflow\x20run...','delete','revision','Error:\x20Secret\x20key\x20is\x20required','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Dry\x20run:\x20yes','filter','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x20secret','workflow:workflows','No\x20matching\x20sessions\x20found','Target\x20directory:\x20','durationMs','\x20new','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x20\x20Source:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Source\x20directory:\x20','isDirectory','Enabling\x20schedule\x20#','projects','Source\x20project:\x20','bold','\x0aDry\x20run\x20-\x20no\x20files\x20written','executeDryRun','isNewProject','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Analyzing\x20changes...','disableSchedule','fileCount','run','Killing\x20attempt...','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','logFiles','\x20\x20Project\x20ID:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','✔\x20Pushed\x20','metadata','📁\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','floor','ICON_SPACING','workflow:upload','sessions','List\x20workflows','\x0aClone\x20\x22'];a54_0x550a=function(){return _0xe2274b;};return a54_0x550a();}function getBarColor(_0x5635ba){const _0x309303=a54_0x3dd44c,_0xf94c97={'success':a54_0x33d044[_0x309303(0xfd)],'error':a54_0x33d044['red'],'group_error':a54_0x33d044[_0x309303(0xf6)],'running':a54_0x33d044[_0x309303(0x246)],'blocked':a54_0x33d044[_0x309303(0x114)],'planned':a54_0x33d044[_0x309303(0x146)],'canceling':a54_0x33d044[_0x309303(0x114)]};return _0xf94c97[_0x5635ba]||a54_0x33d044[_0x309303(0x1e6)];}function parseTaskName(_0x57291c){const _0x3c148f=a54_0x3dd44c;let _0x3bf837=_0x57291c[_0x3c148f(0x238)](/^\++/,'');const _0x272fc2=_0x3bf837[_0x3c148f(0x29e)]('+'),_0x4a0df6=_0x272fc2[_0x3c148f(0x1d0)]>0x1?_0x272fc2['length']-0x2:0x0,_0x51c9d0=_0x272fc2[_0x272fc2[_0x3c148f(0x1d0)]-0x1]||_0x3bf837;return{'level':_0x4a0df6,'name':'+'+_0x51c9d0};}function truncateTaskName(_0x2b8dd5,_0x2c7332){const _0x30ccf8=a54_0x3dd44c,_0x30d392=stringWidth(_0x2b8dd5);if(_0x30d392<=_0x2c7332)return _0x2b8dd5;let _0x4b8d1c=_0x2b8dd5;while(stringWidth(_0x4b8d1c+'…')>_0x2c7332&&_0x4b8d1c[_0x30ccf8(0x1d0)]>0x0){_0x4b8d1c=_0x4b8d1c['slice'](0x0,-0x1);}return _0x4b8d1c+'…';}function calculateTimeScale(_0x5b25fd,_0x53eeef){const _0x5515cd=a54_0x3dd44c;return{'startTime':_0x5b25fd[_0x5515cd(0x295)],'endTime':_0x5b25fd[_0x5515cd(0xe5)],'durationMs':_0x5b25fd[_0x5515cd(0x108)],'msPerChar':_0x5b25fd[_0x5515cd(0x108)]/_0x53eeef};}function timeToPosition(_0x239f3b,_0x287538,_0x4dadef){const _0x2d8671=a54_0x3dd44c,_0x7d9418=_0x239f3b-_0x287538['startTime'],_0x1cf08e=Math['floor'](_0x7d9418/_0x287538[_0x2d8671(0x138)]);return Math[_0x2d8671(0x25d)](0x0,Math['min'](_0x1cf08e,_0x4dadef));}function renderTimeAxis(_0x8a1076,_0x2c22cb){const _0xb75c23=a54_0x3dd44c,_0x508a81=Math[_0xb75c23(0x21b)](TIMELINE_CONFIG[_0xb75c23(0x133)],Math[_0xb75c23(0x25d)](TIMELINE_CONFIG[_0xb75c23(0x116)],Math['floor'](_0x2c22cb/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x33f974=_0x8a1076[_0xb75c23(0x153)]/(_0x508a81-0x1),_0x16bb30=new Date(_0x8a1076['startTime']),_0x2ba943=[];for(let _0xa24e29=0x0;_0xa24e29<_0x508a81;_0xa24e29++){const _0x44b165=_0x8a1076['startTime']+_0xa24e29*_0x33f974,_0x2ffced=timeToPosition(_0x44b165,_0x8a1076,_0x2c22cb),_0x37af60=formatTimestamp(_0x44b165,_0x16bb30);_0x2ba943[_0xb75c23(0x1e8)]({'pos':_0x2ffced,'text':_0x37af60});}const _0x3c7a3=new Array(_0x2c22cb)[_0xb75c23(0x13f)]('\x20');let _0x3350ee=-0x1;for(const {pos:_0x36719a,text:_0x1fccb1}of _0x2ba943){let _0x388696=Math[_0xb75c23(0x25d)](0x0,_0x36719a-Math[_0xb75c23(0x16f)](_0x1fccb1[_0xb75c23(0x1d0)]/0x2));_0x388696<=_0x3350ee+TIMELINE_CONFIG[_0xb75c23(0x235)]&&(_0x388696=_0x3350ee+TIMELINE_CONFIG[_0xb75c23(0x235)]+0x1);_0x388696+_0x1fccb1['length']>_0x2c22cb&&(_0x388696=_0x2c22cb-_0x1fccb1[_0xb75c23(0x1d0)]);if(_0x388696>=0x0&&_0x388696+_0x1fccb1[_0xb75c23(0x1d0)]<=_0x2c22cb&&_0x388696>_0x3350ee){for(let _0x493268=0x0;_0x493268<_0x1fccb1[_0xb75c23(0x1d0)];_0x493268++){_0x3c7a3[_0x388696+_0x493268]=_0x1fccb1[_0x493268];}_0x3350ee=_0x388696+_0x1fccb1[_0xb75c23(0x1d0)]-0x1;}}return _0x3c7a3[_0xb75c23(0x227)]('');}function renderTaskRow(_0xdc0584,_0x352dfe,_0x4a585d,_0x2a95d5){const _0x480a00=a54_0x3dd44c,{level:_0x59ad97,name:_0x58ab4e}=parseTaskName(_0xdc0584[_0x480a00(0x237)]),_0x4b5176='\x20'[_0x480a00(0x10c)](_0x59ad97),_0x2fd464=_0xdc0584[_0x480a00(0x24f)]?'('+formatElapsed(_0xdc0584[_0x480a00(0x24f)][_0x480a00(0x108)])+')':'',_0x2f3fd1=stringWidth(_0x2fd464),_0x202b8a=_0x59ad97*0x1,_0x5b76fc=_0x2a95d5-_0x202b8a-_0x2f3fd1-0x1,_0x1b9fc7=truncateTaskName(_0x58ab4e,_0x5b76fc),_0x44d14d=_0x4b5176+_0x1b9fc7,_0xa9e52=stringWidth(_0x44d14d),_0x27c072=_0x2a95d5-_0xa9e52-_0x2f3fd1,_0x2a4817=_0x44d14d+'\x20'[_0x480a00(0x10c)](Math[_0x480a00(0x25d)](0x1,_0x27c072))+a54_0x33d044[_0x480a00(0x146)](_0x2fd464),_0x1e706f=getTaskStateIcon(_0xdc0584[_0x480a00(0x22d)]),_0x5f03ce=new Array(_0x4a585d)[_0x480a00(0x13f)]('\x20');if(_0xdc0584[_0x480a00(0x24f)]){const _0x1c7e1d=timeToPosition(_0xdc0584['window'][_0x480a00(0x295)],_0x352dfe,_0x4a585d),_0x45f18e=timeToPosition(_0xdc0584['window']['end'],_0x352dfe,_0x4a585d),_0x1c8f83=getBarChar(_0xdc0584[_0x480a00(0x22d)]),_0x29c572=Math[_0x480a00(0x25d)](_0x1c7e1d+0x1,_0x45f18e);for(let _0x2a6668=_0x1c7e1d;_0x2a6668<Math[_0x480a00(0x21b)](_0x29c572,_0x4a585d);_0x2a6668++){_0x5f03ce[_0x2a6668]=_0x1c8f83;}}const _0x28e2cc=getBarColor(_0xdc0584[_0x480a00(0x22d)]),_0x1c9c87=_0x5f03ce[_0x480a00(0x23c)](_0xb75e5e=>_0xb75e5e==='\x20'?'\x20':_0x28e2cc(_0xb75e5e))['join']('');return _0x1e706f+'\x20'+_0x2a4817+'│'+_0x1c9c87+'│';}function calculateStats(_0x11aa85){const _0x49643d=a54_0x3dd44c,_0x297274={'total':_0x11aa85['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3d08f6 of _0x11aa85){if(_0x3d08f6[_0x49643d(0x22d)]===_0x49643d(0x1ee))_0x297274['success']++;else{if(_0x3d08f6[_0x49643d(0x22d)]===_0x49643d(0x125)||_0x3d08f6['state']==='group_error')_0x297274['error']++;else _0x3d08f6[_0x49643d(0x22d)]===_0x49643d(0x21c)?_0x297274[_0x49643d(0x21c)]++:_0x297274[_0x49643d(0xfb)]++;}}return _0x297274;}function formatStats(_0x20989d){const _0x17ce4b=a54_0x3dd44c;return['Total:\x20'+_0x20989d[_0x17ce4b(0x286)],'✅\x20'+_0x20989d[_0x17ce4b(0x1ee)],'❌\x20'+_0x20989d['error'],_0x17ce4b(0x28d)+_0x20989d[_0x17ce4b(0x21c)],'⏳\x20'+_0x20989d['pending']][_0x17ce4b(0x227)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x27d);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x167);async[a54_0x3dd44c(0x1ff)](_0xc69402){const _0x1ed663=a54_0x3dd44c,{options:_0x2f39fb,args:_0x5db93e,tdx:_0x284823}=_0xc69402;let _0x3256e6,_0x1c5aab,_0x362c7c=![];if(_0x5db93e[0x0]){if(_0x5db93e[0x0]['includes']('.')){const _0x500dee=this[_0x1ed663(0x251)](_0x5db93e,_0x2f39fb);if(!_0x500dee)return 0x1;_0x3256e6=_0x500dee[_0x1ed663(0x139)],_0x1c5aab=_0x500dee[_0x1ed663(0x1d3)];}else{_0x1c5aab=_0x5db93e[0x0],_0x3256e6=_0x2f39fb['workflowProject'];if(!_0x3256e6)return console[_0x1ed663(0x125)](a54_0x33d044['red'](_0x1ed663(0x1ab)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x362c7c=!![];}}else{const _0x59e1a2=this[_0x1ed663(0x251)](_0x5db93e,_0x2f39fb);if(!_0x59e1a2)return 0x1;_0x3256e6=_0x59e1a2[_0x1ed663(0x139)],_0x1c5aab=_0x59e1a2['workflowName'];}if(_0x2f39fb[_0x1ed663(0x1e5)]){if(_0x3256e6&&_0x1c5aab)console['error'](_0x1ed663(0x143)+_0x3256e6+'.'+_0x1c5aab);else _0x3256e6&&console[_0x1ed663(0x125)](_0x1ed663(0x11c)+_0x3256e6);}const _0x155cba=_0x2f39fb[_0x1ed663(0x18a)],_0x567a88=_0x2f39fb[_0x1ed663(0x233)];if(_0x155cba){_0x567a88&&console[_0x1ed663(0x125)](a54_0x33d044[_0x1ed663(0x114)]('Warning:'),_0x1ed663(0x225));const _0x337a31=_0x2f39fb['follow'];return _0x337a31?await this[_0x1ed663(0xdd)](_0xc69402,_0x155cba):await this[_0x1ed663(0x1c3)](_0xc69402,_0x155cba,_0x2f39fb),0x0;}if(_0x567a88){const _0x58fcb7=await withSpinner(_0x1ed663(0xf9),()=>_0x284823[_0x1ed663(0x1f2)][_0x1ed663(0x172)]({'projectName':_0x3256e6,'workflowName':_0x1c5aab,'limit':0x64}),{'verbose':_0x2f39fb['verbose']}),_0x4f9e01=_0x58fcb7[_0x1ed663(0x193)][_0x1ed663(0x198)](_0x3c8378=>_0x3c8378['id']===_0x567a88);if(!_0x4f9e01)return console[_0x1ed663(0x125)](a54_0x33d044[_0x1ed663(0xf6)](_0x1ed663(0x1ab)),'Session\x20not\x20found:\x20'+_0x567a88),0x1;if(!_0x4f9e01['lastAttempt']?.['id'])return console[_0x1ed663(0x125)](a54_0x33d044[_0x1ed663(0xf6)](_0x1ed663(0x1ab)),'Session\x20'+_0x567a88+'\x20has\x20no\x20attempts'),0x1;const _0x42869d=_0x4f9e01[_0x1ed663(0x1ea)]['id'];_0x2f39fb['verbose']&&console['error']('Using\x20attempt\x20'+_0x42869d+_0x1ed663(0x2a8)+_0x567a88);const _0x40240f=_0x2f39fb[_0x1ed663(0x247)];return _0x40240f?await this[_0x1ed663(0xdd)](_0xc69402,_0x42869d):await this[_0x1ed663(0x1c3)](_0xc69402,_0x42869d,_0x2f39fb),0x0;}const _0xdf6a94=await withSpinner(_0x1ed663(0x271),()=>_0x284823[_0x1ed663(0x1f2)][_0x1ed663(0x172)]({'projectName':_0x3256e6,'workflowName':_0x1c5aab,'limit':_0x2f39fb['limit']||0x32}),{'verbose':_0x2f39fb[_0x1ed663(0x1e5)]}),_0x20257e=_0xdf6a94['data'];if(_0x20257e[_0x1ed663(0x1d0)]===0x0){if(_0x3256e6&&_0x1c5aab)console[_0x1ed663(0x125)](_0x1ed663(0x211)+_0x3256e6+'.'+_0x1c5aab);else _0x3256e6?console['error'](_0x1ed663(0x263)+_0x3256e6):(console[_0x1ed663(0x125)](_0x1ed663(0x2ae)),console[_0x1ed663(0x125)](a54_0x33d044[_0x1ed663(0x146)](_0x1ed663(0x1fe))));return 0x0;}_0x20257e['sort']((_0x28ed35,_0x4de2ff)=>{const _0xd66789=_0x1ed663,_0x172dc3=_0x28ed35[_0xd66789(0x12a)]||'',_0x46b1ba=_0x4de2ff[_0xd66789(0x12a)]||'';return _0x46b1ba[_0xd66789(0x1d6)](_0x172dc3);});if(_0x2f39fb[_0x1ed663(0x252)]||_0x2f39fb[_0x1ed663(0x25f)])return await handleSDKOutput(_0x20257e,_0x2f39fb),0x0;let _0x376300;if(_0x362c7c){const _0x5a5bbd=_0x20257e[0x0];if(!_0x5a5bbd[_0x1ed663(0x1ea)]?.['id'])return console[_0x1ed663(0x125)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x376300=_0x5a5bbd[_0x1ed663(0x1ea)]['id'],_0x2f39fb['verbose']&&console[_0x1ed663(0x125)](_0x1ed663(0x105)+_0x5a5bbd[_0x1ed663(0x12a)]);}else{const _0x1a92b7=_0x20257e['map'](_0x5b33fb=>{const _0x27ed4f=_0x1ed663,_0xfd0c94=getAttemptStatusDisplay(_0x5b33fb[_0x27ed4f(0x1ea)]);return{'title':_0x5b33fb[_0x27ed4f(0x104)]?.[_0x27ed4f(0x237)]+'.'+_0x5b33fb[_0x27ed4f(0x1f2)]?.['name']+_0x27ed4f(0x1c6)+_0x5b33fb['sessionTime']+'\x20'+_0xfd0c94[_0x27ed4f(0xe1)],'value':_0x5b33fb[_0x27ed4f(0x1ea)]?.['id']||'','description':_0xfd0c94[_0x27ed4f(0x1df)]};}),_0x275a6d=await a54_0x2596be({'type':_0x1ed663(0x199),'name':_0x1ed663(0x18a),'message':_0x1ed663(0x23e),'choices':_0x1a92b7[_0x1ed663(0x14d)](_0x5122e1=>_0x5122e1[_0x1ed663(0x1cf)]!=='')});if(!_0x275a6d['attemptId'])return 0x0;_0x376300=_0x275a6d[_0x1ed663(0x18a)];}const _0x5c1afc=_0x2f39fb[_0x1ed663(0x247)];return _0x5c1afc?await this[_0x1ed663(0xdd)](_0xc69402,_0x376300):await this[_0x1ed663(0x1c3)](_0xc69402,_0x376300,_0x2f39fb),0x0;}async[a54_0x3dd44c(0x1c3)](_0x230fbd,_0x5e72cf,_0x3ae11f){const _0x4798de=a54_0x3dd44c,{tdx:_0x3d1d9b}=_0x230fbd;let _0x5b7df6,_0x192b37;try{[_0x5b7df6,_0x192b37]=await Promise[_0x4798de(0xe6)]([_0x3d1d9b['workflow'][_0x4798de(0x1e7)](_0x5e72cf),_0x3d1d9b[_0x4798de(0x1f2)][_0x4798de(0x2a9)](_0x5e72cf,![])]);}catch(_0x5e5b8c){console[_0x4798de(0x125)](a54_0x33d044['red'](_0x4798de(0x201)));_0x3ae11f[_0x4798de(0x1e5)]&&console[_0x4798de(0x125)](_0x5e5b8c);throw _0x5e5b8c;}if(_0x3ae11f['json']||_0x3ae11f[_0x4798de(0x25f)]){const _0x864b09=this[_0x4798de(0x1dc)](_0x5b7df6,_0x192b37);await handleSDKOutput([_0x864b09],_0x3ae11f);return;}const _0x6a8d42=_0x3d1d9b['context'][_0x4798de(0x283)],_0x5d5b3d=this[_0x4798de(0x24a)](_0x5b7df6,_0x192b37,_0x6a8d42);console[_0x4798de(0x2a7)](_0x5d5b3d);}async[a54_0x3dd44c(0xdd)](_0x16461a,_0x230974){const _0xba310c=a54_0x3dd44c,{tdx:_0x1e2937}=_0x16461a,_0x1654a7=TIMELINE_CONFIG[_0xba310c(0x1cd)],_0x510ec5=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x5c587e=0x0;while(_0x5c587e<_0x510ec5){process[_0xba310c(0x1ed)][_0xba310c(0x26b)]&&process['stdout'][_0xba310c(0x12c)]('\x1bc');let _0x634f62,_0x142af2;try{[_0x634f62,_0x142af2]=await Promise[_0xba310c(0xe6)]([_0x1e2937[_0xba310c(0x1f2)][_0xba310c(0x1e7)](_0x230974),_0x1e2937[_0xba310c(0x1f2)][_0xba310c(0x2a9)](_0x230974,![])]);}catch(_0x588db9){console[_0xba310c(0x125)](a54_0x33d044['red'](_0xba310c(0x243)));_0x5c587e>0x0&&console['error'](a54_0x33d044['dim']('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x5c587e));throw _0x588db9;}const _0x56b15c=_0x1e2937['context'][_0xba310c(0x283)],_0x3135db=this['renderTimeline'](_0x634f62,_0x142af2,_0x56b15c);console[_0xba310c(0x2a7)](_0x3135db);const _0x4ac15f=_0x634f62[_0xba310c(0x10d)]&&_0x142af2[_0xba310c(0x1f0)](_0x4f9072=>_0x4f9072[_0xba310c(0x22d)]!==_0xba310c(0x21c)&&_0x4f9072[_0xba310c(0x22d)]!=='planned');if(_0x4ac15f){console['error'](a54_0x33d044[_0xba310c(0xfd)](_0xba310c(0x10e)));break;}console[_0xba310c(0x125)](a54_0x33d044[_0xba310c(0x146)]('\x0aPolling...\x20('+_0x5c587e*0x2+_0xba310c(0x122))),await new Promise(_0x157921=>setTimeout(_0x157921,_0x1654a7)),_0x5c587e++;}_0x5c587e>=_0x510ec5&&console[_0xba310c(0x125)](a54_0x33d044['yellow'](_0xba310c(0x1e0)));}[a54_0x3dd44c(0x24a)](_0x440a9b,_0xed2abc,_0x57c10d){const _0x430f1e=a54_0x3dd44c,_0x80f925=[],_0x253465=TIMELINE_CONFIG[_0x430f1e(0x23f)],_0x495c54=0x5,_0x30a933=process['stdout']['columns']||0x78,_0x4a4f65=_0x30a933-_0x253465-_0x495c54,_0x390da7=Math[_0x430f1e(0x25d)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x430f1e(0x21b)](_0x4a4f65,TIMELINE_CONFIG[_0x430f1e(0x24c)])),_0x4331a9=new Date(_0x440a9b[_0x430f1e(0xe7)])[_0x430f1e(0x1b1)](),_0x15144a=_0x440a9b[_0x430f1e(0x2a4)]?new Date(_0x440a9b[_0x430f1e(0x2a4)])['getTime']():Date[_0x430f1e(0x272)](),_0x1b4a47={'start':_0x4331a9,'end':_0x15144a,'duration':_0x15144a-_0x4331a9},_0x415621=new Map(),_0x54bc2b=[];for(const _0x3587bb of _0xed2abc){if(_0x3587bb['startedAt']){const _0x2676b3=new Date(_0x3587bb['startedAt'])[_0x430f1e(0x1b1)](),_0x5ad2b3=_0x3587bb[_0x430f1e(0x194)]?new Date(_0x3587bb[_0x430f1e(0x194)])[_0x430f1e(0x1b1)]():Date['now'](),_0x3c5b3b={'start':_0x2676b3,'end':_0x5ad2b3,'duration':_0x5ad2b3-_0x2676b3};_0x415621[_0x430f1e(0x22a)](_0x3587bb['id'],_0x3c5b3b),_0x54bc2b['push']({'name':_0x3587bb[_0x430f1e(0x1d9)],'state':_0x3587bb[_0x430f1e(0x22d)]||_0x430f1e(0x239),'window':_0x3c5b3b});}else _0x54bc2b[_0x430f1e(0x1e8)]({'name':_0x3587bb['fullName'],'state':_0x3587bb[_0x430f1e(0x22d)]||_0x430f1e(0x28f),'window':undefined});}_0x54bc2b['sort']((_0x530603,_0x5353f6)=>{const _0x5dbefe=_0x430f1e;if(!_0x530603['window'])return 0x1;if(!_0x5353f6[_0x5dbefe(0x24f)])return-0x1;return _0x530603['window']['start']-_0x5353f6['window'][_0x5dbefe(0x295)];});const _0x3d6136=_0x54bc2b[_0x430f1e(0x1d0)],_0x138256=_0x3d6136>TIMELINE_CONFIG[_0x430f1e(0x206)];_0x138256&&_0x54bc2b[_0x430f1e(0x129)](TIMELINE_CONFIG[_0x430f1e(0x206)]);const _0x134bee=calculateTimeScale(_0x1b4a47,_0x390da7),_0x1f83d1=_0x440a9b[_0x430f1e(0x10d)]?_0x440a9b['success']?a54_0x33d044[_0x430f1e(0xfd)]('success'):a54_0x33d044[_0x430f1e(0xf6)](_0x430f1e(0x125)):a54_0x33d044['blue'](_0x430f1e(0x21c)),_0x3ce734=_0x440a9b['project']?.['id'],_0x1cd19b=_0x440a9b[_0x430f1e(0x233)];let _0x3430a9;if(_0x3ce734&&_0x1cd19b){const _0x5f4d6f=getWorkflowAttemptUrl(_0x57c10d,_0x3ce734,_0x1cd19b,_0x440a9b['id']);_0x3430a9=hyperlink(a54_0x33d044[_0x430f1e(0x146)](_0x440a9b['id']),_0x5f4d6f);}else _0x3430a9=a54_0x33d044[_0x430f1e(0x146)](_0x440a9b['id']);_0x80f925[_0x430f1e(0x1e8)](_0x430f1e(0x1e4)+_0x3430a9+_0x430f1e(0x1c6)+_0x1f83d1+_0x430f1e(0x1c6)+formatElapsed(_0x1b4a47[_0x430f1e(0x108)]));if(_0x54bc2b[_0x430f1e(0x1d0)]>0x0){const _0x5db6f3=renderTimeAxis(_0x134bee,_0x390da7),_0x140e42=new Date(_0x1b4a47[_0x430f1e(0x295)]),_0x5ca79a=formatDate(_0x140e42),_0x5a140c=TIMELINE_CONFIG[_0x430f1e(0x269)]+TIMELINE_CONFIG[_0x430f1e(0x170)]+_0x253465,_0x47b2ac=_0x5ca79a[_0x430f1e(0x10b)](_0x5a140c),_0x30cb98=a54_0x33d044['dim'](_0x47b2ac);_0x80f925['push'](_0x30cb98+'\x20'+_0x5db6f3);for(const _0x5df183 of _0x54bc2b){_0x80f925[_0x430f1e(0x1e8)](renderTaskRow(_0x5df183,_0x134bee,_0x390da7,_0x253465));}const _0x20d845=calculateStats(_0x54bc2b);_0x80f925[_0x430f1e(0x1e8)](formatStats(_0x20d845)),_0x138256&&_0x80f925[_0x430f1e(0x1e8)](a54_0x33d044[_0x430f1e(0x114)](_0x430f1e(0x1af)+TIMELINE_CONFIG[_0x430f1e(0x206)]+_0x430f1e(0x1f4)+_0x3d6136+_0x430f1e(0x13e))),_0x80f925['push'](''),_0x80f925[_0x430f1e(0x1e8)](a54_0x33d044[_0x430f1e(0x146)](_0x430f1e(0x23d))+(_0x430f1e(0x1ae)+_0x440a9b['id']+_0x430f1e(0x132))+a54_0x33d044[_0x430f1e(0x146)]('\x20to\x20see\x20detailed\x20logs'));}else _0x80f925[_0x430f1e(0x1e8)](_0x430f1e(0x16a));return _0x80f925['join']('\x0a');}[a54_0x3dd44c(0x1dc)](_0x20c3c4,_0x4ca381){const _0x216c8a=a54_0x3dd44c,_0x1c7c23=new Date(_0x20c3c4[_0x216c8a(0xe7)])[_0x216c8a(0x1b1)](),_0x267dc=_0x20c3c4[_0x216c8a(0x2a4)]?new Date(_0x20c3c4[_0x216c8a(0x2a4)])[_0x216c8a(0x1b1)]():Date[_0x216c8a(0x272)](),_0x1b1b9e=_0x267dc-_0x1c7c23,_0x3b2221=[];for(const _0x7bc1ac of _0x4ca381){if(_0x7bc1ac[_0x216c8a(0x189)]){const _0x4bc646=new Date(_0x7bc1ac['startedAt'])[_0x216c8a(0x1b1)](),_0xacece7=_0x7bc1ac[_0x216c8a(0x194)]?new Date(_0x7bc1ac[_0x216c8a(0x194)])[_0x216c8a(0x1b1)]():Date[_0x216c8a(0x272)]();_0x3b2221[_0x216c8a(0x1e8)]({'name':_0x7bc1ac[_0x216c8a(0x1d9)],'state':_0x7bc1ac['state']||_0x216c8a(0x239),'window':{'start':_0x4bc646,'end':_0xacece7,'duration':_0xacece7-_0x4bc646}});}else _0x3b2221[_0x216c8a(0x1e8)]({'name':_0x7bc1ac[_0x216c8a(0x1d9)],'state':_0x7bc1ac[_0x216c8a(0x22d)]||'planned','window':undefined});}const _0x49dae4=calculateStats(_0x3b2221);return{'attempt':{'id':_0x20c3c4['id'],'status':_0x20c3c4[_0x216c8a(0x10d)]?_0x20c3c4['success']?_0x216c8a(0x1ee):_0x216c8a(0x125):_0x216c8a(0x21c),'createdAt':_0x20c3c4[_0x216c8a(0xe7)],'finishedAt':_0x20c3c4['finishedAt'],'duration_ms':_0x1b1b9e},'tasks':_0x3b2221['map'](_0x55f22e=>({'name':_0x55f22e[_0x216c8a(0x237)],'state':_0x55f22e[_0x216c8a(0x22d)],'startedAt':_0x55f22e[_0x216c8a(0x24f)]?new Date(_0x55f22e['window'][_0x216c8a(0x295)])[_0x216c8a(0x1b2)]():null,'updatedAt':_0x55f22e[_0x216c8a(0x24f)]?new Date(_0x55f22e[_0x216c8a(0x24f)][_0x216c8a(0xe5)])[_0x216c8a(0x1b2)]():null,'duration_ms':_0x55f22e[_0x216c8a(0x24f)]?.[_0x216c8a(0x108)]||null})),'stats':_0x49dae4};}}export class WorkflowSchedulesCommand extends BaseCommand{[a54_0x3dd44c(0x237)]='workflow:schedules';[a54_0x3dd44c(0x1c0)]='List\x20workflow\x20schedules';async['execute'](_0x5ac704){const _0x63c1ec=a54_0x3dd44c,{options:_0x41111b,tdx:_0x3bea65}=_0x5ac704,_0xc23ab7=await withSpinner(_0x63c1ec(0x1c8),()=>_0x3bea65['workflow'][_0x63c1ec(0x260)](),{'verbose':_0x41111b[_0x63c1ec(0x1e5)]}),_0x2807fe=_0xc23ab7[_0x63c1ec(0x193)];console[_0x63c1ec(0x125)](_0x63c1ec(0x274)+_0x2807fe[_0x63c1ec(0x1d0)]+'\x20schedule'+(_0x2807fe[_0x63c1ec(0x1d0)]!==0x1?'s':''));if(isStructuredFormat(_0x41111b))await handleSDKOutput(_0x2807fe,_0x41111b);else{if(_0x2807fe[_0x63c1ec(0x1d0)]===0x0)console[_0x63c1ec(0x2a7)]('No\x20schedules\x20found');else for(const _0x5381f9 of _0x2807fe){const _0x324e4a=_0x5381f9[_0x63c1ec(0xee)]?a54_0x33d044[_0x63c1ec(0x114)](_0x63c1ec(0x135)):'',_0x3148f9=_0x5381f9[_0x63c1ec(0x104)]?.[_0x63c1ec(0x237)]?a54_0x33d044[_0x63c1ec(0x146)]('\x20['+_0x5381f9[_0x63c1ec(0x104)][_0x63c1ec(0x237)]+']'):'',_0x1959d9=_0x5381f9[_0x63c1ec(0x224)]?a54_0x33d044[_0x63c1ec(0x146)](_0x63c1ec(0x1d2)+new Date(_0x5381f9[_0x63c1ec(0x224)])['toLocaleString']()):'';console[_0x63c1ec(0x2a7)]('📅\x20#'+_0x5381f9['id']+'\x20'+(_0x5381f9[_0x63c1ec(0x1f2)]?.['name']||_0x63c1ec(0x1de))+_0x3148f9+_0x324e4a+_0x1959d9);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{['name']=a54_0x3dd44c(0x1a5);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x217);async[a54_0x3dd44c(0x1ff)](_0x51610c){const _0x1ba160=a54_0x3dd44c,{options:_0x1c14d5,args:_0x4f1de6,tdx:_0x58d663}=_0x51610c,_0x1526b8=_0x4f1de6[0x0];if(!_0x1526b8)return console['error'](a54_0x33d044[_0x1ba160(0xf6)](_0x1ba160(0x1ab)),_0x1ba160(0x29c)),console[_0x1ba160(0x125)](a54_0x33d044[_0x1ba160(0x146)](_0x1ba160(0x107))),console[_0x1ba160(0x125)](a54_0x33d044[_0x1ba160(0x146)](_0x1ba160(0x14b))),0x1;const _0x5ea00d=await withSpinner(_0x1ba160(0x15a)+_0x1526b8+_0x1ba160(0x123),()=>_0x58d663['workflow'][_0x1ba160(0x1b8)](_0x1526b8),{'verbose':_0x1c14d5['verbose']}),_0x568aec=_0x5ea00d[_0x1ba160(0x193)];return isStructuredFormat(_0x1c14d5)?await handleSingleObjectOutput(_0x568aec,_0x1c14d5):(console['log'](_0x1ba160(0x117)+_0x1526b8+_0x1ba160(0x287)+(_0x568aec['workflow']?.[_0x1ba160(0x237)]||_0x1ba160(0x239))+')'),_0x568aec[_0x1ba160(0x224)]&&console[_0x1ba160(0x2a7)](a54_0x33d044[_0x1ba160(0x146)](_0x1ba160(0xdf)+new Date(_0x568aec[_0x1ba160(0x224)])[_0x1ba160(0x213)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a54_0x3dd44c(0x237)]=a54_0x3dd44c(0x1ec);[a54_0x3dd44c(0x1c0)]=a54_0x3dd44c(0x1bb);async[a54_0x3dd44c(0x1ff)](_0x14a056){const _0x132c77=a54_0x3dd44c,{options:_0x2304de,args:_0x24d2f0,tdx:_0x47365a}=_0x14a056,_0x85f39b=_0x24d2f0[0x0];if(!_0x85f39b)return console[_0x132c77(0x125)](a54_0x33d044[_0x132c77(0xf6)](_0x132c77(0x1ab)),_0x132c77(0x29c)),console[_0x132c77(0x125)](a54_0x33d044[_0x132c77(0x146)](_0x132c77(0x13b))),console[_0x132c77(0x125)](a54_0x33d044[_0x132c77(0x146)](_0x132c77(0x14b))),0x1;const _0x574cf8=await withSpinner(_0x132c77(0xe2)+_0x85f39b+_0x132c77(0x123),()=>_0x47365a[_0x132c77(0x1f2)][_0x132c77(0x163)](_0x85f39b),{'verbose':_0x2304de[_0x132c77(0x1e5)]}),_0x74e0c3=_0x574cf8['data'];return isStructuredFormat(_0x2304de)?await handleSingleObjectOutput(_0x74e0c3,_0x2304de):console[_0x132c77(0x2a7)](_0x132c77(0x117)+_0x85f39b+'\x20disabled\x20('+(_0x74e0c3[_0x132c77(0x1f2)]?.[_0x132c77(0x237)]||_0x132c77(0x239))+')'),0x0;}}