@treasuredata/tdx 2026.7.1 → 2026.7.3

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 (297) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.d.ts.map +1 -1
  12. package/dist/commands/auth-command.js +1 -1
  13. package/dist/commands/auth-command.js.map +1 -1
  14. package/dist/commands/cas-command.d.ts +20 -0
  15. package/dist/commands/cas-command.d.ts.map +1 -1
  16. package/dist/commands/cas-command.js +1 -1
  17. package/dist/commands/cas-command.js.map +1 -1
  18. package/dist/commands/cas-segment-command.d.ts +24 -0
  19. package/dist/commands/cas-segment-command.d.ts.map +1 -1
  20. package/dist/commands/cas-segment-command.js +1 -1
  21. package/dist/commands/cas-segment-command.js.map +1 -1
  22. package/dist/commands/chat-command.js +1 -1
  23. package/dist/commands/claude-command.d.ts.map +1 -1
  24. package/dist/commands/claude-command.js +1 -1
  25. package/dist/commands/claude-command.js.map +1 -1
  26. package/dist/commands/claude-statusline-command.js +1 -1
  27. package/dist/commands/claude-usage-command.js +1 -1
  28. package/dist/commands/command.js +1 -1
  29. package/dist/commands/connection-command.js +1 -1
  30. package/dist/commands/databases.js +1 -1
  31. package/dist/commands/delivery-command.js +1 -1
  32. package/dist/commands/describe.js +1 -1
  33. package/dist/commands/engage-campaign-pull-command.js +1 -1
  34. package/dist/commands/engage-campaign-push-command.js +1 -1
  35. package/dist/commands/engage-campaign-validate-command.js +1 -1
  36. package/dist/commands/engage-command.js +1 -1
  37. package/dist/commands/engage-template-pull-command.js +1 -1
  38. package/dist/commands/engage-template-push-command.js +1 -1
  39. package/dist/commands/engage-template-validate-command.js +1 -1
  40. package/dist/commands/job-command.js +1 -1
  41. package/dist/commands/journey-command.js +1 -1
  42. package/dist/commands/journey-validate-command.js +1 -1
  43. package/dist/commands/llm-command.js +1 -1
  44. package/dist/commands/mcp-command.js +1 -1
  45. package/dist/commands/parent-segment-command.js +1 -1
  46. package/dist/commands/policy-command.js +1 -1
  47. package/dist/commands/profile-command.js +1 -1
  48. package/dist/commands/profiles-command.js +1 -1
  49. package/dist/commands/query-command.js +1 -1
  50. package/dist/commands/schedule-command.js +1 -1
  51. package/dist/commands/segment-command.js +1 -1
  52. package/dist/commands/segment-create-command.js +1 -1
  53. package/dist/commands/segment-fields-command.js +1 -1
  54. package/dist/commands/segment-move-command.js +1 -1
  55. package/dist/commands/segment-pull-command.js +1 -1
  56. package/dist/commands/segment-push-command.js +1 -1
  57. package/dist/commands/segment-update-command.js +1 -1
  58. package/dist/commands/segment-use-command.js +1 -1
  59. package/dist/commands/segment-validate-command.js +1 -1
  60. package/dist/commands/segments.js +1 -1
  61. package/dist/commands/show.js +1 -1
  62. package/dist/commands/status-command.js +1 -1
  63. package/dist/commands/table-deleted.js +1 -1
  64. package/dist/commands/tables.js +1 -1
  65. package/dist/commands/unset-command.js +1 -1
  66. package/dist/commands/upgrade-command.js +1 -1
  67. package/dist/commands/use-command.js +1 -1
  68. package/dist/commands/user-command.js +1 -1
  69. package/dist/commands/work-command.js +1 -1
  70. package/dist/commands/workflow-command.js +1 -1
  71. package/dist/core/auth.js +1 -1
  72. package/dist/core/command-output.js +1 -1
  73. package/dist/core/config.js +1 -1
  74. package/dist/core/connection-cache.js +1 -1
  75. package/dist/core/constants.js +1 -1
  76. package/dist/core/credential-cache.js +1 -1
  77. package/dist/core/global-context.js +1 -1
  78. package/dist/core/keychain.js +1 -1
  79. package/dist/core/oauth-keychain.js +1 -1
  80. package/dist/core/oauth.d.ts +11 -2
  81. package/dist/core/oauth.d.ts.map +1 -1
  82. package/dist/core/oauth.js +1 -1
  83. package/dist/core/oauth.js.map +1 -1
  84. package/dist/core/profile.js +1 -1
  85. package/dist/core/project-config.js +1 -1
  86. package/dist/core/session.js +1 -1
  87. package/dist/core/user-cache.js +1 -1
  88. package/dist/core/version.js +1 -1
  89. package/dist/index.js +1 -1
  90. package/dist/mcp/server.js +1 -1
  91. package/dist/mcp/tools/index.js +1 -1
  92. package/dist/mcp/tools/tdx-run.js +1 -1
  93. package/dist/mcp/tools/tdx-search.js +1 -1
  94. package/dist/mcp/tools/work-create-item.js +1 -1
  95. package/dist/mcp/utils.js +1 -1
  96. package/dist/proxy/claude-usage-tracker.js +1 -1
  97. package/dist/proxy/passthrough-server.d.ts +16 -0
  98. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  99. package/dist/proxy/passthrough-server.js +1 -1
  100. package/dist/proxy/passthrough-server.js.map +1 -1
  101. package/dist/proxy/sse-usage-parser.js +1 -1
  102. package/dist/sdk/agent/agent-config.js +1 -1
  103. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  104. package/dist/sdk/agent/agent-yaml.js +1 -1
  105. package/dist/sdk/agent/test/evaluator.js +1 -1
  106. package/dist/sdk/agent/test/executor.js +1 -1
  107. package/dist/sdk/agent/test/index.js +1 -1
  108. package/dist/sdk/agent/test/output.js +1 -1
  109. package/dist/sdk/agent/test/parser.js +1 -1
  110. package/dist/sdk/agent/tool-target-registry.js +1 -1
  111. package/dist/sdk/api.js +1 -1
  112. package/dist/sdk/cas/cas-api-client.d.ts +83 -3
  113. package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
  114. package/dist/sdk/cas/cas-api-client.js +1 -1
  115. package/dist/sdk/cas/cas-api-client.js.map +1 -1
  116. package/dist/sdk/cas/cas-audience-schema.d.ts +149 -0
  117. package/dist/sdk/cas/cas-audience-schema.d.ts.map +1 -0
  118. package/dist/sdk/cas/cas-audience-schema.js +1 -0
  119. package/dist/sdk/cas/cas-audience-schema.js.map +1 -0
  120. package/dist/sdk/cas/cas-audience-validator.d.ts +57 -0
  121. package/dist/sdk/cas/cas-audience-validator.d.ts.map +1 -0
  122. package/dist/sdk/cas/cas-audience-validator.js +1 -0
  123. package/dist/sdk/cas/cas-audience-validator.js.map +1 -0
  124. package/dist/sdk/cas/cas-audience-yaml.d.ts +32 -1
  125. package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -1
  126. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  127. package/dist/sdk/cas/cas-audience-yaml.js.map +1 -1
  128. package/dist/sdk/cas/cas-segment-yaml.d.ts +30 -2
  129. package/dist/sdk/cas/cas-segment-yaml.d.ts.map +1 -1
  130. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  131. package/dist/sdk/cas/cas-segment-yaml.js.map +1 -1
  132. package/dist/sdk/cas/index.d.ts +21 -0
  133. package/dist/sdk/cas/index.d.ts.map +1 -1
  134. package/dist/sdk/cas/index.js +1 -1
  135. package/dist/sdk/cas/index.js.map +1 -1
  136. package/dist/sdk/cas/pull-workflow.js +1 -1
  137. package/dist/sdk/cas/push-workflow.d.ts +131 -0
  138. package/dist/sdk/cas/push-workflow.d.ts.map +1 -1
  139. package/dist/sdk/cas/push-workflow.js +1 -1
  140. package/dist/sdk/cas/push-workflow.js.map +1 -1
  141. package/dist/sdk/cas/types.d.ts +33 -4
  142. package/dist/sdk/cas/types.d.ts.map +1 -1
  143. package/dist/sdk/cas/validate-files.d.ts +64 -0
  144. package/dist/sdk/cas/validate-files.d.ts.map +1 -0
  145. package/dist/sdk/cas/validate-files.js +1 -0
  146. package/dist/sdk/cas/validate-files.js.map +1 -0
  147. package/dist/sdk/client/cdp-api-client.js +1 -1
  148. package/dist/sdk/client/delivery-api-client.js +1 -1
  149. package/dist/sdk/client/endpoints.d.ts +11 -1
  150. package/dist/sdk/client/endpoints.d.ts.map +1 -1
  151. package/dist/sdk/client/endpoints.js +1 -1
  152. package/dist/sdk/client/endpoints.js.map +1 -1
  153. package/dist/sdk/client/engage-api-client.js +1 -1
  154. package/dist/sdk/client/http-client.js +1 -1
  155. package/dist/sdk/client/llm-api-client.js +1 -1
  156. package/dist/sdk/client/oauth-refresh.d.ts +5 -1
  157. package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
  158. package/dist/sdk/client/oauth-refresh.js +1 -1
  159. package/dist/sdk/client/oauth-refresh.js.map +1 -1
  160. package/dist/sdk/client/rate-limiter.js +1 -1
  161. package/dist/sdk/client/td-api-client.js +1 -1
  162. package/dist/sdk/client/trino-api-client.js +1 -1
  163. package/dist/sdk/client/workflow-client.js +1 -1
  164. package/dist/sdk/connection-validator.js +1 -1
  165. package/dist/sdk/connection.js +1 -1
  166. package/dist/sdk/delivery.js +1 -1
  167. package/dist/sdk/engage/campaign-pull.js +1 -1
  168. package/dist/sdk/engage/campaign-push.js +1 -1
  169. package/dist/sdk/engage/campaign-validator.js +1 -1
  170. package/dist/sdk/engage/campaign-yaml.js +1 -1
  171. package/dist/sdk/engage/template-pull.js +1 -1
  172. package/dist/sdk/engage/template-push.js +1 -1
  173. package/dist/sdk/engage/template-validator.js +1 -1
  174. package/dist/sdk/engage/template-yaml.js +1 -1
  175. package/dist/sdk/engage/types/campaign-def.js +1 -1
  176. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  177. package/dist/sdk/engage/types/template-schema.js +1 -1
  178. package/dist/sdk/engage.js +1 -1
  179. package/dist/sdk/errors.d.ts +20 -0
  180. package/dist/sdk/errors.d.ts.map +1 -1
  181. package/dist/sdk/errors.js +1 -1
  182. package/dist/sdk/errors.js.map +1 -1
  183. package/dist/sdk/index.js +1 -1
  184. package/dist/sdk/io/index.js +1 -1
  185. package/dist/sdk/io/node-filesystem.js +1 -1
  186. package/dist/sdk/job.js +1 -1
  187. package/dist/sdk/journey.js +1 -1
  188. package/dist/sdk/llm/chat-cache.js +1 -1
  189. package/dist/sdk/llm/index.js +1 -1
  190. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  191. package/dist/sdk/llm/model-factors.js +1 -1
  192. package/dist/sdk/llm/user-settings.js +1 -1
  193. package/dist/sdk/personalization.js +1 -1
  194. package/dist/sdk/policy.js +1 -1
  195. package/dist/sdk/query/deleted-table-validation.js +1 -1
  196. package/dist/sdk/query/index.js +1 -1
  197. package/dist/sdk/query/sql-parser.js +1 -1
  198. package/dist/sdk/realtime.js +1 -1
  199. package/dist/sdk/schedule.js +1 -1
  200. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  201. package/dist/sdk/segment/fields-display.js +1 -1
  202. package/dist/sdk/segment/file-discovery.js +1 -1
  203. package/dist/sdk/segment/journey-utils.js +1 -1
  204. package/dist/sdk/segment/journey-validator.js +1 -1
  205. package/dist/sdk/segment/journey-yaml.js +1 -1
  206. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  207. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  208. package/dist/sdk/segment/pull-workflow.js +1 -1
  209. package/dist/sdk/segment/push-recovery.js +1 -1
  210. package/dist/sdk/segment/push-workflow.js +1 -1
  211. package/dist/sdk/segment/resolution-context.d.ts +16 -7
  212. package/dist/sdk/segment/resolution-context.d.ts.map +1 -1
  213. package/dist/sdk/segment/resolution-context.js +1 -1
  214. package/dist/sdk/segment/resolution-context.js.map +1 -1
  215. package/dist/sdk/segment/segment-path-parser.js +1 -1
  216. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  217. package/dist/sdk/segment/segment-validator.js +1 -1
  218. package/dist/sdk/segment/target-resolution.js +1 -1
  219. package/dist/sdk/segment/tdx-config.js +1 -1
  220. package/dist/sdk/segment/types/activation-schema.js +1 -1
  221. package/dist/sdk/segment/types/journey-def.js +1 -1
  222. package/dist/sdk/segment/types/journey-schema.js +1 -1
  223. package/dist/sdk/segment/types/segment-def.js +1 -1
  224. package/dist/sdk/segment/types/segment-schema.js +1 -1
  225. package/dist/sdk/segment/validate-files.js +1 -1
  226. package/dist/sdk/segment/yaml-validator.d.ts +1 -1
  227. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  228. package/dist/sdk/segment/yaml-validator.js +1 -1
  229. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  230. package/dist/sdk/segment.js +1 -1
  231. package/dist/sdk/types/cas.d.ts +99 -26
  232. package/dist/sdk/types/cas.d.ts.map +1 -1
  233. package/dist/sdk/types/index.d.ts +1 -1
  234. package/dist/sdk/types/index.d.ts.map +1 -1
  235. package/dist/sdk/types/index.js +1 -1
  236. package/dist/sdk/types/index.js.map +1 -1
  237. package/dist/sdk/types/progress.js +1 -1
  238. package/dist/sdk/types/workspace.js +1 -1
  239. package/dist/sdk/user.js +1 -1
  240. package/dist/sdk/util/format-detector.js +1 -1
  241. package/dist/sdk/util/formatters.js +1 -1
  242. package/dist/sdk/util/index.js +1 -1
  243. package/dist/sdk/util/paginate.js +1 -1
  244. package/dist/sdk/util/tree-formatter.js +1 -1
  245. package/dist/sdk/util/tree-search.js +1 -1
  246. package/dist/sdk/workflow/archive-validation.js +1 -1
  247. package/dist/sdk/workflow/clone-workflow.js +1 -1
  248. package/dist/sdk/workflow/index.js +1 -1
  249. package/dist/sdk/workflow/pull-workflow.js +1 -1
  250. package/dist/sdk/workflow/push-workflow.js +1 -1
  251. package/dist/sdk/workflow/task-graph.js +1 -1
  252. package/dist/sdk/workflow/tdx-config.js +1 -1
  253. package/dist/sdk/workflow/workflow-utils.js +1 -1
  254. package/dist/sdk/workspace/access-tracker.js +1 -1
  255. package/dist/sdk/workspace/frontmatter.js +1 -1
  256. package/dist/sdk/workspace/git.js +1 -1
  257. package/dist/sdk/workspace/index.js +1 -1
  258. package/dist/sdk/workspace/templates.js +1 -1
  259. package/dist/sdk/workspace/weekly.js +1 -1
  260. package/dist/sdk/workspace/wikilinks.js +1 -1
  261. package/dist/test-utils/command-runner.js +1 -1
  262. package/dist/test-utils/factories.js +1 -1
  263. package/dist/test-utils/fixtures.js +1 -1
  264. package/dist/test-utils/http-mock.js +1 -1
  265. package/dist/test-utils/index.js +1 -1
  266. package/dist/utils/async.js +1 -1
  267. package/dist/utils/colors.js +1 -1
  268. package/dist/utils/diff.js +1 -1
  269. package/dist/utils/file-permissions.js +1 -1
  270. package/dist/utils/file-reader.js +1 -1
  271. package/dist/utils/github-releases.js +1 -1
  272. package/dist/utils/global-cache.js +1 -1
  273. package/dist/utils/json-loader.js +1 -1
  274. package/dist/utils/local-cache.js +1 -1
  275. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  276. package/dist/utils/logger/formatters/index.js +1 -1
  277. package/dist/utils/logger/handlers/console-handler.js +1 -1
  278. package/dist/utils/logger/handlers/file-handler.js +1 -1
  279. package/dist/utils/logger/handlers/index.js +1 -1
  280. package/dist/utils/logger/handlers/null-handler.js +1 -1
  281. package/dist/utils/logger/index.js +1 -1
  282. package/dist/utils/logger/logger.js +1 -1
  283. package/dist/utils/logger/types.js +1 -1
  284. package/dist/utils/option-validation.js +1 -1
  285. package/dist/utils/process.js +1 -1
  286. package/dist/utils/prompt.js +1 -1
  287. package/dist/utils/proxy-fetch.d.ts +29 -0
  288. package/dist/utils/proxy-fetch.d.ts.map +1 -0
  289. package/dist/utils/proxy-fetch.js +1 -0
  290. package/dist/utils/proxy-fetch.js.map +1 -0
  291. package/dist/utils/spinner.js +1 -1
  292. package/dist/utils/sse-parser.js +1 -1
  293. package/dist/utils/string-utils.js +1 -1
  294. package/dist/utils/table-ref-parser.js +1 -1
  295. package/dist/utils/tdx-logger.js +1 -1
  296. package/dist/utils/version-check.js +1 -1
  297. package/package.json +1 -1
@@ -1 +1 @@
1
- const a56_0x28b4c4=a56_0x3ea7;(function(_0x6ef945,_0x2dfb02){const _0x522669=a56_0x3ea7,_0x11f443=_0x6ef945();while(!![]){try{const _0x34b9c1=-parseInt(_0x522669(0x324))/0x1+parseInt(_0x522669(0x29c))/0x2+-parseInt(_0x522669(0x216))/0x3*(-parseInt(_0x522669(0x2d5))/0x4)+parseInt(_0x522669(0x180))/0x5+-parseInt(_0x522669(0x309))/0x6+parseInt(_0x522669(0x2ff))/0x7+-parseInt(_0x522669(0x207))/0x8;if(_0x34b9c1===_0x2dfb02)break;else _0x11f443['push'](_0x11f443['shift']());}catch(_0x1d84eb){_0x11f443['push'](_0x11f443['shift']());}}}(a56_0x4620,0xe1563));import a56_0x3ae1dc from'chalk';import{existsSync}from'fs';import a56_0x49ff99 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_0x4687fd from'prompts';function getAttemptStatusDisplay(_0x22105e){const _0x50b5d6=a56_0x3ea7;if(!_0x22105e)return{'icon':'⏳','text':''};const {done:_0x3c6630,success:_0x4aaa40,cancelRequested:_0x4834eb}=_0x22105e;if(!_0x3c6630)return _0x4834eb?{'icon':'🛑','text':a56_0x3ae1dc[_0x50b5d6(0x2df)](_0x50b5d6(0x1e7))}:{'icon':'🔄','text':a56_0x3ae1dc['blue']('running')};if(_0x4aaa40)return{'icon':'✅','text':a56_0x3ae1dc[_0x50b5d6(0x258)](_0x50b5d6(0x244))};return{'icon':'❌','text':a56_0x3ae1dc['red'](_0x50b5d6(0x174))};}export class WorkflowBaseCommand extends BaseCommand{[a56_0x28b4c4(0x222)](_0x3989f3,_0xe1b117,_0x4bf7ad=0x0){const _0x26c5d9=a56_0x28b4c4;return _0x3989f3[_0x4bf7ad]||_0xe1b117[_0x26c5d9(0x280)];}['requireProject'](_0x41e962,_0x3d49df,_0x8d86dd=0x0){const _0x23dc61=a56_0x28b4c4,_0x31e776=this[_0x23dc61(0x222)](_0x41e962,_0x3d49df,_0x8d86dd);if(!_0x31e776)return console['error'](a56_0x3ae1dc[_0x23dc61(0x31c)](_0x23dc61(0x31e)),_0x23dc61(0x215)),console[_0x23dc61(0x174)](a56_0x3ae1dc[_0x23dc61(0x18b)](_0x23dc61(0x2a8))),null;return _0x31e776;}[a56_0x28b4c4(0x1c1)](_0x4a7b58,_0x3a4370){const _0x4c9d87=a56_0x28b4c4;if(_0x4a7b58[0x0]){const _0x58bfb8=_0x4a7b58[0x0][_0x4c9d87(0x2a3)]('.');if(_0x58bfb8[_0x4c9d87(0x24f)]===0x1)return{'projectName':_0x58bfb8[0x0],'workflowName':undefined};else return _0x58bfb8[_0x4c9d87(0x24f)]===0x2?{'projectName':_0x58bfb8[0x0],'workflowName':_0x58bfb8[0x1]}:(console['error'](a56_0x3ae1dc[_0x4c9d87(0x31c)](_0x4c9d87(0x31e)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x3a4370['workflowProject'],'workflowName':undefined};}[a56_0x28b4c4(0x2f3)](_0x3fd394,_0x98a0bd,_0x3371c3=0x0){const _0x2758c6=a56_0x28b4c4;if(_0x3fd394[_0x3371c3])return _0x3fd394[_0x3371c3];if(_0x98a0bd['workflowProject']){const _0x5078ae=a56_0x49ff99[_0x2758c6(0x272)](process[_0x2758c6(0x278)](),_0x2758c6(0x315),_0x98a0bd['workflowProject']);if(existsSync(a56_0x49ff99[_0x2758c6(0x272)](_0x5078ae,_0x2758c6(0x270))))return _0x5078ae;}return undefined;}async['showWorkflowConsoleUrl'](_0x2f781f,_0x3efd04,_0x10c171){const _0x2ea678=a56_0x28b4c4;try{const _0x1aef81=await _0x2f781f['workflow']['workflows'](_0x3efd04,{'limit':0x1});if(_0x1aef81['length']>0x0){const _0x1c90c7=_0x1aef81[0x0]['id'],_0x1fa1fc=getWorkflowUrl(_0x10c171,_0x1c90c7);console['error'](_0x2ea678(0x2c6)+a56_0x3ae1dc[_0x2ea678(0x218)](_0x1fa1fc));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]='workflow:use';[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x279);async[a56_0x28b4c4(0x195)](_0x5e04a9){const _0x383eee=a56_0x28b4c4,{options:_0x1de8a1,args:_0x18d083,tdx:_0x11d2f4}=_0x5e04a9,_0x15bf12=_0x18d083[0x0],_0x1381f0=_0x1de8a1[_0x383eee(0x236)];if(_0x1381f0)return saveSessionContext({'workflow_project':undefined},_0x1de8a1[_0x383eee(0x295)]),console[_0x383eee(0x2b0)](a56_0x3ae1dc[_0x383eee(0x258)](_0x383eee(0x17a))),0x0;if(!_0x15bf12)return console[_0x383eee(0x174)](a56_0x3ae1dc['red']('Error:'),'Project\x20name\x20is\x20required'),console['error'](a56_0x3ae1dc[_0x383eee(0x18b)](_0x383eee(0x2dd))),console[_0x383eee(0x174)](a56_0x3ae1dc[_0x383eee(0x18b)](_0x383eee(0x211))),0x1;const _0xff3186=await withSpinner(_0x383eee(0x1fe)+_0x15bf12+'\x27...',()=>_0x11d2f4['workflow'][_0x383eee(0x2f6)](_0x15bf12),{'verbose':_0x1de8a1['verbose']}),{name:_0x165902}=_0xff3186[_0x383eee(0x2c5)];return saveSessionContext({'workflow_project':_0x165902},_0x1de8a1[_0x383eee(0x295)]),console[_0x383eee(0x2b0)](a56_0x3ae1dc[_0x383eee(0x258)](_0x383eee(0x26e)+a56_0x3ae1dc[_0x383eee(0x218)](_0x165902))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x2a9);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x23b);async[a56_0x28b4c4(0x195)](_0x367c9c){const _0x48d8c7=a56_0x28b4c4,{options:_0x4119aa,args:_0x5a9017,tdx:_0x1b1dad}=_0x367c9c,_0x1592d3=_0x5a9017[0x0];_0x4119aa[_0x48d8c7(0x28c)]&&_0x1592d3&&console[_0x48d8c7(0x174)](_0x48d8c7(0x2e6)+_0x1592d3);const _0x9b1313=await withSpinner(_0x48d8c7(0x2e0),()=>_0x1b1dad[_0x48d8c7(0x2b9)][_0x48d8c7(0x1a4)](_0x1592d3,{'limit':_0x4119aa[_0x48d8c7(0x1b3)]}),{'verbose':_0x4119aa['verbose']});let _0x4d5385=_0x9b1313[_0x48d8c7(0x2c5)];_0x4d5385[_0x48d8c7(0x1ed)]((_0x17b620,_0x52d80e)=>_0x17b620[_0x48d8c7(0x22a)]['localeCompare'](_0x52d80e[_0x48d8c7(0x22a)]));const _0x9e9581=_0x4119aa[_0x48d8c7(0x1b3)]&&_0x4d5385[_0x48d8c7(0x24f)]>=_0x4119aa[_0x48d8c7(0x1b3)]?a56_0x3ae1dc['dim'](_0x48d8c7(0x2cd)):'';console[_0x48d8c7(0x174)](_0x48d8c7(0x209)+_0x4d5385[_0x48d8c7(0x24f)]+_0x48d8c7(0x319)+(_0x4d5385['length']!==0x1?'s':'')+_0x9e9581);if(_0x4119aa[_0x48d8c7(0x213)]===_0x48d8c7(0x25f)||_0x4119aa[_0x48d8c7(0x213)]===_0x48d8c7(0x257)||_0x4119aa[_0x48d8c7(0x213)]===_0x48d8c7(0x1c5))await handleSDKOutput(_0x4d5385,_0x4119aa);else{if(_0x4d5385[_0x48d8c7(0x24f)]===0x0)_0x1592d3?console[_0x48d8c7(0x2b0)](_0x48d8c7(0x1ad)+_0x1592d3):console['log']('No\x20workflow\x20projects\x20found');else{const _0x1e4fd3=_0x4d5385[_0x48d8c7(0x241)](_0x3f777c=>{const _0xd2982d=_0x48d8c7,_0x5ab27d=_0x3f777c[_0xd2982d(0x2b6)]?.[_0xd2982d(0x1e5)](_0xa641a6=>_0xa641a6['key']===_0xd2982d(0x202)),_0x5bee12=_0x5ab27d?a56_0x3ae1dc['dim'](_0xd2982d(0x188)):'';return _0xd2982d(0x2c4)+_0x3f777c['name']+_0x5bee12;});await writeOutput(_0x1e4fd3[_0x48d8c7(0x272)]('\x0a'),_0x4119aa[_0x48d8c7(0x21b)],_0x48d8c7(0x1b7));}}return 0x0;}}function a56_0x4620(){const _0xe5e6e6=['Listing\x20workflow\x20projects...','Workflow:\x20','\x20disabled\x20(','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','Listing\x20workflow\x20sessions...','Session\x20not\x20found:\x20','Pattern:\x20','toLowerCase','max','Using\x20attempt\x20','workflow:kill','\x22\x20already\x20exists\x20(ID:\x20','round','Analyzing\x20changes...','\x20deleted','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','projectId','MAX_TIMELINE_WIDTH','padStart','resolveProjectDir','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','workflow:schedules','resolveProjectId','get','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','total','toLocaleString','parse','has','attempt:','showWorkflowConsoleUrl','8363061doTXYE','Source\x20directory:\x20','durationMs','Parameters:\x20','workflow:clone','now','(unknown)','From\x20task:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Error:\x20Invalid\x20JSON\x20in\x20--params','4439688CjPCnE','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','renderTimeline','rows','dryRun','Status:\x20','deleted','type','\x20\x20Next\x20run:\x20','---\x20','Enable\x20a\x20workflow\x20schedule','POLL_INTERVAL_MS','workflows','workflow:push','delete','new','\x20project','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','red','\x20workflow','Error:','Filter:\x20','\x20secrets\x20set\x20for\x20project\x20\x27','Show\x20tasks\x20for\x20an\x20attempt','session_id','Filter:\x20project=','1682088REPffp','Tip:\x20cd\x20to\x20workflows/','\x20has\x20no\x20attempts','floor','💡\x20Tip:\x20Use\x20','List\x20workflows','set','\x0aDry\x20run\x20-\x20no\x20project\x20created','attempt','Schedule\x20ID\x20is\x20required','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Project\x20filter:\x20','Pushing\x20project...','getTime','group_error','workflow:run','Cancelled','Workflow:','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Updating\x20','prepareCloneProject','blue','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','setSecrets','Setting\x20','splice','fromTask','disableSchedule','cancelRequested','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Secrets\x20to\x20set:\x20','isArray','revision','→\x20Project:\x20','🔄\x20','getHours','sourceDir','running','reason','Total:\x20','error','unknown','resumeFrom','Deleting\x20project\x20','workflow:timeline','window','✔\x20Workflow\x20project\x20context\x20cleared.','✔\x20Schedule\x20#','run','\x20\x20Location:\x20','startTime','Error:\x20Secret\x20key\x20is\x20required','6352205ziWodU','path','List\x20workflow\x20attempts','revision:\x20','includeRetried','Task\x20graph:','taskName','\x20\x20tdx\x20wf\x20use\x20<project>','\x20(system)','status','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','dim','config','\x20schedule','Downloading\x20logs...','columns','workflow:schedule:enable','Reason:\x20','start','\x20from\x20session\x20','GUTTER','execute','Error:\x20','startsWith','match','\x20\x20Project:\x20','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x20\x20Workflow:\x20','Analyzing\x20project...','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','replace','\x0aClone\x20\x22','end','Pull\x20workflow\x20project\x20to\x20local\x20folder','projects','Target:\x20','listProjectSchedules','updatedAt','download','fileSize','MAX_LABEL_COUNT','getDate','relative','No\x20projects\x20match\x20pattern:\x20','newProjectId','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','changes','✔\x20Schedule\x20found','Source\x20project:\x20','limit','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20-\x20','disabledAt','list','stdout','-\x20no\x20files\x20written','project',',\x20Workflow:\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','\x0aError:','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','retryAttempt','parseProjectWorkflowPattern','startedAt','\x20next:\x20','finishedAt','table','getMinutes','(use\x20--limit\x20to\x20see\x20more)','done','No\x20sessions\x20found','Setting\x20secret...','title','applyPullProject','bold','Retrying\x20attempt...','\x22\x20to\x20new\x20project\x20\x22','workflowName','\x20secrets...','listSchedules','\x20\x20Source:\x20','\x20\x20Session\x20context\x20set\x20to:\x20','...','select','MAX_TASKS_DISPLAY','filter','trimEnd','✔\x20Showing\x20','/sessions/','toISOString','lastAttempt','renderSingleTimeline','site','Fetching\x20schedule\x20#','Show\x20specific\x20attempt\x20details','No\x20sessions\x20with\x20timing\x20information','filesExtracted','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','some','Dry\x20run:\x20yes','canceling','\x27\x20from\x20project\x20\x27','executePushProject','description','sessionTime','renderSessionsTimeline','sort','Start\x20a\x20workflow\x20run','localeCompare','workflow:attempts','pending','Listing\x20schedules\x20for\x20','Disabling\x20schedule\x20#','No\x20matching\x20sessions\x20found','\x0aApply\x20these\x20changes?','min','getMonth','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','fill','basename','Error:\x20Attempt\x20ID\x20is\x20required','workflow:delete','Resolving\x20project\x20\x27','state','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','indexOf','sys','utf-8','follow','includeSubtasks','readFile','6767576SwZxpW','Usage:\x20workflow:delete\x20<project-name-or-id>','✔\x20Found\x20','autocomplete','kill','workflow:sessions','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','existingProjectId','nextTime','tasks','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','format','\x20\x20Attempt\x20ID:\x20','Project\x20name\x20is\x20required','3958887REbSox','Retry\x20a\x20session\x20or\x20attempt','cyan','fs/promises','write','output','workflow:attempt','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','duration','workflow:schedule:disable','push','navigateSessionsInteractive','resolveProject','Parameters:','No\x20attempts\x20found\x20for:\x20','Attempt\x20ID:\x20','Cloning\x20to\x20','Retrying\x20session...','Validation:\x20skipped','Listing\x20workflows...','name','generateSessionTimelineRows','resolve','logs','\x20modified','Fetching\x20log\x20files...','summary','size','force','/app/workflows/','New\x20project\x20name:\x20','Project\x20directory:\x20','clear','\x0aDry\x20run\x20-\x20nothing\x20pushed','Source:\x20','context','from','List\x20all\x20workflow\x20projects','Including\x20subtasks:\x20yes','\x0aFailed\x20to\x20fetch\x20attempt\x20data','\x22\x20with\x20new\x20revision?','✔\x20Clone\x20complete','\x0aUpdate\x20existing\x20project\x20\x22','map','sessions','stat','success','skipValidation','param','all','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','attemptId','Source\x20directory\x20is\x20required','substring','isTTY','Show\x20logs\x20for\x20a\x20workflow\x20attempt','sourceProjectName','length','✔\x20Project:\x20','Enabling\x20schedule\x20#','\x20task','params','\x20new','Task\x20name:\x20','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','jsonl','green','\x0a✔\x20No\x20changes\x20to\x20push','buildTimelineData','✔\x20Secret\x20\x27','MIN_TIMELINE_WIDTH','targetDir','Fetching\x20workflow\x20','json','.\x20Expected\x20format:\x20KEY=VALUE','attempts','LABEL_MIN_SPACING','keys','\x20attempt','Params:\x20','logFiles','Select\x20a\x20session\x20to\x20view\x20timeline:','\x1b[1A\x1b[2K','newProjectName','unchanged','workflow:upload','Loading\x20workflows...','getFullYear','✔\x20Workflow\x20project\x20set\x20to:\x20','\x20\x20Project\x20ID:\x20','tdx.json','executeDryRun','join','repeat','Error:\x20Project\x20name\x20is\x20required','Project:\x20','planned','Key\x20cannot\x20be\x20empty','cwd','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','fileCount','key','\x0a✔\x20Already\x20up\x20to\x20date','Invalid\x20format:\x20','message','Resume\x20from:\x20','workflowProject','workflow:secrets:list','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','every','Include\x20retried:\x20yes','Loading\x20sessions...','Listing\x20secrets...','task','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','\x20\x20Session\x20ID:\x20','No\x20attempts\x20found\x20in\x20project:\x20','Loading\x20session...','verbose','listSecrets','No\x20workflow\x20sessions\x20found','isNewProject','Pushing\x20workflow\x20project...','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Listing\x20schedules...','\x20logs','No\x20attempts\x20found','session','✔\x20Project\x20updated','ICON_WIDTH','Pulling\x20project\x20','modified','targetExists','No\x20workflows\x20found','812338ILecfQ','No\x20log\x20files\x20found\x20for\x20this\x20attempt','⚠\x20Showing\x20first\x20','fullName','Getting\x20attempt\x20details...','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','executeCloneProject','split','sessionId','📋\x20','\x20secret','Revision:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','workflow:projects','tdx\x20wf\x20attempt\x20','→\x20New\x20project:\x20','\x20\x20Revision:\x20','Disable\x20a\x20workflow\x20schedule','yes','\x20(disabled)','log','Starting\x20workflow\x20run...','Error:\x20Invalid\x20parameter\x20format:\x20','workflow:secrets:set','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Select\x20a\x20task\x20to\x20view\x20logs:','metadata','includes','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','workflow','Key:\x20','createdAt','workflow:pull','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','retryAttemptName','Downloading\x20project\x20','Force:\x20yes','pollTimeline','projectName','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','📁\x20','data','\x20\x20Console:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','slice','No\x20sessions\x20found\x20for:\x20','workflow:workflows','skipSchedule','Getting\x20attempt\x20tasks...','\x20(use\x20--limit\x20to\x20show\x20more)','\x0aPush\x20these\x20changes?','Files\x20to\x20upload:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','find','Target\x20directory:\x20','nextRunTime','values','4tLPEqn','icon','index','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','hasChanges','-\x20nothing\x20pushed','✔\x20Pushed\x20','diff','Usage:\x20tdx\x20wf\x20use\x20<project>','No\x20sessions\x20found\x20in\x20project:\x20','yellow'];a56_0x4620=function(){return _0xe5e6e6;};return a56_0x4620();}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a56_0x28b4c4(0x2ca);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x329);async[a56_0x28b4c4(0x195)](_0xbf2503){const _0x1972ad=a56_0x28b4c4,{options:_0x210a2f,args:_0x200efa,tdx:_0x70de96}=_0xbf2503,_0x16e850=this['resolveProject'](_0x200efa,_0x210a2f);_0x210a2f['verbose']&&_0x16e850&&console['error'](_0x1972ad(0x32f)+_0x16e850);const _0x10e6a4=await withSpinner(_0x1972ad(0x229),()=>_0x70de96[_0x1972ad(0x2b9)][_0x1972ad(0x315)](_0x16e850,{'limit':_0x210a2f[_0x1972ad(0x1b3)]}),{'verbose':_0x210a2f[_0x1972ad(0x28c)]});let _0x3ee07f=_0x10e6a4['data'];_0x3ee07f['sort']((_0x11ebfa,_0x247ca8)=>{const _0x5c2005=_0x1972ad,_0x130df1=_0x11ebfa[_0x5c2005(0x22a)][_0x5c2005(0x1ef)](_0x247ca8[_0x5c2005(0x22a)]);if(_0x130df1!==0x0)return _0x130df1;return(_0x11ebfa['project']?.[_0x5c2005(0x22a)]||'')['localeCompare'](_0x247ca8[_0x5c2005(0x1ba)]?.[_0x5c2005(0x22a)]||'');});const _0x4ae78f=_0x210a2f['limit']&&_0x3ee07f[_0x1972ad(0x24f)]>=_0x210a2f[_0x1972ad(0x1b3)]?a56_0x3ae1dc[_0x1972ad(0x18b)](_0x1972ad(0x2cd)):'';console[_0x1972ad(0x174)]('✔\x20Found\x20'+_0x3ee07f[_0x1972ad(0x24f)]+_0x1972ad(0x31d)+(_0x3ee07f[_0x1972ad(0x24f)]!==0x1?'s':'')+_0x4ae78f);if(_0x210a2f['format']==='json'||_0x210a2f[_0x1972ad(0x213)]==='jsonl'||_0x210a2f[_0x1972ad(0x213)]===_0x1972ad(0x1c5))await handleSDKOutput(_0x3ee07f,_0x210a2f);else{if(_0x3ee07f[_0x1972ad(0x24f)]===0x0)_0x16e850?console[_0x1972ad(0x2b0)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x16e850):console['log'](_0x1972ad(0x29b));else{const _0x4bfa5a=_0x210a2f['site'],_0x262479=_0x3ee07f[_0x1972ad(0x241)](_0x94939=>{const _0x206757=_0x1972ad,_0xc21197=a56_0x3ae1dc['dim']('#'+_0x94939['id']),_0x3033aa=hyperlink(_0xc21197,getWorkflowUrl(_0x4bfa5a,_0x94939['id'])),_0x170fa8=_0x94939[_0x206757(0x1ba)]?.['name']?a56_0x3ae1dc['dim']('\x20('+_0x94939[_0x206757(0x1ba)][_0x206757(0x22a)]+')'):'';return _0x206757(0x2a5)+_0x3033aa+'\x20'+_0x94939[_0x206757(0x22a)]+_0x170fa8;});await writeOutput(_0x262479[_0x1972ad(0x272)]('\x0a'),_0x210a2f['output'],_0x1972ad(0x1b7));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a56_0x28b4c4(0x20c);[a56_0x28b4c4(0x1ea)]='List\x20workflow\x20execution\x20sessions';async['execute'](_0x22ad78){const _0x109801=a56_0x28b4c4,{options:_0x207147,args:_0x45d732,tdx:_0x345d75}=_0x22ad78,_0x572971=this[_0x109801(0x1c1)](_0x45d732,_0x207147);if(!_0x572971)return 0x1;const {projectName:_0x20adeb,workflowName:_0x36af1b}=_0x572971;if(_0x207147[_0x109801(0x28c)]){if(_0x20adeb&&_0x36af1b)console['error']('Filter:\x20'+_0x20adeb+'.'+_0x36af1b);else _0x20adeb&&console['error'](_0x109801(0x323)+_0x20adeb);const _0x1540e7=_0x207147[_0x109801(0x189)];_0x1540e7&&console['error'](_0x109801(0x30e)+_0x1540e7);}let _0x410a55=0x28;if(process[_0x109801(0x1b8)][_0x109801(0x24c)]&&!_0x207147[_0x109801(0x21b)]&&!_0x207147[_0x109801(0x213)]){const _0x1eb0ae=process['stdout'][_0x109801(0x30c)]||0x28;_0x410a55=Math[_0x109801(0x2e8)](0x14,Math['floor'](_0x1eb0ae*0x2/0x3));}const _0x34d0a5=_0x207147[_0x109801(0x1b3)]||_0x410a55,_0x489161=await withSpinner(_0x109801(0x2e4),()=>_0x345d75['workflow'][_0x109801(0x242)]({'projectName':_0x20adeb,'workflowName':_0x36af1b,'status':_0x207147[_0x109801(0x189)],'fromTime':_0x207147[_0x109801(0x23a)],'toTime':_0x207147['to'],'limit':_0x34d0a5}),{'verbose':_0x207147[_0x109801(0x28c)]}),_0x1979f9=_0x489161[_0x109801(0x2c5)];_0x1979f9['sort']((_0x21511d,_0x2610d6)=>{const _0x574675=_0x109801,_0x2b5e75=_0x21511d[_0x574675(0x1eb)]||'',_0x37eb86=_0x2610d6[_0x574675(0x1eb)]||'';return _0x37eb86[_0x574675(0x1ef)](_0x2b5e75);});_0x1979f9[_0x109801(0x24f)]>=_0x34d0a5?console[_0x109801(0x174)](_0x109801(0x1da)+_0x1979f9['length']+'\x20sessions\x20'+a56_0x3ae1dc['dim'](_0x109801(0x1c7))):console[_0x109801(0x174)](_0x109801(0x209)+_0x1979f9['length']+'\x20session'+(_0x1979f9[_0x109801(0x24f)]!==0x1?'s':''));if(_0x207147[_0x109801(0x213)]==='json'||_0x207147[_0x109801(0x213)]===_0x109801(0x257)||_0x207147['format']==='table')await handleSDKOutput(_0x1979f9,_0x207147);else{if(!process[_0x109801(0x1b8)]['isTTY']||_0x207147[_0x109801(0x21b)]){if(_0x1979f9[_0x109801(0x24f)]===0x0){if(_0x20adeb&&_0x36af1b)console[_0x109801(0x2b0)](_0x109801(0x2c9)+_0x20adeb+'.'+_0x36af1b);else _0x20adeb?console[_0x109801(0x2b0)](_0x109801(0x2de)+_0x20adeb):console[_0x109801(0x2b0)](_0x109801(0x1c9));}else{const _0x3f14d7=_0x207147[_0x109801(0x1df)],_0x874a8=this[_0x109801(0x1ec)](_0x1979f9,_0x3f14d7);_0x207147[_0x109801(0x21b)]?await writeOutput(_0x874a8,_0x207147['output'],'list'):console[_0x109801(0x2b0)](_0x874a8);}!_0x20adeb&&(console['error'](''),console[_0x109801(0x174)](a56_0x3ae1dc['dim']('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a56_0x3ae1dc['dim'](_0x109801(0x1be))+'or'+a56_0x3ae1dc[_0x109801(0x18b)](_0x109801(0x187))));}else{if(_0x1979f9[_0x109801(0x24f)]===0x0){if(_0x20adeb&&_0x36af1b)console[_0x109801(0x2b0)](_0x109801(0x2c9)+_0x20adeb+'.'+_0x36af1b);else _0x20adeb?console[_0x109801(0x2b0)](_0x109801(0x2de)+_0x20adeb):console[_0x109801(0x2b0)](_0x109801(0x1c9));}else await this['navigateSessionsInteractive'](_0x1979f9,_0x22ad78,_0x20adeb);}}return 0x0;}['renderSessionsTimeline'](_0x927df0,_0xe2a9fa){const _0x539dcc=a56_0x28b4c4,_0x67ecd=[],_0x2f6ba7=new Map();let _0x2bfab2=Infinity,_0x26a357=-Infinity;for(const _0x139d6a of _0x927df0){if(_0x139d6a[_0x539dcc(0x1dd)]?.[_0x539dcc(0x2bb)]){const _0x38b942=new Date(_0x139d6a[_0x539dcc(0x1dd)][_0x539dcc(0x2bb)])['getTime'](),_0x3a468a=_0x139d6a[_0x539dcc(0x1dd)]['finishedAt']?new Date(_0x139d6a[_0x539dcc(0x1dd)][_0x539dcc(0x1c4)])[_0x539dcc(0x331)]():Date[_0x539dcc(0x304)](),_0x44cc76=_0x139d6a[_0x539dcc(0x1ba)]?.[_0x539dcc(0x22a)]||'(unknown)';!_0x2f6ba7[_0x539dcc(0x2fc)](_0x44cc76)&&_0x2f6ba7['set'](_0x44cc76,[]),_0x2f6ba7[_0x539dcc(0x2f7)](_0x44cc76)[_0x539dcc(0x220)]({'session':_0x139d6a,'startTime':_0x38b942,'endTime':_0x3a468a,'duration':_0x3a468a-_0x38b942}),_0x2bfab2=Math[_0x539dcc(0x1f6)](_0x2bfab2,_0x38b942),_0x26a357=Math['max'](_0x26a357,_0x3a468a);}}if(_0x2f6ba7[_0x539dcc(0x231)]===0x0)return _0x539dcc(0x1e2);const _0x49235f=process[_0x539dcc(0x1b8)][_0x539dcc(0x18f)]||0x78,_0x1f43ec=0x1e,_0x36b050=0x32,_0x474efc=0x4,_0x36a169=Math[_0x539dcc(0x1f6)](_0x36b050,Math[_0x539dcc(0x2e8)](_0x1f43ec,Math['floor'](_0x49235f*0.3))),_0x42d77a=_0x49235f-_0x36a169-TIMELINE_CONFIG[_0x539dcc(0x194)]-0x3-_0x474efc,_0x5e0e1f=_0x26a357-_0x2bfab2,_0x1fe7a8=_0x5e0e1f/_0x36a169,_0x44385c=renderTimeAxis({'startTime':_0x2bfab2,'endTime':_0x26a357,'durationMs':_0x5e0e1f,'msPerChar':_0x1fe7a8},_0x36a169),_0x3eeac0=[];for(const _0x3d86a7 of _0x2f6ba7[_0x539dcc(0x2d4)]()){_0x3eeac0[_0x539dcc(0x220)](..._0x3d86a7);}_0x3eeac0[_0x539dcc(0x1ed)]((_0x4121d2,_0x345929)=>_0x345929[_0x539dcc(0x17e)]-_0x4121d2[_0x539dcc(0x17e)]);const _0x542795=new Date(_0x2bfab2),_0x38592d=formatDate(_0x542795),_0x4112df=_0x474efc+TIMELINE_CONFIG[_0x539dcc(0x297)]+TIMELINE_CONFIG['ICON_SPACING']+_0x42d77a,_0x27d0a1='\x20'[_0x539dcc(0x273)](_0x4112df-_0x38592d[_0x539dcc(0x24f)]),_0x349743=_0x27d0a1+a56_0x3ae1dc[_0x539dcc(0x18b)](_0x38592d)+'\x20'+_0x44385c;_0x67ecd[_0x539dcc(0x220)](_0x349743);const _0x398935=0x16;let _0x872e4f=0x0;for(const _0x22c0cb of _0x3eeac0){const _0x1ba1e5=_0x22c0cb[_0x539dcc(0x295)][_0x539dcc(0x1ba)]?.[_0x539dcc(0x22a)]||'?',_0x105d52=Math['min'](stringWidth(_0x1ba1e5),_0x398935);_0x872e4f=Math[_0x539dcc(0x2e8)](_0x872e4f,_0x105d52);}for(const _0x582209 of _0x3eeac0){const {session:_0x4f46c9,startTime:_0x30192b,endTime:_0x371a49,duration:_0x1042d1}=_0x582209,_0x536990=_0x4f46c9[_0x539dcc(0x1ba)]?.['id'],_0x13bc8f=_0x4f46c9['id'],_0x3d0c16=_0x4f46c9[_0x539dcc(0x1ba)]?.[_0x539dcc(0x22a)]||'?',_0x5c9a55=_0x4f46c9[_0x539dcc(0x2b9)]?.[_0x539dcc(0x22a)]||'?';let _0x11b0d1,_0xef9499;if(_0x4f46c9[_0x539dcc(0x1dd)]){const _0xcbb05d=_0x4f46c9[_0x539dcc(0x1dd)];!_0xcbb05d['done']?(_0x11b0d1=_0xcbb05d[_0x539dcc(0x340)]?'🛑':'🔄',_0xef9499=_0xcbb05d[_0x539dcc(0x340)]?a56_0x3ae1dc[_0x539dcc(0x2df)]:a56_0x3ae1dc['blue']):(_0x11b0d1=_0xcbb05d['success']?'✅':'❌',_0xef9499=_0xcbb05d[_0x539dcc(0x244)]?a56_0x3ae1dc[_0x539dcc(0x258)]:a56_0x3ae1dc['red']);}else _0x11b0d1='⏳',_0xef9499=a56_0x3ae1dc[_0x539dcc(0x18b)];const _0x4fa45c='#'+_0x13bc8f,_0x55fbe1=_0x536990?hyperlink(_0x4fa45c,getWorkflowSessionUrl(_0xe2a9fa,_0x536990,_0x13bc8f)):_0x4fa45c;let _0x379d4f=_0x3d0c16;stringWidth(_0x3d0c16)>_0x398935&&(_0x379d4f=_0x3d0c16['slice'](0x0,_0x398935-0x1)+'…');const _0x6af0ab=a56_0x3ae1dc[_0x539dcc(0x18b)](_0x379d4f),_0x2f42b5=stringWidth(_0x379d4f),_0x499bb0='\x20'[_0x539dcc(0x273)](_0x872e4f-stringWidth(_0x379d4f)+0x2),_0x3eaa48='('+formatElapsed(_0x1042d1)+')',_0x188e9e=stringWidth(_0x3eaa48),_0x1e3665=stringWidth(_0x4fa45c),_0xa9e98a=_0x1e3665+0x1+_0x2f42b5+_0x499bb0[_0x539dcc(0x24f)],_0x342907=_0x42d77a-_0xa9e98a-_0x188e9e-0x1-0x8;let _0x584f7d=_0x5c9a55;stringWidth(_0x584f7d)>_0x342907&&(_0x584f7d=_0x584f7d['slice'](0x0,_0x342907-0x1)+'…');const _0x4f8029=_0x55fbe1+'\x20'+_0x6af0ab+_0x499bb0+_0x584f7d,_0x5e9ee5=stringWidth(_0x4f8029),_0x4c559c=_0x42d77a-_0x5e9ee5-_0x188e9e,_0x1c9196=_0x4f8029+'\x20'[_0x539dcc(0x273)](Math[_0x539dcc(0x2e8)](0x1,_0x4c559c))+a56_0x3ae1dc[_0x539dcc(0x18b)](_0x3eaa48),_0x57cacf=Math[_0x539dcc(0x327)]((_0x30192b-_0x2bfab2)/_0x1fe7a8),_0x4bc0da=Math[_0x539dcc(0x327)]((_0x371a49-_0x2bfab2)/_0x1fe7a8),_0x55dff9=Math[_0x539dcc(0x2e8)](_0x57cacf+0x1,_0x4bc0da),_0x26fd20=new Array(_0x36a169)['fill']('\x20');for(let _0x3b8c91=_0x57cacf;_0x3b8c91<Math[_0x539dcc(0x1f6)](_0x55dff9,_0x36a169);_0x3b8c91++){_0x26fd20[_0x3b8c91]='─';}const _0x446e18=_0x26fd20[_0x539dcc(0x241)](_0x3e140c=>_0x3e140c==='\x20'?'\x20':_0xef9499(_0x3e140c))[_0x539dcc(0x272)]('');_0x67ecd['push'](_0x11b0d1+'\x20'+_0x1c9196+'│'+_0x446e18+'│');}return _0x67ecd[_0x539dcc(0x272)]('\x0a');}async[a56_0x28b4c4(0x221)](_0x2e43f9,_0x285f15,_0x31dccd){const _0x18720b=a56_0x28b4c4,{options:_0x30607a,tdx:_0x2ee6a4}=_0x285f15,_0x4cad7e=_0x30607a[_0x18720b(0x1df)],{timelineRows:_0x112a22,timeAxisHeader:_0xd8b6ad}=this['generateSessionTimelineRows'](_0x2e43f9,_0x4cad7e),_0x56b740=_0x112a22[_0x18720b(0x1d8)](_0x599135=>_0x599135[_0x18720b(0x249)]);if(_0x56b740[_0x18720b(0x24f)]===0x0){const _0x4794a8=this[_0x18720b(0x1ec)](_0x2e43f9,_0x4cad7e);console[_0x18720b(0x2b0)](_0x4794a8);!_0x31dccd&&(console['error'](''),console['error'](a56_0x3ae1dc['dim'](_0x18720b(0x1e4))),console[_0x18720b(0x174)](a56_0x3ae1dc[_0x18720b(0x18b)](_0x18720b(0x1be))+'or'+a56_0x3ae1dc[_0x18720b(0x18b)](_0x18720b(0x187))));return;}_0xd8b6ad&&console[_0x18720b(0x2b0)](_0xd8b6ad);const _0x7c0997=_0x112a22[_0x18720b(0x1d8)](_0x3fa673=>_0x3fa673[_0x18720b(0x249)])['map'](_0x519455=>({'title':_0x519455['displayLine'],'value':_0x519455[_0x18720b(0x249)]})),_0x4cf904=process[_0x18720b(0x1b8)][_0x18720b(0x30c)]||0x3c,_0x166b5a=Math[_0x18720b(0x2e8)](0x28,Math[_0x18720b(0x327)](_0x4cf904*0x2/0x3)),_0x2a09f8=await a56_0x4687fd({'type':_0x18720b(0x20a),'name':_0x18720b(0x249),'message':_0x18720b(0x32e),'choices':_0x7c0997,'initial':-0x1,'limit':_0x166b5a,'clearFirst':!![],'fallback':{'title':_0x18720b(0x1f4),'value':null},'suggest':(_0x1b5c55,_0x1a5635)=>{const _0x464ecd=_0x18720b;if(!_0x1b5c55)return Promise['resolve'](_0x1a5635);const _0x46f605=_0x1a5635[_0x464ecd(0x1d8)](_0x28f01a=>{const _0xe0a047=_0x464ecd,_0x1d13af=_0x28f01a;return _0x1d13af[_0xe0a047(0x1cb)][_0xe0a047(0x2e7)]()[_0xe0a047(0x2b7)](_0x1b5c55[_0xe0a047(0x2e7)]());});return Promise[_0x464ecd(0x22c)](_0x46f605);}}),_0x452d35=()=>{const _0x380a93=_0x18720b;process[_0x380a93(0x1b8)]['write'](_0x380a93(0x268)),process[_0x380a93(0x1b8)][_0x380a93(0x21a)](_0x380a93(0x268)),process['stdout'][_0x380a93(0x21a)](_0x380a93(0x268));},_0x17fd07=_0x2a09f8&&_0x2a09f8[_0x18720b(0x249)]&&_0x2a09f8['attemptId']!==null&&_0x2a09f8['attemptId']['trim']()!=='';if(!_0x17fd07){_0x452d35(),console[_0x18720b(0x2b0)](a56_0x3ae1dc[_0x18720b(0x18b)](_0x18720b(0x334)));return;}_0x452d35();const _0x2ce873=_0x2e43f9['find'](_0x3c22c5=>_0x3c22c5[_0x18720b(0x1dd)]?.['id']===_0x2a09f8['attemptId']);if(_0x2ce873){const _0x5e1491=_0x2ce873[_0x18720b(0x1ba)]?.[_0x18720b(0x22a)]||'?',_0x4cbdb6=_0x2ce873[_0x18720b(0x2b9)]?.[_0x18720b(0x22a)]||'?';console[_0x18720b(0x2b0)](_0x18720b(0x275)+a56_0x3ae1dc[_0x18720b(0x18b)](_0x5e1491)+_0x18720b(0x1bb)+a56_0x3ae1dc['dim'](_0x4cbdb6));}const _0x4c7a0a=new WorkflowTimelineCommand();await _0x4c7a0a[_0x18720b(0x195)]({'args':[],'options':{..._0x30607a,'attemptId':_0x2a09f8['attemptId']},'tdx':_0x2ee6a4});}[a56_0x28b4c4(0x22b)](_0x4212b9,_0x51ed4b){const _0x12cec9=a56_0x28b4c4,_0x44ebe5=new Map();for(const _0x4da498 of _0x4212b9){_0x4da498['id']&&_0x4da498[_0x12cec9(0x1dd)]?.['id']&&_0x44ebe5[_0x12cec9(0x32a)](_0x4da498['id'],_0x4da498[_0x12cec9(0x1dd)]['id']);}const _0x363e20=[];let _0xe1fe51='';const _0x1f50f3=this[_0x12cec9(0x1ec)](_0x4212b9,_0x51ed4b),_0x5c8945=_0x1f50f3[_0x12cec9(0x2a3)]('\x0a');for(const _0x3fd16b of _0x5c8945){if(_0x3fd16b[_0x12cec9(0x197)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x3fd16b[_0x12cec9(0x198)](/^\s+\d{4}-\d{2}-\d{2}/))_0xe1fe51=_0x3fd16b;else{if(_0x3fd16b[_0x12cec9(0x198)](/^[✅❌🔄🛑⏳]/)){const _0x237e0b=_0x3fd16b['match'](/#(\d+)/),_0x4a72c7=_0x237e0b?_0x237e0b[0x1]:null,_0x131a0f=_0x4a72c7?_0x44ebe5[_0x12cec9(0x2f7)](_0x4a72c7)||null:null,_0x1d6026=_0x4212b9[_0x12cec9(0x2d1)](_0x29fead=>_0x29fead['id']===_0x4a72c7),_0xe6e692=_0x1d6026?.['project']?.['name']||'';_0x363e20[_0x12cec9(0x220)]({'displayLine':_0x3fd16b,'attemptId':_0x131a0f,'projectName':_0xe6e692});}}}return{'timelineRows':_0x363e20,'timeAxisHeader':_0xe1fe51};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a56_0x28b4c4(0x1f0);['description']=a56_0x28b4c4(0x182);async[a56_0x28b4c4(0x195)](_0x5b28a5){const _0x2744c2=a56_0x28b4c4,{options:_0x159a4e,args:_0x577246,tdx:_0xfa70d5}=_0x5b28a5,_0x5bf724=this['parseProjectWorkflowPattern'](_0x577246,_0x159a4e);if(!_0x5bf724)return 0x1;const {projectName:_0x21f98b,workflowName:_0x655d73}=_0x5bf724,_0x498f72=_0x159a4e[_0x2744c2(0x184)];if(_0x159a4e[_0x2744c2(0x28c)]){if(_0x21f98b&&_0x655d73)console[_0x2744c2(0x174)](_0x2744c2(0x31f)+_0x21f98b+'.'+_0x655d73);else _0x21f98b&&console['error'](_0x2744c2(0x323)+_0x21f98b);_0x498f72&&console['error'](_0x2744c2(0x284));}const _0x371608=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0xfa70d5[_0x2744c2(0x2b9)][_0x2744c2(0x261)]({'projectName':_0x21f98b,'workflowName':_0x655d73,'includeRetried':_0x498f72,'limit':_0x159a4e['limit']}),{'verbose':_0x159a4e[_0x2744c2(0x28c)]}),_0x221cbb=_0x371608[_0x2744c2(0x2c5)],_0x4b4eff=_0x159a4e['limit']||0x64,_0x261b01=_0x221cbb['length']>=_0x4b4eff?a56_0x3ae1dc[_0x2744c2(0x18b)](_0x2744c2(0x2cd)):'';console[_0x2744c2(0x174)](_0x2744c2(0x209)+_0x221cbb['length']+_0x2744c2(0x264)+(_0x221cbb[_0x2744c2(0x24f)]!==0x1?'s':'')+_0x261b01);if(_0x159a4e[_0x2744c2(0x213)]===_0x2744c2(0x25f)||_0x159a4e[_0x2744c2(0x213)]==='jsonl'||_0x159a4e[_0x2744c2(0x213)]==='table')await handleSDKOutput(_0x221cbb,_0x159a4e);else{if(_0x221cbb[_0x2744c2(0x24f)]===0x0){if(_0x21f98b&&_0x655d73)console['log'](_0x2744c2(0x224)+_0x21f98b+'.'+_0x655d73);else _0x21f98b?console[_0x2744c2(0x2b0)](_0x2744c2(0x28a)+_0x21f98b):console['log'](_0x2744c2(0x294));}else{const _0x5bf587=_0x159a4e[_0x2744c2(0x1df)],_0x30cac0=_0x221cbb['map'](_0x5371ff=>{const _0x657ca4=_0x2744c2,_0x6e5ab9=a56_0x3ae1dc[_0x657ca4(0x18b)]('#'+_0x5371ff['id']),_0x71e4d=_0x5371ff[_0x657ca4(0x1ba)]?.['id'],_0x33684b=_0x5371ff[_0x657ca4(0x322)]||_0x5371ff[_0x657ca4(0x2a4)],_0x3db3ce=_0x71e4d&&_0x33684b?hyperlink(_0x6e5ab9,getWorkflowAttemptUrl(_0x5bf587,_0x71e4d,_0x33684b,_0x5371ff['id'])):_0x6e5ab9,{icon:_0x306564,text:_0x5e55cf}=getAttemptStatusDisplay(_0x5371ff),_0x4d602c=(_0x5371ff[_0x657ca4(0x1ba)]?.[_0x657ca4(0x22a)]||'?')+'.'+(_0x5371ff['workflow']?.[_0x657ca4(0x22a)]||'?'),_0x4653f4=_0x5371ff[_0x657ca4(0x1eb)]?a56_0x3ae1dc[_0x657ca4(0x18b)](_0x5371ff[_0x657ca4(0x1eb)]):'';return(_0x3db3ce+'\x20'+_0x306564+(_0x5e55cf?'\x20'+_0x5e55cf:'')+'\x20'+_0x4d602c+'\x20'+_0x4653f4)[_0x657ca4(0x1d9)]();});await writeOutput(_0x30cac0[_0x2744c2(0x272)]('\x0a'),_0x159a4e['output'],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x21c);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x1e1);async[a56_0x28b4c4(0x195)](_0x5364c9){const _0x40755f=a56_0x28b4c4,{options:_0x357117,args:_0x39333a,tdx:_0x5cb5ff}=_0x5364c9,_0x5b4c34=_0x39333a[0x0];if(!_0x5b4c34)return console[_0x40755f(0x174)](_0x40755f(0x1fc)),0x1;_0x357117[_0x40755f(0x28c)]&&console[_0x40755f(0x174)]('Attempt\x20ID:\x20'+_0x5b4c34);const _0x468780=await withSpinner(_0x40755f(0x2a0),()=>_0x5cb5ff['workflow']['attempt'](_0x5b4c34),{'verbose':_0x357117['verbose']}),_0x400928=_0x468780['data'];let _0x1159c3;!_0x400928['done']?_0x1159c3=_0x400928[_0x40755f(0x340)]?_0x40755f(0x1e7):_0x40755f(0x349):_0x1159c3=_0x400928[_0x40755f(0x244)]?_0x40755f(0x244):'error';let _0x5b4560;if(_0x400928[_0x40755f(0x2bb)]&&_0x400928[_0x40755f(0x1c4)]){const _0x535a3f=new Date(_0x400928['createdAt'])[_0x40755f(0x331)](),_0xa3f0e7=new Date(_0x400928['finishedAt'])[_0x40755f(0x331)]();_0x5b4560=Math[_0x40755f(0x2ec)]((_0xa3f0e7-_0x535a3f)/0x3e8);}const _0x14f22a={'attempt_id':_0x400928['id'],'status':_0x1159c3,..._0x400928[_0x40755f(0x2d7)]!==undefined&&{'index':_0x400928['index']},..._0x400928[_0x40755f(0x1ba)]&&{'project':_0x400928[_0x40755f(0x1ba)]['name']},..._0x400928[_0x40755f(0x2b9)]&&{'workflow':_0x400928[_0x40755f(0x2b9)]['name']},..._0x400928[_0x40755f(0x2a4)]&&{'session_id':_0x400928[_0x40755f(0x2a4)]},..._0x400928[_0x40755f(0x1eb)]&&{'session_time':_0x400928[_0x40755f(0x1eb)]},..._0x400928[_0x40755f(0x2be)]&&{'retry_attempt':_0x400928[_0x40755f(0x2be)]},..._0x5b4560!==undefined&&{'duration_sec':_0x5b4560},..._0x400928[_0x40755f(0x2bb)]&&{'created_at':_0x400928['createdAt']},..._0x400928[_0x40755f(0x1c4)]&&{'finished_at':_0x400928[_0x40755f(0x1c4)]},...Object['keys'](_0x400928[_0x40755f(0x253)])[_0x40755f(0x24f)]>0x0&&{'params':_0x400928[_0x40755f(0x253)]}};return await handleSingleObjectOutput(_0x14f22a,_0x357117),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]='workflow:tasks';[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x321);async[a56_0x28b4c4(0x195)](_0x4bc8d3){const _0x1c1e17=a56_0x28b4c4,{options:_0x364ff4,args:_0x595c19,tdx:_0x3bc6d}=_0x4bc8d3,_0x14c76c=_0x595c19[0x0];if(!_0x14c76c)return console[_0x1c1e17(0x174)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x447dad=_0x364ff4[_0x1c1e17(0x205)];_0x364ff4['verbose']&&(console[_0x1c1e17(0x174)](_0x1c1e17(0x225)+_0x14c76c),_0x447dad&&console[_0x1c1e17(0x174)](_0x1c1e17(0x23c)));const _0x19ae84=await withSpinner(_0x1c1e17(0x2cc),()=>_0x3bc6d[_0x1c1e17(0x2b9)][_0x1c1e17(0x210)](_0x14c76c,_0x447dad||![]),{'verbose':_0x364ff4[_0x1c1e17(0x28c)]}),_0x10bf42=_0x19ae84[_0x1c1e17(0x2c5)];return console[_0x1c1e17(0x174)]('✔\x20Found\x20'+_0x10bf42[_0x1c1e17(0x24f)]+_0x1c1e17(0x252)+(_0x10bf42[_0x1c1e17(0x24f)]!==0x1?'s':'')),await handleSDKOutput(_0x10bf42,_0x364ff4),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]='workflow:logs';[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x24d);async['execute'](_0x2c2cd8){const _0x9dd777=a56_0x28b4c4,{options:_0x357fa4,args:_0x1fee96,tdx:_0x342b96}=_0x2c2cd8,_0x2d3694=_0x1fee96[0x0];let _0x58c4db=_0x1fee96[0x1];if(!_0x2d3694)return console[_0x9dd777(0x174)](_0x9dd777(0x1fc)),0x1;_0x357fa4[_0x9dd777(0x28c)]&&(console[_0x9dd777(0x174)](_0x9dd777(0x225)+_0x2d3694),_0x58c4db&&console[_0x9dd777(0x174)](_0x9dd777(0x255)+_0x58c4db));const _0x447aa6=await withSpinner(_0x9dd777(0x22f),()=>_0x342b96[_0x9dd777(0x2b9)][_0x9dd777(0x266)](_0x2d3694,_0x58c4db),{'verbose':_0x357fa4[_0x9dd777(0x28c)]}),_0x7c7e7d=_0x447aa6[_0x9dd777(0x2c5)];if(_0x7c7e7d[_0x9dd777(0x24f)]===0x0)return console['error'](_0x9dd777(0x29d)),0x0;if(!_0x58c4db&&(_0x357fa4[_0x9dd777(0x25f)]||_0x357fa4[_0x9dd777(0x213)]))return await handleSDKOutput(_0x7c7e7d,_0x357fa4),0x0;if(!_0x58c4db){const _0x56504d=_0x7c7e7d[_0x9dd777(0x241)](_0x55ffeb=>({'title':_0x55ffeb[_0x9dd777(0x186)]+'\x20('+formatBytes(_0x55ffeb[_0x9dd777(0x1a9)])+')','value':_0x55ffeb[_0x9dd777(0x186)]})),_0x4776f3=await a56_0x4687fd({'type':_0x9dd777(0x1d6),'name':'task','message':_0x9dd777(0x2b5),'choices':_0x56504d});if(!_0x4776f3[_0x9dd777(0x287)])return console[_0x9dd777(0x174)](_0x9dd777(0x334)),0x0;_0x58c4db=_0x4776f3[_0x9dd777(0x287)];}const _0x2f42f8=await withSpinner(_0x9dd777(0x18e),()=>_0x342b96['workflow'][_0x9dd777(0x22d)](_0x2d3694,_0x58c4db),{'verbose':_0x357fa4['verbose']}),_0x234e91=_0x2f42f8[_0x9dd777(0x2c5)];return _0x234e91?console['log'](_0x234e91):console[_0x9dd777(0x174)]('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x2ea);[a56_0x28b4c4(0x1ea)]='Kill\x20a\x20running\x20attempt';async[a56_0x28b4c4(0x195)](_0x25bcfa){const _0x46b925=a56_0x28b4c4,{options:_0x5eb956,args:_0x174713,tdx:_0x4d4791}=_0x25bcfa,_0x2ff5a7=_0x174713[0x0];if(!_0x2ff5a7)return console['error'](_0x46b925(0x1fc)),0x1;const _0x1450e0=_0x5eb956[_0x46b925(0x172)];_0x5eb956[_0x46b925(0x28c)]&&(console[_0x46b925(0x174)](_0x46b925(0x225)+_0x2ff5a7),_0x1450e0&&console[_0x46b925(0x174)](_0x46b925(0x191)+_0x1450e0));if(!_0x5eb956['yes']){if(!isInteractive())return console[_0x46b925(0x174)](a56_0x3ae1dc[_0x46b925(0x31c)](_0x46b925(0x1bd)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x46b925(0x174)](a56_0x3ae1dc['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1a6766=await confirmKey(_0x46b925(0x2c7)+_0x2ff5a7+'?');if(!_0x1a6766)return console[_0x46b925(0x174)](a56_0x3ae1dc[_0x46b925(0x2df)](_0x46b925(0x334))),0x1;}const _0xc37a9b=await withSpinner('Killing\x20attempt...',()=>_0x4d4791['workflow'][_0x46b925(0x20b)](_0x2ff5a7,_0x1450e0),{'verbose':_0x5eb956[_0x46b925(0x28c)]}),_0x427aff=_0xc37a9b[_0x46b925(0x2c5)];return console[_0x46b925(0x174)]('✔\x20'+_0x427aff),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]='workflow:retry';[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x217);async[a56_0x28b4c4(0x195)](_0x1b94f2){const _0x1e8f85=a56_0x28b4c4,{options:_0x11b936,args:_0x5599b9,tdx:_0x5dcfdc}=_0x1b94f2,_0x1575e5=_0x5599b9[0x0];if(!_0x1575e5)return console[_0x1e8f85(0x174)]('Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required'),console[_0x1e8f85(0x174)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x3f28a3=![],_0x48d3d8=_0x1575e5;if(_0x1575e5['startsWith']('session:'))_0x3f28a3=!![],_0x48d3d8=_0x1575e5['substring'](0x8);else{if(_0x1575e5[_0x1e8f85(0x197)](_0x1e8f85(0x2fd)))_0x3f28a3=![],_0x48d3d8=_0x1575e5['substring'](0x8);else return console['error'](_0x1e8f85(0x336)),console['error'](_0x1e8f85(0x1f8)),0x1;}const _0x1f121e=_0x11b936[_0x1e8f85(0x33e)],_0x468c94=_0x11b936[_0x1e8f85(0x176)],_0x3f6677=_0x11b936[_0x1e8f85(0x253)],_0x8c4187=_0x11b936[_0x1e8f85(0x232)];_0x11b936[_0x1e8f85(0x28c)]&&(console[_0x1e8f85(0x174)](_0x1e8f85(0x1a5)+(_0x3f28a3?'session':'attempt')+'\x20'+_0x48d3d8),_0x1f121e&&console[_0x1e8f85(0x174)](_0x1e8f85(0x306)+_0x1f121e),_0x468c94&&console[_0x1e8f85(0x174)](_0x1e8f85(0x27f)+_0x468c94),_0x3f6677&&console[_0x1e8f85(0x174)](_0x1e8f85(0x265)+_0x3f6677),_0x8c4187&&console['error'](_0x1e8f85(0x2c0)));let _0x4aa892;if(_0x3f6677)try{if(_0x3f6677[_0x1e8f85(0x197)]('@')){const _0x30959b=await import(_0x1e8f85(0x219)),_0x27aa96=_0x3f6677[_0x1e8f85(0x24b)](0x1),_0xee191c=await _0x30959b[_0x1e8f85(0x206)](_0x27aa96,_0x1e8f85(0x203));_0x4aa892=JSON[_0x1e8f85(0x2fb)](_0xee191c);}else _0x4aa892=JSON[_0x1e8f85(0x2fb)](_0x3f6677);}catch{return console[_0x1e8f85(0x174)](_0x1e8f85(0x308)),0x1;}if(!_0x11b936[_0x1e8f85(0x2ae)]){if(!isInteractive())return console[_0x1e8f85(0x174)](a56_0x3ae1dc[_0x1e8f85(0x31c)](_0x1e8f85(0x1bd)),_0x1e8f85(0x1f9)),console[_0x1e8f85(0x174)](a56_0x3ae1dc[_0x1e8f85(0x18b)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x59dfb0=await confirmKey(_0x1e8f85(0x307)+(_0x3f28a3?'session':_0x1e8f85(0x32c))+'\x20'+_0x48d3d8+'?');if(!_0x59dfb0)return console[_0x1e8f85(0x174)](a56_0x3ae1dc['yellow'](_0x1e8f85(0x334))),0x1;}let _0x3a54d8;_0x3f28a3?_0x3a54d8=await withSpinner(_0x1e8f85(0x227),()=>_0x5dcfdc[_0x1e8f85(0x2b9)]['retrySession'](_0x48d3d8,{'fromTask':_0x1f121e,'retryParams':_0x4aa892}),{'verbose':_0x11b936[_0x1e8f85(0x28c)]}):_0x3a54d8=await withSpinner(_0x1e8f85(0x1ce),()=>_0x5dcfdc[_0x1e8f85(0x2b9)][_0x1e8f85(0x1c0)](_0x48d3d8,{'resumeFrom':_0x468c94,'retryParams':_0x4aa892,'force':_0x8c4187}),{'verbose':_0x11b936[_0x1e8f85(0x28c)]});const _0x40e379=_0x3a54d8[_0x1e8f85(0x2c5)];return console['error']('✔\x20Retry\x20started'),console[_0x1e8f85(0x174)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x40e379[_0x1e8f85(0x249)]),console[_0x1e8f85(0x174)](_0x1e8f85(0x289)+_0x40e379[_0x1e8f85(0x2a4)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x333);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x1ee);async[a56_0x28b4c4(0x195)](_0x472b37){const _0x1d7bc4=a56_0x28b4c4,{options:_0x16613d,args:_0x442453,tdx:_0x409181}=_0x472b37;let _0x359bbb=_0x442453[0x0];if(!_0x359bbb){const _0x57e98a=this[_0x1d7bc4(0x222)]([],_0x16613d),_0x1fa309=await withSpinner(_0x1d7bc4(0x26c),()=>_0x409181[_0x1d7bc4(0x2b9)]['workflows'](_0x57e98a,{'limit':_0x16613d[_0x1d7bc4(0x1b3)]}),{'verbose':_0x16613d[_0x1d7bc4(0x28c)]}),_0x3903f4=_0x1fa309[_0x1d7bc4(0x2c5)];if(_0x3903f4[_0x1d7bc4(0x24f)]===0x0)return console[_0x1d7bc4(0x174)](_0x1d7bc4(0x29b)),!_0x57e98a&&console[_0x1d7bc4(0x174)](a56_0x3ae1dc['dim'](_0x1d7bc4(0x2a8))),0x1;const _0x49b203=_0x3903f4[_0x1d7bc4(0x241)](_0x4ff642=>({'title':_0x4ff642[_0x1d7bc4(0x1ba)]?.[_0x1d7bc4(0x22a)]+'.'+_0x4ff642[_0x1d7bc4(0x22a)],'value':_0x4ff642[_0x1d7bc4(0x1ba)]?.['name']+'.'+_0x4ff642[_0x1d7bc4(0x22a)],'description':_0x4ff642['revision']?_0x1d7bc4(0x183)+_0x4ff642[_0x1d7bc4(0x344)]:undefined})),_0x322631=await a56_0x4687fd({'type':_0x1d7bc4(0x1d6),'name':'workflow','message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x49b203});if(!_0x322631[_0x1d7bc4(0x2b9)])return 0x1;_0x359bbb=_0x322631[_0x1d7bc4(0x2b9)];}if(!_0x359bbb[_0x1d7bc4(0x2b7)]('.')){const _0x2176a7=this[_0x1d7bc4(0x222)]([],_0x16613d);if(_0x2176a7)_0x359bbb=_0x2176a7+'.'+_0x359bbb;else return console['error'](a56_0x3ae1dc[_0x1d7bc4(0x31c)]('Error:'),_0x1d7bc4(0x291)),console['error'](a56_0x3ae1dc[_0x1d7bc4(0x18b)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x52bc8b=_0x16613d[_0x1d7bc4(0x246)],_0x1335b2=_0x16613d['sessionTime'],_0x1732b8={};if(_0x52bc8b&&Array[_0x1d7bc4(0x343)](_0x52bc8b))for(const _0x2cec60 of _0x52bc8b){const _0x166915=_0x2cec60['indexOf']('=');if(_0x166915===-0x1)return console[_0x1d7bc4(0x174)](_0x1d7bc4(0x2b2)+_0x2cec60),console[_0x1d7bc4(0x174)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x2dfd3e=_0x2cec60[_0x1d7bc4(0x24b)](0x0,_0x166915),_0x202466=_0x2cec60['substring'](_0x166915+0x1);try{_0x1732b8[_0x2dfd3e]=JSON[_0x1d7bc4(0x2fb)](_0x202466);}catch{_0x1732b8[_0x2dfd3e]=_0x202466;}}_0x16613d[_0x1d7bc4(0x28c)]&&(console[_0x1d7bc4(0x174)](_0x1d7bc4(0x2e1)+_0x359bbb),Object[_0x1d7bc4(0x263)](_0x1732b8)[_0x1d7bc4(0x24f)]>0x0&&console[_0x1d7bc4(0x174)](_0x1d7bc4(0x302)+JSON['stringify'](_0x1732b8)),_0x1335b2&&console[_0x1d7bc4(0x174)]('Session\x20time:\x20'+_0x1335b2));if(_0x16613d[_0x1d7bc4(0x30d)])return await this[_0x1d7bc4(0x271)](_0x472b37,_0x359bbb,_0x1732b8,_0x1335b2);const _0x419a21=await withSpinner(_0x1d7bc4(0x2b1),()=>_0x409181[_0x1d7bc4(0x2b9)][_0x1d7bc4(0x17c)](_0x359bbb,_0x1732b8,{'sessionTime':_0x1335b2}),{'verbose':_0x16613d[_0x1d7bc4(0x28c)]}),_0x45e24c=_0x419a21[_0x1d7bc4(0x2c5)];console[_0x1d7bc4(0x174)]('✔\x20Workflow\x20run\x20started'),console[_0x1d7bc4(0x174)](_0x1d7bc4(0x214)+_0x45e24c['id']),console[_0x1d7bc4(0x174)](_0x1d7bc4(0x289)+_0x45e24c[_0x1d7bc4(0x2a4)]),console[_0x1d7bc4(0x174)](_0x1d7bc4(0x199)+_0x45e24c[_0x1d7bc4(0x1ba)]?.[_0x1d7bc4(0x22a)]),console[_0x1d7bc4(0x174)](_0x1d7bc4(0x19d)+_0x45e24c['workflow']?.[_0x1d7bc4(0x22a)]);if(_0x45e24c[_0x1d7bc4(0x1ba)]?.['id']&&_0x45e24c[_0x1d7bc4(0x2a4)]&&_0x45e24c['id']){const _0x27af43=_0x16613d[_0x1d7bc4(0x1df)],_0x23ec53=getConsoleUrl(_0x27af43,_0x1d7bc4(0x233)+_0x45e24c[_0x1d7bc4(0x1ba)]['id']+_0x1d7bc4(0x1db)+_0x45e24c['sessionId']+'/attempt/'+_0x45e24c['id']);console[_0x1d7bc4(0x174)](_0x1d7bc4(0x2c6)+a56_0x3ae1dc['cyan'](_0x23ec53));}return 0x0;}async[a56_0x28b4c4(0x271)](_0x335a25,_0x57e045,_0x36bd6e,_0x3fcd1e){const _0x31e75f=a56_0x28b4c4,{options:_0x30dfca,tdx:_0x540731}=_0x335a25,_0x4a2bfa=await withSpinner(_0x31e75f(0x25e)+_0x57e045+_0x31e75f(0x1d5),()=>_0x540731[_0x31e75f(0x2b9)]['getWorkflow'](_0x57e045),{'verbose':_0x30dfca[_0x31e75f(0x28c)]}),_0x374a01=_0x4a2bfa[_0x31e75f(0x2c5)],_0x5ae571=_0x3fcd1e??new Date()['toISOString']();console[_0x31e75f(0x2b0)](a56_0x3ae1dc[_0x31e75f(0x1cd)](_0x31e75f(0x335)),_0x57e045),console[_0x31e75f(0x2b0)](a56_0x3ae1dc[_0x31e75f(0x1cd)]('Session\x20time:'),_0x5ae571),console['log'](a56_0x3ae1dc['bold'](_0x31e75f(0x223)),JSON['stringify'](_0x36bd6e)),console['log'](''),console[_0x31e75f(0x2b0)](a56_0x3ae1dc['bold'](_0x31e75f(0x185)));const _0x18e883=parseTaskGraph(_0x374a01[_0x31e75f(0x18c)]??null);if(_0x18e883[_0x31e75f(0x24f)]===0x0)console[_0x31e75f(0x2b0)](a56_0x3ae1dc[_0x31e75f(0x18b)]('\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)'));else for(const _0x170d6a of formatTaskGraph(_0x18e883)){console[_0x31e75f(0x2b0)](_0x170d6a);}const _0x663318=summarizeTaskGraph(_0x18e883),_0x1bc672=formatWarningSummary(_0x663318);return _0x1bc672&&(console[_0x31e75f(0x2b0)](''),console[_0x31e75f(0x2b0)](a56_0x3ae1dc[_0x31e75f(0x2df)](_0x1bc672))),console[_0x31e75f(0x2b0)](a56_0x3ae1dc[_0x31e75f(0x2df)]('\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.')),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']='workflow:download';['description']=a56_0x28b4c4(0x1bf);async[a56_0x28b4c4(0x195)](_0x397837){const _0x5c4357=a56_0x28b4c4,{options:_0x2ba471,args:_0x1f43e7,tdx:_0x187701}=_0x397837,_0x279831=_0x1f43e7[0x0],_0x592079=_0x1f43e7[0x1]||'.';if(!_0x279831)return console[_0x5c4357(0x174)](_0x5c4357(0x274)),console[_0x5c4357(0x174)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0xed3d2b=_0x2ba471[_0x5c4357(0x344)];_0x2ba471[_0x5c4357(0x28c)]&&(console[_0x5c4357(0x174)](_0x5c4357(0x275)+_0x279831),console[_0x5c4357(0x174)]('Output\x20directory:\x20'+_0x592079),_0xed3d2b&&console[_0x5c4357(0x174)](_0x5c4357(0x2a7)+_0xed3d2b));const _0x4b2af6=await withSpinner(_0x5c4357(0x2bf)+_0x279831+_0x5c4357(0x1d5),()=>_0x187701[_0x5c4357(0x2b9)][_0x5c4357(0x1a8)](_0x279831,_0x592079,{'revision':_0xed3d2b}),{'verbose':_0x2ba471[_0x5c4357(0x28c)]}),_0x585447=_0x4b2af6[_0x5c4357(0x2c5)];return console[_0x5c4357(0x174)]('✔\x20Downloaded\x20'+_0x585447[_0x5c4357(0x2c2)]),console[_0x5c4357(0x174)]('\x20\x20Revision:\x20'+_0x585447[_0x5c4357(0x344)]),console[_0x5c4357(0x174)]('\x20\x20Files\x20extracted:\x20'+_0x585447[_0x5c4357(0x1e3)]),console[_0x5c4357(0x174)](_0x5c4357(0x17d)+_0x592079+'/'+_0x585447[_0x5c4357(0x2c2)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x26b);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x1bc);async[a56_0x28b4c4(0x195)](_0x3b4c96){const _0x4db276=a56_0x28b4c4,{options:_0x374177,args:_0x307c89,tdx:_0x8dd8d8}=_0x3b4c96;let _0x1f6429='.',_0x233542=_0x374177[_0x4db276(0x22a)];if(_0x307c89[0x0]){const {promises:_0x3c0117}=await import('fs');try{const _0x39829b=await _0x3c0117[_0x4db276(0x243)](_0x307c89[0x0]);if(_0x39829b['isDirectory']())_0x1f6429=_0x307c89[0x0];else return console[_0x4db276(0x174)](_0x4db276(0x196)+_0x307c89[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x233542=_0x307c89[0x0],_0x1f6429='.';}}const _0x5c0243=_0x374177[_0x4db276(0x344)],_0xff7d6d=_0x374177['skipValidation'];_0x374177[_0x4db276(0x28c)]&&(console[_0x4db276(0x174)](_0x4db276(0x235)+_0x1f6429),_0x233542&&console[_0x4db276(0x174)]('Project\x20name:\x20'+_0x233542),_0x5c0243&&console[_0x4db276(0x174)](_0x4db276(0x2a7)+_0x5c0243),_0xff7d6d&&console['error'](_0x4db276(0x228)));const _0x38acca=await withSpinner(_0x4db276(0x290),()=>_0x8dd8d8[_0x4db276(0x2b9)]['push'](_0x1f6429,{'projectName':_0x233542,'revision':_0x5c0243,'skipValidation':_0xff7d6d}),{'verbose':_0x374177[_0x4db276(0x28c)]}),_0x4309b5=_0x38acca['data'];return console[_0x4db276(0x174)](_0x4db276(0x2db)+_0x4309b5[_0x4db276(0x2c2)]),console[_0x4db276(0x174)]('\x20\x20Project\x20ID:\x20'+_0x4309b5[_0x4db276(0x2f0)]),console[_0x4db276(0x174)](_0x4db276(0x2ac)+_0x4309b5['revision']),await this[_0x4db276(0x2fe)](_0x8dd8d8,_0x4309b5['projectName'],_0x374177[_0x4db276(0x1df)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x2bc);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x1a3);async['execute'](_0x31c0fc){const _0x1b6c26=a56_0x28b4c4,{options:_0x28853b,args:_0x4ad01e,tdx:_0x39696a}=_0x31c0fc,_0x385d75=_0x4ad01e[0x0],_0x59da65=_0x4ad01e[0x1];if(!_0x385d75)return console['error'](a56_0x3ae1dc[_0x1b6c26(0x31c)](_0x1b6c26(0x31e)),_0x1b6c26(0x215)),console[_0x1b6c26(0x174)](a56_0x3ae1dc[_0x1b6c26(0x18b)](_0x1b6c26(0x2d8))),0x1;const _0x35893c=_0x28853b[_0x1b6c26(0x344)];_0x28853b[_0x1b6c26(0x28c)]&&(console[_0x1b6c26(0x174)]('Project:\x20'+_0x385d75),_0x59da65&&console[_0x1b6c26(0x174)](_0x1b6c26(0x2d2)+_0x59da65),_0x35893c&&console['error'](_0x1b6c26(0x2a7)+_0x35893c),_0x28853b['dryRun']&&console['error'](_0x1b6c26(0x1e6)));const _0x36da3e=await withSpinner(_0x1b6c26(0x298)+_0x385d75+_0x1b6c26(0x1d5),()=>_0x39696a[_0x1b6c26(0x2b9)]['pullProject'](_0x385d75,{'targetDir':_0x59da65,'revision':_0x35893c}),{'verbose':_0x28853b['verbose']}),_0x3ffa9b=_0x36da3e['data'];_0x3ffa9b[_0x1b6c26(0x28f)]?console['error'](_0x1b6c26(0x2ab)+_0x3ffa9b[_0x1b6c26(0x2c2)]):console[_0x1b6c26(0x174)](_0x1b6c26(0x345)+_0x3ffa9b[_0x1b6c26(0x2c2)]);console[_0x1b6c26(0x174)]('\x20\x20Revision:\x20'+_0x3ffa9b[_0x1b6c26(0x344)]),console[_0x1b6c26(0x174)]('\x20\x20Target:\x20'+(a56_0x49ff99[_0x1b6c26(0x1ac)](process[_0x1b6c26(0x278)](),_0x3ffa9b[_0x1b6c26(0x25d)])||'.')),console[_0x1b6c26(0x174)]('\x20\x20Changes:\x20'+a56_0x3ae1dc[_0x1b6c26(0x258)]('+'+_0x3ffa9b[_0x1b6c26(0x230)][_0x1b6c26(0x318)]+_0x1b6c26(0x254))+',\x20'+(a56_0x3ae1dc[_0x1b6c26(0x2df)]('~'+_0x3ffa9b[_0x1b6c26(0x230)]['modified']+_0x1b6c26(0x22e))+',\x20')+(a56_0x3ae1dc['red']('-'+_0x3ffa9b[_0x1b6c26(0x230)][_0x1b6c26(0x30f)]+_0x1b6c26(0x2ee))+',\x20')+(''+a56_0x3ae1dc[_0x1b6c26(0x18b)](_0x3ffa9b[_0x1b6c26(0x230)][_0x1b6c26(0x26a)]+'\x20unchanged')));for(const _0x2e39fb of _0x3ffa9b[_0x1b6c26(0x1b0)]){_0x2e39fb[_0x1b6c26(0x310)]===_0x1b6c26(0x299)&&_0x2e39fb[_0x1b6c26(0x2dc)]&&(console[_0x1b6c26(0x174)]('\x0a'+a56_0x3ae1dc['cyan'](_0x1b6c26(0x312)+_0x2e39fb[_0x1b6c26(0x181)])),console[_0x1b6c26(0x174)](_0x2e39fb[_0x1b6c26(0x2dc)]));}if(!_0x3ffa9b['hasChanges'])return saveSessionContext({'workflow_project':_0x3ffa9b[_0x1b6c26(0x2c2)]},_0x28853b[_0x1b6c26(0x295)]),console[_0x1b6c26(0x174)](a56_0x3ae1dc[_0x1b6c26(0x258)](_0x1b6c26(0x27c))),console['error'](a56_0x3ae1dc['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x3ffa9b['projectName'])),0x0;if(_0x28853b[_0x1b6c26(0x30d)])return console['error'](a56_0x3ae1dc[_0x1b6c26(0x2df)](_0x1b6c26(0x2d0))),0x0;if(!_0x28853b[_0x1b6c26(0x2ae)]){if(!isInteractive())return console[_0x1b6c26(0x174)](a56_0x3ae1dc[_0x1b6c26(0x31c)](_0x1b6c26(0x1bd)),_0x1b6c26(0x1f9)),console['error'](a56_0x3ae1dc[_0x1b6c26(0x18b)](_0x1b6c26(0x2f4))),0x1;const _0x160e53=await confirmKey(_0x1b6c26(0x1f5));if(!_0x160e53)return console[_0x1b6c26(0x174)](a56_0x3ae1dc['yellow']('Cancelled'),_0x1b6c26(0x1b9)),0x1;}await withSpinner('Writing\x20files...',()=>_0x39696a['workflow'][_0x1b6c26(0x1cc)](_0x3ffa9b,{'revision':_0x35893c}),{'verbose':_0x28853b[_0x1b6c26(0x28c)]}),saveSessionContext({'workflow_project':_0x3ffa9b[_0x1b6c26(0x2c2)]},_0x28853b[_0x1b6c26(0x295)]),console[_0x1b6c26(0x174)](a56_0x3ae1dc[_0x1b6c26(0x258)]('✔\x20Pull\x20complete'));const _0x5531e2=a56_0x49ff99[_0x1b6c26(0x1ac)](process[_0x1b6c26(0x278)](),_0x3ffa9b['targetDir'])||'.';return console[_0x1b6c26(0x174)](a56_0x3ae1dc[_0x1b6c26(0x18b)](_0x1b6c26(0x17d)+_0x5531e2)),console[_0x1b6c26(0x174)](a56_0x3ae1dc[_0x1b6c26(0x18b)](_0x1b6c26(0x1d4)+_0x3ffa9b[_0x1b6c26(0x2c2)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x316);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x19b);async[a56_0x28b4c4(0x195)](_0x35c5d3){const _0x38413e=a56_0x28b4c4,{options:_0x1bda70,args:_0x32eeed,tdx:_0xe244a5}=_0x35c5d3,_0x2f4377=this[_0x38413e(0x2f3)](_0x32eeed,_0x1bda70),_0x31bee1=_0x1bda70,{revision:_0x2eda97,skipValidation:_0x34f414,backfill:_0x54ade9}=_0x31bee1,_0x5659be=_0x54ade9===undefined?undefined:!_0x54ade9;_0x1bda70[_0x38413e(0x28c)]&&(_0x2f4377&&console[_0x38413e(0x174)](_0x38413e(0x300)+_0x2f4377),_0x2eda97&&console[_0x38413e(0x174)]('Revision:\x20'+_0x2eda97),_0x1bda70[_0x38413e(0x30d)]&&console[_0x38413e(0x174)]('Dry\x20run:\x20yes'),_0x34f414&&console['error'](_0x38413e(0x228)),_0x54ade9&&console[_0x38413e(0x174)](_0x38413e(0x31b)));let _0x286fd1;try{_0x286fd1=await withSpinner(_0x38413e(0x2ed),()=>_0xe244a5['workflow']['preparePushProject']({'sourceDir':_0x2f4377,'revision':_0x2eda97,'skipValidation':_0x34f414,'skipSchedule':_0x5659be}),{'verbose':_0x1bda70[_0x38413e(0x28c)]});}catch(_0x58f158){if(_0x58f158 instanceof Error&&_0x58f158[_0x38413e(0x27e)]['includes']('No\x20workflow\x20tdx.json\x20found'))return console[_0x38413e(0x174)](a56_0x3ae1dc[_0x38413e(0x31c)](_0x38413e(0x31e)),_0x38413e(0x212)),_0x1bda70[_0x38413e(0x280)]?console['error'](a56_0x3ae1dc['dim'](_0x38413e(0x325)+_0x1bda70['workflowProject']+_0x38413e(0x248)+_0x1bda70['workflowProject']+'\x27')):console[_0x38413e(0x174)](a56_0x3ae1dc[_0x38413e(0x18b)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x58f158;}const _0x202869=_0x286fd1[_0x38413e(0x2c5)];console[_0x38413e(0x174)](_0x38413e(0x250)+_0x202869[_0x38413e(0x2c2)]),console[_0x38413e(0x174)](_0x38413e(0x1d3)+_0x202869[_0x38413e(0x348)]),console[_0x38413e(0x174)](_0x38413e(0x2ac)+_0x202869['revision']),console[_0x38413e(0x174)]('\x20\x20Changes:\x20'+a56_0x3ae1dc['green']('+'+_0x202869['summary'][_0x38413e(0x318)]+_0x38413e(0x254))+',\x20'+(a56_0x3ae1dc['yellow']('~'+_0x202869[_0x38413e(0x230)][_0x38413e(0x299)]+'\x20modified')+',\x20')+(a56_0x3ae1dc['red']('-'+_0x202869[_0x38413e(0x230)][_0x38413e(0x30f)]+'\x20deleted')+',\x20')+(''+a56_0x3ae1dc[_0x38413e(0x18b)](_0x202869['summary'][_0x38413e(0x26a)]+'\x20unchanged')));for(const _0x2c14a4 of _0x202869[_0x38413e(0x1b0)]){_0x2c14a4[_0x38413e(0x310)]===_0x38413e(0x299)&&_0x2c14a4[_0x38413e(0x2dc)]&&(console[_0x38413e(0x174)]('\x0a'+a56_0x3ae1dc[_0x38413e(0x218)](_0x38413e(0x312)+_0x2c14a4[_0x38413e(0x181)])),console[_0x38413e(0x174)](_0x2c14a4[_0x38413e(0x2dc)]));}if(!_0x202869[_0x38413e(0x2d9)])return console[_0x38413e(0x174)](a56_0x3ae1dc[_0x38413e(0x258)](_0x38413e(0x259))),await this[_0x38413e(0x2fe)](_0xe244a5,_0x202869[_0x38413e(0x2c2)],_0x1bda70[_0x38413e(0x1df)]),0x0;if(_0x1bda70[_0x38413e(0x30d)])return console[_0x38413e(0x174)](a56_0x3ae1dc['yellow'](_0x38413e(0x237))),0x0;if(!_0x1bda70['yes']){if(!isInteractive())return console[_0x38413e(0x174)](a56_0x3ae1dc[_0x38413e(0x31c)](_0x38413e(0x1bd)),_0x38413e(0x1f9)),console['error'](a56_0x3ae1dc[_0x38413e(0x18b)](_0x38413e(0x2f4))),0x1;const _0x1e2337=await confirmKey(_0x38413e(0x2ce));if(!_0x1e2337)return console[_0x38413e(0x174)](a56_0x3ae1dc[_0x38413e(0x2df)](_0x38413e(0x334)),_0x38413e(0x2da)),0x1;}const _0x59628e=await withSpinner(_0x38413e(0x330),()=>_0xe244a5[_0x38413e(0x2b9)][_0x38413e(0x1e9)](_0x202869),{'verbose':_0x1bda70[_0x38413e(0x28c)]}),_0x5148ca=_0x59628e['data'];return console[_0x38413e(0x174)](a56_0x3ae1dc['green']('✔\x20Push\x20complete')),console[_0x38413e(0x174)](_0x38413e(0x26f)+_0x5148ca[_0x38413e(0x2f0)]),console[_0x38413e(0x174)]('\x20\x20Revision:\x20'+_0x5148ca[_0x38413e(0x344)]),await this['showWorkflowConsoleUrl'](_0xe244a5,_0x5148ca[_0x38413e(0x2c2)],_0x1bda70[_0x38413e(0x1df)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x303);['description']=a56_0x28b4c4(0x2ef);async[a56_0x28b4c4(0x195)](_0xe06761){const _0x5ade58=a56_0x28b4c4,{options:_0x20dd5f,args:_0x12a939,tdx:_0x20eb3d}=_0xe06761,_0x360d65=this[_0x5ade58(0x2f3)](_0x12a939,_0x20dd5f),_0x384959=_0x20dd5f['name'],_0x127725=_0x20dd5f[_0x5ade58(0x344)],_0xbc58e5=_0x20dd5f[_0x5ade58(0x245)];if(!_0x360d65)return console[_0x5ade58(0x174)](a56_0x3ae1dc[_0x5ade58(0x31c)](_0x5ade58(0x31e)),_0x5ade58(0x24a)),console[_0x5ade58(0x174)](a56_0x3ae1dc[_0x5ade58(0x18b)](_0x5ade58(0x1b4))),console[_0x5ade58(0x174)](a56_0x3ae1dc[_0x5ade58(0x18b)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x384959)return console[_0x5ade58(0x174)](a56_0x3ae1dc[_0x5ade58(0x31c)]('Error:'),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x5ade58(0x174)](a56_0x3ae1dc[_0x5ade58(0x18b)](_0x5ade58(0x1b4))),0x1;_0x20dd5f[_0x5ade58(0x28c)]&&(console[_0x5ade58(0x174)](_0x5ade58(0x300)+_0x360d65),console[_0x5ade58(0x174)](_0x5ade58(0x234)+_0x384959),_0x127725&&console[_0x5ade58(0x174)]('Revision:\x20'+_0x127725),_0x20dd5f[_0x5ade58(0x30d)]&&console['error'](_0x5ade58(0x1e6)),_0xbc58e5&&console[_0x5ade58(0x174)]('Validation:\x20skipped'));const _0x343c34=await withSpinner(_0x5ade58(0x19e),()=>_0x20eb3d[_0x5ade58(0x2b9)][_0x5ade58(0x338)](_0x360d65,_0x384959,{'revision':_0x127725,'skipValidation':_0xbc58e5}),{'verbose':_0x20dd5f[_0x5ade58(0x28c)]}),_0x25e40e=_0x343c34[_0x5ade58(0x2c5)];console[_0x5ade58(0x174)](_0x5ade58(0x238)+_0x25e40e['sourceDir']);_0x25e40e[_0x5ade58(0x24e)]&&console[_0x5ade58(0x174)](_0x5ade58(0x1b2)+_0x25e40e[_0x5ade58(0x24e)]);console[_0x5ade58(0x174)](_0x5ade58(0x234)+_0x25e40e['newProjectName']),console[_0x5ade58(0x174)](_0x5ade58(0x2a7)+_0x25e40e[_0x5ade58(0x344)]),console[_0x5ade58(0x174)](_0x5ade58(0x2cf)+_0x25e40e[_0x5ade58(0x27a)]);_0x25e40e['targetExists']&&(console[_0x5ade58(0x174)](a56_0x3ae1dc[_0x5ade58(0x2df)]('\x0a⚠\x20Project\x20\x22'+_0x25e40e[_0x5ade58(0x269)]+_0x5ade58(0x2eb)+_0x25e40e[_0x5ade58(0x20e)]+')')),console[_0x5ade58(0x174)](a56_0x3ae1dc[_0x5ade58(0x2df)](_0x5ade58(0x200))));if(_0x20dd5f['dryRun'])return console['error'](a56_0x3ae1dc['yellow'](_0x5ade58(0x32b))),0x0;if(!_0x20dd5f['yes']){if(!isInteractive())return console['error'](a56_0x3ae1dc['red']('\x0aError:'),_0x5ade58(0x1f9)),console['error'](a56_0x3ae1dc[_0x5ade58(0x18b)](_0x5ade58(0x2f4))),0x1;const _0x33c921=_0x25e40e['sourceProjectName']||a56_0x49ff99[_0x5ade58(0x1fb)](_0x360d65),_0x1c4cbc=_0x25e40e[_0x5ade58(0x29a)]?_0x5ade58(0x240)+_0x384959+_0x5ade58(0x23e):_0x5ade58(0x1a1)+_0x33c921+_0x5ade58(0x1cf)+_0x384959+'\x22?',_0x4ff0d0=await confirmKey(_0x1c4cbc);if(!_0x4ff0d0)return console[_0x5ade58(0x174)](a56_0x3ae1dc[_0x5ade58(0x2df)](_0x5ade58(0x334))),0x1;}const _0x25f539=await withSpinner(_0x25e40e['targetExists']?_0x5ade58(0x337)+_0x384959+_0x5ade58(0x1d5):_0x5ade58(0x226)+_0x384959+_0x5ade58(0x1d5),()=>_0x20eb3d['workflow'][_0x5ade58(0x2a2)](_0x25e40e),{'verbose':_0x20dd5f[_0x5ade58(0x28c)]}),_0x1afd77=_0x25f539[_0x5ade58(0x2c5)];return console['error'](a56_0x3ae1dc[_0x5ade58(0x258)](_0x25e40e[_0x5ade58(0x29a)]?_0x5ade58(0x296):_0x5ade58(0x23f))),console[_0x5ade58(0x174)]('\x20\x20Project:\x20'+_0x1afd77[_0x5ade58(0x269)]),console[_0x5ade58(0x174)]('\x20\x20Project\x20ID:\x20'+_0x1afd77[_0x5ade58(0x1ae)]),console[_0x5ade58(0x174)](_0x5ade58(0x2ac)+_0x1afd77[_0x5ade58(0x344)]),await this[_0x5ade58(0x2fe)](_0x20eb3d,_0x1afd77[_0x5ade58(0x269)],_0x20dd5f['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x1fd);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x2bd);async[a56_0x28b4c4(0x195)](_0x32bc9a){const _0x155e53=a56_0x28b4c4,{options:_0xebb031,args:_0x3a3dec,tdx:_0x17651d}=_0x32bc9a,_0x4ef3ea=_0x3a3dec[0x0];if(!_0x4ef3ea)return console['error'](_0x155e53(0x2b4)),console[_0x155e53(0x174)](_0x155e53(0x208)),0x1;_0xebb031[_0x155e53(0x28c)]&&console[_0x155e53(0x174)]('Project:\x20'+_0x4ef3ea);if(!_0xebb031[_0x155e53(0x2ae)]){if(!isInteractive())return console['error'](a56_0x3ae1dc[_0x155e53(0x31c)](_0x155e53(0x1bd)),_0x155e53(0x1f9)),console['error'](a56_0x3ae1dc[_0x155e53(0x18b)](_0x155e53(0x2f4))),0x1;const _0x3b49a3=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x4ef3ea+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3b49a3)return console['error'](a56_0x3ae1dc['yellow'](_0x155e53(0x334))),0x1;}const _0x372554=await withSpinner(_0x155e53(0x177)+_0x4ef3ea+_0x155e53(0x1d5),()=>_0x17651d[_0x155e53(0x2b9)][_0x155e53(0x317)](_0x4ef3ea),{'verbose':_0xebb031[_0x155e53(0x28c)]}),_0x2068cd=_0x372554[_0x155e53(0x2c5)];return console['error']('✔\x20Deleted\x20project\x20'+_0x2068cd[_0x155e53(0x2c2)]),console[_0x155e53(0x174)]('\x20\x20Project\x20ID:\x20'+_0x2068cd[_0x155e53(0x2f0)]),0x0;}}export function parseKeyValue(_0x42d57d){const _0x48ace0=a56_0x28b4c4,_0x133b6e=_0x42d57d[_0x48ace0(0x201)]('=');if(_0x133b6e===-0x1)throw new Error(_0x48ace0(0x27d)+_0x42d57d+_0x48ace0(0x260));const _0x35ed01=_0x42d57d[_0x48ace0(0x24b)](0x0,_0x133b6e),_0x1c63e8=_0x42d57d[_0x48ace0(0x24b)](_0x133b6e+0x1);if(!_0x35ed01)throw new Error(_0x48ace0(0x277));return{'key':_0x35ed01,'value':_0x1c63e8};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x281);['description']=a56_0x28b4c4(0x256);async[a56_0x28b4c4(0x195)](_0x385b18){const _0x2043c8=a56_0x28b4c4,{options:_0x333636,args:_0x44dbbd,tdx:_0x4e1877}=_0x385b18,_0x21e375=this['requireProject'](_0x44dbbd,_0x333636);if(!_0x21e375)return 0x1;_0x333636[_0x2043c8(0x28c)]&&console['error'](_0x2043c8(0x275)+_0x21e375);const _0x3cda82=await withSpinner(_0x2043c8(0x286),()=>_0x4e1877['workflow'][_0x2043c8(0x28d)](_0x21e375),{'verbose':_0x333636['verbose']}),{secrets:_0x1af54d}=_0x3cda82[_0x2043c8(0x2c5)];return console['error'](_0x2043c8(0x209)+_0x1af54d[_0x2043c8(0x24f)]+_0x2043c8(0x2a6)+(_0x1af54d[_0x2043c8(0x24f)]!==0x1?'s':'')),await handleSDKOutput(_0x1af54d,_0x333636),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x2b3);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x19c);async['execute'](_0x3e4913){const _0x5f305a=a56_0x28b4c4,{options:_0x4394d7,args:_0x25e541,tdx:_0x3c1f34}=_0x3e4913;let _0x7a6323,_0x8184cb;if(_0x25e541[_0x5f305a(0x24f)]>=0x1&&!_0x25e541[0x0][_0x5f305a(0x2b7)]('='))_0x7a6323=_0x25e541[0x0],_0x8184cb=_0x25e541[_0x5f305a(0x2c8)](0x1);else{if(_0x25e541[_0x5f305a(0x24f)]>=0x1&&_0x4394d7[_0x5f305a(0x280)])_0x7a6323=_0x4394d7[_0x5f305a(0x280)],_0x8184cb=_0x25e541;else return _0x25e541[_0x5f305a(0x24f)]>=0x1?(console[_0x5f305a(0x174)](_0x5f305a(0x274)),console[_0x5f305a(0x174)](_0x5f305a(0x2a8)),0x1):(console[_0x5f305a(0x174)](_0x5f305a(0x2f8)),console[_0x5f305a(0x174)](_0x5f305a(0x282)),0x1);}if(_0x8184cb[_0x5f305a(0x24f)]===0x0)return console[_0x5f305a(0x174)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x5f305a(0x174)](_0x5f305a(0x282)),0x1;const _0x1c56a7={};try{for(const _0x69e27a of _0x8184cb){const {key:_0x107d06,value:_0xd7669f}=parseKeyValue(_0x69e27a);_0x1c56a7[_0x107d06]=_0xd7669f;}}catch(_0x4dfa77){return _0x4dfa77 instanceof Error&&console[_0x5f305a(0x174)](a56_0x3ae1dc['red'](_0x5f305a(0x31e)),_0x4dfa77[_0x5f305a(0x27e)]),0x1;}const _0x2fa493=Object[_0x5f305a(0x263)](_0x1c56a7);_0x4394d7[_0x5f305a(0x28c)]&&(console[_0x5f305a(0x174)](_0x5f305a(0x275)+_0x7a6323),console[_0x5f305a(0x174)](_0x5f305a(0x342)+_0x2fa493['join'](',\x20')));const _0x4b97a3=await withSpinner(_0x2fa493[_0x5f305a(0x24f)]===0x1?_0x5f305a(0x1ca):_0x5f305a(0x33c)+_0x2fa493['length']+_0x5f305a(0x1d1),()=>_0x3c1f34[_0x5f305a(0x2b9)][_0x5f305a(0x33b)](_0x7a6323,_0x1c56a7),{'verbose':_0x4394d7[_0x5f305a(0x28c)]}),_0x197213=_0x4b97a3[_0x5f305a(0x2c5)];return console['error'](_0x2fa493[_0x5f305a(0x24f)]===0x1?'✔\x20Secret\x20\x27'+_0x197213[_0x5f305a(0x263)][0x0]+_0x5f305a(0x30a)+_0x197213[_0x5f305a(0x2c2)]+'\x27':'✔\x20'+_0x197213[_0x5f305a(0x263)][_0x5f305a(0x24f)]+_0x5f305a(0x320)+_0x197213['projectName']+'\x27'),(_0x4394d7[_0x5f305a(0x25f)]||_0x4394d7[_0x5f305a(0x257)])&&await handleSingleObjectOutput(_0x197213,_0x4394d7),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a56_0x28b4c4(0x22a)]='workflow:secrets:delete';['description']='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async[a56_0x28b4c4(0x195)](_0x2e0497){const _0x44e27b=a56_0x28b4c4,{options:_0x5a7fd4,args:_0x36534b,tdx:_0x44b8ba}=_0x2e0497;let _0x11b8b5,_0x30d727;if(_0x36534b[_0x44e27b(0x24f)]>=0x2)_0x11b8b5=_0x36534b[0x0],_0x30d727=_0x36534b[0x1];else{if(_0x36534b['length']===0x1&&_0x5a7fd4[_0x44e27b(0x280)])_0x11b8b5=_0x5a7fd4[_0x44e27b(0x280)],_0x30d727=_0x36534b[0x0];else return _0x36534b[_0x44e27b(0x24f)]===0x1?(console[_0x44e27b(0x174)](_0x44e27b(0x274)),console[_0x44e27b(0x174)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x44e27b(0x174)](_0x44e27b(0x17f)),console['error'](_0x44e27b(0x19a)),0x1);}_0x5a7fd4[_0x44e27b(0x28c)]&&(console['error'](_0x44e27b(0x275)+_0x11b8b5),console[_0x44e27b(0x174)](_0x44e27b(0x2ba)+_0x30d727));if(!_0x5a7fd4[_0x44e27b(0x2ae)]){if(!isInteractive())return console['error'](a56_0x3ae1dc[_0x44e27b(0x31c)]('\x0aError:'),_0x44e27b(0x1f9)),console[_0x44e27b(0x174)](a56_0x3ae1dc[_0x44e27b(0x18b)](_0x44e27b(0x2f4))),0x1;const _0x35ded4=await confirmKey(_0x44e27b(0x341)+_0x30d727+_0x44e27b(0x1e8)+_0x11b8b5+'\x27?');if(!_0x35ded4)return console['error'](a56_0x3ae1dc['yellow']('Cancelled')),0x1;}const _0x170308=await withSpinner('Deleting\x20secret...',()=>_0x44b8ba[_0x44e27b(0x2b9)]['deleteSecret'](_0x11b8b5,_0x30d727),{'verbose':_0x5a7fd4[_0x44e27b(0x28c)]}),_0x3e2add=_0x170308[_0x44e27b(0x2c5)];return console[_0x44e27b(0x174)](_0x44e27b(0x25b)+_0x3e2add[_0x44e27b(0x27b)]+_0x44e27b(0x31a)+_0x3e2add[_0x44e27b(0x2c2)]+'\x27'),(_0x5a7fd4['json']||_0x5a7fd4[_0x44e27b(0x257)])&&await handleSingleObjectOutput(_0x3e2add,_0x5a7fd4),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(_0x46b361){const _0x169953=a56_0x28b4c4,_0x11a604=Math[_0x169953(0x327)](_0x46b361/0x3e8),_0x420440=Math[_0x169953(0x327)](_0x11a604/0x3c),_0x45ad1a=Math[_0x169953(0x327)](_0x420440/0x3c),_0x3692bb=Math[_0x169953(0x327)](_0x45ad1a/0x18);if(_0x3692bb>0x0){const _0x306660=_0x45ad1a%0x18;return _0x306660>0x0?_0x3692bb+'d\x20'+_0x306660+'h':_0x3692bb+'d';}else{if(_0x45ad1a>0x0){const _0x1eb286=_0x420440%0x3c;return _0x1eb286>0x0?_0x45ad1a+'h\x20'+_0x1eb286+'m':_0x45ad1a+'h';}else{if(_0x420440>0x0){const _0x4f8b3f=_0x11a604%0x3c;return _0x4f8b3f>0x0?_0x420440+'m\x20'+_0x4f8b3f+'s':_0x420440+'m';}else return _0x11a604+'s';}}}function formatTimestamp(_0x31beac,_0xab1abd){const _0x327ef1=a56_0x28b4c4,_0x55a7ed=new Date(_0x31beac),_0x23a28c=String(_0x55a7ed[_0x327ef1(0x347)]())[_0x327ef1(0x2f2)](0x2,'0'),_0x2754fe=String(_0x55a7ed[_0x327ef1(0x1c6)]())[_0x327ef1(0x2f2)](0x2,'0'),_0x160c42=_0x23a28c+':'+_0x2754fe,_0x4e9422=_0x55a7ed[_0x327ef1(0x26d)]()===_0xab1abd[_0x327ef1(0x26d)]()&&_0x55a7ed['getMonth']()===_0xab1abd['getMonth']()&&_0x55a7ed['getDate']()===_0xab1abd[_0x327ef1(0x1ab)]();if(_0x4e9422)return _0x160c42;else{const _0x32e4b2=String(_0x55a7ed['getMonth']()+0x1)['padStart'](0x2,'0'),_0x2da942=String(_0x55a7ed[_0x327ef1(0x1ab)]())[_0x327ef1(0x2f2)](0x2,'0');return _0x32e4b2+'-'+_0x2da942+'\x20'+_0x160c42;}}function formatDate(_0x11047d){const _0x362623=a56_0x28b4c4,_0x35946e=_0x11047d[_0x362623(0x26d)](),_0x4e19d9=String(_0x11047d[_0x362623(0x1f7)]()+0x1)[_0x362623(0x2f2)](0x2,'0'),_0x25310c=String(_0x11047d['getDate']())[_0x362623(0x2f2)](0x2,'0');return _0x35946e+'-'+_0x4e19d9+'-'+_0x25310c;}function getTaskStateIcon(_0x4e0e33){const _0x5b141a={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x5b141a[_0x4e0e33]||'⚪';}function getBarChar(_0x1bbb23){const _0x22e47f=a56_0x28b4c4;return _0x1bbb23===_0x22e47f(0x174)||_0x1bbb23===_0x22e47f(0x332)?'×':'─';}function getBarColor(_0x213e12){const _0x316513=a56_0x28b4c4,_0x14f264={'success':a56_0x3ae1dc[_0x316513(0x258)],'error':a56_0x3ae1dc[_0x316513(0x31c)],'group_error':a56_0x3ae1dc[_0x316513(0x31c)],'running':a56_0x3ae1dc[_0x316513(0x339)],'blocked':a56_0x3ae1dc['yellow'],'planned':a56_0x3ae1dc['dim'],'canceling':a56_0x3ae1dc[_0x316513(0x2df)]};return _0x14f264[_0x213e12]||a56_0x3ae1dc['white'];}function parseTaskName(_0x13b695){const _0x1ac5e3=a56_0x28b4c4;let _0x240b1a=_0x13b695[_0x1ac5e3(0x1a0)](/^\++/,'');const _0x4dc59b=_0x240b1a[_0x1ac5e3(0x2a3)]('+'),_0x514ff7=_0x4dc59b[_0x1ac5e3(0x24f)]>0x1?_0x4dc59b[_0x1ac5e3(0x24f)]-0x2:0x0,_0x4dd9f5=_0x4dc59b[_0x4dc59b[_0x1ac5e3(0x24f)]-0x1]||_0x240b1a;return{'level':_0x514ff7,'name':'+'+_0x4dd9f5};}function truncateTaskName(_0x1653ec,_0x518d39){const _0x3ff8eb=a56_0x28b4c4,_0x3f7ea0=stringWidth(_0x1653ec);if(_0x3f7ea0<=_0x518d39)return _0x1653ec;let _0x4875cd=_0x1653ec;while(stringWidth(_0x4875cd+'…')>_0x518d39&&_0x4875cd[_0x3ff8eb(0x24f)]>0x0){_0x4875cd=_0x4875cd[_0x3ff8eb(0x2c8)](0x0,-0x1);}return _0x4875cd+'…';}function calculateTimeScale(_0x244787,_0x42ce09){const _0x5698db=a56_0x28b4c4;return{'startTime':_0x244787[_0x5698db(0x192)],'endTime':_0x244787[_0x5698db(0x1a2)],'durationMs':_0x244787['duration'],'msPerChar':_0x244787[_0x5698db(0x21e)]/_0x42ce09};}function timeToPosition(_0x5cc693,_0x37afc0,_0x210f84){const _0x2d1f08=a56_0x28b4c4,_0x5330e8=_0x5cc693-_0x37afc0[_0x2d1f08(0x17e)],_0x466b30=Math[_0x2d1f08(0x327)](_0x5330e8/_0x37afc0['msPerChar']);return Math['max'](0x0,Math[_0x2d1f08(0x1f6)](_0x466b30,_0x210f84));}function renderTimeAxis(_0x3466e1,_0x4598d8){const _0x1e2a16=a56_0x28b4c4,_0x37f921=Math[_0x1e2a16(0x1f6)](TIMELINE_CONFIG[_0x1e2a16(0x1aa)],Math[_0x1e2a16(0x2e8)](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math['floor'](_0x4598d8/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x39409d=_0x3466e1[_0x1e2a16(0x301)]/(_0x37f921-0x1),_0x434e2f=new Date(_0x3466e1[_0x1e2a16(0x17e)]),_0x1370ec=[];for(let _0x468ba1=0x0;_0x468ba1<_0x37f921;_0x468ba1++){const _0xeab367=_0x3466e1[_0x1e2a16(0x17e)]+_0x468ba1*_0x39409d,_0x722fb8=timeToPosition(_0xeab367,_0x3466e1,_0x4598d8),_0x1c49b6=formatTimestamp(_0xeab367,_0x434e2f);_0x1370ec['push']({'pos':_0x722fb8,'text':_0x1c49b6});}const _0x5a965a=new Array(_0x4598d8)['fill']('\x20');let _0x1fdbc6=-0x1;for(const {pos:_0x70ba60,text:_0x4d8699}of _0x1370ec){let _0x4f9216=Math['max'](0x0,_0x70ba60-Math[_0x1e2a16(0x327)](_0x4d8699[_0x1e2a16(0x24f)]/0x2));_0x4f9216<=_0x1fdbc6+TIMELINE_CONFIG[_0x1e2a16(0x262)]&&(_0x4f9216=_0x1fdbc6+TIMELINE_CONFIG[_0x1e2a16(0x262)]+0x1);_0x4f9216+_0x4d8699[_0x1e2a16(0x24f)]>_0x4598d8&&(_0x4f9216=_0x4598d8-_0x4d8699['length']);if(_0x4f9216>=0x0&&_0x4f9216+_0x4d8699[_0x1e2a16(0x24f)]<=_0x4598d8&&_0x4f9216>_0x1fdbc6){for(let _0x5526b5=0x0;_0x5526b5<_0x4d8699[_0x1e2a16(0x24f)];_0x5526b5++){_0x5a965a[_0x4f9216+_0x5526b5]=_0x4d8699[_0x5526b5];}_0x1fdbc6=_0x4f9216+_0x4d8699[_0x1e2a16(0x24f)]-0x1;}}return _0x5a965a['join']('');}function renderTaskRow(_0x29be81,_0x296220,_0x38cab8,_0x3a7243){const _0x526b53=a56_0x28b4c4,{level:_0x4e8415,name:_0x17bc51}=parseTaskName(_0x29be81[_0x526b53(0x22a)]),_0x2a4944='\x20'[_0x526b53(0x273)](_0x4e8415),_0x25014c=_0x29be81[_0x526b53(0x179)]?'('+formatElapsed(_0x29be81[_0x526b53(0x179)]['duration'])+')':'',_0x405183=stringWidth(_0x25014c),_0x328266=_0x4e8415*0x1,_0x24551b=_0x3a7243-_0x328266-_0x405183-0x1,_0x2644fd=truncateTaskName(_0x17bc51,_0x24551b),_0x5ccc10=_0x2a4944+_0x2644fd,_0x5fad62=stringWidth(_0x5ccc10),_0x424639=_0x3a7243-_0x5fad62-_0x405183,_0x2d3d38=_0x5ccc10+'\x20'[_0x526b53(0x273)](Math[_0x526b53(0x2e8)](0x1,_0x424639))+a56_0x3ae1dc[_0x526b53(0x18b)](_0x25014c),_0x4e55b9=getTaskStateIcon(_0x29be81[_0x526b53(0x1ff)]),_0x3dd5d3=new Array(_0x38cab8)[_0x526b53(0x1fa)]('\x20');if(_0x29be81[_0x526b53(0x179)]){const _0x5206d8=timeToPosition(_0x29be81['window']['start'],_0x296220,_0x38cab8),_0x215401=timeToPosition(_0x29be81['window']['end'],_0x296220,_0x38cab8),_0x21370b=getBarChar(_0x29be81[_0x526b53(0x1ff)]),_0x3bfba0=Math[_0x526b53(0x2e8)](_0x5206d8+0x1,_0x215401);for(let _0x4fe18a=_0x5206d8;_0x4fe18a<Math[_0x526b53(0x1f6)](_0x3bfba0,_0x38cab8);_0x4fe18a++){_0x3dd5d3[_0x4fe18a]=_0x21370b;}}const _0x366f8b=getBarColor(_0x29be81[_0x526b53(0x1ff)]),_0x4b5529=_0x3dd5d3[_0x526b53(0x241)](_0x181b7c=>_0x181b7c==='\x20'?'\x20':_0x366f8b(_0x181b7c))['join']('');return _0x4e55b9+'\x20'+_0x2d3d38+'│'+_0x4b5529+'│';}function calculateStats(_0x4fb3b8){const _0x1b7f0e=a56_0x28b4c4,_0x29010c={'total':_0x4fb3b8[_0x1b7f0e(0x24f)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x35b8bd of _0x4fb3b8){if(_0x35b8bd['state']===_0x1b7f0e(0x244))_0x29010c[_0x1b7f0e(0x244)]++;else{if(_0x35b8bd[_0x1b7f0e(0x1ff)]===_0x1b7f0e(0x174)||_0x35b8bd['state']===_0x1b7f0e(0x332))_0x29010c['error']++;else _0x35b8bd[_0x1b7f0e(0x1ff)]==='running'?_0x29010c[_0x1b7f0e(0x349)]++:_0x29010c[_0x1b7f0e(0x1f1)]++;}}return _0x29010c;}function formatStats(_0x54e3a8){const _0x4e7a8a=a56_0x28b4c4;return[_0x4e7a8a(0x173)+_0x54e3a8[_0x4e7a8a(0x2f9)],'✅\x20'+_0x54e3a8['success'],'❌\x20'+_0x54e3a8[_0x4e7a8a(0x174)],_0x4e7a8a(0x346)+_0x54e3a8['running'],'⏳\x20'+_0x54e3a8[_0x4e7a8a(0x1f1)]][_0x4e7a8a(0x272)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a56_0x28b4c4(0x178);[a56_0x28b4c4(0x1ea)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a56_0x28b4c4(0x195)](_0x18a819){const _0x2b7e47=a56_0x28b4c4,{options:_0x159e81,args:_0x4885b8,tdx:_0x9c971d}=_0x18a819;let _0x3d6a64,_0x3bc71e,_0x6c3fb8=![];if(_0x4885b8[0x0]){if(_0x4885b8[0x0][_0x2b7e47(0x2b7)]('.')){const _0x5f4d92=this[_0x2b7e47(0x1c1)](_0x4885b8,_0x159e81);if(!_0x5f4d92)return 0x1;_0x3d6a64=_0x5f4d92[_0x2b7e47(0x2c2)],_0x3bc71e=_0x5f4d92['workflowName'];}else{_0x3bc71e=_0x4885b8[0x0],_0x3d6a64=_0x159e81[_0x2b7e47(0x280)];if(!_0x3d6a64)return console[_0x2b7e47(0x174)](a56_0x3ae1dc['red'](_0x2b7e47(0x31e)),_0x2b7e47(0x19f)),0x1;_0x6c3fb8=!![];}}else{const _0x1c1c53=this['parseProjectWorkflowPattern'](_0x4885b8,_0x159e81);if(!_0x1c1c53)return 0x1;_0x3d6a64=_0x1c1c53[_0x2b7e47(0x2c2)],_0x3bc71e=_0x1c1c53[_0x2b7e47(0x1d0)];}if(_0x159e81[_0x2b7e47(0x28c)]){if(_0x3d6a64&&_0x3bc71e)console[_0x2b7e47(0x174)](_0x2b7e47(0x31f)+_0x3d6a64+'.'+_0x3bc71e);else _0x3d6a64&&console[_0x2b7e47(0x174)]('Filter:\x20project='+_0x3d6a64);}const _0x3a0c36=_0x159e81[_0x2b7e47(0x249)],_0x9388ed=_0x159e81[_0x2b7e47(0x2a4)];if(_0x3a0c36){_0x9388ed&&console[_0x2b7e47(0x174)](a56_0x3ae1dc[_0x2b7e47(0x2df)]('Warning:'),_0x2b7e47(0x2e3));const _0x5c2769=_0x159e81['follow'];return _0x5c2769?await this[_0x2b7e47(0x2c1)](_0x18a819,_0x3a0c36):await this[_0x2b7e47(0x1de)](_0x18a819,_0x3a0c36,_0x159e81),0x0;}if(_0x9388ed){const _0x223011=await withSpinner(_0x2b7e47(0x28b),()=>_0x9c971d[_0x2b7e47(0x2b9)]['sessions']({'projectName':_0x3d6a64,'workflowName':_0x3bc71e,'limit':0x64}),{'verbose':_0x159e81[_0x2b7e47(0x28c)]}),_0x19d136=_0x223011[_0x2b7e47(0x2c5)][_0x2b7e47(0x2d1)](_0x538d7f=>_0x538d7f['id']===_0x9388ed);if(!_0x19d136)return console[_0x2b7e47(0x174)](a56_0x3ae1dc['red'](_0x2b7e47(0x31e)),_0x2b7e47(0x2e5)+_0x9388ed),0x1;if(!_0x19d136[_0x2b7e47(0x1dd)]?.['id'])return console['error'](a56_0x3ae1dc['red'](_0x2b7e47(0x31e)),'Session\x20'+_0x9388ed+_0x2b7e47(0x326)),0x1;const _0x27c86d=_0x19d136['lastAttempt']['id'];_0x159e81[_0x2b7e47(0x28c)]&&console[_0x2b7e47(0x174)](_0x2b7e47(0x2e9)+_0x27c86d+_0x2b7e47(0x193)+_0x9388ed);const _0x3ecba7=_0x159e81[_0x2b7e47(0x204)];return _0x3ecba7?await this[_0x2b7e47(0x2c1)](_0x18a819,_0x27c86d):await this['renderSingleTimeline'](_0x18a819,_0x27c86d,_0x159e81),0x0;}const _0x4fcb4a=await withSpinner(_0x2b7e47(0x285),()=>_0x9c971d[_0x2b7e47(0x2b9)][_0x2b7e47(0x242)]({'projectName':_0x3d6a64,'workflowName':_0x3bc71e,'limit':_0x159e81[_0x2b7e47(0x1b3)]||0x32}),{'verbose':_0x159e81['verbose']}),_0x281dd6=_0x4fcb4a[_0x2b7e47(0x2c5)];if(_0x281dd6[_0x2b7e47(0x24f)]===0x0){if(_0x3d6a64&&_0x3bc71e)console[_0x2b7e47(0x174)](_0x2b7e47(0x2c9)+_0x3d6a64+'.'+_0x3bc71e);else _0x3d6a64?console[_0x2b7e47(0x174)](_0x2b7e47(0x2de)+_0x3d6a64):(console[_0x2b7e47(0x174)](_0x2b7e47(0x28e)),console[_0x2b7e47(0x174)](a56_0x3ae1dc[_0x2b7e47(0x18b)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x281dd6[_0x2b7e47(0x1ed)]((_0x23d6b2,_0x3c1165)=>{const _0xff067c=_0x2b7e47,_0x5df032=_0x23d6b2[_0xff067c(0x1eb)]||'',_0x2bcb5c=_0x3c1165[_0xff067c(0x1eb)]||'';return _0x2bcb5c[_0xff067c(0x1ef)](_0x5df032);});if(_0x159e81[_0x2b7e47(0x25f)]||_0x159e81[_0x2b7e47(0x257)])return await handleSDKOutput(_0x281dd6,_0x159e81),0x0;let _0x2d5017;if(_0x6c3fb8){const _0xd51065=_0x281dd6[0x0];if(!_0xd51065['lastAttempt']?.['id'])return console[_0x2b7e47(0x174)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x2d5017=_0xd51065[_0x2b7e47(0x1dd)]['id'],_0x159e81[_0x2b7e47(0x28c)]&&console['error']('Auto-selected\x20latest\x20session:\x20'+_0xd51065['sessionTime']);}else{const _0x3aed31=_0x281dd6[_0x2b7e47(0x241)](_0x5e7c38=>{const _0x20393f=_0x2b7e47,_0xc27d1f=getAttemptStatusDisplay(_0x5e7c38[_0x20393f(0x1dd)]);return{'title':_0x5e7c38[_0x20393f(0x1ba)]?.[_0x20393f(0x22a)]+'.'+_0x5e7c38['workflow']?.[_0x20393f(0x22a)]+_0x20393f(0x1b5)+_0x5e7c38['sessionTime']+'\x20'+_0xc27d1f[_0x20393f(0x2d6)],'value':_0x5e7c38[_0x20393f(0x1dd)]?.['id']||'','description':_0xc27d1f['text']};}),_0x2fef21=await a56_0x4687fd({'type':_0x2b7e47(0x1d6),'name':_0x2b7e47(0x249),'message':_0x2b7e47(0x267),'choices':_0x3aed31[_0x2b7e47(0x1d8)](_0x5c5bc2=>_0x5c5bc2['value']!=='')});if(!_0x2fef21[_0x2b7e47(0x249)])return 0x0;_0x2d5017=_0x2fef21[_0x2b7e47(0x249)];}const _0x4b40fe=_0x159e81['follow'];return _0x4b40fe?await this[_0x2b7e47(0x2c1)](_0x18a819,_0x2d5017):await this[_0x2b7e47(0x1de)](_0x18a819,_0x2d5017,_0x159e81),0x0;}async[a56_0x28b4c4(0x1de)](_0x16a4ef,_0x48350e,_0x14f823){const _0x49db2d=a56_0x28b4c4,{tdx:_0x5dc79f}=_0x16a4ef;let _0x589cc5,_0x5ebecd;try{[_0x589cc5,_0x5ebecd]=await Promise[_0x49db2d(0x247)]([_0x5dc79f['workflow'][_0x49db2d(0x32c)](_0x48350e),_0x5dc79f[_0x49db2d(0x2b9)][_0x49db2d(0x210)](_0x48350e,![])]);}catch(_0x15d101){console[_0x49db2d(0x174)](a56_0x3ae1dc[_0x49db2d(0x31c)]('Failed\x20to\x20fetch\x20attempt\x20data'));_0x14f823['verbose']&&console[_0x49db2d(0x174)](_0x15d101);throw _0x15d101;}if(_0x14f823[_0x49db2d(0x25f)]||_0x14f823[_0x49db2d(0x257)]){const _0x2ba1c8=this[_0x49db2d(0x25a)](_0x589cc5,_0x5ebecd);await handleSDKOutput([_0x2ba1c8],_0x14f823);return;}const _0x3ed443=_0x5dc79f['context'][_0x49db2d(0x1df)],_0x7b4799=this[_0x49db2d(0x30b)](_0x589cc5,_0x5ebecd,_0x3ed443);console['log'](_0x7b4799);}async['pollTimeline'](_0x14bdc1,_0x13b561){const _0x30c976=a56_0x28b4c4,{tdx:_0x30c3fa}=_0x14bdc1,_0x31525f=TIMELINE_CONFIG[_0x30c976(0x314)],_0x13aa9b=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x562ef3=0x0;while(_0x562ef3<_0x13aa9b){process['stdout'][_0x30c976(0x24c)]&&process[_0x30c976(0x1b8)][_0x30c976(0x21a)]('\x1Bc');let _0x3cfc6b,_0x2b372a;try{[_0x3cfc6b,_0x2b372a]=await Promise['all']([_0x30c3fa[_0x30c976(0x2b9)][_0x30c976(0x32c)](_0x13b561),_0x30c3fa[_0x30c976(0x2b9)][_0x30c976(0x210)](_0x13b561,![])]);}catch(_0x58b3d6){console[_0x30c976(0x174)](a56_0x3ae1dc['red'](_0x30c976(0x23d)));_0x562ef3>0x0&&console['error'](a56_0x3ae1dc[_0x30c976(0x18b)](_0x30c976(0x18a)+_0x562ef3));throw _0x58b3d6;}const _0x3bbac9=_0x30c3fa[_0x30c976(0x239)]['site'],_0x3bf08b=this[_0x30c976(0x30b)](_0x3cfc6b,_0x2b372a,_0x3bbac9);console[_0x30c976(0x2b0)](_0x3bf08b);const _0x547961=_0x3cfc6b[_0x30c976(0x1c8)]&&_0x2b372a[_0x30c976(0x283)](_0x447d9c=>_0x447d9c[_0x30c976(0x1ff)]!==_0x30c976(0x349)&&_0x447d9c['state']!==_0x30c976(0x276));if(_0x547961){console['error'](a56_0x3ae1dc[_0x30c976(0x258)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x30c976(0x174)](a56_0x3ae1dc[_0x30c976(0x18b)]('\x0aPolling...\x20('+_0x562ef3*0x2+_0x30c976(0x21d))),await new Promise(_0x146c5c=>setTimeout(_0x146c5c,_0x31525f)),_0x562ef3++;}_0x562ef3>=_0x13aa9b&&console[_0x30c976(0x174)](a56_0x3ae1dc[_0x30c976(0x2df)](_0x30c976(0x2c3)));}['renderTimeline'](_0x1422ea,_0xb001d5,_0x329746){const _0x42b745=a56_0x28b4c4,_0x4991a7=[],_0x383717=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x3692da=0x5,_0x5c822e=process[_0x42b745(0x1b8)][_0x42b745(0x18f)]||0x78,_0x3cfeb3=_0x5c822e-_0x383717-_0x3692da,_0xbe2a21=Math[_0x42b745(0x2e8)](TIMELINE_CONFIG[_0x42b745(0x25c)],Math[_0x42b745(0x1f6)](_0x3cfeb3,TIMELINE_CONFIG[_0x42b745(0x2f1)])),_0x4ab099=new Date(_0x1422ea[_0x42b745(0x2bb)])[_0x42b745(0x331)](),_0x41114e=_0x1422ea['finishedAt']?new Date(_0x1422ea[_0x42b745(0x1c4)])[_0x42b745(0x331)]():Date[_0x42b745(0x304)](),_0x4eb814={'start':_0x4ab099,'end':_0x41114e,'duration':_0x41114e-_0x4ab099},_0x4c3f1f=new Map(),_0x204b59=[];for(const _0xa0a886 of _0xb001d5){if(_0xa0a886[_0x42b745(0x1c2)]){const _0x3358df=new Date(_0xa0a886[_0x42b745(0x1c2)])[_0x42b745(0x331)](),_0x51e2b8=_0xa0a886[_0x42b745(0x1a7)]?new Date(_0xa0a886[_0x42b745(0x1a7)])['getTime']():Date[_0x42b745(0x304)](),_0x37223a={'start':_0x3358df,'end':_0x51e2b8,'duration':_0x51e2b8-_0x3358df};_0x4c3f1f[_0x42b745(0x32a)](_0xa0a886['id'],_0x37223a),_0x204b59[_0x42b745(0x220)]({'name':_0xa0a886['fullName'],'state':_0xa0a886['state']||'unknown','window':_0x37223a});}else _0x204b59[_0x42b745(0x220)]({'name':_0xa0a886[_0x42b745(0x29f)],'state':_0xa0a886[_0x42b745(0x1ff)]||_0x42b745(0x276),'window':undefined});}_0x204b59[_0x42b745(0x1ed)]((_0x5da616,_0x52dd6a)=>{const _0x4129ad=_0x42b745;if(!_0x5da616[_0x4129ad(0x179)])return 0x1;if(!_0x52dd6a[_0x4129ad(0x179)])return-0x1;return _0x5da616['window'][_0x4129ad(0x192)]-_0x52dd6a[_0x4129ad(0x179)][_0x4129ad(0x192)];});const _0x567378=_0x204b59[_0x42b745(0x24f)],_0x349611=_0x567378>TIMELINE_CONFIG[_0x42b745(0x1d7)];_0x349611&&_0x204b59[_0x42b745(0x33d)](TIMELINE_CONFIG[_0x42b745(0x1d7)]);const _0x52470a=calculateTimeScale(_0x4eb814,_0xbe2a21),_0x26c391=_0x1422ea[_0x42b745(0x1c8)]?_0x1422ea[_0x42b745(0x244)]?a56_0x3ae1dc[_0x42b745(0x258)](_0x42b745(0x244)):a56_0x3ae1dc[_0x42b745(0x31c)](_0x42b745(0x174)):a56_0x3ae1dc[_0x42b745(0x339)](_0x42b745(0x349)),_0x5cc371=_0x1422ea['project']?.['id'],_0x1df3be=_0x1422ea[_0x42b745(0x2a4)];let _0x19719f;if(_0x5cc371&&_0x1df3be){const _0x4596bd=getWorkflowAttemptUrl(_0x329746,_0x5cc371,_0x1df3be,_0x1422ea['id']);_0x19719f=hyperlink(a56_0x3ae1dc[_0x42b745(0x18b)](_0x1422ea['id']),_0x4596bd);}else _0x19719f=a56_0x3ae1dc[_0x42b745(0x18b)](_0x1422ea['id']);_0x4991a7[_0x42b745(0x220)]('Attempt:\x20'+_0x19719f+_0x42b745(0x1b5)+_0x26c391+_0x42b745(0x1b5)+formatElapsed(_0x4eb814[_0x42b745(0x21e)]));if(_0x204b59[_0x42b745(0x24f)]>0x0){const _0x3ee955=renderTimeAxis(_0x52470a,_0xbe2a21),_0x119dce=new Date(_0x4eb814['start']),_0x307f10=formatDate(_0x119dce),_0x3c76cd=TIMELINE_CONFIG[_0x42b745(0x297)]+TIMELINE_CONFIG['ICON_SPACING']+_0x383717,_0x4f45ea=_0x307f10[_0x42b745(0x2f2)](_0x3c76cd),_0x31728b=a56_0x3ae1dc['dim'](_0x4f45ea);_0x4991a7[_0x42b745(0x220)](_0x31728b+'\x20'+_0x3ee955);for(const _0x3da3ba of _0x204b59){_0x4991a7[_0x42b745(0x220)](renderTaskRow(_0x3da3ba,_0x52470a,_0xbe2a21,_0x383717));}const _0x5eb350=calculateStats(_0x204b59);_0x4991a7['push'](formatStats(_0x5eb350)),_0x349611&&_0x4991a7['push'](a56_0x3ae1dc['yellow'](_0x42b745(0x29e)+TIMELINE_CONFIG[_0x42b745(0x1d7)]+'\x20of\x20'+_0x567378+'\x20tasks')),_0x4991a7[_0x42b745(0x220)](''),_0x4991a7[_0x42b745(0x220)](a56_0x3ae1dc[_0x42b745(0x18b)](_0x42b745(0x328))+(_0x42b745(0x2aa)+_0x1422ea['id']+_0x42b745(0x293))+a56_0x3ae1dc['dim']('\x20to\x20see\x20detailed\x20logs'));}else _0x4991a7[_0x42b745(0x220)](_0x42b745(0x20d));return _0x4991a7[_0x42b745(0x272)]('\x0a');}[a56_0x28b4c4(0x25a)](_0x3910c8,_0xa19c29){const _0x43c6aa=a56_0x28b4c4,_0x69c007=new Date(_0x3910c8[_0x43c6aa(0x2bb)])[_0x43c6aa(0x331)](),_0x223ddb=_0x3910c8['finishedAt']?new Date(_0x3910c8[_0x43c6aa(0x1c4)])['getTime']():Date['now'](),_0x1598b1=_0x223ddb-_0x69c007,_0x5e2810=[];for(const _0x529a5d of _0xa19c29){if(_0x529a5d[_0x43c6aa(0x1c2)]){const _0x22adce=new Date(_0x529a5d[_0x43c6aa(0x1c2)])[_0x43c6aa(0x331)](),_0x167d17=_0x529a5d[_0x43c6aa(0x1a7)]?new Date(_0x529a5d['updatedAt'])['getTime']():Date[_0x43c6aa(0x304)]();_0x5e2810[_0x43c6aa(0x220)]({'name':_0x529a5d[_0x43c6aa(0x29f)],'state':_0x529a5d['state']||_0x43c6aa(0x175),'window':{'start':_0x22adce,'end':_0x167d17,'duration':_0x167d17-_0x22adce}});}else _0x5e2810[_0x43c6aa(0x220)]({'name':_0x529a5d[_0x43c6aa(0x29f)],'state':_0x529a5d['state']||'planned','window':undefined});}const _0x2b660b=calculateStats(_0x5e2810);return{'attempt':{'id':_0x3910c8['id'],'status':_0x3910c8['done']?_0x3910c8[_0x43c6aa(0x244)]?'success':_0x43c6aa(0x174):_0x43c6aa(0x349),'createdAt':_0x3910c8[_0x43c6aa(0x2bb)],'finishedAt':_0x3910c8[_0x43c6aa(0x1c4)],'duration_ms':_0x1598b1},'tasks':_0x5e2810[_0x43c6aa(0x241)](_0x5f48e1=>({'name':_0x5f48e1[_0x43c6aa(0x22a)],'state':_0x5f48e1[_0x43c6aa(0x1ff)],'startedAt':_0x5f48e1[_0x43c6aa(0x179)]?new Date(_0x5f48e1[_0x43c6aa(0x179)][_0x43c6aa(0x192)])[_0x43c6aa(0x1dc)]():null,'updatedAt':_0x5f48e1[_0x43c6aa(0x179)]?new Date(_0x5f48e1[_0x43c6aa(0x179)]['end'])['toISOString']():null,'duration_ms':_0x5f48e1[_0x43c6aa(0x179)]?.['duration']||null})),'stats':_0x2b660b};}}function formatScheduleLine(_0x49fdc0){const _0x13ae41=a56_0x28b4c4,_0x35e922=_0x49fdc0[_0x13ae41(0x1b6)]?a56_0x3ae1dc[_0x13ae41(0x2df)](_0x13ae41(0x2af)):'',_0xa3ec0a=_0x49fdc0[_0x13ae41(0x1ba)]?.[_0x13ae41(0x22a)]?a56_0x3ae1dc[_0x13ae41(0x18b)]('\x20['+_0x49fdc0[_0x13ae41(0x1ba)][_0x13ae41(0x22a)]+']'):'',_0x3c1efd=_0x49fdc0[_0x13ae41(0x2d3)]?a56_0x3ae1dc[_0x13ae41(0x18b)](_0x13ae41(0x1c3)+new Date(_0x49fdc0[_0x13ae41(0x2d3)])[_0x13ae41(0x2fa)]()):'';return'📅\x20#'+_0x49fdc0['id']+'\x20'+(_0x49fdc0[_0x13ae41(0x2b9)]?.[_0x13ae41(0x22a)]||_0x13ae41(0x305))+_0xa3ec0a+_0x35e922+_0x3c1efd;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x2f5);[a56_0x28b4c4(0x1ea)]='List\x20workflow\x20schedules';async[a56_0x28b4c4(0x195)](_0x30cf96){const _0x2b1292=a56_0x28b4c4,{options:_0x46ace4,args:_0x1483d6,tdx:_0x56af69}=_0x30cf96,{scheduleId:_0x34b186}=_0x46ace4;if(_0x34b186&&_0x1483d6[0x0])return console['error'](a56_0x3ae1dc[_0x2b1292(0x31c)](_0x2b1292(0x31e)),_0x2b1292(0x33a)),console[_0x2b1292(0x174)](a56_0x3ae1dc[_0x2b1292(0x18b)](_0x2b1292(0x288))),0x1;if(_0x34b186){const _0x200416=await withSpinner(_0x2b1292(0x1e0)+_0x34b186+'...',()=>_0x56af69[_0x2b1292(0x2b9)]['getSchedule'](_0x34b186),{'verbose':_0x46ace4[_0x2b1292(0x28c)]}),_0x2a2bbf=_0x200416['data'];return isStructuredFormat(_0x46ace4)?await handleSingleObjectOutput(_0x2a2bbf,_0x46ace4):(console[_0x2b1292(0x174)](_0x2b1292(0x1b1)),console['log'](formatScheduleLine(_0x2a2bbf))),0x0;}const _0x5a01be=this['parseProjectWorkflowPattern'](_0x1483d6,_0x46ace4);if(!_0x5a01be)return 0x1;const {projectName:_0x4b57ab,workflowName:_0x3fd05b}=_0x5a01be,_0x297d81=_0x4b57ab?'\x27'+_0x4b57ab+(_0x3fd05b?'.'+_0x3fd05b:'')+'\x27':undefined,_0x4f9d86=await withSpinner(_0x297d81?_0x2b1292(0x1f2)+_0x297d81+_0x2b1292(0x1d5):_0x2b1292(0x292),()=>_0x4b57ab?_0x56af69[_0x2b1292(0x2b9)][_0x2b1292(0x1a6)](_0x4b57ab,{'workflow':_0x3fd05b,'limit':_0x46ace4[_0x2b1292(0x1b3)]}):_0x56af69[_0x2b1292(0x2b9)][_0x2b1292(0x1d2)]({'limit':_0x46ace4['limit']}),{'verbose':_0x46ace4[_0x2b1292(0x28c)]}),_0x1558e5=_0x4f9d86[_0x2b1292(0x2c5)],_0x893503=_0x46ace4[_0x2b1292(0x1b3)]&&_0x1558e5[_0x2b1292(0x24f)]>=_0x46ace4[_0x2b1292(0x1b3)]?a56_0x3ae1dc['dim'](_0x2b1292(0x1af)):'';console[_0x2b1292(0x174)](_0x2b1292(0x209)+_0x1558e5[_0x2b1292(0x24f)]+_0x2b1292(0x18d)+(_0x1558e5[_0x2b1292(0x24f)]!==0x1?'s':'')+_0x893503);if(isStructuredFormat(_0x46ace4))await handleSDKOutput(_0x1558e5,_0x46ace4);else{if(_0x1558e5['length']===0x0)console[_0x2b1292(0x2b0)]('No\x20schedules\x20found');else for(const _0x3cd4b9 of _0x1558e5){console[_0x2b1292(0x2b0)](formatScheduleLine(_0x3cd4b9));}}return 0x0;}}function a56_0x3ea7(_0x199d6e,_0x251cf4){_0x199d6e=_0x199d6e-0x172;const _0x46208d=a56_0x4620();let _0x3ea71e=_0x46208d[_0x199d6e];return _0x3ea71e;}export class WorkflowScheduleEnableCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x190);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x313);async[a56_0x28b4c4(0x195)](_0x8d0c38){const _0x151a9c=a56_0x28b4c4,{options:_0x4ae3a,args:_0x2d3640,tdx:_0x8029af}=_0x8d0c38,_0x1d2966=_0x2d3640[0x0];if(!_0x1d2966)return console['error'](a56_0x3ae1dc['red'](_0x151a9c(0x31e)),_0x151a9c(0x32d)),console[_0x151a9c(0x174)](a56_0x3ae1dc[_0x151a9c(0x18b)]('Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>')),console[_0x151a9c(0x174)](a56_0x3ae1dc['dim']('Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs')),0x1;const {backfill:_0x4c636c,nextTime:_0x346537}=_0x4ae3a,_0x436364={};if(_0x4c636c!==undefined)_0x436364[_0x151a9c(0x2cb)]=!_0x4c636c;if(_0x346537!==undefined)_0x436364[_0x151a9c(0x20f)]=_0x346537;const _0x25f437=await withSpinner(_0x151a9c(0x251)+_0x1d2966+_0x151a9c(0x1d5),()=>_0x8029af[_0x151a9c(0x2b9)]['enableSchedule'](_0x1d2966,_0x436364),{'verbose':_0x4ae3a['verbose']}),_0x8d48ad=_0x25f437[_0x151a9c(0x2c5)];return isStructuredFormat(_0x4ae3a)?await handleSingleObjectOutput(_0x8d48ad,_0x4ae3a):(console[_0x151a9c(0x2b0)](_0x151a9c(0x17b)+_0x1d2966+'\x20enabled\x20('+(_0x8d48ad['workflow']?.[_0x151a9c(0x22a)]||_0x151a9c(0x175))+')'),_0x8d48ad[_0x151a9c(0x2d3)]&&console[_0x151a9c(0x2b0)](a56_0x3ae1dc[_0x151a9c(0x18b)](_0x151a9c(0x311)+new Date(_0x8d48ad[_0x151a9c(0x2d3)])[_0x151a9c(0x2fa)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a56_0x28b4c4(0x22a)]=a56_0x28b4c4(0x21f);[a56_0x28b4c4(0x1ea)]=a56_0x28b4c4(0x2ad);async[a56_0x28b4c4(0x195)](_0x1f64fb){const _0x4ba17d=a56_0x28b4c4,{options:_0x2ed3e9,args:_0x332222,tdx:_0x751c87}=_0x1f64fb,_0x2b9a5c=_0x332222[0x0];if(!_0x2b9a5c)return console['error'](a56_0x3ae1dc[_0x4ba17d(0x31c)](_0x4ba17d(0x31e)),_0x4ba17d(0x32d)),console[_0x4ba17d(0x174)](a56_0x3ae1dc[_0x4ba17d(0x18b)](_0x4ba17d(0x2a1))),console[_0x4ba17d(0x174)](a56_0x3ae1dc[_0x4ba17d(0x18b)](_0x4ba17d(0x2b8))),0x1;const _0x55da4f=await withSpinner(_0x4ba17d(0x1f3)+_0x2b9a5c+_0x4ba17d(0x1d5),()=>_0x751c87[_0x4ba17d(0x2b9)][_0x4ba17d(0x33f)](_0x2b9a5c),{'verbose':_0x2ed3e9[_0x4ba17d(0x28c)]}),_0x2f4025=_0x55da4f[_0x4ba17d(0x2c5)];return isStructuredFormat(_0x2ed3e9)?await handleSingleObjectOutput(_0x2f4025,_0x2ed3e9):console['log'](_0x4ba17d(0x17b)+_0x2b9a5c+_0x4ba17d(0x2e2)+(_0x2f4025[_0x4ba17d(0x2b9)]?.['name']||_0x4ba17d(0x175))+')'),0x0;}}
1
+ const a56_0x1982d8=a56_0x120f;(function(_0x24a87d,_0x27453f){const _0x2845a6=a56_0x120f,_0x58949b=_0x24a87d();while(!![]){try{const _0x453681=parseInt(_0x2845a6(0x128))/0x1+-parseInt(_0x2845a6(0x201))/0x2+-parseInt(_0x2845a6(0x11b))/0x3+parseInt(_0x2845a6(0x222))/0x4+-parseInt(_0x2845a6(0x19f))/0x5+parseInt(_0x2845a6(0x224))/0x6*(parseInt(_0x2845a6(0x195))/0x7)+-parseInt(_0x2845a6(0x231))/0x8;if(_0x453681===_0x27453f)break;else _0x58949b['push'](_0x58949b['shift']());}catch(_0x4f0adb){_0x58949b['push'](_0x58949b['shift']());}}}(a56_0x568d,0xa12e6));import a56_0x47be42 from'chalk';import{existsSync}from'fs';import a56_0x27aa68 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_0x23600a from'prompts';function getAttemptStatusDisplay(_0x37b8ec){const _0x3e2880=a56_0x120f;if(!_0x37b8ec)return{'icon':'⏳','text':''};const {done:_0x22c836,success:_0xd89bbf,cancelRequested:_0x5aeaac}=_0x37b8ec;if(!_0x22c836)return _0x5aeaac?{'icon':'🛑','text':a56_0x47be42[_0x3e2880(0x205)](_0x3e2880(0x115))}:{'icon':'🔄','text':a56_0x47be42[_0x3e2880(0x12a)](_0x3e2880(0xc0))};if(_0xd89bbf)return{'icon':'✅','text':a56_0x47be42[_0x3e2880(0x21f)](_0x3e2880(0x193))};return{'icon':'❌','text':a56_0x47be42[_0x3e2880(0x11a)](_0x3e2880(0x9f))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x23634e,_0x4827f7,_0x5ce917=0x0){return _0x23634e[_0x5ce917]||_0x4827f7['workflowProject'];}[a56_0x1982d8(0x206)](_0x5a7e19,_0x4dcbfd,_0x271d53=0x0){const _0x5be29a=a56_0x1982d8,_0x4adfd0=this['resolveProject'](_0x5a7e19,_0x4dcbfd,_0x271d53);if(!_0x4adfd0)return console['error'](a56_0x47be42['red'](_0x5be29a(0x150)),_0x5be29a(0x163)),console[_0x5be29a(0x9f)](a56_0x47be42['dim'](_0x5be29a(0x1be))),null;return _0x4adfd0;}[a56_0x1982d8(0x144)](_0x3a5575,_0x78b457){const _0x39c2c4=a56_0x1982d8;if(_0x3a5575[0x0]){const _0x2c5ea3=_0x3a5575[0x0][_0x39c2c4(0x19b)]('.');if(_0x2c5ea3[_0x39c2c4(0x140)]===0x1)return{'projectName':_0x2c5ea3[0x0],'workflowName':undefined};else return _0x2c5ea3['length']===0x2?{'projectName':_0x2c5ea3[0x0],'workflowName':_0x2c5ea3[0x1]}:(console[_0x39c2c4(0x9f)](a56_0x47be42[_0x39c2c4(0x11a)]('Error:'),_0x39c2c4(0xd7)),null);}return{'projectName':_0x78b457[_0x39c2c4(0x247)],'workflowName':undefined};}[a56_0x1982d8(0x1ec)](_0x16fda4,_0x2a8ec4,_0x3cbf09=0x0){const _0xb854a1=a56_0x1982d8;if(_0x16fda4[_0x3cbf09])return _0x16fda4[_0x3cbf09];if(_0x2a8ec4[_0xb854a1(0x247)]){const _0x310ed8=a56_0x27aa68[_0xb854a1(0x227)](process[_0xb854a1(0x1cd)](),_0xb854a1(0x18e),_0x2a8ec4[_0xb854a1(0x247)]);if(existsSync(a56_0x27aa68[_0xb854a1(0x227)](_0x310ed8,_0xb854a1(0x1bc))))return _0x310ed8;}return undefined;}async[a56_0x1982d8(0x166)](_0x313a14,_0x54123d,_0x49caf1){const _0x42cd62=a56_0x1982d8;try{const _0x551661=await _0x313a14[_0x42cd62(0x83)][_0x42cd62(0x18e)](_0x54123d,{'limit':0x1});if(_0x551661[_0x42cd62(0x140)]>0x0){const _0x3f1a0d=_0x551661[0x0]['id'],_0x44387b=getWorkflowUrl(_0x49caf1,_0x3f1a0d);console['error'](_0x42cd62(0x173)+a56_0x47be42[_0x42cd62(0x16b)](_0x44387b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a56_0x1982d8(0x16f);['description']=a56_0x1982d8(0x211);async[a56_0x1982d8(0x24e)](_0x5e79c2){const _0x1a9266=a56_0x1982d8,{options:_0x28b69d,args:_0x4568db,tdx:_0x2a38fd}=_0x5e79c2,_0x133b1b=_0x4568db[0x0],_0x16a314=_0x28b69d[_0x1a9266(0x1cc)];if(_0x16a314)return saveSessionContext({'workflow_project':undefined},_0x28b69d[_0x1a9266(0x23e)]),console['log'](a56_0x47be42['green'](_0x1a9266(0x9e))),0x0;if(!_0x133b1b)return console[_0x1a9266(0x9f)](a56_0x47be42[_0x1a9266(0x11a)]('Error:'),_0x1a9266(0x163)),console[_0x1a9266(0x9f)](a56_0x47be42['dim']('Usage:\x20tdx\x20wf\x20use\x20<project>')),console['error'](a56_0x47be42['dim'](_0x1a9266(0xa5))),0x1;const _0x3908d9=await withSpinner(_0x1a9266(0x1c6)+_0x133b1b+'\x27...',()=>_0x2a38fd[_0x1a9266(0x83)][_0x1a9266(0x104)](_0x133b1b),{'verbose':_0x28b69d[_0x1a9266(0x1b1)]}),{name:_0x16e36f}=_0x3908d9['data'];return saveSessionContext({'workflow_project':_0x16e36f},_0x28b69d[_0x1a9266(0x23e)]),console[_0x1a9266(0xe1)](a56_0x47be42['green'](_0x1a9266(0x13a)+a56_0x47be42[_0x1a9266(0x16b)](_0x16e36f))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x239);[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x16c);async[a56_0x1982d8(0x24e)](_0x42c3c6){const _0x3b0dc5=a56_0x1982d8,{options:_0x317d4e,args:_0x1491b9,tdx:_0x2f62ee}=_0x42c3c6,_0x5c8206=_0x1491b9[0x0];_0x317d4e[_0x3b0dc5(0x1b1)]&&_0x5c8206&&console[_0x3b0dc5(0x9f)](_0x3b0dc5(0x149)+_0x5c8206);const _0x1cb920=await withSpinner(_0x3b0dc5(0x1fb),()=>_0x2f62ee[_0x3b0dc5(0x83)][_0x3b0dc5(0x1da)](_0x5c8206,{'limit':_0x317d4e[_0x3b0dc5(0x226)]}),{'verbose':_0x317d4e[_0x3b0dc5(0x1b1)]});let _0x57f8f0=_0x1cb920[_0x3b0dc5(0x207)];_0x57f8f0[_0x3b0dc5(0x1ac)]((_0x3e5aa3,_0xebd194)=>_0x3e5aa3[_0x3b0dc5(0x11f)][_0x3b0dc5(0x16e)](_0xebd194[_0x3b0dc5(0x11f)]));const _0x33ba35=_0x317d4e['limit']&&_0x57f8f0['length']>=_0x317d4e[_0x3b0dc5(0x226)]?a56_0x47be42['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3b0dc5(0x9f)](_0x3b0dc5(0x1a1)+_0x57f8f0[_0x3b0dc5(0x140)]+'\x20project'+(_0x57f8f0[_0x3b0dc5(0x140)]!==0x1?'s':'')+_0x33ba35);if(_0x317d4e['format']===_0x3b0dc5(0x8c)||_0x317d4e[_0x3b0dc5(0x164)]==='jsonl'||_0x317d4e[_0x3b0dc5(0x164)]===_0x3b0dc5(0x101))await handleSDKOutput(_0x57f8f0,_0x317d4e);else{if(_0x57f8f0[_0x3b0dc5(0x140)]===0x0)_0x5c8206?console[_0x3b0dc5(0xe1)]('No\x20projects\x20match\x20pattern:\x20'+_0x5c8206):console[_0x3b0dc5(0xe1)](_0x3b0dc5(0x153));else{const _0x10989e=_0x57f8f0[_0x3b0dc5(0x7f)](_0xee50f8=>{const _0x475543=_0x3b0dc5,_0x142e0a=_0xee50f8[_0x475543(0x1f4)]?.[_0x475543(0xa8)](_0x34d1c6=>_0x34d1c6[_0x475543(0xef)]==='sys'),_0x3b1d75=_0x142e0a?a56_0x47be42['dim'](_0x475543(0x1c1)):'';return _0x475543(0xbd)+_0xee50f8[_0x475543(0x11f)]+_0x3b1d75;});await writeOutput(_0x10989e[_0x3b0dc5(0x227)]('\x0a'),_0x317d4e[_0x3b0dc5(0x238)],_0x3b0dc5(0x127));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x22d);['description']=a56_0x1982d8(0x13d);async[a56_0x1982d8(0x24e)](_0x47aab6){const _0x383f18=a56_0x1982d8,{options:_0x30076d,args:_0x3225f7,tdx:_0xf67052}=_0x47aab6,_0x453a68=this[_0x383f18(0x9a)](_0x3225f7,_0x30076d);_0x30076d[_0x383f18(0x1b1)]&&_0x453a68&&console[_0x383f18(0x9f)](_0x383f18(0x9c)+_0x453a68);const _0x52629c=await withSpinner(_0x383f18(0x159),()=>_0xf67052[_0x383f18(0x83)]['workflows'](_0x453a68,{'limit':_0x30076d[_0x383f18(0x226)]}),{'verbose':_0x30076d['verbose']});let _0xb7463a=_0x52629c['data'];_0xb7463a['sort']((_0x24b411,_0x2f1b01)=>{const _0x2ad725=_0x383f18,_0x4dc093=_0x24b411['name'][_0x2ad725(0x16e)](_0x2f1b01['name']);if(_0x4dc093!==0x0)return _0x4dc093;return(_0x24b411[_0x2ad725(0xd4)]?.[_0x2ad725(0x11f)]||'')['localeCompare'](_0x2f1b01[_0x2ad725(0xd4)]?.[_0x2ad725(0x11f)]||'');});const _0x3b6ed0=_0x30076d[_0x383f18(0x226)]&&_0xb7463a[_0x383f18(0x140)]>=_0x30076d[_0x383f18(0x226)]?a56_0x47be42[_0x383f18(0x20a)](_0x383f18(0x1d1)):'';console[_0x383f18(0x9f)](_0x383f18(0x1a1)+_0xb7463a['length']+_0x383f18(0x82)+(_0xb7463a[_0x383f18(0x140)]!==0x1?'s':'')+_0x3b6ed0);if(_0x30076d[_0x383f18(0x164)]===_0x383f18(0x8c)||_0x30076d['format']===_0x383f18(0x1c8)||_0x30076d[_0x383f18(0x164)]==='table')await handleSDKOutput(_0xb7463a,_0x30076d);else{if(_0xb7463a['length']===0x0)_0x453a68?console[_0x383f18(0xe1)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x453a68):console[_0x383f18(0xe1)]('No\x20workflows\x20found');else{const _0x33f126=_0x30076d[_0x383f18(0x194)],_0x10bd0b=_0xb7463a['map'](_0x9c6239=>{const _0xc2f26e=_0x383f18,_0x35d40a=a56_0x47be42['dim']('#'+_0x9c6239['id']),_0x449d5a=hyperlink(_0x35d40a,getWorkflowUrl(_0x33f126,_0x9c6239['id'])),_0x1b4752=_0x9c6239[_0xc2f26e(0xd4)]?.[_0xc2f26e(0x11f)]?a56_0x47be42[_0xc2f26e(0x20a)]('\x20('+_0x9c6239[_0xc2f26e(0xd4)]['name']+')'):'';return _0xc2f26e(0xed)+_0x449d5a+'\x20'+_0x9c6239[_0xc2f26e(0x11f)]+_0x1b4752;});await writeOutput(_0x10bd0b['join']('\x0a'),_0x30076d['output'],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x185);[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x199);async[a56_0x1982d8(0x24e)](_0x570a44){const _0x55859e=a56_0x1982d8,{options:_0xca8fed,args:_0x20bb6e,tdx:_0xec810d}=_0x570a44,_0x298e85=this[_0x55859e(0x144)](_0x20bb6e,_0xca8fed);if(!_0x298e85)return 0x1;const {projectName:_0x32f9bd,workflowName:_0x4010b6}=_0x298e85;if(_0xca8fed[_0x55859e(0x1b1)]){if(_0x32f9bd&&_0x4010b6)console[_0x55859e(0x9f)](_0x55859e(0x1ff)+_0x32f9bd+'.'+_0x4010b6);else _0x32f9bd&&console[_0x55859e(0x9f)](_0x55859e(0x176)+_0x32f9bd);const _0x326e22=_0xca8fed[_0x55859e(0x118)];_0x326e22&&console[_0x55859e(0x9f)](_0x55859e(0x81)+_0x326e22);}let _0x170fa7=0x28;if(process[_0x55859e(0x1e5)][_0x55859e(0x203)]&&!_0xca8fed[_0x55859e(0x238)]&&!_0xca8fed[_0x55859e(0x164)]){const _0x3ea05f=process['stdout'][_0x55859e(0x18c)]||0x28;_0x170fa7=Math[_0x55859e(0x1d4)](0x14,Math['floor'](_0x3ea05f*0x2/0x3));}const _0x1a4f7e=_0xca8fed[_0x55859e(0x226)]||_0x170fa7,_0x17ddce=await withSpinner(_0x55859e(0xf4),()=>_0xec810d[_0x55859e(0x83)]['sessions']({'projectName':_0x32f9bd,'workflowName':_0x4010b6,'status':_0xca8fed['status'],'fromTime':_0xca8fed[_0x55859e(0x1ee)],'toTime':_0xca8fed['to'],'limit':_0x1a4f7e}),{'verbose':_0xca8fed[_0x55859e(0x1b1)]}),_0x31e6a9=_0x17ddce[_0x55859e(0x207)];_0x31e6a9[_0x55859e(0x1ac)]((_0x25b458,_0x1ebf9e)=>{const _0x103207=_0x55859e,_0x253c43=_0x25b458[_0x103207(0x1fa)]||'',_0x13e88f=_0x1ebf9e[_0x103207(0x1fa)]||'';return _0x13e88f[_0x103207(0x16e)](_0x253c43);});_0x31e6a9[_0x55859e(0x140)]>=_0x1a4f7e?console[_0x55859e(0x9f)](_0x55859e(0x1a5)+_0x31e6a9[_0x55859e(0x140)]+'\x20sessions\x20'+a56_0x47be42[_0x55859e(0x20a)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x55859e(0x9f)]('✔\x20Found\x20'+_0x31e6a9['length']+_0x55859e(0x14a)+(_0x31e6a9[_0x55859e(0x140)]!==0x1?'s':''));if(_0xca8fed[_0x55859e(0x164)]===_0x55859e(0x8c)||_0xca8fed['format']===_0x55859e(0x1c8)||_0xca8fed[_0x55859e(0x164)]===_0x55859e(0x101))await handleSDKOutput(_0x31e6a9,_0xca8fed);else{if(!process[_0x55859e(0x1e5)][_0x55859e(0x203)]||_0xca8fed[_0x55859e(0x238)]){if(_0x31e6a9[_0x55859e(0x140)]===0x0){if(_0x32f9bd&&_0x4010b6)console[_0x55859e(0xe1)](_0x55859e(0x251)+_0x32f9bd+'.'+_0x4010b6);else _0x32f9bd?console[_0x55859e(0xe1)](_0x55859e(0xf1)+_0x32f9bd):console[_0x55859e(0xe1)](_0x55859e(0xe2));}else{const _0x365c84=_0xca8fed['site'],_0x5f009b=this[_0x55859e(0x1f3)](_0x31e6a9,_0x365c84);_0xca8fed[_0x55859e(0x238)]?await writeOutput(_0x5f009b,_0xca8fed['output'],_0x55859e(0x127)):console[_0x55859e(0xe1)](_0x5f009b);}!_0x32f9bd&&(console[_0x55859e(0x9f)](''),console[_0x55859e(0x9f)](a56_0x47be42['dim'](_0x55859e(0x1d3))),console['error'](a56_0x47be42[_0x55859e(0x20a)](_0x55859e(0x245))+'or'+a56_0x47be42[_0x55859e(0x20a)](_0x55859e(0x1dd))));}else{if(_0x31e6a9[_0x55859e(0x140)]===0x0){if(_0x32f9bd&&_0x4010b6)console[_0x55859e(0xe1)](_0x55859e(0x251)+_0x32f9bd+'.'+_0x4010b6);else _0x32f9bd?console[_0x55859e(0xe1)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x32f9bd):console[_0x55859e(0xe1)](_0x55859e(0xe2));}else await this[_0x55859e(0xda)](_0x31e6a9,_0x570a44,_0x32f9bd);}}return 0x0;}[a56_0x1982d8(0x1f3)](_0x3c13a7,_0x5e119e){const _0x5692b7=a56_0x1982d8,_0x4ef53a=[],_0x38f0f0=new Map();let _0x46b867=Infinity,_0x139c91=-Infinity;for(const _0x2d30a1 of _0x3c13a7){if(_0x2d30a1[_0x5692b7(0x240)]?.['createdAt']){const _0x4167f7=new Date(_0x2d30a1[_0x5692b7(0x240)][_0x5692b7(0xd9)])[_0x5692b7(0x233)](),_0x34e582=_0x2d30a1[_0x5692b7(0x240)][_0x5692b7(0x189)]?new Date(_0x2d30a1[_0x5692b7(0x240)][_0x5692b7(0x189)])[_0x5692b7(0x233)]():Date[_0x5692b7(0x175)](),_0x3eaae2=_0x2d30a1[_0x5692b7(0xd4)]?.['name']||_0x5692b7(0x15e);!_0x38f0f0[_0x5692b7(0x11e)](_0x3eaae2)&&_0x38f0f0[_0x5692b7(0x197)](_0x3eaae2,[]),_0x38f0f0['get'](_0x3eaae2)[_0x5692b7(0x215)]({'session':_0x2d30a1,'startTime':_0x4167f7,'endTime':_0x34e582,'duration':_0x34e582-_0x4167f7}),_0x46b867=Math[_0x5692b7(0xcc)](_0x46b867,_0x4167f7),_0x139c91=Math[_0x5692b7(0x1d4)](_0x139c91,_0x34e582);}}if(_0x38f0f0[_0x5692b7(0x1a0)]===0x0)return _0x5692b7(0xec);const _0x1bbcb4=process[_0x5692b7(0x1e5)]['columns']||0x78,_0x46acdf=0x1e,_0x22b459=0x32,_0x1bfc3e=0x4,_0x4b5a40=Math[_0x5692b7(0xcc)](_0x22b459,Math[_0x5692b7(0x1d4)](_0x46acdf,Math[_0x5692b7(0x10e)](_0x1bbcb4*0.3))),_0x5d7049=_0x1bbcb4-_0x4b5a40-TIMELINE_CONFIG[_0x5692b7(0x248)]-0x3-_0x1bfc3e,_0x32216f=_0x139c91-_0x46b867,_0x9226e6=_0x32216f/_0x4b5a40,_0x4974e3=renderTimeAxis({'startTime':_0x46b867,'endTime':_0x139c91,'durationMs':_0x32216f,'msPerChar':_0x9226e6},_0x4b5a40),_0x2a819e=[];for(const _0x2eb6be of _0x38f0f0['values']()){_0x2a819e[_0x5692b7(0x215)](..._0x2eb6be);}_0x2a819e[_0x5692b7(0x1ac)]((_0x4b9fdc,_0x326e7b)=>_0x326e7b['startTime']-_0x4b9fdc[_0x5692b7(0x1ae)]);const _0x219a41=new Date(_0x46b867),_0x377814=formatDate(_0x219a41),_0x4c0a76=_0x1bfc3e+TIMELINE_CONFIG[_0x5692b7(0xdb)]+TIMELINE_CONFIG[_0x5692b7(0xfa)]+_0x5d7049,_0x5755c5='\x20'['repeat'](_0x4c0a76-_0x377814['length']),_0x3c2e55=_0x5755c5+a56_0x47be42[_0x5692b7(0x20a)](_0x377814)+'\x20'+_0x4974e3;_0x4ef53a[_0x5692b7(0x215)](_0x3c2e55);const _0x2db69a=0x16;let _0x7ee13d=0x0;for(const _0x2ba8ab of _0x2a819e){const _0x18eecd=_0x2ba8ab[_0x5692b7(0x23e)]['project']?.[_0x5692b7(0x11f)]||'?',_0x24f9e7=Math[_0x5692b7(0xcc)](stringWidth(_0x18eecd),_0x2db69a);_0x7ee13d=Math['max'](_0x7ee13d,_0x24f9e7);}for(const _0x246117 of _0x2a819e){const {session:_0x1b9fae,startTime:_0x361b57,endTime:_0x2b4150,duration:_0x4dcb5c}=_0x246117,_0x4acbec=_0x1b9fae['project']?.['id'],_0x4e2b1a=_0x1b9fae['id'],_0x1b239f=_0x1b9fae[_0x5692b7(0xd4)]?.[_0x5692b7(0x11f)]||'?',_0x168f07=_0x1b9fae[_0x5692b7(0x83)]?.[_0x5692b7(0x11f)]||'?';let _0x5012df,_0x1fb33b;if(_0x1b9fae[_0x5692b7(0x240)]){const _0x3e8923=_0x1b9fae[_0x5692b7(0x240)];!_0x3e8923[_0x5692b7(0x174)]?(_0x5012df=_0x3e8923[_0x5692b7(0xdf)]?'🛑':'🔄',_0x1fb33b=_0x3e8923['cancelRequested']?a56_0x47be42['yellow']:a56_0x47be42[_0x5692b7(0x12a)]):(_0x5012df=_0x3e8923[_0x5692b7(0x193)]?'✅':'❌',_0x1fb33b=_0x3e8923[_0x5692b7(0x193)]?a56_0x47be42[_0x5692b7(0x21f)]:a56_0x47be42[_0x5692b7(0x11a)]);}else _0x5012df='⏳',_0x1fb33b=a56_0x47be42['dim'];const _0x17e229='#'+_0x4e2b1a,_0x353537=_0x4acbec?hyperlink(_0x17e229,getWorkflowSessionUrl(_0x5e119e,_0x4acbec,_0x4e2b1a)):_0x17e229;let _0x552307=_0x1b239f;stringWidth(_0x1b239f)>_0x2db69a&&(_0x552307=_0x1b239f[_0x5692b7(0x141)](0x0,_0x2db69a-0x1)+'…');const _0x5cb0c7=a56_0x47be42[_0x5692b7(0x20a)](_0x552307),_0x3c514b=stringWidth(_0x552307),_0x5a9a25='\x20'[_0x5692b7(0xa1)](_0x7ee13d-stringWidth(_0x552307)+0x2),_0x1a9640='('+formatElapsed(_0x4dcb5c)+')',_0x41a530=stringWidth(_0x1a9640),_0x44c9b3=stringWidth(_0x17e229),_0x31cf1f=_0x44c9b3+0x1+_0x3c514b+_0x5a9a25[_0x5692b7(0x140)],_0x1d3db8=_0x5d7049-_0x31cf1f-_0x41a530-0x1-0x8;let _0x226381=_0x168f07;stringWidth(_0x226381)>_0x1d3db8&&(_0x226381=_0x226381['slice'](0x0,_0x1d3db8-0x1)+'…');const _0x413e98=_0x353537+'\x20'+_0x5cb0c7+_0x5a9a25+_0x226381,_0x159112=stringWidth(_0x413e98),_0x549c39=_0x5d7049-_0x159112-_0x41a530,_0x3e19fc=_0x413e98+'\x20'[_0x5692b7(0xa1)](Math['max'](0x1,_0x549c39))+a56_0x47be42[_0x5692b7(0x20a)](_0x1a9640),_0x5cb546=Math[_0x5692b7(0x10e)]((_0x361b57-_0x46b867)/_0x9226e6),_0x90330a=Math[_0x5692b7(0x10e)]((_0x2b4150-_0x46b867)/_0x9226e6),_0x322cfa=Math[_0x5692b7(0x1d4)](_0x5cb546+0x1,_0x90330a),_0x2d8be9=new Array(_0x4b5a40)[_0x5692b7(0xbc)]('\x20');for(let _0x3101dc=_0x5cb546;_0x3101dc<Math[_0x5692b7(0xcc)](_0x322cfa,_0x4b5a40);_0x3101dc++){_0x2d8be9[_0x3101dc]='─';}const _0xd900b=_0x2d8be9[_0x5692b7(0x7f)](_0x56327e=>_0x56327e==='\x20'?'\x20':_0x1fb33b(_0x56327e))['join']('');_0x4ef53a[_0x5692b7(0x215)](_0x5012df+'\x20'+_0x3e19fc+'│'+_0xd900b+'│');}return _0x4ef53a['join']('\x0a');}async[a56_0x1982d8(0xda)](_0x16bf92,_0x194f65,_0x39b4cf){const _0x1bb8ba=a56_0x1982d8,{options:_0x10cba1,tdx:_0x467e4e}=_0x194f65,_0x54a472=_0x10cba1['site'],{timelineRows:_0x11eb80,timeAxisHeader:_0x5cac3a}=this[_0x1bb8ba(0x1b0)](_0x16bf92,_0x54a472),_0x2e052d=_0x11eb80[_0x1bb8ba(0x103)](_0x16618a=>_0x16618a[_0x1bb8ba(0x138)]);if(_0x2e052d[_0x1bb8ba(0x140)]===0x0){const _0x2bf507=this['renderSessionsTimeline'](_0x16bf92,_0x54a472);console[_0x1bb8ba(0xe1)](_0x2bf507);!_0x39b4cf&&(console[_0x1bb8ba(0x9f)](''),console[_0x1bb8ba(0x9f)](a56_0x47be42[_0x1bb8ba(0x20a)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x1bb8ba(0x9f)](a56_0x47be42[_0x1bb8ba(0x20a)](_0x1bb8ba(0x245))+'or'+a56_0x47be42[_0x1bb8ba(0x20a)](_0x1bb8ba(0x1dd))));return;}_0x5cac3a&&console[_0x1bb8ba(0xe1)](_0x5cac3a);const _0xa50f25=_0x11eb80['filter'](_0x52f6ef=>_0x52f6ef[_0x1bb8ba(0x138)])[_0x1bb8ba(0x7f)](_0xae8680=>({'title':_0xae8680[_0x1bb8ba(0x220)],'value':_0xae8680['attemptId']})),_0xea3ad3=process[_0x1bb8ba(0x1e5)][_0x1bb8ba(0x18c)]||0x3c,_0x411fd0=Math[_0x1bb8ba(0x1d4)](0x28,Math['floor'](_0xea3ad3*0x2/0x3)),_0x20377f=await a56_0x23600a({'type':'autocomplete','name':'attemptId','message':_0x1bb8ba(0x23a),'choices':_0xa50f25,'initial':-0x1,'limit':_0x411fd0,'clearFirst':!![],'fallback':{'title':_0x1bb8ba(0xb8),'value':null},'suggest':(_0x2eb56d,_0x50729b)=>{const _0x283f08=_0x1bb8ba;if(!_0x2eb56d)return Promise[_0x283f08(0x85)](_0x50729b);const _0x48fcf9=_0x50729b[_0x283f08(0x103)](_0x3af4b7=>{const _0x311424=_0x283f08,_0x5ce9a0=_0x3af4b7;return _0x5ce9a0[_0x311424(0x236)]['toLowerCase']()[_0x311424(0x10b)](_0x2eb56d['toLowerCase']());});return Promise[_0x283f08(0x85)](_0x48fcf9);}}),_0x13e61a=()=>{const _0x29e9fe=_0x1bb8ba;process['stdout']['write'](_0x29e9fe(0xf8)),process['stdout'][_0x29e9fe(0x1af)]('\x1b[1A\x1b[2K'),process['stdout'][_0x29e9fe(0x1af)](_0x29e9fe(0xf8));},_0x37e3a8=_0x20377f&&_0x20377f[_0x1bb8ba(0x138)]&&_0x20377f[_0x1bb8ba(0x138)]!==null&&_0x20377f['attemptId'][_0x1bb8ba(0xaf)]()!=='';if(!_0x37e3a8){_0x13e61a(),console[_0x1bb8ba(0xe1)](a56_0x47be42['dim'](_0x1bb8ba(0x80)));return;}_0x13e61a();const _0xd92eff=_0x16bf92[_0x1bb8ba(0x177)](_0x5b8ddb=>_0x5b8ddb[_0x1bb8ba(0x240)]?.['id']===_0x20377f[_0x1bb8ba(0x138)]);if(_0xd92eff){const _0xb1dc1c=_0xd92eff['project']?.['name']||'?',_0x4e5f1d=_0xd92eff[_0x1bb8ba(0x83)]?.[_0x1bb8ba(0x11f)]||'?';console[_0x1bb8ba(0xe1)](_0x1bb8ba(0x1ba)+a56_0x47be42['dim'](_0xb1dc1c)+_0x1bb8ba(0x148)+a56_0x47be42[_0x1bb8ba(0x20a)](_0x4e5f1d));}const _0xbee355=new WorkflowTimelineCommand();await _0xbee355['execute']({'args':[],'options':{..._0x10cba1,'attemptId':_0x20377f[_0x1bb8ba(0x138)]},'tdx':_0x467e4e});}[a56_0x1982d8(0x1b0)](_0xc2fc9,_0x4dfed7){const _0x518743=a56_0x1982d8,_0x35af54=new Map();for(const _0x43fe2d of _0xc2fc9){_0x43fe2d['id']&&_0x43fe2d[_0x518743(0x240)]?.['id']&&_0x35af54['set'](_0x43fe2d['id'],_0x43fe2d[_0x518743(0x240)]['id']);}const _0x110d17=[];let _0x1d300c='';const _0x50999f=this[_0x518743(0x1f3)](_0xc2fc9,_0x4dfed7),_0x17433e=_0x50999f['split']('\x0a');for(const _0x4412ce of _0x17433e){if(_0x4412ce[_0x518743(0x146)](_0x518743(0x1e4))||_0x4412ce[_0x518743(0x91)](/^\s+\d{4}-\d{2}-\d{2}/))_0x1d300c=_0x4412ce;else{if(_0x4412ce[_0x518743(0x91)](/^[✅❌🔄🛑⏳]/)){const _0xb3bd59=_0x4412ce[_0x518743(0x91)](/#(\d+)/),_0x4fa7c6=_0xb3bd59?_0xb3bd59[0x1]:null,_0x5b886d=_0x4fa7c6?_0x35af54[_0x518743(0x1a9)](_0x4fa7c6)||null:null,_0x432182=_0xc2fc9['find'](_0x35fe35=>_0x35fe35['id']===_0x4fa7c6),_0xa4c12c=_0x432182?.[_0x518743(0xd4)]?.[_0x518743(0x11f)]||'';_0x110d17['push']({'displayLine':_0x4412ce,'attemptId':_0x5b886d,'projectName':_0xa4c12c});}}}return{'timelineRows':_0x110d17,'timeAxisHeader':_0x1d300c};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0xcf);[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x1e9);async[a56_0x1982d8(0x24e)](_0x553462){const _0x2db468=a56_0x1982d8,{options:_0x42f311,args:_0x4cc436,tdx:_0x4beed0}=_0x553462,_0x29c261=this[_0x2db468(0x144)](_0x4cc436,_0x42f311);if(!_0x29c261)return 0x1;const {projectName:_0x1c4a4d,workflowName:_0x42b8c3}=_0x29c261,_0x253172=_0x42f311[_0x2db468(0x202)];if(_0x42f311['verbose']){if(_0x1c4a4d&&_0x42b8c3)console['error']('Filter:\x20'+_0x1c4a4d+'.'+_0x42b8c3);else _0x1c4a4d&&console['error'](_0x2db468(0x176)+_0x1c4a4d);_0x253172&&console['error']('Include\x20retried:\x20yes');}const _0x13c0bf=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x4beed0['workflow']['attempts']({'projectName':_0x1c4a4d,'workflowName':_0x42b8c3,'includeRetried':_0x253172,'limit':_0x42f311[_0x2db468(0x226)]}),{'verbose':_0x42f311[_0x2db468(0x1b1)]}),_0x1d8cbe=_0x13c0bf[_0x2db468(0x207)],_0x2251cc=_0x42f311[_0x2db468(0x226)]||0x64,_0x8bd673=_0x1d8cbe[_0x2db468(0x140)]>=_0x2251cc?a56_0x47be42[_0x2db468(0x20a)](_0x2db468(0x1d1)):'';console[_0x2db468(0x9f)](_0x2db468(0x1a1)+_0x1d8cbe[_0x2db468(0x140)]+_0x2db468(0x12d)+(_0x1d8cbe[_0x2db468(0x140)]!==0x1?'s':'')+_0x8bd673);if(_0x42f311['format']===_0x2db468(0x8c)||_0x42f311[_0x2db468(0x164)]===_0x2db468(0x1c8)||_0x42f311[_0x2db468(0x164)]===_0x2db468(0x101))await handleSDKOutput(_0x1d8cbe,_0x42f311);else{if(_0x1d8cbe[_0x2db468(0x140)]===0x0){if(_0x1c4a4d&&_0x42b8c3)console[_0x2db468(0xe1)](_0x2db468(0x218)+_0x1c4a4d+'.'+_0x42b8c3);else _0x1c4a4d?console['log'](_0x2db468(0xb5)+_0x1c4a4d):console[_0x2db468(0xe1)]('No\x20attempts\x20found');}else{const _0x2ddff9=_0x42f311[_0x2db468(0x194)],_0x3185b7=_0x1d8cbe[_0x2db468(0x7f)](_0x117407=>{const _0x28d43c=_0x2db468,_0x1292a3=a56_0x47be42[_0x28d43c(0x20a)]('#'+_0x117407['id']),_0x4a5346=_0x117407[_0x28d43c(0xd4)]?.['id'],_0x447111=_0x117407[_0x28d43c(0x1a4)]||_0x117407[_0x28d43c(0x1df)],_0x25003d=_0x4a5346&&_0x447111?hyperlink(_0x1292a3,getWorkflowAttemptUrl(_0x2ddff9,_0x4a5346,_0x447111,_0x117407['id'])):_0x1292a3,{icon:_0x429c65,text:_0x5f3934}=getAttemptStatusDisplay(_0x117407),_0x21df12=(_0x117407[_0x28d43c(0xd4)]?.[_0x28d43c(0x11f)]||'?')+'.'+(_0x117407[_0x28d43c(0x83)]?.[_0x28d43c(0x11f)]||'?'),_0x3b98a1=_0x117407[_0x28d43c(0x1fa)]?a56_0x47be42['dim'](_0x117407[_0x28d43c(0x1fa)]):'';return(_0x25003d+'\x20'+_0x429c65+(_0x5f3934?'\x20'+_0x5f3934:'')+'\x20'+_0x21df12+'\x20'+_0x3b98a1)[_0x28d43c(0x1d2)]();});await writeOutput(_0x3185b7[_0x2db468(0x227)]('\x0a'),_0x42f311[_0x2db468(0x238)],_0x2db468(0x127));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x229);async[a56_0x1982d8(0x24e)](_0x479f3f){const _0x128112=a56_0x1982d8,{options:_0x1db27e,args:_0x25f1d8,tdx:_0x5698ac}=_0x479f3f,_0x110413=_0x25f1d8[0x0];if(!_0x110413)return console[_0x128112(0x9f)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x1db27e[_0x128112(0x1b1)]&&console['error'](_0x128112(0xeb)+_0x110413);const _0x551a4b=await withSpinner(_0x128112(0x170),()=>_0x5698ac[_0x128112(0x83)][_0x128112(0x20f)](_0x110413),{'verbose':_0x1db27e[_0x128112(0x1b1)]}),_0x235ab8=_0x551a4b[_0x128112(0x207)];let _0xf80d78;!_0x235ab8[_0x128112(0x174)]?_0xf80d78=_0x235ab8[_0x128112(0xdf)]?_0x128112(0x115):_0x128112(0xc0):_0xf80d78=_0x235ab8[_0x128112(0x193)]?_0x128112(0x193):'error';let _0x3fc859;if(_0x235ab8[_0x128112(0xd9)]&&_0x235ab8[_0x128112(0x189)]){const _0x1c4bf9=new Date(_0x235ab8['createdAt'])['getTime'](),_0x5322d2=new Date(_0x235ab8[_0x128112(0x189)])[_0x128112(0x233)]();_0x3fc859=Math[_0x128112(0xdd)]((_0x5322d2-_0x1c4bf9)/0x3e8);}const _0x3ae321={'attempt_id':_0x235ab8['id'],'status':_0xf80d78,..._0x235ab8[_0x128112(0x1a8)]!==undefined&&{'index':_0x235ab8['index']},..._0x235ab8[_0x128112(0xd4)]&&{'project':_0x235ab8[_0x128112(0xd4)][_0x128112(0x11f)]},..._0x235ab8[_0x128112(0x83)]&&{'workflow':_0x235ab8[_0x128112(0x83)]['name']},..._0x235ab8['sessionId']&&{'session_id':_0x235ab8['sessionId']},..._0x235ab8['sessionTime']&&{'session_time':_0x235ab8[_0x128112(0x1fa)]},..._0x235ab8['retryAttemptName']&&{'retry_attempt':_0x235ab8[_0x128112(0x1ab)]},..._0x3fc859!==undefined&&{'duration_sec':_0x3fc859},..._0x235ab8['createdAt']&&{'created_at':_0x235ab8[_0x128112(0xd9)]},..._0x235ab8[_0x128112(0x189)]&&{'finished_at':_0x235ab8['finishedAt']},...Object[_0x128112(0x1ca)](_0x235ab8[_0x128112(0x1a7)])[_0x128112(0x140)]>0x0&&{'params':_0x235ab8['params']}};return await handleSingleObjectOutput(_0x3ae321,_0x1db27e),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a56_0x1982d8(0x11f)]='workflow:tasks';[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x1e0);async['execute'](_0x1c6c72){const _0x2c3032=a56_0x1982d8,{options:_0x4aac17,args:_0xeee080,tdx:_0x193ad1}=_0x1c6c72,_0x44ae6a=_0xeee080[0x0];if(!_0x44ae6a)return console[_0x2c3032(0x9f)](_0x2c3032(0x21c)),0x1;const _0x5168c2=_0x4aac17['includeSubtasks'];_0x4aac17[_0x2c3032(0x1b1)]&&(console[_0x2c3032(0x9f)](_0x2c3032(0xeb)+_0x44ae6a),_0x5168c2&&console[_0x2c3032(0x9f)](_0x2c3032(0x158)));const _0x4ea2d8=await withSpinner(_0x2c3032(0x23d),()=>_0x193ad1[_0x2c3032(0x83)]['tasks'](_0x44ae6a,_0x5168c2||![]),{'verbose':_0x4aac17[_0x2c3032(0x1b1)]}),_0x553b5f=_0x4ea2d8[_0x2c3032(0x207)];return console[_0x2c3032(0x9f)](_0x2c3032(0x1a1)+_0x553b5f[_0x2c3032(0x140)]+_0x2c3032(0x212)+(_0x553b5f[_0x2c3032(0x140)]!==0x1?'s':'')),await handleSDKOutput(_0x553b5f,_0x4aac17),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x21d);[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x1c4);async[a56_0x1982d8(0x24e)](_0x437a2b){const _0x3ce8ef=a56_0x1982d8,{options:_0x1e972b,args:_0x48c43c,tdx:_0x17933c}=_0x437a2b,_0x6fff36=_0x48c43c[0x0];let _0x5483a8=_0x48c43c[0x1];if(!_0x6fff36)return console[_0x3ce8ef(0x9f)](_0x3ce8ef(0x21c)),0x1;_0x1e972b[_0x3ce8ef(0x1b1)]&&(console[_0x3ce8ef(0x9f)](_0x3ce8ef(0xeb)+_0x6fff36),_0x5483a8&&console['error'](_0x3ce8ef(0x15a)+_0x5483a8));const _0x62e901=await withSpinner(_0x3ce8ef(0x9d),()=>_0x17933c[_0x3ce8ef(0x83)][_0x3ce8ef(0x123)](_0x6fff36,_0x5483a8),{'verbose':_0x1e972b[_0x3ce8ef(0x1b1)]}),_0x21521d=_0x62e901[_0x3ce8ef(0x207)];if(_0x21521d[_0x3ce8ef(0x140)]===0x0)return console[_0x3ce8ef(0x9f)](_0x3ce8ef(0x134)),0x0;if(!_0x5483a8&&(_0x1e972b['json']||_0x1e972b[_0x3ce8ef(0x164)]))return await handleSDKOutput(_0x21521d,_0x1e972b),0x0;if(!_0x5483a8){const _0x10f5b7=_0x21521d[_0x3ce8ef(0x7f)](_0x21754b=>({'title':_0x21754b[_0x3ce8ef(0x209)]+'\x20('+formatBytes(_0x21754b[_0x3ce8ef(0x142)])+')','value':_0x21754b[_0x3ce8ef(0x209)]})),_0x3976e9=await a56_0x23600a({'type':_0x3ce8ef(0x1b7),'name':_0x3ce8ef(0xf7),'message':'Select\x20a\x20task\x20to\x20view\x20logs:','choices':_0x10f5b7});if(!_0x3976e9['task'])return console[_0x3ce8ef(0x9f)]('Cancelled'),0x0;_0x5483a8=_0x3976e9[_0x3ce8ef(0xf7)];}const _0x2f248d=await withSpinner(_0x3ce8ef(0x165),()=>_0x17933c['workflow']['logs'](_0x6fff36,_0x5483a8),{'verbose':_0x1e972b[_0x3ce8ef(0x1b1)]}),_0x5da47b=_0x2f248d[_0x3ce8ef(0x207)];return _0x5da47b?console[_0x3ce8ef(0xe1)](_0x5da47b):console['error'](_0x3ce8ef(0x1de)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']='workflow:kill';['description']='Kill\x20a\x20running\x20attempt';async[a56_0x1982d8(0x24e)](_0x40239a){const _0xf7cac0=a56_0x1982d8,{options:_0x2e5b03,args:_0xcb252c,tdx:_0x3515a2}=_0x40239a,_0x5c4a74=_0xcb252c[0x0];if(!_0x5c4a74)return console[_0xf7cac0(0x9f)](_0xf7cac0(0x21c)),0x1;const _0x5c64ee=_0x2e5b03['reason'];_0x2e5b03[_0xf7cac0(0x1b1)]&&(console[_0xf7cac0(0x9f)]('Attempt\x20ID:\x20'+_0x5c4a74),_0x5c64ee&&console[_0xf7cac0(0x9f)](_0xf7cac0(0xab)+_0x5c64ee));if(!_0x2e5b03['yes']){if(!isInteractive())return console['error'](a56_0x47be42[_0xf7cac0(0x11a)](_0xf7cac0(0x249)),_0xf7cac0(0xc7)),console[_0xf7cac0(0x9f)](a56_0x47be42[_0xf7cac0(0x20a)](_0xf7cac0(0x12f))),0x1;const _0x170e13=await confirmKey(_0xf7cac0(0x1d8)+_0x5c4a74+'?');if(!_0x170e13)return console[_0xf7cac0(0x9f)](a56_0x47be42[_0xf7cac0(0x205)](_0xf7cac0(0x80))),0x1;}const _0x4e51bd=await withSpinner(_0xf7cac0(0x1a3),()=>_0x3515a2[_0xf7cac0(0x83)][_0xf7cac0(0x20b)](_0x5c4a74,_0x5c64ee),{'verbose':_0x2e5b03[_0xf7cac0(0x1b1)]}),_0x151090=_0x4e51bd[_0xf7cac0(0x207)];return console['error']('✔\x20'+_0x151090),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a56_0x1982d8(0x14c);[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x1d6);async[a56_0x1982d8(0x24e)](_0x5120d2){const _0x1168ee=a56_0x1982d8,{options:_0xcd08b5,args:_0x279f8a,tdx:_0x115995}=_0x5120d2,_0xcf64ba=_0x279f8a[0x0];if(!_0xcf64ba)return console['error'](_0x1168ee(0x12b)),console[_0x1168ee(0x9f)](_0x1168ee(0x1c2)),0x1;let _0x20217d=![],_0x5f1907=_0xcf64ba;if(_0xcf64ba[_0x1168ee(0x146)]('session:'))_0x20217d=!![],_0x5f1907=_0xcf64ba[_0x1168ee(0x108)](0x8);else{if(_0xcf64ba[_0x1168ee(0x146)]('attempt:'))_0x20217d=![],_0x5f1907=_0xcf64ba[_0x1168ee(0x108)](0x8);else return console[_0x1168ee(0x9f)](_0x1168ee(0x242)),console[_0x1168ee(0x9f)](_0x1168ee(0x1c2)),0x1;}const _0x59003f=_0xcd08b5[_0x1168ee(0x1c5)],_0x1a04c9=_0xcd08b5['resumeFrom'],_0x56652f=_0xcd08b5[_0x1168ee(0x1a7)],_0x3ae261=_0xcd08b5[_0x1168ee(0x1eb)];_0xcd08b5[_0x1168ee(0x1b1)]&&(console[_0x1168ee(0x9f)](_0x1168ee(0xe9)+(_0x20217d?'session':_0x1168ee(0x20f))+'\x20'+_0x5f1907),_0x59003f&&console['error'](_0x1168ee(0x122)+_0x59003f),_0x1a04c9&&console[_0x1168ee(0x9f)](_0x1168ee(0xe0)+_0x1a04c9),_0x56652f&&console[_0x1168ee(0x9f)](_0x1168ee(0xf2)+_0x56652f),_0x3ae261&&console[_0x1168ee(0x9f)](_0x1168ee(0x121)));let _0x4d3c17;if(_0x56652f)try{if(_0x56652f[_0x1168ee(0x146)]('@')){const _0x286583=await import(_0x1168ee(0xc2)),_0x5b7283=_0x56652f[_0x1168ee(0x108)](0x1),_0x4a3377=await _0x286583[_0x1168ee(0x1e8)](_0x5b7283,_0x1168ee(0x1cf));_0x4d3c17=JSON['parse'](_0x4a3377);}else _0x4d3c17=JSON[_0x1168ee(0x196)](_0x56652f);}catch{return console[_0x1168ee(0x9f)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0xcd08b5['yes']){if(!isInteractive())return console['error'](a56_0x47be42['red'](_0x1168ee(0x249)),_0x1168ee(0xc7)),console[_0x1168ee(0x9f)](a56_0x47be42[_0x1168ee(0x20a)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5e2869=await confirmKey(_0x1168ee(0xae)+(_0x20217d?_0x1168ee(0x23e):'attempt')+'\x20'+_0x5f1907+'?');if(!_0x5e2869)return console[_0x1168ee(0x9f)](a56_0x47be42[_0x1168ee(0x205)](_0x1168ee(0x80))),0x1;}let _0x1f0352;_0x20217d?_0x1f0352=await withSpinner(_0x1168ee(0x12e),()=>_0x115995['workflow']['retrySession'](_0x5f1907,{'fromTask':_0x59003f,'retryParams':_0x4d3c17}),{'verbose':_0xcd08b5['verbose']}):_0x1f0352=await withSpinner(_0x1168ee(0x184),()=>_0x115995[_0x1168ee(0x83)][_0x1168ee(0x221)](_0x5f1907,{'resumeFrom':_0x1a04c9,'retryParams':_0x4d3c17,'force':_0x3ae261}),{'verbose':_0xcd08b5[_0x1168ee(0x1b1)]});const _0x238ca4=_0x1f0352[_0x1168ee(0x207)];return console[_0x1168ee(0x9f)](_0x1168ee(0x217)),console['error'](_0x1168ee(0x1fd)+_0x238ca4[_0x1168ee(0x138)]),console['error'](_0x1168ee(0xad)+_0x238ca4[_0x1168ee(0x1df)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x95);[a56_0x1982d8(0x14b)]='Start\x20a\x20workflow\x20run';async['execute'](_0x49a223){const _0x58db9e=a56_0x1982d8,{options:_0x408b38,args:_0x1b3956,tdx:_0xc00285}=_0x49a223;let _0x5ac952=_0x1b3956[0x0];if(!_0x5ac952){const _0x2256a6=this['resolveProject']([],_0x408b38),_0xd8e88b=await withSpinner('Loading\x20workflows...',()=>_0xc00285[_0x58db9e(0x83)][_0x58db9e(0x18e)](_0x2256a6,{'limit':_0x408b38[_0x58db9e(0x226)]}),{'verbose':_0x408b38['verbose']}),_0x3addad=_0xd8e88b['data'];if(_0x3addad[_0x58db9e(0x140)]===0x0)return console['error'](_0x58db9e(0x200)),!_0x2256a6&&console[_0x58db9e(0x9f)](a56_0x47be42[_0x58db9e(0x20a)](_0x58db9e(0x1be))),0x1;const _0x2b56ab=_0x3addad[_0x58db9e(0x7f)](_0x40f121=>({'title':_0x40f121[_0x58db9e(0xd4)]?.['name']+'.'+_0x40f121[_0x58db9e(0x11f)],'value':_0x40f121[_0x58db9e(0xd4)]?.[_0x58db9e(0x11f)]+'.'+_0x40f121['name'],'description':_0x40f121[_0x58db9e(0x22c)]?'revision:\x20'+_0x40f121[_0x58db9e(0x22c)]:undefined})),_0x45e8ea=await a56_0x23600a({'type':_0x58db9e(0x1b7),'name':_0x58db9e(0x83),'message':_0x58db9e(0x139),'choices':_0x2b56ab});if(!_0x45e8ea[_0x58db9e(0x83)])return 0x1;_0x5ac952=_0x45e8ea[_0x58db9e(0x83)];}if(!_0x5ac952[_0x58db9e(0x10b)]('.')){const _0x362b2b=this[_0x58db9e(0x9a)]([],_0x408b38);if(_0x362b2b)_0x5ac952=_0x362b2b+'.'+_0x5ac952;else return console[_0x58db9e(0x9f)](a56_0x47be42[_0x58db9e(0x11a)](_0x58db9e(0x150)),_0x58db9e(0x131)),console['error'](a56_0x47be42[_0x58db9e(0x20a)](_0x58db9e(0x1be))),0x1;}const _0x15399f=_0x408b38[_0x58db9e(0xe8)],_0xd0ebff=_0x408b38[_0x58db9e(0x1fa)],_0x1f9b99={};if(_0x15399f&&Array[_0x58db9e(0x111)](_0x15399f))for(const _0x48b22a of _0x15399f){const _0x4e6984=_0x48b22a[_0x58db9e(0x169)]('=');if(_0x4e6984===-0x1)return console[_0x58db9e(0x9f)](_0x58db9e(0x15c)+_0x48b22a),console[_0x58db9e(0x9f)](_0x58db9e(0x114)),0x1;const _0x323f70=_0x48b22a[_0x58db9e(0x108)](0x0,_0x4e6984),_0x34e72d=_0x48b22a[_0x58db9e(0x108)](_0x4e6984+0x1);try{_0x1f9b99[_0x323f70]=JSON[_0x58db9e(0x196)](_0x34e72d);}catch{_0x1f9b99[_0x323f70]=_0x34e72d;}}_0x408b38[_0x58db9e(0x1b1)]&&(console[_0x58db9e(0x9f)](_0x58db9e(0x1c0)+_0x5ac952),Object[_0x58db9e(0x1ca)](_0x1f9b99)[_0x58db9e(0x140)]>0x0&&console[_0x58db9e(0x9f)](_0x58db9e(0xc3)+JSON[_0x58db9e(0xbf)](_0x1f9b99)),_0xd0ebff&&console[_0x58db9e(0x9f)](_0x58db9e(0x1e6)+_0xd0ebff));if(_0x408b38[_0x58db9e(0xfc)])return await this[_0x58db9e(0x98)](_0x49a223,_0x5ac952,_0x1f9b99,_0xd0ebff);const _0x4bbae9=await withSpinner(_0x58db9e(0x1fe),()=>_0xc00285['workflow']['run'](_0x5ac952,_0x1f9b99,{'sessionTime':_0xd0ebff}),{'verbose':_0x408b38['verbose']}),_0x18a2d3=_0x4bbae9[_0x58db9e(0x207)];console[_0x58db9e(0x9f)](_0x58db9e(0x213)),console[_0x58db9e(0x9f)](_0x58db9e(0x1d5)+_0x18a2d3['id']),console[_0x58db9e(0x9f)](_0x58db9e(0xad)+_0x18a2d3[_0x58db9e(0x1df)]),console[_0x58db9e(0x9f)](_0x58db9e(0x1f8)+_0x18a2d3['project']?.[_0x58db9e(0x11f)]),console[_0x58db9e(0x9f)]('\x20\x20Workflow:\x20'+_0x18a2d3[_0x58db9e(0x83)]?.[_0x58db9e(0x11f)]);if(_0x18a2d3[_0x58db9e(0xd4)]?.['id']&&_0x18a2d3[_0x58db9e(0x1df)]&&_0x18a2d3['id']){const _0x5ac709=_0x408b38[_0x58db9e(0x194)],_0x509321=getConsoleUrl(_0x5ac709,_0x58db9e(0x232)+_0x18a2d3[_0x58db9e(0xd4)]['id']+_0x58db9e(0x1b2)+_0x18a2d3[_0x58db9e(0x1df)]+_0x58db9e(0x1db)+_0x18a2d3['id']);console[_0x58db9e(0x9f)]('\x20\x20Console:\x20'+a56_0x47be42['cyan'](_0x509321));}return 0x0;}async[a56_0x1982d8(0x98)](_0x20614f,_0x30152e,_0x16f585,_0x4d7006){const _0x26c0ba=a56_0x1982d8,{options:_0x52c520,tdx:_0x909ef1}=_0x20614f,_0xc4c511=await withSpinner(_0x26c0ba(0xf6)+_0x30152e+_0x26c0ba(0x1e7),()=>_0x909ef1['workflow'][_0x26c0ba(0xf0)](_0x30152e),{'verbose':_0x52c520[_0x26c0ba(0x1b1)]}),_0x479895=_0xc4c511['data'],_0x186492=_0x4d7006??new Date()[_0x26c0ba(0x1d0)]();console[_0x26c0ba(0xe1)](a56_0x47be42[_0x26c0ba(0x124)](_0x26c0ba(0xd8)),_0x30152e),console[_0x26c0ba(0xe1)](a56_0x47be42[_0x26c0ba(0x124)]('Session\x20time:'),_0x186492),console[_0x26c0ba(0xe1)](a56_0x47be42[_0x26c0ba(0x124)](_0x26c0ba(0x116)),JSON[_0x26c0ba(0xbf)](_0x16f585)),console[_0x26c0ba(0xe1)](''),console[_0x26c0ba(0xe1)](a56_0x47be42[_0x26c0ba(0x124)](_0x26c0ba(0xd0)));const _0x249102=parseTaskGraph(_0x479895[_0x26c0ba(0xac)]??null);if(_0x249102[_0x26c0ba(0x140)]===0x0)console[_0x26c0ba(0xe1)](a56_0x47be42[_0x26c0ba(0x20a)](_0x26c0ba(0x1d9)));else for(const _0x533512 of formatTaskGraph(_0x249102)){console[_0x26c0ba(0xe1)](_0x533512);}const _0x1e3916=summarizeTaskGraph(_0x249102),_0x362666=formatWarningSummary(_0x1e3916);return _0x362666&&(console[_0x26c0ba(0xe1)](''),console[_0x26c0ba(0xe1)](a56_0x47be42[_0x26c0ba(0x205)](_0x362666))),console[_0x26c0ba(0xe1)](a56_0x47be42[_0x26c0ba(0x205)](_0x26c0ba(0x1f1))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a56_0x1982d8(0x11f)]='workflow:download';[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x167);async[a56_0x1982d8(0x24e)](_0x6f39c5){const _0x107967=a56_0x1982d8,{options:_0x144604,args:_0x279847,tdx:_0x4bfe7c}=_0x6f39c5,_0x406c09=_0x279847[0x0],_0x541543=_0x279847[0x1]||'.';if(!_0x406c09)return console[_0x107967(0x9f)](_0x107967(0xa9)),console[_0x107967(0x9f)](_0x107967(0x96)),0x1;const _0x30c468=_0x144604[_0x107967(0x22c)];_0x144604['verbose']&&(console[_0x107967(0x9f)](_0x107967(0x1ba)+_0x406c09),console['error'](_0x107967(0x225)+_0x541543),_0x30c468&&console[_0x107967(0x9f)](_0x107967(0xfb)+_0x30c468));const _0x35aa50=await withSpinner('Downloading\x20project\x20'+_0x406c09+_0x107967(0x1e7),()=>_0x4bfe7c[_0x107967(0x83)]['download'](_0x406c09,_0x541543,{'revision':_0x30c468}),{'verbose':_0x144604[_0x107967(0x1b1)]}),_0x46760c=_0x35aa50[_0x107967(0x207)];return console[_0x107967(0x9f)](_0x107967(0x22e)+_0x46760c[_0x107967(0x171)]),console[_0x107967(0x9f)]('\x20\x20Revision:\x20'+_0x46760c['revision']),console[_0x107967(0x9f)](_0x107967(0x230)+_0x46760c[_0x107967(0x20c)]),console[_0x107967(0x9f)](_0x107967(0x24d)+_0x541543+'/'+_0x46760c[_0x107967(0x171)]),0x0;}}function a56_0x120f(_0x4c54c2,_0x1acb25){_0x4c54c2=_0x4c54c2-0x7d;const _0x568d71=a56_0x568d();let _0x120f7a=_0x568d71[_0x4c54c2];return _0x120f7a;}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x88);[a56_0x1982d8(0x14b)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)';async[a56_0x1982d8(0x24e)](_0x1b0e85){const _0x32d921=a56_0x1982d8,{options:_0x17e2f1,args:_0x376792,tdx:_0xcf87d}=_0x1b0e85;let _0x4064d1='.',_0x3c0eeb=_0x17e2f1['name'];if(_0x376792[0x0]){const {promises:_0x5a2cbc}=await import('fs');try{const _0x5e05d0=await _0x5a2cbc[_0x32d921(0x24b)](_0x376792[0x0]);if(_0x5e05d0[_0x32d921(0xa4)]())_0x4064d1=_0x376792[0x0];else return console[_0x32d921(0x9f)]('Error:\x20'+_0x376792[0x0]+_0x32d921(0xc5)),0x1;}catch{_0x3c0eeb=_0x376792[0x0],_0x4064d1='.';}}const _0x31e76e=_0x17e2f1[_0x32d921(0x22c)],_0x46a632=_0x17e2f1[_0x32d921(0x1c3)];_0x17e2f1[_0x32d921(0x1b1)]&&(console[_0x32d921(0x9f)](_0x32d921(0x13c)+_0x4064d1),_0x3c0eeb&&console[_0x32d921(0x9f)]('Project\x20name:\x20'+_0x3c0eeb),_0x31e76e&&console[_0x32d921(0x9f)](_0x32d921(0xfb)+_0x31e76e),_0x46a632&&console['error'](_0x32d921(0x13e)));const _0x169d74=await withSpinner(_0x32d921(0x1e3),()=>_0xcf87d[_0x32d921(0x83)][_0x32d921(0x215)](_0x4064d1,{'projectName':_0x3c0eeb,'revision':_0x31e76e,'skipValidation':_0x46a632}),{'verbose':_0x17e2f1['verbose']}),_0x3faed1=_0x169d74['data'];return console['error']('✔\x20Pushed\x20'+_0x3faed1[_0x32d921(0x171)]),console[_0x32d921(0x9f)]('\x20\x20Project\x20ID:\x20'+_0x3faed1[_0x32d921(0x216)]),console['error']('\x20\x20Revision:\x20'+_0x3faed1[_0x32d921(0x22c)]),await this[_0x32d921(0x166)](_0xcf87d,_0x3faed1[_0x32d921(0x171)],_0x17e2f1[_0x32d921(0x194)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a56_0x1982d8(0x11f)]='workflow:pull';[a56_0x1982d8(0x14b)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a56_0x1982d8(0x24e)](_0x2fd765){const _0x377f8f=a56_0x1982d8,{options:_0x1f9c39,args:_0xd6041,tdx:_0x2928b8}=_0x2fd765,_0x42fb87=_0xd6041[0x0],_0x4075eb=_0xd6041[0x1];if(!_0x42fb87)return console[_0x377f8f(0x9f)](a56_0x47be42[_0x377f8f(0x11a)](_0x377f8f(0x150)),'Project\x20name\x20is\x20required'),console['error'](a56_0x47be42[_0x377f8f(0x20a)](_0x377f8f(0x1bf))),0x1;const _0x2e1690=_0x1f9c39[_0x377f8f(0x22c)];_0x1f9c39[_0x377f8f(0x1b1)]&&(console[_0x377f8f(0x9f)](_0x377f8f(0x1ba)+_0x42fb87),_0x4075eb&&console[_0x377f8f(0x9f)](_0x377f8f(0x102)+_0x4075eb),_0x2e1690&&console[_0x377f8f(0x9f)](_0x377f8f(0xfb)+_0x2e1690),_0x1f9c39[_0x377f8f(0xfc)]&&console[_0x377f8f(0x9f)]('Dry\x20run:\x20yes'));const _0x3725a8=await withSpinner(_0x377f8f(0x94)+_0x42fb87+_0x377f8f(0x1e7),()=>_0x2928b8[_0x377f8f(0x83)][_0x377f8f(0x237)](_0x42fb87,{'targetDir':_0x4075eb,'revision':_0x2e1690}),{'verbose':_0x1f9c39[_0x377f8f(0x1b1)]}),_0x4b1146=_0x3725a8['data'];_0x4b1146[_0x377f8f(0x1cb)]?console[_0x377f8f(0x9f)]('→\x20New\x20project:\x20'+_0x4b1146[_0x377f8f(0x171)]):console['error'](_0x377f8f(0x13f)+_0x4b1146['projectName']);console[_0x377f8f(0x9f)]('\x20\x20Revision:\x20'+_0x4b1146[_0x377f8f(0x22c)]),console[_0x377f8f(0x9f)]('\x20\x20Target:\x20'+(a56_0x27aa68[_0x377f8f(0x11c)](process[_0x377f8f(0x1cd)](),_0x4b1146[_0x377f8f(0x129)])||'.')),console['error'](_0x377f8f(0x204)+a56_0x47be42['green']('+'+_0x4b1146[_0x377f8f(0x1a2)]['new']+_0x377f8f(0x246))+',\x20'+(a56_0x47be42[_0x377f8f(0x205)]('~'+_0x4b1146[_0x377f8f(0x1a2)][_0x377f8f(0x1ed)]+_0x377f8f(0x161))+',\x20')+(a56_0x47be42[_0x377f8f(0x11a)]('-'+_0x4b1146[_0x377f8f(0x1a2)][_0x377f8f(0x154)]+_0x377f8f(0x17d))+',\x20')+(''+a56_0x47be42[_0x377f8f(0x20a)](_0x4b1146[_0x377f8f(0x1a2)][_0x377f8f(0x192)]+'\x20unchanged')));for(const _0x2668db of _0x4b1146[_0x377f8f(0x160)]){_0x2668db['type']===_0x377f8f(0x1ed)&&_0x2668db[_0x377f8f(0xd6)]&&(console[_0x377f8f(0x9f)]('\x0a'+a56_0x47be42[_0x377f8f(0x16b)](_0x377f8f(0x152)+_0x2668db[_0x377f8f(0x1b4)])),console[_0x377f8f(0x9f)](_0x2668db[_0x377f8f(0xd6)]));}if(!_0x4b1146['hasChanges'])return saveSessionContext({'workflow_project':_0x4b1146[_0x377f8f(0x171)]},_0x1f9c39['session']),console[_0x377f8f(0x9f)](a56_0x47be42[_0x377f8f(0x21f)](_0x377f8f(0x17a))),console[_0x377f8f(0x9f)](a56_0x47be42[_0x377f8f(0x20a)](_0x377f8f(0x188)+_0x4b1146[_0x377f8f(0x171)])),0x0;if(_0x1f9c39[_0x377f8f(0xfc)])return console[_0x377f8f(0x9f)](a56_0x47be42['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x1f9c39['yes']){if(!isInteractive())return console['error'](a56_0x47be42[_0x377f8f(0x11a)]('\x0aError:'),_0x377f8f(0xc7)),console['error'](a56_0x47be42[_0x377f8f(0x20a)](_0x377f8f(0x12f))),0x1;const _0x5cfee9=await confirmKey(_0x377f8f(0x1bd));if(!_0x5cfee9)return console['error'](a56_0x47be42[_0x377f8f(0x205)](_0x377f8f(0x80)),_0x377f8f(0xc8)),0x1;}await withSpinner('Writing\x20files...',()=>_0x2928b8['workflow'][_0x377f8f(0x117)](_0x4b1146,{'revision':_0x2e1690}),{'verbose':_0x1f9c39[_0x377f8f(0x1b1)]}),saveSessionContext({'workflow_project':_0x4b1146['projectName']},_0x1f9c39['session']),console[_0x377f8f(0x9f)](a56_0x47be42[_0x377f8f(0x21f)](_0x377f8f(0x1a6)));const _0x38055c=a56_0x27aa68['relative'](process[_0x377f8f(0x1cd)](),_0x4b1146[_0x377f8f(0x129)])||'.';return console['error'](a56_0x47be42[_0x377f8f(0x20a)](_0x377f8f(0x24d)+_0x38055c)),console[_0x377f8f(0x9f)](a56_0x47be42['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x4b1146[_0x377f8f(0x171)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x1f2);[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x178);async[a56_0x1982d8(0x24e)](_0x335f3a){const _0x5d0a18=a56_0x1982d8,{options:_0x3e2f62,args:_0x29e3f0,tdx:_0x4fb5c9}=_0x335f3a,_0x3bfc38=this[_0x5d0a18(0x1ec)](_0x29e3f0,_0x3e2f62),_0x355d96=_0x3e2f62,{revision:_0x52a50b,skipValidation:_0x49b488,backfill:_0x24e143}=_0x355d96,_0x145fbf=_0x24e143===undefined?undefined:!_0x24e143;_0x3e2f62[_0x5d0a18(0x1b1)]&&(_0x3bfc38&&console[_0x5d0a18(0x9f)](_0x5d0a18(0x1f0)+_0x3bfc38),_0x52a50b&&console[_0x5d0a18(0x9f)](_0x5d0a18(0xfb)+_0x52a50b),_0x3e2f62['dryRun']&&console['error'](_0x5d0a18(0xbb)),_0x49b488&&console[_0x5d0a18(0x9f)]('Validation:\x20skipped'),_0x24e143&&console[_0x5d0a18(0x9f)](_0x5d0a18(0x187)));let _0x257914;try{_0x257914=await withSpinner('Analyzing\x20changes...',()=>_0x4fb5c9[_0x5d0a18(0x83)][_0x5d0a18(0x190)]({'sourceDir':_0x3bfc38,'revision':_0x52a50b,'skipValidation':_0x49b488,'skipSchedule':_0x145fbf}),{'verbose':_0x3e2f62[_0x5d0a18(0x1b1)]});}catch(_0x3896bd){if(_0x3896bd instanceof Error&&_0x3896bd['message']['includes']('No\x20workflow\x20tdx.json\x20found'))return console[_0x5d0a18(0x9f)](a56_0x47be42[_0x5d0a18(0x11a)](_0x5d0a18(0x150)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x3e2f62[_0x5d0a18(0x247)]?console[_0x5d0a18(0x9f)](a56_0x47be42[_0x5d0a18(0x20a)](_0x5d0a18(0x113)+_0x3e2f62['workflowProject']+_0x5d0a18(0x23c)+_0x3e2f62['workflowProject']+'\x27')):console[_0x5d0a18(0x9f)](a56_0x47be42[_0x5d0a18(0x20a)](_0x5d0a18(0x235))),0x1;throw _0x3896bd;}const _0x1b67ef=_0x257914['data'];console[_0x5d0a18(0x9f)](_0x5d0a18(0x18a)+_0x1b67ef[_0x5d0a18(0x171)]),console[_0x5d0a18(0x9f)]('\x20\x20Source:\x20'+_0x1b67ef[_0x5d0a18(0x23f)]),console[_0x5d0a18(0x9f)](_0x5d0a18(0x241)+_0x1b67ef[_0x5d0a18(0x22c)]),console[_0x5d0a18(0x9f)](_0x5d0a18(0x204)+a56_0x47be42[_0x5d0a18(0x21f)]('+'+_0x1b67ef[_0x5d0a18(0x1a2)][_0x5d0a18(0xfd)]+_0x5d0a18(0x246))+',\x20'+(a56_0x47be42[_0x5d0a18(0x205)]('~'+_0x1b67ef[_0x5d0a18(0x1a2)][_0x5d0a18(0x1ed)]+_0x5d0a18(0x161))+',\x20')+(a56_0x47be42[_0x5d0a18(0x11a)]('-'+_0x1b67ef['summary'][_0x5d0a18(0x154)]+_0x5d0a18(0x17d))+',\x20')+(''+a56_0x47be42[_0x5d0a18(0x20a)](_0x1b67ef['summary'][_0x5d0a18(0x192)]+_0x5d0a18(0x90))));for(const _0x36e9f4 of _0x1b67ef['changes']){_0x36e9f4[_0x5d0a18(0x1aa)]==='modified'&&_0x36e9f4[_0x5d0a18(0xd6)]&&(console[_0x5d0a18(0x9f)]('\x0a'+a56_0x47be42['cyan'](_0x5d0a18(0x152)+_0x36e9f4[_0x5d0a18(0x1b4)])),console[_0x5d0a18(0x9f)](_0x36e9f4[_0x5d0a18(0xd6)]));}if(!_0x1b67ef[_0x5d0a18(0x1b3)])return console['error'](a56_0x47be42[_0x5d0a18(0x21f)](_0x5d0a18(0x1f6))),await this[_0x5d0a18(0x166)](_0x4fb5c9,_0x1b67ef[_0x5d0a18(0x171)],_0x3e2f62[_0x5d0a18(0x194)]),0x0;if(_0x3e2f62[_0x5d0a18(0xfc)])return console['error'](a56_0x47be42[_0x5d0a18(0x205)](_0x5d0a18(0xe5))),0x0;if(!_0x3e2f62['yes']){if(!isInteractive())return console['error'](a56_0x47be42[_0x5d0a18(0x11a)]('\x0aError:'),_0x5d0a18(0xc7)),console['error'](a56_0x47be42['dim'](_0x5d0a18(0x12f))),0x1;const _0x457a3c=await confirmKey(_0x5d0a18(0x10a));if(!_0x457a3c)return console[_0x5d0a18(0x9f)](a56_0x47be42['yellow'](_0x5d0a18(0x80)),_0x5d0a18(0x14f)),0x1;}const _0x256b21=await withSpinner(_0x5d0a18(0xf9),()=>_0x4fb5c9[_0x5d0a18(0x83)][_0x5d0a18(0x198)](_0x1b67ef),{'verbose':_0x3e2f62[_0x5d0a18(0x1b1)]}),_0x340531=_0x256b21[_0x5d0a18(0x207)];return console[_0x5d0a18(0x9f)](a56_0x47be42['green'](_0x5d0a18(0x7d))),console[_0x5d0a18(0x9f)](_0x5d0a18(0x9b)+_0x340531[_0x5d0a18(0x216)]),console[_0x5d0a18(0x9f)]('\x20\x20Revision:\x20'+_0x340531[_0x5d0a18(0x22c)]),await this[_0x5d0a18(0x166)](_0x4fb5c9,_0x340531[_0x5d0a18(0x171)],_0x3e2f62[_0x5d0a18(0x194)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x86);['description']=a56_0x1982d8(0xd3);async[a56_0x1982d8(0x24e)](_0x382e16){const _0x3d6569=a56_0x1982d8,{options:_0x3653fc,args:_0x481aae,tdx:_0x5d6fc8}=_0x382e16,_0x3e4006=this[_0x3d6569(0x1ec)](_0x481aae,_0x3653fc),_0x425c66=_0x3653fc['name'],_0x50fa95=_0x3653fc[_0x3d6569(0x22c)],_0x3354b4=_0x3653fc[_0x3d6569(0x1c3)];if(!_0x3e4006)return console[_0x3d6569(0x9f)](a56_0x47be42[_0x3d6569(0x11a)](_0x3d6569(0x150)),_0x3d6569(0x157)),console[_0x3d6569(0x9f)](a56_0x47be42[_0x3d6569(0x20a)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x3d6569(0x9f)](a56_0x47be42['dim'](_0x3d6569(0x112))),0x1;if(!_0x425c66)return console['error'](a56_0x47be42[_0x3d6569(0x11a)](_0x3d6569(0x150)),_0x3d6569(0x12c)),console[_0x3d6569(0x9f)](a56_0x47be42[_0x3d6569(0x20a)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x3653fc[_0x3d6569(0x1b1)]&&(console[_0x3d6569(0x9f)](_0x3d6569(0x1f0)+_0x3e4006),console['error'](_0x3d6569(0xb2)+_0x425c66),_0x50fa95&&console[_0x3d6569(0x9f)](_0x3d6569(0xfb)+_0x50fa95),_0x3653fc['dryRun']&&console['error'](_0x3d6569(0xbb)),_0x3354b4&&console[_0x3d6569(0x9f)](_0x3d6569(0x13e)));const _0xc4ce4d=await withSpinner(_0x3d6569(0x172),()=>_0x5d6fc8[_0x3d6569(0x83)][_0x3d6569(0x1e1)](_0x3e4006,_0x425c66,{'revision':_0x50fa95,'skipValidation':_0x3354b4}),{'verbose':_0x3653fc[_0x3d6569(0x1b1)]}),_0x15176c=_0xc4ce4d['data'];console['error'](_0x3d6569(0x137)+_0x15176c[_0x3d6569(0x23f)]);_0x15176c['sourceProjectName']&&console['error'](_0x3d6569(0x16d)+_0x15176c['sourceProjectName']);console[_0x3d6569(0x9f)](_0x3d6569(0xb2)+_0x15176c[_0x3d6569(0xb4)]),console[_0x3d6569(0x9f)](_0x3d6569(0xfb)+_0x15176c[_0x3d6569(0x22c)]),console['error'](_0x3d6569(0x19e)+_0x15176c[_0x3d6569(0x89)]);_0x15176c[_0x3d6569(0x1ad)]&&(console[_0x3d6569(0x9f)](a56_0x47be42['yellow'](_0x3d6569(0x8e)+_0x15176c['newProjectName']+'\x22\x20already\x20exists\x20(ID:\x20'+_0x15176c[_0x3d6569(0x106)]+')')),console[_0x3d6569(0x9f)](a56_0x47be42[_0x3d6569(0x205)](_0x3d6569(0x105))));if(_0x3653fc[_0x3d6569(0xfc)])return console[_0x3d6569(0x9f)](a56_0x47be42[_0x3d6569(0x205)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x3653fc[_0x3d6569(0xb0)]){if(!isInteractive())return console[_0x3d6569(0x9f)](a56_0x47be42[_0x3d6569(0x11a)]('\x0aError:'),_0x3d6569(0xc7)),console['error'](a56_0x47be42[_0x3d6569(0x20a)](_0x3d6569(0x12f))),0x1;const _0xc81d0d=_0x15176c[_0x3d6569(0xa6)]||a56_0x27aa68[_0x3d6569(0x1f5)](_0x3e4006),_0x1fb251=_0x15176c[_0x3d6569(0x1ad)]?_0x3d6569(0x19d)+_0x425c66+_0x3d6569(0x21b):_0x3d6569(0x10f)+_0xc81d0d+'\x22\x20to\x20new\x20project\x20\x22'+_0x425c66+'\x22?',_0x13418f=await confirmKey(_0x1fb251);if(!_0x13418f)return console[_0x3d6569(0x9f)](a56_0x47be42['yellow'](_0x3d6569(0x80))),0x1;}const _0x4215e0=await withSpinner(_0x15176c[_0x3d6569(0x1ad)]?_0x3d6569(0x87)+_0x425c66+_0x3d6569(0x1e7):'Cloning\x20to\x20'+_0x425c66+'...',()=>_0x5d6fc8[_0x3d6569(0x83)]['executeCloneProject'](_0x15176c),{'verbose':_0x3653fc[_0x3d6569(0x1b1)]}),_0x580e15=_0x4215e0[_0x3d6569(0x207)];return console[_0x3d6569(0x9f)](a56_0x47be42[_0x3d6569(0x21f)](_0x15176c[_0x3d6569(0x1ad)]?_0x3d6569(0x18d):_0x3d6569(0x1b9))),console[_0x3d6569(0x9f)](_0x3d6569(0x1f8)+_0x580e15['newProjectName']),console[_0x3d6569(0x9f)](_0x3d6569(0x9b)+_0x580e15['newProjectId']),console[_0x3d6569(0x9f)](_0x3d6569(0x241)+_0x580e15[_0x3d6569(0x22c)]),await this[_0x3d6569(0x166)](_0x5d6fc8,_0x580e15[_0x3d6569(0xb4)],_0x3653fc['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']='workflow:delete';['description']=a56_0x1982d8(0x15d);async[a56_0x1982d8(0x24e)](_0x3c2c3e){const _0x328ea3=a56_0x1982d8,{options:_0x15f32d,args:_0x32545c,tdx:_0x328a0c}=_0x3c2c3e,_0x553783=_0x32545c[0x0];if(!_0x553783)return console[_0x328ea3(0x9f)](_0x328ea3(0x19c)),console[_0x328ea3(0x9f)](_0x328ea3(0x125)),0x1;_0x15f32d[_0x328ea3(0x1b1)]&&console['error'](_0x328ea3(0x1ba)+_0x553783);if(!_0x15f32d['yes']){if(!isInteractive())return console[_0x328ea3(0x9f)](a56_0x47be42[_0x328ea3(0x11a)](_0x328ea3(0x249)),_0x328ea3(0xc7)),console['error'](a56_0x47be42[_0x328ea3(0x20a)](_0x328ea3(0x12f))),0x1;const _0x8d915e=await confirmKey(_0x328ea3(0x243)+_0x553783+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x8d915e)return console['error'](a56_0x47be42['yellow']('Cancelled')),0x1;}const _0x94461e=await withSpinner(_0x328ea3(0xce)+_0x553783+'...',()=>_0x328a0c[_0x328ea3(0x83)][_0x328ea3(0x23b)](_0x553783),{'verbose':_0x15f32d[_0x328ea3(0x1b1)]}),_0x1c3817=_0x94461e['data'];return console[_0x328ea3(0x9f)]('✔\x20Deleted\x20project\x20'+_0x1c3817[_0x328ea3(0x171)]),console['error'](_0x328ea3(0x9b)+_0x1c3817['projectId']),0x0;}}export function parseKeyValue(_0x551a54){const _0x48c5d4=a56_0x1982d8,_0x3fff4b=_0x551a54[_0x48c5d4(0x169)]('=');if(_0x3fff4b===-0x1)throw new Error('Invalid\x20format:\x20'+_0x551a54+_0x48c5d4(0x22a));const _0x55afb7=_0x551a54[_0x48c5d4(0x108)](0x0,_0x3fff4b),_0x5afbb2=_0x551a54['substring'](_0x3fff4b+0x1);if(!_0x55afb7)throw new Error(_0x48c5d4(0x228));return{'key':_0x55afb7,'value':_0x5afbb2};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x151);[a56_0x1982d8(0x14b)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a56_0x1982d8(0x24e)](_0x1e183a){const _0x142f86=a56_0x1982d8,{options:_0x23c686,args:_0xda0300,tdx:_0x52fe42}=_0x1e183a,_0x19b36e=this['requireProject'](_0xda0300,_0x23c686);if(!_0x19b36e)return 0x1;_0x23c686[_0x142f86(0x1b1)]&&console[_0x142f86(0x9f)](_0x142f86(0x1ba)+_0x19b36e);const _0xdfdbdc=await withSpinner('Listing\x20secrets...',()=>_0x52fe42[_0x142f86(0x83)][_0x142f86(0x1f9)](_0x19b36e),{'verbose':_0x23c686[_0x142f86(0x1b1)]}),{secrets:_0x4c6d5b}=_0xdfdbdc[_0x142f86(0x207)];return console[_0x142f86(0x9f)](_0x142f86(0x1a1)+_0x4c6d5b[_0x142f86(0x140)]+_0x142f86(0x155)+(_0x4c6d5b[_0x142f86(0x140)]!==0x1?'s':'')),await handleSDKOutput(_0x4c6d5b,_0x23c686),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']='workflow:secrets:set';[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x136);async[a56_0x1982d8(0x24e)](_0x369e96){const _0x39f666=a56_0x1982d8,{options:_0x2733e5,args:_0xd5ca25,tdx:_0x517e83}=_0x369e96;let _0xc9aa79,_0x138a30;if(_0xd5ca25[_0x39f666(0x140)]>=0x1&&!_0xd5ca25[0x0]['includes']('='))_0xc9aa79=_0xd5ca25[0x0],_0x138a30=_0xd5ca25['slice'](0x1);else{if(_0xd5ca25[_0x39f666(0x140)]>=0x1&&_0x2733e5['workflowProject'])_0xc9aa79=_0x2733e5['workflowProject'],_0x138a30=_0xd5ca25;else return _0xd5ca25[_0x39f666(0x140)]>=0x1?(console['error'](_0x39f666(0xa9)),console[_0x39f666(0x9f)](_0x39f666(0x1be)),0x1):(console[_0x39f666(0x9f)](_0x39f666(0xa3)),console[_0x39f666(0x9f)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x138a30[_0x39f666(0x140)]===0x0)return console[_0x39f666(0x9f)](_0x39f666(0xa3)),console['error'](_0x39f666(0x8a)),0x1;const _0x14b208={};try{for(const _0x4b6717 of _0x138a30){const {key:_0x26f3e2,value:_0x14191a}=parseKeyValue(_0x4b6717);_0x14b208[_0x26f3e2]=_0x14191a;}}catch(_0x406ac0){return _0x406ac0 instanceof Error&&console[_0x39f666(0x9f)](a56_0x47be42['red'](_0x39f666(0x150)),_0x406ac0[_0x39f666(0x208)]),0x1;}const _0x34c525=Object['keys'](_0x14b208);_0x2733e5[_0x39f666(0x1b1)]&&(console['error']('Project:\x20'+_0xc9aa79),console['error']('Secrets\x20to\x20set:\x20'+_0x34c525[_0x39f666(0x227)](',\x20')));const _0x3aa313=await withSpinner(_0x34c525['length']===0x1?'Setting\x20secret...':_0x39f666(0x17c)+_0x34c525['length']+_0x39f666(0x119),()=>_0x517e83[_0x39f666(0x83)][_0x39f666(0x145)](_0xc9aa79,_0x14b208),{'verbose':_0x2733e5[_0x39f666(0x1b1)]}),_0x4ae082=_0x3aa313[_0x39f666(0x207)];return console['error'](_0x34c525[_0x39f666(0x140)]===0x1?_0x39f666(0x8f)+_0x4ae082[_0x39f666(0x1ca)][0x0]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x4ae082[_0x39f666(0x171)]+'\x27':'✔\x20'+_0x4ae082[_0x39f666(0x1ca)][_0x39f666(0x140)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x4ae082['projectName']+'\x27'),(_0x2733e5['json']||_0x2733e5[_0x39f666(0x1c8)])&&await handleSingleObjectOutput(_0x4ae082,_0x2733e5),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a56_0x1982d8(0x1bb);[a56_0x1982d8(0x14b)]=a56_0x1982d8(0x214);async['execute'](_0x15ad5b){const _0x481e74=a56_0x1982d8,{options:_0x2c1376,args:_0x22a6b1,tdx:_0x470845}=_0x15ad5b;let _0x4387fd,_0x238679;if(_0x22a6b1[_0x481e74(0x140)]>=0x2)_0x4387fd=_0x22a6b1[0x0],_0x238679=_0x22a6b1[0x1];else{if(_0x22a6b1[_0x481e74(0x140)]===0x1&&_0x2c1376['workflowProject'])_0x4387fd=_0x2c1376['workflowProject'],_0x238679=_0x22a6b1[0x0];else return _0x22a6b1[_0x481e74(0x140)]===0x1?(console['error'](_0x481e74(0xa9)),console[_0x481e74(0x9f)](_0x481e74(0x1be)),0x1):(console[_0x481e74(0x9f)](_0x481e74(0xc1)),console[_0x481e74(0x9f)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x2c1376[_0x481e74(0x1b1)]&&(console[_0x481e74(0x9f)](_0x481e74(0x1ba)+_0x4387fd),console[_0x481e74(0x9f)]('Key:\x20'+_0x238679));if(!_0x2c1376[_0x481e74(0xb0)]){if(!isInteractive())return console['error'](a56_0x47be42[_0x481e74(0x11a)](_0x481e74(0x249)),_0x481e74(0xc7)),console[_0x481e74(0x9f)](a56_0x47be42['dim'](_0x481e74(0x12f))),0x1;const _0x1c742b=await confirmKey(_0x481e74(0x107)+_0x238679+_0x481e74(0xb7)+_0x4387fd+'\x27?');if(!_0x1c742b)return console[_0x481e74(0x9f)](a56_0x47be42[_0x481e74(0x205)](_0x481e74(0x80))),0x1;}const _0xc560b6=await withSpinner(_0x481e74(0x17b),()=>_0x470845[_0x481e74(0x83)][_0x481e74(0x143)](_0x4387fd,_0x238679),{'verbose':_0x2c1376[_0x481e74(0x1b1)]}),_0x461fec=_0xc560b6[_0x481e74(0x207)];return console['error']('✔\x20Secret\x20\x27'+_0x461fec['key']+_0x481e74(0x1d7)+_0x461fec[_0x481e74(0x171)]+'\x27'),(_0x2c1376[_0x481e74(0x8c)]||_0x2c1376[_0x481e74(0x1c8)])&&await handleSingleObjectOutput(_0x461fec,_0x2c1376),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(_0x4d2ca3){const _0x1b03af=a56_0x1982d8,_0x33a8a9=Math[_0x1b03af(0x10e)](_0x4d2ca3/0x3e8),_0x28b13e=Math['floor'](_0x33a8a9/0x3c),_0x511d3f=Math[_0x1b03af(0x10e)](_0x28b13e/0x3c),_0x2e584b=Math[_0x1b03af(0x10e)](_0x511d3f/0x18);if(_0x2e584b>0x0){const _0x132395=_0x511d3f%0x18;return _0x132395>0x0?_0x2e584b+'d\x20'+_0x132395+'h':_0x2e584b+'d';}else{if(_0x511d3f>0x0){const _0x26a318=_0x28b13e%0x3c;return _0x26a318>0x0?_0x511d3f+'h\x20'+_0x26a318+'m':_0x511d3f+'h';}else{if(_0x28b13e>0x0){const _0x341ae9=_0x33a8a9%0x3c;return _0x341ae9>0x0?_0x28b13e+'m\x20'+_0x341ae9+'s':_0x28b13e+'m';}else return _0x33a8a9+'s';}}}function formatTimestamp(_0x55d670,_0xee70b7){const _0x5ddd2c=a56_0x1982d8,_0x52b67d=new Date(_0x55d670),_0x4e1864=String(_0x52b67d[_0x5ddd2c(0x156)]())[_0x5ddd2c(0x1c7)](0x2,'0'),_0x283d50=String(_0x52b67d[_0x5ddd2c(0xf5)]())[_0x5ddd2c(0x1c7)](0x2,'0'),_0x30ba7d=_0x4e1864+':'+_0x283d50,_0x77fcc=_0x52b67d[_0x5ddd2c(0x8d)]()===_0xee70b7[_0x5ddd2c(0x8d)]()&&_0x52b67d[_0x5ddd2c(0xfe)]()===_0xee70b7['getMonth']()&&_0x52b67d[_0x5ddd2c(0x18b)]()===_0xee70b7[_0x5ddd2c(0x18b)]();if(_0x77fcc)return _0x30ba7d;else{const _0x18ed30=String(_0x52b67d['getMonth']()+0x1)[_0x5ddd2c(0x1c7)](0x2,'0'),_0x501691=String(_0x52b67d['getDate']())[_0x5ddd2c(0x1c7)](0x2,'0');return _0x18ed30+'-'+_0x501691+'\x20'+_0x30ba7d;}}function formatDate(_0x1b794e){const _0x1a0f9e=a56_0x1982d8,_0x50ed60=_0x1b794e[_0x1a0f9e(0x8d)](),_0x304da5=String(_0x1b794e['getMonth']()+0x1)[_0x1a0f9e(0x1c7)](0x2,'0'),_0x52466c=String(_0x1b794e[_0x1a0f9e(0x18b)]())[_0x1a0f9e(0x1c7)](0x2,'0');return _0x50ed60+'-'+_0x304da5+'-'+_0x52466c;}function getTaskStateIcon(_0x24a1e9){const _0xb304af={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0xb304af[_0x24a1e9]||'⚪';}function getBarChar(_0x21a990){const _0x57b452=a56_0x1982d8;return _0x21a990===_0x57b452(0x9f)||_0x21a990===_0x57b452(0x109)?'×':'─';}function getBarColor(_0x906861){const _0xeff461=a56_0x1982d8,_0x355704={'success':a56_0x47be42[_0xeff461(0x21f)],'error':a56_0x47be42['red'],'group_error':a56_0x47be42[_0xeff461(0x11a)],'running':a56_0x47be42['blue'],'blocked':a56_0x47be42[_0xeff461(0x205)],'planned':a56_0x47be42[_0xeff461(0x20a)],'canceling':a56_0x47be42[_0xeff461(0x205)]};return _0x355704[_0x906861]||a56_0x47be42[_0xeff461(0x1fc)];}function parseTaskName(_0x63ea6c){const _0x240cf6=a56_0x1982d8;let _0x42e127=_0x63ea6c[_0x240cf6(0xe4)](/^\++/,'');const _0x7a705a=_0x42e127[_0x240cf6(0x19b)]('+'),_0x3b8224=_0x7a705a[_0x240cf6(0x140)]>0x1?_0x7a705a[_0x240cf6(0x140)]-0x2:0x0,_0x42836f=_0x7a705a[_0x7a705a['length']-0x1]||_0x42e127;return{'level':_0x3b8224,'name':'+'+_0x42836f};}function truncateTaskName(_0x5a261e,_0x7283f5){const _0x5adeee=a56_0x1982d8,_0x358cfa=stringWidth(_0x5a261e);if(_0x358cfa<=_0x7283f5)return _0x5a261e;let _0x6378c9=_0x5a261e;while(stringWidth(_0x6378c9+'…')>_0x7283f5&&_0x6378c9['length']>0x0){_0x6378c9=_0x6378c9[_0x5adeee(0x141)](0x0,-0x1);}return _0x6378c9+'…';}function calculateTimeScale(_0x533ad7,_0x58181a){const _0x1064fd=a56_0x1982d8;return{'startTime':_0x533ad7[_0x1064fd(0x181)],'endTime':_0x533ad7['end'],'durationMs':_0x533ad7[_0x1064fd(0x191)],'msPerChar':_0x533ad7[_0x1064fd(0x191)]/_0x58181a};}function timeToPosition(_0x129d7a,_0x7ff154,_0x1076e8){const _0x5c9388=a56_0x1982d8,_0x4da5a1=_0x129d7a-_0x7ff154['startTime'],_0x1d604b=Math[_0x5c9388(0x10e)](_0x4da5a1/_0x7ff154[_0x5c9388(0xee)]);return Math[_0x5c9388(0x1d4)](0x0,Math['min'](_0x1d604b,_0x1076e8));}function renderTimeAxis(_0x24fe4e,_0x2321d7){const _0x26c236=a56_0x1982d8,_0x2da336=Math['min'](TIMELINE_CONFIG[_0x26c236(0x1b6)],Math[_0x26c236(0x1d4)](TIMELINE_CONFIG[_0x26c236(0x24c)],Math['floor'](_0x2321d7/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x5f154a=_0x24fe4e[_0x26c236(0x186)]/(_0x2da336-0x1),_0x41ac27=new Date(_0x24fe4e[_0x26c236(0x1ae)]),_0x400ed2=[];for(let _0x420a1b=0x0;_0x420a1b<_0x2da336;_0x420a1b++){const _0x5e5cc9=_0x24fe4e[_0x26c236(0x1ae)]+_0x420a1b*_0x5f154a,_0x3b4c6b=timeToPosition(_0x5e5cc9,_0x24fe4e,_0x2321d7),_0xe69b27=formatTimestamp(_0x5e5cc9,_0x41ac27);_0x400ed2[_0x26c236(0x215)]({'pos':_0x3b4c6b,'text':_0xe69b27});}const _0xc765dd=new Array(_0x2321d7)[_0x26c236(0xbc)]('\x20');let _0x3a4469=-0x1;for(const {pos:_0x2d81d4,text:_0x14f09a}of _0x400ed2){let _0x581b9e=Math['max'](0x0,_0x2d81d4-Math[_0x26c236(0x10e)](_0x14f09a[_0x26c236(0x140)]/0x2));_0x581b9e<=_0x3a4469+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0x581b9e=_0x3a4469+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x581b9e+_0x14f09a[_0x26c236(0x140)]>_0x2321d7&&(_0x581b9e=_0x2321d7-_0x14f09a['length']);if(_0x581b9e>=0x0&&_0x581b9e+_0x14f09a[_0x26c236(0x140)]<=_0x2321d7&&_0x581b9e>_0x3a4469){for(let _0x45d6cd=0x0;_0x45d6cd<_0x14f09a[_0x26c236(0x140)];_0x45d6cd++){_0xc765dd[_0x581b9e+_0x45d6cd]=_0x14f09a[_0x45d6cd];}_0x3a4469=_0x581b9e+_0x14f09a[_0x26c236(0x140)]-0x1;}}return _0xc765dd[_0x26c236(0x227)]('');}function renderTaskRow(_0xe490b5,_0x3216b7,_0x2df9bd,_0x5bedb9){const _0x57cb44=a56_0x1982d8,{level:_0xd9321f,name:_0x264ad8}=parseTaskName(_0xe490b5[_0x57cb44(0x11f)]),_0x53c062='\x20'[_0x57cb44(0xa1)](_0xd9321f),_0x1c0fe1=_0xe490b5[_0x57cb44(0x126)]?'('+formatElapsed(_0xe490b5[_0x57cb44(0x126)][_0x57cb44(0x191)])+')':'',_0x33c482=stringWidth(_0x1c0fe1),_0x3a6567=_0xd9321f*0x1,_0x9d668=_0x5bedb9-_0x3a6567-_0x33c482-0x1,_0x11647b=truncateTaskName(_0x264ad8,_0x9d668),_0x21fc10=_0x53c062+_0x11647b,_0x5e0876=stringWidth(_0x21fc10),_0x31dd18=_0x5bedb9-_0x5e0876-_0x33c482,_0x24c3e1=_0x21fc10+'\x20'['repeat'](Math['max'](0x1,_0x31dd18))+a56_0x47be42['dim'](_0x1c0fe1),_0x5ea0f3=getTaskStateIcon(_0xe490b5[_0x57cb44(0x7e)]),_0x825e2f=new Array(_0x2df9bd)[_0x57cb44(0xbc)]('\x20');if(_0xe490b5[_0x57cb44(0x126)]){const _0xe002e4=timeToPosition(_0xe490b5[_0x57cb44(0x126)][_0x57cb44(0x181)],_0x3216b7,_0x2df9bd),_0x20ce04=timeToPosition(_0xe490b5['window'][_0x57cb44(0x147)],_0x3216b7,_0x2df9bd),_0x238e34=getBarChar(_0xe490b5['state']),_0x412b80=Math['max'](_0xe002e4+0x1,_0x20ce04);for(let _0xcd37ab=_0xe002e4;_0xcd37ab<Math[_0x57cb44(0xcc)](_0x412b80,_0x2df9bd);_0xcd37ab++){_0x825e2f[_0xcd37ab]=_0x238e34;}}const _0x56143f=getBarColor(_0xe490b5['state']),_0x55d634=_0x825e2f['map'](_0x576907=>_0x576907==='\x20'?'\x20':_0x56143f(_0x576907))[_0x57cb44(0x227)]('');return _0x5ea0f3+'\x20'+_0x24c3e1+'│'+_0x55d634+'│';}function calculateStats(_0x2e8e7a){const _0x3508c4=a56_0x1982d8,_0x4d8908={'total':_0x2e8e7a[_0x3508c4(0x140)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x233a27 of _0x2e8e7a){if(_0x233a27[_0x3508c4(0x7e)]===_0x3508c4(0x193))_0x4d8908['success']++;else{if(_0x233a27[_0x3508c4(0x7e)]===_0x3508c4(0x9f)||_0x233a27[_0x3508c4(0x7e)]===_0x3508c4(0x109))_0x4d8908[_0x3508c4(0x9f)]++;else _0x233a27['state']===_0x3508c4(0xc0)?_0x4d8908['running']++:_0x4d8908[_0x3508c4(0xa0)]++;}}return _0x4d8908;}function formatStats(_0x3f45aa){const _0x1be9a6=a56_0x1982d8;return[_0x1be9a6(0x182)+_0x3f45aa[_0x1be9a6(0x93)],'✅\x20'+_0x3f45aa['success'],'❌\x20'+_0x3f45aa[_0x1be9a6(0x9f)],_0x1be9a6(0xcd)+_0x3f45aa[_0x1be9a6(0xc0)],'⏳\x20'+_0x3f45aa[_0x1be9a6(0xa0)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]='workflow:timeline';['description']=a56_0x1982d8(0x22f);async['execute'](_0x39c7bf){const _0x4b2bd3=a56_0x1982d8,{options:_0x48305a,args:_0x147dc0,tdx:_0x5f522f}=_0x39c7bf;let _0x1ee80a,_0x14dd3e,_0x3f2802=![];if(_0x147dc0[0x0]){if(_0x147dc0[0x0][_0x4b2bd3(0x10b)]('.')){const _0x1e4221=this[_0x4b2bd3(0x144)](_0x147dc0,_0x48305a);if(!_0x1e4221)return 0x1;_0x1ee80a=_0x1e4221[_0x4b2bd3(0x171)],_0x14dd3e=_0x1e4221[_0x4b2bd3(0xd1)];}else{_0x14dd3e=_0x147dc0[0x0],_0x1ee80a=_0x48305a[_0x4b2bd3(0x247)];if(!_0x1ee80a)return console[_0x4b2bd3(0x9f)](a56_0x47be42[_0x4b2bd3(0x11a)]('Error:'),_0x4b2bd3(0x1e2)),0x1;_0x3f2802=!![];}}else{const _0x4eea13=this[_0x4b2bd3(0x144)](_0x147dc0,_0x48305a);if(!_0x4eea13)return 0x1;_0x1ee80a=_0x4eea13[_0x4b2bd3(0x171)],_0x14dd3e=_0x4eea13['workflowName'];}if(_0x48305a[_0x4b2bd3(0x1b1)]){if(_0x1ee80a&&_0x14dd3e)console[_0x4b2bd3(0x9f)](_0x4b2bd3(0x1ff)+_0x1ee80a+'.'+_0x14dd3e);else _0x1ee80a&&console[_0x4b2bd3(0x9f)]('Filter:\x20project='+_0x1ee80a);}const _0x550b4c=_0x48305a[_0x4b2bd3(0x138)],_0x2d193a=_0x48305a[_0x4b2bd3(0x1df)];if(_0x550b4c){_0x2d193a&&console[_0x4b2bd3(0x9f)](a56_0x47be42[_0x4b2bd3(0x205)](_0x4b2bd3(0x20d)),_0x4b2bd3(0x14d));const _0x181668=_0x48305a[_0x4b2bd3(0x132)];return _0x181668?await this[_0x4b2bd3(0x223)](_0x39c7bf,_0x550b4c):await this[_0x4b2bd3(0x100)](_0x39c7bf,_0x550b4c,_0x48305a),0x0;}if(_0x2d193a){const _0x400fc6=await withSpinner(_0x4b2bd3(0xea),()=>_0x5f522f[_0x4b2bd3(0x83)][_0x4b2bd3(0xc6)]({'projectName':_0x1ee80a,'workflowName':_0x14dd3e,'limit':0x64}),{'verbose':_0x48305a[_0x4b2bd3(0x1b1)]}),_0x46bd25=_0x400fc6['data']['find'](_0x85a3f9=>_0x85a3f9['id']===_0x2d193a);if(!_0x46bd25)return console[_0x4b2bd3(0x9f)](a56_0x47be42[_0x4b2bd3(0x11a)](_0x4b2bd3(0x150)),_0x4b2bd3(0x84)+_0x2d193a),0x1;if(!_0x46bd25[_0x4b2bd3(0x240)]?.['id'])return console[_0x4b2bd3(0x9f)](a56_0x47be42[_0x4b2bd3(0x11a)](_0x4b2bd3(0x150)),'Session\x20'+_0x2d193a+_0x4b2bd3(0x22b)),0x1;const _0xeea610=_0x46bd25[_0x4b2bd3(0x240)]['id'];_0x48305a[_0x4b2bd3(0x1b1)]&&console['error']('Using\x20attempt\x20'+_0xeea610+_0x4b2bd3(0xa2)+_0x2d193a);const _0x56935f=_0x48305a[_0x4b2bd3(0x132)];return _0x56935f?await this['pollTimeline'](_0x39c7bf,_0xeea610):await this[_0x4b2bd3(0x100)](_0x39c7bf,_0xeea610,_0x48305a),0x0;}const _0x2b9c9c=await withSpinner('Loading\x20sessions...',()=>_0x5f522f[_0x4b2bd3(0x83)][_0x4b2bd3(0xc6)]({'projectName':_0x1ee80a,'workflowName':_0x14dd3e,'limit':_0x48305a[_0x4b2bd3(0x226)]||0x32}),{'verbose':_0x48305a[_0x4b2bd3(0x1b1)]}),_0x28c48=_0x2b9c9c[_0x4b2bd3(0x207)];if(_0x28c48[_0x4b2bd3(0x140)]===0x0){if(_0x1ee80a&&_0x14dd3e)console[_0x4b2bd3(0x9f)](_0x4b2bd3(0x251)+_0x1ee80a+'.'+_0x14dd3e);else _0x1ee80a?console['error'](_0x4b2bd3(0xf1)+_0x1ee80a):(console[_0x4b2bd3(0x9f)]('No\x20workflow\x20sessions\x20found'),console['error'](a56_0x47be42[_0x4b2bd3(0x20a)](_0x4b2bd3(0x210))));return 0x0;}_0x28c48[_0x4b2bd3(0x1ac)]((_0x44d846,_0x282866)=>{const _0x330bb0=_0x4b2bd3,_0x394218=_0x44d846[_0x330bb0(0x1fa)]||'',_0x18e884=_0x282866[_0x330bb0(0x1fa)]||'';return _0x18e884[_0x330bb0(0x16e)](_0x394218);});if(_0x48305a[_0x4b2bd3(0x8c)]||_0x48305a[_0x4b2bd3(0x1c8)])return await handleSDKOutput(_0x28c48,_0x48305a),0x0;let _0x172f85;if(_0x3f2802){const _0x1db600=_0x28c48[0x0];if(!_0x1db600[_0x4b2bd3(0x240)]?.['id'])return console[_0x4b2bd3(0x9f)](_0x4b2bd3(0x110)),0x0;_0x172f85=_0x1db600[_0x4b2bd3(0x240)]['id'],_0x48305a[_0x4b2bd3(0x1b1)]&&console[_0x4b2bd3(0x9f)](_0x4b2bd3(0x15b)+_0x1db600['sessionTime']);}else{const _0x689cc6=_0x28c48[_0x4b2bd3(0x7f)](_0x408ea1=>{const _0x53ad79=_0x4b2bd3,_0x5e78f9=getAttemptStatusDisplay(_0x408ea1[_0x53ad79(0x240)]);return{'title':_0x408ea1[_0x53ad79(0xd4)]?.[_0x53ad79(0x11f)]+'.'+_0x408ea1['workflow']?.[_0x53ad79(0x11f)]+_0x53ad79(0x179)+_0x408ea1['sessionTime']+'\x20'+_0x5e78f9[_0x53ad79(0x1f7)],'value':_0x408ea1['lastAttempt']?.['id']||'','description':_0x5e78f9[_0x53ad79(0xbe)]};}),_0x3e5ce5=await a56_0x23600a({'type':_0x4b2bd3(0x1b7),'name':'attemptId','message':_0x4b2bd3(0x97),'choices':_0x689cc6[_0x4b2bd3(0x103)](_0x4f5119=>_0x4f5119[_0x4b2bd3(0xb9)]!=='')});if(!_0x3e5ce5[_0x4b2bd3(0x138)])return 0x0;_0x172f85=_0x3e5ce5[_0x4b2bd3(0x138)];}const _0x3a4186=_0x48305a['follow'];return _0x3a4186?await this[_0x4b2bd3(0x223)](_0x39c7bf,_0x172f85):await this[_0x4b2bd3(0x100)](_0x39c7bf,_0x172f85,_0x48305a),0x0;}async['renderSingleTimeline'](_0x55cca9,_0x4354c0,_0x1e8008){const _0x51f79a=a56_0x1982d8,{tdx:_0x126428}=_0x55cca9;let _0x32f1b9,_0x548d8c;try{[_0x32f1b9,_0x548d8c]=await Promise[_0x51f79a(0x120)]([_0x126428[_0x51f79a(0x83)][_0x51f79a(0x20f)](_0x4354c0),_0x126428[_0x51f79a(0x83)]['tasks'](_0x4354c0,![])]);}catch(_0x244ee9){console[_0x51f79a(0x9f)](a56_0x47be42[_0x51f79a(0x11a)](_0x51f79a(0x24f)));_0x1e8008[_0x51f79a(0x1b1)]&&console[_0x51f79a(0x9f)](_0x244ee9);throw _0x244ee9;}if(_0x1e8008[_0x51f79a(0x8c)]||_0x1e8008[_0x51f79a(0x1c8)]){const _0x1c975e=this[_0x51f79a(0x183)](_0x32f1b9,_0x548d8c);await handleSDKOutput([_0x1c975e],_0x1e8008);return;}const _0x195bd5=_0x126428[_0x51f79a(0xe7)][_0x51f79a(0x194)],_0x29d831=this['renderTimeline'](_0x32f1b9,_0x548d8c,_0x195bd5);console['log'](_0x29d831);}async[a56_0x1982d8(0x223)](_0x3eb068,_0x1ffa4d){const _0xe9093f=a56_0x1982d8,{tdx:_0x4f8b80}=_0x3eb068,_0x999de4=TIMELINE_CONFIG[_0xe9093f(0xcb)],_0x3ce73c=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x29cf84=0x0;while(_0x29cf84<_0x3ce73c){process['stdout'][_0xe9093f(0x203)]&&process[_0xe9093f(0x1e5)]['write']('\x1Bc');let _0x83ee7e,_0x2523b9;try{[_0x83ee7e,_0x2523b9]=await Promise[_0xe9093f(0x120)]([_0x4f8b80[_0xe9093f(0x83)][_0xe9093f(0x20f)](_0x1ffa4d),_0x4f8b80['workflow']['tasks'](_0x1ffa4d,![])]);}catch(_0x289a9e){console['error'](a56_0x47be42[_0xe9093f(0x11a)](_0xe9093f(0x130)));_0x29cf84>0x0&&console['error'](a56_0x47be42['dim'](_0xe9093f(0x1ea)+_0x29cf84));throw _0x289a9e;}const _0x1a7829=_0x4f8b80[_0xe9093f(0xe7)][_0xe9093f(0x194)],_0xdb5120=this[_0xe9093f(0xba)](_0x83ee7e,_0x2523b9,_0x1a7829);console[_0xe9093f(0xe1)](_0xdb5120);const _0x520c45=_0x83ee7e[_0xe9093f(0x174)]&&_0x2523b9[_0xe9093f(0x8b)](_0x24ec02=>_0x24ec02[_0xe9093f(0x7e)]!=='running'&&_0x24ec02[_0xe9093f(0x7e)]!==_0xe9093f(0xb3));if(_0x520c45){console[_0xe9093f(0x9f)](a56_0x47be42[_0xe9093f(0x21f)](_0xe9093f(0xd5)));break;}console[_0xe9093f(0x9f)](a56_0x47be42[_0xe9093f(0x20a)](_0xe9093f(0xaa)+_0x29cf84*0x2+_0xe9093f(0x21e))),await new Promise(_0x48ab7=>setTimeout(_0x48ab7,_0x999de4)),_0x29cf84++;}_0x29cf84>=_0x3ce73c&&console[_0xe9093f(0x9f)](a56_0x47be42[_0xe9093f(0x205)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a56_0x1982d8(0xba)](_0x57acf4,_0x48e449,_0x1c79c6){const _0x21a876=a56_0x1982d8,_0x50a8d1=[],_0x30a0fd=TIMELINE_CONFIG[_0x21a876(0x244)],_0x1767a8=0x5,_0x57a3cc=process[_0x21a876(0x1e5)][_0x21a876(0xb6)]||0x78,_0xd7b042=_0x57a3cc-_0x30a0fd-_0x1767a8,_0x3b6e5f=Math[_0x21a876(0x1d4)](TIMELINE_CONFIG[_0x21a876(0x219)],Math[_0x21a876(0xcc)](_0xd7b042,TIMELINE_CONFIG[_0x21a876(0x1dc)])),_0x492dfb=new Date(_0x57acf4['createdAt'])[_0x21a876(0x233)](),_0x1ab02b=_0x57acf4[_0x21a876(0x189)]?new Date(_0x57acf4['finishedAt'])[_0x21a876(0x233)]():Date[_0x21a876(0x175)](),_0x270831={'start':_0x492dfb,'end':_0x1ab02b,'duration':_0x1ab02b-_0x492dfb},_0x3266c7=new Map(),_0x58f756=[];for(const _0x23a553 of _0x48e449){if(_0x23a553[_0x21a876(0xd2)]){const _0x48a4d5=new Date(_0x23a553['startedAt'])[_0x21a876(0x233)](),_0x10dbb9=_0x23a553[_0x21a876(0x17e)]?new Date(_0x23a553[_0x21a876(0x17e)])['getTime']():Date['now'](),_0x22f6c5={'start':_0x48a4d5,'end':_0x10dbb9,'duration':_0x10dbb9-_0x48a4d5};_0x3266c7[_0x21a876(0x197)](_0x23a553['id'],_0x22f6c5),_0x58f756[_0x21a876(0x215)]({'name':_0x23a553[_0x21a876(0x21a)],'state':_0x23a553[_0x21a876(0x7e)]||_0x21a876(0x180),'window':_0x22f6c5});}else _0x58f756[_0x21a876(0x215)]({'name':_0x23a553[_0x21a876(0x21a)],'state':_0x23a553[_0x21a876(0x7e)]||'planned','window':undefined});}_0x58f756[_0x21a876(0x1ac)]((_0x508756,_0x5bdf25)=>{const _0x3bbd4e=_0x21a876;if(!_0x508756[_0x3bbd4e(0x126)])return 0x1;if(!_0x5bdf25[_0x3bbd4e(0x126)])return-0x1;return _0x508756[_0x3bbd4e(0x126)]['start']-_0x5bdf25[_0x3bbd4e(0x126)][_0x3bbd4e(0x181)];});const _0x391b68=_0x58f756[_0x21a876(0x140)],_0x187398=_0x391b68>TIMELINE_CONFIG['MAX_TASKS_DISPLAY'];_0x187398&&_0x58f756[_0x21a876(0x1b5)](TIMELINE_CONFIG[_0x21a876(0xe6)]);const _0x26d763=calculateTimeScale(_0x270831,_0x3b6e5f),_0xb44de6=_0x57acf4[_0x21a876(0x174)]?_0x57acf4[_0x21a876(0x193)]?a56_0x47be42[_0x21a876(0x21f)](_0x21a876(0x193)):a56_0x47be42['red'](_0x21a876(0x9f)):a56_0x47be42['blue'](_0x21a876(0xc0)),_0xc38945=_0x57acf4['project']?.['id'],_0x182384=_0x57acf4['sessionId'];let _0x4f1332;if(_0xc38945&&_0x182384){const _0x3d4003=getWorkflowAttemptUrl(_0x1c79c6,_0xc38945,_0x182384,_0x57acf4['id']);_0x4f1332=hyperlink(a56_0x47be42[_0x21a876(0x20a)](_0x57acf4['id']),_0x3d4003);}else _0x4f1332=a56_0x47be42[_0x21a876(0x20a)](_0x57acf4['id']);_0x50a8d1['push'](_0x21a876(0x1ce)+_0x4f1332+'\x20-\x20'+_0xb44de6+_0x21a876(0x179)+formatElapsed(_0x270831['duration']));if(_0x58f756[_0x21a876(0x140)]>0x0){const _0x1f2fd8=renderTimeAxis(_0x26d763,_0x3b6e5f),_0x1377a7=new Date(_0x270831[_0x21a876(0x181)]),_0x33f09b=formatDate(_0x1377a7),_0x364c8d=TIMELINE_CONFIG[_0x21a876(0xdb)]+TIMELINE_CONFIG[_0x21a876(0xfa)]+_0x30a0fd,_0x73a702=_0x33f09b[_0x21a876(0x1c7)](_0x364c8d),_0x19cbc7=a56_0x47be42[_0x21a876(0x20a)](_0x73a702);_0x50a8d1[_0x21a876(0x215)](_0x19cbc7+'\x20'+_0x1f2fd8);for(const _0x29dcc5 of _0x58f756){_0x50a8d1['push'](renderTaskRow(_0x29dcc5,_0x26d763,_0x3b6e5f,_0x30a0fd));}const _0x81bef0=calculateStats(_0x58f756);_0x50a8d1[_0x21a876(0x215)](formatStats(_0x81bef0)),_0x187398&&_0x50a8d1[_0x21a876(0x215)](a56_0x47be42['yellow']('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x21a876(0x1c9)+_0x391b68+_0x21a876(0x17f))),_0x50a8d1[_0x21a876(0x215)](''),_0x50a8d1[_0x21a876(0x215)](a56_0x47be42['dim'](_0x21a876(0xf3))+(_0x21a876(0x133)+_0x57acf4['id']+'\x20logs')+a56_0x47be42['dim'](_0x21a876(0x1ef)));}else _0x50a8d1['push'](_0x21a876(0xdc));return _0x50a8d1[_0x21a876(0x227)]('\x0a');}[a56_0x1982d8(0x183)](_0x1636e8,_0x2d7279){const _0x27d36b=a56_0x1982d8,_0x474bd1=new Date(_0x1636e8[_0x27d36b(0xd9)])[_0x27d36b(0x233)](),_0x25c1f0=_0x1636e8[_0x27d36b(0x189)]?new Date(_0x1636e8['finishedAt'])[_0x27d36b(0x233)]():Date['now'](),_0x4068a6=_0x25c1f0-_0x474bd1,_0x22d4ca=[];for(const _0x5eebd3 of _0x2d7279){if(_0x5eebd3['startedAt']){const _0x1d9565=new Date(_0x5eebd3['startedAt'])[_0x27d36b(0x233)](),_0x3cd0d1=_0x5eebd3[_0x27d36b(0x17e)]?new Date(_0x5eebd3[_0x27d36b(0x17e)])[_0x27d36b(0x233)]():Date[_0x27d36b(0x175)]();_0x22d4ca['push']({'name':_0x5eebd3[_0x27d36b(0x21a)],'state':_0x5eebd3[_0x27d36b(0x7e)]||_0x27d36b(0x180),'window':{'start':_0x1d9565,'end':_0x3cd0d1,'duration':_0x3cd0d1-_0x1d9565}});}else _0x22d4ca[_0x27d36b(0x215)]({'name':_0x5eebd3[_0x27d36b(0x21a)],'state':_0x5eebd3[_0x27d36b(0x7e)]||_0x27d36b(0xb3),'window':undefined});}const _0x14ad60=calculateStats(_0x22d4ca);return{'attempt':{'id':_0x1636e8['id'],'status':_0x1636e8[_0x27d36b(0x174)]?_0x1636e8[_0x27d36b(0x193)]?_0x27d36b(0x193):'error':_0x27d36b(0xc0),'createdAt':_0x1636e8[_0x27d36b(0xd9)],'finishedAt':_0x1636e8['finishedAt'],'duration_ms':_0x4068a6},'tasks':_0x22d4ca[_0x27d36b(0x7f)](_0x350a9d=>({'name':_0x350a9d[_0x27d36b(0x11f)],'state':_0x350a9d[_0x27d36b(0x7e)],'startedAt':_0x350a9d[_0x27d36b(0x126)]?new Date(_0x350a9d[_0x27d36b(0x126)]['start'])[_0x27d36b(0x1d0)]():null,'updatedAt':_0x350a9d['window']?new Date(_0x350a9d[_0x27d36b(0x126)][_0x27d36b(0x147)])[_0x27d36b(0x1d0)]():null,'duration_ms':_0x350a9d[_0x27d36b(0x126)]?.[_0x27d36b(0x191)]||null})),'stats':_0x14ad60};}}function a56_0x568d(){const _0x5b2f58=['\x20\x20Session\x20ID:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','trim','yes','\x20schedule','New\x20project\x20name:\x20','planned','newProjectName','No\x20attempts\x20found\x20in\x20project:\x20','columns','\x27\x20from\x20project\x20\x27','No\x20matching\x20sessions\x20found','value','renderTimeline','Dry\x20run:\x20yes','fill','📁\x20','text','stringify','running','Error:\x20Secret\x20key\x20is\x20required','fs/promises','Parameters:\x20','\x20next:\x20','\x20is\x20not\x20a\x20directory','sessions','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','-\x20no\x20files\x20written','Enabling\x20schedule\x20#','disabledAt','POLL_INTERVAL_MS','min','🔄\x20','Deleting\x20project\x20','workflow:attempts','Task\x20graph:','workflowName','startedAt','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','project','\x0a✔\x20Attempt\x20complete','diff','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Workflow:','createdAt','navigateSessionsInteractive','ICON_WIDTH','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','round','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','cancelRequested','Resume\x20from:\x20','log','No\x20sessions\x20found','workflow:schedule:enable','replace','\x0aDry\x20run\x20-\x20nothing\x20pushed','MAX_TASKS_DISPLAY','context','param','Target:\x20','Loading\x20session...','Attempt\x20ID:\x20','No\x20sessions\x20with\x20timing\x20information','📋\x20','msPerChar','key','getWorkflow','No\x20sessions\x20found\x20in\x20project:\x20','Params:\x20','💡\x20Tip:\x20Use\x20','Listing\x20workflow\x20sessions...','getMinutes','Fetching\x20workflow\x20','task','\x1b[1A\x1b[2K','Pushing\x20project...','ICON_SPACING','Revision:\x20','dryRun','new','getMonth','enableSchedule','renderSingleTimeline','table','Target\x20directory:\x20','filter','resolveProjectId','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','existingProjectId','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','substring','group_error','\x0aPush\x20these\x20changes?','includes','nextTime','Schedule\x20ID\x20is\x20required','floor','\x0aClone\x20\x22','Latest\x20session\x20has\x20no\x20attempt','isArray','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','Tip:\x20cd\x20to\x20workflows/','Expected\x20format:\x20--param\x20key=value','canceling','Parameters:','applyPullProject','status','\x20secrets...','red','593439btANJd','relative','listSchedules','has','name','all','Force:\x20yes','From\x20task:\x20','logFiles','bold','Usage:\x20workflow:delete\x20<project-name-or-id>','window','list','1199014sBPEhw','targetDir','blue','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','\x20attempt','Retrying\x20session...','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','follow','tdx\x20wf\x20attempt\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Source:\x20','attemptId','Select\x20a\x20workflow\x20to\x20run','✔\x20Workflow\x20project\x20set\x20to:\x20','nextRunTime','Project\x20directory:\x20','List\x20workflows','Validation:\x20skipped','→\x20Project:\x20','length','slice','fileSize','deleteSecret','parseProjectWorkflowPattern','setSecrets','startsWith','end',',\x20Workflow:\x20','Pattern:\x20','\x20session','description','workflow:retry','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','getSchedule','-\x20nothing\x20pushed','Error:','workflow:secrets:list','---\x20','No\x20workflow\x20projects\x20found','deleted','\x20secret','getHours','Source\x20directory\x20is\x20required','Including\x20subtasks:\x20yes','Listing\x20workflows...','Task\x20name:\x20','Auto-selected\x20latest\x20session:\x20','Error:\x20Invalid\x20parameter\x20format:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','(unknown)','disableSchedule','changes','\x20modified','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','Project\x20name\x20is\x20required','format','Downloading\x20logs...','showWorkflowConsoleUrl','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','workflow:schedules','indexOf','✔\x20Schedule\x20found','cyan','List\x20all\x20workflow\x20projects','Source\x20project:\x20','localeCompare','workflow:use','Getting\x20attempt\x20details...','projectName','Analyzing\x20project...','\x20\x20Console:\x20','done','now','Filter:\x20project=','find','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','\x20-\x20','\x0a✔\x20Already\x20up\x20to\x20date','Deleting\x20secret...','Setting\x20','\x20deleted','updatedAt','\x20tasks','unknown','start','Total:\x20','buildTimelineData','Retrying\x20attempt...','workflow:sessions','durationMs','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','\x20\x20Session\x20context\x20set\x20to:\x20','finishedAt','✔\x20Project:\x20','getDate','rows','✔\x20Project\x20updated','workflows','Fetching\x20schedule\x20#','preparePushProject','duration','unchanged','success','site','7hqCNFy','parse','set','executePushProject','List\x20workflow\x20execution\x20sessions','\x20disabled\x20(','split','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x0aUpdate\x20existing\x20project\x20\x22','Files\x20to\x20upload:\x20','2786365FYBKYJ','size','✔\x20Found\x20','summary','Killing\x20attempt...','session_id','✔\x20Showing\x20','✔\x20Pull\x20complete','params','index','get','type','retryAttemptName','sort','targetExists','startTime','write','generateSessionTimelineRows','verbose','/sessions/','hasChanges','path','splice','MAX_LABEL_COUNT','select','List\x20workflow\x20schedules','✔\x20Clone\x20complete','Project:\x20','workflow:secrets:delete','tdx.json','\x0aApply\x20these\x20changes?','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Workflow:\x20','\x20(system)','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','skipValidation','Show\x20logs\x20for\x20a\x20workflow\x20attempt','fromTask','Resolving\x20project\x20\x27','padStart','jsonl','\x20of\x20','keys','isNewProject','clear','cwd','Attempt:\x20','utf-8','toISOString','\x20(use\x20--limit\x20to\x20show\x20more)','trimEnd','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','max','\x20\x20Attempt\x20ID:\x20','Retry\x20a\x20session\x20or\x20attempt','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','projects','/attempt/','MAX_TIMELINE_WIDTH','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20log\x20content\x20found','sessionId','Show\x20tasks\x20for\x20an\x20attempt','prepareCloneProject','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Pushing\x20workflow\x20project...','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','stdout','Session\x20time:\x20','...','readFile','List\x20workflow\x20attempts','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','force','resolveProjectDir','modified','from','\x20to\x20see\x20detailed\x20logs','Source\x20directory:\x20','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','workflow:push','renderSessionsTimeline','metadata','basename','\x0a✔\x20No\x20changes\x20to\x20push','icon','\x20\x20Project:\x20','listSecrets','sessionTime','Listing\x20workflow\x20projects...','white','\x20\x20New\x20attempt\x20ID:\x20','Starting\x20workflow\x20run...','Filter:\x20','No\x20workflows\x20found','950356oCeFmf','includeRetried','isTTY','\x20\x20Changes:\x20','yellow','requireProject','data','message','taskName','dim','kill','filesExtracted','Warning:','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','attempt','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','\x20task','✔\x20Workflow\x20run\x20started','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','push','projectId','✔\x20Retry\x20started','No\x20attempts\x20found\x20for:\x20','MIN_TIMELINE_WIDTH','fullName','\x22\x20with\x20new\x20revision?','Error:\x20Attempt\x20ID\x20is\x20required','workflow:logs','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','green','displayLine','retryAttempt','2415484kmUQAc','pollTimeline','6793986lpagtY','Output\x20directory:\x20','limit','join','Key\x20cannot\x20be\x20empty','Show\x20specific\x20attempt\x20details','.\x20Expected\x20format:\x20KEY=VALUE','\x20has\x20no\x20attempts','revision','workflow:workflows','✔\x20Downloaded\x20','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20\x20Files\x20extracted:\x20','8358032krtFph','/app/workflows/','getTime','✔\x20Schedule\x20#','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','title','pullProject','output','workflow:projects','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','delete','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Getting\x20attempt\x20tasks...','session','sourceDir','lastAttempt','\x20\x20Revision:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','TASK_NAME_WIDTH','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20new','workflowProject','GUTTER','\x0aError:','Disabling\x20schedule\x20#','stat','MIN_LABEL_COUNT','\x20\x20Location:\x20','execute','Failed\x20to\x20fetch\x20attempt\x20data','listProjectSchedules','No\x20sessions\x20found\x20for:\x20','skipSchedule','✔\x20Push\x20complete','state','map','Cancelled','Status:\x20','\x20workflow','workflow','Session\x20not\x20found:\x20','resolve','workflow:clone','Updating\x20','workflow:upload','fileCount','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','every','json','getFullYear','\x0a⚠\x20Project\x20\x22','✔\x20Secret\x20\x27','\x20unchanged','match','\x20(disabled)','total','Pulling\x20project\x20','workflow:run','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Select\x20a\x20session\x20to\x20view\x20timeline:','executeDryRun','toLocaleString','resolveProject','\x20\x20Project\x20ID:\x20','Project\x20filter:\x20','Fetching\x20log\x20files...','✔\x20Workflow\x20project\x20context\x20cleared.','error','pending','repeat','\x20from\x20session\x20','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','isDirectory','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','sourceProjectName','Listing\x20schedules...','some','Error:\x20Project\x20name\x20is\x20required','\x0aPolling...\x20(','Reason:\x20','config'];a56_0x568d=function(){return _0x5b2f58;};return a56_0x568d();}function formatScheduleLine(_0x379ac8){const _0x39a281=a56_0x1982d8,_0x5257fc=_0x379ac8[_0x39a281(0xca)]?a56_0x47be42[_0x39a281(0x205)](_0x39a281(0x92)):'',_0x4f13a4=_0x379ac8[_0x39a281(0xd4)]?.[_0x39a281(0x11f)]?a56_0x47be42['dim']('\x20['+_0x379ac8[_0x39a281(0xd4)][_0x39a281(0x11f)]+']'):'',_0x35f45e=_0x379ac8[_0x39a281(0x13b)]?a56_0x47be42[_0x39a281(0x20a)](_0x39a281(0xc4)+new Date(_0x379ac8[_0x39a281(0x13b)])['toLocaleString']()):'';return'📅\x20#'+_0x379ac8['id']+'\x20'+(_0x379ac8['workflow']?.[_0x39a281(0x11f)]||_0x39a281(0x15e))+_0x4f13a4+_0x5257fc+_0x35f45e;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0x168);['description']=a56_0x1982d8(0x1b8);async[a56_0x1982d8(0x24e)](_0x212400){const _0x46bd5d=a56_0x1982d8,{options:_0x44ed26,args:_0x3361d6,tdx:_0x1205a6}=_0x212400,{scheduleId:_0x2eda74}=_0x44ed26;if(_0x2eda74&&_0x3361d6[0x0])return console[_0x46bd5d(0x9f)](a56_0x47be42['red'](_0x46bd5d(0x150)),_0x46bd5d(0xde)),console[_0x46bd5d(0x9f)](a56_0x47be42[_0x46bd5d(0x20a)](_0x46bd5d(0x20e))),0x1;if(_0x2eda74){const _0x1593a8=await withSpinner(_0x46bd5d(0x18f)+_0x2eda74+_0x46bd5d(0x1e7),()=>_0x1205a6[_0x46bd5d(0x83)][_0x46bd5d(0x14e)](_0x2eda74),{'verbose':_0x44ed26[_0x46bd5d(0x1b1)]}),_0x141c1a=_0x1593a8['data'];return isStructuredFormat(_0x44ed26)?await handleSingleObjectOutput(_0x141c1a,_0x44ed26):(console[_0x46bd5d(0x9f)](_0x46bd5d(0x16a)),console['log'](formatScheduleLine(_0x141c1a))),0x0;}const _0x5aab6b=this[_0x46bd5d(0x144)](_0x3361d6,_0x44ed26);if(!_0x5aab6b)return 0x1;const {projectName:_0x7507db,workflowName:_0x49f962}=_0x5aab6b,_0x5d7c7c=_0x7507db?'\x27'+_0x7507db+(_0x49f962?'.'+_0x49f962:'')+'\x27':undefined,_0x2e0440=await withSpinner(_0x5d7c7c?'Listing\x20schedules\x20for\x20'+_0x5d7c7c+'...':_0x46bd5d(0xa7),()=>_0x7507db?_0x1205a6[_0x46bd5d(0x83)][_0x46bd5d(0x250)](_0x7507db,{'workflow':_0x49f962,'limit':_0x44ed26[_0x46bd5d(0x226)]}):_0x1205a6['workflow'][_0x46bd5d(0x11d)]({'limit':_0x44ed26[_0x46bd5d(0x226)]}),{'verbose':_0x44ed26[_0x46bd5d(0x1b1)]}),_0x1f7889=_0x2e0440[_0x46bd5d(0x207)],_0x2ac8b8=_0x44ed26[_0x46bd5d(0x226)]&&_0x1f7889[_0x46bd5d(0x140)]>=_0x44ed26[_0x46bd5d(0x226)]?a56_0x47be42[_0x46bd5d(0x20a)](_0x46bd5d(0x162)):'';console[_0x46bd5d(0x9f)](_0x46bd5d(0x1a1)+_0x1f7889['length']+_0x46bd5d(0xb1)+(_0x1f7889[_0x46bd5d(0x140)]!==0x1?'s':'')+_0x2ac8b8);if(isStructuredFormat(_0x44ed26))await handleSDKOutput(_0x1f7889,_0x44ed26);else{if(_0x1f7889['length']===0x0)console[_0x46bd5d(0xe1)]('No\x20schedules\x20found');else for(const _0x2434bf of _0x1f7889){console[_0x46bd5d(0xe1)](formatScheduleLine(_0x2434bf));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a56_0x1982d8(0x11f)]=a56_0x1982d8(0xe3);['description']='Enable\x20a\x20workflow\x20schedule';async[a56_0x1982d8(0x24e)](_0xbf5b47){const _0x3b010b=a56_0x1982d8,{options:_0x1e960c,args:_0x2fa4d2,tdx:_0x526cf8}=_0xbf5b47,_0x1ada43=_0x2fa4d2[0x0];if(!_0x1ada43)return console[_0x3b010b(0x9f)](a56_0x47be42[_0x3b010b(0x11a)]('Error:'),_0x3b010b(0x10d)),console[_0x3b010b(0x9f)](a56_0x47be42[_0x3b010b(0x20a)]('Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>')),console['error'](a56_0x47be42[_0x3b010b(0x20a)]('Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs')),0x1;const {backfill:_0xa09f66,nextTime:_0x2fed2d}=_0x1e960c,_0xf2e15f={};if(_0xa09f66!==undefined)_0xf2e15f[_0x3b010b(0x252)]=!_0xa09f66;if(_0x2fed2d!==undefined)_0xf2e15f[_0x3b010b(0x10c)]=_0x2fed2d;const _0xa76436=await withSpinner(_0x3b010b(0xc9)+_0x1ada43+'...',()=>_0x526cf8[_0x3b010b(0x83)][_0x3b010b(0xff)](_0x1ada43,_0xf2e15f),{'verbose':_0x1e960c['verbose']}),_0x301a75=_0xa76436['data'];return isStructuredFormat(_0x1e960c)?await handleSingleObjectOutput(_0x301a75,_0x1e960c):(console[_0x3b010b(0xe1)](_0x3b010b(0x234)+_0x1ada43+'\x20enabled\x20('+(_0x301a75['workflow']?.[_0x3b010b(0x11f)]||_0x3b010b(0x180))+')'),_0x301a75[_0x3b010b(0x13b)]&&console[_0x3b010b(0xe1)](a56_0x47be42[_0x3b010b(0x20a)]('\x20\x20Next\x20run:\x20'+new Date(_0x301a75[_0x3b010b(0x13b)])[_0x3b010b(0x99)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']='workflow:schedule:disable';['description']='Disable\x20a\x20workflow\x20schedule';async[a56_0x1982d8(0x24e)](_0x43bccf){const _0x1b4eb3=a56_0x1982d8,{options:_0x5a17dd,args:_0x4d24fd,tdx:_0x1f7302}=_0x43bccf,_0x51975e=_0x4d24fd[0x0];if(!_0x51975e)return console[_0x1b4eb3(0x9f)](a56_0x47be42[_0x1b4eb3(0x11a)]('Error:'),_0x1b4eb3(0x10d)),console[_0x1b4eb3(0x9f)](a56_0x47be42['dim']('Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>')),console['error'](a56_0x47be42[_0x1b4eb3(0x20a)](_0x1b4eb3(0x135))),0x1;const _0x5b6a7d=await withSpinner(_0x1b4eb3(0x24a)+_0x51975e+_0x1b4eb3(0x1e7),()=>_0x1f7302['workflow'][_0x1b4eb3(0x15f)](_0x51975e),{'verbose':_0x5a17dd[_0x1b4eb3(0x1b1)]}),_0x24551c=_0x5b6a7d[_0x1b4eb3(0x207)];return isStructuredFormat(_0x5a17dd)?await handleSingleObjectOutput(_0x24551c,_0x5a17dd):console[_0x1b4eb3(0xe1)](_0x1b4eb3(0x234)+_0x51975e+_0x1b4eb3(0x19a)+(_0x24551c['workflow']?.[_0x1b4eb3(0x11f)]||_0x1b4eb3(0x180))+')'),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2cceae,_0x49150d){const _0x4c503a=a57_0x3045,_0x5338a2=_0x2cceae();while(!![]){try{const _0x102ebf=-parseInt(_0x4c503a(0x1c5))/0x1*(-parseInt(_0x4c503a(0x1bf))/0x2)+parseInt(_0x4c503a(0x1be))/0x3+-parseInt(_0x4c503a(0x1c3))/0x4*(parseInt(_0x4c503a(0x1b9))/0x5)+parseInt(_0x4c503a(0x1b8))/0x6+parseInt(_0x4c503a(0x1c4))/0x7+-parseInt(_0x4c503a(0x1bd))/0x8*(parseInt(_0x4c503a(0x1b7))/0x9)+-parseInt(_0x4c503a(0x1c2))/0xa;if(_0x102ebf===_0x49150d)break;else _0x5338a2['push'](_0x5338a2['shift']());}catch(_0x572685){_0x5338a2['push'](_0x5338a2['shift']());}}}(a57_0x52c7,0xdf88c));import{platform}from'os';function a57_0x52c7(){const _0x579969=['TD1\x20','4991830NXDiQc','4rUpTuu','12619600tmWZMw','1McJaOU','X-Trino-User','version','477bdXlLx','6241662cHBbQs','6130585tgndeP','tdx','length','Authorization','264568XxtVWx','2738487gOwIJn','1275506WgPglH','Bearer\x20'];a57_0x52c7=function(){return _0x579969;};return a57_0x52c7();}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x5dd1a9=a57_0x3045,_0x145a1d=getVersion(),_0x2959e3=platform(),_0x5a1179=process[_0x5dd1a9(0x1b6)]['replace']('v','');return'tdx/'+_0x145a1d+'\x20('+_0x2959e3+';\x20node/'+_0x5a1179+')';}function a57_0x3045(_0x595160,_0x4e18d5){_0x595160=_0x595160-0x1b6;const _0x52c7f9=a57_0x52c7();let _0x30452d=_0x52c7f9[_0x595160];return _0x30452d;}export function getAuthHeaders(_0x4b38e6,_0x180a67,_0x13543b){const _0x333b56=a57_0x3045,_0x123e25=getVersion(),_0x1fdd7a={'User-Agent':getUserAgent(),'X-TD-Client':_0x333b56(0x1ba),'X-TD-Client-Version':_0x123e25};if(_0x13543b)_0x1fdd7a[_0x333b56(0x1bc)]=_0x333b56(0x1c0)+_0x13543b;else _0x180a67&&(_0x1fdd7a[_0x333b56(0x1bc)]=_0x333b56(0x1c1)+_0x180a67);return _0x1fdd7a;}export function toHeaderRecord(_0x1a3fcf){const _0x31e249={};for(const [_0x56e4ec,_0x59d69a]of Object['entries'](_0x1a3fcf)){_0x59d69a!==undefined&&(_0x31e249[_0x56e4ec]=_0x59d69a);}return _0x31e249;}export function getTrinoHeaders(_0x14b721,_0x1f3792,_0x31bee4){const _0x1c0bab=a57_0x3045,_0x13fbc0=getAuthHeaders(_0x14b721),_0x2dc17c=toHeaderRecord(_0x13fbc0);if(_0x31bee4)_0x2dc17c['Authorization']='Bearer\x20'+_0x31bee4;else _0x1f3792&&(_0x2dc17c[_0x1c0bab(0x1c6)]=_0x1f3792);return _0x2dc17c;}export function hasAPIKey(_0x163ba5){const _0x467686=a57_0x3045,_0x1618fd=getAPIKey();return _0x1618fd!==undefined&&_0x1618fd[_0x467686(0x1bb)]>0x0;}
1
+ (function(_0x49d0bf,_0x4a2a26){const _0x52507a=a57_0x1a72,_0x146a0b=_0x49d0bf();while(!![]){try{const _0x9a6315=-parseInt(_0x52507a(0xb3))/0x1*(parseInt(_0x52507a(0xa5))/0x2)+-parseInt(_0x52507a(0xa1))/0x3*(parseInt(_0x52507a(0xb0))/0x4)+parseInt(_0x52507a(0xa9))/0x5*(-parseInt(_0x52507a(0xad))/0x6)+parseInt(_0x52507a(0xa8))/0x7+-parseInt(_0x52507a(0xac))/0x8*(-parseInt(_0x52507a(0xa4))/0x9)+-parseInt(_0x52507a(0xa3))/0xa+parseInt(_0x52507a(0xa0))/0xb;if(_0x9a6315===_0x4a2a26)break;else _0x146a0b['push'](_0x146a0b['shift']());}catch(_0x3858ad){_0x146a0b['push'](_0x146a0b['shift']());}}}(a57_0x2255,0xda9d7));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x22e27b=a57_0x1a72,_0x5edfea=getVersion(),_0x5edb53=platform(),_0x2985c4=process[_0x22e27b(0xb1)]['replace']('v','');return _0x22e27b(0xb2)+_0x5edfea+'\x20('+_0x5edb53+_0x22e27b(0xab)+_0x2985c4+')';}export function getAuthHeaders(_0x55c26e,_0x425c80,_0x1630b0){const _0x1d040f=a57_0x1a72,_0x4b9de3=getVersion(),_0x5686cc={'User-Agent':getUserAgent(),'X-TD-Client':_0x1d040f(0xa6),'X-TD-Client-Version':_0x4b9de3};if(_0x1630b0)_0x5686cc[_0x1d040f(0xa7)]=_0x1d040f(0xa2)+_0x1630b0;else _0x425c80&&(_0x5686cc[_0x1d040f(0xa7)]=_0x1d040f(0x9f)+_0x425c80);return _0x5686cc;}export function toHeaderRecord(_0x525f7c){const _0x161154=a57_0x1a72,_0x4c4118={};for(const [_0x44e606,_0x45c0dd]of Object[_0x161154(0xae)](_0x525f7c)){_0x45c0dd!==undefined&&(_0x4c4118[_0x44e606]=_0x45c0dd);}return _0x4c4118;}function a57_0x2255(){const _0x1db6cb=['entries','X-Trino-User','42844isTmoW','version','tdx/','81LuBDVn','TD1\x20','21406748gbWOHb','6XBgjYD','Bearer\x20','17853280sjHZnf','153549LAzqAB','23356elBdGl','tdx','Authorization','5808453OBOpJZ','849455EXBBaO','length',';\x20node/','648cSNlqm','18EewfSs'];a57_0x2255=function(){return _0x1db6cb;};return a57_0x2255();}function a57_0x1a72(_0x2cd2ca,_0x1bfa53){_0x2cd2ca=_0x2cd2ca-0x9f;const _0x225535=a57_0x2255();let _0x1a72f4=_0x225535[_0x2cd2ca];return _0x1a72f4;}export function getTrinoHeaders(_0x1fb9fb,_0x145ef5,_0x98b721){const _0x386b05=a57_0x1a72,_0x450ab5=getAuthHeaders(_0x1fb9fb),_0x5d9d89=toHeaderRecord(_0x450ab5);if(_0x98b721)_0x5d9d89[_0x386b05(0xa7)]=_0x386b05(0xa2)+_0x98b721;else _0x145ef5&&(_0x5d9d89[_0x386b05(0xaf)]=_0x145ef5);return _0x5d9d89;}export function hasAPIKey(_0xd32e12){const _0x28e556=a57_0x1a72,_0x24a150=getAPIKey();return _0x24a150!==undefined&&_0x24a150[_0x28e556(0xaa)]>0x0;}