@treasuredata/tdx 2026.4.9 → 2026.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) 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.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.d.ts.map +1 -1
  14. package/dist/commands/claude-command.js +1 -1
  15. package/dist/commands/claude-command.js.map +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.js +1 -1
  27. package/dist/commands/engage-template-pull-command.js +1 -1
  28. package/dist/commands/engage-template-push-command.js +1 -1
  29. package/dist/commands/engage-template-validate-command.js +1 -1
  30. package/dist/commands/job-command.js +1 -1
  31. package/dist/commands/journey-command.js +1 -1
  32. package/dist/commands/journey-validate-command.js +1 -1
  33. package/dist/commands/llm-command.js +1 -1
  34. package/dist/commands/mcp-command.js +1 -1
  35. package/dist/commands/parent-segment-command.js +1 -1
  36. package/dist/commands/policy-command.js +1 -1
  37. package/dist/commands/profile-command.js +1 -1
  38. package/dist/commands/profiles-command.js +1 -1
  39. package/dist/commands/query-command.js +1 -1
  40. package/dist/commands/schedule-command.js +1 -1
  41. package/dist/commands/segment-command.js +1 -1
  42. package/dist/commands/segment-create-command.js +1 -1
  43. package/dist/commands/segment-fields-command.js +1 -1
  44. package/dist/commands/segment-pull-command.js +1 -1
  45. package/dist/commands/segment-push-command.js +1 -1
  46. package/dist/commands/segment-update-command.js +1 -1
  47. package/dist/commands/segment-use-command.js +1 -1
  48. package/dist/commands/segment-validate-command.js +1 -1
  49. package/dist/commands/segments.js +1 -1
  50. package/dist/commands/show.js +1 -1
  51. package/dist/commands/status-command.js +1 -1
  52. package/dist/commands/tables.js +1 -1
  53. package/dist/commands/unset-command.js +1 -1
  54. package/dist/commands/upgrade-command.js +1 -1
  55. package/dist/commands/use-command.js +1 -1
  56. package/dist/commands/user-command.js +1 -1
  57. package/dist/commands/work-command.js +1 -1
  58. package/dist/commands/workflow-command.js +1 -1
  59. package/dist/core/auth.js +1 -1
  60. package/dist/core/command-output.js +1 -1
  61. package/dist/core/config.js +1 -1
  62. package/dist/core/connection-cache.js +1 -1
  63. package/dist/core/constants.js +1 -1
  64. package/dist/core/credential-cache.js +1 -1
  65. package/dist/core/global-context.js +1 -1
  66. package/dist/core/keychain.js +1 -1
  67. package/dist/core/oauth-keychain.js +1 -1
  68. package/dist/core/oauth.js +1 -1
  69. package/dist/core/profile.js +1 -1
  70. package/dist/core/project-config.js +1 -1
  71. package/dist/core/session.js +1 -1
  72. package/dist/core/user-cache.js +1 -1
  73. package/dist/core/version.js +1 -1
  74. package/dist/index.js +1 -1
  75. package/dist/mcp/server.js +1 -1
  76. package/dist/mcp/tools/index.js +1 -1
  77. package/dist/mcp/tools/tdx-run.js +1 -1
  78. package/dist/mcp/tools/tdx-search.js +1 -1
  79. package/dist/mcp/tools/work-create-item.js +1 -1
  80. package/dist/mcp/utils.js +1 -1
  81. package/dist/proxy/claude-usage-tracker.js +1 -1
  82. package/dist/proxy/passthrough-server.js +1 -1
  83. package/dist/proxy/sse-usage-parser.js +1 -1
  84. package/dist/sdk/agent/agent-config.js +1 -1
  85. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  86. package/dist/sdk/agent/agent-yaml.js +1 -1
  87. package/dist/sdk/agent/test/evaluator.js +1 -1
  88. package/dist/sdk/agent/test/executor.js +1 -1
  89. package/dist/sdk/agent/test/index.js +1 -1
  90. package/dist/sdk/agent/test/output.js +1 -1
  91. package/dist/sdk/agent/test/parser.js +1 -1
  92. package/dist/sdk/agent/tool-target-registry.js +1 -1
  93. package/dist/sdk/api.js +1 -1
  94. package/dist/sdk/cas/cas-api-client.js +1 -1
  95. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  96. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  97. package/dist/sdk/cas/index.js +1 -1
  98. package/dist/sdk/cas/pull-workflow.js +1 -1
  99. package/dist/sdk/cas/push-workflow.js +1 -1
  100. package/dist/sdk/client/cdp-api-client.js +1 -1
  101. package/dist/sdk/client/delivery-api-client.js +1 -1
  102. package/dist/sdk/client/endpoints.js +1 -1
  103. package/dist/sdk/client/engage-api-client.js +1 -1
  104. package/dist/sdk/client/http-client.js +1 -1
  105. package/dist/sdk/client/llm-api-client.js +1 -1
  106. package/dist/sdk/client/oauth-refresh.js +1 -1
  107. package/dist/sdk/client/rate-limiter.js +1 -1
  108. package/dist/sdk/client/td-api-client.js +1 -1
  109. package/dist/sdk/client/trino-api-client.js +1 -1
  110. package/dist/sdk/client/workflow-client.js +1 -1
  111. package/dist/sdk/connection-validator.js +1 -1
  112. package/dist/sdk/connection.js +1 -1
  113. package/dist/sdk/delivery.js +1 -1
  114. package/dist/sdk/engage/campaign-pull.js +1 -1
  115. package/dist/sdk/engage/campaign-push.js +1 -1
  116. package/dist/sdk/engage/campaign-validator.js +1 -1
  117. package/dist/sdk/engage/campaign-yaml.js +1 -1
  118. package/dist/sdk/engage/template-pull.js +1 -1
  119. package/dist/sdk/engage/template-push.js +1 -1
  120. package/dist/sdk/engage/template-validator.js +1 -1
  121. package/dist/sdk/engage/template-yaml.js +1 -1
  122. package/dist/sdk/engage/types/campaign-def.js +1 -1
  123. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  124. package/dist/sdk/engage/types/template-schema.js +1 -1
  125. package/dist/sdk/engage.js +1 -1
  126. package/dist/sdk/errors.js +1 -1
  127. package/dist/sdk/index.js +1 -1
  128. package/dist/sdk/io/index.js +1 -1
  129. package/dist/sdk/io/node-filesystem.js +1 -1
  130. package/dist/sdk/job.js +1 -1
  131. package/dist/sdk/journey.js +1 -1
  132. package/dist/sdk/llm/chat-cache.js +1 -1
  133. package/dist/sdk/llm/index.js +1 -1
  134. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  135. package/dist/sdk/llm/model-factors.js +1 -1
  136. package/dist/sdk/personalization.js +1 -1
  137. package/dist/sdk/policy.js +1 -1
  138. package/dist/sdk/query/index.js +1 -1
  139. package/dist/sdk/query/sql-parser.js +1 -1
  140. package/dist/sdk/realtime.js +1 -1
  141. package/dist/sdk/schedule.js +1 -1
  142. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  143. package/dist/sdk/segment/fields-display.js +1 -1
  144. package/dist/sdk/segment/file-discovery.js +1 -1
  145. package/dist/sdk/segment/journey-utils.js +1 -1
  146. package/dist/sdk/segment/journey-validator.js +1 -1
  147. package/dist/sdk/segment/journey-yaml.js +1 -1
  148. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  149. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  150. package/dist/sdk/segment/pull-workflow.js +1 -1
  151. package/dist/sdk/segment/push-recovery.js +1 -1
  152. package/dist/sdk/segment/push-workflow.js +1 -1
  153. package/dist/sdk/segment/resolution-context.js +1 -1
  154. package/dist/sdk/segment/segment-path-parser.js +1 -1
  155. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  156. package/dist/sdk/segment/segment-validator.js +1 -1
  157. package/dist/sdk/segment/target-resolution.js +1 -1
  158. package/dist/sdk/segment/tdx-config.js +1 -1
  159. package/dist/sdk/segment/types/activation-schema.js +1 -1
  160. package/dist/sdk/segment/types/journey-def.js +1 -1
  161. package/dist/sdk/segment/types/journey-schema.js +1 -1
  162. package/dist/sdk/segment/types/segment-def.js +1 -1
  163. package/dist/sdk/segment/types/segment-schema.js +1 -1
  164. package/dist/sdk/segment/validate-files.js +1 -1
  165. package/dist/sdk/segment/yaml-validator.js +1 -1
  166. package/dist/sdk/segment.js +1 -1
  167. package/dist/sdk/types/index.js +1 -1
  168. package/dist/sdk/types/progress.js +1 -1
  169. package/dist/sdk/types/workspace.js +1 -1
  170. package/dist/sdk/user.js +1 -1
  171. package/dist/sdk/util/format-detector.js +1 -1
  172. package/dist/sdk/util/formatters.js +1 -1
  173. package/dist/sdk/util/index.js +1 -1
  174. package/dist/sdk/util/paginate.js +1 -1
  175. package/dist/sdk/util/tree-formatter.js +1 -1
  176. package/dist/sdk/workflow/archive-validation.js +1 -1
  177. package/dist/sdk/workflow/clone-workflow.js +1 -1
  178. package/dist/sdk/workflow/index.js +1 -1
  179. package/dist/sdk/workflow/pull-workflow.js +1 -1
  180. package/dist/sdk/workflow/push-workflow.js +1 -1
  181. package/dist/sdk/workflow/tdx-config.js +1 -1
  182. package/dist/sdk/workflow/workflow-utils.js +1 -1
  183. package/dist/sdk/workspace/access-tracker.js +1 -1
  184. package/dist/sdk/workspace/frontmatter.js +1 -1
  185. package/dist/sdk/workspace/git.d.ts +52 -0
  186. package/dist/sdk/workspace/git.d.ts.map +1 -1
  187. package/dist/sdk/workspace/git.js +1 -1
  188. package/dist/sdk/workspace/git.js.map +1 -1
  189. package/dist/sdk/workspace/index.d.ts +14 -0
  190. package/dist/sdk/workspace/index.d.ts.map +1 -1
  191. package/dist/sdk/workspace/index.js +1 -1
  192. package/dist/sdk/workspace/index.js.map +1 -1
  193. package/dist/sdk/workspace/templates.js +1 -1
  194. package/dist/sdk/workspace/weekly.js +1 -1
  195. package/dist/sdk/workspace/wikilinks.js +1 -1
  196. package/dist/test-utils/command-runner.js +1 -1
  197. package/dist/test-utils/factories.js +1 -1
  198. package/dist/test-utils/fixtures.js +1 -1
  199. package/dist/test-utils/http-mock.js +1 -1
  200. package/dist/test-utils/index.js +1 -1
  201. package/dist/utils/async.js +1 -1
  202. package/dist/utils/colors.js +1 -1
  203. package/dist/utils/diff.js +1 -1
  204. package/dist/utils/file-permissions.js +1 -1
  205. package/dist/utils/file-reader.js +1 -1
  206. package/dist/utils/github-releases.js +1 -1
  207. package/dist/utils/global-cache.js +1 -1
  208. package/dist/utils/json-loader.js +1 -1
  209. package/dist/utils/local-cache.js +1 -1
  210. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  211. package/dist/utils/logger/formatters/index.js +1 -1
  212. package/dist/utils/logger/handlers/console-handler.js +1 -1
  213. package/dist/utils/logger/handlers/file-handler.js +1 -1
  214. package/dist/utils/logger/handlers/index.js +1 -1
  215. package/dist/utils/logger/handlers/null-handler.js +1 -1
  216. package/dist/utils/logger/index.js +1 -1
  217. package/dist/utils/logger/logger.js +1 -1
  218. package/dist/utils/logger/types.js +1 -1
  219. package/dist/utils/option-validation.js +1 -1
  220. package/dist/utils/process.js +1 -1
  221. package/dist/utils/prompt.js +1 -1
  222. package/dist/utils/spinner.js +1 -1
  223. package/dist/utils/sse-parser.js +1 -1
  224. package/dist/utils/string-utils.js +1 -1
  225. package/dist/utils/table-ref-parser.js +1 -1
  226. package/dist/utils/tdx-logger.js +1 -1
  227. package/dist/utils/version-check.js +1 -1
  228. package/package.json +2 -1
@@ -1 +1 @@
1
- const a54_0xb99464=a54_0xabc4;(function(_0x5d3a78,_0x353bda){const _0x129a36=a54_0xabc4,_0x3c9c7e=_0x5d3a78();while(!![]){try{const _0x24fea4=-parseInt(_0x129a36(0x162))/0x1*(parseInt(_0x129a36(0x251))/0x2)+parseInt(_0x129a36(0x269))/0x3+-parseInt(_0x129a36(0x29c))/0x4*(-parseInt(_0x129a36(0x114))/0x5)+parseInt(_0x129a36(0x193))/0x6+-parseInt(_0x129a36(0x1c8))/0x7+parseInt(_0x129a36(0x278))/0x8+parseInt(_0x129a36(0x172))/0x9*(parseInt(_0x129a36(0x122))/0xa);if(_0x24fea4===_0x353bda)break;else _0x3c9c7e['push'](_0x3c9c7e['shift']());}catch(_0x572011){_0x3c9c7e['push'](_0x3c9c7e['shift']());}}}(a54_0x299b,0x47930));import a54_0x3265bd from'chalk';import{existsSync}from'fs';import a54_0x5df1b0 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';function a54_0xabc4(_0x40baa0,_0x1c70b3){_0x40baa0=_0x40baa0-0x110;const _0x299b22=a54_0x299b();let _0xabc454=_0x299b22[_0x40baa0];return _0xabc454;}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_0x24334b from'prompts';function getAttemptStatusDisplay(_0x5a3470){const _0x56e9d0=a54_0xabc4;if(!_0x5a3470)return{'icon':'⏳','text':''};const {done:_0x317b19,success:_0x4caae3,cancelRequested:_0x41071a}=_0x5a3470;if(!_0x317b19)return _0x41071a?{'icon':'🛑','text':a54_0x3265bd['yellow'](_0x56e9d0(0x28b))}:{'icon':'🔄','text':a54_0x3265bd[_0x56e9d0(0x144)]('running')};if(_0x4caae3)return{'icon':'✅','text':a54_0x3265bd[_0x56e9d0(0x119)](_0x56e9d0(0x252))};return{'icon':'❌','text':a54_0x3265bd['red'](_0x56e9d0(0x274))};}export class WorkflowBaseCommand extends BaseCommand{[a54_0xb99464(0x178)](_0x1c1c78,_0xa8f81f,_0x2916f9=0x0){return _0x1c1c78[_0x2916f9]||_0xa8f81f['workflowProject'];}[a54_0xb99464(0x1ef)](_0x140653,_0x2c27cd,_0xb262fa=0x0){const _0x2ae4b8=a54_0xb99464,_0x108f96=this[_0x2ae4b8(0x178)](_0x140653,_0x2c27cd,_0xb262fa);if(!_0x108f96)return console[_0x2ae4b8(0x274)](a54_0x3265bd['red'](_0x2ae4b8(0x1dc)),_0x2ae4b8(0x164)),console[_0x2ae4b8(0x274)](a54_0x3265bd[_0x2ae4b8(0x1a1)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x108f96;}[a54_0xb99464(0x15b)](_0x5ed73c,_0x17067e){const _0x27ae7b=a54_0xb99464;if(_0x5ed73c[0x0]){const _0x49826c=_0x5ed73c[0x0][_0x27ae7b(0x242)]('.');if(_0x49826c[_0x27ae7b(0x1b9)]===0x1)return{'projectName':_0x49826c[0x0],'workflowName':undefined};else return _0x49826c[_0x27ae7b(0x1b9)]===0x2?{'projectName':_0x49826c[0x0],'workflowName':_0x49826c[0x1]}:(console[_0x27ae7b(0x274)](a54_0x3265bd['red']('Error:'),_0x27ae7b(0x1ec)),null);}return{'projectName':_0x17067e[_0x27ae7b(0x23a)],'workflowName':undefined};}[a54_0xb99464(0x284)](_0x591f8a,_0x5414a2,_0x323af7=0x0){const _0x5da64b=a54_0xb99464;if(_0x591f8a[_0x323af7])return _0x591f8a[_0x323af7];if(_0x5414a2[_0x5da64b(0x23a)]){const _0x3e3c07=a54_0x5df1b0[_0x5da64b(0x237)](process[_0x5da64b(0x1b7)](),_0x5da64b(0x1d5),_0x5414a2[_0x5da64b(0x23a)]);if(existsSync(a54_0x5df1b0[_0x5da64b(0x237)](_0x3e3c07,_0x5da64b(0x1c2))))return _0x3e3c07;}return undefined;}async[a54_0xb99464(0x2b1)](_0x5bff1d,_0x11e777,_0x9b39aa){const _0x1b9dd6=a54_0xb99464;try{const _0x5ba007=await _0x5bff1d[_0x1b9dd6(0x229)][_0x1b9dd6(0x1d5)](_0x11e777,{'limit':0x1});if(_0x5ba007[_0x1b9dd6(0x1b9)]>0x0){const _0x13cc81=_0x5ba007[0x0]['id'],_0x202996=getWorkflowUrl(_0x9b39aa,_0x13cc81);console[_0x1b9dd6(0x274)](_0x1b9dd6(0x1b5)+a54_0x3265bd['cyan'](_0x202996));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a54_0xb99464(0x1be);[a54_0xb99464(0x13a)]=a54_0xb99464(0x24d);async['execute'](_0x58f1f9){const _0x31ef66=a54_0xb99464,{options:_0x388b1a,args:_0x3d4dc6,tdx:_0x5832e3}=_0x58f1f9,_0x26ac55=_0x3d4dc6[0x0],_0x541416=_0x388b1a[_0x31ef66(0x16d)];if(_0x541416)return saveSessionContext({'workflow_project':undefined},_0x388b1a[_0x31ef66(0x29b)]),console[_0x31ef66(0x25a)](a54_0x3265bd[_0x31ef66(0x119)](_0x31ef66(0x129))),0x0;if(!_0x26ac55)return console[_0x31ef66(0x274)](a54_0x3265bd['red'](_0x31ef66(0x1dc)),_0x31ef66(0x164)),console[_0x31ef66(0x274)](a54_0x3265bd['dim']('Usage:\x20tdx\x20wf\x20use\x20<project>')),console['error'](a54_0x3265bd['dim'](_0x31ef66(0x2b5))),0x1;const _0x3a4263=await withSpinner(_0x31ef66(0x28f)+_0x26ac55+'\x27...',()=>_0x5832e3[_0x31ef66(0x229)][_0x31ef66(0x2a8)](_0x26ac55),{'verbose':_0x388b1a[_0x31ef66(0x2a9)]}),{name:_0x1c322c}=_0x3a4263[_0x31ef66(0x149)];return saveSessionContext({'workflow_project':_0x1c322c},_0x388b1a[_0x31ef66(0x29b)]),console['log'](a54_0x3265bd[_0x31ef66(0x119)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a54_0x3265bd['cyan'](_0x1c322c))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x200);['description']='List\x20all\x20workflow\x20projects';async[a54_0xb99464(0x1e1)](_0x25cc5b){const _0x3d2d12=a54_0xb99464,{options:_0x506b18,args:_0xa2db4d,tdx:_0x1aca75}=_0x25cc5b,_0x30912f=_0xa2db4d[0x0];_0x506b18[_0x3d2d12(0x2a9)]&&_0x30912f&&console['error'](_0x3d2d12(0x205)+_0x30912f);const _0x2567fb=await withSpinner(_0x3d2d12(0x2cf),()=>_0x1aca75['workflow'][_0x3d2d12(0x230)](_0x30912f,{'limit':_0x506b18[_0x3d2d12(0x14e)]}),{'verbose':_0x506b18['verbose']});let _0x16e655=_0x2567fb['data'];_0x16e655['sort']((_0x21b355,_0x756599)=>_0x21b355[_0x3d2d12(0x2ba)][_0x3d2d12(0x1d2)](_0x756599[_0x3d2d12(0x2ba)]));const _0x17247b=_0x506b18['limit']||0x64,_0x2e6eca=_0x16e655[_0x3d2d12(0x1b9)]>=_0x17247b?a54_0x3265bd[_0x3d2d12(0x1a1)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3d2d12(0x274)](_0x3d2d12(0x28e)+_0x16e655[_0x3d2d12(0x1b9)]+'\x20project'+(_0x16e655[_0x3d2d12(0x1b9)]!==0x1?'s':'')+_0x2e6eca);if(_0x506b18[_0x3d2d12(0x256)]===_0x3d2d12(0x279)||_0x506b18[_0x3d2d12(0x256)]===_0x3d2d12(0x197)||_0x506b18[_0x3d2d12(0x256)]===_0x3d2d12(0x1c1))await handleSDKOutput(_0x16e655,_0x506b18);else{if(_0x16e655[_0x3d2d12(0x1b9)]===0x0)_0x30912f?console[_0x3d2d12(0x25a)](_0x3d2d12(0x1fd)+_0x30912f):console[_0x3d2d12(0x25a)](_0x3d2d12(0x299));else{const _0x48135f=_0x16e655[_0x3d2d12(0x127)](_0x1671af=>{const _0x4baba9=_0x3d2d12,_0x2bb9dd=_0x1671af['metadata']?.[_0x4baba9(0x23f)](_0x3cb7b5=>_0x3cb7b5[_0x4baba9(0x132)]===_0x4baba9(0x18d)),_0x118462=_0x2bb9dd?a54_0x3265bd[_0x4baba9(0x1a1)](_0x4baba9(0x134)):'';return _0x4baba9(0x290)+_0x1671af[_0x4baba9(0x2ba)]+_0x118462;});await writeOutput(_0x48135f[_0x3d2d12(0x237)]('\x0a'),_0x506b18[_0x3d2d12(0x1b6)],_0x3d2d12(0x157));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a54_0xb99464(0x246);['description']=a54_0xb99464(0x161);async[a54_0xb99464(0x1e1)](_0x2cbfd6){const _0x10f9da=a54_0xb99464,{options:_0x1daa1e,args:_0x4da627,tdx:_0x27f77e}=_0x2cbfd6,_0x295bd3=this[_0x10f9da(0x178)](_0x4da627,_0x1daa1e);_0x1daa1e['verbose']&&_0x295bd3&&console[_0x10f9da(0x274)]('Project\x20filter:\x20'+_0x295bd3);const _0x83fd14=await withSpinner(_0x10f9da(0x1e7),()=>_0x27f77e[_0x10f9da(0x229)][_0x10f9da(0x1d5)](_0x295bd3,{'limit':_0x1daa1e[_0x10f9da(0x14e)]}),{'verbose':_0x1daa1e[_0x10f9da(0x2a9)]});let _0x1abd82=_0x83fd14[_0x10f9da(0x149)];_0x1abd82['sort']((_0x467b42,_0x462c46)=>{const _0x44c3ce=_0x10f9da,_0x1a10f4=_0x467b42[_0x44c3ce(0x2ba)][_0x44c3ce(0x1d2)](_0x462c46[_0x44c3ce(0x2ba)]);if(_0x1a10f4!==0x0)return _0x1a10f4;return(_0x467b42[_0x44c3ce(0x23d)]?.[_0x44c3ce(0x2ba)]||'')['localeCompare'](_0x462c46[_0x44c3ce(0x23d)]?.[_0x44c3ce(0x2ba)]||'');});const _0x526a80=_0x1daa1e[_0x10f9da(0x14e)]||0x64,_0x1f8ebf=_0x1abd82[_0x10f9da(0x1b9)]>=_0x526a80?a54_0x3265bd[_0x10f9da(0x1a1)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x10f9da(0x274)](_0x10f9da(0x28e)+_0x1abd82[_0x10f9da(0x1b9)]+_0x10f9da(0x20b)+(_0x1abd82[_0x10f9da(0x1b9)]!==0x1?'s':'')+_0x1f8ebf);if(_0x1daa1e['format']===_0x10f9da(0x279)||_0x1daa1e['format']===_0x10f9da(0x197)||_0x1daa1e['format']===_0x10f9da(0x1c1))await handleSDKOutput(_0x1abd82,_0x1daa1e);else{if(_0x1abd82[_0x10f9da(0x1b9)]===0x0)_0x295bd3?console['log']('No\x20workflows\x20found\x20in\x20project:\x20'+_0x295bd3):console[_0x10f9da(0x25a)]('No\x20workflows\x20found');else{const _0x3e1e5a=_0x1daa1e[_0x10f9da(0x1fa)],_0xec7be0=_0x1abd82[_0x10f9da(0x127)](_0xf0d930=>{const _0x1cff3b=_0x10f9da,_0x1ca4db=a54_0x3265bd['dim']('#'+_0xf0d930['id']),_0x417204=hyperlink(_0x1ca4db,getWorkflowUrl(_0x3e1e5a,_0xf0d930['id'])),_0x48537e=_0xf0d930['project']?.[_0x1cff3b(0x2ba)]?a54_0x3265bd[_0x1cff3b(0x1a1)]('\x20('+_0xf0d930[_0x1cff3b(0x23d)]['name']+')'):'';return _0x1cff3b(0x245)+_0x417204+'\x20'+_0xf0d930[_0x1cff3b(0x2ba)]+_0x48537e;});await writeOutput(_0xec7be0[_0x10f9da(0x237)]('\x0a'),_0x1daa1e['output'],_0x10f9da(0x157));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]='workflow:sessions';[a54_0xb99464(0x13a)]=a54_0xb99464(0x192);async[a54_0xb99464(0x1e1)](_0x1a149e){const _0x238221=a54_0xb99464,{options:_0xb39081,args:_0x3ed20a,tdx:_0x71c5bd}=_0x1a149e,_0x40412f=this[_0x238221(0x15b)](_0x3ed20a,_0xb39081);if(!_0x40412f)return 0x1;const {projectName:_0x6543dd,workflowName:_0x1dd276}=_0x40412f;if(_0xb39081[_0x238221(0x2a9)]){if(_0x6543dd&&_0x1dd276)console[_0x238221(0x274)](_0x238221(0x180)+_0x6543dd+'.'+_0x1dd276);else _0x6543dd&&console[_0x238221(0x274)]('Filter:\x20project='+_0x6543dd);const _0x47192c=_0xb39081[_0x238221(0x179)];_0x47192c&&console['error'](_0x238221(0x1e8)+_0x47192c);}let _0x878221=0x28;if(process[_0x238221(0x194)]['isTTY']&&!_0xb39081[_0x238221(0x1b6)]&&!_0xb39081['format']){const _0x13faf2=process[_0x238221(0x194)]['rows']||0x28;_0x878221=Math[_0x238221(0x2b0)](0x14,Math[_0x238221(0x1f6)](_0x13faf2*0x2/0x3));}const _0x2a9ca5=_0xb39081[_0x238221(0x14e)]||_0x878221,_0x41b69d=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x71c5bd[_0x238221(0x229)][_0x238221(0x218)]({'projectName':_0x6543dd,'workflowName':_0x1dd276,'status':_0xb39081[_0x238221(0x179)],'fromTime':_0xb39081[_0x238221(0x1d0)],'toTime':_0xb39081['to'],'limit':_0x2a9ca5}),{'verbose':_0xb39081[_0x238221(0x2a9)]}),_0x45ddbc=_0x41b69d[_0x238221(0x149)];_0x45ddbc[_0x238221(0x1bc)]((_0x313950,_0x109de9)=>{const _0x5f40db=_0x238221,_0x45cf33=_0x313950[_0x5f40db(0x2c5)]||'',_0x170f70=_0x109de9['sessionTime']||'';return _0x170f70[_0x5f40db(0x1d2)](_0x45cf33);});_0x45ddbc[_0x238221(0x1b9)]>=_0x2a9ca5?console['error'](_0x238221(0x239)+_0x45ddbc[_0x238221(0x1b9)]+_0x238221(0x271)+a54_0x3265bd[_0x238221(0x1a1)](_0x238221(0x110))):console['error'](_0x238221(0x28e)+_0x45ddbc[_0x238221(0x1b9)]+'\x20session'+(_0x45ddbc[_0x238221(0x1b9)]!==0x1?'s':''));if(_0xb39081[_0x238221(0x256)]===_0x238221(0x279)||_0xb39081[_0x238221(0x256)]===_0x238221(0x197)||_0xb39081[_0x238221(0x256)]===_0x238221(0x1c1))await handleSDKOutput(_0x45ddbc,_0xb39081);else{if(!process['stdout']['isTTY']||_0xb39081['output']){if(_0x45ddbc[_0x238221(0x1b9)]===0x0){if(_0x6543dd&&_0x1dd276)console[_0x238221(0x25a)](_0x238221(0x292)+_0x6543dd+'.'+_0x1dd276);else _0x6543dd?console[_0x238221(0x25a)](_0x238221(0x16f)+_0x6543dd):console[_0x238221(0x25a)]('No\x20sessions\x20found');}else{const _0xfe0947=_0xb39081[_0x238221(0x1fa)],_0x45c3ef=this['renderSessionsTimeline'](_0x45ddbc,_0xfe0947);_0xb39081[_0x238221(0x1b6)]?await writeOutput(_0x45c3ef,_0xb39081['output'],_0x238221(0x157)):console[_0x238221(0x25a)](_0x45c3ef);}!_0x6543dd&&(console['error'](''),console['error'](a54_0x3265bd[_0x238221(0x1a1)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x238221(0x274)](a54_0x3265bd['dim'](_0x238221(0x1ba))+'or'+a54_0x3265bd[_0x238221(0x1a1)](_0x238221(0x1f9))));}else{if(_0x45ddbc[_0x238221(0x1b9)]===0x0){if(_0x6543dd&&_0x1dd276)console[_0x238221(0x25a)](_0x238221(0x292)+_0x6543dd+'.'+_0x1dd276);else _0x6543dd?console[_0x238221(0x25a)](_0x238221(0x16f)+_0x6543dd):console[_0x238221(0x25a)]('No\x20sessions\x20found');}else await this[_0x238221(0x294)](_0x45ddbc,_0x1a149e,_0x6543dd);}}return 0x0;}['renderSessionsTimeline'](_0x419134,_0x3502eb){const _0x3dfa91=a54_0xb99464,_0x26091c=[],_0x2f93c1=new Map();let _0x2a7cd0=Infinity,_0x431f3c=-Infinity;for(const _0x119052 of _0x419134){if(_0x119052[_0x3dfa91(0x206)]?.[_0x3dfa91(0x168)]){const _0x43e954=new Date(_0x119052[_0x3dfa91(0x206)][_0x3dfa91(0x168)])[_0x3dfa91(0x21b)](),_0x414b8f=_0x119052[_0x3dfa91(0x206)][_0x3dfa91(0x1e6)]?new Date(_0x119052[_0x3dfa91(0x206)][_0x3dfa91(0x1e6)])[_0x3dfa91(0x21b)]():Date[_0x3dfa91(0x186)](),_0x5bbd75=_0x119052[_0x3dfa91(0x23d)]?.[_0x3dfa91(0x2ba)]||_0x3dfa91(0x15a);!_0x2f93c1[_0x3dfa91(0x21c)](_0x5bbd75)&&_0x2f93c1[_0x3dfa91(0x138)](_0x5bbd75,[]),_0x2f93c1[_0x3dfa91(0x118)](_0x5bbd75)[_0x3dfa91(0x2c3)]({'session':_0x119052,'startTime':_0x43e954,'endTime':_0x414b8f,'duration':_0x414b8f-_0x43e954}),_0x2a7cd0=Math[_0x3dfa91(0x2c4)](_0x2a7cd0,_0x43e954),_0x431f3c=Math[_0x3dfa91(0x2b0)](_0x431f3c,_0x414b8f);}}if(_0x2f93c1[_0x3dfa91(0x15c)]===0x0)return _0x3dfa91(0x146);const _0x50ebdc=process[_0x3dfa91(0x194)][_0x3dfa91(0x15f)]||0x78,_0x43c4c5=0x1e,_0xa5d5b=0x32,_0x3ec1c9=0x4,_0x46648d=Math[_0x3dfa91(0x2c4)](_0xa5d5b,Math[_0x3dfa91(0x2b0)](_0x43c4c5,Math[_0x3dfa91(0x1f6)](_0x50ebdc*0.3))),_0x349e96=_0x50ebdc-_0x46648d-TIMELINE_CONFIG[_0x3dfa91(0x126)]-0x3-_0x3ec1c9,_0x489946=_0x431f3c-_0x2a7cd0,_0x370862=_0x489946/_0x46648d,_0x30282f=renderTimeAxis({'startTime':_0x2a7cd0,'endTime':_0x431f3c,'durationMs':_0x489946,'msPerChar':_0x370862},_0x46648d),_0x3b1d9b=[];for(const _0x2aaa04 of _0x2f93c1['values']()){_0x3b1d9b[_0x3dfa91(0x2c3)](..._0x2aaa04);}_0x3b1d9b[_0x3dfa91(0x1bc)]((_0x59cfeb,_0x543db9)=>_0x543db9[_0x3dfa91(0x1f0)]-_0x59cfeb[_0x3dfa91(0x1f0)]);const _0x555ada=new Date(_0x2a7cd0),_0x2ee94e=formatDate(_0x555ada),_0x4fffc8=_0x3ec1c9+TIMELINE_CONFIG[_0x3dfa91(0x24e)]+TIMELINE_CONFIG['ICON_SPACING']+_0x349e96,_0x2a6f8c='\x20'[_0x3dfa91(0x155)](_0x4fffc8-_0x2ee94e[_0x3dfa91(0x1b9)]),_0x527184=_0x2a6f8c+a54_0x3265bd['dim'](_0x2ee94e)+'\x20'+_0x30282f;_0x26091c[_0x3dfa91(0x2c3)](_0x527184);const _0x3d4ac1=0x16;let _0x506b2e=0x0;for(const _0x159e2b of _0x3b1d9b){const _0x31a311=_0x159e2b[_0x3dfa91(0x29b)][_0x3dfa91(0x23d)]?.[_0x3dfa91(0x2ba)]||'?',_0x439183=Math[_0x3dfa91(0x2c4)](stringWidth(_0x31a311),_0x3d4ac1);_0x506b2e=Math[_0x3dfa91(0x2b0)](_0x506b2e,_0x439183);}for(const _0x3df239 of _0x3b1d9b){const {session:_0x5b97a3,startTime:_0x5aa7cb,endTime:_0x4c93a5,duration:_0x3fdf7b}=_0x3df239,_0x46e151=_0x5b97a3[_0x3dfa91(0x23d)]?.['id'],_0xd8025e=_0x5b97a3['id'],_0x2bcf8a=_0x5b97a3[_0x3dfa91(0x23d)]?.[_0x3dfa91(0x2ba)]||'?',_0x507ebc=_0x5b97a3[_0x3dfa91(0x229)]?.[_0x3dfa91(0x2ba)]||'?';let _0x4ce2ab,_0x589953;if(_0x5b97a3['lastAttempt']){const _0x567409=_0x5b97a3['lastAttempt'];!_0x567409[_0x3dfa91(0x1c6)]?(_0x4ce2ab=_0x567409['cancelRequested']?'🛑':'🔄',_0x589953=_0x567409[_0x3dfa91(0x11b)]?a54_0x3265bd[_0x3dfa91(0x267)]:a54_0x3265bd[_0x3dfa91(0x144)]):(_0x4ce2ab=_0x567409[_0x3dfa91(0x252)]?'✅':'❌',_0x589953=_0x567409[_0x3dfa91(0x252)]?a54_0x3265bd['green']:a54_0x3265bd[_0x3dfa91(0x2aa)]);}else _0x4ce2ab='⏳',_0x589953=a54_0x3265bd[_0x3dfa91(0x1a1)];const _0x18e667='#'+_0xd8025e,_0x53eaea=_0x46e151?hyperlink(_0x18e667,getWorkflowSessionUrl(_0x3502eb,_0x46e151,_0xd8025e)):_0x18e667;let _0xaf820f=_0x2bcf8a;stringWidth(_0x2bcf8a)>_0x3d4ac1&&(_0xaf820f=_0x2bcf8a[_0x3dfa91(0x259)](0x0,_0x3d4ac1-0x1)+'…');const _0x36611c=a54_0x3265bd[_0x3dfa91(0x1a1)](_0xaf820f),_0x270885=stringWidth(_0xaf820f),_0x42441e='\x20'[_0x3dfa91(0x155)](_0x506b2e-stringWidth(_0xaf820f)+0x2),_0x3bb25a='('+formatElapsed(_0x3fdf7b)+')',_0x19b6fc=stringWidth(_0x3bb25a),_0x2ba5dd=stringWidth(_0x18e667),_0x53292b=_0x2ba5dd+0x1+_0x270885+_0x42441e[_0x3dfa91(0x1b9)],_0x134a11=_0x349e96-_0x53292b-_0x19b6fc-0x1-0x8;let _0xffc2ec=_0x507ebc;stringWidth(_0xffc2ec)>_0x134a11&&(_0xffc2ec=_0xffc2ec[_0x3dfa91(0x259)](0x0,_0x134a11-0x1)+'…');const _0x2eeb52=_0x53eaea+'\x20'+_0x36611c+_0x42441e+_0xffc2ec,_0x212d51=stringWidth(_0x2eeb52),_0xc0ec9d=_0x349e96-_0x212d51-_0x19b6fc,_0x39f009=_0x2eeb52+'\x20'['repeat'](Math[_0x3dfa91(0x2b0)](0x1,_0xc0ec9d))+a54_0x3265bd['dim'](_0x3bb25a),_0x3df19d=Math[_0x3dfa91(0x1f6)]((_0x5aa7cb-_0x2a7cd0)/_0x370862),_0x2c8db0=Math[_0x3dfa91(0x1f6)]((_0x4c93a5-_0x2a7cd0)/_0x370862),_0x167301=Math['max'](_0x3df19d+0x1,_0x2c8db0),_0x2b46d9=new Array(_0x46648d)[_0x3dfa91(0x18b)]('\x20');for(let _0x3a7c90=_0x3df19d;_0x3a7c90<Math['min'](_0x167301,_0x46648d);_0x3a7c90++){_0x2b46d9[_0x3a7c90]='─';}const _0x2baa27=_0x2b46d9[_0x3dfa91(0x127)](_0x38e529=>_0x38e529==='\x20'?'\x20':_0x589953(_0x38e529))[_0x3dfa91(0x237)]('');_0x26091c[_0x3dfa91(0x2c3)](_0x4ce2ab+'\x20'+_0x39f009+'│'+_0x2baa27+'│');}return _0x26091c[_0x3dfa91(0x237)]('\x0a');}async[a54_0xb99464(0x294)](_0x1aee33,_0xface2a,_0x1df10f){const _0x4edc64=a54_0xb99464,{options:_0x30ee56,tdx:_0x4380ee}=_0xface2a,_0x236030=_0x30ee56[_0x4edc64(0x1fa)],{timelineRows:_0x551fd1,timeAxisHeader:_0xc0a6dc}=this[_0x4edc64(0x139)](_0x1aee33,_0x236030),_0x4c5afb=_0x551fd1[_0x4edc64(0x13f)](_0x50a3de=>_0x50a3de[_0x4edc64(0x216)]);if(_0x4c5afb[_0x4edc64(0x1b9)]===0x0){const _0x2a47ce=this['renderSessionsTimeline'](_0x1aee33,_0x236030);console[_0x4edc64(0x25a)](_0x2a47ce);!_0x1df10f&&(console[_0x4edc64(0x274)](''),console[_0x4edc64(0x274)](a54_0x3265bd[_0x4edc64(0x1a1)](_0x4edc64(0x1c5))),console[_0x4edc64(0x274)](a54_0x3265bd[_0x4edc64(0x1a1)](_0x4edc64(0x1ba))+'or'+a54_0x3265bd[_0x4edc64(0x1a1)](_0x4edc64(0x1f9))));return;}_0xc0a6dc&&console[_0x4edc64(0x25a)](_0xc0a6dc);const _0x1b940d=_0x551fd1[_0x4edc64(0x13f)](_0x118f1c=>_0x118f1c[_0x4edc64(0x216)])['map'](_0x55a7ac=>({'title':_0x55a7ac[_0x4edc64(0x1fc)],'value':_0x55a7ac[_0x4edc64(0x216)]})),_0xd9722f=process[_0x4edc64(0x194)][_0x4edc64(0x1dd)]||0x3c,_0x43dfc6=Math[_0x4edc64(0x2b0)](0x28,Math[_0x4edc64(0x1f6)](_0xd9722f*0x2/0x3)),_0x3724b9=await a54_0x24334b({'type':'autocomplete','name':_0x4edc64(0x216),'message':_0x4edc64(0x112),'choices':_0x1b940d,'initial':-0x1,'limit':_0x43dfc6,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x441899,_0x210103)=>{const _0x1fffc2=_0x4edc64;if(!_0x441899)return Promise[_0x1fffc2(0x1da)](_0x210103);const _0xa1070a=_0x210103[_0x1fffc2(0x13f)](_0x2162a4=>{const _0x3850a3=_0x1fffc2,_0x45251d=_0x2162a4;return _0x45251d[_0x3850a3(0x16a)][_0x3850a3(0x2cb)]()[_0x3850a3(0x1e0)](_0x441899['toLowerCase']());});return Promise[_0x1fffc2(0x1da)](_0xa1070a);}}),_0x5b4521=()=>{const _0x1906c2=_0x4edc64;process['stdout']['write'](_0x1906c2(0x199)),process[_0x1906c2(0x194)][_0x1906c2(0x283)](_0x1906c2(0x199)),process[_0x1906c2(0x194)][_0x1906c2(0x283)](_0x1906c2(0x199));},_0x21e5ea=_0x3724b9&&_0x3724b9['attemptId']&&_0x3724b9[_0x4edc64(0x216)]!==null&&_0x3724b9['attemptId'][_0x4edc64(0x220)]()!=='';if(!_0x21e5ea){_0x5b4521(),console['log'](a54_0x3265bd[_0x4edc64(0x1a1)](_0x4edc64(0x1af)));return;}_0x5b4521();const _0x29fe3c=_0x1aee33[_0x4edc64(0x2a2)](_0x3feab1=>_0x3feab1['lastAttempt']?.['id']===_0x3724b9['attemptId']);if(_0x29fe3c){const _0x117c0e=_0x29fe3c[_0x4edc64(0x23d)]?.[_0x4edc64(0x2ba)]||'?',_0x4d18a1=_0x29fe3c[_0x4edc64(0x229)]?.['name']||'?';console[_0x4edc64(0x25a)](_0x4edc64(0x2a6)+a54_0x3265bd[_0x4edc64(0x1a1)](_0x117c0e)+_0x4edc64(0x215)+a54_0x3265bd['dim'](_0x4d18a1));}const _0x9369d=new WorkflowTimelineCommand();await _0x9369d[_0x4edc64(0x1e1)]({'args':[],'options':{..._0x30ee56,'attemptId':_0x3724b9[_0x4edc64(0x216)]},'tdx':_0x4380ee});}['generateSessionTimelineRows'](_0x4d118c,_0x465e2f){const _0x3031c4=a54_0xb99464,_0x39aa83=new Map();for(const _0x3c4e53 of _0x4d118c){_0x3c4e53['id']&&_0x3c4e53[_0x3031c4(0x206)]?.['id']&&_0x39aa83[_0x3031c4(0x138)](_0x3c4e53['id'],_0x3c4e53[_0x3031c4(0x206)]['id']);}const _0x165888=[];let _0x1e08f6='';const _0xffb720=this[_0x3031c4(0x1e4)](_0x4d118c,_0x465e2f),_0x3f7f47=_0xffb720['split']('\x0a');for(const _0xea0615 of _0x3f7f47){if(_0xea0615[_0x3031c4(0x2d3)](_0x3031c4(0x221))||_0xea0615[_0x3031c4(0x19f)](/^\s+\d{4}-\d{2}-\d{2}/))_0x1e08f6=_0xea0615;else{if(_0xea0615[_0x3031c4(0x19f)](/^[✅❌🔄🛑⏳]/)){const _0x3c775f=_0xea0615[_0x3031c4(0x19f)](/#(\d+)/),_0x2794e7=_0x3c775f?_0x3c775f[0x1]:null,_0x5b67ff=_0x2794e7?_0x39aa83[_0x3031c4(0x118)](_0x2794e7)||null:null,_0xa250eb=_0x4d118c['find'](_0x44e0ec=>_0x44e0ec['id']===_0x2794e7),_0x39d8c2=_0xa250eb?.[_0x3031c4(0x23d)]?.[_0x3031c4(0x2ba)]||'';_0x165888['push']({'displayLine':_0xea0615,'attemptId':_0x5b67ff,'projectName':_0x39d8c2});}}}return{'timelineRows':_0x165888,'timeAxisHeader':_0x1e08f6};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x18e);['description']=a54_0xb99464(0x147);async['execute'](_0x446293){const _0x4e426b=a54_0xb99464,{options:_0x35304a,args:_0x10c18c,tdx:_0x32163c}=_0x446293,_0x35f245=this[_0x4e426b(0x15b)](_0x10c18c,_0x35304a);if(!_0x35f245)return 0x1;const {projectName:_0x57b522,workflowName:_0x3afb61}=_0x35f245,_0x106e42=_0x35304a['includeRetried'];if(_0x35304a[_0x4e426b(0x2a9)]){if(_0x57b522&&_0x3afb61)console[_0x4e426b(0x274)](_0x4e426b(0x180)+_0x57b522+'.'+_0x3afb61);else _0x57b522&&console[_0x4e426b(0x274)]('Filter:\x20project='+_0x57b522);_0x106e42&&console['error'](_0x4e426b(0x19e));}const _0x48544f=await withSpinner(_0x4e426b(0x1ea),()=>_0x32163c['workflow'][_0x4e426b(0x1a5)]({'projectName':_0x57b522,'workflowName':_0x3afb61,'includeRetried':_0x106e42,'limit':_0x35304a[_0x4e426b(0x14e)]}),{'verbose':_0x35304a[_0x4e426b(0x2a9)]}),_0x13cbf1=_0x48544f['data'],_0x5aa7b3=_0x35304a['limit']||0x64,_0x59efe2=_0x13cbf1['length']>=_0x5aa7b3?a54_0x3265bd['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x4e426b(0x274)](_0x4e426b(0x28e)+_0x13cbf1[_0x4e426b(0x1b9)]+_0x4e426b(0x1d4)+(_0x13cbf1['length']!==0x1?'s':'')+_0x59efe2);if(_0x35304a[_0x4e426b(0x256)]==='json'||_0x35304a['format']===_0x4e426b(0x197)||_0x35304a['format']==='table')await handleSDKOutput(_0x13cbf1,_0x35304a);else{if(_0x13cbf1['length']===0x0){if(_0x57b522&&_0x3afb61)console[_0x4e426b(0x25a)](_0x4e426b(0x187)+_0x57b522+'.'+_0x3afb61);else _0x57b522?console[_0x4e426b(0x25a)](_0x4e426b(0x182)+_0x57b522):console[_0x4e426b(0x25a)]('No\x20attempts\x20found');}else{const _0x1fc22d=_0x35304a[_0x4e426b(0x1fa)],_0x185673=_0x13cbf1[_0x4e426b(0x127)](_0x27dd6a=>{const _0x14e5c2=_0x4e426b,_0x2e63c9=a54_0x3265bd['dim']('#'+_0x27dd6a['id']),_0x11dd0d=_0x27dd6a[_0x14e5c2(0x23d)]?.['id'],_0x4ebe76=_0x27dd6a[_0x14e5c2(0x2d2)]||_0x27dd6a[_0x14e5c2(0x1cd)],_0x45caa1=_0x11dd0d&&_0x4ebe76?hyperlink(_0x2e63c9,getWorkflowAttemptUrl(_0x1fc22d,_0x11dd0d,_0x4ebe76,_0x27dd6a['id'])):_0x2e63c9,{icon:_0x3fd399,text:_0x4f164a}=getAttemptStatusDisplay(_0x27dd6a),_0x5b6af0=(_0x27dd6a[_0x14e5c2(0x23d)]?.['name']||'?')+'.'+(_0x27dd6a['workflow']?.['name']||'?'),_0x510517=_0x27dd6a['sessionTime']?a54_0x3265bd[_0x14e5c2(0x1a1)](_0x27dd6a[_0x14e5c2(0x2c5)]):'';return(_0x45caa1+'\x20'+_0x3fd399+(_0x4f164a?'\x20'+_0x4f164a:'')+'\x20'+_0x5b6af0+'\x20'+_0x510517)[_0x14e5c2(0x183)]();});await writeOutput(_0x185673['join']('\x0a'),_0x35304a[_0x4e426b(0x1b6)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a54_0xb99464(0x13a)]=a54_0xb99464(0x240);async['execute'](_0x21faf4){const _0x5cb40f=a54_0xb99464,{options:_0x4d022e,args:_0xb5a7f,tdx:_0x507682}=_0x21faf4,_0x2d40c5=_0xb5a7f[0x0];if(!_0x2d40c5)return console[_0x5cb40f(0x274)](_0x5cb40f(0x2ce)),0x1;_0x4d022e[_0x5cb40f(0x2a9)]&&console[_0x5cb40f(0x274)](_0x5cb40f(0x24c)+_0x2d40c5);const _0x2ffa0c=await withSpinner(_0x5cb40f(0x276),()=>_0x507682[_0x5cb40f(0x229)]['attempt'](_0x2d40c5),{'verbose':_0x4d022e[_0x5cb40f(0x2a9)]}),_0x420c59=_0x2ffa0c[_0x5cb40f(0x149)];let _0x4bace2;!_0x420c59[_0x5cb40f(0x1c6)]?_0x4bace2=_0x420c59[_0x5cb40f(0x11b)]?_0x5cb40f(0x28b):_0x5cb40f(0x148):_0x4bace2=_0x420c59[_0x5cb40f(0x252)]?_0x5cb40f(0x252):_0x5cb40f(0x274);let _0xeb132;if(_0x420c59[_0x5cb40f(0x168)]&&_0x420c59['finishedAt']){const _0x169679=new Date(_0x420c59[_0x5cb40f(0x168)])[_0x5cb40f(0x21b)](),_0x30ca58=new Date(_0x420c59['finishedAt'])[_0x5cb40f(0x21b)]();_0xeb132=Math[_0x5cb40f(0x2cc)]((_0x30ca58-_0x169679)/0x3e8);}const _0x12e788={'attempt_id':_0x420c59['id'],'status':_0x4bace2,..._0x420c59[_0x5cb40f(0x2b2)]!==undefined&&{'index':_0x420c59[_0x5cb40f(0x2b2)]},..._0x420c59[_0x5cb40f(0x23d)]&&{'project':_0x420c59[_0x5cb40f(0x23d)][_0x5cb40f(0x2ba)]},..._0x420c59[_0x5cb40f(0x229)]&&{'workflow':_0x420c59[_0x5cb40f(0x229)][_0x5cb40f(0x2ba)]},..._0x420c59[_0x5cb40f(0x1cd)]&&{'session_id':_0x420c59['sessionId']},..._0x420c59[_0x5cb40f(0x2c5)]&&{'session_time':_0x420c59[_0x5cb40f(0x2c5)]},..._0x420c59[_0x5cb40f(0x26f)]&&{'retry_attempt':_0x420c59[_0x5cb40f(0x26f)]},..._0xeb132!==undefined&&{'duration_sec':_0xeb132},..._0x420c59[_0x5cb40f(0x168)]&&{'created_at':_0x420c59[_0x5cb40f(0x168)]},..._0x420c59['finishedAt']&&{'finished_at':_0x420c59[_0x5cb40f(0x1e6)]},...Object[_0x5cb40f(0x1b8)](_0x420c59[_0x5cb40f(0x158)])['length']>0x0&&{'params':_0x420c59[_0x5cb40f(0x158)]}};return await handleSingleObjectOutput(_0x12e788,_0x4d022e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x1fb);[a54_0xb99464(0x13a)]=a54_0xb99464(0x12d);async[a54_0xb99464(0x1e1)](_0x1808b1){const _0x12e1b4=a54_0xb99464,{options:_0x29bc41,args:_0x1446bb,tdx:_0x3f697f}=_0x1808b1,_0xa43997=_0x1446bb[0x0];if(!_0xa43997)return console[_0x12e1b4(0x274)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x841438=_0x29bc41[_0x12e1b4(0x26d)];_0x29bc41[_0x12e1b4(0x2a9)]&&(console[_0x12e1b4(0x274)](_0x12e1b4(0x24c)+_0xa43997),_0x841438&&console[_0x12e1b4(0x274)](_0x12e1b4(0x1de)));const _0x23f9f2=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x3f697f[_0x12e1b4(0x229)][_0x12e1b4(0x21f)](_0xa43997,_0x841438||![]),{'verbose':_0x29bc41[_0x12e1b4(0x2a9)]}),_0x4695d6=_0x23f9f2['data'];return console[_0x12e1b4(0x274)](_0x12e1b4(0x28e)+_0x4695d6[_0x12e1b4(0x1b9)]+_0x12e1b4(0x208)+(_0x4695d6['length']!==0x1?'s':'')),await handleSDKOutput(_0x4695d6,_0x29bc41),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x20c);['description']=a54_0xb99464(0x191);async['execute'](_0x4c0b88){const _0x3b87b3=a54_0xb99464,{options:_0x23b51f,args:_0x162302,tdx:_0x579c9b}=_0x4c0b88,_0x419065=_0x162302[0x0];let _0x549579=_0x162302[0x1];if(!_0x419065)return console['error'](_0x3b87b3(0x2ce)),0x1;_0x23b51f[_0x3b87b3(0x2a9)]&&(console['error']('Attempt\x20ID:\x20'+_0x419065),_0x549579&&console[_0x3b87b3(0x274)](_0x3b87b3(0x288)+_0x549579));const _0xe0b3f3=await withSpinner('Fetching\x20log\x20files...',()=>_0x579c9b[_0x3b87b3(0x229)][_0x3b87b3(0x21d)](_0x419065,_0x549579),{'verbose':_0x23b51f[_0x3b87b3(0x2a9)]}),_0x8d6098=_0xe0b3f3[_0x3b87b3(0x149)];if(_0x8d6098[_0x3b87b3(0x1b9)]===0x0)return console[_0x3b87b3(0x274)](_0x3b87b3(0x25f)),0x0;if(!_0x549579&&(_0x23b51f['json']||_0x23b51f[_0x3b87b3(0x256)]))return await handleSDKOutput(_0x8d6098,_0x23b51f),0x0;if(!_0x549579){const _0x44de1=_0x8d6098['map'](_0x3222db=>({'title':_0x3222db[_0x3b87b3(0x130)]+'\x20('+formatBytes(_0x3222db[_0x3b87b3(0x2ad)])+')','value':_0x3222db['taskName']})),_0x209aec=await a54_0x24334b({'type':'select','name':_0x3b87b3(0x24b),'message':_0x3b87b3(0x29a),'choices':_0x44de1});if(!_0x209aec['task'])return console[_0x3b87b3(0x274)](_0x3b87b3(0x1af)),0x0;_0x549579=_0x209aec[_0x3b87b3(0x24b)];}const _0x36d1c7=await withSpinner(_0x3b87b3(0x1f7),()=>_0x579c9b[_0x3b87b3(0x229)][_0x3b87b3(0x219)](_0x419065,_0x549579),{'verbose':_0x23b51f[_0x3b87b3(0x2a9)]}),_0x2cc68d=_0x36d1c7[_0x3b87b3(0x149)];return _0x2cc68d?console[_0x3b87b3(0x25a)](_0x2cc68d):console['error'](_0x3b87b3(0x233)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x1ab);[a54_0xb99464(0x13a)]=a54_0xb99464(0x217);async[a54_0xb99464(0x1e1)](_0x7c0d72){const _0x27b9fc=a54_0xb99464,{options:_0x3fb5a4,args:_0x4dbdea,tdx:_0x6f3e73}=_0x7c0d72,_0x346c18=_0x4dbdea[0x0];if(!_0x346c18)return console[_0x27b9fc(0x274)](_0x27b9fc(0x2ce)),0x1;const _0x34c02c=_0x3fb5a4['reason'];_0x3fb5a4[_0x27b9fc(0x2a9)]&&(console[_0x27b9fc(0x274)](_0x27b9fc(0x24c)+_0x346c18),_0x34c02c&&console[_0x27b9fc(0x274)](_0x27b9fc(0x1ae)+_0x34c02c));if(!_0x3fb5a4[_0x27b9fc(0x167)]){if(!isInteractive())return console[_0x27b9fc(0x274)](a54_0x3265bd[_0x27b9fc(0x2aa)]('\x0aError:'),_0x27b9fc(0x2c6)),console[_0x27b9fc(0x274)](a54_0x3265bd[_0x27b9fc(0x1a1)](_0x27b9fc(0x128))),0x1;const _0x4e81ba=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x346c18+'?');if(!_0x4e81ba)return console['error'](a54_0x3265bd[_0x27b9fc(0x267)](_0x27b9fc(0x1af))),0x1;}const _0x546e3d=await withSpinner(_0x27b9fc(0x214),()=>_0x6f3e73[_0x27b9fc(0x229)]['kill'](_0x346c18,_0x34c02c),{'verbose':_0x3fb5a4['verbose']}),_0x5d26fa=_0x546e3d[_0x27b9fc(0x149)];return console[_0x27b9fc(0x274)]('✔\x20'+_0x5d26fa),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x258);['description']=a54_0xb99464(0x2d4);async[a54_0xb99464(0x1e1)](_0x5aae24){const _0x3532ad=a54_0xb99464,{options:_0x595cdf,args:_0x5e39a2,tdx:_0x44aca1}=_0x5aae24,_0x1cfd35=_0x5e39a2[0x0];if(!_0x1cfd35)return console[_0x3532ad(0x274)](_0x3532ad(0x1cb)),console['error'](_0x3532ad(0x22d)),0x1;let _0x1012bf=![],_0x1ff4a4=_0x1cfd35;if(_0x1cfd35[_0x3532ad(0x2d3)](_0x3532ad(0x1aa)))_0x1012bf=!![],_0x1ff4a4=_0x1cfd35['substring'](0x8);else{if(_0x1cfd35[_0x3532ad(0x2d3)](_0x3532ad(0x19c)))_0x1012bf=![],_0x1ff4a4=_0x1cfd35[_0x3532ad(0x297)](0x8);else return console[_0x3532ad(0x274)](_0x3532ad(0x1f5)),console[_0x3532ad(0x274)](_0x3532ad(0x22d)),0x1;}const _0x430805=_0x595cdf[_0x3532ad(0x165)],_0x4cb680=_0x595cdf[_0x3532ad(0x177)],_0x230f07=_0x595cdf[_0x3532ad(0x158)],_0x270b73=_0x595cdf[_0x3532ad(0x14b)];_0x595cdf[_0x3532ad(0x2a9)]&&(console[_0x3532ad(0x274)](_0x3532ad(0x2ae)+(_0x1012bf?_0x3532ad(0x29b):_0x3532ad(0x1ca))+'\x20'+_0x1ff4a4),_0x430805&&console[_0x3532ad(0x274)](_0x3532ad(0x266)+_0x430805),_0x4cb680&&console['error'](_0x3532ad(0x11d)+_0x4cb680),_0x230f07&&console[_0x3532ad(0x274)]('Params:\x20'+_0x230f07),_0x270b73&&console[_0x3532ad(0x274)](_0x3532ad(0x25b)));let _0x40a6c5;if(_0x230f07)try{if(_0x230f07[_0x3532ad(0x2d3)]('@')){const _0x59ac24=await import(_0x3532ad(0x1d3)),_0x4e49f2=_0x230f07[_0x3532ad(0x297)](0x1),_0x5e3d9a=await _0x59ac24[_0x3532ad(0x222)](_0x4e49f2,_0x3532ad(0x140));_0x40a6c5=JSON[_0x3532ad(0x1b0)](_0x5e3d9a);}else _0x40a6c5=JSON[_0x3532ad(0x1b0)](_0x230f07);}catch{return console['error'](_0x3532ad(0x27a)),0x1;}if(!_0x595cdf['yes']){if(!isInteractive())return console['error'](a54_0x3265bd[_0x3532ad(0x2aa)](_0x3532ad(0x11a)),_0x3532ad(0x2c6)),console[_0x3532ad(0x274)](a54_0x3265bd[_0x3532ad(0x1a1)](_0x3532ad(0x128))),0x1;const _0x1d90c9=await confirmKey(_0x3532ad(0x1f1)+(_0x1012bf?_0x3532ad(0x29b):'attempt')+'\x20'+_0x1ff4a4+'?');if(!_0x1d90c9)return console['error'](a54_0x3265bd[_0x3532ad(0x267)]('Cancelled')),0x1;}let _0x4a2bab;_0x1012bf?_0x4a2bab=await withSpinner('Retrying\x20session...',()=>_0x44aca1[_0x3532ad(0x229)]['retrySession'](_0x1ff4a4,{'fromTask':_0x430805,'retryParams':_0x40a6c5}),{'verbose':_0x595cdf[_0x3532ad(0x2a9)]}):_0x4a2bab=await withSpinner('Retrying\x20attempt...',()=>_0x44aca1['workflow']['retryAttempt'](_0x1ff4a4,{'resumeFrom':_0x4cb680,'retryParams':_0x40a6c5,'force':_0x270b73}),{'verbose':_0x595cdf['verbose']});const _0x44fce2=_0x4a2bab[_0x3532ad(0x149)];return console['error'](_0x3532ad(0x235)),console[_0x3532ad(0x274)](_0x3532ad(0x13c)+_0x44fce2[_0x3532ad(0x216)]),console[_0x3532ad(0x274)]('\x20\x20Session\x20ID:\x20'+_0x44fce2[_0x3532ad(0x1cd)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x159);['description']='Start\x20a\x20workflow\x20run';async[a54_0xb99464(0x1e1)](_0x5c78c5){const _0x5c73bd=a54_0xb99464,{options:_0x6a6813,args:_0xf7d53b,tdx:_0x2f8cde}=_0x5c78c5;let _0x351b30=_0xf7d53b[0x0];if(!_0x351b30){const _0x50bf60=this[_0x5c73bd(0x178)]([],_0x6a6813),_0x6abbb2=await withSpinner(_0x5c73bd(0x21e),()=>_0x2f8cde[_0x5c73bd(0x229)][_0x5c73bd(0x1d5)](_0x50bf60,{'limit':_0x6a6813[_0x5c73bd(0x14e)]}),{'verbose':_0x6a6813[_0x5c73bd(0x2a9)]}),_0x2e0a83=_0x6abbb2[_0x5c73bd(0x149)];if(_0x2e0a83[_0x5c73bd(0x1b9)]===0x0)return console[_0x5c73bd(0x274)]('No\x20workflows\x20found'),!_0x50bf60&&console[_0x5c73bd(0x274)](a54_0x3265bd[_0x5c73bd(0x1a1)](_0x5c73bd(0x2bf))),0x1;const _0x5c800c=_0x2e0a83[_0x5c73bd(0x127)](_0x25fbc5=>({'title':_0x25fbc5[_0x5c73bd(0x23d)]?.[_0x5c73bd(0x2ba)]+'.'+_0x25fbc5[_0x5c73bd(0x2ba)],'value':_0x25fbc5[_0x5c73bd(0x23d)]?.['name']+'.'+_0x25fbc5['name'],'description':_0x25fbc5[_0x5c73bd(0x261)]?'revision:\x20'+_0x25fbc5[_0x5c73bd(0x261)]:undefined})),_0x42bda3=await a54_0x24334b({'type':_0x5c73bd(0x173),'name':_0x5c73bd(0x229),'message':_0x5c73bd(0x1a7),'choices':_0x5c800c});if(!_0x42bda3[_0x5c73bd(0x229)])return 0x1;_0x351b30=_0x42bda3[_0x5c73bd(0x229)];}if(!_0x351b30[_0x5c73bd(0x1e0)]('.')){const _0x257dbe=this[_0x5c73bd(0x178)]([],_0x6a6813);if(_0x257dbe)_0x351b30=_0x257dbe+'.'+_0x351b30;else return console[_0x5c73bd(0x274)](a54_0x3265bd['red']('Error:'),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x5c73bd(0x274)](a54_0x3265bd[_0x5c73bd(0x1a1)](_0x5c73bd(0x2bf))),0x1;}const _0x378063=_0x6a6813[_0x5c73bd(0x21a)],_0x21eed2=_0x6a6813[_0x5c73bd(0x2c5)],_0x3240e6={};if(_0x378063&&Array[_0x5c73bd(0x2ab)](_0x378063))for(const _0x4ae9a1 of _0x378063){const _0x3d6708=_0x4ae9a1[_0x5c73bd(0x1a9)]('=');if(_0x3d6708===-0x1)return console[_0x5c73bd(0x274)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x4ae9a1),console[_0x5c73bd(0x274)](_0x5c73bd(0x228)),0x1;const _0x67a7f1=_0x4ae9a1['substring'](0x0,_0x3d6708),_0x33cb36=_0x4ae9a1[_0x5c73bd(0x297)](_0x3d6708+0x1);try{_0x3240e6[_0x67a7f1]=JSON['parse'](_0x33cb36);}catch{_0x3240e6[_0x67a7f1]=_0x33cb36;}}_0x6a6813[_0x5c73bd(0x2a9)]&&(console[_0x5c73bd(0x274)](_0x5c73bd(0x17c)+_0x351b30),Object[_0x5c73bd(0x1b8)](_0x3240e6)[_0x5c73bd(0x1b9)]>0x0&&console[_0x5c73bd(0x274)](_0x5c73bd(0x154)+JSON['stringify'](_0x3240e6)),_0x21eed2&&console[_0x5c73bd(0x274)]('Session\x20time:\x20'+_0x21eed2));const _0x3daf52=await withSpinner(_0x5c73bd(0x23e),()=>_0x2f8cde[_0x5c73bd(0x229)][_0x5c73bd(0x153)](_0x351b30,_0x3240e6,{'sessionTime':_0x21eed2}),{'verbose':_0x6a6813[_0x5c73bd(0x2a9)]}),_0x529d95=_0x3daf52[_0x5c73bd(0x149)];console[_0x5c73bd(0x274)]('✔\x20Workflow\x20run\x20started'),console['error'](_0x5c73bd(0x111)+_0x529d95['id']),console[_0x5c73bd(0x274)](_0x5c73bd(0x2b7)+_0x529d95[_0x5c73bd(0x1cd)]),console[_0x5c73bd(0x274)]('\x20\x20Project:\x20'+_0x529d95[_0x5c73bd(0x23d)]?.['name']),console[_0x5c73bd(0x274)](_0x5c73bd(0x236)+_0x529d95[_0x5c73bd(0x229)]?.[_0x5c73bd(0x2ba)]);if(_0x529d95[_0x5c73bd(0x23d)]?.['id']&&_0x529d95[_0x5c73bd(0x1cd)]&&_0x529d95['id']){const _0x31fe60=_0x6a6813[_0x5c73bd(0x1fa)],_0x1b64f5=getConsoleUrl(_0x31fe60,'/app/workflows/'+_0x529d95[_0x5c73bd(0x23d)]['id']+_0x5c73bd(0x1ce)+_0x529d95[_0x5c73bd(0x1cd)]+_0x5c73bd(0x28d)+_0x529d95['id']);console[_0x5c73bd(0x274)]('\x20\x20Console:\x20'+a54_0x3265bd['cyan'](_0x1b64f5));}return 0x0;}}function a54_0x299b(){const _0x3bed1f=['buildTimelineData','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','workflow:schedule:enable','GUTTER','map','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','✔\x20Workflow\x20project\x20context\x20cleared.','LABEL_MIN_SPACING','every','padStart','Show\x20tasks\x20for\x20an\x20attempt','projectId','pullProject','taskName','getMinutes','key','-\x20no\x20files\x20written','\x20(system)','\x20deleted','MAX_TIMELINE_WIDTH','nextRunTime','set','generateSessionTimelineRows','description','type','\x20\x20New\x20attempt\x20ID:\x20','modified','→\x20Project:\x20','filter','utf-8','Project\x20directory:\x20','Source\x20project:\x20','workflow:timeline','blue','isTTY','No\x20sessions\x20with\x20timing\x20information','List\x20workflow\x20attempts','running','data','Disabling\x20schedule\x20#','force','splice','deleted','limit','---\x20','Error:\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','text','run','Parameters:\x20','repeat','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','list','params','workflow:run','(unknown)','parseProjectWorkflowPattern','size','Target\x20directory:\x20','\x20to\x20see\x20detailed\x20logs','columns','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','List\x20workflows','1zlKEdu','disableSchedule','Project\x20name\x20is\x20required','fromTask','Session\x20not\x20found:\x20','yes','createdAt','-\x20nothing\x20pushed','title','toLocaleString','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','clear','\x20logs','No\x20sessions\x20found\x20in\x20project:\x20','workflow:secrets:set','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','45tbzrvB','select','\x20\x20Project:\x20','\x20new','\x22\x20already\x20exists\x20(ID:\x20','resumeFrom','resolveProject','status','\x27\x20from\x20project\x20\x27','💡\x20Tip:\x20Use\x20','Workflow:\x20','\x20enabled\x20(','Key\x20cannot\x20be\x20empty','workflowName','Filter:\x20','Downloading\x20project\x20','No\x20attempts\x20found\x20in\x20project:\x20','trimEnd','\x0aDry\x20run\x20-\x20no\x20files\x20written','✔\x20Push\x20complete','now','No\x20attempts\x20found\x20for:\x20','Enable\x20a\x20workflow\x20schedule','\x20-\x20','\x20\x20Project\x20ID:\x20','fill','durationMs','sys','workflow:attempts','Pushing\x20project...','changes','Show\x20logs\x20for\x20a\x20workflow\x20attempt','List\x20workflow\x20execution\x20sessions','203496NzmBtJ','stdout','tdx\x20wf\x20attempt\x20','sourceProjectName','jsonl','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x1b[1A\x1b[2K','TASK_NAME_WIDTH','MAX_POLL_ITERATIONS','attempt:','Updating\x20','Include\x20retried:\x20yes','match','\x20\x20Revision:\x20','dim','No\x20workflow\x20sessions\x20found','\x20\x20Location:\x20','enableSchedule','attempts','Dry\x20run:\x20yes','Select\x20a\x20workflow\x20to\x20run','msPerChar','indexOf','session:','workflow:kill','cyan','Deleting\x20project\x20','Reason:\x20','Cancelled','parse','Select\x20a\x20session\x20to\x20view\x20timeline:','Revision:\x20','Listing\x20secrets...','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','\x20\x20Console:\x20','output','cwd','keys','length','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20(disabled)','sort','Session\x20','workflow:use','Schedule\x20ID\x20is\x20required','message','table','tdx.json','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','startedAt','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','done','\x20from\x20session\x20','1967182NMNrhv','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','attempt','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','MAX_LABEL_COUNT','sessionId','/sessions/','hasChanges','from','\x20is\x20not\x20a\x20directory','localeCompare','fs/promises','\x20attempt','workflows','applyPullProject','LABEL_WIDTH_DIVISOR','state','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','resolve','pending','Error:','rows','Including\x20subtasks:\x20yes','targetDir','includes','execute','getDate','✔\x20Secret\x20\x27','renderSessionsTimeline','✔\x20Project\x20updated','finishedAt','Listing\x20workflows...','Status:\x20','stat','Listing\x20workflow\x20attempts...','path','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','workflow:pull','\x20of\x20','requireProject','startTime','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Tip:\x20cd\x20to\x20workflows/','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x20\x20Next\x20run:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','floor','Downloading\x20logs...','Validation:\x20skipped','\x20\x20tdx\x20wf\x20use\x20<project>','site','workflow:tasks','displayLine','No\x20projects\x20match\x20pattern:\x20','unchanged','end','workflow:projects','Deleting\x20secret...','summary','planned','workflow:schedule:disable','Pattern:\x20','lastAttempt','\x20secrets\x20set\x20for\x20project\x20\x27','\x20task','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','duration','\x20workflow','workflow:logs','all','preparePushProject','pollTimeline','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Loading\x20session...','✔\x20Schedule\x20#','workflow:clone','Killing\x20attempt...',',\x20Workflow:\x20','attemptId','Kill\x20a\x20running\x20attempt','sessions','logs','param','getTime','has','logFiles','Loading\x20workflows...','tasks','trim','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','readFile','white','renderSingleTimeline','\x20schedule','📅\x20#','workflow:delete','Expected\x20format:\x20--param\x20key=value','workflow','No\x20schedules\x20found','getHours','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','✔\x20Deleted\x20project\x20','\x0a✔\x20Already\x20up\x20to\x20date','projects','group_error','listSecrets','No\x20log\x20content\x20found','Warning:','✔\x20Retry\x20started','\x20\x20Workflow:\x20','join','newProjectName','✔\x20Showing\x20','workflowProject','Failed\x20to\x20fetch\x20attempt\x20data','Secrets\x20to\x20set:\x20','project','Starting\x20workflow\x20run...','some','Show\x20specific\x20attempt\x20details','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','split','Key:\x20','Listing\x20schedules...','📋\x20','workflow:workflows','✔\x20Pull\x20complete','\x22\x20with\x20new\x20revision?','follow','Output\x20directory:\x20','task','Attempt\x20ID:\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','ICON_WIDTH','basename','workflow:download','862614SyoUpJ','success','deleteSecret','getFullYear','prepareCloneProject','format','...','workflow:retry','slice','log','Force:\x20yes','value','Setting\x20secret...','Cloning\x20to\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Files\x20to\x20upload:\x20','revision','Filter:\x20project=','Using\x20attempt\x20','Error:\x20Secret\x20key\x20is\x20required','unknown','From\x20task:\x20','yellow','\x0aDry\x20run\x20-\x20no\x20project\x20created','668034wIrfkj','workflow:schedules','\x0a✔\x20No\x20changes\x20to\x20push','projectName','includeSubtasks','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','retryAttemptName','disabledAt','\x20sessions\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x0aPush\x20these\x20changes?','error','fullName','Getting\x20attempt\x20details...','\x0a✔\x20Attempt\x20complete','886368VRdtji','json','Error:\x20Invalid\x20JSON\x20in\x20--params','\x22\x20to\x20new\x20project\x20\x22','\x20disabled\x20(','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','updatedAt','Pull\x20workflow\x20project\x20to\x20local\x20folder','workflow:upload','\x20\x20Target:\x20','\x20secret','write','resolveProjectDir','ICON_SPACING','\x20next:\x20','\x20has\x20no\x20attempts','Task\x20name:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','\x0a⚠\x20Project\x20\x22','canceling','start','/attempt/','✔\x20Found\x20','Resolving\x20project\x20\x27','📁\x20','MAX_TASKS_DISPLAY','No\x20sessions\x20found\x20for:\x20','icon','navigateSessionsInteractive','Invalid\x20format:\x20','diff','substring','\x0aClone\x20\x22','No\x20workflow\x20projects\x20found','Select\x20a\x20task\x20to\x20view\x20logs:','session','4xCFImk','toISOString','Attempt:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20tasks','find','Error:\x20Project\x20name\x20is\x20required','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Analyzing\x20project...','Project:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','resolveProjectId','verbose','red','isArray','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','fileSize','Target:\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','max','showWorkflowConsoleUrl','index','dryRun','newProjectId','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','\x20\x20Session\x20ID:\x20','Source\x20directory\x20is\x20required','Total:\x20','name','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','getMonth','skipValidation','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','targetExists','sourceDir','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','push','min','sessionTime','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Setting\x20','window','delete','toLowerCase','round','context','Error:\x20Attempt\x20ID\x20is\x20required','Listing\x20workflow\x20projects...','.\x20Expected\x20format:\x20KEY=VALUE','New\x20project\x20name:\x20','session_id','startsWith','Retry\x20a\x20session\x20or\x20attempt','\x20unchanged','(use\x20--limit\x20to\x20see\x20more)','\x20\x20Attempt\x20ID:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','new','1879855nQFyCn','Latest\x20session\x20has\x20no\x20attempt','MIN_TIMELINE_WIDTH','isDirectory','get','green','\x0aError:','cancelRequested','\x20\x20Session\x20context\x20set\x20to:\x20','Resume\x20from:\x20','No\x20workflow\x20tdx.json\x20found','\x0aApply\x20these\x20changes?','relative','workflow:secrets:delete','524280UNQvkP'];a54_0x299b=function(){return _0x3bed1f;};return a54_0x299b();}export class WorkflowDownloadCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x250);[a54_0xb99464(0x13a)]=a54_0xb99464(0x2a4);async[a54_0xb99464(0x1e1)](_0x46c51c){const _0x32a1d2=a54_0xb99464,{options:_0x52696e,args:_0x26c995,tdx:_0x17de19}=_0x46c51c,_0x511835=_0x26c995[0x0],_0x4a4122=_0x26c995[0x1]||'.';if(!_0x511835)return console[_0x32a1d2(0x274)](_0x32a1d2(0x2a3)),console[_0x32a1d2(0x274)](_0x32a1d2(0x171)),0x1;const _0x4bc4de=_0x52696e[_0x32a1d2(0x261)];_0x52696e[_0x32a1d2(0x2a9)]&&(console[_0x32a1d2(0x274)](_0x32a1d2(0x2a6)+_0x511835),console[_0x32a1d2(0x274)](_0x32a1d2(0x24a)+_0x4a4122),_0x4bc4de&&console['error'](_0x32a1d2(0x1b2)+_0x4bc4de));const _0x3aa670=await withSpinner(_0x32a1d2(0x181)+_0x511835+'...',()=>_0x17de19[_0x32a1d2(0x229)]['download'](_0x511835,_0x4a4122,{'revision':_0x4bc4de}),{'verbose':_0x52696e[_0x32a1d2(0x2a9)]}),_0x4c756b=_0x3aa670[_0x32a1d2(0x149)];return console[_0x32a1d2(0x274)]('✔\x20Downloaded\x20'+_0x4c756b['projectName']),console[_0x32a1d2(0x274)]('\x20\x20Revision:\x20'+_0x4c756b[_0x32a1d2(0x261)]),console[_0x32a1d2(0x274)]('\x20\x20Files\x20extracted:\x20'+_0x4c756b['filesExtracted']),console[_0x32a1d2(0x274)](_0x32a1d2(0x1a3)+_0x4a4122+'/'+_0x4c756b[_0x32a1d2(0x26c)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a54_0xb99464(0x280);['description']='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async[a54_0xb99464(0x1e1)](_0x2a319e){const _0x367579=a54_0xb99464,{options:_0x23ef49,args:_0x4e5961,tdx:_0x1ba1fc}=_0x2a319e;let _0x3fe75f='.',_0x221cbc=_0x23ef49[_0x367579(0x2ba)];if(_0x4e5961[0x0]){const {promises:_0x32ca38}=await import('fs');try{const _0xf83499=await _0x32ca38[_0x367579(0x1e9)](_0x4e5961[0x0]);if(_0xf83499[_0x367579(0x117)]())_0x3fe75f=_0x4e5961[0x0];else return console[_0x367579(0x274)](_0x367579(0x150)+_0x4e5961[0x0]+_0x367579(0x1d1)),0x1;}catch{_0x221cbc=_0x4e5961[0x0],_0x3fe75f='.';}}const _0x36ac8c=_0x23ef49[_0x367579(0x261)],_0x489ef1=_0x23ef49[_0x367579(0x2bd)];_0x23ef49['verbose']&&(console['error'](_0x367579(0x141)+_0x3fe75f),_0x221cbc&&console[_0x367579(0x274)]('Project\x20name:\x20'+_0x221cbc),_0x36ac8c&&console[_0x367579(0x274)](_0x367579(0x1b2)+_0x36ac8c),_0x489ef1&&console[_0x367579(0x274)](_0x367579(0x1f8)));const _0xf65953=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x1ba1fc[_0x367579(0x229)][_0x367579(0x2c3)](_0x3fe75f,{'projectName':_0x221cbc,'revision':_0x36ac8c,'skipValidation':_0x489ef1}),{'verbose':_0x23ef49['verbose']}),_0x2a5a83=_0xf65953[_0x367579(0x149)];return console[_0x367579(0x274)]('✔\x20Pushed\x20'+_0x2a5a83['projectName']),console[_0x367579(0x274)](_0x367579(0x18a)+_0x2a5a83[_0x367579(0x12e)]),console[_0x367579(0x274)](_0x367579(0x1a0)+_0x2a5a83[_0x367579(0x261)]),await this[_0x367579(0x2b1)](_0x1ba1fc,_0x2a5a83['projectName'],_0x23ef49[_0x367579(0x1fa)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a54_0xb99464(0x1ed);['description']=a54_0xb99464(0x27f);async[a54_0xb99464(0x1e1)](_0x5bbb58){const _0xe53570=a54_0xb99464,{options:_0x721f6f,args:_0x3f8c5e,tdx:_0x276b6b}=_0x5bbb58,_0x26f1a7=_0x3f8c5e[0x0],_0x5df5a0=_0x3f8c5e[0x1];if(!_0x26f1a7)return console['error'](a54_0x3265bd[_0xe53570(0x2aa)](_0xe53570(0x1dc)),_0xe53570(0x164)),console[_0xe53570(0x274)](a54_0x3265bd[_0xe53570(0x1a1)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x2783df=_0x721f6f[_0xe53570(0x261)];_0x721f6f['verbose']&&(console[_0xe53570(0x274)](_0xe53570(0x2a6)+_0x26f1a7),_0x5df5a0&&console[_0xe53570(0x274)](_0xe53570(0x15d)+_0x5df5a0),_0x2783df&&console[_0xe53570(0x274)](_0xe53570(0x1b2)+_0x2783df),_0x721f6f[_0xe53570(0x2b3)]&&console['error']('Dry\x20run:\x20yes'));const _0x42c850=await withSpinner('Pulling\x20project\x20'+_0x26f1a7+_0xe53570(0x257),()=>_0x276b6b[_0xe53570(0x229)][_0xe53570(0x12f)](_0x26f1a7,{'targetDir':_0x5df5a0,'revision':_0x2783df}),{'verbose':_0x721f6f[_0xe53570(0x2a9)]}),_0x150a2b=_0x42c850[_0xe53570(0x149)];_0x150a2b['isNewProject']?console[_0xe53570(0x274)]('→\x20New\x20project:\x20'+_0x150a2b[_0xe53570(0x26c)]):console[_0xe53570(0x274)](_0xe53570(0x13e)+_0x150a2b[_0xe53570(0x26c)]);console[_0xe53570(0x274)](_0xe53570(0x1a0)+_0x150a2b['revision']),console['error'](_0xe53570(0x281)+(a54_0x5df1b0['relative'](process['cwd'](),_0x150a2b[_0xe53570(0x1df)])||'.')),console[_0xe53570(0x274)]('\x20\x20Changes:\x20'+a54_0x3265bd[_0xe53570(0x119)]('+'+_0x150a2b[_0xe53570(0x202)][_0xe53570(0x113)]+_0xe53570(0x175))+',\x20'+(a54_0x3265bd[_0xe53570(0x267)]('~'+_0x150a2b[_0xe53570(0x202)][_0xe53570(0x13d)]+'\x20modified')+',\x20')+(a54_0x3265bd[_0xe53570(0x2aa)]('-'+_0x150a2b['summary'][_0xe53570(0x14d)]+_0xe53570(0x135))+',\x20')+(''+a54_0x3265bd[_0xe53570(0x1a1)](_0x150a2b[_0xe53570(0x202)][_0xe53570(0x1fe)]+_0xe53570(0x2d5))));for(const _0x3fc133 of _0x150a2b['changes']){_0x3fc133[_0xe53570(0x13b)]===_0xe53570(0x13d)&&_0x3fc133['diff']&&(console[_0xe53570(0x274)]('\x0a'+a54_0x3265bd[_0xe53570(0x1ac)]('---\x20'+_0x3fc133[_0xe53570(0x1eb)])),console[_0xe53570(0x274)](_0x3fc133['diff']));}if(!_0x150a2b[_0xe53570(0x1cf)])return saveSessionContext({'workflow_project':_0x150a2b[_0xe53570(0x26c)]},_0x721f6f[_0xe53570(0x29b)]),console[_0xe53570(0x274)](a54_0x3265bd[_0xe53570(0x119)](_0xe53570(0x22f))),console[_0xe53570(0x274)](a54_0x3265bd[_0xe53570(0x1a1)](_0xe53570(0x11c)+_0x150a2b[_0xe53570(0x26c)])),0x0;if(_0x721f6f[_0xe53570(0x2b3)])return console[_0xe53570(0x274)](a54_0x3265bd[_0xe53570(0x267)](_0xe53570(0x184))),0x0;if(!_0x721f6f[_0xe53570(0x167)]){if(!isInteractive())return console['error'](a54_0x3265bd['red'](_0xe53570(0x11a)),_0xe53570(0x2c6)),console[_0xe53570(0x274)](a54_0x3265bd[_0xe53570(0x1a1)](_0xe53570(0x128))),0x1;const _0x4f3e10=await confirmKey(_0xe53570(0x11f));if(!_0x4f3e10)return console['error'](a54_0x3265bd['yellow'](_0xe53570(0x1af)),_0xe53570(0x133)),0x1;}await withSpinner('Writing\x20files...',()=>_0x276b6b[_0xe53570(0x229)][_0xe53570(0x1d6)](_0x150a2b,{'revision':_0x2783df}),{'verbose':_0x721f6f['verbose']}),saveSessionContext({'workflow_project':_0x150a2b[_0xe53570(0x26c)]},_0x721f6f[_0xe53570(0x29b)]),console[_0xe53570(0x274)](a54_0x3265bd[_0xe53570(0x119)](_0xe53570(0x247)));const _0x2c71ca=a54_0x5df1b0[_0xe53570(0x120)](process['cwd'](),_0x150a2b[_0xe53570(0x1df)])||'.';return console[_0xe53570(0x274)](a54_0x3265bd[_0xe53570(0x1a1)]('\x20\x20Location:\x20'+_0x2c71ca)),console[_0xe53570(0x274)](a54_0x3265bd[_0xe53570(0x1a1)](_0xe53570(0x11c)+_0x150a2b[_0xe53570(0x26c)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]='workflow:push';['description']=a54_0xb99464(0x209);async['execute'](_0x2b468e){const _0x1bec1d=a54_0xb99464,{options:_0x45e6c1,args:_0x55246c,tdx:_0x2b29b3}=_0x2b468e,_0x214af6=this[_0x1bec1d(0x284)](_0x55246c,_0x45e6c1),_0x112555=_0x45e6c1[_0x1bec1d(0x261)],_0x3106ed=_0x45e6c1[_0x1bec1d(0x2bd)];_0x45e6c1[_0x1bec1d(0x2a9)]&&(_0x214af6&&console[_0x1bec1d(0x274)]('Source\x20directory:\x20'+_0x214af6),_0x112555&&console['error'](_0x1bec1d(0x1b2)+_0x112555),_0x45e6c1[_0x1bec1d(0x2b3)]&&console['error']('Dry\x20run:\x20yes'),_0x3106ed&&console[_0x1bec1d(0x274)]('Validation:\x20skipped'));let _0x25e1bf;try{_0x25e1bf=await withSpinner('Analyzing\x20changes...',()=>_0x2b29b3[_0x1bec1d(0x229)][_0x1bec1d(0x20e)]({'sourceDir':_0x214af6,'revision':_0x112555,'skipValidation':_0x3106ed}),{'verbose':_0x45e6c1[_0x1bec1d(0x2a9)]});}catch(_0x249a40){if(_0x249a40 instanceof Error&&_0x249a40[_0x1bec1d(0x1c0)][_0x1bec1d(0x1e0)](_0x1bec1d(0x11e)))return console['error'](a54_0x3265bd[_0x1bec1d(0x2aa)]('Error:'),_0x1bec1d(0x1b4)),_0x45e6c1[_0x1bec1d(0x23a)]?console[_0x1bec1d(0x274)](a54_0x3265bd['dim'](_0x1bec1d(0x1f2)+_0x45e6c1['workflowProject']+_0x1bec1d(0x2c2)+_0x45e6c1[_0x1bec1d(0x23a)]+'\x27')):console[_0x1bec1d(0x274)](a54_0x3265bd['dim']('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x249a40;}const _0x56cdcd=_0x25e1bf[_0x1bec1d(0x149)];console[_0x1bec1d(0x274)]('✔\x20Project:\x20'+_0x56cdcd[_0x1bec1d(0x26c)]),console[_0x1bec1d(0x274)]('\x20\x20Source:\x20'+_0x56cdcd[_0x1bec1d(0x2c1)]),console[_0x1bec1d(0x274)](_0x1bec1d(0x1a0)+_0x56cdcd['revision']),console[_0x1bec1d(0x274)]('\x20\x20Changes:\x20'+a54_0x3265bd[_0x1bec1d(0x119)]('+'+_0x56cdcd[_0x1bec1d(0x202)][_0x1bec1d(0x113)]+_0x1bec1d(0x175))+',\x20'+(a54_0x3265bd[_0x1bec1d(0x267)]('~'+_0x56cdcd['summary']['modified']+'\x20modified')+',\x20')+(a54_0x3265bd[_0x1bec1d(0x2aa)]('-'+_0x56cdcd['summary'][_0x1bec1d(0x14d)]+'\x20deleted')+',\x20')+(''+a54_0x3265bd[_0x1bec1d(0x1a1)](_0x56cdcd[_0x1bec1d(0x202)][_0x1bec1d(0x1fe)]+'\x20unchanged')));for(const _0x100a5a of _0x56cdcd[_0x1bec1d(0x190)]){_0x100a5a[_0x1bec1d(0x13b)]===_0x1bec1d(0x13d)&&_0x100a5a[_0x1bec1d(0x296)]&&(console['error']('\x0a'+a54_0x3265bd['cyan'](_0x1bec1d(0x14f)+_0x100a5a['path'])),console[_0x1bec1d(0x274)](_0x100a5a[_0x1bec1d(0x296)]));}if(!_0x56cdcd[_0x1bec1d(0x1cf)])return console[_0x1bec1d(0x274)](a54_0x3265bd[_0x1bec1d(0x119)](_0x1bec1d(0x26b))),await this[_0x1bec1d(0x2b1)](_0x2b29b3,_0x56cdcd[_0x1bec1d(0x26c)],_0x45e6c1[_0x1bec1d(0x1fa)]),0x0;if(_0x45e6c1[_0x1bec1d(0x2b3)])return console['error'](a54_0x3265bd[_0x1bec1d(0x267)](_0x1bec1d(0x272))),0x0;if(!_0x45e6c1[_0x1bec1d(0x167)]){if(!isInteractive())return console['error'](a54_0x3265bd[_0x1bec1d(0x2aa)](_0x1bec1d(0x11a)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a54_0x3265bd[_0x1bec1d(0x1a1)](_0x1bec1d(0x128))),0x1;const _0x55cc83=await confirmKey(_0x1bec1d(0x273));if(!_0x55cc83)return console[_0x1bec1d(0x274)](a54_0x3265bd[_0x1bec1d(0x267)](_0x1bec1d(0x1af)),_0x1bec1d(0x169)),0x1;}const _0x310bf2=await withSpinner(_0x1bec1d(0x18f),()=>_0x2b29b3[_0x1bec1d(0x229)]['executePushProject'](_0x56cdcd),{'verbose':_0x45e6c1[_0x1bec1d(0x2a9)]}),_0x91cce=_0x310bf2['data'];return console['error'](a54_0x3265bd[_0x1bec1d(0x119)](_0x1bec1d(0x185))),console['error']('\x20\x20Project\x20ID:\x20'+_0x91cce['projectId']),console[_0x1bec1d(0x274)](_0x1bec1d(0x1a0)+_0x91cce[_0x1bec1d(0x261)]),await this[_0x1bec1d(0x2b1)](_0x2b29b3,_0x91cce[_0x1bec1d(0x26c)],_0x45e6c1[_0x1bec1d(0x1fa)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x213);[a54_0xb99464(0x13a)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async['execute'](_0x343944){const _0xece189=a54_0xb99464,{options:_0x2ebe78,args:_0xb69c2b,tdx:_0x3cbcee}=_0x343944,_0x1b9898=this[_0xece189(0x284)](_0xb69c2b,_0x2ebe78),_0x829c58=_0x2ebe78[_0xece189(0x2ba)],_0x22cf1a=_0x2ebe78[_0xece189(0x261)],_0x2fe329=_0x2ebe78['skipValidation'];if(!_0x1b9898)return console['error'](a54_0x3265bd[_0xece189(0x2aa)]('Error:'),_0xece189(0x2b8)),console[_0xece189(0x274)](a54_0x3265bd[_0xece189(0x1a1)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console['error'](a54_0x3265bd['dim'](_0xece189(0x29f))),0x1;if(!_0x829c58)return console['error'](a54_0x3265bd['red']('Error:'),_0xece189(0x160)),console[_0xece189(0x274)](a54_0x3265bd['dim'](_0xece189(0x1d9))),0x1;_0x2ebe78[_0xece189(0x2a9)]&&(console[_0xece189(0x274)]('Source\x20directory:\x20'+_0x1b9898),console[_0xece189(0x274)](_0xece189(0x2d1)+_0x829c58),_0x22cf1a&&console['error'](_0xece189(0x1b2)+_0x22cf1a),_0x2ebe78[_0xece189(0x2b3)]&&console[_0xece189(0x274)](_0xece189(0x1a6)),_0x2fe329&&console['error'](_0xece189(0x1f8)));const _0x35b9f0=await withSpinner(_0xece189(0x2a5),()=>_0x3cbcee[_0xece189(0x229)][_0xece189(0x255)](_0x1b9898,_0x829c58,{'revision':_0x22cf1a,'skipValidation':_0x2fe329}),{'verbose':_0x2ebe78['verbose']}),_0x46c4a0=_0x35b9f0[_0xece189(0x149)];console['error']('Source:\x20'+_0x46c4a0['sourceDir']);_0x46c4a0[_0xece189(0x196)]&&console[_0xece189(0x274)](_0xece189(0x142)+_0x46c4a0[_0xece189(0x196)]);console[_0xece189(0x274)](_0xece189(0x2d1)+_0x46c4a0['newProjectName']),console['error'](_0xece189(0x1b2)+_0x46c4a0[_0xece189(0x261)]),console[_0xece189(0x274)](_0xece189(0x260)+_0x46c4a0['fileCount']);_0x46c4a0[_0xece189(0x2c0)]&&(console[_0xece189(0x274)](a54_0x3265bd['yellow'](_0xece189(0x28a)+_0x46c4a0[_0xece189(0x238)]+_0xece189(0x176)+_0x46c4a0['existingProjectId']+')')),console[_0xece189(0x274)](a54_0x3265bd[_0xece189(0x267)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x2ebe78[_0xece189(0x2b3)])return console['error'](a54_0x3265bd[_0xece189(0x267)](_0xece189(0x268))),0x0;if(!_0x2ebe78[_0xece189(0x167)]){if(!isInteractive())return console[_0xece189(0x274)](a54_0x3265bd['red']('\x0aError:'),_0xece189(0x2c6)),console['error'](a54_0x3265bd[_0xece189(0x1a1)](_0xece189(0x128))),0x1;const _0x7c2bb0=_0x46c4a0[_0xece189(0x196)]||a54_0x5df1b0[_0xece189(0x24f)](_0x1b9898),_0x431632=_0x46c4a0['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x829c58+_0xece189(0x248):_0xece189(0x298)+_0x7c2bb0+_0xece189(0x27b)+_0x829c58+'\x22?',_0x6da01a=await confirmKey(_0x431632);if(!_0x6da01a)return console['error'](a54_0x3265bd[_0xece189(0x267)](_0xece189(0x1af))),0x1;}const _0x4bacfc=await withSpinner(_0x46c4a0[_0xece189(0x2c0)]?_0xece189(0x19d)+_0x829c58+_0xece189(0x257):_0xece189(0x25e)+_0x829c58+_0xece189(0x257),()=>_0x3cbcee[_0xece189(0x229)]['executeCloneProject'](_0x46c4a0),{'verbose':_0x2ebe78['verbose']}),_0x3f16e1=_0x4bacfc[_0xece189(0x149)];return console[_0xece189(0x274)](a54_0x3265bd[_0xece189(0x119)](_0x46c4a0[_0xece189(0x2c0)]?_0xece189(0x1e5):'✔\x20Clone\x20complete')),console['error'](_0xece189(0x174)+_0x3f16e1[_0xece189(0x238)]),console[_0xece189(0x274)](_0xece189(0x18a)+_0x3f16e1[_0xece189(0x2b4)]),console[_0xece189(0x274)](_0xece189(0x1a0)+_0x3f16e1['revision']),await this['showWorkflowConsoleUrl'](_0x3cbcee,_0x3f16e1[_0xece189(0x238)],_0x2ebe78['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a54_0xb99464(0x227);[a54_0xb99464(0x13a)]=a54_0xb99464(0x2a7);async[a54_0xb99464(0x1e1)](_0x4d30f1){const _0x20b8f0=a54_0xb99464,{options:_0x40f212,args:_0x30fe27,tdx:_0x5069d5}=_0x4d30f1,_0x4a6d61=_0x30fe27[0x0];if(!_0x4a6d61)return console[_0x20b8f0(0x274)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x20b8f0(0x274)](_0x20b8f0(0x151)),0x1;_0x40f212['verbose']&&console[_0x20b8f0(0x274)](_0x20b8f0(0x2a6)+_0x4a6d61);if(!_0x40f212[_0x20b8f0(0x167)]){if(!isInteractive())return console[_0x20b8f0(0x274)](a54_0x3265bd[_0x20b8f0(0x2aa)](_0x20b8f0(0x11a)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x20b8f0(0x274)](a54_0x3265bd[_0x20b8f0(0x1a1)](_0x20b8f0(0x128))),0x1;const _0x47693d=await confirmKey(_0x20b8f0(0x16c)+_0x4a6d61+_0x20b8f0(0x289));if(!_0x47693d)return console[_0x20b8f0(0x274)](a54_0x3265bd[_0x20b8f0(0x267)](_0x20b8f0(0x1af))),0x1;}const _0x471056=await withSpinner(_0x20b8f0(0x1ad)+_0x4a6d61+_0x20b8f0(0x257),()=>_0x5069d5[_0x20b8f0(0x229)][_0x20b8f0(0x2ca)](_0x4a6d61),{'verbose':_0x40f212[_0x20b8f0(0x2a9)]}),_0x58a3c2=_0x471056[_0x20b8f0(0x149)];return console[_0x20b8f0(0x274)](_0x20b8f0(0x22e)+_0x58a3c2[_0x20b8f0(0x26c)]),console[_0x20b8f0(0x274)](_0x20b8f0(0x18a)+_0x58a3c2[_0x20b8f0(0x12e)]),0x0;}}export function parseKeyValue(_0x284ae2){const _0x1ff25b=a54_0xb99464,_0x1a7bfe=_0x284ae2[_0x1ff25b(0x1a9)]('=');if(_0x1a7bfe===-0x1)throw new Error(_0x1ff25b(0x295)+_0x284ae2+_0x1ff25b(0x2d0));const _0x1e11f1=_0x284ae2[_0x1ff25b(0x297)](0x0,_0x1a7bfe),_0x3012be=_0x284ae2[_0x1ff25b(0x297)](_0x1a7bfe+0x1);if(!_0x1e11f1)throw new Error(_0x1ff25b(0x17e));return{'key':_0x1e11f1,'value':_0x3012be};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]='workflow:secrets:list';[a54_0xb99464(0x13a)]=a54_0xb99464(0x26e);async['execute'](_0x304764){const _0x3e21a3=a54_0xb99464,{options:_0x1e654b,args:_0x929bfb,tdx:_0x57a8f9}=_0x304764,_0x1467ef=this[_0x3e21a3(0x1ef)](_0x929bfb,_0x1e654b);if(!_0x1467ef)return 0x1;_0x1e654b['verbose']&&console[_0x3e21a3(0x274)](_0x3e21a3(0x2a6)+_0x1467ef);const _0x54ecc1=await withSpinner(_0x3e21a3(0x1b3),()=>_0x57a8f9[_0x3e21a3(0x229)][_0x3e21a3(0x232)](_0x1467ef),{'verbose':_0x1e654b[_0x3e21a3(0x2a9)]}),{secrets:_0x20431a}=_0x54ecc1[_0x3e21a3(0x149)];return console[_0x3e21a3(0x274)](_0x3e21a3(0x28e)+_0x20431a['length']+_0x3e21a3(0x282)+(_0x20431a[_0x3e21a3(0x1b9)]!==0x1?'s':'')),await handleSDKOutput(_0x20431a,_0x1e654b),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x170);[a54_0xb99464(0x13a)]=a54_0xb99464(0x1f3);async['execute'](_0x3b3dd2){const _0xf25ad7=a54_0xb99464,{options:_0x566f19,args:_0x1481a2,tdx:_0x25d265}=_0x3b3dd2;let _0x554b4e,_0x17715a;if(_0x1481a2['length']>=0x1&&!_0x1481a2[0x0][_0xf25ad7(0x1e0)]('='))_0x554b4e=_0x1481a2[0x0],_0x17715a=_0x1481a2[_0xf25ad7(0x259)](0x1);else{if(_0x1481a2['length']>=0x1&&_0x566f19[_0xf25ad7(0x23a)])_0x554b4e=_0x566f19[_0xf25ad7(0x23a)],_0x17715a=_0x1481a2;else return _0x1481a2[_0xf25ad7(0x1b9)]>=0x1?(console[_0xf25ad7(0x274)](_0xf25ad7(0x2a3)),console['error'](_0xf25ad7(0x2bf)),0x1):(console[_0xf25ad7(0x274)](_0xf25ad7(0x27d)),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x17715a[_0xf25ad7(0x1b9)]===0x0)return console[_0xf25ad7(0x274)](_0xf25ad7(0x27d)),console['error'](_0xf25ad7(0x2b6)),0x1;const _0x1004e2={};try{for(const _0x40f1f0 of _0x17715a){const {key:_0x10a05c,value:_0x10b25b}=parseKeyValue(_0x40f1f0);_0x1004e2[_0x10a05c]=_0x10b25b;}}catch(_0x1d1484){return _0x1d1484 instanceof Error&&console['error'](a54_0x3265bd['red'](_0xf25ad7(0x1dc)),_0x1d1484[_0xf25ad7(0x1c0)]),0x1;}const _0x4800b6=Object['keys'](_0x1004e2);_0x566f19[_0xf25ad7(0x2a9)]&&(console[_0xf25ad7(0x274)](_0xf25ad7(0x2a6)+_0x554b4e),console[_0xf25ad7(0x274)](_0xf25ad7(0x23c)+_0x4800b6[_0xf25ad7(0x237)](',\x20')));const _0x149de1=await withSpinner(_0x4800b6[_0xf25ad7(0x1b9)]===0x1?_0xf25ad7(0x25d):_0xf25ad7(0x2c8)+_0x4800b6['length']+'\x20secrets...',()=>_0x25d265[_0xf25ad7(0x229)]['setSecrets'](_0x554b4e,_0x1004e2),{'verbose':_0x566f19[_0xf25ad7(0x2a9)]}),_0x12ddbe=_0x149de1[_0xf25ad7(0x149)];return console[_0xf25ad7(0x274)](_0x4800b6[_0xf25ad7(0x1b9)]===0x1?'✔\x20Secret\x20\x27'+_0x12ddbe[_0xf25ad7(0x1b8)][0x0]+_0xf25ad7(0x210)+_0x12ddbe[_0xf25ad7(0x26c)]+'\x27':'✔\x20'+_0x12ddbe[_0xf25ad7(0x1b8)][_0xf25ad7(0x1b9)]+_0xf25ad7(0x207)+_0x12ddbe[_0xf25ad7(0x26c)]+'\x27'),(_0x566f19['json']||_0x566f19['jsonl'])&&await handleSingleObjectOutput(_0x12ddbe,_0x566f19),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x121);['description']=a54_0xb99464(0x22c);async['execute'](_0x153f2b){const _0x55f145=a54_0xb99464,{options:_0x3d5fb2,args:_0xb389d4,tdx:_0xe86069}=_0x153f2b;let _0x396c95,_0x290ce3;if(_0xb389d4[_0x55f145(0x1b9)]>=0x2)_0x396c95=_0xb389d4[0x0],_0x290ce3=_0xb389d4[0x1];else{if(_0xb389d4[_0x55f145(0x1b9)]===0x1&&_0x3d5fb2[_0x55f145(0x23a)])_0x396c95=_0x3d5fb2[_0x55f145(0x23a)],_0x290ce3=_0xb389d4[0x0];else return _0xb389d4['length']===0x1?(console[_0x55f145(0x274)](_0x55f145(0x2a3)),console[_0x55f145(0x274)](_0x55f145(0x2bf)),0x1):(console[_0x55f145(0x274)](_0x55f145(0x264)),console['error'](_0x55f145(0x2af)),0x1);}_0x3d5fb2[_0x55f145(0x2a9)]&&(console[_0x55f145(0x274)](_0x55f145(0x2a6)+_0x396c95),console[_0x55f145(0x274)](_0x55f145(0x243)+_0x290ce3));if(!_0x3d5fb2[_0x55f145(0x167)]){if(!isInteractive())return console['error'](a54_0x3265bd[_0x55f145(0x2aa)]('\x0aError:'),_0x55f145(0x2c6)),console[_0x55f145(0x274)](a54_0x3265bd[_0x55f145(0x1a1)](_0x55f145(0x128))),0x1;const _0x2a28a4=await confirmKey(_0x55f145(0x198)+_0x290ce3+_0x55f145(0x17a)+_0x396c95+'\x27?');if(!_0x2a28a4)return console['error'](a54_0x3265bd[_0x55f145(0x267)]('Cancelled')),0x1;}const _0x1a5b5f=await withSpinner(_0x55f145(0x201),()=>_0xe86069[_0x55f145(0x229)][_0x55f145(0x253)](_0x396c95,_0x290ce3),{'verbose':_0x3d5fb2[_0x55f145(0x2a9)]}),_0x9d2c2b=_0x1a5b5f[_0x55f145(0x149)];return console[_0x55f145(0x274)](_0x55f145(0x1e3)+_0x9d2c2b[_0x55f145(0x132)]+_0x55f145(0x241)+_0x9d2c2b[_0x55f145(0x26c)]+'\x27'),(_0x3d5fb2[_0x55f145(0x279)]||_0x3d5fb2[_0x55f145(0x197)])&&await handleSingleObjectOutput(_0x9d2c2b,_0x3d5fb2),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(_0x30772f){const _0x37e72b=a54_0xb99464,_0x5f2c07=Math[_0x37e72b(0x1f6)](_0x30772f/0x3e8),_0x349fb9=Math[_0x37e72b(0x1f6)](_0x5f2c07/0x3c),_0x2b5392=Math['floor'](_0x349fb9/0x3c),_0x5388d9=Math[_0x37e72b(0x1f6)](_0x2b5392/0x18);if(_0x5388d9>0x0){const _0x43845e=_0x2b5392%0x18;return _0x43845e>0x0?_0x5388d9+'d\x20'+_0x43845e+'h':_0x5388d9+'d';}else{if(_0x2b5392>0x0){const _0x4aab3c=_0x349fb9%0x3c;return _0x4aab3c>0x0?_0x2b5392+'h\x20'+_0x4aab3c+'m':_0x2b5392+'h';}else{if(_0x349fb9>0x0){const _0x3bee95=_0x5f2c07%0x3c;return _0x3bee95>0x0?_0x349fb9+'m\x20'+_0x3bee95+'s':_0x349fb9+'m';}else return _0x5f2c07+'s';}}}function formatTimestamp(_0x1cfe09,_0x436700){const _0x1de0e9=a54_0xb99464,_0x380233=new Date(_0x1cfe09),_0x4d6d1d=String(_0x380233[_0x1de0e9(0x22b)]())[_0x1de0e9(0x12c)](0x2,'0'),_0x175841=String(_0x380233[_0x1de0e9(0x131)]())[_0x1de0e9(0x12c)](0x2,'0'),_0x56c258=_0x4d6d1d+':'+_0x175841,_0xc23c35=_0x380233[_0x1de0e9(0x254)]()===_0x436700[_0x1de0e9(0x254)]()&&_0x380233[_0x1de0e9(0x2bc)]()===_0x436700['getMonth']()&&_0x380233[_0x1de0e9(0x1e2)]()===_0x436700[_0x1de0e9(0x1e2)]();if(_0xc23c35)return _0x56c258;else{const _0x1626b4=String(_0x380233[_0x1de0e9(0x2bc)]()+0x1)[_0x1de0e9(0x12c)](0x2,'0'),_0x247d66=String(_0x380233['getDate']())[_0x1de0e9(0x12c)](0x2,'0');return _0x1626b4+'-'+_0x247d66+'\x20'+_0x56c258;}}function formatDate(_0x483ab8){const _0xb25606=a54_0xb99464,_0x35ab4d=_0x483ab8[_0xb25606(0x254)](),_0x44fe1a=String(_0x483ab8[_0xb25606(0x2bc)]()+0x1)['padStart'](0x2,'0'),_0x3a0116=String(_0x483ab8[_0xb25606(0x1e2)]())[_0xb25606(0x12c)](0x2,'0');return _0x35ab4d+'-'+_0x44fe1a+'-'+_0x3a0116;}function getTaskStateIcon(_0x19f3b7){const _0x43c383={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x43c383[_0x19f3b7]||'⚪';}function getBarChar(_0x3ee548){const _0x21fd01=a54_0xb99464;return _0x3ee548===_0x21fd01(0x274)||_0x3ee548===_0x21fd01(0x231)?'×':'─';}function getBarColor(_0x51b0f3){const _0x17e94c=a54_0xb99464,_0x1eeab2={'success':a54_0x3265bd[_0x17e94c(0x119)],'error':a54_0x3265bd[_0x17e94c(0x2aa)],'group_error':a54_0x3265bd[_0x17e94c(0x2aa)],'running':a54_0x3265bd[_0x17e94c(0x144)],'blocked':a54_0x3265bd[_0x17e94c(0x267)],'planned':a54_0x3265bd['dim'],'canceling':a54_0x3265bd[_0x17e94c(0x267)]};return _0x1eeab2[_0x51b0f3]||a54_0x3265bd[_0x17e94c(0x223)];}function parseTaskName(_0x1aaf1e){const _0x9ae66e=a54_0xb99464;let _0x8523ac=_0x1aaf1e['replace'](/^\++/,'');const _0x5b8dcb=_0x8523ac[_0x9ae66e(0x242)]('+'),_0x31f540=_0x5b8dcb[_0x9ae66e(0x1b9)]>0x1?_0x5b8dcb[_0x9ae66e(0x1b9)]-0x2:0x0,_0x58ae81=_0x5b8dcb[_0x5b8dcb[_0x9ae66e(0x1b9)]-0x1]||_0x8523ac;return{'level':_0x31f540,'name':'+'+_0x58ae81};}function truncateTaskName(_0x3820f7,_0x492f31){const _0x14029f=a54_0xb99464,_0x436fb3=stringWidth(_0x3820f7);if(_0x436fb3<=_0x492f31)return _0x3820f7;let _0x51c46b=_0x3820f7;while(stringWidth(_0x51c46b+'…')>_0x492f31&&_0x51c46b[_0x14029f(0x1b9)]>0x0){_0x51c46b=_0x51c46b[_0x14029f(0x259)](0x0,-0x1);}return _0x51c46b+'…';}function calculateTimeScale(_0x46d627,_0x4056fd){const _0x22c7ab=a54_0xb99464;return{'startTime':_0x46d627['start'],'endTime':_0x46d627[_0x22c7ab(0x1ff)],'durationMs':_0x46d627[_0x22c7ab(0x20a)],'msPerChar':_0x46d627[_0x22c7ab(0x20a)]/_0x4056fd};}function timeToPosition(_0x5d2a25,_0x3e1f4c,_0x45dc45){const _0x4d8c2a=a54_0xb99464,_0x27d1d4=_0x5d2a25-_0x3e1f4c[_0x4d8c2a(0x1f0)],_0x4a7c09=Math[_0x4d8c2a(0x1f6)](_0x27d1d4/_0x3e1f4c[_0x4d8c2a(0x1a8)]);return Math[_0x4d8c2a(0x2b0)](0x0,Math[_0x4d8c2a(0x2c4)](_0x4a7c09,_0x45dc45));}function renderTimeAxis(_0x57255b,_0x10f4d6){const _0x3e36f2=a54_0xb99464,_0x43cb9d=Math[_0x3e36f2(0x2c4)](TIMELINE_CONFIG[_0x3e36f2(0x1cc)],Math['max'](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x3e36f2(0x1f6)](_0x10f4d6/TIMELINE_CONFIG[_0x3e36f2(0x1d7)]))),_0x515599=_0x57255b[_0x3e36f2(0x18c)]/(_0x43cb9d-0x1),_0x1d9b83=new Date(_0x57255b['startTime']),_0x1c632e=[];for(let _0x10e9f8=0x0;_0x10e9f8<_0x43cb9d;_0x10e9f8++){const _0x84a4f6=_0x57255b[_0x3e36f2(0x1f0)]+_0x10e9f8*_0x515599,_0x43f39a=timeToPosition(_0x84a4f6,_0x57255b,_0x10f4d6),_0x3c8bd9=formatTimestamp(_0x84a4f6,_0x1d9b83);_0x1c632e['push']({'pos':_0x43f39a,'text':_0x3c8bd9});}const _0xea2678=new Array(_0x10f4d6)['fill']('\x20');let _0x1f6293=-0x1;for(const {pos:_0xe02155,text:_0x2b0e61}of _0x1c632e){let _0x39caa9=Math['max'](0x0,_0xe02155-Math[_0x3e36f2(0x1f6)](_0x2b0e61[_0x3e36f2(0x1b9)]/0x2));_0x39caa9<=_0x1f6293+TIMELINE_CONFIG[_0x3e36f2(0x12a)]&&(_0x39caa9=_0x1f6293+TIMELINE_CONFIG[_0x3e36f2(0x12a)]+0x1);_0x39caa9+_0x2b0e61[_0x3e36f2(0x1b9)]>_0x10f4d6&&(_0x39caa9=_0x10f4d6-_0x2b0e61[_0x3e36f2(0x1b9)]);if(_0x39caa9>=0x0&&_0x39caa9+_0x2b0e61[_0x3e36f2(0x1b9)]<=_0x10f4d6&&_0x39caa9>_0x1f6293){for(let _0x2051a8=0x0;_0x2051a8<_0x2b0e61[_0x3e36f2(0x1b9)];_0x2051a8++){_0xea2678[_0x39caa9+_0x2051a8]=_0x2b0e61[_0x2051a8];}_0x1f6293=_0x39caa9+_0x2b0e61['length']-0x1;}}return _0xea2678[_0x3e36f2(0x237)]('');}function renderTaskRow(_0x5e124a,_0x3cd9c5,_0x52e806,_0x16a6ce){const _0x37f157=a54_0xb99464,{level:_0x36c282,name:_0x3918da}=parseTaskName(_0x5e124a[_0x37f157(0x2ba)]),_0x13cfe7='\x20'[_0x37f157(0x155)](_0x36c282),_0x518414=_0x5e124a[_0x37f157(0x2c9)]?'('+formatElapsed(_0x5e124a[_0x37f157(0x2c9)][_0x37f157(0x20a)])+')':'',_0x172dfc=stringWidth(_0x518414),_0x27ef35=_0x36c282*0x1,_0x3a2354=_0x16a6ce-_0x27ef35-_0x172dfc-0x1,_0x92b16e=truncateTaskName(_0x3918da,_0x3a2354),_0x3fe184=_0x13cfe7+_0x92b16e,_0x706853=stringWidth(_0x3fe184),_0x2c0be1=_0x16a6ce-_0x706853-_0x172dfc,_0x228106=_0x3fe184+'\x20'[_0x37f157(0x155)](Math[_0x37f157(0x2b0)](0x1,_0x2c0be1))+a54_0x3265bd['dim'](_0x518414),_0x23aa06=getTaskStateIcon(_0x5e124a[_0x37f157(0x1d8)]),_0x5a9c7f=new Array(_0x52e806)['fill']('\x20');if(_0x5e124a['window']){const _0x1f78da=timeToPosition(_0x5e124a[_0x37f157(0x2c9)][_0x37f157(0x28c)],_0x3cd9c5,_0x52e806),_0x5eb11e=timeToPosition(_0x5e124a[_0x37f157(0x2c9)][_0x37f157(0x1ff)],_0x3cd9c5,_0x52e806),_0x35e475=getBarChar(_0x5e124a['state']),_0x1efb2d=Math['max'](_0x1f78da+0x1,_0x5eb11e);for(let _0x29f595=_0x1f78da;_0x29f595<Math['min'](_0x1efb2d,_0x52e806);_0x29f595++){_0x5a9c7f[_0x29f595]=_0x35e475;}}const _0x528a03=getBarColor(_0x5e124a[_0x37f157(0x1d8)]),_0x52edbf=_0x5a9c7f[_0x37f157(0x127)](_0x3d0caf=>_0x3d0caf==='\x20'?'\x20':_0x528a03(_0x3d0caf))[_0x37f157(0x237)]('');return _0x23aa06+'\x20'+_0x228106+'│'+_0x52edbf+'│';}function calculateStats(_0x55703f){const _0x4c2338=a54_0xb99464,_0x19f413={'total':_0x55703f[_0x4c2338(0x1b9)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x73ebf9 of _0x55703f){if(_0x73ebf9[_0x4c2338(0x1d8)]===_0x4c2338(0x252))_0x19f413[_0x4c2338(0x252)]++;else{if(_0x73ebf9[_0x4c2338(0x1d8)]===_0x4c2338(0x274)||_0x73ebf9[_0x4c2338(0x1d8)]==='group_error')_0x19f413[_0x4c2338(0x274)]++;else _0x73ebf9[_0x4c2338(0x1d8)]===_0x4c2338(0x148)?_0x19f413[_0x4c2338(0x148)]++:_0x19f413[_0x4c2338(0x1db)]++;}}return _0x19f413;}function formatStats(_0x4ee720){const _0xb51313=a54_0xb99464;return[_0xb51313(0x2b9)+_0x4ee720['total'],'✅\x20'+_0x4ee720[_0xb51313(0x252)],'❌\x20'+_0x4ee720[_0xb51313(0x274)],'🔄\x20'+_0x4ee720['running'],'⏳\x20'+_0x4ee720[_0xb51313(0x1db)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x143);['description']=a54_0xb99464(0x2a0);async[a54_0xb99464(0x1e1)](_0x41ccf6){const _0x323e0e=a54_0xb99464,{options:_0x717eee,args:_0x37b9eb,tdx:_0x57cfa3}=_0x41ccf6;let _0x13268a,_0xc4fb9c,_0x10aefb=![];if(_0x37b9eb[0x0]){if(_0x37b9eb[0x0]['includes']('.')){const _0x5a5bd9=this[_0x323e0e(0x15b)](_0x37b9eb,_0x717eee);if(!_0x5a5bd9)return 0x1;_0x13268a=_0x5a5bd9[_0x323e0e(0x26c)],_0xc4fb9c=_0x5a5bd9['workflowName'];}else{_0xc4fb9c=_0x37b9eb[0x0],_0x13268a=_0x717eee[_0x323e0e(0x23a)];if(!_0x13268a)return console['error'](a54_0x3265bd[_0x323e0e(0x2aa)](_0x323e0e(0x1dc)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x10aefb=!![];}}else{const _0x392b66=this[_0x323e0e(0x15b)](_0x37b9eb,_0x717eee);if(!_0x392b66)return 0x1;_0x13268a=_0x392b66['projectName'],_0xc4fb9c=_0x392b66[_0x323e0e(0x17f)];}if(_0x717eee['verbose']){if(_0x13268a&&_0xc4fb9c)console['error'](_0x323e0e(0x180)+_0x13268a+'.'+_0xc4fb9c);else _0x13268a&&console['error'](_0x323e0e(0x262)+_0x13268a);}const _0x59c313=_0x717eee[_0x323e0e(0x216)],_0x3715c3=_0x717eee[_0x323e0e(0x1cd)];if(_0x59c313){_0x3715c3&&console[_0x323e0e(0x274)](a54_0x3265bd[_0x323e0e(0x267)](_0x323e0e(0x234)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0xd758fb=_0x717eee[_0x323e0e(0x249)];return _0xd758fb?await this[_0x323e0e(0x20f)](_0x41ccf6,_0x59c313):await this[_0x323e0e(0x224)](_0x41ccf6,_0x59c313,_0x717eee),0x0;}if(_0x3715c3){const _0x336d74=await withSpinner(_0x323e0e(0x211),()=>_0x57cfa3[_0x323e0e(0x229)][_0x323e0e(0x218)]({'projectName':_0x13268a,'workflowName':_0xc4fb9c,'limit':0x64}),{'verbose':_0x717eee[_0x323e0e(0x2a9)]}),_0x2f4e3a=_0x336d74['data'][_0x323e0e(0x2a2)](_0x5224b2=>_0x5224b2['id']===_0x3715c3);if(!_0x2f4e3a)return console['error'](a54_0x3265bd[_0x323e0e(0x2aa)](_0x323e0e(0x1dc)),_0x323e0e(0x166)+_0x3715c3),0x1;if(!_0x2f4e3a[_0x323e0e(0x206)]?.['id'])return console[_0x323e0e(0x274)](a54_0x3265bd[_0x323e0e(0x2aa)](_0x323e0e(0x1dc)),_0x323e0e(0x1bd)+_0x3715c3+_0x323e0e(0x287)),0x1;const _0x445270=_0x2f4e3a[_0x323e0e(0x206)]['id'];_0x717eee[_0x323e0e(0x2a9)]&&console[_0x323e0e(0x274)](_0x323e0e(0x263)+_0x445270+_0x323e0e(0x1c7)+_0x3715c3);const _0x243df1=_0x717eee['follow'];return _0x243df1?await this[_0x323e0e(0x20f)](_0x41ccf6,_0x445270):await this[_0x323e0e(0x224)](_0x41ccf6,_0x445270,_0x717eee),0x0;}const _0x26c459=await withSpinner('Loading\x20sessions...',()=>_0x57cfa3[_0x323e0e(0x229)]['sessions']({'projectName':_0x13268a,'workflowName':_0xc4fb9c,'limit':_0x717eee['limit']||0x32}),{'verbose':_0x717eee[_0x323e0e(0x2a9)]}),_0x1223ed=_0x26c459[_0x323e0e(0x149)];if(_0x1223ed[_0x323e0e(0x1b9)]===0x0){if(_0x13268a&&_0xc4fb9c)console['error']('No\x20sessions\x20found\x20for:\x20'+_0x13268a+'.'+_0xc4fb9c);else _0x13268a?console[_0x323e0e(0x274)](_0x323e0e(0x16f)+_0x13268a):(console[_0x323e0e(0x274)](_0x323e0e(0x1a2)),console[_0x323e0e(0x274)](a54_0x3265bd[_0x323e0e(0x1a1)](_0x323e0e(0x156))));return 0x0;}_0x1223ed[_0x323e0e(0x1bc)]((_0x411d8d,_0x28122c)=>{const _0x4473a4=_0x323e0e,_0x127355=_0x411d8d[_0x4473a4(0x2c5)]||'',_0x561c98=_0x28122c[_0x4473a4(0x2c5)]||'';return _0x561c98[_0x4473a4(0x1d2)](_0x127355);});if(_0x717eee[_0x323e0e(0x279)]||_0x717eee['jsonl'])return await handleSDKOutput(_0x1223ed,_0x717eee),0x0;let _0x421d49;if(_0x10aefb){const _0x1e6d37=_0x1223ed[0x0];if(!_0x1e6d37[_0x323e0e(0x206)]?.['id'])return console[_0x323e0e(0x274)](_0x323e0e(0x115)),0x0;_0x421d49=_0x1e6d37['lastAttempt']['id'],_0x717eee[_0x323e0e(0x2a9)]&&console[_0x323e0e(0x274)]('Auto-selected\x20latest\x20session:\x20'+_0x1e6d37['sessionTime']);}else{const _0x3817e5=_0x1223ed['map'](_0x3dd9bb=>{const _0x160293=_0x323e0e,_0xbb1046=getAttemptStatusDisplay(_0x3dd9bb['lastAttempt']);return{'title':_0x3dd9bb[_0x160293(0x23d)]?.[_0x160293(0x2ba)]+'.'+_0x3dd9bb[_0x160293(0x229)]?.[_0x160293(0x2ba)]+_0x160293(0x189)+_0x3dd9bb[_0x160293(0x2c5)]+'\x20'+_0xbb1046[_0x160293(0x293)],'value':_0x3dd9bb[_0x160293(0x206)]?.['id']||'','description':_0xbb1046[_0x160293(0x152)]};}),_0xc554ef=await a54_0x24334b({'type':_0x323e0e(0x173),'name':'attemptId','message':_0x323e0e(0x1b1),'choices':_0x3817e5[_0x323e0e(0x13f)](_0x2f5137=>_0x2f5137[_0x323e0e(0x25c)]!=='')});if(!_0xc554ef[_0x323e0e(0x216)])return 0x0;_0x421d49=_0xc554ef[_0x323e0e(0x216)];}const _0x26cbfd=_0x717eee[_0x323e0e(0x249)];return _0x26cbfd?await this[_0x323e0e(0x20f)](_0x41ccf6,_0x421d49):await this[_0x323e0e(0x224)](_0x41ccf6,_0x421d49,_0x717eee),0x0;}async[a54_0xb99464(0x224)](_0x10d123,_0x27c1c6,_0x4c6534){const _0x181452=a54_0xb99464,{tdx:_0x2533eb}=_0x10d123;let _0x5b0b4c,_0x1f646e;try{[_0x5b0b4c,_0x1f646e]=await Promise[_0x181452(0x20d)]([_0x2533eb[_0x181452(0x229)][_0x181452(0x1ca)](_0x27c1c6),_0x2533eb[_0x181452(0x229)]['tasks'](_0x27c1c6,![])]);}catch(_0x5677e0){console[_0x181452(0x274)](a54_0x3265bd[_0x181452(0x2aa)](_0x181452(0x23b)));_0x4c6534[_0x181452(0x2a9)]&&console[_0x181452(0x274)](_0x5677e0);throw _0x5677e0;}if(_0x4c6534['json']||_0x4c6534[_0x181452(0x197)]){const _0x4aec8=this['buildTimelineData'](_0x5b0b4c,_0x1f646e);await handleSDKOutput([_0x4aec8],_0x4c6534);return;}const _0x535ce5=_0x2533eb['context'][_0x181452(0x1fa)],_0x6d20cf=this['renderTimeline'](_0x5b0b4c,_0x1f646e,_0x535ce5);console[_0x181452(0x25a)](_0x6d20cf);}async[a54_0xb99464(0x20f)](_0x5e3d03,_0x218a6f){const _0x53fc96=a54_0xb99464,{tdx:_0x2fb7c1}=_0x5e3d03,_0x465d91=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x1cdd1d=TIMELINE_CONFIG[_0x53fc96(0x19b)];let _0x31f375=0x0;while(_0x31f375<_0x1cdd1d){process[_0x53fc96(0x194)][_0x53fc96(0x145)]&&process['stdout'][_0x53fc96(0x283)]('\x1bc');let _0x17047c,_0x5bc8fd;try{[_0x17047c,_0x5bc8fd]=await Promise['all']([_0x2fb7c1['workflow'][_0x53fc96(0x1ca)](_0x218a6f),_0x2fb7c1['workflow'][_0x53fc96(0x21f)](_0x218a6f,![])]);}catch(_0x215bc7){console[_0x53fc96(0x274)](a54_0x3265bd[_0x53fc96(0x2aa)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x31f375>0x0&&console[_0x53fc96(0x274)](a54_0x3265bd[_0x53fc96(0x1a1)](_0x53fc96(0x2ac)+_0x31f375));throw _0x215bc7;}const _0x3dc588=_0x2fb7c1[_0x53fc96(0x2cd)][_0x53fc96(0x1fa)],_0x1418dd=this['renderTimeline'](_0x17047c,_0x5bc8fd,_0x3dc588);console[_0x53fc96(0x25a)](_0x1418dd);const _0xbbcb93=_0x17047c[_0x53fc96(0x1c6)]&&_0x5bc8fd[_0x53fc96(0x12b)](_0x393781=>_0x393781[_0x53fc96(0x1d8)]!==_0x53fc96(0x148)&&_0x393781[_0x53fc96(0x1d8)]!=='planned');if(_0xbbcb93){console[_0x53fc96(0x274)](a54_0x3265bd[_0x53fc96(0x119)](_0x53fc96(0x277)));break;}console[_0x53fc96(0x274)](a54_0x3265bd[_0x53fc96(0x1a1)]('\x0aPolling...\x20('+_0x31f375*0x2+_0x53fc96(0x2c7))),await new Promise(_0x1b2d98=>setTimeout(_0x1b2d98,_0x465d91)),_0x31f375++;}_0x31f375>=_0x1cdd1d&&console['error'](a54_0x3265bd[_0x53fc96(0x267)](_0x53fc96(0x2be)));}['renderTimeline'](_0xe0f52a,_0x200fd7,_0x5826f9){const _0x1ad1cd=a54_0xb99464,_0x37a903=[],_0x26cef7=TIMELINE_CONFIG[_0x1ad1cd(0x19a)],_0x470080=0x5,_0x2a734b=process[_0x1ad1cd(0x194)][_0x1ad1cd(0x15f)]||0x78,_0x18685f=_0x2a734b-_0x26cef7-_0x470080,_0x10da8f=Math[_0x1ad1cd(0x2b0)](TIMELINE_CONFIG[_0x1ad1cd(0x116)],Math[_0x1ad1cd(0x2c4)](_0x18685f,TIMELINE_CONFIG[_0x1ad1cd(0x136)])),_0x310537=new Date(_0xe0f52a[_0x1ad1cd(0x168)])[_0x1ad1cd(0x21b)](),_0x47de92=_0xe0f52a[_0x1ad1cd(0x1e6)]?new Date(_0xe0f52a[_0x1ad1cd(0x1e6)])[_0x1ad1cd(0x21b)]():Date['now'](),_0x27a7b1={'start':_0x310537,'end':_0x47de92,'duration':_0x47de92-_0x310537},_0x23a67d=new Map(),_0xfcf30c=[];for(const _0x378455 of _0x200fd7){if(_0x378455[_0x1ad1cd(0x1c4)]){const _0x2da3a0=new Date(_0x378455[_0x1ad1cd(0x1c4)])[_0x1ad1cd(0x21b)](),_0x3165eb=_0x378455['updatedAt']?new Date(_0x378455['updatedAt'])[_0x1ad1cd(0x21b)]():Date['now'](),_0x240595={'start':_0x2da3a0,'end':_0x3165eb,'duration':_0x3165eb-_0x2da3a0};_0x23a67d['set'](_0x378455['id'],_0x240595),_0xfcf30c[_0x1ad1cd(0x2c3)]({'name':_0x378455['fullName'],'state':_0x378455[_0x1ad1cd(0x1d8)]||_0x1ad1cd(0x265),'window':_0x240595});}else _0xfcf30c['push']({'name':_0x378455[_0x1ad1cd(0x275)],'state':_0x378455[_0x1ad1cd(0x1d8)]||_0x1ad1cd(0x203),'window':undefined});}_0xfcf30c[_0x1ad1cd(0x1bc)]((_0x55cbf2,_0x1b7559)=>{const _0x36664b=_0x1ad1cd;if(!_0x55cbf2['window'])return 0x1;if(!_0x1b7559[_0x36664b(0x2c9)])return-0x1;return _0x55cbf2['window'][_0x36664b(0x28c)]-_0x1b7559['window'][_0x36664b(0x28c)];});const _0x3a994d=_0xfcf30c[_0x1ad1cd(0x1b9)],_0x4a75f8=_0x3a994d>TIMELINE_CONFIG[_0x1ad1cd(0x291)];_0x4a75f8&&_0xfcf30c[_0x1ad1cd(0x14c)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x1a4258=calculateTimeScale(_0x27a7b1,_0x10da8f),_0x315ced=_0xe0f52a[_0x1ad1cd(0x1c6)]?_0xe0f52a['success']?a54_0x3265bd[_0x1ad1cd(0x119)](_0x1ad1cd(0x252)):a54_0x3265bd[_0x1ad1cd(0x2aa)](_0x1ad1cd(0x274)):a54_0x3265bd['blue'](_0x1ad1cd(0x148)),_0x29fc15=_0xe0f52a[_0x1ad1cd(0x23d)]?.['id'],_0x5bef46=_0xe0f52a['sessionId'];let _0x484e45;if(_0x29fc15&&_0x5bef46){const _0x29c9c2=getWorkflowAttemptUrl(_0x5826f9,_0x29fc15,_0x5bef46,_0xe0f52a['id']);_0x484e45=hyperlink(a54_0x3265bd[_0x1ad1cd(0x1a1)](_0xe0f52a['id']),_0x29c9c2);}else _0x484e45=a54_0x3265bd['dim'](_0xe0f52a['id']);_0x37a903[_0x1ad1cd(0x2c3)](_0x1ad1cd(0x29e)+_0x484e45+_0x1ad1cd(0x189)+_0x315ced+_0x1ad1cd(0x189)+formatElapsed(_0x27a7b1[_0x1ad1cd(0x20a)]));if(_0xfcf30c[_0x1ad1cd(0x1b9)]>0x0){const _0x23531e=renderTimeAxis(_0x1a4258,_0x10da8f),_0x3a54c9=new Date(_0x27a7b1[_0x1ad1cd(0x28c)]),_0x46ac84=formatDate(_0x3a54c9),_0x3cfa42=TIMELINE_CONFIG[_0x1ad1cd(0x24e)]+TIMELINE_CONFIG[_0x1ad1cd(0x285)]+_0x26cef7,_0x3c8310=_0x46ac84[_0x1ad1cd(0x12c)](_0x3cfa42),_0xd38f25=a54_0x3265bd[_0x1ad1cd(0x1a1)](_0x3c8310);_0x37a903['push'](_0xd38f25+'\x20'+_0x23531e);for(const _0x363215 of _0xfcf30c){_0x37a903['push'](renderTaskRow(_0x363215,_0x1a4258,_0x10da8f,_0x26cef7));}const _0x22cbe5=calculateStats(_0xfcf30c);_0x37a903[_0x1ad1cd(0x2c3)](formatStats(_0x22cbe5)),_0x4a75f8&&_0x37a903[_0x1ad1cd(0x2c3)](a54_0x3265bd[_0x1ad1cd(0x267)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x1ad1cd(0x1ee)+_0x3a994d+_0x1ad1cd(0x2a1))),_0x37a903[_0x1ad1cd(0x2c3)](''),_0x37a903[_0x1ad1cd(0x2c3)](a54_0x3265bd['dim'](_0x1ad1cd(0x17b))+(_0x1ad1cd(0x195)+_0xe0f52a['id']+_0x1ad1cd(0x16e))+a54_0x3265bd[_0x1ad1cd(0x1a1)](_0x1ad1cd(0x15e)));}else _0x37a903[_0x1ad1cd(0x2c3)](_0x1ad1cd(0x2bb));return _0x37a903['join']('\x0a');}[a54_0xb99464(0x123)](_0x46937d,_0xea610b){const _0x31a076=a54_0xb99464,_0x3fda57=new Date(_0x46937d['createdAt'])[_0x31a076(0x21b)](),_0x423fa8=_0x46937d[_0x31a076(0x1e6)]?new Date(_0x46937d[_0x31a076(0x1e6)])[_0x31a076(0x21b)]():Date[_0x31a076(0x186)](),_0x543d4c=_0x423fa8-_0x3fda57,_0xc42ea4=[];for(const _0x588c13 of _0xea610b){if(_0x588c13[_0x31a076(0x1c4)]){const _0x18f144=new Date(_0x588c13[_0x31a076(0x1c4)])[_0x31a076(0x21b)](),_0x28096f=_0x588c13[_0x31a076(0x27e)]?new Date(_0x588c13[_0x31a076(0x27e)])['getTime']():Date['now']();_0xc42ea4[_0x31a076(0x2c3)]({'name':_0x588c13[_0x31a076(0x275)],'state':_0x588c13[_0x31a076(0x1d8)]||'unknown','window':{'start':_0x18f144,'end':_0x28096f,'duration':_0x28096f-_0x18f144}});}else _0xc42ea4[_0x31a076(0x2c3)]({'name':_0x588c13['fullName'],'state':_0x588c13[_0x31a076(0x1d8)]||_0x31a076(0x203),'window':undefined});}const _0x1ff226=calculateStats(_0xc42ea4);return{'attempt':{'id':_0x46937d['id'],'status':_0x46937d[_0x31a076(0x1c6)]?_0x46937d['success']?_0x31a076(0x252):_0x31a076(0x274):'running','createdAt':_0x46937d[_0x31a076(0x168)],'finishedAt':_0x46937d[_0x31a076(0x1e6)],'duration_ms':_0x543d4c},'tasks':_0xc42ea4[_0x31a076(0x127)](_0x4d44e9=>({'name':_0x4d44e9['name'],'state':_0x4d44e9[_0x31a076(0x1d8)],'startedAt':_0x4d44e9['window']?new Date(_0x4d44e9[_0x31a076(0x2c9)][_0x31a076(0x28c)])[_0x31a076(0x29d)]():null,'updatedAt':_0x4d44e9[_0x31a076(0x2c9)]?new Date(_0x4d44e9['window'][_0x31a076(0x1ff)])[_0x31a076(0x29d)]():null,'duration_ms':_0x4d44e9[_0x31a076(0x2c9)]?.['duration']||null})),'stats':_0x1ff226};}}export class WorkflowSchedulesCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x26a);['description']='List\x20workflow\x20schedules';async[a54_0xb99464(0x1e1)](_0x4f5bc4){const _0x188afd=a54_0xb99464,{options:_0x3df03a,tdx:_0x284f50}=_0x4f5bc4,_0x4048f8=await withSpinner(_0x188afd(0x244),()=>_0x284f50['workflow']['listSchedules'](),{'verbose':_0x3df03a[_0x188afd(0x2a9)]}),_0x5f01ec=_0x4048f8[_0x188afd(0x149)];console['error'](_0x188afd(0x28e)+_0x5f01ec[_0x188afd(0x1b9)]+_0x188afd(0x225)+(_0x5f01ec[_0x188afd(0x1b9)]!==0x1?'s':''));if(isStructuredFormat(_0x3df03a))await handleSDKOutput(_0x5f01ec,_0x3df03a);else{if(_0x5f01ec[_0x188afd(0x1b9)]===0x0)console[_0x188afd(0x25a)](_0x188afd(0x22a));else for(const _0x350e81 of _0x5f01ec){const _0x5e728a=_0x350e81[_0x188afd(0x270)]?a54_0x3265bd['yellow'](_0x188afd(0x1bb)):'',_0xfe2fdc=_0x350e81[_0x188afd(0x23d)]?.[_0x188afd(0x2ba)]?a54_0x3265bd[_0x188afd(0x1a1)]('\x20['+_0x350e81[_0x188afd(0x23d)][_0x188afd(0x2ba)]+']'):'',_0x5d72ef=_0x350e81[_0x188afd(0x137)]?a54_0x3265bd[_0x188afd(0x1a1)](_0x188afd(0x286)+new Date(_0x350e81[_0x188afd(0x137)])[_0x188afd(0x16b)]()):'';console['log'](_0x188afd(0x226)+_0x350e81['id']+'\x20'+(_0x350e81['workflow']?.[_0x188afd(0x2ba)]||_0x188afd(0x15a))+_0xfe2fdc+_0x5e728a+_0x5d72ef);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x125);['description']=a54_0xb99464(0x188);async[a54_0xb99464(0x1e1)](_0x1e9cc9){const _0x71d30d=a54_0xb99464,{options:_0x59b466,args:_0x56ab4e,tdx:_0x3fbf1e}=_0x1e9cc9,_0x5c2aaf=_0x56ab4e[0x0];if(!_0x5c2aaf)return console[_0x71d30d(0x274)](a54_0x3265bd[_0x71d30d(0x2aa)](_0x71d30d(0x1dc)),_0x71d30d(0x1bf)),console[_0x71d30d(0x274)](a54_0x3265bd[_0x71d30d(0x1a1)](_0x71d30d(0x124))),console['error'](a54_0x3265bd[_0x71d30d(0x1a1)](_0x71d30d(0x1c9))),0x1;const _0x1b4c9e=await withSpinner('Enabling\x20schedule\x20#'+_0x5c2aaf+_0x71d30d(0x257),()=>_0x3fbf1e[_0x71d30d(0x229)][_0x71d30d(0x1a4)](_0x5c2aaf),{'verbose':_0x59b466[_0x71d30d(0x2a9)]}),_0x24680c=_0x1b4c9e[_0x71d30d(0x149)];return isStructuredFormat(_0x59b466)?await handleSingleObjectOutput(_0x24680c,_0x59b466):(console[_0x71d30d(0x25a)](_0x71d30d(0x212)+_0x5c2aaf+_0x71d30d(0x17d)+(_0x24680c[_0x71d30d(0x229)]?.[_0x71d30d(0x2ba)]||_0x71d30d(0x265))+')'),_0x24680c[_0x71d30d(0x137)]&&console['log'](a54_0x3265bd[_0x71d30d(0x1a1)](_0x71d30d(0x1f4)+new Date(_0x24680c['nextRunTime'])[_0x71d30d(0x16b)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a54_0xb99464(0x2ba)]=a54_0xb99464(0x204);[a54_0xb99464(0x13a)]='Disable\x20a\x20workflow\x20schedule';async[a54_0xb99464(0x1e1)](_0x2c5c5c){const _0x50c577=a54_0xb99464,{options:_0x482d95,args:_0x271959,tdx:_0x26f80f}=_0x2c5c5c,_0x1ea008=_0x271959[0x0];if(!_0x1ea008)return console[_0x50c577(0x274)](a54_0x3265bd['red']('Error:'),_0x50c577(0x1bf)),console[_0x50c577(0x274)](a54_0x3265bd[_0x50c577(0x1a1)](_0x50c577(0x1c3))),console['error'](a54_0x3265bd[_0x50c577(0x1a1)](_0x50c577(0x1c9))),0x1;const _0x29f4a7=await withSpinner(_0x50c577(0x14a)+_0x1ea008+'...',()=>_0x26f80f[_0x50c577(0x229)][_0x50c577(0x163)](_0x1ea008),{'verbose':_0x482d95[_0x50c577(0x2a9)]}),_0x4c8fa4=_0x29f4a7[_0x50c577(0x149)];return isStructuredFormat(_0x482d95)?await handleSingleObjectOutput(_0x4c8fa4,_0x482d95):console[_0x50c577(0x25a)]('✔\x20Schedule\x20#'+_0x1ea008+_0x50c577(0x27c)+(_0x4c8fa4['workflow']?.[_0x50c577(0x2ba)]||'unknown')+')'),0x0;}}
1
+ const a54_0x43a89d=a54_0x3318;(function(_0x5194b4,_0xde79a9){const _0x1b3de2=a54_0x3318,_0x46c40d=_0x5194b4();while(!![]){try{const _0x53490c=-parseInt(_0x1b3de2(0x124))/0x1+parseInt(_0x1b3de2(0x246))/0x2+-parseInt(_0x1b3de2(0x1cb))/0x3*(-parseInt(_0x1b3de2(0x1c7))/0x4)+parseInt(_0x1b3de2(0x24f))/0x5*(-parseInt(_0x1b3de2(0x18c))/0x6)+parseInt(_0x1b3de2(0x195))/0x7*(-parseInt(_0x1b3de2(0x136))/0x8)+-parseInt(_0x1b3de2(0x21d))/0x9+parseInt(_0x1b3de2(0x128))/0xa;if(_0x53490c===_0xde79a9)break;else _0x46c40d['push'](_0x46c40d['shift']());}catch(_0x378f86){_0x46c40d['push'](_0x46c40d['shift']());}}}(a54_0x4f75,0x40dcc));import a54_0x5efbd7 from'chalk';import{existsSync}from'fs';import a54_0x5981fe 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_0x1897d from'prompts';function getAttemptStatusDisplay(_0x397380){const _0x41ae5e=a54_0x3318;if(!_0x397380)return{'icon':'⏳','text':''};const {done:_0x2b0252,success:_0x388fdd,cancelRequested:_0x4aed7d}=_0x397380;if(!_0x2b0252)return _0x4aed7d?{'icon':'🛑','text':a54_0x5efbd7[_0x41ae5e(0x191)](_0x41ae5e(0x111))}:{'icon':'🔄','text':a54_0x5efbd7[_0x41ae5e(0x27d)](_0x41ae5e(0x185))};if(_0x388fdd)return{'icon':'✅','text':a54_0x5efbd7['green'](_0x41ae5e(0x19e))};return{'icon':'❌','text':a54_0x5efbd7[_0x41ae5e(0xf0)](_0x41ae5e(0x25a))};}export class WorkflowBaseCommand extends BaseCommand{[a54_0x43a89d(0x1c3)](_0x578230,_0x461432,_0x42ade4=0x0){return _0x578230[_0x42ade4]||_0x461432['workflowProject'];}['requireProject'](_0x57621e,_0x4949f0,_0x3087ad=0x0){const _0x300698=a54_0x43a89d,_0x4cc863=this[_0x300698(0x1c3)](_0x57621e,_0x4949f0,_0x3087ad);if(!_0x4cc863)return console[_0x300698(0x25a)](a54_0x5efbd7['red']('Error:'),_0x300698(0x1c2)),console[_0x300698(0x25a)](a54_0x5efbd7[_0x300698(0x1cd)](_0x300698(0xd9))),null;return _0x4cc863;}[a54_0x43a89d(0x132)](_0x426783,_0x1ad43d){const _0x3c10c5=a54_0x43a89d;if(_0x426783[0x0]){const _0xa88cc4=_0x426783[0x0][_0x3c10c5(0x11a)]('.');if(_0xa88cc4[_0x3c10c5(0x201)]===0x1)return{'projectName':_0xa88cc4[0x0],'workflowName':undefined};else return _0xa88cc4[_0x3c10c5(0x201)]===0x2?{'projectName':_0xa88cc4[0x0],'workflowName':_0xa88cc4[0x1]}:(console[_0x3c10c5(0x25a)](a54_0x5efbd7[_0x3c10c5(0xf0)](_0x3c10c5(0xf5)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x1ad43d[_0x3c10c5(0x241)],'workflowName':undefined};}[a54_0x43a89d(0x146)](_0x4e9b02,_0x2f5c2b,_0x513097=0x0){const _0x1dbd54=a54_0x43a89d;if(_0x4e9b02[_0x513097])return _0x4e9b02[_0x513097];if(_0x2f5c2b[_0x1dbd54(0x241)]){const _0x644047=a54_0x5981fe[_0x1dbd54(0x205)](process[_0x1dbd54(0x1b0)](),'workflows',_0x2f5c2b[_0x1dbd54(0x241)]);if(existsSync(a54_0x5981fe[_0x1dbd54(0x205)](_0x644047,'tdx.json')))return _0x644047;}return undefined;}async[a54_0x43a89d(0x1b4)](_0x571bd7,_0x5cb549,_0x20fff0){const _0x43f10b=a54_0x43a89d;try{const _0x420011=await _0x571bd7['workflow'][_0x43f10b(0x268)](_0x5cb549,{'limit':0x1});if(_0x420011[_0x43f10b(0x201)]>0x0){const _0x29a6ce=_0x420011[0x0]['id'],_0x26b8a4=getWorkflowUrl(_0x20fff0,_0x29a6ce);console[_0x43f10b(0x25a)]('\x20\x20Console:\x20'+a54_0x5efbd7['cyan'](_0x26b8a4));}}catch{}}}function a54_0x4f75(){const _0x137f48=['revision','index','Project:\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','→\x20Project:\x20','key','clear','Analyzing\x20project...','toISOString','List\x20workflow\x20schedules','error','executeCloneProject','renderSingleTimeline','⚠\x20Showing\x20first\x20','Listing\x20schedules...','\x20tasks','min','From\x20task:\x20','includeSubtasks','attempt:','\x20attempt','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x20modified','\x0aDry\x20run\x20-\x20no\x20project\x20created','workflows','session_id','MAX_TASKS_DISPLAY','tdx\x20wf\x20attempt\x20','done','Error:\x20Secret\x20key\x20is\x20required','Killing\x20attempt...','executePushProject','finishedAt','Include\x20retried:\x20yes','readFile','\x20secrets\x20set\x20for\x20project\x20\x27','includes','Select\x20a\x20session\x20to\x20view\x20timeline:','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Schedule\x20ID\x20is\x20required','workflow:attempts','✔\x20Schedule\x20#','\x1b[1A\x1b[2K','\x22?\x20This\x20cannot\x20be\x20undone.','state','blue','getHours','repeat','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','projectName','select','\x20is\x20not\x20a\x20directory','targetDir','No\x20workflow\x20projects\x20found','workflow:sessions','relative','workflow:schedule:disable','Listing\x20secrets...','\x20schedule','sourceProjectName','No\x20workflows\x20found','updatedAt','stdout','output','---\x20','✔\x20Pull\x20complete','\x20\x20Project\x20ID:\x20','\x20workflow','/attempt/','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','prepareCloneProject','No\x20matching\x20sessions\x20found','Error:\x20Invalid\x20JSON\x20in\x20--params','Select\x20a\x20task\x20to\x20view\x20logs:','\x0a✔\x20Already\x20up\x20to\x20date','context','✔\x20Pushed\x20','\x20(system)','Project\x20name:\x20','now','✔\x20Showing\x20','POLL_INTERVAL_MS','data','Pattern:\x20','TASK_NAME_WIDTH','\x0a⚠\x20Project\x20\x22','basename','Params:\x20','rows','Enable\x20a\x20workflow\x20schedule','Source\x20directory:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','red','Retrying\x20session...','preparePushProject','Status:\x20','\x22\x20to\x20new\x20project\x20\x22','Error:','fileCount','disabledAt','disableSchedule','verbose','json','name','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','duration','kill','\x0aApply\x20these\x20changes?','keys','\x20has\x20no\x20attempts','\x20secrets...','Task\x20name:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','MAX_POLL_ITERATIONS','slice','.\x20Expected\x20format:\x20KEY=VALUE','cyan','Getting\x20attempt\x20tasks...','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','startedAt','toLowerCase','ICON_WIDTH','diff','fromTask','canceling','\x20-\x20','Key:\x20','renderSessionsTimeline','...','renderTimeline','match','LABEL_WIDTH_DIVISOR','Show\x20logs\x20for\x20a\x20workflow\x20attempt','split','MIN_LABEL_COUNT','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Project\x20filter:\x20','Pushing\x20workflow\x20project...','stringify','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','planned','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','metadata','500086Bhzvsj','isTTY','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','Expected\x20format:\x20--param\x20key=value','7205600rUHRpE','Pulling\x20project\x20','Error:\x20Attempt\x20ID\x20is\x20required','(use\x20--limit\x20to\x20see\x20more)','unknown','Deleting\x20project\x20','→\x20New\x20project:\x20','message','filesExtracted','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','parseProjectWorkflowPattern','workflowName','nextRunTime','Starting\x20workflow\x20run...','3529264fmBoVn','No\x20sessions\x20found','yes','Loading\x20workflows...','requireProject','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','pullProject','getDate','Key\x20cannot\x20be\x20empty','task','-\x20nothing\x20pushed','start','Dry\x20run:\x20yes','set','workflow:download','substring','resolveProjectDir','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','revision:\x20','\x0a✔\x20No\x20changes\x20to\x20push','Source:\x20','\x20\x20Target:\x20','createdAt','sourceDir','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','\x20new','filter','toLocaleString','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','localeCompare','✔\x20Workflow\x20project\x20context\x20cleared.','workflow:kill','workflow:push','enableSchedule','new','map','tasks','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','workflow:attempt','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','icon','follow','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','type','MAX_LABEL_COUNT','floor','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','parse','Source\x20directory\x20is\x20required','✔\x20Workflow\x20project\x20set\x20to:\x20','Target\x20directory:\x20','No\x20sessions\x20with\x20timing\x20information','Secrets\x20to\x20set:\x20','Session\x20','retryAttemptName','attempts','msPerChar','skipValidation','listSecrets','📁\x20','fullName','No\x20log\x20content\x20found','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','list','resolve','sys','projectId','\x22\x20already\x20exists\x20(ID:\x20','retrySession','param','MIN_TIMELINE_WIDTH','\x20from\x20session\x20','group_error','No\x20workflow\x20tdx.json\x20found','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','end','No\x20sessions\x20found\x20in\x20project:\x20','✔\x20Push\x20complete','running','isNewProject','\x0aUpdate\x20existing\x20project\x20\x22','\x20\x20Project:\x20','workflow:use','Pull\x20workflow\x20project\x20to\x20local\x20folder','\x20(disabled)','84468NQybLf','Parameters:\x20','Getting\x20attempt\x20details...','attemptId','Warning:','yellow','\x20\x20Next\x20run:\x20','workflow','Filter:\x20','7RWPJZJ','Show\x20tasks\x20for\x20an\x20attempt','✔\x20Clone\x20complete','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','\x20secret','workflow:logs','fileSize','\x0a✔\x20Attempt\x20complete','includeRetried','success','\x20deleted','ICON_SPACING','Select\x20a\x20workflow\x20to\x20run','\x0aFailed\x20to\x20fetch\x20attempt\x20data','durationMs','getMonth','changes','workflow:clone','execute','taskName','Attempt\x20ID:\x20','Output\x20directory:\x20','fs/promises','(unknown)','New\x20project\x20name:\x20','\x20of\x20','force','cwd','\x20session','resolveProjectId','\x20project','showWorkflowConsoleUrl','projects','sessions','dryRun','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','summary','Resolving\x20project\x20\x27','Validation:\x20skipped','resumeFrom','\x20\x20Files\x20extracted:\x20','Writing\x20files...','Loading\x20sessions...','values','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Project\x20name\x20is\x20required','resolveProject','table','getFullYear','max','330520AMTTwX','description','utf-8','log','6PtvRjt','LABEL_MIN_SPACING','dim','Target:\x20','No\x20sessions\x20found\x20for:\x20','List\x20workflow\x20attempts','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Show\x20specific\x20attempt\x20details','MAX_TIMELINE_WIDTH','autocomplete','\x20\x20Workflow:\x20','Failed\x20to\x20fetch\x20attempt\x20data','logFiles','✔\x20Retry\x20started','path','Fetching\x20log\x20files...','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20\x20Location:\x20','\x20\x20Changes:\x20','Start\x20a\x20workflow\x20run','all','\x0aDry\x20run\x20-\x20nothing\x20pushed','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','\x20task','newProjectId','-\x20no\x20files\x20written','window','listSchedules','Attempt:\x20','workflow:run','\x20unchanged','\x0aPush\x20these\x20changes?','status','project','generateSessionTimelineRows','\x20\x20Session\x20ID:\x20','sessionTime','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','trim','sort','📋\x20','Retry\x20a\x20session\x20or\x20attempt','padStart','params','navigateSessionsInteractive','startTime','site','jsonl','workflow:schedules','lastAttempt','No\x20attempts\x20found\x20for:\x20','has','title','size','length','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','fill','\x20\x20tdx\x20wf\x20use\x20<project>','join','Usage:\x20tdx\x20wf\x20use\x20<project>','Deleting\x20secret...','download','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Cancelled','retryAttempt','find','Source\x20project:\x20','getMinutes','sessionId','Listing\x20workflow\x20projects...','No\x20schedules\x20found','applyPullProject','Including\x20subtasks:\x20yes','format','\x0aError:','cancelRequested','columns','Revision:\x20','Enabling\x20schedule\x20#','✔\x20Deleted\x20project\x20','\x20\x20Revision:\x20','session','558909TUdoXv','Error:\x20Project\x20name\x20is\x20required','Filter:\x20project=','buildTimelineData','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','setSecrets','List\x20workflow\x20execution\x20sessions','get','Auto-selected\x20latest\x20session:\x20','Project\x20directory:\x20','Session\x20not\x20found:\x20','Files\x20to\x20upload:\x20','push','Setting\x20','startsWith','hasChanges','\x20(use\x20--limit\x20to\x20show\x20more)','Kill\x20a\x20running\x20attempt','workflow:timeline','getTime','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','green','Tip:\x20cd\x20to\x20workflows/','modified','✔\x20Found\x20','💡\x20Tip:\x20Use\x20','✔\x20Secret\x20\x27','Listing\x20workflow\x20sessions...','unchanged','\x20logs','\x0aPolling...\x20(','\x20\x20Session\x20context\x20set\x20to:\x20','GUTTER','Workflow:\x20','No\x20projects\x20match\x20pattern:\x20','workflowProject','write','round','Setting\x20secret...','newProjectName','822714BQvhwr','value','attempt','pending','targetExists','📅\x20#','limit','pollTimeline','isDirectory','10EyPVIx'];a54_0x4f75=function(){return _0x137f48;};return a54_0x4f75();}export class WorkflowUseCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x189);['description']=a54_0x43a89d(0x1d1);async['execute'](_0x470b1b){const _0x433173=a54_0x43a89d,{options:_0x33b982,args:_0x2689f2,tdx:_0x28881d}=_0x470b1b,_0x4dd41a=_0x2689f2[0x0],_0x345d20=_0x33b982[_0x433173(0x256)];if(_0x345d20)return saveSessionContext({'workflow_project':undefined},_0x33b982[_0x433173(0x21c)]),console[_0x433173(0x1ca)](a54_0x5efbd7[_0x433173(0x233)](_0x433173(0x154))),0x0;if(!_0x4dd41a)return console[_0x433173(0x25a)](a54_0x5efbd7[_0x433173(0xf0)](_0x433173(0xf5)),'Project\x20name\x20is\x20required'),console[_0x433173(0x25a)](a54_0x5efbd7['dim'](_0x433173(0x206))),console[_0x433173(0x25a)](a54_0x5efbd7[_0x433173(0x1cd)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x207bd7=await withSpinner(_0x433173(0x1ba)+_0x4dd41a+'\x27...',()=>_0x28881d[_0x433173(0x193)][_0x433173(0x1b2)](_0x4dd41a),{'verbose':_0x33b982[_0x433173(0xf9)]}),{name:_0x1862da}=_0x207bd7['data'];return saveSessionContext({'workflow_project':_0x1862da},_0x33b982[_0x433173(0x21c)]),console[_0x433173(0x1ca)](a54_0x5efbd7[_0x433173(0x233)](_0x433173(0x167)+a54_0x5efbd7['cyan'](_0x1862da))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a54_0x43a89d(0xfb)]='workflow:projects';[a54_0x43a89d(0x1c8)]='List\x20all\x20workflow\x20projects';async['execute'](_0x2d3d){const _0x5bc858=a54_0x43a89d,{options:_0x2f2e21,args:_0x3d32f0,tdx:_0xf97bbd}=_0x2d3d,_0x530b05=_0x3d32f0[0x0];_0x2f2e21[_0x5bc858(0xf9)]&&_0x530b05&&console['error'](_0x5bc858(0xe7)+_0x530b05);const _0x489f0c=await withSpinner(_0x5bc858(0x210),()=>_0xf97bbd['workflow'][_0x5bc858(0x1b5)](_0x530b05,{'limit':_0x2f2e21['limit']}),{'verbose':_0x2f2e21['verbose']});let _0x4d079e=_0x489f0c[_0x5bc858(0xe6)];_0x4d079e[_0x5bc858(0x1f2)]((_0x100382,_0x4694a7)=>_0x100382[_0x5bc858(0xfb)]['localeCompare'](_0x4694a7[_0x5bc858(0xfb)]));const _0x48bd44=_0x2f2e21[_0x5bc858(0x24c)]||0x64,_0x552caf=_0x4d079e['length']>=_0x48bd44?a54_0x5efbd7[_0x5bc858(0x1cd)](_0x5bc858(0x22e)):'';console[_0x5bc858(0x25a)](_0x5bc858(0x236)+_0x4d079e[_0x5bc858(0x201)]+_0x5bc858(0x1b3)+(_0x4d079e[_0x5bc858(0x201)]!==0x1?'s':'')+_0x552caf);if(_0x2f2e21[_0x5bc858(0x214)]===_0x5bc858(0xfa)||_0x2f2e21[_0x5bc858(0x214)]==='jsonl'||_0x2f2e21[_0x5bc858(0x214)]===_0x5bc858(0x1c4))await handleSDKOutput(_0x4d079e,_0x2f2e21);else{if(_0x4d079e['length']===0x0)_0x530b05?console[_0x5bc858(0x1ca)](_0x5bc858(0x240)+_0x530b05):console['log'](_0x5bc858(0xc9));else{const _0x300f68=_0x4d079e[_0x5bc858(0x159)](_0x1fdb2d=>{const _0x27a3d9=_0x5bc858,_0x469c88=_0x1fdb2d[_0x27a3d9(0x123)]?.['some'](_0x3f9a9d=>_0x3f9a9d[_0x27a3d9(0x255)]===_0x27a3d9(0x177)),_0x2d5941=_0x469c88?a54_0x5efbd7['dim'](_0x27a3d9(0xe1)):'';return _0x27a3d9(0x171)+_0x1fdb2d[_0x27a3d9(0xfb)]+_0x2d5941;});await writeOutput(_0x300f68[_0x5bc858(0x205)]('\x0a'),_0x2f2e21[_0x5bc858(0xd3)],_0x5bc858(0x175));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:workflows';[a54_0x43a89d(0x1c8)]='List\x20workflows';async[a54_0x43a89d(0x1a7)](_0x114f2b){const _0x1fa8da=a54_0x43a89d,{options:_0x800ea6,args:_0x5e5919,tdx:_0x337d19}=_0x114f2b,_0x1136f8=this[_0x1fa8da(0x1c3)](_0x5e5919,_0x800ea6);_0x800ea6['verbose']&&_0x1136f8&&console['error'](_0x1fa8da(0x11d)+_0x1136f8);const _0x1bf215=await withSpinner('Listing\x20workflows...',()=>_0x337d19[_0x1fa8da(0x193)][_0x1fa8da(0x268)](_0x1136f8,{'limit':_0x800ea6[_0x1fa8da(0x24c)]}),{'verbose':_0x800ea6[_0x1fa8da(0xf9)]});let _0x33079b=_0x1bf215['data'];_0x33079b[_0x1fa8da(0x1f2)]((_0x5f3364,_0x4d32be)=>{const _0x3a8c62=_0x1fa8da,_0xd62a8b=_0x5f3364[_0x3a8c62(0xfb)][_0x3a8c62(0x153)](_0x4d32be[_0x3a8c62(0xfb)]);if(_0xd62a8b!==0x0)return _0xd62a8b;return(_0x5f3364[_0x3a8c62(0x1ec)]?.['name']||'')[_0x3a8c62(0x153)](_0x4d32be['project']?.[_0x3a8c62(0xfb)]||'');});const _0x3b2967=_0x800ea6[_0x1fa8da(0x24c)]||0x64,_0x4cbaa1=_0x33079b[_0x1fa8da(0x201)]>=_0x3b2967?a54_0x5efbd7[_0x1fa8da(0x1cd)](_0x1fa8da(0x22e)):'';console['error']('✔\x20Found\x20'+_0x33079b[_0x1fa8da(0x201)]+_0x1fa8da(0xd7)+(_0x33079b[_0x1fa8da(0x201)]!==0x1?'s':'')+_0x4cbaa1);if(_0x800ea6[_0x1fa8da(0x214)]==='json'||_0x800ea6[_0x1fa8da(0x214)]===_0x1fa8da(0x1fa)||_0x800ea6['format']===_0x1fa8da(0x1c4))await handleSDKOutput(_0x33079b,_0x800ea6);else{if(_0x33079b['length']===0x0)_0x1136f8?console[_0x1fa8da(0x1ca)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x1136f8):console[_0x1fa8da(0x1ca)](_0x1fa8da(0xd0));else{const _0x2afed7=_0x800ea6[_0x1fa8da(0x1f9)],_0x4ea1c4=_0x33079b[_0x1fa8da(0x159)](_0x1cbe19=>{const _0x488c84=_0x1fa8da,_0x77e3a5=a54_0x5efbd7[_0x488c84(0x1cd)]('#'+_0x1cbe19['id']),_0x42e8fd=hyperlink(_0x77e3a5,getWorkflowUrl(_0x2afed7,_0x1cbe19['id'])),_0x406d98=_0x1cbe19[_0x488c84(0x1ec)]?.[_0x488c84(0xfb)]?a54_0x5efbd7[_0x488c84(0x1cd)]('\x20('+_0x1cbe19[_0x488c84(0x1ec)][_0x488c84(0xfb)]+')'):'';return _0x488c84(0x1f3)+_0x42e8fd+'\x20'+_0x1cbe19[_0x488c84(0xfb)]+_0x406d98;});await writeOutput(_0x4ea1c4[_0x1fa8da(0x205)]('\x0a'),_0x800ea6[_0x1fa8da(0xd3)],_0x1fa8da(0x175));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a54_0x43a89d(0xca);['description']=a54_0x43a89d(0x224);async[a54_0x43a89d(0x1a7)](_0xa1c917){const _0x21fd95=a54_0x43a89d,{options:_0x26c8e3,args:_0x55d176,tdx:_0x2e3dab}=_0xa1c917,_0x18933b=this[_0x21fd95(0x132)](_0x55d176,_0x26c8e3);if(!_0x18933b)return 0x1;const {projectName:_0x355491,workflowName:_0x14054c}=_0x18933b;if(_0x26c8e3[_0x21fd95(0xf9)]){if(_0x355491&&_0x14054c)console[_0x21fd95(0x25a)](_0x21fd95(0x194)+_0x355491+'.'+_0x14054c);else _0x355491&&console['error'](_0x21fd95(0x21f)+_0x355491);const _0x48f5d0=_0x26c8e3['status'];_0x48f5d0&&console[_0x21fd95(0x25a)](_0x21fd95(0xf3)+_0x48f5d0);}let _0x16f01c=0x28;if(process[_0x21fd95(0xd2)][_0x21fd95(0x125)]&&!_0x26c8e3[_0x21fd95(0xd3)]&&!_0x26c8e3[_0x21fd95(0x214)]){const _0x3ca4e1=process[_0x21fd95(0xd2)][_0x21fd95(0xec)]||0x28;_0x16f01c=Math[_0x21fd95(0x1c6)](0x14,Math[_0x21fd95(0x163)](_0x3ca4e1*0x2/0x3));}const _0x568f3c=_0x26c8e3[_0x21fd95(0x24c)]||_0x16f01c,_0x3c2eae=await withSpinner(_0x21fd95(0x239),()=>_0x2e3dab[_0x21fd95(0x193)][_0x21fd95(0x1b6)]({'projectName':_0x355491,'workflowName':_0x14054c,'status':_0x26c8e3[_0x21fd95(0x1eb)],'fromTime':_0x26c8e3['from'],'toTime':_0x26c8e3['to'],'limit':_0x568f3c}),{'verbose':_0x26c8e3['verbose']}),_0x18355e=_0x3c2eae[_0x21fd95(0xe6)];_0x18355e[_0x21fd95(0x1f2)]((_0x33d79b,_0x5cbe67)=>{const _0x3e1bd7=_0x21fd95,_0x29214b=_0x33d79b['sessionTime']||'',_0xc5a200=_0x5cbe67['sessionTime']||'';return _0xc5a200[_0x3e1bd7(0x153)](_0x29214b);});_0x18355e['length']>=_0x568f3c?console[_0x21fd95(0x25a)](_0x21fd95(0xe4)+_0x18355e['length']+'\x20sessions\x20'+a54_0x5efbd7[_0x21fd95(0x1cd)](_0x21fd95(0x12b))):console[_0x21fd95(0x25a)](_0x21fd95(0x236)+_0x18355e[_0x21fd95(0x201)]+_0x21fd95(0x1b1)+(_0x18355e[_0x21fd95(0x201)]!==0x1?'s':''));if(_0x26c8e3['format']==='json'||_0x26c8e3['format']==='jsonl'||_0x26c8e3[_0x21fd95(0x214)]===_0x21fd95(0x1c4))await handleSDKOutput(_0x18355e,_0x26c8e3);else{if(!process['stdout'][_0x21fd95(0x125)]||_0x26c8e3[_0x21fd95(0xd3)]){if(_0x18355e[_0x21fd95(0x201)]===0x0){if(_0x355491&&_0x14054c)console[_0x21fd95(0x1ca)](_0x21fd95(0x1cf)+_0x355491+'.'+_0x14054c);else _0x355491?console[_0x21fd95(0x1ca)](_0x21fd95(0x183)+_0x355491):console[_0x21fd95(0x1ca)](_0x21fd95(0x137));}else{const _0x443e81=_0x26c8e3['site'],_0x3ad1a2=this[_0x21fd95(0x114)](_0x18355e,_0x443e81);_0x26c8e3[_0x21fd95(0xd3)]?await writeOutput(_0x3ad1a2,_0x26c8e3[_0x21fd95(0xd3)],'list'):console[_0x21fd95(0x1ca)](_0x3ad1a2);}!_0x355491&&(console[_0x21fd95(0x25a)](''),console[_0x21fd95(0x25a)](a54_0x5efbd7[_0x21fd95(0x1cd)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x21fd95(0x25a)](a54_0x5efbd7[_0x21fd95(0x1cd)](_0x21fd95(0x180))+'or'+a54_0x5efbd7[_0x21fd95(0x1cd)](_0x21fd95(0x204))));}else{if(_0x18355e[_0x21fd95(0x201)]===0x0){if(_0x355491&&_0x14054c)console[_0x21fd95(0x1ca)](_0x21fd95(0x1cf)+_0x355491+'.'+_0x14054c);else _0x355491?console[_0x21fd95(0x1ca)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x355491):console[_0x21fd95(0x1ca)]('No\x20sessions\x20found');}else await this['navigateSessionsInteractive'](_0x18355e,_0xa1c917,_0x355491);}}return 0x0;}[a54_0x43a89d(0x114)](_0x1e8488,_0x617840){const _0x3ca59e=a54_0x43a89d,_0x324f55=[],_0x5582c5=new Map();let _0x1682c2=Infinity,_0x4e9bde=-Infinity;for(const _0x301f4b of _0x1e8488){if(_0x301f4b[_0x3ca59e(0x1fc)]?.[_0x3ca59e(0x14c)]){const _0x28e574=new Date(_0x301f4b[_0x3ca59e(0x1fc)][_0x3ca59e(0x14c)])[_0x3ca59e(0x231)](),_0x259ddf=_0x301f4b['lastAttempt'][_0x3ca59e(0x270)]?new Date(_0x301f4b['lastAttempt'][_0x3ca59e(0x270)])['getTime']():Date[_0x3ca59e(0xe3)](),_0x4c8624=_0x301f4b[_0x3ca59e(0x1ec)]?.[_0x3ca59e(0xfb)]||_0x3ca59e(0x1ac);!_0x5582c5[_0x3ca59e(0x1fe)](_0x4c8624)&&_0x5582c5[_0x3ca59e(0x143)](_0x4c8624,[]),_0x5582c5[_0x3ca59e(0x225)](_0x4c8624)['push']({'session':_0x301f4b,'startTime':_0x28e574,'endTime':_0x259ddf,'duration':_0x259ddf-_0x28e574}),_0x1682c2=Math[_0x3ca59e(0x260)](_0x1682c2,_0x28e574),_0x4e9bde=Math[_0x3ca59e(0x1c6)](_0x4e9bde,_0x259ddf);}}if(_0x5582c5[_0x3ca59e(0x200)]===0x0)return _0x3ca59e(0x169);const _0x812a02=process[_0x3ca59e(0xd2)][_0x3ca59e(0x217)]||0x78,_0x1e0b5e=0x1e,_0x3b7312=0x32,_0x25f095=0x4,_0x42e16c=Math[_0x3ca59e(0x260)](_0x3b7312,Math[_0x3ca59e(0x1c6)](_0x1e0b5e,Math[_0x3ca59e(0x163)](_0x812a02*0.3))),_0x1208c9=_0x812a02-_0x42e16c-TIMELINE_CONFIG[_0x3ca59e(0x23e)]-0x3-_0x25f095,_0x12bb1d=_0x4e9bde-_0x1682c2,_0x5c5231=_0x12bb1d/_0x42e16c,_0x2c3beb=renderTimeAxis({'startTime':_0x1682c2,'endTime':_0x4e9bde,'durationMs':_0x12bb1d,'msPerChar':_0x5c5231},_0x42e16c),_0x571475=[];for(const _0x1bb6f6 of _0x5582c5[_0x3ca59e(0x1c0)]()){_0x571475[_0x3ca59e(0x22a)](..._0x1bb6f6);}_0x571475['sort']((_0xf569e,_0x34315f)=>_0x34315f[_0x3ca59e(0x1f8)]-_0xf569e[_0x3ca59e(0x1f8)]);const _0x27aacd=new Date(_0x1682c2),_0xd230c9=formatDate(_0x27aacd),_0x117166=_0x25f095+TIMELINE_CONFIG[_0x3ca59e(0x10e)]+TIMELINE_CONFIG[_0x3ca59e(0x1a0)]+_0x1208c9,_0x50ec3c='\x20'[_0x3ca59e(0x27f)](_0x117166-_0xd230c9[_0x3ca59e(0x201)]),_0x360272=_0x50ec3c+a54_0x5efbd7[_0x3ca59e(0x1cd)](_0xd230c9)+'\x20'+_0x2c3beb;_0x324f55['push'](_0x360272);const _0x68ce6c=0x16;let _0x323a0=0x0;for(const _0xf48376 of _0x571475){const _0x3bee50=_0xf48376[_0x3ca59e(0x21c)][_0x3ca59e(0x1ec)]?.[_0x3ca59e(0xfb)]||'?',_0x14b92a=Math[_0x3ca59e(0x260)](stringWidth(_0x3bee50),_0x68ce6c);_0x323a0=Math[_0x3ca59e(0x1c6)](_0x323a0,_0x14b92a);}for(const _0x1d5122 of _0x571475){const {session:_0x36c852,startTime:_0x50b03c,endTime:_0x17ed07,duration:_0xf6fc1}=_0x1d5122,_0x21d049=_0x36c852[_0x3ca59e(0x1ec)]?.['id'],_0x2055db=_0x36c852['id'],_0x58cfb0=_0x36c852[_0x3ca59e(0x1ec)]?.[_0x3ca59e(0xfb)]||'?',_0xcdca1e=_0x36c852[_0x3ca59e(0x193)]?.[_0x3ca59e(0xfb)]||'?';let _0xa9f97a,_0x4434ee;if(_0x36c852[_0x3ca59e(0x1fc)]){const _0x3a021b=_0x36c852[_0x3ca59e(0x1fc)];!_0x3a021b[_0x3ca59e(0x26c)]?(_0xa9f97a=_0x3a021b[_0x3ca59e(0x216)]?'🛑':'🔄',_0x4434ee=_0x3a021b[_0x3ca59e(0x216)]?a54_0x5efbd7[_0x3ca59e(0x191)]:a54_0x5efbd7[_0x3ca59e(0x27d)]):(_0xa9f97a=_0x3a021b[_0x3ca59e(0x19e)]?'✅':'❌',_0x4434ee=_0x3a021b[_0x3ca59e(0x19e)]?a54_0x5efbd7[_0x3ca59e(0x233)]:a54_0x5efbd7[_0x3ca59e(0xf0)]);}else _0xa9f97a='⏳',_0x4434ee=a54_0x5efbd7[_0x3ca59e(0x1cd)];const _0x5f3f3a='#'+_0x2055db,_0x19fdd3=_0x21d049?hyperlink(_0x5f3f3a,getWorkflowSessionUrl(_0x617840,_0x21d049,_0x2055db)):_0x5f3f3a;let _0x16b197=_0x58cfb0;stringWidth(_0x58cfb0)>_0x68ce6c&&(_0x16b197=_0x58cfb0[_0x3ca59e(0x107)](0x0,_0x68ce6c-0x1)+'…');const _0x584f26=a54_0x5efbd7[_0x3ca59e(0x1cd)](_0x16b197),_0xac2a26=stringWidth(_0x16b197),_0x4496db='\x20'[_0x3ca59e(0x27f)](_0x323a0-stringWidth(_0x16b197)+0x2),_0x4a6a7d='('+formatElapsed(_0xf6fc1)+')',_0x5d8d70=stringWidth(_0x4a6a7d),_0x1aaff0=stringWidth(_0x5f3f3a),_0xf9ffb4=_0x1aaff0+0x1+_0xac2a26+_0x4496db[_0x3ca59e(0x201)],_0x1aad2b=_0x1208c9-_0xf9ffb4-_0x5d8d70-0x1-0x8;let _0x2c5fc2=_0xcdca1e;stringWidth(_0x2c5fc2)>_0x1aad2b&&(_0x2c5fc2=_0x2c5fc2['slice'](0x0,_0x1aad2b-0x1)+'…');const _0xed579a=_0x19fdd3+'\x20'+_0x584f26+_0x4496db+_0x2c5fc2,_0x50b7cd=stringWidth(_0xed579a),_0x4c3161=_0x1208c9-_0x50b7cd-_0x5d8d70,_0x24118d=_0xed579a+'\x20'['repeat'](Math['max'](0x1,_0x4c3161))+a54_0x5efbd7['dim'](_0x4a6a7d),_0xcaf03f=Math['floor']((_0x50b03c-_0x1682c2)/_0x5c5231),_0x2df850=Math[_0x3ca59e(0x163)]((_0x17ed07-_0x1682c2)/_0x5c5231),_0x1bd029=Math[_0x3ca59e(0x1c6)](_0xcaf03f+0x1,_0x2df850),_0x40719c=new Array(_0x42e16c)['fill']('\x20');for(let _0x58e163=_0xcaf03f;_0x58e163<Math['min'](_0x1bd029,_0x42e16c);_0x58e163++){_0x40719c[_0x58e163]='─';}const _0x1437c0=_0x40719c[_0x3ca59e(0x159)](_0xd1a6fc=>_0xd1a6fc==='\x20'?'\x20':_0x4434ee(_0xd1a6fc))[_0x3ca59e(0x205)]('');_0x324f55[_0x3ca59e(0x22a)](_0xa9f97a+'\x20'+_0x24118d+'│'+_0x1437c0+'│');}return _0x324f55[_0x3ca59e(0x205)]('\x0a');}async[a54_0x43a89d(0x1f7)](_0x5a1db7,_0x1e73d5,_0x43d464){const _0xab7598=a54_0x43a89d,{options:_0x18bf23,tdx:_0x2fb3bd}=_0x1e73d5,_0x38cd95=_0x18bf23[_0xab7598(0x1f9)],{timelineRows:_0x116725,timeAxisHeader:_0x476e74}=this[_0xab7598(0x1ed)](_0x5a1db7,_0x38cd95),_0x5249c6=_0x116725[_0xab7598(0x150)](_0x2c20be=>_0x2c20be[_0xab7598(0x18f)]);if(_0x5249c6[_0xab7598(0x201)]===0x0){const _0x2b29b2=this[_0xab7598(0x114)](_0x5a1db7,_0x38cd95);console['log'](_0x2b29b2);!_0x43d464&&(console[_0xab7598(0x25a)](''),console['error'](a54_0x5efbd7[_0xab7598(0x1cd)](_0xab7598(0x276))),console[_0xab7598(0x25a)](a54_0x5efbd7['dim'](_0xab7598(0x180))+'or'+a54_0x5efbd7[_0xab7598(0x1cd)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x476e74&&console[_0xab7598(0x1ca)](_0x476e74);const _0x1ed542=_0x116725[_0xab7598(0x150)](_0x523e7c=>_0x523e7c[_0xab7598(0x18f)])[_0xab7598(0x159)](_0x5527fa=>({'title':_0x5527fa['displayLine'],'value':_0x5527fa[_0xab7598(0x18f)]})),_0x477455=process[_0xab7598(0xd2)][_0xab7598(0xec)]||0x3c,_0x499914=Math['max'](0x28,Math[_0xab7598(0x163)](_0x477455*0x2/0x3)),_0x58878f=await a54_0x1897d({'type':_0xab7598(0x1d4),'name':_0xab7598(0x18f),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x1ed542,'initial':-0x1,'limit':_0x499914,'clearFirst':!![],'fallback':{'title':_0xab7598(0xdb),'value':null},'suggest':(_0x29427f,_0x1fa3b8)=>{const _0x12b551=_0xab7598;if(!_0x29427f)return Promise[_0x12b551(0x176)](_0x1fa3b8);const _0x3445c2=_0x1fa3b8[_0x12b551(0x150)](_0x4eafd4=>{const _0x171142=_0x12b551,_0x3df369=_0x4eafd4;return _0x3df369[_0x171142(0x1ff)][_0x171142(0x10d)]()[_0x171142(0x274)](_0x29427f[_0x171142(0x10d)]());});return Promise[_0x12b551(0x176)](_0x3445c2);}}),_0x35133e=()=>{const _0x1d677c=_0xab7598;process[_0x1d677c(0xd2)]['write'](_0x1d677c(0x27a)),process[_0x1d677c(0xd2)][_0x1d677c(0x242)](_0x1d677c(0x27a)),process[_0x1d677c(0xd2)]['write'](_0x1d677c(0x27a));},_0x28e0ad=_0x58878f&&_0x58878f[_0xab7598(0x18f)]&&_0x58878f[_0xab7598(0x18f)]!==null&&_0x58878f['attemptId'][_0xab7598(0x1f1)]()!=='';if(!_0x28e0ad){_0x35133e(),console['log'](a54_0x5efbd7[_0xab7598(0x1cd)](_0xab7598(0x20a)));return;}_0x35133e();const _0x8d243d=_0x5a1db7[_0xab7598(0x20c)](_0x4261fd=>_0x4261fd[_0xab7598(0x1fc)]?.['id']===_0x58878f[_0xab7598(0x18f)]);if(_0x8d243d){const _0x16604b=_0x8d243d[_0xab7598(0x1ec)]?.[_0xab7598(0xfb)]||'?',_0x3b02d7=_0x8d243d[_0xab7598(0x193)]?.[_0xab7598(0xfb)]||'?';console[_0xab7598(0x1ca)](_0xab7598(0x252)+a54_0x5efbd7[_0xab7598(0x1cd)](_0x16604b)+',\x20Workflow:\x20'+a54_0x5efbd7['dim'](_0x3b02d7));}const _0x301a2c=new WorkflowTimelineCommand();await _0x301a2c['execute']({'args':[],'options':{..._0x18bf23,'attemptId':_0x58878f[_0xab7598(0x18f)]},'tdx':_0x2fb3bd});}[a54_0x43a89d(0x1ed)](_0x533c41,_0x24fa50){const _0xc47940=a54_0x43a89d,_0x2070e7=new Map();for(const _0x1ea74b of _0x533c41){_0x1ea74b['id']&&_0x1ea74b[_0xc47940(0x1fc)]?.['id']&&_0x2070e7['set'](_0x1ea74b['id'],_0x1ea74b[_0xc47940(0x1fc)]['id']);}const _0x27d6f3=[];let _0x30e31e='';const _0x556960=this['renderSessionsTimeline'](_0x533c41,_0x24fa50),_0x113252=_0x556960[_0xc47940(0x11a)]('\x0a');for(const _0x16c10b of _0x113252){if(_0x16c10b[_0xc47940(0x22c)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x16c10b['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0x30e31e=_0x16c10b;else{if(_0x16c10b[_0xc47940(0x117)](/^[✅❌🔄🛑⏳]/)){const _0x2a1a47=_0x16c10b[_0xc47940(0x117)](/#(\d+)/),_0x3fb261=_0x2a1a47?_0x2a1a47[0x1]:null,_0x29eb43=_0x3fb261?_0x2070e7['get'](_0x3fb261)||null:null,_0x5755e4=_0x533c41[_0xc47940(0x20c)](_0xe1bb78=>_0xe1bb78['id']===_0x3fb261),_0x39ea01=_0x5755e4?.[_0xc47940(0x1ec)]?.[_0xc47940(0xfb)]||'';_0x27d6f3[_0xc47940(0x22a)]({'displayLine':_0x16c10b,'attemptId':_0x29eb43,'projectName':_0x39ea01});}}}return{'timelineRows':_0x27d6f3,'timeAxisHeader':_0x30e31e};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x278);['description']=a54_0x43a89d(0x1d0);async['execute'](_0x360731){const _0x1de5d6=a54_0x43a89d,{options:_0x950eb6,args:_0xdb6ae,tdx:_0x6e59a2}=_0x360731,_0x8dcc5=this['parseProjectWorkflowPattern'](_0xdb6ae,_0x950eb6);if(!_0x8dcc5)return 0x1;const {projectName:_0x44efd4,workflowName:_0x35355b}=_0x8dcc5,_0x47ebbf=_0x950eb6[_0x1de5d6(0x19d)];if(_0x950eb6[_0x1de5d6(0xf9)]){if(_0x44efd4&&_0x35355b)console[_0x1de5d6(0x25a)](_0x1de5d6(0x194)+_0x44efd4+'.'+_0x35355b);else _0x44efd4&&console[_0x1de5d6(0x25a)](_0x1de5d6(0x21f)+_0x44efd4);_0x47ebbf&&console['error'](_0x1de5d6(0x271));}const _0x4cb8e8=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x6e59a2[_0x1de5d6(0x193)][_0x1de5d6(0x16d)]({'projectName':_0x44efd4,'workflowName':_0x35355b,'includeRetried':_0x47ebbf,'limit':_0x950eb6['limit']}),{'verbose':_0x950eb6[_0x1de5d6(0xf9)]}),_0x5ca6c0=_0x4cb8e8[_0x1de5d6(0xe6)],_0x30cf8d=_0x950eb6[_0x1de5d6(0x24c)]||0x64,_0x2eb109=_0x5ca6c0[_0x1de5d6(0x201)]>=_0x30cf8d?a54_0x5efbd7[_0x1de5d6(0x1cd)](_0x1de5d6(0x22e)):'';console[_0x1de5d6(0x25a)](_0x1de5d6(0x236)+_0x5ca6c0['length']+_0x1de5d6(0x264)+(_0x5ca6c0[_0x1de5d6(0x201)]!==0x1?'s':'')+_0x2eb109);if(_0x950eb6[_0x1de5d6(0x214)]===_0x1de5d6(0xfa)||_0x950eb6[_0x1de5d6(0x214)]===_0x1de5d6(0x1fa)||_0x950eb6[_0x1de5d6(0x214)]==='table')await handleSDKOutput(_0x5ca6c0,_0x950eb6);else{if(_0x5ca6c0[_0x1de5d6(0x201)]===0x0){if(_0x44efd4&&_0x35355b)console[_0x1de5d6(0x1ca)](_0x1de5d6(0x1fd)+_0x44efd4+'.'+_0x35355b);else _0x44efd4?console[_0x1de5d6(0x1ca)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x44efd4):console[_0x1de5d6(0x1ca)]('No\x20attempts\x20found');}else{const _0x2373fc=_0x950eb6['site'],_0x5aa671=_0x5ca6c0[_0x1de5d6(0x159)](_0x25e724=>{const _0x5bad90=_0x1de5d6,_0x2341c9=a54_0x5efbd7[_0x5bad90(0x1cd)]('#'+_0x25e724['id']),_0x4c5a37=_0x25e724['project']?.['id'],_0x5e7628=_0x25e724[_0x5bad90(0x269)]||_0x25e724[_0x5bad90(0x20f)],_0x254a61=_0x4c5a37&&_0x5e7628?hyperlink(_0x2341c9,getWorkflowAttemptUrl(_0x2373fc,_0x4c5a37,_0x5e7628,_0x25e724['id'])):_0x2341c9,{icon:_0x555e2c,text:_0x3206fe}=getAttemptStatusDisplay(_0x25e724),_0x26af6d=(_0x25e724[_0x5bad90(0x1ec)]?.['name']||'?')+'.'+(_0x25e724[_0x5bad90(0x193)]?.[_0x5bad90(0xfb)]||'?'),_0x4e0f58=_0x25e724['sessionTime']?a54_0x5efbd7[_0x5bad90(0x1cd)](_0x25e724['sessionTime']):'';return(_0x254a61+'\x20'+_0x555e2c+(_0x3206fe?'\x20'+_0x3206fe:'')+'\x20'+_0x26af6d+'\x20'+_0x4e0f58)['trimEnd']();});await writeOutput(_0x5aa671[_0x1de5d6(0x205)]('\x0a'),_0x950eb6['output'],_0x1de5d6(0x175));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x15c);['description']=a54_0x43a89d(0x1d2);async[a54_0x43a89d(0x1a7)](_0xdcff82){const _0x26c94c=a54_0x43a89d,{options:_0x579dca,args:_0x5186e2,tdx:_0x35246f}=_0xdcff82,_0xb07eb7=_0x5186e2[0x0];if(!_0xb07eb7)return console[_0x26c94c(0x25a)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x579dca['verbose']&&console['error']('Attempt\x20ID:\x20'+_0xb07eb7);const _0x580762=await withSpinner(_0x26c94c(0x18e),()=>_0x35246f[_0x26c94c(0x193)][_0x26c94c(0x248)](_0xb07eb7),{'verbose':_0x579dca[_0x26c94c(0xf9)]}),_0x463d1e=_0x580762[_0x26c94c(0xe6)];let _0x28fa57;!_0x463d1e[_0x26c94c(0x26c)]?_0x28fa57=_0x463d1e[_0x26c94c(0x216)]?_0x26c94c(0x111):'running':_0x28fa57=_0x463d1e['success']?_0x26c94c(0x19e):'error';let _0x2c5ce1;if(_0x463d1e[_0x26c94c(0x14c)]&&_0x463d1e['finishedAt']){const _0x399eb8=new Date(_0x463d1e['createdAt'])['getTime'](),_0x4972ea=new Date(_0x463d1e['finishedAt'])[_0x26c94c(0x231)]();_0x2c5ce1=Math[_0x26c94c(0x243)]((_0x4972ea-_0x399eb8)/0x3e8);}const _0x1dacf5={'attempt_id':_0x463d1e['id'],'status':_0x28fa57,..._0x463d1e[_0x26c94c(0x251)]!==undefined&&{'index':_0x463d1e[_0x26c94c(0x251)]},..._0x463d1e[_0x26c94c(0x1ec)]&&{'project':_0x463d1e['project'][_0x26c94c(0xfb)]},..._0x463d1e[_0x26c94c(0x193)]&&{'workflow':_0x463d1e['workflow'][_0x26c94c(0xfb)]},..._0x463d1e['sessionId']&&{'session_id':_0x463d1e[_0x26c94c(0x20f)]},..._0x463d1e[_0x26c94c(0x1ef)]&&{'session_time':_0x463d1e['sessionTime']},..._0x463d1e['retryAttemptName']&&{'retry_attempt':_0x463d1e[_0x26c94c(0x16c)]},..._0x2c5ce1!==undefined&&{'duration_sec':_0x2c5ce1},..._0x463d1e[_0x26c94c(0x14c)]&&{'created_at':_0x463d1e['createdAt']},..._0x463d1e[_0x26c94c(0x270)]&&{'finished_at':_0x463d1e[_0x26c94c(0x270)]},...Object[_0x26c94c(0x100)](_0x463d1e[_0x26c94c(0x1f6)])[_0x26c94c(0x201)]>0x0&&{'params':_0x463d1e[_0x26c94c(0x1f6)]}};return await handleSingleObjectOutput(_0x1dacf5,_0x579dca),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']='workflow:tasks';['description']=a54_0x43a89d(0x196);async[a54_0x43a89d(0x1a7)](_0x336e82){const _0x4d316f=a54_0x43a89d,{options:_0x23d801,args:_0x5529a3,tdx:_0xd85301}=_0x336e82,_0x14e8bc=_0x5529a3[0x0];if(!_0x14e8bc)return console[_0x4d316f(0x25a)](_0x4d316f(0x12a)),0x1;const _0x20ecb6=_0x23d801[_0x4d316f(0x262)];_0x23d801[_0x4d316f(0xf9)]&&(console[_0x4d316f(0x25a)](_0x4d316f(0x1a9)+_0x14e8bc),_0x20ecb6&&console[_0x4d316f(0x25a)](_0x4d316f(0x213)));const _0x12d902=await withSpinner(_0x4d316f(0x10a),()=>_0xd85301[_0x4d316f(0x193)]['tasks'](_0x14e8bc,_0x20ecb6||![]),{'verbose':_0x23d801[_0x4d316f(0xf9)]}),_0x22081f=_0x12d902['data'];return console[_0x4d316f(0x25a)](_0x4d316f(0x236)+_0x22081f['length']+_0x4d316f(0x1e2)+(_0x22081f[_0x4d316f(0x201)]!==0x1?'s':'')),await handleSDKOutput(_0x22081f,_0x23d801),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x19a);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x119);async[a54_0x43a89d(0x1a7)](_0x4d36bc){const _0x1a8092=a54_0x43a89d,{options:_0x10f206,args:_0x21674a,tdx:_0x57962d}=_0x4d36bc,_0x3015f1=_0x21674a[0x0];let _0x19f90b=_0x21674a[0x1];if(!_0x3015f1)return console[_0x1a8092(0x25a)](_0x1a8092(0x12a)),0x1;_0x10f206['verbose']&&(console[_0x1a8092(0x25a)](_0x1a8092(0x1a9)+_0x3015f1),_0x19f90b&&console[_0x1a8092(0x25a)](_0x1a8092(0x103)+_0x19f90b));const _0x55730=await withSpinner(_0x1a8092(0x1da),()=>_0x57962d['workflow'][_0x1a8092(0x1d7)](_0x3015f1,_0x19f90b),{'verbose':_0x10f206[_0x1a8092(0xf9)]}),_0x104faf=_0x55730['data'];if(_0x104faf[_0x1a8092(0x201)]===0x0)return console[_0x1a8092(0x25a)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x19f90b&&(_0x10f206[_0x1a8092(0xfa)]||_0x10f206[_0x1a8092(0x214)]))return await handleSDKOutput(_0x104faf,_0x10f206),0x0;if(!_0x19f90b){const _0x52211d=_0x104faf['map'](_0x590849=>({'title':_0x590849[_0x1a8092(0x1a8)]+'\x20('+formatBytes(_0x590849[_0x1a8092(0x19b)])+')','value':_0x590849[_0x1a8092(0x1a8)]})),_0x3811c1=await a54_0x1897d({'type':_0x1a8092(0xc6),'name':_0x1a8092(0x13f),'message':_0x1a8092(0xdd),'choices':_0x52211d});if(!_0x3811c1[_0x1a8092(0x13f)])return console['error'](_0x1a8092(0x20a)),0x0;_0x19f90b=_0x3811c1[_0x1a8092(0x13f)];}const _0x12a88e=await withSpinner('Downloading\x20logs...',()=>_0x57962d['workflow']['logs'](_0x3015f1,_0x19f90b),{'verbose':_0x10f206[_0x1a8092(0xf9)]}),_0x48f038=_0x12a88e[_0x1a8092(0xe6)];return _0x48f038?console[_0x1a8092(0x1ca)](_0x48f038):console[_0x1a8092(0x25a)](_0x1a8092(0x173)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x155);['description']=a54_0x43a89d(0x22f);async[a54_0x43a89d(0x1a7)](_0x159bad){const _0x1b8283=a54_0x43a89d,{options:_0x5a1a86,args:_0x518b09,tdx:_0xcc10b9}=_0x159bad,_0x2c6bd3=_0x518b09[0x0];if(!_0x2c6bd3)return console[_0x1b8283(0x25a)](_0x1b8283(0x12a)),0x1;const _0x3eae34=_0x5a1a86['reason'];_0x5a1a86[_0x1b8283(0xf9)]&&(console[_0x1b8283(0x25a)](_0x1b8283(0x1a9)+_0x2c6bd3),_0x3eae34&&console[_0x1b8283(0x25a)]('Reason:\x20'+_0x3eae34));if(!_0x5a1a86[_0x1b8283(0x138)]){if(!isInteractive())return console[_0x1b8283(0x25a)](a54_0x5efbd7[_0x1b8283(0xf0)](_0x1b8283(0x215)),_0x1b8283(0x202)),console[_0x1b8283(0x25a)](a54_0x5efbd7[_0x1b8283(0x1cd)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3ec9e3=await confirmKey(_0x1b8283(0x10b)+_0x2c6bd3+'?');if(!_0x3ec9e3)return console[_0x1b8283(0x25a)](a54_0x5efbd7[_0x1b8283(0x191)](_0x1b8283(0x20a))),0x1;}const _0x269217=await withSpinner(_0x1b8283(0x26e),()=>_0xcc10b9[_0x1b8283(0x193)][_0x1b8283(0xfe)](_0x2c6bd3,_0x3eae34),{'verbose':_0x5a1a86[_0x1b8283(0xf9)]}),_0x100fb5=_0x269217['data'];return console[_0x1b8283(0x25a)]('✔\x20'+_0x100fb5),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a54_0x43a89d(0xfb)]='workflow:retry';[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x1f4);async[a54_0x43a89d(0x1a7)](_0xd33817){const _0x5d7f0f=a54_0x43a89d,{options:_0x2d70ba,args:_0x349d12,tdx:_0x5d49e9}=_0xd33817,_0x54e6f8=_0x349d12[0x0];if(!_0x54e6f8)return console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x280)),console[_0x5d7f0f(0x25a)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x595a66=![],_0x2b108b=_0x54e6f8;if(_0x54e6f8['startsWith']('session:'))_0x595a66=!![],_0x2b108b=_0x54e6f8[_0x5d7f0f(0x145)](0x8);else{if(_0x54e6f8[_0x5d7f0f(0x22c)](_0x5d7f0f(0x263)))_0x595a66=![],_0x2b108b=_0x54e6f8[_0x5d7f0f(0x145)](0x8);else return console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x147)),console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x222)),0x1;}const _0x313d9d=_0x2d70ba[_0x5d7f0f(0x110)],_0x25b482=_0x2d70ba[_0x5d7f0f(0x1bc)],_0x21c4e4=_0x2d70ba['params'],_0x1ed942=_0x2d70ba[_0x5d7f0f(0x1af)];_0x2d70ba[_0x5d7f0f(0xf9)]&&(console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x1ce)+(_0x595a66?_0x5d7f0f(0x21c):'attempt')+'\x20'+_0x2b108b),_0x313d9d&&console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x261)+_0x313d9d),_0x25b482&&console[_0x5d7f0f(0x25a)]('Resume\x20from:\x20'+_0x25b482),_0x21c4e4&&console['error'](_0x5d7f0f(0xeb)+_0x21c4e4),_0x1ed942&&console[_0x5d7f0f(0x25a)]('Force:\x20yes'));let _0xa08db5;if(_0x21c4e4)try{if(_0x21c4e4[_0x5d7f0f(0x22c)]('@')){const _0x4a8d70=await import(_0x5d7f0f(0x1ab)),_0x58112f=_0x21c4e4[_0x5d7f0f(0x145)](0x1),_0x5cf36d=await _0x4a8d70[_0x5d7f0f(0x272)](_0x58112f,_0x5d7f0f(0x1c9));_0xa08db5=JSON['parse'](_0x5cf36d);}else _0xa08db5=JSON[_0x5d7f0f(0x165)](_0x21c4e4);}catch{return console['error'](_0x5d7f0f(0xdc)),0x1;}if(!_0x2d70ba['yes']){if(!isInteractive())return console['error'](a54_0x5efbd7['red'](_0x5d7f0f(0x215)),_0x5d7f0f(0x202)),console[_0x5d7f0f(0x25a)](a54_0x5efbd7[_0x5d7f0f(0x1cd)](_0x5d7f0f(0x174))),0x1;const _0x260772=await confirmKey(_0x5d7f0f(0xef)+(_0x595a66?_0x5d7f0f(0x21c):_0x5d7f0f(0x248))+'\x20'+_0x2b108b+'?');if(!_0x260772)return console[_0x5d7f0f(0x25a)](a54_0x5efbd7[_0x5d7f0f(0x191)]('Cancelled')),0x1;}let _0x31807f;_0x595a66?_0x31807f=await withSpinner(_0x5d7f0f(0xf1),()=>_0x5d49e9['workflow'][_0x5d7f0f(0x17a)](_0x2b108b,{'fromTask':_0x313d9d,'retryParams':_0xa08db5}),{'verbose':_0x2d70ba[_0x5d7f0f(0xf9)]}):_0x31807f=await withSpinner('Retrying\x20attempt...',()=>_0x5d49e9['workflow'][_0x5d7f0f(0x20b)](_0x2b108b,{'resumeFrom':_0x25b482,'retryParams':_0xa08db5,'force':_0x1ed942}),{'verbose':_0x2d70ba[_0x5d7f0f(0xf9)]});const _0x3cfc02=_0x31807f[_0x5d7f0f(0xe6)];return console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x1d8)),console[_0x5d7f0f(0x25a)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x3cfc02[_0x5d7f0f(0x18f)]),console[_0x5d7f0f(0x25a)](_0x5d7f0f(0x1ee)+_0x3cfc02[_0x5d7f0f(0x20f)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x1e8);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x1de);async[a54_0x43a89d(0x1a7)](_0x37f6e4){const _0x27b3b8=a54_0x43a89d,{options:_0x5ccd72,args:_0x14362c,tdx:_0x2ff742}=_0x37f6e4;let _0x3893d5=_0x14362c[0x0];if(!_0x3893d5){const _0x5610ce=this[_0x27b3b8(0x1c3)]([],_0x5ccd72),_0x3f2909=await withSpinner(_0x27b3b8(0x139),()=>_0x2ff742[_0x27b3b8(0x193)][_0x27b3b8(0x268)](_0x5610ce,{'limit':_0x5ccd72[_0x27b3b8(0x24c)]}),{'verbose':_0x5ccd72[_0x27b3b8(0xf9)]}),_0x51386f=_0x3f2909[_0x27b3b8(0xe6)];if(_0x51386f[_0x27b3b8(0x201)]===0x0)return console['error'](_0x27b3b8(0xd0)),!_0x5610ce&&console[_0x27b3b8(0x25a)](a54_0x5efbd7['dim'](_0x27b3b8(0xd9))),0x1;const _0x250a3c=_0x51386f['map'](_0x11b924=>({'title':_0x11b924[_0x27b3b8(0x1ec)]?.['name']+'.'+_0x11b924[_0x27b3b8(0xfb)],'value':_0x11b924['project']?.['name']+'.'+_0x11b924[_0x27b3b8(0xfb)],'description':_0x11b924[_0x27b3b8(0x250)]?_0x27b3b8(0x148)+_0x11b924[_0x27b3b8(0x250)]:undefined})),_0x1ca58c=await a54_0x1897d({'type':_0x27b3b8(0xc6),'name':'workflow','message':_0x27b3b8(0x1a1),'choices':_0x250a3c});if(!_0x1ca58c['workflow'])return 0x1;_0x3893d5=_0x1ca58c[_0x27b3b8(0x193)];}if(!_0x3893d5[_0x27b3b8(0x274)]('.')){const _0x5cc073=this[_0x27b3b8(0x1c3)]([],_0x5ccd72);if(_0x5cc073)_0x3893d5=_0x5cc073+'.'+_0x3893d5;else return console[_0x27b3b8(0x25a)](a54_0x5efbd7[_0x27b3b8(0xf0)](_0x27b3b8(0xf5)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x27b3b8(0x25a)](a54_0x5efbd7['dim'](_0x27b3b8(0xd9))),0x1;}const _0x59c822=_0x5ccd72[_0x27b3b8(0x17b)],_0x44e39a=_0x5ccd72['sessionTime'],_0x58a93a={};if(_0x59c822&&Array['isArray'](_0x59c822))for(const _0x4c671d of _0x59c822){const _0x255fc1=_0x4c671d['indexOf']('=');if(_0x255fc1===-0x1)return console[_0x27b3b8(0x25a)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x4c671d),console[_0x27b3b8(0x25a)](_0x27b3b8(0x127)),0x1;const _0x2a2e30=_0x4c671d['substring'](0x0,_0x255fc1),_0x19b5dc=_0x4c671d['substring'](_0x255fc1+0x1);try{_0x58a93a[_0x2a2e30]=JSON[_0x27b3b8(0x165)](_0x19b5dc);}catch{_0x58a93a[_0x2a2e30]=_0x19b5dc;}}_0x5ccd72[_0x27b3b8(0xf9)]&&(console[_0x27b3b8(0x25a)](_0x27b3b8(0x23f)+_0x3893d5),Object[_0x27b3b8(0x100)](_0x58a93a)['length']>0x0&&console[_0x27b3b8(0x25a)](_0x27b3b8(0x18d)+JSON[_0x27b3b8(0x11f)](_0x58a93a)),_0x44e39a&&console[_0x27b3b8(0x25a)]('Session\x20time:\x20'+_0x44e39a));const _0x33f64f=await withSpinner(_0x27b3b8(0x135),()=>_0x2ff742[_0x27b3b8(0x193)]['run'](_0x3893d5,_0x58a93a,{'sessionTime':_0x44e39a}),{'verbose':_0x5ccd72['verbose']}),_0x215448=_0x33f64f['data'];console[_0x27b3b8(0x25a)]('✔\x20Workflow\x20run\x20started'),console['error']('\x20\x20Attempt\x20ID:\x20'+_0x215448['id']),console[_0x27b3b8(0x25a)](_0x27b3b8(0x1ee)+_0x215448['sessionId']),console[_0x27b3b8(0x25a)](_0x27b3b8(0x188)+_0x215448['project']?.['name']),console[_0x27b3b8(0x25a)](_0x27b3b8(0x1d5)+_0x215448[_0x27b3b8(0x193)]?.['name']);if(_0x215448['project']?.['id']&&_0x215448[_0x27b3b8(0x20f)]&&_0x215448['id']){const _0x4c9604=_0x5ccd72[_0x27b3b8(0x1f9)],_0xdfbcdb=getConsoleUrl(_0x4c9604,'/app/workflows/'+_0x215448[_0x27b3b8(0x1ec)]['id']+'/sessions/'+_0x215448[_0x27b3b8(0x20f)]+_0x27b3b8(0xd8)+_0x215448['id']);console[_0x27b3b8(0x25a)]('\x20\x20Console:\x20'+a54_0x5efbd7['cyan'](_0xdfbcdb));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x144);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x15d);async[a54_0x43a89d(0x1a7)](_0x2ce2b0){const _0x251dc7=a54_0x43a89d,{options:_0x3e55e1,args:_0x58dfad,tdx:_0x4eb81b}=_0x2ce2b0,_0x59a300=_0x58dfad[0x0],_0x2c024f=_0x58dfad[0x1]||'.';if(!_0x59a300)return console[_0x251dc7(0x25a)](_0x251dc7(0x21e)),console[_0x251dc7(0x25a)](_0x251dc7(0x164)),0x1;const _0x2c9396=_0x3e55e1[_0x251dc7(0x250)];_0x3e55e1[_0x251dc7(0xf9)]&&(console[_0x251dc7(0x25a)](_0x251dc7(0x252)+_0x59a300),console[_0x251dc7(0x25a)](_0x251dc7(0x1aa)+_0x2c024f),_0x2c9396&&console[_0x251dc7(0x25a)](_0x251dc7(0x218)+_0x2c9396));const _0x1cc5f8=await withSpinner('Downloading\x20project\x20'+_0x59a300+_0x251dc7(0x115),()=>_0x4eb81b[_0x251dc7(0x193)][_0x251dc7(0x208)](_0x59a300,_0x2c024f,{'revision':_0x2c9396}),{'verbose':_0x3e55e1[_0x251dc7(0xf9)]}),_0x4ce203=_0x1cc5f8[_0x251dc7(0xe6)];return console['error']('✔\x20Downloaded\x20'+_0x4ce203[_0x251dc7(0xc5)]),console[_0x251dc7(0x25a)]('\x20\x20Revision:\x20'+_0x4ce203[_0x251dc7(0x250)]),console[_0x251dc7(0x25a)](_0x251dc7(0x1bd)+_0x4ce203[_0x251dc7(0x130)]),console[_0x251dc7(0x25a)](_0x251dc7(0x1dc)+_0x2c024f+'/'+_0x4ce203[_0x251dc7(0xc5)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:upload';[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x221);async['execute'](_0x54037b){const _0x3bee5c=a54_0x43a89d,{options:_0x224f43,args:_0x2d8734,tdx:_0x391864}=_0x54037b;let _0x52f9d4='.',_0x5a7490=_0x224f43[_0x3bee5c(0xfb)];if(_0x2d8734[0x0]){const {promises:_0x1917d4}=await import('fs');try{const _0x424cff=await _0x1917d4['stat'](_0x2d8734[0x0]);if(_0x424cff[_0x3bee5c(0x24e)]())_0x52f9d4=_0x2d8734[0x0];else return console['error']('Error:\x20'+_0x2d8734[0x0]+_0x3bee5c(0xc7)),0x1;}catch{_0x5a7490=_0x2d8734[0x0],_0x52f9d4='.';}}const _0x5c522e=_0x224f43['revision'],_0x4803cc=_0x224f43[_0x3bee5c(0x16f)];_0x224f43[_0x3bee5c(0xf9)]&&(console[_0x3bee5c(0x25a)](_0x3bee5c(0x227)+_0x52f9d4),_0x5a7490&&console['error'](_0x3bee5c(0xe2)+_0x5a7490),_0x5c522e&&console[_0x3bee5c(0x25a)](_0x3bee5c(0x218)+_0x5c522e),_0x4803cc&&console['error'](_0x3bee5c(0x1bb)));const _0x583bce=await withSpinner(_0x3bee5c(0x11e),()=>_0x391864[_0x3bee5c(0x193)][_0x3bee5c(0x22a)](_0x52f9d4,{'projectName':_0x5a7490,'revision':_0x5c522e,'skipValidation':_0x4803cc}),{'verbose':_0x224f43[_0x3bee5c(0xf9)]}),_0x147bc5=_0x583bce[_0x3bee5c(0xe6)];return console[_0x3bee5c(0x25a)](_0x3bee5c(0xe0)+_0x147bc5[_0x3bee5c(0xc5)]),console[_0x3bee5c(0x25a)]('\x20\x20Project\x20ID:\x20'+_0x147bc5[_0x3bee5c(0x178)]),console[_0x3bee5c(0x25a)]('\x20\x20Revision:\x20'+_0x147bc5['revision']),await this[_0x3bee5c(0x1b4)](_0x391864,_0x147bc5[_0x3bee5c(0xc5)],_0x224f43['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a54_0x43a89d(0xfb)]='workflow:pull';[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x18a);async[a54_0x43a89d(0x1a7)](_0x4566bd){const _0xa3fa0b=a54_0x43a89d,{options:_0xe7b4fa,args:_0x1b66ea,tdx:_0x3b0af0}=_0x4566bd,_0x28bb4b=_0x1b66ea[0x0],_0x5b4836=_0x1b66ea[0x1];if(!_0x28bb4b)return console['error'](a54_0x5efbd7[_0xa3fa0b(0xf0)](_0xa3fa0b(0xf5)),_0xa3fa0b(0x1c2)),console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0x1cd)](_0xa3fa0b(0x232))),0x1;const _0x17a3b9=_0xe7b4fa['revision'];_0xe7b4fa[_0xa3fa0b(0xf9)]&&(console['error'](_0xa3fa0b(0x252)+_0x28bb4b),_0x5b4836&&console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x168)+_0x5b4836),_0x17a3b9&&console['error'](_0xa3fa0b(0x218)+_0x17a3b9),_0xe7b4fa[_0xa3fa0b(0x1b7)]&&console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x142)));const _0x56a2c4=await withSpinner(_0xa3fa0b(0x129)+_0x28bb4b+'...',()=>_0x3b0af0[_0xa3fa0b(0x193)][_0xa3fa0b(0x13c)](_0x28bb4b,{'targetDir':_0x5b4836,'revision':_0x17a3b9}),{'verbose':_0xe7b4fa[_0xa3fa0b(0xf9)]}),_0x1ae5e9=_0x56a2c4[_0xa3fa0b(0xe6)];_0x1ae5e9[_0xa3fa0b(0x186)]?console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x12e)+_0x1ae5e9[_0xa3fa0b(0xc5)]):console['error'](_0xa3fa0b(0x254)+_0x1ae5e9[_0xa3fa0b(0xc5)]);console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x21b)+_0x1ae5e9[_0xa3fa0b(0x250)]),console['error'](_0xa3fa0b(0x14b)+(a54_0x5981fe[_0xa3fa0b(0xcb)](process[_0xa3fa0b(0x1b0)](),_0x1ae5e9['targetDir'])||'.')),console[_0xa3fa0b(0x25a)](_0xa3fa0b(0x1dd)+a54_0x5efbd7[_0xa3fa0b(0x233)]('+'+_0x1ae5e9[_0xa3fa0b(0x1b9)][_0xa3fa0b(0x158)]+_0xa3fa0b(0x14f))+',\x20'+(a54_0x5efbd7[_0xa3fa0b(0x191)]('~'+_0x1ae5e9[_0xa3fa0b(0x1b9)][_0xa3fa0b(0x235)]+_0xa3fa0b(0x266))+',\x20')+(a54_0x5efbd7[_0xa3fa0b(0xf0)]('-'+_0x1ae5e9[_0xa3fa0b(0x1b9)]['deleted']+_0xa3fa0b(0x19f))+',\x20')+(''+a54_0x5efbd7['dim'](_0x1ae5e9[_0xa3fa0b(0x1b9)][_0xa3fa0b(0x23a)]+_0xa3fa0b(0x1e9))));for(const _0x5f012a of _0x1ae5e9[_0xa3fa0b(0x1a5)]){_0x5f012a['type']===_0xa3fa0b(0x235)&&_0x5f012a['diff']&&(console[_0xa3fa0b(0x25a)]('\x0a'+a54_0x5efbd7[_0xa3fa0b(0x109)](_0xa3fa0b(0xd4)+_0x5f012a[_0xa3fa0b(0x1d9)])),console[_0xa3fa0b(0x25a)](_0x5f012a['diff']));}if(!_0x1ae5e9[_0xa3fa0b(0x22d)])return saveSessionContext({'workflow_project':_0x1ae5e9[_0xa3fa0b(0xc5)]},_0xe7b4fa['session']),console[_0xa3fa0b(0x25a)](a54_0x5efbd7['green'](_0xa3fa0b(0xde))),console['error'](a54_0x5efbd7[_0xa3fa0b(0x1cd)](_0xa3fa0b(0x23d)+_0x1ae5e9[_0xa3fa0b(0xc5)])),0x0;if(_0xe7b4fa['dryRun'])return console[_0xa3fa0b(0x25a)](a54_0x5efbd7['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0xe7b4fa['yes']){if(!isInteractive())return console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0xf0)](_0xa3fa0b(0x215)),_0xa3fa0b(0x202)),console[_0xa3fa0b(0x25a)](a54_0x5efbd7['dim'](_0xa3fa0b(0x174))),0x1;const _0xaf60=await confirmKey(_0xa3fa0b(0xff));if(!_0xaf60)return console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0x191)]('Cancelled'),_0xa3fa0b(0x1e4)),0x1;}await withSpinner(_0xa3fa0b(0x1be),()=>_0x3b0af0[_0xa3fa0b(0x193)][_0xa3fa0b(0x212)](_0x1ae5e9,{'revision':_0x17a3b9}),{'verbose':_0xe7b4fa['verbose']}),saveSessionContext({'workflow_project':_0x1ae5e9[_0xa3fa0b(0xc5)]},_0xe7b4fa['session']),console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0x233)](_0xa3fa0b(0xd5)));const _0x180604=a54_0x5981fe['relative'](process[_0xa3fa0b(0x1b0)](),_0x1ae5e9[_0xa3fa0b(0xc8)])||'.';return console[_0xa3fa0b(0x25a)](a54_0x5efbd7['dim'](_0xa3fa0b(0x1dc)+_0x180604)),console[_0xa3fa0b(0x25a)](a54_0x5efbd7[_0xa3fa0b(0x1cd)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1ae5e9['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x156);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x265);async['execute'](_0x209a83){const _0x1eb770=a54_0x43a89d,{options:_0x1180bd,args:_0x479aa1,tdx:_0x4a2460}=_0x209a83,_0x19f51d=this[_0x1eb770(0x146)](_0x479aa1,_0x1180bd),_0x41b4d5=_0x1180bd[_0x1eb770(0x250)],_0x342edf=_0x1180bd[_0x1eb770(0x16f)];_0x1180bd[_0x1eb770(0xf9)]&&(_0x19f51d&&console[_0x1eb770(0x25a)](_0x1eb770(0xee)+_0x19f51d),_0x41b4d5&&console[_0x1eb770(0x25a)](_0x1eb770(0x218)+_0x41b4d5),_0x1180bd[_0x1eb770(0x1b7)]&&console[_0x1eb770(0x25a)](_0x1eb770(0x142)),_0x342edf&&console[_0x1eb770(0x25a)](_0x1eb770(0x1bb)));let _0x3e371f;try{_0x3e371f=await withSpinner('Analyzing\x20changes...',()=>_0x4a2460['workflow'][_0x1eb770(0xf2)]({'sourceDir':_0x19f51d,'revision':_0x41b4d5,'skipValidation':_0x342edf}),{'verbose':_0x1180bd['verbose']});}catch(_0x58b0d4){if(_0x58b0d4 instanceof Error&&_0x58b0d4[_0x1eb770(0x12f)]['includes'](_0x1eb770(0x17f)))return console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0xf0)](_0x1eb770(0xf5)),_0x1eb770(0x122)),_0x1180bd[_0x1eb770(0x241)]?console['error'](a54_0x5efbd7[_0x1eb770(0x1cd)](_0x1eb770(0x234)+_0x1180bd[_0x1eb770(0x241)]+_0x1eb770(0x13b)+_0x1180bd[_0x1eb770(0x241)]+'\x27')):console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0x1cd)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x58b0d4;}const _0x37261c=_0x3e371f[_0x1eb770(0xe6)];console[_0x1eb770(0x25a)]('✔\x20Project:\x20'+_0x37261c['projectName']),console['error']('\x20\x20Source:\x20'+_0x37261c['sourceDir']),console[_0x1eb770(0x25a)]('\x20\x20Revision:\x20'+_0x37261c[_0x1eb770(0x250)]),console[_0x1eb770(0x25a)](_0x1eb770(0x1dd)+a54_0x5efbd7['green']('+'+_0x37261c[_0x1eb770(0x1b9)][_0x1eb770(0x158)]+'\x20new')+',\x20'+(a54_0x5efbd7[_0x1eb770(0x191)]('~'+_0x37261c['summary'][_0x1eb770(0x235)]+_0x1eb770(0x266))+',\x20')+(a54_0x5efbd7[_0x1eb770(0xf0)]('-'+_0x37261c[_0x1eb770(0x1b9)]['deleted']+_0x1eb770(0x19f))+',\x20')+(''+a54_0x5efbd7[_0x1eb770(0x1cd)](_0x37261c[_0x1eb770(0x1b9)][_0x1eb770(0x23a)]+_0x1eb770(0x1e9))));for(const _0x50f5d4 of _0x37261c[_0x1eb770(0x1a5)]){_0x50f5d4[_0x1eb770(0x161)]==='modified'&&_0x50f5d4[_0x1eb770(0x10f)]&&(console[_0x1eb770(0x25a)]('\x0a'+a54_0x5efbd7['cyan'](_0x1eb770(0xd4)+_0x50f5d4['path'])),console[_0x1eb770(0x25a)](_0x50f5d4[_0x1eb770(0x10f)]));}if(!_0x37261c[_0x1eb770(0x22d)])return console[_0x1eb770(0x25a)](a54_0x5efbd7['green'](_0x1eb770(0x149))),await this[_0x1eb770(0x1b4)](_0x4a2460,_0x37261c['projectName'],_0x1180bd['site']),0x0;if(_0x1180bd[_0x1eb770(0x1b7)])return console[_0x1eb770(0x25a)](a54_0x5efbd7['yellow'](_0x1eb770(0x1e0))),0x0;if(!_0x1180bd[_0x1eb770(0x138)]){if(!isInteractive())return console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0xf0)](_0x1eb770(0x215)),_0x1eb770(0x202)),console[_0x1eb770(0x25a)](a54_0x5efbd7['dim'](_0x1eb770(0x174))),0x1;const _0x337da3=await confirmKey(_0x1eb770(0x1ea));if(!_0x337da3)return console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0x191)]('Cancelled'),_0x1eb770(0x140)),0x1;}const _0x422117=await withSpinner('Pushing\x20project...',()=>_0x4a2460[_0x1eb770(0x193)][_0x1eb770(0x26f)](_0x37261c),{'verbose':_0x1180bd[_0x1eb770(0xf9)]}),_0x52036a=_0x422117['data'];return console[_0x1eb770(0x25a)](a54_0x5efbd7[_0x1eb770(0x233)](_0x1eb770(0x184))),console['error'](_0x1eb770(0xd6)+_0x52036a[_0x1eb770(0x178)]),console[_0x1eb770(0x25a)]('\x20\x20Revision:\x20'+_0x52036a[_0x1eb770(0x250)]),await this[_0x1eb770(0x1b4)](_0x4a2460,_0x52036a[_0x1eb770(0xc5)],_0x1180bd[_0x1eb770(0x1f9)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x1a6);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x105);async['execute'](_0x46a4b8){const _0x2bcf87=a54_0x43a89d,{options:_0x4c4725,args:_0x576fce,tdx:_0x486d8e}=_0x46a4b8,_0x213548=this[_0x2bcf87(0x146)](_0x576fce,_0x4c4725),_0x1d826c=_0x4c4725[_0x2bcf87(0xfb)],_0x296450=_0x4c4725[_0x2bcf87(0x250)],_0x345f89=_0x4c4725[_0x2bcf87(0x16f)];if(!_0x213548)return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0xf0)]('Error:'),_0x2bcf87(0x166)),console[_0x2bcf87(0x25a)](a54_0x5efbd7['dim'](_0x2bcf87(0x1db))),console['error'](a54_0x5efbd7[_0x2bcf87(0x1cd)](_0x2bcf87(0x198))),0x1;if(!_0x1d826c)return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0xf0)](_0x2bcf87(0xf5)),_0x2bcf87(0xfc)),console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x1cd)](_0x2bcf87(0x1db))),0x1;_0x4c4725['verbose']&&(console[_0x2bcf87(0x25a)](_0x2bcf87(0xee)+_0x213548),console[_0x2bcf87(0x25a)](_0x2bcf87(0x1ad)+_0x1d826c),_0x296450&&console[_0x2bcf87(0x25a)](_0x2bcf87(0x218)+_0x296450),_0x4c4725['dryRun']&&console['error']('Dry\x20run:\x20yes'),_0x345f89&&console[_0x2bcf87(0x25a)]('Validation:\x20skipped'));const _0x59051c=await withSpinner(_0x2bcf87(0x257),()=>_0x486d8e[_0x2bcf87(0x193)][_0x2bcf87(0xda)](_0x213548,_0x1d826c,{'revision':_0x296450,'skipValidation':_0x345f89}),{'verbose':_0x4c4725[_0x2bcf87(0xf9)]}),_0x434c14=_0x59051c['data'];console[_0x2bcf87(0x25a)](_0x2bcf87(0x14a)+_0x434c14[_0x2bcf87(0x14d)]);_0x434c14[_0x2bcf87(0xcf)]&&console[_0x2bcf87(0x25a)](_0x2bcf87(0x20d)+_0x434c14[_0x2bcf87(0xcf)]);console[_0x2bcf87(0x25a)](_0x2bcf87(0x1ad)+_0x434c14[_0x2bcf87(0x245)]),console[_0x2bcf87(0x25a)](_0x2bcf87(0x218)+_0x434c14[_0x2bcf87(0x250)]),console[_0x2bcf87(0x25a)](_0x2bcf87(0x229)+_0x434c14[_0x2bcf87(0xf6)]);_0x434c14[_0x2bcf87(0x24a)]&&(console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x191)](_0x2bcf87(0xe9)+_0x434c14[_0x2bcf87(0x245)]+_0x2bcf87(0x179)+_0x434c14['existingProjectId']+')')),console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x191)](_0x2bcf87(0x126))));if(_0x4c4725[_0x2bcf87(0x1b7)])return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x191)](_0x2bcf87(0x267))),0x0;if(!_0x4c4725[_0x2bcf87(0x138)]){if(!isInteractive())return console[_0x2bcf87(0x25a)](a54_0x5efbd7['red'](_0x2bcf87(0x215)),_0x2bcf87(0x202)),console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x1cd)](_0x2bcf87(0x174))),0x1;const _0x14ed72=_0x434c14[_0x2bcf87(0xcf)]||a54_0x5981fe[_0x2bcf87(0xea)](_0x213548),_0x5c0d1f=_0x434c14[_0x2bcf87(0x24a)]?_0x2bcf87(0x187)+_0x1d826c+'\x22\x20with\x20new\x20revision?':'\x0aClone\x20\x22'+_0x14ed72+_0x2bcf87(0xf4)+_0x1d826c+'\x22?',_0x39767d=await confirmKey(_0x5c0d1f);if(!_0x39767d)return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x191)](_0x2bcf87(0x20a))),0x1;}const _0x740418=await withSpinner(_0x434c14[_0x2bcf87(0x24a)]?'Updating\x20'+_0x1d826c+_0x2bcf87(0x115):'Cloning\x20to\x20'+_0x1d826c+_0x2bcf87(0x115),()=>_0x486d8e[_0x2bcf87(0x193)][_0x2bcf87(0x25b)](_0x434c14),{'verbose':_0x4c4725[_0x2bcf87(0xf9)]}),_0x1d8fff=_0x740418[_0x2bcf87(0xe6)];return console[_0x2bcf87(0x25a)](a54_0x5efbd7[_0x2bcf87(0x233)](_0x434c14[_0x2bcf87(0x24a)]?'✔\x20Project\x20updated':_0x2bcf87(0x197))),console[_0x2bcf87(0x25a)](_0x2bcf87(0x188)+_0x1d8fff[_0x2bcf87(0x245)]),console[_0x2bcf87(0x25a)](_0x2bcf87(0xd6)+_0x1d8fff[_0x2bcf87(0x1e3)]),console[_0x2bcf87(0x25a)](_0x2bcf87(0x21b)+_0x1d8fff[_0x2bcf87(0x250)]),await this[_0x2bcf87(0x1b4)](_0x486d8e,_0x1d8fff[_0x2bcf87(0x245)],_0x4c4725['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a54_0x43a89d(0xfb)]='workflow:delete';[a54_0x43a89d(0x1c8)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a54_0x43a89d(0x1a7)](_0x1a257b){const _0x592f24=a54_0x43a89d,{options:_0x595e1b,args:_0xe31106,tdx:_0x49dc93}=_0x1a257b,_0xbf9fe1=_0xe31106[0x0];if(!_0xbf9fe1)return console[_0x592f24(0x25a)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x592f24(0x25a)](_0x592f24(0x181)),0x1;_0x595e1b[_0x592f24(0xf9)]&&console[_0x592f24(0x25a)](_0x592f24(0x252)+_0xbf9fe1);if(!_0x595e1b['yes']){if(!isInteractive())return console['error'](a54_0x5efbd7[_0x592f24(0xf0)]('\x0aError:'),_0x592f24(0x202)),console['error'](a54_0x5efbd7['dim'](_0x592f24(0x174))),0x1;const _0x2ae473=await confirmKey(_0x592f24(0x160)+_0xbf9fe1+_0x592f24(0x27b));if(!_0x2ae473)return console['error'](a54_0x5efbd7['yellow'](_0x592f24(0x20a))),0x1;}const _0xe4a468=await withSpinner(_0x592f24(0x12d)+_0xbf9fe1+_0x592f24(0x115),()=>_0x49dc93[_0x592f24(0x193)]['delete'](_0xbf9fe1),{'verbose':_0x595e1b[_0x592f24(0xf9)]}),_0x33d1ed=_0xe4a468[_0x592f24(0xe6)];return console[_0x592f24(0x25a)](_0x592f24(0x21a)+_0x33d1ed['projectName']),console['error'](_0x592f24(0xd6)+_0x33d1ed[_0x592f24(0x178)]),0x0;}}export function parseKeyValue(_0x229244){const _0x5d728f=a54_0x43a89d,_0x21b622=_0x229244['indexOf']('=');if(_0x21b622===-0x1)throw new Error('Invalid\x20format:\x20'+_0x229244+_0x5d728f(0x108));const _0x53a5ea=_0x229244[_0x5d728f(0x145)](0x0,_0x21b622),_0x3d88bf=_0x229244['substring'](_0x21b622+0x1);if(!_0x53a5ea)throw new Error(_0x5d728f(0x13e));return{'key':_0x53a5ea,'value':_0x3d88bf};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:secrets:list';[a54_0x43a89d(0x1c8)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a54_0x43a89d(0x1a7)](_0x1d1761){const _0x2be043=a54_0x43a89d,{options:_0x16c46c,args:_0x33fcb9,tdx:_0x140122}=_0x1d1761,_0x2d543a=this[_0x2be043(0x13a)](_0x33fcb9,_0x16c46c);if(!_0x2d543a)return 0x1;_0x16c46c[_0x2be043(0xf9)]&&console['error'](_0x2be043(0x252)+_0x2d543a);const _0x36f36b=await withSpinner(_0x2be043(0xcd),()=>_0x140122[_0x2be043(0x193)][_0x2be043(0x170)](_0x2d543a),{'verbose':_0x16c46c[_0x2be043(0xf9)]}),{secrets:_0x59dd96}=_0x36f36b[_0x2be043(0xe6)];return console[_0x2be043(0x25a)]('✔\x20Found\x20'+_0x59dd96[_0x2be043(0x201)]+_0x2be043(0x199)+(_0x59dd96[_0x2be043(0x201)]!==0x1?'s':'')),await handleSDKOutput(_0x59dd96,_0x16c46c),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:secrets:set';[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x1b8);async[a54_0x43a89d(0x1a7)](_0x2b4dbb){const _0x12b9f6=a54_0x43a89d,{options:_0x171c0e,args:_0x3403a1,tdx:_0xb961b8}=_0x2b4dbb;let _0x58af9c,_0x40f604;if(_0x3403a1[_0x12b9f6(0x201)]>=0x1&&!_0x3403a1[0x0][_0x12b9f6(0x274)]('='))_0x58af9c=_0x3403a1[0x0],_0x40f604=_0x3403a1[_0x12b9f6(0x107)](0x1);else{if(_0x3403a1[_0x12b9f6(0x201)]>=0x1&&_0x171c0e[_0x12b9f6(0x241)])_0x58af9c=_0x171c0e[_0x12b9f6(0x241)],_0x40f604=_0x3403a1;else return _0x3403a1['length']>=0x1?(console['error'](_0x12b9f6(0x21e)),console[_0x12b9f6(0x25a)](_0x12b9f6(0xd9)),0x1):(console[_0x12b9f6(0x25a)](_0x12b9f6(0x131)),console['error'](_0x12b9f6(0x11c)),0x1);}if(_0x40f604[_0x12b9f6(0x201)]===0x0)return console['error']('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x12b9f6(0x25a)](_0x12b9f6(0x11c)),0x1;const _0x358a70={};try{for(const _0xef3250 of _0x40f604){const {key:_0x3263c7,value:_0x3bb3fe}=parseKeyValue(_0xef3250);_0x358a70[_0x3263c7]=_0x3bb3fe;}}catch(_0x1851be){return _0x1851be instanceof Error&&console[_0x12b9f6(0x25a)](a54_0x5efbd7['red'](_0x12b9f6(0xf5)),_0x1851be[_0x12b9f6(0x12f)]),0x1;}const _0x15ab2a=Object[_0x12b9f6(0x100)](_0x358a70);_0x171c0e[_0x12b9f6(0xf9)]&&(console[_0x12b9f6(0x25a)](_0x12b9f6(0x252)+_0x58af9c),console['error'](_0x12b9f6(0x16a)+_0x15ab2a[_0x12b9f6(0x205)](',\x20')));const _0x388633=await withSpinner(_0x15ab2a[_0x12b9f6(0x201)]===0x1?_0x12b9f6(0x244):_0x12b9f6(0x22b)+_0x15ab2a[_0x12b9f6(0x201)]+_0x12b9f6(0x102),()=>_0xb961b8[_0x12b9f6(0x193)][_0x12b9f6(0x223)](_0x58af9c,_0x358a70),{'verbose':_0x171c0e['verbose']}),_0x115bf5=_0x388633[_0x12b9f6(0xe6)];return console['error'](_0x15ab2a[_0x12b9f6(0x201)]===0x1?'✔\x20Secret\x20\x27'+_0x115bf5['keys'][0x0]+_0x12b9f6(0x253)+_0x115bf5[_0x12b9f6(0xc5)]+'\x27':'✔\x20'+_0x115bf5['keys']['length']+_0x12b9f6(0x273)+_0x115bf5[_0x12b9f6(0xc5)]+'\x27'),(_0x171c0e[_0x12b9f6(0xfa)]||_0x171c0e[_0x12b9f6(0x1fa)])&&await handleSingleObjectOutput(_0x115bf5,_0x171c0e),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]='workflow:secrets:delete';[a54_0x43a89d(0x1c8)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a54_0x43a89d(0x1a7)](_0x520680){const _0x4426f5=a54_0x43a89d,{options:_0x24adf3,args:_0x17347b,tdx:_0x3b31a3}=_0x520680;let _0x50fd3b,_0x3851b1;if(_0x17347b[_0x4426f5(0x201)]>=0x2)_0x50fd3b=_0x17347b[0x0],_0x3851b1=_0x17347b[0x1];else{if(_0x17347b[_0x4426f5(0x201)]===0x1&&_0x24adf3[_0x4426f5(0x241)])_0x50fd3b=_0x24adf3['workflowProject'],_0x3851b1=_0x17347b[0x0];else return _0x17347b[_0x4426f5(0x201)]===0x1?(console[_0x4426f5(0x25a)](_0x4426f5(0x21e)),console['error'](_0x4426f5(0xd9)),0x1):(console[_0x4426f5(0x25a)](_0x4426f5(0x26d)),console[_0x4426f5(0x25a)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x24adf3[_0x4426f5(0xf9)]&&(console['error'](_0x4426f5(0x252)+_0x50fd3b),console[_0x4426f5(0x25a)](_0x4426f5(0x113)+_0x3851b1));if(!_0x24adf3[_0x4426f5(0x138)]){if(!isInteractive())return console[_0x4426f5(0x25a)](a54_0x5efbd7[_0x4426f5(0xf0)]('\x0aError:'),_0x4426f5(0x202)),console[_0x4426f5(0x25a)](a54_0x5efbd7[_0x4426f5(0x1cd)](_0x4426f5(0x174))),0x1;const _0x81e443=await confirmKey(_0x4426f5(0x1e1)+_0x3851b1+'\x27\x20from\x20project\x20\x27'+_0x50fd3b+'\x27?');if(!_0x81e443)return console[_0x4426f5(0x25a)](a54_0x5efbd7[_0x4426f5(0x191)](_0x4426f5(0x20a))),0x1;}const _0x151253=await withSpinner(_0x4426f5(0x207),()=>_0x3b31a3['workflow']['deleteSecret'](_0x50fd3b,_0x3851b1),{'verbose':_0x24adf3[_0x4426f5(0xf9)]}),_0x4b5f4a=_0x151253[_0x4426f5(0xe6)];return console[_0x4426f5(0x25a)](_0x4426f5(0x238)+_0x4b5f4a['key']+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x4b5f4a[_0x4426f5(0xc5)]+'\x27'),(_0x24adf3[_0x4426f5(0xfa)]||_0x24adf3['jsonl'])&&await handleSingleObjectOutput(_0x4b5f4a,_0x24adf3),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(_0x6bce03){const _0x154867=a54_0x43a89d,_0x6c2e35=Math['floor'](_0x6bce03/0x3e8),_0xc6986c=Math[_0x154867(0x163)](_0x6c2e35/0x3c),_0x55fffa=Math[_0x154867(0x163)](_0xc6986c/0x3c),_0x44bebf=Math[_0x154867(0x163)](_0x55fffa/0x18);if(_0x44bebf>0x0){const _0x162095=_0x55fffa%0x18;return _0x162095>0x0?_0x44bebf+'d\x20'+_0x162095+'h':_0x44bebf+'d';}else{if(_0x55fffa>0x0){const _0x36e505=_0xc6986c%0x3c;return _0x36e505>0x0?_0x55fffa+'h\x20'+_0x36e505+'m':_0x55fffa+'h';}else{if(_0xc6986c>0x0){const _0x4b9bbc=_0x6c2e35%0x3c;return _0x4b9bbc>0x0?_0xc6986c+'m\x20'+_0x4b9bbc+'s':_0xc6986c+'m';}else return _0x6c2e35+'s';}}}function formatTimestamp(_0x236619,_0x304452){const _0x4ff854=a54_0x43a89d,_0x413fdc=new Date(_0x236619),_0x5553a8=String(_0x413fdc[_0x4ff854(0x27e)]())[_0x4ff854(0x1f5)](0x2,'0'),_0x5dfd0e=String(_0x413fdc[_0x4ff854(0x20e)]())['padStart'](0x2,'0'),_0xb8654e=_0x5553a8+':'+_0x5dfd0e,_0x3b4fb8=_0x413fdc[_0x4ff854(0x1c5)]()===_0x304452['getFullYear']()&&_0x413fdc[_0x4ff854(0x1a4)]()===_0x304452[_0x4ff854(0x1a4)]()&&_0x413fdc[_0x4ff854(0x13d)]()===_0x304452[_0x4ff854(0x13d)]();if(_0x3b4fb8)return _0xb8654e;else{const _0x1e5270=String(_0x413fdc['getMonth']()+0x1)[_0x4ff854(0x1f5)](0x2,'0'),_0x27f5e3=String(_0x413fdc[_0x4ff854(0x13d)]())['padStart'](0x2,'0');return _0x1e5270+'-'+_0x27f5e3+'\x20'+_0xb8654e;}}function formatDate(_0x1f72d8){const _0x4b515d=a54_0x43a89d,_0x484819=_0x1f72d8[_0x4b515d(0x1c5)](),_0x1ad2ea=String(_0x1f72d8[_0x4b515d(0x1a4)]()+0x1)['padStart'](0x2,'0'),_0x4f2352=String(_0x1f72d8[_0x4b515d(0x13d)]())[_0x4b515d(0x1f5)](0x2,'0');return _0x484819+'-'+_0x1ad2ea+'-'+_0x4f2352;}function getTaskStateIcon(_0x3f7358){const _0x6c74d8={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x6c74d8[_0x3f7358]||'⚪';}function getBarChar(_0x53194e){const _0x354563=a54_0x43a89d;return _0x53194e===_0x354563(0x25a)||_0x53194e===_0x354563(0x17e)?'×':'─';}function getBarColor(_0x16fc07){const _0x3025ba=a54_0x43a89d,_0x124bbe={'success':a54_0x5efbd7[_0x3025ba(0x233)],'error':a54_0x5efbd7[_0x3025ba(0xf0)],'group_error':a54_0x5efbd7['red'],'running':a54_0x5efbd7[_0x3025ba(0x27d)],'blocked':a54_0x5efbd7[_0x3025ba(0x191)],'planned':a54_0x5efbd7[_0x3025ba(0x1cd)],'canceling':a54_0x5efbd7['yellow']};return _0x124bbe[_0x16fc07]||a54_0x5efbd7['white'];}function parseTaskName(_0x279c29){const _0xb3e434=a54_0x43a89d;let _0xf32efb=_0x279c29['replace'](/^\++/,'');const _0x560e35=_0xf32efb['split']('+'),_0x43e63b=_0x560e35['length']>0x1?_0x560e35['length']-0x2:0x0,_0x4e4295=_0x560e35[_0x560e35[_0xb3e434(0x201)]-0x1]||_0xf32efb;return{'level':_0x43e63b,'name':'+'+_0x4e4295};}function truncateTaskName(_0x4dd84a,_0x1e6b17){const _0x598f89=a54_0x43a89d,_0x4b8ce5=stringWidth(_0x4dd84a);if(_0x4b8ce5<=_0x1e6b17)return _0x4dd84a;let _0x3e23ce=_0x4dd84a;while(stringWidth(_0x3e23ce+'…')>_0x1e6b17&&_0x3e23ce[_0x598f89(0x201)]>0x0){_0x3e23ce=_0x3e23ce['slice'](0x0,-0x1);}return _0x3e23ce+'…';}function calculateTimeScale(_0x494db2,_0x4d11b2){const _0x2b7377=a54_0x43a89d;return{'startTime':_0x494db2['start'],'endTime':_0x494db2[_0x2b7377(0x182)],'durationMs':_0x494db2[_0x2b7377(0xfd)],'msPerChar':_0x494db2['duration']/_0x4d11b2};}function timeToPosition(_0x11b87a,_0x3c859d,_0x30703c){const _0x193294=a54_0x43a89d,_0x3948cf=_0x11b87a-_0x3c859d['startTime'],_0x1ff065=Math[_0x193294(0x163)](_0x3948cf/_0x3c859d[_0x193294(0x16e)]);return Math[_0x193294(0x1c6)](0x0,Math[_0x193294(0x260)](_0x1ff065,_0x30703c));}function renderTimeAxis(_0x168ccd,_0x297f45){const _0x32fd19=a54_0x43a89d,_0x5be3a7=Math[_0x32fd19(0x260)](TIMELINE_CONFIG[_0x32fd19(0x162)],Math['max'](TIMELINE_CONFIG[_0x32fd19(0x11b)],Math['floor'](_0x297f45/TIMELINE_CONFIG[_0x32fd19(0x118)]))),_0x2a7242=_0x168ccd[_0x32fd19(0x1a3)]/(_0x5be3a7-0x1),_0x152dd8=new Date(_0x168ccd[_0x32fd19(0x1f8)]),_0x573d38=[];for(let _0x575c06=0x0;_0x575c06<_0x5be3a7;_0x575c06++){const _0x4da343=_0x168ccd[_0x32fd19(0x1f8)]+_0x575c06*_0x2a7242,_0x4a6a3a=timeToPosition(_0x4da343,_0x168ccd,_0x297f45),_0x30eef3=formatTimestamp(_0x4da343,_0x152dd8);_0x573d38[_0x32fd19(0x22a)]({'pos':_0x4a6a3a,'text':_0x30eef3});}const _0xfd6dec=new Array(_0x297f45)[_0x32fd19(0x203)]('\x20');let _0x16209e=-0x1;for(const {pos:_0x44a57e,text:_0x51bd14}of _0x573d38){let _0x5443b9=Math[_0x32fd19(0x1c6)](0x0,_0x44a57e-Math['floor'](_0x51bd14[_0x32fd19(0x201)]/0x2));_0x5443b9<=_0x16209e+TIMELINE_CONFIG[_0x32fd19(0x1cc)]&&(_0x5443b9=_0x16209e+TIMELINE_CONFIG[_0x32fd19(0x1cc)]+0x1);_0x5443b9+_0x51bd14['length']>_0x297f45&&(_0x5443b9=_0x297f45-_0x51bd14['length']);if(_0x5443b9>=0x0&&_0x5443b9+_0x51bd14[_0x32fd19(0x201)]<=_0x297f45&&_0x5443b9>_0x16209e){for(let _0x92f528=0x0;_0x92f528<_0x51bd14[_0x32fd19(0x201)];_0x92f528++){_0xfd6dec[_0x5443b9+_0x92f528]=_0x51bd14[_0x92f528];}_0x16209e=_0x5443b9+_0x51bd14['length']-0x1;}}return _0xfd6dec[_0x32fd19(0x205)]('');}function renderTaskRow(_0x5d1de8,_0x301910,_0xeabe9e,_0x57ea49){const _0x4422df=a54_0x43a89d,{level:_0x504f12,name:_0x1169bf}=parseTaskName(_0x5d1de8[_0x4422df(0xfb)]),_0x1fd689='\x20'[_0x4422df(0x27f)](_0x504f12),_0xd27710=_0x5d1de8['window']?'('+formatElapsed(_0x5d1de8[_0x4422df(0x1e5)][_0x4422df(0xfd)])+')':'',_0x3e9cb4=stringWidth(_0xd27710),_0x16af3c=_0x504f12*0x1,_0x320886=_0x57ea49-_0x16af3c-_0x3e9cb4-0x1,_0x45db7f=truncateTaskName(_0x1169bf,_0x320886),_0x1e9700=_0x1fd689+_0x45db7f,_0x3d9eb3=stringWidth(_0x1e9700),_0x1c1db7=_0x57ea49-_0x3d9eb3-_0x3e9cb4,_0x544574=_0x1e9700+'\x20'[_0x4422df(0x27f)](Math[_0x4422df(0x1c6)](0x1,_0x1c1db7))+a54_0x5efbd7[_0x4422df(0x1cd)](_0xd27710),_0x20448d=getTaskStateIcon(_0x5d1de8[_0x4422df(0x27c)]),_0x29c3d8=new Array(_0xeabe9e)[_0x4422df(0x203)]('\x20');if(_0x5d1de8[_0x4422df(0x1e5)]){const _0x324f05=timeToPosition(_0x5d1de8[_0x4422df(0x1e5)]['start'],_0x301910,_0xeabe9e),_0x22e6b9=timeToPosition(_0x5d1de8['window']['end'],_0x301910,_0xeabe9e),_0x1a4d8a=getBarChar(_0x5d1de8['state']),_0x51178f=Math['max'](_0x324f05+0x1,_0x22e6b9);for(let _0x1d49e8=_0x324f05;_0x1d49e8<Math['min'](_0x51178f,_0xeabe9e);_0x1d49e8++){_0x29c3d8[_0x1d49e8]=_0x1a4d8a;}}const _0x57519d=getBarColor(_0x5d1de8[_0x4422df(0x27c)]),_0x126354=_0x29c3d8[_0x4422df(0x159)](_0x262b30=>_0x262b30==='\x20'?'\x20':_0x57519d(_0x262b30))[_0x4422df(0x205)]('');return _0x20448d+'\x20'+_0x544574+'│'+_0x126354+'│';}function calculateStats(_0x427b37){const _0xa07ea2=a54_0x43a89d,_0x1a7469={'total':_0x427b37[_0xa07ea2(0x201)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3a4459 of _0x427b37){if(_0x3a4459[_0xa07ea2(0x27c)]==='success')_0x1a7469[_0xa07ea2(0x19e)]++;else{if(_0x3a4459[_0xa07ea2(0x27c)]==='error'||_0x3a4459[_0xa07ea2(0x27c)]===_0xa07ea2(0x17e))_0x1a7469['error']++;else _0x3a4459[_0xa07ea2(0x27c)]===_0xa07ea2(0x185)?_0x1a7469['running']++:_0x1a7469['pending']++;}}return _0x1a7469;}function formatStats(_0x82af55){const _0x1c6e25=a54_0x43a89d;return['Total:\x20'+_0x82af55['total'],'✅\x20'+_0x82af55['success'],'❌\x20'+_0x82af55[_0x1c6e25(0x25a)],'🔄\x20'+_0x82af55[_0x1c6e25(0x185)],'⏳\x20'+_0x82af55[_0x1c6e25(0x249)]][_0x1c6e25(0x205)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x230);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x15b);async[a54_0x43a89d(0x1a7)](_0xdbcbb9){const _0x173e02=a54_0x43a89d,{options:_0x3e5441,args:_0x342ff4,tdx:_0x1bed7e}=_0xdbcbb9;let _0x1e7f8e,_0x5c7989,_0x11ef84=![];if(_0x342ff4[0x0]){if(_0x342ff4[0x0][_0x173e02(0x274)]('.')){const _0x5a2a2f=this[_0x173e02(0x132)](_0x342ff4,_0x3e5441);if(!_0x5a2a2f)return 0x1;_0x1e7f8e=_0x5a2a2f[_0x173e02(0xc5)],_0x5c7989=_0x5a2a2f[_0x173e02(0x133)];}else{_0x5c7989=_0x342ff4[0x0],_0x1e7f8e=_0x3e5441[_0x173e02(0x241)];if(!_0x1e7f8e)return console[_0x173e02(0x25a)](a54_0x5efbd7[_0x173e02(0xf0)](_0x173e02(0xf5)),_0x173e02(0x104)),0x1;_0x11ef84=!![];}}else{const _0x430058=this[_0x173e02(0x132)](_0x342ff4,_0x3e5441);if(!_0x430058)return 0x1;_0x1e7f8e=_0x430058[_0x173e02(0xc5)],_0x5c7989=_0x430058[_0x173e02(0x133)];}if(_0x3e5441[_0x173e02(0xf9)]){if(_0x1e7f8e&&_0x5c7989)console[_0x173e02(0x25a)](_0x173e02(0x194)+_0x1e7f8e+'.'+_0x5c7989);else _0x1e7f8e&&console[_0x173e02(0x25a)]('Filter:\x20project='+_0x1e7f8e);}const _0x382697=_0x3e5441[_0x173e02(0x18f)],_0x86180f=_0x3e5441[_0x173e02(0x20f)];if(_0x382697){_0x86180f&&console[_0x173e02(0x25a)](a54_0x5efbd7[_0x173e02(0x191)](_0x173e02(0x190)),_0x173e02(0x1f0));const _0x55ecf3=_0x3e5441['follow'];return _0x55ecf3?await this[_0x173e02(0x24d)](_0xdbcbb9,_0x382697):await this[_0x173e02(0x25c)](_0xdbcbb9,_0x382697,_0x3e5441),0x0;}if(_0x86180f){const _0x4694aa=await withSpinner('Loading\x20session...',()=>_0x1bed7e[_0x173e02(0x193)]['sessions']({'projectName':_0x1e7f8e,'workflowName':_0x5c7989,'limit':0x64}),{'verbose':_0x3e5441[_0x173e02(0xf9)]}),_0x44d387=_0x4694aa[_0x173e02(0xe6)]['find'](_0xedfe56=>_0xedfe56['id']===_0x86180f);if(!_0x44d387)return console[_0x173e02(0x25a)](a54_0x5efbd7[_0x173e02(0xf0)]('Error:'),_0x173e02(0x228)+_0x86180f),0x1;if(!_0x44d387['lastAttempt']?.['id'])return console[_0x173e02(0x25a)](a54_0x5efbd7[_0x173e02(0xf0)](_0x173e02(0xf5)),_0x173e02(0x16b)+_0x86180f+_0x173e02(0x101)),0x1;const _0x327bc5=_0x44d387[_0x173e02(0x1fc)]['id'];_0x3e5441[_0x173e02(0xf9)]&&console[_0x173e02(0x25a)]('Using\x20attempt\x20'+_0x327bc5+_0x173e02(0x17d)+_0x86180f);const _0xf9f7e5=_0x3e5441[_0x173e02(0x15f)];return _0xf9f7e5?await this['pollTimeline'](_0xdbcbb9,_0x327bc5):await this[_0x173e02(0x25c)](_0xdbcbb9,_0x327bc5,_0x3e5441),0x0;}const _0x3be862=await withSpinner(_0x173e02(0x1bf),()=>_0x1bed7e[_0x173e02(0x193)][_0x173e02(0x1b6)]({'projectName':_0x1e7f8e,'workflowName':_0x5c7989,'limit':_0x3e5441[_0x173e02(0x24c)]||0x32}),{'verbose':_0x3e5441[_0x173e02(0xf9)]}),_0x416fcc=_0x3be862[_0x173e02(0xe6)];if(_0x416fcc[_0x173e02(0x201)]===0x0){if(_0x1e7f8e&&_0x5c7989)console[_0x173e02(0x25a)](_0x173e02(0x1cf)+_0x1e7f8e+'.'+_0x5c7989);else _0x1e7f8e?console[_0x173e02(0x25a)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x1e7f8e):(console[_0x173e02(0x25a)]('No\x20workflow\x20sessions\x20found'),console['error'](a54_0x5efbd7[_0x173e02(0x1cd)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x416fcc[_0x173e02(0x1f2)]((_0xa81a52,_0x44655a)=>{const _0x1b2854=_0x173e02,_0x5d1cb2=_0xa81a52[_0x1b2854(0x1ef)]||'',_0x2ce403=_0x44655a[_0x1b2854(0x1ef)]||'';return _0x2ce403[_0x1b2854(0x153)](_0x5d1cb2);});if(_0x3e5441[_0x173e02(0xfa)]||_0x3e5441[_0x173e02(0x1fa)])return await handleSDKOutput(_0x416fcc,_0x3e5441),0x0;let _0x417f3c;if(_0x11ef84){const _0x404bc5=_0x416fcc[0x0];if(!_0x404bc5['lastAttempt']?.['id'])return console[_0x173e02(0x25a)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x417f3c=_0x404bc5['lastAttempt']['id'],_0x3e5441[_0x173e02(0xf9)]&&console[_0x173e02(0x25a)](_0x173e02(0x226)+_0x404bc5[_0x173e02(0x1ef)]);}else{const _0x1a0dcd=_0x416fcc[_0x173e02(0x159)](_0x3edc4b=>{const _0x4bdaa0=_0x173e02,_0x4cea87=getAttemptStatusDisplay(_0x3edc4b[_0x4bdaa0(0x1fc)]);return{'title':_0x3edc4b[_0x4bdaa0(0x1ec)]?.[_0x4bdaa0(0xfb)]+'.'+_0x3edc4b['workflow']?.[_0x4bdaa0(0xfb)]+_0x4bdaa0(0x112)+_0x3edc4b[_0x4bdaa0(0x1ef)]+'\x20'+_0x4cea87[_0x4bdaa0(0x15e)],'value':_0x3edc4b[_0x4bdaa0(0x1fc)]?.['id']||'','description':_0x4cea87['text']};}),_0x5e24ab=await a54_0x1897d({'type':_0x173e02(0xc6),'name':_0x173e02(0x18f),'message':_0x173e02(0x275),'choices':_0x1a0dcd[_0x173e02(0x150)](_0x5f191d=>_0x5f191d[_0x173e02(0x247)]!=='')});if(!_0x5e24ab['attemptId'])return 0x0;_0x417f3c=_0x5e24ab[_0x173e02(0x18f)];}const _0x236822=_0x3e5441[_0x173e02(0x15f)];return _0x236822?await this[_0x173e02(0x24d)](_0xdbcbb9,_0x417f3c):await this[_0x173e02(0x25c)](_0xdbcbb9,_0x417f3c,_0x3e5441),0x0;}async[a54_0x43a89d(0x25c)](_0xa7b1a,_0x53aea9,_0x4609a5){const _0x1f7d85=a54_0x43a89d,{tdx:_0xa85aca}=_0xa7b1a;let _0x223af4,_0x18b2d2;try{[_0x223af4,_0x18b2d2]=await Promise[_0x1f7d85(0x1df)]([_0xa85aca[_0x1f7d85(0x193)][_0x1f7d85(0x248)](_0x53aea9),_0xa85aca['workflow'][_0x1f7d85(0x15a)](_0x53aea9,![])]);}catch(_0x3a708d){console[_0x1f7d85(0x25a)](a54_0x5efbd7[_0x1f7d85(0xf0)](_0x1f7d85(0x1d6)));_0x4609a5[_0x1f7d85(0xf9)]&&console[_0x1f7d85(0x25a)](_0x3a708d);throw _0x3a708d;}if(_0x4609a5[_0x1f7d85(0xfa)]||_0x4609a5[_0x1f7d85(0x1fa)]){const _0x379920=this[_0x1f7d85(0x220)](_0x223af4,_0x18b2d2);await handleSDKOutput([_0x379920],_0x4609a5);return;}const _0x356ba0=_0xa85aca['context'][_0x1f7d85(0x1f9)],_0x5d11f8=this[_0x1f7d85(0x116)](_0x223af4,_0x18b2d2,_0x356ba0);console[_0x1f7d85(0x1ca)](_0x5d11f8);}async[a54_0x43a89d(0x24d)](_0x5b8d56,_0x4eadbb){const _0x383927=a54_0x43a89d,{tdx:_0x4b3e7e}=_0x5b8d56,_0x3ebfed=TIMELINE_CONFIG[_0x383927(0xe5)],_0x48e442=TIMELINE_CONFIG[_0x383927(0x106)];let _0x1dbaed=0x0;while(_0x1dbaed<_0x48e442){process[_0x383927(0xd2)]['isTTY']&&process['stdout'][_0x383927(0x242)]('\x1bc');let _0x49b1e3,_0x4ee9d1;try{[_0x49b1e3,_0x4ee9d1]=await Promise[_0x383927(0x1df)]([_0x4b3e7e[_0x383927(0x193)][_0x383927(0x248)](_0x4eadbb),_0x4b3e7e[_0x383927(0x193)][_0x383927(0x15a)](_0x4eadbb,![])]);}catch(_0x4367e7){console[_0x383927(0x25a)](a54_0x5efbd7['red'](_0x383927(0x1a2)));_0x1dbaed>0x0&&console[_0x383927(0x25a)](a54_0x5efbd7[_0x383927(0x1cd)](_0x383927(0x209)+_0x1dbaed));throw _0x4367e7;}const _0x197e1e=_0x4b3e7e[_0x383927(0xdf)][_0x383927(0x1f9)],_0x36832e=this[_0x383927(0x116)](_0x49b1e3,_0x4ee9d1,_0x197e1e);console[_0x383927(0x1ca)](_0x36832e);const _0x5bb968=_0x49b1e3[_0x383927(0x26c)]&&_0x4ee9d1['every'](_0x400659=>_0x400659[_0x383927(0x27c)]!=='running'&&_0x400659[_0x383927(0x27c)]!==_0x383927(0x121));if(_0x5bb968){console['error'](a54_0x5efbd7[_0x383927(0x233)](_0x383927(0x19c)));break;}console[_0x383927(0x25a)](a54_0x5efbd7[_0x383927(0x1cd)](_0x383927(0x23c)+_0x1dbaed*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0xad7de1=>setTimeout(_0xad7de1,_0x3ebfed)),_0x1dbaed++;}_0x1dbaed>=_0x48e442&&console['error'](a54_0x5efbd7[_0x383927(0x191)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a54_0x43a89d(0x116)](_0x33e0cd,_0xba9441,_0x733ab8){const _0x315c12=a54_0x43a89d,_0x5c7dfe=[],_0x1ee1f5=TIMELINE_CONFIG[_0x315c12(0xe8)],_0x628ea5=0x5,_0x2259d9=process[_0x315c12(0xd2)][_0x315c12(0x217)]||0x78,_0x5c89e4=_0x2259d9-_0x1ee1f5-_0x628ea5,_0x57a442=Math[_0x315c12(0x1c6)](TIMELINE_CONFIG[_0x315c12(0x17c)],Math[_0x315c12(0x260)](_0x5c89e4,TIMELINE_CONFIG[_0x315c12(0x1d3)])),_0x271be0=new Date(_0x33e0cd[_0x315c12(0x14c)])[_0x315c12(0x231)](),_0x462fb7=_0x33e0cd[_0x315c12(0x270)]?new Date(_0x33e0cd['finishedAt'])[_0x315c12(0x231)]():Date['now'](),_0x5e7e78={'start':_0x271be0,'end':_0x462fb7,'duration':_0x462fb7-_0x271be0},_0xf4b42b=new Map(),_0x3bcb9c=[];for(const _0x52fb63 of _0xba9441){if(_0x52fb63[_0x315c12(0x10c)]){const _0x3825c7=new Date(_0x52fb63['startedAt'])[_0x315c12(0x231)](),_0x2324ac=_0x52fb63[_0x315c12(0xd1)]?new Date(_0x52fb63[_0x315c12(0xd1)])[_0x315c12(0x231)]():Date[_0x315c12(0xe3)](),_0x4973e2={'start':_0x3825c7,'end':_0x2324ac,'duration':_0x2324ac-_0x3825c7};_0xf4b42b['set'](_0x52fb63['id'],_0x4973e2),_0x3bcb9c[_0x315c12(0x22a)]({'name':_0x52fb63[_0x315c12(0x172)],'state':_0x52fb63['state']||_0x315c12(0x12c),'window':_0x4973e2});}else _0x3bcb9c[_0x315c12(0x22a)]({'name':_0x52fb63[_0x315c12(0x172)],'state':_0x52fb63[_0x315c12(0x27c)]||'planned','window':undefined});}_0x3bcb9c['sort']((_0x40cf82,_0x37c472)=>{const _0x4ad5bb=_0x315c12;if(!_0x40cf82[_0x4ad5bb(0x1e5)])return 0x1;if(!_0x37c472[_0x4ad5bb(0x1e5)])return-0x1;return _0x40cf82['window'][_0x4ad5bb(0x141)]-_0x37c472['window'][_0x4ad5bb(0x141)];});const _0x3e39b2=_0x3bcb9c[_0x315c12(0x201)],_0x1d22ee=_0x3e39b2>TIMELINE_CONFIG[_0x315c12(0x26a)];_0x1d22ee&&_0x3bcb9c['splice'](TIMELINE_CONFIG[_0x315c12(0x26a)]);const _0x58f995=calculateTimeScale(_0x5e7e78,_0x57a442),_0x134291=_0x33e0cd[_0x315c12(0x26c)]?_0x33e0cd[_0x315c12(0x19e)]?a54_0x5efbd7[_0x315c12(0x233)]('success'):a54_0x5efbd7[_0x315c12(0xf0)](_0x315c12(0x25a)):a54_0x5efbd7[_0x315c12(0x27d)](_0x315c12(0x185)),_0x47147c=_0x33e0cd[_0x315c12(0x1ec)]?.['id'],_0x106262=_0x33e0cd[_0x315c12(0x20f)];let _0x3d8df0;if(_0x47147c&&_0x106262){const _0x2c5194=getWorkflowAttemptUrl(_0x733ab8,_0x47147c,_0x106262,_0x33e0cd['id']);_0x3d8df0=hyperlink(a54_0x5efbd7[_0x315c12(0x1cd)](_0x33e0cd['id']),_0x2c5194);}else _0x3d8df0=a54_0x5efbd7[_0x315c12(0x1cd)](_0x33e0cd['id']);_0x5c7dfe[_0x315c12(0x22a)](_0x315c12(0x1e7)+_0x3d8df0+_0x315c12(0x112)+_0x134291+_0x315c12(0x112)+formatElapsed(_0x5e7e78[_0x315c12(0xfd)]));if(_0x3bcb9c['length']>0x0){const _0x51a132=renderTimeAxis(_0x58f995,_0x57a442),_0x586fd9=new Date(_0x5e7e78['start']),_0x29038b=formatDate(_0x586fd9),_0x26f68a=TIMELINE_CONFIG[_0x315c12(0x10e)]+TIMELINE_CONFIG[_0x315c12(0x1a0)]+_0x1ee1f5,_0x5b28fc=_0x29038b[_0x315c12(0x1f5)](_0x26f68a),_0x586046=a54_0x5efbd7[_0x315c12(0x1cd)](_0x5b28fc);_0x5c7dfe[_0x315c12(0x22a)](_0x586046+'\x20'+_0x51a132);for(const _0xc24ccf of _0x3bcb9c){_0x5c7dfe[_0x315c12(0x22a)](renderTaskRow(_0xc24ccf,_0x58f995,_0x57a442,_0x1ee1f5));}const _0x2a0d57=calculateStats(_0x3bcb9c);_0x5c7dfe[_0x315c12(0x22a)](formatStats(_0x2a0d57)),_0x1d22ee&&_0x5c7dfe[_0x315c12(0x22a)](a54_0x5efbd7[_0x315c12(0x191)](_0x315c12(0x25d)+TIMELINE_CONFIG[_0x315c12(0x26a)]+_0x315c12(0x1ae)+_0x3e39b2+_0x315c12(0x25f))),_0x5c7dfe[_0x315c12(0x22a)](''),_0x5c7dfe[_0x315c12(0x22a)](a54_0x5efbd7[_0x315c12(0x1cd)](_0x315c12(0x237))+(_0x315c12(0x26b)+_0x33e0cd['id']+_0x315c12(0x23b))+a54_0x5efbd7['dim']('\x20to\x20see\x20detailed\x20logs'));}else _0x5c7dfe['push'](_0x315c12(0x14e));return _0x5c7dfe['join']('\x0a');}[a54_0x43a89d(0x220)](_0x49a212,_0x494e6e){const _0x399701=a54_0x43a89d,_0x2e15c2=new Date(_0x49a212[_0x399701(0x14c)])[_0x399701(0x231)](),_0x12979b=_0x49a212[_0x399701(0x270)]?new Date(_0x49a212[_0x399701(0x270)])[_0x399701(0x231)]():Date[_0x399701(0xe3)](),_0x4e3fd3=_0x12979b-_0x2e15c2,_0x55b6c4=[];for(const _0x189308 of _0x494e6e){if(_0x189308[_0x399701(0x10c)]){const _0x2ce15e=new Date(_0x189308[_0x399701(0x10c)])['getTime'](),_0x2d3c64=_0x189308[_0x399701(0xd1)]?new Date(_0x189308[_0x399701(0xd1)])['getTime']():Date[_0x399701(0xe3)]();_0x55b6c4[_0x399701(0x22a)]({'name':_0x189308['fullName'],'state':_0x189308[_0x399701(0x27c)]||'unknown','window':{'start':_0x2ce15e,'end':_0x2d3c64,'duration':_0x2d3c64-_0x2ce15e}});}else _0x55b6c4[_0x399701(0x22a)]({'name':_0x189308[_0x399701(0x172)],'state':_0x189308[_0x399701(0x27c)]||'planned','window':undefined});}const _0x2dd639=calculateStats(_0x55b6c4);return{'attempt':{'id':_0x49a212['id'],'status':_0x49a212[_0x399701(0x26c)]?_0x49a212[_0x399701(0x19e)]?_0x399701(0x19e):_0x399701(0x25a):'running','createdAt':_0x49a212[_0x399701(0x14c)],'finishedAt':_0x49a212[_0x399701(0x270)],'duration_ms':_0x4e3fd3},'tasks':_0x55b6c4[_0x399701(0x159)](_0x3b5d49=>({'name':_0x3b5d49['name'],'state':_0x3b5d49[_0x399701(0x27c)],'startedAt':_0x3b5d49['window']?new Date(_0x3b5d49[_0x399701(0x1e5)][_0x399701(0x141)])[_0x399701(0x258)]():null,'updatedAt':_0x3b5d49[_0x399701(0x1e5)]?new Date(_0x3b5d49[_0x399701(0x1e5)]['end'])[_0x399701(0x258)]():null,'duration_ms':_0x3b5d49[_0x399701(0x1e5)]?.[_0x399701(0xfd)]||null})),'stats':_0x2dd639};}}export class WorkflowSchedulesCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0x1fb);[a54_0x43a89d(0x1c8)]=a54_0x43a89d(0x259);async[a54_0x43a89d(0x1a7)](_0x253221){const _0x27391c=a54_0x43a89d,{options:_0x190e8d,tdx:_0x1af8ac}=_0x253221,_0x5a8c86=await withSpinner(_0x27391c(0x25e),()=>_0x1af8ac[_0x27391c(0x193)][_0x27391c(0x1e6)](),{'verbose':_0x190e8d[_0x27391c(0xf9)]}),_0x2d325f=_0x5a8c86[_0x27391c(0xe6)];console[_0x27391c(0x25a)](_0x27391c(0x236)+_0x2d325f['length']+_0x27391c(0xce)+(_0x2d325f['length']!==0x1?'s':''));if(isStructuredFormat(_0x190e8d))await handleSDKOutput(_0x2d325f,_0x190e8d);else{if(_0x2d325f[_0x27391c(0x201)]===0x0)console[_0x27391c(0x1ca)](_0x27391c(0x211));else for(const _0x36c8cb of _0x2d325f){const _0x5ef38e=_0x36c8cb[_0x27391c(0xf7)]?a54_0x5efbd7[_0x27391c(0x191)](_0x27391c(0x18b)):'',_0x2759a5=_0x36c8cb['project']?.[_0x27391c(0xfb)]?a54_0x5efbd7['dim']('\x20['+_0x36c8cb[_0x27391c(0x1ec)][_0x27391c(0xfb)]+']'):'',_0x2749ac=_0x36c8cb[_0x27391c(0x134)]?a54_0x5efbd7[_0x27391c(0x1cd)]('\x20next:\x20'+new Date(_0x36c8cb[_0x27391c(0x134)])[_0x27391c(0x151)]()):'';console[_0x27391c(0x1ca)](_0x27391c(0x24b)+_0x36c8cb['id']+'\x20'+(_0x36c8cb[_0x27391c(0x193)]?.[_0x27391c(0xfb)]||_0x27391c(0x1ac))+_0x2759a5+_0x5ef38e+_0x2749ac);}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{['name']='workflow:schedule:enable';['description']=a54_0x43a89d(0xed);async[a54_0x43a89d(0x1a7)](_0x2c9920){const _0xf35718=a54_0x43a89d,{options:_0x21f2dd,args:_0x49f985,tdx:_0xf77b1c}=_0x2c9920,_0x142a36=_0x49f985[0x0];if(!_0x142a36)return console['error'](a54_0x5efbd7[_0xf35718(0xf0)](_0xf35718(0xf5)),_0xf35718(0x277)),console['error'](a54_0x5efbd7[_0xf35718(0x1cd)](_0xf35718(0x152))),console['error'](a54_0x5efbd7['dim'](_0xf35718(0x120))),0x1;const _0x11e2db=await withSpinner(_0xf35718(0x219)+_0x142a36+'...',()=>_0xf77b1c[_0xf35718(0x193)][_0xf35718(0x157)](_0x142a36),{'verbose':_0x21f2dd[_0xf35718(0xf9)]}),_0xd520a=_0x11e2db['data'];return isStructuredFormat(_0x21f2dd)?await handleSingleObjectOutput(_0xd520a,_0x21f2dd):(console['log'](_0xf35718(0x279)+_0x142a36+'\x20enabled\x20('+(_0xd520a['workflow']?.[_0xf35718(0xfb)]||'unknown')+')'),_0xd520a['nextRunTime']&&console[_0xf35718(0x1ca)](a54_0x5efbd7[_0xf35718(0x1cd)](_0xf35718(0x192)+new Date(_0xd520a[_0xf35718(0x134)])['toLocaleString']()))),0x0;}}function a54_0x3318(_0x5300b8,_0x4b1e14){_0x5300b8=_0x5300b8-0xc5;const _0x4f7520=a54_0x4f75();let _0x331885=_0x4f7520[_0x5300b8];return _0x331885;}export class WorkflowScheduleDisableCommand extends BaseCommand{[a54_0x43a89d(0xfb)]=a54_0x43a89d(0xcc);[a54_0x43a89d(0x1c8)]='Disable\x20a\x20workflow\x20schedule';async[a54_0x43a89d(0x1a7)](_0x3ceba3){const _0x4f9c5c=a54_0x43a89d,{options:_0x464ddd,args:_0x44ecb2,tdx:_0x12eaec}=_0x3ceba3,_0x4377aa=_0x44ecb2[0x0];if(!_0x4377aa)return console[_0x4f9c5c(0x25a)](a54_0x5efbd7[_0x4f9c5c(0xf0)](_0x4f9c5c(0xf5)),_0x4f9c5c(0x277)),console['error'](a54_0x5efbd7[_0x4f9c5c(0x1cd)](_0x4f9c5c(0x1c1))),console[_0x4f9c5c(0x25a)](a54_0x5efbd7['dim'](_0x4f9c5c(0x120))),0x1;const _0xb724fb=await withSpinner('Disabling\x20schedule\x20#'+_0x4377aa+_0x4f9c5c(0x115),()=>_0x12eaec[_0x4f9c5c(0x193)][_0x4f9c5c(0xf8)](_0x4377aa),{'verbose':_0x464ddd[_0x4f9c5c(0xf9)]}),_0x5c41f5=_0xb724fb['data'];return isStructuredFormat(_0x464ddd)?await handleSingleObjectOutput(_0x5c41f5,_0x464ddd):console[_0x4f9c5c(0x1ca)](_0x4f9c5c(0x279)+_0x4377aa+'\x20disabled\x20('+(_0x5c41f5['workflow']?.[_0x4f9c5c(0xfb)]||'unknown')+')'),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x484523,_0x7e44cf){const _0x1fba05=a55_0xe9e5,_0x1a1ec5=_0x484523();while(!![]){try{const _0x37b8ca=parseInt(_0x1fba05(0x1ce))/0x1+-parseInt(_0x1fba05(0x1dd))/0x2+parseInt(_0x1fba05(0x1db))/0x3+-parseInt(_0x1fba05(0x1cf))/0x4+-parseInt(_0x1fba05(0x1d6))/0x5+-parseInt(_0x1fba05(0x1d5))/0x6+parseInt(_0x1fba05(0x1da))/0x7;if(_0x37b8ca===_0x7e44cf)break;else _0x1a1ec5['push'](_0x1a1ec5['shift']());}catch(_0x4b676b){_0x1a1ec5['push'](_0x1a1ec5['shift']());}}}(a55_0x48be,0xe74cb));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a55_0xe9e5(_0x34024a,_0x2193c5){_0x34024a=_0x34024a-0x1ce;const _0x48be0b=a55_0x48be();let _0xe9e53c=_0x48be0b[_0x34024a];return _0xe9e53c;}export function getUserAgent(){const _0xdba427=a55_0xe9e5,_0x356330=getVersion(),_0x49e6cf=platform(),_0x285d42=process[_0xdba427(0x1d0)][_0xdba427(0x1d1)]('v','');return _0xdba427(0x1d4)+_0x356330+'\x20('+_0x49e6cf+_0xdba427(0x1de)+_0x285d42+')';}export function getAuthHeaders(_0x45ce03,_0xc30027,_0x6b63b9){const _0x214fae=a55_0xe9e5,_0x4e1586=getVersion(),_0x4603ac={'User-Agent':getUserAgent(),'X-TD-Client':_0x214fae(0x1d3),'X-TD-Client-Version':_0x4e1586};if(_0x6b63b9)_0x4603ac[_0x214fae(0x1d9)]=_0x214fae(0x1d7)+_0x6b63b9;else _0xc30027&&(_0x4603ac[_0x214fae(0x1d9)]='TD1\x20'+_0xc30027);return _0x4603ac;}export function toHeaderRecord(_0x1e45e5){const _0x34480c=a55_0xe9e5,_0x1635a8={};for(const [_0x3a2f1a,_0x76e91c]of Object[_0x34480c(0x1d2)](_0x1e45e5)){_0x76e91c!==undefined&&(_0x1635a8[_0x3a2f1a]=_0x76e91c);}return _0x1635a8;}function a55_0x48be(){const _0x5a26ad=['1324306eNuZRe',';\x20node/','928922XRCuAW','1875196bGQOjE','version','replace','entries','tdx','tdx/','2227860yIdqug','7319615iQxcGN','Bearer\x20','X-Trino-User','Authorization','15986488DDOfAz','2102646hWRFeE','length'];a55_0x48be=function(){return _0x5a26ad;};return a55_0x48be();}export function getTrinoHeaders(_0x15088a,_0x27d4c4,_0x5be0ce){const _0x35488a=a55_0xe9e5,_0x39e7b9=getAuthHeaders(_0x15088a),_0x243438=toHeaderRecord(_0x39e7b9);if(_0x5be0ce)_0x243438[_0x35488a(0x1d9)]='Bearer\x20'+_0x5be0ce;else _0x27d4c4&&(_0x243438[_0x35488a(0x1d8)]=_0x27d4c4);return _0x243438;}export function hasAPIKey(_0x287e87){const _0x15d7cd=a55_0xe9e5,_0x123d1d=getAPIKey();return _0x123d1d!==undefined&&_0x123d1d[_0x15d7cd(0x1dc)]>0x0;}
1
+ (function(_0x2812cd,_0x19b157){const _0x20605c=a55_0x35ef,_0x140f8b=_0x2812cd();while(!![]){try{const _0x2618f8=-parseInt(_0x20605c(0x1ac))/0x1+parseInt(_0x20605c(0x1a7))/0x2+-parseInt(_0x20605c(0x1b2))/0x3+parseInt(_0x20605c(0x1b1))/0x4*(-parseInt(_0x20605c(0x1a6))/0x5)+parseInt(_0x20605c(0x1af))/0x6+-parseInt(_0x20605c(0x1ae))/0x7*(parseInt(_0x20605c(0x1aa))/0x8)+-parseInt(_0x20605c(0x1b0))/0x9*(-parseInt(_0x20605c(0x1ab))/0xa);if(_0x2618f8===_0x19b157)break;else _0x140f8b['push'](_0x140f8b['shift']());}catch(_0x219746){_0x140f8b['push'](_0x140f8b['shift']());}}}(a55_0x4260,0xca63c));function a55_0x4260(){const _0x272a23=['1032621knkjee','replace','Bearer\x20','length','Authorization','entries','260230EpchlP','2617620ahCUIn','tdx/','version','8DQlIbw','20662130hKSryF','903194lSgkAV','TD1\x20','8884631gxvfHd','6693666tUVTeC','9DyzXJq','88kIJqHD'];a55_0x4260=function(){return _0x272a23;};return a55_0x4260();}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';function a55_0x35ef(_0x2c0460,_0x5b275d){_0x2c0460=_0x2c0460-0x1a4;const _0x426012=a55_0x4260();let _0x35efdb=_0x426012[_0x2c0460];return _0x35efdb;}export function getUserAgent(){const _0x2f9837=a55_0x35ef,_0xe67f30=getVersion(),_0x129d14=platform(),_0x2affac=process[_0x2f9837(0x1a9)][_0x2f9837(0x1b3)]('v','');return _0x2f9837(0x1a8)+_0xe67f30+'\x20('+_0x129d14+';\x20node/'+_0x2affac+')';}export function getAuthHeaders(_0x5945f7,_0x1574bd,_0x3bdd05){const _0x38e3c9=a55_0x35ef,_0x4e47ad=getVersion(),_0x1a7794={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x4e47ad};if(_0x3bdd05)_0x1a7794[_0x38e3c9(0x1a4)]=_0x38e3c9(0x1b4)+_0x3bdd05;else _0x1574bd&&(_0x1a7794[_0x38e3c9(0x1a4)]=_0x38e3c9(0x1ad)+_0x1574bd);return _0x1a7794;}export function toHeaderRecord(_0x5abf0b){const _0x42b505=a55_0x35ef,_0x46424c={};for(const [_0x37755a,_0x2129bd]of Object[_0x42b505(0x1a5)](_0x5abf0b)){_0x2129bd!==undefined&&(_0x46424c[_0x37755a]=_0x2129bd);}return _0x46424c;}export function getTrinoHeaders(_0x347c91,_0x5cdab7,_0x2aff94){const _0x317fb8=a55_0x35ef,_0xad1eb4=getAuthHeaders(_0x347c91),_0x48f6fc=toHeaderRecord(_0xad1eb4);if(_0x2aff94)_0x48f6fc[_0x317fb8(0x1a4)]=_0x317fb8(0x1b4)+_0x2aff94;else _0x5cdab7&&(_0x48f6fc['X-Trino-User']=_0x5cdab7);return _0x48f6fc;}export function hasAPIKey(_0x367013){const _0x71f036=a55_0x35ef,_0x38a9d1=getAPIKey();return _0x38a9d1!==undefined&&_0x38a9d1[_0x71f036(0x1b5)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x5e41ab,_0x46117f){const _0x1a8e79=a56_0x582d,_0x2c9335=_0x5e41ab();while(!![]){try{const _0xca8c17=parseInt(_0x1a8e79(0x1f9))/0x1+parseInt(_0x1a8e79(0x1e4))/0x2*(-parseInt(_0x1a8e79(0x1ec))/0x3)+-parseInt(_0x1a8e79(0x1cd))/0x4+parseInt(_0x1a8e79(0x1e1))/0x5*(parseInt(_0x1a8e79(0x1cc))/0x6)+parseInt(_0x1a8e79(0x1c9))/0x7+parseInt(_0x1a8e79(0x1f3))/0x8+-parseInt(_0x1a8e79(0x1f2))/0x9;if(_0xca8c17===_0x46117f)break;else _0x2c9335['push'](_0x2c9335['shift']());}catch(_0x985eb5){_0x2c9335['push'](_0x2c9335['shift']());}}}(a56_0xb90e,0xb34fa));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a56_0x1434dd from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';function a56_0xb90e(){const _0x5b86c4=['[query]','json','─┴─','format','─┬─','forEach','varchar','stringify','object','push','bigint','slice','bold','params','trim','pipe','split','stdout','[rule]','spawn','1022518MvYzsH','entries','cmdout','888318hZxLcM','2081972zDDbKb','padEnd','map','boolean','resolve','stdin','less','repeat','number','filter','jsonl','FINISHED','limit','list','limitStructuredFormats','double','debug','table','length','isTTY','5djaLAp','end','color','2mxzvjQ','keys','error','sdk-result','max','data','stderr','log','1940997ShKpPr','red','tsv','inherit','[logs]','join','2565072thulLl','7504256qZAzrm','[Object]','output','cyan','rule','query','954799KrbqfG','[error]','magenta','-FXRSn','[params]','noColor','Results\x20saved\x20to\x20'];a56_0xb90e=function(){return _0x5b86c4;};return a56_0xb90e();}import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1d703d){const _0x183ae5=a56_0x582d;return _0x1d703d['format']==='json'||_0x1d703d[_0x183ae5(0x203)]==='jsonl'||_0x1d703d[_0x183ae5(0x203)]===_0x183ae5(0x1ee)||_0x1d703d[_0x183ae5(0x203)]==='table'||_0x1d703d['json']===!![]||_0x1d703d['jsonl']===!![]||_0x1d703d[_0x183ae5(0x1ee)]===!![]||_0x1d703d[_0x183ae5(0x1de)]===!![];}export function parseOutputOptions(_0x59e186){const _0x47efb9=a56_0x582d;return{'format':_0x59e186[_0x47efb9(0x203)]||'table','output':_0x59e186[_0x47efb9(0x1f5)]||'','limit':_0x59e186[_0x47efb9(0x1d9)],'limitStructuredFormats':_0x59e186[_0x47efb9(0x1db)],'color':_0x59e186[_0x47efb9(0x1e3)],'noColor':_0x59e186[_0x47efb9(0x1fe)]};}function convertSDKResultToQueryResult(_0x4b5ab9){const _0xdecf69=a56_0x582d,_0x306d1f=[];if(_0x4b5ab9[_0xdecf69(0x1df)]>0x0){const _0x1c861f=_0x4b5ab9[0x0];for(const [_0x41c7b6,_0x49cdb8]of Object[_0xdecf69(0x1ca)](_0x1c861f)){let _0x1a3a9f='varchar';if(typeof _0x49cdb8===_0xdecf69(0x1d5))_0x1a3a9f=Number['isInteger'](_0x49cdb8)?_0xdecf69(0x1bf):_0xdecf69(0x1dc);else{if(typeof _0x49cdb8===_0xdecf69(0x1d0))_0x1a3a9f=_0xdecf69(0x1d0);else _0x49cdb8===null&&(_0x1a3a9f=_0xdecf69(0x1bb));}_0x306d1f[_0xdecf69(0x1be)]({'name':_0x41c7b6,'type':_0x1a3a9f});}}return{'queryId':_0xdecf69(0x1e7),'columns':_0x306d1f,'data':_0x4b5ab9,'stats':{'state':_0xdecf69(0x1d8),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4b5ab9[_0xdecf69(0x1df)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x50a3b0,_0x4f0171){const _0x3ecf9b=convertSDKResultToQueryResult(_0x50a3b0);return formatQueryOutput(_0x3ecf9b,_0x4f0171);}export async function formatQueryOutput(_0x408d10,_0x87e693){const _0x4e3d36=a56_0x582d,{format:_0x427430,limit:_0x10e013,output:_0x3eaf58,color:_0x121ec9,noColor:_0x3bf4f7,limitStructuredFormats:_0x31034b}=_0x87e693,_0x5247a0=Boolean(_0x3eaf58)&&!_0x121ec9,_0xfc8a98={'color':_0x121ec9,'noColor':_0x3bf4f7||_0x5247a0};if(_0x427430===_0x4e3d36(0x1de)){const _0x399a11=shouldUseLess(_0x427430,_0x3eaf58);return formatAsTable(_0x408d10,_0x10e013,_0x399a11,_0xfc8a98);}const _0x1a31b5=_0x31034b&&Number['isFinite'](_0x10e013)&&_0x408d10[_0x4e3d36(0x1e9)][_0x4e3d36(0x1df)]>_0x10e013?{..._0x408d10,'data':_0x408d10[_0x4e3d36(0x1e9)][_0x4e3d36(0x1c0)](0x0,_0x10e013)}:_0x408d10;if(_0x427430===_0x4e3d36(0x201))return formatAsJSON(_0x1a31b5,_0xfc8a98);else return _0x427430===_0x4e3d36(0x1d7)?formatAsJSONL(_0x1a31b5,_0xfc8a98):formatQueryResult(_0x1a31b5,_0x427430);}function shouldUseLess(_0x228a21,_0x54ac5d){const _0x229075=a56_0x582d;return(_0x228a21==='table'||_0x228a21===_0x229075(0x1da))&&process[_0x229075(0x1c6)][_0x229075(0x1e0)]&&!_0x54ac5d;}export function resolveOutputOptions(_0x1fda88){const _0x121bed=a56_0x582d,_0x50abba=_0x1fda88[_0x121bed(0x1f5)]||'',_0x4e9e31=resolveOutputFormat(_0x1fda88[_0x121bed(0x203)],_0x50abba,_0x121bed(0x1de));let _0x3b2fd1=typeof _0x1fda88[_0x121bed(0x1d9)]==='number'?_0x1fda88[_0x121bed(0x1d9)]:parseInt(_0x1fda88['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x1fda88['limit']===undefined&&shouldUseLess(_0x4e9e31,_0x50abba)&&(_0x3b2fd1=Infinity),{'format':_0x4e9e31,'output':_0x50abba,'limit':_0x3b2fd1,'limitStructuredFormats':_0x1fda88['limitStructuredFormats'],'color':_0x1fda88['color'],'noColor':_0x1fda88['noColor']};}function a56_0x582d(_0x5e591f,_0x12c6b2){_0x5e591f=_0x5e591f-0x1b9;const _0xb90e2d=a56_0xb90e();let _0x582d2e=_0xb90e2d[_0x5e591f];return _0x582d2e;}export function writeOutput(_0x4ce5af,_0x56fd10,_0xcae416){const _0x399c13=a56_0x582d;return _0x56fd10?(writeFileSync(_0x56fd10,_0x4ce5af),console['error'](_0x399c13(0x1ff)+_0x56fd10),Promise[_0x399c13(0x1d1)]()):shouldUseLess(_0xcae416||'','')?new Promise(_0xbddbea=>{const _0x29a730=_0x399c13,_0x4065ea=spawn(_0x29a730(0x1d3),[_0x29a730(0x1fc)],{'stdio':[_0x29a730(0x1c4),'inherit',_0x29a730(0x1ef)]});let _0x3b586d=![];_0x4065ea['on']('error',()=>{const _0x559fb1=_0x29a730;!_0x3b586d&&(_0x3b586d=!![],console[_0x559fb1(0x1eb)](_0x4ce5af),_0xbddbea());}),_0x4065ea['on']('close',()=>{!_0x3b586d&&(_0x3b586d=!![],_0xbddbea());}),_0x4065ea['on'](_0x29a730(0x1c8),()=>{const _0x3358d9=_0x29a730;!_0x3b586d&&_0x4065ea[_0x3358d9(0x1d2)]&&(_0x4065ea[_0x3358d9(0x1d2)]['on'](_0x3358d9(0x1e6),()=>{}),_0x4065ea[_0x3358d9(0x1d2)]['write'](_0x4ce5af),_0x4065ea[_0x3358d9(0x1d2)][_0x3358d9(0x1e2)]());}),!_0x4065ea[_0x29a730(0x1d2)]&&(!_0x3b586d&&(_0x3b586d=!![],console[_0x29a730(0x1eb)](_0x4ce5af),_0xbddbea()));}):(console[_0x399c13(0x1eb)](_0x4ce5af),Promise[_0x399c13(0x1d1)]());}export async function handleSDKOutput(_0x20917f,_0x53157b){const _0x18929a=a56_0x582d,_0x3973c5=resolveOutputOptions(_0x53157b),_0x211b6f=await formatSDKOutput(_0x20917f,_0x3973c5);await writeOutput(_0x211b6f,_0x3973c5[_0x18929a(0x1f5)]||undefined,_0x3973c5['format']);}export async function handleQueryOutput(_0x7c11d5,_0x102f9d){const _0x360391=a56_0x582d,_0x47baef=resolveOutputOptions(_0x102f9d),_0x56138a=await formatQueryOutput(_0x7c11d5,_0x47baef);await writeOutput(_0x56138a,_0x47baef[_0x360391(0x1f5)]||undefined,_0x47baef['format']);}async function formatSingleObject(_0xcef170,_0x2cc748){const _0x519622=a56_0x582d,{format:_0x5527cd,color:_0x1d3cd8,noColor:_0x38c347}=_0x2cc748,_0x388c9d={'color':_0x1d3cd8,'noColor':_0x38c347};if(_0x5527cd===_0x519622(0x201)){if(shouldUseColor(_0x388c9d))return colorizeJSON(_0xcef170,_0x388c9d);return JSON[_0x519622(0x1bc)](_0xcef170,null,0x2);}else{if(_0x5527cd===_0x519622(0x1d7)){if(shouldUseColor(_0x388c9d))return colorizeJSONCompact(_0xcef170,_0x388c9d);return JSON['stringify'](_0xcef170);}else{if(_0x5527cd===_0x519622(0x1ee))return Object[_0x519622(0x1ca)](_0xcef170)[_0x519622(0x1cf)](([_0x46c50f,_0x4f3553])=>_0x46c50f+'\x09'+_0x4f3553)[_0x519622(0x1f1)]('\x0a');else{const _0x28559e=Object[_0x519622(0x1ca)](_0xcef170);if(_0x28559e[_0x519622(0x1df)]===0x0)return'No\x20data';const _0x495736=_0xcef170[_0x519622(0x1dd)],_0x39eff3=_0xcef170[_0x519622(0x1f8)],_0x16ac6b=_0xcef170[_0x519622(0x1c2)],_0x4cccda=_0xcef170[_0x519622(0x1f7)],_0x23d6c9=_0x39eff3?typeof _0x39eff3==='string'?_0x39eff3:JSON[_0x519622(0x1bc)](_0x39eff3,null,0x2):undefined,_0xbff1fd=_0x16ac6b&&Object[_0x519622(0x1e5)](_0x16ac6b)[_0x519622(0x1df)]>0x0?JSON[_0x519622(0x1bc)](_0x16ac6b,null,0x2):undefined,_0x509a43=_0x4cccda&&Object[_0x519622(0x1e5)](_0x4cccda)[_0x519622(0x1df)]>0x0?JSON[_0x519622(0x1bc)](_0x4cccda,null,0x2):undefined,_0x4e4ed2=_0x28559e[_0x519622(0x1d6)](([_0x23730b])=>_0x23730b!==_0x519622(0x1dd)&&_0x23730b!==_0x519622(0x1f8)&&_0x23730b!==_0x519622(0x1c2)&&_0x23730b!==_0x519622(0x1f7)),_0x37751a=Math[_0x519622(0x1e8)](..._0x4e4ed2['map'](([_0x4a5474])=>_0x4a5474[_0x519622(0x1df)])),_0x563e0a=Math[_0x519622(0x1e8)](..._0x4e4ed2[_0x519622(0x1cf)](([,_0x479e2b])=>{const _0xe62e82=_0x519622;try{const _0x532698=_0x479e2b===null||_0x479e2b===undefined?'':typeof _0x479e2b===_0xe62e82(0x1bd)?JSON['stringify'](_0x479e2b):String(_0x479e2b),_0x3e372a=_0x532698[_0xe62e82(0x1c5)]('\x0a');return Math[_0xe62e82(0x1e8)](..._0x3e372a[_0xe62e82(0x1cf)](_0x3514a6=>_0x3514a6[_0xe62e82(0x1df)]),0x0);}catch{return 0x0;}}),0x14),_0x1ed58b=[];_0x1ed58b[_0x519622(0x1be)](colorBorder('┌─'+'─'[_0x519622(0x1d4)](_0x37751a)+_0x519622(0x1b9)+'─'[_0x519622(0x1d4)](_0x563e0a)+'─┐',_0x388c9d)),_0x4e4ed2['forEach'](([_0x12cbf3,_0x3f8f98])=>{const _0x4c1dff=_0x519622;let _0x99ea8;try{_0x99ea8=_0x3f8f98===null||_0x3f8f98===undefined?'':typeof _0x3f8f98===_0x4c1dff(0x1bd)?JSON['stringify'](_0x3f8f98):String(_0x3f8f98);}catch{_0x99ea8=_0x4c1dff(0x1f4);}const _0x529f39=_0x12cbf3['padEnd'](_0x37751a),_0x536aa6=_0x99ea8[_0x4c1dff(0x1c5)]('\x0a');_0x536aa6[_0x4c1dff(0x1ba)]((_0x4b7a48,_0x507494)=>{const _0x4e746c=_0x4c1dff,_0x1e2200=colorBorder('│',_0x388c9d);_0x507494===0x0?_0x1ed58b[_0x4e746c(0x1be)](_0x1e2200+'\x20'+_0x529f39+'\x20'+_0x1e2200+'\x20'+_0x4b7a48[_0x4e746c(0x1ce)](_0x563e0a)+'\x20'+_0x1e2200):_0x1ed58b[_0x4e746c(0x1be)](_0x1e2200+'\x20'+'\x20'['repeat'](_0x37751a)+'\x20'+_0x1e2200+'\x20'+_0x4b7a48[_0x4e746c(0x1ce)](_0x563e0a)+'\x20'+_0x1e2200);});}),_0x1ed58b[_0x519622(0x1be)](colorBorder('└─'+'─'['repeat'](_0x37751a)+_0x519622(0x202)+'─'[_0x519622(0x1d4)](_0x563e0a)+'─┘',_0x388c9d));_0x23d6c9&&(_0x1ed58b['push'](''),_0x1ed58b[_0x519622(0x1be)](String(a56_0x1434dd['yellow']['bold'](_0x519622(0x200)))),_0x1ed58b[_0x519622(0x1be)](_0x23d6c9));_0xbff1fd&&(_0x1ed58b[_0x519622(0x1be)](''),_0x1ed58b[_0x519622(0x1be)](String(a56_0x1434dd['blue']['bold'](_0x519622(0x1fd)))),_0x1ed58b[_0x519622(0x1be)](_0xbff1fd));_0x509a43&&(_0x1ed58b[_0x519622(0x1be)](''),_0x1ed58b[_0x519622(0x1be)](String(a56_0x1434dd[_0x519622(0x1fb)][_0x519622(0x1c1)](_0x519622(0x1c7)))),_0x1ed58b[_0x519622(0x1be)](_0x509a43));if(_0x495736){if(_0x495736['stderr']){_0x1ed58b[_0x519622(0x1be)](''),_0x1ed58b[_0x519622(0x1be)](String(a56_0x1434dd[_0x519622(0x1ed)]['bold'](_0x519622(0x1fa))));const _0x440641=_0x495736[_0x519622(0x1ea)][_0x519622(0x1c5)]('\x0a');_0x440641[_0x519622(0x1ba)](_0xb95e7f=>{const _0x32e0f9=_0x519622;_0xb95e7f[_0x32e0f9(0x1c3)]()&&_0x1ed58b[_0x32e0f9(0x1be)](_0xb95e7f);});}if(_0x495736[_0x519622(0x1cb)]){_0x1ed58b[_0x519622(0x1be)](''),_0x1ed58b[_0x519622(0x1be)](String(a56_0x1434dd[_0x519622(0x1f6)][_0x519622(0x1c1)](_0x519622(0x1f0))));const _0x396858=_0x495736[_0x519622(0x1cb)][_0x519622(0x1c5)]('\x0a');_0x396858[_0x519622(0x1ba)](_0x464cc4=>{const _0x547599=_0x519622;_0x464cc4[_0x547599(0x1c3)]()&&_0x1ed58b[_0x547599(0x1be)](_0x464cc4);});}}return _0x1ed58b[_0x519622(0x1f1)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x7bf098,_0x14c670){const _0x5b30b5=a56_0x582d;if(_0x14c670[_0x5b30b5(0x203)]==='table'){await handleSDKOutput([_0x7bf098],_0x14c670);return;}const _0x55ca26=resolveOutputOptions(_0x14c670),_0x3a7a24=await formatSingleObject(_0x7bf098,_0x55ca26);await writeOutput(_0x3a7a24,_0x55ca26[_0x5b30b5(0x1f5)]||undefined,_0x55ca26['format']);}
1
+ (function(_0xf9a2ed,_0x267afa){const _0x412667=a56_0x8171,_0x236bd0=_0xf9a2ed();while(!![]){try{const _0x219c12=-parseInt(_0x412667(0xc0))/0x1+-parseInt(_0x412667(0x9a))/0x2*(parseInt(_0x412667(0x92))/0x3)+-parseInt(_0x412667(0x90))/0x4*(-parseInt(_0x412667(0xba))/0x5)+parseInt(_0x412667(0xa4))/0x6+-parseInt(_0x412667(0xac))/0x7+parseInt(_0x412667(0xc9))/0x8+parseInt(_0x412667(0xc3))/0x9*(parseInt(_0x412667(0x93))/0xa);if(_0x219c12===_0x267afa)break;else _0x236bd0['push'](_0x236bd0['shift']());}catch(_0x2e316c){_0x236bd0['push'](_0x236bd0['shift']());}}}(a56_0x36c2,0x5754e));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a56_0x1d5f8a from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x1336dd){const _0x58eea3=a56_0x8171;return _0x1336dd[_0x58eea3(0xd1)]===_0x58eea3(0xd3)||_0x1336dd[_0x58eea3(0xd1)]===_0x58eea3(0x95)||_0x1336dd[_0x58eea3(0xd1)]===_0x58eea3(0xb9)||_0x1336dd[_0x58eea3(0xd1)]===_0x58eea3(0xa3)||_0x1336dd['json']===!![]||_0x1336dd[_0x58eea3(0x95)]===!![]||_0x1336dd[_0x58eea3(0xb9)]===!![]||_0x1336dd[_0x58eea3(0xa3)]===!![];}export function parseOutputOptions(_0x1cb790){const _0x1f8f66=a56_0x8171;return{'format':_0x1cb790[_0x1f8f66(0xd1)]||_0x1f8f66(0xa3),'output':_0x1cb790[_0x1f8f66(0xdc)]||'','limit':_0x1cb790[_0x1f8f66(0xc2)],'limitStructuredFormats':_0x1cb790['limitStructuredFormats'],'color':_0x1cb790['color'],'noColor':_0x1cb790[_0x1f8f66(0xb3)]};}function a56_0x36c2(){const _0x112683=['tsv','511015zDwpJp','─┴─','blue','color','sdk-result','stringify','273329GwDufn','error','limit','53208ERRVDJ','close','-FXRSn','─┬─','limitStructuredFormats','[query]','3200560sikOyS','[Object]','[rule]','yellow','stderr','list','join','rule','format','max','json','push','varchar','[error]','No\x20data','cmdout','repeat','end','bigint','output','boolean','spawn','12RYgWAX','data','433992fCfsZo','380PxCzHV','write','jsonl','entries','stdin','forEach','pipe','2zTFCCb','string','inherit','stdout','FINISHED','object','query','red','padEnd','table','3295020umfZhE','debug','trim','double','isInteger','isFinite','length','less','4933614JYjCqi','cyan','split','log','number','resolve','map','noColor','isTTY','params','bold','[params]','keys'];a56_0x36c2=function(){return _0x112683;};return a56_0x36c2();}function a56_0x8171(_0x3a0f53,_0x9bef6a){_0x3a0f53=_0x3a0f53-0x8f;const _0x36c23b=a56_0x36c2();let _0x817189=_0x36c23b[_0x3a0f53];return _0x817189;}function convertSDKResultToQueryResult(_0x32163e){const _0x340b2d=a56_0x8171,_0x1382d1=[];if(_0x32163e[_0x340b2d(0xaa)]>0x0){const _0x84833f=_0x32163e[0x0];for(const [_0x79d4c,_0x59c62d]of Object[_0x340b2d(0x96)](_0x84833f)){let _0x330ddc=_0x340b2d(0xd5);if(typeof _0x59c62d===_0x340b2d(0xb0))_0x330ddc=Number[_0x340b2d(0xa8)](_0x59c62d)?_0x340b2d(0xdb):_0x340b2d(0xa7);else{if(typeof _0x59c62d==='boolean')_0x330ddc=_0x340b2d(0xdd);else _0x59c62d===null&&(_0x330ddc='varchar');}_0x1382d1[_0x340b2d(0xd4)]({'name':_0x79d4c,'type':_0x330ddc});}}return{'queryId':_0x340b2d(0xbe),'columns':_0x1382d1,'data':_0x32163e,'stats':{'state':_0x340b2d(0x9e),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x32163e['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x22b054,_0x590536){const _0x2f65a6=convertSDKResultToQueryResult(_0x22b054);return formatQueryOutput(_0x2f65a6,_0x590536);}export async function formatQueryOutput(_0x58791a,_0x5e457a){const _0x3db04d=a56_0x8171,{format:_0x4fdd12,limit:_0x4b6f0e,output:_0x142189,color:_0x119572,noColor:_0x240efb,limitStructuredFormats:_0x5060d1}=_0x5e457a,_0x1d0182=Boolean(_0x142189)&&!_0x119572,_0x59f9e8={'color':_0x119572,'noColor':_0x240efb||_0x1d0182};if(_0x4fdd12==='table'){const _0x40c908=shouldUseLess(_0x4fdd12,_0x142189);return formatAsTable(_0x58791a,_0x4b6f0e,_0x40c908,_0x59f9e8);}const _0x59a2de=_0x5060d1&&Number[_0x3db04d(0xa9)](_0x4b6f0e)&&_0x58791a[_0x3db04d(0x91)][_0x3db04d(0xaa)]>_0x4b6f0e?{..._0x58791a,'data':_0x58791a[_0x3db04d(0x91)]['slice'](0x0,_0x4b6f0e)}:_0x58791a;if(_0x4fdd12===_0x3db04d(0xd3))return formatAsJSON(_0x59a2de,_0x59f9e8);else return _0x4fdd12===_0x3db04d(0x95)?formatAsJSONL(_0x59a2de,_0x59f9e8):formatQueryResult(_0x59a2de,_0x4fdd12);}function shouldUseLess(_0x9098cf,_0x5cbff2){const _0x1677b3=a56_0x8171;return(_0x9098cf===_0x1677b3(0xa3)||_0x9098cf===_0x1677b3(0xce))&&process[_0x1677b3(0x9d)][_0x1677b3(0xb4)]&&!_0x5cbff2;}export function resolveOutputOptions(_0x29e28c){const _0x444aba=a56_0x8171,_0x18a835=_0x29e28c['output']||'',_0x25b457=resolveOutputFormat(_0x29e28c[_0x444aba(0xd1)],_0x18a835,_0x444aba(0xa3));let _0x2d6907=typeof _0x29e28c[_0x444aba(0xc2)]===_0x444aba(0xb0)?_0x29e28c[_0x444aba(0xc2)]:parseInt(_0x29e28c[_0x444aba(0xc2)]||String(DEFAULT_DISPLAY_LIMIT),0xa);return _0x29e28c[_0x444aba(0xc2)]===undefined&&shouldUseLess(_0x25b457,_0x18a835)&&(_0x2d6907=Infinity),{'format':_0x25b457,'output':_0x18a835,'limit':_0x2d6907,'limitStructuredFormats':_0x29e28c[_0x444aba(0xc7)],'color':_0x29e28c[_0x444aba(0xbd)],'noColor':_0x29e28c[_0x444aba(0xb3)]};}export function writeOutput(_0x4cdc03,_0x3d27dd,_0x249b24){const _0x13403b=a56_0x8171;return _0x3d27dd?(writeFileSync(_0x3d27dd,_0x4cdc03),console[_0x13403b(0xc1)]('Results\x20saved\x20to\x20'+_0x3d27dd),Promise[_0x13403b(0xb1)]()):shouldUseLess(_0x249b24||'','')?new Promise(_0x2e1ab5=>{const _0x418a01=_0x13403b,_0x363e7f=spawn(_0x418a01(0xab),[_0x418a01(0xc5)],{'stdio':[_0x418a01(0x99),'inherit',_0x418a01(0x9c)]});let _0xc2d97=![];_0x363e7f['on'](_0x418a01(0xc1),()=>{const _0x5b1531=_0x418a01;!_0xc2d97&&(_0xc2d97=!![],console[_0x5b1531(0xaf)](_0x4cdc03),_0x2e1ab5());}),_0x363e7f['on'](_0x418a01(0xc4),()=>{!_0xc2d97&&(_0xc2d97=!![],_0x2e1ab5());}),_0x363e7f['on'](_0x418a01(0x8f),()=>{const _0x346272=_0x418a01;!_0xc2d97&&_0x363e7f[_0x346272(0x97)]&&(_0x363e7f[_0x346272(0x97)]['on']('error',()=>{}),_0x363e7f[_0x346272(0x97)][_0x346272(0x94)](_0x4cdc03),_0x363e7f[_0x346272(0x97)][_0x346272(0xda)]());}),!_0x363e7f[_0x418a01(0x97)]&&(!_0xc2d97&&(_0xc2d97=!![],console[_0x418a01(0xaf)](_0x4cdc03),_0x2e1ab5()));}):(console[_0x13403b(0xaf)](_0x4cdc03),Promise[_0x13403b(0xb1)]());}export async function handleSDKOutput(_0x4f9bdd,_0x1e3a54){const _0x431d00=a56_0x8171,_0xb9281c=resolveOutputOptions(_0x1e3a54),_0x1445be=await formatSDKOutput(_0x4f9bdd,_0xb9281c);await writeOutput(_0x1445be,_0xb9281c[_0x431d00(0xdc)]||undefined,_0xb9281c[_0x431d00(0xd1)]);}export async function handleQueryOutput(_0x17b53d,_0xa759f1){const _0x11d42b=a56_0x8171,_0x3e7621=resolveOutputOptions(_0xa759f1),_0x508ca6=await formatQueryOutput(_0x17b53d,_0x3e7621);await writeOutput(_0x508ca6,_0x3e7621[_0x11d42b(0xdc)]||undefined,_0x3e7621[_0x11d42b(0xd1)]);}async function formatSingleObject(_0x3137ec,_0x4df114){const _0x1b2512=a56_0x8171,{format:_0xbc14c8,color:_0x2c5cba,noColor:_0x1b7cf6}=_0x4df114,_0x4b2d6e={'color':_0x2c5cba,'noColor':_0x1b7cf6};if(_0xbc14c8===_0x1b2512(0xd3)){if(shouldUseColor(_0x4b2d6e))return colorizeJSON(_0x3137ec,_0x4b2d6e);return JSON[_0x1b2512(0xbf)](_0x3137ec,null,0x2);}else{if(_0xbc14c8==='jsonl'){if(shouldUseColor(_0x4b2d6e))return colorizeJSONCompact(_0x3137ec,_0x4b2d6e);return JSON[_0x1b2512(0xbf)](_0x3137ec);}else{if(_0xbc14c8===_0x1b2512(0xb9))return Object[_0x1b2512(0x96)](_0x3137ec)[_0x1b2512(0xb2)](([_0x1853e3,_0x10ceca])=>_0x1853e3+'\x09'+_0x10ceca)[_0x1b2512(0xcf)]('\x0a');else{const _0x3e371c=Object[_0x1b2512(0x96)](_0x3137ec);if(_0x3e371c['length']===0x0)return _0x1b2512(0xd7);const _0x165352=_0x3137ec['debug'],_0x169be5=_0x3137ec[_0x1b2512(0xa0)],_0x2d83b4=_0x3137ec[_0x1b2512(0xb5)],_0x26ffaf=_0x3137ec[_0x1b2512(0xd0)],_0x3198c6=_0x169be5?typeof _0x169be5===_0x1b2512(0x9b)?_0x169be5:JSON[_0x1b2512(0xbf)](_0x169be5,null,0x2):undefined,_0x353238=_0x2d83b4&&Object[_0x1b2512(0xb8)](_0x2d83b4)['length']>0x0?JSON[_0x1b2512(0xbf)](_0x2d83b4,null,0x2):undefined,_0x1d73a9=_0x26ffaf&&Object['keys'](_0x26ffaf)[_0x1b2512(0xaa)]>0x0?JSON[_0x1b2512(0xbf)](_0x26ffaf,null,0x2):undefined,_0x1834cd=_0x3e371c['filter'](([_0x16f9a3])=>_0x16f9a3!==_0x1b2512(0xa5)&&_0x16f9a3!==_0x1b2512(0xa0)&&_0x16f9a3!==_0x1b2512(0xb5)&&_0x16f9a3!==_0x1b2512(0xd0)),_0xed48ac=Math[_0x1b2512(0xd2)](..._0x1834cd[_0x1b2512(0xb2)](([_0x3f244e])=>_0x3f244e['length'])),_0x4dc00b=Math[_0x1b2512(0xd2)](..._0x1834cd['map'](([,_0x21d572])=>{const _0x3f129a=_0x1b2512;try{const _0x37a3c4=_0x21d572===null||_0x21d572===undefined?'':typeof _0x21d572===_0x3f129a(0x9f)?JSON[_0x3f129a(0xbf)](_0x21d572):String(_0x21d572),_0x11fba7=_0x37a3c4[_0x3f129a(0xae)]('\x0a');return Math[_0x3f129a(0xd2)](..._0x11fba7[_0x3f129a(0xb2)](_0x222f32=>_0x222f32[_0x3f129a(0xaa)]),0x0);}catch{return 0x0;}}),0x14),_0x57da52=[];_0x57da52[_0x1b2512(0xd4)](colorBorder('┌─'+'─'[_0x1b2512(0xd9)](_0xed48ac)+_0x1b2512(0xc6)+'─'[_0x1b2512(0xd9)](_0x4dc00b)+'─┐',_0x4b2d6e)),_0x1834cd[_0x1b2512(0x98)](([_0x43fdbc,_0x4618ad])=>{const _0x1181bc=_0x1b2512;let _0x3c843d;try{_0x3c843d=_0x4618ad===null||_0x4618ad===undefined?'':typeof _0x4618ad==='object'?JSON[_0x1181bc(0xbf)](_0x4618ad):String(_0x4618ad);}catch{_0x3c843d=_0x1181bc(0xca);}const _0x315ca5=_0x43fdbc['padEnd'](_0xed48ac),_0xac83e3=_0x3c843d[_0x1181bc(0xae)]('\x0a');_0xac83e3[_0x1181bc(0x98)]((_0x1fd424,_0x5dfb0b)=>{const _0x47f8c4=_0x1181bc,_0x458e62=colorBorder('│',_0x4b2d6e);_0x5dfb0b===0x0?_0x57da52[_0x47f8c4(0xd4)](_0x458e62+'\x20'+_0x315ca5+'\x20'+_0x458e62+'\x20'+_0x1fd424['padEnd'](_0x4dc00b)+'\x20'+_0x458e62):_0x57da52[_0x47f8c4(0xd4)](_0x458e62+'\x20'+'\x20'['repeat'](_0xed48ac)+'\x20'+_0x458e62+'\x20'+_0x1fd424[_0x47f8c4(0xa2)](_0x4dc00b)+'\x20'+_0x458e62);});}),_0x57da52[_0x1b2512(0xd4)](colorBorder('└─'+'─'[_0x1b2512(0xd9)](_0xed48ac)+_0x1b2512(0xbb)+'─'[_0x1b2512(0xd9)](_0x4dc00b)+'─┘',_0x4b2d6e));_0x3198c6&&(_0x57da52[_0x1b2512(0xd4)](''),_0x57da52[_0x1b2512(0xd4)](String(a56_0x1d5f8a[_0x1b2512(0xcc)][_0x1b2512(0xb6)](_0x1b2512(0xc8)))),_0x57da52[_0x1b2512(0xd4)](_0x3198c6));_0x353238&&(_0x57da52[_0x1b2512(0xd4)](''),_0x57da52[_0x1b2512(0xd4)](String(a56_0x1d5f8a[_0x1b2512(0xbc)][_0x1b2512(0xb6)](_0x1b2512(0xb7)))),_0x57da52[_0x1b2512(0xd4)](_0x353238));_0x1d73a9&&(_0x57da52[_0x1b2512(0xd4)](''),_0x57da52[_0x1b2512(0xd4)](String(a56_0x1d5f8a['magenta']['bold'](_0x1b2512(0xcb)))),_0x57da52[_0x1b2512(0xd4)](_0x1d73a9));if(_0x165352){if(_0x165352['stderr']){_0x57da52[_0x1b2512(0xd4)](''),_0x57da52['push'](String(a56_0x1d5f8a[_0x1b2512(0xa1)][_0x1b2512(0xb6)](_0x1b2512(0xd6))));const _0x3dd95b=_0x165352[_0x1b2512(0xcd)]['split']('\x0a');_0x3dd95b['forEach'](_0x163ef9=>{const _0x31039b=_0x1b2512;_0x163ef9[_0x31039b(0xa6)]()&&_0x57da52[_0x31039b(0xd4)](_0x163ef9);});}if(_0x165352[_0x1b2512(0xd8)]){_0x57da52['push'](''),_0x57da52['push'](String(a56_0x1d5f8a[_0x1b2512(0xad)][_0x1b2512(0xb6)]('[logs]')));const _0x196666=_0x165352[_0x1b2512(0xd8)][_0x1b2512(0xae)]('\x0a');_0x196666[_0x1b2512(0x98)](_0x117a4d=>{const _0x528a1d=_0x1b2512;_0x117a4d[_0x528a1d(0xa6)]()&&_0x57da52[_0x528a1d(0xd4)](_0x117a4d);});}}return _0x57da52[_0x1b2512(0xcf)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x2eee04,_0x43e57e){const _0x10f3a5=a56_0x8171;if(_0x43e57e['format']===_0x10f3a5(0xa3)){await handleSDKOutput([_0x2eee04],_0x43e57e);return;}const _0x20bcee=resolveOutputOptions(_0x43e57e),_0x24cd18=await formatSingleObject(_0x2eee04,_0x20bcee);await writeOutput(_0x24cd18,_0x20bcee[_0x10f3a5(0xdc)]||undefined,_0x20bcee['format']);}