@treasuredata/tdx 0.26.1 → 0.26.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/engage-command.js +1 -1
  19. package/dist/commands/job-command.js +1 -1
  20. package/dist/commands/journey-command.js +1 -1
  21. package/dist/commands/journey-validate-command.js +1 -1
  22. package/dist/commands/llm-command.js +1 -1
  23. package/dist/commands/mcp-command.js +1 -1
  24. package/dist/commands/parent-segment-command.js +1 -1
  25. package/dist/commands/profile-command.js +1 -1
  26. package/dist/commands/profiles-command.js +1 -1
  27. package/dist/commands/query-command.js +1 -1
  28. package/dist/commands/schedule-command.js +1 -1
  29. package/dist/commands/segment-command.js +1 -1
  30. package/dist/commands/segment-create-command.js +1 -1
  31. package/dist/commands/segment-fields-command.js +1 -1
  32. package/dist/commands/segment-pull-command.js +1 -1
  33. package/dist/commands/segment-push-command.js +1 -1
  34. package/dist/commands/segment-update-command.js +1 -1
  35. package/dist/commands/segment-use-command.js +1 -1
  36. package/dist/commands/segment-validate-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status-command.js +1 -1
  40. package/dist/commands/tables.js +1 -1
  41. package/dist/commands/unset-command.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/user-command.js +1 -1
  44. package/dist/commands/workflow-command.js +1 -1
  45. package/dist/core/auth.js +1 -1
  46. package/dist/core/command-output.js +1 -1
  47. package/dist/core/config.js +1 -1
  48. package/dist/core/connection-cache.js +1 -1
  49. package/dist/core/constants.js +1 -1
  50. package/dist/core/credential-cache.js +1 -1
  51. package/dist/core/global-context.js +1 -1
  52. package/dist/core/keychain.js +1 -1
  53. package/dist/core/profile.js +1 -1
  54. package/dist/core/project-config.js +1 -1
  55. package/dist/core/session.js +1 -1
  56. package/dist/core/user-cache.js +1 -1
  57. package/dist/core/version.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/mcp/server.js +1 -1
  60. package/dist/mcp/tools/index.js +1 -1
  61. package/dist/mcp/tools/tdx-run.js +1 -1
  62. package/dist/mcp/tools/tdx-search.js +1 -1
  63. package/dist/mcp/utils.js +1 -1
  64. package/dist/proxy/claude-usage-tracker.js +1 -1
  65. package/dist/proxy/passthrough-server.js +1 -1
  66. package/dist/proxy/sse-usage-parser.js +1 -1
  67. package/dist/sdk/agent/agent-config.js +1 -1
  68. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  69. package/dist/sdk/agent/agent-yaml.js +1 -1
  70. package/dist/sdk/agent/test/evaluator.js +1 -1
  71. package/dist/sdk/agent/test/executor.js +1 -1
  72. package/dist/sdk/agent/test/index.js +1 -1
  73. package/dist/sdk/agent/test/output.js +1 -1
  74. package/dist/sdk/agent/test/parser.js +1 -1
  75. package/dist/sdk/api.js +1 -1
  76. package/dist/sdk/client/cdp-api-client.js +1 -1
  77. package/dist/sdk/client/endpoints.js +1 -1
  78. package/dist/sdk/client/engage-api-client.js +1 -1
  79. package/dist/sdk/client/http-client.js +1 -1
  80. package/dist/sdk/client/llm-api-client.js +1 -1
  81. package/dist/sdk/client/rate-limiter.js +1 -1
  82. package/dist/sdk/client/td-api-client.js +1 -1
  83. package/dist/sdk/client/trino-api-client.js +1 -1
  84. package/dist/sdk/client/workflow-client.js +1 -1
  85. package/dist/sdk/connection-validator.js +1 -1
  86. package/dist/sdk/connection.js +1 -1
  87. package/dist/sdk/engage.js +1 -1
  88. package/dist/sdk/errors.js +1 -1
  89. package/dist/sdk/index.js +1 -1
  90. package/dist/sdk/io/index.js +1 -1
  91. package/dist/sdk/io/node-filesystem.js +1 -1
  92. package/dist/sdk/job.js +1 -1
  93. package/dist/sdk/journey.js +1 -1
  94. package/dist/sdk/llm/chat-cache.js +1 -1
  95. package/dist/sdk/llm/index.js +1 -1
  96. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  97. package/dist/sdk/llm/model-factors.js +1 -1
  98. package/dist/sdk/personalization.js +1 -1
  99. package/dist/sdk/query/index.js +1 -1
  100. package/dist/sdk/query/sql-parser.js +1 -1
  101. package/dist/sdk/realtime.js +1 -1
  102. package/dist/sdk/schedule.js +1 -1
  103. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  104. package/dist/sdk/segment/fields-display.js +1 -1
  105. package/dist/sdk/segment/file-discovery.js +1 -1
  106. package/dist/sdk/segment/journey-utils.js +1 -1
  107. package/dist/sdk/segment/journey-validator.js +1 -1
  108. package/dist/sdk/segment/journey-yaml.js +1 -1
  109. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  110. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  111. package/dist/sdk/segment/pull-workflow.js +1 -1
  112. package/dist/sdk/segment/push-recovery.js +1 -1
  113. package/dist/sdk/segment/push-workflow.js +1 -1
  114. package/dist/sdk/segment/resolution-context.js +1 -1
  115. package/dist/sdk/segment/segment-path-parser.js +1 -1
  116. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  117. package/dist/sdk/segment/target-resolution.js +1 -1
  118. package/dist/sdk/segment/tdx-config.js +1 -1
  119. package/dist/sdk/segment/validate-files.js +1 -1
  120. package/dist/sdk/segment/yaml-validator.js +1 -1
  121. package/dist/sdk/segment.js +1 -1
  122. package/dist/sdk/types/index.js +1 -1
  123. package/dist/sdk/types/progress.js +1 -1
  124. package/dist/sdk/user.js +1 -1
  125. package/dist/sdk/util/format-detector.js +1 -1
  126. package/dist/sdk/util/formatters.js +1 -1
  127. package/dist/sdk/util/index.js +1 -1
  128. package/dist/sdk/util/tree-formatter.js +1 -1
  129. package/dist/sdk/workflow/archive-validation.js +1 -1
  130. package/dist/sdk/workflow/clone-workflow.js +1 -1
  131. package/dist/sdk/workflow/index.js +1 -1
  132. package/dist/sdk/workflow/pull-workflow.js +1 -1
  133. package/dist/sdk/workflow/push-workflow.js +1 -1
  134. package/dist/sdk/workflow/tdx-config.js +1 -1
  135. package/dist/sdk/workflow/workflow-utils.js +1 -1
  136. package/dist/test-utils/command-runner.js +1 -1
  137. package/dist/test-utils/factories.js +1 -1
  138. package/dist/test-utils/fixtures.js +1 -1
  139. package/dist/test-utils/http-mock.js +1 -1
  140. package/dist/test-utils/index.js +1 -1
  141. package/dist/utils/async.js +1 -1
  142. package/dist/utils/colors.js +1 -1
  143. package/dist/utils/diff.js +1 -1
  144. package/dist/utils/file-permissions.js +1 -1
  145. package/dist/utils/global-cache.js +1 -1
  146. package/dist/utils/json-loader.js +1 -1
  147. package/dist/utils/local-cache.js +1 -1
  148. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  149. package/dist/utils/logger/formatters/index.js +1 -1
  150. package/dist/utils/logger/handlers/console-handler.js +1 -1
  151. package/dist/utils/logger/handlers/file-handler.js +1 -1
  152. package/dist/utils/logger/handlers/index.js +1 -1
  153. package/dist/utils/logger/handlers/null-handler.js +1 -1
  154. package/dist/utils/logger/index.js +1 -1
  155. package/dist/utils/logger/logger.js +1 -1
  156. package/dist/utils/logger/types.js +1 -1
  157. package/dist/utils/option-validation.js +1 -1
  158. package/dist/utils/port.js +1 -1
  159. package/dist/utils/process.js +1 -1
  160. package/dist/utils/prompt.js +1 -1
  161. package/dist/utils/spinner.js +1 -1
  162. package/dist/utils/sse-parser.js +1 -1
  163. package/dist/utils/string-utils.js +1 -1
  164. package/dist/utils/table-ref-parser.js +1 -1
  165. package/dist/utils/tdx-logger.js +1 -1
  166. package/dist/utils/version-check.js +1 -1
  167. package/package.json +1 -1
@@ -1 +1 @@
1
- const a42_0x428ab2=a42_0xf21f;(function(_0x4b6732,_0x51b5c2){const _0x5ad71a=a42_0xf21f,_0x3b3d6e=_0x4b6732();while(!![]){try{const _0x264a77=parseInt(_0x5ad71a(0x1e4))/0x1*(-parseInt(_0x5ad71a(0x216))/0x2)+-parseInt(_0x5ad71a(0x21f))/0x3+-parseInt(_0x5ad71a(0x208))/0x4*(-parseInt(_0x5ad71a(0x316))/0x5)+-parseInt(_0x5ad71a(0x21a))/0x6+-parseInt(_0x5ad71a(0x379))/0x7+-parseInt(_0x5ad71a(0x2fc))/0x8*(parseInt(_0x5ad71a(0x24f))/0x9)+parseInt(_0x5ad71a(0x36f))/0xa;if(_0x264a77===_0x51b5c2)break;else _0x3b3d6e['push'](_0x3b3d6e['shift']());}catch(_0x5511aa){_0x3b3d6e['push'](_0x3b3d6e['shift']());}}}(a42_0x3aa6,0xe71c1));import a42_0xc4b429 from'chalk';import{existsSync}from'fs';import a42_0x45a691 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,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 a42_0x2ce4d7 from'prompts';function getAttemptStatusDisplay(_0x42ffb5){const _0x5223e3=a42_0xf21f;if(!_0x42ffb5)return{'icon':'⏳','text':''};const {done:_0x2c6838,success:_0x2a2024,cancelRequested:_0x32390d}=_0x42ffb5;if(!_0x2c6838)return _0x32390d?{'icon':'🛑','text':a42_0xc4b429[_0x5223e3(0x29c)](_0x5223e3(0x27c))}:{'icon':'🔄','text':a42_0xc4b429[_0x5223e3(0x2b5)](_0x5223e3(0x227))};if(_0x2a2024)return{'icon':'✅','text':a42_0xc4b429['green']('success')};return{'icon':'❌','text':a42_0xc4b429[_0x5223e3(0x2ab)](_0x5223e3(0x28e))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x487b36,_0x2c488f,_0x54383a=0x0){const _0x363c57=a42_0xf21f;return _0x487b36[_0x54383a]||_0x2c488f[_0x363c57(0x361)];}[a42_0x428ab2(0x289)](_0xff3ddf,_0x3d01c3,_0x167c0e=0x0){const _0x5d2680=a42_0x428ab2,_0x4f1230=this['resolveProject'](_0xff3ddf,_0x3d01c3,_0x167c0e);if(!_0x4f1230)return console[_0x5d2680(0x28e)](a42_0xc4b429[_0x5d2680(0x2ab)](_0x5d2680(0x349)),_0x5d2680(0x309)),console[_0x5d2680(0x28e)](a42_0xc4b429[_0x5d2680(0x33f)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),null;return _0x4f1230;}['parseProjectWorkflowPattern'](_0x49fbfc,_0x5bc724){const _0x48fbd6=a42_0x428ab2;if(_0x49fbfc[0x0]){const _0x33385e=_0x49fbfc[0x0][_0x48fbd6(0x20f)]('.');if(_0x33385e[_0x48fbd6(0x2f0)]===0x1)return{'projectName':_0x33385e[0x0],'workflowName':undefined};else return _0x33385e[_0x48fbd6(0x2f0)]===0x2?{'projectName':_0x33385e[0x0],'workflowName':_0x33385e[0x1]}:(console[_0x48fbd6(0x28e)](a42_0xc4b429[_0x48fbd6(0x2ab)](_0x48fbd6(0x349)),_0x48fbd6(0x228)),null);}return{'projectName':_0x5bc724['workflowProject'],'workflowName':undefined};}[a42_0x428ab2(0x345)](_0x4fda0e,_0x31ce34,_0x5249a3=0x0){const _0x1a4ebb=a42_0x428ab2;if(_0x4fda0e[_0x5249a3])return _0x4fda0e[_0x5249a3];if(_0x31ce34[_0x1a4ebb(0x361)]){const _0x1896d7=a42_0x45a691[_0x1a4ebb(0x275)](process[_0x1a4ebb(0x2db)](),'workflows',_0x31ce34[_0x1a4ebb(0x361)]);if(existsSync(a42_0x45a691['join'](_0x1896d7,_0x1a4ebb(0x25e))))return _0x1896d7;}return undefined;}async[a42_0x428ab2(0x1e7)](_0xf72830,_0x16717e,_0x5a353f){const _0x79ce7=a42_0x428ab2;try{const _0x4a181b=await _0xf72830[_0x79ce7(0x2c9)]['workflows'](_0x16717e,{'limit':0x1});if(_0x4a181b[_0x79ce7(0x2f0)]>0x0){const _0x49ebb1=_0x4a181b[0x0]['id'],_0x5e7ab7=getWorkflowUrl(_0x5a353f,_0x49ebb1);console[_0x79ce7(0x28e)]('\x20\x20Console:\x20'+a42_0xc4b429[_0x79ce7(0x31b)](_0x5e7ab7));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']='workflow:use';[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x21d);async[a42_0x428ab2(0x2a1)](_0x4bb48f){const _0x5a8395=a42_0x428ab2,{options:_0x3192d0,args:_0x52f919,tdx:_0x409f21}=_0x4bb48f,_0x39caff=_0x52f919[0x0],_0x38bcc7=_0x3192d0[_0x5a8395(0x2d4)];if(_0x38bcc7)return saveSessionContext({'workflow_project':undefined},_0x3192d0['session']),console['log'](a42_0xc4b429['green']('✔\x20Workflow\x20project\x20context\x20cleared.')),0x0;if(!_0x39caff)return console[_0x5a8395(0x28e)](a42_0xc4b429[_0x5a8395(0x2ab)](_0x5a8395(0x349)),_0x5a8395(0x309)),console['error'](a42_0xc4b429[_0x5a8395(0x33f)](_0x5a8395(0x29d))),console['error'](a42_0xc4b429[_0x5a8395(0x33f)](_0x5a8395(0x331))),0x1;const _0x34d71a=await withSpinner('Resolving\x20project\x20\x27'+_0x39caff+_0x5a8395(0x2c5),()=>_0x409f21[_0x5a8395(0x2c9)][_0x5a8395(0x23a)](_0x39caff),{'verbose':_0x3192d0[_0x5a8395(0x320)]}),{name:_0x3e64bd}=_0x34d71a[_0x5a8395(0x35c)];return saveSessionContext({'workflow_project':_0x3e64bd},_0x3192d0['session']),console[_0x5a8395(0x2c0)](a42_0xc4b429[_0x5a8395(0x1e6)](_0x5a8395(0x363)+a42_0xc4b429[_0x5a8395(0x31b)](_0x3e64bd))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x2f9);[a42_0x428ab2(0x38d)]='List\x20all\x20workflow\x20projects';async[a42_0x428ab2(0x2a1)](_0x59a761){const _0x57de9a=a42_0x428ab2,{options:_0x2d46ab,args:_0x49057d,tdx:_0x66c208}=_0x59a761,_0x26ab22=_0x49057d[0x0];_0x2d46ab[_0x57de9a(0x320)]&&_0x26ab22&&console[_0x57de9a(0x28e)](_0x57de9a(0x294)+_0x26ab22);const _0x97d6a7=await withSpinner(_0x57de9a(0x203),()=>_0x66c208[_0x57de9a(0x2c9)]['projects'](_0x26ab22,{'limit':_0x2d46ab['limit']}),{'verbose':_0x2d46ab['verbose']});let _0xa89350=_0x97d6a7[_0x57de9a(0x35c)];_0xa89350[_0x57de9a(0x1f2)]((_0x36eb40,_0x3e0afa)=>_0x36eb40[_0x57de9a(0x209)]['localeCompare'](_0x3e0afa[_0x57de9a(0x209)]));const _0x43d267=_0x2d46ab[_0x57de9a(0x2d1)]||0x64,_0x3b37fe=_0xa89350[_0x57de9a(0x2f0)]>=_0x43d267?a42_0xc4b429[_0x57de9a(0x33f)](_0x57de9a(0x270)):'';console[_0x57de9a(0x28e)](_0x57de9a(0x35e)+_0xa89350[_0x57de9a(0x2f0)]+'\x20project'+(_0xa89350[_0x57de9a(0x2f0)]!==0x1?'s':'')+_0x3b37fe);if(_0x2d46ab[_0x57de9a(0x2cc)]===_0x57de9a(0x250)||_0x2d46ab[_0x57de9a(0x2cc)]===_0x57de9a(0x236)||_0x2d46ab[_0x57de9a(0x2cc)]==='table')await handleSDKOutput(_0xa89350,_0x2d46ab);else{if(_0xa89350[_0x57de9a(0x2f0)]===0x0)_0x26ab22?console[_0x57de9a(0x2c0)](_0x57de9a(0x28a)+_0x26ab22):console[_0x57de9a(0x2c0)](_0x57de9a(0x260));else{const _0xa2dbe6=_0xa89350[_0x57de9a(0x376)](_0x3cea2b=>{const _0x2b9824=_0x57de9a,_0x245bc1=_0x3cea2b[_0x2b9824(0x24d)]?.[_0x2b9824(0x2a7)](_0x15c627=>_0x15c627[_0x2b9824(0x263)]===_0x2b9824(0x253)),_0xc8bd13=_0x245bc1?a42_0xc4b429['dim']('\x20(system)'):'';return _0x2b9824(0x207)+_0x3cea2b[_0x2b9824(0x209)]+_0xc8bd13;});await writeOutput(_0xa2dbe6[_0x57de9a(0x275)]('\x0a'),_0x2d46ab[_0x57de9a(0x1f4)],_0x57de9a(0x282));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x248);['description']='List\x20workflows';async['execute'](_0x1b8898){const _0x5c1a06=a42_0x428ab2,{options:_0x6fb8f,args:_0xb9b8e,tdx:_0x2f016d}=_0x1b8898,_0x1a08c9=this['resolveProject'](_0xb9b8e,_0x6fb8f);_0x6fb8f['verbose']&&_0x1a08c9&&console[_0x5c1a06(0x28e)](_0x5c1a06(0x28d)+_0x1a08c9);const _0x1469b4=await withSpinner(_0x5c1a06(0x243),()=>_0x2f016d[_0x5c1a06(0x2c9)][_0x5c1a06(0x26c)](_0x1a08c9,{'limit':_0x6fb8f[_0x5c1a06(0x2d1)]}),{'verbose':_0x6fb8f['verbose']});let _0x38189e=_0x1469b4['data'];_0x38189e[_0x5c1a06(0x1f2)]((_0x1abb7e,_0x2e153b)=>{const _0x228793=_0x5c1a06,_0x2a78c8=_0x1abb7e['name'][_0x228793(0x299)](_0x2e153b[_0x228793(0x209)]);if(_0x2a78c8!==0x0)return _0x2a78c8;return(_0x1abb7e[_0x228793(0x2ba)]?.['name']||'')['localeCompare'](_0x2e153b[_0x228793(0x2ba)]?.[_0x228793(0x209)]||'');});const _0x36101b=_0x6fb8f[_0x5c1a06(0x2d1)]||0x64,_0x1ea809=_0x38189e['length']>=_0x36101b?a42_0xc4b429['dim'](_0x5c1a06(0x270)):'';console['error'](_0x5c1a06(0x35e)+_0x38189e[_0x5c1a06(0x2f0)]+'\x20workflow'+(_0x38189e[_0x5c1a06(0x2f0)]!==0x1?'s':'')+_0x1ea809);if(_0x6fb8f[_0x5c1a06(0x2cc)]===_0x5c1a06(0x250)||_0x6fb8f[_0x5c1a06(0x2cc)]===_0x5c1a06(0x236)||_0x6fb8f[_0x5c1a06(0x2cc)]===_0x5c1a06(0x246))await handleSDKOutput(_0x38189e,_0x6fb8f);else{if(_0x38189e[_0x5c1a06(0x2f0)]===0x0)_0x1a08c9?console['log'](_0x5c1a06(0x23b)+_0x1a08c9):console['log'](_0x5c1a06(0x27e));else{const _0x12a09c=_0x6fb8f[_0x5c1a06(0x34c)],_0x5da909=_0x38189e[_0x5c1a06(0x376)](_0x12e7da=>{const _0x324e1b=_0x5c1a06,_0xaf618d=a42_0xc4b429['dim']('#'+_0x12e7da['id']),_0x37e493=hyperlink(_0xaf618d,getWorkflowUrl(_0x12a09c,_0x12e7da['id'])),_0x3abafc=_0x12e7da[_0x324e1b(0x2ba)]?.[_0x324e1b(0x209)]?a42_0xc4b429['dim']('\x20('+_0x12e7da[_0x324e1b(0x2ba)][_0x324e1b(0x209)]+')'):'';return _0x324e1b(0x2e7)+_0x37e493+'\x20'+_0x12e7da[_0x324e1b(0x209)]+_0x3abafc;});await writeOutput(_0x5da909['join']('\x0a'),_0x6fb8f['output'],_0x5c1a06(0x282));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{['name']='workflow:sessions';[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x311);async['execute'](_0x2c5627){const _0x2e0c31=a42_0x428ab2,{options:_0x4f9f19,args:_0x1c758f,tdx:_0x2762d8}=_0x2c5627,_0x1d5f3a=this[_0x2e0c31(0x2ee)](_0x1c758f,_0x4f9f19);if(!_0x1d5f3a)return 0x1;const {projectName:_0x4c76fa,workflowName:_0x377f5c}=_0x1d5f3a;if(_0x4f9f19[_0x2e0c31(0x320)]){if(_0x4c76fa&&_0x377f5c)console['error'](_0x2e0c31(0x2d9)+_0x4c76fa+'.'+_0x377f5c);else _0x4c76fa&&console['error'](_0x2e0c31(0x247)+_0x4c76fa);const _0x492bc4=_0x4f9f19['status'];_0x492bc4&&console[_0x2e0c31(0x28e)]('Status:\x20'+_0x492bc4);}let _0x45579c=0x28;if(process[_0x2e0c31(0x268)][_0x2e0c31(0x258)]&&!_0x4f9f19[_0x2e0c31(0x1f4)]&&!_0x4f9f19[_0x2e0c31(0x2cc)]){const _0x4b6cba=process[_0x2e0c31(0x268)][_0x2e0c31(0x2ec)]||0x28;_0x45579c=Math[_0x2e0c31(0x29f)](0x14,Math['floor'](_0x4b6cba*0x2/0x3));}const _0x4fc73a=_0x4f9f19[_0x2e0c31(0x2d1)]||_0x45579c,_0x5ca096=await withSpinner(_0x2e0c31(0x204),()=>_0x2762d8[_0x2e0c31(0x2c9)]['sessions']({'projectName':_0x4c76fa,'workflowName':_0x377f5c,'status':_0x4f9f19[_0x2e0c31(0x1e3)],'fromTime':_0x4f9f19['from'],'toTime':_0x4f9f19['to'],'limit':_0x4fc73a}),{'verbose':_0x4f9f19[_0x2e0c31(0x320)]}),_0x3663f0=_0x5ca096[_0x2e0c31(0x35c)];_0x3663f0[_0x2e0c31(0x1f2)]((_0x5dfc60,_0x36c235)=>{const _0x4ef347=_0x2e0c31,_0x53fbd3=_0x5dfc60[_0x4ef347(0x2ef)]||'',_0x59a05d=_0x36c235['sessionTime']||'';return _0x59a05d[_0x4ef347(0x299)](_0x53fbd3);});_0x3663f0[_0x2e0c31(0x2f0)]>=_0x4fc73a?console[_0x2e0c31(0x28e)](_0x2e0c31(0x255)+_0x3663f0[_0x2e0c31(0x2f0)]+_0x2e0c31(0x297)+a42_0xc4b429[_0x2e0c31(0x33f)](_0x2e0c31(0x224))):console['error'](_0x2e0c31(0x35e)+_0x3663f0['length']+'\x20session'+(_0x3663f0[_0x2e0c31(0x2f0)]!==0x1?'s':''));if(_0x4f9f19[_0x2e0c31(0x2cc)]===_0x2e0c31(0x250)||_0x4f9f19[_0x2e0c31(0x2cc)]===_0x2e0c31(0x236)||_0x4f9f19['format']===_0x2e0c31(0x246))await handleSDKOutput(_0x3663f0,_0x4f9f19);else{if(!process['stdout']['isTTY']||_0x4f9f19[_0x2e0c31(0x1f4)]){if(_0x3663f0[_0x2e0c31(0x2f0)]===0x0){if(_0x4c76fa&&_0x377f5c)console['log'](_0x2e0c31(0x2d5)+_0x4c76fa+'.'+_0x377f5c);else _0x4c76fa?console[_0x2e0c31(0x2c0)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x4c76fa):console['log'](_0x2e0c31(0x2f5));}else{const _0x538eb3=_0x4f9f19[_0x2e0c31(0x34c)],_0xd79658=this[_0x2e0c31(0x380)](_0x3663f0,_0x538eb3);_0x4f9f19[_0x2e0c31(0x1f4)]?await writeOutput(_0xd79658,_0x4f9f19[_0x2e0c31(0x1f4)],_0x2e0c31(0x282)):console['log'](_0xd79658);}!_0x4c76fa&&(console[_0x2e0c31(0x28e)](''),console[_0x2e0c31(0x28e)](a42_0xc4b429[_0x2e0c31(0x33f)](_0x2e0c31(0x202))),console[_0x2e0c31(0x28e)](a42_0xc4b429[_0x2e0c31(0x33f)](_0x2e0c31(0x2dd))+'or'+a42_0xc4b429[_0x2e0c31(0x33f)](_0x2e0c31(0x215))));}else{if(_0x3663f0['length']===0x0){if(_0x4c76fa&&_0x377f5c)console[_0x2e0c31(0x2c0)](_0x2e0c31(0x2d5)+_0x4c76fa+'.'+_0x377f5c);else _0x4c76fa?console[_0x2e0c31(0x2c0)](_0x2e0c31(0x37e)+_0x4c76fa):console[_0x2e0c31(0x2c0)](_0x2e0c31(0x2f5));}else await this[_0x2e0c31(0x338)](_0x3663f0,_0x2c5627,_0x4c76fa);}}return 0x0;}[a42_0x428ab2(0x380)](_0x130d62,_0x3bf8b9){const _0xfa46fa=a42_0x428ab2,_0x5bb009=[],_0x343c92=new Map();let _0x230cdd=Infinity,_0x1703ef=-Infinity;for(const _0x34b25b of _0x130d62){if(_0x34b25b[_0xfa46fa(0x2c7)]?.[_0xfa46fa(0x377)]){const _0x45d044=new Date(_0x34b25b['lastAttempt'][_0xfa46fa(0x377)])['getTime'](),_0x46cbee=_0x34b25b[_0xfa46fa(0x2c7)]['finishedAt']?new Date(_0x34b25b[_0xfa46fa(0x2c7)][_0xfa46fa(0x28f)])['getTime']():Date[_0xfa46fa(0x22f)](),_0x5ad1da=_0x34b25b['project']?.[_0xfa46fa(0x209)]||_0xfa46fa(0x26a);!_0x343c92[_0xfa46fa(0x254)](_0x5ad1da)&&_0x343c92[_0xfa46fa(0x2d2)](_0x5ad1da,[]),_0x343c92[_0xfa46fa(0x358)](_0x5ad1da)['push']({'session':_0x34b25b,'startTime':_0x45d044,'endTime':_0x46cbee,'duration':_0x46cbee-_0x45d044}),_0x230cdd=Math['min'](_0x230cdd,_0x45d044),_0x1703ef=Math[_0xfa46fa(0x29f)](_0x1703ef,_0x46cbee);}}if(_0x343c92[_0xfa46fa(0x378)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x4f4994=process[_0xfa46fa(0x268)]['columns']||0x78,_0x1cc15e=0x1e,_0x163a6b=0x32,_0x369491=0x4,_0x3bb72a=Math[_0xfa46fa(0x1fe)](_0x163a6b,Math['max'](_0x1cc15e,Math[_0xfa46fa(0x33d)](_0x4f4994*0.3))),_0x320c8d=_0x4f4994-_0x3bb72a-TIMELINE_CONFIG[_0xfa46fa(0x278)]-0x3-_0x369491,_0x50d257=_0x1703ef-_0x230cdd,_0x43b749=_0x50d257/_0x3bb72a,_0x2e2ec0=renderTimeAxis({'startTime':_0x230cdd,'endTime':_0x1703ef,'durationMs':_0x50d257,'msPerChar':_0x43b749},_0x3bb72a),_0x1d16ee=[];for(const _0x2619c3 of _0x343c92[_0xfa46fa(0x234)]()){_0x1d16ee[_0xfa46fa(0x23f)](..._0x2619c3);}_0x1d16ee['sort']((_0x5a2cd3,_0x3f4a4c)=>_0x3f4a4c[_0xfa46fa(0x226)]-_0x5a2cd3[_0xfa46fa(0x226)]);const _0x177d11=new Date(_0x230cdd),_0x53d600=formatDate(_0x177d11),_0x3720ef=_0x369491+TIMELINE_CONFIG[_0xfa46fa(0x2c6)]+TIMELINE_CONFIG[_0xfa46fa(0x336)]+_0x320c8d,_0x3c75f0='\x20'[_0xfa46fa(0x304)](_0x3720ef-_0x53d600[_0xfa46fa(0x2f0)]),_0x3ed0a8=_0x3c75f0+a42_0xc4b429['dim'](_0x53d600)+'\x20'+_0x2e2ec0;_0x5bb009[_0xfa46fa(0x23f)](_0x3ed0a8);const _0x57dded=0x16;let _0x484d8d=0x0;for(const _0x115a5f of _0x1d16ee){const _0x1e77bb=_0x115a5f[_0xfa46fa(0x355)][_0xfa46fa(0x2ba)]?.[_0xfa46fa(0x209)]||'?',_0x1a5e3f=Math[_0xfa46fa(0x1fe)](stringWidth(_0x1e77bb),_0x57dded);_0x484d8d=Math[_0xfa46fa(0x29f)](_0x484d8d,_0x1a5e3f);}for(const _0x1187e4 of _0x1d16ee){const {session:_0x3f3e90,startTime:_0x346d5d,endTime:_0x42907a,duration:_0x479a7c}=_0x1187e4,_0x18943d=_0x3f3e90[_0xfa46fa(0x2ba)]?.['id'],_0x57a7a5=_0x3f3e90['id'],_0x4933c1=_0x3f3e90[_0xfa46fa(0x2ba)]?.[_0xfa46fa(0x209)]||'?',_0x269d81=_0x3f3e90[_0xfa46fa(0x2c9)]?.[_0xfa46fa(0x209)]||'?';let _0x49cf67,_0x80951c;if(_0x3f3e90['lastAttempt']){const _0x1890a8=_0x3f3e90['lastAttempt'];!_0x1890a8[_0xfa46fa(0x24c)]?(_0x49cf67=_0x1890a8[_0xfa46fa(0x343)]?'🛑':'🔄',_0x80951c=_0x1890a8['cancelRequested']?a42_0xc4b429[_0xfa46fa(0x29c)]:a42_0xc4b429[_0xfa46fa(0x2b5)]):(_0x49cf67=_0x1890a8[_0xfa46fa(0x32b)]?'✅':'❌',_0x80951c=_0x1890a8['success']?a42_0xc4b429['green']:a42_0xc4b429['red']);}else _0x49cf67='⏳',_0x80951c=a42_0xc4b429['dim'];const _0x3be5c='#'+_0x57a7a5,_0x19658d=_0x18943d?hyperlink(_0x3be5c,getWorkflowSessionUrl(_0x3bf8b9,_0x18943d,_0x57a7a5)):_0x3be5c;let _0x3372e2=_0x4933c1;stringWidth(_0x4933c1)>_0x57dded&&(_0x3372e2=_0x4933c1[_0xfa46fa(0x24b)](0x0,_0x57dded-0x1)+'…');const _0x27ff45=a42_0xc4b429[_0xfa46fa(0x33f)](_0x3372e2),_0x11c8f3=stringWidth(_0x3372e2),_0x24e7b1='\x20'['repeat'](_0x484d8d-stringWidth(_0x3372e2)+0x2),_0x3d688c='('+formatElapsed(_0x479a7c)+')',_0x517efc=stringWidth(_0x3d688c),_0x5c89eb=stringWidth(_0x3be5c),_0x53916b=_0x5c89eb+0x1+_0x11c8f3+_0x24e7b1['length'],_0x2fce1d=_0x320c8d-_0x53916b-_0x517efc-0x1-0x8;let _0x4a4523=_0x269d81;stringWidth(_0x4a4523)>_0x2fce1d&&(_0x4a4523=_0x4a4523[_0xfa46fa(0x24b)](0x0,_0x2fce1d-0x1)+'…');const _0x449c1b=_0x19658d+'\x20'+_0x27ff45+_0x24e7b1+_0x4a4523,_0x1ddb47=stringWidth(_0x449c1b),_0x12f534=_0x320c8d-_0x1ddb47-_0x517efc,_0x333f16=_0x449c1b+'\x20'['repeat'](Math[_0xfa46fa(0x29f)](0x1,_0x12f534))+a42_0xc4b429[_0xfa46fa(0x33f)](_0x3d688c),_0x5a4528=Math[_0xfa46fa(0x33d)]((_0x346d5d-_0x230cdd)/_0x43b749),_0x3ccb96=Math['floor']((_0x42907a-_0x230cdd)/_0x43b749),_0xbe66a=Math['max'](_0x5a4528+0x1,_0x3ccb96),_0x34f331=new Array(_0x3bb72a)[_0xfa46fa(0x32d)]('\x20');for(let _0x4e5aa2=_0x5a4528;_0x4e5aa2<Math[_0xfa46fa(0x1fe)](_0xbe66a,_0x3bb72a);_0x4e5aa2++){_0x34f331[_0x4e5aa2]='─';}const _0x237d2d=_0x34f331['map'](_0x1cdc7b=>_0x1cdc7b==='\x20'?'\x20':_0x80951c(_0x1cdc7b))['join']('');_0x5bb009['push'](_0x49cf67+'\x20'+_0x333f16+'│'+_0x237d2d+'│');}return _0x5bb009[_0xfa46fa(0x275)]('\x0a');}async[a42_0x428ab2(0x338)](_0x3418b3,_0x5ba534,_0x29e4a8){const _0x30bfc0=a42_0x428ab2,{options:_0x4eaaa2,tdx:_0x109920}=_0x5ba534,_0x7b4f1d=_0x4eaaa2[_0x30bfc0(0x34c)],{timelineRows:_0x1065aa,timeAxisHeader:_0xaf797e}=this[_0x30bfc0(0x328)](_0x3418b3,_0x7b4f1d),_0x5a9fc4=_0x1065aa[_0x30bfc0(0x318)](_0x5d842b=>_0x5d842b['attemptId']);if(_0x5a9fc4[_0x30bfc0(0x2f0)]===0x0){const _0x3343d4=this[_0x30bfc0(0x380)](_0x3418b3,_0x7b4f1d);console['log'](_0x3343d4);!_0x29e4a8&&(console[_0x30bfc0(0x28e)](''),console['error'](a42_0xc4b429[_0x30bfc0(0x33f)](_0x30bfc0(0x202))),console[_0x30bfc0(0x28e)](a42_0xc4b429[_0x30bfc0(0x33f)]('\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20')+'or'+a42_0xc4b429['dim'](_0x30bfc0(0x215))));return;}_0xaf797e&&console[_0x30bfc0(0x2c0)](_0xaf797e);const _0x417269=_0x1065aa[_0x30bfc0(0x318)](_0x1381b1=>_0x1381b1[_0x30bfc0(0x25a)])[_0x30bfc0(0x376)](_0x2830eb=>({'title':_0x2830eb['displayLine'],'value':_0x2830eb[_0x30bfc0(0x25a)]})),_0x3e267c=process['stdout'][_0x30bfc0(0x2ec)]||0x3c,_0x3a0c6c=Math[_0x30bfc0(0x29f)](0x28,Math[_0x30bfc0(0x33d)](_0x3e267c*0x2/0x3)),_0x2e8379=await a42_0x2ce4d7({'type':_0x30bfc0(0x298),'name':_0x30bfc0(0x25a),'message':'Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','choices':_0x417269,'initial':-0x1,'limit':_0x3a0c6c,'clearFirst':!![],'fallback':{'title':_0x30bfc0(0x30d),'value':null},'suggest':(_0x304346,_0x2bfcd0)=>{const _0x415ee3=_0x30bfc0;if(!_0x304346)return Promise['resolve'](_0x2bfcd0);const _0x24bc16=_0x2bfcd0[_0x415ee3(0x318)](_0x59c6c4=>{const _0x1421a7=_0x415ee3,_0xa0e065=_0x59c6c4;return _0xa0e065[_0x1421a7(0x31f)][_0x1421a7(0x232)]()[_0x1421a7(0x21c)](_0x304346['toLowerCase']());});return Promise[_0x415ee3(0x277)](_0x24bc16);}}),_0x5736cc=()=>{const _0x4b6e5c=_0x30bfc0;process['stdout'][_0x4b6e5c(0x256)](_0x4b6e5c(0x388)),process['stdout'][_0x4b6e5c(0x256)]('\x1b[1A\x1b[2K'),process[_0x4b6e5c(0x268)]['write']('\x1b[1A\x1b[2K');},_0x23a3de=_0x2e8379&&_0x2e8379[_0x30bfc0(0x25a)]&&_0x2e8379['attemptId']!==null&&_0x2e8379['attemptId'][_0x30bfc0(0x284)]()!=='';if(!_0x23a3de){_0x5736cc(),console[_0x30bfc0(0x2c0)](a42_0xc4b429[_0x30bfc0(0x33f)](_0x30bfc0(0x2e3)));return;}_0x5736cc();const _0x555c55=_0x3418b3[_0x30bfc0(0x303)](_0x1e4a8e=>_0x1e4a8e[_0x30bfc0(0x2c7)]?.['id']===_0x2e8379[_0x30bfc0(0x25a)]);if(_0x555c55){const _0x3b8531=_0x555c55['project']?.['name']||'?',_0x190ea5=_0x555c55[_0x30bfc0(0x2c9)]?.['name']||'?';console['log']('Project:\x20'+a42_0xc4b429[_0x30bfc0(0x33f)](_0x3b8531)+_0x30bfc0(0x332)+a42_0xc4b429['dim'](_0x190ea5));}const _0x4e0a25=new WorkflowTimelineCommand();await _0x4e0a25[_0x30bfc0(0x2a1)]({'args':[],'options':{..._0x4eaaa2,'attemptId':_0x2e8379['attemptId']},'tdx':_0x109920});}['generateSessionTimelineRows'](_0x3b5e3c,_0xfc5ad9){const _0x5a4122=a42_0x428ab2,_0x25cadc=new Map();for(const _0x5353ad of _0x3b5e3c){_0x5353ad['id']&&_0x5353ad[_0x5a4122(0x2c7)]?.['id']&&_0x25cadc[_0x5a4122(0x2d2)](_0x5353ad['id'],_0x5353ad[_0x5a4122(0x2c7)]['id']);}const _0x16d8aa=[];let _0xed128c='';const _0x211ed1=this[_0x5a4122(0x380)](_0x3b5e3c,_0xfc5ad9),_0x3246e0=_0x211ed1['split']('\x0a');for(const _0x3e6e6f of _0x3246e0){if(_0x3e6e6f[_0x5a4122(0x2bd)](_0x5a4122(0x20d))||_0x3e6e6f[_0x5a4122(0x346)](/^\s+\d{4}-\d{2}-\d{2}/))_0xed128c=_0x3e6e6f;else{if(_0x3e6e6f[_0x5a4122(0x346)](/^[✅❌🔄🛑⏳]/)){const _0x2231c7=_0x3e6e6f[_0x5a4122(0x346)](/#(\d+)/),_0x1ab13e=_0x2231c7?_0x2231c7[0x1]:null,_0x157d7f=_0x1ab13e?_0x25cadc[_0x5a4122(0x358)](_0x1ab13e)||null:null,_0x455071=_0x3b5e3c[_0x5a4122(0x303)](_0x187368=>_0x187368['id']===_0x1ab13e),_0x3fcb47=_0x455071?.[_0x5a4122(0x2ba)]?.[_0x5a4122(0x209)]||'';_0x16d8aa[_0x5a4122(0x23f)]({'displayLine':_0x3e6e6f,'attemptId':_0x157d7f,'projectName':_0x3fcb47});}}}return{'timelineRows':_0x16d8aa,'timeAxisHeader':_0xed128c};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x2d0);[a42_0x428ab2(0x38d)]='List\x20workflow\x20attempts';async['execute'](_0x5f1d29){const _0x42c991=a42_0x428ab2,{options:_0x450910,args:_0xcaa2fa,tdx:_0x50fabd}=_0x5f1d29,_0x2a86b7=this[_0x42c991(0x2ee)](_0xcaa2fa,_0x450910);if(!_0x2a86b7)return 0x1;const {projectName:_0x491ddd,workflowName:_0x1bd9ae}=_0x2a86b7,_0x185b5e=_0x450910[_0x42c991(0x218)];if(_0x450910[_0x42c991(0x320)]){if(_0x491ddd&&_0x1bd9ae)console[_0x42c991(0x28e)](_0x42c991(0x2d9)+_0x491ddd+'.'+_0x1bd9ae);else _0x491ddd&&console[_0x42c991(0x28e)](_0x42c991(0x247)+_0x491ddd);_0x185b5e&&console[_0x42c991(0x28e)](_0x42c991(0x2f4));}const _0x4b8c52=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x50fabd[_0x42c991(0x2c9)][_0x42c991(0x360)]({'projectName':_0x491ddd,'workflowName':_0x1bd9ae,'includeRetried':_0x185b5e,'limit':_0x450910[_0x42c991(0x2d1)]}),{'verbose':_0x450910[_0x42c991(0x320)]}),_0x46435d=_0x4b8c52['data'],_0x594c70=_0x450910[_0x42c991(0x2d1)]||0x64,_0x29bb63=_0x46435d[_0x42c991(0x2f0)]>=_0x594c70?a42_0xc4b429[_0x42c991(0x33f)](_0x42c991(0x270)):'';console[_0x42c991(0x28e)]('✔\x20Found\x20'+_0x46435d[_0x42c991(0x2f0)]+_0x42c991(0x296)+(_0x46435d['length']!==0x1?'s':'')+_0x29bb63);if(_0x450910[_0x42c991(0x2cc)]==='json'||_0x450910['format']===_0x42c991(0x236)||_0x450910['format']==='table')await handleSDKOutput(_0x46435d,_0x450910);else{if(_0x46435d[_0x42c991(0x2f0)]===0x0){if(_0x491ddd&&_0x1bd9ae)console['log'](_0x42c991(0x2b1)+_0x491ddd+'.'+_0x1bd9ae);else _0x491ddd?console[_0x42c991(0x2c0)](_0x42c991(0x2bc)+_0x491ddd):console[_0x42c991(0x2c0)](_0x42c991(0x2e5));}else{const _0x393b85=_0x450910[_0x42c991(0x34c)],_0x536db6=_0x46435d[_0x42c991(0x376)](_0x36ba7a=>{const _0x2ffac5=_0x42c991,_0xbc0bb6=a42_0xc4b429[_0x2ffac5(0x33f)]('#'+_0x36ba7a['id']),_0x49e929=_0x36ba7a[_0x2ffac5(0x2ba)]?.['id'],_0x5bd924=_0x36ba7a[_0x2ffac5(0x1f0)]||_0x36ba7a['sessionId'],_0x2c0fbe=_0x49e929&&_0x5bd924?hyperlink(_0xbc0bb6,getWorkflowAttemptUrl(_0x393b85,_0x49e929,_0x5bd924,_0x36ba7a['id'])):_0xbc0bb6,{icon:_0x2557cf,text:_0x5ba146}=getAttemptStatusDisplay(_0x36ba7a),_0x5d95d7=(_0x36ba7a[_0x2ffac5(0x2ba)]?.['name']||'?')+'.'+(_0x36ba7a['workflow']?.['name']||'?'),_0x23fb96=_0x36ba7a['sessionTime']?a42_0xc4b429['dim'](_0x36ba7a[_0x2ffac5(0x2ef)]):'';return(_0x2c0fbe+'\x20'+_0x2557cf+(_0x5ba146?'\x20'+_0x5ba146:'')+'\x20'+_0x5d95d7+'\x20'+_0x23fb96)[_0x2ffac5(0x32e)]();});await writeOutput(_0x536db6[_0x42c991(0x275)]('\x0a'),_0x450910[_0x42c991(0x1f4)],_0x42c991(0x282));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x2ae);['description']=a42_0x428ab2(0x347);async['execute'](_0x3ca189){const _0x1cd361=a42_0x428ab2,{options:_0x4ad007,args:_0x28c6e6,tdx:_0x46e7e7}=_0x3ca189,_0x4f4c66=_0x28c6e6[0x0];if(!_0x4f4c66)return console[_0x1cd361(0x28e)](_0x1cd361(0x327)),0x1;_0x4ad007[_0x1cd361(0x320)]&&console['error']('Attempt\x20ID:\x20'+_0x4f4c66);const _0x1fe832=await withSpinner(_0x1cd361(0x1ec),()=>_0x46e7e7[_0x1cd361(0x2c9)][_0x1cd361(0x2dc)](_0x4f4c66),{'verbose':_0x4ad007[_0x1cd361(0x320)]}),_0x151375=_0x1fe832['data'];let _0x4f7068;!_0x151375['done']?_0x4f7068=_0x151375[_0x1cd361(0x343)]?_0x1cd361(0x27c):_0x1cd361(0x227):_0x4f7068=_0x151375[_0x1cd361(0x32b)]?_0x1cd361(0x32b):_0x1cd361(0x28e);let _0x40786c;if(_0x151375['createdAt']&&_0x151375['finishedAt']){const _0x5129ea=new Date(_0x151375[_0x1cd361(0x377)])[_0x1cd361(0x279)](),_0x111084=new Date(_0x151375['finishedAt'])['getTime']();_0x40786c=Math[_0x1cd361(0x308)]((_0x111084-_0x5129ea)/0x3e8);}const _0x7a84a5={'attempt_id':_0x151375['id'],'status':_0x4f7068,..._0x151375['index']!==undefined&&{'index':_0x151375[_0x1cd361(0x23e)]},..._0x151375[_0x1cd361(0x2ba)]&&{'project':_0x151375['project'][_0x1cd361(0x209)]},..._0x151375[_0x1cd361(0x2c9)]&&{'workflow':_0x151375['workflow']['name']},..._0x151375[_0x1cd361(0x34d)]&&{'session_id':_0x151375[_0x1cd361(0x34d)]},..._0x151375[_0x1cd361(0x2ef)]&&{'session_time':_0x151375[_0x1cd361(0x2ef)]},..._0x151375[_0x1cd361(0x1f3)]&&{'retry_attempt':_0x151375[_0x1cd361(0x1f3)]},..._0x40786c!==undefined&&{'duration_sec':_0x40786c},..._0x151375['createdAt']&&{'created_at':_0x151375[_0x1cd361(0x377)]},..._0x151375[_0x1cd361(0x28f)]&&{'finished_at':_0x151375[_0x1cd361(0x28f)]},...Object[_0x1cd361(0x1ee)](_0x151375[_0x1cd361(0x2b4)])['length']>0x0&&{'params':_0x151375[_0x1cd361(0x2b4)]}};return await handleSingleObjectOutput(_0x7a84a5,_0x4ad007),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x370);[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x341);async['execute'](_0x259189){const _0x2c0374=a42_0x428ab2,{options:_0x47982e,args:_0x41358b,tdx:_0x3458a3}=_0x259189,_0x1253e6=_0x41358b[0x0];if(!_0x1253e6)return console[_0x2c0374(0x28e)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x1e3bd5=_0x47982e[_0x2c0374(0x267)];_0x47982e[_0x2c0374(0x320)]&&(console[_0x2c0374(0x28e)](_0x2c0374(0x2f8)+_0x1253e6),_0x1e3bd5&&console[_0x2c0374(0x28e)]('Including\x20subtasks:\x20yes'));const _0x3f8e77=await withSpinner(_0x2c0374(0x335),()=>_0x3458a3[_0x2c0374(0x2c9)][_0x2c0374(0x329)](_0x1253e6,_0x1e3bd5||![]),{'verbose':_0x47982e[_0x2c0374(0x320)]}),_0x157511=_0x3f8e77[_0x2c0374(0x35c)];return console[_0x2c0374(0x28e)](_0x2c0374(0x35e)+_0x157511[_0x2c0374(0x2f0)]+_0x2c0374(0x350)+(_0x157511[_0x2c0374(0x2f0)]!==0x1?'s':'')),await handleSDKOutput(_0x157511,_0x47982e),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x428ab2(0x209)]='workflow:logs';[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x35a);async[a42_0x428ab2(0x2a1)](_0x1b4897){const _0x3391d3=a42_0x428ab2,{options:_0x333a30,args:_0x3aba6f,tdx:_0x536417}=_0x1b4897,_0x14c095=_0x3aba6f[0x0];let _0xb44690=_0x3aba6f[0x1];if(!_0x14c095)return console[_0x3391d3(0x28e)](_0x3391d3(0x327)),0x1;_0x333a30[_0x3391d3(0x320)]&&(console['error'](_0x3391d3(0x2f8)+_0x14c095),_0xb44690&&console[_0x3391d3(0x28e)](_0x3391d3(0x24e)+_0xb44690));const _0xc4c1df=await withSpinner(_0x3391d3(0x35d),()=>_0x536417[_0x3391d3(0x2c9)][_0x3391d3(0x1ff)](_0x14c095,_0xb44690),{'verbose':_0x333a30[_0x3391d3(0x320)]}),_0x48bac8=_0xc4c1df[_0x3391d3(0x35c)];if(_0x48bac8[_0x3391d3(0x2f0)]===0x0)return console[_0x3391d3(0x28e)](_0x3391d3(0x2c3)),0x0;if(!_0xb44690&&(_0x333a30[_0x3391d3(0x250)]||_0x333a30[_0x3391d3(0x2cc)]))return await handleSDKOutput(_0x48bac8,_0x333a30),0x0;if(!_0xb44690){const _0x127f61=_0x48bac8[_0x3391d3(0x376)](_0x309eb5=>({'title':_0x309eb5['taskName']+'\x20('+formatBytes(_0x309eb5[_0x3391d3(0x29a)])+')','value':_0x309eb5[_0x3391d3(0x2a2)]})),_0x68657e=await a42_0x2ce4d7({'type':'select','name':_0x3391d3(0x386),'message':_0x3391d3(0x357),'choices':_0x127f61});if(!_0x68657e[_0x3391d3(0x386)])return console[_0x3391d3(0x28e)](_0x3391d3(0x2e3)),0x0;_0xb44690=_0x68657e[_0x3391d3(0x386)];}const _0x2e7800=await withSpinner('Downloading\x20logs...',()=>_0x536417[_0x3391d3(0x2c9)][_0x3391d3(0x223)](_0x14c095,_0xb44690),{'verbose':_0x333a30['verbose']}),_0xa1096a=_0x2e7800[_0x3391d3(0x35c)];return _0xa1096a?console['log'](_0xa1096a):console['error'](_0x3391d3(0x2a0)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x428ab2(0x209)]='workflow:kill';[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x2cf);async[a42_0x428ab2(0x2a1)](_0x42c81c){const _0xf1dc61=a42_0x428ab2,{options:_0x48a884,args:_0x4538f0,tdx:_0x28546b}=_0x42c81c,_0x4e6376=_0x4538f0[0x0];if(!_0x4e6376)return console['error'](_0xf1dc61(0x327)),0x1;const _0x3a07d6=_0x48a884[_0xf1dc61(0x217)];_0x48a884[_0xf1dc61(0x320)]&&(console['error'](_0xf1dc61(0x2f8)+_0x4e6376),_0x3a07d6&&console[_0xf1dc61(0x28e)](_0xf1dc61(0x324)+_0x3a07d6));if(!_0x48a884[_0xf1dc61(0x36d)]){if(!isInteractive())return console[_0xf1dc61(0x28e)](a42_0xc4b429[_0xf1dc61(0x2ab)](_0xf1dc61(0x365)),_0xf1dc61(0x306)),console[_0xf1dc61(0x28e)](a42_0xc4b429['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x34be01=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x4e6376+'?');if(!_0x34be01)return console['error'](a42_0xc4b429[_0xf1dc61(0x29c)](_0xf1dc61(0x2e3))),0x1;}const _0x3feedd=await withSpinner(_0xf1dc61(0x2f3),()=>_0x28546b[_0xf1dc61(0x2c9)][_0xf1dc61(0x1fc)](_0x4e6376,_0x3a07d6),{'verbose':_0x48a884[_0xf1dc61(0x320)]}),_0x396bf8=_0x3feedd[_0xf1dc61(0x35c)];return console['error']('✔\x20'+_0x396bf8),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x2b8);[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x2a6);async[a42_0x428ab2(0x2a1)](_0x398e56){const _0x49705f=a42_0x428ab2,{options:_0x1ea803,args:_0x3376e1,tdx:_0x1dd1c2}=_0x398e56,_0x2fd88a=_0x3376e1[0x0];if(!_0x2fd88a)return console[_0x49705f(0x28e)](_0x49705f(0x2e8)),console[_0x49705f(0x28e)](_0x49705f(0x2aa)),0x1;let _0x33f80a=![],_0x147ec4=_0x2fd88a;if(_0x2fd88a[_0x49705f(0x2bd)](_0x49705f(0x310)))_0x33f80a=!![],_0x147ec4=_0x2fd88a[_0x49705f(0x25c)](0x8);else{if(_0x2fd88a['startsWith'](_0x49705f(0x366)))_0x33f80a=![],_0x147ec4=_0x2fd88a[_0x49705f(0x25c)](0x8);else return console[_0x49705f(0x28e)](_0x49705f(0x220)),console[_0x49705f(0x28e)](_0x49705f(0x2aa)),0x1;}const _0x2a3b2c=_0x1ea803[_0x49705f(0x1fb)],_0x55c5da=_0x1ea803['resumeFrom'],_0x538cb6=_0x1ea803['params'],_0x21a006=_0x1ea803[_0x49705f(0x1ea)];_0x1ea803[_0x49705f(0x320)]&&(console['error']('Target:\x20'+(_0x33f80a?_0x49705f(0x355):'attempt')+'\x20'+_0x147ec4),_0x2a3b2c&&console[_0x49705f(0x28e)](_0x49705f(0x20a)+_0x2a3b2c),_0x55c5da&&console[_0x49705f(0x28e)](_0x49705f(0x2e4)+_0x55c5da),_0x538cb6&&console[_0x49705f(0x28e)](_0x49705f(0x359)+_0x538cb6),_0x21a006&&console['error'](_0x49705f(0x381)));let _0x2f27b0;if(_0x538cb6)try{if(_0x538cb6[_0x49705f(0x2bd)]('@')){const _0x3d3857=await import(_0x49705f(0x330)),_0x553038=_0x538cb6[_0x49705f(0x25c)](0x1),_0x417206=await _0x3d3857['readFile'](_0x553038,_0x49705f(0x231));_0x2f27b0=JSON[_0x49705f(0x271)](_0x417206);}else _0x2f27b0=JSON[_0x49705f(0x271)](_0x538cb6);}catch{return console[_0x49705f(0x28e)](_0x49705f(0x302)),0x1;}if(!_0x1ea803[_0x49705f(0x36d)]){if(!isInteractive())return console['error'](a42_0xc4b429['red'](_0x49705f(0x365)),_0x49705f(0x306)),console[_0x49705f(0x28e)](a42_0xc4b429[_0x49705f(0x33f)](_0x49705f(0x2a3))),0x1;const _0x5ee51e=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x33f80a?'session':_0x49705f(0x2dc))+'\x20'+_0x147ec4+'?');if(!_0x5ee51e)return console[_0x49705f(0x28e)](a42_0xc4b429[_0x49705f(0x29c)]('Cancelled')),0x1;}let _0x25b839;_0x33f80a?_0x25b839=await withSpinner(_0x49705f(0x240),()=>_0x1dd1c2[_0x49705f(0x2c9)]['retrySession'](_0x147ec4,{'fromTask':_0x2a3b2c,'retryParams':_0x2f27b0}),{'verbose':_0x1ea803[_0x49705f(0x320)]}):_0x25b839=await withSpinner(_0x49705f(0x30f),()=>_0x1dd1c2[_0x49705f(0x2c9)][_0x49705f(0x35f)](_0x147ec4,{'resumeFrom':_0x55c5da,'retryParams':_0x2f27b0,'force':_0x21a006}),{'verbose':_0x1ea803[_0x49705f(0x320)]});const _0x11b4f6=_0x25b839[_0x49705f(0x35c)];return console[_0x49705f(0x28e)](_0x49705f(0x2fb)),console[_0x49705f(0x28e)]('\x20\x20New\x20attempt\x20ID:\x20'+_0x11b4f6[_0x49705f(0x25a)]),console[_0x49705f(0x28e)](_0x49705f(0x1ef)+_0x11b4f6[_0x49705f(0x34d)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x2a8);[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x2e9);async[a42_0x428ab2(0x2a1)](_0xe97da4){const _0x33f827=a42_0x428ab2,{options:_0x3303be,args:_0x53869b,tdx:_0x445ce0}=_0xe97da4;let _0x2c884b=_0x53869b[0x0];if(!_0x2c884b){const _0x5afcb3=this[_0x33f827(0x27a)]([],_0x3303be),_0x3a9ac7=await withSpinner(_0x33f827(0x317),()=>_0x445ce0[_0x33f827(0x2c9)]['workflows'](_0x5afcb3,{'limit':_0x3303be[_0x33f827(0x2d1)]}),{'verbose':_0x3303be[_0x33f827(0x320)]}),_0x1baabc=_0x3a9ac7[_0x33f827(0x35c)];if(_0x1baabc['length']===0x0)return console['error']('No\x20workflows\x20found'),!_0x5afcb3&&console[_0x33f827(0x28e)](a42_0xc4b429['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x17467b=_0x1baabc[_0x33f827(0x376)](_0x5e5e61=>({'title':_0x5e5e61[_0x33f827(0x2ba)]?.[_0x33f827(0x209)]+'.'+_0x5e5e61[_0x33f827(0x209)],'value':_0x5e5e61[_0x33f827(0x2ba)]?.['name']+'.'+_0x5e5e61['name'],'description':_0x5e5e61[_0x33f827(0x307)]?_0x33f827(0x313)+_0x5e5e61['revision']:undefined})),_0x2be59d=await a42_0x2ce4d7({'type':'select','name':_0x33f827(0x2c9),'message':_0x33f827(0x348),'choices':_0x17467b});if(!_0x2be59d['workflow'])return 0x1;_0x2c884b=_0x2be59d[_0x33f827(0x2c9)];}if(!_0x2c884b['includes']('.')){const _0x40915b=this[_0x33f827(0x27a)]([],_0x3303be);if(_0x40915b)_0x2c884b=_0x40915b+'.'+_0x2c884b;else return console['error'](a42_0xc4b429[_0x33f827(0x2ab)](_0x33f827(0x349)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console['error'](a42_0xc4b429[_0x33f827(0x33f)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0x596d0b=_0x3303be[_0x33f827(0x322)],_0x53cbe8=_0x3303be['sessionTime'],_0x2494c6={};if(_0x596d0b&&Array[_0x33f827(0x2c2)](_0x596d0b))for(const _0x2ed9ed of _0x596d0b){const _0x1908c7=_0x2ed9ed[_0x33f827(0x283)]('=');if(_0x1908c7===-0x1)return console['error']('Error:\x20Invalid\x20parameter\x20format:\x20'+_0x2ed9ed),console[_0x33f827(0x28e)]('Expected\x20format:\x20--param\x20key=value'),0x1;const _0x49dfb3=_0x2ed9ed[_0x33f827(0x25c)](0x0,_0x1908c7),_0x283f45=_0x2ed9ed[_0x33f827(0x25c)](_0x1908c7+0x1);try{_0x2494c6[_0x49dfb3]=JSON[_0x33f827(0x271)](_0x283f45);}catch{_0x2494c6[_0x49dfb3]=_0x283f45;}}_0x3303be[_0x33f827(0x320)]&&(console[_0x33f827(0x28e)]('Workflow:\x20'+_0x2c884b),Object[_0x33f827(0x1ee)](_0x2494c6)[_0x33f827(0x2f0)]>0x0&&console['error'](_0x33f827(0x233)+JSON[_0x33f827(0x2d7)](_0x2494c6)),_0x53cbe8&&console['error'](_0x33f827(0x333)+_0x53cbe8));const _0x4ce8ee=await withSpinner(_0x33f827(0x2e1),()=>_0x445ce0[_0x33f827(0x2c9)][_0x33f827(0x27f)](_0x2c884b,_0x2494c6,{'sessionTime':_0x53cbe8}),{'verbose':_0x3303be[_0x33f827(0x320)]}),_0x4b0510=_0x4ce8ee[_0x33f827(0x35c)];console[_0x33f827(0x28e)](_0x33f827(0x280)),console['error'](_0x33f827(0x32c)+_0x4b0510['id']),console[_0x33f827(0x28e)](_0x33f827(0x1ef)+_0x4b0510['sessionId']),console['error']('\x20\x20Project:\x20'+_0x4b0510[_0x33f827(0x2ba)]?.[_0x33f827(0x209)]),console['error'](_0x33f827(0x213)+_0x4b0510[_0x33f827(0x2c9)]?.[_0x33f827(0x209)]);if(_0x4b0510[_0x33f827(0x2ba)]?.['id']&&_0x4b0510[_0x33f827(0x34d)]&&_0x4b0510['id']){const _0xd16d1=_0x3303be[_0x33f827(0x34c)],_0x3e2e24=getConsoleUrl(_0xd16d1,_0x33f827(0x295)+_0x4b0510[_0x33f827(0x2ba)]['id']+_0x33f827(0x1f5)+_0x4b0510[_0x33f827(0x34d)]+_0x33f827(0x26e)+_0x4b0510['id']);console[_0x33f827(0x28e)]('\x20\x20Console:\x20'+a42_0xc4b429[_0x33f827(0x31b)](_0x3e2e24));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x214);[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x1f9);async['execute'](_0x10e8bb){const _0x400ae7=a42_0x428ab2,{options:_0x572d7a,args:_0x4db4b0,tdx:_0x2d3cff}=_0x10e8bb,_0x2edfe4=_0x4db4b0[0x0],_0x59b77d=_0x4db4b0[0x1]||'.';if(!_0x2edfe4)return console[_0x400ae7(0x28e)](_0x400ae7(0x31a)),console[_0x400ae7(0x28e)](_0x400ae7(0x26d)),0x1;const _0x306395=_0x572d7a[_0x400ae7(0x307)];_0x572d7a[_0x400ae7(0x320)]&&(console[_0x400ae7(0x28e)](_0x400ae7(0x339)+_0x2edfe4),console[_0x400ae7(0x28e)]('Output\x20directory:\x20'+_0x59b77d),_0x306395&&console[_0x400ae7(0x28e)](_0x400ae7(0x29b)+_0x306395));const _0x385f2d=await withSpinner(_0x400ae7(0x37a)+_0x2edfe4+_0x400ae7(0x28c),()=>_0x2d3cff['workflow'][_0x400ae7(0x21b)](_0x2edfe4,_0x59b77d,{'revision':_0x306395}),{'verbose':_0x572d7a[_0x400ae7(0x320)]}),_0x192080=_0x385f2d['data'];return console['error'](_0x400ae7(0x31d)+_0x192080[_0x400ae7(0x353)]),console[_0x400ae7(0x28e)](_0x400ae7(0x1f8)+_0x192080[_0x400ae7(0x307)]),console[_0x400ae7(0x28e)](_0x400ae7(0x2d6)+_0x192080[_0x400ae7(0x2f6)]),console[_0x400ae7(0x28e)](_0x400ae7(0x37b)+_0x59b77d+'/'+_0x192080[_0x400ae7(0x353)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a42_0x428ab2(0x209)]='workflow:upload';['description']='Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)';async['execute'](_0x54038e){const _0x35d7f8=a42_0x428ab2,{options:_0x35c90f,args:_0x1ee3b1,tdx:_0x5c5753}=_0x54038e;let _0x5bc0b2='.',_0x5ebc33=_0x35c90f['name'];if(_0x1ee3b1[0x0]){const {promises:_0x47c474}=await import('fs');try{const _0x4c9e73=await _0x47c474[_0x35d7f8(0x257)](_0x1ee3b1[0x0]);if(_0x4c9e73[_0x35d7f8(0x356)]())_0x5bc0b2=_0x1ee3b1[0x0];else return console[_0x35d7f8(0x28e)](_0x35d7f8(0x2b2)+_0x1ee3b1[0x0]+_0x35d7f8(0x272)),0x1;}catch{_0x5ebc33=_0x1ee3b1[0x0],_0x5bc0b2='.';}}const _0x1bbd34=_0x35c90f[_0x35d7f8(0x307)],_0x71f29a=_0x35c90f['skipValidation'];_0x35c90f[_0x35d7f8(0x320)]&&(console[_0x35d7f8(0x28e)]('Project\x20directory:\x20'+_0x5bc0b2),_0x5ebc33&&console[_0x35d7f8(0x28e)]('Project\x20name:\x20'+_0x5ebc33),_0x1bbd34&&console[_0x35d7f8(0x28e)]('Revision:\x20'+_0x1bbd34),_0x71f29a&&console[_0x35d7f8(0x28e)](_0x35d7f8(0x30c)));const _0x2d7224=await withSpinner(_0x35d7f8(0x2a4),()=>_0x5c5753[_0x35d7f8(0x2c9)][_0x35d7f8(0x23f)](_0x5bc0b2,{'projectName':_0x5ebc33,'revision':_0x1bbd34,'skipValidation':_0x71f29a}),{'verbose':_0x35c90f[_0x35d7f8(0x320)]}),_0x2f8f12=_0x2d7224[_0x35d7f8(0x35c)];return console[_0x35d7f8(0x28e)]('✔\x20Pushed\x20'+_0x2f8f12[_0x35d7f8(0x353)]),console[_0x35d7f8(0x28e)](_0x35d7f8(0x1f7)+_0x2f8f12[_0x35d7f8(0x290)]),console['error'](_0x35d7f8(0x1f8)+_0x2f8f12[_0x35d7f8(0x307)]),await this[_0x35d7f8(0x1e7)](_0x5c5753,_0x2f8f12[_0x35d7f8(0x353)],_0x35c90f['site']),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x33e);[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x305);async['execute'](_0xa3fd6d){const _0x3d89a6=a42_0x428ab2,{options:_0x23070a,args:_0x118f5a,tdx:_0x494a45}=_0xa3fd6d,_0x55a4a1=_0x118f5a[0x0],_0x28ee8a=_0x118f5a[0x1];if(!_0x55a4a1)return console[_0x3d89a6(0x28e)](a42_0xc4b429[_0x3d89a6(0x2ab)](_0x3d89a6(0x349)),_0x3d89a6(0x309)),console[_0x3d89a6(0x28e)](a42_0xc4b429[_0x3d89a6(0x33f)](_0x3d89a6(0x385))),0x1;const _0x405373=_0x23070a['revision'];_0x23070a[_0x3d89a6(0x320)]&&(console[_0x3d89a6(0x28e)]('Project:\x20'+_0x55a4a1),_0x28ee8a&&console[_0x3d89a6(0x28e)](_0x3d89a6(0x2e6)+_0x28ee8a),_0x405373&&console[_0x3d89a6(0x28e)](_0x3d89a6(0x29b)+_0x405373),_0x23070a['dryRun']&&console['error']('Dry\x20run:\x20yes'));const _0x141f9f=await withSpinner(_0x3d89a6(0x2ad)+_0x55a4a1+'...',()=>_0x494a45[_0x3d89a6(0x2c9)][_0x3d89a6(0x2fe)](_0x55a4a1,{'targetDir':_0x28ee8a,'revision':_0x405373}),{'verbose':_0x23070a[_0x3d89a6(0x320)]}),_0x9911b8=_0x141f9f[_0x3d89a6(0x35c)];_0x9911b8[_0x3d89a6(0x25b)]?console[_0x3d89a6(0x28e)](_0x3d89a6(0x319)+_0x9911b8[_0x3d89a6(0x353)]):console[_0x3d89a6(0x28e)](_0x3d89a6(0x22e)+_0x9911b8[_0x3d89a6(0x353)]);console[_0x3d89a6(0x28e)]('\x20\x20Revision:\x20'+_0x9911b8[_0x3d89a6(0x307)]),console[_0x3d89a6(0x28e)](_0x3d89a6(0x33c)+(a42_0x45a691[_0x3d89a6(0x367)](process[_0x3d89a6(0x2db)](),_0x9911b8['targetDir'])||'.')),console[_0x3d89a6(0x28e)](_0x3d89a6(0x22a)+a42_0xc4b429[_0x3d89a6(0x1e6)]('+'+_0x9911b8['summary'][_0x3d89a6(0x285)]+_0x3d89a6(0x252))+',\x20'+(a42_0xc4b429[_0x3d89a6(0x29c)]('~'+_0x9911b8['summary'][_0x3d89a6(0x22d)]+_0x3d89a6(0x1e5))+',\x20')+(a42_0xc4b429['red']('-'+_0x9911b8['summary']['deleted']+_0x3d89a6(0x314))+',\x20')+(''+a42_0xc4b429[_0x3d89a6(0x33f)](_0x9911b8[_0x3d89a6(0x344)][_0x3d89a6(0x326)]+_0x3d89a6(0x249))));for(const _0x2a97d9 of _0x9911b8[_0x3d89a6(0x2b6)]){_0x2a97d9[_0x3d89a6(0x244)]===_0x3d89a6(0x22d)&&_0x2a97d9[_0x3d89a6(0x22c)]&&(console[_0x3d89a6(0x28e)]('\x0a'+a42_0xc4b429[_0x3d89a6(0x31b)]('---\x20'+_0x2a97d9[_0x3d89a6(0x287)])),console[_0x3d89a6(0x28e)](_0x2a97d9[_0x3d89a6(0x22c)]));}if(!_0x9911b8['hasChanges'])return saveSessionContext({'workflow_project':_0x9911b8[_0x3d89a6(0x353)]},_0x23070a['session']),console['error'](a42_0xc4b429['green'](_0x3d89a6(0x2df))),console[_0x3d89a6(0x28e)](a42_0xc4b429['dim'](_0x3d89a6(0x222)+_0x9911b8[_0x3d89a6(0x353)])),0x0;if(_0x23070a[_0x3d89a6(0x1fd)])return console[_0x3d89a6(0x28e)](a42_0xc4b429[_0x3d89a6(0x29c)](_0x3d89a6(0x312))),0x0;if(!_0x23070a['yes']){if(!isInteractive())return console[_0x3d89a6(0x28e)](a42_0xc4b429[_0x3d89a6(0x2ab)](_0x3d89a6(0x365)),_0x3d89a6(0x306)),console[_0x3d89a6(0x28e)](a42_0xc4b429[_0x3d89a6(0x33f)](_0x3d89a6(0x2a3))),0x1;const _0x1077bd=await confirmKey(_0x3d89a6(0x37f));if(!_0x1077bd)return console[_0x3d89a6(0x28e)](a42_0xc4b429[_0x3d89a6(0x29c)](_0x3d89a6(0x2e3)),_0x3d89a6(0x387)),0x1;}await withSpinner(_0x3d89a6(0x2d8),()=>_0x494a45['workflow'][_0x3d89a6(0x1ed)](_0x9911b8,{'revision':_0x405373}),{'verbose':_0x23070a[_0x3d89a6(0x320)]}),saveSessionContext({'workflow_project':_0x9911b8[_0x3d89a6(0x353)]},_0x23070a['session']),console[_0x3d89a6(0x28e)](a42_0xc4b429[_0x3d89a6(0x1e6)]('✔\x20Pull\x20complete'));const _0x3a9af4=a42_0x45a691[_0x3d89a6(0x367)](process[_0x3d89a6(0x2db)](),_0x9911b8[_0x3d89a6(0x245)])||'.';return console[_0x3d89a6(0x28e)](a42_0xc4b429['dim'](_0x3d89a6(0x37b)+_0x3a9af4)),console[_0x3d89a6(0x28e)](a42_0xc4b429[_0x3d89a6(0x33f)](_0x3d89a6(0x222)+_0x9911b8[_0x3d89a6(0x353)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{['name']=a42_0x428ab2(0x354);['description']=a42_0x428ab2(0x269);async[a42_0x428ab2(0x2a1)](_0x443e1b){const _0x141a71=a42_0x428ab2,{options:_0x45eb1d,args:_0x14142e,tdx:_0x2b04ad}=_0x443e1b,_0x4d7398=this[_0x141a71(0x345)](_0x14142e,_0x45eb1d),_0x43ea9f=_0x45eb1d[_0x141a71(0x307)],_0x47ceaa=_0x45eb1d['skipValidation'];_0x45eb1d[_0x141a71(0x320)]&&(_0x4d7398&&console[_0x141a71(0x28e)]('Source\x20directory:\x20'+_0x4d7398),_0x43ea9f&&console[_0x141a71(0x28e)](_0x141a71(0x29b)+_0x43ea9f),_0x45eb1d[_0x141a71(0x1fd)]&&console[_0x141a71(0x28e)](_0x141a71(0x36e)),_0x47ceaa&&console[_0x141a71(0x28e)](_0x141a71(0x30c)));let _0x148e1a;try{_0x148e1a=await withSpinner(_0x141a71(0x34b),()=>_0x2b04ad['workflow'][_0x141a71(0x292)]({'sourceDir':_0x4d7398,'revision':_0x43ea9f,'skipValidation':_0x47ceaa}),{'verbose':_0x45eb1d[_0x141a71(0x320)]});}catch(_0x4f8cd4){if(_0x4f8cd4 instanceof Error&&_0x4f8cd4['message'][_0x141a71(0x21c)](_0x141a71(0x2da)))return console[_0x141a71(0x28e)](a42_0xc4b429[_0x141a71(0x2ab)](_0x141a71(0x349)),_0x141a71(0x237)),_0x45eb1d[_0x141a71(0x361)]?console['error'](a42_0xc4b429[_0x141a71(0x33f)](_0x141a71(0x35b)+_0x45eb1d['workflowProject']+_0x141a71(0x389)+_0x45eb1d[_0x141a71(0x361)]+'\x27')):console[_0x141a71(0x28e)](a42_0xc4b429[_0x141a71(0x33f)](_0x141a71(0x352))),0x1;throw _0x4f8cd4;}const _0x19a403=_0x148e1a[_0x141a71(0x35c)];console[_0x141a71(0x28e)](_0x141a71(0x372)+_0x19a403[_0x141a71(0x353)]),console[_0x141a71(0x28e)](_0x141a71(0x315)+_0x19a403[_0x141a71(0x31c)]),console['error'](_0x141a71(0x1f8)+_0x19a403['revision']),console[_0x141a71(0x28e)]('\x20\x20Changes:\x20'+a42_0xc4b429[_0x141a71(0x1e6)]('+'+_0x19a403[_0x141a71(0x344)][_0x141a71(0x285)]+_0x141a71(0x252))+',\x20'+(a42_0xc4b429[_0x141a71(0x29c)]('~'+_0x19a403['summary'][_0x141a71(0x22d)]+_0x141a71(0x1e5))+',\x20')+(a42_0xc4b429[_0x141a71(0x2ab)]('-'+_0x19a403['summary']['deleted']+_0x141a71(0x314))+',\x20')+(''+a42_0xc4b429[_0x141a71(0x33f)](_0x19a403['summary']['unchanged']+'\x20unchanged')));for(const _0x1e1f59 of _0x19a403[_0x141a71(0x2b6)]){_0x1e1f59[_0x141a71(0x244)]===_0x141a71(0x22d)&&_0x1e1f59[_0x141a71(0x22c)]&&(console['error']('\x0a'+a42_0xc4b429[_0x141a71(0x31b)](_0x141a71(0x235)+_0x1e1f59[_0x141a71(0x287)])),console[_0x141a71(0x28e)](_0x1e1f59[_0x141a71(0x22c)]));}if(!_0x19a403['hasChanges'])return console['error'](a42_0xc4b429[_0x141a71(0x1e6)](_0x141a71(0x36a))),await this['showWorkflowConsoleUrl'](_0x2b04ad,_0x19a403['projectName'],_0x45eb1d['site']),0x0;if(_0x45eb1d[_0x141a71(0x1fd)])return console[_0x141a71(0x28e)](a42_0xc4b429[_0x141a71(0x29c)](_0x141a71(0x2c4))),0x0;if(!_0x45eb1d[_0x141a71(0x36d)]){if(!isInteractive())return console[_0x141a71(0x28e)](a42_0xc4b429['red'](_0x141a71(0x365)),_0x141a71(0x306)),console[_0x141a71(0x28e)](a42_0xc4b429[_0x141a71(0x33f)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4014e2=await confirmKey(_0x141a71(0x38c));if(!_0x4014e2)return console[_0x141a71(0x28e)](a42_0xc4b429[_0x141a71(0x29c)](_0x141a71(0x2e3)),_0x141a71(0x23d)),0x1;}const _0x11409f=await withSpinner(_0x141a71(0x2cb),()=>_0x2b04ad[_0x141a71(0x2c9)][_0x141a71(0x225)](_0x19a403),{'verbose':_0x45eb1d['verbose']}),_0x40324c=_0x11409f[_0x141a71(0x35c)];return console[_0x141a71(0x28e)](a42_0xc4b429[_0x141a71(0x1e6)](_0x141a71(0x2af))),console[_0x141a71(0x28e)](_0x141a71(0x1f7)+_0x40324c[_0x141a71(0x290)]),console[_0x141a71(0x28e)](_0x141a71(0x1f8)+_0x40324c[_0x141a71(0x307)]),await this[_0x141a71(0x1e7)](_0x2b04ad,_0x40324c[_0x141a71(0x353)],_0x45eb1d['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x428ab2(0x209)]='workflow:clone';[a42_0x428ab2(0x38d)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async['execute'](_0x104a16){const _0x533f3e=a42_0x428ab2,{options:_0x86a0be,args:_0x5ec366,tdx:_0x22f658}=_0x104a16,_0x54f69e=this[_0x533f3e(0x345)](_0x5ec366,_0x86a0be),_0x42edbc=_0x86a0be[_0x533f3e(0x209)],_0x644f23=_0x86a0be[_0x533f3e(0x307)],_0x1356bb=_0x86a0be[_0x533f3e(0x301)];if(!_0x54f69e)return console[_0x533f3e(0x28e)](a42_0xc4b429[_0x533f3e(0x2ab)](_0x533f3e(0x349)),_0x533f3e(0x212)),console['error'](a42_0xc4b429[_0x533f3e(0x33f)](_0x533f3e(0x20c))),console[_0x533f3e(0x28e)](a42_0xc4b429[_0x533f3e(0x33f)](_0x533f3e(0x36b))),0x1;if(!_0x42edbc)return console[_0x533f3e(0x28e)](a42_0xc4b429['red'](_0x533f3e(0x349)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0x533f3e(0x28e)](a42_0xc4b429['dim'](_0x533f3e(0x20c))),0x1;_0x86a0be[_0x533f3e(0x320)]&&(console[_0x533f3e(0x28e)]('Source\x20directory:\x20'+_0x54f69e),console[_0x533f3e(0x28e)](_0x533f3e(0x273)+_0x42edbc),_0x644f23&&console[_0x533f3e(0x28e)](_0x533f3e(0x29b)+_0x644f23),_0x86a0be['dryRun']&&console[_0x533f3e(0x28e)]('Dry\x20run:\x20yes'),_0x1356bb&&console[_0x533f3e(0x28e)](_0x533f3e(0x30c)));const _0x6d1500=await withSpinner('Analyzing\x20project...',()=>_0x22f658[_0x533f3e(0x2c9)]['prepareCloneProject'](_0x54f69e,_0x42edbc,{'revision':_0x644f23,'skipValidation':_0x1356bb}),{'verbose':_0x86a0be[_0x533f3e(0x320)]}),_0x212d3b=_0x6d1500[_0x533f3e(0x35c)];console['error'](_0x533f3e(0x266)+_0x212d3b['sourceDir']);_0x212d3b[_0x533f3e(0x362)]&&console['error']('Source\x20project:\x20'+_0x212d3b[_0x533f3e(0x362)]);console[_0x533f3e(0x28e)](_0x533f3e(0x273)+_0x212d3b[_0x533f3e(0x2f2)]),console[_0x533f3e(0x28e)]('Revision:\x20'+_0x212d3b['revision']),console[_0x533f3e(0x28e)](_0x533f3e(0x1e9)+_0x212d3b['fileCount']);_0x212d3b[_0x533f3e(0x373)]&&(console[_0x533f3e(0x28e)](a42_0xc4b429[_0x533f3e(0x29c)]('\x0a⚠\x20Project\x20\x22'+_0x212d3b[_0x533f3e(0x2f2)]+_0x533f3e(0x2fa)+_0x212d3b[_0x533f3e(0x383)]+')')),console[_0x533f3e(0x28e)](a42_0xc4b429[_0x533f3e(0x29c)]('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x86a0be[_0x533f3e(0x1fd)])return console['error'](a42_0xc4b429[_0x533f3e(0x29c)]('\x0aDry\x20run\x20-\x20no\x20project\x20created')),0x0;if(!_0x86a0be[_0x533f3e(0x36d)]){if(!isInteractive())return console[_0x533f3e(0x28e)](a42_0xc4b429[_0x533f3e(0x2ab)](_0x533f3e(0x365)),_0x533f3e(0x306)),console['error'](a42_0xc4b429[_0x533f3e(0x33f)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x183905=_0x212d3b[_0x533f3e(0x362)]||a42_0x45a691[_0x533f3e(0x1fa)](_0x54f69e),_0x2ab443=_0x212d3b['targetExists']?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x42edbc+'\x22\x20with\x20new\x20revision?':_0x533f3e(0x25f)+_0x183905+_0x533f3e(0x334)+_0x42edbc+'\x22?',_0x14553a=await confirmKey(_0x2ab443);if(!_0x14553a)return console[_0x533f3e(0x28e)](a42_0xc4b429[_0x533f3e(0x29c)]('Cancelled')),0x1;}const _0x29049d=await withSpinner(_0x212d3b[_0x533f3e(0x373)]?_0x533f3e(0x2be)+_0x42edbc+'...':_0x533f3e(0x2a5)+_0x42edbc+_0x533f3e(0x28c),()=>_0x22f658[_0x533f3e(0x2c9)][_0x533f3e(0x288)](_0x212d3b),{'verbose':_0x86a0be['verbose']}),_0x3a965c=_0x29049d[_0x533f3e(0x35c)];return console[_0x533f3e(0x28e)](a42_0xc4b429[_0x533f3e(0x1e6)](_0x212d3b[_0x533f3e(0x373)]?_0x533f3e(0x262):_0x533f3e(0x238))),console[_0x533f3e(0x28e)](_0x533f3e(0x274)+_0x3a965c[_0x533f3e(0x2f2)]),console['error'](_0x533f3e(0x1f7)+_0x3a965c[_0x533f3e(0x2bf)]),console[_0x533f3e(0x28e)](_0x533f3e(0x1f8)+_0x3a965c[_0x533f3e(0x307)]),await this['showWorkflowConsoleUrl'](_0x22f658,_0x3a965c[_0x533f3e(0x2f2)],_0x86a0be[_0x533f3e(0x34c)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x26b);[a42_0x428ab2(0x38d)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x1bc1cc){const _0x32078f=a42_0x428ab2,{options:_0x478135,args:_0x33d509,tdx:_0x8a94fe}=_0x1bc1cc,_0x5e2e5b=_0x33d509[0x0];if(!_0x5e2e5b)return console[_0x32078f(0x28e)](_0x32078f(0x33b)),console[_0x32078f(0x28e)](_0x32078f(0x2ff)),0x1;_0x478135[_0x32078f(0x320)]&&console[_0x32078f(0x28e)](_0x32078f(0x339)+_0x5e2e5b);if(!_0x478135[_0x32078f(0x36d)]){if(!isInteractive())return console[_0x32078f(0x28e)](a42_0xc4b429[_0x32078f(0x2ab)](_0x32078f(0x365)),_0x32078f(0x306)),console['error'](a42_0xc4b429[_0x32078f(0x33f)](_0x32078f(0x2a3))),0x1;const _0xa9b549=await confirmKey(_0x32078f(0x200)+_0x5e2e5b+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0xa9b549)return console[_0x32078f(0x28e)](a42_0xc4b429[_0x32078f(0x29c)](_0x32078f(0x2e3))),0x1;}const _0x2b425e=await withSpinner(_0x32078f(0x293)+_0x5e2e5b+_0x32078f(0x28c),()=>_0x8a94fe['workflow'][_0x32078f(0x291)](_0x5e2e5b),{'verbose':_0x478135[_0x32078f(0x320)]}),_0x3c2f2b=_0x2b425e[_0x32078f(0x35c)];return console[_0x32078f(0x28e)]('✔\x20Deleted\x20project\x20'+_0x3c2f2b[_0x32078f(0x353)]),console[_0x32078f(0x28e)](_0x32078f(0x1f7)+_0x3c2f2b[_0x32078f(0x290)]),0x0;}}export function parseKeyValue(_0x56863c){const _0x583a9f=a42_0x428ab2,_0x23fa71=_0x56863c[_0x583a9f(0x283)]('=');if(_0x23fa71===-0x1)throw new Error(_0x583a9f(0x281)+_0x56863c+_0x583a9f(0x369));const _0x224dfd=_0x56863c[_0x583a9f(0x25c)](0x0,_0x23fa71),_0x2d1ee6=_0x56863c[_0x583a9f(0x25c)](_0x23fa71+0x1);if(!_0x224dfd)throw new Error(_0x583a9f(0x261));return{'key':_0x224dfd,'value':_0x2d1ee6};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x428ab2(0x209)]='workflow:secrets:list';[a42_0x428ab2(0x38d)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0x428ab2(0x2a1)](_0x457fb3){const _0x490ff3=a42_0x428ab2,{options:_0x2998c5,args:_0x4f3b70,tdx:_0x1513c6}=_0x457fb3,_0x244087=this['requireProject'](_0x4f3b70,_0x2998c5);if(!_0x244087)return 0x1;_0x2998c5[_0x490ff3(0x320)]&&console[_0x490ff3(0x28e)]('Project:\x20'+_0x244087);const _0x228c8e=await withSpinner(_0x490ff3(0x364),()=>_0x1513c6[_0x490ff3(0x2c9)][_0x490ff3(0x2eb)](_0x244087),{'verbose':_0x2998c5['verbose']}),{secrets:_0x4f63ed}=_0x228c8e['data'];return console['error'](_0x490ff3(0x35e)+_0x4f63ed[_0x490ff3(0x2f0)]+'\x20secret'+(_0x4f63ed['length']!==0x1?'s':'')),await handleSDKOutput(_0x4f63ed,_0x2998c5),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a42_0x428ab2(0x22b);[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x374);async['execute'](_0x5463ed){const _0x3b8720=a42_0x428ab2,{options:_0x2a2319,args:_0xebaa97,tdx:_0x3781f3}=_0x5463ed;let _0x57b2ee,_0x191bda;if(_0xebaa97[_0x3b8720(0x2f0)]>=0x2)_0x57b2ee=_0xebaa97[0x0],_0x191bda=_0xebaa97[0x1];else{if(_0xebaa97[_0x3b8720(0x2f0)]===0x1&&_0x2a2319[_0x3b8720(0x361)])_0x57b2ee=_0x2a2319[_0x3b8720(0x361)],_0x191bda=_0xebaa97[0x0];else return _0xebaa97[_0x3b8720(0x2f0)]===0x1?(console[_0x3b8720(0x28e)](_0x3b8720(0x31a)),console[_0x3b8720(0x28e)](_0x3b8720(0x230)),0x1):(console[_0x3b8720(0x28e)](_0x3b8720(0x371)),console['error'](_0x3b8720(0x1f6)),0x1);}let _0x143296,_0x8f5c53;try{({key:_0x143296,value:_0x8f5c53}=parseKeyValue(_0x191bda));}catch(_0x47ffa5){return _0x47ffa5 instanceof Error&&console[_0x3b8720(0x28e)](a42_0xc4b429['red']('Error:'),_0x47ffa5[_0x3b8720(0x20b)]),0x1;}_0x2a2319[_0x3b8720(0x320)]&&(console[_0x3b8720(0x28e)](_0x3b8720(0x339)+_0x57b2ee),console[_0x3b8720(0x28e)]('Key:\x20'+_0x143296));const _0x33e6b7=await withSpinner('Setting\x20secret...',()=>_0x3781f3[_0x3b8720(0x2c9)][_0x3b8720(0x1f1)](_0x57b2ee,_0x143296,_0x8f5c53),{'verbose':_0x2a2319[_0x3b8720(0x320)]}),_0x30920f=_0x33e6b7['data'];return console[_0x3b8720(0x28e)](_0x3b8720(0x2c1)+_0x30920f[_0x3b8720(0x263)]+_0x3b8720(0x300)+_0x30920f[_0x3b8720(0x353)]+'\x27'),(_0x2a2319['json']||_0x2a2319[_0x3b8720(0x236)])&&await handleSingleObjectOutput(_0x30920f,_0x2a2319),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x428ab2(0x209)]=a42_0x428ab2(0x33a);[a42_0x428ab2(0x38d)]='Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project';async['execute'](_0x50dc6b){const _0x19344b=a42_0x428ab2,{options:_0x260d39,args:_0x34090f,tdx:_0x1f9126}=_0x50dc6b;let _0x2b196a,_0xa5181d;if(_0x34090f[_0x19344b(0x2f0)]>=0x2)_0x2b196a=_0x34090f[0x0],_0xa5181d=_0x34090f[0x1];else{if(_0x34090f[_0x19344b(0x2f0)]===0x1&&_0x260d39['workflowProject'])_0x2b196a=_0x260d39[_0x19344b(0x361)],_0xa5181d=_0x34090f[0x0];else return _0x34090f[_0x19344b(0x2f0)]===0x1?(console['error'](_0x19344b(0x31a)),console[_0x19344b(0x28e)](_0x19344b(0x230)),0x1):(console[_0x19344b(0x28e)](_0x19344b(0x229)),console['error'](_0x19344b(0x2bb)),0x1);}_0x260d39[_0x19344b(0x320)]&&(console[_0x19344b(0x28e)](_0x19344b(0x339)+_0x2b196a),console[_0x19344b(0x28e)]('Key:\x20'+_0xa5181d));if(!_0x260d39[_0x19344b(0x36d)]){if(!isInteractive())return console[_0x19344b(0x28e)](a42_0xc4b429[_0x19344b(0x2ab)](_0x19344b(0x365)),_0x19344b(0x306)),console[_0x19344b(0x28e)](a42_0xc4b429[_0x19344b(0x33f)](_0x19344b(0x2a3))),0x1;const _0x4ff7e2=await confirmKey(_0x19344b(0x2cd)+_0xa5181d+_0x19344b(0x321)+_0x2b196a+'\x27?');if(!_0x4ff7e2)return console[_0x19344b(0x28e)](a42_0xc4b429[_0x19344b(0x29c)](_0x19344b(0x2e3))),0x1;}const _0x29fa37=await withSpinner(_0x19344b(0x241),()=>_0x1f9126[_0x19344b(0x2c9)][_0x19344b(0x30b)](_0x2b196a,_0xa5181d),{'verbose':_0x260d39[_0x19344b(0x320)]}),_0x30441c=_0x29fa37[_0x19344b(0x35c)];return console[_0x19344b(0x28e)](_0x19344b(0x2c1)+_0x30441c[_0x19344b(0x263)]+_0x19344b(0x31e)+_0x30441c['projectName']+'\x27'),(_0x260d39[_0x19344b(0x250)]||_0x260d39[_0x19344b(0x236)])&&await handleSingleObjectOutput(_0x30441c,_0x260d39),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(_0x14a4be){const _0xd70d57=a42_0x428ab2,_0x4f21db=Math['floor'](_0x14a4be/0x3e8),_0x51aba3=Math[_0xd70d57(0x33d)](_0x4f21db/0x3c),_0x1fc9bd=Math['floor'](_0x51aba3/0x3c),_0x3492e7=Math[_0xd70d57(0x33d)](_0x1fc9bd/0x18);if(_0x3492e7>0x0){const _0x3935bc=_0x1fc9bd%0x18;return _0x3935bc>0x0?_0x3492e7+'d\x20'+_0x3935bc+'h':_0x3492e7+'d';}else{if(_0x1fc9bd>0x0){const _0x5e094d=_0x51aba3%0x3c;return _0x5e094d>0x0?_0x1fc9bd+'h\x20'+_0x5e094d+'m':_0x1fc9bd+'h';}else{if(_0x51aba3>0x0){const _0x1d886c=_0x4f21db%0x3c;return _0x1d886c>0x0?_0x51aba3+'m\x20'+_0x1d886c+'s':_0x51aba3+'m';}else return _0x4f21db+'s';}}}function formatTimestamp(_0x1a6311,_0x3e5b5a){const _0x196deb=a42_0x428ab2,_0x273e07=new Date(_0x1a6311),_0x440004=String(_0x273e07[_0x196deb(0x30e)]())[_0x196deb(0x2ca)](0x2,'0'),_0x561bcc=String(_0x273e07[_0x196deb(0x1e8)]())[_0x196deb(0x2ca)](0x2,'0'),_0x46660c=_0x440004+':'+_0x561bcc,_0x370c6d=_0x273e07[_0x196deb(0x251)]()===_0x3e5b5a[_0x196deb(0x251)]()&&_0x273e07[_0x196deb(0x2f7)]()===_0x3e5b5a['getMonth']()&&_0x273e07[_0x196deb(0x221)]()===_0x3e5b5a[_0x196deb(0x221)]();if(_0x370c6d)return _0x46660c;else{const _0x23b196=String(_0x273e07[_0x196deb(0x2f7)]()+0x1)[_0x196deb(0x2ca)](0x2,'0'),_0x57f3a4=String(_0x273e07[_0x196deb(0x221)]())[_0x196deb(0x2ca)](0x2,'0');return _0x23b196+'-'+_0x57f3a4+'\x20'+_0x46660c;}}function formatDate(_0x4ed424){const _0x1a8544=a42_0x428ab2,_0x43ec5a=_0x4ed424[_0x1a8544(0x251)](),_0x142535=String(_0x4ed424[_0x1a8544(0x2f7)]()+0x1)['padStart'](0x2,'0'),_0x5a59e4=String(_0x4ed424[_0x1a8544(0x221)]())[_0x1a8544(0x2ca)](0x2,'0');return _0x43ec5a+'-'+_0x142535+'-'+_0x5a59e4;}function getTaskStateIcon(_0x54c472){const _0x1c420f={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x1c420f[_0x54c472]||'⚪';}function getBarChar(_0x432fba){const _0x55b193=a42_0x428ab2;return _0x432fba===_0x55b193(0x28e)||_0x432fba==='group_error'?'×':'─';}function getBarColor(_0x2a3a87){const _0x57dd51=a42_0x428ab2,_0x2e9d9d={'success':a42_0xc4b429['green'],'error':a42_0xc4b429[_0x57dd51(0x2ab)],'group_error':a42_0xc4b429[_0x57dd51(0x2ab)],'running':a42_0xc4b429[_0x57dd51(0x2b5)],'blocked':a42_0xc4b429[_0x57dd51(0x29c)],'planned':a42_0xc4b429[_0x57dd51(0x33f)],'canceling':a42_0xc4b429[_0x57dd51(0x29c)]};return _0x2e9d9d[_0x2a3a87]||a42_0xc4b429['white'];}function parseTaskName(_0x25dcd9){const _0xbfeafa=a42_0x428ab2;let _0x57099f=_0x25dcd9[_0xbfeafa(0x2b3)](/^\++/,'');const _0x3420ae=_0x57099f[_0xbfeafa(0x20f)]('+'),_0x21d596=_0x3420ae[_0xbfeafa(0x2f0)]>0x1?_0x3420ae['length']-0x2:0x0,_0x3b30d4=_0x3420ae[_0x3420ae['length']-0x1]||_0x57099f;return{'level':_0x21d596,'name':'+'+_0x3b30d4};}function truncateTaskName(_0x33a74b,_0x405f94){const _0x29b9c9=a42_0x428ab2,_0x1d36a3=stringWidth(_0x33a74b);if(_0x1d36a3<=_0x405f94)return _0x33a74b;let _0xcef776=_0x33a74b;while(stringWidth(_0xcef776+'…')>_0x405f94&&_0xcef776[_0x29b9c9(0x2f0)]>0x0){_0xcef776=_0xcef776[_0x29b9c9(0x24b)](0x0,-0x1);}return _0xcef776+'…';}function calculateTimeScale(_0xcfc623,_0x231cbd){const _0x4aa5a8=a42_0x428ab2;return{'startTime':_0xcfc623[_0x4aa5a8(0x337)],'endTime':_0xcfc623[_0x4aa5a8(0x239)],'durationMs':_0xcfc623['duration'],'msPerChar':_0xcfc623[_0x4aa5a8(0x2e0)]/_0x231cbd};}function timeToPosition(_0x451f21,_0x26f7e2,_0x19a6a0){const _0x5eeecd=a42_0x428ab2,_0x141d50=_0x451f21-_0x26f7e2['startTime'],_0x38872a=Math[_0x5eeecd(0x33d)](_0x141d50/_0x26f7e2['msPerChar']);return Math[_0x5eeecd(0x29f)](0x0,Math[_0x5eeecd(0x1fe)](_0x38872a,_0x19a6a0));}function renderTimeAxis(_0x32edc0,_0x4b0240){const _0x599b5f=a42_0x428ab2,_0x3b2335=Math[_0x599b5f(0x1fe)](TIMELINE_CONFIG[_0x599b5f(0x37c)],Math[_0x599b5f(0x29f)](TIMELINE_CONFIG[_0x599b5f(0x1eb)],Math[_0x599b5f(0x33d)](_0x4b0240/TIMELINE_CONFIG[_0x599b5f(0x37d)]))),_0x5e9138=_0x32edc0[_0x599b5f(0x34e)]/(_0x3b2335-0x1),_0x23da53=new Date(_0x32edc0[_0x599b5f(0x226)]),_0x2ac304=[];for(let _0x3d4186=0x0;_0x3d4186<_0x3b2335;_0x3d4186++){const _0x595025=_0x32edc0['startTime']+_0x3d4186*_0x5e9138,_0x398cbd=timeToPosition(_0x595025,_0x32edc0,_0x4b0240),_0x4bb89b=formatTimestamp(_0x595025,_0x23da53);_0x2ac304[_0x599b5f(0x23f)]({'pos':_0x398cbd,'text':_0x4bb89b});}const _0x144771=new Array(_0x4b0240)['fill']('\x20');let _0x49fb08=-0x1;for(const {pos:_0x4d41e1,text:_0x1c7dc4}of _0x2ac304){let _0x5b05a4=Math[_0x599b5f(0x29f)](0x0,_0x4d41e1-Math['floor'](_0x1c7dc4[_0x599b5f(0x2f0)]/0x2));_0x5b05a4<=_0x49fb08+TIMELINE_CONFIG[_0x599b5f(0x34f)]&&(_0x5b05a4=_0x49fb08+TIMELINE_CONFIG[_0x599b5f(0x34f)]+0x1);_0x5b05a4+_0x1c7dc4[_0x599b5f(0x2f0)]>_0x4b0240&&(_0x5b05a4=_0x4b0240-_0x1c7dc4['length']);if(_0x5b05a4>=0x0&&_0x5b05a4+_0x1c7dc4[_0x599b5f(0x2f0)]<=_0x4b0240&&_0x5b05a4>_0x49fb08){for(let _0x177fb5=0x0;_0x177fb5<_0x1c7dc4[_0x599b5f(0x2f0)];_0x177fb5++){_0x144771[_0x5b05a4+_0x177fb5]=_0x1c7dc4[_0x177fb5];}_0x49fb08=_0x5b05a4+_0x1c7dc4[_0x599b5f(0x2f0)]-0x1;}}return _0x144771[_0x599b5f(0x275)]('');}function a42_0xf21f(_0x1865e4,_0x4d8980){_0x1865e4=_0x1865e4-0x1e3;const _0x3aa625=a42_0x3aa6();let _0xf21f0f=_0x3aa625[_0x1865e4];return _0xf21f0f;}function renderTaskRow(_0x1b6253,_0x244483,_0x38f64e,_0x282779){const _0x58a895=a42_0x428ab2,{level:_0x11e4a3,name:_0x136c17}=parseTaskName(_0x1b6253[_0x58a895(0x209)]),_0x3c0ade='\x20'[_0x58a895(0x304)](_0x11e4a3),_0x55a5cb=_0x1b6253[_0x58a895(0x384)]?'('+formatElapsed(_0x1b6253['window'][_0x58a895(0x2e0)])+')':'',_0x42942c=stringWidth(_0x55a5cb),_0x23e395=_0x11e4a3*0x1,_0x15e7f7=_0x282779-_0x23e395-_0x42942c-0x1,_0x4a1f3f=truncateTaskName(_0x136c17,_0x15e7f7),_0x5724ea=_0x3c0ade+_0x4a1f3f,_0x59870f=stringWidth(_0x5724ea),_0x25ec59=_0x282779-_0x59870f-_0x42942c,_0x18fb9d=_0x5724ea+'\x20'[_0x58a895(0x304)](Math[_0x58a895(0x29f)](0x1,_0x25ec59))+a42_0xc4b429[_0x58a895(0x33f)](_0x55a5cb),_0x26e549=getTaskStateIcon(_0x1b6253[_0x58a895(0x206)]),_0x5481f9=new Array(_0x38f64e)[_0x58a895(0x32d)]('\x20');if(_0x1b6253[_0x58a895(0x384)]){const _0x18072c=timeToPosition(_0x1b6253[_0x58a895(0x384)]['start'],_0x244483,_0x38f64e),_0x219d45=timeToPosition(_0x1b6253[_0x58a895(0x384)][_0x58a895(0x239)],_0x244483,_0x38f64e),_0x59899c=getBarChar(_0x1b6253[_0x58a895(0x206)]),_0x216f1f=Math['max'](_0x18072c+0x1,_0x219d45);for(let _0x545214=_0x18072c;_0x545214<Math[_0x58a895(0x1fe)](_0x216f1f,_0x38f64e);_0x545214++){_0x5481f9[_0x545214]=_0x59899c;}}const _0xf3168f=getBarColor(_0x1b6253[_0x58a895(0x206)]),_0x134cc1=_0x5481f9[_0x58a895(0x376)](_0x1b5e37=>_0x1b5e37==='\x20'?'\x20':_0xf3168f(_0x1b5e37))['join']('');return _0x26e549+'\x20'+_0x18fb9d+'│'+_0x134cc1+'│';}function calculateStats(_0xbccc03){const _0x2bb2b6=a42_0x428ab2,_0x27f190={'total':_0xbccc03[_0x2bb2b6(0x2f0)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x3c1d7e of _0xbccc03){if(_0x3c1d7e[_0x2bb2b6(0x206)]===_0x2bb2b6(0x32b))_0x27f190['success']++;else{if(_0x3c1d7e['state']===_0x2bb2b6(0x28e)||_0x3c1d7e[_0x2bb2b6(0x206)]===_0x2bb2b6(0x30a))_0x27f190[_0x2bb2b6(0x28e)]++;else _0x3c1d7e[_0x2bb2b6(0x206)]===_0x2bb2b6(0x227)?_0x27f190[_0x2bb2b6(0x227)]++:_0x27f190['pending']++;}}return _0x27f190;}function a42_0x3aa6(){const _0x20d207=['showWorkflowConsoleUrl','getMinutes','Files\x20to\x20upload:\x20','force','MIN_LABEL_COUNT','Getting\x20attempt\x20details...','applyPullProject','keys','\x20\x20Session\x20ID:\x20','session_id','setSecret','sort','retryAttemptName','output','/sessions/','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','\x20\x20Project\x20ID:\x20','\x20\x20Revision:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','basename','fromTask','kill','dryRun','min','logFiles','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Listing\x20workflow\x20projects...','Listing\x20workflow\x20sessions...','unknown','state','📁\x20','84fUWZdN','name','From\x20task:\x20','message','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','tdx\x20wf\x20attempt\x20','split','total','\x20-\x20','Source\x20directory\x20is\x20required','\x20\x20Workflow:\x20','workflow:download','\x20\x20tdx\x20wf\x20use\x20<project>','2bfqgWh','reason','includeRetried','renderSingleTimeline','11300598vmgtBU','download','includes','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','POLL_INTERVAL_MS','4151427jtBhBO','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','getDate','\x20\x20Session\x20context\x20set\x20to:\x20','logs','(use\x20--limit\x20to\x20see\x20more)','executePushProject','startTime','running','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Error:\x20Secret\x20key\x20is\x20required','\x20\x20Changes:\x20','workflow:secrets:set','diff','modified','→\x20Project:\x20','now','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','utf-8','toLowerCase','Parameters:\x20','values','---\x20','jsonl','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','✔\x20Clone\x20complete','end','resolveProjectId','No\x20workflows\x20found\x20in\x20project:\x20','⚠\x20Showing\x20first\x20','-\x20nothing\x20pushed','index','push','Retrying\x20session...','Deleting\x20secret...','\x20from\x20session\x20','Listing\x20workflows...','type','targetDir','table','Filter:\x20project=','workflow:workflows','\x20unchanged','Loading\x20sessions...','slice','done','metadata','Task\x20name:\x20','261gJlMgY','json','getFullYear','\x20new','sys','has','✔\x20Showing\x20','write','stat','isTTY','Loading\x20session...','attemptId','isNewProject','substring','💡\x20Tip:\x20Use\x20','tdx.json','\x0aClone\x20\x22','No\x20workflow\x20projects\x20found','Key\x20cannot\x20be\x20empty','✔\x20Project\x20updated','key','all','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Source:\x20','includeSubtasks','stdout','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','(unknown)','workflow:delete','workflows','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','/attempt/','renderTimeline','\x20(use\x20--limit\x20to\x20show\x20more)','parse','\x20is\x20not\x20a\x20directory','New\x20project\x20name:\x20','\x20\x20Project:\x20','join','\x0aPolling...\x20(','resolve','GUTTER','getTime','resolveProject','workflowName','canceling','select','No\x20workflows\x20found','run','✔\x20Workflow\x20run\x20started','Invalid\x20format:\x20','list','indexOf','trim','new','No\x20workflow\x20sessions\x20found','path','executeCloneProject','requireProject','No\x20projects\x20match\x20pattern:\x20','follow','...','Project\x20filter:\x20','error','finishedAt','projectId','delete','preparePushProject','Deleting\x20project\x20','Pattern:\x20','/app/workflows/','\x20attempt','\x20sessions\x20','autocomplete','localeCompare','fileSize','Revision:\x20','yellow','Usage:\x20tdx\x20wf\x20use\x20<project>','toISOString','max','No\x20log\x20content\x20found','execute','taskName','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Pushing\x20workflow\x20project...','Cloning\x20to\x20','Retry\x20a\x20session\x20or\x20attempt','some','workflow:run','updatedAt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','red','MIN_TIMELINE_WIDTH','Pulling\x20project\x20','workflow:attempt','✔\x20Push\x20complete','MAX_TASKS_DISPLAY','No\x20attempts\x20found\x20for:\x20','Error:\x20','replace','params','blue','changes','Select\x20a\x20session\x20to\x20view\x20timeline:','workflow:retry','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','project','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','No\x20attempts\x20found\x20in\x20project:\x20','startsWith','Updating\x20','newProjectId','log','✔\x20Secret\x20\x27','isArray','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x0aDry\x20run\x20-\x20nothing\x20pushed','\x27...','ICON_WIDTH','lastAttempt','Total:\x20','workflow','padStart','Pushing\x20project...','format','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','Warning:','Kill\x20a\x20running\x20attempt','workflow:attempts','limit','set','\x20has\x20no\x20attempts','clear','No\x20sessions\x20found\x20for:\x20','\x20\x20Files\x20extracted:\x20','stringify','Writing\x20files...','Filter:\x20','No\x20workflow\x20tdx.json\x20found','cwd','attempt','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','context','\x0a✔\x20Already\x20up\x20to\x20date','duration','Starting\x20workflow\x20run...','Auto-selected\x20latest\x20session:\x20','Cancelled','Resume\x20from:\x20','No\x20attempts\x20found','Target\x20directory:\x20','📋\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Start\x20a\x20workflow\x20run','Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt','listSecrets','rows','fullName','parseProjectWorkflowPattern','sessionTime','length','Session\x20','newProjectName','Killing\x20attempt...','Include\x20retried:\x20yes','No\x20sessions\x20found','filesExtracted','getMonth','Attempt\x20ID:\x20','workflow:projects','\x22\x20already\x20exists\x20(ID:\x20','✔\x20Retry\x20started','238152dkMZRJ','\x20logs','pullProject','Usage:\x20workflow:delete\x20<project-name-or-id>','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','skipValidation','Error:\x20Invalid\x20JSON\x20in\x20--params','find','repeat','Pull\x20workflow\x20project\x20to\x20local\x20folder','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','revision','round','Project\x20name\x20is\x20required','group_error','deleteSecret','Validation:\x20skipped','No\x20matching\x20sessions\x20found','getHours','Retrying\x20attempt...','session:','List\x20workflow\x20execution\x20sessions','\x0aDry\x20run\x20-\x20no\x20files\x20written','revision:\x20','\x20deleted','\x20\x20Source:\x20','323515VpMOUU','Loading\x20workflows...','filter','→\x20New\x20project:\x20','Error:\x20Project\x20name\x20is\x20required','cyan','sourceDir','✔\x20Downloaded\x20','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','title','verbose','\x27\x20from\x20project\x20\x27','param','pollTimeline','Reason:\x20','\x20tasks','unchanged','Error:\x20Attempt\x20ID\x20is\x20required','generateSessionTimelineRows','tasks','startedAt','success','\x20\x20Attempt\x20ID:\x20','fill','trimEnd','text','fs/promises','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context',',\x20Workflow:\x20','Session\x20time:\x20','\x22\x20to\x20new\x20project\x20\x22','Getting\x20attempt\x20tasks...','ICON_SPACING','start','navigateSessionsInteractive','Project:\x20','workflow:secrets:delete','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Target:\x20','floor','workflow:pull','dim','Failed\x20to\x20fetch\x20attempt\x20data','Show\x20tasks\x20for\x20an\x20attempt','pending','cancelRequested','summary','resolveProjectDir','match','Show\x20specific\x20attempt\x20details','Select\x20a\x20workflow\x20to\x20run','Error:','buildTimelineData','Analyzing\x20changes...','site','sessionId','durationMs','LABEL_MIN_SPACING','\x20task','Attempt:\x20','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','projectName','workflow:push','session','isDirectory','Select\x20a\x20task\x20to\x20view\x20logs:','get','Params:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Tip:\x20cd\x20to\x20workflows/','data','Fetching\x20log\x20files...','✔\x20Found\x20','retryAttempt','attempts','workflowProject','sourceProjectName','✔\x20Workflow\x20project\x20set\x20to:\x20','Listing\x20secrets...','\x0aError:','attempt:','relative','Using\x20attempt\x20','.\x20Expected\x20format:\x20KEY=VALUE','\x0a✔\x20No\x20changes\x20to\x20push','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','planned','yes','Dry\x20run:\x20yes','61090120qgShbL','workflow:tasks','Error:\x20KEY=VALUE\x20is\x20required','✔\x20Project:\x20','targetExists','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','map','createdAt','size','11724146TBinGU','Downloading\x20project\x20','\x20\x20Location:\x20','MAX_LABEL_COUNT','LABEL_WIDTH_DIVISOR','No\x20sessions\x20found\x20in\x20project:\x20','\x0aApply\x20these\x20changes?','renderSessionsTimeline','Force:\x20yes','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','existingProjectId','window','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','task','-\x20no\x20files\x20written','\x1b[1A\x1b[2K','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','sessions','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','\x0aPush\x20these\x20changes?','description','status','715729uhGLbl','\x20modified','green'];a42_0x3aa6=function(){return _0x20d207;};return a42_0x3aa6();}function formatStats(_0x74743d){const _0x488d35=a42_0x428ab2;return[_0x488d35(0x2c8)+_0x74743d[_0x488d35(0x210)],'✅\x20'+_0x74743d[_0x488d35(0x32b)],'❌\x20'+_0x74743d[_0x488d35(0x28e)],'🔄\x20'+_0x74743d[_0x488d35(0x227)],'⏳\x20'+_0x74743d[_0x488d35(0x342)]][_0x488d35(0x275)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a42_0x428ab2(0x209)]='workflow:timeline';[a42_0x428ab2(0x38d)]=a42_0x428ab2(0x2ea);async[a42_0x428ab2(0x2a1)](_0xa0ddf8){const _0x213b6=a42_0x428ab2,{options:_0x5f3799,args:_0x4d323e,tdx:_0x55ed31}=_0xa0ddf8;let _0x28b791,_0x3bf970,_0x5f2d06=![];if(_0x4d323e[0x0]){if(_0x4d323e[0x0]['includes']('.')){const _0x5cd228=this[_0x213b6(0x2ee)](_0x4d323e,_0x5f3799);if(!_0x5cd228)return 0x1;_0x28b791=_0x5cd228[_0x213b6(0x353)],_0x3bf970=_0x5cd228[_0x213b6(0x27b)];}else{_0x3bf970=_0x4d323e[0x0],_0x28b791=_0x5f3799[_0x213b6(0x361)];if(!_0x28b791)return console[_0x213b6(0x28e)](a42_0xc4b429[_0x213b6(0x2ab)]('Error:'),_0x213b6(0x375)),0x1;_0x5f2d06=!![];}}else{const _0x308a97=this[_0x213b6(0x2ee)](_0x4d323e,_0x5f3799);if(!_0x308a97)return 0x1;_0x28b791=_0x308a97['projectName'],_0x3bf970=_0x308a97[_0x213b6(0x27b)];}if(_0x5f3799['verbose']){if(_0x28b791&&_0x3bf970)console[_0x213b6(0x28e)]('Filter:\x20'+_0x28b791+'.'+_0x3bf970);else _0x28b791&&console[_0x213b6(0x28e)](_0x213b6(0x247)+_0x28b791);}const _0x280e86=_0x5f3799[_0x213b6(0x25a)],_0x565570=_0x5f3799[_0x213b6(0x34d)];if(_0x280e86){_0x565570&&console[_0x213b6(0x28e)](a42_0xc4b429['yellow'](_0x213b6(0x2ce)),_0x213b6(0x2b9));const _0x394bea=_0x5f3799[_0x213b6(0x28b)];return _0x394bea?await this['pollTimeline'](_0xa0ddf8,_0x280e86):await this[_0x213b6(0x219)](_0xa0ddf8,_0x280e86,_0x5f3799),0x0;}if(_0x565570){const _0x5598ca=await withSpinner(_0x213b6(0x259),()=>_0x55ed31[_0x213b6(0x2c9)][_0x213b6(0x38a)]({'projectName':_0x28b791,'workflowName':_0x3bf970,'limit':0x64}),{'verbose':_0x5f3799['verbose']}),_0x16c2b6=_0x5598ca['data']['find'](_0x2ce98c=>_0x2ce98c['id']===_0x565570);if(!_0x16c2b6)return console[_0x213b6(0x28e)](a42_0xc4b429[_0x213b6(0x2ab)](_0x213b6(0x349)),'Session\x20not\x20found:\x20'+_0x565570),0x1;if(!_0x16c2b6[_0x213b6(0x2c7)]?.['id'])return console['error'](a42_0xc4b429[_0x213b6(0x2ab)](_0x213b6(0x349)),_0x213b6(0x2f1)+_0x565570+_0x213b6(0x2d3)),0x1;const _0x31e39d=_0x16c2b6[_0x213b6(0x2c7)]['id'];_0x5f3799[_0x213b6(0x320)]&&console['error'](_0x213b6(0x368)+_0x31e39d+_0x213b6(0x242)+_0x565570);const _0x56e372=_0x5f3799['follow'];return _0x56e372?await this[_0x213b6(0x323)](_0xa0ddf8,_0x31e39d):await this[_0x213b6(0x219)](_0xa0ddf8,_0x31e39d,_0x5f3799),0x0;}const _0x1c99fd=await withSpinner(_0x213b6(0x24a),()=>_0x55ed31[_0x213b6(0x2c9)][_0x213b6(0x38a)]({'projectName':_0x28b791,'workflowName':_0x3bf970,'limit':_0x5f3799[_0x213b6(0x2d1)]||0x32}),{'verbose':_0x5f3799['verbose']}),_0x4a1c4f=_0x1c99fd['data'];if(_0x4a1c4f['length']===0x0){if(_0x28b791&&_0x3bf970)console[_0x213b6(0x28e)](_0x213b6(0x2d5)+_0x28b791+'.'+_0x3bf970);else _0x28b791?console[_0x213b6(0x28e)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x28b791):(console[_0x213b6(0x28e)](_0x213b6(0x286)),console['error'](a42_0xc4b429[_0x213b6(0x33f)](_0x213b6(0x265))));return 0x0;}_0x4a1c4f[_0x213b6(0x1f2)]((_0x325341,_0x2543cc)=>{const _0x72be64=_0x213b6,_0x207785=_0x325341[_0x72be64(0x2ef)]||'',_0x61ae04=_0x2543cc[_0x72be64(0x2ef)]||'';return _0x61ae04[_0x72be64(0x299)](_0x207785);});if(_0x5f3799[_0x213b6(0x250)]||_0x5f3799[_0x213b6(0x236)])return await handleSDKOutput(_0x4a1c4f,_0x5f3799),0x0;let _0x45207a;if(_0x5f2d06){const _0x23115d=_0x4a1c4f[0x0];if(!_0x23115d[_0x213b6(0x2c7)]?.['id'])return console['error']('Latest\x20session\x20has\x20no\x20attempt'),0x0;_0x45207a=_0x23115d[_0x213b6(0x2c7)]['id'],_0x5f3799[_0x213b6(0x320)]&&console[_0x213b6(0x28e)](_0x213b6(0x2e2)+_0x23115d[_0x213b6(0x2ef)]);}else{const _0x569ebc=_0x4a1c4f[_0x213b6(0x376)](_0x532a5d=>{const _0x57f209=_0x213b6,_0x362d46=getAttemptStatusDisplay(_0x532a5d[_0x57f209(0x2c7)]);return{'title':_0x532a5d[_0x57f209(0x2ba)]?.[_0x57f209(0x209)]+'.'+_0x532a5d[_0x57f209(0x2c9)]?.[_0x57f209(0x209)]+'\x20-\x20'+_0x532a5d[_0x57f209(0x2ef)]+'\x20'+_0x362d46['icon'],'value':_0x532a5d[_0x57f209(0x2c7)]?.['id']||'','description':_0x362d46[_0x57f209(0x32f)]};}),_0x4c977a=await a42_0x2ce4d7({'type':_0x213b6(0x27d),'name':_0x213b6(0x25a),'message':_0x213b6(0x2b7),'choices':_0x569ebc[_0x213b6(0x318)](_0x2d01f2=>_0x2d01f2['value']!=='')});if(!_0x4c977a['attemptId'])return 0x0;_0x45207a=_0x4c977a['attemptId'];}const _0x25d66a=_0x5f3799['follow'];return _0x25d66a?await this[_0x213b6(0x323)](_0xa0ddf8,_0x45207a):await this['renderSingleTimeline'](_0xa0ddf8,_0x45207a,_0x5f3799),0x0;}async[a42_0x428ab2(0x219)](_0x4f3973,_0x46a03e,_0x4dca16){const _0x20bd9d=a42_0x428ab2,{tdx:_0x3f5a2f}=_0x4f3973;let _0x161b4f,_0x116fc6;try{[_0x161b4f,_0x116fc6]=await Promise[_0x20bd9d(0x264)]([_0x3f5a2f[_0x20bd9d(0x2c9)][_0x20bd9d(0x2dc)](_0x46a03e),_0x3f5a2f[_0x20bd9d(0x2c9)]['tasks'](_0x46a03e,![])]);}catch(_0x286b58){console['error'](a42_0xc4b429[_0x20bd9d(0x2ab)](_0x20bd9d(0x340)));_0x4dca16['verbose']&&console[_0x20bd9d(0x28e)](_0x286b58);throw _0x286b58;}if(_0x4dca16['json']||_0x4dca16['jsonl']){const _0x278597=this[_0x20bd9d(0x34a)](_0x161b4f,_0x116fc6);await handleSDKOutput([_0x278597],_0x4dca16);return;}const _0x491db5=_0x3f5a2f[_0x20bd9d(0x2de)][_0x20bd9d(0x34c)],_0x40f5ae=this['renderTimeline'](_0x161b4f,_0x116fc6,_0x491db5);console['log'](_0x40f5ae);}async[a42_0x428ab2(0x323)](_0x355673,_0x57b2ce){const _0x83432b=a42_0x428ab2,{tdx:_0x36eaf5}=_0x355673,_0x1b87bd=TIMELINE_CONFIG[_0x83432b(0x21e)],_0x58b774=TIMELINE_CONFIG['MAX_POLL_ITERATIONS'];let _0x4f3444=0x0;while(_0x4f3444<_0x58b774){process[_0x83432b(0x268)][_0x83432b(0x258)]&&process[_0x83432b(0x268)][_0x83432b(0x256)]('\x1bc');let _0x587004,_0x22c8db;try{[_0x587004,_0x22c8db]=await Promise[_0x83432b(0x264)]([_0x36eaf5[_0x83432b(0x2c9)][_0x83432b(0x2dc)](_0x57b2ce),_0x36eaf5[_0x83432b(0x2c9)][_0x83432b(0x329)](_0x57b2ce,![])]);}catch(_0x29e3fd){console[_0x83432b(0x28e)](a42_0xc4b429[_0x83432b(0x2ab)]('\x0aFailed\x20to\x20fetch\x20attempt\x20data'));_0x4f3444>0x0&&console['error'](a42_0xc4b429['dim'](_0x83432b(0x38b)+_0x4f3444));throw _0x29e3fd;}const _0x3d568e=_0x36eaf5[_0x83432b(0x2de)]['site'],_0x24bdaa=this[_0x83432b(0x26f)](_0x587004,_0x22c8db,_0x3d568e);console[_0x83432b(0x2c0)](_0x24bdaa);const _0x3364d6=_0x587004[_0x83432b(0x24c)]&&_0x22c8db['every'](_0x141b0f=>_0x141b0f[_0x83432b(0x206)]!==_0x83432b(0x227)&&_0x141b0f[_0x83432b(0x206)]!==_0x83432b(0x36c));if(_0x3364d6){console[_0x83432b(0x28e)](a42_0xc4b429[_0x83432b(0x1e6)]('\x0a✔\x20Attempt\x20complete'));break;}console[_0x83432b(0x28e)](a42_0xc4b429['dim'](_0x83432b(0x276)+_0x4f3444*0x2+_0x83432b(0x382))),await new Promise(_0x372cfb=>setTimeout(_0x372cfb,_0x1b87bd)),_0x4f3444++;}_0x4f3444>=_0x58b774&&console['error'](a42_0xc4b429[_0x83432b(0x29c)](_0x83432b(0x201)));}['renderTimeline'](_0x4442fd,_0x3b603e,_0xc3baf1){const _0x516d8a=a42_0x428ab2,_0x59c870=[],_0x601a8b=TIMELINE_CONFIG['TASK_NAME_WIDTH'],_0x397ad6=0x5,_0x69af8d=process[_0x516d8a(0x268)]['columns']||0x78,_0x11eaf9=_0x69af8d-_0x601a8b-_0x397ad6,_0x4302bf=Math[_0x516d8a(0x29f)](TIMELINE_CONFIG[_0x516d8a(0x2ac)],Math[_0x516d8a(0x1fe)](_0x11eaf9,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x92ec10=new Date(_0x4442fd['createdAt'])[_0x516d8a(0x279)](),_0x53c327=_0x4442fd[_0x516d8a(0x28f)]?new Date(_0x4442fd[_0x516d8a(0x28f)])['getTime']():Date[_0x516d8a(0x22f)](),_0x28a394={'start':_0x92ec10,'end':_0x53c327,'duration':_0x53c327-_0x92ec10},_0x13ca5d=new Map(),_0x1da7a8=[];for(const _0x5228eb of _0x3b603e){if(_0x5228eb['startedAt']){const _0x2c23dd=new Date(_0x5228eb[_0x516d8a(0x32a)])[_0x516d8a(0x279)](),_0x1ce43d=_0x5228eb[_0x516d8a(0x2a9)]?new Date(_0x5228eb['updatedAt'])['getTime']():Date['now'](),_0x461bfc={'start':_0x2c23dd,'end':_0x1ce43d,'duration':_0x1ce43d-_0x2c23dd};_0x13ca5d['set'](_0x5228eb['id'],_0x461bfc),_0x1da7a8[_0x516d8a(0x23f)]({'name':_0x5228eb[_0x516d8a(0x2ed)],'state':_0x5228eb[_0x516d8a(0x206)]||_0x516d8a(0x205),'window':_0x461bfc});}else _0x1da7a8[_0x516d8a(0x23f)]({'name':_0x5228eb[_0x516d8a(0x2ed)],'state':_0x5228eb[_0x516d8a(0x206)]||_0x516d8a(0x36c),'window':undefined});}_0x1da7a8['sort']((_0x37572d,_0x13a8cb)=>{const _0x57fbd1=_0x516d8a;if(!_0x37572d[_0x57fbd1(0x384)])return 0x1;if(!_0x13a8cb[_0x57fbd1(0x384)])return-0x1;return _0x37572d['window'][_0x57fbd1(0x337)]-_0x13a8cb[_0x57fbd1(0x384)][_0x57fbd1(0x337)];});const _0x4d48a1=_0x1da7a8['length'],_0x29cfc9=_0x4d48a1>TIMELINE_CONFIG[_0x516d8a(0x2b0)];_0x29cfc9&&_0x1da7a8['splice'](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x2f209d=calculateTimeScale(_0x28a394,_0x4302bf),_0x4e2eaf=_0x4442fd[_0x516d8a(0x24c)]?_0x4442fd['success']?a42_0xc4b429[_0x516d8a(0x1e6)]('success'):a42_0xc4b429[_0x516d8a(0x2ab)](_0x516d8a(0x28e)):a42_0xc4b429[_0x516d8a(0x2b5)](_0x516d8a(0x227)),_0x1115ff=_0x4442fd[_0x516d8a(0x2ba)]?.['id'],_0x5b5880=_0x4442fd[_0x516d8a(0x34d)];let _0x12e1e0;if(_0x1115ff&&_0x5b5880){const _0x281ff2=getWorkflowAttemptUrl(_0xc3baf1,_0x1115ff,_0x5b5880,_0x4442fd['id']);_0x12e1e0=hyperlink(a42_0xc4b429[_0x516d8a(0x33f)](_0x4442fd['id']),_0x281ff2);}else _0x12e1e0=a42_0xc4b429['dim'](_0x4442fd['id']);_0x59c870[_0x516d8a(0x23f)](_0x516d8a(0x351)+_0x12e1e0+_0x516d8a(0x211)+_0x4e2eaf+_0x516d8a(0x211)+formatElapsed(_0x28a394['duration']));if(_0x1da7a8[_0x516d8a(0x2f0)]>0x0){const _0x220a85=renderTimeAxis(_0x2f209d,_0x4302bf),_0x3f6b9d=new Date(_0x28a394[_0x516d8a(0x337)]),_0x3a72af=formatDate(_0x3f6b9d),_0x301878=TIMELINE_CONFIG[_0x516d8a(0x2c6)]+TIMELINE_CONFIG[_0x516d8a(0x336)]+_0x601a8b,_0xbc7e4f=_0x3a72af['padStart'](_0x301878),_0x13f104=a42_0xc4b429[_0x516d8a(0x33f)](_0xbc7e4f);_0x59c870[_0x516d8a(0x23f)](_0x13f104+'\x20'+_0x220a85);for(const _0x267069 of _0x1da7a8){_0x59c870[_0x516d8a(0x23f)](renderTaskRow(_0x267069,_0x2f209d,_0x4302bf,_0x601a8b));}const _0x2074e0=calculateStats(_0x1da7a8);_0x59c870[_0x516d8a(0x23f)](formatStats(_0x2074e0)),_0x29cfc9&&_0x59c870[_0x516d8a(0x23f)](a42_0xc4b429['yellow'](_0x516d8a(0x23c)+TIMELINE_CONFIG[_0x516d8a(0x2b0)]+'\x20of\x20'+_0x4d48a1+_0x516d8a(0x325))),_0x59c870[_0x516d8a(0x23f)](''),_0x59c870[_0x516d8a(0x23f)](a42_0xc4b429[_0x516d8a(0x33f)](_0x516d8a(0x25d))+(_0x516d8a(0x20e)+_0x4442fd['id']+_0x516d8a(0x2fd))+a42_0xc4b429['dim']('\x20to\x20see\x20detailed\x20logs'));}else _0x59c870['push']('No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)');return _0x59c870['join']('\x0a');}[a42_0x428ab2(0x34a)](_0x37960c,_0x594c61){const _0x3d4a91=a42_0x428ab2,_0x1b0229=new Date(_0x37960c[_0x3d4a91(0x377)])['getTime'](),_0xe40673=_0x37960c['finishedAt']?new Date(_0x37960c[_0x3d4a91(0x28f)])[_0x3d4a91(0x279)]():Date[_0x3d4a91(0x22f)](),_0x40d844=_0xe40673-_0x1b0229,_0x3be99b=[];for(const _0x1f524c of _0x594c61){if(_0x1f524c[_0x3d4a91(0x32a)]){const _0x3be5cc=new Date(_0x1f524c['startedAt'])[_0x3d4a91(0x279)](),_0x2d33d0=_0x1f524c['updatedAt']?new Date(_0x1f524c[_0x3d4a91(0x2a9)])[_0x3d4a91(0x279)]():Date[_0x3d4a91(0x22f)]();_0x3be99b['push']({'name':_0x1f524c[_0x3d4a91(0x2ed)],'state':_0x1f524c[_0x3d4a91(0x206)]||_0x3d4a91(0x205),'window':{'start':_0x3be5cc,'end':_0x2d33d0,'duration':_0x2d33d0-_0x3be5cc}});}else _0x3be99b[_0x3d4a91(0x23f)]({'name':_0x1f524c[_0x3d4a91(0x2ed)],'state':_0x1f524c[_0x3d4a91(0x206)]||'planned','window':undefined});}const _0x5523f0=calculateStats(_0x3be99b);return{'attempt':{'id':_0x37960c['id'],'status':_0x37960c[_0x3d4a91(0x24c)]?_0x37960c[_0x3d4a91(0x32b)]?_0x3d4a91(0x32b):_0x3d4a91(0x28e):_0x3d4a91(0x227),'createdAt':_0x37960c[_0x3d4a91(0x377)],'finishedAt':_0x37960c[_0x3d4a91(0x28f)],'duration_ms':_0x40d844},'tasks':_0x3be99b[_0x3d4a91(0x376)](_0x56a29f=>({'name':_0x56a29f[_0x3d4a91(0x209)],'state':_0x56a29f[_0x3d4a91(0x206)],'startedAt':_0x56a29f['window']?new Date(_0x56a29f[_0x3d4a91(0x384)][_0x3d4a91(0x337)])[_0x3d4a91(0x29e)]():null,'updatedAt':_0x56a29f['window']?new Date(_0x56a29f[_0x3d4a91(0x384)][_0x3d4a91(0x239)])[_0x3d4a91(0x29e)]():null,'duration_ms':_0x56a29f[_0x3d4a91(0x384)]?.[_0x3d4a91(0x2e0)]||null})),'stats':_0x5523f0};}}
1
+ const a42_0x45bdeb=a42_0x393c;(function(_0x57450f,_0x5a13b6){const _0x13c33c=a42_0x393c,_0x2652e1=_0x57450f();while(!![]){try{const _0x1b481b=-parseInt(_0x13c33c(0x199))/0x1*(-parseInt(_0x13c33c(0x215))/0x2)+-parseInt(_0x13c33c(0x21a))/0x3*(-parseInt(_0x13c33c(0x2bf))/0x4)+-parseInt(_0x13c33c(0x146))/0x5+parseInt(_0x13c33c(0x23c))/0x6*(parseInt(_0x13c33c(0x163))/0x7)+parseInt(_0x13c33c(0x190))/0x8+-parseInt(_0x13c33c(0x1e1))/0x9*(-parseInt(_0x13c33c(0x1e8))/0xa)+-parseInt(_0x13c33c(0x24c))/0xb;if(_0x1b481b===_0x5a13b6)break;else _0x2652e1['push'](_0x2652e1['shift']());}catch(_0x31fc16){_0x2652e1['push'](_0x2652e1['shift']());}}}(a42_0x2886,0x4d8e2));import a42_0x126119 from'chalk';import{existsSync}from'fs';import a42_0x273201 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,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';function a42_0x393c(_0x53d4df,_0x41eea3){_0x53d4df=_0x53d4df-0x13e;const _0x2886de=a42_0x2886();let _0x393cfa=_0x2886de[_0x53d4df];return _0x393cfa;}import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a42_0x430795 from'prompts';function getAttemptStatusDisplay(_0x1ad3fb){const _0x36b8ca=a42_0x393c;if(!_0x1ad3fb)return{'icon':'⏳','text':''};const {done:_0x57df98,success:_0x40aa2b,cancelRequested:_0x57bd77}=_0x1ad3fb;if(!_0x57df98)return _0x57bd77?{'icon':'🛑','text':a42_0x126119[_0x36b8ca(0x1ee)]('canceling')}:{'icon':'🔄','text':a42_0x126119[_0x36b8ca(0x2bd)](_0x36b8ca(0x2d7))};if(_0x40aa2b)return{'icon':'✅','text':a42_0x126119[_0x36b8ca(0x16e)]('success')};return{'icon':'❌','text':a42_0x126119[_0x36b8ca(0x2b4)](_0x36b8ca(0x26f))};}export class WorkflowBaseCommand extends BaseCommand{['resolveProject'](_0x3a0c01,_0x1518fc,_0x237d86=0x0){return _0x3a0c01[_0x237d86]||_0x1518fc['workflowProject'];}[a42_0x45bdeb(0x143)](_0x156884,_0x449be2,_0x56bc27=0x0){const _0x35b4ae=a42_0x45bdeb,_0x47a601=this[_0x35b4ae(0x184)](_0x156884,_0x449be2,_0x56bc27);if(!_0x47a601)return console[_0x35b4ae(0x26f)](a42_0x126119[_0x35b4ae(0x2b4)](_0x35b4ae(0x1af)),_0x35b4ae(0x13e)),console['error'](a42_0x126119[_0x35b4ae(0x236)](_0x35b4ae(0x289))),null;return _0x47a601;}[a42_0x45bdeb(0x29e)](_0x43ae59,_0xf42e9a){const _0xd26ab4=a42_0x45bdeb;if(_0x43ae59[0x0]){const _0xef9aea=_0x43ae59[0x0]['split']('.');if(_0xef9aea[_0xd26ab4(0x252)]===0x1)return{'projectName':_0xef9aea[0x0],'workflowName':undefined};else return _0xef9aea[_0xd26ab4(0x252)]===0x2?{'projectName':_0xef9aea[0x0],'workflowName':_0xef9aea[0x1]}:(console[_0xd26ab4(0x26f)](a42_0x126119[_0xd26ab4(0x2b4)](_0xd26ab4(0x1af)),_0xd26ab4(0x22c)),null);}return{'projectName':_0xf42e9a[_0xd26ab4(0x1b9)],'workflowName':undefined};}[a42_0x45bdeb(0x2aa)](_0x30d08e,_0x190981,_0x3bb750=0x0){const _0x61a35f=a42_0x45bdeb;if(_0x30d08e[_0x3bb750])return _0x30d08e[_0x3bb750];if(_0x190981[_0x61a35f(0x1b9)]){const _0x48e5bf=a42_0x273201[_0x61a35f(0x2ae)](process[_0x61a35f(0x16a)](),'workflows',_0x190981[_0x61a35f(0x1b9)]);if(existsSync(a42_0x273201[_0x61a35f(0x2ae)](_0x48e5bf,_0x61a35f(0x24b))))return _0x48e5bf;}return undefined;}async[a42_0x45bdeb(0x20f)](_0x4cb899,_0x63a260,_0x12c71d){const _0x26b27c=a42_0x45bdeb;try{const _0x7eebda=await _0x4cb899[_0x26b27c(0x27d)][_0x26b27c(0x1bb)](_0x63a260,{'limit':0x1});if(_0x7eebda[_0x26b27c(0x252)]>0x0){const _0x3ba086=_0x7eebda[0x0]['id'],_0x215d7b=getWorkflowUrl(_0x12c71d,_0x3ba086);console[_0x26b27c(0x26f)]('\x20\x20Console:\x20'+a42_0x126119[_0x26b27c(0x1c4)](_0x215d7b));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']=a42_0x45bdeb(0x1c7);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x18d);async[a42_0x45bdeb(0x221)](_0x3c66e6){const _0x522cb5=a42_0x45bdeb,{options:_0x17a5a1,args:_0x106f27,tdx:_0x2731e2}=_0x3c66e6,_0x3bce45=_0x106f27[0x0],_0x274604=_0x17a5a1[_0x522cb5(0x23e)];if(_0x274604)return saveSessionContext({'workflow_project':undefined},_0x17a5a1[_0x522cb5(0x207)]),console['log'](a42_0x126119[_0x522cb5(0x16e)](_0x522cb5(0x24e))),0x0;if(!_0x3bce45)return console[_0x522cb5(0x26f)](a42_0x126119[_0x522cb5(0x2b4)](_0x522cb5(0x1af)),_0x522cb5(0x13e)),console[_0x522cb5(0x26f)](a42_0x126119[_0x522cb5(0x236)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x522cb5(0x26f)](a42_0x126119[_0x522cb5(0x236)](_0x522cb5(0x1d9))),0x1;const _0x199662=await withSpinner('Resolving\x20project\x20\x27'+_0x3bce45+_0x522cb5(0x18c),()=>_0x2731e2[_0x522cb5(0x27d)][_0x522cb5(0x1bc)](_0x3bce45),{'verbose':_0x17a5a1[_0x522cb5(0x1d1)]}),{name:_0x11b838}=_0x199662[_0x522cb5(0x1f2)];return saveSessionContext({'workflow_project':_0x11b838},_0x17a5a1['session']),console[_0x522cb5(0x2c2)](a42_0x126119[_0x522cb5(0x16e)]('✔\x20Workflow\x20project\x20set\x20to:\x20'+a42_0x126119[_0x522cb5(0x1c4)](_0x11b838))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{['name']=a42_0x45bdeb(0x1b3);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x2a4);async['execute'](_0x2104cf){const _0xdbd8e=a42_0x45bdeb,{options:_0x27dad9,args:_0xdc3884,tdx:_0x3b3a25}=_0x2104cf,_0x3358c1=_0xdc3884[0x0];_0x27dad9['verbose']&&_0x3358c1&&console[_0xdbd8e(0x26f)](_0xdbd8e(0x25a)+_0x3358c1);const _0x5500c8=await withSpinner(_0xdbd8e(0x261),()=>_0x3b3a25[_0xdbd8e(0x27d)][_0xdbd8e(0x282)](_0x3358c1,{'limit':_0x27dad9[_0xdbd8e(0x27f)]}),{'verbose':_0x27dad9[_0xdbd8e(0x1d1)]});let _0x211b79=_0x5500c8[_0xdbd8e(0x1f2)];_0x211b79['sort']((_0x5d9c4c,_0x1cbf61)=>_0x5d9c4c['name'][_0xdbd8e(0x234)](_0x1cbf61['name']));const _0x57d77e=_0x27dad9[_0xdbd8e(0x27f)]||0x64,_0x4e7784=_0x211b79[_0xdbd8e(0x252)]>=_0x57d77e?a42_0x126119[_0xdbd8e(0x236)](_0xdbd8e(0x1ec)):'';console[_0xdbd8e(0x26f)](_0xdbd8e(0x1c8)+_0x211b79[_0xdbd8e(0x252)]+_0xdbd8e(0x239)+(_0x211b79[_0xdbd8e(0x252)]!==0x1?'s':'')+_0x4e7784);if(_0x27dad9[_0xdbd8e(0x219)]===_0xdbd8e(0x17a)||_0x27dad9[_0xdbd8e(0x219)]===_0xdbd8e(0x1c2)||_0x27dad9['format']===_0xdbd8e(0x22a))await handleSDKOutput(_0x211b79,_0x27dad9);else{if(_0x211b79[_0xdbd8e(0x252)]===0x0)_0x3358c1?console[_0xdbd8e(0x2c2)]('No\x20projects\x20match\x20pattern:\x20'+_0x3358c1):console[_0xdbd8e(0x2c2)](_0xdbd8e(0x271));else{const _0x269372=_0x211b79[_0xdbd8e(0x1b5)](_0x3f59fe=>{const _0x16e68d=_0xdbd8e,_0x179990=_0x3f59fe[_0x16e68d(0x1f3)]?.[_0x16e68d(0x15f)](_0x4e6c86=>_0x4e6c86['key']===_0x16e68d(0x2a7)),_0x187934=_0x179990?a42_0x126119['dim'](_0x16e68d(0x1f6)):'';return _0x16e68d(0x257)+_0x3f59fe[_0x16e68d(0x265)]+_0x187934;});await writeOutput(_0x269372[_0xdbd8e(0x2ae)]('\x0a'),_0x27dad9[_0xdbd8e(0x14a)],_0xdbd8e(0x2da));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x1bf);['description']=a42_0x45bdeb(0x263);async['execute'](_0x1f408c){const _0x556bad=a42_0x45bdeb,{options:_0x16a10b,args:_0x31fe08,tdx:_0x333354}=_0x1f408c,_0x713aa7=this[_0x556bad(0x184)](_0x31fe08,_0x16a10b);_0x16a10b[_0x556bad(0x1d1)]&&_0x713aa7&&console[_0x556bad(0x26f)]('Project\x20filter:\x20'+_0x713aa7);const _0x37be0b=await withSpinner(_0x556bad(0x147),()=>_0x333354['workflow']['workflows'](_0x713aa7,{'limit':_0x16a10b[_0x556bad(0x27f)]}),{'verbose':_0x16a10b[_0x556bad(0x1d1)]});let _0x558fd1=_0x37be0b['data'];_0x558fd1[_0x556bad(0x21c)]((_0x36e472,_0x36bee9)=>{const _0x3fe77f=_0x556bad,_0x354883=_0x36e472[_0x3fe77f(0x265)][_0x3fe77f(0x234)](_0x36bee9['name']);if(_0x354883!==0x0)return _0x354883;return(_0x36e472[_0x3fe77f(0x2cc)]?.[_0x3fe77f(0x265)]||'')[_0x3fe77f(0x234)](_0x36bee9[_0x3fe77f(0x2cc)]?.['name']||'');});const _0x434c19=_0x16a10b[_0x556bad(0x27f)]||0x64,_0x16804c=_0x558fd1[_0x556bad(0x252)]>=_0x434c19?a42_0x126119[_0x556bad(0x236)](_0x556bad(0x1ec)):'';console[_0x556bad(0x26f)](_0x556bad(0x1c8)+_0x558fd1[_0x556bad(0x252)]+'\x20workflow'+(_0x558fd1['length']!==0x1?'s':'')+_0x16804c);if(_0x16a10b[_0x556bad(0x219)]===_0x556bad(0x17a)||_0x16a10b[_0x556bad(0x219)]===_0x556bad(0x1c2)||_0x16a10b[_0x556bad(0x219)]===_0x556bad(0x22a))await handleSDKOutput(_0x558fd1,_0x16a10b);else{if(_0x558fd1[_0x556bad(0x252)]===0x0)_0x713aa7?console[_0x556bad(0x2c2)]('No\x20workflows\x20found\x20in\x20project:\x20'+_0x713aa7):console[_0x556bad(0x2c2)]('No\x20workflows\x20found');else{const _0xd89016=_0x16a10b[_0x556bad(0x259)],_0x326aa0=_0x558fd1[_0x556bad(0x1b5)](_0xa32138=>{const _0x3fe41f=_0x556bad,_0x27ab10=a42_0x126119['dim']('#'+_0xa32138['id']),_0x1b184d=hyperlink(_0x27ab10,getWorkflowUrl(_0xd89016,_0xa32138['id'])),_0x59c834=_0xa32138[_0x3fe41f(0x2cc)]?.[_0x3fe41f(0x265)]?a42_0x126119['dim']('\x20('+_0xa32138[_0x3fe41f(0x2cc)][_0x3fe41f(0x265)]+')'):'';return'📋\x20'+_0x1b184d+'\x20'+_0xa32138['name']+_0x59c834;});await writeOutput(_0x326aa0[_0x556bad(0x2ae)]('\x0a'),_0x16a10b['output'],'list');}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x220);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x155);async[a42_0x45bdeb(0x221)](_0x5603ba){const _0x4e1d1e=a42_0x45bdeb,{options:_0x5a616e,args:_0x3a3b02,tdx:_0x212168}=_0x5603ba,_0x43ca8a=this[_0x4e1d1e(0x29e)](_0x3a3b02,_0x5a616e);if(!_0x43ca8a)return 0x1;const {projectName:_0x36c8db,workflowName:_0xa5ab74}=_0x43ca8a;if(_0x5a616e[_0x4e1d1e(0x1d1)]){if(_0x36c8db&&_0xa5ab74)console[_0x4e1d1e(0x26f)]('Filter:\x20'+_0x36c8db+'.'+_0xa5ab74);else _0x36c8db&&console[_0x4e1d1e(0x26f)](_0x4e1d1e(0x202)+_0x36c8db);const _0x2c13d2=_0x5a616e['status'];_0x2c13d2&&console[_0x4e1d1e(0x26f)]('Status:\x20'+_0x2c13d2);}let _0x4bad31=0x28;if(process[_0x4e1d1e(0x2d0)][_0x4e1d1e(0x270)]&&!_0x5a616e[_0x4e1d1e(0x14a)]&&!_0x5a616e['format']){const _0x86855d=process['stdout'][_0x4e1d1e(0x142)]||0x28;_0x4bad31=Math[_0x4e1d1e(0x170)](0x14,Math[_0x4e1d1e(0x1f9)](_0x86855d*0x2/0x3));}const _0x3ca863=_0x5a616e[_0x4e1d1e(0x27f)]||_0x4bad31,_0x35349e=await withSpinner(_0x4e1d1e(0x1a2),()=>_0x212168[_0x4e1d1e(0x27d)][_0x4e1d1e(0x248)]({'projectName':_0x36c8db,'workflowName':_0xa5ab74,'status':_0x5a616e[_0x4e1d1e(0x23d)],'fromTime':_0x5a616e['from'],'toTime':_0x5a616e['to'],'limit':_0x3ca863}),{'verbose':_0x5a616e['verbose']}),_0x250074=_0x35349e['data'];_0x250074[_0x4e1d1e(0x21c)]((_0x375043,_0x3f75e8)=>{const _0x125732=_0x4e1d1e,_0x554d53=_0x375043[_0x125732(0x2b5)]||'',_0x18e1ae=_0x3f75e8[_0x125732(0x2b5)]||'';return _0x18e1ae[_0x125732(0x234)](_0x554d53);});_0x250074[_0x4e1d1e(0x252)]>=_0x3ca863?console[_0x4e1d1e(0x26f)]('✔\x20Showing\x20'+_0x250074[_0x4e1d1e(0x252)]+_0x4e1d1e(0x290)+a42_0x126119[_0x4e1d1e(0x236)](_0x4e1d1e(0x2a8))):console[_0x4e1d1e(0x26f)]('✔\x20Found\x20'+_0x250074['length']+'\x20session'+(_0x250074[_0x4e1d1e(0x252)]!==0x1?'s':''));if(_0x5a616e[_0x4e1d1e(0x219)]===_0x4e1d1e(0x17a)||_0x5a616e[_0x4e1d1e(0x219)]===_0x4e1d1e(0x1c2)||_0x5a616e['format']==='table')await handleSDKOutput(_0x250074,_0x5a616e);else{if(!process[_0x4e1d1e(0x2d0)][_0x4e1d1e(0x270)]||_0x5a616e['output']){if(_0x250074[_0x4e1d1e(0x252)]===0x0){if(_0x36c8db&&_0xa5ab74)console['log']('No\x20sessions\x20found\x20for:\x20'+_0x36c8db+'.'+_0xa5ab74);else _0x36c8db?console[_0x4e1d1e(0x2c2)](_0x4e1d1e(0x2ad)+_0x36c8db):console[_0x4e1d1e(0x2c2)]('No\x20sessions\x20found');}else{const _0x93aa54=_0x5a616e[_0x4e1d1e(0x259)],_0x3d54a9=this[_0x4e1d1e(0x192)](_0x250074,_0x93aa54);_0x5a616e[_0x4e1d1e(0x14a)]?await writeOutput(_0x3d54a9,_0x5a616e['output'],_0x4e1d1e(0x2da)):console['log'](_0x3d54a9);}!_0x36c8db&&(console[_0x4e1d1e(0x26f)](''),console[_0x4e1d1e(0x26f)](a42_0x126119['dim'](_0x4e1d1e(0x20b))),console[_0x4e1d1e(0x26f)](a42_0x126119[_0x4e1d1e(0x236)](_0x4e1d1e(0x204))+'or'+a42_0x126119[_0x4e1d1e(0x236)]('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x250074[_0x4e1d1e(0x252)]===0x0){if(_0x36c8db&&_0xa5ab74)console[_0x4e1d1e(0x2c2)](_0x4e1d1e(0x13f)+_0x36c8db+'.'+_0xa5ab74);else _0x36c8db?console['log']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x36c8db):console[_0x4e1d1e(0x2c2)](_0x4e1d1e(0x26d));}else await this[_0x4e1d1e(0x19f)](_0x250074,_0x5603ba,_0x36c8db);}}return 0x0;}[a42_0x45bdeb(0x192)](_0x3e9678,_0x62ca1c){const _0x3b1102=a42_0x45bdeb,_0x7b8584=[],_0x308f9e=new Map();let _0x5308c8=Infinity,_0x216f19=-Infinity;for(const _0x160870 of _0x3e9678){if(_0x160870[_0x3b1102(0x1f7)]?.[_0x3b1102(0x15d)]){const _0x3ff9a3=new Date(_0x160870[_0x3b1102(0x1f7)][_0x3b1102(0x15d)])[_0x3b1102(0x24d)](),_0x4112ec=_0x160870[_0x3b1102(0x1f7)][_0x3b1102(0x1db)]?new Date(_0x160870[_0x3b1102(0x1f7)][_0x3b1102(0x1db)])[_0x3b1102(0x24d)]():Date[_0x3b1102(0x1da)](),_0x216149=_0x160870[_0x3b1102(0x2cc)]?.[_0x3b1102(0x265)]||_0x3b1102(0x17e);!_0x308f9e[_0x3b1102(0x1cc)](_0x216149)&&_0x308f9e[_0x3b1102(0x1cb)](_0x216149,[]),_0x308f9e['get'](_0x216149)[_0x3b1102(0x2c9)]({'session':_0x160870,'startTime':_0x3ff9a3,'endTime':_0x4112ec,'duration':_0x4112ec-_0x3ff9a3}),_0x5308c8=Math[_0x3b1102(0x162)](_0x5308c8,_0x3ff9a3),_0x216f19=Math[_0x3b1102(0x170)](_0x216f19,_0x4112ec);}}if(_0x308f9e[_0x3b1102(0x29d)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x47c25f=process[_0x3b1102(0x2d0)][_0x3b1102(0x2d4)]||0x78,_0x103784=0x1e,_0x36c41f=0x32,_0x4d7540=0x4,_0x5d3056=Math['min'](_0x36c41f,Math['max'](_0x103784,Math[_0x3b1102(0x1f9)](_0x47c25f*0.3))),_0x28199=_0x47c25f-_0x5d3056-TIMELINE_CONFIG[_0x3b1102(0x1a6)]-0x3-_0x4d7540,_0x5d6abf=_0x216f19-_0x5308c8,_0x33d4b7=_0x5d6abf/_0x5d3056,_0x4a86ec=renderTimeAxis({'startTime':_0x5308c8,'endTime':_0x216f19,'durationMs':_0x5d6abf,'msPerChar':_0x33d4b7},_0x5d3056),_0xc3d835=[];for(const _0x704546 of _0x308f9e[_0x3b1102(0x22e)]()){_0xc3d835[_0x3b1102(0x2c9)](..._0x704546);}_0xc3d835[_0x3b1102(0x21c)]((_0xd779d5,_0x5e3316)=>_0x5e3316['startTime']-_0xd779d5[_0x3b1102(0x1eb)]);const _0x34e22e=new Date(_0x5308c8),_0x591bad=formatDate(_0x34e22e),_0x1aacd3=_0x4d7540+TIMELINE_CONFIG[_0x3b1102(0x28b)]+TIMELINE_CONFIG['ICON_SPACING']+_0x28199,_0x3be211='\x20'[_0x3b1102(0x154)](_0x1aacd3-_0x591bad[_0x3b1102(0x252)]),_0x351985=_0x3be211+a42_0x126119[_0x3b1102(0x236)](_0x591bad)+'\x20'+_0x4a86ec;_0x7b8584[_0x3b1102(0x2c9)](_0x351985);const _0x475cc8=0x16;let _0x13dd40=0x0;for(const _0x4efc2a of _0xc3d835){const _0x480390=_0x4efc2a[_0x3b1102(0x207)][_0x3b1102(0x2cc)]?.[_0x3b1102(0x265)]||'?',_0x36b636=Math['min'](stringWidth(_0x480390),_0x475cc8);_0x13dd40=Math[_0x3b1102(0x170)](_0x13dd40,_0x36b636);}for(const _0x55f464 of _0xc3d835){const {session:_0x464a50,startTime:_0x4b33c7,endTime:_0x4b595d,duration:_0x43ec5d}=_0x55f464,_0x332c90=_0x464a50[_0x3b1102(0x2cc)]?.['id'],_0x668bc5=_0x464a50['id'],_0x5c558f=_0x464a50['project']?.['name']||'?',_0x3fe9d5=_0x464a50[_0x3b1102(0x27d)]?.['name']||'?';let _0x1bcce8,_0x5d8a43;if(_0x464a50['lastAttempt']){const _0x13812f=_0x464a50['lastAttempt'];!_0x13812f[_0x3b1102(0x1ad)]?(_0x1bcce8=_0x13812f[_0x3b1102(0x1fa)]?'🛑':'🔄',_0x5d8a43=_0x13812f[_0x3b1102(0x1fa)]?a42_0x126119['yellow']:a42_0x126119[_0x3b1102(0x2bd)]):(_0x1bcce8=_0x13812f['success']?'✅':'❌',_0x5d8a43=_0x13812f[_0x3b1102(0x18f)]?a42_0x126119['green']:a42_0x126119[_0x3b1102(0x2b4)]);}else _0x1bcce8='⏳',_0x5d8a43=a42_0x126119[_0x3b1102(0x236)];const _0x2ef4bc='#'+_0x668bc5,_0x118ffe=_0x332c90?hyperlink(_0x2ef4bc,getWorkflowSessionUrl(_0x62ca1c,_0x332c90,_0x668bc5)):_0x2ef4bc;let _0x2a516a=_0x5c558f;stringWidth(_0x5c558f)>_0x475cc8&&(_0x2a516a=_0x5c558f[_0x3b1102(0x19e)](0x0,_0x475cc8-0x1)+'…');const _0xee6d=a42_0x126119[_0x3b1102(0x236)](_0x2a516a),_0x362951=stringWidth(_0x2a516a),_0x1e8e30='\x20'[_0x3b1102(0x154)](_0x13dd40-stringWidth(_0x2a516a)+0x2),_0x25050c='('+formatElapsed(_0x43ec5d)+')',_0x1d9837=stringWidth(_0x25050c),_0x594123=stringWidth(_0x2ef4bc),_0x524bd1=_0x594123+0x1+_0x362951+_0x1e8e30[_0x3b1102(0x252)],_0x26ce23=_0x28199-_0x524bd1-_0x1d9837-0x1-0x8;let _0x597095=_0x3fe9d5;stringWidth(_0x597095)>_0x26ce23&&(_0x597095=_0x597095[_0x3b1102(0x19e)](0x0,_0x26ce23-0x1)+'…');const _0x2f47f0=_0x118ffe+'\x20'+_0xee6d+_0x1e8e30+_0x597095,_0xa1bd5c=stringWidth(_0x2f47f0),_0x19a001=_0x28199-_0xa1bd5c-_0x1d9837,_0x2e3edb=_0x2f47f0+'\x20'[_0x3b1102(0x154)](Math[_0x3b1102(0x170)](0x1,_0x19a001))+a42_0x126119['dim'](_0x25050c),_0x3ea776=Math[_0x3b1102(0x1f9)]((_0x4b33c7-_0x5308c8)/_0x33d4b7),_0xd80103=Math[_0x3b1102(0x1f9)]((_0x4b595d-_0x5308c8)/_0x33d4b7),_0x290172=Math[_0x3b1102(0x170)](_0x3ea776+0x1,_0xd80103),_0xfcd86d=new Array(_0x5d3056)[_0x3b1102(0x19b)]('\x20');for(let _0x28b211=_0x3ea776;_0x28b211<Math[_0x3b1102(0x162)](_0x290172,_0x5d3056);_0x28b211++){_0xfcd86d[_0x28b211]='─';}const _0x517b1a=_0xfcd86d[_0x3b1102(0x1b5)](_0xfdd0de=>_0xfdd0de==='\x20'?'\x20':_0x5d8a43(_0xfdd0de))[_0x3b1102(0x2ae)]('');_0x7b8584[_0x3b1102(0x2c9)](_0x1bcce8+'\x20'+_0x2e3edb+'│'+_0x517b1a+'│');}return _0x7b8584[_0x3b1102(0x2ae)]('\x0a');}async[a42_0x45bdeb(0x19f)](_0x57ffc6,_0x4de64e,_0x1696a1){const _0x4a5b66=a42_0x45bdeb,{options:_0x14311c,tdx:_0x140e05}=_0x4de64e,_0x128052=_0x14311c['site'],{timelineRows:_0x97e83a,timeAxisHeader:_0x5cb821}=this[_0x4a5b66(0x29a)](_0x57ffc6,_0x128052),_0x465752=_0x97e83a[_0x4a5b66(0x2b9)](_0x330266=>_0x330266['attemptId']);if(_0x465752[_0x4a5b66(0x252)]===0x0){const _0xa8cee2=this[_0x4a5b66(0x192)](_0x57ffc6,_0x128052);console[_0x4a5b66(0x2c2)](_0xa8cee2);!_0x1696a1&&(console['error'](''),console[_0x4a5b66(0x26f)](a42_0x126119[_0x4a5b66(0x236)]('💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:')),console[_0x4a5b66(0x26f)](a42_0x126119[_0x4a5b66(0x236)](_0x4a5b66(0x204))+'or'+a42_0x126119['dim'](_0x4a5b66(0x2b8))));return;}_0x5cb821&&console[_0x4a5b66(0x2c2)](_0x5cb821);const _0x2bc06c=_0x97e83a[_0x4a5b66(0x2b9)](_0x4f6fe3=>_0x4f6fe3[_0x4a5b66(0x251)])[_0x4a5b66(0x1b5)](_0x23481f=>({'title':_0x23481f[_0x4a5b66(0x1cf)],'value':_0x23481f['attemptId']})),_0x2abb00=process[_0x4a5b66(0x2d0)][_0x4a5b66(0x142)]||0x3c,_0x18b6db=Math['max'](0x28,Math['floor'](_0x2abb00*0x2/0x3)),_0x43decb=await a42_0x430795({'type':'autocomplete','name':_0x4a5b66(0x251),'message':_0x4a5b66(0x1f1),'choices':_0x2bc06c,'initial':-0x1,'limit':_0x18b6db,'clearFirst':!![],'fallback':{'title':_0x4a5b66(0x25d),'value':null},'suggest':(_0x2b497b,_0x49c3e7)=>{const _0x5476ff=_0x4a5b66;if(!_0x2b497b)return Promise['resolve'](_0x49c3e7);const _0x4bef45=_0x49c3e7[_0x5476ff(0x2b9)](_0x379825=>{const _0x209e02=_0x5476ff,_0x478095=_0x379825;return _0x478095['title']['toLowerCase']()[_0x209e02(0x1a4)](_0x2b497b[_0x209e02(0x153)]());});return Promise[_0x5476ff(0x284)](_0x4bef45);}}),_0x26a7bf=()=>{const _0x7b9c6d=_0x4a5b66;process[_0x7b9c6d(0x2d0)][_0x7b9c6d(0x2d1)](_0x7b9c6d(0x1f5)),process[_0x7b9c6d(0x2d0)][_0x7b9c6d(0x2d1)]('\x1b[1A\x1b[2K'),process['stdout'][_0x7b9c6d(0x2d1)]('\x1b[1A\x1b[2K');},_0x1a2edf=_0x43decb&&_0x43decb[_0x4a5b66(0x251)]&&_0x43decb[_0x4a5b66(0x251)]!==null&&_0x43decb[_0x4a5b66(0x251)][_0x4a5b66(0x283)]()!=='';if(!_0x1a2edf){_0x26a7bf(),console['log'](a42_0x126119[_0x4a5b66(0x236)](_0x4a5b66(0x28e)));return;}_0x26a7bf();const _0x346ffb=_0x57ffc6['find'](_0x32538b=>_0x32538b['lastAttempt']?.['id']===_0x43decb['attemptId']);if(_0x346ffb){const _0x18a945=_0x346ffb[_0x4a5b66(0x2cc)]?.[_0x4a5b66(0x265)]||'?',_0x1257ac=_0x346ffb[_0x4a5b66(0x27d)]?.[_0x4a5b66(0x265)]||'?';console[_0x4a5b66(0x2c2)](_0x4a5b66(0x222)+a42_0x126119[_0x4a5b66(0x236)](_0x18a945)+',\x20Workflow:\x20'+a42_0x126119[_0x4a5b66(0x236)](_0x1257ac));}const _0x4cf976=new WorkflowTimelineCommand();await _0x4cf976[_0x4a5b66(0x221)]({'args':[],'options':{..._0x14311c,'attemptId':_0x43decb['attemptId']},'tdx':_0x140e05});}[a42_0x45bdeb(0x29a)](_0x2d252d,_0x4c89a5){const _0x98aa59=a42_0x45bdeb,_0x4723a8=new Map();for(const _0x549ad7 of _0x2d252d){_0x549ad7['id']&&_0x549ad7[_0x98aa59(0x1f7)]?.['id']&&_0x4723a8[_0x98aa59(0x1cb)](_0x549ad7['id'],_0x549ad7[_0x98aa59(0x1f7)]['id']);}const _0x4fc94d=[];let _0xaeb85f='';const _0x362d2c=this[_0x98aa59(0x192)](_0x2d252d,_0x4c89a5),_0x39a912=_0x362d2c['split']('\x0a');for(const _0x16a0e5 of _0x39a912){if(_0x16a0e5['startsWith']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x16a0e5[_0x98aa59(0x258)](/^\s+\d{4}-\d{2}-\d{2}/))_0xaeb85f=_0x16a0e5;else{if(_0x16a0e5[_0x98aa59(0x258)](/^[✅❌🔄🛑⏳]/)){const _0x5d586a=_0x16a0e5[_0x98aa59(0x258)](/#(\d+)/),_0x54a448=_0x5d586a?_0x5d586a[0x1]:null,_0x3da82e=_0x54a448?_0x4723a8['get'](_0x54a448)||null:null,_0xedf5e0=_0x2d252d[_0x98aa59(0x180)](_0xd4e779=>_0xd4e779['id']===_0x54a448),_0x23d83e=_0xedf5e0?.[_0x98aa59(0x2cc)]?.[_0x98aa59(0x265)]||'';_0x4fc94d[_0x98aa59(0x2c9)]({'displayLine':_0x16a0e5,'attemptId':_0x3da82e,'projectName':_0x23d83e});}}}return{'timelineRows':_0x4fc94d,'timeAxisHeader':_0xaeb85f};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]='workflow:attempts';[a42_0x45bdeb(0x17f)]='List\x20workflow\x20attempts';async[a42_0x45bdeb(0x221)](_0x33ef5b){const _0xaba72e=a42_0x45bdeb,{options:_0x271b3b,args:_0x55c3fb,tdx:_0x51730e}=_0x33ef5b,_0x285ae4=this[_0xaba72e(0x29e)](_0x55c3fb,_0x271b3b);if(!_0x285ae4)return 0x1;const {projectName:_0x5584ee,workflowName:_0x23db67}=_0x285ae4,_0x43b48a=_0x271b3b['includeRetried'];if(_0x271b3b['verbose']){if(_0x5584ee&&_0x23db67)console[_0xaba72e(0x26f)](_0xaba72e(0x2c6)+_0x5584ee+'.'+_0x23db67);else _0x5584ee&&console[_0xaba72e(0x26f)](_0xaba72e(0x202)+_0x5584ee);_0x43b48a&&console[_0xaba72e(0x26f)](_0xaba72e(0x152));}const _0x50cc47=await withSpinner(_0xaba72e(0x227),()=>_0x51730e['workflow']['attempts']({'projectName':_0x5584ee,'workflowName':_0x23db67,'includeRetried':_0x43b48a,'limit':_0x271b3b[_0xaba72e(0x27f)]}),{'verbose':_0x271b3b['verbose']}),_0x2a8353=_0x50cc47[_0xaba72e(0x1f2)],_0x11c4f6=_0x271b3b[_0xaba72e(0x27f)]||0x64,_0x1e4411=_0x2a8353[_0xaba72e(0x252)]>=_0x11c4f6?a42_0x126119[_0xaba72e(0x236)](_0xaba72e(0x1ec)):'';console[_0xaba72e(0x26f)](_0xaba72e(0x1c8)+_0x2a8353[_0xaba72e(0x252)]+_0xaba72e(0x1ca)+(_0x2a8353[_0xaba72e(0x252)]!==0x1?'s':'')+_0x1e4411);if(_0x271b3b[_0xaba72e(0x219)]===_0xaba72e(0x17a)||_0x271b3b[_0xaba72e(0x219)]===_0xaba72e(0x1c2)||_0x271b3b['format']==='table')await handleSDKOutput(_0x2a8353,_0x271b3b);else{if(_0x2a8353[_0xaba72e(0x252)]===0x0){if(_0x5584ee&&_0x23db67)console['log'](_0xaba72e(0x1d7)+_0x5584ee+'.'+_0x23db67);else _0x5584ee?console[_0xaba72e(0x2c2)](_0xaba72e(0x2a0)+_0x5584ee):console['log'](_0xaba72e(0x1c1));}else{const _0x4a4d69=_0x271b3b[_0xaba72e(0x259)],_0x3a6759=_0x2a8353[_0xaba72e(0x1b5)](_0x18456f=>{const _0x5a1b85=_0xaba72e,_0x528d30=a42_0x126119[_0x5a1b85(0x236)]('#'+_0x18456f['id']),_0xa3d2c3=_0x18456f[_0x5a1b85(0x2cc)]?.['id'],_0x2e1c50=_0x18456f[_0x5a1b85(0x26b)]||_0x18456f[_0x5a1b85(0x224)],_0x59061b=_0xa3d2c3&&_0x2e1c50?hyperlink(_0x528d30,getWorkflowAttemptUrl(_0x4a4d69,_0xa3d2c3,_0x2e1c50,_0x18456f['id'])):_0x528d30,{icon:_0x4f4167,text:_0x37694c}=getAttemptStatusDisplay(_0x18456f),_0x50c2b3=(_0x18456f[_0x5a1b85(0x2cc)]?.[_0x5a1b85(0x265)]||'?')+'.'+(_0x18456f[_0x5a1b85(0x27d)]?.['name']||'?'),_0x3f6563=_0x18456f['sessionTime']?a42_0x126119['dim'](_0x18456f[_0x5a1b85(0x2b5)]):'';return(_0x59061b+'\x20'+_0x4f4167+(_0x37694c?'\x20'+_0x37694c:'')+'\x20'+_0x50c2b3+'\x20'+_0x3f6563)[_0x5a1b85(0x2dd)]();});await writeOutput(_0x3a6759[_0xaba72e(0x2ae)]('\x0a'),_0x271b3b[_0xaba72e(0x14a)],_0xaba72e(0x2da));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x45bdeb(0x265)]='workflow:attempt';['description']=a42_0x45bdeb(0x241);async[a42_0x45bdeb(0x221)](_0x1a5a87){const _0x43dde5=a42_0x45bdeb,{options:_0x4086d8,args:_0x143546,tdx:_0x15cbdc}=_0x1a5a87,_0x503378=_0x143546[0x0];if(!_0x503378)return console[_0x43dde5(0x26f)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x4086d8[_0x43dde5(0x1d1)]&&console[_0x43dde5(0x26f)]('Attempt\x20ID:\x20'+_0x503378);const _0x51a88e=await withSpinner(_0x43dde5(0x299),()=>_0x15cbdc[_0x43dde5(0x27d)][_0x43dde5(0x157)](_0x503378),{'verbose':_0x4086d8['verbose']}),_0xb3e130=_0x51a88e[_0x43dde5(0x1f2)];let _0x2c365c;!_0xb3e130[_0x43dde5(0x1ad)]?_0x2c365c=_0xb3e130['cancelRequested']?_0x43dde5(0x2a6):'running':_0x2c365c=_0xb3e130[_0x43dde5(0x18f)]?_0x43dde5(0x18f):_0x43dde5(0x26f);let _0x15926b;if(_0xb3e130[_0x43dde5(0x15d)]&&_0xb3e130['finishedAt']){const _0x2eedae=new Date(_0xb3e130[_0x43dde5(0x15d)])[_0x43dde5(0x24d)](),_0x31d403=new Date(_0xb3e130[_0x43dde5(0x1db)])[_0x43dde5(0x24d)]();_0x15926b=Math['round']((_0x31d403-_0x2eedae)/0x3e8);}const _0x56ad46={'attempt_id':_0xb3e130['id'],'status':_0x2c365c,..._0xb3e130[_0x43dde5(0x209)]!==undefined&&{'index':_0xb3e130[_0x43dde5(0x209)]},..._0xb3e130['project']&&{'project':_0xb3e130[_0x43dde5(0x2cc)]['name']},..._0xb3e130['workflow']&&{'workflow':_0xb3e130['workflow']['name']},..._0xb3e130[_0x43dde5(0x224)]&&{'session_id':_0xb3e130['sessionId']},..._0xb3e130[_0x43dde5(0x2b5)]&&{'session_time':_0xb3e130['sessionTime']},..._0xb3e130[_0x43dde5(0x1e9)]&&{'retry_attempt':_0xb3e130[_0x43dde5(0x1e9)]},..._0x15926b!==undefined&&{'duration_sec':_0x15926b},..._0xb3e130[_0x43dde5(0x15d)]&&{'created_at':_0xb3e130[_0x43dde5(0x15d)]},..._0xb3e130[_0x43dde5(0x1db)]&&{'finished_at':_0xb3e130[_0x43dde5(0x1db)]},...Object[_0x43dde5(0x214)](_0xb3e130['params'])['length']>0x0&&{'params':_0xb3e130['params']}};return await handleSingleObjectOutput(_0x56ad46,_0x4086d8),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x45bdeb(0x265)]='workflow:tasks';[a42_0x45bdeb(0x17f)]='Show\x20tasks\x20for\x20an\x20attempt';async[a42_0x45bdeb(0x221)](_0x2b1c40){const _0x4e333a=a42_0x45bdeb,{options:_0x233994,args:_0x2b8c87,tdx:_0x2359a9}=_0x2b1c40,_0x44e750=_0x2b8c87[0x0];if(!_0x44e750)return console[_0x4e333a(0x26f)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x52899d=_0x233994[_0x4e333a(0x29c)];_0x233994[_0x4e333a(0x1d1)]&&(console['error'](_0x4e333a(0x182)+_0x44e750),_0x52899d&&console[_0x4e333a(0x26f)]('Including\x20subtasks:\x20yes'));const _0x21b4ff=await withSpinner(_0x4e333a(0x164),()=>_0x2359a9[_0x4e333a(0x27d)]['tasks'](_0x44e750,_0x52899d||![]),{'verbose':_0x233994[_0x4e333a(0x1d1)]}),_0x257717=_0x21b4ff[_0x4e333a(0x1f2)];return console['error']('✔\x20Found\x20'+_0x257717['length']+'\x20task'+(_0x257717[_0x4e333a(0x252)]!==0x1?'s':'')),await handleSDKOutput(_0x257717,_0x233994),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x1bd);['description']=a42_0x45bdeb(0x2d9);async[a42_0x45bdeb(0x221)](_0x19cf3b){const _0x59e4f1=a42_0x45bdeb,{options:_0x834936,args:_0x35fcd6,tdx:_0x4ad7ce}=_0x19cf3b,_0x49ae73=_0x35fcd6[0x0];let _0x3cc4f3=_0x35fcd6[0x1];if(!_0x49ae73)return console[_0x59e4f1(0x26f)](_0x59e4f1(0x191)),0x1;_0x834936[_0x59e4f1(0x1d1)]&&(console[_0x59e4f1(0x26f)](_0x59e4f1(0x182)+_0x49ae73),_0x3cc4f3&&console[_0x59e4f1(0x26f)](_0x59e4f1(0x19c)+_0x3cc4f3));const _0x358da5=await withSpinner('Fetching\x20log\x20files...',()=>_0x4ad7ce[_0x59e4f1(0x27d)][_0x59e4f1(0x1a1)](_0x49ae73,_0x3cc4f3),{'verbose':_0x834936[_0x59e4f1(0x1d1)]}),_0x143a85=_0x358da5[_0x59e4f1(0x1f2)];if(_0x143a85[_0x59e4f1(0x252)]===0x0)return console[_0x59e4f1(0x26f)](_0x59e4f1(0x171)),0x0;if(!_0x3cc4f3&&(_0x834936[_0x59e4f1(0x17a)]||_0x834936[_0x59e4f1(0x219)]))return await handleSDKOutput(_0x143a85,_0x834936),0x0;if(!_0x3cc4f3){const _0x679686=_0x143a85['map'](_0x48733b=>({'title':_0x48733b[_0x59e4f1(0x2cf)]+'\x20('+formatBytes(_0x48733b[_0x59e4f1(0x2e1)])+')','value':_0x48733b[_0x59e4f1(0x2cf)]})),_0x335a78=await a42_0x430795({'type':_0x59e4f1(0x1b8),'name':_0x59e4f1(0x2a3),'message':_0x59e4f1(0x2c0),'choices':_0x679686});if(!_0x335a78[_0x59e4f1(0x2a3)])return console['error'](_0x59e4f1(0x28e)),0x0;_0x3cc4f3=_0x335a78[_0x59e4f1(0x2a3)];}const _0x552bec=await withSpinner(_0x59e4f1(0x200),()=>_0x4ad7ce[_0x59e4f1(0x27d)][_0x59e4f1(0x26e)](_0x49ae73,_0x3cc4f3),{'verbose':_0x834936['verbose']}),_0x39ea15=_0x552bec[_0x59e4f1(0x1f2)];return _0x39ea15?console['log'](_0x39ea15):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x185);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x169);async[a42_0x45bdeb(0x221)](_0xc77ac6){const _0x24db8e=a42_0x45bdeb,{options:_0x5f463d,args:_0xd06b2f,tdx:_0x48ecf7}=_0xc77ac6,_0xcdeb48=_0xd06b2f[0x0];if(!_0xcdeb48)return console[_0x24db8e(0x26f)](_0x24db8e(0x191)),0x1;const _0x85ddd=_0x5f463d['reason'];_0x5f463d['verbose']&&(console[_0x24db8e(0x26f)](_0x24db8e(0x182)+_0xcdeb48),_0x85ddd&&console['error']('Reason:\x20'+_0x85ddd));if(!_0x5f463d[_0x24db8e(0x1b0)]){if(!isInteractive())return console[_0x24db8e(0x26f)](a42_0x126119[_0x24db8e(0x2b4)](_0x24db8e(0x183)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x24db8e(0x26f)](a42_0x126119[_0x24db8e(0x236)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x7bc754=await confirmKey(_0x24db8e(0x1cd)+_0xcdeb48+'?');if(!_0x7bc754)return console[_0x24db8e(0x26f)](a42_0x126119['yellow'](_0x24db8e(0x28e))),0x1;}const _0x3dc66a=await withSpinner(_0x24db8e(0x1ab),()=>_0x48ecf7[_0x24db8e(0x27d)][_0x24db8e(0x1ce)](_0xcdeb48,_0x85ddd),{'verbose':_0x5f463d[_0x24db8e(0x1d1)]}),_0x2db556=_0x3dc66a['data'];return console[_0x24db8e(0x26f)]('✔\x20'+_0x2db556),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x1d4);[a42_0x45bdeb(0x17f)]='Retry\x20a\x20session\x20or\x20attempt';async[a42_0x45bdeb(0x221)](_0x259809){const _0xeb2ccb=a42_0x45bdeb,{options:_0x1613f1,args:_0x553e78,tdx:_0x328d30}=_0x259809,_0x12002a=_0x553e78[0x0];if(!_0x12002a)return console['error'](_0xeb2ccb(0x20c)),console[_0xeb2ccb(0x26f)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x55bb1f=![],_0x4df09e=_0x12002a;if(_0x12002a[_0xeb2ccb(0x181)](_0xeb2ccb(0x21d)))_0x55bb1f=!![],_0x4df09e=_0x12002a[_0xeb2ccb(0x18e)](0x8);else{if(_0x12002a['startsWith'](_0xeb2ccb(0x1e6)))_0x55bb1f=![],_0x4df09e=_0x12002a[_0xeb2ccb(0x18e)](0x8);else return console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x243)),console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x15e)),0x1;}const _0x3f7834=_0x1613f1[_0xeb2ccb(0x1d8)],_0x30b574=_0x1613f1[_0xeb2ccb(0x14e)],_0x3a6e6c=_0x1613f1['params'],_0x5b2ab9=_0x1613f1[_0xeb2ccb(0x228)];_0x1613f1[_0xeb2ccb(0x1d1)]&&(console[_0xeb2ccb(0x26f)]('Target:\x20'+(_0x55bb1f?_0xeb2ccb(0x207):_0xeb2ccb(0x157))+'\x20'+_0x4df09e),_0x3f7834&&console[_0xeb2ccb(0x26f)]('From\x20task:\x20'+_0x3f7834),_0x30b574&&console['error'](_0xeb2ccb(0x26c)+_0x30b574),_0x3a6e6c&&console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x19a)+_0x3a6e6c),_0x5b2ab9&&console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x269)));let _0x12f9f9;if(_0x3a6e6c)try{if(_0x3a6e6c['startsWith']('@')){const _0x33175f=await import(_0xeb2ccb(0x141)),_0x1a64fc=_0x3a6e6c[_0xeb2ccb(0x18e)](0x1),_0x12b69d=await _0x33175f[_0xeb2ccb(0x2c7)](_0x1a64fc,_0xeb2ccb(0x1e3));_0x12f9f9=JSON[_0xeb2ccb(0x1ea)](_0x12b69d);}else _0x12f9f9=JSON[_0xeb2ccb(0x1ea)](_0x3a6e6c);}catch{return console[_0xeb2ccb(0x26f)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x1613f1[_0xeb2ccb(0x1b0)]){if(!isInteractive())return console['error'](a42_0x126119[_0xeb2ccb(0x2b4)]('\x0aError:'),_0xeb2ccb(0x25b)),console['error'](a42_0x126119[_0xeb2ccb(0x236)](_0xeb2ccb(0x25c))),0x1;const _0x57a975=await confirmKey(_0xeb2ccb(0x2b6)+(_0x55bb1f?'session':_0xeb2ccb(0x157))+'\x20'+_0x4df09e+'?');if(!_0x57a975)return console[_0xeb2ccb(0x26f)](a42_0x126119[_0xeb2ccb(0x1ee)](_0xeb2ccb(0x28e))),0x1;}let _0x2d9216;_0x55bb1f?_0x2d9216=await withSpinner(_0xeb2ccb(0x2a1),()=>_0x328d30[_0xeb2ccb(0x27d)][_0xeb2ccb(0x195)](_0x4df09e,{'fromTask':_0x3f7834,'retryParams':_0x12f9f9}),{'verbose':_0x1613f1[_0xeb2ccb(0x1d1)]}):_0x2d9216=await withSpinner(_0xeb2ccb(0x286),()=>_0x328d30[_0xeb2ccb(0x27d)][_0xeb2ccb(0x14d)](_0x4df09e,{'resumeFrom':_0x30b574,'retryParams':_0x12f9f9,'force':_0x5b2ab9}),{'verbose':_0x1613f1[_0xeb2ccb(0x1d1)]});const _0x3bf41d=_0x2d9216[_0xeb2ccb(0x1f2)];return console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x20e)),console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x249)+_0x3bf41d['attemptId']),console[_0xeb2ccb(0x26f)](_0xeb2ccb(0x279)+_0x3bf41d[_0xeb2ccb(0x224)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x203);[a42_0x45bdeb(0x17f)]='Start\x20a\x20workflow\x20run';async[a42_0x45bdeb(0x221)](_0x2cd46e){const _0x5d6d74=a42_0x45bdeb,{options:_0x12ea41,args:_0x52873c,tdx:_0x43d87b}=_0x2cd46e;let _0x56e6da=_0x52873c[0x0];if(!_0x56e6da){const _0x144b08=this['resolveProject']([],_0x12ea41),_0x295f3f=await withSpinner(_0x5d6d74(0x197),()=>_0x43d87b[_0x5d6d74(0x27d)]['workflows'](_0x144b08,{'limit':_0x12ea41[_0x5d6d74(0x27f)]}),{'verbose':_0x12ea41[_0x5d6d74(0x1d1)]}),_0x5ca0ed=_0x295f3f[_0x5d6d74(0x1f2)];if(_0x5ca0ed[_0x5d6d74(0x252)]===0x0)return console[_0x5d6d74(0x26f)](_0x5d6d74(0x14c)),!_0x144b08&&console[_0x5d6d74(0x26f)](a42_0x126119[_0x5d6d74(0x236)](_0x5d6d74(0x289))),0x1;const _0x4573e1=_0x5ca0ed['map'](_0x5b9aee=>({'title':_0x5b9aee[_0x5d6d74(0x2cc)]?.[_0x5d6d74(0x265)]+'.'+_0x5b9aee['name'],'value':_0x5b9aee[_0x5d6d74(0x2cc)]?.[_0x5d6d74(0x265)]+'.'+_0x5b9aee['name'],'description':_0x5b9aee['revision']?_0x5d6d74(0x1a7)+_0x5b9aee[_0x5d6d74(0x1e7)]:undefined})),_0x5d733f=await a42_0x430795({'type':_0x5d6d74(0x1b8),'name':_0x5d6d74(0x27d),'message':_0x5d6d74(0x174),'choices':_0x4573e1});if(!_0x5d733f[_0x5d6d74(0x27d)])return 0x1;_0x56e6da=_0x5d733f['workflow'];}if(!_0x56e6da[_0x5d6d74(0x1a4)]('.')){const _0x1dd70e=this[_0x5d6d74(0x184)]([],_0x12ea41);if(_0x1dd70e)_0x56e6da=_0x1dd70e+'.'+_0x56e6da;else return console[_0x5d6d74(0x26f)](a42_0x126119[_0x5d6d74(0x2b4)](_0x5d6d74(0x1af)),'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format'),console[_0x5d6d74(0x26f)](a42_0x126119['dim'](_0x5d6d74(0x289))),0x1;}const _0x50eae2=_0x12ea41[_0x5d6d74(0x2e0)],_0x128513=_0x12ea41[_0x5d6d74(0x2b5)],_0x45290f={};if(_0x50eae2&&Array[_0x5d6d74(0x161)](_0x50eae2))for(const _0x1786b8 of _0x50eae2){const _0x22cf65=_0x1786b8[_0x5d6d74(0x278)]('=');if(_0x22cf65===-0x1)return console[_0x5d6d74(0x26f)](_0x5d6d74(0x2a5)+_0x1786b8),console['error'](_0x5d6d74(0x1a0)),0x1;const _0x426f48=_0x1786b8[_0x5d6d74(0x18e)](0x0,_0x22cf65),_0x2cd7fa=_0x1786b8[_0x5d6d74(0x18e)](_0x22cf65+0x1);try{_0x45290f[_0x426f48]=JSON[_0x5d6d74(0x1ea)](_0x2cd7fa);}catch{_0x45290f[_0x426f48]=_0x2cd7fa;}}_0x12ea41['verbose']&&(console[_0x5d6d74(0x26f)](_0x5d6d74(0x1fb)+_0x56e6da),Object[_0x5d6d74(0x214)](_0x45290f)[_0x5d6d74(0x252)]>0x0&&console[_0x5d6d74(0x26f)](_0x5d6d74(0x1df)+JSON[_0x5d6d74(0x29b)](_0x45290f)),_0x128513&&console[_0x5d6d74(0x26f)](_0x5d6d74(0x1c5)+_0x128513));const _0x32682c=await withSpinner('Starting\x20workflow\x20run...',()=>_0x43d87b[_0x5d6d74(0x27d)][_0x5d6d74(0x194)](_0x56e6da,_0x45290f,{'sessionTime':_0x128513}),{'verbose':_0x12ea41[_0x5d6d74(0x1d1)]}),_0x498789=_0x32682c['data'];console[_0x5d6d74(0x26f)](_0x5d6d74(0x28f)),console[_0x5d6d74(0x26f)](_0x5d6d74(0x2bb)+_0x498789['id']),console['error']('\x20\x20Session\x20ID:\x20'+_0x498789[_0x5d6d74(0x224)]),console[_0x5d6d74(0x26f)](_0x5d6d74(0x2e2)+_0x498789[_0x5d6d74(0x2cc)]?.['name']),console[_0x5d6d74(0x26f)](_0x5d6d74(0x20a)+_0x498789[_0x5d6d74(0x27d)]?.[_0x5d6d74(0x265)]);if(_0x498789[_0x5d6d74(0x2cc)]?.['id']&&_0x498789['sessionId']&&_0x498789['id']){const _0xa18e1d=_0x12ea41[_0x5d6d74(0x259)],_0x21f298=getConsoleUrl(_0xa18e1d,_0x5d6d74(0x1d5)+_0x498789[_0x5d6d74(0x2cc)]['id']+_0x5d6d74(0x151)+_0x498789[_0x5d6d74(0x224)]+_0x5d6d74(0x28d)+_0x498789['id']);console[_0x5d6d74(0x26f)]('\x20\x20Console:\x20'+a42_0x126119[_0x5d6d74(0x1c4)](_0x21f298));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x167);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x210);async['execute'](_0x467a1c){const _0x414ea6=a42_0x45bdeb,{options:_0x3cf1b0,args:_0x19d7e8,tdx:_0xa251a1}=_0x467a1c,_0x405fc6=_0x19d7e8[0x0],_0xf0124e=_0x19d7e8[0x1]||'.';if(!_0x405fc6)return console['error'](_0x414ea6(0x15b)),console[_0x414ea6(0x26f)](_0x414ea6(0x1fd)),0x1;const _0x394638=_0x3cf1b0[_0x414ea6(0x1e7)];_0x3cf1b0[_0x414ea6(0x1d1)]&&(console[_0x414ea6(0x26f)](_0x414ea6(0x222)+_0x405fc6),console[_0x414ea6(0x26f)](_0x414ea6(0x1fc)+_0xf0124e),_0x394638&&console['error'](_0x414ea6(0x189)+_0x394638));const _0x2cf0d3=await withSpinner(_0x414ea6(0x216)+_0x405fc6+_0x414ea6(0x15a),()=>_0xa251a1[_0x414ea6(0x27d)]['download'](_0x405fc6,_0xf0124e,{'revision':_0x394638}),{'verbose':_0x3cf1b0[_0x414ea6(0x1d1)]}),_0x1186ab=_0x2cf0d3[_0x414ea6(0x1f2)];return console[_0x414ea6(0x26f)](_0x414ea6(0x217)+_0x1186ab['projectName']),console['error'](_0x414ea6(0x1c9)+_0x1186ab['revision']),console['error']('\x20\x20Files\x20extracted:\x20'+_0x1186ab['filesExtracted']),console[_0x414ea6(0x26f)](_0x414ea6(0x177)+_0xf0124e+'/'+_0x1186ab[_0x414ea6(0x2ca)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a42_0x45bdeb(0x1aa);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x298);async[a42_0x45bdeb(0x221)](_0x604c08){const _0xec5a73=a42_0x45bdeb,{options:_0x1d6c75,args:_0x1439a4,tdx:_0x5660d7}=_0x604c08;let _0xf962ef='.',_0x2a9266=_0x1d6c75[_0xec5a73(0x265)];if(_0x1439a4[0x0]){const {promises:_0x44619e}=await import('fs');try{const _0x4543ec=await _0x44619e['stat'](_0x1439a4[0x0]);if(_0x4543ec[_0xec5a73(0x16f)]())_0xf962ef=_0x1439a4[0x0];else return console[_0xec5a73(0x26f)](_0xec5a73(0x244)+_0x1439a4[0x0]+_0xec5a73(0x21e)),0x1;}catch{_0x2a9266=_0x1439a4[0x0],_0xf962ef='.';}}const _0x43c1f9=_0x1d6c75[_0xec5a73(0x1e7)],_0xf088ce=_0x1d6c75['skipValidation'];_0x1d6c75['verbose']&&(console[_0xec5a73(0x26f)](_0xec5a73(0x255)+_0xf962ef),_0x2a9266&&console['error'](_0xec5a73(0x1b6)+_0x2a9266),_0x43c1f9&&console['error'](_0xec5a73(0x189)+_0x43c1f9),_0xf088ce&&console[_0xec5a73(0x26f)]('Validation:\x20skipped'));const _0x1a34c4=await withSpinner(_0xec5a73(0x1f0),()=>_0x5660d7[_0xec5a73(0x27d)]['push'](_0xf962ef,{'projectName':_0x2a9266,'revision':_0x43c1f9,'skipValidation':_0xf088ce}),{'verbose':_0x1d6c75['verbose']}),_0x25c732=_0x1a34c4[_0xec5a73(0x1f2)];return console[_0xec5a73(0x26f)]('✔\x20Pushed\x20'+_0x25c732[_0xec5a73(0x2ca)]),console['error'](_0xec5a73(0x267)+_0x25c732[_0xec5a73(0x2bc)]),console[_0xec5a73(0x26f)](_0xec5a73(0x1c9)+_0x25c732[_0xec5a73(0x1e7)]),await this[_0xec5a73(0x20f)](_0x5660d7,_0x25c732[_0xec5a73(0x2ca)],_0x1d6c75[_0xec5a73(0x259)]),0x0;}}function a42_0x2886(){const _0x2d90aa=['\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','fs/promises','rows','requireProject','MAX_TASKS_DISPLAY','.\x20Expected\x20format:\x20KEY=VALUE','1441225iHWDVd','Listing\x20workflows...','\x0a✔\x20Already\x20up\x20to\x20date','pending','output','\x20logs','No\x20workflows\x20found','retryAttempt','resumeFrom','✔\x20Project:\x20','Source\x20directory\x20is\x20required','/sessions/','Include\x20retried:\x20yes','toLowerCase','repeat','List\x20workflow\x20execution\x20sessions','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','attempt','tasks','workflow:delete','...','Error:\x20Project\x20name\x20is\x20required','Key\x20cannot\x20be\x20empty','createdAt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','some','\x0aUpdate\x20existing\x20project\x20\x22','isArray','min','6909qpYMQB','Getting\x20attempt\x20tasks...','executePushProject','MAX_POLL_ITERATIONS','workflow:download','New\x20project\x20name:\x20','Kill\x20a\x20running\x20attempt','cwd','context','targetExists','window','green','isDirectory','max','No\x20log\x20files\x20found\x20for\x20this\x20attempt','\x0aDry\x20run\x20-\x20nothing\x20pushed','prepareCloneProject','Select\x20a\x20workflow\x20to\x20run','value','Usage:\x20workflow:delete\x20<project-name-or-id>','\x20\x20Location:\x20','\x22\x20to\x20new\x20project\x20\x22','Error:\x20Secret\x20key\x20is\x20required','json','\x20has\x20no\x20attempts','💡\x20Tip:\x20Use\x20','padStart','(unknown)','description','find','startsWith','Attempt\x20ID:\x20','\x0aError:','resolveProject','workflow:kill','⚠\x20Showing\x20first\x20','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','Source\x20directory:\x20','Revision:\x20','pollTimeline','getMonth','\x27...','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','substring','success','4893296HsjzyJ','Error:\x20Attempt\x20ID\x20is\x20required','renderSessionsTimeline','pullProject','run','retrySession','unknown','Loading\x20workflows...','Total:\x20','134GUBptz','Params:\x20','fill','Task\x20name:\x20','\x22\x20with\x20new\x20revision?','slice','navigateSessionsInteractive','Expected\x20format:\x20--param\x20key=value','logFiles','Listing\x20workflow\x20sessions...','workflow:push','includes','\x0aPolling...\x20(','GUTTER','revision:\x20','\x20secret','→\x20New\x20project:\x20','workflow:upload','Killing\x20attempt...','relative','done','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','Error:','yes','\x20new','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','workflow:projects','Auto-selected\x20latest\x20session:\x20','map','Project\x20name:\x20','hasChanges','select','workflowProject','✔\x20Project\x20updated','workflows','resolveProjectId','workflow:logs','✔\x20Secret\x20\x27','workflow:workflows','Updating\x20','No\x20attempts\x20found','jsonl','Attempt:\x20','cyan','Session\x20time:\x20','dryRun','workflow:use','✔\x20Found\x20','\x20\x20Revision:\x20','\x20attempt','set','has','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','kill','displayLine','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','verbose','total','\x0aFailed\x20to\x20fetch\x20attempt\x20data','workflow:retry','/app/workflows/','Listing\x20secrets...','No\x20attempts\x20found\x20for:\x20','fromTask','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','now','finishedAt','workflow:timeline','Source\x20project:\x20','duration','Parameters:\x20','---\x20','99dNhCzT','Invalid\x20format:\x20','utf-8','deleted','\x20of\x20','attempt:','revision','479380yCpsdP','retryAttemptName','parse','startTime','\x20(use\x20--limit\x20to\x20show\x20more)','fullName','yellow','getDate','Pushing\x20workflow\x20project...','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','data','metadata','message','\x1b[1A\x1b[2K','\x20(system)','lastAttempt','end','floor','cancelRequested','Workflow:\x20','Output\x20directory:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','updatedAt','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','Downloading\x20logs...','targetDir','Filter:\x20project=','workflow:run','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','Validation:\x20skipped','Failed\x20to\x20fetch\x20attempt\x20data','session','Pulling\x20project\x20','index','\x20\x20Workflow:\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflow:secrets:set','✔\x20Retry\x20started','showWorkflowConsoleUrl','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','startedAt','skipValidation','every','keys','5374XhkhhH','Downloading\x20project\x20','✔\x20Downloaded\x20','-\x20no\x20files\x20written','format','13278pJPYWz','sourceProjectName','sort','session:','\x20is\x20not\x20a\x20directory','Pull\x20workflow\x20project\x20to\x20local\x20folder','workflow:sessions','execute','Project:\x20','Dry\x20run:\x20yes','sessionId','replace','\x0a✔\x20Attempt\x20complete','Listing\x20workflow\x20attempts...','force','Loading\x20session...','table','applyPullProject','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','icon','values','LABEL_WIDTH_DIVISOR','Analyzing\x20project...','MAX_LABEL_COUNT','Session\x20','newProjectName','localeCompare','\x20from\x20session\x20','dim','Last\x20successful\x20update\x20was\x20at\x20iteration\x20','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','\x20project','modified','workflow:pull','2478WzivHC','status','clear','unchanged','new','Show\x20specific\x20attempt\x20details','\x20to\x20see\x20detailed\x20logs','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Error:\x20','getFullYear','POLL_INTERVAL_MS','Tip:\x20cd\x20to\x20workflows/','sessions','\x20\x20New\x20attempt\x20ID:\x20','group_error','tdx.json','16158406DhDFlm','getTime','✔\x20Workflow\x20project\x20context\x20cleared.','buildTimelineData','getHours','attemptId','length','Deleting\x20secret...','summary','Project\x20directory:\x20','fileCount','📁\x20','match','site','Pattern:\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','No\x20matching\x20sessions\x20found','\x20\x20Session\x20context\x20set\x20to:\x20','start','✔\x20Deleted\x20project\x20','Listing\x20workflow\x20projects...','Loading\x20sessions...','List\x20workflows','Writing\x20files...','name','white','\x20\x20Project\x20ID:\x20','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','Force:\x20yes','path','session_id','Resume\x20from:\x20','No\x20sessions\x20found','logs','error','isTTY','No\x20workflow\x20projects\x20found','ICON_SPACING','LABEL_MIN_SPACING','changes','\x0aClone\x20\x22','\x0aDry\x20run\x20-\x20no\x20files\x20written','durationMs','indexOf','\x20\x20Session\x20ID:\x20','key','workflowName','TASK_NAME_WIDTH','workflow','\x20-\x20','limit','text','Session\x20not\x20found:\x20','projects','trim','resolve','renderTimeline','Retrying\x20attempt...','\x0a✔\x20No\x20changes\x20to\x20push','🔄\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','state','ICON_WIDTH','renderSingleTimeline','/attempt/','Cancelled','✔\x20Workflow\x20run\x20started','\x20sessions\x20','Warning:','→\x20Project:\x20','sourceDir','Key:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Target\x20directory:\x20','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Getting\x20attempt\x20details...','generateSessionTimelineRows','stringify','includeSubtasks','size','parseProjectWorkflowPattern','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','No\x20attempts\x20found\x20in\x20project:\x20','Retrying\x20session...','basename','task','List\x20all\x20workflow\x20projects','Error:\x20Invalid\x20parameter\x20format:\x20','canceling','sys','(use\x20--limit\x20to\x20see\x20more)','\x20unchanged','resolveProjectDir','s\x20elapsed,\x20Ctrl+C\x20to\x20exit)','planned','No\x20sessions\x20found\x20in\x20project:\x20','join','follow','executeCloneProject','workflow:secrets:list','Using\x20attempt\x20','\x20deleted','red','sessionTime','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','diff','\x20\x20tdx\x20wf\x20use\x20<project>','filter','Files\x20to\x20upload:\x20','\x20\x20Attempt\x20ID:\x20','projectId','blue','No\x20workflow\x20sessions\x20found','152UeAdeM','Select\x20a\x20task\x20to\x20view\x20logs:','isNewProject','log','\x0aDry\x20run\x20-\x20no\x20project\x20created','delete','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Filter:\x20','readFile','\x20\x20Source:\x20','push','projectName','all','project','\x20\x20Changes:\x20','Latest\x20session\x20has\x20no\x20attempt','taskName','stdout','write','type','preparePushProject','columns','toISOString','\x20tasks','running','workflow:secrets:delete','Show\x20logs\x20for\x20a\x20workflow\x20attempt','list','No\x20workflow\x20tdx.json\x20found','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','trimEnd','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','param','fileSize','\x20\x20Project:\x20','Project\x20name\x20is\x20required','No\x20sessions\x20found\x20for:\x20'];a42_0x2886=function(){return _0x2d90aa;};return a42_0x2886();}export class WorkflowPullCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x23b);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x21f);async[a42_0x45bdeb(0x221)](_0x2bd14c){const _0x190ecb=a42_0x45bdeb,{options:_0x3a4842,args:_0x45f1d1,tdx:_0xdac92f}=_0x2bd14c,_0x3d24d1=_0x45f1d1[0x0],_0xd4b823=_0x45f1d1[0x1];if(!_0x3d24d1)return console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x2b4)](_0x190ecb(0x1af)),'Project\x20name\x20is\x20required'),console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x236)](_0x190ecb(0x238))),0x1;const _0x222479=_0x3a4842[_0x190ecb(0x1e7)];_0x3a4842['verbose']&&(console[_0x190ecb(0x26f)](_0x190ecb(0x222)+_0x3d24d1),_0xd4b823&&console[_0x190ecb(0x26f)](_0x190ecb(0x297)+_0xd4b823),_0x222479&&console[_0x190ecb(0x26f)]('Revision:\x20'+_0x222479),_0x3a4842['dryRun']&&console[_0x190ecb(0x26f)](_0x190ecb(0x223)));const _0x3b3d8c=await withSpinner(_0x190ecb(0x208)+_0x3d24d1+'...',()=>_0xdac92f[_0x190ecb(0x27d)][_0x190ecb(0x193)](_0x3d24d1,{'targetDir':_0xd4b823,'revision':_0x222479}),{'verbose':_0x3a4842[_0x190ecb(0x1d1)]}),_0x8e8ef2=_0x3b3d8c['data'];_0x8e8ef2[_0x190ecb(0x2c1)]?console['error'](_0x190ecb(0x1a9)+_0x8e8ef2[_0x190ecb(0x2ca)]):console[_0x190ecb(0x26f)](_0x190ecb(0x292)+_0x8e8ef2[_0x190ecb(0x2ca)]);console[_0x190ecb(0x26f)](_0x190ecb(0x1c9)+_0x8e8ef2[_0x190ecb(0x1e7)]),console['error']('\x20\x20Target:\x20'+(a42_0x273201['relative'](process['cwd'](),_0x8e8ef2[_0x190ecb(0x201)])||'.')),console['error'](_0x190ecb(0x2cd)+a42_0x126119['green']('+'+_0x8e8ef2[_0x190ecb(0x254)][_0x190ecb(0x240)]+'\x20new')+',\x20'+(a42_0x126119[_0x190ecb(0x1ee)]('~'+_0x8e8ef2[_0x190ecb(0x254)][_0x190ecb(0x23a)]+'\x20modified')+',\x20')+(a42_0x126119['red']('-'+_0x8e8ef2[_0x190ecb(0x254)][_0x190ecb(0x1e4)]+_0x190ecb(0x2b3))+',\x20')+(''+a42_0x126119[_0x190ecb(0x236)](_0x8e8ef2[_0x190ecb(0x254)][_0x190ecb(0x23f)]+_0x190ecb(0x2a9))));for(const _0x23894a of _0x8e8ef2[_0x190ecb(0x274)]){_0x23894a[_0x190ecb(0x2d2)]==='modified'&&_0x23894a[_0x190ecb(0x2b7)]&&(console[_0x190ecb(0x26f)]('\x0a'+a42_0x126119['cyan'](_0x190ecb(0x1e0)+_0x23894a[_0x190ecb(0x26a)])),console[_0x190ecb(0x26f)](_0x23894a[_0x190ecb(0x2b7)]));}if(!_0x8e8ef2[_0x190ecb(0x1b7)])return saveSessionContext({'workflow_project':_0x8e8ef2[_0x190ecb(0x2ca)]},_0x3a4842['session']),console[_0x190ecb(0x26f)](a42_0x126119['green'](_0x190ecb(0x148))),console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x236)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x8e8ef2[_0x190ecb(0x2ca)])),0x0;if(_0x3a4842[_0x190ecb(0x1c6)])return console['error'](a42_0x126119['yellow'](_0x190ecb(0x276))),0x0;if(!_0x3a4842[_0x190ecb(0x1b0)]){if(!isInteractive())return console['error'](a42_0x126119['red'](_0x190ecb(0x183)),_0x190ecb(0x25b)),console[_0x190ecb(0x26f)](a42_0x126119['dim'](_0x190ecb(0x25c))),0x1;const _0x3acaeb=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x3acaeb)return console[_0x190ecb(0x26f)](a42_0x126119['yellow'](_0x190ecb(0x28e)),_0x190ecb(0x218)),0x1;}await withSpinner(_0x190ecb(0x264),()=>_0xdac92f['workflow'][_0x190ecb(0x22b)](_0x8e8ef2,{'revision':_0x222479}),{'verbose':_0x3a4842[_0x190ecb(0x1d1)]}),saveSessionContext({'workflow_project':_0x8e8ef2[_0x190ecb(0x2ca)]},_0x3a4842[_0x190ecb(0x207)]),console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x16e)]('✔\x20Pull\x20complete'));const _0x34f3f1=a42_0x273201[_0x190ecb(0x1ac)](process[_0x190ecb(0x16a)](),_0x8e8ef2[_0x190ecb(0x201)])||'.';return console[_0x190ecb(0x26f)](a42_0x126119['dim']('\x20\x20Location:\x20'+_0x34f3f1)),console[_0x190ecb(0x26f)](a42_0x126119[_0x190ecb(0x236)](_0x190ecb(0x25e)+_0x8e8ef2[_0x190ecb(0x2ca)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x1a3);[a42_0x45bdeb(0x17f)]='Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data';async[a42_0x45bdeb(0x221)](_0x5be968){const _0x44d69c=a42_0x45bdeb,{options:_0x271f5b,args:_0x4412ff,tdx:_0x3193d5}=_0x5be968,_0x37fcaf=this['resolveProjectDir'](_0x4412ff,_0x271f5b),_0x4cde28=_0x271f5b[_0x44d69c(0x1e7)],_0x572c55=_0x271f5b[_0x44d69c(0x212)];_0x271f5b[_0x44d69c(0x1d1)]&&(_0x37fcaf&&console[_0x44d69c(0x26f)](_0x44d69c(0x188)+_0x37fcaf),_0x4cde28&&console[_0x44d69c(0x26f)]('Revision:\x20'+_0x4cde28),_0x271f5b['dryRun']&&console[_0x44d69c(0x26f)](_0x44d69c(0x223)),_0x572c55&&console[_0x44d69c(0x26f)](_0x44d69c(0x205)));let _0x23d5fa;try{_0x23d5fa=await withSpinner('Analyzing\x20changes...',()=>_0x3193d5[_0x44d69c(0x27d)][_0x44d69c(0x2d3)]({'sourceDir':_0x37fcaf,'revision':_0x4cde28,'skipValidation':_0x572c55}),{'verbose':_0x271f5b[_0x44d69c(0x1d1)]});}catch(_0x5a0652){if(_0x5a0652 instanceof Error&&_0x5a0652['message'][_0x44d69c(0x1a4)](_0x44d69c(0x2db)))return console['error'](a42_0x126119['red'](_0x44d69c(0x1af)),_0x44d69c(0x296)),_0x271f5b[_0x44d69c(0x1b9)]?console[_0x44d69c(0x26f)](a42_0x126119[_0x44d69c(0x236)](_0x44d69c(0x247)+_0x271f5b['workflowProject']+_0x44d69c(0x1d0)+_0x271f5b['workflowProject']+'\x27')):console[_0x44d69c(0x26f)](a42_0x126119['dim'](_0x44d69c(0x1ae))),0x1;throw _0x5a0652;}const _0x23a127=_0x23d5fa[_0x44d69c(0x1f2)];console[_0x44d69c(0x26f)](_0x44d69c(0x14f)+_0x23a127[_0x44d69c(0x2ca)]),console[_0x44d69c(0x26f)](_0x44d69c(0x2c8)+_0x23a127['sourceDir']),console[_0x44d69c(0x26f)](_0x44d69c(0x1c9)+_0x23a127[_0x44d69c(0x1e7)]),console[_0x44d69c(0x26f)](_0x44d69c(0x2cd)+a42_0x126119[_0x44d69c(0x16e)]('+'+_0x23a127[_0x44d69c(0x254)]['new']+_0x44d69c(0x1b1))+',\x20'+(a42_0x126119['yellow']('~'+_0x23a127[_0x44d69c(0x254)][_0x44d69c(0x23a)]+'\x20modified')+',\x20')+(a42_0x126119['red']('-'+_0x23a127[_0x44d69c(0x254)]['deleted']+_0x44d69c(0x2b3))+',\x20')+(''+a42_0x126119['dim'](_0x23a127[_0x44d69c(0x254)][_0x44d69c(0x23f)]+'\x20unchanged')));for(const _0x48a822 of _0x23a127['changes']){_0x48a822[_0x44d69c(0x2d2)]===_0x44d69c(0x23a)&&_0x48a822['diff']&&(console[_0x44d69c(0x26f)]('\x0a'+a42_0x126119[_0x44d69c(0x1c4)](_0x44d69c(0x1e0)+_0x48a822[_0x44d69c(0x26a)])),console['error'](_0x48a822['diff']));}if(!_0x23a127[_0x44d69c(0x1b7)])return console[_0x44d69c(0x26f)](a42_0x126119[_0x44d69c(0x16e)](_0x44d69c(0x287))),await this[_0x44d69c(0x20f)](_0x3193d5,_0x23a127[_0x44d69c(0x2ca)],_0x271f5b['site']),0x0;if(_0x271f5b['dryRun'])return console[_0x44d69c(0x26f)](a42_0x126119['yellow'](_0x44d69c(0x172))),0x0;if(!_0x271f5b[_0x44d69c(0x1b0)]){if(!isInteractive())return console[_0x44d69c(0x26f)](a42_0x126119['red']('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x44d69c(0x26f)](a42_0x126119['dim'](_0x44d69c(0x25c))),0x1;const _0x187870=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x187870)return console[_0x44d69c(0x26f)](a42_0x126119['yellow'](_0x44d69c(0x28e)),'-\x20nothing\x20pushed'),0x1;}const _0x4e3982=await withSpinner('Pushing\x20project...',()=>_0x3193d5['workflow'][_0x44d69c(0x165)](_0x23a127),{'verbose':_0x271f5b[_0x44d69c(0x1d1)]}),_0x1d4ae8=_0x4e3982[_0x44d69c(0x1f2)];return console['error'](a42_0x126119[_0x44d69c(0x16e)]('✔\x20Push\x20complete')),console[_0x44d69c(0x26f)](_0x44d69c(0x267)+_0x1d4ae8['projectId']),console[_0x44d69c(0x26f)]('\x20\x20Revision:\x20'+_0x1d4ae8[_0x44d69c(0x1e7)]),await this['showWorkflowConsoleUrl'](_0x3193d5,_0x1d4ae8[_0x44d69c(0x2ca)],_0x271f5b[_0x44d69c(0x259)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]='workflow:clone';[a42_0x45bdeb(0x17f)]='Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name';async[a42_0x45bdeb(0x221)](_0x343002){const _0xbc2677=a42_0x45bdeb,{options:_0x2632e2,args:_0x45c851,tdx:_0x4fed29}=_0x343002,_0x4b52a1=this[_0xbc2677(0x2aa)](_0x45c851,_0x2632e2),_0x509f1b=_0x2632e2[_0xbc2677(0x265)],_0x3f23f7=_0x2632e2[_0xbc2677(0x1e7)],_0x5aaf96=_0x2632e2[_0xbc2677(0x212)];if(!_0x4b52a1)return console['error'](a42_0x126119[_0xbc2677(0x2b4)]('Error:'),_0xbc2677(0x150)),console[_0xbc2677(0x26f)](a42_0x126119['dim']('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0xbc2677(0x26f)](a42_0x126119['dim']('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context')),0x1;if(!_0x509f1b)return console[_0xbc2677(0x26f)](a42_0x126119['red'](_0xbc2677(0x1af)),'--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name'),console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x236)](_0xbc2677(0x1ff))),0x1;_0x2632e2[_0xbc2677(0x1d1)]&&(console[_0xbc2677(0x26f)](_0xbc2677(0x188)+_0x4b52a1),console[_0xbc2677(0x26f)]('New\x20project\x20name:\x20'+_0x509f1b),_0x3f23f7&&console[_0xbc2677(0x26f)]('Revision:\x20'+_0x3f23f7),_0x2632e2[_0xbc2677(0x1c6)]&&console[_0xbc2677(0x26f)](_0xbc2677(0x223)),_0x5aaf96&&console[_0xbc2677(0x26f)](_0xbc2677(0x205)));const _0x4cb7c2=await withSpinner(_0xbc2677(0x230),()=>_0x4fed29['workflow'][_0xbc2677(0x173)](_0x4b52a1,_0x509f1b,{'revision':_0x3f23f7,'skipValidation':_0x5aaf96}),{'verbose':_0x2632e2[_0xbc2677(0x1d1)]}),_0x22b917=_0x4cb7c2[_0xbc2677(0x1f2)];console['error']('Source:\x20'+_0x22b917[_0xbc2677(0x293)]);_0x22b917[_0xbc2677(0x21b)]&&console[_0xbc2677(0x26f)](_0xbc2677(0x1dd)+_0x22b917[_0xbc2677(0x21b)]);console[_0xbc2677(0x26f)](_0xbc2677(0x168)+_0x22b917[_0xbc2677(0x233)]),console[_0xbc2677(0x26f)](_0xbc2677(0x189)+_0x22b917[_0xbc2677(0x1e7)]),console[_0xbc2677(0x26f)](_0xbc2677(0x2ba)+_0x22b917[_0xbc2677(0x256)]);_0x22b917[_0xbc2677(0x16c)]&&(console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x1ee)]('\x0a⚠\x20Project\x20\x22'+_0x22b917[_0xbc2677(0x233)]+'\x22\x20already\x20exists\x20(ID:\x20'+_0x22b917['existingProjectId']+')')),console['error'](a42_0x126119[_0xbc2677(0x1ee)](_0xbc2677(0x156))));if(_0x2632e2[_0xbc2677(0x1c6)])return console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x1ee)](_0xbc2677(0x2c3))),0x0;if(!_0x2632e2[_0xbc2677(0x1b0)]){if(!isInteractive())return console['error'](a42_0x126119[_0xbc2677(0x2b4)]('\x0aError:'),_0xbc2677(0x25b)),console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x236)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x14674d=_0x22b917[_0xbc2677(0x21b)]||a42_0x273201[_0xbc2677(0x2a2)](_0x4b52a1),_0x541bd7=_0x22b917[_0xbc2677(0x16c)]?_0xbc2677(0x160)+_0x509f1b+_0xbc2677(0x19d):_0xbc2677(0x275)+_0x14674d+_0xbc2677(0x178)+_0x509f1b+'\x22?',_0x5c22f9=await confirmKey(_0x541bd7);if(!_0x5c22f9)return console[_0xbc2677(0x26f)](a42_0x126119[_0xbc2677(0x1ee)](_0xbc2677(0x28e))),0x1;}const _0x26835a=await withSpinner(_0x22b917[_0xbc2677(0x16c)]?_0xbc2677(0x1c0)+_0x509f1b+_0xbc2677(0x15a):'Cloning\x20to\x20'+_0x509f1b+'...',()=>_0x4fed29[_0xbc2677(0x27d)][_0xbc2677(0x2b0)](_0x22b917),{'verbose':_0x2632e2[_0xbc2677(0x1d1)]}),_0x258e8c=_0x26835a[_0xbc2677(0x1f2)];return console['error'](a42_0x126119[_0xbc2677(0x16e)](_0x22b917[_0xbc2677(0x16c)]?_0xbc2677(0x1ba):'✔\x20Clone\x20complete')),console[_0xbc2677(0x26f)](_0xbc2677(0x2e2)+_0x258e8c['newProjectName']),console[_0xbc2677(0x26f)](_0xbc2677(0x267)+_0x258e8c['newProjectId']),console['error'](_0xbc2677(0x1c9)+_0x258e8c[_0xbc2677(0x1e7)]),await this['showWorkflowConsoleUrl'](_0x4fed29,_0x258e8c[_0xbc2677(0x233)],_0x2632e2[_0xbc2677(0x259)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x159);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x295);async[a42_0x45bdeb(0x221)](_0xee7ebf){const _0x37c394=a42_0x45bdeb,{options:_0x3554b1,args:_0xbbba51,tdx:_0x2a6247}=_0xee7ebf,_0x2a3708=_0xbbba51[0x0];if(!_0x2a3708)return console[_0x37c394(0x26f)](_0x37c394(0x29f)),console[_0x37c394(0x26f)](_0x37c394(0x176)),0x1;_0x3554b1[_0x37c394(0x1d1)]&&console['error'](_0x37c394(0x222)+_0x2a3708);if(!_0x3554b1[_0x37c394(0x1b0)]){if(!isInteractive())return console[_0x37c394(0x26f)](a42_0x126119[_0x37c394(0x2b4)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a42_0x126119[_0x37c394(0x236)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x3a1fad=await confirmKey(_0x37c394(0x2df)+_0x2a3708+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x3a1fad)return console['error'](a42_0x126119['yellow'](_0x37c394(0x28e))),0x1;}const _0x28952f=await withSpinner('Deleting\x20project\x20'+_0x2a3708+_0x37c394(0x15a),()=>_0x2a6247[_0x37c394(0x27d)][_0x37c394(0x2c4)](_0x2a3708),{'verbose':_0x3554b1[_0x37c394(0x1d1)]}),_0x2a3042=_0x28952f[_0x37c394(0x1f2)];return console[_0x37c394(0x26f)](_0x37c394(0x260)+_0x2a3042[_0x37c394(0x2ca)]),console[_0x37c394(0x26f)](_0x37c394(0x267)+_0x2a3042[_0x37c394(0x2bc)]),0x0;}}export function parseKeyValue(_0x5c1418){const _0x48a76e=a42_0x45bdeb,_0x180477=_0x5c1418[_0x48a76e(0x278)]('=');if(_0x180477===-0x1)throw new Error(_0x48a76e(0x1e2)+_0x5c1418+_0x48a76e(0x145));const _0x59dc03=_0x5c1418['substring'](0x0,_0x180477),_0x56fd80=_0x5c1418[_0x48a76e(0x18e)](_0x180477+0x1);if(!_0x59dc03)throw new Error(_0x48a76e(0x15c));return{'key':_0x59dc03,'value':_0x56fd80};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x2b1);[a42_0x45bdeb(0x17f)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a42_0x45bdeb(0x221)](_0x5b628c){const _0x4f721c=a42_0x45bdeb,{options:_0x109363,args:_0x4cc604,tdx:_0x3750e3}=_0x5b628c,_0x3108a3=this[_0x4f721c(0x143)](_0x4cc604,_0x109363);if(!_0x3108a3)return 0x1;_0x109363[_0x4f721c(0x1d1)]&&console[_0x4f721c(0x26f)](_0x4f721c(0x222)+_0x3108a3);const _0x28fd6a=await withSpinner(_0x4f721c(0x1d6),()=>_0x3750e3[_0x4f721c(0x27d)]['listSecrets'](_0x3108a3),{'verbose':_0x109363[_0x4f721c(0x1d1)]}),{secrets:_0x1e4085}=_0x28fd6a[_0x4f721c(0x1f2)];return console[_0x4f721c(0x26f)](_0x4f721c(0x1c8)+_0x1e4085[_0x4f721c(0x252)]+_0x4f721c(0x1a8)+(_0x1e4085['length']!==0x1?'s':'')),await handleSDKOutput(_0x1e4085,_0x109363),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a42_0x45bdeb(0x20d);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x187);async[a42_0x45bdeb(0x221)](_0x9281d3){const _0x8165f3=a42_0x45bdeb,{options:_0x2ad4ae,args:_0x3c38f9,tdx:_0x264a78}=_0x9281d3;let _0x27a71c,_0xe3254b;if(_0x3c38f9['length']>=0x2)_0x27a71c=_0x3c38f9[0x0],_0xe3254b=_0x3c38f9[0x1];else{if(_0x3c38f9['length']===0x1&&_0x2ad4ae[_0x8165f3(0x1b9)])_0x27a71c=_0x2ad4ae[_0x8165f3(0x1b9)],_0xe3254b=_0x3c38f9[0x0];else return _0x3c38f9[_0x8165f3(0x252)]===0x1?(console[_0x8165f3(0x26f)](_0x8165f3(0x15b)),console[_0x8165f3(0x26f)](_0x8165f3(0x289)),0x1):(console[_0x8165f3(0x26f)]('Error:\x20KEY=VALUE\x20is\x20required'),console[_0x8165f3(0x26f)]('Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE'),0x1);}let _0x16ca2e,_0x26f850;try{({key:_0x16ca2e,value:_0x26f850}=parseKeyValue(_0xe3254b));}catch(_0x24c6b7){return _0x24c6b7 instanceof Error&&console['error'](a42_0x126119['red'](_0x8165f3(0x1af)),_0x24c6b7[_0x8165f3(0x1f4)]),0x1;}_0x2ad4ae['verbose']&&(console[_0x8165f3(0x26f)](_0x8165f3(0x222)+_0x27a71c),console[_0x8165f3(0x26f)](_0x8165f3(0x294)+_0x16ca2e));const _0x2d4a1e=await withSpinner('Setting\x20secret...',()=>_0x264a78[_0x8165f3(0x27d)]['setSecret'](_0x27a71c,_0x16ca2e,_0x26f850),{'verbose':_0x2ad4ae[_0x8165f3(0x1d1)]}),_0x7aed96=_0x2d4a1e[_0x8165f3(0x1f2)];return console[_0x8165f3(0x26f)](_0x8165f3(0x1be)+_0x7aed96[_0x8165f3(0x27a)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x7aed96['projectName']+'\x27'),(_0x2ad4ae[_0x8165f3(0x17a)]||_0x2ad4ae[_0x8165f3(0x1c2)])&&await handleSingleObjectOutput(_0x7aed96,_0x2ad4ae),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a42_0x45bdeb(0x265)]=a42_0x45bdeb(0x2d8);[a42_0x45bdeb(0x17f)]=a42_0x45bdeb(0x2de);async[a42_0x45bdeb(0x221)](_0x197978){const _0x4e8012=a42_0x45bdeb,{options:_0xc468b3,args:_0x5a5107,tdx:_0xfeb878}=_0x197978;let _0x277f51,_0x2306c3;if(_0x5a5107['length']>=0x2)_0x277f51=_0x5a5107[0x0],_0x2306c3=_0x5a5107[0x1];else{if(_0x5a5107[_0x4e8012(0x252)]===0x1&&_0xc468b3[_0x4e8012(0x1b9)])_0x277f51=_0xc468b3['workflowProject'],_0x2306c3=_0x5a5107[0x0];else return _0x5a5107['length']===0x1?(console[_0x4e8012(0x26f)](_0x4e8012(0x15b)),console[_0x4e8012(0x26f)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x4e8012(0x26f)](_0x4e8012(0x179)),console[_0x4e8012(0x26f)](_0x4e8012(0x1b2)),0x1);}_0xc468b3[_0x4e8012(0x1d1)]&&(console[_0x4e8012(0x26f)]('Project:\x20'+_0x277f51),console[_0x4e8012(0x26f)]('Key:\x20'+_0x2306c3));if(!_0xc468b3[_0x4e8012(0x1b0)]){if(!isInteractive())return console[_0x4e8012(0x26f)](a42_0x126119[_0x4e8012(0x2b4)]('\x0aError:'),_0x4e8012(0x25b)),console[_0x4e8012(0x26f)](a42_0x126119[_0x4e8012(0x236)](_0x4e8012(0x25c))),0x1;const _0x482863=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27'+_0x2306c3+'\x27\x20from\x20project\x20\x27'+_0x277f51+'\x27?');if(!_0x482863)return console[_0x4e8012(0x26f)](a42_0x126119[_0x4e8012(0x1ee)](_0x4e8012(0x28e))),0x1;}const _0x2e2c65=await withSpinner(_0x4e8012(0x253),()=>_0xfeb878[_0x4e8012(0x27d)]['deleteSecret'](_0x277f51,_0x2306c3),{'verbose':_0xc468b3[_0x4e8012(0x1d1)]}),_0x33a66f=_0x2e2c65['data'];return console[_0x4e8012(0x26f)](_0x4e8012(0x1be)+_0x33a66f[_0x4e8012(0x27a)]+_0x4e8012(0x140)+_0x33a66f['projectName']+'\x27'),(_0xc468b3[_0x4e8012(0x17a)]||_0xc468b3[_0x4e8012(0x1c2)])&&await handleSingleObjectOutput(_0x33a66f,_0xc468b3),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(_0x15bc76){const _0x3f9167=a42_0x45bdeb,_0xde2835=Math[_0x3f9167(0x1f9)](_0x15bc76/0x3e8),_0x49c58a=Math[_0x3f9167(0x1f9)](_0xde2835/0x3c),_0x1adec1=Math[_0x3f9167(0x1f9)](_0x49c58a/0x3c),_0x37b85a=Math[_0x3f9167(0x1f9)](_0x1adec1/0x18);if(_0x37b85a>0x0){const _0xbc3071=_0x1adec1%0x18;return _0xbc3071>0x0?_0x37b85a+'d\x20'+_0xbc3071+'h':_0x37b85a+'d';}else{if(_0x1adec1>0x0){const _0x19e82d=_0x49c58a%0x3c;return _0x19e82d>0x0?_0x1adec1+'h\x20'+_0x19e82d+'m':_0x1adec1+'h';}else{if(_0x49c58a>0x0){const _0x1879f9=_0xde2835%0x3c;return _0x1879f9>0x0?_0x49c58a+'m\x20'+_0x1879f9+'s':_0x49c58a+'m';}else return _0xde2835+'s';}}}function formatTimestamp(_0x3f8ea2,_0x6d6337){const _0x401c51=a42_0x45bdeb,_0x2a3ca5=new Date(_0x3f8ea2),_0x376677=String(_0x2a3ca5[_0x401c51(0x250)]())[_0x401c51(0x17d)](0x2,'0'),_0xf05b65=String(_0x2a3ca5['getMinutes']())[_0x401c51(0x17d)](0x2,'0'),_0x4137b2=_0x376677+':'+_0xf05b65,_0x25a5f5=_0x2a3ca5[_0x401c51(0x245)]()===_0x6d6337[_0x401c51(0x245)]()&&_0x2a3ca5[_0x401c51(0x18b)]()===_0x6d6337[_0x401c51(0x18b)]()&&_0x2a3ca5[_0x401c51(0x1ef)]()===_0x6d6337[_0x401c51(0x1ef)]();if(_0x25a5f5)return _0x4137b2;else{const _0x30f0c4=String(_0x2a3ca5['getMonth']()+0x1)[_0x401c51(0x17d)](0x2,'0'),_0x558b0a=String(_0x2a3ca5['getDate']())[_0x401c51(0x17d)](0x2,'0');return _0x30f0c4+'-'+_0x558b0a+'\x20'+_0x4137b2;}}function formatDate(_0x3aff00){const _0x289239=a42_0x45bdeb,_0x1e0648=_0x3aff00[_0x289239(0x245)](),_0x46024f=String(_0x3aff00[_0x289239(0x18b)]()+0x1)[_0x289239(0x17d)](0x2,'0'),_0x54abaa=String(_0x3aff00[_0x289239(0x1ef)]())[_0x289239(0x17d)](0x2,'0');return _0x1e0648+'-'+_0x46024f+'-'+_0x54abaa;}function getTaskStateIcon(_0x4500b9){const _0x14d880={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x14d880[_0x4500b9]||'⚪';}function getBarChar(_0x3c8b6d){const _0x522b9b=a42_0x45bdeb;return _0x3c8b6d===_0x522b9b(0x26f)||_0x3c8b6d===_0x522b9b(0x24a)?'×':'─';}function getBarColor(_0xa8bdc7){const _0x5565d2=a42_0x45bdeb,_0x9a92a6={'success':a42_0x126119[_0x5565d2(0x16e)],'error':a42_0x126119[_0x5565d2(0x2b4)],'group_error':a42_0x126119['red'],'running':a42_0x126119[_0x5565d2(0x2bd)],'blocked':a42_0x126119[_0x5565d2(0x1ee)],'planned':a42_0x126119[_0x5565d2(0x236)],'canceling':a42_0x126119[_0x5565d2(0x1ee)]};return _0x9a92a6[_0xa8bdc7]||a42_0x126119[_0x5565d2(0x266)];}function parseTaskName(_0xd4640f){const _0x5c25f4=a42_0x45bdeb;let _0x4b36fe=_0xd4640f[_0x5c25f4(0x225)](/^\++/,'');const _0x1e7e72=_0x4b36fe['split']('+'),_0x2e8ca6=_0x1e7e72[_0x5c25f4(0x252)]>0x1?_0x1e7e72[_0x5c25f4(0x252)]-0x2:0x0,_0x37024d=_0x1e7e72[_0x1e7e72[_0x5c25f4(0x252)]-0x1]||_0x4b36fe;return{'level':_0x2e8ca6,'name':'+'+_0x37024d};}function truncateTaskName(_0x40152f,_0xb1f075){const _0x396516=a42_0x45bdeb,_0xd78915=stringWidth(_0x40152f);if(_0xd78915<=_0xb1f075)return _0x40152f;let _0x47eff6=_0x40152f;while(stringWidth(_0x47eff6+'…')>_0xb1f075&&_0x47eff6[_0x396516(0x252)]>0x0){_0x47eff6=_0x47eff6[_0x396516(0x19e)](0x0,-0x1);}return _0x47eff6+'…';}function calculateTimeScale(_0x780e3d,_0x22b047){const _0x1ad1bf=a42_0x45bdeb;return{'startTime':_0x780e3d[_0x1ad1bf(0x25f)],'endTime':_0x780e3d[_0x1ad1bf(0x1f8)],'durationMs':_0x780e3d[_0x1ad1bf(0x1de)],'msPerChar':_0x780e3d[_0x1ad1bf(0x1de)]/_0x22b047};}function timeToPosition(_0xc481af,_0x1658b7,_0x2af27d){const _0x2e21b3=a42_0x45bdeb,_0x331519=_0xc481af-_0x1658b7[_0x2e21b3(0x1eb)],_0x489ac2=Math['floor'](_0x331519/_0x1658b7['msPerChar']);return Math[_0x2e21b3(0x170)](0x0,Math['min'](_0x489ac2,_0x2af27d));}function renderTimeAxis(_0x320630,_0x413f4b){const _0x20ec53=a42_0x45bdeb,_0x35b8fa=Math['min'](TIMELINE_CONFIG[_0x20ec53(0x231)],Math['max'](TIMELINE_CONFIG['MIN_LABEL_COUNT'],Math[_0x20ec53(0x1f9)](_0x413f4b/TIMELINE_CONFIG[_0x20ec53(0x22f)]))),_0x315c2f=_0x320630[_0x20ec53(0x277)]/(_0x35b8fa-0x1),_0x46ba79=new Date(_0x320630[_0x20ec53(0x1eb)]),_0x2235e3=[];for(let _0x24e299=0x0;_0x24e299<_0x35b8fa;_0x24e299++){const _0xa1fa64=_0x320630[_0x20ec53(0x1eb)]+_0x24e299*_0x315c2f,_0x2dc36c=timeToPosition(_0xa1fa64,_0x320630,_0x413f4b),_0x2ce4c5=formatTimestamp(_0xa1fa64,_0x46ba79);_0x2235e3['push']({'pos':_0x2dc36c,'text':_0x2ce4c5});}const _0x287960=new Array(_0x413f4b)[_0x20ec53(0x19b)]('\x20');let _0x5bc7f0=-0x1;for(const {pos:_0x4fd696,text:_0x5c31c9}of _0x2235e3){let _0x2b8650=Math[_0x20ec53(0x170)](0x0,_0x4fd696-Math[_0x20ec53(0x1f9)](_0x5c31c9['length']/0x2));_0x2b8650<=_0x5bc7f0+TIMELINE_CONFIG[_0x20ec53(0x273)]&&(_0x2b8650=_0x5bc7f0+TIMELINE_CONFIG[_0x20ec53(0x273)]+0x1);_0x2b8650+_0x5c31c9[_0x20ec53(0x252)]>_0x413f4b&&(_0x2b8650=_0x413f4b-_0x5c31c9[_0x20ec53(0x252)]);if(_0x2b8650>=0x0&&_0x2b8650+_0x5c31c9[_0x20ec53(0x252)]<=_0x413f4b&&_0x2b8650>_0x5bc7f0){for(let _0x1a24d4=0x0;_0x1a24d4<_0x5c31c9[_0x20ec53(0x252)];_0x1a24d4++){_0x287960[_0x2b8650+_0x1a24d4]=_0x5c31c9[_0x1a24d4];}_0x5bc7f0=_0x2b8650+_0x5c31c9[_0x20ec53(0x252)]-0x1;}}return _0x287960[_0x20ec53(0x2ae)]('');}function renderTaskRow(_0x24f5dd,_0x2ea7cf,_0x440e82,_0x569231){const _0x4fb7ec=a42_0x45bdeb,{level:_0x5d6734,name:_0x56238e}=parseTaskName(_0x24f5dd[_0x4fb7ec(0x265)]),_0x26598b='\x20'[_0x4fb7ec(0x154)](_0x5d6734),_0x196e08=_0x24f5dd['window']?'('+formatElapsed(_0x24f5dd[_0x4fb7ec(0x16d)][_0x4fb7ec(0x1de)])+')':'',_0x3b16ca=stringWidth(_0x196e08),_0x3fc698=_0x5d6734*0x1,_0x2a1703=_0x569231-_0x3fc698-_0x3b16ca-0x1,_0x35cbe4=truncateTaskName(_0x56238e,_0x2a1703),_0x3de715=_0x26598b+_0x35cbe4,_0x38d210=stringWidth(_0x3de715),_0x130a41=_0x569231-_0x38d210-_0x3b16ca,_0x3224d9=_0x3de715+'\x20'[_0x4fb7ec(0x154)](Math[_0x4fb7ec(0x170)](0x1,_0x130a41))+a42_0x126119[_0x4fb7ec(0x236)](_0x196e08),_0x1608a0=getTaskStateIcon(_0x24f5dd[_0x4fb7ec(0x28a)]),_0x5bf4bc=new Array(_0x440e82)[_0x4fb7ec(0x19b)]('\x20');if(_0x24f5dd[_0x4fb7ec(0x16d)]){const _0x257338=timeToPosition(_0x24f5dd[_0x4fb7ec(0x16d)]['start'],_0x2ea7cf,_0x440e82),_0x10ca09=timeToPosition(_0x24f5dd[_0x4fb7ec(0x16d)][_0x4fb7ec(0x1f8)],_0x2ea7cf,_0x440e82),_0x2b5833=getBarChar(_0x24f5dd[_0x4fb7ec(0x28a)]),_0x12809b=Math[_0x4fb7ec(0x170)](_0x257338+0x1,_0x10ca09);for(let _0x3dd589=_0x257338;_0x3dd589<Math['min'](_0x12809b,_0x440e82);_0x3dd589++){_0x5bf4bc[_0x3dd589]=_0x2b5833;}}const _0x38148b=getBarColor(_0x24f5dd[_0x4fb7ec(0x28a)]),_0x2eae22=_0x5bf4bc[_0x4fb7ec(0x1b5)](_0x25a766=>_0x25a766==='\x20'?'\x20':_0x38148b(_0x25a766))[_0x4fb7ec(0x2ae)]('');return _0x1608a0+'\x20'+_0x3224d9+'│'+_0x2eae22+'│';}function calculateStats(_0x28b756){const _0x312c7f=a42_0x45bdeb,_0x4b0878={'total':_0x28b756[_0x312c7f(0x252)],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x21eba3 of _0x28b756){if(_0x21eba3['state']===_0x312c7f(0x18f))_0x4b0878['success']++;else{if(_0x21eba3[_0x312c7f(0x28a)]===_0x312c7f(0x26f)||_0x21eba3[_0x312c7f(0x28a)]===_0x312c7f(0x24a))_0x4b0878[_0x312c7f(0x26f)]++;else _0x21eba3[_0x312c7f(0x28a)]===_0x312c7f(0x2d7)?_0x4b0878['running']++:_0x4b0878['pending']++;}}return _0x4b0878;}function formatStats(_0x26384e){const _0x497d5=a42_0x45bdeb;return[_0x497d5(0x198)+_0x26384e[_0x497d5(0x1d2)],'✅\x20'+_0x26384e['success'],'❌\x20'+_0x26384e[_0x497d5(0x26f)],_0x497d5(0x288)+_0x26384e[_0x497d5(0x2d7)],'⏳\x20'+_0x26384e[_0x497d5(0x149)]][_0x497d5(0x2ae)]('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{['name']=a42_0x45bdeb(0x1dc);[a42_0x45bdeb(0x17f)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a42_0x45bdeb(0x221)](_0x480aea){const _0x4383a8=a42_0x45bdeb,{options:_0x2e3e8a,args:_0x417cc4,tdx:_0x24e219}=_0x480aea;let _0x10764c,_0x470a49,_0x1be946=![];if(_0x417cc4[0x0]){if(_0x417cc4[0x0][_0x4383a8(0x1a4)]('.')){const _0x3c3d72=this[_0x4383a8(0x29e)](_0x417cc4,_0x2e3e8a);if(!_0x3c3d72)return 0x1;_0x10764c=_0x3c3d72[_0x4383a8(0x2ca)],_0x470a49=_0x3c3d72['workflowName'];}else{_0x470a49=_0x417cc4[0x0],_0x10764c=_0x2e3e8a[_0x4383a8(0x1b9)];if(!_0x10764c)return console[_0x4383a8(0x26f)](a42_0x126119[_0x4383a8(0x2b4)](_0x4383a8(0x1af)),_0x4383a8(0x2c5)),0x1;_0x1be946=!![];}}else{const _0x41e939=this['parseProjectWorkflowPattern'](_0x417cc4,_0x2e3e8a);if(!_0x41e939)return 0x1;_0x10764c=_0x41e939[_0x4383a8(0x2ca)],_0x470a49=_0x41e939[_0x4383a8(0x27b)];}if(_0x2e3e8a[_0x4383a8(0x1d1)]){if(_0x10764c&&_0x470a49)console[_0x4383a8(0x26f)]('Filter:\x20'+_0x10764c+'.'+_0x470a49);else _0x10764c&&console[_0x4383a8(0x26f)](_0x4383a8(0x202)+_0x10764c);}const _0x48d758=_0x2e3e8a[_0x4383a8(0x251)],_0x5025ce=_0x2e3e8a[_0x4383a8(0x224)];if(_0x48d758){_0x5025ce&&console['error'](a42_0x126119[_0x4383a8(0x1ee)](_0x4383a8(0x291)),'Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id');const _0x276777=_0x2e3e8a[_0x4383a8(0x2af)];return _0x276777?await this['pollTimeline'](_0x480aea,_0x48d758):await this['renderSingleTimeline'](_0x480aea,_0x48d758,_0x2e3e8a),0x0;}if(_0x5025ce){const _0x3b3478=await withSpinner(_0x4383a8(0x229),()=>_0x24e219[_0x4383a8(0x27d)][_0x4383a8(0x248)]({'projectName':_0x10764c,'workflowName':_0x470a49,'limit':0x64}),{'verbose':_0x2e3e8a[_0x4383a8(0x1d1)]}),_0x413b76=_0x3b3478[_0x4383a8(0x1f2)]['find'](_0x3a5693=>_0x3a5693['id']===_0x5025ce);if(!_0x413b76)return console[_0x4383a8(0x26f)](a42_0x126119[_0x4383a8(0x2b4)]('Error:'),_0x4383a8(0x281)+_0x5025ce),0x1;if(!_0x413b76[_0x4383a8(0x1f7)]?.['id'])return console[_0x4383a8(0x26f)](a42_0x126119[_0x4383a8(0x2b4)]('Error:'),_0x4383a8(0x232)+_0x5025ce+_0x4383a8(0x17b)),0x1;const _0x5d5d0e=_0x413b76[_0x4383a8(0x1f7)]['id'];_0x2e3e8a[_0x4383a8(0x1d1)]&&console[_0x4383a8(0x26f)](_0x4383a8(0x2b2)+_0x5d5d0e+_0x4383a8(0x235)+_0x5025ce);const _0x199908=_0x2e3e8a['follow'];return _0x199908?await this[_0x4383a8(0x18a)](_0x480aea,_0x5d5d0e):await this[_0x4383a8(0x28c)](_0x480aea,_0x5d5d0e,_0x2e3e8a),0x0;}const _0x4eeaf4=await withSpinner(_0x4383a8(0x262),()=>_0x24e219[_0x4383a8(0x27d)][_0x4383a8(0x248)]({'projectName':_0x10764c,'workflowName':_0x470a49,'limit':_0x2e3e8a[_0x4383a8(0x27f)]||0x32}),{'verbose':_0x2e3e8a[_0x4383a8(0x1d1)]}),_0x3fc232=_0x4eeaf4[_0x4383a8(0x1f2)];if(_0x3fc232['length']===0x0){if(_0x10764c&&_0x470a49)console[_0x4383a8(0x26f)](_0x4383a8(0x13f)+_0x10764c+'.'+_0x470a49);else _0x10764c?console['error']('No\x20sessions\x20found\x20in\x20project:\x20'+_0x10764c):(console[_0x4383a8(0x26f)](_0x4383a8(0x2be)),console[_0x4383a8(0x26f)](a42_0x126119[_0x4383a8(0x236)](_0x4383a8(0x268))));return 0x0;}_0x3fc232[_0x4383a8(0x21c)]((_0x23e366,_0x378b47)=>{const _0x2c2acf=_0x4383a8,_0x3e3f2a=_0x23e366[_0x2c2acf(0x2b5)]||'',_0x382317=_0x378b47[_0x2c2acf(0x2b5)]||'';return _0x382317['localeCompare'](_0x3e3f2a);});if(_0x2e3e8a[_0x4383a8(0x17a)]||_0x2e3e8a[_0x4383a8(0x1c2)])return await handleSDKOutput(_0x3fc232,_0x2e3e8a),0x0;let _0x4df6cc;if(_0x1be946){const _0x11fac6=_0x3fc232[0x0];if(!_0x11fac6[_0x4383a8(0x1f7)]?.['id'])return console[_0x4383a8(0x26f)](_0x4383a8(0x2ce)),0x0;_0x4df6cc=_0x11fac6[_0x4383a8(0x1f7)]['id'],_0x2e3e8a[_0x4383a8(0x1d1)]&&console[_0x4383a8(0x26f)](_0x4383a8(0x1b4)+_0x11fac6['sessionTime']);}else{const _0x17e543=_0x3fc232[_0x4383a8(0x1b5)](_0x4052c4=>{const _0x273671=_0x4383a8,_0x305806=getAttemptStatusDisplay(_0x4052c4[_0x273671(0x1f7)]);return{'title':_0x4052c4[_0x273671(0x2cc)]?.[_0x273671(0x265)]+'.'+_0x4052c4[_0x273671(0x27d)]?.[_0x273671(0x265)]+_0x273671(0x27e)+_0x4052c4[_0x273671(0x2b5)]+'\x20'+_0x305806[_0x273671(0x22d)],'value':_0x4052c4[_0x273671(0x1f7)]?.['id']||'','description':_0x305806[_0x273671(0x280)]};}),_0xb435aa=await a42_0x430795({'type':_0x4383a8(0x1b8),'name':_0x4383a8(0x251),'message':'Select\x20a\x20session\x20to\x20view\x20timeline:','choices':_0x17e543['filter'](_0x1540c3=>_0x1540c3[_0x4383a8(0x175)]!=='')});if(!_0xb435aa[_0x4383a8(0x251)])return 0x0;_0x4df6cc=_0xb435aa['attemptId'];}const _0x4e41b5=_0x2e3e8a[_0x4383a8(0x2af)];return _0x4e41b5?await this[_0x4383a8(0x18a)](_0x480aea,_0x4df6cc):await this['renderSingleTimeline'](_0x480aea,_0x4df6cc,_0x2e3e8a),0x0;}async['renderSingleTimeline'](_0x1bcbbc,_0x774960,_0xa17574){const _0x3d997a=a42_0x45bdeb,{tdx:_0x39ce14}=_0x1bcbbc;let _0x56d53e,_0x13d0f9;try{[_0x56d53e,_0x13d0f9]=await Promise[_0x3d997a(0x2cb)]([_0x39ce14['workflow'][_0x3d997a(0x157)](_0x774960),_0x39ce14['workflow']['tasks'](_0x774960,![])]);}catch(_0x41c464){console[_0x3d997a(0x26f)](a42_0x126119[_0x3d997a(0x2b4)](_0x3d997a(0x206)));_0xa17574[_0x3d997a(0x1d1)]&&console['error'](_0x41c464);throw _0x41c464;}if(_0xa17574[_0x3d997a(0x17a)]||_0xa17574[_0x3d997a(0x1c2)]){const _0x29e751=this[_0x3d997a(0x24f)](_0x56d53e,_0x13d0f9);await handleSDKOutput([_0x29e751],_0xa17574);return;}const _0x229bda=_0x39ce14[_0x3d997a(0x16b)][_0x3d997a(0x259)],_0x282187=this['renderTimeline'](_0x56d53e,_0x13d0f9,_0x229bda);console[_0x3d997a(0x2c2)](_0x282187);}async[a42_0x45bdeb(0x18a)](_0x18652b,_0x125225){const _0x554af7=a42_0x45bdeb,{tdx:_0x50e1e9}=_0x18652b,_0x45548e=TIMELINE_CONFIG[_0x554af7(0x246)],_0x11f1c1=TIMELINE_CONFIG[_0x554af7(0x166)];let _0x17d2a7=0x0;while(_0x17d2a7<_0x11f1c1){process[_0x554af7(0x2d0)][_0x554af7(0x270)]&&process['stdout']['write']('\x1bc');let _0x376ecb,_0x178cfe;try{[_0x376ecb,_0x178cfe]=await Promise['all']([_0x50e1e9[_0x554af7(0x27d)][_0x554af7(0x157)](_0x125225),_0x50e1e9[_0x554af7(0x27d)][_0x554af7(0x158)](_0x125225,![])]);}catch(_0x1a1f6e){console[_0x554af7(0x26f)](a42_0x126119['red'](_0x554af7(0x1d3)));_0x17d2a7>0x0&&console[_0x554af7(0x26f)](a42_0x126119[_0x554af7(0x236)](_0x554af7(0x237)+_0x17d2a7));throw _0x1a1f6e;}const _0x33c9e8=_0x50e1e9[_0x554af7(0x16b)][_0x554af7(0x259)],_0x3593ee=this[_0x554af7(0x285)](_0x376ecb,_0x178cfe,_0x33c9e8);console[_0x554af7(0x2c2)](_0x3593ee);const _0x184749=_0x376ecb['done']&&_0x178cfe[_0x554af7(0x213)](_0x21ee92=>_0x21ee92['state']!==_0x554af7(0x2d7)&&_0x21ee92[_0x554af7(0x28a)]!==_0x554af7(0x2ac));if(_0x184749){console[_0x554af7(0x26f)](a42_0x126119[_0x554af7(0x16e)](_0x554af7(0x226)));break;}console['error'](a42_0x126119['dim'](_0x554af7(0x1a5)+_0x17d2a7*0x2+_0x554af7(0x2ab))),await new Promise(_0x51c45d=>setTimeout(_0x51c45d,_0x45548e)),_0x17d2a7++;}_0x17d2a7>=_0x11f1c1&&console[_0x554af7(0x26f)](a42_0x126119['yellow']('\x0a⚠\x20Maximum\x20polling\x20time\x20reached'));}[a42_0x45bdeb(0x285)](_0x1c2788,_0x3c5d93,_0x2536b5){const _0x382e53=a42_0x45bdeb,_0x54a325=[],_0x2da013=TIMELINE_CONFIG[_0x382e53(0x27c)],_0x1d05fd=0x5,_0x1e33ac=process[_0x382e53(0x2d0)]['columns']||0x78,_0x3da0f1=_0x1e33ac-_0x2da013-_0x1d05fd,_0x336da8=Math[_0x382e53(0x170)](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x382e53(0x162)](_0x3da0f1,TIMELINE_CONFIG['MAX_TIMELINE_WIDTH'])),_0x54e75a=new Date(_0x1c2788[_0x382e53(0x15d)])[_0x382e53(0x24d)](),_0x18ad49=_0x1c2788[_0x382e53(0x1db)]?new Date(_0x1c2788[_0x382e53(0x1db)])[_0x382e53(0x24d)]():Date[_0x382e53(0x1da)](),_0x1c6634={'start':_0x54e75a,'end':_0x18ad49,'duration':_0x18ad49-_0x54e75a},_0x190375=new Map(),_0x35c072=[];for(const _0x5da70e of _0x3c5d93){if(_0x5da70e[_0x382e53(0x211)]){const _0x5dd431=new Date(_0x5da70e[_0x382e53(0x211)])[_0x382e53(0x24d)](),_0x276751=_0x5da70e[_0x382e53(0x1fe)]?new Date(_0x5da70e['updatedAt'])[_0x382e53(0x24d)]():Date[_0x382e53(0x1da)](),_0x682b2a={'start':_0x5dd431,'end':_0x276751,'duration':_0x276751-_0x5dd431};_0x190375['set'](_0x5da70e['id'],_0x682b2a),_0x35c072['push']({'name':_0x5da70e[_0x382e53(0x1ed)],'state':_0x5da70e['state']||_0x382e53(0x196),'window':_0x682b2a});}else _0x35c072[_0x382e53(0x2c9)]({'name':_0x5da70e[_0x382e53(0x1ed)],'state':_0x5da70e[_0x382e53(0x28a)]||_0x382e53(0x2ac),'window':undefined});}_0x35c072[_0x382e53(0x21c)]((_0x18a8c3,_0x811936)=>{const _0xff5507=_0x382e53;if(!_0x18a8c3[_0xff5507(0x16d)])return 0x1;if(!_0x811936[_0xff5507(0x16d)])return-0x1;return _0x18a8c3[_0xff5507(0x16d)]['start']-_0x811936[_0xff5507(0x16d)][_0xff5507(0x25f)];});const _0x49ef4d=_0x35c072[_0x382e53(0x252)],_0x201bac=_0x49ef4d>TIMELINE_CONFIG[_0x382e53(0x144)];_0x201bac&&_0x35c072['splice'](TIMELINE_CONFIG[_0x382e53(0x144)]);const _0x126a64=calculateTimeScale(_0x1c6634,_0x336da8),_0x418c72=_0x1c2788[_0x382e53(0x1ad)]?_0x1c2788[_0x382e53(0x18f)]?a42_0x126119['green'](_0x382e53(0x18f)):a42_0x126119['red'](_0x382e53(0x26f)):a42_0x126119[_0x382e53(0x2bd)](_0x382e53(0x2d7)),_0x181c49=_0x1c2788[_0x382e53(0x2cc)]?.['id'],_0x21e6d9=_0x1c2788[_0x382e53(0x224)];let _0x47a7d4;if(_0x181c49&&_0x21e6d9){const _0x5c01a2=getWorkflowAttemptUrl(_0x2536b5,_0x181c49,_0x21e6d9,_0x1c2788['id']);_0x47a7d4=hyperlink(a42_0x126119['dim'](_0x1c2788['id']),_0x5c01a2);}else _0x47a7d4=a42_0x126119[_0x382e53(0x236)](_0x1c2788['id']);_0x54a325['push'](_0x382e53(0x1c3)+_0x47a7d4+'\x20-\x20'+_0x418c72+_0x382e53(0x27e)+formatElapsed(_0x1c6634[_0x382e53(0x1de)]));if(_0x35c072['length']>0x0){const _0x3d6c83=renderTimeAxis(_0x126a64,_0x336da8),_0xaa1c16=new Date(_0x1c6634[_0x382e53(0x25f)]),_0x5ac99b=formatDate(_0xaa1c16),_0x29ab80=TIMELINE_CONFIG[_0x382e53(0x28b)]+TIMELINE_CONFIG[_0x382e53(0x272)]+_0x2da013,_0x57f157=_0x5ac99b[_0x382e53(0x17d)](_0x29ab80),_0x160244=a42_0x126119[_0x382e53(0x236)](_0x57f157);_0x54a325[_0x382e53(0x2c9)](_0x160244+'\x20'+_0x3d6c83);for(const _0x1dfe49 of _0x35c072){_0x54a325[_0x382e53(0x2c9)](renderTaskRow(_0x1dfe49,_0x126a64,_0x336da8,_0x2da013));}const _0x528e83=calculateStats(_0x35c072);_0x54a325[_0x382e53(0x2c9)](formatStats(_0x528e83)),_0x201bac&&_0x54a325[_0x382e53(0x2c9)](a42_0x126119['yellow'](_0x382e53(0x186)+TIMELINE_CONFIG[_0x382e53(0x144)]+_0x382e53(0x1e5)+_0x49ef4d+_0x382e53(0x2d6))),_0x54a325[_0x382e53(0x2c9)](''),_0x54a325[_0x382e53(0x2c9)](a42_0x126119['dim'](_0x382e53(0x17c))+('tdx\x20wf\x20attempt\x20'+_0x1c2788['id']+_0x382e53(0x14b))+a42_0x126119['dim'](_0x382e53(0x242)));}else _0x54a325[_0x382e53(0x2c9)](_0x382e53(0x2dc));return _0x54a325['join']('\x0a');}['buildTimelineData'](_0x4174fc,_0x49771f){const _0x425618=a42_0x45bdeb,_0x24201d=new Date(_0x4174fc[_0x425618(0x15d)])[_0x425618(0x24d)](),_0xc7227b=_0x4174fc[_0x425618(0x1db)]?new Date(_0x4174fc[_0x425618(0x1db)])[_0x425618(0x24d)]():Date[_0x425618(0x1da)](),_0x361ddd=_0xc7227b-_0x24201d,_0x4095ff=[];for(const _0x20c09e of _0x49771f){if(_0x20c09e[_0x425618(0x211)]){const _0x30c01d=new Date(_0x20c09e['startedAt'])[_0x425618(0x24d)](),_0x321606=_0x20c09e['updatedAt']?new Date(_0x20c09e[_0x425618(0x1fe)])[_0x425618(0x24d)]():Date[_0x425618(0x1da)]();_0x4095ff[_0x425618(0x2c9)]({'name':_0x20c09e['fullName'],'state':_0x20c09e[_0x425618(0x28a)]||_0x425618(0x196),'window':{'start':_0x30c01d,'end':_0x321606,'duration':_0x321606-_0x30c01d}});}else _0x4095ff[_0x425618(0x2c9)]({'name':_0x20c09e[_0x425618(0x1ed)],'state':_0x20c09e[_0x425618(0x28a)]||_0x425618(0x2ac),'window':undefined});}const _0x35afa7=calculateStats(_0x4095ff);return{'attempt':{'id':_0x4174fc['id'],'status':_0x4174fc['done']?_0x4174fc[_0x425618(0x18f)]?_0x425618(0x18f):_0x425618(0x26f):_0x425618(0x2d7),'createdAt':_0x4174fc['createdAt'],'finishedAt':_0x4174fc['finishedAt'],'duration_ms':_0x361ddd},'tasks':_0x4095ff[_0x425618(0x1b5)](_0x3b2153=>({'name':_0x3b2153[_0x425618(0x265)],'state':_0x3b2153[_0x425618(0x28a)],'startedAt':_0x3b2153[_0x425618(0x16d)]?new Date(_0x3b2153[_0x425618(0x16d)][_0x425618(0x25f)])[_0x425618(0x2d5)]():null,'updatedAt':_0x3b2153[_0x425618(0x16d)]?new Date(_0x3b2153[_0x425618(0x16d)][_0x425618(0x1f8)])['toISOString']():null,'duration_ms':_0x3b2153[_0x425618(0x16d)]?.[_0x425618(0x1de)]||null})),'stats':_0x35afa7};}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3ac91c,_0x1c1f50){const _0x288992=a43_0x1b1d,_0x30c990=_0x3ac91c();while(!![]){try{const _0x44e727=-parseInt(_0x288992(0x1e3))/0x1*(-parseInt(_0x288992(0x1e5))/0x2)+parseInt(_0x288992(0x1e8))/0x3*(-parseInt(_0x288992(0x1e7))/0x4)+-parseInt(_0x288992(0x1e1))/0x5+-parseInt(_0x288992(0x1ef))/0x6+-parseInt(_0x288992(0x1ec))/0x7+parseInt(_0x288992(0x1f1))/0x8*(-parseInt(_0x288992(0x1eb))/0x9)+-parseInt(_0x288992(0x1ed))/0xa*(-parseInt(_0x288992(0x1f2))/0xb);if(_0x44e727===_0x1c1f50)break;else _0x30c990['push'](_0x30c990['shift']());}catch(_0x25fd90){_0x30c990['push'](_0x30c990['shift']());}}}(a43_0x6b65,0x99476));function a43_0x6b65(){const _0x4cadd5=['tdx/','402613mcYrRx','TD1\x20','4rQuxkx','X-Trino-User','188812srsWVj','3xphlih','Authorization',';\x20node/','175734oUaQJn','2799279LAhdXB','17567980VOhzOA','version','5972598LmCTlh','length','120vmcWIg','11mewAmr','993855tgGKsD'];a43_0x6b65=function(){return _0x4cadd5;};return a43_0x6b65();}import{platform}from'os';import{getAPIKey}from'./config.js';import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x478ae0=a43_0x1b1d,_0x5755ff=getVersion(),_0x4a2405=platform(),_0x408b6b=process[_0x478ae0(0x1ee)]['replace']('v','');return _0x478ae0(0x1e2)+_0x5755ff+'\x20('+_0x4a2405+_0x478ae0(0x1ea)+_0x408b6b+')';}export function getAuthHeaders(_0x1ef714,_0x41e1e9){const _0x1c1484=a43_0x1b1d,_0x150208=getVersion(),_0x3765d3={'User-Agent':getUserAgent(),'X-TD-Client':'tdx','X-TD-Client-Version':_0x150208};return _0x41e1e9&&(_0x3765d3[_0x1c1484(0x1e9)]=_0x1c1484(0x1e4)+_0x41e1e9),_0x3765d3;}function a43_0x1b1d(_0x3323ad,_0x13b69b){_0x3323ad=_0x3323ad-0x1e1;const _0x6b6500=a43_0x6b65();let _0x1b1dc3=_0x6b6500[_0x3323ad];return _0x1b1dc3;}export function toHeaderRecord(_0x55aea7){const _0x254af7={};for(const [_0x11870e,_0x52fd05]of Object['entries'](_0x55aea7)){_0x52fd05!==undefined&&(_0x254af7[_0x11870e]=_0x52fd05);}return _0x254af7;}export function getTrinoHeaders(_0x4e12e5,_0x563fea){const _0x5cc8c1=a43_0x1b1d,_0x36e9d8=getAuthHeaders(_0x4e12e5,_0x563fea),_0x5d11da=toHeaderRecord(_0x36e9d8);return delete _0x5d11da[_0x5cc8c1(0x1e9)],_0x563fea&&(_0x5d11da[_0x5cc8c1(0x1e6)]=_0x563fea),_0x5d11da;}export function hasAPIKey(_0x3755f9){const _0x30d948=a43_0x1b1d,_0x5dbed0=getAPIKey();return _0x5dbed0!==undefined&&_0x5dbed0[_0x30d948(0x1f0)]>0x0;}
1
+ (function(_0x24d3f7,_0x1cf6fc){const _0x15c326=a43_0x13f4,_0xccad92=_0x24d3f7();while(!![]){try{const _0x3e3131=parseInt(_0x15c326(0x171))/0x1+-parseInt(_0x15c326(0x17c))/0x2*(parseInt(_0x15c326(0x16f))/0x3)+-parseInt(_0x15c326(0x178))/0x4+-parseInt(_0x15c326(0x174))/0x5*(parseInt(_0x15c326(0x16d))/0x6)+-parseInt(_0x15c326(0x173))/0x7*(-parseInt(_0x15c326(0x17b))/0x8)+parseInt(_0x15c326(0x16c))/0x9*(parseInt(_0x15c326(0x172))/0xa)+parseInt(_0x15c326(0x179))/0xb;if(_0x3e3131===_0x1cf6fc)break;else _0xccad92['push'](_0xccad92['shift']());}catch(_0x3c716d){_0xccad92['push'](_0xccad92['shift']());}}}(a43_0x5740,0xeb8df));import{platform}from'os';import{getAPIKey}from'./config.js';function a43_0x5740(){const _0x23722f=['2688830gmHuFo','542983whBYwD','450cYbLYZ','length','X-Trino-User','tdx/','676448uPNqHI','7450938XfJQDz','replace','8rqLzBe','2yPkPbd','entries',';\x20node/','63zjycsX','54498SwJyRN','tdx','3001224tqhLfm','Authorization','314713knXsGH'];a43_0x5740=function(){return _0x23722f;};return a43_0x5740();}import{getVersion}from'./version.js';export{getVersion,getBuildInfo,isDevVersion}from'./version.js';export function getUserAgent(){const _0x1800ba=a43_0x13f4,_0x276f10=getVersion(),_0x497379=platform(),_0x3d4b5b=process['version'][_0x1800ba(0x17a)]('v','');return _0x1800ba(0x177)+_0x276f10+'\x20('+_0x497379+_0x1800ba(0x17e)+_0x3d4b5b+')';}function a43_0x13f4(_0x3f2283,_0x5989c3){_0x3f2283=_0x3f2283-0x16c;const _0x5740a4=a43_0x5740();let _0x13f4cd=_0x5740a4[_0x3f2283];return _0x13f4cd;}export function getAuthHeaders(_0x40ba9e,_0x1ca9ae){const _0x47a4d8=a43_0x13f4,_0x5a488b=getVersion(),_0x37e384={'User-Agent':getUserAgent(),'X-TD-Client':_0x47a4d8(0x16e),'X-TD-Client-Version':_0x5a488b};return _0x1ca9ae&&(_0x37e384[_0x47a4d8(0x170)]='TD1\x20'+_0x1ca9ae),_0x37e384;}export function toHeaderRecord(_0x192bc5){const _0x19c2a0=a43_0x13f4,_0x3c6ff4={};for(const [_0x48d0d0,_0x53b922]of Object[_0x19c2a0(0x17d)](_0x192bc5)){_0x53b922!==undefined&&(_0x3c6ff4[_0x48d0d0]=_0x53b922);}return _0x3c6ff4;}export function getTrinoHeaders(_0x1c4dfd,_0x5dd34a){const _0x2a03bb=a43_0x13f4,_0x4fb177=getAuthHeaders(_0x1c4dfd,_0x5dd34a),_0x4263a5=toHeaderRecord(_0x4fb177);return delete _0x4263a5['Authorization'],_0x5dd34a&&(_0x4263a5[_0x2a03bb(0x176)]=_0x5dd34a),_0x4263a5;}export function hasAPIKey(_0x1737d8){const _0x41604a=a43_0x13f4,_0x50868b=getAPIKey();return _0x50868b!==undefined&&_0x50868b[_0x41604a(0x175)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x5b47f1,_0x69a36d){const _0x151853=a44_0xe3a8,_0x329917=_0x5b47f1();while(!![]){try{const _0xd57fae=-parseInt(_0x151853(0x210))/0x1*(-parseInt(_0x151853(0x224))/0x2)+-parseInt(_0x151853(0x21c))/0x3*(parseInt(_0x151853(0x215))/0x4)+parseInt(_0x151853(0x208))/0x5+-parseInt(_0x151853(0x204))/0x6*(parseInt(_0x151853(0x203))/0x7)+-parseInt(_0x151853(0x1ff))/0x8*(-parseInt(_0x151853(0x235))/0x9)+parseInt(_0x151853(0x222))/0xa+-parseInt(_0x151853(0x1f7))/0xb*(parseInt(_0x151853(0x225))/0xc);if(_0xd57fae===_0x69a36d)break;else _0x329917['push'](_0x329917['shift']());}catch(_0x2c9716){_0x329917['push'](_0x329917['shift']());}}}(a44_0x5442,0xd957d));function a44_0xe3a8(_0x5bc0da,_0x536aaa){_0x5bc0da=_0x5bc0da-0x1f1;const _0x5442f3=a44_0x5442();let _0xe3a800=_0x5442f3[_0x5bc0da];return _0xe3a800;}import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x35e3ae from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x2f8dbb){const _0x183e47=a44_0xe3a8;return _0x2f8dbb['format']===_0x183e47(0x218)||_0x2f8dbb[_0x183e47(0x220)]==='jsonl'||_0x2f8dbb[_0x183e47(0x220)]===_0x183e47(0x1f6)||_0x2f8dbb[_0x183e47(0x220)]==='table'||_0x2f8dbb[_0x183e47(0x218)]===!![]||_0x2f8dbb[_0x183e47(0x22e)]===!![]||_0x2f8dbb[_0x183e47(0x1f6)]===!![]||_0x2f8dbb[_0x183e47(0x214)]===!![];}export function parseOutputOptions(_0x542709){const _0x570515=a44_0xe3a8;return{'format':_0x542709[_0x570515(0x220)]||_0x570515(0x214),'output':_0x542709[_0x570515(0x227)]||'','limit':_0x542709[_0x570515(0x21f)],'color':_0x542709[_0x570515(0x231)],'noColor':_0x542709[_0x570515(0x22a)]};}function convertSDKResultToQueryResult(_0x28e5c5){const _0x28b712=a44_0xe3a8,_0x47a742=[];if(_0x28e5c5['length']>0x0){const _0x1a7c06=_0x28e5c5[0x0];for(const [_0x386eca,_0x2c7c5b]of Object[_0x28b712(0x1f5)](_0x1a7c06)){let _0xb6b509=_0x28b712(0x20f);if(typeof _0x2c7c5b==='number')_0xb6b509=Number[_0x28b712(0x1fc)](_0x2c7c5b)?_0x28b712(0x1f8):_0x28b712(0x223);else{if(typeof _0x2c7c5b===_0x28b712(0x20c))_0xb6b509='boolean';else _0x2c7c5b===null&&(_0xb6b509=_0x28b712(0x20f));}_0x47a742[_0x28b712(0x234)]({'name':_0x386eca,'type':_0xb6b509});}}return{'queryId':_0x28b712(0x21d),'columns':_0x47a742,'data':_0x28e5c5,'stats':{'state':_0x28b712(0x21b),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x28e5c5[_0x28b712(0x20e)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}function a44_0x5442(){const _0xbd2dc7=['join','length','varchar','3478YuPnjt','forEach','max','resolve','table','35348oIofBQ','split','trim','json','[query]','bold','FINISHED','399QvyMfU','sdk-result','blue','limit','format','write','16343000VBibyU','double','862fBJZzT','10644DkkTbm','object','output','isTTY','[rule]','noColor','spawn','debug','list','jsonl','inherit','[params]','color','[logs]','stdin','push','9vcBCce','params','cmdout','No\x20data','cyan','red','stdout','[error]','close','repeat','─┴─','magenta','entries','tsv','24706quABoI','bigint','map','error','string','isInteger','─┬─','keys','9095344YYOtJo','stringify','log','query','14MurITG','4168110nZWgdU','-FXRSn','filter','pipe','5884470gCtCZz','less','padEnd','Results\x20saved\x20to\x20','boolean'];a44_0x5442=function(){return _0xbd2dc7;};return a44_0x5442();}export async function formatSDKOutput(_0x48630f,_0x2cc33c){const _0x113360=convertSDKResultToQueryResult(_0x48630f);return formatQueryOutput(_0x113360,_0x2cc33c);}export async function formatQueryOutput(_0x45e45f,_0x4886ee){const _0x1c5289=a44_0xe3a8,{format:_0x121226,limit:_0x32bd94,output:_0x25064d,color:_0x22076a,noColor:_0x5e4c15}=_0x4886ee,_0x3b5814=Boolean(_0x25064d)&&!_0x22076a,_0x2d8d44={'color':_0x22076a,'noColor':_0x5e4c15||_0x3b5814};if(_0x121226===_0x1c5289(0x214)){const _0x3adae2=shouldUseLess(_0x121226,_0x25064d);return formatAsTable(_0x45e45f,_0x32bd94,_0x3adae2,_0x2d8d44);}else{if(_0x121226==='json')return formatAsJSON(_0x45e45f,_0x2d8d44);else return _0x121226===_0x1c5289(0x22e)?formatAsJSONL(_0x45e45f,_0x2d8d44):formatQueryResult(_0x45e45f,_0x121226);}}function shouldUseLess(_0x57cd96,_0x1007f3){const _0x4064b1=a44_0xe3a8;return(_0x57cd96===_0x4064b1(0x214)||_0x57cd96===_0x4064b1(0x22d))&&process[_0x4064b1(0x23b)][_0x4064b1(0x228)]&&!_0x1007f3;}export function resolveOutputOptions(_0xb562f7){const _0x54ee29=a44_0xe3a8,_0x4c51ce=resolveOutputFormat(_0xb562f7[_0x54ee29(0x220)],_0xb562f7[_0x54ee29(0x227)],'table');let _0x424523=typeof _0xb562f7['limit']==='number'?_0xb562f7[_0x54ee29(0x21f)]:parseInt(_0xb562f7[_0x54ee29(0x21f)]||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x866295=_0xb562f7[_0x54ee29(0x227)]||'';return shouldUseLess(_0x4c51ce,_0x866295)&&(_0x424523=Infinity),{'format':_0x4c51ce,'output':_0x866295,'limit':_0x424523,'color':_0xb562f7[_0x54ee29(0x231)],'noColor':_0xb562f7['noColor']};}export function writeOutput(_0x25c692,_0x463379,_0x41b6e3){const _0xe7cff4=a44_0xe3a8;return _0x463379?(writeFileSync(_0x463379,_0x25c692),console[_0xe7cff4(0x1fa)](_0xe7cff4(0x20b)+_0x463379),Promise[_0xe7cff4(0x213)]()):shouldUseLess(_0x41b6e3||'','')?new Promise(_0x343eca=>{const _0x1f2444=_0xe7cff4,_0x1bfc14=spawn(_0x1f2444(0x209),[_0x1f2444(0x205)],{'stdio':[_0x1f2444(0x207),_0x1f2444(0x22f),_0x1f2444(0x22f)]});let _0x17ca7c=![];_0x1bfc14['on'](_0x1f2444(0x1fa),()=>{const _0x2738ca=_0x1f2444;!_0x17ca7c&&(_0x17ca7c=!![],console[_0x2738ca(0x201)](_0x25c692),_0x343eca());}),_0x1bfc14['on'](_0x1f2444(0x1f1),()=>{!_0x17ca7c&&(_0x17ca7c=!![],_0x343eca());}),_0x1bfc14['on'](_0x1f2444(0x22b),()=>{const _0x35558a=_0x1f2444;!_0x17ca7c&&_0x1bfc14[_0x35558a(0x233)]&&(_0x1bfc14[_0x35558a(0x233)]['on'](_0x35558a(0x1fa),()=>{}),_0x1bfc14['stdin'][_0x35558a(0x221)](_0x25c692),_0x1bfc14['stdin']['end']());}),!_0x1bfc14[_0x1f2444(0x233)]&&(!_0x17ca7c&&(_0x17ca7c=!![],console[_0x1f2444(0x201)](_0x25c692),_0x343eca()));}):(console[_0xe7cff4(0x201)](_0x25c692),Promise['resolve']());}export async function handleSDKOutput(_0x5dd465,_0x2e3a29){const _0x80a441=a44_0xe3a8,_0x314841=resolveOutputOptions(_0x2e3a29),_0x525dfd=await formatSDKOutput(_0x5dd465,_0x314841);await writeOutput(_0x525dfd,_0x314841[_0x80a441(0x227)]||undefined,_0x314841[_0x80a441(0x220)]);}export async function handleQueryOutput(_0x4687fb,_0x3e6abf){const _0x820469=a44_0xe3a8,_0x41c883=resolveOutputOptions(_0x3e6abf),_0x180211=await formatQueryOutput(_0x4687fb,_0x41c883);await writeOutput(_0x180211,_0x41c883[_0x820469(0x227)]||undefined,_0x41c883[_0x820469(0x220)]);}async function formatSingleObject(_0x2c178b,_0x7f56d2){const _0x36a52c=a44_0xe3a8,{format:_0x5a1f1f,color:_0x3e4bcc,noColor:_0x444ebc}=_0x7f56d2,_0x4852fc={'color':_0x3e4bcc,'noColor':_0x444ebc};if(_0x5a1f1f===_0x36a52c(0x218)){if(shouldUseColor(_0x4852fc))return colorizeJSON(_0x2c178b,_0x4852fc);return JSON[_0x36a52c(0x200)](_0x2c178b,null,0x2);}else{if(_0x5a1f1f==='jsonl'){if(shouldUseColor(_0x4852fc))return colorizeJSONCompact(_0x2c178b,_0x4852fc);return JSON[_0x36a52c(0x200)](_0x2c178b);}else{if(_0x5a1f1f===_0x36a52c(0x1f6))return Object[_0x36a52c(0x1f5)](_0x2c178b)[_0x36a52c(0x1f9)](([_0x6b3a86,_0x22e42c])=>_0x6b3a86+'\x09'+_0x22e42c)['join']('\x0a');else{const _0x518cc4=Object[_0x36a52c(0x1f5)](_0x2c178b);if(_0x518cc4[_0x36a52c(0x20e)]===0x0)return _0x36a52c(0x238);const _0x4d58b5=_0x2c178b[_0x36a52c(0x22c)],_0x3527ad=_0x2c178b[_0x36a52c(0x202)],_0x58d58c=_0x2c178b[_0x36a52c(0x236)],_0x29678b=_0x2c178b['rule'],_0x26a537=_0x3527ad?typeof _0x3527ad===_0x36a52c(0x1fb)?_0x3527ad:JSON[_0x36a52c(0x200)](_0x3527ad,null,0x2):undefined,_0x442d5f=_0x58d58c&&Object[_0x36a52c(0x1fe)](_0x58d58c)[_0x36a52c(0x20e)]>0x0?JSON['stringify'](_0x58d58c,null,0x2):undefined,_0x54db4d=_0x29678b&&Object['keys'](_0x29678b)['length']>0x0?JSON['stringify'](_0x29678b,null,0x2):undefined,_0x2c01e6=_0x518cc4[_0x36a52c(0x206)](([_0x452ad3])=>_0x452ad3!==_0x36a52c(0x22c)&&_0x452ad3!=='query'&&_0x452ad3!==_0x36a52c(0x236)&&_0x452ad3!=='rule'),_0x1711f2=Math[_0x36a52c(0x212)](..._0x2c01e6['map'](([_0x3ee447])=>_0x3ee447[_0x36a52c(0x20e)])),_0x5ccba7=Math[_0x36a52c(0x212)](..._0x2c01e6[_0x36a52c(0x1f9)](([,_0x5d8d82])=>{const _0x3177b4=_0x36a52c;try{const _0x5b54d5=_0x5d8d82===null||_0x5d8d82===undefined?'':typeof _0x5d8d82===_0x3177b4(0x226)?JSON[_0x3177b4(0x200)](_0x5d8d82):String(_0x5d8d82),_0x1de938=_0x5b54d5[_0x3177b4(0x216)]('\x0a');return Math['max'](..._0x1de938[_0x3177b4(0x1f9)](_0x56081d=>_0x56081d['length']),0x0);}catch{return 0x0;}}),0x14),_0x4ecda5=[];_0x4ecda5['push'](colorBorder('┌─'+'─'[_0x36a52c(0x1f2)](_0x1711f2)+_0x36a52c(0x1fd)+'─'[_0x36a52c(0x1f2)](_0x5ccba7)+'─┐',_0x4852fc)),_0x2c01e6['forEach'](([_0x575c8e,_0x2309e6])=>{const _0x31ac85=_0x36a52c;let _0x1e7f97;try{_0x1e7f97=_0x2309e6===null||_0x2309e6===undefined?'':typeof _0x2309e6===_0x31ac85(0x226)?JSON[_0x31ac85(0x200)](_0x2309e6):String(_0x2309e6);}catch{_0x1e7f97='[Object]';}const _0x29c2ef=_0x575c8e[_0x31ac85(0x20a)](_0x1711f2),_0x110696=_0x1e7f97[_0x31ac85(0x216)]('\x0a');_0x110696[_0x31ac85(0x211)]((_0x4183b9,_0x42ba79)=>{const _0xbaf0fe=_0x31ac85,_0x3061e5=colorBorder('│',_0x4852fc);_0x42ba79===0x0?_0x4ecda5['push'](_0x3061e5+'\x20'+_0x29c2ef+'\x20'+_0x3061e5+'\x20'+_0x4183b9[_0xbaf0fe(0x20a)](_0x5ccba7)+'\x20'+_0x3061e5):_0x4ecda5[_0xbaf0fe(0x234)](_0x3061e5+'\x20'+'\x20'[_0xbaf0fe(0x1f2)](_0x1711f2)+'\x20'+_0x3061e5+'\x20'+_0x4183b9[_0xbaf0fe(0x20a)](_0x5ccba7)+'\x20'+_0x3061e5);});}),_0x4ecda5[_0x36a52c(0x234)](colorBorder('└─'+'─'['repeat'](_0x1711f2)+_0x36a52c(0x1f3)+'─'[_0x36a52c(0x1f2)](_0x5ccba7)+'─┘',_0x4852fc));_0x26a537&&(_0x4ecda5[_0x36a52c(0x234)](''),_0x4ecda5[_0x36a52c(0x234)](String(a44_0x35e3ae['yellow'][_0x36a52c(0x21a)](_0x36a52c(0x219)))),_0x4ecda5[_0x36a52c(0x234)](_0x26a537));_0x442d5f&&(_0x4ecda5[_0x36a52c(0x234)](''),_0x4ecda5['push'](String(a44_0x35e3ae[_0x36a52c(0x21e)]['bold'](_0x36a52c(0x230)))),_0x4ecda5[_0x36a52c(0x234)](_0x442d5f));_0x54db4d&&(_0x4ecda5['push'](''),_0x4ecda5[_0x36a52c(0x234)](String(a44_0x35e3ae[_0x36a52c(0x1f4)][_0x36a52c(0x21a)](_0x36a52c(0x229)))),_0x4ecda5[_0x36a52c(0x234)](_0x54db4d));if(_0x4d58b5){if(_0x4d58b5['stderr']){_0x4ecda5['push'](''),_0x4ecda5[_0x36a52c(0x234)](String(a44_0x35e3ae[_0x36a52c(0x23a)][_0x36a52c(0x21a)](_0x36a52c(0x23c))));const _0x40cc4e=_0x4d58b5['stderr'][_0x36a52c(0x216)]('\x0a');_0x40cc4e[_0x36a52c(0x211)](_0x4a5725=>{const _0x328e3e=_0x36a52c;_0x4a5725[_0x328e3e(0x217)]()&&_0x4ecda5[_0x328e3e(0x234)](_0x4a5725);});}if(_0x4d58b5[_0x36a52c(0x237)]){_0x4ecda5[_0x36a52c(0x234)](''),_0x4ecda5[_0x36a52c(0x234)](String(a44_0x35e3ae[_0x36a52c(0x239)][_0x36a52c(0x21a)](_0x36a52c(0x232))));const _0x2aefd3=_0x4d58b5['cmdout']['split']('\x0a');_0x2aefd3[_0x36a52c(0x211)](_0x532ca9=>{const _0xdd3ff6=_0x36a52c;_0x532ca9[_0xdd3ff6(0x217)]()&&_0x4ecda5[_0xdd3ff6(0x234)](_0x532ca9);});}}return _0x4ecda5[_0x36a52c(0x20d)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x2e1496,_0x12380f){const _0x5e40c5=a44_0xe3a8;if(_0x12380f[_0x5e40c5(0x220)]===_0x5e40c5(0x214)){await handleSDKOutput([_0x2e1496],_0x12380f);return;}const _0x12e951=resolveOutputOptions(_0x12380f),_0x29e612=await formatSingleObject(_0x2e1496,_0x12e951);await writeOutput(_0x29e612,_0x12e951[_0x5e40c5(0x227)]||undefined,_0x12e951[_0x5e40c5(0x220)]);}
1
+ (function(_0x1207d2,_0x2d4548){const _0xadea56=a44_0x1a05,_0x4fed15=_0x1207d2();while(!![]){try{const _0x5c7ef9=parseInt(_0xadea56(0x236))/0x1*(parseInt(_0xadea56(0x207))/0x2)+parseInt(_0xadea56(0x219))/0x3+parseInt(_0xadea56(0x218))/0x4+parseInt(_0xadea56(0x227))/0x5+-parseInt(_0xadea56(0x21d))/0x6*(-parseInt(_0xadea56(0x209))/0x7)+-parseInt(_0xadea56(0x20a))/0x8*(parseInt(_0xadea56(0x223))/0x9)+parseInt(_0xadea56(0x1f4))/0xa*(-parseInt(_0xadea56(0x22f))/0xb);if(_0x5c7ef9===_0x2d4548)break;else _0x4fed15['push'](_0x4fed15['shift']());}catch(_0x255e09){_0x4fed15['push'](_0x4fed15['shift']());}}}(a44_0x49ab,0x5477b));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'../sdk/util/format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../utils/colors.js';import a44_0x228d16 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'../sdk/util/formatters.js';export function isStructuredFormat(_0x57a838){const _0x2bb891=a44_0x1a05;return _0x57a838[_0x2bb891(0x1f7)]==='json'||_0x57a838[_0x2bb891(0x1f7)]===_0x2bb891(0x23a)||_0x57a838[_0x2bb891(0x1f7)]===_0x2bb891(0x230)||_0x57a838[_0x2bb891(0x1f7)]==='table'||_0x57a838[_0x2bb891(0x220)]===!![]||_0x57a838[_0x2bb891(0x23a)]===!![]||_0x57a838[_0x2bb891(0x230)]===!![]||_0x57a838['table']===!![];}export function parseOutputOptions(_0x4def23){const _0x4909b0=a44_0x1a05;return{'format':_0x4def23[_0x4909b0(0x1f7)]||_0x4909b0(0x22c),'output':_0x4def23['output']||'','limit':_0x4def23['limit'],'color':_0x4def23[_0x4909b0(0x21a)],'noColor':_0x4def23[_0x4909b0(0x213)]};}function convertSDKResultToQueryResult(_0x3e8d5e){const _0x15af74=a44_0x1a05,_0x266f86=[];if(_0x3e8d5e[_0x15af74(0x23b)]>0x0){const _0x30631e=_0x3e8d5e[0x0];for(const [_0x3a87aa,_0x19892e]of Object[_0x15af74(0x233)](_0x30631e)){let _0x3dd299=_0x15af74(0x1fa);if(typeof _0x19892e===_0x15af74(0x215))_0x3dd299=Number[_0x15af74(0x200)](_0x19892e)?_0x15af74(0x208):_0x15af74(0x1f6);else{if(typeof _0x19892e===_0x15af74(0x203))_0x3dd299=_0x15af74(0x203);else _0x19892e===null&&(_0x3dd299=_0x15af74(0x1fa));}_0x266f86[_0x15af74(0x229)]({'name':_0x3a87aa,'type':_0x3dd299});}}return{'queryId':_0x15af74(0x20b),'columns':_0x266f86,'data':_0x3e8d5e,'stats':{'state':'FINISHED','queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3e8d5e['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}function a44_0x49ab(){const _0x5be3fd=['error','187kdeeLQ','tsv','resolve','max','entries','write','log','33cbhpdm','filter','repeat','forEach','jsonl','length','[logs]','stdout','output','149980LuYCpN','object','double','format','stdin','map','varchar','No\x20data','list','join','[Object]','isTTY','isInteger','cyan','split','boolean','trim','params','less','9974gBrzTF','bigint','14LRwBWr','16RWwNBW','sdk-result','[rule]','inherit','─┴─','[error]','spawn','blue','keys','noColor','debug','number','magenta','limit','332124ozZpgW','1034814dYnrNE','color','cmdout','bold','1578162nZnTdh','stringify','padEnd','json','stderr','pipe','3043179vxhffN','string','[params]','query','793065VEfkNt','-FXRSn','push','close','yellow','table','Results\x20saved\x20to\x20'];a44_0x49ab=function(){return _0x5be3fd;};return a44_0x49ab();}export async function formatSDKOutput(_0x543b04,_0x2bea6a){const _0x136496=convertSDKResultToQueryResult(_0x543b04);return formatQueryOutput(_0x136496,_0x2bea6a);}function a44_0x1a05(_0x3f39d7,_0x2a5bdb){_0x3f39d7=_0x3f39d7-0x1f1;const _0x49abd8=a44_0x49ab();let _0x1a05a0=_0x49abd8[_0x3f39d7];return _0x1a05a0;}export async function formatQueryOutput(_0x219214,_0x43b631){const _0x370767=a44_0x1a05,{format:_0x51c7e4,limit:_0x476a37,output:_0x426b4f,color:_0x244f35,noColor:_0x43c339}=_0x43b631,_0x437225=Boolean(_0x426b4f)&&!_0x244f35,_0x2f1fcb={'color':_0x244f35,'noColor':_0x43c339||_0x437225};if(_0x51c7e4==='table'){const _0x6be7a2=shouldUseLess(_0x51c7e4,_0x426b4f);return formatAsTable(_0x219214,_0x476a37,_0x6be7a2,_0x2f1fcb);}else{if(_0x51c7e4==='json')return formatAsJSON(_0x219214,_0x2f1fcb);else return _0x51c7e4===_0x370767(0x23a)?formatAsJSONL(_0x219214,_0x2f1fcb):formatQueryResult(_0x219214,_0x51c7e4);}}function shouldUseLess(_0x30fdaa,_0x4881ff){const _0xaa1198=a44_0x1a05;return(_0x30fdaa===_0xaa1198(0x22c)||_0x30fdaa===_0xaa1198(0x1fc))&&process[_0xaa1198(0x1f2)][_0xaa1198(0x1ff)]&&!_0x4881ff;}export function resolveOutputOptions(_0x418321){const _0x18a322=a44_0x1a05,_0x4ba576=resolveOutputFormat(_0x418321[_0x18a322(0x1f7)],_0x418321[_0x18a322(0x1f3)],_0x18a322(0x22c));let _0x3997bd=typeof _0x418321[_0x18a322(0x217)]===_0x18a322(0x215)?_0x418321[_0x18a322(0x217)]:parseInt(_0x418321['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x17db74=_0x418321['output']||'';return shouldUseLess(_0x4ba576,_0x17db74)&&(_0x3997bd=Infinity),{'format':_0x4ba576,'output':_0x17db74,'limit':_0x3997bd,'color':_0x418321[_0x18a322(0x21a)],'noColor':_0x418321[_0x18a322(0x213)]};}export function writeOutput(_0x3fab58,_0x42f8f6,_0x52dbab){const _0x4eba33=a44_0x1a05;return _0x42f8f6?(writeFileSync(_0x42f8f6,_0x3fab58),console[_0x4eba33(0x22e)](_0x4eba33(0x22d)+_0x42f8f6),Promise[_0x4eba33(0x231)]()):shouldUseLess(_0x52dbab||'','')?new Promise(_0x2e8f9c=>{const _0x25c38c=_0x4eba33,_0x270e2e=spawn(_0x25c38c(0x206),[_0x25c38c(0x228)],{'stdio':[_0x25c38c(0x222),_0x25c38c(0x20d),_0x25c38c(0x20d)]});let _0x3e6ce9=![];_0x270e2e['on'](_0x25c38c(0x22e),()=>{!_0x3e6ce9&&(_0x3e6ce9=!![],console['log'](_0x3fab58),_0x2e8f9c());}),_0x270e2e['on'](_0x25c38c(0x22a),()=>{!_0x3e6ce9&&(_0x3e6ce9=!![],_0x2e8f9c());}),_0x270e2e['on'](_0x25c38c(0x210),()=>{const _0x2de10a=_0x25c38c;!_0x3e6ce9&&_0x270e2e[_0x2de10a(0x1f8)]&&(_0x270e2e['stdin']['on'](_0x2de10a(0x22e),()=>{}),_0x270e2e[_0x2de10a(0x1f8)][_0x2de10a(0x234)](_0x3fab58),_0x270e2e['stdin']['end']());}),!_0x270e2e['stdin']&&(!_0x3e6ce9&&(_0x3e6ce9=!![],console[_0x25c38c(0x235)](_0x3fab58),_0x2e8f9c()));}):(console['log'](_0x3fab58),Promise['resolve']());}export async function handleSDKOutput(_0xd43a46,_0x4bb6e4){const _0x26215c=resolveOutputOptions(_0x4bb6e4),_0x28b9ca=await formatSDKOutput(_0xd43a46,_0x26215c);await writeOutput(_0x28b9ca,_0x26215c['output']||undefined,_0x26215c['format']);}export async function handleQueryOutput(_0x56ae57,_0x55d14b){const _0x247cd0=a44_0x1a05,_0x295f4a=resolveOutputOptions(_0x55d14b),_0x3d6270=await formatQueryOutput(_0x56ae57,_0x295f4a);await writeOutput(_0x3d6270,_0x295f4a['output']||undefined,_0x295f4a[_0x247cd0(0x1f7)]);}async function formatSingleObject(_0x12074b,_0x1d0630){const _0x39adc2=a44_0x1a05,{format:_0x5206cf,color:_0x175848,noColor:_0xc5084e}=_0x1d0630,_0x39d666={'color':_0x175848,'noColor':_0xc5084e};if(_0x5206cf===_0x39adc2(0x220)){if(shouldUseColor(_0x39d666))return colorizeJSON(_0x12074b,_0x39d666);return JSON['stringify'](_0x12074b,null,0x2);}else{if(_0x5206cf===_0x39adc2(0x23a)){if(shouldUseColor(_0x39d666))return colorizeJSONCompact(_0x12074b,_0x39d666);return JSON[_0x39adc2(0x21e)](_0x12074b);}else{if(_0x5206cf===_0x39adc2(0x230))return Object[_0x39adc2(0x233)](_0x12074b)[_0x39adc2(0x1f9)](([_0x59e223,_0x4e6ee4])=>_0x59e223+'\x09'+_0x4e6ee4)[_0x39adc2(0x1fd)]('\x0a');else{const _0x181df0=Object[_0x39adc2(0x233)](_0x12074b);if(_0x181df0[_0x39adc2(0x23b)]===0x0)return _0x39adc2(0x1fb);const _0x514ffd=_0x12074b[_0x39adc2(0x214)],_0x43761a=_0x12074b[_0x39adc2(0x226)],_0x13487b=_0x12074b[_0x39adc2(0x205)],_0x3a2e41=_0x12074b['rule'],_0x59219e=_0x43761a?typeof _0x43761a===_0x39adc2(0x224)?_0x43761a:JSON[_0x39adc2(0x21e)](_0x43761a,null,0x2):undefined,_0x208cdd=_0x13487b&&Object[_0x39adc2(0x212)](_0x13487b)['length']>0x0?JSON['stringify'](_0x13487b,null,0x2):undefined,_0x597c61=_0x3a2e41&&Object['keys'](_0x3a2e41)[_0x39adc2(0x23b)]>0x0?JSON[_0x39adc2(0x21e)](_0x3a2e41,null,0x2):undefined,_0x43c0b3=_0x181df0[_0x39adc2(0x237)](([_0x36eea8])=>_0x36eea8!==_0x39adc2(0x214)&&_0x36eea8!==_0x39adc2(0x226)&&_0x36eea8!==_0x39adc2(0x205)&&_0x36eea8!=='rule'),_0x285669=Math[_0x39adc2(0x232)](..._0x43c0b3['map'](([_0x106bfd])=>_0x106bfd[_0x39adc2(0x23b)])),_0x4d926e=Math[_0x39adc2(0x232)](..._0x43c0b3['map'](([,_0x50bae9])=>{const _0x294fa1=_0x39adc2;try{const _0x48d92e=_0x50bae9===null||_0x50bae9===undefined?'':typeof _0x50bae9===_0x294fa1(0x1f5)?JSON[_0x294fa1(0x21e)](_0x50bae9):String(_0x50bae9),_0x5018ea=_0x48d92e[_0x294fa1(0x202)]('\x0a');return Math['max'](..._0x5018ea[_0x294fa1(0x1f9)](_0x1f88c0=>_0x1f88c0[_0x294fa1(0x23b)]),0x0);}catch{return 0x0;}}),0x14),_0x35ebff=[];_0x35ebff[_0x39adc2(0x229)](colorBorder('┌─'+'─'[_0x39adc2(0x238)](_0x285669)+'─┬─'+'─'[_0x39adc2(0x238)](_0x4d926e)+'─┐',_0x39d666)),_0x43c0b3['forEach'](([_0x26b44d,_0x902731])=>{const _0x5ec5b4=_0x39adc2;let _0x50cb4a;try{_0x50cb4a=_0x902731===null||_0x902731===undefined?'':typeof _0x902731==='object'?JSON['stringify'](_0x902731):String(_0x902731);}catch{_0x50cb4a=_0x5ec5b4(0x1fe);}const _0x19f7e5=_0x26b44d[_0x5ec5b4(0x21f)](_0x285669),_0x24981e=_0x50cb4a[_0x5ec5b4(0x202)]('\x0a');_0x24981e[_0x5ec5b4(0x239)]((_0x5af088,_0x6e245b)=>{const _0x4cb273=_0x5ec5b4,_0xd739b4=colorBorder('│',_0x39d666);_0x6e245b===0x0?_0x35ebff[_0x4cb273(0x229)](_0xd739b4+'\x20'+_0x19f7e5+'\x20'+_0xd739b4+'\x20'+_0x5af088[_0x4cb273(0x21f)](_0x4d926e)+'\x20'+_0xd739b4):_0x35ebff[_0x4cb273(0x229)](_0xd739b4+'\x20'+'\x20'[_0x4cb273(0x238)](_0x285669)+'\x20'+_0xd739b4+'\x20'+_0x5af088['padEnd'](_0x4d926e)+'\x20'+_0xd739b4);});}),_0x35ebff[_0x39adc2(0x229)](colorBorder('└─'+'─'[_0x39adc2(0x238)](_0x285669)+_0x39adc2(0x20e)+'─'[_0x39adc2(0x238)](_0x4d926e)+'─┘',_0x39d666));_0x59219e&&(_0x35ebff[_0x39adc2(0x229)](''),_0x35ebff['push'](String(a44_0x228d16[_0x39adc2(0x22b)][_0x39adc2(0x21c)]('[query]'))),_0x35ebff[_0x39adc2(0x229)](_0x59219e));_0x208cdd&&(_0x35ebff[_0x39adc2(0x229)](''),_0x35ebff[_0x39adc2(0x229)](String(a44_0x228d16[_0x39adc2(0x211)]['bold'](_0x39adc2(0x225)))),_0x35ebff['push'](_0x208cdd));_0x597c61&&(_0x35ebff['push'](''),_0x35ebff[_0x39adc2(0x229)](String(a44_0x228d16[_0x39adc2(0x216)][_0x39adc2(0x21c)](_0x39adc2(0x20c)))),_0x35ebff['push'](_0x597c61));if(_0x514ffd){if(_0x514ffd['stderr']){_0x35ebff['push'](''),_0x35ebff[_0x39adc2(0x229)](String(a44_0x228d16['red']['bold'](_0x39adc2(0x20f))));const _0x431f19=_0x514ffd[_0x39adc2(0x221)][_0x39adc2(0x202)]('\x0a');_0x431f19[_0x39adc2(0x239)](_0x5033c0=>{const _0x27ef0e=_0x39adc2;_0x5033c0[_0x27ef0e(0x204)]()&&_0x35ebff['push'](_0x5033c0);});}if(_0x514ffd[_0x39adc2(0x21b)]){_0x35ebff[_0x39adc2(0x229)](''),_0x35ebff[_0x39adc2(0x229)](String(a44_0x228d16[_0x39adc2(0x201)][_0x39adc2(0x21c)](_0x39adc2(0x1f1))));const _0x37747b=_0x514ffd[_0x39adc2(0x21b)]['split']('\x0a');_0x37747b[_0x39adc2(0x239)](_0x1a1580=>{const _0x37999f=_0x39adc2;_0x1a1580[_0x37999f(0x204)]()&&_0x35ebff[_0x37999f(0x229)](_0x1a1580);});}}return _0x35ebff[_0x39adc2(0x1fd)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x4e64cf,_0x5dc06f){const _0x14a239=a44_0x1a05;if(_0x5dc06f[_0x14a239(0x1f7)]==='table'){await handleSDKOutput([_0x4e64cf],_0x5dc06f);return;}const _0x41b938=resolveOutputOptions(_0x5dc06f),_0x6f6ba2=await formatSingleObject(_0x4e64cf,_0x41b938);await writeOutput(_0x6f6ba2,_0x41b938[_0x14a239(0x1f3)]||undefined,_0x41b938[_0x14a239(0x1f7)]);}