@treasuredata/tdx 2026.8.4 → 2026.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/README.md +1 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli-categories.d.ts +1 -1
  5. package/dist/cli-categories.js +1 -1
  6. package/dist/cli-categories.js.map +1 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/agent-command.js +1 -1
  12. package/dist/commands/agent-test-command.js +1 -1
  13. package/dist/commands/api-command.js +1 -1
  14. package/dist/commands/auth-command.js +1 -1
  15. package/dist/commands/cas-command.js +1 -1
  16. package/dist/commands/cas-segment-command.d.ts.map +1 -1
  17. package/dist/commands/cas-segment-command.js +1 -1
  18. package/dist/commands/cas-segment-command.js.map +1 -1
  19. package/dist/commands/chat-command.js +1 -1
  20. package/dist/commands/claude-command.js +1 -1
  21. package/dist/commands/claude-statusline-command.js +1 -1
  22. package/dist/commands/claude-usage-command.js +1 -1
  23. package/dist/commands/codex-command.d.ts +51 -0
  24. package/dist/commands/codex-command.d.ts.map +1 -0
  25. package/dist/commands/codex-command.js +1 -0
  26. package/dist/commands/codex-command.js.map +1 -0
  27. package/dist/commands/command.js +1 -1
  28. package/dist/commands/connection-command.js +1 -1
  29. package/dist/commands/databases.js +1 -1
  30. package/dist/commands/delivery-command.js +1 -1
  31. package/dist/commands/describe.js +1 -1
  32. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  33. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  34. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  35. package/dist/commands/engage-campaign-pull-command.js +1 -1
  36. package/dist/commands/engage-campaign-push-command.js +1 -1
  37. package/dist/commands/engage-campaign-validate-command.js +1 -1
  38. package/dist/commands/engage-command.d.ts.map +1 -1
  39. package/dist/commands/engage-command.js +1 -1
  40. package/dist/commands/engage-command.js.map +1 -1
  41. package/dist/commands/engage-template-pull-command.js +1 -1
  42. package/dist/commands/engage-template-push-command.js +1 -1
  43. package/dist/commands/engage-template-validate-command.js +1 -1
  44. package/dist/commands/job-command.js +1 -1
  45. package/dist/commands/journey-command.js +1 -1
  46. package/dist/commands/journey-validate-command.js +1 -1
  47. package/dist/commands/llm-command.js +1 -1
  48. package/dist/commands/mcp-command.js +1 -1
  49. package/dist/commands/p13n-command.js +1 -1
  50. package/dist/commands/parent-segment-command.js +1 -1
  51. package/dist/commands/policy-command.js +1 -1
  52. package/dist/commands/profile-command.js +1 -1
  53. package/dist/commands/profiles-command.js +1 -1
  54. package/dist/commands/query-command.js +1 -1
  55. package/dist/commands/schedule-command.js +1 -1
  56. package/dist/commands/segment-command.js +1 -1
  57. package/dist/commands/segment-create-command.js +1 -1
  58. package/dist/commands/segment-fields-command.js +1 -1
  59. package/dist/commands/segment-move-command.js +1 -1
  60. package/dist/commands/segment-pull-command.js +1 -1
  61. package/dist/commands/segment-push-command.js +1 -1
  62. package/dist/commands/segment-update-command.js +1 -1
  63. package/dist/commands/segment-use-command.js +1 -1
  64. package/dist/commands/segment-validate-command.js +1 -1
  65. package/dist/commands/segments.js +1 -1
  66. package/dist/commands/show.js +1 -1
  67. package/dist/commands/status-command.js +1 -1
  68. package/dist/commands/table-deleted.js +1 -1
  69. package/dist/commands/tables.js +1 -1
  70. package/dist/commands/unset-command.js +1 -1
  71. package/dist/commands/upgrade-command.js +1 -1
  72. package/dist/commands/use-command.js +1 -1
  73. package/dist/commands/user-command.js +1 -1
  74. package/dist/commands/work-command.js +1 -1
  75. package/dist/commands/workflow-command.js +1 -1
  76. package/dist/core/auth.js +1 -1
  77. package/dist/core/command-output.js +1 -1
  78. package/dist/core/config.js +1 -1
  79. package/dist/core/connection-cache.js +1 -1
  80. package/dist/core/constants.js +1 -1
  81. package/dist/core/credential-cache.js +1 -1
  82. package/dist/core/global-context.js +1 -1
  83. package/dist/core/keychain.js +1 -1
  84. package/dist/core/oauth-keychain.js +1 -1
  85. package/dist/core/oauth.js +1 -1
  86. package/dist/core/profile.js +1 -1
  87. package/dist/core/project-config.js +1 -1
  88. package/dist/core/session.js +1 -1
  89. package/dist/core/site-mismatch.js +1 -1
  90. package/dist/core/user-cache.js +1 -1
  91. package/dist/core/version.d.ts +3 -3
  92. package/dist/core/version.d.ts.map +1 -1
  93. package/dist/core/version.js +1 -1
  94. package/dist/core/version.js.map +1 -1
  95. package/dist/index.js +1 -1
  96. package/dist/mcp/server.js +1 -1
  97. package/dist/mcp/tools/index.js +1 -1
  98. package/dist/mcp/tools/tdx-run.js +1 -1
  99. package/dist/mcp/tools/tdx-search.js +1 -1
  100. package/dist/mcp/tools/work-create-item.js +1 -1
  101. package/dist/mcp/utils.js +1 -1
  102. package/dist/proxy/claude-usage-tracker.js +1 -1
  103. package/dist/proxy/passthrough-server.js +1 -1
  104. package/dist/proxy/sse-usage-parser.js +1 -1
  105. package/dist/sdk/agent/agent-config.js +1 -1
  106. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  107. package/dist/sdk/agent/agent-yaml.js +1 -1
  108. package/dist/sdk/agent/test/evaluator.js +1 -1
  109. package/dist/sdk/agent/test/executor.js +1 -1
  110. package/dist/sdk/agent/test/index.js +1 -1
  111. package/dist/sdk/agent/test/output.js +1 -1
  112. package/dist/sdk/agent/test/parser.js +1 -1
  113. package/dist/sdk/agent/tool-target-registry.js +1 -1
  114. package/dist/sdk/api.js +1 -1
  115. package/dist/sdk/auth-token.js +1 -1
  116. package/dist/sdk/cas/cas-api-client.js +1 -1
  117. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  118. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  119. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  120. package/dist/sdk/cas/cas-segment-schema.d.ts +63 -0
  121. package/dist/sdk/cas/cas-segment-schema.d.ts.map +1 -0
  122. package/dist/sdk/cas/cas-segment-schema.js +1 -0
  123. package/dist/sdk/cas/cas-segment-schema.js.map +1 -0
  124. package/dist/sdk/cas/cas-segment-validator.d.ts +76 -0
  125. package/dist/sdk/cas/cas-segment-validator.d.ts.map +1 -0
  126. package/dist/sdk/cas/cas-segment-validator.js +1 -0
  127. package/dist/sdk/cas/cas-segment-validator.js.map +1 -0
  128. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  129. package/dist/sdk/cas/index.js +1 -1
  130. package/dist/sdk/cas/pull-workflow.js +1 -1
  131. package/dist/sdk/cas/push-workflow.js +1 -1
  132. package/dist/sdk/cas/validate-files.d.ts +23 -6
  133. package/dist/sdk/cas/validate-files.d.ts.map +1 -1
  134. package/dist/sdk/cas/validate-files.js +1 -1
  135. package/dist/sdk/cas/validate-files.js.map +1 -1
  136. package/dist/sdk/client/cdp-api-client.js +1 -1
  137. package/dist/sdk/client/delivery-api-client.js +1 -1
  138. package/dist/sdk/client/endpoints.js +1 -1
  139. package/dist/sdk/client/engage-api-client.js +1 -1
  140. package/dist/sdk/client/http-client.js +1 -1
  141. package/dist/sdk/client/llm-api-client.js +1 -1
  142. package/dist/sdk/client/oauth-refresh.js +1 -1
  143. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  144. package/dist/sdk/client/rate-limiter.js +1 -1
  145. package/dist/sdk/client/td-api-client.js +1 -1
  146. package/dist/sdk/client/trino-api-client.js +1 -1
  147. package/dist/sdk/client/workflow-client.js +1 -1
  148. package/dist/sdk/connection-validator.js +1 -1
  149. package/dist/sdk/connection.js +1 -1
  150. package/dist/sdk/delivery.js +1 -1
  151. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  152. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  153. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  154. package/dist/sdk/engage/always-on-campaign-yaml.d.ts.map +1 -1
  155. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  156. package/dist/sdk/engage/always-on-campaign-yaml.js.map +1 -1
  157. package/dist/sdk/engage/campaign-pull.js +1 -1
  158. package/dist/sdk/engage/campaign-push.js +1 -1
  159. package/dist/sdk/engage/campaign-validator.js +1 -1
  160. package/dist/sdk/engage/campaign-yaml.d.ts.map +1 -1
  161. package/dist/sdk/engage/campaign-yaml.js +1 -1
  162. package/dist/sdk/engage/campaign-yaml.js.map +1 -1
  163. package/dist/sdk/engage/template-pull.js +1 -1
  164. package/dist/sdk/engage/template-push.js +1 -1
  165. package/dist/sdk/engage/template-validator.js +1 -1
  166. package/dist/sdk/engage/template-yaml.d.ts.map +1 -1
  167. package/dist/sdk/engage/template-yaml.js +1 -1
  168. package/dist/sdk/engage/template-yaml.js.map +1 -1
  169. package/dist/sdk/engage/types/always-on-campaign-schema.d.ts +1 -0
  170. package/dist/sdk/engage/types/always-on-campaign-schema.d.ts.map +1 -1
  171. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  172. package/dist/sdk/engage/types/campaign-def.js +1 -1
  173. package/dist/sdk/engage/types/campaign-schema.d.ts +2 -0
  174. package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
  175. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  176. package/dist/sdk/engage/types/campaign-schema.js.map +1 -1
  177. package/dist/sdk/engage/types/template-schema.d.ts +1 -0
  178. package/dist/sdk/engage/types/template-schema.d.ts.map +1 -1
  179. package/dist/sdk/engage/types/template-schema.js +1 -1
  180. package/dist/sdk/engage/types/template-schema.js.map +1 -1
  181. package/dist/sdk/engage.js +1 -1
  182. package/dist/sdk/errors.js +1 -1
  183. package/dist/sdk/index.js +1 -1
  184. package/dist/sdk/io/index.js +1 -1
  185. package/dist/sdk/io/node-filesystem.js +1 -1
  186. package/dist/sdk/job.js +1 -1
  187. package/dist/sdk/journey.js +1 -1
  188. package/dist/sdk/llm/chat-cache.js +1 -1
  189. package/dist/sdk/llm/index.js +1 -1
  190. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  191. package/dist/sdk/llm/model-factors.js +1 -1
  192. package/dist/sdk/llm/user-settings.js +1 -1
  193. package/dist/sdk/p13n-studio.js +1 -1
  194. package/dist/sdk/personalization.js +1 -1
  195. package/dist/sdk/policy.js +1 -1
  196. package/dist/sdk/query/deleted-table-validation.js +1 -1
  197. package/dist/sdk/query/index.js +1 -1
  198. package/dist/sdk/query/sql-parser.js +1 -1
  199. package/dist/sdk/realtime.js +1 -1
  200. package/dist/sdk/schedule.js +1 -1
  201. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  202. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  203. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  204. package/dist/sdk/segment/fields-display.js +1 -1
  205. package/dist/sdk/segment/file-discovery.js +1 -1
  206. package/dist/sdk/segment/journey-utils.js +1 -1
  207. package/dist/sdk/segment/journey-validator.js +1 -1
  208. package/dist/sdk/segment/journey-yaml.js +1 -1
  209. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  210. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  211. package/dist/sdk/segment/pull-workflow.js +1 -1
  212. package/dist/sdk/segment/push-recovery.js +1 -1
  213. package/dist/sdk/segment/push-workflow.js +1 -1
  214. package/dist/sdk/segment/resolution-context.js +1 -1
  215. package/dist/sdk/segment/segment-path-parser.js +1 -1
  216. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  217. package/dist/sdk/segment/segment-validator.js +1 -1
  218. package/dist/sdk/segment/target-resolution.js +1 -1
  219. package/dist/sdk/segment/tdx-config.js +1 -1
  220. package/dist/sdk/segment/types/activation-schema.js +1 -1
  221. package/dist/sdk/segment/types/journey-def.js +1 -1
  222. package/dist/sdk/segment/types/journey-schema.js +1 -1
  223. package/dist/sdk/segment/types/segment-def.js +1 -1
  224. package/dist/sdk/segment/types/segment-schema.d.ts.map +1 -1
  225. package/dist/sdk/segment/types/segment-schema.js +1 -1
  226. package/dist/sdk/segment/types/segment-schema.js.map +1 -1
  227. package/dist/sdk/segment/validate-files.js +1 -1
  228. package/dist/sdk/segment/yaml-validator.d.ts +1 -1
  229. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  230. package/dist/sdk/segment/yaml-validator.js +1 -1
  231. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  232. package/dist/sdk/segment.js +1 -1
  233. package/dist/sdk/types/engage.d.ts +8 -0
  234. package/dist/sdk/types/engage.d.ts.map +1 -1
  235. package/dist/sdk/types/index.js +1 -1
  236. package/dist/sdk/types/progress.js +1 -1
  237. package/dist/sdk/types/workspace.js +1 -1
  238. package/dist/sdk/user.js +1 -1
  239. package/dist/sdk/util/format-detector.js +1 -1
  240. package/dist/sdk/util/formatters.js +1 -1
  241. package/dist/sdk/util/index.js +1 -1
  242. package/dist/sdk/util/paginate.js +1 -1
  243. package/dist/sdk/util/tree-formatter.js +1 -1
  244. package/dist/sdk/util/tree-search.js +1 -1
  245. package/dist/sdk/workflow/archive-validation.js +1 -1
  246. package/dist/sdk/workflow/clone-workflow.js +1 -1
  247. package/dist/sdk/workflow/index.js +1 -1
  248. package/dist/sdk/workflow/pull-workflow.js +1 -1
  249. package/dist/sdk/workflow/push-workflow.js +1 -1
  250. package/dist/sdk/workflow/task-graph.js +1 -1
  251. package/dist/sdk/workflow/tdx-config.js +1 -1
  252. package/dist/sdk/workflow/workflow-utils.js +1 -1
  253. package/dist/sdk/workspace/access-tracker.js +1 -1
  254. package/dist/sdk/workspace/frontmatter.js +1 -1
  255. package/dist/sdk/workspace/git.js +1 -1
  256. package/dist/sdk/workspace/index.js +1 -1
  257. package/dist/sdk/workspace/templates.js +1 -1
  258. package/dist/sdk/workspace/weekly.js +1 -1
  259. package/dist/sdk/workspace/wikilinks.js +1 -1
  260. package/dist/test-utils/command-runner.js +1 -1
  261. package/dist/test-utils/factories.js +1 -1
  262. package/dist/test-utils/fixtures.js +1 -1
  263. package/dist/test-utils/http-mock.js +1 -1
  264. package/dist/test-utils/index.js +1 -1
  265. package/dist/utils/async.js +1 -1
  266. package/dist/utils/claude-code-state.js +1 -1
  267. package/dist/utils/colors.js +1 -1
  268. package/dist/utils/diff.js +1 -1
  269. package/dist/utils/file-permissions.js +1 -1
  270. package/dist/utils/file-reader.js +1 -1
  271. package/dist/utils/github-releases.js +1 -1
  272. package/dist/utils/global-cache.js +1 -1
  273. package/dist/utils/json-loader.js +1 -1
  274. package/dist/utils/local-cache.js +1 -1
  275. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  276. package/dist/utils/logger/formatters/index.js +1 -1
  277. package/dist/utils/logger/handlers/console-handler.js +1 -1
  278. package/dist/utils/logger/handlers/file-handler.js +1 -1
  279. package/dist/utils/logger/handlers/index.js +1 -1
  280. package/dist/utils/logger/handlers/null-handler.js +1 -1
  281. package/dist/utils/logger/index.js +1 -1
  282. package/dist/utils/logger/logger.js +1 -1
  283. package/dist/utils/logger/types.js +1 -1
  284. package/dist/utils/option-validation.js +1 -1
  285. package/dist/utils/process.js +1 -1
  286. package/dist/utils/prompt.js +1 -1
  287. package/dist/utils/proxy-fetch.js +1 -1
  288. package/dist/utils/spinner.js +1 -1
  289. package/dist/utils/sse-parser.js +1 -1
  290. package/dist/utils/string-utils.js +1 -1
  291. package/dist/utils/table-ref-parser.js +1 -1
  292. package/dist/utils/tdx-logger.js +1 -1
  293. package/dist/utils/version-check.js +1 -1
  294. package/package.json +2 -47
@@ -1 +1 @@
1
- const a60_0x536582=a60_0x40f9;(function(_0x3ed240,_0x2ca038){const _0x1ab0c8=a60_0x40f9,_0x32c5bd=_0x3ed240();while(!![]){try{const _0x14734f=parseInt(_0x1ab0c8(0x2da))/0x1*(parseInt(_0x1ab0c8(0x33e))/0x2)+parseInt(_0x1ab0c8(0x307))/0x3*(parseInt(_0x1ab0c8(0x1c4))/0x4)+parseInt(_0x1ab0c8(0x2c5))/0x5+parseInt(_0x1ab0c8(0x2ed))/0x6*(-parseInt(_0x1ab0c8(0x241))/0x7)+parseInt(_0x1ab0c8(0x297))/0x8+parseInt(_0x1ab0c8(0x33d))/0x9+-parseInt(_0x1ab0c8(0x1f3))/0xa;if(_0x14734f===_0x2ca038)break;else _0x32c5bd['push'](_0x32c5bd['shift']());}catch(_0xed11b0){_0x32c5bd['push'](_0x32c5bd['shift']());}}}(a60_0x1bb7,0x82c72));import a60_0x529429 from'chalk';import{existsSync}from'fs';import a60_0x7d277e 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_0x4e49d0 from'prompts';function getAttemptStatusDisplay(_0x338568){const _0x5aa63e=a60_0x40f9;if(!_0x338568)return{'icon':'⏳','text':''};const {done:_0x5c5d1c,success:_0x555e23,cancelRequested:_0xe71dc1}=_0x338568;if(!_0x5c5d1c)return _0xe71dc1?{'icon':'🛑','text':a60_0x529429[_0x5aa63e(0x2dc)](_0x5aa63e(0x1b4))}:{'icon':'🔄','text':a60_0x529429[_0x5aa63e(0x31e)](_0x5aa63e(0x1db))};if(_0x555e23)return{'icon':'✅','text':a60_0x529429[_0x5aa63e(0x1c1)](_0x5aa63e(0x219))};return{'icon':'❌','text':a60_0x529429['red']('error')};}export class WorkflowBaseCommand extends BaseCommand{[a60_0x536582(0x243)](_0x478018,_0x2ed64a,_0x2e1211=0x0){const _0x47bcd1=a60_0x536582;return _0x478018[_0x2e1211]||_0x2ed64a[_0x47bcd1(0x22e)];}[a60_0x536582(0x235)](_0x5376f0,_0x4e9514,_0xa4107=0x0){const _0x441ca4=a60_0x536582,_0x526e5f=this[_0x441ca4(0x243)](_0x5376f0,_0x4e9514,_0xa4107);if(!_0x526e5f)return console['error'](a60_0x529429[_0x441ca4(0x30f)](_0x441ca4(0x1f7)),_0x441ca4(0x304)),console[_0x441ca4(0x2f0)](a60_0x529429[_0x441ca4(0x1d7)](_0x441ca4(0x29b))),null;return _0x526e5f;}['parseProjectWorkflowPattern'](_0x3baf0a,_0x2f1e50){const _0x10c7c7=a60_0x536582;if(_0x3baf0a[0x0]){const _0x14b88f=_0x3baf0a[0x0][_0x10c7c7(0x21e)]('.');if(_0x14b88f[_0x10c7c7(0x330)]===0x1)return{'projectName':_0x14b88f[0x0],'workflowName':undefined};else return _0x14b88f[_0x10c7c7(0x330)]===0x2?{'projectName':_0x14b88f[0x0],'workflowName':_0x14b88f[0x1]}:(console['error'](a60_0x529429[_0x10c7c7(0x30f)](_0x10c7c7(0x1f7)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x2f1e50[_0x10c7c7(0x22e)],'workflowName':undefined};}[a60_0x536582(0x1d0)](_0x563604,_0x274521,_0x55c0fe=0x0){const _0x588568=a60_0x536582;if(_0x563604[_0x55c0fe])return _0x563604[_0x55c0fe];if(_0x274521[_0x588568(0x22e)]){const _0x371122=a60_0x7d277e[_0x588568(0x1c7)](process[_0x588568(0x19c)](),_0x588568(0x223),_0x274521[_0x588568(0x22e)]);if(existsSync(a60_0x7d277e[_0x588568(0x1c7)](_0x371122,'tdx.json')))return _0x371122;}return undefined;}async[a60_0x536582(0x317)](_0x2a6283,_0x2b8bd0,_0x59045e){const _0x15fa14=a60_0x536582;try{const _0x5ed136=await _0x2a6283[_0x15fa14(0x27b)][_0x15fa14(0x223)](_0x2b8bd0,{'limit':0x1});if(_0x5ed136['length']>0x0){const _0x8bb711=_0x5ed136[0x0]['id'],_0x585e12=getWorkflowUrl(_0x59045e,_0x8bb711);console[_0x15fa14(0x2f0)]('\x20\x20Console:\x20'+a60_0x529429[_0x15fa14(0x2ae)](_0x585e12));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x284);[a60_0x536582(0x28b)]='Set\x20default\x20workflow\x20project\x20for\x20this\x20session';async['execute'](_0x300bd6){const _0x521dd4=a60_0x536582,{options:_0x1fcfe6,args:_0x200c73,tdx:_0x17412b}=_0x300bd6,_0x4a73b4=_0x200c73[0x0],_0x135306=_0x1fcfe6[_0x521dd4(0x1d4)];if(_0x135306)return saveSessionContext({'workflow_project':undefined},_0x1fcfe6[_0x521dd4(0x1e7)]),console['log'](a60_0x529429[_0x521dd4(0x1c1)](_0x521dd4(0x247))),0x0;if(!_0x4a73b4)return console[_0x521dd4(0x2f0)](a60_0x529429['red'](_0x521dd4(0x1f7)),'Project\x20name\x20is\x20required'),console[_0x521dd4(0x2f0)](a60_0x529429[_0x521dd4(0x1d7)](_0x521dd4(0x2ac))),console[_0x521dd4(0x2f0)](a60_0x529429['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x22fbb7=await withSpinner(_0x521dd4(0x2d1)+_0x4a73b4+'\x27...',()=>_0x17412b[_0x521dd4(0x27b)][_0x521dd4(0x252)](_0x4a73b4),{'verbose':_0x1fcfe6['verbose']}),{name:_0x4244dd}=_0x22fbb7[_0x521dd4(0x285)];return saveSessionContext({'workflow_project':_0x4244dd},_0x1fcfe6[_0x521dd4(0x1e7)]),console['log'](a60_0x529429['green'](_0x521dd4(0x23f)+a60_0x529429[_0x521dd4(0x2ae)](_0x4244dd))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x2e9);[a60_0x536582(0x28b)]=a60_0x536582(0x19d);async[a60_0x536582(0x34d)](_0x29a867){const _0xf7b304=a60_0x536582,{options:_0x133bc2,args:_0x3c868f,tdx:_0x518dff}=_0x29a867,_0x532710=_0x3c868f[0x0];_0x133bc2[_0xf7b304(0x319)]&&_0x532710&&console['error'](_0xf7b304(0x279)+_0x532710);const _0x13dc1b=await withSpinner(_0xf7b304(0x2bf),()=>_0x518dff[_0xf7b304(0x27b)][_0xf7b304(0x1f5)](_0x532710,{'limit':_0x133bc2[_0xf7b304(0x199)]}),{'verbose':_0x133bc2[_0xf7b304(0x319)]});let _0x48dd9f=_0x13dc1b[_0xf7b304(0x285)];_0x48dd9f['sort']((_0x367f94,_0x4ed269)=>_0x367f94[_0xf7b304(0x1b1)]['localeCompare'](_0x4ed269[_0xf7b304(0x1b1)]));const _0x31414b=_0x133bc2[_0xf7b304(0x199)]&&_0x48dd9f['length']>=_0x133bc2[_0xf7b304(0x199)]?a60_0x529429[_0xf7b304(0x1d7)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0xf7b304(0x2f0)](_0xf7b304(0x2a6)+_0x48dd9f['length']+_0xf7b304(0x1ed)+(_0x48dd9f[_0xf7b304(0x330)]!==0x1?'s':'')+_0x31414b);if(_0x133bc2['format']===_0xf7b304(0x22d)||_0x133bc2[_0xf7b304(0x186)]===_0xf7b304(0x195)||_0x133bc2['format']===_0xf7b304(0x316))await handleSDKOutput(_0x48dd9f,_0x133bc2);else{if(_0x48dd9f[_0xf7b304(0x330)]===0x0)_0x532710?console['log']('No\x20projects\x20match\x20pattern:\x20'+_0x532710):console[_0xf7b304(0x2d7)](_0xf7b304(0x320));else{const _0x4d6a07=_0x48dd9f[_0xf7b304(0x338)](_0x45e608=>{const _0x9bc93f=_0xf7b304,_0x2058ad=_0x45e608['metadata']?.[_0x9bc93f(0x1b2)](_0x5df9d0=>_0x5df9d0[_0x9bc93f(0x242)]==='sys'),_0x5ea65a=_0x2058ad?a60_0x529429[_0x9bc93f(0x1d7)](_0x9bc93f(0x1ec)):'';return _0x9bc93f(0x26c)+_0x45e608['name']+_0x5ea65a;});await writeOutput(_0x4d6a07['join']('\x0a'),_0x133bc2[_0xf7b304(0x214)],_0xf7b304(0x1d8));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a60_0x536582(0x1b1)]='workflow:workflows';['description']=a60_0x536582(0x1f1);async[a60_0x536582(0x34d)](_0x1810e4){const _0x437825=a60_0x536582,{options:_0x5b9640,args:_0xa3b309,tdx:_0x2b7a7b}=_0x1810e4,_0x58a6a5=this[_0x437825(0x243)](_0xa3b309,_0x5b9640);_0x5b9640[_0x437825(0x319)]&&_0x58a6a5&&console['error'](_0x437825(0x348)+_0x58a6a5);const _0x2f7d56=await withSpinner('Listing\x20workflows...',()=>_0x2b7a7b['workflow'][_0x437825(0x223)](_0x58a6a5,{'limit':_0x5b9640[_0x437825(0x199)]}),{'verbose':_0x5b9640[_0x437825(0x319)]});let _0x4bb3e8=_0x2f7d56[_0x437825(0x285)];_0x4bb3e8['sort']((_0x4854cc,_0x3f684c)=>{const _0x378611=_0x437825,_0x5ee771=_0x4854cc[_0x378611(0x1b1)][_0x378611(0x2a5)](_0x3f684c[_0x378611(0x1b1)]);if(_0x5ee771!==0x0)return _0x5ee771;return(_0x4854cc['project']?.[_0x378611(0x1b1)]||'')[_0x378611(0x2a5)](_0x3f684c[_0x378611(0x32f)]?.[_0x378611(0x1b1)]||'');});const _0x3d368a=_0x5b9640['limit']&&_0x4bb3e8[_0x437825(0x330)]>=_0x5b9640[_0x437825(0x199)]?a60_0x529429['dim'](_0x437825(0x22a)):'';console['error'](_0x437825(0x2a6)+_0x4bb3e8[_0x437825(0x330)]+_0x437825(0x2c9)+(_0x4bb3e8[_0x437825(0x330)]!==0x1?'s':'')+_0x3d368a);if(_0x5b9640['format']===_0x437825(0x22d)||_0x5b9640[_0x437825(0x186)]===_0x437825(0x195)||_0x5b9640[_0x437825(0x186)]===_0x437825(0x316))await handleSDKOutput(_0x4bb3e8,_0x5b9640);else{if(_0x4bb3e8['length']===0x0)_0x58a6a5?console[_0x437825(0x2d7)](_0x437825(0x2c3)+_0x58a6a5):console[_0x437825(0x2d7)](_0x437825(0x327));else{const _0x1ce4e8=_0x5b9640['site'],_0x244f84=_0x4bb3e8[_0x437825(0x338)](_0x41d7c8=>{const _0x53075c=_0x437825,_0x46bcaa=a60_0x529429[_0x53075c(0x1d7)]('#'+_0x41d7c8['id']),_0x2699da=hyperlink(_0x46bcaa,getWorkflowUrl(_0x1ce4e8,_0x41d7c8['id'])),_0x9785c7=_0x41d7c8[_0x53075c(0x32f)]?.['name']?a60_0x529429[_0x53075c(0x1d7)]('\x20('+_0x41d7c8['project'][_0x53075c(0x1b1)]+')'):'';return _0x53075c(0x29f)+_0x2699da+'\x20'+_0x41d7c8['name']+_0x9785c7;});await writeOutput(_0x244f84[_0x437825(0x1c7)]('\x0a'),_0x5b9640[_0x437825(0x214)],_0x437825(0x1d8));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x293);[a60_0x536582(0x28b)]=a60_0x536582(0x1ce);async[a60_0x536582(0x34d)](_0x5acb8e){const _0x1b914f=a60_0x536582,{options:_0x152282,args:_0x2699d9,tdx:_0x1e56e4}=_0x5acb8e,_0x5cece8=this['parseProjectWorkflowPattern'](_0x2699d9,_0x152282);if(!_0x5cece8)return 0x1;const {projectName:_0x32c834,workflowName:_0x502545}=_0x5cece8;if(_0x152282['verbose']){if(_0x32c834&&_0x502545)console['error'](_0x1b914f(0x24c)+_0x32c834+'.'+_0x502545);else _0x32c834&&console[_0x1b914f(0x2f0)]('Filter:\x20project='+_0x32c834);const _0x31adb6=_0x152282[_0x1b914f(0x305)];_0x31adb6&&console['error']('Status:\x20'+_0x31adb6);}let _0x11bcb5=0x28;if(process['stdout']['isTTY']&&!_0x152282[_0x1b914f(0x214)]&&!_0x152282['format']){const _0x443a02=process[_0x1b914f(0x229)][_0x1b914f(0x30b)]||0x28;_0x11bcb5=Math['max'](0x14,Math[_0x1b914f(0x2ea)](_0x443a02*0x2/0x3));}const _0x54b519=_0x152282[_0x1b914f(0x199)]||_0x11bcb5,_0x1cc49f=await withSpinner(_0x1b914f(0x1c6),()=>_0x1e56e4[_0x1b914f(0x27b)][_0x1b914f(0x27a)]({'projectName':_0x32c834,'workflowName':_0x502545,'status':_0x152282['status'],'fromTime':_0x152282[_0x1b914f(0x2b8)],'toTime':_0x152282['to'],'limit':_0x54b519}),{'verbose':_0x152282['verbose']}),_0x5d4af1=_0x1cc49f[_0x1b914f(0x285)];_0x5d4af1[_0x1b914f(0x259)]((_0xab0720,_0x8dfccb)=>{const _0x3229af=_0x1b914f,_0x146873=_0xab0720['sessionTime']||'',_0x4ef08f=_0x8dfccb[_0x3229af(0x298)]||'';return _0x4ef08f['localeCompare'](_0x146873);});_0x5d4af1[_0x1b914f(0x330)]>=_0x54b519?console[_0x1b914f(0x2f0)]('✔\x20Showing\x20'+_0x5d4af1[_0x1b914f(0x330)]+_0x1b914f(0x1b6)+a60_0x529429[_0x1b914f(0x1d7)]('(use\x20--limit\x20to\x20see\x20more)')):console['error'](_0x1b914f(0x2a6)+_0x5d4af1[_0x1b914f(0x330)]+'\x20session'+(_0x5d4af1[_0x1b914f(0x330)]!==0x1?'s':''));if(_0x152282[_0x1b914f(0x186)]===_0x1b914f(0x22d)||_0x152282[_0x1b914f(0x186)]===_0x1b914f(0x195)||_0x152282[_0x1b914f(0x186)]===_0x1b914f(0x316))await handleSDKOutput(_0x5d4af1,_0x152282);else{if(!process[_0x1b914f(0x229)][_0x1b914f(0x335)]||_0x152282[_0x1b914f(0x214)]){if(_0x5d4af1[_0x1b914f(0x330)]===0x0){if(_0x32c834&&_0x502545)console[_0x1b914f(0x2d7)]('No\x20sessions\x20found\x20for:\x20'+_0x32c834+'.'+_0x502545);else _0x32c834?console['log'](_0x1b914f(0x20a)+_0x32c834):console[_0x1b914f(0x2d7)](_0x1b914f(0x1f0));}else{const _0x53a43a=_0x152282[_0x1b914f(0x1ba)],_0x3cde74=this['renderSessionsTimeline'](_0x5d4af1,_0x53a43a);_0x152282[_0x1b914f(0x214)]?await writeOutput(_0x3cde74,_0x152282[_0x1b914f(0x214)],'list'):console[_0x1b914f(0x2d7)](_0x3cde74);}!_0x32c834&&(console['error'](''),console[_0x1b914f(0x2f0)](a60_0x529429[_0x1b914f(0x1d7)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x1b914f(0x2f0)](a60_0x529429[_0x1b914f(0x1d7)](_0x1b914f(0x21a))+'or'+a60_0x529429[_0x1b914f(0x1d7)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x5d4af1[_0x1b914f(0x330)]===0x0){if(_0x32c834&&_0x502545)console[_0x1b914f(0x2d7)](_0x1b914f(0x192)+_0x32c834+'.'+_0x502545);else _0x32c834?console[_0x1b914f(0x2d7)](_0x1b914f(0x20a)+_0x32c834):console[_0x1b914f(0x2d7)]('No\x20sessions\x20found');}else await this[_0x1b914f(0x2db)](_0x5d4af1,_0x5acb8e,_0x32c834);}}return 0x0;}[a60_0x536582(0x2f4)](_0x5442e8,_0x2aa7e4){const _0x4d5627=a60_0x536582,_0xb871dd=[],_0x2d27f9=new Map();let _0x1249c0=Infinity,_0x13acd3=-Infinity;for(const _0x49fef8 of _0x5442e8){if(_0x49fef8[_0x4d5627(0x2b5)]?.[_0x4d5627(0x1bc)]){const _0x2a5a8f=new Date(_0x49fef8[_0x4d5627(0x2b5)][_0x4d5627(0x1bc)])[_0x4d5627(0x236)](),_0x470c34=_0x49fef8[_0x4d5627(0x2b5)][_0x4d5627(0x2f1)]?new Date(_0x49fef8[_0x4d5627(0x2b5)][_0x4d5627(0x2f1)])[_0x4d5627(0x236)]():Date['now'](),_0x2de10e=_0x49fef8['project']?.['name']||_0x4d5627(0x2bd);!_0x2d27f9[_0x4d5627(0x31f)](_0x2de10e)&&_0x2d27f9['set'](_0x2de10e,[]),_0x2d27f9[_0x4d5627(0x2af)](_0x2de10e)[_0x4d5627(0x18f)]({'session':_0x49fef8,'startTime':_0x2a5a8f,'endTime':_0x470c34,'duration':_0x470c34-_0x2a5a8f}),_0x1249c0=Math['min'](_0x1249c0,_0x2a5a8f),_0x13acd3=Math[_0x4d5627(0x2a8)](_0x13acd3,_0x470c34);}}if(_0x2d27f9[_0x4d5627(0x2bb)]===0x0)return _0x4d5627(0x216);const _0x4b577e=process[_0x4d5627(0x229)][_0x4d5627(0x224)]||0x78,_0x2d9055=0x1e,_0x8f30ab=0x32,_0x5f3536=0x4,_0x4ed299=Math[_0x4d5627(0x2d2)](_0x8f30ab,Math['max'](_0x2d9055,Math['floor'](_0x4b577e*0.3))),_0x3dda5f=_0x4b577e-_0x4ed299-TIMELINE_CONFIG[_0x4d5627(0x300)]-0x3-_0x5f3536,_0x39e762=_0x13acd3-_0x1249c0,_0x39142e=_0x39e762/_0x4ed299,_0x1a36c1=renderTimeAxis({'startTime':_0x1249c0,'endTime':_0x13acd3,'durationMs':_0x39e762,'msPerChar':_0x39142e},_0x4ed299),_0xdc33b5=[];for(const _0x383246 of _0x2d27f9['values']()){_0xdc33b5['push'](..._0x383246);}_0xdc33b5[_0x4d5627(0x259)]((_0x2f0e20,_0x198acb)=>_0x198acb[_0x4d5627(0x202)]-_0x2f0e20['startTime']);const _0x35da47=new Date(_0x1249c0),_0x653424=formatDate(_0x35da47),_0x2a2a61=_0x5f3536+TIMELINE_CONFIG[_0x4d5627(0x28c)]+TIMELINE_CONFIG[_0x4d5627(0x1b9)]+_0x3dda5f,_0x548f0e='\x20'[_0x4d5627(0x1ff)](_0x2a2a61-_0x653424[_0x4d5627(0x330)]),_0x89aed9=_0x548f0e+a60_0x529429[_0x4d5627(0x1d7)](_0x653424)+'\x20'+_0x1a36c1;_0xb871dd[_0x4d5627(0x18f)](_0x89aed9);const _0x360ce5=0x16;let _0x354427=0x0;for(const _0x507041 of _0xdc33b5){const _0x42cd6c=_0x507041['session'][_0x4d5627(0x32f)]?.[_0x4d5627(0x1b1)]||'?',_0x18f7ec=Math[_0x4d5627(0x2d2)](stringWidth(_0x42cd6c),_0x360ce5);_0x354427=Math['max'](_0x354427,_0x18f7ec);}for(const _0x2bfa59 of _0xdc33b5){const {session:_0x1c59f2,startTime:_0x1381bc,endTime:_0x3429cd,duration:_0x209c8a}=_0x2bfa59,_0x74775a=_0x1c59f2['project']?.['id'],_0xadc7a=_0x1c59f2['id'],_0x5d4614=_0x1c59f2[_0x4d5627(0x32f)]?.[_0x4d5627(0x1b1)]||'?',_0x5541cb=_0x1c59f2['workflow']?.[_0x4d5627(0x1b1)]||'?';let _0x29c73f,_0x195d3a;if(_0x1c59f2[_0x4d5627(0x2b5)]){const _0x215f62=_0x1c59f2[_0x4d5627(0x2b5)];!_0x215f62['done']?(_0x29c73f=_0x215f62[_0x4d5627(0x1e4)]?'🛑':'🔄',_0x195d3a=_0x215f62[_0x4d5627(0x1e4)]?a60_0x529429[_0x4d5627(0x2dc)]:a60_0x529429['blue']):(_0x29c73f=_0x215f62[_0x4d5627(0x219)]?'✅':'❌',_0x195d3a=_0x215f62[_0x4d5627(0x219)]?a60_0x529429[_0x4d5627(0x1c1)]:a60_0x529429['red']);}else _0x29c73f='⏳',_0x195d3a=a60_0x529429[_0x4d5627(0x1d7)];const _0x2d0f2c='#'+_0xadc7a,_0x10d133=_0x74775a?hyperlink(_0x2d0f2c,getWorkflowSessionUrl(_0x2aa7e4,_0x74775a,_0xadc7a)):_0x2d0f2c;let _0x2550d8=_0x5d4614;stringWidth(_0x5d4614)>_0x360ce5&&(_0x2550d8=_0x5d4614[_0x4d5627(0x28a)](0x0,_0x360ce5-0x1)+'…');const _0x24d50b=a60_0x529429['dim'](_0x2550d8),_0x26de85=stringWidth(_0x2550d8),_0x5dfbe5='\x20'[_0x4d5627(0x1ff)](_0x354427-stringWidth(_0x2550d8)+0x2),_0x4df8f0='('+formatElapsed(_0x209c8a)+')',_0x4b67a6=stringWidth(_0x4df8f0),_0x132c16=stringWidth(_0x2d0f2c),_0x38f418=_0x132c16+0x1+_0x26de85+_0x5dfbe5[_0x4d5627(0x330)],_0x33cc30=_0x3dda5f-_0x38f418-_0x4b67a6-0x1-0x8;let _0x4671c6=_0x5541cb;stringWidth(_0x4671c6)>_0x33cc30&&(_0x4671c6=_0x4671c6[_0x4d5627(0x28a)](0x0,_0x33cc30-0x1)+'…');const _0x5a9088=_0x10d133+'\x20'+_0x24d50b+_0x5dfbe5+_0x4671c6,_0x3500b8=stringWidth(_0x5a9088),_0x4a4668=_0x3dda5f-_0x3500b8-_0x4b67a6,_0xa84004=_0x5a9088+'\x20'[_0x4d5627(0x1ff)](Math[_0x4d5627(0x2a8)](0x1,_0x4a4668))+a60_0x529429[_0x4d5627(0x1d7)](_0x4df8f0),_0x505906=Math[_0x4d5627(0x2ea)]((_0x1381bc-_0x1249c0)/_0x39142e),_0x579041=Math[_0x4d5627(0x2ea)]((_0x3429cd-_0x1249c0)/_0x39142e),_0x323996=Math[_0x4d5627(0x2a8)](_0x505906+0x1,_0x579041),_0x298919=new Array(_0x4ed299)[_0x4d5627(0x1ef)]('\x20');for(let _0x27bf6b=_0x505906;_0x27bf6b<Math['min'](_0x323996,_0x4ed299);_0x27bf6b++){_0x298919[_0x27bf6b]='─';}const _0x1fd464=_0x298919[_0x4d5627(0x338)](_0x409b31=>_0x409b31==='\x20'?'\x20':_0x195d3a(_0x409b31))[_0x4d5627(0x1c7)]('');_0xb871dd[_0x4d5627(0x18f)](_0x29c73f+'\x20'+_0xa84004+'│'+_0x1fd464+'│');}return _0xb871dd[_0x4d5627(0x1c7)]('\x0a');}async['navigateSessionsInteractive'](_0x2b400d,_0x34d8ba,_0x38eb6c){const _0x3b93d4=a60_0x536582,{options:_0x1f99c5,tdx:_0x26fd46}=_0x34d8ba,_0x3f26ba=_0x1f99c5['site'],{timelineRows:_0x730def,timeAxisHeader:_0x156fc4}=this[_0x3b93d4(0x1f9)](_0x2b400d,_0x3f26ba),_0x205066=_0x730def[_0x3b93d4(0x23a)](_0x266783=>_0x266783[_0x3b93d4(0x24f)]);if(_0x205066[_0x3b93d4(0x330)]===0x0){const _0x16c2ea=this[_0x3b93d4(0x2f4)](_0x2b400d,_0x3f26ba);console[_0x3b93d4(0x2d7)](_0x16c2ea);!_0x38eb6c&&(console[_0x3b93d4(0x2f0)](''),console['error'](a60_0x529429['dim'](_0x3b93d4(0x294))),console['error'](a60_0x529429[_0x3b93d4(0x1d7)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a60_0x529429[_0x3b93d4(0x1d7)](_0x3b93d4(0x191))));return;}_0x156fc4&&console[_0x3b93d4(0x2d7)](_0x156fc4);const _0x43d591=_0x730def[_0x3b93d4(0x23a)](_0x50dfc1=>_0x50dfc1[_0x3b93d4(0x24f)])[_0x3b93d4(0x338)](_0x479456=>({'title':_0x479456[_0x3b93d4(0x25b)],'value':_0x479456[_0x3b93d4(0x24f)]})),_0x55b5f8=process['stdout'][_0x3b93d4(0x30b)]||0x3c,_0x2b575e=Math[_0x3b93d4(0x2a8)](0x28,Math[_0x3b93d4(0x2ea)](_0x55b5f8*0x2/0x3)),_0x51d7ff=await a60_0x4e49d0({'type':_0x3b93d4(0x19e),'name':_0x3b93d4(0x24f),'message':_0x3b93d4(0x33c),'choices':_0x43d591,'initial':-0x1,'limit':_0x2b575e,'clearFirst':!![],'fallback':{'title':_0x3b93d4(0x315),'value':null},'suggest':(_0x8b017a,_0x1eb917)=>{const _0x428912=_0x3b93d4;if(!_0x8b017a)return Promise[_0x428912(0x1d9)](_0x1eb917);const _0x2ff67b=_0x1eb917[_0x428912(0x23a)](_0x22d27b=>{const _0x51a054=_0x428912,_0x29f36d=_0x22d27b;return _0x29f36d[_0x51a054(0x296)][_0x51a054(0x26f)]()[_0x51a054(0x1a3)](_0x8b017a[_0x51a054(0x26f)]());});return Promise[_0x428912(0x1d9)](_0x2ff67b);}}),_0x1c34f8=()=>{const _0x37b39f=_0x3b93d4;process['stdout'][_0x37b39f(0x2a0)]('\x1b[1A\x1b[2K'),process[_0x37b39f(0x229)]['write'](_0x37b39f(0x2a3)),process[_0x37b39f(0x229)][_0x37b39f(0x2a0)](_0x37b39f(0x2a3));},_0x2e4a74=_0x51d7ff&&_0x51d7ff[_0x3b93d4(0x24f)]&&_0x51d7ff['attemptId']!==null&&_0x51d7ff[_0x3b93d4(0x24f)]['trim']()!=='';if(!_0x2e4a74){_0x1c34f8(),console['log'](a60_0x529429[_0x3b93d4(0x1d7)](_0x3b93d4(0x274)));return;}_0x1c34f8();const _0x489a0a=_0x2b400d[_0x3b93d4(0x323)](_0x419dd5=>_0x419dd5[_0x3b93d4(0x2b5)]?.['id']===_0x51d7ff[_0x3b93d4(0x24f)]);if(_0x489a0a){const _0x128130=_0x489a0a[_0x3b93d4(0x32f)]?.[_0x3b93d4(0x1b1)]||'?',_0x3c9b62=_0x489a0a[_0x3b93d4(0x27b)]?.['name']||'?';console[_0x3b93d4(0x2d7)](_0x3b93d4(0x30a)+a60_0x529429[_0x3b93d4(0x1d7)](_0x128130)+_0x3b93d4(0x260)+a60_0x529429[_0x3b93d4(0x1d7)](_0x3c9b62));}const _0x3896f3=new WorkflowTimelineCommand();await _0x3896f3['execute']({'args':[],'options':{..._0x1f99c5,'attemptId':_0x51d7ff[_0x3b93d4(0x24f)]},'tdx':_0x26fd46});}['generateSessionTimelineRows'](_0x41af83,_0x22b224){const _0x111a01=a60_0x536582,_0x33094b=new Map();for(const _0x1c9c0f of _0x41af83){_0x1c9c0f['id']&&_0x1c9c0f['lastAttempt']?.['id']&&_0x33094b[_0x111a01(0x203)](_0x1c9c0f['id'],_0x1c9c0f['lastAttempt']['id']);}const _0x90919b=[];let _0x1efe3c='';const _0x5f45cf=this[_0x111a01(0x2f4)](_0x41af83,_0x22b224),_0x5d30d4=_0x5f45cf[_0x111a01(0x21e)]('\x0a');for(const _0x402334 of _0x5d30d4){if(_0x402334[_0x111a01(0x271)](_0x111a01(0x27e))||_0x402334[_0x111a01(0x1cc)](/^\s+\d{4}-\d{2}-\d{2}/))_0x1efe3c=_0x402334;else{if(_0x402334['match'](/^[✅❌🔄🛑⏳]/)){const _0x565efa=_0x402334[_0x111a01(0x1cc)](/#(\d+)/),_0x279c94=_0x565efa?_0x565efa[0x1]:null,_0x466481=_0x279c94?_0x33094b[_0x111a01(0x2af)](_0x279c94)||null:null,_0x5c0d11=_0x41af83[_0x111a01(0x323)](_0x4c018e=>_0x4c018e['id']===_0x279c94),_0x58126b=_0x5c0d11?.['project']?.[_0x111a01(0x1b1)]||'';_0x90919b['push']({'displayLine':_0x402334,'attemptId':_0x466481,'projectName':_0x58126b});}}}return{'timelineRows':_0x90919b,'timeAxisHeader':_0x1efe3c};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x1e9);[a60_0x536582(0x28b)]=a60_0x536582(0x21f);async[a60_0x536582(0x34d)](_0xa63084){const _0x3b11ba=a60_0x536582,{options:_0x5561e7,args:_0x5e5822,tdx:_0x1580d9}=_0xa63084,_0x2bdefa=this[_0x3b11ba(0x2d4)](_0x5e5822,_0x5561e7);if(!_0x2bdefa)return 0x1;const {projectName:_0x3632a4,workflowName:_0x9fe4b9}=_0x2bdefa,_0x279a85=_0x5561e7[_0x3b11ba(0x206)];if(_0x5561e7[_0x3b11ba(0x319)]){if(_0x3632a4&&_0x9fe4b9)console[_0x3b11ba(0x2f0)](_0x3b11ba(0x24c)+_0x3632a4+'.'+_0x9fe4b9);else _0x3632a4&&console[_0x3b11ba(0x2f0)](_0x3b11ba(0x267)+_0x3632a4);_0x279a85&&console[_0x3b11ba(0x2f0)](_0x3b11ba(0x18d));}const _0x59dea6=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x1580d9[_0x3b11ba(0x27b)]['attempts']({'projectName':_0x3632a4,'workflowName':_0x9fe4b9,'includeRetried':_0x279a85,'limit':_0x5561e7[_0x3b11ba(0x199)]}),{'verbose':_0x5561e7['verbose']}),_0x38f329=_0x59dea6['data'],_0x3e965a=_0x5561e7[_0x3b11ba(0x199)]||0x64,_0x4d533e=_0x38f329['length']>=_0x3e965a?a60_0x529429[_0x3b11ba(0x1d7)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x3b11ba(0x2f0)](_0x3b11ba(0x2a6)+_0x38f329['length']+_0x3b11ba(0x246)+(_0x38f329[_0x3b11ba(0x330)]!==0x1?'s':'')+_0x4d533e);if(_0x5561e7[_0x3b11ba(0x186)]===_0x3b11ba(0x22d)||_0x5561e7[_0x3b11ba(0x186)]===_0x3b11ba(0x195)||_0x5561e7[_0x3b11ba(0x186)]==='table')await handleSDKOutput(_0x38f329,_0x5561e7);else{if(_0x38f329['length']===0x0){if(_0x3632a4&&_0x9fe4b9)console[_0x3b11ba(0x2d7)](_0x3b11ba(0x1d6)+_0x3632a4+'.'+_0x9fe4b9);else _0x3632a4?console[_0x3b11ba(0x2d7)](_0x3b11ba(0x255)+_0x3632a4):console['log']('No\x20attempts\x20found');}else{const _0x18d426=_0x5561e7['site'],_0x28cab4=_0x38f329['map'](_0x2861fe=>{const _0xffbbef=_0x3b11ba,_0x3d3172=a60_0x529429[_0xffbbef(0x1d7)]('#'+_0x2861fe['id']),_0x509867=_0x2861fe[_0xffbbef(0x32f)]?.['id'],_0x1cd0a5=_0x2861fe['session_id']||_0x2861fe[_0xffbbef(0x26e)],_0x1e4192=_0x509867&&_0x1cd0a5?hyperlink(_0x3d3172,getWorkflowAttemptUrl(_0x18d426,_0x509867,_0x1cd0a5,_0x2861fe['id'])):_0x3d3172,{icon:_0x35452a,text:_0x52122c}=getAttemptStatusDisplay(_0x2861fe),_0x46b1fa=(_0x2861fe[_0xffbbef(0x32f)]?.['name']||'?')+'.'+(_0x2861fe[_0xffbbef(0x27b)]?.[_0xffbbef(0x1b1)]||'?'),_0x115dc1=_0x2861fe[_0xffbbef(0x298)]?a60_0x529429[_0xffbbef(0x1d7)](_0x2861fe[_0xffbbef(0x298)]):'';return(_0x1e4192+'\x20'+_0x35452a+(_0x52122c?'\x20'+_0x52122c:'')+'\x20'+_0x46b1fa+'\x20'+_0x115dc1)[_0xffbbef(0x20f)]();});await writeOutput(_0x28cab4[_0x3b11ba(0x1c7)]('\x0a'),_0x5561e7[_0x3b11ba(0x214)],_0x3b11ba(0x1d8));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a60_0x536582(0x1b1)]='workflow:attempt';['description']='Show\x20specific\x20attempt\x20details';async[a60_0x536582(0x34d)](_0x4af394){const _0x25bb87=a60_0x536582,{options:_0x330f22,args:_0x30edc0,tdx:_0x335039}=_0x4af394,_0xc02220=_0x30edc0[0x0];if(!_0xc02220)return console[_0x25bb87(0x2f0)](_0x25bb87(0x2ef)),0x1;_0x330f22[_0x25bb87(0x319)]&&console[_0x25bb87(0x2f0)](_0x25bb87(0x32a)+_0xc02220);const _0x13ff39=await withSpinner(_0x25bb87(0x2e1),()=>_0x335039[_0x25bb87(0x27b)][_0x25bb87(0x34e)](_0xc02220),{'verbose':_0x330f22['verbose']}),_0x325928=_0x13ff39[_0x25bb87(0x285)];let _0x43afe3;!_0x325928[_0x25bb87(0x1d2)]?_0x43afe3=_0x325928[_0x25bb87(0x1e4)]?_0x25bb87(0x1b4):'running':_0x43afe3=_0x325928['success']?_0x25bb87(0x219):'error';let _0xee63d0;if(_0x325928[_0x25bb87(0x1bc)]&&_0x325928['finishedAt']){const _0x5669c1=new Date(_0x325928[_0x25bb87(0x1bc)])[_0x25bb87(0x236)](),_0x32d7c6=new Date(_0x325928[_0x25bb87(0x2f1)])['getTime']();_0xee63d0=Math['round']((_0x32d7c6-_0x5669c1)/0x3e8);}const _0x22fef3={'attempt_id':_0x325928['id'],'status':_0x43afe3,..._0x325928['index']!==undefined&&{'index':_0x325928[_0x25bb87(0x2fc)]},..._0x325928['project']&&{'project':_0x325928['project'][_0x25bb87(0x1b1)]},..._0x325928[_0x25bb87(0x27b)]&&{'workflow':_0x325928[_0x25bb87(0x27b)][_0x25bb87(0x1b1)]},..._0x325928[_0x25bb87(0x26e)]&&{'session_id':_0x325928['sessionId']},..._0x325928['sessionTime']&&{'session_time':_0x325928[_0x25bb87(0x298)]},..._0x325928['retryAttemptName']&&{'retry_attempt':_0x325928[_0x25bb87(0x287)]},..._0xee63d0!==undefined&&{'duration_sec':_0xee63d0},..._0x325928[_0x25bb87(0x1bc)]&&{'created_at':_0x325928['createdAt']},..._0x325928[_0x25bb87(0x2f1)]&&{'finished_at':_0x325928[_0x25bb87(0x2f1)]},...Object[_0x25bb87(0x2e6)](_0x325928[_0x25bb87(0x2c0)])[_0x25bb87(0x330)]>0x0&&{'params':_0x325928['params']}};return await handleSingleObjectOutput(_0x22fef3,_0x330f22),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x295);[a60_0x536582(0x28b)]='Show\x20tasks\x20for\x20an\x20attempt';async['execute'](_0x25c3fa){const _0x52abcd=a60_0x536582,{options:_0x520830,args:_0x54d330,tdx:_0x2c2c96}=_0x25c3fa,_0x4093f8=_0x54d330[0x0];if(!_0x4093f8)return console[_0x52abcd(0x2f0)](_0x52abcd(0x2ef)),0x1;const _0xb30e1=_0x520830[_0x52abcd(0x2ff)];_0x520830[_0x52abcd(0x319)]&&(console[_0x52abcd(0x2f0)](_0x52abcd(0x32a)+_0x4093f8),_0xb30e1&&console[_0x52abcd(0x2f0)](_0x52abcd(0x2b4)));const _0x348089=await withSpinner(_0x52abcd(0x1ca),()=>_0x2c2c96[_0x52abcd(0x27b)]['tasks'](_0x4093f8,_0xb30e1||![]),{'verbose':_0x520830[_0x52abcd(0x319)]}),_0x46a69d=_0x348089[_0x52abcd(0x285)];return console[_0x52abcd(0x2f0)](_0x52abcd(0x2a6)+_0x46a69d[_0x52abcd(0x330)]+'\x20task'+(_0x46a69d[_0x52abcd(0x330)]!==0x1?'s':'')),await handleSDKOutput(_0x46a69d,_0x520830),0x0;}}export class WorkflowLogsCommand extends BaseCommand{['name']=a60_0x536582(0x249);['description']=a60_0x536582(0x1fc);async[a60_0x536582(0x34d)](_0x5927e2){const _0x54a469=a60_0x536582,{options:_0x3f294c,args:_0x11218a,tdx:_0x4ddedc}=_0x5927e2,_0xb078a4=_0x11218a[0x0];let _0x405ea0=_0x11218a[0x1];if(!_0xb078a4)return console[_0x54a469(0x2f0)](_0x54a469(0x2ef)),0x1;_0x3f294c[_0x54a469(0x319)]&&(console[_0x54a469(0x2f0)](_0x54a469(0x32a)+_0xb078a4),_0x405ea0&&console[_0x54a469(0x2f0)](_0x54a469(0x25a)+_0x405ea0));const _0x23fa79=await withSpinner(_0x54a469(0x32e),()=>_0x4ddedc['workflow'][_0x54a469(0x34c)](_0xb078a4,_0x405ea0),{'verbose':_0x3f294c[_0x54a469(0x319)]}),_0x540534=_0x23fa79[_0x54a469(0x285)];if(_0x540534[_0x54a469(0x330)]===0x0)return console[_0x54a469(0x2f0)](_0x54a469(0x2e7)),0x0;if(!_0x405ea0&&(_0x3f294c[_0x54a469(0x22d)]||_0x3f294c[_0x54a469(0x186)]))return await handleSDKOutput(_0x540534,_0x3f294c),0x0;if(!_0x405ea0){const _0x59919b=_0x540534['map'](_0x3db82e=>({'title':_0x3db82e[_0x54a469(0x25e)]+'\x20('+formatBytes(_0x3db82e[_0x54a469(0x2cc)])+')','value':_0x3db82e[_0x54a469(0x25e)]})),_0x54f589=await a60_0x4e49d0({'type':_0x54a469(0x1b0),'name':_0x54a469(0x31d),'message':_0x54a469(0x1bb),'choices':_0x59919b});if(!_0x54f589['task'])return console['error'](_0x54a469(0x274)),0x0;_0x405ea0=_0x54f589['task'];}const _0x38d438=await withSpinner(_0x54a469(0x344),()=>_0x4ddedc[_0x54a469(0x27b)][_0x54a469(0x2b9)](_0xb078a4,_0x405ea0),{'verbose':_0x3f294c[_0x54a469(0x319)]}),_0xcfb4d3=_0x38d438[_0x54a469(0x285)];return _0xcfb4d3?console[_0x54a469(0x2d7)](_0xcfb4d3):console[_0x54a469(0x2f0)](_0x54a469(0x32b)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']='workflow:kill';[a60_0x536582(0x28b)]=a60_0x536582(0x28e);async[a60_0x536582(0x34d)](_0x2b0c53){const _0x67563d=a60_0x536582,{options:_0x59dcdf,args:_0xfd2daa,tdx:_0xb8619}=_0x2b0c53,_0x36e840=_0xfd2daa[0x0];if(!_0x36e840)return console[_0x67563d(0x2f0)](_0x67563d(0x2ef)),0x1;const _0x498a98=_0x59dcdf[_0x67563d(0x349)];_0x59dcdf[_0x67563d(0x319)]&&(console[_0x67563d(0x2f0)]('Attempt\x20ID:\x20'+_0x36e840),_0x498a98&&console['error'](_0x67563d(0x28d)+_0x498a98));if(!_0x59dcdf[_0x67563d(0x254)]){if(!isInteractive())return console['error'](a60_0x529429[_0x67563d(0x30f)]('\x0aError:'),_0x67563d(0x339)),console[_0x67563d(0x2f0)](a60_0x529429['dim'](_0x67563d(0x238))),0x1;const _0x54cf1f=await confirmKey(_0x67563d(0x1dc)+_0x36e840+'?');if(!_0x54cf1f)return console[_0x67563d(0x2f0)](a60_0x529429[_0x67563d(0x2dc)]('Cancelled')),0x1;}const _0x57ec96=await withSpinner(_0x67563d(0x334),()=>_0xb8619[_0x67563d(0x27b)][_0x67563d(0x2fd)](_0x36e840,_0x498a98),{'verbose':_0x59dcdf['verbose']}),_0xc68fa8=_0x57ec96[_0x67563d(0x285)];return console[_0x67563d(0x2f0)]('✔\x20'+_0xc68fa8),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x2fe);[a60_0x536582(0x28b)]='Retry\x20a\x20session\x20or\x20attempt';async['execute'](_0x1f3cec){const _0x193645=a60_0x536582,{options:_0x21316e,args:_0x4b1cd7,tdx:_0x3cb090}=_0x1f3cec,_0x597d9c=_0x4b1cd7[0x0];if(!_0x597d9c)return console[_0x193645(0x2f0)](_0x193645(0x19f)),console[_0x193645(0x2f0)](_0x193645(0x220)),0x1;let _0x1a44fb=![],_0x3baa54=_0x597d9c;if(_0x597d9c[_0x193645(0x271)](_0x193645(0x1ab)))_0x1a44fb=!![],_0x3baa54=_0x597d9c[_0x193645(0x22c)](0x8);else{if(_0x597d9c[_0x193645(0x271)]('attempt:'))_0x1a44fb=![],_0x3baa54=_0x597d9c[_0x193645(0x22c)](0x8);else return console['error'](_0x193645(0x183)),console[_0x193645(0x2f0)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x27a5c4=_0x21316e[_0x193645(0x29a)],_0x5bb0fe=_0x21316e[_0x193645(0x1b7)],_0x22ae11=_0x21316e['params'],_0xefe867=_0x21316e[_0x193645(0x207)];_0x21316e[_0x193645(0x319)]&&(console[_0x193645(0x2f0)]('Target:\x20'+(_0x1a44fb?_0x193645(0x1e7):_0x193645(0x34e))+'\x20'+_0x3baa54),_0x27a5c4&&console[_0x193645(0x2f0)](_0x193645(0x27f)+_0x27a5c4),_0x5bb0fe&&console[_0x193645(0x2f0)](_0x193645(0x210)+_0x5bb0fe),_0x22ae11&&console[_0x193645(0x2f0)](_0x193645(0x33f)+_0x22ae11),_0xefe867&&console[_0x193645(0x2f0)](_0x193645(0x26d)));let _0x26c83d;if(_0x22ae11)try{if(_0x22ae11[_0x193645(0x271)]('@')){const _0xd33884=await import(_0x193645(0x1e8)),_0x2b0a2d=_0x22ae11[_0x193645(0x22c)](0x1),_0x5de2df=await _0xd33884[_0x193645(0x329)](_0x2b0a2d,_0x193645(0x221));_0x26c83d=JSON[_0x193645(0x196)](_0x5de2df);}else _0x26c83d=JSON[_0x193645(0x196)](_0x22ae11);}catch{return console['error'](_0x193645(0x1da)),0x1;}if(!_0x21316e[_0x193645(0x254)]){if(!isInteractive())return console[_0x193645(0x2f0)](a60_0x529429[_0x193645(0x30f)](_0x193645(0x2b7)),_0x193645(0x339)),console[_0x193645(0x2f0)](a60_0x529429['dim'](_0x193645(0x238))),0x1;const _0x4b3b06=await confirmKey(_0x193645(0x2df)+(_0x1a44fb?_0x193645(0x1e7):'attempt')+'\x20'+_0x3baa54+'?');if(!_0x4b3b06)return console[_0x193645(0x2f0)](a60_0x529429[_0x193645(0x2dc)](_0x193645(0x274))),0x1;}let _0x991831;_0x1a44fb?_0x991831=await withSpinner(_0x193645(0x306),()=>_0x3cb090[_0x193645(0x27b)]['retrySession'](_0x3baa54,{'fromTask':_0x27a5c4,'retryParams':_0x26c83d}),{'verbose':_0x21316e[_0x193645(0x319)]}):_0x991831=await withSpinner(_0x193645(0x25c),()=>_0x3cb090[_0x193645(0x27b)][_0x193645(0x225)](_0x3baa54,{'resumeFrom':_0x5bb0fe,'retryParams':_0x26c83d,'force':_0xefe867}),{'verbose':_0x21316e['verbose']});const _0xacfcd2=_0x991831[_0x193645(0x285)];return console['error'](_0x193645(0x20c)),console[_0x193645(0x2f0)](_0x193645(0x288)+_0xacfcd2[_0x193645(0x24f)]),console['error'](_0x193645(0x182)+_0xacfcd2['sessionId']),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a60_0x536582(0x1b1)]='workflow:run';['description']=a60_0x536582(0x2b6);async['execute'](_0x3b93d7){const _0x1d6f9e=a60_0x536582,{options:_0x2ff13a,args:_0x4e4507,tdx:_0x67e642}=_0x3b93d7;let _0x316d6b=_0x4e4507[0x0];if(!_0x316d6b){const _0x569f4e=this[_0x1d6f9e(0x243)]([],_0x2ff13a),_0x2f4a27=await withSpinner(_0x1d6f9e(0x266),()=>_0x67e642[_0x1d6f9e(0x27b)][_0x1d6f9e(0x223)](_0x569f4e,{'limit':_0x2ff13a[_0x1d6f9e(0x199)]}),{'verbose':_0x2ff13a[_0x1d6f9e(0x319)]}),_0x17b647=_0x2f4a27[_0x1d6f9e(0x285)];if(_0x17b647[_0x1d6f9e(0x330)]===0x0)return console[_0x1d6f9e(0x2f0)](_0x1d6f9e(0x327)),!_0x569f4e&&console['error'](a60_0x529429[_0x1d6f9e(0x1d7)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x2c23a9=_0x17b647[_0x1d6f9e(0x338)](_0x228286=>({'title':_0x228286[_0x1d6f9e(0x32f)]?.[_0x1d6f9e(0x1b1)]+'.'+_0x228286[_0x1d6f9e(0x1b1)],'value':_0x228286[_0x1d6f9e(0x32f)]?.[_0x1d6f9e(0x1b1)]+'.'+_0x228286[_0x1d6f9e(0x1b1)],'description':_0x228286[_0x1d6f9e(0x231)]?_0x1d6f9e(0x1a6)+_0x228286[_0x1d6f9e(0x231)]:undefined})),_0x22cc32=await a60_0x4e49d0({'type':'select','name':_0x1d6f9e(0x27b),'message':_0x1d6f9e(0x1ae),'choices':_0x2c23a9});if(!_0x22cc32[_0x1d6f9e(0x27b)])return 0x1;_0x316d6b=_0x22cc32[_0x1d6f9e(0x27b)];}if(!_0x316d6b['includes']('.')){const _0x4ad851=this[_0x1d6f9e(0x243)]([],_0x2ff13a);if(_0x4ad851)_0x316d6b=_0x4ad851+'.'+_0x316d6b;else return console[_0x1d6f9e(0x2f0)](a60_0x529429['red'](_0x1d6f9e(0x1f7)),_0x1d6f9e(0x1fa)),console[_0x1d6f9e(0x2f0)](a60_0x529429[_0x1d6f9e(0x1d7)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x35f617=_0x2ff13a[_0x1d6f9e(0x2fa)],_0x540def=_0x2ff13a[_0x1d6f9e(0x298)],_0x4e44e0={};if(_0x35f617&&Array[_0x1d6f9e(0x326)](_0x35f617))for(const _0x251b9b of _0x35f617){const _0x3fe4c3=_0x251b9b[_0x1d6f9e(0x2a2)]('=');if(_0x3fe4c3===-0x1)return console[_0x1d6f9e(0x2f0)](_0x1d6f9e(0x1bd)+_0x251b9b),console[_0x1d6f9e(0x2f0)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x44b4e1=_0x251b9b[_0x1d6f9e(0x22c)](0x0,_0x3fe4c3),_0x4ba52e=_0x251b9b[_0x1d6f9e(0x22c)](_0x3fe4c3+0x1);try{_0x4e44e0[_0x44b4e1]=JSON[_0x1d6f9e(0x196)](_0x4ba52e);}catch{_0x4e44e0[_0x44b4e1]=_0x4ba52e;}}_0x2ff13a[_0x1d6f9e(0x319)]&&(console['error']('Workflow:\x20'+_0x316d6b),Object[_0x1d6f9e(0x2e6)](_0x4e44e0)[_0x1d6f9e(0x330)]>0x0&&console[_0x1d6f9e(0x2f0)](_0x1d6f9e(0x2c4)+JSON[_0x1d6f9e(0x1e5)](_0x4e44e0)),_0x540def&&console[_0x1d6f9e(0x2f0)](_0x1d6f9e(0x2ce)+_0x540def));if(_0x2ff13a[_0x1d6f9e(0x2d9)])return await this['executeDryRun'](_0x3b93d7,_0x316d6b,_0x4e44e0,_0x540def);const _0x875576=await withSpinner('Starting\x20workflow\x20run...',()=>_0x67e642[_0x1d6f9e(0x27b)][_0x1d6f9e(0x1fd)](_0x316d6b,_0x4e44e0,{'sessionTime':_0x540def}),{'verbose':_0x2ff13a['verbose']}),_0x2a6505=_0x875576['data'];console[_0x1d6f9e(0x2f0)](_0x1d6f9e(0x302)),console[_0x1d6f9e(0x2f0)]('\x20\x20Attempt\x20ID:\x20'+_0x2a6505['id']),console[_0x1d6f9e(0x2f0)]('\x20\x20Session\x20ID:\x20'+_0x2a6505[_0x1d6f9e(0x26e)]),console[_0x1d6f9e(0x2f0)](_0x1d6f9e(0x1fb)+_0x2a6505['project']?.[_0x1d6f9e(0x1b1)]),console[_0x1d6f9e(0x2f0)]('\x20\x20Workflow:\x20'+_0x2a6505[_0x1d6f9e(0x27b)]?.[_0x1d6f9e(0x1b1)]);if(_0x2a6505[_0x1d6f9e(0x32f)]?.['id']&&_0x2a6505[_0x1d6f9e(0x26e)]&&_0x2a6505['id']){const _0x3d656b=_0x2ff13a[_0x1d6f9e(0x1ba)],_0x2963e7=getConsoleUrl(_0x3d656b,_0x1d6f9e(0x257)+_0x2a6505['project']['id']+_0x1d6f9e(0x2b1)+_0x2a6505['sessionId']+_0x1d6f9e(0x26b)+_0x2a6505['id']);console[_0x1d6f9e(0x2f0)](_0x1d6f9e(0x1af)+a60_0x529429[_0x1d6f9e(0x2ae)](_0x2963e7));}return 0x0;}async[a60_0x536582(0x272)](_0x1d618d,_0x1b235b,_0x345f5c,_0x4a8bd2){const _0x2322d5=a60_0x536582,{options:_0x161754,tdx:_0x4edbab}=_0x1d618d,_0x4f8b8e=await withSpinner(_0x2322d5(0x1c0)+_0x1b235b+_0x2322d5(0x2eb),()=>_0x4edbab[_0x2322d5(0x27b)]['getWorkflow'](_0x1b235b),{'verbose':_0x161754['verbose']}),_0x3669eb=_0x4f8b8e[_0x2322d5(0x285)],_0x2cd28a=_0x4a8bd2??new Date()[_0x2322d5(0x1d1)]();console[_0x2322d5(0x2d7)](a60_0x529429['bold'](_0x2322d5(0x23e)),_0x1b235b),console[_0x2322d5(0x2d7)](a60_0x529429[_0x2322d5(0x1cd)](_0x2322d5(0x347)),_0x2cd28a),console[_0x2322d5(0x2d7)](a60_0x529429[_0x2322d5(0x1cd)](_0x2322d5(0x281)),JSON[_0x2322d5(0x1e5)](_0x345f5c)),console[_0x2322d5(0x2d7)](''),console[_0x2322d5(0x2d7)](a60_0x529429[_0x2322d5(0x1cd)](_0x2322d5(0x2d5)));const _0x113137=parseTaskGraph(_0x3669eb['config']??null);if(_0x113137['length']===0x0)console[_0x2322d5(0x2d7)](a60_0x529429[_0x2322d5(0x1d7)](_0x2322d5(0x215)));else for(const _0x65f269 of formatTaskGraph(_0x113137)){console[_0x2322d5(0x2d7)](_0x65f269);}const _0x588cec=summarizeTaskGraph(_0x113137),_0x43386f=formatWarningSummary(_0x588cec);return _0x43386f&&(console['log'](''),console[_0x2322d5(0x2d7)](a60_0x529429[_0x2322d5(0x2dc)](_0x43386f))),console[_0x2322d5(0x2d7)](a60_0x529429[_0x2322d5(0x2dc)](_0x2322d5(0x2b3))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x2e8);[a60_0x536582(0x28b)]=a60_0x536582(0x29e);async[a60_0x536582(0x34d)](_0x51e09b){const _0x4efe8c=a60_0x536582,{options:_0x522bb6,args:_0x5a2d36,tdx:_0x210707}=_0x51e09b,_0x4cb437=_0x5a2d36[0x0],_0x2bd96e=_0x5a2d36[0x1]||'.';if(!_0x4cb437)return console['error'](_0x4efe8c(0x262)),console[_0x4efe8c(0x2f0)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x1bb89e=_0x522bb6[_0x4efe8c(0x231)];_0x522bb6['verbose']&&(console[_0x4efe8c(0x2f0)]('Project:\x20'+_0x4cb437),console[_0x4efe8c(0x2f0)](_0x4efe8c(0x2f2)+_0x2bd96e),_0x1bb89e&&console[_0x4efe8c(0x2f0)](_0x4efe8c(0x248)+_0x1bb89e));const _0x461119=await withSpinner(_0x4efe8c(0x314)+_0x4cb437+'...',()=>_0x210707[_0x4efe8c(0x27b)][_0x4efe8c(0x2e5)](_0x4cb437,_0x2bd96e,{'revision':_0x1bb89e}),{'verbose':_0x522bb6['verbose']}),_0x38ccc3=_0x461119['data'];return console['error'](_0x4efe8c(0x2b0)+_0x38ccc3[_0x4efe8c(0x194)]),console[_0x4efe8c(0x2f0)]('\x20\x20Revision:\x20'+_0x38ccc3[_0x4efe8c(0x231)]),console[_0x4efe8c(0x2f0)](_0x4efe8c(0x2a7)+_0x38ccc3[_0x4efe8c(0x2c6)]),console[_0x4efe8c(0x2f0)](_0x4efe8c(0x333)+_0x2bd96e+'/'+_0x38ccc3['projectName']),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x1a1);[a60_0x536582(0x28b)]='Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)';async['execute'](_0x19434d){const _0x2a3339=a60_0x536582,{options:_0x18bb88,args:_0x5635bb,tdx:_0x67a9c4}=_0x19434d;let _0x4908dd='.',_0x414e78=_0x18bb88[_0x2a3339(0x1b1)];if(_0x5635bb[0x0]){const {promises:_0x40a676}=await import('fs');try{const _0x207583=await _0x40a676[_0x2a3339(0x244)](_0x5635bb[0x0]);if(_0x207583[_0x2a3339(0x2d0)]())_0x4908dd=_0x5635bb[0x0];else return console[_0x2a3339(0x2f0)](_0x2a3339(0x2ee)+_0x5635bb[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x414e78=_0x5635bb[0x0],_0x4908dd='.';}}const _0x3f1db1=_0x18bb88[_0x2a3339(0x231)],_0x3b2c66=_0x18bb88[_0x2a3339(0x1a7)];_0x18bb88[_0x2a3339(0x319)]&&(console[_0x2a3339(0x2f0)](_0x2a3339(0x234)+_0x4908dd),_0x414e78&&console[_0x2a3339(0x2f0)](_0x2a3339(0x282)+_0x414e78),_0x3f1db1&&console['error'](_0x2a3339(0x248)+_0x3f1db1),_0x3b2c66&&console[_0x2a3339(0x2f0)](_0x2a3339(0x1b8)));const _0x418863=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x67a9c4[_0x2a3339(0x27b)][_0x2a3339(0x18f)](_0x4908dd,{'projectName':_0x414e78,'revision':_0x3f1db1,'skipValidation':_0x3b2c66}),{'verbose':_0x18bb88[_0x2a3339(0x319)]}),_0x4204e6=_0x418863[_0x2a3339(0x285)];return console[_0x2a3339(0x2f0)](_0x2a3339(0x2cf)+_0x4204e6['projectName']),console[_0x2a3339(0x2f0)](_0x2a3339(0x19a)+_0x4204e6[_0x2a3339(0x23b)]),console[_0x2a3339(0x2f0)](_0x2a3339(0x264)+_0x4204e6['revision']),await this['showWorkflowConsoleUrl'](_0x67a9c4,_0x4204e6[_0x2a3339(0x194)],_0x18bb88[_0x2a3339(0x1ba)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x211);[a60_0x536582(0x28b)]=a60_0x536582(0x30c);async['execute'](_0x4bf678){const _0x2e707c=a60_0x536582,{options:_0x540b84,args:_0x39b1a4,tdx:_0x5a57ad}=_0x4bf678,_0x53d275=_0x39b1a4[0x0],_0x5686dc=_0x39b1a4[0x1];if(!_0x53d275)return console['error'](a60_0x529429['red'](_0x2e707c(0x1f7)),_0x2e707c(0x304)),console[_0x2e707c(0x2f0)](a60_0x529429[_0x2e707c(0x1d7)](_0x2e707c(0x2e0))),0x1;const _0x502e76=_0x540b84[_0x2e707c(0x231)];_0x540b84[_0x2e707c(0x319)]&&(console[_0x2e707c(0x2f0)](_0x2e707c(0x30a)+_0x53d275),_0x5686dc&&console[_0x2e707c(0x2f0)](_0x2e707c(0x2dd)+_0x5686dc),_0x502e76&&console[_0x2e707c(0x2f0)](_0x2e707c(0x248)+_0x502e76),_0x540b84['dryRun']&&console[_0x2e707c(0x2f0)](_0x2e707c(0x233)));const _0x1a9808=await withSpinner('Pulling\x20project\x20'+_0x53d275+'...',()=>_0x5a57ad[_0x2e707c(0x27b)][_0x2e707c(0x292)](_0x53d275,{'targetDir':_0x5686dc,'revision':_0x502e76}),{'verbose':_0x540b84['verbose']}),_0x1df73c=_0x1a9808[_0x2e707c(0x285)];_0x1df73c[_0x2e707c(0x1b5)]?console[_0x2e707c(0x2f0)]('→\x20New\x20project:\x20'+_0x1df73c[_0x2e707c(0x194)]):console['error'](_0x2e707c(0x31c)+_0x1df73c[_0x2e707c(0x194)]);console[_0x2e707c(0x2f0)]('\x20\x20Revision:\x20'+_0x1df73c[_0x2e707c(0x231)]),console[_0x2e707c(0x2f0)]('\x20\x20Target:\x20'+(a60_0x7d277e[_0x2e707c(0x1e0)](process[_0x2e707c(0x19c)](),_0x1df73c[_0x2e707c(0x303)])||'.')),console[_0x2e707c(0x2f0)](_0x2e707c(0x309)+a60_0x529429[_0x2e707c(0x1c1)]('+'+_0x1df73c['summary'][_0x2e707c(0x258)]+_0x2e707c(0x2cd))+',\x20'+(a60_0x529429[_0x2e707c(0x2dc)]('~'+_0x1df73c[_0x2e707c(0x240)]['modified']+_0x2e707c(0x245))+',\x20')+(a60_0x529429[_0x2e707c(0x30f)]('-'+_0x1df73c[_0x2e707c(0x240)][_0x2e707c(0x340)]+_0x2e707c(0x2b2))+',\x20')+(''+a60_0x529429[_0x2e707c(0x1d7)](_0x1df73c['summary'][_0x2e707c(0x34a)]+_0x2e707c(0x1bf))));for(const _0x15704b of _0x1df73c[_0x2e707c(0x232)]){_0x15704b[_0x2e707c(0x24d)]===_0x2e707c(0x2f9)&&_0x15704b['diff']&&(console[_0x2e707c(0x2f0)]('\x0a'+a60_0x529429[_0x2e707c(0x2ae)](_0x2e707c(0x29d)+_0x15704b['path'])),console[_0x2e707c(0x2f0)](_0x15704b[_0x2e707c(0x1f4)]));}if(!_0x1df73c[_0x2e707c(0x251)])return saveSessionContext({'workflow_project':_0x1df73c[_0x2e707c(0x194)]},_0x540b84[_0x2e707c(0x1e7)]),console[_0x2e707c(0x2f0)](a60_0x529429[_0x2e707c(0x1c1)](_0x2e707c(0x18c))),console[_0x2e707c(0x2f0)](a60_0x529429[_0x2e707c(0x1d7)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1df73c[_0x2e707c(0x194)])),0x0;if(_0x540b84[_0x2e707c(0x2d9)])return console[_0x2e707c(0x2f0)](a60_0x529429[_0x2e707c(0x2dc)](_0x2e707c(0x1fe))),0x0;if(!_0x540b84[_0x2e707c(0x254)]){if(!isInteractive())return console[_0x2e707c(0x2f0)](a60_0x529429[_0x2e707c(0x30f)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x2e707c(0x2f0)](a60_0x529429['dim'](_0x2e707c(0x238))),0x1;const _0x25d266=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x25d266)return console['error'](a60_0x529429['yellow'](_0x2e707c(0x274)),'-\x20no\x20files\x20written'),0x1;}await withSpinner('Writing\x20files...',()=>_0x5a57ad[_0x2e707c(0x27b)]['applyPullProject'](_0x1df73c,{'revision':_0x502e76}),{'verbose':_0x540b84[_0x2e707c(0x319)]}),saveSessionContext({'workflow_project':_0x1df73c[_0x2e707c(0x194)]},_0x540b84[_0x2e707c(0x1e7)]),console[_0x2e707c(0x2f0)](a60_0x529429[_0x2e707c(0x1c1)](_0x2e707c(0x2e4)));const _0x46a4eb=a60_0x7d277e[_0x2e707c(0x1e0)](process[_0x2e707c(0x19c)](),_0x1df73c[_0x2e707c(0x303)])||'.';return console['error'](a60_0x529429[_0x2e707c(0x1d7)](_0x2e707c(0x333)+_0x46a4eb)),console[_0x2e707c(0x2f0)](a60_0x529429[_0x2e707c(0x1d7)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1df73c['projectName'])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x321);[a60_0x536582(0x28b)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI';async[a60_0x536582(0x34d)](_0x55223b){const _0x383272=a60_0x536582,{options:_0x5b4c99,args:_0x24c627,tdx:_0x5debde}=_0x55223b,_0x11b5d6=this[_0x383272(0x1d0)](_0x24c627,_0x5b4c99),_0x5af9e4=_0x5b4c99,{revision:_0x19a4f1,skipValidation:_0x246f14,backfill:_0x514374}=_0x5af9e4,_0x3cdebb=_0x514374===undefined?undefined:!_0x514374;_0x5b4c99['verbose']&&(_0x11b5d6&&console[_0x383272(0x2f0)](_0x383272(0x18b)+_0x11b5d6),_0x19a4f1&&console[_0x383272(0x2f0)](_0x383272(0x248)+_0x19a4f1),_0x5b4c99[_0x383272(0x2d9)]&&console[_0x383272(0x2f0)](_0x383272(0x233)),_0x246f14&&console['error']('Validation:\x20skipped'),_0x514374&&console[_0x383272(0x2f0)]('Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)'));let _0x2857c2;try{_0x2857c2=await withSpinner(_0x383272(0x313),()=>_0x5debde[_0x383272(0x27b)][_0x383272(0x2f8)]({'sourceDir':_0x11b5d6,'revision':_0x19a4f1,'skipValidation':_0x246f14,'skipSchedule':_0x3cdebb}),{'verbose':_0x5b4c99['verbose']});}catch(_0x24b660){if(_0x24b660 instanceof Error&&_0x24b660[_0x383272(0x1a4)]['includes'](_0x383272(0x2cb)))return console[_0x383272(0x2f0)](a60_0x529429[_0x383272(0x30f)](_0x383272(0x1f7)),_0x383272(0x25d)),_0x5b4c99[_0x383272(0x22e)]?console['error'](a60_0x529429[_0x383272(0x1d7)]('Tip:\x20cd\x20to\x20workflows/'+_0x5b4c99[_0x383272(0x22e)]+_0x383272(0x270)+_0x5b4c99[_0x383272(0x22e)]+'\x27')):console[_0x383272(0x2f0)](a60_0x529429[_0x383272(0x1d7)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x24b660;}const _0x38bb9b=_0x2857c2[_0x383272(0x285)];console[_0x383272(0x2f0)](_0x383272(0x1aa)+_0x38bb9b[_0x383272(0x194)]),console[_0x383272(0x2f0)]('\x20\x20Source:\x20'+_0x38bb9b[_0x383272(0x328)]),console['error'](_0x383272(0x264)+_0x38bb9b[_0x383272(0x231)]),console[_0x383272(0x2f0)](_0x383272(0x309)+a60_0x529429[_0x383272(0x1c1)]('+'+_0x38bb9b[_0x383272(0x240)][_0x383272(0x258)]+_0x383272(0x2cd))+',\x20'+(a60_0x529429[_0x383272(0x2dc)]('~'+_0x38bb9b[_0x383272(0x240)][_0x383272(0x2f9)]+_0x383272(0x245))+',\x20')+(a60_0x529429[_0x383272(0x30f)]('-'+_0x38bb9b[_0x383272(0x240)][_0x383272(0x340)]+_0x383272(0x2b2))+',\x20')+(''+a60_0x529429[_0x383272(0x1d7)](_0x38bb9b[_0x383272(0x240)][_0x383272(0x34a)]+_0x383272(0x1bf))));for(const _0x35e432 of _0x38bb9b[_0x383272(0x232)]){_0x35e432['type']===_0x383272(0x2f9)&&_0x35e432[_0x383272(0x1f4)]&&(console[_0x383272(0x2f0)]('\x0a'+a60_0x529429[_0x383272(0x2ae)](_0x383272(0x29d)+_0x35e432['path'])),console['error'](_0x35e432[_0x383272(0x1f4)]));}if(!_0x38bb9b[_0x383272(0x251)])return console[_0x383272(0x2f0)](a60_0x529429[_0x383272(0x1c1)](_0x383272(0x23d))),await this[_0x383272(0x317)](_0x5debde,_0x38bb9b['projectName'],_0x5b4c99[_0x383272(0x1ba)]),0x0;if(_0x5b4c99[_0x383272(0x2d9)])return console[_0x383272(0x2f0)](a60_0x529429[_0x383272(0x2dc)](_0x383272(0x289))),0x0;if(!_0x5b4c99[_0x383272(0x254)]){if(!isInteractive())return console['error'](a60_0x529429[_0x383272(0x30f)](_0x383272(0x2b7)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x383272(0x2f0)](a60_0x529429[_0x383272(0x1d7)](_0x383272(0x238))),0x1;const _0x473bd3=await confirmKey(_0x383272(0x2e2));if(!_0x473bd3)return console[_0x383272(0x2f0)](a60_0x529429['yellow'](_0x383272(0x274)),_0x383272(0x2f7)),0x1;}const _0x21fec5=await withSpinner('Pushing\x20project...',()=>_0x5debde[_0x383272(0x27b)][_0x383272(0x189)](_0x38bb9b),{'verbose':_0x5b4c99[_0x383272(0x319)]}),_0x55d00f=_0x21fec5[_0x383272(0x285)];return console[_0x383272(0x2f0)](a60_0x529429['green'](_0x383272(0x250))),console[_0x383272(0x2f0)]('\x20\x20Project\x20ID:\x20'+_0x55d00f[_0x383272(0x23b)]),console['error'](_0x383272(0x264)+_0x55d00f[_0x383272(0x231)]),await this[_0x383272(0x317)](_0x5debde,_0x55d00f[_0x383272(0x194)],_0x5b4c99['site']),0x0;}}function a60_0x1bb7(){const _0xb20de4=['1754242QJXVHJ','key','resolveProject','stat','\x20modified','\x20attempt','✔\x20Workflow\x20project\x20context\x20cleared.','Revision:\x20','workflow:logs','startedAt','Total:\x20','Filter:\x20','type','renderTimeline','attemptId','✔\x20Push\x20complete','hasChanges','resolveProjectId','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','yes','No\x20attempts\x20found\x20in\x20project:\x20','delete','/app/workflows/','new','sort','Task\x20name:\x20','displayLine','Retrying\x20attempt...','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','taskName','\x20tasks',',\x20Workflow:\x20','pollTimeline','Error:\x20Project\x20name\x20is\x20required','workflow:timeline','\x20\x20Revision:\x20','\x20-\x20','Loading\x20workflows...','Filter:\x20project=','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','basename','Cloning\x20to\x20','/attempt/','📁\x20','Force:\x20yes','sessionId','toLowerCase','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','startsWith','executeDryRun','getSchedule','Cancelled','workflow:delete','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','.\x20Expected\x20format:\x20KEY=VALUE','toLocaleString','Pattern:\x20','sessions','workflow','group_error','MAX_TIMELINE_WIDTH','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','From\x20task:\x20','✔\x20Schedule\x20found','Parameters:','Project\x20name:\x20','🔄\x20','workflow:use','data','context','retryAttemptName','\x20\x20New\x20attempt\x20ID:\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','slice','description','ICON_WIDTH','Reason:\x20','Kill\x20a\x20running\x20attempt','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','Listing\x20schedules...','TASK_NAME_WIDTH','pullProject','workflow:sessions','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','workflow:tasks','title','8042880qzUrwm','sessionTime','every','fromTask','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x22\x20to\x20new\x20project\x20\x22','---\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','📋\x20','write','Failed\x20to\x20fetch\x20attempt\x20data','indexOf','\x1b[1A\x1b[2K','unknown','localeCompare','✔\x20Found\x20','\x20\x20Files\x20extracted:\x20','max','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Source\x20directory\x20is\x20required','Session\x20','Usage:\x20tdx\x20wf\x20use\x20<project>','newProjectId','cyan','get','✔\x20Downloaded\x20','/sessions/','\x20deleted','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','Including\x20subtasks:\x20yes','lastAttempt','Start\x20a\x20workflow\x20run','\x0aError:','from','logs','No\x20schedules\x20found','size','No\x20workflow\x20sessions\x20found','(unknown)','Error:\x20Secret\x20key\x20is\x20required','Listing\x20workflow\x20projects...','params','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','No\x20workflows\x20found\x20in\x20project:\x20','Parameters:\x20','2576435lWevNL','filesExtracted','all','\x0aDry\x20run\x20-\x20no\x20project\x20created','\x20workflow','Attempt:\x20','No\x20workflow\x20tdx.json\x20found','fileSize','\x20new','Session\x20time:\x20','✔\x20Pushed\x20','isDirectory','Resolving\x20project\x20\x27','min','⚠\x20Showing\x20first\x20','parseProjectWorkflowPattern','Task\x20graph:','prepareCloneProject','log','Select\x20a\x20session\x20to\x20view\x20timeline:','dryRun','7bSBxol','navigateSessionsInteractive','yellow','Target\x20directory:\x20','padStart','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Getting\x20attempt\x20details...','\x0aPush\x20these\x20changes?','Files\x20to\x20upload:\x20','✔\x20Pull\x20complete','download','keys','No\x20log\x20files\x20found\x20for\x20this\x20attempt','workflow:download','workflow:projects','floor','...','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','12fvnXxo','Error:\x20','Error:\x20Attempt\x20ID\x20is\x20required','error','finishedAt','Output\x20directory:\x20','\x22\x20already\x20exists\x20(ID:\x20','renderSessionsTimeline','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','state','-\x20nothing\x20pushed','preparePushProject','modified','param','nextRunTime','index','kill','workflow:retry','includeSubtasks','GUTTER','Loading\x20session...','✔\x20Workflow\x20run\x20started','targetDir','Project\x20name\x20is\x20required','status','Retrying\x20session...','1510761JcjHHO','LABEL_MIN_SPACING','\x20\x20Changes:\x20','Project:\x20','rows','Pull\x20workflow\x20project\x20to\x20local\x20folder','POLL_INTERVAL_MS','Listing\x20secrets...','red','\x20next:\x20','💡\x20Tip:\x20Use\x20','Key:\x20','Analyzing\x20changes...','Downloading\x20project\x20','No\x20matching\x20sessions\x20found','table','showWorkflowConsoleUrl','\x20secrets\x20set\x20for\x20project\x20\x27','verbose','end','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','→\x20Project:\x20','task','blue','has','No\x20workflow\x20projects\x20found','workflow:push','\x22\x20with\x20new\x20revision?','find','setSecrets','skipSchedule','isArray','No\x20workflows\x20found','sourceDir','readFile','Attempt\x20ID:\x20','No\x20log\x20content\x20found','Secrets\x20to\x20set:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Fetching\x20log\x20files...','project','length','tdx\x20wf\x20attempt\x20','📅\x20#','\x20\x20Location:\x20','Killing\x20attempt...','isTTY','enableSchedule','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','map','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','✔\x20Project\x20updated','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','7272243WWJsrY','140974GZGXFE','Params:\x20','deleted','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','Schedule\x20ID\x20is\x20required','workflow:schedules','Downloading\x20logs...','\x0a⚠\x20Project\x20\x22','\x20logs','Session\x20time:','Project\x20filter:\x20','reason','unchanged','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','logFiles','execute','attempt','fileCount','\x20\x20Session\x20ID:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','existingProjectId','Loading\x20sessions...','format','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','disabledAt','executePushProject','pending','Source\x20directory:\x20','\x0a✔\x20Already\x20up\x20to\x20date','Include\x20retried:\x20yes','Usage:\x20workflow:delete\x20<project-name-or-id>','push','getHours','\x20\x20tdx\x20wf\x20use\x20<project>','No\x20sessions\x20found\x20for:\x20','\x0aFailed\x20to\x20fetch\x20attempt\x20data','projectName','jsonl','parse','start','duration','limit','\x20\x20Project\x20ID:\x20','now','cwd','List\x20all\x20workflow\x20projects','autocomplete','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','workflow:upload','New\x20project\x20name:\x20','includes','message','follow','revision:\x20','skipValidation','\x20disabled\x20(','MIN_TIMELINE_WIDTH','✔\x20Project:\x20','session:','updatedAt','\x20\x20Next\x20run:\x20','Select\x20a\x20workflow\x20to\x20run','\x20\x20Console:\x20','select','name','some','MAX_TASKS_DISPLAY','canceling','isNewProject','\x20sessions\x20','resumeFrom','Validation:\x20skipped','ICON_SPACING','site','Select\x20a\x20task\x20to\x20view\x20logs:','createdAt','Error:\x20Invalid\x20parameter\x20format:\x20','icon','\x20unchanged','Fetching\x20workflow\x20','green','Disabling\x20schedule\x20#','planned','4MrFhXT','\x20secrets...','Listing\x20workflow\x20sessions...','join','Session\x20not\x20found:\x20','workflow:secrets:delete','Getting\x20attempt\x20tasks...','getMonth','match','bold','List\x20workflow\x20execution\x20sessions','Deleting\x20secret...','resolveProjectDir','toISOString','done','✔\x20Secret\x20\x27','clear','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','No\x20attempts\x20found\x20for:\x20','dim','list','resolve','Error:\x20Invalid\x20JSON\x20in\x20--params','running','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','LABEL_WIDTH_DIVISOR','getDate','MAX_LABEL_COUNT','relative','MIN_LABEL_COUNT','Enable\x20a\x20workflow\x20schedule','✔\x20Deleted\x20project\x20','cancelRequested','stringify','workflow:schedule:enable','session','fs/promises','workflow:attempts','renderSingleTimeline','\x20from\x20session\x20','\x20(system)','\x20project','window','fill','No\x20sessions\x20found','List\x20workflows','value','22887920nyyElI','diff','projects','✔\x20Schedule\x20#','Error:','Disable\x20a\x20workflow\x20schedule','generateSessionTimelineRows','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','\x20\x20Project:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','run','\x0aDry\x20run\x20-\x20no\x20files\x20written','repeat','\x20of\x20','\x20(disabled)','startTime','set','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','List\x20workflow\x20schedules','includeRetried','force','newProjectName','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','No\x20sessions\x20found\x20in\x20project:\x20','fullName','✔\x20Retry\x20started','\x20to\x20see\x20detailed\x20logs','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','trimEnd','Resume\x20from:\x20','workflow:pull','\x0aClone\x20\x22','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','output','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','No\x20sessions\x20with\x20timing\x20information','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','sourceProjectName','success','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','getMinutes','workflow:secrets:list','split','List\x20workflow\x20attempts','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','utf-8','MAX_POLL_ITERATIONS','workflows','columns','retryAttempt','\x20secret','targetExists','tasks','stdout','\x20(use\x20--limit\x20to\x20show\x20more)','white','substring','json','workflowProject','\x22?\x20This\x20cannot\x20be\x20undone.','\x0aUpdate\x20existing\x20project\x20\x22','revision','changes','Dry\x20run:\x20yes','Project\x20directory:\x20','requireProject','getTime','workflow:secrets:set','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Source\x20project:\x20','filter','projectId','getFullYear','\x0a✔\x20No\x20changes\x20to\x20push','Workflow:','✔\x20Workflow\x20project\x20set\x20to:\x20','summary'];a60_0x1bb7=function(){return _0xb20de4;};return a60_0x1bb7();}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a60_0x536582(0x1b1)]='workflow:clone';[a60_0x536582(0x28b)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a60_0x536582(0x34d)](_0x4cd68a){const _0x872ba9=a60_0x536582,{options:_0x38e1a0,args:_0x5c7979,tdx:_0x4e8e77}=_0x4cd68a,_0x45ec54=this[_0x872ba9(0x1d0)](_0x5c7979,_0x38e1a0),_0x5c5f3d=_0x38e1a0[_0x872ba9(0x1b1)],_0x1b26d5=_0x38e1a0['revision'],_0x8592c9=_0x38e1a0[_0x872ba9(0x1a7)];if(!_0x45ec54)return console[_0x872ba9(0x2f0)](a60_0x529429[_0x872ba9(0x30f)](_0x872ba9(0x1f7)),_0x872ba9(0x2aa)),console['error'](a60_0x529429[_0x872ba9(0x1d7)](_0x872ba9(0x337))),console['error'](a60_0x529429[_0x872ba9(0x1d7)](_0x872ba9(0x31b))),0x1;if(!_0x5c5f3d)return console[_0x872ba9(0x2f0)](a60_0x529429['red'](_0x872ba9(0x1f7)),_0x872ba9(0x20e)),console['error'](a60_0x529429[_0x872ba9(0x1d7)](_0x872ba9(0x337))),0x1;_0x38e1a0[_0x872ba9(0x319)]&&(console[_0x872ba9(0x2f0)](_0x872ba9(0x18b)+_0x45ec54),console[_0x872ba9(0x2f0)](_0x872ba9(0x1a2)+_0x5c5f3d),_0x1b26d5&&console[_0x872ba9(0x2f0)]('Revision:\x20'+_0x1b26d5),_0x38e1a0[_0x872ba9(0x2d9)]&&console['error'](_0x872ba9(0x233)),_0x8592c9&&console[_0x872ba9(0x2f0)](_0x872ba9(0x1b8)));const _0xcb1409=await withSpinner('Analyzing\x20project...',()=>_0x4e8e77[_0x872ba9(0x27b)][_0x872ba9(0x2d6)](_0x45ec54,_0x5c5f3d,{'revision':_0x1b26d5,'skipValidation':_0x8592c9}),{'verbose':_0x38e1a0[_0x872ba9(0x319)]}),_0x5b0a31=_0xcb1409[_0x872ba9(0x285)];console['error']('Source:\x20'+_0x5b0a31[_0x872ba9(0x328)]);_0x5b0a31[_0x872ba9(0x218)]&&console['error'](_0x872ba9(0x239)+_0x5b0a31[_0x872ba9(0x218)]);console[_0x872ba9(0x2f0)](_0x872ba9(0x1a2)+_0x5b0a31[_0x872ba9(0x208)]),console[_0x872ba9(0x2f0)](_0x872ba9(0x248)+_0x5b0a31['revision']),console[_0x872ba9(0x2f0)](_0x872ba9(0x2e3)+_0x5b0a31[_0x872ba9(0x181)]);_0x5b0a31['targetExists']&&(console['error'](a60_0x529429[_0x872ba9(0x2dc)](_0x872ba9(0x345)+_0x5b0a31['newProjectName']+_0x872ba9(0x2f3)+_0x5b0a31[_0x872ba9(0x184)]+')')),console[_0x872ba9(0x2f0)](a60_0x529429['yellow'](_0x872ba9(0x2ec))));if(_0x38e1a0['dryRun'])return console[_0x872ba9(0x2f0)](a60_0x529429[_0x872ba9(0x2dc)](_0x872ba9(0x2c8))),0x0;if(!_0x38e1a0[_0x872ba9(0x254)]){if(!isInteractive())return console[_0x872ba9(0x2f0)](a60_0x529429['red'](_0x872ba9(0x2b7)),_0x872ba9(0x339)),console[_0x872ba9(0x2f0)](a60_0x529429[_0x872ba9(0x1d7)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xab3188=_0x5b0a31[_0x872ba9(0x218)]||a60_0x7d277e[_0x872ba9(0x269)](_0x45ec54),_0x3d6178=_0x5b0a31[_0x872ba9(0x227)]?_0x872ba9(0x230)+_0x5c5f3d+_0x872ba9(0x322):_0x872ba9(0x212)+_0xab3188+_0x872ba9(0x29c)+_0x5c5f3d+'\x22?',_0x266841=await confirmKey(_0x3d6178);if(!_0x266841)return console[_0x872ba9(0x2f0)](a60_0x529429['yellow'](_0x872ba9(0x274))),0x1;}const _0x3f0a01=await withSpinner(_0x5b0a31[_0x872ba9(0x227)]?'Updating\x20'+_0x5c5f3d+_0x872ba9(0x2eb):_0x872ba9(0x26a)+_0x5c5f3d+_0x872ba9(0x2eb),()=>_0x4e8e77[_0x872ba9(0x27b)]['executeCloneProject'](_0x5b0a31),{'verbose':_0x38e1a0[_0x872ba9(0x319)]}),_0x520f5c=_0x3f0a01[_0x872ba9(0x285)];return console[_0x872ba9(0x2f0)](a60_0x529429['green'](_0x5b0a31[_0x872ba9(0x227)]?_0x872ba9(0x33b):'✔\x20Clone\x20complete')),console[_0x872ba9(0x2f0)](_0x872ba9(0x1fb)+_0x520f5c[_0x872ba9(0x208)]),console[_0x872ba9(0x2f0)](_0x872ba9(0x19a)+_0x520f5c[_0x872ba9(0x2ad)]),console[_0x872ba9(0x2f0)](_0x872ba9(0x264)+_0x520f5c['revision']),await this[_0x872ba9(0x317)](_0x4e8e77,_0x520f5c[_0x872ba9(0x208)],_0x38e1a0[_0x872ba9(0x1ba)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x275);[a60_0x536582(0x28b)]=a60_0x536582(0x28f);async[a60_0x536582(0x34d)](_0x3d03f3){const _0x24513f=a60_0x536582,{options:_0x20b27a,args:_0x1f8e9c,tdx:_0x36abe8}=_0x3d03f3,_0x8223fb=_0x1f8e9c[0x0];if(!_0x8223fb)return console[_0x24513f(0x2f0)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x24513f(0x2f0)](_0x24513f(0x18e)),0x1;_0x20b27a[_0x24513f(0x319)]&&console[_0x24513f(0x2f0)](_0x24513f(0x30a)+_0x8223fb);if(!_0x20b27a[_0x24513f(0x254)]){if(!isInteractive())return console['error'](a60_0x529429[_0x24513f(0x30f)](_0x24513f(0x2b7)),_0x24513f(0x339)),console[_0x24513f(0x2f0)](a60_0x529429['dim'](_0x24513f(0x238))),0x1;const _0x36ca1d=await confirmKey(_0x24513f(0x32d)+_0x8223fb+_0x24513f(0x22f));if(!_0x36ca1d)return console['error'](a60_0x529429[_0x24513f(0x2dc)](_0x24513f(0x274))),0x1;}const _0x4d3862=await withSpinner('Deleting\x20project\x20'+_0x8223fb+_0x24513f(0x2eb),()=>_0x36abe8[_0x24513f(0x27b)][_0x24513f(0x256)](_0x8223fb),{'verbose':_0x20b27a[_0x24513f(0x319)]}),_0xef22d3=_0x4d3862['data'];return console[_0x24513f(0x2f0)](_0x24513f(0x1e3)+_0xef22d3[_0x24513f(0x194)]),console[_0x24513f(0x2f0)](_0x24513f(0x19a)+_0xef22d3['projectId']),0x0;}}export function parseKeyValue(_0x44a953){const _0x26f8fc=a60_0x536582,_0x2df444=_0x44a953[_0x26f8fc(0x2a2)]('=');if(_0x2df444===-0x1)throw new Error('Invalid\x20format:\x20'+_0x44a953+_0x26f8fc(0x277));const _0xd22823=_0x44a953[_0x26f8fc(0x22c)](0x0,_0x2df444),_0x54e4c2=_0x44a953[_0x26f8fc(0x22c)](_0x2df444+0x1);if(!_0xd22823)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0xd22823,'value':_0x54e4c2};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a60_0x536582(0x21d);[a60_0x536582(0x28b)]=a60_0x536582(0x2a9);async[a60_0x536582(0x34d)](_0x31f0dd){const _0x21570b=a60_0x536582,{options:_0x251b0a,args:_0x3bd52e,tdx:_0x470e56}=_0x31f0dd,_0x2941ee=this[_0x21570b(0x235)](_0x3bd52e,_0x251b0a);if(!_0x2941ee)return 0x1;_0x251b0a[_0x21570b(0x319)]&&console[_0x21570b(0x2f0)](_0x21570b(0x30a)+_0x2941ee);const _0x46f256=await withSpinner(_0x21570b(0x30e),()=>_0x470e56['workflow']['listSecrets'](_0x2941ee),{'verbose':_0x251b0a[_0x21570b(0x319)]}),{secrets:_0x245b90}=_0x46f256['data'];return console[_0x21570b(0x2f0)](_0x21570b(0x2a6)+_0x245b90['length']+_0x21570b(0x226)+(_0x245b90[_0x21570b(0x330)]!==0x1?'s':'')),await handleSDKOutput(_0x245b90,_0x251b0a),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a60_0x536582(0x1b1)]=a60_0x536582(0x237);['description']=a60_0x536582(0x204);async['execute'](_0x5136ec){const _0x5bd791=a60_0x536582,{options:_0x47880b,args:_0x202780,tdx:_0x42f3e6}=_0x5136ec;let _0x3b419c,_0x405ae2;if(_0x202780[_0x5bd791(0x330)]>=0x1&&!_0x202780[0x0][_0x5bd791(0x1a3)]('='))_0x3b419c=_0x202780[0x0],_0x405ae2=_0x202780[_0x5bd791(0x28a)](0x1);else{if(_0x202780[_0x5bd791(0x330)]>=0x1&&_0x47880b['workflowProject'])_0x3b419c=_0x47880b['workflowProject'],_0x405ae2=_0x202780;else return _0x202780['length']>=0x1?(console[_0x5bd791(0x2f0)](_0x5bd791(0x262)),console[_0x5bd791(0x2f0)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x5bd791(0x2f0)]('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x5bd791(0x2f0)](_0x5bd791(0x276)),0x1);}if(_0x405ae2[_0x5bd791(0x330)]===0x0)return console['error'](_0x5bd791(0x34b)),console[_0x5bd791(0x2f0)](_0x5bd791(0x276)),0x1;const _0x3a4223={};try{for(const _0x3b85e8 of _0x405ae2){const {key:_0x5e36dd,value:_0x57f891}=parseKeyValue(_0x3b85e8);_0x3a4223[_0x5e36dd]=_0x57f891;}}catch(_0xb00af1){return _0xb00af1 instanceof Error&&console['error'](a60_0x529429[_0x5bd791(0x30f)](_0x5bd791(0x1f7)),_0xb00af1[_0x5bd791(0x1a4)]),0x1;}const _0x22bd3e=Object[_0x5bd791(0x2e6)](_0x3a4223);_0x47880b[_0x5bd791(0x319)]&&(console['error'](_0x5bd791(0x30a)+_0x3b419c),console['error'](_0x5bd791(0x32c)+_0x22bd3e[_0x5bd791(0x1c7)](',\x20')));const _0x4c3c4d=await withSpinner(_0x22bd3e[_0x5bd791(0x330)]===0x1?'Setting\x20secret...':'Setting\x20'+_0x22bd3e['length']+_0x5bd791(0x1c5),()=>_0x42f3e6[_0x5bd791(0x27b)][_0x5bd791(0x324)](_0x3b419c,_0x3a4223),{'verbose':_0x47880b[_0x5bd791(0x319)]}),_0x322726=_0x4c3c4d[_0x5bd791(0x285)];return console[_0x5bd791(0x2f0)](_0x22bd3e[_0x5bd791(0x330)]===0x1?_0x5bd791(0x1d3)+_0x322726[_0x5bd791(0x2e6)][0x0]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x322726['projectName']+'\x27':'✔\x20'+_0x322726['keys'][_0x5bd791(0x330)]+_0x5bd791(0x318)+_0x322726['projectName']+'\x27'),(_0x47880b[_0x5bd791(0x22d)]||_0x47880b['jsonl'])&&await handleSingleObjectOutput(_0x322726,_0x47880b),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a60_0x536582(0x1c9);[a60_0x536582(0x28b)]=a60_0x536582(0x2c1);async['execute'](_0x466304){const _0x559674=a60_0x536582,{options:_0x375ea6,args:_0x3792ec,tdx:_0x530a85}=_0x466304;let _0x5a3b4d,_0x2af05e;if(_0x3792ec[_0x559674(0x330)]>=0x2)_0x5a3b4d=_0x3792ec[0x0],_0x2af05e=_0x3792ec[0x1];else{if(_0x3792ec[_0x559674(0x330)]===0x1&&_0x375ea6['workflowProject'])_0x5a3b4d=_0x375ea6[_0x559674(0x22e)],_0x2af05e=_0x3792ec[0x0];else return _0x3792ec[_0x559674(0x330)]===0x1?(console[_0x559674(0x2f0)](_0x559674(0x262)),console[_0x559674(0x2f0)](_0x559674(0x29b)),0x1):(console[_0x559674(0x2f0)](_0x559674(0x2be)),console['error'](_0x559674(0x209)),0x1);}_0x375ea6[_0x559674(0x319)]&&(console[_0x559674(0x2f0)](_0x559674(0x30a)+_0x5a3b4d),console[_0x559674(0x2f0)](_0x559674(0x312)+_0x2af05e));if(!_0x375ea6[_0x559674(0x254)]){if(!isInteractive())return console[_0x559674(0x2f0)](a60_0x529429[_0x559674(0x30f)](_0x559674(0x2b7)),_0x559674(0x339)),console['error'](a60_0x529429[_0x559674(0x1d7)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4e40d3=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x2af05e+'\x27\x20from\x20project\x20\x27'+_0x5a3b4d+'\x27?');if(!_0x4e40d3)return console[_0x559674(0x2f0)](a60_0x529429['yellow']('Cancelled')),0x1;}const _0x524aa8=await withSpinner(_0x559674(0x1cf),()=>_0x530a85['workflow']['deleteSecret'](_0x5a3b4d,_0x2af05e),{'verbose':_0x375ea6[_0x559674(0x319)]}),_0xe275b1=_0x524aa8['data'];return console[_0x559674(0x2f0)](_0x559674(0x1d3)+_0xe275b1[_0x559674(0x242)]+_0x559674(0x213)+_0xe275b1[_0x559674(0x194)]+'\x27'),(_0x375ea6['json']||_0x375ea6[_0x559674(0x195)])&&await handleSingleObjectOutput(_0xe275b1,_0x375ea6),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(_0x19945c){const _0x4ba94f=a60_0x536582,_0x7f9c0d=Math[_0x4ba94f(0x2ea)](_0x19945c/0x3e8),_0x1827e2=Math[_0x4ba94f(0x2ea)](_0x7f9c0d/0x3c),_0x6875ac=Math[_0x4ba94f(0x2ea)](_0x1827e2/0x3c),_0x2289a7=Math[_0x4ba94f(0x2ea)](_0x6875ac/0x18);if(_0x2289a7>0x0){const _0x504eaf=_0x6875ac%0x18;return _0x504eaf>0x0?_0x2289a7+'d\x20'+_0x504eaf+'h':_0x2289a7+'d';}else{if(_0x6875ac>0x0){const _0x28cafa=_0x1827e2%0x3c;return _0x28cafa>0x0?_0x6875ac+'h\x20'+_0x28cafa+'m':_0x6875ac+'h';}else{if(_0x1827e2>0x0){const _0x32dc4e=_0x7f9c0d%0x3c;return _0x32dc4e>0x0?_0x1827e2+'m\x20'+_0x32dc4e+'s':_0x1827e2+'m';}else return _0x7f9c0d+'s';}}}function formatTimestamp(_0x477ff9,_0x32b025){const _0x3c7977=a60_0x536582,_0x3a1f0c=new Date(_0x477ff9),_0x51280e=String(_0x3a1f0c[_0x3c7977(0x190)]())[_0x3c7977(0x2de)](0x2,'0'),_0x157c21=String(_0x3a1f0c[_0x3c7977(0x21c)]())[_0x3c7977(0x2de)](0x2,'0'),_0x26c8b1=_0x51280e+':'+_0x157c21,_0x5463ae=_0x3a1f0c[_0x3c7977(0x23c)]()===_0x32b025[_0x3c7977(0x23c)]()&&_0x3a1f0c[_0x3c7977(0x1cb)]()===_0x32b025[_0x3c7977(0x1cb)]()&&_0x3a1f0c['getDate']()===_0x32b025[_0x3c7977(0x1de)]();if(_0x5463ae)return _0x26c8b1;else{const _0x4684b3=String(_0x3a1f0c[_0x3c7977(0x1cb)]()+0x1)[_0x3c7977(0x2de)](0x2,'0'),_0x534e83=String(_0x3a1f0c[_0x3c7977(0x1de)]())[_0x3c7977(0x2de)](0x2,'0');return _0x4684b3+'-'+_0x534e83+'\x20'+_0x26c8b1;}}function formatDate(_0xccfe16){const _0x216006=a60_0x536582,_0x248081=_0xccfe16[_0x216006(0x23c)](),_0x584b75=String(_0xccfe16[_0x216006(0x1cb)]()+0x1)[_0x216006(0x2de)](0x2,'0'),_0x67d0d1=String(_0xccfe16[_0x216006(0x1de)]())[_0x216006(0x2de)](0x2,'0');return _0x248081+'-'+_0x584b75+'-'+_0x67d0d1;}function getTaskStateIcon(_0x3d73a9){const _0x7df592={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x7df592[_0x3d73a9]||'⚪';}function getBarChar(_0x4111ba){const _0x3a9129=a60_0x536582;return _0x4111ba===_0x3a9129(0x2f0)||_0x4111ba===_0x3a9129(0x27c)?'×':'─';}function getBarColor(_0x1bcd92){const _0x31d43f=a60_0x536582,_0x389926={'success':a60_0x529429[_0x31d43f(0x1c1)],'error':a60_0x529429[_0x31d43f(0x30f)],'group_error':a60_0x529429[_0x31d43f(0x30f)],'running':a60_0x529429['blue'],'blocked':a60_0x529429[_0x31d43f(0x2dc)],'planned':a60_0x529429[_0x31d43f(0x1d7)],'canceling':a60_0x529429[_0x31d43f(0x2dc)]};return _0x389926[_0x1bcd92]||a60_0x529429[_0x31d43f(0x22b)];}function parseTaskName(_0x167f9c){const _0x5bdc2b=a60_0x536582;let _0x5bf789=_0x167f9c['replace'](/^\++/,'');const _0x52892a=_0x5bf789[_0x5bdc2b(0x21e)]('+'),_0x359927=_0x52892a[_0x5bdc2b(0x330)]>0x1?_0x52892a['length']-0x2:0x0,_0x31f7cf=_0x52892a[_0x52892a['length']-0x1]||_0x5bf789;return{'level':_0x359927,'name':'+'+_0x31f7cf};}function truncateTaskName(_0x2314f8,_0x1635cd){const _0x2b3e93=a60_0x536582,_0x1f2d86=stringWidth(_0x2314f8);if(_0x1f2d86<=_0x1635cd)return _0x2314f8;let _0x209909=_0x2314f8;while(stringWidth(_0x209909+'…')>_0x1635cd&&_0x209909[_0x2b3e93(0x330)]>0x0){_0x209909=_0x209909[_0x2b3e93(0x28a)](0x0,-0x1);}return _0x209909+'…';}function calculateTimeScale(_0x1cd58a,_0xe67b4e){const _0x2a2bc9=a60_0x536582;return{'startTime':_0x1cd58a[_0x2a2bc9(0x197)],'endTime':_0x1cd58a[_0x2a2bc9(0x31a)],'durationMs':_0x1cd58a[_0x2a2bc9(0x198)],'msPerChar':_0x1cd58a[_0x2a2bc9(0x198)]/_0xe67b4e};}function timeToPosition(_0x1d5148,_0x55710e,_0x1060ad){const _0xceedd9=a60_0x536582,_0x1d2e3a=_0x1d5148-_0x55710e[_0xceedd9(0x202)],_0x145afd=Math[_0xceedd9(0x2ea)](_0x1d2e3a/_0x55710e['msPerChar']);return Math['max'](0x0,Math[_0xceedd9(0x2d2)](_0x145afd,_0x1060ad));}function renderTimeAxis(_0x25e067,_0x378fef){const _0x4dbb90=a60_0x536582,_0x2ce71f=Math[_0x4dbb90(0x2d2)](TIMELINE_CONFIG[_0x4dbb90(0x1df)],Math[_0x4dbb90(0x2a8)](TIMELINE_CONFIG[_0x4dbb90(0x1e1)],Math[_0x4dbb90(0x2ea)](_0x378fef/TIMELINE_CONFIG[_0x4dbb90(0x1dd)]))),_0x3bbfaa=_0x25e067['durationMs']/(_0x2ce71f-0x1),_0x3939cf=new Date(_0x25e067[_0x4dbb90(0x202)]),_0x2b5d07=[];for(let _0xb3455d=0x0;_0xb3455d<_0x2ce71f;_0xb3455d++){const _0x51c649=_0x25e067['startTime']+_0xb3455d*_0x3bbfaa,_0x1e781a=timeToPosition(_0x51c649,_0x25e067,_0x378fef),_0x244650=formatTimestamp(_0x51c649,_0x3939cf);_0x2b5d07[_0x4dbb90(0x18f)]({'pos':_0x1e781a,'text':_0x244650});}const _0x299f84=new Array(_0x378fef)[_0x4dbb90(0x1ef)]('\x20');let _0xa15b92=-0x1;for(const {pos:_0x1f6191,text:_0x50b3d1}of _0x2b5d07){let _0x210381=Math[_0x4dbb90(0x2a8)](0x0,_0x1f6191-Math[_0x4dbb90(0x2ea)](_0x50b3d1[_0x4dbb90(0x330)]/0x2));_0x210381<=_0xa15b92+TIMELINE_CONFIG[_0x4dbb90(0x308)]&&(_0x210381=_0xa15b92+TIMELINE_CONFIG[_0x4dbb90(0x308)]+0x1);_0x210381+_0x50b3d1['length']>_0x378fef&&(_0x210381=_0x378fef-_0x50b3d1['length']);if(_0x210381>=0x0&&_0x210381+_0x50b3d1[_0x4dbb90(0x330)]<=_0x378fef&&_0x210381>_0xa15b92){for(let _0x2573fe=0x0;_0x2573fe<_0x50b3d1['length'];_0x2573fe++){_0x299f84[_0x210381+_0x2573fe]=_0x50b3d1[_0x2573fe];}_0xa15b92=_0x210381+_0x50b3d1['length']-0x1;}}return _0x299f84[_0x4dbb90(0x1c7)]('');}function renderTaskRow(_0x36ec9d,_0x4a1641,_0x4f418b,_0x3f7afa){const _0x275109=a60_0x536582,{level:_0x38718e,name:_0x321dad}=parseTaskName(_0x36ec9d[_0x275109(0x1b1)]),_0x1a38e4='\x20'[_0x275109(0x1ff)](_0x38718e),_0x48f24c=_0x36ec9d['window']?'('+formatElapsed(_0x36ec9d[_0x275109(0x1ee)][_0x275109(0x198)])+')':'',_0x1ee595=stringWidth(_0x48f24c),_0x23d09d=_0x38718e*0x1,_0x483bb7=_0x3f7afa-_0x23d09d-_0x1ee595-0x1,_0x5b4afb=truncateTaskName(_0x321dad,_0x483bb7),_0x30975f=_0x1a38e4+_0x5b4afb,_0x12ade8=stringWidth(_0x30975f),_0x3221ad=_0x3f7afa-_0x12ade8-_0x1ee595,_0x15c8ea=_0x30975f+'\x20'[_0x275109(0x1ff)](Math[_0x275109(0x2a8)](0x1,_0x3221ad))+a60_0x529429['dim'](_0x48f24c),_0x2df4e9=getTaskStateIcon(_0x36ec9d['state']),_0x12b0b0=new Array(_0x4f418b)['fill']('\x20');if(_0x36ec9d[_0x275109(0x1ee)]){const _0x3e5d19=timeToPosition(_0x36ec9d[_0x275109(0x1ee)][_0x275109(0x197)],_0x4a1641,_0x4f418b),_0x2a942c=timeToPosition(_0x36ec9d[_0x275109(0x1ee)][_0x275109(0x31a)],_0x4a1641,_0x4f418b),_0x4e3042=getBarChar(_0x36ec9d[_0x275109(0x2f6)]),_0x4f270a=Math[_0x275109(0x2a8)](_0x3e5d19+0x1,_0x2a942c);for(let _0x4acff3=_0x3e5d19;_0x4acff3<Math[_0x275109(0x2d2)](_0x4f270a,_0x4f418b);_0x4acff3++){_0x12b0b0[_0x4acff3]=_0x4e3042;}}const _0x18e142=getBarColor(_0x36ec9d['state']),_0x25d976=_0x12b0b0[_0x275109(0x338)](_0x57f431=>_0x57f431==='\x20'?'\x20':_0x18e142(_0x57f431))[_0x275109(0x1c7)]('');return _0x2df4e9+'\x20'+_0x15c8ea+'│'+_0x25d976+'│';}function calculateStats(_0x3de54e){const _0x9ea5b0=a60_0x536582,_0x46d04a={'total':_0x3de54e[_0x9ea5b0(0x330)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x34e461 of _0x3de54e){if(_0x34e461['state']===_0x9ea5b0(0x219))_0x46d04a['success']++;else{if(_0x34e461[_0x9ea5b0(0x2f6)]==='error'||_0x34e461['state']===_0x9ea5b0(0x27c))_0x46d04a['error']++;else _0x34e461[_0x9ea5b0(0x2f6)]===_0x9ea5b0(0x1db)?_0x46d04a['running']++:_0x46d04a[_0x9ea5b0(0x18a)]++;}}return _0x46d04a;}function formatStats(_0x5dc761){const _0x4edeee=a60_0x536582;return[_0x4edeee(0x24b)+_0x5dc761['total'],'✅\x20'+_0x5dc761[_0x4edeee(0x219)],'❌\x20'+_0x5dc761[_0x4edeee(0x2f0)],_0x4edeee(0x283)+_0x5dc761[_0x4edeee(0x1db)],'⏳\x20'+_0x5dc761['pending']][_0x4edeee(0x1c7)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a60_0x536582(0x263);[a60_0x536582(0x28b)]=a60_0x536582(0x1a0);async['execute'](_0x178ba1){const _0x5c2ffd=a60_0x536582,{options:_0x573029,args:_0x17ce4f,tdx:_0xe768e4}=_0x178ba1;let _0x10e2cd,_0x452708,_0x339345=![];if(_0x17ce4f[0x0]){if(_0x17ce4f[0x0][_0x5c2ffd(0x1a3)]('.')){const _0x37f1a5=this[_0x5c2ffd(0x2d4)](_0x17ce4f,_0x573029);if(!_0x37f1a5)return 0x1;_0x10e2cd=_0x37f1a5[_0x5c2ffd(0x194)],_0x452708=_0x37f1a5['workflowName'];}else{_0x452708=_0x17ce4f[0x0],_0x10e2cd=_0x573029[_0x5c2ffd(0x22e)];if(!_0x10e2cd)return console[_0x5c2ffd(0x2f0)](a60_0x529429[_0x5c2ffd(0x30f)](_0x5c2ffd(0x1f7)),_0x5c2ffd(0x2f5)),0x1;_0x339345=!![];}}else{const _0x5337e1=this[_0x5c2ffd(0x2d4)](_0x17ce4f,_0x573029);if(!_0x5337e1)return 0x1;_0x10e2cd=_0x5337e1[_0x5c2ffd(0x194)],_0x452708=_0x5337e1['workflowName'];}if(_0x573029[_0x5c2ffd(0x319)]){if(_0x10e2cd&&_0x452708)console[_0x5c2ffd(0x2f0)](_0x5c2ffd(0x24c)+_0x10e2cd+'.'+_0x452708);else _0x10e2cd&&console[_0x5c2ffd(0x2f0)](_0x5c2ffd(0x267)+_0x10e2cd);}const _0x436186=_0x573029['attemptId'],_0x520d40=_0x573029[_0x5c2ffd(0x26e)];if(_0x436186){_0x520d40&&console['error'](a60_0x529429['yellow']('Warning:'),_0x5c2ffd(0x253));const _0xd0ce0d=_0x573029['follow'];return _0xd0ce0d?await this[_0x5c2ffd(0x261)](_0x178ba1,_0x436186):await this[_0x5c2ffd(0x1ea)](_0x178ba1,_0x436186,_0x573029),0x0;}if(_0x520d40){const _0x453685=await withSpinner(_0x5c2ffd(0x301),()=>_0xe768e4[_0x5c2ffd(0x27b)][_0x5c2ffd(0x27a)]({'projectName':_0x10e2cd,'workflowName':_0x452708,'limit':0x64}),{'verbose':_0x573029[_0x5c2ffd(0x319)]}),_0xecee52=_0x453685['data'][_0x5c2ffd(0x323)](_0x2e9367=>_0x2e9367['id']===_0x520d40);if(!_0xecee52)return console['error'](a60_0x529429[_0x5c2ffd(0x30f)](_0x5c2ffd(0x1f7)),_0x5c2ffd(0x1c8)+_0x520d40),0x1;if(!_0xecee52[_0x5c2ffd(0x2b5)]?.['id'])return console['error'](a60_0x529429['red']('Error:'),_0x5c2ffd(0x2ab)+_0x520d40+'\x20has\x20no\x20attempts'),0x1;const _0x142dec=_0xecee52[_0x5c2ffd(0x2b5)]['id'];_0x573029[_0x5c2ffd(0x319)]&&console[_0x5c2ffd(0x2f0)]('Using\x20attempt\x20'+_0x142dec+_0x5c2ffd(0x1eb)+_0x520d40);const _0x5bb64f=_0x573029['follow'];return _0x5bb64f?await this['pollTimeline'](_0x178ba1,_0x142dec):await this[_0x5c2ffd(0x1ea)](_0x178ba1,_0x142dec,_0x573029),0x0;}const _0x1a59aa=await withSpinner(_0x5c2ffd(0x185),()=>_0xe768e4['workflow'][_0x5c2ffd(0x27a)]({'projectName':_0x10e2cd,'workflowName':_0x452708,'limit':_0x573029[_0x5c2ffd(0x199)]||0x32}),{'verbose':_0x573029[_0x5c2ffd(0x319)]}),_0x299967=_0x1a59aa['data'];if(_0x299967['length']===0x0){if(_0x10e2cd&&_0x452708)console['error'](_0x5c2ffd(0x192)+_0x10e2cd+'.'+_0x452708);else _0x10e2cd?console['error'](_0x5c2ffd(0x20a)+_0x10e2cd):(console[_0x5c2ffd(0x2f0)](_0x5c2ffd(0x2bc)),console['error'](a60_0x529429['dim'](_0x5c2ffd(0x21b))));return 0x0;}_0x299967[_0x5c2ffd(0x259)]((_0x499e20,_0x2da7cb)=>{const _0x18d964=_0x5c2ffd,_0x44e143=_0x499e20[_0x18d964(0x298)]||'',_0x537ad4=_0x2da7cb['sessionTime']||'';return _0x537ad4['localeCompare'](_0x44e143);});if(_0x573029[_0x5c2ffd(0x22d)]||_0x573029['jsonl'])return await handleSDKOutput(_0x299967,_0x573029),0x0;let _0x39b2c8;if(_0x339345){const _0x231c62=_0x299967[0x0];if(!_0x231c62[_0x5c2ffd(0x2b5)]?.['id'])return console[_0x5c2ffd(0x2f0)]('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x39b2c8=_0x231c62[_0x5c2ffd(0x2b5)]['id'],_0x573029['verbose']&&console[_0x5c2ffd(0x2f0)]('Auto-selected\x20latest\x20session:\x20'+_0x231c62[_0x5c2ffd(0x298)]);}else{const _0x20bd87=_0x299967[_0x5c2ffd(0x338)](_0xba66cf=>{const _0x2eab6a=_0x5c2ffd,_0x193da1=getAttemptStatusDisplay(_0xba66cf[_0x2eab6a(0x2b5)]);return{'title':_0xba66cf['project']?.[_0x2eab6a(0x1b1)]+'.'+_0xba66cf[_0x2eab6a(0x27b)]?.[_0x2eab6a(0x1b1)]+'\x20-\x20'+_0xba66cf['sessionTime']+'\x20'+_0x193da1[_0x2eab6a(0x1be)],'value':_0xba66cf['lastAttempt']?.['id']||'','description':_0x193da1['text']};}),_0x42aa0f=await a60_0x4e49d0({'type':_0x5c2ffd(0x1b0),'name':_0x5c2ffd(0x24f),'message':_0x5c2ffd(0x2d8),'choices':_0x20bd87[_0x5c2ffd(0x23a)](_0x45f8a5=>_0x45f8a5[_0x5c2ffd(0x1f2)]!=='')});if(!_0x42aa0f[_0x5c2ffd(0x24f)])return 0x0;_0x39b2c8=_0x42aa0f[_0x5c2ffd(0x24f)];}const _0xd49150=_0x573029[_0x5c2ffd(0x1a5)];return _0xd49150?await this[_0x5c2ffd(0x261)](_0x178ba1,_0x39b2c8):await this[_0x5c2ffd(0x1ea)](_0x178ba1,_0x39b2c8,_0x573029),0x0;}async[a60_0x536582(0x1ea)](_0x41743d,_0x467553,_0x3ada92){const _0x3fe894=a60_0x536582,{tdx:_0xbf5997}=_0x41743d;let _0x3b5cbf,_0x726dcf;try{[_0x3b5cbf,_0x726dcf]=await Promise[_0x3fe894(0x2c7)]([_0xbf5997[_0x3fe894(0x27b)][_0x3fe894(0x34e)](_0x467553),_0xbf5997['workflow'][_0x3fe894(0x228)](_0x467553,![])]);}catch(_0x4747ac){console[_0x3fe894(0x2f0)](a60_0x529429[_0x3fe894(0x30f)](_0x3fe894(0x2a1)));_0x3ada92['verbose']&&console[_0x3fe894(0x2f0)](_0x4747ac);throw _0x4747ac;}if(_0x3ada92[_0x3fe894(0x22d)]||_0x3ada92[_0x3fe894(0x195)]){const _0x4e9d3b=this['buildTimelineData'](_0x3b5cbf,_0x726dcf);await handleSDKOutput([_0x4e9d3b],_0x3ada92);return;}const _0x1c9fbe=_0xbf5997[_0x3fe894(0x286)][_0x3fe894(0x1ba)],_0xa88ed9=this[_0x3fe894(0x24e)](_0x3b5cbf,_0x726dcf,_0x1c9fbe);console['log'](_0xa88ed9);}async[a60_0x536582(0x261)](_0x6d5b15,_0x1e5d6e){const _0x1d2ec0=a60_0x536582,{tdx:_0x580062}=_0x6d5b15,_0x53a3bc=TIMELINE_CONFIG[_0x1d2ec0(0x30d)],_0x157fa0=TIMELINE_CONFIG[_0x1d2ec0(0x222)];let _0x818827=0x0;while(_0x818827<_0x157fa0){process[_0x1d2ec0(0x229)][_0x1d2ec0(0x335)]&&process[_0x1d2ec0(0x229)][_0x1d2ec0(0x2a0)]('\x1Bc');let _0x47e1e5,_0x1ec978;try{[_0x47e1e5,_0x1ec978]=await Promise['all']([_0x580062[_0x1d2ec0(0x27b)][_0x1d2ec0(0x34e)](_0x1e5d6e),_0x580062[_0x1d2ec0(0x27b)][_0x1d2ec0(0x228)](_0x1e5d6e,![])]);}catch(_0x679e78){console[_0x1d2ec0(0x2f0)](a60_0x529429[_0x1d2ec0(0x30f)](_0x1d2ec0(0x193)));_0x818827>0x0&&console[_0x1d2ec0(0x2f0)](a60_0x529429[_0x1d2ec0(0x1d7)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0x818827));throw _0x679e78;}const _0x21ad52=_0x580062[_0x1d2ec0(0x286)][_0x1d2ec0(0x1ba)],_0x114568=this[_0x1d2ec0(0x24e)](_0x47e1e5,_0x1ec978,_0x21ad52);console['log'](_0x114568);const _0x3ccdf9=_0x47e1e5['done']&&_0x1ec978[_0x1d2ec0(0x299)](_0x4bdff3=>_0x4bdff3[_0x1d2ec0(0x2f6)]!==_0x1d2ec0(0x1db)&&_0x4bdff3[_0x1d2ec0(0x2f6)]!==_0x1d2ec0(0x1c3));if(_0x3ccdf9){console[_0x1d2ec0(0x2f0)](a60_0x529429[_0x1d2ec0(0x1c1)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x1d2ec0(0x2f0)](a60_0x529429[_0x1d2ec0(0x1d7)]('\x0aPolling...\x20('+_0x818827*0x2+_0x1d2ec0(0x341))),await new Promise(_0x4cbcec=>setTimeout(_0x4cbcec,_0x53a3bc)),_0x818827++;}_0x818827>=_0x157fa0&&console[_0x1d2ec0(0x2f0)](a60_0x529429[_0x1d2ec0(0x2dc)]('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}['renderTimeline'](_0x5a53fb,_0xc999a5,_0x58f0bb){const _0x4a4394=a60_0x536582,_0x59c225=[],_0x45cb10=TIMELINE_CONFIG[_0x4a4394(0x291)],_0x6e74d6=0x5,_0x3d7ca8=process[_0x4a4394(0x229)]['columns']||0x78,_0x2f6e19=_0x3d7ca8-_0x45cb10-_0x6e74d6,_0x5be50f=Math[_0x4a4394(0x2a8)](TIMELINE_CONFIG[_0x4a4394(0x1a9)],Math[_0x4a4394(0x2d2)](_0x2f6e19,TIMELINE_CONFIG[_0x4a4394(0x27d)])),_0x4c36d5=new Date(_0x5a53fb[_0x4a4394(0x1bc)])[_0x4a4394(0x236)](),_0x4cf8b2=_0x5a53fb[_0x4a4394(0x2f1)]?new Date(_0x5a53fb['finishedAt'])[_0x4a4394(0x236)]():Date[_0x4a4394(0x19b)](),_0x20bc13={'start':_0x4c36d5,'end':_0x4cf8b2,'duration':_0x4cf8b2-_0x4c36d5},_0x346d60=new Map(),_0x30ffef=[];for(const _0x4c3db5 of _0xc999a5){if(_0x4c3db5[_0x4a4394(0x24a)]){const _0x336d73=new Date(_0x4c3db5['startedAt'])[_0x4a4394(0x236)](),_0x3d5075=_0x4c3db5[_0x4a4394(0x1ac)]?new Date(_0x4c3db5['updatedAt'])[_0x4a4394(0x236)]():Date[_0x4a4394(0x19b)](),_0xa7dd1b={'start':_0x336d73,'end':_0x3d5075,'duration':_0x3d5075-_0x336d73};_0x346d60['set'](_0x4c3db5['id'],_0xa7dd1b),_0x30ffef[_0x4a4394(0x18f)]({'name':_0x4c3db5[_0x4a4394(0x20b)],'state':_0x4c3db5[_0x4a4394(0x2f6)]||_0x4a4394(0x2a4),'window':_0xa7dd1b});}else _0x30ffef[_0x4a4394(0x18f)]({'name':_0x4c3db5['fullName'],'state':_0x4c3db5['state']||_0x4a4394(0x1c3),'window':undefined});}_0x30ffef[_0x4a4394(0x259)]((_0x10eb9a,_0x3b4aa2)=>{const _0x376f0f=_0x4a4394;if(!_0x10eb9a['window'])return 0x1;if(!_0x3b4aa2[_0x376f0f(0x1ee)])return-0x1;return _0x10eb9a['window']['start']-_0x3b4aa2['window'][_0x376f0f(0x197)];});const _0x1fa38e=_0x30ffef[_0x4a4394(0x330)],_0x47f9d0=_0x1fa38e>TIMELINE_CONFIG[_0x4a4394(0x1b3)];_0x47f9d0&&_0x30ffef['splice'](TIMELINE_CONFIG[_0x4a4394(0x1b3)]);const _0x38f371=calculateTimeScale(_0x20bc13,_0x5be50f),_0x7230a0=_0x5a53fb[_0x4a4394(0x1d2)]?_0x5a53fb[_0x4a4394(0x219)]?a60_0x529429['green']('success'):a60_0x529429[_0x4a4394(0x30f)](_0x4a4394(0x2f0)):a60_0x529429['blue'](_0x4a4394(0x1db)),_0x295144=_0x5a53fb['project']?.['id'],_0x86b5cf=_0x5a53fb[_0x4a4394(0x26e)];let _0x200264;if(_0x295144&&_0x86b5cf){const _0x4682ea=getWorkflowAttemptUrl(_0x58f0bb,_0x295144,_0x86b5cf,_0x5a53fb['id']);_0x200264=hyperlink(a60_0x529429[_0x4a4394(0x1d7)](_0x5a53fb['id']),_0x4682ea);}else _0x200264=a60_0x529429[_0x4a4394(0x1d7)](_0x5a53fb['id']);_0x59c225['push'](_0x4a4394(0x2ca)+_0x200264+_0x4a4394(0x265)+_0x7230a0+_0x4a4394(0x265)+formatElapsed(_0x20bc13['duration']));if(_0x30ffef[_0x4a4394(0x330)]>0x0){const _0x19744b=renderTimeAxis(_0x38f371,_0x5be50f),_0x47a5b5=new Date(_0x20bc13['start']),_0x2998b0=formatDate(_0x47a5b5),_0x170d01=TIMELINE_CONFIG[_0x4a4394(0x28c)]+TIMELINE_CONFIG[_0x4a4394(0x1b9)]+_0x45cb10,_0x12ecc3=_0x2998b0[_0x4a4394(0x2de)](_0x170d01),_0x5b4371=a60_0x529429[_0x4a4394(0x1d7)](_0x12ecc3);_0x59c225['push'](_0x5b4371+'\x20'+_0x19744b);for(const _0x2b327d of _0x30ffef){_0x59c225[_0x4a4394(0x18f)](renderTaskRow(_0x2b327d,_0x38f371,_0x5be50f,_0x45cb10));}const _0x23de06=calculateStats(_0x30ffef);_0x59c225[_0x4a4394(0x18f)](formatStats(_0x23de06)),_0x47f9d0&&_0x59c225[_0x4a4394(0x18f)](a60_0x529429[_0x4a4394(0x2dc)](_0x4a4394(0x2d3)+TIMELINE_CONFIG['MAX_TASKS_DISPLAY']+_0x4a4394(0x200)+_0x1fa38e+_0x4a4394(0x25f))),_0x59c225[_0x4a4394(0x18f)](''),_0x59c225[_0x4a4394(0x18f)](a60_0x529429['dim'](_0x4a4394(0x311))+(_0x4a4394(0x331)+_0x5a53fb['id']+_0x4a4394(0x346))+a60_0x529429[_0x4a4394(0x1d7)](_0x4a4394(0x20d)));}else _0x59c225['push'](_0x4a4394(0x33a));return _0x59c225[_0x4a4394(0x1c7)]('\x0a');}['buildTimelineData'](_0x40c554,_0x31d380){const _0x118272=a60_0x536582,_0x269c2b=new Date(_0x40c554[_0x118272(0x1bc)])[_0x118272(0x236)](),_0x433894=_0x40c554[_0x118272(0x2f1)]?new Date(_0x40c554[_0x118272(0x2f1)])[_0x118272(0x236)]():Date['now'](),_0x18736e=_0x433894-_0x269c2b,_0x4a11b8=[];for(const _0x9b6925 of _0x31d380){if(_0x9b6925[_0x118272(0x24a)]){const _0x1c0a8f=new Date(_0x9b6925[_0x118272(0x24a)])[_0x118272(0x236)](),_0x3cb554=_0x9b6925['updatedAt']?new Date(_0x9b6925[_0x118272(0x1ac)])[_0x118272(0x236)]():Date[_0x118272(0x19b)]();_0x4a11b8[_0x118272(0x18f)]({'name':_0x9b6925[_0x118272(0x20b)],'state':_0x9b6925['state']||_0x118272(0x2a4),'window':{'start':_0x1c0a8f,'end':_0x3cb554,'duration':_0x3cb554-_0x1c0a8f}});}else _0x4a11b8[_0x118272(0x18f)]({'name':_0x9b6925[_0x118272(0x20b)],'state':_0x9b6925[_0x118272(0x2f6)]||_0x118272(0x1c3),'window':undefined});}const _0x21a47a=calculateStats(_0x4a11b8);return{'attempt':{'id':_0x40c554['id'],'status':_0x40c554[_0x118272(0x1d2)]?_0x40c554[_0x118272(0x219)]?_0x118272(0x219):_0x118272(0x2f0):_0x118272(0x1db),'createdAt':_0x40c554['createdAt'],'finishedAt':_0x40c554[_0x118272(0x2f1)],'duration_ms':_0x18736e},'tasks':_0x4a11b8[_0x118272(0x338)](_0x327799=>({'name':_0x327799[_0x118272(0x1b1)],'state':_0x327799[_0x118272(0x2f6)],'startedAt':_0x327799[_0x118272(0x1ee)]?new Date(_0x327799['window'][_0x118272(0x197)])[_0x118272(0x1d1)]():null,'updatedAt':_0x327799[_0x118272(0x1ee)]?new Date(_0x327799[_0x118272(0x1ee)][_0x118272(0x31a)])[_0x118272(0x1d1)]():null,'duration_ms':_0x327799['window']?.['duration']||null})),'stats':_0x21a47a};}}function formatScheduleLine(_0x115c6e){const _0x243457=a60_0x536582,_0x3f2dae=_0x115c6e[_0x243457(0x188)]?a60_0x529429[_0x243457(0x2dc)](_0x243457(0x201)):'',_0x38b5bc=_0x115c6e[_0x243457(0x32f)]?.[_0x243457(0x1b1)]?a60_0x529429['dim']('\x20['+_0x115c6e[_0x243457(0x32f)][_0x243457(0x1b1)]+']'):'',_0x1e53af=_0x115c6e['nextRunTime']?a60_0x529429[_0x243457(0x1d7)](_0x243457(0x310)+new Date(_0x115c6e['nextRunTime'])[_0x243457(0x278)]()):'';return _0x243457(0x332)+_0x115c6e['id']+'\x20'+(_0x115c6e[_0x243457(0x27b)]?.[_0x243457(0x1b1)]||_0x243457(0x2bd))+_0x38b5bc+_0x3f2dae+_0x1e53af;}function a60_0x40f9(_0x48a898,_0x16f852){_0x48a898=_0x48a898-0x181;const _0x1bb78a=a60_0x1bb7();let _0x40f949=_0x1bb78a[_0x48a898];return _0x40f949;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{['name']=a60_0x536582(0x343);['description']=a60_0x536582(0x205);async[a60_0x536582(0x34d)](_0x3b7ae7){const _0x31af7b=a60_0x536582,{options:_0x1f5bf2,args:_0x33e25f,tdx:_0x4da926}=_0x3b7ae7,{scheduleId:_0x19dfcd}=_0x1f5bf2;if(_0x19dfcd&&_0x33e25f[0x0])return console[_0x31af7b(0x2f0)](a60_0x529429['red']('Error:'),_0x31af7b(0x217)),console['error'](a60_0x529429[_0x31af7b(0x1d7)](_0x31af7b(0x268))),0x1;if(_0x19dfcd){const _0x4b8b61=await withSpinner('Fetching\x20schedule\x20#'+_0x19dfcd+_0x31af7b(0x2eb),()=>_0x4da926['workflow'][_0x31af7b(0x273)](_0x19dfcd),{'verbose':_0x1f5bf2[_0x31af7b(0x319)]}),_0x4176e3=_0x4b8b61[_0x31af7b(0x285)];return isStructuredFormat(_0x1f5bf2)?await handleSingleObjectOutput(_0x4176e3,_0x1f5bf2):(console[_0x31af7b(0x2f0)](_0x31af7b(0x280)),console[_0x31af7b(0x2d7)](formatScheduleLine(_0x4176e3))),0x0;}const _0x282d93=this[_0x31af7b(0x2d4)](_0x33e25f,_0x1f5bf2);if(!_0x282d93)return 0x1;const {projectName:_0x3d705a,workflowName:_0x37c748}=_0x282d93,_0x316084=_0x3d705a?'\x27'+_0x3d705a+(_0x37c748?'.'+_0x37c748:'')+'\x27':undefined,_0x35a715=await withSpinner(_0x316084?'Listing\x20schedules\x20for\x20'+_0x316084+_0x31af7b(0x2eb):_0x31af7b(0x290),()=>_0x3d705a?_0x4da926[_0x31af7b(0x27b)]['listProjectSchedules'](_0x3d705a,{'workflow':_0x37c748,'limit':_0x1f5bf2[_0x31af7b(0x199)]}):_0x4da926[_0x31af7b(0x27b)]['listSchedules']({'limit':_0x1f5bf2['limit']}),{'verbose':_0x1f5bf2[_0x31af7b(0x319)]}),_0x50daae=_0x35a715[_0x31af7b(0x285)],_0x3d25f6=_0x1f5bf2['limit']&&_0x50daae[_0x31af7b(0x330)]>=_0x1f5bf2[_0x31af7b(0x199)]?a60_0x529429[_0x31af7b(0x1d7)](_0x31af7b(0x1d5)):'';console[_0x31af7b(0x2f0)](_0x31af7b(0x2a6)+_0x50daae[_0x31af7b(0x330)]+'\x20schedule'+(_0x50daae[_0x31af7b(0x330)]!==0x1?'s':'')+_0x3d25f6);if(isStructuredFormat(_0x1f5bf2))await handleSDKOutput(_0x50daae,_0x1f5bf2);else{if(_0x50daae[_0x31af7b(0x330)]===0x0)console[_0x31af7b(0x2d7)](_0x31af7b(0x2ba));else for(const _0x4af37d of _0x50daae){console[_0x31af7b(0x2d7)](formatScheduleLine(_0x4af37d));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{['name']=a60_0x536582(0x1e6);[a60_0x536582(0x28b)]=a60_0x536582(0x1e2);async[a60_0x536582(0x34d)](_0x411c91){const _0x50a2c8=a60_0x536582,{options:_0x508ed8,args:_0x31ba86,tdx:_0x5e6ca6}=_0x411c91,_0x1d3d39=_0x31ba86[0x0];if(!_0x1d3d39)return console[_0x50a2c8(0x2f0)](a60_0x529429[_0x50a2c8(0x30f)]('Error:'),'Schedule\x20ID\x20is\x20required'),console[_0x50a2c8(0x2f0)](a60_0x529429[_0x50a2c8(0x1d7)]('Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>')),console[_0x50a2c8(0x2f0)](a60_0x529429[_0x50a2c8(0x1d7)](_0x50a2c8(0x2c2))),0x1;const {backfill:_0x3d2e4f,nextTime:_0x4da210}=_0x508ed8,_0x30e92a={};if(_0x3d2e4f!==undefined)_0x30e92a[_0x50a2c8(0x325)]=!_0x3d2e4f;if(_0x4da210!==undefined)_0x30e92a['nextTime']=_0x4da210;const _0x2e43dc=await withSpinner('Enabling\x20schedule\x20#'+_0x1d3d39+'...',()=>_0x5e6ca6[_0x50a2c8(0x27b)][_0x50a2c8(0x336)](_0x1d3d39,_0x30e92a),{'verbose':_0x508ed8[_0x50a2c8(0x319)]}),_0x548b5e=_0x2e43dc[_0x50a2c8(0x285)];return isStructuredFormat(_0x508ed8)?await handleSingleObjectOutput(_0x548b5e,_0x508ed8):(console[_0x50a2c8(0x2d7)](_0x50a2c8(0x1f6)+_0x1d3d39+'\x20enabled\x20('+(_0x548b5e[_0x50a2c8(0x27b)]?.[_0x50a2c8(0x1b1)]||_0x50a2c8(0x2a4))+')'),_0x548b5e['nextRunTime']&&console[_0x50a2c8(0x2d7)](a60_0x529429[_0x50a2c8(0x1d7)](_0x50a2c8(0x1ad)+new Date(_0x548b5e[_0x50a2c8(0x2fb)])[_0x50a2c8(0x278)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']='workflow:schedule:disable';['description']=a60_0x536582(0x1f8);async[a60_0x536582(0x34d)](_0x53c856){const _0x482c5d=a60_0x536582,{options:_0x323d82,args:_0x17b4ed,tdx:_0x2649b2}=_0x53c856,_0x16dbcf=_0x17b4ed[0x0];if(!_0x16dbcf)return console[_0x482c5d(0x2f0)](a60_0x529429[_0x482c5d(0x30f)](_0x482c5d(0x1f7)),_0x482c5d(0x342)),console[_0x482c5d(0x2f0)](a60_0x529429['dim'](_0x482c5d(0x187))),console['error'](a60_0x529429[_0x482c5d(0x1d7)](_0x482c5d(0x2c2))),0x1;const _0x3a0567=await withSpinner(_0x482c5d(0x1c2)+_0x16dbcf+_0x482c5d(0x2eb),()=>_0x2649b2[_0x482c5d(0x27b)]['disableSchedule'](_0x16dbcf),{'verbose':_0x323d82[_0x482c5d(0x319)]}),_0x4bba54=_0x3a0567[_0x482c5d(0x285)];return isStructuredFormat(_0x323d82)?await handleSingleObjectOutput(_0x4bba54,_0x323d82):console[_0x482c5d(0x2d7)](_0x482c5d(0x1f6)+_0x16dbcf+_0x482c5d(0x1a8)+(_0x4bba54['workflow']?.[_0x482c5d(0x1b1)]||_0x482c5d(0x2a4))+')'),0x0;}}
1
+ const a61_0x50f5d8=a61_0x4c48;(function(_0x7387a5,_0x3434c){const _0x45cf50=a61_0x4c48,_0xd70505=_0x7387a5();while(!![]){try{const _0x5285e4=-parseInt(_0x45cf50(0x2c0))/0x1+-parseInt(_0x45cf50(0x2dd))/0x2*(-parseInt(_0x45cf50(0x259))/0x3)+-parseInt(_0x45cf50(0x1d8))/0x4*(parseInt(_0x45cf50(0x1d1))/0x5)+-parseInt(_0x45cf50(0x1a3))/0x6*(-parseInt(_0x45cf50(0x25e))/0x7)+-parseInt(_0x45cf50(0x24b))/0x8*(-parseInt(_0x45cf50(0x1aa))/0x9)+-parseInt(_0x45cf50(0x249))/0xa+parseInt(_0x45cf50(0x23f))/0xb;if(_0x5285e4===_0x3434c)break;else _0xd70505['push'](_0xd70505['shift']());}catch(_0x25c29d){_0xd70505['push'](_0xd70505['shift']());}}}(a61_0x2c43,0x857c3));import a61_0x511749 from'chalk';import{existsSync}from'fs';function a61_0x4c48(_0x29503a,_0x5d51d6){_0x29503a=_0x29503a-0x1a1;const _0x2c4397=a61_0x2c43();let _0x4c48fc=_0x2c4397[_0x29503a];return _0x4c48fc;}import a61_0x2bb0f7 from'path';function a61_0x2c43(){const _0x5b0608=['8lvjfOH','workflow:attempts','lastAttempt','Usage:\x20workflow:delete\x20<project-name-or-id>','Loading\x20sessions...','List\x20workflow\x20attempts','\x20\x20Workflow:\x20','clear','Resume\x20from:\x20','verbose','state','name','revision','\x20secret','3PwFtvV','retrySession','Dry\x20run:\x20yes','✔\x20Secret\x20\x27','retryAttempt','7CZQeuF','select','Project:\x20','Schedule\x20ID\x20is\x20required','trim','sourceProjectName','join','resolveProjectDir','\x20new','\x22\x20already\x20exists\x20(ID:\x20','localeCompare','workflow:tasks','No\x20workflows\x20found\x20in\x20project:\x20','No\x20attempts\x20found\x20for:\x20','✔\x20Deleted\x20project\x20','attempt','Listing\x20workflow\x20sessions...','every','param','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','targetExists','modified','List\x20workflows','changes','Attempt\x20ID:\x20','substring','→\x20Project:\x20','green','min','\x20sessions\x20','fs/promises','Error:\x20Project\x20name\x20is\x20required','Project\x20name\x20is\x20required','No\x20log\x20content\x20found','workflow:push','deleted','path','workflowName','GUTTER','Pull\x20workflow\x20project\x20to\x20local\x20folder','workflow:clone','pullProject','Getting\x20attempt\x20details...','startsWith','workflow:projects','diff','\x20\x20tdx\x20wf\x20use\x20<project>','📅\x20#','→\x20New\x20project:\x20','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','logs','✔\x20Project\x20updated','New\x20project\x20name:\x20','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','workflow:secrets:set','Source\x20project:\x20','✔\x20Found\x20','Source\x20directory:\x20','Analyzing\x20project...','🔄\x20','\x20\x20Source:\x20','done','-\x20nothing\x20pushed','Listing\x20schedules\x20for\x20','\x20to\x20see\x20detailed\x20logs','unchanged','resolve','Starting\x20workflow\x20run...','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','start','\x20deleted','⚠\x20Showing\x20first\x20','cwd','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','\x20schedule','\x20\x20Project:\x20','workflow:pull','Listing\x20secrets...','\x20enabled\x20(','status','workflow:secrets:list','retryAttemptName','Pushing\x20workflow\x20project...','error','\x20\x20Changes:\x20','\x27\x20from\x20project\x20\x27','index','\x20\x20Location:\x20','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','renderSessionsTimeline','getWorkflow','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','padStart','\x0aDry\x20run\x20-\x20no\x20project\x20created','log','split','📁\x20','496777LfHyDD','✔\x20Push\x20complete','Files\x20to\x20upload:\x20','List\x20workflow\x20schedules','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','Project\x20name:\x20','filter','No\x20sessions\x20with\x20timing\x20information','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Pattern:\x20','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','listSecrets','message','utf-8','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','---\x20','\x20-\x20','format','text','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow:download','Listing\x20workflow\x20attempts...','relative','run','LABEL_MIN_SPACING','sessionTime','No\x20workflow\x20projects\x20found','✔\x20Downloaded\x20','996452gMGMpe','\x20of\x20','startTime','map','from','Project\x20filter:\x20','✔\x20Workflow\x20project\x20set\x20to:\x20','Retrying\x20attempt...','params','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','cancelRequested','Updating\x20','set','From\x20task:\x20','Show\x20tasks\x20for\x20an\x20attempt','skipValidation','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Params:\x20','workflow:kill','match','Filter:\x20','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','filesExtracted','table','workflow:schedule:disable','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','round','prepareCloneProject','context','success','sessions','\x0a⚠\x20Project\x20\x22','Start\x20a\x20workflow\x20run','(unknown)','project','\x0a✔\x20No\x20changes\x20to\x20push','parseProjectWorkflowPattern','now','List\x20workflow\x20execution\x20sessions','✔\x20Pushed\x20','dim','Analyzing\x20changes...','Warning:','sort','floor','\x1b[1A\x1b[2K','getDate','length','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','sourceDir','getHours','renderSingleTimeline','\x20modified','\x0aClone\x20\x22','new','Total:\x20','Filter:\x20project=','type','\x20(disabled)','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','reason','Show\x20specific\x20attempt\x20details','deleteSecret','getFullYear','showWorkflowConsoleUrl','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','newProjectName','pending','LABEL_WIDTH_DIVISOR','generateSessionTimelineRows','\x20\x20Project\x20ID:\x20','group_error',',\x20Workflow:\x20','find','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','No\x20matching\x20sessions\x20found','size','setSecrets','session','data','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x0aError:','workflow:schedules','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Download\x20workflow\x20project\x20from\x20Treasure\x20AI','logFiles','pollTimeline','Status:\x20','workflow:use','Secrets\x20to\x20set:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','/sessions/','has','toLowerCase','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','💡\x20Tip:\x20Use\x20','buildTimelineData','Revision:\x20','\x20\x20Next\x20run:\x20','Loading\x20session...','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','Fetching\x20schedule\x20#','projects','Session\x20','red','\x22\x20with\x20new\x20revision?','skipSchedule','summary','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','metadata','✔\x20Clone\x20complete','workflow:logs','targetDir','✔\x20Pull\x20complete','isDirectory','createdAt','navigateSessionsInteractive','attempt:','Key:\x20','toISOString','Delete\x20workflow\x20project\x20from\x20Treasure\x20AI','fileCount','session_id','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Source:\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x27...','📋\x20','\x20(system)','durationMs','\x20logs','stdout','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Fetching\x20log\x20files...','\x20\x20Attempt\x20ID:\x20','execute','Reason:\x20','duration','resumeFrom','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Error:\x20','MAX_TASKS_DISPLAY','Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','No\x20sessions\x20found','\x0aUpdate\x20existing\x20project\x20\x22','getTime','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Cancelled','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','Error:\x20Attempt\x20ID\x20is\x20required','readFile','revision:\x20','Disabling\x20schedule\x20#','Killing\x20attempt...','\x20attempt','resolveProject','max','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','No\x20attempts\x20found','No\x20schedules\x20found','Latest\x20session\x20has\x20no\x20attempt','replace','write','executeDryRun','workflow:timeline','431286mCmoBq','workflow','stringify','Include\x20retried:\x20yes','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(use\x20--limit\x20to\x20show\x20more)','workflow:upload','8300835xpJfLo','delete','No\x20projects\x20match\x20pattern:\x20','✔\x20Schedule\x20#','repeat','basename','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','renderTimeline','\x20session','jsonl','Error:','enableSchedule','\x20unchanged','MAX_POLL_ITERATIONS','Listing\x20schedules...','values','download','attemptId','Session\x20time:','✔\x20Workflow\x20run\x20started','key','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','preparePushProject','Enabling\x20schedule\x20#','(use\x20--limit\x20to\x20see\x20more)','nextRunTime','get','yes','MIN_LABEL_COUNT','applyPullProject','No\x20workflows\x20found','Cloning\x20to\x20','dryRun','Writing\x20files...','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','ICON_SPACING','total','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','5AAlOvF','Enable\x20a\x20workflow\x20schedule','all','columns','Invalid\x20format:\x20','description','fullName','2973964FMfXtG','some','list','tdx\x20wf\x20attempt\x20','\x20\x20Target:\x20','sys','\x22?\x20This\x20cannot\x20be\x20undone.','updatedAt','site','projectName','Retrying\x20session...','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','isTTY','\x0aApply\x20these\x20changes?','-\x20no\x20files\x20written','workflowProject','executePushProject','indexOf','getMonth','No\x20sessions\x20found\x20in\x20project:\x20','includeSubtasks','\x20tasks','No\x20sessions\x20found\x20for:\x20','\x20\x20Session\x20context\x20set\x20to:\x20','resolveProjectId','window','Expected\x20format:\x20--param\x20key=value','json','Session\x20not\x20found:\x20','Error:\x20Secret\x20key\x20is\x20required','unknown','\x0aDry\x20run\x20-\x20no\x20files\x20written','✔\x20Workflow\x20project\x20context\x20cleared.','blue','✔\x20Schedule\x20found','finishedAt','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Using\x20attempt\x20','disableSchedule','...','cyan','workflow:sessions','end','attempts','bold','limit','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','tasks','slice','Downloading\x20project\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','MAX_TIMELINE_WIDTH','\x0aDry\x20run\x20-\x20nothing\x20pushed','Loading\x20workflows...','keys','Getting\x20attempt\x20tasks...','\x20\x20Revision:\x20','workflow:schedule:enable','POLL_INTERVAL_MS','Error:\x20Invalid\x20JSON\x20in\x20--params','✔\x20Showing\x20','projectId','List\x20all\x20workflow\x20projects','follow','requireProject','\x0aPush\x20these\x20changes?','parse','ICON_WIDTH','Failed\x20to\x20fetch\x20attempt\x20data','Parameters:','Select\x20a\x20task\x20to\x20view\x20logs:','Auto-selected\x20latest\x20session:\x20','Validation:\x20skipped','yellow','running','isNewProject','workflow:retry','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','taskName','startedAt','Setting\x20secret...','workflows','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','fileSize','autocomplete','sessionId','Setting\x20','kill','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','Session\x20time:\x20','toLocaleString','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','Tip:\x20cd\x20to\x20workflows/','\x20next:\x20','getMinutes','\x20\x20Console:\x20','Select\x20a\x20session\x20to\x20view\x20timeline:','Deleting\x20secret...','output','/attempt/','canceling','listProjectSchedules','5813412kEkkGD','Downloading\x20logs...','No\x20workflow\x20sessions\x20found','task','hasChanges','Retry\x20a\x20session\x20or\x20attempt','\x22\x20to\x20new\x20project\x20\x22','push','workflow:attempt','session:','2338910IoBUxa','includes'];a61_0x2c43=function(){return _0x5b0608;};return a61_0x2c43();}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 a61_0x4181bb from'prompts';function getAttemptStatusDisplay(_0x1f8e71){const _0x49ad50=a61_0x4c48;if(!_0x1f8e71)return{'icon':'⏳','text':''};const {done:_0x3384f3,success:_0x3ace2c,cancelRequested:_0x135415}=_0x1f8e71;if(!_0x3384f3)return _0x135415?{'icon':'🛑','text':a61_0x511749[_0x49ad50(0x222)](_0x49ad50(0x23d))}:{'icon':'🔄','text':a61_0x511749[_0x49ad50(0x1fa)](_0x49ad50(0x223))};if(_0x3ace2c)return{'icon':'✅','text':a61_0x511749[_0x49ad50(0x27a)]('success')};return{'icon':'❌','text':a61_0x511749[_0x49ad50(0x345)](_0x49ad50(0x2b2))};}export class WorkflowBaseCommand extends BaseCommand{[a61_0x50f5d8(0x379)](_0x5a2aa7,_0x795e4a,_0x31d3f6=0x0){const _0x550f42=a61_0x50f5d8;return _0x5a2aa7[_0x31d3f6]||_0x795e4a[_0x550f42(0x1e8)];}['requireProject'](_0x1109b3,_0x1a8e65,_0x24941a=0x0){const _0x272b49=a61_0x50f5d8,_0xfd469=this[_0x272b49(0x379)](_0x1109b3,_0x1a8e65,_0x24941a);if(!_0xfd469)return console[_0x272b49(0x2b2)](a61_0x511749[_0x272b49(0x345)](_0x272b49(0x1b4)),_0x272b49(0x27f)),console[_0x272b49(0x2b2)](a61_0x511749[_0x272b49(0x305)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0xfd469;}[a61_0x50f5d8(0x301)](_0x1357b5,_0x322905){const _0x2d0e28=a61_0x50f5d8;if(_0x1357b5[0x0]){const _0x1b703b=_0x1357b5[0x0][_0x2d0e28(0x2be)]('.');if(_0x1b703b[_0x2d0e28(0x30c)]===0x1)return{'projectName':_0x1b703b[0x0],'workflowName':undefined};else return _0x1b703b['length']===0x2?{'projectName':_0x1b703b[0x0],'workflowName':_0x1b703b[0x1]}:(console[_0x2d0e28(0x2b2)](a61_0x511749[_0x2d0e28(0x345)](_0x2d0e28(0x1b4)),_0x2d0e28(0x362)),null);}return{'projectName':_0x322905['workflowProject'],'workflowName':undefined};}[a61_0x50f5d8(0x265)](_0xb28c18,_0x168369,_0x54a790=0x0){const _0x2c5d8f=a61_0x50f5d8;if(_0xb28c18[_0x54a790])return _0xb28c18[_0x54a790];if(_0x168369[_0x2c5d8f(0x1e8)]){const _0x5443a3=a61_0x2bb0f7[_0x2c5d8f(0x264)](process[_0x2c5d8f(0x2a7)](),_0x2c5d8f(0x22a),_0x168369['workflowProject']);if(existsSync(a61_0x2bb0f7[_0x2c5d8f(0x264)](_0x5443a3,'tdx.json')))return _0x5443a3;}return undefined;}async[a61_0x50f5d8(0x31d)](_0x41a29f,_0xafa299,_0xc300d3){const _0x1c38a3=a61_0x50f5d8;try{const _0x4793a7=await _0x41a29f[_0x1c38a3(0x1a4)][_0x1c38a3(0x22a)](_0xafa299,{'limit':0x1});if(_0x4793a7[_0x1c38a3(0x30c)]>0x0){const _0x1d5a8a=_0x4793a7[0x0]['id'],_0x152265=getWorkflowUrl(_0xc300d3,_0x1d5a8a);console['error'](_0x1c38a3(0x238)+a61_0x511749[_0x1c38a3(0x201)](_0x152265));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x335);['description']=a61_0x50f5d8(0x2ce);async['execute'](_0x53da7c){const _0xbe1bc3=a61_0x50f5d8,{options:_0x7a8f32,args:_0x307741,tdx:_0x309d5c}=_0x53da7c,_0x3597b0=_0x307741[0x0],_0x2debd2=_0x7a8f32[_0xbe1bc3(0x252)];if(_0x2debd2)return saveSessionContext({'workflow_project':undefined},_0x7a8f32['session']),console['log'](a61_0x511749[_0xbe1bc3(0x27a)](_0xbe1bc3(0x1f9))),0x0;if(!_0x3597b0)return console[_0xbe1bc3(0x2b2)](a61_0x511749[_0xbe1bc3(0x345)]('Error:'),_0xbe1bc3(0x27f)),console[_0xbe1bc3(0x2b2)](a61_0x511749[_0xbe1bc3(0x305)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0xbe1bc3(0x2b2)](a61_0x511749['dim'](_0xbe1bc3(0x1e4))),0x1;const _0x2b26e4=await withSpinner('Resolving\x20project\x20\x27'+_0x3597b0+_0xbe1bc3(0x35c),()=>_0x309d5c[_0xbe1bc3(0x1a4)][_0xbe1bc3(0x1f1)](_0x3597b0),{'verbose':_0x7a8f32['verbose']}),{name:_0x3e6576}=_0x2b26e4[_0xbe1bc3(0x32c)];return saveSessionContext({'workflow_project':_0x3e6576},_0x7a8f32[_0xbe1bc3(0x32b)]),console[_0xbe1bc3(0x2bd)](a61_0x511749[_0xbe1bc3(0x27a)](_0xbe1bc3(0x2e3)+a61_0x511749[_0xbe1bc3(0x201)](_0x3e6576))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x28b);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x217);async[a61_0x50f5d8(0x365)](_0x2f94b3){const _0x25c761=a61_0x50f5d8,{options:_0x5885ff,args:_0x294930,tdx:_0x47b30f}=_0x2f94b3,_0x4d9ed7=_0x294930[0x0];_0x5885ff['verbose']&&_0x4d9ed7&&console[_0x25c761(0x2b2)](_0x25c761(0x2c9)+_0x4d9ed7);const _0x1ac764=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x47b30f[_0x25c761(0x1a4)][_0x25c761(0x343)](_0x4d9ed7,{'limit':_0x5885ff['limit']}),{'verbose':_0x5885ff[_0x25c761(0x254)]});let _0x1a2c4e=_0x1ac764[_0x25c761(0x32c)];_0x1a2c4e[_0x25c761(0x308)]((_0x37c08e,_0x1511b1)=>_0x37c08e[_0x25c761(0x256)][_0x25c761(0x268)](_0x1511b1[_0x25c761(0x256)]));const _0x459afa=_0x5885ff[_0x25c761(0x206)]&&_0x1a2c4e[_0x25c761(0x30c)]>=_0x5885ff['limit']?a61_0x511749[_0x25c761(0x305)](_0x25c761(0x1a8)):'';console[_0x25c761(0x2b2)](_0x25c761(0x297)+_0x1a2c4e[_0x25c761(0x30c)]+'\x20project'+(_0x1a2c4e[_0x25c761(0x30c)]!==0x1?'s':'')+_0x459afa);if(_0x5885ff['format']===_0x25c761(0x1f4)||_0x5885ff[_0x25c761(0x2d1)]===_0x25c761(0x1b3)||_0x5885ff[_0x25c761(0x2d1)]==='table')await handleSDKOutput(_0x1a2c4e,_0x5885ff);else{if(_0x1a2c4e['length']===0x0)_0x4d9ed7?console['log'](_0x25c761(0x1ac)+_0x4d9ed7):console[_0x25c761(0x2bd)](_0x25c761(0x2db));else{const _0xb3e406=_0x1a2c4e[_0x25c761(0x2e0)](_0x3bbd2d=>{const _0x2c45a3=_0x25c761,_0xa35b3=_0x3bbd2d[_0x2c45a3(0x34a)]?.[_0x2c45a3(0x1d9)](_0x573b49=>_0x573b49[_0x2c45a3(0x1be)]===_0x2c45a3(0x1dd)),_0x460176=_0xa35b3?a61_0x511749[_0x2c45a3(0x305)](_0x2c45a3(0x35e)):'';return _0x2c45a3(0x2bf)+_0x3bbd2d['name']+_0x460176;});await writeOutput(_0xb3e406['join']('\x0a'),_0x5885ff[_0x25c761(0x23b)],_0x25c761(0x1da));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]='workflow:workflows';[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x275);async[a61_0x50f5d8(0x365)](_0x2c6baf){const _0x4253ef=a61_0x50f5d8,{options:_0x2af16b,args:_0x46e33b,tdx:_0x322f14}=_0x2c6baf,_0x2cd43e=this['resolveProject'](_0x46e33b,_0x2af16b);_0x2af16b[_0x4253ef(0x254)]&&_0x2cd43e&&console['error'](_0x4253ef(0x2e2)+_0x2cd43e);const _0x1e904f=await withSpinner('Listing\x20workflows...',()=>_0x322f14[_0x4253ef(0x1a4)]['workflows'](_0x2cd43e,{'limit':_0x2af16b[_0x4253ef(0x206)]}),{'verbose':_0x2af16b[_0x4253ef(0x254)]});let _0x4219aa=_0x1e904f[_0x4253ef(0x32c)];_0x4219aa['sort']((_0x26e063,_0x483db0)=>{const _0x136b62=_0x4253ef,_0x188da8=_0x26e063['name']['localeCompare'](_0x483db0[_0x136b62(0x256)]);if(_0x188da8!==0x0)return _0x188da8;return(_0x26e063[_0x136b62(0x2ff)]?.[_0x136b62(0x256)]||'')[_0x136b62(0x268)](_0x483db0[_0x136b62(0x2ff)]?.[_0x136b62(0x256)]||'');});const _0x33e10b=_0x2af16b[_0x4253ef(0x206)]&&_0x4219aa[_0x4253ef(0x30c)]>=_0x2af16b[_0x4253ef(0x206)]?a61_0x511749['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x4253ef(0x2b2)](_0x4253ef(0x297)+_0x4219aa[_0x4253ef(0x30c)]+'\x20workflow'+(_0x4219aa[_0x4253ef(0x30c)]!==0x1?'s':'')+_0x33e10b);if(_0x2af16b[_0x4253ef(0x2d1)]===_0x4253ef(0x1f4)||_0x2af16b[_0x4253ef(0x2d1)]===_0x4253ef(0x1b3)||_0x2af16b[_0x4253ef(0x2d1)]===_0x4253ef(0x2f4))await handleSDKOutput(_0x4219aa,_0x2af16b);else{if(_0x4219aa[_0x4253ef(0x30c)]===0x0)_0x2cd43e?console[_0x4253ef(0x2bd)](_0x4253ef(0x26a)+_0x2cd43e):console['log']('No\x20workflows\x20found');else{const _0x5edf00=_0x2af16b[_0x4253ef(0x1e0)],_0x5760b7=_0x4219aa['map'](_0x3d9841=>{const _0x46f0f8=_0x4253ef,_0x22451a=a61_0x511749['dim']('#'+_0x3d9841['id']),_0x1baa0d=hyperlink(_0x22451a,getWorkflowUrl(_0x5edf00,_0x3d9841['id'])),_0x229f74=_0x3d9841['project']?.['name']?a61_0x511749[_0x46f0f8(0x305)]('\x20('+_0x3d9841[_0x46f0f8(0x2ff)][_0x46f0f8(0x256)]+')'):'';return _0x46f0f8(0x35d)+_0x1baa0d+'\x20'+_0x3d9841[_0x46f0f8(0x256)]+_0x229f74;});await writeOutput(_0x5760b7[_0x4253ef(0x264)]('\x0a'),_0x2af16b[_0x4253ef(0x23b)],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']=a61_0x50f5d8(0x202);['description']=a61_0x50f5d8(0x303);async[a61_0x50f5d8(0x365)](_0x32f9f7){const _0x3a9629=a61_0x50f5d8,{options:_0x2b15a8,args:_0x28bfbb,tdx:_0x15ab25}=_0x32f9f7,_0x5ed133=this[_0x3a9629(0x301)](_0x28bfbb,_0x2b15a8);if(!_0x5ed133)return 0x1;const {projectName:_0x5b8f25,workflowName:_0x47e575}=_0x5ed133;if(_0x2b15a8[_0x3a9629(0x254)]){if(_0x5b8f25&&_0x47e575)console[_0x3a9629(0x2b2)]('Filter:\x20'+_0x5b8f25+'.'+_0x47e575);else _0x5b8f25&&console[_0x3a9629(0x2b2)](_0x3a9629(0x315)+_0x5b8f25);const _0x3672d2=_0x2b15a8[_0x3a9629(0x2ae)];_0x3672d2&&console[_0x3a9629(0x2b2)](_0x3a9629(0x334)+_0x3672d2);}let _0x54dd97=0x28;if(process[_0x3a9629(0x361)][_0x3a9629(0x1e5)]&&!_0x2b15a8[_0x3a9629(0x23b)]&&!_0x2b15a8[_0x3a9629(0x2d1)]){const _0x3f154a=process[_0x3a9629(0x361)]['rows']||0x28;_0x54dd97=Math[_0x3a9629(0x37a)](0x14,Math['floor'](_0x3f154a*0x2/0x3));}const _0x204065=_0x2b15a8[_0x3a9629(0x206)]||_0x54dd97,_0x4afce6=await withSpinner(_0x3a9629(0x26e),()=>_0x15ab25[_0x3a9629(0x1a4)]['sessions']({'projectName':_0x5b8f25,'workflowName':_0x47e575,'status':_0x2b15a8['status'],'fromTime':_0x2b15a8[_0x3a9629(0x2e1)],'toTime':_0x2b15a8['to'],'limit':_0x204065}),{'verbose':_0x2b15a8[_0x3a9629(0x254)]}),_0x14a5a5=_0x4afce6[_0x3a9629(0x32c)];_0x14a5a5['sort']((_0x2ef9aa,_0x769a23)=>{const _0xe1f78b=_0x3a9629,_0xe1ca97=_0x2ef9aa[_0xe1f78b(0x2da)]||'',_0x213d49=_0x769a23[_0xe1f78b(0x2da)]||'';return _0x213d49[_0xe1f78b(0x268)](_0xe1ca97);});_0x14a5a5['length']>=_0x204065?console[_0x3a9629(0x2b2)](_0x3a9629(0x215)+_0x14a5a5[_0x3a9629(0x30c)]+_0x3a9629(0x27c)+a61_0x511749[_0x3a9629(0x305)](_0x3a9629(0x1c2))):console[_0x3a9629(0x2b2)](_0x3a9629(0x297)+_0x14a5a5[_0x3a9629(0x30c)]+_0x3a9629(0x1b2)+(_0x14a5a5[_0x3a9629(0x30c)]!==0x1?'s':''));if(_0x2b15a8[_0x3a9629(0x2d1)]===_0x3a9629(0x1f4)||_0x2b15a8[_0x3a9629(0x2d1)]===_0x3a9629(0x1b3)||_0x2b15a8[_0x3a9629(0x2d1)]===_0x3a9629(0x2f4))await handleSDKOutput(_0x14a5a5,_0x2b15a8);else{if(!process[_0x3a9629(0x361)][_0x3a9629(0x1e5)]||_0x2b15a8[_0x3a9629(0x23b)]){if(_0x14a5a5[_0x3a9629(0x30c)]===0x0){if(_0x5b8f25&&_0x47e575)console[_0x3a9629(0x2bd)](_0x3a9629(0x1ef)+_0x5b8f25+'.'+_0x47e575);else _0x5b8f25?console[_0x3a9629(0x2bd)](_0x3a9629(0x1ec)+_0x5b8f25):console['log'](_0x3a9629(0x36d));}else{const _0x120ef9=_0x2b15a8[_0x3a9629(0x1e0)],_0x1739dc=this[_0x3a9629(0x2b8)](_0x14a5a5,_0x120ef9);_0x2b15a8['output']?await writeOutput(_0x1739dc,_0x2b15a8[_0x3a9629(0x23b)],_0x3a9629(0x1da)):console[_0x3a9629(0x2bd)](_0x1739dc);}!_0x5b8f25&&(console[_0x3a9629(0x2b2)](''),console[_0x3a9629(0x2b2)](a61_0x511749[_0x3a9629(0x305)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console['error'](a61_0x511749[_0x3a9629(0x305)](_0x3a9629(0x2b7))+'or'+a61_0x511749[_0x3a9629(0x305)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x14a5a5[_0x3a9629(0x30c)]===0x0){if(_0x5b8f25&&_0x47e575)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x5b8f25+'.'+_0x47e575);else _0x5b8f25?console['log'](_0x3a9629(0x1ec)+_0x5b8f25):console[_0x3a9629(0x2bd)](_0x3a9629(0x36d));}else await this[_0x3a9629(0x351)](_0x14a5a5,_0x32f9f7,_0x5b8f25);}}return 0x0;}[a61_0x50f5d8(0x2b8)](_0x36bc15,_0x1d8fac){const _0x54ef23=a61_0x50f5d8,_0x4596bd=[],_0x3d5cf8=new Map();let _0x2a82cd=Infinity,_0x22e9b7=-Infinity;for(const _0xc8c203 of _0x36bc15){if(_0xc8c203[_0x54ef23(0x24d)]?.[_0x54ef23(0x350)]){const _0x4a2bd9=new Date(_0xc8c203[_0x54ef23(0x24d)][_0x54ef23(0x350)])[_0x54ef23(0x36f)](),_0x1b99cc=_0xc8c203[_0x54ef23(0x24d)][_0x54ef23(0x1fc)]?new Date(_0xc8c203['lastAttempt'][_0x54ef23(0x1fc)])[_0x54ef23(0x36f)]():Date[_0x54ef23(0x302)](),_0xb1bcd8=_0xc8c203['project']?.[_0x54ef23(0x256)]||_0x54ef23(0x2fe);!_0x3d5cf8[_0x54ef23(0x339)](_0xb1bcd8)&&_0x3d5cf8['set'](_0xb1bcd8,[]),_0x3d5cf8[_0x54ef23(0x1c4)](_0xb1bcd8)[_0x54ef23(0x246)]({'session':_0xc8c203,'startTime':_0x4a2bd9,'endTime':_0x1b99cc,'duration':_0x1b99cc-_0x4a2bd9}),_0x2a82cd=Math[_0x54ef23(0x27b)](_0x2a82cd,_0x4a2bd9),_0x22e9b7=Math[_0x54ef23(0x37a)](_0x22e9b7,_0x1b99cc);}}if(_0x3d5cf8[_0x54ef23(0x329)]===0x0)return _0x54ef23(0x2c7);const _0x3221f0=process[_0x54ef23(0x361)][_0x54ef23(0x1d4)]||0x78,_0x4c14e6=0x1e,_0x40d6d3=0x32,_0xfe4473=0x4,_0x5bbc6a=Math[_0x54ef23(0x27b)](_0x40d6d3,Math[_0x54ef23(0x37a)](_0x4c14e6,Math[_0x54ef23(0x309)](_0x3221f0*0.3))),_0xa35fd1=_0x3221f0-_0x5bbc6a-TIMELINE_CONFIG[_0x54ef23(0x285)]-0x3-_0xfe4473,_0x45d5cb=_0x22e9b7-_0x2a82cd,_0x121bac=_0x45d5cb/_0x5bbc6a,_0x415441=renderTimeAxis({'startTime':_0x2a82cd,'endTime':_0x22e9b7,'durationMs':_0x45d5cb,'msPerChar':_0x121bac},_0x5bbc6a),_0x47e745=[];for(const _0x407623 of _0x3d5cf8[_0x54ef23(0x1b9)]()){_0x47e745[_0x54ef23(0x246)](..._0x407623);}_0x47e745[_0x54ef23(0x308)]((_0x19e771,_0x3f686b)=>_0x3f686b[_0x54ef23(0x2df)]-_0x19e771[_0x54ef23(0x2df)]);const _0x55c2ee=new Date(_0x2a82cd),_0x220c40=formatDate(_0x55c2ee),_0x9708e3=_0xfe4473+TIMELINE_CONFIG[_0x54ef23(0x21c)]+TIMELINE_CONFIG[_0x54ef23(0x1ce)]+_0xa35fd1,_0x29fda7='\x20'['repeat'](_0x9708e3-_0x220c40[_0x54ef23(0x30c)]),_0x36ac36=_0x29fda7+a61_0x511749[_0x54ef23(0x305)](_0x220c40)+'\x20'+_0x415441;_0x4596bd[_0x54ef23(0x246)](_0x36ac36);const _0x49ab97=0x16;let _0x4c9bbe=0x0;for(const _0x5f4f51 of _0x47e745){const _0x2d630a=_0x5f4f51['session'][_0x54ef23(0x2ff)]?.[_0x54ef23(0x256)]||'?',_0xe68b87=Math[_0x54ef23(0x27b)](stringWidth(_0x2d630a),_0x49ab97);_0x4c9bbe=Math[_0x54ef23(0x37a)](_0x4c9bbe,_0xe68b87);}for(const _0x458c25 of _0x47e745){const {session:_0x137c03,startTime:_0x5cdaaa,endTime:_0x3785d2,duration:_0x23cef2}=_0x458c25,_0x124e4e=_0x137c03['project']?.['id'],_0x4a0a88=_0x137c03['id'],_0x4b9910=_0x137c03[_0x54ef23(0x2ff)]?.[_0x54ef23(0x256)]||'?',_0x106875=_0x137c03[_0x54ef23(0x1a4)]?.['name']||'?';let _0x1fbd1f,_0x2e9daf;if(_0x137c03['lastAttempt']){const _0xb88ce3=_0x137c03[_0x54ef23(0x24d)];!_0xb88ce3[_0x54ef23(0x29c)]?(_0x1fbd1f=_0xb88ce3['cancelRequested']?'🛑':'🔄',_0x2e9daf=_0xb88ce3[_0x54ef23(0x2e7)]?a61_0x511749['yellow']:a61_0x511749[_0x54ef23(0x1fa)]):(_0x1fbd1f=_0xb88ce3[_0x54ef23(0x2fa)]?'✅':'❌',_0x2e9daf=_0xb88ce3[_0x54ef23(0x2fa)]?a61_0x511749['green']:a61_0x511749[_0x54ef23(0x345)]);}else _0x1fbd1f='⏳',_0x2e9daf=a61_0x511749['dim'];const _0x8ca90d='#'+_0x4a0a88,_0x564718=_0x124e4e?hyperlink(_0x8ca90d,getWorkflowSessionUrl(_0x1d8fac,_0x124e4e,_0x4a0a88)):_0x8ca90d;let _0xaaa387=_0x4b9910;stringWidth(_0x4b9910)>_0x49ab97&&(_0xaaa387=_0x4b9910['slice'](0x0,_0x49ab97-0x1)+'…');const _0x214ab1=a61_0x511749[_0x54ef23(0x305)](_0xaaa387),_0x1788a3=stringWidth(_0xaaa387),_0x2731ca='\x20'[_0x54ef23(0x1ae)](_0x4c9bbe-stringWidth(_0xaaa387)+0x2),_0xeab818='('+formatElapsed(_0x23cef2)+')',_0x2a24e8=stringWidth(_0xeab818),_0x8fbcfc=stringWidth(_0x8ca90d),_0x186b60=_0x8fbcfc+0x1+_0x1788a3+_0x2731ca[_0x54ef23(0x30c)],_0x21ab96=_0xa35fd1-_0x186b60-_0x2a24e8-0x1-0x8;let _0x2e6e1e=_0x106875;stringWidth(_0x2e6e1e)>_0x21ab96&&(_0x2e6e1e=_0x2e6e1e['slice'](0x0,_0x21ab96-0x1)+'…');const _0x575080=_0x564718+'\x20'+_0x214ab1+_0x2731ca+_0x2e6e1e,_0x8e89ad=stringWidth(_0x575080),_0x5ce356=_0xa35fd1-_0x8e89ad-_0x2a24e8,_0x17a43a=_0x575080+'\x20'['repeat'](Math[_0x54ef23(0x37a)](0x1,_0x5ce356))+a61_0x511749[_0x54ef23(0x305)](_0xeab818),_0x529ff=Math['floor']((_0x5cdaaa-_0x2a82cd)/_0x121bac),_0x2e5596=Math[_0x54ef23(0x309)]((_0x3785d2-_0x2a82cd)/_0x121bac),_0x243940=Math[_0x54ef23(0x37a)](_0x529ff+0x1,_0x2e5596),_0x390e92=new Array(_0x5bbc6a)['fill']('\x20');for(let _0x4d5eff=_0x529ff;_0x4d5eff<Math[_0x54ef23(0x27b)](_0x243940,_0x5bbc6a);_0x4d5eff++){_0x390e92[_0x4d5eff]='─';}const _0x487f2f=_0x390e92[_0x54ef23(0x2e0)](_0x28c22d=>_0x28c22d==='\x20'?'\x20':_0x2e9daf(_0x28c22d))[_0x54ef23(0x264)]('');_0x4596bd['push'](_0x1fbd1f+'\x20'+_0x17a43a+'│'+_0x487f2f+'│');}return _0x4596bd[_0x54ef23(0x264)]('\x0a');}async['navigateSessionsInteractive'](_0x5deeb6,_0x2141d6,_0x35b6c2){const _0x1afd54=a61_0x50f5d8,{options:_0x23729a,tdx:_0x42e52d}=_0x2141d6,_0x3add07=_0x23729a['site'],{timelineRows:_0x24088a,timeAxisHeader:_0x5cf960}=this['generateSessionTimelineRows'](_0x5deeb6,_0x3add07),_0x66d9fc=_0x24088a[_0x1afd54(0x2c6)](_0xaa223a=>_0xaa223a[_0x1afd54(0x1bb)]);if(_0x66d9fc[_0x1afd54(0x30c)]===0x0){const _0x1e7442=this['renderSessionsTimeline'](_0x5deeb6,_0x3add07);console[_0x1afd54(0x2bd)](_0x1e7442);!_0x35b6c2&&(console[_0x1afd54(0x2b2)](''),console[_0x1afd54(0x2b2)](a61_0x511749[_0x1afd54(0x305)](_0x1afd54(0x30d))),console[_0x1afd54(0x2b2)](a61_0x511749[_0x1afd54(0x305)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a61_0x511749[_0x1afd54(0x305)](_0x1afd54(0x28d))));return;}_0x5cf960&&console[_0x1afd54(0x2bd)](_0x5cf960);const _0x559404=_0x24088a['filter'](_0x453cdb=>_0x453cdb[_0x1afd54(0x1bb)])[_0x1afd54(0x2e0)](_0x23fea5=>({'title':_0x23fea5['displayLine'],'value':_0x23fea5[_0x1afd54(0x1bb)]})),_0x991b2e=process[_0x1afd54(0x361)]['rows']||0x3c,_0x3455cd=Math[_0x1afd54(0x37a)](0x28,Math[_0x1afd54(0x309)](_0x991b2e*0x2/0x3)),_0x535a90=await a61_0x4181bb({'type':_0x1afd54(0x22d),'name':'attemptId','message':_0x1afd54(0x341),'choices':_0x559404,'initial':-0x1,'limit':_0x3455cd,'clearFirst':!![],'fallback':{'title':_0x1afd54(0x328),'value':null},'suggest':(_0x59b352,_0x2193e6)=>{const _0x2ae389=_0x1afd54;if(!_0x59b352)return Promise[_0x2ae389(0x2a1)](_0x2193e6);const _0x589e16=_0x2193e6[_0x2ae389(0x2c6)](_0x4e40d5=>{const _0x561328=_0x2ae389,_0x2f42c5=_0x4e40d5;return _0x2f42c5['title']['toLowerCase']()[_0x561328(0x24a)](_0x59b352[_0x561328(0x33a)]());});return Promise['resolve'](_0x589e16);}}),_0x5ac7fb=()=>{const _0x3c54c8=_0x1afd54;process[_0x3c54c8(0x361)][_0x3c54c8(0x380)](_0x3c54c8(0x30a)),process[_0x3c54c8(0x361)]['write'](_0x3c54c8(0x30a)),process[_0x3c54c8(0x361)]['write'](_0x3c54c8(0x30a));},_0x2e76e2=_0x535a90&&_0x535a90[_0x1afd54(0x1bb)]&&_0x535a90[_0x1afd54(0x1bb)]!==null&&_0x535a90[_0x1afd54(0x1bb)][_0x1afd54(0x262)]()!=='';if(!_0x2e76e2){_0x5ac7fb(),console['log'](a61_0x511749[_0x1afd54(0x305)](_0x1afd54(0x371)));return;}_0x5ac7fb();const _0x4595c4=_0x5deeb6[_0x1afd54(0x326)](_0x8f3386=>_0x8f3386['lastAttempt']?.['id']===_0x535a90['attemptId']);if(_0x4595c4){const _0x45620a=_0x4595c4[_0x1afd54(0x2ff)]?.[_0x1afd54(0x256)]||'?',_0x42d6c8=_0x4595c4['workflow']?.[_0x1afd54(0x256)]||'?';console['log'](_0x1afd54(0x260)+a61_0x511749[_0x1afd54(0x305)](_0x45620a)+_0x1afd54(0x325)+a61_0x511749[_0x1afd54(0x305)](_0x42d6c8));}const _0x5e5b7b=new WorkflowTimelineCommand();await _0x5e5b7b[_0x1afd54(0x365)]({'args':[],'options':{..._0x23729a,'attemptId':_0x535a90['attemptId']},'tdx':_0x42e52d});}[a61_0x50f5d8(0x322)](_0x2277f6,_0x39dab1){const _0x1a8778=a61_0x50f5d8,_0x30d72c=new Map();for(const _0x19ef21 of _0x2277f6){_0x19ef21['id']&&_0x19ef21[_0x1a8778(0x24d)]?.['id']&&_0x30d72c[_0x1a8778(0x2e9)](_0x19ef21['id'],_0x19ef21['lastAttempt']['id']);}const _0xec1000=[];let _0x81fd93='';const _0x4ed0bf=this[_0x1a8778(0x2b8)](_0x2277f6,_0x39dab1),_0x4486c7=_0x4ed0bf['split']('\x0a');for(const _0x5cffe8 of _0x4486c7){if(_0x5cffe8['startsWith'](_0x1a8778(0x1a7))||_0x5cffe8[_0x1a8778(0x2f0)](/^\s+\d{4}-\d{2}-\d{2}/))_0x81fd93=_0x5cffe8;else{if(_0x5cffe8[_0x1a8778(0x2f0)](/^[✅❌🔄🛑⏳]/)){const _0x514e46=_0x5cffe8[_0x1a8778(0x2f0)](/#(\d+)/),_0x940462=_0x514e46?_0x514e46[0x1]:null,_0x25156e=_0x940462?_0x30d72c[_0x1a8778(0x1c4)](_0x940462)||null:null,_0x41c594=_0x2277f6['find'](_0x2b7582=>_0x2b7582['id']===_0x940462),_0xe67caa=_0x41c594?.[_0x1a8778(0x2ff)]?.[_0x1a8778(0x256)]||'';_0xec1000['push']({'displayLine':_0x5cffe8,'attemptId':_0x25156e,'projectName':_0xe67caa});}}}return{'timelineRows':_0xec1000,'timeAxisHeader':_0x81fd93};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x24c);['description']=a61_0x50f5d8(0x250);async['execute'](_0x1b16be){const _0x3e4227=a61_0x50f5d8,{options:_0x516f5d,args:_0x40a0c0,tdx:_0x58b9fa}=_0x1b16be,_0x5c45ae=this['parseProjectWorkflowPattern'](_0x40a0c0,_0x516f5d);if(!_0x5c45ae)return 0x1;const {projectName:_0x267836,workflowName:_0x224831}=_0x5c45ae,_0x804f1e=_0x516f5d['includeRetried'];if(_0x516f5d['verbose']){if(_0x267836&&_0x224831)console[_0x3e4227(0x2b2)](_0x3e4227(0x2f1)+_0x267836+'.'+_0x224831);else _0x267836&&console[_0x3e4227(0x2b2)](_0x3e4227(0x315)+_0x267836);_0x804f1e&&console[_0x3e4227(0x2b2)](_0x3e4227(0x1a6));}const _0x2a1a27=await withSpinner(_0x3e4227(0x2d6),()=>_0x58b9fa[_0x3e4227(0x1a4)][_0x3e4227(0x204)]({'projectName':_0x267836,'workflowName':_0x224831,'includeRetried':_0x804f1e,'limit':_0x516f5d[_0x3e4227(0x206)]}),{'verbose':_0x516f5d['verbose']}),_0x3d9c81=_0x2a1a27[_0x3e4227(0x32c)],_0x58fd8e=_0x516f5d[_0x3e4227(0x206)]||0x64,_0x4155e2=_0x3d9c81['length']>=_0x58fd8e?a61_0x511749[_0x3e4227(0x305)](_0x3e4227(0x1a8)):'';console[_0x3e4227(0x2b2)](_0x3e4227(0x297)+_0x3d9c81[_0x3e4227(0x30c)]+_0x3e4227(0x378)+(_0x3d9c81[_0x3e4227(0x30c)]!==0x1?'s':'')+_0x4155e2);if(_0x516f5d['format']===_0x3e4227(0x1f4)||_0x516f5d['format']===_0x3e4227(0x1b3)||_0x516f5d[_0x3e4227(0x2d1)]===_0x3e4227(0x2f4))await handleSDKOutput(_0x3d9c81,_0x516f5d);else{if(_0x3d9c81['length']===0x0){if(_0x267836&&_0x224831)console[_0x3e4227(0x2bd)](_0x3e4227(0x26b)+_0x267836+'.'+_0x224831);else _0x267836?console[_0x3e4227(0x2bd)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x267836):console['log'](_0x3e4227(0x37c));}else{const _0x26979d=_0x516f5d['site'],_0x4eb402=_0x3d9c81['map'](_0x3679fd=>{const _0x403ddb=_0x3e4227,_0x22d00c=a61_0x511749[_0x403ddb(0x305)]('#'+_0x3679fd['id']),_0x424922=_0x3679fd[_0x403ddb(0x2ff)]?.['id'],_0x1c8af6=_0x3679fd[_0x403ddb(0x357)]||_0x3679fd[_0x403ddb(0x22e)],_0xf5e9fb=_0x424922&&_0x1c8af6?hyperlink(_0x22d00c,getWorkflowAttemptUrl(_0x26979d,_0x424922,_0x1c8af6,_0x3679fd['id'])):_0x22d00c,{icon:_0x5c0dbc,text:_0x1bdbfa}=getAttemptStatusDisplay(_0x3679fd),_0x19b4b2=(_0x3679fd['project']?.[_0x403ddb(0x256)]||'?')+'.'+(_0x3679fd[_0x403ddb(0x1a4)]?.[_0x403ddb(0x256)]||'?'),_0x444105=_0x3679fd[_0x403ddb(0x2da)]?a61_0x511749[_0x403ddb(0x305)](_0x3679fd[_0x403ddb(0x2da)]):'';return(_0xf5e9fb+'\x20'+_0x5c0dbc+(_0x1bdbfa?'\x20'+_0x1bdbfa:'')+'\x20'+_0x19b4b2+'\x20'+_0x444105)['trimEnd']();});await writeOutput(_0x4eb402[_0x3e4227(0x264)]('\x0a'),_0x516f5d[_0x3e4227(0x23b)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x247);['description']=a61_0x50f5d8(0x31a);async['execute'](_0x5e9832){const _0x4e5783=a61_0x50f5d8,{options:_0x712b3c,args:_0x5374fa,tdx:_0x5d2197}=_0x5e9832,_0x245b0f=_0x5374fa[0x0];if(!_0x245b0f)return console[_0x4e5783(0x2b2)](_0x4e5783(0x373)),0x1;_0x712b3c[_0x4e5783(0x254)]&&console['error'](_0x4e5783(0x277)+_0x245b0f);const _0x576df4=await withSpinner(_0x4e5783(0x289),()=>_0x5d2197['workflow'][_0x4e5783(0x26d)](_0x245b0f),{'verbose':_0x712b3c[_0x4e5783(0x254)]}),_0x153b4f=_0x576df4[_0x4e5783(0x32c)];let _0x5ceda2;!_0x153b4f['done']?_0x5ceda2=_0x153b4f[_0x4e5783(0x2e7)]?_0x4e5783(0x23d):_0x4e5783(0x223):_0x5ceda2=_0x153b4f['success']?_0x4e5783(0x2fa):_0x4e5783(0x2b2);let _0x4a4d09;if(_0x153b4f['createdAt']&&_0x153b4f[_0x4e5783(0x1fc)]){const _0x19bbd6=new Date(_0x153b4f[_0x4e5783(0x350)])[_0x4e5783(0x36f)](),_0x42c607=new Date(_0x153b4f['finishedAt'])['getTime']();_0x4a4d09=Math[_0x4e5783(0x2f7)]((_0x42c607-_0x19bbd6)/0x3e8);}const _0x141fba={'attempt_id':_0x153b4f['id'],'status':_0x5ceda2,..._0x153b4f[_0x4e5783(0x2b5)]!==undefined&&{'index':_0x153b4f[_0x4e5783(0x2b5)]},..._0x153b4f['project']&&{'project':_0x153b4f[_0x4e5783(0x2ff)]['name']},..._0x153b4f[_0x4e5783(0x1a4)]&&{'workflow':_0x153b4f[_0x4e5783(0x1a4)][_0x4e5783(0x256)]},..._0x153b4f[_0x4e5783(0x22e)]&&{'session_id':_0x153b4f[_0x4e5783(0x22e)]},..._0x153b4f['sessionTime']&&{'session_time':_0x153b4f[_0x4e5783(0x2da)]},..._0x153b4f[_0x4e5783(0x2b0)]&&{'retry_attempt':_0x153b4f[_0x4e5783(0x2b0)]},..._0x4a4d09!==undefined&&{'duration_sec':_0x4a4d09},..._0x153b4f[_0x4e5783(0x350)]&&{'created_at':_0x153b4f[_0x4e5783(0x350)]},..._0x153b4f[_0x4e5783(0x1fc)]&&{'finished_at':_0x153b4f['finishedAt']},...Object[_0x4e5783(0x20f)](_0x153b4f[_0x4e5783(0x2e5)])[_0x4e5783(0x30c)]>0x0&&{'params':_0x153b4f[_0x4e5783(0x2e5)]}};return await handleSingleObjectOutput(_0x141fba,_0x712b3c),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x269);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x2eb);async[a61_0x50f5d8(0x365)](_0x476012){const _0x110a63=a61_0x50f5d8,{options:_0xf9e10d,args:_0x45390d,tdx:_0xbdb39f}=_0x476012,_0x477ff1=_0x45390d[0x0];if(!_0x477ff1)return console['error'](_0x110a63(0x373)),0x1;const _0x2df08e=_0xf9e10d[_0x110a63(0x1ed)];_0xf9e10d['verbose']&&(console[_0x110a63(0x2b2)](_0x110a63(0x277)+_0x477ff1),_0x2df08e&&console[_0x110a63(0x2b2)]('Including\x20subtasks:\x20yes'));const _0x320451=await withSpinner(_0x110a63(0x210),()=>_0xbdb39f[_0x110a63(0x1a4)][_0x110a63(0x208)](_0x477ff1,_0x2df08e||![]),{'verbose':_0xf9e10d[_0x110a63(0x254)]}),_0x10c4b6=_0x320451['data'];return console[_0x110a63(0x2b2)](_0x110a63(0x297)+_0x10c4b6['length']+'\x20task'+(_0x10c4b6[_0x110a63(0x30c)]!==0x1?'s':'')),await handleSDKOutput(_0x10c4b6,_0xf9e10d),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x34c);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x1fd);async[a61_0x50f5d8(0x365)](_0x28a86c){const _0x31e36a=a61_0x50f5d8,{options:_0x4d3199,args:_0x41a187,tdx:_0x406fa1}=_0x28a86c,_0xbec65=_0x41a187[0x0];let _0x40e6d1=_0x41a187[0x1];if(!_0xbec65)return console[_0x31e36a(0x2b2)](_0x31e36a(0x373)),0x1;_0x4d3199[_0x31e36a(0x254)]&&(console[_0x31e36a(0x2b2)]('Attempt\x20ID:\x20'+_0xbec65),_0x40e6d1&&console[_0x31e36a(0x2b2)]('Task\x20name:\x20'+_0x40e6d1));const _0x17e032=await withSpinner(_0x31e36a(0x363),()=>_0x406fa1[_0x31e36a(0x1a4)][_0x31e36a(0x332)](_0xbec65,_0x40e6d1),{'verbose':_0x4d3199[_0x31e36a(0x254)]}),_0x23e60a=_0x17e032[_0x31e36a(0x32c)];if(_0x23e60a[_0x31e36a(0x30c)]===0x0)return console[_0x31e36a(0x2b2)](_0x31e36a(0x1cc)),0x0;if(!_0x40e6d1&&(_0x4d3199[_0x31e36a(0x1f4)]||_0x4d3199['format']))return await handleSDKOutput(_0x23e60a,_0x4d3199),0x0;if(!_0x40e6d1){const _0x1a2a4c=_0x23e60a[_0x31e36a(0x2e0)](_0x43c357=>({'title':_0x43c357[_0x31e36a(0x227)]+'\x20('+formatBytes(_0x43c357[_0x31e36a(0x22c)])+')','value':_0x43c357[_0x31e36a(0x227)]})),_0x4c6ced=await a61_0x4181bb({'type':'select','name':_0x31e36a(0x242),'message':_0x31e36a(0x21f),'choices':_0x1a2a4c});if(!_0x4c6ced['task'])return console['error'](_0x31e36a(0x371)),0x0;_0x40e6d1=_0x4c6ced[_0x31e36a(0x242)];}const _0x2ba9cc=await withSpinner(_0x31e36a(0x240),()=>_0x406fa1['workflow'][_0x31e36a(0x291)](_0xbec65,_0x40e6d1),{'verbose':_0x4d3199[_0x31e36a(0x254)]}),_0x291ca8=_0x2ba9cc['data'];return _0x291ca8?console[_0x31e36a(0x2bd)](_0x291ca8):console[_0x31e36a(0x2b2)](_0x31e36a(0x280)),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']=a61_0x50f5d8(0x2ef);[a61_0x50f5d8(0x1d6)]='Kill\x20a\x20running\x20attempt';async[a61_0x50f5d8(0x365)](_0x277b39){const _0x5b6c54=a61_0x50f5d8,{options:_0x55ea2b,args:_0x4caad8,tdx:_0x51666e}=_0x277b39,_0x1131b9=_0x4caad8[0x0];if(!_0x1131b9)return console[_0x5b6c54(0x2b2)](_0x5b6c54(0x373)),0x1;const _0x3b567d=_0x55ea2b[_0x5b6c54(0x319)];_0x55ea2b[_0x5b6c54(0x254)]&&(console[_0x5b6c54(0x2b2)]('Attempt\x20ID:\x20'+_0x1131b9),_0x3b567d&&console['error'](_0x5b6c54(0x366)+_0x3b567d));if(!_0x55ea2b[_0x5b6c54(0x1c5)]){if(!isInteractive())return console[_0x5b6c54(0x2b2)](a61_0x511749[_0x5b6c54(0x345)]('\x0aError:'),_0x5b6c54(0x2c8)),console[_0x5b6c54(0x2b2)](a61_0x511749[_0x5b6c54(0x305)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4afc43=await confirmKey(_0x5b6c54(0x2ed)+_0x1131b9+'?');if(!_0x4afc43)return console['error'](a61_0x511749[_0x5b6c54(0x222)](_0x5b6c54(0x371))),0x1;}const _0x19c82b=await withSpinner(_0x5b6c54(0x377),()=>_0x51666e[_0x5b6c54(0x1a4)][_0x5b6c54(0x230)](_0x1131b9,_0x3b567d),{'verbose':_0x55ea2b[_0x5b6c54(0x254)]}),_0x32f80b=_0x19c82b[_0x5b6c54(0x32c)];return console[_0x5b6c54(0x2b2)]('✔\x20'+_0x32f80b),0x0;}}export class WorkflowRetryCommand extends BaseCommand{['name']=a61_0x50f5d8(0x225);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x244);async['execute'](_0x347d80){const _0x15b4d8=a61_0x50f5d8,{options:_0x4cdbdb,args:_0x376aea,tdx:_0x190db7}=_0x347d80,_0x401832=_0x376aea[0x0];if(!_0x401832)return console[_0x15b4d8(0x2b2)](_0x15b4d8(0x2d4)),console[_0x15b4d8(0x2b2)](_0x15b4d8(0x370)),0x1;let _0x4e2298=![],_0x4af7ba=_0x401832;if(_0x401832[_0x15b4d8(0x28a)](_0x15b4d8(0x248)))_0x4e2298=!![],_0x4af7ba=_0x401832[_0x15b4d8(0x278)](0x8);else{if(_0x401832[_0x15b4d8(0x28a)](_0x15b4d8(0x352)))_0x4e2298=![],_0x4af7ba=_0x401832[_0x15b4d8(0x278)](0x8);else return console['error'](_0x15b4d8(0x32d)),console[_0x15b4d8(0x2b2)](_0x15b4d8(0x370)),0x1;}const _0x2868ce=_0x4cdbdb['fromTask'],_0x47f0fa=_0x4cdbdb[_0x15b4d8(0x368)],_0x374a77=_0x4cdbdb[_0x15b4d8(0x2e5)],_0x7b354b=_0x4cdbdb['force'];_0x4cdbdb[_0x15b4d8(0x254)]&&(console[_0x15b4d8(0x2b2)]('Target:\x20'+(_0x4e2298?_0x15b4d8(0x32b):_0x15b4d8(0x26d))+'\x20'+_0x4af7ba),_0x2868ce&&console[_0x15b4d8(0x2b2)](_0x15b4d8(0x2ea)+_0x2868ce),_0x47f0fa&&console[_0x15b4d8(0x2b2)](_0x15b4d8(0x253)+_0x47f0fa),_0x374a77&&console[_0x15b4d8(0x2b2)](_0x15b4d8(0x2ee)+_0x374a77),_0x7b354b&&console[_0x15b4d8(0x2b2)]('Force:\x20yes'));let _0x444528;if(_0x374a77)try{if(_0x374a77[_0x15b4d8(0x28a)]('@')){const _0xdd2b8b=await import(_0x15b4d8(0x27d)),_0x41ae54=_0x374a77[_0x15b4d8(0x278)](0x1),_0x148a7f=await _0xdd2b8b[_0x15b4d8(0x374)](_0x41ae54,_0x15b4d8(0x2cd));_0x444528=JSON['parse'](_0x148a7f);}else _0x444528=JSON[_0x15b4d8(0x21b)](_0x374a77);}catch{return console[_0x15b4d8(0x2b2)](_0x15b4d8(0x214)),0x1;}if(!_0x4cdbdb['yes']){if(!isInteractive())return console['error'](a61_0x511749['red'](_0x15b4d8(0x32e)),_0x15b4d8(0x2c8)),console[_0x15b4d8(0x2b2)](a61_0x511749[_0x15b4d8(0x305)](_0x15b4d8(0x2f6))),0x1;const _0x2e6721=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x4e2298?_0x15b4d8(0x32b):_0x15b4d8(0x26d))+'\x20'+_0x4af7ba+'?');if(!_0x2e6721)return console[_0x15b4d8(0x2b2)](a61_0x511749[_0x15b4d8(0x222)]('Cancelled')),0x1;}let _0x2f31de;_0x4e2298?_0x2f31de=await withSpinner(_0x15b4d8(0x1e2),()=>_0x190db7['workflow'][_0x15b4d8(0x25a)](_0x4af7ba,{'fromTask':_0x2868ce,'retryParams':_0x444528}),{'verbose':_0x4cdbdb[_0x15b4d8(0x254)]}):_0x2f31de=await withSpinner(_0x15b4d8(0x2e4),()=>_0x190db7['workflow'][_0x15b4d8(0x25d)](_0x4af7ba,{'resumeFrom':_0x47f0fa,'retryParams':_0x444528,'force':_0x7b354b}),{'verbose':_0x4cdbdb[_0x15b4d8(0x254)]});const _0x98dc66=_0x2f31de[_0x15b4d8(0x32c)];return console['error']('✔\x20Retry\x20started'),console['error']('\x20\x20New\x20attempt\x20ID:\x20'+_0x98dc66[_0x15b4d8(0x1bb)]),console[_0x15b4d8(0x2b2)]('\x20\x20Session\x20ID:\x20'+_0x98dc66[_0x15b4d8(0x22e)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]='workflow:run';['description']=a61_0x50f5d8(0x2fd);async['execute'](_0x366aa2){const _0x142181=a61_0x50f5d8,{options:_0x5b8898,args:_0x5e042c,tdx:_0x164584}=_0x366aa2;let _0x1a63ee=_0x5e042c[0x0];if(!_0x1a63ee){const _0x4c5ecf=this[_0x142181(0x379)]([],_0x5b8898),_0x542e74=await withSpinner(_0x142181(0x20e),()=>_0x164584['workflow'][_0x142181(0x22a)](_0x4c5ecf,{'limit':_0x5b8898[_0x142181(0x206)]}),{'verbose':_0x5b8898['verbose']}),_0xcd48e=_0x542e74[_0x142181(0x32c)];if(_0xcd48e[_0x142181(0x30c)]===0x0)return console['error'](_0x142181(0x1c8)),!_0x4c5ecf&&console[_0x142181(0x2b2)](a61_0x511749[_0x142181(0x305)](_0x142181(0x369))),0x1;const _0x46b255=_0xcd48e[_0x142181(0x2e0)](_0x2ee6c5=>({'title':_0x2ee6c5[_0x142181(0x2ff)]?.[_0x142181(0x256)]+'.'+_0x2ee6c5[_0x142181(0x256)],'value':_0x2ee6c5[_0x142181(0x2ff)]?.[_0x142181(0x256)]+'.'+_0x2ee6c5[_0x142181(0x256)],'description':_0x2ee6c5[_0x142181(0x257)]?_0x142181(0x375)+_0x2ee6c5[_0x142181(0x257)]:undefined})),_0x3982f3=await a61_0x4181bb({'type':_0x142181(0x25f),'name':_0x142181(0x1a4),'message':'Select\x20a\x20workflow\x20to\x20run','choices':_0x46b255});if(!_0x3982f3[_0x142181(0x1a4)])return 0x1;_0x1a63ee=_0x3982f3[_0x142181(0x1a4)];}if(!_0x1a63ee[_0x142181(0x24a)]('.')){const _0x53f06d=this['resolveProject']([],_0x5b8898);if(_0x53f06d)_0x1a63ee=_0x53f06d+'.'+_0x1a63ee;else return console['error'](a61_0x511749[_0x142181(0x345)]('Error:'),_0x142181(0x372)),console[_0x142181(0x2b2)](a61_0x511749['dim'](_0x142181(0x369))),0x1;}const _0x541366=_0x5b8898[_0x142181(0x270)],_0x43adb8=_0x5b8898[_0x142181(0x2da)],_0x17486f={};if(_0x541366&&Array['isArray'](_0x541366))for(const _0x471163 of _0x541366){const _0x390348=_0x471163['indexOf']('=');if(_0x390348===-0x1)return console[_0x142181(0x2b2)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x471163),console[_0x142181(0x2b2)](_0x142181(0x1f3)),0x1;const _0x2a46e9=_0x471163[_0x142181(0x278)](0x0,_0x390348),_0xa2ccdd=_0x471163[_0x142181(0x278)](_0x390348+0x1);try{_0x17486f[_0x2a46e9]=JSON[_0x142181(0x21b)](_0xa2ccdd);}catch{_0x17486f[_0x2a46e9]=_0xa2ccdd;}}_0x5b8898[_0x142181(0x254)]&&(console[_0x142181(0x2b2)]('Workflow:\x20'+_0x1a63ee),Object[_0x142181(0x20f)](_0x17486f)[_0x142181(0x30c)]>0x0&&console[_0x142181(0x2b2)]('Parameters:\x20'+JSON['stringify'](_0x17486f)),_0x43adb8&&console[_0x142181(0x2b2)](_0x142181(0x232)+_0x43adb8));if(_0x5b8898[_0x142181(0x1ca)])return await this[_0x142181(0x1a1)](_0x366aa2,_0x1a63ee,_0x17486f,_0x43adb8);const _0x41737d=await withSpinner(_0x142181(0x2a2),()=>_0x164584[_0x142181(0x1a4)][_0x142181(0x2d8)](_0x1a63ee,_0x17486f,{'sessionTime':_0x43adb8}),{'verbose':_0x5b8898[_0x142181(0x254)]}),_0x5cfca5=_0x41737d[_0x142181(0x32c)];console[_0x142181(0x2b2)](_0x142181(0x1bd)),console['error'](_0x142181(0x364)+_0x5cfca5['id']),console['error']('\x20\x20Session\x20ID:\x20'+_0x5cfca5['sessionId']),console[_0x142181(0x2b2)]('\x20\x20Project:\x20'+_0x5cfca5[_0x142181(0x2ff)]?.['name']),console[_0x142181(0x2b2)](_0x142181(0x251)+_0x5cfca5[_0x142181(0x1a4)]?.[_0x142181(0x256)]);if(_0x5cfca5['project']?.['id']&&_0x5cfca5[_0x142181(0x22e)]&&_0x5cfca5['id']){const _0x57e02f=_0x5b8898['site'],_0x54d128=getConsoleUrl(_0x57e02f,'/app/workflows/'+_0x5cfca5['project']['id']+_0x142181(0x338)+_0x5cfca5['sessionId']+_0x142181(0x23c)+_0x5cfca5['id']);console['error'](_0x142181(0x238)+a61_0x511749[_0x142181(0x201)](_0x54d128));}return 0x0;}async[a61_0x50f5d8(0x1a1)](_0x3c8cb9,_0x3e2687,_0x2cd75f,_0x1be091){const _0x4ed4be=a61_0x50f5d8,{options:_0x316996,tdx:_0x5aef8f}=_0x3c8cb9,_0x4b34f3=await withSpinner('Fetching\x20workflow\x20'+_0x3e2687+_0x4ed4be(0x200),()=>_0x5aef8f[_0x4ed4be(0x1a4)][_0x4ed4be(0x2b9)](_0x3e2687),{'verbose':_0x316996[_0x4ed4be(0x254)]}),_0x19fc39=_0x4b34f3[_0x4ed4be(0x32c)],_0x16a8f1=_0x1be091??new Date()[_0x4ed4be(0x354)]();console['log'](a61_0x511749['bold']('Workflow:'),_0x3e2687),console[_0x4ed4be(0x2bd)](a61_0x511749['bold'](_0x4ed4be(0x1bc)),_0x16a8f1),console[_0x4ed4be(0x2bd)](a61_0x511749[_0x4ed4be(0x205)](_0x4ed4be(0x21e)),JSON[_0x4ed4be(0x1a5)](_0x2cd75f)),console['log'](''),console[_0x4ed4be(0x2bd)](a61_0x511749[_0x4ed4be(0x205)]('Task\x20graph:'));const _0x2f90c7=parseTaskGraph(_0x19fc39['config']??null);if(_0x2f90c7[_0x4ed4be(0x30c)]===0x0)console[_0x4ed4be(0x2bd)](a61_0x511749[_0x4ed4be(0x305)](_0x4ed4be(0x234)));else for(const _0x4263ee of formatTaskGraph(_0x2f90c7)){console[_0x4ed4be(0x2bd)](_0x4263ee);}const _0x55cc74=summarizeTaskGraph(_0x2f90c7),_0x51e75a=formatWarningSummary(_0x55cc74);return _0x51e75a&&(console[_0x4ed4be(0x2bd)](''),console['log'](a61_0x511749[_0x4ed4be(0x222)](_0x51e75a))),console[_0x4ed4be(0x2bd)](a61_0x511749[_0x4ed4be(0x222)](_0x4ed4be(0x294))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x2d5);['description']=a61_0x50f5d8(0x331);async[a61_0x50f5d8(0x365)](_0x42c6be){const _0x1eb5d3=a61_0x50f5d8,{options:_0x331154,args:_0x321983,tdx:_0x300ba0}=_0x42c6be,_0x548670=_0x321983[0x0],_0x4c9478=_0x321983[0x1]||'.';if(!_0x548670)return console[_0x1eb5d3(0x2b2)](_0x1eb5d3(0x27e)),console[_0x1eb5d3(0x2b2)](_0x1eb5d3(0x35b)),0x1;const _0x376bf7=_0x331154[_0x1eb5d3(0x257)];_0x331154[_0x1eb5d3(0x254)]&&(console[_0x1eb5d3(0x2b2)](_0x1eb5d3(0x260)+_0x548670),console['error']('Output\x20directory:\x20'+_0x4c9478),_0x376bf7&&console[_0x1eb5d3(0x2b2)]('Revision:\x20'+_0x376bf7));const _0x2af06a=await withSpinner(_0x1eb5d3(0x20a)+_0x548670+_0x1eb5d3(0x200),()=>_0x300ba0[_0x1eb5d3(0x1a4)][_0x1eb5d3(0x1ba)](_0x548670,_0x4c9478,{'revision':_0x376bf7}),{'verbose':_0x331154[_0x1eb5d3(0x254)]}),_0x406b40=_0x2af06a['data'];return console['error'](_0x1eb5d3(0x2dc)+_0x406b40[_0x1eb5d3(0x1e1)]),console[_0x1eb5d3(0x2b2)]('\x20\x20Revision:\x20'+_0x406b40[_0x1eb5d3(0x257)]),console[_0x1eb5d3(0x2b2)]('\x20\x20Files\x20extracted:\x20'+_0x406b40[_0x1eb5d3(0x2f3)]),console['error'](_0x1eb5d3(0x2b6)+_0x4c9478+'/'+_0x406b40[_0x1eb5d3(0x1e1)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x1a9);['description']=a61_0x50f5d8(0x2a8);async[a61_0x50f5d8(0x365)](_0x5e148a){const _0x4afdc0=a61_0x50f5d8,{options:_0x2f6cac,args:_0x369288,tdx:_0x50bd3d}=_0x5e148a;let _0x2185cb='.',_0x595925=_0x2f6cac[_0x4afdc0(0x256)];if(_0x369288[0x0]){const {promises:_0x3e0499}=await import('fs');try{const _0xb6ed45=await _0x3e0499['stat'](_0x369288[0x0]);if(_0xb6ed45[_0x4afdc0(0x34f)]())_0x2185cb=_0x369288[0x0];else return console['error'](_0x4afdc0(0x36a)+_0x369288[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x595925=_0x369288[0x0],_0x2185cb='.';}}const _0x5bffd=_0x2f6cac[_0x4afdc0(0x257)],_0x33fe01=_0x2f6cac[_0x4afdc0(0x2ec)];_0x2f6cac[_0x4afdc0(0x254)]&&(console[_0x4afdc0(0x2b2)]('Project\x20directory:\x20'+_0x2185cb),_0x595925&&console[_0x4afdc0(0x2b2)](_0x4afdc0(0x2c5)+_0x595925),_0x5bffd&&console[_0x4afdc0(0x2b2)](_0x4afdc0(0x33e)+_0x5bffd),_0x33fe01&&console[_0x4afdc0(0x2b2)](_0x4afdc0(0x221)));const _0x27a190=await withSpinner(_0x4afdc0(0x2b1),()=>_0x50bd3d[_0x4afdc0(0x1a4)]['push'](_0x2185cb,{'projectName':_0x595925,'revision':_0x5bffd,'skipValidation':_0x33fe01}),{'verbose':_0x2f6cac[_0x4afdc0(0x254)]}),_0x28e93f=_0x27a190['data'];return console[_0x4afdc0(0x2b2)](_0x4afdc0(0x304)+_0x28e93f[_0x4afdc0(0x1e1)]),console[_0x4afdc0(0x2b2)](_0x4afdc0(0x323)+_0x28e93f[_0x4afdc0(0x216)]),console[_0x4afdc0(0x2b2)](_0x4afdc0(0x211)+_0x28e93f[_0x4afdc0(0x257)]),await this[_0x4afdc0(0x31d)](_0x50bd3d,_0x28e93f[_0x4afdc0(0x1e1)],_0x2f6cac[_0x4afdc0(0x1e0)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x2ab);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x286);async[a61_0x50f5d8(0x365)](_0x3538f5){const _0xa36704=a61_0x50f5d8,{options:_0x12576e,args:_0x5da7c7,tdx:_0x1c62da}=_0x3538f5,_0x556834=_0x5da7c7[0x0],_0x48581f=_0x5da7c7[0x1];if(!_0x556834)return console[_0xa36704(0x2b2)](a61_0x511749[_0xa36704(0x345)]('Error:'),_0xa36704(0x27f)),console[_0xa36704(0x2b2)](a61_0x511749['dim'](_0xa36704(0x35a))),0x1;const _0x3df185=_0x12576e['revision'];_0x12576e[_0xa36704(0x254)]&&(console[_0xa36704(0x2b2)]('Project:\x20'+_0x556834),_0x48581f&&console[_0xa36704(0x2b2)]('Target\x20directory:\x20'+_0x48581f),_0x3df185&&console[_0xa36704(0x2b2)](_0xa36704(0x33e)+_0x3df185),_0x12576e[_0xa36704(0x1ca)]&&console[_0xa36704(0x2b2)](_0xa36704(0x25b)));const _0x2c9a6a=await withSpinner('Pulling\x20project\x20'+_0x556834+_0xa36704(0x200),()=>_0x1c62da[_0xa36704(0x1a4)][_0xa36704(0x288)](_0x556834,{'targetDir':_0x48581f,'revision':_0x3df185}),{'verbose':_0x12576e['verbose']}),_0x1560a7=_0x2c9a6a[_0xa36704(0x32c)];_0x1560a7[_0xa36704(0x224)]?console[_0xa36704(0x2b2)](_0xa36704(0x28f)+_0x1560a7['projectName']):console[_0xa36704(0x2b2)](_0xa36704(0x279)+_0x1560a7[_0xa36704(0x1e1)]);console[_0xa36704(0x2b2)](_0xa36704(0x211)+_0x1560a7['revision']),console[_0xa36704(0x2b2)](_0xa36704(0x1dc)+(a61_0x2bb0f7[_0xa36704(0x2d7)](process['cwd'](),_0x1560a7['targetDir'])||'.')),console[_0xa36704(0x2b2)](_0xa36704(0x2b3)+a61_0x511749[_0xa36704(0x27a)]('+'+_0x1560a7[_0xa36704(0x348)][_0xa36704(0x313)]+_0xa36704(0x266))+',\x20'+(a61_0x511749[_0xa36704(0x222)]('~'+_0x1560a7[_0xa36704(0x348)][_0xa36704(0x274)]+_0xa36704(0x311))+',\x20')+(a61_0x511749[_0xa36704(0x345)]('-'+_0x1560a7[_0xa36704(0x348)][_0xa36704(0x282)]+_0xa36704(0x2a5))+',\x20')+(''+a61_0x511749[_0xa36704(0x305)](_0x1560a7[_0xa36704(0x348)][_0xa36704(0x2a0)]+_0xa36704(0x1b6))));for(const _0x7504f5 of _0x1560a7[_0xa36704(0x276)]){_0x7504f5[_0xa36704(0x316)]==='modified'&&_0x7504f5[_0xa36704(0x28c)]&&(console[_0xa36704(0x2b2)]('\x0a'+a61_0x511749['cyan'](_0xa36704(0x2cf)+_0x7504f5[_0xa36704(0x283)])),console['error'](_0x7504f5[_0xa36704(0x28c)]));}if(!_0x1560a7[_0xa36704(0x243)])return saveSessionContext({'workflow_project':_0x1560a7[_0xa36704(0x1e1)]},_0x12576e[_0xa36704(0x32b)]),console[_0xa36704(0x2b2)](a61_0x511749[_0xa36704(0x27a)]('\x0a✔\x20Already\x20up\x20to\x20date')),console[_0xa36704(0x2b2)](a61_0x511749['dim'](_0xa36704(0x1f0)+_0x1560a7[_0xa36704(0x1e1)])),0x0;if(_0x12576e[_0xa36704(0x1ca)])return console[_0xa36704(0x2b2)](a61_0x511749[_0xa36704(0x222)](_0xa36704(0x1f8))),0x0;if(!_0x12576e['yes']){if(!isInteractive())return console[_0xa36704(0x2b2)](a61_0x511749['red'](_0xa36704(0x32e)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0xa36704(0x2b2)](a61_0x511749[_0xa36704(0x305)](_0xa36704(0x2f6))),0x1;const _0x46a486=await confirmKey(_0xa36704(0x1e6));if(!_0x46a486)return console['error'](a61_0x511749[_0xa36704(0x222)]('Cancelled'),_0xa36704(0x1e7)),0x1;}await withSpinner(_0xa36704(0x1cb),()=>_0x1c62da['workflow'][_0xa36704(0x1c7)](_0x1560a7,{'revision':_0x3df185}),{'verbose':_0x12576e[_0xa36704(0x254)]}),saveSessionContext({'workflow_project':_0x1560a7['projectName']},_0x12576e['session']),console[_0xa36704(0x2b2)](a61_0x511749[_0xa36704(0x27a)](_0xa36704(0x34e)));const _0xa9c581=a61_0x2bb0f7['relative'](process[_0xa36704(0x2a7)](),_0x1560a7[_0xa36704(0x34d)])||'.';return console['error'](a61_0x511749[_0xa36704(0x305)](_0xa36704(0x2b6)+_0xa9c581)),console[_0xa36704(0x2b2)](a61_0x511749[_0xa36704(0x305)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1560a7[_0xa36704(0x1e1)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x281);['description']=a61_0x50f5d8(0x2ba);async[a61_0x50f5d8(0x365)](_0x43d6d6){const _0x2f2faf=a61_0x50f5d8,{options:_0x309153,args:_0x143573,tdx:_0x4fa379}=_0x43d6d6,_0x1397f9=this[_0x2f2faf(0x265)](_0x143573,_0x309153),_0x4842d7=_0x309153,{revision:_0x4da5c1,skipValidation:_0x23605e,backfill:_0x2dff49}=_0x4842d7,_0x1c86e9=_0x2dff49===undefined?undefined:!_0x2dff49;_0x309153['verbose']&&(_0x1397f9&&console[_0x2f2faf(0x2b2)](_0x2f2faf(0x298)+_0x1397f9),_0x4da5c1&&console[_0x2f2faf(0x2b2)]('Revision:\x20'+_0x4da5c1),_0x309153[_0x2f2faf(0x1ca)]&&console[_0x2f2faf(0x2b2)](_0x2f2faf(0x25b)),_0x23605e&&console['error']('Validation:\x20skipped'),_0x2dff49&&console[_0x2f2faf(0x2b2)]('Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)'));let _0x1a4d95;try{_0x1a4d95=await withSpinner(_0x2f2faf(0x306),()=>_0x4fa379[_0x2f2faf(0x1a4)][_0x2f2faf(0x1c0)]({'sourceDir':_0x1397f9,'revision':_0x4da5c1,'skipValidation':_0x23605e,'skipSchedule':_0x1c86e9}),{'verbose':_0x309153[_0x2f2faf(0x254)]});}catch(_0x478ba1){if(_0x478ba1 instanceof Error&&_0x478ba1['message'][_0x2f2faf(0x24a)]('No\x20workflow\x20tdx.json\x20found'))return console[_0x2f2faf(0x2b2)](a61_0x511749[_0x2f2faf(0x345)](_0x2f2faf(0x1b4)),_0x2f2faf(0x226)),_0x309153[_0x2f2faf(0x1e8)]?console[_0x2f2faf(0x2b2)](a61_0x511749[_0x2f2faf(0x305)](_0x2f2faf(0x235)+_0x309153[_0x2f2faf(0x1e8)]+_0x2f2faf(0x231)+_0x309153[_0x2f2faf(0x1e8)]+'\x27')):console['error'](a61_0x511749[_0x2f2faf(0x305)](_0x2f2faf(0x272))),0x1;throw _0x478ba1;}const _0xbe8248=_0x1a4d95[_0x2f2faf(0x32c)];console[_0x2f2faf(0x2b2)]('✔\x20Project:\x20'+_0xbe8248[_0x2f2faf(0x1e1)]),console['error'](_0x2f2faf(0x29b)+_0xbe8248[_0x2f2faf(0x30e)]),console[_0x2f2faf(0x2b2)](_0x2f2faf(0x211)+_0xbe8248[_0x2f2faf(0x257)]),console['error']('\x20\x20Changes:\x20'+a61_0x511749[_0x2f2faf(0x27a)]('+'+_0xbe8248[_0x2f2faf(0x348)][_0x2f2faf(0x313)]+_0x2f2faf(0x266))+',\x20'+(a61_0x511749[_0x2f2faf(0x222)]('~'+_0xbe8248[_0x2f2faf(0x348)][_0x2f2faf(0x274)]+_0x2f2faf(0x311))+',\x20')+(a61_0x511749['red']('-'+_0xbe8248['summary'][_0x2f2faf(0x282)]+_0x2f2faf(0x2a5))+',\x20')+(''+a61_0x511749[_0x2f2faf(0x305)](_0xbe8248[_0x2f2faf(0x348)]['unchanged']+_0x2f2faf(0x1b6))));for(const _0xd689f9 of _0xbe8248[_0x2f2faf(0x276)]){_0xd689f9[_0x2f2faf(0x316)]===_0x2f2faf(0x274)&&_0xd689f9[_0x2f2faf(0x28c)]&&(console[_0x2f2faf(0x2b2)]('\x0a'+a61_0x511749['cyan'](_0x2f2faf(0x2cf)+_0xd689f9[_0x2f2faf(0x283)])),console[_0x2f2faf(0x2b2)](_0xd689f9[_0x2f2faf(0x28c)]));}if(!_0xbe8248[_0x2f2faf(0x243)])return console[_0x2f2faf(0x2b2)](a61_0x511749[_0x2f2faf(0x27a)](_0x2f2faf(0x300))),await this[_0x2f2faf(0x31d)](_0x4fa379,_0xbe8248[_0x2f2faf(0x1e1)],_0x309153[_0x2f2faf(0x1e0)]),0x0;if(_0x309153[_0x2f2faf(0x1ca)])return console['error'](a61_0x511749[_0x2f2faf(0x222)](_0x2f2faf(0x20d))),0x0;if(!_0x309153[_0x2f2faf(0x1c5)]){if(!isInteractive())return console[_0x2f2faf(0x2b2)](a61_0x511749[_0x2f2faf(0x345)](_0x2f2faf(0x32e)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x2f2faf(0x2b2)](a61_0x511749[_0x2f2faf(0x305)](_0x2f2faf(0x2f6))),0x1;const _0x1b3716=await confirmKey(_0x2f2faf(0x21a));if(!_0x1b3716)return console[_0x2f2faf(0x2b2)](a61_0x511749[_0x2f2faf(0x222)](_0x2f2faf(0x371)),_0x2f2faf(0x29d)),0x1;}const _0x23399e=await withSpinner('Pushing\x20project...',()=>_0x4fa379[_0x2f2faf(0x1a4)][_0x2f2faf(0x1e9)](_0xbe8248),{'verbose':_0x309153[_0x2f2faf(0x254)]}),_0x2d353a=_0x23399e[_0x2f2faf(0x32c)];return console[_0x2f2faf(0x2b2)](a61_0x511749['green'](_0x2f2faf(0x2c1))),console['error'](_0x2f2faf(0x323)+_0x2d353a[_0x2f2faf(0x216)]),console[_0x2f2faf(0x2b2)](_0x2f2faf(0x211)+_0x2d353a[_0x2f2faf(0x257)]),await this[_0x2f2faf(0x31d)](_0x4fa379,_0x2d353a['projectName'],_0x309153['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x287);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x2a3);async[a61_0x50f5d8(0x365)](_0x29dfa3){const _0x44c3a4=a61_0x50f5d8,{options:_0x8a509b,args:_0x4c6de9,tdx:_0x584e89}=_0x29dfa3,_0x44d856=this[_0x44c3a4(0x265)](_0x4c6de9,_0x8a509b),_0x2397a2=_0x8a509b[_0x44c3a4(0x256)],_0x1ea148=_0x8a509b[_0x44c3a4(0x257)],_0x4896ae=_0x8a509b[_0x44c3a4(0x2ec)];if(!_0x44d856)return console[_0x44c3a4(0x2b2)](a61_0x511749['red']('Error:'),'Source\x20directory\x20is\x20required'),console['error'](a61_0x511749[_0x44c3a4(0x305)](_0x44c3a4(0x22b))),console['error'](a61_0x511749[_0x44c3a4(0x305)](_0x44c3a4(0x337))),0x1;if(!_0x2397a2)return console['error'](a61_0x511749[_0x44c3a4(0x345)](_0x44c3a4(0x1b4)),_0x44c3a4(0x318)),console[_0x44c3a4(0x2b2)](a61_0x511749[_0x44c3a4(0x305)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x8a509b[_0x44c3a4(0x254)]&&(console[_0x44c3a4(0x2b2)](_0x44c3a4(0x298)+_0x44d856),console['error'](_0x44c3a4(0x293)+_0x2397a2),_0x1ea148&&console[_0x44c3a4(0x2b2)](_0x44c3a4(0x33e)+_0x1ea148),_0x8a509b[_0x44c3a4(0x1ca)]&&console[_0x44c3a4(0x2b2)]('Dry\x20run:\x20yes'),_0x4896ae&&console[_0x44c3a4(0x2b2)]('Validation:\x20skipped'));const _0x14a3ff=await withSpinner(_0x44c3a4(0x299),()=>_0x584e89[_0x44c3a4(0x1a4)][_0x44c3a4(0x2f8)](_0x44d856,_0x2397a2,{'revision':_0x1ea148,'skipValidation':_0x4896ae}),{'verbose':_0x8a509b['verbose']}),_0x3d5c79=_0x14a3ff[_0x44c3a4(0x32c)];console[_0x44c3a4(0x2b2)](_0x44c3a4(0x359)+_0x3d5c79['sourceDir']);_0x3d5c79[_0x44c3a4(0x263)]&&console[_0x44c3a4(0x2b2)](_0x44c3a4(0x296)+_0x3d5c79[_0x44c3a4(0x263)]);console[_0x44c3a4(0x2b2)](_0x44c3a4(0x293)+_0x3d5c79[_0x44c3a4(0x31f)]),console[_0x44c3a4(0x2b2)](_0x44c3a4(0x33e)+_0x3d5c79[_0x44c3a4(0x257)]),console[_0x44c3a4(0x2b2)](_0x44c3a4(0x2c2)+_0x3d5c79[_0x44c3a4(0x356)]);_0x3d5c79[_0x44c3a4(0x273)]&&(console[_0x44c3a4(0x2b2)](a61_0x511749[_0x44c3a4(0x222)](_0x44c3a4(0x2fc)+_0x3d5c79['newProjectName']+_0x44c3a4(0x267)+_0x3d5c79['existingProjectId']+')')),console[_0x44c3a4(0x2b2)](a61_0x511749[_0x44c3a4(0x222)](_0x44c3a4(0x1d0))));if(_0x8a509b[_0x44c3a4(0x1ca)])return console[_0x44c3a4(0x2b2)](a61_0x511749['yellow'](_0x44c3a4(0x2bc))),0x0;if(!_0x8a509b[_0x44c3a4(0x1c5)]){if(!isInteractive())return console[_0x44c3a4(0x2b2)](a61_0x511749['red']('\x0aError:'),_0x44c3a4(0x2c8)),console[_0x44c3a4(0x2b2)](a61_0x511749['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x5ba9f5=_0x3d5c79[_0x44c3a4(0x263)]||a61_0x2bb0f7[_0x44c3a4(0x1af)](_0x44d856),_0x358517=_0x3d5c79[_0x44c3a4(0x273)]?_0x44c3a4(0x36e)+_0x2397a2+_0x44c3a4(0x346):_0x44c3a4(0x312)+_0x5ba9f5+_0x44c3a4(0x245)+_0x2397a2+'\x22?',_0x4a7d07=await confirmKey(_0x358517);if(!_0x4a7d07)return console[_0x44c3a4(0x2b2)](a61_0x511749['yellow'](_0x44c3a4(0x371))),0x1;}const _0x38642e=await withSpinner(_0x3d5c79[_0x44c3a4(0x273)]?_0x44c3a4(0x2e8)+_0x2397a2+_0x44c3a4(0x200):_0x44c3a4(0x1c9)+_0x2397a2+_0x44c3a4(0x200),()=>_0x584e89[_0x44c3a4(0x1a4)]['executeCloneProject'](_0x3d5c79),{'verbose':_0x8a509b[_0x44c3a4(0x254)]}),_0x598f28=_0x38642e[_0x44c3a4(0x32c)];return console['error'](a61_0x511749[_0x44c3a4(0x27a)](_0x3d5c79[_0x44c3a4(0x273)]?_0x44c3a4(0x292):_0x44c3a4(0x34b))),console[_0x44c3a4(0x2b2)](_0x44c3a4(0x2aa)+_0x598f28['newProjectName']),console['error'](_0x44c3a4(0x323)+_0x598f28['newProjectId']),console[_0x44c3a4(0x2b2)]('\x20\x20Revision:\x20'+_0x598f28['revision']),await this['showWorkflowConsoleUrl'](_0x584e89,_0x598f28[_0x44c3a4(0x31f)],_0x8a509b['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a61_0x50f5d8(0x256)]='workflow:delete';[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x355);async['execute'](_0x509d43){const _0x183f01=a61_0x50f5d8,{options:_0x595e45,args:_0x1924d,tdx:_0x2593b9}=_0x509d43,_0x27bdca=_0x1924d[0x0];if(!_0x27bdca)return console[_0x183f01(0x2b2)](_0x183f01(0x207)),console[_0x183f01(0x2b2)](_0x183f01(0x24e)),0x1;_0x595e45[_0x183f01(0x254)]&&console[_0x183f01(0x2b2)](_0x183f01(0x260)+_0x27bdca);if(!_0x595e45['yes']){if(!isInteractive())return console['error'](a61_0x511749['red'](_0x183f01(0x32e)),_0x183f01(0x2c8)),console[_0x183f01(0x2b2)](a61_0x511749[_0x183f01(0x305)](_0x183f01(0x2f6))),0x1;const _0x286a8e=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x27bdca+_0x183f01(0x1de));if(!_0x286a8e)return console[_0x183f01(0x2b2)](a61_0x511749[_0x183f01(0x222)]('Cancelled')),0x1;}const _0x515168=await withSpinner('Deleting\x20project\x20'+_0x27bdca+_0x183f01(0x200),()=>_0x2593b9[_0x183f01(0x1a4)][_0x183f01(0x1ab)](_0x27bdca),{'verbose':_0x595e45['verbose']}),_0x9c9f73=_0x515168[_0x183f01(0x32c)];return console[_0x183f01(0x2b2)](_0x183f01(0x26c)+_0x9c9f73[_0x183f01(0x1e1)]),console[_0x183f01(0x2b2)]('\x20\x20Project\x20ID:\x20'+_0x9c9f73[_0x183f01(0x216)]),0x0;}}export function parseKeyValue(_0x375afb){const _0x4eb9df=a61_0x50f5d8,_0x90e9fa=_0x375afb[_0x4eb9df(0x1ea)]('=');if(_0x90e9fa===-0x1)throw new Error(_0x4eb9df(0x1d5)+_0x375afb+'.\x20Expected\x20format:\x20KEY=VALUE');const _0x1686b1=_0x375afb['substring'](0x0,_0x90e9fa),_0x48f2c7=_0x375afb[_0x4eb9df(0x278)](_0x90e9fa+0x1);if(!_0x1686b1)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x1686b1,'value':_0x48f2c7};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x2af);['description']=a61_0x50f5d8(0x33b);async[a61_0x50f5d8(0x365)](_0x543230){const _0x488047=a61_0x50f5d8,{options:_0x56c138,args:_0x1f9aba,tdx:_0x5a2eb6}=_0x543230,_0x1fd82b=this[_0x488047(0x219)](_0x1f9aba,_0x56c138);if(!_0x1fd82b)return 0x1;_0x56c138['verbose']&&console[_0x488047(0x2b2)]('Project:\x20'+_0x1fd82b);const _0x33b9b0=await withSpinner(_0x488047(0x2ac),()=>_0x5a2eb6[_0x488047(0x1a4)][_0x488047(0x2cb)](_0x1fd82b),{'verbose':_0x56c138[_0x488047(0x254)]}),{secrets:_0x1e7c6b}=_0x33b9b0[_0x488047(0x32c)];return console[_0x488047(0x2b2)](_0x488047(0x297)+_0x1e7c6b['length']+_0x488047(0x258)+(_0x1e7c6b[_0x488047(0x30c)]!==0x1?'s':'')),await handleSDKOutput(_0x1e7c6b,_0x56c138),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x295);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x20b);async[a61_0x50f5d8(0x365)](_0x51fb2a){const _0x109be6=a61_0x50f5d8,{options:_0x174635,args:_0xa81682,tdx:_0x41bd31}=_0x51fb2a;let _0x282353,_0x445c73;if(_0xa81682[_0x109be6(0x30c)]>=0x1&&!_0xa81682[0x0][_0x109be6(0x24a)]('='))_0x282353=_0xa81682[0x0],_0x445c73=_0xa81682[_0x109be6(0x209)](0x1);else{if(_0xa81682[_0x109be6(0x30c)]>=0x1&&_0x174635[_0x109be6(0x1e8)])_0x282353=_0x174635[_0x109be6(0x1e8)],_0x445c73=_0xa81682;else return _0xa81682['length']>=0x1?(console[_0x109be6(0x2b2)](_0x109be6(0x27e)),console[_0x109be6(0x2b2)](_0x109be6(0x369)),0x1):(console['error']('Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required'),console[_0x109be6(0x2b2)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1);}if(_0x445c73[_0x109be6(0x30c)]===0x0)return console[_0x109be6(0x2b2)](_0x109be6(0x36c)),console[_0x109be6(0x2b2)](_0x109be6(0x1bf)),0x1;const _0x59a049={};try{for(const _0x4bf43a of _0x445c73){const {key:_0x44e463,value:_0x3bc257}=parseKeyValue(_0x4bf43a);_0x59a049[_0x44e463]=_0x3bc257;}}catch(_0x45c11e){return _0x45c11e instanceof Error&&console[_0x109be6(0x2b2)](a61_0x511749[_0x109be6(0x345)](_0x109be6(0x1b4)),_0x45c11e[_0x109be6(0x2cc)]),0x1;}const _0x3f5f9b=Object[_0x109be6(0x20f)](_0x59a049);_0x174635['verbose']&&(console[_0x109be6(0x2b2)](_0x109be6(0x260)+_0x282353),console['error'](_0x109be6(0x336)+_0x3f5f9b['join'](',\x20')));const _0x25b196=await withSpinner(_0x3f5f9b[_0x109be6(0x30c)]===0x1?_0x109be6(0x229):_0x109be6(0x22f)+_0x3f5f9b['length']+'\x20secrets...',()=>_0x41bd31[_0x109be6(0x1a4)][_0x109be6(0x32a)](_0x282353,_0x59a049),{'verbose':_0x174635[_0x109be6(0x254)]}),_0x17ffe6=_0x25b196[_0x109be6(0x32c)];return console[_0x109be6(0x2b2)](_0x3f5f9b[_0x109be6(0x30c)]===0x1?_0x109be6(0x25c)+_0x17ffe6[_0x109be6(0x20f)][0x0]+_0x109be6(0x349)+_0x17ffe6[_0x109be6(0x1e1)]+'\x27':'✔\x20'+_0x17ffe6[_0x109be6(0x20f)]['length']+'\x20secrets\x20set\x20for\x20project\x20\x27'+_0x17ffe6[_0x109be6(0x1e1)]+'\x27'),(_0x174635['json']||_0x174635[_0x109be6(0x1b3)])&&await handleSingleObjectOutput(_0x17ffe6,_0x174635),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]='workflow:secrets:delete';['description']=a61_0x50f5d8(0x358);async[a61_0x50f5d8(0x365)](_0x4ceae8){const _0x576b77=a61_0x50f5d8,{options:_0x23baae,args:_0x28287c,tdx:_0x2abbd5}=_0x4ceae8;let _0x1d15ab,_0x17b829;if(_0x28287c[_0x576b77(0x30c)]>=0x2)_0x1d15ab=_0x28287c[0x0],_0x17b829=_0x28287c[0x1];else{if(_0x28287c[_0x576b77(0x30c)]===0x1&&_0x23baae['workflowProject'])_0x1d15ab=_0x23baae['workflowProject'],_0x17b829=_0x28287c[0x0];else return _0x28287c[_0x576b77(0x30c)]===0x1?(console['error'](_0x576b77(0x27e)),console[_0x576b77(0x2b2)](_0x576b77(0x369)),0x1):(console[_0x576b77(0x2b2)](_0x576b77(0x1f6)),console[_0x576b77(0x2b2)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x23baae[_0x576b77(0x254)]&&(console[_0x576b77(0x2b2)](_0x576b77(0x260)+_0x1d15ab),console[_0x576b77(0x2b2)](_0x576b77(0x353)+_0x17b829));if(!_0x23baae[_0x576b77(0x1c5)]){if(!isInteractive())return console[_0x576b77(0x2b2)](a61_0x511749[_0x576b77(0x345)]('\x0aError:'),_0x576b77(0x2c8)),console[_0x576b77(0x2b2)](a61_0x511749[_0x576b77(0x305)](_0x576b77(0x2f6))),0x1;const _0x383e60=await confirmKey(_0x576b77(0x271)+_0x17b829+_0x576b77(0x2b4)+_0x1d15ab+'\x27?');if(!_0x383e60)return console[_0x576b77(0x2b2)](a61_0x511749[_0x576b77(0x222)](_0x576b77(0x371))),0x1;}const _0x48d5ab=await withSpinner(_0x576b77(0x23a),()=>_0x2abbd5[_0x576b77(0x1a4)][_0x576b77(0x31b)](_0x1d15ab,_0x17b829),{'verbose':_0x23baae[_0x576b77(0x254)]}),_0x594398=_0x48d5ab[_0x576b77(0x32c)];return console['error']('✔\x20Secret\x20\x27'+_0x594398[_0x576b77(0x1be)]+_0x576b77(0x330)+_0x594398[_0x576b77(0x1e1)]+'\x27'),(_0x23baae[_0x576b77(0x1f4)]||_0x23baae[_0x576b77(0x1b3)])&&await handleSingleObjectOutput(_0x594398,_0x23baae),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(_0x524905){const _0x3bf791=a61_0x50f5d8,_0x48fb6c=Math[_0x3bf791(0x309)](_0x524905/0x3e8),_0x8c7b95=Math[_0x3bf791(0x309)](_0x48fb6c/0x3c),_0x2d2a4d=Math[_0x3bf791(0x309)](_0x8c7b95/0x3c),_0x119931=Math['floor'](_0x2d2a4d/0x18);if(_0x119931>0x0){const _0x29aa14=_0x2d2a4d%0x18;return _0x29aa14>0x0?_0x119931+'d\x20'+_0x29aa14+'h':_0x119931+'d';}else{if(_0x2d2a4d>0x0){const _0x2f8152=_0x8c7b95%0x3c;return _0x2f8152>0x0?_0x2d2a4d+'h\x20'+_0x2f8152+'m':_0x2d2a4d+'h';}else{if(_0x8c7b95>0x0){const _0x3d51e3=_0x48fb6c%0x3c;return _0x3d51e3>0x0?_0x8c7b95+'m\x20'+_0x3d51e3+'s':_0x8c7b95+'m';}else return _0x48fb6c+'s';}}}function formatTimestamp(_0x1d5d81,_0x153069){const _0x5be787=a61_0x50f5d8,_0x44bedf=new Date(_0x1d5d81),_0x2135e6=String(_0x44bedf[_0x5be787(0x30f)]())[_0x5be787(0x2bb)](0x2,'0'),_0x59eebe=String(_0x44bedf[_0x5be787(0x237)]())['padStart'](0x2,'0'),_0x3bf9c5=_0x2135e6+':'+_0x59eebe,_0x1e9a18=_0x44bedf[_0x5be787(0x31c)]()===_0x153069['getFullYear']()&&_0x44bedf[_0x5be787(0x1eb)]()===_0x153069[_0x5be787(0x1eb)]()&&_0x44bedf[_0x5be787(0x30b)]()===_0x153069['getDate']();if(_0x1e9a18)return _0x3bf9c5;else{const _0x3ad385=String(_0x44bedf[_0x5be787(0x1eb)]()+0x1)[_0x5be787(0x2bb)](0x2,'0'),_0x4c71e7=String(_0x44bedf['getDate']())[_0x5be787(0x2bb)](0x2,'0');return _0x3ad385+'-'+_0x4c71e7+'\x20'+_0x3bf9c5;}}function formatDate(_0x215569){const _0x286ace=a61_0x50f5d8,_0x36a696=_0x215569['getFullYear'](),_0x32b4ca=String(_0x215569[_0x286ace(0x1eb)]()+0x1)[_0x286ace(0x2bb)](0x2,'0'),_0x1c272f=String(_0x215569[_0x286ace(0x30b)]())['padStart'](0x2,'0');return _0x36a696+'-'+_0x32b4ca+'-'+_0x1c272f;}function getTaskStateIcon(_0x4c2b2d){const _0x59638f={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x59638f[_0x4c2b2d]||'⚪';}function getBarChar(_0x5dcd1b){const _0x355237=a61_0x50f5d8;return _0x5dcd1b===_0x355237(0x2b2)||_0x5dcd1b===_0x355237(0x324)?'×':'─';}function getBarColor(_0x2def81){const _0x2499b5=a61_0x50f5d8,_0x3c62bc={'success':a61_0x511749[_0x2499b5(0x27a)],'error':a61_0x511749[_0x2499b5(0x345)],'group_error':a61_0x511749[_0x2499b5(0x345)],'running':a61_0x511749[_0x2499b5(0x1fa)],'blocked':a61_0x511749[_0x2499b5(0x222)],'planned':a61_0x511749[_0x2499b5(0x305)],'canceling':a61_0x511749[_0x2499b5(0x222)]};return _0x3c62bc[_0x2def81]||a61_0x511749['white'];}function parseTaskName(_0x477efe){const _0x4ad8cc=a61_0x50f5d8;let _0x3aba91=_0x477efe[_0x4ad8cc(0x37f)](/^\++/,'');const _0x416ea8=_0x3aba91[_0x4ad8cc(0x2be)]('+'),_0x2f1e51=_0x416ea8[_0x4ad8cc(0x30c)]>0x1?_0x416ea8[_0x4ad8cc(0x30c)]-0x2:0x0,_0x367c6d=_0x416ea8[_0x416ea8[_0x4ad8cc(0x30c)]-0x1]||_0x3aba91;return{'level':_0x2f1e51,'name':'+'+_0x367c6d};}function truncateTaskName(_0x481bef,_0x43fddf){const _0x18108d=a61_0x50f5d8,_0x1ee32e=stringWidth(_0x481bef);if(_0x1ee32e<=_0x43fddf)return _0x481bef;let _0x4eb7bd=_0x481bef;while(stringWidth(_0x4eb7bd+'…')>_0x43fddf&&_0x4eb7bd[_0x18108d(0x30c)]>0x0){_0x4eb7bd=_0x4eb7bd[_0x18108d(0x209)](0x0,-0x1);}return _0x4eb7bd+'…';}function calculateTimeScale(_0x399fd9,_0x97c186){const _0x17cd8e=a61_0x50f5d8;return{'startTime':_0x399fd9[_0x17cd8e(0x2a4)],'endTime':_0x399fd9[_0x17cd8e(0x203)],'durationMs':_0x399fd9['duration'],'msPerChar':_0x399fd9['duration']/_0x97c186};}function timeToPosition(_0x4e9477,_0x5a7b0f,_0x4e96de){const _0x28e34f=a61_0x50f5d8,_0x2f9c51=_0x4e9477-_0x5a7b0f[_0x28e34f(0x2df)],_0x2f12d7=Math[_0x28e34f(0x309)](_0x2f9c51/_0x5a7b0f['msPerChar']);return Math[_0x28e34f(0x37a)](0x0,Math[_0x28e34f(0x27b)](_0x2f12d7,_0x4e96de));}function renderTimeAxis(_0x40f28a,_0x105a38){const _0x22fd92=a61_0x50f5d8,_0x482625=Math[_0x22fd92(0x27b)](TIMELINE_CONFIG['MAX_LABEL_COUNT'],Math[_0x22fd92(0x37a)](TIMELINE_CONFIG[_0x22fd92(0x1c6)],Math['floor'](_0x105a38/TIMELINE_CONFIG[_0x22fd92(0x321)]))),_0xa06126=_0x40f28a[_0x22fd92(0x35f)]/(_0x482625-0x1),_0x7d8442=new Date(_0x40f28a[_0x22fd92(0x2df)]),_0x5c4c25=[];for(let _0x436b7c=0x0;_0x436b7c<_0x482625;_0x436b7c++){const _0x32e686=_0x40f28a[_0x22fd92(0x2df)]+_0x436b7c*_0xa06126,_0x5e6d7d=timeToPosition(_0x32e686,_0x40f28a,_0x105a38),_0x16b272=formatTimestamp(_0x32e686,_0x7d8442);_0x5c4c25[_0x22fd92(0x246)]({'pos':_0x5e6d7d,'text':_0x16b272});}const _0x1dae6e=new Array(_0x105a38)['fill']('\x20');let _0x5024ab=-0x1;for(const {pos:_0x1e42f1,text:_0x2047af}of _0x5c4c25){let _0x154f8f=Math['max'](0x0,_0x1e42f1-Math[_0x22fd92(0x309)](_0x2047af['length']/0x2));_0x154f8f<=_0x5024ab+TIMELINE_CONFIG[_0x22fd92(0x2d9)]&&(_0x154f8f=_0x5024ab+TIMELINE_CONFIG[_0x22fd92(0x2d9)]+0x1);_0x154f8f+_0x2047af[_0x22fd92(0x30c)]>_0x105a38&&(_0x154f8f=_0x105a38-_0x2047af[_0x22fd92(0x30c)]);if(_0x154f8f>=0x0&&_0x154f8f+_0x2047af[_0x22fd92(0x30c)]<=_0x105a38&&_0x154f8f>_0x5024ab){for(let _0x2c3fae=0x0;_0x2c3fae<_0x2047af[_0x22fd92(0x30c)];_0x2c3fae++){_0x1dae6e[_0x154f8f+_0x2c3fae]=_0x2047af[_0x2c3fae];}_0x5024ab=_0x154f8f+_0x2047af['length']-0x1;}}return _0x1dae6e['join']('');}function renderTaskRow(_0x9c51fc,_0x5dc070,_0x34ce6e,_0x2f381d){const _0x436160=a61_0x50f5d8,{level:_0x52a1b5,name:_0xb10ae7}=parseTaskName(_0x9c51fc[_0x436160(0x256)]),_0x1b5d45='\x20'[_0x436160(0x1ae)](_0x52a1b5),_0x3be352=_0x9c51fc[_0x436160(0x1f2)]?'('+formatElapsed(_0x9c51fc[_0x436160(0x1f2)]['duration'])+')':'',_0x558e9d=stringWidth(_0x3be352),_0x4a9109=_0x52a1b5*0x1,_0x1ad1fa=_0x2f381d-_0x4a9109-_0x558e9d-0x1,_0x5b1041=truncateTaskName(_0xb10ae7,_0x1ad1fa),_0x2fbbf7=_0x1b5d45+_0x5b1041,_0x488d51=stringWidth(_0x2fbbf7),_0x32111e=_0x2f381d-_0x488d51-_0x558e9d,_0x1fa34d=_0x2fbbf7+'\x20'[_0x436160(0x1ae)](Math[_0x436160(0x37a)](0x1,_0x32111e))+a61_0x511749['dim'](_0x3be352),_0x4a9fc2=getTaskStateIcon(_0x9c51fc['state']),_0x3389f9=new Array(_0x34ce6e)['fill']('\x20');if(_0x9c51fc[_0x436160(0x1f2)]){const _0x105476=timeToPosition(_0x9c51fc['window'][_0x436160(0x2a4)],_0x5dc070,_0x34ce6e),_0x37d54d=timeToPosition(_0x9c51fc[_0x436160(0x1f2)]['end'],_0x5dc070,_0x34ce6e),_0x3ce021=getBarChar(_0x9c51fc[_0x436160(0x255)]),_0x3d1ed0=Math[_0x436160(0x37a)](_0x105476+0x1,_0x37d54d);for(let _0x1bdde8=_0x105476;_0x1bdde8<Math[_0x436160(0x27b)](_0x3d1ed0,_0x34ce6e);_0x1bdde8++){_0x3389f9[_0x1bdde8]=_0x3ce021;}}const _0x100a11=getBarColor(_0x9c51fc[_0x436160(0x255)]),_0x3654f3=_0x3389f9[_0x436160(0x2e0)](_0x5c7b34=>_0x5c7b34==='\x20'?'\x20':_0x100a11(_0x5c7b34))['join']('');return _0x4a9fc2+'\x20'+_0x1fa34d+'│'+_0x3654f3+'│';}function calculateStats(_0x3801b0){const _0x1caa69=a61_0x50f5d8,_0x15981b={'total':_0x3801b0[_0x1caa69(0x30c)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x287748 of _0x3801b0){if(_0x287748['state']===_0x1caa69(0x2fa))_0x15981b['success']++;else{if(_0x287748[_0x1caa69(0x255)]===_0x1caa69(0x2b2)||_0x287748[_0x1caa69(0x255)]===_0x1caa69(0x324))_0x15981b[_0x1caa69(0x2b2)]++;else _0x287748[_0x1caa69(0x255)]===_0x1caa69(0x223)?_0x15981b[_0x1caa69(0x223)]++:_0x15981b[_0x1caa69(0x320)]++;}}return _0x15981b;}function formatStats(_0x5d2118){const _0x3755b4=a61_0x50f5d8;return[_0x3755b4(0x314)+_0x5d2118[_0x3755b4(0x1cf)],'✅\x20'+_0x5d2118[_0x3755b4(0x2fa)],'❌\x20'+_0x5d2118[_0x3755b4(0x2b2)],_0x3755b4(0x29a)+_0x5d2118['running'],'⏳\x20'+_0x5d2118['pending']][_0x3755b4(0x264)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x1a2);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x1e3);async['execute'](_0x187c2f){const _0x45ca74=a61_0x50f5d8,{options:_0xdc1da,args:_0x3d812c,tdx:_0x11bc05}=_0x187c2f;let _0x233049,_0x225681,_0x27ea3f=![];if(_0x3d812c[0x0]){if(_0x3d812c[0x0]['includes']('.')){const _0x365f28=this['parseProjectWorkflowPattern'](_0x3d812c,_0xdc1da);if(!_0x365f28)return 0x1;_0x233049=_0x365f28[_0x45ca74(0x1e1)],_0x225681=_0x365f28[_0x45ca74(0x284)];}else{_0x225681=_0x3d812c[0x0],_0x233049=_0xdc1da[_0x45ca74(0x1e8)];if(!_0x233049)return console[_0x45ca74(0x2b2)](a61_0x511749['red']('Error:'),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x27ea3f=!![];}}else{const _0x4b567e=this[_0x45ca74(0x301)](_0x3d812c,_0xdc1da);if(!_0x4b567e)return 0x1;_0x233049=_0x4b567e[_0x45ca74(0x1e1)],_0x225681=_0x4b567e[_0x45ca74(0x284)];}if(_0xdc1da[_0x45ca74(0x254)]){if(_0x233049&&_0x225681)console[_0x45ca74(0x2b2)](_0x45ca74(0x2f1)+_0x233049+'.'+_0x225681);else _0x233049&&console[_0x45ca74(0x2b2)](_0x45ca74(0x315)+_0x233049);}const _0x573757=_0xdc1da[_0x45ca74(0x1bb)],_0x32ee7c=_0xdc1da[_0x45ca74(0x22e)];if(_0x573757){_0x32ee7c&&console['error'](a61_0x511749['yellow'](_0x45ca74(0x307)),_0x45ca74(0x1cd));const _0x5e7f55=_0xdc1da[_0x45ca74(0x218)];return _0x5e7f55?await this['pollTimeline'](_0x187c2f,_0x573757):await this[_0x45ca74(0x310)](_0x187c2f,_0x573757,_0xdc1da),0x0;}if(_0x32ee7c){const _0x5c1f22=await withSpinner(_0x45ca74(0x340),()=>_0x11bc05[_0x45ca74(0x1a4)][_0x45ca74(0x2fb)]({'projectName':_0x233049,'workflowName':_0x225681,'limit':0x64}),{'verbose':_0xdc1da[_0x45ca74(0x254)]}),_0x161210=_0x5c1f22[_0x45ca74(0x32c)]['find'](_0x14cc25=>_0x14cc25['id']===_0x32ee7c);if(!_0x161210)return console[_0x45ca74(0x2b2)](a61_0x511749[_0x45ca74(0x345)](_0x45ca74(0x1b4)),_0x45ca74(0x1f5)+_0x32ee7c),0x1;if(!_0x161210[_0x45ca74(0x24d)]?.['id'])return console[_0x45ca74(0x2b2)](a61_0x511749[_0x45ca74(0x345)]('Error:'),_0x45ca74(0x344)+_0x32ee7c+'\x20has\x20no\x20attempts'),0x1;const _0x435e9b=_0x161210[_0x45ca74(0x24d)]['id'];_0xdc1da['verbose']&&console['error'](_0x45ca74(0x1fe)+_0x435e9b+'\x20from\x20session\x20'+_0x32ee7c);const _0x1cd030=_0xdc1da['follow'];return _0x1cd030?await this[_0x45ca74(0x333)](_0x187c2f,_0x435e9b):await this[_0x45ca74(0x310)](_0x187c2f,_0x435e9b,_0xdc1da),0x0;}const _0x223700=await withSpinner(_0x45ca74(0x24f),()=>_0x11bc05[_0x45ca74(0x1a4)]['sessions']({'projectName':_0x233049,'workflowName':_0x225681,'limit':_0xdc1da['limit']||0x32}),{'verbose':_0xdc1da[_0x45ca74(0x254)]}),_0x5d84e2=_0x223700[_0x45ca74(0x32c)];if(_0x5d84e2[_0x45ca74(0x30c)]===0x0){if(_0x233049&&_0x225681)console[_0x45ca74(0x2b2)](_0x45ca74(0x1ef)+_0x233049+'.'+_0x225681);else _0x233049?console[_0x45ca74(0x2b2)](_0x45ca74(0x1ec)+_0x233049):(console['error'](_0x45ca74(0x241)),console[_0x45ca74(0x2b2)](a61_0x511749['dim'](_0x45ca74(0x2e6))));return 0x0;}_0x5d84e2[_0x45ca74(0x308)]((_0x940d31,_0x1364e1)=>{const _0x179bd9=_0x45ca74,_0x341b5a=_0x940d31[_0x179bd9(0x2da)]||'',_0x50852e=_0x1364e1[_0x179bd9(0x2da)]||'';return _0x50852e['localeCompare'](_0x341b5a);});if(_0xdc1da[_0x45ca74(0x1f4)]||_0xdc1da[_0x45ca74(0x1b3)])return await handleSDKOutput(_0x5d84e2,_0xdc1da),0x0;let _0xb9108c;if(_0x27ea3f){const _0x88c7ca=_0x5d84e2[0x0];if(!_0x88c7ca['lastAttempt']?.['id'])return console['error'](_0x45ca74(0x37e)),0x0;_0xb9108c=_0x88c7ca['lastAttempt']['id'],_0xdc1da[_0x45ca74(0x254)]&&console[_0x45ca74(0x2b2)](_0x45ca74(0x220)+_0x88c7ca[_0x45ca74(0x2da)]);}else{const _0x219a1c=_0x5d84e2['map'](_0x9144e2=>{const _0xd872ac=_0x45ca74,_0x33cdf1=getAttemptStatusDisplay(_0x9144e2['lastAttempt']);return{'title':_0x9144e2[_0xd872ac(0x2ff)]?.['name']+'.'+_0x9144e2['workflow']?.[_0xd872ac(0x256)]+_0xd872ac(0x2d0)+_0x9144e2[_0xd872ac(0x2da)]+'\x20'+_0x33cdf1['icon'],'value':_0x9144e2['lastAttempt']?.['id']||'','description':_0x33cdf1[_0xd872ac(0x2d2)]};}),_0x257c08=await a61_0x4181bb({'type':'select','name':_0x45ca74(0x1bb),'message':_0x45ca74(0x239),'choices':_0x219a1c[_0x45ca74(0x2c6)](_0x59ea7e=>_0x59ea7e['value']!=='')});if(!_0x257c08[_0x45ca74(0x1bb)])return 0x0;_0xb9108c=_0x257c08['attemptId'];}const _0x33e51a=_0xdc1da[_0x45ca74(0x218)];return _0x33e51a?await this[_0x45ca74(0x333)](_0x187c2f,_0xb9108c):await this[_0x45ca74(0x310)](_0x187c2f,_0xb9108c,_0xdc1da),0x0;}async['renderSingleTimeline'](_0x150e93,_0xe8c58b,_0x39c970){const _0xa88206=a61_0x50f5d8,{tdx:_0x11353e}=_0x150e93;let _0x4cd9de,_0x2acbd3;try{[_0x4cd9de,_0x2acbd3]=await Promise[_0xa88206(0x1d3)]([_0x11353e[_0xa88206(0x1a4)][_0xa88206(0x26d)](_0xe8c58b),_0x11353e['workflow']['tasks'](_0xe8c58b,![])]);}catch(_0x49ce77){console[_0xa88206(0x2b2)](a61_0x511749[_0xa88206(0x345)](_0xa88206(0x21d)));_0x39c970[_0xa88206(0x254)]&&console[_0xa88206(0x2b2)](_0x49ce77);throw _0x49ce77;}if(_0x39c970['json']||_0x39c970[_0xa88206(0x1b3)]){const _0x25ff6f=this[_0xa88206(0x33d)](_0x4cd9de,_0x2acbd3);await handleSDKOutput([_0x25ff6f],_0x39c970);return;}const _0x93c5de=_0x11353e[_0xa88206(0x2f9)][_0xa88206(0x1e0)],_0x1cb27a=this[_0xa88206(0x1b1)](_0x4cd9de,_0x2acbd3,_0x93c5de);console[_0xa88206(0x2bd)](_0x1cb27a);}async[a61_0x50f5d8(0x333)](_0x57c260,_0x28d8d7){const _0x5eec2a=a61_0x50f5d8,{tdx:_0x5365cc}=_0x57c260,_0x484f6e=TIMELINE_CONFIG[_0x5eec2a(0x213)],_0x2d2afe=TIMELINE_CONFIG[_0x5eec2a(0x1b7)];let _0x3bdc84=0x0;while(_0x3bdc84<_0x2d2afe){process['stdout']['isTTY']&&process[_0x5eec2a(0x361)][_0x5eec2a(0x380)]('\x1Bc');let _0x5ea277,_0x179996;try{[_0x5ea277,_0x179996]=await Promise[_0x5eec2a(0x1d3)]([_0x5365cc[_0x5eec2a(0x1a4)][_0x5eec2a(0x26d)](_0x28d8d7),_0x5365cc['workflow'][_0x5eec2a(0x208)](_0x28d8d7,![])]);}catch(_0x2f3c30){console[_0x5eec2a(0x2b2)](a61_0x511749[_0x5eec2a(0x345)](_0x5eec2a(0x2d3)));_0x3bdc84>0x0&&console['error'](a61_0x511749[_0x5eec2a(0x305)](_0x5eec2a(0x1b0)+_0x3bdc84));throw _0x2f3c30;}const _0x4c40da=_0x5365cc[_0x5eec2a(0x2f9)][_0x5eec2a(0x1e0)],_0xbfd8bf=this[_0x5eec2a(0x1b1)](_0x5ea277,_0x179996,_0x4c40da);console[_0x5eec2a(0x2bd)](_0xbfd8bf);const _0x163d34=_0x5ea277[_0x5eec2a(0x29c)]&&_0x179996[_0x5eec2a(0x26f)](_0x248dbf=>_0x248dbf['state']!==_0x5eec2a(0x223)&&_0x248dbf[_0x5eec2a(0x255)]!=='planned');if(_0x163d34){console[_0x5eec2a(0x2b2)](a61_0x511749[_0x5eec2a(0x27a)]('\x0a✔\x20Attempt\x20complete'));break;}console['error'](a61_0x511749[_0x5eec2a(0x305)]('\x0aPolling...\x20('+_0x3bdc84*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x5f3ccb=>setTimeout(_0x5f3ccb,_0x484f6e)),_0x3bdc84++;}_0x3bdc84>=_0x2d2afe&&console[_0x5eec2a(0x2b2)](a61_0x511749['yellow'](_0x5eec2a(0x37b)));}[a61_0x50f5d8(0x1b1)](_0x3bb72f,_0xd54ba1,_0x2aa59a){const _0x3fcbe3=a61_0x50f5d8,_0x118ad2=[],_0x3e9e39=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x4b856b=0x5,_0x8fa70c=process[_0x3fcbe3(0x361)][_0x3fcbe3(0x1d4)]||0x78,_0x42cc8e=_0x8fa70c-_0x3e9e39-_0x4b856b,_0x4e48a5=Math[_0x3fcbe3(0x37a)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x3fcbe3(0x27b)](_0x42cc8e,TIMELINE_CONFIG[_0x3fcbe3(0x20c)])),_0x80b85c=new Date(_0x3bb72f[_0x3fcbe3(0x350)])[_0x3fcbe3(0x36f)](),_0x3f1c83=_0x3bb72f['finishedAt']?new Date(_0x3bb72f[_0x3fcbe3(0x1fc)])[_0x3fcbe3(0x36f)]():Date['now'](),_0x4f11d8={'start':_0x80b85c,'end':_0x3f1c83,'duration':_0x3f1c83-_0x80b85c},_0x40844c=new Map(),_0x9df1d8=[];for(const _0xc77e93 of _0xd54ba1){if(_0xc77e93[_0x3fcbe3(0x228)]){const _0x31a05d=new Date(_0xc77e93[_0x3fcbe3(0x228)])[_0x3fcbe3(0x36f)](),_0x1665d0=_0xc77e93['updatedAt']?new Date(_0xc77e93['updatedAt'])[_0x3fcbe3(0x36f)]():Date['now'](),_0x2dbfe0={'start':_0x31a05d,'end':_0x1665d0,'duration':_0x1665d0-_0x31a05d};_0x40844c[_0x3fcbe3(0x2e9)](_0xc77e93['id'],_0x2dbfe0),_0x9df1d8[_0x3fcbe3(0x246)]({'name':_0xc77e93['fullName'],'state':_0xc77e93[_0x3fcbe3(0x255)]||_0x3fcbe3(0x1f7),'window':_0x2dbfe0});}else _0x9df1d8['push']({'name':_0xc77e93[_0x3fcbe3(0x1d7)],'state':_0xc77e93[_0x3fcbe3(0x255)]||'planned','window':undefined});}_0x9df1d8[_0x3fcbe3(0x308)]((_0x2a953c,_0x2cd300)=>{const _0x55c779=_0x3fcbe3;if(!_0x2a953c['window'])return 0x1;if(!_0x2cd300[_0x55c779(0x1f2)])return-0x1;return _0x2a953c[_0x55c779(0x1f2)][_0x55c779(0x2a4)]-_0x2cd300['window'][_0x55c779(0x2a4)];});const _0x44a938=_0x9df1d8['length'],_0x3684de=_0x44a938>TIMELINE_CONFIG[_0x3fcbe3(0x36b)];_0x3684de&&_0x9df1d8['splice'](TIMELINE_CONFIG[_0x3fcbe3(0x36b)]);const _0x5aeaf8=calculateTimeScale(_0x4f11d8,_0x4e48a5),_0x1fc54c=_0x3bb72f[_0x3fcbe3(0x29c)]?_0x3bb72f['success']?a61_0x511749[_0x3fcbe3(0x27a)](_0x3fcbe3(0x2fa)):a61_0x511749[_0x3fcbe3(0x345)](_0x3fcbe3(0x2b2)):a61_0x511749[_0x3fcbe3(0x1fa)](_0x3fcbe3(0x223)),_0x5e0cbd=_0x3bb72f[_0x3fcbe3(0x2ff)]?.['id'],_0x2a8e30=_0x3bb72f['sessionId'];let _0x2b7df1;if(_0x5e0cbd&&_0x2a8e30){const _0x46c511=getWorkflowAttemptUrl(_0x2aa59a,_0x5e0cbd,_0x2a8e30,_0x3bb72f['id']);_0x2b7df1=hyperlink(a61_0x511749[_0x3fcbe3(0x305)](_0x3bb72f['id']),_0x46c511);}else _0x2b7df1=a61_0x511749[_0x3fcbe3(0x305)](_0x3bb72f['id']);_0x118ad2[_0x3fcbe3(0x246)]('Attempt:\x20'+_0x2b7df1+'\x20-\x20'+_0x1fc54c+_0x3fcbe3(0x2d0)+formatElapsed(_0x4f11d8[_0x3fcbe3(0x367)]));if(_0x9df1d8[_0x3fcbe3(0x30c)]>0x0){const _0x2af3d6=renderTimeAxis(_0x5aeaf8,_0x4e48a5),_0x48c1cb=new Date(_0x4f11d8[_0x3fcbe3(0x2a4)]),_0x1221aa=formatDate(_0x48c1cb),_0x1e4bff=TIMELINE_CONFIG[_0x3fcbe3(0x21c)]+TIMELINE_CONFIG['ICON_SPACING']+_0x3e9e39,_0x5068aa=_0x1221aa[_0x3fcbe3(0x2bb)](_0x1e4bff),_0x4f7063=a61_0x511749['dim'](_0x5068aa);_0x118ad2['push'](_0x4f7063+'\x20'+_0x2af3d6);for(const _0x5bb795 of _0x9df1d8){_0x118ad2[_0x3fcbe3(0x246)](renderTaskRow(_0x5bb795,_0x5aeaf8,_0x4e48a5,_0x3e9e39));}const _0x440ef4=calculateStats(_0x9df1d8);_0x118ad2['push'](formatStats(_0x440ef4)),_0x3684de&&_0x118ad2[_0x3fcbe3(0x246)](a61_0x511749[_0x3fcbe3(0x222)](_0x3fcbe3(0x2a6)+TIMELINE_CONFIG[_0x3fcbe3(0x36b)]+_0x3fcbe3(0x2de)+_0x44a938+_0x3fcbe3(0x1ee))),_0x118ad2[_0x3fcbe3(0x246)](''),_0x118ad2[_0x3fcbe3(0x246)](a61_0x511749[_0x3fcbe3(0x305)](_0x3fcbe3(0x33c))+(_0x3fcbe3(0x1db)+_0x3bb72f['id']+_0x3fcbe3(0x360))+a61_0x511749['dim'](_0x3fcbe3(0x29f)));}else _0x118ad2[_0x3fcbe3(0x246)]('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x118ad2['join']('\x0a');}['buildTimelineData'](_0x25417a,_0x505d24){const _0x382244=a61_0x50f5d8,_0x85a617=new Date(_0x25417a[_0x382244(0x350)])[_0x382244(0x36f)](),_0x55811a=_0x25417a[_0x382244(0x1fc)]?new Date(_0x25417a[_0x382244(0x1fc)])[_0x382244(0x36f)]():Date[_0x382244(0x302)](),_0x27d186=_0x55811a-_0x85a617,_0x1003ef=[];for(const _0x48afc9 of _0x505d24){if(_0x48afc9[_0x382244(0x228)]){const _0x3ada02=new Date(_0x48afc9['startedAt'])[_0x382244(0x36f)](),_0x5827b4=_0x48afc9[_0x382244(0x1df)]?new Date(_0x48afc9[_0x382244(0x1df)])[_0x382244(0x36f)]():Date[_0x382244(0x302)]();_0x1003ef['push']({'name':_0x48afc9['fullName'],'state':_0x48afc9[_0x382244(0x255)]||'unknown','window':{'start':_0x3ada02,'end':_0x5827b4,'duration':_0x5827b4-_0x3ada02}});}else _0x1003ef[_0x382244(0x246)]({'name':_0x48afc9['fullName'],'state':_0x48afc9['state']||'planned','window':undefined});}const _0xde5aae=calculateStats(_0x1003ef);return{'attempt':{'id':_0x25417a['id'],'status':_0x25417a[_0x382244(0x29c)]?_0x25417a[_0x382244(0x2fa)]?'success':_0x382244(0x2b2):_0x382244(0x223),'createdAt':_0x25417a[_0x382244(0x350)],'finishedAt':_0x25417a[_0x382244(0x1fc)],'duration_ms':_0x27d186},'tasks':_0x1003ef[_0x382244(0x2e0)](_0x95db0a=>({'name':_0x95db0a[_0x382244(0x256)],'state':_0x95db0a[_0x382244(0x255)],'startedAt':_0x95db0a[_0x382244(0x1f2)]?new Date(_0x95db0a['window'][_0x382244(0x2a4)])[_0x382244(0x354)]():null,'updatedAt':_0x95db0a['window']?new Date(_0x95db0a['window'][_0x382244(0x203)])[_0x382244(0x354)]():null,'duration_ms':_0x95db0a[_0x382244(0x1f2)]?.['duration']||null})),'stats':_0xde5aae};}}function formatScheduleLine(_0x324c6e){const _0x1a924b=a61_0x50f5d8,_0x3074e5=_0x324c6e['disabledAt']?a61_0x511749[_0x1a924b(0x222)](_0x1a924b(0x317)):'',_0x2ae02f=_0x324c6e['project']?.[_0x1a924b(0x256)]?a61_0x511749[_0x1a924b(0x305)]('\x20['+_0x324c6e[_0x1a924b(0x2ff)][_0x1a924b(0x256)]+']'):'',_0x263233=_0x324c6e[_0x1a924b(0x1c3)]?a61_0x511749['dim'](_0x1a924b(0x236)+new Date(_0x324c6e[_0x1a924b(0x1c3)])[_0x1a924b(0x233)]()):'';return _0x1a924b(0x28e)+_0x324c6e['id']+'\x20'+(_0x324c6e['workflow']?.['name']||_0x1a924b(0x2fe))+_0x2ae02f+_0x3074e5+_0x263233;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x32f);['description']=a61_0x50f5d8(0x2c3);async[a61_0x50f5d8(0x365)](_0x331426){const _0x354a70=a61_0x50f5d8,{options:_0x4a828f,args:_0x172bc9,tdx:_0x2c4cfb}=_0x331426,{scheduleId:_0x3492}=_0x4a828f;if(_0x3492&&_0x172bc9[0x0])return console[_0x354a70(0x2b2)](a61_0x511749['red'](_0x354a70(0x1b4)),_0x354a70(0x327)),console[_0x354a70(0x2b2)](a61_0x511749[_0x354a70(0x305)](_0x354a70(0x2c4))),0x1;if(_0x3492){const _0x131128=await withSpinner(_0x354a70(0x342)+_0x3492+_0x354a70(0x200),()=>_0x2c4cfb[_0x354a70(0x1a4)]['getSchedule'](_0x3492),{'verbose':_0x4a828f['verbose']}),_0x423aa0=_0x131128[_0x354a70(0x32c)];return isStructuredFormat(_0x4a828f)?await handleSingleObjectOutput(_0x423aa0,_0x4a828f):(console[_0x354a70(0x2b2)](_0x354a70(0x1fb)),console[_0x354a70(0x2bd)](formatScheduleLine(_0x423aa0))),0x0;}const _0x1120f8=this[_0x354a70(0x301)](_0x172bc9,_0x4a828f);if(!_0x1120f8)return 0x1;const {projectName:_0x43ba20,workflowName:_0x1a85b2}=_0x1120f8,_0x316b86=_0x43ba20?'\x27'+_0x43ba20+(_0x1a85b2?'.'+_0x1a85b2:'')+'\x27':undefined,_0x482657=await withSpinner(_0x316b86?_0x354a70(0x29e)+_0x316b86+_0x354a70(0x200):_0x354a70(0x1b8),()=>_0x43ba20?_0x2c4cfb[_0x354a70(0x1a4)][_0x354a70(0x23e)](_0x43ba20,{'workflow':_0x1a85b2,'limit':_0x4a828f[_0x354a70(0x206)]}):_0x2c4cfb[_0x354a70(0x1a4)]['listSchedules']({'limit':_0x4a828f['limit']}),{'verbose':_0x4a828f['verbose']}),_0x1003ff=_0x482657[_0x354a70(0x32c)],_0x39efde=_0x4a828f[_0x354a70(0x206)]&&_0x1003ff[_0x354a70(0x30c)]>=_0x4a828f['limit']?a61_0x511749[_0x354a70(0x305)](_0x354a70(0x31e)):'';console[_0x354a70(0x2b2)](_0x354a70(0x297)+_0x1003ff['length']+_0x354a70(0x2a9)+(_0x1003ff[_0x354a70(0x30c)]!==0x1?'s':'')+_0x39efde);if(isStructuredFormat(_0x4a828f))await handleSDKOutput(_0x1003ff,_0x4a828f);else{if(_0x1003ff['length']===0x0)console['log'](_0x354a70(0x37d));else for(const _0x513f34 of _0x1003ff){console[_0x354a70(0x2bd)](formatScheduleLine(_0x513f34));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{[a61_0x50f5d8(0x256)]=a61_0x50f5d8(0x212);[a61_0x50f5d8(0x1d6)]=a61_0x50f5d8(0x1d2);async[a61_0x50f5d8(0x365)](_0x46fa40){const _0x3e3fd2=a61_0x50f5d8,{options:_0x18f895,args:_0x5dc66b,tdx:_0x32edf2}=_0x46fa40,_0x2e7fd2=_0x5dc66b[0x0];if(!_0x2e7fd2)return console['error'](a61_0x511749[_0x3e3fd2(0x345)](_0x3e3fd2(0x1b4)),_0x3e3fd2(0x261)),console[_0x3e3fd2(0x2b2)](a61_0x511749[_0x3e3fd2(0x305)](_0x3e3fd2(0x2ca))),console['error'](a61_0x511749[_0x3e3fd2(0x305)]('Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs')),0x1;const {backfill:_0x2f288e,nextTime:_0x24f979}=_0x18f895,_0x30470c={};if(_0x2f288e!==undefined)_0x30470c[_0x3e3fd2(0x347)]=!_0x2f288e;if(_0x24f979!==undefined)_0x30470c['nextTime']=_0x24f979;const _0xbebdec=await withSpinner(_0x3e3fd2(0x1c1)+_0x2e7fd2+'...',()=>_0x32edf2[_0x3e3fd2(0x1a4)][_0x3e3fd2(0x1b5)](_0x2e7fd2,_0x30470c),{'verbose':_0x18f895[_0x3e3fd2(0x254)]}),_0x47dbda=_0xbebdec[_0x3e3fd2(0x32c)];return isStructuredFormat(_0x18f895)?await handleSingleObjectOutput(_0x47dbda,_0x18f895):(console['log'](_0x3e3fd2(0x1ad)+_0x2e7fd2+_0x3e3fd2(0x2ad)+(_0x47dbda[_0x3e3fd2(0x1a4)]?.['name']||_0x3e3fd2(0x1f7))+')'),_0x47dbda[_0x3e3fd2(0x1c3)]&&console['log'](a61_0x511749['dim'](_0x3e3fd2(0x33f)+new Date(_0x47dbda['nextRunTime'])[_0x3e3fd2(0x233)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{['name']=a61_0x50f5d8(0x2f5);[a61_0x50f5d8(0x1d6)]='Disable\x20a\x20workflow\x20schedule';async[a61_0x50f5d8(0x365)](_0x4af0f0){const _0x3c5a43=a61_0x50f5d8,{options:_0xe00a3b,args:_0x53e2ec,tdx:_0xa8c023}=_0x4af0f0,_0x36139e=_0x53e2ec[0x0];if(!_0x36139e)return console[_0x3c5a43(0x2b2)](a61_0x511749[_0x3c5a43(0x345)](_0x3c5a43(0x1b4)),_0x3c5a43(0x261)),console[_0x3c5a43(0x2b2)](a61_0x511749['dim'](_0x3c5a43(0x290))),console[_0x3c5a43(0x2b2)](a61_0x511749[_0x3c5a43(0x305)](_0x3c5a43(0x2f2))),0x1;const _0x3faf6a=await withSpinner(_0x3c5a43(0x376)+_0x36139e+_0x3c5a43(0x200),()=>_0xa8c023[_0x3c5a43(0x1a4)][_0x3c5a43(0x1ff)](_0x36139e),{'verbose':_0xe00a3b[_0x3c5a43(0x254)]}),_0x22b7c2=_0x3faf6a['data'];return isStructuredFormat(_0xe00a3b)?await handleSingleObjectOutput(_0x22b7c2,_0xe00a3b):console[_0x3c5a43(0x2bd)]('✔\x20Schedule\x20#'+_0x36139e+'\x20disabled\x20('+(_0x22b7c2[_0x3c5a43(0x1a4)]?.[_0x3c5a43(0x256)]||'unknown')+')'),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- function a61_0x47b2(){const _0x12dcf3=['6140250UJoVkN','315235eXvZmW','920492UILpiL','4974ygMCxR','tdx/','382rtgGuZ','98CowpIz','TD1\x20','5036904eQtjqb','X-Trino-User',';\x20node/','5NPnPbz','25200520LaudCJ','Authorization','451336iSZVBl','Bearer\x20','replace','entries','tdx'];a61_0x47b2=function(){return _0x12dcf3;};return a61_0x47b2();}(function(_0x13ac9e,_0x1fc44c){const _0x35fb55=a61_0x3a9c,_0x2f5059=_0x13ac9e();while(!![]){try{const _0x37936f=parseInt(_0x35fb55(0x15a))/0x1+parseInt(_0x35fb55(0x15e))/0x2*(parseInt(_0x35fb55(0x15c))/0x3)+parseInt(_0x35fb55(0x15b))/0x4*(-parseInt(_0x35fb55(0x151))/0x5)+-parseInt(_0x35fb55(0x159))/0x6+parseInt(_0x35fb55(0x14c))/0x7*(-parseInt(_0x35fb55(0x154))/0x8)+-parseInt(_0x35fb55(0x14e))/0x9+parseInt(_0x35fb55(0x152))/0xa;if(_0x37936f===_0x1fc44c)break;else _0x2f5059['push'](_0x2f5059['shift']());}catch(_0x11bfff){_0x2f5059['push'](_0x2f5059['shift']());}}}(a61_0x47b2,0x8606d));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';function a61_0x3a9c(_0x22c18a,_0x460ba9){_0x22c18a=_0x22c18a-0x14c;const _0x47b2d9=a61_0x47b2();let _0x3a9c02=_0x47b2d9[_0x22c18a];return _0x3a9c02;}export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x45e98d=a61_0x3a9c,_0x1b9e9c=getVersion(),_0x41e7ba=platform(),_0x992984=process['version'][_0x45e98d(0x156)]('v','');return _0x45e98d(0x15d)+_0x1b9e9c+'\x20('+_0x41e7ba+_0x45e98d(0x150)+_0x992984+')';}export function getAuthHeaders(_0x873eff,_0x1e1c74,_0x1875ae){const _0x45c0c4=a61_0x3a9c,_0x4d6b70=getVersion(),_0x59d12c={'User-Agent':getUserAgent(),'X-TD-Client':_0x45c0c4(0x158),'X-TD-Client-Version':_0x4d6b70};if(_0x1875ae)_0x59d12c[_0x45c0c4(0x153)]=_0x45c0c4(0x155)+_0x1875ae;else _0x1e1c74&&(_0x59d12c[_0x45c0c4(0x153)]=_0x45c0c4(0x14d)+_0x1e1c74);return _0x59d12c;}export function toHeaderRecord(_0x5eebde){const _0x34f4c9=a61_0x3a9c,_0x3a928b={};for(const [_0x2ecf9f,_0x1b0c72]of Object[_0x34f4c9(0x157)](_0x5eebde)){_0x1b0c72!==undefined&&(_0x3a928b[_0x2ecf9f]=_0x1b0c72);}return _0x3a928b;}export function getTrinoHeaders(_0xde1b41,_0x2e3943,_0x54f71b){const _0x415fc0=a61_0x3a9c,_0x4db2de=getAuthHeaders(_0xde1b41),_0x20b012=toHeaderRecord(_0x4db2de);if(_0x54f71b)_0x20b012[_0x415fc0(0x153)]=_0x415fc0(0x155)+_0x54f71b;else _0x2e3943&&(_0x20b012[_0x415fc0(0x14f)]=_0x2e3943);return _0x20b012;}export function hasAPIKey(_0x41cc3b){const _0x35568a=getAPIKey();return _0x35568a!==undefined&&_0x35568a['length']>0x0;}
1
+ (function(_0x22efec,_0x256151){const _0xd61b5b=a62_0x57d1,_0x2192c8=_0x22efec();while(!![]){try{const _0x359223=-parseInt(_0xd61b5b(0x193))/0x1+-parseInt(_0xd61b5b(0x19d))/0x2*(-parseInt(_0xd61b5b(0x18e))/0x3)+parseInt(_0xd61b5b(0x194))/0x4+parseInt(_0xd61b5b(0x196))/0x5*(-parseInt(_0xd61b5b(0x1a0))/0x6)+parseInt(_0xd61b5b(0x19f))/0x7*(parseInt(_0xd61b5b(0x19e))/0x8)+parseInt(_0xd61b5b(0x198))/0x9*(parseInt(_0xd61b5b(0x19a))/0xa)+-parseInt(_0xd61b5b(0x192))/0xb;if(_0x359223===_0x256151)break;else _0x2192c8['push'](_0x2192c8['shift']());}catch(_0x3d8c74){_0x2192c8['push'](_0x2192c8['shift']());}}}(a62_0x17e7,0x8f6f5));import{platform}from'os';function a62_0x57d1(_0x44ddc2,_0x1f754e){_0x44ddc2=_0x44ddc2-0x18c;const _0x17e72d=a62_0x17e7();let _0x57d1d9=_0x17e72d[_0x44ddc2];return _0x57d1d9;}import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x327854=a62_0x57d1,_0x52fa6d=getVersion(),_0xbc538a=platform(),_0x263cac=process[_0x327854(0x18d)]['replace']('v','');return _0x327854(0x190)+_0x52fa6d+'\x20('+_0xbc538a+_0x327854(0x195)+_0x263cac+')';}export function getAuthHeaders(_0x14651b,_0x534010,_0x1da43d){const _0x5c26a8=a62_0x57d1,_0x1fc2b5=getVersion(),_0x5416c2={'User-Agent':getUserAgent(),'X-TD-Client':_0x5c26a8(0x18c),'X-TD-Client-Version':_0x1fc2b5};if(_0x1da43d)_0x5416c2[_0x5c26a8(0x19c)]=_0x5c26a8(0x197)+_0x1da43d;else _0x534010&&(_0x5416c2[_0x5c26a8(0x19c)]=_0x5c26a8(0x19b)+_0x534010);return _0x5416c2;}function a62_0x17e7(){const _0x428f2c=['Authorization','2308Dkvric','16LCugpw','1147167NQbCDy','36DfNwNf','tdx','version','2418jkcWAj','entries','tdx/','length','20437901GQKOKC','341126dSpiAQ','4555288tVhlzf',';\x20node/','182395KviHbW','Bearer\x20','2739564PnNtcQ','X-Trino-User','20ZUPblk','TD1\x20'];a62_0x17e7=function(){return _0x428f2c;};return a62_0x17e7();}export function toHeaderRecord(_0x1235cc){const _0x2b80d1=a62_0x57d1,_0x4073de={};for(const [_0x5a0915,_0x485c0c]of Object[_0x2b80d1(0x18f)](_0x1235cc)){_0x485c0c!==undefined&&(_0x4073de[_0x5a0915]=_0x485c0c);}return _0x4073de;}export function getTrinoHeaders(_0x47da70,_0x26b9d0,_0x5ad116){const _0x37a27a=a62_0x57d1,_0x3370ab=getAuthHeaders(_0x47da70),_0x200021=toHeaderRecord(_0x3370ab);if(_0x5ad116)_0x200021[_0x37a27a(0x19c)]=_0x37a27a(0x197)+_0x5ad116;else _0x26b9d0&&(_0x200021[_0x37a27a(0x199)]=_0x26b9d0);return _0x200021;}export function hasAPIKey(_0x4199cb){const _0x2b0c94=a62_0x57d1,_0x22df54=getAPIKey();return _0x22df54!==undefined&&_0x22df54[_0x2b0c94(0x191)]>0x0;}