@treasuredata/tdx 2026.8.2 → 2026.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.js +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.js +1 -1
  16. package/dist/commands/claude-statusline-command.js +1 -1
  17. package/dist/commands/claude-usage-command.js +1 -1
  18. package/dist/commands/command.js +1 -1
  19. package/dist/commands/connection-command.js +1 -1
  20. package/dist/commands/databases.js +1 -1
  21. package/dist/commands/delivery-command.js +1 -1
  22. package/dist/commands/describe.js +1 -1
  23. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  24. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  25. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  26. package/dist/commands/engage-campaign-pull-command.js +1 -1
  27. package/dist/commands/engage-campaign-push-command.js +1 -1
  28. package/dist/commands/engage-campaign-validate-command.js +1 -1
  29. package/dist/commands/engage-command.js +1 -1
  30. package/dist/commands/engage-template-pull-command.js +1 -1
  31. package/dist/commands/engage-template-push-command.js +1 -1
  32. package/dist/commands/engage-template-validate-command.js +1 -1
  33. package/dist/commands/job-command.js +1 -1
  34. package/dist/commands/journey-command.js +1 -1
  35. package/dist/commands/journey-validate-command.js +1 -1
  36. package/dist/commands/llm-command.js +1 -1
  37. package/dist/commands/mcp-command.js +1 -1
  38. package/dist/commands/p13n-command.d.ts +11 -0
  39. package/dist/commands/p13n-command.d.ts.map +1 -0
  40. package/dist/commands/p13n-command.js +1 -0
  41. package/dist/commands/p13n-command.js.map +1 -0
  42. package/dist/commands/parent-segment-command.js +1 -1
  43. package/dist/commands/policy-command.js +1 -1
  44. package/dist/commands/profile-command.js +1 -1
  45. package/dist/commands/profiles-command.js +1 -1
  46. package/dist/commands/query-command.js +1 -1
  47. package/dist/commands/schedule-command.js +1 -1
  48. package/dist/commands/segment-command.js +1 -1
  49. package/dist/commands/segment-create-command.js +1 -1
  50. package/dist/commands/segment-fields-command.js +1 -1
  51. package/dist/commands/segment-move-command.js +1 -1
  52. package/dist/commands/segment-pull-command.js +1 -1
  53. package/dist/commands/segment-push-command.js +1 -1
  54. package/dist/commands/segment-update-command.js +1 -1
  55. package/dist/commands/segment-use-command.js +1 -1
  56. package/dist/commands/segment-validate-command.js +1 -1
  57. package/dist/commands/segments.js +1 -1
  58. package/dist/commands/show.js +1 -1
  59. package/dist/commands/status-command.js +1 -1
  60. package/dist/commands/table-deleted.js +1 -1
  61. package/dist/commands/tables.js +1 -1
  62. package/dist/commands/unset-command.js +1 -1
  63. package/dist/commands/upgrade-command.js +1 -1
  64. package/dist/commands/use-command.js +1 -1
  65. package/dist/commands/user-command.js +1 -1
  66. package/dist/commands/work-command.js +1 -1
  67. package/dist/commands/workflow-command.js +1 -1
  68. package/dist/core/auth.js +1 -1
  69. package/dist/core/command-output.js +1 -1
  70. package/dist/core/config.js +1 -1
  71. package/dist/core/connection-cache.js +1 -1
  72. package/dist/core/constants.js +1 -1
  73. package/dist/core/credential-cache.js +1 -1
  74. package/dist/core/global-context.d.ts.map +1 -1
  75. package/dist/core/global-context.js +1 -1
  76. package/dist/core/global-context.js.map +1 -1
  77. package/dist/core/keychain.js +1 -1
  78. package/dist/core/oauth-keychain.js +1 -1
  79. package/dist/core/oauth.d.ts +9 -1
  80. package/dist/core/oauth.d.ts.map +1 -1
  81. package/dist/core/oauth.js +1 -1
  82. package/dist/core/oauth.js.map +1 -1
  83. package/dist/core/profile.js +1 -1
  84. package/dist/core/project-config.js +1 -1
  85. package/dist/core/session.js +1 -1
  86. package/dist/core/site-mismatch.js +1 -1
  87. package/dist/core/user-cache.js +1 -1
  88. package/dist/core/version.js +1 -1
  89. package/dist/index.js +1 -1
  90. package/dist/mcp/server.js +1 -1
  91. package/dist/mcp/tools/index.js +1 -1
  92. package/dist/mcp/tools/tdx-run.js +1 -1
  93. package/dist/mcp/tools/tdx-search.js +1 -1
  94. package/dist/mcp/tools/work-create-item.js +1 -1
  95. package/dist/mcp/utils.js +1 -1
  96. package/dist/proxy/claude-usage-tracker.js +1 -1
  97. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  98. package/dist/proxy/passthrough-server.js +1 -1
  99. package/dist/proxy/passthrough-server.js.map +1 -1
  100. package/dist/proxy/sse-usage-parser.js +1 -1
  101. package/dist/sdk/agent/agent-config.js +1 -1
  102. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  103. package/dist/sdk/agent/agent-yaml.js +1 -1
  104. package/dist/sdk/agent/test/evaluator.js +1 -1
  105. package/dist/sdk/agent/test/executor.js +1 -1
  106. package/dist/sdk/agent/test/index.js +1 -1
  107. package/dist/sdk/agent/test/output.js +1 -1
  108. package/dist/sdk/agent/test/parser.js +1 -1
  109. package/dist/sdk/agent/tool-target-registry.js +1 -1
  110. package/dist/sdk/api.js +1 -1
  111. package/dist/sdk/auth-token.d.ts +42 -6
  112. package/dist/sdk/auth-token.d.ts.map +1 -1
  113. package/dist/sdk/auth-token.js +1 -1
  114. package/dist/sdk/auth-token.js.map +1 -1
  115. package/dist/sdk/cas/cas-api-client.d.ts +9 -3
  116. package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
  117. package/dist/sdk/cas/cas-api-client.js +1 -1
  118. package/dist/sdk/cas/cas-api-client.js.map +1 -1
  119. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  120. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  121. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  122. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  123. package/dist/sdk/cas/index.d.ts +10 -0
  124. package/dist/sdk/cas/index.d.ts.map +1 -1
  125. package/dist/sdk/cas/index.js +1 -1
  126. package/dist/sdk/cas/index.js.map +1 -1
  127. package/dist/sdk/cas/pull-workflow.js +1 -1
  128. package/dist/sdk/cas/push-workflow.js +1 -1
  129. package/dist/sdk/cas/validate-files.js +1 -1
  130. package/dist/sdk/client/cdp-api-client.js +1 -1
  131. package/dist/sdk/client/delivery-api-client.js +1 -1
  132. package/dist/sdk/client/endpoints.d.ts +6 -0
  133. package/dist/sdk/client/endpoints.d.ts.map +1 -1
  134. package/dist/sdk/client/endpoints.js +1 -1
  135. package/dist/sdk/client/endpoints.js.map +1 -1
  136. package/dist/sdk/client/engage-api-client.js +1 -1
  137. package/dist/sdk/client/http-client.js +1 -1
  138. package/dist/sdk/client/llm-api-client.js +1 -1
  139. package/dist/sdk/client/oauth-refresh.d.ts +11 -2
  140. package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
  141. package/dist/sdk/client/oauth-refresh.js +1 -1
  142. package/dist/sdk/client/oauth-refresh.js.map +1 -1
  143. package/dist/sdk/client/p13n-studio-api-client.d.ts +19 -0
  144. package/dist/sdk/client/p13n-studio-api-client.d.ts.map +1 -0
  145. package/dist/sdk/client/p13n-studio-api-client.js +1 -0
  146. package/dist/sdk/client/p13n-studio-api-client.js.map +1 -0
  147. package/dist/sdk/client/rate-limiter.js +1 -1
  148. package/dist/sdk/client/td-api-client.js +1 -1
  149. package/dist/sdk/client/trino-api-client.js +1 -1
  150. package/dist/sdk/client/workflow-client.js +1 -1
  151. package/dist/sdk/connection-validator.js +1 -1
  152. package/dist/sdk/connection.js +1 -1
  153. package/dist/sdk/delivery.js +1 -1
  154. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  155. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  156. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  157. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  158. package/dist/sdk/engage/campaign-pull.js +1 -1
  159. package/dist/sdk/engage/campaign-push.js +1 -1
  160. package/dist/sdk/engage/campaign-validator.js +1 -1
  161. package/dist/sdk/engage/campaign-yaml.js +1 -1
  162. package/dist/sdk/engage/template-pull.js +1 -1
  163. package/dist/sdk/engage/template-push.js +1 -1
  164. package/dist/sdk/engage/template-validator.js +1 -1
  165. package/dist/sdk/engage/template-yaml.js +1 -1
  166. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  167. package/dist/sdk/engage/types/campaign-def.js +1 -1
  168. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  169. package/dist/sdk/engage/types/template-schema.js +1 -1
  170. package/dist/sdk/engage.js +1 -1
  171. package/dist/sdk/errors.js +1 -1
  172. package/dist/sdk/index.d.ts +6 -0
  173. package/dist/sdk/index.d.ts.map +1 -1
  174. package/dist/sdk/index.js +1 -1
  175. package/dist/sdk/index.js.map +1 -1
  176. package/dist/sdk/io/index.js +1 -1
  177. package/dist/sdk/io/node-filesystem.js +1 -1
  178. package/dist/sdk/job.js +1 -1
  179. package/dist/sdk/journey.js +1 -1
  180. package/dist/sdk/llm/chat-cache.js +1 -1
  181. package/dist/sdk/llm/index.js +1 -1
  182. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  183. package/dist/sdk/llm/model-factors.js +1 -1
  184. package/dist/sdk/llm/user-settings.js +1 -1
  185. package/dist/sdk/p13n-studio.d.ts +13 -0
  186. package/dist/sdk/p13n-studio.d.ts.map +1 -0
  187. package/dist/sdk/p13n-studio.js +1 -0
  188. package/dist/sdk/p13n-studio.js.map +1 -0
  189. package/dist/sdk/personalization.js +1 -1
  190. package/dist/sdk/policy.js +1 -1
  191. package/dist/sdk/query/deleted-table-validation.js +1 -1
  192. package/dist/sdk/query/index.js +1 -1
  193. package/dist/sdk/query/sql-parser.js +1 -1
  194. package/dist/sdk/realtime.js +1 -1
  195. package/dist/sdk/schedule.js +1 -1
  196. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  197. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  198. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  199. package/dist/sdk/segment/fields-display.js +1 -1
  200. package/dist/sdk/segment/file-discovery.js +1 -1
  201. package/dist/sdk/segment/journey-utils.js +1 -1
  202. package/dist/sdk/segment/journey-validator.js +1 -1
  203. package/dist/sdk/segment/journey-yaml.js +1 -1
  204. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  205. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  206. package/dist/sdk/segment/pull-workflow.js +1 -1
  207. package/dist/sdk/segment/push-recovery.js +1 -1
  208. package/dist/sdk/segment/push-workflow.js +1 -1
  209. package/dist/sdk/segment/resolution-context.js +1 -1
  210. package/dist/sdk/segment/segment-path-parser.js +1 -1
  211. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  212. package/dist/sdk/segment/segment-validator.js +1 -1
  213. package/dist/sdk/segment/target-resolution.js +1 -1
  214. package/dist/sdk/segment/tdx-config.js +1 -1
  215. package/dist/sdk/segment/types/activation-schema.js +1 -1
  216. package/dist/sdk/segment/types/journey-def.js +1 -1
  217. package/dist/sdk/segment/types/journey-schema.js +1 -1
  218. package/dist/sdk/segment/types/segment-def.js +1 -1
  219. package/dist/sdk/segment/types/segment-schema.d.ts.map +1 -1
  220. package/dist/sdk/segment/types/segment-schema.js +1 -1
  221. package/dist/sdk/segment/types/segment-schema.js.map +1 -1
  222. package/dist/sdk/segment/validate-files.js +1 -1
  223. package/dist/sdk/segment/yaml-validator.js +1 -1
  224. package/dist/sdk/segment.js +1 -1
  225. package/dist/sdk/types/index.d.ts +2 -1
  226. package/dist/sdk/types/index.d.ts.map +1 -1
  227. package/dist/sdk/types/index.js +1 -1
  228. package/dist/sdk/types/index.js.map +1 -1
  229. package/dist/sdk/types/p13n-studio.d.ts +18 -0
  230. package/dist/sdk/types/p13n-studio.d.ts.map +1 -0
  231. package/dist/sdk/types/p13n-studio.js +1 -0
  232. package/dist/sdk/types/p13n-studio.js.map +1 -0
  233. package/dist/sdk/types/progress.js +1 -1
  234. package/dist/sdk/types/workspace.js +1 -1
  235. package/dist/sdk/user.js +1 -1
  236. package/dist/sdk/util/format-detector.js +1 -1
  237. package/dist/sdk/util/formatters.js +1 -1
  238. package/dist/sdk/util/index.js +1 -1
  239. package/dist/sdk/util/paginate.js +1 -1
  240. package/dist/sdk/util/tree-formatter.js +1 -1
  241. package/dist/sdk/util/tree-search.js +1 -1
  242. package/dist/sdk/workflow/archive-validation.js +1 -1
  243. package/dist/sdk/workflow/clone-workflow.js +1 -1
  244. package/dist/sdk/workflow/index.js +1 -1
  245. package/dist/sdk/workflow/pull-workflow.js +1 -1
  246. package/dist/sdk/workflow/push-workflow.js +1 -1
  247. package/dist/sdk/workflow/task-graph.js +1 -1
  248. package/dist/sdk/workflow/tdx-config.js +1 -1
  249. package/dist/sdk/workflow/workflow-utils.js +1 -1
  250. package/dist/sdk/workspace/access-tracker.js +1 -1
  251. package/dist/sdk/workspace/frontmatter.js +1 -1
  252. package/dist/sdk/workspace/git.js +1 -1
  253. package/dist/sdk/workspace/index.js +1 -1
  254. package/dist/sdk/workspace/templates.js +1 -1
  255. package/dist/sdk/workspace/weekly.js +1 -1
  256. package/dist/sdk/workspace/wikilinks.js +1 -1
  257. package/dist/test-utils/command-runner.js +1 -1
  258. package/dist/test-utils/factories.js +1 -1
  259. package/dist/test-utils/fixtures.js +1 -1
  260. package/dist/test-utils/http-mock.js +1 -1
  261. package/dist/test-utils/index.js +1 -1
  262. package/dist/utils/async.js +1 -1
  263. package/dist/utils/claude-code-state.js +1 -1
  264. package/dist/utils/colors.js +1 -1
  265. package/dist/utils/diff.js +1 -1
  266. package/dist/utils/file-permissions.js +1 -1
  267. package/dist/utils/file-reader.js +1 -1
  268. package/dist/utils/github-releases.js +1 -1
  269. package/dist/utils/global-cache.js +1 -1
  270. package/dist/utils/json-loader.js +1 -1
  271. package/dist/utils/local-cache.js +1 -1
  272. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  273. package/dist/utils/logger/formatters/index.js +1 -1
  274. package/dist/utils/logger/handlers/console-handler.js +1 -1
  275. package/dist/utils/logger/handlers/file-handler.js +1 -1
  276. package/dist/utils/logger/handlers/index.js +1 -1
  277. package/dist/utils/logger/handlers/null-handler.js +1 -1
  278. package/dist/utils/logger/index.js +1 -1
  279. package/dist/utils/logger/logger.js +1 -1
  280. package/dist/utils/logger/types.js +1 -1
  281. package/dist/utils/option-validation.js +1 -1
  282. package/dist/utils/process.js +1 -1
  283. package/dist/utils/prompt.js +1 -1
  284. package/dist/utils/proxy-fetch.js +1 -1
  285. package/dist/utils/spinner.js +1 -1
  286. package/dist/utils/sse-parser.js +1 -1
  287. package/dist/utils/string-utils.js +1 -1
  288. package/dist/utils/table-ref-parser.js +1 -1
  289. package/dist/utils/tdx-logger.js +1 -1
  290. package/dist/utils/version-check.js +1 -1
  291. package/package.json +1 -1
@@ -1 +1 @@
1
- const a59_0x7f9071=a59_0x392d;(function(_0x502a70,_0x19ef9b){const _0x3a8531=a59_0x392d,_0x1e540f=_0x502a70();while(!![]){try{const _0x16678f=-parseInt(_0x3a8531(0x309))/0x1*(parseInt(_0x3a8531(0x1b9))/0x2)+parseInt(_0x3a8531(0x334))/0x3+-parseInt(_0x3a8531(0x2d5))/0x4+parseInt(_0x3a8531(0x285))/0x5*(-parseInt(_0x3a8531(0x323))/0x6)+-parseInt(_0x3a8531(0x2b6))/0x7+-parseInt(_0x3a8531(0x1d8))/0x8+parseInt(_0x3a8531(0x360))/0x9;if(_0x16678f===_0x19ef9b)break;else _0x1e540f['push'](_0x1e540f['shift']());}catch(_0x92eb82){_0x1e540f['push'](_0x1e540f['shift']());}}}(a59_0x1a0d,0x9889e));import a59_0x33ddab from'chalk';import{existsSync}from'fs';import a59_0x1642f5 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';function a59_0x1a0d(){const _0x56b896=['Error:\x20At\x20least\x20one\x20KEY=VALUE\x20is\x20required','session','Show\x20tasks\x20for\x20an\x20attempt','group_error','Kill\x20a\x20running\x20attempt','verbose','Using\x20attempt\x20','workflow:workflows','success','Listing\x20workflow\x20attempts...','set','Fetching\x20schedule\x20#','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','list','\x20\x20(no\x20tasks\x20found\x20in\x20workflow\x20definition)','planned','✔\x20Project:\x20','Auto-selected\x20latest\x20session:\x20','data','dim','MAX_TIMELINE_WIDTH','(use\x20--limit\x20to\x20see\x20more)','cyan','\x20schedule','/app/workflows/','modified','\x20\x20Session\x20context\x20set\x20to:\x20','Select\x20a\x20workflow\x20to\x20run','renderSessionsTimeline','localeCompare','resolveProjectId','params','workflow','basename','Schedule\x20ID\x20is\x20required','sort','values','\x20session','readFile','text','Error:\x20Project\x20name\x20is\x20required','toISOString','(unknown)','index','red','\x22\x20to\x20new\x20project\x20\x22','...','renderTimeline','Error:','💡\x20Tip:\x20Use\x20','--schedule-id\x20cannot\x20be\x20combined\x20with\x20a\x20project.workflow\x20filter','get','Revision:\x20','length','follow','Listing\x20workflows...','indexOf','Pushing\x20workflow\x20project...','resolveProject','Disable\x20a\x20workflow\x20schedule','Error:\x20Secret\x20key\x20is\x20required','newProjectName','\x22\x20with\x20new\x20revision?','workflow:secrets:list','fileSize','\x0aError:','has','Getting\x20attempt\x20tasks...','Attempt\x20ID:\x20','New\x20project\x20name:\x20','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','sessions','✔\x20Pushed\x20','workflow:upload','some','setSecrets','\x20of\x20','Key:\x20','No\x20workflow\x20projects\x20found','✔\x20Secret\x20\x27','workflows','Parameters:\x20','trim','disableSchedule','isTTY','push','\x20secret','output','Filter:\x20project=','splice','\x22\x20already\x20exists\x20(ID:\x20','Usage:\x20tdx\x20wf\x20schedule\x20disable\x20<id>','status','workflow:push','workflow:run','Tip:\x20Run\x20\x22tdx\x20wf\x20schedules\x22\x20to\x20see\x20schedule\x20IDs','Usage:\x20tdx\x20wf\x20schedule\x20enable\x20<id>','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow:attempt','fill','Getting\x20attempt\x20details...','✔\x20Workflow\x20run\x20started','filesExtracted','Latest\x20session\x20has\x20no\x20attempt','---\x20','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Project:\x20','error','nextRunTime','\x20next:\x20','getDate','Deleting\x20project\x20','Task\x20name:\x20','message','\x1b[1A\x1b[2K','\x0aFailed\x20to\x20fetch\x20attempt\x20data','\x20task','workflow:schedule:enable','Usage:\x20workflow:delete\x20<project-name-or-id>','sessionTime','From\x20task:\x20','targetDir','slice','No\x20workflows\x20found\x20in\x20project:\x20','\x20has\x20no\x20attempts','taskName','navigateSessionsInteractive','Target:\x20','⚠\x20Showing\x20first\x20','Project\x20name\x20is\x20required','site','getMonth','Filter:\x20','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','isArray','\x20logs','Validation:\x20skipped','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','floor','\x20(use\x20a\x20larger\x20--limit\x20to\x20show\x20more)','Select\x20a\x20task\x20to\x20view\x20logs:','resolveProjectDir','path','Output\x20directory:\x20','Enabling\x20schedule\x20#','\x20unchanged','startsWith','json','workflow:secrets:delete','getHours','createdAt','done','Key\x20cannot\x20be\x20empty','logs','Session\x20','parse','duration','1396465KqNJoA','Expected\x20format:\x20--param\x20key=value','Show\x20specific\x20attempt\x20details','Workflow:','Retry\x20a\x20session\x20or\x20attempt','Session\x20time:\x20','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]','limit','metadata','retryAttemptName','cancelRequested','isNewProject','✔\x20Retry\x20started','task','new','startTime','projects','green','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','\x20\x20Project:\x20','No\x20attempts\x20found\x20in\x20project:\x20','\x20-\x20','resolve','Cancelled','yes','\x0a✔\x20Attempt\x20complete','param','session:','revision:\x20','\x20\x20Attempt\x20ID:\x20','type','sourceDir','✔\x20Workflow\x20project\x20context\x20cleared.','write','\x20\x20Changes:\x20','No\x20log\x20files\x20found\x20for\x20this\x20attempt','columns','Reason:\x20','state','size','project','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20AI','pollTimeline','✔\x20Schedule\x20found','Workflow:\x20','startedAt','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Loading\x20session...','5956097DLCdAc','\x20(system)','No\x20sessions\x20with\x20timing\x20information','List\x20workflows','\x20workflow','\x20tasks','Dry\x20run:\x20yes','end','summary','Upload\x20workflow\x20project\x20to\x20Treasure\x20AI\x20(digdag-style)','Total:\x20','Enable\x20a\x20workflow\x20schedule','Analyzing\x20changes...','\x20\x20Location:\x20','workflow:attempts','substring','workflowProject','split','download','-\x20no\x20files\x20written','kill','skipValidation','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','window',',\x20Workflow:\x20','attemptId','tasks','toLowerCase','\x20\x20tdx\x20wf\x20use\x20<project>','Resolving\x20project\x20\x27','workflow:logs','4118748ONFwsS','Select\x20a\x20session\x20to\x20view\x20timeline:','fullName','\x20(use\x20--limit\x20to\x20show\x20more)','\x20is\x20not\x20a\x20directory','\x20secrets\x20set\x20for\x20project\x20\x27','workflow:delete','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','config','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','workflow:use','filter','prepareCloneProject','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','sys','now','Attempt:\x20','parseProjectWorkflowPattern','Pattern:\x20','✔\x20Schedule\x20#','LABEL_MIN_SPACING','msPerChar','Loading\x20workflows...','fileCount','running','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','sessionId','join','Pushing\x20project...','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','sourceProjectName','\x0aApply\x20these\x20changes?','getWorkflow','\x20\x20Console:\x20','from','log','MAX_LABEL_COUNT','Setting\x20secret...','map','hasChanges','✔\x20Clone\x20complete','getFullYear','includeRetried','Schedule:\x20backfill\x20runs\x20enabled\x20(--backfill)','table','padStart','Parameters:','List\x20workflow\x20schedules','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','13BiENAX','select','deleteSecret','\x20\x20Target:\x20','isDirectory','workflow:sessions','pending','blue','workflow:tasks','Error:\x20Attempt\x20ID\x20is\x20required','\x20\x20New\x20attempt\x20ID:\x20','MAX_TASKS_DISPLAY','preparePushProject','No\x20workflow\x20tdx.json\x20found','workflow:timeline','\x0a✔\x20No\x20changes\x20to\x20push','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20\x20Session\x20ID:\x20','attempts','updatedAt','changes','Listing\x20schedules\x20for\x20','keys','revision','Retrying\x20session...','find','12PgWrqe','\x20modified','\x20\x20Workflow:\x20','session_id','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20\x20Revision:\x20','diff','format','bold','projectId','executePushProject','trimEnd','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','generateSessionTimelineRows','Pull\x20workflow\x20project\x20to\x20local\x20folder','listProjectSchedules','\x20project','68856kwhxgG','workflow:schedules','logFiles','workflow:download','Target\x20directory:\x20','Session\x20time:','toLocaleString','newProjectId','requireProject','disabledAt','projectName','all','min','\x0aClone\x20\x22','canceling','🔄\x20','deleted','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','\x20\x20Project\x20ID:\x20','Fetching\x20log\x20files...','No\x20attempts\x20found\x20for:\x20','\x20disabled\x20(','execute','No\x20workflow\x20sessions\x20found','✔\x20Showing\x20','finishedAt','retrySession','/attempt/','\x20to\x20see\x20detailed\x20logs','yellow','No\x20sessions\x20found\x20in\x20project:\x20','getMinutes','white','description','stdout','executeDryRun','workflow:retry','\x20secrets...','key','Project\x20filter:\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','jsonl','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','✔\x20Project\x20updated','42557562FendAq','Usage:\x20tdx\x20wf\x20schedule\x20list\x20[project[.workflow]]\x20|\x20--schedule-id\x20<id>','Listing\x20secrets...','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Killing\x20attempt...','\x0aPush\x20these\x20changes?','value','includes','Source\x20directory:\x20','Disabling\x20schedule\x20#','name','✔\x20Found\x20','skipSchedule','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','No\x20log\x20content\x20found','Error:\x20Invalid\x20JSON\x20in\x20--params','No\x20sessions\x20found','Status:\x20','replace','\x0a⚠\x20Project\x20\x22','renderSingleTimeline','workflow:projects','existingProjectId','Start\x20a\x20workflow\x20run','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','start','.\x20Expected\x20format:\x20KEY=VALUE','ICON_SPACING','includeSubtasks','force','relative','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','ICON_WIDTH','Params:\x20','\x20from\x20session\x20','fromTask','148854mWoZta','\x20\x20Next\x20run:\x20','showWorkflowConsoleUrl','\x20(disabled)','✔\x20Deleted\x20project\x20','No\x20sessions\x20found\x20for:\x20','delete','\x20attempt','cwd','\x20new','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','getSchedule','total','max','targetExists','stat','Downloading\x20logs...','Starting\x20workflow\x20run...','✔\x20Workflow\x20project\x20set\x20to:\x20','round','→\x20New\x20project:\x20','MIN_TIMELINE_WIDTH','Downloading\x20project\x20','dryRun','Failed\x20to\x20fetch\x20attempt\x20data','\x20deleted','getTime','workflow:pull','match','lastAttempt','repeat','5760616jGyQgo','rows','MIN_LABEL_COUNT','Invalid\x20format:\x20','\x0a[Dry\x20run]\x20Workflow\x20was\x20NOT\x20executed.','unknown','utf-8','List\x20all\x20workflow\x20projects','Pulling\x20project\x20','\x0a✔\x20Already\x20up\x20to\x20date','unchanged','No\x20workflows\x20found','attempt','\x0aDry\x20run\x20-\x20no\x20project\x20created','retryAttempt','Writing\x20files...'];a59_0x1a0d=function(){return _0x56b896;};return a59_0x1a0d();}import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import{parseTaskGraph,formatTaskGraph,summarizeTaskGraph,formatWarningSummary}from'../sdk/workflow/task-graph.js';import a59_0x30a0c4 from'prompts';function getAttemptStatusDisplay(_0x351efc){const _0x549c86=a59_0x392d;if(!_0x351efc)return{'icon':'⏳','text':''};const {done:_0x5c9b33,success:_0xb981b5,cancelRequested:_0x4ec461}=_0x351efc;if(!_0x5c9b33)return _0x4ec461?{'icon':'🛑','text':a59_0x33ddab[_0x549c86(0x351)](_0x549c86(0x342))}:{'icon':'🔄','text':a59_0x33ddab['blue'](_0x549c86(0x2f0))};if(_0xb981b5)return{'icon':'✅','text':a59_0x33ddab[_0x549c86(0x296)](_0x549c86(0x1f0))};return{'icon':'❌','text':a59_0x33ddab['red'](_0x549c86(0x253))};}export class WorkflowBaseCommand extends BaseCommand{[a59_0x7f9071(0x222)](_0x59cffe,_0x25b8be,_0x191220=0x0){const _0x170b76=a59_0x7f9071;return _0x59cffe[_0x191220]||_0x25b8be[_0x170b76(0x2c6)];}[a59_0x7f9071(0x33c)](_0x461404,_0x5a3768,_0x172de8=0x0){const _0x2df138=a59_0x7f9071,_0x52932d=this[_0x2df138(0x222)](_0x461404,_0x5a3768,_0x172de8);if(!_0x52932d)return console[_0x2df138(0x253)](a59_0x33ddab[_0x2df138(0x214)](_0x2df138(0x218)),_0x2df138(0x269)),console[_0x2df138(0x253)](a59_0x33ddab[_0x2df138(0x1fb)](_0x2df138(0x2ae))),null;return _0x52932d;}[a59_0x7f9071(0x2e9)](_0x50b508,_0x232efd){const _0x55a8c3=a59_0x7f9071;if(_0x50b508[0x0]){const _0x1f99d4=_0x50b508[0x0]['split']('.');if(_0x1f99d4['length']===0x1)return{'projectName':_0x1f99d4[0x0],'workflowName':undefined};else return _0x1f99d4[_0x55a8c3(0x21d)]===0x2?{'projectName':_0x1f99d4[0x0],'workflowName':_0x1f99d4[0x1]}:(console[_0x55a8c3(0x253)](a59_0x33ddab[_0x55a8c3(0x214)]('Error:'),_0x55a8c3(0x35c)),null);}return{'projectName':_0x232efd[_0x55a8c3(0x2c6)],'workflowName':undefined};}[a59_0x7f9071(0x275)](_0x393612,_0x2415e8,_0x2524ca=0x0){const _0x410a22=a59_0x7f9071;if(_0x393612[_0x2524ca])return _0x393612[_0x2524ca];if(_0x2415e8[_0x410a22(0x2c6)]){const _0x5ab348=a59_0x1642f5[_0x410a22(0x2f3)](process[_0x410a22(0x1c1)](),_0x410a22(0x238),_0x2415e8[_0x410a22(0x2c6)]);if(existsSync(a59_0x1642f5[_0x410a22(0x2f3)](_0x5ab348,'tdx.json')))return _0x5ab348;}return undefined;}async[a59_0x7f9071(0x1bb)](_0x4ee634,_0x3e876b,_0x402419){const _0x1a7837=a59_0x7f9071;try{const _0xe02466=await _0x4ee634[_0x1a7837(0x208)][_0x1a7837(0x238)](_0x3e876b,{'limit':0x1});if(_0xe02466[_0x1a7837(0x21d)]>0x0){const _0x13410d=_0xe02466[0x0]['id'],_0x22b2a1=getWorkflowUrl(_0x402419,_0x13410d);console[_0x1a7837(0x253)]('\x20\x20Console:\x20'+a59_0x33ddab[_0x1a7837(0x1fe)](_0x22b2a1));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a59_0x7f9071(0x2e1);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x363);async[a59_0x7f9071(0x34a)](_0x77f9a8){const _0x50a45e=a59_0x7f9071,{options:_0x198f24,args:_0x2a3f22,tdx:_0x323118}=_0x77f9a8,_0x4cf7d0=_0x2a3f22[0x0],_0x1b452d=_0x198f24['clear'];if(_0x1b452d)return saveSessionContext({'workflow_project':undefined},_0x198f24['session']),console[_0x50a45e(0x2fb)](a59_0x33ddab[_0x50a45e(0x296)](_0x50a45e(0x2a5))),0x0;if(!_0x4cf7d0)return console[_0x50a45e(0x253)](a59_0x33ddab[_0x50a45e(0x214)](_0x50a45e(0x218)),_0x50a45e(0x269)),console[_0x50a45e(0x253)](a59_0x33ddab[_0x50a45e(0x1fb)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x50a45e(0x253)](a59_0x33ddab['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x5e8f58=await withSpinner(_0x50a45e(0x2d3)+_0x4cf7d0+'\x27...',()=>_0x323118['workflow'][_0x50a45e(0x206)](_0x4cf7d0),{'verbose':_0x198f24['verbose']}),{name:_0x5e177e}=_0x5e8f58[_0x50a45e(0x1fa)];return saveSessionContext({'workflow_project':_0x5e177e},_0x198f24['session']),console['log'](a59_0x33ddab['green'](_0x50a45e(0x1cb)+a59_0x33ddab[_0x50a45e(0x1fe)](_0x5e177e))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x1aa);['description']=a59_0x7f9071(0x1df);async[a59_0x7f9071(0x34a)](_0x2f473f){const _0x209090=a59_0x7f9071,{options:_0x381e70,args:_0x447b6f,tdx:_0x3cbb68}=_0x2f473f,_0x24d3ef=_0x447b6f[0x0];_0x381e70[_0x209090(0x1ed)]&&_0x24d3ef&&console[_0x209090(0x253)](_0x209090(0x2ea)+_0x24d3ef);const _0xb5c970=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x3cbb68[_0x209090(0x208)][_0x209090(0x295)](_0x24d3ef,{'limit':_0x381e70[_0x209090(0x28c)]}),{'verbose':_0x381e70[_0x209090(0x1ed)]});let _0x5d004d=_0xb5c970[_0x209090(0x1fa)];_0x5d004d[_0x209090(0x20b)]((_0x18c45e,_0x2b41ed)=>_0x18c45e[_0x209090(0x19f)][_0x209090(0x205)](_0x2b41ed['name']));const _0xaaf9e2=_0x381e70[_0x209090(0x28c)]&&_0x5d004d[_0x209090(0x21d)]>=_0x381e70[_0x209090(0x28c)]?a59_0x33ddab[_0x209090(0x1fb)](_0x209090(0x2d8)):'';console[_0x209090(0x253)](_0x209090(0x1a0)+_0x5d004d[_0x209090(0x21d)]+_0x209090(0x333)+(_0x5d004d[_0x209090(0x21d)]!==0x1?'s':'')+_0xaaf9e2);if(_0x381e70[_0x209090(0x32a)]===_0x209090(0x27b)||_0x381e70['format']===_0x209090(0x35d)||_0x381e70[_0x209090(0x32a)]===_0x209090(0x304))await handleSDKOutput(_0x5d004d,_0x381e70);else{if(_0x5d004d['length']===0x0)_0x24d3ef?console['log']('No\x20projects\x20match\x20pattern:\x20'+_0x24d3ef):console[_0x209090(0x2fb)](_0x209090(0x236));else{const _0x120d1b=_0x5d004d[_0x209090(0x2fe)](_0x52a281=>{const _0x4f39bf=_0x209090,_0x270535=_0x52a281[_0x4f39bf(0x28d)]?.[_0x4f39bf(0x232)](_0x21c172=>_0x21c172[_0x4f39bf(0x35a)]===_0x4f39bf(0x2e6)),_0x185be3=_0x270535?a59_0x33ddab[_0x4f39bf(0x1fb)](_0x4f39bf(0x2b7)):'';return'📁\x20'+_0x52a281[_0x4f39bf(0x19f)]+_0x185be3;});await writeOutput(_0x120d1b[_0x209090(0x2f3)]('\x0a'),_0x381e70[_0x209090(0x23f)],_0x209090(0x1f5));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{['name']=a59_0x7f9071(0x1ef);['description']=a59_0x7f9071(0x2b9);async['execute'](_0x5933a){const _0x5835e8=a59_0x7f9071,{options:_0x5daf3a,args:_0x49cae2,tdx:_0x32a3ee}=_0x5933a,_0x28440b=this['resolveProject'](_0x49cae2,_0x5daf3a);_0x5daf3a['verbose']&&_0x28440b&&console['error'](_0x5835e8(0x35b)+_0x28440b);const _0x1286e5=await withSpinner(_0x5835e8(0x21f),()=>_0x32a3ee[_0x5835e8(0x208)][_0x5835e8(0x238)](_0x28440b,{'limit':_0x5daf3a[_0x5835e8(0x28c)]}),{'verbose':_0x5daf3a['verbose']});let _0x1c8686=_0x1286e5[_0x5835e8(0x1fa)];_0x1c8686[_0x5835e8(0x20b)]((_0x1358ef,_0x23e0e8)=>{const _0xc651db=_0x5835e8,_0x16226a=_0x1358ef[_0xc651db(0x19f)][_0xc651db(0x205)](_0x23e0e8[_0xc651db(0x19f)]);if(_0x16226a!==0x0)return _0x16226a;return(_0x1358ef['project']?.[_0xc651db(0x19f)]||'')[_0xc651db(0x205)](_0x23e0e8[_0xc651db(0x2ad)]?.[_0xc651db(0x19f)]||'');});const _0x4dcf6e=_0x5daf3a[_0x5835e8(0x28c)]&&_0x1c8686[_0x5835e8(0x21d)]>=_0x5daf3a[_0x5835e8(0x28c)]?a59_0x33ddab[_0x5835e8(0x1fb)](_0x5835e8(0x2d8)):'';console[_0x5835e8(0x253)](_0x5835e8(0x1a0)+_0x1c8686['length']+_0x5835e8(0x2ba)+(_0x1c8686[_0x5835e8(0x21d)]!==0x1?'s':'')+_0x4dcf6e);if(_0x5daf3a[_0x5835e8(0x32a)]==='json'||_0x5daf3a[_0x5835e8(0x32a)]===_0x5835e8(0x35d)||_0x5daf3a[_0x5835e8(0x32a)]==='table')await handleSDKOutput(_0x1c8686,_0x5daf3a);else{if(_0x1c8686[_0x5835e8(0x21d)]===0x0)_0x28440b?console['log'](_0x5835e8(0x263)+_0x28440b):console[_0x5835e8(0x2fb)]('No\x20workflows\x20found');else{const _0xb6b062=_0x5daf3a['site'],_0x128906=_0x1c8686[_0x5835e8(0x2fe)](_0x1f5c58=>{const _0x48a4f4=_0x5835e8,_0x14fa63=a59_0x33ddab['dim']('#'+_0x1f5c58['id']),_0x454c26=hyperlink(_0x14fa63,getWorkflowUrl(_0xb6b062,_0x1f5c58['id'])),_0x591dbb=_0x1f5c58[_0x48a4f4(0x2ad)]?.['name']?a59_0x33ddab[_0x48a4f4(0x1fb)]('\x20('+_0x1f5c58[_0x48a4f4(0x2ad)]['name']+')'):'';return'📋\x20'+_0x454c26+'\x20'+_0x1f5c58[_0x48a4f4(0x19f)]+_0x591dbb;});await writeOutput(_0x128906[_0x5835e8(0x2f3)]('\x0a'),_0x5daf3a[_0x5835e8(0x23f)],_0x5835e8(0x1f5));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x30e);[a59_0x7f9071(0x355)]='List\x20workflow\x20execution\x20sessions';async[a59_0x7f9071(0x34a)](_0x14dac4){const _0x379afa=a59_0x7f9071,{options:_0x44ec12,args:_0x46ea4b,tdx:_0x2e08a5}=_0x14dac4,_0x4cf527=this[_0x379afa(0x2e9)](_0x46ea4b,_0x44ec12);if(!_0x4cf527)return 0x1;const {projectName:_0x152424,workflowName:_0x37c2e4}=_0x4cf527;if(_0x44ec12[_0x379afa(0x1ed)]){if(_0x152424&&_0x37c2e4)console[_0x379afa(0x253)](_0x379afa(0x26c)+_0x152424+'.'+_0x37c2e4);else _0x152424&&console['error']('Filter:\x20project='+_0x152424);const _0x1323c8=_0x44ec12['status'];_0x1323c8&&console[_0x379afa(0x253)](_0x379afa(0x1a6)+_0x1323c8);}let _0x40ebba=0x28;if(process['stdout'][_0x379afa(0x23c)]&&!_0x44ec12[_0x379afa(0x23f)]&&!_0x44ec12[_0x379afa(0x32a)]){const _0x386ffd=process[_0x379afa(0x356)]['rows']||0x28;_0x40ebba=Math['max'](0x14,Math[_0x379afa(0x272)](_0x386ffd*0x2/0x3));}const _0x1f21fe=_0x44ec12[_0x379afa(0x28c)]||_0x40ebba,_0x135ddd=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x2e08a5['workflow']['sessions']({'projectName':_0x152424,'workflowName':_0x37c2e4,'status':_0x44ec12[_0x379afa(0x244)],'fromTime':_0x44ec12[_0x379afa(0x2fa)],'toTime':_0x44ec12['to'],'limit':_0x1f21fe}),{'verbose':_0x44ec12[_0x379afa(0x1ed)]}),_0x43e596=_0x135ddd['data'];_0x43e596[_0x379afa(0x20b)]((_0x10f23d,_0x5d4bc6)=>{const _0xf6324e=_0x379afa,_0x50c81e=_0x10f23d['sessionTime']||'',_0x2f8e3a=_0x5d4bc6[_0xf6324e(0x25f)]||'';return _0x2f8e3a['localeCompare'](_0x50c81e);});_0x43e596[_0x379afa(0x21d)]>=_0x1f21fe?console[_0x379afa(0x253)](_0x379afa(0x34c)+_0x43e596[_0x379afa(0x21d)]+'\x20sessions\x20'+a59_0x33ddab[_0x379afa(0x1fb)](_0x379afa(0x1fd))):console['error'](_0x379afa(0x1a0)+_0x43e596[_0x379afa(0x21d)]+_0x379afa(0x20d)+(_0x43e596[_0x379afa(0x21d)]!==0x1?'s':''));if(_0x44ec12['format']==='json'||_0x44ec12[_0x379afa(0x32a)]===_0x379afa(0x35d)||_0x44ec12[_0x379afa(0x32a)]===_0x379afa(0x304))await handleSDKOutput(_0x43e596,_0x44ec12);else{if(!process[_0x379afa(0x356)][_0x379afa(0x23c)]||_0x44ec12[_0x379afa(0x23f)]){if(_0x43e596[_0x379afa(0x21d)]===0x0){if(_0x152424&&_0x37c2e4)console[_0x379afa(0x2fb)](_0x379afa(0x1be)+_0x152424+'.'+_0x37c2e4);else _0x152424?console[_0x379afa(0x2fb)](_0x379afa(0x352)+_0x152424):console[_0x379afa(0x2fb)](_0x379afa(0x1a5));}else{const _0x26fa0e=_0x44ec12[_0x379afa(0x26a)],_0x304841=this['renderSessionsTimeline'](_0x43e596,_0x26fa0e);_0x44ec12[_0x379afa(0x23f)]?await writeOutput(_0x304841,_0x44ec12[_0x379afa(0x23f)],_0x379afa(0x1f5)):console[_0x379afa(0x2fb)](_0x304841);}!_0x152424&&(console[_0x379afa(0x253)](''),console[_0x379afa(0x253)](a59_0x33ddab[_0x379afa(0x1fb)](_0x379afa(0x1c3))),console[_0x379afa(0x253)](a59_0x33ddab[_0x379afa(0x1fb)](_0x379afa(0x2e5))+'or'+a59_0x33ddab[_0x379afa(0x1fb)](_0x379afa(0x2d2))));}else{if(_0x43e596[_0x379afa(0x21d)]===0x0){if(_0x152424&&_0x37c2e4)console[_0x379afa(0x2fb)](_0x379afa(0x1be)+_0x152424+'.'+_0x37c2e4);else _0x152424?console['log'](_0x379afa(0x352)+_0x152424):console[_0x379afa(0x2fb)](_0x379afa(0x1a5));}else await this[_0x379afa(0x266)](_0x43e596,_0x14dac4,_0x152424);}}return 0x0;}[a59_0x7f9071(0x204)](_0x57ad15,_0x21f972){const _0x25ffb4=a59_0x7f9071,_0x17fcae=[],_0x7eda5a=new Map();let _0x19865e=Infinity,_0x4d18fb=-Infinity;for(const _0x53e407 of _0x57ad15){if(_0x53e407[_0x25ffb4(0x1d6)]?.[_0x25ffb4(0x27e)]){const _0x21c33c=new Date(_0x53e407[_0x25ffb4(0x1d6)][_0x25ffb4(0x27e)])[_0x25ffb4(0x1d3)](),_0x1d3fde=_0x53e407[_0x25ffb4(0x1d6)][_0x25ffb4(0x34d)]?new Date(_0x53e407[_0x25ffb4(0x1d6)][_0x25ffb4(0x34d)])[_0x25ffb4(0x1d3)]():Date[_0x25ffb4(0x2e7)](),_0x22d5f4=_0x53e407[_0x25ffb4(0x2ad)]?.[_0x25ffb4(0x19f)]||_0x25ffb4(0x212);!_0x7eda5a[_0x25ffb4(0x22a)](_0x22d5f4)&&_0x7eda5a[_0x25ffb4(0x1f2)](_0x22d5f4,[]),_0x7eda5a[_0x25ffb4(0x21b)](_0x22d5f4)[_0x25ffb4(0x23d)]({'session':_0x53e407,'startTime':_0x21c33c,'endTime':_0x1d3fde,'duration':_0x1d3fde-_0x21c33c}),_0x19865e=Math[_0x25ffb4(0x340)](_0x19865e,_0x21c33c),_0x4d18fb=Math[_0x25ffb4(0x1c6)](_0x4d18fb,_0x1d3fde);}}if(_0x7eda5a[_0x25ffb4(0x2ac)]===0x0)return _0x25ffb4(0x2b8);const _0x16710a=process[_0x25ffb4(0x356)][_0x25ffb4(0x2a9)]||0x78,_0x1119a0=0x1e,_0x1b7ac3=0x32,_0x528423=0x4,_0x29a7ef=Math[_0x25ffb4(0x340)](_0x1b7ac3,Math[_0x25ffb4(0x1c6)](_0x1119a0,Math[_0x25ffb4(0x272)](_0x16710a*0.3))),_0x2f7c72=_0x16710a-_0x29a7ef-TIMELINE_CONFIG['GUTTER']-0x3-_0x528423,_0xf5213d=_0x4d18fb-_0x19865e,_0xd4fd46=_0xf5213d/_0x29a7ef,_0x5e50a7=renderTimeAxis({'startTime':_0x19865e,'endTime':_0x4d18fb,'durationMs':_0xf5213d,'msPerChar':_0xd4fd46},_0x29a7ef),_0x49dbfe=[];for(const _0x3da0dc of _0x7eda5a[_0x25ffb4(0x20c)]()){_0x49dbfe[_0x25ffb4(0x23d)](..._0x3da0dc);}_0x49dbfe[_0x25ffb4(0x20b)]((_0xade70,_0x34a7fe)=>_0x34a7fe['startTime']-_0xade70[_0x25ffb4(0x294)]);const _0x2f53d3=new Date(_0x19865e),_0x1e2672=formatDate(_0x2f53d3),_0x34e226=_0x528423+TIMELINE_CONFIG[_0x25ffb4(0x1b5)]+TIMELINE_CONFIG[_0x25ffb4(0x1b0)]+_0x2f7c72,_0x37c865='\x20'[_0x25ffb4(0x1d7)](_0x34e226-_0x1e2672[_0x25ffb4(0x21d)]),_0x458c26=_0x37c865+a59_0x33ddab[_0x25ffb4(0x1fb)](_0x1e2672)+'\x20'+_0x5e50a7;_0x17fcae[_0x25ffb4(0x23d)](_0x458c26);const _0x1d1c80=0x16;let _0x46b8a6=0x0;for(const _0x5cb636 of _0x49dbfe){const _0x3b83a4=_0x5cb636[_0x25ffb4(0x1e9)][_0x25ffb4(0x2ad)]?.[_0x25ffb4(0x19f)]||'?',_0x25b840=Math[_0x25ffb4(0x340)](stringWidth(_0x3b83a4),_0x1d1c80);_0x46b8a6=Math[_0x25ffb4(0x1c6)](_0x46b8a6,_0x25b840);}for(const _0x1e8056 of _0x49dbfe){const {session:_0x4ebe73,startTime:_0x18ef64,endTime:_0x8e13bd,duration:_0x117106}=_0x1e8056,_0x902b77=_0x4ebe73[_0x25ffb4(0x2ad)]?.['id'],_0x4c1703=_0x4ebe73['id'],_0x2a8d16=_0x4ebe73[_0x25ffb4(0x2ad)]?.[_0x25ffb4(0x19f)]||'?',_0x15760c=_0x4ebe73[_0x25ffb4(0x208)]?.[_0x25ffb4(0x19f)]||'?';let _0x40a3b1,_0x4f90b3;if(_0x4ebe73[_0x25ffb4(0x1d6)]){const _0x451049=_0x4ebe73[_0x25ffb4(0x1d6)];!_0x451049[_0x25ffb4(0x27f)]?(_0x40a3b1=_0x451049[_0x25ffb4(0x28f)]?'🛑':'🔄',_0x4f90b3=_0x451049[_0x25ffb4(0x28f)]?a59_0x33ddab[_0x25ffb4(0x351)]:a59_0x33ddab[_0x25ffb4(0x310)]):(_0x40a3b1=_0x451049['success']?'✅':'❌',_0x4f90b3=_0x451049[_0x25ffb4(0x1f0)]?a59_0x33ddab[_0x25ffb4(0x296)]:a59_0x33ddab[_0x25ffb4(0x214)]);}else _0x40a3b1='⏳',_0x4f90b3=a59_0x33ddab['dim'];const _0x3f684e='#'+_0x4c1703,_0x143e13=_0x902b77?hyperlink(_0x3f684e,getWorkflowSessionUrl(_0x21f972,_0x902b77,_0x4c1703)):_0x3f684e;let _0xef6ec3=_0x2a8d16;stringWidth(_0x2a8d16)>_0x1d1c80&&(_0xef6ec3=_0x2a8d16[_0x25ffb4(0x262)](0x0,_0x1d1c80-0x1)+'…');const _0x3ac70e=a59_0x33ddab[_0x25ffb4(0x1fb)](_0xef6ec3),_0x2d7462=stringWidth(_0xef6ec3),_0x55de40='\x20'[_0x25ffb4(0x1d7)](_0x46b8a6-stringWidth(_0xef6ec3)+0x2),_0x4817b8='('+formatElapsed(_0x117106)+')',_0x2319c3=stringWidth(_0x4817b8),_0x307b4c=stringWidth(_0x3f684e),_0xe56de6=_0x307b4c+0x1+_0x2d7462+_0x55de40[_0x25ffb4(0x21d)],_0x23bef0=_0x2f7c72-_0xe56de6-_0x2319c3-0x1-0x8;let _0x38842b=_0x15760c;stringWidth(_0x38842b)>_0x23bef0&&(_0x38842b=_0x38842b['slice'](0x0,_0x23bef0-0x1)+'…');const _0xd84d23=_0x143e13+'\x20'+_0x3ac70e+_0x55de40+_0x38842b,_0xc3b9de=stringWidth(_0xd84d23),_0xbebfe2=_0x2f7c72-_0xc3b9de-_0x2319c3,_0x41e125=_0xd84d23+'\x20'[_0x25ffb4(0x1d7)](Math['max'](0x1,_0xbebfe2))+a59_0x33ddab[_0x25ffb4(0x1fb)](_0x4817b8),_0x1b7179=Math[_0x25ffb4(0x272)]((_0x18ef64-_0x19865e)/_0xd4fd46),_0x3373cc=Math['floor']((_0x8e13bd-_0x19865e)/_0xd4fd46),_0x3a5111=Math['max'](_0x1b7179+0x1,_0x3373cc),_0x291161=new Array(_0x29a7ef)[_0x25ffb4(0x24b)]('\x20');for(let _0x1107a0=_0x1b7179;_0x1107a0<Math['min'](_0x3a5111,_0x29a7ef);_0x1107a0++){_0x291161[_0x1107a0]='─';}const _0x4b1165=_0x291161[_0x25ffb4(0x2fe)](_0x4b51fc=>_0x4b51fc==='\x20'?'\x20':_0x4f90b3(_0x4b51fc))[_0x25ffb4(0x2f3)]('');_0x17fcae['push'](_0x40a3b1+'\x20'+_0x41e125+'│'+_0x4b1165+'│');}return _0x17fcae[_0x25ffb4(0x2f3)]('\x0a');}async[a59_0x7f9071(0x266)](_0x6cd726,_0x3cbc3,_0x25cc7c){const _0x19cfe7=a59_0x7f9071,{options:_0x1e886f,tdx:_0x698b9f}=_0x3cbc3,_0x3c7e7f=_0x1e886f['site'],{timelineRows:_0x21cdac,timeAxisHeader:_0x3c6cc2}=this['generateSessionTimelineRows'](_0x6cd726,_0x3c7e7f),_0x3cefe2=_0x21cdac[_0x19cfe7(0x2e2)](_0x3e1b9d=>_0x3e1b9d[_0x19cfe7(0x2cf)]);if(_0x3cefe2['length']===0x0){const _0x943f4d=this['renderSessionsTimeline'](_0x6cd726,_0x3c7e7f);console[_0x19cfe7(0x2fb)](_0x943f4d);!_0x25cc7c&&(console[_0x19cfe7(0x253)](''),console['error'](a59_0x33ddab['dim'](_0x19cfe7(0x1c3))),console['error'](a59_0x33ddab['dim'](_0x19cfe7(0x2e5))+'or'+a59_0x33ddab[_0x19cfe7(0x1fb)](_0x19cfe7(0x2d2))));return;}_0x3c6cc2&&console[_0x19cfe7(0x2fb)](_0x3c6cc2);const _0x837ba0=_0x21cdac[_0x19cfe7(0x2e2)](_0x1af568=>_0x1af568[_0x19cfe7(0x2cf)])[_0x19cfe7(0x2fe)](_0x1af0b0=>({'title':_0x1af0b0['displayLine'],'value':_0x1af0b0[_0x19cfe7(0x2cf)]})),_0x466a58=process[_0x19cfe7(0x356)][_0x19cfe7(0x1d9)]||0x3c,_0x2977d7=Math['max'](0x28,Math[_0x19cfe7(0x272)](_0x466a58*0x2/0x3)),_0x1d8486=await a59_0x30a0c4({'type':'autocomplete','name':_0x19cfe7(0x2cf),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x837ba0,'initial':-0x1,'limit':_0x2977d7,'clearFirst':!![],'fallback':{'title':'No\x20matching\x20sessions\x20found','value':null},'suggest':(_0xe0944d,_0x2609dc)=>{const _0x40f442=_0x19cfe7;if(!_0xe0944d)return Promise[_0x40f442(0x29b)](_0x2609dc);const _0x3719e2=_0x2609dc[_0x40f442(0x2e2)](_0x568301=>{const _0x4535d7=_0x40f442,_0xe69fe2=_0x568301;return _0xe69fe2['title'][_0x4535d7(0x2d1)]()[_0x4535d7(0x367)](_0xe0944d[_0x4535d7(0x2d1)]());});return Promise['resolve'](_0x3719e2);}}),_0x2d2552=()=>{const _0x497293=_0x19cfe7;process[_0x497293(0x356)][_0x497293(0x2a6)](_0x497293(0x25a)),process[_0x497293(0x356)][_0x497293(0x2a6)](_0x497293(0x25a)),process[_0x497293(0x356)][_0x497293(0x2a6)](_0x497293(0x25a));},_0x50b4a7=_0x1d8486&&_0x1d8486[_0x19cfe7(0x2cf)]&&_0x1d8486['attemptId']!==null&&_0x1d8486['attemptId'][_0x19cfe7(0x23a)]()!=='';if(!_0x50b4a7){_0x2d2552(),console[_0x19cfe7(0x2fb)](a59_0x33ddab[_0x19cfe7(0x1fb)](_0x19cfe7(0x29c)));return;}_0x2d2552();const _0x5f244e=_0x6cd726[_0x19cfe7(0x322)](_0x358519=>_0x358519[_0x19cfe7(0x1d6)]?.['id']===_0x1d8486[_0x19cfe7(0x2cf)]);if(_0x5f244e){const _0x47511a=_0x5f244e[_0x19cfe7(0x2ad)]?.[_0x19cfe7(0x19f)]||'?',_0x4b3db6=_0x5f244e[_0x19cfe7(0x208)]?.[_0x19cfe7(0x19f)]||'?';console[_0x19cfe7(0x2fb)](_0x19cfe7(0x252)+a59_0x33ddab[_0x19cfe7(0x1fb)](_0x47511a)+_0x19cfe7(0x2ce)+a59_0x33ddab[_0x19cfe7(0x1fb)](_0x4b3db6));}const _0x3443f7=new WorkflowTimelineCommand();await _0x3443f7['execute']({'args':[],'options':{..._0x1e886f,'attemptId':_0x1d8486[_0x19cfe7(0x2cf)]},'tdx':_0x698b9f});}[a59_0x7f9071(0x330)](_0x199513,_0x3d6c29){const _0x38664e=a59_0x7f9071,_0x295c5c=new Map();for(const _0x4d0e8e of _0x199513){_0x4d0e8e['id']&&_0x4d0e8e[_0x38664e(0x1d6)]?.['id']&&_0x295c5c[_0x38664e(0x1f2)](_0x4d0e8e['id'],_0x4d0e8e['lastAttempt']['id']);}const _0x9116b5=[];let _0x268315='';const _0x93b332=this['renderSessionsTimeline'](_0x199513,_0x3d6c29),_0x32c902=_0x93b332[_0x38664e(0x2c7)]('\x0a');for(const _0x11339b of _0x32c902){if(_0x11339b[_0x38664e(0x27a)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x11339b[_0x38664e(0x1d5)](/^\s+\d{4}-\d{2}-\d{2}/))_0x268315=_0x11339b;else{if(_0x11339b['match'](/^[✅❌🔄🛑⏳]/)){const _0x273232=_0x11339b[_0x38664e(0x1d5)](/#(\d+)/),_0x3d87b6=_0x273232?_0x273232[0x1]:null,_0x28c541=_0x3d87b6?_0x295c5c[_0x38664e(0x21b)](_0x3d87b6)||null:null,_0xa0212b=_0x199513[_0x38664e(0x322)](_0x2b8078=>_0x2b8078['id']===_0x3d87b6),_0x5af510=_0xa0212b?.['project']?.['name']||'';_0x9116b5[_0x38664e(0x23d)]({'displayLine':_0x11339b,'attemptId':_0x28c541,'projectName':_0x5af510});}}}return{'timelineRows':_0x9116b5,'timeAxisHeader':_0x268315};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{['name']=a59_0x7f9071(0x2c4);['description']='List\x20workflow\x20attempts';async[a59_0x7f9071(0x34a)](_0x2dfddc){const _0xca313d=a59_0x7f9071,{options:_0x45418f,args:_0x307765,tdx:_0x35d4e6}=_0x2dfddc,_0x2d4ab7=this[_0xca313d(0x2e9)](_0x307765,_0x45418f);if(!_0x2d4ab7)return 0x1;const {projectName:_0x32364a,workflowName:_0x118637}=_0x2d4ab7,_0x28a6d0=_0x45418f[_0xca313d(0x302)];if(_0x45418f[_0xca313d(0x1ed)]){if(_0x32364a&&_0x118637)console['error'](_0xca313d(0x26c)+_0x32364a+'.'+_0x118637);else _0x32364a&&console[_0xca313d(0x253)](_0xca313d(0x240)+_0x32364a);_0x28a6d0&&console[_0xca313d(0x253)]('Include\x20retried:\x20yes');}const _0xe7f2cf=await withSpinner(_0xca313d(0x1f1),()=>_0x35d4e6[_0xca313d(0x208)][_0xca313d(0x31b)]({'projectName':_0x32364a,'workflowName':_0x118637,'includeRetried':_0x28a6d0,'limit':_0x45418f[_0xca313d(0x28c)]}),{'verbose':_0x45418f[_0xca313d(0x1ed)]}),_0x3959bb=_0xe7f2cf[_0xca313d(0x1fa)],_0x3a8a86=_0x45418f['limit']||0x64,_0x3dc630=_0x3959bb[_0xca313d(0x21d)]>=_0x3a8a86?a59_0x33ddab[_0xca313d(0x1fb)](_0xca313d(0x2d8)):'';console[_0xca313d(0x253)](_0xca313d(0x1a0)+_0x3959bb[_0xca313d(0x21d)]+_0xca313d(0x1c0)+(_0x3959bb['length']!==0x1?'s':'')+_0x3dc630);if(_0x45418f['format']==='json'||_0x45418f['format']===_0xca313d(0x35d)||_0x45418f['format']==='table')await handleSDKOutput(_0x3959bb,_0x45418f);else{if(_0x3959bb[_0xca313d(0x21d)]===0x0){if(_0x32364a&&_0x118637)console[_0xca313d(0x2fb)](_0xca313d(0x348)+_0x32364a+'.'+_0x118637);else _0x32364a?console[_0xca313d(0x2fb)](_0xca313d(0x299)+_0x32364a):console['log']('No\x20attempts\x20found');}else{const _0x4688ef=_0x45418f[_0xca313d(0x26a)],_0x5d369a=_0x3959bb['map'](_0x3188c3=>{const _0x2b8b6c=_0xca313d,_0x3dbd0d=a59_0x33ddab[_0x2b8b6c(0x1fb)]('#'+_0x3188c3['id']),_0x2d6976=_0x3188c3[_0x2b8b6c(0x2ad)]?.['id'],_0x13c98b=_0x3188c3[_0x2b8b6c(0x326)]||_0x3188c3['sessionId'],_0x5e0264=_0x2d6976&&_0x13c98b?hyperlink(_0x3dbd0d,getWorkflowAttemptUrl(_0x4688ef,_0x2d6976,_0x13c98b,_0x3188c3['id'])):_0x3dbd0d,{icon:_0x33d9bb,text:_0x37f977}=getAttemptStatusDisplay(_0x3188c3),_0x1a6495=(_0x3188c3['project']?.[_0x2b8b6c(0x19f)]||'?')+'.'+(_0x3188c3['workflow']?.[_0x2b8b6c(0x19f)]||'?'),_0x516cd0=_0x3188c3['sessionTime']?a59_0x33ddab[_0x2b8b6c(0x1fb)](_0x3188c3[_0x2b8b6c(0x25f)]):'';return(_0x5e0264+'\x20'+_0x33d9bb+(_0x37f977?'\x20'+_0x37f977:'')+'\x20'+_0x1a6495+'\x20'+_0x516cd0)[_0x2b8b6c(0x32e)]();});await writeOutput(_0x5d369a[_0xca313d(0x2f3)]('\x0a'),_0x45418f[_0xca313d(0x23f)],'list');}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x24a);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x287);async['execute'](_0x481330){const _0x209e73=a59_0x7f9071,{options:_0x1fb097,args:_0x534bc0,tdx:_0x29356b}=_0x481330,_0x5e9ee6=_0x534bc0[0x0];if(!_0x5e9ee6)return console['error'](_0x209e73(0x312)),0x1;_0x1fb097['verbose']&&console[_0x209e73(0x253)](_0x209e73(0x22c)+_0x5e9ee6);const _0x77da2c=await withSpinner(_0x209e73(0x24c),()=>_0x29356b['workflow'][_0x209e73(0x1e4)](_0x5e9ee6),{'verbose':_0x1fb097['verbose']}),_0x5498d9=_0x77da2c[_0x209e73(0x1fa)];let _0x569dc7;!_0x5498d9[_0x209e73(0x27f)]?_0x569dc7=_0x5498d9['cancelRequested']?_0x209e73(0x342):_0x209e73(0x2f0):_0x569dc7=_0x5498d9[_0x209e73(0x1f0)]?_0x209e73(0x1f0):_0x209e73(0x253);let _0x397338;if(_0x5498d9['createdAt']&&_0x5498d9['finishedAt']){const _0x45b731=new Date(_0x5498d9[_0x209e73(0x27e)])[_0x209e73(0x1d3)](),_0x3de209=new Date(_0x5498d9[_0x209e73(0x34d)])['getTime']();_0x397338=Math[_0x209e73(0x1cc)]((_0x3de209-_0x45b731)/0x3e8);}const _0x50e569={'attempt_id':_0x5498d9['id'],'status':_0x569dc7,..._0x5498d9[_0x209e73(0x213)]!==undefined&&{'index':_0x5498d9[_0x209e73(0x213)]},..._0x5498d9['project']&&{'project':_0x5498d9[_0x209e73(0x2ad)][_0x209e73(0x19f)]},..._0x5498d9['workflow']&&{'workflow':_0x5498d9[_0x209e73(0x208)][_0x209e73(0x19f)]},..._0x5498d9[_0x209e73(0x2f2)]&&{'session_id':_0x5498d9[_0x209e73(0x2f2)]},..._0x5498d9['sessionTime']&&{'session_time':_0x5498d9[_0x209e73(0x25f)]},..._0x5498d9[_0x209e73(0x28e)]&&{'retry_attempt':_0x5498d9['retryAttemptName']},..._0x397338!==undefined&&{'duration_sec':_0x397338},..._0x5498d9[_0x209e73(0x27e)]&&{'created_at':_0x5498d9['createdAt']},..._0x5498d9[_0x209e73(0x34d)]&&{'finished_at':_0x5498d9[_0x209e73(0x34d)]},...Object[_0x209e73(0x31f)](_0x5498d9[_0x209e73(0x207)])[_0x209e73(0x21d)]>0x0&&{'params':_0x5498d9['params']}};return await handleSingleObjectOutput(_0x50e569,_0x1fb097),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a59_0x7f9071(0x311);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x1ea);async[a59_0x7f9071(0x34a)](_0x45a4c4){const _0x5c9aed=a59_0x7f9071,{options:_0x1ade39,args:_0x11f0ef,tdx:_0x4b0707}=_0x45a4c4,_0x2cb051=_0x11f0ef[0x0];if(!_0x2cb051)return console[_0x5c9aed(0x253)](_0x5c9aed(0x312)),0x1;const _0x51c592=_0x1ade39[_0x5c9aed(0x1b1)];_0x1ade39[_0x5c9aed(0x1ed)]&&(console[_0x5c9aed(0x253)](_0x5c9aed(0x22c)+_0x2cb051),_0x51c592&&console[_0x5c9aed(0x253)]('Including\x20subtasks:\x20yes'));const _0x450fee=await withSpinner(_0x5c9aed(0x22b),()=>_0x4b0707[_0x5c9aed(0x208)][_0x5c9aed(0x2d0)](_0x2cb051,_0x51c592||![]),{'verbose':_0x1ade39[_0x5c9aed(0x1ed)]}),_0x515aef=_0x450fee['data'];return console[_0x5c9aed(0x253)](_0x5c9aed(0x1a0)+_0x515aef['length']+_0x5c9aed(0x25c)+(_0x515aef['length']!==0x1?'s':'')),await handleSDKOutput(_0x515aef,_0x1ade39),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x2d4);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x2df);async[a59_0x7f9071(0x34a)](_0x371507){const _0x2eb2e5=a59_0x7f9071,{options:_0x5895aa,args:_0x31aae4,tdx:_0x32129d}=_0x371507,_0x45d8a3=_0x31aae4[0x0];let _0x32575f=_0x31aae4[0x1];if(!_0x45d8a3)return console[_0x2eb2e5(0x253)](_0x2eb2e5(0x312)),0x1;_0x5895aa[_0x2eb2e5(0x1ed)]&&(console[_0x2eb2e5(0x253)](_0x2eb2e5(0x22c)+_0x45d8a3),_0x32575f&&console[_0x2eb2e5(0x253)](_0x2eb2e5(0x258)+_0x32575f));const _0x5ae3a0=await withSpinner(_0x2eb2e5(0x347),()=>_0x32129d[_0x2eb2e5(0x208)][_0x2eb2e5(0x336)](_0x45d8a3,_0x32575f),{'verbose':_0x5895aa['verbose']}),_0x4442bf=_0x5ae3a0['data'];if(_0x4442bf[_0x2eb2e5(0x21d)]===0x0)return console['error'](_0x2eb2e5(0x2a8)),0x0;if(!_0x32575f&&(_0x5895aa[_0x2eb2e5(0x27b)]||_0x5895aa['format']))return await handleSDKOutput(_0x4442bf,_0x5895aa),0x0;if(!_0x32575f){const _0x35fb27=_0x4442bf[_0x2eb2e5(0x2fe)](_0x18e4fe=>({'title':_0x18e4fe[_0x2eb2e5(0x265)]+'\x20('+formatBytes(_0x18e4fe[_0x2eb2e5(0x228)])+')','value':_0x18e4fe['taskName']})),_0x2d1741=await a59_0x30a0c4({'type':_0x2eb2e5(0x30a),'name':'task','message':_0x2eb2e5(0x274),'choices':_0x35fb27});if(!_0x2d1741['task'])return console['error'](_0x2eb2e5(0x29c)),0x0;_0x32575f=_0x2d1741[_0x2eb2e5(0x292)];}const _0x26fb8a=await withSpinner(_0x2eb2e5(0x1c9),()=>_0x32129d[_0x2eb2e5(0x208)][_0x2eb2e5(0x281)](_0x45d8a3,_0x32575f),{'verbose':_0x5895aa[_0x2eb2e5(0x1ed)]}),_0x1fc25f=_0x26fb8a[_0x2eb2e5(0x1fa)];return _0x1fc25f?console[_0x2eb2e5(0x2fb)](_0x1fc25f):console[_0x2eb2e5(0x253)](_0x2eb2e5(0x1a3)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a59_0x7f9071(0x19f)]='workflow:kill';[a59_0x7f9071(0x355)]=a59_0x7f9071(0x1ec);async[a59_0x7f9071(0x34a)](_0x16ab6b){const _0x435e2e=a59_0x7f9071,{options:_0xa27f7,args:_0x42e84f,tdx:_0x3a2bab}=_0x16ab6b,_0x424d4a=_0x42e84f[0x0];if(!_0x424d4a)return console[_0x435e2e(0x253)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x266de0=_0xa27f7['reason'];_0xa27f7[_0x435e2e(0x1ed)]&&(console['error'](_0x435e2e(0x22c)+_0x424d4a),_0x266de0&&console[_0x435e2e(0x253)](_0x435e2e(0x2aa)+_0x266de0));if(!_0xa27f7['yes']){if(!isInteractive())return console[_0x435e2e(0x253)](a59_0x33ddab[_0x435e2e(0x214)](_0x435e2e(0x229)),_0x435e2e(0x2dd)),console[_0x435e2e(0x253)](a59_0x33ddab['dim'](_0x435e2e(0x319))),0x1;const _0xf1f51f=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x424d4a+'?');if(!_0xf1f51f)return console[_0x435e2e(0x253)](a59_0x33ddab[_0x435e2e(0x351)]('Cancelled')),0x1;}const _0x225fe7=await withSpinner(_0x435e2e(0x364),()=>_0x3a2bab[_0x435e2e(0x208)][_0x435e2e(0x2ca)](_0x424d4a,_0x266de0),{'verbose':_0xa27f7[_0x435e2e(0x1ed)]}),_0x209a06=_0x225fe7[_0x435e2e(0x1fa)];return console[_0x435e2e(0x253)]('✔\x20'+_0x209a06),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x358);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x289);async['execute'](_0x2e6d23){const _0x5246d0=a59_0x7f9071,{options:_0x7d04bd,args:_0x2b833d,tdx:_0x8fb737}=_0x2e6d23,_0x2b33d5=_0x2b833d[0x0];if(!_0x2b33d5)return console['error'](_0x5246d0(0x249)),console[_0x5246d0(0x253)](_0x5246d0(0x2e0)),0x1;let _0x5ee5e=![],_0x4386ea=_0x2b33d5;if(_0x2b33d5[_0x5246d0(0x27a)](_0x5246d0(0x2a0)))_0x5ee5e=!![],_0x4386ea=_0x2b33d5[_0x5246d0(0x2c5)](0x8);else{if(_0x2b33d5[_0x5246d0(0x27a)]('attempt:'))_0x5ee5e=![],_0x4386ea=_0x2b33d5[_0x5246d0(0x2c5)](0x8);else return console[_0x5246d0(0x253)](_0x5246d0(0x327)),console[_0x5246d0(0x253)](_0x5246d0(0x2e0)),0x1;}const _0x58ef1c=_0x7d04bd[_0x5246d0(0x1b8)],_0x3f0295=_0x7d04bd['resumeFrom'],_0x1fef3d=_0x7d04bd[_0x5246d0(0x207)],_0x39492d=_0x7d04bd[_0x5246d0(0x1b2)];_0x7d04bd[_0x5246d0(0x1ed)]&&(console['error'](_0x5246d0(0x267)+(_0x5ee5e?_0x5246d0(0x1e9):'attempt')+'\x20'+_0x4386ea),_0x58ef1c&&console[_0x5246d0(0x253)](_0x5246d0(0x260)+_0x58ef1c),_0x3f0295&&console[_0x5246d0(0x253)]('Resume\x20from:\x20'+_0x3f0295),_0x1fef3d&&console['error'](_0x5246d0(0x1b6)+_0x1fef3d),_0x39492d&&console[_0x5246d0(0x253)]('Force:\x20yes'));let _0x525c1c;if(_0x1fef3d)try{if(_0x1fef3d['startsWith']('@')){const _0x319eb1=await import('fs/promises'),_0x1c67a9=_0x1fef3d['substring'](0x1),_0x4e2ba5=await _0x319eb1[_0x5246d0(0x20e)](_0x1c67a9,_0x5246d0(0x1de));_0x525c1c=JSON['parse'](_0x4e2ba5);}else _0x525c1c=JSON[_0x5246d0(0x283)](_0x1fef3d);}catch{return console['error'](_0x5246d0(0x1a4)),0x1;}if(!_0x7d04bd[_0x5246d0(0x29d)]){if(!isInteractive())return console['error'](a59_0x33ddab[_0x5246d0(0x214)](_0x5246d0(0x229)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a59_0x33ddab[_0x5246d0(0x1fb)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3593be=await confirmKey(_0x5246d0(0x1a2)+(_0x5ee5e?_0x5246d0(0x1e9):_0x5246d0(0x1e4))+'\x20'+_0x4386ea+'?');if(!_0x3593be)return console[_0x5246d0(0x253)](a59_0x33ddab[_0x5246d0(0x351)](_0x5246d0(0x29c))),0x1;}let _0x54514b;_0x5ee5e?_0x54514b=await withSpinner(_0x5246d0(0x321),()=>_0x8fb737[_0x5246d0(0x208)][_0x5246d0(0x34e)](_0x4386ea,{'fromTask':_0x58ef1c,'retryParams':_0x525c1c}),{'verbose':_0x7d04bd[_0x5246d0(0x1ed)]}):_0x54514b=await withSpinner('Retrying\x20attempt...',()=>_0x8fb737['workflow'][_0x5246d0(0x1e6)](_0x4386ea,{'resumeFrom':_0x3f0295,'retryParams':_0x525c1c,'force':_0x39492d}),{'verbose':_0x7d04bd[_0x5246d0(0x1ed)]});const _0x8e7f7=_0x54514b[_0x5246d0(0x1fa)];return console[_0x5246d0(0x253)](_0x5246d0(0x291)),console[_0x5246d0(0x253)](_0x5246d0(0x313)+_0x8e7f7[_0x5246d0(0x2cf)]),console[_0x5246d0(0x253)]('\x20\x20Session\x20ID:\x20'+_0x8e7f7[_0x5246d0(0x2f2)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x246);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x1ac);async['execute'](_0x13f876){const _0x1600fb=a59_0x7f9071,{options:_0x160504,args:_0x15ad57,tdx:_0x36a111}=_0x13f876;let _0x2393cd=_0x15ad57[0x0];if(!_0x2393cd){const _0x5bf747=this[_0x1600fb(0x222)]([],_0x160504),_0x428a4b=await withSpinner(_0x1600fb(0x2ee),()=>_0x36a111[_0x1600fb(0x208)]['workflows'](_0x5bf747,{'limit':_0x160504[_0x1600fb(0x28c)]}),{'verbose':_0x160504[_0x1600fb(0x1ed)]}),_0x4e3ecd=_0x428a4b[_0x1600fb(0x1fa)];if(_0x4e3ecd[_0x1600fb(0x21d)]===0x0)return console[_0x1600fb(0x253)](_0x1600fb(0x1e3)),!_0x5bf747&&console[_0x1600fb(0x253)](a59_0x33ddab[_0x1600fb(0x1fb)](_0x1600fb(0x2ae))),0x1;const _0x4ca0bf=_0x4e3ecd['map'](_0x4260e4=>({'title':_0x4260e4[_0x1600fb(0x2ad)]?.[_0x1600fb(0x19f)]+'.'+_0x4260e4[_0x1600fb(0x19f)],'value':_0x4260e4[_0x1600fb(0x2ad)]?.[_0x1600fb(0x19f)]+'.'+_0x4260e4[_0x1600fb(0x19f)],'description':_0x4260e4[_0x1600fb(0x320)]?_0x1600fb(0x2a1)+_0x4260e4[_0x1600fb(0x320)]:undefined})),_0x2fb3e1=await a59_0x30a0c4({'type':_0x1600fb(0x30a),'name':_0x1600fb(0x208),'message':_0x1600fb(0x203),'choices':_0x4ca0bf});if(!_0x2fb3e1[_0x1600fb(0x208)])return 0x1;_0x2393cd=_0x2fb3e1[_0x1600fb(0x208)];}if(!_0x2393cd['includes']('.')){const _0x3cd8e2=this[_0x1600fb(0x222)]([],_0x160504);if(_0x3cd8e2)_0x2393cd=_0x3cd8e2+'.'+_0x2393cd;else return console[_0x1600fb(0x253)](a59_0x33ddab[_0x1600fb(0x214)](_0x1600fb(0x218)),_0x1600fb(0x2cc)),console[_0x1600fb(0x253)](a59_0x33ddab[_0x1600fb(0x1fb)](_0x1600fb(0x2ae))),0x1;}const _0x4dbec6=_0x160504[_0x1600fb(0x29f)],_0x4793b0=_0x160504[_0x1600fb(0x25f)],_0x291da6={};if(_0x4dbec6&&Array[_0x1600fb(0x26e)](_0x4dbec6))for(const _0x4c2027 of _0x4dbec6){const _0x59806d=_0x4c2027[_0x1600fb(0x220)]('=');if(_0x59806d===-0x1)return console[_0x1600fb(0x253)]('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x4c2027),console['error'](_0x1600fb(0x286)),0x1;const _0x2eb111=_0x4c2027['substring'](0x0,_0x59806d),_0x1e46a3=_0x4c2027['substring'](_0x59806d+0x1);try{_0x291da6[_0x2eb111]=JSON[_0x1600fb(0x283)](_0x1e46a3);}catch{_0x291da6[_0x2eb111]=_0x1e46a3;}}_0x160504['verbose']&&(console[_0x1600fb(0x253)](_0x1600fb(0x2b2)+_0x2393cd),Object[_0x1600fb(0x31f)](_0x291da6)[_0x1600fb(0x21d)]>0x0&&console[_0x1600fb(0x253)](_0x1600fb(0x239)+JSON['stringify'](_0x291da6)),_0x4793b0&&console[_0x1600fb(0x253)](_0x1600fb(0x28a)+_0x4793b0));if(_0x160504['dryRun'])return await this[_0x1600fb(0x357)](_0x13f876,_0x2393cd,_0x291da6,_0x4793b0);const _0x56ade5=await withSpinner(_0x1600fb(0x1ca),()=>_0x36a111['workflow']['run'](_0x2393cd,_0x291da6,{'sessionTime':_0x4793b0}),{'verbose':_0x160504[_0x1600fb(0x1ed)]}),_0xec01e3=_0x56ade5[_0x1600fb(0x1fa)];console[_0x1600fb(0x253)](_0x1600fb(0x24d)),console[_0x1600fb(0x253)](_0x1600fb(0x2a2)+_0xec01e3['id']),console[_0x1600fb(0x253)](_0x1600fb(0x31a)+_0xec01e3[_0x1600fb(0x2f2)]),console['error'](_0x1600fb(0x298)+_0xec01e3[_0x1600fb(0x2ad)]?.[_0x1600fb(0x19f)]),console[_0x1600fb(0x253)](_0x1600fb(0x325)+_0xec01e3[_0x1600fb(0x208)]?.['name']);if(_0xec01e3[_0x1600fb(0x2ad)]?.['id']&&_0xec01e3[_0x1600fb(0x2f2)]&&_0xec01e3['id']){const _0xfcf93c=_0x160504[_0x1600fb(0x26a)],_0x3ebe6b=getConsoleUrl(_0xfcf93c,_0x1600fb(0x200)+_0xec01e3[_0x1600fb(0x2ad)]['id']+'/sessions/'+_0xec01e3[_0x1600fb(0x2f2)]+_0x1600fb(0x34f)+_0xec01e3['id']);console[_0x1600fb(0x253)](_0x1600fb(0x2f9)+a59_0x33ddab[_0x1600fb(0x1fe)](_0x3ebe6b));}return 0x0;}async[a59_0x7f9071(0x357)](_0x440196,_0x2d9057,_0x274404,_0x3c7a9e){const _0x18c4b3=a59_0x7f9071,{options:_0x31e9f5,tdx:_0x1f36d6}=_0x440196,_0x32e8de=await withSpinner('Fetching\x20workflow\x20'+_0x2d9057+_0x18c4b3(0x216),()=>_0x1f36d6[_0x18c4b3(0x208)][_0x18c4b3(0x2f8)](_0x2d9057),{'verbose':_0x31e9f5[_0x18c4b3(0x1ed)]}),_0x37af7b=_0x32e8de[_0x18c4b3(0x1fa)],_0x4ed62e=_0x3c7a9e??new Date()[_0x18c4b3(0x211)]();console['log'](a59_0x33ddab[_0x18c4b3(0x32b)](_0x18c4b3(0x288)),_0x2d9057),console['log'](a59_0x33ddab[_0x18c4b3(0x32b)](_0x18c4b3(0x339)),_0x4ed62e),console[_0x18c4b3(0x2fb)](a59_0x33ddab[_0x18c4b3(0x32b)](_0x18c4b3(0x306)),JSON['stringify'](_0x274404)),console[_0x18c4b3(0x2fb)](''),console[_0x18c4b3(0x2fb)](a59_0x33ddab[_0x18c4b3(0x32b)]('Task\x20graph:'));const _0x3bce84=parseTaskGraph(_0x37af7b[_0x18c4b3(0x2de)]??null);if(_0x3bce84[_0x18c4b3(0x21d)]===0x0)console[_0x18c4b3(0x2fb)](a59_0x33ddab['dim'](_0x18c4b3(0x1f6)));else for(const _0x195446 of formatTaskGraph(_0x3bce84)){console['log'](_0x195446);}const _0x53a323=summarizeTaskGraph(_0x3bce84),_0x391e8a=formatWarningSummary(_0x53a323);return _0x391e8a&&(console['log'](''),console[_0x18c4b3(0x2fb)](a59_0x33ddab[_0x18c4b3(0x351)](_0x391e8a))),console['log'](a59_0x33ddab[_0x18c4b3(0x351)](_0x18c4b3(0x1dc))),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a59_0x7f9071(0x337);[a59_0x7f9071(0x355)]='Download\x20workflow\x20project\x20from\x20Treasure\x20AI';async[a59_0x7f9071(0x34a)](_0x50356b){const _0x3eb25c=a59_0x7f9071,{options:_0x1a6812,args:_0x5b40fa,tdx:_0x295534}=_0x50356b,_0x2d2dfc=_0x5b40fa[0x0],_0x2e9a50=_0x5b40fa[0x1]||'.';if(!_0x2d2dfc)return console[_0x3eb25c(0x253)](_0x3eb25c(0x210)),console['error'](_0x3eb25c(0x345)),0x1;const _0x59bc9b=_0x1a6812[_0x3eb25c(0x320)];_0x1a6812['verbose']&&(console[_0x3eb25c(0x253)](_0x3eb25c(0x252)+_0x2d2dfc),console[_0x3eb25c(0x253)](_0x3eb25c(0x277)+_0x2e9a50),_0x59bc9b&&console['error'](_0x3eb25c(0x21c)+_0x59bc9b));const _0x21a93a=await withSpinner(_0x3eb25c(0x1cf)+_0x2d2dfc+_0x3eb25c(0x216),()=>_0x295534['workflow'][_0x3eb25c(0x2c8)](_0x2d2dfc,_0x2e9a50,{'revision':_0x59bc9b}),{'verbose':_0x1a6812[_0x3eb25c(0x1ed)]}),_0x8ad2f9=_0x21a93a[_0x3eb25c(0x1fa)];return console['error']('✔\x20Downloaded\x20'+_0x8ad2f9[_0x3eb25c(0x33e)]),console[_0x3eb25c(0x253)]('\x20\x20Revision:\x20'+_0x8ad2f9['revision']),console[_0x3eb25c(0x253)]('\x20\x20Files\x20extracted:\x20'+_0x8ad2f9[_0x3eb25c(0x24e)]),console[_0x3eb25c(0x253)](_0x3eb25c(0x2c3)+_0x2e9a50+'/'+_0x8ad2f9[_0x3eb25c(0x33e)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a59_0x7f9071(0x231);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x2bf);async[a59_0x7f9071(0x34a)](_0x2cc88e){const _0x55c463=a59_0x7f9071,{options:_0x2413f7,args:_0x25aa84,tdx:_0x1730ae}=_0x2cc88e;let _0x131f96='.',_0x71a0e=_0x2413f7[_0x55c463(0x19f)];if(_0x25aa84[0x0]){const {promises:_0x4c217a}=await import('fs');try{const _0x40151c=await _0x4c217a[_0x55c463(0x1c8)](_0x25aa84[0x0]);if(_0x40151c[_0x55c463(0x30d)]())_0x131f96=_0x25aa84[0x0];else return console['error']('Error:\x20'+_0x25aa84[0x0]+_0x55c463(0x2d9)),0x1;}catch{_0x71a0e=_0x25aa84[0x0],_0x131f96='.';}}const _0x408dce=_0x2413f7[_0x55c463(0x320)],_0x1c6c4f=_0x2413f7['skipValidation'];_0x2413f7[_0x55c463(0x1ed)]&&(console[_0x55c463(0x253)]('Project\x20directory:\x20'+_0x131f96),_0x71a0e&&console[_0x55c463(0x253)]('Project\x20name:\x20'+_0x71a0e),_0x408dce&&console[_0x55c463(0x253)](_0x55c463(0x21c)+_0x408dce),_0x1c6c4f&&console[_0x55c463(0x253)](_0x55c463(0x270)));const _0x4f3ed9=await withSpinner(_0x55c463(0x221),()=>_0x1730ae[_0x55c463(0x208)][_0x55c463(0x23d)](_0x131f96,{'projectName':_0x71a0e,'revision':_0x408dce,'skipValidation':_0x1c6c4f}),{'verbose':_0x2413f7[_0x55c463(0x1ed)]}),_0x544cc3=_0x4f3ed9[_0x55c463(0x1fa)];return console['error'](_0x55c463(0x230)+_0x544cc3[_0x55c463(0x33e)]),console['error'](_0x55c463(0x346)+_0x544cc3['projectId']),console[_0x55c463(0x253)](_0x55c463(0x328)+_0x544cc3[_0x55c463(0x320)]),await this['showWorkflowConsoleUrl'](_0x1730ae,_0x544cc3[_0x55c463(0x33e)],_0x2413f7['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{['name']=a59_0x7f9071(0x1d4);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x331);async[a59_0x7f9071(0x34a)](_0xd4f2ca){const _0x57ebf1=a59_0x7f9071,{options:_0x5a2c66,args:_0x3baea1,tdx:_0x137ad6}=_0xd4f2ca,_0x5872ac=_0x3baea1[0x0],_0x4acfe4=_0x3baea1[0x1];if(!_0x5872ac)return console[_0x57ebf1(0x253)](a59_0x33ddab[_0x57ebf1(0x214)](_0x57ebf1(0x218)),_0x57ebf1(0x269)),console[_0x57ebf1(0x253)](a59_0x33ddab[_0x57ebf1(0x1fb)](_0x57ebf1(0x1f4))),0x1;const _0x2b8224=_0x5a2c66['revision'];_0x5a2c66[_0x57ebf1(0x1ed)]&&(console[_0x57ebf1(0x253)](_0x57ebf1(0x252)+_0x5872ac),_0x4acfe4&&console[_0x57ebf1(0x253)](_0x57ebf1(0x338)+_0x4acfe4),_0x2b8224&&console['error'](_0x57ebf1(0x21c)+_0x2b8224),_0x5a2c66[_0x57ebf1(0x1d0)]&&console['error'](_0x57ebf1(0x2bc)));const _0x315f85=await withSpinner(_0x57ebf1(0x1e0)+_0x5872ac+_0x57ebf1(0x216),()=>_0x137ad6[_0x57ebf1(0x208)]['pullProject'](_0x5872ac,{'targetDir':_0x4acfe4,'revision':_0x2b8224}),{'verbose':_0x5a2c66['verbose']}),_0x477e63=_0x315f85[_0x57ebf1(0x1fa)];_0x477e63[_0x57ebf1(0x290)]?console[_0x57ebf1(0x253)](_0x57ebf1(0x1cd)+_0x477e63[_0x57ebf1(0x33e)]):console[_0x57ebf1(0x253)]('→\x20Project:\x20'+_0x477e63['projectName']);console['error'](_0x57ebf1(0x328)+_0x477e63['revision']),console[_0x57ebf1(0x253)](_0x57ebf1(0x30c)+(a59_0x1642f5[_0x57ebf1(0x1b3)](process[_0x57ebf1(0x1c1)](),_0x477e63[_0x57ebf1(0x261)])||'.')),console[_0x57ebf1(0x253)](_0x57ebf1(0x2a7)+a59_0x33ddab[_0x57ebf1(0x296)]('+'+_0x477e63[_0x57ebf1(0x2be)][_0x57ebf1(0x293)]+_0x57ebf1(0x1c2))+',\x20'+(a59_0x33ddab[_0x57ebf1(0x351)]('~'+_0x477e63[_0x57ebf1(0x2be)][_0x57ebf1(0x201)]+_0x57ebf1(0x324))+',\x20')+(a59_0x33ddab[_0x57ebf1(0x214)]('-'+_0x477e63['summary'][_0x57ebf1(0x344)]+_0x57ebf1(0x1d2))+',\x20')+(''+a59_0x33ddab['dim'](_0x477e63[_0x57ebf1(0x2be)]['unchanged']+_0x57ebf1(0x279))));for(const _0x2824a3 of _0x477e63[_0x57ebf1(0x31d)]){_0x2824a3[_0x57ebf1(0x2a3)]===_0x57ebf1(0x201)&&_0x2824a3[_0x57ebf1(0x329)]&&(console[_0x57ebf1(0x253)]('\x0a'+a59_0x33ddab[_0x57ebf1(0x1fe)](_0x57ebf1(0x250)+_0x2824a3[_0x57ebf1(0x276)])),console[_0x57ebf1(0x253)](_0x2824a3[_0x57ebf1(0x329)]));}if(!_0x477e63[_0x57ebf1(0x2ff)])return saveSessionContext({'workflow_project':_0x477e63[_0x57ebf1(0x33e)]},_0x5a2c66[_0x57ebf1(0x1e9)]),console[_0x57ebf1(0x253)](a59_0x33ddab[_0x57ebf1(0x296)](_0x57ebf1(0x1e1))),console[_0x57ebf1(0x253)](a59_0x33ddab[_0x57ebf1(0x1fb)](_0x57ebf1(0x202)+_0x477e63[_0x57ebf1(0x33e)])),0x0;if(_0x5a2c66[_0x57ebf1(0x1d0)])return console[_0x57ebf1(0x253)](a59_0x33ddab['yellow']('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0x5a2c66[_0x57ebf1(0x29d)]){if(!isInteractive())return console['error'](a59_0x33ddab['red']('\x0aError:'),_0x57ebf1(0x2dd)),console['error'](a59_0x33ddab[_0x57ebf1(0x1fb)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x982818=await confirmKey(_0x57ebf1(0x2f7));if(!_0x982818)return console[_0x57ebf1(0x253)](a59_0x33ddab[_0x57ebf1(0x351)](_0x57ebf1(0x29c)),_0x57ebf1(0x2c9)),0x1;}await withSpinner(_0x57ebf1(0x1e7),()=>_0x137ad6[_0x57ebf1(0x208)]['applyPullProject'](_0x477e63,{'revision':_0x2b8224}),{'verbose':_0x5a2c66[_0x57ebf1(0x1ed)]}),saveSessionContext({'workflow_project':_0x477e63['projectName']},_0x5a2c66[_0x57ebf1(0x1e9)]),console[_0x57ebf1(0x253)](a59_0x33ddab[_0x57ebf1(0x296)]('✔\x20Pull\x20complete'));const _0x23a4ec=a59_0x1642f5[_0x57ebf1(0x1b3)](process[_0x57ebf1(0x1c1)](),_0x477e63[_0x57ebf1(0x261)])||'.';return console[_0x57ebf1(0x253)](a59_0x33ddab[_0x57ebf1(0x1fb)](_0x57ebf1(0x2c3)+_0x23a4ec)),console['error'](a59_0x33ddab[_0x57ebf1(0x1fb)](_0x57ebf1(0x202)+_0x477e63[_0x57ebf1(0x33e)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a59_0x7f9071(0x245);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x2af);async[a59_0x7f9071(0x34a)](_0x4bb901){const _0x52b5d5=a59_0x7f9071,{options:_0x251a9e,args:_0x3b3df8,tdx:_0x29db89}=_0x4bb901,_0x26824c=this['resolveProjectDir'](_0x3b3df8,_0x251a9e),_0x16dbc0=_0x251a9e,{revision:_0x45ac30,skipValidation:_0x524d13,backfill:_0x4cf11f}=_0x16dbc0,_0x444019=_0x4cf11f===undefined?undefined:!_0x4cf11f;_0x251a9e[_0x52b5d5(0x1ed)]&&(_0x26824c&&console['error'](_0x52b5d5(0x368)+_0x26824c),_0x45ac30&&console['error'](_0x52b5d5(0x21c)+_0x45ac30),_0x251a9e[_0x52b5d5(0x1d0)]&&console[_0x52b5d5(0x253)]('Dry\x20run:\x20yes'),_0x524d13&&console[_0x52b5d5(0x253)](_0x52b5d5(0x270)),_0x4cf11f&&console[_0x52b5d5(0x253)](_0x52b5d5(0x303)));let _0x38d3b6;try{_0x38d3b6=await withSpinner(_0x52b5d5(0x2c2),()=>_0x29db89[_0x52b5d5(0x208)][_0x52b5d5(0x315)]({'sourceDir':_0x26824c,'revision':_0x45ac30,'skipValidation':_0x524d13,'skipSchedule':_0x444019}),{'verbose':_0x251a9e[_0x52b5d5(0x1ed)]});}catch(_0x280f13){if(_0x280f13 instanceof Error&&_0x280f13['message'][_0x52b5d5(0x367)](_0x52b5d5(0x316)))return console[_0x52b5d5(0x253)](a59_0x33ddab[_0x52b5d5(0x214)](_0x52b5d5(0x218)),'No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents'),_0x251a9e[_0x52b5d5(0x2c6)]?console['error'](a59_0x33ddab[_0x52b5d5(0x1fb)]('Tip:\x20cd\x20to\x20workflows/'+_0x251a9e[_0x52b5d5(0x2c6)]+_0x52b5d5(0x22e)+_0x251a9e['workflowProject']+'\x27')):console[_0x52b5d5(0x253)](a59_0x33ddab['dim'](_0x52b5d5(0x308))),0x1;throw _0x280f13;}const _0x624949=_0x38d3b6['data'];console[_0x52b5d5(0x253)](_0x52b5d5(0x1f8)+_0x624949['projectName']),console[_0x52b5d5(0x253)]('\x20\x20Source:\x20'+_0x624949[_0x52b5d5(0x2a4)]),console[_0x52b5d5(0x253)](_0x52b5d5(0x328)+_0x624949[_0x52b5d5(0x320)]),console['error'](_0x52b5d5(0x2a7)+a59_0x33ddab['green']('+'+_0x624949[_0x52b5d5(0x2be)][_0x52b5d5(0x293)]+_0x52b5d5(0x1c2))+',\x20'+(a59_0x33ddab[_0x52b5d5(0x351)]('~'+_0x624949[_0x52b5d5(0x2be)][_0x52b5d5(0x201)]+_0x52b5d5(0x324))+',\x20')+(a59_0x33ddab[_0x52b5d5(0x214)]('-'+_0x624949[_0x52b5d5(0x2be)]['deleted']+'\x20deleted')+',\x20')+(''+a59_0x33ddab[_0x52b5d5(0x1fb)](_0x624949[_0x52b5d5(0x2be)][_0x52b5d5(0x1e2)]+_0x52b5d5(0x279))));for(const _0x3b8ca7 of _0x624949[_0x52b5d5(0x31d)]){_0x3b8ca7[_0x52b5d5(0x2a3)]==='modified'&&_0x3b8ca7['diff']&&(console[_0x52b5d5(0x253)]('\x0a'+a59_0x33ddab[_0x52b5d5(0x1fe)](_0x52b5d5(0x250)+_0x3b8ca7[_0x52b5d5(0x276)])),console[_0x52b5d5(0x253)](_0x3b8ca7[_0x52b5d5(0x329)]));}if(!_0x624949[_0x52b5d5(0x2ff)])return console[_0x52b5d5(0x253)](a59_0x33ddab['green'](_0x52b5d5(0x318))),await this[_0x52b5d5(0x1bb)](_0x29db89,_0x624949[_0x52b5d5(0x33e)],_0x251a9e[_0x52b5d5(0x26a)]),0x0;if(_0x251a9e[_0x52b5d5(0x1d0)])return console['error'](a59_0x33ddab[_0x52b5d5(0x351)]('\x0aDry\x20run\x20-\x20nothing\x20pushed')),0x0;if(!_0x251a9e[_0x52b5d5(0x29d)]){if(!isInteractive())return console[_0x52b5d5(0x253)](a59_0x33ddab[_0x52b5d5(0x214)](_0x52b5d5(0x229)),_0x52b5d5(0x2dd)),console[_0x52b5d5(0x253)](a59_0x33ddab[_0x52b5d5(0x1fb)](_0x52b5d5(0x319))),0x1;const _0x5e0973=await confirmKey(_0x52b5d5(0x365));if(!_0x5e0973)return console[_0x52b5d5(0x253)](a59_0x33ddab['yellow'](_0x52b5d5(0x29c)),'-\x20nothing\x20pushed'),0x1;}const _0x100d62=await withSpinner(_0x52b5d5(0x2f4),()=>_0x29db89[_0x52b5d5(0x208)][_0x52b5d5(0x32d)](_0x624949),{'verbose':_0x251a9e[_0x52b5d5(0x1ed)]}),_0x1291bd=_0x100d62[_0x52b5d5(0x1fa)];return console[_0x52b5d5(0x253)](a59_0x33ddab['green']('✔\x20Push\x20complete')),console[_0x52b5d5(0x253)](_0x52b5d5(0x346)+_0x1291bd[_0x52b5d5(0x32c)]),console[_0x52b5d5(0x253)](_0x52b5d5(0x328)+_0x1291bd[_0x52b5d5(0x320)]),await this[_0x52b5d5(0x1bb)](_0x29db89,_0x1291bd[_0x52b5d5(0x33e)],_0x251a9e[_0x52b5d5(0x26a)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a59_0x7f9071(0x19f)]='workflow:clone';['description']=a59_0x7f9071(0x1ad);async[a59_0x7f9071(0x34a)](_0x463217){const _0x43e46f=a59_0x7f9071,{options:_0x3f7856,args:_0x427e32,tdx:_0xb5fd25}=_0x463217,_0xa6e40=this['resolveProjectDir'](_0x427e32,_0x3f7856),_0x246fdc=_0x3f7856[_0x43e46f(0x19f)],_0x3721a1=_0x3f7856['revision'],_0x20a40a=_0x3f7856[_0x43e46f(0x2cb)];if(!_0xa6e40)return console[_0x43e46f(0x253)](a59_0x33ddab[_0x43e46f(0x214)](_0x43e46f(0x218)),'Source\x20directory\x20is\x20required'),console[_0x43e46f(0x253)](a59_0x33ddab[_0x43e46f(0x1fb)](_0x43e46f(0x1b4))),console[_0x43e46f(0x253)](a59_0x33ddab[_0x43e46f(0x1fb)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x246fdc)return console['error'](a59_0x33ddab[_0x43e46f(0x214)](_0x43e46f(0x218)),_0x43e46f(0x297)),console[_0x43e46f(0x253)](a59_0x33ddab[_0x43e46f(0x1fb)](_0x43e46f(0x1b4))),0x1;_0x3f7856[_0x43e46f(0x1ed)]&&(console[_0x43e46f(0x253)]('Source\x20directory:\x20'+_0xa6e40),console[_0x43e46f(0x253)](_0x43e46f(0x22d)+_0x246fdc),_0x3721a1&&console[_0x43e46f(0x253)](_0x43e46f(0x21c)+_0x3721a1),_0x3f7856['dryRun']&&console['error'](_0x43e46f(0x2bc)),_0x20a40a&&console['error'](_0x43e46f(0x270)));const _0x42c8de=await withSpinner('Analyzing\x20project...',()=>_0xb5fd25[_0x43e46f(0x208)][_0x43e46f(0x2e3)](_0xa6e40,_0x246fdc,{'revision':_0x3721a1,'skipValidation':_0x20a40a}),{'verbose':_0x3f7856[_0x43e46f(0x1ed)]}),_0x595bc2=_0x42c8de[_0x43e46f(0x1fa)];console[_0x43e46f(0x253)]('Source:\x20'+_0x595bc2[_0x43e46f(0x2a4)]);_0x595bc2[_0x43e46f(0x2f6)]&&console[_0x43e46f(0x253)]('Source\x20project:\x20'+_0x595bc2[_0x43e46f(0x2f6)]);console[_0x43e46f(0x253)]('New\x20project\x20name:\x20'+_0x595bc2[_0x43e46f(0x225)]),console[_0x43e46f(0x253)](_0x43e46f(0x21c)+_0x595bc2[_0x43e46f(0x320)]),console[_0x43e46f(0x253)]('Files\x20to\x20upload:\x20'+_0x595bc2[_0x43e46f(0x2ef)]);_0x595bc2['targetExists']&&(console[_0x43e46f(0x253)](a59_0x33ddab['yellow'](_0x43e46f(0x1a8)+_0x595bc2[_0x43e46f(0x225)]+_0x43e46f(0x242)+_0x595bc2[_0x43e46f(0x1ab)]+')')),console[_0x43e46f(0x253)](a59_0x33ddab[_0x43e46f(0x351)](_0x43e46f(0x32f))));if(_0x3f7856[_0x43e46f(0x1d0)])return console['error'](a59_0x33ddab[_0x43e46f(0x351)](_0x43e46f(0x1e5))),0x0;if(!_0x3f7856[_0x43e46f(0x29d)]){if(!isInteractive())return console[_0x43e46f(0x253)](a59_0x33ddab[_0x43e46f(0x214)](_0x43e46f(0x229)),_0x43e46f(0x2dd)),console['error'](a59_0x33ddab[_0x43e46f(0x1fb)](_0x43e46f(0x319))),0x1;const _0x49b03e=_0x595bc2[_0x43e46f(0x2f6)]||a59_0x1642f5[_0x43e46f(0x209)](_0xa6e40),_0x2044f3=_0x595bc2['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x246fdc+_0x43e46f(0x226):_0x43e46f(0x341)+_0x49b03e+_0x43e46f(0x215)+_0x246fdc+'\x22?',_0x130803=await confirmKey(_0x2044f3);if(!_0x130803)return console[_0x43e46f(0x253)](a59_0x33ddab['yellow']('Cancelled')),0x1;}const _0x16b531=await withSpinner(_0x595bc2[_0x43e46f(0x1c7)]?'Updating\x20'+_0x246fdc+_0x43e46f(0x216):'Cloning\x20to\x20'+_0x246fdc+'...',()=>_0xb5fd25[_0x43e46f(0x208)]['executeCloneProject'](_0x595bc2),{'verbose':_0x3f7856[_0x43e46f(0x1ed)]}),_0x357979=_0x16b531[_0x43e46f(0x1fa)];return console[_0x43e46f(0x253)](a59_0x33ddab[_0x43e46f(0x296)](_0x595bc2[_0x43e46f(0x1c7)]?_0x43e46f(0x35f):_0x43e46f(0x300))),console[_0x43e46f(0x253)](_0x43e46f(0x298)+_0x357979['newProjectName']),console[_0x43e46f(0x253)](_0x43e46f(0x346)+_0x357979[_0x43e46f(0x33b)]),console[_0x43e46f(0x253)]('\x20\x20Revision:\x20'+_0x357979['revision']),await this[_0x43e46f(0x1bb)](_0xb5fd25,_0x357979[_0x43e46f(0x225)],_0x3f7856['site']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x2db);[a59_0x7f9071(0x355)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20AI';async['execute'](_0x4195fa){const _0x21685b=a59_0x7f9071,{options:_0x20cca6,args:_0xb83666,tdx:_0xb69ff3}=_0x4195fa,_0x1b40be=_0xb83666[0x0];if(!_0x1b40be)return console[_0x21685b(0x253)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x21685b(0x253)](_0x21685b(0x25e)),0x1;_0x20cca6[_0x21685b(0x1ed)]&&console[_0x21685b(0x253)](_0x21685b(0x252)+_0x1b40be);if(!_0x20cca6[_0x21685b(0x29d)]){if(!isInteractive())return console[_0x21685b(0x253)](a59_0x33ddab[_0x21685b(0x214)]('\x0aError:'),_0x21685b(0x2dd)),console[_0x21685b(0x253)](a59_0x33ddab[_0x21685b(0x1fb)](_0x21685b(0x319))),0x1;const _0x1d6c51=await confirmKey(_0x21685b(0x2dc)+_0x1b40be+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x1d6c51)return console[_0x21685b(0x253)](a59_0x33ddab[_0x21685b(0x351)](_0x21685b(0x29c))),0x1;}const _0x32bcb1=await withSpinner(_0x21685b(0x257)+_0x1b40be+_0x21685b(0x216),()=>_0xb69ff3[_0x21685b(0x208)][_0x21685b(0x1bf)](_0x1b40be),{'verbose':_0x20cca6['verbose']}),_0x5065d5=_0x32bcb1['data'];return console[_0x21685b(0x253)](_0x21685b(0x1bd)+_0x5065d5['projectName']),console[_0x21685b(0x253)]('\x20\x20Project\x20ID:\x20'+_0x5065d5[_0x21685b(0x32c)]),0x0;}}export function parseKeyValue(_0x32b625){const _0x15f767=a59_0x7f9071,_0x406bf7=_0x32b625['indexOf']('=');if(_0x406bf7===-0x1)throw new Error(_0x15f767(0x1db)+_0x32b625+_0x15f767(0x1af));const _0x285943=_0x32b625[_0x15f767(0x2c5)](0x0,_0x406bf7),_0x109611=_0x32b625[_0x15f767(0x2c5)](_0x406bf7+0x1);if(!_0x285943)throw new Error(_0x15f767(0x280));return{'key':_0x285943,'value':_0x109611};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x227);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x251);async[a59_0x7f9071(0x34a)](_0x517db4){const _0x2c429c=a59_0x7f9071,{options:_0x37a9f5,args:_0x3d29e0,tdx:_0x1970a6}=_0x517db4,_0x1d4aa3=this['requireProject'](_0x3d29e0,_0x37a9f5);if(!_0x1d4aa3)return 0x1;_0x37a9f5[_0x2c429c(0x1ed)]&&console[_0x2c429c(0x253)](_0x2c429c(0x252)+_0x1d4aa3);const _0x1a9cb0=await withSpinner(_0x2c429c(0x362),()=>_0x1970a6[_0x2c429c(0x208)]['listSecrets'](_0x1d4aa3),{'verbose':_0x37a9f5[_0x2c429c(0x1ed)]}),{secrets:_0x54779c}=_0x1a9cb0[_0x2c429c(0x1fa)];return console[_0x2c429c(0x253)](_0x2c429c(0x1a0)+_0x54779c[_0x2c429c(0x21d)]+_0x2c429c(0x23e)+(_0x54779c[_0x2c429c(0x21d)]!==0x1?'s':'')),await handleSDKOutput(_0x54779c,_0x37a9f5),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a59_0x7f9071(0x19f)]='workflow:secrets:set';['description']=a59_0x7f9071(0x2f5);async[a59_0x7f9071(0x34a)](_0x4b25d2){const _0x3702b7=a59_0x7f9071,{options:_0x3da97d,args:_0x344486,tdx:_0x2dc0c2}=_0x4b25d2;let _0x15f40d,_0x537a6e;if(_0x344486[_0x3702b7(0x21d)]>=0x1&&!_0x344486[0x0][_0x3702b7(0x367)]('='))_0x15f40d=_0x344486[0x0],_0x537a6e=_0x344486['slice'](0x1);else{if(_0x344486[_0x3702b7(0x21d)]>=0x1&&_0x3da97d[_0x3702b7(0x2c6)])_0x15f40d=_0x3da97d['workflowProject'],_0x537a6e=_0x344486;else return _0x344486['length']>=0x1?(console['error'](_0x3702b7(0x210)),console[_0x3702b7(0x253)](_0x3702b7(0x2ae)),0x1):(console[_0x3702b7(0x253)](_0x3702b7(0x1e8)),console['error'](_0x3702b7(0x28b)),0x1);}if(_0x537a6e[_0x3702b7(0x21d)]===0x0)return console[_0x3702b7(0x253)](_0x3702b7(0x1e8)),console[_0x3702b7(0x253)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE\x20[KEY2=VALUE2\x20...]'),0x1;const _0x153d50={};try{for(const _0x2c3cf9 of _0x537a6e){const {key:_0x5bd47c,value:_0x37887f}=parseKeyValue(_0x2c3cf9);_0x153d50[_0x5bd47c]=_0x37887f;}}catch(_0x4c4f7a){return _0x4c4f7a instanceof Error&&console[_0x3702b7(0x253)](a59_0x33ddab['red'](_0x3702b7(0x218)),_0x4c4f7a[_0x3702b7(0x259)]),0x1;}const _0x5c22f9=Object['keys'](_0x153d50);_0x3da97d[_0x3702b7(0x1ed)]&&(console[_0x3702b7(0x253)]('Project:\x20'+_0x15f40d),console['error']('Secrets\x20to\x20set:\x20'+_0x5c22f9[_0x3702b7(0x2f3)](',\x20')));const _0x5069fb=await withSpinner(_0x5c22f9[_0x3702b7(0x21d)]===0x1?_0x3702b7(0x2fd):'Setting\x20'+_0x5c22f9['length']+_0x3702b7(0x359),()=>_0x2dc0c2[_0x3702b7(0x208)][_0x3702b7(0x233)](_0x15f40d,_0x153d50),{'verbose':_0x3da97d[_0x3702b7(0x1ed)]}),_0x23feb1=_0x5069fb[_0x3702b7(0x1fa)];return console[_0x3702b7(0x253)](_0x5c22f9[_0x3702b7(0x21d)]===0x1?'✔\x20Secret\x20\x27'+_0x23feb1[_0x3702b7(0x31f)][0x0]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x23feb1[_0x3702b7(0x33e)]+'\x27':'✔\x20'+_0x23feb1[_0x3702b7(0x31f)]['length']+_0x3702b7(0x2da)+_0x23feb1['projectName']+'\x27'),(_0x3da97d['json']||_0x3da97d[_0x3702b7(0x35d)])&&await handleSingleObjectOutput(_0x23feb1,_0x3da97d),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x27c);['description']=a59_0x7f9071(0x26d);async[a59_0x7f9071(0x34a)](_0xc01e22){const _0x2e670e=a59_0x7f9071,{options:_0x4d1765,args:_0x2af1be,tdx:_0x43acfe}=_0xc01e22;let _0x435989,_0x5c942c;if(_0x2af1be[_0x2e670e(0x21d)]>=0x2)_0x435989=_0x2af1be[0x0],_0x5c942c=_0x2af1be[0x1];else{if(_0x2af1be[_0x2e670e(0x21d)]===0x1&&_0x4d1765[_0x2e670e(0x2c6)])_0x435989=_0x4d1765[_0x2e670e(0x2c6)],_0x5c942c=_0x2af1be[0x0];else return _0x2af1be[_0x2e670e(0x21d)]===0x1?(console[_0x2e670e(0x253)](_0x2e670e(0x210)),console[_0x2e670e(0x253)](_0x2e670e(0x2ae)),0x1):(console[_0x2e670e(0x253)](_0x2e670e(0x224)),console[_0x2e670e(0x253)]('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x4d1765[_0x2e670e(0x1ed)]&&(console[_0x2e670e(0x253)](_0x2e670e(0x252)+_0x435989),console[_0x2e670e(0x253)](_0x2e670e(0x235)+_0x5c942c));if(!_0x4d1765[_0x2e670e(0x29d)]){if(!isInteractive())return console[_0x2e670e(0x253)](a59_0x33ddab[_0x2e670e(0x214)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x2e670e(0x253)](a59_0x33ddab['dim'](_0x2e670e(0x319))),0x1;const _0x529cb9=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x5c942c+'\x27\x20from\x20project\x20\x27'+_0x435989+'\x27?');if(!_0x529cb9)return console[_0x2e670e(0x253)](a59_0x33ddab[_0x2e670e(0x351)](_0x2e670e(0x29c))),0x1;}const _0x41e1b3=await withSpinner('Deleting\x20secret...',()=>_0x43acfe['workflow'][_0x2e670e(0x30b)](_0x435989,_0x5c942c),{'verbose':_0x4d1765[_0x2e670e(0x1ed)]}),_0x40687b=_0x41e1b3[_0x2e670e(0x1fa)];return console['error'](_0x2e670e(0x237)+_0x40687b[_0x2e670e(0x35a)]+_0x2e670e(0x2f1)+_0x40687b['projectName']+'\x27'),(_0x4d1765['json']||_0x4d1765[_0x2e670e(0x35d)])&&await handleSingleObjectOutput(_0x40687b,_0x4d1765),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(_0x16b552){const _0x14bb0a=a59_0x7f9071,_0x5bd5f9=Math[_0x14bb0a(0x272)](_0x16b552/0x3e8),_0x39bda7=Math['floor'](_0x5bd5f9/0x3c),_0xbe06a1=Math[_0x14bb0a(0x272)](_0x39bda7/0x3c),_0x1ad141=Math['floor'](_0xbe06a1/0x18);if(_0x1ad141>0x0){const _0x5ce70d=_0xbe06a1%0x18;return _0x5ce70d>0x0?_0x1ad141+'d\x20'+_0x5ce70d+'h':_0x1ad141+'d';}else{if(_0xbe06a1>0x0){const _0x28bb84=_0x39bda7%0x3c;return _0x28bb84>0x0?_0xbe06a1+'h\x20'+_0x28bb84+'m':_0xbe06a1+'h';}else{if(_0x39bda7>0x0){const _0x4f2f25=_0x5bd5f9%0x3c;return _0x4f2f25>0x0?_0x39bda7+'m\x20'+_0x4f2f25+'s':_0x39bda7+'m';}else return _0x5bd5f9+'s';}}}function formatTimestamp(_0x5533b2,_0xdfce43){const _0x22bea9=a59_0x7f9071,_0x2052d5=new Date(_0x5533b2),_0x329db6=String(_0x2052d5[_0x22bea9(0x27d)]())[_0x22bea9(0x305)](0x2,'0'),_0x2707ad=String(_0x2052d5[_0x22bea9(0x353)]())[_0x22bea9(0x305)](0x2,'0'),_0x37a3b7=_0x329db6+':'+_0x2707ad,_0x2f7b39=_0x2052d5[_0x22bea9(0x301)]()===_0xdfce43[_0x22bea9(0x301)]()&&_0x2052d5[_0x22bea9(0x26b)]()===_0xdfce43[_0x22bea9(0x26b)]()&&_0x2052d5[_0x22bea9(0x256)]()===_0xdfce43['getDate']();if(_0x2f7b39)return _0x37a3b7;else{const _0x2209d4=String(_0x2052d5[_0x22bea9(0x26b)]()+0x1)[_0x22bea9(0x305)](0x2,'0'),_0x131639=String(_0x2052d5['getDate']())[_0x22bea9(0x305)](0x2,'0');return _0x2209d4+'-'+_0x131639+'\x20'+_0x37a3b7;}}function formatDate(_0x5347f2){const _0x1b03df=a59_0x7f9071,_0x59e2f9=_0x5347f2['getFullYear'](),_0x56124d=String(_0x5347f2[_0x1b03df(0x26b)]()+0x1)[_0x1b03df(0x305)](0x2,'0'),_0x43e5de=String(_0x5347f2[_0x1b03df(0x256)]())[_0x1b03df(0x305)](0x2,'0');return _0x59e2f9+'-'+_0x56124d+'-'+_0x43e5de;}function getTaskStateIcon(_0x4c0d9d){const _0x2b6bc3={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x2b6bc3[_0x4c0d9d]||'⚪';}function getBarChar(_0x1c1fc8){const _0x43b363=a59_0x7f9071;return _0x1c1fc8===_0x43b363(0x253)||_0x1c1fc8===_0x43b363(0x1eb)?'×':'─';}function getBarColor(_0x1c9b7b){const _0xcbb117=a59_0x7f9071,_0x51aa9d={'success':a59_0x33ddab[_0xcbb117(0x296)],'error':a59_0x33ddab[_0xcbb117(0x214)],'group_error':a59_0x33ddab[_0xcbb117(0x214)],'running':a59_0x33ddab['blue'],'blocked':a59_0x33ddab[_0xcbb117(0x351)],'planned':a59_0x33ddab['dim'],'canceling':a59_0x33ddab[_0xcbb117(0x351)]};return _0x51aa9d[_0x1c9b7b]||a59_0x33ddab[_0xcbb117(0x354)];}function parseTaskName(_0x20a777){const _0x50509f=a59_0x7f9071;let _0x2e5881=_0x20a777[_0x50509f(0x1a7)](/^\++/,'');const _0x46687b=_0x2e5881[_0x50509f(0x2c7)]('+'),_0x45517a=_0x46687b[_0x50509f(0x21d)]>0x1?_0x46687b['length']-0x2:0x0,_0x3e49c2=_0x46687b[_0x46687b[_0x50509f(0x21d)]-0x1]||_0x2e5881;return{'level':_0x45517a,'name':'+'+_0x3e49c2};}function truncateTaskName(_0x4e301d,_0x4fb483){const _0x2c2d86=stringWidth(_0x4e301d);if(_0x2c2d86<=_0x4fb483)return _0x4e301d;let _0x50b62a=_0x4e301d;while(stringWidth(_0x50b62a+'…')>_0x4fb483&&_0x50b62a['length']>0x0){_0x50b62a=_0x50b62a['slice'](0x0,-0x1);}return _0x50b62a+'…';}function calculateTimeScale(_0x13d566,_0x1fd616){const _0x1776dc=a59_0x7f9071;return{'startTime':_0x13d566['start'],'endTime':_0x13d566[_0x1776dc(0x2bd)],'durationMs':_0x13d566[_0x1776dc(0x284)],'msPerChar':_0x13d566[_0x1776dc(0x284)]/_0x1fd616};}function timeToPosition(_0x30997c,_0x15e48c,_0x5e090a){const _0x3d8118=a59_0x7f9071,_0x3b97a4=_0x30997c-_0x15e48c[_0x3d8118(0x294)],_0x44c222=Math['floor'](_0x3b97a4/_0x15e48c[_0x3d8118(0x2ed)]);return Math[_0x3d8118(0x1c6)](0x0,Math['min'](_0x44c222,_0x5e090a));}function a59_0x392d(_0x1391e9,_0x189eb4){_0x1391e9=_0x1391e9-0x19f;const _0x1a0de5=a59_0x1a0d();let _0x392d9f=_0x1a0de5[_0x1391e9];return _0x392d9f;}function renderTimeAxis(_0x21ff12,_0x536630){const _0x3dba73=a59_0x7f9071,_0x23b235=Math[_0x3dba73(0x340)](TIMELINE_CONFIG[_0x3dba73(0x2fc)],Math[_0x3dba73(0x1c6)](TIMELINE_CONFIG[_0x3dba73(0x1da)],Math[_0x3dba73(0x272)](_0x536630/TIMELINE_CONFIG['LABEL_WIDTH_DIVISOR']))),_0x1635e0=_0x21ff12['durationMs']/(_0x23b235-0x1),_0x600377=new Date(_0x21ff12[_0x3dba73(0x294)]),_0x4f966f=[];for(let _0x192c54=0x0;_0x192c54<_0x23b235;_0x192c54++){const _0xc1d61c=_0x21ff12[_0x3dba73(0x294)]+_0x192c54*_0x1635e0,_0xe94be1=timeToPosition(_0xc1d61c,_0x21ff12,_0x536630),_0x4ba609=formatTimestamp(_0xc1d61c,_0x600377);_0x4f966f[_0x3dba73(0x23d)]({'pos':_0xe94be1,'text':_0x4ba609});}const _0x4adff3=new Array(_0x536630)['fill']('\x20');let _0x150362=-0x1;for(const {pos:_0x438728,text:_0x363767}of _0x4f966f){let _0xe9eb9b=Math[_0x3dba73(0x1c6)](0x0,_0x438728-Math['floor'](_0x363767[_0x3dba73(0x21d)]/0x2));_0xe9eb9b<=_0x150362+TIMELINE_CONFIG['LABEL_MIN_SPACING']&&(_0xe9eb9b=_0x150362+TIMELINE_CONFIG[_0x3dba73(0x2ec)]+0x1);_0xe9eb9b+_0x363767['length']>_0x536630&&(_0xe9eb9b=_0x536630-_0x363767[_0x3dba73(0x21d)]);if(_0xe9eb9b>=0x0&&_0xe9eb9b+_0x363767[_0x3dba73(0x21d)]<=_0x536630&&_0xe9eb9b>_0x150362){for(let _0x56b1f4=0x0;_0x56b1f4<_0x363767['length'];_0x56b1f4++){_0x4adff3[_0xe9eb9b+_0x56b1f4]=_0x363767[_0x56b1f4];}_0x150362=_0xe9eb9b+_0x363767[_0x3dba73(0x21d)]-0x1;}}return _0x4adff3['join']('');}function renderTaskRow(_0x495508,_0x2a5f92,_0x564326,_0x1f9462){const _0x39674f=a59_0x7f9071,{level:_0x5f5dc6,name:_0x5731ef}=parseTaskName(_0x495508[_0x39674f(0x19f)]),_0x8d48ff='\x20'['repeat'](_0x5f5dc6),_0x2477d0=_0x495508[_0x39674f(0x2cd)]?'('+formatElapsed(_0x495508['window'][_0x39674f(0x284)])+')':'',_0x149330=stringWidth(_0x2477d0),_0x39f5ea=_0x5f5dc6*0x1,_0x416a12=_0x1f9462-_0x39f5ea-_0x149330-0x1,_0x7853ab=truncateTaskName(_0x5731ef,_0x416a12),_0x2d7f44=_0x8d48ff+_0x7853ab,_0x1bcab2=stringWidth(_0x2d7f44),_0x44a69e=_0x1f9462-_0x1bcab2-_0x149330,_0x42f2c2=_0x2d7f44+'\x20'[_0x39674f(0x1d7)](Math['max'](0x1,_0x44a69e))+a59_0x33ddab[_0x39674f(0x1fb)](_0x2477d0),_0x87c8bd=getTaskStateIcon(_0x495508[_0x39674f(0x2ab)]),_0x5ab322=new Array(_0x564326)[_0x39674f(0x24b)]('\x20');if(_0x495508[_0x39674f(0x2cd)]){const _0x594694=timeToPosition(_0x495508['window'][_0x39674f(0x1ae)],_0x2a5f92,_0x564326),_0x40bf89=timeToPosition(_0x495508[_0x39674f(0x2cd)]['end'],_0x2a5f92,_0x564326),_0x56110f=getBarChar(_0x495508['state']),_0x3f23d9=Math['max'](_0x594694+0x1,_0x40bf89);for(let _0x30dbb3=_0x594694;_0x30dbb3<Math[_0x39674f(0x340)](_0x3f23d9,_0x564326);_0x30dbb3++){_0x5ab322[_0x30dbb3]=_0x56110f;}}const _0x32aa1b=getBarColor(_0x495508[_0x39674f(0x2ab)]),_0x3f5676=_0x5ab322[_0x39674f(0x2fe)](_0x3d3e3a=>_0x3d3e3a==='\x20'?'\x20':_0x32aa1b(_0x3d3e3a))[_0x39674f(0x2f3)]('');return _0x87c8bd+'\x20'+_0x42f2c2+'│'+_0x3f5676+'│';}function calculateStats(_0x98c7ac){const _0xa50145=a59_0x7f9071,_0x5f0561={'total':_0x98c7ac['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x568010 of _0x98c7ac){if(_0x568010['state']==='success')_0x5f0561[_0xa50145(0x1f0)]++;else{if(_0x568010['state']===_0xa50145(0x253)||_0x568010[_0xa50145(0x2ab)]==='group_error')_0x5f0561[_0xa50145(0x253)]++;else _0x568010[_0xa50145(0x2ab)]===_0xa50145(0x2f0)?_0x5f0561['running']++:_0x5f0561[_0xa50145(0x30f)]++;}}return _0x5f0561;}function formatStats(_0x723905){const _0x16c2a1=a59_0x7f9071;return[_0x16c2a1(0x2c0)+_0x723905[_0x16c2a1(0x1c5)],'✅\x20'+_0x723905[_0x16c2a1(0x1f0)],'❌\x20'+_0x723905[_0x16c2a1(0x253)],_0x16c2a1(0x343)+_0x723905[_0x16c2a1(0x2f0)],'⏳\x20'+_0x723905[_0x16c2a1(0x30f)]][_0x16c2a1(0x2f3)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a59_0x7f9071(0x317);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x2e4);async['execute'](_0x27a6e0){const _0x1d2f6c=a59_0x7f9071,{options:_0x37cfd6,args:_0x59d18c,tdx:_0x536958}=_0x27a6e0;let _0x2e3d75,_0x556de7,_0x40569b=![];if(_0x59d18c[0x0]){if(_0x59d18c[0x0]['includes']('.')){const _0x1a1f41=this[_0x1d2f6c(0x2e9)](_0x59d18c,_0x37cfd6);if(!_0x1a1f41)return 0x1;_0x2e3d75=_0x1a1f41[_0x1d2f6c(0x33e)],_0x556de7=_0x1a1f41['workflowName'];}else{_0x556de7=_0x59d18c[0x0],_0x2e3d75=_0x37cfd6[_0x1d2f6c(0x2c6)];if(!_0x2e3d75)return console[_0x1d2f6c(0x253)](a59_0x33ddab[_0x1d2f6c(0x214)](_0x1d2f6c(0x218)),'Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1;_0x40569b=!![];}}else{const _0x430c07=this['parseProjectWorkflowPattern'](_0x59d18c,_0x37cfd6);if(!_0x430c07)return 0x1;_0x2e3d75=_0x430c07[_0x1d2f6c(0x33e)],_0x556de7=_0x430c07['workflowName'];}if(_0x37cfd6[_0x1d2f6c(0x1ed)]){if(_0x2e3d75&&_0x556de7)console[_0x1d2f6c(0x253)](_0x1d2f6c(0x26c)+_0x2e3d75+'.'+_0x556de7);else _0x2e3d75&&console['error'](_0x1d2f6c(0x240)+_0x2e3d75);}const _0x3d0c02=_0x37cfd6[_0x1d2f6c(0x2cf)],_0x109c67=_0x37cfd6[_0x1d2f6c(0x2f2)];if(_0x3d0c02){_0x109c67&&console[_0x1d2f6c(0x253)](a59_0x33ddab[_0x1d2f6c(0x351)]('Warning:'),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x3fa22d=_0x37cfd6[_0x1d2f6c(0x21e)];return _0x3fa22d?await this[_0x1d2f6c(0x2b0)](_0x27a6e0,_0x3d0c02):await this[_0x1d2f6c(0x1a9)](_0x27a6e0,_0x3d0c02,_0x37cfd6),0x0;}if(_0x109c67){const _0x448c9c=await withSpinner(_0x1d2f6c(0x2b5),()=>_0x536958[_0x1d2f6c(0x208)][_0x1d2f6c(0x22f)]({'projectName':_0x2e3d75,'workflowName':_0x556de7,'limit':0x64}),{'verbose':_0x37cfd6['verbose']}),_0x953578=_0x448c9c[_0x1d2f6c(0x1fa)][_0x1d2f6c(0x322)](_0x493168=>_0x493168['id']===_0x109c67);if(!_0x953578)return console[_0x1d2f6c(0x253)](a59_0x33ddab[_0x1d2f6c(0x214)]('Error:'),'Session\x20not\x20found:\x20'+_0x109c67),0x1;if(!_0x953578['lastAttempt']?.['id'])return console['error'](a59_0x33ddab[_0x1d2f6c(0x214)](_0x1d2f6c(0x218)),_0x1d2f6c(0x282)+_0x109c67+_0x1d2f6c(0x264)),0x1;const _0x548f12=_0x953578['lastAttempt']['id'];_0x37cfd6[_0x1d2f6c(0x1ed)]&&console[_0x1d2f6c(0x253)](_0x1d2f6c(0x1ee)+_0x548f12+_0x1d2f6c(0x1b7)+_0x109c67);const _0x12cfe2=_0x37cfd6[_0x1d2f6c(0x21e)];return _0x12cfe2?await this[_0x1d2f6c(0x2b0)](_0x27a6e0,_0x548f12):await this[_0x1d2f6c(0x1a9)](_0x27a6e0,_0x548f12,_0x37cfd6),0x0;}const _0x1f565c=await withSpinner('Loading\x20sessions...',()=>_0x536958[_0x1d2f6c(0x208)][_0x1d2f6c(0x22f)]({'projectName':_0x2e3d75,'workflowName':_0x556de7,'limit':_0x37cfd6[_0x1d2f6c(0x28c)]||0x32}),{'verbose':_0x37cfd6[_0x1d2f6c(0x1ed)]}),_0x49cba2=_0x1f565c[_0x1d2f6c(0x1fa)];if(_0x49cba2[_0x1d2f6c(0x21d)]===0x0){if(_0x2e3d75&&_0x556de7)console[_0x1d2f6c(0x253)](_0x1d2f6c(0x1be)+_0x2e3d75+'.'+_0x556de7);else _0x2e3d75?console['error'](_0x1d2f6c(0x352)+_0x2e3d75):(console[_0x1d2f6c(0x253)](_0x1d2f6c(0x34b)),console[_0x1d2f6c(0x253)](a59_0x33ddab[_0x1d2f6c(0x1fb)]('Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>')));return 0x0;}_0x49cba2['sort']((_0x40f224,_0x2be9b9)=>{const _0x1268b5=_0x1d2f6c,_0x286607=_0x40f224[_0x1268b5(0x25f)]||'',_0x14c247=_0x2be9b9['sessionTime']||'';return _0x14c247[_0x1268b5(0x205)](_0x286607);});if(_0x37cfd6[_0x1d2f6c(0x27b)]||_0x37cfd6[_0x1d2f6c(0x35d)])return await handleSDKOutput(_0x49cba2,_0x37cfd6),0x0;let _0x29bd02;if(_0x40569b){const _0x4dd159=_0x49cba2[0x0];if(!_0x4dd159[_0x1d2f6c(0x1d6)]?.['id'])return console[_0x1d2f6c(0x253)](_0x1d2f6c(0x24f)),0x0;_0x29bd02=_0x4dd159[_0x1d2f6c(0x1d6)]['id'],_0x37cfd6[_0x1d2f6c(0x1ed)]&&console[_0x1d2f6c(0x253)](_0x1d2f6c(0x1f9)+_0x4dd159[_0x1d2f6c(0x25f)]);}else{const _0x3d0f81=_0x49cba2[_0x1d2f6c(0x2fe)](_0x598b61=>{const _0x255828=_0x1d2f6c,_0x27dc66=getAttemptStatusDisplay(_0x598b61[_0x255828(0x1d6)]);return{'title':_0x598b61[_0x255828(0x2ad)]?.[_0x255828(0x19f)]+'.'+_0x598b61[_0x255828(0x208)]?.['name']+'\x20-\x20'+_0x598b61[_0x255828(0x25f)]+'\x20'+_0x27dc66['icon'],'value':_0x598b61[_0x255828(0x1d6)]?.['id']||'','description':_0x27dc66[_0x255828(0x20f)]};}),_0x1da1d9=await a59_0x30a0c4({'type':_0x1d2f6c(0x30a),'name':_0x1d2f6c(0x2cf),'message':_0x1d2f6c(0x2d6),'choices':_0x3d0f81['filter'](_0x2e6a23=>_0x2e6a23[_0x1d2f6c(0x366)]!=='')});if(!_0x1da1d9[_0x1d2f6c(0x2cf)])return 0x0;_0x29bd02=_0x1da1d9['attemptId'];}const _0x33eb05=_0x37cfd6[_0x1d2f6c(0x21e)];return _0x33eb05?await this[_0x1d2f6c(0x2b0)](_0x27a6e0,_0x29bd02):await this[_0x1d2f6c(0x1a9)](_0x27a6e0,_0x29bd02,_0x37cfd6),0x0;}async[a59_0x7f9071(0x1a9)](_0x306991,_0x1b783a,_0x104d3){const _0x4b37e1=a59_0x7f9071,{tdx:_0xa1def4}=_0x306991;let _0x1320b3,_0x4f581b;try{[_0x1320b3,_0x4f581b]=await Promise['all']([_0xa1def4[_0x4b37e1(0x208)][_0x4b37e1(0x1e4)](_0x1b783a),_0xa1def4['workflow'][_0x4b37e1(0x2d0)](_0x1b783a,![])]);}catch(_0x2d765){console[_0x4b37e1(0x253)](a59_0x33ddab['red'](_0x4b37e1(0x1d1)));_0x104d3[_0x4b37e1(0x1ed)]&&console[_0x4b37e1(0x253)](_0x2d765);throw _0x2d765;}if(_0x104d3[_0x4b37e1(0x27b)]||_0x104d3['jsonl']){const _0x431e23=this['buildTimelineData'](_0x1320b3,_0x4f581b);await handleSDKOutput([_0x431e23],_0x104d3);return;}const _0x38e6c0=_0xa1def4['context'][_0x4b37e1(0x26a)],_0x51bb66=this['renderTimeline'](_0x1320b3,_0x4f581b,_0x38e6c0);console[_0x4b37e1(0x2fb)](_0x51bb66);}async['pollTimeline'](_0x9b7dcc,_0x363113){const _0xbce2f9=a59_0x7f9071,{tdx:_0x14d43a}=_0x9b7dcc,_0x116435=TIMELINE_CONFIG['POLL_INTERVAL_MS'],_0xb6abda=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x474ced=0x0;while(_0x474ced<_0xb6abda){process['stdout'][_0xbce2f9(0x23c)]&&process[_0xbce2f9(0x356)]['write']('\x1Bc');let _0x6f0842,_0x1f44a2;try{[_0x6f0842,_0x1f44a2]=await Promise[_0xbce2f9(0x33f)]([_0x14d43a[_0xbce2f9(0x208)][_0xbce2f9(0x1e4)](_0x363113),_0x14d43a[_0xbce2f9(0x208)]['tasks'](_0x363113,![])]);}catch(_0x6a3423){console[_0xbce2f9(0x253)](a59_0x33ddab[_0xbce2f9(0x214)](_0xbce2f9(0x25b)));_0x474ced>0x0&&console[_0xbce2f9(0x253)](a59_0x33ddab['dim'](_0xbce2f9(0x35e)+_0x474ced));throw _0x6a3423;}const _0x42fb6a=_0x14d43a['context']['site'],_0x534a10=this[_0xbce2f9(0x217)](_0x6f0842,_0x1f44a2,_0x42fb6a);console[_0xbce2f9(0x2fb)](_0x534a10);const _0x45ddf6=_0x6f0842['done']&&_0x1f44a2['every'](_0x1a7d12=>_0x1a7d12[_0xbce2f9(0x2ab)]!==_0xbce2f9(0x2f0)&&_0x1a7d12[_0xbce2f9(0x2ab)]!==_0xbce2f9(0x1f7));if(_0x45ddf6){console[_0xbce2f9(0x253)](a59_0x33ddab['green'](_0xbce2f9(0x29e)));break;}console[_0xbce2f9(0x253)](a59_0x33ddab[_0xbce2f9(0x1fb)]('\x0aPolling...\x20('+_0x474ced*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x13e205=>setTimeout(_0x13e205,_0x116435)),_0x474ced++;}_0x474ced>=_0xb6abda&&console[_0xbce2f9(0x253)](a59_0x33ddab['yellow'](_0xbce2f9(0x271)));}[a59_0x7f9071(0x217)](_0x57293c,_0x52eca4,_0x2db3df){const _0x21459b=a59_0x7f9071,_0x2b2ca4=[],_0x5e452f=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x3696c4=0x5,_0xfa164f=process[_0x21459b(0x356)][_0x21459b(0x2a9)]||0x78,_0x486874=_0xfa164f-_0x5e452f-_0x3696c4,_0x16a962=Math[_0x21459b(0x1c6)](TIMELINE_CONFIG[_0x21459b(0x1ce)],Math[_0x21459b(0x340)](_0x486874,TIMELINE_CONFIG[_0x21459b(0x1fc)])),_0x474a67=new Date(_0x57293c[_0x21459b(0x27e)])['getTime'](),_0x5957c0=_0x57293c['finishedAt']?new Date(_0x57293c[_0x21459b(0x34d)])[_0x21459b(0x1d3)]():Date[_0x21459b(0x2e7)](),_0x3e3095={'start':_0x474a67,'end':_0x5957c0,'duration':_0x5957c0-_0x474a67},_0x4a2543=new Map(),_0xed9343=[];for(const _0x1ab537 of _0x52eca4){if(_0x1ab537[_0x21459b(0x2b3)]){const _0x67cb2f=new Date(_0x1ab537['startedAt'])['getTime'](),_0x2a8b92=_0x1ab537['updatedAt']?new Date(_0x1ab537[_0x21459b(0x31c)])[_0x21459b(0x1d3)]():Date[_0x21459b(0x2e7)](),_0x2475c5={'start':_0x67cb2f,'end':_0x2a8b92,'duration':_0x2a8b92-_0x67cb2f};_0x4a2543[_0x21459b(0x1f2)](_0x1ab537['id'],_0x2475c5),_0xed9343[_0x21459b(0x23d)]({'name':_0x1ab537[_0x21459b(0x2d7)],'state':_0x1ab537[_0x21459b(0x2ab)]||'unknown','window':_0x2475c5});}else _0xed9343['push']({'name':_0x1ab537[_0x21459b(0x2d7)],'state':_0x1ab537[_0x21459b(0x2ab)]||_0x21459b(0x1f7),'window':undefined});}_0xed9343['sort']((_0x4989c1,_0x17329f)=>{const _0x55a64b=_0x21459b;if(!_0x4989c1['window'])return 0x1;if(!_0x17329f[_0x55a64b(0x2cd)])return-0x1;return _0x4989c1[_0x55a64b(0x2cd)]['start']-_0x17329f[_0x55a64b(0x2cd)]['start'];});const _0x31a21f=_0xed9343['length'],_0xd2d6a1=_0x31a21f>TIMELINE_CONFIG[_0x21459b(0x314)];_0xd2d6a1&&_0xed9343[_0x21459b(0x241)](TIMELINE_CONFIG[_0x21459b(0x314)]);const _0x3ad254=calculateTimeScale(_0x3e3095,_0x16a962),_0x1bf7d3=_0x57293c[_0x21459b(0x27f)]?_0x57293c[_0x21459b(0x1f0)]?a59_0x33ddab['green'](_0x21459b(0x1f0)):a59_0x33ddab[_0x21459b(0x214)](_0x21459b(0x253)):a59_0x33ddab['blue'](_0x21459b(0x2f0)),_0x542573=_0x57293c[_0x21459b(0x2ad)]?.['id'],_0x49f74f=_0x57293c[_0x21459b(0x2f2)];let _0x24622a;if(_0x542573&&_0x49f74f){const _0x55403d=getWorkflowAttemptUrl(_0x2db3df,_0x542573,_0x49f74f,_0x57293c['id']);_0x24622a=hyperlink(a59_0x33ddab[_0x21459b(0x1fb)](_0x57293c['id']),_0x55403d);}else _0x24622a=a59_0x33ddab[_0x21459b(0x1fb)](_0x57293c['id']);_0x2b2ca4[_0x21459b(0x23d)](_0x21459b(0x2e8)+_0x24622a+_0x21459b(0x29a)+_0x1bf7d3+_0x21459b(0x29a)+formatElapsed(_0x3e3095[_0x21459b(0x284)]));if(_0xed9343['length']>0x0){const _0xa8d306=renderTimeAxis(_0x3ad254,_0x16a962),_0x5b388a=new Date(_0x3e3095[_0x21459b(0x1ae)]),_0x16e7c=formatDate(_0x5b388a),_0x124822=TIMELINE_CONFIG[_0x21459b(0x1b5)]+TIMELINE_CONFIG[_0x21459b(0x1b0)]+_0x5e452f,_0x84e770=_0x16e7c[_0x21459b(0x305)](_0x124822),_0x5cee4b=a59_0x33ddab['dim'](_0x84e770);_0x2b2ca4[_0x21459b(0x23d)](_0x5cee4b+'\x20'+_0xa8d306);for(const _0x463b34 of _0xed9343){_0x2b2ca4[_0x21459b(0x23d)](renderTaskRow(_0x463b34,_0x3ad254,_0x16a962,_0x5e452f));}const _0x564ac4=calculateStats(_0xed9343);_0x2b2ca4[_0x21459b(0x23d)](formatStats(_0x564ac4)),_0xd2d6a1&&_0x2b2ca4[_0x21459b(0x23d)](a59_0x33ddab[_0x21459b(0x351)](_0x21459b(0x268)+TIMELINE_CONFIG[_0x21459b(0x314)]+_0x21459b(0x234)+_0x31a21f+_0x21459b(0x2bb))),_0x2b2ca4['push'](''),_0x2b2ca4['push'](a59_0x33ddab['dim'](_0x21459b(0x219))+('tdx\x20wf\x20attempt\x20'+_0x57293c['id']+_0x21459b(0x26f))+a59_0x33ddab[_0x21459b(0x1fb)](_0x21459b(0x350)));}else _0x2b2ca4[_0x21459b(0x23d)](_0x21459b(0x2b4));return _0x2b2ca4['join']('\x0a');}['buildTimelineData'](_0x3ae920,_0x3b2948){const _0x416dc5=a59_0x7f9071,_0xecebd=new Date(_0x3ae920[_0x416dc5(0x27e)])['getTime'](),_0x40b0f0=_0x3ae920[_0x416dc5(0x34d)]?new Date(_0x3ae920[_0x416dc5(0x34d)])['getTime']():Date[_0x416dc5(0x2e7)](),_0x591fc4=_0x40b0f0-_0xecebd,_0x1db682=[];for(const _0x40e214 of _0x3b2948){if(_0x40e214[_0x416dc5(0x2b3)]){const _0x47cf46=new Date(_0x40e214[_0x416dc5(0x2b3)])[_0x416dc5(0x1d3)](),_0xea090f=_0x40e214[_0x416dc5(0x31c)]?new Date(_0x40e214[_0x416dc5(0x31c)])[_0x416dc5(0x1d3)]():Date[_0x416dc5(0x2e7)]();_0x1db682[_0x416dc5(0x23d)]({'name':_0x40e214['fullName'],'state':_0x40e214['state']||_0x416dc5(0x1dd),'window':{'start':_0x47cf46,'end':_0xea090f,'duration':_0xea090f-_0x47cf46}});}else _0x1db682[_0x416dc5(0x23d)]({'name':_0x40e214[_0x416dc5(0x2d7)],'state':_0x40e214[_0x416dc5(0x2ab)]||_0x416dc5(0x1f7),'window':undefined});}const _0x3c3daf=calculateStats(_0x1db682);return{'attempt':{'id':_0x3ae920['id'],'status':_0x3ae920[_0x416dc5(0x27f)]?_0x3ae920[_0x416dc5(0x1f0)]?_0x416dc5(0x1f0):_0x416dc5(0x253):_0x416dc5(0x2f0),'createdAt':_0x3ae920[_0x416dc5(0x27e)],'finishedAt':_0x3ae920[_0x416dc5(0x34d)],'duration_ms':_0x591fc4},'tasks':_0x1db682[_0x416dc5(0x2fe)](_0x339237=>({'name':_0x339237[_0x416dc5(0x19f)],'state':_0x339237[_0x416dc5(0x2ab)],'startedAt':_0x339237['window']?new Date(_0x339237[_0x416dc5(0x2cd)][_0x416dc5(0x1ae)])[_0x416dc5(0x211)]():null,'updatedAt':_0x339237[_0x416dc5(0x2cd)]?new Date(_0x339237['window'][_0x416dc5(0x2bd)])[_0x416dc5(0x211)]():null,'duration_ms':_0x339237[_0x416dc5(0x2cd)]?.[_0x416dc5(0x284)]||null})),'stats':_0x3c3daf};}}function formatScheduleLine(_0x505a64){const _0x562d71=a59_0x7f9071,_0x23003f=_0x505a64[_0x562d71(0x33d)]?a59_0x33ddab['yellow'](_0x562d71(0x1bc)):'',_0x2ee650=_0x505a64[_0x562d71(0x2ad)]?.[_0x562d71(0x19f)]?a59_0x33ddab[_0x562d71(0x1fb)]('\x20['+_0x505a64['project']['name']+']'):'',_0xb56b64=_0x505a64[_0x562d71(0x254)]?a59_0x33ddab[_0x562d71(0x1fb)](_0x562d71(0x255)+new Date(_0x505a64[_0x562d71(0x254)])[_0x562d71(0x33a)]()):'';return'📅\x20#'+_0x505a64['id']+'\x20'+(_0x505a64[_0x562d71(0x208)]?.[_0x562d71(0x19f)]||_0x562d71(0x212))+_0x2ee650+_0x23003f+_0xb56b64;}export class WorkflowSchedulesCommand extends WorkflowBaseCommand{[a59_0x7f9071(0x19f)]=a59_0x7f9071(0x335);['description']=a59_0x7f9071(0x307);async['execute'](_0x3fa896){const _0x28f852=a59_0x7f9071,{options:_0x4ac181,args:_0x135879,tdx:_0x59fa52}=_0x3fa896,{scheduleId:_0x4ad6bf}=_0x4ac181;if(_0x4ad6bf&&_0x135879[0x0])return console[_0x28f852(0x253)](a59_0x33ddab[_0x28f852(0x214)](_0x28f852(0x218)),_0x28f852(0x21a)),console[_0x28f852(0x253)](a59_0x33ddab[_0x28f852(0x1fb)](_0x28f852(0x361))),0x1;if(_0x4ad6bf){const _0x1d5364=await withSpinner(_0x28f852(0x1f3)+_0x4ad6bf+_0x28f852(0x216),()=>_0x59fa52[_0x28f852(0x208)][_0x28f852(0x1c4)](_0x4ad6bf),{'verbose':_0x4ac181['verbose']}),_0xc9d8a5=_0x1d5364[_0x28f852(0x1fa)];return isStructuredFormat(_0x4ac181)?await handleSingleObjectOutput(_0xc9d8a5,_0x4ac181):(console[_0x28f852(0x253)](_0x28f852(0x2b1)),console[_0x28f852(0x2fb)](formatScheduleLine(_0xc9d8a5))),0x0;}const _0x11b7ad=this[_0x28f852(0x2e9)](_0x135879,_0x4ac181);if(!_0x11b7ad)return 0x1;const {projectName:_0x367132,workflowName:_0x4ec636}=_0x11b7ad,_0x14a67d=_0x367132?'\x27'+_0x367132+(_0x4ec636?'.'+_0x4ec636:'')+'\x27':undefined,_0x1220d8=await withSpinner(_0x14a67d?_0x28f852(0x31e)+_0x14a67d+_0x28f852(0x216):'Listing\x20schedules...',()=>_0x367132?_0x59fa52[_0x28f852(0x208)][_0x28f852(0x332)](_0x367132,{'workflow':_0x4ec636,'limit':_0x4ac181[_0x28f852(0x28c)]}):_0x59fa52[_0x28f852(0x208)]['listSchedules']({'limit':_0x4ac181['limit']}),{'verbose':_0x4ac181['verbose']}),_0x17e4a4=_0x1220d8[_0x28f852(0x1fa)],_0x56b6a6=_0x4ac181[_0x28f852(0x28c)]&&_0x17e4a4[_0x28f852(0x21d)]>=_0x4ac181['limit']?a59_0x33ddab[_0x28f852(0x1fb)](_0x28f852(0x273)):'';console['error'](_0x28f852(0x1a0)+_0x17e4a4[_0x28f852(0x21d)]+_0x28f852(0x1ff)+(_0x17e4a4[_0x28f852(0x21d)]!==0x1?'s':'')+_0x56b6a6);if(isStructuredFormat(_0x4ac181))await handleSDKOutput(_0x17e4a4,_0x4ac181);else{if(_0x17e4a4[_0x28f852(0x21d)]===0x0)console[_0x28f852(0x2fb)]('No\x20schedules\x20found');else for(const _0x5189e5 of _0x17e4a4){console[_0x28f852(0x2fb)](formatScheduleLine(_0x5189e5));}}return 0x0;}}export class WorkflowScheduleEnableCommand extends BaseCommand{['name']=a59_0x7f9071(0x25d);[a59_0x7f9071(0x355)]=a59_0x7f9071(0x2c1);async[a59_0x7f9071(0x34a)](_0x15fcc1){const _0x4aaeb8=a59_0x7f9071,{options:_0x323f13,args:_0x5c1d24,tdx:_0x126126}=_0x15fcc1,_0x252847=_0x5c1d24[0x0];if(!_0x252847)return console[_0x4aaeb8(0x253)](a59_0x33ddab[_0x4aaeb8(0x214)](_0x4aaeb8(0x218)),_0x4aaeb8(0x20a)),console[_0x4aaeb8(0x253)](a59_0x33ddab['dim'](_0x4aaeb8(0x248))),console[_0x4aaeb8(0x253)](a59_0x33ddab['dim'](_0x4aaeb8(0x247))),0x1;const {backfill:_0x32d290,nextTime:_0x3c3cf2}=_0x323f13,_0x1e0ec9={};if(_0x32d290!==undefined)_0x1e0ec9[_0x4aaeb8(0x1a1)]=!_0x32d290;if(_0x3c3cf2!==undefined)_0x1e0ec9['nextTime']=_0x3c3cf2;const _0x44d3de=await withSpinner(_0x4aaeb8(0x278)+_0x252847+_0x4aaeb8(0x216),()=>_0x126126['workflow']['enableSchedule'](_0x252847,_0x1e0ec9),{'verbose':_0x323f13[_0x4aaeb8(0x1ed)]}),_0x8989f5=_0x44d3de[_0x4aaeb8(0x1fa)];return isStructuredFormat(_0x323f13)?await handleSingleObjectOutput(_0x8989f5,_0x323f13):(console[_0x4aaeb8(0x2fb)](_0x4aaeb8(0x2eb)+_0x252847+'\x20enabled\x20('+(_0x8989f5[_0x4aaeb8(0x208)]?.[_0x4aaeb8(0x19f)]||_0x4aaeb8(0x1dd))+')'),_0x8989f5[_0x4aaeb8(0x254)]&&console[_0x4aaeb8(0x2fb)](a59_0x33ddab['dim'](_0x4aaeb8(0x1ba)+new Date(_0x8989f5['nextRunTime'])[_0x4aaeb8(0x33a)]()))),0x0;}}export class WorkflowScheduleDisableCommand extends BaseCommand{[a59_0x7f9071(0x19f)]='workflow:schedule:disable';[a59_0x7f9071(0x355)]=a59_0x7f9071(0x223);async['execute'](_0x4e3bec){const _0x1d0a36=a59_0x7f9071,{options:_0x380127,args:_0x45566a,tdx:_0x185890}=_0x4e3bec,_0x4bbb2d=_0x45566a[0x0];if(!_0x4bbb2d)return console[_0x1d0a36(0x253)](a59_0x33ddab[_0x1d0a36(0x214)](_0x1d0a36(0x218)),_0x1d0a36(0x20a)),console[_0x1d0a36(0x253)](a59_0x33ddab[_0x1d0a36(0x1fb)](_0x1d0a36(0x243))),console['error'](a59_0x33ddab['dim'](_0x1d0a36(0x247))),0x1;const _0xf78a86=await withSpinner(_0x1d0a36(0x369)+_0x4bbb2d+_0x1d0a36(0x216),()=>_0x185890['workflow'][_0x1d0a36(0x23b)](_0x4bbb2d),{'verbose':_0x380127[_0x1d0a36(0x1ed)]}),_0x350a81=_0xf78a86[_0x1d0a36(0x1fa)];return isStructuredFormat(_0x380127)?await handleSingleObjectOutput(_0x350a81,_0x380127):console[_0x1d0a36(0x2fb)](_0x1d0a36(0x2eb)+_0x4bbb2d+_0x1d0a36(0x349)+(_0x350a81[_0x1d0a36(0x208)]?.[_0x1d0a36(0x19f)]||'unknown')+')'),0x0;}}
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;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- function a60_0x2c9b(){const _0x5c7769=['80510KTcpZf','version',';\x20node/','tdx/','6MRJRkp','tdx','33rcWgsL','TD1\x20','4694200jfQUxX','replace','171dNhogn','15123163waOxDW','534ASzDgZ','188492uyNcxm','Bearer\x20','entries','119544ZOwQKZ','7547450cShngb','Authorization','18385fKcHoo'];a60_0x2c9b=function(){return _0x5c7769;};return a60_0x2c9b();}(function(_0x1efe47,_0x1453b9){const _0x1cdbbe=a60_0x2c0a,_0x374929=_0x1efe47();while(!![]){try{const _0x15f232=-parseInt(_0x1cdbbe(0x1f3))/0x1*(-parseInt(_0x1cdbbe(0x1f7))/0x2)+-parseInt(_0x1cdbbe(0x1e5))/0x3*(parseInt(_0x1cdbbe(0x1ec))/0x4)+-parseInt(_0x1cdbbe(0x1f2))/0x5*(parseInt(_0x1cdbbe(0x1eb))/0x6)+parseInt(_0x1cdbbe(0x1e7))/0x7+parseInt(_0x1cdbbe(0x1ef))/0x8*(-parseInt(_0x1cdbbe(0x1e9))/0x9)+-parseInt(_0x1cdbbe(0x1f0))/0xa+parseInt(_0x1cdbbe(0x1ea))/0xb;if(_0x15f232===_0x1453b9)break;else _0x374929['push'](_0x374929['shift']());}catch(_0x5cc8f2){_0x374929['push'](_0x374929['shift']());}}}(a60_0x2c9b,0x62507));import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';function a60_0x2c0a(_0x39bd8f,_0x232260){_0x39bd8f=_0x39bd8f-0x1e5;const _0x2c9b06=a60_0x2c9b();let _0x2c0aa5=_0x2c9b06[_0x39bd8f];return _0x2c0aa5;}export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x5ede35=a60_0x2c0a,_0x15d360=getVersion(),_0x7c5b72=platform(),_0x16a5b4=process[_0x5ede35(0x1f4)][_0x5ede35(0x1e8)]('v','');return _0x5ede35(0x1f6)+_0x15d360+'\x20('+_0x7c5b72+_0x5ede35(0x1f5)+_0x16a5b4+')';}export function getAuthHeaders(_0x3bcacc,_0x5163fe,_0x4e6f90){const _0xec7d25=a60_0x2c0a,_0x4cf4f0=getVersion(),_0x9a05a6={'User-Agent':getUserAgent(),'X-TD-Client':_0xec7d25(0x1f8),'X-TD-Client-Version':_0x4cf4f0};if(_0x4e6f90)_0x9a05a6[_0xec7d25(0x1f1)]=_0xec7d25(0x1ed)+_0x4e6f90;else _0x5163fe&&(_0x9a05a6['Authorization']=_0xec7d25(0x1e6)+_0x5163fe);return _0x9a05a6;}export function toHeaderRecord(_0x14482c){const _0x26156c=a60_0x2c0a,_0x3534ea={};for(const [_0x33250e,_0x53be13]of Object[_0x26156c(0x1ee)](_0x14482c)){_0x53be13!==undefined&&(_0x3534ea[_0x33250e]=_0x53be13);}return _0x3534ea;}export function getTrinoHeaders(_0x11ea48,_0x43965b,_0x512e8c){const _0x1861e3=a60_0x2c0a,_0x3c5355=getAuthHeaders(_0x11ea48),_0x254fbe=toHeaderRecord(_0x3c5355);if(_0x512e8c)_0x254fbe[_0x1861e3(0x1f1)]='Bearer\x20'+_0x512e8c;else _0x43965b&&(_0x254fbe['X-Trino-User']=_0x43965b);return _0x254fbe;}export function hasAPIKey(_0x1ba92e){const _0x54089d=getAPIKey();return _0x54089d!==undefined&&_0x54089d['length']>0x0;}
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;}