@treasuredata/tdx 2026.8.3 → 2026.8.5

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 (301) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.d.ts.map +1 -1
  14. package/dist/commands/cas-segment-command.js +1 -1
  15. package/dist/commands/cas-segment-command.js.map +1 -1
  16. package/dist/commands/chat-command.js +1 -1
  17. package/dist/commands/claude-command.js +1 -1
  18. package/dist/commands/claude-statusline-command.js +1 -1
  19. package/dist/commands/claude-usage-command.js +1 -1
  20. package/dist/commands/command.js +1 -1
  21. package/dist/commands/connection-command.js +1 -1
  22. package/dist/commands/databases.js +1 -1
  23. package/dist/commands/delivery-command.js +1 -1
  24. package/dist/commands/describe.js +1 -1
  25. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  26. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  27. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  28. package/dist/commands/engage-campaign-pull-command.js +1 -1
  29. package/dist/commands/engage-campaign-push-command.js +1 -1
  30. package/dist/commands/engage-campaign-validate-command.js +1 -1
  31. package/dist/commands/engage-command.js +1 -1
  32. package/dist/commands/engage-template-pull-command.js +1 -1
  33. package/dist/commands/engage-template-push-command.js +1 -1
  34. package/dist/commands/engage-template-validate-command.js +1 -1
  35. package/dist/commands/job-command.js +1 -1
  36. package/dist/commands/journey-command.js +1 -1
  37. package/dist/commands/journey-validate-command.js +1 -1
  38. package/dist/commands/llm-command.js +1 -1
  39. package/dist/commands/mcp-command.js +1 -1
  40. package/dist/commands/p13n-command.d.ts +11 -0
  41. package/dist/commands/p13n-command.d.ts.map +1 -0
  42. package/dist/commands/p13n-command.js +1 -0
  43. package/dist/commands/p13n-command.js.map +1 -0
  44. package/dist/commands/parent-segment-command.js +1 -1
  45. package/dist/commands/policy-command.js +1 -1
  46. package/dist/commands/profile-command.js +1 -1
  47. package/dist/commands/profiles-command.js +1 -1
  48. package/dist/commands/query-command.js +1 -1
  49. package/dist/commands/schedule-command.js +1 -1
  50. package/dist/commands/segment-command.js +1 -1
  51. package/dist/commands/segment-create-command.js +1 -1
  52. package/dist/commands/segment-fields-command.js +1 -1
  53. package/dist/commands/segment-move-command.js +1 -1
  54. package/dist/commands/segment-pull-command.js +1 -1
  55. package/dist/commands/segment-push-command.js +1 -1
  56. package/dist/commands/segment-update-command.js +1 -1
  57. package/dist/commands/segment-use-command.js +1 -1
  58. package/dist/commands/segment-validate-command.js +1 -1
  59. package/dist/commands/segments.js +1 -1
  60. package/dist/commands/show.js +1 -1
  61. package/dist/commands/status-command.js +1 -1
  62. package/dist/commands/table-deleted.js +1 -1
  63. package/dist/commands/tables.js +1 -1
  64. package/dist/commands/unset-command.js +1 -1
  65. package/dist/commands/upgrade-command.js +1 -1
  66. package/dist/commands/use-command.js +1 -1
  67. package/dist/commands/user-command.js +1 -1
  68. package/dist/commands/work-command.js +1 -1
  69. package/dist/commands/workflow-command.js +1 -1
  70. package/dist/core/auth.js +1 -1
  71. package/dist/core/command-output.js +1 -1
  72. package/dist/core/config.js +1 -1
  73. package/dist/core/connection-cache.js +1 -1
  74. package/dist/core/constants.js +1 -1
  75. package/dist/core/credential-cache.js +1 -1
  76. package/dist/core/global-context.d.ts.map +1 -1
  77. package/dist/core/global-context.js +1 -1
  78. package/dist/core/global-context.js.map +1 -1
  79. package/dist/core/keychain.js +1 -1
  80. package/dist/core/oauth-keychain.js +1 -1
  81. package/dist/core/oauth.d.ts +9 -1
  82. package/dist/core/oauth.d.ts.map +1 -1
  83. package/dist/core/oauth.js +1 -1
  84. package/dist/core/oauth.js.map +1 -1
  85. package/dist/core/profile.js +1 -1
  86. package/dist/core/project-config.js +1 -1
  87. package/dist/core/session.js +1 -1
  88. package/dist/core/site-mismatch.js +1 -1
  89. package/dist/core/user-cache.js +1 -1
  90. package/dist/core/version.js +1 -1
  91. package/dist/index.js +1 -1
  92. package/dist/mcp/server.js +1 -1
  93. package/dist/mcp/tools/index.js +1 -1
  94. package/dist/mcp/tools/tdx-run.js +1 -1
  95. package/dist/mcp/tools/tdx-search.js +1 -1
  96. package/dist/mcp/tools/work-create-item.js +1 -1
  97. package/dist/mcp/utils.js +1 -1
  98. package/dist/proxy/claude-usage-tracker.js +1 -1
  99. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  100. package/dist/proxy/passthrough-server.js +1 -1
  101. package/dist/proxy/passthrough-server.js.map +1 -1
  102. package/dist/proxy/sse-usage-parser.js +1 -1
  103. package/dist/sdk/agent/agent-config.js +1 -1
  104. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  105. package/dist/sdk/agent/agent-yaml.js +1 -1
  106. package/dist/sdk/agent/test/evaluator.js +1 -1
  107. package/dist/sdk/agent/test/executor.js +1 -1
  108. package/dist/sdk/agent/test/index.js +1 -1
  109. package/dist/sdk/agent/test/output.js +1 -1
  110. package/dist/sdk/agent/test/parser.js +1 -1
  111. package/dist/sdk/agent/tool-target-registry.js +1 -1
  112. package/dist/sdk/api.js +1 -1
  113. package/dist/sdk/auth-token.d.ts +42 -6
  114. package/dist/sdk/auth-token.d.ts.map +1 -1
  115. package/dist/sdk/auth-token.js +1 -1
  116. package/dist/sdk/auth-token.js.map +1 -1
  117. package/dist/sdk/cas/cas-api-client.js +1 -1
  118. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  119. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  120. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  121. package/dist/sdk/cas/cas-segment-schema.d.ts +63 -0
  122. package/dist/sdk/cas/cas-segment-schema.d.ts.map +1 -0
  123. package/dist/sdk/cas/cas-segment-schema.js +1 -0
  124. package/dist/sdk/cas/cas-segment-schema.js.map +1 -0
  125. package/dist/sdk/cas/cas-segment-validator.d.ts +76 -0
  126. package/dist/sdk/cas/cas-segment-validator.d.ts.map +1 -0
  127. package/dist/sdk/cas/cas-segment-validator.js +1 -0
  128. package/dist/sdk/cas/cas-segment-validator.js.map +1 -0
  129. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  130. package/dist/sdk/cas/index.js +1 -1
  131. package/dist/sdk/cas/pull-workflow.js +1 -1
  132. package/dist/sdk/cas/push-workflow.js +1 -1
  133. package/dist/sdk/cas/validate-files.d.ts +23 -6
  134. package/dist/sdk/cas/validate-files.d.ts.map +1 -1
  135. package/dist/sdk/cas/validate-files.js +1 -1
  136. package/dist/sdk/cas/validate-files.js.map +1 -1
  137. package/dist/sdk/client/cdp-api-client.js +1 -1
  138. package/dist/sdk/client/delivery-api-client.js +1 -1
  139. package/dist/sdk/client/endpoints.d.ts +6 -0
  140. package/dist/sdk/client/endpoints.d.ts.map +1 -1
  141. package/dist/sdk/client/endpoints.js +1 -1
  142. package/dist/sdk/client/endpoints.js.map +1 -1
  143. package/dist/sdk/client/engage-api-client.js +1 -1
  144. package/dist/sdk/client/http-client.js +1 -1
  145. package/dist/sdk/client/llm-api-client.js +1 -1
  146. package/dist/sdk/client/oauth-refresh.d.ts +11 -2
  147. package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
  148. package/dist/sdk/client/oauth-refresh.js +1 -1
  149. package/dist/sdk/client/oauth-refresh.js.map +1 -1
  150. package/dist/sdk/client/p13n-studio-api-client.d.ts +19 -0
  151. package/dist/sdk/client/p13n-studio-api-client.d.ts.map +1 -0
  152. package/dist/sdk/client/p13n-studio-api-client.js +1 -0
  153. package/dist/sdk/client/p13n-studio-api-client.js.map +1 -0
  154. package/dist/sdk/client/rate-limiter.js +1 -1
  155. package/dist/sdk/client/td-api-client.js +1 -1
  156. package/dist/sdk/client/trino-api-client.js +1 -1
  157. package/dist/sdk/client/workflow-client.js +1 -1
  158. package/dist/sdk/connection-validator.js +1 -1
  159. package/dist/sdk/connection.js +1 -1
  160. package/dist/sdk/delivery.js +1 -1
  161. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  162. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  163. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  164. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  165. package/dist/sdk/engage/campaign-pull.js +1 -1
  166. package/dist/sdk/engage/campaign-push.js +1 -1
  167. package/dist/sdk/engage/campaign-validator.js +1 -1
  168. package/dist/sdk/engage/campaign-yaml.js +1 -1
  169. package/dist/sdk/engage/template-pull.js +1 -1
  170. package/dist/sdk/engage/template-push.js +1 -1
  171. package/dist/sdk/engage/template-validator.js +1 -1
  172. package/dist/sdk/engage/template-yaml.js +1 -1
  173. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  174. package/dist/sdk/engage/types/campaign-def.js +1 -1
  175. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  176. package/dist/sdk/engage/types/template-schema.js +1 -1
  177. package/dist/sdk/engage.js +1 -1
  178. package/dist/sdk/errors.js +1 -1
  179. package/dist/sdk/index.d.ts +6 -0
  180. package/dist/sdk/index.d.ts.map +1 -1
  181. package/dist/sdk/index.js +1 -1
  182. package/dist/sdk/index.js.map +1 -1
  183. package/dist/sdk/io/index.js +1 -1
  184. package/dist/sdk/io/node-filesystem.js +1 -1
  185. package/dist/sdk/job.js +1 -1
  186. package/dist/sdk/journey.js +1 -1
  187. package/dist/sdk/llm/chat-cache.js +1 -1
  188. package/dist/sdk/llm/index.js +1 -1
  189. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  190. package/dist/sdk/llm/model-factors.js +1 -1
  191. package/dist/sdk/llm/user-settings.js +1 -1
  192. package/dist/sdk/p13n-studio.d.ts +13 -0
  193. package/dist/sdk/p13n-studio.d.ts.map +1 -0
  194. package/dist/sdk/p13n-studio.js +1 -0
  195. package/dist/sdk/p13n-studio.js.map +1 -0
  196. package/dist/sdk/personalization.js +1 -1
  197. package/dist/sdk/policy.js +1 -1
  198. package/dist/sdk/query/deleted-table-validation.js +1 -1
  199. package/dist/sdk/query/index.js +1 -1
  200. package/dist/sdk/query/sql-parser.js +1 -1
  201. package/dist/sdk/realtime.js +1 -1
  202. package/dist/sdk/schedule.js +1 -1
  203. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  204. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  205. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  206. package/dist/sdk/segment/fields-display.js +1 -1
  207. package/dist/sdk/segment/file-discovery.js +1 -1
  208. package/dist/sdk/segment/journey-utils.js +1 -1
  209. package/dist/sdk/segment/journey-validator.js +1 -1
  210. package/dist/sdk/segment/journey-yaml.js +1 -1
  211. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  212. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  213. package/dist/sdk/segment/pull-workflow.js +1 -1
  214. package/dist/sdk/segment/push-recovery.js +1 -1
  215. package/dist/sdk/segment/push-workflow.js +1 -1
  216. package/dist/sdk/segment/resolution-context.js +1 -1
  217. package/dist/sdk/segment/segment-path-parser.js +1 -1
  218. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  219. package/dist/sdk/segment/segment-validator.js +1 -1
  220. package/dist/sdk/segment/target-resolution.js +1 -1
  221. package/dist/sdk/segment/tdx-config.js +1 -1
  222. package/dist/sdk/segment/types/activation-schema.js +1 -1
  223. package/dist/sdk/segment/types/journey-def.js +1 -1
  224. package/dist/sdk/segment/types/journey-schema.js +1 -1
  225. package/dist/sdk/segment/types/segment-def.js +1 -1
  226. package/dist/sdk/segment/types/segment-schema.d.ts.map +1 -1
  227. package/dist/sdk/segment/types/segment-schema.js +1 -1
  228. package/dist/sdk/segment/types/segment-schema.js.map +1 -1
  229. package/dist/sdk/segment/validate-files.js +1 -1
  230. package/dist/sdk/segment/yaml-validator.d.ts +1 -1
  231. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  232. package/dist/sdk/segment/yaml-validator.js +1 -1
  233. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  234. package/dist/sdk/segment.js +1 -1
  235. package/dist/sdk/types/index.d.ts +2 -1
  236. package/dist/sdk/types/index.d.ts.map +1 -1
  237. package/dist/sdk/types/index.js +1 -1
  238. package/dist/sdk/types/index.js.map +1 -1
  239. package/dist/sdk/types/p13n-studio.d.ts +18 -0
  240. package/dist/sdk/types/p13n-studio.d.ts.map +1 -0
  241. package/dist/sdk/types/p13n-studio.js +1 -0
  242. package/dist/sdk/types/p13n-studio.js.map +1 -0
  243. package/dist/sdk/types/progress.js +1 -1
  244. package/dist/sdk/types/workspace.js +1 -1
  245. package/dist/sdk/user.js +1 -1
  246. package/dist/sdk/util/format-detector.js +1 -1
  247. package/dist/sdk/util/formatters.js +1 -1
  248. package/dist/sdk/util/index.js +1 -1
  249. package/dist/sdk/util/paginate.js +1 -1
  250. package/dist/sdk/util/tree-formatter.js +1 -1
  251. package/dist/sdk/util/tree-search.js +1 -1
  252. package/dist/sdk/workflow/archive-validation.js +1 -1
  253. package/dist/sdk/workflow/clone-workflow.js +1 -1
  254. package/dist/sdk/workflow/index.js +1 -1
  255. package/dist/sdk/workflow/pull-workflow.js +1 -1
  256. package/dist/sdk/workflow/push-workflow.js +1 -1
  257. package/dist/sdk/workflow/task-graph.js +1 -1
  258. package/dist/sdk/workflow/tdx-config.js +1 -1
  259. package/dist/sdk/workflow/workflow-utils.js +1 -1
  260. package/dist/sdk/workspace/access-tracker.js +1 -1
  261. package/dist/sdk/workspace/frontmatter.js +1 -1
  262. package/dist/sdk/workspace/git.js +1 -1
  263. package/dist/sdk/workspace/index.js +1 -1
  264. package/dist/sdk/workspace/templates.js +1 -1
  265. package/dist/sdk/workspace/weekly.js +1 -1
  266. package/dist/sdk/workspace/wikilinks.js +1 -1
  267. package/dist/test-utils/command-runner.js +1 -1
  268. package/dist/test-utils/factories.js +1 -1
  269. package/dist/test-utils/fixtures.js +1 -1
  270. package/dist/test-utils/http-mock.js +1 -1
  271. package/dist/test-utils/index.js +1 -1
  272. package/dist/utils/async.js +1 -1
  273. package/dist/utils/claude-code-state.js +1 -1
  274. package/dist/utils/colors.js +1 -1
  275. package/dist/utils/diff.js +1 -1
  276. package/dist/utils/file-permissions.js +1 -1
  277. package/dist/utils/file-reader.js +1 -1
  278. package/dist/utils/github-releases.js +1 -1
  279. package/dist/utils/global-cache.js +1 -1
  280. package/dist/utils/json-loader.js +1 -1
  281. package/dist/utils/local-cache.js +1 -1
  282. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  283. package/dist/utils/logger/formatters/index.js +1 -1
  284. package/dist/utils/logger/handlers/console-handler.js +1 -1
  285. package/dist/utils/logger/handlers/file-handler.js +1 -1
  286. package/dist/utils/logger/handlers/index.js +1 -1
  287. package/dist/utils/logger/handlers/null-handler.js +1 -1
  288. package/dist/utils/logger/index.js +1 -1
  289. package/dist/utils/logger/logger.js +1 -1
  290. package/dist/utils/logger/types.js +1 -1
  291. package/dist/utils/option-validation.js +1 -1
  292. package/dist/utils/process.js +1 -1
  293. package/dist/utils/prompt.js +1 -1
  294. package/dist/utils/proxy-fetch.js +1 -1
  295. package/dist/utils/spinner.js +1 -1
  296. package/dist/utils/sse-parser.js +1 -1
  297. package/dist/utils/string-utils.js +1 -1
  298. package/dist/utils/table-ref-parser.js +1 -1
  299. package/dist/utils/tdx-logger.js +1 -1
  300. package/dist/utils/version-check.js +1 -1
  301. package/package.json +1 -1
@@ -1 +1 @@
1
- const a59_0x34b1fc=a59_0x2d50;(function(_0x5518b3,_0x55a372){const _0x1f7229=a59_0x2d50,_0x4a19e9=_0x5518b3();while(!![]){try{const _0x55d555=-parseInt(_0x1f7229(0x1cb))/0x1+parseInt(_0x1f7229(0xb3))/0x2*(parseInt(_0x1f7229(0x1c9))/0x3)+-parseInt(_0x1f7229(0x231))/0x4*(-parseInt(_0x1f7229(0x1cf))/0x5)+-parseInt(_0x1f7229(0xcf))/0x6+parseInt(_0x1f7229(0x8a))/0x7+-parseInt(_0x1f7229(0x206))/0x8+parseInt(_0x1f7229(0x188))/0x9*(parseInt(_0x1f7229(0x222))/0xa);if(_0x55d555===_0x55a372)break;else _0x4a19e9['push'](_0x4a19e9['shift']());}catch(_0x54f1ca){_0x4a19e9['push'](_0x4a19e9['shift']());}}}(a59_0x314e,0x7256f));import a59_0x564dd3 from'chalk';import{existsSync}from'fs';import a59_0x156221 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 a59_0x17b23b from'prompts';function getAttemptStatusDisplay(_0x424832){const _0x4d47d1=a59_0x2d50;if(!_0x424832)return{'icon':'⏳','text':''};const {done:_0x150e59,success:_0x840346,cancelRequested:_0x3c88ae}=_0x424832;if(!_0x150e59)return _0x3c88ae?{'icon':'🛑','text':a59_0x564dd3[_0x4d47d1(0x204)](_0x4d47d1(0x247))}:{'icon':'🔄','text':a59_0x564dd3[_0x4d47d1(0x1f6)](_0x4d47d1(0x6e))};if(_0x840346)return{'icon':'✅','text':a59_0x564dd3[_0x4d47d1(0xcd)](_0x4d47d1(0x1b7))};return{'icon':'❌','text':a59_0x564dd3[_0x4d47d1(0x1a4)](_0x4d47d1(0x23a))};}export class WorkflowBaseCommand extends BaseCommand{[a59_0x34b1fc(0xd0)](_0x28b875,_0x985310,_0xabdeb3=0x0){const _0x58bd1b=a59_0x34b1fc;return _0x28b875[_0xabdeb3]||_0x985310[_0x58bd1b(0x20b)];}[a59_0x34b1fc(0x213)](_0x1bd8f5,_0xbfc1ef,_0x30ed4e=0x0){const _0x5bd83a=a59_0x34b1fc,_0x12aa42=this[_0x5bd83a(0xd0)](_0x1bd8f5,_0xbfc1ef,_0x30ed4e);if(!_0x12aa42)return console[_0x5bd83a(0x23a)](a59_0x564dd3[_0x5bd83a(0x1a4)](_0x5bd83a(0x168)),'Project\x20name\x20is\x20required'),console[_0x5bd83a(0x23a)](a59_0x564dd3['dim'](_0x5bd83a(0x185))),null;return _0x12aa42;}[a59_0x34b1fc(0x194)](_0x553d8e,_0x130d9d){const _0x397cec=a59_0x34b1fc;if(_0x553d8e[0x0]){const _0x53f441=_0x553d8e[0x0][_0x397cec(0x101)]('.');if(_0x53f441[_0x397cec(0x217)]===0x1)return{'projectName':_0x53f441[0x0],'workflowName':undefined};else return _0x53f441[_0x397cec(0x217)]===0x2?{'projectName':_0x53f441[0x0],'workflowName':_0x53f441[0x1]}:(console[_0x397cec(0x23a)](a59_0x564dd3['red'](_0x397cec(0x168)),_0x397cec(0x7c)),null);}return{'projectName':_0x130d9d[_0x397cec(0x20b)],'workflowName':undefined};}[a59_0x34b1fc(0x14e)](_0x215518,_0x25f9dd,_0x188bf7=0x0){const _0x4e587c=a59_0x34b1fc;if(_0x215518[_0x188bf7])return _0x215518[_0x188bf7];if(_0x25f9dd[_0x4e587c(0x20b)]){const _0x44cbe1=a59_0x156221[_0x4e587c(0xf7)](process[_0x4e587c(0x154)](),_0x4e587c(0x1d0),_0x25f9dd['workflowProject']);if(existsSync(a59_0x156221['join'](_0x44cbe1,_0x4e587c(0xd9))))return _0x44cbe1;}return undefined;}async[a59_0x34b1fc(0xe2)](_0x265beb,_0x1ac3e7,_0x270f8e){const _0x14e9a5=a59_0x34b1fc;try{const _0x5cbc52=await _0x265beb['workflow']['workflows'](_0x1ac3e7,{'limit':0x1});if(_0x5cbc52[_0x14e9a5(0x217)]>0x0){const _0x2efb5c=_0x5cbc52[0x0]['id'],_0x1a3777=getWorkflowUrl(_0x270f8e,_0x2efb5c);console['error'](_0x14e9a5(0xda)+a59_0x564dd3[_0x14e9a5(0x1ae)](_0x1a3777));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x1c7);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x243);async[a59_0x34b1fc(0x203)](_0x52b2fe){const _0x18b899=a59_0x34b1fc,{options:_0x37ffad,args:_0x556ee6,tdx:_0x21fe54}=_0x52b2fe,_0x35b1e1=_0x556ee6[0x0],_0xdef50a=_0x37ffad[_0x18b899(0xfc)];if(_0xdef50a)return saveSessionContext({'workflow_project':undefined},_0x37ffad['session']),console[_0x18b899(0x223)](a59_0x564dd3['green'](_0x18b899(0xf2))),0x0;if(!_0x35b1e1)return console[_0x18b899(0x23a)](a59_0x564dd3['red'](_0x18b899(0x168)),_0x18b899(0x1ac)),console['error'](a59_0x564dd3[_0x18b899(0x6f)](_0x18b899(0x136))),console[_0x18b899(0x23a)](a59_0x564dd3[_0x18b899(0x6f)](_0x18b899(0x17d))),0x1;const _0x59060e=await withSpinner(_0x18b899(0xe0)+_0x35b1e1+_0x18b899(0x8f),()=>_0x21fe54['workflow'][_0x18b899(0x88)](_0x35b1e1),{'verbose':_0x37ffad[_0x18b899(0x1ab)]}),{name:_0xe62717}=_0x59060e[_0x18b899(0x138)];return saveSessionContext({'workflow_project':_0xe62717},_0x37ffad['session']),console['log'](a59_0x564dd3[_0x18b899(0xcd)](_0x18b899(0x114)+a59_0x564dd3['cyan'](_0xe62717))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]='workflow:projects';[a59_0x34b1fc(0x229)]='List\x20all\x20workflow\x20projects';async[a59_0x34b1fc(0x203)](_0x5027dd){const _0x2e85bc=a59_0x34b1fc,{options:_0xfc0f43,args:_0x38e7e5,tdx:_0x312bd4}=_0x5027dd,_0x24a7f0=_0x38e7e5[0x0];_0xfc0f43['verbose']&&_0x24a7f0&&console['error'](_0x2e85bc(0x115)+_0x24a7f0);const _0x6a4717=await withSpinner(_0x2e85bc(0x1c0),()=>_0x312bd4[_0x2e85bc(0x14b)][_0x2e85bc(0x10f)](_0x24a7f0,{'limit':_0xfc0f43[_0x2e85bc(0x7d)]}),{'verbose':_0xfc0f43['verbose']});let _0x4bd08f=_0x6a4717[_0x2e85bc(0x138)];_0x4bd08f[_0x2e85bc(0x65)]((_0x1a20fa,_0x3dde74)=>_0x1a20fa[_0x2e85bc(0x7b)][_0x2e85bc(0x16e)](_0x3dde74[_0x2e85bc(0x7b)]));const _0x40f84d=_0xfc0f43['limit']&&_0x4bd08f['length']>=_0xfc0f43['limit']?a59_0x564dd3['dim'](_0x2e85bc(0x207)):'';console[_0x2e85bc(0x23a)](_0x2e85bc(0x24a)+_0x4bd08f[_0x2e85bc(0x217)]+'\x20project'+(_0x4bd08f[_0x2e85bc(0x217)]!==0x1?'s':'')+_0x40f84d);if(_0xfc0f43[_0x2e85bc(0x197)]===_0x2e85bc(0x1e8)||_0xfc0f43[_0x2e85bc(0x197)]==='jsonl'||_0xfc0f43[_0x2e85bc(0x197)]==='table')await handleSDKOutput(_0x4bd08f,_0xfc0f43);else{if(_0x4bd08f[_0x2e85bc(0x217)]===0x0)_0x24a7f0?console[_0x2e85bc(0x223)](_0x2e85bc(0x68)+_0x24a7f0):console[_0x2e85bc(0x223)]('No\x20workflow\x20projects\x20found');else{const _0x13fc7b=_0x4bd08f[_0x2e85bc(0xb1)](_0x109bc9=>{const _0x2f0add=_0x2e85bc,_0x196382=_0x109bc9[_0x2f0add(0xc9)]?.[_0x2f0add(0xf3)](_0x4a9336=>_0x4a9336[_0x2f0add(0x24e)]==='sys'),_0x54562f=_0x196382?a59_0x564dd3['dim'](_0x2f0add(0x1d4)):'';return'📁\x20'+_0x109bc9[_0x2f0add(0x7b)]+_0x54562f;});await writeOutput(_0x13fc7b[_0x2e85bc(0xf7)]('\x0a'),_0xfc0f43['output'],_0x2e85bc(0xab));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x1e1);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x1c6);async[a59_0x34b1fc(0x203)](_0x4f8c77){const _0x337f21=a59_0x34b1fc,{options:_0x45b9b4,args:_0x1ac2d6,tdx:_0x485daa}=_0x4f8c77,_0x126c0b=this['resolveProject'](_0x1ac2d6,_0x45b9b4);_0x45b9b4['verbose']&&_0x126c0b&&console[_0x337f21(0x23a)](_0x337f21(0x16f)+_0x126c0b);const _0x254100=await withSpinner(_0x337f21(0x1fb),()=>_0x485daa['workflow'][_0x337f21(0x1d0)](_0x126c0b,{'limit':_0x45b9b4['limit']}),{'verbose':_0x45b9b4[_0x337f21(0x1ab)]});let _0x23b6d8=_0x254100[_0x337f21(0x138)];_0x23b6d8[_0x337f21(0x65)]((_0x232067,_0x28419a)=>{const _0x475d21=_0x337f21,_0x3f9786=_0x232067[_0x475d21(0x7b)][_0x475d21(0x16e)](_0x28419a[_0x475d21(0x7b)]);if(_0x3f9786!==0x0)return _0x3f9786;return(_0x232067['project']?.[_0x475d21(0x7b)]||'')[_0x475d21(0x16e)](_0x28419a[_0x475d21(0xc6)]?.[_0x475d21(0x7b)]||'');});const _0x4242d0=_0x45b9b4[_0x337f21(0x7d)]&&_0x23b6d8[_0x337f21(0x217)]>=_0x45b9b4[_0x337f21(0x7d)]?a59_0x564dd3[_0x337f21(0x6f)](_0x337f21(0x207)):'';console['error']('✔\x20Found\x20'+_0x23b6d8['length']+'\x20workflow'+(_0x23b6d8[_0x337f21(0x217)]!==0x1?'s':'')+_0x4242d0);if(_0x45b9b4[_0x337f21(0x197)]==='json'||_0x45b9b4[_0x337f21(0x197)]==='jsonl'||_0x45b9b4[_0x337f21(0x197)]===_0x337f21(0x13f))await handleSDKOutput(_0x23b6d8,_0x45b9b4);else{if(_0x23b6d8[_0x337f21(0x217)]===0x0)_0x126c0b?console['log'](_0x337f21(0x87)+_0x126c0b):console['log']('No\x20workflows\x20found');else{const _0x1919bd=_0x45b9b4[_0x337f21(0xc7)],_0x47fea5=_0x23b6d8['map'](_0x5392c2=>{const _0x141d0e=_0x337f21,_0x449ab6=a59_0x564dd3['dim']('#'+_0x5392c2['id']),_0x49d26b=hyperlink(_0x449ab6,getWorkflowUrl(_0x1919bd,_0x5392c2['id'])),_0x468f9b=_0x5392c2['project']?.[_0x141d0e(0x7b)]?a59_0x564dd3[_0x141d0e(0x6f)]('\x20('+_0x5392c2[_0x141d0e(0xc6)][_0x141d0e(0x7b)]+')'):'';return'📋\x20'+_0x49d26b+'\x20'+_0x5392c2['name']+_0x468f9b;});await writeOutput(_0x47fea5[_0x337f21(0xf7)]('\x0a'),_0x45b9b4['output'],_0x337f21(0xab));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]='workflow:sessions';['description']=a59_0x34b1fc(0xb7);async[a59_0x34b1fc(0x203)](_0x19c121){const _0x144370=a59_0x34b1fc,{options:_0x228540,args:_0x2e7000,tdx:_0x39df22}=_0x19c121,_0x2a63a0=this['parseProjectWorkflowPattern'](_0x2e7000,_0x228540);if(!_0x2a63a0)return 0x1;const {projectName:_0x28b21c,workflowName:_0x55dd47}=_0x2a63a0;if(_0x228540['verbose']){if(_0x28b21c&&_0x55dd47)console[_0x144370(0x23a)](_0x144370(0x1fd)+_0x28b21c+'.'+_0x55dd47);else _0x28b21c&&console[_0x144370(0x23a)](_0x144370(0x123)+_0x28b21c);const _0x396943=_0x228540[_0x144370(0x1b6)];_0x396943&&console['error']('Status:\x20'+_0x396943);}let _0x22fc39=0x28;if(process[_0x144370(0x122)][_0x144370(0x10b)]&&!_0x228540[_0x144370(0x95)]&&!_0x228540[_0x144370(0x197)]){const _0x9b8ffe=process['stdout']['rows']||0x28;_0x22fc39=Math['max'](0x14,Math['floor'](_0x9b8ffe*0x2/0x3));}const _0x130148=_0x228540[_0x144370(0x7d)]||_0x22fc39,_0x7cdbaf=await withSpinner(_0x144370(0xc8),()=>_0x39df22[_0x144370(0x14b)][_0x144370(0x1ef)]({'projectName':_0x28b21c,'workflowName':_0x55dd47,'status':_0x228540['status'],'fromTime':_0x228540[_0x144370(0xec)],'toTime':_0x228540['to'],'limit':_0x130148}),{'verbose':_0x228540[_0x144370(0x1ab)]}),_0x4f4483=_0x7cdbaf[_0x144370(0x138)];_0x4f4483[_0x144370(0x65)]((_0x4715b0,_0x2d3105)=>{const _0x2481e8=_0x144370,_0x4f57d6=_0x4715b0[_0x2481e8(0xad)]||'',_0x285f5c=_0x2d3105[_0x2481e8(0xad)]||'';return _0x285f5c[_0x2481e8(0x16e)](_0x4f57d6);});_0x4f4483[_0x144370(0x217)]>=_0x130148?console[_0x144370(0x23a)](_0x144370(0x190)+_0x4f4483['length']+_0x144370(0x79)+a59_0x564dd3[_0x144370(0x6f)](_0x144370(0x140))):console[_0x144370(0x23a)](_0x144370(0x24a)+_0x4f4483[_0x144370(0x217)]+_0x144370(0x233)+(_0x4f4483[_0x144370(0x217)]!==0x1?'s':''));if(_0x228540[_0x144370(0x197)]===_0x144370(0x1e8)||_0x228540[_0x144370(0x197)]===_0x144370(0x77)||_0x228540[_0x144370(0x197)]===_0x144370(0x13f))await handleSDKOutput(_0x4f4483,_0x228540);else{if(!process[_0x144370(0x122)]['isTTY']||_0x228540[_0x144370(0x95)]){if(_0x4f4483['length']===0x0){if(_0x28b21c&&_0x55dd47)console[_0x144370(0x223)](_0x144370(0x7f)+_0x28b21c+'.'+_0x55dd47);else _0x28b21c?console[_0x144370(0x223)](_0x144370(0xb5)+_0x28b21c):console['log'](_0x144370(0x1db));}else{const _0x3a0993=_0x228540[_0x144370(0xc7)],_0x8445c4=this[_0x144370(0x6c)](_0x4f4483,_0x3a0993);_0x228540[_0x144370(0x95)]?await writeOutput(_0x8445c4,_0x228540['output'],'list'):console[_0x144370(0x223)](_0x8445c4);}!_0x28b21c&&(console['error'](''),console['error'](a59_0x564dd3[_0x144370(0x6f)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x144370(0x23a)](a59_0x564dd3['dim'](_0x144370(0x1fe))+'or'+a59_0x564dd3[_0x144370(0x6f)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x4f4483[_0x144370(0x217)]===0x0){if(_0x28b21c&&_0x55dd47)console[_0x144370(0x223)](_0x144370(0x7f)+_0x28b21c+'.'+_0x55dd47);else _0x28b21c?console['log'](_0x144370(0xb5)+_0x28b21c):console[_0x144370(0x223)](_0x144370(0x1db));}else await this['navigateSessionsInteractive'](_0x4f4483,_0x19c121,_0x28b21c);}}return 0x0;}[a59_0x34b1fc(0x6c)](_0x390a2b,_0x2023f1){const _0x1f379c=a59_0x34b1fc,_0x4e8435=[],_0x449908=new Map();let _0x21e2b9=Infinity,_0x3f3381=-Infinity;for(const _0xf24b5 of _0x390a2b){if(_0xf24b5[_0x1f379c(0x20a)]?.[_0x1f379c(0xc0)]){const _0xf947f=new Date(_0xf24b5[_0x1f379c(0x20a)][_0x1f379c(0xc0)])[_0x1f379c(0x11a)](),_0x486cb1=_0xf24b5[_0x1f379c(0x20a)][_0x1f379c(0x10a)]?new Date(_0xf24b5['lastAttempt'][_0x1f379c(0x10a)])[_0x1f379c(0x11a)]():Date['now'](),_0x200904=_0xf24b5[_0x1f379c(0xc6)]?.[_0x1f379c(0x7b)]||'(unknown)';!_0x449908[_0x1f379c(0x1a3)](_0x200904)&&_0x449908['set'](_0x200904,[]),_0x449908['get'](_0x200904)[_0x1f379c(0x1f9)]({'session':_0xf24b5,'startTime':_0xf947f,'endTime':_0x486cb1,'duration':_0x486cb1-_0xf947f}),_0x21e2b9=Math[_0x1f379c(0x105)](_0x21e2b9,_0xf947f),_0x3f3381=Math['max'](_0x3f3381,_0x486cb1);}}if(_0x449908[_0x1f379c(0x163)]===0x0)return _0x1f379c(0xee);const _0x37dbb0=process['stdout']['columns']||0x78,_0x1bb5a4=0x1e,_0x2da799=0x32,_0xb55a45=0x4,_0x13812b=Math[_0x1f379c(0x105)](_0x2da799,Math['max'](_0x1bb5a4,Math['floor'](_0x37dbb0*0.3))),_0x317d5d=_0x37dbb0-_0x13812b-TIMELINE_CONFIG[_0x1f379c(0x113)]-0x3-_0xb55a45,_0x1813d0=_0x3f3381-_0x21e2b9,_0x390538=_0x1813d0/_0x13812b,_0x1c6145=renderTimeAxis({'startTime':_0x21e2b9,'endTime':_0x3f3381,'durationMs':_0x1813d0,'msPerChar':_0x390538},_0x13812b),_0x4dff19=[];for(const _0x271db1 of _0x449908[_0x1f379c(0x19a)]()){_0x4dff19[_0x1f379c(0x1f9)](..._0x271db1);}_0x4dff19[_0x1f379c(0x65)]((_0x179ae2,_0x48fff6)=>_0x48fff6[_0x1f379c(0x8c)]-_0x179ae2[_0x1f379c(0x8c)]);const _0x2bc6bb=new Date(_0x21e2b9),_0x5749cb=formatDate(_0x2bc6bb),_0x589788=_0xb55a45+TIMELINE_CONFIG[_0x1f379c(0x120)]+TIMELINE_CONFIG['ICON_SPACING']+_0x317d5d,_0x549c0c='\x20'[_0x1f379c(0xaf)](_0x589788-_0x5749cb[_0x1f379c(0x217)]),_0x3c8d30=_0x549c0c+a59_0x564dd3['dim'](_0x5749cb)+'\x20'+_0x1c6145;_0x4e8435[_0x1f379c(0x1f9)](_0x3c8d30);const _0x296ed0=0x16;let _0x56eccc=0x0;for(const _0x498c37 of _0x4dff19){const _0x14f299=_0x498c37[_0x1f379c(0x167)][_0x1f379c(0xc6)]?.[_0x1f379c(0x7b)]||'?',_0x2b65e7=Math[_0x1f379c(0x105)](stringWidth(_0x14f299),_0x296ed0);_0x56eccc=Math[_0x1f379c(0xc3)](_0x56eccc,_0x2b65e7);}for(const _0x271d9a of _0x4dff19){const {session:_0x2670a8,startTime:_0x1e01c2,endTime:_0x1a0c42,duration:_0x3b009a}=_0x271d9a,_0x34b941=_0x2670a8[_0x1f379c(0xc6)]?.['id'],_0xf53554=_0x2670a8['id'],_0x4909ce=_0x2670a8[_0x1f379c(0xc6)]?.[_0x1f379c(0x7b)]||'?',_0x2504fc=_0x2670a8['workflow']?.[_0x1f379c(0x7b)]||'?';let _0x19021b,_0x2ce79d;if(_0x2670a8[_0x1f379c(0x20a)]){const _0x4ccd80=_0x2670a8[_0x1f379c(0x20a)];!_0x4ccd80[_0x1f379c(0xbc)]?(_0x19021b=_0x4ccd80[_0x1f379c(0xa0)]?'🛑':'🔄',_0x2ce79d=_0x4ccd80[_0x1f379c(0xa0)]?a59_0x564dd3['yellow']:a59_0x564dd3[_0x1f379c(0x1f6)]):(_0x19021b=_0x4ccd80['success']?'✅':'❌',_0x2ce79d=_0x4ccd80[_0x1f379c(0x1b7)]?a59_0x564dd3[_0x1f379c(0xcd)]:a59_0x564dd3[_0x1f379c(0x1a4)]);}else _0x19021b='⏳',_0x2ce79d=a59_0x564dd3['dim'];const _0x24d540='#'+_0xf53554,_0x3d80dd=_0x34b941?hyperlink(_0x24d540,getWorkflowSessionUrl(_0x2023f1,_0x34b941,_0xf53554)):_0x24d540;let _0x26f24e=_0x4909ce;stringWidth(_0x4909ce)>_0x296ed0&&(_0x26f24e=_0x4909ce[_0x1f379c(0x156)](0x0,_0x296ed0-0x1)+'…');const _0x208ecd=a59_0x564dd3[_0x1f379c(0x6f)](_0x26f24e),_0x2ea3b0=stringWidth(_0x26f24e),_0x106d8f='\x20'[_0x1f379c(0xaf)](_0x56eccc-stringWidth(_0x26f24e)+0x2),_0x239a03='('+formatElapsed(_0x3b009a)+')',_0x4bdec0=stringWidth(_0x239a03),_0x38b3a7=stringWidth(_0x24d540),_0x5831ac=_0x38b3a7+0x1+_0x2ea3b0+_0x106d8f[_0x1f379c(0x217)],_0x195547=_0x317d5d-_0x5831ac-_0x4bdec0-0x1-0x8;let _0x1256c9=_0x2504fc;stringWidth(_0x1256c9)>_0x195547&&(_0x1256c9=_0x1256c9[_0x1f379c(0x156)](0x0,_0x195547-0x1)+'…');const _0x186a40=_0x3d80dd+'\x20'+_0x208ecd+_0x106d8f+_0x1256c9,_0x471cf=stringWidth(_0x186a40),_0x4089ed=_0x317d5d-_0x471cf-_0x4bdec0,_0x51ce10=_0x186a40+'\x20'[_0x1f379c(0xaf)](Math['max'](0x1,_0x4089ed))+a59_0x564dd3['dim'](_0x239a03),_0xaaa0ae=Math[_0x1f379c(0x9e)]((_0x1e01c2-_0x21e2b9)/_0x390538),_0x84322=Math[_0x1f379c(0x9e)]((_0x1a0c42-_0x21e2b9)/_0x390538),_0x3fe5ed=Math['max'](_0xaaa0ae+0x1,_0x84322),_0x2f25af=new Array(_0x13812b)[_0x1f379c(0x174)]('\x20');for(let _0x2c1c6=_0xaaa0ae;_0x2c1c6<Math[_0x1f379c(0x105)](_0x3fe5ed,_0x13812b);_0x2c1c6++){_0x2f25af[_0x2c1c6]='─';}const _0x2b33e3=_0x2f25af[_0x1f379c(0xb1)](_0x5cb686=>_0x5cb686==='\x20'?'\x20':_0x2ce79d(_0x5cb686))['join']('');_0x4e8435[_0x1f379c(0x1f9)](_0x19021b+'\x20'+_0x51ce10+'│'+_0x2b33e3+'│');}return _0x4e8435[_0x1f379c(0xf7)]('\x0a');}async[a59_0x34b1fc(0x78)](_0x42ec7f,_0x214a0a,_0xcd7960){const _0x40e030=a59_0x34b1fc,{options:_0x40a448,tdx:_0x338441}=_0x214a0a,_0x525064=_0x40a448[_0x40e030(0xc7)],{timelineRows:_0x267c16,timeAxisHeader:_0x381e97}=this[_0x40e030(0xca)](_0x42ec7f,_0x525064),_0x252ed6=_0x267c16['filter'](_0x4a70d5=>_0x4a70d5['attemptId']);if(_0x252ed6[_0x40e030(0x217)]===0x0){const _0xeb7f97=this[_0x40e030(0x6c)](_0x42ec7f,_0x525064);console[_0x40e030(0x223)](_0xeb7f97);!_0xcd7960&&(console[_0x40e030(0x23a)](''),console[_0x40e030(0x23a)](a59_0x564dd3[_0x40e030(0x6f)](_0x40e030(0x1bb))),console[_0x40e030(0x23a)](a59_0x564dd3[_0x40e030(0x6f)](_0x40e030(0x1fe))+'or'+a59_0x564dd3[_0x40e030(0x6f)]('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x381e97&&console[_0x40e030(0x223)](_0x381e97);const _0x2f1414=_0x267c16[_0x40e030(0x1f1)](_0x1aaa9a=>_0x1aaa9a[_0x40e030(0x1e9)])[_0x40e030(0xb1)](_0xb7f413=>({'title':_0xb7f413[_0x40e030(0x12c)],'value':_0xb7f413[_0x40e030(0x1e9)]})),_0x27aa4f=process[_0x40e030(0x122)]['rows']||0x3c,_0x1b11ea=Math[_0x40e030(0xc3)](0x28,Math[_0x40e030(0x9e)](_0x27aa4f*0x2/0x3)),_0x2a59e4=await a59_0x17b23b({'type':'autocomplete','name':_0x40e030(0x1e9),'message':_0x40e030(0x98),'choices':_0x2f1414,'initial':-0x1,'limit':_0x1b11ea,'clearFirst':!![],'fallback':{'title':_0x40e030(0x21c),'value':null},'suggest':(_0x402a87,_0x22f170)=>{const _0x5a2300=_0x40e030;if(!_0x402a87)return Promise[_0x5a2300(0xbd)](_0x22f170);const _0x16d473=_0x22f170[_0x5a2300(0x1f1)](_0x4ad69a=>{const _0x2a32ad=_0x5a2300,_0x10260c=_0x4ad69a;return _0x10260c[_0x2a32ad(0xce)][_0x2a32ad(0x1b5)]()['includes'](_0x402a87[_0x2a32ad(0x1b5)]());});return Promise['resolve'](_0x16d473);}}),_0x49e532=()=>{const _0x4cfcd5=_0x40e030;process[_0x4cfcd5(0x122)][_0x4cfcd5(0x22f)](_0x4cfcd5(0xdc)),process[_0x4cfcd5(0x122)][_0x4cfcd5(0x22f)](_0x4cfcd5(0xdc)),process[_0x4cfcd5(0x122)][_0x4cfcd5(0x22f)](_0x4cfcd5(0xdc));},_0x41f724=_0x2a59e4&&_0x2a59e4[_0x40e030(0x1e9)]&&_0x2a59e4[_0x40e030(0x1e9)]!==null&&_0x2a59e4[_0x40e030(0x1e9)][_0x40e030(0x152)]()!=='';if(!_0x41f724){_0x49e532(),console[_0x40e030(0x223)](a59_0x564dd3[_0x40e030(0x6f)](_0x40e030(0xf4)));return;}_0x49e532();const _0x172c28=_0x42ec7f[_0x40e030(0x1b9)](_0x44d8c4=>_0x44d8c4[_0x40e030(0x20a)]?.['id']===_0x2a59e4[_0x40e030(0x1e9)]);if(_0x172c28){const _0x473156=_0x172c28['project']?.[_0x40e030(0x7b)]||'?',_0x19078b=_0x172c28[_0x40e030(0x14b)]?.[_0x40e030(0x7b)]||'?';console['log'](_0x40e030(0x124)+a59_0x564dd3[_0x40e030(0x6f)](_0x473156)+',\x20Workflow:\x20'+a59_0x564dd3[_0x40e030(0x6f)](_0x19078b));}const _0x32bdc7=new WorkflowTimelineCommand();await _0x32bdc7[_0x40e030(0x203)]({'args':[],'options':{..._0x40a448,'attemptId':_0x2a59e4[_0x40e030(0x1e9)]},'tdx':_0x338441});}[a59_0x34b1fc(0xca)](_0x539e8b,_0x392b83){const _0x141794=a59_0x34b1fc,_0xa6c6ae=new Map();for(const _0x9ee649 of _0x539e8b){_0x9ee649['id']&&_0x9ee649['lastAttempt']?.['id']&&_0xa6c6ae[_0x141794(0x20e)](_0x9ee649['id'],_0x9ee649[_0x141794(0x20a)]['id']);}const _0x3e1764=[];let _0x2fec4f='';const _0x55ec56=this[_0x141794(0x6c)](_0x539e8b,_0x392b83),_0x3d0508=_0x55ec56['split']('\x0a');for(const _0xef2a15 of _0x3d0508){if(_0xef2a15[_0x141794(0xbf)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0xef2a15[_0x141794(0x1c4)](/^\s+\d{4}-\d{2}-\d{2}/))_0x2fec4f=_0xef2a15;else{if(_0xef2a15['match'](/^[✅❌🔄🛑⏳]/)){const _0x118afe=_0xef2a15[_0x141794(0x1c4)](/#(\d+)/),_0x344f74=_0x118afe?_0x118afe[0x1]:null,_0x3a9f42=_0x344f74?_0xa6c6ae[_0x141794(0x209)](_0x344f74)||null:null,_0x4496d6=_0x539e8b[_0x141794(0x1b9)](_0x3356b0=>_0x3356b0['id']===_0x344f74),_0x409dd3=_0x4496d6?.[_0x141794(0xc6)]?.[_0x141794(0x7b)]||'';_0x3e1764['push']({'displayLine':_0xef2a15,'attemptId':_0x3a9f42,'projectName':_0x409dd3});}}}return{'timelineRows':_0x3e1764,'timeAxisHeader':_0x2fec4f};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a59_0x34b1fc(0x201);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x241);async[a59_0x34b1fc(0x203)](_0x4d8a05){const _0xf76d6=a59_0x34b1fc,{options:_0x1c5c46,args:_0x4c4b59,tdx:_0x68ad69}=_0x4d8a05,_0x3b7216=this[_0xf76d6(0x194)](_0x4c4b59,_0x1c5c46);if(!_0x3b7216)return 0x1;const {projectName:_0x5c75fa,workflowName:_0x42ba2c}=_0x3b7216,_0x56881f=_0x1c5c46[_0xf76d6(0xb6)];if(_0x1c5c46['verbose']){if(_0x5c75fa&&_0x42ba2c)console[_0xf76d6(0x23a)](_0xf76d6(0x1fd)+_0x5c75fa+'.'+_0x42ba2c);else _0x5c75fa&&console[_0xf76d6(0x23a)](_0xf76d6(0x123)+_0x5c75fa);_0x56881f&&console['error']('Include\x20retried:\x20yes');}const _0x34218f=await withSpinner(_0xf76d6(0x71),()=>_0x68ad69[_0xf76d6(0x14b)][_0xf76d6(0x157)]({'projectName':_0x5c75fa,'workflowName':_0x42ba2c,'includeRetried':_0x56881f,'limit':_0x1c5c46[_0xf76d6(0x7d)]}),{'verbose':_0x1c5c46['verbose']}),_0x40f8d4=_0x34218f[_0xf76d6(0x138)],_0x182995=_0x1c5c46[_0xf76d6(0x7d)]||0x64,_0x1426fb=_0x40f8d4[_0xf76d6(0x217)]>=_0x182995?a59_0x564dd3[_0xf76d6(0x6f)](_0xf76d6(0x207)):'';console[_0xf76d6(0x23a)](_0xf76d6(0x24a)+_0x40f8d4[_0xf76d6(0x217)]+_0xf76d6(0x1f0)+(_0x40f8d4[_0xf76d6(0x217)]!==0x1?'s':'')+_0x1426fb);if(_0x1c5c46[_0xf76d6(0x197)]==='json'||_0x1c5c46[_0xf76d6(0x197)]===_0xf76d6(0x77)||_0x1c5c46[_0xf76d6(0x197)]===_0xf76d6(0x13f))await handleSDKOutput(_0x40f8d4,_0x1c5c46);else{if(_0x40f8d4['length']===0x0){if(_0x5c75fa&&_0x42ba2c)console[_0xf76d6(0x223)](_0xf76d6(0x67)+_0x5c75fa+'.'+_0x42ba2c);else _0x5c75fa?console[_0xf76d6(0x223)](_0xf76d6(0x72)+_0x5c75fa):console[_0xf76d6(0x223)](_0xf76d6(0x1e0));}else{const _0x152614=_0x1c5c46['site'],_0x131302=_0x40f8d4['map'](_0x82a3c5=>{const _0x709364=_0xf76d6,_0xafadec=a59_0x564dd3[_0x709364(0x6f)]('#'+_0x82a3c5['id']),_0x5790d4=_0x82a3c5['project']?.['id'],_0x2b6716=_0x82a3c5[_0x709364(0x121)]||_0x82a3c5['sessionId'],_0x45781a=_0x5790d4&&_0x2b6716?hyperlink(_0xafadec,getWorkflowAttemptUrl(_0x152614,_0x5790d4,_0x2b6716,_0x82a3c5['id'])):_0xafadec,{icon:_0x3c6aca,text:_0x568131}=getAttemptStatusDisplay(_0x82a3c5),_0x4f0d72=(_0x82a3c5[_0x709364(0xc6)]?.[_0x709364(0x7b)]||'?')+'.'+(_0x82a3c5['workflow']?.[_0x709364(0x7b)]||'?'),_0x267d9c=_0x82a3c5[_0x709364(0xad)]?a59_0x564dd3[_0x709364(0x6f)](_0x82a3c5[_0x709364(0xad)]):'';return(_0x45781a+'\x20'+_0x3c6aca+(_0x568131?'\x20'+_0x568131:'')+'\x20'+_0x4f0d72+'\x20'+_0x267d9c)[_0x709364(0x85)]();});await writeOutput(_0x131302[_0xf76d6(0xf7)]('\x0a'),_0x1c5c46['output'],_0xf76d6(0xab));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x1b2);[a59_0x34b1fc(0x229)]='Show\x20specific\x20attempt\x20details';async[a59_0x34b1fc(0x203)](_0x5e84e2){const _0x13995=a59_0x34b1fc,{options:_0x3605a0,args:_0x25dc09,tdx:_0x4c6777}=_0x5e84e2,_0x2e648e=_0x25dc09[0x0];if(!_0x2e648e)return console['error'](_0x13995(0xac)),0x1;_0x3605a0[_0x13995(0x1ab)]&&console[_0x13995(0x23a)](_0x13995(0x1fa)+_0x2e648e);const _0x288678=await withSpinner(_0x13995(0xf1),()=>_0x4c6777[_0x13995(0x14b)]['attempt'](_0x2e648e),{'verbose':_0x3605a0[_0x13995(0x1ab)]}),_0x38e718=_0x288678['data'];let _0x185798;!_0x38e718[_0x13995(0xbc)]?_0x185798=_0x38e718[_0x13995(0xa0)]?_0x13995(0x247):'running':_0x185798=_0x38e718[_0x13995(0x1b7)]?_0x13995(0x1b7):'error';let _0x4bc695;if(_0x38e718['createdAt']&&_0x38e718['finishedAt']){const _0x262a58=new Date(_0x38e718['createdAt'])[_0x13995(0x11a)](),_0x34b87d=new Date(_0x38e718[_0x13995(0x10a)])[_0x13995(0x11a)]();_0x4bc695=Math[_0x13995(0x18f)]((_0x34b87d-_0x262a58)/0x3e8);}const _0x197be5={'attempt_id':_0x38e718['id'],'status':_0x185798,..._0x38e718[_0x13995(0xd4)]!==undefined&&{'index':_0x38e718['index']},..._0x38e718[_0x13995(0xc6)]&&{'project':_0x38e718[_0x13995(0xc6)]['name']},..._0x38e718['workflow']&&{'workflow':_0x38e718['workflow'][_0x13995(0x7b)]},..._0x38e718[_0x13995(0x6b)]&&{'session_id':_0x38e718['sessionId']},..._0x38e718[_0x13995(0xad)]&&{'session_time':_0x38e718['sessionTime']},..._0x38e718[_0x13995(0x210)]&&{'retry_attempt':_0x38e718[_0x13995(0x210)]},..._0x4bc695!==undefined&&{'duration_sec':_0x4bc695},..._0x38e718[_0x13995(0xc0)]&&{'created_at':_0x38e718['createdAt']},..._0x38e718[_0x13995(0x10a)]&&{'finished_at':_0x38e718['finishedAt']},...Object[_0x13995(0x1d3)](_0x38e718['params'])[_0x13995(0x217)]>0x0&&{'params':_0x38e718[_0x13995(0xe5)]}};return await handleSingleObjectOutput(_0x197be5,_0x3605a0),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x17b);['description']=a59_0x34b1fc(0x1ed);async[a59_0x34b1fc(0x203)](_0x548d70){const _0x1f9f13=a59_0x34b1fc,{options:_0x44b1b4,args:_0x2e735e,tdx:_0x479ef5}=_0x548d70,_0x6e843f=_0x2e735e[0x0];if(!_0x6e843f)return console[_0x1f9f13(0x23a)](_0x1f9f13(0xac)),0x1;const _0x3aaa51=_0x44b1b4['includeSubtasks'];_0x44b1b4[_0x1f9f13(0x1ab)]&&(console[_0x1f9f13(0x23a)](_0x1f9f13(0x1fa)+_0x6e843f),_0x3aaa51&&console[_0x1f9f13(0x23a)](_0x1f9f13(0xd8)));const _0x566847=await withSpinner(_0x1f9f13(0xe9),()=>_0x479ef5[_0x1f9f13(0x14b)][_0x1f9f13(0x148)](_0x6e843f,_0x3aaa51||![]),{'verbose':_0x44b1b4[_0x1f9f13(0x1ab)]}),_0x5e793c=_0x566847[_0x1f9f13(0x138)];return console[_0x1f9f13(0x23a)](_0x1f9f13(0x24a)+_0x5e793c['length']+_0x1f9f13(0x155)+(_0x5e793c[_0x1f9f13(0x217)]!==0x1?'s':'')),await handleSDKOutput(_0x5e793c,_0x44b1b4),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x1f7);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x22b);async[a59_0x34b1fc(0x203)](_0x33cc9e){const _0xea33f8=a59_0x34b1fc,{options:_0x53f884,args:_0x41f5c4,tdx:_0x5ad3db}=_0x33cc9e,_0x2aa026=_0x41f5c4[0x0];let _0x2707cd=_0x41f5c4[0x1];if(!_0x2aa026)return console['error'](_0xea33f8(0xac)),0x1;_0x53f884[_0xea33f8(0x1ab)]&&(console[_0xea33f8(0x23a)](_0xea33f8(0x1fa)+_0x2aa026),_0x2707cd&&console[_0xea33f8(0x23a)](_0xea33f8(0x110)+_0x2707cd));const _0xe16e78=await withSpinner(_0xea33f8(0xfa),()=>_0x5ad3db[_0xea33f8(0x14b)]['logFiles'](_0x2aa026,_0x2707cd),{'verbose':_0x53f884[_0xea33f8(0x1ab)]}),_0x4cd257=_0xe16e78['data'];if(_0x4cd257[_0xea33f8(0x217)]===0x0)return console['error']('No\x20log\x20files\x20found\x20for\x20this\x20attempt'),0x0;if(!_0x2707cd&&(_0x53f884[_0xea33f8(0x1e8)]||_0x53f884[_0xea33f8(0x197)]))return await handleSDKOutput(_0x4cd257,_0x53f884),0x0;if(!_0x2707cd){const _0x19cadd=_0x4cd257[_0xea33f8(0xb1)](_0x14ce8a=>({'title':_0x14ce8a[_0xea33f8(0x84)]+'\x20('+formatBytes(_0x14ce8a[_0xea33f8(0x13c)])+')','value':_0x14ce8a[_0xea33f8(0x84)]})),_0x2f8677=await a59_0x17b23b({'type':_0xea33f8(0x1fc),'name':_0xea33f8(0x8e),'message':_0xea33f8(0x94),'choices':_0x19cadd});if(!_0x2f8677['task'])return console[_0xea33f8(0x23a)](_0xea33f8(0xf4)),0x0;_0x2707cd=_0x2f8677[_0xea33f8(0x8e)];}const _0x4c08c4=await withSpinner(_0xea33f8(0x9b),()=>_0x5ad3db[_0xea33f8(0x14b)][_0xea33f8(0x9f)](_0x2aa026,_0x2707cd),{'verbose':_0x53f884[_0xea33f8(0x1ab)]}),_0x65c6dd=_0x4c08c4['data'];return _0x65c6dd?console[_0xea33f8(0x223)](_0x65c6dd):console[_0xea33f8(0x23a)](_0xea33f8(0x125)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x1a2);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0xf9);async['execute'](_0x3deba3){const _0x188131=a59_0x34b1fc,{options:_0x34fbbe,args:_0x323e64,tdx:_0x2d4601}=_0x3deba3,_0x12e27c=_0x323e64[0x0];if(!_0x12e27c)return console[_0x188131(0x23a)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x303809=_0x34fbbe[_0x188131(0x97)];_0x34fbbe[_0x188131(0x1ab)]&&(console[_0x188131(0x23a)](_0x188131(0x1fa)+_0x12e27c),_0x303809&&console[_0x188131(0x23a)]('Reason:\x20'+_0x303809));if(!_0x34fbbe[_0x188131(0x100)]){if(!isInteractive())return console[_0x188131(0x23a)](a59_0x564dd3['red'](_0x188131(0x131)),_0x188131(0x246)),console['error'](a59_0x564dd3['dim'](_0x188131(0xbb))),0x1;const _0x34c365=await confirmKey(_0x188131(0x111)+_0x12e27c+'?');if(!_0x34c365)return console[_0x188131(0x23a)](a59_0x564dd3[_0x188131(0x204)]('Cancelled')),0x1;}const _0xed839d=await withSpinner(_0x188131(0x15c),()=>_0x2d4601['workflow'][_0x188131(0x21f)](_0x12e27c,_0x303809),{'verbose':_0x34fbbe['verbose']}),_0x2f0d21=_0xed839d['data'];return console[_0x188131(0x23a)]('✔\x20'+_0x2f0d21),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a59_0x34b1fc(0x240);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x220);async['execute'](_0x3c390e){const _0x9d8033=a59_0x34b1fc,{options:_0x3ee760,args:_0x71511d,tdx:_0x1b2846}=_0x3c390e,_0x14c49a=_0x71511d[0x0];if(!_0x14c49a)return console[_0x9d8033(0x23a)](_0x9d8033(0x21a)),console['error'](_0x9d8033(0x177)),0x1;let _0x487e1d=![],_0x4caed0=_0x14c49a;if(_0x14c49a[_0x9d8033(0xbf)](_0x9d8033(0x1ea)))_0x487e1d=!![],_0x4caed0=_0x14c49a[_0x9d8033(0x235)](0x8);else{if(_0x14c49a[_0x9d8033(0xbf)]('attempt:'))_0x487e1d=![],_0x4caed0=_0x14c49a[_0x9d8033(0x235)](0x8);else return console[_0x9d8033(0x23a)](_0x9d8033(0x1c1)),console[_0x9d8033(0x23a)](_0x9d8033(0x177)),0x1;}const _0x447435=_0x3ee760[_0x9d8033(0x17a)],_0x4691b5=_0x3ee760[_0x9d8033(0x89)],_0x22b124=_0x3ee760[_0x9d8033(0xe5)],_0x46ef42=_0x3ee760[_0x9d8033(0x81)];_0x3ee760[_0x9d8033(0x1ab)]&&(console[_0x9d8033(0x23a)]('Target:\x20'+(_0x487e1d?'session':_0x9d8033(0x22a))+'\x20'+_0x4caed0),_0x447435&&console[_0x9d8033(0x23a)](_0x9d8033(0x182)+_0x447435),_0x4691b5&&console[_0x9d8033(0x23a)](_0x9d8033(0x12f)+_0x4691b5),_0x22b124&&console[_0x9d8033(0x23a)]('Params:\x20'+_0x22b124),_0x46ef42&&console[_0x9d8033(0x23a)](_0x9d8033(0x70)));let _0x46c633;if(_0x22b124)try{if(_0x22b124[_0x9d8033(0xbf)]('@')){const _0xc53a77=await import('fs/promises'),_0x171957=_0x22b124[_0x9d8033(0x235)](0x1),_0xebe2c5=await _0xc53a77['readFile'](_0x171957,_0x9d8033(0x80));_0x46c633=JSON['parse'](_0xebe2c5);}else _0x46c633=JSON['parse'](_0x22b124);}catch{return console[_0x9d8033(0x23a)](_0x9d8033(0x227)),0x1;}if(!_0x3ee760[_0x9d8033(0x100)]){if(!isInteractive())return console[_0x9d8033(0x23a)](a59_0x564dd3[_0x9d8033(0x1a4)](_0x9d8033(0x131)),_0x9d8033(0x246)),console[_0x9d8033(0x23a)](a59_0x564dd3[_0x9d8033(0x6f)](_0x9d8033(0xbb))),0x1;const _0x11f3f9=await confirmKey(_0x9d8033(0x132)+(_0x487e1d?_0x9d8033(0x167):_0x9d8033(0x22a))+'\x20'+_0x4caed0+'?');if(!_0x11f3f9)return console[_0x9d8033(0x23a)](a59_0x564dd3[_0x9d8033(0x204)]('Cancelled')),0x1;}let _0x4dae71;_0x487e1d?_0x4dae71=await withSpinner(_0x9d8033(0x202),()=>_0x1b2846[_0x9d8033(0x14b)]['retrySession'](_0x4caed0,{'fromTask':_0x447435,'retryParams':_0x46c633}),{'verbose':_0x3ee760[_0x9d8033(0x1ab)]}):_0x4dae71=await withSpinner('Retrying\x20attempt...',()=>_0x1b2846[_0x9d8033(0x14b)][_0x9d8033(0x8d)](_0x4caed0,{'resumeFrom':_0x4691b5,'retryParams':_0x46c633,'force':_0x46ef42}),{'verbose':_0x3ee760[_0x9d8033(0x1ab)]});const _0x5b5a12=_0x4dae71[_0x9d8033(0x138)];return console['error']('✔\x20Retry\x20started'),console[_0x9d8033(0x23a)](_0x9d8033(0x1f3)+_0x5b5a12[_0x9d8033(0x1e9)]),console[_0x9d8033(0x23a)](_0x9d8033(0x13d)+_0x5b5a12['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0xdd);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x1da);async[a59_0x34b1fc(0x203)](_0x3ea294){const _0x41d07d=a59_0x34b1fc,{options:_0x2669d4,args:_0x426c6f,tdx:_0x3fcd4f}=_0x3ea294;let _0x276794=_0x426c6f[0x0];if(!_0x276794){const _0x2c4072=this['resolveProject']([],_0x2669d4),_0x1f13af=await withSpinner(_0x41d07d(0x143),()=>_0x3fcd4f[_0x41d07d(0x14b)][_0x41d07d(0x1d0)](_0x2c4072,{'limit':_0x2669d4['limit']}),{'verbose':_0x2669d4[_0x41d07d(0x1ab)]}),_0x4de514=_0x1f13af[_0x41d07d(0x138)];if(_0x4de514['length']===0x0)return console[_0x41d07d(0x23a)](_0x41d07d(0x92)),!_0x2c4072&&console['error'](a59_0x564dd3['dim'](_0x41d07d(0x185))),0x1;const _0x19d9ea=_0x4de514['map'](_0x141ad5=>({'title':_0x141ad5[_0x41d07d(0xc6)]?.[_0x41d07d(0x7b)]+'.'+_0x141ad5[_0x41d07d(0x7b)],'value':_0x141ad5['project']?.[_0x41d07d(0x7b)]+'.'+_0x141ad5[_0x41d07d(0x7b)],'description':_0x141ad5[_0x41d07d(0x22e)]?_0x41d07d(0x214)+_0x141ad5['revision']:undefined})),_0x990561=await a59_0x17b23b({'type':_0x41d07d(0x1fc),'name':_0x41d07d(0x14b),'message':_0x41d07d(0xe3),'choices':_0x19d9ea});if(!_0x990561[_0x41d07d(0x14b)])return 0x1;_0x276794=_0x990561[_0x41d07d(0x14b)];}if(!_0x276794[_0x41d07d(0x228)]('.')){const _0x2e6f86=this[_0x41d07d(0xd0)]([],_0x2669d4);if(_0x2e6f86)_0x276794=_0x2e6f86+'.'+_0x276794;else return console[_0x41d07d(0x23a)](a59_0x564dd3[_0x41d07d(0x1a4)]('Error:'),_0x41d07d(0x76)),console[_0x41d07d(0x23a)](a59_0x564dd3[_0x41d07d(0x6f)](_0x41d07d(0x185))),0x1;}const _0x36ac73=_0x2669d4[_0x41d07d(0x9c)],_0x4894ff=_0x2669d4[_0x41d07d(0xad)],_0x362904={};if(_0x36ac73&&Array[_0x41d07d(0x1e7)](_0x36ac73))for(const _0x54f112 of _0x36ac73){const _0x289621=_0x54f112['indexOf']('=');if(_0x289621===-0x1)return console[_0x41d07d(0x23a)](_0x41d07d(0x130)+_0x54f112),console[_0x41d07d(0x23a)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x584452=_0x54f112[_0x41d07d(0x235)](0x0,_0x289621),_0xa266c6=_0x54f112[_0x41d07d(0x235)](_0x289621+0x1);try{_0x362904[_0x584452]=JSON['parse'](_0xa266c6);}catch{_0x362904[_0x584452]=_0xa266c6;}}_0x2669d4[_0x41d07d(0x1ab)]&&(console[_0x41d07d(0x23a)](_0x41d07d(0x219)+_0x276794),Object['keys'](_0x362904)[_0x41d07d(0x217)]>0x0&&console['error'](_0x41d07d(0xe8)+JSON[_0x41d07d(0x237)](_0x362904)),_0x4894ff&&console[_0x41d07d(0x23a)](_0x41d07d(0x225)+_0x4894ff));if(_0x2669d4[_0x41d07d(0xa6)])return await this[_0x41d07d(0x1d5)](_0x3ea294,_0x276794,_0x362904,_0x4894ff);const _0x589d49=await withSpinner('Starting\x20workflow\x20run...',()=>_0x3fcd4f['workflow'][_0x41d07d(0xba)](_0x276794,_0x362904,{'sessionTime':_0x4894ff}),{'verbose':_0x2669d4[_0x41d07d(0x1ab)]}),_0x2ec36e=_0x589d49[_0x41d07d(0x138)];console[_0x41d07d(0x23a)](_0x41d07d(0xeb)),console[_0x41d07d(0x23a)](_0x41d07d(0x15a)+_0x2ec36e['id']),console[_0x41d07d(0x23a)](_0x41d07d(0x13d)+_0x2ec36e['sessionId']),console[_0x41d07d(0x23a)](_0x41d07d(0xd5)+_0x2ec36e[_0x41d07d(0xc6)]?.[_0x41d07d(0x7b)]),console[_0x41d07d(0x23a)](_0x41d07d(0x134)+_0x2ec36e['workflow']?.[_0x41d07d(0x7b)]);if(_0x2ec36e[_0x41d07d(0xc6)]?.['id']&&_0x2ec36e[_0x41d07d(0x6b)]&&_0x2ec36e['id']){const _0x58bcce=_0x2669d4['site'],_0x33df4e=getConsoleUrl(_0x58bcce,_0x41d07d(0x1cd)+_0x2ec36e[_0x41d07d(0xc6)]['id']+_0x41d07d(0xa3)+_0x2ec36e[_0x41d07d(0x6b)]+_0x41d07d(0x147)+_0x2ec36e['id']);console[_0x41d07d(0x23a)]('\x20\x20Console:\x20'+a59_0x564dd3[_0x41d07d(0x1ae)](_0x33df4e));}return 0x0;}async[a59_0x34b1fc(0x1d5)](_0x45bb18,_0x4af006,_0x128c39,_0x451411){const _0x5072da=a59_0x34b1fc,{options:_0x35f06f,tdx:_0x187efc}=_0x45bb18,_0x49be30=await withSpinner('Fetching\x20workflow\x20'+_0x4af006+_0x5072da(0x104),()=>_0x187efc[_0x5072da(0x14b)][_0x5072da(0x1bc)](_0x4af006),{'verbose':_0x35f06f[_0x5072da(0x1ab)]}),_0x41a223=_0x49be30[_0x5072da(0x138)],_0x383807=_0x451411??new Date()[_0x5072da(0x13a)]();console[_0x5072da(0x223)](a59_0x564dd3[_0x5072da(0x171)](_0x5072da(0x1de)),_0x4af006),console[_0x5072da(0x223)](a59_0x564dd3[_0x5072da(0x171)](_0x5072da(0x112)),_0x383807),console[_0x5072da(0x223)](a59_0x564dd3[_0x5072da(0x171)](_0x5072da(0x73)),JSON[_0x5072da(0x237)](_0x128c39)),console[_0x5072da(0x223)](''),console['log'](a59_0x564dd3[_0x5072da(0x171)](_0x5072da(0x19e)));const _0x3029a7=parseTaskGraph(_0x41a223[_0x5072da(0x200)]??null);if(_0x3029a7[_0x5072da(0x217)]===0x0)console[_0x5072da(0x223)](a59_0x564dd3[_0x5072da(0x6f)](_0x5072da(0x23c)));else for(const _0x16f5d0 of formatTaskGraph(_0x3029a7)){console[_0x5072da(0x223)](_0x16f5d0);}const _0x577ab8=summarizeTaskGraph(_0x3029a7),_0x52f1c1=formatWarningSummary(_0x577ab8);return _0x52f1c1&&(console[_0x5072da(0x223)](''),console['log'](a59_0x564dd3[_0x5072da(0x204)](_0x52f1c1))),console[_0x5072da(0x223)](a59_0x564dd3[_0x5072da(0x204)](_0x5072da(0x82))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a59_0x34b1fc(0xdb);[a59_0x34b1fc(0x229)]='Download\x20workflow\x20project\x20from\x20Treasure\x20AI';async[a59_0x34b1fc(0x203)](_0x1505bd){const _0x1c4622=a59_0x34b1fc,{options:_0x4c4ab3,args:_0x426670,tdx:_0x18e28d}=_0x1505bd,_0x13d324=_0x426670[0x0],_0xb9205f=_0x426670[0x1]||'.';if(!_0x13d324)return console[_0x1c4622(0x23a)](_0x1c4622(0x129)),console[_0x1c4622(0x23a)](_0x1c4622(0x19c)),0x1;const _0x5c4ace=_0x4c4ab3[_0x1c4622(0x22e)];_0x4c4ab3[_0x1c4622(0x1ab)]&&(console[_0x1c4622(0x23a)](_0x1c4622(0x124)+_0x13d324),console[_0x1c4622(0x23a)]('Output\x20directory:\x20'+_0xb9205f),_0x5c4ace&&console[_0x1c4622(0x23a)]('Revision:\x20'+_0x5c4ace));const _0x35dd2d=await withSpinner(_0x1c4622(0xa8)+_0x13d324+_0x1c4622(0x104),()=>_0x18e28d[_0x1c4622(0x14b)][_0x1c4622(0x239)](_0x13d324,_0xb9205f,{'revision':_0x5c4ace}),{'verbose':_0x4c4ab3[_0x1c4622(0x1ab)]}),_0x467f90=_0x35dd2d['data'];return console['error'](_0x1c4622(0x1eb)+_0x467f90['projectName']),console[_0x1c4622(0x23a)]('\x20\x20Revision:\x20'+_0x467f90[_0x1c4622(0x22e)]),console['error'](_0x1c4622(0x118)+_0x467f90['filesExtracted']),console[_0x1c4622(0x23a)]('\x20\x20Location:\x20'+_0xb9205f+'/'+_0x467f90[_0x1c4622(0x179)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x205);[a59_0x34b1fc(0x229)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)';async[a59_0x34b1fc(0x203)](_0x1aca34){const _0x12c1bc=a59_0x34b1fc,{options:_0x44bd05,args:_0x3db353,tdx:_0x21f24e}=_0x1aca34;let _0x3f8918='.',_0x1131fe=_0x44bd05[_0x12c1bc(0x7b)];if(_0x3db353[0x0]){const {promises:_0x234f36}=await import('fs');try{const _0x27265d=await _0x234f36[_0x12c1bc(0x14c)](_0x3db353[0x0]);if(_0x27265d[_0x12c1bc(0x1d2)]())_0x3f8918=_0x3db353[0x0];else return console['error']('Error:\x20'+_0x3db353[0x0]+_0x12c1bc(0x221)),0x1;}catch{_0x1131fe=_0x3db353[0x0],_0x3f8918='.';}}const _0x5b155b=_0x44bd05[_0x12c1bc(0x22e)],_0x3fdf8e=_0x44bd05['skipValidation'];_0x44bd05[_0x12c1bc(0x1ab)]&&(console['error']('Project\x20directory:\x20'+_0x3f8918),_0x1131fe&&console['error'](_0x12c1bc(0x21d)+_0x1131fe),_0x5b155b&&console[_0x12c1bc(0x23a)](_0x12c1bc(0x1a9)+_0x5b155b),_0x3fdf8e&&console[_0x12c1bc(0x23a)](_0x12c1bc(0x149)));const _0x45b03e=await withSpinner(_0x12c1bc(0x170),()=>_0x21f24e[_0x12c1bc(0x14b)][_0x12c1bc(0x1f9)](_0x3f8918,{'projectName':_0x1131fe,'revision':_0x5b155b,'skipValidation':_0x3fdf8e}),{'verbose':_0x44bd05['verbose']}),_0x3c7832=_0x45b03e['data'];return console[_0x12c1bc(0x23a)](_0x12c1bc(0x230)+_0x3c7832['projectName']),console[_0x12c1bc(0x23a)](_0x12c1bc(0x245)+_0x3c7832[_0x12c1bc(0x162)]),console[_0x12c1bc(0x23a)]('\x20\x20Revision:\x20'+_0x3c7832[_0x12c1bc(0x22e)]),await this[_0x12c1bc(0xe2)](_0x21f24e,_0x3c7832[_0x12c1bc(0x179)],_0x44bd05[_0x12c1bc(0xc7)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x16b);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0xed);async[a59_0x34b1fc(0x203)](_0x2371fb){const _0x511d3e=a59_0x34b1fc,{options:_0x443907,args:_0x17aaab,tdx:_0x5c4ba8}=_0x2371fb,_0x1e986f=_0x17aaab[0x0],_0x65d38=_0x17aaab[0x1];if(!_0x1e986f)return console[_0x511d3e(0x23a)](a59_0x564dd3['red'](_0x511d3e(0x168)),_0x511d3e(0x1ac)),console[_0x511d3e(0x23a)](a59_0x564dd3[_0x511d3e(0x6f)](_0x511d3e(0x193))),0x1;const _0x41b16d=_0x443907[_0x511d3e(0x22e)];_0x443907['verbose']&&(console[_0x511d3e(0x23a)](_0x511d3e(0x124)+_0x1e986f),_0x65d38&&console[_0x511d3e(0x23a)](_0x511d3e(0x1bd)+_0x65d38),_0x41b16d&&console[_0x511d3e(0x23a)](_0x511d3e(0x1a9)+_0x41b16d),_0x443907[_0x511d3e(0xa6)]&&console[_0x511d3e(0x23a)](_0x511d3e(0x1d1)));const _0x46895c=await withSpinner(_0x511d3e(0x151)+_0x1e986f+_0x511d3e(0x104),()=>_0x5c4ba8[_0x511d3e(0x14b)]['pullProject'](_0x1e986f,{'targetDir':_0x65d38,'revision':_0x41b16d}),{'verbose':_0x443907[_0x511d3e(0x1ab)]}),_0x21990b=_0x46895c[_0x511d3e(0x138)];_0x21990b[_0x511d3e(0x1ce)]?console['error'](_0x511d3e(0x19b)+_0x21990b[_0x511d3e(0x179)]):console[_0x511d3e(0x23a)](_0x511d3e(0x20f)+_0x21990b[_0x511d3e(0x179)]);console['error'](_0x511d3e(0x189)+_0x21990b[_0x511d3e(0x22e)]),console[_0x511d3e(0x23a)](_0x511d3e(0x102)+(a59_0x156221['relative'](process[_0x511d3e(0x154)](),_0x21990b['targetDir'])||'.')),console[_0x511d3e(0x23a)](_0x511d3e(0x146)+a59_0x564dd3[_0x511d3e(0xcd)]('+'+_0x21990b[_0x511d3e(0x1f8)][_0x511d3e(0xb2)]+_0x511d3e(0xc2))+',\x20'+(a59_0x564dd3[_0x511d3e(0x204)]('~'+_0x21990b[_0x511d3e(0x1f8)][_0x511d3e(0xa7)]+_0x511d3e(0x232))+',\x20')+(a59_0x564dd3[_0x511d3e(0x1a4)]('-'+_0x21990b[_0x511d3e(0x1f8)][_0x511d3e(0x173)]+_0x511d3e(0x1a7))+',\x20')+(''+a59_0x564dd3[_0x511d3e(0x6f)](_0x21990b[_0x511d3e(0x1f8)][_0x511d3e(0x144)]+_0x511d3e(0xa5))));for(const _0x49c5cb of _0x21990b['changes']){_0x49c5cb[_0x511d3e(0x14a)]===_0x511d3e(0xa7)&&_0x49c5cb[_0x511d3e(0x7e)]&&(console['error']('\x0a'+a59_0x564dd3[_0x511d3e(0x1ae)](_0x511d3e(0xb8)+_0x49c5cb[_0x511d3e(0x11f)])),console['error'](_0x49c5cb['diff']));}if(!_0x21990b['hasChanges'])return saveSessionContext({'workflow_project':_0x21990b[_0x511d3e(0x179)]},_0x443907[_0x511d3e(0x167)]),console[_0x511d3e(0x23a)](a59_0x564dd3[_0x511d3e(0xcd)](_0x511d3e(0xe1))),console[_0x511d3e(0x23a)](a59_0x564dd3['dim'](_0x511d3e(0xd1)+_0x21990b[_0x511d3e(0x179)])),0x0;if(_0x443907['dryRun'])return console[_0x511d3e(0x23a)](a59_0x564dd3[_0x511d3e(0x204)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x443907['yes']){if(!isInteractive())return console[_0x511d3e(0x23a)](a59_0x564dd3['red'](_0x511d3e(0x131)),_0x511d3e(0x246)),console[_0x511d3e(0x23a)](a59_0x564dd3[_0x511d3e(0x6f)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x12aecd=await confirmKey(_0x511d3e(0x176));if(!_0x12aecd)return console[_0x511d3e(0x23a)](a59_0x564dd3['yellow'](_0x511d3e(0xf4)),_0x511d3e(0x234)),0x1;}await withSpinner(_0x511d3e(0x215),()=>_0x5c4ba8[_0x511d3e(0x14b)][_0x511d3e(0x172)](_0x21990b,{'revision':_0x41b16d}),{'verbose':_0x443907[_0x511d3e(0x1ab)]}),saveSessionContext({'workflow_project':_0x21990b['projectName']},_0x443907['session']),console[_0x511d3e(0x23a)](a59_0x564dd3[_0x511d3e(0xcd)]('✔\x20Pull\x20complete'));const _0x23ecdf=a59_0x156221[_0x511d3e(0x66)](process['cwd'](),_0x21990b[_0x511d3e(0xa4)])||'.';return console[_0x511d3e(0x23a)](a59_0x564dd3[_0x511d3e(0x6f)](_0x511d3e(0x196)+_0x23ecdf)),console['error'](a59_0x564dd3[_0x511d3e(0x6f)](_0x511d3e(0xd1)+_0x21990b['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x16a);['description']=a59_0x34b1fc(0x17e);async['execute'](_0x344b01){const _0x48beb3=a59_0x34b1fc,{options:_0x25a3be,args:_0x30127a,tdx:_0x5c814f}=_0x344b01,_0x12b29e=this['resolveProjectDir'](_0x30127a,_0x25a3be),_0x391d6b=_0x25a3be,{revision:_0x6faee8,skipValidation:_0x2e47bc,backfill:_0x59b05d}=_0x391d6b,_0x3ca0f9=_0x59b05d===undefined?undefined:!_0x59b05d;_0x25a3be['verbose']&&(_0x12b29e&&console[_0x48beb3(0x23a)](_0x48beb3(0x1bf)+_0x12b29e),_0x6faee8&&console[_0x48beb3(0x23a)](_0x48beb3(0x1a9)+_0x6faee8),_0x25a3be[_0x48beb3(0xa6)]&&console[_0x48beb3(0x23a)](_0x48beb3(0x1d1)),_0x2e47bc&&console[_0x48beb3(0x23a)](_0x48beb3(0x149)),_0x59b05d&&console['error'](_0x48beb3(0x236)));let _0xb4f166;try{_0xb4f166=await withSpinner(_0x48beb3(0x150),()=>_0x5c814f['workflow'][_0x48beb3(0x1ec)]({'sourceDir':_0x12b29e,'revision':_0x6faee8,'skipValidation':_0x2e47bc,'skipSchedule':_0x3ca0f9}),{'verbose':_0x25a3be[_0x48beb3(0x1ab)]});}catch(_0x5674b4){if(_0x5674b4 instanceof Error&&_0x5674b4['message'][_0x48beb3(0x228)](_0x48beb3(0xe6)))return console[_0x48beb3(0x23a)](a59_0x564dd3[_0x48beb3(0x1a4)](_0x48beb3(0x168)),_0x48beb3(0xea)),_0x25a3be[_0x48beb3(0x20b)]?console[_0x48beb3(0x23a)](a59_0x564dd3[_0x48beb3(0x6f)](_0x48beb3(0x14f)+_0x25a3be[_0x48beb3(0x20b)]+_0x48beb3(0xf8)+_0x25a3be[_0x48beb3(0x20b)]+'\x27')):console[_0x48beb3(0x23a)](a59_0x564dd3[_0x48beb3(0x6f)](_0x48beb3(0x133))),0x1;throw _0x5674b4;}const _0x350cab=_0xb4f166['data'];console['error'](_0x48beb3(0x109)+_0x350cab['projectName']),console[_0x48beb3(0x23a)](_0x48beb3(0xa9)+_0x350cab['sourceDir']),console[_0x48beb3(0x23a)]('\x20\x20Revision:\x20'+_0x350cab[_0x48beb3(0x22e)]),console['error'](_0x48beb3(0x146)+a59_0x564dd3[_0x48beb3(0xcd)]('+'+_0x350cab['summary'][_0x48beb3(0xb2)]+_0x48beb3(0xc2))+',\x20'+(a59_0x564dd3[_0x48beb3(0x204)]('~'+_0x350cab[_0x48beb3(0x1f8)]['modified']+_0x48beb3(0x232))+',\x20')+(a59_0x564dd3[_0x48beb3(0x1a4)]('-'+_0x350cab[_0x48beb3(0x1f8)][_0x48beb3(0x173)]+_0x48beb3(0x1a7))+',\x20')+(''+a59_0x564dd3['dim'](_0x350cab['summary']['unchanged']+_0x48beb3(0xa5))));for(const _0x2b89db of _0x350cab[_0x48beb3(0x135)]){_0x2b89db[_0x48beb3(0x14a)]===_0x48beb3(0xa7)&&_0x2b89db['diff']&&(console[_0x48beb3(0x23a)]('\x0a'+a59_0x564dd3[_0x48beb3(0x1ae)](_0x48beb3(0xb8)+_0x2b89db[_0x48beb3(0x11f)])),console[_0x48beb3(0x23a)](_0x2b89db[_0x48beb3(0x7e)]));}if(!_0x350cab[_0x48beb3(0x10e)])return console[_0x48beb3(0x23a)](a59_0x564dd3[_0x48beb3(0xcd)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x48beb3(0xe2)](_0x5c814f,_0x350cab[_0x48beb3(0x179)],_0x25a3be[_0x48beb3(0xc7)]),0x0;if(_0x25a3be[_0x48beb3(0xa6)])return console[_0x48beb3(0x23a)](a59_0x564dd3[_0x48beb3(0x204)](_0x48beb3(0xf5))),0x0;if(!_0x25a3be[_0x48beb3(0x100)]){if(!isInteractive())return console[_0x48beb3(0x23a)](a59_0x564dd3[_0x48beb3(0x1a4)](_0x48beb3(0x131)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a59_0x564dd3[_0x48beb3(0x6f)](_0x48beb3(0xbb))),0x1;const _0x269724=await confirmKey(_0x48beb3(0x1dc));if(!_0x269724)return console['error'](a59_0x564dd3[_0x48beb3(0x204)](_0x48beb3(0xf4)),_0x48beb3(0xc4)),0x1;}const _0x1fd621=await withSpinner(_0x48beb3(0x180),()=>_0x5c814f[_0x48beb3(0x14b)][_0x48beb3(0xb4)](_0x350cab),{'verbose':_0x25a3be[_0x48beb3(0x1ab)]}),_0x3d0723=_0x1fd621[_0x48beb3(0x138)];return console[_0x48beb3(0x23a)](a59_0x564dd3[_0x48beb3(0xcd)]('✔\x20Push\x20complete')),console[_0x48beb3(0x23a)](_0x48beb3(0x245)+_0x3d0723[_0x48beb3(0x162)]),console[_0x48beb3(0x23a)](_0x48beb3(0x189)+_0x3d0723[_0x48beb3(0x22e)]),await this[_0x48beb3(0xe2)](_0x5c814f,_0x3d0723[_0x48beb3(0x179)],_0x25a3be[_0x48beb3(0xc7)]),0x0;}}function a59_0x314e(){const _0x2327d4=['disableSchedule','\x20\x20Attempt\x20ID:\x20','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','Killing\x20attempt...','Disabling\x20schedule\x20#','.\x20Expected\x20format:\x20KEY=VALUE','TASK_NAME_WIDTH','setSecrets','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','projectId','size','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','Analyzing\x20project...','Session\x20','session','Error:','Usage:\x20workflow:delete\x20<project-name-or-id>','workflow:push','workflow:pull','workflow:secrets:delete','Session\x20not\x20found:\x20','localeCompare','Project\x20filter:\x20','Pushing\x20workflow\x20project...','bold','applyPullProject','deleted','fill','Invalid\x20format:\x20','\x0aApply\x20these\x20changes?','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x22?\x20This\x20cannot\x20be\x20undone.','projectName','fromTask','workflow:tasks','\x0a⚠\x20Project\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','start','Pushing\x20project...','Files\x20to\x20upload:\x20','From\x20task:\x20','durationMs','now','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','icon','executeCloneProject','81mYFePZ','\x20\x20Revision:\x20','\x20from\x20session\x20','Source\x20directory\x20is\x20required','workflowName','newProjectId','total','round','✔\x20Showing\x20','listSecrets','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','parseProjectWorkflowPattern','unknown','\x20\x20Location:\x20','format','nextTime','Key\x20cannot\x20be\x20empty','values','→\x20New\x20project:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x20to\x20see\x20detailed\x20logs','Task\x20graph:','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20schedule','padStart','workflow:kill','has','red','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','\x20deleted','sourceDir','Revision:\x20','🔄\x20','verbose','Project\x20name\x20is\x20required','getDate','cyan','✔\x20Clone\x20complete','POLL_INTERVAL_MS','Schedule\x20ID\x20is\x20required','workflow:attempt','replace','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','toLowerCase','status','success','Setting\x20','find','basename','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','getWorkflow','Target\x20directory:\x20','existingProjectId','Source\x20directory:\x20','Listing\x20workflow\x20projects...','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','MIN_TIMELINE_WIDTH','Source\x20project:\x20','match','deleteSecret','List\x20workflows','workflow:use','follow','323397MSyGvm','workflow:schedule:disable','358606AEHeTe','✔\x20Schedule\x20found','/app/workflows/','isNewProject','5WSeZwj','workflows','Dry\x20run:\x20yes','isDirectory','keys','\x20(system)','executeDryRun','Listing\x20secrets...','Deleting\x20secret...','duration','enableSchedule','Start\x20a\x20workflow\x20run','No\x20sessions\x20found','\x0aPush\x20these\x20changes?','\x0aDry\x20run\x20-\x20no\x20project\x20created','Workflow:','MAX_LABEL_COUNT','No\x20attempts\x20found','workflow:workflows','planned','Latest\x20session\x20has\x20no\x20attempt','every','Loading\x20session...','getHours','isArray','json','attemptId','session:','✔\x20Downloaded\x20','preparePushProject','Show\x20tasks\x20for\x20an\x20attempt','targetExists','sessions','\x20attempt','filter','end','\x20\x20New\x20attempt\x20ID:\x20','\x22\x20to\x20new\x20project\x20\x22','✔\x20Secret\x20\x27','blue','workflow:logs','summary','push','Attempt\x20ID:\x20','Listing\x20workflows...','select','Filter:\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','config','workflow:attempts','Retrying\x20session...','execute','yellow','workflow:upload','6769104pQZXuz','\x20(use\x20--limit\x20to\x20show\x20more)','buildTimelineData','get','lastAttempt','workflowProject','startedAt','Cloning\x20to\x20','set','→\x20Project:\x20','retryAttemptName','listProjectSchedules','Enable\x20a\x20workflow\x20schedule','requireProject','revision:\x20','Writing\x20files...','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','length','List\x20workflow\x20schedules','Workflow:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','prepareCloneProject','No\x20matching\x20sessions\x20found','Project\x20name:\x20','Setting\x20secret...','kill','Retry\x20a\x20session\x20or\x20attempt','\x20is\x20not\x20a\x20directory','721950KZqNqN','log','state','Session\x20time:\x20','MAX_POLL_ITERATIONS','Error:\x20Invalid\x20JSON\x20in\x20--params','includes','description','attempt','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','New\x20project\x20name:\x20','revision','write','✔\x20Pushed\x20','2299876YqaXrG','\x20modified','\x20session','-\x20no\x20files\x20written','substring','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','stringify','ICON_SPACING','download','error','pollTimeline','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','Key:\x20','(unknown)','📅\x20#','workflow:retry','List\x20workflow\x20attempts','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','✔\x20Deleted\x20project\x20','\x20\x20Project\x20ID:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','canceling','\x20next:\x20','Fetching\x20schedule\x20#','✔\x20Found\x20','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','context','skipValidation','key','white','sort','relative','No\x20attempts\x20found\x20for:\x20','No\x20projects\x20match\x20pattern:\x20','Updating\x20','nextRunTime','sessionId','renderSessionsTimeline','Auto-selected\x20latest\x20session:\x20','running','dim','Force:\x20yes','Listing\x20workflow\x20attempts...','No\x20attempts\x20found\x20in\x20project:\x20','Parameters:','tdx\x20wf\x20attempt\x20','LABEL_WIDTH_DIVISOR','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','jsonl','navigateSessionsInteractive','\x20sessions\x20','getMonth','name','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','limit','diff','No\x20sessions\x20found\x20for:\x20','utf-8','force','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','getFullYear','taskName','trimEnd','\x0a✔\x20Attempt\x20complete','No\x20workflows\x20found\x20in\x20project:\x20','resolveProjectId','resumeFrom','5014401vXiMvU','value','startTime','retryAttempt','task','\x27...','Select\x20a\x20session\x20to\x20view\x20timeline:','\x20enabled\x20(','No\x20workflows\x20found','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','Select\x20a\x20task\x20to\x20view\x20logs:','output','skipSchedule','reason','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Listing\x20schedules\x20for\x20','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Downloading\x20logs...','param','\x22\x20with\x20new\x20revision?','floor','logs','cancelRequested','\x20logs','\x20of\x20','/sessions/','targetDir','\x20unchanged','dryRun','modified','Downloading\x20project\x20','\x20\x20Source:\x20','Error:\x20Secret\x20key\x20is\x20required','list','Error:\x20Attempt\x20ID\x20is\x20required','sessionTime','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','repeat','MIN_LABEL_COUNT','map','new','8CXngbg','executePushProject','No\x20sessions\x20found\x20in\x20project:\x20','includeRetried','List\x20workflow\x20execution\x20sessions','---\x20','msPerChar','run','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','done','resolve','renderTimeline','startsWith','createdAt','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','\x20new','max','-\x20nothing\x20pushed','Secrets\x20to\x20set:\x20','project','site','Listing\x20workflow\x20sessions...','metadata','generateSessionTimelineRows','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','splice','green','title','4195104jnhgxq','resolveProject','\x20\x20Session\x20context\x20set\x20to:\x20','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','\x27\x20from\x20project\x20\x27','index','\x20\x20Project:\x20','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','workflow:secrets:list','Including\x20subtasks:\x20yes','tdx.json','\x20\x20Console:\x20','workflow:download','\x1b[1A\x1b[2K','workflow:run','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Warning:','Resolving\x20project\x20\x27','\x0a✔\x20Already\x20up\x20to\x20date','showWorkflowConsoleUrl','Select\x20a\x20workflow\x20to\x20run','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','params','No\x20workflow\x20tdx.json\x20found','toLocaleString','Parameters:\x20','Getting\x20attempt\x20tasks...','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','✔\x20Workflow\x20run\x20started','from','Pull\x20workflow\x20project\x20to\x20local\x20folder','No\x20sessions\x20with\x20timing\x20information','✔\x20Schedule\x20#','updatedAt','Getting\x20attempt\x20details...','✔\x20Workflow\x20project\x20context\x20cleared.','some','Cancelled','\x0aDry\x20run\x20-\x20nothing\x20pushed','LABEL_MIN_SPACING','join','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Kill\x20a\x20running\x20attempt','Fetching\x20log\x20files...','delete','clear','\x20(disabled)','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','renderSingleTimeline','yes','split','\x20\x20Target:\x20','Failed\x20to\x20fetch\x20attempt\x20data','...','min','✔\x20Project\x20updated','\x20has\x20no\x20attempts','Using\x20attempt\x20','✔\x20Project:\x20','finishedAt','isTTY','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20secrets\x20set\x20for\x20project\x20\x27','hasChanges','projects','Task\x20name:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Session\x20time:','GUTTER','✔\x20Workflow\x20project\x20set\x20to:\x20','Pattern:\x20','Attempt:\x20','columns','\x20\x20Files\x20extracted:\x20','newProjectName','getTime','Disable\x20a\x20workflow\x20schedule','workflow:schedule:enable','\x0aClone\x20\x22','fullName','path','ICON_WIDTH','session_id','stdout','Filter:\x20project=','Project:\x20','No\x20log\x20content\x20found','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Enabling\x20schedule\x20#','Error:\x20Project\x20name\x20is\x20required','all','sourceProjectName','displayLine','\x22\x20already\x20exists\x20(ID:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Resume\x20from:\x20','Error:\x20Invalid\x20parameter\x20format:\x20','\x0aError:','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','\x20\x20Workflow:\x20','changes','Usage:\x20tdx\x20wf\x20use\x20<project>','\x20secret','data','\x20\x20Next\x20run:\x20','toISOString','\x20-\x20','fileSize','\x20\x20Session\x20ID:\x20','window','table','(use\x20--limit\x20to\x20see\x20more)','\x0aFailed\x20to\x20fetch\x20attempt\x20data','listSchedules','Loading\x20workflows...','unchanged','pending','\x20\x20Changes:\x20','/attempt/','tasks','Validation:\x20skipped','type','workflow','stat','group_error','resolveProjectDir','Tip:\x20cd\x20to\x20workflows/','Analyzing\x20changes...','Pulling\x20project\x20','trim','MAX_TASKS_DISPLAY','cwd','\x20task','slice','attempts','Loading\x20sessions...'];a59_0x314e=function(){return _0x2327d4;};return a59_0x314e();}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]='workflow:clone';[a59_0x34b1fc(0x229)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a59_0x34b1fc(0x203)](_0xecdbdb){const _0x11b0bb=a59_0x34b1fc,{options:_0x379dd0,args:_0x44d631,tdx:_0x1e6499}=_0xecdbdb,_0xcda34f=this['resolveProjectDir'](_0x44d631,_0x379dd0),_0x41cf33=_0x379dd0['name'],_0xe76a31=_0x379dd0[_0x11b0bb(0x22e)],_0x591227=_0x379dd0[_0x11b0bb(0x24d)];if(!_0xcda34f)return console[_0x11b0bb(0x23a)](a59_0x564dd3[_0x11b0bb(0x1a4)](_0x11b0bb(0x168)),_0x11b0bb(0x18b)),console['error'](a59_0x564dd3[_0x11b0bb(0x6f)](_0x11b0bb(0x10c))),console['error'](a59_0x564dd3[_0x11b0bb(0x6f)](_0x11b0bb(0x1ff))),0x1;if(!_0x41cf33)return console[_0x11b0bb(0x23a)](a59_0x564dd3[_0x11b0bb(0x1a4)]('Error:'),_0x11b0bb(0x9a)),console['error'](a59_0x564dd3['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x379dd0['verbose']&&(console[_0x11b0bb(0x23a)](_0x11b0bb(0x1bf)+_0xcda34f),console['error'](_0x11b0bb(0x22d)+_0x41cf33),_0xe76a31&&console[_0x11b0bb(0x23a)](_0x11b0bb(0x1a9)+_0xe76a31),_0x379dd0[_0x11b0bb(0xa6)]&&console[_0x11b0bb(0x23a)]('Dry\x20run:\x20yes'),_0x591227&&console[_0x11b0bb(0x23a)](_0x11b0bb(0x149)));const _0x361bce=await withSpinner(_0x11b0bb(0x165),()=>_0x1e6499['workflow'][_0x11b0bb(0x21b)](_0xcda34f,_0x41cf33,{'revision':_0xe76a31,'skipValidation':_0x591227}),{'verbose':_0x379dd0[_0x11b0bb(0x1ab)]}),_0x349c3a=_0x361bce['data'];console[_0x11b0bb(0x23a)]('Source:\x20'+_0x349c3a[_0x11b0bb(0x1a8)]);_0x349c3a['sourceProjectName']&&console[_0x11b0bb(0x23a)](_0x11b0bb(0x1c3)+_0x349c3a[_0x11b0bb(0x12b)]);console[_0x11b0bb(0x23a)](_0x11b0bb(0x22d)+_0x349c3a[_0x11b0bb(0x119)]),console[_0x11b0bb(0x23a)](_0x11b0bb(0x1a9)+_0x349c3a['revision']),console[_0x11b0bb(0x23a)](_0x11b0bb(0x181)+_0x349c3a['fileCount']);_0x349c3a[_0x11b0bb(0x1ee)]&&(console[_0x11b0bb(0x23a)](a59_0x564dd3['yellow'](_0x11b0bb(0x17c)+_0x349c3a['newProjectName']+_0x11b0bb(0x12d)+_0x349c3a[_0x11b0bb(0x1be)]+')')),console['error'](a59_0x564dd3[_0x11b0bb(0x204)](_0x11b0bb(0x161))));if(_0x379dd0[_0x11b0bb(0xa6)])return console[_0x11b0bb(0x23a)](a59_0x564dd3[_0x11b0bb(0x204)](_0x11b0bb(0x1dd))),0x0;if(!_0x379dd0[_0x11b0bb(0x100)]){if(!isInteractive())return console[_0x11b0bb(0x23a)](a59_0x564dd3[_0x11b0bb(0x1a4)]('\x0aError:'),_0x11b0bb(0x246)),console[_0x11b0bb(0x23a)](a59_0x564dd3['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x10527a=_0x349c3a[_0x11b0bb(0x12b)]||a59_0x156221[_0x11b0bb(0x1ba)](_0xcda34f),_0x33bb48=_0x349c3a[_0x11b0bb(0x1ee)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x41cf33+_0x11b0bb(0x9d):_0x11b0bb(0x11d)+_0x10527a+_0x11b0bb(0x1f4)+_0x41cf33+'\x22?',_0xb4c4a4=await confirmKey(_0x33bb48);if(!_0xb4c4a4)return console['error'](a59_0x564dd3[_0x11b0bb(0x204)]('Cancelled')),0x1;}const _0x5d3968=await withSpinner(_0x349c3a[_0x11b0bb(0x1ee)]?_0x11b0bb(0x69)+_0x41cf33+_0x11b0bb(0x104):_0x11b0bb(0x20d)+_0x41cf33+'...',()=>_0x1e6499[_0x11b0bb(0x14b)][_0x11b0bb(0x187)](_0x349c3a),{'verbose':_0x379dd0['verbose']}),_0x3084d5=_0x5d3968[_0x11b0bb(0x138)];return console[_0x11b0bb(0x23a)](a59_0x564dd3['green'](_0x349c3a[_0x11b0bb(0x1ee)]?_0x11b0bb(0x106):_0x11b0bb(0x1af))),console[_0x11b0bb(0x23a)](_0x11b0bb(0xd5)+_0x3084d5[_0x11b0bb(0x119)]),console[_0x11b0bb(0x23a)](_0x11b0bb(0x245)+_0x3084d5[_0x11b0bb(0x18d)]),console[_0x11b0bb(0x23a)](_0x11b0bb(0x189)+_0x3084d5[_0x11b0bb(0x22e)]),await this[_0x11b0bb(0xe2)](_0x1e6499,_0x3084d5[_0x11b0bb(0x119)],_0x379dd0['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]='workflow:delete';[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x22c);async[a59_0x34b1fc(0x203)](_0x3fce1b){const _0x4759d3=a59_0x34b1fc,{options:_0xbd6e4f,args:_0x43e6a2,tdx:_0x372e51}=_0x3fce1b,_0x5ddb78=_0x43e6a2[0x0];if(!_0x5ddb78)return console['error'](_0x4759d3(0x12e)),console[_0x4759d3(0x23a)](_0x4759d3(0x169)),0x1;_0xbd6e4f[_0x4759d3(0x1ab)]&&console['error'](_0x4759d3(0x124)+_0x5ddb78);if(!_0xbd6e4f[_0x4759d3(0x100)]){if(!isInteractive())return console[_0x4759d3(0x23a)](a59_0x564dd3[_0x4759d3(0x1a4)](_0x4759d3(0x131)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x4759d3(0x23a)](a59_0x564dd3['dim'](_0x4759d3(0xbb))),0x1;const _0x345f88=await confirmKey(_0x4759d3(0xe4)+_0x5ddb78+_0x4759d3(0x178));if(!_0x345f88)return console[_0x4759d3(0x23a)](a59_0x564dd3[_0x4759d3(0x204)](_0x4759d3(0xf4))),0x1;}const _0x156969=await withSpinner('Deleting\x20project\x20'+_0x5ddb78+'...',()=>_0x372e51['workflow'][_0x4759d3(0xfb)](_0x5ddb78),{'verbose':_0xbd6e4f[_0x4759d3(0x1ab)]}),_0x1336cb=_0x156969['data'];return console[_0x4759d3(0x23a)](_0x4759d3(0x244)+_0x1336cb[_0x4759d3(0x179)]),console[_0x4759d3(0x23a)](_0x4759d3(0x245)+_0x1336cb[_0x4759d3(0x162)]),0x0;}}export function parseKeyValue(_0x6de4ad){const _0x32a7b8=a59_0x34b1fc,_0x41044b=_0x6de4ad['indexOf']('=');if(_0x41044b===-0x1)throw new Error(_0x32a7b8(0x175)+_0x6de4ad+_0x32a7b8(0x15e));const _0x16db05=_0x6de4ad[_0x32a7b8(0x235)](0x0,_0x41044b),_0x51ada7=_0x6de4ad['substring'](_0x41044b+0x1);if(!_0x16db05)throw new Error(_0x32a7b8(0x199));return{'key':_0x16db05,'value':_0x51ada7};}function a59_0x2d50(_0x4be168,_0x591872){_0x4be168=_0x4be168-0x65;const _0x314e2e=a59_0x314e();let _0x2d5078=_0x314e2e[_0x4be168];return _0x2d5078;}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0xd7);['description']='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a59_0x34b1fc(0x203)](_0x1b3e09){const _0x10f02c=a59_0x34b1fc,{options:_0x363b12,args:_0x582f2b,tdx:_0x1e9b87}=_0x1b3e09,_0xd1ebfd=this[_0x10f02c(0x213)](_0x582f2b,_0x363b12);if(!_0xd1ebfd)return 0x1;_0x363b12['verbose']&&console[_0x10f02c(0x23a)](_0x10f02c(0x124)+_0xd1ebfd);const _0x52b2b7=await withSpinner(_0x10f02c(0x1d6),()=>_0x1e9b87[_0x10f02c(0x14b)][_0x10f02c(0x191)](_0xd1ebfd),{'verbose':_0x363b12['verbose']}),{secrets:_0xa29f93}=_0x52b2b7[_0x10f02c(0x138)];return console[_0x10f02c(0x23a)](_0x10f02c(0x24a)+_0xa29f93[_0x10f02c(0x217)]+_0x10f02c(0x137)+(_0xa29f93['length']!==0x1?'s':'')),await handleSDKOutput(_0xa29f93,_0x363b12),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]='workflow:secrets:set';[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x1a5);async['execute'](_0x3805b9){const _0x4b38f6=a59_0x34b1fc,{options:_0x35719a,args:_0x727768,tdx:_0x3d749a}=_0x3805b9;let _0x3a4352,_0x34e564;if(_0x727768[_0x4b38f6(0x217)]>=0x1&&!_0x727768[0x0][_0x4b38f6(0x228)]('='))_0x3a4352=_0x727768[0x0],_0x34e564=_0x727768[_0x4b38f6(0x156)](0x1);else{if(_0x727768[_0x4b38f6(0x217)]>=0x1&&_0x35719a[_0x4b38f6(0x20b)])_0x3a4352=_0x35719a[_0x4b38f6(0x20b)],_0x34e564=_0x727768;else return _0x727768[_0x4b38f6(0x217)]>=0x1?(console[_0x4b38f6(0x23a)](_0x4b38f6(0x129)),console['error'](_0x4b38f6(0x185)),0x1):(console['error'](_0x4b38f6(0x126)),console[_0x4b38f6(0x23a)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x34e564[_0x4b38f6(0x217)]===0x0)return console['error']('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x4b38f6(0x23a)](_0x4b38f6(0x192)),0x1;const _0x22731a={};try{for(const _0xde08fd of _0x34e564){const {key:_0x328062,value:_0x1ca621}=parseKeyValue(_0xde08fd);_0x22731a[_0x328062]=_0x1ca621;}}catch(_0x228745){return _0x228745 instanceof Error&&console[_0x4b38f6(0x23a)](a59_0x564dd3[_0x4b38f6(0x1a4)]('Error:'),_0x228745['message']),0x1;}const _0x38bf50=Object[_0x4b38f6(0x1d3)](_0x22731a);_0x35719a[_0x4b38f6(0x1ab)]&&(console['error']('Project:\x20'+_0x3a4352),console['error'](_0x4b38f6(0xc5)+_0x38bf50[_0x4b38f6(0xf7)](',\x20')));const _0x315a8b=await withSpinner(_0x38bf50[_0x4b38f6(0x217)]===0x1?_0x4b38f6(0x21e):_0x4b38f6(0x1b8)+_0x38bf50[_0x4b38f6(0x217)]+'\x20secrets...',()=>_0x3d749a[_0x4b38f6(0x14b)][_0x4b38f6(0x160)](_0x3a4352,_0x22731a),{'verbose':_0x35719a[_0x4b38f6(0x1ab)]}),_0x84b7c4=_0x315a8b[_0x4b38f6(0x138)];return console[_0x4b38f6(0x23a)](_0x38bf50['length']===0x1?_0x4b38f6(0x1f5)+_0x84b7c4[_0x4b38f6(0x1d3)][0x0]+_0x4b38f6(0x93)+_0x84b7c4['projectName']+'\x27':'✔\x20'+_0x84b7c4[_0x4b38f6(0x1d3)][_0x4b38f6(0x217)]+_0x4b38f6(0x10d)+_0x84b7c4[_0x4b38f6(0x179)]+'\x27'),(_0x35719a[_0x4b38f6(0x1e8)]||_0x35719a[_0x4b38f6(0x77)])&&await handleSingleObjectOutput(_0x84b7c4,_0x35719a),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x16c);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0xde);async[a59_0x34b1fc(0x203)](_0xf74d40){const _0x42593b=a59_0x34b1fc,{options:_0x6e080a,args:_0x458cdf,tdx:_0x162372}=_0xf74d40;let _0x3d9ca3,_0x23860d;if(_0x458cdf[_0x42593b(0x217)]>=0x2)_0x3d9ca3=_0x458cdf[0x0],_0x23860d=_0x458cdf[0x1];else{if(_0x458cdf[_0x42593b(0x217)]===0x1&&_0x6e080a[_0x42593b(0x20b)])_0x3d9ca3=_0x6e080a[_0x42593b(0x20b)],_0x23860d=_0x458cdf[0x0];else return _0x458cdf[_0x42593b(0x217)]===0x1?(console[_0x42593b(0x23a)](_0x42593b(0x129)),console[_0x42593b(0x23a)](_0x42593b(0x185)),0x1):(console[_0x42593b(0x23a)](_0x42593b(0xaa)),console[_0x42593b(0x23a)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x6e080a[_0x42593b(0x1ab)]&&(console[_0x42593b(0x23a)]('Project:\x20'+_0x3d9ca3),console[_0x42593b(0x23a)](_0x42593b(0x23d)+_0x23860d));if(!_0x6e080a[_0x42593b(0x100)]){if(!isInteractive())return console[_0x42593b(0x23a)](a59_0x564dd3[_0x42593b(0x1a4)](_0x42593b(0x131)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x42593b(0x23a)](a59_0x564dd3[_0x42593b(0x6f)](_0x42593b(0xbb))),0x1;const _0x1f2c21=await confirmKey(_0x42593b(0x216)+_0x23860d+_0x42593b(0xd3)+_0x3d9ca3+'\x27?');if(!_0x1f2c21)return console[_0x42593b(0x23a)](a59_0x564dd3[_0x42593b(0x204)]('Cancelled')),0x1;}const _0x5962f6=await withSpinner(_0x42593b(0x1d7),()=>_0x162372['workflow'][_0x42593b(0x1c5)](_0x3d9ca3,_0x23860d),{'verbose':_0x6e080a[_0x42593b(0x1ab)]}),_0x23776d=_0x5962f6[_0x42593b(0x138)];return console[_0x42593b(0x23a)](_0x42593b(0x1f5)+_0x23776d['key']+_0x42593b(0x1a6)+_0x23776d['projectName']+'\x27'),(_0x6e080a[_0x42593b(0x1e8)]||_0x6e080a[_0x42593b(0x77)])&&await handleSingleObjectOutput(_0x23776d,_0x6e080a),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(_0x5e51f8){const _0x2e5b40=a59_0x34b1fc,_0xd60a62=Math[_0x2e5b40(0x9e)](_0x5e51f8/0x3e8),_0x4cce52=Math[_0x2e5b40(0x9e)](_0xd60a62/0x3c),_0x1971a1=Math[_0x2e5b40(0x9e)](_0x4cce52/0x3c),_0x4ded59=Math[_0x2e5b40(0x9e)](_0x1971a1/0x18);if(_0x4ded59>0x0){const _0x5dd8b3=_0x1971a1%0x18;return _0x5dd8b3>0x0?_0x4ded59+'d\x20'+_0x5dd8b3+'h':_0x4ded59+'d';}else{if(_0x1971a1>0x0){const _0x58d962=_0x4cce52%0x3c;return _0x58d962>0x0?_0x1971a1+'h\x20'+_0x58d962+'m':_0x1971a1+'h';}else{if(_0x4cce52>0x0){const _0x5c403d=_0xd60a62%0x3c;return _0x5c403d>0x0?_0x4cce52+'m\x20'+_0x5c403d+'s':_0x4cce52+'m';}else return _0xd60a62+'s';}}}function formatTimestamp(_0x36d31a,_0x2a184){const _0x2382c7=a59_0x34b1fc,_0xdf1ca2=new Date(_0x36d31a),_0x16521e=String(_0xdf1ca2[_0x2382c7(0x1e6)]())[_0x2382c7(0x1a1)](0x2,'0'),_0x36c9d3=String(_0xdf1ca2['getMinutes']())[_0x2382c7(0x1a1)](0x2,'0'),_0x16dedc=_0x16521e+':'+_0x36c9d3,_0x18ae53=_0xdf1ca2['getFullYear']()===_0x2a184[_0x2382c7(0x83)]()&&_0xdf1ca2[_0x2382c7(0x7a)]()===_0x2a184['getMonth']()&&_0xdf1ca2[_0x2382c7(0x1ad)]()===_0x2a184['getDate']();if(_0x18ae53)return _0x16dedc;else{const _0x3aa18c=String(_0xdf1ca2[_0x2382c7(0x7a)]()+0x1)['padStart'](0x2,'0'),_0x42d15a=String(_0xdf1ca2['getDate']())[_0x2382c7(0x1a1)](0x2,'0');return _0x3aa18c+'-'+_0x42d15a+'\x20'+_0x16dedc;}}function formatDate(_0x396d49){const _0x113645=a59_0x34b1fc,_0x2d8c0d=_0x396d49['getFullYear'](),_0x40db93=String(_0x396d49[_0x113645(0x7a)]()+0x1)[_0x113645(0x1a1)](0x2,'0'),_0x4c088a=String(_0x396d49[_0x113645(0x1ad)]())[_0x113645(0x1a1)](0x2,'0');return _0x2d8c0d+'-'+_0x40db93+'-'+_0x4c088a;}function getTaskStateIcon(_0x26ed16){const _0x22db91={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x22db91[_0x26ed16]||'⚪';}function getBarChar(_0x3fdf1b){const _0x59f864=a59_0x34b1fc;return _0x3fdf1b===_0x59f864(0x23a)||_0x3fdf1b==='group_error'?'×':'─';}function getBarColor(_0x575b1d){const _0x44c235=a59_0x34b1fc,_0x36eb29={'success':a59_0x564dd3['green'],'error':a59_0x564dd3['red'],'group_error':a59_0x564dd3[_0x44c235(0x1a4)],'running':a59_0x564dd3['blue'],'blocked':a59_0x564dd3['yellow'],'planned':a59_0x564dd3[_0x44c235(0x6f)],'canceling':a59_0x564dd3['yellow']};return _0x36eb29[_0x575b1d]||a59_0x564dd3[_0x44c235(0x24f)];}function parseTaskName(_0xa1903e){const _0x561ee3=a59_0x34b1fc;let _0x220ca5=_0xa1903e[_0x561ee3(0x1b3)](/^\++/,'');const _0x3854e7=_0x220ca5[_0x561ee3(0x101)]('+'),_0x5dce92=_0x3854e7[_0x561ee3(0x217)]>0x1?_0x3854e7[_0x561ee3(0x217)]-0x2:0x0,_0x332488=_0x3854e7[_0x3854e7[_0x561ee3(0x217)]-0x1]||_0x220ca5;return{'level':_0x5dce92,'name':'+'+_0x332488};}function truncateTaskName(_0x53d2e9,_0x40e89b){const _0x2ff641=a59_0x34b1fc,_0x2695e9=stringWidth(_0x53d2e9);if(_0x2695e9<=_0x40e89b)return _0x53d2e9;let _0x5164a2=_0x53d2e9;while(stringWidth(_0x5164a2+'…')>_0x40e89b&&_0x5164a2[_0x2ff641(0x217)]>0x0){_0x5164a2=_0x5164a2['slice'](0x0,-0x1);}return _0x5164a2+'…';}function calculateTimeScale(_0x49f217,_0x1f3b3f){const _0x4bd3a8=a59_0x34b1fc;return{'startTime':_0x49f217['start'],'endTime':_0x49f217[_0x4bd3a8(0x1f2)],'durationMs':_0x49f217['duration'],'msPerChar':_0x49f217[_0x4bd3a8(0x1d8)]/_0x1f3b3f};}function timeToPosition(_0xea8af3,_0x4198b8,_0x866a7f){const _0x131859=a59_0x34b1fc,_0x31fd89=_0xea8af3-_0x4198b8['startTime'],_0x17462b=Math[_0x131859(0x9e)](_0x31fd89/_0x4198b8[_0x131859(0xb9)]);return Math['max'](0x0,Math['min'](_0x17462b,_0x866a7f));}function renderTimeAxis(_0x114611,_0x3548b5){const _0x269d05=a59_0x34b1fc,_0x4e0f49=Math['min'](TIMELINE_CONFIG[_0x269d05(0x1df)],Math[_0x269d05(0xc3)](TIMELINE_CONFIG[_0x269d05(0xb0)],Math[_0x269d05(0x9e)](_0x3548b5/TIMELINE_CONFIG[_0x269d05(0x75)]))),_0x417257=_0x114611[_0x269d05(0x183)]/(_0x4e0f49-0x1),_0x19a2b2=new Date(_0x114611[_0x269d05(0x8c)]),_0xa6dd62=[];for(let _0x3cd0bc=0x0;_0x3cd0bc<_0x4e0f49;_0x3cd0bc++){const _0x45c563=_0x114611[_0x269d05(0x8c)]+_0x3cd0bc*_0x417257,_0x45d8f3=timeToPosition(_0x45c563,_0x114611,_0x3548b5),_0x219f4f=formatTimestamp(_0x45c563,_0x19a2b2);_0xa6dd62['push']({'pos':_0x45d8f3,'text':_0x219f4f});}const _0x191cf2=new Array(_0x3548b5)[_0x269d05(0x174)]('\x20');let _0x4f424d=-0x1;for(const {pos:_0x1f1c14,text:_0x1a7d42}of _0xa6dd62){let _0x11d462=Math[_0x269d05(0xc3)](0x0,_0x1f1c14-Math[_0x269d05(0x9e)](_0x1a7d42['length']/0x2));_0x11d462<=_0x4f424d+TIMELINE_CONFIG[_0x269d05(0xf6)]&&(_0x11d462=_0x4f424d+TIMELINE_CONFIG[_0x269d05(0xf6)]+0x1);_0x11d462+_0x1a7d42['length']>_0x3548b5&&(_0x11d462=_0x3548b5-_0x1a7d42[_0x269d05(0x217)]);if(_0x11d462>=0x0&&_0x11d462+_0x1a7d42[_0x269d05(0x217)]<=_0x3548b5&&_0x11d462>_0x4f424d){for(let _0x2adf50=0x0;_0x2adf50<_0x1a7d42[_0x269d05(0x217)];_0x2adf50++){_0x191cf2[_0x11d462+_0x2adf50]=_0x1a7d42[_0x2adf50];}_0x4f424d=_0x11d462+_0x1a7d42[_0x269d05(0x217)]-0x1;}}return _0x191cf2[_0x269d05(0xf7)]('');}function renderTaskRow(_0x49503c,_0xdaf69b,_0x598071,_0x582991){const _0x5c9967=a59_0x34b1fc,{level:_0x1c38da,name:_0x1cb0bd}=parseTaskName(_0x49503c[_0x5c9967(0x7b)]),_0x28d188='\x20'[_0x5c9967(0xaf)](_0x1c38da),_0xb416e8=_0x49503c[_0x5c9967(0x13e)]?'('+formatElapsed(_0x49503c[_0x5c9967(0x13e)][_0x5c9967(0x1d8)])+')':'',_0x4199ee=stringWidth(_0xb416e8),_0x199de7=_0x1c38da*0x1,_0x4ece61=_0x582991-_0x199de7-_0x4199ee-0x1,_0x70da8=truncateTaskName(_0x1cb0bd,_0x4ece61),_0x1d99b7=_0x28d188+_0x70da8,_0x29097b=stringWidth(_0x1d99b7),_0x3271e9=_0x582991-_0x29097b-_0x4199ee,_0x5c675a=_0x1d99b7+'\x20'[_0x5c9967(0xaf)](Math['max'](0x1,_0x3271e9))+a59_0x564dd3[_0x5c9967(0x6f)](_0xb416e8),_0x1ea5c6=getTaskStateIcon(_0x49503c[_0x5c9967(0x224)]),_0x5b76b7=new Array(_0x598071)['fill']('\x20');if(_0x49503c['window']){const _0x3e9f3d=timeToPosition(_0x49503c[_0x5c9967(0x13e)][_0x5c9967(0x17f)],_0xdaf69b,_0x598071),_0x4d01de=timeToPosition(_0x49503c['window'][_0x5c9967(0x1f2)],_0xdaf69b,_0x598071),_0x3173d3=getBarChar(_0x49503c[_0x5c9967(0x224)]),_0x1ca0d5=Math[_0x5c9967(0xc3)](_0x3e9f3d+0x1,_0x4d01de);for(let _0x55a88f=_0x3e9f3d;_0x55a88f<Math['min'](_0x1ca0d5,_0x598071);_0x55a88f++){_0x5b76b7[_0x55a88f]=_0x3173d3;}}const _0x12e640=getBarColor(_0x49503c[_0x5c9967(0x224)]),_0x14f29d=_0x5b76b7[_0x5c9967(0xb1)](_0x14a53d=>_0x14a53d==='\x20'?'\x20':_0x12e640(_0x14a53d))[_0x5c9967(0xf7)]('');return _0x1ea5c6+'\x20'+_0x5c675a+'│'+_0x14f29d+'│';}function calculateStats(_0x3bdeb0){const _0x19c845=a59_0x34b1fc,_0x2565fa={'total':_0x3bdeb0['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x5ae07d of _0x3bdeb0){if(_0x5ae07d[_0x19c845(0x224)]==='success')_0x2565fa[_0x19c845(0x1b7)]++;else{if(_0x5ae07d['state']==='error'||_0x5ae07d[_0x19c845(0x224)]===_0x19c845(0x14d))_0x2565fa[_0x19c845(0x23a)]++;else _0x5ae07d[_0x19c845(0x224)]==='running'?_0x2565fa['running']++:_0x2565fa[_0x19c845(0x145)]++;}}return _0x2565fa;}function formatStats(_0x29b49e){const _0x4cd9a2=a59_0x34b1fc;return['Total:\x20'+_0x29b49e[_0x4cd9a2(0x18e)],'✅\x20'+_0x29b49e[_0x4cd9a2(0x1b7)],'❌\x20'+_0x29b49e[_0x4cd9a2(0x23a)],_0x4cd9a2(0x1aa)+_0x29b49e[_0x4cd9a2(0x6e)],'⏳\x20'+_0x29b49e[_0x4cd9a2(0x145)]][_0x4cd9a2(0xf7)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']='workflow:timeline';[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x19f);async[a59_0x34b1fc(0x203)](_0x11a530){const _0x417e2b=a59_0x34b1fc,{options:_0x1fe10c,args:_0x24934b,tdx:_0x32e27e}=_0x11a530;let _0x46e662,_0x1faa5a,_0xdbaa98=![];if(_0x24934b[0x0]){if(_0x24934b[0x0][_0x417e2b(0x228)]('.')){const _0x3cddd9=this[_0x417e2b(0x194)](_0x24934b,_0x1fe10c);if(!_0x3cddd9)return 0x1;_0x46e662=_0x3cddd9[_0x417e2b(0x179)],_0x1faa5a=_0x3cddd9['workflowName'];}else{_0x1faa5a=_0x24934b[0x0],_0x46e662=_0x1fe10c[_0x417e2b(0x20b)];if(!_0x46e662)return console[_0x417e2b(0x23a)](a59_0x564dd3[_0x417e2b(0x1a4)](_0x417e2b(0x168)),_0x417e2b(0x242)),0x1;_0xdbaa98=!![];}}else{const _0x4d7618=this[_0x417e2b(0x194)](_0x24934b,_0x1fe10c);if(!_0x4d7618)return 0x1;_0x46e662=_0x4d7618['projectName'],_0x1faa5a=_0x4d7618[_0x417e2b(0x18c)];}if(_0x1fe10c['verbose']){if(_0x46e662&&_0x1faa5a)console['error']('Filter:\x20'+_0x46e662+'.'+_0x1faa5a);else _0x46e662&&console[_0x417e2b(0x23a)]('Filter:\x20project='+_0x46e662);}const _0x50409a=_0x1fe10c[_0x417e2b(0x1e9)],_0x3fffdf=_0x1fe10c['sessionId'];if(_0x50409a){_0x3fffdf&&console[_0x417e2b(0x23a)](a59_0x564dd3[_0x417e2b(0x204)](_0x417e2b(0xdf)),_0x417e2b(0xae));const _0x1bf3e1=_0x1fe10c[_0x417e2b(0x1c8)];return _0x1bf3e1?await this[_0x417e2b(0x23b)](_0x11a530,_0x50409a):await this[_0x417e2b(0xff)](_0x11a530,_0x50409a,_0x1fe10c),0x0;}if(_0x3fffdf){const _0x23f29c=await withSpinner(_0x417e2b(0x1e5),()=>_0x32e27e[_0x417e2b(0x14b)]['sessions']({'projectName':_0x46e662,'workflowName':_0x1faa5a,'limit':0x64}),{'verbose':_0x1fe10c[_0x417e2b(0x1ab)]}),_0xdbe941=_0x23f29c[_0x417e2b(0x138)][_0x417e2b(0x1b9)](_0x5f011c=>_0x5f011c['id']===_0x3fffdf);if(!_0xdbe941)return console['error'](a59_0x564dd3[_0x417e2b(0x1a4)](_0x417e2b(0x168)),_0x417e2b(0x16d)+_0x3fffdf),0x1;if(!_0xdbe941['lastAttempt']?.['id'])return console['error'](a59_0x564dd3[_0x417e2b(0x1a4)](_0x417e2b(0x168)),_0x417e2b(0x166)+_0x3fffdf+_0x417e2b(0x107)),0x1;const _0x11146e=_0xdbe941[_0x417e2b(0x20a)]['id'];_0x1fe10c[_0x417e2b(0x1ab)]&&console['error'](_0x417e2b(0x108)+_0x11146e+_0x417e2b(0x18a)+_0x3fffdf);const _0x4a0420=_0x1fe10c['follow'];return _0x4a0420?await this[_0x417e2b(0x23b)](_0x11a530,_0x11146e):await this['renderSingleTimeline'](_0x11a530,_0x11146e,_0x1fe10c),0x0;}const _0x38e657=await withSpinner(_0x417e2b(0x158),()=>_0x32e27e[_0x417e2b(0x14b)]['sessions']({'projectName':_0x46e662,'workflowName':_0x1faa5a,'limit':_0x1fe10c[_0x417e2b(0x7d)]||0x32}),{'verbose':_0x1fe10c['verbose']}),_0x523e28=_0x38e657['data'];if(_0x523e28[_0x417e2b(0x217)]===0x0){if(_0x46e662&&_0x1faa5a)console['error'](_0x417e2b(0x7f)+_0x46e662+'.'+_0x1faa5a);else _0x46e662?console[_0x417e2b(0x23a)](_0x417e2b(0xb5)+_0x46e662):(console[_0x417e2b(0x23a)]('No\x20workflow\x20sessions\x20found'),console['error'](a59_0x564dd3[_0x417e2b(0x6f)](_0x417e2b(0x127))));return 0x0;}_0x523e28[_0x417e2b(0x65)]((_0x4b76a,_0x21fcd3)=>{const _0x10471d=_0x417e2b,_0x18b826=_0x4b76a[_0x10471d(0xad)]||'',_0x3df45b=_0x21fcd3[_0x10471d(0xad)]||'';return _0x3df45b['localeCompare'](_0x18b826);});if(_0x1fe10c[_0x417e2b(0x1e8)]||_0x1fe10c[_0x417e2b(0x77)])return await handleSDKOutput(_0x523e28,_0x1fe10c),0x0;let _0x8d7e12;if(_0xdbaa98){const _0x3e2cb7=_0x523e28[0x0];if(!_0x3e2cb7['lastAttempt']?.['id'])return console[_0x417e2b(0x23a)](_0x417e2b(0x1e3)),0x0;_0x8d7e12=_0x3e2cb7[_0x417e2b(0x20a)]['id'],_0x1fe10c['verbose']&&console[_0x417e2b(0x23a)](_0x417e2b(0x6d)+_0x3e2cb7['sessionTime']);}else{const _0x403c5e=_0x523e28['map'](_0x4086b7=>{const _0x39963b=_0x417e2b,_0x5dbab1=getAttemptStatusDisplay(_0x4086b7[_0x39963b(0x20a)]);return{'title':_0x4086b7[_0x39963b(0xc6)]?.[_0x39963b(0x7b)]+'.'+_0x4086b7[_0x39963b(0x14b)]?.[_0x39963b(0x7b)]+_0x39963b(0x13b)+_0x4086b7[_0x39963b(0xad)]+'\x20'+_0x5dbab1[_0x39963b(0x186)],'value':_0x4086b7[_0x39963b(0x20a)]?.['id']||'','description':_0x5dbab1['text']};}),_0xa7cf54=await a59_0x17b23b({'type':_0x417e2b(0x1fc),'name':_0x417e2b(0x1e9),'message':_0x417e2b(0x90),'choices':_0x403c5e['filter'](_0x22a94c=>_0x22a94c[_0x417e2b(0x8b)]!=='')});if(!_0xa7cf54[_0x417e2b(0x1e9)])return 0x0;_0x8d7e12=_0xa7cf54[_0x417e2b(0x1e9)];}const _0x39f49f=_0x1fe10c[_0x417e2b(0x1c8)];return _0x39f49f?await this[_0x417e2b(0x23b)](_0x11a530,_0x8d7e12):await this[_0x417e2b(0xff)](_0x11a530,_0x8d7e12,_0x1fe10c),0x0;}async['renderSingleTimeline'](_0x57f03e,_0x3694dd,_0x44ff2b){const _0x3d309b=a59_0x34b1fc,{tdx:_0xda87f4}=_0x57f03e;let _0x2053d4,_0x121486;try{[_0x2053d4,_0x121486]=await Promise['all']([_0xda87f4['workflow'][_0x3d309b(0x22a)](_0x3694dd),_0xda87f4[_0x3d309b(0x14b)][_0x3d309b(0x148)](_0x3694dd,![])]);}catch(_0x64e84a){console[_0x3d309b(0x23a)](a59_0x564dd3[_0x3d309b(0x1a4)](_0x3d309b(0x103)));_0x44ff2b[_0x3d309b(0x1ab)]&&console['error'](_0x64e84a);throw _0x64e84a;}if(_0x44ff2b[_0x3d309b(0x1e8)]||_0x44ff2b[_0x3d309b(0x77)]){const _0x478ffb=this[_0x3d309b(0x208)](_0x2053d4,_0x121486);await handleSDKOutput([_0x478ffb],_0x44ff2b);return;}const _0x2885fd=_0xda87f4['context'][_0x3d309b(0xc7)],_0x86433b=this[_0x3d309b(0xbe)](_0x2053d4,_0x121486,_0x2885fd);console[_0x3d309b(0x223)](_0x86433b);}async[a59_0x34b1fc(0x23b)](_0x2744ae,_0x3a4df4){const _0x472b85=a59_0x34b1fc,{tdx:_0x21c886}=_0x2744ae,_0x5a4fda=TIMELINE_CONFIG[_0x472b85(0x1b0)],_0x20317d=TIMELINE_CONFIG[_0x472b85(0x226)];let _0x39f19c=0x0;while(_0x39f19c<_0x20317d){process['stdout'][_0x472b85(0x10b)]&&process[_0x472b85(0x122)][_0x472b85(0x22f)]('\x1Bc');let _0x524eb5,_0x3ee0d9;try{[_0x524eb5,_0x3ee0d9]=await Promise[_0x472b85(0x12a)]([_0x21c886[_0x472b85(0x14b)]['attempt'](_0x3a4df4),_0x21c886[_0x472b85(0x14b)]['tasks'](_0x3a4df4,![])]);}catch(_0x335c72){console[_0x472b85(0x23a)](a59_0x564dd3[_0x472b85(0x1a4)](_0x472b85(0x141)));_0x39f19c>0x0&&console[_0x472b85(0x23a)](a59_0x564dd3[_0x472b85(0x6f)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x39f19c));throw _0x335c72;}const _0x1fb99b=_0x21c886[_0x472b85(0x24c)]['site'],_0x5e5865=this[_0x472b85(0xbe)](_0x524eb5,_0x3ee0d9,_0x1fb99b);console[_0x472b85(0x223)](_0x5e5865);const _0x4f7695=_0x524eb5[_0x472b85(0xbc)]&&_0x3ee0d9[_0x472b85(0x1e4)](_0x25238b=>_0x25238b[_0x472b85(0x224)]!==_0x472b85(0x6e)&&_0x25238b[_0x472b85(0x224)]!==_0x472b85(0x1e2));if(_0x4f7695){console[_0x472b85(0x23a)](a59_0x564dd3['green'](_0x472b85(0x86)));break;}console[_0x472b85(0x23a)](a59_0x564dd3[_0x472b85(0x6f)]('\x0aPolling...\x20('+_0x39f19c*0x2+_0x472b85(0x24b))),await new Promise(_0xcf8387=>setTimeout(_0xcf8387,_0x5a4fda)),_0x39f19c++;}_0x39f19c>=_0x20317d&&console['error'](a59_0x564dd3[_0x472b85(0x204)](_0x472b85(0x164)));}[a59_0x34b1fc(0xbe)](_0x273aec,_0x2ab67b,_0x4f2c9e){const _0x313d72=a59_0x34b1fc,_0x53d9df=[],_0xa7ac31=TIMELINE_CONFIG[_0x313d72(0x15f)],_0x95d1a3=0x5,_0x59ea05=process['stdout'][_0x313d72(0x117)]||0x78,_0x590413=_0x59ea05-_0xa7ac31-_0x95d1a3,_0x3d22e2=Math[_0x313d72(0xc3)](TIMELINE_CONFIG[_0x313d72(0x1c2)],Math['min'](_0x590413,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x1b6ab9=new Date(_0x273aec[_0x313d72(0xc0)])[_0x313d72(0x11a)](),_0x182127=_0x273aec[_0x313d72(0x10a)]?new Date(_0x273aec[_0x313d72(0x10a)])['getTime']():Date[_0x313d72(0x184)](),_0x1263ed={'start':_0x1b6ab9,'end':_0x182127,'duration':_0x182127-_0x1b6ab9},_0x45d2af=new Map(),_0x1e6c06=[];for(const _0x301686 of _0x2ab67b){if(_0x301686[_0x313d72(0x20c)]){const _0x5b39c9=new Date(_0x301686['startedAt'])['getTime'](),_0x266b66=_0x301686[_0x313d72(0xf0)]?new Date(_0x301686[_0x313d72(0xf0)])[_0x313d72(0x11a)]():Date['now'](),_0x521255={'start':_0x5b39c9,'end':_0x266b66,'duration':_0x266b66-_0x5b39c9};_0x45d2af['set'](_0x301686['id'],_0x521255),_0x1e6c06[_0x313d72(0x1f9)]({'name':_0x301686[_0x313d72(0x11e)],'state':_0x301686[_0x313d72(0x224)]||_0x313d72(0x195),'window':_0x521255});}else _0x1e6c06['push']({'name':_0x301686[_0x313d72(0x11e)],'state':_0x301686[_0x313d72(0x224)]||_0x313d72(0x1e2),'window':undefined});}_0x1e6c06['sort']((_0x516f7a,_0x3a4f73)=>{const _0xda3cd2=_0x313d72;if(!_0x516f7a[_0xda3cd2(0x13e)])return 0x1;if(!_0x3a4f73[_0xda3cd2(0x13e)])return-0x1;return _0x516f7a[_0xda3cd2(0x13e)]['start']-_0x3a4f73[_0xda3cd2(0x13e)][_0xda3cd2(0x17f)];});const _0x2e9c26=_0x1e6c06[_0x313d72(0x217)],_0x4cc2cf=_0x2e9c26>TIMELINE_CONFIG[_0x313d72(0x153)];_0x4cc2cf&&_0x1e6c06[_0x313d72(0xcc)](TIMELINE_CONFIG[_0x313d72(0x153)]);const _0x270956=calculateTimeScale(_0x1263ed,_0x3d22e2),_0x478915=_0x273aec[_0x313d72(0xbc)]?_0x273aec['success']?a59_0x564dd3[_0x313d72(0xcd)]('success'):a59_0x564dd3[_0x313d72(0x1a4)](_0x313d72(0x23a)):a59_0x564dd3['blue'](_0x313d72(0x6e)),_0x18b08b=_0x273aec[_0x313d72(0xc6)]?.['id'],_0x566caf=_0x273aec['sessionId'];let _0x22fa69;if(_0x18b08b&&_0x566caf){const _0x2151a7=getWorkflowAttemptUrl(_0x4f2c9e,_0x18b08b,_0x566caf,_0x273aec['id']);_0x22fa69=hyperlink(a59_0x564dd3[_0x313d72(0x6f)](_0x273aec['id']),_0x2151a7);}else _0x22fa69=a59_0x564dd3[_0x313d72(0x6f)](_0x273aec['id']);_0x53d9df[_0x313d72(0x1f9)](_0x313d72(0x116)+_0x22fa69+_0x313d72(0x13b)+_0x478915+_0x313d72(0x13b)+formatElapsed(_0x1263ed[_0x313d72(0x1d8)]));if(_0x1e6c06[_0x313d72(0x217)]>0x0){const _0x15a76c=renderTimeAxis(_0x270956,_0x3d22e2),_0x4a20ac=new Date(_0x1263ed[_0x313d72(0x17f)]),_0x4bcc41=formatDate(_0x4a20ac),_0x2ed9bf=TIMELINE_CONFIG['ICON_WIDTH']+TIMELINE_CONFIG[_0x313d72(0x238)]+_0xa7ac31,_0x5c3128=_0x4bcc41[_0x313d72(0x1a1)](_0x2ed9bf),_0x3fe4e7=a59_0x564dd3[_0x313d72(0x6f)](_0x5c3128);_0x53d9df[_0x313d72(0x1f9)](_0x3fe4e7+'\x20'+_0x15a76c);for(const _0x3de6eb of _0x1e6c06){_0x53d9df[_0x313d72(0x1f9)](renderTaskRow(_0x3de6eb,_0x270956,_0x3d22e2,_0xa7ac31));}const _0x1b60bd=calculateStats(_0x1e6c06);_0x53d9df['push'](formatStats(_0x1b60bd)),_0x4cc2cf&&_0x53d9df[_0x313d72(0x1f9)](a59_0x564dd3[_0x313d72(0x204)]('⚠\x20Showing\x20first\x20'+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x313d72(0xa2)+_0x2e9c26+'\x20tasks')),_0x53d9df[_0x313d72(0x1f9)](''),_0x53d9df[_0x313d72(0x1f9)](a59_0x564dd3[_0x313d72(0x6f)]('💡\x20Tip:\x20Use\x20')+(_0x313d72(0x74)+_0x273aec['id']+_0x313d72(0xa1))+a59_0x564dd3[_0x313d72(0x6f)](_0x313d72(0x19d)));}else _0x53d9df[_0x313d72(0x1f9)](_0x313d72(0xd6));return _0x53d9df[_0x313d72(0xf7)]('\x0a');}[a59_0x34b1fc(0x208)](_0x59103c,_0x1e9be9){const _0x1dc5db=a59_0x34b1fc,_0x86807f=new Date(_0x59103c['createdAt'])[_0x1dc5db(0x11a)](),_0x4198f9=_0x59103c[_0x1dc5db(0x10a)]?new Date(_0x59103c[_0x1dc5db(0x10a)])['getTime']():Date[_0x1dc5db(0x184)](),_0x1ecb61=_0x4198f9-_0x86807f,_0x4eff64=[];for(const _0x3967ef of _0x1e9be9){if(_0x3967ef[_0x1dc5db(0x20c)]){const _0x17a356=new Date(_0x3967ef['startedAt'])[_0x1dc5db(0x11a)](),_0x548200=_0x3967ef['updatedAt']?new Date(_0x3967ef[_0x1dc5db(0xf0)])['getTime']():Date[_0x1dc5db(0x184)]();_0x4eff64[_0x1dc5db(0x1f9)]({'name':_0x3967ef[_0x1dc5db(0x11e)],'state':_0x3967ef['state']||_0x1dc5db(0x195),'window':{'start':_0x17a356,'end':_0x548200,'duration':_0x548200-_0x17a356}});}else _0x4eff64[_0x1dc5db(0x1f9)]({'name':_0x3967ef[_0x1dc5db(0x11e)],'state':_0x3967ef[_0x1dc5db(0x224)]||_0x1dc5db(0x1e2),'window':undefined});}const _0x134b0e=calculateStats(_0x4eff64);return{'attempt':{'id':_0x59103c['id'],'status':_0x59103c['done']?_0x59103c[_0x1dc5db(0x1b7)]?'success':_0x1dc5db(0x23a):_0x1dc5db(0x6e),'createdAt':_0x59103c[_0x1dc5db(0xc0)],'finishedAt':_0x59103c['finishedAt'],'duration_ms':_0x1ecb61},'tasks':_0x4eff64['map'](_0x20f4c6=>({'name':_0x20f4c6[_0x1dc5db(0x7b)],'state':_0x20f4c6[_0x1dc5db(0x224)],'startedAt':_0x20f4c6['window']?new Date(_0x20f4c6[_0x1dc5db(0x13e)][_0x1dc5db(0x17f)])[_0x1dc5db(0x13a)]():null,'updatedAt':_0x20f4c6[_0x1dc5db(0x13e)]?new Date(_0x20f4c6[_0x1dc5db(0x13e)][_0x1dc5db(0x1f2)])[_0x1dc5db(0x13a)]():null,'duration_ms':_0x20f4c6[_0x1dc5db(0x13e)]?.[_0x1dc5db(0x1d8)]||null})),'stats':_0x134b0e};}}function formatScheduleLine(_0x43c8e5){const _0x42f4cd=a59_0x34b1fc,_0xa88a5=_0x43c8e5['disabledAt']?a59_0x564dd3['yellow'](_0x42f4cd(0xfd)):'',_0x208eac=_0x43c8e5[_0x42f4cd(0xc6)]?.['name']?a59_0x564dd3[_0x42f4cd(0x6f)]('\x20['+_0x43c8e5[_0x42f4cd(0xc6)]['name']+']'):'',_0x1ca01f=_0x43c8e5[_0x42f4cd(0x6a)]?a59_0x564dd3[_0x42f4cd(0x6f)](_0x42f4cd(0x248)+new Date(_0x43c8e5[_0x42f4cd(0x6a)])[_0x42f4cd(0xe7)]()):'';return _0x42f4cd(0x23f)+_0x43c8e5['id']+'\x20'+(_0x43c8e5[_0x42f4cd(0x14b)]?.[_0x42f4cd(0x7b)]||_0x42f4cd(0x23e))+_0x208eac+_0xa88a5+_0x1ca01f;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a59_0x34b1fc(0x7b)]='workflow:schedules';['description']=a59_0x34b1fc(0x218);async[a59_0x34b1fc(0x203)](_0x110ea5){const _0x4036c7=a59_0x34b1fc,{options:_0x597603,args:_0x2aabbf,tdx:_0x1581fb}=_0x110ea5,{scheduleId:_0xb48231}=_0x597603;if(_0xb48231&&_0x2aabbf[0x0])return console[_0x4036c7(0x23a)](a59_0x564dd3[_0x4036c7(0x1a4)](_0x4036c7(0x168)),_0x4036c7(0x15b)),console['error'](a59_0x564dd3[_0x4036c7(0x6f)](_0x4036c7(0xfe))),0x1;if(_0xb48231){const _0x31c5c8=await withSpinner(_0x4036c7(0x249)+_0xb48231+_0x4036c7(0x104),()=>_0x1581fb['workflow']['getSchedule'](_0xb48231),{'verbose':_0x597603['verbose']}),_0x560e5e=_0x31c5c8['data'];return isStructuredFormat(_0x597603)?await handleSingleObjectOutput(_0x560e5e,_0x597603):(console['error'](_0x4036c7(0x1cc)),console[_0x4036c7(0x223)](formatScheduleLine(_0x560e5e))),0x0;}const _0x501572=this[_0x4036c7(0x194)](_0x2aabbf,_0x597603);if(!_0x501572)return 0x1;const {projectName:_0x9d09d0,workflowName:_0x1502a2}=_0x501572,_0x35aa80=_0x9d09d0?'\x27'+_0x9d09d0+(_0x1502a2?'.'+_0x1502a2:'')+'\x27':undefined,_0x1f3372=await withSpinner(_0x35aa80?_0x4036c7(0x99)+_0x35aa80+_0x4036c7(0x104):'Listing\x20schedules...',()=>_0x9d09d0?_0x1581fb[_0x4036c7(0x14b)][_0x4036c7(0x211)](_0x9d09d0,{'workflow':_0x1502a2,'limit':_0x597603[_0x4036c7(0x7d)]}):_0x1581fb[_0x4036c7(0x14b)][_0x4036c7(0x142)]({'limit':_0x597603['limit']}),{'verbose':_0x597603[_0x4036c7(0x1ab)]}),_0x221e8a=_0x1f3372[_0x4036c7(0x138)],_0x3cae17=_0x597603[_0x4036c7(0x7d)]&&_0x221e8a['length']>=_0x597603[_0x4036c7(0x7d)]?a59_0x564dd3['dim'](_0x4036c7(0x1b4)):'';console[_0x4036c7(0x23a)](_0x4036c7(0x24a)+_0x221e8a[_0x4036c7(0x217)]+_0x4036c7(0x1a0)+(_0x221e8a['length']!==0x1?'s':'')+_0x3cae17);if(isStructuredFormat(_0x597603))await handleSDKOutput(_0x221e8a,_0x597603);else{if(_0x221e8a[_0x4036c7(0x217)]===0x0)console['log']('No\x20schedules\x20found');else for(const _0x3b4194 of _0x221e8a){console[_0x4036c7(0x223)](formatScheduleLine(_0x3b4194));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x11c);['description']=a59_0x34b1fc(0x212);async[a59_0x34b1fc(0x203)](_0x5c7055){const _0x5dd46e=a59_0x34b1fc,{options:_0x5c5164,args:_0x4ed410,tdx:_0x876cb0}=_0x5c7055,_0x58de5a=_0x4ed410[0x0];if(!_0x58de5a)return console['error'](a59_0x564dd3[_0x5dd46e(0x1a4)](_0x5dd46e(0x168)),_0x5dd46e(0x1b1)),console[_0x5dd46e(0x23a)](a59_0x564dd3[_0x5dd46e(0x6f)](_0x5dd46e(0xc1))),console[_0x5dd46e(0x23a)](a59_0x564dd3[_0x5dd46e(0x6f)]('Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs')),0x1;const {backfill:_0x52961f,nextTime:_0x28c762}=_0x5c5164,_0x61f0e1={};if(_0x52961f!==undefined)_0x61f0e1[_0x5dd46e(0x96)]=!_0x52961f;if(_0x28c762!==undefined)_0x61f0e1[_0x5dd46e(0x198)]=_0x28c762;const _0x46b05a=await withSpinner(_0x5dd46e(0x128)+_0x58de5a+_0x5dd46e(0x104),()=>_0x876cb0[_0x5dd46e(0x14b)][_0x5dd46e(0x1d9)](_0x58de5a,_0x61f0e1),{'verbose':_0x5c5164[_0x5dd46e(0x1ab)]}),_0x42e218=_0x46b05a[_0x5dd46e(0x138)];return isStructuredFormat(_0x5c5164)?await handleSingleObjectOutput(_0x42e218,_0x5c5164):(console[_0x5dd46e(0x223)](_0x5dd46e(0xef)+_0x58de5a+_0x5dd46e(0x91)+(_0x42e218['workflow']?.[_0x5dd46e(0x7b)]||_0x5dd46e(0x195))+')'),_0x42e218[_0x5dd46e(0x6a)]&&console[_0x5dd46e(0x223)](a59_0x564dd3[_0x5dd46e(0x6f)](_0x5dd46e(0x139)+new Date(_0x42e218[_0x5dd46e(0x6a)])[_0x5dd46e(0xe7)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a59_0x34b1fc(0x7b)]=a59_0x34b1fc(0x1ca);[a59_0x34b1fc(0x229)]=a59_0x34b1fc(0x11b);async['execute'](_0x36df86){const _0x3c54aa=a59_0x34b1fc,{options:_0x5848a4,args:_0x234b40,tdx:_0xddab0}=_0x36df86,_0x285f96=_0x234b40[0x0];if(!_0x285f96)return console[_0x3c54aa(0x23a)](a59_0x564dd3[_0x3c54aa(0x1a4)](_0x3c54aa(0x168)),_0x3c54aa(0x1b1)),console['error'](a59_0x564dd3['dim'](_0x3c54aa(0xcb))),console[_0x3c54aa(0x23a)](a59_0x564dd3[_0x3c54aa(0x6f)](_0x3c54aa(0xd2))),0x1;const _0x110fdb=await withSpinner(_0x3c54aa(0x15d)+_0x285f96+_0x3c54aa(0x104),()=>_0xddab0[_0x3c54aa(0x14b)][_0x3c54aa(0x159)](_0x285f96),{'verbose':_0x5848a4['verbose']}),_0x5e9890=_0x110fdb['data'];return isStructuredFormat(_0x5848a4)?await handleSingleObjectOutput(_0x5e9890,_0x5848a4):console['log'](_0x3c54aa(0xef)+_0x285f96+'\x20disabled\x20('+(_0x5e9890[_0x3c54aa(0x14b)]?.[_0x3c54aa(0x7b)]||_0x3c54aa(0x195))+')'),0x0;}}
1
+ const a60_0x15a404=a60_0x540e;(function(_0x2a89a5,_0x2c9f66){const _0x158090=a60_0x540e,_0x49f61a=_0x2a89a5();while(!![]){try{const _0x450a67=-parseInt(_0x158090(0x12a))/0x1*(-parseInt(_0x158090(0x1eb))/0x2)+parseInt(_0x158090(0x1b7))/0x3*(parseInt(_0x158090(0xd0))/0x4)+-parseInt(_0x158090(0x135))/0x5*(-parseInt(_0x158090(0xec))/0x6)+-parseInt(_0x158090(0x132))/0x7*(-parseInt(_0x158090(0x1d5))/0x8)+parseInt(_0x158090(0x21b))/0x9+-parseInt(_0x158090(0x184))/0xa*(-parseInt(_0x158090(0x271))/0xb)+parseInt(_0x158090(0x226))/0xc*(-parseInt(_0x158090(0x19e))/0xd);if(_0x450a67===_0x2c9f66)break;else _0x49f61a['push'](_0x49f61a['shift']());}catch(_0x4c838a){_0x49f61a['push'](_0x49f61a['shift']());}}}(a60_0x740d,0xbbf1c));function a60_0x540e(_0x2c07ec,_0x47e3f4){_0x2c07ec=_0x2c07ec-0xcf;const _0x740d08=a60_0x740d();let _0x540ebb=_0x740d08[_0x2c07ec];return _0x540ebb;}import a60_0x174743 from'chalk';import{existsSync}from'fs';import a60_0x45f48e 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 a60_0x50c7d3 from'prompts';function getAttemptStatusDisplay(_0x2ed844){const _0x3f1067=a60_0x540e;if(!_0x2ed844)return{'icon':'⏳','text':''};const {done:_0x3a17ad,success:_0x2a52e6,cancelRequested:_0x191601}=_0x2ed844;if(!_0x3a17ad)return _0x191601?{'icon':'🛑','text':a60_0x174743[_0x3f1067(0xf1)](_0x3f1067(0x1a4))}:{'icon':'🔄','text':a60_0x174743[_0x3f1067(0x21c)](_0x3f1067(0x248))};if(_0x2a52e6)return{'icon':'✅','text':a60_0x174743[_0x3f1067(0x234)]('success')};return{'icon':'❌','text':a60_0x174743[_0x3f1067(0x156)](_0x3f1067(0x25d))};}export class WorkflowBaseCommand extends BaseCommand{[a60_0x15a404(0x213)](_0x38f4b8,_0x225d5c,_0x3e87a9=0x0){const _0x15dbfe=a60_0x15a404;return _0x38f4b8[_0x3e87a9]||_0x225d5c[_0x15dbfe(0x110)];}[a60_0x15a404(0x282)](_0x4598ef,_0x3e8233,_0x57ab16=0x0){const _0x4d3ad4=a60_0x15a404,_0xb67570=this[_0x4d3ad4(0x213)](_0x4598ef,_0x3e8233,_0x57ab16);if(!_0xb67570)return console[_0x4d3ad4(0x25d)](a60_0x174743[_0x4d3ad4(0x156)](_0x4d3ad4(0x149)),_0x4d3ad4(0x150)),console['error'](a60_0x174743['dim'](_0x4d3ad4(0x241))),null;return _0xb67570;}[a60_0x15a404(0x26b)](_0x44b69c,_0x537c71){const _0x5e1c06=a60_0x15a404;if(_0x44b69c[0x0]){const _0x5e3596=_0x44b69c[0x0][_0x5e1c06(0x214)]('.');if(_0x5e3596[_0x5e1c06(0x1c9)]===0x1)return{'projectName':_0x5e3596[0x0],'workflowName':undefined};else return _0x5e3596[_0x5e1c06(0x1c9)]===0x2?{'projectName':_0x5e3596[0x0],'workflowName':_0x5e3596[0x1]}:(console['error'](a60_0x174743['red'](_0x5e1c06(0x149)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x537c71[_0x5e1c06(0x110)],'workflowName':undefined};}['resolveProjectDir'](_0x8a0715,_0x2875b8,_0x3f048=0x0){const _0x37b433=a60_0x15a404;if(_0x8a0715[_0x3f048])return _0x8a0715[_0x3f048];if(_0x2875b8['workflowProject']){const _0x10fa3a=a60_0x45f48e[_0x37b433(0xd7)](process[_0x37b433(0x17f)](),'workflows',_0x2875b8[_0x37b433(0x110)]);if(existsSync(a60_0x45f48e['join'](_0x10fa3a,_0x37b433(0xdd))))return _0x10fa3a;}return undefined;}async['showWorkflowConsoleUrl'](_0x2b63dc,_0x3ca461,_0x58e37c){const _0x2084a2=a60_0x15a404;try{const _0x40c0ca=await _0x2b63dc['workflow'][_0x2084a2(0x204)](_0x3ca461,{'limit':0x1});if(_0x40c0ca[_0x2084a2(0x1c9)]>0x0){const _0x415271=_0x40c0ca[0x0]['id'],_0x45057d=getWorkflowUrl(_0x58e37c,_0x415271);console[_0x2084a2(0x25d)]('\x20\x20Console:\x20'+a60_0x174743[_0x2084a2(0x22d)](_0x45057d));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a60_0x15a404(0x27b);[a60_0x15a404(0x1e2)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async['execute'](_0x520839){const _0x1dfb68=a60_0x15a404,{options:_0x2a7fc8,args:_0x42becd,tdx:_0x442b55}=_0x520839,_0x91e8c=_0x42becd[0x0],_0x33acf4=_0x2a7fc8[_0x1dfb68(0x11a)];if(_0x33acf4)return saveSessionContext({'workflow_project':undefined},_0x2a7fc8[_0x1dfb68(0x275)]),console['log'](a60_0x174743[_0x1dfb68(0x234)]('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x91e8c)return console[_0x1dfb68(0x25d)](a60_0x174743[_0x1dfb68(0x156)]('Error:'),_0x1dfb68(0x150)),console[_0x1dfb68(0x25d)](a60_0x174743['dim']('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x1dfb68(0x25d)](a60_0x174743[_0x1dfb68(0x1a9)](_0x1dfb68(0x15f))),0x1;const _0x559644=await withSpinner('Resolving\x20project\x20\x27'+_0x91e8c+_0x1dfb68(0x193),()=>_0x442b55['workflow'][_0x1dfb68(0x295)](_0x91e8c),{'verbose':_0x2a7fc8[_0x1dfb68(0x1b0)]}),{name:_0x2f92bb}=_0x559644[_0x1dfb68(0x12d)];return saveSessionContext({'workflow_project':_0x2f92bb},_0x2a7fc8[_0x1dfb68(0x275)]),console[_0x1dfb68(0x172)](a60_0x174743[_0x1dfb68(0x234)](_0x1dfb68(0x261)+a60_0x174743['cyan'](_0x2f92bb))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0xfc);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x147);async[a60_0x15a404(0x1f0)](_0x4d480f){const _0x4d33a2=a60_0x15a404,{options:_0x3fc07d,args:_0x70d28f,tdx:_0x1ea3a4}=_0x4d480f,_0x448ab1=_0x70d28f[0x0];_0x3fc07d[_0x4d33a2(0x1b0)]&&_0x448ab1&&console[_0x4d33a2(0x25d)](_0x4d33a2(0x161)+_0x448ab1);const _0x73a81c=await withSpinner(_0x4d33a2(0x160),()=>_0x1ea3a4['workflow']['projects'](_0x448ab1,{'limit':_0x3fc07d['limit']}),{'verbose':_0x3fc07d[_0x4d33a2(0x1b0)]});let _0x40cf0d=_0x73a81c[_0x4d33a2(0x12d)];_0x40cf0d['sort']((_0x9c46bf,_0x57b8a7)=>_0x9c46bf['name']['localeCompare'](_0x57b8a7[_0x4d33a2(0x18d)]));const _0x1e0e3c=_0x3fc07d['limit']&&_0x40cf0d['length']>=_0x3fc07d['limit']?a60_0x174743[_0x4d33a2(0x1a9)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x4d33a2(0x25d)](_0x4d33a2(0x134)+_0x40cf0d[_0x4d33a2(0x1c9)]+'\x20project'+(_0x40cf0d[_0x4d33a2(0x1c9)]!==0x1?'s':'')+_0x1e0e3c);if(_0x3fc07d[_0x4d33a2(0x217)]==='json'||_0x3fc07d[_0x4d33a2(0x217)]===_0x4d33a2(0xeb)||_0x3fc07d[_0x4d33a2(0x217)]===_0x4d33a2(0x255))await handleSDKOutput(_0x40cf0d,_0x3fc07d);else{if(_0x40cf0d[_0x4d33a2(0x1c9)]===0x0)_0x448ab1?console[_0x4d33a2(0x172)](_0x4d33a2(0x11c)+_0x448ab1):console['log'](_0x4d33a2(0x10a));else{const _0x501727=_0x40cf0d[_0x4d33a2(0xed)](_0xc9e56=>{const _0x28575d=_0x4d33a2,_0x4ef9c7=_0xc9e56[_0x28575d(0x136)]?.['some'](_0x4b4753=>_0x4b4753[_0x28575d(0xe0)]===_0x28575d(0x1c3)),_0x5101a9=_0x4ef9c7?a60_0x174743[_0x28575d(0x1a9)]('\x20(system)'):'';return'📁\x20'+_0xc9e56['name']+_0x5101a9;});await writeOutput(_0x501727[_0x4d33a2(0xd7)]('\x0a'),_0x3fc07d['output'],'list');}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]='workflow:workflows';['description']=a60_0x15a404(0x290);async[a60_0x15a404(0x1f0)](_0x422dbe){const _0x4c0539=a60_0x15a404,{options:_0x855fac,args:_0x5b39fa,tdx:_0x4de794}=_0x422dbe,_0xc0e7c9=this[_0x4c0539(0x213)](_0x5b39fa,_0x855fac);_0x855fac['verbose']&&_0xc0e7c9&&console[_0x4c0539(0x25d)]('Project\x20filter:\x20'+_0xc0e7c9);const _0x26883b=await withSpinner(_0x4c0539(0x1cd),()=>_0x4de794['workflow'][_0x4c0539(0x204)](_0xc0e7c9,{'limit':_0x855fac[_0x4c0539(0x189)]}),{'verbose':_0x855fac[_0x4c0539(0x1b0)]});let _0x413511=_0x26883b[_0x4c0539(0x12d)];_0x413511[_0x4c0539(0x175)]((_0x5c5193,_0x1cde52)=>{const _0x400d3a=_0x4c0539,_0xc6d6d0=_0x5c5193[_0x400d3a(0x18d)]['localeCompare'](_0x1cde52[_0x400d3a(0x18d)]);if(_0xc6d6d0!==0x0)return _0xc6d6d0;return(_0x5c5193[_0x400d3a(0x148)]?.[_0x400d3a(0x18d)]||'')[_0x400d3a(0x1ea)](_0x1cde52[_0x400d3a(0x148)]?.[_0x400d3a(0x18d)]||'');});const _0x46a935=_0x855fac[_0x4c0539(0x189)]&&_0x413511[_0x4c0539(0x1c9)]>=_0x855fac[_0x4c0539(0x189)]?a60_0x174743[_0x4c0539(0x1a9)](_0x4c0539(0x13c)):'';console[_0x4c0539(0x25d)](_0x4c0539(0x134)+_0x413511['length']+'\x20workflow'+(_0x413511[_0x4c0539(0x1c9)]!==0x1?'s':'')+_0x46a935);if(_0x855fac['format']===_0x4c0539(0x176)||_0x855fac['format']==='jsonl'||_0x855fac[_0x4c0539(0x217)]===_0x4c0539(0x255))await handleSDKOutput(_0x413511,_0x855fac);else{if(_0x413511['length']===0x0)_0xc0e7c9?console[_0x4c0539(0x172)](_0x4c0539(0x10d)+_0xc0e7c9):console[_0x4c0539(0x172)]('No\x20workflows\x20found');else{const _0x4b67dc=_0x855fac[_0x4c0539(0x18e)],_0x3643cf=_0x413511[_0x4c0539(0xed)](_0x51f467=>{const _0x21ae5c=_0x4c0539,_0x1fc11e=a60_0x174743[_0x21ae5c(0x1a9)]('#'+_0x51f467['id']),_0x54c385=hyperlink(_0x1fc11e,getWorkflowUrl(_0x4b67dc,_0x51f467['id'])),_0x50f49=_0x51f467['project']?.['name']?a60_0x174743[_0x21ae5c(0x1a9)]('\x20('+_0x51f467['project']['name']+')'):'';return _0x21ae5c(0x12f)+_0x54c385+'\x20'+_0x51f467['name']+_0x50f49;});await writeOutput(_0x3643cf[_0x4c0539(0xd7)]('\x0a'),_0x855fac['output'],_0x4c0539(0x1fc));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0x1ad);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x299);async[a60_0x15a404(0x1f0)](_0x44a6f8){const _0x5431f1=a60_0x15a404,{options:_0x5632bd,args:_0x4940df,tdx:_0x27ea1e}=_0x44a6f8,_0x46bee2=this[_0x5431f1(0x26b)](_0x4940df,_0x5632bd);if(!_0x46bee2)return 0x1;const {projectName:_0xe1cc24,workflowName:_0x3f033f}=_0x46bee2;if(_0x5632bd[_0x5431f1(0x1b0)]){if(_0xe1cc24&&_0x3f033f)console[_0x5431f1(0x25d)](_0x5431f1(0x13b)+_0xe1cc24+'.'+_0x3f033f);else _0xe1cc24&&console[_0x5431f1(0x25d)]('Filter:\x20project='+_0xe1cc24);const _0x2c37e3=_0x5632bd[_0x5431f1(0x203)];_0x2c37e3&&console[_0x5431f1(0x25d)]('Status:\x20'+_0x2c37e3);}let _0x4799e0=0x28;if(process[_0x5431f1(0x218)]['isTTY']&&!_0x5632bd[_0x5431f1(0x1d4)]&&!_0x5632bd['format']){const _0x47daee=process['stdout']['rows']||0x28;_0x4799e0=Math[_0x5431f1(0x130)](0x14,Math[_0x5431f1(0x111)](_0x47daee*0x2/0x3));}const _0x5910f3=_0x5632bd[_0x5431f1(0x189)]||_0x4799e0,_0x21a99e=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x27ea1e[_0x5431f1(0x140)]['sessions']({'projectName':_0xe1cc24,'workflowName':_0x3f033f,'status':_0x5632bd[_0x5431f1(0x203)],'fromTime':_0x5632bd['from'],'toTime':_0x5632bd['to'],'limit':_0x5910f3}),{'verbose':_0x5632bd[_0x5431f1(0x1b0)]}),_0x3ec106=_0x21a99e[_0x5431f1(0x12d)];_0x3ec106[_0x5431f1(0x175)]((_0x19dbd2,_0x370592)=>{const _0x3c6c2a=_0x5431f1,_0x48e08e=_0x19dbd2[_0x3c6c2a(0x1cf)]||'',_0x524039=_0x370592['sessionTime']||'';return _0x524039[_0x3c6c2a(0x1ea)](_0x48e08e);});_0x3ec106[_0x5431f1(0x1c9)]>=_0x5910f3?console[_0x5431f1(0x25d)]('✔\x20Showing\x20'+_0x3ec106[_0x5431f1(0x1c9)]+'\x20sessions\x20'+a60_0x174743[_0x5431f1(0x1a9)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x5431f1(0x25d)](_0x5431f1(0x134)+_0x3ec106['length']+_0x5431f1(0x152)+(_0x3ec106[_0x5431f1(0x1c9)]!==0x1?'s':''));if(_0x5632bd['format']===_0x5431f1(0x176)||_0x5632bd['format']===_0x5431f1(0xeb)||_0x5632bd[_0x5431f1(0x217)]===_0x5431f1(0x255))await handleSDKOutput(_0x3ec106,_0x5632bd);else{if(!process[_0x5431f1(0x218)][_0x5431f1(0x165)]||_0x5632bd[_0x5431f1(0x1d4)]){if(_0x3ec106['length']===0x0){if(_0xe1cc24&&_0x3f033f)console['log'](_0x5431f1(0xcf)+_0xe1cc24+'.'+_0x3f033f);else _0xe1cc24?console['log'](_0x5431f1(0xde)+_0xe1cc24):console[_0x5431f1(0x172)]('No\x20sessions\x20found');}else{const _0xfce4d7=_0x5632bd[_0x5431f1(0x18e)],_0x48c809=this[_0x5431f1(0x1be)](_0x3ec106,_0xfce4d7);_0x5632bd[_0x5431f1(0x1d4)]?await writeOutput(_0x48c809,_0x5632bd[_0x5431f1(0x1d4)],_0x5431f1(0x1fc)):console[_0x5431f1(0x172)](_0x48c809);}!_0xe1cc24&&(console[_0x5431f1(0x25d)](''),console['error'](a60_0x174743[_0x5431f1(0x1a9)](_0x5431f1(0x100))),console[_0x5431f1(0x25d)](a60_0x174743['dim']('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a60_0x174743['dim'](_0x5431f1(0xd4))));}else{if(_0x3ec106[_0x5431f1(0x1c9)]===0x0){if(_0xe1cc24&&_0x3f033f)console['log']('No\x20sessions\x20found\x20for:\x20'+_0xe1cc24+'.'+_0x3f033f);else _0xe1cc24?console[_0x5431f1(0x172)](_0x5431f1(0xde)+_0xe1cc24):console[_0x5431f1(0x172)](_0x5431f1(0x1fa));}else await this[_0x5431f1(0x12c)](_0x3ec106,_0x44a6f8,_0xe1cc24);}}return 0x0;}[a60_0x15a404(0x1be)](_0xa9f3c8,_0x3ef85f){const _0x429b01=a60_0x15a404,_0x33f8e5=[],_0xf5eba8=new Map();let _0x38d9cb=Infinity,_0x114ce7=-Infinity;for(const _0x354404 of _0xa9f3c8){if(_0x354404[_0x429b01(0x16f)]?.[_0x429b01(0x1b1)]){const _0x41571e=new Date(_0x354404[_0x429b01(0x16f)]['createdAt'])[_0x429b01(0x1de)](),_0x5368a0=_0x354404[_0x429b01(0x16f)][_0x429b01(0x20d)]?new Date(_0x354404['lastAttempt'][_0x429b01(0x20d)])['getTime']():Date[_0x429b01(0x1e9)](),_0x100842=_0x354404[_0x429b01(0x148)]?.[_0x429b01(0x18d)]||_0x429b01(0x131);!_0xf5eba8[_0x429b01(0xe8)](_0x100842)&&_0xf5eba8['set'](_0x100842,[]),_0xf5eba8['get'](_0x100842)['push']({'session':_0x354404,'startTime':_0x41571e,'endTime':_0x5368a0,'duration':_0x5368a0-_0x41571e}),_0x38d9cb=Math[_0x429b01(0x19f)](_0x38d9cb,_0x41571e),_0x114ce7=Math[_0x429b01(0x130)](_0x114ce7,_0x5368a0);}}if(_0xf5eba8[_0x429b01(0x164)]===0x0)return _0x429b01(0x13e);const _0x437922=process['stdout'][_0x429b01(0x24b)]||0x78,_0x8c21f9=0x1e,_0xa715c=0x32,_0x4fa37f=0x4,_0x1f7dba=Math['min'](_0xa715c,Math['max'](_0x8c21f9,Math[_0x429b01(0x111)](_0x437922*0.3))),_0x3afee8=_0x437922-_0x1f7dba-TIMELINE_CONFIG[_0x429b01(0x250)]-0x3-_0x4fa37f,_0x55f05b=_0x114ce7-_0x38d9cb,_0x1d4b27=_0x55f05b/_0x1f7dba,_0x2c3f64=renderTimeAxis({'startTime':_0x38d9cb,'endTime':_0x114ce7,'durationMs':_0x55f05b,'msPerChar':_0x1d4b27},_0x1f7dba),_0x2168b2=[];for(const _0x1b072a of _0xf5eba8[_0x429b01(0x117)]()){_0x2168b2[_0x429b01(0x23d)](..._0x1b072a);}_0x2168b2[_0x429b01(0x175)]((_0x355074,_0x4c2def)=>_0x4c2def[_0x429b01(0x22e)]-_0x355074[_0x429b01(0x22e)]);const _0x3c8a2d=new Date(_0x38d9cb),_0x22a9ba=formatDate(_0x3c8a2d),_0x240f54=_0x4fa37f+TIMELINE_CONFIG[_0x429b01(0x240)]+TIMELINE_CONFIG[_0x429b01(0x154)]+_0x3afee8,_0x44da87='\x20'['repeat'](_0x240f54-_0x22a9ba[_0x429b01(0x1c9)]),_0x21ea18=_0x44da87+a60_0x174743[_0x429b01(0x1a9)](_0x22a9ba)+'\x20'+_0x2c3f64;_0x33f8e5[_0x429b01(0x23d)](_0x21ea18);const _0x1aca2c=0x16;let _0x35d803=0x0;for(const _0x259312 of _0x2168b2){const _0x54b7ed=_0x259312['session'][_0x429b01(0x148)]?.[_0x429b01(0x18d)]||'?',_0x10fc2c=Math[_0x429b01(0x19f)](stringWidth(_0x54b7ed),_0x1aca2c);_0x35d803=Math[_0x429b01(0x130)](_0x35d803,_0x10fc2c);}for(const _0x8ff836 of _0x2168b2){const {session:_0xdbe76a,startTime:_0x14ead2,endTime:_0x564a74,duration:_0x2c231f}=_0x8ff836,_0x1f90a7=_0xdbe76a[_0x429b01(0x148)]?.['id'],_0x390796=_0xdbe76a['id'],_0xcf4008=_0xdbe76a[_0x429b01(0x148)]?.[_0x429b01(0x18d)]||'?',_0x38f75d=_0xdbe76a['workflow']?.[_0x429b01(0x18d)]||'?';let _0x431339,_0x3a42c9;if(_0xdbe76a['lastAttempt']){const _0x3502f9=_0xdbe76a[_0x429b01(0x16f)];!_0x3502f9[_0x429b01(0x1f7)]?(_0x431339=_0x3502f9[_0x429b01(0x13a)]?'🛑':'🔄',_0x3a42c9=_0x3502f9[_0x429b01(0x13a)]?a60_0x174743[_0x429b01(0xf1)]:a60_0x174743[_0x429b01(0x21c)]):(_0x431339=_0x3502f9[_0x429b01(0x24a)]?'✅':'❌',_0x3a42c9=_0x3502f9[_0x429b01(0x24a)]?a60_0x174743[_0x429b01(0x234)]:a60_0x174743['red']);}else _0x431339='⏳',_0x3a42c9=a60_0x174743[_0x429b01(0x1a9)];const _0xf066c8='#'+_0x390796,_0x468127=_0x1f90a7?hyperlink(_0xf066c8,getWorkflowSessionUrl(_0x3ef85f,_0x1f90a7,_0x390796)):_0xf066c8;let _0x1559b1=_0xcf4008;stringWidth(_0xcf4008)>_0x1aca2c&&(_0x1559b1=_0xcf4008[_0x429b01(0x21a)](0x0,_0x1aca2c-0x1)+'…');const _0xa4475d=a60_0x174743[_0x429b01(0x1a9)](_0x1559b1),_0x2fca43=stringWidth(_0x1559b1),_0x41d139='\x20'['repeat'](_0x35d803-stringWidth(_0x1559b1)+0x2),_0x107548='('+formatElapsed(_0x2c231f)+')',_0x32ae4f=stringWidth(_0x107548),_0x574e22=stringWidth(_0xf066c8),_0x1cf2b8=_0x574e22+0x1+_0x2fca43+_0x41d139[_0x429b01(0x1c9)],_0x47dd49=_0x3afee8-_0x1cf2b8-_0x32ae4f-0x1-0x8;let _0x2efe4d=_0x38f75d;stringWidth(_0x2efe4d)>_0x47dd49&&(_0x2efe4d=_0x2efe4d['slice'](0x0,_0x47dd49-0x1)+'…');const _0x3c4a10=_0x468127+'\x20'+_0xa4475d+_0x41d139+_0x2efe4d,_0xde5761=stringWidth(_0x3c4a10),_0x548642=_0x3afee8-_0xde5761-_0x32ae4f,_0x3faec2=_0x3c4a10+'\x20'['repeat'](Math[_0x429b01(0x130)](0x1,_0x548642))+a60_0x174743['dim'](_0x107548),_0x2d8b60=Math[_0x429b01(0x111)]((_0x14ead2-_0x38d9cb)/_0x1d4b27),_0x4b6c2=Math[_0x429b01(0x111)]((_0x564a74-_0x38d9cb)/_0x1d4b27),_0xb6bb07=Math[_0x429b01(0x130)](_0x2d8b60+0x1,_0x4b6c2),_0x2ddd50=new Array(_0x1f7dba)['fill']('\x20');for(let _0x3a55a7=_0x2d8b60;_0x3a55a7<Math['min'](_0xb6bb07,_0x1f7dba);_0x3a55a7++){_0x2ddd50[_0x3a55a7]='─';}const _0x527208=_0x2ddd50[_0x429b01(0xed)](_0x5ca71c=>_0x5ca71c==='\x20'?'\x20':_0x3a42c9(_0x5ca71c))[_0x429b01(0xd7)]('');_0x33f8e5[_0x429b01(0x23d)](_0x431339+'\x20'+_0x3faec2+'│'+_0x527208+'│');}return _0x33f8e5['join']('\x0a');}async[a60_0x15a404(0x12c)](_0x7ea97e,_0x440190,_0x4e6143){const _0x5ad0be=a60_0x15a404,{options:_0x15c29e,tdx:_0x1d1a02}=_0x440190,_0x15a281=_0x15c29e['site'],{timelineRows:_0x42acf9,timeAxisHeader:_0x4f2335}=this['generateSessionTimelineRows'](_0x7ea97e,_0x15a281),_0x2c2831=_0x42acf9['filter'](_0x4ec2bf=>_0x4ec2bf['attemptId']);if(_0x2c2831[_0x5ad0be(0x1c9)]===0x0){const _0x3590fe=this['renderSessionsTimeline'](_0x7ea97e,_0x15a281);console[_0x5ad0be(0x172)](_0x3590fe);!_0x4e6143&&(console[_0x5ad0be(0x25d)](''),console[_0x5ad0be(0x25d)](a60_0x174743['dim'](_0x5ad0be(0x100))),console[_0x5ad0be(0x25d)](a60_0x174743[_0x5ad0be(0x1a9)](_0x5ad0be(0x1a3))+'or'+a60_0x174743[_0x5ad0be(0x1a9)](_0x5ad0be(0xd4))));return;}_0x4f2335&&console[_0x5ad0be(0x172)](_0x4f2335);const _0x490ef1=_0x42acf9[_0x5ad0be(0x23a)](_0x43c6f0=>_0x43c6f0['attemptId'])[_0x5ad0be(0xed)](_0x286c82=>({'title':_0x286c82[_0x5ad0be(0x197)],'value':_0x286c82[_0x5ad0be(0x181)]})),_0x2156c7=process[_0x5ad0be(0x218)][_0x5ad0be(0x18a)]||0x3c,_0x513680=Math['max'](0x28,Math[_0x5ad0be(0x111)](_0x2156c7*0x2/0x3)),_0x99fbb5=await a60_0x50c7d3({'type':'autocomplete','name':_0x5ad0be(0x181),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x490ef1,'initial':-0x1,'limit':_0x513680,'clearFirst':!![],'fallback':{'title':_0x5ad0be(0x1c2),'value':null},'suggest':(_0x5abee1,_0x3deef5)=>{const _0x4271f2=_0x5ad0be;if(!_0x5abee1)return Promise[_0x4271f2(0x210)](_0x3deef5);const _0x5596ef=_0x3deef5['filter'](_0x332a99=>{const _0x6ff698=_0x4271f2,_0x161831=_0x332a99;return _0x161831['title'][_0x6ff698(0x192)]()[_0x6ff698(0x109)](_0x5abee1[_0x6ff698(0x192)]());});return Promise['resolve'](_0x5596ef);}}),_0x12bef5=()=>{const _0x2d9358=_0x5ad0be;process['stdout'][_0x2d9358(0x200)](_0x2d9358(0x263)),process[_0x2d9358(0x218)][_0x2d9358(0x200)](_0x2d9358(0x263)),process[_0x2d9358(0x218)][_0x2d9358(0x200)](_0x2d9358(0x263));},_0x139961=_0x99fbb5&&_0x99fbb5[_0x5ad0be(0x181)]&&_0x99fbb5[_0x5ad0be(0x181)]!==null&&_0x99fbb5[_0x5ad0be(0x181)][_0x5ad0be(0xf2)]()!=='';if(!_0x139961){_0x12bef5(),console[_0x5ad0be(0x172)](a60_0x174743[_0x5ad0be(0x1a9)](_0x5ad0be(0x107)));return;}_0x12bef5();const _0x3fe4c6=_0x7ea97e[_0x5ad0be(0x233)](_0x218f35=>_0x218f35[_0x5ad0be(0x16f)]?.['id']===_0x99fbb5[_0x5ad0be(0x181)]);if(_0x3fe4c6){const _0x1ed784=_0x3fe4c6[_0x5ad0be(0x148)]?.[_0x5ad0be(0x18d)]||'?',_0x5948b5=_0x3fe4c6[_0x5ad0be(0x140)]?.[_0x5ad0be(0x18d)]||'?';console[_0x5ad0be(0x172)](_0x5ad0be(0x276)+a60_0x174743[_0x5ad0be(0x1a9)](_0x1ed784)+_0x5ad0be(0x256)+a60_0x174743[_0x5ad0be(0x1a9)](_0x5948b5));}const _0x5e9851=new WorkflowTimelineCommand();await _0x5e9851['execute']({'args':[],'options':{..._0x15c29e,'attemptId':_0x99fbb5['attemptId']},'tdx':_0x1d1a02});}[a60_0x15a404(0x141)](_0xc810b8,_0x40af8e){const _0x257fc0=a60_0x15a404,_0x42b525=new Map();for(const _0x4dd122 of _0xc810b8){_0x4dd122['id']&&_0x4dd122['lastAttempt']?.['id']&&_0x42b525[_0x257fc0(0x125)](_0x4dd122['id'],_0x4dd122[_0x257fc0(0x16f)]['id']);}const _0x434eac=[];let _0xcd71e9='';const _0x3f4c03=this[_0x257fc0(0x1be)](_0xc810b8,_0x40af8e),_0x364691=_0x3f4c03[_0x257fc0(0x214)]('\x0a');for(const _0x41ceff of _0x364691){if(_0x41ceff[_0x257fc0(0xf0)](_0x257fc0(0x16e))||_0x41ceff['match'](/^\s+\d{4}-\d{2}-\d{2}/))_0xcd71e9=_0x41ceff;else{if(_0x41ceff[_0x257fc0(0x25f)](/^[✅❌🔄🛑⏳]/)){const _0x48a86a=_0x41ceff[_0x257fc0(0x25f)](/#(\d+)/),_0x485e5e=_0x48a86a?_0x48a86a[0x1]:null,_0x4a8ec5=_0x485e5e?_0x42b525[_0x257fc0(0xe4)](_0x485e5e)||null:null,_0x25508c=_0xc810b8[_0x257fc0(0x233)](_0x422055=>_0x422055['id']===_0x485e5e),_0x3ba055=_0x25508c?.[_0x257fc0(0x148)]?.[_0x257fc0(0x18d)]||'';_0x434eac[_0x257fc0(0x23d)]({'displayLine':_0x41ceff,'attemptId':_0x4a8ec5,'projectName':_0x3ba055});}}}return{'timelineRows':_0x434eac,'timeAxisHeader':_0xcd71e9};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0x1d0);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x1f9);async[a60_0x15a404(0x1f0)](_0x36ecca){const _0x172999=a60_0x15a404,{options:_0x392422,args:_0xdcc25,tdx:_0x52350b}=_0x36ecca,_0x38d388=this[_0x172999(0x26b)](_0xdcc25,_0x392422);if(!_0x38d388)return 0x1;const {projectName:_0x4187b5,workflowName:_0x238b72}=_0x38d388,_0x4b9f8b=_0x392422['includeRetried'];if(_0x392422[_0x172999(0x1b0)]){if(_0x4187b5&&_0x238b72)console[_0x172999(0x25d)](_0x172999(0x13b)+_0x4187b5+'.'+_0x238b72);else _0x4187b5&&console[_0x172999(0x25d)](_0x172999(0x105)+_0x4187b5);_0x4b9f8b&&console[_0x172999(0x25d)](_0x172999(0x28b));}const _0x5d71f9=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x52350b[_0x172999(0x140)][_0x172999(0x1c0)]({'projectName':_0x4187b5,'workflowName':_0x238b72,'includeRetried':_0x4b9f8b,'limit':_0x392422[_0x172999(0x189)]}),{'verbose':_0x392422['verbose']}),_0x2dbcd9=_0x5d71f9['data'],_0x36ef88=_0x392422[_0x172999(0x189)]||0x64,_0x28176d=_0x2dbcd9['length']>=_0x36ef88?a60_0x174743['dim'](_0x172999(0x13c)):'';console[_0x172999(0x25d)]('✔\x20Found\x20'+_0x2dbcd9[_0x172999(0x1c9)]+_0x172999(0x1f5)+(_0x2dbcd9[_0x172999(0x1c9)]!==0x1?'s':'')+_0x28176d);if(_0x392422[_0x172999(0x217)]==='json'||_0x392422[_0x172999(0x217)]===_0x172999(0xeb)||_0x392422[_0x172999(0x217)]===_0x172999(0x255))await handleSDKOutput(_0x2dbcd9,_0x392422);else{if(_0x2dbcd9['length']===0x0){if(_0x4187b5&&_0x238b72)console[_0x172999(0x172)](_0x172999(0x254)+_0x4187b5+'.'+_0x238b72);else _0x4187b5?console[_0x172999(0x172)](_0x172999(0x118)+_0x4187b5):console['log'](_0x172999(0x1e6));}else{const _0x3b0a3b=_0x392422[_0x172999(0x18e)],_0x1a6219=_0x2dbcd9[_0x172999(0xed)](_0x19d4b7=>{const _0x28d00d=_0x172999,_0x586dd3=a60_0x174743[_0x28d00d(0x1a9)]('#'+_0x19d4b7['id']),_0x5d7499=_0x19d4b7[_0x28d00d(0x148)]?.['id'],_0x42ff18=_0x19d4b7[_0x28d00d(0x26c)]||_0x19d4b7[_0x28d00d(0x1d2)],_0x22ae2b=_0x5d7499&&_0x42ff18?hyperlink(_0x586dd3,getWorkflowAttemptUrl(_0x3b0a3b,_0x5d7499,_0x42ff18,_0x19d4b7['id'])):_0x586dd3,{icon:_0x4e5471,text:_0x1d74b5}=getAttemptStatusDisplay(_0x19d4b7),_0xe1e16d=(_0x19d4b7[_0x28d00d(0x148)]?.[_0x28d00d(0x18d)]||'?')+'.'+(_0x19d4b7[_0x28d00d(0x140)]?.[_0x28d00d(0x18d)]||'?'),_0x2bfd6b=_0x19d4b7[_0x28d00d(0x1cf)]?a60_0x174743[_0x28d00d(0x1a9)](_0x19d4b7['sessionTime']):'';return(_0x22ae2b+'\x20'+_0x4e5471+(_0x1d74b5?'\x20'+_0x1d74b5:'')+'\x20'+_0xe1e16d+'\x20'+_0x2bfd6b)['trimEnd']();});await writeOutput(_0x1a6219[_0x172999(0xd7)]('\x0a'),_0x392422[_0x172999(0x1d4)],_0x172999(0x1fc));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0x1e5);['description']=a60_0x15a404(0x179);async['execute'](_0x3d65c4){const _0x3eff69=a60_0x15a404,{options:_0x3d5884,args:_0x3fcd46,tdx:_0x4f4227}=_0x3d65c4,_0x1ea104=_0x3fcd46[0x0];if(!_0x1ea104)return console[_0x3eff69(0x25d)](_0x3eff69(0x1dd)),0x1;_0x3d5884[_0x3eff69(0x1b0)]&&console[_0x3eff69(0x25d)](_0x3eff69(0x104)+_0x1ea104);const _0xa8e648=await withSpinner('Getting\x20attempt\x20details...',()=>_0x4f4227[_0x3eff69(0x140)]['attempt'](_0x1ea104),{'verbose':_0x3d5884[_0x3eff69(0x1b0)]}),_0x368d02=_0xa8e648[_0x3eff69(0x12d)];let _0x44a928;!_0x368d02[_0x3eff69(0x1f7)]?_0x44a928=_0x368d02[_0x3eff69(0x13a)]?_0x3eff69(0x1a4):_0x3eff69(0x248):_0x44a928=_0x368d02['success']?_0x3eff69(0x24a):_0x3eff69(0x25d);let _0x17776e;if(_0x368d02[_0x3eff69(0x1b1)]&&_0x368d02[_0x3eff69(0x20d)]){const _0x597f07=new Date(_0x368d02[_0x3eff69(0x1b1)])['getTime'](),_0x4fb13d=new Date(_0x368d02['finishedAt'])[_0x3eff69(0x1de)]();_0x17776e=Math[_0x3eff69(0xd1)]((_0x4fb13d-_0x597f07)/0x3e8);}const _0x1c8304={'attempt_id':_0x368d02['id'],'status':_0x44a928,..._0x368d02['index']!==undefined&&{'index':_0x368d02[_0x3eff69(0x112)]},..._0x368d02[_0x3eff69(0x148)]&&{'project':_0x368d02[_0x3eff69(0x148)][_0x3eff69(0x18d)]},..._0x368d02[_0x3eff69(0x140)]&&{'workflow':_0x368d02['workflow'][_0x3eff69(0x18d)]},..._0x368d02['sessionId']&&{'session_id':_0x368d02[_0x3eff69(0x1d2)]},..._0x368d02[_0x3eff69(0x1cf)]&&{'session_time':_0x368d02[_0x3eff69(0x1cf)]},..._0x368d02['retryAttemptName']&&{'retry_attempt':_0x368d02[_0x3eff69(0x122)]},..._0x17776e!==undefined&&{'duration_sec':_0x17776e},..._0x368d02['createdAt']&&{'created_at':_0x368d02[_0x3eff69(0x1b1)]},..._0x368d02['finishedAt']&&{'finished_at':_0x368d02[_0x3eff69(0x20d)]},...Object['keys'](_0x368d02[_0x3eff69(0x1ff)])[_0x3eff69(0x1c9)]>0x0&&{'params':_0x368d02['params']}};return await handleSingleObjectOutput(_0x1c8304,_0x3d5884),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a60_0x15a404(0x126);['description']=a60_0x15a404(0x1d1);async['execute'](_0x5a2217){const _0x40dfd3=a60_0x15a404,{options:_0x214b81,args:_0x2d920e,tdx:_0x3d1b52}=_0x5a2217,_0x44a65f=_0x2d920e[0x0];if(!_0x44a65f)return console['error'](_0x40dfd3(0x1dd)),0x1;const _0x3d708a=_0x214b81[_0x40dfd3(0xe7)];_0x214b81['verbose']&&(console['error'](_0x40dfd3(0x104)+_0x44a65f),_0x3d708a&&console[_0x40dfd3(0x25d)](_0x40dfd3(0x121)));const _0x1f063d=await withSpinner(_0x40dfd3(0x298),()=>_0x3d1b52[_0x40dfd3(0x140)][_0x40dfd3(0xe3)](_0x44a65f,_0x3d708a||![]),{'verbose':_0x214b81[_0x40dfd3(0x1b0)]}),_0x227e29=_0x1f063d['data'];return console['error'](_0x40dfd3(0x134)+_0x227e29['length']+_0x40dfd3(0x1ac)+(_0x227e29[_0x40dfd3(0x1c9)]!==0x1?'s':'')),await handleSDKOutput(_0x227e29,_0x214b81),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']='workflow:logs';[a60_0x15a404(0x1e2)]=a60_0x15a404(0xff);async[a60_0x15a404(0x1f0)](_0x5924cc){const _0x411a45=a60_0x15a404,{options:_0x14b5d0,args:_0x3e7a06,tdx:_0x315dbc}=_0x5924cc,_0x108f3d=_0x3e7a06[0x0];let _0x2a6b54=_0x3e7a06[0x1];if(!_0x108f3d)return console[_0x411a45(0x25d)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x14b5d0[_0x411a45(0x1b0)]&&(console['error']('Attempt\x20ID:\x20'+_0x108f3d),_0x2a6b54&&console['error'](_0x411a45(0x292)+_0x2a6b54));const _0x194222=await withSpinner(_0x411a45(0x1bd),()=>_0x315dbc[_0x411a45(0x140)][_0x411a45(0xee)](_0x108f3d,_0x2a6b54),{'verbose':_0x14b5d0['verbose']}),_0x1054e0=_0x194222[_0x411a45(0x12d)];if(_0x1054e0[_0x411a45(0x1c9)]===0x0)return console[_0x411a45(0x25d)](_0x411a45(0x29d)),0x0;if(!_0x2a6b54&&(_0x14b5d0[_0x411a45(0x176)]||_0x14b5d0[_0x411a45(0x217)]))return await handleSDKOutput(_0x1054e0,_0x14b5d0),0x0;if(!_0x2a6b54){const _0x2d3695=_0x1054e0[_0x411a45(0xed)](_0x3b1d5d=>({'title':_0x3b1d5d['taskName']+'\x20('+formatBytes(_0x3b1d5d[_0x411a45(0x249)])+')','value':_0x3b1d5d[_0x411a45(0x151)]})),_0x321d68=await a60_0x50c7d3({'type':'select','name':_0x411a45(0x13f),'message':_0x411a45(0x1f6),'choices':_0x2d3695});if(!_0x321d68[_0x411a45(0x13f)])return console[_0x411a45(0x25d)]('Cancelled'),0x0;_0x2a6b54=_0x321d68[_0x411a45(0x13f)];}const _0x1ab982=await withSpinner(_0x411a45(0x114),()=>_0x315dbc[_0x411a45(0x140)]['logs'](_0x108f3d,_0x2a6b54),{'verbose':_0x14b5d0[_0x411a45(0x1b0)]}),_0x5e2c94=_0x1ab982[_0x411a45(0x12d)];return _0x5e2c94?console['log'](_0x5e2c94):console['error'](_0x411a45(0x24c)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0xf7);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x143);async[a60_0x15a404(0x1f0)](_0x145eb0){const _0xaf99ba=a60_0x15a404,{options:_0x4ecd1b,args:_0x105bf3,tdx:_0x5828b5}=_0x145eb0,_0x3b7524=_0x105bf3[0x0];if(!_0x3b7524)return console[_0xaf99ba(0x25d)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x516c3e=_0x4ecd1b[_0xaf99ba(0x190)];_0x4ecd1b[_0xaf99ba(0x1b0)]&&(console['error'](_0xaf99ba(0x104)+_0x3b7524),_0x516c3e&&console[_0xaf99ba(0x25d)](_0xaf99ba(0x245)+_0x516c3e));if(!_0x4ecd1b['yes']){if(!isInteractive())return console[_0xaf99ba(0x25d)](a60_0x174743['red'](_0xaf99ba(0x16d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xaf99ba(0x25d)](a60_0x174743['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x1f30ce=await confirmKey(_0xaf99ba(0x119)+_0x3b7524+'?');if(!_0x1f30ce)return console[_0xaf99ba(0x25d)](a60_0x174743[_0xaf99ba(0xf1)](_0xaf99ba(0x107))),0x1;}const _0x5868f7=await withSpinner(_0xaf99ba(0xe6),()=>_0x5828b5[_0xaf99ba(0x140)]['kill'](_0x3b7524,_0x516c3e),{'verbose':_0x4ecd1b[_0xaf99ba(0x1b0)]}),_0x4c00d0=_0x5868f7[_0xaf99ba(0x12d)];return console[_0xaf99ba(0x25d)]('✔\x20'+_0x4c00d0),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a60_0x15a404(0x133);[a60_0x15a404(0x1e2)]='Retry\x20a\x20session\x20or\x20attempt';async[a60_0x15a404(0x1f0)](_0x2f8835){const _0x242c1e=a60_0x15a404,{options:_0x565b58,args:_0x188ab3,tdx:_0x32d3f5}=_0x2f8835,_0x422863=_0x188ab3[0x0];if(!_0x422863)return console[_0x242c1e(0x25d)](_0x242c1e(0x23c)),console[_0x242c1e(0x25d)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x307fbb=![],_0x286d11=_0x422863;if(_0x422863[_0x242c1e(0xf0)](_0x242c1e(0x1e4)))_0x307fbb=!![],_0x286d11=_0x422863[_0x242c1e(0x1ec)](0x8);else{if(_0x422863[_0x242c1e(0xf0)](_0x242c1e(0x1da)))_0x307fbb=![],_0x286d11=_0x422863['substring'](0x8);else return console['error']('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error']('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x4e3eab=_0x565b58[_0x242c1e(0xe5)],_0x2c0230=_0x565b58[_0x242c1e(0x1b9)],_0xa17dd7=_0x565b58[_0x242c1e(0x1ff)],_0x19c4a5=_0x565b58[_0x242c1e(0x29b)];_0x565b58['verbose']&&(console[_0x242c1e(0x25d)](_0x242c1e(0x28d)+(_0x307fbb?_0x242c1e(0x275):_0x242c1e(0x128))+'\x20'+_0x286d11),_0x4e3eab&&console['error'](_0x242c1e(0x21e)+_0x4e3eab),_0x2c0230&&console[_0x242c1e(0x25d)]('Resume\x20from:\x20'+_0x2c0230),_0xa17dd7&&console['error'](_0x242c1e(0x1d8)+_0xa17dd7),_0x19c4a5&&console[_0x242c1e(0x25d)](_0x242c1e(0x286)));let _0x46dd7d;if(_0xa17dd7)try{if(_0xa17dd7[_0x242c1e(0xf0)]('@')){const _0xcf56ef=await import('fs/promises'),_0x3c12fe=_0xa17dd7['substring'](0x1),_0x2e8434=await _0xcf56ef[_0x242c1e(0x268)](_0x3c12fe,_0x242c1e(0x224));_0x46dd7d=JSON['parse'](_0x2e8434);}else _0x46dd7d=JSON[_0x242c1e(0x194)](_0xa17dd7);}catch{return console[_0x242c1e(0x25d)](_0x242c1e(0x10c)),0x1;}if(!_0x565b58['yes']){if(!isInteractive())return console['error'](a60_0x174743[_0x242c1e(0x156)](_0x242c1e(0x16d)),_0x242c1e(0x287)),console['error'](a60_0x174743[_0x242c1e(0x1a9)](_0x242c1e(0x1cc))),0x1;const _0x46256a=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x307fbb?_0x242c1e(0x275):_0x242c1e(0x128))+'\x20'+_0x286d11+'?');if(!_0x46256a)return console[_0x242c1e(0x25d)](a60_0x174743['yellow'](_0x242c1e(0x107))),0x1;}let _0x37e895;_0x307fbb?_0x37e895=await withSpinner('Retrying\x20session...',()=>_0x32d3f5['workflow'][_0x242c1e(0x223)](_0x286d11,{'fromTask':_0x4e3eab,'retryParams':_0x46dd7d}),{'verbose':_0x565b58[_0x242c1e(0x1b0)]}):_0x37e895=await withSpinner(_0x242c1e(0x17c),()=>_0x32d3f5[_0x242c1e(0x140)]['retryAttempt'](_0x286d11,{'resumeFrom':_0x2c0230,'retryParams':_0x46dd7d,'force':_0x19c4a5}),{'verbose':_0x565b58[_0x242c1e(0x1b0)]});const _0x3d1573=_0x37e895[_0x242c1e(0x12d)];return console[_0x242c1e(0x25d)](_0x242c1e(0xda)),console[_0x242c1e(0x25d)](_0x242c1e(0xd2)+_0x3d1573['attemptId']),console[_0x242c1e(0x25d)](_0x242c1e(0x173)+_0x3d1573[_0x242c1e(0x1d2)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a60_0x15a404(0x22f);[a60_0x15a404(0x1e2)]='Start\x20a\x20workflow\x20run';async[a60_0x15a404(0x1f0)](_0x14d8fc){const _0x44bdb8=a60_0x15a404,{options:_0x203ffe,args:_0x4292ec,tdx:_0x1d6993}=_0x14d8fc;let _0x17ead7=_0x4292ec[0x0];if(!_0x17ead7){const _0x56a29b=this[_0x44bdb8(0x213)]([],_0x203ffe),_0x58f1fd=await withSpinner(_0x44bdb8(0x269),()=>_0x1d6993[_0x44bdb8(0x140)][_0x44bdb8(0x204)](_0x56a29b,{'limit':_0x203ffe[_0x44bdb8(0x189)]}),{'verbose':_0x203ffe[_0x44bdb8(0x1b0)]}),_0x1be777=_0x58f1fd['data'];if(_0x1be777[_0x44bdb8(0x1c9)]===0x0)return console['error'](_0x44bdb8(0x17a)),!_0x56a29b&&console[_0x44bdb8(0x25d)](a60_0x174743[_0x44bdb8(0x1a9)](_0x44bdb8(0x241))),0x1;const _0x2b5ff2=_0x1be777[_0x44bdb8(0xed)](_0x54d519=>({'title':_0x54d519[_0x44bdb8(0x148)]?.[_0x44bdb8(0x18d)]+'.'+_0x54d519[_0x44bdb8(0x18d)],'value':_0x54d519[_0x44bdb8(0x148)]?.[_0x44bdb8(0x18d)]+'.'+_0x54d519[_0x44bdb8(0x18d)],'description':_0x54d519['revision']?'revision:\x20'+_0x54d519['revision']:undefined})),_0x404695=await a60_0x50c7d3({'type':_0x44bdb8(0x296),'name':'workflow','message':_0x44bdb8(0x231),'choices':_0x2b5ff2});if(!_0x404695[_0x44bdb8(0x140)])return 0x1;_0x17ead7=_0x404695[_0x44bdb8(0x140)];}if(!_0x17ead7[_0x44bdb8(0x109)]('.')){const _0x1a0dd6=this[_0x44bdb8(0x213)]([],_0x203ffe);if(_0x1a0dd6)_0x17ead7=_0x1a0dd6+'.'+_0x17ead7;else return console[_0x44bdb8(0x25d)](a60_0x174743[_0x44bdb8(0x156)](_0x44bdb8(0x149)),_0x44bdb8(0x257)),console[_0x44bdb8(0x25d)](a60_0x174743[_0x44bdb8(0x1a9)](_0x44bdb8(0x241))),0x1;}const _0x1fa99b=_0x203ffe[_0x44bdb8(0x264)],_0x126a23=_0x203ffe[_0x44bdb8(0x1cf)],_0x590e65={};if(_0x1fa99b&&Array[_0x44bdb8(0x1d9)](_0x1fa99b))for(const _0x5831e8 of _0x1fa99b){const _0x11e04d=_0x5831e8[_0x44bdb8(0x24f)]('=');if(_0x11e04d===-0x1)return console[_0x44bdb8(0x25d)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x5831e8),console['error'](_0x44bdb8(0x253)),0x1;const _0x18341e=_0x5831e8[_0x44bdb8(0x1ec)](0x0,_0x11e04d),_0x23f4a9=_0x5831e8[_0x44bdb8(0x1ec)](_0x11e04d+0x1);try{_0x590e65[_0x18341e]=JSON[_0x44bdb8(0x194)](_0x23f4a9);}catch{_0x590e65[_0x18341e]=_0x23f4a9;}}_0x203ffe[_0x44bdb8(0x1b0)]&&(console[_0x44bdb8(0x25d)](_0x44bdb8(0x14b)+_0x17ead7),Object['keys'](_0x590e65)[_0x44bdb8(0x1c9)]>0x0&&console[_0x44bdb8(0x25d)](_0x44bdb8(0x21f)+JSON[_0x44bdb8(0x274)](_0x590e65)),_0x126a23&&console[_0x44bdb8(0x25d)](_0x44bdb8(0x14c)+_0x126a23));if(_0x203ffe[_0x44bdb8(0x23e)])return await this[_0x44bdb8(0x26f)](_0x14d8fc,_0x17ead7,_0x590e65,_0x126a23);const _0x474845=await withSpinner('Starting\x20workflow\x20run...',()=>_0x1d6993['workflow'][_0x44bdb8(0x180)](_0x17ead7,_0x590e65,{'sessionTime':_0x126a23}),{'verbose':_0x203ffe[_0x44bdb8(0x1b0)]}),_0x2a59ac=_0x474845['data'];console[_0x44bdb8(0x25d)]('✔\x20Workflow\x20run\x20started'),console[_0x44bdb8(0x25d)](_0x44bdb8(0x186)+_0x2a59ac['id']),console[_0x44bdb8(0x25d)]('\x20\x20Session\x20ID:\x20'+_0x2a59ac[_0x44bdb8(0x1d2)]),console[_0x44bdb8(0x25d)](_0x44bdb8(0x1cb)+_0x2a59ac['project']?.['name']),console[_0x44bdb8(0x25d)](_0x44bdb8(0x101)+_0x2a59ac[_0x44bdb8(0x140)]?.[_0x44bdb8(0x18d)]);if(_0x2a59ac[_0x44bdb8(0x148)]?.['id']&&_0x2a59ac[_0x44bdb8(0x1d2)]&&_0x2a59ac['id']){const _0xe309a0=_0x203ffe[_0x44bdb8(0x18e)],_0x393fd8=getConsoleUrl(_0xe309a0,_0x44bdb8(0x1e0)+_0x2a59ac[_0x44bdb8(0x148)]['id']+_0x44bdb8(0x20c)+_0x2a59ac['sessionId']+_0x44bdb8(0x1c1)+_0x2a59ac['id']);console['error'](_0x44bdb8(0x27a)+a60_0x174743['cyan'](_0x393fd8));}return 0x0;}async[a60_0x15a404(0x26f)](_0xd67ff,_0x567770,_0xb05520,_0x493b1c){const _0x16fb57=a60_0x15a404,{options:_0x4f86df,tdx:_0x58bedc}=_0xd67ff,_0x30a5bf=await withSpinner(_0x16fb57(0x14e)+_0x567770+_0x16fb57(0x215),()=>_0x58bedc[_0x16fb57(0x140)][_0x16fb57(0xdc)](_0x567770),{'verbose':_0x4f86df[_0x16fb57(0x1b0)]}),_0x303f3b=_0x30a5bf[_0x16fb57(0x12d)],_0x57061c=_0x493b1c??new Date()[_0x16fb57(0x230)]();console[_0x16fb57(0x172)](a60_0x174743[_0x16fb57(0x115)](_0x16fb57(0x244)),_0x567770),console[_0x16fb57(0x172)](a60_0x174743['bold'](_0x16fb57(0x297)),_0x57061c),console[_0x16fb57(0x172)](a60_0x174743[_0x16fb57(0x115)](_0x16fb57(0xf6)),JSON[_0x16fb57(0x274)](_0xb05520)),console[_0x16fb57(0x172)](''),console[_0x16fb57(0x172)](a60_0x174743[_0x16fb57(0x115)](_0x16fb57(0x1ed)));const _0x41d60a=parseTaskGraph(_0x303f3b[_0x16fb57(0x1ce)]??null);if(_0x41d60a[_0x16fb57(0x1c9)]===0x0)console['log'](a60_0x174743[_0x16fb57(0x1a9)](_0x16fb57(0x273)));else for(const _0x209b89 of formatTaskGraph(_0x41d60a)){console[_0x16fb57(0x172)](_0x209b89);}const _0x5cc5cd=summarizeTaskGraph(_0x41d60a),_0x2379aa=formatWarningSummary(_0x5cc5cd);return _0x2379aa&&(console[_0x16fb57(0x172)](''),console['log'](a60_0x174743['yellow'](_0x2379aa))),console[_0x16fb57(0x172)](a60_0x174743[_0x16fb57(0xf1)](_0x16fb57(0x1c8))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0xf5);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x1dc);async[a60_0x15a404(0x1f0)](_0x15b382){const _0x4b20be=a60_0x15a404,{options:_0x5ef149,args:_0x3be1d4,tdx:_0x3ab878}=_0x15b382,_0x124a80=_0x3be1d4[0x0],_0x4b6b95=_0x3be1d4[0x1]||'.';if(!_0x124a80)return console[_0x4b20be(0x25d)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x4b20be(0x25d)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x4deae6=_0x5ef149[_0x4b20be(0x207)];_0x5ef149[_0x4b20be(0x1b0)]&&(console[_0x4b20be(0x25d)]('Project:\x20'+_0x124a80),console[_0x4b20be(0x25d)](_0x4b20be(0x11b)+_0x4b6b95),_0x4deae6&&console['error']('Revision:\x20'+_0x4deae6));const _0x38267a=await withSpinner('Downloading\x20project\x20'+_0x124a80+_0x4b20be(0x215),()=>_0x3ab878['workflow'][_0x4b20be(0x19d)](_0x124a80,_0x4b6b95,{'revision':_0x4deae6}),{'verbose':_0x5ef149[_0x4b20be(0x1b0)]}),_0x40925b=_0x38267a[_0x4b20be(0x12d)];return console[_0x4b20be(0x25d)](_0x4b20be(0x188)+_0x40925b[_0x4b20be(0x20f)]),console[_0x4b20be(0x25d)]('\x20\x20Revision:\x20'+_0x40925b[_0x4b20be(0x207)]),console[_0x4b20be(0x25d)]('\x20\x20Files\x20extracted:\x20'+_0x40925b['filesExtracted']),console['error'](_0x4b20be(0x137)+_0x4b6b95+'/'+_0x40925b[_0x4b20be(0x20f)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]='workflow:upload';[a60_0x15a404(0x1e2)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)';async[a60_0x15a404(0x1f0)](_0xa46190){const _0x1d1117=a60_0x15a404,{options:_0x2780b5,args:_0x205141,tdx:_0x14ca19}=_0xa46190;let _0x3b8776='.',_0x21f276=_0x2780b5[_0x1d1117(0x18d)];if(_0x205141[0x0]){const {promises:_0xbac220}=await import('fs');try{const _0x15ee47=await _0xbac220['stat'](_0x205141[0x0]);if(_0x15ee47[_0x1d1117(0x14d)]())_0x3b8776=_0x205141[0x0];else return console[_0x1d1117(0x25d)](_0x1d1117(0x11e)+_0x205141[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x21f276=_0x205141[0x0],_0x3b8776='.';}}const _0xc91a5f=_0x2780b5[_0x1d1117(0x207)],_0x215818=_0x2780b5[_0x1d1117(0x157)];_0x2780b5[_0x1d1117(0x1b0)]&&(console['error'](_0x1d1117(0x293)+_0x3b8776),_0x21f276&&console[_0x1d1117(0x25d)](_0x1d1117(0x258)+_0x21f276),_0xc91a5f&&console[_0x1d1117(0x25d)]('Revision:\x20'+_0xc91a5f),_0x215818&&console[_0x1d1117(0x25d)]('Validation:\x20skipped'));const _0xa33cfb=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x14ca19['workflow'][_0x1d1117(0x23d)](_0x3b8776,{'projectName':_0x21f276,'revision':_0xc91a5f,'skipValidation':_0x215818}),{'verbose':_0x2780b5[_0x1d1117(0x1b0)]}),_0x276cbc=_0xa33cfb[_0x1d1117(0x12d)];return console[_0x1d1117(0x25d)](_0x1d1117(0x29a)+_0x276cbc[_0x1d1117(0x20f)]),console[_0x1d1117(0x25d)](_0x1d1117(0x123)+_0x276cbc[_0x1d1117(0x21d)]),console[_0x1d1117(0x25d)]('\x20\x20Revision:\x20'+_0x276cbc[_0x1d1117(0x207)]),await this[_0x1d1117(0x1e8)](_0x14ca19,_0x276cbc[_0x1d1117(0x20f)],_0x2780b5[_0x1d1117(0x18e)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a60_0x15a404(0x232);[a60_0x15a404(0x1e2)]='Pull\x20workflow\x20project\x20to\x20local\x20folder';async[a60_0x15a404(0x1f0)](_0x59bc7c){const _0x408d78=a60_0x15a404,{options:_0x2641a6,args:_0x33b476,tdx:_0x1d04ff}=_0x59bc7c,_0x2ea828=_0x33b476[0x0],_0x5d001a=_0x33b476[0x1];if(!_0x2ea828)return console[_0x408d78(0x25d)](a60_0x174743[_0x408d78(0x156)](_0x408d78(0x149)),_0x408d78(0x150)),console[_0x408d78(0x25d)](a60_0x174743['dim']('Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]')),0x1;const _0x1164a3=_0x2641a6['revision'];_0x2641a6[_0x408d78(0x1b0)]&&(console['error'](_0x408d78(0x276)+_0x2ea828),_0x5d001a&&console[_0x408d78(0x25d)]('Target\x20directory:\x20'+_0x5d001a),_0x1164a3&&console[_0x408d78(0x25d)](_0x408d78(0x158)+_0x1164a3),_0x2641a6[_0x408d78(0x23e)]&&console['error'](_0x408d78(0x1d7)));const _0x5c3135=await withSpinner(_0x408d78(0x146)+_0x2ea828+_0x408d78(0x215),()=>_0x1d04ff[_0x408d78(0x140)]['pullProject'](_0x2ea828,{'targetDir':_0x5d001a,'revision':_0x1164a3}),{'verbose':_0x2641a6[_0x408d78(0x1b0)]}),_0x50a8c5=_0x5c3135['data'];_0x50a8c5[_0x408d78(0x1f1)]?console[_0x408d78(0x25d)]('→\x20New\x20project:\x20'+_0x50a8c5[_0x408d78(0x20f)]):console['error'](_0x408d78(0x1f4)+_0x50a8c5[_0x408d78(0x20f)]);console[_0x408d78(0x25d)](_0x408d78(0x170)+_0x50a8c5['revision']),console[_0x408d78(0x25d)]('\x20\x20Target:\x20'+(a60_0x45f48e['relative'](process[_0x408d78(0x17f)](),_0x50a8c5['targetDir'])||'.')),console[_0x408d78(0x25d)]('\x20\x20Changes:\x20'+a60_0x174743[_0x408d78(0x234)]('+'+_0x50a8c5[_0x408d78(0x18c)][_0x408d78(0xd8)]+_0x408d78(0x1c7))+',\x20'+(a60_0x174743[_0x408d78(0xf1)]('~'+_0x50a8c5[_0x408d78(0x18c)][_0x408d78(0x20a)]+_0x408d78(0xfe))+',\x20')+(a60_0x174743[_0x408d78(0x156)]('-'+_0x50a8c5['summary']['deleted']+_0x408d78(0x23b))+',\x20')+(''+a60_0x174743[_0x408d78(0x1a9)](_0x50a8c5[_0x408d78(0x18c)][_0x408d78(0x153)]+_0x408d78(0x166))));for(const _0x5a904d of _0x50a8c5[_0x408d78(0x270)]){_0x5a904d[_0x408d78(0x142)]===_0x408d78(0x20a)&&_0x5a904d['diff']&&(console[_0x408d78(0x25d)]('\x0a'+a60_0x174743[_0x408d78(0x22d)](_0x408d78(0xf4)+_0x5a904d[_0x408d78(0x1c6)])),console[_0x408d78(0x25d)](_0x5a904d[_0x408d78(0x1c5)]));}if(!_0x50a8c5[_0x408d78(0x163)])return saveSessionContext({'workflow_project':_0x50a8c5[_0x408d78(0x20f)]},_0x2641a6[_0x408d78(0x275)]),console[_0x408d78(0x25d)](a60_0x174743[_0x408d78(0x234)](_0x408d78(0x1c4))),console[_0x408d78(0x25d)](a60_0x174743['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x50a8c5[_0x408d78(0x20f)])),0x0;if(_0x2641a6[_0x408d78(0x23e)])return console['error'](a60_0x174743[_0x408d78(0xf1)](_0x408d78(0x18b))),0x0;if(!_0x2641a6[_0x408d78(0xf3)]){if(!isInteractive())return console[_0x408d78(0x25d)](a60_0x174743['red'](_0x408d78(0x16d)),_0x408d78(0x287)),console['error'](a60_0x174743['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5e4890=await confirmKey(_0x408d78(0x1e3));if(!_0x5e4890)return console[_0x408d78(0x25d)](a60_0x174743[_0x408d78(0xf1)]('Cancelled'),_0x408d78(0x27f)),0x1;}await withSpinner(_0x408d78(0x199),()=>_0x1d04ff['workflow']['applyPullProject'](_0x50a8c5,{'revision':_0x1164a3}),{'verbose':_0x2641a6[_0x408d78(0x1b0)]}),saveSessionContext({'workflow_project':_0x50a8c5['projectName']},_0x2641a6['session']),console[_0x408d78(0x25d)](a60_0x174743[_0x408d78(0x234)]('✔\x20Pull\x20complete'));const _0x493a7f=a60_0x45f48e[_0x408d78(0x171)](process[_0x408d78(0x17f)](),_0x50a8c5[_0x408d78(0x1b8)])||'.';return console['error'](a60_0x174743[_0x408d78(0x1a9)]('\x20\x20Location:\x20'+_0x493a7f)),console[_0x408d78(0x25d)](a60_0x174743[_0x408d78(0x1a9)](_0x408d78(0xea)+_0x50a8c5[_0x408d78(0x20f)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]='workflow:push';[a60_0x15a404(0x1e2)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI';async['execute'](_0x1dd2f3){const _0x3974d9=a60_0x15a404,{options:_0x44abec,args:_0x1546c6,tdx:_0x5afb3c}=_0x1dd2f3,_0x5c5e54=this[_0x3974d9(0xfd)](_0x1546c6,_0x44abec),_0x2e2314=_0x44abec,{revision:_0x401d15,skipValidation:_0x490025,backfill:_0x200be1}=_0x2e2314,_0x37b32e=_0x200be1===undefined?undefined:!_0x200be1;_0x44abec[_0x3974d9(0x1b0)]&&(_0x5c5e54&&console[_0x3974d9(0x25d)]('Source\x20directory:\x20'+_0x5c5e54),_0x401d15&&console[_0x3974d9(0x25d)](_0x3974d9(0x158)+_0x401d15),_0x44abec[_0x3974d9(0x23e)]&&console['error'](_0x3974d9(0x1d7)),_0x490025&&console['error'](_0x3974d9(0x185)),_0x200be1&&console[_0x3974d9(0x25d)](_0x3974d9(0x19b)));let _0x39b36c;try{_0x39b36c=await withSpinner('Analyzing\x20changes...',()=>_0x5afb3c[_0x3974d9(0x140)]['preparePushProject']({'sourceDir':_0x5c5e54,'revision':_0x401d15,'skipValidation':_0x490025,'skipSchedule':_0x37b32e}),{'verbose':_0x44abec['verbose']});}catch(_0x52b8c9){if(_0x52b8c9 instanceof Error&&_0x52b8c9[_0x3974d9(0x26d)]['includes'](_0x3974d9(0x13d)))return console['error'](a60_0x174743[_0x3974d9(0x156)](_0x3974d9(0x149)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x44abec['workflowProject']?console['error'](a60_0x174743[_0x3974d9(0x1a9)](_0x3974d9(0x159)+_0x44abec[_0x3974d9(0x110)]+_0x3974d9(0x16c)+_0x44abec['workflowProject']+'\x27')):console[_0x3974d9(0x25d)](a60_0x174743['dim'](_0x3974d9(0x23f))),0x1;throw _0x52b8c9;}const _0x93ed22=_0x39b36c[_0x3974d9(0x12d)];console[_0x3974d9(0x25d)](_0x3974d9(0x246)+_0x93ed22[_0x3974d9(0x20f)]),console[_0x3974d9(0x25d)](_0x3974d9(0x225)+_0x93ed22['sourceDir']),console[_0x3974d9(0x25d)](_0x3974d9(0x170)+_0x93ed22[_0x3974d9(0x207)]),console[_0x3974d9(0x25d)]('\x20\x20Changes:\x20'+a60_0x174743[_0x3974d9(0x234)]('+'+_0x93ed22[_0x3974d9(0x18c)]['new']+'\x20new')+',\x20'+(a60_0x174743[_0x3974d9(0xf1)]('~'+_0x93ed22[_0x3974d9(0x18c)][_0x3974d9(0x20a)]+_0x3974d9(0xfe))+',\x20')+(a60_0x174743[_0x3974d9(0x156)]('-'+_0x93ed22[_0x3974d9(0x18c)][_0x3974d9(0xdf)]+'\x20deleted')+',\x20')+(''+a60_0x174743[_0x3974d9(0x1a9)](_0x93ed22[_0x3974d9(0x18c)][_0x3974d9(0x153)]+_0x3974d9(0x166))));for(const _0x272ab4 of _0x93ed22['changes']){_0x272ab4[_0x3974d9(0x142)]===_0x3974d9(0x20a)&&_0x272ab4[_0x3974d9(0x1c5)]&&(console[_0x3974d9(0x25d)]('\x0a'+a60_0x174743[_0x3974d9(0x22d)](_0x3974d9(0xf4)+_0x272ab4['path'])),console['error'](_0x272ab4[_0x3974d9(0x1c5)]));}if(!_0x93ed22[_0x3974d9(0x163)])return console[_0x3974d9(0x25d)](a60_0x174743[_0x3974d9(0x234)](_0x3974d9(0x1a0))),await this['showWorkflowConsoleUrl'](_0x5afb3c,_0x93ed22['projectName'],_0x44abec['site']),0x0;if(_0x44abec[_0x3974d9(0x23e)])return console['error'](a60_0x174743['yellow'](_0x3974d9(0x1ae))),0x0;if(!_0x44abec[_0x3974d9(0xf3)]){if(!isInteractive())return console[_0x3974d9(0x25d)](a60_0x174743[_0x3974d9(0x156)](_0x3974d9(0x16d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x3974d9(0x25d)](a60_0x174743[_0x3974d9(0x1a9)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x34544b=await confirmKey(_0x3974d9(0xd6));if(!_0x34544b)return console[_0x3974d9(0x25d)](a60_0x174743[_0x3974d9(0xf1)](_0x3974d9(0x107)),_0x3974d9(0x281)),0x1;}const _0x144566=await withSpinner(_0x3974d9(0x17b),()=>_0x5afb3c['workflow'][_0x3974d9(0x116)](_0x93ed22),{'verbose':_0x44abec[_0x3974d9(0x1b0)]}),_0x2b6325=_0x144566[_0x3974d9(0x12d)];return console['error'](a60_0x174743[_0x3974d9(0x234)](_0x3974d9(0x219))),console['error'](_0x3974d9(0x123)+_0x2b6325['projectId']),console['error'](_0x3974d9(0x170)+_0x2b6325[_0x3974d9(0x207)]),await this[_0x3974d9(0x1e8)](_0x5afb3c,_0x2b6325['projectName'],_0x44abec[_0x3974d9(0x18e)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]='workflow:clone';[a60_0x15a404(0x1e2)]=a60_0x15a404(0xfa);async[a60_0x15a404(0x1f0)](_0x56cf62){const _0x5e3566=a60_0x15a404,{options:_0x4c292b,args:_0x41a4bb,tdx:_0xba3d9d}=_0x56cf62,_0x9a504=this[_0x5e3566(0xfd)](_0x41a4bb,_0x4c292b),_0x26babe=_0x4c292b[_0x5e3566(0x18d)],_0x27cba5=_0x4c292b[_0x5e3566(0x207)],_0x5d4d25=_0x4c292b[_0x5e3566(0x157)];if(!_0x9a504)return console[_0x5e3566(0x25d)](a60_0x174743[_0x5e3566(0x156)](_0x5e3566(0x149)),'Source\x20directory\x20is\x20required'),console[_0x5e3566(0x25d)](a60_0x174743[_0x5e3566(0x1a9)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x5e3566(0x25d)](a60_0x174743[_0x5e3566(0x1a9)](_0x5e3566(0x288))),0x1;if(!_0x26babe)return console['error'](a60_0x174743[_0x5e3566(0x156)](_0x5e3566(0x149)),_0x5e3566(0x127)),console['error'](a60_0x174743[_0x5e3566(0x1a9)](_0x5e3566(0x168))),0x1;_0x4c292b[_0x5e3566(0x1b0)]&&(console[_0x5e3566(0x25d)]('Source\x20directory:\x20'+_0x9a504),console['error'](_0x5e3566(0x238)+_0x26babe),_0x27cba5&&console[_0x5e3566(0x25d)](_0x5e3566(0x158)+_0x27cba5),_0x4c292b[_0x5e3566(0x23e)]&&console[_0x5e3566(0x25d)](_0x5e3566(0x1d7)),_0x5d4d25&&console['error'](_0x5e3566(0x185)));const _0x2c7432=await withSpinner(_0x5e3566(0x108),()=>_0xba3d9d[_0x5e3566(0x140)][_0x5e3566(0x1fb)](_0x9a504,_0x26babe,{'revision':_0x27cba5,'skipValidation':_0x5d4d25}),{'verbose':_0x4c292b[_0x5e3566(0x1b0)]}),_0x2268c0=_0x2c7432[_0x5e3566(0x12d)];console[_0x5e3566(0x25d)](_0x5e3566(0x1ca)+_0x2268c0[_0x5e3566(0x227)]);_0x2268c0[_0x5e3566(0x1b2)]&&console[_0x5e3566(0x25d)]('Source\x20project:\x20'+_0x2268c0[_0x5e3566(0x1b2)]);console[_0x5e3566(0x25d)](_0x5e3566(0x238)+_0x2268c0[_0x5e3566(0x26a)]),console[_0x5e3566(0x25d)](_0x5e3566(0x158)+_0x2268c0['revision']),console[_0x5e3566(0x25d)]('Files\x20to\x20upload:\x20'+_0x2268c0[_0x5e3566(0x208)]);_0x2268c0['targetExists']&&(console['error'](a60_0x174743[_0x5e3566(0xf1)](_0x5e3566(0x1fd)+_0x2268c0[_0x5e3566(0x26a)]+_0x5e3566(0x15a)+_0x2268c0[_0x5e3566(0xe9)]+')')),console[_0x5e3566(0x25d)](a60_0x174743[_0x5e3566(0xf1)](_0x5e3566(0x1df))));if(_0x4c292b[_0x5e3566(0x23e)])return console[_0x5e3566(0x25d)](a60_0x174743[_0x5e3566(0xf1)](_0x5e3566(0x277))),0x0;if(!_0x4c292b['yes']){if(!isInteractive())return console[_0x5e3566(0x25d)](a60_0x174743[_0x5e3566(0x156)]('\x0aError:'),_0x5e3566(0x287)),console['error'](a60_0x174743[_0x5e3566(0x1a9)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3c79c3=_0x2268c0[_0x5e3566(0x1b2)]||a60_0x45f48e[_0x5e3566(0x11d)](_0x9a504),_0x5d9700=_0x2268c0['targetExists']?_0x5e3566(0x1f2)+_0x26babe+_0x5e3566(0x198):_0x5e3566(0x124)+_0x3c79c3+_0x5e3566(0x1a6)+_0x26babe+'\x22?',_0x1a9961=await confirmKey(_0x5d9700);if(!_0x1a9961)return console[_0x5e3566(0x25d)](a60_0x174743['yellow'](_0x5e3566(0x107))),0x1;}const _0x5a6f2c=await withSpinner(_0x2268c0[_0x5e3566(0x283)]?_0x5e3566(0x113)+_0x26babe+'...':'Cloning\x20to\x20'+_0x26babe+'...',()=>_0xba3d9d[_0x5e3566(0x140)][_0x5e3566(0xe2)](_0x2268c0),{'verbose':_0x4c292b['verbose']}),_0x39e9c4=_0x5a6f2c[_0x5e3566(0x12d)];return console['error'](a60_0x174743[_0x5e3566(0x234)](_0x2268c0[_0x5e3566(0x283)]?'✔\x20Project\x20updated':'✔\x20Clone\x20complete')),console[_0x5e3566(0x25d)](_0x5e3566(0x1cb)+_0x39e9c4['newProjectName']),console[_0x5e3566(0x25d)](_0x5e3566(0x123)+_0x39e9c4[_0x5e3566(0x1d6)]),console[_0x5e3566(0x25d)](_0x5e3566(0x170)+_0x39e9c4[_0x5e3566(0x207)]),await this['showWorkflowConsoleUrl'](_0xba3d9d,_0x39e9c4[_0x5e3566(0x26a)],_0x4c292b[_0x5e3566(0x18e)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0x260);[a60_0x15a404(0x1e2)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20AI';async['execute'](_0x26299e){const _0x47ae2b=a60_0x15a404,{options:_0x1e492d,args:_0x1d7b7d,tdx:_0xb9e357}=_0x26299e,_0x386908=_0x1d7b7d[0x0];if(!_0x386908)return console[_0x47ae2b(0x25d)](_0x47ae2b(0x291)),console[_0x47ae2b(0x25d)](_0x47ae2b(0x202)),0x1;_0x1e492d['verbose']&&console[_0x47ae2b(0x25d)](_0x47ae2b(0x276)+_0x386908);if(!_0x1e492d[_0x47ae2b(0xf3)]){if(!isInteractive())return console[_0x47ae2b(0x25d)](a60_0x174743[_0x47ae2b(0x156)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a60_0x174743[_0x47ae2b(0x1a9)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x52abe8=await confirmKey(_0x47ae2b(0x10e)+_0x386908+_0x47ae2b(0x237));if(!_0x52abe8)return console[_0x47ae2b(0x25d)](a60_0x174743[_0x47ae2b(0xf1)](_0x47ae2b(0x107))),0x1;}const _0x11d780=await withSpinner(_0x47ae2b(0xfb)+_0x386908+'...',()=>_0xb9e357[_0x47ae2b(0x140)][_0x47ae2b(0x1e7)](_0x386908),{'verbose':_0x1e492d[_0x47ae2b(0x1b0)]}),_0x59a117=_0x11d780[_0x47ae2b(0x12d)];return console['error'](_0x47ae2b(0x145)+_0x59a117[_0x47ae2b(0x20f)]),console['error']('\x20\x20Project\x20ID:\x20'+_0x59a117[_0x47ae2b(0x21d)]),0x0;}}export function parseKeyValue(_0x1f8e63){const _0x521bb1=a60_0x15a404,_0x377fd9=_0x1f8e63[_0x521bb1(0x24f)]('=');if(_0x377fd9===-0x1)throw new Error(_0x521bb1(0x169)+_0x1f8e63+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x24c643=_0x1f8e63['substring'](0x0,_0x377fd9),_0x224b99=_0x1f8e63[_0x521bb1(0x1ec)](_0x377fd9+0x1);if(!_0x24c643)throw new Error(_0x521bb1(0x1b3));return{'key':_0x24c643,'value':_0x224b99};}function a60_0x740d(){const _0x52bc2a=['retrySession','utf-8','\x20\x20Source:\x20','37446936rGKxdJ','sourceDir','tdx\x20wf\x20attempt\x20','Secrets\x20to\x20set:\x20','workflow:schedule:disable','🔄\x20','getDate','cyan','startTime','workflow:run','toISOString','Select\x20a\x20workflow\x20to\x20run','workflow:pull','find','green','renderTimeline','deleteSecret','\x22?\x20This\x20cannot\x20be\x20undone.','New\x20project\x20name:\x20','renderSingleTimeline','filter','\x20deleted','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','push','dryRun','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','ICON_WIDTH','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','workflow:schedule:enable','Key:\x20','Workflow:','Reason:\x20','✔\x20Project:\x20','MAX_POLL_ITERATIONS','running','fileSize','success','columns','No\x20log\x20content\x20found','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','Listing\x20schedules...','indexOf','GUTTER','Disable\x20a\x20workflow\x20schedule','\x20disabled\x20(','Expected\x20format:\x20--param\x20key=value','No\x20attempts\x20found\x20for:\x20','table',',\x20Workflow:\x20','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Project\x20name:\x20','msPerChar','fullName','Enable\x20a\x20workflow\x20schedule','Failed\x20to\x20fetch\x20attempt\x20data','error','getMonth','match','workflow:delete','✔\x20Workflow\x20project\x20set\x20to:\x20','\x20has\x20no\x20attempts','\x1b[1A\x1b[2K','param','workflow:schedules','List\x20workflow\x20schedules','MIN_LABEL_COUNT','readFile','Loading\x20workflows...','newProjectName','parseProjectWorkflowPattern','session_id','message','group_error','executeDryRun','changes','38511ifmXjI','workflowName','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','stringify','session','Project:\x20','\x0aDry\x20run\x20-\x20no\x20project\x20created','MAX_TASKS_DISPLAY','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','\x20\x20Console:\x20','workflow:use','start','pollTimeline','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','-\x20no\x20files\x20written','Setting\x20','-\x20nothing\x20pushed','requireProject','targetExists','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Force:\x20yes','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','\x20-\x20','Include\x20retried:\x20yes','Setting\x20secret...','Target:\x20','✔\x20Schedule\x20#','Fetching\x20schedule\x20#','List\x20workflows','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Task\x20name:\x20','Project\x20directory:\x20','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','resolveProjectId','select','Session\x20time:','Getting\x20attempt\x20tasks...','List\x20workflow\x20execution\x20sessions','✔\x20Pushed\x20','force','Error:\x20Project\x20name\x20is\x20required','No\x20log\x20files\x20found\x20for\x20this\x20attempt','No\x20sessions\x20found\x20for:\x20','1332JDGjMF','round','\x20\x20New\x20attempt\x20ID:\x20','text','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','\x0aPush\x20these\x20changes?','join','new','Using\x20attempt\x20','✔\x20Retry\x20started','toLocaleString','getWorkflow','tdx.json','No\x20sessions\x20found\x20in\x20project:\x20','deleted','key','\x0aPolling...\x20(','executeCloneProject','tasks','get','fromTask','Killing\x20attempt...','includeSubtasks','has','existingProjectId','\x20\x20Session\x20context\x20set\x20to:\x20','jsonl','2028APCriW','map','logFiles','repeat','startsWith','yellow','trim','yes','---\x20','workflow:download','Parameters:','workflow:kill','Error:\x20Secret\x20key\x20is\x20required','LABEL_MIN_SPACING','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','Deleting\x20project\x20','workflow:projects','resolveProjectDir','\x20modified','Show\x20logs\x20for\x20a\x20workflow\x20attempt','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','\x20\x20Workflow:\x20','state','⚠\x20Showing\x20first\x20','Attempt\x20ID:\x20','Filter:\x20project=','workflow:timeline','Cancelled','Analyzing\x20project...','includes','No\x20workflow\x20projects\x20found','fill','Error:\x20Invalid\x20JSON\x20in\x20--params','No\x20workflows\x20found\x20in\x20project:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Session\x20','workflowProject','floor','index','Updating\x20','Downloading\x20logs...','bold','executePushProject','values','No\x20attempts\x20found\x20in\x20project:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','clear','Output\x20directory:\x20','No\x20projects\x20match\x20pattern:\x20','basename','Error:\x20','workflow:secrets:list','padStart','Including\x20subtasks:\x20yes','retryAttemptName','\x20\x20Project\x20ID:\x20','\x0aClone\x20\x22','set','workflow:tasks','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','attempt','getSchedule','11455YoxzOx','keys','navigateSessionsInteractive','data','total','📋\x20','max','(unknown)','7jrfWKN','workflow:retry','✔\x20Found\x20','18710zBDdEW','metadata','\x20\x20Location:\x20','📅\x20#','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','cancelRequested','Filter:\x20','\x20(use\x20--limit\x20to\x20show\x20more)','No\x20workflow\x20tdx.json\x20found','No\x20sessions\x20with\x20timing\x20information','task','workflow','generateSessionTimelineRows','type','Kill\x20a\x20running\x20attempt','sessions','✔\x20Deleted\x20project\x20','Pulling\x20project\x20','List\x20all\x20workflow\x20projects','project','Error:','unknown','Workflow:\x20','Session\x20time:\x20','isDirectory','Fetching\x20workflow\x20','every','Project\x20name\x20is\x20required','taskName','\x20session','unchanged','ICON_SPACING','Listing\x20schedules\x20for\x20','red','skipValidation','Revision:\x20','Tip:\x20cd\x20to\x20workflows/','\x22\x20already\x20exists\x20(ID:\x20','getHours','end','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Total:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Listing\x20workflow\x20projects...','Pattern:\x20','splice','hasChanges','size','isTTY','\x20unchanged','getMinutes','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Invalid\x20format:\x20','\x20to\x20see\x20detailed\x20logs','Auto-selected\x20latest\x20session:\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','\x0aError:','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','lastAttempt','\x20\x20Revision:\x20','relative','log','\x20\x20Session\x20ID:\x20','\x20secrets...','sort','json','buildTimelineData','pending','Show\x20specific\x20attempt\x20details','No\x20workflows\x20found','Pushing\x20project...','Retrying\x20attempt...','\x0aFailed\x20to\x20fetch\x20attempt\x20data','No\x20schedules\x20found','cwd','run','attemptId','workflow:secrets:set','startedAt','1870MdaAuB','Validation:\x20skipped','\x20\x20Attempt\x20ID:\x20','duration','✔\x20Downloaded\x20','limit','rows','\x0aDry\x20run\x20-\x20no\x20files\x20written','summary','name','site','context','reason','Loading\x20sessions...','toLowerCase','\x27...','parse','Warning:','all','displayLine','\x22\x20with\x20new\x20revision?','Writing\x20files...','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','download','13CCbmkR','min','\x0a✔\x20No\x20changes\x20to\x20push','window','Loading\x20session...','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','canceling','Latest\x20session\x20has\x20no\x20attempt','\x22\x20to\x20new\x20project\x20\x22','\x20tasks','follow','dim','\x20(disabled)','icon','\x20task','workflow:sessions','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x20secret','verbose','createdAt','sourceProjectName','Key\x20cannot\x20be\x20empty','Select\x20a\x20session\x20to\x20view\x20timeline:','planned','\x20enabled\x20(','5463mrEbJQ','targetDir','resumeFrom','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','nextRunTime','Fetching\x20log\x20files...','renderSessionsTimeline','durationMs','attempts','/attempt/','No\x20matching\x20sessions\x20found','sys','\x0a✔\x20Already\x20up\x20to\x20date','diff','path','\x20new','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','length','Source:\x20','\x20\x20Project:\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Listing\x20workflows...','config','sessionTime','workflow:attempts','Show\x20tasks\x20for\x20an\x20attempt','sessionId','listSecrets','output','3107816vuTOSP','newProjectId','Dry\x20run:\x20yes','Params:\x20','isArray','attempt:','getFullYear','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','Error:\x20Attempt\x20ID\x20is\x20required','getTime','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','/app/workflows/','updatedAt','description','\x0aApply\x20these\x20changes?','session:','workflow:attempt','No\x20attempts\x20found','delete','showWorkflowConsoleUrl','now','localeCompare','160ZazYar','substring','Task\x20graph:','✔\x20Secret\x20\x27','disableSchedule','execute','isNewProject','\x0aUpdate\x20existing\x20project\x20\x22','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','→\x20Project:\x20','\x20attempt','Select\x20a\x20task\x20to\x20view\x20logs:','done','Schedule\x20ID\x20is\x20required','List\x20workflow\x20attempts','No\x20sessions\x20found','prepareCloneProject','list','\x0a⚠\x20Project\x20\x22','Enabling\x20schedule\x20#','params','write','💡\x20Tip:\x20Use\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','status','workflows','\x0a✔\x20Attempt\x20complete','LABEL_WIDTH_DIVISOR','revision','fileCount','Deleting\x20secret...','modified','MAX_TIMELINE_WIDTH','/sessions/','finishedAt','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','projectName','resolve','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','Listing\x20secrets...','resolveProject','split','...','nextTime','format','stdout','✔\x20Push\x20complete','slice','536805SCpnnU','blue','projectId','From\x20task:\x20','Parameters:\x20','\x20schedule','Disabling\x20schedule\x20#','MIN_TIMELINE_WIDTH'];a60_0x740d=function(){return _0x52bc2a;};return a60_0x740d();}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0x11f);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x289);async[a60_0x15a404(0x1f0)](_0x12b339){const _0x53a012=a60_0x15a404,{options:_0x37ef29,args:_0x5882c8,tdx:_0x7cd56c}=_0x12b339,_0x4e3e4d=this[_0x53a012(0x282)](_0x5882c8,_0x37ef29);if(!_0x4e3e4d)return 0x1;_0x37ef29[_0x53a012(0x1b0)]&&console['error'](_0x53a012(0x276)+_0x4e3e4d);const _0x1a07dd=await withSpinner(_0x53a012(0x212),()=>_0x7cd56c[_0x53a012(0x140)][_0x53a012(0x1d3)](_0x4e3e4d),{'verbose':_0x37ef29['verbose']}),{secrets:_0x45f356}=_0x1a07dd[_0x53a012(0x12d)];return console[_0x53a012(0x25d)]('✔\x20Found\x20'+_0x45f356[_0x53a012(0x1c9)]+_0x53a012(0x1af)+(_0x45f356['length']!==0x1?'s':'')),await handleSDKOutput(_0x45f356,_0x37ef29),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a60_0x15a404(0x182);[a60_0x15a404(0x1e2)]='Set\x20a\x20secret\x20for\x20a\x20workflow\x20project';async[a60_0x15a404(0x1f0)](_0x43a331){const _0x4740c1=a60_0x15a404,{options:_0x5f1388,args:_0x11684f,tdx:_0x370614}=_0x43a331;let _0x4bd51a,_0x42a406;if(_0x11684f['length']>=0x1&&!_0x11684f[0x0][_0x4740c1(0x109)]('='))_0x4bd51a=_0x11684f[0x0],_0x42a406=_0x11684f['slice'](0x1);else{if(_0x11684f[_0x4740c1(0x1c9)]>=0x1&&_0x5f1388[_0x4740c1(0x110)])_0x4bd51a=_0x5f1388[_0x4740c1(0x110)],_0x42a406=_0x11684f;else return _0x11684f[_0x4740c1(0x1c9)]>=0x1?(console[_0x4740c1(0x25d)](_0x4740c1(0x29c)),console[_0x4740c1(0x25d)](_0x4740c1(0x241)),0x1):(console['error']('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x4740c1(0x25d)](_0x4740c1(0x211)),0x1);}if(_0x42a406[_0x4740c1(0x1c9)]===0x0)return console[_0x4740c1(0x25d)](_0x4740c1(0x139)),console['error']('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x1fbf0a={};try{for(const _0x406435 of _0x42a406){const {key:_0x3aa5e8,value:_0x59ba67}=parseKeyValue(_0x406435);_0x1fbf0a[_0x3aa5e8]=_0x59ba67;}}catch(_0x43631a){return _0x43631a instanceof Error&&console[_0x4740c1(0x25d)](a60_0x174743[_0x4740c1(0x156)](_0x4740c1(0x149)),_0x43631a[_0x4740c1(0x26d)]),0x1;}const _0xa2e721=Object[_0x4740c1(0x12b)](_0x1fbf0a);_0x5f1388['verbose']&&(console['error'](_0x4740c1(0x276)+_0x4bd51a),console[_0x4740c1(0x25d)](_0x4740c1(0x229)+_0xa2e721['join'](',\x20')));const _0x22bdd6=await withSpinner(_0xa2e721[_0x4740c1(0x1c9)]===0x1?_0x4740c1(0x28c):_0x4740c1(0x280)+_0xa2e721[_0x4740c1(0x1c9)]+_0x4740c1(0x174),()=>_0x370614[_0x4740c1(0x140)]['setSecrets'](_0x4bd51a,_0x1fbf0a),{'verbose':_0x5f1388[_0x4740c1(0x1b0)]}),_0x5341c7=_0x22bdd6[_0x4740c1(0x12d)];return console[_0x4740c1(0x25d)](_0xa2e721['length']===0x1?_0x4740c1(0x1ee)+_0x5341c7[_0x4740c1(0x12b)][0x0]+_0x4740c1(0x19c)+_0x5341c7[_0x4740c1(0x20f)]+'\x27':'✔\x20'+_0x5341c7[_0x4740c1(0x12b)][_0x4740c1(0x1c9)]+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x5341c7[_0x4740c1(0x20f)]+'\x27'),(_0x5f1388[_0x4740c1(0x176)]||_0x5f1388[_0x4740c1(0xeb)])&&await handleSingleObjectOutput(_0x5341c7,_0x5f1388),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]='workflow:secrets:delete';['description']=a60_0x15a404(0x1ba);async['execute'](_0x2b2118){const _0x40d503=a60_0x15a404,{options:_0x4fa3d4,args:_0x257f86,tdx:_0x1bce6b}=_0x2b2118;let _0x1c3154,_0x1d058a;if(_0x257f86['length']>=0x2)_0x1c3154=_0x257f86[0x0],_0x1d058a=_0x257f86[0x1];else{if(_0x257f86[_0x40d503(0x1c9)]===0x1&&_0x4fa3d4[_0x40d503(0x110)])_0x1c3154=_0x4fa3d4['workflowProject'],_0x1d058a=_0x257f86[0x0];else return _0x257f86[_0x40d503(0x1c9)]===0x1?(console[_0x40d503(0x25d)](_0x40d503(0x29c)),console[_0x40d503(0x25d)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x40d503(0x25d)](_0x40d503(0xf8)),console['error'](_0x40d503(0x279)),0x1);}_0x4fa3d4[_0x40d503(0x1b0)]&&(console[_0x40d503(0x25d)](_0x40d503(0x276)+_0x1c3154),console['error'](_0x40d503(0x243)+_0x1d058a));if(!_0x4fa3d4[_0x40d503(0xf3)]){if(!isInteractive())return console[_0x40d503(0x25d)](a60_0x174743['red'](_0x40d503(0x16d)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x40d503(0x25d)](a60_0x174743[_0x40d503(0x1a9)](_0x40d503(0x1cc))),0x1;const _0x149c4d=await confirmKey(_0x40d503(0x1f3)+_0x1d058a+'\x27\x20from\x20project\x20\x27'+_0x1c3154+'\x27?');if(!_0x149c4d)return console[_0x40d503(0x25d)](a60_0x174743[_0x40d503(0xf1)](_0x40d503(0x107))),0x1;}const _0x65c712=await withSpinner(_0x40d503(0x209),()=>_0x1bce6b[_0x40d503(0x140)][_0x40d503(0x236)](_0x1c3154,_0x1d058a),{'verbose':_0x4fa3d4[_0x40d503(0x1b0)]}),_0x1e791a=_0x65c712['data'];return console[_0x40d503(0x25d)](_0x40d503(0x1ee)+_0x1e791a[_0x40d503(0xe0)]+_0x40d503(0x20e)+_0x1e791a[_0x40d503(0x20f)]+'\x27'),(_0x4fa3d4[_0x40d503(0x176)]||_0x4fa3d4[_0x40d503(0xeb)])&&await handleSingleObjectOutput(_0x1e791a,_0x4fa3d4),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(_0x3404aa){const _0x37fdd9=a60_0x15a404,_0x2a66ba=Math[_0x37fdd9(0x111)](_0x3404aa/0x3e8),_0x1a6f51=Math[_0x37fdd9(0x111)](_0x2a66ba/0x3c),_0xa7762d=Math['floor'](_0x1a6f51/0x3c),_0x16e626=Math['floor'](_0xa7762d/0x18);if(_0x16e626>0x0){const _0x18368a=_0xa7762d%0x18;return _0x18368a>0x0?_0x16e626+'d\x20'+_0x18368a+'h':_0x16e626+'d';}else{if(_0xa7762d>0x0){const _0x4e7865=_0x1a6f51%0x3c;return _0x4e7865>0x0?_0xa7762d+'h\x20'+_0x4e7865+'m':_0xa7762d+'h';}else{if(_0x1a6f51>0x0){const _0x50dec0=_0x2a66ba%0x3c;return _0x50dec0>0x0?_0x1a6f51+'m\x20'+_0x50dec0+'s':_0x1a6f51+'m';}else return _0x2a66ba+'s';}}}function formatTimestamp(_0x4e9599,_0x407544){const _0x57a653=a60_0x15a404,_0xa2cad5=new Date(_0x4e9599),_0x170f26=String(_0xa2cad5[_0x57a653(0x15b)]())['padStart'](0x2,'0'),_0x347c78=String(_0xa2cad5[_0x57a653(0x167)]())[_0x57a653(0x120)](0x2,'0'),_0x529dc7=_0x170f26+':'+_0x347c78,_0x5d1c5d=_0xa2cad5['getFullYear']()===_0x407544[_0x57a653(0x1db)]()&&_0xa2cad5[_0x57a653(0x25e)]()===_0x407544[_0x57a653(0x25e)]()&&_0xa2cad5[_0x57a653(0x22c)]()===_0x407544[_0x57a653(0x22c)]();if(_0x5d1c5d)return _0x529dc7;else{const _0x1176dc=String(_0xa2cad5[_0x57a653(0x25e)]()+0x1)[_0x57a653(0x120)](0x2,'0'),_0x4bd587=String(_0xa2cad5[_0x57a653(0x22c)]())[_0x57a653(0x120)](0x2,'0');return _0x1176dc+'-'+_0x4bd587+'\x20'+_0x529dc7;}}function formatDate(_0x43165f){const _0x27d4f4=a60_0x15a404,_0x3c8e81=_0x43165f['getFullYear'](),_0x197a8c=String(_0x43165f['getMonth']()+0x1)[_0x27d4f4(0x120)](0x2,'0'),_0x4beb98=String(_0x43165f[_0x27d4f4(0x22c)]())[_0x27d4f4(0x120)](0x2,'0');return _0x3c8e81+'-'+_0x197a8c+'-'+_0x4beb98;}function getTaskStateIcon(_0x1dda25){const _0x2c6f20={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x2c6f20[_0x1dda25]||'⚪';}function getBarChar(_0x4d7023){const _0x550868=a60_0x15a404;return _0x4d7023===_0x550868(0x25d)||_0x4d7023==='group_error'?'×':'─';}function getBarColor(_0x378304){const _0xd3bb54=a60_0x15a404,_0x26549f={'success':a60_0x174743['green'],'error':a60_0x174743[_0xd3bb54(0x156)],'group_error':a60_0x174743['red'],'running':a60_0x174743['blue'],'blocked':a60_0x174743[_0xd3bb54(0xf1)],'planned':a60_0x174743['dim'],'canceling':a60_0x174743['yellow']};return _0x26549f[_0x378304]||a60_0x174743['white'];}function parseTaskName(_0x278208){const _0x1e2fc8=a60_0x15a404;let _0x3a6f0c=_0x278208['replace'](/^\++/,'');const _0xcf1ed7=_0x3a6f0c['split']('+'),_0x17f74d=_0xcf1ed7['length']>0x1?_0xcf1ed7[_0x1e2fc8(0x1c9)]-0x2:0x0,_0x2b62f7=_0xcf1ed7[_0xcf1ed7[_0x1e2fc8(0x1c9)]-0x1]||_0x3a6f0c;return{'level':_0x17f74d,'name':'+'+_0x2b62f7};}function truncateTaskName(_0x523e31,_0x2e6b25){const _0xc9f0b2=stringWidth(_0x523e31);if(_0xc9f0b2<=_0x2e6b25)return _0x523e31;let _0x54a969=_0x523e31;while(stringWidth(_0x54a969+'…')>_0x2e6b25&&_0x54a969['length']>0x0){_0x54a969=_0x54a969['slice'](0x0,-0x1);}return _0x54a969+'…';}function calculateTimeScale(_0x53748e,_0x2a99f2){const _0x1627f6=a60_0x15a404;return{'startTime':_0x53748e[_0x1627f6(0x27c)],'endTime':_0x53748e[_0x1627f6(0x15c)],'durationMs':_0x53748e[_0x1627f6(0x187)],'msPerChar':_0x53748e[_0x1627f6(0x187)]/_0x2a99f2};}function timeToPosition(_0x497310,_0x1e5b76,_0x2c02db){const _0x789609=a60_0x15a404,_0x3f1825=_0x497310-_0x1e5b76[_0x789609(0x22e)],_0x58e83c=Math[_0x789609(0x111)](_0x3f1825/_0x1e5b76[_0x789609(0x259)]);return Math['max'](0x0,Math['min'](_0x58e83c,_0x2c02db));}function renderTimeAxis(_0x49714a,_0x20b4e8){const _0x5ea355=a60_0x15a404,_0x1f5ad7=Math[_0x5ea355(0x19f)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x5ea355(0x130)](TIMELINE_CONFIG[_0x5ea355(0x267)],Math[_0x5ea355(0x111)](_0x20b4e8/TIMELINE_CONFIG[_0x5ea355(0x206)]))),_0x2632ea=_0x49714a[_0x5ea355(0x1bf)]/(_0x1f5ad7-0x1),_0x3878fa=new Date(_0x49714a[_0x5ea355(0x22e)]),_0x10ddc2=[];for(let _0x5037ff=0x0;_0x5037ff<_0x1f5ad7;_0x5037ff++){const _0x2bae1c=_0x49714a[_0x5ea355(0x22e)]+_0x5037ff*_0x2632ea,_0xcea338=timeToPosition(_0x2bae1c,_0x49714a,_0x20b4e8),_0x4e26c0=formatTimestamp(_0x2bae1c,_0x3878fa);_0x10ddc2[_0x5ea355(0x23d)]({'pos':_0xcea338,'text':_0x4e26c0});}const _0x5d5a96=new Array(_0x20b4e8)['fill']('\x20');let _0x5a58fd=-0x1;for(const {pos:_0x262241,text:_0x34ec5a}of _0x10ddc2){let _0x46d7ef=Math['max'](0x0,_0x262241-Math['floor'](_0x34ec5a[_0x5ea355(0x1c9)]/0x2));_0x46d7ef<=_0x5a58fd+TIMELINE_CONFIG[_0x5ea355(0xf9)]&&(_0x46d7ef=_0x5a58fd+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x46d7ef+_0x34ec5a['length']>_0x20b4e8&&(_0x46d7ef=_0x20b4e8-_0x34ec5a[_0x5ea355(0x1c9)]);if(_0x46d7ef>=0x0&&_0x46d7ef+_0x34ec5a[_0x5ea355(0x1c9)]<=_0x20b4e8&&_0x46d7ef>_0x5a58fd){for(let _0x37b9ec=0x0;_0x37b9ec<_0x34ec5a['length'];_0x37b9ec++){_0x5d5a96[_0x46d7ef+_0x37b9ec]=_0x34ec5a[_0x37b9ec];}_0x5a58fd=_0x46d7ef+_0x34ec5a[_0x5ea355(0x1c9)]-0x1;}}return _0x5d5a96[_0x5ea355(0xd7)]('');}function renderTaskRow(_0x4fb41d,_0x439f09,_0x4d42cc,_0x10f368){const _0x1fb0c9=a60_0x15a404,{level:_0x4072b8,name:_0x130797}=parseTaskName(_0x4fb41d['name']),_0x3e5c78='\x20'['repeat'](_0x4072b8),_0x4531c5=_0x4fb41d[_0x1fb0c9(0x1a1)]?'('+formatElapsed(_0x4fb41d[_0x1fb0c9(0x1a1)][_0x1fb0c9(0x187)])+')':'',_0x4d13ab=stringWidth(_0x4531c5),_0x127dda=_0x4072b8*0x1,_0x2d0be1=_0x10f368-_0x127dda-_0x4d13ab-0x1,_0x32f280=truncateTaskName(_0x130797,_0x2d0be1),_0x15c828=_0x3e5c78+_0x32f280,_0x1d2fb3=stringWidth(_0x15c828),_0x322477=_0x10f368-_0x1d2fb3-_0x4d13ab,_0x245b3e=_0x15c828+'\x20'[_0x1fb0c9(0xef)](Math[_0x1fb0c9(0x130)](0x1,_0x322477))+a60_0x174743[_0x1fb0c9(0x1a9)](_0x4531c5),_0x42eecd=getTaskStateIcon(_0x4fb41d[_0x1fb0c9(0x102)]),_0x5895db=new Array(_0x4d42cc)[_0x1fb0c9(0x10b)]('\x20');if(_0x4fb41d['window']){const _0x4e5eb9=timeToPosition(_0x4fb41d['window']['start'],_0x439f09,_0x4d42cc),_0xf4f9dc=timeToPosition(_0x4fb41d['window'][_0x1fb0c9(0x15c)],_0x439f09,_0x4d42cc),_0x1650a5=getBarChar(_0x4fb41d['state']),_0x5232f1=Math[_0x1fb0c9(0x130)](_0x4e5eb9+0x1,_0xf4f9dc);for(let _0x1e7fd7=_0x4e5eb9;_0x1e7fd7<Math[_0x1fb0c9(0x19f)](_0x5232f1,_0x4d42cc);_0x1e7fd7++){_0x5895db[_0x1e7fd7]=_0x1650a5;}}const _0x3ea6a8=getBarColor(_0x4fb41d[_0x1fb0c9(0x102)]),_0x31a6e8=_0x5895db['map'](_0x1915a5=>_0x1915a5==='\x20'?'\x20':_0x3ea6a8(_0x1915a5))[_0x1fb0c9(0xd7)]('');return _0x42eecd+'\x20'+_0x245b3e+'│'+_0x31a6e8+'│';}function calculateStats(_0x502e5a){const _0x17630c=a60_0x15a404,_0x4ce57a={'total':_0x502e5a['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x18387a of _0x502e5a){if(_0x18387a[_0x17630c(0x102)]===_0x17630c(0x24a))_0x4ce57a[_0x17630c(0x24a)]++;else{if(_0x18387a[_0x17630c(0x102)]==='error'||_0x18387a['state']===_0x17630c(0x26e))_0x4ce57a[_0x17630c(0x25d)]++;else _0x18387a[_0x17630c(0x102)]===_0x17630c(0x248)?_0x4ce57a[_0x17630c(0x248)]++:_0x4ce57a['pending']++;}}return _0x4ce57a;}function formatStats(_0x19f35d){const _0x3f8ad2=a60_0x15a404;return[_0x3f8ad2(0x15e)+_0x19f35d[_0x3f8ad2(0x12e)],'✅\x20'+_0x19f35d[_0x3f8ad2(0x24a)],'❌\x20'+_0x19f35d[_0x3f8ad2(0x25d)],_0x3f8ad2(0x22b)+_0x19f35d[_0x3f8ad2(0x248)],'⏳\x20'+_0x19f35d[_0x3f8ad2(0x178)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0x106);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x1bb);async['execute'](_0x55ffbf){const _0x5a48e7=a60_0x15a404,{options:_0x2dd0bf,args:_0x30d838,tdx:_0xbdb086}=_0x55ffbf;let _0x387b27,_0x32f796,_0x2d5203=![];if(_0x30d838[0x0]){if(_0x30d838[0x0]['includes']('.')){const _0x5dcb5e=this[_0x5a48e7(0x26b)](_0x30d838,_0x2dd0bf);if(!_0x5dcb5e)return 0x1;_0x387b27=_0x5dcb5e['projectName'],_0x32f796=_0x5dcb5e[_0x5a48e7(0x272)];}else{_0x32f796=_0x30d838[0x0],_0x387b27=_0x2dd0bf['workflowProject'];if(!_0x387b27)return console[_0x5a48e7(0x25d)](a60_0x174743[_0x5a48e7(0x156)](_0x5a48e7(0x149)),_0x5a48e7(0x285)),0x1;_0x2d5203=!![];}}else{const _0x3bc418=this[_0x5a48e7(0x26b)](_0x30d838,_0x2dd0bf);if(!_0x3bc418)return 0x1;_0x387b27=_0x3bc418[_0x5a48e7(0x20f)],_0x32f796=_0x3bc418[_0x5a48e7(0x272)];}if(_0x2dd0bf[_0x5a48e7(0x1b0)]){if(_0x387b27&&_0x32f796)console['error']('Filter:\x20'+_0x387b27+'.'+_0x32f796);else _0x387b27&&console['error'](_0x5a48e7(0x105)+_0x387b27);}const _0x5dbda0=_0x2dd0bf['attemptId'],_0x4dda50=_0x2dd0bf['sessionId'];if(_0x5dbda0){_0x4dda50&&console['error'](a60_0x174743[_0x5a48e7(0xf1)](_0x5a48e7(0x195)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x12e1cc=_0x2dd0bf[_0x5a48e7(0x1a8)];return _0x12e1cc?await this[_0x5a48e7(0x27d)](_0x55ffbf,_0x5dbda0):await this[_0x5a48e7(0x239)](_0x55ffbf,_0x5dbda0,_0x2dd0bf),0x0;}if(_0x4dda50){const _0x30b859=await withSpinner(_0x5a48e7(0x1a2),()=>_0xbdb086[_0x5a48e7(0x140)][_0x5a48e7(0x144)]({'projectName':_0x387b27,'workflowName':_0x32f796,'limit':0x64}),{'verbose':_0x2dd0bf[_0x5a48e7(0x1b0)]}),_0x4518f3=_0x30b859[_0x5a48e7(0x12d)]['find'](_0x8d5b8b=>_0x8d5b8b['id']===_0x4dda50);if(!_0x4518f3)return console[_0x5a48e7(0x25d)](a60_0x174743['red'](_0x5a48e7(0x149)),'Session\x20not\x20found:\x20'+_0x4dda50),0x1;if(!_0x4518f3[_0x5a48e7(0x16f)]?.['id'])return console[_0x5a48e7(0x25d)](a60_0x174743[_0x5a48e7(0x156)](_0x5a48e7(0x149)),_0x5a48e7(0x10f)+_0x4dda50+_0x5a48e7(0x262)),0x1;const _0x4fbb9f=_0x4518f3[_0x5a48e7(0x16f)]['id'];_0x2dd0bf[_0x5a48e7(0x1b0)]&&console[_0x5a48e7(0x25d)](_0x5a48e7(0xd9)+_0x4fbb9f+'\x20from\x20session\x20'+_0x4dda50);const _0x383a43=_0x2dd0bf['follow'];return _0x383a43?await this[_0x5a48e7(0x27d)](_0x55ffbf,_0x4fbb9f):await this[_0x5a48e7(0x239)](_0x55ffbf,_0x4fbb9f,_0x2dd0bf),0x0;}const _0x494a51=await withSpinner(_0x5a48e7(0x191),()=>_0xbdb086[_0x5a48e7(0x140)]['sessions']({'projectName':_0x387b27,'workflowName':_0x32f796,'limit':_0x2dd0bf[_0x5a48e7(0x189)]||0x32}),{'verbose':_0x2dd0bf[_0x5a48e7(0x1b0)]}),_0x600e50=_0x494a51[_0x5a48e7(0x12d)];if(_0x600e50['length']===0x0){if(_0x387b27&&_0x32f796)console[_0x5a48e7(0x25d)](_0x5a48e7(0xcf)+_0x387b27+'.'+_0x32f796);else _0x387b27?console['error'](_0x5a48e7(0xde)+_0x387b27):(console['error']('No\x20workflow\x20sessions\x20found'),console[_0x5a48e7(0x25d)](a60_0x174743['dim'](_0x5a48e7(0x284))));return 0x0;}_0x600e50['sort']((_0x36da8a,_0x3babf6)=>{const _0x557f84=_0x36da8a['sessionTime']||'',_0x23ee3e=_0x3babf6['sessionTime']||'';return _0x23ee3e['localeCompare'](_0x557f84);});if(_0x2dd0bf[_0x5a48e7(0x176)]||_0x2dd0bf['jsonl'])return await handleSDKOutput(_0x600e50,_0x2dd0bf),0x0;let _0x5b7a6e;if(_0x2d5203){const _0x4ad6d5=_0x600e50[0x0];if(!_0x4ad6d5['lastAttempt']?.['id'])return console[_0x5a48e7(0x25d)](_0x5a48e7(0x1a5)),0x0;_0x5b7a6e=_0x4ad6d5['lastAttempt']['id'],_0x2dd0bf[_0x5a48e7(0x1b0)]&&console[_0x5a48e7(0x25d)](_0x5a48e7(0x16b)+_0x4ad6d5[_0x5a48e7(0x1cf)]);}else{const _0x5cebb8=_0x600e50[_0x5a48e7(0xed)](_0x1fd473=>{const _0x50b82f=_0x5a48e7,_0x2d3076=getAttemptStatusDisplay(_0x1fd473[_0x50b82f(0x16f)]);return{'title':_0x1fd473['project']?.[_0x50b82f(0x18d)]+'.'+_0x1fd473[_0x50b82f(0x140)]?.[_0x50b82f(0x18d)]+_0x50b82f(0x28a)+_0x1fd473[_0x50b82f(0x1cf)]+'\x20'+_0x2d3076[_0x50b82f(0x1ab)],'value':_0x1fd473[_0x50b82f(0x16f)]?.['id']||'','description':_0x2d3076[_0x50b82f(0xd3)]};}),_0x4b815d=await a60_0x50c7d3({'type':_0x5a48e7(0x296),'name':_0x5a48e7(0x181),'message':_0x5a48e7(0x1b4),'choices':_0x5cebb8[_0x5a48e7(0x23a)](_0x42f699=>_0x42f699['value']!=='')});if(!_0x4b815d[_0x5a48e7(0x181)])return 0x0;_0x5b7a6e=_0x4b815d[_0x5a48e7(0x181)];}const _0xb7b93a=_0x2dd0bf[_0x5a48e7(0x1a8)];return _0xb7b93a?await this[_0x5a48e7(0x27d)](_0x55ffbf,_0x5b7a6e):await this[_0x5a48e7(0x239)](_0x55ffbf,_0x5b7a6e,_0x2dd0bf),0x0;}async[a60_0x15a404(0x239)](_0x24a55e,_0x18fdbf,_0x5b3309){const _0x51297a=a60_0x15a404,{tdx:_0x29d9e2}=_0x24a55e;let _0x3317c8,_0x50a0be;try{[_0x3317c8,_0x50a0be]=await Promise[_0x51297a(0x196)]([_0x29d9e2['workflow'][_0x51297a(0x128)](_0x18fdbf),_0x29d9e2['workflow'][_0x51297a(0xe3)](_0x18fdbf,![])]);}catch(_0x33dd26){console[_0x51297a(0x25d)](a60_0x174743[_0x51297a(0x156)](_0x51297a(0x25c)));_0x5b3309['verbose']&&console[_0x51297a(0x25d)](_0x33dd26);throw _0x33dd26;}if(_0x5b3309['json']||_0x5b3309[_0x51297a(0xeb)]){const _0x1e5b4c=this[_0x51297a(0x177)](_0x3317c8,_0x50a0be);await handleSDKOutput([_0x1e5b4c],_0x5b3309);return;}const _0x420326=_0x29d9e2[_0x51297a(0x18f)][_0x51297a(0x18e)],_0x4f298b=this[_0x51297a(0x235)](_0x3317c8,_0x50a0be,_0x420326);console[_0x51297a(0x172)](_0x4f298b);}async[a60_0x15a404(0x27d)](_0x285ff1,_0xb61fb6){const _0x14f14b=a60_0x15a404,{tdx:_0x47afa8}=_0x285ff1,_0x15b651=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0x36a4df=TIMELINE_CONFIG[_0x14f14b(0x247)];let _0x39f942=0x0;while(_0x39f942<_0x36a4df){process[_0x14f14b(0x218)][_0x14f14b(0x165)]&&process['stdout']['write']('\x1Bc');let _0xaa3f86,_0x2ebec1;try{[_0xaa3f86,_0x2ebec1]=await Promise[_0x14f14b(0x196)]([_0x47afa8[_0x14f14b(0x140)][_0x14f14b(0x128)](_0xb61fb6),_0x47afa8[_0x14f14b(0x140)]['tasks'](_0xb61fb6,![])]);}catch(_0x456234){console[_0x14f14b(0x25d)](a60_0x174743['red'](_0x14f14b(0x17d)));_0x39f942>0x0&&console[_0x14f14b(0x25d)](a60_0x174743[_0x14f14b(0x1a9)](_0x14f14b(0x15d)+_0x39f942));throw _0x456234;}const _0x3d2ce7=_0x47afa8[_0x14f14b(0x18f)][_0x14f14b(0x18e)],_0x26fff2=this[_0x14f14b(0x235)](_0xaa3f86,_0x2ebec1,_0x3d2ce7);console[_0x14f14b(0x172)](_0x26fff2);const _0xece0cc=_0xaa3f86[_0x14f14b(0x1f7)]&&_0x2ebec1[_0x14f14b(0x14f)](_0x4df2e5=>_0x4df2e5['state']!==_0x14f14b(0x248)&&_0x4df2e5[_0x14f14b(0x102)]!==_0x14f14b(0x1b5));if(_0xece0cc){console[_0x14f14b(0x25d)](a60_0x174743[_0x14f14b(0x234)](_0x14f14b(0x205)));break;}console[_0x14f14b(0x25d)](a60_0x174743[_0x14f14b(0x1a9)](_0x14f14b(0xe1)+_0x39f942*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x4c8c3d=>setTimeout(_0x4c8c3d,_0x15b651)),_0x39f942++;}_0x39f942>=_0x36a4df&&console['error'](a60_0x174743[_0x14f14b(0xf1)](_0x14f14b(0x24d)));}[a60_0x15a404(0x235)](_0x227035,_0x5ad763,_0x2b17b2){const _0x2fe00c=a60_0x15a404,_0x2eed38=[],_0x1d5476=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x5afb2e=0x5,_0x3acbe4=process[_0x2fe00c(0x218)][_0x2fe00c(0x24b)]||0x78,_0x38d42e=_0x3acbe4-_0x1d5476-_0x5afb2e,_0x55d2ec=Math[_0x2fe00c(0x130)](TIMELINE_CONFIG[_0x2fe00c(0x222)],Math[_0x2fe00c(0x19f)](_0x38d42e,TIMELINE_CONFIG[_0x2fe00c(0x20b)])),_0x1ba252=new Date(_0x227035[_0x2fe00c(0x1b1)])[_0x2fe00c(0x1de)](),_0x3b3b3d=_0x227035[_0x2fe00c(0x20d)]?new Date(_0x227035['finishedAt'])['getTime']():Date['now'](),_0x8e3b3a={'start':_0x1ba252,'end':_0x3b3b3d,'duration':_0x3b3b3d-_0x1ba252},_0x539354=new Map(),_0x2e7a76=[];for(const _0xf9b8c5 of _0x5ad763){if(_0xf9b8c5[_0x2fe00c(0x183)]){const _0x138f80=new Date(_0xf9b8c5['startedAt'])[_0x2fe00c(0x1de)](),_0x36fe44=_0xf9b8c5[_0x2fe00c(0x1e1)]?new Date(_0xf9b8c5['updatedAt'])[_0x2fe00c(0x1de)]():Date['now'](),_0x47af4f={'start':_0x138f80,'end':_0x36fe44,'duration':_0x36fe44-_0x138f80};_0x539354[_0x2fe00c(0x125)](_0xf9b8c5['id'],_0x47af4f),_0x2e7a76[_0x2fe00c(0x23d)]({'name':_0xf9b8c5[_0x2fe00c(0x25a)],'state':_0xf9b8c5['state']||_0x2fe00c(0x14a),'window':_0x47af4f});}else _0x2e7a76[_0x2fe00c(0x23d)]({'name':_0xf9b8c5['fullName'],'state':_0xf9b8c5[_0x2fe00c(0x102)]||_0x2fe00c(0x1b5),'window':undefined});}_0x2e7a76[_0x2fe00c(0x175)]((_0x16521b,_0x2bcba3)=>{const _0x3bf186=_0x2fe00c;if(!_0x16521b[_0x3bf186(0x1a1)])return 0x1;if(!_0x2bcba3[_0x3bf186(0x1a1)])return-0x1;return _0x16521b[_0x3bf186(0x1a1)][_0x3bf186(0x27c)]-_0x2bcba3['window'][_0x3bf186(0x27c)];});const _0x15df43=_0x2e7a76['length'],_0x41f019=_0x15df43>TIMELINE_CONFIG[_0x2fe00c(0x278)];_0x41f019&&_0x2e7a76[_0x2fe00c(0x162)](TIMELINE_CONFIG[_0x2fe00c(0x278)]);const _0x53abb7=calculateTimeScale(_0x8e3b3a,_0x55d2ec),_0x620395=_0x227035[_0x2fe00c(0x1f7)]?_0x227035[_0x2fe00c(0x24a)]?a60_0x174743[_0x2fe00c(0x234)]('success'):a60_0x174743[_0x2fe00c(0x156)](_0x2fe00c(0x25d)):a60_0x174743[_0x2fe00c(0x21c)](_0x2fe00c(0x248)),_0x117840=_0x227035[_0x2fe00c(0x148)]?.['id'],_0x5ab83f=_0x227035[_0x2fe00c(0x1d2)];let _0x4698d9;if(_0x117840&&_0x5ab83f){const _0x15ddb3=getWorkflowAttemptUrl(_0x2b17b2,_0x117840,_0x5ab83f,_0x227035['id']);_0x4698d9=hyperlink(a60_0x174743[_0x2fe00c(0x1a9)](_0x227035['id']),_0x15ddb3);}else _0x4698d9=a60_0x174743['dim'](_0x227035['id']);_0x2eed38[_0x2fe00c(0x23d)]('Attempt:\x20'+_0x4698d9+_0x2fe00c(0x28a)+_0x620395+'\x20-\x20'+formatElapsed(_0x8e3b3a[_0x2fe00c(0x187)]));if(_0x2e7a76[_0x2fe00c(0x1c9)]>0x0){const _0x5f0bd6=renderTimeAxis(_0x53abb7,_0x55d2ec),_0x4353be=new Date(_0x8e3b3a[_0x2fe00c(0x27c)]),_0x3bac4a=formatDate(_0x4353be),_0x4c755d=TIMELINE_CONFIG[_0x2fe00c(0x240)]+TIMELINE_CONFIG[_0x2fe00c(0x154)]+_0x1d5476,_0x3675d1=_0x3bac4a[_0x2fe00c(0x120)](_0x4c755d),_0x5c8a7b=a60_0x174743['dim'](_0x3675d1);_0x2eed38[_0x2fe00c(0x23d)](_0x5c8a7b+'\x20'+_0x5f0bd6);for(const _0x3931fe of _0x2e7a76){_0x2eed38[_0x2fe00c(0x23d)](renderTaskRow(_0x3931fe,_0x53abb7,_0x55d2ec,_0x1d5476));}const _0x47ae09=calculateStats(_0x2e7a76);_0x2eed38[_0x2fe00c(0x23d)](formatStats(_0x47ae09)),_0x41f019&&_0x2eed38['push'](a60_0x174743['yellow'](_0x2fe00c(0x103)+TIMELINE_CONFIG[_0x2fe00c(0x278)]+'\x20of\x20'+_0x15df43+_0x2fe00c(0x1a7))),_0x2eed38[_0x2fe00c(0x23d)](''),_0x2eed38[_0x2fe00c(0x23d)](a60_0x174743[_0x2fe00c(0x1a9)](_0x2fe00c(0x201))+(_0x2fe00c(0x228)+_0x227035['id']+'\x20logs')+a60_0x174743[_0x2fe00c(0x1a9)](_0x2fe00c(0x16a)));}else _0x2eed38[_0x2fe00c(0x23d)](_0x2fe00c(0xd5));return _0x2eed38[_0x2fe00c(0xd7)]('\x0a');}[a60_0x15a404(0x177)](_0x2fdf1c,_0x314511){const _0xd974ce=a60_0x15a404,_0x11957e=new Date(_0x2fdf1c['createdAt'])[_0xd974ce(0x1de)](),_0x11a2a9=_0x2fdf1c[_0xd974ce(0x20d)]?new Date(_0x2fdf1c[_0xd974ce(0x20d)])[_0xd974ce(0x1de)]():Date[_0xd974ce(0x1e9)](),_0x4ea03a=_0x11a2a9-_0x11957e,_0x3a97bc=[];for(const _0x5cfd85 of _0x314511){if(_0x5cfd85['startedAt']){const _0x1e104a=new Date(_0x5cfd85[_0xd974ce(0x183)])[_0xd974ce(0x1de)](),_0x546c1d=_0x5cfd85[_0xd974ce(0x1e1)]?new Date(_0x5cfd85[_0xd974ce(0x1e1)])[_0xd974ce(0x1de)]():Date[_0xd974ce(0x1e9)]();_0x3a97bc[_0xd974ce(0x23d)]({'name':_0x5cfd85[_0xd974ce(0x25a)],'state':_0x5cfd85[_0xd974ce(0x102)]||_0xd974ce(0x14a),'window':{'start':_0x1e104a,'end':_0x546c1d,'duration':_0x546c1d-_0x1e104a}});}else _0x3a97bc[_0xd974ce(0x23d)]({'name':_0x5cfd85[_0xd974ce(0x25a)],'state':_0x5cfd85[_0xd974ce(0x102)]||_0xd974ce(0x1b5),'window':undefined});}const _0x1068ed=calculateStats(_0x3a97bc);return{'attempt':{'id':_0x2fdf1c['id'],'status':_0x2fdf1c[_0xd974ce(0x1f7)]?_0x2fdf1c['success']?_0xd974ce(0x24a):_0xd974ce(0x25d):_0xd974ce(0x248),'createdAt':_0x2fdf1c[_0xd974ce(0x1b1)],'finishedAt':_0x2fdf1c['finishedAt'],'duration_ms':_0x4ea03a},'tasks':_0x3a97bc[_0xd974ce(0xed)](_0x9536d2=>({'name':_0x9536d2[_0xd974ce(0x18d)],'state':_0x9536d2[_0xd974ce(0x102)],'startedAt':_0x9536d2['window']?new Date(_0x9536d2['window'][_0xd974ce(0x27c)])[_0xd974ce(0x230)]():null,'updatedAt':_0x9536d2[_0xd974ce(0x1a1)]?new Date(_0x9536d2['window'][_0xd974ce(0x15c)])['toISOString']():null,'duration_ms':_0x9536d2[_0xd974ce(0x1a1)]?.[_0xd974ce(0x187)]||null})),'stats':_0x1068ed};}}function formatScheduleLine(_0x37a0ac){const _0x3fe244=a60_0x15a404,_0x16740=_0x37a0ac['disabledAt']?a60_0x174743['yellow'](_0x3fe244(0x1aa)):'',_0x5c152d=_0x37a0ac['project']?.[_0x3fe244(0x18d)]?a60_0x174743['dim']('\x20['+_0x37a0ac[_0x3fe244(0x148)][_0x3fe244(0x18d)]+']'):'',_0x5a6fa5=_0x37a0ac[_0x3fe244(0x1bc)]?a60_0x174743['dim']('\x20next:\x20'+new Date(_0x37a0ac[_0x3fe244(0x1bc)])[_0x3fe244(0xdb)]()):'';return _0x3fe244(0x138)+_0x37a0ac['id']+'\x20'+(_0x37a0ac[_0x3fe244(0x140)]?.['name']||'(unknown)')+_0x5c152d+_0x16740+_0x5a6fa5;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a60_0x15a404(0x18d)]=a60_0x15a404(0x265);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x266);async[a60_0x15a404(0x1f0)](_0x12f565){const _0x261db8=a60_0x15a404,{options:_0x40bf0c,args:_0x149810,tdx:_0x4d81a2}=_0x12f565,{scheduleId:_0x281be2}=_0x40bf0c;if(_0x281be2&&_0x149810[0x0])return console[_0x261db8(0x25d)](a60_0x174743[_0x261db8(0x156)]('Error:'),_0x261db8(0x19a)),console['error'](a60_0x174743[_0x261db8(0x1a9)]('Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>')),0x1;if(_0x281be2){const _0x2f8884=await withSpinner(_0x261db8(0x28f)+_0x281be2+_0x261db8(0x215),()=>_0x4d81a2[_0x261db8(0x140)][_0x261db8(0x129)](_0x281be2),{'verbose':_0x40bf0c[_0x261db8(0x1b0)]}),_0x2ebd55=_0x2f8884[_0x261db8(0x12d)];return isStructuredFormat(_0x40bf0c)?await handleSingleObjectOutput(_0x2ebd55,_0x40bf0c):(console[_0x261db8(0x25d)]('✔\x20Schedule\x20found'),console[_0x261db8(0x172)](formatScheduleLine(_0x2ebd55))),0x0;}const _0x57ff7e=this[_0x261db8(0x26b)](_0x149810,_0x40bf0c);if(!_0x57ff7e)return 0x1;const {projectName:_0x40717a,workflowName:_0x580b7e}=_0x57ff7e,_0x40206d=_0x40717a?'\x27'+_0x40717a+(_0x580b7e?'.'+_0x580b7e:'')+'\x27':undefined,_0x411ea3=await withSpinner(_0x40206d?_0x261db8(0x155)+_0x40206d+_0x261db8(0x215):_0x261db8(0x24e),()=>_0x40717a?_0x4d81a2[_0x261db8(0x140)]['listProjectSchedules'](_0x40717a,{'workflow':_0x580b7e,'limit':_0x40bf0c[_0x261db8(0x189)]}):_0x4d81a2[_0x261db8(0x140)]['listSchedules']({'limit':_0x40bf0c[_0x261db8(0x189)]}),{'verbose':_0x40bf0c[_0x261db8(0x1b0)]}),_0x121b99=_0x411ea3[_0x261db8(0x12d)],_0x2aedac=_0x40bf0c[_0x261db8(0x189)]&&_0x121b99[_0x261db8(0x1c9)]>=_0x40bf0c[_0x261db8(0x189)]?a60_0x174743[_0x261db8(0x1a9)]('\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)'):'';console[_0x261db8(0x25d)]('✔\x20Found\x20'+_0x121b99['length']+_0x261db8(0x220)+(_0x121b99[_0x261db8(0x1c9)]!==0x1?'s':'')+_0x2aedac);if(isStructuredFormat(_0x40bf0c))await handleSDKOutput(_0x121b99,_0x40bf0c);else{if(_0x121b99[_0x261db8(0x1c9)]===0x0)console[_0x261db8(0x172)](_0x261db8(0x17e));else for(const _0x217588 of _0x121b99){console['log'](formatScheduleLine(_0x217588));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{['name']=a60_0x15a404(0x242);[a60_0x15a404(0x1e2)]=a60_0x15a404(0x25b);async[a60_0x15a404(0x1f0)](_0x4e11d7){const _0x503bed=a60_0x15a404,{options:_0x4394d4,args:_0x514e1a,tdx:_0x50d48e}=_0x4e11d7,_0x1edc36=_0x514e1a[0x0];if(!_0x1edc36)return console['error'](a60_0x174743[_0x503bed(0x156)](_0x503bed(0x149)),_0x503bed(0x1f8)),console[_0x503bed(0x25d)](a60_0x174743[_0x503bed(0x1a9)](_0x503bed(0x294))),console[_0x503bed(0x25d)](a60_0x174743[_0x503bed(0x1a9)](_0x503bed(0x27e))),0x1;const {backfill:_0x32a7b9,nextTime:_0x77f024}=_0x4394d4,_0x35fd2d={};if(_0x32a7b9!==undefined)_0x35fd2d['skipSchedule']=!_0x32a7b9;if(_0x77f024!==undefined)_0x35fd2d[_0x503bed(0x216)]=_0x77f024;const _0x35d587=await withSpinner(_0x503bed(0x1fe)+_0x1edc36+'...',()=>_0x50d48e[_0x503bed(0x140)]['enableSchedule'](_0x1edc36,_0x35fd2d),{'verbose':_0x4394d4[_0x503bed(0x1b0)]}),_0x4dda25=_0x35d587[_0x503bed(0x12d)];return isStructuredFormat(_0x4394d4)?await handleSingleObjectOutput(_0x4dda25,_0x4394d4):(console[_0x503bed(0x172)]('✔\x20Schedule\x20#'+_0x1edc36+_0x503bed(0x1b6)+(_0x4dda25[_0x503bed(0x140)]?.[_0x503bed(0x18d)]||'unknown')+')'),_0x4dda25['nextRunTime']&&console[_0x503bed(0x172)](a60_0x174743[_0x503bed(0x1a9)]('\x20\x20Next\x20run:\x20'+new Date(_0x4dda25[_0x503bed(0x1bc)])['toLocaleString']()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']=a60_0x15a404(0x22a);['description']=a60_0x15a404(0x251);async['execute'](_0x132f86){const _0x5edbc9=a60_0x15a404,{options:_0x196921,args:_0x203f23,tdx:_0x10edb8}=_0x132f86,_0x4f1a2c=_0x203f23[0x0];if(!_0x4f1a2c)return console[_0x5edbc9(0x25d)](a60_0x174743[_0x5edbc9(0x156)](_0x5edbc9(0x149)),_0x5edbc9(0x1f8)),console['error'](a60_0x174743[_0x5edbc9(0x1a9)]('Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>')),console[_0x5edbc9(0x25d)](a60_0x174743[_0x5edbc9(0x1a9)](_0x5edbc9(0x27e))),0x1;const _0x31384a=await withSpinner(_0x5edbc9(0x221)+_0x4f1a2c+_0x5edbc9(0x215),()=>_0x10edb8[_0x5edbc9(0x140)][_0x5edbc9(0x1ef)](_0x4f1a2c),{'verbose':_0x196921[_0x5edbc9(0x1b0)]}),_0x99b35e=_0x31384a[_0x5edbc9(0x12d)];return isStructuredFormat(_0x196921)?await handleSingleObjectOutput(_0x99b35e,_0x196921):console[_0x5edbc9(0x172)](_0x5edbc9(0x28e)+_0x4f1a2c+_0x5edbc9(0x252)+(_0x99b35e['workflow']?.[_0x5edbc9(0x18d)]||'unknown')+')'),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- function a60_0x31c6(_0x1a9c72,_0x22f1bf){_0x1a9c72=_0x1a9c72-0x1af;const _0xb7de74=a60_0xb7de();let _0x31c6da=_0xb7de74[_0x1a9c72];return _0x31c6da;}(function(_0x249039,_0x3b0941){const _0x58a96b=a60_0x31c6,_0x9df1e=_0x249039();while(!![]){try{const _0x200b87=-parseInt(_0x58a96b(0x1b3))/0x1+parseInt(_0x58a96b(0x1b5))/0x2*(parseInt(_0x58a96b(0x1b8))/0x3)+-parseInt(_0x58a96b(0x1b4))/0x4*(parseInt(_0x58a96b(0x1be))/0x5)+-parseInt(_0x58a96b(0x1b1))/0x6+parseInt(_0x58a96b(0x1ba))/0x7+parseInt(_0x58a96b(0x1bc))/0x8*(parseInt(_0x58a96b(0x1b6))/0x9)+-parseInt(_0x58a96b(0x1c1))/0xa;if(_0x200b87===_0x3b0941)break;else _0x9df1e['push'](_0x9df1e['shift']());}catch(_0x5b376c){_0x9df1e['push'](_0x9df1e['shift']());}}}(a60_0xb7de,0x1a1fc));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 _0x2aaf34=a60_0x31c6,_0x25baf4=getVersion(),_0x4fad51=platform(),_0x52ffd0=process[_0x2aaf34(0x1b2)][_0x2aaf34(0x1b0)]('v','');return _0x2aaf34(0x1b9)+_0x25baf4+'\x20('+_0x4fad51+_0x2aaf34(0x1bb)+_0x52ffd0+')';}function a60_0xb7de(){const _0x4e3765=['36PsvXpZ','66elrFZx','367839NfvqUg','entries','10929wlvQNE','tdx/','763910xKeulQ',';\x20node/','24YLoNBh','length','9635hxBMmC','X-Trino-User','Authorization','743650oCFMlh','Bearer\x20','tdx','replace','891336EHipqb','version','4694XjnpBo'];a60_0xb7de=function(){return _0x4e3765;};return a60_0xb7de();}export function getAuthHeaders(_0x17b9c4,_0x4c0294,_0x471776){const _0x4d274a=a60_0x31c6,_0x2d5181=getVersion(),_0x5826ff={'User-Agent':getUserAgent(),'X-TD-Client':_0x4d274a(0x1af),'X-TD-Client-Version':_0x2d5181};if(_0x471776)_0x5826ff['Authorization']=_0x4d274a(0x1c2)+_0x471776;else _0x4c0294&&(_0x5826ff[_0x4d274a(0x1c0)]='TD1\x20'+_0x4c0294);return _0x5826ff;}export function toHeaderRecord(_0x5ceffb){const _0x154712=a60_0x31c6,_0x239b4e={};for(const [_0x837d0d,_0x476a90]of Object[_0x154712(0x1b7)](_0x5ceffb)){_0x476a90!==undefined&&(_0x239b4e[_0x837d0d]=_0x476a90);}return _0x239b4e;}export function getTrinoHeaders(_0x27bd99,_0x2104cb,_0x5d4cf8){const _0x1eb362=a60_0x31c6,_0x535678=getAuthHeaders(_0x27bd99),_0x4e828e=toHeaderRecord(_0x535678);if(_0x5d4cf8)_0x4e828e['Authorization']=_0x1eb362(0x1c2)+_0x5d4cf8;else _0x2104cb&&(_0x4e828e[_0x1eb362(0x1bf)]=_0x2104cb);return _0x4e828e;}export function hasAPIKey(_0x36adb2){const _0xaa0b18=a60_0x31c6,_0x1ff997=getAPIKey();return _0x1ff997!==undefined&&_0x1ff997[_0xaa0b18(0x1bd)]>0x0;}
1
+ (function(_0x359f68,_0x4bdccb){const _0x16691a=a61_0x1aa1,_0x1568cd=_0x359f68();while(!![]){try{const _0xbd3c9b=parseInt(_0x16691a(0xe4))/0x1*(-parseInt(_0x16691a(0xdf))/0x2)+parseInt(_0x16691a(0xe1))/0x3+-parseInt(_0x16691a(0xd8))/0x4+-parseInt(_0x16691a(0xdc))/0x5*(-parseInt(_0x16691a(0xde))/0x6)+-parseInt(_0x16691a(0xda))/0x7+-parseInt(_0x16691a(0xd3))/0x8*(-parseInt(_0x16691a(0xdb))/0x9)+parseInt(_0x16691a(0xdd))/0xa*(parseInt(_0x16691a(0xd9))/0xb);if(_0xbd3c9b===_0x4bdccb)break;else _0x1568cd['push'](_0x1568cd['shift']());}catch(_0x19ec43){_0x1568cd['push'](_0x1568cd['shift']());}}}(a61_0x173f,0x7b808));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 _0x30dfd6=a61_0x1aa1,_0x506593=getVersion(),_0x2f8840=platform(),_0x1594db=process[_0x30dfd6(0xd4)][_0x30dfd6(0xd5)]('v','');return _0x30dfd6(0xe0)+_0x506593+'\x20('+_0x2f8840+_0x30dfd6(0xe5)+_0x1594db+')';}export function getAuthHeaders(_0x527e73,_0x518b57,_0x231f87){const _0x3db605=a61_0x1aa1,_0x1e0a8d=getVersion(),_0x1a8679={'User-Agent':getUserAgent(),'X-TD-Client':_0x3db605(0xe3),'X-TD-Client-Version':_0x1e0a8d};if(_0x231f87)_0x1a8679[_0x3db605(0xe2)]='Bearer\x20'+_0x231f87;else _0x518b57&&(_0x1a8679[_0x3db605(0xe2)]=_0x3db605(0xd2)+_0x518b57);return _0x1a8679;}function a61_0x173f(){const _0x55a3b8=['replace','length','Bearer\x20','1762244dVUYns','11TZyfZC','5874638KPwlHy','7353lAyFwr','5DEGwCZ','11837090JdzWAA','193302bEwXpj','9596yhTRLC','tdx/','1680945eicxdV','Authorization','tdx','12jFjETa',';\x20node/','TD1\x20','656USLehl','version'];a61_0x173f=function(){return _0x55a3b8;};return a61_0x173f();}export function toHeaderRecord(_0x5afbc3){const _0x425525={};for(const [_0x4e07da,_0xe4a939]of Object['entries'](_0x5afbc3)){_0xe4a939!==undefined&&(_0x425525[_0x4e07da]=_0xe4a939);}return _0x425525;}export function getTrinoHeaders(_0x58821a,_0x1df33e,_0x22a1a0){const _0x5d1edf=a61_0x1aa1,_0xbcc4fa=getAuthHeaders(_0x58821a),_0x284f9c=toHeaderRecord(_0xbcc4fa);if(_0x22a1a0)_0x284f9c[_0x5d1edf(0xe2)]=_0x5d1edf(0xd7)+_0x22a1a0;else _0x1df33e&&(_0x284f9c['X-Trino-User']=_0x1df33e);return _0x284f9c;}function a61_0x1aa1(_0x521da8,_0x4d1487){_0x521da8=_0x521da8-0xd2;const _0x173f8b=a61_0x173f();let _0x1aa1e3=_0x173f8b[_0x521da8];return _0x1aa1e3;}export function hasAPIKey(_0x4ecb6a){const _0x34762c=a61_0x1aa1,_0xead009=getAPIKey();return _0xead009!==undefined&&_0xead009[_0x34762c(0xd6)]>0x0;}