@treasuredata/tdx 0.1.17 → 0.1.18

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 (79) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/client/cdp-client.js +1 -1
  3. package/dist/client/http-client.js +1 -1
  4. package/dist/client/llm-client.js +1 -1
  5. package/dist/client/rate-limiter.js +1 -1
  6. package/dist/client/td-client.js +1 -1
  7. package/dist/client/trino-client.js +1 -1
  8. package/dist/client/workflow-client.js +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/command.js +1 -1
  14. package/dist/commands/context-command.js +1 -1
  15. package/dist/commands/databases.js +1 -1
  16. package/dist/commands/describe.js +1 -1
  17. package/dist/commands/job-command.js +1 -1
  18. package/dist/commands/llm-command.js +1 -1
  19. package/dist/commands/llm-proxy.js +1 -1
  20. package/dist/commands/parent-segment-command.js +1 -1
  21. package/dist/commands/profiles-command.js +1 -1
  22. package/dist/commands/query-command.js +1 -1
  23. package/dist/commands/segment-command.js +1 -1
  24. package/dist/commands/segment-create-command.js +1 -1
  25. package/dist/commands/segment-fields-command.js +1 -1
  26. package/dist/commands/segment-pwd-command.js +1 -1
  27. package/dist/commands/segment-update-command.js +1 -1
  28. package/dist/commands/segment-use-command.js +1 -1
  29. package/dist/commands/segments.js +1 -1
  30. package/dist/commands/show.js +1 -1
  31. package/dist/commands/tables.js +1 -1
  32. package/dist/commands/use-command.js +1 -1
  33. package/dist/commands/workflow-command.js +1 -1
  34. package/dist/core/auth.js +1 -1
  35. package/dist/core/config.js +1 -1
  36. package/dist/core/global-context.js +1 -1
  37. package/dist/core/profile.js +1 -1
  38. package/dist/core/project-config.js +1 -1
  39. package/dist/core/session.js +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/proxy/anthropic-adapter.js +1 -1
  42. package/dist/proxy/server.d.ts.map +1 -1
  43. package/dist/proxy/server.js +1 -1
  44. package/dist/proxy/server.js.map +1 -1
  45. package/dist/sdk/api.js +1 -1
  46. package/dist/sdk/database.js +1 -1
  47. package/dist/sdk/errors.js +1 -1
  48. package/dist/sdk/index.js +1 -1
  49. package/dist/sdk/job.js +1 -1
  50. package/dist/sdk/llm.js +1 -1
  51. package/dist/sdk/query.js +1 -1
  52. package/dist/sdk/segment.js +1 -1
  53. package/dist/sdk/table.js +1 -1
  54. package/dist/sdk/workflow.js +1 -1
  55. package/dist/types/endpoints.js +1 -1
  56. package/dist/types/index.js +1 -1
  57. package/dist/utils/agent-ref-parser.js +1 -1
  58. package/dist/utils/chat-cache.js +1 -1
  59. package/dist/utils/colors.js +1 -1
  60. package/dist/utils/command-output.js +1 -1
  61. package/dist/utils/file-permissions.js +1 -1
  62. package/dist/utils/format-detector.js +1 -1
  63. package/dist/utils/formatters.js +1 -1
  64. package/dist/utils/json-loader.js +1 -1
  65. package/dist/utils/model-aliases.js +1 -1
  66. package/dist/utils/option-validation.js +1 -1
  67. package/dist/utils/port.js +1 -1
  68. package/dist/utils/process.js +1 -1
  69. package/dist/utils/prompt.js +1 -1
  70. package/dist/utils/segment-path-parser.js +1 -1
  71. package/dist/utils/segment-ref-parser.js +1 -1
  72. package/dist/utils/spinner.js +1 -1
  73. package/dist/utils/sql-parser.js +1 -1
  74. package/dist/utils/sse-parser.js +1 -1
  75. package/dist/utils/string-utils.js +1 -1
  76. package/dist/utils/table-ref-parser.js +1 -1
  77. package/dist/utils/tree-formatter.js +1 -1
  78. package/dist/utils/workflow-utils.js +1 -1
  79. package/package.json +1 -1
@@ -1 +1 @@
1
- const a27_0x8348b4=a27_0x4c00;(function(_0x203811,_0x4b286d){const _0x590c4c=a27_0x4c00,_0x1390eb=_0x203811();while(!![]){try{const _0x213332=-parseInt(_0x590c4c(0x8f))/0x1+-parseInt(_0x590c4c(0x97))/0x2+parseInt(_0x590c4c(0x7d))/0x3+-parseInt(_0x590c4c(0x7e))/0x4+-parseInt(_0x590c4c(0x80))/0x5+parseInt(_0x590c4c(0x92))/0x6*(parseInt(_0x590c4c(0x71))/0x7)+parseInt(_0x590c4c(0x75))/0x8;if(_0x213332===_0x4b286d)break;else _0x1390eb['push'](_0x1390eb['shift']());}catch(_0x3e7627){_0x1390eb['push'](_0x1390eb['shift']());}}}(a27_0x20df,0x483ea));function a27_0x20df(){const _0x2cc423=['folderId','64044ZkniAy','1711348DweyWH','segments','56240Ljcwke','split','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','description','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','execute','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','length','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','parentName','session','folderPath','Use:\x20tdx\x20segment\x20use\x20','segment','498462bfysis','Resolved\x20path\x20type:\x20','log','6eMiGYm','site','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Usage:\x20tdx\x20segment\x20use\x20<path>','fullPath','38466UjTWfK','Examples:','data','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Error:\x20Path\x20is\x20required','join','segmentPath','error','Resolved\x20relative\x20path\x20to:\x20','slice','Context\x20set\x20to:\x20','resolvePathToResource','verbose','isAbsolute','424571avqvuP','Target\x20path:\x20','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','9365544QSROBq','Parent\x20ID:\x20','\x27...','type','parentId','Resolving\x20path\x20\x27','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'];a27_0x20df=function(){return _0x2cc423;};return a27_0x20df();}function a27_0x4c00(_0x4957da,_0x6a2fc4){const _0x20df7f=a27_0x20df();return a27_0x4c00=function(_0x4c00d8,_0x5b4025){_0x4c00d8=_0x4c00d8-0x68;let _0x2ee101=_0x20df7f[_0x4c00d8];return _0x2ee101;},a27_0x4c00(_0x4957da,_0x6a2fc4);}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{['name']='segment:use';[a27_0x8348b4(0x83)]=a27_0x8348b4(0x86);async[a27_0x8348b4(0x85)](_0x53dab0){const _0x38bf41=a27_0x8348b4,{options:_0x4aabdc,args:_0x46c390,tdx:_0x850414}=_0x53dab0;if(_0x46c390[_0x38bf41(0x88)]===0x0)return console[_0x38bf41(0x6a)](_0x38bf41(0x9c)),console['error'](_0x38bf41(0x95)),console[_0x38bf41(0x6a)](_0x38bf41(0x98)),console['error'](_0x38bf41(0x9a)),console[_0x38bf41(0x6a)](_0x38bf41(0x87)),console[_0x38bf41(0x6a)](_0x38bf41(0x82)),console[_0x38bf41(0x6a)](_0x38bf41(0x74)),0x1;const _0x56caef=_0x46c390[0x0],_0x164f39=_0x4aabdc[_0x38bf41(0x8b)];try{if(_0x56caef==='/')return saveSessionContext({'segment_path':undefined},_0x164f39),console[_0x38bf41(0x91)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;const _0x53c32e=_0x4aabdc[_0x38bf41(0x69)];let _0x4e990b=_0x56caef;const _0x521396=parsePath(_0x56caef);if(!_0x521396[_0x38bf41(0x70)]){if(!_0x53c32e)return console[_0x38bf41(0x6a)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x38bf41(0x6a)](_0x38bf41(0x7b)),0x1;if(_0x56caef==='..'){const _0x25f060=_0x53c32e[_0x38bf41(0x81)]('/')[_0x38bf41(0x6c)](0x0,-0x1)[_0x38bf41(0x68)]('/');_0x4e990b=_0x25f060||'/';}else _0x56caef==='.'?_0x4e990b=_0x53c32e:_0x4e990b=_0x53c32e+'/'+_0x56caef;_0x4aabdc[_0x38bf41(0x6f)]&&console[_0x38bf41(0x6a)](_0x38bf41(0x6b)+_0x4e990b);}if(_0x4e990b==='/'||_0x4e990b==='')return saveSessionContext({'segment_path':undefined},_0x164f39),console[_0x38bf41(0x91)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x4e990b=normalizePath(_0x4e990b);const _0x39952c=parsePath(_0x4e990b)[_0x38bf41(0x7f)];if(_0x39952c[_0x38bf41(0x88)]===0x0)return saveSessionContext({'segment_path':undefined},_0x164f39),console[_0x38bf41(0x91)](_0x38bf41(0x73)),0x0;_0x4aabdc['verbose']&&(console[_0x38bf41(0x6a)]('Site:\x20'+_0x4aabdc[_0x38bf41(0x93)]),console[_0x38bf41(0x6a)](_0x38bf41(0x72)+_0x4e990b));const _0x3f9449=await withSpinner(_0x38bf41(0x7a)+_0x4e990b+_0x38bf41(0x77),()=>_0x850414[_0x38bf41(0x8e)][_0x38bf41(0x6e)](_0x4e990b),{'verbose':_0x4aabdc[_0x38bf41(0x6f)]}),_0x12ce0e=_0x3f9449[_0x38bf41(0x99)];_0x4aabdc['verbose']&&(console[_0x38bf41(0x6a)](_0x38bf41(0x90)+_0x12ce0e[_0x38bf41(0x78)]),console[_0x38bf41(0x6a)](_0x38bf41(0x76)+_0x12ce0e[_0x38bf41(0x79)]),_0x12ce0e['folderId']&&console[_0x38bf41(0x6a)]('Folder\x20ID:\x20'+_0x12ce0e[_0x38bf41(0x7c)]));if(_0x12ce0e[_0x38bf41(0x78)]===_0x38bf41(0x8e))return console['error'](_0x38bf41(0x9b)),console[_0x38bf41(0x6a)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console[_0x38bf41(0x6a)](_0x38bf41(0x8d)+_0x12ce0e[_0x38bf41(0x8a)]+(_0x12ce0e[_0x38bf41(0x8c)]?'/'+_0x12ce0e[_0x38bf41(0x8c)][_0x38bf41(0x68)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x12ce0e['fullPath'],'parent_segment':_0x12ce0e[_0x38bf41(0x8a)]},_0x164f39),console[_0x38bf41(0x91)](_0x38bf41(0x6d)+_0x12ce0e[_0x38bf41(0x96)]),_0x4aabdc[_0x38bf41(0x6f)]&&(console['error'](_0x38bf41(0x89)),console[_0x38bf41(0x6a)](_0x38bf41(0x84)),console[_0x38bf41(0x6a)](_0x38bf41(0x94))),0x0;}catch(_0x1ea298){throw _0x1ea298;}}}
1
+ const a27_0x247628=a27_0x1c20;(function(_0x7bca58,_0x3bd679){const _0x18496f=a27_0x1c20,_0x200c63=_0x7bca58();while(!![]){try{const _0x5cd9f0=parseInt(_0x18496f(0x149))/0x1+-parseInt(_0x18496f(0x153))/0x2+-parseInt(_0x18496f(0x15d))/0x3+parseInt(_0x18496f(0x143))/0x4+parseInt(_0x18496f(0x148))/0x5*(-parseInt(_0x18496f(0x13e))/0x6)+-parseInt(_0x18496f(0x157))/0x7+parseInt(_0x18496f(0x14f))/0x8;if(_0x5cd9f0===_0x3bd679)break;else _0x200c63['push'](_0x200c63['shift']());}catch(_0x18a3d2){_0x200c63['push'](_0x200c63['shift']());}}}(a27_0x1f01,0x49651));function a27_0x1f01(){const _0x2c994f=['Parent\x20ID:\x20','\x27...','42UHKNhY','name','isAbsolute','folderPath','verbose','739124QBCFfJ','resolvePathToResource','Context\x20set\x20to:\x20','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','Resolved\x20path\x20type:\x20','163675eeeOJr','239920kbYKSJ','Examples:','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Context\x20cleared.\x20Back\x20to\x20root.','split','folderId','11836688qhOUFD','Resolved\x20relative\x20path\x20to:\x20','Use:\x20tdx\x20segment\x20use\x20','Site:\x20','676706Siojgl','parentName','Error:\x20Path\x20is\x20required','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','3335892mVKBaf','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','log','Resolving\x20path\x20\x27','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','session','1678824lLoSLk','site','segments','type','slice','fullPath','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','join','error','data','segmentPath','segment','length','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','description'];a27_0x1f01=function(){return _0x2c994f;};return a27_0x1f01();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';function a27_0x1c20(_0x265817,_0x2ae963){const _0x1f0179=a27_0x1f01();return a27_0x1c20=function(_0x1c2054,_0x4e1e4b){_0x1c2054=_0x1c2054-0x137;let _0x29ab09=_0x1f0179[_0x1c2054];return _0x29ab09;},a27_0x1c20(_0x265817,_0x2ae963);}export class SegmentUseCommand extends BaseCommand{[a27_0x247628(0x13f)]='segment:use';[a27_0x247628(0x13b)]=a27_0x247628(0x163);async['execute'](_0x11d146){const _0x266926=a27_0x247628,{options:_0x192c7a,args:_0x55440b,tdx:_0xb5cad0}=_0x11d146;if(_0x55440b[_0x266926(0x139)]===0x0)return console[_0x266926(0x167)](_0x266926(0x155)),console[_0x266926(0x167)]('Usage:\x20tdx\x20segment\x20use\x20<path>'),console[_0x266926(0x167)](_0x266926(0x14a)),console[_0x266926(0x167)](_0x266926(0x15b)),console[_0x266926(0x167)](_0x266926(0x146)),console['error'](_0x266926(0x158)),console['error']('\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 _0x22b1fc=_0x55440b[0x0],_0x228d78=_0x192c7a[_0x266926(0x15c)];try{if(_0x22b1fc==='/')return saveSessionContext({'segment_path':undefined},_0x228d78),console['log'](_0x266926(0x14c)),0x0;const _0x571643=_0x192c7a[_0x266926(0x137)];let _0x119c2d=_0x22b1fc;const _0x3acf3c=parsePath(_0x22b1fc);if(!_0x3acf3c[_0x266926(0x140)]){if(!_0x571643)return console[_0x266926(0x167)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console['error'](_0x266926(0x156)),0x1;if(_0x22b1fc==='..'){const _0x3f2300=_0x571643[_0x266926(0x14d)]('/')[_0x266926(0x161)](0x0,-0x1)[_0x266926(0x166)]('/');_0x119c2d=_0x3f2300||'/';}else _0x22b1fc==='.'?_0x119c2d=_0x571643:_0x119c2d=_0x571643+'/'+_0x22b1fc;_0x192c7a[_0x266926(0x142)]&&console['error'](_0x266926(0x150)+_0x119c2d);}if(_0x119c2d==='/'||_0x119c2d==='')return saveSessionContext({'segment_path':undefined},_0x228d78),console[_0x266926(0x159)](_0x266926(0x14c)),0x0;_0x119c2d=normalizePath(_0x119c2d);const _0xeef7ee=parsePath(_0x119c2d)[_0x266926(0x15f)];if(_0xeef7ee[_0x266926(0x139)]===0x0)return saveSessionContext({'segment_path':undefined},_0x228d78),console[_0x266926(0x159)](_0x266926(0x14c)),0x0;_0x192c7a[_0x266926(0x142)]&&(console[_0x266926(0x167)](_0x266926(0x152)+_0x192c7a[_0x266926(0x15e)]),console[_0x266926(0x167)]('Target\x20path:\x20'+_0x119c2d));const _0x4979dc=await withSpinner(_0x266926(0x15a)+_0x119c2d+_0x266926(0x13d),()=>_0xb5cad0[_0x266926(0x138)][_0x266926(0x144)](_0x119c2d),{'verbose':_0x192c7a[_0x266926(0x142)]}),_0x36053e=_0x4979dc[_0x266926(0x168)];_0x192c7a[_0x266926(0x142)]&&(console[_0x266926(0x167)](_0x266926(0x147)+_0x36053e[_0x266926(0x160)]),console[_0x266926(0x167)](_0x266926(0x13c)+_0x36053e['parentId']),_0x36053e['folderId']&&console[_0x266926(0x167)]('Folder\x20ID:\x20'+_0x36053e[_0x266926(0x14e)]));if(_0x36053e[_0x266926(0x160)]===_0x266926(0x138))return console[_0x266926(0x167)](_0x266926(0x164)),console['error'](_0x266926(0x13a)),console[_0x266926(0x167)](_0x266926(0x151)+_0x36053e[_0x266926(0x154)]+(_0x36053e[_0x266926(0x141)]?'/'+_0x36053e[_0x266926(0x141)][_0x266926(0x166)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x36053e[_0x266926(0x162)],'parent_segment':_0x36053e[_0x266926(0x154)]},_0x228d78),console[_0x266926(0x159)](_0x266926(0x145)+_0x36053e['fullPath']),_0x192c7a['verbose']&&(console[_0x266926(0x167)](_0x266926(0x165)),console['error']('Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context'),console[_0x266926(0x167)](_0x266926(0x14b))),0x0;}catch(_0x2799aa){throw _0x2799aa;}}}
@@ -1 +1 @@
1
- const a28_0x5c2266=a28_0x39ed;function a28_0x39ed(_0x537bbe,_0x3ea9f3){const _0x5a06c9=a28_0x5a06();return a28_0x39ed=function(_0x39ed6f,_0x12fab2){_0x39ed6f=_0x39ed6f-0x104;let _0x295459=_0x5a06c9[_0x39ed6f];return _0x295459;},a28_0x39ed(_0x537bbe,_0x3ea9f3);}(function(_0x33e92e,_0x497abd){const _0x33e3ee=a28_0x39ed,_0x2ef7ad=_0x33e92e();while(!![]){try{const _0x48ff57=parseInt(_0x33e3ee(0x121))/0x1+-parseInt(_0x33e3ee(0x127))/0x2+-parseInt(_0x33e3ee(0x140))/0x3*(-parseInt(_0x33e3ee(0x10e))/0x4)+parseInt(_0x33e3ee(0x13d))/0x5*(-parseInt(_0x33e3ee(0x145))/0x6)+parseInt(_0x33e3ee(0x128))/0x7*(-parseInt(_0x33e3ee(0x10f))/0x8)+-parseInt(_0x33e3ee(0x12c))/0x9*(-parseInt(_0x33e3ee(0x133))/0xa)+-parseInt(_0x33e3ee(0x148))/0xb*(-parseInt(_0x33e3ee(0x123))/0xc);if(_0x48ff57===_0x497abd)break;else _0x2ef7ad['push'](_0x2ef7ad['shift']());}catch(_0x3c8ca4){_0x2ef7ad['push'](_0x2ef7ad['shift']());}}}(a28_0x5a06,0x7fd9c));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';import{formatRows}from'../utils/formatters.js';import a28_0x6bbc90 from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x5c2266(0x107)]=a28_0x5c2266(0x106);[a28_0x5c2266(0x12a)]=a28_0x5c2266(0x12e);async[a28_0x5c2266(0x10c)](_0x5ca625){const _0x3d6bf0=a28_0x5c2266,{options:_0x2b805e,args:_0xb18279}=_0x5ca625,_0x5b1193=_0x2b805e[_0x3d6bf0(0x117)],_0x14dd2f=_0xb18279[0x0];try{const _0x5b7d7b=_0x2b805e[_0x3d6bf0(0x13e)];_0x2b805e[_0x3d6bf0(0x13a)]&&(console[_0x3d6bf0(0x138)]('Site:\x20'+_0x2b805e[_0x3d6bf0(0x10a)]),console[_0x3d6bf0(0x138)](_0x3d6bf0(0x122)+(_0x5b7d7b||'/')),_0x14dd2f&&console[_0x3d6bf0(0x138)](_0x3d6bf0(0x111)+_0x14dd2f),_0x5b1193&&console[_0x3d6bf0(0x138)](_0x3d6bf0(0x12b)));if(_0x14dd2f){const _0x301993=_0x14dd2f[_0x3d6bf0(0x146)]('*')||_0x14dd2f[_0x3d6bf0(0x146)]('?');if(_0x301993&&!_0x5b7d7b)return await this[_0x3d6bf0(0x118)](_0x5ca625,_0x14dd2f);else return _0x301993?(console[_0x3d6bf0(0x138)]('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0x3d6bf0(0x138)](_0x3d6bf0(0x12f)),0x1):_0x5b1193?await this[_0x3d6bf0(0x109)](_0x5ca625,_0x14dd2f):await this[_0x3d6bf0(0x120)](_0x5ca625,_0x14dd2f);}if(!_0x5b7d7b)return await this[_0x3d6bf0(0x129)](_0x5ca625);return _0x5b1193?await this[_0x3d6bf0(0x109)](_0x5ca625,_0x5b7d7b):await this[_0x3d6bf0(0x120)](_0x5ca625,_0x5b7d7b);}catch(_0x59d1ba){if(_0x59d1ba instanceof SDKError)return console['error']('Error:\x20'+_0x59d1ba[_0x3d6bf0(0x13f)]),_0x59d1ba[_0x3d6bf0(0x110)]&&console[_0x3d6bf0(0x138)](_0x3d6bf0(0x14a)+_0x59d1ba['cause']),0x1;throw _0x59d1ba;}}async[a28_0x5c2266(0x118)](_0xdcea58,_0x344111){const _0x3c6f9a=a28_0x5c2266,{options:_0x4002ab,tdx:_0x7436c5}=_0xdcea58,_0x9a0cfe=await withSpinner(_0x3c6f9a(0x13c)+_0x344111+_0x3c6f9a(0x119),()=>_0x7436c5[_0x3c6f9a(0x141)][_0x3c6f9a(0x129)](),{'verbose':_0x4002ab[_0x3c6f9a(0x13a)]}),_0xc7a196=_0x9a0cfe[_0x3c6f9a(0x114)],_0x106449=_0x344111[_0x3c6f9a(0x126)](/[.+^${}()|[\]\\]/g,_0x3c6f9a(0x149))[_0x3c6f9a(0x126)](/\*/g,'.*')[_0x3c6f9a(0x126)](/\?/g,'.'),_0x5885a9=new RegExp('^'+_0x106449+'$','i'),_0x4f9ef2=_0xc7a196[_0x3c6f9a(0x11d)](_0x3ae503=>_0x5885a9['test'](_0x3ae503[_0x3c6f9a(0x113)][_0x3c6f9a(0x107)]));console[_0x3c6f9a(0x138)]('✔\x20Found\x20'+_0x4f9ef2[_0x3c6f9a(0x131)]+_0x3c6f9a(0x104)+(_0x4f9ef2[_0x3c6f9a(0x131)]!==0x1?'s':'')+_0x3c6f9a(0x11b)+_0x344111+'\x27');if(_0x4002ab[_0x3c6f9a(0x130)]===_0x3c6f9a(0x124)||_0x4002ab['format']===_0x3c6f9a(0x137))await handleSDKOutput(_0x4f9ef2,_0x4002ab);else{if(_0x4f9ef2['length']===0x0)console[_0x3c6f9a(0x11e)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x344111);else{console[_0x3c6f9a(0x11e)](_0x3c6f9a(0x147));for(const _0x4f8e3c of _0x4f9ef2){const _0x47f047=_0x4f8e3c[_0x3c6f9a(0x113)][_0x3c6f9a(0x139)]?a28_0x6bbc90[_0x3c6f9a(0x13b)]('\x20('+formatRows(_0x4f8e3c[_0x3c6f9a(0x113)]['population'])+')'):'';console[_0x3c6f9a(0x11e)]('👥\x20'+_0x4f8e3c[_0x3c6f9a(0x113)][_0x3c6f9a(0x107)]+_0x47f047);}}}return 0x0;}async[a28_0x5c2266(0x129)](_0x265b87){const _0x4bf4b2=a28_0x5c2266,{options:_0x5f346d,tdx:_0x27131c}=_0x265b87,_0xcea1af=await withSpinner(_0x4bf4b2(0x142),()=>_0x27131c[_0x4bf4b2(0x141)]['listParents'](),{'verbose':_0x5f346d[_0x4bf4b2(0x13a)]}),_0x28ad6b=_0xcea1af[_0x4bf4b2(0x114)];console[_0x4bf4b2(0x138)](_0x4bf4b2(0x116)+_0x28ad6b['length']+_0x4bf4b2(0x104)+(_0x28ad6b[_0x4bf4b2(0x131)]!==0x1?'s':''));if(_0x5f346d['format']===_0x4bf4b2(0x124)||_0x5f346d['format']==='jsonl')await handleSDKOutput(_0x28ad6b,_0x5f346d);else{console[_0x4bf4b2(0x11e)](_0x4bf4b2(0x147));for(const _0x52170a of _0x28ad6b){const _0x3f8447=_0x52170a[_0x4bf4b2(0x113)]['population']?a28_0x6bbc90[_0x4bf4b2(0x13b)]('\x20('+formatRows(_0x52170a[_0x4bf4b2(0x113)][_0x4bf4b2(0x139)])+')'):'';console[_0x4bf4b2(0x11e)]('👥\x20'+_0x52170a['attributes'][_0x4bf4b2(0x107)]+_0x3f8447);}}return 0x0;}async[a28_0x5c2266(0x120)](_0x98f116,_0x556130){const _0x10b7c5=a28_0x5c2266,{options:_0x4fd90b,tdx:_0x5507b5}=_0x98f116,_0x11bf62=await withSpinner(_0x10b7c5(0x11c)+_0x556130+'\x27...',()=>_0x5507b5[_0x10b7c5(0x141)]['resolvePathToResource'](_0x556130),{'verbose':_0x4fd90b[_0x10b7c5(0x13a)]}),_0x77c79e=_0x11bf62['data'];_0x4fd90b[_0x10b7c5(0x13a)]&&(console['error'](_0x10b7c5(0x135)+_0x77c79e[_0x10b7c5(0x134)]),_0x77c79e[_0x10b7c5(0x11f)]&&console[_0x10b7c5(0x138)](_0x10b7c5(0x105)+_0x77c79e[_0x10b7c5(0x11f)]));const _0x41ba8e=await withSpinner(_0x10b7c5(0x10d),()=>_0x5507b5['segment']['listUnified'](_0x77c79e[_0x10b7c5(0x134)],_0x77c79e[_0x10b7c5(0x11f)]),{'verbose':_0x4fd90b['verbose']}),{folders:_0x992c0f,segments:_0x22afff}=_0x41ba8e[_0x10b7c5(0x114)],_0x351327=_0x992c0f[_0x10b7c5(0x131)]+_0x22afff[_0x10b7c5(0x131)];console[_0x10b7c5(0x138)](_0x10b7c5(0x116)+_0x992c0f['length']+_0x10b7c5(0x10b)+(_0x992c0f[_0x10b7c5(0x131)]!==0x1?'s':'')+_0x10b7c5(0x12d)+_0x22afff[_0x10b7c5(0x131)]+_0x10b7c5(0x11a)+(_0x22afff['length']!==0x1?'s':''));if(_0x4fd90b[_0x10b7c5(0x130)]===_0x10b7c5(0x124)||_0x4fd90b[_0x10b7c5(0x130)]===_0x10b7c5(0x137)){const _0x413ce6=[..._0x992c0f[_0x10b7c5(0x136)](_0x4b7379=>({..._0x4b7379,'type':_0x10b7c5(0x143)})),..._0x22afff['map'](_0x43e15e=>({..._0x43e15e,'type':_0x10b7c5(0x141)}))][_0x10b7c5(0x125)]((_0x101a10,_0x39015c)=>_0x101a10[_0x10b7c5(0x107)]['localeCompare'](_0x39015c[_0x10b7c5(0x107)]));await handleSDKOutput(_0x413ce6,_0x4fd90b);}else{if(_0x351327===0x0)console['log'](a28_0x6bbc90[_0x10b7c5(0x13b)]('[/'+_0x556130+']')),console[_0x10b7c5(0x11e)](_0x10b7c5(0x115));else{console[_0x10b7c5(0x11e)](a28_0x6bbc90[_0x10b7c5(0x13b)]('[/'+_0x556130+']'));const _0x26059b=formatFlatList(_0x992c0f,_0x22afff,{'showMetadata':!![]});console['log'](_0x26059b);}}return 0x0;}async[a28_0x5c2266(0x109)](_0x1cbb1f,_0x43cf4c){const _0x15f754=a28_0x5c2266,{options:_0x3506e3,tdx:_0x1bda1a}=_0x1cbb1f,_0x1e75bd=await withSpinner(_0x15f754(0x11c)+_0x43cf4c+_0x15f754(0x119),()=>_0x1bda1a[_0x15f754(0x141)][_0x15f754(0x108)](_0x43cf4c),{'verbose':_0x3506e3[_0x15f754(0x13a)]}),_0x2f6b58=_0x1e75bd['data'];_0x3506e3['verbose']&&(console[_0x15f754(0x138)]('Parent\x20ID:\x20'+_0x2f6b58[_0x15f754(0x134)]),_0x2f6b58[_0x15f754(0x11f)]&&console['error'](_0x15f754(0x105)+_0x2f6b58[_0x15f754(0x11f)]));const _0x422f86=_0x3506e3[_0x15f754(0x112)]||0xa,_0x17f3b6=await withSpinner('Building\x20hierarchy\x20tree...',()=>_0x1bda1a[_0x15f754(0x141)]['listRecursive'](_0x2f6b58[_0x15f754(0x134)],_0x2f6b58['folderId'],0x0,_0x422f86),{'verbose':_0x3506e3[_0x15f754(0x13a)]}),_0x5696e4=_0x17f3b6[_0x15f754(0x114)];console[_0x15f754(0x138)](_0x15f754(0x144)+_0x5696e4[_0x15f754(0x131)]+_0x15f754(0x132));if(_0x3506e3[_0x15f754(0x130)]===_0x15f754(0x124)||_0x3506e3[_0x15f754(0x130)]===_0x15f754(0x137))await handleSDKOutput(_0x5696e4,_0x3506e3);else{console[_0x15f754(0x11e)](a28_0x6bbc90[_0x15f754(0x13b)]('[/'+_0x43cf4c+']'));const _0xd29824=formatTree(_0x5696e4,{'showMetadata':!![]});console[_0x15f754(0x11e)](_0xd29824);}return 0x0;}}function a28_0x5a06(){const _0xbdd31b=['(empty)','✔\x20Found\x20','recursive','listParentsWithPattern','\x27...','\x20segment','\x20matching\x20\x27','Resolving\x20context\x20path\x20\x27','filter','log','folderId','listUnified','14068mlnofE','Current\x20context:\x20','65676ewWzwm','json','sort','replace','1583318JVvhqO','7XXdkWC','listParents','description','Recursive\x20mode:\x20enabled','8497278UjjOQB','\x20and\x20','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','format','length','\x20top-level\x20items','10SoaFxi','parentId','Parent\x20ID:\x20','map','jsonl','error','population','verbose','dim','Listing\x20parent\x20segments\x20matching\x20\x27','3722855nbXxLf','segmentPath','message','1122DikmYo','segment','Listing\x20parent\x20segments...','folder','✔\x20Built\x20tree\x20with\x20','6JRULtD','includes','[parent\x20segments]','1045yJEGYT','\x5c$&','\x20\x20Cause:\x20','\x20parent\x20segment','Folder\x20ID:\x20','segments','name','resolvePathToResource','listRecursive','site','\x20folder','execute','Listing\x20folders\x20and\x20segments...','9840cYyhnh','2706232UdJwnZ','cause','Path/pattern\x20arg:\x20','maxDepth','attributes','data'];a28_0x5a06=function(){return _0xbdd31b;};return a28_0x5a06();}
1
+ const a28_0x1dc4c6=a28_0x4c0f;(function(_0x205937,_0x1cd109){const _0x66c1c3=a28_0x4c0f,_0xe97810=_0x205937();while(!![]){try{const _0x3b6be0=parseInt(_0x66c1c3(0x103))/0x1+-parseInt(_0x66c1c3(0x119))/0x2*(parseInt(_0x66c1c3(0x10d))/0x3)+parseInt(_0x66c1c3(0x11b))/0x4*(-parseInt(_0x66c1c3(0x13a))/0x5)+parseInt(_0x66c1c3(0x128))/0x6+-parseInt(_0x66c1c3(0x126))/0x7+-parseInt(_0x66c1c3(0x116))/0x8+parseInt(_0x66c1c3(0x118))/0x9*(parseInt(_0x66c1c3(0x10f))/0xa);if(_0x3b6be0===_0x1cd109)break;else _0xe97810['push'](_0xe97810['shift']());}catch(_0xc0855b){_0xe97810['push'](_0xe97810['shift']());}}}(a28_0x3a4f,0x9aadf));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x4c0f(_0x26209d,_0x2d5b2a){const _0x3a4fed=a28_0x3a4f();return a28_0x4c0f=function(_0x4c0f34,_0x5d8a8b){_0x4c0f34=_0x4c0f34-0xfd;let _0x1dd75e=_0x3a4fed[_0x4c0f34];return _0x1dd75e;},a28_0x4c0f(_0x26209d,_0x2d5b2a);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a28_0x3a4f(){const _0x266949=['2017036XjVjBS','execute','✔\x20Found\x20','No\x20parent\x20segments\x20match\x20pattern:\x20','Parent\x20ID:\x20','map','replace','resolvePathToResource','filter','length','site','348250bQUkCg','segment','138342NOeBCW','includes','description','\x20\x20Cause:\x20','(empty)','error','Listing\x20folders\x20and\x20segments...','listParentsWithPattern','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','cause','\x20folder','listRecursive','verbose','\x20segment','Resolving\x20context\x20path\x20\x27','Folder\x20ID:\x20','\x20parent\x20segment','localeCompare','5MWSJBh','Building\x20hierarchy\x20tree...','Path/pattern\x20arg:\x20','dim','segments','[parent\x20segments]','Site:\x20','format','491698WKThLB','Listing\x20parent\x20segments...','listUnified','\x20top-level\x20items','attributes','jsonl','parentId','listParents','Listing\x20parent\x20segments\x20matching\x20\x27','recursive','78YlKIOU','name','22178670ZzeCAO','folderId','json','👥\x20','\x5c$&','log','\x27...','8203072WUdpug','population','9uCresW','39974HgHYGG','data'];a28_0x3a4f=function(){return _0x266949;};return a28_0x3a4f();}import{formatRows}from'../utils/formatters.js';import a28_0x52f7c9 from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x1dc4c6(0x10e)]=a28_0x1dc4c6(0xff);[a28_0x1dc4c6(0x12a)]=a28_0x1dc4c6(0x130);async[a28_0x1dc4c6(0x11c)](_0x459eae){const _0x8489e7=a28_0x1dc4c6,{options:_0x565ab8,args:_0x288c21}=_0x459eae,_0x2c42b9=_0x565ab8[_0x8489e7(0x10c)],_0x228617=_0x288c21[0x0];try{const _0x4a0e23=_0x565ab8['segmentPath'];_0x565ab8['verbose']&&(console[_0x8489e7(0x12d)](_0x8489e7(0x101)+_0x565ab8[_0x8489e7(0x125)]),console[_0x8489e7(0x12d)]('Current\x20context:\x20'+(_0x4a0e23||'/')),_0x228617&&console[_0x8489e7(0x12d)](_0x8489e7(0xfd)+_0x228617),_0x2c42b9&&console['error']('Recursive\x20mode:\x20enabled'));if(_0x228617){const _0x275e15=_0x228617[_0x8489e7(0x129)]('*')||_0x228617[_0x8489e7(0x129)]('?');if(_0x275e15&&!_0x4a0e23)return await this[_0x8489e7(0x12f)](_0x459eae,_0x228617);else return _0x275e15?(console['error']('Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'),console[_0x8489e7(0x12d)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x2c42b9?await this['listRecursive'](_0x459eae,_0x228617):await this[_0x8489e7(0x105)](_0x459eae,_0x228617);}if(!_0x4a0e23)return await this[_0x8489e7(0x10a)](_0x459eae);return _0x2c42b9?await this['listRecursive'](_0x459eae,_0x4a0e23):await this[_0x8489e7(0x105)](_0x459eae,_0x4a0e23);}catch(_0x3d4250){if(_0x3d4250 instanceof SDKError)return console[_0x8489e7(0x12d)]('Error:\x20'+_0x3d4250['message']),_0x3d4250[_0x8489e7(0x131)]&&console[_0x8489e7(0x12d)](_0x8489e7(0x12b)+_0x3d4250[_0x8489e7(0x131)]),0x1;throw _0x3d4250;}}async['listParentsWithPattern'](_0x20f16a,_0x56c077){const _0x15832a=a28_0x1dc4c6,{options:_0x2e17f3,tdx:_0x27b6ff}=_0x20f16a,_0x2345cb=await withSpinner(_0x15832a(0x10b)+_0x56c077+_0x15832a(0x115),()=>_0x27b6ff[_0x15832a(0x127)]['listParents'](),{'verbose':_0x2e17f3[_0x15832a(0x134)]}),_0x27a3a5=_0x2345cb['data'],_0x58fd33=_0x56c077[_0x15832a(0x121)](/[.+^${}()|[\]\\]/g,_0x15832a(0x113))[_0x15832a(0x121)](/\*/g,'.*')[_0x15832a(0x121)](/\?/g,'.'),_0x92ab0=new RegExp('^'+_0x58fd33+'$','i'),_0x47986a=_0x27a3a5[_0x15832a(0x123)](_0x4d84ff=>_0x92ab0['test'](_0x4d84ff[_0x15832a(0x107)][_0x15832a(0x10e)]));console[_0x15832a(0x12d)](_0x15832a(0x11d)+_0x47986a['length']+_0x15832a(0x138)+(_0x47986a[_0x15832a(0x124)]!==0x1?'s':'')+'\x20matching\x20\x27'+_0x56c077+'\x27');if(_0x2e17f3[_0x15832a(0x102)]===_0x15832a(0x111)||_0x2e17f3['format']===_0x15832a(0x108))await handleSDKOutput(_0x47986a,_0x2e17f3);else{if(_0x47986a[_0x15832a(0x124)]===0x0)console[_0x15832a(0x114)](_0x15832a(0x11e)+_0x56c077);else{console[_0x15832a(0x114)](_0x15832a(0x100));for(const _0x53ffdd of _0x47986a){const _0x21fb9f=_0x53ffdd[_0x15832a(0x107)][_0x15832a(0x117)]?a28_0x52f7c9[_0x15832a(0xfe)]('\x20('+formatRows(_0x53ffdd['attributes'][_0x15832a(0x117)])+')'):'';console[_0x15832a(0x114)](_0x15832a(0x112)+_0x53ffdd[_0x15832a(0x107)][_0x15832a(0x10e)]+_0x21fb9f);}}}return 0x0;}async[a28_0x1dc4c6(0x10a)](_0x1bcf57){const _0x3633ac=a28_0x1dc4c6,{options:_0x113726,tdx:_0x52d9f4}=_0x1bcf57,_0x482d02=await withSpinner(_0x3633ac(0x104),()=>_0x52d9f4[_0x3633ac(0x127)][_0x3633ac(0x10a)](),{'verbose':_0x113726[_0x3633ac(0x134)]}),_0x42b758=_0x482d02['data'];console[_0x3633ac(0x12d)](_0x3633ac(0x11d)+_0x42b758[_0x3633ac(0x124)]+_0x3633ac(0x138)+(_0x42b758[_0x3633ac(0x124)]!==0x1?'s':''));if(_0x113726[_0x3633ac(0x102)]===_0x3633ac(0x111)||_0x113726[_0x3633ac(0x102)]==='jsonl')await handleSDKOutput(_0x42b758,_0x113726);else{console[_0x3633ac(0x114)](_0x3633ac(0x100));for(const _0x121fd0 of _0x42b758){const _0x53fe33=_0x121fd0['attributes'][_0x3633ac(0x117)]?a28_0x52f7c9[_0x3633ac(0xfe)]('\x20('+formatRows(_0x121fd0[_0x3633ac(0x107)][_0x3633ac(0x117)])+')'):'';console[_0x3633ac(0x114)](_0x3633ac(0x112)+_0x121fd0[_0x3633ac(0x107)][_0x3633ac(0x10e)]+_0x53fe33);}}return 0x0;}async[a28_0x1dc4c6(0x105)](_0x2b9dac,_0x84e14b){const _0x485c65=a28_0x1dc4c6,{options:_0x3007ad,tdx:_0x50a694}=_0x2b9dac,_0x2a20a5=await withSpinner(_0x485c65(0x136)+_0x84e14b+_0x485c65(0x115),()=>_0x50a694[_0x485c65(0x127)][_0x485c65(0x122)](_0x84e14b),{'verbose':_0x3007ad[_0x485c65(0x134)]}),_0x27eebf=_0x2a20a5['data'];_0x3007ad['verbose']&&(console[_0x485c65(0x12d)](_0x485c65(0x11f)+_0x27eebf['parentId']),_0x27eebf['folderId']&&console['error'](_0x485c65(0x137)+_0x27eebf[_0x485c65(0x110)]));const _0x586625=await withSpinner(_0x485c65(0x12e),()=>_0x50a694[_0x485c65(0x127)][_0x485c65(0x105)](_0x27eebf['parentId'],_0x27eebf[_0x485c65(0x110)]),{'verbose':_0x3007ad[_0x485c65(0x134)]}),{folders:_0x57df89,segments:_0x34e46e}=_0x586625[_0x485c65(0x11a)],_0xea7ae8=_0x57df89[_0x485c65(0x124)]+_0x34e46e[_0x485c65(0x124)];console['error'](_0x485c65(0x11d)+_0x57df89['length']+_0x485c65(0x132)+(_0x57df89[_0x485c65(0x124)]!==0x1?'s':'')+'\x20and\x20'+_0x34e46e['length']+_0x485c65(0x135)+(_0x34e46e['length']!==0x1?'s':''));if(_0x3007ad[_0x485c65(0x102)]===_0x485c65(0x111)||_0x3007ad[_0x485c65(0x102)]===_0x485c65(0x108)){const _0x271ac3=[..._0x57df89[_0x485c65(0x120)](_0x53da88=>({..._0x53da88,'type':'folder'})),..._0x34e46e['map'](_0x1f857a=>({..._0x1f857a,'type':_0x485c65(0x127)}))]['sort']((_0x2c3d34,_0x34e0b5)=>_0x2c3d34[_0x485c65(0x10e)][_0x485c65(0x139)](_0x34e0b5['name']));await handleSDKOutput(_0x271ac3,_0x3007ad);}else{if(_0xea7ae8===0x0)console[_0x485c65(0x114)](a28_0x52f7c9[_0x485c65(0xfe)]('[/'+_0x84e14b+']')),console[_0x485c65(0x114)](_0x485c65(0x12c));else{console[_0x485c65(0x114)](a28_0x52f7c9[_0x485c65(0xfe)]('[/'+_0x84e14b+']'));const _0x5aeb22=formatFlatList(_0x57df89,_0x34e46e,{'showMetadata':!![]});console[_0x485c65(0x114)](_0x5aeb22);}}return 0x0;}async[a28_0x1dc4c6(0x133)](_0x1c8f96,_0x409872){const _0x585247=a28_0x1dc4c6,{options:_0x2d87be,tdx:_0x5acdbf}=_0x1c8f96,_0x14518a=await withSpinner(_0x585247(0x136)+_0x409872+_0x585247(0x115),()=>_0x5acdbf[_0x585247(0x127)][_0x585247(0x122)](_0x409872),{'verbose':_0x2d87be[_0x585247(0x134)]}),_0x2be6b3=_0x14518a[_0x585247(0x11a)];_0x2d87be['verbose']&&(console['error'](_0x585247(0x11f)+_0x2be6b3[_0x585247(0x109)]),_0x2be6b3[_0x585247(0x110)]&&console[_0x585247(0x12d)]('Folder\x20ID:\x20'+_0x2be6b3[_0x585247(0x110)]));const _0x56fe4f=_0x2d87be['maxDepth']||0xa,_0x1348d6=await withSpinner(_0x585247(0x13b),()=>_0x5acdbf[_0x585247(0x127)][_0x585247(0x133)](_0x2be6b3[_0x585247(0x109)],_0x2be6b3[_0x585247(0x110)],0x0,_0x56fe4f),{'verbose':_0x2d87be[_0x585247(0x134)]}),_0x1800a3=_0x1348d6[_0x585247(0x11a)];console[_0x585247(0x12d)]('✔\x20Built\x20tree\x20with\x20'+_0x1800a3[_0x585247(0x124)]+_0x585247(0x106));if(_0x2d87be[_0x585247(0x102)]===_0x585247(0x111)||_0x2d87be[_0x585247(0x102)]===_0x585247(0x108))await handleSDKOutput(_0x1800a3,_0x2d87be);else{console['log'](a28_0x52f7c9[_0x585247(0xfe)]('[/'+_0x409872+']'));const _0x41551c=formatTree(_0x1800a3,{'showMetadata':!![]});console[_0x585247(0x114)](_0x41551c);}return 0x0;}}
@@ -1 +1 @@
1
- const a29_0x1ed28d=a29_0x1a92;(function(_0x20bbdf,_0x43265b){const _0x369a15=a29_0x1a92,_0x279ff0=_0x20bbdf();while(!![]){try{const _0x8f62a4=-parseInt(_0x369a15(0x1cd))/0x1+-parseInt(_0x369a15(0x1e3))/0x2+-parseInt(_0x369a15(0x1c6))/0x3+-parseInt(_0x369a15(0x1d0))/0x4*(parseInt(_0x369a15(0x1e1))/0x5)+-parseInt(_0x369a15(0x1dd))/0x6+parseInt(_0x369a15(0x1d8))/0x7+parseInt(_0x369a15(0x1e6))/0x8;if(_0x8f62a4===_0x43265b)break;else _0x279ff0['push'](_0x279ff0['shift']());}catch(_0x4ddbbe){_0x279ff0['push'](_0x279ff0['shift']());}}}(a29_0xd942,0xe753e));import{BaseCommand}from'./command.js';function a29_0x1a92(_0xb83a23,_0x5aef10){const _0xd94230=a29_0xd942();return a29_0x1a92=function(_0x1a9296,_0x5e3c0a){_0x1a9296=_0x1a9296-0x1c5;let _0x46e14f=_0xd94230[_0x1a9296];return _0x46e14f;},a29_0x1a92(_0xb83a23,_0x5aef10);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';function a29_0xd942(){const _0x4fb2b7=['length','message','490856WeBKqi','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','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','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','data','verbose','description','show','4972450eYmoFL','Usage:\x20tdx\x20show\x20<database.table>','error','execute','database','6567360IFXFLf','✔\x20Retrieved\x20','...','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','50TtRvlw','Catalog:\x20','2530518MCtdVq','args','name','35497888GdNFOv','cause','\x20\x20Cause:\x20','validate','1298985LveKJR','Error:\x20','Site:\x20','Limit:\x20','showTable','table','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','180114rHBkvZ'];a29_0xd942=function(){return _0x4fb2b7;};return a29_0xd942();}import{withSpinner}from'../utils/spinner.js';export class ShowCommand extends BaseCommand{[a29_0x1ed28d(0x1e5)]='show';[a29_0x1ed28d(0x1d6)]='Show\x20table\x20contents';async[a29_0x1ed28d(0x1db)](_0x3f1900){const _0x56b62f=a29_0x1ed28d;return this[_0x56b62f(0x1ca)](_0x3f1900);}async['showTable'](_0x5872c3){const _0x1b0f3e=a29_0x1ed28d,{options:_0x2326cf,args:_0x300a4d,tdx:_0x34f8b1}=_0x5872c3;let _0x5a10a6;try{_0x5a10a6=parseTableReference(_0x300a4d[0x0]);const _0x49cde9=_0x2326cf[_0x1b0f3e(0x1dc)];!_0x5a10a6[_0x1b0f3e(0x1dc)]&&_0x49cde9&&(_0x5a10a6[_0x1b0f3e(0x1dc)]=_0x49cde9);const _0x240d76=validateTableDescribeReference(_0x5a10a6);if(_0x240d76)return console[_0x1b0f3e(0x1da)]('Error:\x20'+_0x240d76),console['error'](_0x1b0f3e(0x1d9)),console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1cc)),console[_0x1b0f3e(0x1da)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x57b5fe){return console['error'](_0x1b0f3e(0x1c7)+_0x57b5fe['message']),console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1d9)),console['error'](_0x1b0f3e(0x1cc)),console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1d3)),0x1;}const _0x1fd10f=_0x5a10a6['catalog'],_0x3c7e6f=_0x5a10a6[_0x1b0f3e(0x1dc)],_0x4bf580=_0x5a10a6[_0x1b0f3e(0x1cb)],_0x261382=_0x2326cf['limit'];try{_0x2326cf[_0x1b0f3e(0x1d5)]&&(console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1c8)+_0x2326cf['site']),_0x1fd10f&&console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1e2)+_0x1fd10f),console[_0x1b0f3e(0x1da)]('Database:\x20'+_0x3c7e6f),console['error']('Table:\x20'+_0x4bf580),console['error'](_0x1b0f3e(0x1c9)+_0x261382));const _0x4032a0=_0x1fd10f?_0x1fd10f+'.'+_0x3c7e6f+'.'+_0x4bf580:_0x3c7e6f+'.'+_0x4bf580,_0x17d031=await withSpinner('Querying\x20'+_0x4032a0+_0x1b0f3e(0x1df),()=>_0x34f8b1['table'][_0x1b0f3e(0x1d7)](_0x3c7e6f,_0x4bf580,_0x261382,_0x1fd10f),{'verbose':_0x2326cf[_0x1b0f3e(0x1d5)]}),_0x53db01=_0x17d031[_0x1b0f3e(0x1d4)],_0x308f32=_0x53db01['data'];return _0x308f32[_0x1b0f3e(0x1ce)]===0x0?console['error'](_0x1b0f3e(0x1e0)):console['error'](_0x1b0f3e(0x1de)+_0x308f32[_0x1b0f3e(0x1ce)]+'\x20row'+(_0x308f32['length']!==0x1?'s':'')+'\x20from\x20'+_0x4032a0),await handleSDKOutput(_0x308f32,_0x2326cf),0x0;}catch(_0x31d9d1){if(_0x31d9d1 instanceof SDKError)return console[_0x1b0f3e(0x1da)]('Error:\x20'+_0x31d9d1[_0x1b0f3e(0x1cf)]),_0x31d9d1[_0x1b0f3e(0x1e7)]&&console[_0x1b0f3e(0x1da)](_0x1b0f3e(0x1e8)+_0x31d9d1[_0x1b0f3e(0x1e7)]),0x1;throw _0x31d9d1;}}[a29_0x1ed28d(0x1c5)](_0x25db93){const _0x24430c=a29_0x1ed28d;if(_0x25db93[_0x24430c(0x1e4)]['length']===0x0)return _0x24430c(0x1d2);if(_0x25db93[_0x24430c(0x1e4)]['length']>0x1)return _0x24430c(0x1d1);return undefined;}}
1
+ const a29_0x4162b1=a29_0x114f;function a29_0x114f(_0x25f2d1,_0x51e5e3){const _0x52a07a=a29_0x52a0();return a29_0x114f=function(_0x114f04,_0x1dfe2d){_0x114f04=_0x114f04-0xc3;let _0x30d1f3=_0x52a07a[_0x114f04];return _0x30d1f3;},a29_0x114f(_0x25f2d1,_0x51e5e3);}(function(_0x399f35,_0x38e9d9){const _0x5970eb=a29_0x114f,_0x10ebb9=_0x399f35();while(!![]){try{const _0x36a104=-parseInt(_0x5970eb(0xc8))/0x1*(-parseInt(_0x5970eb(0xc6))/0x2)+-parseInt(_0x5970eb(0xc9))/0x3*(-parseInt(_0x5970eb(0xcd))/0x4)+parseInt(_0x5970eb(0xe3))/0x5*(parseInt(_0x5970eb(0xe2))/0x6)+-parseInt(_0x5970eb(0xc4))/0x7*(parseInt(_0x5970eb(0xdd))/0x8)+-parseInt(_0x5970eb(0xcb))/0x9*(parseInt(_0x5970eb(0xde))/0xa)+-parseInt(_0x5970eb(0xe5))/0xb+parseInt(_0x5970eb(0xec))/0xc;if(_0x36a104===_0x38e9d9)break;else _0x10ebb9['push'](_0x10ebb9['shift']());}catch(_0x38c13b){_0x10ebb9['push'](_0x10ebb9['shift']());}}}(a29_0x52a0,0xabdc3));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 a29_0x52a0(){const _0x2000d6=['\x20row','verbose','Show\x20table\x20contents','Error:\x20','site','error','message','cause','2325936fhWtqv','489950MKIpXj','✔\x20Retrieved\x20','database','showTable','30yGztca','618675DWgMDx','description','7820351OcOlaZ','table','...','Site:\x20','Catalog:\x20','show','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','7919100gmDilL','args','14aKLSBg','length','30ETAfCT','catalog','79791TNyjiy','473502wEHCNA','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','117UWTOkq','Usage:\x20tdx\x20show\x20<database.table>','4HQNhZr','validate','name','Table:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','\x20from\x20','data','execute'];a29_0x52a0=function(){return _0x2000d6;};return a29_0x52a0();}import{withSpinner}from'../utils/spinner.js';export class ShowCommand extends BaseCommand{[a29_0x4162b1(0xcf)]=a29_0x4162b1(0xea);[a29_0x4162b1(0xe4)]=a29_0x4162b1(0xd7);async[a29_0x4162b1(0xd4)](_0x32e594){const _0x4afef4=a29_0x4162b1;return this[_0x4afef4(0xe1)](_0x32e594);}async[a29_0x4162b1(0xe1)](_0x2535d7){const _0x47b16f=a29_0x4162b1,{options:_0x57b520,args:_0x4e7444,tdx:_0x292c75}=_0x2535d7;let _0x383d53;try{_0x383d53=parseTableReference(_0x4e7444[0x0]);const _0x450373=_0x57b520[_0x47b16f(0xe0)];!_0x383d53[_0x47b16f(0xe0)]&&_0x450373&&(_0x383d53[_0x47b16f(0xe0)]=_0x450373);const _0x1ba9c7=validateTableDescribeReference(_0x383d53);if(_0x1ba9c7)return console[_0x47b16f(0xda)]('Error:\x20'+_0x1ba9c7),console[_0x47b16f(0xda)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x47b16f(0xda)](_0x47b16f(0xd1)),console[_0x47b16f(0xda)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0xea9fbf){return console[_0x47b16f(0xda)](_0x47b16f(0xd8)+_0xea9fbf[_0x47b16f(0xdb)]),console[_0x47b16f(0xda)](_0x47b16f(0xcc)),console[_0x47b16f(0xda)](_0x47b16f(0xd1)),console[_0x47b16f(0xda)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x471d7b=_0x383d53[_0x47b16f(0xc7)],_0x105906=_0x383d53[_0x47b16f(0xe0)],_0x3c2dbe=_0x383d53[_0x47b16f(0xe6)],_0x54e283=_0x57b520['limit'];try{_0x57b520[_0x47b16f(0xd6)]&&(console[_0x47b16f(0xda)](_0x47b16f(0xe8)+_0x57b520[_0x47b16f(0xd9)]),_0x471d7b&&console[_0x47b16f(0xda)](_0x47b16f(0xe9)+_0x471d7b),console[_0x47b16f(0xda)]('Database:\x20'+_0x105906),console[_0x47b16f(0xda)](_0x47b16f(0xd0)+_0x3c2dbe),console[_0x47b16f(0xda)]('Limit:\x20'+_0x54e283));const _0x5ce6fe=_0x471d7b?_0x471d7b+'.'+_0x105906+'.'+_0x3c2dbe:_0x105906+'.'+_0x3c2dbe,_0x4fb5b0=await withSpinner('Querying\x20'+_0x5ce6fe+_0x47b16f(0xe7),()=>_0x292c75[_0x47b16f(0xe6)][_0x47b16f(0xea)](_0x105906,_0x3c2dbe,_0x54e283,_0x471d7b),{'verbose':_0x57b520['verbose']}),_0xa172e1=_0x4fb5b0[_0x47b16f(0xd3)],_0x51808f=_0xa172e1[_0x47b16f(0xd3)];return _0x51808f[_0x47b16f(0xc5)]===0x0?console[_0x47b16f(0xda)](_0x47b16f(0xca)):console[_0x47b16f(0xda)](_0x47b16f(0xdf)+_0x51808f[_0x47b16f(0xc5)]+_0x47b16f(0xd5)+(_0x51808f[_0x47b16f(0xc5)]!==0x1?'s':'')+_0x47b16f(0xd2)+_0x5ce6fe),await handleSDKOutput(_0x51808f,_0x57b520),0x0;}catch(_0x26a6d0){if(_0x26a6d0 instanceof SDKError)return console[_0x47b16f(0xda)]('Error:\x20'+_0x26a6d0['message']),_0x26a6d0[_0x47b16f(0xdc)]&&console[_0x47b16f(0xda)]('\x20\x20Cause:\x20'+_0x26a6d0[_0x47b16f(0xdc)]),0x1;throw _0x26a6d0;}}[a29_0x4162b1(0xce)](_0xd331c7){const _0x572f82=a29_0x4162b1;if(_0xd331c7[_0x572f82(0xc3)][_0x572f82(0xc5)]===0x0)return _0x572f82(0xeb);if(_0xd331c7[_0x572f82(0xc3)][_0x572f82(0xc5)]>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;}}
@@ -1 +1 @@
1
- const a30_0x5e2a56=a30_0x424d;(function(_0x318d62,_0x1accfb){const _0x3f7d72=a30_0x424d,_0x390a1d=_0x318d62();while(!![]){try{const _0x2362a4=-parseInt(_0x3f7d72(0xf0))/0x1*(-parseInt(_0x3f7d72(0x106))/0x2)+-parseInt(_0x3f7d72(0xf2))/0x3*(-parseInt(_0x3f7d72(0xdc))/0x4)+-parseInt(_0x3f7d72(0xd8))/0x5*(parseInt(_0x3f7d72(0xdd))/0x6)+parseInt(_0x3f7d72(0xd7))/0x7*(-parseInt(_0x3f7d72(0xe9))/0x8)+parseInt(_0x3f7d72(0x101))/0x9+parseInt(_0x3f7d72(0xfa))/0xa*(-parseInt(_0x3f7d72(0x108))/0xb)+-parseInt(_0x3f7d72(0xf4))/0xc*(-parseInt(_0x3f7d72(0x10b))/0xd);if(_0x2362a4===_0x1accfb)break;else _0x390a1d['push'](_0x390a1d['shift']());}catch(_0x1a67db){_0x390a1d['push'](_0x390a1d['shift']());}}}(a30_0x47dd,0xaed9c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a30_0x47dd(){const _0xc92794=['name','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','table','Error:\x20Pattern\x20\x27','\x27\x20is\x20ambiguous.','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','1152056OJSXWe','\x27\x20across\x20all\x20databases.','verbose','length','message','Database:\x20','database','606201GtUQxw','Or\x20use\x20--in\x20flag:','2567043TnxRiU','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','2388xUlXaz','tables','Site:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','✔\x20Found\x20','Error:\x20','3992750AMbpfI','Database\x20pattern:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','includes','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','execute','Database:\x20all','5024898UXCZXV','list','data','site','description','2gPzQNB','\x20table','33pSawiE','Database\x20\x27','validate','72475eZqLIf','cause','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','14bGtBUw','356770JszBUK','\x20\x20Cause:\x20','Note:\x20\x27','Listing\x20tables...','4JDIjAc','78jWjimP','error','\x20\x20Use:\x20tdx\x20tables\x20\x22','✖\x20No\x20tables\x20found','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'];a30_0x47dd=function(){return _0xc92794;};return a30_0x47dd();}function a30_0x424d(_0x3e734b,_0x1c4d0b){const _0x47dd61=a30_0x47dd();return a30_0x424d=function(_0x424dd1,_0x50462c){_0x424dd1=_0x424dd1-0xd6;let _0x398ec4=_0x47dd61[_0x424dd1];return _0x398ec4;},a30_0x424d(_0x3e734b,_0x1c4d0b);}import{parseTableReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x5e2a56(0xe3)]=a30_0x5e2a56(0xf5);[a30_0x5e2a56(0x105)]='List\x20tables\x20in\x20a\x20database';async[a30_0x5e2a56(0xff)](_0x16f315){const _0x1eb65d=a30_0x5e2a56,{options:_0x2c8067,args:_0x53af21,tdx:_0x5b6802}=_0x16f315;let _0x4576f4;if(_0x53af21[_0x1eb65d(0xec)]===0x0)_0x4576f4={'database':undefined,'table':undefined,'original':''};else{if(_0x53af21[_0x1eb65d(0xec)]===0x1)try{_0x4576f4=parseTableReference(_0x53af21[0x0]);if(_0x4576f4[_0x1eb65d(0xe5)]&&!_0x4576f4['database']&&!_0x4576f4['table'][_0x1eb65d(0xfd)]('*')&&!_0x4576f4[_0x1eb65d(0xe5)][_0x1eb65d(0xfd)]('?'))return console['error'](_0x1eb65d(0xe6)+_0x53af21[0x0]+_0x1eb65d(0xe7)),console[_0x1eb65d(0xde)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x4576f4['table']+'\x27?'),console[_0x1eb65d(0xde)](_0x1eb65d(0xdf)+_0x4576f4[_0x1eb65d(0xe5)]+'.*\x22'),console[_0x1eb65d(0xde)](_0x1eb65d(0xe1)+_0x4576f4[_0x1eb65d(0xe5)]),console[_0x1eb65d(0xde)](_0x1eb65d(0xe8)+_0x4576f4[_0x1eb65d(0xe5)]),console[_0x1eb65d(0xde)](''),console['error'](_0x1eb65d(0xda)+_0x53af21[0x0]+_0x1eb65d(0xf7)+_0x4576f4[_0x1eb65d(0xe5)]+_0x1eb65d(0xea)),0x1;}catch(_0x5095fa){return console[_0x1eb65d(0xde)]('Error:\x20'+_0x5095fa[_0x1eb65d(0xed)]),0x1;}else return console['error'](_0x1eb65d(0xe4)),console['error'](_0x1eb65d(0xfe)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x1eb65d(0xde)](_0x1eb65d(0xf3)),console[_0x1eb65d(0xde)](_0x1eb65d(0xfc)),console[_0x1eb65d(0xde)](_0x1eb65d(0xf1)),console[_0x1eb65d(0xde)](_0x1eb65d(0xe2)),0x1;}const _0x5e984e=_0x2c8067[_0x1eb65d(0xef)];!_0x4576f4[_0x1eb65d(0xef)]&&_0x5e984e&&(_0x4576f4[_0x1eb65d(0xef)]=_0x5e984e);try{const _0x44c759=_0x393f6d=>_0x393f6d&&(_0x393f6d[_0x1eb65d(0xfd)]('*')||_0x393f6d[_0x1eb65d(0xfd)]('?')),_0x20b1ff=_0x44c759(_0x4576f4[_0x1eb65d(0xef)]);_0x2c8067['verbose']&&(console[_0x1eb65d(0xde)](_0x1eb65d(0xf6)+_0x2c8067[_0x1eb65d(0x104)]),_0x4576f4[_0x1eb65d(0xef)]?_0x20b1ff?console[_0x1eb65d(0xde)](_0x1eb65d(0xfb)+_0x4576f4['database']):console[_0x1eb65d(0xde)](_0x1eb65d(0xee)+_0x4576f4['database']):console[_0x1eb65d(0xde)](_0x1eb65d(0x100)),_0x4576f4[_0x1eb65d(0xe5)]&&console[_0x1eb65d(0xde)]('Table\x20pattern:\x20'+_0x4576f4[_0x1eb65d(0xe5)]));const _0x6cb1f5=_0x4576f4['database']&&!_0x20b1ff?_0x4576f4['database']:undefined,_0x492d63=_0x20b1ff?_0x4576f4['database']:undefined,_0x32a5d6=_0x4576f4[_0x1eb65d(0xe5)],_0x3b79ea=await withSpinner(_0x1eb65d(0xdb),()=>_0x5b6802[_0x1eb65d(0xe5)][_0x1eb65d(0x102)](_0x6cb1f5,_0x32a5d6,_0x492d63),{'verbose':_0x2c8067[_0x1eb65d(0xeb)]}),_0x3c2c65=_0x3b79ea[_0x1eb65d(0x103)];if(_0x3c2c65['length']===0x0&&_0x4576f4[_0x1eb65d(0xef)]&&!_0x20b1ff)return console[_0x1eb65d(0xde)](_0x1eb65d(0xe0)),console[_0x1eb65d(0xde)](_0x1eb65d(0x109)+_0x4576f4['database']+_0x1eb65d(0xd6)),0x1;return console[_0x1eb65d(0xde)](_0x1eb65d(0xf8)+_0x3c2c65[_0x1eb65d(0xec)]+_0x1eb65d(0x107)+(_0x3c2c65[_0x1eb65d(0xec)]!==0x1?'s':'')),await handleSDKOutput(_0x3c2c65,_0x2c8067),0x0;}catch(_0x3fa4ba){if(_0x3fa4ba instanceof SDKError)return console[_0x1eb65d(0xde)](_0x1eb65d(0xf9)+_0x3fa4ba[_0x1eb65d(0xed)]),_0x3fa4ba[_0x1eb65d(0x10c)]&&console[_0x1eb65d(0xde)](_0x1eb65d(0xd9)+_0x3fa4ba[_0x1eb65d(0x10c)]),0x1;throw _0x3fa4ba;}}[a30_0x5e2a56(0x10a)](_0x222dab){return undefined;}}
1
+ const a30_0x28aa27=a30_0x37ab;(function(_0x177102,_0x8c15d1){const _0x239dbb=a30_0x37ab,_0x1da8e1=_0x177102();while(!![]){try{const _0x3ad1d1=-parseInt(_0x239dbb(0x165))/0x1+-parseInt(_0x239dbb(0x15d))/0x2*(-parseInt(_0x239dbb(0x16c))/0x3)+parseInt(_0x239dbb(0x173))/0x4*(parseInt(_0x239dbb(0x174))/0x5)+-parseInt(_0x239dbb(0x163))/0x6+parseInt(_0x239dbb(0x162))/0x7*(parseInt(_0x239dbb(0x161))/0x8)+-parseInt(_0x239dbb(0x169))/0x9+parseInt(_0x239dbb(0x166))/0xa;if(_0x3ad1d1===_0x8c15d1)break;else _0x1da8e1['push'](_0x1da8e1['shift']());}catch(_0x45227a){_0x1da8e1['push'](_0x1da8e1['shift']());}}}(a30_0x70c7,0xd07ec));function a30_0x37ab(_0x3eb59b,_0x168a96){const _0x70c72a=a30_0x70c7();return a30_0x37ab=function(_0x37abcf,_0x254e5e){_0x37abcf=_0x37abcf-0x15d;let _0x4d6b2a=_0x70c72a[_0x37abcf];return _0x4d6b2a;},a30_0x37ab(_0x3eb59b,_0x168a96);}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a30_0x70c7(){const _0x134223=['✖\x20No\x20tables\x20found','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','✔\x20Found\x20','190XISpzi','\x20\x20Cause:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','tables','40QsHHEV','2180969GsXxwh','2043894wsXxfc','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','1386452xvsixQ','12053250TamZib','validate','\x20\x20Use:\x20tdx\x20tables\x20\x22','14261535tFfMeb','list','.*\x22','35835JWMSGp','\x27\x20across\x20all\x20databases.','table','\x20table','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Database\x20\x27','error','12RqYLOb','446295OmKslc','Database\x20pattern:\x20','Error:\x20','execute','message','database','length','site','Error:\x20Pattern\x20\x27','name','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Or\x20use\x20--in\x20flag:','verbose','includes','description','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'];a30_0x70c7=function(){return _0x134223;};return a30_0x70c7();}export class TablesCommand extends BaseCommand{[a30_0x28aa27(0x17d)]=a30_0x28aa27(0x160);[a30_0x28aa27(0x182)]='List\x20tables\x20in\x20a\x20database';async[a30_0x28aa27(0x177)](_0xdc8b09){const _0x1818d3=a30_0x28aa27,{options:_0x1f9fd3,args:_0x28c8c1,tdx:_0x29dca4}=_0xdc8b09;let _0x23bd49;if(_0x28c8c1[_0x1818d3(0x17a)]===0x0)_0x23bd49={'database':undefined,'table':undefined,'original':''};else{if(_0x28c8c1['length']===0x1)try{_0x23bd49=parseTableReference(_0x28c8c1[0x0]);if(_0x23bd49[_0x1818d3(0x16e)]&&!_0x23bd49['database']&&!_0x23bd49[_0x1818d3(0x16e)][_0x1818d3(0x181)]('*')&&!_0x23bd49[_0x1818d3(0x16e)][_0x1818d3(0x181)]('?'))return console[_0x1818d3(0x172)](_0x1818d3(0x17c)+_0x28c8c1[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x1818d3(0x172)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x23bd49['table']+'\x27?'),console['error'](_0x1818d3(0x168)+_0x23bd49[_0x1818d3(0x16e)]+_0x1818d3(0x16b)),console[_0x1818d3(0x172)](_0x1818d3(0x184)+_0x23bd49[_0x1818d3(0x16e)]),console[_0x1818d3(0x172)](_0x1818d3(0x17e)+_0x23bd49['table']),console[_0x1818d3(0x172)](''),console[_0x1818d3(0x172)]('Note:\x20\x27'+_0x28c8c1[0x0]+_0x1818d3(0x186)+_0x23bd49[_0x1818d3(0x16e)]+_0x1818d3(0x16d)),0x1;}catch(_0xbd64e3){return console[_0x1818d3(0x172)]('Error:\x20'+_0xbd64e3[_0x1818d3(0x178)]),0x1;}else return console[_0x1818d3(0x172)](_0x1818d3(0x164)),console[_0x1818d3(0x172)](_0x1818d3(0x183)),console[_0x1818d3(0x172)]('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x1818d3(0x172)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console['error'](_0x1818d3(0x15f)),console['error'](_0x1818d3(0x17f)),console[_0x1818d3(0x172)](_0x1818d3(0x170)),0x1;}const _0x18793c=_0x1f9fd3[_0x1818d3(0x179)];!_0x23bd49[_0x1818d3(0x179)]&&_0x18793c&&(_0x23bd49[_0x1818d3(0x179)]=_0x18793c);try{const _0x51aaba=_0x11156e=>_0x11156e&&(_0x11156e['includes']('*')||_0x11156e[_0x1818d3(0x181)]('?')),_0x926b5a=_0x51aaba(_0x23bd49['database']);_0x1f9fd3[_0x1818d3(0x180)]&&(console[_0x1818d3(0x172)]('Site:\x20'+_0x1f9fd3[_0x1818d3(0x17b)]),_0x23bd49[_0x1818d3(0x179)]?_0x926b5a?console[_0x1818d3(0x172)](_0x1818d3(0x175)+_0x23bd49[_0x1818d3(0x179)]):console[_0x1818d3(0x172)]('Database:\x20'+_0x23bd49[_0x1818d3(0x179)]):console['error']('Database:\x20all'),_0x23bd49['table']&&console[_0x1818d3(0x172)]('Table\x20pattern:\x20'+_0x23bd49[_0x1818d3(0x16e)]));const _0x476521=_0x23bd49[_0x1818d3(0x179)]&&!_0x926b5a?_0x23bd49[_0x1818d3(0x179)]:undefined,_0x482a09=_0x926b5a?_0x23bd49[_0x1818d3(0x179)]:undefined,_0x3e53eb=_0x23bd49[_0x1818d3(0x16e)],_0x175e1e=await withSpinner('Listing\x20tables...',()=>_0x29dca4['table'][_0x1818d3(0x16a)](_0x476521,_0x3e53eb,_0x482a09),{'verbose':_0x1f9fd3[_0x1818d3(0x180)]}),_0x4de6ab=_0x175e1e['data'];if(_0x4de6ab[_0x1818d3(0x17a)]===0x0&&_0x23bd49[_0x1818d3(0x179)]&&!_0x926b5a)return console[_0x1818d3(0x172)](_0x1818d3(0x185)),console[_0x1818d3(0x172)](_0x1818d3(0x171)+_0x23bd49[_0x1818d3(0x179)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x1818d3(0x172)](_0x1818d3(0x187)+_0x4de6ab[_0x1818d3(0x17a)]+_0x1818d3(0x16f)+(_0x4de6ab[_0x1818d3(0x17a)]!==0x1?'s':'')),await handleSDKOutput(_0x4de6ab,_0x1f9fd3),0x0;}catch(_0x3d85db){if(_0x3d85db instanceof SDKError)return console[_0x1818d3(0x172)](_0x1818d3(0x176)+_0x3d85db[_0x1818d3(0x178)]),_0x3d85db['cause']&&console['error'](_0x1818d3(0x15e)+_0x3d85db['cause']),0x1;throw _0x3d85db;}}[a30_0x28aa27(0x167)](_0x227976){return undefined;}}
@@ -1 +1 @@
1
- function a31_0x1721(_0x3ce16a,_0x1d4c6b){const _0xe38504=a31_0xe385();return a31_0x1721=function(_0x172102,_0x2aa969){_0x172102=_0x172102-0x14c;let _0x1c8ad4=_0xe38504[_0x172102];return _0x1c8ad4;},a31_0x1721(_0x3ce16a,_0x1d4c6b);}const a31_0x3d0a2e=a31_0x1721;(function(_0x33c59e,_0x508e3a){const _0x42ca3b=a31_0x1721,_0x529809=_0x33c59e();while(!![]){try{const _0x543ba=-parseInt(_0x42ca3b(0x14d))/0x1+parseInt(_0x42ca3b(0x159))/0x2+-parseInt(_0x42ca3b(0x14e))/0x3+-parseInt(_0x42ca3b(0x15e))/0x4*(-parseInt(_0x42ca3b(0x16b))/0x5)+parseInt(_0x42ca3b(0x161))/0x6+parseInt(_0x42ca3b(0x154))/0x7*(parseInt(_0x42ca3b(0x14c))/0x8)+parseInt(_0x42ca3b(0x153))/0x9*(-parseInt(_0x42ca3b(0x164))/0xa);if(_0x543ba===_0x508e3a)break;else _0x529809['push'](_0x529809['shift']());}catch(_0x12d5d6){_0x529809['push'](_0x529809['shift']());}}}(a31_0xe385,0xd9483));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';function a31_0xe385(){const _0x12d837=['\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','log','31044yVIBwr','Session\x20database\x20set\x20to:\x20','validate','5344692wGjInQ','name','length','6927380KjbEJB','database','join','Invalid\x20resource:\x20','llm_project','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','includes','395GQJvxv','session','use','\x27\x20does\x20not\x20exist','Error:\x20','description','toString','\x20(session:\x20','8ARYOUC','1284699eXgkfj','3414780FAJZhG','.\x20Must\x20be\x20one\x20of:\x20','execute','error','message','9VTReSU','9161579ygoVeO','profile','Set\x20session-level\x20context','Error:\x20Profile\x20\x27','parent_segment','2385972snbyRF','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'];a31_0xe385=function(){return _0x12d837;};return a31_0xe385();}import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x3d0a2e(0x162)]=a31_0x3d0a2e(0x16d);[a31_0x3d0a2e(0x170)]=a31_0x3d0a2e(0x156);[a31_0x3d0a2e(0x160)](_0x2c95bc){const _0x5e2afe=a31_0x3d0a2e,{args:_0x174992}=_0x2c95bc;if(_0x174992[_0x5e2afe(0x163)]<0x2)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x5e2afe(0x15a)+_0x5e2afe(0x15c);const _0x5d0394=_0x174992[0x0],_0x3f3e9b=[_0x5e2afe(0x165),_0x5e2afe(0x158),_0x5e2afe(0x168),_0x5e2afe(0x155)];if(!_0x3f3e9b[_0x5e2afe(0x16a)](_0x5d0394))return _0x5e2afe(0x167)+_0x5d0394+_0x5e2afe(0x14f)+_0x3f3e9b[_0x5e2afe(0x166)](',\x20');return undefined;}async[a31_0x3d0a2e(0x150)](_0x25c628){const _0xa799e8=a31_0x3d0a2e,{args:_0x2470cc,options:_0x417dfb}=_0x25c628;try{const _0x2b1275=_0x2470cc[0x0],_0xaabab3=_0x2470cc[0x1];if(_0x2b1275==='profile'){if(!profileExists(_0xaabab3))return console['error'](_0xa799e8(0x157)+_0xaabab3+_0xa799e8(0x16e)),console[_0xa799e8(0x151)](_0xa799e8(0x15b)),0x1;const _0x34b1be=_0x417dfb[_0xa799e8(0x16c)]||getCurrentSessionPID()[_0xa799e8(0x171)]();return saveSessionContext({'profile':_0xaabab3},_0x417dfb[_0xa799e8(0x16c)]),console[_0xa799e8(0x15d)]('Session\x20profile\x20set\x20to:\x20'+_0xaabab3+_0xa799e8(0x172)+_0x34b1be+')'),console[_0xa799e8(0x15d)](_0xa799e8(0x169)),0x0;}const _0x52565e={},_0xe178c6=_0x417dfb['session']||getCurrentSessionPID()['toString']();switch(_0x2b1275){case'database':_0x52565e[_0xa799e8(0x165)]=_0xaabab3,console[_0xa799e8(0x15d)](_0xa799e8(0x15f)+_0xaabab3+_0xa799e8(0x172)+_0xe178c6+')');break;case _0xa799e8(0x158):_0x52565e[_0xa799e8(0x158)]=_0xaabab3,console['log']('Session\x20parent_segment\x20set\x20to:\x20'+_0xaabab3+_0xa799e8(0x172)+_0xe178c6+')');break;case'llm_project':_0x52565e['llm_project']=_0xaabab3,console[_0xa799e8(0x15d)]('Session\x20llm_project\x20set\x20to:\x20'+_0xaabab3+_0xa799e8(0x172)+_0xe178c6+')');break;}return saveSessionContext(_0x52565e,_0x417dfb[_0xa799e8(0x16c)]),console[_0xa799e8(0x15d)](_0xa799e8(0x169)),0x0;}catch(_0x4f8c18){return _0x4f8c18 instanceof Error&&console[_0xa799e8(0x151)](_0xa799e8(0x16f)+_0x4f8c18[_0xa799e8(0x152)]),0x1;}}}
1
+ function a31_0x583f(_0x331f96,_0x8cf5e){const _0x7b06f2=a31_0x7b06();return a31_0x583f=function(_0x583f5e,_0x498591){_0x583f5e=_0x583f5e-0x1a9;let _0x4c9617=_0x7b06f2[_0x583f5e];return _0x4c9617;},a31_0x583f(_0x331f96,_0x8cf5e);}const a31_0x1c82eb=a31_0x583f;(function(_0x25de69,_0x348e37){const _0x5aa95f=a31_0x583f,_0x590f31=_0x25de69();while(!![]){try{const _0x33f473=parseInt(_0x5aa95f(0x1c3))/0x1+-parseInt(_0x5aa95f(0x1c8))/0x2+parseInt(_0x5aa95f(0x1af))/0x3*(parseInt(_0x5aa95f(0x1c5))/0x4)+parseInt(_0x5aa95f(0x1ab))/0x5*(parseInt(_0x5aa95f(0x1a9))/0x6)+-parseInt(_0x5aa95f(0x1b1))/0x7+-parseInt(_0x5aa95f(0x1be))/0x8+parseInt(_0x5aa95f(0x1b2))/0x9;if(_0x33f473===_0x348e37)break;else _0x590f31['push'](_0x590f31['shift']());}catch(_0x2df7da){_0x590f31['push'](_0x590f31['shift']());}}}(a31_0x7b06,0xa79fd));import{BaseCommand}from'./command.js';function a31_0x7b06(){const _0x70414f=['description','profile','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','.\x20Must\x20be\x20one\x20of:\x20','llm_project','session','\x20(session:\x20','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x27\x20does\x20not\x20exist','join','log','4266608sFNRCp','Session\x20llm_project\x20set\x20to:\x20','toString','Session\x20profile\x20set\x20to:\x20','name','713426hzMUAL','parent_segment','1583480IzCixv','Set\x20session-level\x20context','Session\x20database\x20set\x20to:\x20','1072792XNwJwW','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','validate','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Invalid\x20resource:\x20','3318744JIAZnW','Session\x20parent_segment\x20set\x20to:\x20','10OLroHB','use','database','error','3uFQijP','execute','7180446QBTKSW','5098905gDmjHy'];a31_0x7b06=function(){return _0x70414f;};return a31_0x7b06();}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x1c82eb(0x1c2)]=a31_0x1c82eb(0x1ac);[a31_0x1c82eb(0x1b3)]=a31_0x1c82eb(0x1c6);[a31_0x1c82eb(0x1ca)](_0x5a50e0){const _0x1d5406=a31_0x1c82eb,{args:_0x30428e}=_0x5a50e0;if(_0x30428e['length']<0x2)return _0x1d5406(0x1b5)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x1d5406(0x1cb)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x388efb=_0x30428e[0x0],_0x1bf524=[_0x1d5406(0x1ad),_0x1d5406(0x1c4),_0x1d5406(0x1b7),_0x1d5406(0x1b4)];if(!_0x1bf524['includes'](_0x388efb))return _0x1d5406(0x1cc)+_0x388efb+_0x1d5406(0x1b6)+_0x1bf524[_0x1d5406(0x1bc)](',\x20');return undefined;}async[a31_0x1c82eb(0x1b0)](_0x3ae843){const _0x5d0320=a31_0x1c82eb,{args:_0x6f7bd5,options:_0x140e90}=_0x3ae843;try{const _0x4439e8=_0x6f7bd5[0x0],_0x1e0aa4=_0x6f7bd5[0x1];if(_0x4439e8===_0x5d0320(0x1b4)){if(!profileExists(_0x1e0aa4))return console[_0x5d0320(0x1ae)]('Error:\x20Profile\x20\x27'+_0x1e0aa4+_0x5d0320(0x1bb)),console['error'](_0x5d0320(0x1c9)),0x1;const _0x549967=_0x140e90[_0x5d0320(0x1b8)]||getCurrentSessionPID()[_0x5d0320(0x1c0)]();return saveSessionContext({'profile':_0x1e0aa4},_0x140e90['session']),console[_0x5d0320(0x1bd)](_0x5d0320(0x1c1)+_0x1e0aa4+_0x5d0320(0x1b9)+_0x549967+')'),console['log'](_0x5d0320(0x1ba)),0x0;}const _0x409b07={},_0x5d16ec=_0x140e90[_0x5d0320(0x1b8)]||getCurrentSessionPID()['toString']();switch(_0x4439e8){case _0x5d0320(0x1ad):_0x409b07[_0x5d0320(0x1ad)]=_0x1e0aa4,console['log'](_0x5d0320(0x1c7)+_0x1e0aa4+_0x5d0320(0x1b9)+_0x5d16ec+')');break;case _0x5d0320(0x1c4):_0x409b07['parent_segment']=_0x1e0aa4,console[_0x5d0320(0x1bd)](_0x5d0320(0x1aa)+_0x1e0aa4+_0x5d0320(0x1b9)+_0x5d16ec+')');break;case _0x5d0320(0x1b7):_0x409b07[_0x5d0320(0x1b7)]=_0x1e0aa4,console[_0x5d0320(0x1bd)](_0x5d0320(0x1bf)+_0x1e0aa4+_0x5d0320(0x1b9)+_0x5d16ec+')');break;}return saveSessionContext(_0x409b07,_0x140e90['session']),console['log'](_0x5d0320(0x1ba)),0x0;}catch(_0x34d10f){return _0x34d10f instanceof Error&&console[_0x5d0320(0x1ae)]('Error:\x20'+_0x34d10f['message']),0x1;}}}
@@ -1 +1 @@
1
- const a32_0x1d683a=a32_0x453f;function a32_0x453f(_0x2174ae,_0x53c72c){const _0x4c65dc=a32_0x4c65();return a32_0x453f=function(_0x453f3b,_0x3d2202){_0x453f3b=_0x453f3b-0x1d1;let _0x32ce42=_0x4c65dc[_0x453f3b];return _0x32ce42;},a32_0x453f(_0x2174ae,_0x53c72c);}(function(_0x4e4227,_0x41a6b5){const _0x17603f=a32_0x453f,_0x42aa87=_0x4e4227();while(!![]){try{const _0x3b3199=-parseInt(_0x17603f(0x20c))/0x1*(-parseInt(_0x17603f(0x1d1))/0x2)+parseInt(_0x17603f(0x243))/0x3+parseInt(_0x17603f(0x1f3))/0x4*(parseInt(_0x17603f(0x1d6))/0x5)+-parseInt(_0x17603f(0x21a))/0x6*(-parseInt(_0x17603f(0x1d5))/0x7)+-parseInt(_0x17603f(0x20d))/0x8*(-parseInt(_0x17603f(0x231))/0x9)+-parseInt(_0x17603f(0x235))/0xa+-parseInt(_0x17603f(0x203))/0xb*(parseInt(_0x17603f(0x1e4))/0xc);if(_0x3b3199===_0x41a6b5)break;else _0x42aa87['push'](_0x42aa87['shift']());}catch(_0x146f48){_0x42aa87['push'](_0x42aa87['shift']());}}}(a32_0x4c65,0x9ed01));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{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0x1d683a(0x242)]='workflow:projects';[a32_0x1d683a(0x244)]=a32_0x1d683a(0x1dd);async[a32_0x1d683a(0x23c)](_0xb295c7){const _0x2e921d=a32_0x1d683a,{options:_0x35b80b,args:_0x90cc5b,tdx:_0x2c40d}=_0xb295c7,_0x29de17=_0x90cc5b[0x0];try{_0x35b80b[_0x2e921d(0x1e3)]&&_0x29de17&&console[_0x2e921d(0x220)]('Pattern:\x20'+_0x29de17);const _0x2d0ffd=await withSpinner(_0x2e921d(0x1d7),()=>_0x2c40d[_0x2e921d(0x227)][_0x2e921d(0x216)](_0x29de17,{'limit':_0x35b80b[_0x2e921d(0x1f2)]}),{'verbose':_0x35b80b[_0x2e921d(0x1e3)]}),_0x21a2bc=_0x2d0ffd['data'];return console[_0x2e921d(0x220)]('✔\x20Found\x20'+_0x21a2bc[_0x2e921d(0x1e2)]+_0x2e921d(0x1f0)+(_0x21a2bc[_0x2e921d(0x1e2)]!==0x1?'s':'')),await handleSDKOutput(_0x21a2bc,_0x35b80b),0x0;}catch(_0x2eb68d){if(_0x2eb68d instanceof SDKError)return console[_0x2e921d(0x220)](_0x2e921d(0x20f)+_0x2eb68d[_0x2e921d(0x223)]),_0x2eb68d['cause']&&console['error'](_0x2e921d(0x1df)+_0x2eb68d['cause']),0x1;throw _0x2eb68d;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']='workflow:workflows';[a32_0x1d683a(0x244)]='List\x20workflows';async[a32_0x1d683a(0x23c)](_0x7d1624){const _0x11c2b1=a32_0x1d683a,{options:_0x13811e,args:_0x5bcf1b,tdx:_0x3e079f}=_0x7d1624,_0x32193d=_0x5bcf1b[0x0];try{_0x13811e[_0x11c2b1(0x1e3)]&&_0x32193d&&console['error'](_0x11c2b1(0x1d3)+_0x32193d);const _0x177288=await withSpinner(_0x11c2b1(0x211),()=>_0x3e079f['workflow'][_0x11c2b1(0x236)](_0x32193d,{'limit':_0x13811e[_0x11c2b1(0x1f2)]}),{'verbose':_0x13811e[_0x11c2b1(0x1e3)]}),_0x5386dc=_0x177288[_0x11c2b1(0x1d9)];return console[_0x11c2b1(0x220)]('✔\x20Found\x20'+_0x5386dc[_0x11c2b1(0x1e2)]+_0x11c2b1(0x1ed)+(_0x5386dc['length']!==0x1?'s':'')),await handleSDKOutput(_0x5386dc,_0x13811e),0x0;}catch(_0x22f3fa){if(_0x22f3fa instanceof SDKError)return console[_0x11c2b1(0x220)]('Error:\x20'+_0x22f3fa[_0x11c2b1(0x223)]),_0x22f3fa[_0x11c2b1(0x1f6)]&&console[_0x11c2b1(0x220)](_0x11c2b1(0x1df)+_0x22f3fa[_0x11c2b1(0x1f6)]),0x1;throw _0x22f3fa;}}}export class WorkflowSessionsCommand extends BaseCommand{[a32_0x1d683a(0x242)]=a32_0x1d683a(0x217);[a32_0x1d683a(0x244)]='List\x20workflow\x20execution\x20sessions';async[a32_0x1d683a(0x23c)](_0x1d0991){const _0x20950c=a32_0x1d683a,{options:_0x562271,args:_0x7f8c92,tdx:_0x21ceb9}=_0x1d0991;let _0x4cd9a9,_0x56a864;if(_0x7f8c92[0x0]){const _0x29b09e=_0x7f8c92[0x0][_0x20950c(0x21c)]('.');if(_0x29b09e['length']===0x1)_0x4cd9a9=_0x29b09e[0x0];else{if(_0x29b09e[_0x20950c(0x1e2)]===0x2)[_0x4cd9a9,_0x56a864]=_0x29b09e;else return console['error'](_0x20950c(0x248)),0x1;}}try{if(_0x562271[_0x20950c(0x1e3)]){if(_0x4cd9a9&&_0x56a864)console[_0x20950c(0x220)](_0x20950c(0x23f)+_0x4cd9a9+'.'+_0x56a864);else _0x4cd9a9&&console[_0x20950c(0x220)](_0x20950c(0x224)+_0x4cd9a9);const _0x159c8a=_0x562271[_0x20950c(0x1f5)];_0x159c8a&&console[_0x20950c(0x220)](_0x20950c(0x21f)+_0x159c8a);}const _0x33d68d=await withSpinner(_0x20950c(0x249),()=>_0x21ceb9['workflow']['sessions']({'projectName':_0x4cd9a9,'workflowName':_0x56a864,'status':_0x562271['status'],'fromTime':_0x562271[_0x20950c(0x1f8)],'toTime':_0x562271['to'],'limit':_0x562271['limit']}),{'verbose':_0x562271['verbose']}),_0x311a02=_0x33d68d[_0x20950c(0x1d9)];return console[_0x20950c(0x220)](_0x20950c(0x1ec)+_0x311a02[_0x20950c(0x1e2)]+'\x20session'+(_0x311a02[_0x20950c(0x1e2)]!==0x1?'s':'')),await handleSDKOutput(_0x311a02,_0x562271),0x0;}catch(_0x4c8683){if(_0x4c8683 instanceof SDKError)return console[_0x20950c(0x220)](_0x20950c(0x20f)+_0x4c8683['message']),_0x4c8683['cause']&&console['error'](_0x20950c(0x1df)+_0x4c8683[_0x20950c(0x1f6)]),0x1;throw _0x4c8683;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x1d683a(0x242)]=a32_0x1d683a(0x22a);[a32_0x1d683a(0x244)]=a32_0x1d683a(0x201);async[a32_0x1d683a(0x23c)](_0x173491){const _0x571b8e=a32_0x1d683a,{options:_0x184af7,args:_0x50adf0,tdx:_0xb58681}=_0x173491;let _0x5680ea,_0xb1a261;if(_0x50adf0[0x0]){const _0x56d63a=_0x50adf0[0x0][_0x571b8e(0x21c)]('.');if(_0x56d63a[_0x571b8e(0x1e2)]===0x1)_0x5680ea=_0x56d63a[0x0];else{if(_0x56d63a['length']===0x2)[_0x5680ea,_0xb1a261]=_0x56d63a;else return console[_0x571b8e(0x220)](_0x571b8e(0x248)),0x1;}}try{const _0x3fc716=_0x184af7[_0x571b8e(0x1ff)];if(_0x184af7[_0x571b8e(0x1e3)]){if(_0x5680ea&&_0xb1a261)console[_0x571b8e(0x220)](_0x571b8e(0x23f)+_0x5680ea+'.'+_0xb1a261);else _0x5680ea&&console[_0x571b8e(0x220)](_0x571b8e(0x224)+_0x5680ea);_0x3fc716&&console[_0x571b8e(0x220)]('Include\x20retried:\x20yes');}const _0x119b12=await withSpinner(_0x571b8e(0x20e),()=>_0xb58681[_0x571b8e(0x227)][_0x571b8e(0x212)]({'projectName':_0x5680ea,'workflowName':_0xb1a261,'includeRetried':_0x3fc716,'limit':_0x184af7[_0x571b8e(0x1f2)]}),{'verbose':_0x184af7[_0x571b8e(0x1e3)]}),_0x3b6cf6=_0x119b12['data'];return console['error'](_0x571b8e(0x1ec)+_0x3b6cf6[_0x571b8e(0x1e2)]+_0x571b8e(0x1e6)+(_0x3b6cf6[_0x571b8e(0x1e2)]!==0x1?'s':'')),await handleSDKOutput(_0x3b6cf6,_0x184af7),0x0;}catch(_0x5f5682){if(_0x5f5682 instanceof SDKError)return console['error'](_0x571b8e(0x20f)+_0x5f5682['message']),_0x5f5682['cause']&&console['error'](_0x571b8e(0x1df)+_0x5f5682[_0x571b8e(0x1f6)]),0x1;throw _0x5f5682;}}}export class WorkflowAttemptCommand extends BaseCommand{[a32_0x1d683a(0x242)]='workflow:attempt';['description']=a32_0x1d683a(0x24d);async[a32_0x1d683a(0x23c)](_0x2c2147){const _0x40d79a=a32_0x1d683a,{options:_0x3a5ada,args:_0x17f60a,tdx:_0x1ffa2d}=_0x2c2147,_0x441e18=_0x17f60a[0x0];if(!_0x441e18)return console['error'](_0x40d79a(0x1e8)),0x1;try{_0x3a5ada['verbose']&&console['error'](_0x40d79a(0x241)+_0x441e18);const _0x1165e9=await withSpinner('Getting\x20attempt\x20details...',()=>_0x1ffa2d[_0x40d79a(0x227)][_0x40d79a(0x1d2)](_0x441e18),{'verbose':_0x3a5ada[_0x40d79a(0x1e3)]}),_0x5a3703=_0x1165e9[_0x40d79a(0x1d9)];return await handleSDKOutput([_0x5a3703],_0x3a5ada),0x0;}catch(_0x5c54d2){if(_0x5c54d2 instanceof SDKError)return console[_0x40d79a(0x220)](_0x40d79a(0x20f)+_0x5c54d2['message']),_0x5c54d2[_0x40d79a(0x1f6)]&&console[_0x40d79a(0x220)](_0x40d79a(0x1df)+_0x5c54d2[_0x40d79a(0x1f6)]),0x1;throw _0x5c54d2;}}}export class WorkflowTasksCommand extends BaseCommand{['name']=a32_0x1d683a(0x24c);[a32_0x1d683a(0x244)]=a32_0x1d683a(0x225);async[a32_0x1d683a(0x23c)](_0x42c0c6){const _0x23d57a=a32_0x1d683a,{options:_0x1673bc,args:_0x359baa,tdx:_0x1886d6}=_0x42c0c6,_0x9b5a70=_0x359baa[0x0];if(!_0x9b5a70)return console[_0x23d57a(0x220)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x383ca1=_0x1673bc[_0x23d57a(0x221)];_0x1673bc[_0x23d57a(0x1e3)]&&(console['error']('Attempt\x20ID:\x20'+_0x9b5a70),_0x383ca1&&console['error'](_0x23d57a(0x1e7)));const _0x13e538=await withSpinner(_0x23d57a(0x219),()=>_0x1886d6[_0x23d57a(0x227)]['tasks'](_0x9b5a70,_0x383ca1||![]),{'verbose':_0x1673bc['verbose']}),_0x1163e7=_0x13e538[_0x23d57a(0x1d9)];return console[_0x23d57a(0x220)](_0x23d57a(0x1ec)+_0x1163e7[_0x23d57a(0x1e2)]+'\x20task'+(_0x1163e7[_0x23d57a(0x1e2)]!==0x1?'s':'')),await handleSDKOutput(_0x1163e7,_0x1673bc),0x0;}catch(_0x2dd345){if(_0x2dd345 instanceof SDKError)return console[_0x23d57a(0x220)](_0x23d57a(0x20f)+_0x2dd345['message']),_0x2dd345[_0x23d57a(0x1f6)]&&console['error']('\x20\x20Cause:\x20'+_0x2dd345[_0x23d57a(0x1f6)]),0x1;throw _0x2dd345;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0x1d683a(0x242)]=a32_0x1d683a(0x232);[a32_0x1d683a(0x244)]='Show\x20logs\x20for\x20a\x20specific\x20task';async['execute'](_0x27ed65){const _0x3b8f46=a32_0x1d683a,{options:_0x2b7dfb,args:_0x287b26,tdx:_0x3dae73}=_0x27ed65,_0x464ec2=_0x287b26[0x0],_0x4106da=_0x287b26[0x1];if(!_0x464ec2||!_0x4106da)return console['error']('Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required'),0x1;try{_0x2b7dfb[_0x3b8f46(0x1e3)]&&(console[_0x3b8f46(0x220)]('Attempt\x20ID:\x20'+_0x464ec2),console['error'](_0x3b8f46(0x1ea)+_0x4106da));const _0x2a737c=_0x2b7dfb[_0x3b8f46(0x20b)],_0x286e39=await withSpinner('Getting\x20task\x20logs...',()=>_0x3dae73['workflow'][_0x3b8f46(0x208)](_0x464ec2,_0x4106da,{'offset':_0x2a737c,'limit':_0x2b7dfb[_0x3b8f46(0x1f2)]}),{'verbose':_0x2b7dfb['verbose']}),_0x1a192f=_0x286e39['data'];return console[_0x3b8f46(0x220)]('✔\x20Found\x20'+_0x1a192f[_0x3b8f46(0x1e2)]+_0x3b8f46(0x1e0)+(_0x1a192f['length']!==0x1?'ies':'y')),await handleSDKOutput(_0x1a192f,_0x2b7dfb),0x0;}catch(_0x290813){if(_0x290813 instanceof SDKError)return console['error'](_0x3b8f46(0x20f)+_0x290813[_0x3b8f46(0x223)]),_0x290813[_0x3b8f46(0x1f6)]&&console[_0x3b8f46(0x220)](_0x3b8f46(0x1df)+_0x290813['cause']),0x1;throw _0x290813;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x1d683a(0x242)]=a32_0x1d683a(0x23d);[a32_0x1d683a(0x244)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x119564){const _0x265bdd=a32_0x1d683a,{options:_0xf59173,args:_0x57645c,tdx:_0x1ec766}=_0x119564,_0x3eaee6=_0x57645c[0x0];if(!_0x3eaee6)return console[_0x265bdd(0x220)](_0x265bdd(0x1e8)),0x1;try{const _0x27663f=_0xf59173[_0x265bdd(0x230)];_0xf59173[_0x265bdd(0x1e3)]&&(console[_0x265bdd(0x220)](_0x265bdd(0x241)+_0x3eaee6),_0x27663f&&console['error'](_0x265bdd(0x1d4)+_0x27663f));if(!_0xf59173['yes']){const _0x46b5fd=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x3eaee6+'?');if(!_0x46b5fd)return console[_0x265bdd(0x220)](_0x265bdd(0x22c)),0x0;}const _0x19b415=await withSpinner('Killing\x20attempt...',()=>_0x1ec766[_0x265bdd(0x227)]['kill'](_0x3eaee6,_0x27663f),{'verbose':_0xf59173[_0x265bdd(0x1e3)]}),_0x5c245b=_0x19b415[_0x265bdd(0x1d9)];return console[_0x265bdd(0x220)]('✔\x20'+_0x5c245b),0x0;}catch(_0x54d4a5){if(_0x54d4a5 instanceof SDKError)return console['error'](_0x265bdd(0x20f)+_0x54d4a5[_0x265bdd(0x223)]),_0x54d4a5[_0x265bdd(0x1f6)]&&console[_0x265bdd(0x220)](_0x265bdd(0x1df)+_0x54d4a5[_0x265bdd(0x1f6)]),0x1;throw _0x54d4a5;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x1d683a(0x242)]=a32_0x1d683a(0x210);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a32_0x1d683a(0x23c)](_0x3d6476){const _0x535a9e=a32_0x1d683a,{options:_0x4bcf1a,args:_0x4e6285,tdx:_0x4ad7d4}=_0x3d6476,_0x3c8506=_0x4e6285[0x0];if(!_0x3c8506)return console['error'](_0x535a9e(0x218)),console[_0x535a9e(0x220)](_0x535a9e(0x246)),0x1;let _0x5d82b6=![],_0x12dd8f=_0x3c8506;if(_0x3c8506[_0x535a9e(0x22b)](_0x535a9e(0x1fb)))_0x5d82b6=!![],_0x12dd8f=_0x3c8506[_0x535a9e(0x1e5)](0x8);else{if(_0x3c8506[_0x535a9e(0x22b)](_0x535a9e(0x1fa)))_0x5d82b6=![],_0x12dd8f=_0x3c8506[_0x535a9e(0x1e5)](0x8);else return console[_0x535a9e(0x220)](_0x535a9e(0x240)),console['error'](_0x535a9e(0x246)),0x1;}try{const _0x39a0f9=_0x4bcf1a[_0x535a9e(0x1f4)],_0x58458d=_0x4bcf1a[_0x535a9e(0x239)],_0x5405e4=_0x4bcf1a[_0x535a9e(0x204)],_0x4fbbf9=_0x4bcf1a['force'];_0x4bcf1a[_0x535a9e(0x1e3)]&&(console[_0x535a9e(0x220)](_0x535a9e(0x1f7)+(_0x5d82b6?_0x535a9e(0x24b):_0x535a9e(0x1d2))+'\x20'+_0x12dd8f),_0x39a0f9&&console[_0x535a9e(0x220)]('From\x20task:\x20'+_0x39a0f9),_0x58458d&&console[_0x535a9e(0x220)](_0x535a9e(0x22e)+_0x58458d),_0x5405e4&&console[_0x535a9e(0x220)](_0x535a9e(0x21e)+_0x5405e4),_0x4fbbf9&&console[_0x535a9e(0x220)](_0x535a9e(0x213)));let _0x4a88d2;if(_0x5405e4)try{if(_0x5405e4[_0x535a9e(0x22b)]('@')){const _0x57ae48=await import(_0x535a9e(0x1da)),_0x5106c4=_0x5405e4[_0x535a9e(0x1e5)](0x1),_0x54938f=await _0x57ae48['readFile'](_0x5106c4,_0x535a9e(0x23e));_0x4a88d2=JSON[_0x535a9e(0x209)](_0x54938f);}else _0x4a88d2=JSON[_0x535a9e(0x209)](_0x5405e4);}catch{return console['error']('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x4bcf1a[_0x535a9e(0x233)]){const _0x5f52c5=await confirm(_0x535a9e(0x1db)+(_0x5d82b6?_0x535a9e(0x24b):_0x535a9e(0x1d2))+'\x20'+_0x12dd8f+'?');if(!_0x5f52c5)return console[_0x535a9e(0x220)](_0x535a9e(0x22c)),0x0;}let _0x233fbb;_0x5d82b6?_0x233fbb=await withSpinner(_0x535a9e(0x22d),()=>_0x4ad7d4[_0x535a9e(0x227)]['retrySession'](_0x12dd8f,{'fromTask':_0x39a0f9,'retryParams':_0x4a88d2}),{'verbose':_0x4bcf1a[_0x535a9e(0x1e3)]}):_0x233fbb=await withSpinner(_0x535a9e(0x21d),()=>_0x4ad7d4[_0x535a9e(0x227)]['retryAttempt'](_0x12dd8f,{'resumeFrom':_0x58458d,'retryParams':_0x4a88d2,'force':_0x4fbbf9}),{'verbose':_0x4bcf1a[_0x535a9e(0x1e3)]});const _0x10fa05=_0x233fbb[_0x535a9e(0x1d9)];return console[_0x535a9e(0x220)]('✔\x20Retry\x20started'),console[_0x535a9e(0x220)](_0x535a9e(0x228)+_0x10fa05[_0x535a9e(0x1fc)]),console[_0x535a9e(0x220)](_0x535a9e(0x23a)+_0x10fa05[_0x535a9e(0x24a)]),0x0;}catch(_0x37d845){if(_0x37d845 instanceof SDKError)return console[_0x535a9e(0x220)](_0x535a9e(0x20f)+_0x37d845[_0x535a9e(0x223)]),_0x37d845[_0x535a9e(0x1f6)]&&console['error']('\x20\x20Cause:\x20'+_0x37d845['cause']),0x1;throw _0x37d845;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x1d683a(0x242)]=a32_0x1d683a(0x222);[a32_0x1d683a(0x244)]=a32_0x1d683a(0x1e9);async[a32_0x1d683a(0x23c)](_0x52f8d7){const _0x10df88=a32_0x1d683a,{options:_0x153e50,args:_0x41cdda,tdx:_0x2876cc}=_0x52f8d7,_0x1d9670=_0x41cdda[0x0],_0x31fa59=_0x41cdda[0x1]||'.';if(!_0x1d9670)return console[_0x10df88(0x220)](_0x10df88(0x1fd)),console[_0x10df88(0x220)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x4703fa=_0x153e50[_0x10df88(0x238)];_0x153e50[_0x10df88(0x1e3)]&&(console[_0x10df88(0x220)](_0x10df88(0x21b)+_0x1d9670),console[_0x10df88(0x220)]('Output\x20directory:\x20'+_0x31fa59),_0x4703fa&&console[_0x10df88(0x220)](_0x10df88(0x1dc)+_0x4703fa));const _0x44b089=await withSpinner(_0x10df88(0x205)+_0x1d9670+'...',()=>_0x2876cc['workflow'][_0x10df88(0x1eb)](_0x1d9670,_0x31fa59,{'revision':_0x4703fa}),{'verbose':_0x153e50[_0x10df88(0x1e3)]}),_0x9f34ca=_0x44b089[_0x10df88(0x1d9)];return console[_0x10df88(0x220)](_0x10df88(0x202)+_0x9f34ca[_0x10df88(0x229)]),console['error'](_0x10df88(0x226)+_0x9f34ca[_0x10df88(0x238)]),console[_0x10df88(0x220)](_0x10df88(0x1f9)+_0x9f34ca['filesExtracted']),console['error']('\x20\x20Location:\x20'+_0x31fa59+'/'+_0x9f34ca[_0x10df88(0x229)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a32_0x1d683a(0x242)]=a32_0x1d683a(0x207);[a32_0x1d683a(0x244)]=a32_0x1d683a(0x1ee);async[a32_0x1d683a(0x23c)](_0x56fe58){const _0x38c6ae=a32_0x1d683a,{options:_0x1276cb,args:_0x2d510c,tdx:_0x350bb9}=_0x56fe58;let _0x570b49='.',_0x25c4f1=_0x1276cb[_0x38c6ae(0x242)];if(_0x2d510c[0x0]){const {promises:_0xdf59b3}=await import('fs');try{const _0x25679d=await _0xdf59b3[_0x38c6ae(0x23b)](_0x2d510c[0x0]);if(_0x25679d[_0x38c6ae(0x214)]())_0x570b49=_0x2d510c[0x0];else return console[_0x38c6ae(0x220)](_0x38c6ae(0x20f)+_0x2d510c[0x0]+_0x38c6ae(0x1ef)),0x1;}catch{_0x25c4f1=_0x2d510c[0x0],_0x570b49='.';}}const _0x59d379=_0x1276cb[_0x38c6ae(0x238)],_0x3d3dcf=_0x1276cb['skipValidation'];_0x1276cb[_0x38c6ae(0x1e3)]&&(console[_0x38c6ae(0x220)]('Project\x20directory:\x20'+_0x570b49),_0x25c4f1&&console['error'](_0x38c6ae(0x200)+_0x25c4f1),_0x59d379&&console[_0x38c6ae(0x220)](_0x38c6ae(0x1dc)+_0x59d379),_0x3d3dcf&&console['error'](_0x38c6ae(0x22f)));const _0x1d23db=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x350bb9[_0x38c6ae(0x227)][_0x38c6ae(0x1d8)](_0x570b49,{'projectName':_0x25c4f1,'revision':_0x59d379,'skipValidation':_0x3d3dcf}),{'verbose':_0x1276cb['verbose']}),_0x52c408=_0x1d23db['data'];return console[_0x38c6ae(0x220)](_0x38c6ae(0x245)+_0x52c408[_0x38c6ae(0x229)]),console[_0x38c6ae(0x220)]('\x20\x20Project\x20ID:\x20'+_0x52c408['projectId']),console[_0x38c6ae(0x220)](_0x38c6ae(0x226)+_0x52c408[_0x38c6ae(0x238)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a32_0x1d683a(0x1fe);[a32_0x1d683a(0x244)]=a32_0x1d683a(0x247);async['execute'](_0x1ff859){const _0x49260e=a32_0x1d683a,{options:_0x31e053,args:_0x553c27,tdx:_0x13a715}=_0x1ff859,_0xf912c5=_0x553c27[0x0];if(!_0xf912c5)return console['error'](_0x49260e(0x1de)),console[_0x49260e(0x220)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0x31e053[_0x49260e(0x1e3)]&&console[_0x49260e(0x220)](_0x49260e(0x21b)+_0xf912c5);if(!_0x31e053[_0x49260e(0x233)]){const _0x4ee724=await confirm(_0x49260e(0x234)+_0xf912c5+_0x49260e(0x20a));if(!_0x4ee724)return console[_0x49260e(0x220)](_0x49260e(0x22c)),0x0;}const _0x31476d=await withSpinner(_0x49260e(0x1e1)+_0xf912c5+_0x49260e(0x1f1),()=>_0x13a715[_0x49260e(0x227)][_0x49260e(0x215)](_0xf912c5),{'verbose':_0x31e053[_0x49260e(0x1e3)]}),_0x441dd7=_0x31476d[_0x49260e(0x1d9)];return console['error']('✔\x20Deleted\x20project\x20'+_0x441dd7[_0x49260e(0x229)]),console[_0x49260e(0x220)](_0x49260e(0x237)+_0x441dd7[_0x49260e(0x206)]),0x0;}}function a32_0x4c65(){const _0x5996fb=['Attempt\x20ID:\x20','name','649248AohEFb','description','✔\x20Pushed\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Listing\x20workflow\x20sessions...','sessionId','session','workflow:tasks','Show\x20specific\x20attempt\x20details','837524YhOZrY','attempt','Project\x20filter:\x20','Reason:\x20','7CKyfZy','55qvYpOo','Listing\x20workflow\x20projects...','push','data','fs/promises','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Revision:\x20','List\x20all\x20workflow\x20projects','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','\x20\x20Cause:\x20','\x20log\x20entr','Deleting\x20project\x20','length','verbose','2388OCOIjP','substring','\x20attempt','Including\x20subtasks:\x20yes','Error:\x20Attempt\x20ID\x20is\x20required','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','Task\x20name:\x20','download','✔\x20Found\x20','\x20workflow','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','\x20is\x20not\x20a\x20directory','\x20project','...','limit','328912LUouzU','fromTask','status','cause','Target:\x20','from','\x20\x20Files\x20extracted:\x20','attempt:','session:','attemptId','Error:\x20Project\x20name\x20is\x20required','workflow:delete','includeRetried','Project\x20name:\x20','List\x20workflow\x20attempts','✔\x20Downloaded\x20','126929vhbecz','params','Downloading\x20project\x20','projectId','workflow:push','logs','parse','\x22?\x20This\x20cannot\x20be\x20undone.','offset','1wXQoxw','3336280goCEfR','Listing\x20workflow\x20attempts...','Error:\x20','workflow:retry','Listing\x20workflows...','attempts','Force:\x20yes','isDirectory','delete','projects','workflow:sessions','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Getting\x20attempt\x20tasks...','4508556CsDxaL','Project:\x20','split','Retrying\x20attempt...','Params:\x20','Status:\x20','error','includeSubtasks','workflow:download','message','Filter:\x20project=','Show\x20tasks\x20for\x20an\x20attempt','\x20\x20Revision:\x20','workflow','\x20\x20New\x20attempt\x20ID:\x20','projectName','workflow:attempts','startsWith','Cancelled','Retrying\x20session...','Resume\x20from:\x20','Validation:\x20skipped','reason','27HIRpqL','workflow:logs','yes','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','5954590moClOB','workflows','\x20\x20Project\x20ID:\x20','revision','resumeFrom','\x20\x20Session\x20ID:\x20','stat','execute','workflow:kill','utf-8','Filter:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'];a32_0x4c65=function(){return _0x5996fb;};return a32_0x4c65();}
1
+ const a32_0x5464de=a32_0x17ba;(function(_0x256e81,_0x2456ca){const _0x10b546=a32_0x17ba,_0x216856=_0x256e81();while(!![]){try{const _0x4669cd=parseInt(_0x10b546(0x19e))/0x1+-parseInt(_0x10b546(0x215))/0x2*(parseInt(_0x10b546(0x1d5))/0x3)+-parseInt(_0x10b546(0x1f6))/0x4*(parseInt(_0x10b546(0x1ba))/0x5)+parseInt(_0x10b546(0x1d6))/0x6+-parseInt(_0x10b546(0x1a6))/0x7+parseInt(_0x10b546(0x1de))/0x8+-parseInt(_0x10b546(0x1ff))/0x9;if(_0x4669cd===_0x2456ca)break;else _0x216856['push'](_0x216856['shift']());}catch(_0x1f9583){_0x216856['push'](_0x216856['shift']());}}}(a32_0x4c91,0xc43bd));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{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0x5464de(0x1fb)]='workflow:projects';[a32_0x5464de(0x1a9)]='List\x20all\x20workflow\x20projects';async[a32_0x5464de(0x1d0)](_0x3b2b80){const _0x5be79e=a32_0x5464de,{options:_0x3b27bc,args:_0x463928,tdx:_0x48dcf8}=_0x3b2b80,_0x164548=_0x463928[0x0];try{_0x3b27bc[_0x5be79e(0x1b7)]&&_0x164548&&console['error']('Pattern:\x20'+_0x164548);const _0x1daf38=await withSpinner(_0x5be79e(0x218),()=>_0x48dcf8[_0x5be79e(0x1b9)][_0x5be79e(0x1ac)](_0x164548,{'limit':_0x3b27bc['limit']}),{'verbose':_0x3b27bc[_0x5be79e(0x1b7)]}),_0x4f5cb0=_0x1daf38[_0x5be79e(0x1d8)];return console['error']('✔\x20Found\x20'+_0x4f5cb0['length']+'\x20project'+(_0x4f5cb0['length']!==0x1?'s':'')),await handleSDKOutput(_0x4f5cb0,_0x3b27bc),0x0;}catch(_0x4759cf){if(_0x4759cf instanceof SDKError)return console[_0x5be79e(0x1a4)](_0x5be79e(0x1db)+_0x4759cf[_0x5be79e(0x1b1)]),_0x4759cf[_0x5be79e(0x1e6)]&&console[_0x5be79e(0x1a4)]('\x20\x20Cause:\x20'+_0x4759cf[_0x5be79e(0x1e6)]),0x1;throw _0x4759cf;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x5464de(0x1fb)]=a32_0x5464de(0x1c5);[a32_0x5464de(0x1a9)]=a32_0x5464de(0x217);async[a32_0x5464de(0x1d0)](_0x144c52){const _0x222a6e=a32_0x5464de,{options:_0x5682c9,args:_0x2e29ec,tdx:_0x51f1f5}=_0x144c52,_0x43d0d6=_0x2e29ec[0x0];try{_0x5682c9[_0x222a6e(0x1b7)]&&_0x43d0d6&&console[_0x222a6e(0x1a4)](_0x222a6e(0x1b3)+_0x43d0d6);const _0xbc5ce9=await withSpinner(_0x222a6e(0x1d3),()=>_0x51f1f5['workflow']['workflows'](_0x43d0d6,{'limit':_0x5682c9['limit']}),{'verbose':_0x5682c9['verbose']}),_0x2a8942=_0xbc5ce9[_0x222a6e(0x1d8)];return console['error'](_0x222a6e(0x1ae)+_0x2a8942[_0x222a6e(0x1ec)]+_0x222a6e(0x203)+(_0x2a8942[_0x222a6e(0x1ec)]!==0x1?'s':'')),await handleSDKOutput(_0x2a8942,_0x5682c9),0x0;}catch(_0x4a62e4){if(_0x4a62e4 instanceof SDKError)return console['error']('Error:\x20'+_0x4a62e4[_0x222a6e(0x1b1)]),_0x4a62e4[_0x222a6e(0x1e6)]&&console[_0x222a6e(0x1a4)](_0x222a6e(0x1aa)+_0x4a62e4['cause']),0x1;throw _0x4a62e4;}}}export class WorkflowSessionsCommand extends BaseCommand{[a32_0x5464de(0x1fb)]='workflow:sessions';['description']=a32_0x5464de(0x1ee);async[a32_0x5464de(0x1d0)](_0x4f05f7){const _0x3db96d=a32_0x5464de,{options:_0x5dcc20,args:_0x2ce3b9,tdx:_0xdae82c}=_0x4f05f7;let _0x35c3df,_0x3226ed;if(_0x2ce3b9[0x0]){const _0x569833=_0x2ce3b9[0x0][_0x3db96d(0x1df)]('.');if(_0x569833[_0x3db96d(0x1ec)]===0x1)_0x35c3df=_0x569833[0x0];else{if(_0x569833['length']===0x2)[_0x35c3df,_0x3226ed]=_0x569833;else return console[_0x3db96d(0x1a4)](_0x3db96d(0x214)),0x1;}}try{if(_0x5dcc20[_0x3db96d(0x1b7)]){if(_0x35c3df&&_0x3226ed)console[_0x3db96d(0x1a4)](_0x3db96d(0x1ca)+_0x35c3df+'.'+_0x3226ed);else _0x35c3df&&console[_0x3db96d(0x1a4)](_0x3db96d(0x1dc)+_0x35c3df);const _0x57baa1=_0x5dcc20[_0x3db96d(0x1d7)];_0x57baa1&&console[_0x3db96d(0x1a4)]('Status:\x20'+_0x57baa1);}const _0x555935=await withSpinner(_0x3db96d(0x1a7),()=>_0xdae82c[_0x3db96d(0x1b9)][_0x3db96d(0x1eb)]({'projectName':_0x35c3df,'workflowName':_0x3226ed,'status':_0x5dcc20['status'],'fromTime':_0x5dcc20['from'],'toTime':_0x5dcc20['to'],'limit':_0x5dcc20['limit']}),{'verbose':_0x5dcc20[_0x3db96d(0x1b7)]}),_0x51a58c=_0x555935['data'];return console[_0x3db96d(0x1a4)](_0x3db96d(0x1ae)+_0x51a58c[_0x3db96d(0x1ec)]+'\x20session'+(_0x51a58c[_0x3db96d(0x1ec)]!==0x1?'s':'')),await handleSDKOutput(_0x51a58c,_0x5dcc20),0x0;}catch(_0x4aeebb){if(_0x4aeebb instanceof SDKError)return console[_0x3db96d(0x1a4)]('Error:\x20'+_0x4aeebb[_0x3db96d(0x1b1)]),_0x4aeebb[_0x3db96d(0x1e6)]&&console['error'](_0x3db96d(0x1aa)+_0x4aeebb['cause']),0x1;throw _0x4aeebb;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x5464de(0x1fb)]=a32_0x5464de(0x212);[a32_0x5464de(0x1a9)]=a32_0x5464de(0x1cd);async[a32_0x5464de(0x1d0)](_0x1afe5c){const _0x303ed8=a32_0x5464de,{options:_0x21b9d3,args:_0x3684b9,tdx:_0x4755b7}=_0x1afe5c;let _0x777265,_0x1064bc;if(_0x3684b9[0x0]){const _0x540516=_0x3684b9[0x0][_0x303ed8(0x1df)]('.');if(_0x540516[_0x303ed8(0x1ec)]===0x1)_0x777265=_0x540516[0x0];else{if(_0x540516[_0x303ed8(0x1ec)]===0x2)[_0x777265,_0x1064bc]=_0x540516;else return console[_0x303ed8(0x1a4)]('Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),0x1;}}try{const _0x3dee6b=_0x21b9d3['includeRetried'];if(_0x21b9d3[_0x303ed8(0x1b7)]){if(_0x777265&&_0x1064bc)console[_0x303ed8(0x1a4)]('Filter:\x20'+_0x777265+'.'+_0x1064bc);else _0x777265&&console[_0x303ed8(0x1a4)](_0x303ed8(0x1dc)+_0x777265);_0x3dee6b&&console[_0x303ed8(0x1a4)](_0x303ed8(0x19f));}const _0x4dde43=await withSpinner(_0x303ed8(0x1bd),()=>_0x4755b7[_0x303ed8(0x1b9)][_0x303ed8(0x1d1)]({'projectName':_0x777265,'workflowName':_0x1064bc,'includeRetried':_0x3dee6b,'limit':_0x21b9d3[_0x303ed8(0x20e)]}),{'verbose':_0x21b9d3['verbose']}),_0x592031=_0x4dde43[_0x303ed8(0x1d8)];return console[_0x303ed8(0x1a4)]('✔\x20Found\x20'+_0x592031[_0x303ed8(0x1ec)]+_0x303ed8(0x1be)+(_0x592031[_0x303ed8(0x1ec)]!==0x1?'s':'')),await handleSDKOutput(_0x592031,_0x21b9d3),0x0;}catch(_0x12eefb){if(_0x12eefb instanceof SDKError)return console[_0x303ed8(0x1a4)](_0x303ed8(0x1db)+_0x12eefb[_0x303ed8(0x1b1)]),_0x12eefb[_0x303ed8(0x1e6)]&&console[_0x303ed8(0x1a4)](_0x303ed8(0x1aa)+_0x12eefb['cause']),0x1;throw _0x12eefb;}}}function a32_0x4c91(){const _0x37339a=['logs','479732ercJil','Include\x20retried:\x20yes','includeSubtasks','Reason:\x20','\x20log\x20entr','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','error','attempt','8354689PJngfA','Listing\x20workflow\x20sessions...','push','description','\x20\x20Cause:\x20','\x20task','projects','✔\x20Retry\x20started','✔\x20Found\x20','Getting\x20attempt\x20details...','Getting\x20task\x20logs...','message','workflow:kill','Project\x20filter:\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','offset','\x20\x20New\x20attempt\x20ID:\x20','verbose','session:','workflow','10225iEHqkR','Downloading\x20project\x20','workflow:retry','Listing\x20workflow\x20attempts...','\x20attempt','\x20\x20Location:\x20','kill','Error:\x20Invalid\x20JSON\x20in\x20--params','Show\x20logs\x20for\x20a\x20specific\x20task','Pushing\x20workflow\x20project...','\x20\x20Project\x20ID:\x20','workflow:workflows','Resume\x20from:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','workflow:delete','stat','Filter:\x20','revision','Attempt\x20ID:\x20','List\x20workflow\x20attempts','params','yes','execute','attempts','Retrying\x20session...','Listing\x20workflows...','fs/promises','503211lxMtMc','9014340dfHOBx','status','data','projectId','fromTask','Error:\x20','Filter:\x20project=','Output\x20directory:\x20','6313056cXDKgH','split','Cancelled','✔\x20Deleted\x20project\x20','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Show\x20specific\x20attempt\x20details','Error:\x20Project\x20name\x20is\x20required','cause','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20\x20Session\x20ID:\x20','Project:\x20','tasks','sessions','length','attemptId','List\x20workflow\x20execution\x20sessions','workflow:attempt','\x22?\x20This\x20cannot\x20be\x20undone.','delete','Force:\x20yes','parse','utf-8','...','340cewlbW','Usage:\x20workflow:delete\x20<project-name-or-id>','Error:\x20Attempt\x20ID\x20is\x20required','Task\x20name:\x20','✔\x20Pushed\x20','name','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','reason','Params:\x20','2381895tVUXPb','isDirectory','session','From\x20task:\x20','\x20workflow','\x20is\x20not\x20a\x20directory','workflow:logs','Revision:\x20','✔\x20Downloaded\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','force','substring','download','Validation:\x20skipped','Kill\x20a\x20running\x20attempt','limit','projectName','\x20\x20Revision:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','workflow:attempts','Deleting\x20project\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','4mvYmtR','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','List\x20workflows','Listing\x20workflow\x20projects...','Killing\x20attempt...','startsWith'];a32_0x4c91=function(){return _0x37339a;};return a32_0x4c91();}export class WorkflowAttemptCommand extends BaseCommand{['name']=a32_0x5464de(0x1ef);[a32_0x5464de(0x1a9)]=a32_0x5464de(0x1e4);async[a32_0x5464de(0x1d0)](_0x5a98dd){const _0x52b81d=a32_0x5464de,{options:_0x16d4d2,args:_0x18849f,tdx:_0x3069c3}=_0x5a98dd,_0x5a9d7a=_0x18849f[0x0];if(!_0x5a9d7a)return console[_0x52b81d(0x1a4)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{_0x16d4d2['verbose']&&console['error'](_0x52b81d(0x1cc)+_0x5a9d7a);const _0x16b0a4=await withSpinner(_0x52b81d(0x1af),()=>_0x3069c3[_0x52b81d(0x1b9)][_0x52b81d(0x1a5)](_0x5a9d7a),{'verbose':_0x16d4d2[_0x52b81d(0x1b7)]}),_0x5b06cf=_0x16b0a4[_0x52b81d(0x1d8)];return await handleSDKOutput([_0x5b06cf],_0x16d4d2),0x0;}catch(_0x206b95){if(_0x206b95 instanceof SDKError)return console[_0x52b81d(0x1a4)](_0x52b81d(0x1db)+_0x206b95[_0x52b81d(0x1b1)]),_0x206b95[_0x52b81d(0x1e6)]&&console[_0x52b81d(0x1a4)](_0x52b81d(0x1aa)+_0x206b95['cause']),0x1;throw _0x206b95;}}}export class WorkflowTasksCommand extends BaseCommand{[a32_0x5464de(0x1fb)]='workflow:tasks';[a32_0x5464de(0x1a9)]='Show\x20tasks\x20for\x20an\x20attempt';async[a32_0x5464de(0x1d0)](_0x4fbd1b){const _0x5b834f=a32_0x5464de,{options:_0x59b5c3,args:_0x362a50,tdx:_0x4c5b77}=_0x4fbd1b,_0x33c411=_0x362a50[0x0];if(!_0x33c411)return console[_0x5b834f(0x1a4)](_0x5b834f(0x1f8)),0x1;try{const _0x5c97f0=_0x59b5c3[_0x5b834f(0x1a0)];_0x59b5c3['verbose']&&(console[_0x5b834f(0x1a4)](_0x5b834f(0x1cc)+_0x33c411),_0x5c97f0&&console[_0x5b834f(0x1a4)]('Including\x20subtasks:\x20yes'));const _0xffdbe0=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x4c5b77[_0x5b834f(0x1b9)][_0x5b834f(0x1ea)](_0x33c411,_0x5c97f0||![]),{'verbose':_0x59b5c3[_0x5b834f(0x1b7)]}),_0x49e35d=_0xffdbe0['data'];return console[_0x5b834f(0x1a4)](_0x5b834f(0x1ae)+_0x49e35d[_0x5b834f(0x1ec)]+_0x5b834f(0x1ab)+(_0x49e35d['length']!==0x1?'s':'')),await handleSDKOutput(_0x49e35d,_0x59b5c3),0x0;}catch(_0x3090ef){if(_0x3090ef instanceof SDKError)return console[_0x5b834f(0x1a4)](_0x5b834f(0x1db)+_0x3090ef[_0x5b834f(0x1b1)]),_0x3090ef[_0x5b834f(0x1e6)]&&console['error'](_0x5b834f(0x1aa)+_0x3090ef[_0x5b834f(0x1e6)]),0x1;throw _0x3090ef;}}}function a32_0x17ba(_0x47d5c2,_0x18a27a){const _0x4c910a=a32_0x4c91();return a32_0x17ba=function(_0x17ba6c,_0x313a98){_0x17ba6c=_0x17ba6c-0x19c;let _0xa50dc=_0x4c910a[_0x17ba6c];return _0xa50dc;},a32_0x17ba(_0x47d5c2,_0x18a27a);}export class WorkflowLogsCommand extends BaseCommand{[a32_0x5464de(0x1fb)]=a32_0x5464de(0x205);[a32_0x5464de(0x1a9)]=a32_0x5464de(0x1c2);async[a32_0x5464de(0x1d0)](_0x5ac784){const _0xb7f34a=a32_0x5464de,{options:_0x4c3587,args:_0x5b700f,tdx:_0x37327b}=_0x5ac784,_0x52576a=_0x5b700f[0x0],_0x1186a2=_0x5b700f[0x1];if(!_0x52576a||!_0x1186a2)return console[_0xb7f34a(0x1a4)](_0xb7f34a(0x1e2)),0x1;try{_0x4c3587[_0xb7f34a(0x1b7)]&&(console['error'](_0xb7f34a(0x1cc)+_0x52576a),console[_0xb7f34a(0x1a4)](_0xb7f34a(0x1f9)+_0x1186a2));const _0x3c86d6=_0x4c3587[_0xb7f34a(0x1b5)],_0x3e710a=await withSpinner(_0xb7f34a(0x1b0),()=>_0x37327b[_0xb7f34a(0x1b9)][_0xb7f34a(0x19d)](_0x52576a,_0x1186a2,{'offset':_0x3c86d6,'limit':_0x4c3587['limit']}),{'verbose':_0x4c3587[_0xb7f34a(0x1b7)]}),_0x295db0=_0x3e710a['data'];return console[_0xb7f34a(0x1a4)](_0xb7f34a(0x1ae)+_0x295db0[_0xb7f34a(0x1ec)]+_0xb7f34a(0x1a2)+(_0x295db0[_0xb7f34a(0x1ec)]!==0x1?'ies':'y')),await handleSDKOutput(_0x295db0,_0x4c3587),0x0;}catch(_0x2b3d70){if(_0x2b3d70 instanceof SDKError)return console[_0xb7f34a(0x1a4)]('Error:\x20'+_0x2b3d70[_0xb7f34a(0x1b1)]),_0x2b3d70[_0xb7f34a(0x1e6)]&&console[_0xb7f34a(0x1a4)](_0xb7f34a(0x1aa)+_0x2b3d70[_0xb7f34a(0x1e6)]),0x1;throw _0x2b3d70;}}}export class WorkflowKillCommand extends BaseCommand{['name']=a32_0x5464de(0x1b2);[a32_0x5464de(0x1a9)]=a32_0x5464de(0x20d);async['execute'](_0xec8d9b){const _0x28ccbb=a32_0x5464de,{options:_0x254112,args:_0x3b487f,tdx:_0x1cec77}=_0xec8d9b,_0x557b84=_0x3b487f[0x0];if(!_0x557b84)return console[_0x28ccbb(0x1a4)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;try{const _0x1ea6f9=_0x254112[_0x28ccbb(0x1fd)];_0x254112[_0x28ccbb(0x1b7)]&&(console[_0x28ccbb(0x1a4)](_0x28ccbb(0x1cc)+_0x557b84),_0x1ea6f9&&console['error'](_0x28ccbb(0x1a1)+_0x1ea6f9));if(!_0x254112[_0x28ccbb(0x1cf)]){const _0x53a8d3=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x557b84+'?');if(!_0x53a8d3)return console[_0x28ccbb(0x1a4)](_0x28ccbb(0x1e0)),0x0;}const _0x1d3c66=await withSpinner(_0x28ccbb(0x219),()=>_0x1cec77[_0x28ccbb(0x1b9)][_0x28ccbb(0x1c0)](_0x557b84,_0x1ea6f9),{'verbose':_0x254112[_0x28ccbb(0x1b7)]}),_0x97ec90=_0x1d3c66[_0x28ccbb(0x1d8)];return console[_0x28ccbb(0x1a4)]('✔\x20'+_0x97ec90),0x0;}catch(_0x8932cf){if(_0x8932cf instanceof SDKError)return console[_0x28ccbb(0x1a4)](_0x28ccbb(0x1db)+_0x8932cf[_0x28ccbb(0x1b1)]),_0x8932cf['cause']&&console[_0x28ccbb(0x1a4)](_0x28ccbb(0x1aa)+_0x8932cf['cause']),0x1;throw _0x8932cf;}}}export class WorkflowRetryCommand extends BaseCommand{['name']=a32_0x5464de(0x1bc);['description']='Retry\x20a\x20session\x20or\x20attempt';async[a32_0x5464de(0x1d0)](_0x3738fc){const _0x5f308a=a32_0x5464de,{options:_0x288fdb,args:_0x3ee2d3,tdx:_0x32fa20}=_0x3738fc,_0x55f241=_0x3ee2d3[0x0];if(!_0x55f241)return console[_0x5f308a(0x1a4)](_0x5f308a(0x1e3)),console[_0x5f308a(0x1a4)](_0x5f308a(0x1a3)),0x1;let _0x394b58=![],_0x56f804=_0x55f241;if(_0x55f241[_0x5f308a(0x19c)](_0x5f308a(0x1b8)))_0x394b58=!![],_0x56f804=_0x55f241[_0x5f308a(0x20a)](0x8);else{if(_0x55f241[_0x5f308a(0x19c)]('attempt:'))_0x394b58=![],_0x56f804=_0x55f241['substring'](0x8);else return console[_0x5f308a(0x1a4)](_0x5f308a(0x1e7)),console[_0x5f308a(0x1a4)](_0x5f308a(0x1a3)),0x1;}try{const _0x8a5ed4=_0x288fdb[_0x5f308a(0x1da)],_0x1e1a82=_0x288fdb['resumeFrom'],_0x2eaed1=_0x288fdb[_0x5f308a(0x1ce)],_0x2faf7a=_0x288fdb[_0x5f308a(0x209)];_0x288fdb[_0x5f308a(0x1b7)]&&(console[_0x5f308a(0x1a4)]('Target:\x20'+(_0x394b58?'session':'attempt')+'\x20'+_0x56f804),_0x8a5ed4&&console['error'](_0x5f308a(0x202)+_0x8a5ed4),_0x1e1a82&&console[_0x5f308a(0x1a4)](_0x5f308a(0x1c6)+_0x1e1a82),_0x2eaed1&&console[_0x5f308a(0x1a4)](_0x5f308a(0x1fe)+_0x2eaed1),_0x2faf7a&&console['error'](_0x5f308a(0x1f2)));let _0x1c0344;if(_0x2eaed1)try{if(_0x2eaed1[_0x5f308a(0x19c)]('@')){const _0x2edcdb=await import(_0x5f308a(0x1d4)),_0x10de58=_0x2eaed1[_0x5f308a(0x20a)](0x1),_0x30ffc2=await _0x2edcdb['readFile'](_0x10de58,_0x5f308a(0x1f4));_0x1c0344=JSON[_0x5f308a(0x1f3)](_0x30ffc2);}else _0x1c0344=JSON[_0x5f308a(0x1f3)](_0x2eaed1);}catch{return console[_0x5f308a(0x1a4)](_0x5f308a(0x1c1)),0x1;}if(!_0x288fdb['yes']){const _0x29f817=await confirm(_0x5f308a(0x208)+(_0x394b58?_0x5f308a(0x201):_0x5f308a(0x1a5))+'\x20'+_0x56f804+'?');if(!_0x29f817)return console[_0x5f308a(0x1a4)](_0x5f308a(0x1e0)),0x0;}let _0x5b5963;_0x394b58?_0x5b5963=await withSpinner(_0x5f308a(0x1d2),()=>_0x32fa20[_0x5f308a(0x1b9)]['retrySession'](_0x56f804,{'fromTask':_0x8a5ed4,'retryParams':_0x1c0344}),{'verbose':_0x288fdb[_0x5f308a(0x1b7)]}):_0x5b5963=await withSpinner('Retrying\x20attempt...',()=>_0x32fa20['workflow']['retryAttempt'](_0x56f804,{'resumeFrom':_0x1e1a82,'retryParams':_0x1c0344,'force':_0x2faf7a}),{'verbose':_0x288fdb[_0x5f308a(0x1b7)]});const _0x508f65=_0x5b5963['data'];return console[_0x5f308a(0x1a4)](_0x5f308a(0x1ad)),console[_0x5f308a(0x1a4)](_0x5f308a(0x1b6)+_0x508f65[_0x5f308a(0x1ed)]),console[_0x5f308a(0x1a4)](_0x5f308a(0x1e8)+_0x508f65['sessionId']),0x0;}catch(_0x251523){if(_0x251523 instanceof SDKError)return console[_0x5f308a(0x1a4)](_0x5f308a(0x1db)+_0x251523[_0x5f308a(0x1b1)]),_0x251523['cause']&&console[_0x5f308a(0x1a4)](_0x5f308a(0x1aa)+_0x251523[_0x5f308a(0x1e6)]),0x1;throw _0x251523;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x5464de(0x1fb)]='workflow:download';[a32_0x5464de(0x1a9)]=a32_0x5464de(0x1b4);async['execute'](_0xa1e2e0){const _0x315fbf=a32_0x5464de,{options:_0x34296f,args:_0x33618e,tdx:_0x2a86a5}=_0xa1e2e0,_0x3b3668=_0x33618e[0x0],_0x402c38=_0x33618e[0x1]||'.';if(!_0x3b3668)return console[_0x315fbf(0x1a4)](_0x315fbf(0x1e5)),console[_0x315fbf(0x1a4)](_0x315fbf(0x1fc)),0x1;const _0x34efaf=_0x34296f[_0x315fbf(0x1cb)];_0x34296f[_0x315fbf(0x1b7)]&&(console[_0x315fbf(0x1a4)](_0x315fbf(0x1e9)+_0x3b3668),console[_0x315fbf(0x1a4)](_0x315fbf(0x1dd)+_0x402c38),_0x34efaf&&console[_0x315fbf(0x1a4)](_0x315fbf(0x206)+_0x34efaf));const _0x31e668=await withSpinner(_0x315fbf(0x1bb)+_0x3b3668+'...',()=>_0x2a86a5[_0x315fbf(0x1b9)][_0x315fbf(0x20b)](_0x3b3668,_0x402c38,{'revision':_0x34efaf}),{'verbose':_0x34296f[_0x315fbf(0x1b7)]}),_0x2257b7=_0x31e668[_0x315fbf(0x1d8)];return console[_0x315fbf(0x1a4)](_0x315fbf(0x207)+_0x2257b7[_0x315fbf(0x20f)]),console['error'](_0x315fbf(0x210)+_0x2257b7[_0x315fbf(0x1cb)]),console[_0x315fbf(0x1a4)]('\x20\x20Files\x20extracted:\x20'+_0x2257b7['filesExtracted']),console['error'](_0x315fbf(0x1bf)+_0x402c38+'/'+_0x2257b7[_0x315fbf(0x20f)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']='workflow:push';['description']='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async[a32_0x5464de(0x1d0)](_0x1e70ce){const _0x44219e=a32_0x5464de,{options:_0x476198,args:_0x2df4c2,tdx:_0x55b5d9}=_0x1e70ce;let _0xd6a6f5='.',_0x33091c=_0x476198[_0x44219e(0x1fb)];if(_0x2df4c2[0x0]){const {promises:_0x10871b}=await import('fs');try{const _0x14b7a8=await _0x10871b[_0x44219e(0x1c9)](_0x2df4c2[0x0]);if(_0x14b7a8[_0x44219e(0x200)]())_0xd6a6f5=_0x2df4c2[0x0];else return console[_0x44219e(0x1a4)](_0x44219e(0x1db)+_0x2df4c2[0x0]+_0x44219e(0x204)),0x1;}catch{_0x33091c=_0x2df4c2[0x0],_0xd6a6f5='.';}}const _0x13aa43=_0x476198[_0x44219e(0x1cb)],_0x2e2ab8=_0x476198['skipValidation'];_0x476198['verbose']&&(console[_0x44219e(0x1a4)]('Project\x20directory:\x20'+_0xd6a6f5),_0x33091c&&console[_0x44219e(0x1a4)]('Project\x20name:\x20'+_0x33091c),_0x13aa43&&console[_0x44219e(0x1a4)](_0x44219e(0x206)+_0x13aa43),_0x2e2ab8&&console[_0x44219e(0x1a4)](_0x44219e(0x20c)));const _0x2a3ae9=await withSpinner(_0x44219e(0x1c3),()=>_0x55b5d9[_0x44219e(0x1b9)][_0x44219e(0x1a8)](_0xd6a6f5,{'projectName':_0x33091c,'revision':_0x13aa43,'skipValidation':_0x2e2ab8}),{'verbose':_0x476198[_0x44219e(0x1b7)]}),_0x17c81a=_0x2a3ae9[_0x44219e(0x1d8)];return console[_0x44219e(0x1a4)](_0x44219e(0x1fa)+_0x17c81a['projectName']),console[_0x44219e(0x1a4)](_0x44219e(0x1c4)+_0x17c81a['projectId']),console[_0x44219e(0x1a4)]('\x20\x20Revision:\x20'+_0x17c81a[_0x44219e(0x1cb)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x5464de(0x1fb)]=a32_0x5464de(0x1c8);['description']=a32_0x5464de(0x1c7);async['execute'](_0x3c286f){const _0x42a1e3=a32_0x5464de,{options:_0x170a7b,args:_0x49d958,tdx:_0x23fee0}=_0x3c286f,_0x23d844=_0x49d958[0x0];if(!_0x23d844)return console[_0x42a1e3(0x1a4)](_0x42a1e3(0x211)),console['error'](_0x42a1e3(0x1f7)),0x1;_0x170a7b[_0x42a1e3(0x1b7)]&&console[_0x42a1e3(0x1a4)](_0x42a1e3(0x1e9)+_0x23d844);if(!_0x170a7b[_0x42a1e3(0x1cf)]){const _0x125200=await confirm(_0x42a1e3(0x216)+_0x23d844+_0x42a1e3(0x1f0));if(!_0x125200)return console[_0x42a1e3(0x1a4)](_0x42a1e3(0x1e0)),0x0;}const _0x5739c6=await withSpinner(_0x42a1e3(0x213)+_0x23d844+_0x42a1e3(0x1f5),()=>_0x23fee0['workflow'][_0x42a1e3(0x1f1)](_0x23d844),{'verbose':_0x170a7b[_0x42a1e3(0x1b7)]}),_0x155a56=_0x5739c6[_0x42a1e3(0x1d8)];return console['error'](_0x42a1e3(0x1e1)+_0x155a56[_0x42a1e3(0x20f)]),console[_0x42a1e3(0x1a4)](_0x42a1e3(0x1c4)+_0x155a56[_0x42a1e3(0x1d9)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x280620,_0x42820d){const _0x4992dd=a33_0x499c,_0x37b961=_0x280620();while(!![]){try{const _0x36c6b1=parseInt(_0x4992dd(0x16f))/0x1*(-parseInt(_0x4992dd(0x170))/0x2)+parseInt(_0x4992dd(0x177))/0x3*(-parseInt(_0x4992dd(0x169))/0x4)+-parseInt(_0x4992dd(0x175))/0x5*(parseInt(_0x4992dd(0x17f))/0x6)+-parseInt(_0x4992dd(0x17c))/0x7*(parseInt(_0x4992dd(0x17e))/0x8)+-parseInt(_0x4992dd(0x16d))/0x9+-parseInt(_0x4992dd(0x180))/0xa+-parseInt(_0x4992dd(0x16b))/0xb*(-parseInt(_0x4992dd(0x173))/0xc);if(_0x36c6b1===_0x42820d)break;else _0x37b961['push'](_0x37b961['shift']());}catch(_0x19c3f6){_0x37b961['push'](_0x37b961['shift']());}}}(a33_0x2efc,0x922f1));function a33_0x499c(_0x93dd61,_0x2359b1){const _0x2efc5d=a33_0x2efc();return a33_0x499c=function(_0x499c66,_0x4e2ca5){_0x499c66=_0x499c66-0x168;let _0x4d749e=_0x2efc5d[_0x499c66];return _0x4d749e;},a33_0x499c(_0x93dd61,_0x2359b1);}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 _0x5b52e3=a33_0x499c;try{const _0x4eba19=fileURLToPath(import.meta[_0x5b52e3(0x16c)]),_0x18bb53=dirname(_0x4eba19),_0x20bc1f=join(_0x18bb53,'../../package.json'),_0x2cd343=JSON[_0x5b52e3(0x17b)](readFileSync(_0x20bc1f,_0x5b52e3(0x172)));return _0x2cd343['version'];}catch{return'0.0.0';}}export function getUserAgent(){const _0x5d84f2=a33_0x499c,_0x18ace5=getVersion(),_0x51006e=platform(),_0x12c017=process[_0x5d84f2(0x179)][_0x5d84f2(0x17d)]('v','');return _0x5d84f2(0x171)+_0x18ace5+'\x20('+_0x51006e+_0x5d84f2(0x168)+_0x12c017+')';}export function getAuthHeaders(_0x5024c2,_0x245931){const _0x15e272=a33_0x499c,_0x14a841=getVersion(),_0x1ba3e3={'User-Agent':getUserAgent(),'X-TD-Client':_0x15e272(0x17a),'X-TD-Client-Version':_0x14a841};return _0x245931&&(_0x1ba3e3['Authorization']=_0x15e272(0x16a)+_0x245931),_0x1ba3e3;}function a33_0x2efc(){const _0x228a43=['82804IOgEpY','TD1\x20','628342lhWJlN','url','658089GJWosn','entries','39XGDdKz','52504gVtpbK','tdx/','utf-8','744jlenDz','length','20nNcxPe','X-Trino-User','57zeHySR','Authorization','version','tdx','parse','1777951WOMbFE','replace','24RBcrBc','204054uzyAED','5545120pacbwh',';\x20node/'];a33_0x2efc=function(){return _0x228a43;};return a33_0x2efc();}export function toHeaderRecord(_0x8db591){const _0x39e9c7=a33_0x499c,_0x90e32b={};for(const [_0x4b01a5,_0x25f822]of Object[_0x39e9c7(0x16e)](_0x8db591)){_0x25f822!==undefined&&(_0x90e32b[_0x4b01a5]=_0x25f822);}return _0x90e32b;}export function getTrinoHeaders(_0x14c2cd,_0x408741){const _0x7167aa=a33_0x499c,_0xfa2435=getAuthHeaders(_0x14c2cd,_0x408741),_0x516083=toHeaderRecord(_0xfa2435);return delete _0x516083[_0x7167aa(0x178)],_0x408741&&(_0x516083[_0x7167aa(0x176)]=_0x408741),_0x516083;}export function hasAPIKey(_0x68d8f3){const _0x49646f=a33_0x499c,_0x259909=getAPIKey(_0x68d8f3);return _0x259909!==undefined&&_0x259909[_0x49646f(0x174)]>0x0;}
1
+ (function(_0x2baf41,_0x5ec8fb){const _0x5169e1=a33_0x1a44,_0x5ef17e=_0x2baf41();while(!![]){try{const _0x5eeebb=parseInt(_0x5169e1(0xad))/0x1*(-parseInt(_0x5169e1(0xa6))/0x2)+parseInt(_0x5169e1(0xa5))/0x3+-parseInt(_0x5169e1(0xb1))/0x4*(-parseInt(_0x5169e1(0x9e))/0x5)+parseInt(_0x5169e1(0x9b))/0x6*(-parseInt(_0x5169e1(0xae))/0x7)+-parseInt(_0x5169e1(0xa8))/0x8*(parseInt(_0x5169e1(0x9c))/0x9)+-parseInt(_0x5169e1(0x9f))/0xa*(-parseInt(_0x5169e1(0xa9))/0xb)+-parseInt(_0x5169e1(0xb0))/0xc*(-parseInt(_0x5169e1(0xab))/0xd);if(_0x5eeebb===_0x5ec8fb)break;else _0x5ef17e['push'](_0x5ef17e['shift']());}catch(_0x2893d9){_0x5ef17e['push'](_0x5ef17e['shift']());}}}(a33_0x56a7,0xc3047));import{platform}from'os';import{readFileSync}from'fs';function a33_0x1a44(_0x11cb23,_0x152140){const _0x56a7c9=a33_0x56a7();return a33_0x1a44=function(_0x1a4497,_0x4695ed){_0x1a4497=_0x1a4497-0x9a;let _0x2a02a9=_0x56a7c9[_0x1a4497];return _0x2a02a9;},a33_0x1a44(_0x11cb23,_0x152140);}import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x2383cb=a33_0x1a44;try{const _0x52947d=fileURLToPath(import.meta[_0x2383cb(0xac)]),_0x190eed=dirname(_0x52947d),_0x2daffb=join(_0x190eed,_0x2383cb(0xa2)),_0x16e93f=JSON[_0x2383cb(0xaf)](readFileSync(_0x2daffb,_0x2383cb(0x9d)));return _0x16e93f[_0x2383cb(0xa3)];}catch{return'0.0.0';}}export function getUserAgent(){const _0x5a37dc=a33_0x1a44,_0x562b61=getVersion(),_0x50b3a9=platform(),_0x16c452=process[_0x5a37dc(0xa3)]['replace']('v','');return _0x5a37dc(0xa7)+_0x562b61+'\x20('+_0x50b3a9+_0x5a37dc(0x9a)+_0x16c452+')';}export function getAuthHeaders(_0x6b9785,_0x2e795f){const _0x964b2c=a33_0x1a44,_0x5bc459=getVersion(),_0x47b04c={'User-Agent':getUserAgent(),'X-TD-Client':_0x964b2c(0xa1),'X-TD-Client-Version':_0x5bc459};return _0x2e795f&&(_0x47b04c['Authorization']=_0x964b2c(0xaa)+_0x2e795f),_0x47b04c;}export function toHeaderRecord(_0x39318f){const _0x59b04d={};for(const [_0x23d16d,_0x7f4b75]of Object['entries'](_0x39318f)){_0x7f4b75!==undefined&&(_0x59b04d[_0x23d16d]=_0x7f4b75);}return _0x59b04d;}function a33_0x56a7(){const _0x5607bd=['104eukGQc','url','647559XArWMk','35uyPKsC','parse','304872vZBKoT','4fCKEfU',';\x20node/','1760370FnSlLG','225lIpENF','utf-8','6823330JpHdUU','1777210LesqkP','Authorization','tdx','../../package.json','version','length','4592217tAHiBt','2eDIyxy','tdx/','457400LihtYY','77UZLgLR','TD1\x20'];a33_0x56a7=function(){return _0x5607bd;};return a33_0x56a7();}export function getTrinoHeaders(_0x2cb3fb,_0x5292d6){const _0x348a6f=a33_0x1a44,_0xe5a9df=getAuthHeaders(_0x2cb3fb,_0x5292d6),_0x6b205d=toHeaderRecord(_0xe5a9df);return delete _0x6b205d[_0x348a6f(0xa0)],_0x5292d6&&(_0x6b205d['X-Trino-User']=_0x5292d6),_0x6b205d;}export function hasAPIKey(_0x476cb6){const _0x366cf7=a33_0x1a44,_0xd16b77=getAPIKey(_0x476cb6);return _0xd16b77!==undefined&&_0xd16b77[_0x366cf7(0xa4)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x23e5b1,_0x40c3e7){const _0x16f6a0=a34_0x1bcc,_0x536251=_0x23e5b1();while(!![]){try{const _0x35fa00=parseInt(_0x16f6a0(0x126))/0x1+-parseInt(_0x16f6a0(0x103))/0x2+-parseInt(_0x16f6a0(0x12f))/0x3+-parseInt(_0x16f6a0(0x122))/0x4*(parseInt(_0x16f6a0(0x129))/0x5)+-parseInt(_0x16f6a0(0x127))/0x6+-parseInt(_0x16f6a0(0x10e))/0x7*(parseInt(_0x16f6a0(0x106))/0x8)+parseInt(_0x16f6a0(0x10b))/0x9*(parseInt(_0x16f6a0(0x124))/0xa);if(_0x35fa00===_0x40c3e7)break;else _0x536251['push'](_0x536251['shift']());}catch(_0x46f54b){_0x536251['push'](_0x536251['shift']());}}}(a34_0x2a73,0xa9c89));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x5282d9 from'node:fs';import*as a34_0x5090dd from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x27c40b=a34_0x1bcc;return process[_0x27c40b(0x12e)][_0x27c40b(0x125)]||join(homedir(),_0x27c40b(0x115),_0x27c40b(0x10a));}export function getConfigFile(){const _0x407f18=a34_0x1bcc;return join(getConfigDir(),_0x407f18(0x108));}export function getCacheDir(){const _0x4cfb42=a34_0x1bcc;return process[_0x4cfb42(0x12e)]['TDX_CACHE_DIR']||join(homedir(),_0x4cfb42(0x12b),_0x4cfb42(0x10a));}export function getLLMProjectCacheFile(){const _0x2c8b48=a34_0x1bcc;return join(getCacheDir(),_0x2c8b48(0x132));}export function readCachedLLMProject(){const _0x88f579=a34_0x1bcc;try{const _0x55e839=getLLMProjectCacheFile();if(!existsSync(_0x55e839))return null;return readFileSync(_0x55e839,_0x88f579(0x121))['trim']();}catch{return null;}}export function writeCachedLLMProject(_0x39841d){const _0x2ee53e=a34_0x1bcc;try{const _0x278214=getCacheDir(),_0x18702e=getLLMProjectCacheFile();!existsSync(_0x278214)&&mkdirSync(_0x278214,{'recursive':!![]}),writeFileSync(_0x18702e,_0x39841d,'utf-8');}catch(_0x3b6691){console[_0x2ee53e(0x113)]('Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:',_0x3b6691);}}export function parseEnvFile(_0x1dc166){const _0x2e8bde=a34_0x1bcc,_0x18f6a4={};for(const _0x50052e of _0x1dc166[_0x2e8bde(0x11a)]('\x0a')){const _0x8a9c26=_0x50052e['trim']();if(!_0x8a9c26||_0x8a9c26[_0x2e8bde(0x131)]('#'))continue;const _0x1e1555=_0x8a9c26['match'](/^([^=]+)=(.*)$/);if(_0x1e1555){const _0x13fdb7=_0x1e1555[0x1][_0x2e8bde(0x12d)]();let _0x3e1282=_0x1e1555[0x2][_0x2e8bde(0x12d)]();(_0x3e1282[_0x2e8bde(0x131)]('\x22')&&_0x3e1282[_0x2e8bde(0x120)]('\x22')||_0x3e1282[_0x2e8bde(0x131)]('\x27')&&_0x3e1282[_0x2e8bde(0x120)]('\x27'))&&(_0x3e1282=_0x3e1282[_0x2e8bde(0x102)](0x1,-0x1)),_0x18f6a4[_0x13fdb7]=_0x3e1282;}}return _0x18f6a4;}export function readUserConfig(){const _0x383f5f=a34_0x1bcc,_0x41376b=getConfigFile();if(!existsSync(_0x41376b))return{};try{const _0x1d8e14=readFileSync(_0x41376b,'utf-8');return parseEnvFile(_0x1d8e14);}catch(_0xc69d74){return console[_0x383f5f(0x107)](_0x383f5f(0x12c)+_0x41376b+':',_0xc69d74),{};}}function a34_0x2a73(){const _0x3f8ce6=['ap02','dev-us01','parse','profile:\x20','existsSync','env:\x20','map','slice','2432366DgzbHI','TD_API_KEY_','\x20(TD_API_KEY)','8GzuNHs','warn','.env','stg-ap03','tdx','19615563Zxtxjo','stg-us01','us01','622755MbTYWZ','readFileSync','entries','Warning:\x20Unknown\x20site\x20\x27','apiKeys','error','ap03','.config','\x27,\x20defaulting\x20to\x20us01','eu01','join','stg-jp01','split','Warning:\x20Failed\x20to\x20load\x20','replace','jp01','includes','dev-eu01','endsWith','utf-8','618200mJhuZJ','global:\x20','10joMnmQ','TDX_CONFIG_DIR','1323140oRqXxH','2917212ArDPDf','toUpperCase','5GoTMeH','TD_API_KEY','.cache','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','trim','env','2583942mYQFXK','profiles','startsWith','llm_default_project'];a34_0x2a73=function(){return _0x3f8ce6;};return a34_0x2a73();}export function resolveSite(_0x1f5482){const _0x5cf6e0=a34_0x1bcc,_0x538e23=[_0x5cf6e0(0x10d),_0x5cf6e0(0x11d),_0x5cf6e0(0x117),_0x5cf6e0(0xfb),_0x5cf6e0(0x114),_0x5cf6e0(0xfc),_0x5cf6e0(0x11f),'stg-us01',_0x5cf6e0(0x119),'stg-ap03'];if(_0x538e23[_0x5cf6e0(0x11e)](_0x1f5482))return _0x1f5482;if(_0x1f5482 in SITE_ALIASES)return SITE_ALIASES[_0x1f5482];return console[_0x5cf6e0(0x107)](_0x5cf6e0(0x111)+_0x1f5482+_0x5cf6e0(0x116)),_0x5cf6e0(0x10d);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x4b83a6,_0x98050c){const _0x3f32b8=a34_0x1bcc,_0x56fd17=_0x4b83a6[_0x3f32b8(0x128)]()[_0x3f32b8(0x11c)](/-/g,'_'),_0x46de1a=_0x3f32b8(0x104)+_0x56fd17;if(process[_0x3f32b8(0x12e)][_0x46de1a])return process[_0x3f32b8(0x12e)][_0x46de1a];if(process['env'][_0x3f32b8(0x12a)])return process['env'][_0x3f32b8(0x12a)];const _0x52c0a0=_0x98050c||getActiveProfileName();if(_0x52c0a0){const _0x4fda57=loadProfileEnv(_0x52c0a0);if(_0x4fda57){if(_0x4fda57[_0x46de1a])return _0x4fda57[_0x46de1a];if(_0x4fda57['TD_API_KEY'])return _0x4fda57[_0x3f32b8(0x12a)];}}const _0x2c57b1=loadUserConfigOnce();if(_0x2c57b1[_0x46de1a])return _0x2c57b1[_0x46de1a];if(_0x2c57b1[_0x3f32b8(0x12a)])return _0x2c57b1[_0x3f32b8(0x12a)];return undefined;}function a34_0x1bcc(_0x5bf21d,_0x2af37f){const _0x2a7335=a34_0x2a73();return a34_0x1bcc=function(_0x1bcca1,_0x5427e3){_0x1bcca1=_0x1bcca1-0xfb;let _0x20df3b=_0x2a7335[_0x1bcca1];return _0x20df3b;},a34_0x1bcc(_0x5bf21d,_0x2af37f);}export function getAPIKeySource(_0x409d2c,_0x34b8c9){const _0x44f9bf=a34_0x1bcc,_0x149ea6=_0x44f9bf(0x104)+_0x409d2c[_0x44f9bf(0x128)]()[_0x44f9bf(0x11c)](/-/g,'_');if(process[_0x44f9bf(0x12e)][_0x149ea6])return _0x44f9bf(0x100)+_0x149ea6;if(process[_0x44f9bf(0x12e)][_0x44f9bf(0x12a)])return'env:\x20TD_API_KEY';const _0x272193=_0x34b8c9||getActiveProfileName();if(_0x272193){const _0x5536b2=loadProfileEnv(_0x272193);if(_0x5536b2){if(_0x5536b2[_0x149ea6])return _0x44f9bf(0xfe)+_0x272193+'\x20('+_0x149ea6+')';if(_0x5536b2['TD_API_KEY'])return _0x44f9bf(0xfe)+_0x272193+_0x44f9bf(0x105);}}const _0xaa111a=loadUserConfigOnce(),_0x39c073=getConfigFile();if(_0xaa111a[_0x149ea6])return _0x44f9bf(0x123)+_0x39c073+'\x20('+_0x149ea6+')';if(_0xaa111a[_0x44f9bf(0x12a)])return'global:\x20'+_0x39c073+_0x44f9bf(0x105);return null;}function loadProfileEnv(_0x496bd6){const _0x48eaee=a34_0x1bcc,_0x2621b3=a34_0x5090dd['join'](getConfigDir(),'.env.'+_0x496bd6);if(a34_0x5282d9['existsSync'](_0x2621b3)){validateSecureFilePermissions(_0x2621b3);try{const _0x1141e3=a34_0x5282d9['readFileSync'](_0x2621b3,_0x48eaee(0x121));return parseEnvFile(_0x1141e3);}catch(_0x58b362){console[_0x48eaee(0x107)]('Warning:\x20Failed\x20to\x20load\x20'+_0x2621b3+':\x20'+_0x58b362);}}const _0x4f0e2b=a34_0x5090dd[_0x48eaee(0x118)](getConfigDir(),_0x48eaee(0x130),_0x496bd6,_0x48eaee(0x108));if(a34_0x5282d9[_0x48eaee(0xff)](_0x4f0e2b)){validateSecureFilePermissions(_0x4f0e2b);try{const _0x284c22=a34_0x5282d9[_0x48eaee(0x10f)](_0x4f0e2b,'utf-8');return parseEnvFile(_0x284c22);}catch(_0x52722c){return console['warn'](_0x48eaee(0x11b)+_0x4f0e2b+':\x20'+_0x52722c),null;}}return null;}function getActiveProfileName(){const _0x5a281a=a34_0x1bcc,_0x2fd4be=a34_0x5090dd['join'](getConfigDir(),'tdx.json');if(!a34_0x5282d9[_0x5a281a(0xff)](_0x2fd4be))return null;try{const _0x315078=a34_0x5282d9[_0x5a281a(0x10f)](_0x2fd4be,_0x5a281a(0x121)),_0x406315=JSON[_0x5a281a(0xfd)](_0x315078);return _0x406315['profile']||null;}catch{return null;}}export function saveAPIKey(_0x2ca070,_0x35cf41){const _0x26e813=a34_0x1bcc,_0x46f383=getConfigDir(),_0x12b496=getConfigFile();!existsSync(_0x46f383)&&mkdirSync(_0x46f383,{'recursive':!![],'mode':0x1c0});const _0x2b2d42=readUserConfig(),_0x3c0c50=_0x2ca070[_0x26e813(0x128)]()['replace'](/-/g,'_');_0x2b2d42[_0x26e813(0x104)+_0x3c0c50]=_0x35cf41;const _0x50ed43=Object[_0x26e813(0x110)](_0x2b2d42)[_0x26e813(0x101)](([_0x45c10e,_0x2bcc06])=>_0x45c10e+'='+_0x2bcc06);writeFileSync(_0x12b496,_0x50ed43[_0x26e813(0x118)]('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x8ec9fe=a34_0x1bcc,_0x18cd6f={'apiKeys':{},'defaultSite':_0x8ec9fe(0x10d)},_0x4852b1=[_0x8ec9fe(0x10d),_0x8ec9fe(0x11d),_0x8ec9fe(0x117),_0x8ec9fe(0xfb),_0x8ec9fe(0x114),'dev-us01','dev-eu01',_0x8ec9fe(0x10c),_0x8ec9fe(0x119),_0x8ec9fe(0x109)];for(const _0x476d15 of _0x4852b1){const _0x3dd6e8=getAPIKey(_0x476d15);_0x3dd6e8&&(_0x18cd6f[_0x8ec9fe(0x112)][_0x476d15]=_0x3dd6e8);}return _0x18cd6f;}
1
+ (function(_0x1a39b9,_0x3a85a9){const _0x55af88=a34_0x953f,_0x38370a=_0x1a39b9();while(!![]){try{const _0xc886b6=parseInt(_0x55af88(0x10f))/0x1+-parseInt(_0x55af88(0x106))/0x2+parseInt(_0x55af88(0x108))/0x3+parseInt(_0x55af88(0x12f))/0x4+parseInt(_0x55af88(0x11a))/0x5+-parseInt(_0x55af88(0x117))/0x6*(-parseInt(_0x55af88(0x12d))/0x7)+-parseInt(_0x55af88(0x12a))/0x8;if(_0xc886b6===_0x3a85a9)break;else _0x38370a['push'](_0x38370a['shift']());}catch(_0x1d0ca9){_0x38370a['push'](_0x38370a['shift']());}}}(a34_0x6ac8,0x9cd7b));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x5e00a2 from'node:fs';import*as a34_0x475eb8 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x3f62fb=a34_0x953f;return process[_0x3f62fb(0x138)][_0x3f62fb(0x122)]||join(homedir(),_0x3f62fb(0x119),_0x3f62fb(0x136));}export function getConfigFile(){return join(getConfigDir(),'.env');}export function getCacheDir(){const _0x192bcb=a34_0x953f;return process[_0x192bcb(0x138)][_0x192bcb(0x10d)]||join(homedir(),_0x192bcb(0x12e),'tdx');}export function getLLMProjectCacheFile(){const _0x189ebe=a34_0x953f;return join(getCacheDir(),_0x189ebe(0x11c));}export function readCachedLLMProject(){const _0x44bbe2=a34_0x953f;try{const _0x28cfb7=getLLMProjectCacheFile();if(!existsSync(_0x28cfb7))return null;return readFileSync(_0x28cfb7,_0x44bbe2(0x109))[_0x44bbe2(0x114)]();}catch{return null;}}export function writeCachedLLMProject(_0x184554){const _0xf4d523=a34_0x953f;try{const _0x52e49d=getCacheDir(),_0x2cadab=getLLMProjectCacheFile();!existsSync(_0x52e49d)&&mkdirSync(_0x52e49d,{'recursive':!![]}),writeFileSync(_0x2cadab,_0x184554,_0xf4d523(0x109));}catch(_0x1bd78f){console[_0xf4d523(0x113)](_0xf4d523(0x123),_0x1bd78f);}}function a34_0x953f(_0x443e26,_0x47514b){const _0x6ac8d=a34_0x6ac8();return a34_0x953f=function(_0x953fc4,_0x9cd24f){_0x953fc4=_0x953fc4-0x105;let _0x227730=_0x6ac8d[_0x953fc4];return _0x227730;},a34_0x953f(_0x443e26,_0x47514b);}export function parseEnvFile(_0x458db4){const _0x10cd8c=a34_0x953f,_0x2531b1={};for(const _0x285cee of _0x458db4[_0x10cd8c(0x110)]('\x0a')){const _0x400afb=_0x285cee[_0x10cd8c(0x114)]();if(!_0x400afb||_0x400afb['startsWith']('#'))continue;const _0x22c2a7=_0x400afb[_0x10cd8c(0x11b)](/^([^=]+)=(.*)$/);if(_0x22c2a7){const _0x5162c2=_0x22c2a7[0x1][_0x10cd8c(0x114)]();let _0x54c988=_0x22c2a7[0x2][_0x10cd8c(0x114)]();(_0x54c988[_0x10cd8c(0x124)]('\x22')&&_0x54c988[_0x10cd8c(0x105)]('\x22')||_0x54c988[_0x10cd8c(0x124)]('\x27')&&_0x54c988[_0x10cd8c(0x105)]('\x27'))&&(_0x54c988=_0x54c988[_0x10cd8c(0x118)](0x1,-0x1)),_0x2531b1[_0x5162c2]=_0x54c988;}}return _0x2531b1;}export function readUserConfig(){const _0x41214c=a34_0x953f,_0xd2fbc4=getConfigFile();if(!existsSync(_0xd2fbc4))return{};try{const _0x24b7d9=readFileSync(_0xd2fbc4,'utf-8');return parseEnvFile(_0x24b7d9);}catch(_0x4c4bce){return console[_0x41214c(0x10a)](_0x41214c(0x134)+_0xd2fbc4+':',_0x4c4bce),{};}}export function resolveSite(_0x1f99bb){const _0x2ebfe0=a34_0x953f,_0x133c7a=[_0x2ebfe0(0x121),'jp01',_0x2ebfe0(0x139),'ap02',_0x2ebfe0(0x111),_0x2ebfe0(0x131),_0x2ebfe0(0x130),_0x2ebfe0(0x126),_0x2ebfe0(0x132),'stg-ap03'];if(_0x133c7a[_0x2ebfe0(0x10e)](_0x1f99bb))return _0x1f99bb;if(_0x1f99bb in SITE_ALIASES)return SITE_ALIASES[_0x1f99bb];return console[_0x2ebfe0(0x10a)](_0x2ebfe0(0x107)+_0x1f99bb+_0x2ebfe0(0x115)),_0x2ebfe0(0x121);}let cachedUserConfig=null;function a34_0x6ac8(){const _0x5771bf=['TDX_CONFIG_DIR','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','startsWith','global:\x20','stg-us01','Warning:\x20Failed\x20to\x20load\x20','map','ap02','31703056xSjVtq','TD_API_KEY_','toUpperCase','36092mFFGIy','.cache','4176784jmDrNC','dev-eu01','dev-us01','stg-jp01','stg-ap03','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','apiKeys','tdx','env:\x20TD_API_KEY','env','eu01','TD_API_KEY','endsWith','338554FbIOmn','Warning:\x20Unknown\x20site\x20\x27','3597555zJDqeW','utf-8','warn','existsSync','readFileSync','TDX_CACHE_DIR','includes','138491FaVFUv','split','ap03','replace','error','trim','\x27,\x20defaulting\x20to\x20us01','\x20(TD_API_KEY)','1374yonhZD','slice','.config','6059950KPkWPB','match','llm_default_project','tdx.json','jp01','join','profile:\x20','us01'];a34_0x6ac8=function(){return _0x5771bf;};return a34_0x6ac8();}export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x2bd9e1,_0x3919c4){const _0x53641b=a34_0x953f,_0x122590=_0x2bd9e1[_0x53641b(0x12c)]()[_0x53641b(0x112)](/-/g,'_'),_0x14c034=_0x53641b(0x12b)+_0x122590;if(process['env'][_0x14c034])return process['env'][_0x14c034];if(process[_0x53641b(0x138)][_0x53641b(0x13a)])return process[_0x53641b(0x138)][_0x53641b(0x13a)];const _0x32a2b0=_0x3919c4||getActiveProfileName();if(_0x32a2b0){const _0x5e7ba6=loadProfileEnv(_0x32a2b0);if(_0x5e7ba6){if(_0x5e7ba6[_0x14c034])return _0x5e7ba6[_0x14c034];if(_0x5e7ba6[_0x53641b(0x13a)])return _0x5e7ba6[_0x53641b(0x13a)];}}const _0x3f499f=loadUserConfigOnce();if(_0x3f499f[_0x14c034])return _0x3f499f[_0x14c034];if(_0x3f499f[_0x53641b(0x13a)])return _0x3f499f[_0x53641b(0x13a)];return undefined;}export function getAPIKeySource(_0x19e522,_0x2793fd){const _0x333012=a34_0x953f,_0x568da1=_0x333012(0x12b)+_0x19e522['toUpperCase']()[_0x333012(0x112)](/-/g,'_');if(process['env'][_0x568da1])return'env:\x20'+_0x568da1;if(process[_0x333012(0x138)][_0x333012(0x13a)])return _0x333012(0x137);const _0x6bc6c4=_0x2793fd||getActiveProfileName();if(_0x6bc6c4){const _0x114fef=loadProfileEnv(_0x6bc6c4);if(_0x114fef){if(_0x114fef[_0x568da1])return _0x333012(0x120)+_0x6bc6c4+'\x20('+_0x568da1+')';if(_0x114fef['TD_API_KEY'])return _0x333012(0x120)+_0x6bc6c4+_0x333012(0x116);}}const _0x1b2879=loadUserConfigOnce(),_0x2cf826=getConfigFile();if(_0x1b2879[_0x568da1])return _0x333012(0x125)+_0x2cf826+'\x20('+_0x568da1+')';if(_0x1b2879['TD_API_KEY'])return _0x333012(0x125)+_0x2cf826+_0x333012(0x116);return null;}function loadProfileEnv(_0xd29de0){const _0x40edfc=a34_0x953f,_0x52360e=a34_0x475eb8[_0x40edfc(0x11f)](getConfigDir(),'.env.'+_0xd29de0);if(a34_0x5e00a2['existsSync'](_0x52360e)){validateSecureFilePermissions(_0x52360e);try{const _0x2b042a=a34_0x5e00a2[_0x40edfc(0x10c)](_0x52360e,'utf-8');return parseEnvFile(_0x2b042a);}catch(_0x148149){console[_0x40edfc(0x10a)](_0x40edfc(0x127)+_0x52360e+':\x20'+_0x148149);}}const _0x2c1fb7=a34_0x475eb8[_0x40edfc(0x11f)](getConfigDir(),'profiles',_0xd29de0,'.env');if(a34_0x5e00a2[_0x40edfc(0x10b)](_0x2c1fb7)){validateSecureFilePermissions(_0x2c1fb7);try{const _0x14447e=a34_0x5e00a2[_0x40edfc(0x10c)](_0x2c1fb7,'utf-8');return parseEnvFile(_0x14447e);}catch(_0x1fbe7e){return console['warn'](_0x40edfc(0x127)+_0x2c1fb7+':\x20'+_0x1fbe7e),null;}}return null;}function getActiveProfileName(){const _0x10f38d=a34_0x953f,_0x56b597=a34_0x475eb8[_0x10f38d(0x11f)](getConfigDir(),_0x10f38d(0x11d));if(!a34_0x5e00a2[_0x10f38d(0x10b)](_0x56b597))return null;try{const _0x208699=a34_0x5e00a2['readFileSync'](_0x56b597,_0x10f38d(0x109)),_0x26d7fd=JSON['parse'](_0x208699);return _0x26d7fd['profile']||null;}catch{return null;}}export function saveAPIKey(_0x37da66,_0x323d04){const _0x51fa4f=a34_0x953f,_0x1a8730=getConfigDir(),_0x4861aa=getConfigFile();!existsSync(_0x1a8730)&&mkdirSync(_0x1a8730,{'recursive':!![],'mode':0x1c0});const _0x508001=readUserConfig(),_0x3e857b=_0x37da66['toUpperCase']()[_0x51fa4f(0x112)](/-/g,'_');_0x508001[_0x51fa4f(0x12b)+_0x3e857b]=_0x323d04;const _0x3d3d5d=Object['entries'](_0x508001)[_0x51fa4f(0x128)](([_0x2e6af9,_0x370cc0])=>_0x2e6af9+'='+_0x370cc0);writeFileSync(_0x4861aa,_0x3d3d5d['join']('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x251264=a34_0x953f,_0x129c4f={'apiKeys':{},'defaultSite':'us01'},_0x5ecb63=['us01',_0x251264(0x11e),_0x251264(0x139),_0x251264(0x129),_0x251264(0x111),_0x251264(0x131),_0x251264(0x130),_0x251264(0x126),_0x251264(0x132),_0x251264(0x133)];for(const _0x9108a7 of _0x5ecb63){const _0x3e13d0=getAPIKey(_0x9108a7);_0x3e13d0&&(_0x129c4f[_0x251264(0x135)][_0x9108a7]=_0x3e13d0);}return _0x129c4f;}
@@ -1 +1 @@
1
- const a35_0x29a16e=a35_0x191b;function a35_0x5368(){const _0x13ad62=['string','getParameters',':\x20none\x20(using\x20session:\x20','111PGwqEK','existsSync','profiles','6nBAUYy','32ndvpvn','join','globalCredentials','log','4938FdoRUE','activeProfile','4540851aPHwSl','database','.env','us01','displayWithSources','12rWhUtw','11cchvII','sessionId','display','configFiles','cliFlags','segmentPath','[context]','global','layers','profile',':\x20none','parentSegment','2251767ZOrLLK','Global','20HUkUiA','parent_segment','CLI\x20flag:\x20--','565112fJexIE','verbose','Profile','entries','llmProject','sessions','site','Session','ppid','.json','project','default','config','loadGlobalConfig','Project','segment_path','parse','not\x20set','replace','tdx.json','profile:\x20','(session:\x20','session','1355355CuIIwv','llm_project','injectIntoOptions','10611530lnEPdx','apiKey','7681167ODUQRn','getSource','Profile\x20Credentials','utf-8'];a35_0x5368=function(){return _0x13ad62;};return a35_0x5368();}(function(_0x4f2271,_0x4b8ab8){const _0x4b4ae5=a35_0x191b,_0x1adf20=_0x4f2271();while(!![]){try{const _0x4a7b5a=-parseInt(_0x4b4ae5(0x124))/0x1*(-parseInt(_0x4b4ae5(0x12c))/0x2)+-parseInt(_0x4b4ae5(0xfc))/0x3+parseInt(_0x4b4ae5(0x101))/0x4*(-parseInt(_0x4b4ae5(0xfe))/0x5)+-parseInt(_0x4b4ae5(0x127))/0x6*(-parseInt(_0x4b4ae5(0x12e))/0x7)+parseInt(_0x4b4ae5(0x128))/0x8*(parseInt(_0x4b4ae5(0x118))/0x9)+-parseInt(_0x4b4ae5(0x11b))/0xa*(-parseInt(_0x4b4ae5(0xf0))/0xb)+parseInt(_0x4b4ae5(0xef))/0xc*(-parseInt(_0x4b4ae5(0x11d))/0xd);if(_0x4a7b5a===_0x4b8ab8)break;else _0x1adf20['push'](_0x1adf20['shift']());}catch(_0x4b494f){_0x1adf20['push'](_0x1adf20['shift']());}}}(a35_0x5368,0xa5f2d));import{resolveSite,getAPIKey,getConfigDir}from'./config.js';import{loadSessionContext}from'./session.js';import{loadProjectConfig,findProjectConfigPath}from'./project-config.js';import{getActiveProfile,loadProfile}from'./profile.js';import*as a35_0x28afff from'node:fs';function a35_0x191b(_0x40bc0f,_0xb23ba8){const _0x53686b=a35_0x5368();return a35_0x191b=function(_0x191b6,_0x3d5b5f){_0x191b6=_0x191b6-0xee;let _0x2c4190=_0x53686b[_0x191b6];return _0x2c4190;},a35_0x191b(_0x40bc0f,_0xb23ba8);}import*as a35_0x47ce12 from'node:path';export class GlobalContext{[a35_0x29a16e(0x107)];[a35_0x29a16e(0x12f)];[a35_0x29a16e(0xff)];[a35_0x29a16e(0x110)];[a35_0x29a16e(0x119)];[a35_0x29a16e(0x11c)];[a35_0x29a16e(0x102)];[a35_0x29a16e(0xf8)];[a35_0x29a16e(0x12d)];[a35_0x29a16e(0xf1)];[a35_0x29a16e(0xf3)];constructor(_0x238b74){const _0x94fe50=a35_0x29a16e;this[_0x94fe50(0xf1)]=_0x238b74[_0x94fe50(0x117)]||process[_0x94fe50(0x109)]['toString']();const _0x31baf5=loadSessionContext(_0x238b74['session']),_0x6b7ca7=loadProjectConfig(),_0x456cdb=this[_0x94fe50(0x10e)]();this['activeProfile']=_0x238b74['profile']||_0x31baf5?.['profile']||_0x456cdb[_0x94fe50(0xf9)]||getActiveProfile();const _0x18cbb8=this[_0x94fe50(0x12d)]?loadProfile(this['activeProfile']):null,_0x3ce77b=_0x3b803b=>{const _0x40f686=_0x94fe50;if(!_0x3b803b)return{};const _0xb75c00=_0x3b803b,_0x49f1c0={};for(const [_0x4ccaca,_0x51582b]of Object[_0x40f686(0x104)](_0xb75c00)){typeof _0x51582b===_0x40f686(0x121)&&(_0x49f1c0[_0x4ccaca]=_0x51582b);}return _0x49f1c0;},_0x374437={};if(_0x238b74[_0x94fe50(0x107)]&&_0x238b74[_0x94fe50(0x107)]!==_0x94fe50(0x131))_0x374437['site']=_0x238b74[_0x94fe50(0x107)];const _0x41bd2c=_0x31baf5?.['database'],_0x337553=_0x6b7ca7?.[_0x94fe50(0x12f)],_0x37493b=_0x18cbb8?.[_0x94fe50(0x10d)]?.[_0x94fe50(0x12f)],_0x1be197=_0x456cdb[_0x94fe50(0x12f)];_0x238b74['database']&&(_0x238b74[_0x94fe50(0x12f)]!==_0x41bd2c&&_0x238b74['database']!==_0x337553&&_0x238b74[_0x94fe50(0x12f)]!==_0x37493b&&_0x238b74[_0x94fe50(0x12f)]!==_0x1be197)&&(_0x374437[_0x94fe50(0x12f)]=_0x238b74[_0x94fe50(0x12f)]);if(_0x238b74['parentSegment'])_0x374437[_0x94fe50(0xff)]=_0x238b74['parentSegment'];if(_0x238b74[_0x94fe50(0x105)])_0x374437[_0x94fe50(0x119)]=_0x238b74[_0x94fe50(0x105)];if(_0x238b74[_0x94fe50(0xf9)])_0x374437[_0x94fe50(0xf9)]=_0x238b74[_0x94fe50(0xf9)];this[_0x94fe50(0xf8)]={'cliFlags':_0x374437,'session':_0x3ce77b(_0x31baf5),'project':_0x3ce77b(_0x6b7ca7),'profile':_0x3ce77b(_0x18cbb8?.[_0x94fe50(0x10d)]),'global':_0x3ce77b(_0x456cdb)};const _0x123f11={...this[_0x94fe50(0xf8)][_0x94fe50(0xf7)],...this[_0x94fe50(0xf8)][_0x94fe50(0xf9)],...this[_0x94fe50(0xf8)]['project'],...this[_0x94fe50(0xf8)][_0x94fe50(0x117)],...this['layers'][_0x94fe50(0xf4)]},_0xca071d=_0x123f11[_0x94fe50(0x107)]||_0x94fe50(0x131);this[_0x94fe50(0x107)]=resolveSite(_0xca071d),this[_0x94fe50(0x12f)]=_0x123f11[_0x94fe50(0x12f)],this[_0x94fe50(0xff)]=_0x123f11['parent_segment'],this[_0x94fe50(0x110)]=_0x123f11[_0x94fe50(0x110)],this[_0x94fe50(0x119)]=_0x123f11[_0x94fe50(0x119)],this['verbose']=_0x238b74[_0x94fe50(0x102)]||![],this['apiKey']=getAPIKey(this[_0x94fe50(0x107)],this['activeProfile']||undefined);const _0xde2d88=getConfigDir(),_0x3ab6ab=a35_0x47ce12['join'](_0xde2d88,_0x94fe50(0x106),this[_0x94fe50(0xf1)]+_0x94fe50(0x10a)),_0x2487ec=findProjectConfigPath(),_0x5acc3c=a35_0x47ce12[_0x94fe50(0x129)](_0xde2d88,_0x94fe50(0x114)),_0xaf0c0b=a35_0x47ce12[_0x94fe50(0x129)](_0xde2d88,_0x94fe50(0x130));let _0x3ee6b2=null,_0xc4d0e2=null;this['activeProfile']&&(_0x3ee6b2=a35_0x47ce12[_0x94fe50(0x129)](_0xde2d88,'profiles',this[_0x94fe50(0x12d)],_0x94fe50(0x114)),_0xc4d0e2=a35_0x47ce12['join'](_0xde2d88,_0x94fe50(0x126),this[_0x94fe50(0x12d)],_0x94fe50(0x130))),this[_0x94fe50(0xf3)]={'session':a35_0x28afff['existsSync'](_0x3ab6ab)?_0x3ab6ab:null,'project':_0x2487ec,'profile':_0x3ee6b2&&a35_0x28afff['existsSync'](_0x3ee6b2)?_0x3ee6b2:null,'profileCredentials':_0xc4d0e2&&a35_0x28afff['existsSync'](_0xc4d0e2)?_0xc4d0e2:null,'global':a35_0x28afff[_0x94fe50(0x125)](_0x5acc3c)?_0x5acc3c:null,'globalCredentials':a35_0x28afff[_0x94fe50(0x125)](_0xaf0c0b)?_0xaf0c0b:null};}[a35_0x29a16e(0x11e)](_0x8e0576,_0x42d0b2){const _0x2a86c6=a35_0x29a16e;if(!_0x42d0b2)return _0x2a86c6(0x112);const _0x31a716=_0x42d0b2;if(this[_0x2a86c6(0xf8)][_0x2a86c6(0xf4)][_0x8e0576]===_0x31a716){if(_0x8e0576===_0x2a86c6(0x107)&&_0x31a716===_0x2a86c6(0x131)&&!this[_0x2a86c6(0xf8)][_0x2a86c6(0x117)]['site']&&!this['layers'][_0x2a86c6(0x10b)]['site']&&!this['layers']['profile'][_0x2a86c6(0x107)]&&!this[_0x2a86c6(0xf8)][_0x2a86c6(0xf7)]['site'])return'default';return _0x2a86c6(0x100)+_0x8e0576[_0x2a86c6(0x113)](/_/g,'-');}if(this['layers']['session'][_0x8e0576]===_0x31a716)return _0x2a86c6(0x117);if(this[_0x2a86c6(0xf8)]['project'][_0x8e0576]===_0x31a716)return _0x2a86c6(0x10b);if(this['layers']['profile'][_0x8e0576]===_0x31a716)return _0x2a86c6(0x115)+this[_0x2a86c6(0x12d)];if(this[_0x2a86c6(0xf8)][_0x2a86c6(0xf7)][_0x8e0576]===_0x31a716)return _0x2a86c6(0xf7);return _0x2a86c6(0x10c);}[a35_0x29a16e(0x10e)](){const _0x44521c=a35_0x29a16e,_0x5a2026=a35_0x47ce12[_0x44521c(0x129)](getConfigDir(),_0x44521c(0x114));if(!a35_0x28afff['existsSync'](_0x5a2026))return{};try{const _0x357b0d=a35_0x28afff['readFileSync'](_0x5a2026,_0x44521c(0x120));return JSON[_0x44521c(0x111)](_0x357b0d);}catch{return{};}}[a35_0x29a16e(0x11a)](_0x26405f){const _0x185882=a35_0x29a16e;_0x26405f[_0x185882(0x107)]=this[_0x185882(0x107)],!_0x26405f[_0x185882(0x12f)]&&this['database']&&(_0x26405f['database']=this[_0x185882(0x12f)]),!_0x26405f[_0x185882(0xfb)]&&this[_0x185882(0xff)]&&(_0x26405f['parentSegment']=this[_0x185882(0xff)]),!_0x26405f[_0x185882(0xf5)]&&this[_0x185882(0x110)]&&(_0x26405f[_0x185882(0xf5)]=this[_0x185882(0x110)]),!_0x26405f[_0x185882(0x105)]&&this[_0x185882(0x119)]&&(_0x26405f[_0x185882(0x105)]=this[_0x185882(0x119)]);}[a35_0x29a16e(0x122)](){const _0x2de3f2=a35_0x29a16e;return[{'key':_0x2de3f2(0x107),'value':this[_0x2de3f2(0x107)]},{'key':_0x2de3f2(0x12f),'value':this['database']},{'key':'parent_segment','value':this['parent_segment']},{'key':'segment_path','value':this[_0x2de3f2(0x110)]},{'key':'llm_project','value':this[_0x2de3f2(0x119)]},{'key':_0x2de3f2(0xf9),'value':this[_0x2de3f2(0x12d)]||undefined}];}[a35_0x29a16e(0xf2)](){const _0x4bc0db=a35_0x29a16e;console[_0x4bc0db(0x12b)](_0x4bc0db(0xf6));for(const {key:_0x316ae3,value:_0x286d55}of this['getParameters']()){_0x286d55&&console[_0x4bc0db(0x12b)](_0x316ae3+':\x20'+_0x286d55);}}[a35_0x29a16e(0xee)](){const _0xe0f763=a35_0x29a16e;console['log'](_0xe0f763(0xf6));for(const {key:_0x2775fc,value:_0x310078}of this[_0xe0f763(0x122)]()){if(_0x310078){const _0xc4e20b=_0x2775fc===_0xe0f763(0xf9)?'(active)':'('+this[_0xe0f763(0x11e)](_0x2775fc,_0x310078)+')';console[_0xe0f763(0x12b)](_0x2775fc+':\x20'+_0x310078+'\x20'+_0xc4e20b);}}console[_0xe0f763(0x12b)]('\x0a[configuration\x20files]');const _0x37948c=[{'label':'Session','path':this[_0xe0f763(0xf3)][_0xe0f763(0x117)],'extra':_0xe0f763(0x116)+this['sessionId']+')'},{'label':_0xe0f763(0x10f),'path':this[_0xe0f763(0xf3)][_0xe0f763(0x10b)]},{'label':_0xe0f763(0x103),'path':this['configFiles'][_0xe0f763(0xf9)]},{'label':_0xe0f763(0x11f),'path':this[_0xe0f763(0xf3)]['profileCredentials']},{'label':_0xe0f763(0xfd),'path':this[_0xe0f763(0xf3)][_0xe0f763(0xf7)]},{'label':'Global\x20Credentials','path':this['configFiles'][_0xe0f763(0x12a)]}];for(const {label:_0x41b3d7,path:_0x135e07,extra:_0x351972}of _0x37948c){if(_0x135e07)console[_0xe0f763(0x12b)](_0x41b3d7+':\x20'+_0x135e07+'\x20✓'+(_0x351972?'\x20'+_0x351972:''));else{if(_0x41b3d7===_0xe0f763(0x108))console['log'](_0x41b3d7+_0xe0f763(0x123)+this['sessionId']+')');else(_0x41b3d7==='Project'||_0x41b3d7==='Global')&&console[_0xe0f763(0x12b)](_0x41b3d7+_0xe0f763(0xfa));}}}}
1
+ const a35_0x1c7d33=a35_0x11e1;function a35_0x11e1(_0x3469cf,_0x46c4a1){const _0x446b7d=a35_0x446b();return a35_0x11e1=function(_0x11e1fe,_0x23bd4b){_0x11e1fe=_0x11e1fe-0x79;let _0x3bba6d=_0x446b7d[_0x11e1fe];return _0x3bba6d;},a35_0x11e1(_0x3469cf,_0x46c4a1);}(function(_0x1cb943,_0x4d11b6){const _0x59a84c=a35_0x11e1,_0x4b686f=_0x1cb943();while(!![]){try{const _0x1b6fec=parseInt(_0x59a84c(0xb5))/0x1*(-parseInt(_0x59a84c(0x88))/0x2)+parseInt(_0x59a84c(0x7d))/0x3*(parseInt(_0x59a84c(0xaa))/0x4)+-parseInt(_0x59a84c(0x7f))/0x5*(parseInt(_0x59a84c(0xa5))/0x6)+parseInt(_0x59a84c(0xb4))/0x7+parseInt(_0x59a84c(0xab))/0x8*(-parseInt(_0x59a84c(0xb1))/0x9)+parseInt(_0x59a84c(0x8c))/0xa+parseInt(_0x59a84c(0xaf))/0xb;if(_0x1b6fec===_0x4d11b6)break;else _0x4b686f['push'](_0x4b686f['shift']());}catch(_0x135cdd){_0x4b686f['push'](_0x4b686f['shift']());}}}(a35_0x446b,0x5e141));import{resolveSite,getAPIKey,getConfigDir}from'./config.js';import{loadSessionContext}from'./session.js';import{loadProjectConfig,findProjectConfigPath}from'./project-config.js';import{getActiveProfile,loadProfile}from'./profile.js';import*as a35_0x58984e from'node:fs';import*as a35_0x22a422 from'node:path';export class GlobalContext{[a35_0x1c7d33(0x85)];['database'];[a35_0x1c7d33(0x91)];[a35_0x1c7d33(0xb9)];[a35_0x1c7d33(0x89)];[a35_0x1c7d33(0x9e)];['verbose'];[a35_0x1c7d33(0xa0)];[a35_0x1c7d33(0x80)];[a35_0x1c7d33(0x94)];[a35_0x1c7d33(0x95)];constructor(_0x4250fe){const _0x5f5c6d=a35_0x1c7d33;this[_0x5f5c6d(0x94)]=_0x4250fe[_0x5f5c6d(0x8d)]||process[_0x5f5c6d(0x9f)][_0x5f5c6d(0xa8)]();const _0x32896d=loadSessionContext(_0x4250fe['session']),_0x1cba4c=loadProjectConfig(),_0x7610a8=this[_0x5f5c6d(0xb2)]();this[_0x5f5c6d(0x80)]=_0x4250fe[_0x5f5c6d(0xb0)]||_0x32896d?.['profile']||_0x7610a8[_0x5f5c6d(0xb0)]||getActiveProfile();const _0x1eb2cc=this[_0x5f5c6d(0x80)]?loadProfile(this[_0x5f5c6d(0x80)]):null,_0x425724=_0x55943d=>{const _0x5cd137=_0x5f5c6d;if(!_0x55943d)return{};const _0xcc2de2=_0x55943d,_0x562256={};for(const [_0xaf34e,_0x2e4eaa]of Object[_0x5cd137(0x97)](_0xcc2de2)){typeof _0x2e4eaa===_0x5cd137(0xa9)&&(_0x562256[_0xaf34e]=_0x2e4eaa);}return _0x562256;},_0x23c2e9={};if(_0x4250fe[_0x5f5c6d(0x85)]&&_0x4250fe[_0x5f5c6d(0x85)]!=='us01')_0x23c2e9[_0x5f5c6d(0x85)]=_0x4250fe[_0x5f5c6d(0x85)];const _0x5e6aed=_0x32896d?.[_0x5f5c6d(0xa4)],_0x3f79b9=_0x1cba4c?.['database'],_0x5f588d=_0x1eb2cc?.[_0x5f5c6d(0xae)]?.[_0x5f5c6d(0xa4)],_0x2719c3=_0x7610a8['database'];_0x4250fe[_0x5f5c6d(0xa4)]&&(_0x4250fe[_0x5f5c6d(0xa4)]!==_0x5e6aed&&_0x4250fe['database']!==_0x3f79b9&&_0x4250fe[_0x5f5c6d(0xa4)]!==_0x5f588d&&_0x4250fe[_0x5f5c6d(0xa4)]!==_0x2719c3)&&(_0x23c2e9[_0x5f5c6d(0xa4)]=_0x4250fe[_0x5f5c6d(0xa4)]);if(_0x4250fe[_0x5f5c6d(0xb3)])_0x23c2e9[_0x5f5c6d(0x91)]=_0x4250fe['parentSegment'];if(_0x4250fe[_0x5f5c6d(0x8a)])_0x23c2e9[_0x5f5c6d(0x89)]=_0x4250fe['llmProject'];if(_0x4250fe[_0x5f5c6d(0xb0)])_0x23c2e9[_0x5f5c6d(0xb0)]=_0x4250fe[_0x5f5c6d(0xb0)];this[_0x5f5c6d(0xa0)]={'cliFlags':_0x23c2e9,'session':_0x425724(_0x32896d),'project':_0x425724(_0x1cba4c),'profile':_0x425724(_0x1eb2cc?.['config']),'global':_0x425724(_0x7610a8)};const _0x235fb9={...this[_0x5f5c6d(0xa0)][_0x5f5c6d(0xa1)],...this[_0x5f5c6d(0xa0)][_0x5f5c6d(0xb0)],...this[_0x5f5c6d(0xa0)][_0x5f5c6d(0x83)],...this[_0x5f5c6d(0xa0)]['session'],...this[_0x5f5c6d(0xa0)]['cliFlags']},_0x2ba0d0=_0x235fb9['site']||_0x5f5c6d(0x99);this['site']=resolveSite(_0x2ba0d0),this[_0x5f5c6d(0xa4)]=_0x235fb9[_0x5f5c6d(0xa4)],this[_0x5f5c6d(0x91)]=_0x235fb9[_0x5f5c6d(0x91)],this[_0x5f5c6d(0xb9)]=_0x235fb9[_0x5f5c6d(0xb9)],this['llm_project']=_0x235fb9[_0x5f5c6d(0x89)],this[_0x5f5c6d(0x84)]=_0x4250fe[_0x5f5c6d(0x84)]||![],this[_0x5f5c6d(0x9e)]=getAPIKey(this[_0x5f5c6d(0x85)],this[_0x5f5c6d(0x80)]||undefined);const _0x458b64=getConfigDir(),_0x17cf45=a35_0x22a422['join'](_0x458b64,_0x5f5c6d(0xba),this['sessionId']+_0x5f5c6d(0xb6)),_0x44442f=findProjectConfigPath(),_0x5184bd=a35_0x22a422['join'](_0x458b64,'tdx.json'),_0x26d07a=a35_0x22a422['join'](_0x458b64,_0x5f5c6d(0x81));let _0x5eb945=null,_0x3d9977=null;this[_0x5f5c6d(0x80)]&&(_0x5eb945=a35_0x22a422[_0x5f5c6d(0x7b)](_0x458b64,_0x5f5c6d(0xa3),this['activeProfile'],_0x5f5c6d(0x9c)),_0x3d9977=a35_0x22a422[_0x5f5c6d(0x7b)](_0x458b64,_0x5f5c6d(0xa3),this[_0x5f5c6d(0x80)],_0x5f5c6d(0x81))),this[_0x5f5c6d(0x95)]={'session':a35_0x58984e[_0x5f5c6d(0x7c)](_0x17cf45)?_0x17cf45:null,'project':_0x44442f,'profile':_0x5eb945&&a35_0x58984e['existsSync'](_0x5eb945)?_0x5eb945:null,'profileCredentials':_0x3d9977&&a35_0x58984e[_0x5f5c6d(0x7c)](_0x3d9977)?_0x3d9977:null,'global':a35_0x58984e[_0x5f5c6d(0x7c)](_0x5184bd)?_0x5184bd:null,'globalCredentials':a35_0x58984e[_0x5f5c6d(0x7c)](_0x26d07a)?_0x26d07a:null};}['getSource'](_0x2d9b8e,_0x335439){const _0x1c4bbd=a35_0x1c7d33;if(!_0x335439)return _0x1c4bbd(0x93);const _0x43ba4d=_0x335439;if(this[_0x1c4bbd(0xa0)][_0x1c4bbd(0x96)][_0x2d9b8e]===_0x43ba4d){if(_0x2d9b8e===_0x1c4bbd(0x85)&&_0x43ba4d===_0x1c4bbd(0x99)&&!this[_0x1c4bbd(0xa0)][_0x1c4bbd(0x8d)][_0x1c4bbd(0x85)]&&!this[_0x1c4bbd(0xa0)][_0x1c4bbd(0x83)][_0x1c4bbd(0x85)]&&!this['layers'][_0x1c4bbd(0xb0)][_0x1c4bbd(0x85)]&&!this['layers'][_0x1c4bbd(0xa1)][_0x1c4bbd(0x85)])return'default';return _0x1c4bbd(0xb8)+_0x2d9b8e[_0x1c4bbd(0x7e)](/_/g,'-');}if(this['layers'][_0x1c4bbd(0x8d)][_0x2d9b8e]===_0x43ba4d)return _0x1c4bbd(0x8d);if(this['layers'][_0x1c4bbd(0x83)][_0x2d9b8e]===_0x43ba4d)return'project';if(this[_0x1c4bbd(0xa0)]['profile'][_0x2d9b8e]===_0x43ba4d)return'profile:\x20'+this['activeProfile'];if(this[_0x1c4bbd(0xa0)][_0x1c4bbd(0xa1)][_0x2d9b8e]===_0x43ba4d)return _0x1c4bbd(0xa1);return'default';}['loadGlobalConfig'](){const _0xc01289=a35_0x1c7d33,_0x5ba792=a35_0x22a422[_0xc01289(0x7b)](getConfigDir(),'tdx.json');if(!a35_0x58984e[_0xc01289(0x7c)](_0x5ba792))return{};try{const _0x301679=a35_0x58984e[_0xc01289(0x8f)](_0x5ba792,'utf-8');return JSON['parse'](_0x301679);}catch{return{};}}[a35_0x1c7d33(0x98)](_0x3b4714){const _0x22b742=a35_0x1c7d33;_0x3b4714['site']=this[_0x22b742(0x85)],!_0x3b4714['database']&&this[_0x22b742(0xa4)]&&(_0x3b4714['database']=this[_0x22b742(0xa4)]),!_0x3b4714[_0x22b742(0xb3)]&&this[_0x22b742(0x91)]&&(_0x3b4714[_0x22b742(0xb3)]=this[_0x22b742(0x91)]),!_0x3b4714['segmentPath']&&this[_0x22b742(0xb9)]&&(_0x3b4714[_0x22b742(0x8e)]=this[_0x22b742(0xb9)]),!_0x3b4714[_0x22b742(0x8a)]&&this['llm_project']&&(_0x3b4714[_0x22b742(0x8a)]=this[_0x22b742(0x89)]);}[a35_0x1c7d33(0x7a)](){const _0x586101=a35_0x1c7d33;return[{'key':_0x586101(0x85),'value':this[_0x586101(0x85)]},{'key':_0x586101(0xa4),'value':this[_0x586101(0xa4)]},{'key':_0x586101(0x91),'value':this[_0x586101(0x91)]},{'key':'segment_path','value':this['segment_path']},{'key':_0x586101(0x89),'value':this['llm_project']},{'key':_0x586101(0xb0),'value':this[_0x586101(0x80)]||undefined}];}[a35_0x1c7d33(0x82)](){const _0x52856b=a35_0x1c7d33;console[_0x52856b(0x92)](_0x52856b(0x87));for(const {key:_0x42dc89,value:_0x4bc526}of this['getParameters']()){_0x4bc526&&console['log'](_0x42dc89+':\x20'+_0x4bc526);}}[a35_0x1c7d33(0xa7)](){const _0x58b0c2=a35_0x1c7d33;console[_0x58b0c2(0x92)](_0x58b0c2(0x87));for(const {key:_0x2d0775,value:_0x424ae4}of this[_0x58b0c2(0x7a)]()){if(_0x424ae4){const _0x532bbc=_0x2d0775===_0x58b0c2(0xb0)?_0x58b0c2(0xac):'('+this[_0x58b0c2(0xa6)](_0x2d0775,_0x424ae4)+')';console[_0x58b0c2(0x92)](_0x2d0775+':\x20'+_0x424ae4+'\x20'+_0x532bbc);}}console['log'](_0x58b0c2(0xad));const _0x7935e0=[{'label':'Session','path':this[_0x58b0c2(0x95)][_0x58b0c2(0x8d)],'extra':_0x58b0c2(0x8b)+this[_0x58b0c2(0x94)]+')'},{'label':_0x58b0c2(0x90),'path':this['configFiles']['project']},{'label':'Profile','path':this[_0x58b0c2(0x95)][_0x58b0c2(0xb0)]},{'label':_0x58b0c2(0x9a),'path':this[_0x58b0c2(0x95)][_0x58b0c2(0xa2)]},{'label':_0x58b0c2(0x86),'path':this['configFiles'][_0x58b0c2(0xa1)]},{'label':_0x58b0c2(0x9b),'path':this[_0x58b0c2(0x95)][_0x58b0c2(0x9d)]}];for(const {label:_0x3b49ba,path:_0x5d497,extra:_0x3fd530}of _0x7935e0){if(_0x5d497)console[_0x58b0c2(0x92)](_0x3b49ba+':\x20'+_0x5d497+'\x20✓'+(_0x3fd530?'\x20'+_0x3fd530:''));else{if(_0x3b49ba==='Session')console[_0x58b0c2(0x92)](_0x3b49ba+_0x58b0c2(0x79)+this[_0x58b0c2(0x94)]+')');else(_0x3b49ba===_0x58b0c2(0x90)||_0x3b49ba===_0x58b0c2(0x86))&&console[_0x58b0c2(0x92)](_0x3b49ba+_0x58b0c2(0xb7));}}}}function a35_0x446b(){const _0x3b6080=[':\x20none\x20(using\x20session:\x20','getParameters','join','existsSync','627QkzTZb','replace','15350bZlUuN','activeProfile','.env','display','project','verbose','site','Global','[context]','3966wBzqQJ','llm_project','llmProject','(session:\x20','2309860fUjLrS','session','segmentPath','readFileSync','Project','parent_segment','log','not\x20set','sessionId','configFiles','cliFlags','entries','injectIntoOptions','us01','Profile\x20Credentials','Global\x20Credentials','tdx.json','globalCredentials','apiKey','ppid','layers','global','profileCredentials','profiles','database','876DyeibC','getSource','displayWithSources','toString','string','10996eIicwY','104teQaSO','(active)','\x0a[configuration\x20files]','config','2926308wrakyy','profile','107271CIrWcY','loadGlobalConfig','parentSegment','3097164btUcmW','265ZFOODN','.json',':\x20none','CLI\x20flag:\x20--','segment_path','sessions'];a35_0x446b=function(){return _0x3b6080;};return a35_0x446b();}