@treasuredata/tdx 2026.7.5 → 2026.7.6

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 (250) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-move-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segment-validate-command.js +1 -1
  48. package/dist/commands/segments.js +1 -1
  49. package/dist/commands/show.js +1 -1
  50. package/dist/commands/status-command.js +1 -1
  51. package/dist/commands/table-deleted.js +1 -1
  52. package/dist/commands/tables.js +1 -1
  53. package/dist/commands/unset-command.js +1 -1
  54. package/dist/commands/upgrade-command.js +1 -1
  55. package/dist/commands/use-command.js +1 -1
  56. package/dist/commands/user-command.js +1 -1
  57. package/dist/commands/work-command.js +1 -1
  58. package/dist/commands/workflow-command.js +1 -1
  59. package/dist/core/auth.js +1 -1
  60. package/dist/core/command-output.js +1 -1
  61. package/dist/core/config.js +1 -1
  62. package/dist/core/connection-cache.js +1 -1
  63. package/dist/core/constants.js +1 -1
  64. package/dist/core/credential-cache.js +1 -1
  65. package/dist/core/global-context.js +1 -1
  66. package/dist/core/keychain.js +1 -1
  67. package/dist/core/oauth-keychain.js +1 -1
  68. package/dist/core/oauth.js +1 -1
  69. package/dist/core/profile.js +1 -1
  70. package/dist/core/project-config.js +1 -1
  71. package/dist/core/session.js +1 -1
  72. package/dist/core/user-cache.js +1 -1
  73. package/dist/core/version.js +1 -1
  74. package/dist/index.js +1 -1
  75. package/dist/mcp/server.js +1 -1
  76. package/dist/mcp/tools/index.js +1 -1
  77. package/dist/mcp/tools/tdx-run.js +1 -1
  78. package/dist/mcp/tools/tdx-search.js +1 -1
  79. package/dist/mcp/tools/work-create-item.js +1 -1
  80. package/dist/mcp/utils.js +1 -1
  81. package/dist/proxy/claude-usage-tracker.js +1 -1
  82. package/dist/proxy/passthrough-server.js +1 -1
  83. package/dist/proxy/sse-usage-parser.js +1 -1
  84. package/dist/sdk/agent/agent-config.js +1 -1
  85. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  86. package/dist/sdk/agent/agent-yaml.js +1 -1
  87. package/dist/sdk/agent/test/evaluator.js +1 -1
  88. package/dist/sdk/agent/test/executor.js +1 -1
  89. package/dist/sdk/agent/test/index.js +1 -1
  90. package/dist/sdk/agent/test/output.js +1 -1
  91. package/dist/sdk/agent/test/parser.js +1 -1
  92. package/dist/sdk/agent/tool-target-registry.js +1 -1
  93. package/dist/sdk/api.js +1 -1
  94. package/dist/sdk/cas/cas-api-client.js +1 -1
  95. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  96. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  97. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  98. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  99. package/dist/sdk/cas/index.js +1 -1
  100. package/dist/sdk/cas/pull-workflow.js +1 -1
  101. package/dist/sdk/cas/push-workflow.js +1 -1
  102. package/dist/sdk/cas/validate-files.js +1 -1
  103. package/dist/sdk/client/cdp-api-client.d.ts +6 -6
  104. package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
  105. package/dist/sdk/client/cdp-api-client.js +1 -1
  106. package/dist/sdk/client/cdp-api-client.js.map +1 -1
  107. package/dist/sdk/client/delivery-api-client.js +1 -1
  108. package/dist/sdk/client/endpoints.js +1 -1
  109. package/dist/sdk/client/engage-api-client.js +1 -1
  110. package/dist/sdk/client/http-client.js +1 -1
  111. package/dist/sdk/client/llm-api-client.js +1 -1
  112. package/dist/sdk/client/oauth-refresh.js +1 -1
  113. package/dist/sdk/client/rate-limiter.js +1 -1
  114. package/dist/sdk/client/td-api-client.js +1 -1
  115. package/dist/sdk/client/trino-api-client.js +1 -1
  116. package/dist/sdk/client/workflow-client.js +1 -1
  117. package/dist/sdk/connection-validator.js +1 -1
  118. package/dist/sdk/connection.js +1 -1
  119. package/dist/sdk/delivery.js +1 -1
  120. package/dist/sdk/engage/campaign-pull.js +1 -1
  121. package/dist/sdk/engage/campaign-push.js +1 -1
  122. package/dist/sdk/engage/campaign-validator.js +1 -1
  123. package/dist/sdk/engage/campaign-yaml.js +1 -1
  124. package/dist/sdk/engage/template-pull.js +1 -1
  125. package/dist/sdk/engage/template-push.js +1 -1
  126. package/dist/sdk/engage/template-validator.js +1 -1
  127. package/dist/sdk/engage/template-yaml.js +1 -1
  128. package/dist/sdk/engage/types/campaign-def.js +1 -1
  129. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  130. package/dist/sdk/engage/types/template-schema.js +1 -1
  131. package/dist/sdk/engage.js +1 -1
  132. package/dist/sdk/errors.js +1 -1
  133. package/dist/sdk/index.js +1 -1
  134. package/dist/sdk/io/index.js +1 -1
  135. package/dist/sdk/io/node-filesystem.js +1 -1
  136. package/dist/sdk/job.js +1 -1
  137. package/dist/sdk/journey.js +1 -1
  138. package/dist/sdk/llm/chat-cache.js +1 -1
  139. package/dist/sdk/llm/index.js +1 -1
  140. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  141. package/dist/sdk/llm/model-factors.js +1 -1
  142. package/dist/sdk/llm/user-settings.js +1 -1
  143. package/dist/sdk/personalization.js +1 -1
  144. package/dist/sdk/policy.js +1 -1
  145. package/dist/sdk/query/deleted-table-validation.js +1 -1
  146. package/dist/sdk/query/index.js +1 -1
  147. package/dist/sdk/query/sql-parser.js +1 -1
  148. package/dist/sdk/realtime.js +1 -1
  149. package/dist/sdk/schedule.js +1 -1
  150. package/dist/sdk/segment/child-segment-yaml.d.ts +0 -8
  151. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  152. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  153. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  154. package/dist/sdk/segment/fields-display.js +1 -1
  155. package/dist/sdk/segment/file-discovery.js +1 -1
  156. package/dist/sdk/segment/journey-utils.js +1 -1
  157. package/dist/sdk/segment/journey-validator.js +1 -1
  158. package/dist/sdk/segment/journey-yaml.js +1 -1
  159. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  160. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  161. package/dist/sdk/segment/pull-workflow.js +1 -1
  162. package/dist/sdk/segment/push-recovery.js +1 -1
  163. package/dist/sdk/segment/push-workflow.d.ts.map +1 -1
  164. package/dist/sdk/segment/push-workflow.js +1 -1
  165. package/dist/sdk/segment/push-workflow.js.map +1 -1
  166. package/dist/sdk/segment/resolution-context.js +1 -1
  167. package/dist/sdk/segment/segment-path-parser.js +1 -1
  168. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  169. package/dist/sdk/segment/segment-validator.js +1 -1
  170. package/dist/sdk/segment/target-resolution.js +1 -1
  171. package/dist/sdk/segment/tdx-config.js +1 -1
  172. package/dist/sdk/segment/types/activation-schema.d.ts +66 -7
  173. package/dist/sdk/segment/types/activation-schema.d.ts.map +1 -1
  174. package/dist/sdk/segment/types/activation-schema.js +1 -1
  175. package/dist/sdk/segment/types/activation-schema.js.map +1 -1
  176. package/dist/sdk/segment/types/journey-def.js +1 -1
  177. package/dist/sdk/segment/types/journey-schema.js +1 -1
  178. package/dist/sdk/segment/types/segment-def.d.ts +1 -1
  179. package/dist/sdk/segment/types/segment-def.d.ts.map +1 -1
  180. package/dist/sdk/segment/types/segment-def.js +1 -1
  181. package/dist/sdk/segment/types/segment-def.js.map +1 -1
  182. package/dist/sdk/segment/types/segment-schema.d.ts +110 -1
  183. package/dist/sdk/segment/types/segment-schema.d.ts.map +1 -1
  184. package/dist/sdk/segment/types/segment-schema.js +1 -1
  185. package/dist/sdk/segment/types/segment-schema.js.map +1 -1
  186. package/dist/sdk/segment/validate-files.js +1 -1
  187. package/dist/sdk/segment/yaml-validator.js +1 -1
  188. package/dist/sdk/segment.js +1 -1
  189. package/dist/sdk/types/cdp.d.ts +7 -3
  190. package/dist/sdk/types/cdp.d.ts.map +1 -1
  191. package/dist/sdk/types/index.js +1 -1
  192. package/dist/sdk/types/progress.js +1 -1
  193. package/dist/sdk/types/workspace.js +1 -1
  194. package/dist/sdk/user.js +1 -1
  195. package/dist/sdk/util/format-detector.js +1 -1
  196. package/dist/sdk/util/formatters.js +1 -1
  197. package/dist/sdk/util/index.js +1 -1
  198. package/dist/sdk/util/paginate.js +1 -1
  199. package/dist/sdk/util/tree-formatter.js +1 -1
  200. package/dist/sdk/util/tree-search.js +1 -1
  201. package/dist/sdk/workflow/archive-validation.js +1 -1
  202. package/dist/sdk/workflow/clone-workflow.js +1 -1
  203. package/dist/sdk/workflow/index.js +1 -1
  204. package/dist/sdk/workflow/pull-workflow.js +1 -1
  205. package/dist/sdk/workflow/push-workflow.js +1 -1
  206. package/dist/sdk/workflow/task-graph.js +1 -1
  207. package/dist/sdk/workflow/tdx-config.js +1 -1
  208. package/dist/sdk/workflow/workflow-utils.js +1 -1
  209. package/dist/sdk/workspace/access-tracker.js +1 -1
  210. package/dist/sdk/workspace/frontmatter.js +1 -1
  211. package/dist/sdk/workspace/git.js +1 -1
  212. package/dist/sdk/workspace/index.js +1 -1
  213. package/dist/sdk/workspace/templates.js +1 -1
  214. package/dist/sdk/workspace/weekly.js +1 -1
  215. package/dist/sdk/workspace/wikilinks.js +1 -1
  216. package/dist/test-utils/command-runner.js +1 -1
  217. package/dist/test-utils/factories.js +1 -1
  218. package/dist/test-utils/fixtures.js +1 -1
  219. package/dist/test-utils/http-mock.js +1 -1
  220. package/dist/test-utils/index.js +1 -1
  221. package/dist/utils/async.js +1 -1
  222. package/dist/utils/claude-code-state.js +1 -1
  223. package/dist/utils/colors.js +1 -1
  224. package/dist/utils/diff.js +1 -1
  225. package/dist/utils/file-permissions.js +1 -1
  226. package/dist/utils/file-reader.js +1 -1
  227. package/dist/utils/github-releases.js +1 -1
  228. package/dist/utils/global-cache.js +1 -1
  229. package/dist/utils/json-loader.js +1 -1
  230. package/dist/utils/local-cache.js +1 -1
  231. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  232. package/dist/utils/logger/formatters/index.js +1 -1
  233. package/dist/utils/logger/handlers/console-handler.js +1 -1
  234. package/dist/utils/logger/handlers/file-handler.js +1 -1
  235. package/dist/utils/logger/handlers/index.js +1 -1
  236. package/dist/utils/logger/handlers/null-handler.js +1 -1
  237. package/dist/utils/logger/index.js +1 -1
  238. package/dist/utils/logger/logger.js +1 -1
  239. package/dist/utils/logger/types.js +1 -1
  240. package/dist/utils/option-validation.js +1 -1
  241. package/dist/utils/process.js +1 -1
  242. package/dist/utils/prompt.js +1 -1
  243. package/dist/utils/proxy-fetch.js +1 -1
  244. package/dist/utils/spinner.js +1 -1
  245. package/dist/utils/sse-parser.js +1 -1
  246. package/dist/utils/string-utils.js +1 -1
  247. package/dist/utils/table-ref-parser.js +1 -1
  248. package/dist/utils/tdx-logger.js +1 -1
  249. package/dist/utils/version-check.js +1 -1
  250. package/package.json +1 -1
@@ -1 +1 @@
1
- const a56_0x1ddcb4=a56_0x1ee3;(function(_0x50b8fb,_0x18bf32){const _0x2b76ca=a56_0x1ee3,_0x28f6d8=_0x50b8fb();while(!![]){try{const _0xb5b549=parseInt(_0x2b76ca(0x210))/0x1*(parseInt(_0x2b76ca(0x236))/0x2)+parseInt(_0x2b76ca(0x13e))/0x3*(parseInt(_0x2b76ca(0xff))/0x4)+-parseInt(_0x2b76ca(0xe1))/0x5+-parseInt(_0x2b76ca(0x145))/0x6*(-parseInt(_0x2b76ca(0x134))/0x7)+-parseInt(_0x2b76ca(0x28b))/0x8*(parseInt(_0x2b76ca(0x120))/0x9)+parseInt(_0x2b76ca(0x153))/0xa+parseInt(_0x2b76ca(0x260))/0xb*(-parseInt(_0x2b76ca(0x176))/0xc);if(_0xb5b549===_0x18bf32)break;else _0x28f6d8['push'](_0x28f6d8['shift']());}catch(_0x1afdff){_0x28f6d8['push'](_0x28f6d8['shift']());}}}(a56_0x498a,0x2927f));import a56_0x4d082d from'chalk';import{existsSync}from'fs';import a56_0x1268de 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 a56_0x34435f from'prompts';function getAttemptStatusDisplay(_0x1f4e51){const _0x2efca8=a56_0x1ee3;if(!_0x1f4e51)return{'icon':'⏳','text':''};const {done:_0x108a56,success:_0x211271,cancelRequested:_0x80637e}=_0x1f4e51;if(!_0x108a56)return _0x80637e?{'icon':'🛑','text':a56_0x4d082d['yellow'](_0x2efca8(0x148))}:{'icon':'🔄','text':a56_0x4d082d[_0x2efca8(0x137)]('running')};if(_0x211271)return{'icon':'✅','text':a56_0x4d082d['green']('success')};return{'icon':'❌','text':a56_0x4d082d[_0x2efca8(0x171)](_0x2efca8(0x12a))};}export class WorkflowBaseCommand extends BaseCommand{[a56_0x1ddcb4(0x275)](_0x2ac208,_0x5ccbcd,_0x2c6082=0x0){const _0x3b7f02=a56_0x1ddcb4;return _0x2ac208[_0x2c6082]||_0x5ccbcd[_0x3b7f02(0x196)];}[a56_0x1ddcb4(0x116)](_0x4b84e8,_0x14a63f,_0x22f811=0x0){const _0x321b14=a56_0x1ddcb4,_0x4b3e4e=this[_0x321b14(0x275)](_0x4b84e8,_0x14a63f,_0x22f811);if(!_0x4b3e4e)return console[_0x321b14(0x12a)](a56_0x4d082d['red'](_0x321b14(0x106)),_0x321b14(0x22b)),console[_0x321b14(0x12a)](a56_0x4d082d[_0x321b14(0x262)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x4b3e4e;}[a56_0x1ddcb4(0x1fd)](_0x3c6ec4,_0x265731){const _0x4529e4=a56_0x1ddcb4;if(_0x3c6ec4[0x0]){const _0x30c43f=_0x3c6ec4[0x0]['split']('.');if(_0x30c43f[_0x4529e4(0x1ba)]===0x1)return{'projectName':_0x30c43f[0x0],'workflowName':undefined};else return _0x30c43f[_0x4529e4(0x1ba)]===0x2?{'projectName':_0x30c43f[0x0],'workflowName':_0x30c43f[0x1]}:(console['error'](a56_0x4d082d[_0x4529e4(0x171)](_0x4529e4(0x106)),_0x4529e4(0x167)),null);}return{'projectName':_0x265731[_0x4529e4(0x196)],'workflowName':undefined};}['resolveProjectDir'](_0x56112f,_0x184ed4,_0x51a1b1=0x0){const _0x190b6a=a56_0x1ddcb4;if(_0x56112f[_0x51a1b1])return _0x56112f[_0x51a1b1];if(_0x184ed4[_0x190b6a(0x196)]){const _0x3db18d=a56_0x1268de[_0x190b6a(0x13b)](process['cwd'](),_0x190b6a(0xd5),_0x184ed4[_0x190b6a(0x196)]);if(existsSync(a56_0x1268de['join'](_0x3db18d,_0x190b6a(0x105))))return _0x3db18d;}return undefined;}async[a56_0x1ddcb4(0x1b6)](_0x2d50fe,_0xc66e7d,_0x28a480){const _0x3c571d=a56_0x1ddcb4;try{const _0x10f394=await _0x2d50fe['workflow']['workflows'](_0xc66e7d,{'limit':0x1});if(_0x10f394[_0x3c571d(0x1ba)]>0x0){const _0x5b41da=_0x10f394[0x0]['id'],_0x4c1b4c=getWorkflowUrl(_0x28a480,_0x5b41da);console[_0x3c571d(0x12a)](_0x3c571d(0x133)+a56_0x4d082d['cyan'](_0x4c1b4c));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x11a);['description']=a56_0x1ddcb4(0xf4);async[a56_0x1ddcb4(0x12f)](_0x2e38e3){const _0x30a08e=a56_0x1ddcb4,{options:_0x1cf9a6,args:_0x142667,tdx:_0x55959e}=_0x2e38e3,_0x2c354f=_0x142667[0x0],_0x4ea5da=_0x1cf9a6['clear'];if(_0x4ea5da)return saveSessionContext({'workflow_project':undefined},_0x1cf9a6[_0x30a08e(0x1dc)]),console[_0x30a08e(0x1a1)](a56_0x4d082d[_0x30a08e(0xfb)](_0x30a08e(0x10b))),0x0;if(!_0x2c354f)return console[_0x30a08e(0x12a)](a56_0x4d082d[_0x30a08e(0x171)](_0x30a08e(0x106)),_0x30a08e(0x22b)),console[_0x30a08e(0x12a)](a56_0x4d082d[_0x30a08e(0x262)](_0x30a08e(0x1ec))),console[_0x30a08e(0x12a)](a56_0x4d082d[_0x30a08e(0x262)](_0x30a08e(0x1d6))),0x1;const _0x1a4906=await withSpinner(_0x30a08e(0x273)+_0x2c354f+_0x30a08e(0x1cc),()=>_0x55959e[_0x30a08e(0x227)]['resolveProjectId'](_0x2c354f),{'verbose':_0x1cf9a6['verbose']}),{name:_0x2c30c7}=_0x1a4906[_0x30a08e(0x14d)];return saveSessionContext({'workflow_project':_0x2c30c7},_0x1cf9a6[_0x30a08e(0x1dc)]),console[_0x30a08e(0x1a1)](a56_0x4d082d['green'](_0x30a08e(0x279)+a56_0x4d082d[_0x30a08e(0x170)](_0x2c30c7))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x12b);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0xd8);async['execute'](_0x3a8680){const _0x2f9298=a56_0x1ddcb4,{options:_0x4ecdac,args:_0x116bb6,tdx:_0x5a7887}=_0x3a8680,_0x149164=_0x116bb6[0x0];_0x4ecdac[_0x2f9298(0x199)]&&_0x149164&&console['error'](_0x2f9298(0x23f)+_0x149164);const _0x1dac5a=await withSpinner(_0x2f9298(0x1fb),()=>_0x5a7887[_0x2f9298(0x227)][_0x2f9298(0x11f)](_0x149164,{'limit':_0x4ecdac['limit']}),{'verbose':_0x4ecdac['verbose']});let _0x1047e8=_0x1dac5a['data'];_0x1047e8[_0x2f9298(0x140)]((_0x220c25,_0x4b2187)=>_0x220c25[_0x2f9298(0x161)]['localeCompare'](_0x4b2187['name']));const _0x5e98c0=_0x4ecdac[_0x2f9298(0x24e)]&&_0x1047e8[_0x2f9298(0x1ba)]>=_0x4ecdac[_0x2f9298(0x24e)]?a56_0x4d082d[_0x2f9298(0x262)](_0x2f9298(0x1a7)):'';console[_0x2f9298(0x12a)](_0x2f9298(0x1b2)+_0x1047e8[_0x2f9298(0x1ba)]+_0x2f9298(0x252)+(_0x1047e8[_0x2f9298(0x1ba)]!==0x1?'s':'')+_0x5e98c0);if(_0x4ecdac[_0x2f9298(0x123)]===_0x2f9298(0x1fc)||_0x4ecdac[_0x2f9298(0x123)]==='jsonl'||_0x4ecdac[_0x2f9298(0x123)]===_0x2f9298(0x257))await handleSDKOutput(_0x1047e8,_0x4ecdac);else{if(_0x1047e8[_0x2f9298(0x1ba)]===0x0)_0x149164?console[_0x2f9298(0x1a1)](_0x2f9298(0xde)+_0x149164):console[_0x2f9298(0x1a1)](_0x2f9298(0x109));else{const _0x2506ca=_0x1047e8[_0x2f9298(0x175)](_0x2b83ac=>{const _0x4bc670=_0x2f9298,_0x12b385=_0x2b83ac[_0x4bc670(0x216)]?.[_0x4bc670(0x1c7)](_0x2f6406=>_0x2f6406['key']===_0x4bc670(0x10e)),_0xa1c3d2=_0x12b385?a56_0x4d082d[_0x4bc670(0x262)](_0x4bc670(0x24f)):'';return _0x4bc670(0x11c)+_0x2b83ac[_0x4bc670(0x161)]+_0xa1c3d2;});await writeOutput(_0x2506ca[_0x2f9298(0x13b)]('\x0a'),_0x4ecdac[_0x2f9298(0x202)],_0x2f9298(0x13c));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0xf3);['description']=a56_0x1ddcb4(0x16a);async[a56_0x1ddcb4(0x12f)](_0x1eddbe){const _0x25d530=a56_0x1ddcb4,{options:_0x574298,args:_0xff8b3d,tdx:_0x38acfe}=_0x1eddbe,_0x2836e1=this['resolveProject'](_0xff8b3d,_0x574298);_0x574298['verbose']&&_0x2836e1&&console[_0x25d530(0x12a)](_0x25d530(0x1eb)+_0x2836e1);const _0xafaf81=await withSpinner(_0x25d530(0xdd),()=>_0x38acfe['workflow'][_0x25d530(0xd5)](_0x2836e1,{'limit':_0x574298[_0x25d530(0x24e)]}),{'verbose':_0x574298[_0x25d530(0x199)]});let _0x1286a9=_0xafaf81[_0x25d530(0x14d)];_0x1286a9[_0x25d530(0x140)]((_0x332185,_0x29f445)=>{const _0x2b2c64=_0x25d530,_0x102402=_0x332185[_0x2b2c64(0x161)][_0x2b2c64(0x138)](_0x29f445['name']);if(_0x102402!==0x0)return _0x102402;return(_0x332185[_0x2b2c64(0x162)]?.[_0x2b2c64(0x161)]||'')[_0x2b2c64(0x138)](_0x29f445['project']?.['name']||'');});const _0xdda5e1=_0x574298[_0x25d530(0x24e)]&&_0x1286a9[_0x25d530(0x1ba)]>=_0x574298[_0x25d530(0x24e)]?a56_0x4d082d[_0x25d530(0x262)](_0x25d530(0x1a7)):'';console['error']('✔\x20Found\x20'+_0x1286a9[_0x25d530(0x1ba)]+'\x20workflow'+(_0x1286a9['length']!==0x1?'s':'')+_0xdda5e1);if(_0x574298[_0x25d530(0x123)]===_0x25d530(0x1fc)||_0x574298[_0x25d530(0x123)]===_0x25d530(0x17d)||_0x574298['format']===_0x25d530(0x257))await handleSDKOutput(_0x1286a9,_0x574298);else{if(_0x1286a9[_0x25d530(0x1ba)]===0x0)_0x2836e1?console[_0x25d530(0x1a1)](_0x25d530(0x1fe)+_0x2836e1):console[_0x25d530(0x1a1)](_0x25d530(0x1bb));else{const _0x2a5675=_0x574298[_0x25d530(0x194)],_0x19894d=_0x1286a9[_0x25d530(0x175)](_0x49c115=>{const _0x5510d0=_0x25d530,_0x13a9db=a56_0x4d082d[_0x5510d0(0x262)]('#'+_0x49c115['id']),_0x5d732d=hyperlink(_0x13a9db,getWorkflowUrl(_0x2a5675,_0x49c115['id'])),_0x203ecb=_0x49c115[_0x5510d0(0x162)]?.['name']?a56_0x4d082d[_0x5510d0(0x262)]('\x20('+_0x49c115['project'][_0x5510d0(0x161)]+')'):'';return'📋\x20'+_0x5d732d+'\x20'+_0x49c115[_0x5510d0(0x161)]+_0x203ecb;});await writeOutput(_0x19894d['join']('\x0a'),_0x574298['output'],_0x25d530(0x13c));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0xfa);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0xef);async[a56_0x1ddcb4(0x12f)](_0x27ef03){const _0x3f9226=a56_0x1ddcb4,{options:_0x37ad17,args:_0x3c23ad,tdx:_0x58d72f}=_0x27ef03,_0x26d3d5=this['parseProjectWorkflowPattern'](_0x3c23ad,_0x37ad17);if(!_0x26d3d5)return 0x1;const {projectName:_0x439385,workflowName:_0x487d79}=_0x26d3d5;if(_0x37ad17[_0x3f9226(0x199)]){if(_0x439385&&_0x487d79)console[_0x3f9226(0x12a)]('Filter:\x20'+_0x439385+'.'+_0x487d79);else _0x439385&&console[_0x3f9226(0x12a)]('Filter:\x20project='+_0x439385);const _0x2c9cea=_0x37ad17[_0x3f9226(0x107)];_0x2c9cea&&console[_0x3f9226(0x12a)](_0x3f9226(0x18b)+_0x2c9cea);}let _0x4c6eab=0x28;if(process[_0x3f9226(0x1fa)][_0x3f9226(0x10c)]&&!_0x37ad17[_0x3f9226(0x202)]&&!_0x37ad17[_0x3f9226(0x123)]){const _0x216bf9=process['stdout'][_0x3f9226(0x1c1)]||0x28;_0x4c6eab=Math[_0x3f9226(0x114)](0x14,Math['floor'](_0x216bf9*0x2/0x3));}const _0x1366ef=_0x37ad17[_0x3f9226(0x24e)]||_0x4c6eab,_0x235551=await withSpinner(_0x3f9226(0x164),()=>_0x58d72f[_0x3f9226(0x227)][_0x3f9226(0x239)]({'projectName':_0x439385,'workflowName':_0x487d79,'status':_0x37ad17[_0x3f9226(0x107)],'fromTime':_0x37ad17[_0x3f9226(0x15d)],'toTime':_0x37ad17['to'],'limit':_0x1366ef}),{'verbose':_0x37ad17['verbose']}),_0x4c697b=_0x235551[_0x3f9226(0x14d)];_0x4c697b[_0x3f9226(0x140)]((_0x1b22db,_0x37a979)=>{const _0x499475=_0x3f9226,_0x1c4d7a=_0x1b22db[_0x499475(0x1c3)]||'',_0x520ca1=_0x37a979[_0x499475(0x1c3)]||'';return _0x520ca1[_0x499475(0x138)](_0x1c4d7a);});_0x4c697b[_0x3f9226(0x1ba)]>=_0x1366ef?console[_0x3f9226(0x12a)](_0x3f9226(0x1ab)+_0x4c697b[_0x3f9226(0x1ba)]+_0x3f9226(0x1a9)+a56_0x4d082d[_0x3f9226(0x262)](_0x3f9226(0xf2))):console['error'](_0x3f9226(0x1b2)+_0x4c697b[_0x3f9226(0x1ba)]+_0x3f9226(0x1e0)+(_0x4c697b['length']!==0x1?'s':''));if(_0x37ad17[_0x3f9226(0x123)]==='json'||_0x37ad17[_0x3f9226(0x123)]==='jsonl'||_0x37ad17['format']===_0x3f9226(0x257))await handleSDKOutput(_0x4c697b,_0x37ad17);else{if(!process[_0x3f9226(0x1fa)][_0x3f9226(0x10c)]||_0x37ad17['output']){if(_0x4c697b[_0x3f9226(0x1ba)]===0x0){if(_0x439385&&_0x487d79)console['log'](_0x3f9226(0x146)+_0x439385+'.'+_0x487d79);else _0x439385?console[_0x3f9226(0x1a1)](_0x3f9226(0x1d7)+_0x439385):console[_0x3f9226(0x1a1)](_0x3f9226(0x1b3));}else{const _0x3e8963=_0x37ad17[_0x3f9226(0x194)],_0x2bcc85=this[_0x3f9226(0x25b)](_0x4c697b,_0x3e8963);_0x37ad17['output']?await writeOutput(_0x2bcc85,_0x37ad17[_0x3f9226(0x202)],_0x3f9226(0x13c)):console['log'](_0x2bcc85);}!_0x439385&&(console[_0x3f9226(0x12a)](''),console[_0x3f9226(0x12a)](a56_0x4d082d[_0x3f9226(0x262)](_0x3f9226(0x25f))),console[_0x3f9226(0x12a)](a56_0x4d082d['dim'](_0x3f9226(0x172))+'or'+a56_0x4d082d[_0x3f9226(0x262)](_0x3f9226(0x12e))));}else{if(_0x4c697b[_0x3f9226(0x1ba)]===0x0){if(_0x439385&&_0x487d79)console[_0x3f9226(0x1a1)](_0x3f9226(0x146)+_0x439385+'.'+_0x487d79);else _0x439385?console[_0x3f9226(0x1a1)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x439385):console[_0x3f9226(0x1a1)](_0x3f9226(0x1b3));}else await this[_0x3f9226(0xe5)](_0x4c697b,_0x27ef03,_0x439385);}}return 0x0;}[a56_0x1ddcb4(0x25b)](_0x3f7710,_0x3c43cc){const _0x55d0ae=a56_0x1ddcb4,_0x5dd25a=[],_0x47f03c=new Map();let _0x4c1b18=Infinity,_0x2ce4ce=-Infinity;for(const _0x198f18 of _0x3f7710){if(_0x198f18[_0x55d0ae(0x181)]?.['createdAt']){const _0x98e30d=new Date(_0x198f18[_0x55d0ae(0x181)][_0x55d0ae(0x245)])[_0x55d0ae(0x1b4)](),_0x2627e9=_0x198f18[_0x55d0ae(0x181)][_0x55d0ae(0x276)]?new Date(_0x198f18[_0x55d0ae(0x181)]['finishedAt'])[_0x55d0ae(0x1b4)]():Date[_0x55d0ae(0xc4)](),_0x1fce02=_0x198f18[_0x55d0ae(0x162)]?.['name']||_0x55d0ae(0x1ae);!_0x47f03c['has'](_0x1fce02)&&_0x47f03c[_0x55d0ae(0x1c0)](_0x1fce02,[]),_0x47f03c[_0x55d0ae(0x240)](_0x1fce02)['push']({'session':_0x198f18,'startTime':_0x98e30d,'endTime':_0x2627e9,'duration':_0x2627e9-_0x98e30d}),_0x4c1b18=Math[_0x55d0ae(0x173)](_0x4c1b18,_0x98e30d),_0x2ce4ce=Math[_0x55d0ae(0x114)](_0x2ce4ce,_0x2627e9);}}if(_0x47f03c[_0x55d0ae(0xf0)]===0x0)return _0x55d0ae(0x23a);const _0x7a4181=process[_0x55d0ae(0x1fa)]['columns']||0x78,_0x4100ca=0x1e,_0x26a704=0x32,_0x2df6e9=0x4,_0xe79cfc=Math[_0x55d0ae(0x173)](_0x26a704,Math[_0x55d0ae(0x114)](_0x4100ca,Math[_0x55d0ae(0x225)](_0x7a4181*0.3))),_0x2176ac=_0x7a4181-_0xe79cfc-TIMELINE_CONFIG['GUTTER']-0x3-_0x2df6e9,_0x42cda2=_0x2ce4ce-_0x4c1b18,_0x4157a4=_0x42cda2/_0xe79cfc,_0x3b8a1c=renderTimeAxis({'startTime':_0x4c1b18,'endTime':_0x2ce4ce,'durationMs':_0x42cda2,'msPerChar':_0x4157a4},_0xe79cfc),_0x41f497=[];for(const _0x38d1a9 of _0x47f03c['values']()){_0x41f497['push'](..._0x38d1a9);}_0x41f497[_0x55d0ae(0x140)]((_0x190ca6,_0x433661)=>_0x433661[_0x55d0ae(0x14a)]-_0x190ca6['startTime']);const _0x4505ae=new Date(_0x4c1b18),_0x43a7ce=formatDate(_0x4505ae),_0x12ee3d=_0x2df6e9+TIMELINE_CONFIG[_0x55d0ae(0x182)]+TIMELINE_CONFIG[_0x55d0ae(0x21b)]+_0x2176ac,_0x75f890='\x20'[_0x55d0ae(0x129)](_0x12ee3d-_0x43a7ce[_0x55d0ae(0x1ba)]),_0x2ecb12=_0x75f890+a56_0x4d082d[_0x55d0ae(0x262)](_0x43a7ce)+'\x20'+_0x3b8a1c;_0x5dd25a[_0x55d0ae(0x103)](_0x2ecb12);const _0xa18852=0x16;let _0x2a1305=0x0;for(const _0x523881 of _0x41f497){const _0xbd542d=_0x523881[_0x55d0ae(0x1dc)][_0x55d0ae(0x162)]?.[_0x55d0ae(0x161)]||'?',_0x23a913=Math[_0x55d0ae(0x173)](stringWidth(_0xbd542d),_0xa18852);_0x2a1305=Math[_0x55d0ae(0x114)](_0x2a1305,_0x23a913);}for(const _0x3c5579 of _0x41f497){const {session:_0x23065c,startTime:_0x18fa9b,endTime:_0x921976,duration:_0x568f65}=_0x3c5579,_0x47315e=_0x23065c[_0x55d0ae(0x162)]?.['id'],_0x3165f1=_0x23065c['id'],_0x271ebb=_0x23065c['project']?.[_0x55d0ae(0x161)]||'?',_0x5baf17=_0x23065c[_0x55d0ae(0x227)]?.['name']||'?';let _0x2cfc11,_0x108964;if(_0x23065c[_0x55d0ae(0x181)]){const _0x31224d=_0x23065c[_0x55d0ae(0x181)];!_0x31224d[_0x55d0ae(0x1bd)]?(_0x2cfc11=_0x31224d[_0x55d0ae(0x269)]?'🛑':'🔄',_0x108964=_0x31224d['cancelRequested']?a56_0x4d082d[_0x55d0ae(0x288)]:a56_0x4d082d[_0x55d0ae(0x137)]):(_0x2cfc11=_0x31224d[_0x55d0ae(0x283)]?'✅':'❌',_0x108964=_0x31224d[_0x55d0ae(0x283)]?a56_0x4d082d[_0x55d0ae(0xfb)]:a56_0x4d082d[_0x55d0ae(0x171)]);}else _0x2cfc11='⏳',_0x108964=a56_0x4d082d[_0x55d0ae(0x262)];const _0x224927='#'+_0x3165f1,_0xc98243=_0x47315e?hyperlink(_0x224927,getWorkflowSessionUrl(_0x3c43cc,_0x47315e,_0x3165f1)):_0x224927;let _0x37b99a=_0x271ebb;stringWidth(_0x271ebb)>_0xa18852&&(_0x37b99a=_0x271ebb[_0x55d0ae(0x191)](0x0,_0xa18852-0x1)+'…');const _0x3af77e=a56_0x4d082d['dim'](_0x37b99a),_0x38462a=stringWidth(_0x37b99a),_0x27c88f='\x20'['repeat'](_0x2a1305-stringWidth(_0x37b99a)+0x2),_0x260fcd='('+formatElapsed(_0x568f65)+')',_0x113562=stringWidth(_0x260fcd),_0x1947af=stringWidth(_0x224927),_0x2e29f3=_0x1947af+0x1+_0x38462a+_0x27c88f[_0x55d0ae(0x1ba)],_0x217d2c=_0x2176ac-_0x2e29f3-_0x113562-0x1-0x8;let _0xe8944a=_0x5baf17;stringWidth(_0xe8944a)>_0x217d2c&&(_0xe8944a=_0xe8944a['slice'](0x0,_0x217d2c-0x1)+'…');const _0x47e737=_0xc98243+'\x20'+_0x3af77e+_0x27c88f+_0xe8944a,_0x5c5eff=stringWidth(_0x47e737),_0x3c8e33=_0x2176ac-_0x5c5eff-_0x113562,_0x54b90d=_0x47e737+'\x20'[_0x55d0ae(0x129)](Math[_0x55d0ae(0x114)](0x1,_0x3c8e33))+a56_0x4d082d[_0x55d0ae(0x262)](_0x260fcd),_0x299e45=Math[_0x55d0ae(0x225)]((_0x18fa9b-_0x4c1b18)/_0x4157a4),_0x79f989=Math['floor']((_0x921976-_0x4c1b18)/_0x4157a4),_0x19fa6e=Math['max'](_0x299e45+0x1,_0x79f989),_0x7df22b=new Array(_0xe79cfc)[_0x55d0ae(0x177)]('\x20');for(let _0x3387b9=_0x299e45;_0x3387b9<Math[_0x55d0ae(0x173)](_0x19fa6e,_0xe79cfc);_0x3387b9++){_0x7df22b[_0x3387b9]='─';}const _0x56d8b2=_0x7df22b[_0x55d0ae(0x175)](_0x4feda4=>_0x4feda4==='\x20'?'\x20':_0x108964(_0x4feda4))[_0x55d0ae(0x13b)]('');_0x5dd25a['push'](_0x2cfc11+'\x20'+_0x54b90d+'│'+_0x56d8b2+'│');}return _0x5dd25a['join']('\x0a');}async[a56_0x1ddcb4(0xe5)](_0x2c59b0,_0xb7f9d5,_0x383c99){const _0x42f9cc=a56_0x1ddcb4,{options:_0x4589fb,tdx:_0x4c5fce}=_0xb7f9d5,_0x585217=_0x4589fb[_0x42f9cc(0x194)],{timelineRows:_0xb0e4e8,timeAxisHeader:_0x59665f}=this[_0x42f9cc(0x28a)](_0x2c59b0,_0x585217),_0x2fcdd1=_0xb0e4e8[_0x42f9cc(0x16f)](_0x3ab439=>_0x3ab439[_0x42f9cc(0x271)]);if(_0x2fcdd1[_0x42f9cc(0x1ba)]===0x0){const _0xb9c580=this['renderSessionsTimeline'](_0x2c59b0,_0x585217);console['log'](_0xb9c580);!_0x383c99&&(console[_0x42f9cc(0x12a)](''),console[_0x42f9cc(0x12a)](a56_0x4d082d['dim'](_0x42f9cc(0x25f))),console[_0x42f9cc(0x12a)](a56_0x4d082d[_0x42f9cc(0x262)](_0x42f9cc(0x172))+'or'+a56_0x4d082d[_0x42f9cc(0x262)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x59665f&&console[_0x42f9cc(0x1a1)](_0x59665f);const _0x5b0496=_0xb0e4e8[_0x42f9cc(0x16f)](_0x43534a=>_0x43534a[_0x42f9cc(0x271)])['map'](_0x31858b=>({'title':_0x31858b['displayLine'],'value':_0x31858b[_0x42f9cc(0x271)]})),_0x161fc5=process[_0x42f9cc(0x1fa)][_0x42f9cc(0x1c1)]||0x3c,_0x589fe7=Math[_0x42f9cc(0x114)](0x28,Math[_0x42f9cc(0x225)](_0x161fc5*0x2/0x3)),_0x2103a9=await a56_0x34435f({'type':_0x42f9cc(0x1ff),'name':_0x42f9cc(0x271),'message':_0x42f9cc(0x256),'choices':_0x5b0496,'initial':-0x1,'limit':_0x589fe7,'clearFirst':!![],'fallback':{'title':_0x42f9cc(0x1db),'value':null},'suggest':(_0x2f0085,_0x300fe7)=>{const _0x4d668c=_0x42f9cc;if(!_0x2f0085)return Promise[_0x4d668c(0x235)](_0x300fe7);const _0x46f449=_0x300fe7[_0x4d668c(0x16f)](_0x523b6b=>{const _0x5a4aae=_0x4d668c,_0x30ebcb=_0x523b6b;return _0x30ebcb[_0x5a4aae(0x16c)][_0x5a4aae(0x15b)]()[_0x5a4aae(0x108)](_0x2f0085['toLowerCase']());});return Promise[_0x4d668c(0x235)](_0x46f449);}}),_0x2298d5=()=>{const _0x329661=_0x42f9cc;process['stdout'][_0x329661(0x20a)](_0x329661(0x117)),process[_0x329661(0x1fa)][_0x329661(0x20a)](_0x329661(0x117)),process[_0x329661(0x1fa)][_0x329661(0x20a)]('\x1b[1A\x1b[2K');},_0x1e6f6d=_0x2103a9&&_0x2103a9[_0x42f9cc(0x271)]&&_0x2103a9['attemptId']!==null&&_0x2103a9[_0x42f9cc(0x271)][_0x42f9cc(0x27e)]()!=='';if(!_0x1e6f6d){_0x2298d5(),console[_0x42f9cc(0x1a1)](a56_0x4d082d[_0x42f9cc(0x262)](_0x42f9cc(0x27d)));return;}_0x2298d5();const _0x4b98a5=_0x2c59b0[_0x42f9cc(0x23b)](_0x175637=>_0x175637['lastAttempt']?.['id']===_0x2103a9[_0x42f9cc(0x271)]);if(_0x4b98a5){const _0x5d5a0f=_0x4b98a5['project']?.[_0x42f9cc(0x161)]||'?',_0x318ca9=_0x4b98a5[_0x42f9cc(0x227)]?.[_0x42f9cc(0x161)]||'?';console[_0x42f9cc(0x1a1)](_0x42f9cc(0x19c)+a56_0x4d082d['dim'](_0x5d5a0f)+_0x42f9cc(0xcd)+a56_0x4d082d[_0x42f9cc(0x262)](_0x318ca9));}const _0x9cb1b8=new WorkflowTimelineCommand();await _0x9cb1b8[_0x42f9cc(0x12f)]({'args':[],'options':{..._0x4589fb,'attemptId':_0x2103a9[_0x42f9cc(0x271)]},'tdx':_0x4c5fce});}[a56_0x1ddcb4(0x28a)](_0x547cf6,_0x106f05){const _0x1b705a=a56_0x1ddcb4,_0xbae654=new Map();for(const _0x369451 of _0x547cf6){_0x369451['id']&&_0x369451[_0x1b705a(0x181)]?.['id']&&_0xbae654[_0x1b705a(0x1c0)](_0x369451['id'],_0x369451[_0x1b705a(0x181)]['id']);}const _0x5c68de=[];let _0xa24a62='';const _0x23631b=this[_0x1b705a(0x25b)](_0x547cf6,_0x106f05),_0x402151=_0x23631b[_0x1b705a(0x1e1)]('\x0a');for(const _0x249a05 of _0x402151){if(_0x249a05['startsWith'](_0x1b705a(0xdc))||_0x249a05[_0x1b705a(0x11d)](/^\s+\d{4}-\d{2}-\d{2}/))_0xa24a62=_0x249a05;else{if(_0x249a05['match'](/^[✅❌🔄🛑⏳]/)){const _0x4c77ad=_0x249a05['match'](/#(\d+)/),_0x2cee60=_0x4c77ad?_0x4c77ad[0x1]:null,_0x16076f=_0x2cee60?_0xbae654[_0x1b705a(0x240)](_0x2cee60)||null:null,_0x3072ed=_0x547cf6[_0x1b705a(0x23b)](_0x96c4cd=>_0x96c4cd['id']===_0x2cee60),_0xdcdf9b=_0x3072ed?.[_0x1b705a(0x162)]?.[_0x1b705a(0x161)]||'';_0x5c68de['push']({'displayLine':_0x249a05,'attemptId':_0x16076f,'projectName':_0xdcdf9b});}}}return{'timelineRows':_0x5c68de,'timeAxisHeader':_0xa24a62};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x285);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0xe4);async[a56_0x1ddcb4(0x12f)](_0x47630b){const _0x3ab53a=a56_0x1ddcb4,{options:_0x135f79,args:_0x5ee7d9,tdx:_0x3e840e}=_0x47630b,_0x158f22=this[_0x3ab53a(0x1fd)](_0x5ee7d9,_0x135f79);if(!_0x158f22)return 0x1;const {projectName:_0xa2d34b,workflowName:_0x2b6ba8}=_0x158f22,_0x9eb37e=_0x135f79[_0x3ab53a(0x1ee)];if(_0x135f79[_0x3ab53a(0x199)]){if(_0xa2d34b&&_0x2b6ba8)console[_0x3ab53a(0x12a)](_0x3ab53a(0x23c)+_0xa2d34b+'.'+_0x2b6ba8);else _0xa2d34b&&console[_0x3ab53a(0x12a)](_0x3ab53a(0x1ce)+_0xa2d34b);_0x9eb37e&&console[_0x3ab53a(0x12a)](_0x3ab53a(0x142));}const _0x21276e=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x3e840e[_0x3ab53a(0x227)][_0x3ab53a(0x163)]({'projectName':_0xa2d34b,'workflowName':_0x2b6ba8,'includeRetried':_0x9eb37e,'limit':_0x135f79[_0x3ab53a(0x24e)]}),{'verbose':_0x135f79['verbose']}),_0x570f76=_0x21276e[_0x3ab53a(0x14d)],_0x5dd2b0=_0x135f79['limit']||0x64,_0x306cd8=_0x570f76[_0x3ab53a(0x1ba)]>=_0x5dd2b0?a56_0x4d082d[_0x3ab53a(0x262)](_0x3ab53a(0x1a7)):'';console[_0x3ab53a(0x12a)](_0x3ab53a(0x1b2)+_0x570f76['length']+_0x3ab53a(0x155)+(_0x570f76['length']!==0x1?'s':'')+_0x306cd8);if(_0x135f79[_0x3ab53a(0x123)]===_0x3ab53a(0x1fc)||_0x135f79[_0x3ab53a(0x123)]===_0x3ab53a(0x17d)||_0x135f79[_0x3ab53a(0x123)]===_0x3ab53a(0x257))await handleSDKOutput(_0x570f76,_0x135f79);else{if(_0x570f76['length']===0x0){if(_0xa2d34b&&_0x2b6ba8)console['log'](_0x3ab53a(0xed)+_0xa2d34b+'.'+_0x2b6ba8);else _0xa2d34b?console[_0x3ab53a(0x1a1)](_0x3ab53a(0x1c6)+_0xa2d34b):console[_0x3ab53a(0x1a1)](_0x3ab53a(0x215));}else{const _0x27588e=_0x135f79[_0x3ab53a(0x194)],_0x4d9263=_0x570f76[_0x3ab53a(0x175)](_0xc1ec38=>{const _0x1cc79d=_0x3ab53a,_0x5667ad=a56_0x4d082d['dim']('#'+_0xc1ec38['id']),_0x40a158=_0xc1ec38['project']?.['id'],_0x861377=_0xc1ec38[_0x1cc79d(0x231)]||_0xc1ec38[_0x1cc79d(0x1f2)],_0x6cdc75=_0x40a158&&_0x861377?hyperlink(_0x5667ad,getWorkflowAttemptUrl(_0x27588e,_0x40a158,_0x861377,_0xc1ec38['id'])):_0x5667ad,{icon:_0x5bc767,text:_0x60a4ac}=getAttemptStatusDisplay(_0xc1ec38),_0x479c8a=(_0xc1ec38['project']?.[_0x1cc79d(0x161)]||'?')+'.'+(_0xc1ec38['workflow']?.[_0x1cc79d(0x161)]||'?'),_0xa6acff=_0xc1ec38[_0x1cc79d(0x1c3)]?a56_0x4d082d[_0x1cc79d(0x262)](_0xc1ec38[_0x1cc79d(0x1c3)]):'';return(_0x6cdc75+'\x20'+_0x5bc767+(_0x60a4ac?'\x20'+_0x60a4ac:'')+'\x20'+_0x479c8a+'\x20'+_0xa6acff)[_0x1cc79d(0x233)]();});await writeOutput(_0x4d9263[_0x3ab53a(0x13b)]('\x0a'),_0x135f79['output'],_0x3ab53a(0x13c));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]='workflow:attempt';[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x1ea);async[a56_0x1ddcb4(0x12f)](_0x2b9e6f){const _0x3e09e7=a56_0x1ddcb4,{options:_0x44fa72,args:_0x3e2e0e,tdx:_0x516b3f}=_0x2b9e6f,_0x4bf4f2=_0x3e2e0e[0x0];if(!_0x4bf4f2)return console[_0x3e09e7(0x12a)](_0x3e09e7(0x237)),0x1;_0x44fa72['verbose']&&console[_0x3e09e7(0x12a)]('Attempt\x20ID:\x20'+_0x4bf4f2);const _0x2458a9=await withSpinner(_0x3e09e7(0x17b),()=>_0x516b3f['workflow']['attempt'](_0x4bf4f2),{'verbose':_0x44fa72[_0x3e09e7(0x199)]}),_0x152659=_0x2458a9[_0x3e09e7(0x14d)];let _0x3e1281;!_0x152659[_0x3e09e7(0x1bd)]?_0x3e1281=_0x152659[_0x3e09e7(0x269)]?_0x3e09e7(0x148):_0x3e09e7(0x179):_0x3e1281=_0x152659[_0x3e09e7(0x283)]?_0x3e09e7(0x283):_0x3e09e7(0x12a);let _0x1a247f;if(_0x152659[_0x3e09e7(0x245)]&&_0x152659['finishedAt']){const _0x30a5d1=new Date(_0x152659[_0x3e09e7(0x245)])[_0x3e09e7(0x1b4)](),_0x334cc2=new Date(_0x152659['finishedAt'])[_0x3e09e7(0x1b4)]();_0x1a247f=Math[_0x3e09e7(0x226)]((_0x334cc2-_0x30a5d1)/0x3e8);}const _0x840cf2={'attempt_id':_0x152659['id'],'status':_0x3e1281,..._0x152659['index']!==undefined&&{'index':_0x152659[_0x3e09e7(0x261)]},..._0x152659['project']&&{'project':_0x152659['project'][_0x3e09e7(0x161)]},..._0x152659['workflow']&&{'workflow':_0x152659['workflow'][_0x3e09e7(0x161)]},..._0x152659['sessionId']&&{'session_id':_0x152659[_0x3e09e7(0x1f2)]},..._0x152659[_0x3e09e7(0x1c3)]&&{'session_time':_0x152659[_0x3e09e7(0x1c3)]},..._0x152659['retryAttemptName']&&{'retry_attempt':_0x152659[_0x3e09e7(0x17a)]},..._0x1a247f!==undefined&&{'duration_sec':_0x1a247f},..._0x152659[_0x3e09e7(0x245)]&&{'created_at':_0x152659['createdAt']},..._0x152659[_0x3e09e7(0x276)]&&{'finished_at':_0x152659['finishedAt']},...Object['keys'](_0x152659[_0x3e09e7(0x230)])[_0x3e09e7(0x1ba)]>0x0&&{'params':_0x152659[_0x3e09e7(0x230)]}};return await handleSingleObjectOutput(_0x840cf2,_0x44fa72),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x29b);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x221);async[a56_0x1ddcb4(0x12f)](_0x17646d){const _0x315893=a56_0x1ddcb4,{options:_0x4ae67a,args:_0x4b85f4,tdx:_0x23c30f}=_0x17646d,_0x408bdb=_0x4b85f4[0x0];if(!_0x408bdb)return console[_0x315893(0x12a)](_0x315893(0x237)),0x1;const _0x50a2e2=_0x4ae67a[_0x315893(0x217)];_0x4ae67a['verbose']&&(console[_0x315893(0x12a)](_0x315893(0x14c)+_0x408bdb),_0x50a2e2&&console[_0x315893(0x12a)](_0x315893(0x189)));const _0xdd7580=await withSpinner(_0x315893(0x188),()=>_0x23c30f[_0x315893(0x227)]['tasks'](_0x408bdb,_0x50a2e2||![]),{'verbose':_0x4ae67a[_0x315893(0x199)]}),_0x11bd63=_0xdd7580[_0x315893(0x14d)];return console['error'](_0x315893(0x1b2)+_0x11bd63[_0x315893(0x1ba)]+_0x315893(0x213)+(_0x11bd63[_0x315893(0x1ba)]!==0x1?'s':'')),await handleSDKOutput(_0x11bd63,_0x4ae67a),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']='workflow:logs';[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x205);async[a56_0x1ddcb4(0x12f)](_0x4b093f){const _0x56c202=a56_0x1ddcb4,{options:_0x5acda1,args:_0x524267,tdx:_0x12331f}=_0x4b093f,_0x547ed0=_0x524267[0x0];let _0x2be55b=_0x524267[0x1];if(!_0x547ed0)return console[_0x56c202(0x12a)](_0x56c202(0x237)),0x1;_0x5acda1[_0x56c202(0x199)]&&(console[_0x56c202(0x12a)](_0x56c202(0x14c)+_0x547ed0),_0x2be55b&&console[_0x56c202(0x12a)](_0x56c202(0x1e6)+_0x2be55b));const _0xae4eab=await withSpinner(_0x56c202(0x132),()=>_0x12331f[_0x56c202(0x227)][_0x56c202(0x1ac)](_0x547ed0,_0x2be55b),{'verbose':_0x5acda1[_0x56c202(0x199)]}),_0x283513=_0xae4eab[_0x56c202(0x14d)];if(_0x283513[_0x56c202(0x1ba)]===0x0)return console[_0x56c202(0x12a)]('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x2be55b&&(_0x5acda1[_0x56c202(0x1fc)]||_0x5acda1[_0x56c202(0x123)]))return await handleSDKOutput(_0x283513,_0x5acda1),0x0;if(!_0x2be55b){const _0x16f62a=_0x283513[_0x56c202(0x175)](_0x12c77a=>({'title':_0x12c77a['taskName']+'\x20('+formatBytes(_0x12c77a['fileSize'])+')','value':_0x12c77a[_0x56c202(0xd2)]})),_0x43dae5=await a56_0x34435f({'type':_0x56c202(0xca),'name':'task','message':_0x56c202(0x127),'choices':_0x16f62a});if(!_0x43dae5[_0x56c202(0x24b)])return console[_0x56c202(0x12a)](_0x56c202(0x27d)),0x0;_0x2be55b=_0x43dae5['task'];}const _0x5c0a7c=await withSpinner(_0x56c202(0xfe),()=>_0x12331f[_0x56c202(0x227)][_0x56c202(0x211)](_0x547ed0,_0x2be55b),{'verbose':_0x5acda1[_0x56c202(0x199)]}),_0x55f1f5=_0x5c0a7c['data'];return _0x55f1f5?console['log'](_0x55f1f5):console['error'](_0x56c202(0x136)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0xe2);['description']=a56_0x1ddcb4(0x111);async[a56_0x1ddcb4(0x12f)](_0x305a84){const _0x5bb41d=a56_0x1ddcb4,{options:_0x1049d0,args:_0x2c5be6,tdx:_0x418186}=_0x305a84,_0x16cc32=_0x2c5be6[0x0];if(!_0x16cc32)return console[_0x5bb41d(0x12a)](_0x5bb41d(0x237)),0x1;const _0x57b906=_0x1049d0['reason'];_0x1049d0[_0x5bb41d(0x199)]&&(console[_0x5bb41d(0x12a)](_0x5bb41d(0x14c)+_0x16cc32),_0x57b906&&console[_0x5bb41d(0x12a)](_0x5bb41d(0x149)+_0x57b906));if(!_0x1049d0[_0x5bb41d(0x115)]){if(!isInteractive())return console[_0x5bb41d(0x12a)](a56_0x4d082d[_0x5bb41d(0x171)](_0x5bb41d(0x18d)),_0x5bb41d(0x209)),console[_0x5bb41d(0x12a)](a56_0x4d082d[_0x5bb41d(0x262)](_0x5bb41d(0x1b5))),0x1;const _0x40e48f=await confirmKey(_0x5bb41d(0xce)+_0x16cc32+'?');if(!_0x40e48f)return console['error'](a56_0x4d082d[_0x5bb41d(0x288)](_0x5bb41d(0x27d))),0x1;}const _0x202a50=await withSpinner(_0x5bb41d(0x268),()=>_0x418186['workflow']['kill'](_0x16cc32,_0x57b906),{'verbose':_0x1049d0[_0x5bb41d(0x199)]}),_0x85dfe6=_0x202a50['data'];return console[_0x5bb41d(0x12a)]('✔\x20'+_0x85dfe6),0x0;}}function a56_0x498a(){const _0x460899=['Session\x20time:','sourceProjectName','value','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','basename','---\x20','listSchedules','projectId','/attempt/','Starting\x20workflow\x20run...','workflow:tasks','updatedAt','workflow:clone','\x20disabled\x20(','Pull\x20workflow\x20project\x20to\x20local\x20folder','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','padStart','bold','now','projectName','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Total:\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','→\x20New\x20project:\x20','select','LABEL_MIN_SPACING','attempt:',',\x20Workflow:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','Listing\x20schedules\x20for\x20','start','taskName','white','session:','workflows','utf-8','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','List\x20all\x20workflow\x20projects','disabledAt','existingProjectId','executeDryRun','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Listing\x20workflows...','No\x20projects\x20match\x20pattern:\x20','\x20\x20Revision:\x20','Source\x20directory\x20is\x20required','645250SdLVVV','workflow:kill','context','List\x20workflow\x20attempts','navigateSessionsInteractive','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','\x20\x20Project\x20ID:\x20','description','...','newProjectId','tasks','No\x20attempts\x20found\x20for:\x20','unknown','List\x20workflow\x20execution\x20sessions','size','pullProject','(use\x20--limit\x20to\x20see\x20more)','workflow:workflows','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Resume\x20from:\x20','No\x20workflow\x20sessions\x20found','renderTimeline','Workflow:\x20','parse','workflow:sessions','green','\x20\x20Session\x20context\x20set\x20to:\x20','listSecrets','Downloading\x20logs...','4tbfOZR','Tip:\x20cd\x20to\x20workflows/','\x0a✔\x20Already\x20up\x20to\x20date','getFullYear','push','✔\x20Schedule\x20found','tdx.json','Error:','status','includes','No\x20workflow\x20projects\x20found','applyPullProject','✔\x20Workflow\x20project\x20context\x20cleared.','isTTY','Loading\x20workflows...','sys','nextRunTime','Expected\x20format:\x20--param\x20key=value','Kill\x20a\x20running\x20attempt','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','max','yes','requireProject','\x1b[1A\x1b[2K','fullName','\x20-\x20','workflow:use','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','📁\x20','match','\x20secret','projects','9qvGmuI','pending','workflow:run','format','Writing\x20files...','\x0a✔\x20No\x20changes\x20to\x20push','Select\x20a\x20workflow\x20to\x20run','Select\x20a\x20task\x20to\x20view\x20logs:','Analyzing\x20changes...','repeat','error','workflow:projects','Output\x20directory:\x20','✔\x20Downloaded\x20','\x20\x20tdx\x20wf\x20use\x20<project>','execute','fromTask','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Fetching\x20log\x20files...','\x20\x20Console:\x20','13181BJdUQM','startsWith','No\x20log\x20content\x20found','blue','localeCompare','cwd','workflow:schedule:disable','join','list','filesExtracted','696363vZmLrr','force','sort','\x20(disabled)','Include\x20retried:\x20yes','Retrying\x20attempt...','download','366AanqQE','No\x20sessions\x20found\x20for:\x20','\x20\x20Attempt\x20ID:\x20','canceling','Reason:\x20','startTime','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Attempt\x20ID:\x20','data','Error:\x20Project\x20name\x20is\x20required','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','\x20\x20Changes:\x20','New\x20project\x20name:\x20','\x20modified','649690ATLNJA','\x0aApply\x20these\x20changes?','\x20attempt','isNewProject','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','💡\x20Tip:\x20Use\x20','retryAttempt','dryRun','toLowerCase','stringify','from','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','getHours','name','project','attempts','Listing\x20workflow\x20sessions...','Auto-selected\x20latest\x20session:\x20','Project\x20directory:\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','toISOString','readFile','List\x20workflows','workflow:secrets:set','title','fileCount','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','filter','cyan','red','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','min','\x20\x20Location:\x20','map','972yuflNv','fill','workflow:pull','running','retryAttemptName','Getting\x20attempt\x20details...','\x20\x20Files\x20extracted:\x20','jsonl','Listing\x20secrets...','Workflow:','Parameters:\x20','lastAttempt','ICON_WIDTH','Loading\x20session...','\x20secrets...','No\x20schedules\x20found','workflow:upload','hasChanges','Getting\x20attempt\x20tasks...','Including\x20subtasks:\x20yes','Revision:\x20','Status:\x20','✔\x20Project\x20updated','\x0aError:','toLocaleString','\x20new','\x20\x20Project:\x20','slice','MIN_TIMELINE_WIDTH','getSchedule','site','columns','workflowProject','MAX_POLL_ITERATIONS','No\x20workflow\x20tdx.json\x20found','verbose','Latest\x20session\x20has\x20no\x20attempt','workflowName','Project:\x20','indexOf','POLL_INTERVAL_MS','sourceDir','splice','log','getMonth','config','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Usage:\x20workflow:delete\x20<project-name-or-id>','MAX_TIMELINE_WIDTH','\x20(use\x20--limit\x20to\x20show\x20more)','startedAt','\x20sessions\x20','Validation:\x20skipped','✔\x20Showing\x20','logFiles','newProjectName','(unknown)','-\x20no\x20files\x20written','\x20\x20New\x20attempt\x20ID:\x20','executePushProject','✔\x20Found\x20','No\x20sessions\x20found','getTime','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','showWorkflowConsoleUrl','Fetching\x20workflow\x20','getDate','✔\x20Schedule\x20#','length','No\x20workflows\x20found','Enabling\x20schedule\x20#','done','Disabling\x20schedule\x20#','enableSchedule','set','rows','\x0a✔\x20Attempt\x20complete','sessionTime','\x20unchanged','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','No\x20attempts\x20found\x20in\x20project:\x20','some','new','executeCloneProject','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','type','\x27...','\x0a⚠\x20Project\x20\x22','Filter:\x20project=','\x20\x20Source:\x20','replace','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','skipValidation','follow','summary','state','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','No\x20sessions\x20found\x20in\x20project:\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','MIN_LABEL_COUNT','duration','No\x20matching\x20sessions\x20found','session','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','\x20deleted','Loading\x20sessions...','\x20session','split','\x20of\x20','\x22\x20already\x20exists\x20(ID:\x20','\x20is\x20not\x20a\x20directory','resumeFrom','Task\x20name:\x20','Pushing\x20workflow\x20project...','Analyzing\x20project...','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','Show\x20specific\x20attempt\x20details','Project\x20filter:\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','\x0aDry\x20run\x20-\x20nothing\x20pushed','includeRetried','\x0aPolling...\x20(','\x20\x20Session\x20ID:\x20','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','sessionId','window','Dry\x20run:\x20yes','deleteSecret','getWorkflow','\x0aClone\x20\x22','stat','targetDir','stdout','Listing\x20workflow\x20projects...','json','parseProjectWorkflowPattern','No\x20workflows\x20found\x20in\x20project:\x20','autocomplete','✔\x20Workflow\x20run\x20started','✔\x20Project:\x20','output','MAX_TASKS_DISPLAY','✔\x20Retry\x20started','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','changes','end','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','write','attempt','Start\x20a\x20workflow\x20run','fs/promises','\x20\x20Workflow:\x20','path','311943naeKBb','logs','planned','\x20task','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','No\x20attempts\x20found','metadata','includeSubtasks','run','workflow:timeline','Downloading\x20project\x20','ICON_SPACING','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','\x0aUpdate\x20existing\x20project\x20\x22','unchanged','✔\x20Secret\x20\x27','Target:\x20','Show\x20tasks\x20for\x20an\x20attempt','buildTimelineData','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','/sessions/','floor','round','workflow','-\x20nothing\x20pushed','\x22?\x20This\x20cannot\x20be\x20undone.','listProjectSchedules','Project\x20name\x20is\x20required','LABEL_WIDTH_DIVISOR','substring','relative','workflow:download','params','session_id','prepareCloneProject','trimEnd','pollTimeline','resolve','2qoPzfV','Error:\x20Attempt\x20ID\x20is\x20required','Parameters:','sessions','No\x20sessions\x20with\x20timing\x20information','find','Filter:\x20','/app/workflows/','msPerChar','Pattern:\x20','get','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','✔\x20Pull\x20complete','createdAt','✔\x20Deleted\x20project\x20','durationMs','diff','Deleting\x20project\x20','Source\x20project:\x20','task','Deleting\x20secret...','preparePushProject','limit','\x20(system)','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','param','\x20project','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Files\x20to\x20upload:\x20','Select\x20a\x20session\x20to\x20view\x20timeline:','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','table','Pushing\x20project...','Error:\x20Invalid\x20JSON\x20in\x20--params','workflow:secrets:delete','renderSessionsTimeline','\x20secrets\x20set\x20for\x20project\x20\x27','Source\x20directory:\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','36454zDmZrt','index','dim','✔\x20Clone\x20complete','revision:\x20','targetExists','revision','Fetching\x20schedule\x20#','Killing\x20attempt...','cancelRequested','Pulling\x20project\x20','Key:\x20','workflow:retry','all','group_error','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','attemptId','\x20next:\x20','Resolving\x20project\x20\x27','message','resolveProject','finishedAt','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Using\x20attempt\x20','✔\x20Workflow\x20project\x20set\x20to:\x20','Source:\x20','Session\x20not\x20found:\x20','\x27\x20from\x20project\x20\x27','Cancelled','trim','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','keys','\x20enabled\x20(','skipSchedule','success','\x22\x20with\x20new\x20revision?','workflow:attempts','\x0aPush\x20these\x20changes?','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','yellow','modified','generateSessionTimelineRows','1262696loZkgG','renderSingleTimeline','Error:\x20Invalid\x20parameter\x20format:\x20','retrySession','\x22\x20to\x20new\x20project\x20\x22','\x0aDry\x20run\x20-\x20no\x20files\x20written'];a56_0x498a=function(){return _0x460899;};return a56_0x498a();}export class WorkflowRetryCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x26c);[a56_0x1ddcb4(0xe9)]='Retry\x20a\x20session\x20or\x20attempt';async['execute'](_0x13c540){const _0x3265e7=a56_0x1ddcb4,{options:_0x4c0eff,args:_0x1c9ef2,tdx:_0x6653a3}=_0x13c540,_0x47d09d=_0x1c9ef2[0x0];if(!_0x47d09d)return console[_0x3265e7(0x12a)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x3265e7(0x12a)](_0x3265e7(0x26f)),0x1;let _0x4e5bb4=![],_0x2b11c2=_0x47d09d;if(_0x47d09d['startsWith'](_0x3265e7(0xd4)))_0x4e5bb4=!![],_0x2b11c2=_0x47d09d[_0x3265e7(0x22d)](0x8);else{if(_0x47d09d[_0x3265e7(0x135)](_0x3265e7(0xcc)))_0x4e5bb4=![],_0x2b11c2=_0x47d09d['substring'](0x8);else return console[_0x3265e7(0x12a)](_0x3265e7(0x16e)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x1820c9=_0x4c0eff[_0x3265e7(0x130)],_0x5c9e68=_0x4c0eff[_0x3265e7(0x1e5)],_0xcb696d=_0x4c0eff[_0x3265e7(0x230)],_0x1355a6=_0x4c0eff[_0x3265e7(0x13f)];_0x4c0eff[_0x3265e7(0x199)]&&(console[_0x3265e7(0x12a)](_0x3265e7(0x220)+(_0x4e5bb4?_0x3265e7(0x1dc):'attempt')+'\x20'+_0x2b11c2),_0x1820c9&&console[_0x3265e7(0x12a)]('From\x20task:\x20'+_0x1820c9),_0x5c9e68&&console['error'](_0x3265e7(0xf5)+_0x5c9e68),_0xcb696d&&console[_0x3265e7(0x12a)]('Params:\x20'+_0xcb696d),_0x1355a6&&console[_0x3265e7(0x12a)]('Force:\x20yes'));let _0x3b1a37;if(_0xcb696d)try{if(_0xcb696d[_0x3265e7(0x135)]('@')){const _0x4d7f11=await import(_0x3265e7(0x20d)),_0x55c7d0=_0xcb696d['substring'](0x1),_0xdb450f=await _0x4d7f11[_0x3265e7(0x169)](_0x55c7d0,_0x3265e7(0xd6));_0x3b1a37=JSON[_0x3265e7(0xf9)](_0xdb450f);}else _0x3b1a37=JSON[_0x3265e7(0xf9)](_0xcb696d);}catch{return console[_0x3265e7(0x12a)](_0x3265e7(0x259)),0x1;}if(!_0x4c0eff[_0x3265e7(0x115)]){if(!isInteractive())return console[_0x3265e7(0x12a)](a56_0x4d082d[_0x3265e7(0x171)](_0x3265e7(0x18d)),_0x3265e7(0x209)),console[_0x3265e7(0x12a)](a56_0x4d082d[_0x3265e7(0x262)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x564218=await confirmKey(_0x3265e7(0xc6)+(_0x4e5bb4?_0x3265e7(0x1dc):_0x3265e7(0x20b))+'\x20'+_0x2b11c2+'?');if(!_0x564218)return console[_0x3265e7(0x12a)](a56_0x4d082d[_0x3265e7(0x288)](_0x3265e7(0x27d))),0x1;}let _0x2bd5a3;_0x4e5bb4?_0x2bd5a3=await withSpinner('Retrying\x20session...',()=>_0x6653a3[_0x3265e7(0x227)][_0x3265e7(0x28e)](_0x2b11c2,{'fromTask':_0x1820c9,'retryParams':_0x3b1a37}),{'verbose':_0x4c0eff['verbose']}):_0x2bd5a3=await withSpinner(_0x3265e7(0x143),()=>_0x6653a3[_0x3265e7(0x227)][_0x3265e7(0x159)](_0x2b11c2,{'resumeFrom':_0x5c9e68,'retryParams':_0x3b1a37,'force':_0x1355a6}),{'verbose':_0x4c0eff[_0x3265e7(0x199)]});const _0x195801=_0x2bd5a3[_0x3265e7(0x14d)];return console[_0x3265e7(0x12a)](_0x3265e7(0x204)),console['error'](_0x3265e7(0x1b0)+_0x195801['attemptId']),console[_0x3265e7(0x12a)](_0x3265e7(0x1f0)+_0x195801[_0x3265e7(0x1f2)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x122);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x20c);async[a56_0x1ddcb4(0x12f)](_0x4eead0){const _0x323486=a56_0x1ddcb4,{options:_0x16737e,args:_0x661505,tdx:_0x4b8705}=_0x4eead0;let _0x13a580=_0x661505[0x0];if(!_0x13a580){const _0x3e816e=this[_0x323486(0x275)]([],_0x16737e),_0x2988e3=await withSpinner(_0x323486(0x10d),()=>_0x4b8705[_0x323486(0x227)][_0x323486(0xd5)](_0x3e816e,{'limit':_0x16737e[_0x323486(0x24e)]}),{'verbose':_0x16737e[_0x323486(0x199)]}),_0x38b550=_0x2988e3[_0x323486(0x14d)];if(_0x38b550[_0x323486(0x1ba)]===0x0)return console[_0x323486(0x12a)](_0x323486(0x1bb)),!_0x3e816e&&console[_0x323486(0x12a)](a56_0x4d082d['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x55cf59=_0x38b550['map'](_0x4fb9f3=>({'title':_0x4fb9f3[_0x323486(0x162)]?.[_0x323486(0x161)]+'.'+_0x4fb9f3[_0x323486(0x161)],'value':_0x4fb9f3[_0x323486(0x162)]?.[_0x323486(0x161)]+'.'+_0x4fb9f3[_0x323486(0x161)],'description':_0x4fb9f3[_0x323486(0x266)]?_0x323486(0x264)+_0x4fb9f3['revision']:undefined})),_0x499f14=await a56_0x34435f({'type':_0x323486(0xca),'name':_0x323486(0x227),'message':_0x323486(0x126),'choices':_0x55cf59});if(!_0x499f14['workflow'])return 0x1;_0x13a580=_0x499f14[_0x323486(0x227)];}if(!_0x13a580['includes']('.')){const _0x2535fc=this['resolveProject']([],_0x16737e);if(_0x2535fc)_0x13a580=_0x2535fc+'.'+_0x13a580;else return console[_0x323486(0x12a)](a56_0x4d082d[_0x323486(0x171)](_0x323486(0x106)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x323486(0x12a)](a56_0x4d082d[_0x323486(0x262)](_0x323486(0x2a0))),0x1;}const _0x30b777=_0x16737e[_0x323486(0x251)],_0xfd929b=_0x16737e[_0x323486(0x1c3)],_0x4123d2={};if(_0x30b777&&Array['isArray'](_0x30b777))for(const _0x7962db of _0x30b777){const _0x1fa9e9=_0x7962db[_0x323486(0x19d)]('=');if(_0x1fa9e9===-0x1)return console[_0x323486(0x12a)](_0x323486(0x28d)+_0x7962db),console[_0x323486(0x12a)](_0x323486(0x110)),0x1;const _0x1908cf=_0x7962db[_0x323486(0x22d)](0x0,_0x1fa9e9),_0x1ed0fe=_0x7962db[_0x323486(0x22d)](_0x1fa9e9+0x1);try{_0x4123d2[_0x1908cf]=JSON['parse'](_0x1ed0fe);}catch{_0x4123d2[_0x1908cf]=_0x1ed0fe;}}_0x16737e[_0x323486(0x199)]&&(console[_0x323486(0x12a)](_0x323486(0xf8)+_0x13a580),Object[_0x323486(0x280)](_0x4123d2)[_0x323486(0x1ba)]>0x0&&console[_0x323486(0x12a)](_0x323486(0x180)+JSON[_0x323486(0x15c)](_0x4123d2)),_0xfd929b&&console['error']('Session\x20time:\x20'+_0xfd929b));if(_0x16737e[_0x323486(0x15a)])return await this[_0x323486(0xdb)](_0x4eead0,_0x13a580,_0x4123d2,_0xfd929b);const _0x3648d8=await withSpinner(_0x323486(0x29a),()=>_0x4b8705[_0x323486(0x227)][_0x323486(0x218)](_0x13a580,_0x4123d2,{'sessionTime':_0xfd929b}),{'verbose':_0x16737e[_0x323486(0x199)]}),_0x5c7162=_0x3648d8[_0x323486(0x14d)];console[_0x323486(0x12a)](_0x323486(0x200)),console[_0x323486(0x12a)](_0x323486(0x147)+_0x5c7162['id']),console[_0x323486(0x12a)]('\x20\x20Session\x20ID:\x20'+_0x5c7162[_0x323486(0x1f2)]),console['error']('\x20\x20Project:\x20'+_0x5c7162['project']?.['name']),console[_0x323486(0x12a)](_0x323486(0x20e)+_0x5c7162[_0x323486(0x227)]?.[_0x323486(0x161)]);if(_0x5c7162[_0x323486(0x162)]?.['id']&&_0x5c7162['sessionId']&&_0x5c7162['id']){const _0x153378=_0x16737e[_0x323486(0x194)],_0x16b84c=getConsoleUrl(_0x153378,_0x323486(0x23d)+_0x5c7162[_0x323486(0x162)]['id']+_0x323486(0x224)+_0x5c7162['sessionId']+_0x323486(0x299)+_0x5c7162['id']);console[_0x323486(0x12a)]('\x20\x20Console:\x20'+a56_0x4d082d[_0x323486(0x170)](_0x16b84c));}return 0x0;}async[a56_0x1ddcb4(0xdb)](_0x68cc9d,_0x12f77c,_0x28122a,_0x3888f7){const _0x3d36fd=a56_0x1ddcb4,{options:_0x5cdb9a,tdx:_0x169d8c}=_0x68cc9d,_0xbc4471=await withSpinner(_0x3d36fd(0x1b7)+_0x12f77c+'...',()=>_0x169d8c['workflow'][_0x3d36fd(0x1f6)](_0x12f77c),{'verbose':_0x5cdb9a[_0x3d36fd(0x199)]}),_0x1299ee=_0xbc4471[_0x3d36fd(0x14d)],_0x3d8b87=_0x3888f7??new Date()[_0x3d36fd(0x168)]();console[_0x3d36fd(0x1a1)](a56_0x4d082d[_0x3d36fd(0xc3)](_0x3d36fd(0x17f)),_0x12f77c),console['log'](a56_0x4d082d[_0x3d36fd(0xc3)](_0x3d36fd(0x291)),_0x3d8b87),console['log'](a56_0x4d082d[_0x3d36fd(0xc3)](_0x3d36fd(0x238)),JSON[_0x3d36fd(0x15c)](_0x28122a)),console[_0x3d36fd(0x1a1)](''),console[_0x3d36fd(0x1a1)](a56_0x4d082d['bold']('Task\x20graph:'));const _0x4679de=parseTaskGraph(_0x1299ee[_0x3d36fd(0x1a3)]??null);if(_0x4679de['length']===0x0)console[_0x3d36fd(0x1a1)](a56_0x4d082d['dim'](_0x3d36fd(0x270)));else for(const _0xcbdf4f of formatTaskGraph(_0x4679de)){console[_0x3d36fd(0x1a1)](_0xcbdf4f);}const _0x1970bc=summarizeTaskGraph(_0x4679de),_0x237d19=formatWarningSummary(_0x1970bc);return _0x237d19&&(console['log'](''),console[_0x3d36fd(0x1a1)](a56_0x4d082d[_0x3d36fd(0x288)](_0x237d19))),console[_0x3d36fd(0x1a1)](a56_0x4d082d[_0x3d36fd(0x288)](_0x3d36fd(0x11b))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x22f);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x294);async[a56_0x1ddcb4(0x12f)](_0x23e098){const _0x215c16=a56_0x1ddcb4,{options:_0x275c99,args:_0x2f4ce7,tdx:_0x2aa390}=_0x23e098,_0x19df39=_0x2f4ce7[0x0],_0x3b6e77=_0x2f4ce7[0x1]||'.';if(!_0x19df39)return console[_0x215c16(0x12a)](_0x215c16(0x14e)),console[_0x215c16(0x12a)](_0x215c16(0x206)),0x1;const _0x35dc38=_0x275c99[_0x215c16(0x266)];_0x275c99[_0x215c16(0x199)]&&(console[_0x215c16(0x12a)](_0x215c16(0x19c)+_0x19df39),console[_0x215c16(0x12a)](_0x215c16(0x12c)+_0x3b6e77),_0x35dc38&&console[_0x215c16(0x12a)](_0x215c16(0x18a)+_0x35dc38));const _0x3ef6bf=await withSpinner(_0x215c16(0x21a)+_0x19df39+_0x215c16(0xea),()=>_0x2aa390[_0x215c16(0x227)][_0x215c16(0x144)](_0x19df39,_0x3b6e77,{'revision':_0x35dc38}),{'verbose':_0x275c99[_0x215c16(0x199)]}),_0x19678e=_0x3ef6bf[_0x215c16(0x14d)];return console['error'](_0x215c16(0x12d)+_0x19678e[_0x215c16(0xc5)]),console['error'](_0x215c16(0xdf)+_0x19678e[_0x215c16(0x266)]),console[_0x215c16(0x12a)](_0x215c16(0x17c)+_0x19678e[_0x215c16(0x13d)]),console['error'](_0x215c16(0x174)+_0x3b6e77+'/'+_0x19678e[_0x215c16(0xc5)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a56_0x1ddcb4(0x186);['description']=a56_0x1ddcb4(0x1ca);async[a56_0x1ddcb4(0x12f)](_0x13b3cf){const _0x170b61=a56_0x1ddcb4,{options:_0x28ec8c,args:_0xfe6f10,tdx:_0x5962d8}=_0x13b3cf;let _0x5001fa='.',_0x958ed4=_0x28ec8c[_0x170b61(0x161)];if(_0xfe6f10[0x0]){const {promises:_0x38e29e}=await import('fs');try{const _0x22f49b=await _0x38e29e[_0x170b61(0x1f8)](_0xfe6f10[0x0]);if(_0x22f49b['isDirectory']())_0x5001fa=_0xfe6f10[0x0];else return console[_0x170b61(0x12a)]('Error:\x20'+_0xfe6f10[0x0]+_0x170b61(0x1e4)),0x1;}catch{_0x958ed4=_0xfe6f10[0x0],_0x5001fa='.';}}const _0x511dda=_0x28ec8c['revision'],_0x582887=_0x28ec8c['skipValidation'];_0x28ec8c['verbose']&&(console[_0x170b61(0x12a)](_0x170b61(0x166)+_0x5001fa),_0x958ed4&&console[_0x170b61(0x12a)]('Project\x20name:\x20'+_0x958ed4),_0x511dda&&console[_0x170b61(0x12a)](_0x170b61(0x18a)+_0x511dda),_0x582887&&console['error'](_0x170b61(0x1aa)));const _0x1bd667=await withSpinner(_0x170b61(0x1e7),()=>_0x5962d8[_0x170b61(0x227)][_0x170b61(0x103)](_0x5001fa,{'projectName':_0x958ed4,'revision':_0x511dda,'skipValidation':_0x582887}),{'verbose':_0x28ec8c['verbose']}),_0x2a6eb3=_0x1bd667[_0x170b61(0x14d)];return console[_0x170b61(0x12a)]('✔\x20Pushed\x20'+_0x2a6eb3[_0x170b61(0xc5)]),console['error'](_0x170b61(0xe8)+_0x2a6eb3[_0x170b61(0x298)]),console[_0x170b61(0x12a)](_0x170b61(0xdf)+_0x2a6eb3[_0x170b61(0x266)]),await this['showWorkflowConsoleUrl'](_0x5962d8,_0x2a6eb3[_0x170b61(0xc5)],_0x28ec8c[_0x170b61(0x194)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x178);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x29f);async[a56_0x1ddcb4(0x12f)](_0x30cb56){const _0x1faed0=a56_0x1ddcb4,{options:_0x3fb6d7,args:_0x183e85,tdx:_0x3671b1}=_0x30cb56,_0x410995=_0x183e85[0x0],_0x3a19b8=_0x183e85[0x1];if(!_0x410995)return console[_0x1faed0(0x12a)](a56_0x4d082d[_0x1faed0(0x171)](_0x1faed0(0x106)),'Project\x20name\x20is\x20required'),console[_0x1faed0(0x12a)](a56_0x4d082d['dim'](_0x1faed0(0xc8))),0x1;const _0x1aff34=_0x3fb6d7[_0x1faed0(0x266)];_0x3fb6d7['verbose']&&(console[_0x1faed0(0x12a)](_0x1faed0(0x19c)+_0x410995),_0x3a19b8&&console[_0x1faed0(0x12a)]('Target\x20directory:\x20'+_0x3a19b8),_0x1aff34&&console[_0x1faed0(0x12a)](_0x1faed0(0x18a)+_0x1aff34),_0x3fb6d7[_0x1faed0(0x15a)]&&console[_0x1faed0(0x12a)](_0x1faed0(0x1f4)));const _0x271062=await withSpinner(_0x1faed0(0x26a)+_0x410995+_0x1faed0(0xea),()=>_0x3671b1[_0x1faed0(0x227)][_0x1faed0(0xf1)](_0x410995,{'targetDir':_0x3a19b8,'revision':_0x1aff34}),{'verbose':_0x3fb6d7[_0x1faed0(0x199)]}),_0x3b8cd4=_0x271062[_0x1faed0(0x14d)];_0x3b8cd4[_0x1faed0(0x156)]?console[_0x1faed0(0x12a)](_0x1faed0(0xc9)+_0x3b8cd4[_0x1faed0(0xc5)]):console['error']('→\x20Project:\x20'+_0x3b8cd4[_0x1faed0(0xc5)]);console[_0x1faed0(0x12a)](_0x1faed0(0xdf)+_0x3b8cd4[_0x1faed0(0x266)]),console['error']('\x20\x20Target:\x20'+(a56_0x1268de[_0x1faed0(0x22e)](process[_0x1faed0(0x139)](),_0x3b8cd4[_0x1faed0(0x1f9)])||'.')),console['error'](_0x1faed0(0x150)+a56_0x4d082d[_0x1faed0(0xfb)]('+'+_0x3b8cd4['summary'][_0x1faed0(0x1c8)]+_0x1faed0(0x18f))+',\x20'+(a56_0x4d082d[_0x1faed0(0x288)]('~'+_0x3b8cd4[_0x1faed0(0x1d4)]['modified']+_0x1faed0(0x152))+',\x20')+(a56_0x4d082d[_0x1faed0(0x171)]('-'+_0x3b8cd4[_0x1faed0(0x1d4)]['deleted']+_0x1faed0(0x1de))+',\x20')+(''+a56_0x4d082d[_0x1faed0(0x262)](_0x3b8cd4[_0x1faed0(0x1d4)][_0x1faed0(0x21e)]+'\x20unchanged')));for(const _0x5cb72b of _0x3b8cd4[_0x1faed0(0x207)]){_0x5cb72b['type']===_0x1faed0(0x289)&&_0x5cb72b[_0x1faed0(0x248)]&&(console[_0x1faed0(0x12a)]('\x0a'+a56_0x4d082d['cyan'](_0x1faed0(0x296)+_0x5cb72b[_0x1faed0(0x20f)])),console[_0x1faed0(0x12a)](_0x5cb72b[_0x1faed0(0x248)]));}if(!_0x3b8cd4[_0x1faed0(0x187)])return saveSessionContext({'workflow_project':_0x3b8cd4[_0x1faed0(0xc5)]},_0x3fb6d7[_0x1faed0(0x1dc)]),console[_0x1faed0(0x12a)](a56_0x4d082d[_0x1faed0(0xfb)](_0x1faed0(0x101))),console[_0x1faed0(0x12a)](a56_0x4d082d[_0x1faed0(0x262)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x3b8cd4[_0x1faed0(0xc5)])),0x0;if(_0x3fb6d7[_0x1faed0(0x15a)])return console['error'](a56_0x4d082d[_0x1faed0(0x288)](_0x1faed0(0x290))),0x0;if(!_0x3fb6d7[_0x1faed0(0x115)]){if(!isInteractive())return console['error'](a56_0x4d082d[_0x1faed0(0x171)](_0x1faed0(0x18d)),_0x1faed0(0x209)),console[_0x1faed0(0x12a)](a56_0x4d082d[_0x1faed0(0x262)](_0x1faed0(0x1b5))),0x1;const _0x4292de=await confirmKey(_0x1faed0(0x154));if(!_0x4292de)return console[_0x1faed0(0x12a)](a56_0x4d082d[_0x1faed0(0x288)](_0x1faed0(0x27d)),_0x1faed0(0x1af)),0x1;}await withSpinner(_0x1faed0(0x124),()=>_0x3671b1['workflow'][_0x1faed0(0x10a)](_0x3b8cd4,{'revision':_0x1aff34}),{'verbose':_0x3fb6d7[_0x1faed0(0x199)]}),saveSessionContext({'workflow_project':_0x3b8cd4[_0x1faed0(0xc5)]},_0x3fb6d7['session']),console[_0x1faed0(0x12a)](a56_0x4d082d[_0x1faed0(0xfb)](_0x1faed0(0x244)));const _0x3b4390=a56_0x1268de['relative'](process[_0x1faed0(0x139)](),_0x3b8cd4['targetDir'])||'.';return console[_0x1faed0(0x12a)](a56_0x4d082d['dim'](_0x1faed0(0x174)+_0x3b4390)),console[_0x1faed0(0x12a)](a56_0x4d082d[_0x1faed0(0x262)](_0x1faed0(0xfc)+_0x3b8cd4['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]='workflow:push';['description']=a56_0x1ddcb4(0x1c5);async[a56_0x1ddcb4(0x12f)](_0x3ec276){const _0x3805ef=a56_0x1ddcb4,{options:_0x42942d,args:_0x5d8975,tdx:_0xb8082}=_0x3ec276,_0x5d5875=this['resolveProjectDir'](_0x5d8975,_0x42942d),_0x4cf231=_0x42942d,{revision:_0x3d4b49,skipValidation:_0x3caf0f,backfill:_0xf0331d}=_0x4cf231,_0x216b92=_0xf0331d===undefined?undefined:!_0xf0331d;_0x42942d[_0x3805ef(0x199)]&&(_0x5d5875&&console['error'](_0x3805ef(0x25d)+_0x5d5875),_0x3d4b49&&console[_0x3805ef(0x12a)](_0x3805ef(0x18a)+_0x3d4b49),_0x42942d[_0x3805ef(0x15a)]&&console[_0x3805ef(0x12a)](_0x3805ef(0x1f4)),_0x3caf0f&&console[_0x3805ef(0x12a)]('Validation:\x20skipped'),_0xf0331d&&console['error'](_0x3805ef(0xcf)));let _0x17e71b;try{_0x17e71b=await withSpinner(_0x3805ef(0x128),()=>_0xb8082[_0x3805ef(0x227)][_0x3805ef(0x24d)]({'sourceDir':_0x5d5875,'revision':_0x3d4b49,'skipValidation':_0x3caf0f,'skipSchedule':_0x216b92}),{'verbose':_0x42942d[_0x3805ef(0x199)]});}catch(_0x3d2dda){if(_0x3d2dda instanceof Error&&_0x3d2dda[_0x3805ef(0x274)][_0x3805ef(0x108)](_0x3805ef(0x198)))return console['error'](a56_0x4d082d[_0x3805ef(0x171)](_0x3805ef(0x106)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x42942d['workflowProject']?console[_0x3805ef(0x12a)](a56_0x4d082d['dim'](_0x3805ef(0x100)+_0x42942d[_0x3805ef(0x196)]+_0x3805ef(0x214)+_0x42942d[_0x3805ef(0x196)]+'\x27')):console[_0x3805ef(0x12a)](a56_0x4d082d['dim'](_0x3805ef(0xe7))),0x1;throw _0x3d2dda;}const _0x1f668d=_0x17e71b['data'];console[_0x3805ef(0x12a)](_0x3805ef(0x201)+_0x1f668d['projectName']),console[_0x3805ef(0x12a)](_0x3805ef(0x1cf)+_0x1f668d[_0x3805ef(0x19f)]),console['error'](_0x3805ef(0xdf)+_0x1f668d[_0x3805ef(0x266)]),console[_0x3805ef(0x12a)](_0x3805ef(0x150)+a56_0x4d082d[_0x3805ef(0xfb)]('+'+_0x1f668d[_0x3805ef(0x1d4)][_0x3805ef(0x1c8)]+_0x3805ef(0x18f))+',\x20'+(a56_0x4d082d[_0x3805ef(0x288)]('~'+_0x1f668d[_0x3805ef(0x1d4)][_0x3805ef(0x289)]+'\x20modified')+',\x20')+(a56_0x4d082d[_0x3805ef(0x171)]('-'+_0x1f668d[_0x3805ef(0x1d4)]['deleted']+_0x3805ef(0x1de))+',\x20')+(''+a56_0x4d082d[_0x3805ef(0x262)](_0x1f668d[_0x3805ef(0x1d4)][_0x3805ef(0x21e)]+_0x3805ef(0x1c4))));for(const _0x37d52f of _0x1f668d[_0x3805ef(0x207)]){_0x37d52f[_0x3805ef(0x1cb)]===_0x3805ef(0x289)&&_0x37d52f[_0x3805ef(0x248)]&&(console[_0x3805ef(0x12a)]('\x0a'+a56_0x4d082d[_0x3805ef(0x170)](_0x3805ef(0x296)+_0x37d52f[_0x3805ef(0x20f)])),console[_0x3805ef(0x12a)](_0x37d52f[_0x3805ef(0x248)]));}if(!_0x1f668d[_0x3805ef(0x187)])return console[_0x3805ef(0x12a)](a56_0x4d082d[_0x3805ef(0xfb)](_0x3805ef(0x125))),await this['showWorkflowConsoleUrl'](_0xb8082,_0x1f668d[_0x3805ef(0xc5)],_0x42942d['site']),0x0;if(_0x42942d['dryRun'])return console['error'](a56_0x4d082d['yellow'](_0x3805ef(0x1ed))),0x0;if(!_0x42942d[_0x3805ef(0x115)]){if(!isInteractive())return console['error'](a56_0x4d082d[_0x3805ef(0x171)](_0x3805ef(0x18d)),_0x3805ef(0x209)),console[_0x3805ef(0x12a)](a56_0x4d082d['dim'](_0x3805ef(0x1b5))),0x1;const _0x4174bb=await confirmKey(_0x3805ef(0x286));if(!_0x4174bb)return console[_0x3805ef(0x12a)](a56_0x4d082d[_0x3805ef(0x288)](_0x3805ef(0x27d)),_0x3805ef(0x228)),0x1;}const _0x53ed61=await withSpinner(_0x3805ef(0x258),()=>_0xb8082[_0x3805ef(0x227)][_0x3805ef(0x1b1)](_0x1f668d),{'verbose':_0x42942d['verbose']}),_0x499664=_0x53ed61['data'];return console[_0x3805ef(0x12a)](a56_0x4d082d[_0x3805ef(0xfb)]('✔\x20Push\x20complete')),console[_0x3805ef(0x12a)](_0x3805ef(0xe8)+_0x499664[_0x3805ef(0x298)]),console[_0x3805ef(0x12a)](_0x3805ef(0xdf)+_0x499664['revision']),await this['showWorkflowConsoleUrl'](_0xb8082,_0x499664[_0x3805ef(0xc5)],_0x42942d['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x29d);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x157);async['execute'](_0x540bac){const _0x325f42=a56_0x1ddcb4,{options:_0x585fef,args:_0x162725,tdx:_0x5898bc}=_0x540bac,_0x1b7a72=this['resolveProjectDir'](_0x162725,_0x585fef),_0x3b0520=_0x585fef[_0x325f42(0x161)],_0x1066a9=_0x585fef['revision'],_0x536f57=_0x585fef[_0x325f42(0x1d2)];if(!_0x1b7a72)return console[_0x325f42(0x12a)](a56_0x4d082d[_0x325f42(0x171)](_0x325f42(0x106)),_0x325f42(0xe0)),console['error'](a56_0x4d082d['dim'](_0x325f42(0x287))),console[_0x325f42(0x12a)](a56_0x4d082d['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x3b0520)return console[_0x325f42(0x12a)](a56_0x4d082d[_0x325f42(0x171)](_0x325f42(0x106)),_0x325f42(0x14f)),console[_0x325f42(0x12a)](a56_0x4d082d[_0x325f42(0x262)](_0x325f42(0x287))),0x1;_0x585fef[_0x325f42(0x199)]&&(console['error']('Source\x20directory:\x20'+_0x1b7a72),console['error'](_0x325f42(0x151)+_0x3b0520),_0x1066a9&&console[_0x325f42(0x12a)]('Revision:\x20'+_0x1066a9),_0x585fef[_0x325f42(0x15a)]&&console[_0x325f42(0x12a)](_0x325f42(0x1f4)),_0x536f57&&console[_0x325f42(0x12a)]('Validation:\x20skipped'));const _0x3c82d2=await withSpinner(_0x325f42(0x1e8),()=>_0x5898bc['workflow'][_0x325f42(0x232)](_0x1b7a72,_0x3b0520,{'revision':_0x1066a9,'skipValidation':_0x536f57}),{'verbose':_0x585fef[_0x325f42(0x199)]}),_0x204f22=_0x3c82d2[_0x325f42(0x14d)];console[_0x325f42(0x12a)](_0x325f42(0x27a)+_0x204f22[_0x325f42(0x19f)]);_0x204f22[_0x325f42(0x292)]&&console['error'](_0x325f42(0x24a)+_0x204f22[_0x325f42(0x292)]);console[_0x325f42(0x12a)]('New\x20project\x20name:\x20'+_0x204f22[_0x325f42(0x1ad)]),console[_0x325f42(0x12a)](_0x325f42(0x18a)+_0x204f22[_0x325f42(0x266)]),console[_0x325f42(0x12a)](_0x325f42(0x254)+_0x204f22[_0x325f42(0x16d)]);_0x204f22[_0x325f42(0x265)]&&(console[_0x325f42(0x12a)](a56_0x4d082d[_0x325f42(0x288)](_0x325f42(0x1cd)+_0x204f22['newProjectName']+_0x325f42(0x1e3)+_0x204f22[_0x325f42(0xda)]+')')),console['error'](a56_0x4d082d['yellow'](_0x325f42(0x113))));if(_0x585fef[_0x325f42(0x15a)])return console[_0x325f42(0x12a)](a56_0x4d082d['yellow'](_0x325f42(0x1d8))),0x0;if(!_0x585fef[_0x325f42(0x115)]){if(!isInteractive())return console[_0x325f42(0x12a)](a56_0x4d082d['red'](_0x325f42(0x18d)),_0x325f42(0x209)),console[_0x325f42(0x12a)](a56_0x4d082d[_0x325f42(0x262)](_0x325f42(0x1b5))),0x1;const _0x3caa95=_0x204f22['sourceProjectName']||a56_0x1268de[_0x325f42(0x295)](_0x1b7a72),_0x22cbbb=_0x204f22[_0x325f42(0x265)]?_0x325f42(0x21d)+_0x3b0520+_0x325f42(0x284):_0x325f42(0x1f7)+_0x3caa95+_0x325f42(0x28f)+_0x3b0520+'\x22?',_0x3db66c=await confirmKey(_0x22cbbb);if(!_0x3db66c)return console[_0x325f42(0x12a)](a56_0x4d082d[_0x325f42(0x288)]('Cancelled')),0x1;}const _0x8deb36=await withSpinner(_0x204f22['targetExists']?'Updating\x20'+_0x3b0520+_0x325f42(0xea):'Cloning\x20to\x20'+_0x3b0520+_0x325f42(0xea),()=>_0x5898bc[_0x325f42(0x227)][_0x325f42(0x1c9)](_0x204f22),{'verbose':_0x585fef['verbose']}),_0x4f8438=_0x8deb36[_0x325f42(0x14d)];return console[_0x325f42(0x12a)](a56_0x4d082d['green'](_0x204f22[_0x325f42(0x265)]?_0x325f42(0x18c):_0x325f42(0x263))),console['error'](_0x325f42(0x190)+_0x4f8438[_0x325f42(0x1ad)]),console[_0x325f42(0x12a)](_0x325f42(0xe8)+_0x4f8438[_0x325f42(0xeb)]),console[_0x325f42(0x12a)](_0x325f42(0xdf)+_0x4f8438[_0x325f42(0x266)]),await this[_0x325f42(0x1b6)](_0x5898bc,_0x4f8438[_0x325f42(0x1ad)],_0x585fef['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]='workflow:delete';[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x242);async[a56_0x1ddcb4(0x12f)](_0x321500){const _0x290166=a56_0x1ddcb4,{options:_0x38ed93,args:_0x3c6a1e,tdx:_0x40f11e}=_0x321500,_0x1abc60=_0x3c6a1e[0x0];if(!_0x1abc60)return console[_0x290166(0x12a)](_0x290166(0x253)),console[_0x290166(0x12a)](_0x290166(0x1a5)),0x1;_0x38ed93[_0x290166(0x199)]&&console[_0x290166(0x12a)](_0x290166(0x19c)+_0x1abc60);if(!_0x38ed93[_0x290166(0x115)]){if(!isInteractive())return console[_0x290166(0x12a)](a56_0x4d082d[_0x290166(0x171)](_0x290166(0x18d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a56_0x4d082d[_0x290166(0x262)](_0x290166(0x1b5))),0x1;const _0x2829bb=await confirmKey(_0x290166(0x131)+_0x1abc60+_0x290166(0x229));if(!_0x2829bb)return console[_0x290166(0x12a)](a56_0x4d082d[_0x290166(0x288)]('Cancelled')),0x1;}const _0x32789d=await withSpinner(_0x290166(0x249)+_0x1abc60+'...',()=>_0x40f11e[_0x290166(0x227)]['delete'](_0x1abc60),{'verbose':_0x38ed93['verbose']}),_0x592c8a=_0x32789d[_0x290166(0x14d)];return console['error'](_0x290166(0x246)+_0x592c8a[_0x290166(0xc5)]),console[_0x290166(0x12a)](_0x290166(0xe8)+_0x592c8a[_0x290166(0x298)]),0x0;}}export function parseKeyValue(_0x1c1b50){const _0x3924fa=a56_0x1ddcb4,_0x12a3bb=_0x1c1b50[_0x3924fa(0x19d)]('=');if(_0x12a3bb===-0x1)throw new Error('Invalid\x20format:\x20'+_0x1c1b50+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x2b4d76=_0x1c1b50[_0x3924fa(0x22d)](0x0,_0x12a3bb),_0x509d87=_0x1c1b50['substring'](_0x12a3bb+0x1);if(!_0x2b4d76)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x2b4d76,'value':_0x509d87};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']='workflow:secrets:list';[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x277);async[a56_0x1ddcb4(0x12f)](_0x21ebd2){const _0x1a1b9f=a56_0x1ddcb4,{options:_0x44aa48,args:_0x410b0a,tdx:_0x59d644}=_0x21ebd2,_0x55f285=this[_0x1a1b9f(0x116)](_0x410b0a,_0x44aa48);if(!_0x55f285)return 0x1;_0x44aa48['verbose']&&console[_0x1a1b9f(0x12a)](_0x1a1b9f(0x19c)+_0x55f285);const _0x575ef1=await withSpinner(_0x1a1b9f(0x17e),()=>_0x59d644[_0x1a1b9f(0x227)][_0x1a1b9f(0xfd)](_0x55f285),{'verbose':_0x44aa48['verbose']}),{secrets:_0x40abc7}=_0x575ef1[_0x1a1b9f(0x14d)];return console['error'](_0x1a1b9f(0x1b2)+_0x40abc7[_0x1a1b9f(0x1ba)]+_0x1a1b9f(0x11e)+(_0x40abc7[_0x1a1b9f(0x1ba)]!==0x1?'s':'')),await handleSDKOutput(_0x40abc7,_0x44aa48),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x16b);[a56_0x1ddcb4(0xe9)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async['execute'](_0x95d674){const _0x10aa7d=a56_0x1ddcb4,{options:_0x50cc98,args:_0x6e2b12,tdx:_0x13aab9}=_0x95d674;let _0x311164,_0x2afad9;if(_0x6e2b12[_0x10aa7d(0x1ba)]>=0x1&&!_0x6e2b12[0x0][_0x10aa7d(0x108)]('='))_0x311164=_0x6e2b12[0x0],_0x2afad9=_0x6e2b12['slice'](0x1);else{if(_0x6e2b12[_0x10aa7d(0x1ba)]>=0x1&&_0x50cc98[_0x10aa7d(0x196)])_0x311164=_0x50cc98['workflowProject'],_0x2afad9=_0x6e2b12;else return _0x6e2b12[_0x10aa7d(0x1ba)]>=0x1?(console['error'](_0x10aa7d(0x14e)),console[_0x10aa7d(0x12a)](_0x10aa7d(0x2a0)),0x1):(console[_0x10aa7d(0x12a)](_0x10aa7d(0x112)),console[_0x10aa7d(0x12a)](_0x10aa7d(0x1a4)),0x1);}if(_0x2afad9[_0x10aa7d(0x1ba)]===0x0)return console[_0x10aa7d(0x12a)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x10aa7d(0x12a)](_0x10aa7d(0x1a4)),0x1;const _0x36fef1={};try{for(const _0x2d1b76 of _0x2afad9){const {key:_0x424aa8,value:_0x4f5ca5}=parseKeyValue(_0x2d1b76);_0x36fef1[_0x424aa8]=_0x4f5ca5;}}catch(_0x3d469){return _0x3d469 instanceof Error&&console[_0x10aa7d(0x12a)](a56_0x4d082d['red'](_0x10aa7d(0x106)),_0x3d469['message']),0x1;}const _0x2428f4=Object[_0x10aa7d(0x280)](_0x36fef1);_0x50cc98[_0x10aa7d(0x199)]&&(console[_0x10aa7d(0x12a)](_0x10aa7d(0x19c)+_0x311164),console[_0x10aa7d(0x12a)]('Secrets\x20to\x20set:\x20'+_0x2428f4[_0x10aa7d(0x13b)](',\x20')));const _0x287920=await withSpinner(_0x2428f4[_0x10aa7d(0x1ba)]===0x1?'Setting\x20secret...':'Setting\x20'+_0x2428f4['length']+_0x10aa7d(0x184),()=>_0x13aab9[_0x10aa7d(0x227)]['setSecrets'](_0x311164,_0x36fef1),{'verbose':_0x50cc98[_0x10aa7d(0x199)]}),_0x658bbf=_0x287920['data'];return console['error'](_0x2428f4[_0x10aa7d(0x1ba)]===0x1?_0x10aa7d(0x21f)+_0x658bbf[_0x10aa7d(0x280)][0x0]+_0x10aa7d(0xe6)+_0x658bbf[_0x10aa7d(0xc5)]+'\x27':'✔\x20'+_0x658bbf[_0x10aa7d(0x280)][_0x10aa7d(0x1ba)]+_0x10aa7d(0x25c)+_0x658bbf['projectName']+'\x27'),(_0x50cc98['json']||_0x50cc98[_0x10aa7d(0x17d)])&&await handleSingleObjectOutput(_0x658bbf,_0x50cc98),0x0;}}function a56_0x1ee3(_0x1542cd,_0x30589c){_0x1542cd=_0x1542cd-0xc2;const _0x498a5c=a56_0x498a();let _0x1ee334=_0x498a5c[_0x1542cd];return _0x1ee334;}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x25a);['description']=a56_0x1ddcb4(0x15f);async['execute'](_0x1882da){const _0x1c23d8=a56_0x1ddcb4,{options:_0x3a5170,args:_0x5af34a,tdx:_0x1b7110}=_0x1882da;let _0x488681,_0x4f2579;if(_0x5af34a[_0x1c23d8(0x1ba)]>=0x2)_0x488681=_0x5af34a[0x0],_0x4f2579=_0x5af34a[0x1];else{if(_0x5af34a[_0x1c23d8(0x1ba)]===0x1&&_0x3a5170[_0x1c23d8(0x196)])_0x488681=_0x3a5170[_0x1c23d8(0x196)],_0x4f2579=_0x5af34a[0x0];else return _0x5af34a[_0x1c23d8(0x1ba)]===0x1?(console['error']('Error:\x20Project\x20name\x20is\x20required'),console[_0x1c23d8(0x12a)](_0x1c23d8(0x2a0)),0x1):(console['error']('Error:\x20Secret\x20key\x20is\x20required'),console['error'](_0x1c23d8(0x243)),0x1);}_0x3a5170[_0x1c23d8(0x199)]&&(console[_0x1c23d8(0x12a)](_0x1c23d8(0x19c)+_0x488681),console['error'](_0x1c23d8(0x26b)+_0x4f2579));if(!_0x3a5170[_0x1c23d8(0x115)]){if(!isInteractive())return console[_0x1c23d8(0x12a)](a56_0x4d082d[_0x1c23d8(0x171)](_0x1c23d8(0x18d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1c23d8(0x12a)](a56_0x4d082d[_0x1c23d8(0x262)](_0x1c23d8(0x1b5))),0x1;const _0x17e053=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x4f2579+_0x1c23d8(0x27c)+_0x488681+'\x27?');if(!_0x17e053)return console['error'](a56_0x4d082d[_0x1c23d8(0x288)](_0x1c23d8(0x27d))),0x1;}const _0x3449fa=await withSpinner(_0x1c23d8(0x24c),()=>_0x1b7110['workflow'][_0x1c23d8(0x1f5)](_0x488681,_0x4f2579),{'verbose':_0x3a5170[_0x1c23d8(0x199)]}),_0x5cce66=_0x3449fa[_0x1c23d8(0x14d)];return console['error'](_0x1c23d8(0x21f)+_0x5cce66['key']+'\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27'+_0x5cce66[_0x1c23d8(0xc5)]+'\x27'),(_0x3a5170[_0x1c23d8(0x1fc)]||_0x3a5170[_0x1c23d8(0x17d)])&&await handleSingleObjectOutput(_0x5cce66,_0x3a5170),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(_0x628fa1){const _0x4a4b26=a56_0x1ddcb4,_0x425119=Math[_0x4a4b26(0x225)](_0x628fa1/0x3e8),_0x1afc12=Math['floor'](_0x425119/0x3c),_0x3c9777=Math[_0x4a4b26(0x225)](_0x1afc12/0x3c),_0x10bd03=Math['floor'](_0x3c9777/0x18);if(_0x10bd03>0x0){const _0x476651=_0x3c9777%0x18;return _0x476651>0x0?_0x10bd03+'d\x20'+_0x476651+'h':_0x10bd03+'d';}else{if(_0x3c9777>0x0){const _0x56bdeb=_0x1afc12%0x3c;return _0x56bdeb>0x0?_0x3c9777+'h\x20'+_0x56bdeb+'m':_0x3c9777+'h';}else{if(_0x1afc12>0x0){const _0x50c108=_0x425119%0x3c;return _0x50c108>0x0?_0x1afc12+'m\x20'+_0x50c108+'s':_0x1afc12+'m';}else return _0x425119+'s';}}}function formatTimestamp(_0x230a39,_0x474055){const _0x65c649=a56_0x1ddcb4,_0x41f43f=new Date(_0x230a39),_0x456043=String(_0x41f43f[_0x65c649(0x160)]())['padStart'](0x2,'0'),_0x29e5bc=String(_0x41f43f['getMinutes']())[_0x65c649(0xc2)](0x2,'0'),_0x2577ac=_0x456043+':'+_0x29e5bc,_0x31e1cc=_0x41f43f['getFullYear']()===_0x474055[_0x65c649(0x102)]()&&_0x41f43f[_0x65c649(0x1a2)]()===_0x474055[_0x65c649(0x1a2)]()&&_0x41f43f[_0x65c649(0x1b8)]()===_0x474055[_0x65c649(0x1b8)]();if(_0x31e1cc)return _0x2577ac;else{const _0x30e218=String(_0x41f43f[_0x65c649(0x1a2)]()+0x1)['padStart'](0x2,'0'),_0x5dd07e=String(_0x41f43f[_0x65c649(0x1b8)]())['padStart'](0x2,'0');return _0x30e218+'-'+_0x5dd07e+'\x20'+_0x2577ac;}}function formatDate(_0x525fb0){const _0x52fb94=a56_0x1ddcb4,_0x431aa5=_0x525fb0[_0x52fb94(0x102)](),_0x133792=String(_0x525fb0['getMonth']()+0x1)[_0x52fb94(0xc2)](0x2,'0'),_0x56208b=String(_0x525fb0[_0x52fb94(0x1b8)]())[_0x52fb94(0xc2)](0x2,'0');return _0x431aa5+'-'+_0x133792+'-'+_0x56208b;}function getTaskStateIcon(_0x54afe8){const _0x386e37={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x386e37[_0x54afe8]||'⚪';}function getBarChar(_0x55893d){const _0x367e15=a56_0x1ddcb4;return _0x55893d==='error'||_0x55893d===_0x367e15(0x26e)?'×':'─';}function getBarColor(_0x2cdee0){const _0x30baf9=a56_0x1ddcb4,_0x3b20ca={'success':a56_0x4d082d[_0x30baf9(0xfb)],'error':a56_0x4d082d[_0x30baf9(0x171)],'group_error':a56_0x4d082d[_0x30baf9(0x171)],'running':a56_0x4d082d[_0x30baf9(0x137)],'blocked':a56_0x4d082d[_0x30baf9(0x288)],'planned':a56_0x4d082d[_0x30baf9(0x262)],'canceling':a56_0x4d082d[_0x30baf9(0x288)]};return _0x3b20ca[_0x2cdee0]||a56_0x4d082d[_0x30baf9(0xd3)];}function parseTaskName(_0x4fe41a){const _0x4c4b62=a56_0x1ddcb4;let _0x2b0a68=_0x4fe41a[_0x4c4b62(0x1d0)](/^\++/,'');const _0x3f62f7=_0x2b0a68[_0x4c4b62(0x1e1)]('+'),_0x12f9f2=_0x3f62f7[_0x4c4b62(0x1ba)]>0x1?_0x3f62f7['length']-0x2:0x0,_0x1f2bfd=_0x3f62f7[_0x3f62f7[_0x4c4b62(0x1ba)]-0x1]||_0x2b0a68;return{'level':_0x12f9f2,'name':'+'+_0x1f2bfd};}function truncateTaskName(_0x2b5caa,_0xd189c0){const _0x5a336a=a56_0x1ddcb4,_0x2d2108=stringWidth(_0x2b5caa);if(_0x2d2108<=_0xd189c0)return _0x2b5caa;let _0x1c6230=_0x2b5caa;while(stringWidth(_0x1c6230+'…')>_0xd189c0&&_0x1c6230[_0x5a336a(0x1ba)]>0x0){_0x1c6230=_0x1c6230[_0x5a336a(0x191)](0x0,-0x1);}return _0x1c6230+'…';}function calculateTimeScale(_0x279614,_0x2000c9){const _0x2f697d=a56_0x1ddcb4;return{'startTime':_0x279614[_0x2f697d(0xd1)],'endTime':_0x279614[_0x2f697d(0x208)],'durationMs':_0x279614['duration'],'msPerChar':_0x279614['duration']/_0x2000c9};}function timeToPosition(_0x1384ea,_0x1403da,_0x7ee5f2){const _0x17094c=a56_0x1ddcb4,_0x4f2930=_0x1384ea-_0x1403da['startTime'],_0x27c1a5=Math['floor'](_0x4f2930/_0x1403da[_0x17094c(0x23e)]);return Math['max'](0x0,Math['min'](_0x27c1a5,_0x7ee5f2));}function renderTimeAxis(_0x86358a,_0x4412c0){const _0x566d45=a56_0x1ddcb4,_0x4a312f=Math[_0x566d45(0x173)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math['max'](TIMELINE_CONFIG[_0x566d45(0x1d9)],Math[_0x566d45(0x225)](_0x4412c0/TIMELINE_CONFIG[_0x566d45(0x22c)]))),_0x1a1f4f=_0x86358a[_0x566d45(0x247)]/(_0x4a312f-0x1),_0x2e0dc9=new Date(_0x86358a[_0x566d45(0x14a)]),_0x3afc3f=[];for(let _0x7bc883=0x0;_0x7bc883<_0x4a312f;_0x7bc883++){const _0x1bc3e8=_0x86358a[_0x566d45(0x14a)]+_0x7bc883*_0x1a1f4f,_0x55f20f=timeToPosition(_0x1bc3e8,_0x86358a,_0x4412c0),_0x5170d4=formatTimestamp(_0x1bc3e8,_0x2e0dc9);_0x3afc3f[_0x566d45(0x103)]({'pos':_0x55f20f,'text':_0x5170d4});}const _0x16054d=new Array(_0x4412c0)[_0x566d45(0x177)]('\x20');let _0xdd7282=-0x1;for(const {pos:_0x4824b6,text:_0x399c5f}of _0x3afc3f){let _0x542aa5=Math[_0x566d45(0x114)](0x0,_0x4824b6-Math[_0x566d45(0x225)](_0x399c5f[_0x566d45(0x1ba)]/0x2));_0x542aa5<=_0xdd7282+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x542aa5=_0xdd7282+TIMELINE_CONFIG[_0x566d45(0xcb)]+0x1);_0x542aa5+_0x399c5f[_0x566d45(0x1ba)]>_0x4412c0&&(_0x542aa5=_0x4412c0-_0x399c5f['length']);if(_0x542aa5>=0x0&&_0x542aa5+_0x399c5f['length']<=_0x4412c0&&_0x542aa5>_0xdd7282){for(let _0x1b83c3=0x0;_0x1b83c3<_0x399c5f[_0x566d45(0x1ba)];_0x1b83c3++){_0x16054d[_0x542aa5+_0x1b83c3]=_0x399c5f[_0x1b83c3];}_0xdd7282=_0x542aa5+_0x399c5f[_0x566d45(0x1ba)]-0x1;}}return _0x16054d[_0x566d45(0x13b)]('');}function renderTaskRow(_0x4968cd,_0x596560,_0x3b4113,_0x50b35a){const _0x335df4=a56_0x1ddcb4,{level:_0x153de1,name:_0x1059a9}=parseTaskName(_0x4968cd['name']),_0x5c5050='\x20'[_0x335df4(0x129)](_0x153de1),_0x46d100=_0x4968cd['window']?'('+formatElapsed(_0x4968cd[_0x335df4(0x1f3)]['duration'])+')':'',_0xbf3ea6=stringWidth(_0x46d100),_0x1147a2=_0x153de1*0x1,_0x475d50=_0x50b35a-_0x1147a2-_0xbf3ea6-0x1,_0x53ce39=truncateTaskName(_0x1059a9,_0x475d50),_0xa57ef0=_0x5c5050+_0x53ce39,_0x4e9d9e=stringWidth(_0xa57ef0),_0x44b325=_0x50b35a-_0x4e9d9e-_0xbf3ea6,_0x3c26c7=_0xa57ef0+'\x20'[_0x335df4(0x129)](Math['max'](0x1,_0x44b325))+a56_0x4d082d[_0x335df4(0x262)](_0x46d100),_0x5660e5=getTaskStateIcon(_0x4968cd[_0x335df4(0x1d5)]),_0x4b4cd0=new Array(_0x3b4113)[_0x335df4(0x177)]('\x20');if(_0x4968cd['window']){const _0xd8928d=timeToPosition(_0x4968cd[_0x335df4(0x1f3)][_0x335df4(0xd1)],_0x596560,_0x3b4113),_0x287aed=timeToPosition(_0x4968cd['window'][_0x335df4(0x208)],_0x596560,_0x3b4113),_0x1e33e0=getBarChar(_0x4968cd[_0x335df4(0x1d5)]),_0x19acd1=Math[_0x335df4(0x114)](_0xd8928d+0x1,_0x287aed);for(let _0xed00ed=_0xd8928d;_0xed00ed<Math[_0x335df4(0x173)](_0x19acd1,_0x3b4113);_0xed00ed++){_0x4b4cd0[_0xed00ed]=_0x1e33e0;}}const _0x314e2a=getBarColor(_0x4968cd[_0x335df4(0x1d5)]),_0x417257=_0x4b4cd0[_0x335df4(0x175)](_0x36f323=>_0x36f323==='\x20'?'\x20':_0x314e2a(_0x36f323))[_0x335df4(0x13b)]('');return _0x5660e5+'\x20'+_0x3c26c7+'│'+_0x417257+'│';}function calculateStats(_0x5f5922){const _0x1d8810=a56_0x1ddcb4,_0x49d798={'total':_0x5f5922['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x370581 of _0x5f5922){if(_0x370581['state']===_0x1d8810(0x283))_0x49d798[_0x1d8810(0x283)]++;else{if(_0x370581[_0x1d8810(0x1d5)]===_0x1d8810(0x12a)||_0x370581[_0x1d8810(0x1d5)]===_0x1d8810(0x26e))_0x49d798[_0x1d8810(0x12a)]++;else _0x370581[_0x1d8810(0x1d5)]==='running'?_0x49d798[_0x1d8810(0x179)]++:_0x49d798[_0x1d8810(0x121)]++;}}return _0x49d798;}function formatStats(_0x4401c0){const _0x37fa83=a56_0x1ddcb4;return[_0x37fa83(0xc7)+_0x4401c0['total'],'✅\x20'+_0x4401c0[_0x37fa83(0x283)],'❌\x20'+_0x4401c0[_0x37fa83(0x12a)],'🔄\x20'+_0x4401c0['running'],'⏳\x20'+_0x4401c0['pending']]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]=a56_0x1ddcb4(0x219);[a56_0x1ddcb4(0xe9)]=a56_0x1ddcb4(0x27f);async[a56_0x1ddcb4(0x12f)](_0x391afa){const _0x286f27=a56_0x1ddcb4,{options:_0x50a2ee,args:_0x3d8b1c,tdx:_0x53e25c}=_0x391afa;let _0x328044,_0x84281e,_0x21cb4f=![];if(_0x3d8b1c[0x0]){if(_0x3d8b1c[0x0][_0x286f27(0x108)]('.')){const _0x16a7cb=this['parseProjectWorkflowPattern'](_0x3d8b1c,_0x50a2ee);if(!_0x16a7cb)return 0x1;_0x328044=_0x16a7cb[_0x286f27(0xc5)],_0x84281e=_0x16a7cb[_0x286f27(0x19b)];}else{_0x84281e=_0x3d8b1c[0x0],_0x328044=_0x50a2ee[_0x286f27(0x196)];if(!_0x328044)return console[_0x286f27(0x12a)](a56_0x4d082d['red'](_0x286f27(0x106)),_0x286f27(0x241)),0x1;_0x21cb4f=!![];}}else{const _0x3b0227=this[_0x286f27(0x1fd)](_0x3d8b1c,_0x50a2ee);if(!_0x3b0227)return 0x1;_0x328044=_0x3b0227[_0x286f27(0xc5)],_0x84281e=_0x3b0227[_0x286f27(0x19b)];}if(_0x50a2ee[_0x286f27(0x199)]){if(_0x328044&&_0x84281e)console[_0x286f27(0x12a)](_0x286f27(0x23c)+_0x328044+'.'+_0x84281e);else _0x328044&&console[_0x286f27(0x12a)](_0x286f27(0x1ce)+_0x328044);}const _0x5d66a7=_0x50a2ee[_0x286f27(0x271)],_0x496b60=_0x50a2ee[_0x286f27(0x1f2)];if(_0x5d66a7){_0x496b60&&console[_0x286f27(0x12a)](a56_0x4d082d[_0x286f27(0x288)]('Warning:'),_0x286f27(0x21c));const _0x4ca91d=_0x50a2ee[_0x286f27(0x1d3)];return _0x4ca91d?await this['pollTimeline'](_0x391afa,_0x5d66a7):await this['renderSingleTimeline'](_0x391afa,_0x5d66a7,_0x50a2ee),0x0;}if(_0x496b60){const _0x513513=await withSpinner(_0x286f27(0x183),()=>_0x53e25c['workflow']['sessions']({'projectName':_0x328044,'workflowName':_0x84281e,'limit':0x64}),{'verbose':_0x50a2ee[_0x286f27(0x199)]}),_0x138d99=_0x513513['data'][_0x286f27(0x23b)](_0x531d8d=>_0x531d8d['id']===_0x496b60);if(!_0x138d99)return console[_0x286f27(0x12a)](a56_0x4d082d[_0x286f27(0x171)](_0x286f27(0x106)),_0x286f27(0x27b)+_0x496b60),0x1;if(!_0x138d99[_0x286f27(0x181)]?.['id'])return console[_0x286f27(0x12a)](a56_0x4d082d[_0x286f27(0x171)](_0x286f27(0x106)),'Session\x20'+_0x496b60+'\x20has\x20no\x20attempts'),0x1;const _0x2f2e29=_0x138d99[_0x286f27(0x181)]['id'];_0x50a2ee[_0x286f27(0x199)]&&console[_0x286f27(0x12a)](_0x286f27(0x278)+_0x2f2e29+'\x20from\x20session\x20'+_0x496b60);const _0x4cb25d=_0x50a2ee[_0x286f27(0x1d3)];return _0x4cb25d?await this['pollTimeline'](_0x391afa,_0x2f2e29):await this[_0x286f27(0x28c)](_0x391afa,_0x2f2e29,_0x50a2ee),0x0;}const _0x12750f=await withSpinner(_0x286f27(0x1df),()=>_0x53e25c[_0x286f27(0x227)][_0x286f27(0x239)]({'projectName':_0x328044,'workflowName':_0x84281e,'limit':_0x50a2ee[_0x286f27(0x24e)]||0x32}),{'verbose':_0x50a2ee[_0x286f27(0x199)]}),_0x4779e3=_0x12750f['data'];if(_0x4779e3['length']===0x0){if(_0x328044&&_0x84281e)console['error'](_0x286f27(0x146)+_0x328044+'.'+_0x84281e);else _0x328044?console[_0x286f27(0x12a)](_0x286f27(0x1d7)+_0x328044):(console[_0x286f27(0x12a)](_0x286f27(0xf6)),console[_0x286f27(0x12a)](a56_0x4d082d[_0x286f27(0x262)](_0x286f27(0x25e))));return 0x0;}_0x4779e3['sort']((_0xca5b2f,_0x7539e8)=>{const _0x6762f=_0x286f27,_0x8dc3d=_0xca5b2f[_0x6762f(0x1c3)]||'',_0x15c995=_0x7539e8['sessionTime']||'';return _0x15c995[_0x6762f(0x138)](_0x8dc3d);});if(_0x50a2ee[_0x286f27(0x1fc)]||_0x50a2ee['jsonl'])return await handleSDKOutput(_0x4779e3,_0x50a2ee),0x0;let _0x2c6da3;if(_0x21cb4f){const _0x1f320c=_0x4779e3[0x0];if(!_0x1f320c['lastAttempt']?.['id'])return console['error'](_0x286f27(0x19a)),0x0;_0x2c6da3=_0x1f320c[_0x286f27(0x181)]['id'],_0x50a2ee[_0x286f27(0x199)]&&console['error'](_0x286f27(0x165)+_0x1f320c[_0x286f27(0x1c3)]);}else{const _0x37df34=_0x4779e3['map'](_0x253f7f=>{const _0x5bf05f=_0x286f27,_0x4f7232=getAttemptStatusDisplay(_0x253f7f[_0x5bf05f(0x181)]);return{'title':_0x253f7f[_0x5bf05f(0x162)]?.[_0x5bf05f(0x161)]+'.'+_0x253f7f[_0x5bf05f(0x227)]?.[_0x5bf05f(0x161)]+'\x20-\x20'+_0x253f7f[_0x5bf05f(0x1c3)]+'\x20'+_0x4f7232['icon'],'value':_0x253f7f['lastAttempt']?.['id']||'','description':_0x4f7232['text']};}),_0x4f60f3=await a56_0x34435f({'type':'select','name':_0x286f27(0x271),'message':_0x286f27(0x255),'choices':_0x37df34['filter'](_0x4b27f8=>_0x4b27f8[_0x286f27(0x293)]!=='')});if(!_0x4f60f3['attemptId'])return 0x0;_0x2c6da3=_0x4f60f3[_0x286f27(0x271)];}const _0x39e215=_0x50a2ee[_0x286f27(0x1d3)];return _0x39e215?await this['pollTimeline'](_0x391afa,_0x2c6da3):await this[_0x286f27(0x28c)](_0x391afa,_0x2c6da3,_0x50a2ee),0x0;}async['renderSingleTimeline'](_0x40b5f7,_0xce2635,_0x3caa85){const _0x30167f=a56_0x1ddcb4,{tdx:_0x815c84}=_0x40b5f7;let _0x1f60ad,_0x493cbb;try{[_0x1f60ad,_0x493cbb]=await Promise[_0x30167f(0x26d)]([_0x815c84[_0x30167f(0x227)]['attempt'](_0xce2635),_0x815c84['workflow'][_0x30167f(0xec)](_0xce2635,![])]);}catch(_0x56e775){console[_0x30167f(0x12a)](a56_0x4d082d['red']('Failed\x20to\x20fetch\x20attempt\x20data'));_0x3caa85['verbose']&&console[_0x30167f(0x12a)](_0x56e775);throw _0x56e775;}if(_0x3caa85[_0x30167f(0x1fc)]||_0x3caa85[_0x30167f(0x17d)]){const _0x3a8702=this[_0x30167f(0x222)](_0x1f60ad,_0x493cbb);await handleSDKOutput([_0x3a8702],_0x3caa85);return;}const _0xa45422=_0x815c84[_0x30167f(0xe3)][_0x30167f(0x194)],_0x1f4937=this[_0x30167f(0xf7)](_0x1f60ad,_0x493cbb,_0xa45422);console[_0x30167f(0x1a1)](_0x1f4937);}async[a56_0x1ddcb4(0x234)](_0x28d7bb,_0x1ae9a3){const _0x41026a=a56_0x1ddcb4,{tdx:_0x26ce44}=_0x28d7bb,_0x401069=TIMELINE_CONFIG[_0x41026a(0x19e)],_0xf70aa=TIMELINE_CONFIG[_0x41026a(0x197)];let _0x1281e0=0x0;while(_0x1281e0<_0xf70aa){process[_0x41026a(0x1fa)][_0x41026a(0x10c)]&&process[_0x41026a(0x1fa)]['write']('\x1Bc');let _0x44ab88,_0x517629;try{[_0x44ab88,_0x517629]=await Promise[_0x41026a(0x26d)]([_0x26ce44[_0x41026a(0x227)]['attempt'](_0x1ae9a3),_0x26ce44['workflow'][_0x41026a(0xec)](_0x1ae9a3,![])]);}catch(_0x2502dc){console[_0x41026a(0x12a)](a56_0x4d082d[_0x41026a(0x171)](_0x41026a(0x14b)));_0x1281e0>0x0&&console[_0x41026a(0x12a)](a56_0x4d082d[_0x41026a(0x262)](_0x41026a(0x1f1)+_0x1281e0));throw _0x2502dc;}const _0x3ba129=_0x26ce44[_0x41026a(0xe3)][_0x41026a(0x194)],_0x95b302=this['renderTimeline'](_0x44ab88,_0x517629,_0x3ba129);console[_0x41026a(0x1a1)](_0x95b302);const _0x24f6fb=_0x44ab88['done']&&_0x517629['every'](_0x58a08c=>_0x58a08c[_0x41026a(0x1d5)]!=='running'&&_0x58a08c[_0x41026a(0x1d5)]!==_0x41026a(0x212));if(_0x24f6fb){console[_0x41026a(0x12a)](a56_0x4d082d[_0x41026a(0xfb)](_0x41026a(0x1c2)));break;}console[_0x41026a(0x12a)](a56_0x4d082d[_0x41026a(0x262)](_0x41026a(0x1ef)+_0x1281e0*0x2+_0x41026a(0x1d1))),await new Promise(_0x1a30b8=>setTimeout(_0x1a30b8,_0x401069)),_0x1281e0++;}_0x1281e0>=_0xf70aa&&console['error'](a56_0x4d082d[_0x41026a(0x288)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a56_0x1ddcb4(0xf7)](_0x55c561,_0x4be41d,_0x57f385){const _0x50524f=a56_0x1ddcb4,_0x31bb64=[],_0x464abf=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x37f1d2=0x5,_0x174661=process[_0x50524f(0x1fa)][_0x50524f(0x195)]||0x78,_0x5433ba=_0x174661-_0x464abf-_0x37f1d2,_0xa695a4=Math['max'](TIMELINE_CONFIG[_0x50524f(0x192)],Math['min'](_0x5433ba,TIMELINE_CONFIG[_0x50524f(0x1a6)])),_0x27accd=new Date(_0x55c561['createdAt'])[_0x50524f(0x1b4)](),_0x370363=_0x55c561[_0x50524f(0x276)]?new Date(_0x55c561[_0x50524f(0x276)])[_0x50524f(0x1b4)]():Date['now'](),_0x769866={'start':_0x27accd,'end':_0x370363,'duration':_0x370363-_0x27accd},_0x1183df=new Map(),_0x43a784=[];for(const _0x2fcf67 of _0x4be41d){if(_0x2fcf67['startedAt']){const _0x476ba8=new Date(_0x2fcf67[_0x50524f(0x1a8)])['getTime'](),_0x3fed40=_0x2fcf67[_0x50524f(0x29c)]?new Date(_0x2fcf67['updatedAt'])[_0x50524f(0x1b4)]():Date[_0x50524f(0xc4)](),_0x8d7e14={'start':_0x476ba8,'end':_0x3fed40,'duration':_0x3fed40-_0x476ba8};_0x1183df[_0x50524f(0x1c0)](_0x2fcf67['id'],_0x8d7e14),_0x43a784[_0x50524f(0x103)]({'name':_0x2fcf67[_0x50524f(0x118)],'state':_0x2fcf67[_0x50524f(0x1d5)]||_0x50524f(0xee),'window':_0x8d7e14});}else _0x43a784[_0x50524f(0x103)]({'name':_0x2fcf67[_0x50524f(0x118)],'state':_0x2fcf67[_0x50524f(0x1d5)]||_0x50524f(0x212),'window':undefined});}_0x43a784[_0x50524f(0x140)]((_0x40140c,_0x3fac33)=>{const _0x58ad2e=_0x50524f;if(!_0x40140c[_0x58ad2e(0x1f3)])return 0x1;if(!_0x3fac33[_0x58ad2e(0x1f3)])return-0x1;return _0x40140c[_0x58ad2e(0x1f3)]['start']-_0x3fac33[_0x58ad2e(0x1f3)][_0x58ad2e(0xd1)];});const _0x67e149=_0x43a784[_0x50524f(0x1ba)],_0x42ae21=_0x67e149>TIMELINE_CONFIG[_0x50524f(0x203)];_0x42ae21&&_0x43a784[_0x50524f(0x1a0)](TIMELINE_CONFIG[_0x50524f(0x203)]);const _0x30d3ad=calculateTimeScale(_0x769866,_0xa695a4),_0x67da0e=_0x55c561[_0x50524f(0x1bd)]?_0x55c561[_0x50524f(0x283)]?a56_0x4d082d['green'](_0x50524f(0x283)):a56_0x4d082d[_0x50524f(0x171)](_0x50524f(0x12a)):a56_0x4d082d[_0x50524f(0x137)](_0x50524f(0x179)),_0x5b2ba1=_0x55c561[_0x50524f(0x162)]?.['id'],_0x1fd36c=_0x55c561[_0x50524f(0x1f2)];let _0x1c4313;if(_0x5b2ba1&&_0x1fd36c){const _0x35f052=getWorkflowAttemptUrl(_0x57f385,_0x5b2ba1,_0x1fd36c,_0x55c561['id']);_0x1c4313=hyperlink(a56_0x4d082d['dim'](_0x55c561['id']),_0x35f052);}else _0x1c4313=a56_0x4d082d['dim'](_0x55c561['id']);_0x31bb64['push']('Attempt:\x20'+_0x1c4313+_0x50524f(0x119)+_0x67da0e+_0x50524f(0x119)+formatElapsed(_0x769866[_0x50524f(0x1da)]));if(_0x43a784['length']>0x0){const _0x4ee419=renderTimeAxis(_0x30d3ad,_0xa695a4),_0x38964e=new Date(_0x769866['start']),_0x2badcd=formatDate(_0x38964e),_0x439dab=TIMELINE_CONFIG[_0x50524f(0x182)]+TIMELINE_CONFIG[_0x50524f(0x21b)]+_0x464abf,_0x3c59b7=_0x2badcd[_0x50524f(0xc2)](_0x439dab),_0xb0ff9f=a56_0x4d082d['dim'](_0x3c59b7);_0x31bb64[_0x50524f(0x103)](_0xb0ff9f+'\x20'+_0x4ee419);for(const _0x401052 of _0x43a784){_0x31bb64[_0x50524f(0x103)](renderTaskRow(_0x401052,_0x30d3ad,_0xa695a4,_0x464abf));}const _0x5783fb=calculateStats(_0x43a784);_0x31bb64[_0x50524f(0x103)](formatStats(_0x5783fb)),_0x42ae21&&_0x31bb64[_0x50524f(0x103)](a56_0x4d082d[_0x50524f(0x288)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG[_0x50524f(0x203)]+_0x50524f(0x1e2)+_0x67e149+'\x20tasks')),_0x31bb64[_0x50524f(0x103)](''),_0x31bb64[_0x50524f(0x103)](a56_0x4d082d['dim'](_0x50524f(0x158))+('tdx\x20wf\x20attempt\x20'+_0x55c561['id']+'\x20logs')+a56_0x4d082d[_0x50524f(0x262)]('\x20to\x20see\x20detailed\x20logs'));}else _0x31bb64[_0x50524f(0x103)](_0x50524f(0x15e));return _0x31bb64[_0x50524f(0x13b)]('\x0a');}[a56_0x1ddcb4(0x222)](_0xa6ef60,_0x17c556){const _0x47738a=a56_0x1ddcb4,_0x4fad31=new Date(_0xa6ef60[_0x47738a(0x245)])[_0x47738a(0x1b4)](),_0x194351=_0xa6ef60[_0x47738a(0x276)]?new Date(_0xa6ef60[_0x47738a(0x276)])[_0x47738a(0x1b4)]():Date[_0x47738a(0xc4)](),_0x2fd807=_0x194351-_0x4fad31,_0x5f4cdd=[];for(const _0x4c1547 of _0x17c556){if(_0x4c1547[_0x47738a(0x1a8)]){const _0x1e713a=new Date(_0x4c1547['startedAt'])[_0x47738a(0x1b4)](),_0x32be48=_0x4c1547[_0x47738a(0x29c)]?new Date(_0x4c1547[_0x47738a(0x29c)])[_0x47738a(0x1b4)]():Date[_0x47738a(0xc4)]();_0x5f4cdd[_0x47738a(0x103)]({'name':_0x4c1547[_0x47738a(0x118)],'state':_0x4c1547['state']||_0x47738a(0xee),'window':{'start':_0x1e713a,'end':_0x32be48,'duration':_0x32be48-_0x1e713a}});}else _0x5f4cdd['push']({'name':_0x4c1547[_0x47738a(0x118)],'state':_0x4c1547[_0x47738a(0x1d5)]||_0x47738a(0x212),'window':undefined});}const _0xbd65d5=calculateStats(_0x5f4cdd);return{'attempt':{'id':_0xa6ef60['id'],'status':_0xa6ef60[_0x47738a(0x1bd)]?_0xa6ef60[_0x47738a(0x283)]?_0x47738a(0x283):_0x47738a(0x12a):'running','createdAt':_0xa6ef60[_0x47738a(0x245)],'finishedAt':_0xa6ef60[_0x47738a(0x276)],'duration_ms':_0x2fd807},'tasks':_0x5f4cdd[_0x47738a(0x175)](_0x46b179=>({'name':_0x46b179[_0x47738a(0x161)],'state':_0x46b179[_0x47738a(0x1d5)],'startedAt':_0x46b179[_0x47738a(0x1f3)]?new Date(_0x46b179[_0x47738a(0x1f3)]['start'])[_0x47738a(0x168)]():null,'updatedAt':_0x46b179[_0x47738a(0x1f3)]?new Date(_0x46b179[_0x47738a(0x1f3)][_0x47738a(0x208)])[_0x47738a(0x168)]():null,'duration_ms':_0x46b179[_0x47738a(0x1f3)]?.['duration']||null})),'stats':_0xbd65d5};}}function formatScheduleLine(_0x2fa5ed){const _0x508818=a56_0x1ddcb4,_0x3dde65=_0x2fa5ed[_0x508818(0xd9)]?a56_0x4d082d[_0x508818(0x288)](_0x508818(0x141)):'',_0x2ec590=_0x2fa5ed['project']?.[_0x508818(0x161)]?a56_0x4d082d['dim']('\x20['+_0x2fa5ed[_0x508818(0x162)][_0x508818(0x161)]+']'):'',_0x3deae2=_0x2fa5ed[_0x508818(0x10f)]?a56_0x4d082d[_0x508818(0x262)](_0x508818(0x272)+new Date(_0x2fa5ed['nextRunTime'])[_0x508818(0x18e)]()):'';return'📅\x20#'+_0x2fa5ed['id']+'\x20'+(_0x2fa5ed['workflow']?.[_0x508818(0x161)]||'(unknown)')+_0x2ec590+_0x3dde65+_0x3deae2;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a56_0x1ddcb4(0x161)]='workflow:schedules';['description']='List\x20workflow\x20schedules';async[a56_0x1ddcb4(0x12f)](_0x346324){const _0x416bd1=a56_0x1ddcb4,{options:_0x21129b,args:_0x167e85,tdx:_0x5400d4}=_0x346324,{scheduleId:_0xf333f7}=_0x21129b;if(_0xf333f7&&_0x167e85[0x0])return console[_0x416bd1(0x12a)](a56_0x4d082d[_0x416bd1(0x171)](_0x416bd1(0x106)),_0x416bd1(0xd7)),console[_0x416bd1(0x12a)](a56_0x4d082d[_0x416bd1(0x262)](_0x416bd1(0x223))),0x1;if(_0xf333f7){const _0x17ef51=await withSpinner(_0x416bd1(0x267)+_0xf333f7+_0x416bd1(0xea),()=>_0x5400d4[_0x416bd1(0x227)][_0x416bd1(0x193)](_0xf333f7),{'verbose':_0x21129b['verbose']}),_0x162dde=_0x17ef51[_0x416bd1(0x14d)];return isStructuredFormat(_0x21129b)?await handleSingleObjectOutput(_0x162dde,_0x21129b):(console[_0x416bd1(0x12a)](_0x416bd1(0x104)),console['log'](formatScheduleLine(_0x162dde))),0x0;}const _0x19deeb=this[_0x416bd1(0x1fd)](_0x167e85,_0x21129b);if(!_0x19deeb)return 0x1;const {projectName:_0x45eac5,workflowName:_0x1eeca8}=_0x19deeb,_0x524d1d=_0x45eac5?'\x27'+_0x45eac5+(_0x1eeca8?'.'+_0x1eeca8:'')+'\x27':undefined,_0x4338bb=await withSpinner(_0x524d1d?_0x416bd1(0xd0)+_0x524d1d+'...':'Listing\x20schedules...',()=>_0x45eac5?_0x5400d4[_0x416bd1(0x227)][_0x416bd1(0x22a)](_0x45eac5,{'workflow':_0x1eeca8,'limit':_0x21129b[_0x416bd1(0x24e)]}):_0x5400d4[_0x416bd1(0x227)][_0x416bd1(0x297)]({'limit':_0x21129b[_0x416bd1(0x24e)]}),{'verbose':_0x21129b[_0x416bd1(0x199)]}),_0x498f88=_0x4338bb[_0x416bd1(0x14d)],_0x3bf583=_0x21129b[_0x416bd1(0x24e)]&&_0x498f88[_0x416bd1(0x1ba)]>=_0x21129b['limit']?a56_0x4d082d[_0x416bd1(0x262)](_0x416bd1(0x1dd)):'';console['error'](_0x416bd1(0x1b2)+_0x498f88[_0x416bd1(0x1ba)]+'\x20schedule'+(_0x498f88[_0x416bd1(0x1ba)]!==0x1?'s':'')+_0x3bf583);if(isStructuredFormat(_0x21129b))await handleSDKOutput(_0x498f88,_0x21129b);else{if(_0x498f88[_0x416bd1(0x1ba)]===0x0)console[_0x416bd1(0x1a1)](_0x416bd1(0x185));else for(const _0x2076f9 of _0x498f88){console[_0x416bd1(0x1a1)](formatScheduleLine(_0x2076f9));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a56_0x1ddcb4(0x161)]='workflow:schedule:enable';[a56_0x1ddcb4(0xe9)]='Enable\x20a\x20workflow\x20schedule';async['execute'](_0x57694a){const _0xac17c2=a56_0x1ddcb4,{options:_0x4d3a67,args:_0x52d4a5,tdx:_0x5a7031}=_0x57694a,_0x444449=_0x52d4a5[0x0];if(!_0x444449)return console['error'](a56_0x4d082d[_0xac17c2(0x171)](_0xac17c2(0x106)),'Schedule\x20ID\x20is\x20required'),console[_0xac17c2(0x12a)](a56_0x4d082d['dim']('Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>')),console['error'](a56_0x4d082d[_0xac17c2(0x262)](_0xac17c2(0x250))),0x1;const {backfill:_0x2f7eb8,nextTime:_0x25eec7}=_0x4d3a67,_0x2f4780={};if(_0x2f7eb8!==undefined)_0x2f4780[_0xac17c2(0x282)]=!_0x2f7eb8;if(_0x25eec7!==undefined)_0x2f4780['nextTime']=_0x25eec7;const _0x407c39=await withSpinner(_0xac17c2(0x1bc)+_0x444449+_0xac17c2(0xea),()=>_0x5a7031[_0xac17c2(0x227)][_0xac17c2(0x1bf)](_0x444449,_0x2f4780),{'verbose':_0x4d3a67['verbose']}),_0x1a639e=_0x407c39[_0xac17c2(0x14d)];return isStructuredFormat(_0x4d3a67)?await handleSingleObjectOutput(_0x1a639e,_0x4d3a67):(console[_0xac17c2(0x1a1)](_0xac17c2(0x1b9)+_0x444449+_0xac17c2(0x281)+(_0x1a639e['workflow']?.[_0xac17c2(0x161)]||_0xac17c2(0xee))+')'),_0x1a639e['nextRunTime']&&console[_0xac17c2(0x1a1)](a56_0x4d082d['dim']('\x20\x20Next\x20run:\x20'+new Date(_0x1a639e[_0xac17c2(0x10f)])[_0xac17c2(0x18e)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']=a56_0x1ddcb4(0x13a);[a56_0x1ddcb4(0xe9)]='Disable\x20a\x20workflow\x20schedule';async[a56_0x1ddcb4(0x12f)](_0x1d1113){const _0xf3fe49=a56_0x1ddcb4,{options:_0x29dc8a,args:_0x4cbf78,tdx:_0x413ed8}=_0x1d1113,_0x3adfae=_0x4cbf78[0x0];if(!_0x3adfae)return console[_0xf3fe49(0x12a)](a56_0x4d082d['red'](_0xf3fe49(0x106)),'Schedule\x20ID\x20is\x20required'),console[_0xf3fe49(0x12a)](a56_0x4d082d[_0xf3fe49(0x262)](_0xf3fe49(0x1e9))),console[_0xf3fe49(0x12a)](a56_0x4d082d[_0xf3fe49(0x262)](_0xf3fe49(0x250))),0x1;const _0x7c028c=await withSpinner(_0xf3fe49(0x1be)+_0x3adfae+_0xf3fe49(0xea),()=>_0x413ed8[_0xf3fe49(0x227)]['disableSchedule'](_0x3adfae),{'verbose':_0x29dc8a[_0xf3fe49(0x199)]}),_0xd29dd5=_0x7c028c[_0xf3fe49(0x14d)];return isStructuredFormat(_0x29dc8a)?await handleSingleObjectOutput(_0xd29dd5,_0x29dc8a):console[_0xf3fe49(0x1a1)](_0xf3fe49(0x1b9)+_0x3adfae+_0xf3fe49(0x29e)+(_0xd29dd5[_0xf3fe49(0x227)]?.[_0xf3fe49(0x161)]||_0xf3fe49(0xee))+')'),0x0;}}
1
+ const a56_0x4d17f9=a56_0x26aa;(function(_0x28a23d,_0x25ebfb){const _0x503fe8=a56_0x26aa,_0x49ae0d=_0x28a23d();while(!![]){try{const _0x395219=parseInt(_0x503fe8(0x23c))/0x1*(parseInt(_0x503fe8(0x154))/0x2)+parseInt(_0x503fe8(0x28a))/0x3*(-parseInt(_0x503fe8(0x137))/0x4)+parseInt(_0x503fe8(0x1d0))/0x5*(parseInt(_0x503fe8(0x134))/0x6)+parseInt(_0x503fe8(0x1c0))/0x7*(parseInt(_0x503fe8(0x2ad))/0x8)+-parseInt(_0x503fe8(0x209))/0x9+-parseInt(_0x503fe8(0x140))/0xa+parseInt(_0x503fe8(0x238))/0xb;if(_0x395219===_0x25ebfb)break;else _0x49ae0d['push'](_0x49ae0d['shift']());}catch(_0x1791d9){_0x49ae0d['push'](_0x49ae0d['shift']());}}}(a56_0x1da5,0x255ab));import a56_0x3e0f1d from'chalk';import{existsSync}from'fs';import a56_0x1d0c78 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 a56_0x2c360c from'prompts';function getAttemptStatusDisplay(_0x3a1a2a){const _0x936d50=a56_0x26aa;if(!_0x3a1a2a)return{'icon':'⏳','text':''};const {done:_0xea5f0b,success:_0x367fc4,cancelRequested:_0x466ae1}=_0x3a1a2a;if(!_0xea5f0b)return _0x466ae1?{'icon':'🛑','text':a56_0x3e0f1d[_0x936d50(0x2a8)]('canceling')}:{'icon':'🔄','text':a56_0x3e0f1d[_0x936d50(0x2cb)](_0x936d50(0x15b))};if(_0x367fc4)return{'icon':'✅','text':a56_0x3e0f1d[_0x936d50(0x182)](_0x936d50(0x2f1))};return{'icon':'❌','text':a56_0x3e0f1d[_0x936d50(0x2d7)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a56_0x4d17f9(0x180)](_0x17868f,_0x1599cd,_0x5cad29=0x0){const _0x132b17=a56_0x4d17f9;return _0x17868f[_0x5cad29]||_0x1599cd[_0x132b17(0x1e4)];}[a56_0x4d17f9(0x14c)](_0x28d834,_0x1281d1,_0x27ef95=0x0){const _0x107d0e=a56_0x4d17f9,_0x48fb15=this[_0x107d0e(0x180)](_0x28d834,_0x1281d1,_0x27ef95);if(!_0x48fb15)return console['error'](a56_0x3e0f1d['red'](_0x107d0e(0x244)),_0x107d0e(0x1bc)),console[_0x107d0e(0x19d)](a56_0x3e0f1d['dim'](_0x107d0e(0x24d))),null;return _0x48fb15;}[a56_0x4d17f9(0x167)](_0x5a7275,_0x2952ca){const _0xed074a=a56_0x4d17f9;if(_0x5a7275[0x0]){const _0x5d7059=_0x5a7275[0x0][_0xed074a(0x2c0)]('.');if(_0x5d7059[_0xed074a(0x1d4)]===0x1)return{'projectName':_0x5d7059[0x0],'workflowName':undefined};else return _0x5d7059['length']===0x2?{'projectName':_0x5d7059[0x0],'workflowName':_0x5d7059[0x1]}:(console[_0xed074a(0x19d)](a56_0x3e0f1d[_0xed074a(0x2d7)]('Error:'),_0xed074a(0x201)),null);}return{'projectName':_0x2952ca[_0xed074a(0x1e4)],'workflowName':undefined};}['resolveProjectDir'](_0x1e0fee,_0x32ebcc,_0x899fc2=0x0){const _0x3683bc=a56_0x4d17f9;if(_0x1e0fee[_0x899fc2])return _0x1e0fee[_0x899fc2];if(_0x32ebcc[_0x3683bc(0x1e4)]){const _0x1d5f2c=a56_0x1d0c78[_0x3683bc(0x278)](process[_0x3683bc(0x2ca)](),'workflows',_0x32ebcc[_0x3683bc(0x1e4)]);if(existsSync(a56_0x1d0c78['join'](_0x1d5f2c,_0x3683bc(0x2e6))))return _0x1d5f2c;}return undefined;}async[a56_0x4d17f9(0x2b1)](_0x24a6ca,_0x5450f4,_0x166aff){const _0xb5b9e6=a56_0x4d17f9;try{const _0x16954c=await _0x24a6ca['workflow'][_0xb5b9e6(0x2d0)](_0x5450f4,{'limit':0x1});if(_0x16954c[_0xb5b9e6(0x1d4)]>0x0){const _0x44ffb1=_0x16954c[0x0]['id'],_0x49864d=getWorkflowUrl(_0x166aff,_0x44ffb1);console['error'](_0xb5b9e6(0x188)+a56_0x3e0f1d[_0xb5b9e6(0x222)](_0x49864d));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x20e);['description']=a56_0x4d17f9(0x26b);async['execute'](_0x43f7d8){const _0x56d1aa=a56_0x4d17f9,{options:_0x201886,args:_0xa325eb,tdx:_0x10920f}=_0x43f7d8,_0x44b3ec=_0xa325eb[0x0],_0x3d5ddd=_0x201886[_0x56d1aa(0x2df)];if(_0x3d5ddd)return saveSessionContext({'workflow_project':undefined},_0x201886['session']),console[_0x56d1aa(0x221)](a56_0x3e0f1d[_0x56d1aa(0x182)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x44b3ec)return console['error'](a56_0x3e0f1d['red']('Error:'),_0x56d1aa(0x1bc)),console[_0x56d1aa(0x19d)](a56_0x3e0f1d[_0x56d1aa(0x1f9)](_0x56d1aa(0x226))),console[_0x56d1aa(0x19d)](a56_0x3e0f1d[_0x56d1aa(0x1f9)](_0x56d1aa(0x135))),0x1;const _0x429c39=await withSpinner(_0x56d1aa(0x223)+_0x44b3ec+_0x56d1aa(0x240),()=>_0x10920f[_0x56d1aa(0x13f)][_0x56d1aa(0x2c2)](_0x44b3ec),{'verbose':_0x201886[_0x56d1aa(0x1c8)]}),{name:_0x378d5d}=_0x429c39['data'];return saveSessionContext({'workflow_project':_0x378d5d},_0x201886[_0x56d1aa(0x1c9)]),console[_0x56d1aa(0x221)](a56_0x3e0f1d[_0x56d1aa(0x182)](_0x56d1aa(0x28e)+a56_0x3e0f1d[_0x56d1aa(0x222)](_0x378d5d))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']='workflow:projects';[a56_0x4d17f9(0x155)]='List\x20all\x20workflow\x20projects';async[a56_0x4d17f9(0x25e)](_0x8044df){const _0x5dbc64=a56_0x4d17f9,{options:_0x28d875,args:_0x586edf,tdx:_0x395377}=_0x8044df,_0x5eb43a=_0x586edf[0x0];_0x28d875['verbose']&&_0x5eb43a&&console[_0x5dbc64(0x19d)](_0x5dbc64(0x150)+_0x5eb43a);const _0x22d1ab=await withSpinner(_0x5dbc64(0x18a),()=>_0x395377[_0x5dbc64(0x13f)][_0x5dbc64(0x2e4)](_0x5eb43a,{'limit':_0x28d875[_0x5dbc64(0x1d8)]}),{'verbose':_0x28d875[_0x5dbc64(0x1c8)]});let _0x47f952=_0x22d1ab[_0x5dbc64(0x126)];_0x47f952['sort']((_0x65d9ec,_0xc9c753)=>_0x65d9ec[_0x5dbc64(0x1b7)][_0x5dbc64(0x231)](_0xc9c753['name']));const _0x5eb4dc=_0x28d875[_0x5dbc64(0x1d8)]&&_0x47f952[_0x5dbc64(0x1d4)]>=_0x28d875[_0x5dbc64(0x1d8)]?a56_0x3e0f1d['dim'](_0x5dbc64(0x21d)):'';console[_0x5dbc64(0x19d)](_0x5dbc64(0x233)+_0x47f952[_0x5dbc64(0x1d4)]+_0x5dbc64(0x26d)+(_0x47f952[_0x5dbc64(0x1d4)]!==0x1?'s':'')+_0x5eb4dc);if(_0x28d875['format']===_0x5dbc64(0x257)||_0x28d875['format']===_0x5dbc64(0x2f5)||_0x28d875[_0x5dbc64(0x1b4)]===_0x5dbc64(0x1cb))await handleSDKOutput(_0x47f952,_0x28d875);else{if(_0x47f952['length']===0x0)_0x5eb43a?console[_0x5dbc64(0x221)](_0x5dbc64(0x183)+_0x5eb43a):console[_0x5dbc64(0x221)](_0x5dbc64(0x151));else{const _0x58d6f8=_0x47f952[_0x5dbc64(0x2b5)](_0x55d5e7=>{const _0x50eeef=_0x5dbc64,_0x4904bb=_0x55d5e7[_0x50eeef(0x1ad)]?.[_0x50eeef(0x171)](_0x2e8f4c=>_0x2e8f4c['key']==='sys'),_0x2199a0=_0x4904bb?a56_0x3e0f1d['dim'](_0x50eeef(0x193)):'';return'📁\x20'+_0x55d5e7[_0x50eeef(0x1b7)]+_0x2199a0;});await writeOutput(_0x58d6f8['join']('\x0a'),_0x28d875[_0x5dbc64(0x178)],_0x5dbc64(0x1db));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']='workflow:workflows';[a56_0x4d17f9(0x155)]='List\x20workflows';async[a56_0x4d17f9(0x25e)](_0x58135f){const _0x136f8e=a56_0x4d17f9,{options:_0x2c9d63,args:_0x2eac0f,tdx:_0x45056d}=_0x58135f,_0x51eb19=this[_0x136f8e(0x180)](_0x2eac0f,_0x2c9d63);_0x2c9d63[_0x136f8e(0x1c8)]&&_0x51eb19&&console['error']('Project\x20filter:\x20'+_0x51eb19);const _0x52f72f=await withSpinner(_0x136f8e(0x1ee),()=>_0x45056d[_0x136f8e(0x13f)][_0x136f8e(0x2d0)](_0x51eb19,{'limit':_0x2c9d63['limit']}),{'verbose':_0x2c9d63[_0x136f8e(0x1c8)]});let _0x26ca2d=_0x52f72f[_0x136f8e(0x126)];_0x26ca2d[_0x136f8e(0x214)]((_0x415eeb,_0x1bab04)=>{const _0x4e53cb=_0x136f8e,_0x5d9235=_0x415eeb[_0x4e53cb(0x1b7)]['localeCompare'](_0x1bab04[_0x4e53cb(0x1b7)]);if(_0x5d9235!==0x0)return _0x5d9235;return(_0x415eeb[_0x4e53cb(0x275)]?.[_0x4e53cb(0x1b7)]||'')[_0x4e53cb(0x231)](_0x1bab04[_0x4e53cb(0x275)]?.['name']||'');});const _0x591161=_0x2c9d63['limit']&&_0x26ca2d[_0x136f8e(0x1d4)]>=_0x2c9d63[_0x136f8e(0x1d8)]?a56_0x3e0f1d[_0x136f8e(0x1f9)](_0x136f8e(0x21d)):'';console[_0x136f8e(0x19d)]('✔\x20Found\x20'+_0x26ca2d[_0x136f8e(0x1d4)]+_0x136f8e(0x170)+(_0x26ca2d['length']!==0x1?'s':'')+_0x591161);if(_0x2c9d63[_0x136f8e(0x1b4)]==='json'||_0x2c9d63[_0x136f8e(0x1b4)]===_0x136f8e(0x2f5)||_0x2c9d63[_0x136f8e(0x1b4)]===_0x136f8e(0x1cb))await handleSDKOutput(_0x26ca2d,_0x2c9d63);else{if(_0x26ca2d['length']===0x0)_0x51eb19?console[_0x136f8e(0x221)](_0x136f8e(0x219)+_0x51eb19):console['log'](_0x136f8e(0x124));else{const _0x5d20eb=_0x2c9d63[_0x136f8e(0x249)],_0x53c81b=_0x26ca2d[_0x136f8e(0x2b5)](_0x32a0d8=>{const _0x538dfb=_0x136f8e,_0x1c4e39=a56_0x3e0f1d[_0x538dfb(0x1f9)]('#'+_0x32a0d8['id']),_0x860dc=hyperlink(_0x1c4e39,getWorkflowUrl(_0x5d20eb,_0x32a0d8['id'])),_0x2a675c=_0x32a0d8[_0x538dfb(0x275)]?.[_0x538dfb(0x1b7)]?a56_0x3e0f1d[_0x538dfb(0x1f9)]('\x20('+_0x32a0d8[_0x538dfb(0x275)]['name']+')'):'';return'📋\x20'+_0x860dc+'\x20'+_0x32a0d8[_0x538dfb(0x1b7)]+_0x2a675c;});await writeOutput(_0x53c81b[_0x136f8e(0x278)]('\x0a'),_0x2c9d63[_0x136f8e(0x178)],_0x136f8e(0x1db));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x289);['description']='List\x20workflow\x20execution\x20sessions';async[a56_0x4d17f9(0x25e)](_0x192e35){const _0x50ccb5=a56_0x4d17f9,{options:_0xe66d35,args:_0x1b0096,tdx:_0x2bb779}=_0x192e35,_0x393e50=this[_0x50ccb5(0x167)](_0x1b0096,_0xe66d35);if(!_0x393e50)return 0x1;const {projectName:_0x4e03e7,workflowName:_0x112e77}=_0x393e50;if(_0xe66d35['verbose']){if(_0x4e03e7&&_0x112e77)console[_0x50ccb5(0x19d)](_0x50ccb5(0x2da)+_0x4e03e7+'.'+_0x112e77);else _0x4e03e7&&console[_0x50ccb5(0x19d)](_0x50ccb5(0x1e7)+_0x4e03e7);const _0x277500=_0xe66d35['status'];_0x277500&&console[_0x50ccb5(0x19d)](_0x50ccb5(0x271)+_0x277500);}let _0x2d0f44=0x28;if(process[_0x50ccb5(0x2a5)][_0x50ccb5(0x190)]&&!_0xe66d35[_0x50ccb5(0x178)]&&!_0xe66d35[_0x50ccb5(0x1b4)]){const _0x342789=process[_0x50ccb5(0x2a5)][_0x50ccb5(0x1da)]||0x28;_0x2d0f44=Math[_0x50ccb5(0x2d6)](0x14,Math[_0x50ccb5(0x1f8)](_0x342789*0x2/0x3));}const _0x5f4c44=_0xe66d35[_0x50ccb5(0x1d8)]||_0x2d0f44,_0x550e13=await withSpinner(_0x50ccb5(0x187),()=>_0x2bb779[_0x50ccb5(0x13f)][_0x50ccb5(0x246)]({'projectName':_0x4e03e7,'workflowName':_0x112e77,'status':_0xe66d35[_0x50ccb5(0x21f)],'fromTime':_0xe66d35[_0x50ccb5(0x15d)],'toTime':_0xe66d35['to'],'limit':_0x5f4c44}),{'verbose':_0xe66d35['verbose']}),_0x1b8a12=_0x550e13[_0x50ccb5(0x126)];_0x1b8a12[_0x50ccb5(0x214)]((_0x5d86d1,_0x594a5c)=>{const _0x27add0=_0x5d86d1['sessionTime']||'',_0x3843b9=_0x594a5c['sessionTime']||'';return _0x3843b9['localeCompare'](_0x27add0);});_0x1b8a12['length']>=_0x5f4c44?console[_0x50ccb5(0x19d)](_0x50ccb5(0x174)+_0x1b8a12['length']+_0x50ccb5(0x1ff)+a56_0x3e0f1d[_0x50ccb5(0x1f9)](_0x50ccb5(0x225))):console[_0x50ccb5(0x19d)]('✔\x20Found\x20'+_0x1b8a12[_0x50ccb5(0x1d4)]+_0x50ccb5(0x2a0)+(_0x1b8a12['length']!==0x1?'s':''));if(_0xe66d35[_0x50ccb5(0x1b4)]===_0x50ccb5(0x257)||_0xe66d35[_0x50ccb5(0x1b4)]===_0x50ccb5(0x2f5)||_0xe66d35['format']===_0x50ccb5(0x1cb))await handleSDKOutput(_0x1b8a12,_0xe66d35);else{if(!process[_0x50ccb5(0x2a5)][_0x50ccb5(0x190)]||_0xe66d35['output']){if(_0x1b8a12[_0x50ccb5(0x1d4)]===0x0){if(_0x4e03e7&&_0x112e77)console[_0x50ccb5(0x221)](_0x50ccb5(0x2ae)+_0x4e03e7+'.'+_0x112e77);else _0x4e03e7?console[_0x50ccb5(0x221)](_0x50ccb5(0x149)+_0x4e03e7):console['log']('No\x20sessions\x20found');}else{const _0x37baa1=_0xe66d35[_0x50ccb5(0x249)],_0x3d31db=this[_0x50ccb5(0x20a)](_0x1b8a12,_0x37baa1);_0xe66d35[_0x50ccb5(0x178)]?await writeOutput(_0x3d31db,_0xe66d35['output'],_0x50ccb5(0x1db)):console[_0x50ccb5(0x221)](_0x3d31db);}!_0x4e03e7&&(console[_0x50ccb5(0x19d)](''),console['error'](a56_0x3e0f1d[_0x50ccb5(0x1f9)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x50ccb5(0x19d)](a56_0x3e0f1d['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a56_0x3e0f1d[_0x50ccb5(0x1f9)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x1b8a12[_0x50ccb5(0x1d4)]===0x0){if(_0x4e03e7&&_0x112e77)console[_0x50ccb5(0x221)](_0x50ccb5(0x2ae)+_0x4e03e7+'.'+_0x112e77);else _0x4e03e7?console[_0x50ccb5(0x221)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x4e03e7):console[_0x50ccb5(0x221)](_0x50ccb5(0x2f7));}else await this['navigateSessionsInteractive'](_0x1b8a12,_0x192e35,_0x4e03e7);}}return 0x0;}[a56_0x4d17f9(0x20a)](_0x37e764,_0xee5b3c){const _0x2c24d7=a56_0x4d17f9,_0x518e27=[],_0x358058=new Map();let _0x4ea99b=Infinity,_0x48e1b8=-Infinity;for(const _0x290a51 of _0x37e764){if(_0x290a51[_0x2c24d7(0x202)]?.[_0x2c24d7(0x186)]){const _0x46240a=new Date(_0x290a51[_0x2c24d7(0x202)][_0x2c24d7(0x186)])[_0x2c24d7(0x19c)](),_0x16d082=_0x290a51[_0x2c24d7(0x202)]['finishedAt']?new Date(_0x290a51[_0x2c24d7(0x202)][_0x2c24d7(0x2b3)])[_0x2c24d7(0x19c)]():Date[_0x2c24d7(0x25d)](),_0x18b2b5=_0x290a51[_0x2c24d7(0x275)]?.[_0x2c24d7(0x1b7)]||_0x2c24d7(0x29e);!_0x358058['has'](_0x18b2b5)&&_0x358058['set'](_0x18b2b5,[]),_0x358058[_0x2c24d7(0x234)](_0x18b2b5)[_0x2c24d7(0x250)]({'session':_0x290a51,'startTime':_0x46240a,'endTime':_0x16d082,'duration':_0x16d082-_0x46240a}),_0x4ea99b=Math[_0x2c24d7(0x295)](_0x4ea99b,_0x46240a),_0x48e1b8=Math[_0x2c24d7(0x2d6)](_0x48e1b8,_0x16d082);}}if(_0x358058[_0x2c24d7(0x1ba)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x36448c=process['stdout'][_0x2c24d7(0x175)]||0x78,_0x573932=0x1e,_0x39478d=0x32,_0x5a745b=0x4,_0x5ca6ef=Math[_0x2c24d7(0x295)](_0x39478d,Math[_0x2c24d7(0x2d6)](_0x573932,Math['floor'](_0x36448c*0.3))),_0x5adffa=_0x36448c-_0x5ca6ef-TIMELINE_CONFIG['GUTTER']-0x3-_0x5a745b,_0xf22492=_0x48e1b8-_0x4ea99b,_0x51c481=_0xf22492/_0x5ca6ef,_0xf77a92=renderTimeAxis({'startTime':_0x4ea99b,'endTime':_0x48e1b8,'durationMs':_0xf22492,'msPerChar':_0x51c481},_0x5ca6ef),_0x10bf29=[];for(const _0x13dad1 of _0x358058[_0x2c24d7(0x20b)]()){_0x10bf29[_0x2c24d7(0x250)](..._0x13dad1);}_0x10bf29['sort']((_0x155b46,_0x154cb9)=>_0x154cb9[_0x2c24d7(0x1aa)]-_0x155b46[_0x2c24d7(0x1aa)]);const _0x2c1093=new Date(_0x4ea99b),_0xc2e6a8=formatDate(_0x2c1093),_0x3ac644=_0x5a745b+TIMELINE_CONFIG[_0x2c24d7(0x1dd)]+TIMELINE_CONFIG[_0x2c24d7(0x1fe)]+_0x5adffa,_0x33402e='\x20'[_0x2c24d7(0x156)](_0x3ac644-_0xc2e6a8[_0x2c24d7(0x1d4)]),_0xff36bc=_0x33402e+a56_0x3e0f1d['dim'](_0xc2e6a8)+'\x20'+_0xf77a92;_0x518e27['push'](_0xff36bc);const _0x48b6e9=0x16;let _0x418e29=0x0;for(const _0x37798c of _0x10bf29){const _0x523404=_0x37798c['session']['project']?.['name']||'?',_0x43ebd4=Math[_0x2c24d7(0x295)](stringWidth(_0x523404),_0x48b6e9);_0x418e29=Math[_0x2c24d7(0x2d6)](_0x418e29,_0x43ebd4);}for(const _0xcf4c13 of _0x10bf29){const {session:_0x37925f,startTime:_0x629bfb,endTime:_0x4f8da8,duration:_0x55fef4}=_0xcf4c13,_0xd2ee52=_0x37925f['project']?.['id'],_0x27217e=_0x37925f['id'],_0xec3f38=_0x37925f['project']?.[_0x2c24d7(0x1b7)]||'?',_0x44a95e=_0x37925f[_0x2c24d7(0x13f)]?.[_0x2c24d7(0x1b7)]||'?';let _0x7381bf,_0x2ce07d;if(_0x37925f[_0x2c24d7(0x202)]){const _0x36720d=_0x37925f[_0x2c24d7(0x202)];!_0x36720d[_0x2c24d7(0x203)]?(_0x7381bf=_0x36720d[_0x2c24d7(0x262)]?'🛑':'🔄',_0x2ce07d=_0x36720d[_0x2c24d7(0x262)]?a56_0x3e0f1d['yellow']:a56_0x3e0f1d[_0x2c24d7(0x2cb)]):(_0x7381bf=_0x36720d['success']?'✅':'❌',_0x2ce07d=_0x36720d['success']?a56_0x3e0f1d[_0x2c24d7(0x182)]:a56_0x3e0f1d['red']);}else _0x7381bf='⏳',_0x2ce07d=a56_0x3e0f1d['dim'];const _0x3b5ffa='#'+_0x27217e,_0xf43131=_0xd2ee52?hyperlink(_0x3b5ffa,getWorkflowSessionUrl(_0xee5b3c,_0xd2ee52,_0x27217e)):_0x3b5ffa;let _0x17d9e3=_0xec3f38;stringWidth(_0xec3f38)>_0x48b6e9&&(_0x17d9e3=_0xec3f38[_0x2c24d7(0x2bb)](0x0,_0x48b6e9-0x1)+'…');const _0xe289b3=a56_0x3e0f1d['dim'](_0x17d9e3),_0x31d090=stringWidth(_0x17d9e3),_0x2e3adc='\x20'[_0x2c24d7(0x156)](_0x418e29-stringWidth(_0x17d9e3)+0x2),_0x4df19b='('+formatElapsed(_0x55fef4)+')',_0xb99e21=stringWidth(_0x4df19b),_0x2e100f=stringWidth(_0x3b5ffa),_0x3c8a58=_0x2e100f+0x1+_0x31d090+_0x2e3adc['length'],_0xd9cca1=_0x5adffa-_0x3c8a58-_0xb99e21-0x1-0x8;let _0x54e86f=_0x44a95e;stringWidth(_0x54e86f)>_0xd9cca1&&(_0x54e86f=_0x54e86f[_0x2c24d7(0x2bb)](0x0,_0xd9cca1-0x1)+'…');const _0x5623ab=_0xf43131+'\x20'+_0xe289b3+_0x2e3adc+_0x54e86f,_0x26a1c6=stringWidth(_0x5623ab),_0xcff8e6=_0x5adffa-_0x26a1c6-_0xb99e21,_0x5942b7=_0x5623ab+'\x20'[_0x2c24d7(0x156)](Math[_0x2c24d7(0x2d6)](0x1,_0xcff8e6))+a56_0x3e0f1d[_0x2c24d7(0x1f9)](_0x4df19b),_0x2fb936=Math[_0x2c24d7(0x1f8)]((_0x629bfb-_0x4ea99b)/_0x51c481),_0xc77403=Math[_0x2c24d7(0x1f8)]((_0x4f8da8-_0x4ea99b)/_0x51c481),_0x33bb44=Math['max'](_0x2fb936+0x1,_0xc77403),_0x170298=new Array(_0x5ca6ef)[_0x2c24d7(0x195)]('\x20');for(let _0x41b820=_0x2fb936;_0x41b820<Math['min'](_0x33bb44,_0x5ca6ef);_0x41b820++){_0x170298[_0x41b820]='─';}const _0x3694dc=_0x170298[_0x2c24d7(0x2b5)](_0x20999c=>_0x20999c==='\x20'?'\x20':_0x2ce07d(_0x20999c))[_0x2c24d7(0x278)]('');_0x518e27['push'](_0x7381bf+'\x20'+_0x5942b7+'│'+_0x3694dc+'│');}return _0x518e27[_0x2c24d7(0x278)]('\x0a');}async[a56_0x4d17f9(0x279)](_0x1eced2,_0x4f4035,_0x309737){const _0x6540db=a56_0x4d17f9,{options:_0x379aeb,tdx:_0x1d941b}=_0x4f4035,_0x5662db=_0x379aeb['site'],{timelineRows:_0x3a5096,timeAxisHeader:_0x47c7c5}=this[_0x6540db(0x173)](_0x1eced2,_0x5662db),_0x4d3ace=_0x3a5096[_0x6540db(0x19b)](_0x22ab73=>_0x22ab73['attemptId']);if(_0x4d3ace[_0x6540db(0x1d4)]===0x0){const _0xdb8ed=this[_0x6540db(0x20a)](_0x1eced2,_0x5662db);console[_0x6540db(0x221)](_0xdb8ed);!_0x309737&&(console[_0x6540db(0x19d)](''),console[_0x6540db(0x19d)](a56_0x3e0f1d[_0x6540db(0x1f9)](_0x6540db(0x2cd))),console[_0x6540db(0x19d)](a56_0x3e0f1d['dim'](_0x6540db(0x18c))+'or'+a56_0x3e0f1d[_0x6540db(0x1f9)](_0x6540db(0x2e2))));return;}_0x47c7c5&&console[_0x6540db(0x221)](_0x47c7c5);const _0x2c7ceb=_0x3a5096['filter'](_0x17e514=>_0x17e514[_0x6540db(0x236)])[_0x6540db(0x2b5)](_0xe56312=>({'title':_0xe56312[_0x6540db(0x2c5)],'value':_0xe56312[_0x6540db(0x236)]})),_0x105977=process[_0x6540db(0x2a5)][_0x6540db(0x1da)]||0x3c,_0x53e346=Math[_0x6540db(0x2d6)](0x28,Math['floor'](_0x105977*0x2/0x3)),_0x2e7eef=await a56_0x2c360c({'type':'autocomplete','name':_0x6540db(0x236),'message':_0x6540db(0x12e),'choices':_0x2c7ceb,'initial':-0x1,'limit':_0x53e346,'clearFirst':!![],'fallback':{'title':_0x6540db(0x2d4),'value':null},'suggest':(_0x326c4a,_0x1587df)=>{const _0x4355cc=_0x6540db;if(!_0x326c4a)return Promise['resolve'](_0x1587df);const _0x3bd292=_0x1587df[_0x4355cc(0x19b)](_0x27c5de=>{const _0x1edd1f=_0x4355cc,_0x161c76=_0x27c5de;return _0x161c76[_0x1edd1f(0x2c8)]['toLowerCase']()[_0x1edd1f(0x2de)](_0x326c4a[_0x1edd1f(0x2bd)]());});return Promise['resolve'](_0x3bd292);}}),_0x2137e2=()=>{const _0x592309=_0x6540db;process['stdout'][_0x592309(0x18b)](_0x592309(0x1f1)),process[_0x592309(0x2a5)][_0x592309(0x18b)](_0x592309(0x1f1)),process[_0x592309(0x2a5)][_0x592309(0x18b)](_0x592309(0x1f1));},_0x388a5d=_0x2e7eef&&_0x2e7eef[_0x6540db(0x236)]&&_0x2e7eef[_0x6540db(0x236)]!==null&&_0x2e7eef[_0x6540db(0x236)][_0x6540db(0x2f8)]()!=='';if(!_0x388a5d){_0x2137e2(),console[_0x6540db(0x221)](a56_0x3e0f1d[_0x6540db(0x1f9)](_0x6540db(0x14e)));return;}_0x2137e2();const _0x2f7ce6=_0x1eced2[_0x6540db(0x252)](_0x185d0a=>_0x185d0a[_0x6540db(0x202)]?.['id']===_0x2e7eef[_0x6540db(0x236)]);if(_0x2f7ce6){const _0x5869fd=_0x2f7ce6[_0x6540db(0x275)]?.[_0x6540db(0x1b7)]||'?',_0x2ae8de=_0x2f7ce6['workflow']?.[_0x6540db(0x1b7)]||'?';console[_0x6540db(0x221)](_0x6540db(0x26e)+a56_0x3e0f1d[_0x6540db(0x1f9)](_0x5869fd)+_0x6540db(0x276)+a56_0x3e0f1d[_0x6540db(0x1f9)](_0x2ae8de));}const _0x2ea364=new WorkflowTimelineCommand();await _0x2ea364[_0x6540db(0x25e)]({'args':[],'options':{..._0x379aeb,'attemptId':_0x2e7eef[_0x6540db(0x236)]},'tdx':_0x1d941b});}[a56_0x4d17f9(0x173)](_0x334b38,_0x40795f){const _0x5769a2=a56_0x4d17f9,_0x4fc15f=new Map();for(const _0x453dbf of _0x334b38){_0x453dbf['id']&&_0x453dbf[_0x5769a2(0x202)]?.['id']&&_0x4fc15f[_0x5769a2(0x26f)](_0x453dbf['id'],_0x453dbf[_0x5769a2(0x202)]['id']);}const _0x1c0d5e=[];let _0x3a9760='';const _0x223440=this[_0x5769a2(0x20a)](_0x334b38,_0x40795f),_0x138ce8=_0x223440['split']('\x0a');for(const _0x4286bb of _0x138ce8){if(_0x4286bb[_0x5769a2(0x2a6)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x4286bb[_0x5769a2(0x200)](/^\s+\d{4}-\d{2}-\d{2}/))_0x3a9760=_0x4286bb;else{if(_0x4286bb[_0x5769a2(0x200)](/^[✅❌🔄🛑⏳]/)){const _0x23d1a6=_0x4286bb[_0x5769a2(0x200)](/#(\d+)/),_0x2004c9=_0x23d1a6?_0x23d1a6[0x1]:null,_0x3ab6ea=_0x2004c9?_0x4fc15f[_0x5769a2(0x234)](_0x2004c9)||null:null,_0x1615e7=_0x334b38[_0x5769a2(0x252)](_0x5aff19=>_0x5aff19['id']===_0x2004c9),_0x48af31=_0x1615e7?.[_0x5769a2(0x275)]?.[_0x5769a2(0x1b7)]||'';_0x1c0d5e[_0x5769a2(0x250)]({'displayLine':_0x4286bb,'attemptId':_0x3ab6ea,'projectName':_0x48af31});}}}return{'timelineRows':_0x1c0d5e,'timeAxisHeader':_0x3a9760};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x21b);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x16d);async[a56_0x4d17f9(0x25e)](_0x109d7e){const _0x8e0b72=a56_0x4d17f9,{options:_0x2c7265,args:_0x1df0f3,tdx:_0x548538}=_0x109d7e,_0x4a11f7=this['parseProjectWorkflowPattern'](_0x1df0f3,_0x2c7265);if(!_0x4a11f7)return 0x1;const {projectName:_0xe7a4c8,workflowName:_0xec6e9f}=_0x4a11f7,_0x5c899c=_0x2c7265[_0x8e0b72(0x2e0)];if(_0x2c7265[_0x8e0b72(0x1c8)]){if(_0xe7a4c8&&_0xec6e9f)console['error'](_0x8e0b72(0x2da)+_0xe7a4c8+'.'+_0xec6e9f);else _0xe7a4c8&&console['error'](_0x8e0b72(0x1e7)+_0xe7a4c8);_0x5c899c&&console[_0x8e0b72(0x19d)]('Include\x20retried:\x20yes');}const _0x3b9049=await withSpinner(_0x8e0b72(0x287),()=>_0x548538[_0x8e0b72(0x13f)][_0x8e0b72(0x251)]({'projectName':_0xe7a4c8,'workflowName':_0xec6e9f,'includeRetried':_0x5c899c,'limit':_0x2c7265[_0x8e0b72(0x1d8)]}),{'verbose':_0x2c7265[_0x8e0b72(0x1c8)]}),_0x5379eb=_0x3b9049[_0x8e0b72(0x126)],_0x40b406=_0x2c7265[_0x8e0b72(0x1d8)]||0x64,_0x545564=_0x5379eb[_0x8e0b72(0x1d4)]>=_0x40b406?a56_0x3e0f1d[_0x8e0b72(0x1f9)](_0x8e0b72(0x21d)):'';console[_0x8e0b72(0x19d)]('✔\x20Found\x20'+_0x5379eb[_0x8e0b72(0x1d4)]+_0x8e0b72(0x1be)+(_0x5379eb[_0x8e0b72(0x1d4)]!==0x1?'s':'')+_0x545564);if(_0x2c7265['format']===_0x8e0b72(0x257)||_0x2c7265[_0x8e0b72(0x1b4)]===_0x8e0b72(0x2f5)||_0x2c7265[_0x8e0b72(0x1b4)]===_0x8e0b72(0x1cb))await handleSDKOutput(_0x5379eb,_0x2c7265);else{if(_0x5379eb[_0x8e0b72(0x1d4)]===0x0){if(_0xe7a4c8&&_0xec6e9f)console[_0x8e0b72(0x221)](_0x8e0b72(0x239)+_0xe7a4c8+'.'+_0xec6e9f);else _0xe7a4c8?console[_0x8e0b72(0x221)](_0x8e0b72(0x15c)+_0xe7a4c8):console['log'](_0x8e0b72(0x2f6));}else{const _0x3089cd=_0x2c7265[_0x8e0b72(0x249)],_0x4fd222=_0x5379eb[_0x8e0b72(0x2b5)](_0x56b63e=>{const _0x16a198=_0x8e0b72,_0x2acf7f=a56_0x3e0f1d[_0x16a198(0x1f9)]('#'+_0x56b63e['id']),_0x517784=_0x56b63e[_0x16a198(0x275)]?.['id'],_0xda43e3=_0x56b63e[_0x16a198(0x123)]||_0x56b63e[_0x16a198(0x163)],_0x2f4f28=_0x517784&&_0xda43e3?hyperlink(_0x2acf7f,getWorkflowAttemptUrl(_0x3089cd,_0x517784,_0xda43e3,_0x56b63e['id'])):_0x2acf7f,{icon:_0x3970d1,text:_0x8acb90}=getAttemptStatusDisplay(_0x56b63e),_0x53f6fc=(_0x56b63e[_0x16a198(0x275)]?.[_0x16a198(0x1b7)]||'?')+'.'+(_0x56b63e[_0x16a198(0x13f)]?.[_0x16a198(0x1b7)]||'?'),_0x4acf71=_0x56b63e[_0x16a198(0x255)]?a56_0x3e0f1d[_0x16a198(0x1f9)](_0x56b63e['sessionTime']):'';return(_0x2f4f28+'\x20'+_0x3970d1+(_0x8acb90?'\x20'+_0x8acb90:'')+'\x20'+_0x53f6fc+'\x20'+_0x4acf71)[_0x16a198(0x211)]();});await writeOutput(_0x4fd222[_0x8e0b72(0x278)]('\x0a'),_0x2c7265[_0x8e0b72(0x178)],_0x8e0b72(0x1db));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]='workflow:attempt';[a56_0x4d17f9(0x155)]='Show\x20specific\x20attempt\x20details';async[a56_0x4d17f9(0x25e)](_0x1573c9){const _0x44608d=a56_0x4d17f9,{options:_0x50a649,args:_0x3466ea,tdx:_0x540436}=_0x1573c9,_0x4cb096=_0x3466ea[0x0];if(!_0x4cb096)return console['error'](_0x44608d(0x2cf)),0x1;_0x50a649['verbose']&&console[_0x44608d(0x19d)](_0x44608d(0x2b7)+_0x4cb096);const _0x4f1662=await withSpinner(_0x44608d(0x16c),()=>_0x540436[_0x44608d(0x13f)][_0x44608d(0x266)](_0x4cb096),{'verbose':_0x50a649[_0x44608d(0x1c8)]}),_0x826102=_0x4f1662[_0x44608d(0x126)];let _0x382f06;!_0x826102[_0x44608d(0x203)]?_0x382f06=_0x826102['cancelRequested']?_0x44608d(0x2e1):'running':_0x382f06=_0x826102[_0x44608d(0x2f1)]?_0x44608d(0x2f1):_0x44608d(0x19d);let _0x3b1e5d;if(_0x826102[_0x44608d(0x186)]&&_0x826102['finishedAt']){const _0x50341b=new Date(_0x826102['createdAt'])[_0x44608d(0x19c)](),_0x120549=new Date(_0x826102[_0x44608d(0x2b3)])[_0x44608d(0x19c)]();_0x3b1e5d=Math[_0x44608d(0x253)]((_0x120549-_0x50341b)/0x3e8);}const _0x472a4b={'attempt_id':_0x826102['id'],'status':_0x382f06,..._0x826102[_0x44608d(0x1a5)]!==undefined&&{'index':_0x826102[_0x44608d(0x1a5)]},..._0x826102['project']&&{'project':_0x826102[_0x44608d(0x275)]['name']},..._0x826102['workflow']&&{'workflow':_0x826102[_0x44608d(0x13f)][_0x44608d(0x1b7)]},..._0x826102[_0x44608d(0x163)]&&{'session_id':_0x826102[_0x44608d(0x163)]},..._0x826102['sessionTime']&&{'session_time':_0x826102[_0x44608d(0x255)]},..._0x826102[_0x44608d(0x17d)]&&{'retry_attempt':_0x826102[_0x44608d(0x17d)]},..._0x3b1e5d!==undefined&&{'duration_sec':_0x3b1e5d},..._0x826102[_0x44608d(0x186)]&&{'created_at':_0x826102['createdAt']},..._0x826102['finishedAt']&&{'finished_at':_0x826102['finishedAt']},...Object['keys'](_0x826102[_0x44608d(0x16e)])[_0x44608d(0x1d4)]>0x0&&{'params':_0x826102['params']}};return await handleSingleObjectOutput(_0x472a4b,_0x50a649),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]='workflow:tasks';[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x139);async['execute'](_0x26f1dd){const _0xab64ba=a56_0x4d17f9,{options:_0x369042,args:_0x5080c0,tdx:_0x3afab5}=_0x26f1dd,_0x36b267=_0x5080c0[0x0];if(!_0x36b267)return console[_0xab64ba(0x19d)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x57f9b4=_0x369042[_0xab64ba(0x1d7)];_0x369042['verbose']&&(console[_0xab64ba(0x19d)](_0xab64ba(0x2b7)+_0x36b267),_0x57f9b4&&console[_0xab64ba(0x19d)](_0xab64ba(0x1d1)));const _0x739fd8=await withSpinner(_0xab64ba(0x228),()=>_0x3afab5[_0xab64ba(0x13f)][_0xab64ba(0x1dc)](_0x36b267,_0x57f9b4||![]),{'verbose':_0x369042[_0xab64ba(0x1c8)]}),_0xf449d3=_0x739fd8[_0xab64ba(0x126)];return console[_0xab64ba(0x19d)](_0xab64ba(0x233)+_0xf449d3[_0xab64ba(0x1d4)]+_0xab64ba(0x2a3)+(_0xf449d3[_0xab64ba(0x1d4)]!==0x1?'s':'')),await handleSDKOutput(_0xf449d3,_0x369042),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x2b9);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x1cf);async[a56_0x4d17f9(0x25e)](_0x327d3c){const _0x15ae5a=a56_0x4d17f9,{options:_0x4be925,args:_0x59bd39,tdx:_0x4c9211}=_0x327d3c,_0x4fde8a=_0x59bd39[0x0];let _0x37ace2=_0x59bd39[0x1];if(!_0x4fde8a)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x4be925[_0x15ae5a(0x1c8)]&&(console['error'](_0x15ae5a(0x2b7)+_0x4fde8a),_0x37ace2&&console[_0x15ae5a(0x19d)](_0x15ae5a(0x268)+_0x37ace2));const _0x4a33f2=await withSpinner('Fetching\x20log\x20files...',()=>_0x4c9211[_0x15ae5a(0x13f)]['logFiles'](_0x4fde8a,_0x37ace2),{'verbose':_0x4be925[_0x15ae5a(0x1c8)]}),_0xbb88ee=_0x4a33f2[_0x15ae5a(0x126)];if(_0xbb88ee['length']===0x0)return console['error'](_0x15ae5a(0x138)),0x0;if(!_0x37ace2&&(_0x4be925['json']||_0x4be925[_0x15ae5a(0x1b4)]))return await handleSDKOutput(_0xbb88ee,_0x4be925),0x0;if(!_0x37ace2){const _0x49a305=_0xbb88ee[_0x15ae5a(0x2b5)](_0x383e4f=>({'title':_0x383e4f['taskName']+'\x20('+formatBytes(_0x383e4f[_0x15ae5a(0x281)])+')','value':_0x383e4f[_0x15ae5a(0x2ed)]})),_0x4254cd=await a56_0x2c360c({'type':'select','name':_0x15ae5a(0x184),'message':_0x15ae5a(0x1b5),'choices':_0x49a305});if(!_0x4254cd['task'])return console[_0x15ae5a(0x19d)](_0x15ae5a(0x14e)),0x0;_0x37ace2=_0x4254cd[_0x15ae5a(0x184)];}const _0x3a3468=await withSpinner(_0x15ae5a(0x1c4),()=>_0x4c9211[_0x15ae5a(0x13f)]['logs'](_0x4fde8a,_0x37ace2),{'verbose':_0x4be925[_0x15ae5a(0x1c8)]}),_0x45e1ac=_0x3a3468[_0x15ae5a(0x126)];return _0x45e1ac?console[_0x15ae5a(0x221)](_0x45e1ac):console[_0x15ae5a(0x19d)](_0x15ae5a(0x2c3)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x1f2);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x27a);async[a56_0x4d17f9(0x25e)](_0x3737da){const _0x1fb4ff=a56_0x4d17f9,{options:_0x229100,args:_0x42dd65,tdx:_0x4c1032}=_0x3737da,_0x27dac0=_0x42dd65[0x0];if(!_0x27dac0)return console[_0x1fb4ff(0x19d)](_0x1fb4ff(0x2cf)),0x1;const _0x335292=_0x229100['reason'];_0x229100[_0x1fb4ff(0x1c8)]&&(console[_0x1fb4ff(0x19d)]('Attempt\x20ID:\x20'+_0x27dac0),_0x335292&&console[_0x1fb4ff(0x19d)]('Reason:\x20'+_0x335292));if(!_0x229100[_0x1fb4ff(0x179)]){if(!isInteractive())return console['error'](a56_0x3e0f1d[_0x1fb4ff(0x2d7)](_0x1fb4ff(0x1f3)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1fb4ff(0x19d)](a56_0x3e0f1d[_0x1fb4ff(0x1f9)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2d4ded=await confirmKey(_0x1fb4ff(0x159)+_0x27dac0+'?');if(!_0x2d4ded)return console[_0x1fb4ff(0x19d)](a56_0x3e0f1d[_0x1fb4ff(0x2a8)]('Cancelled')),0x1;}const _0x2eebed=await withSpinner(_0x1fb4ff(0x2f2),()=>_0x4c1032['workflow'][_0x1fb4ff(0x1fc)](_0x27dac0,_0x335292),{'verbose':_0x229100['verbose']}),_0x125ea4=_0x2eebed[_0x1fb4ff(0x126)];return console[_0x1fb4ff(0x19d)]('✔\x20'+_0x125ea4),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x29c);[a56_0x4d17f9(0x155)]='Retry\x20a\x20session\x20or\x20attempt';async[a56_0x4d17f9(0x25e)](_0x12e919){const _0x454156=a56_0x4d17f9,{options:_0x48cf26,args:_0x21c503,tdx:_0x20e8ad}=_0x12e919,_0x177967=_0x21c503[0x0];if(!_0x177967)return console['error']('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x42f40e=![],_0x16cb1d=_0x177967;if(_0x177967[_0x454156(0x2a6)](_0x454156(0x23a)))_0x42f40e=!![],_0x16cb1d=_0x177967[_0x454156(0x141)](0x8);else{if(_0x177967['startsWith'](_0x454156(0x1ea)))_0x42f40e=![],_0x16cb1d=_0x177967[_0x454156(0x141)](0x8);else return console[_0x454156(0x19d)](_0x454156(0x198)),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x5ed303=_0x48cf26['fromTask'],_0x51cd61=_0x48cf26[_0x454156(0x1ce)],_0x20b258=_0x48cf26[_0x454156(0x16e)],_0x100aae=_0x48cf26[_0x454156(0x22c)];_0x48cf26[_0x454156(0x1c8)]&&(console[_0x454156(0x19d)]('Target:\x20'+(_0x42f40e?_0x454156(0x1c9):_0x454156(0x266))+'\x20'+_0x16cb1d),_0x5ed303&&console['error'](_0x454156(0x16b)+_0x5ed303),_0x51cd61&&console['error'](_0x454156(0x264)+_0x51cd61),_0x20b258&&console[_0x454156(0x19d)](_0x454156(0x2ac)+_0x20b258),_0x100aae&&console['error'](_0x454156(0x1d3)));let _0x509e71;if(_0x20b258)try{if(_0x20b258[_0x454156(0x2a6)]('@')){const _0x42a820=await import(_0x454156(0x280)),_0x554828=_0x20b258[_0x454156(0x141)](0x1),_0xd3ec55=await _0x42a820[_0x454156(0x294)](_0x554828,_0x454156(0x260));_0x509e71=JSON[_0x454156(0x1a8)](_0xd3ec55);}else _0x509e71=JSON[_0x454156(0x1a8)](_0x20b258);}catch{return console[_0x454156(0x19d)](_0x454156(0x26c)),0x1;}if(!_0x48cf26[_0x454156(0x179)]){if(!isInteractive())return console['error'](a56_0x3e0f1d[_0x454156(0x2d7)](_0x454156(0x1f3)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x454156(0x19d)](a56_0x3e0f1d[_0x454156(0x1f9)](_0x454156(0x24a))),0x1;const _0x59e0e0=await confirmKey(_0x454156(0x1a9)+(_0x42f40e?_0x454156(0x1c9):'attempt')+'\x20'+_0x16cb1d+'?');if(!_0x59e0e0)return console[_0x454156(0x19d)](a56_0x3e0f1d['yellow'](_0x454156(0x14e))),0x1;}let _0x2cfb96;_0x42f40e?_0x2cfb96=await withSpinner(_0x454156(0x29f),()=>_0x20e8ad[_0x454156(0x13f)][_0x454156(0x2d9)](_0x16cb1d,{'fromTask':_0x5ed303,'retryParams':_0x509e71}),{'verbose':_0x48cf26['verbose']}):_0x2cfb96=await withSpinner(_0x454156(0x1bb),()=>_0x20e8ad['workflow'][_0x454156(0x1a2)](_0x16cb1d,{'resumeFrom':_0x51cd61,'retryParams':_0x509e71,'force':_0x100aae}),{'verbose':_0x48cf26[_0x454156(0x1c8)]});const _0x299d3f=_0x2cfb96[_0x454156(0x126)];return console[_0x454156(0x19d)](_0x454156(0x1bf)),console[_0x454156(0x19d)](_0x454156(0x299)+_0x299d3f['attemptId']),console['error'](_0x454156(0x1b8)+_0x299d3f['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x210);[a56_0x4d17f9(0x155)]='Start\x20a\x20workflow\x20run';async[a56_0x4d17f9(0x25e)](_0x383fea){const _0x1c64bf=a56_0x4d17f9,{options:_0x38ec5d,args:_0x4ee6db,tdx:_0x4b6908}=_0x383fea;let _0x355cb8=_0x4ee6db[0x0];if(!_0x355cb8){const _0x4918bf=this[_0x1c64bf(0x180)]([],_0x38ec5d),_0x39da6d=await withSpinner('Loading\x20workflows...',()=>_0x4b6908[_0x1c64bf(0x13f)][_0x1c64bf(0x2d0)](_0x4918bf,{'limit':_0x38ec5d[_0x1c64bf(0x1d8)]}),{'verbose':_0x38ec5d[_0x1c64bf(0x1c8)]}),_0x5caa51=_0x39da6d['data'];if(_0x5caa51[_0x1c64bf(0x1d4)]===0x0)return console[_0x1c64bf(0x19d)](_0x1c64bf(0x124)),!_0x4918bf&&console['error'](a56_0x3e0f1d['dim'](_0x1c64bf(0x24d))),0x1;const _0x469679=_0x5caa51[_0x1c64bf(0x2b5)](_0x1272ce=>({'title':_0x1272ce['project']?.['name']+'.'+_0x1272ce[_0x1c64bf(0x1b7)],'value':_0x1272ce[_0x1c64bf(0x275)]?.[_0x1c64bf(0x1b7)]+'.'+_0x1272ce[_0x1c64bf(0x1b7)],'description':_0x1272ce[_0x1c64bf(0x15a)]?_0x1c64bf(0x1ae)+_0x1272ce['revision']:undefined})),_0x1699ed=await a56_0x2c360c({'type':_0x1c64bf(0x2dd),'name':'workflow','message':_0x1c64bf(0x160),'choices':_0x469679});if(!_0x1699ed['workflow'])return 0x1;_0x355cb8=_0x1699ed['workflow'];}if(!_0x355cb8[_0x1c64bf(0x2de)]('.')){const _0x4c5c2a=this['resolveProject']([],_0x38ec5d);if(_0x4c5c2a)_0x355cb8=_0x4c5c2a+'.'+_0x355cb8;else return console[_0x1c64bf(0x19d)](a56_0x3e0f1d[_0x1c64bf(0x2d7)](_0x1c64bf(0x244)),_0x1c64bf(0x24f)),console['error'](a56_0x3e0f1d[_0x1c64bf(0x1f9)](_0x1c64bf(0x24d))),0x1;}const _0x17fdcd=_0x38ec5d[_0x1c64bf(0x258)],_0x48d222=_0x38ec5d[_0x1c64bf(0x255)],_0x3f4613={};if(_0x17fdcd&&Array[_0x1c64bf(0x1c1)](_0x17fdcd))for(const _0x2e9cf3 of _0x17fdcd){const _0x446aa8=_0x2e9cf3[_0x1c64bf(0x2dc)]('=');if(_0x446aa8===-0x1)return console[_0x1c64bf(0x19d)](_0x1c64bf(0x13b)+_0x2e9cf3),console[_0x1c64bf(0x19d)](_0x1c64bf(0x297)),0x1;const _0x49db82=_0x2e9cf3['substring'](0x0,_0x446aa8),_0x2c1ff6=_0x2e9cf3[_0x1c64bf(0x141)](_0x446aa8+0x1);try{_0x3f4613[_0x49db82]=JSON['parse'](_0x2c1ff6);}catch{_0x3f4613[_0x49db82]=_0x2c1ff6;}}_0x38ec5d['verbose']&&(console[_0x1c64bf(0x19d)](_0x1c64bf(0x237)+_0x355cb8),Object[_0x1c64bf(0x1b0)](_0x3f4613)[_0x1c64bf(0x1d4)]>0x0&&console['error'](_0x1c64bf(0x259)+JSON['stringify'](_0x3f4613)),_0x48d222&&console[_0x1c64bf(0x19d)](_0x1c64bf(0x1e3)+_0x48d222));if(_0x38ec5d[_0x1c64bf(0x241)])return await this[_0x1c64bf(0x199)](_0x383fea,_0x355cb8,_0x3f4613,_0x48d222);const _0x342fa8=await withSpinner(_0x1c64bf(0x197),()=>_0x4b6908['workflow'][_0x1c64bf(0x1f4)](_0x355cb8,_0x3f4613,{'sessionTime':_0x48d222}),{'verbose':_0x38ec5d[_0x1c64bf(0x1c8)]}),_0x7a6779=_0x342fa8['data'];console[_0x1c64bf(0x19d)](_0x1c64bf(0x2b2)),console[_0x1c64bf(0x19d)]('\x20\x20Attempt\x20ID:\x20'+_0x7a6779['id']),console['error'](_0x1c64bf(0x1b8)+_0x7a6779[_0x1c64bf(0x163)]),console['error'](_0x1c64bf(0x24e)+_0x7a6779[_0x1c64bf(0x275)]?.[_0x1c64bf(0x1b7)]),console['error']('\x20\x20Workflow:\x20'+_0x7a6779[_0x1c64bf(0x13f)]?.[_0x1c64bf(0x1b7)]);if(_0x7a6779['project']?.['id']&&_0x7a6779[_0x1c64bf(0x163)]&&_0x7a6779['id']){const _0x135426=_0x38ec5d[_0x1c64bf(0x249)],_0x50a7ac=getConsoleUrl(_0x135426,'/app/workflows/'+_0x7a6779['project']['id']+'/sessions/'+_0x7a6779[_0x1c64bf(0x163)]+_0x1c64bf(0x205)+_0x7a6779['id']);console[_0x1c64bf(0x19d)]('\x20\x20Console:\x20'+a56_0x3e0f1d['cyan'](_0x50a7ac));}return 0x0;}async[a56_0x4d17f9(0x199)](_0x2220f1,_0x828c53,_0x7b5b21,_0x8b1f82){const _0xc35757=a56_0x4d17f9,{options:_0x3d7bb9,tdx:_0x2361c9}=_0x2220f1,_0x575f01=await withSpinner(_0xc35757(0x2a2)+_0x828c53+_0xc35757(0x17a),()=>_0x2361c9[_0xc35757(0x13f)][_0xc35757(0x20c)](_0x828c53),{'verbose':_0x3d7bb9[_0xc35757(0x1c8)]}),_0x552d4f=_0x575f01['data'],_0x5514ec=_0x8b1f82??new Date()['toISOString']();console[_0xc35757(0x221)](a56_0x3e0f1d[_0xc35757(0x2d2)](_0xc35757(0x1eb)),_0x828c53),console['log'](a56_0x3e0f1d[_0xc35757(0x2d2)](_0xc35757(0x217)),_0x5514ec),console[_0xc35757(0x221)](a56_0x3e0f1d[_0xc35757(0x2d2)](_0xc35757(0x2ea)),JSON[_0xc35757(0x2e3)](_0x7b5b21)),console[_0xc35757(0x221)](''),console[_0xc35757(0x221)](a56_0x3e0f1d[_0xc35757(0x2d2)](_0xc35757(0x283)));const _0x42404e=parseTaskGraph(_0x552d4f[_0xc35757(0x1a1)]??null);if(_0x42404e['length']===0x0)console[_0xc35757(0x221)](a56_0x3e0f1d[_0xc35757(0x1f9)](_0xc35757(0x168)));else for(const _0x54e30d of formatTaskGraph(_0x42404e)){console['log'](_0x54e30d);}const _0x3022a3=summarizeTaskGraph(_0x42404e),_0x360ef4=formatWarningSummary(_0x3022a3);return _0x360ef4&&(console[_0xc35757(0x221)](''),console[_0xc35757(0x221)](a56_0x3e0f1d[_0xc35757(0x2a8)](_0x360ef4))),console[_0xc35757(0x221)](a56_0x3e0f1d['yellow']('\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.')),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x12d);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x242);async[a56_0x4d17f9(0x25e)](_0x385f57){const _0x14d71b=a56_0x4d17f9,{options:_0x597c0f,args:_0x14eb9f,tdx:_0x2b3a8b}=_0x385f57,_0xae64cd=_0x14eb9f[0x0],_0x293205=_0x14eb9f[0x1]||'.';if(!_0xae64cd)return console[_0x14d71b(0x19d)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x14d71b(0x161)),0x1;const _0x392ad5=_0x597c0f[_0x14d71b(0x15a)];_0x597c0f['verbose']&&(console[_0x14d71b(0x19d)](_0x14d71b(0x26e)+_0xae64cd),console[_0x14d71b(0x19d)](_0x14d71b(0x267)+_0x293205),_0x392ad5&&console[_0x14d71b(0x19d)](_0x14d71b(0x18e)+_0x392ad5));const _0x292156=await withSpinner(_0x14d71b(0x224)+_0xae64cd+'...',()=>_0x2b3a8b[_0x14d71b(0x13f)][_0x14d71b(0x284)](_0xae64cd,_0x293205,{'revision':_0x392ad5}),{'verbose':_0x597c0f['verbose']}),_0x598be2=_0x292156['data'];return console[_0x14d71b(0x19d)]('✔\x20Downloaded\x20'+_0x598be2[_0x14d71b(0x2d5)]),console[_0x14d71b(0x19d)]('\x20\x20Revision:\x20'+_0x598be2['revision']),console[_0x14d71b(0x19d)](_0x14d71b(0x27e)+_0x598be2[_0x14d71b(0x125)]),console['error'](_0x14d71b(0x1d2)+_0x293205+'/'+_0x598be2['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]='workflow:upload';[a56_0x4d17f9(0x155)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)';async['execute'](_0x4a5c22){const _0x5dd4b2=a56_0x4d17f9,{options:_0x556ded,args:_0xa7ea4b,tdx:_0x1a48fc}=_0x4a5c22;let _0xb98287='.',_0x22a480=_0x556ded[_0x5dd4b2(0x1b7)];if(_0xa7ea4b[0x0]){const {promises:_0x3fbebb}=await import('fs');try{const _0x186bd8=await _0x3fbebb[_0x5dd4b2(0x208)](_0xa7ea4b[0x0]);if(_0x186bd8[_0x5dd4b2(0x2a7)]())_0xb98287=_0xa7ea4b[0x0];else return console['error'](_0x5dd4b2(0x15f)+_0xa7ea4b[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x22a480=_0xa7ea4b[0x0],_0xb98287='.';}}const _0x3b27f2=_0x556ded[_0x5dd4b2(0x15a)],_0xb150cc=_0x556ded[_0x5dd4b2(0x1e0)];_0x556ded[_0x5dd4b2(0x1c8)]&&(console[_0x5dd4b2(0x19d)]('Project\x20directory:\x20'+_0xb98287),_0x22a480&&console[_0x5dd4b2(0x19d)](_0x5dd4b2(0x133)+_0x22a480),_0x3b27f2&&console[_0x5dd4b2(0x19d)](_0x5dd4b2(0x18e)+_0x3b27f2),_0xb150cc&&console[_0x5dd4b2(0x19d)]('Validation:\x20skipped'));const _0x5db0af=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x1a48fc[_0x5dd4b2(0x13f)][_0x5dd4b2(0x250)](_0xb98287,{'projectName':_0x22a480,'revision':_0x3b27f2,'skipValidation':_0xb150cc}),{'verbose':_0x556ded[_0x5dd4b2(0x1c8)]}),_0x11b2a9=_0x5db0af['data'];return console[_0x5dd4b2(0x19d)]('✔\x20Pushed\x20'+_0x11b2a9[_0x5dd4b2(0x2d5)]),console[_0x5dd4b2(0x19d)](_0x5dd4b2(0x28f)+_0x11b2a9['projectId']),console[_0x5dd4b2(0x19d)](_0x5dd4b2(0x235)+_0x11b2a9[_0x5dd4b2(0x15a)]),await this['showWorkflowConsoleUrl'](_0x1a48fc,_0x11b2a9[_0x5dd4b2(0x2d5)],_0x556ded[_0x5dd4b2(0x249)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x2b6);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x2af);async[a56_0x4d17f9(0x25e)](_0x2946e5){const _0x22cf0b=a56_0x4d17f9,{options:_0x58348e,args:_0x1cffa7,tdx:_0x5e56aa}=_0x2946e5,_0x3a9aa8=_0x1cffa7[0x0],_0x5a41f0=_0x1cffa7[0x1];if(!_0x3a9aa8)return console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x2d7)](_0x22cf0b(0x244)),_0x22cf0b(0x1bc)),console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x1f9)]('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x57a898=_0x58348e[_0x22cf0b(0x15a)];_0x58348e[_0x22cf0b(0x1c8)]&&(console[_0x22cf0b(0x19d)](_0x22cf0b(0x26e)+_0x3a9aa8),_0x5a41f0&&console['error'](_0x22cf0b(0x230)+_0x5a41f0),_0x57a898&&console[_0x22cf0b(0x19d)](_0x22cf0b(0x18e)+_0x57a898),_0x58348e[_0x22cf0b(0x241)]&&console[_0x22cf0b(0x19d)](_0x22cf0b(0x1e9)));const _0x3e5ee5=await withSpinner(_0x22cf0b(0x227)+_0x3a9aa8+'...',()=>_0x5e56aa[_0x22cf0b(0x13f)]['pullProject'](_0x3a9aa8,{'targetDir':_0x5a41f0,'revision':_0x57a898}),{'verbose':_0x58348e['verbose']}),_0xaad3c6=_0x3e5ee5['data'];_0xaad3c6[_0x22cf0b(0x298)]?console[_0x22cf0b(0x19d)](_0x22cf0b(0x13d)+_0xaad3c6[_0x22cf0b(0x2d5)]):console[_0x22cf0b(0x19d)](_0x22cf0b(0x1cc)+_0xaad3c6[_0x22cf0b(0x2d5)]);console[_0x22cf0b(0x19d)](_0x22cf0b(0x235)+_0xaad3c6[_0x22cf0b(0x15a)]),console['error']('\x20\x20Target:\x20'+(a56_0x1d0c78[_0x22cf0b(0x2ce)](process[_0x22cf0b(0x2ca)](),_0xaad3c6[_0x22cf0b(0x22a)])||'.')),console[_0x22cf0b(0x19d)](_0x22cf0b(0x1a6)+a56_0x3e0f1d[_0x22cf0b(0x182)]('+'+_0xaad3c6[_0x22cf0b(0x291)]['new']+_0x22cf0b(0x1c5))+',\x20'+(a56_0x3e0f1d[_0x22cf0b(0x2a8)]('~'+_0xaad3c6[_0x22cf0b(0x291)][_0x22cf0b(0x216)]+_0x22cf0b(0x2d3))+',\x20')+(a56_0x3e0f1d[_0x22cf0b(0x2d7)]('-'+_0xaad3c6[_0x22cf0b(0x291)][_0x22cf0b(0x1fa)]+'\x20deleted')+',\x20')+(''+a56_0x3e0f1d[_0x22cf0b(0x1f9)](_0xaad3c6[_0x22cf0b(0x291)][_0x22cf0b(0x29b)]+'\x20unchanged')));for(const _0x125ab9 of _0xaad3c6[_0x22cf0b(0x215)]){_0x125ab9['type']===_0x22cf0b(0x216)&&_0x125ab9['diff']&&(console[_0x22cf0b(0x19d)]('\x0a'+a56_0x3e0f1d[_0x22cf0b(0x222)](_0x22cf0b(0x17b)+_0x125ab9[_0x22cf0b(0x12f)])),console['error'](_0x125ab9['diff']));}if(!_0xaad3c6[_0x22cf0b(0x1d5)])return saveSessionContext({'workflow_project':_0xaad3c6['projectName']},_0x58348e['session']),console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x182)](_0x22cf0b(0x2ec))),console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x1f9)](_0x22cf0b(0x1ef)+_0xaad3c6[_0x22cf0b(0x2d5)])),0x0;if(_0x58348e['dryRun'])return console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x2a8)](_0x22cf0b(0x285))),0x0;if(!_0x58348e[_0x22cf0b(0x179)]){if(!isInteractive())return console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x2d7)](_0x22cf0b(0x1f3)),_0x22cf0b(0x1a7)),console['error'](a56_0x3e0f1d['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2670bc=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x2670bc)return console['error'](a56_0x3e0f1d['yellow']('Cancelled'),_0x22cf0b(0x263)),0x1;}await withSpinner(_0x22cf0b(0x206),()=>_0x5e56aa['workflow'][_0x22cf0b(0x2b4)](_0xaad3c6,{'revision':_0x57a898}),{'verbose':_0x58348e[_0x22cf0b(0x1c8)]}),saveSessionContext({'workflow_project':_0xaad3c6[_0x22cf0b(0x2d5)]},_0x58348e[_0x22cf0b(0x1c9)]),console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x182)](_0x22cf0b(0x27f)));const _0x46fa9d=a56_0x1d0c78[_0x22cf0b(0x2ce)](process[_0x22cf0b(0x2ca)](),_0xaad3c6[_0x22cf0b(0x22a)])||'.';return console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x1f9)]('\x20\x20Location:\x20'+_0x46fa9d)),console[_0x22cf0b(0x19d)](a56_0x3e0f1d[_0x22cf0b(0x1f9)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0xaad3c6['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x2f3);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x2f0);async[a56_0x4d17f9(0x25e)](_0x1cd24e){const _0x43e162=a56_0x4d17f9,{options:_0x5d3ed0,args:_0x1c958b,tdx:_0x210221}=_0x1cd24e,_0x490d15=this[_0x43e162(0x181)](_0x1c958b,_0x5d3ed0),_0x3e2647=_0x5d3ed0,{revision:_0x33f352,skipValidation:_0x4108a8,backfill:_0x5ac58e}=_0x3e2647,_0xbd5640=_0x5ac58e===undefined?undefined:!_0x5ac58e;_0x5d3ed0[_0x43e162(0x1c8)]&&(_0x490d15&&console['error'](_0x43e162(0x136)+_0x490d15),_0x33f352&&console['error']('Revision:\x20'+_0x33f352),_0x5d3ed0['dryRun']&&console['error']('Dry\x20run:\x20yes'),_0x4108a8&&console['error'](_0x43e162(0x24b)),_0x5ac58e&&console[_0x43e162(0x19d)](_0x43e162(0x2eb)));let _0x524dc0;try{_0x524dc0=await withSpinner(_0x43e162(0x2f9),()=>_0x210221[_0x43e162(0x13f)]['preparePushProject']({'sourceDir':_0x490d15,'revision':_0x33f352,'skipValidation':_0x4108a8,'skipSchedule':_0xbd5640}),{'verbose':_0x5d3ed0[_0x43e162(0x1c8)]});}catch(_0x1639e7){if(_0x1639e7 instanceof Error&&_0x1639e7[_0x43e162(0x1c3)][_0x43e162(0x2de)](_0x43e162(0x177)))return console[_0x43e162(0x19d)](a56_0x3e0f1d[_0x43e162(0x2d7)](_0x43e162(0x244)),_0x43e162(0x272)),_0x5d3ed0[_0x43e162(0x1e4)]?console[_0x43e162(0x19d)](a56_0x3e0f1d['dim']('Tip:\x20cd\x20to\x20workflows/'+_0x5d3ed0[_0x43e162(0x1e4)]+_0x43e162(0x14d)+_0x5d3ed0[_0x43e162(0x1e4)]+'\x27')):console[_0x43e162(0x19d)](a56_0x3e0f1d[_0x43e162(0x1f9)](_0x43e162(0x18d))),0x1;throw _0x1639e7;}const _0x4ee5ef=_0x524dc0[_0x43e162(0x126)];console['error'](_0x43e162(0x218)+_0x4ee5ef[_0x43e162(0x2d5)]),console[_0x43e162(0x19d)](_0x43e162(0x28b)+_0x4ee5ef['sourceDir']),console[_0x43e162(0x19d)](_0x43e162(0x235)+_0x4ee5ef[_0x43e162(0x15a)]),console[_0x43e162(0x19d)](_0x43e162(0x1a6)+a56_0x3e0f1d[_0x43e162(0x182)]('+'+_0x4ee5ef[_0x43e162(0x291)]['new']+'\x20new')+',\x20'+(a56_0x3e0f1d[_0x43e162(0x2a8)]('~'+_0x4ee5ef[_0x43e162(0x291)]['modified']+_0x43e162(0x2d3))+',\x20')+(a56_0x3e0f1d['red']('-'+_0x4ee5ef[_0x43e162(0x291)][_0x43e162(0x1fa)]+'\x20deleted')+',\x20')+(''+a56_0x3e0f1d['dim'](_0x4ee5ef['summary'][_0x43e162(0x29b)]+'\x20unchanged')));for(const _0x51417e of _0x4ee5ef[_0x43e162(0x215)]){_0x51417e['type']===_0x43e162(0x216)&&_0x51417e[_0x43e162(0x166)]&&(console[_0x43e162(0x19d)]('\x0a'+a56_0x3e0f1d[_0x43e162(0x222)](_0x43e162(0x17b)+_0x51417e[_0x43e162(0x12f)])),console[_0x43e162(0x19d)](_0x51417e[_0x43e162(0x166)]));}if(!_0x4ee5ef[_0x43e162(0x1d5)])return console['error'](a56_0x3e0f1d['green'](_0x43e162(0x148))),await this[_0x43e162(0x2b1)](_0x210221,_0x4ee5ef[_0x43e162(0x2d5)],_0x5d3ed0['site']),0x0;if(_0x5d3ed0['dryRun'])return console['error'](a56_0x3e0f1d[_0x43e162(0x2a8)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x5d3ed0[_0x43e162(0x179)]){if(!isInteractive())return console['error'](a56_0x3e0f1d['red'](_0x43e162(0x1f3)),_0x43e162(0x1a7)),console[_0x43e162(0x19d)](a56_0x3e0f1d[_0x43e162(0x1f9)](_0x43e162(0x24a))),0x1;const _0x15a883=await confirmKey(_0x43e162(0x12c));if(!_0x15a883)return console[_0x43e162(0x19d)](a56_0x3e0f1d[_0x43e162(0x2a8)]('Cancelled'),'-\x20nothing\x20pushed'),0x1;}const _0x131c08=await withSpinner('Pushing\x20project...',()=>_0x210221['workflow'][_0x43e162(0x172)](_0x4ee5ef),{'verbose':_0x5d3ed0['verbose']}),_0x14632b=_0x131c08[_0x43e162(0x126)];return console[_0x43e162(0x19d)](a56_0x3e0f1d[_0x43e162(0x182)]('✔\x20Push\x20complete')),console[_0x43e162(0x19d)]('\x20\x20Project\x20ID:\x20'+_0x14632b[_0x43e162(0x292)]),console['error'](_0x43e162(0x235)+_0x14632b['revision']),await this[_0x43e162(0x2b1)](_0x210221,_0x14632b[_0x43e162(0x2d5)],_0x5d3ed0[_0x43e162(0x249)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]='workflow:clone';['description']=a56_0x4d17f9(0x2d1);async[a56_0x4d17f9(0x25e)](_0x4abc67){const _0x91b46c=a56_0x4d17f9,{options:_0x28c0c5,args:_0x527d64,tdx:_0x163ffc}=_0x4abc67,_0x29b873=this[_0x91b46c(0x181)](_0x527d64,_0x28c0c5),_0x42def2=_0x28c0c5[_0x91b46c(0x1b7)],_0x307804=_0x28c0c5[_0x91b46c(0x15a)],_0x56a0b0=_0x28c0c5[_0x91b46c(0x1e0)];if(!_0x29b873)return console[_0x91b46c(0x19d)](a56_0x3e0f1d['red'](_0x91b46c(0x244)),_0x91b46c(0x153)),console[_0x91b46c(0x19d)](a56_0x3e0f1d[_0x91b46c(0x1f9)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x91b46c(0x19d)](a56_0x3e0f1d[_0x91b46c(0x1f9)](_0x91b46c(0x286))),0x1;if(!_0x42def2)return console[_0x91b46c(0x19d)](a56_0x3e0f1d[_0x91b46c(0x2d7)](_0x91b46c(0x244)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x91b46c(0x19d)](a56_0x3e0f1d[_0x91b46c(0x1f9)](_0x91b46c(0x12a))),0x1;_0x28c0c5[_0x91b46c(0x1c8)]&&(console['error'](_0x91b46c(0x136)+_0x29b873),console[_0x91b46c(0x19d)](_0x91b46c(0x142)+_0x42def2),_0x307804&&console['error'](_0x91b46c(0x18e)+_0x307804),_0x28c0c5[_0x91b46c(0x241)]&&console[_0x91b46c(0x19d)](_0x91b46c(0x1e9)),_0x56a0b0&&console[_0x91b46c(0x19d)](_0x91b46c(0x24b)));const _0x5ab3d9=await withSpinner(_0x91b46c(0x2e7),()=>_0x163ffc[_0x91b46c(0x13f)][_0x91b46c(0x256)](_0x29b873,_0x42def2,{'revision':_0x307804,'skipValidation':_0x56a0b0}),{'verbose':_0x28c0c5['verbose']}),_0x225ef2=_0x5ab3d9['data'];console['error'](_0x91b46c(0x1b6)+_0x225ef2['sourceDir']);_0x225ef2['sourceProjectName']&&console[_0x91b46c(0x19d)](_0x91b46c(0x2aa)+_0x225ef2[_0x91b46c(0x296)]);console[_0x91b46c(0x19d)](_0x91b46c(0x142)+_0x225ef2[_0x91b46c(0x293)]),console['error'](_0x91b46c(0x18e)+_0x225ef2[_0x91b46c(0x15a)]),console[_0x91b46c(0x19d)](_0x91b46c(0x20f)+_0x225ef2[_0x91b46c(0x265)]);_0x225ef2['targetExists']&&(console['error'](a56_0x3e0f1d['yellow'](_0x91b46c(0x25f)+_0x225ef2[_0x91b46c(0x293)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x225ef2['existingProjectId']+')')),console['error'](a56_0x3e0f1d[_0x91b46c(0x2a8)](_0x91b46c(0x2c7))));if(_0x28c0c5[_0x91b46c(0x241)])return console['error'](a56_0x3e0f1d['yellow'](_0x91b46c(0x132))),0x0;if(!_0x28c0c5[_0x91b46c(0x179)]){if(!isInteractive())return console['error'](a56_0x3e0f1d[_0x91b46c(0x2d7)](_0x91b46c(0x1f3)),_0x91b46c(0x1a7)),console[_0x91b46c(0x19d)](a56_0x3e0f1d[_0x91b46c(0x1f9)](_0x91b46c(0x24a))),0x1;const _0x3e36ff=_0x225ef2[_0x91b46c(0x296)]||a56_0x1d0c78[_0x91b46c(0x169)](_0x29b873),_0x493648=_0x225ef2['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x42def2+_0x91b46c(0x176):_0x91b46c(0x2f4)+_0x3e36ff+_0x91b46c(0x22e)+_0x42def2+'\x22?',_0x518b7a=await confirmKey(_0x493648);if(!_0x518b7a)return console['error'](a56_0x3e0f1d[_0x91b46c(0x2a8)]('Cancelled')),0x1;}const _0x5270f6=await withSpinner(_0x225ef2[_0x91b46c(0x13a)]?_0x91b46c(0x27c)+_0x42def2+_0x91b46c(0x17a):_0x91b46c(0x2bc)+_0x42def2+'...',()=>_0x163ffc['workflow'][_0x91b46c(0x229)](_0x225ef2),{'verbose':_0x28c0c5[_0x91b46c(0x1c8)]}),_0x572290=_0x5270f6['data'];return console['error'](a56_0x3e0f1d['green'](_0x225ef2['targetExists']?'✔\x20Project\x20updated':_0x91b46c(0x165))),console[_0x91b46c(0x19d)](_0x91b46c(0x24e)+_0x572290[_0x91b46c(0x293)]),console[_0x91b46c(0x19d)](_0x91b46c(0x28f)+_0x572290[_0x91b46c(0x248)]),console[_0x91b46c(0x19d)](_0x91b46c(0x235)+_0x572290[_0x91b46c(0x15a)]),await this[_0x91b46c(0x2b1)](_0x163ffc,_0x572290[_0x91b46c(0x293)],_0x28c0c5['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x1e2);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x12b);async[a56_0x4d17f9(0x25e)](_0x1a331d){const _0x3f4e37=a56_0x4d17f9,{options:_0x43e240,args:_0x550f77,tdx:_0x301753}=_0x1a331d,_0x337d8b=_0x550f77[0x0];if(!_0x337d8b)return console['error'](_0x3f4e37(0x269)),console[_0x3f4e37(0x19d)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x43e240[_0x3f4e37(0x1c8)]&&console[_0x3f4e37(0x19d)](_0x3f4e37(0x26e)+_0x337d8b);if(!_0x43e240[_0x3f4e37(0x179)]){if(!isInteractive())return console[_0x3f4e37(0x19d)](a56_0x3e0f1d['red'](_0x3f4e37(0x1f3)),_0x3f4e37(0x1a7)),console[_0x3f4e37(0x19d)](a56_0x3e0f1d['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x57b4b9=await confirmKey(_0x3f4e37(0x1b3)+_0x337d8b+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x57b4b9)return console['error'](a56_0x3e0f1d[_0x3f4e37(0x2a8)](_0x3f4e37(0x14e))),0x1;}const _0x116754=await withSpinner(_0x3f4e37(0x23d)+_0x337d8b+'...',()=>_0x301753[_0x3f4e37(0x13f)][_0x3f4e37(0x2a4)](_0x337d8b),{'verbose':_0x43e240['verbose']}),_0x20ec47=_0x116754[_0x3f4e37(0x126)];return console[_0x3f4e37(0x19d)](_0x3f4e37(0x2db)+_0x20ec47['projectName']),console[_0x3f4e37(0x19d)](_0x3f4e37(0x28f)+_0x20ec47[_0x3f4e37(0x292)]),0x0;}}export function parseKeyValue(_0x613b10){const _0x307e81=a56_0x4d17f9,_0x10fc79=_0x613b10[_0x307e81(0x2dc)]('=');if(_0x10fc79===-0x1)throw new Error(_0x307e81(0x273)+_0x613b10+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x111475=_0x613b10[_0x307e81(0x141)](0x0,_0x10fc79),_0x4b0562=_0x613b10[_0x307e81(0x141)](_0x10fc79+0x1);if(!_0x111475)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x111475,'value':_0x4b0562};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x129);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x1c6);async[a56_0x4d17f9(0x25e)](_0x1088e1){const _0x46b677=a56_0x4d17f9,{options:_0x4c98a3,args:_0x1f0c38,tdx:_0x1e8d03}=_0x1088e1,_0x191ada=this['requireProject'](_0x1f0c38,_0x4c98a3);if(!_0x191ada)return 0x1;_0x4c98a3[_0x46b677(0x1c8)]&&console['error'](_0x46b677(0x26e)+_0x191ada);const _0x1fe64d=await withSpinner(_0x46b677(0x2b8),()=>_0x1e8d03[_0x46b677(0x13f)][_0x46b677(0x243)](_0x191ada),{'verbose':_0x4c98a3[_0x46b677(0x1c8)]}),{secrets:_0x1cbffc}=_0x1fe64d['data'];return console['error'](_0x46b677(0x233)+_0x1cbffc[_0x46b677(0x1d4)]+'\x20secret'+(_0x1cbffc[_0x46b677(0x1d4)]!==0x1?'s':'')),await handleSDKOutput(_0x1cbffc,_0x4c98a3),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x247);['description']=a56_0x4d17f9(0x1fb);async[a56_0x4d17f9(0x25e)](_0x42e988){const _0x3951a9=a56_0x4d17f9,{options:_0x50b654,args:_0x2105e4,tdx:_0x2527b5}=_0x42e988;let _0xfe2da5,_0x1b243b;if(_0x2105e4[_0x3951a9(0x1d4)]>=0x1&&!_0x2105e4[0x0]['includes']('='))_0xfe2da5=_0x2105e4[0x0],_0x1b243b=_0x2105e4[_0x3951a9(0x2bb)](0x1);else{if(_0x2105e4[_0x3951a9(0x1d4)]>=0x1&&_0x50b654[_0x3951a9(0x1e4)])_0xfe2da5=_0x50b654[_0x3951a9(0x1e4)],_0x1b243b=_0x2105e4;else return _0x2105e4['length']>=0x1?(console[_0x3951a9(0x19d)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x3951a9(0x19d)](_0x3951a9(0x24d)),0x1):(console[_0x3951a9(0x19d)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console['error'](_0x3951a9(0x28d)),0x1);}if(_0x1b243b[_0x3951a9(0x1d4)]===0x0)return console[_0x3951a9(0x19d)](_0x3951a9(0x162)),console[_0x3951a9(0x19d)](_0x3951a9(0x28d)),0x1;const _0x4f7b5f={};try{for(const _0x19fa7a of _0x1b243b){const {key:_0x503675,value:_0x4bacf6}=parseKeyValue(_0x19fa7a);_0x4f7b5f[_0x503675]=_0x4bacf6;}}catch(_0x5b66d7){return _0x5b66d7 instanceof Error&&console[_0x3951a9(0x19d)](a56_0x3e0f1d[_0x3951a9(0x2d7)]('Error:'),_0x5b66d7[_0x3951a9(0x1c3)]),0x1;}const _0x14d8c4=Object[_0x3951a9(0x1b0)](_0x4f7b5f);_0x50b654[_0x3951a9(0x1c8)]&&(console[_0x3951a9(0x19d)](_0x3951a9(0x26e)+_0xfe2da5),console['error'](_0x3951a9(0x232)+_0x14d8c4[_0x3951a9(0x278)](',\x20')));const _0x4f5f3f=await withSpinner(_0x14d8c4[_0x3951a9(0x1d4)]===0x1?_0x3951a9(0x2ee):_0x3951a9(0x17f)+_0x14d8c4[_0x3951a9(0x1d4)]+_0x3951a9(0x13e),()=>_0x2527b5[_0x3951a9(0x13f)][_0x3951a9(0x277)](_0xfe2da5,_0x4f7b5f),{'verbose':_0x50b654[_0x3951a9(0x1c8)]}),_0x2cfd7a=_0x4f5f3f['data'];return console['error'](_0x14d8c4['length']===0x1?_0x3951a9(0x194)+_0x2cfd7a[_0x3951a9(0x1b0)][0x0]+_0x3951a9(0x23f)+_0x2cfd7a[_0x3951a9(0x2d5)]+'\x27':'✔\x20'+_0x2cfd7a[_0x3951a9(0x1b0)][_0x3951a9(0x1d4)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x2cfd7a['projectName']+'\x27'),(_0x50b654[_0x3951a9(0x257)]||_0x50b654['jsonl'])&&await handleSingleObjectOutput(_0x2cfd7a,_0x50b654),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a56_0x4d17f9(0x27b);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x2c1);async[a56_0x4d17f9(0x25e)](_0xbdeb99){const _0x573540=a56_0x4d17f9,{options:_0x17620a,args:_0x472c12,tdx:_0x2ce78a}=_0xbdeb99;let _0x28a3c8,_0x4ac6ff;if(_0x472c12[_0x573540(0x1d4)]>=0x2)_0x28a3c8=_0x472c12[0x0],_0x4ac6ff=_0x472c12[0x1];else{if(_0x472c12[_0x573540(0x1d4)]===0x1&&_0x17620a[_0x573540(0x1e4)])_0x28a3c8=_0x17620a[_0x573540(0x1e4)],_0x4ac6ff=_0x472c12[0x0];else return _0x472c12[_0x573540(0x1d4)]===0x1?(console[_0x573540(0x19d)](_0x573540(0x158)),console[_0x573540(0x19d)](_0x573540(0x24d)),0x1):(console[_0x573540(0x19d)]('Error:\x20Secret\x20key\x20is\x20required'),console[_0x573540(0x19d)](_0x573540(0x1ed)),0x1);}_0x17620a[_0x573540(0x1c8)]&&(console[_0x573540(0x19d)]('Project:\x20'+_0x28a3c8),console['error'](_0x573540(0x21c)+_0x4ac6ff));if(!_0x17620a[_0x573540(0x179)]){if(!isInteractive())return console[_0x573540(0x19d)](a56_0x3e0f1d[_0x573540(0x2d7)]('\x0aError:'),_0x573540(0x1a7)),console[_0x573540(0x19d)](a56_0x3e0f1d['dim'](_0x573540(0x24a))),0x1;const _0x17a074=await confirmKey(_0x573540(0x26a)+_0x4ac6ff+'\x27\x20from\x20project\x20\x27'+_0x28a3c8+'\x27?');if(!_0x17a074)return console[_0x573540(0x19d)](a56_0x3e0f1d['yellow'](_0x573540(0x14e))),0x1;}const _0x38afe5=await withSpinner(_0x573540(0x17c),()=>_0x2ce78a[_0x573540(0x13f)][_0x573540(0x1a3)](_0x28a3c8,_0x4ac6ff),{'verbose':_0x17620a[_0x573540(0x1c8)]}),_0x2d8c0d=_0x38afe5[_0x573540(0x126)];return console[_0x573540(0x19d)](_0x573540(0x194)+_0x2d8c0d[_0x573540(0x152)]+_0x573540(0x27d)+_0x2d8c0d[_0x573540(0x2d5)]+'\x27'),(_0x17620a['json']||_0x17620a[_0x573540(0x2f5)])&&await handleSingleObjectOutput(_0x2d8c0d,_0x17620a),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(_0x430344){const _0x4cbbe4=a56_0x4d17f9,_0x4df1c1=Math[_0x4cbbe4(0x1f8)](_0x430344/0x3e8),_0x4880b2=Math['floor'](_0x4df1c1/0x3c),_0x13d2f5=Math[_0x4cbbe4(0x1f8)](_0x4880b2/0x3c),_0x362d68=Math[_0x4cbbe4(0x1f8)](_0x13d2f5/0x18);if(_0x362d68>0x0){const _0x21aef9=_0x13d2f5%0x18;return _0x21aef9>0x0?_0x362d68+'d\x20'+_0x21aef9+'h':_0x362d68+'d';}else{if(_0x13d2f5>0x0){const _0x47eb18=_0x4880b2%0x3c;return _0x47eb18>0x0?_0x13d2f5+'h\x20'+_0x47eb18+'m':_0x13d2f5+'h';}else{if(_0x4880b2>0x0){const _0x5af1ff=_0x4df1c1%0x3c;return _0x5af1ff>0x0?_0x4880b2+'m\x20'+_0x5af1ff+'s':_0x4880b2+'m';}else return _0x4df1c1+'s';}}}function formatTimestamp(_0x30d652,_0x8090ea){const _0x39738d=a56_0x4d17f9,_0xcc795f=new Date(_0x30d652),_0x1ba6f9=String(_0xcc795f[_0x39738d(0x28c)]())[_0x39738d(0x14b)](0x2,'0'),_0x454d4f=String(_0xcc795f[_0x39738d(0x1a0)]())['padStart'](0x2,'0'),_0x16de84=_0x1ba6f9+':'+_0x454d4f,_0x3b41f4=_0xcc795f[_0x39738d(0x2e9)]()===_0x8090ea[_0x39738d(0x2e9)]()&&_0xcc795f['getMonth']()===_0x8090ea[_0x39738d(0x2e8)]()&&_0xcc795f[_0x39738d(0x1f0)]()===_0x8090ea[_0x39738d(0x1f0)]();if(_0x3b41f4)return _0x16de84;else{const _0x130fa6=String(_0xcc795f[_0x39738d(0x2e8)]()+0x1)[_0x39738d(0x14b)](0x2,'0'),_0x2e0b39=String(_0xcc795f[_0x39738d(0x1f0)]())[_0x39738d(0x14b)](0x2,'0');return _0x130fa6+'-'+_0x2e0b39+'\x20'+_0x16de84;}}function formatDate(_0x3a1c95){const _0x2debe1=a56_0x4d17f9,_0x3667f6=_0x3a1c95[_0x2debe1(0x2e9)](),_0x84591b=String(_0x3a1c95[_0x2debe1(0x2e8)]()+0x1)[_0x2debe1(0x14b)](0x2,'0'),_0x337bdc=String(_0x3a1c95[_0x2debe1(0x1f0)]())[_0x2debe1(0x14b)](0x2,'0');return _0x3667f6+'-'+_0x84591b+'-'+_0x337bdc;}function getTaskStateIcon(_0x2e6cdf){const _0x3868aa={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x3868aa[_0x2e6cdf]||'⚪';}function a56_0x1da5(){const _0x493098=['No\x20attempts\x20found\x20in\x20project:\x20','from','skipSchedule','Error:\x20','Select\x20a\x20workflow\x20to\x20run','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','sessionId','Listing\x20schedules\x20for\x20','✔\x20Clone\x20complete','diff','parseProjectWorkflowPattern','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','basename','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','From\x20task:\x20','Getting\x20attempt\x20details...','List\x20workflow\x20attempts','params','Disabling\x20schedule\x20#','\x20workflow','some','executePushProject','generateSessionTimelineRows','✔\x20Showing\x20','columns','\x22\x20with\x20new\x20revision?','No\x20workflow\x20tdx.json\x20found','output','yes','...','---\x20','Deleting\x20secret...','retryAttemptName','fullName','Setting\x20','resolveProject','resolveProjectDir','green','No\x20projects\x20match\x20pattern:\x20','task','Listing\x20schedules...','createdAt','Listing\x20workflow\x20sessions...','\x20\x20Console:\x20','✔\x20Schedule\x20found','Listing\x20workflow\x20projects...','write','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Revision:\x20','Fetching\x20schedule\x20#','isTTY','every','Session\x20','\x20(system)','✔\x20Secret\x20\x27','fill','\x0aPolling...\x20(','Starting\x20workflow\x20run...','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','executeDryRun','Attempt:\x20','filter','getTime','error','POLL_INTERVAL_MS','✔\x20Schedule\x20#','getMinutes','config','retryAttempt','deleteSecret','disableSchedule','index','\x20\x20Changes:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','parse','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','startTime','\x20to\x20see\x20detailed\x20logs','end','metadata','revision:\x20','replace','keys','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','window','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','format','Select\x20a\x20task\x20to\x20view\x20logs:','Source:\x20','name','\x20\x20Session\x20ID:\x20','splice','size','Retrying\x20attempt...','Project\x20name\x20is\x20required','renderTimeline','\x20attempt','✔\x20Retry\x20started','14AvGmpy','isArray','listProjectSchedules','message','Downloading\x20logs...','\x20new','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','disabledAt','verbose','session','💡\x20Tip:\x20Use\x20','table','→\x20Project:\x20','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','resumeFrom','Show\x20logs\x20for\x20a\x20workflow\x20attempt','5bOKBYM','Including\x20subtasks:\x20yes','\x20\x20Location:\x20','Force:\x20yes','length','hasChanges','msPerChar','includeSubtasks','limit','LABEL_MIN_SPACING','rows','list','tasks','ICON_WIDTH','Total:\x20','MAX_TIMELINE_WIDTH','skipValidation','Loading\x20session...','workflow:delete','Session\x20time:\x20','workflowProject','duration','LABEL_WIDTH_DIVISOR','Filter:\x20project=','toISOString','Dry\x20run:\x20yes','attempt:','Workflow:','getSchedule','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Listing\x20workflows...','\x20\x20Session\x20context\x20set\x20to:\x20','getDate','\x1b[1A\x1b[2K','workflow:kill','\x0aError:','run','updatedAt','TASK_NAME_WIDTH','MAX_LABEL_COUNT','floor','dim','deleted','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','kill','workflow:schedule:disable','ICON_SPACING','\x20sessions\x20','match','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','lastAttempt','done','enableSchedule','/attempt/','Writing\x20files...','\x20logs','stat','2328912gloRJP','renderSessionsTimeline','values','getWorkflow','\x20from\x20session\x20','workflow:use','Files\x20to\x20upload:\x20','workflow:run','trimEnd','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','\x20disabled\x20(','sort','changes','modified','Session\x20time:','✔\x20Project:\x20','No\x20workflows\x20found\x20in\x20project:\x20','nextRunTime','workflow:attempts','Key:\x20','\x20(use\x20--limit\x20to\x20show\x20more)','\x20has\x20no\x20attempts','status','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','log','cyan','Resolving\x20project\x20\x27','Downloading\x20project\x20','(use\x20--limit\x20to\x20see\x20more)','Usage:\x20tdx\x20wf\x20use\x20<project>','Pulling\x20project\x20','Getting\x20attempt\x20tasks...','executeCloneProject','targetDir','unknown','force','Auto-selected\x20latest\x20session:\x20','\x22\x20to\x20new\x20project\x20\x22','workflow:timeline','Target\x20directory:\x20','localeCompare','Secrets\x20to\x20set:\x20','✔\x20Found\x20','get','\x20\x20Revision:\x20','attemptId','Workflow:\x20','7310204vyPoNk','No\x20attempts\x20found\x20for:\x20','session:','\x20next:\x20','1bUzvGH','Deleting\x20project\x20','nextTime','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','\x27...','dryRun','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','listSecrets','Error:','follow','sessions','workflow:secrets:set','newProjectId','site','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Validation:\x20skipped','pending','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20\x20Project:\x20','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','push','attempts','find','round','\x0a✔\x20Attempt\x20complete','sessionTime','prepareCloneProject','json','param','Parameters:\x20','workflowName','\x20tasks','MAX_TASKS_DISPLAY','now','execute','\x0a⚠\x20Project\x20\x22','utf-8','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','cancelRequested','-\x20no\x20files\x20written','Resume\x20from:\x20','fileCount','attempt','Output\x20directory:\x20','Task\x20name:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20project','Project:\x20','set','listSchedules','Status:\x20','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Invalid\x20format:\x20','No\x20schedules\x20found','project',',\x20Workflow:\x20','setSecrets','join','navigateSessionsInteractive','Kill\x20a\x20running\x20attempt','workflow:secrets:delete','Updating\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x20\x20Files\x20extracted:\x20','✔\x20Pull\x20complete','fs/promises','fileSize','planned','Task\x20graph:','download','\x0aDry\x20run\x20-\x20no\x20files\x20written','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Listing\x20workflow\x20attempts...','Select\x20a\x20session\x20to\x20view\x20timeline:','workflow:sessions','870300mtwbVx','\x20\x20Source:\x20','getHours','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','✔\x20Workflow\x20project\x20set\x20to:\x20','\x20\x20Project\x20ID:\x20','⚠\x20Showing\x20first\x20','summary','projectId','newProjectName','readFile','min','sourceProjectName','Expected\x20format:\x20--param\x20key=value','isNewProject','\x20\x20New\x20attempt\x20ID:\x20','Using\x20attempt\x20','unchanged','workflow:retry','renderSingleTimeline','(unknown)','Retrying\x20session...','\x20session','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','Fetching\x20workflow\x20','\x20task','delete','stdout','startsWith','isDirectory','yellow','No\x20workflow\x20sessions\x20found','Source\x20project:\x20','Loading\x20sessions...','Params:\x20','445816TFmdsV','No\x20sessions\x20found\x20for:\x20','Pull\x20workflow\x20project\x20to\x20local\x20folder','MIN_LABEL_COUNT','showWorkflowConsoleUrl','✔\x20Workflow\x20run\x20started','finishedAt','applyPullProject','map','workflow:pull','Attempt\x20ID:\x20','Listing\x20secrets...','workflow:logs','text','slice','Cloning\x20to\x20','toLowerCase','List\x20workflow\x20schedules','context','split','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','resolveProjectId','No\x20log\x20content\x20found','MAX_POLL_ITERATIONS','displayLine','pollTimeline','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','title','buildTimelineData','cwd','blue','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','relative','Error:\x20Attempt\x20ID\x20is\x20required','workflows','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','bold','\x20modified','No\x20matching\x20sessions\x20found','projectName','max','red','toLocaleString','retrySession','Filter:\x20','✔\x20Deleted\x20project\x20','indexOf','select','includes','clear','includeRetried','canceling','\x20\x20tdx\x20wf\x20use\x20<project>','stringify','projects','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','tdx.json','Analyzing\x20project...','getMonth','getFullYear','Parameters:','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','\x0a✔\x20Already\x20up\x20to\x20date','taskName','Setting\x20secret...','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','success','Killing\x20attempt...','workflow:push','\x0aClone\x20\x22','jsonl','No\x20attempts\x20found','No\x20sessions\x20found','trim','Analyzing\x20changes...','group_error','Latest\x20session\x20has\x20no\x20attempt','session_id','No\x20workflows\x20found','filesExtracted','data','icon','\x20-\x20','workflow:secrets:list','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','\x0aPush\x20these\x20changes?','workflow:download','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','path','workflow:schedules','startedAt','\x0aDry\x20run\x20-\x20no\x20project\x20created','Project\x20name:\x20','483234TbuSrY','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Source\x20directory:\x20','4uBbxfr','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Show\x20tasks\x20for\x20an\x20attempt','targetExists','Error:\x20Invalid\x20parameter\x20format:\x20','\x20of\x20','→\x20New\x20project:\x20','\x20secrets...','workflow','2112830OhbKcl','substring','New\x20project\x20name:\x20','start','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','MIN_TIMELINE_WIDTH','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','total','\x0a✔\x20No\x20changes\x20to\x20push','No\x20sessions\x20found\x20in\x20project:\x20','Session\x20not\x20found:\x20','padStart','requireProject','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Cancelled','all','Pattern:\x20','No\x20workflow\x20projects\x20found','key','Source\x20directory\x20is\x20required','113194QHvsVl','description','repeat','state','Error:\x20Project\x20name\x20is\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','revision','running'];a56_0x1da5=function(){return _0x493098;};return a56_0x1da5();}function getBarChar(_0x52008f){const _0x217817=a56_0x4d17f9;return _0x52008f==='error'||_0x52008f===_0x217817(0x2fa)?'×':'─';}function getBarColor(_0x34ea3c){const _0x3e988d=a56_0x4d17f9,_0x5aa53c={'success':a56_0x3e0f1d['green'],'error':a56_0x3e0f1d[_0x3e988d(0x2d7)],'group_error':a56_0x3e0f1d[_0x3e988d(0x2d7)],'running':a56_0x3e0f1d[_0x3e988d(0x2cb)],'blocked':a56_0x3e0f1d[_0x3e988d(0x2a8)],'planned':a56_0x3e0f1d[_0x3e988d(0x1f9)],'canceling':a56_0x3e0f1d[_0x3e988d(0x2a8)]};return _0x5aa53c[_0x34ea3c]||a56_0x3e0f1d['white'];}function parseTaskName(_0x1af945){const _0x55bb0a=a56_0x4d17f9;let _0x1be4dc=_0x1af945[_0x55bb0a(0x1af)](/^\++/,'');const _0x14db4b=_0x1be4dc[_0x55bb0a(0x2c0)]('+'),_0x5bb2ad=_0x14db4b[_0x55bb0a(0x1d4)]>0x1?_0x14db4b['length']-0x2:0x0,_0x5e8f5a=_0x14db4b[_0x14db4b[_0x55bb0a(0x1d4)]-0x1]||_0x1be4dc;return{'level':_0x5bb2ad,'name':'+'+_0x5e8f5a};}function truncateTaskName(_0x5b6c41,_0x17d4d6){const _0xbda89c=a56_0x4d17f9,_0x2dc6a1=stringWidth(_0x5b6c41);if(_0x2dc6a1<=_0x17d4d6)return _0x5b6c41;let _0x4cd5c1=_0x5b6c41;while(stringWidth(_0x4cd5c1+'…')>_0x17d4d6&&_0x4cd5c1[_0xbda89c(0x1d4)]>0x0){_0x4cd5c1=_0x4cd5c1[_0xbda89c(0x2bb)](0x0,-0x1);}return _0x4cd5c1+'…';}function calculateTimeScale(_0x438ecd,_0x38457b){const _0x3d4c7c=a56_0x4d17f9;return{'startTime':_0x438ecd[_0x3d4c7c(0x143)],'endTime':_0x438ecd['end'],'durationMs':_0x438ecd['duration'],'msPerChar':_0x438ecd['duration']/_0x38457b};}function timeToPosition(_0x599060,_0xa3312,_0x43ce9f){const _0x3005a4=a56_0x4d17f9,_0x379b1e=_0x599060-_0xa3312['startTime'],_0x20b943=Math[_0x3005a4(0x1f8)](_0x379b1e/_0xa3312[_0x3005a4(0x1d6)]);return Math[_0x3005a4(0x2d6)](0x0,Math['min'](_0x20b943,_0x43ce9f));}function renderTimeAxis(_0x1f0bf3,_0x56dd83){const _0x1c671e=a56_0x4d17f9,_0x32df62=Math[_0x1c671e(0x295)](TIMELINE_CONFIG[_0x1c671e(0x1f7)],Math['max'](TIMELINE_CONFIG[_0x1c671e(0x2b0)],Math['floor'](_0x56dd83/TIMELINE_CONFIG[_0x1c671e(0x1e6)]))),_0x2beb74=_0x1f0bf3['durationMs']/(_0x32df62-0x1),_0x29bca1=new Date(_0x1f0bf3[_0x1c671e(0x1aa)]),_0x1a97e9=[];for(let _0x1ad96e=0x0;_0x1ad96e<_0x32df62;_0x1ad96e++){const _0x97ed55=_0x1f0bf3['startTime']+_0x1ad96e*_0x2beb74,_0xc2b765=timeToPosition(_0x97ed55,_0x1f0bf3,_0x56dd83),_0x497e8a=formatTimestamp(_0x97ed55,_0x29bca1);_0x1a97e9[_0x1c671e(0x250)]({'pos':_0xc2b765,'text':_0x497e8a});}const _0x35cbf9=new Array(_0x56dd83)[_0x1c671e(0x195)]('\x20');let _0x3af01f=-0x1;for(const {pos:_0x5cfda4,text:_0x18a202}of _0x1a97e9){let _0x18990f=Math[_0x1c671e(0x2d6)](0x0,_0x5cfda4-Math[_0x1c671e(0x1f8)](_0x18a202['length']/0x2));_0x18990f<=_0x3af01f+TIMELINE_CONFIG[_0x1c671e(0x1d9)]&&(_0x18990f=_0x3af01f+TIMELINE_CONFIG[_0x1c671e(0x1d9)]+0x1);_0x18990f+_0x18a202[_0x1c671e(0x1d4)]>_0x56dd83&&(_0x18990f=_0x56dd83-_0x18a202[_0x1c671e(0x1d4)]);if(_0x18990f>=0x0&&_0x18990f+_0x18a202[_0x1c671e(0x1d4)]<=_0x56dd83&&_0x18990f>_0x3af01f){for(let _0x5cc97a=0x0;_0x5cc97a<_0x18a202[_0x1c671e(0x1d4)];_0x5cc97a++){_0x35cbf9[_0x18990f+_0x5cc97a]=_0x18a202[_0x5cc97a];}_0x3af01f=_0x18990f+_0x18a202[_0x1c671e(0x1d4)]-0x1;}}return _0x35cbf9[_0x1c671e(0x278)]('');}function renderTaskRow(_0x214fb1,_0x1931ff,_0x75179d,_0x5f4938){const _0x2bbe0b=a56_0x4d17f9,{level:_0x2c25e6,name:_0xe896c8}=parseTaskName(_0x214fb1[_0x2bbe0b(0x1b7)]),_0x14855='\x20'[_0x2bbe0b(0x156)](_0x2c25e6),_0x1e0984=_0x214fb1[_0x2bbe0b(0x1b2)]?'('+formatElapsed(_0x214fb1[_0x2bbe0b(0x1b2)]['duration'])+')':'',_0x4bb78b=stringWidth(_0x1e0984),_0x3f2829=_0x2c25e6*0x1,_0x20a961=_0x5f4938-_0x3f2829-_0x4bb78b-0x1,_0x34e2be=truncateTaskName(_0xe896c8,_0x20a961),_0x229a11=_0x14855+_0x34e2be,_0x2a0369=stringWidth(_0x229a11),_0x4fdb6c=_0x5f4938-_0x2a0369-_0x4bb78b,_0x36dd3c=_0x229a11+'\x20'['repeat'](Math[_0x2bbe0b(0x2d6)](0x1,_0x4fdb6c))+a56_0x3e0f1d[_0x2bbe0b(0x1f9)](_0x1e0984),_0x5cacb6=getTaskStateIcon(_0x214fb1[_0x2bbe0b(0x157)]),_0x21f0b0=new Array(_0x75179d)[_0x2bbe0b(0x195)]('\x20');if(_0x214fb1[_0x2bbe0b(0x1b2)]){const _0x147715=timeToPosition(_0x214fb1[_0x2bbe0b(0x1b2)]['start'],_0x1931ff,_0x75179d),_0x686660=timeToPosition(_0x214fb1[_0x2bbe0b(0x1b2)][_0x2bbe0b(0x1ac)],_0x1931ff,_0x75179d),_0x309af7=getBarChar(_0x214fb1[_0x2bbe0b(0x157)]),_0x4b9fb7=Math[_0x2bbe0b(0x2d6)](_0x147715+0x1,_0x686660);for(let _0x77ab55=_0x147715;_0x77ab55<Math[_0x2bbe0b(0x295)](_0x4b9fb7,_0x75179d);_0x77ab55++){_0x21f0b0[_0x77ab55]=_0x309af7;}}const _0x3de954=getBarColor(_0x214fb1['state']),_0x3f9f35=_0x21f0b0[_0x2bbe0b(0x2b5)](_0x2d80fa=>_0x2d80fa==='\x20'?'\x20':_0x3de954(_0x2d80fa))['join']('');return _0x5cacb6+'\x20'+_0x36dd3c+'│'+_0x3f9f35+'│';}function calculateStats(_0x234672){const _0x10604f=a56_0x4d17f9,_0x4da9a3={'total':_0x234672[_0x10604f(0x1d4)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x25cb7f of _0x234672){if(_0x25cb7f[_0x10604f(0x157)]===_0x10604f(0x2f1))_0x4da9a3[_0x10604f(0x2f1)]++;else{if(_0x25cb7f[_0x10604f(0x157)]===_0x10604f(0x19d)||_0x25cb7f[_0x10604f(0x157)]===_0x10604f(0x2fa))_0x4da9a3[_0x10604f(0x19d)]++;else _0x25cb7f[_0x10604f(0x157)]===_0x10604f(0x15b)?_0x4da9a3[_0x10604f(0x15b)]++:_0x4da9a3[_0x10604f(0x24c)]++;}}return _0x4da9a3;}function formatStats(_0x4aea92){const _0x554149=a56_0x4d17f9;return[_0x554149(0x1de)+_0x4aea92[_0x554149(0x147)],'✅\x20'+_0x4aea92[_0x554149(0x2f1)],'❌\x20'+_0x4aea92[_0x554149(0x19d)],'🔄\x20'+_0x4aea92[_0x554149(0x15b)],'⏳\x20'+_0x4aea92[_0x554149(0x24c)]][_0x554149(0x278)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x22f);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x2e5);async[a56_0x4d17f9(0x25e)](_0x5152f6){const _0x696f3e=a56_0x4d17f9,{options:_0x50059b,args:_0x2c9a1c,tdx:_0x706106}=_0x5152f6;let _0x39bf3a,_0x2788dd,_0x57ea03=![];if(_0x2c9a1c[0x0]){if(_0x2c9a1c[0x0][_0x696f3e(0x2de)]('.')){const _0x4d5520=this['parseProjectWorkflowPattern'](_0x2c9a1c,_0x50059b);if(!_0x4d5520)return 0x1;_0x39bf3a=_0x4d5520['projectName'],_0x2788dd=_0x4d5520[_0x696f3e(0x25a)];}else{_0x2788dd=_0x2c9a1c[0x0],_0x39bf3a=_0x50059b['workflowProject'];if(!_0x39bf3a)return console[_0x696f3e(0x19d)](a56_0x3e0f1d[_0x696f3e(0x2d7)](_0x696f3e(0x244)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x57ea03=!![];}}else{const _0xfd628d=this[_0x696f3e(0x167)](_0x2c9a1c,_0x50059b);if(!_0xfd628d)return 0x1;_0x39bf3a=_0xfd628d['projectName'],_0x2788dd=_0xfd628d['workflowName'];}if(_0x50059b['verbose']){if(_0x39bf3a&&_0x2788dd)console['error']('Filter:\x20'+_0x39bf3a+'.'+_0x2788dd);else _0x39bf3a&&console[_0x696f3e(0x19d)]('Filter:\x20project='+_0x39bf3a);}const _0x2d0b58=_0x50059b['attemptId'],_0x2eabd4=_0x50059b['sessionId'];if(_0x2d0b58){_0x2eabd4&&console[_0x696f3e(0x19d)](a56_0x3e0f1d[_0x696f3e(0x2a8)]('Warning:'),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x309325=_0x50059b[_0x696f3e(0x245)];return _0x309325?await this[_0x696f3e(0x2c6)](_0x5152f6,_0x2d0b58):await this[_0x696f3e(0x29d)](_0x5152f6,_0x2d0b58,_0x50059b),0x0;}if(_0x2eabd4){const _0x52461f=await withSpinner(_0x696f3e(0x1e1),()=>_0x706106[_0x696f3e(0x13f)]['sessions']({'projectName':_0x39bf3a,'workflowName':_0x2788dd,'limit':0x64}),{'verbose':_0x50059b[_0x696f3e(0x1c8)]}),_0x87ba99=_0x52461f[_0x696f3e(0x126)][_0x696f3e(0x252)](_0x1a8288=>_0x1a8288['id']===_0x2eabd4);if(!_0x87ba99)return console[_0x696f3e(0x19d)](a56_0x3e0f1d[_0x696f3e(0x2d7)]('Error:'),_0x696f3e(0x14a)+_0x2eabd4),0x1;if(!_0x87ba99[_0x696f3e(0x202)]?.['id'])return console['error'](a56_0x3e0f1d[_0x696f3e(0x2d7)]('Error:'),_0x696f3e(0x192)+_0x2eabd4+_0x696f3e(0x21e)),0x1;const _0xc1c098=_0x87ba99[_0x696f3e(0x202)]['id'];_0x50059b['verbose']&&console['error'](_0x696f3e(0x29a)+_0xc1c098+_0x696f3e(0x20d)+_0x2eabd4);const _0x7a3a98=_0x50059b[_0x696f3e(0x245)];return _0x7a3a98?await this[_0x696f3e(0x2c6)](_0x5152f6,_0xc1c098):await this[_0x696f3e(0x29d)](_0x5152f6,_0xc1c098,_0x50059b),0x0;}const _0x1b36ee=await withSpinner(_0x696f3e(0x2ab),()=>_0x706106['workflow']['sessions']({'projectName':_0x39bf3a,'workflowName':_0x2788dd,'limit':_0x50059b[_0x696f3e(0x1d8)]||0x32}),{'verbose':_0x50059b['verbose']}),_0x219c8d=_0x1b36ee[_0x696f3e(0x126)];if(_0x219c8d[_0x696f3e(0x1d4)]===0x0){if(_0x39bf3a&&_0x2788dd)console['error'](_0x696f3e(0x2ae)+_0x39bf3a+'.'+_0x2788dd);else _0x39bf3a?console[_0x696f3e(0x19d)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x39bf3a):(console[_0x696f3e(0x19d)](_0x696f3e(0x2a9)),console[_0x696f3e(0x19d)](a56_0x3e0f1d[_0x696f3e(0x1f9)](_0x696f3e(0x1b1))));return 0x0;}_0x219c8d['sort']((_0x35b6a7,_0x3bf55c)=>{const _0x553685=_0x696f3e,_0x233115=_0x35b6a7[_0x553685(0x255)]||'',_0x43b7a1=_0x3bf55c['sessionTime']||'';return _0x43b7a1[_0x553685(0x231)](_0x233115);});if(_0x50059b[_0x696f3e(0x257)]||_0x50059b['jsonl'])return await handleSDKOutput(_0x219c8d,_0x50059b),0x0;let _0x4cf40a;if(_0x57ea03){const _0x36012f=_0x219c8d[0x0];if(!_0x36012f[_0x696f3e(0x202)]?.['id'])return console['error'](_0x696f3e(0x122)),0x0;_0x4cf40a=_0x36012f['lastAttempt']['id'],_0x50059b[_0x696f3e(0x1c8)]&&console[_0x696f3e(0x19d)](_0x696f3e(0x22d)+_0x36012f['sessionTime']);}else{const _0x31b396=_0x219c8d[_0x696f3e(0x2b5)](_0x1ef19d=>{const _0x2b0d19=_0x696f3e,_0x15195a=getAttemptStatusDisplay(_0x1ef19d[_0x2b0d19(0x202)]);return{'title':_0x1ef19d[_0x2b0d19(0x275)]?.[_0x2b0d19(0x1b7)]+'.'+_0x1ef19d[_0x2b0d19(0x13f)]?.[_0x2b0d19(0x1b7)]+_0x2b0d19(0x128)+_0x1ef19d[_0x2b0d19(0x255)]+'\x20'+_0x15195a[_0x2b0d19(0x127)],'value':_0x1ef19d[_0x2b0d19(0x202)]?.['id']||'','description':_0x15195a[_0x2b0d19(0x2ba)]};}),_0x4f3856=await a56_0x2c360c({'type':'select','name':'attemptId','message':_0x696f3e(0x288),'choices':_0x31b396[_0x696f3e(0x19b)](_0x1c5ea2=>_0x1c5ea2['value']!=='')});if(!_0x4f3856[_0x696f3e(0x236)])return 0x0;_0x4cf40a=_0x4f3856[_0x696f3e(0x236)];}const _0x5e2479=_0x50059b[_0x696f3e(0x245)];return _0x5e2479?await this['pollTimeline'](_0x5152f6,_0x4cf40a):await this[_0x696f3e(0x29d)](_0x5152f6,_0x4cf40a,_0x50059b),0x0;}async[a56_0x4d17f9(0x29d)](_0x10cc73,_0x2abd3c,_0x50a5d3){const _0x493fa4=a56_0x4d17f9,{tdx:_0x122c9e}=_0x10cc73;let _0x1a2443,_0x3341fd;try{[_0x1a2443,_0x3341fd]=await Promise[_0x493fa4(0x14f)]([_0x122c9e[_0x493fa4(0x13f)]['attempt'](_0x2abd3c),_0x122c9e[_0x493fa4(0x13f)][_0x493fa4(0x1dc)](_0x2abd3c,![])]);}catch(_0x29b371){console['error'](a56_0x3e0f1d[_0x493fa4(0x2d7)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x50a5d3[_0x493fa4(0x1c8)]&&console[_0x493fa4(0x19d)](_0x29b371);throw _0x29b371;}if(_0x50a5d3[_0x493fa4(0x257)]||_0x50a5d3['jsonl']){const _0x457675=this[_0x493fa4(0x2c9)](_0x1a2443,_0x3341fd);await handleSDKOutput([_0x457675],_0x50a5d3);return;}const _0x166e4c=_0x122c9e[_0x493fa4(0x2bf)][_0x493fa4(0x249)],_0x36d675=this[_0x493fa4(0x1bd)](_0x1a2443,_0x3341fd,_0x166e4c);console['log'](_0x36d675);}async['pollTimeline'](_0x235ff6,_0x5bcb24){const _0x2bcb03=a56_0x4d17f9,{tdx:_0x4d0bd2}=_0x235ff6,_0x597f11=TIMELINE_CONFIG[_0x2bcb03(0x19e)],_0x18a7ee=TIMELINE_CONFIG[_0x2bcb03(0x2c4)];let _0x37f8a5=0x0;while(_0x37f8a5<_0x18a7ee){process[_0x2bcb03(0x2a5)][_0x2bcb03(0x190)]&&process[_0x2bcb03(0x2a5)][_0x2bcb03(0x18b)]('\x1Bc');let _0x52c343,_0xdfc60a;try{[_0x52c343,_0xdfc60a]=await Promise[_0x2bcb03(0x14f)]([_0x4d0bd2[_0x2bcb03(0x13f)][_0x2bcb03(0x266)](_0x5bcb24),_0x4d0bd2[_0x2bcb03(0x13f)]['tasks'](_0x5bcb24,![])]);}catch(_0x31e2c6){console[_0x2bcb03(0x19d)](a56_0x3e0f1d[_0x2bcb03(0x2d7)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x37f8a5>0x0&&console[_0x2bcb03(0x19d)](a56_0x3e0f1d['dim'](_0x2bcb03(0x16a)+_0x37f8a5));throw _0x31e2c6;}const _0x1ff05d=_0x4d0bd2[_0x2bcb03(0x2bf)][_0x2bcb03(0x249)],_0x5d493d=this[_0x2bcb03(0x1bd)](_0x52c343,_0xdfc60a,_0x1ff05d);console[_0x2bcb03(0x221)](_0x5d493d);const _0x11f919=_0x52c343[_0x2bcb03(0x203)]&&_0xdfc60a[_0x2bcb03(0x191)](_0x258a76=>_0x258a76[_0x2bcb03(0x157)]!==_0x2bcb03(0x15b)&&_0x258a76['state']!==_0x2bcb03(0x282));if(_0x11f919){console[_0x2bcb03(0x19d)](a56_0x3e0f1d[_0x2bcb03(0x182)](_0x2bcb03(0x254)));break;}console['error'](a56_0x3e0f1d[_0x2bcb03(0x1f9)](_0x2bcb03(0x196)+_0x37f8a5*0x2+_0x2bcb03(0x220))),await new Promise(_0x1c8022=>setTimeout(_0x1c8022,_0x597f11)),_0x37f8a5++;}_0x37f8a5>=_0x18a7ee&&console['error'](a56_0x3e0f1d[_0x2bcb03(0x2a8)](_0x2bcb03(0x146)));}['renderTimeline'](_0x3f77f3,_0x2ff2b9,_0x31db10){const _0x246088=a56_0x4d17f9,_0xec237f=[],_0x59058a=TIMELINE_CONFIG[_0x246088(0x1f6)],_0x57b798=0x5,_0x35b3f6=process['stdout'][_0x246088(0x175)]||0x78,_0x235805=_0x35b3f6-_0x59058a-_0x57b798,_0x2fef3f=Math[_0x246088(0x2d6)](TIMELINE_CONFIG[_0x246088(0x145)],Math[_0x246088(0x295)](_0x235805,TIMELINE_CONFIG[_0x246088(0x1df)])),_0x37a3bc=new Date(_0x3f77f3[_0x246088(0x186)])['getTime'](),_0x3a6f5f=_0x3f77f3[_0x246088(0x2b3)]?new Date(_0x3f77f3[_0x246088(0x2b3)])[_0x246088(0x19c)]():Date['now'](),_0x4cf19f={'start':_0x37a3bc,'end':_0x3a6f5f,'duration':_0x3a6f5f-_0x37a3bc},_0x8cc90d=new Map(),_0x134924=[];for(const _0x106e4f of _0x2ff2b9){if(_0x106e4f[_0x246088(0x131)]){const _0xfc7f33=new Date(_0x106e4f[_0x246088(0x131)])['getTime'](),_0xb72a6=_0x106e4f['updatedAt']?new Date(_0x106e4f[_0x246088(0x1f5)])['getTime']():Date['now'](),_0x26ea79={'start':_0xfc7f33,'end':_0xb72a6,'duration':_0xb72a6-_0xfc7f33};_0x8cc90d[_0x246088(0x26f)](_0x106e4f['id'],_0x26ea79),_0x134924[_0x246088(0x250)]({'name':_0x106e4f[_0x246088(0x17e)],'state':_0x106e4f[_0x246088(0x157)]||_0x246088(0x22b),'window':_0x26ea79});}else _0x134924[_0x246088(0x250)]({'name':_0x106e4f[_0x246088(0x17e)],'state':_0x106e4f[_0x246088(0x157)]||'planned','window':undefined});}_0x134924[_0x246088(0x214)]((_0x4df1fe,_0x4c5054)=>{const _0x2f952f=_0x246088;if(!_0x4df1fe[_0x2f952f(0x1b2)])return 0x1;if(!_0x4c5054['window'])return-0x1;return _0x4df1fe[_0x2f952f(0x1b2)][_0x2f952f(0x143)]-_0x4c5054[_0x2f952f(0x1b2)][_0x2f952f(0x143)];});const _0x1c5c0a=_0x134924[_0x246088(0x1d4)],_0x8c4ff7=_0x1c5c0a>TIMELINE_CONFIG[_0x246088(0x25c)];_0x8c4ff7&&_0x134924[_0x246088(0x1b9)](TIMELINE_CONFIG[_0x246088(0x25c)]);const _0x4224b4=calculateTimeScale(_0x4cf19f,_0x2fef3f),_0x460443=_0x3f77f3[_0x246088(0x203)]?_0x3f77f3[_0x246088(0x2f1)]?a56_0x3e0f1d[_0x246088(0x182)](_0x246088(0x2f1)):a56_0x3e0f1d[_0x246088(0x2d7)]('error'):a56_0x3e0f1d[_0x246088(0x2cb)](_0x246088(0x15b)),_0x31cd28=_0x3f77f3[_0x246088(0x275)]?.['id'],_0xce5964=_0x3f77f3['sessionId'];let _0x2f7225;if(_0x31cd28&&_0xce5964){const _0x1e9db6=getWorkflowAttemptUrl(_0x31db10,_0x31cd28,_0xce5964,_0x3f77f3['id']);_0x2f7225=hyperlink(a56_0x3e0f1d[_0x246088(0x1f9)](_0x3f77f3['id']),_0x1e9db6);}else _0x2f7225=a56_0x3e0f1d[_0x246088(0x1f9)](_0x3f77f3['id']);_0xec237f[_0x246088(0x250)](_0x246088(0x19a)+_0x2f7225+_0x246088(0x128)+_0x460443+_0x246088(0x128)+formatElapsed(_0x4cf19f[_0x246088(0x1e5)]));if(_0x134924['length']>0x0){const _0x5b302e=renderTimeAxis(_0x4224b4,_0x2fef3f),_0x576dd2=new Date(_0x4cf19f[_0x246088(0x143)]),_0x35e464=formatDate(_0x576dd2),_0x43c360=TIMELINE_CONFIG[_0x246088(0x1dd)]+TIMELINE_CONFIG[_0x246088(0x1fe)]+_0x59058a,_0x392483=_0x35e464['padStart'](_0x43c360),_0x312caa=a56_0x3e0f1d['dim'](_0x392483);_0xec237f[_0x246088(0x250)](_0x312caa+'\x20'+_0x5b302e);for(const _0x55f049 of _0x134924){_0xec237f[_0x246088(0x250)](renderTaskRow(_0x55f049,_0x4224b4,_0x2fef3f,_0x59058a));}const _0x2f1805=calculateStats(_0x134924);_0xec237f[_0x246088(0x250)](formatStats(_0x2f1805)),_0x8c4ff7&&_0xec237f[_0x246088(0x250)](a56_0x3e0f1d[_0x246088(0x2a8)](_0x246088(0x290)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x246088(0x13c)+_0x1c5c0a+_0x246088(0x25b))),_0xec237f['push'](''),_0xec237f['push'](a56_0x3e0f1d['dim'](_0x246088(0x1ca))+('tdx\x20wf\x20attempt\x20'+_0x3f77f3['id']+_0x246088(0x207))+a56_0x3e0f1d[_0x246088(0x1f9)](_0x246088(0x1ab)));}else _0xec237f[_0x246088(0x250)](_0x246088(0x144));return _0xec237f[_0x246088(0x278)]('\x0a');}[a56_0x4d17f9(0x2c9)](_0xb5305a,_0x25f6ac){const _0x12d8fa=a56_0x4d17f9,_0x2c68f1=new Date(_0xb5305a[_0x12d8fa(0x186)])[_0x12d8fa(0x19c)](),_0x554f5a=_0xb5305a[_0x12d8fa(0x2b3)]?new Date(_0xb5305a['finishedAt'])['getTime']():Date['now'](),_0x447fb1=_0x554f5a-_0x2c68f1,_0x6bbf0a=[];for(const _0x5e9cdd of _0x25f6ac){if(_0x5e9cdd[_0x12d8fa(0x131)]){const _0x2b9cf5=new Date(_0x5e9cdd[_0x12d8fa(0x131)])[_0x12d8fa(0x19c)](),_0xdc7bf7=_0x5e9cdd['updatedAt']?new Date(_0x5e9cdd['updatedAt'])['getTime']():Date['now']();_0x6bbf0a['push']({'name':_0x5e9cdd[_0x12d8fa(0x17e)],'state':_0x5e9cdd[_0x12d8fa(0x157)]||_0x12d8fa(0x22b),'window':{'start':_0x2b9cf5,'end':_0xdc7bf7,'duration':_0xdc7bf7-_0x2b9cf5}});}else _0x6bbf0a['push']({'name':_0x5e9cdd[_0x12d8fa(0x17e)],'state':_0x5e9cdd[_0x12d8fa(0x157)]||'planned','window':undefined});}const _0x56eebf=calculateStats(_0x6bbf0a);return{'attempt':{'id':_0xb5305a['id'],'status':_0xb5305a[_0x12d8fa(0x203)]?_0xb5305a['success']?_0x12d8fa(0x2f1):'error':_0x12d8fa(0x15b),'createdAt':_0xb5305a[_0x12d8fa(0x186)],'finishedAt':_0xb5305a[_0x12d8fa(0x2b3)],'duration_ms':_0x447fb1},'tasks':_0x6bbf0a[_0x12d8fa(0x2b5)](_0x31abbe=>({'name':_0x31abbe[_0x12d8fa(0x1b7)],'state':_0x31abbe[_0x12d8fa(0x157)],'startedAt':_0x31abbe['window']?new Date(_0x31abbe[_0x12d8fa(0x1b2)][_0x12d8fa(0x143)])[_0x12d8fa(0x1e8)]():null,'updatedAt':_0x31abbe[_0x12d8fa(0x1b2)]?new Date(_0x31abbe[_0x12d8fa(0x1b2)][_0x12d8fa(0x1ac)])[_0x12d8fa(0x1e8)]():null,'duration_ms':_0x31abbe[_0x12d8fa(0x1b2)]?.['duration']||null})),'stats':_0x56eebf};}}function formatScheduleLine(_0x449318){const _0x3661e5=a56_0x4d17f9,_0x2cee48=_0x449318[_0x3661e5(0x1c7)]?a56_0x3e0f1d[_0x3661e5(0x2a8)]('\x20(disabled)'):'',_0x46d53c=_0x449318[_0x3661e5(0x275)]?.[_0x3661e5(0x1b7)]?a56_0x3e0f1d[_0x3661e5(0x1f9)]('\x20['+_0x449318['project']['name']+']'):'',_0x3a8fd9=_0x449318[_0x3661e5(0x21a)]?a56_0x3e0f1d[_0x3661e5(0x1f9)](_0x3661e5(0x23b)+new Date(_0x449318[_0x3661e5(0x21a)])['toLocaleString']()):'';return'📅\x20#'+_0x449318['id']+'\x20'+(_0x449318[_0x3661e5(0x13f)]?.[_0x3661e5(0x1b7)]||_0x3661e5(0x29e))+_0x46d53c+_0x2cee48+_0x3a8fd9;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a56_0x4d17f9(0x1b7)]=a56_0x4d17f9(0x130);[a56_0x4d17f9(0x155)]=a56_0x4d17f9(0x2be);async['execute'](_0x44410e){const _0x45c01e=a56_0x4d17f9,{options:_0x371459,args:_0x4618e5,tdx:_0x37542c}=_0x44410e,{scheduleId:_0x3ac2ba}=_0x371459;if(_0x3ac2ba&&_0x4618e5[0x0])return console[_0x45c01e(0x19d)](a56_0x3e0f1d[_0x45c01e(0x2d7)](_0x45c01e(0x244)),_0x45c01e(0x2a1)),console[_0x45c01e(0x19d)](a56_0x3e0f1d[_0x45c01e(0x1f9)](_0x45c01e(0x1cd))),0x1;if(_0x3ac2ba){const _0x2ab0aa=await withSpinner(_0x45c01e(0x18f)+_0x3ac2ba+_0x45c01e(0x17a),()=>_0x37542c[_0x45c01e(0x13f)][_0x45c01e(0x1ec)](_0x3ac2ba),{'verbose':_0x371459['verbose']}),_0x35713f=_0x2ab0aa[_0x45c01e(0x126)];return isStructuredFormat(_0x371459)?await handleSingleObjectOutput(_0x35713f,_0x371459):(console[_0x45c01e(0x19d)](_0x45c01e(0x189)),console[_0x45c01e(0x221)](formatScheduleLine(_0x35713f))),0x0;}const _0x4b71a=this[_0x45c01e(0x167)](_0x4618e5,_0x371459);if(!_0x4b71a)return 0x1;const {projectName:_0x3f7fd0,workflowName:_0x4c5adb}=_0x4b71a,_0x310993=_0x3f7fd0?'\x27'+_0x3f7fd0+(_0x4c5adb?'.'+_0x4c5adb:'')+'\x27':undefined,_0x7ad9a6=await withSpinner(_0x310993?_0x45c01e(0x164)+_0x310993+_0x45c01e(0x17a):_0x45c01e(0x185),()=>_0x3f7fd0?_0x37542c['workflow'][_0x45c01e(0x1c2)](_0x3f7fd0,{'workflow':_0x4c5adb,'limit':_0x371459[_0x45c01e(0x1d8)]}):_0x37542c[_0x45c01e(0x13f)][_0x45c01e(0x270)]({'limit':_0x371459[_0x45c01e(0x1d8)]}),{'verbose':_0x371459['verbose']}),_0x280d15=_0x7ad9a6['data'],_0x51d704=_0x371459['limit']&&_0x280d15[_0x45c01e(0x1d4)]>=_0x371459[_0x45c01e(0x1d8)]?a56_0x3e0f1d[_0x45c01e(0x1f9)](_0x45c01e(0x212)):'';console[_0x45c01e(0x19d)](_0x45c01e(0x233)+_0x280d15[_0x45c01e(0x1d4)]+'\x20schedule'+(_0x280d15[_0x45c01e(0x1d4)]!==0x1?'s':'')+_0x51d704);if(isStructuredFormat(_0x371459))await handleSDKOutput(_0x280d15,_0x371459);else{if(_0x280d15[_0x45c01e(0x1d4)]===0x0)console['log'](_0x45c01e(0x274));else for(const _0x51c521 of _0x280d15){console[_0x45c01e(0x221)](formatScheduleLine(_0x51c521));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a56_0x4d17f9(0x1b7)]='workflow:schedule:enable';[a56_0x4d17f9(0x155)]='Enable\x20a\x20workflow\x20schedule';async['execute'](_0x348558){const _0x107f75=a56_0x4d17f9,{options:_0x3ea4fd,args:_0x50e949,tdx:_0x4afd25}=_0x348558,_0x3e87d8=_0x50e949[0x0];if(!_0x3e87d8)return console[_0x107f75(0x19d)](a56_0x3e0f1d[_0x107f75(0x2d7)]('Error:'),'Schedule\x20ID\x20is\x20required'),console[_0x107f75(0x19d)](a56_0x3e0f1d[_0x107f75(0x1f9)](_0x107f75(0x2ef))),console[_0x107f75(0x19d)](a56_0x3e0f1d[_0x107f75(0x1f9)](_0x107f75(0x2cc))),0x1;const {backfill:_0x221c81,nextTime:_0xe8fe5e}=_0x3ea4fd,_0x46d45c={};if(_0x221c81!==undefined)_0x46d45c[_0x107f75(0x15e)]=!_0x221c81;if(_0xe8fe5e!==undefined)_0x46d45c[_0x107f75(0x23e)]=_0xe8fe5e;const _0x3aeac9=await withSpinner('Enabling\x20schedule\x20#'+_0x3e87d8+_0x107f75(0x17a),()=>_0x4afd25[_0x107f75(0x13f)][_0x107f75(0x204)](_0x3e87d8,_0x46d45c),{'verbose':_0x3ea4fd['verbose']}),_0x1b4224=_0x3aeac9['data'];return isStructuredFormat(_0x3ea4fd)?await handleSingleObjectOutput(_0x1b4224,_0x3ea4fd):(console[_0x107f75(0x221)](_0x107f75(0x19f)+_0x3e87d8+'\x20enabled\x20('+(_0x1b4224[_0x107f75(0x13f)]?.['name']||_0x107f75(0x22b))+')'),_0x1b4224[_0x107f75(0x21a)]&&console['log'](a56_0x3e0f1d[_0x107f75(0x1f9)]('\x20\x20Next\x20run:\x20'+new Date(_0x1b4224[_0x107f75(0x21a)])[_0x107f75(0x2d8)]()))),0x0;}}function a56_0x26aa(_0x21877c,_0x446ba1){_0x21877c=_0x21877c-0x122;const _0x1da5c2=a56_0x1da5();let _0x26aa7b=_0x1da5c2[_0x21877c];return _0x26aa7b;}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']=a56_0x4d17f9(0x1fd);[a56_0x4d17f9(0x155)]='Disable\x20a\x20workflow\x20schedule';async[a56_0x4d17f9(0x25e)](_0x44063b){const _0x28c43f=a56_0x4d17f9,{options:_0x54e50d,args:_0x42b347,tdx:_0x55b8b0}=_0x44063b,_0x5b5901=_0x42b347[0x0];if(!_0x5b5901)return console[_0x28c43f(0x19d)](a56_0x3e0f1d[_0x28c43f(0x2d7)](_0x28c43f(0x244)),'Schedule\x20ID\x20is\x20required'),console[_0x28c43f(0x19d)](a56_0x3e0f1d[_0x28c43f(0x1f9)](_0x28c43f(0x261))),console['error'](a56_0x3e0f1d[_0x28c43f(0x1f9)](_0x28c43f(0x2cc))),0x1;const _0x542aef=await withSpinner(_0x28c43f(0x16f)+_0x5b5901+'...',()=>_0x55b8b0['workflow'][_0x28c43f(0x1a4)](_0x5b5901),{'verbose':_0x54e50d[_0x28c43f(0x1c8)]}),_0x2cfe68=_0x542aef[_0x28c43f(0x126)];return isStructuredFormat(_0x54e50d)?await handleSingleObjectOutput(_0x2cfe68,_0x54e50d):console['log'](_0x28c43f(0x19f)+_0x5b5901+_0x28c43f(0x213)+(_0x2cfe68['workflow']?.[_0x28c43f(0x1b7)]||_0x28c43f(0x22b))+')'),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2de60e,_0xc8c447){const _0x5339d0=a57_0x6666,_0x3d3627=_0x2de60e();while(!![]){try{const _0x1b6a8a=-parseInt(_0x5339d0(0x199))/0x1*(-parseInt(_0x5339d0(0x194))/0x2)+-parseInt(_0x5339d0(0x19d))/0x3*(parseInt(_0x5339d0(0x1a2))/0x4)+-parseInt(_0x5339d0(0x191))/0x5*(-parseInt(_0x5339d0(0x197))/0x6)+-parseInt(_0x5339d0(0x198))/0x7*(parseInt(_0x5339d0(0x195))/0x8)+parseInt(_0x5339d0(0x192))/0x9*(parseInt(_0x5339d0(0x19c))/0xa)+-parseInt(_0x5339d0(0x196))/0xb*(parseInt(_0x5339d0(0x19b))/0xc)+parseInt(_0x5339d0(0x19a))/0xd*(-parseInt(_0x5339d0(0x190))/0xe);if(_0x1b6a8a===_0xc8c447)break;else _0x3d3627['push'](_0x3d3627['shift']());}catch(_0x556799){_0x3d3627['push'](_0x3d3627['shift']());}}}(a57_0x489f,0xa800d));import{platform}from'os';function a57_0x6666(_0x37a0ec,_0x29db74){_0x37a0ec=_0x37a0ec-0x190;const _0x489f60=a57_0x489f();let _0x666676=_0x489f60[_0x37a0ec];return _0x666676;}import{getAPIKey}from'./config.js';function a57_0x489f(){const _0x2261e7=['1331112AYXvmw','1331JPqRhD','6245598IEYXPe','7WjmSCh','1oeerlX','13YAfzJd','39552MGPYtf','22270yWLbFE','6XKGyMC','Authorization','tdx/','X-Trino-User','Bearer\x20','782524LoGrJn','tdx','2066442ESmBGU','5QzIRoA','1773BSfnFO','version','625118yHqyZU'];a57_0x489f=function(){return _0x2261e7;};return a57_0x489f();}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x2a68ac=a57_0x6666,_0x2a938b=getVersion(),_0x36a4ca=platform(),_0x3f5093=process[_0x2a68ac(0x193)]['replace']('v','');return _0x2a68ac(0x19f)+_0x2a938b+'\x20('+_0x36a4ca+';\x20node/'+_0x3f5093+')';}export function getAuthHeaders(_0x58160c,_0x10bac6,_0x1cc711){const _0x28f64d=a57_0x6666,_0x42dadc=getVersion(),_0x57e97a={'User-Agent':getUserAgent(),'X-TD-Client':_0x28f64d(0x1a3),'X-TD-Client-Version':_0x42dadc};if(_0x1cc711)_0x57e97a[_0x28f64d(0x19e)]=_0x28f64d(0x1a1)+_0x1cc711;else _0x10bac6&&(_0x57e97a[_0x28f64d(0x19e)]='TD1\x20'+_0x10bac6);return _0x57e97a;}export function toHeaderRecord(_0x15124b){const _0x3d7ea9={};for(const [_0x1b07fe,_0x287b6a]of Object['entries'](_0x15124b)){_0x287b6a!==undefined&&(_0x3d7ea9[_0x1b07fe]=_0x287b6a);}return _0x3d7ea9;}export function getTrinoHeaders(_0x1d6e17,_0x311b2a,_0x22b921){const _0x112392=a57_0x6666,_0x5df022=getAuthHeaders(_0x1d6e17),_0x167f7a=toHeaderRecord(_0x5df022);if(_0x22b921)_0x167f7a[_0x112392(0x19e)]=_0x112392(0x1a1)+_0x22b921;else _0x311b2a&&(_0x167f7a[_0x112392(0x1a0)]=_0x311b2a);return _0x167f7a;}export function hasAPIKey(_0x4d74ce){const _0x2a383d=getAPIKey();return _0x2a383d!==undefined&&_0x2a383d['length']>0x0;}
1
+ function a57_0x2187(_0x82b528,_0x50b021){_0x82b528=_0x82b528-0x188;const _0x70cc8b=a57_0x70cc();let _0x218749=_0x70cc8b[_0x82b528];return _0x218749;}(function(_0x3564cf,_0x5693fa){const _0x48e0a5=a57_0x2187,_0x9de22c=_0x3564cf();while(!![]){try{const _0x8c413=parseInt(_0x48e0a5(0x19a))/0x1*(parseInt(_0x48e0a5(0x194))/0x2)+-parseInt(_0x48e0a5(0x193))/0x3+-parseInt(_0x48e0a5(0x189))/0x4*(parseInt(_0x48e0a5(0x188))/0x5)+parseInt(_0x48e0a5(0x195))/0x6+parseInt(_0x48e0a5(0x199))/0x7*(-parseInt(_0x48e0a5(0x18a))/0x8)+-parseInt(_0x48e0a5(0x196))/0x9+parseInt(_0x48e0a5(0x18d))/0xa;if(_0x8c413===_0x5693fa)break;else _0x9de22c['push'](_0x9de22c['shift']());}catch(_0x5d8659){_0x9de22c['push'](_0x9de22c['shift']());}}}(a57_0x70cc,0xbccef));import{platform}from'os';function a57_0x70cc(){const _0x367ed=['8475750AKdNwL','Bearer\x20','replace','77LbrRbr','1213153DTNEJA','675vwKMHn','428yRqZfg','1067608WFDhBJ',';\x20node/','tdx','19980100dKbaur','Authorization','tdx/','length','X-Trino-User','version','1889775roMJct','2izoNuZ','3697662gHYlxd'];a57_0x70cc=function(){return _0x367ed;};return a57_0x70cc();}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x18fc40=a57_0x2187,_0xa1cc4e=getVersion(),_0x5953ea=platform(),_0x5e11f1=process[_0x18fc40(0x192)][_0x18fc40(0x198)]('v','');return _0x18fc40(0x18f)+_0xa1cc4e+'\x20('+_0x5953ea+_0x18fc40(0x18b)+_0x5e11f1+')';}export function getAuthHeaders(_0x5139c2,_0x1692f4,_0x2aa36e){const _0x3f374b=a57_0x2187,_0x3915c3=getVersion(),_0x2cf6b2={'User-Agent':getUserAgent(),'X-TD-Client':_0x3f374b(0x18c),'X-TD-Client-Version':_0x3915c3};if(_0x2aa36e)_0x2cf6b2[_0x3f374b(0x18e)]=_0x3f374b(0x197)+_0x2aa36e;else _0x1692f4&&(_0x2cf6b2[_0x3f374b(0x18e)]='TD1\x20'+_0x1692f4);return _0x2cf6b2;}export function toHeaderRecord(_0x483fe5){const _0x3c82dc={};for(const [_0x6affdd,_0x5bfcbb]of Object['entries'](_0x483fe5)){_0x5bfcbb!==undefined&&(_0x3c82dc[_0x6affdd]=_0x5bfcbb);}return _0x3c82dc;}export function getTrinoHeaders(_0x3050f7,_0x13d726,_0x359d70){const _0x4068b1=a57_0x2187,_0x21673=getAuthHeaders(_0x3050f7),_0x4dc53b=toHeaderRecord(_0x21673);if(_0x359d70)_0x4dc53b['Authorization']=_0x4068b1(0x197)+_0x359d70;else _0x13d726&&(_0x4dc53b[_0x4068b1(0x191)]=_0x13d726);return _0x4dc53b;}export function hasAPIKey(_0x2e2394){const _0x40f1ff=a57_0x2187,_0x1a9e85=getAPIKey();return _0x1a9e85!==undefined&&_0x1a9e85[_0x40f1ff(0x190)]>0x0;}