@treasuredata/tdx 2026.6.2 → 2026.6.4

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 (235) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.js +1 -1
  16. package/dist/commands/claude-command.js.map +1 -1
  17. package/dist/commands/claude-statusline-command.js +1 -1
  18. package/dist/commands/claude-usage-command.js +1 -1
  19. package/dist/commands/command.js +1 -1
  20. package/dist/commands/connection-command.js +1 -1
  21. package/dist/commands/databases.js +1 -1
  22. package/dist/commands/delivery-command.js +1 -1
  23. package/dist/commands/describe.js +1 -1
  24. package/dist/commands/engage-campaign-pull-command.js +1 -1
  25. package/dist/commands/engage-campaign-push-command.js +1 -1
  26. package/dist/commands/engage-campaign-validate-command.js +1 -1
  27. package/dist/commands/engage-command.js +1 -1
  28. package/dist/commands/engage-template-pull-command.js +1 -1
  29. package/dist/commands/engage-template-push-command.js +1 -1
  30. package/dist/commands/engage-template-validate-command.js +1 -1
  31. package/dist/commands/job-command.js +1 -1
  32. package/dist/commands/journey-command.js +1 -1
  33. package/dist/commands/journey-validate-command.js +1 -1
  34. package/dist/commands/llm-command.js +1 -1
  35. package/dist/commands/mcp-command.js +1 -1
  36. package/dist/commands/parent-segment-command.js +1 -1
  37. package/dist/commands/policy-command.js +1 -1
  38. package/dist/commands/profile-command.js +1 -1
  39. package/dist/commands/profiles-command.js +1 -1
  40. package/dist/commands/query-command.js +1 -1
  41. package/dist/commands/schedule-command.js +1 -1
  42. package/dist/commands/segment-command.js +1 -1
  43. package/dist/commands/segment-create-command.js +1 -1
  44. package/dist/commands/segment-fields-command.js +1 -1
  45. package/dist/commands/segment-pull-command.js +1 -1
  46. package/dist/commands/segment-push-command.js +1 -1
  47. package/dist/commands/segment-update-command.js +1 -1
  48. package/dist/commands/segment-use-command.js +1 -1
  49. package/dist/commands/segment-validate-command.js +1 -1
  50. package/dist/commands/segments.js +1 -1
  51. package/dist/commands/show.js +1 -1
  52. package/dist/commands/status-command.js +1 -1
  53. package/dist/commands/table-deleted.js +1 -1
  54. package/dist/commands/tables.js +1 -1
  55. package/dist/commands/unset-command.js +1 -1
  56. package/dist/commands/upgrade-command.js +1 -1
  57. package/dist/commands/use-command.js +1 -1
  58. package/dist/commands/user-command.js +1 -1
  59. package/dist/commands/work-command.js +1 -1
  60. package/dist/commands/workflow-command.js +1 -1
  61. package/dist/core/auth.js +1 -1
  62. package/dist/core/command-output.js +1 -1
  63. package/dist/core/config.d.ts +14 -0
  64. package/dist/core/config.d.ts.map +1 -1
  65. package/dist/core/config.js +1 -1
  66. package/dist/core/config.js.map +1 -1
  67. package/dist/core/connection-cache.js +1 -1
  68. package/dist/core/constants.js +1 -1
  69. package/dist/core/credential-cache.js +1 -1
  70. package/dist/core/global-context.js +1 -1
  71. package/dist/core/keychain.js +1 -1
  72. package/dist/core/oauth-keychain.js +1 -1
  73. package/dist/core/oauth.js +1 -1
  74. package/dist/core/profile.js +1 -1
  75. package/dist/core/project-config.d.ts +1 -0
  76. package/dist/core/project-config.d.ts.map +1 -1
  77. package/dist/core/project-config.js +1 -1
  78. package/dist/core/project-config.js.map +1 -1
  79. package/dist/core/session.js +1 -1
  80. package/dist/core/user-cache.js +1 -1
  81. package/dist/core/version.js +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/mcp/server.js +1 -1
  84. package/dist/mcp/tools/index.js +1 -1
  85. package/dist/mcp/tools/tdx-run.js +1 -1
  86. package/dist/mcp/tools/tdx-search.d.ts.map +1 -1
  87. package/dist/mcp/tools/tdx-search.js +1 -1
  88. package/dist/mcp/tools/tdx-search.js.map +1 -1
  89. package/dist/mcp/tools/work-create-item.js +1 -1
  90. package/dist/mcp/utils.js +1 -1
  91. package/dist/proxy/claude-usage-tracker.js +1 -1
  92. package/dist/proxy/passthrough-server.js +1 -1
  93. package/dist/proxy/sse-usage-parser.js +1 -1
  94. package/dist/sdk/agent/agent-config.js +1 -1
  95. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  96. package/dist/sdk/agent/agent-yaml.js +1 -1
  97. package/dist/sdk/agent/test/evaluator.js +1 -1
  98. package/dist/sdk/agent/test/executor.js +1 -1
  99. package/dist/sdk/agent/test/index.js +1 -1
  100. package/dist/sdk/agent/test/output.js +1 -1
  101. package/dist/sdk/agent/test/parser.js +1 -1
  102. package/dist/sdk/agent/tool-target-registry.js +1 -1
  103. package/dist/sdk/api.js +1 -1
  104. package/dist/sdk/cas/cas-api-client.js +1 -1
  105. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  106. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  107. package/dist/sdk/cas/index.js +1 -1
  108. package/dist/sdk/cas/pull-workflow.js +1 -1
  109. package/dist/sdk/cas/push-workflow.js +1 -1
  110. package/dist/sdk/client/cdp-api-client.js +1 -1
  111. package/dist/sdk/client/delivery-api-client.js +1 -1
  112. package/dist/sdk/client/endpoints.js +1 -1
  113. package/dist/sdk/client/engage-api-client.js +1 -1
  114. package/dist/sdk/client/http-client.js +1 -1
  115. package/dist/sdk/client/llm-api-client.js +1 -1
  116. package/dist/sdk/client/oauth-refresh.js +1 -1
  117. package/dist/sdk/client/rate-limiter.js +1 -1
  118. package/dist/sdk/client/td-api-client.js +1 -1
  119. package/dist/sdk/client/trino-api-client.js +1 -1
  120. package/dist/sdk/client/workflow-client.js +1 -1
  121. package/dist/sdk/connection-validator.js +1 -1
  122. package/dist/sdk/connection.js +1 -1
  123. package/dist/sdk/delivery.js +1 -1
  124. package/dist/sdk/engage/campaign-pull.js +1 -1
  125. package/dist/sdk/engage/campaign-push.js +1 -1
  126. package/dist/sdk/engage/campaign-validator.js +1 -1
  127. package/dist/sdk/engage/campaign-yaml.js +1 -1
  128. package/dist/sdk/engage/template-pull.js +1 -1
  129. package/dist/sdk/engage/template-push.js +1 -1
  130. package/dist/sdk/engage/template-validator.js +1 -1
  131. package/dist/sdk/engage/template-yaml.js +1 -1
  132. package/dist/sdk/engage/types/campaign-def.js +1 -1
  133. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  134. package/dist/sdk/engage/types/template-schema.js +1 -1
  135. package/dist/sdk/engage.js +1 -1
  136. package/dist/sdk/errors.js +1 -1
  137. package/dist/sdk/index.js +1 -1
  138. package/dist/sdk/io/index.js +1 -1
  139. package/dist/sdk/io/node-filesystem.js +1 -1
  140. package/dist/sdk/job.js +1 -1
  141. package/dist/sdk/journey.js +1 -1
  142. package/dist/sdk/llm/chat-cache.js +1 -1
  143. package/dist/sdk/llm/index.js +1 -1
  144. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  145. package/dist/sdk/llm/model-factors.js +1 -1
  146. package/dist/sdk/llm/user-settings.js +1 -1
  147. package/dist/sdk/personalization.js +1 -1
  148. package/dist/sdk/policy.js +1 -1
  149. package/dist/sdk/query/deleted-table-validation.js +1 -1
  150. package/dist/sdk/query/index.js +1 -1
  151. package/dist/sdk/query/sql-parser.js +1 -1
  152. package/dist/sdk/realtime.js +1 -1
  153. package/dist/sdk/schedule.js +1 -1
  154. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  155. package/dist/sdk/segment/fields-display.js +1 -1
  156. package/dist/sdk/segment/file-discovery.js +1 -1
  157. package/dist/sdk/segment/journey-utils.js +1 -1
  158. package/dist/sdk/segment/journey-validator.js +1 -1
  159. package/dist/sdk/segment/journey-yaml.js +1 -1
  160. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  161. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  162. package/dist/sdk/segment/pull-workflow.js +1 -1
  163. package/dist/sdk/segment/push-recovery.js +1 -1
  164. package/dist/sdk/segment/push-workflow.js +1 -1
  165. package/dist/sdk/segment/resolution-context.js +1 -1
  166. package/dist/sdk/segment/segment-path-parser.js +1 -1
  167. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  168. package/dist/sdk/segment/segment-validator.js +1 -1
  169. package/dist/sdk/segment/target-resolution.js +1 -1
  170. package/dist/sdk/segment/tdx-config.js +1 -1
  171. package/dist/sdk/segment/types/activation-schema.js +1 -1
  172. package/dist/sdk/segment/types/journey-def.js +1 -1
  173. package/dist/sdk/segment/types/journey-schema.js +1 -1
  174. package/dist/sdk/segment/types/segment-def.js +1 -1
  175. package/dist/sdk/segment/types/segment-schema.js +1 -1
  176. package/dist/sdk/segment/validate-files.js +1 -1
  177. package/dist/sdk/segment/yaml-validator.js +1 -1
  178. package/dist/sdk/segment.js +1 -1
  179. package/dist/sdk/types/index.js +1 -1
  180. package/dist/sdk/types/progress.js +1 -1
  181. package/dist/sdk/types/workspace.js +1 -1
  182. package/dist/sdk/user.js +1 -1
  183. package/dist/sdk/util/format-detector.js +1 -1
  184. package/dist/sdk/util/formatters.js +1 -1
  185. package/dist/sdk/util/index.js +1 -1
  186. package/dist/sdk/util/paginate.js +1 -1
  187. package/dist/sdk/util/tree-formatter.js +1 -1
  188. package/dist/sdk/workflow/archive-validation.js +1 -1
  189. package/dist/sdk/workflow/clone-workflow.js +1 -1
  190. package/dist/sdk/workflow/index.js +1 -1
  191. package/dist/sdk/workflow/pull-workflow.js +1 -1
  192. package/dist/sdk/workflow/push-workflow.js +1 -1
  193. package/dist/sdk/workflow/task-graph.js +1 -1
  194. package/dist/sdk/workflow/tdx-config.js +1 -1
  195. package/dist/sdk/workflow/workflow-utils.js +1 -1
  196. package/dist/sdk/workspace/access-tracker.js +1 -1
  197. package/dist/sdk/workspace/frontmatter.js +1 -1
  198. package/dist/sdk/workspace/git.js +1 -1
  199. package/dist/sdk/workspace/index.js +1 -1
  200. package/dist/sdk/workspace/templates.js +1 -1
  201. package/dist/sdk/workspace/weekly.js +1 -1
  202. package/dist/sdk/workspace/wikilinks.js +1 -1
  203. package/dist/test-utils/command-runner.js +1 -1
  204. package/dist/test-utils/factories.js +1 -1
  205. package/dist/test-utils/fixtures.js +1 -1
  206. package/dist/test-utils/http-mock.js +1 -1
  207. package/dist/test-utils/index.js +1 -1
  208. package/dist/utils/async.js +1 -1
  209. package/dist/utils/colors.js +1 -1
  210. package/dist/utils/diff.js +1 -1
  211. package/dist/utils/file-permissions.js +1 -1
  212. package/dist/utils/file-reader.js +1 -1
  213. package/dist/utils/github-releases.js +1 -1
  214. package/dist/utils/global-cache.js +1 -1
  215. package/dist/utils/json-loader.js +1 -1
  216. package/dist/utils/local-cache.js +1 -1
  217. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  218. package/dist/utils/logger/formatters/index.js +1 -1
  219. package/dist/utils/logger/handlers/console-handler.js +1 -1
  220. package/dist/utils/logger/handlers/file-handler.js +1 -1
  221. package/dist/utils/logger/handlers/index.js +1 -1
  222. package/dist/utils/logger/handlers/null-handler.js +1 -1
  223. package/dist/utils/logger/index.js +1 -1
  224. package/dist/utils/logger/logger.js +1 -1
  225. package/dist/utils/logger/types.js +1 -1
  226. package/dist/utils/option-validation.js +1 -1
  227. package/dist/utils/process.js +1 -1
  228. package/dist/utils/prompt.js +1 -1
  229. package/dist/utils/spinner.js +1 -1
  230. package/dist/utils/sse-parser.js +1 -1
  231. package/dist/utils/string-utils.js +1 -1
  232. package/dist/utils/table-ref-parser.js +1 -1
  233. package/dist/utils/tdx-logger.js +1 -1
  234. package/dist/utils/version-check.js +1 -1
  235. package/package.json +1 -1
@@ -1 +1 @@
1
- const a55_0x29f4d0=a55_0x1841;(function(_0x185299,_0x17d0ef){const _0x1b355b=a55_0x1841,_0x1f5dcb=_0x185299();while(!![]){try{const _0x5d0dfe=parseInt(_0x1b355b(0x284))/0x1+-parseInt(_0x1b355b(0x2ee))/0x2*(-parseInt(_0x1b355b(0x27d))/0x3)+parseInt(_0x1b355b(0x28e))/0x4*(-parseInt(_0x1b355b(0x261))/0x5)+parseInt(_0x1b355b(0x266))/0x6+-parseInt(_0x1b355b(0x31d))/0x7*(parseInt(_0x1b355b(0x2ea))/0x8)+-parseInt(_0x1b355b(0x2f0))/0x9+parseInt(_0x1b355b(0x157))/0xa;if(_0x5d0dfe===_0x17d0ef)break;else _0x1f5dcb['push'](_0x1f5dcb['shift']());}catch(_0x18d809){_0x1f5dcb['push'](_0x1f5dcb['shift']());}}}(a55_0x2684,0x9d935));import a55_0x262d9e from'chalk';import{existsSync}from'fs';import a55_0xee06fd from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import{parseTaskGraph,formatTaskGraph,summarizeTaskGraph,formatWarningSummary}from'../sdk/workflow/task-graph.js';import a55_0x353259 from'prompts';function getAttemptStatusDisplay(_0x5d48ec){const _0x5b1aa3=a55_0x1841;if(!_0x5d48ec)return{'icon':'⏳','text':''};const {done:_0xb49c91,success:_0x457b8a,cancelRequested:_0x43a2c4}=_0x5d48ec;if(!_0xb49c91)return _0x43a2c4?{'icon':'🛑','text':a55_0x262d9e[_0x5b1aa3(0x1ea)]('canceling')}:{'icon':'🔄','text':a55_0x262d9e['blue']('running')};if(_0x457b8a)return{'icon':'✅','text':a55_0x262d9e[_0x5b1aa3(0x26d)]('success')};return{'icon':'❌','text':a55_0x262d9e['red']('error')};}export class WorkflowBaseCommand extends BaseCommand{[a55_0x29f4d0(0x235)](_0x202493,_0x1675ca,_0x5b4861=0x0){return _0x202493[_0x5b4861]||_0x1675ca['workflowProject'];}[a55_0x29f4d0(0x215)](_0x188a1f,_0x525c51,_0x14b614=0x0){const _0x1c9824=a55_0x29f4d0,_0x577fc5=this['resolveProject'](_0x188a1f,_0x525c51,_0x14b614);if(!_0x577fc5)return console[_0x1c9824(0x2f5)](a55_0x262d9e[_0x1c9824(0x25b)](_0x1c9824(0x1df)),_0x1c9824(0x20b)),console[_0x1c9824(0x2f5)](a55_0x262d9e[_0x1c9824(0x312)](_0x1c9824(0x23c))),null;return _0x577fc5;}[a55_0x29f4d0(0x19d)](_0x2c9edc,_0x782396){const _0x59c14c=a55_0x29f4d0;if(_0x2c9edc[0x0]){const _0x3941a7=_0x2c9edc[0x0][_0x59c14c(0x248)]('.');if(_0x3941a7[_0x59c14c(0x17c)]===0x1)return{'projectName':_0x3941a7[0x0],'workflowName':undefined};else return _0x3941a7[_0x59c14c(0x17c)]===0x2?{'projectName':_0x3941a7[0x0],'workflowName':_0x3941a7[0x1]}:(console[_0x59c14c(0x2f5)](a55_0x262d9e['red'](_0x59c14c(0x1df)),_0x59c14c(0x2d7)),null);}return{'projectName':_0x782396[_0x59c14c(0x16c)],'workflowName':undefined};}['resolveProjectDir'](_0x2f1596,_0x5821ad,_0x3d9f07=0x0){const _0x16fe47=a55_0x29f4d0;if(_0x2f1596[_0x3d9f07])return _0x2f1596[_0x3d9f07];if(_0x5821ad[_0x16fe47(0x16c)]){const _0x28b29d=a55_0xee06fd[_0x16fe47(0x303)](process[_0x16fe47(0x1c4)](),'workflows',_0x5821ad[_0x16fe47(0x16c)]);if(existsSync(a55_0xee06fd[_0x16fe47(0x303)](_0x28b29d,_0x16fe47(0x230))))return _0x28b29d;}return undefined;}async[a55_0x29f4d0(0x1c6)](_0xecf984,_0x17ce8a,_0x4d22bb){const _0x3be2ba=a55_0x29f4d0;try{const _0x3afd68=await _0xecf984[_0x3be2ba(0x2ba)][_0x3be2ba(0x254)](_0x17ce8a,{'limit':0x1});if(_0x3afd68['length']>0x0){const _0x24a612=_0x3afd68[0x0]['id'],_0x388b7d=getWorkflowUrl(_0x4d22bb,_0x24a612);console[_0x3be2ba(0x2f5)](_0x3be2ba(0x2d3)+a55_0x262d9e[_0x3be2ba(0x295)](_0x388b7d));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x158);['description']=a55_0x29f4d0(0x171);async['execute'](_0x10d152){const _0x295acb=a55_0x29f4d0,{options:_0x57f9a1,args:_0x5c19bc,tdx:_0x1f92e9}=_0x10d152,_0x5295ce=_0x5c19bc[0x0],_0x514e38=_0x57f9a1[_0x295acb(0x213)];if(_0x514e38)return saveSessionContext({'workflow_project':undefined},_0x57f9a1[_0x295acb(0x209)]),console['log'](a55_0x262d9e['green'](_0x295acb(0x21f))),0x0;if(!_0x5295ce)return console[_0x295acb(0x2f5)](a55_0x262d9e['red'](_0x295acb(0x1df)),_0x295acb(0x20b)),console['error'](a55_0x262d9e[_0x295acb(0x312)](_0x295acb(0x1e1))),console['error'](a55_0x262d9e[_0x295acb(0x312)](_0x295acb(0x1f1))),0x1;const _0x33091a=await withSpinner(_0x295acb(0x1af)+_0x5295ce+'\x27...',()=>_0x1f92e9[_0x295acb(0x2ba)][_0x295acb(0x300)](_0x5295ce),{'verbose':_0x57f9a1['verbose']}),{name:_0x3c7e38}=_0x33091a[_0x295acb(0x2a6)];return saveSessionContext({'workflow_project':_0x3c7e38},_0x57f9a1[_0x295acb(0x209)]),console['log'](a55_0x262d9e[_0x295acb(0x26d)](_0x295acb(0x2b5)+a55_0x262d9e[_0x295acb(0x295)](_0x3c7e38))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x168);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2e0);async['execute'](_0x363ddd){const _0x2eb224=a55_0x29f4d0,{options:_0xe91c5e,args:_0x4a3c54,tdx:_0x337480}=_0x363ddd,_0x56492f=_0x4a3c54[0x0];_0xe91c5e[_0x2eb224(0x28d)]&&_0x56492f&&console[_0x2eb224(0x2f5)](_0x2eb224(0x19e)+_0x56492f);const _0x479ea0=await withSpinner(_0x2eb224(0x2b0),()=>_0x337480[_0x2eb224(0x2ba)][_0x2eb224(0x22d)](_0x56492f,{'limit':_0xe91c5e['limit']}),{'verbose':_0xe91c5e[_0x2eb224(0x28d)]});let _0x44f0e5=_0x479ea0['data'];_0x44f0e5[_0x2eb224(0x242)]((_0x4374d4,_0x766a5e)=>_0x4374d4[_0x2eb224(0x172)][_0x2eb224(0x2c8)](_0x766a5e[_0x2eb224(0x172)]));const _0x2891e0=_0xe91c5e['limit']&&_0x44f0e5[_0x2eb224(0x17c)]>=_0xe91c5e['limit']?a55_0x262d9e[_0x2eb224(0x312)](_0x2eb224(0x2da)):'';console[_0x2eb224(0x2f5)]('✔\x20Found\x20'+_0x44f0e5['length']+'\x20project'+(_0x44f0e5[_0x2eb224(0x17c)]!==0x1?'s':'')+_0x2891e0);if(_0xe91c5e['format']===_0x2eb224(0x29f)||_0xe91c5e['format']==='jsonl'||_0xe91c5e[_0x2eb224(0x2e1)]==='table')await handleSDKOutput(_0x44f0e5,_0xe91c5e);else{if(_0x44f0e5[_0x2eb224(0x17c)]===0x0)_0x56492f?console['log'](_0x2eb224(0x148)+_0x56492f):console[_0x2eb224(0x2bd)](_0x2eb224(0x20d));else{const _0x137dd3=_0x44f0e5['map'](_0x555ca6=>{const _0x4d06ee=_0x2eb224,_0x250d5b=_0x555ca6['metadata']?.[_0x4d06ee(0x29d)](_0x576418=>_0x576418[_0x4d06ee(0x225)]===_0x4d06ee(0x1ff)),_0x5a4a55=_0x250d5b?a55_0x262d9e[_0x4d06ee(0x312)](_0x4d06ee(0x2c9)):'';return _0x4d06ee(0x2f8)+_0x555ca6[_0x4d06ee(0x172)]+_0x5a4a55;});await writeOutput(_0x137dd3[_0x2eb224(0x303)]('\x0a'),_0xe91c5e[_0x2eb224(0x233)],_0x2eb224(0x308));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x24f);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x1e0);async[a55_0x29f4d0(0x211)](_0x1ca9a8){const _0xbbd5d3=a55_0x29f4d0,{options:_0x5a7e74,args:_0x2d3e73,tdx:_0x5f80df}=_0x1ca9a8,_0x18eaf3=this[_0xbbd5d3(0x235)](_0x2d3e73,_0x5a7e74);_0x5a7e74[_0xbbd5d3(0x28d)]&&_0x18eaf3&&console['error'](_0xbbd5d3(0x191)+_0x18eaf3);const _0x3fac32=await withSpinner(_0xbbd5d3(0x2eb),()=>_0x5f80df[_0xbbd5d3(0x2ba)][_0xbbd5d3(0x254)](_0x18eaf3,{'limit':_0x5a7e74['limit']}),{'verbose':_0x5a7e74['verbose']});let _0x3d5f36=_0x3fac32[_0xbbd5d3(0x2a6)];_0x3d5f36[_0xbbd5d3(0x242)]((_0x233bd1,_0x54a008)=>{const _0x5b66b0=_0xbbd5d3,_0x232d8f=_0x233bd1['name'][_0x5b66b0(0x2c8)](_0x54a008[_0x5b66b0(0x172)]);if(_0x232d8f!==0x0)return _0x232d8f;return(_0x233bd1[_0x5b66b0(0x1c8)]?.[_0x5b66b0(0x172)]||'')[_0x5b66b0(0x2c8)](_0x54a008[_0x5b66b0(0x1c8)]?.[_0x5b66b0(0x172)]||'');});const _0x50aa29=_0x5a7e74[_0xbbd5d3(0x2a8)]&&_0x3d5f36['length']>=_0x5a7e74[_0xbbd5d3(0x2a8)]?a55_0x262d9e[_0xbbd5d3(0x312)](_0xbbd5d3(0x2da)):'';console[_0xbbd5d3(0x2f5)](_0xbbd5d3(0x18b)+_0x3d5f36[_0xbbd5d3(0x17c)]+_0xbbd5d3(0x1c1)+(_0x3d5f36[_0xbbd5d3(0x17c)]!==0x1?'s':'')+_0x50aa29);if(_0x5a7e74['format']===_0xbbd5d3(0x29f)||_0x5a7e74[_0xbbd5d3(0x2e1)]===_0xbbd5d3(0x232)||_0x5a7e74[_0xbbd5d3(0x2e1)]===_0xbbd5d3(0x296))await handleSDKOutput(_0x3d5f36,_0x5a7e74);else{if(_0x3d5f36[_0xbbd5d3(0x17c)]===0x0)_0x18eaf3?console['log'](_0xbbd5d3(0x176)+_0x18eaf3):console[_0xbbd5d3(0x2bd)](_0xbbd5d3(0x141));else{const _0x5e0003=_0x5a7e74['site'],_0x4b1636=_0x3d5f36[_0xbbd5d3(0x27e)](_0x1127ef=>{const _0x5aa1bd=_0xbbd5d3,_0x47b249=a55_0x262d9e['dim']('#'+_0x1127ef['id']),_0x2f5591=hyperlink(_0x47b249,getWorkflowUrl(_0x5e0003,_0x1127ef['id'])),_0x1c83da=_0x1127ef[_0x5aa1bd(0x1c8)]?.['name']?a55_0x262d9e[_0x5aa1bd(0x312)]('\x20('+_0x1127ef[_0x5aa1bd(0x1c8)][_0x5aa1bd(0x172)]+')'):'';return _0x5aa1bd(0x16b)+_0x2f5591+'\x20'+_0x1127ef[_0x5aa1bd(0x172)]+_0x1c83da;});await writeOutput(_0x4b1636[_0xbbd5d3(0x303)]('\x0a'),_0x5a7e74[_0xbbd5d3(0x233)],_0xbbd5d3(0x308));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x1ae);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x175);async[a55_0x29f4d0(0x211)](_0x1f6096){const _0x51b3d9=a55_0x29f4d0,{options:_0x4b9fbd,args:_0x67ae32,tdx:_0x4738a0}=_0x1f6096,_0x5948b6=this[_0x51b3d9(0x19d)](_0x67ae32,_0x4b9fbd);if(!_0x5948b6)return 0x1;const {projectName:_0x26cfa8,workflowName:_0x26e166}=_0x5948b6;if(_0x4b9fbd['verbose']){if(_0x26cfa8&&_0x26e166)console[_0x51b3d9(0x2f5)](_0x51b3d9(0x1a2)+_0x26cfa8+'.'+_0x26e166);else _0x26cfa8&&console[_0x51b3d9(0x2f5)]('Filter:\x20project='+_0x26cfa8);const _0x5704d9=_0x4b9fbd['status'];_0x5704d9&&console[_0x51b3d9(0x2f5)](_0x51b3d9(0x1ed)+_0x5704d9);}let _0x36e290=0x28;if(process[_0x51b3d9(0x281)][_0x51b3d9(0x2c5)]&&!_0x4b9fbd['output']&&!_0x4b9fbd[_0x51b3d9(0x2e1)]){const _0x30fb18=process[_0x51b3d9(0x281)][_0x51b3d9(0x221)]||0x28;_0x36e290=Math['max'](0x14,Math[_0x51b3d9(0x2f1)](_0x30fb18*0x2/0x3));}const _0xa972e4=_0x4b9fbd[_0x51b3d9(0x2a8)]||_0x36e290,_0x4c583d=await withSpinner(_0x51b3d9(0x309),()=>_0x4738a0[_0x51b3d9(0x2ba)][_0x51b3d9(0x2bc)]({'projectName':_0x26cfa8,'workflowName':_0x26e166,'status':_0x4b9fbd[_0x51b3d9(0x307)],'fromTime':_0x4b9fbd[_0x51b3d9(0x194)],'toTime':_0x4b9fbd['to'],'limit':_0xa972e4}),{'verbose':_0x4b9fbd[_0x51b3d9(0x28d)]}),_0x10f895=_0x4c583d['data'];_0x10f895[_0x51b3d9(0x242)]((_0x4b68a3,_0x2292fa)=>{const _0x320f01=_0x51b3d9,_0x34caa3=_0x4b68a3[_0x320f01(0x21c)]||'',_0x1ed170=_0x2292fa['sessionTime']||'';return _0x1ed170[_0x320f01(0x2c8)](_0x34caa3);});_0x10f895[_0x51b3d9(0x17c)]>=_0xa972e4?console[_0x51b3d9(0x2f5)](_0x51b3d9(0x1b0)+_0x10f895['length']+_0x51b3d9(0x245)+a55_0x262d9e[_0x51b3d9(0x312)](_0x51b3d9(0x316))):console[_0x51b3d9(0x2f5)]('✔\x20Found\x20'+_0x10f895[_0x51b3d9(0x17c)]+_0x51b3d9(0x18e)+(_0x10f895[_0x51b3d9(0x17c)]!==0x1?'s':''));if(_0x4b9fbd[_0x51b3d9(0x2e1)]===_0x51b3d9(0x29f)||_0x4b9fbd[_0x51b3d9(0x2e1)]===_0x51b3d9(0x232)||_0x4b9fbd[_0x51b3d9(0x2e1)]===_0x51b3d9(0x296))await handleSDKOutput(_0x10f895,_0x4b9fbd);else{if(!process[_0x51b3d9(0x281)][_0x51b3d9(0x2c5)]||_0x4b9fbd[_0x51b3d9(0x233)]){if(_0x10f895[_0x51b3d9(0x17c)]===0x0){if(_0x26cfa8&&_0x26e166)console[_0x51b3d9(0x2bd)](_0x51b3d9(0x1fa)+_0x26cfa8+'.'+_0x26e166);else _0x26cfa8?console[_0x51b3d9(0x2bd)](_0x51b3d9(0x1bc)+_0x26cfa8):console[_0x51b3d9(0x2bd)](_0x51b3d9(0x234));}else{const _0x173a84=_0x4b9fbd[_0x51b3d9(0x313)],_0x2850d0=this[_0x51b3d9(0x2b6)](_0x10f895,_0x173a84);_0x4b9fbd[_0x51b3d9(0x233)]?await writeOutput(_0x2850d0,_0x4b9fbd['output'],_0x51b3d9(0x308)):console[_0x51b3d9(0x2bd)](_0x2850d0);}!_0x26cfa8&&(console[_0x51b3d9(0x2f5)](''),console[_0x51b3d9(0x2f5)](a55_0x262d9e['dim'](_0x51b3d9(0x267))),console[_0x51b3d9(0x2f5)](a55_0x262d9e['dim'](_0x51b3d9(0x150))+'or'+a55_0x262d9e['dim'](_0x51b3d9(0x1ec))));}else{if(_0x10f895[_0x51b3d9(0x17c)]===0x0){if(_0x26cfa8&&_0x26e166)console['log'](_0x51b3d9(0x1fa)+_0x26cfa8+'.'+_0x26e166);else _0x26cfa8?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x26cfa8):console[_0x51b3d9(0x2bd)](_0x51b3d9(0x234));}else await this[_0x51b3d9(0x31a)](_0x10f895,_0x1f6096,_0x26cfa8);}}return 0x0;}[a55_0x29f4d0(0x2b6)](_0x10acff,_0x2e380d){const _0x2930db=a55_0x29f4d0,_0x153f65=[],_0xe709d2=new Map();let _0x52df3e=Infinity,_0x2d33ef=-Infinity;for(const _0x35d4b9 of _0x10acff){if(_0x35d4b9[_0x2930db(0x2fc)]?.['createdAt']){const _0x255dca=new Date(_0x35d4b9[_0x2930db(0x2fc)][_0x2930db(0x2e8)])['getTime'](),_0x379ec3=_0x35d4b9['lastAttempt']['finishedAt']?new Date(_0x35d4b9[_0x2930db(0x2fc)][_0x2930db(0x1d0)])[_0x2930db(0x19b)]():Date[_0x2930db(0x311)](),_0xf4bc3f=_0x35d4b9[_0x2930db(0x1c8)]?.[_0x2930db(0x172)]||_0x2930db(0x19a);!_0xe709d2[_0x2930db(0x276)](_0xf4bc3f)&&_0xe709d2[_0x2930db(0x182)](_0xf4bc3f,[]),_0xe709d2[_0x2930db(0x23e)](_0xf4bc3f)[_0x2930db(0x2b7)]({'session':_0x35d4b9,'startTime':_0x255dca,'endTime':_0x379ec3,'duration':_0x379ec3-_0x255dca}),_0x52df3e=Math[_0x2930db(0x231)](_0x52df3e,_0x255dca),_0x2d33ef=Math[_0x2930db(0x180)](_0x2d33ef,_0x379ec3);}}if(_0xe709d2[_0x2930db(0x2ac)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x5878d1=process[_0x2930db(0x281)][_0x2930db(0x1e5)]||0x78,_0x4e67b8=0x1e,_0x37e1d9=0x32,_0x35c718=0x4,_0x4cc399=Math[_0x2930db(0x231)](_0x37e1d9,Math[_0x2930db(0x180)](_0x4e67b8,Math[_0x2930db(0x2f1)](_0x5878d1*0.3))),_0x51673e=_0x5878d1-_0x4cc399-TIMELINE_CONFIG[_0x2930db(0x2b3)]-0x3-_0x35c718,_0x46f431=_0x2d33ef-_0x52df3e,_0x3142bd=_0x46f431/_0x4cc399,_0x46e7b8=renderTimeAxis({'startTime':_0x52df3e,'endTime':_0x2d33ef,'durationMs':_0x46f431,'msPerChar':_0x3142bd},_0x4cc399),_0x355408=[];for(const _0x14fef8 of _0xe709d2[_0x2930db(0x2c4)]()){_0x355408[_0x2930db(0x2b7)](..._0x14fef8);}_0x355408['sort']((_0x3942c9,_0x5cab5d)=>_0x5cab5d[_0x2930db(0x282)]-_0x3942c9[_0x2930db(0x282)]);const _0x861ca5=new Date(_0x52df3e),_0x4d8bfa=formatDate(_0x861ca5),_0x28d088=_0x35c718+TIMELINE_CONFIG[_0x2930db(0x2fe)]+TIMELINE_CONFIG[_0x2930db(0x1f2)]+_0x51673e,_0x43df53='\x20'['repeat'](_0x28d088-_0x4d8bfa[_0x2930db(0x17c)]),_0x4fe8da=_0x43df53+a55_0x262d9e[_0x2930db(0x312)](_0x4d8bfa)+'\x20'+_0x46e7b8;_0x153f65[_0x2930db(0x2b7)](_0x4fe8da);const _0x97b29b=0x16;let _0x4a68d0=0x0;for(const _0x56d537 of _0x355408){const _0x15e044=_0x56d537[_0x2930db(0x209)][_0x2930db(0x1c8)]?.['name']||'?',_0x32abe8=Math[_0x2930db(0x231)](stringWidth(_0x15e044),_0x97b29b);_0x4a68d0=Math[_0x2930db(0x180)](_0x4a68d0,_0x32abe8);}for(const _0x48e570 of _0x355408){const {session:_0x10e39c,startTime:_0x8244c,endTime:_0x103615,duration:_0x2fe326}=_0x48e570,_0x5780c8=_0x10e39c[_0x2930db(0x1c8)]?.['id'],_0x32f3af=_0x10e39c['id'],_0x10846e=_0x10e39c[_0x2930db(0x1c8)]?.['name']||'?',_0x2232b9=_0x10e39c[_0x2930db(0x2ba)]?.[_0x2930db(0x172)]||'?';let _0x299acc,_0x312f7e;if(_0x10e39c[_0x2930db(0x2fc)]){const _0xaad4c4=_0x10e39c[_0x2930db(0x2fc)];!_0xaad4c4[_0x2930db(0x195)]?(_0x299acc=_0xaad4c4[_0x2930db(0x15d)]?'🛑':'🔄',_0x312f7e=_0xaad4c4[_0x2930db(0x15d)]?a55_0x262d9e[_0x2930db(0x1ea)]:a55_0x262d9e[_0x2930db(0x2ab)]):(_0x299acc=_0xaad4c4[_0x2930db(0x24c)]?'✅':'❌',_0x312f7e=_0xaad4c4[_0x2930db(0x24c)]?a55_0x262d9e['green']:a55_0x262d9e[_0x2930db(0x25b)]);}else _0x299acc='⏳',_0x312f7e=a55_0x262d9e[_0x2930db(0x312)];const _0x21879a='#'+_0x32f3af,_0xc99148=_0x5780c8?hyperlink(_0x21879a,getWorkflowSessionUrl(_0x2e380d,_0x5780c8,_0x32f3af)):_0x21879a;let _0x4a7e52=_0x10846e;stringWidth(_0x10846e)>_0x97b29b&&(_0x4a7e52=_0x10846e['slice'](0x0,_0x97b29b-0x1)+'…');const _0x33a718=a55_0x262d9e[_0x2930db(0x312)](_0x4a7e52),_0x2fdaa1=stringWidth(_0x4a7e52),_0x14ff41='\x20'[_0x2930db(0x22b)](_0x4a68d0-stringWidth(_0x4a7e52)+0x2),_0x307830='('+formatElapsed(_0x2fe326)+')',_0x36c1ae=stringWidth(_0x307830),_0x21f953=stringWidth(_0x21879a),_0x25b2d8=_0x21f953+0x1+_0x2fdaa1+_0x14ff41[_0x2930db(0x17c)],_0x152899=_0x51673e-_0x25b2d8-_0x36c1ae-0x1-0x8;let _0x32f0f2=_0x2232b9;stringWidth(_0x32f0f2)>_0x152899&&(_0x32f0f2=_0x32f0f2[_0x2930db(0x2f7)](0x0,_0x152899-0x1)+'…');const _0x1c5c10=_0xc99148+'\x20'+_0x33a718+_0x14ff41+_0x32f0f2,_0x1f4b3e=stringWidth(_0x1c5c10),_0x279624=_0x51673e-_0x1f4b3e-_0x36c1ae,_0xa5fb42=_0x1c5c10+'\x20'[_0x2930db(0x22b)](Math[_0x2930db(0x180)](0x1,_0x279624))+a55_0x262d9e[_0x2930db(0x312)](_0x307830),_0x4f475d=Math[_0x2930db(0x2f1)]((_0x8244c-_0x52df3e)/_0x3142bd),_0x2fb9ed=Math[_0x2930db(0x2f1)]((_0x103615-_0x52df3e)/_0x3142bd),_0x150c2c=Math[_0x2930db(0x180)](_0x4f475d+0x1,_0x2fb9ed),_0x42a19f=new Array(_0x4cc399)['fill']('\x20');for(let _0x2653dc=_0x4f475d;_0x2653dc<Math[_0x2930db(0x231)](_0x150c2c,_0x4cc399);_0x2653dc++){_0x42a19f[_0x2653dc]='─';}const _0x1499fa=_0x42a19f[_0x2930db(0x27e)](_0xf1153e=>_0xf1153e==='\x20'?'\x20':_0x312f7e(_0xf1153e))[_0x2930db(0x303)]('');_0x153f65[_0x2930db(0x2b7)](_0x299acc+'\x20'+_0xa5fb42+'│'+_0x1499fa+'│');}return _0x153f65['join']('\x0a');}async['navigateSessionsInteractive'](_0x155d32,_0x43bb8f,_0x27a0cf){const _0x11de39=a55_0x29f4d0,{options:_0x3a9210,tdx:_0x5ef6d9}=_0x43bb8f,_0x5d910f=_0x3a9210[_0x11de39(0x313)],{timelineRows:_0x162e77,timeAxisHeader:_0x10f886}=this[_0x11de39(0x162)](_0x155d32,_0x5d910f),_0x1ea24e=_0x162e77[_0x11de39(0x277)](_0x5909cd=>_0x5909cd[_0x11de39(0x169)]);if(_0x1ea24e['length']===0x0){const _0xa769e0=this['renderSessionsTimeline'](_0x155d32,_0x5d910f);console[_0x11de39(0x2bd)](_0xa769e0);!_0x27a0cf&&(console[_0x11de39(0x2f5)](''),console['error'](a55_0x262d9e[_0x11de39(0x312)](_0x11de39(0x267))),console[_0x11de39(0x2f5)](a55_0x262d9e['dim'](_0x11de39(0x150))+'or'+a55_0x262d9e['dim'](_0x11de39(0x1ec))));return;}_0x10f886&&console['log'](_0x10f886);const _0x4b3eb4=_0x162e77[_0x11de39(0x277)](_0x2cda64=>_0x2cda64[_0x11de39(0x169)])[_0x11de39(0x27e)](_0x4651bb=>({'title':_0x4651bb['displayLine'],'value':_0x4651bb[_0x11de39(0x169)]})),_0x177c60=process[_0x11de39(0x281)][_0x11de39(0x221)]||0x3c,_0x436f3c=Math[_0x11de39(0x180)](0x28,Math[_0x11de39(0x2f1)](_0x177c60*0x2/0x3)),_0x455626=await a55_0x353259({'type':_0x11de39(0x2f6),'name':_0x11de39(0x169),'message':_0x11de39(0x304),'choices':_0x4b3eb4,'initial':-0x1,'limit':_0x436f3c,'clearFirst':!![],'fallback':{'title':_0x11de39(0x152),'value':null},'suggest':(_0x28baf2,_0x182422)=>{const _0xb2cd86=_0x11de39;if(!_0x28baf2)return Promise[_0xb2cd86(0x17e)](_0x182422);const _0x2b899c=_0x182422[_0xb2cd86(0x277)](_0x1c6b1a=>{const _0x27000e=_0xb2cd86,_0x777ef8=_0x1c6b1a;return _0x777ef8[_0x27000e(0x2b9)][_0x27000e(0x142)]()[_0x27000e(0x208)](_0x28baf2[_0x27000e(0x142)]());});return Promise[_0xb2cd86(0x17e)](_0x2b899c);}}),_0x5db556=()=>{const _0x5dba68=_0x11de39;process[_0x5dba68(0x281)][_0x5dba68(0x21e)](_0x5dba68(0x210)),process[_0x5dba68(0x281)][_0x5dba68(0x21e)]('\x1b[1A\x1b[2K'),process[_0x5dba68(0x281)][_0x5dba68(0x21e)](_0x5dba68(0x210));},_0x4e9a4c=_0x455626&&_0x455626['attemptId']&&_0x455626['attemptId']!==null&&_0x455626[_0x11de39(0x169)]['trim']()!=='';if(!_0x4e9a4c){_0x5db556(),console[_0x11de39(0x2bd)](a55_0x262d9e[_0x11de39(0x312)]('Cancelled'));return;}_0x5db556();const _0x500b01=_0x155d32[_0x11de39(0x15e)](_0x153f81=>_0x153f81[_0x11de39(0x2fc)]?.['id']===_0x455626[_0x11de39(0x169)]);if(_0x500b01){const _0x5b818e=_0x500b01[_0x11de39(0x1c8)]?.['name']||'?',_0x151959=_0x500b01['workflow']?.[_0x11de39(0x172)]||'?';console[_0x11de39(0x2bd)](_0x11de39(0x1ba)+a55_0x262d9e['dim'](_0x5b818e)+',\x20Workflow:\x20'+a55_0x262d9e[_0x11de39(0x312)](_0x151959));}const _0x167409=new WorkflowTimelineCommand();await _0x167409[_0x11de39(0x211)]({'args':[],'options':{..._0x3a9210,'attemptId':_0x455626[_0x11de39(0x169)]},'tdx':_0x5ef6d9});}[a55_0x29f4d0(0x162)](_0x4df821,_0x2d6632){const _0x575134=a55_0x29f4d0,_0x3ac6b0=new Map();for(const _0x345dda of _0x4df821){_0x345dda['id']&&_0x345dda[_0x575134(0x2fc)]?.['id']&&_0x3ac6b0[_0x575134(0x182)](_0x345dda['id'],_0x345dda[_0x575134(0x2fc)]['id']);}const _0x215b08=[];let _0x59ec77='';const _0x1f0ed9=this[_0x575134(0x2b6)](_0x4df821,_0x2d6632),_0x4875b7=_0x1f0ed9[_0x575134(0x248)]('\x0a');for(const _0x394ddc of _0x4875b7){if(_0x394ddc[_0x575134(0x205)](_0x575134(0x298))||_0x394ddc[_0x575134(0x2ec)](/^\s+\d{4}-\d{2}-\d{2}/))_0x59ec77=_0x394ddc;else{if(_0x394ddc['match'](/^[✅❌🔄🛑⏳]/)){const _0x334d12=_0x394ddc[_0x575134(0x2ec)](/#(\d+)/),_0x23f413=_0x334d12?_0x334d12[0x1]:null,_0x15a98c=_0x23f413?_0x3ac6b0['get'](_0x23f413)||null:null,_0x33dda4=_0x4df821[_0x575134(0x15e)](_0x398ebc=>_0x398ebc['id']===_0x23f413),_0xed7fa2=_0x33dda4?.['project']?.[_0x575134(0x172)]||'';_0x215b08[_0x575134(0x2b7)]({'displayLine':_0x394ddc,'attemptId':_0x15a98c,'projectName':_0xed7fa2});}}}return{'timelineRows':_0x215b08,'timeAxisHeader':_0x59ec77};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x1ab);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2df);async['execute'](_0x1a7397){const _0x4254fa=a55_0x29f4d0,{options:_0x4119d0,args:_0x4cf0ec,tdx:_0x24c181}=_0x1a7397,_0x2288a6=this[_0x4254fa(0x19d)](_0x4cf0ec,_0x4119d0);if(!_0x2288a6)return 0x1;const {projectName:_0x64dafc,workflowName:_0x688523}=_0x2288a6,_0x1438c3=_0x4119d0[_0x4254fa(0x203)];if(_0x4119d0['verbose']){if(_0x64dafc&&_0x688523)console[_0x4254fa(0x2f5)](_0x4254fa(0x1a2)+_0x64dafc+'.'+_0x688523);else _0x64dafc&&console['error'](_0x4254fa(0x184)+_0x64dafc);_0x1438c3&&console[_0x4254fa(0x2f5)]('Include\x20retried:\x20yes');}const _0x2521b8=await withSpinner(_0x4254fa(0x16e),()=>_0x24c181[_0x4254fa(0x2ba)][_0x4254fa(0x178)]({'projectName':_0x64dafc,'workflowName':_0x688523,'includeRetried':_0x1438c3,'limit':_0x4119d0[_0x4254fa(0x2a8)]}),{'verbose':_0x4119d0[_0x4254fa(0x28d)]}),_0x23a008=_0x2521b8[_0x4254fa(0x2a6)],_0x4a2d3e=_0x4119d0['limit']||0x64,_0xf1916b=_0x23a008[_0x4254fa(0x17c)]>=_0x4a2d3e?a55_0x262d9e['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x4254fa(0x2f5)]('✔\x20Found\x20'+_0x23a008[_0x4254fa(0x17c)]+'\x20attempt'+(_0x23a008[_0x4254fa(0x17c)]!==0x1?'s':'')+_0xf1916b);if(_0x4119d0[_0x4254fa(0x2e1)]==='json'||_0x4119d0['format']===_0x4254fa(0x232)||_0x4119d0['format']==='table')await handleSDKOutput(_0x23a008,_0x4119d0);else{if(_0x23a008[_0x4254fa(0x17c)]===0x0){if(_0x64dafc&&_0x688523)console[_0x4254fa(0x2bd)]('No\x20attempts\x20found\x20for:\x20'+_0x64dafc+'.'+_0x688523);else _0x64dafc?console['log'](_0x4254fa(0x2e4)+_0x64dafc):console[_0x4254fa(0x2bd)](_0x4254fa(0x237));}else{const _0x443a57=_0x4119d0['site'],_0x392902=_0x23a008[_0x4254fa(0x27e)](_0x4be71c=>{const _0x59f7f4=_0x4254fa,_0x153cab=a55_0x262d9e['dim']('#'+_0x4be71c['id']),_0x18eeca=_0x4be71c[_0x59f7f4(0x1c8)]?.['id'],_0x1b837b=_0x4be71c[_0x59f7f4(0x217)]||_0x4be71c[_0x59f7f4(0x163)],_0x162c50=_0x18eeca&&_0x1b837b?hyperlink(_0x153cab,getWorkflowAttemptUrl(_0x443a57,_0x18eeca,_0x1b837b,_0x4be71c['id'])):_0x153cab,{icon:_0x155e2e,text:_0x37852d}=getAttemptStatusDisplay(_0x4be71c),_0xa6412b=(_0x4be71c['project']?.['name']||'?')+'.'+(_0x4be71c[_0x59f7f4(0x2ba)]?.[_0x59f7f4(0x172)]||'?'),_0x367b18=_0x4be71c['sessionTime']?a55_0x262d9e[_0x59f7f4(0x312)](_0x4be71c[_0x59f7f4(0x21c)]):'';return(_0x162c50+'\x20'+_0x155e2e+(_0x37852d?'\x20'+_0x37852d:'')+'\x20'+_0xa6412b+'\x20'+_0x367b18)[_0x59f7f4(0x2ef)]();});await writeOutput(_0x392902[_0x4254fa(0x303)]('\x0a'),_0x4119d0['output'],_0x4254fa(0x308));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a55_0x29f4d0(0x1bb)]='Show\x20specific\x20attempt\x20details';async['execute'](_0x5d57d9){const _0x6a62d6=a55_0x29f4d0,{options:_0x1cebc0,args:_0x19a0d2,tdx:_0x1afe58}=_0x5d57d9,_0x38cdf2=_0x19a0d2[0x0];if(!_0x38cdf2)return console[_0x6a62d6(0x2f5)](_0x6a62d6(0x22e)),0x1;_0x1cebc0[_0x6a62d6(0x28d)]&&console[_0x6a62d6(0x2f5)](_0x6a62d6(0x1c5)+_0x38cdf2);const _0x237159=await withSpinner(_0x6a62d6(0x144),()=>_0x1afe58[_0x6a62d6(0x2ba)][_0x6a62d6(0x291)](_0x38cdf2),{'verbose':_0x1cebc0[_0x6a62d6(0x28d)]}),_0x5c033c=_0x237159[_0x6a62d6(0x2a6)];let _0x3c754e;!_0x5c033c['done']?_0x3c754e=_0x5c033c[_0x6a62d6(0x15d)]?_0x6a62d6(0x2bf):_0x6a62d6(0x207):_0x3c754e=_0x5c033c[_0x6a62d6(0x24c)]?_0x6a62d6(0x24c):_0x6a62d6(0x2f5);let _0x43c995;if(_0x5c033c[_0x6a62d6(0x2e8)]&&_0x5c033c['finishedAt']){const _0x5820c8=new Date(_0x5c033c[_0x6a62d6(0x2e8)])[_0x6a62d6(0x19b)](),_0x1db206=new Date(_0x5c033c['finishedAt'])[_0x6a62d6(0x19b)]();_0x43c995=Math[_0x6a62d6(0x222)]((_0x1db206-_0x5820c8)/0x3e8);}const _0x3f34da={'attempt_id':_0x5c033c['id'],'status':_0x3c754e,..._0x5c033c[_0x6a62d6(0x204)]!==undefined&&{'index':_0x5c033c[_0x6a62d6(0x204)]},..._0x5c033c[_0x6a62d6(0x1c8)]&&{'project':_0x5c033c[_0x6a62d6(0x1c8)][_0x6a62d6(0x172)]},..._0x5c033c[_0x6a62d6(0x2ba)]&&{'workflow':_0x5c033c[_0x6a62d6(0x2ba)][_0x6a62d6(0x172)]},..._0x5c033c['sessionId']&&{'session_id':_0x5c033c[_0x6a62d6(0x163)]},..._0x5c033c[_0x6a62d6(0x21c)]&&{'session_time':_0x5c033c[_0x6a62d6(0x21c)]},..._0x5c033c[_0x6a62d6(0x26a)]&&{'retry_attempt':_0x5c033c[_0x6a62d6(0x26a)]},..._0x43c995!==undefined&&{'duration_sec':_0x43c995},..._0x5c033c[_0x6a62d6(0x2e8)]&&{'created_at':_0x5c033c[_0x6a62d6(0x2e8)]},..._0x5c033c[_0x6a62d6(0x1d0)]&&{'finished_at':_0x5c033c[_0x6a62d6(0x1d0)]},...Object[_0x6a62d6(0x186)](_0x5c033c[_0x6a62d6(0x19f)])[_0x6a62d6(0x17c)]>0x0&&{'params':_0x5c033c[_0x6a62d6(0x19f)]}};return await handleSingleObjectOutput(_0x3f34da,_0x1cebc0),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a55_0x29f4d0(0x172)]='workflow:tasks';[a55_0x29f4d0(0x1bb)]='Show\x20tasks\x20for\x20an\x20attempt';async['execute'](_0x8145b7){const _0x14ba70=a55_0x29f4d0,{options:_0x5724ad,args:_0x2e2a13,tdx:_0x4ba9b6}=_0x8145b7,_0x57584e=_0x2e2a13[0x0];if(!_0x57584e)return console[_0x14ba70(0x2f5)](_0x14ba70(0x22e)),0x1;const _0x2d4e4b=_0x5724ad[_0x14ba70(0x2be)];_0x5724ad[_0x14ba70(0x28d)]&&(console[_0x14ba70(0x2f5)](_0x14ba70(0x1c5)+_0x57584e),_0x2d4e4b&&console[_0x14ba70(0x2f5)](_0x14ba70(0x159)));const _0x3da813=await withSpinner(_0x14ba70(0x26f),()=>_0x4ba9b6[_0x14ba70(0x2ba)][_0x14ba70(0x2fa)](_0x57584e,_0x2d4e4b||![]),{'verbose':_0x5724ad[_0x14ba70(0x28d)]}),_0xc224df=_0x3da813[_0x14ba70(0x2a6)];return console['error'](_0x14ba70(0x18b)+_0xc224df['length']+_0x14ba70(0x2c3)+(_0xc224df[_0x14ba70(0x17c)]!==0x1?'s':'')),await handleSDKOutput(_0xc224df,_0x5724ad),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x278);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2a0);async[a55_0x29f4d0(0x211)](_0x38fb04){const _0x11f4e6=a55_0x29f4d0,{options:_0x5704c5,args:_0x45914a,tdx:_0x4f2354}=_0x38fb04,_0x135077=_0x45914a[0x0];let _0x2eaf2c=_0x45914a[0x1];if(!_0x135077)return console[_0x11f4e6(0x2f5)](_0x11f4e6(0x22e)),0x1;_0x5704c5[_0x11f4e6(0x28d)]&&(console[_0x11f4e6(0x2f5)](_0x11f4e6(0x1c5)+_0x135077),_0x2eaf2c&&console['error'](_0x11f4e6(0x244)+_0x2eaf2c));const _0x16949e=await withSpinner(_0x11f4e6(0x1bd),()=>_0x4f2354[_0x11f4e6(0x2ba)]['logFiles'](_0x135077,_0x2eaf2c),{'verbose':_0x5704c5[_0x11f4e6(0x28d)]}),_0x93ed3b=_0x16949e[_0x11f4e6(0x2a6)];if(_0x93ed3b[_0x11f4e6(0x17c)]===0x0)return console['error'](_0x11f4e6(0x24a)),0x0;if(!_0x2eaf2c&&(_0x5704c5[_0x11f4e6(0x29f)]||_0x5704c5[_0x11f4e6(0x2e1)]))return await handleSDKOutput(_0x93ed3b,_0x5704c5),0x0;if(!_0x2eaf2c){const _0x2fa03a=_0x93ed3b['map'](_0x5a0dd8=>({'title':_0x5a0dd8[_0x11f4e6(0x256)]+'\x20('+formatBytes(_0x5a0dd8['fileSize'])+')','value':_0x5a0dd8[_0x11f4e6(0x256)]})),_0x28999b=await a55_0x353259({'type':_0x11f4e6(0x2e3),'name':_0x11f4e6(0x1dd),'message':_0x11f4e6(0x246),'choices':_0x2fa03a});if(!_0x28999b[_0x11f4e6(0x1dd)])return console[_0x11f4e6(0x2f5)](_0x11f4e6(0x1e8)),0x0;_0x2eaf2c=_0x28999b[_0x11f4e6(0x1dd)];}const _0x4f86d4=await withSpinner(_0x11f4e6(0x2d1),()=>_0x4f2354['workflow'][_0x11f4e6(0x2f4)](_0x135077,_0x2eaf2c),{'verbose':_0x5704c5[_0x11f4e6(0x28d)]}),_0x1704bb=_0x4f86d4['data'];return _0x1704bb?console[_0x11f4e6(0x2bd)](_0x1704bb):console['error'](_0x11f4e6(0x2c6)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a55_0x29f4d0(0x243);[a55_0x29f4d0(0x1bb)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x22fde7){const _0x5e4f9f=a55_0x29f4d0,{options:_0x17e7a4,args:_0x517554,tdx:_0x16f569}=_0x22fde7,_0x47da33=_0x517554[0x0];if(!_0x47da33)return console[_0x5e4f9f(0x2f5)](_0x5e4f9f(0x22e)),0x1;const _0x39b95d=_0x17e7a4['reason'];_0x17e7a4[_0x5e4f9f(0x28d)]&&(console[_0x5e4f9f(0x2f5)](_0x5e4f9f(0x1c5)+_0x47da33),_0x39b95d&&console[_0x5e4f9f(0x2f5)](_0x5e4f9f(0x226)+_0x39b95d));if(!_0x17e7a4[_0x5e4f9f(0x202)]){if(!isInteractive())return console[_0x5e4f9f(0x2f5)](a55_0x262d9e['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5e4f9f(0x2f5)](a55_0x262d9e[_0x5e4f9f(0x312)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x24c8eb=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x47da33+'?');if(!_0x24c8eb)return console[_0x5e4f9f(0x2f5)](a55_0x262d9e[_0x5e4f9f(0x1ea)]('Cancelled')),0x1;}const _0xd0c3bd=await withSpinner('Killing\x20attempt...',()=>_0x16f569['workflow']['kill'](_0x47da33,_0x39b95d),{'verbose':_0x17e7a4[_0x5e4f9f(0x28d)]}),_0xea5e3f=_0xd0c3bd[_0x5e4f9f(0x2a6)];return console['error']('✔\x20'+_0xea5e3f),0x0;}}function a55_0x1841(_0x43c0d2,_0x4b9ad7){_0x43c0d2=_0x43c0d2-0x141;const _0x2684a3=a55_0x2684();let _0x184101=_0x2684a3[_0x43c0d2];return _0x184101;}export class WorkflowRetryCommand extends BaseCommand{[a55_0x29f4d0(0x172)]='workflow:retry';['description']=a55_0x29f4d0(0x25c);async[a55_0x29f4d0(0x211)](_0x23c8a0){const _0x47ff71=a55_0x29f4d0,{options:_0x4e04e6,args:_0x2c8ce5,tdx:_0x302b88}=_0x23c8a0,_0x554643=_0x2c8ce5[0x0];if(!_0x554643)return console['error'](_0x47ff71(0x2e5)),console['error'](_0x47ff71(0x199)),0x1;let _0x50b10c=![],_0x48a20c=_0x554643;if(_0x554643[_0x47ff71(0x205)](_0x47ff71(0x21b)))_0x50b10c=!![],_0x48a20c=_0x554643['substring'](0x8);else{if(_0x554643[_0x47ff71(0x205)](_0x47ff71(0x2af)))_0x50b10c=![],_0x48a20c=_0x554643['substring'](0x8);else return console[_0x47ff71(0x2f5)](_0x47ff71(0x145)),console[_0x47ff71(0x2f5)](_0x47ff71(0x199)),0x1;}const _0x2c5b50=_0x4e04e6[_0x47ff71(0x27a)],_0x524c45=_0x4e04e6[_0x47ff71(0x1aa)],_0x4557ad=_0x4e04e6['params'],_0x24053d=_0x4e04e6['force'];_0x4e04e6['verbose']&&(console['error'](_0x47ff71(0x306)+(_0x50b10c?'session':_0x47ff71(0x291))+'\x20'+_0x48a20c),_0x2c5b50&&console[_0x47ff71(0x2f5)](_0x47ff71(0x1ce)+_0x2c5b50),_0x524c45&&console[_0x47ff71(0x2f5)](_0x47ff71(0x27b)+_0x524c45),_0x4557ad&&console[_0x47ff71(0x2f5)](_0x47ff71(0x14a)+_0x4557ad),_0x24053d&&console[_0x47ff71(0x2f5)](_0x47ff71(0x193)));let _0x3ac377;if(_0x4557ad)try{if(_0x4557ad[_0x47ff71(0x205)]('@')){const _0x37e1d7=await import('fs/promises'),_0x4c9a26=_0x4557ad[_0x47ff71(0x2cd)](0x1),_0x4b06f6=await _0x37e1d7[_0x47ff71(0x2f3)](_0x4c9a26,_0x47ff71(0x18a));_0x3ac377=JSON[_0x47ff71(0x260)](_0x4b06f6);}else _0x3ac377=JSON[_0x47ff71(0x260)](_0x4557ad);}catch{return console[_0x47ff71(0x2f5)](_0x47ff71(0x1a0)),0x1;}if(!_0x4e04e6[_0x47ff71(0x202)]){if(!isInteractive())return console[_0x47ff71(0x2f5)](a55_0x262d9e[_0x47ff71(0x25b)](_0x47ff71(0x25d)),_0x47ff71(0x2ff)),console['error'](a55_0x262d9e[_0x47ff71(0x312)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2c9779=await confirmKey(_0x47ff71(0x2dd)+(_0x50b10c?_0x47ff71(0x209):_0x47ff71(0x291))+'\x20'+_0x48a20c+'?');if(!_0x2c9779)return console['error'](a55_0x262d9e[_0x47ff71(0x1ea)]('Cancelled')),0x1;}let _0x2172a4;_0x50b10c?_0x2172a4=await withSpinner(_0x47ff71(0x257),()=>_0x302b88[_0x47ff71(0x2ba)]['retrySession'](_0x48a20c,{'fromTask':_0x2c5b50,'retryParams':_0x3ac377}),{'verbose':_0x4e04e6[_0x47ff71(0x28d)]}):_0x2172a4=await withSpinner(_0x47ff71(0x214),()=>_0x302b88['workflow']['retryAttempt'](_0x48a20c,{'resumeFrom':_0x524c45,'retryParams':_0x3ac377,'force':_0x24053d}),{'verbose':_0x4e04e6[_0x47ff71(0x28d)]});const _0x57b30e=_0x2172a4[_0x47ff71(0x2a6)];return console['error']('✔\x20Retry\x20started'),console[_0x47ff71(0x2f5)](_0x47ff71(0x218)+_0x57b30e[_0x47ff71(0x169)]),console[_0x47ff71(0x2f5)](_0x47ff71(0x2aa)+_0x57b30e[_0x47ff71(0x163)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a55_0x29f4d0(0x15c);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x206);async[a55_0x29f4d0(0x211)](_0x5eb855){const _0x1be9f6=a55_0x29f4d0,{options:_0x5f49b6,args:_0x3af42b,tdx:_0xe6063c}=_0x5eb855;let _0x3bf6df=_0x3af42b[0x0];if(!_0x3bf6df){const _0x4d8dca=this[_0x1be9f6(0x235)]([],_0x5f49b6),_0x34e0c8=await withSpinner('Loading\x20workflows...',()=>_0xe6063c[_0x1be9f6(0x2ba)][_0x1be9f6(0x254)](_0x4d8dca,{'limit':_0x5f49b6[_0x1be9f6(0x2a8)]}),{'verbose':_0x5f49b6[_0x1be9f6(0x28d)]}),_0xa19877=_0x34e0c8[_0x1be9f6(0x2a6)];if(_0xa19877[_0x1be9f6(0x17c)]===0x0)return console['error'](_0x1be9f6(0x141)),!_0x4d8dca&&console[_0x1be9f6(0x2f5)](a55_0x262d9e[_0x1be9f6(0x312)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x14dc7a=_0xa19877[_0x1be9f6(0x27e)](_0x4d47da=>({'title':_0x4d47da[_0x1be9f6(0x1c8)]?.[_0x1be9f6(0x172)]+'.'+_0x4d47da['name'],'value':_0x4d47da[_0x1be9f6(0x1c8)]?.[_0x1be9f6(0x172)]+'.'+_0x4d47da[_0x1be9f6(0x172)],'description':_0x4d47da[_0x1be9f6(0x22c)]?'revision:\x20'+_0x4d47da[_0x1be9f6(0x22c)]:undefined})),_0x17a30e=await a55_0x353259({'type':_0x1be9f6(0x2e3),'name':_0x1be9f6(0x2ba),'message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x14dc7a});if(!_0x17a30e['workflow'])return 0x1;_0x3bf6df=_0x17a30e[_0x1be9f6(0x2ba)];}if(!_0x3bf6df['includes']('.')){const _0x1cb486=this[_0x1be9f6(0x235)]([],_0x5f49b6);if(_0x1cb486)_0x3bf6df=_0x1cb486+'.'+_0x3bf6df;else return console[_0x1be9f6(0x2f5)](a55_0x262d9e['red']('Error:'),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x1be9f6(0x2f5)](a55_0x262d9e[_0x1be9f6(0x312)](_0x1be9f6(0x23c))),0x1;}const _0x4be53d=_0x5f49b6[_0x1be9f6(0x1ac)],_0x555434=_0x5f49b6['sessionTime'],_0x2ba938={};if(_0x4be53d&&Array[_0x1be9f6(0x181)](_0x4be53d))for(const _0x737326 of _0x4be53d){const _0x1ca013=_0x737326[_0x1be9f6(0x1a4)]('=');if(_0x1ca013===-0x1)return console[_0x1be9f6(0x2f5)](_0x1be9f6(0x2ed)+_0x737326),console[_0x1be9f6(0x2f5)](_0x1be9f6(0x28a)),0x1;const _0x1f4922=_0x737326[_0x1be9f6(0x2cd)](0x0,_0x1ca013),_0x3c090b=_0x737326['substring'](_0x1ca013+0x1);try{_0x2ba938[_0x1f4922]=JSON[_0x1be9f6(0x260)](_0x3c090b);}catch{_0x2ba938[_0x1f4922]=_0x3c090b;}}_0x5f49b6[_0x1be9f6(0x28d)]&&(console[_0x1be9f6(0x2f5)](_0x1be9f6(0x264)+_0x3bf6df),Object[_0x1be9f6(0x186)](_0x2ba938)[_0x1be9f6(0x17c)]>0x0&&console[_0x1be9f6(0x2f5)](_0x1be9f6(0x1f5)+JSON[_0x1be9f6(0x236)](_0x2ba938)),_0x555434&&console[_0x1be9f6(0x2f5)](_0x1be9f6(0x153)+_0x555434));if(_0x5f49b6[_0x1be9f6(0x259)])return await this['executeDryRun'](_0x5eb855,_0x3bf6df,_0x2ba938,_0x555434);const _0xd9b4b6=await withSpinner(_0x1be9f6(0x30b),()=>_0xe6063c['workflow']['run'](_0x3bf6df,_0x2ba938,{'sessionTime':_0x555434}),{'verbose':_0x5f49b6[_0x1be9f6(0x28d)]}),_0x605af4=_0xd9b4b6['data'];console[_0x1be9f6(0x2f5)](_0x1be9f6(0x263)),console['error'](_0x1be9f6(0x198)+_0x605af4['id']),console[_0x1be9f6(0x2f5)](_0x1be9f6(0x2aa)+_0x605af4[_0x1be9f6(0x163)]),console[_0x1be9f6(0x2f5)](_0x1be9f6(0x1e6)+_0x605af4[_0x1be9f6(0x1c8)]?.['name']),console['error'](_0x1be9f6(0x1a1)+_0x605af4[_0x1be9f6(0x2ba)]?.[_0x1be9f6(0x172)]);if(_0x605af4[_0x1be9f6(0x1c8)]?.['id']&&_0x605af4[_0x1be9f6(0x163)]&&_0x605af4['id']){const _0x34c678=_0x5f49b6[_0x1be9f6(0x313)],_0x2a9a40=getConsoleUrl(_0x34c678,_0x1be9f6(0x23d)+_0x605af4['project']['id']+_0x1be9f6(0x2d8)+_0x605af4[_0x1be9f6(0x163)]+'/attempt/'+_0x605af4['id']);console[_0x1be9f6(0x2f5)](_0x1be9f6(0x2d3)+a55_0x262d9e['cyan'](_0x2a9a40));}return 0x0;}async['executeDryRun'](_0x1bcebf,_0x17ac81,_0x5d240e,_0x212134){const _0x502383=a55_0x29f4d0,{options:_0x4223a,tdx:_0x36a018}=_0x1bcebf,_0xd40e0=await withSpinner(_0x502383(0x30a)+_0x17ac81+_0x502383(0x23a),()=>_0x36a018['workflow']['getWorkflow'](_0x17ac81),{'verbose':_0x4223a[_0x502383(0x28d)]}),_0x384778=_0xd40e0[_0x502383(0x2a6)],_0x4967b8=_0x212134??new Date()[_0x502383(0x253)]();console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x240)](_0x502383(0x147)),_0x17ac81),console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x240)]('Session\x20time:'),_0x4967b8),console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x240)]('Parameters:'),JSON[_0x502383(0x236)](_0x5d240e)),console['log'](''),console['log'](a55_0x262d9e['bold'](_0x502383(0x1ca)));const _0x1fba5d=parseTaskGraph(_0x384778[_0x502383(0x1f4)]??null);if(_0x1fba5d[_0x502383(0x17c)]===0x0)console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x312)]('\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)'));else for(const _0x1a7716 of formatTaskGraph(_0x1fba5d)){console[_0x502383(0x2bd)](_0x1a7716);}const _0x272bb7=summarizeTaskGraph(_0x1fba5d),_0x3db1d7=formatWarningSummary(_0x272bb7);return _0x3db1d7&&(console['log'](''),console['log'](a55_0x262d9e[_0x502383(0x1ea)](_0x3db1d7))),console[_0x502383(0x2bd)](a55_0x262d9e[_0x502383(0x1ea)]('\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.')),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x2d0);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2c1);async[a55_0x29f4d0(0x211)](_0x284282){const _0x5cbc81=a55_0x29f4d0,{options:_0x1c978d,args:_0x1f2fa7,tdx:_0x320fb3}=_0x284282,_0x194c40=_0x1f2fa7[0x0],_0x568d5a=_0x1f2fa7[0x1]||'.';if(!_0x194c40)return console[_0x5cbc81(0x2f5)]('Error:\x20Project\x20name\x20is\x20required'),console['error']('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x401a28=_0x1c978d[_0x5cbc81(0x22c)];_0x1c978d[_0x5cbc81(0x28d)]&&(console[_0x5cbc81(0x2f5)](_0x5cbc81(0x1ba)+_0x194c40),console['error']('Output\x20directory:\x20'+_0x568d5a),_0x401a28&&console[_0x5cbc81(0x2f5)](_0x5cbc81(0x2e7)+_0x401a28));const _0x595e7d=await withSpinner('Downloading\x20project\x20'+_0x194c40+_0x5cbc81(0x23a),()=>_0x320fb3[_0x5cbc81(0x2ba)][_0x5cbc81(0x25e)](_0x194c40,_0x568d5a,{'revision':_0x401a28}),{'verbose':_0x1c978d['verbose']}),_0x355713=_0x595e7d['data'];return console['error'](_0x5cbc81(0x2d4)+_0x355713[_0x5cbc81(0x29a)]),console[_0x5cbc81(0x2f5)](_0x5cbc81(0x2a1)+_0x355713['revision']),console[_0x5cbc81(0x2f5)]('\x20\x20Files\x20extracted:\x20'+_0x355713[_0x5cbc81(0x2bb)]),console[_0x5cbc81(0x2f5)](_0x5cbc81(0x1c9)+_0x568d5a+'/'+_0x355713[_0x5cbc81(0x29a)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x1d3);['description']=a55_0x29f4d0(0x252);async[a55_0x29f4d0(0x211)](_0x2521dc){const _0x1b008d=a55_0x29f4d0,{options:_0x37005f,args:_0x37bb54,tdx:_0x26d5ca}=_0x2521dc;let _0x6ba7c0='.',_0x1bcaba=_0x37005f[_0x1b008d(0x172)];if(_0x37bb54[0x0]){const {promises:_0xabfd4c}=await import('fs');try{const _0x49979e=await _0xabfd4c[_0x1b008d(0x196)](_0x37bb54[0x0]);if(_0x49979e['isDirectory']())_0x6ba7c0=_0x37bb54[0x0];else return console[_0x1b008d(0x2f5)](_0x1b008d(0x1f6)+_0x37bb54[0x0]+_0x1b008d(0x269)),0x1;}catch{_0x1bcaba=_0x37bb54[0x0],_0x6ba7c0='.';}}const _0x38892e=_0x37005f[_0x1b008d(0x22c)],_0xcfc9a=_0x37005f[_0x1b008d(0x197)];_0x37005f[_0x1b008d(0x28d)]&&(console[_0x1b008d(0x2f5)](_0x1b008d(0x1d9)+_0x6ba7c0),_0x1bcaba&&console[_0x1b008d(0x2f5)](_0x1b008d(0x29e)+_0x1bcaba),_0x38892e&&console[_0x1b008d(0x2f5)](_0x1b008d(0x2e7)+_0x38892e),_0xcfc9a&&console[_0x1b008d(0x2f5)](_0x1b008d(0x2a5)));const _0x51f582=await withSpinner(_0x1b008d(0x29b),()=>_0x26d5ca[_0x1b008d(0x2ba)][_0x1b008d(0x2b7)](_0x6ba7c0,{'projectName':_0x1bcaba,'revision':_0x38892e,'skipValidation':_0xcfc9a}),{'verbose':_0x37005f['verbose']}),_0x345094=_0x51f582[_0x1b008d(0x2a6)];return console['error'](_0x1b008d(0x318)+_0x345094['projectName']),console[_0x1b008d(0x2f5)](_0x1b008d(0x292)+_0x345094[_0x1b008d(0x1ee)]),console['error']('\x20\x20Revision:\x20'+_0x345094[_0x1b008d(0x22c)]),await this['showWorkflowConsoleUrl'](_0x26d5ca,_0x345094['projectName'],_0x37005f[_0x1b008d(0x313)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x2a2);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x27c);async[a55_0x29f4d0(0x211)](_0x2aa730){const _0x20735e=a55_0x29f4d0,{options:_0x22dad5,args:_0x30e5d5,tdx:_0x4ba47c}=_0x2aa730,_0x5ef206=_0x30e5d5[0x0],_0x170f39=_0x30e5d5[0x1];if(!_0x5ef206)return console['error'](a55_0x262d9e[_0x20735e(0x25b)](_0x20735e(0x1df)),_0x20735e(0x20b)),console[_0x20735e(0x2f5)](a55_0x262d9e['dim']('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x4f6c65=_0x22dad5['revision'];_0x22dad5[_0x20735e(0x28d)]&&(console[_0x20735e(0x2f5)](_0x20735e(0x1ba)+_0x5ef206),_0x170f39&&console[_0x20735e(0x2f5)](_0x20735e(0x1c0)+_0x170f39),_0x4f6c65&&console[_0x20735e(0x2f5)](_0x20735e(0x2e7)+_0x4f6c65),_0x22dad5[_0x20735e(0x259)]&&console[_0x20735e(0x2f5)](_0x20735e(0x26c)));const _0x3ffeb0=await withSpinner(_0x20735e(0x319)+_0x5ef206+_0x20735e(0x23a),()=>_0x4ba47c[_0x20735e(0x2ba)]['pullProject'](_0x5ef206,{'targetDir':_0x170f39,'revision':_0x4f6c65}),{'verbose':_0x22dad5[_0x20735e(0x28d)]}),_0x4f5438=_0x3ffeb0['data'];_0x4f5438[_0x20735e(0x15a)]?console['error']('→\x20New\x20project:\x20'+_0x4f5438[_0x20735e(0x29a)]):console[_0x20735e(0x2f5)](_0x20735e(0x1c7)+_0x4f5438['projectName']);console[_0x20735e(0x2f5)](_0x20735e(0x2a1)+_0x4f5438[_0x20735e(0x22c)]),console[_0x20735e(0x2f5)](_0x20735e(0x183)+(a55_0xee06fd['relative'](process[_0x20735e(0x1c4)](),_0x4f5438[_0x20735e(0x293)])||'.')),console[_0x20735e(0x2f5)](_0x20735e(0x164)+a55_0x262d9e[_0x20735e(0x26d)]('+'+_0x4f5438[_0x20735e(0x1d8)]['new']+_0x20735e(0x2e9))+',\x20'+(a55_0x262d9e[_0x20735e(0x1ea)]('~'+_0x4f5438['summary']['modified']+_0x20735e(0x258))+',\x20')+(a55_0x262d9e[_0x20735e(0x25b)]('-'+_0x4f5438[_0x20735e(0x1d8)][_0x20735e(0x15f)]+_0x20735e(0x24d))+',\x20')+(''+a55_0x262d9e[_0x20735e(0x312)](_0x4f5438['summary']['unchanged']+_0x20735e(0x18c))));for(const _0x392515 of _0x4f5438[_0x20735e(0x2f2)]){_0x392515[_0x20735e(0x1a3)]==='modified'&&_0x392515[_0x20735e(0x1d7)]&&(console[_0x20735e(0x2f5)]('\x0a'+a55_0x262d9e['cyan']('---\x20'+_0x392515['path'])),console[_0x20735e(0x2f5)](_0x392515[_0x20735e(0x1d7)]));}if(!_0x4f5438[_0x20735e(0x25f)])return saveSessionContext({'workflow_project':_0x4f5438[_0x20735e(0x29a)]},_0x22dad5['session']),console['error'](a55_0x262d9e[_0x20735e(0x26d)](_0x20735e(0x156))),console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x312)](_0x20735e(0x160)+_0x4f5438['projectName'])),0x0;if(_0x22dad5['dryRun'])return console['error'](a55_0x262d9e[_0x20735e(0x1ea)](_0x20735e(0x223))),0x0;if(!_0x22dad5[_0x20735e(0x202)]){if(!isInteractive())return console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x25b)](_0x20735e(0x25d)),_0x20735e(0x2ff)),console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x312)](_0x20735e(0x17f))),0x1;const _0x4b9560=await confirmKey(_0x20735e(0x305));if(!_0x4b9560)return console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x1ea)](_0x20735e(0x1e8)),_0x20735e(0x177)),0x1;}await withSpinner('Writing\x20files...',()=>_0x4ba47c[_0x20735e(0x2ba)][_0x20735e(0x179)](_0x4f5438,{'revision':_0x4f6c65}),{'verbose':_0x22dad5['verbose']}),saveSessionContext({'workflow_project':_0x4f5438[_0x20735e(0x29a)]},_0x22dad5[_0x20735e(0x209)]),console['error'](a55_0x262d9e[_0x20735e(0x26d)]('✔\x20Pull\x20complete'));const _0x29244b=a55_0xee06fd[_0x20735e(0x2c2)](process[_0x20735e(0x1c4)](),_0x4f5438[_0x20735e(0x293)])||'.';return console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x312)](_0x20735e(0x1c9)+_0x29244b)),console[_0x20735e(0x2f5)](a55_0x262d9e[_0x20735e(0x312)](_0x20735e(0x160)+_0x4f5438[_0x20735e(0x29a)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]='workflow:push';[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x201);async[a55_0x29f4d0(0x211)](_0x4ea179){const _0x30232c=a55_0x29f4d0,{options:_0x5e3cb5,args:_0x3be690,tdx:_0x2442de}=_0x4ea179,_0x1d0e83=this[_0x30232c(0x1eb)](_0x3be690,_0x5e3cb5),_0x4bc4f0=_0x5e3cb5,{revision:_0x124b99,skipValidation:_0x2329e1,backfill:_0x21ed79}=_0x4bc4f0,_0x16825a=_0x21ed79===undefined?undefined:!_0x21ed79;_0x5e3cb5[_0x30232c(0x28d)]&&(_0x1d0e83&&console['error'](_0x30232c(0x2ce)+_0x1d0e83),_0x124b99&&console[_0x30232c(0x2f5)](_0x30232c(0x2e7)+_0x124b99),_0x5e3cb5[_0x30232c(0x259)]&&console[_0x30232c(0x2f5)](_0x30232c(0x26c)),_0x2329e1&&console[_0x30232c(0x2f5)](_0x30232c(0x2a5)),_0x21ed79&&console[_0x30232c(0x2f5)](_0x30232c(0x285)));let _0x136ef1;try{_0x136ef1=await withSpinner(_0x30232c(0x2d5),()=>_0x2442de[_0x30232c(0x2ba)][_0x30232c(0x1c3)]({'sourceDir':_0x1d0e83,'revision':_0x124b99,'skipValidation':_0x2329e1,'skipSchedule':_0x16825a}),{'verbose':_0x5e3cb5[_0x30232c(0x28d)]});}catch(_0x343d19){if(_0x343d19 instanceof Error&&_0x343d19['message'][_0x30232c(0x208)](_0x30232c(0x1e9)))return console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x25b)]('Error:'),_0x30232c(0x2cc)),_0x5e3cb5[_0x30232c(0x16c)]?console['error'](a55_0x262d9e[_0x30232c(0x312)](_0x30232c(0x2fb)+_0x5e3cb5[_0x30232c(0x16c)]+_0x30232c(0x20e)+_0x5e3cb5[_0x30232c(0x16c)]+'\x27')):console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x312)](_0x30232c(0x149))),0x1;throw _0x343d19;}const _0x3f5651=_0x136ef1['data'];console[_0x30232c(0x2f5)](_0x30232c(0x2a7)+_0x3f5651['projectName']),console[_0x30232c(0x2f5)](_0x30232c(0x1b9)+_0x3f5651[_0x30232c(0x227)]),console['error'](_0x30232c(0x2a1)+_0x3f5651[_0x30232c(0x22c)]),console['error']('\x20\x20Changes:\x20'+a55_0x262d9e[_0x30232c(0x26d)]('+'+_0x3f5651[_0x30232c(0x1d8)][_0x30232c(0x17a)]+_0x30232c(0x2e9))+',\x20'+(a55_0x262d9e[_0x30232c(0x1ea)]('~'+_0x3f5651[_0x30232c(0x1d8)]['modified']+_0x30232c(0x258))+',\x20')+(a55_0x262d9e['red']('-'+_0x3f5651[_0x30232c(0x1d8)][_0x30232c(0x15f)]+_0x30232c(0x24d))+',\x20')+(''+a55_0x262d9e[_0x30232c(0x312)](_0x3f5651[_0x30232c(0x1d8)][_0x30232c(0x1e3)]+_0x30232c(0x18c))));for(const _0x4f5ad0 of _0x3f5651['changes']){_0x4f5ad0[_0x30232c(0x1a3)]===_0x30232c(0x189)&&_0x4f5ad0[_0x30232c(0x1d7)]&&(console[_0x30232c(0x2f5)]('\x0a'+a55_0x262d9e[_0x30232c(0x295)]('---\x20'+_0x4f5ad0['path'])),console[_0x30232c(0x2f5)](_0x4f5ad0[_0x30232c(0x1d7)]));}if(!_0x3f5651[_0x30232c(0x25f)])return console['error'](a55_0x262d9e[_0x30232c(0x26d)](_0x30232c(0x154))),await this['showWorkflowConsoleUrl'](_0x2442de,_0x3f5651[_0x30232c(0x29a)],_0x5e3cb5[_0x30232c(0x313)]),0x0;if(_0x5e3cb5[_0x30232c(0x259)])return console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x1ea)](_0x30232c(0x229))),0x0;if(!_0x5e3cb5[_0x30232c(0x202)]){if(!isInteractive())return console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x25b)](_0x30232c(0x25d)),_0x30232c(0x2ff)),console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x312)](_0x30232c(0x17f))),0x1;const _0x14f49e=await confirmKey(_0x30232c(0x20a));if(!_0x14f49e)return console['error'](a55_0x262d9e['yellow'](_0x30232c(0x1e8)),'-\x20nothing\x20pushed'),0x1;}const _0x548ed2=await withSpinner(_0x30232c(0x238),()=>_0x2442de[_0x30232c(0x2ba)][_0x30232c(0x20c)](_0x3f5651),{'verbose':_0x5e3cb5[_0x30232c(0x28d)]}),_0x6f5fe5=_0x548ed2[_0x30232c(0x2a6)];return console[_0x30232c(0x2f5)](a55_0x262d9e[_0x30232c(0x26d)](_0x30232c(0x212))),console[_0x30232c(0x2f5)]('\x20\x20Project\x20ID:\x20'+_0x6f5fe5[_0x30232c(0x1ee)]),console['error'](_0x30232c(0x2a1)+_0x6f5fe5[_0x30232c(0x22c)]),await this[_0x30232c(0x1c6)](_0x2442de,_0x6f5fe5['projectName'],_0x5e3cb5[_0x30232c(0x313)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]='workflow:clone';[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x16f);async['execute'](_0x4be24d){const _0xe62e21=a55_0x29f4d0,{options:_0x300eb4,args:_0x47e3e4,tdx:_0x23fe63}=_0x4be24d,_0x38e7ef=this['resolveProjectDir'](_0x47e3e4,_0x300eb4),_0x5e1504=_0x300eb4['name'],_0x2f3b1b=_0x300eb4[_0xe62e21(0x22c)],_0x351898=_0x300eb4['skipValidation'];if(!_0x38e7ef)return console[_0xe62e21(0x2f5)](a55_0x262d9e['red']('Error:'),_0xe62e21(0x190)),console[_0xe62e21(0x2f5)](a55_0x262d9e['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x312)](_0xe62e21(0x1a9))),0x1;if(!_0x5e1504)return console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x25b)](_0xe62e21(0x1df)),_0xe62e21(0x315)),console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x312)](_0xe62e21(0x1b6))),0x1;_0x300eb4[_0xe62e21(0x28d)]&&(console[_0xe62e21(0x2f5)]('Source\x20directory:\x20'+_0x38e7ef),console[_0xe62e21(0x2f5)](_0xe62e21(0x1d4)+_0x5e1504),_0x2f3b1b&&console['error'](_0xe62e21(0x2e7)+_0x2f3b1b),_0x300eb4[_0xe62e21(0x259)]&&console['error']('Dry\x20run:\x20yes'),_0x351898&&console['error'](_0xe62e21(0x2a5)));const _0x5d2205=await withSpinner('Analyzing\x20project...',()=>_0x23fe63['workflow'][_0xe62e21(0x167)](_0x38e7ef,_0x5e1504,{'revision':_0x2f3b1b,'skipValidation':_0x351898}),{'verbose':_0x300eb4[_0xe62e21(0x28d)]}),_0x119128=_0x5d2205[_0xe62e21(0x2a6)];console[_0xe62e21(0x2f5)](_0xe62e21(0x25a)+_0x119128[_0xe62e21(0x227)]);_0x119128[_0xe62e21(0x1d2)]&&console[_0xe62e21(0x2f5)](_0xe62e21(0x26b)+_0x119128[_0xe62e21(0x1d2)]);console[_0xe62e21(0x2f5)](_0xe62e21(0x1d4)+_0x119128[_0xe62e21(0x249)]),console['error'](_0xe62e21(0x2e7)+_0x119128[_0xe62e21(0x22c)]),console[_0xe62e21(0x2f5)](_0xe62e21(0x1dc)+_0x119128['fileCount']);_0x119128[_0xe62e21(0x1a5)]&&(console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x1ea)](_0xe62e21(0x17b)+_0x119128[_0xe62e21(0x249)]+_0xe62e21(0x219)+_0x119128[_0xe62e21(0x165)]+')')),console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x1ea)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x300eb4['dryRun'])return console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x1ea)](_0xe62e21(0x26e))),0x0;if(!_0x300eb4[_0xe62e21(0x202)]){if(!isInteractive())return console['error'](a55_0x262d9e[_0xe62e21(0x25b)](_0xe62e21(0x25d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x312)](_0xe62e21(0x17f))),0x1;const _0x5d4721=_0x119128[_0xe62e21(0x1d2)]||a55_0xee06fd[_0xe62e21(0x273)](_0x38e7ef),_0x2156d1=_0x119128[_0xe62e21(0x1a5)]?_0xe62e21(0x24e)+_0x5e1504+_0xe62e21(0x1be):_0xe62e21(0x2d2)+_0x5d4721+_0xe62e21(0x1d6)+_0x5e1504+'\x22?',_0x3f92e1=await confirmKey(_0x2156d1);if(!_0x3f92e1)return console['error'](a55_0x262d9e['yellow'](_0xe62e21(0x1e8))),0x1;}const _0x27becc=await withSpinner(_0x119128[_0xe62e21(0x1a5)]?'Updating\x20'+_0x5e1504+_0xe62e21(0x23a):_0xe62e21(0x185)+_0x5e1504+_0xe62e21(0x23a),()=>_0x23fe63[_0xe62e21(0x2ba)][_0xe62e21(0x28f)](_0x119128),{'verbose':_0x300eb4['verbose']}),_0x3c82c4=_0x27becc['data'];return console[_0xe62e21(0x2f5)](a55_0x262d9e[_0xe62e21(0x26d)](_0x119128[_0xe62e21(0x1a5)]?_0xe62e21(0x2d6):_0xe62e21(0x30c))),console[_0xe62e21(0x2f5)](_0xe62e21(0x1e6)+_0x3c82c4[_0xe62e21(0x249)]),console[_0xe62e21(0x2f5)](_0xe62e21(0x292)+_0x3c82c4[_0xe62e21(0x1d1)]),console[_0xe62e21(0x2f5)](_0xe62e21(0x2a1)+_0x3c82c4[_0xe62e21(0x22c)]),await this['showWorkflowConsoleUrl'](_0x23fe63,_0x3c82c4[_0xe62e21(0x249)],_0x300eb4[_0xe62e21(0x313)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a55_0x29f4d0(0x170);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2a3);async['execute'](_0x1b5cd8){const _0x38862d=a55_0x29f4d0,{options:_0x488e76,args:_0x46d257,tdx:_0x2cca71}=_0x1b5cd8,_0x5a268d=_0x46d257[0x0];if(!_0x5a268d)return console[_0x38862d(0x2f5)](_0x38862d(0x28c)),console['error'](_0x38862d(0x20f)),0x1;_0x488e76[_0x38862d(0x28d)]&&console[_0x38862d(0x2f5)](_0x38862d(0x1ba)+_0x5a268d);if(!_0x488e76[_0x38862d(0x202)]){if(!isInteractive())return console[_0x38862d(0x2f5)](a55_0x262d9e[_0x38862d(0x25b)](_0x38862d(0x25d)),_0x38862d(0x2ff)),console[_0x38862d(0x2f5)](a55_0x262d9e[_0x38862d(0x312)](_0x38862d(0x17f))),0x1;const _0x12e027=await confirmKey(_0x38862d(0x289)+_0x5a268d+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x12e027)return console[_0x38862d(0x2f5)](a55_0x262d9e[_0x38862d(0x1ea)]('Cancelled')),0x1;}const _0x4869ac=await withSpinner('Deleting\x20project\x20'+_0x5a268d+_0x38862d(0x23a),()=>_0x2cca71['workflow'][_0x38862d(0x15b)](_0x5a268d),{'verbose':_0x488e76[_0x38862d(0x28d)]}),_0xcef00=_0x4869ac[_0x38862d(0x2a6)];return console[_0x38862d(0x2f5)](_0x38862d(0x317)+_0xcef00[_0x38862d(0x29a)]),console[_0x38862d(0x2f5)]('\x20\x20Project\x20ID:\x20'+_0xcef00[_0x38862d(0x1ee)]),0x0;}}export function parseKeyValue(_0x2fe0a2){const _0x5239d6=a55_0x29f4d0,_0x43d3f5=_0x2fe0a2[_0x5239d6(0x1a4)]('=');if(_0x43d3f5===-0x1)throw new Error(_0x5239d6(0x174)+_0x2fe0a2+_0x5239d6(0x2dc));const _0x4b97a9=_0x2fe0a2[_0x5239d6(0x2cd)](0x0,_0x43d3f5),_0x28e730=_0x2fe0a2['substring'](_0x43d3f5+0x1);if(!_0x4b97a9)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x4b97a9,'value':_0x28e730};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a55_0x29f4d0(0x310);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x2c7);async[a55_0x29f4d0(0x211)](_0x3dc0dc){const _0x3f2e9e=a55_0x29f4d0,{options:_0x1aa4ca,args:_0x1b0643,tdx:_0x4dc939}=_0x3dc0dc,_0x172146=this[_0x3f2e9e(0x215)](_0x1b0643,_0x1aa4ca);if(!_0x172146)return 0x1;_0x1aa4ca[_0x3f2e9e(0x28d)]&&console[_0x3f2e9e(0x2f5)](_0x3f2e9e(0x1ba)+_0x172146);const _0x224adc=await withSpinner(_0x3f2e9e(0x1a8),()=>_0x4dc939[_0x3f2e9e(0x2ba)][_0x3f2e9e(0x1bf)](_0x172146),{'verbose':_0x1aa4ca['verbose']}),{secrets:_0x4bddfc}=_0x224adc[_0x3f2e9e(0x2a6)];return console[_0x3f2e9e(0x2f5)](_0x3f2e9e(0x18b)+_0x4bddfc['length']+_0x3f2e9e(0x28b)+(_0x4bddfc[_0x3f2e9e(0x17c)]!==0x1?'s':'')),await handleSDKOutput(_0x4bddfc,_0x1aa4ca),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]='workflow:secrets:set';[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x299);async[a55_0x29f4d0(0x211)](_0x5b3a1d){const _0x40fa0c=a55_0x29f4d0,{options:_0x1d7a1b,args:_0x481c69,tdx:_0x1a09e1}=_0x5b3a1d;let _0x20b727,_0x4577d1;if(_0x481c69[_0x40fa0c(0x17c)]>=0x1&&!_0x481c69[0x0][_0x40fa0c(0x208)]('='))_0x20b727=_0x481c69[0x0],_0x4577d1=_0x481c69['slice'](0x1);else{if(_0x481c69['length']>=0x1&&_0x1d7a1b['workflowProject'])_0x20b727=_0x1d7a1b[_0x40fa0c(0x16c)],_0x4577d1=_0x481c69;else return _0x481c69[_0x40fa0c(0x17c)]>=0x1?(console[_0x40fa0c(0x2f5)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x40fa0c(0x2f5)](_0x40fa0c(0x23c)),0x1):(console['error']('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console['error'](_0x40fa0c(0x1a7)),0x1);}if(_0x4577d1[_0x40fa0c(0x17c)]===0x0)return console['error'](_0x40fa0c(0x1ef)),console[_0x40fa0c(0x2f5)](_0x40fa0c(0x1a7)),0x1;const _0x1b0224={};try{for(const _0x201e0e of _0x4577d1){const {key:_0x2e3f7f,value:_0x184dff}=parseKeyValue(_0x201e0e);_0x1b0224[_0x2e3f7f]=_0x184dff;}}catch(_0x543268){return _0x543268 instanceof Error&&console['error'](a55_0x262d9e[_0x40fa0c(0x25b)](_0x40fa0c(0x1df)),_0x543268['message']),0x1;}const _0x42943f=Object[_0x40fa0c(0x186)](_0x1b0224);_0x1d7a1b['verbose']&&(console[_0x40fa0c(0x2f5)](_0x40fa0c(0x1ba)+_0x20b727),console[_0x40fa0c(0x2f5)]('Secrets\x20to\x20set:\x20'+_0x42943f[_0x40fa0c(0x303)](',\x20')));const _0x15bc66=await withSpinner(_0x42943f[_0x40fa0c(0x17c)]===0x1?_0x40fa0c(0x239):_0x40fa0c(0x1de)+_0x42943f[_0x40fa0c(0x17c)]+_0x40fa0c(0x251),()=>_0x1a09e1[_0x40fa0c(0x2ba)]['setSecrets'](_0x20b727,_0x1b0224),{'verbose':_0x1d7a1b[_0x40fa0c(0x28d)]}),_0x544fb2=_0x15bc66[_0x40fa0c(0x2a6)];return console[_0x40fa0c(0x2f5)](_0x42943f['length']===0x1?_0x40fa0c(0x1fb)+_0x544fb2[_0x40fa0c(0x186)][0x0]+_0x40fa0c(0x22f)+_0x544fb2[_0x40fa0c(0x29a)]+'\x27':'✔\x20'+_0x544fb2[_0x40fa0c(0x186)][_0x40fa0c(0x17c)]+_0x40fa0c(0x1a6)+_0x544fb2[_0x40fa0c(0x29a)]+'\x27'),(_0x1d7a1b[_0x40fa0c(0x29f)]||_0x1d7a1b['jsonl'])&&await handleSingleObjectOutput(_0x544fb2,_0x1d7a1b),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a55_0x29f4d0(0x297);[a55_0x29f4d0(0x1bb)]=a55_0x29f4d0(0x274);async['execute'](_0x365f76){const _0x58c366=a55_0x29f4d0,{options:_0x453c9b,args:_0x341d52,tdx:_0x321b72}=_0x365f76;let _0x11625f,_0x2bd335;if(_0x341d52[_0x58c366(0x17c)]>=0x2)_0x11625f=_0x341d52[0x0],_0x2bd335=_0x341d52[0x1];else{if(_0x341d52[_0x58c366(0x17c)]===0x1&&_0x453c9b['workflowProject'])_0x11625f=_0x453c9b['workflowProject'],_0x2bd335=_0x341d52[0x0];else return _0x341d52['length']===0x1?(console['error'](_0x58c366(0x14c)),console[_0x58c366(0x2f5)](_0x58c366(0x23c)),0x1):(console[_0x58c366(0x2f5)](_0x58c366(0x262)),console['error'](_0x58c366(0x2ca)),0x1);}_0x453c9b[_0x58c366(0x28d)]&&(console[_0x58c366(0x2f5)](_0x58c366(0x1ba)+_0x11625f),console['error'](_0x58c366(0x275)+_0x2bd335));if(!_0x453c9b[_0x58c366(0x202)]){if(!isInteractive())return console[_0x58c366(0x2f5)](a55_0x262d9e[_0x58c366(0x25b)]('\x0aError:'),_0x58c366(0x2ff)),console[_0x58c366(0x2f5)](a55_0x262d9e[_0x58c366(0x312)](_0x58c366(0x17f))),0x1;const _0x58d2e7=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x2bd335+'\x27\x20from\x20project\x20\x27'+_0x11625f+'\x27?');if(!_0x58d2e7)return console['error'](a55_0x262d9e[_0x58c366(0x1ea)](_0x58c366(0x1e8))),0x1;}const _0x2b295a=await withSpinner('Deleting\x20secret...',()=>_0x321b72['workflow']['deleteSecret'](_0x11625f,_0x2bd335),{'verbose':_0x453c9b[_0x58c366(0x28d)]}),_0x369846=_0x2b295a['data'];return console[_0x58c366(0x2f5)](_0x58c366(0x1fb)+_0x369846[_0x58c366(0x225)]+_0x58c366(0x1e2)+_0x369846[_0x58c366(0x29a)]+'\x27'),(_0x453c9b['json']||_0x453c9b[_0x58c366(0x232)])&&await handleSingleObjectOutput(_0x369846,_0x453c9b),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(_0x7206da){const _0x11d58f=a55_0x29f4d0,_0xec03c7=Math[_0x11d58f(0x2f1)](_0x7206da/0x3e8),_0x330658=Math[_0x11d58f(0x2f1)](_0xec03c7/0x3c),_0xcce46a=Math[_0x11d58f(0x2f1)](_0x330658/0x3c),_0xc30ced=Math[_0x11d58f(0x2f1)](_0xcce46a/0x18);if(_0xc30ced>0x0){const _0x5c7e32=_0xcce46a%0x18;return _0x5c7e32>0x0?_0xc30ced+'d\x20'+_0x5c7e32+'h':_0xc30ced+'d';}else{if(_0xcce46a>0x0){const _0x1d3d8e=_0x330658%0x3c;return _0x1d3d8e>0x0?_0xcce46a+'h\x20'+_0x1d3d8e+'m':_0xcce46a+'h';}else{if(_0x330658>0x0){const _0x27f709=_0xec03c7%0x3c;return _0x27f709>0x0?_0x330658+'m\x20'+_0x27f709+'s':_0x330658+'m';}else return _0xec03c7+'s';}}}function formatTimestamp(_0x1bf9cf,_0x1a827b){const _0x37640a=a55_0x29f4d0,_0x492e9b=new Date(_0x1bf9cf),_0x5d5e16=String(_0x492e9b[_0x37640a(0x1f8)]())[_0x37640a(0x2f9)](0x2,'0'),_0x4d54c8=String(_0x492e9b[_0x37640a(0x18f)]())['padStart'](0x2,'0'),_0x1ee49a=_0x5d5e16+':'+_0x4d54c8,_0x5cb021=_0x492e9b[_0x37640a(0x1ad)]()===_0x1a827b[_0x37640a(0x1ad)]()&&_0x492e9b['getMonth']()===_0x1a827b['getMonth']()&&_0x492e9b[_0x37640a(0x2ad)]()===_0x1a827b[_0x37640a(0x2ad)]();if(_0x5cb021)return _0x1ee49a;else{const _0x51ffb4=String(_0x492e9b[_0x37640a(0x1cf)]()+0x1)[_0x37640a(0x2f9)](0x2,'0'),_0x367c9f=String(_0x492e9b['getDate']())['padStart'](0x2,'0');return _0x51ffb4+'-'+_0x367c9f+'\x20'+_0x1ee49a;}}function formatDate(_0x4faeda){const _0x501d55=a55_0x29f4d0,_0xf64701=_0x4faeda['getFullYear'](),_0x22a296=String(_0x4faeda[_0x501d55(0x1cf)]()+0x1)[_0x501d55(0x2f9)](0x2,'0'),_0x96c2e=String(_0x4faeda['getDate']())[_0x501d55(0x2f9)](0x2,'0');return _0xf64701+'-'+_0x22a296+'-'+_0x96c2e;}function getTaskStateIcon(_0x4f68a9){const _0x1de799={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1de799[_0x4f68a9]||'⚪';}function getBarChar(_0x48e626){const _0x226794=a55_0x29f4d0;return _0x48e626===_0x226794(0x2f5)||_0x48e626===_0x226794(0x2c0)?'×':'─';}function getBarColor(_0x3061c6){const _0x5e9476=a55_0x29f4d0,_0x2b386e={'success':a55_0x262d9e[_0x5e9476(0x26d)],'error':a55_0x262d9e[_0x5e9476(0x25b)],'group_error':a55_0x262d9e[_0x5e9476(0x25b)],'running':a55_0x262d9e[_0x5e9476(0x2ab)],'blocked':a55_0x262d9e[_0x5e9476(0x1ea)],'planned':a55_0x262d9e[_0x5e9476(0x312)],'canceling':a55_0x262d9e[_0x5e9476(0x1ea)]};return _0x2b386e[_0x3061c6]||a55_0x262d9e[_0x5e9476(0x192)];}function parseTaskName(_0x43d6af){const _0x1dbd81=a55_0x29f4d0;let _0x354ae0=_0x43d6af[_0x1dbd81(0x2d9)](/^\++/,'');const _0x2adff3=_0x354ae0[_0x1dbd81(0x248)]('+'),_0x39184d=_0x2adff3['length']>0x1?_0x2adff3[_0x1dbd81(0x17c)]-0x2:0x0,_0x5d8198=_0x2adff3[_0x2adff3[_0x1dbd81(0x17c)]-0x1]||_0x354ae0;return{'level':_0x39184d,'name':'+'+_0x5d8198};}function truncateTaskName(_0x147d9e,_0x17990b){const _0x451434=a55_0x29f4d0,_0x62208c=stringWidth(_0x147d9e);if(_0x62208c<=_0x17990b)return _0x147d9e;let _0x28261d=_0x147d9e;while(stringWidth(_0x28261d+'…')>_0x17990b&&_0x28261d['length']>0x0){_0x28261d=_0x28261d[_0x451434(0x2f7)](0x0,-0x1);}return _0x28261d+'…';}function calculateTimeScale(_0x46724c,_0x442f90){const _0x311749=a55_0x29f4d0;return{'startTime':_0x46724c['start'],'endTime':_0x46724c[_0x311749(0x1cb)],'durationMs':_0x46724c[_0x311749(0x188)],'msPerChar':_0x46724c[_0x311749(0x188)]/_0x442f90};}function timeToPosition(_0x200574,_0x2c242c,_0x5473cf){const _0x4a25ea=a55_0x29f4d0,_0xaf9b66=_0x200574-_0x2c242c['startTime'],_0xa8ce38=Math[_0x4a25ea(0x2f1)](_0xaf9b66/_0x2c242c[_0x4a25ea(0x283)]);return Math[_0x4a25ea(0x180)](0x0,Math['min'](_0xa8ce38,_0x5473cf));}function renderTimeAxis(_0x1a3be8,_0x33d3ca){const _0x173a39=a55_0x29f4d0,_0x4ed52d=Math[_0x173a39(0x231)](TIMELINE_CONFIG[_0x173a39(0x166)],Math[_0x173a39(0x180)](TIMELINE_CONFIG[_0x173a39(0x287)],Math[_0x173a39(0x2f1)](_0x33d3ca/TIMELINE_CONFIG[_0x173a39(0x280)]))),_0x4416d4=_0x1a3be8[_0x173a39(0x1b8)]/(_0x4ed52d-0x1),_0x2dc9b0=new Date(_0x1a3be8['startTime']),_0x13a3c5=[];for(let _0x542395=0x0;_0x542395<_0x4ed52d;_0x542395++){const _0x2f6583=_0x1a3be8[_0x173a39(0x282)]+_0x542395*_0x4416d4,_0x3cfcb3=timeToPosition(_0x2f6583,_0x1a3be8,_0x33d3ca),_0x2b8d7f=formatTimestamp(_0x2f6583,_0x2dc9b0);_0x13a3c5[_0x173a39(0x2b7)]({'pos':_0x3cfcb3,'text':_0x2b8d7f});}const _0xe95cb7=new Array(_0x33d3ca)[_0x173a39(0x17d)]('\x20');let _0xdf549c=-0x1;for(const {pos:_0x45431e,text:_0x47d589}of _0x13a3c5){let _0x58f93d=Math[_0x173a39(0x180)](0x0,_0x45431e-Math[_0x173a39(0x2f1)](_0x47d589['length']/0x2));_0x58f93d<=_0xdf549c+TIMELINE_CONFIG[_0x173a39(0x19c)]&&(_0x58f93d=_0xdf549c+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x58f93d+_0x47d589[_0x173a39(0x17c)]>_0x33d3ca&&(_0x58f93d=_0x33d3ca-_0x47d589[_0x173a39(0x17c)]);if(_0x58f93d>=0x0&&_0x58f93d+_0x47d589[_0x173a39(0x17c)]<=_0x33d3ca&&_0x58f93d>_0xdf549c){for(let _0x18bd78=0x0;_0x18bd78<_0x47d589[_0x173a39(0x17c)];_0x18bd78++){_0xe95cb7[_0x58f93d+_0x18bd78]=_0x47d589[_0x18bd78];}_0xdf549c=_0x58f93d+_0x47d589['length']-0x1;}}return _0xe95cb7[_0x173a39(0x303)]('');}function renderTaskRow(_0xbf8447,_0x38dd11,_0x1ed482,_0x6628da){const _0x2485c9=a55_0x29f4d0,{level:_0x2827c6,name:_0x23514f}=parseTaskName(_0xbf8447[_0x2485c9(0x172)]),_0x52f491='\x20'[_0x2485c9(0x22b)](_0x2827c6),_0x501795=_0xbf8447['window']?'('+formatElapsed(_0xbf8447[_0x2485c9(0x1b3)][_0x2485c9(0x188)])+')':'',_0x5a3e6a=stringWidth(_0x501795),_0x448f7f=_0x2827c6*0x1,_0x5b7954=_0x6628da-_0x448f7f-_0x5a3e6a-0x1,_0x20710a=truncateTaskName(_0x23514f,_0x5b7954),_0x4a8b85=_0x52f491+_0x20710a,_0x5e6e1b=stringWidth(_0x4a8b85),_0xae195d=_0x6628da-_0x5e6e1b-_0x5a3e6a,_0x4a45fb=_0x4a8b85+'\x20'['repeat'](Math[_0x2485c9(0x180)](0x1,_0xae195d))+a55_0x262d9e['dim'](_0x501795),_0x3fe67f=getTaskStateIcon(_0xbf8447['state']),_0x1341b1=new Array(_0x1ed482)[_0x2485c9(0x17d)]('\x20');if(_0xbf8447[_0x2485c9(0x1b3)]){const _0x5c25eb=timeToPosition(_0xbf8447['window']['start'],_0x38dd11,_0x1ed482),_0x3bb989=timeToPosition(_0xbf8447[_0x2485c9(0x1b3)][_0x2485c9(0x1cb)],_0x38dd11,_0x1ed482),_0x3e7808=getBarChar(_0xbf8447['state']),_0x115b16=Math[_0x2485c9(0x180)](_0x5c25eb+0x1,_0x3bb989);for(let _0x4e669b=_0x5c25eb;_0x4e669b<Math[_0x2485c9(0x231)](_0x115b16,_0x1ed482);_0x4e669b++){_0x1341b1[_0x4e669b]=_0x3e7808;}}const _0xe22132=getBarColor(_0xbf8447[_0x2485c9(0x2b1)]),_0x336c0c=_0x1341b1['map'](_0x325bd7=>_0x325bd7==='\x20'?'\x20':_0xe22132(_0x325bd7))[_0x2485c9(0x303)]('');return _0x3fe67f+'\x20'+_0x4a45fb+'│'+_0x336c0c+'│';}function calculateStats(_0x377161){const _0x319e2d=a55_0x29f4d0,_0x3ff4ac={'total':_0x377161['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x537132 of _0x377161){if(_0x537132[_0x319e2d(0x2b1)]===_0x319e2d(0x24c))_0x3ff4ac[_0x319e2d(0x24c)]++;else{if(_0x537132[_0x319e2d(0x2b1)]===_0x319e2d(0x2f5)||_0x537132[_0x319e2d(0x2b1)]===_0x319e2d(0x2c0))_0x3ff4ac[_0x319e2d(0x2f5)]++;else _0x537132[_0x319e2d(0x2b1)]===_0x319e2d(0x207)?_0x3ff4ac['running']++:_0x3ff4ac[_0x319e2d(0x2de)]++;}}return _0x3ff4ac;}function formatStats(_0x27ae54){const _0x29fa54=a55_0x29f4d0;return[_0x29fa54(0x1e7)+_0x27ae54['total'],'✅\x20'+_0x27ae54[_0x29fa54(0x24c)],'❌\x20'+_0x27ae54[_0x29fa54(0x2f5)],_0x29fa54(0x187)+_0x27ae54[_0x29fa54(0x207)],'⏳\x20'+_0x27ae54[_0x29fa54(0x2de)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]='workflow:timeline';['description']=a55_0x29f4d0(0x16a);async['execute'](_0x3fcd74){const _0x5da94e=a55_0x29f4d0,{options:_0x25c9e4,args:_0x8c3e2b,tdx:_0x103beb}=_0x3fcd74;let _0x19defb,_0x7dea0c,_0x3956b0=![];if(_0x8c3e2b[0x0]){if(_0x8c3e2b[0x0][_0x5da94e(0x208)]('.')){const _0x579599=this[_0x5da94e(0x19d)](_0x8c3e2b,_0x25c9e4);if(!_0x579599)return 0x1;_0x19defb=_0x579599[_0x5da94e(0x29a)],_0x7dea0c=_0x579599[_0x5da94e(0x288)];}else{_0x7dea0c=_0x8c3e2b[0x0],_0x19defb=_0x25c9e4[_0x5da94e(0x16c)];if(!_0x19defb)return console['error'](a55_0x262d9e[_0x5da94e(0x25b)](_0x5da94e(0x1df)),_0x5da94e(0x265)),0x1;_0x3956b0=!![];}}else{const _0x3d35b1=this[_0x5da94e(0x19d)](_0x8c3e2b,_0x25c9e4);if(!_0x3d35b1)return 0x1;_0x19defb=_0x3d35b1[_0x5da94e(0x29a)],_0x7dea0c=_0x3d35b1[_0x5da94e(0x288)];}if(_0x25c9e4[_0x5da94e(0x28d)]){if(_0x19defb&&_0x7dea0c)console['error'](_0x5da94e(0x1a2)+_0x19defb+'.'+_0x7dea0c);else _0x19defb&&console['error'](_0x5da94e(0x184)+_0x19defb);}const _0x337886=_0x25c9e4[_0x5da94e(0x169)],_0x5b21aa=_0x25c9e4[_0x5da94e(0x163)];if(_0x337886){_0x5b21aa&&console['error'](a55_0x262d9e[_0x5da94e(0x1ea)](_0x5da94e(0x22a)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x552c8f=_0x25c9e4[_0x5da94e(0x1fd)];return _0x552c8f?await this['pollTimeline'](_0x3fcd74,_0x337886):await this[_0x5da94e(0x1f7)](_0x3fcd74,_0x337886,_0x25c9e4),0x0;}if(_0x5b21aa){const _0x3b540c=await withSpinner(_0x5da94e(0x2ae),()=>_0x103beb[_0x5da94e(0x2ba)][_0x5da94e(0x2bc)]({'projectName':_0x19defb,'workflowName':_0x7dea0c,'limit':0x64}),{'verbose':_0x25c9e4[_0x5da94e(0x28d)]}),_0x427060=_0x3b540c['data'][_0x5da94e(0x15e)](_0x4876dd=>_0x4876dd['id']===_0x5b21aa);if(!_0x427060)return console[_0x5da94e(0x2f5)](a55_0x262d9e['red']('Error:'),_0x5da94e(0x2e2)+_0x5b21aa),0x1;if(!_0x427060[_0x5da94e(0x2fc)]?.['id'])return console[_0x5da94e(0x2f5)](a55_0x262d9e['red'](_0x5da94e(0x1df)),_0x5da94e(0x14f)+_0x5b21aa+_0x5da94e(0x290)),0x1;const _0x4e445e=_0x427060[_0x5da94e(0x2fc)]['id'];_0x25c9e4[_0x5da94e(0x28d)]&&console[_0x5da94e(0x2f5)](_0x5da94e(0x301)+_0x4e445e+_0x5da94e(0x1f9)+_0x5b21aa);const _0x17cd89=_0x25c9e4['follow'];return _0x17cd89?await this[_0x5da94e(0x1c2)](_0x3fcd74,_0x4e445e):await this['renderSingleTimeline'](_0x3fcd74,_0x4e445e,_0x25c9e4),0x0;}const _0x24db1a=await withSpinner(_0x5da94e(0x241),()=>_0x103beb[_0x5da94e(0x2ba)][_0x5da94e(0x2bc)]({'projectName':_0x19defb,'workflowName':_0x7dea0c,'limit':_0x25c9e4[_0x5da94e(0x2a8)]||0x32}),{'verbose':_0x25c9e4[_0x5da94e(0x28d)]}),_0x24e116=_0x24db1a[_0x5da94e(0x2a6)];if(_0x24e116[_0x5da94e(0x17c)]===0x0){if(_0x19defb&&_0x7dea0c)console[_0x5da94e(0x2f5)]('No\x20sessions\x20found\x20for:\x20'+_0x19defb+'.'+_0x7dea0c);else _0x19defb?console[_0x5da94e(0x2f5)](_0x5da94e(0x1bc)+_0x19defb):(console['error'](_0x5da94e(0x216)),console[_0x5da94e(0x2f5)](a55_0x262d9e[_0x5da94e(0x312)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x24e116['sort']((_0x35e8b0,_0x15d033)=>{const _0xe03937=_0x5da94e,_0x254f84=_0x35e8b0['sessionTime']||'',_0x13358a=_0x15d033[_0xe03937(0x21c)]||'';return _0x13358a[_0xe03937(0x2c8)](_0x254f84);});if(_0x25c9e4[_0x5da94e(0x29f)]||_0x25c9e4['jsonl'])return await handleSDKOutput(_0x24e116,_0x25c9e4),0x0;let _0x389b2a;if(_0x3956b0){const _0x27ec78=_0x24e116[0x0];if(!_0x27ec78[_0x5da94e(0x2fc)]?.['id'])return console[_0x5da94e(0x2f5)](_0x5da94e(0x250)),0x0;_0x389b2a=_0x27ec78['lastAttempt']['id'],_0x25c9e4[_0x5da94e(0x28d)]&&console[_0x5da94e(0x2f5)]('Auto-selected\x20latest\x20session:\x20'+_0x27ec78[_0x5da94e(0x21c)]);}else{const _0xc318fa=_0x24e116[_0x5da94e(0x27e)](_0xced263=>{const _0x69dbd7=_0x5da94e,_0x3ef92f=getAttemptStatusDisplay(_0xced263['lastAttempt']);return{'title':_0xced263[_0x69dbd7(0x1c8)]?.['name']+'.'+_0xced263['workflow']?.['name']+_0x69dbd7(0x1fe)+_0xced263[_0x69dbd7(0x21c)]+'\x20'+_0x3ef92f[_0x69dbd7(0x23f)],'value':_0xced263[_0x69dbd7(0x2fc)]?.['id']||'','description':_0x3ef92f[_0x69dbd7(0x2b4)]};}),_0x24c876=await a55_0x353259({'type':'select','name':_0x5da94e(0x169),'message':_0x5da94e(0x1f3),'choices':_0xc318fa[_0x5da94e(0x277)](_0x3c9c61=>_0x3c9c61[_0x5da94e(0x220)]!=='')});if(!_0x24c876[_0x5da94e(0x169)])return 0x0;_0x389b2a=_0x24c876[_0x5da94e(0x169)];}const _0x477dd9=_0x25c9e4[_0x5da94e(0x1fd)];return _0x477dd9?await this[_0x5da94e(0x1c2)](_0x3fcd74,_0x389b2a):await this[_0x5da94e(0x1f7)](_0x3fcd74,_0x389b2a,_0x25c9e4),0x0;}async[a55_0x29f4d0(0x1f7)](_0x598324,_0x5792b6,_0x1770f5){const _0x3adb9d=a55_0x29f4d0,{tdx:_0x1e93a4}=_0x598324;let _0x3545f3,_0x2c02a8;try{[_0x3545f3,_0x2c02a8]=await Promise[_0x3adb9d(0x294)]([_0x1e93a4[_0x3adb9d(0x2ba)][_0x3adb9d(0x291)](_0x5792b6),_0x1e93a4[_0x3adb9d(0x2ba)][_0x3adb9d(0x2fa)](_0x5792b6,![])]);}catch(_0x5810e7){console['error'](a55_0x262d9e['red'](_0x3adb9d(0x14b)));_0x1770f5['verbose']&&console[_0x3adb9d(0x2f5)](_0x5810e7);throw _0x5810e7;}if(_0x1770f5[_0x3adb9d(0x29f)]||_0x1770f5[_0x3adb9d(0x232)]){const _0x5cf127=this['buildTimelineData'](_0x3545f3,_0x2c02a8);await handleSDKOutput([_0x5cf127],_0x1770f5);return;}const _0x5c2bf9=_0x1e93a4['context']['site'],_0x311d79=this['renderTimeline'](_0x3545f3,_0x2c02a8,_0x5c2bf9);console[_0x3adb9d(0x2bd)](_0x311d79);}async[a55_0x29f4d0(0x1c2)](_0x26d49f,_0x1dafec){const _0x2b3825=a55_0x29f4d0,{tdx:_0x41bd5e}=_0x26d49f,_0xd6707e=TIMELINE_CONFIG[_0x2b3825(0x1f0)],_0x224d84=TIMELINE_CONFIG[_0x2b3825(0x1b5)];let _0x559c1d=0x0;while(_0x559c1d<_0x224d84){process['stdout'][_0x2b3825(0x2c5)]&&process[_0x2b3825(0x281)][_0x2b3825(0x21e)]('\x1bc');let _0x4a1a86,_0x559e09;try{[_0x4a1a86,_0x559e09]=await Promise[_0x2b3825(0x294)]([_0x41bd5e['workflow'][_0x2b3825(0x291)](_0x1dafec),_0x41bd5e[_0x2b3825(0x2ba)][_0x2b3825(0x2fa)](_0x1dafec,![])]);}catch(_0x5b9853){console['error'](a55_0x262d9e[_0x2b3825(0x25b)](_0x2b3825(0x21a)));_0x559c1d>0x0&&console['error'](a55_0x262d9e[_0x2b3825(0x312)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x559c1d));throw _0x5b9853;}const _0x34408e=_0x41bd5e[_0x2b3825(0x2a4)][_0x2b3825(0x313)],_0x31b1bd=this[_0x2b3825(0x146)](_0x4a1a86,_0x559e09,_0x34408e);console[_0x2b3825(0x2bd)](_0x31b1bd);const _0x655407=_0x4a1a86[_0x2b3825(0x195)]&&_0x559e09[_0x2b3825(0x224)](_0x3f66c9=>_0x3f66c9['state']!=='running'&&_0x3f66c9['state']!=='planned');if(_0x655407){console[_0x2b3825(0x2f5)](a55_0x262d9e['green']('\x0a✔\x20Attempt\x20complete'));break;}console[_0x2b3825(0x2f5)](a55_0x262d9e['dim'](_0x2b3825(0x151)+_0x559c1d*0x2+_0x2b3825(0x30e))),await new Promise(_0x507d2e=>setTimeout(_0x507d2e,_0xd6707e)),_0x559c1d++;}_0x559c1d>=_0x224d84&&console[_0x2b3825(0x2f5)](a55_0x262d9e[_0x2b3825(0x1ea)](_0x2b3825(0x24b)));}[a55_0x29f4d0(0x146)](_0xcce321,_0x35d368,_0x547efd){const _0x32b391=a55_0x29f4d0,_0xb584ed=[],_0xa988a2=TIMELINE_CONFIG[_0x32b391(0x314)],_0x1ddd5a=0x5,_0x3bfa13=process[_0x32b391(0x281)][_0x32b391(0x1e5)]||0x78,_0xcb3e76=_0x3bfa13-_0xa988a2-_0x1ddd5a,_0x551b44=Math[_0x32b391(0x180)](TIMELINE_CONFIG[_0x32b391(0x272)],Math[_0x32b391(0x231)](_0xcb3e76,TIMELINE_CONFIG[_0x32b391(0x2b8)])),_0x2cfbb2=new Date(_0xcce321[_0x32b391(0x2e8)])[_0x32b391(0x19b)](),_0x3c1d95=_0xcce321[_0x32b391(0x1d0)]?new Date(_0xcce321['finishedAt'])['getTime']():Date[_0x32b391(0x311)](),_0x16440a={'start':_0x2cfbb2,'end':_0x3c1d95,'duration':_0x3c1d95-_0x2cfbb2},_0x162ec8=new Map(),_0x142eee=[];for(const _0x28e7ec of _0x35d368){if(_0x28e7ec[_0x32b391(0x21d)]){const _0x13a8c6=new Date(_0x28e7ec[_0x32b391(0x21d)])['getTime'](),_0x1c79df=_0x28e7ec[_0x32b391(0x155)]?new Date(_0x28e7ec[_0x32b391(0x155)])[_0x32b391(0x19b)]():Date['now'](),_0x78bca5={'start':_0x13a8c6,'end':_0x1c79df,'duration':_0x1c79df-_0x13a8c6};_0x162ec8[_0x32b391(0x182)](_0x28e7ec['id'],_0x78bca5),_0x142eee[_0x32b391(0x2b7)]({'name':_0x28e7ec['fullName'],'state':_0x28e7ec['state']||'unknown','window':_0x78bca5});}else _0x142eee[_0x32b391(0x2b7)]({'name':_0x28e7ec[_0x32b391(0x27f)],'state':_0x28e7ec[_0x32b391(0x2b1)]||_0x32b391(0x1fc),'window':undefined});}_0x142eee[_0x32b391(0x242)]((_0xf8c196,_0x1c677e)=>{const _0x52efc4=_0x32b391;if(!_0xf8c196['window'])return 0x1;if(!_0x1c677e[_0x52efc4(0x1b3)])return-0x1;return _0xf8c196['window'][_0x52efc4(0x1cc)]-_0x1c677e[_0x52efc4(0x1b3)]['start'];});const _0x54be14=_0x142eee[_0x32b391(0x17c)],_0x3999aa=_0x54be14>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x3999aa&&_0x142eee['splice'](TIMELINE_CONFIG[_0x32b391(0x255)]);const _0x5385a1=calculateTimeScale(_0x16440a,_0x551b44),_0x1682de=_0xcce321[_0x32b391(0x195)]?_0xcce321[_0x32b391(0x24c)]?a55_0x262d9e[_0x32b391(0x26d)](_0x32b391(0x24c)):a55_0x262d9e['red'](_0x32b391(0x2f5)):a55_0x262d9e[_0x32b391(0x2ab)](_0x32b391(0x207)),_0x47a11b=_0xcce321['project']?.['id'],_0x54983b=_0xcce321[_0x32b391(0x163)];let _0x2718a2;if(_0x47a11b&&_0x54983b){const _0xcd22d5=getWorkflowAttemptUrl(_0x547efd,_0x47a11b,_0x54983b,_0xcce321['id']);_0x2718a2=hyperlink(a55_0x262d9e[_0x32b391(0x312)](_0xcce321['id']),_0xcd22d5);}else _0x2718a2=a55_0x262d9e[_0x32b391(0x312)](_0xcce321['id']);_0xb584ed[_0x32b391(0x2b7)](_0x32b391(0x1b2)+_0x2718a2+_0x32b391(0x1fe)+_0x1682de+_0x32b391(0x1fe)+formatElapsed(_0x16440a[_0x32b391(0x188)]));if(_0x142eee['length']>0x0){const _0x3bea94=renderTimeAxis(_0x5385a1,_0x551b44),_0x2d62e9=new Date(_0x16440a[_0x32b391(0x1cc)]),_0x47133b=formatDate(_0x2d62e9),_0x431e7b=TIMELINE_CONFIG[_0x32b391(0x2fe)]+TIMELINE_CONFIG[_0x32b391(0x1f2)]+_0xa988a2,_0x3d83ac=_0x47133b['padStart'](_0x431e7b),_0x193f8b=a55_0x262d9e[_0x32b391(0x312)](_0x3d83ac);_0xb584ed[_0x32b391(0x2b7)](_0x193f8b+'\x20'+_0x3bea94);for(const _0x54fd75 of _0x142eee){_0xb584ed['push'](renderTaskRow(_0x54fd75,_0x5385a1,_0x551b44,_0xa988a2));}const _0x4ae732=calculateStats(_0x142eee);_0xb584ed[_0x32b391(0x2b7)](formatStats(_0x4ae732)),_0x3999aa&&_0xb584ed['push'](a55_0x262d9e[_0x32b391(0x1ea)](_0x32b391(0x2db)+TIMELINE_CONFIG[_0x32b391(0x255)]+_0x32b391(0x173)+_0x54be14+'\x20tasks')),_0xb584ed['push'](''),_0xb584ed[_0x32b391(0x2b7)](a55_0x262d9e['dim']('💡\x20Tip:\x20Use\x20')+(_0x32b391(0x1db)+_0xcce321['id']+'\x20logs')+a55_0x262d9e['dim'](_0x32b391(0x286)));}else _0xb584ed['push']('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0xb584ed[_0x32b391(0x303)]('\x0a');}['buildTimelineData'](_0x2eab24,_0x4bb732){const _0x4fbf04=a55_0x29f4d0,_0x6055d6=new Date(_0x2eab24['createdAt'])['getTime'](),_0x246f1b=_0x2eab24[_0x4fbf04(0x1d0)]?new Date(_0x2eab24[_0x4fbf04(0x1d0)])[_0x4fbf04(0x19b)]():Date[_0x4fbf04(0x311)](),_0x40e3a1=_0x246f1b-_0x6055d6,_0x38d966=[];for(const _0x1daa92 of _0x4bb732){if(_0x1daa92[_0x4fbf04(0x21d)]){const _0x460976=new Date(_0x1daa92[_0x4fbf04(0x21d)])[_0x4fbf04(0x19b)](),_0x6a2c52=_0x1daa92[_0x4fbf04(0x155)]?new Date(_0x1daa92[_0x4fbf04(0x155)])[_0x4fbf04(0x19b)]():Date['now']();_0x38d966[_0x4fbf04(0x2b7)]({'name':_0x1daa92[_0x4fbf04(0x27f)],'state':_0x1daa92[_0x4fbf04(0x2b1)]||'unknown','window':{'start':_0x460976,'end':_0x6a2c52,'duration':_0x6a2c52-_0x460976}});}else _0x38d966['push']({'name':_0x1daa92[_0x4fbf04(0x27f)],'state':_0x1daa92[_0x4fbf04(0x2b1)]||_0x4fbf04(0x1fc),'window':undefined});}const _0x244a46=calculateStats(_0x38d966);return{'attempt':{'id':_0x2eab24['id'],'status':_0x2eab24[_0x4fbf04(0x195)]?_0x2eab24[_0x4fbf04(0x24c)]?'success':_0x4fbf04(0x2f5):'running','createdAt':_0x2eab24[_0x4fbf04(0x2e8)],'finishedAt':_0x2eab24[_0x4fbf04(0x1d0)],'duration_ms':_0x40e3a1},'tasks':_0x38d966[_0x4fbf04(0x27e)](_0x26e77f=>({'name':_0x26e77f['name'],'state':_0x26e77f[_0x4fbf04(0x2b1)],'startedAt':_0x26e77f[_0x4fbf04(0x1b3)]?new Date(_0x26e77f['window'][_0x4fbf04(0x1cc)])[_0x4fbf04(0x253)]():null,'updatedAt':_0x26e77f[_0x4fbf04(0x1b3)]?new Date(_0x26e77f['window'][_0x4fbf04(0x1cb)])[_0x4fbf04(0x253)]():null,'duration_ms':_0x26e77f['window']?.[_0x4fbf04(0x188)]||null})),'stats':_0x244a46};}}function formatScheduleLine(_0x374461){const _0x133610=a55_0x29f4d0,_0xc519ef=_0x374461['disabledAt']?a55_0x262d9e[_0x133610(0x1ea)]('\x20(disabled)'):'',_0x1ca8cc=_0x374461[_0x133610(0x1c8)]?.[_0x133610(0x172)]?a55_0x262d9e[_0x133610(0x312)]('\x20['+_0x374461[_0x133610(0x1c8)][_0x133610(0x172)]+']'):'',_0x49ceb2=_0x374461[_0x133610(0x1d5)]?a55_0x262d9e['dim'](_0x133610(0x270)+new Date(_0x374461[_0x133610(0x1d5)])[_0x133610(0x2a9)]()):'';return _0x133610(0x1b4)+_0x374461['id']+'\x20'+(_0x374461[_0x133610(0x2ba)]?.['name']||_0x133610(0x19a))+_0x1ca8cc+_0xc519ef+_0x49ceb2;}function a55_0x2684(){const _0x5ba311=['\x20\x20Next\x20run:\x20','From\x20task:\x20','getMonth','finishedAt','newProjectId','sourceProjectName','workflow:upload','New\x20project\x20name:\x20','nextRunTime','\x22\x20to\x20new\x20project\x20\x22','diff','summary','Project\x20directory:\x20','\x20enabled\x20(','tdx\x20wf\x20attempt\x20','Files\x20to\x20upload:\x20','task','Setting\x20','Error:','List\x20workflows','Usage:\x20tdx\x20wf\x20use\x20<project>','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','unchanged','Listing\x20schedules\x20for\x20','columns','\x20\x20Project:\x20','Total:\x20','Cancelled','No\x20workflow\x20tdx.json\x20found','yellow','resolveProjectDir','\x20\x20tdx\x20wf\x20use\x20<project>','Status:\x20','projectId','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','POLL_INTERVAL_MS','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','ICON_SPACING','Select\x20a\x20session\x20to\x20view\x20timeline:','config','Parameters:\x20','Error:\x20','renderSingleTimeline','getHours','\x20from\x20session\x20','No\x20sessions\x20found\x20for:\x20','✔\x20Secret\x20\x27','planned','follow','\x20-\x20','sys','workflow:schedule:disable','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','yes','includeRetried','index','startsWith','Start\x20a\x20workflow\x20run','running','includes','session','\x0aPush\x20these\x20changes?','Project\x20name\x20is\x20required','executePushProject','No\x20workflow\x20projects\x20found','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','\x1b[1A\x1b[2K','execute','✔\x20Push\x20complete','clear','Retrying\x20attempt...','requireProject','No\x20workflow\x20sessions\x20found','session_id','\x20\x20New\x20attempt\x20ID:\x20','\x22\x20already\x20exists\x20(ID:\x20','\x0aFailed\x20to\x20fetch\x20attempt\x20data','session:','sessionTime','startedAt','write','✔\x20Workflow\x20project\x20context\x20cleared.','value','rows','round','\x0aDry\x20run\x20-\x20no\x20files\x20written','every','key','Reason:\x20','sourceDir','✔\x20Schedule\x20#','\x0aDry\x20run\x20-\x20nothing\x20pushed','Warning:','repeat','revision','projects','Error:\x20Attempt\x20ID\x20is\x20required','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','tdx.json','min','jsonl','output','No\x20sessions\x20found','resolveProject','stringify','No\x20attempts\x20found','Pushing\x20project...','Setting\x20secret...','...','disableSchedule','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','/app/workflows/','get','icon','bold','Loading\x20sessions...','sort','workflow:kill','Task\x20name:\x20','\x20sessions\x20','Select\x20a\x20task\x20to\x20view\x20logs:','Schedule\x20ID\x20is\x20required','split','newProjectName','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','success','\x20deleted','\x0aUpdate\x20existing\x20project\x20\x22','workflow:workflows','Latest\x20session\x20has\x20no\x20attempt','\x20secrets...','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','toISOString','workflows','MAX_TASKS_DISPLAY','taskName','Retrying\x20session...','\x20modified','dryRun','Source:\x20','red','Retry\x20a\x20session\x20or\x20attempt','\x0aError:','download','hasChanges','parse','410055oPNjGi','Error:\x20Secret\x20key\x20is\x20required','✔\x20Workflow\x20run\x20started','Workflow:\x20','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','4053228khyfRs','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','\x20is\x20not\x20a\x20directory','retryAttemptName','Source\x20project:\x20','Dry\x20run:\x20yes','green','\x0aDry\x20run\x20-\x20no\x20project\x20created','Getting\x20attempt\x20tasks...','\x20next:\x20','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','MIN_TIMELINE_WIDTH','basename','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Key:\x20','has','filter','workflow:logs','Disabling\x20schedule\x20#','fromTask','Resume\x20from:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','9TcFwYD','map','fullName','LABEL_WIDTH_DIVISOR','stdout','startTime','msPerChar','464299QzNmXu','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','\x20to\x20see\x20detailed\x20logs','MIN_LABEL_COUNT','workflowName','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Expected\x20format:\x20--param\x20key=value','\x20secret','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','verbose','60Dqxagr','executeCloneProject','\x20has\x20no\x20attempts','attempt','\x20\x20Project\x20ID:\x20','targetDir','all','cyan','table','workflow:secrets:delete','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','projectName','Pushing\x20workflow\x20project...','workflow:schedule:enable','some','Project\x20name:\x20','json','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20\x20Revision:\x20','workflow:pull','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','context','Validation:\x20skipped','data','✔\x20Project:\x20','limit','toLocaleString','\x20\x20Session\x20ID:\x20','blue','size','getDate','Loading\x20session...','attempt:','Listing\x20workflow\x20projects...','state','getSchedule','GUTTER','text','✔\x20Workflow\x20project\x20set\x20to:\x20','renderSessionsTimeline','push','MAX_TIMELINE_WIDTH','title','workflow','filesExtracted','sessions','log','includeSubtasks','canceling','group_error','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','relative','\x20task','values','isTTY','No\x20log\x20content\x20found','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','localeCompare','\x20(system)','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','listSchedules','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','substring','Source\x20directory:\x20','✔\x20Schedule\x20found','workflow:download','Downloading\x20logs...','\x0aClone\x20\x22','\x20\x20Console:\x20','✔\x20Downloaded\x20','Analyzing\x20changes...','✔\x20Project\x20updated','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','/sessions/','replace','\x20(use\x20--limit\x20to\x20show\x20more)','⚠\x20Showing\x20first\x20','.\x20Expected\x20format:\x20KEY=VALUE','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','pending','List\x20workflow\x20attempts','List\x20all\x20workflow\x20projects','format','Session\x20not\x20found:\x20','select','No\x20attempts\x20found\x20in\x20project:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','No\x20schedules\x20found','Revision:\x20','createdAt','\x20new','1432FsARjX','Listing\x20workflows...','match','Error:\x20Invalid\x20parameter\x20format:\x20','82778zlGeVV','trimEnd','8502228TWfyLR','floor','changes','readFile','logs','error','autocomplete','slice','📁\x20','padStart','tasks','Tip:\x20cd\x20to\x20workflows/','lastAttempt','Listing\x20schedules...','ICON_WIDTH','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','resolveProjectId','Using\x20attempt\x20','skipSchedule','join','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','\x0aApply\x20these\x20changes?','Target:\x20','status','list','Listing\x20workflow\x20sessions...','Fetching\x20workflow\x20','Starting\x20workflow\x20run...','✔\x20Clone\x20complete','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Enabling\x20schedule\x20#','workflow:secrets:list','now','dim','site','TASK_NAME_WIDTH','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','(use\x20--limit\x20to\x20see\x20more)','✔\x20Deleted\x20project\x20','✔\x20Pushed\x20','Pulling\x20project\x20','navigateSessionsInteractive','\x20schedule','nextTime','45983nEprTA','No\x20workflows\x20found','toLowerCase','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','Getting\x20attempt\x20details...','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','renderTimeline','Workflow:','No\x20projects\x20match\x20pattern:\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Params:\x20','Failed\x20to\x20fetch\x20attempt\x20data','Error:\x20Project\x20name\x20is\x20required','workflow:schedules','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','Session\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x0aPolling...\x20(','No\x20matching\x20sessions\x20found','Session\x20time:\x20','\x0a✔\x20No\x20changes\x20to\x20push','updatedAt','\x0a✔\x20Already\x20up\x20to\x20date','27321330oGwQWN','workflow:use','Including\x20subtasks:\x20yes','isNewProject','delete','workflow:run','cancelRequested','find','deleted','\x20\x20Session\x20context\x20set\x20to:\x20','Enable\x20a\x20workflow\x20schedule','generateSessionTimelineRows','sessionId','\x20\x20Changes:\x20','existingProjectId','MAX_LABEL_COUNT','prepareCloneProject','workflow:projects','attemptId','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','📋\x20','workflowProject','unknown','Listing\x20workflow\x20attempts...','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','workflow:delete','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','name','\x20of\x20','Invalid\x20format:\x20','List\x20workflow\x20execution\x20sessions','No\x20workflows\x20found\x20in\x20project:\x20','-\x20no\x20files\x20written','attempts','applyPullProject','new','\x0a⚠\x20Project\x20\x22','length','fill','resolve','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','max','isArray','set','\x20\x20Target:\x20','Filter:\x20project=','Cloning\x20to\x20','keys','🔄\x20','duration','modified','utf-8','✔\x20Found\x20','\x20unchanged','\x20disabled\x20(','\x20session','getMinutes','Source\x20directory\x20is\x20required','Project\x20filter:\x20','white','Force:\x20yes','from','done','stat','skipValidation','\x20\x20Attempt\x20ID:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','(unknown)','getTime','LABEL_MIN_SPACING','parseProjectWorkflowPattern','Pattern:\x20','params','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20\x20Workflow:\x20','Filter:\x20','type','indexOf','targetExists','\x20secrets\x20set\x20for\x20project\x20\x27','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Listing\x20secrets...','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','resumeFrom','workflow:attempts','param','getFullYear','workflow:sessions','Resolving\x20project\x20\x27','✔\x20Showing\x20','listProjectSchedules','Attempt:\x20','window','📅\x20#','MAX_POLL_ITERATIONS','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','enableSchedule','durationMs','\x20\x20Source:\x20','Project:\x20','description','No\x20sessions\x20found\x20in\x20project:\x20','Fetching\x20log\x20files...','\x22\x20with\x20new\x20revision?','listSecrets','Target\x20directory:\x20','\x20workflow','pollTimeline','preparePushProject','cwd','Attempt\x20ID:\x20','showWorkflowConsoleUrl','→\x20Project:\x20','project','\x20\x20Location:\x20','Task\x20graph:','end','start'];a55_0x2684=function(){return _0x5ba311;};return a55_0x2684();}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x14d);[a55_0x29f4d0(0x1bb)]='List\x20workflow\x20schedules';async[a55_0x29f4d0(0x211)](_0xaf3d93){const _0x1bc6e7=a55_0x29f4d0,{options:_0x30e395,args:_0x3009f7,tdx:_0xcd3561}=_0xaf3d93,{scheduleId:_0xe568f9}=_0x30e395;if(_0xe568f9&&_0x3009f7[0x0])return console[_0x1bc6e7(0x2f5)](a55_0x262d9e['red'](_0x1bc6e7(0x1df)),_0x1bc6e7(0x271)),console[_0x1bc6e7(0x2f5)](a55_0x262d9e['dim']('Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>')),0x1;if(_0xe568f9){const _0x4022f3=await withSpinner('Fetching\x20schedule\x20#'+_0xe568f9+'...',()=>_0xcd3561['workflow'][_0x1bc6e7(0x2b2)](_0xe568f9),{'verbose':_0x30e395[_0x1bc6e7(0x28d)]}),_0x3aedac=_0x4022f3[_0x1bc6e7(0x2a6)];return isStructuredFormat(_0x30e395)?await handleSingleObjectOutput(_0x3aedac,_0x30e395):(console['error'](_0x1bc6e7(0x2cf)),console[_0x1bc6e7(0x2bd)](formatScheduleLine(_0x3aedac))),0x0;}const _0x2b1de8=this[_0x1bc6e7(0x19d)](_0x3009f7,_0x30e395);if(!_0x2b1de8)return 0x1;const {projectName:_0x52566b,workflowName:_0x168319}=_0x2b1de8,_0x536c3f=_0x52566b?'\x27'+_0x52566b+(_0x168319?'.'+_0x168319:'')+'\x27':undefined,_0x42000b=await withSpinner(_0x536c3f?_0x1bc6e7(0x1e4)+_0x536c3f+_0x1bc6e7(0x23a):_0x1bc6e7(0x2fd),()=>_0x52566b?_0xcd3561[_0x1bc6e7(0x2ba)][_0x1bc6e7(0x1b1)](_0x52566b,{'workflow':_0x168319,'limit':_0x30e395['limit']}):_0xcd3561[_0x1bc6e7(0x2ba)][_0x1bc6e7(0x2cb)]({'limit':_0x30e395[_0x1bc6e7(0x2a8)]}),{'verbose':_0x30e395[_0x1bc6e7(0x28d)]}),_0x4c4444=_0x42000b[_0x1bc6e7(0x2a6)],_0x362cc0=_0x30e395[_0x1bc6e7(0x2a8)]&&_0x4c4444[_0x1bc6e7(0x17c)]>=_0x30e395[_0x1bc6e7(0x2a8)]?a55_0x262d9e[_0x1bc6e7(0x312)](_0x1bc6e7(0x14e)):'';console[_0x1bc6e7(0x2f5)](_0x1bc6e7(0x18b)+_0x4c4444[_0x1bc6e7(0x17c)]+_0x1bc6e7(0x31b)+(_0x4c4444['length']!==0x1?'s':'')+_0x362cc0);if(isStructuredFormat(_0x30e395))await handleSDKOutput(_0x4c4444,_0x30e395);else{if(_0x4c4444['length']===0x0)console['log'](_0x1bc6e7(0x2e6));else for(const _0x3375fd of _0x4c4444){console['log'](formatScheduleLine(_0x3375fd));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x29c);['description']=a55_0x29f4d0(0x161);async[a55_0x29f4d0(0x211)](_0x395ffa){const _0x46c7d8=a55_0x29f4d0,{options:_0x605215,args:_0x4f578e,tdx:_0x2a080f}=_0x395ffa,_0x94130a=_0x4f578e[0x0];if(!_0x94130a)return console['error'](a55_0x262d9e[_0x46c7d8(0x25b)]('Error:'),_0x46c7d8(0x247)),console['error'](a55_0x262d9e[_0x46c7d8(0x312)](_0x46c7d8(0x143))),console[_0x46c7d8(0x2f5)](a55_0x262d9e[_0x46c7d8(0x312)](_0x46c7d8(0x30d))),0x1;const {backfill:_0x34e67c,nextTime:_0x4c2e4a}=_0x605215,_0x4a9e5a={};if(_0x34e67c!==undefined)_0x4a9e5a[_0x46c7d8(0x302)]=!_0x34e67c;if(_0x4c2e4a!==undefined)_0x4a9e5a[_0x46c7d8(0x31c)]=_0x4c2e4a;const _0x580770=await withSpinner(_0x46c7d8(0x30f)+_0x94130a+_0x46c7d8(0x23a),()=>_0x2a080f[_0x46c7d8(0x2ba)][_0x46c7d8(0x1b7)](_0x94130a,_0x4a9e5a),{'verbose':_0x605215[_0x46c7d8(0x28d)]}),_0x34af1b=_0x580770[_0x46c7d8(0x2a6)];return isStructuredFormat(_0x605215)?await handleSingleObjectOutput(_0x34af1b,_0x605215):(console['log'](_0x46c7d8(0x228)+_0x94130a+_0x46c7d8(0x1da)+(_0x34af1b[_0x46c7d8(0x2ba)]?.[_0x46c7d8(0x172)]||'unknown')+')'),_0x34af1b[_0x46c7d8(0x1d5)]&&console[_0x46c7d8(0x2bd)](a55_0x262d9e[_0x46c7d8(0x312)](_0x46c7d8(0x1cd)+new Date(_0x34af1b[_0x46c7d8(0x1d5)])[_0x46c7d8(0x2a9)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a55_0x29f4d0(0x172)]=a55_0x29f4d0(0x200);['description']='Disable\x20a\x20workflow\x20schedule';async[a55_0x29f4d0(0x211)](_0x27887d){const _0x2bb796=a55_0x29f4d0,{options:_0x538633,args:_0x55539b,tdx:_0x212cdf}=_0x27887d,_0x3ab506=_0x55539b[0x0];if(!_0x3ab506)return console[_0x2bb796(0x2f5)](a55_0x262d9e['red']('Error:'),_0x2bb796(0x247)),console['error'](a55_0x262d9e[_0x2bb796(0x312)](_0x2bb796(0x268))),console[_0x2bb796(0x2f5)](a55_0x262d9e[_0x2bb796(0x312)](_0x2bb796(0x30d))),0x1;const _0x333f2f=await withSpinner(_0x2bb796(0x279)+_0x3ab506+'...',()=>_0x212cdf[_0x2bb796(0x2ba)][_0x2bb796(0x23b)](_0x3ab506),{'verbose':_0x538633['verbose']}),_0xc971eb=_0x333f2f['data'];return isStructuredFormat(_0x538633)?await handleSingleObjectOutput(_0xc971eb,_0x538633):console[_0x2bb796(0x2bd)](_0x2bb796(0x228)+_0x3ab506+_0x2bb796(0x18d)+(_0xc971eb['workflow']?.[_0x2bb796(0x172)]||_0x2bb796(0x16d))+')'),0x0;}}
1
+ const a55_0x5029cc=a55_0x5cbb;(function(_0x50a2b9,_0x5b0b85){const _0x2b57cf=a55_0x5cbb,_0x4c6662=_0x50a2b9();while(!![]){try{const _0x5822ae=-parseInt(_0x2b57cf(0xcf))/0x1+-parseInt(_0x2b57cf(0x1f7))/0x2*(parseInt(_0x2b57cf(0x182))/0x3)+parseInt(_0x2b57cf(0x21c))/0x4+parseInt(_0x2b57cf(0x265))/0x5+parseInt(_0x2b57cf(0x143))/0x6+-parseInt(_0x2b57cf(0x131))/0x7*(parseInt(_0x2b57cf(0x22d))/0x8)+parseInt(_0x2b57cf(0xa5))/0x9;if(_0x5822ae===_0x5b0b85)break;else _0x4c6662['push'](_0x4c6662['shift']());}catch(_0x232a1b){_0x4c6662['push'](_0x4c6662['shift']());}}}(a55_0x4d42,0x4d280));import a55_0x47a174 from'chalk';import{existsSync}from'fs';import a55_0x4d0954 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import{parseTaskGraph,formatTaskGraph,summarizeTaskGraph,formatWarningSummary}from'../sdk/workflow/task-graph.js';import a55_0x110a93 from'prompts';function getAttemptStatusDisplay(_0x4bf490){const _0x537d00=a55_0x5cbb;if(!_0x4bf490)return{'icon':'⏳','text':''};const {done:_0x4d234f,success:_0x56deb8,cancelRequested:_0x4263a8}=_0x4bf490;if(!_0x4d234f)return _0x4263a8?{'icon':'🛑','text':a55_0x47a174[_0x537d00(0x175)](_0x537d00(0x185))}:{'icon':'🔄','text':a55_0x47a174[_0x537d00(0x117)](_0x537d00(0x97))};if(_0x56deb8)return{'icon':'✅','text':a55_0x47a174[_0x537d00(0x1de)](_0x537d00(0x1ca))};return{'icon':'❌','text':a55_0x47a174[_0x537d00(0x25a)](_0x537d00(0x19c))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x29696e,_0x1ea2d2,_0xa02e17=0x0){const _0x1466a3=a55_0x5cbb;return _0x29696e[_0xa02e17]||_0x1ea2d2[_0x1466a3(0x149)];}[a55_0x5029cc(0x1e3)](_0x4a351f,_0x427b80,_0xc2c97e=0x0){const _0x325b58=a55_0x5029cc,_0x5ade24=this[_0x325b58(0xd7)](_0x4a351f,_0x427b80,_0xc2c97e);if(!_0x5ade24)return console[_0x325b58(0x19c)](a55_0x47a174['red']('Error:'),_0x325b58(0xfa)),console['error'](a55_0x47a174['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x5ade24;}[a55_0x5029cc(0x1e1)](_0x3281d4,_0x2a5c73){const _0x4360fc=a55_0x5029cc;if(_0x3281d4[0x0]){const _0x54473d=_0x3281d4[0x0][_0x4360fc(0x12e)]('.');if(_0x54473d[_0x4360fc(0x1d7)]===0x1)return{'projectName':_0x54473d[0x0],'workflowName':undefined};else return _0x54473d[_0x4360fc(0x1d7)]===0x2?{'projectName':_0x54473d[0x0],'workflowName':_0x54473d[0x1]}:(console[_0x4360fc(0x19c)](a55_0x47a174[_0x4360fc(0x25a)](_0x4360fc(0x25b)),_0x4360fc(0x181)),null);}return{'projectName':_0x2a5c73[_0x4360fc(0x149)],'workflowName':undefined};}[a55_0x5029cc(0x13e)](_0x2c6bc3,_0x37ac53,_0xefcafc=0x0){const _0x33fe2f=a55_0x5029cc;if(_0x2c6bc3[_0xefcafc])return _0x2c6bc3[_0xefcafc];if(_0x37ac53[_0x33fe2f(0x149)]){const _0x3bf7f2=a55_0x4d0954[_0x33fe2f(0x1a6)](process[_0x33fe2f(0x20b)](),_0x33fe2f(0x204),_0x37ac53[_0x33fe2f(0x149)]);if(existsSync(a55_0x4d0954[_0x33fe2f(0x1a6)](_0x3bf7f2,_0x33fe2f(0xa7))))return _0x3bf7f2;}return undefined;}async[a55_0x5029cc(0xd3)](_0x1b31a5,_0x23931f,_0x1168ad){const _0x2aedbb=a55_0x5029cc;try{const _0x44f023=await _0x1b31a5[_0x2aedbb(0x1f9)][_0x2aedbb(0x204)](_0x23931f,{'limit':0x1});if(_0x44f023['length']>0x0){const _0x3310ea=_0x44f023[0x0]['id'],_0x72b4b3=getWorkflowUrl(_0x1168ad,_0x3310ea);console[_0x2aedbb(0x19c)](_0x2aedbb(0x1fb)+a55_0x47a174['cyan'](_0x72b4b3));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a55_0x5029cc(0x1c3);['description']='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async[a55_0x5029cc(0x196)](_0x2339a3){const _0x5a16f6=a55_0x5029cc,{options:_0x17aa7a,args:_0xd44a66,tdx:_0x1d6057}=_0x2339a3,_0x1c5c15=_0xd44a66[0x0],_0x1885df=_0x17aa7a[_0x5a16f6(0x189)];if(_0x1885df)return saveSessionContext({'workflow_project':undefined},_0x17aa7a[_0x5a16f6(0x1a2)]),console[_0x5a16f6(0x241)](a55_0x47a174[_0x5a16f6(0x1de)](_0x5a16f6(0x128))),0x0;if(!_0x1c5c15)return console['error'](a55_0x47a174['red'](_0x5a16f6(0x25b)),_0x5a16f6(0xfa)),console['error'](a55_0x47a174['dim'](_0x5a16f6(0x191))),console[_0x5a16f6(0x19c)](a55_0x47a174[_0x5a16f6(0x225)](_0x5a16f6(0x247))),0x1;const _0x33d826=await withSpinner(_0x5a16f6(0xe3)+_0x1c5c15+_0x5a16f6(0xf3),()=>_0x1d6057[_0x5a16f6(0x1f9)][_0x5a16f6(0x203)](_0x1c5c15),{'verbose':_0x17aa7a[_0x5a16f6(0x1af)]}),{name:_0x1e38a5}=_0x33d826[_0x5a16f6(0x1a8)];return saveSessionContext({'workflow_project':_0x1e38a5},_0x17aa7a[_0x5a16f6(0x1a2)]),console[_0x5a16f6(0x241)](a55_0x47a174[_0x5a16f6(0x1de)](_0x5a16f6(0x18d)+a55_0x47a174[_0x5a16f6(0x138)](_0x1e38a5))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x222);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x25c);async['execute'](_0x3fd2ca){const _0x4e6b28=a55_0x5029cc,{options:_0x5afb1b,args:_0x50ebc2,tdx:_0x5086a9}=_0x3fd2ca,_0x4a5827=_0x50ebc2[0x0];_0x5afb1b[_0x4e6b28(0x1af)]&&_0x4a5827&&console[_0x4e6b28(0x19c)](_0x4e6b28(0x142)+_0x4a5827);const _0x1e9ce0=await withSpinner(_0x4e6b28(0xbc),()=>_0x5086a9[_0x4e6b28(0x1f9)][_0x4e6b28(0xb9)](_0x4a5827,{'limit':_0x5afb1b[_0x4e6b28(0x1ec)]}),{'verbose':_0x5afb1b[_0x4e6b28(0x1af)]});let _0x334d80=_0x1e9ce0['data'];_0x334d80[_0x4e6b28(0xba)]((_0x69255c,_0x138c4c)=>_0x69255c['name'][_0x4e6b28(0xa8)](_0x138c4c[_0x4e6b28(0x260)]));const _0x53df40=_0x5afb1b[_0x4e6b28(0x1ec)]&&_0x334d80[_0x4e6b28(0x1d7)]>=_0x5afb1b[_0x4e6b28(0x1ec)]?a55_0x47a174[_0x4e6b28(0x225)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x4e6b28(0x19c)](_0x4e6b28(0xd4)+_0x334d80[_0x4e6b28(0x1d7)]+'\x20project'+(_0x334d80[_0x4e6b28(0x1d7)]!==0x1?'s':'')+_0x53df40);if(_0x5afb1b[_0x4e6b28(0xd1)]===_0x4e6b28(0xce)||_0x5afb1b[_0x4e6b28(0xd1)]===_0x4e6b28(0xf9)||_0x5afb1b[_0x4e6b28(0xd1)]==='table')await handleSDKOutput(_0x334d80,_0x5afb1b);else{if(_0x334d80[_0x4e6b28(0x1d7)]===0x0)_0x4a5827?console[_0x4e6b28(0x241)](_0x4e6b28(0xe1)+_0x4a5827):console['log'](_0x4e6b28(0x232));else{const _0x44b855=_0x334d80[_0x4e6b28(0x14d)](_0x2d9df6=>{const _0x97d7e3=_0x4e6b28,_0x963bc=_0x2d9df6[_0x97d7e3(0xcc)]?.[_0x97d7e3(0x22e)](_0x1b1641=>_0x1b1641[_0x97d7e3(0x114)]===_0x97d7e3(0x1ea)),_0x3fea7a=_0x963bc?a55_0x47a174[_0x97d7e3(0x225)](_0x97d7e3(0x19b)):'';return _0x97d7e3(0x254)+_0x2d9df6[_0x97d7e3(0x260)]+_0x3fea7a;});await writeOutput(_0x44b855[_0x4e6b28(0x1a6)]('\x0a'),_0x5afb1b[_0x4e6b28(0x1e7)],_0x4e6b28(0x210));}}return 0x0;}}function a55_0x4d42(){const _0x25b87f=['\x20(disabled)','Usage:\x20tdx\x20wf\x20use\x20<project>','sourceProjectName','No\x20sessions\x20with\x20timing\x20information','resolve','\x20\x20Next\x20run:\x20','execute','📋\x20','stringify','✔\x20Showing\x20','Invalid\x20format:\x20','\x20(system)','error','Params:\x20','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Status:\x20','\x20logs','session','follow','Disabling\x20schedule\x20#','\x20has\x20no\x20attempts','join','changes','data','all','LABEL_WIDTH_DIVISOR','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','sourceDir','indexOf','\x20\x20Session\x20context\x20set\x20to:\x20','verbose','slice','white','Cloning\x20to\x20','Total:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','ICON_WIDTH','attempts','unchanged','Writing\x20files...','workflow:run','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','existingProjectId','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','projectName','targetDir','padStart','project','from','workflow:use','No\x20sessions\x20found','\x20disabled\x20(','workflow:attempts','splice','No\x20sessions\x20found\x20in\x20project:\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','success','Killing\x20attempt...','Task\x20graph:','\x20\x20Project\x20ID:\x20','No\x20schedules\x20found','resumeFrom','preparePushProject','MAX_TASKS_DISPLAY','\x20tasks','✔\x20Workflow\x20run\x20started','Retrying\x20session...','getHours','\x20task','length','Parameters:','Schedule\x20ID\x20is\x20required','unknown','Deleting\x20project\x20','getSchedule','params','green','find','targetExists','parseProjectWorkflowPattern','renderTimeline','requireProject','\x20secret','MAX_LABEL_COUNT','getWorkflow','output','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','sys','trimEnd','limit','workflow:attempt','description','No\x20attempts\x20found\x20in\x20project:\x20','Workflow:','Force:\x20yes','\x0aFailed\x20to\x20fetch\x20attempt\x20data','\x20modified','hasChanges','Listing\x20workflow\x20attempts...','workflow:secrets:list','250qetTFX','finishedAt','workflow','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','\x20\x20Console:\x20','From\x20task:\x20','Fetching\x20schedule\x20#','relative','\x0aError:','✔\x20Pushed\x20','projectId','✔\x20Pull\x20complete','resolveProjectId','workflows','Getting\x20attempt\x20tasks...','message','retryAttemptName','workflow:secrets:delete','Workflow:\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','cwd','Fetching\x20log\x20files...','table','workflow:pull','.\x20Expected\x20format:\x20KEY=VALUE','list','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','icon','No\x20sessions\x20found\x20for:\x20','modified','\x20\x20Location:\x20','\x20\x20New\x20attempt\x20ID:\x20','context','Key:\x20','Select\x20a\x20task\x20to\x20view\x20logs:','duration','✔\x20Downloaded\x20','1207952yyNvmr','workflow:schedule:disable','session:','nextRunTime','workflow:kill','push','workflow:projects','displayLine','autocomplete','dim','min','⚠\x20Showing\x20first\x20','Validation:\x20skipped','List\x20workflows','Auto-selected\x20latest\x20session:\x20','\x20unchanged','getTime','744WbQkZj','some','replace','\x20sessions\x20','planned','No\x20workflow\x20projects\x20found','/sessions/','...','select','Error:\x20Attempt\x20ID\x20is\x20required','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','Session\x20time:\x20','📅\x20#','Target\x20directory:\x20','Error:\x20','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','index','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','fileCount','/app/workflows/','log','enableSchedule','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','No\x20workflow\x20sessions\x20found','getMonth','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Using\x20attempt\x20','revision:\x20','task','Project:\x20','session_id','Pull\x20workflow\x20project\x20to\x20local\x20folder','---\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','fullName','\x20\x20Session\x20ID:\x20','\x20workflow','\x0aDry\x20run\x20-\x20nothing\x20pushed','📁\x20','startTime','Include\x20retried:\x20yes','stat','✔\x20Push\x20complete','attemptId','red','Error:','List\x20all\x20workflow\x20projects','fileSize','Source\x20directory\x20is\x20required','executeDryRun','name','size','yes','ICON_SPACING','\x20(use\x20--limit\x20to\x20show\x20more)','1136705iwWdbq','Disable\x20a\x20workflow\x20schedule','\x20attempt','\x20\x20Files\x20extracted:\x20','\x20\x20Revision:\x20','🔄\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','List\x20workflow\x20attempts','retryAttempt','revision','isNewProject','kill','Failed\x20to\x20fetch\x20attempt\x20data','LABEL_MIN_SPACING','basename','Pushing\x20workflow\x20project...','✔\x20Schedule\x20found','Source\x20directory:\x20','status','\x20of\x20','\x0aClone\x20\x22','MIN_LABEL_COUNT','Attempt\x20ID:\x20','fs/promises','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Filter:\x20','parse','running','disabledAt','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','site','MAX_POLL_ITERATIONS','start','\x20\x20Source:\x20','workflow:schedule:enable','force','getMinutes','Listing\x20secrets...','Error:\x20Secret\x20key\x20is\x20required','text','No\x20workflow\x20tdx.json\x20found','6777702baGvOX','dryRun','tdx.json','localeCompare','lastAttempt','bold','repeat','floor','sessions','Loading\x20session...','filter','Error:\x20Invalid\x20parameter\x20format:\x20','workflow:retry','end','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20enabled\x20(','keys','Kill\x20a\x20running\x20attempt','\x20secrets...','projects','sort','Retry\x20a\x20session\x20or\x20attempt','Listing\x20workflow\x20projects...','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','✔\x20Project\x20updated','Listing\x20schedules...','Deleting\x20secret...','tasks','write','\x22\x20already\x20exists\x20(ID:\x20','Revision:\x20','rows','Pushing\x20project...','attempt:','\x0aApply\x20these\x20changes?','→\x20Project:\x20','Source\x20project:\x20','Resume\x20from:\x20','metadata','attempt','json','462107KqpzPU','Project\x20filter:\x20','format','workflow:tasks','showWorkflowConsoleUrl','✔\x20Found\x20','(unknown)','nextTime','resolveProject','listProjectSchedules','reason','pending','isDirectory','(use\x20--limit\x20to\x20see\x20more)',',\x20Workflow:\x20','done','includes','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20projects\x20match\x20pattern:\x20','listSecrets','Resolving\x20project\x20\x27','Select\x20a\x20workflow\x20to\x20run','toISOString','✔\x20Secret\x20\x27','Filter:\x20project=','Setting\x20','startedAt','Downloading\x20logs...','renderSingleTimeline','Attempt:\x20','/attempt/','includeSubtasks','Starting\x20workflow\x20run...','\x20next:\x20','sessionTime','\x20new','\x27...','every','round','newProjectName','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','workflow:workflows','jsonl','Project\x20name\x20is\x20required','\x0a⚠\x20Project\x20\x22','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','skipValidation','get','delete','path','\x20\x20Workflow:\x20','retrySession','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Key\x20cannot\x20be\x20empty','Retrying\x20attempt...','generateSessionTimelineRows','Analyzing\x20changes...','-\x20no\x20files\x20written','title','\x20-\x20','stdout','→\x20New\x20project:\x20','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','match','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','applyPullProject','key','\x0aPush\x20these\x20changes?','Expected\x20format:\x20--param\x20key=value','blue','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','max','type','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Dry\x20run:\x20yes','getFullYear','value','state','Updating\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Latest\x20session\x20has\x20no\x20attempt','createdAt','taskName','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','\x20from\x20session\x20','columns','✔\x20Workflow\x20project\x20context\x20cleared.','\x22\x20to\x20new\x20project\x20\x22','summary','workflow:sessions','download','TASK_NAME_WIDTH','split','\x20\x20Project:\x20','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','33999qYFGcr','Error:\x20Invalid\x20JSON\x20in\x20--params','updatedAt','No\x20attempts\x20found','\x20\x20Target:\x20','new','workflow:schedules','cyan','✔\x20Schedule\x20#','pollTimeline','workflowName','Project\x20directory:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','resolveProjectDir','now','group_error','Pulling\x20project\x20','Pattern:\x20','2946348WANAcG','startsWith','navigateSessionsInteractive','\x20\x20Attempt\x20ID:\x20','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20deleted','workflowProject','Usage:\x20workflow:delete\x20<project-name-or-id>','✔\x20Retry\x20started','No\x20attempts\x20found\x20for:\x20','map','\x27\x20from\x20project\x20\x27','Show\x20specific\x20attempt\x20details','workflow:download','Listing\x20workflows...','logs','cancelRequested','pullProject','List\x20workflow\x20execution\x20sessions','fill','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','utf-8','Select\x20a\x20session\x20to\x20view\x20timeline:','isTTY','workflow:upload','workflow:secrets:set','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','executeCloneProject','buildTimelineData','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','New\x20project\x20name:\x20','toLowerCase','Cancelled','includeRetried','tdx\x20wf\x20attempt\x20','set','MAX_TIMELINE_WIDTH','has','total','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Warning:','Secrets\x20to\x20set:\x20','readFile','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','deleted','workflow:delete','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Error:\x20Project\x20name\x20is\x20required','Reason:\x20','renderSessionsTimeline','yellow','executePushProject','MIN_TIMELINE_WIDTH','\x1b[1A\x1b[2K','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Loading\x20sessions...','substring','workflow:timeline','config','Downloading\x20project\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','13047VObMsp','Source:\x20','sessionId','canceling','\x0aUpdate\x20existing\x20project\x20\x22','Tip:\x20cd\x20to\x20workflows/','window','clear','values','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','diff','✔\x20Workflow\x20project\x20set\x20to:\x20','-\x20nothing\x20pushed','getDate'];a55_0x4d42=function(){return _0x25b87f;};return a55_0x4d42();}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0xf8);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x229);async[a55_0x5029cc(0x196)](_0x54b656){const _0x475807=a55_0x5029cc,{options:_0x5dd604,args:_0x14b8dd,tdx:_0x278bf4}=_0x54b656,_0x968bba=this['resolveProject'](_0x14b8dd,_0x5dd604);_0x5dd604[_0x475807(0x1af)]&&_0x968bba&&console[_0x475807(0x19c)](_0x475807(0xd0)+_0x968bba);const _0x1b965e=await withSpinner(_0x475807(0x151),()=>_0x278bf4[_0x475807(0x1f9)][_0x475807(0x204)](_0x968bba,{'limit':_0x5dd604[_0x475807(0x1ec)]}),{'verbose':_0x5dd604['verbose']});let _0x253541=_0x1b965e[_0x475807(0x1a8)];_0x253541[_0x475807(0xba)]((_0x127f5a,_0x1aa919)=>{const _0x2f5765=_0x475807,_0x9af58e=_0x127f5a[_0x2f5765(0x260)][_0x2f5765(0xa8)](_0x1aa919[_0x2f5765(0x260)]);if(_0x9af58e!==0x0)return _0x9af58e;return(_0x127f5a[_0x2f5765(0x1c1)]?.[_0x2f5765(0x260)]||'')[_0x2f5765(0xa8)](_0x1aa919[_0x2f5765(0x1c1)]?.[_0x2f5765(0x260)]||'');});const _0x34bd01=_0x5dd604[_0x475807(0x1ec)]&&_0x253541[_0x475807(0x1d7)]>=_0x5dd604['limit']?a55_0x47a174['dim'](_0x475807(0x264)):'';console[_0x475807(0x19c)](_0x475807(0xd4)+_0x253541[_0x475807(0x1d7)]+_0x475807(0x252)+(_0x253541[_0x475807(0x1d7)]!==0x1?'s':'')+_0x34bd01);if(_0x5dd604[_0x475807(0xd1)]===_0x475807(0xce)||_0x5dd604[_0x475807(0xd1)]===_0x475807(0xf9)||_0x5dd604[_0x475807(0xd1)]===_0x475807(0x20d))await handleSDKOutput(_0x253541,_0x5dd604);else{if(_0x253541[_0x475807(0x1d7)]===0x0)_0x968bba?console['log']('No\x20workflows\x20found\x20in\x20project:\x20'+_0x968bba):console[_0x475807(0x241)]('No\x20workflows\x20found');else{const _0x57354a=_0x5dd604[_0x475807(0x9a)],_0x5d2b71=_0x253541[_0x475807(0x14d)](_0x451232=>{const _0x3bdd09=_0x475807,_0x38d8c0=a55_0x47a174[_0x3bdd09(0x225)]('#'+_0x451232['id']),_0x12de19=hyperlink(_0x38d8c0,getWorkflowUrl(_0x57354a,_0x451232['id'])),_0x2d3466=_0x451232[_0x3bdd09(0x1c1)]?.[_0x3bdd09(0x260)]?a55_0x47a174['dim']('\x20('+_0x451232[_0x3bdd09(0x1c1)]['name']+')'):'';return _0x3bdd09(0x197)+_0x12de19+'\x20'+_0x451232[_0x3bdd09(0x260)]+_0x2d3466;});await writeOutput(_0x5d2b71[_0x475807(0x1a6)]('\x0a'),_0x5dd604[_0x475807(0x1e7)],_0x475807(0x210));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x12b);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x155);async[a55_0x5029cc(0x196)](_0x343d9d){const _0x55caed=a55_0x5029cc,{options:_0x158bbe,args:_0xe60897,tdx:_0x307f2e}=_0x343d9d,_0x2b4ce0=this[_0x55caed(0x1e1)](_0xe60897,_0x158bbe);if(!_0x2b4ce0)return 0x1;const {projectName:_0x3f0461,workflowName:_0x17b5eb}=_0x2b4ce0;if(_0x158bbe[_0x55caed(0x1af)]){if(_0x3f0461&&_0x17b5eb)console[_0x55caed(0x19c)](_0x55caed(0x95)+_0x3f0461+'.'+_0x17b5eb);else _0x3f0461&&console[_0x55caed(0x19c)](_0x55caed(0xe7)+_0x3f0461);const _0x4fc0cf=_0x158bbe['status'];_0x4fc0cf&&console[_0x55caed(0x19c)](_0x55caed(0x1a0)+_0x4fc0cf);}let _0x258a64=0x28;if(process[_0x55caed(0x10d)][_0x55caed(0x15a)]&&!_0x158bbe['output']&&!_0x158bbe[_0x55caed(0xd1)]){const _0x2e7cc8=process[_0x55caed(0x10d)][_0x55caed(0xc5)]||0x28;_0x258a64=Math['max'](0x14,Math['floor'](_0x2e7cc8*0x2/0x3));}const _0x5f1876=_0x158bbe[_0x55caed(0x1ec)]||_0x258a64,_0x578055=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x307f2e[_0x55caed(0x1f9)][_0x55caed(0xad)]({'projectName':_0x3f0461,'workflowName':_0x17b5eb,'status':_0x158bbe[_0x55caed(0x8e)],'fromTime':_0x158bbe[_0x55caed(0x1c2)],'toTime':_0x158bbe['to'],'limit':_0x5f1876}),{'verbose':_0x158bbe[_0x55caed(0x1af)]}),_0x252848=_0x578055[_0x55caed(0x1a8)];_0x252848[_0x55caed(0xba)]((_0x447175,_0x651474)=>{const _0x412bba=_0x55caed,_0x1fca41=_0x447175['sessionTime']||'',_0x5583f5=_0x651474['sessionTime']||'';return _0x5583f5[_0x412bba(0xa8)](_0x1fca41);});_0x252848['length']>=_0x5f1876?console[_0x55caed(0x19c)](_0x55caed(0x199)+_0x252848[_0x55caed(0x1d7)]+_0x55caed(0x230)+a55_0x47a174[_0x55caed(0x225)](_0x55caed(0xdc))):console[_0x55caed(0x19c)](_0x55caed(0xd4)+_0x252848[_0x55caed(0x1d7)]+'\x20session'+(_0x252848[_0x55caed(0x1d7)]!==0x1?'s':''));if(_0x158bbe['format']===_0x55caed(0xce)||_0x158bbe[_0x55caed(0xd1)]===_0x55caed(0xf9)||_0x158bbe['format']==='table')await handleSDKOutput(_0x252848,_0x158bbe);else{if(!process[_0x55caed(0x10d)][_0x55caed(0x15a)]||_0x158bbe['output']){if(_0x252848[_0x55caed(0x1d7)]===0x0){if(_0x3f0461&&_0x17b5eb)console[_0x55caed(0x241)](_0x55caed(0x213)+_0x3f0461+'.'+_0x17b5eb);else _0x3f0461?console[_0x55caed(0x241)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x3f0461):console[_0x55caed(0x241)](_0x55caed(0x1c4));}else{const _0x1397b0=_0x158bbe['site'],_0x5f2a44=this[_0x55caed(0x174)](_0x252848,_0x1397b0);_0x158bbe[_0x55caed(0x1e7)]?await writeOutput(_0x5f2a44,_0x158bbe[_0x55caed(0x1e7)],_0x55caed(0x210)):console[_0x55caed(0x241)](_0x5f2a44);}!_0x3f0461&&(console[_0x55caed(0x19c)](''),console['error'](a55_0x47a174[_0x55caed(0x225)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x55caed(0x19c)](a55_0x47a174['dim'](_0x55caed(0x110))+'or'+a55_0x47a174[_0x55caed(0x225)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x252848['length']===0x0){if(_0x3f0461&&_0x17b5eb)console[_0x55caed(0x241)](_0x55caed(0x213)+_0x3f0461+'.'+_0x17b5eb);else _0x3f0461?console[_0x55caed(0x241)](_0x55caed(0x1c8)+_0x3f0461):console['log'](_0x55caed(0x1c4));}else await this[_0x55caed(0x145)](_0x252848,_0x343d9d,_0x3f0461);}}return 0x0;}[a55_0x5029cc(0x174)](_0x27654e,_0x2b1e84){const _0x1b9896=a55_0x5029cc,_0x32c06a=[],_0x4ef837=new Map();let _0xbd3678=Infinity,_0x500dd6=-Infinity;for(const _0x420b4e of _0x27654e){if(_0x420b4e[_0x1b9896(0xa9)]?.['createdAt']){const _0x563ba3=new Date(_0x420b4e['lastAttempt'][_0x1b9896(0x123)])[_0x1b9896(0x22c)](),_0xf881ac=_0x420b4e['lastAttempt'][_0x1b9896(0x1f8)]?new Date(_0x420b4e[_0x1b9896(0xa9)][_0x1b9896(0x1f8)])['getTime']():Date[_0x1b9896(0x13f)](),_0x398174=_0x420b4e[_0x1b9896(0x1c1)]?.[_0x1b9896(0x260)]||'(unknown)';!_0x4ef837[_0x1b9896(0x168)](_0x398174)&&_0x4ef837[_0x1b9896(0x166)](_0x398174,[]),_0x4ef837['get'](_0x398174)[_0x1b9896(0x221)]({'session':_0x420b4e,'startTime':_0x563ba3,'endTime':_0xf881ac,'duration':_0xf881ac-_0x563ba3}),_0xbd3678=Math['min'](_0xbd3678,_0x563ba3),_0x500dd6=Math[_0x1b9896(0x119)](_0x500dd6,_0xf881ac);}}if(_0x4ef837[_0x1b9896(0x261)]===0x0)return _0x1b9896(0x193);const _0x1d4997=process[_0x1b9896(0x10d)][_0x1b9896(0x127)]||0x78,_0x2ee07c=0x1e,_0x35ca5e=0x32,_0x4abb4c=0x4,_0x232cfa=Math[_0x1b9896(0x226)](_0x35ca5e,Math[_0x1b9896(0x119)](_0x2ee07c,Math['floor'](_0x1d4997*0.3))),_0x3985b0=_0x1d4997-_0x232cfa-TIMELINE_CONFIG['GUTTER']-0x3-_0x4abb4c,_0x49971e=_0x500dd6-_0xbd3678,_0x4bd963=_0x49971e/_0x232cfa,_0x346e72=renderTimeAxis({'startTime':_0xbd3678,'endTime':_0x500dd6,'durationMs':_0x49971e,'msPerChar':_0x4bd963},_0x232cfa),_0x1bd091=[];for(const _0x48e9d6 of _0x4ef837[_0x1b9896(0x18a)]()){_0x1bd091[_0x1b9896(0x221)](..._0x48e9d6);}_0x1bd091['sort']((_0x4c8114,_0x22caea)=>_0x22caea[_0x1b9896(0x255)]-_0x4c8114[_0x1b9896(0x255)]);const _0x385b8d=new Date(_0xbd3678),_0x598c2e=formatDate(_0x385b8d),_0x2fd4a7=_0x4abb4c+TIMELINE_CONFIG[_0x1b9896(0x1b5)]+TIMELINE_CONFIG['ICON_SPACING']+_0x3985b0,_0x3beb2e='\x20'[_0x1b9896(0xab)](_0x2fd4a7-_0x598c2e[_0x1b9896(0x1d7)]),_0x3090bd=_0x3beb2e+a55_0x47a174['dim'](_0x598c2e)+'\x20'+_0x346e72;_0x32c06a[_0x1b9896(0x221)](_0x3090bd);const _0x530493=0x16;let _0x5d6808=0x0;for(const _0xef7126 of _0x1bd091){const _0x23b3ca=_0xef7126[_0x1b9896(0x1a2)][_0x1b9896(0x1c1)]?.['name']||'?',_0x210ecc=Math[_0x1b9896(0x226)](stringWidth(_0x23b3ca),_0x530493);_0x5d6808=Math[_0x1b9896(0x119)](_0x5d6808,_0x210ecc);}for(const _0x32dc2b of _0x1bd091){const {session:_0x1329fb,startTime:_0x178fbe,endTime:_0x1f8308,duration:_0x1561bf}=_0x32dc2b,_0x11c4d4=_0x1329fb[_0x1b9896(0x1c1)]?.['id'],_0x3d859a=_0x1329fb['id'],_0x25fbb9=_0x1329fb[_0x1b9896(0x1c1)]?.[_0x1b9896(0x260)]||'?',_0x3d8ba1=_0x1329fb[_0x1b9896(0x1f9)]?.[_0x1b9896(0x260)]||'?';let _0xe31015,_0x415f2d;if(_0x1329fb['lastAttempt']){const _0x33ce99=_0x1329fb[_0x1b9896(0xa9)];!_0x33ce99[_0x1b9896(0xde)]?(_0xe31015=_0x33ce99[_0x1b9896(0x153)]?'🛑':'🔄',_0x415f2d=_0x33ce99['cancelRequested']?a55_0x47a174[_0x1b9896(0x175)]:a55_0x47a174[_0x1b9896(0x117)]):(_0xe31015=_0x33ce99[_0x1b9896(0x1ca)]?'✅':'❌',_0x415f2d=_0x33ce99[_0x1b9896(0x1ca)]?a55_0x47a174[_0x1b9896(0x1de)]:a55_0x47a174[_0x1b9896(0x25a)]);}else _0xe31015='⏳',_0x415f2d=a55_0x47a174[_0x1b9896(0x225)];const _0x565942='#'+_0x3d859a,_0x13f3d3=_0x11c4d4?hyperlink(_0x565942,getWorkflowSessionUrl(_0x2b1e84,_0x11c4d4,_0x3d859a)):_0x565942;let _0x5d770b=_0x25fbb9;stringWidth(_0x25fbb9)>_0x530493&&(_0x5d770b=_0x25fbb9[_0x1b9896(0x1b0)](0x0,_0x530493-0x1)+'…');const _0x549e3a=a55_0x47a174['dim'](_0x5d770b),_0x3fbe28=stringWidth(_0x5d770b),_0x326272='\x20'[_0x1b9896(0xab)](_0x5d6808-stringWidth(_0x5d770b)+0x2),_0x5e030c='('+formatElapsed(_0x1561bf)+')',_0x3eeb6a=stringWidth(_0x5e030c),_0x5772b4=stringWidth(_0x565942),_0x37ce29=_0x5772b4+0x1+_0x3fbe28+_0x326272[_0x1b9896(0x1d7)],_0x1822ef=_0x3985b0-_0x37ce29-_0x3eeb6a-0x1-0x8;let _0x98388d=_0x3d8ba1;stringWidth(_0x98388d)>_0x1822ef&&(_0x98388d=_0x98388d[_0x1b9896(0x1b0)](0x0,_0x1822ef-0x1)+'…');const _0x6593da=_0x13f3d3+'\x20'+_0x549e3a+_0x326272+_0x98388d,_0x3a0b6c=stringWidth(_0x6593da),_0x43ad36=_0x3985b0-_0x3a0b6c-_0x3eeb6a,_0x1b4a43=_0x6593da+'\x20'[_0x1b9896(0xab)](Math['max'](0x1,_0x43ad36))+a55_0x47a174['dim'](_0x5e030c),_0x524e37=Math[_0x1b9896(0xac)]((_0x178fbe-_0xbd3678)/_0x4bd963),_0x25f5e8=Math[_0x1b9896(0xac)]((_0x1f8308-_0xbd3678)/_0x4bd963),_0x52a8a4=Math[_0x1b9896(0x119)](_0x524e37+0x1,_0x25f5e8),_0x1bd354=new Array(_0x232cfa)[_0x1b9896(0x156)]('\x20');for(let _0xc9defd=_0x524e37;_0xc9defd<Math[_0x1b9896(0x226)](_0x52a8a4,_0x232cfa);_0xc9defd++){_0x1bd354[_0xc9defd]='─';}const _0x26f14a=_0x1bd354[_0x1b9896(0x14d)](_0x6915a5=>_0x6915a5==='\x20'?'\x20':_0x415f2d(_0x6915a5))[_0x1b9896(0x1a6)]('');_0x32c06a[_0x1b9896(0x221)](_0xe31015+'\x20'+_0x1b4a43+'│'+_0x26f14a+'│');}return _0x32c06a[_0x1b9896(0x1a6)]('\x0a');}async[a55_0x5029cc(0x145)](_0x4a7d54,_0x34c98a,_0x117498){const _0x5a0f00=a55_0x5029cc,{options:_0x369db1,tdx:_0x1412af}=_0x34c98a,_0x1ae477=_0x369db1['site'],{timelineRows:_0x57ef70,timeAxisHeader:_0x1a6890}=this['generateSessionTimelineRows'](_0x4a7d54,_0x1ae477),_0x3be1a8=_0x57ef70['filter'](_0x1b71f8=>_0x1b71f8[_0x5a0f00(0x259)]);if(_0x3be1a8['length']===0x0){const _0xe73db=this['renderSessionsTimeline'](_0x4a7d54,_0x1ae477);console[_0x5a0f00(0x241)](_0xe73db);!_0x117498&&(console[_0x5a0f00(0x19c)](''),console[_0x5a0f00(0x19c)](a55_0x47a174[_0x5a0f00(0x225)](_0x5a0f00(0xbd))),console[_0x5a0f00(0x19c)](a55_0x47a174[_0x5a0f00(0x225)](_0x5a0f00(0x110))+'or'+a55_0x47a174['dim'](_0x5a0f00(0xe0))));return;}_0x1a6890&&console[_0x5a0f00(0x241)](_0x1a6890);const _0x57585a=_0x57ef70[_0x5a0f00(0xaf)](_0x33b74a=>_0x33b74a[_0x5a0f00(0x259)])[_0x5a0f00(0x14d)](_0x7aac89=>({'title':_0x7aac89[_0x5a0f00(0x223)],'value':_0x7aac89[_0x5a0f00(0x259)]})),_0xec5390=process[_0x5a0f00(0x10d)][_0x5a0f00(0xc5)]||0x3c,_0x55c8b3=Math['max'](0x28,Math[_0x5a0f00(0xac)](_0xec5390*0x2/0x3)),_0x142439=await a55_0x110a93({'type':_0x5a0f00(0x224),'name':_0x5a0f00(0x259),'message':_0x5a0f00(0x26b),'choices':_0x57585a,'initial':-0x1,'limit':_0x55c8b3,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0x56301c,_0x431ffb)=>{const _0x4b92d0=_0x5a0f00;if(!_0x56301c)return Promise[_0x4b92d0(0x194)](_0x431ffb);const _0x527c13=_0x431ffb['filter'](_0x2b3e63=>{const _0x5df0be=_0x4b92d0,_0x383640=_0x2b3e63;return _0x383640[_0x5df0be(0x10b)]['toLowerCase']()['includes'](_0x56301c[_0x5df0be(0x162)]());});return Promise[_0x4b92d0(0x194)](_0x527c13);}}),_0x43d14e=()=>{const _0x3680cd=_0x5a0f00;process[_0x3680cd(0x10d)][_0x3680cd(0xc2)](_0x3680cd(0x178)),process[_0x3680cd(0x10d)][_0x3680cd(0xc2)](_0x3680cd(0x178)),process['stdout'][_0x3680cd(0xc2)]('\x1b[1A\x1b[2K');},_0x1d6bd1=_0x142439&&_0x142439[_0x5a0f00(0x259)]&&_0x142439[_0x5a0f00(0x259)]!==null&&_0x142439[_0x5a0f00(0x259)]['trim']()!=='';if(!_0x1d6bd1){_0x43d14e(),console[_0x5a0f00(0x241)](a55_0x47a174[_0x5a0f00(0x225)](_0x5a0f00(0x163)));return;}_0x43d14e();const _0x50042c=_0x4a7d54[_0x5a0f00(0x1df)](_0x3a93a4=>_0x3a93a4[_0x5a0f00(0xa9)]?.['id']===_0x142439[_0x5a0f00(0x259)]);if(_0x50042c){const _0x5975e1=_0x50042c[_0x5a0f00(0x1c1)]?.[_0x5a0f00(0x260)]||'?',_0x537b34=_0x50042c[_0x5a0f00(0x1f9)]?.['name']||'?';console[_0x5a0f00(0x241)](_0x5a0f00(0x24b)+a55_0x47a174[_0x5a0f00(0x225)](_0x5975e1)+_0x5a0f00(0xdd)+a55_0x47a174[_0x5a0f00(0x225)](_0x537b34));}const _0x4350a4=new WorkflowTimelineCommand();await _0x4350a4[_0x5a0f00(0x196)]({'args':[],'options':{..._0x369db1,'attemptId':_0x142439[_0x5a0f00(0x259)]},'tdx':_0x1412af});}[a55_0x5029cc(0x108)](_0x48e121,_0x23fc26){const _0x1a1a88=a55_0x5029cc,_0xd77d2=new Map();for(const _0x2f25dc of _0x48e121){_0x2f25dc['id']&&_0x2f25dc['lastAttempt']?.['id']&&_0xd77d2['set'](_0x2f25dc['id'],_0x2f25dc['lastAttempt']['id']);}const _0x3bdd3f=[];let _0x1d7bea='';const _0x4b238c=this['renderSessionsTimeline'](_0x48e121,_0x23fc26),_0x1406b3=_0x4b238c[_0x1a1a88(0x12e)]('\x0a');for(const _0x585c5e of _0x1406b3){if(_0x585c5e[_0x1a1a88(0x144)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x585c5e[_0x1a1a88(0x111)](/^\s+\d{4}-\d{2}-\d{2}/))_0x1d7bea=_0x585c5e;else{if(_0x585c5e['match'](/^[✅❌🔄🛑⏳]/)){const _0x239a17=_0x585c5e['match'](/#(\d+)/),_0x39b589=_0x239a17?_0x239a17[0x1]:null,_0xf1c38c=_0x39b589?_0xd77d2[_0x1a1a88(0xfe)](_0x39b589)||null:null,_0x1a9409=_0x48e121[_0x1a1a88(0x1df)](_0x3967c5=>_0x3967c5['id']===_0x39b589),_0x559aa5=_0x1a9409?.[_0x1a1a88(0x1c1)]?.[_0x1a1a88(0x260)]||'';_0x3bdd3f[_0x1a1a88(0x221)]({'displayLine':_0x585c5e,'attemptId':_0xf1c38c,'projectName':_0x559aa5});}}}return{'timelineRows':_0x3bdd3f,'timeAxisHeader':_0x1d7bea};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x1c6);['description']=a55_0x5029cc(0x26c);async[a55_0x5029cc(0x196)](_0x2d5043){const _0x20f5ab=a55_0x5029cc,{options:_0x2b3bde,args:_0x58ed8b,tdx:_0x5164c1}=_0x2d5043,_0x257ffd=this['parseProjectWorkflowPattern'](_0x58ed8b,_0x2b3bde);if(!_0x257ffd)return 0x1;const {projectName:_0x4916cb,workflowName:_0x4152c2}=_0x257ffd,_0x121ef8=_0x2b3bde[_0x20f5ab(0x164)];if(_0x2b3bde[_0x20f5ab(0x1af)]){if(_0x4916cb&&_0x4152c2)console[_0x20f5ab(0x19c)](_0x20f5ab(0x95)+_0x4916cb+'.'+_0x4152c2);else _0x4916cb&&console[_0x20f5ab(0x19c)](_0x20f5ab(0xe7)+_0x4916cb);_0x121ef8&&console[_0x20f5ab(0x19c)](_0x20f5ab(0x256));}const _0x3b2bca=await withSpinner(_0x20f5ab(0x1f5),()=>_0x5164c1['workflow'][_0x20f5ab(0x1b6)]({'projectName':_0x4916cb,'workflowName':_0x4152c2,'includeRetried':_0x121ef8,'limit':_0x2b3bde[_0x20f5ab(0x1ec)]}),{'verbose':_0x2b3bde['verbose']}),_0x52b85e=_0x3b2bca[_0x20f5ab(0x1a8)],_0x27871a=_0x2b3bde['limit']||0x64,_0x124e79=_0x52b85e[_0x20f5ab(0x1d7)]>=_0x27871a?a55_0x47a174[_0x20f5ab(0x225)](_0x20f5ab(0x264)):'';console[_0x20f5ab(0x19c)](_0x20f5ab(0xd4)+_0x52b85e[_0x20f5ab(0x1d7)]+_0x20f5ab(0x267)+(_0x52b85e['length']!==0x1?'s':'')+_0x124e79);if(_0x2b3bde['format']==='json'||_0x2b3bde['format']===_0x20f5ab(0xf9)||_0x2b3bde[_0x20f5ab(0xd1)]===_0x20f5ab(0x20d))await handleSDKOutput(_0x52b85e,_0x2b3bde);else{if(_0x52b85e[_0x20f5ab(0x1d7)]===0x0){if(_0x4916cb&&_0x4152c2)console[_0x20f5ab(0x241)](_0x20f5ab(0x14c)+_0x4916cb+'.'+_0x4152c2);else _0x4916cb?console[_0x20f5ab(0x241)](_0x20f5ab(0x1ef)+_0x4916cb):console[_0x20f5ab(0x241)](_0x20f5ab(0x134));}else{const _0x3177b9=_0x2b3bde[_0x20f5ab(0x9a)],_0x21fdd0=_0x52b85e['map'](_0x65614b=>{const _0xd1dd4c=_0x20f5ab,_0x50209d=a55_0x47a174[_0xd1dd4c(0x225)]('#'+_0x65614b['id']),_0x1a23dd=_0x65614b[_0xd1dd4c(0x1c1)]?.['id'],_0x4e1b6b=_0x65614b[_0xd1dd4c(0x24c)]||_0x65614b['sessionId'],_0x95ebd5=_0x1a23dd&&_0x4e1b6b?hyperlink(_0x50209d,getWorkflowAttemptUrl(_0x3177b9,_0x1a23dd,_0x4e1b6b,_0x65614b['id'])):_0x50209d,{icon:_0x4f29fa,text:_0x3bed7b}=getAttemptStatusDisplay(_0x65614b),_0x547ef7=(_0x65614b[_0xd1dd4c(0x1c1)]?.['name']||'?')+'.'+(_0x65614b[_0xd1dd4c(0x1f9)]?.[_0xd1dd4c(0x260)]||'?'),_0x14d525=_0x65614b['sessionTime']?a55_0x47a174['dim'](_0x65614b['sessionTime']):'';return(_0x95ebd5+'\x20'+_0x4f29fa+(_0x3bed7b?'\x20'+_0x3bed7b:'')+'\x20'+_0x547ef7+'\x20'+_0x14d525)[_0xd1dd4c(0x1eb)]();});await writeOutput(_0x21fdd0[_0x20f5ab(0x1a6)]('\x0a'),_0x2b3bde[_0x20f5ab(0x1e7)],_0x20f5ab(0x210));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a55_0x5029cc(0x1ed);['description']=a55_0x5029cc(0x14f);async[a55_0x5029cc(0x196)](_0x50d556){const _0x43e893=a55_0x5029cc,{options:_0x2dd690,args:_0x4590de,tdx:_0x46fe33}=_0x50d556,_0x56b1f3=_0x4590de[0x0];if(!_0x56b1f3)return console[_0x43e893(0x19c)](_0x43e893(0x236)),0x1;_0x2dd690[_0x43e893(0x1af)]&&console[_0x43e893(0x19c)](_0x43e893(0x92)+_0x56b1f3);const _0x33279f=await withSpinner('Getting\x20attempt\x20details...',()=>_0x46fe33['workflow']['attempt'](_0x56b1f3),{'verbose':_0x2dd690[_0x43e893(0x1af)]}),_0x13ab76=_0x33279f['data'];let _0xc9ca16;!_0x13ab76[_0x43e893(0xde)]?_0xc9ca16=_0x13ab76[_0x43e893(0x153)]?_0x43e893(0x185):_0x43e893(0x97):_0xc9ca16=_0x13ab76[_0x43e893(0x1ca)]?'success':'error';let _0x230f63;if(_0x13ab76[_0x43e893(0x123)]&&_0x13ab76[_0x43e893(0x1f8)]){const _0x49a903=new Date(_0x13ab76['createdAt'])[_0x43e893(0x22c)](),_0x4b38df=new Date(_0x13ab76[_0x43e893(0x1f8)])[_0x43e893(0x22c)]();_0x230f63=Math[_0x43e893(0xf5)]((_0x4b38df-_0x49a903)/0x3e8);}const _0x5bbe07={'attempt_id':_0x13ab76['id'],'status':_0xc9ca16,..._0x13ab76[_0x43e893(0x23d)]!==undefined&&{'index':_0x13ab76['index']},..._0x13ab76[_0x43e893(0x1c1)]&&{'project':_0x13ab76[_0x43e893(0x1c1)][_0x43e893(0x260)]},..._0x13ab76['workflow']&&{'workflow':_0x13ab76[_0x43e893(0x1f9)][_0x43e893(0x260)]},..._0x13ab76['sessionId']&&{'session_id':_0x13ab76['sessionId']},..._0x13ab76[_0x43e893(0xf1)]&&{'session_time':_0x13ab76[_0x43e893(0xf1)]},..._0x13ab76[_0x43e893(0x207)]&&{'retry_attempt':_0x13ab76['retryAttemptName']},..._0x230f63!==undefined&&{'duration_sec':_0x230f63},..._0x13ab76['createdAt']&&{'created_at':_0x13ab76['createdAt']},..._0x13ab76[_0x43e893(0x1f8)]&&{'finished_at':_0x13ab76[_0x43e893(0x1f8)]},...Object[_0x43e893(0xb6)](_0x13ab76[_0x43e893(0x1dd)])[_0x43e893(0x1d7)]>0x0&&{'params':_0x13ab76[_0x43e893(0x1dd)]}};return await handleSingleObjectOutput(_0x5bbe07,_0x2dd690),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a55_0x5029cc(0xd2);[a55_0x5029cc(0x1ee)]='Show\x20tasks\x20for\x20an\x20attempt';async[a55_0x5029cc(0x196)](_0x6108be){const _0x444424=a55_0x5029cc,{options:_0x8d628f,args:_0x1ca4b8,tdx:_0x2c1622}=_0x6108be,_0x226640=_0x1ca4b8[0x0];if(!_0x226640)return console[_0x444424(0x19c)](_0x444424(0x236)),0x1;const _0x59a577=_0x8d628f[_0x444424(0xee)];_0x8d628f['verbose']&&(console['error'](_0x444424(0x92)+_0x226640),_0x59a577&&console[_0x444424(0x19c)]('Including\x20subtasks:\x20yes'));const _0x42601a=await withSpinner(_0x444424(0x205),()=>_0x2c1622[_0x444424(0x1f9)][_0x444424(0xc1)](_0x226640,_0x59a577||![]),{'verbose':_0x8d628f[_0x444424(0x1af)]}),_0x14189b=_0x42601a[_0x444424(0x1a8)];return console[_0x444424(0x19c)](_0x444424(0xd4)+_0x14189b[_0x444424(0x1d7)]+_0x444424(0x1d6)+(_0x14189b[_0x444424(0x1d7)]!==0x1?'s':'')),await handleSDKOutput(_0x14189b,_0x8d628f),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a55_0x5029cc(0x260)]='workflow:logs';['description']=a55_0x5029cc(0x104);async[a55_0x5029cc(0x196)](_0x29e0ca){const _0x1f5dfd=a55_0x5029cc,{options:_0x2b43f5,args:_0x4e80de,tdx:_0x35fbcc}=_0x29e0ca,_0x1bb715=_0x4e80de[0x0];let _0x4aa4a7=_0x4e80de[0x1];if(!_0x1bb715)return console[_0x1f5dfd(0x19c)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x2b43f5[_0x1f5dfd(0x1af)]&&(console[_0x1f5dfd(0x19c)](_0x1f5dfd(0x92)+_0x1bb715),_0x4aa4a7&&console['error']('Task\x20name:\x20'+_0x4aa4a7));const _0x2f7da5=await withSpinner(_0x1f5dfd(0x20c),()=>_0x35fbcc['workflow']['logFiles'](_0x1bb715,_0x4aa4a7),{'verbose':_0x2b43f5[_0x1f5dfd(0x1af)]}),_0x192ea2=_0x2f7da5[_0x1f5dfd(0x1a8)];if(_0x192ea2['length']===0x0)return console['error'](_0x1f5dfd(0x19f)),0x0;if(!_0x4aa4a7&&(_0x2b43f5[_0x1f5dfd(0xce)]||_0x2b43f5['format']))return await handleSDKOutput(_0x192ea2,_0x2b43f5),0x0;if(!_0x4aa4a7){const _0x24d9b8=_0x192ea2[_0x1f5dfd(0x14d)](_0x1df35e=>({'title':_0x1df35e[_0x1f5dfd(0x124)]+'\x20('+formatBytes(_0x1df35e[_0x1f5dfd(0x25d)])+')','value':_0x1df35e[_0x1f5dfd(0x124)]})),_0x486174=await a55_0x110a93({'type':_0x1f5dfd(0x235),'name':_0x1f5dfd(0x24a),'message':_0x1f5dfd(0x219),'choices':_0x24d9b8});if(!_0x486174['task'])return console[_0x1f5dfd(0x19c)](_0x1f5dfd(0x163)),0x0;_0x4aa4a7=_0x486174[_0x1f5dfd(0x24a)];}const _0x5f58e7=await withSpinner(_0x1f5dfd(0xea),()=>_0x35fbcc[_0x1f5dfd(0x1f9)][_0x1f5dfd(0x152)](_0x1bb715,_0x4aa4a7),{'verbose':_0x2b43f5['verbose']}),_0x2ef2ff=_0x5f58e7['data'];return _0x2ef2ff?console[_0x1f5dfd(0x241)](_0x2ef2ff):console[_0x1f5dfd(0x19c)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x220);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0xb7);async[a55_0x5029cc(0x196)](_0x42aca8){const _0x3dbce2=a55_0x5029cc,{options:_0x1c3c9c,args:_0x3524d3,tdx:_0x210d3a}=_0x42aca8,_0x5ef957=_0x3524d3[0x0];if(!_0x5ef957)return console[_0x3dbce2(0x19c)](_0x3dbce2(0x236)),0x1;const _0x2bc9f7=_0x1c3c9c[_0x3dbce2(0xd9)];_0x1c3c9c[_0x3dbce2(0x1af)]&&(console[_0x3dbce2(0x19c)](_0x3dbce2(0x92)+_0x5ef957),_0x2bc9f7&&console[_0x3dbce2(0x19c)](_0x3dbce2(0x173)+_0x2bc9f7));if(!_0x1c3c9c['yes']){if(!isInteractive())return console[_0x3dbce2(0x19c)](a55_0x47a174[_0x3dbce2(0x25a)](_0x3dbce2(0x1ff)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a55_0x47a174[_0x3dbce2(0x225)](_0x3dbce2(0x24f))),0x1;const _0x517b41=await confirmKey(_0x3dbce2(0x171)+_0x5ef957+'?');if(!_0x517b41)return console[_0x3dbce2(0x19c)](a55_0x47a174['yellow']('Cancelled')),0x1;}const _0x167779=await withSpinner(_0x3dbce2(0x1cb),()=>_0x210d3a['workflow'][_0x3dbce2(0x270)](_0x5ef957,_0x2bc9f7),{'verbose':_0x1c3c9c[_0x3dbce2(0x1af)]}),_0xcf5dc4=_0x167779['data'];return console[_0x3dbce2(0x19c)]('✔\x20'+_0xcf5dc4),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0xb1);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0xbb);async[a55_0x5029cc(0x196)](_0x15fc86){const _0x478d08=a55_0x5029cc,{options:_0x1f5469,args:_0x36aadf,tdx:_0x4f4425}=_0x15fc86,_0x55b196=_0x36aadf[0x0];if(!_0x55b196)return console[_0x478d08(0x19c)](_0x478d08(0x121)),console[_0x478d08(0x19c)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x4f5e02=![],_0x47ac40=_0x55b196;if(_0x55b196[_0x478d08(0x144)](_0x478d08(0x21e)))_0x4f5e02=!![],_0x47ac40=_0x55b196[_0x478d08(0x17d)](0x8);else{if(_0x55b196[_0x478d08(0x144)](_0x478d08(0xc7)))_0x4f5e02=![],_0x47ac40=_0x55b196[_0x478d08(0x17d)](0x8);else return console[_0x478d08(0x19c)](_0x478d08(0xb4)),console[_0x478d08(0x19c)](_0x478d08(0x1bd)),0x1;}const _0x404813=_0x1f5469['fromTask'],_0x87f14=_0x1f5469[_0x478d08(0x1cf)],_0x55ef05=_0x1f5469[_0x478d08(0x1dd)],_0x1e491f=_0x1f5469[_0x478d08(0x9f)];_0x1f5469[_0x478d08(0x1af)]&&(console[_0x478d08(0x19c)]('Target:\x20'+(_0x4f5e02?_0x478d08(0x1a2):'attempt')+'\x20'+_0x47ac40),_0x404813&&console['error'](_0x478d08(0x1fc)+_0x404813),_0x87f14&&console[_0x478d08(0x19c)](_0x478d08(0xcb)+_0x87f14),_0x55ef05&&console[_0x478d08(0x19c)](_0x478d08(0x19d)+_0x55ef05),_0x1e491f&&console[_0x478d08(0x19c)](_0x478d08(0x1f1)));let _0x4d7a33;if(_0x55ef05)try{if(_0x55ef05[_0x478d08(0x144)]('@')){const _0x5c7a6d=await import(_0x478d08(0x93)),_0x171f70=_0x55ef05[_0x478d08(0x17d)](0x1),_0xab503f=await _0x5c7a6d[_0x478d08(0x16d)](_0x171f70,_0x478d08(0x158));_0x4d7a33=JSON[_0x478d08(0x96)](_0xab503f);}else _0x4d7a33=JSON[_0x478d08(0x96)](_0x55ef05);}catch{return console[_0x478d08(0x19c)](_0x478d08(0x132)),0x1;}if(!_0x1f5469[_0x478d08(0x262)]){if(!isInteractive())return console['error'](a55_0x47a174[_0x478d08(0x25a)](_0x478d08(0x1ff)),_0x478d08(0xb3)),console[_0x478d08(0x19c)](a55_0x47a174[_0x478d08(0x225)](_0x478d08(0x24f))),0x1;const _0x61e705=await confirmKey(_0x478d08(0x99)+(_0x4f5e02?'session':_0x478d08(0xcd))+'\x20'+_0x47ac40+'?');if(!_0x61e705)return console[_0x478d08(0x19c)](a55_0x47a174['yellow'](_0x478d08(0x163))),0x1;}let _0x103087;_0x4f5e02?_0x103087=await withSpinner(_0x478d08(0x1d4),()=>_0x4f4425[_0x478d08(0x1f9)][_0x478d08(0x102)](_0x47ac40,{'fromTask':_0x404813,'retryParams':_0x4d7a33}),{'verbose':_0x1f5469[_0x478d08(0x1af)]}):_0x103087=await withSpinner(_0x478d08(0x107),()=>_0x4f4425[_0x478d08(0x1f9)][_0x478d08(0x26d)](_0x47ac40,{'resumeFrom':_0x87f14,'retryParams':_0x4d7a33,'force':_0x1e491f}),{'verbose':_0x1f5469[_0x478d08(0x1af)]});const _0x31b04d=_0x103087[_0x478d08(0x1a8)];return console[_0x478d08(0x19c)](_0x478d08(0x14b)),console[_0x478d08(0x19c)](_0x478d08(0x216)+_0x31b04d[_0x478d08(0x259)]),console['error'](_0x478d08(0x251)+_0x31b04d['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x1b9);[a55_0x5029cc(0x1ee)]='Start\x20a\x20workflow\x20run';async[a55_0x5029cc(0x196)](_0x1a1b47){const _0x14714a=a55_0x5029cc,{options:_0x38efbf,args:_0x5c693c,tdx:_0x4ff4f9}=_0x1a1b47;let _0xe0a92e=_0x5c693c[0x0];if(!_0xe0a92e){const _0x1c534b=this['resolveProject']([],_0x38efbf),_0x27339f=await withSpinner('Loading\x20workflows...',()=>_0x4ff4f9[_0x14714a(0x1f9)][_0x14714a(0x204)](_0x1c534b,{'limit':_0x38efbf[_0x14714a(0x1ec)]}),{'verbose':_0x38efbf[_0x14714a(0x1af)]}),_0x2658b2=_0x27339f[_0x14714a(0x1a8)];if(_0x2658b2[_0x14714a(0x1d7)]===0x0)return console[_0x14714a(0x19c)]('No\x20workflows\x20found'),!_0x1c534b&&console[_0x14714a(0x19c)](a55_0x47a174[_0x14714a(0x225)](_0x14714a(0x1e9))),0x1;const _0x533e03=_0x2658b2[_0x14714a(0x14d)](_0x53a5d5=>({'title':_0x53a5d5[_0x14714a(0x1c1)]?.['name']+'.'+_0x53a5d5['name'],'value':_0x53a5d5[_0x14714a(0x1c1)]?.[_0x14714a(0x260)]+'.'+_0x53a5d5['name'],'description':_0x53a5d5[_0x14714a(0x26e)]?_0x14714a(0x249)+_0x53a5d5['revision']:undefined})),_0x1f9e3e=await a55_0x110a93({'type':'select','name':_0x14714a(0x1f9),'message':_0x14714a(0xe4),'choices':_0x533e03});if(!_0x1f9e3e[_0x14714a(0x1f9)])return 0x1;_0xe0a92e=_0x1f9e3e[_0x14714a(0x1f9)];}if(!_0xe0a92e[_0x14714a(0xdf)]('.')){const _0x364526=this['resolveProject']([],_0x38efbf);if(_0x364526)_0xe0a92e=_0x364526+'.'+_0xe0a92e;else return console[_0x14714a(0x19c)](a55_0x47a174['red'](_0x14714a(0x25b)),_0x14714a(0x1bc)),console[_0x14714a(0x19c)](a55_0x47a174[_0x14714a(0x225)](_0x14714a(0x1e9))),0x1;}const _0x3df1ea=_0x38efbf['param'],_0xbfeb29=_0x38efbf['sessionTime'],_0x117e82={};if(_0x3df1ea&&Array['isArray'](_0x3df1ea))for(const _0x3edddc of _0x3df1ea){const _0x40685e=_0x3edddc['indexOf']('=');if(_0x40685e===-0x1)return console['error'](_0x14714a(0xb0)+_0x3edddc),console[_0x14714a(0x19c)](_0x14714a(0x116)),0x1;const _0x33aa5c=_0x3edddc['substring'](0x0,_0x40685e),_0x3740eb=_0x3edddc[_0x14714a(0x17d)](_0x40685e+0x1);try{_0x117e82[_0x33aa5c]=JSON[_0x14714a(0x96)](_0x3740eb);}catch{_0x117e82[_0x33aa5c]=_0x3740eb;}}_0x38efbf[_0x14714a(0x1af)]&&(console['error'](_0x14714a(0x209)+_0xe0a92e),Object[_0x14714a(0xb6)](_0x117e82)[_0x14714a(0x1d7)]>0x0&&console[_0x14714a(0x19c)]('Parameters:\x20'+JSON[_0x14714a(0x198)](_0x117e82)),_0xbfeb29&&console[_0x14714a(0x19c)](_0x14714a(0x238)+_0xbfeb29));if(_0x38efbf[_0x14714a(0xa6)])return await this[_0x14714a(0x25f)](_0x1a1b47,_0xe0a92e,_0x117e82,_0xbfeb29);const _0x4f78b3=await withSpinner(_0x14714a(0xef),()=>_0x4ff4f9[_0x14714a(0x1f9)]['run'](_0xe0a92e,_0x117e82,{'sessionTime':_0xbfeb29}),{'verbose':_0x38efbf[_0x14714a(0x1af)]}),_0x1cd4a1=_0x4f78b3[_0x14714a(0x1a8)];console['error'](_0x14714a(0x1d3)),console[_0x14714a(0x19c)](_0x14714a(0x146)+_0x1cd4a1['id']),console[_0x14714a(0x19c)](_0x14714a(0x251)+_0x1cd4a1[_0x14714a(0x184)]),console[_0x14714a(0x19c)](_0x14714a(0x12f)+_0x1cd4a1[_0x14714a(0x1c1)]?.[_0x14714a(0x260)]),console[_0x14714a(0x19c)](_0x14714a(0x101)+_0x1cd4a1[_0x14714a(0x1f9)]?.[_0x14714a(0x260)]);if(_0x1cd4a1[_0x14714a(0x1c1)]?.['id']&&_0x1cd4a1['sessionId']&&_0x1cd4a1['id']){const _0x8712b4=_0x38efbf[_0x14714a(0x9a)],_0xa1bbe6=getConsoleUrl(_0x8712b4,_0x14714a(0x240)+_0x1cd4a1['project']['id']+_0x14714a(0x233)+_0x1cd4a1[_0x14714a(0x184)]+_0x14714a(0xed)+_0x1cd4a1['id']);console['error'](_0x14714a(0x1fb)+a55_0x47a174[_0x14714a(0x138)](_0xa1bbe6));}return 0x0;}async[a55_0x5029cc(0x25f)](_0x1b4cc5,_0x39e713,_0xe9d359,_0x21f643){const _0x214bb7=a55_0x5029cc,{options:_0x32e0f4,tdx:_0x43fc92}=_0x1b4cc5,_0xca7a7e=await withSpinner('Fetching\x20workflow\x20'+_0x39e713+_0x214bb7(0x234),()=>_0x43fc92[_0x214bb7(0x1f9)][_0x214bb7(0x1e6)](_0x39e713),{'verbose':_0x32e0f4['verbose']}),_0x1dc070=_0xca7a7e[_0x214bb7(0x1a8)],_0x4baaef=_0x21f643??new Date()[_0x214bb7(0xe5)]();console['log'](a55_0x47a174[_0x214bb7(0xaa)](_0x214bb7(0x1f0)),_0x39e713),console[_0x214bb7(0x241)](a55_0x47a174[_0x214bb7(0xaa)]('Session\x20time:'),_0x4baaef),console['log'](a55_0x47a174['bold'](_0x214bb7(0x1d8)),JSON['stringify'](_0xe9d359)),console[_0x214bb7(0x241)](''),console[_0x214bb7(0x241)](a55_0x47a174[_0x214bb7(0xaa)](_0x214bb7(0x1cc)));const _0xe08b91=parseTaskGraph(_0x1dc070[_0x214bb7(0x17f)]??null);if(_0xe08b91['length']===0x0)console[_0x214bb7(0x241)](a55_0x47a174['dim'](_0x214bb7(0x1ba)));else for(const _0x54a7fe of formatTaskGraph(_0xe08b91)){console[_0x214bb7(0x241)](_0x54a7fe);}const _0x28ef99=summarizeTaskGraph(_0xe08b91),_0x1072de=formatWarningSummary(_0x28ef99);return _0x1072de&&(console['log'](''),console['log'](a55_0x47a174[_0x214bb7(0x175)](_0x1072de))),console[_0x214bb7(0x241)](a55_0x47a174[_0x214bb7(0x175)](_0x214bb7(0x237))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x150);[a55_0x5029cc(0x1ee)]='Download\x20workflow\x20project\x20from\x20Treasure\x20AI';async[a55_0x5029cc(0x196)](_0x46ecd3){const _0xcd37a6=a55_0x5029cc,{options:_0x3039a2,args:_0x41f9af,tdx:_0x390b92}=_0x46ecd3,_0x202ca2=_0x41f9af[0x0],_0x354e00=_0x41f9af[0x1]||'.';if(!_0x202ca2)return console[_0xcd37a6(0x19c)]('Error:\x20Project\x20name\x20is\x20required'),console[_0xcd37a6(0x19c)](_0xcd37a6(0x1b4)),0x1;const _0x240e08=_0x3039a2[_0xcd37a6(0x26e)];_0x3039a2[_0xcd37a6(0x1af)]&&(console[_0xcd37a6(0x19c)]('Project:\x20'+_0x202ca2),console['error']('Output\x20directory:\x20'+_0x354e00),_0x240e08&&console[_0xcd37a6(0x19c)]('Revision:\x20'+_0x240e08));const _0x55896d=await withSpinner(_0xcd37a6(0x180)+_0x202ca2+_0xcd37a6(0x234),()=>_0x390b92[_0xcd37a6(0x1f9)][_0xcd37a6(0x12c)](_0x202ca2,_0x354e00,{'revision':_0x240e08}),{'verbose':_0x3039a2[_0xcd37a6(0x1af)]}),_0x40c383=_0x55896d['data'];return console[_0xcd37a6(0x19c)](_0xcd37a6(0x21b)+_0x40c383['projectName']),console[_0xcd37a6(0x19c)](_0xcd37a6(0x269)+_0x40c383['revision']),console[_0xcd37a6(0x19c)](_0xcd37a6(0x268)+_0x40c383['filesExtracted']),console[_0xcd37a6(0x19c)]('\x20\x20Location:\x20'+_0x354e00+'/'+_0x40c383['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x15b);[a55_0x5029cc(0x1ee)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)';async[a55_0x5029cc(0x196)](_0x3d615e){const _0x2e6ce7=a55_0x5029cc,{options:_0x1f75b7,args:_0x1f56e1,tdx:_0x17cbf6}=_0x3d615e;let _0x1f9359='.',_0x508eba=_0x1f75b7['name'];if(_0x1f56e1[0x0]){const {promises:_0x586016}=await import('fs');try{const _0x184948=await _0x586016[_0x2e6ce7(0x257)](_0x1f56e1[0x0]);if(_0x184948[_0x2e6ce7(0xdb)]())_0x1f9359=_0x1f56e1[0x0];else return console[_0x2e6ce7(0x19c)](_0x2e6ce7(0x23b)+_0x1f56e1[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x508eba=_0x1f56e1[0x0],_0x1f9359='.';}}const _0x30d115=_0x1f75b7[_0x2e6ce7(0x26e)],_0x3dcc17=_0x1f75b7[_0x2e6ce7(0xfd)];_0x1f75b7[_0x2e6ce7(0x1af)]&&(console[_0x2e6ce7(0x19c)](_0x2e6ce7(0x13c)+_0x1f9359),_0x508eba&&console['error']('Project\x20name:\x20'+_0x508eba),_0x30d115&&console[_0x2e6ce7(0x19c)](_0x2e6ce7(0xc4)+_0x30d115),_0x3dcc17&&console[_0x2e6ce7(0x19c)]('Validation:\x20skipped'));const _0x31ea7f=await withSpinner(_0x2e6ce7(0x8b),()=>_0x17cbf6[_0x2e6ce7(0x1f9)][_0x2e6ce7(0x221)](_0x1f9359,{'projectName':_0x508eba,'revision':_0x30d115,'skipValidation':_0x3dcc17}),{'verbose':_0x1f75b7[_0x2e6ce7(0x1af)]}),_0x3c4d83=_0x31ea7f[_0x2e6ce7(0x1a8)];return console[_0x2e6ce7(0x19c)](_0x2e6ce7(0x200)+_0x3c4d83['projectName']),console[_0x2e6ce7(0x19c)](_0x2e6ce7(0x1cd)+_0x3c4d83[_0x2e6ce7(0x201)]),console[_0x2e6ce7(0x19c)]('\x20\x20Revision:\x20'+_0x3c4d83[_0x2e6ce7(0x26e)]),await this[_0x2e6ce7(0xd3)](_0x17cbf6,_0x3c4d83[_0x2e6ce7(0x1be)],_0x1f75b7[_0x2e6ce7(0x9a)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a55_0x5029cc(0x20e);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x24d);async[a55_0x5029cc(0x196)](_0x592239){const _0x3015f3=a55_0x5029cc,{options:_0x2e0004,args:_0x112fdd,tdx:_0x588042}=_0x592239,_0x3c2427=_0x112fdd[0x0],_0x232c17=_0x112fdd[0x1];if(!_0x3c2427)return console[_0x3015f3(0x19c)](a55_0x47a174['red'](_0x3015f3(0x25b)),'Project\x20name\x20is\x20required'),console[_0x3015f3(0x19c)](a55_0x47a174[_0x3015f3(0x225)](_0x3015f3(0xfc))),0x1;const _0x19c1a4=_0x2e0004['revision'];_0x2e0004[_0x3015f3(0x1af)]&&(console[_0x3015f3(0x19c)](_0x3015f3(0x24b)+_0x3c2427),_0x232c17&&console[_0x3015f3(0x19c)](_0x3015f3(0x23a)+_0x232c17),_0x19c1a4&&console[_0x3015f3(0x19c)](_0x3015f3(0xc4)+_0x19c1a4),_0x2e0004['dryRun']&&console['error'](_0x3015f3(0x11c)));const _0x2c5241=await withSpinner(_0x3015f3(0x141)+_0x3c2427+_0x3015f3(0x234),()=>_0x588042[_0x3015f3(0x1f9)][_0x3015f3(0x154)](_0x3c2427,{'targetDir':_0x232c17,'revision':_0x19c1a4}),{'verbose':_0x2e0004['verbose']}),_0x35813c=_0x2c5241['data'];_0x35813c[_0x3015f3(0x26f)]?console[_0x3015f3(0x19c)](_0x3015f3(0x10e)+_0x35813c[_0x3015f3(0x1be)]):console[_0x3015f3(0x19c)](_0x3015f3(0xc9)+_0x35813c[_0x3015f3(0x1be)]);console[_0x3015f3(0x19c)]('\x20\x20Revision:\x20'+_0x35813c[_0x3015f3(0x26e)]),console['error'](_0x3015f3(0x135)+(a55_0x4d0954[_0x3015f3(0x1fe)](process['cwd'](),_0x35813c[_0x3015f3(0x1bf)])||'.')),console['error']('\x20\x20Changes:\x20'+a55_0x47a174[_0x3015f3(0x1de)]('+'+_0x35813c[_0x3015f3(0x12a)][_0x3015f3(0x136)]+_0x3015f3(0xf2))+',\x20'+(a55_0x47a174[_0x3015f3(0x175)]('~'+_0x35813c[_0x3015f3(0x12a)][_0x3015f3(0x214)]+_0x3015f3(0x1f3))+',\x20')+(a55_0x47a174['red']('-'+_0x35813c['summary'][_0x3015f3(0x16f)]+'\x20deleted')+',\x20')+(''+a55_0x47a174[_0x3015f3(0x225)](_0x35813c[_0x3015f3(0x12a)][_0x3015f3(0x1b7)]+_0x3015f3(0x22b))));for(const _0x4a6ea5 of _0x35813c[_0x3015f3(0x1a7)]){_0x4a6ea5[_0x3015f3(0x11a)]===_0x3015f3(0x214)&&_0x4a6ea5[_0x3015f3(0x18c)]&&(console[_0x3015f3(0x19c)]('\x0a'+a55_0x47a174[_0x3015f3(0x138)](_0x3015f3(0x24e)+_0x4a6ea5[_0x3015f3(0x100)])),console['error'](_0x4a6ea5['diff']));}if(!_0x35813c[_0x3015f3(0x1f4)])return saveSessionContext({'workflow_project':_0x35813c[_0x3015f3(0x1be)]},_0x2e0004['session']),console[_0x3015f3(0x19c)](a55_0x47a174[_0x3015f3(0x1de)]('\x0a✔\x20Already\x20up\x20to\x20date')),console['error'](a55_0x47a174[_0x3015f3(0x225)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x35813c[_0x3015f3(0x1be)])),0x0;if(_0x2e0004[_0x3015f3(0xa6)])return console[_0x3015f3(0x19c)](a55_0x47a174['yellow'](_0x3015f3(0x13d))),0x0;if(!_0x2e0004['yes']){if(!isInteractive())return console[_0x3015f3(0x19c)](a55_0x47a174[_0x3015f3(0x25a)]('\x0aError:'),_0x3015f3(0xb3)),console[_0x3015f3(0x19c)](a55_0x47a174['dim'](_0x3015f3(0x24f))),0x1;const _0x4c2e10=await confirmKey(_0x3015f3(0xc8));if(!_0x4c2e10)return console[_0x3015f3(0x19c)](a55_0x47a174['yellow']('Cancelled'),_0x3015f3(0x10a)),0x1;}await withSpinner(_0x3015f3(0x1b8),()=>_0x588042[_0x3015f3(0x1f9)][_0x3015f3(0x113)](_0x35813c,{'revision':_0x19c1a4}),{'verbose':_0x2e0004[_0x3015f3(0x1af)]}),saveSessionContext({'workflow_project':_0x35813c[_0x3015f3(0x1be)]},_0x2e0004[_0x3015f3(0x1a2)]),console[_0x3015f3(0x19c)](a55_0x47a174[_0x3015f3(0x1de)](_0x3015f3(0x202)));const _0x235633=a55_0x4d0954[_0x3015f3(0x1fe)](process[_0x3015f3(0x20b)](),_0x35813c[_0x3015f3(0x1bf)])||'.';return console['error'](a55_0x47a174[_0x3015f3(0x225)](_0x3015f3(0x215)+_0x235633)),console['error'](a55_0x47a174[_0x3015f3(0x225)](_0x3015f3(0x1ae)+_0x35813c[_0x3015f3(0x1be)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]='workflow:push';[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x23e);async['execute'](_0x4b29ad){const _0x12932c=a55_0x5029cc,{options:_0x1edfe5,args:_0x555083,tdx:_0x2981fc}=_0x4b29ad,_0x1f4bd2=this[_0x12932c(0x13e)](_0x555083,_0x1edfe5),_0x361655=_0x1edfe5,{revision:_0x902a4c,skipValidation:_0x4d3a4a,backfill:_0x52123a}=_0x361655,_0x2bbee3=_0x52123a===undefined?undefined:!_0x52123a;_0x1edfe5['verbose']&&(_0x1f4bd2&&console['error'](_0x12932c(0x8d)+_0x1f4bd2),_0x902a4c&&console['error'](_0x12932c(0xc4)+_0x902a4c),_0x1edfe5['dryRun']&&console['error'](_0x12932c(0x11c)),_0x4d3a4a&&console['error'](_0x12932c(0x228)),_0x52123a&&console[_0x12932c(0x19c)]('Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)'));let _0x260d83;try{_0x260d83=await withSpinner(_0x12932c(0x109),()=>_0x2981fc['workflow'][_0x12932c(0x1d0)]({'sourceDir':_0x1f4bd2,'revision':_0x902a4c,'skipValidation':_0x4d3a4a,'skipSchedule':_0x2bbee3}),{'verbose':_0x1edfe5[_0x12932c(0x1af)]});}catch(_0x5337ca){if(_0x5337ca instanceof Error&&_0x5337ca[_0x12932c(0x206)][_0x12932c(0xdf)](_0x12932c(0xa4)))return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x25a)](_0x12932c(0x25b)),_0x12932c(0x157)),_0x1edfe5[_0x12932c(0x149)]?console[_0x12932c(0x19c)](a55_0x47a174['dim'](_0x12932c(0x187)+_0x1edfe5[_0x12932c(0x149)]+_0x12932c(0x179)+_0x1edfe5[_0x12932c(0x149)]+'\x27')):console[_0x12932c(0x19c)](a55_0x47a174['dim']('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x5337ca;}const _0x3fca9f=_0x260d83[_0x12932c(0x1a8)];console['error']('✔\x20Project:\x20'+_0x3fca9f[_0x12932c(0x1be)]),console[_0x12932c(0x19c)](_0x12932c(0x9d)+_0x3fca9f[_0x12932c(0x1ac)]),console[_0x12932c(0x19c)](_0x12932c(0x269)+_0x3fca9f['revision']),console[_0x12932c(0x19c)]('\x20\x20Changes:\x20'+a55_0x47a174[_0x12932c(0x1de)]('+'+_0x3fca9f[_0x12932c(0x12a)][_0x12932c(0x136)]+_0x12932c(0xf2))+',\x20'+(a55_0x47a174[_0x12932c(0x175)]('~'+_0x3fca9f[_0x12932c(0x12a)][_0x12932c(0x214)]+_0x12932c(0x1f3))+',\x20')+(a55_0x47a174[_0x12932c(0x25a)]('-'+_0x3fca9f['summary'][_0x12932c(0x16f)]+_0x12932c(0x148))+',\x20')+(''+a55_0x47a174['dim'](_0x3fca9f[_0x12932c(0x12a)][_0x12932c(0x1b7)]+'\x20unchanged')));for(const _0x2789d1 of _0x3fca9f['changes']){_0x2789d1[_0x12932c(0x11a)]==='modified'&&_0x2789d1[_0x12932c(0x18c)]&&(console['error']('\x0a'+a55_0x47a174[_0x12932c(0x138)](_0x12932c(0x24e)+_0x2789d1[_0x12932c(0x100)])),console[_0x12932c(0x19c)](_0x2789d1[_0x12932c(0x18c)]));}if(!_0x3fca9f[_0x12932c(0x1f4)])return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x1de)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x12932c(0xd3)](_0x2981fc,_0x3fca9f[_0x12932c(0x1be)],_0x1edfe5['site']),0x0;if(_0x1edfe5[_0x12932c(0xa6)])return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x175)](_0x12932c(0x253))),0x0;if(!_0x1edfe5['yes']){if(!isInteractive())return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x25a)](_0x12932c(0x1ff)),_0x12932c(0xb3)),console[_0x12932c(0x19c)](a55_0x47a174['dim'](_0x12932c(0x24f))),0x1;const _0x5ccc83=await confirmKey(_0x12932c(0x115));if(!_0x5ccc83)return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x175)](_0x12932c(0x163)),_0x12932c(0x18e)),0x1;}const _0x480832=await withSpinner(_0x12932c(0xc6),()=>_0x2981fc[_0x12932c(0x1f9)][_0x12932c(0x176)](_0x3fca9f),{'verbose':_0x1edfe5[_0x12932c(0x1af)]}),_0x293216=_0x480832[_0x12932c(0x1a8)];return console[_0x12932c(0x19c)](a55_0x47a174[_0x12932c(0x1de)](_0x12932c(0x258))),console[_0x12932c(0x19c)](_0x12932c(0x1cd)+_0x293216['projectId']),console['error'](_0x12932c(0x269)+_0x293216[_0x12932c(0x26e)]),await this[_0x12932c(0xd3)](_0x2981fc,_0x293216[_0x12932c(0x1be)],_0x1edfe5['site']),0x0;}}function a55_0x5cbb(_0x52dc05,_0x32fc32){_0x52dc05=_0x52dc05-0x8b;const _0x4d42d7=a55_0x4d42();let _0x5cbb1a=_0x4d42d7[_0x52dc05];return _0x5cbb1a;}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]='workflow:clone';[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x10f);async[a55_0x5029cc(0x196)](_0x220685){const _0x22fa2a=a55_0x5029cc,{options:_0x4d07e6,args:_0x33e23f,tdx:_0x5a657d}=_0x220685,_0x302d8c=this[_0x22fa2a(0x13e)](_0x33e23f,_0x4d07e6),_0x48b35a=_0x4d07e6[_0x22fa2a(0x260)],_0x4277c4=_0x4d07e6['revision'],_0x4279df=_0x4d07e6[_0x22fa2a(0xfd)];if(!_0x302d8c)return console['error'](a55_0x47a174[_0x22fa2a(0x25a)](_0x22fa2a(0x25b)),_0x22fa2a(0x25e)),console[_0x22fa2a(0x19c)](a55_0x47a174['dim'](_0x22fa2a(0x147))),console['error'](a55_0x47a174['dim'](_0x22fa2a(0x1fa))),0x1;if(!_0x48b35a)return console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x25a)](_0x22fa2a(0x25b)),_0x22fa2a(0x19e)),console[_0x22fa2a(0x19c)](a55_0x47a174['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x4d07e6[_0x22fa2a(0x1af)]&&(console['error'](_0x22fa2a(0x8d)+_0x302d8c),console['error']('New\x20project\x20name:\x20'+_0x48b35a),_0x4277c4&&console['error'](_0x22fa2a(0xc4)+_0x4277c4),_0x4d07e6[_0x22fa2a(0xa6)]&&console['error'](_0x22fa2a(0x11c)),_0x4279df&&console[_0x22fa2a(0x19c)](_0x22fa2a(0x228)));const _0x3b90d9=await withSpinner('Analyzing\x20project...',()=>_0x5a657d['workflow']['prepareCloneProject'](_0x302d8c,_0x48b35a,{'revision':_0x4277c4,'skipValidation':_0x4279df}),{'verbose':_0x4d07e6[_0x22fa2a(0x1af)]}),_0x3e1e90=_0x3b90d9[_0x22fa2a(0x1a8)];console['error'](_0x22fa2a(0x183)+_0x3e1e90[_0x22fa2a(0x1ac)]);_0x3e1e90['sourceProjectName']&&console[_0x22fa2a(0x19c)](_0x22fa2a(0xca)+_0x3e1e90[_0x22fa2a(0x192)]);console['error'](_0x22fa2a(0x161)+_0x3e1e90[_0x22fa2a(0xf6)]),console[_0x22fa2a(0x19c)]('Revision:\x20'+_0x3e1e90[_0x22fa2a(0x26e)]),console['error']('Files\x20to\x20upload:\x20'+_0x3e1e90[_0x22fa2a(0x23f)]);_0x3e1e90[_0x22fa2a(0x1e0)]&&(console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x175)](_0x22fa2a(0xfb)+_0x3e1e90['newProjectName']+_0x22fa2a(0xc3)+_0x3e1e90[_0x22fa2a(0x1bb)]+')')),console[_0x22fa2a(0x19c)](a55_0x47a174['yellow'](_0x22fa2a(0x211))));if(_0x4d07e6[_0x22fa2a(0xa6)])return console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x175)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x4d07e6['yes']){if(!isInteractive())return console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x25a)]('\x0aError:'),_0x22fa2a(0xb3)),console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x225)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x284ea9=_0x3e1e90['sourceProjectName']||a55_0x4d0954[_0x22fa2a(0x273)](_0x302d8c),_0x535d70=_0x3e1e90[_0x22fa2a(0x1e0)]?_0x22fa2a(0x186)+_0x48b35a+'\x22\x20with\x20new\x20revision?':_0x22fa2a(0x90)+_0x284ea9+_0x22fa2a(0x129)+_0x48b35a+'\x22?',_0x381a27=await confirmKey(_0x535d70);if(!_0x381a27)return console['error'](a55_0x47a174[_0x22fa2a(0x175)]('Cancelled')),0x1;}const _0x129849=await withSpinner(_0x3e1e90[_0x22fa2a(0x1e0)]?_0x22fa2a(0x120)+_0x48b35a+'...':_0x22fa2a(0x1b2)+_0x48b35a+_0x22fa2a(0x234),()=>_0x5a657d[_0x22fa2a(0x1f9)][_0x22fa2a(0x15e)](_0x3e1e90),{'verbose':_0x4d07e6['verbose']}),_0x1a006b=_0x129849[_0x22fa2a(0x1a8)];return console[_0x22fa2a(0x19c)](a55_0x47a174[_0x22fa2a(0x1de)](_0x3e1e90[_0x22fa2a(0x1e0)]?_0x22fa2a(0xbe):'✔\x20Clone\x20complete')),console[_0x22fa2a(0x19c)](_0x22fa2a(0x12f)+_0x1a006b[_0x22fa2a(0xf6)]),console[_0x22fa2a(0x19c)]('\x20\x20Project\x20ID:\x20'+_0x1a006b['newProjectId']),console['error'](_0x22fa2a(0x269)+_0x1a006b['revision']),await this[_0x22fa2a(0xd3)](_0x5a657d,_0x1a006b[_0x22fa2a(0xf6)],_0x4d07e6[_0x22fa2a(0x9a)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x170);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x17a);async[a55_0x5029cc(0x196)](_0x3eac70){const _0x28388b=a55_0x5029cc,{options:_0x4f8b07,args:_0x3fea73,tdx:_0x466226}=_0x3eac70,_0x317a57=_0x3fea73[0x0];if(!_0x317a57)return console[_0x28388b(0x19c)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x28388b(0x19c)](_0x28388b(0x14a)),0x1;_0x4f8b07[_0x28388b(0x1af)]&&console['error'](_0x28388b(0x24b)+_0x317a57);if(!_0x4f8b07[_0x28388b(0x262)]){if(!isInteractive())return console['error'](a55_0x47a174[_0x28388b(0x25a)]('\x0aError:'),_0x28388b(0xb3)),console[_0x28388b(0x19c)](a55_0x47a174[_0x28388b(0x225)](_0x28388b(0x24f))),0x1;const _0x3b013a=await confirmKey(_0x28388b(0x11b)+_0x317a57+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3b013a)return console[_0x28388b(0x19c)](a55_0x47a174['yellow'](_0x28388b(0x163))),0x1;}const _0x134ab9=await withSpinner(_0x28388b(0x1db)+_0x317a57+_0x28388b(0x234),()=>_0x466226[_0x28388b(0x1f9)][_0x28388b(0xff)](_0x317a57),{'verbose':_0x4f8b07[_0x28388b(0x1af)]}),_0x4524dd=_0x134ab9[_0x28388b(0x1a8)];return console['error']('✔\x20Deleted\x20project\x20'+_0x4524dd[_0x28388b(0x1be)]),console[_0x28388b(0x19c)]('\x20\x20Project\x20ID:\x20'+_0x4524dd[_0x28388b(0x201)]),0x0;}}export function parseKeyValue(_0xb0660f){const _0x3f578a=a55_0x5029cc,_0x4c68b6=_0xb0660f[_0x3f578a(0x1ad)]('=');if(_0x4c68b6===-0x1)throw new Error(_0x3f578a(0x19a)+_0xb0660f+_0x3f578a(0x20f));const _0x4c04ba=_0xb0660f['substring'](0x0,_0x4c68b6),_0x3d9d73=_0xb0660f[_0x3f578a(0x17d)](_0x4c68b6+0x1);if(!_0x4c04ba)throw new Error(_0x3f578a(0x106));return{'key':_0x4c04ba,'value':_0x3d9d73};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x1f6);['description']=a55_0x5029cc(0x160);async[a55_0x5029cc(0x196)](_0x4b9e20){const _0xcfef84=a55_0x5029cc,{options:_0x11cf6c,args:_0x76dd07,tdx:_0x3177bb}=_0x4b9e20,_0x25b01e=this[_0xcfef84(0x1e3)](_0x76dd07,_0x11cf6c);if(!_0x25b01e)return 0x1;_0x11cf6c[_0xcfef84(0x1af)]&&console[_0xcfef84(0x19c)](_0xcfef84(0x24b)+_0x25b01e);const _0x497b0e=await withSpinner(_0xcfef84(0xa1),()=>_0x3177bb[_0xcfef84(0x1f9)][_0xcfef84(0xe2)](_0x25b01e),{'verbose':_0x11cf6c['verbose']}),{secrets:_0x3f0811}=_0x497b0e[_0xcfef84(0x1a8)];return console[_0xcfef84(0x19c)]('✔\x20Found\x20'+_0x3f0811[_0xcfef84(0x1d7)]+_0xcfef84(0x1e4)+(_0x3f0811['length']!==0x1?'s':'')),await handleSDKOutput(_0x3f0811,_0x11cf6c),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x15c);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x103);async['execute'](_0x1ba151){const _0x257cc3=a55_0x5029cc,{options:_0x1dc692,args:_0x879ca3,tdx:_0x274d02}=_0x1ba151;let _0x5d55ed,_0x29e766;if(_0x879ca3[_0x257cc3(0x1d7)]>=0x1&&!_0x879ca3[0x0][_0x257cc3(0xdf)]('='))_0x5d55ed=_0x879ca3[0x0],_0x29e766=_0x879ca3[_0x257cc3(0x1b0)](0x1);else{if(_0x879ca3[_0x257cc3(0x1d7)]>=0x1&&_0x1dc692[_0x257cc3(0x149)])_0x5d55ed=_0x1dc692['workflowProject'],_0x29e766=_0x879ca3;else return _0x879ca3['length']>=0x1?(console['error']('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x257cc3(0x1e9)),0x1):(console[_0x257cc3(0x19c)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x257cc3(0x19c)](_0x257cc3(0x105)),0x1);}if(_0x29e766[_0x257cc3(0x1d7)]===0x0)return console['error'](_0x257cc3(0x1c9)),console[_0x257cc3(0x19c)](_0x257cc3(0x105)),0x1;const _0x2b1270={};try{for(const _0x4906dc of _0x29e766){const {key:_0x44f827,value:_0x4ae683}=parseKeyValue(_0x4906dc);_0x2b1270[_0x44f827]=_0x4ae683;}}catch(_0x3b33b8){return _0x3b33b8 instanceof Error&&console[_0x257cc3(0x19c)](a55_0x47a174[_0x257cc3(0x25a)]('Error:'),_0x3b33b8[_0x257cc3(0x206)]),0x1;}const _0x561b8c=Object['keys'](_0x2b1270);_0x1dc692[_0x257cc3(0x1af)]&&(console[_0x257cc3(0x19c)](_0x257cc3(0x24b)+_0x5d55ed),console[_0x257cc3(0x19c)](_0x257cc3(0x16c)+_0x561b8c[_0x257cc3(0x1a6)](',\x20')));const _0x5cc22b=await withSpinner(_0x561b8c[_0x257cc3(0x1d7)]===0x1?'Setting\x20secret...':_0x257cc3(0xe8)+_0x561b8c[_0x257cc3(0x1d7)]+_0x257cc3(0xb8),()=>_0x274d02['workflow']['setSecrets'](_0x5d55ed,_0x2b1270),{'verbose':_0x1dc692['verbose']}),_0x3b5174=_0x5cc22b[_0x257cc3(0x1a8)];return console['error'](_0x561b8c[_0x257cc3(0x1d7)]===0x1?_0x257cc3(0xe6)+_0x3b5174['keys'][0x0]+_0x257cc3(0x23c)+_0x3b5174[_0x257cc3(0x1be)]+'\x27':'✔\x20'+_0x3b5174[_0x257cc3(0xb6)][_0x257cc3(0x1d7)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x3b5174[_0x257cc3(0x1be)]+'\x27'),(_0x1dc692[_0x257cc3(0xce)]||_0x1dc692[_0x257cc3(0xf9)])&&await handleSingleObjectOutput(_0x3b5174,_0x1dc692),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a55_0x5029cc(0x208);['description']=a55_0x5029cc(0x16e);async['execute'](_0x20fc9d){const _0xaa19a=a55_0x5029cc,{options:_0x22aede,args:_0x5db66d,tdx:_0x57aee9}=_0x20fc9d;let _0x39a498,_0x33da18;if(_0x5db66d[_0xaa19a(0x1d7)]>=0x2)_0x39a498=_0x5db66d[0x0],_0x33da18=_0x5db66d[0x1];else{if(_0x5db66d[_0xaa19a(0x1d7)]===0x1&&_0x22aede[_0xaa19a(0x149)])_0x39a498=_0x22aede['workflowProject'],_0x33da18=_0x5db66d[0x0];else return _0x5db66d['length']===0x1?(console[_0xaa19a(0x19c)](_0xaa19a(0x172)),console[_0xaa19a(0x19c)](_0xaa19a(0x1e9)),0x1):(console[_0xaa19a(0x19c)](_0xaa19a(0xa2)),console['error'](_0xaa19a(0x1ab)),0x1);}_0x22aede[_0xaa19a(0x1af)]&&(console[_0xaa19a(0x19c)](_0xaa19a(0x24b)+_0x39a498),console['error'](_0xaa19a(0x218)+_0x33da18));if(!_0x22aede[_0xaa19a(0x262)]){if(!isInteractive())return console['error'](a55_0x47a174[_0xaa19a(0x25a)](_0xaa19a(0x1ff)),_0xaa19a(0xb3)),console[_0xaa19a(0x19c)](a55_0x47a174[_0xaa19a(0x225)](_0xaa19a(0x24f))),0x1;const _0x24c9c8=await confirmKey(_0xaa19a(0x243)+_0x33da18+_0xaa19a(0x14e)+_0x39a498+'\x27?');if(!_0x24c9c8)return console[_0xaa19a(0x19c)](a55_0x47a174[_0xaa19a(0x175)](_0xaa19a(0x163))),0x1;}const _0x9f1ca9=await withSpinner(_0xaa19a(0xc0),()=>_0x57aee9['workflow']['deleteSecret'](_0x39a498,_0x33da18),{'verbose':_0x22aede[_0xaa19a(0x1af)]}),_0x1f4152=_0x9f1ca9[_0xaa19a(0x1a8)];return console[_0xaa19a(0x19c)](_0xaa19a(0xe6)+_0x1f4152[_0xaa19a(0x114)]+_0xaa19a(0x94)+_0x1f4152[_0xaa19a(0x1be)]+'\x27'),(_0x22aede['json']||_0x22aede[_0xaa19a(0xf9)])&&await handleSingleObjectOutput(_0x1f4152,_0x22aede),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(_0x3558d7){const _0x1e8bc4=a55_0x5029cc,_0x518c4d=Math[_0x1e8bc4(0xac)](_0x3558d7/0x3e8),_0x85a067=Math[_0x1e8bc4(0xac)](_0x518c4d/0x3c),_0x476e44=Math['floor'](_0x85a067/0x3c),_0x256c0a=Math[_0x1e8bc4(0xac)](_0x476e44/0x18);if(_0x256c0a>0x0){const _0x1ed80c=_0x476e44%0x18;return _0x1ed80c>0x0?_0x256c0a+'d\x20'+_0x1ed80c+'h':_0x256c0a+'d';}else{if(_0x476e44>0x0){const _0x1ba45f=_0x85a067%0x3c;return _0x1ba45f>0x0?_0x476e44+'h\x20'+_0x1ba45f+'m':_0x476e44+'h';}else{if(_0x85a067>0x0){const _0x33e2d7=_0x518c4d%0x3c;return _0x33e2d7>0x0?_0x85a067+'m\x20'+_0x33e2d7+'s':_0x85a067+'m';}else return _0x518c4d+'s';}}}function formatTimestamp(_0x9193fd,_0x5cb471){const _0x3c543f=a55_0x5029cc,_0x50c364=new Date(_0x9193fd),_0x5c8cfb=String(_0x50c364[_0x3c543f(0x1d5)]())[_0x3c543f(0x1c0)](0x2,'0'),_0x52eb20=String(_0x50c364[_0x3c543f(0xa0)]())[_0x3c543f(0x1c0)](0x2,'0'),_0x5cda2e=_0x5c8cfb+':'+_0x52eb20,_0x487d3a=_0x50c364[_0x3c543f(0x11d)]()===_0x5cb471[_0x3c543f(0x11d)]()&&_0x50c364[_0x3c543f(0x245)]()===_0x5cb471['getMonth']()&&_0x50c364['getDate']()===_0x5cb471[_0x3c543f(0x18f)]();if(_0x487d3a)return _0x5cda2e;else{const _0x55394a=String(_0x50c364[_0x3c543f(0x245)]()+0x1)['padStart'](0x2,'0'),_0x2acc70=String(_0x50c364[_0x3c543f(0x18f)]())[_0x3c543f(0x1c0)](0x2,'0');return _0x55394a+'-'+_0x2acc70+'\x20'+_0x5cda2e;}}function formatDate(_0x443583){const _0x334b9e=a55_0x5029cc,_0x3fde10=_0x443583['getFullYear'](),_0x3717d0=String(_0x443583['getMonth']()+0x1)[_0x334b9e(0x1c0)](0x2,'0'),_0x5853f9=String(_0x443583[_0x334b9e(0x18f)]())[_0x334b9e(0x1c0)](0x2,'0');return _0x3fde10+'-'+_0x3717d0+'-'+_0x5853f9;}function getTaskStateIcon(_0x511ef2){const _0x1905b1={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1905b1[_0x511ef2]||'⚪';}function getBarChar(_0x18dace){const _0x23a78e=a55_0x5029cc;return _0x18dace===_0x23a78e(0x19c)||_0x18dace===_0x23a78e(0x140)?'×':'─';}function getBarColor(_0x23d02e){const _0x4046cd=a55_0x5029cc,_0x1213ec={'success':a55_0x47a174[_0x4046cd(0x1de)],'error':a55_0x47a174[_0x4046cd(0x25a)],'group_error':a55_0x47a174['red'],'running':a55_0x47a174['blue'],'blocked':a55_0x47a174[_0x4046cd(0x175)],'planned':a55_0x47a174[_0x4046cd(0x225)],'canceling':a55_0x47a174[_0x4046cd(0x175)]};return _0x1213ec[_0x23d02e]||a55_0x47a174[_0x4046cd(0x1b1)];}function parseTaskName(_0x252d83){const _0x5d881d=a55_0x5029cc;let _0x15c5e5=_0x252d83[_0x5d881d(0x22f)](/^\++/,'');const _0x29f144=_0x15c5e5['split']('+'),_0x38879c=_0x29f144[_0x5d881d(0x1d7)]>0x1?_0x29f144['length']-0x2:0x0,_0x367b77=_0x29f144[_0x29f144['length']-0x1]||_0x15c5e5;return{'level':_0x38879c,'name':'+'+_0x367b77};}function truncateTaskName(_0x5bf110,_0x5cc51f){const _0x2dcf09=a55_0x5029cc,_0x14df40=stringWidth(_0x5bf110);if(_0x14df40<=_0x5cc51f)return _0x5bf110;let _0x20132f=_0x5bf110;while(stringWidth(_0x20132f+'…')>_0x5cc51f&&_0x20132f[_0x2dcf09(0x1d7)]>0x0){_0x20132f=_0x20132f[_0x2dcf09(0x1b0)](0x0,-0x1);}return _0x20132f+'…';}function calculateTimeScale(_0x3aadf7,_0x5c278f){const _0x23094a=a55_0x5029cc;return{'startTime':_0x3aadf7[_0x23094a(0x9c)],'endTime':_0x3aadf7[_0x23094a(0xb2)],'durationMs':_0x3aadf7[_0x23094a(0x21a)],'msPerChar':_0x3aadf7[_0x23094a(0x21a)]/_0x5c278f};}function timeToPosition(_0x2d103c,_0x57cd14,_0x3b0503){const _0x478c2e=a55_0x5029cc,_0x429224=_0x2d103c-_0x57cd14[_0x478c2e(0x255)],_0x4519d2=Math['floor'](_0x429224/_0x57cd14['msPerChar']);return Math[_0x478c2e(0x119)](0x0,Math['min'](_0x4519d2,_0x3b0503));}function renderTimeAxis(_0x854754,_0x3b012f){const _0xd8d4df=a55_0x5029cc,_0x591ef3=Math[_0xd8d4df(0x226)](TIMELINE_CONFIG[_0xd8d4df(0x1e5)],Math['max'](TIMELINE_CONFIG[_0xd8d4df(0x91)],Math[_0xd8d4df(0xac)](_0x3b012f/TIMELINE_CONFIG[_0xd8d4df(0x1aa)]))),_0x39ba21=_0x854754['durationMs']/(_0x591ef3-0x1),_0x896d5d=new Date(_0x854754[_0xd8d4df(0x255)]),_0x5a75b3=[];for(let _0x1d6ec5=0x0;_0x1d6ec5<_0x591ef3;_0x1d6ec5++){const _0x2a6074=_0x854754[_0xd8d4df(0x255)]+_0x1d6ec5*_0x39ba21,_0xbbaab9=timeToPosition(_0x2a6074,_0x854754,_0x3b012f),_0x3bf48f=formatTimestamp(_0x2a6074,_0x896d5d);_0x5a75b3[_0xd8d4df(0x221)]({'pos':_0xbbaab9,'text':_0x3bf48f});}const _0x5da7aa=new Array(_0x3b012f)[_0xd8d4df(0x156)]('\x20');let _0x2d18a6=-0x1;for(const {pos:_0xf9c7a0,text:_0x3b3a7c}of _0x5a75b3){let _0x32dfaa=Math[_0xd8d4df(0x119)](0x0,_0xf9c7a0-Math[_0xd8d4df(0xac)](_0x3b3a7c[_0xd8d4df(0x1d7)]/0x2));_0x32dfaa<=_0x2d18a6+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x32dfaa=_0x2d18a6+TIMELINE_CONFIG[_0xd8d4df(0x272)]+0x1);_0x32dfaa+_0x3b3a7c[_0xd8d4df(0x1d7)]>_0x3b012f&&(_0x32dfaa=_0x3b012f-_0x3b3a7c[_0xd8d4df(0x1d7)]);if(_0x32dfaa>=0x0&&_0x32dfaa+_0x3b3a7c['length']<=_0x3b012f&&_0x32dfaa>_0x2d18a6){for(let _0x58256e=0x0;_0x58256e<_0x3b3a7c[_0xd8d4df(0x1d7)];_0x58256e++){_0x5da7aa[_0x32dfaa+_0x58256e]=_0x3b3a7c[_0x58256e];}_0x2d18a6=_0x32dfaa+_0x3b3a7c[_0xd8d4df(0x1d7)]-0x1;}}return _0x5da7aa[_0xd8d4df(0x1a6)]('');}function renderTaskRow(_0x16f4cb,_0x2b7253,_0x1c567c,_0xb33ac){const _0x25325e=a55_0x5029cc,{level:_0xf787a7,name:_0x4863a9}=parseTaskName(_0x16f4cb[_0x25325e(0x260)]),_0x1aa46a='\x20'[_0x25325e(0xab)](_0xf787a7),_0x5b4252=_0x16f4cb[_0x25325e(0x188)]?'('+formatElapsed(_0x16f4cb[_0x25325e(0x188)][_0x25325e(0x21a)])+')':'',_0x26b53b=stringWidth(_0x5b4252),_0xefafa0=_0xf787a7*0x1,_0x1890fd=_0xb33ac-_0xefafa0-_0x26b53b-0x1,_0x435d21=truncateTaskName(_0x4863a9,_0x1890fd),_0x152c2f=_0x1aa46a+_0x435d21,_0x20e729=stringWidth(_0x152c2f),_0x6b0d3b=_0xb33ac-_0x20e729-_0x26b53b,_0x14dcd8=_0x152c2f+'\x20'['repeat'](Math[_0x25325e(0x119)](0x1,_0x6b0d3b))+a55_0x47a174[_0x25325e(0x225)](_0x5b4252),_0x5331ee=getTaskStateIcon(_0x16f4cb[_0x25325e(0x11f)]),_0x33bc56=new Array(_0x1c567c)[_0x25325e(0x156)]('\x20');if(_0x16f4cb[_0x25325e(0x188)]){const _0x5f5df9=timeToPosition(_0x16f4cb[_0x25325e(0x188)][_0x25325e(0x9c)],_0x2b7253,_0x1c567c),_0x1d2dad=timeToPosition(_0x16f4cb['window'][_0x25325e(0xb2)],_0x2b7253,_0x1c567c),_0x42ac2b=getBarChar(_0x16f4cb[_0x25325e(0x11f)]),_0x4335be=Math['max'](_0x5f5df9+0x1,_0x1d2dad);for(let _0x55df1f=_0x5f5df9;_0x55df1f<Math[_0x25325e(0x226)](_0x4335be,_0x1c567c);_0x55df1f++){_0x33bc56[_0x55df1f]=_0x42ac2b;}}const _0x4c3d20=getBarColor(_0x16f4cb[_0x25325e(0x11f)]),_0x15154f=_0x33bc56[_0x25325e(0x14d)](_0x1844de=>_0x1844de==='\x20'?'\x20':_0x4c3d20(_0x1844de))[_0x25325e(0x1a6)]('');return _0x5331ee+'\x20'+_0x14dcd8+'│'+_0x15154f+'│';}function calculateStats(_0x192cdf){const _0x178f91=a55_0x5029cc,_0x441599={'total':_0x192cdf[_0x178f91(0x1d7)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x1665a7 of _0x192cdf){if(_0x1665a7[_0x178f91(0x11f)]===_0x178f91(0x1ca))_0x441599[_0x178f91(0x1ca)]++;else{if(_0x1665a7[_0x178f91(0x11f)]==='error'||_0x1665a7[_0x178f91(0x11f)]===_0x178f91(0x140))_0x441599[_0x178f91(0x19c)]++;else _0x1665a7['state']===_0x178f91(0x97)?_0x441599[_0x178f91(0x97)]++:_0x441599[_0x178f91(0xda)]++;}}return _0x441599;}function formatStats(_0x13d4ef){const _0x4bfcd8=a55_0x5029cc;return[_0x4bfcd8(0x1b3)+_0x13d4ef[_0x4bfcd8(0x169)],'✅\x20'+_0x13d4ef[_0x4bfcd8(0x1ca)],'❌\x20'+_0x13d4ef[_0x4bfcd8(0x19c)],_0x4bfcd8(0x26a)+_0x13d4ef[_0x4bfcd8(0x97)],'⏳\x20'+_0x13d4ef[_0x4bfcd8(0xda)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x17e);[a55_0x5029cc(0x1ee)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a55_0x5029cc(0x196)](_0x1e6e4c){const _0x3842c9=a55_0x5029cc,{options:_0x2e4d94,args:_0x3f6c9c,tdx:_0x3715c1}=_0x1e6e4c;let _0x3856d8,_0x3ae24b,_0x2dd3d2=![];if(_0x3f6c9c[0x0]){if(_0x3f6c9c[0x0]['includes']('.')){const _0x5792a4=this[_0x3842c9(0x1e1)](_0x3f6c9c,_0x2e4d94);if(!_0x5792a4)return 0x1;_0x3856d8=_0x5792a4[_0x3842c9(0x1be)],_0x3ae24b=_0x5792a4['workflowName'];}else{_0x3ae24b=_0x3f6c9c[0x0],_0x3856d8=_0x2e4d94[_0x3842c9(0x149)];if(!_0x3856d8)return console[_0x3842c9(0x19c)](a55_0x47a174['red'](_0x3842c9(0x25b)),_0x3842c9(0x1e8)),0x1;_0x2dd3d2=!![];}}else{const _0x5d8ee3=this[_0x3842c9(0x1e1)](_0x3f6c9c,_0x2e4d94);if(!_0x5d8ee3)return 0x1;_0x3856d8=_0x5d8ee3[_0x3842c9(0x1be)],_0x3ae24b=_0x5d8ee3[_0x3842c9(0x13b)];}if(_0x2e4d94['verbose']){if(_0x3856d8&&_0x3ae24b)console[_0x3842c9(0x19c)](_0x3842c9(0x95)+_0x3856d8+'.'+_0x3ae24b);else _0x3856d8&&console[_0x3842c9(0x19c)](_0x3842c9(0xe7)+_0x3856d8);}const _0x5e9b2f=_0x2e4d94[_0x3842c9(0x259)],_0x4e2bd=_0x2e4d94[_0x3842c9(0x184)];if(_0x5e9b2f){_0x4e2bd&&console['error'](a55_0x47a174[_0x3842c9(0x175)](_0x3842c9(0x16b)),_0x3842c9(0xf7));const _0x54a271=_0x2e4d94['follow'];return _0x54a271?await this[_0x3842c9(0x13a)](_0x1e6e4c,_0x5e9b2f):await this[_0x3842c9(0xeb)](_0x1e6e4c,_0x5e9b2f,_0x2e4d94),0x0;}if(_0x4e2bd){const _0x1eb546=await withSpinner(_0x3842c9(0xae),()=>_0x3715c1['workflow']['sessions']({'projectName':_0x3856d8,'workflowName':_0x3ae24b,'limit':0x64}),{'verbose':_0x2e4d94['verbose']}),_0x536d53=_0x1eb546[_0x3842c9(0x1a8)][_0x3842c9(0x1df)](_0x5ad801=>_0x5ad801['id']===_0x4e2bd);if(!_0x536d53)return console[_0x3842c9(0x19c)](a55_0x47a174[_0x3842c9(0x25a)](_0x3842c9(0x25b)),'Session\x20not\x20found:\x20'+_0x4e2bd),0x1;if(!_0x536d53['lastAttempt']?.['id'])return console[_0x3842c9(0x19c)](a55_0x47a174[_0x3842c9(0x25a)](_0x3842c9(0x25b)),'Session\x20'+_0x4e2bd+_0x3842c9(0x1a5)),0x1;const _0x29ec52=_0x536d53[_0x3842c9(0xa9)]['id'];_0x2e4d94[_0x3842c9(0x1af)]&&console[_0x3842c9(0x19c)](_0x3842c9(0x248)+_0x29ec52+_0x3842c9(0x126)+_0x4e2bd);const _0x2e821d=_0x2e4d94[_0x3842c9(0x1a3)];return _0x2e821d?await this[_0x3842c9(0x13a)](_0x1e6e4c,_0x29ec52):await this[_0x3842c9(0xeb)](_0x1e6e4c,_0x29ec52,_0x2e4d94),0x0;}const _0x22cfd3=await withSpinner(_0x3842c9(0x17c),()=>_0x3715c1[_0x3842c9(0x1f9)][_0x3842c9(0xad)]({'projectName':_0x3856d8,'workflowName':_0x3ae24b,'limit':_0x2e4d94[_0x3842c9(0x1ec)]||0x32}),{'verbose':_0x2e4d94[_0x3842c9(0x1af)]}),_0x288073=_0x22cfd3['data'];if(_0x288073[_0x3842c9(0x1d7)]===0x0){if(_0x3856d8&&_0x3ae24b)console[_0x3842c9(0x19c)]('No\x20sessions\x20found\x20for:\x20'+_0x3856d8+'.'+_0x3ae24b);else _0x3856d8?console['error'](_0x3842c9(0x1c8)+_0x3856d8):(console[_0x3842c9(0x19c)](_0x3842c9(0x244)),console[_0x3842c9(0x19c)](a55_0x47a174[_0x3842c9(0x225)](_0x3842c9(0x246))));return 0x0;}_0x288073['sort']((_0x1e04f1,_0x1ca5be)=>{const _0x234f19=_0x3842c9,_0x297e56=_0x1e04f1[_0x234f19(0xf1)]||'',_0x10cca5=_0x1ca5be[_0x234f19(0xf1)]||'';return _0x10cca5[_0x234f19(0xa8)](_0x297e56);});if(_0x2e4d94['json']||_0x2e4d94['jsonl'])return await handleSDKOutput(_0x288073,_0x2e4d94),0x0;let _0x4c6047;if(_0x2dd3d2){const _0x50f383=_0x288073[0x0];if(!_0x50f383[_0x3842c9(0xa9)]?.['id'])return console['error'](_0x3842c9(0x122)),0x0;_0x4c6047=_0x50f383['lastAttempt']['id'],_0x2e4d94['verbose']&&console['error'](_0x3842c9(0x22a)+_0x50f383['sessionTime']);}else{const _0x3db6e5=_0x288073[_0x3842c9(0x14d)](_0xaafcf7=>{const _0x59412d=_0x3842c9,_0x452cd0=getAttemptStatusDisplay(_0xaafcf7[_0x59412d(0xa9)]);return{'title':_0xaafcf7[_0x59412d(0x1c1)]?.[_0x59412d(0x260)]+'.'+_0xaafcf7[_0x59412d(0x1f9)]?.[_0x59412d(0x260)]+_0x59412d(0x10c)+_0xaafcf7[_0x59412d(0xf1)]+'\x20'+_0x452cd0[_0x59412d(0x212)],'value':_0xaafcf7[_0x59412d(0xa9)]?.['id']||'','description':_0x452cd0[_0x59412d(0xa3)]};}),_0x567d64=await a55_0x110a93({'type':_0x3842c9(0x235),'name':'attemptId','message':_0x3842c9(0x159),'choices':_0x3db6e5[_0x3842c9(0xaf)](_0x4aab77=>_0x4aab77[_0x3842c9(0x11e)]!=='')});if(!_0x567d64['attemptId'])return 0x0;_0x4c6047=_0x567d64['attemptId'];}const _0x2d0531=_0x2e4d94[_0x3842c9(0x1a3)];return _0x2d0531?await this[_0x3842c9(0x13a)](_0x1e6e4c,_0x4c6047):await this[_0x3842c9(0xeb)](_0x1e6e4c,_0x4c6047,_0x2e4d94),0x0;}async[a55_0x5029cc(0xeb)](_0x3267c1,_0x2dbdea,_0x2fb1d5){const _0x2c23f4=a55_0x5029cc,{tdx:_0x3e07fc}=_0x3267c1;let _0xe5e158,_0x1b9008;try{[_0xe5e158,_0x1b9008]=await Promise['all']([_0x3e07fc[_0x2c23f4(0x1f9)][_0x2c23f4(0xcd)](_0x2dbdea),_0x3e07fc[_0x2c23f4(0x1f9)]['tasks'](_0x2dbdea,![])]);}catch(_0x3aaa9c){console[_0x2c23f4(0x19c)](a55_0x47a174[_0x2c23f4(0x25a)](_0x2c23f4(0x271)));_0x2fb1d5[_0x2c23f4(0x1af)]&&console[_0x2c23f4(0x19c)](_0x3aaa9c);throw _0x3aaa9c;}if(_0x2fb1d5['json']||_0x2fb1d5['jsonl']){const _0x88a371=this[_0x2c23f4(0x15f)](_0xe5e158,_0x1b9008);await handleSDKOutput([_0x88a371],_0x2fb1d5);return;}const _0x38be37=_0x3e07fc[_0x2c23f4(0x217)][_0x2c23f4(0x9a)],_0x4b116d=this[_0x2c23f4(0x1e2)](_0xe5e158,_0x1b9008,_0x38be37);console[_0x2c23f4(0x241)](_0x4b116d);}async[a55_0x5029cc(0x13a)](_0xdd6a45,_0x515c0b){const _0x429efd=a55_0x5029cc,{tdx:_0xe65221}=_0xdd6a45,_0x21f70d=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x211999=TIMELINE_CONFIG[_0x429efd(0x9b)];let _0x5307ff=0x0;while(_0x5307ff<_0x211999){process[_0x429efd(0x10d)][_0x429efd(0x15a)]&&process['stdout'][_0x429efd(0xc2)]('\x1bc');let _0x56b425,_0x71eeff;try{[_0x56b425,_0x71eeff]=await Promise[_0x429efd(0x1a9)]([_0xe65221[_0x429efd(0x1f9)][_0x429efd(0xcd)](_0x515c0b),_0xe65221[_0x429efd(0x1f9)][_0x429efd(0xc1)](_0x515c0b,![])]);}catch(_0x3866ed){console[_0x429efd(0x19c)](a55_0x47a174['red'](_0x429efd(0x1f2)));_0x5307ff>0x0&&console['error'](a55_0x47a174[_0x429efd(0x225)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x5307ff));throw _0x3866ed;}const _0xe043b2=_0xe65221[_0x429efd(0x217)][_0x429efd(0x9a)],_0x28fca6=this[_0x429efd(0x1e2)](_0x56b425,_0x71eeff,_0xe043b2);console['log'](_0x28fca6);const _0x5cc128=_0x56b425[_0x429efd(0xde)]&&_0x71eeff[_0x429efd(0xf4)](_0x38f171=>_0x38f171[_0x429efd(0x11f)]!==_0x429efd(0x97)&&_0x38f171[_0x429efd(0x11f)]!==_0x429efd(0x231));if(_0x5cc128){console['error'](a55_0x47a174['green']('\x0a✔\x20Attempt\x20complete'));break;}console[_0x429efd(0x19c)](a55_0x47a174[_0x429efd(0x225)]('\x0aPolling...\x20('+_0x5307ff*0x2+_0x429efd(0x20a))),await new Promise(_0x2956a9=>setTimeout(_0x2956a9,_0x21f70d)),_0x5307ff++;}_0x5307ff>=_0x211999&&console[_0x429efd(0x19c)](a55_0x47a174[_0x429efd(0x175)](_0x429efd(0x130)));}[a55_0x5029cc(0x1e2)](_0x15f0fa,_0x1d9c93,_0x210cd7){const _0x2e7d66=a55_0x5029cc,_0x49ab7c=[],_0x304e09=TIMELINE_CONFIG[_0x2e7d66(0x12d)],_0xfad827=0x5,_0x310725=process[_0x2e7d66(0x10d)][_0x2e7d66(0x127)]||0x78,_0x43e850=_0x310725-_0x304e09-_0xfad827,_0x2d9928=Math[_0x2e7d66(0x119)](TIMELINE_CONFIG[_0x2e7d66(0x177)],Math['min'](_0x43e850,TIMELINE_CONFIG[_0x2e7d66(0x167)])),_0x47de81=new Date(_0x15f0fa['createdAt'])['getTime'](),_0x5df674=_0x15f0fa['finishedAt']?new Date(_0x15f0fa[_0x2e7d66(0x1f8)])[_0x2e7d66(0x22c)]():Date[_0x2e7d66(0x13f)](),_0x2230ad={'start':_0x47de81,'end':_0x5df674,'duration':_0x5df674-_0x47de81},_0x2a56d7=new Map(),_0x23f1c4=[];for(const _0x155eb6 of _0x1d9c93){if(_0x155eb6[_0x2e7d66(0xe9)]){const _0x3e8fd4=new Date(_0x155eb6[_0x2e7d66(0xe9)])[_0x2e7d66(0x22c)](),_0x29fc2b=_0x155eb6['updatedAt']?new Date(_0x155eb6[_0x2e7d66(0x133)])[_0x2e7d66(0x22c)]():Date[_0x2e7d66(0x13f)](),_0x334321={'start':_0x3e8fd4,'end':_0x29fc2b,'duration':_0x29fc2b-_0x3e8fd4};_0x2a56d7[_0x2e7d66(0x166)](_0x155eb6['id'],_0x334321),_0x23f1c4[_0x2e7d66(0x221)]({'name':_0x155eb6[_0x2e7d66(0x250)],'state':_0x155eb6[_0x2e7d66(0x11f)]||_0x2e7d66(0x1da),'window':_0x334321});}else _0x23f1c4[_0x2e7d66(0x221)]({'name':_0x155eb6[_0x2e7d66(0x250)],'state':_0x155eb6[_0x2e7d66(0x11f)]||'planned','window':undefined});}_0x23f1c4['sort']((_0x5f4ffc,_0x466094)=>{const _0x2d4d84=_0x2e7d66;if(!_0x5f4ffc[_0x2d4d84(0x188)])return 0x1;if(!_0x466094[_0x2d4d84(0x188)])return-0x1;return _0x5f4ffc[_0x2d4d84(0x188)][_0x2d4d84(0x9c)]-_0x466094[_0x2d4d84(0x188)]['start'];});const _0x4bf00c=_0x23f1c4[_0x2e7d66(0x1d7)],_0x89b9be=_0x4bf00c>TIMELINE_CONFIG[_0x2e7d66(0x1d1)];_0x89b9be&&_0x23f1c4[_0x2e7d66(0x1c7)](TIMELINE_CONFIG[_0x2e7d66(0x1d1)]);const _0xb990db=calculateTimeScale(_0x2230ad,_0x2d9928),_0xec4ac1=_0x15f0fa[_0x2e7d66(0xde)]?_0x15f0fa[_0x2e7d66(0x1ca)]?a55_0x47a174['green'](_0x2e7d66(0x1ca)):a55_0x47a174['red']('error'):a55_0x47a174[_0x2e7d66(0x117)]('running'),_0x26ad81=_0x15f0fa['project']?.['id'],_0x40aacc=_0x15f0fa[_0x2e7d66(0x184)];let _0x22a02e;if(_0x26ad81&&_0x40aacc){const _0x44a677=getWorkflowAttemptUrl(_0x210cd7,_0x26ad81,_0x40aacc,_0x15f0fa['id']);_0x22a02e=hyperlink(a55_0x47a174['dim'](_0x15f0fa['id']),_0x44a677);}else _0x22a02e=a55_0x47a174[_0x2e7d66(0x225)](_0x15f0fa['id']);_0x49ab7c[_0x2e7d66(0x221)](_0x2e7d66(0xec)+_0x22a02e+_0x2e7d66(0x10c)+_0xec4ac1+_0x2e7d66(0x10c)+formatElapsed(_0x2230ad[_0x2e7d66(0x21a)]));if(_0x23f1c4['length']>0x0){const _0x4bb84b=renderTimeAxis(_0xb990db,_0x2d9928),_0x41ac09=new Date(_0x2230ad[_0x2e7d66(0x9c)]),_0x1b1022=formatDate(_0x41ac09),_0x2f3450=TIMELINE_CONFIG[_0x2e7d66(0x1b5)]+TIMELINE_CONFIG[_0x2e7d66(0x263)]+_0x304e09,_0x376b83=_0x1b1022[_0x2e7d66(0x1c0)](_0x2f3450),_0x14f0c4=a55_0x47a174[_0x2e7d66(0x225)](_0x376b83);_0x49ab7c[_0x2e7d66(0x221)](_0x14f0c4+'\x20'+_0x4bb84b);for(const _0x4434cc of _0x23f1c4){_0x49ab7c['push'](renderTaskRow(_0x4434cc,_0xb990db,_0x2d9928,_0x304e09));}const _0x4ff873=calculateStats(_0x23f1c4);_0x49ab7c[_0x2e7d66(0x221)](formatStats(_0x4ff873)),_0x89b9be&&_0x49ab7c[_0x2e7d66(0x221)](a55_0x47a174[_0x2e7d66(0x175)](_0x2e7d66(0x227)+TIMELINE_CONFIG[_0x2e7d66(0x1d1)]+_0x2e7d66(0x8f)+_0x4bf00c+_0x2e7d66(0x1d2))),_0x49ab7c[_0x2e7d66(0x221)](''),_0x49ab7c[_0x2e7d66(0x221)](a55_0x47a174[_0x2e7d66(0x225)]('💡\x20Tip:\x20Use\x20')+(_0x2e7d66(0x165)+_0x15f0fa['id']+_0x2e7d66(0x1a1))+a55_0x47a174[_0x2e7d66(0x225)]('\x20to\x20see\x20detailed\x20logs'));}else _0x49ab7c[_0x2e7d66(0x221)](_0x2e7d66(0x16a));return _0x49ab7c[_0x2e7d66(0x1a6)]('\x0a');}[a55_0x5029cc(0x15f)](_0x57806d,_0x56aff1){const _0x26327e=a55_0x5029cc,_0x47bba0=new Date(_0x57806d['createdAt'])[_0x26327e(0x22c)](),_0x58d487=_0x57806d[_0x26327e(0x1f8)]?new Date(_0x57806d[_0x26327e(0x1f8)])[_0x26327e(0x22c)]():Date['now'](),_0xded79c=_0x58d487-_0x47bba0,_0x2c2f74=[];for(const _0x3fa0e7 of _0x56aff1){if(_0x3fa0e7['startedAt']){const _0x518c12=new Date(_0x3fa0e7[_0x26327e(0xe9)])[_0x26327e(0x22c)](),_0x21b9fa=_0x3fa0e7[_0x26327e(0x133)]?new Date(_0x3fa0e7[_0x26327e(0x133)])[_0x26327e(0x22c)]():Date[_0x26327e(0x13f)]();_0x2c2f74[_0x26327e(0x221)]({'name':_0x3fa0e7[_0x26327e(0x250)],'state':_0x3fa0e7['state']||_0x26327e(0x1da),'window':{'start':_0x518c12,'end':_0x21b9fa,'duration':_0x21b9fa-_0x518c12}});}else _0x2c2f74['push']({'name':_0x3fa0e7[_0x26327e(0x250)],'state':_0x3fa0e7[_0x26327e(0x11f)]||_0x26327e(0x231),'window':undefined});}const _0x373eda=calculateStats(_0x2c2f74);return{'attempt':{'id':_0x57806d['id'],'status':_0x57806d[_0x26327e(0xde)]?_0x57806d['success']?_0x26327e(0x1ca):_0x26327e(0x19c):'running','createdAt':_0x57806d[_0x26327e(0x123)],'finishedAt':_0x57806d[_0x26327e(0x1f8)],'duration_ms':_0xded79c},'tasks':_0x2c2f74[_0x26327e(0x14d)](_0x4a117b=>({'name':_0x4a117b[_0x26327e(0x260)],'state':_0x4a117b[_0x26327e(0x11f)],'startedAt':_0x4a117b['window']?new Date(_0x4a117b[_0x26327e(0x188)]['start'])[_0x26327e(0xe5)]():null,'updatedAt':_0x4a117b[_0x26327e(0x188)]?new Date(_0x4a117b[_0x26327e(0x188)][_0x26327e(0xb2)])[_0x26327e(0xe5)]():null,'duration_ms':_0x4a117b[_0x26327e(0x188)]?.[_0x26327e(0x21a)]||null})),'stats':_0x373eda};}}function formatScheduleLine(_0x3f6626){const _0x52ff5c=a55_0x5029cc,_0x4b43e0=_0x3f6626[_0x52ff5c(0x98)]?a55_0x47a174[_0x52ff5c(0x175)](_0x52ff5c(0x190)):'',_0x10ac7a=_0x3f6626[_0x52ff5c(0x1c1)]?.[_0x52ff5c(0x260)]?a55_0x47a174[_0x52ff5c(0x225)]('\x20['+_0x3f6626['project'][_0x52ff5c(0x260)]+']'):'',_0x322eb5=_0x3f6626[_0x52ff5c(0x21f)]?a55_0x47a174[_0x52ff5c(0x225)](_0x52ff5c(0xf0)+new Date(_0x3f6626[_0x52ff5c(0x21f)])['toLocaleString']()):'';return _0x52ff5c(0x239)+_0x3f6626['id']+'\x20'+(_0x3f6626[_0x52ff5c(0x1f9)]?.[_0x52ff5c(0x260)]||_0x52ff5c(0xd5))+_0x10ac7a+_0x4b43e0+_0x322eb5;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x137);['description']='List\x20workflow\x20schedules';async[a55_0x5029cc(0x196)](_0x25ad92){const _0x5bcdc6=a55_0x5029cc,{options:_0x8bfbed,args:_0x276132,tdx:_0x46db9e}=_0x25ad92,{scheduleId:_0x58611c}=_0x8bfbed;if(_0x58611c&&_0x276132[0x0])return console['error'](a55_0x47a174[_0x5bcdc6(0x25a)]('Error:'),_0x5bcdc6(0x18b)),console[_0x5bcdc6(0x19c)](a55_0x47a174[_0x5bcdc6(0x225)](_0x5bcdc6(0x112))),0x1;if(_0x58611c){const _0x19eda0=await withSpinner(_0x5bcdc6(0x1fd)+_0x58611c+_0x5bcdc6(0x234),()=>_0x46db9e[_0x5bcdc6(0x1f9)][_0x5bcdc6(0x1dc)](_0x58611c),{'verbose':_0x8bfbed[_0x5bcdc6(0x1af)]}),_0x2dea8f=_0x19eda0['data'];return isStructuredFormat(_0x8bfbed)?await handleSingleObjectOutput(_0x2dea8f,_0x8bfbed):(console[_0x5bcdc6(0x19c)](_0x5bcdc6(0x8c)),console[_0x5bcdc6(0x241)](formatScheduleLine(_0x2dea8f))),0x0;}const _0x3bbd8c=this[_0x5bcdc6(0x1e1)](_0x276132,_0x8bfbed);if(!_0x3bbd8c)return 0x1;const {projectName:_0x2f331e,workflowName:_0x295a43}=_0x3bbd8c,_0x494c58=_0x2f331e?'\x27'+_0x2f331e+(_0x295a43?'.'+_0x295a43:'')+'\x27':undefined,_0x10ce23=await withSpinner(_0x494c58?'Listing\x20schedules\x20for\x20'+_0x494c58+_0x5bcdc6(0x234):_0x5bcdc6(0xbf),()=>_0x2f331e?_0x46db9e[_0x5bcdc6(0x1f9)][_0x5bcdc6(0xd8)](_0x2f331e,{'workflow':_0x295a43,'limit':_0x8bfbed[_0x5bcdc6(0x1ec)]}):_0x46db9e[_0x5bcdc6(0x1f9)]['listSchedules']({'limit':_0x8bfbed[_0x5bcdc6(0x1ec)]}),{'verbose':_0x8bfbed[_0x5bcdc6(0x1af)]}),_0x2fafc3=_0x10ce23[_0x5bcdc6(0x1a8)],_0x55b74b=_0x8bfbed[_0x5bcdc6(0x1ec)]&&_0x2fafc3[_0x5bcdc6(0x1d7)]>=_0x8bfbed[_0x5bcdc6(0x1ec)]?a55_0x47a174[_0x5bcdc6(0x225)](_0x5bcdc6(0x125)):'';console[_0x5bcdc6(0x19c)](_0x5bcdc6(0xd4)+_0x2fafc3[_0x5bcdc6(0x1d7)]+'\x20schedule'+(_0x2fafc3[_0x5bcdc6(0x1d7)]!==0x1?'s':'')+_0x55b74b);if(isStructuredFormat(_0x8bfbed))await handleSDKOutput(_0x2fafc3,_0x8bfbed);else{if(_0x2fafc3[_0x5bcdc6(0x1d7)]===0x0)console['log'](_0x5bcdc6(0x1ce));else for(const _0x168169 of _0x2fafc3){console[_0x5bcdc6(0x241)](formatScheduleLine(_0x168169));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{['name']=a55_0x5029cc(0x9e);['description']='Enable\x20a\x20workflow\x20schedule';async[a55_0x5029cc(0x196)](_0x7871cc){const _0x210485=a55_0x5029cc,{options:_0x1de12a,args:_0x19601d,tdx:_0x8e8c79}=_0x7871cc,_0x14fb16=_0x19601d[0x0];if(!_0x14fb16)return console[_0x210485(0x19c)](a55_0x47a174[_0x210485(0x25a)](_0x210485(0x25b)),_0x210485(0x1d9)),console[_0x210485(0x19c)](a55_0x47a174[_0x210485(0x225)](_0x210485(0x118))),console[_0x210485(0x19c)](a55_0x47a174['dim'](_0x210485(0x17b))),0x1;const {backfill:_0x1b1429,nextTime:_0x196152}=_0x1de12a,_0x312fcf={};if(_0x1b1429!==undefined)_0x312fcf['skipSchedule']=!_0x1b1429;if(_0x196152!==undefined)_0x312fcf[_0x210485(0xd6)]=_0x196152;const _0x4710dd=await withSpinner('Enabling\x20schedule\x20#'+_0x14fb16+_0x210485(0x234),()=>_0x8e8c79[_0x210485(0x1f9)][_0x210485(0x242)](_0x14fb16,_0x312fcf),{'verbose':_0x1de12a[_0x210485(0x1af)]}),_0x32f6ef=_0x4710dd[_0x210485(0x1a8)];return isStructuredFormat(_0x1de12a)?await handleSingleObjectOutput(_0x32f6ef,_0x1de12a):(console['log'](_0x210485(0x139)+_0x14fb16+_0x210485(0xb5)+(_0x32f6ef['workflow']?.['name']||_0x210485(0x1da))+')'),_0x32f6ef['nextRunTime']&&console['log'](a55_0x47a174[_0x210485(0x225)](_0x210485(0x195)+new Date(_0x32f6ef['nextRunTime'])['toLocaleString']()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a55_0x5029cc(0x260)]=a55_0x5029cc(0x21d);[a55_0x5029cc(0x1ee)]=a55_0x5029cc(0x266);async['execute'](_0x1cf17b){const _0x1cd0fe=a55_0x5029cc,{options:_0xf5de9f,args:_0x4a3582,tdx:_0x3468d7}=_0x1cf17b,_0xc1245f=_0x4a3582[0x0];if(!_0xc1245f)return console[_0x1cd0fe(0x19c)](a55_0x47a174[_0x1cd0fe(0x25a)]('Error:'),_0x1cd0fe(0x1d9)),console[_0x1cd0fe(0x19c)](a55_0x47a174[_0x1cd0fe(0x225)](_0x1cd0fe(0x15d))),console['error'](a55_0x47a174[_0x1cd0fe(0x225)](_0x1cd0fe(0x17b))),0x1;const _0x70df5=await withSpinner(_0x1cd0fe(0x1a4)+_0xc1245f+_0x1cd0fe(0x234),()=>_0x3468d7[_0x1cd0fe(0x1f9)]['disableSchedule'](_0xc1245f),{'verbose':_0xf5de9f[_0x1cd0fe(0x1af)]}),_0x36e56f=_0x70df5[_0x1cd0fe(0x1a8)];return isStructuredFormat(_0xf5de9f)?await handleSingleObjectOutput(_0x36e56f,_0xf5de9f):console['log'](_0x1cd0fe(0x139)+_0xc1245f+_0x1cd0fe(0x1c5)+(_0x36e56f[_0x1cd0fe(0x1f9)]?.[_0x1cd0fe(0x260)]||_0x1cd0fe(0x1da))+')'),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2c3b3c,_0x151b59){const _0xa6e2ab=a56_0x4831,_0x2a5f91=_0x2c3b3c();while(!![]){try{const _0x211d31=-parseInt(_0xa6e2ab(0x19c))/0x1*(-parseInt(_0xa6e2ab(0x18d))/0x2)+parseInt(_0xa6e2ab(0x191))/0x3+-parseInt(_0xa6e2ab(0x19d))/0x4*(parseInt(_0xa6e2ab(0x199))/0x5)+-parseInt(_0xa6e2ab(0x189))/0x6*(-parseInt(_0xa6e2ab(0x18b))/0x7)+parseInt(_0xa6e2ab(0x18c))/0x8+parseInt(_0xa6e2ab(0x195))/0x9+parseInt(_0xa6e2ab(0x196))/0xa*(-parseInt(_0xa6e2ab(0x18a))/0xb);if(_0x211d31===_0x151b59)break;else _0x2a5f91['push'](_0x2a5f91['shift']());}catch(_0x14d03e){_0x2a5f91['push'](_0x2a5f91['shift']());}}}(a56_0x2634,0x213db));import{platform}from'os';import{getAPIKey}from'./config.js';function a56_0x4831(_0x34bda9,_0x5aa610){_0x34bda9=_0x34bda9-0x189;const _0x2634ee=a56_0x2634();let _0x483106=_0x2634ee[_0x34bda9];return _0x483106;}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x1a943d=a56_0x4831,_0x312d9e=getVersion(),_0x1642dd=platform(),_0x3f91e9=process[_0x1a943d(0x198)][_0x1a943d(0x197)]('v','');return _0x1a943d(0x190)+_0x312d9e+'\x20('+_0x1642dd+_0x1a943d(0x193)+_0x3f91e9+')';}export function getAuthHeaders(_0x18877c,_0x5133db,_0x32578b){const _0x27ed8d=a56_0x4831,_0x32b43d=getVersion(),_0x184c20={'User-Agent':getUserAgent(),'X-TD-Client':_0x27ed8d(0x18e),'X-TD-Client-Version':_0x32b43d};if(_0x32578b)_0x184c20[_0x27ed8d(0x192)]='Bearer\x20'+_0x32578b;else _0x5133db&&(_0x184c20[_0x27ed8d(0x192)]=_0x27ed8d(0x18f)+_0x5133db);return _0x184c20;}export function toHeaderRecord(_0x43cfb1){const _0x5c2f0a=a56_0x4831,_0x4af6f4={};for(const [_0x58b845,_0x513f13]of Object[_0x5c2f0a(0x194)](_0x43cfb1)){_0x513f13!==undefined&&(_0x4af6f4[_0x58b845]=_0x513f13);}return _0x4af6f4;}function a56_0x2634(){const _0x175d7a=['tdx','TD1\x20','tdx/','276471VJMtHa','Authorization',';\x20node/','entries','294363tRcolw','10lHECKi','replace','version','57895yYkOgn','X-Trino-User','length','383Vpjgpb','36NVmfat','6QtiofP','5542713xZgDbs','1663711oeWPAY','1377688xsaXJa','1094DJyHtJ'];a56_0x2634=function(){return _0x175d7a;};return a56_0x2634();}export function getTrinoHeaders(_0x568237,_0x5b136d,_0x4ab57a){const _0x2f4c5b=a56_0x4831,_0x30bc2c=getAuthHeaders(_0x568237),_0x55a288=toHeaderRecord(_0x30bc2c);if(_0x4ab57a)_0x55a288[_0x2f4c5b(0x192)]='Bearer\x20'+_0x4ab57a;else _0x5b136d&&(_0x55a288[_0x2f4c5b(0x19a)]=_0x5b136d);return _0x55a288;}export function hasAPIKey(_0x382b7e){const _0x251c3e=a56_0x4831,_0x55a6e5=getAPIKey();return _0x55a6e5!==undefined&&_0x55a6e5[_0x251c3e(0x19b)]>0x0;}
1
+ function a56_0x3ad4(_0x5e158c,_0x4e1fe3){_0x5e158c=_0x5e158c-0x13c;const _0x1649b7=a56_0x1649();let _0x3ad4f5=_0x1649b7[_0x5e158c];return _0x3ad4f5;}(function(_0xebe0d3,_0x5d56b8){const _0x5e476d=a56_0x3ad4,_0x4b6939=_0xebe0d3();while(!![]){try{const _0x7f5686=parseInt(_0x5e476d(0x14e))/0x1+-parseInt(_0x5e476d(0x148))/0x2*(parseInt(_0x5e476d(0x13f))/0x3)+-parseInt(_0x5e476d(0x14b))/0x4*(-parseInt(_0x5e476d(0x13d))/0x5)+-parseInt(_0x5e476d(0x146))/0x6+-parseInt(_0x5e476d(0x143))/0x7*(parseInt(_0x5e476d(0x149))/0x8)+parseInt(_0x5e476d(0x141))/0x9*(parseInt(_0x5e476d(0x144))/0xa)+parseInt(_0x5e476d(0x14d))/0xb*(parseInt(_0x5e476d(0x147))/0xc);if(_0x7f5686===_0x5d56b8)break;else _0x4b6939['push'](_0x4b6939['shift']());}catch(_0xbd0105){_0x4b6939['push'](_0x4b6939['shift']());}}}(a56_0x1649,0xbc80b));function a56_0x1649(){const _0x473ab2=['301EZoxXM','10yKYZLB','length','1738014ipvMgt','29952LpbENJ','71494mbsbCD','122264EKcALC','entries','28YoDjNF','TD1\x20','5995EhPEse','239064uCSOTH','version','417955wGtSoT','Bearer\x20','105SKcVWS','tdx','7070121FUrtla','tdx/'];a56_0x1649=function(){return _0x473ab2;};return a56_0x1649();}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x587ce5=a56_0x3ad4,_0x1b9bf8=getVersion(),_0x495942=platform(),_0x2e2969=process[_0x587ce5(0x13c)]['replace']('v','');return _0x587ce5(0x142)+_0x1b9bf8+'\x20('+_0x495942+';\x20node/'+_0x2e2969+')';}export function getAuthHeaders(_0x506a64,_0x4f8370,_0x515395){const _0x2be5c4=a56_0x3ad4,_0x191515=getVersion(),_0x5f557b={'User-Agent':getUserAgent(),'X-TD-Client':_0x2be5c4(0x140),'X-TD-Client-Version':_0x191515};if(_0x515395)_0x5f557b['Authorization']=_0x2be5c4(0x13e)+_0x515395;else _0x4f8370&&(_0x5f557b['Authorization']=_0x2be5c4(0x14c)+_0x4f8370);return _0x5f557b;}export function toHeaderRecord(_0x44017e){const _0x29c0a6=a56_0x3ad4,_0x13da5b={};for(const [_0x4ca611,_0x578b1e]of Object[_0x29c0a6(0x14a)](_0x44017e)){_0x578b1e!==undefined&&(_0x13da5b[_0x4ca611]=_0x578b1e);}return _0x13da5b;}export function getTrinoHeaders(_0x36bb34,_0x242c38,_0x4cc972){const _0x16e5b3=a56_0x3ad4,_0x14e7aa=getAuthHeaders(_0x36bb34),_0x1b4cf2=toHeaderRecord(_0x14e7aa);if(_0x4cc972)_0x1b4cf2['Authorization']=_0x16e5b3(0x13e)+_0x4cc972;else _0x242c38&&(_0x1b4cf2['X-Trino-User']=_0x242c38);return _0x1b4cf2;}export function hasAPIKey(_0x3a6945){const _0x3e5eec=a56_0x3ad4,_0x339458=getAPIKey();return _0x339458!==undefined&&_0x339458[_0x3e5eec(0x145)]>0x0;}