@treasuredata/tdx 0.8.0 → 0.8.1

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 (123) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/client/cdp-api-client.js +1 -1
  6. package/dist/client/engage-api-client.js +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-api-client.d.ts +2 -0
  11. package/dist/client/td-api-client.d.ts.map +1 -1
  12. package/dist/client/td-api-client.js +1 -1
  13. package/dist/client/td-api-client.js.map +1 -1
  14. package/dist/client/trino-api-client.js +1 -1
  15. package/dist/client/workflow-client.js +1 -1
  16. package/dist/commands/activations.js +1 -1
  17. package/dist/commands/api-command.js +1 -1
  18. package/dist/commands/auth-command.js +1 -1
  19. package/dist/commands/chat-command.js +1 -1
  20. package/dist/commands/claude-command.d.ts.map +1 -1
  21. package/dist/commands/claude-command.js +1 -1
  22. package/dist/commands/claude-command.js.map +1 -1
  23. package/dist/commands/claude-statusline-command.d.ts +1 -1
  24. package/dist/commands/claude-statusline-command.d.ts.map +1 -1
  25. package/dist/commands/claude-statusline-command.js +1 -1
  26. package/dist/commands/claude-statusline-command.js.map +1 -1
  27. package/dist/commands/claude-usage-command.js +1 -1
  28. package/dist/commands/command.js +1 -1
  29. package/dist/commands/connection-command.js +1 -1
  30. package/dist/commands/context-command.js +1 -1
  31. package/dist/commands/databases.js +1 -1
  32. package/dist/commands/describe.js +1 -1
  33. package/dist/commands/engage-command.js +1 -1
  34. package/dist/commands/job-command.js +1 -1
  35. package/dist/commands/llm-command.js +1 -1
  36. package/dist/commands/llm-proxy.js +1 -1
  37. package/dist/commands/parent-segment-command.js +1 -1
  38. package/dist/commands/profiles-command.js +1 -1
  39. package/dist/commands/query-command.js +1 -1
  40. package/dist/commands/segment-command.js +1 -1
  41. package/dist/commands/segment-create-command.js +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-pull-command.js +1 -1
  44. package/dist/commands/segment-push-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/tables.js +1 -1
  50. package/dist/commands/use-command.js +1 -1
  51. package/dist/commands/user-command.js +1 -1
  52. package/dist/commands/workflow-command.js +1 -1
  53. package/dist/core/auth.js +1 -1
  54. package/dist/core/config.d.ts +26 -0
  55. package/dist/core/config.d.ts.map +1 -1
  56. package/dist/core/config.js +1 -1
  57. package/dist/core/config.js.map +1 -1
  58. package/dist/core/connection-cache.js +1 -1
  59. package/dist/core/credential-cache.js +1 -1
  60. package/dist/core/global-context.js +1 -1
  61. package/dist/core/keychain.js +1 -1
  62. package/dist/core/profile.js +1 -1
  63. package/dist/core/project-config.js +1 -1
  64. package/dist/core/session.js +1 -1
  65. package/dist/core/user-cache.js +1 -1
  66. package/dist/index.js +1 -1
  67. package/dist/proxy/anthropic-adapter.js +1 -1
  68. package/dist/proxy/claude-usage-tracker.js +1 -1
  69. package/dist/proxy/context-signature.js +1 -1
  70. package/dist/proxy/conversation-utils.js +1 -1
  71. package/dist/proxy/server.js +1 -1
  72. package/dist/proxy/session-cache.js +1 -1
  73. package/dist/sdk/api.js +1 -1
  74. package/dist/sdk/connection.js +1 -1
  75. package/dist/sdk/engage.js +1 -1
  76. package/dist/sdk/errors.js +1 -1
  77. package/dist/sdk/index.js +1 -1
  78. package/dist/sdk/job.js +1 -1
  79. package/dist/sdk/llm.js +1 -1
  80. package/dist/sdk/query.js +1 -1
  81. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  82. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  83. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  84. package/dist/sdk/segment.js +1 -1
  85. package/dist/sdk/user.js +1 -1
  86. package/dist/sdk/workflow.js +1 -1
  87. package/dist/types/endpoints.js +1 -1
  88. package/dist/types/index.d.ts +20 -1
  89. package/dist/types/index.d.ts.map +1 -1
  90. package/dist/types/index.js +1 -1
  91. package/dist/types/index.js.map +1 -1
  92. package/dist/utils/agent-ref-parser.js +1 -1
  93. package/dist/utils/async.js +1 -1
  94. package/dist/utils/chat-cache.js +1 -1
  95. package/dist/utils/colors.js +1 -1
  96. package/dist/utils/command-output.js +1 -1
  97. package/dist/utils/constants.js +1 -1
  98. package/dist/utils/diff.js +1 -1
  99. package/dist/utils/fields-display.js +1 -1
  100. package/dist/utils/file-permissions.js +1 -1
  101. package/dist/utils/format-detector.js +1 -1
  102. package/dist/utils/formatters.js +1 -1
  103. package/dist/utils/json-loader.js +1 -1
  104. package/dist/utils/llm-backup-utils.js +1 -1
  105. package/dist/utils/model-aliases.js +1 -1
  106. package/dist/utils/model-factors.js +1 -1
  107. package/dist/utils/option-validation.js +1 -1
  108. package/dist/utils/port.js +1 -1
  109. package/dist/utils/process.js +1 -1
  110. package/dist/utils/prompt.js +1 -1
  111. package/dist/utils/segment-path-parser.js +1 -1
  112. package/dist/utils/segment-ref-parser.js +1 -1
  113. package/dist/utils/spinner.js +1 -1
  114. package/dist/utils/sql-parser.js +1 -1
  115. package/dist/utils/sse-parser.js +1 -1
  116. package/dist/utils/string-utils.js +1 -1
  117. package/dist/utils/table-ref-parser.js +1 -1
  118. package/dist/utils/tdx-config.js +1 -1
  119. package/dist/utils/tdx-logger.js +1 -1
  120. package/dist/utils/tree-formatter.js +1 -1
  121. package/dist/utils/version-check.js +1 -1
  122. package/dist/utils/workflow-utils.js +1 -1
  123. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x97076a=a36_0x5b8f;(function(_0x36cd6f,_0x304a55){const _0x3b3e1f=a36_0x5b8f,_0x5c0f52=_0x36cd6f();while(!![]){try{const _0xe25188=-parseInt(_0x3b3e1f(0x1c1))/0x1*(parseInt(_0x3b3e1f(0x1ca))/0x2)+parseInt(_0x3b3e1f(0x1c7))/0x3*(-parseInt(_0x3b3e1f(0x1b8))/0x4)+parseInt(_0x3b3e1f(0x1b2))/0x5*(parseInt(_0x3b3e1f(0x19e))/0x6)+-parseInt(_0x3b3e1f(0x19d))/0x7*(-parseInt(_0x3b3e1f(0x196))/0x8)+parseInt(_0x3b3e1f(0x1c2))/0x9+parseInt(_0x3b3e1f(0x1bd))/0xa+-parseInt(_0x3b3e1f(0x1b0))/0xb*(parseInt(_0x3b3e1f(0x1bb))/0xc);if(_0xe25188===_0x304a55)break;else _0x5c0f52['push'](_0x5c0f52['shift']());}catch(_0x3b5d1c){_0x5c0f52['push'](_0x5c0f52['shift']());}}}(a36_0x1f65,0x6878c));import{existsSync,statSync}from'fs';import a36_0x3477bd from'chalk';import{BaseCommand}from'./command.js';function a36_0x5b8f(_0xbeb32d,_0x252334){_0xbeb32d=_0xbeb32d-0x191;const _0x1f6530=a36_0x1f65();let _0x5b8f4c=_0x1f6530[_0xbeb32d];return _0x5b8f4c;}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';function a36_0x1f65(){const _0x1878d2=['folderPath','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','Resolving\x20path\x20\x27','1798448TgQZDE','type','folderId','parentName','verbose','Examples:','segment:use','21eHYnrh','4353690nGZSeq','parentId','red','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','cyan','segmentPath','split','Target\x20path:\x20','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','site','error','\x27...','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','dim','description','Error:\x20Path\x20is\x20required\x0a','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','66hTpAdi','✔\x20Context\x20set\x20to:\x20','5UAyAUe','segment','resolvePathToResource','fullPath','slice','parent_segment','366832JexPcw','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','session','3960228wqLqPG','log','6697850EVieyB','Use:\x20tdx\x20segment\x20use\x20','isDirectory','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','97GIEXmk','5339799OqQExv','data','isAbsolute','green','join','6ykMBdy','Site:\x20','segments','1478SHcYyA','Resolved\x20relative\x20path\x20to:\x20','execute','Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','length','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'];a36_0x1f65=function(){return _0x1878d2;};return a36_0x1f65();}import{findTdxConfig}from'../utils/tdx-config.js';export class SegmentUseCommand extends BaseCommand{['name']=a36_0x97076a(0x19c);[a36_0x97076a(0x1ad)]=a36_0x97076a(0x1af);async[a36_0x97076a(0x1cc)](_0x136235){const _0x2e4eb0=a36_0x97076a,{options:_0x1d3e71,args:_0x9eb6e8,tdx:_0x58df07}=_0x136235;if(_0x9eb6e8[_0x2e4eb0(0x191)]===0x0)return console[_0x2e4eb0(0x1a8)](a36_0x3477bd[_0x2e4eb0(0x1a0)](_0x2e4eb0(0x1ae))),console[_0x2e4eb0(0x1a8)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x2e4eb0(0x1a8)](_0x2e4eb0(0x19b)),console['error']('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22'),console['error'](_0x2e4eb0(0x1aa)),console['error'](_0x2e4eb0(0x1ce)),console['error'](_0x2e4eb0(0x1ab)),0x1;const _0x46de0d=_0x9eb6e8[0x0],_0x43809e=_0x1d3e71[_0x2e4eb0(0x1ba)];try{if(_0x46de0d==='/')return saveSessionContext({'segment_path':undefined},_0x43809e),console[_0x2e4eb0(0x1bc)](a36_0x3477bd[_0x2e4eb0(0x1c5)](_0x2e4eb0(0x1a1))),0x0;if(existsSync(_0x46de0d)&&statSync(_0x46de0d)[_0x2e4eb0(0x1bf)]()){let _0x4e5a48;try{_0x4e5a48=findTdxConfig(_0x46de0d);}catch{return console[_0x2e4eb0(0x1a8)](a36_0x3477bd[_0x2e4eb0(0x1a0)](_0x2e4eb0(0x1cd)+_0x46de0d)),console[_0x2e4eb0(0x1a8)](a36_0x3477bd[_0x2e4eb0(0x1a2)](_0x2e4eb0(0x1c0))),0x1;}const _0x3e51a1=_0x4e5a48['config'][_0x2e4eb0(0x1b7)];return saveSessionContext({'segment_path':_0x3e51a1,'parent_segment':_0x3e51a1},_0x43809e),console[_0x2e4eb0(0x1bc)](a36_0x3477bd[_0x2e4eb0(0x1c5)]('✔\x20Context\x20set\x20to:\x20'+a36_0x3477bd[_0x2e4eb0(0x1a2)](_0x3e51a1))),0x0;}const _0x90b1a0=_0x1d3e71[_0x2e4eb0(0x1a3)];let _0x530e74=_0x46de0d;const _0x327f15=parsePath(_0x46de0d);if(!_0x327f15[_0x2e4eb0(0x1c4)]){if(!_0x90b1a0)return console['error'](a36_0x3477bd[_0x2e4eb0(0x1a0)](_0x2e4eb0(0x1a6))),console[_0x2e4eb0(0x1a8)](a36_0x3477bd[_0x2e4eb0(0x1a2)](_0x2e4eb0(0x192))),0x1;if(_0x46de0d==='..'){const _0x2ac9ee=_0x90b1a0[_0x2e4eb0(0x1a4)]('/')[_0x2e4eb0(0x1b6)](0x0,-0x1)[_0x2e4eb0(0x1c6)]('/');_0x530e74=_0x2ac9ee||'/';}else _0x46de0d==='.'?_0x530e74=_0x90b1a0:_0x530e74=_0x90b1a0+'/'+_0x46de0d;_0x1d3e71[_0x2e4eb0(0x19a)]&&console[_0x2e4eb0(0x1a8)](_0x2e4eb0(0x1cb)+_0x530e74);}if(_0x530e74==='/'||_0x530e74==='')return saveSessionContext({'segment_path':undefined},_0x43809e),console['log'](a36_0x3477bd[_0x2e4eb0(0x1c5)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x530e74=normalizePath(_0x530e74);const _0x420178=parsePath(_0x530e74)[_0x2e4eb0(0x1c9)];if(_0x420178[_0x2e4eb0(0x191)]===0x0)return saveSessionContext({'segment_path':undefined},_0x43809e),console[_0x2e4eb0(0x1bc)](a36_0x3477bd[_0x2e4eb0(0x1c5)](_0x2e4eb0(0x1a1))),0x0;_0x1d3e71[_0x2e4eb0(0x19a)]&&(console[_0x2e4eb0(0x1a8)](_0x2e4eb0(0x1c8)+_0x1d3e71[_0x2e4eb0(0x1a7)]),console[_0x2e4eb0(0x1a8)](_0x2e4eb0(0x1a5)+_0x530e74));const _0x45fea7=await withSpinner(_0x2e4eb0(0x195)+_0x530e74+_0x2e4eb0(0x1a9),()=>_0x58df07['segment'][_0x2e4eb0(0x1b4)](_0x530e74),{'verbose':_0x1d3e71[_0x2e4eb0(0x19a)]}),_0x4db301=_0x45fea7[_0x2e4eb0(0x1c3)];_0x1d3e71[_0x2e4eb0(0x19a)]&&(console[_0x2e4eb0(0x1a8)]('Resolved\x20path\x20type:\x20'+_0x4db301[_0x2e4eb0(0x197)]),console['error']('Parent\x20ID:\x20'+_0x4db301[_0x2e4eb0(0x19f)]),_0x4db301[_0x2e4eb0(0x198)]&&console[_0x2e4eb0(0x1a8)]('Folder\x20ID:\x20'+_0x4db301[_0x2e4eb0(0x198)]));if(_0x4db301['type']===_0x2e4eb0(0x1b3))return console[_0x2e4eb0(0x1a8)](a36_0x3477bd[_0x2e4eb0(0x1a0)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x2e4eb0(0x1a8)](_0x2e4eb0(0x194)),console['error'](a36_0x3477bd[_0x2e4eb0(0x1a2)](_0x2e4eb0(0x1be)+_0x4db301[_0x2e4eb0(0x199)]+(_0x4db301[_0x2e4eb0(0x193)]?'/'+_0x4db301['folderPath']['join']('/'):''))),0x1;return saveSessionContext({'segment_path':_0x4db301[_0x2e4eb0(0x1b5)],'parent_segment':_0x4db301[_0x2e4eb0(0x199)]},_0x43809e),console[_0x2e4eb0(0x1bc)](a36_0x3477bd[_0x2e4eb0(0x1c5)](_0x2e4eb0(0x1b1)+a36_0x3477bd['cyan'](_0x4db301['fullPath']))),_0x1d3e71['verbose']&&(console['error'](a36_0x3477bd[_0x2e4eb0(0x1ac)]('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context')),console[_0x2e4eb0(0x1a8)](a36_0x3477bd[_0x2e4eb0(0x1ac)](_0x2e4eb0(0x1b9)))),0x0;}catch(_0x33d4b3){throw _0x33d4b3;}}}
1
+ function a36_0x4a31(_0x5e8aee,_0x521124){_0x5e8aee=_0x5e8aee-0x1ef;const _0x2f76e0=a36_0x2f76();let _0x4a31ba=_0x2f76e0[_0x5e8aee];return _0x4a31ba;}const a36_0x3d6d08=a36_0x4a31;(function(_0x54c53a,_0x1febf6){const _0x1ffe68=a36_0x4a31,_0x1051c8=_0x54c53a();while(!![]){try{const _0x36684e=-parseInt(_0x1ffe68(0x205))/0x1*(-parseInt(_0x1ffe68(0x214))/0x2)+parseInt(_0x1ffe68(0x209))/0x3*(-parseInt(_0x1ffe68(0x1fc))/0x4)+-parseInt(_0x1ffe68(0x1f4))/0x5+parseInt(_0x1ffe68(0x206))/0x6*(-parseInt(_0x1ffe68(0x1fb))/0x7)+parseInt(_0x1ffe68(0x1ff))/0x8*(-parseInt(_0x1ffe68(0x21e))/0x9)+parseInt(_0x1ffe68(0x1f6))/0xa*(-parseInt(_0x1ffe68(0x21a))/0xb)+parseInt(_0x1ffe68(0x204))/0xc;if(_0x36684e===_0x1febf6)break;else _0x1051c8['push'](_0x1051c8['shift']());}catch(_0x52439e){_0x1051c8['push'](_0x1051c8['shift']());}}}(a36_0x2f76,0x4a03f));import{existsSync,statSync}from'fs';import a36_0x2c3f7d from'chalk';import{BaseCommand}from'./command.js';function a36_0x2f76(){const _0xb5a3e2=['Set\x20current\x20segment/folder\x20context\x20for\x20navigation','red','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Resolved\x20relative\x20path\x20to:\x20','Parent\x20ID:\x20','Tip:\x20Run\x20`tdx\x20sg\x20pull\x20<parent_name>`\x20first\x20to\x20create\x20the\x20folder\x20structure','parentId','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','fullPath','288loZmWa','Resolved\x20path\x20type:\x20','segments','Error:\x20Path\x20is\x20required\x0a','type','Site:\x20','4004JzUVAu','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','folderPath','parent_segment','9lLuMBv','length','segmentPath','cyan','join','Folder\x20ID:\x20','✔\x20Context\x20cleared.\x20Back\x20to\x20root.','name','data','execute','error','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','✔\x20Context\x20set\x20to:\x20','slice','description','Target\x20path:\x20','Use:\x20tdx\x20segment\x20use\x20','1375560PzvqcO','verbose','9460iDRlZa','folderId','site','parentName','resolvePathToResource','7042HAxAaQ','188EVARMs','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','Resolving\x20path\x20\x27','1850216EQpPbz','\x27...','segment','dim','green','16571256XZeFwb','2875ktiAAM','1278cFDFUJ','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','27240JryqYL','log'];a36_0x2f76=function(){return _0xb5a3e2;};return a36_0x2f76();}import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';import{findTdxConfig}from'../utils/tdx-config.js';export class SegmentUseCommand extends BaseCommand{[a36_0x3d6d08(0x225)]='segment:use';[a36_0x3d6d08(0x1f1)]=a36_0x3d6d08(0x20b);async[a36_0x3d6d08(0x227)](_0x3704f8){const _0x42cae0=a36_0x3d6d08,{options:_0x1f7ca4,args:_0x13ad55,tdx:_0x527ce8}=_0x3704f8;if(_0x13ad55[_0x42cae0(0x21f)]===0x0)return console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x20c)](_0x42cae0(0x217))),console[_0x42cae0(0x228)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x42cae0(0x228)]('Examples:'),console['error'](_0x42cae0(0x229)),console[_0x42cae0(0x228)](_0x42cae0(0x20d)),console[_0x42cae0(0x228)](_0x42cae0(0x208)),console[_0x42cae0(0x228)]('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x3f9fbe=_0x13ad55[0x0],_0x4e0a33=_0x1f7ca4['session'];try{if(_0x3f9fbe==='/')return saveSessionContext({'segment_path':undefined},_0x4e0a33),console[_0x42cae0(0x20a)](a36_0x2c3f7d[_0x42cae0(0x203)](_0x42cae0(0x224))),0x0;if(existsSync(_0x3f9fbe)&&statSync(_0x3f9fbe)['isDirectory']()){let _0xb2d265;try{_0xb2d265=findTdxConfig(_0x3f9fbe);}catch{return console[_0x42cae0(0x228)](a36_0x2c3f7d['red']('Error:\x20No\x20tdx.json\x20found\x20in\x20or\x20above:\x20'+_0x3f9fbe)),console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x221)](_0x42cae0(0x210))),0x1;}const _0x467817=_0xb2d265['config'][_0x42cae0(0x21d)];return saveSessionContext({'segment_path':_0x467817,'parent_segment':_0x467817},_0x4e0a33),console[_0x42cae0(0x20a)](a36_0x2c3f7d[_0x42cae0(0x203)]('✔\x20Context\x20set\x20to:\x20'+a36_0x2c3f7d[_0x42cae0(0x221)](_0x467817))),0x0;}const _0x1a16f8=_0x1f7ca4[_0x42cae0(0x220)];let _0x25e4a3=_0x3f9fbe;const _0x3b199e=parsePath(_0x3f9fbe);if(!_0x3b199e['isAbsolute']){if(!_0x1a16f8)return console['error'](a36_0x2c3f7d[_0x42cae0(0x20c)](_0x42cae0(0x22a))),console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x221)](_0x42cae0(0x1fd))),0x1;if(_0x3f9fbe==='..'){const _0x1efa94=_0x1a16f8['split']('/')[_0x42cae0(0x1f0)](0x0,-0x1)['join']('/');_0x25e4a3=_0x1efa94||'/';}else _0x3f9fbe==='.'?_0x25e4a3=_0x1a16f8:_0x25e4a3=_0x1a16f8+'/'+_0x3f9fbe;_0x1f7ca4[_0x42cae0(0x1f5)]&&console[_0x42cae0(0x228)](_0x42cae0(0x20e)+_0x25e4a3);}if(_0x25e4a3==='/'||_0x25e4a3==='')return saveSessionContext({'segment_path':undefined},_0x4e0a33),console[_0x42cae0(0x20a)](a36_0x2c3f7d[_0x42cae0(0x203)](_0x42cae0(0x224))),0x0;_0x25e4a3=normalizePath(_0x25e4a3);const _0x39a2c5=parsePath(_0x25e4a3)[_0x42cae0(0x216)];if(_0x39a2c5[_0x42cae0(0x21f)]===0x0)return saveSessionContext({'segment_path':undefined},_0x4e0a33),console[_0x42cae0(0x20a)](a36_0x2c3f7d[_0x42cae0(0x203)]('✔\x20Context\x20cleared.\x20Back\x20to\x20root.')),0x0;_0x1f7ca4[_0x42cae0(0x1f5)]&&(console[_0x42cae0(0x228)](_0x42cae0(0x219)+_0x1f7ca4[_0x42cae0(0x1f8)]),console[_0x42cae0(0x228)](_0x42cae0(0x1f2)+_0x25e4a3));const _0xeb7a0b=await withSpinner(_0x42cae0(0x1fe)+_0x25e4a3+_0x42cae0(0x200),()=>_0x527ce8[_0x42cae0(0x201)][_0x42cae0(0x1fa)](_0x25e4a3),{'verbose':_0x1f7ca4[_0x42cae0(0x1f5)]}),_0x391784=_0xeb7a0b[_0x42cae0(0x226)];_0x1f7ca4[_0x42cae0(0x1f5)]&&(console[_0x42cae0(0x228)](_0x42cae0(0x215)+_0x391784[_0x42cae0(0x218)]),console[_0x42cae0(0x228)](_0x42cae0(0x20f)+_0x391784[_0x42cae0(0x211)]),_0x391784['folderId']&&console['error'](_0x42cae0(0x223)+_0x391784[_0x42cae0(0x1f7)]));if(_0x391784[_0x42cae0(0x218)]===_0x42cae0(0x201))return console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x20c)]('Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.')),console[_0x42cae0(0x228)](_0x42cae0(0x207)),console['error'](a36_0x2c3f7d[_0x42cae0(0x221)](_0x42cae0(0x1f3)+_0x391784[_0x42cae0(0x1f9)]+(_0x391784[_0x42cae0(0x21c)]?'/'+_0x391784[_0x42cae0(0x21c)][_0x42cae0(0x222)]('/'):''))),0x1;return saveSessionContext({'segment_path':_0x391784[_0x42cae0(0x213)],'parent_segment':_0x391784[_0x42cae0(0x1f9)]},_0x4e0a33),console['log'](a36_0x2c3f7d['green'](_0x42cae0(0x1ef)+a36_0x2c3f7d[_0x42cae0(0x221)](_0x391784[_0x42cae0(0x213)]))),_0x1f7ca4[_0x42cae0(0x1f5)]&&(console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x202)](_0x42cae0(0x212))),console[_0x42cae0(0x228)](a36_0x2c3f7d[_0x42cae0(0x202)](_0x42cae0(0x21b)))),0x0;}catch(_0x683eb3){throw _0x683eb3;}}}
@@ -1 +1 @@
1
- const a37_0x56b3e8=a37_0x28f5;(function(_0x3d43ed,_0x2cc1c3){const _0x5a58b8=a37_0x28f5,_0x288327=_0x3d43ed();while(!![]){try{const _0x595b7b=parseInt(_0x5a58b8(0x125))/0x1*(-parseInt(_0x5a58b8(0x138))/0x2)+-parseInt(_0x5a58b8(0x11a))/0x3*(-parseInt(_0x5a58b8(0x127))/0x4)+parseInt(_0x5a58b8(0x12d))/0x5*(-parseInt(_0x5a58b8(0x13f))/0x6)+-parseInt(_0x5a58b8(0x151))/0x7*(-parseInt(_0x5a58b8(0x110))/0x8)+-parseInt(_0x5a58b8(0x136))/0x9+parseInt(_0x5a58b8(0x13b))/0xa+parseInt(_0x5a58b8(0x13c))/0xb;if(_0x595b7b===_0x2cc1c3)break;else _0x288327['push'](_0x288327['shift']());}catch(_0x3257f8){_0x288327['push'](_0x288327['shift']());}}}(a37_0xb4e3,0x81baf));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a37_0xb4e3(){const _0x1e2bcc=['map','Error:\x20','log','Folder/pattern\x20arg:\x20','235285dVeujT','Resolving\x20path\x20\x27','resolvePathToResource','Recursive\x20mode:\x20enabled','dim','Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.','Listing\x20folders\x20and\x20segments...','Resolving\x20parent\x20segment\x20\x27','Error:\x20No\x20parent\x20segment\x20context\x20set.','4332600mMxWaQ','Folder\x20ID:\x20','2OTAxLE','segment','(empty)','4101230WsFjVQ','5799662wwBWsv','format','filter','18SHZGRI','\x20segment','✔\x20Built\x20tree\x20with\x20','\x20and\x20','\x27...','test','json','\x20matching\x20\x27','Parent\x20segment\x20context:\x20','folderId','includes','No\x20items\x20match\x20pattern:\x20','parentSegment','segments','\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22','(not\x20set)','verbose','name','582253OtFfaO','length','description','56KcnZiv','listWithPattern','\x20top-level\x20items','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','Set\x20a\x20parent\x20segment\x20context\x20first:','listUnified','replace','jsonl','\x5c$&',']\x20matching\x20\x27','51TFwslf','parentId','\x20folder','execute','folder','Parent\x20ID:\x20','maxDepth','sort','data','error','cause','766855mpacvJ','\x20\x20Cause:\x20','94396hQckEq','✔\x20Found\x20'];a37_0xb4e3=function(){return _0x1e2bcc;};return a37_0xb4e3();}import a37_0xfb1f4d from'chalk';function a37_0x28f5(_0x1c750d,_0x22fecc){_0x1c750d=_0x1c750d-0x10e;const _0xb4e3a2=a37_0xb4e3();let _0x28f5bd=_0xb4e3a2[_0x1c750d];return _0x28f5bd;}export class SegmentsCommand extends BaseCommand{[a37_0x56b3e8(0x150)]=a37_0x56b3e8(0x14c);[a37_0x56b3e8(0x10f)]='List\x20folders\x20and\x20child\x20segments';async[a37_0x56b3e8(0x11d)](_0x2eab4a){const _0x105911=a37_0x56b3e8,{options:_0x2ff47b,args:_0x39482c}=_0x2eab4a,_0xedba27=_0x2ff47b['recursive'],_0x5b35c6=_0x39482c[0x0];try{const _0x1ed55d=_0x2ff47b[_0x105911(0x14b)];_0x2ff47b[_0x105911(0x14f)]&&(console['error']('Site:\x20'+_0x2ff47b['site']),console[_0x105911(0x123)](_0x105911(0x147)+(_0x1ed55d||_0x105911(0x14e))),_0x5b35c6&&console[_0x105911(0x123)](_0x105911(0x12c)+_0x5b35c6),_0xedba27&&console[_0x105911(0x123)](_0x105911(0x130)));if(!_0x1ed55d)return console[_0x105911(0x123)](_0x105911(0x135)),console[_0x105911(0x123)](''),console[_0x105911(0x123)](_0x105911(0x114)),console[_0x105911(0x123)](_0x105911(0x113)),console['error'](_0x105911(0x14d)),console[_0x105911(0x123)](''),console[_0x105911(0x123)](_0x105911(0x132)),0x1;const _0xc8a8f1=_0x5b35c6&&(_0x5b35c6['includes']('*')||_0x5b35c6[_0x105911(0x149)]('?'));if(_0xc8a8f1)return await this['listWithPattern'](_0x2eab4a,_0x1ed55d,_0x5b35c6);const _0x1f26ed=_0x5b35c6?_0x1ed55d+'/'+_0x5b35c6:_0x1ed55d;return _0xedba27?await this['listRecursive'](_0x2eab4a,_0x1f26ed):await this[_0x105911(0x115)](_0x2eab4a,_0x1f26ed);}catch(_0x51b8a2){if(_0x51b8a2 instanceof SDKError)return console[_0x105911(0x123)](_0x105911(0x12a)+_0x51b8a2['message']),_0x51b8a2['cause']&&console[_0x105911(0x123)](_0x105911(0x126)+_0x51b8a2[_0x105911(0x124)]),0x1;throw _0x51b8a2;}}async[a37_0x56b3e8(0x111)](_0x5bbeaa,_0x340853,_0x75f4bf){const _0x4f1b72=a37_0x56b3e8,{options:_0x33468b,tdx:_0x5e51bf}=_0x5bbeaa,_0x47b60a=await withSpinner(_0x4f1b72(0x134)+_0x340853+_0x4f1b72(0x143),()=>_0x5e51bf[_0x4f1b72(0x139)][_0x4f1b72(0x12f)](_0x340853),{'verbose':_0x33468b[_0x4f1b72(0x14f)]}),_0x4780b2=_0x47b60a['data'],_0x3f4b14=await withSpinner(_0x4f1b72(0x133),()=>_0x5e51bf[_0x4f1b72(0x139)][_0x4f1b72(0x115)](_0x4780b2['parentId'],_0x4780b2[_0x4f1b72(0x148)]),{'verbose':_0x33468b[_0x4f1b72(0x14f)]}),{folders:_0x20432f,segments:_0x126943}=_0x3f4b14['data'],_0x549fd8=_0x75f4bf[_0x4f1b72(0x116)](/[.+^${}()|[\]\\]/g,_0x4f1b72(0x118))[_0x4f1b72(0x116)](/\*/g,'.*')[_0x4f1b72(0x116)](/\?/g,'.'),_0x428523=new RegExp('^'+_0x549fd8+'$','i'),_0x3da1e7=_0x20432f[_0x4f1b72(0x13e)](_0x248f2d=>_0x428523[_0x4f1b72(0x144)](_0x248f2d[_0x4f1b72(0x150)])),_0x111a10=_0x126943[_0x4f1b72(0x13e)](_0x5656a9=>_0x428523[_0x4f1b72(0x144)](_0x5656a9[_0x4f1b72(0x150)])),_0x239711=_0x3da1e7[_0x4f1b72(0x10e)]+_0x111a10[_0x4f1b72(0x10e)];console[_0x4f1b72(0x123)](_0x4f1b72(0x128)+_0x3da1e7[_0x4f1b72(0x10e)]+'\x20folder'+(_0x3da1e7[_0x4f1b72(0x10e)]!==0x1?'s':'')+_0x4f1b72(0x142)+_0x111a10['length']+_0x4f1b72(0x140)+(_0x111a10[_0x4f1b72(0x10e)]!==0x1?'s':'')+_0x4f1b72(0x146)+_0x75f4bf+'\x27');if(_0x33468b[_0x4f1b72(0x13d)]===_0x4f1b72(0x145)||_0x33468b[_0x4f1b72(0x13d)]==='jsonl'){const _0x163031=[..._0x3da1e7['map'](_0x3125e1=>({..._0x3125e1,'type':_0x4f1b72(0x11e)})),..._0x111a10[_0x4f1b72(0x129)](_0x2297cf=>({..._0x2297cf,'type':_0x4f1b72(0x139)}))][_0x4f1b72(0x121)]((_0x5f0f3b,_0x60a4f7)=>_0x5f0f3b[_0x4f1b72(0x150)]['localeCompare'](_0x60a4f7[_0x4f1b72(0x150)]));await handleSDKOutput(_0x163031,_0x33468b);}else{if(_0x239711===0x0)console[_0x4f1b72(0x12b)](_0x4f1b72(0x14a)+_0x75f4bf);else{console['log'](a37_0xfb1f4d['dim']('['+_0x340853+_0x4f1b72(0x119)+_0x75f4bf+'\x27'));const _0x306d59=formatFlatList(_0x3da1e7,_0x111a10,{'showMetadata':!![]});console[_0x4f1b72(0x12b)](_0x306d59);}}return 0x0;}async[a37_0x56b3e8(0x115)](_0x1d54c0,_0x6cac2c){const _0x1f419c=a37_0x56b3e8,{options:_0x4e9a7b,tdx:_0x5395e4}=_0x1d54c0,_0x2ffb26=await withSpinner(_0x1f419c(0x12e)+_0x6cac2c+_0x1f419c(0x143),()=>_0x5395e4[_0x1f419c(0x139)][_0x1f419c(0x12f)](_0x6cac2c),{'verbose':_0x4e9a7b[_0x1f419c(0x14f)]}),_0x1a3193=_0x2ffb26[_0x1f419c(0x122)];_0x4e9a7b[_0x1f419c(0x14f)]&&(console[_0x1f419c(0x123)](_0x1f419c(0x11f)+_0x1a3193[_0x1f419c(0x11b)]),_0x1a3193[_0x1f419c(0x148)]&&console[_0x1f419c(0x123)](_0x1f419c(0x137)+_0x1a3193[_0x1f419c(0x148)]));const _0x2bb8d8=await withSpinner(_0x1f419c(0x133),()=>_0x5395e4[_0x1f419c(0x139)][_0x1f419c(0x115)](_0x1a3193[_0x1f419c(0x11b)],_0x1a3193['folderId']),{'verbose':_0x4e9a7b[_0x1f419c(0x14f)]}),{folders:_0x385c22,segments:_0x5b3bda}=_0x2bb8d8[_0x1f419c(0x122)],_0x4afb0e=_0x385c22[_0x1f419c(0x10e)]+_0x5b3bda[_0x1f419c(0x10e)];console['error']('✔\x20Found\x20'+_0x385c22['length']+_0x1f419c(0x11c)+(_0x385c22[_0x1f419c(0x10e)]!==0x1?'s':'')+_0x1f419c(0x142)+_0x5b3bda[_0x1f419c(0x10e)]+_0x1f419c(0x140)+(_0x5b3bda['length']!==0x1?'s':''));if(_0x4e9a7b[_0x1f419c(0x13d)]===_0x1f419c(0x145)||_0x4e9a7b[_0x1f419c(0x13d)]===_0x1f419c(0x117)){const _0x1d33f6=[..._0x385c22[_0x1f419c(0x129)](_0x3ca3a7=>({..._0x3ca3a7,'type':'folder'})),..._0x5b3bda['map'](_0x1317a8=>({..._0x1317a8,'type':_0x1f419c(0x139)}))][_0x1f419c(0x121)]((_0x9673,_0x4b4732)=>_0x9673[_0x1f419c(0x150)]['localeCompare'](_0x4b4732[_0x1f419c(0x150)]));await handleSDKOutput(_0x1d33f6,_0x4e9a7b);}else{if(_0x4afb0e===0x0)console['log'](a37_0xfb1f4d[_0x1f419c(0x131)]('['+_0x6cac2c+']')),console[_0x1f419c(0x12b)](_0x1f419c(0x13a));else{console[_0x1f419c(0x12b)](a37_0xfb1f4d['dim']('['+_0x6cac2c+']'));const _0x5a598d=formatFlatList(_0x385c22,_0x5b3bda,{'showMetadata':!![]});console[_0x1f419c(0x12b)](_0x5a598d);}}return 0x0;}async['listRecursive'](_0x5770c0,_0x20d204){const _0x50d8e0=a37_0x56b3e8,{options:_0x56bfd3,tdx:_0x30c5ea}=_0x5770c0,_0x4e8ae4=await withSpinner(_0x50d8e0(0x12e)+_0x20d204+_0x50d8e0(0x143),()=>_0x30c5ea['segment']['resolvePathToResource'](_0x20d204),{'verbose':_0x56bfd3[_0x50d8e0(0x14f)]}),_0x4c2b76=_0x4e8ae4[_0x50d8e0(0x122)];_0x56bfd3[_0x50d8e0(0x14f)]&&(console[_0x50d8e0(0x123)](_0x50d8e0(0x11f)+_0x4c2b76['parentId']),_0x4c2b76[_0x50d8e0(0x148)]&&console[_0x50d8e0(0x123)](_0x50d8e0(0x137)+_0x4c2b76[_0x50d8e0(0x148)]));const _0x1d29f2=_0x56bfd3[_0x50d8e0(0x120)]||0xa,_0x5602f1=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x30c5ea[_0x50d8e0(0x139)]['listRecursive'](_0x4c2b76[_0x50d8e0(0x11b)],_0x4c2b76[_0x50d8e0(0x148)],0x0,_0x1d29f2),{'verbose':_0x56bfd3[_0x50d8e0(0x14f)]}),_0xb1a96d=_0x5602f1['data'];console[_0x50d8e0(0x123)](_0x50d8e0(0x141)+_0xb1a96d[_0x50d8e0(0x10e)]+_0x50d8e0(0x112));if(_0x56bfd3[_0x50d8e0(0x13d)]===_0x50d8e0(0x145)||_0x56bfd3['format']===_0x50d8e0(0x117))await handleSDKOutput(_0xb1a96d,_0x56bfd3);else{console[_0x50d8e0(0x12b)](a37_0xfb1f4d[_0x50d8e0(0x131)]('['+_0x20d204+']'));const _0x4d9d65=formatTree(_0xb1a96d,{'showMetadata':!![]});console['log'](_0x4d9d65);}return 0x0;}}
1
+ function a37_0x3a17(_0x3c7bbf,_0x1ab79c){_0x3c7bbf=_0x3c7bbf-0x188;const _0x3995dd=a37_0x3995();let _0x3a1702=_0x3995dd[_0x3c7bbf];return _0x3a1702;}const a37_0x29e46f=a37_0x3a17;(function(_0x33833e,_0x159e9b){const _0x137fce=a37_0x3a17,_0x2d6542=_0x33833e();while(!![]){try{const _0x124d58=-parseInt(_0x137fce(0x18a))/0x1+parseInt(_0x137fce(0x198))/0x2*(-parseInt(_0x137fce(0x195))/0x3)+-parseInt(_0x137fce(0x1ba))/0x4+parseInt(_0x137fce(0x1a7))/0x5*(-parseInt(_0x137fce(0x199))/0x6)+-parseInt(_0x137fce(0x1b6))/0x7*(parseInt(_0x137fce(0x18c))/0x8)+parseInt(_0x137fce(0x191))/0x9+parseInt(_0x137fce(0x19a))/0xa;if(_0x124d58===_0x159e9b)break;else _0x2d6542['push'](_0x2d6542['shift']());}catch(_0x4ea24f){_0x2d6542['push'](_0x2d6542['shift']());}}}(a37_0x3995,0xb7101));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a37_0x3995(){const _0x34c58d=['resolvePathToResource','json','replace','cause','✔\x20Found\x20','segment','parentId','\x20top-level\x20items','map','Site:\x20','Folder\x20ID:\x20','(empty)','folderId','694178DeglPr','recursive','3307032ItCUve','Folder/pattern\x20arg:\x20','\x20segment','localeCompare','No\x20items\x20match\x20pattern:\x20','12378717gxMSeJ','jsonl','site','listUnified','66975vzPCOV','error','\x27...','4pPQubJ','90dSQsTy','31916670nCVugM','sort','\x20\x20Cause:\x20','Resolving\x20parent\x20segment\x20\x27','dim','Set\x20a\x20parent\x20segment\x20context\x20first:','\x20folder','\x20and\x20','log','length','Resolving\x20path\x20\x27','listRecursive','\x20\x20tdx\x20sg\x20pull\x20\x22My\x20Audience\x22','286095qPTOhx','segments','\x5c$&','Error:\x20No\x20parent\x20segment\x20context\x20set.','includes','(not\x20set)','filter','Parent\x20ID:\x20','verbose','name','description','format','Recursive\x20mode:\x20enabled','✔\x20Built\x20tree\x20with\x20','\x20matching\x20\x27','14eyWBFX','test','folder','message','5573536ZGtPTa','data','Listing\x20folders\x20and\x20segments...'];a37_0x3995=function(){return _0x34c58d;};return a37_0x3995();}import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import a37_0x4d2c2b from'chalk';export class SegmentsCommand extends BaseCommand{[a37_0x29e46f(0x1b0)]=a37_0x29e46f(0x1a8);[a37_0x29e46f(0x1b1)]='List\x20folders\x20and\x20child\x20segments';async['execute'](_0x32f553){const _0x5e8bf8=a37_0x29e46f,{options:_0x40ceee,args:_0xae8271}=_0x32f553,_0x122ccb=_0x40ceee[_0x5e8bf8(0x18b)],_0x508e96=_0xae8271[0x0];try{const _0x5d3c61=_0x40ceee['parentSegment'];_0x40ceee[_0x5e8bf8(0x1af)]&&(console[_0x5e8bf8(0x196)](_0x5e8bf8(0x1c6)+_0x40ceee[_0x5e8bf8(0x193)]),console[_0x5e8bf8(0x196)]('Parent\x20segment\x20context:\x20'+(_0x5d3c61||_0x5e8bf8(0x1ac))),_0x508e96&&console[_0x5e8bf8(0x196)](_0x5e8bf8(0x18d)+_0x508e96),_0x122ccb&&console[_0x5e8bf8(0x196)](_0x5e8bf8(0x1b3)));if(!_0x5d3c61)return console['error'](_0x5e8bf8(0x1aa)),console['error'](''),console[_0x5e8bf8(0x196)](_0x5e8bf8(0x19f)),console[_0x5e8bf8(0x196)](_0x5e8bf8(0x1a6)),console[_0x5e8bf8(0x196)]('\x20\x20tdx\x20sg\x20use\x20\x22My\x20Audience\x22'),console[_0x5e8bf8(0x196)](''),console[_0x5e8bf8(0x196)]('Use\x20tdx\x20ps\x20list\x20to\x20see\x20available\x20parent\x20segments.'),0x1;const _0x478429=_0x508e96&&(_0x508e96[_0x5e8bf8(0x1ab)]('*')||_0x508e96['includes']('?'));if(_0x478429)return await this['listWithPattern'](_0x32f553,_0x5d3c61,_0x508e96);const _0x441c34=_0x508e96?_0x5d3c61+'/'+_0x508e96:_0x5d3c61;return _0x122ccb?await this[_0x5e8bf8(0x1a5)](_0x32f553,_0x441c34):await this[_0x5e8bf8(0x194)](_0x32f553,_0x441c34);}catch(_0x255e79){if(_0x255e79 instanceof SDKError)return console['error']('Error:\x20'+_0x255e79[_0x5e8bf8(0x1b9)]),_0x255e79[_0x5e8bf8(0x1c0)]&&console[_0x5e8bf8(0x196)](_0x5e8bf8(0x19c)+_0x255e79[_0x5e8bf8(0x1c0)]),0x1;throw _0x255e79;}}async['listWithPattern'](_0x34ca3c,_0x3de115,_0x127d25){const _0x184080=a37_0x29e46f,{options:_0x1ab20b,tdx:_0x250571}=_0x34ca3c,_0x3d08a2=await withSpinner(_0x184080(0x19d)+_0x3de115+_0x184080(0x197),()=>_0x250571['segment'][_0x184080(0x1bd)](_0x3de115),{'verbose':_0x1ab20b[_0x184080(0x1af)]}),_0xabd2f8=_0x3d08a2[_0x184080(0x1bb)],_0xd5c14f=await withSpinner(_0x184080(0x1bc),()=>_0x250571['segment']['listUnified'](_0xabd2f8[_0x184080(0x1c3)],_0xabd2f8[_0x184080(0x189)]),{'verbose':_0x1ab20b[_0x184080(0x1af)]}),{folders:_0x27e50a,segments:_0x276e2c}=_0xd5c14f['data'],_0x57bafe=_0x127d25['replace'](/[.+^${}()|[\]\\]/g,_0x184080(0x1a9))[_0x184080(0x1bf)](/\*/g,'.*')[_0x184080(0x1bf)](/\?/g,'.'),_0x3bee43=new RegExp('^'+_0x57bafe+'$','i'),_0x298b5a=_0x27e50a[_0x184080(0x1ad)](_0x1b8222=>_0x3bee43[_0x184080(0x1b7)](_0x1b8222[_0x184080(0x1b0)])),_0x1a2fd1=_0x276e2c[_0x184080(0x1ad)](_0xc7b2dc=>_0x3bee43[_0x184080(0x1b7)](_0xc7b2dc[_0x184080(0x1b0)])),_0x2a338e=_0x298b5a[_0x184080(0x1a3)]+_0x1a2fd1[_0x184080(0x1a3)];console['error'](_0x184080(0x1c1)+_0x298b5a[_0x184080(0x1a3)]+_0x184080(0x1a0)+(_0x298b5a[_0x184080(0x1a3)]!==0x1?'s':'')+_0x184080(0x1a1)+_0x1a2fd1[_0x184080(0x1a3)]+_0x184080(0x18e)+(_0x1a2fd1[_0x184080(0x1a3)]!==0x1?'s':'')+_0x184080(0x1b5)+_0x127d25+'\x27');if(_0x1ab20b[_0x184080(0x1b2)]===_0x184080(0x1be)||_0x1ab20b[_0x184080(0x1b2)]==='jsonl'){const _0x4ac194=[..._0x298b5a[_0x184080(0x1c5)](_0x19e662=>({..._0x19e662,'type':_0x184080(0x1b8)})),..._0x1a2fd1[_0x184080(0x1c5)](_0xf74acc=>({..._0xf74acc,'type':'segment'}))][_0x184080(0x19b)]((_0x4d0473,_0x5e2c9b)=>_0x4d0473[_0x184080(0x1b0)][_0x184080(0x18f)](_0x5e2c9b['name']));await handleSDKOutput(_0x4ac194,_0x1ab20b);}else{if(_0x2a338e===0x0)console['log'](_0x184080(0x190)+_0x127d25);else{console[_0x184080(0x1a2)](a37_0x4d2c2b[_0x184080(0x19e)]('['+_0x3de115+']\x20matching\x20\x27'+_0x127d25+'\x27'));const _0x2701c1=formatFlatList(_0x298b5a,_0x1a2fd1,{'showMetadata':!![]});console[_0x184080(0x1a2)](_0x2701c1);}}return 0x0;}async['listUnified'](_0xd3353e,_0x39aa1a){const _0x279cbc=a37_0x29e46f,{options:_0x3c5c24,tdx:_0x4b906c}=_0xd3353e,_0x181a88=await withSpinner('Resolving\x20path\x20\x27'+_0x39aa1a+_0x279cbc(0x197),()=>_0x4b906c[_0x279cbc(0x1c2)][_0x279cbc(0x1bd)](_0x39aa1a),{'verbose':_0x3c5c24[_0x279cbc(0x1af)]}),_0x4836a0=_0x181a88[_0x279cbc(0x1bb)];_0x3c5c24['verbose']&&(console[_0x279cbc(0x196)]('Parent\x20ID:\x20'+_0x4836a0[_0x279cbc(0x1c3)]),_0x4836a0['folderId']&&console['error'](_0x279cbc(0x1c7)+_0x4836a0['folderId']));const _0x78038f=await withSpinner(_0x279cbc(0x1bc),()=>_0x4b906c[_0x279cbc(0x1c2)][_0x279cbc(0x194)](_0x4836a0[_0x279cbc(0x1c3)],_0x4836a0[_0x279cbc(0x189)]),{'verbose':_0x3c5c24[_0x279cbc(0x1af)]}),{folders:_0x4de99d,segments:_0x4197fe}=_0x78038f[_0x279cbc(0x1bb)],_0x415d37=_0x4de99d[_0x279cbc(0x1a3)]+_0x4197fe[_0x279cbc(0x1a3)];console[_0x279cbc(0x196)]('✔\x20Found\x20'+_0x4de99d[_0x279cbc(0x1a3)]+_0x279cbc(0x1a0)+(_0x4de99d['length']!==0x1?'s':'')+'\x20and\x20'+_0x4197fe[_0x279cbc(0x1a3)]+_0x279cbc(0x18e)+(_0x4197fe[_0x279cbc(0x1a3)]!==0x1?'s':''));if(_0x3c5c24['format']===_0x279cbc(0x1be)||_0x3c5c24['format']===_0x279cbc(0x192)){const _0x35ab98=[..._0x4de99d['map'](_0x223e98=>({..._0x223e98,'type':_0x279cbc(0x1b8)})),..._0x4197fe[_0x279cbc(0x1c5)](_0x167597=>({..._0x167597,'type':_0x279cbc(0x1c2)}))][_0x279cbc(0x19b)]((_0x41cf38,_0x24e87f)=>_0x41cf38['name'][_0x279cbc(0x18f)](_0x24e87f['name']));await handleSDKOutput(_0x35ab98,_0x3c5c24);}else{if(_0x415d37===0x0)console[_0x279cbc(0x1a2)](a37_0x4d2c2b[_0x279cbc(0x19e)]('['+_0x39aa1a+']')),console[_0x279cbc(0x1a2)](_0x279cbc(0x188));else{console['log'](a37_0x4d2c2b[_0x279cbc(0x19e)]('['+_0x39aa1a+']'));const _0x4d3858=formatFlatList(_0x4de99d,_0x4197fe,{'showMetadata':!![]});console[_0x279cbc(0x1a2)](_0x4d3858);}}return 0x0;}async[a37_0x29e46f(0x1a5)](_0x43c857,_0x3f0884){const _0x42f24f=a37_0x29e46f,{options:_0x2b0dbf,tdx:_0xbf84f7}=_0x43c857,_0x2b4026=await withSpinner(_0x42f24f(0x1a4)+_0x3f0884+_0x42f24f(0x197),()=>_0xbf84f7[_0x42f24f(0x1c2)][_0x42f24f(0x1bd)](_0x3f0884),{'verbose':_0x2b0dbf[_0x42f24f(0x1af)]}),_0x1b5395=_0x2b4026[_0x42f24f(0x1bb)];_0x2b0dbf[_0x42f24f(0x1af)]&&(console[_0x42f24f(0x196)](_0x42f24f(0x1ae)+_0x1b5395[_0x42f24f(0x1c3)]),_0x1b5395[_0x42f24f(0x189)]&&console[_0x42f24f(0x196)]('Folder\x20ID:\x20'+_0x1b5395[_0x42f24f(0x189)]));const _0x2d230d=_0x2b0dbf['maxDepth']||0xa,_0x5ec9f4=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0xbf84f7[_0x42f24f(0x1c2)][_0x42f24f(0x1a5)](_0x1b5395['parentId'],_0x1b5395[_0x42f24f(0x189)],0x0,_0x2d230d),{'verbose':_0x2b0dbf[_0x42f24f(0x1af)]}),_0x4c7410=_0x5ec9f4[_0x42f24f(0x1bb)];console[_0x42f24f(0x196)](_0x42f24f(0x1b4)+_0x4c7410[_0x42f24f(0x1a3)]+_0x42f24f(0x1c4));if(_0x2b0dbf['format']==='json'||_0x2b0dbf[_0x42f24f(0x1b2)]===_0x42f24f(0x192))await handleSDKOutput(_0x4c7410,_0x2b0dbf);else{console['log'](a37_0x4d2c2b[_0x42f24f(0x19e)]('['+_0x3f0884+']'));const _0x70fe31=formatTree(_0x4c7410,{'showMetadata':!![]});console[_0x42f24f(0x1a2)](_0x70fe31);}return 0x0;}}
@@ -1 +1 @@
1
- function a38_0x1668(_0x339aef,_0x20d665){_0x339aef=_0x339aef-0x7b;const _0x3ff92d=a38_0x3ff9();let _0x16685a=_0x3ff92d[_0x339aef];return _0x16685a;}const a38_0x1437cf=a38_0x1668;(function(_0x4251a9,_0x48d43b){const _0x386bdc=a38_0x1668,_0x1e37ed=_0x4251a9();while(!![]){try{const _0x4be5c8=-parseInt(_0x386bdc(0x83))/0x1*(parseInt(_0x386bdc(0xa1))/0x2)+parseInt(_0x386bdc(0x92))/0x3+-parseInt(_0x386bdc(0x7b))/0x4*(-parseInt(_0x386bdc(0x7d))/0x5)+parseInt(_0x386bdc(0x99))/0x6+-parseInt(_0x386bdc(0x84))/0x7*(parseInt(_0x386bdc(0x9b))/0x8)+-parseInt(_0x386bdc(0x89))/0x9+parseInt(_0x386bdc(0x8a))/0xa;if(_0x4be5c8===_0x48d43b)break;else _0x1e37ed['push'](_0x1e37ed['shift']());}catch(_0xc40d64){_0x1e37ed['push'](_0x1e37ed['shift']());}}}(a38_0x3ff9,0x583c9));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a38_0x3ff9(){const _0x50c56e=['\x20from\x20','execute','1997514Pwrpdh','2577820MjHcuI','\x20\x20Cause:\x20','error','showTable','Limit:\x20','description','args','Site:\x20','671133BJpFlP','message','verbose','\x20row','Querying\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','limit','1792590Cjzrpo','data','48PmbxXD','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','...','cause','Show\x20table\x20contents','site','3018JFENkh','8WHgsIy','catalog','882340hoJHFJ','Usage:\x20tdx\x20show\x20<database.table>','database','Error:\x20','name','Catalog:\x20','133IUbNYN','407323XBLaiG','length','Table:\x20'];a38_0x3ff9=function(){return _0x50c56e;};return a38_0x3ff9();}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a38_0x1437cf(0x81)]='show';[a38_0x1437cf(0x8f)]=a38_0x1437cf(0x9f);async[a38_0x1437cf(0x88)](_0x227c94){const _0x5531f7=a38_0x1437cf;return this[_0x5531f7(0x8d)](_0x227c94);}async[a38_0x1437cf(0x8d)](_0x23db05){const _0x494cc8=a38_0x1437cf,{options:_0x1e6c58,args:_0x14051c,tdx:_0x2cb7db}=_0x23db05;let _0x21f9b6;try{_0x21f9b6=parseTableReference(_0x14051c[0x0]);const _0x2404b8=_0x1e6c58['database'];!_0x21f9b6[_0x494cc8(0x7f)]&&_0x2404b8&&(_0x21f9b6[_0x494cc8(0x7f)]=_0x2404b8);const _0xaa4e4f=validateTableDescribeReference(_0x21f9b6);if(_0xaa4e4f)return console[_0x494cc8(0x8c)](_0x494cc8(0x80)+_0xaa4e4f),console[_0x494cc8(0x8c)](_0x494cc8(0x7e)),console[_0x494cc8(0x8c)](_0x494cc8(0x97)),console[_0x494cc8(0x8c)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x3000dd){return console[_0x494cc8(0x8c)](_0x494cc8(0x80)+_0x3000dd[_0x494cc8(0x93)]),console[_0x494cc8(0x8c)](_0x494cc8(0x7e)),console['error'](_0x494cc8(0x97)),console[_0x494cc8(0x8c)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x2cac74=_0x21f9b6[_0x494cc8(0x7c)],_0x5c3ded=_0x21f9b6[_0x494cc8(0x7f)],_0x41a342=_0x21f9b6['table'],_0x50c7fa=resolveLimit(_0x1e6c58[_0x494cc8(0x98)],DEFAULT_DISPLAY_LIMIT);try{_0x1e6c58[_0x494cc8(0x94)]&&(console[_0x494cc8(0x8c)](_0x494cc8(0x91)+_0x1e6c58[_0x494cc8(0xa0)]),_0x2cac74&&console['error'](_0x494cc8(0x82)+_0x2cac74),console[_0x494cc8(0x8c)]('Database:\x20'+_0x5c3ded),console['error'](_0x494cc8(0x86)+_0x41a342),console['error'](_0x494cc8(0x8e)+_0x50c7fa));const _0x4d0395=_0x2cac74?_0x2cac74+'.'+_0x5c3ded+'.'+_0x41a342:_0x5c3ded+'.'+_0x41a342,_0x28ad8c=await withSpinner(_0x494cc8(0x96)+_0x4d0395+_0x494cc8(0x9d),()=>_0x2cb7db['query']['showTable'](_0x5c3ded,_0x41a342,_0x50c7fa,_0x2cac74),{'verbose':_0x1e6c58[_0x494cc8(0x94)]}),_0x296858=_0x28ad8c['data'],_0x204e5e=_0x296858[_0x494cc8(0x9a)];return _0x204e5e['length']===0x0?console[_0x494cc8(0x8c)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x494cc8(0x8c)]('✔\x20Retrieved\x20'+_0x204e5e[_0x494cc8(0x85)]+_0x494cc8(0x95)+(_0x204e5e[_0x494cc8(0x85)]!==0x1?'s':'')+_0x494cc8(0x87)+_0x4d0395),await handleSDKOutput(_0x204e5e,_0x1e6c58),0x0;}catch(_0xfc45a8){if(_0xfc45a8 instanceof SDKError)return console[_0x494cc8(0x8c)](_0x494cc8(0x80)+_0xfc45a8[_0x494cc8(0x93)]),_0xfc45a8[_0x494cc8(0x9e)]&&console[_0x494cc8(0x8c)](_0x494cc8(0x8b)+_0xfc45a8['cause']),0x1;throw _0xfc45a8;}}['validate'](_0x26f8b3){const _0x22ae0c=a38_0x1437cf;if(_0x26f8b3[_0x22ae0c(0x90)]['length']===0x0)return'Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';if(_0x26f8b3[_0x22ae0c(0x90)]['length']>0x1)return _0x22ae0c(0x9c);return undefined;}}
1
+ const a38_0x4b9e4f=a38_0x43b1;function a38_0x43b1(_0x569e6a,_0x2e1f6d){_0x569e6a=_0x569e6a-0x188;const _0x1f7bdb=a38_0x1f7b();let _0x43b1b0=_0x1f7bdb[_0x569e6a];return _0x43b1b0;}(function(_0x3f3591,_0x21f0bb){const _0x135b9e=a38_0x43b1,_0x4e52b9=_0x3f3591();while(!![]){try{const _0x2302ea=-parseInt(_0x135b9e(0x19e))/0x1*(-parseInt(_0x135b9e(0x1a1))/0x2)+-parseInt(_0x135b9e(0x1a4))/0x3+parseInt(_0x135b9e(0x193))/0x4+-parseInt(_0x135b9e(0x1a7))/0x5*(-parseInt(_0x135b9e(0x1a0))/0x6)+parseInt(_0x135b9e(0x196))/0x7*(-parseInt(_0x135b9e(0x191))/0x8)+parseInt(_0x135b9e(0x1a8))/0x9*(parseInt(_0x135b9e(0x1ab))/0xa)+-parseInt(_0x135b9e(0x1ac))/0xb;if(_0x2302ea===_0x21f0bb)break;else _0x4e52b9['push'](_0x4e52b9['shift']());}catch(_0x5e82a1){_0x4e52b9['push'](_0x4e52b9['shift']());}}}(a38_0x1f7b,0x36a47));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a38_0x4b9e4f(0x1b0)]=a38_0x4b9e4f(0x1ae);[a38_0x4b9e4f(0x197)]='Show\x20table\x20contents';async['execute'](_0x3bf012){return this['showTable'](_0x3bf012);}async[a38_0x4b9e4f(0x190)](_0x2a8025){const _0x24b5a6=a38_0x4b9e4f,{options:_0x19d7e2,args:_0x2d13b6,tdx:_0x569e66}=_0x2a8025;let _0x1d82f4;try{_0x1d82f4=parseTableReference(_0x2d13b6[0x0]);const _0x14ce30=_0x19d7e2['database'];!_0x1d82f4[_0x24b5a6(0x18e)]&&_0x14ce30&&(_0x1d82f4['database']=_0x14ce30);const _0x37a39a=validateTableDescribeReference(_0x1d82f4);if(_0x37a39a)return console[_0x24b5a6(0x19c)]('Error:\x20'+_0x37a39a),console['error'](_0x24b5a6(0x1a3)),console[_0x24b5a6(0x19c)](_0x24b5a6(0x18c)),console[_0x24b5a6(0x19c)](_0x24b5a6(0x18d)),0x1;}catch(_0x443c39){return console[_0x24b5a6(0x19c)](_0x24b5a6(0x1af)+_0x443c39[_0x24b5a6(0x1aa)]),console[_0x24b5a6(0x19c)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x24b5a6(0x19c)](_0x24b5a6(0x18c)),console['error'](_0x24b5a6(0x18d)),0x1;}const _0x24871c=_0x1d82f4[_0x24b5a6(0x1a5)],_0x3c7659=_0x1d82f4[_0x24b5a6(0x18e)],_0x2f759d=_0x1d82f4[_0x24b5a6(0x189)],_0x443e2e=resolveLimit(_0x19d7e2['limit'],DEFAULT_DISPLAY_LIMIT);try{_0x19d7e2[_0x24b5a6(0x188)]&&(console[_0x24b5a6(0x19c)](_0x24b5a6(0x1a6)+_0x19d7e2[_0x24b5a6(0x194)]),_0x24871c&&console['error'](_0x24b5a6(0x18b)+_0x24871c),console[_0x24b5a6(0x19c)](_0x24b5a6(0x198)+_0x3c7659),console['error']('Table:\x20'+_0x2f759d),console[_0x24b5a6(0x19c)](_0x24b5a6(0x1a2)+_0x443e2e));const _0x2e6057=_0x24871c?_0x24871c+'.'+_0x3c7659+'.'+_0x2f759d:_0x3c7659+'.'+_0x2f759d,_0x28c833=await withSpinner(_0x24b5a6(0x19d)+_0x2e6057+_0x24b5a6(0x18f),()=>_0x569e66[_0x24b5a6(0x19f)][_0x24b5a6(0x190)](_0x3c7659,_0x2f759d,_0x443e2e,_0x24871c),{'verbose':_0x19d7e2[_0x24b5a6(0x188)]}),_0x2aa608=_0x28c833[_0x24b5a6(0x199)],_0x32c570=_0x2aa608[_0x24b5a6(0x199)];return _0x32c570[_0x24b5a6(0x1a9)]===0x0?console[_0x24b5a6(0x19c)]('✔\x20Query\x20successful\x20-\x200\x20rows\x20returned'):console[_0x24b5a6(0x19c)]('✔\x20Retrieved\x20'+_0x32c570[_0x24b5a6(0x1a9)]+_0x24b5a6(0x195)+(_0x32c570[_0x24b5a6(0x1a9)]!==0x1?'s':'')+_0x24b5a6(0x192)+_0x2e6057),await handleSDKOutput(_0x32c570,_0x19d7e2),0x0;}catch(_0x14d7b0){if(_0x14d7b0 instanceof SDKError)return console[_0x24b5a6(0x19c)](_0x24b5a6(0x1af)+_0x14d7b0[_0x24b5a6(0x1aa)]),_0x14d7b0[_0x24b5a6(0x19b)]&&console[_0x24b5a6(0x19c)]('\x20\x20Cause:\x20'+_0x14d7b0[_0x24b5a6(0x19b)]),0x1;throw _0x14d7b0;}}[a38_0x4b9e4f(0x19a)](_0x11886c){const _0x242acc=a38_0x4b9e4f;if(_0x11886c[_0x242acc(0x1ad)][_0x242acc(0x1a9)]===0x0)return _0x242acc(0x18a);if(_0x11886c[_0x242acc(0x1ad)][_0x242acc(0x1a9)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}function a38_0x1f7b(){const _0x1a2ea5=['310cKvShf','2050026YmLEPs','args','show','Error:\x20','name','verbose','table','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','Catalog:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','database','...','showTable','26016ldEory','\x20from\x20','152612SUCywW','site','\x20row','42QiIxIO','description','Database:\x20','data','validate','cause','error','Querying\x20','25NiZSom','query','6wirzLc','526moHwgI','Limit:\x20','Usage:\x20tdx\x20show\x20<database.table>','498048QiuOuC','catalog','Site:\x20','1905040AWAijA','49347fPSVDt','length','message'];a38_0x1f7b=function(){return _0x1a2ea5;};return a38_0x1f7b();}
@@ -1 +1 @@
1
- const a39_0x1591d2=a39_0x3d0f;(function(_0xc115b6,_0x2129d8){const _0x3e751d=a39_0x3d0f,_0x2ee5c5=_0xc115b6();while(!![]){try{const _0x5dac5e=-parseInt(_0x3e751d(0xe2))/0x1*(-parseInt(_0x3e751d(0xdd))/0x2)+-parseInt(_0x3e751d(0xe1))/0x3*(parseInt(_0x3e751d(0xd6))/0x4)+-parseInt(_0x3e751d(0xda))/0x5*(-parseInt(_0x3e751d(0xe8))/0x6)+-parseInt(_0x3e751d(0xc8))/0x7*(-parseInt(_0x3e751d(0xd9))/0x8)+parseInt(_0x3e751d(0xdb))/0x9+-parseInt(_0x3e751d(0xcb))/0xa+-parseInt(_0x3e751d(0xf4))/0xb*(parseInt(_0x3e751d(0xc9))/0xc);if(_0x5dac5e===_0x2129d8)break;else _0x2ee5c5['push'](_0x2ee5c5['shift']());}catch(_0x55ef3b){_0x2ee5c5['push'](_0x2ee5c5['shift']());}}}(a39_0x3059,0xed6d9));import{BaseCommand}from'./command.js';function a39_0x3059(){const _0x1d8fc4=['listTables','.*\x22','\x27\x20across\x20all\x20databases.','query','721554OptZeP','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','database','execute','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','message','includes','Table\x20pattern:\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','site','limit','cause','3542rynAEP','Note:\x20\x27','\x27\x20is\x20ambiguous.','\x20table','28UEpMhj','86244ruuTdu','List\x20tables\x20in\x20a\x20database','12072250lGCAhm','error','Or\x20use\x20--in\x20flag:','length','Site:\x20','tables','Database\x20pattern:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','data','name','Database:\x20all','372ZgpfOC','table','✖\x20No\x20tables\x20found','2429176ckYgAL','20TxnuuF','15380919aEJSVh','Error:\x20','422504nGwLJv','description','validate','✔\x20Found\x20','19377OHwsCU','8qeWAZG','Database\x20\x27'];a39_0x3059=function(){return _0x1d8fc4;};return a39_0x3059();}import{SDKError}from'../sdk/index.js';function a39_0x3d0f(_0x4e3903,_0x2a0c17){_0x4e3903=_0x4e3903-0xc6;const _0x30598b=a39_0x3059();let _0x3d0f01=_0x30598b[_0x4e3903];return _0x3d0f01;}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a39_0x1591d2(0xd4)]=a39_0x1591d2(0xd0);[a39_0x1591d2(0xde)]=a39_0x1591d2(0xca);async[a39_0x1591d2(0xeb)](_0xf6b809){const _0x2a1701=a39_0x1591d2,{options:_0x4bcba3,args:_0x2d9abe,tdx:_0x5d12e3}=_0xf6b809;let _0x36ebde;if(_0x2d9abe[_0x2a1701(0xce)]===0x0)_0x36ebde={'database':undefined,'table':undefined,'original':''};else{if(_0x2d9abe[_0x2a1701(0xce)]===0x1)try{_0x36ebde=parseTableReference(_0x2d9abe[0x0]);if(_0x36ebde[_0x2a1701(0xd7)]&&!_0x36ebde[_0x2a1701(0xea)]&&!_0x36ebde[_0x2a1701(0xd7)]['includes']('*')&&!_0x36ebde[_0x2a1701(0xd7)][_0x2a1701(0xee)]('?'))return console[_0x2a1701(0xcc)]('Error:\x20Pattern\x20\x27'+_0x2d9abe[0x0]+_0x2a1701(0xc6)),console[_0x2a1701(0xcc)](_0x2a1701(0xd2)+_0x36ebde['table']+'\x27?'),console[_0x2a1701(0xcc)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x36ebde['table']+_0x2a1701(0xe5)),console[_0x2a1701(0xcc)](_0x2a1701(0xf0)+_0x36ebde[_0x2a1701(0xd7)]),console[_0x2a1701(0xcc)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x36ebde[_0x2a1701(0xd7)]),console[_0x2a1701(0xcc)](''),console[_0x2a1701(0xcc)](_0x2a1701(0xf5)+_0x2d9abe[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x36ebde[_0x2a1701(0xd7)]+_0x2a1701(0xe6)),0x1;}catch(_0x1f8b8c){return console[_0x2a1701(0xcc)]('Error:\x20'+_0x1f8b8c[_0x2a1701(0xed)]),0x1;}else return console[_0x2a1701(0xcc)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console['error']('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x2a1701(0xcc)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console['error'](_0x2a1701(0xe9)),console[_0x2a1701(0xcc)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x2a1701(0xcc)](_0x2a1701(0xcd)),console[_0x2a1701(0xcc)](_0x2a1701(0xec)),0x1;}const _0x23bdc8=_0x4bcba3[_0x2a1701(0xea)];!_0x36ebde[_0x2a1701(0xea)]&&_0x23bdc8&&(_0x36ebde[_0x2a1701(0xea)]=_0x23bdc8);try{const _0x5e6b69=_0x932a5c=>_0x932a5c&&(_0x932a5c[_0x2a1701(0xee)]('*')||_0x932a5c[_0x2a1701(0xee)]('?')),_0x413c19=_0x5e6b69(_0x36ebde[_0x2a1701(0xea)]);_0x4bcba3['verbose']&&(console[_0x2a1701(0xcc)](_0x2a1701(0xcf)+_0x4bcba3[_0x2a1701(0xf1)]),_0x36ebde[_0x2a1701(0xea)]?_0x413c19?console[_0x2a1701(0xcc)](_0x2a1701(0xd1)+_0x36ebde['database']):console[_0x2a1701(0xcc)]('Database:\x20'+_0x36ebde['database']):console[_0x2a1701(0xcc)](_0x2a1701(0xd5)),_0x36ebde['table']&&console[_0x2a1701(0xcc)](_0x2a1701(0xef)+_0x36ebde[_0x2a1701(0xd7)]));const _0x5d24=_0x36ebde[_0x2a1701(0xea)]&&!_0x413c19?_0x36ebde[_0x2a1701(0xea)]:undefined,_0x3d48c8=_0x413c19?_0x36ebde['database']:undefined,_0x3ee72c=_0x36ebde[_0x2a1701(0xd7)],_0x5dc10c=resolveLimit(_0x4bcba3[_0x2a1701(0xf2)],DEFAULT_LISTING_LIMIT),_0xb7f134=await withSpinner('Listing\x20tables...',()=>_0x5d12e3[_0x2a1701(0xe7)][_0x2a1701(0xe4)](_0x5d24,_0x3ee72c,_0x3d48c8,_0x5dc10c),{'verbose':_0x4bcba3['verbose']}),_0x1d2c93=_0xb7f134[_0x2a1701(0xd3)];if(_0x1d2c93[_0x2a1701(0xce)]===0x0&&_0x36ebde[_0x2a1701(0xea)]&&!_0x413c19)return console['error'](_0x2a1701(0xd8)),console['error'](_0x2a1701(0xe3)+_0x36ebde['database']+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x2a1701(0xcc)](_0x2a1701(0xe0)+_0x1d2c93['length']+_0x2a1701(0xc7)+(_0x1d2c93[_0x2a1701(0xce)]!==0x1?'s':'')),await handleSDKOutput(_0x1d2c93,{..._0x4bcba3,'limit':_0x5dc10c}),0x0;}catch(_0x12e460){if(_0x12e460 instanceof SDKError)return console[_0x2a1701(0xcc)](_0x2a1701(0xdc)+_0x12e460[_0x2a1701(0xed)]),_0x12e460['cause']&&console[_0x2a1701(0xcc)]('\x20\x20Cause:\x20'+_0x12e460[_0x2a1701(0xf3)]),0x1;throw _0x12e460;}}[a39_0x1591d2(0xdf)](_0x300bbb){return undefined;}}
1
+ const a39_0x1890e4=a39_0x31e8;(function(_0x588f0f,_0x128852){const _0x5f14a9=a39_0x31e8,_0x3d6720=_0x588f0f();while(!![]){try{const _0x3ac88d=parseInt(_0x5f14a9(0x1a2))/0x1*(-parseInt(_0x5f14a9(0x199))/0x2)+parseInt(_0x5f14a9(0x1c9))/0x3+-parseInt(_0x5f14a9(0x1b1))/0x4*(-parseInt(_0x5f14a9(0x1cc))/0x5)+parseInt(_0x5f14a9(0x1ca))/0x6+-parseInt(_0x5f14a9(0x198))/0x7*(parseInt(_0x5f14a9(0x1af))/0x8)+-parseInt(_0x5f14a9(0x1c1))/0x9*(-parseInt(_0x5f14a9(0x1be))/0xa)+-parseInt(_0x5f14a9(0x1b8))/0xb;if(_0x3ac88d===_0x128852)break;else _0x3d6720['push'](_0x3d6720['shift']());}catch(_0x4dee2d){_0x3d6720['push'](_0x3d6720['shift']());}}}(a39_0x440e,0xc0b4c));import{BaseCommand}from'./command.js';function a39_0x440e(){const _0x25df38=['data','✖\x20No\x20tables\x20found','name','listTables','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','validate','\x27\x20across\x20all\x20databases.','site','8sDMBgM','Database:\x20all','284mQEmYT','Database:\x20','database','Listing\x20tables...','\x27\x20is\x20ambiguous.','cause','tables','10059104PKXsWV','\x20\x20Use:\x20tdx\x20tables\x20\x22','error','\x20\x20Cause:\x20','Database\x20\x27','Or\x20use\x20--in\x20flag:','1910YChqct','Error:\x20','Site:\x20','54666eEHQiB','execute','List\x20tables\x20in\x20a\x20database','.*\x22','query','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','Table\x20pattern:\x20','includes','186048iIMsbj','8779446uMvNUu','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','65165fHSWXB','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','7352135tJefqh','566YtXVlw','length','description','table','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','message','✔\x20Found\x20','limit','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','3027pOjekL','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','verbose','Note:\x20\x27'];a39_0x440e=function(){return _0x25df38;};return a39_0x440e();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a39_0x31e8(_0xef005f,_0x3ca978){_0xef005f=_0xef005f-0x197;const _0x440e4b=a39_0x440e();let _0x31e87a=_0x440e4b[_0xef005f];return _0x31e87a;}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a39_0x1890e4(0x1a9)]=a39_0x1890e4(0x1b7);[a39_0x1890e4(0x19b)]=a39_0x1890e4(0x1c3);async[a39_0x1890e4(0x1c2)](_0x435d1f){const _0x44b3b2=a39_0x1890e4,{options:_0x8b2f8e,args:_0x44bc47,tdx:_0x2c5c7e}=_0x435d1f;let _0xdbe48f;if(_0x44bc47[_0x44b3b2(0x19a)]===0x0)_0xdbe48f={'database':undefined,'table':undefined,'original':''};else{if(_0x44bc47[_0x44b3b2(0x19a)]===0x1)try{_0xdbe48f=parseTableReference(_0x44bc47[0x0]);if(_0xdbe48f[_0x44b3b2(0x19c)]&&!_0xdbe48f['database']&&!_0xdbe48f['table'][_0x44b3b2(0x1c8)]('*')&&!_0xdbe48f['table'][_0x44b3b2(0x1c8)]('?'))return console['error']('Error:\x20Pattern\x20\x27'+_0x44bc47[0x0]+_0x44b3b2(0x1b5)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1ce)+_0xdbe48f['table']+'\x27?'),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1b9)+_0xdbe48f[_0x44b3b2(0x19c)]+_0x44b3b2(0x1c4)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1cb)+_0xdbe48f[_0x44b3b2(0x19c)]),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x19d)+_0xdbe48f[_0x44b3b2(0x19c)]),console['error'](''),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1a6)+_0x44bc47[0x0]+_0x44b3b2(0x1c6)+_0xdbe48f[_0x44b3b2(0x19c)]+_0x44b3b2(0x1ad)),0x1;}catch(_0x51ae8f){return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1bf)+_0x51ae8f[_0x44b3b2(0x19e)]),0x1;}else return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1ab)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x197)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1cd)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1a3)),console[_0x44b3b2(0x1ba)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1bd)),console['error'](_0x44b3b2(0x1a4)),0x1;}const _0x41b085=_0x8b2f8e[_0x44b3b2(0x1b3)];!_0xdbe48f['database']&&_0x41b085&&(_0xdbe48f[_0x44b3b2(0x1b3)]=_0x41b085);try{const _0x469996=_0x90722=>_0x90722&&(_0x90722[_0x44b3b2(0x1c8)]('*')||_0x90722[_0x44b3b2(0x1c8)]('?')),_0x4a3dd6=_0x469996(_0xdbe48f[_0x44b3b2(0x1b3)]);_0x8b2f8e[_0x44b3b2(0x1a5)]&&(console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1c0)+_0x8b2f8e[_0x44b3b2(0x1ae)]),_0xdbe48f[_0x44b3b2(0x1b3)]?_0x4a3dd6?console[_0x44b3b2(0x1ba)]('Database\x20pattern:\x20'+_0xdbe48f[_0x44b3b2(0x1b3)]):console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1b2)+_0xdbe48f[_0x44b3b2(0x1b3)]):console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1b0)),_0xdbe48f[_0x44b3b2(0x19c)]&&console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1c7)+_0xdbe48f[_0x44b3b2(0x19c)]));const _0x3a1a41=_0xdbe48f[_0x44b3b2(0x1b3)]&&!_0x4a3dd6?_0xdbe48f[_0x44b3b2(0x1b3)]:undefined,_0x40fdda=_0x4a3dd6?_0xdbe48f['database']:undefined,_0x453396=_0xdbe48f[_0x44b3b2(0x19c)],_0x4802b6=resolveLimit(_0x8b2f8e[_0x44b3b2(0x1a0)],DEFAULT_LISTING_LIMIT),_0x37ed9a=await withSpinner(_0x44b3b2(0x1b4),()=>_0x2c5c7e[_0x44b3b2(0x1c5)][_0x44b3b2(0x1aa)](_0x3a1a41,_0x453396,_0x40fdda,_0x4802b6),{'verbose':_0x8b2f8e[_0x44b3b2(0x1a5)]}),_0x349024=_0x37ed9a[_0x44b3b2(0x1a7)];if(_0x349024[_0x44b3b2(0x19a)]===0x0&&_0xdbe48f[_0x44b3b2(0x1b3)]&&!_0x4a3dd6)return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1a8)),console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1bc)+_0xdbe48f[_0x44b3b2(0x1b3)]+_0x44b3b2(0x1a1)),0x1;return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x19f)+_0x349024[_0x44b3b2(0x19a)]+'\x20table'+(_0x349024[_0x44b3b2(0x19a)]!==0x1?'s':'')),await handleSDKOutput(_0x349024,{..._0x8b2f8e,'limit':_0x4802b6}),0x0;}catch(_0x1350d1){if(_0x1350d1 instanceof SDKError)return console[_0x44b3b2(0x1ba)](_0x44b3b2(0x1bf)+_0x1350d1[_0x44b3b2(0x19e)]),_0x1350d1[_0x44b3b2(0x1b6)]&&console['error'](_0x44b3b2(0x1bb)+_0x1350d1[_0x44b3b2(0x1b6)]),0x1;throw _0x1350d1;}}[a39_0x1890e4(0x1ac)](_0x286120){return undefined;}}
@@ -1 +1 @@
1
- const a40_0x3800e9=a40_0x2e77;(function(_0x58182c,_0x3e29f9){const _0x50ae27=a40_0x2e77,_0x91e66e=_0x58182c();while(!![]){try{const _0x2a1eb1=-parseInt(_0x50ae27(0x8f))/0x1+parseInt(_0x50ae27(0x88))/0x2+-parseInt(_0x50ae27(0x8d))/0x3*(parseInt(_0x50ae27(0x8a))/0x4)+-parseInt(_0x50ae27(0x6e))/0x5*(-parseInt(_0x50ae27(0x79))/0x6)+-parseInt(_0x50ae27(0x7e))/0x7+-parseInt(_0x50ae27(0x97))/0x8+parseInt(_0x50ae27(0x82))/0x9;if(_0x2a1eb1===_0x3e29f9)break;else _0x91e66e['push'](_0x91e66e['shift']());}catch(_0x86cd1){_0x91e66e['push'](_0x91e66e['shift']());}}}(a40_0xc885,0x4e9fc));function a40_0xc885(){const _0x40c031=['105504sZrKVr','Error:\x20Profile\x20\x27','clear','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace','\x27\x20does\x20not\x20exist','Invalid\x20resource:\x20','message','Set\x20session-level\x20context','3078544WRRzfn','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','llm_project','execute','389145RRRzPJ','cleared','session','description','length','log','database','Session\x20context\x20','profile','join','parent_segment','6yfbWsX','use','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','dim','Session\x20llm_project\x20set\x20to:\x20','1878919uFgBfX','toString','Session\x20profile\x20set\x20to:\x20','green','12907152KeCgpr','Session\x20parent_segment\x20set\x20to:\x20','Session\x20database\x20set\x20to:\x20','name','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Error:\x20','72946elbelF','debug','12388WzqjNV','(session:\x20','error','453BRylup','engage_workspace'];a40_0xc885=function(){return _0x40c031;};return a40_0xc885();}function a40_0x2e77(_0x5a50e6,_0x371c44){_0x5a50e6=_0x5a50e6-0x6d;const _0xc88548=a40_0xc885();let _0x2e77f1=_0xc88548[_0x5a50e6];return _0x2e77f1;}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import a40_0x4dfb50 from'chalk';export class UseCommand extends BaseCommand{[a40_0x3800e9(0x85)]=a40_0x3800e9(0x7a);[a40_0x3800e9(0x71)]=a40_0x3800e9(0x96);['validate'](_0x15af93){const _0xee4abe=a40_0x3800e9,{args:_0x5dd1e3}=_0x15af93;if(_0x5dd1e3['length']===0x0)return undefined;if(_0x5dd1e3['length']===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0xee4abe(0x98)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+'\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace\x0a'+_0xee4abe(0x7b);const _0x546f33=_0x5dd1e3[0x0],_0xa2d9d=[_0xee4abe(0x74),'parent_segment',_0xee4abe(0x99),'profile',_0xee4abe(0x8e)];if(!_0xa2d9d['includes'](_0x546f33))return _0xee4abe(0x94)+_0x546f33+'.\x20Must\x20be\x20one\x20of:\x20'+_0xa2d9d[_0xee4abe(0x77)](',\x20');return undefined;}async[a40_0x3800e9(0x6d)](_0x402091){const _0x2047c8=a40_0x3800e9,{args:_0x39be94,options:_0x4eafa9}=_0x402091,_0xb8534b=_0x4eafa9[_0x2047c8(0x89)],_0x445108=_0x4eafa9[_0x2047c8(0x91)];cleanExpiredSessions();try{if(_0x445108){clearSessionContext(_0x4eafa9['session']);const _0x2f62dc=_0x4eafa9[_0x2047c8(0x70)]||getCurrentSessionPID()[_0x2047c8(0x7f)]();return console['log'](_0x2047c8(0x75)+a40_0x4dfb50['green'](_0x2047c8(0x6f))+'\x20'+a40_0x4dfb50[_0x2047c8(0x7c)](_0x2047c8(0x8b)+_0x2f62dc+')')),0x0;}if(_0x39be94[_0x2047c8(0x72)]===0x0){const _0xfc2890=new GlobalContext(_0x4eafa9);return _0xb8534b?_0xfc2890['displayWithSources']():_0xfc2890['display'](),console['log'](a40_0x4dfb50[_0x2047c8(0x7c)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0x2047c8(0x73)](a40_0x4dfb50[_0x2047c8(0x7c)](_0x2047c8(0x92))),0x0;}const _0xc1bd4=_0x39be94[0x0],_0x44ab93=_0x39be94[0x1];if(_0xc1bd4===_0x2047c8(0x76)){if(!profileExists(_0x44ab93))return console['error'](_0x2047c8(0x90)+_0x44ab93+_0x2047c8(0x93)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x48b6c4=_0x4eafa9['session']||getCurrentSessionPID()[_0x2047c8(0x7f)]();return saveSessionContext({'profile':_0x44ab93},_0x4eafa9[_0x2047c8(0x70)]),console[_0x2047c8(0x73)](_0x2047c8(0x80)+a40_0x4dfb50[_0x2047c8(0x81)](_0x44ab93)+'\x20'+a40_0x4dfb50[_0x2047c8(0x7c)]('(session:\x20'+_0x48b6c4+')')),console['log'](a40_0x4dfb50[_0x2047c8(0x7c)](_0x2047c8(0x86))),0x0;}const _0x2c0079={},_0x362eec=_0x4eafa9[_0x2047c8(0x70)]||getCurrentSessionPID()[_0x2047c8(0x7f)]();switch(_0xc1bd4){case'database':_0x2c0079[_0x2047c8(0x74)]=_0x44ab93,console[_0x2047c8(0x73)](_0x2047c8(0x84)+a40_0x4dfb50[_0x2047c8(0x81)](_0x44ab93)+'\x20'+a40_0x4dfb50['dim'](_0x2047c8(0x8b)+_0x362eec+')'));break;case _0x2047c8(0x78):_0x2c0079['parent_segment']=_0x44ab93,console[_0x2047c8(0x73)](_0x2047c8(0x83)+a40_0x4dfb50[_0x2047c8(0x81)](_0x44ab93)+'\x20'+a40_0x4dfb50['dim'](_0x2047c8(0x8b)+_0x362eec+')'));break;case _0x2047c8(0x99):_0x2c0079[_0x2047c8(0x99)]=_0x44ab93,console[_0x2047c8(0x73)](_0x2047c8(0x7d)+a40_0x4dfb50[_0x2047c8(0x81)](_0x44ab93)+'\x20'+a40_0x4dfb50[_0x2047c8(0x7c)](_0x2047c8(0x8b)+_0x362eec+')'));break;case _0x2047c8(0x8e):_0x2c0079[_0x2047c8(0x8e)]=_0x44ab93,console[_0x2047c8(0x73)]('Session\x20engage_workspace\x20set\x20to:\x20'+a40_0x4dfb50['green'](_0x44ab93)+'\x20'+a40_0x4dfb50[_0x2047c8(0x7c)](_0x2047c8(0x8b)+_0x362eec+')'));break;}return saveSessionContext(_0x2c0079,_0x4eafa9['session']),console[_0x2047c8(0x73)](a40_0x4dfb50['dim'](_0x2047c8(0x86))),0x0;}catch(_0x165699){return _0x165699 instanceof Error&&console[_0x2047c8(0x8c)](_0x2047c8(0x87)+_0x165699[_0x2047c8(0x95)]),0x1;}}}
1
+ function a40_0x821c(){const _0x8ad778=['clear','includes','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','name','1264686IABVIe','3177760YcdzWL','toString','Session\x20database\x20set\x20to:\x20','Set\x20session-level\x20context','dim','displayWithSources','62253DhJZsK','3431172BXwsEw','11417721aCmVGu','engage_workspace','58qFWZoA','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','session','profile','8cfWFgl','length','\x27\x20does\x20not\x20exist','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Error:\x20','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','join','208424wOVKpg','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','387hEhcsx','log','Session\x20parent_segment\x20set\x20to:\x20','\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace\x0a','681895Fstrto','message','database','parent_segment','llm_project','(session:\x20','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile,\x20engage_workspace','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20engage_workspace\x20set\x20to:\x20','execute','display','.\x20Must\x20be\x20one\x20of:\x20','error','Session\x20llm_project\x20set\x20to:\x20','green'];a40_0x821c=function(){return _0x8ad778;};return a40_0x821c();}const a40_0x25a850=a40_0x1c08;(function(_0x43947a,_0x582f0b){const _0xaaf820=a40_0x1c08,_0x5d1c41=_0x43947a();while(!![]){try{const _0x1ab133=-parseInt(_0xaaf820(0x84))/0x1+-parseInt(_0xaaf820(0x8f))/0x2*(parseInt(_0xaaf820(0x8b))/0x3)+parseInt(_0xaaf820(0x93))/0x4*(parseInt(_0xaaf820(0x71))/0x5)+-parseInt(_0xaaf820(0x8c))/0x6+parseInt(_0xaaf820(0x8d))/0x7+-parseInt(_0xaaf820(0x9a))/0x8*(-parseInt(_0xaaf820(0x9c))/0x9)+parseInt(_0xaaf820(0x85))/0xa;if(_0x1ab133===_0x582f0b)break;else _0x5d1c41['push'](_0x5d1c41['shift']());}catch(_0x48cc71){_0x5d1c41['push'](_0x5d1c41['shift']());}}}(a40_0x821c,0xdc9a5));function a40_0x1c08(_0x1e2696,_0x144378){_0x1e2696=_0x1e2696-0x70;const _0x821cab=a40_0x821c();let _0x1c08f3=_0x821cab[_0x1e2696];return _0x1c08f3;}import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import a40_0x1efcc1 from'chalk';export class UseCommand extends BaseCommand{[a40_0x25a850(0x83)]='use';['description']=a40_0x25a850(0x88);['validate'](_0x6ed00e){const _0x1f505d=a40_0x25a850,{args:_0x469602}=_0x6ed00e;if(_0x469602['length']===0x0)return undefined;if(_0x469602[_0x1f505d(0x94)]===0x1)return _0x1f505d(0x96)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+_0x1f505d(0x78)+_0x1f505d(0x70)+_0x1f505d(0x98);const _0x56ae7c=_0x469602[0x0],_0x4f980a=[_0x1f505d(0x73),_0x1f505d(0x74),_0x1f505d(0x75),'profile','engage_workspace'];if(!_0x4f980a[_0x1f505d(0x81)](_0x56ae7c))return'Invalid\x20resource:\x20'+_0x56ae7c+_0x1f505d(0x7c)+_0x4f980a[_0x1f505d(0x99)](',\x20');return undefined;}async[a40_0x25a850(0x7a)](_0x5a6756){const _0x159636=a40_0x25a850,{args:_0xb9ce3a,options:_0x5a4dfb}=_0x5a6756,_0x18d138=_0x5a4dfb['debug'],_0x3c2807=_0x5a4dfb[_0x159636(0x80)];cleanExpiredSessions();try{if(_0x3c2807){clearSessionContext(_0x5a4dfb[_0x159636(0x91)]);const _0x214d6f=_0x5a4dfb[_0x159636(0x91)]||getCurrentSessionPID()[_0x159636(0x86)]();return console[_0x159636(0x9d)]('Session\x20context\x20'+a40_0x1efcc1[_0x159636(0x7f)]('cleared')+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0x214d6f+')')),0x0;}if(_0xb9ce3a[_0x159636(0x94)]===0x0){const _0x2a226c=new GlobalContext(_0x5a4dfb);return _0x18d138?_0x2a226c[_0x159636(0x8a)]():_0x2a226c[_0x159636(0x7b)](),console[_0x159636(0x9d)](a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x9b))),console[_0x159636(0x9d)](a40_0x1efcc1['dim'](_0x159636(0x77))),0x0;}const _0x1752b2=_0xb9ce3a[0x0],_0x48b49d=_0xb9ce3a[0x1];if(_0x1752b2===_0x159636(0x92)){if(!profileExists(_0x48b49d))return console[_0x159636(0x7d)]('Error:\x20Profile\x20\x27'+_0x48b49d+_0x159636(0x95)),console[_0x159636(0x7d)](_0x159636(0x90)),0x1;const _0xa319ea=_0x5a4dfb['session']||getCurrentSessionPID()[_0x159636(0x86)]();return saveSessionContext({'profile':_0x48b49d},_0x5a4dfb[_0x159636(0x91)]),console['log']('Session\x20profile\x20set\x20to:\x20'+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0xa319ea+')')),console['log'](a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x82))),0x0;}const _0x25cc05={},_0x3f897b=_0x5a4dfb[_0x159636(0x91)]||getCurrentSessionPID()[_0x159636(0x86)]();switch(_0x1752b2){case _0x159636(0x73):_0x25cc05[_0x159636(0x73)]=_0x48b49d,console[_0x159636(0x9d)](_0x159636(0x87)+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0x3f897b+')'));break;case'parent_segment':_0x25cc05['parent_segment']=_0x48b49d,console[_0x159636(0x9d)](_0x159636(0x9e)+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)]('(session:\x20'+_0x3f897b+')'));break;case _0x159636(0x75):_0x25cc05[_0x159636(0x75)]=_0x48b49d,console[_0x159636(0x9d)](_0x159636(0x7e)+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0x3f897b+')'));break;case _0x159636(0x8e):_0x25cc05['engage_workspace']=_0x48b49d,console[_0x159636(0x9d)](_0x159636(0x79)+a40_0x1efcc1[_0x159636(0x7f)](_0x48b49d)+'\x20'+a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x76)+_0x3f897b+')'));break;}return saveSessionContext(_0x25cc05,_0x5a4dfb[_0x159636(0x91)]),console[_0x159636(0x9d)](a40_0x1efcc1[_0x159636(0x89)](_0x159636(0x82))),0x0;}catch(_0x3f84cb){return _0x3f84cb instanceof Error&&console[_0x159636(0x7d)](_0x159636(0x97)+_0x3f84cb[_0x159636(0x72)]),0x1;}}}
@@ -1 +1 @@
1
- const a41_0x443635=a41_0x1e14;(function(_0x128dbc,_0x36b7b1){const _0x506e77=a41_0x1e14,_0x3a89e0=_0x128dbc();while(!![]){try{const _0x5c6f63=-parseInt(_0x506e77(0xf7))/0x1+parseInt(_0x506e77(0xf8))/0x2+-parseInt(_0x506e77(0xee))/0x3*(-parseInt(_0x506e77(0xe7))/0x4)+parseInt(_0x506e77(0xfc))/0x5+parseInt(_0x506e77(0xfb))/0x6*(-parseInt(_0x506e77(0xef))/0x7)+parseInt(_0x506e77(0xfa))/0x8+parseInt(_0x506e77(0xff))/0x9*(-parseInt(_0x506e77(0xf5))/0xa);if(_0x5c6f63===_0x36b7b1)break;else _0x3a89e0['push'](_0x3a89e0['shift']());}catch(_0x5971eb){_0x3a89e0['push'](_0x3a89e0['shift']());}}}(a41_0x5543,0x9dd4c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a41_0x443635(0xe9)]='user';[a41_0x443635(0x101)]=a41_0x443635(0xf9);async['execute'](_0x1fd12d){const _0x3f7aa7=a41_0x443635,{options:_0x583bbd,tdx:_0x42ca3a}=_0x1fd12d;try{const _0x24224b=await withSpinner(_0x3f7aa7(0x100),()=>_0x42ca3a[_0x3f7aa7(0x102)]['getCurrent'](),{'verbose':_0x583bbd[_0x3f7aa7(0xf3)]}),_0x540e0f=_0x24224b[_0x3f7aa7(0xf1)];return await handleSingleObjectOutput(_0x540e0f,_0x583bbd),0x0;}catch(_0x631e9b){if(_0x631e9b instanceof SDKError)return console[_0x3f7aa7(0xe8)]('Error:\x20'+_0x631e9b[_0x3f7aa7(0xfd)]),_0x631e9b[_0x3f7aa7(0xf4)]&&console['error'](_0x3f7aa7(0xfe)+_0x631e9b[_0x3f7aa7(0xf4)]),0x1;throw _0x631e9b;}}}function a41_0x5543(){const _0x9c831b=['list','length','766035EIlIcx','203EvtVWi','List\x20all\x20users\x20in\x20the\x20account','data','user\x20list','verbose','cause','30lnIfBH','execute','863753vCKlMo','2528054YFSQuf','Show\x20current\x20user\x20information','4679144dJWEsv','185820DULShu','2633035ICLzuR','message','\x20\x20Cause:\x20','3731679bZTUtE','Fetching\x20user\x20info...','description','user','20fDJhuT','error','name','\x20user','Listing\x20users...'];a41_0x5543=function(){return _0x9c831b;};return a41_0x5543();}function a41_0x1e14(_0x5e221f,_0x4de53b){_0x5e221f=_0x5e221f-0xe7;const _0x5543cb=a41_0x5543();let _0x1e146f=_0x5543cb[_0x5e221f];return _0x1e146f;}export class UserListCommand extends BaseCommand{[a41_0x443635(0xe9)]=a41_0x443635(0xf2);[a41_0x443635(0x101)]=a41_0x443635(0xf0);async[a41_0x443635(0xf6)](_0x21dda7){const _0x3685f4=a41_0x443635,{options:_0x52db4f,tdx:_0x4b07a2}=_0x21dda7;try{const _0x3dc2d4=await withSpinner(_0x3685f4(0xeb),()=>_0x4b07a2[_0x3685f4(0x102)][_0x3685f4(0xec)](),{'verbose':_0x52db4f['verbose']}),_0x3ea3b1=_0x3dc2d4[_0x3685f4(0xf1)];return console[_0x3685f4(0xe8)]('✔\x20Found\x20'+_0x3ea3b1[_0x3685f4(0xed)]+_0x3685f4(0xea)+(_0x3ea3b1[_0x3685f4(0xed)]!==0x1?'s':'')),await handleSDKOutput(_0x3ea3b1,_0x52db4f),0x0;}catch(_0x500130){if(_0x500130 instanceof SDKError)return console[_0x3685f4(0xe8)]('Error:\x20'+_0x500130[_0x3685f4(0xfd)]),_0x500130[_0x3685f4(0xf4)]&&console[_0x3685f4(0xe8)](_0x3685f4(0xfe)+_0x500130[_0x3685f4(0xf4)]),0x1;throw _0x500130;}}}
1
+ const a41_0x5c810e=a41_0x13e2;(function(_0x11e819,_0x4f3a56){const _0x2423f0=a41_0x13e2,_0xe57a70=_0x11e819();while(!![]){try{const _0x2c355a=-parseInt(_0x2423f0(0x1da))/0x1*(-parseInt(_0x2423f0(0x1cd))/0x2)+parseInt(_0x2423f0(0x1d2))/0x3+-parseInt(_0x2423f0(0x1d9))/0x4*(-parseInt(_0x2423f0(0x1cf))/0x5)+-parseInt(_0x2423f0(0x1dc))/0x6+-parseInt(_0x2423f0(0x1d3))/0x7*(-parseInt(_0x2423f0(0x1cc))/0x8)+parseInt(_0x2423f0(0x1e7))/0x9+parseInt(_0x2423f0(0x1e1))/0xa*(-parseInt(_0x2423f0(0x1e2))/0xb);if(_0x2c355a===_0x4f3a56)break;else _0xe57a70['push'](_0xe57a70['shift']());}catch(_0x23cd37){_0xe57a70['push'](_0xe57a70['shift']());}}}(a41_0x52b0,0x9538c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a41_0x13e2(_0xed9100,_0x1bb25a){_0xed9100=_0xed9100-0x1cb;const _0x52b00f=a41_0x52b0();let _0x13e2dc=_0x52b00f[_0xed9100];return _0x13e2dc;}export class UserCommand extends BaseCommand{[a41_0x5c810e(0x1e0)]='user';['description']=a41_0x5c810e(0x1e4);async[a41_0x5c810e(0x1d8)](_0x40588a){const _0x1aaa86=a41_0x5c810e,{options:_0x22e896,tdx:_0x2b2ea4}=_0x40588a;try{const _0x3ab99d=await withSpinner('Fetching\x20user\x20info...',()=>_0x2b2ea4[_0x1aaa86(0x1d7)][_0x1aaa86(0x1d0)](),{'verbose':_0x22e896[_0x1aaa86(0x1d5)]}),_0x36bdf1=_0x3ab99d[_0x1aaa86(0x1d6)];return await handleSingleObjectOutput(_0x36bdf1,_0x22e896),0x0;}catch(_0x7f4dc5){if(_0x7f4dc5 instanceof SDKError)return console['error'](_0x1aaa86(0x1db)+_0x7f4dc5[_0x1aaa86(0x1d1)]),_0x7f4dc5[_0x1aaa86(0x1d4)]&&console[_0x1aaa86(0x1e6)]('\x20\x20Cause:\x20'+_0x7f4dc5[_0x1aaa86(0x1d4)]),0x1;throw _0x7f4dc5;}}}function a41_0x52b0(){const _0x4b3807=['321687qMeasw','user\x20list','8mzHFjW','6ldKxkh','length','35KTshzG','getCurrent','message','2319411ByLeFF','4632026sTIgZu','cause','verbose','data','user','execute','225332fmHHlu','93350fywvGd','Error:\x20','4162668nIWnzt','List\x20all\x20users\x20in\x20the\x20account','Listing\x20users...','\x20user','name','8399890DHTOKI','11xAdXTd','✔\x20Found\x20','Show\x20current\x20user\x20information','description','error'];a41_0x52b0=function(){return _0x4b3807;};return a41_0x52b0();}export class UserListCommand extends BaseCommand{[a41_0x5c810e(0x1e0)]=a41_0x5c810e(0x1cb);[a41_0x5c810e(0x1e5)]=a41_0x5c810e(0x1dd);async[a41_0x5c810e(0x1d8)](_0x2797b5){const _0x3405b7=a41_0x5c810e,{options:_0x407279,tdx:_0x4aacd4}=_0x2797b5;try{const _0x42e733=await withSpinner(_0x3405b7(0x1de),()=>_0x4aacd4[_0x3405b7(0x1d7)]['list'](),{'verbose':_0x407279[_0x3405b7(0x1d5)]}),_0x28e55b=_0x42e733['data'];return console[_0x3405b7(0x1e6)](_0x3405b7(0x1e3)+_0x28e55b[_0x3405b7(0x1ce)]+_0x3405b7(0x1df)+(_0x28e55b[_0x3405b7(0x1ce)]!==0x1?'s':'')),await handleSDKOutput(_0x28e55b,_0x407279),0x0;}catch(_0x14c233){if(_0x14c233 instanceof SDKError)return console['error'](_0x3405b7(0x1db)+_0x14c233[_0x3405b7(0x1d1)]),_0x14c233[_0x3405b7(0x1d4)]&&console[_0x3405b7(0x1e6)]('\x20\x20Cause:\x20'+_0x14c233['cause']),0x1;throw _0x14c233;}}}
@@ -1 +1 @@
1
- const a42_0x27668e=a42_0x3fe4;(function(_0x2c6291,_0x33e691){const _0x4ac9bc=a42_0x3fe4,_0xcffd2c=_0x2c6291();while(!![]){try{const _0x463c41=parseInt(_0x4ac9bc(0x91))/0x1*(parseInt(_0x4ac9bc(0xde))/0x2)+-parseInt(_0x4ac9bc(0xb7))/0x3*(-parseInt(_0x4ac9bc(0xc8))/0x4)+parseInt(_0x4ac9bc(0xee))/0x5*(parseInt(_0x4ac9bc(0xc1))/0x6)+-parseInt(_0x4ac9bc(0xbd))/0x7+-parseInt(_0x4ac9bc(0x100))/0x8+parseInt(_0x4ac9bc(0xdc))/0x9+-parseInt(_0x4ac9bc(0x102))/0xa;if(_0x463c41===_0x33e691)break;else _0xcffd2c['push'](_0xcffd2c['shift']());}catch(_0x140270){_0xcffd2c['push'](_0xcffd2c['shift']());}}}(a42_0x10cf,0x8132f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';import a42_0x4c87ab from'prompts';export class WorkflowProjectsCommand extends BaseCommand{[a42_0x27668e(0xf9)]=a42_0x27668e(0x86);['description']=a42_0x27668e(0xeb);async['execute'](_0x227fc3){const _0x20b92e=a42_0x27668e,{options:_0x2cf727,args:_0x1e144a,tdx:_0x5d470d}=_0x227fc3,_0x5e6b49=_0x1e144a[0x0];try{_0x2cf727['verbose']&&_0x5e6b49&&console[_0x20b92e(0xb4)](_0x20b92e(0x105)+_0x5e6b49);const _0x3413dc=await withSpinner(_0x20b92e(0x84),()=>_0x5d470d[_0x20b92e(0x118)][_0x20b92e(0x97)](_0x5e6b49,{'limit':_0x2cf727[_0x20b92e(0x87)]}),{'verbose':_0x2cf727[_0x20b92e(0xe2)]}),_0x1d84f4=_0x3413dc[_0x20b92e(0xfd)];return console[_0x20b92e(0xb4)](_0x20b92e(0x106)+_0x1d84f4[_0x20b92e(0xc0)]+_0x20b92e(0xea)+(_0x1d84f4[_0x20b92e(0xc0)]!==0x1?'s':'')),await handleSDKOutput(_0x1d84f4,_0x2cf727),0x0;}catch(_0x28e105){if(_0x28e105 instanceof SDKError)return console[_0x20b92e(0xb4)](_0x20b92e(0xc4)+_0x28e105[_0x20b92e(0xb0)]),_0x28e105['cause']&&console['error']('\x20\x20Cause:\x20'+_0x28e105[_0x20b92e(0x10f)]),0x1;throw _0x28e105;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a42_0x27668e(0xf9)]=a42_0x27668e(0xdf);[a42_0x27668e(0x76)]=a42_0x27668e(0xe1);async[a42_0x27668e(0xc9)](_0x5dc112){const _0x11c2a0=a42_0x27668e,{options:_0x12f928,args:_0x5a2887,tdx:_0x1b6a26}=_0x5dc112,_0x139847=_0x5a2887[0x0];try{_0x12f928['verbose']&&_0x139847&&console[_0x11c2a0(0xb4)](_0x11c2a0(0xf4)+_0x139847);const _0x536458=await withSpinner(_0x11c2a0(0x72),()=>_0x1b6a26['workflow'][_0x11c2a0(0xd4)](_0x139847,{'limit':_0x12f928[_0x11c2a0(0x87)]}),{'verbose':_0x12f928['verbose']}),_0x546c9b=_0x536458[_0x11c2a0(0xfd)];return console[_0x11c2a0(0xb4)](_0x11c2a0(0x106)+_0x546c9b[_0x11c2a0(0xc0)]+'\x20workflow'+(_0x546c9b[_0x11c2a0(0xc0)]!==0x1?'s':'')),await handleSDKOutput(_0x546c9b,_0x12f928),0x0;}catch(_0x37e0fa){if(_0x37e0fa instanceof SDKError)return console[_0x11c2a0(0xb4)](_0x11c2a0(0xc4)+_0x37e0fa[_0x11c2a0(0xb0)]),_0x37e0fa[_0x11c2a0(0x10f)]&&console[_0x11c2a0(0xb4)](_0x11c2a0(0xe6)+_0x37e0fa[_0x11c2a0(0x10f)]),0x1;throw _0x37e0fa;}}}export class WorkflowSessionsCommand extends BaseCommand{[a42_0x27668e(0xf9)]='workflow:sessions';['description']=a42_0x27668e(0x9e);async[a42_0x27668e(0xc9)](_0x2dc5f3){const _0x190fb5=a42_0x27668e,{options:_0x25e8f9,args:_0x26c692,tdx:_0x165f3f}=_0x2dc5f3;let _0x2efb17,_0x5f1917;if(_0x26c692[0x0]){const _0x5426fa=_0x26c692[0x0]['split']('.');if(_0x5426fa[_0x190fb5(0xc0)]===0x1)_0x2efb17=_0x5426fa[0x0];else{if(_0x5426fa[_0x190fb5(0xc0)]===0x2)[_0x2efb17,_0x5f1917]=_0x5426fa;else return console[_0x190fb5(0xb4)](_0x190fb5(0x9b)),0x1;}}try{if(_0x25e8f9['verbose']){if(_0x2efb17&&_0x5f1917)console[_0x190fb5(0xb4)](_0x190fb5(0x85)+_0x2efb17+'.'+_0x5f1917);else _0x2efb17&&console[_0x190fb5(0xb4)]('Filter:\x20project='+_0x2efb17);const _0x2b53e4=_0x25e8f9['status'];_0x2b53e4&&console[_0x190fb5(0xb4)](_0x190fb5(0xfb)+_0x2b53e4);}const _0xdfab10=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x165f3f['workflow'][_0x190fb5(0xf6)]({'projectName':_0x2efb17,'workflowName':_0x5f1917,'status':_0x25e8f9[_0x190fb5(0xdb)],'fromTime':_0x25e8f9[_0x190fb5(0xb5)],'toTime':_0x25e8f9['to'],'limit':_0x25e8f9[_0x190fb5(0x87)]}),{'verbose':_0x25e8f9['verbose']}),_0x131537=_0xdfab10[_0x190fb5(0xfd)];return console[_0x190fb5(0xb4)]('✔\x20Found\x20'+_0x131537['length']+'\x20session'+(_0x131537[_0x190fb5(0xc0)]!==0x1?'s':'')),await handleSDKOutput(_0x131537,_0x25e8f9),0x0;}catch(_0xeb023e){if(_0xeb023e instanceof SDKError)return console['error'](_0x190fb5(0xc4)+_0xeb023e[_0x190fb5(0xb0)]),_0xeb023e[_0x190fb5(0x10f)]&&console['error'](_0x190fb5(0xe6)+_0xeb023e['cause']),0x1;throw _0xeb023e;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a42_0x27668e(0xf9)]='workflow:attempts';[a42_0x27668e(0x76)]='List\x20workflow\x20attempts';async[a42_0x27668e(0xc9)](_0xe91c3a){const _0x1dc727=a42_0x27668e,{options:_0x518f51,args:_0x459af5,tdx:_0x1071ce}=_0xe91c3a;let _0x5037c3,_0x5b55a7;if(_0x459af5[0x0]){const _0x17c3a3=_0x459af5[0x0][_0x1dc727(0xaf)]('.');if(_0x17c3a3[_0x1dc727(0xc0)]===0x1)_0x5037c3=_0x17c3a3[0x0];else{if(_0x17c3a3['length']===0x2)[_0x5037c3,_0x5b55a7]=_0x17c3a3;else return console[_0x1dc727(0xb4)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x5e6d2c=_0x518f51[_0x1dc727(0xb2)];if(_0x518f51[_0x1dc727(0xe2)]){if(_0x5037c3&&_0x5b55a7)console[_0x1dc727(0xb4)](_0x1dc727(0x85)+_0x5037c3+'.'+_0x5b55a7);else _0x5037c3&&console['error'](_0x1dc727(0xec)+_0x5037c3);_0x5e6d2c&&console['error'](_0x1dc727(0x71));}const _0x884dde=await withSpinner(_0x1dc727(0x92),()=>_0x1071ce['workflow'][_0x1dc727(0x116)]({'projectName':_0x5037c3,'workflowName':_0x5b55a7,'includeRetried':_0x5e6d2c,'limit':_0x518f51[_0x1dc727(0x87)]}),{'verbose':_0x518f51[_0x1dc727(0xe2)]}),_0x205872=_0x884dde['data'];return console[_0x1dc727(0xb4)]('✔\x20Found\x20'+_0x205872[_0x1dc727(0xc0)]+'\x20attempt'+(_0x205872[_0x1dc727(0xc0)]!==0x1?'s':'')),await handleSDKOutput(_0x205872,_0x518f51),0x0;}catch(_0x436564){if(_0x436564 instanceof SDKError)return console[_0x1dc727(0xb4)](_0x1dc727(0xc4)+_0x436564['message']),_0x436564[_0x1dc727(0x10f)]&&console[_0x1dc727(0xb4)](_0x1dc727(0xe6)+_0x436564[_0x1dc727(0x10f)]),0x1;throw _0x436564;}}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x27668e(0xf9)]=a42_0x27668e(0x8b);['description']='Show\x20specific\x20attempt\x20details';async[a42_0x27668e(0xc9)](_0x5a4f73){const _0x38f06a=a42_0x27668e,{options:_0x5a4feb,args:_0xfa068c,tdx:_0x3de54e}=_0x5a4f73,_0x3038dd=_0xfa068c[0x0];if(!_0x3038dd)return console[_0x38f06a(0xb4)](_0x38f06a(0xfe)),0x1;try{_0x5a4feb['verbose']&&console[_0x38f06a(0xb4)](_0x38f06a(0xd3)+_0x3038dd);const _0x24d6a8=await withSpinner(_0x38f06a(0xa5),()=>_0x3de54e['workflow'][_0x38f06a(0x107)](_0x3038dd),{'verbose':_0x5a4feb['verbose']}),_0xf75996=_0x24d6a8['data'];let _0x231ad3;!_0xf75996[_0x38f06a(0xaa)]?_0x231ad3=_0xf75996[_0x38f06a(0x77)]?_0x38f06a(0x93):_0x38f06a(0xb3):_0x231ad3=_0xf75996[_0x38f06a(0xe5)]?_0x38f06a(0xe5):_0x38f06a(0xb4);let _0x1cd4ed;if(_0xf75996[_0x38f06a(0xcd)]&&_0xf75996[_0x38f06a(0xe7)]){const _0x1c214f=new Date(_0xf75996[_0x38f06a(0xcd)])[_0x38f06a(0xad)](),_0x197a45=new Date(_0xf75996[_0x38f06a(0xe7)])[_0x38f06a(0xad)]();_0x1cd4ed=Math[_0x38f06a(0xa2)]((_0x197a45-_0x1c214f)/0x3e8);}const _0x24d696={'attempt_id':_0xf75996['id'],'status':_0x231ad3,..._0xf75996[_0x38f06a(0xa9)]!==undefined&&{'index':_0xf75996[_0x38f06a(0xa9)]},..._0xf75996[_0x38f06a(0xd0)]&&{'project':_0xf75996['project'][_0x38f06a(0xf9)]},..._0xf75996[_0x38f06a(0x118)]&&{'workflow':_0xf75996[_0x38f06a(0x118)][_0x38f06a(0xf9)]},..._0xf75996[_0x38f06a(0xb6)]&&{'session_id':_0xf75996[_0x38f06a(0xb6)]},..._0xf75996[_0x38f06a(0x112)]&&{'session_time':_0xf75996['sessionTime']},..._0xf75996[_0x38f06a(0xe3)]&&{'retry_attempt':_0xf75996[_0x38f06a(0xe3)]},..._0x1cd4ed!==undefined&&{'duration_sec':_0x1cd4ed},..._0xf75996['createdAt']&&{'created_at':_0xf75996['createdAt']},..._0xf75996[_0x38f06a(0xe7)]&&{'finished_at':_0xf75996[_0x38f06a(0xe7)]},...Object[_0x38f06a(0x111)](_0xf75996[_0x38f06a(0xf7)])[_0x38f06a(0xc0)]>0x0&&{'params':_0xf75996[_0x38f06a(0xf7)]}};return await handleSingleObjectOutput(_0x24d696,_0x5a4feb),0x0;}catch(_0x23bd17){if(_0x23bd17 instanceof SDKError)return console['error']('Error:\x20'+_0x23bd17[_0x38f06a(0xb0)]),_0x23bd17[_0x38f06a(0x10f)]&&console['error']('\x20\x20Cause:\x20'+_0x23bd17[_0x38f06a(0x10f)]),0x1;throw _0x23bd17;}}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x27668e(0xf9)]=a42_0x27668e(0xae);[a42_0x27668e(0x76)]=a42_0x27668e(0x113);async[a42_0x27668e(0xc9)](_0xbdd8d3){const _0x54f7c1=a42_0x27668e,{options:_0x3cf06b,args:_0x358033,tdx:_0x447d68}=_0xbdd8d3,_0x941486=_0x358033[0x0];if(!_0x941486)return console['error']('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x40e909=_0x3cf06b['includeSubtasks'];_0x3cf06b['verbose']&&(console[_0x54f7c1(0xb4)](_0x54f7c1(0xd3)+_0x941486),_0x40e909&&console[_0x54f7c1(0xb4)](_0x54f7c1(0x7b)));const _0x3e0c33=await withSpinner(_0x54f7c1(0x99),()=>_0x447d68[_0x54f7c1(0x118)]['tasks'](_0x941486,_0x40e909||![]),{'verbose':_0x3cf06b[_0x54f7c1(0xe2)]}),_0x49fc94=_0x3e0c33[_0x54f7c1(0xfd)];return console['error']('✔\x20Found\x20'+_0x49fc94['length']+'\x20task'+(_0x49fc94[_0x54f7c1(0xc0)]!==0x1?'s':'')),await handleSDKOutput(_0x49fc94,_0x3cf06b),0x0;}catch(_0x26b76a){if(_0x26b76a instanceof SDKError)return console[_0x54f7c1(0xb4)](_0x54f7c1(0xc4)+_0x26b76a[_0x54f7c1(0xb0)]),_0x26b76a[_0x54f7c1(0x10f)]&&console[_0x54f7c1(0xb4)](_0x54f7c1(0xe6)+_0x26b76a[_0x54f7c1(0x10f)]),0x1;throw _0x26b76a;}}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x27668e(0xf9)]=a42_0x27668e(0xa0);[a42_0x27668e(0x76)]=a42_0x27668e(0x82);async['execute'](_0x25a962){const _0x39b21c=a42_0x27668e,{options:_0x2e08f4,args:_0x465a38,tdx:_0x38d207}=_0x25a962,_0xfb2c15=_0x465a38[0x0];let _0x1ba5c1=_0x465a38[0x1];if(!_0xfb2c15)return console[_0x39b21c(0xb4)](_0x39b21c(0xfe)),0x1;try{_0x2e08f4['verbose']&&(console['error'](_0x39b21c(0xd3)+_0xfb2c15),_0x1ba5c1&&console[_0x39b21c(0xb4)](_0x39b21c(0x88)+_0x1ba5c1));const _0x40589e=await withSpinner('Fetching\x20log\x20files...',()=>_0x38d207['workflow']['logFiles'](_0xfb2c15,_0x1ba5c1),{'verbose':_0x2e08f4[_0x39b21c(0xe2)]}),_0x2d0d9c=_0x40589e[_0x39b21c(0xfd)];if(_0x2d0d9c[_0x39b21c(0xc0)]===0x0)return console[_0x39b21c(0xb4)](_0x39b21c(0x101)),0x0;if(!_0x1ba5c1&&(_0x2e08f4[_0x39b21c(0x7d)]||_0x2e08f4['format']))return await handleSDKOutput(_0x2d0d9c,_0x2e08f4),0x0;if(!_0x1ba5c1){const _0x56963c=_0x2d0d9c[_0x39b21c(0xca)](_0x4b974e=>({'title':_0x4b974e[_0x39b21c(0xce)]+'\x20('+formatBytes(_0x4b974e['fileSize'])+')','value':_0x4b974e['taskName']})),_0x2f4492=await a42_0x4c87ab({'type':'select','name':_0x39b21c(0xac),'message':_0x39b21c(0xe8),'choices':_0x56963c});if(!_0x2f4492[_0x39b21c(0xac)])return console[_0x39b21c(0xb4)](_0x39b21c(0xcb)),0x0;_0x1ba5c1=_0x2f4492[_0x39b21c(0xac)];}const _0x9f8c37=await withSpinner(_0x39b21c(0x8c),()=>_0x38d207[_0x39b21c(0x118)][_0x39b21c(0x98)](_0xfb2c15,_0x1ba5c1),{'verbose':_0x2e08f4[_0x39b21c(0xe2)]}),_0x47ceda=_0x9f8c37['data'];return _0x47ceda?console[_0x39b21c(0xe0)](_0x47ceda):console[_0x39b21c(0xb4)](_0x39b21c(0xbe)),0x0;}catch(_0x396827){if(_0x396827 instanceof SDKError)return console['error'](_0x39b21c(0xc4)+_0x396827[_0x39b21c(0xb0)]),_0x396827[_0x39b21c(0x10f)]&&console['error']('\x20\x20Cause:\x20'+_0x396827[_0x39b21c(0x10f)]),0x1;throw _0x396827;}}}export class WorkflowKillCommand extends BaseCommand{[a42_0x27668e(0xf9)]='workflow:kill';[a42_0x27668e(0x76)]=a42_0x27668e(0x7a);async[a42_0x27668e(0xc9)](_0xcaac){const _0x1e39c7=a42_0x27668e,{options:_0x30e213,args:_0x340d74,tdx:_0x3c8e6e}=_0xcaac,_0x5db6e8=_0x340d74[0x0];if(!_0x5db6e8)return console[_0x1e39c7(0xb4)](_0x1e39c7(0xfe)),0x1;try{const _0x500144=_0x30e213[_0x1e39c7(0x108)];_0x30e213[_0x1e39c7(0xe2)]&&(console[_0x1e39c7(0xb4)](_0x1e39c7(0xd3)+_0x5db6e8),_0x500144&&console[_0x1e39c7(0xb4)](_0x1e39c7(0x75)+_0x500144));if(!_0x30e213[_0x1e39c7(0xf8)]){const _0x5ea396=await confirm(_0x1e39c7(0x8a)+_0x5db6e8+'?');if(!_0x5ea396)return console['error'](_0x1e39c7(0xcb)),0x0;}const _0x439196=await withSpinner('Killing\x20attempt...',()=>_0x3c8e6e[_0x1e39c7(0x118)][_0x1e39c7(0xff)](_0x5db6e8,_0x500144),{'verbose':_0x30e213[_0x1e39c7(0xe2)]}),_0x526f98=_0x439196['data'];return console[_0x1e39c7(0xb4)]('✔\x20'+_0x526f98),0x0;}catch(_0xbe3a95){if(_0xbe3a95 instanceof SDKError)return console[_0x1e39c7(0xb4)](_0x1e39c7(0xc4)+_0xbe3a95[_0x1e39c7(0xb0)]),_0xbe3a95[_0x1e39c7(0x10f)]&&console['error'](_0x1e39c7(0xe6)+_0xbe3a95[_0x1e39c7(0x10f)]),0x1;throw _0xbe3a95;}}}export class WorkflowRetryCommand extends BaseCommand{['name']='workflow:retry';[a42_0x27668e(0x76)]=a42_0x27668e(0x109);async[a42_0x27668e(0xc9)](_0x1606cb){const _0x4044aa=a42_0x27668e,{options:_0x4a52d5,args:_0x3b76fe,tdx:_0x5a9590}=_0x1606cb,_0x32dbc2=_0x3b76fe[0x0];if(!_0x32dbc2)return console[_0x4044aa(0xb4)](_0x4044aa(0xd6)),console['error'](_0x4044aa(0x80)),0x1;let _0x2bdd2f=![],_0x1039d0=_0x32dbc2;if(_0x32dbc2[_0x4044aa(0xb9)](_0x4044aa(0xb1)))_0x2bdd2f=!![],_0x1039d0=_0x32dbc2['substring'](0x8);else{if(_0x32dbc2[_0x4044aa(0xb9)](_0x4044aa(0xd2)))_0x2bdd2f=![],_0x1039d0=_0x32dbc2[_0x4044aa(0xab)](0x8);else return console[_0x4044aa(0xb4)](_0x4044aa(0xc7)),console[_0x4044aa(0xb4)](_0x4044aa(0x80)),0x1;}try{const _0x56393d=_0x4a52d5[_0x4044aa(0x8e)],_0x4ff113=_0x4a52d5['resumeFrom'],_0x3cb6ab=_0x4a52d5[_0x4044aa(0xf7)],_0xfcfed=_0x4a52d5[_0x4044aa(0x7f)];_0x4a52d5[_0x4044aa(0xe2)]&&(console[_0x4044aa(0xb4)](_0x4044aa(0x117)+(_0x2bdd2f?'session':'attempt')+'\x20'+_0x1039d0),_0x56393d&&console[_0x4044aa(0xb4)]('From\x20task:\x20'+_0x56393d),_0x4ff113&&console[_0x4044aa(0xb4)](_0x4044aa(0x73)+_0x4ff113),_0x3cb6ab&&console[_0x4044aa(0xb4)]('Params:\x20'+_0x3cb6ab),_0xfcfed&&console['error'](_0x4044aa(0x10d)));let _0x1b6672;if(_0x3cb6ab)try{if(_0x3cb6ab['startsWith']('@')){const _0x305382=await import(_0x4044aa(0xe4)),_0x5eaac7=_0x3cb6ab['substring'](0x1),_0x51bd00=await _0x305382[_0x4044aa(0xbc)](_0x5eaac7,'utf-8');_0x1b6672=JSON[_0x4044aa(0x110)](_0x51bd00);}else _0x1b6672=JSON['parse'](_0x3cb6ab);}catch{return console[_0x4044aa(0xb4)](_0x4044aa(0x70)),0x1;}if(!_0x4a52d5['yes']){const _0x22d7d8=await confirm(_0x4044aa(0xb8)+(_0x2bdd2f?_0x4044aa(0xc3):_0x4044aa(0x107))+'\x20'+_0x1039d0+'?');if(!_0x22d7d8)return console[_0x4044aa(0xb4)](_0x4044aa(0xcb)),0x0;}let _0x24c791;_0x2bdd2f?_0x24c791=await withSpinner(_0x4044aa(0xd8),()=>_0x5a9590[_0x4044aa(0x118)][_0x4044aa(0x89)](_0x1039d0,{'fromTask':_0x56393d,'retryParams':_0x1b6672}),{'verbose':_0x4a52d5['verbose']}):_0x24c791=await withSpinner(_0x4044aa(0xc2),()=>_0x5a9590[_0x4044aa(0x118)][_0x4044aa(0xa7)](_0x1039d0,{'resumeFrom':_0x4ff113,'retryParams':_0x1b6672,'force':_0xfcfed}),{'verbose':_0x4a52d5[_0x4044aa(0xe2)]});const _0x387389=_0x24c791[_0x4044aa(0xfd)];return console['error'](_0x4044aa(0xbb)),console['error'](_0x4044aa(0xed)+_0x387389[_0x4044aa(0xf2)]),console[_0x4044aa(0xb4)](_0x4044aa(0xd9)+_0x387389[_0x4044aa(0xb6)]),0x0;}catch(_0x3e96ac){if(_0x3e96ac instanceof SDKError)return console['error'](_0x4044aa(0xc4)+_0x3e96ac[_0x4044aa(0xb0)]),_0x3e96ac[_0x4044aa(0x10f)]&&console[_0x4044aa(0xb4)]('\x20\x20Cause:\x20'+_0x3e96ac[_0x4044aa(0x10f)]),0x1;throw _0x3e96ac;}}}export class WorkflowRunCommand extends BaseCommand{['name']=a42_0x27668e(0xda);[a42_0x27668e(0x76)]=a42_0x27668e(0x9d);async[a42_0x27668e(0xc9)](_0x3165f8){const _0x14e6ce=a42_0x27668e,{options:_0x1b422e,args:_0x4d52c7,tdx:_0x160de6}=_0x3165f8,_0x5a3be7=_0x4d52c7[0x0];if(!_0x5a3be7)return console['error'](_0x14e6ce(0x7e)),console[_0x14e6ce(0xb4)](_0x14e6ce(0x10a)),0x1;const _0x1f91dc=_0x1b422e[_0x14e6ce(0x115)],_0x28bf60=_0x1b422e[_0x14e6ce(0x112)],_0x433211={};if(_0x1f91dc&&Array[_0x14e6ce(0x10b)](_0x1f91dc))for(const _0x3a7d06 of _0x1f91dc){const _0x5e4c79=_0x3a7d06[_0x14e6ce(0xef)]('=');if(_0x5e4c79===-0x1)return console[_0x14e6ce(0xb4)](_0x14e6ce(0x8f)+_0x3a7d06),console[_0x14e6ce(0xb4)](_0x14e6ce(0x9c)),0x1;const _0x242b85=_0x3a7d06['substring'](0x0,_0x5e4c79),_0x23b0e0=_0x3a7d06[_0x14e6ce(0xab)](_0x5e4c79+0x1);try{_0x433211[_0x242b85]=JSON[_0x14e6ce(0x110)](_0x23b0e0);}catch{_0x433211[_0x242b85]=_0x23b0e0;}}_0x1b422e[_0x14e6ce(0xe2)]&&(console[_0x14e6ce(0xb4)]('Workflow:\x20'+_0x5a3be7),Object['keys'](_0x433211)[_0x14e6ce(0xc0)]>0x0&&console['error'](_0x14e6ce(0xf1)+JSON[_0x14e6ce(0x94)](_0x433211)),_0x28bf60&&console[_0x14e6ce(0xb4)](_0x14e6ce(0xe9)+_0x28bf60));const _0x38c5d5=await withSpinner(_0x14e6ce(0x95),()=>_0x160de6[_0x14e6ce(0x118)][_0x14e6ce(0xcf)](_0x5a3be7,_0x433211,{'sessionTime':_0x28bf60}),{'verbose':_0x1b422e[_0x14e6ce(0xe2)]}),_0xc0d2c1=_0x38c5d5[_0x14e6ce(0xfd)];return console[_0x14e6ce(0xb4)](_0x14e6ce(0x96)),console[_0x14e6ce(0xb4)](_0x14e6ce(0xd5)+_0xc0d2c1['id']),console['error'](_0x14e6ce(0xd9)+_0xc0d2c1[_0x14e6ce(0xb6)]),console['error'](_0x14e6ce(0xa3)+_0xc0d2c1[_0x14e6ce(0xd0)]?.[_0x14e6ce(0xf9)]),console[_0x14e6ce(0xb4)](_0x14e6ce(0x104)+_0xc0d2c1[_0x14e6ce(0x118)]?.[_0x14e6ce(0xf9)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{['name']='workflow:download';['description']='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0x27668e(0xc9)](_0x5020bb){const _0x2cfd58=a42_0x27668e,{options:_0x5510e8,args:_0x14eca3,tdx:_0x331f41}=_0x5020bb,_0x4780c2=_0x14eca3[0x0],_0xe0952d=_0x14eca3[0x1]||'.';if(!_0x4780c2)return console[_0x2cfd58(0xb4)](_0x2cfd58(0x83)),console[_0x2cfd58(0xb4)](_0x2cfd58(0xa4)),0x1;const _0xd2dea5=_0x5510e8[_0x2cfd58(0x103)];_0x5510e8['verbose']&&(console[_0x2cfd58(0xb4)](_0x2cfd58(0x79)+_0x4780c2),console[_0x2cfd58(0xb4)](_0x2cfd58(0x81)+_0xe0952d),_0xd2dea5&&console[_0x2cfd58(0xb4)]('Revision:\x20'+_0xd2dea5));const _0x4cba11=await withSpinner(_0x2cfd58(0xa6)+_0x4780c2+_0x2cfd58(0x90),()=>_0x331f41[_0x2cfd58(0x118)][_0x2cfd58(0x11a)](_0x4780c2,_0xe0952d,{'revision':_0xd2dea5}),{'verbose':_0x5510e8['verbose']}),_0x56eec3=_0x4cba11['data'];return console['error'](_0x2cfd58(0xd7)+_0x56eec3['projectName']),console['error'](_0x2cfd58(0xc6)+_0x56eec3[_0x2cfd58(0x103)]),console[_0x2cfd58(0xb4)](_0x2cfd58(0xdd)+_0x56eec3[_0x2cfd58(0x9a)]),console[_0x2cfd58(0xb4)](_0x2cfd58(0xfc)+_0xe0952d+'/'+_0x56eec3[_0x2cfd58(0xc5)]),0x0;}}function a42_0x3fe4(_0x52b5d8,_0x22ceea){_0x52b5d8=_0x52b5d8-0x70;const _0x10cf37=a42_0x10cf();let _0x3fe41b=_0x10cf37[_0x52b5d8];return _0x3fe41b;}function a42_0x10cf(){const _0x3947ff=['Pattern:\x20','✔\x20Found\x20','attempt','reason','Retry\x20a\x20session\x20or\x20attempt','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','isArray','Project\x20directory:\x20','Force:\x20yes','✔\x20Pushed\x20','cause','parse','keys','sessionTime','Show\x20tasks\x20for\x20an\x20attempt','isDirectory','param','attempts','Target:\x20','workflow','Usage:\x20workflow:delete\x20<project-name-or-id>','download','Error:\x20Invalid\x20JSON\x20in\x20--params','Include\x20retried:\x20yes','Listing\x20workflows...','Resume\x20from:\x20','\x20\x20Project\x20ID:\x20','Reason:\x20','description','cancelRequested','Deleting\x20project\x20','Project:\x20','Kill\x20a\x20running\x20attempt','Including\x20subtasks:\x20yes','workflow:delete','json','Error:\x20Workflow\x20identifier\x20is\x20required','force','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Output\x20directory:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Error:\x20Project\x20name\x20is\x20required','Listing\x20workflow\x20projects...','Filter:\x20','workflow:projects','limit','Task\x20name:\x20','retrySession','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','workflow:attempt','Downloading\x20logs...','Validation:\x20skipped','fromTask','Error:\x20Invalid\x20parameter\x20format:\x20','...','4tPQWOQ','Listing\x20workflow\x20attempts...','canceling','stringify','Starting\x20workflow\x20run...','✔\x20Workflow\x20run\x20started','projects','logs','Getting\x20attempt\x20tasks...','filesExtracted','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Expected\x20format:\x20--param\x20key=value','Start\x20a\x20workflow\x20run','List\x20workflow\x20execution\x20sessions','✔\x20Deleted\x20project\x20','workflow:logs','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','round','\x20\x20Project:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Getting\x20attempt\x20details...','Downloading\x20project\x20','retryAttempt','Project\x20name:\x20','index','done','substring','task','getTime','workflow:tasks','split','message','session:','includeRetried','running','error','from','sessionId','2345103avlJnp','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','startsWith','Revision:\x20','✔\x20Retry\x20started','readFile','1544949gIabMp','No\x20log\x20content\x20found','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','length','6cYRXYm','Retrying\x20attempt...','session','Error:\x20','projectName','\x20\x20Revision:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','4hbsrtP','execute','map','Cancelled','projectId','createdAt','taskName','run','project','skipValidation','attempt:','Attempt\x20ID:\x20','workflows','\x20\x20Attempt\x20ID:\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','✔\x20Downloaded\x20','Retrying\x20session...','\x20\x20Session\x20ID:\x20','workflow:run','status','8994807ehoTWc','\x20\x20Files\x20extracted:\x20','299926KvqVDy','workflow:workflows','log','List\x20workflows','verbose','retryAttemptName','fs/promises','success','\x20\x20Cause:\x20','finishedAt','Select\x20a\x20task\x20to\x20view\x20logs:','Session\x20time:\x20','\x20project','List\x20all\x20workflow\x20projects','Filter:\x20project=','\x20\x20New\x20attempt\x20ID:\x20','4389085nXuhbV','indexOf','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Parameters:\x20','attemptId','\x22?\x20This\x20cannot\x20be\x20undone.','Project\x20filter:\x20','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','sessions','params','yes','name','push','Status:\x20','\x20\x20Location:\x20','data','Error:\x20Attempt\x20ID\x20is\x20required','kill','939528vHcCme','No\x20log\x20files\x20found\x20for\x20this\x20attempt','23914460rZeKQP','revision','\x20\x20Workflow:\x20'];a42_0x10cf=function(){return _0x3947ff;};return a42_0x10cf();}export class WorkflowPushCommand extends BaseCommand{[a42_0x27668e(0xf9)]='workflow:push';['description']=a42_0x27668e(0xf5);async[a42_0x27668e(0xc9)](_0x212e86){const _0x33acc9=a42_0x27668e,{options:_0x2507c0,args:_0x461c01,tdx:_0x15e539}=_0x212e86;let _0x2e11bb='.',_0x552a27=_0x2507c0[_0x33acc9(0xf9)];if(_0x461c01[0x0]){const {promises:_0x194f66}=await import('fs');try{const _0x183d62=await _0x194f66['stat'](_0x461c01[0x0]);if(_0x183d62[_0x33acc9(0x114)]())_0x2e11bb=_0x461c01[0x0];else return console['error'](_0x33acc9(0xc4)+_0x461c01[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x552a27=_0x461c01[0x0],_0x2e11bb='.';}}const _0xd643e0=_0x2507c0['revision'],_0x4fef8c=_0x2507c0[_0x33acc9(0xd1)];_0x2507c0[_0x33acc9(0xe2)]&&(console[_0x33acc9(0xb4)](_0x33acc9(0x10c)+_0x2e11bb),_0x552a27&&console['error'](_0x33acc9(0xa8)+_0x552a27),_0xd643e0&&console['error'](_0x33acc9(0xba)+_0xd643e0),_0x4fef8c&&console['error'](_0x33acc9(0x8d)));const _0x490713=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x15e539[_0x33acc9(0x118)][_0x33acc9(0xfa)](_0x2e11bb,{'projectName':_0x552a27,'revision':_0xd643e0,'skipValidation':_0x4fef8c}),{'verbose':_0x2507c0['verbose']}),_0x4d6421=_0x490713['data'];return console[_0x33acc9(0xb4)](_0x33acc9(0x10e)+_0x4d6421[_0x33acc9(0xc5)]),console[_0x33acc9(0xb4)](_0x33acc9(0x74)+_0x4d6421[_0x33acc9(0xcc)]),console['error']('\x20\x20Revision:\x20'+_0x4d6421[_0x33acc9(0x103)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x27668e(0xf9)]=a42_0x27668e(0x7c);[a42_0x27668e(0x76)]=a42_0x27668e(0xbf);async[a42_0x27668e(0xc9)](_0x453613){const _0x2ae112=a42_0x27668e,{options:_0x57d4e0,args:_0x1d24d5,tdx:_0x2cf6ef}=_0x453613,_0x2f9b36=_0x1d24d5[0x0];if(!_0x2f9b36)return console[_0x2ae112(0xb4)](_0x2ae112(0xf0)),console[_0x2ae112(0xb4)](_0x2ae112(0x119)),0x1;_0x57d4e0[_0x2ae112(0xe2)]&&console[_0x2ae112(0xb4)](_0x2ae112(0x79)+_0x2f9b36);if(!_0x57d4e0[_0x2ae112(0xf8)]){const _0x5522a8=await confirm(_0x2ae112(0xa1)+_0x2f9b36+_0x2ae112(0xf3));if(!_0x5522a8)return console[_0x2ae112(0xb4)](_0x2ae112(0xcb)),0x0;}const _0x3d7b50=await withSpinner(_0x2ae112(0x78)+_0x2f9b36+_0x2ae112(0x90),()=>_0x2cf6ef['workflow']['delete'](_0x2f9b36),{'verbose':_0x57d4e0[_0x2ae112(0xe2)]}),_0xb958e=_0x3d7b50['data'];return console['error'](_0x2ae112(0x9f)+_0xb958e['projectName']),console['error'](_0x2ae112(0x74)+_0xb958e[_0x2ae112(0xcc)]),0x0;}}
1
+ const a42_0x3a9913=a42_0x298e;(function(_0x96a69f,_0x573406){const _0x35ff64=a42_0x298e,_0x190fa7=_0x96a69f();while(!![]){try{const _0x131c3a=-parseInt(_0x35ff64(0xfd))/0x1*(-parseInt(_0x35ff64(0x9c))/0x2)+parseInt(_0x35ff64(0xe4))/0x3*(parseInt(_0x35ff64(0xee))/0x4)+-parseInt(_0x35ff64(0xbd))/0x5*(parseInt(_0x35ff64(0x8a))/0x6)+-parseInt(_0x35ff64(0x92))/0x7*(-parseInt(_0x35ff64(0x103))/0x8)+-parseInt(_0x35ff64(0xfa))/0x9+-parseInt(_0x35ff64(0xd9))/0xa*(parseInt(_0x35ff64(0xf4))/0xb)+parseInt(_0x35ff64(0xda))/0xc;if(_0x131c3a===_0x573406)break;else _0x190fa7['push'](_0x190fa7['shift']());}catch(_0x3f5144){_0x190fa7['push'](_0x190fa7['shift']());}}}(a42_0x120b,0x63189));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../utils/command-output.js';function a42_0x298e(_0x263914,_0x4e9af8){_0x263914=_0x263914-0x78;const _0x120b38=a42_0x120b();let _0x298eac=_0x120b38[_0x263914];return _0x298eac;}import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';import{formatBytes}from'../utils/formatters.js';function a42_0x120b(){const _0x11d711=['\x20task','List\x20workflow\x20attempts','name','\x20\x20New\x20attempt\x20ID:\x20','5869456QXhyAw','Project:\x20','workflow:logs','No\x20log\x20files\x20found\x20for\x20this\x20attempt','Reason:\x20','Status:\x20','Attempt\x20ID:\x20','Show\x20logs\x20for\x20a\x20workflow\x20attempt','execute','workflow:projects','Show\x20tasks\x20for\x20an\x20attempt','includeRetried','Listing\x20workflow\x20sessions...','retrySession','From\x20task:\x20','List\x20workflow\x20execution\x20sessions','select','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','attemptId','\x20\x20Project\x20ID:\x20','parse','index','\x20is\x20not\x20a\x20directory','log','Resume\x20from:\x20','Pattern:\x20','getTime','filesExtracted','Workflow:\x20','split','Killing\x20attempt...','description','Downloading\x20project\x20','task','delete','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','✔\x20Pushed\x20','map','Error:\x20','fromTask','Include\x20retried:\x20yes','success','Params:\x20','verbose','logFiles','6thueMD','utf-8','cause','retryAttemptName','finishedAt','Retry\x20a\x20session\x20or\x20attempt','...','\x20\x20Attempt\x20ID:\x20','7rlxDMY','projectName','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Listing\x20workflow\x20projects...','\x20attempt','workflow:workflows','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Getting\x20attempt\x20details...','\x20\x20Session\x20ID:\x20','Project\x20directory:\x20','174wcLSzF','limit','isArray','Listing\x20workflow\x20attempts...','\x20\x20Location:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','data','✔\x20Found\x20','✔\x20Workflow\x20run\x20started','createdAt','message','Error:\x20Invalid\x20parameter\x20format:\x20','running','Usage:\x20workflow\x20run\x20<project.workflow>\x20[options]','\x20project','retryAttempt','workflows','params','Select\x20a\x20task\x20to\x20view\x20logs:','No\x20log\x20content\x20found','Retrying\x20session...','workflow:delete','fileSize','stat','✔\x20Retry\x20started','projectId','startsWith','\x20session','Filter:\x20project=','error','Target:\x20','status','projects','2773970gMZyur','workflow:attempt','Error:\x20Workflow\x20identifier\x20is\x20required','skipValidation','Pushing\x20workflow\x20project...','List\x20workflows','Revision:\x20','workflow:retry','length','Starting\x20workflow\x20run...','readFile','\x20\x20Revision:\x20','workflow:tasks','yes','Error:\x20Invalid\x20JSON\x20in\x20--params','reason','Parameters:\x20','json','Cancelled','sessionTime','workflow:kill','force','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20\x20Cause:\x20','✔\x20Downloaded\x20','attempt','workflow:download','Project\x20name:\x20','210SmQAyU','7175700yoUWwS','kill','session','Kill\x20a\x20running\x20attempt','fs/promises','includeSubtasks','resumeFrom','param','workflow:sessions','Expected\x20format:\x20--param\x20key=value','22629ANaGzn','Task\x20name:\x20','Error:\x20Attempt\x20ID\x20is\x20required','substring','push','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20\x20Project:\x20','sessionId','Error:\x20Project\x20name\x20is\x20required','Show\x20specific\x20attempt\x20details','328UxUEuQ','round','revision','\x20\x20Files\x20extracted:\x20','format','workflow:push','403117KDjjWY','logs','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','Deleting\x20project\x20','project','keys','5265396mIZGLZ','taskName','Filter:\x20','4197wLuuTH','workflow'];a42_0x120b=function(){return _0x11d711;};return a42_0x120b();}import a42_0x4e3679 from'prompts';export class WorkflowProjectsCommand extends BaseCommand{['name']=a42_0x3a9913(0x10c);[a42_0x3a9913(0x7c)]='List\x20all\x20workflow\x20projects';async['execute'](_0x177a53){const _0x57b366=a42_0x3a9913,{options:_0x54d594,args:_0xd30c51,tdx:_0x34d257}=_0x177a53,_0x4964c2=_0xd30c51[0x0];try{_0x54d594['verbose']&&_0x4964c2&&console[_0x57b366(0xb9)](_0x57b366(0x11c)+_0x4964c2);const _0x1d7be2=await withSpinner(_0x57b366(0x95),()=>_0x34d257[_0x57b366(0xfe)][_0x57b366(0xbc)](_0x4964c2,{'limit':_0x54d594['limit']}),{'verbose':_0x54d594[_0x57b366(0x88)]}),_0x4ecd54=_0x1d7be2[_0x57b366(0xa2)];return console['error'](_0x57b366(0xa3)+_0x4ecd54['length']+_0x57b366(0xaa)+(_0x4ecd54['length']!==0x1?'s':'')),await handleSDKOutput(_0x4ecd54,_0x54d594),0x0;}catch(_0xea0466){if(_0xea0466 instanceof SDKError)return console[_0x57b366(0xb9)]('Error:\x20'+_0xea0466[_0x57b366(0xa6)]),_0xea0466[_0x57b366(0x8c)]&&console[_0x57b366(0xb9)](_0x57b366(0xd4)+_0xea0466[_0x57b366(0x8c)]),0x1;throw _0xea0466;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0x97);[a42_0x3a9913(0x7c)]=a42_0x3a9913(0xc2);async['execute'](_0xff0c0d){const _0x5ead50=a42_0x3a9913,{options:_0x359038,args:_0x2b3607,tdx:_0x56abb0}=_0xff0c0d,_0x3d36a6=_0x2b3607[0x0];try{_0x359038['verbose']&&_0x3d36a6&&console[_0x5ead50(0xb9)]('Project\x20filter:\x20'+_0x3d36a6);const _0x5ad91e=await withSpinner('Listing\x20workflows...',()=>_0x56abb0['workflow'][_0x5ead50(0xac)](_0x3d36a6,{'limit':_0x359038[_0x5ead50(0x9d)]}),{'verbose':_0x359038[_0x5ead50(0x88)]}),_0x4841e6=_0x5ad91e[_0x5ead50(0xa2)];return console['error'](_0x5ead50(0xa3)+_0x4841e6[_0x5ead50(0xc5)]+'\x20workflow'+(_0x4841e6[_0x5ead50(0xc5)]!==0x1?'s':'')),await handleSDKOutput(_0x4841e6,_0x359038),0x0;}catch(_0x117951){if(_0x117951 instanceof SDKError)return console[_0x5ead50(0xb9)](_0x5ead50(0x83)+_0x117951[_0x5ead50(0xa6)]),_0x117951[_0x5ead50(0x8c)]&&console[_0x5ead50(0xb9)](_0x5ead50(0xd4)+_0x117951[_0x5ead50(0x8c)]),0x1;throw _0x117951;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a42_0x3a9913(0xe2);[a42_0x3a9913(0x7c)]=a42_0x3a9913(0x112);async[a42_0x3a9913(0x10b)](_0x269d21){const _0x529cf4=a42_0x3a9913,{options:_0x33b805,args:_0x496ccd,tdx:_0x477591}=_0x269d21;let _0x153fdb,_0x5437aa;if(_0x496ccd[0x0]){const _0x40e581=_0x496ccd[0x0][_0x529cf4(0x7a)]('.');if(_0x40e581[_0x529cf4(0xc5)]===0x1)_0x153fdb=_0x40e581[0x0];else{if(_0x40e581['length']===0x2)[_0x153fdb,_0x5437aa]=_0x40e581;else return console[_0x529cf4(0xb9)](_0x529cf4(0x98)),0x1;}}try{if(_0x33b805[_0x529cf4(0x88)]){if(_0x153fdb&&_0x5437aa)console[_0x529cf4(0xb9)](_0x529cf4(0xfc)+_0x153fdb+'.'+_0x5437aa);else _0x153fdb&&console['error'](_0x529cf4(0xb8)+_0x153fdb);const _0x9bee9b=_0x33b805['status'];_0x9bee9b&&console['error'](_0x529cf4(0x108)+_0x9bee9b);}const _0x18a11c=await withSpinner(_0x529cf4(0x10f),()=>_0x477591[_0x529cf4(0xfe)]['sessions']({'projectName':_0x153fdb,'workflowName':_0x5437aa,'status':_0x33b805[_0x529cf4(0xbb)],'fromTime':_0x33b805['from'],'toTime':_0x33b805['to'],'limit':_0x33b805[_0x529cf4(0x9d)]}),{'verbose':_0x33b805[_0x529cf4(0x88)]}),_0x47370d=_0x18a11c[_0x529cf4(0xa2)];return console['error']('✔\x20Found\x20'+_0x47370d['length']+_0x529cf4(0xb7)+(_0x47370d['length']!==0x1?'s':'')),await handleSDKOutput(_0x47370d,_0x33b805),0x0;}catch(_0x46d206){if(_0x46d206 instanceof SDKError)return console[_0x529cf4(0xb9)](_0x529cf4(0x83)+_0x46d206[_0x529cf4(0xa6)]),_0x46d206[_0x529cf4(0x8c)]&&console[_0x529cf4(0xb9)](_0x529cf4(0xd4)+_0x46d206[_0x529cf4(0x8c)]),0x1;throw _0x46d206;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a42_0x3a9913(0x101)]='workflow:attempts';[a42_0x3a9913(0x7c)]=a42_0x3a9913(0x100);async[a42_0x3a9913(0x10b)](_0x22070f){const _0x546a11=a42_0x3a9913,{options:_0x5081bf,args:_0x64fb1b,tdx:_0x519c6d}=_0x22070f;let _0x3c37c8,_0x4b03ce;if(_0x64fb1b[0x0]){const _0x4677c8=_0x64fb1b[0x0][_0x546a11(0x7a)]('.');if(_0x4677c8['length']===0x1)_0x3c37c8=_0x4677c8[0x0];else{if(_0x4677c8[_0x546a11(0xc5)]===0x2)[_0x3c37c8,_0x4b03ce]=_0x4677c8;else return console[_0x546a11(0xb9)](_0x546a11(0x98)),0x1;}}try{const _0x12bce1=_0x5081bf[_0x546a11(0x10e)];if(_0x5081bf[_0x546a11(0x88)]){if(_0x3c37c8&&_0x4b03ce)console[_0x546a11(0xb9)](_0x546a11(0xfc)+_0x3c37c8+'.'+_0x4b03ce);else _0x3c37c8&&console['error'](_0x546a11(0xb8)+_0x3c37c8);_0x12bce1&&console[_0x546a11(0xb9)](_0x546a11(0x85));}const _0x3d0468=await withSpinner(_0x546a11(0x9f),()=>_0x519c6d[_0x546a11(0xfe)]['attempts']({'projectName':_0x3c37c8,'workflowName':_0x4b03ce,'includeRetried':_0x12bce1,'limit':_0x5081bf['limit']}),{'verbose':_0x5081bf[_0x546a11(0x88)]}),_0x1d693f=_0x3d0468[_0x546a11(0xa2)];return console[_0x546a11(0xb9)](_0x546a11(0xa3)+_0x1d693f[_0x546a11(0xc5)]+_0x546a11(0x96)+(_0x1d693f['length']!==0x1?'s':'')),await handleSDKOutput(_0x1d693f,_0x5081bf),0x0;}catch(_0x20a5a3){if(_0x20a5a3 instanceof SDKError)return console[_0x546a11(0xb9)]('Error:\x20'+_0x20a5a3[_0x546a11(0xa6)]),_0x20a5a3['cause']&&console[_0x546a11(0xb9)]('\x20\x20Cause:\x20'+_0x20a5a3[_0x546a11(0x8c)]),0x1;throw _0x20a5a3;}}}export class WorkflowAttemptCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xbe);[a42_0x3a9913(0x7c)]=a42_0x3a9913(0xed);async[a42_0x3a9913(0x10b)](_0xdd91b){const _0x1d2b80=a42_0x3a9913,{options:_0x3cd28a,args:_0x520264,tdx:_0x450bc4}=_0xdd91b,_0x5c71ec=_0x520264[0x0];if(!_0x5c71ec)return console['error'](_0x1d2b80(0xe6)),0x1;try{_0x3cd28a[_0x1d2b80(0x88)]&&console[_0x1d2b80(0xb9)](_0x1d2b80(0x109)+_0x5c71ec);const _0x470d3e=await withSpinner(_0x1d2b80(0x99),()=>_0x450bc4[_0x1d2b80(0xfe)][_0x1d2b80(0xd6)](_0x5c71ec),{'verbose':_0x3cd28a[_0x1d2b80(0x88)]}),_0x9b5783=_0x470d3e[_0x1d2b80(0xa2)];let _0x25a7e6;!_0x9b5783['done']?_0x25a7e6=_0x9b5783['cancelRequested']?'canceling':_0x1d2b80(0xa8):_0x25a7e6=_0x9b5783[_0x1d2b80(0x86)]?_0x1d2b80(0x86):_0x1d2b80(0xb9);let _0x3c6bd0;if(_0x9b5783[_0x1d2b80(0xa5)]&&_0x9b5783[_0x1d2b80(0x8e)]){const _0x48d81b=new Date(_0x9b5783[_0x1d2b80(0xa5)])[_0x1d2b80(0x11d)](),_0x450fc3=new Date(_0x9b5783[_0x1d2b80(0x8e)])[_0x1d2b80(0x11d)]();_0x3c6bd0=Math[_0x1d2b80(0xef)]((_0x450fc3-_0x48d81b)/0x3e8);}const _0x562d47={'attempt_id':_0x9b5783['id'],'status':_0x25a7e6,..._0x9b5783[_0x1d2b80(0x118)]!==undefined&&{'index':_0x9b5783['index']},..._0x9b5783[_0x1d2b80(0xf8)]&&{'project':_0x9b5783[_0x1d2b80(0xf8)][_0x1d2b80(0x101)]},..._0x9b5783[_0x1d2b80(0xfe)]&&{'workflow':_0x9b5783[_0x1d2b80(0xfe)][_0x1d2b80(0x101)]},..._0x9b5783[_0x1d2b80(0xeb)]&&{'session_id':_0x9b5783['sessionId']},..._0x9b5783[_0x1d2b80(0xd0)]&&{'session_time':_0x9b5783[_0x1d2b80(0xd0)]},..._0x9b5783[_0x1d2b80(0x8d)]&&{'retry_attempt':_0x9b5783[_0x1d2b80(0x8d)]},..._0x3c6bd0!==undefined&&{'duration_sec':_0x3c6bd0},..._0x9b5783['createdAt']&&{'created_at':_0x9b5783['createdAt']},..._0x9b5783[_0x1d2b80(0x8e)]&&{'finished_at':_0x9b5783[_0x1d2b80(0x8e)]},...Object[_0x1d2b80(0xf9)](_0x9b5783[_0x1d2b80(0xad)])[_0x1d2b80(0xc5)]>0x0&&{'params':_0x9b5783[_0x1d2b80(0xad)]}};return await handleSingleObjectOutput(_0x562d47,_0x3cd28a),0x0;}catch(_0x501191){if(_0x501191 instanceof SDKError)return console[_0x1d2b80(0xb9)]('Error:\x20'+_0x501191[_0x1d2b80(0xa6)]),_0x501191[_0x1d2b80(0x8c)]&&console[_0x1d2b80(0xb9)](_0x1d2b80(0xd4)+_0x501191[_0x1d2b80(0x8c)]),0x1;throw _0x501191;}}}export class WorkflowTasksCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xc9);['description']=a42_0x3a9913(0x10d);async[a42_0x3a9913(0x10b)](_0x22265d){const _0xd7a8dc=a42_0x3a9913,{options:_0x29d7fc,args:_0x1394c2,tdx:_0x346ed2}=_0x22265d,_0x97b263=_0x1394c2[0x0];if(!_0x97b263)return console[_0xd7a8dc(0xb9)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x208198=_0x29d7fc[_0xd7a8dc(0xdf)];_0x29d7fc[_0xd7a8dc(0x88)]&&(console[_0xd7a8dc(0xb9)]('Attempt\x20ID:\x20'+_0x97b263),_0x208198&&console[_0xd7a8dc(0xb9)]('Including\x20subtasks:\x20yes'));const _0x36874=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x346ed2[_0xd7a8dc(0xfe)]['tasks'](_0x97b263,_0x208198||![]),{'verbose':_0x29d7fc['verbose']}),_0x41694b=_0x36874[_0xd7a8dc(0xa2)];return console[_0xd7a8dc(0xb9)]('✔\x20Found\x20'+_0x41694b[_0xd7a8dc(0xc5)]+_0xd7a8dc(0xff)+(_0x41694b[_0xd7a8dc(0xc5)]!==0x1?'s':'')),await handleSDKOutput(_0x41694b,_0x29d7fc),0x0;}catch(_0x324029){if(_0x324029 instanceof SDKError)return console[_0xd7a8dc(0xb9)]('Error:\x20'+_0x324029[_0xd7a8dc(0xa6)]),_0x324029['cause']&&console[_0xd7a8dc(0xb9)](_0xd7a8dc(0xd4)+_0x324029[_0xd7a8dc(0x8c)]),0x1;throw _0x324029;}}}export class WorkflowLogsCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0x105);['description']=a42_0x3a9913(0x10a);async[a42_0x3a9913(0x10b)](_0x5e4f26){const _0x5eb243=a42_0x3a9913,{options:_0x225aa7,args:_0x2811ed,tdx:_0x108912}=_0x5e4f26,_0x59fed6=_0x2811ed[0x0];let _0x956e74=_0x2811ed[0x1];if(!_0x59fed6)return console[_0x5eb243(0xb9)](_0x5eb243(0xe6)),0x1;try{_0x225aa7[_0x5eb243(0x88)]&&(console[_0x5eb243(0xb9)](_0x5eb243(0x109)+_0x59fed6),_0x956e74&&console['error'](_0x5eb243(0xe5)+_0x956e74));const _0x4bb022=await withSpinner('Fetching\x20log\x20files...',()=>_0x108912[_0x5eb243(0xfe)][_0x5eb243(0x89)](_0x59fed6,_0x956e74),{'verbose':_0x225aa7[_0x5eb243(0x88)]}),_0x1add3c=_0x4bb022['data'];if(_0x1add3c['length']===0x0)return console[_0x5eb243(0xb9)](_0x5eb243(0x106)),0x0;if(!_0x956e74&&(_0x225aa7[_0x5eb243(0xce)]||_0x225aa7[_0x5eb243(0xf2)]))return await handleSDKOutput(_0x1add3c,_0x225aa7),0x0;if(!_0x956e74){const _0xbc9863=_0x1add3c[_0x5eb243(0x82)](_0x131232=>({'title':_0x131232[_0x5eb243(0xfb)]+'\x20('+formatBytes(_0x131232[_0x5eb243(0xb2)])+')','value':_0x131232[_0x5eb243(0xfb)]})),_0x1f29e3=await a42_0x4e3679({'type':_0x5eb243(0x113),'name':'task','message':_0x5eb243(0xae),'choices':_0xbc9863});if(!_0x1f29e3[_0x5eb243(0x7e)])return console[_0x5eb243(0xb9)](_0x5eb243(0xcf)),0x0;_0x956e74=_0x1f29e3[_0x5eb243(0x7e)];}const _0x5345bd=await withSpinner('Downloading\x20logs...',()=>_0x108912['workflow'][_0x5eb243(0xf5)](_0x59fed6,_0x956e74),{'verbose':_0x225aa7[_0x5eb243(0x88)]}),_0x397629=_0x5345bd[_0x5eb243(0xa2)];return _0x397629?console[_0x5eb243(0x11a)](_0x397629):console['error'](_0x5eb243(0xaf)),0x0;}catch(_0x5861c9){if(_0x5861c9 instanceof SDKError)return console[_0x5eb243(0xb9)](_0x5eb243(0x83)+_0x5861c9[_0x5eb243(0xa6)]),_0x5861c9[_0x5eb243(0x8c)]&&console[_0x5eb243(0xb9)](_0x5eb243(0xd4)+_0x5861c9['cause']),0x1;throw _0x5861c9;}}}export class WorkflowKillCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xd1);['description']=a42_0x3a9913(0xdd);async[a42_0x3a9913(0x10b)](_0x5d7bf7){const _0x22923a=a42_0x3a9913,{options:_0x26c811,args:_0x5d0b88,tdx:_0x4854fa}=_0x5d7bf7,_0x316405=_0x5d0b88[0x0];if(!_0x316405)return console['error'](_0x22923a(0xe6)),0x1;try{const _0x3c9684=_0x26c811[_0x22923a(0xcc)];_0x26c811[_0x22923a(0x88)]&&(console[_0x22923a(0xb9)]('Attempt\x20ID:\x20'+_0x316405),_0x3c9684&&console['error'](_0x22923a(0x107)+_0x3c9684));if(!_0x26c811['yes']){const _0x13a5c2=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x316405+'?');if(!_0x13a5c2)return console[_0x22923a(0xb9)](_0x22923a(0xcf)),0x0;}const _0x55479d=await withSpinner(_0x22923a(0x7b),()=>_0x4854fa[_0x22923a(0xfe)][_0x22923a(0xdb)](_0x316405,_0x3c9684),{'verbose':_0x26c811[_0x22923a(0x88)]}),_0x9cbaea=_0x55479d[_0x22923a(0xa2)];return console[_0x22923a(0xb9)]('✔\x20'+_0x9cbaea),0x0;}catch(_0x81b319){if(_0x81b319 instanceof SDKError)return console[_0x22923a(0xb9)]('Error:\x20'+_0x81b319[_0x22923a(0xa6)]),_0x81b319['cause']&&console[_0x22923a(0xb9)](_0x22923a(0xd4)+_0x81b319[_0x22923a(0x8c)]),0x1;throw _0x81b319;}}}export class WorkflowRetryCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xc4);['description']=a42_0x3a9913(0x8f);async['execute'](_0x78232e){const _0xa1baf4=a42_0x3a9913,{options:_0x395082,args:_0x496565,tdx:_0x134077}=_0x78232e,_0x28d573=_0x496565[0x0];if(!_0x28d573)return console[_0xa1baf4(0xb9)](_0xa1baf4(0xd3)),console[_0xa1baf4(0xb9)](_0xa1baf4(0xa1)),0x1;let _0x1dff5c=![],_0x3a9698=_0x28d573;if(_0x28d573[_0xa1baf4(0xb6)]('session:'))_0x1dff5c=!![],_0x3a9698=_0x28d573['substring'](0x8);else{if(_0x28d573['startsWith']('attempt:'))_0x1dff5c=![],_0x3a9698=_0x28d573[_0xa1baf4(0xe7)](0x8);else return console[_0xa1baf4(0xb9)](_0xa1baf4(0xe9)),console[_0xa1baf4(0xb9)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}try{const _0x16e804=_0x395082[_0xa1baf4(0x84)],_0x1d1259=_0x395082[_0xa1baf4(0xe0)],_0x51b0bf=_0x395082[_0xa1baf4(0xad)],_0x1a9d1d=_0x395082[_0xa1baf4(0xd2)];_0x395082[_0xa1baf4(0x88)]&&(console[_0xa1baf4(0xb9)](_0xa1baf4(0xba)+(_0x1dff5c?_0xa1baf4(0xdc):_0xa1baf4(0xd6))+'\x20'+_0x3a9698),_0x16e804&&console['error'](_0xa1baf4(0x111)+_0x16e804),_0x1d1259&&console[_0xa1baf4(0xb9)](_0xa1baf4(0x11b)+_0x1d1259),_0x51b0bf&&console[_0xa1baf4(0xb9)](_0xa1baf4(0x87)+_0x51b0bf),_0x1a9d1d&&console['error']('Force:\x20yes'));let _0x34b2fc;if(_0x51b0bf)try{if(_0x51b0bf[_0xa1baf4(0xb6)]('@')){const _0x2c3124=await import(_0xa1baf4(0xde)),_0x25cf8b=_0x51b0bf[_0xa1baf4(0xe7)](0x1),_0x45e265=await _0x2c3124[_0xa1baf4(0xc7)](_0x25cf8b,_0xa1baf4(0x8b));_0x34b2fc=JSON[_0xa1baf4(0x117)](_0x45e265);}else _0x34b2fc=JSON['parse'](_0x51b0bf);}catch{return console[_0xa1baf4(0xb9)](_0xa1baf4(0xcb)),0x1;}if(!_0x395082[_0xa1baf4(0xca)]){const _0x4f2117=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x1dff5c?'session':_0xa1baf4(0xd6))+'\x20'+_0x3a9698+'?');if(!_0x4f2117)return console[_0xa1baf4(0xb9)](_0xa1baf4(0xcf)),0x0;}let _0x34439e;_0x1dff5c?_0x34439e=await withSpinner(_0xa1baf4(0xb0),()=>_0x134077[_0xa1baf4(0xfe)][_0xa1baf4(0x110)](_0x3a9698,{'fromTask':_0x16e804,'retryParams':_0x34b2fc}),{'verbose':_0x395082[_0xa1baf4(0x88)]}):_0x34439e=await withSpinner('Retrying\x20attempt...',()=>_0x134077[_0xa1baf4(0xfe)][_0xa1baf4(0xab)](_0x3a9698,{'resumeFrom':_0x1d1259,'retryParams':_0x34b2fc,'force':_0x1a9d1d}),{'verbose':_0x395082[_0xa1baf4(0x88)]});const _0x8e8784=_0x34439e[_0xa1baf4(0xa2)];return console[_0xa1baf4(0xb9)](_0xa1baf4(0xb4)),console[_0xa1baf4(0xb9)](_0xa1baf4(0x102)+_0x8e8784[_0xa1baf4(0x115)]),console['error']('\x20\x20Session\x20ID:\x20'+_0x8e8784[_0xa1baf4(0xeb)]),0x0;}catch(_0x8432d5){if(_0x8432d5 instanceof SDKError)return console[_0xa1baf4(0xb9)](_0xa1baf4(0x83)+_0x8432d5['message']),_0x8432d5['cause']&&console[_0xa1baf4(0xb9)]('\x20\x20Cause:\x20'+_0x8432d5['cause']),0x1;throw _0x8432d5;}}}export class WorkflowRunCommand extends BaseCommand{[a42_0x3a9913(0x101)]='workflow:run';['description']='Start\x20a\x20workflow\x20run';async[a42_0x3a9913(0x10b)](_0x470a7a){const _0x243567=a42_0x3a9913,{options:_0x340e86,args:_0x5d371e,tdx:_0x58c0cb}=_0x470a7a,_0x36f505=_0x5d371e[0x0];if(!_0x36f505)return console[_0x243567(0xb9)](_0x243567(0xbf)),console[_0x243567(0xb9)](_0x243567(0xa9)),0x1;const _0x1f5eef=_0x340e86[_0x243567(0xe1)],_0x372214=_0x340e86['sessionTime'],_0x499af2={};if(_0x1f5eef&&Array[_0x243567(0x9e)](_0x1f5eef))for(const _0x4c0e3d of _0x1f5eef){const _0x5e9e16=_0x4c0e3d['indexOf']('=');if(_0x5e9e16===-0x1)return console['error'](_0x243567(0xa7)+_0x4c0e3d),console[_0x243567(0xb9)](_0x243567(0xe3)),0x1;const _0x2a85f4=_0x4c0e3d['substring'](0x0,_0x5e9e16),_0x4faf82=_0x4c0e3d[_0x243567(0xe7)](_0x5e9e16+0x1);try{_0x499af2[_0x2a85f4]=JSON[_0x243567(0x117)](_0x4faf82);}catch{_0x499af2[_0x2a85f4]=_0x4faf82;}}_0x340e86[_0x243567(0x88)]&&(console[_0x243567(0xb9)](_0x243567(0x79)+_0x36f505),Object['keys'](_0x499af2)[_0x243567(0xc5)]>0x0&&console[_0x243567(0xb9)](_0x243567(0xcd)+JSON['stringify'](_0x499af2)),_0x372214&&console[_0x243567(0xb9)]('Session\x20time:\x20'+_0x372214));const _0x4f6f60=await withSpinner(_0x243567(0xc6),()=>_0x58c0cb[_0x243567(0xfe)]['run'](_0x36f505,_0x499af2,{'sessionTime':_0x372214}),{'verbose':_0x340e86[_0x243567(0x88)]}),_0x443b1e=_0x4f6f60[_0x243567(0xa2)];return console['error'](_0x243567(0xa4)),console[_0x243567(0xb9)](_0x243567(0x91)+_0x443b1e['id']),console[_0x243567(0xb9)](_0x243567(0x9a)+_0x443b1e[_0x243567(0xeb)]),console['error'](_0x243567(0xea)+_0x443b1e[_0x243567(0xf8)]?.[_0x243567(0x101)]),console['error']('\x20\x20Workflow:\x20'+_0x443b1e['workflow']?.[_0x243567(0x101)]),0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xd7);[a42_0x3a9913(0x7c)]=a42_0x3a9913(0x114);async[a42_0x3a9913(0x10b)](_0x4ecb81){const _0x40876d=a42_0x3a9913,{options:_0x4e2d81,args:_0x49acf7,tdx:_0x1cbb43}=_0x4ecb81,_0x499871=_0x49acf7[0x0],_0x34b733=_0x49acf7[0x1]||'.';if(!_0x499871)return console[_0x40876d(0xb9)](_0x40876d(0xec)),console[_0x40876d(0xb9)](_0x40876d(0x94)),0x1;const _0x42a20d=_0x4e2d81[_0x40876d(0xf0)];_0x4e2d81[_0x40876d(0x88)]&&(console['error']('Project:\x20'+_0x499871),console['error']('Output\x20directory:\x20'+_0x34b733),_0x42a20d&&console[_0x40876d(0xb9)](_0x40876d(0xc3)+_0x42a20d));const _0x431252=await withSpinner(_0x40876d(0x7d)+_0x499871+_0x40876d(0x90),()=>_0x1cbb43[_0x40876d(0xfe)]['download'](_0x499871,_0x34b733,{'revision':_0x42a20d}),{'verbose':_0x4e2d81[_0x40876d(0x88)]}),_0x1805ec=_0x431252[_0x40876d(0xa2)];return console[_0x40876d(0xb9)](_0x40876d(0xd5)+_0x1805ec[_0x40876d(0x93)]),console[_0x40876d(0xb9)](_0x40876d(0xc8)+_0x1805ec[_0x40876d(0xf0)]),console[_0x40876d(0xb9)](_0x40876d(0xf1)+_0x1805ec[_0x40876d(0x78)]),console[_0x40876d(0xb9)](_0x40876d(0xa0)+_0x34b733+'/'+_0x1805ec[_0x40876d(0x93)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xf3);[a42_0x3a9913(0x7c)]='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async['execute'](_0x588ee6){const _0x3031b4=a42_0x3a9913,{options:_0x41d739,args:_0x43a82d,tdx:_0x4ac80c}=_0x588ee6;let _0x448cf9='.',_0xc43268=_0x41d739[_0x3031b4(0x101)];if(_0x43a82d[0x0]){const {promises:_0x4e876b}=await import('fs');try{const _0xaa66f7=await _0x4e876b[_0x3031b4(0xb3)](_0x43a82d[0x0]);if(_0xaa66f7['isDirectory']())_0x448cf9=_0x43a82d[0x0];else return console['error'](_0x3031b4(0x83)+_0x43a82d[0x0]+_0x3031b4(0x119)),0x1;}catch{_0xc43268=_0x43a82d[0x0],_0x448cf9='.';}}const _0x17b2cd=_0x41d739['revision'],_0x58a371=_0x41d739[_0x3031b4(0xc0)];_0x41d739['verbose']&&(console['error'](_0x3031b4(0x9b)+_0x448cf9),_0xc43268&&console['error'](_0x3031b4(0xd8)+_0xc43268),_0x17b2cd&&console[_0x3031b4(0xb9)](_0x3031b4(0xc3)+_0x17b2cd),_0x58a371&&console[_0x3031b4(0xb9)]('Validation:\x20skipped'));const _0x364f31=await withSpinner(_0x3031b4(0xc1),()=>_0x4ac80c[_0x3031b4(0xfe)][_0x3031b4(0xe8)](_0x448cf9,{'projectName':_0xc43268,'revision':_0x17b2cd,'skipValidation':_0x58a371}),{'verbose':_0x41d739[_0x3031b4(0x88)]}),_0x5d97cc=_0x364f31['data'];return console[_0x3031b4(0xb9)](_0x3031b4(0x81)+_0x5d97cc[_0x3031b4(0x93)]),console[_0x3031b4(0xb9)](_0x3031b4(0x116)+_0x5d97cc['projectId']),console[_0x3031b4(0xb9)]('\x20\x20Revision:\x20'+_0x5d97cc['revision']),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a42_0x3a9913(0x101)]=a42_0x3a9913(0xb1);[a42_0x3a9913(0x7c)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a42_0x3a9913(0x10b)](_0x3e902e){const _0x3f2f89=a42_0x3a9913,{options:_0x499474,args:_0x4d261f,tdx:_0x5e7642}=_0x3e902e,_0x5d5e7b=_0x4d261f[0x0];if(!_0x5d5e7b)return console[_0x3f2f89(0xb9)](_0x3f2f89(0xf6)),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x499474[_0x3f2f89(0x88)]&&console['error'](_0x3f2f89(0x104)+_0x5d5e7b);if(!_0x499474['yes']){const _0x452621=await confirm(_0x3f2f89(0x80)+_0x5d5e7b+'\x22?\x20This\x20cannot\x20be\x20undone.');if(!_0x452621)return console[_0x3f2f89(0xb9)](_0x3f2f89(0xcf)),0x0;}const _0x512e5a=await withSpinner(_0x3f2f89(0xf7)+_0x5d5e7b+_0x3f2f89(0x90),()=>_0x5e7642[_0x3f2f89(0xfe)][_0x3f2f89(0x7f)](_0x5d5e7b),{'verbose':_0x499474[_0x3f2f89(0x88)]}),_0x278985=_0x512e5a[_0x3f2f89(0xa2)];return console[_0x3f2f89(0xb9)]('✔\x20Deleted\x20project\x20'+_0x278985[_0x3f2f89(0x93)]),console['error'](_0x3f2f89(0x116)+_0x278985[_0x3f2f89(0xb5)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x44565a,_0x623003){const _0x7a0ec4=a43_0x5536,_0x352d26=_0x44565a();while(!![]){try{const _0x130e5f=-parseInt(_0x7a0ec4(0x17d))/0x1+-parseInt(_0x7a0ec4(0x18d))/0x2*(-parseInt(_0x7a0ec4(0x18c))/0x3)+parseInt(_0x7a0ec4(0x185))/0x4*(-parseInt(_0x7a0ec4(0x181))/0x5)+parseInt(_0x7a0ec4(0x188))/0x6+-parseInt(_0x7a0ec4(0x189))/0x7+-parseInt(_0x7a0ec4(0x18f))/0x8*(parseInt(_0x7a0ec4(0x17e))/0x9)+parseInt(_0x7a0ec4(0x180))/0xa;if(_0x130e5f===_0x623003)break;else _0x352d26['push'](_0x352d26['shift']());}catch(_0xa1f957){_0x352d26['push'](_0x352d26['shift']());}}}(a43_0x153e,0x6ed51));function a43_0x5536(_0x2165ed,_0xaf0ece){_0x2165ed=_0x2165ed-0x17d;const _0x153e40=a43_0x153e();let _0x553669=_0x153e40[_0x2165ed];return _0x553669;}import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0xf0dd11=a43_0x5536;try{const _0x3ef4e7=fileURLToPath(import.meta.url),_0x5aa8c7=dirname(_0x3ef4e7),_0x424e5e=join(_0x5aa8c7,_0xf0dd11(0x18a)),_0x5132db=JSON[_0xf0dd11(0x187)](readFileSync(_0x424e5e,_0xf0dd11(0x182)));return _0x5132db['version'];}catch{return _0xf0dd11(0x184);}}export function getUserAgent(){const _0x28dc7b=a43_0x5536,_0x207733=getVersion(),_0x56d0a5=platform(),_0x554854=process['version'][_0x28dc7b(0x18e)]('v','');return'tdx/'+_0x207733+'\x20('+_0x56d0a5+';\x20node/'+_0x554854+')';}function a43_0x153e(){const _0x4abf04=['479626TTAruS','34659zAHdeO','entries','14557750vHJuRQ','303755jXOUNd','utf-8','X-Trino-User','0.0.0','8rJDLMx','Authorization','parse','3472482cwSnaP','5575927ZfqdZN','../../package.json','length','1819773bbmQoq','2oGObbP','replace','1640HwiQNO','tdx'];a43_0x153e=function(){return _0x4abf04;};return a43_0x153e();}export function getAuthHeaders(_0x2459df,_0x19a6c5){const _0x531a6e=a43_0x5536,_0x56a8b9=getVersion(),_0xf8bbf8={'User-Agent':getUserAgent(),'X-TD-Client':_0x531a6e(0x190),'X-TD-Client-Version':_0x56a8b9};return _0x19a6c5&&(_0xf8bbf8[_0x531a6e(0x186)]='TD1\x20'+_0x19a6c5),_0xf8bbf8;}export function toHeaderRecord(_0x5e70bf){const _0x4ab10d=a43_0x5536,_0x39fabc={};for(const [_0x4a92dd,_0x4f5839]of Object[_0x4ab10d(0x17f)](_0x5e70bf)){_0x4f5839!==undefined&&(_0x39fabc[_0x4a92dd]=_0x4f5839);}return _0x39fabc;}export function getTrinoHeaders(_0x30887d,_0x10ea41){const _0x5f8b75=a43_0x5536,_0x4064fc=getAuthHeaders(_0x30887d,_0x10ea41),_0x3e68da=toHeaderRecord(_0x4064fc);return delete _0x3e68da[_0x5f8b75(0x186)],_0x10ea41&&(_0x3e68da[_0x5f8b75(0x183)]=_0x10ea41),_0x3e68da;}export function hasAPIKey(_0x4a5d64){const _0x159abc=a43_0x5536,_0x5e6273=getAPIKey(_0x4a5d64);return _0x5e6273!==undefined&&_0x5e6273[_0x159abc(0x18b)]>0x0;}
1
+ (function(_0x55111e,_0x598f4e){const _0x549713=a43_0x3bda,_0x2bcb1f=_0x55111e();while(!![]){try{const _0xfbe9b3=parseInt(_0x549713(0x127))/0x1*(parseInt(_0x549713(0x126))/0x2)+parseInt(_0x549713(0x12b))/0x3+parseInt(_0x549713(0x129))/0x4+-parseInt(_0x549713(0x12c))/0x5*(-parseInt(_0x549713(0x130))/0x6)+-parseInt(_0x549713(0x12a))/0x7*(parseInt(_0x549713(0x11f))/0x8)+parseInt(_0x549713(0x12e))/0x9+-parseInt(_0x549713(0x121))/0xa;if(_0xfbe9b3===_0x598f4e)break;else _0x2bcb1f['push'](_0x2bcb1f['shift']());}catch(_0x4a4b38){_0x2bcb1f['push'](_0x2bcb1f['shift']());}}}(a43_0x20de,0x9814c));function a43_0x20de(){const _0x51d29b=['TD1\x20','tdx',';\x20node/','6WBoTwr','75623pwQHlk','utf-8','2846880enndIP','413nzbsWR','2435805dFLglx','15760apHKVr','X-Trino-User','5576625DKrzza','parse','1128LsyCQW','replace','0.0.0','Authorization','113832DUPaXu','version','15002900qYZYsG','length'];a43_0x20de=function(){return _0x51d29b;};return a43_0x20de();}import{platform}from'os';function a43_0x3bda(_0x2d57c3,_0x349487){_0x2d57c3=_0x2d57c3-0x11c;const _0x20de76=a43_0x20de();let _0x3bda49=_0x20de76[_0x2d57c3];return _0x3bda49;}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x4877cd=a43_0x3bda;try{const _0x56b54d=fileURLToPath(import.meta.url),_0x1db686=dirname(_0x56b54d),_0x548920=join(_0x1db686,'../../package.json'),_0x4ff840=JSON[_0x4877cd(0x12f)](readFileSync(_0x548920,_0x4877cd(0x128)));return _0x4ff840[_0x4877cd(0x120)];}catch{return _0x4877cd(0x11d);}}export function getUserAgent(){const _0x3d0efa=a43_0x3bda,_0x48f22b=getVersion(),_0x5b8b60=platform(),_0x162abd=process[_0x3d0efa(0x120)][_0x3d0efa(0x11c)]('v','');return'tdx/'+_0x48f22b+'\x20('+_0x5b8b60+_0x3d0efa(0x125)+_0x162abd+')';}export function getAuthHeaders(_0x4e009e,_0x55dd72){const _0x1defad=a43_0x3bda,_0x4e8032=getVersion(),_0x3762b2={'User-Agent':getUserAgent(),'X-TD-Client':_0x1defad(0x124),'X-TD-Client-Version':_0x4e8032};return _0x55dd72&&(_0x3762b2[_0x1defad(0x11e)]=_0x1defad(0x123)+_0x55dd72),_0x3762b2;}export function toHeaderRecord(_0x24440c){const _0x274d62={};for(const [_0x306daf,_0x516aa2]of Object['entries'](_0x24440c)){_0x516aa2!==undefined&&(_0x274d62[_0x306daf]=_0x516aa2);}return _0x274d62;}export function getTrinoHeaders(_0x5b4636,_0x34625b){const _0x4e2c1e=a43_0x3bda,_0x4c40cf=getAuthHeaders(_0x5b4636,_0x34625b),_0x10dca9=toHeaderRecord(_0x4c40cf);return delete _0x10dca9[_0x4e2c1e(0x11e)],_0x34625b&&(_0x10dca9[_0x4e2c1e(0x12d)]=_0x34625b),_0x10dca9;}export function hasAPIKey(_0x13be82){const _0x275fce=a43_0x3bda,_0x3879fa=getAPIKey(_0x13be82);return _0x3879fa!==undefined&&_0x3879fa[_0x275fce(0x122)]>0x0;}
@@ -53,6 +53,32 @@ export declare function readCachedLLMProject(profile?: string): CachedLLMProject
53
53
  * @param profile - Optional profile name for profile-specific cache
54
54
  */
55
55
  export declare function writeCachedLLMProject(projectName: string, projectId: string, profile?: string): void;
56
+ /**
57
+ * Cached account info for statusline display
58
+ */
59
+ export interface CachedAccountInfo {
60
+ site: string;
61
+ accountId: number;
62
+ cachedAt: string;
63
+ }
64
+ /**
65
+ * Get the account info cache file path
66
+ * @param profile - Optional profile name for profile-specific cache
67
+ */
68
+ export declare function getAccountInfoCacheFile(profile?: string): string;
69
+ /**
70
+ * Read cached account info
71
+ * @param profile - Optional profile name for profile-specific cache
72
+ * @returns Cached account info or null if not found
73
+ */
74
+ export declare function readCachedAccountInfo(profile?: string): CachedAccountInfo | null;
75
+ /**
76
+ * Write account info to cache
77
+ * @param site - Site name (e.g., 'us01', 'jp01')
78
+ * @param accountId - Account ID
79
+ * @param profile - Optional profile name for profile-specific cache
80
+ */
81
+ export declare function writeCachedAccountInfo(site: string, accountId: number, profile?: string): void;
56
82
  /**
57
83
  * Parse .env file content
58
84
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAc3D;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAuBlF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAepG;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BpE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA0BrD;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA8ChF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CA2GzG;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,YAAY,UAAO,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmB7B;AAkJD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAgCnF;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvG;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,SAAS,CA2BtC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAc3D;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAuBlF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAepG;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAehF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAmB9F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BpE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAcvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA0BrD;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAK3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA8ChF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CA2GzG;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,YAAY,UAAO,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmB7B;AAkJD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAgCnF;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvG;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,SAAS,CA2BtC"}