@treasuredata/tdx 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/client/cdp-api-client.js +1 -1
  6. package/dist/client/engage-api-client.js +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/llm-api-client.js +1 -1
  9. package/dist/client/rate-limiter.js +1 -1
  10. package/dist/client/td-api-client.js +1 -1
  11. package/dist/client/trino-api-client.js +1 -1
  12. package/dist/client/workflow-client.js +1 -1
  13. package/dist/commands/activations.js +1 -1
  14. package/dist/commands/api-command.js +1 -1
  15. package/dist/commands/auth-command.js +1 -1
  16. package/dist/commands/chat-command.js +1 -1
  17. package/dist/commands/claude-command.js +1 -1
  18. package/dist/commands/claude-statusline-command.js +1 -1
  19. package/dist/commands/claude-usage-command.js +1 -1
  20. package/dist/commands/command.js +1 -1
  21. package/dist/commands/context-command.js +1 -1
  22. package/dist/commands/databases.js +1 -1
  23. package/dist/commands/describe.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/job-command.js +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/llm-proxy.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profiles-command.js +1 -1
  30. package/dist/commands/query-command.js +1 -1
  31. package/dist/commands/segment-command.js +1 -1
  32. package/dist/commands/segment-create-command.js +1 -1
  33. package/dist/commands/segment-fields-command.js +1 -1
  34. package/dist/commands/segment-pwd-command.js +1 -1
  35. package/dist/commands/segment-update-command.js +1 -1
  36. package/dist/commands/segment-use-command.js +1 -1
  37. package/dist/commands/segments.js +1 -1
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/tables.js +1 -1
  40. package/dist/commands/use-command.js +1 -1
  41. package/dist/commands/workflow-command.js +1 -1
  42. package/dist/core/auth.js +1 -1
  43. package/dist/core/config.js +1 -1
  44. package/dist/core/credential-cache.js +1 -1
  45. package/dist/core/global-context.js +1 -1
  46. package/dist/core/keychain.js +1 -1
  47. package/dist/core/profile.js +1 -1
  48. package/dist/core/project-config.js +1 -1
  49. package/dist/core/session.js +1 -1
  50. package/dist/index.js +1 -1
  51. package/dist/proxy/anthropic-adapter.js +1 -1
  52. package/dist/proxy/claude-usage-tracker.js +1 -1
  53. package/dist/proxy/context-signature.js +1 -1
  54. package/dist/proxy/conversation-utils.js +1 -1
  55. package/dist/proxy/server.js +1 -1
  56. package/dist/proxy/session-cache.js +1 -1
  57. package/dist/sdk/api.js +1 -1
  58. package/dist/sdk/engage.js +1 -1
  59. package/dist/sdk/errors.js +1 -1
  60. package/dist/sdk/index.js +1 -1
  61. package/dist/sdk/job.js +1 -1
  62. package/dist/sdk/llm.js +1 -1
  63. package/dist/sdk/query.js +1 -1
  64. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  65. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  66. package/dist/sdk/segment.js +1 -1
  67. package/dist/sdk/workflow.js +1 -1
  68. package/dist/types/endpoints.js +1 -1
  69. package/dist/types/index.js +1 -1
  70. package/dist/utils/agent-ref-parser.js +1 -1
  71. package/dist/utils/chat-cache.js +1 -1
  72. package/dist/utils/colors.js +1 -1
  73. package/dist/utils/command-output.js +1 -1
  74. package/dist/utils/constants.js +1 -1
  75. package/dist/utils/diff.js +1 -1
  76. package/dist/utils/fields-display.js +1 -1
  77. package/dist/utils/file-permissions.js +1 -1
  78. package/dist/utils/format-detector.js +1 -1
  79. package/dist/utils/formatters.js +1 -1
  80. package/dist/utils/json-loader.js +1 -1
  81. package/dist/utils/llm-backup-utils.js +1 -1
  82. package/dist/utils/model-aliases.js +1 -1
  83. package/dist/utils/model-factors.js +1 -1
  84. package/dist/utils/option-validation.js +1 -1
  85. package/dist/utils/port.js +1 -1
  86. package/dist/utils/process.js +1 -1
  87. package/dist/utils/prompt.js +1 -1
  88. package/dist/utils/segment-path-parser.js +1 -1
  89. package/dist/utils/segment-ref-parser.js +1 -1
  90. package/dist/utils/spinner.js +1 -1
  91. package/dist/utils/sql-parser.js +1 -1
  92. package/dist/utils/sse-parser.js +1 -1
  93. package/dist/utils/string-utils.js +1 -1
  94. package/dist/utils/table-ref-parser.js +1 -1
  95. package/dist/utils/tdx-logger.js +1 -1
  96. package/dist/utils/tree-formatter.js +1 -1
  97. package/dist/utils/version-check.js +1 -1
  98. package/dist/utils/workflow-utils.js +1 -1
  99. package/package.json +4 -2
@@ -1 +1 @@
1
- function a12_0x5e2b(_0x15f13a,_0x4ce169){const _0x4667a1=a12_0x4667();return a12_0x5e2b=function(_0x5e2bd4,_0x4e4e8f){_0x5e2bd4=_0x5e2bd4-0x7f;let _0x10cb2a=_0x4667a1[_0x5e2bd4];return _0x10cb2a;},a12_0x5e2b(_0x15f13a,_0x4ce169);}const a12_0x26711c=a12_0x5e2b;(function(_0x144eee,_0x2d45ed){const _0x4ecdbd=a12_0x5e2b,_0x567d02=_0x144eee();while(!![]){try{const _0x84020e=-parseInt(_0x4ecdbd(0x91))/0x1*(parseInt(_0x4ecdbd(0xbc))/0x2)+-parseInt(_0x4ecdbd(0x89))/0x3+parseInt(_0x4ecdbd(0x88))/0x4*(parseInt(_0x4ecdbd(0x96))/0x5)+parseInt(_0x4ecdbd(0x9d))/0x6+parseInt(_0x4ecdbd(0xae))/0x7+-parseInt(_0x4ecdbd(0xbb))/0x8*(-parseInt(_0x4ecdbd(0xa9))/0x9)+-parseInt(_0x4ecdbd(0x8a))/0xa*(-parseInt(_0x4ecdbd(0xb6))/0xb);if(_0x84020e===_0x2d45ed)break;else _0x567d02['push'](_0x567d02['shift']());}catch(_0x133fd2){_0x567d02['push'](_0x567d02['shift']());}}}(a12_0x4667,0x38032));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';function a12_0x4667(){const _0x22ffd4=['Invalid\x20header\x20format:\x20\x22','.\x20Valid\x20methods:\x20','verbose','GET','header','PUT','type','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','Invalid\x20HTTP\x20method:\x20','api','workflow','217988yscPte','394611oZnkTv','98390zbppQq','isArray','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','readBodyFromFile','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','noColor','substring','38521neynMw','data','\x22.\x20','toLowerCase','trim','5jGGNfl','headers','log','Error:\x20','error','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','POST','893658ybkOtv','startsWith','Endpoint\x20must\x20start\x20with\x20/:\x20','join','length','PATCH','Invalid\x20API\x20type:\x20','indexOf','entries','.\x20Valid\x20types:\x20','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','authorization','8757rgRAbB','output','keys','\x0aStack\x20trace:\x0a','request','2960055jzIphX','message','x-trino-user','<\x20HTTP/1.1\x20','DELETE','stack','llm','execute','77JFwNgR','file','toUpperCase','cookie','method','736nQXhod','22rBhWsQ','includes'];a12_0x4667=function(){return _0x22ffd4;};return a12_0x4667();}import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';import{getEndpoint}from'../types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set([a12_0x26711c(0xa8),'proxy-authorization',a12_0x26711c(0xb9),'set-cookie','set-cookie2','x-xsrf-token','x-auth-token',a12_0x26711c(0xb0)]);function isSensitiveHeader(_0x2fc9ba){const _0x538d81=a12_0x26711c;return SENSITIVE_HEADERS['has'](_0x2fc9ba[_0x538d81(0x94)]());}function parseHeader(_0x2134da){const _0x379118=a12_0x26711c,_0x26f4ce=_0x2134da[_0x379118(0xa4)](':');if(_0x26f4ce===-0x1)throw new Error(_0x379118(0xbe)+_0x2134da+_0x379118(0x93)+_0x379118(0x9b));const _0x223c25=_0x2134da[_0x379118(0x90)](0x0,_0x26f4ce)['trim'](),_0x663765=_0x2134da['substring'](_0x26f4ce+0x1)[_0x379118(0x95)]();if(!_0x223c25)throw new Error(_0x379118(0xa7)+_0x2134da+'\x22');return[_0x223c25,_0x663765];}export class ApiCommand extends BaseCommand{['name']=a12_0x26711c(0x86);['description']=a12_0x26711c(0x84);['validate'](_0x1195dd){const _0x6adebc=a12_0x26711c,{args:_0x3374c1,options:_0x115cd8}=_0x1195dd,_0x7fc534=_0x115cd8;if(_0x3374c1[_0x6adebc(0xa1)]===0x0)return _0x6adebc(0x8c);const _0x259ae0=_0x3374c1[0x0];if(!_0x259ae0[_0x6adebc(0x9e)]('/'))return _0x6adebc(0x9f)+_0x259ae0;const _0x3a15a8=_0x7fc534['data'],_0x4312c5=_0x7fc534[_0x6adebc(0xb7)];if(_0x3a15a8&&_0x4312c5)return _0x6adebc(0x8e);const _0x4d7812=_0x7fc534[_0x6adebc(0xba)]||_0x6adebc(0x80),_0x50aca3=[_0x6adebc(0x80),_0x6adebc(0x9c),_0x6adebc(0x82),_0x6adebc(0xb2),_0x6adebc(0xa2)];if(!_0x50aca3['includes'](_0x4d7812[_0x6adebc(0xb8)]()))return _0x6adebc(0x85)+_0x4d7812+_0x6adebc(0xbf)+_0x50aca3[_0x6adebc(0xa0)](',\x20');const _0x37eef5=_0x7fc534[_0x6adebc(0x83)]||'td',_0x3f194a=['td','cdp',_0x6adebc(0x87),'trino',_0x6adebc(0xb4)];if(!_0x3f194a[_0x6adebc(0xbd)](_0x37eef5))return _0x6adebc(0xa3)+_0x37eef5+_0x6adebc(0xa6)+_0x3f194a['join'](',\x20');return undefined;}async[a12_0x26711c(0xb5)](_0x2fd647){const _0x21ccda=a12_0x26711c,{options:_0x4e2e7f,args:_0x4cd242,tdx:_0x339ae9}=_0x2fd647,_0xc42a95=_0x4e2e7f,_0xb4a746=_0x4cd242[0x0],_0x3943cd=(_0xc42a95[_0x21ccda(0xba)]||_0x21ccda(0x80))[_0x21ccda(0xb8)](),_0x5b4b6c=_0xc42a95[_0x21ccda(0x92)],_0x46a4bc=_0xc42a95[_0x21ccda(0xb7)],_0x147b8a=_0xc42a95[_0x21ccda(0x81)],_0x41185e=_0xc42a95['type']||'td';try{const _0x227634={};if(_0x147b8a){const _0x49fb36=Array[_0x21ccda(0x8b)](_0x147b8a)?_0x147b8a:[_0x147b8a];for(const _0x56ac63 of _0x49fb36){const [_0x307368,_0x5ac18b]=parseHeader(_0x56ac63);_0x227634[_0x307368]=_0x5ac18b;}}let _0x43f74a;if(_0x5b4b6c)_0x43f74a=_0x5b4b6c;else{if(_0x46a4bc)try{_0x43f74a=RawAPI[_0x21ccda(0x8d)](_0x46a4bc);}catch(_0x4a447b){return console[_0x21ccda(0x9a)](_0x21ccda(0x99)+(_0x4a447b instanceof Error?_0x4a447b[_0x21ccda(0xaf)]:String(_0x4a447b))),0x1;}}const _0x275f90={'method':_0x3943cd,'apiType':_0x41185e,'includeHeaders':_0x4e2e7f[_0x21ccda(0x7f)]};_0x43f74a&&(_0x275f90['body']=_0x43f74a);Object[_0x21ccda(0xab)](_0x227634)[_0x21ccda(0xa1)]>0x0&&(_0x275f90[_0x21ccda(0x97)]=_0x227634);if(_0x4e2e7f[_0x21ccda(0x7f)]){const _0x1f7946=resolveSite(_0x4e2e7f['site']),_0x32ffa0=getEndpoint(_0x1f7946,_0x41185e),_0x29c294=''+_0x32ffa0+_0xb4a746;console[_0x21ccda(0x9a)]('>\x20'+_0x3943cd+'\x20'+_0x29c294);const _0x46096c=getAuthHeaders(_0x1f7946),_0x345b0f={..._0x46096c,..._0x227634};for(const [_0x54a061,_0x27a128]of Object[_0x21ccda(0xa5)](_0x345b0f)){!isSensitiveHeader(_0x54a061)&&console[_0x21ccda(0x9a)]('>\x20'+_0x54a061+':\x20'+_0x27a128);}_0x43f74a&&console[_0x21ccda(0x9a)]('>'),console[_0x21ccda(0x9a)]('');}const _0x423973=await _0x339ae9[_0x21ccda(0x86)][_0x21ccda(0xad)](_0xb4a746,_0x275f90);if(_0x4e2e7f['verbose']&&_0x423973[_0x21ccda(0x97)]){console['error'](_0x21ccda(0xb1)+_0x423973['status']);for(const [_0x46789b,_0x19d260]of Object[_0x21ccda(0xa5)](_0x423973['headers'])){!isSensitiveHeader(_0x46789b)&&console['error']('<\x20'+_0x46789b+':\x20'+_0x19d260);}console[_0x21ccda(0x9a)]('');}const _0x2cca5b=Boolean(_0x4e2e7f['output']),_0x1212c9={'color':_0x4e2e7f['color'],'noColor':_0x4e2e7f[_0x21ccda(0x8f)]||_0x2cca5b&&!_0x4e2e7f['color']},_0x2d3da1=colorizeJSON(_0x423973[_0x21ccda(0x92)],_0x1212c9);return _0x4e2e7f['output']?(writeFileSync(_0x4e2e7f[_0x21ccda(0xaa)],_0x2d3da1),console[_0x21ccda(0x9a)]('Results\x20saved\x20to\x20'+_0x4e2e7f[_0x21ccda(0xaa)])):console[_0x21ccda(0x98)](_0x2d3da1),0x0;}catch(_0x40cbc9){return _0x40cbc9 instanceof Error?(console[_0x21ccda(0x9a)]('Error:\x20'+_0x40cbc9[_0x21ccda(0xaf)]),_0x4e2e7f[_0x21ccda(0x7f)]&&_0x40cbc9[_0x21ccda(0xb3)]&&console[_0x21ccda(0x9a)](_0x21ccda(0xac)+_0x40cbc9[_0x21ccda(0xb3)])):console['error'](_0x21ccda(0x99)+String(_0x40cbc9)),0x1;}}}
1
+ const a12_0x4b9b74=a12_0x29c1;(function(_0x4993e7,_0x16d045){const _0x26ddc9=a12_0x29c1,_0x5f1292=_0x4993e7();while(!![]){try{const _0x37664b=parseInt(_0x26ddc9(0x16f))/0x1*(-parseInt(_0x26ddc9(0x16d))/0x2)+-parseInt(_0x26ddc9(0x167))/0x3*(parseInt(_0x26ddc9(0x155))/0x4)+parseInt(_0x26ddc9(0x17f))/0x5*(-parseInt(_0x26ddc9(0x178))/0x6)+parseInt(_0x26ddc9(0x17c))/0x7*(parseInt(_0x26ddc9(0x177))/0x8)+parseInt(_0x26ddc9(0x175))/0x9+parseInt(_0x26ddc9(0x161))/0xa*(-parseInt(_0x26ddc9(0x151))/0xb)+parseInt(_0x26ddc9(0x181))/0xc;if(_0x37664b===_0x16d045)break;else _0x5f1292['push'](_0x5f1292['shift']());}catch(_0x2e1c92){_0x5f1292['push'](_0x5f1292['shift']());}}}(a12_0x3324,0x6a821));function a12_0x3324(){const _0x42c6fe=['\x22.\x20','name','header','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','set-cookie2','444662Abslet','.\x20Valid\x20methods:\x20','1JUYkdz','toLowerCase','length','body','error','trino','3647313Zveuwh','headers','1493728cwfYjH','113418lkQBMR','verbose','trim','<\x20HTTP/1.1\x20','21vTnpkg','PATCH','keys','110JLyvrY','includes','9825744LsFKHV','Invalid\x20API\x20type:\x20','type','DELETE','stack','color','indexOf','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','Error:\x20','POST','join','validate','Invalid\x20HTTP\x20method:\x20','toUpperCase','file','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','proxy-authorization','has','output','269709cNbUYz','workflow','.\x20Valid\x20types:\x20','Endpoint\x20must\x20start\x20with\x20/:\x20','4dasyJb','startsWith','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','llm','noColor','set-cookie','message','isArray','GET','data','log','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','190OTkZLa','\x0aStack\x20trace:\x0a','x-xsrf-token','Results\x20saved\x20to\x20','api','entries','731706NBKgWn'];a12_0x3324=function(){return _0x42c6fe;};return a12_0x3324();}function a12_0x29c1(_0x5f1d81,_0xff8c4d){const _0x332498=a12_0x3324();return a12_0x29c1=function(_0x29c1b1,_0x43f725){_0x29c1b1=_0x29c1b1-0x14c;let _0x174b09=_0x332498[_0x29c1b1];return _0x174b09;},a12_0x29c1(_0x5f1d81,_0xff8c4d);}import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';import{getEndpoint}from'../types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set(['authorization',a12_0x4b9b74(0x14e),'cookie',a12_0x4b9b74(0x15a),a12_0x4b9b74(0x16c),a12_0x4b9b74(0x163),'x-auth-token','x-trino-user']);function isSensitiveHeader(_0x5ee5b){const _0x17d282=a12_0x4b9b74;return SENSITIVE_HEADERS[_0x17d282(0x14f)](_0x5ee5b[_0x17d282(0x170)]());}function parseHeader(_0x11b166){const _0x3d029f=a12_0x4b9b74,_0x44b8a4=_0x11b166[_0x3d029f(0x187)](':');if(_0x44b8a4===-0x1)throw new Error('Invalid\x20header\x20format:\x20\x22'+_0x11b166+_0x3d029f(0x168)+_0x3d029f(0x14d));const _0x3c640e=_0x11b166['substring'](0x0,_0x44b8a4)[_0x3d029f(0x17a)](),_0x56d675=_0x11b166['substring'](_0x44b8a4+0x1)['trim']();if(!_0x3c640e)throw new Error(_0x3d029f(0x16b)+_0x11b166+'\x22');return[_0x3c640e,_0x56d675];}export class ApiCommand extends BaseCommand{[a12_0x4b9b74(0x169)]=a12_0x4b9b74(0x165);['description']=a12_0x4b9b74(0x160);[a12_0x4b9b74(0x18c)](_0x44bfac){const _0xe5b138=a12_0x4b9b74,{args:_0x4e446e,options:_0x4a8314}=_0x44bfac,_0x4e5aa4=_0x4a8314;if(_0x4e446e[_0xe5b138(0x171)]===0x0)return _0xe5b138(0x157);const _0x5af912=_0x4e446e[0x0];if(!_0x5af912[_0xe5b138(0x156)]('/'))return _0xe5b138(0x154)+_0x5af912;const _0xd89875=_0x4e5aa4[_0xe5b138(0x15e)],_0xa55d09=_0x4e5aa4[_0xe5b138(0x14c)];if(_0xd89875&&_0xa55d09)return _0xe5b138(0x188);const _0x2e4f0b=_0x4e5aa4['method']||_0xe5b138(0x15d),_0x3e106d=[_0xe5b138(0x15d),_0xe5b138(0x18a),'PUT',_0xe5b138(0x184),_0xe5b138(0x17d)];if(!_0x3e106d[_0xe5b138(0x180)](_0x2e4f0b[_0xe5b138(0x18e)]()))return _0xe5b138(0x18d)+_0x2e4f0b+_0xe5b138(0x16e)+_0x3e106d['join'](',\x20');const _0x5b5e4c=_0x4e5aa4['type']||'td',_0x501583=['td','cdp',_0xe5b138(0x152),_0xe5b138(0x174),_0xe5b138(0x158)];if(!_0x501583[_0xe5b138(0x180)](_0x5b5e4c))return _0xe5b138(0x182)+_0x5b5e4c+_0xe5b138(0x153)+_0x501583[_0xe5b138(0x18b)](',\x20');return undefined;}async['execute'](_0x5ddc9e){const _0x14c36e=a12_0x4b9b74,{options:_0x1695fa,args:_0x45d772,tdx:_0x2b94ec}=_0x5ddc9e,_0x1ce3c5=_0x1695fa,_0x4c1bf6=_0x45d772[0x0],_0x17d8ea=(_0x1ce3c5['method']||_0x14c36e(0x15d))[_0x14c36e(0x18e)](),_0x375739=_0x1ce3c5[_0x14c36e(0x15e)],_0x18848=_0x1ce3c5[_0x14c36e(0x14c)],_0x4d4938=_0x1ce3c5[_0x14c36e(0x16a)],_0x24f8e1=_0x1ce3c5[_0x14c36e(0x183)]||'td';try{const _0x5a0756={};if(_0x4d4938){const _0x3e0ad4=Array[_0x14c36e(0x15c)](_0x4d4938)?_0x4d4938:[_0x4d4938];for(const _0x5ed3e8 of _0x3e0ad4){const [_0x31ceec,_0x2f00d7]=parseHeader(_0x5ed3e8);_0x5a0756[_0x31ceec]=_0x2f00d7;}}let _0x191392;if(_0x375739)_0x191392=_0x375739;else{if(_0x18848)try{_0x191392=RawAPI['readBodyFromFile'](_0x18848);}catch(_0x49042d){return console['error']('Error:\x20'+(_0x49042d instanceof Error?_0x49042d['message']:String(_0x49042d))),0x1;}}const _0x3f8004={'method':_0x17d8ea,'apiType':_0x24f8e1,'includeHeaders':_0x1695fa['verbose']};_0x191392&&(_0x3f8004[_0x14c36e(0x172)]=_0x191392);Object[_0x14c36e(0x17e)](_0x5a0756)[_0x14c36e(0x171)]>0x0&&(_0x3f8004[_0x14c36e(0x176)]=_0x5a0756);if(_0x1695fa[_0x14c36e(0x179)]){const _0x1b3d86=resolveSite(_0x1695fa['site']),_0x4934d8=getEndpoint(_0x1b3d86,_0x24f8e1),_0x579e91=''+_0x4934d8+_0x4c1bf6;console[_0x14c36e(0x173)]('>\x20'+_0x17d8ea+'\x20'+_0x579e91);const _0x375a2a=getAuthHeaders(_0x1b3d86),_0x5f5519={..._0x375a2a,..._0x5a0756};for(const [_0x258e88,_0x59343f]of Object[_0x14c36e(0x166)](_0x5f5519)){!isSensitiveHeader(_0x258e88)&&console[_0x14c36e(0x173)]('>\x20'+_0x258e88+':\x20'+_0x59343f);}_0x191392&&console['error']('>'),console['error']('');}const _0x50de14=await _0x2b94ec[_0x14c36e(0x165)]['request'](_0x4c1bf6,_0x3f8004);if(_0x1695fa[_0x14c36e(0x179)]&&_0x50de14[_0x14c36e(0x176)]){console[_0x14c36e(0x173)](_0x14c36e(0x17b)+_0x50de14['status']);for(const [_0x1c1b3c,_0x38a3bc]of Object['entries'](_0x50de14[_0x14c36e(0x176)])){!isSensitiveHeader(_0x1c1b3c)&&console[_0x14c36e(0x173)]('<\x20'+_0x1c1b3c+':\x20'+_0x38a3bc);}console[_0x14c36e(0x173)]('');}const _0xd8391c=Boolean(_0x1695fa[_0x14c36e(0x150)]),_0x24215f={'color':_0x1695fa[_0x14c36e(0x186)],'noColor':_0x1695fa[_0x14c36e(0x159)]||_0xd8391c&&!_0x1695fa['color']},_0x3baba8=colorizeJSON(_0x50de14[_0x14c36e(0x15e)],_0x24215f);return _0x1695fa['output']?(writeFileSync(_0x1695fa[_0x14c36e(0x150)],_0x3baba8),console[_0x14c36e(0x173)](_0x14c36e(0x164)+_0x1695fa['output'])):console[_0x14c36e(0x15f)](_0x3baba8),0x0;}catch(_0x4d6771){return _0x4d6771 instanceof Error?(console['error']('Error:\x20'+_0x4d6771[_0x14c36e(0x15b)]),_0x1695fa[_0x14c36e(0x179)]&&_0x4d6771[_0x14c36e(0x185)]&&console[_0x14c36e(0x173)](_0x14c36e(0x162)+_0x4d6771[_0x14c36e(0x185)])):console['error'](_0x14c36e(0x189)+String(_0x4d6771)),0x1;}}}
@@ -1 +1 @@
1
- function a13_0x1358(){const _0x1ad8e0=['apiKey','You\x20can\x20find\x20your\x20API\x20key\x20at:','description','Site\x20name\x20must\x20contain\x20only\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','No\x20credential\x20found','select','Site\x20name\x20cannot\x20be\x20empty','value','✓\x20Authentication\x20successful\x0a','auth:setup','push','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','us01','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.','\x20\x20Set\x20TD_API_KEY\x20environment\x20variable\x20for\x20authentication.','first_name','profile','jp\x20\x20\x20-\x20Japan','ERROR','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','yellow','\x20\x20tdx','log','other','logLevel','Validating\x20API\x20key...','trim','No\x20API\x20key\x20found\x20in\x20keychain','status','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','tdx:\x20auth\x20setup','4969060BxRjvr','1560978WFkwrm','jobs','findIndex','1133226XYPvQG','bold','176dAZFBA','Name:\x20','✓\x20API\x20key\x20removed\x20from\x20keychain','site','\x20--profile\x20','7558ETVbvg','Enter\x20site\x20name:','text','User:\x20','error','execute','join','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','tdx\x20profile:\x20','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','filter','N/A','create','System\x20keychain\x20is\x20not\x20available','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','red','2538790htQDyS','30LNdKJQ','getUserInfo','message','name','\x0aSetup\x20cancelled','API\x20key\x20cannot\x20be\x20empty','Enter\x20your\x20TD\x20API\x20key:','Select\x20your\x20Treasure\x20Data\x20site:','12424kKEQZW','warn','ap02\x20-\x20Korea','Remove\x20API\x20key\x20from\x20system\x20keychain','Select\x20your\x20Treasure\x20Data\x20site\x20(for\x20profile:\x20','222eNCdTS','Setting\x20up\x20authentication\x20for\x20site:\x20','length','password','5509nTZxaA','customSite','us\x20\x20\x20-\x20United\x20States','\x20for\x20profile:\x20','1210855GpaVHD','eu01','\x20(profile:\x20','last_name','email','✓\x20API\x20key\x20saved\x20to\x20system\x20keychain','auth','eu\x20\x20\x20-\x20Europe','/app/mp/ak','Setup\x20API\x20key\x20authentication\x20interactively'];a13_0x1358=function(){return _0x1ad8e0;};return a13_0x1358();}const a13_0x2c9e62=a13_0x3f03;(function(_0x5f47ef,_0x3f1c18){const _0x44b8d2=a13_0x3f03,_0x16b770=_0x5f47ef();while(!![]){try{const _0x225447=parseInt(_0x44b8d2(0x1fa))/0x1+parseInt(_0x44b8d2(0x201))/0x2*(-parseInt(_0x44b8d2(0x21f))/0x3)+parseInt(_0x44b8d2(0x1f6))/0x4+parseInt(_0x44b8d2(0x1cd))/0x5*(parseInt(_0x44b8d2(0x212))/0x6)+parseInt(_0x44b8d2(0x1c9))/0x7*(parseInt(_0x44b8d2(0x21a))/0x8)+parseInt(_0x44b8d2(0x1f7))/0x9+-parseInt(_0x44b8d2(0x211))/0xa*(parseInt(_0x44b8d2(0x1fc))/0xb);if(_0x225447===_0x3f1c18)break;else _0x16b770['push'](_0x16b770['shift']());}catch(_0x43e3f9){_0x16b770['push'](_0x16b770['shift']());}}}(a13_0x1358,0x9c521));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{saveProfileToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../types/endpoints.js';function a13_0x3f03(_0x126fea,_0x475ed1){const _0x13583d=a13_0x1358();return a13_0x3f03=function(_0x3f0338,_0x571cf9){_0x3f0338=_0x3f0338-0x1c8;let _0x118f84=_0x13583d[_0x3f0338];return _0x118f84;},a13_0x3f03(_0x126fea,_0x475ed1);}import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';import a13_0x5030f8 from'prompts';import{HTTPClientError}from'../client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a13_0x1438cb from'chalk';export class AuthSetupCommand extends BaseCommand{['name']=a13_0x2c9e62(0x1e0);[a13_0x2c9e62(0x1d9)]=a13_0x2c9e62(0x1d6);async[a13_0x2c9e62(0x206)](_0x1daa83){const _0x2cd3aa=a13_0x2c9e62,{options:_0x39c0b5}=_0x1daa83,_0x154ac8=_0x39c0b5[_0x2cd3aa(0x1e7)];console[_0x2cd3aa(0x1ed)](a13_0x1438cb[_0x2cd3aa(0x1fb)](_0x2cd3aa(0x1f5)));const _0x58666e=_0x39c0b5[_0x2cd3aa(0x1ff)]||_0x2cd3aa(0x1e3),_0x5b29e5=[{'title':_0x2cd3aa(0x1cb),'value':_0x2cd3aa(0x1e3)},{'title':_0x2cd3aa(0x1e8),'value':'jp01'},{'title':_0x2cd3aa(0x1d4),'value':_0x2cd3aa(0x1ce)},{'title':_0x2cd3aa(0x21c),'value':'ap02'}];let _0x429efc=_0x5b29e5[_0x2cd3aa(0x1f9)](_0x13018b=>_0x13018b[_0x2cd3aa(0x1de)]===_0x58666e);_0x429efc===-0x1&&_0x58666e!==_0x2cd3aa(0x1e3)&&(_0x5b29e5['push']({'title':_0x58666e,'value':_0x58666e}),_0x429efc=_0x5b29e5[_0x2cd3aa(0x221)]-0x1);_0x5b29e5[_0x2cd3aa(0x1e1)]({'title':'Enter\x20custom\x20site','value':'other'});const _0x30ebf8=_0x154ac8?_0x2cd3aa(0x21e)+_0x154ac8+'):':_0x2cd3aa(0x219),_0x427e9b=await a13_0x5030f8({'type':_0x2cd3aa(0x1dc),'name':_0x2cd3aa(0x1ff),'message':_0x30ebf8,'choices':_0x5b29e5,'initial':_0x429efc>=0x0?_0x429efc:0x0});if(!_0x427e9b[_0x2cd3aa(0x1ff)])return console[_0x2cd3aa(0x1ed)](_0x2cd3aa(0x216)),0x1;let _0x1909fe;if(_0x427e9b[_0x2cd3aa(0x1ff)]===_0x2cd3aa(0x1ee)){const _0x2e6819=await a13_0x5030f8({'type':_0x2cd3aa(0x203),'name':'customSite','message':_0x2cd3aa(0x202),'initial':_0x2cd3aa(0x1e3),'validate':_0x1afab4=>{const _0x5bec88=_0x2cd3aa;if(!_0x1afab4||!_0x1afab4[_0x5bec88(0x1f1)]())return _0x5bec88(0x1dd);if(!/^[a-z0-9-]+$/['test'](_0x1afab4[_0x5bec88(0x1f1)]()))return _0x5bec88(0x1da);return!![];}});if(!_0x2e6819['customSite'])return console['log']('\x0aSetup\x20cancelled'),0x1;_0x1909fe=_0x2e6819[_0x2cd3aa(0x1ca)];}else _0x1909fe=_0x427e9b['site'];const _0x16de12=resolveSite(_0x1909fe);console[_0x2cd3aa(0x1ed)](_0x2cd3aa(0x220)+_0x16de12),console[_0x2cd3aa(0x1ed)](_0x2cd3aa(0x1d8)),console['log']('\x20\x20'+getConsoleUrl(_0x16de12,_0x2cd3aa(0x1d5)));const _0x46e1c6=await a13_0x5030f8({'type':_0x2cd3aa(0x1c8),'name':_0x2cd3aa(0x1d7),'message':_0x2cd3aa(0x218),'validate':_0xe8713e=>{const _0x37f798=_0x2cd3aa;if(!_0xe8713e||!_0xe8713e['trim']())return _0x37f798(0x217);return!![];}});if(!_0x46e1c6[_0x2cd3aa(0x1d7)])return console['log'](_0x2cd3aa(0x216)),0x1;const _0x5c9954=_0x46e1c6[_0x2cd3aa(0x1d7)];console[_0x2cd3aa(0x1ed)](_0x2cd3aa(0x1f0));try{const _0x21bbf1=TDX[_0x2cd3aa(0x20d)]({'site':_0x16de12,'apiKey':_0x5c9954[_0x2cd3aa(0x1f1)](),'logLevel':_0x39c0b5[_0x2cd3aa(0x1ef)]??LogLevel[_0x2cd3aa(0x1e9)]}),_0x467f89=await _0x21bbf1[_0x2cd3aa(0x1f8)][_0x2cd3aa(0x213)]();console[_0x2cd3aa(0x1ed)](_0x2cd3aa(0x208)+_0x467f89[_0x2cd3aa(0x1d1)]+')');const _0x5942bc=await isKeychainAvailable();_0x5942bc?(await saveAPIKeyAsync(_0x5c9954[_0x2cd3aa(0x1f1)](),_0x16de12,_0x154ac8),console[_0x2cd3aa(0x1ed)](_0x2cd3aa(0x1d2)+(_0x154ac8?_0x2cd3aa(0x1cf)+_0x154ac8+')':''))):(console[_0x2cd3aa(0x21b)](a13_0x1438cb[_0x2cd3aa(0x1eb)](_0x2cd3aa(0x20a))),console[_0x2cd3aa(0x21b)](a13_0x1438cb[_0x2cd3aa(0x1eb)](_0x2cd3aa(0x1e5))));if(_0x154ac8){const _0x5efb29={'site':_0x16de12};saveProfileToUserConfig(_0x154ac8,_0x5efb29),console[_0x2cd3aa(0x1ed)]('✓\x20Profile\x20\x27'+_0x154ac8+'\x27\x20registered');}const _0x84f59f=_0x154ac8?_0x2cd3aa(0x200)+_0x154ac8:'';return console[_0x2cd3aa(0x1ed)](),console[_0x2cd3aa(0x1ed)](_0x2cd3aa(0x1f4)),console[_0x2cd3aa(0x1ed)]('\x20\x20tdx'+_0x84f59f+_0x2cd3aa(0x20f)),console['log'](_0x2cd3aa(0x1ec)+_0x84f59f+_0x2cd3aa(0x1ea)),0x0;}catch(_0x337ce3){if(_0x337ce3 instanceof HTTPClientError&&_0x337ce3[_0x2cd3aa(0x1f3)]===0x191)return printAuthError(_0x337ce3),0x1;return console[_0x2cd3aa(0x205)](a13_0x1438cb['red']('✗\x20Validation\x20failed:\x20'+(_0x337ce3 instanceof Error?_0x337ce3[_0x2cd3aa(0x214)]:String(_0x337ce3)))),console[_0x2cd3aa(0x205)](_0x2cd3aa(0x1e4)),0x1;}}}export class AuthStatusCommand extends BaseCommand{[a13_0x2c9e62(0x215)]=a13_0x2c9e62(0x1d3);['description']=a13_0x2c9e62(0x1e2);async[a13_0x2c9e62(0x206)](_0x27a901){const _0x357036=a13_0x2c9e62,{options:_0x285ced,tdx:_0x19a31a}=_0x27a901,_0x48afdc=_0x285ced[_0x357036(0x1ff)],_0x2233f6=_0x285ced['profile'],_0x1d4348=_0x2233f6?_0x2233f6:_0x357036(0x20c);console[_0x357036(0x1ed)](_0x357036(0x209)+_0x1d4348+'\x20(site:\x20'+_0x48afdc+')');const _0x3b6882=await resolveAPIKeyAsync(_0x48afdc,_0x2233f6);if(_0x3b6882){const {source:_0x269bde,isDeprecated:_0x31f48e}=_0x3b6882,_0x5f0e52='Read\x20credential\x20from\x20'+_0x269bde;console['log'](_0x31f48e?a13_0x1438cb[_0x357036(0x1eb)](_0x5f0e52):_0x5f0e52);}else console[_0x357036(0x1ed)](a13_0x1438cb[_0x357036(0x1eb)](_0x357036(0x1db)));try{const _0x211865=await _0x19a31a[_0x357036(0x1f8)][_0x357036(0x213)]();return console[_0x357036(0x1ed)](a13_0x1438cb['green'](_0x357036(0x1df))),console['log'](_0x357036(0x204)+_0x211865[_0x357036(0x1d1)]),(_0x211865[_0x357036(0x1e6)]||_0x211865[_0x357036(0x1d0)])&&console['log'](_0x357036(0x1fd)+[_0x211865[_0x357036(0x1e6)],_0x211865[_0x357036(0x1d0)]][_0x357036(0x20b)](Boolean)[_0x357036(0x207)]('\x20')),0x0;}catch(_0x2f8ad2){return _0x2f8ad2 instanceof HTTPClientError&&_0x2f8ad2[_0x357036(0x1f3)]===0x191?printAuthError(_0x2f8ad2,!![],_0x2233f6):console['error'](a13_0x1438cb[_0x357036(0x210)]('✗\x20Validation\x20failed:\x20'+(_0x2f8ad2 instanceof Error?_0x2f8ad2[_0x357036(0x214)]:String(_0x2f8ad2)))),0x1;}}}export class AuthClearCommand extends BaseCommand{['name']='auth:clear';[a13_0x2c9e62(0x1d9)]=a13_0x2c9e62(0x21d);async[a13_0x2c9e62(0x206)](_0x1960cd){const _0x38fb91=a13_0x2c9e62,{options:_0x5c4109}=_0x1960cd,_0xdb7615=_0x5c4109[_0x38fb91(0x1e7)];console[_0x38fb91(0x1ed)](a13_0x1438cb[_0x38fb91(0x1fb)]('tdx:\x20auth\x20clear'));const _0x87c932=await isKeychainAvailable();if(!_0x87c932)return console[_0x38fb91(0x205)](a13_0x1438cb[_0x38fb91(0x210)](_0x38fb91(0x20e))),0x1;const _0x404ea2=await deleteKeychainAPIKey(_0xdb7615);return _0x404ea2?(clearCredentialCache(),console[_0x38fb91(0x1ed)](_0x38fb91(0x1fe)+(_0xdb7615?'\x20(profile:\x20'+_0xdb7615+')':'')),0x0):(console[_0x38fb91(0x1ed)](_0x38fb91(0x1f2)+(_0xdb7615?_0x38fb91(0x1cc)+_0xdb7615:'')),0x1);}}
1
+ const a13_0x4db0ac=a13_0x31c2;(function(_0x865050,_0x325938){const _0xf5a54=a13_0x31c2,_0x2ae017=_0x865050();while(!![]){try{const _0x4fabf9=-parseInt(_0xf5a54(0x115))/0x1*(parseInt(_0xf5a54(0x126))/0x2)+parseInt(_0xf5a54(0x135))/0x3+parseInt(_0xf5a54(0x13f))/0x4*(-parseInt(_0xf5a54(0x134))/0x5)+parseInt(_0xf5a54(0x102))/0x6*(parseInt(_0xf5a54(0x123))/0x7)+-parseInt(_0xf5a54(0x12f))/0x8+-parseInt(_0xf5a54(0x136))/0x9+parseInt(_0xf5a54(0x100))/0xa*(parseInt(_0xf5a54(0x13b))/0xb);if(_0x4fabf9===_0x325938)break;else _0x2ae017['push'](_0x2ae017['shift']());}catch(_0x3d833f){_0x2ae017['push'](_0x2ae017['shift']());}}}(a13_0x462f,0xee163));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{saveProfileToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../types/endpoints.js';function a13_0x462f(){const _0x2209bf=['auth:setup','Name:\x20','300hMKDmg','No\x20API\x20key\x20found\x20in\x20keychain','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','Read\x20credential\x20from\x20','auth','findIndex','Setting\x20up\x20authentication\x20for\x20site:\x20','Select\x20your\x20Treasure\x20Data\x20site\x20(for\x20profile:\x20','us01','description','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','jp01','Enter\x20site\x20name:','length','red','test','execute','bold','last_name','\x20--profile\x20','70lGtTdT','trim','6zFitrx','Select\x20your\x20Treasure\x20Data\x20site:','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','error','ap02','warn','tdx:\x20auth\x20setup','getUserInfo','log','site','text','status','profile','Remove\x20API\x20key\x20from\x20system\x20keychain','\x0aSetup\x20cancelled','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','You\x20can\x20find\x20your\x20API\x20key\x20at:','User:\x20','us\x20\x20\x20-\x20United\x20States','853SEPaVd','customSite','password','Enter\x20your\x20TD\x20API\x20key:','other','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.','N/A','eu01','name','\x20(profile:\x20','yellow','\x20\x20tdx','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','Enter\x20custom\x20site','5995934DEjKND','\x20for\x20profile:\x20','No\x20credential\x20found','2362Svliqj','System\x20keychain\x20is\x20not\x20available','Setup\x20API\x20key\x20authentication\x20interactively','apiKey','auth:clear','push','join','✓\x20Authentication\x20successful\x0a','ap02\x20-\x20Korea','1753336sCfAyc','create','tdx\x20profile:\x20','email','message','67415mvmFOf','1498926zsiPDI','24642EpufDD','jobs','\x27\x20registered','✗\x20Validation\x20failed:\x20','\x20\x20Set\x20TD_API_KEY\x20environment\x20variable\x20for\x20authentication.','2922106NFrQmO','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases'];a13_0x462f=function(){return _0x2209bf;};return a13_0x462f();}import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';function a13_0x31c2(_0x5109a0,_0x29117c){const _0x462f06=a13_0x462f();return a13_0x31c2=function(_0x31c25d,_0x16f054){_0x31c25d=_0x31c25d-0xf3;let _0x35d489=_0x462f06[_0x31c25d];return _0x35d489;},a13_0x31c2(_0x5109a0,_0x29117c);}import a13_0x893c6c from'prompts';import{HTTPClientError}from'../client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a13_0x5dd652 from'chalk';export class AuthSetupCommand extends BaseCommand{[a13_0x4db0ac(0x11d)]=a13_0x4db0ac(0x13d);[a13_0x4db0ac(0xf5)]=a13_0x4db0ac(0x128);async[a13_0x4db0ac(0xfc)](_0x9f0516){const _0x4c75cf=a13_0x4db0ac,{options:_0x20f3a8}=_0x9f0516,_0x36be0a=_0x20f3a8['profile'];console['log'](a13_0x5dd652[_0x4c75cf(0xfd)](_0x4c75cf(0x108)));const _0x3b18b9=_0x20f3a8[_0x4c75cf(0x10b)]||_0x4c75cf(0xf4),_0x30ab78=[{'title':_0x4c75cf(0x114),'value':_0x4c75cf(0xf4)},{'title':'jp\x20\x20\x20-\x20Japan','value':_0x4c75cf(0xf7)},{'title':'eu\x20\x20\x20-\x20Europe','value':_0x4c75cf(0x11c)},{'title':_0x4c75cf(0x12e),'value':_0x4c75cf(0x106)}];let _0x30d2da=_0x30ab78[_0x4c75cf(0x144)](_0x5e1c19=>_0x5e1c19['value']===_0x3b18b9);_0x30d2da===-0x1&&_0x3b18b9!==_0x4c75cf(0xf4)&&(_0x30ab78[_0x4c75cf(0x12b)]({'title':_0x3b18b9,'value':_0x3b18b9}),_0x30d2da=_0x30ab78[_0x4c75cf(0xf9)]-0x1);_0x30ab78['push']({'title':_0x4c75cf(0x122),'value':_0x4c75cf(0x119)});const _0x286b34=_0x36be0a?_0x4c75cf(0xf3)+_0x36be0a+'):':_0x4c75cf(0x103),_0x217ded=await a13_0x893c6c({'type':'select','name':_0x4c75cf(0x10b),'message':_0x286b34,'choices':_0x30ab78,'initial':_0x30d2da>=0x0?_0x30d2da:0x0});if(!_0x217ded[_0x4c75cf(0x10b)])return console['log'](_0x4c75cf(0x110)),0x1;let _0x598310;if(_0x217ded[_0x4c75cf(0x10b)]==='other'){const _0x7468be=await a13_0x893c6c({'type':_0x4c75cf(0x10c),'name':_0x4c75cf(0x116),'message':_0x4c75cf(0xf8),'initial':_0x4c75cf(0xf4),'validate':_0x69aca7=>{const _0x3495c0=_0x4c75cf;if(!_0x69aca7||!_0x69aca7[_0x3495c0(0x101)]())return'Site\x20name\x20cannot\x20be\x20empty';if(!/^[a-z0-9-]+$/[_0x3495c0(0xfb)](_0x69aca7[_0x3495c0(0x101)]()))return'Site\x20name\x20must\x20contain\x20only\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens';return!![];}});if(!_0x7468be[_0x4c75cf(0x116)])return console[_0x4c75cf(0x10a)]('\x0aSetup\x20cancelled'),0x1;_0x598310=_0x7468be['customSite'];}else _0x598310=_0x217ded[_0x4c75cf(0x10b)];const _0x147571=resolveSite(_0x598310);console[_0x4c75cf(0x10a)](_0x4c75cf(0x145)+_0x147571),console['log'](_0x4c75cf(0x112)),console['log']('\x20\x20'+getConsoleUrl(_0x147571,'/app/mp/ak'));const _0x15788a=await a13_0x893c6c({'type':_0x4c75cf(0x117),'name':_0x4c75cf(0x129),'message':_0x4c75cf(0x118),'validate':_0x4b5b03=>{if(!_0x4b5b03||!_0x4b5b03['trim']())return'API\x20key\x20cannot\x20be\x20empty';return!![];}});if(!_0x15788a['apiKey'])return console[_0x4c75cf(0x10a)](_0x4c75cf(0x110)),0x1;const _0x3e4b4b=_0x15788a[_0x4c75cf(0x129)];console[_0x4c75cf(0x10a)]('Validating\x20API\x20key...');try{const _0x3b6187=TDX[_0x4c75cf(0x130)]({'site':_0x147571,'apiKey':_0x3e4b4b['trim'](),'logLevel':_0x20f3a8['logLevel']??LogLevel['ERROR']}),_0x5d0574=await _0x3b6187[_0x4c75cf(0x137)][_0x4c75cf(0x109)]();console[_0x4c75cf(0x10a)](_0x4c75cf(0x111)+_0x5d0574[_0x4c75cf(0x132)]+')');const _0x2139b4=await isKeychainAvailable();_0x2139b4?(await saveAPIKeyAsync(_0x3e4b4b[_0x4c75cf(0x101)](),_0x147571,_0x36be0a),console[_0x4c75cf(0x10a)]('✓\x20API\x20key\x20saved\x20to\x20system\x20keychain'+(_0x36be0a?'\x20(profile:\x20'+_0x36be0a+')':''))):(console[_0x4c75cf(0x107)](a13_0x5dd652[_0x4c75cf(0x11f)](_0x4c75cf(0x121))),console['warn'](a13_0x5dd652[_0x4c75cf(0x11f)](_0x4c75cf(0x13a))));if(_0x36be0a){const _0xd2fa73={'site':_0x147571};saveProfileToUserConfig(_0x36be0a,_0xd2fa73),console[_0x4c75cf(0x10a)]('✓\x20Profile\x20\x27'+_0x36be0a+_0x4c75cf(0x138));}const _0x5007a6=_0x36be0a?_0x4c75cf(0xff)+_0x36be0a:'';return console['log'](),console[_0x4c75cf(0x10a)](_0x4c75cf(0x104)),console[_0x4c75cf(0x10a)](_0x4c75cf(0x120)+_0x5007a6+_0x4c75cf(0x141)),console[_0x4c75cf(0x10a)](_0x4c75cf(0x120)+_0x5007a6+_0x4c75cf(0x13c)),0x0;}catch(_0x594d9d){if(_0x594d9d instanceof HTTPClientError&&_0x594d9d['status']===0x191)return printAuthError(_0x594d9d),0x1;return console[_0x4c75cf(0x105)](a13_0x5dd652[_0x4c75cf(0xfa)](_0x4c75cf(0x139)+(_0x594d9d instanceof Error?_0x594d9d[_0x4c75cf(0x133)]:String(_0x594d9d)))),console[_0x4c75cf(0x105)](_0x4c75cf(0x11a)),0x1;}}}export class AuthStatusCommand extends BaseCommand{[a13_0x4db0ac(0x11d)]=a13_0x4db0ac(0x143);[a13_0x4db0ac(0xf5)]=a13_0x4db0ac(0xf6);async[a13_0x4db0ac(0xfc)](_0x3a89b3){const _0x2823cc=a13_0x4db0ac,{options:_0x5ec334,tdx:_0x53ea67}=_0x3a89b3,_0x3e1eda=_0x5ec334[_0x2823cc(0x10b)],_0x284a25=_0x5ec334['profile'],_0x278bf9=_0x284a25?_0x284a25:_0x2823cc(0x11b);console[_0x2823cc(0x10a)](_0x2823cc(0x131)+_0x278bf9+'\x20(site:\x20'+_0x3e1eda+')');const _0x548658=await resolveAPIKeyAsync(_0x3e1eda,_0x284a25);if(_0x548658){const {source:_0x4f2d1a,isDeprecated:_0x2132c0}=_0x548658,_0xee1027=_0x2823cc(0x142)+_0x4f2d1a;console[_0x2823cc(0x10a)](_0x2132c0?a13_0x5dd652[_0x2823cc(0x11f)](_0xee1027):_0xee1027);}else console['log'](a13_0x5dd652[_0x2823cc(0x11f)](_0x2823cc(0x125)));try{const _0x50f80a=await _0x53ea67[_0x2823cc(0x137)][_0x2823cc(0x109)]();return console[_0x2823cc(0x10a)](a13_0x5dd652['green'](_0x2823cc(0x12d))),console[_0x2823cc(0x10a)](_0x2823cc(0x113)+_0x50f80a['email']),(_0x50f80a['first_name']||_0x50f80a[_0x2823cc(0xfe)])&&console[_0x2823cc(0x10a)](_0x2823cc(0x13e)+[_0x50f80a['first_name'],_0x50f80a['last_name']]['filter'](Boolean)[_0x2823cc(0x12c)]('\x20')),0x0;}catch(_0xe72b35){return _0xe72b35 instanceof HTTPClientError&&_0xe72b35[_0x2823cc(0x10d)]===0x191?printAuthError(_0xe72b35,!![],_0x284a25):console[_0x2823cc(0x105)](a13_0x5dd652['red'](_0x2823cc(0x139)+(_0xe72b35 instanceof Error?_0xe72b35[_0x2823cc(0x133)]:String(_0xe72b35)))),0x1;}}}export class AuthClearCommand extends BaseCommand{[a13_0x4db0ac(0x11d)]=a13_0x4db0ac(0x12a);[a13_0x4db0ac(0xf5)]=a13_0x4db0ac(0x10f);async[a13_0x4db0ac(0xfc)](_0x16ff4c){const _0x47b691=a13_0x4db0ac,{options:_0x2ab50f}=_0x16ff4c,_0x477898=_0x2ab50f[_0x47b691(0x10e)];console[_0x47b691(0x10a)](a13_0x5dd652['bold']('tdx:\x20auth\x20clear'));const _0x264b5f=await isKeychainAvailable();if(!_0x264b5f)return console[_0x47b691(0x105)](a13_0x5dd652[_0x47b691(0xfa)](_0x47b691(0x127))),0x1;const _0x52effd=await deleteKeychainAPIKey(_0x477898);return _0x52effd?(clearCredentialCache(),console[_0x47b691(0x10a)]('✓\x20API\x20key\x20removed\x20from\x20keychain'+(_0x477898?_0x47b691(0x11e)+_0x477898+')':'')),0x0):(console[_0x47b691(0x10a)](_0x47b691(0x140)+(_0x477898?_0x47b691(0x124)+_0x477898:'')),0x1);}}
@@ -1 +1 @@
1
- const a14_0x2e3dc6=a14_0x44da;function a14_0x44da(_0x141cc8,_0x16921c){const _0x5b8dc5=a14_0x5b8d();return a14_0x44da=function(_0x44da9f,_0x5ea22e){_0x44da9f=_0x44da9f-0xa2;let _0x556082=_0x5b8dc5[_0x44da9f];return _0x556082;},a14_0x44da(_0x141cc8,_0x16921c);}(function(_0x2f199c,_0x31e3e2){const _0x5f4e59=a14_0x44da,_0x504348=_0x2f199c();while(!![]){try{const _0x4db99c=parseInt(_0x5f4e59(0xc6))/0x1+-parseInt(_0x5f4e59(0xc4))/0x2*(-parseInt(_0x5f4e59(0xc3))/0x3)+-parseInt(_0x5f4e59(0xa3))/0x4+parseInt(_0x5f4e59(0xd4))/0x5+-parseInt(_0x5f4e59(0xd9))/0x6+-parseInt(_0x5f4e59(0xcb))/0x7*(-parseInt(_0x5f4e59(0xd7))/0x8)+-parseInt(_0x5f4e59(0xab))/0x9;if(_0x4db99c===_0x31e3e2)break;else _0x504348['push'](_0x504348['shift']());}catch(_0x40fdf4){_0x504348['push'](_0x504348['shift']());}}}(a14_0x5b8d,0xb1bdd));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import{parseAgentRef}from'../utils/agent-ref-parser.js';import{saveLastChatId,loadLastChatId}from'../utils/chat-cache.js';import{resolveModelAlias}from'../utils/model-aliases.js';function handleSDKError(_0xc2058,_0x11e6f8){const _0x29fd16=a14_0x44da;if(_0xc2058 instanceof SDKError)console['error'](_0x29fd16(0xb0)+_0xc2058[_0x29fd16(0xce)]),_0x11e6f8[_0x29fd16(0xaf)]&&(_0xc2058['cause']&&console[_0x29fd16(0xa7)](_0x29fd16(0xa5)+_0xc2058['cause']),_0xc2058[_0x29fd16(0xb3)]&&(console[_0x29fd16(0xa7)]('\x0aStack\x20trace:'),console[_0x29fd16(0xa7)](_0xc2058[_0x29fd16(0xb3)])));else throw _0xc2058;}export class ChatCommand extends BaseCommand{[a14_0x2e3dc6(0xbc)]='chat';['description']=a14_0x2e3dc6(0xd2);['validate'](_0x3d1ff5){const _0x4b551c=a14_0x2e3dc6,_0x4a2bc8=_0x3d1ff5[_0x4b551c(0xb4)][_0x4b551c(0xa8)]('\x20');if(!_0x4a2bc8)return _0x4b551c(0xdb);return undefined;}async[a14_0x2e3dc6(0xb7)](_0x1f6aed,_0x587553,_0x146039,_0x1214d4,_0x5cf09d){const _0x558d5d=a14_0x2e3dc6;for await(const _0x536f1d of _0x1f6aed['llm'][_0x558d5d(0xc5)](_0x587553,{'agentId':_0x146039,'chatId':_0x1214d4})){if(_0x536f1d[_0x558d5d(0xd3)]==='metadata'){const _0x530a7e=_0x536f1d[_0x558d5d(0xc1)][_0x558d5d(0xc9)];saveLastChatId(_0x530a7e),_0x5cf09d&&console[_0x558d5d(0xa7)](_0x558d5d(0xa9)+_0x530a7e);}else _0x536f1d[_0x558d5d(0xd3)]===_0x558d5d(0xc7)&&this['handleSSEEvent'](_0x536f1d[_0x558d5d(0xc1)]);}}async[a14_0x2e3dc6(0xbe)](_0x323a65,_0x432efe,_0x24659b,_0x2fc86c,_0x297e44){const _0x22d14d=a14_0x2e3dc6;if(_0x432efe){const {projectName:_0x40d90e,agentName:_0x48f64a}=parseAgentRef(_0x432efe);if(!_0x48f64a)throw new Error(_0x22d14d(0xd6));const _0x2f18da=await withSpinner(_0x22d14d(0xa6)+_0x40d90e+'\x27...',()=>_0x323a65[_0x22d14d(0xbf)][_0x22d14d(0xba)](_0x40d90e),{'verbose':_0x297e44}),_0x407c60=await withSpinner(_0x22d14d(0xc2)+_0x48f64a+_0x22d14d(0xb2),()=>_0x323a65['llm']['resolveAgentId'](_0x48f64a,_0x2f18da['data']),{'verbose':_0x297e44});return _0x407c60[_0x22d14d(0xc1)];}else{const _0xe7dce1=_0x24659b||_0x22d14d(0xbd),_0x10c887=resolveModelAlias(_0xe7dce1),_0x365854=await withSpinner(_0x22d14d(0xd5)+_0x10c887+_0x22d14d(0xb2),()=>_0x323a65[_0x22d14d(0xbf)][_0x22d14d(0xbb)](_0x10c887,0x0,_0x2fc86c),{'verbose':_0x297e44});return _0x365854[_0x22d14d(0xc1)]['id'];}}async[a14_0x2e3dc6(0xb8)](_0x3022f5){const _0x7924fc=a14_0x2e3dc6,{options:_0x3941b7,args:_0x54db7f,tdx:_0x3fc0c6}=_0x3022f5,_0x9febec=_0x54db7f[_0x7924fc(0xa8)]('\x20'),_0x2ae449=_0x3941b7,_0x76cec7=_0x2ae449[_0x7924fc(0xad)],_0x10d07f=_0x2ae449[_0x7924fc(0xa4)],_0x17dfd2=_0x2ae449[_0x7924fc(0xcf)]?Number(_0x2ae449[_0x7924fc(0xcf)]):undefined,_0x16af62=_0x2ae449['new'];try{let _0x2af6a7,_0x434b23;!_0x16af62&&(_0x434b23=loadLastChatId(),_0x434b23&&_0x3941b7[_0x7924fc(0xaf)]&&console['error'](_0x7924fc(0xb9)+_0x434b23));(_0x16af62||!_0x434b23)&&(_0x2af6a7=await this[_0x7924fc(0xbe)](_0x3fc0c6,_0x76cec7,_0x10d07f,_0x17dfd2,_0x3941b7[_0x7924fc(0xaf)]));try{await this[_0x7924fc(0xb7)](_0x3fc0c6,_0x9febec,_0x2af6a7,_0x434b23,_0x3941b7[_0x7924fc(0xaf)]);}catch(_0x2c937f){const _0x5c75c4=_0x2c937f instanceof SDKError&&_0x2c937f[_0x7924fc(0xd8)]===ErrorCode['CHAT_NOT_FOUND']||_0x2c937f instanceof Error&&_0x2c937f['message'][_0x7924fc(0xb5)]('404');if(_0x5c75c4)_0x3941b7[_0x7924fc(0xaf)]&&console[_0x7924fc(0xa7)](_0x7924fc(0xc0)),!_0x2af6a7&&(_0x2af6a7=await this[_0x7924fc(0xbe)](_0x3fc0c6,_0x76cec7,_0x10d07f,_0x17dfd2,_0x3941b7['verbose'])),await this['streamChat'](_0x3fc0c6,_0x9febec,_0x2af6a7,undefined,_0x3941b7[_0x7924fc(0xaf)]);else throw _0x2c937f;}return console[_0x7924fc(0xc8)](),0x0;}catch(_0x60cc0a){return console[_0x7924fc(0xa7)](),handleSDKError(_0x60cc0a,_0x3941b7),0x1;}}[a14_0x2e3dc6(0xae)](_0x2bbd03){const _0x4d537e=a14_0x2e3dc6;if('content'in _0x2bbd03)process['stdout']['write'](_0x2bbd03[_0x4d537e(0xaa)]);else{if(_0x4d537e(0xda)in _0x2bbd03)process['stderr']['write'](_0x4d537e(0xa2)+_0x2bbd03[_0x4d537e(0xda)][_0x4d537e(0xb1)]+']\x0a');else{if(_0x4d537e(0xd1)in _0x2bbd03)process[_0x4d537e(0xd0)][_0x4d537e(0xcc)](_0x4d537e(0xb6)+_0x2bbd03['tool'][_0x4d537e(0xb1)]+']\x0a');else{if(_0x4d537e(0xcd)in _0x2bbd03)process[_0x4d537e(0xd0)]['write'](_0x4d537e(0xca)+_0x2bbd03['output'][_0x4d537e(0xbc)]+']\x0a'),process[_0x4d537e(0xd0)][_0x4d537e(0xcc)](_0x2bbd03[_0x4d537e(0xcd)][_0x4d537e(0xaa)]+'\x0a');else _0x4d537e(0xa7)in _0x2bbd03&&process['stderr'][_0x4d537e(0xcc)](_0x4d537e(0xac)+_0x2bbd03[_0x4d537e(0xa7)]+']\x0a');}}}}}function a14_0x5b8d(){const _0x4493ed=['log','chatId','\x0a[Output:\x20','1678593GbbhuE','write','output','message','temperature','stderr','tool','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)','type','603740GeUfVG','Getting\x20agent\x20for\x20model\x20\x27','Agent\x20reference\x20must\x20include\x20project\x20name.\x20Usage:\x20--agent\x20\x22Project/Agent\x22','24OntVcn','code','5471154kKHINp','tool_call','Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options','\x0a[Tool:\x20','1137108DpAzVC','model','\x20\x20Cause:\x20','Resolving\x20project\x20\x27','error','join','Chat\x20session:\x20','content','6868899TgHDKT','\x0a[Error:\x20','agent','handleSSEEvent','verbose','Error:\x20','functionName','\x27...','stack','args','includes','[Tool\x20result:\x20','streamChat','execute','Continuing\x20chat:\x20','resolveProjectId','getOrCreateDefaultAgent','name','haiku','getAgentId','llm','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','data','Resolving\x20agent\x20\x27','1643646ZoSKtK','2ihXgfg','chat','1299349iNtPbK','event'];a14_0x5b8d=function(){return _0x4493ed;};return a14_0x5b8d();}
1
+ const a14_0x143b20=a14_0x620b;(function(_0xf1d3ef,_0x1253ea){const _0x36c1f3=a14_0x620b,_0x3434a3=_0xf1d3ef();while(!![]){try{const _0x326267=-parseInt(_0x36c1f3(0x13f))/0x1*(parseInt(_0x36c1f3(0x150))/0x2)+parseInt(_0x36c1f3(0x141))/0x3+-parseInt(_0x36c1f3(0x14a))/0x4*(-parseInt(_0x36c1f3(0x13c))/0x5)+-parseInt(_0x36c1f3(0x135))/0x6+-parseInt(_0x36c1f3(0x140))/0x7*(parseInt(_0x36c1f3(0x163))/0x8)+parseInt(_0x36c1f3(0x139))/0x9*(parseInt(_0x36c1f3(0x162))/0xa)+parseInt(_0x36c1f3(0x156))/0xb*(parseInt(_0x36c1f3(0x12c))/0xc);if(_0x326267===_0x1253ea)break;else _0x3434a3['push'](_0x3434a3['shift']());}catch(_0xcd3324){_0x3434a3['push'](_0x3434a3['shift']());}}}(a14_0x25b0,0x1a38a));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import{parseAgentRef}from'../utils/agent-ref-parser.js';import{saveLastChatId,loadLastChatId}from'../utils/chat-cache.js';function a14_0x25b0(){const _0x46b8a9=['\x20\x20Cause:\x20','functionName','56590tYcJxK','335464SOIGar','verbose','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','agent','model','write','metadata','204nqcvxO','output','validate','temperature','type','execute','Resolving\x20project\x20\x27','streamChat','code','132006CIeEbh','chatId','\x0a[Error:\x20','[Tool\x20result:\x20','108KdLzJW','cause','stderr','3685oPRkOX','log','getOrCreateDefaultAgent','214SZozOH','21MXrkSX','202758yEDTSC','stdout','getAgentId','join','Chat\x20session:\x20','handleSSEEvent','tool_call','message','\x27...','464lJrcNp','Error:\x20','Getting\x20agent\x20for\x20model\x20\x27','event','description','tool','698VONfuh','name','llm','Continuing\x20chat:\x20','error','stack','70466VJxLdb','content','Resolving\x20agent\x20\x27','resolveProjectId','resolveAgentId','data','CHAT_NOT_FOUND','\x0aStack\x20trace:','404','\x0a[Output:\x20'];a14_0x25b0=function(){return _0x46b8a9;};return a14_0x25b0();}function a14_0x620b(_0x29dd9d,_0xe1d3f8){const _0x25b003=a14_0x25b0();return a14_0x620b=function(_0x620b0b,_0x4927fa){_0x620b0b=_0x620b0b-0x129;let _0x457574=_0x25b003[_0x620b0b];return _0x457574;},a14_0x620b(_0x29dd9d,_0xe1d3f8);}import{resolveModelAlias}from'../utils/model-aliases.js';function handleSDKError(_0x5d6c71,_0x452809){const _0x33f29f=a14_0x620b;if(_0x5d6c71 instanceof SDKError)console[_0x33f29f(0x154)](_0x33f29f(0x14b)+_0x5d6c71[_0x33f29f(0x148)]),_0x452809[_0x33f29f(0x164)]&&(_0x5d6c71[_0x33f29f(0x13a)]&&console[_0x33f29f(0x154)](_0x33f29f(0x160)+_0x5d6c71[_0x33f29f(0x13a)]),_0x5d6c71['stack']&&(console[_0x33f29f(0x154)](_0x33f29f(0x15d)),console[_0x33f29f(0x154)](_0x5d6c71[_0x33f29f(0x155)])));else throw _0x5d6c71;}export class ChatCommand extends BaseCommand{[a14_0x143b20(0x151)]='chat';[a14_0x143b20(0x14e)]='Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)';[a14_0x143b20(0x12e)](_0x4d250b){const _0x2c9c84=a14_0x143b20,_0x2c5ce7=_0x4d250b['args'][_0x2c9c84(0x144)]('\x20');if(!_0x2c5ce7)return'Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options';return undefined;}async[a14_0x143b20(0x133)](_0x1c629d,_0x336219,_0x1e861d,_0x48aeaf,_0x2067c0){const _0x251998=a14_0x143b20;for await(const _0x3c1538 of _0x1c629d[_0x251998(0x152)]['chat'](_0x336219,{'agentId':_0x1e861d,'chatId':_0x48aeaf})){if(_0x3c1538[_0x251998(0x130)]===_0x251998(0x12b)){const _0x40aba8=_0x3c1538[_0x251998(0x15b)][_0x251998(0x136)];saveLastChatId(_0x40aba8),_0x2067c0&&console[_0x251998(0x154)](_0x251998(0x145)+_0x40aba8);}else _0x3c1538[_0x251998(0x130)]===_0x251998(0x14d)&&this['handleSSEEvent'](_0x3c1538[_0x251998(0x15b)]);}}async['getAgentId'](_0x433b47,_0x2c7d54,_0x4b6699,_0x1a52d0,_0x40c4a5){const _0x5c2b94=a14_0x143b20;if(_0x2c7d54){const {projectName:_0x2fa574,agentName:_0x436bec}=parseAgentRef(_0x2c7d54);if(!_0x436bec)throw new Error('Agent\x20reference\x20must\x20include\x20project\x20name.\x20Usage:\x20--agent\x20\x22Project/Agent\x22');const _0x7ef848=await withSpinner(_0x5c2b94(0x132)+_0x2fa574+_0x5c2b94(0x149),()=>_0x433b47[_0x5c2b94(0x152)][_0x5c2b94(0x159)](_0x2fa574),{'verbose':_0x40c4a5}),_0x78111e=await withSpinner(_0x5c2b94(0x158)+_0x436bec+_0x5c2b94(0x149),()=>_0x433b47[_0x5c2b94(0x152)][_0x5c2b94(0x15a)](_0x436bec,_0x7ef848[_0x5c2b94(0x15b)]),{'verbose':_0x40c4a5});return _0x78111e['data'];}else{const _0x3ba978=_0x4b6699||'haiku',_0x146269=resolveModelAlias(_0x3ba978),_0x41d0d8=await withSpinner(_0x5c2b94(0x14c)+_0x146269+'\x27...',()=>_0x433b47['llm'][_0x5c2b94(0x13e)](_0x146269,0x0,_0x1a52d0),{'verbose':_0x40c4a5});return _0x41d0d8['data']['id'];}}async[a14_0x143b20(0x131)](_0x35e546){const _0x17e21e=a14_0x143b20,{options:_0x14f873,args:_0x3e05be,tdx:_0x3b287c}=_0x35e546,_0x529127=_0x3e05be[_0x17e21e(0x144)]('\x20'),_0x3bc5a5=_0x14f873,_0x2e8396=_0x3bc5a5[_0x17e21e(0x166)],_0x2a2a9e=_0x3bc5a5[_0x17e21e(0x129)],_0x3e3727=_0x3bc5a5['temperature']?Number(_0x3bc5a5[_0x17e21e(0x12f)]):undefined,_0x5e6413=_0x3bc5a5['new'];try{let _0x5c367c,_0x239199;!_0x5e6413&&(_0x239199=loadLastChatId(),_0x239199&&_0x14f873[_0x17e21e(0x164)]&&console['error'](_0x17e21e(0x153)+_0x239199));(_0x5e6413||!_0x239199)&&(_0x5c367c=await this[_0x17e21e(0x143)](_0x3b287c,_0x2e8396,_0x2a2a9e,_0x3e3727,_0x14f873[_0x17e21e(0x164)]));try{await this['streamChat'](_0x3b287c,_0x529127,_0x5c367c,_0x239199,_0x14f873[_0x17e21e(0x164)]);}catch(_0xcc9bdb){const _0x1b6886=_0xcc9bdb instanceof SDKError&&_0xcc9bdb[_0x17e21e(0x134)]===ErrorCode[_0x17e21e(0x15c)]||_0xcc9bdb instanceof Error&&_0xcc9bdb[_0x17e21e(0x148)]['includes'](_0x17e21e(0x15e));if(_0x1b6886)_0x14f873[_0x17e21e(0x164)]&&console[_0x17e21e(0x154)](_0x17e21e(0x165)),!_0x5c367c&&(_0x5c367c=await this[_0x17e21e(0x143)](_0x3b287c,_0x2e8396,_0x2a2a9e,_0x3e3727,_0x14f873[_0x17e21e(0x164)])),await this[_0x17e21e(0x133)](_0x3b287c,_0x529127,_0x5c367c,undefined,_0x14f873[_0x17e21e(0x164)]);else throw _0xcc9bdb;}return console[_0x17e21e(0x13d)](),0x0;}catch(_0x5e0bf1){return console['error'](),handleSDKError(_0x5e0bf1,_0x14f873),0x1;}}[a14_0x143b20(0x146)](_0x1887ba){const _0xe6883d=a14_0x143b20;if('content'in _0x1887ba)process[_0xe6883d(0x142)][_0xe6883d(0x12a)](_0x1887ba['content']);else{if('tool_call'in _0x1887ba)process[_0xe6883d(0x13b)][_0xe6883d(0x12a)]('\x0a[Tool:\x20'+_0x1887ba[_0xe6883d(0x147)][_0xe6883d(0x161)]+']\x0a');else{if(_0xe6883d(0x14f)in _0x1887ba)process[_0xe6883d(0x13b)][_0xe6883d(0x12a)](_0xe6883d(0x138)+_0x1887ba[_0xe6883d(0x14f)][_0xe6883d(0x161)]+']\x0a');else{if('output'in _0x1887ba)process['stderr'][_0xe6883d(0x12a)](_0xe6883d(0x15f)+_0x1887ba[_0xe6883d(0x12d)][_0xe6883d(0x151)]+']\x0a'),process[_0xe6883d(0x13b)][_0xe6883d(0x12a)](_0x1887ba[_0xe6883d(0x12d)][_0xe6883d(0x157)]+'\x0a');else _0xe6883d(0x154)in _0x1887ba&&process[_0xe6883d(0x13b)][_0xe6883d(0x12a)](_0xe6883d(0x137)+_0x1887ba[_0xe6883d(0x154)]+']\x0a');}}}}}
@@ -1 +1 @@
1
- const a15_0x32522a=a15_0x32ea;function a15_0x2b8e(){const _0x37eb46=['green','data','site','✓\x20Using\x20project:\x20','✓\x20Port\x20','Failed\x20to\x20configure\x20marketplace\x20\x27','inherit','trim','\x27\x20installed','✓\x20Logs\x20saved\x20to\x20','utf-8','already\x20installed','\x20already\x20configured','td-skills\x20Plugins','includes','sql-skills','INSTALLATION_FAILED','object','error','install','join','localhost','which','✓\x20Marketplace\x20\x27','close','llm','parse','toString','COMMAND_NOT_FOUND','3197858IvbQky','getLogPath','tdx','attributes','Updating\x20marketplace\x20\x27','Starting\x20TD\x20LLM\x20proxy\x20server...','sonnet','765hCEfMs','Failed\x20to\x20update\x20marketplace\x20\x27','td-skills','Executing:\x20claude\x20','fail','start','execute','settings.local.json','✓\x20Plugin\x20\x27','):\x20claude\x20','Command\x20output:\x20','plugin','claude','✓\x20Settings\x20restored:\x20.claude/settings.local.json','ANTHROPIC_MODEL','Failed\x20to\x20install\x20plugin\x20\x27','text','Failed\x20to\x20launch\x20Claude\x20Code:\x20','https://github.com/treasure-data/td-skills','cause','already\x20exists','env','debug','verbose','findClaudePath','cwd','7275790ZtyBJx','add','659950juZeNV','hostname','Warning:\x20Failed\x20to\x20configure\x20','string','2131136AsUhMK','Setting\x20up\x20project...','server','54500OjvwHx','http://127.0.0.1:','✓\x20MCP\x20server\x20\x27','message','name','warn','stringify','statusLine','profile','proxy','originalSettings','TD\x20Docs\x20MCP\x20Server','logger','tdx\x20claude\x20statusline','exit','log','\x27...','Configuring\x20marketplace\x20\x27','127.0.0.1','✓\x20TD\x20LLM\x20proxy\x20running\x20on\x20port\x20','--transport','Creating\x20.claude/settings.local.json...','ANTHROPIC_BASE_URL','84AYUzvR','marketplace','.claude','command','red','model','140344APyimW','tdx-skills','tdx\x20--profile\x20','Finding\x20available\x20port...','Command\x20failed\x20(exit\x20','mcp','Configuring\x20MCP\x20server\x20\x27','Setup\x20failed','\x20claude\x20statusline','✓\x20Logging\x20to\x20','stop','\x20configuration\x20failed','714918gDePTe','3smSWqV'];a15_0x2b8e=function(){return _0x37eb46;};return a15_0x2b8e();}(function(_0x14e606,_0x202fe8){const _0x45df1e=a15_0x32ea,_0x59bc46=_0x14e606();while(!![]){try{const _0x564b41=parseInt(_0x45df1e(0x184))/0x1+-parseInt(_0x45df1e(0x15a))/0x2+-parseInt(_0x45df1e(0x13c))/0x3*(parseInt(_0x45df1e(0x12f))/0x4)+-parseInt(_0x45df1e(0x17b))/0x5+parseInt(_0x45df1e(0x13b))/0x6*(-parseInt(_0x45df1e(0x129))/0x7)+-parseInt(_0x45df1e(0x181))/0x8+-parseInt(_0x45df1e(0x161))/0x9*(-parseInt(_0x45df1e(0x17d))/0xa);if(_0x564b41===_0x202fe8)break;else _0x59bc46['push'](_0x59bc46['shift']());}catch(_0x442c11){_0x59bc46['push'](_0x59bc46['shift']());}}}(a15_0x2b8e,0xd6852));import{spawn}from'node:child_process';function a15_0x32ea(_0x539d27,_0x2e48e7){const _0x2b8e1f=a15_0x2b8e();return a15_0x32ea=function(_0x32ea49,_0x26c18b){_0x32ea49=_0x32ea49-0x123;let _0x2010e2=_0x2b8e1f[_0x32ea49];return _0x2010e2;},a15_0x32ea(_0x539d27,_0x2e48e7);}import{readFile,writeFile,mkdir}from'node:fs/promises';import{existsSync}from'node:fs';import{join}from'node:path';import a15_0x3db7a8 from'chalk';import{BaseCommand}from'./command.js';import{ProxyServer}from'../proxy/server.js';import{TDXLogger}from'../utils/tdx-logger.js';import{findAvailablePort}from'../utils/port.js';import{SDKError,ErrorCode,errorContains}from'../sdk/errors.js';import{createCommandSpinner}from'../utils/spinner.js';function handleInstallationError(_0x5226bc,_0x4a6644,_0x17704d,_0x2a57ac){const _0x3b359f=a15_0x32ea;errorContains(_0x5226bc,_0x3b359f(0x175),_0x3b359f(0x148),'already\x20configured')?(_0x17704d[_0x3b359f(0x171)]='✓\x20'+_0x4a6644+_0x3b359f(0x149),_0x2a57ac?.['info'](_0x4a6644+_0x3b359f(0x149)),_0x5226bc instanceof SDKError&&_0x5226bc[_0x3b359f(0x174)]&&_0x2a57ac?.[_0x3b359f(0x177)](_0x3b359f(0x16b)+_0x5226bc[_0x3b359f(0x174)][_0x3b359f(0x187)])):(_0x17704d[_0x3b359f(0x189)](_0x3b359f(0x17f)+_0x4a6644),_0x2a57ac?.[_0x3b359f(0x14f)](_0x4a6644+_0x3b359f(0x13a),_0x5226bc));}async function executeClaudeCommand(_0x44e8cd,_0x493e73,_0x1236e6){const _0x2dca39=a15_0x32ea;return _0x1236e6?.['info'](_0x2dca39(0x164)+_0x44e8cd[_0x2dca39(0x151)]('\x20')),new Promise((_0x2dca9b,_0x4a3f57)=>{const _0x1de899=_0x2dca39,_0xc6024e=spawn(_0x1de899(0x16d),_0x44e8cd,{'stdio':'pipe'});let _0x181f4a='',_0x2b5e67='';_0xc6024e['stdout']['on'](_0x1de899(0x13e),_0x35bff9=>{const _0x407536=_0x1de899;_0x181f4a+=_0x35bff9[_0x407536(0x158)]();}),_0xc6024e['stderr']['on'](_0x1de899(0x13e),_0x5c5556=>{const _0x431e05=_0x1de899;_0x2b5e67+=_0x5c5556[_0x431e05(0x158)]();}),_0xc6024e['on'](_0x1de899(0x192),_0x4cc180=>{const _0xb9eddb=_0x1de899;if(_0x4cc180===0x0)_0x2dca9b(_0x181f4a);else _0x493e73?(_0x1236e6?.['error'](_0xb9eddb(0x133)+_0x4cc180+_0xb9eddb(0x16a)+_0x44e8cd['join']('\x20')),_0x4a3f57(new SDKError(ErrorCode[_0xb9eddb(0x14d)],_0x493e73,new Error(_0x2b5e67)))):_0x2dca9b('');});});}async function ensureMcpServer(_0x69c530,_0xb7735,_0x13882d,_0x8bab27,_0x52d572){const _0x2edf77=a15_0x32ea;_0x8bab27['text']=_0x2edf77(0x135)+_0x69c530+_0x2edf77(0x194),await executeClaudeCommand([_0x2edf77(0x134),'add',_0x69c530,_0xb7735,_0x2edf77(0x126),_0x13882d],'Failed\x20to\x20configure\x20MCP\x20server\x20\x27'+_0x69c530+'\x27',_0x52d572),_0x8bab27['text']=_0x2edf77(0x186)+_0x69c530+'\x27\x20configured';}async function ensureMarketplace(_0x3340f1,_0x2efec0,_0x447678,_0x28b8af){const _0xc02047=a15_0x32ea;_0x447678[_0xc02047(0x171)]=_0xc02047(0x123)+_0x3340f1+_0xc02047(0x194),await executeClaudeCommand([_0xc02047(0x16c),'marketplace',_0xc02047(0x17c),_0x2efec0],_0xc02047(0x142)+_0x3340f1+'\x27',_0x28b8af),_0x447678[_0xc02047(0x171)]=_0xc02047(0x154)+_0x3340f1+'\x27\x20configured';}async function updateMarketplace(_0x968a64,_0x11a012,_0x1be2ff){const _0x3faf26=a15_0x32ea;_0x11a012['text']=_0x3faf26(0x15e)+_0x968a64+_0x3faf26(0x194),await executeClaudeCommand([_0x3faf26(0x16c),_0x3faf26(0x12a),'update'],_0x3faf26(0x162)+_0x968a64+'\x27',_0x1be2ff),_0x11a012['text']='✓\x20Marketplace\x20\x27'+_0x968a64+'\x27\x20updated';}async function ensurePlugin(_0x5ec643,_0x5fbed3,_0x2c8fe1,_0x3da0ad){const _0x2be522=a15_0x32ea;_0x2c8fe1[_0x2be522(0x171)]='Installing\x20plugin\x20\x27'+_0x5ec643+_0x2be522(0x194),await executeClaudeCommand(['plugin',_0x2be522(0x150),_0x5ec643+'@'+_0x5fbed3],_0x2be522(0x170)+_0x5ec643+'\x27',_0x3da0ad),_0x2c8fe1[_0x2be522(0x171)]=_0x2be522(0x169)+_0x5ec643+_0x2be522(0x145);}async function createClaudeSettings(_0x292d5d,_0x34867b=a15_0x32522a(0x160),_0x49c362){const _0x25a7d5=a15_0x32522a,_0x1c8505=join(process[_0x25a7d5(0x17a)](),'.claude'),_0x35c217=join(_0x1c8505,_0x25a7d5(0x168));await mkdir(_0x1c8505,{'recursive':!![]});let _0x41cc4d={};if(existsSync(_0x35c217))try{const _0x7edfd9=await readFile(_0x35c217,_0x25a7d5(0x147));_0x41cc4d=JSON[_0x25a7d5(0x157)](_0x7edfd9);}catch{_0x41cc4d={};}const _0x3314e2=_0x41cc4d['env']||{},_0x3eeebf={'ANTHROPIC_BASE_URL':_0x3314e2[_0x25a7d5(0x128)],'ANTHROPIC_MODEL':_0x3314e2[_0x25a7d5(0x16f)],'statusLine':_0x41cc4d['statusLine']},_0x52bbf3={..._0x41cc4d,'env':{..._0x3314e2,'ANTHROPIC_BASE_URL':_0x25a7d5(0x185)+_0x292d5d,'ANTHROPIC_MODEL':_0x34867b},'statusLine':{'type':_0x25a7d5(0x12c),'command':_0x49c362?_0x25a7d5(0x131)+_0x49c362+_0x25a7d5(0x137):_0x25a7d5(0x191)}};return await writeFile(_0x35c217,JSON[_0x25a7d5(0x18a)](_0x52bbf3,null,0x2)+'\x0a'),_0x3eeebf;}async function restoreClaudeSettings(_0x5c4715){const _0x547378=a15_0x32522a,_0x564ed4=join(process[_0x547378(0x17a)](),_0x547378(0x12b)),_0x264584=join(_0x564ed4,_0x547378(0x168));if(!existsSync(_0x264584))return;try{const _0x3d2c9b=await readFile(_0x264584,_0x547378(0x147)),_0x30dc67=JSON[_0x547378(0x157)](_0x3d2c9b),_0x33f71f=_0x30dc67[_0x547378(0x176)]||{},_0x477fac=_0x33f71f[_0x547378(0x128)],_0x4d3f03=((()=>{const _0x30e966=_0x547378;if(typeof _0x477fac!==_0x30e966(0x180))return![];try{const _0x453d98=new URL(_0x477fac);return _0x453d98[_0x30e966(0x17e)]===_0x30e966(0x152)||_0x453d98[_0x30e966(0x17e)]===_0x30e966(0x124);}catch{return![];}})());_0x4d3f03?(delete _0x33f71f[_0x547378(0x128)],delete _0x33f71f[_0x547378(0x16f)]):(_0x5c4715[_0x547378(0x128)]!==undefined?_0x33f71f[_0x547378(0x128)]=_0x5c4715[_0x547378(0x128)]:delete _0x33f71f[_0x547378(0x128)],_0x5c4715[_0x547378(0x16f)]!==undefined?_0x33f71f[_0x547378(0x16f)]=_0x5c4715[_0x547378(0x16f)]:delete _0x33f71f[_0x547378(0x16f)]);const _0x2d5af6=_0x30dc67[_0x547378(0x18b)],_0x54ce69=((()=>{const _0x4b4e65=_0x547378;if(!_0x2d5af6||typeof _0x2d5af6!==_0x4b4e65(0x14e))return![];if(_0x2d5af6['type']!==_0x4b4e65(0x12c))return![];if(typeof _0x2d5af6[_0x4b4e65(0x12c)]!=='string')return![];return _0x2d5af6['command'][_0x4b4e65(0x14b)](_0x4b4e65(0x15c))&&_0x2d5af6['command'][_0x4b4e65(0x14b)]('statusline');})());if(_0x54ce69)delete _0x30dc67['statusLine'];else _0x5c4715[_0x547378(0x18b)]!==undefined?_0x30dc67[_0x547378(0x18b)]=_0x5c4715['statusLine']:delete _0x30dc67['statusLine'];_0x30dc67[_0x547378(0x176)]=_0x33f71f,await writeFile(_0x264584,JSON[_0x547378(0x18a)](_0x30dc67,null,0x2)+'\x0a');}catch{}}export class ClaudeCommand extends BaseCommand{['name']='claude';['description']='Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy';['server'];[a15_0x32522a(0x18e)];[a15_0x32522a(0x190)];async[a15_0x32522a(0x167)](_0x39fd9d){const _0x5cd4c1=a15_0x32522a,{tdx:_0x1e0b3e,options:_0x69d0e4,args:_0x5c63da}=_0x39fd9d;try{const _0x2fc274=_0x69d0e4,_0x2b740b=_0x2fc274[_0x5cd4c1(0x12e)]||_0x5cd4c1(0x160),_0x5745be=_0x2fc274[_0x5cd4c1(0x18d)]===![],_0x451f58=createCommandSpinner('Initializing...',{'verbose':_0x69d0e4[_0x5cd4c1(0x178)]});_0x451f58[_0x5cd4c1(0x166)]();try{if(!_0x5745be){_0x451f58[_0x5cd4c1(0x171)]=_0x5cd4c1(0x132);const _0x46f7fb=await findAvailablePort(0xfa0);_0x451f58[_0x5cd4c1(0x171)]=_0x5cd4c1(0x141)+_0x46f7fb,_0x451f58[_0x5cd4c1(0x171)]=_0x5cd4c1(0x182);const _0x548426=await _0x1e0b3e[_0x5cd4c1(0x156)]['getOrCreateDefaultProject'](),_0x1d954e=_0x548426['id'];_0x451f58[_0x5cd4c1(0x171)]=_0x5cd4c1(0x140)+_0x548426[_0x5cd4c1(0x15d)][_0x5cd4c1(0x188)],_0x451f58[_0x5cd4c1(0x171)]='Initializing\x20proxy\x20logger...',this[_0x5cd4c1(0x190)]=new TDXLogger(_0x69d0e4['logLevel'],!![]),await this[_0x5cd4c1(0x190)]['init']();const _0x32faa6=this[_0x5cd4c1(0x190)][_0x5cd4c1(0x15b)]();_0x451f58[_0x5cd4c1(0x171)]=_0x5cd4c1(0x138)+_0x32faa6,_0x451f58[_0x5cd4c1(0x171)]=_0x5cd4c1(0x15f),this[_0x5cd4c1(0x183)]=new ProxyServer({'port':_0x46f7fb,'projectId':_0x1d954e,'tdx':_0x1e0b3e,'logger':this[_0x5cd4c1(0x190)],'site':_0x69d0e4[_0x5cd4c1(0x13f)]}),await this[_0x5cd4c1(0x183)][_0x5cd4c1(0x166)](),_0x451f58[_0x5cd4c1(0x171)]=_0x5cd4c1(0x125)+_0x46f7fb,_0x451f58[_0x5cd4c1(0x171)]=_0x5cd4c1(0x127);const _0x2c4620=_0x69d0e4[_0x5cd4c1(0x18c)];this[_0x5cd4c1(0x18e)]=await createClaudeSettings(_0x46f7fb,_0x2b740b,_0x2c4620),_0x451f58[_0x5cd4c1(0x171)]='✓\x20Settings\x20configured:\x20.claude/settings.local.json';}else _0x451f58[_0x5cd4c1(0x171)]='Skipping\x20TD\x20LLM\x20proxy\x20setup\x20(--no-proxy)';try{await ensureMcpServer('td-docs','https://docs.treasuredata.com/mcp','http',_0x451f58,this['logger']);}catch(_0x529fc9){handleInstallationError(_0x529fc9,_0x5cd4c1(0x18f),_0x451f58,this['logger']);}try{await ensureMarketplace('td-skills',_0x5cd4c1(0x173),_0x451f58,this[_0x5cd4c1(0x190)]),await updateMarketplace(_0x5cd4c1(0x163),_0x451f58,this['logger']),await ensurePlugin(_0x5cd4c1(0x14c),_0x5cd4c1(0x163),_0x451f58,this[_0x5cd4c1(0x190)]),await ensurePlugin('workflow-skills',_0x5cd4c1(0x163),_0x451f58,this[_0x5cd4c1(0x190)]),await ensurePlugin(_0x5cd4c1(0x130),_0x5cd4c1(0x163),_0x451f58,this['logger']);}catch(_0x2bb314){handleInstallationError(_0x2bb314,_0x5cd4c1(0x14a),_0x451f58,this[_0x5cd4c1(0x190)]);}_0x451f58['stop']();}catch(_0x915b60){_0x451f58[_0x5cd4c1(0x165)](_0x5cd4c1(0x136));throw _0x915b60;}const _0x12cdd7=await this[_0x5cd4c1(0x179)]();if(!_0x12cdd7)throw new SDKError(ErrorCode[_0x5cd4c1(0x159)],'Claude\x20Code\x20CLI\x20not\x20found',undefined,{'helpText':'Please\x20install\x20Claude\x20Code\x20from\x20https://claude.com/claude-code'});const _0x2de097=spawn(_0x12cdd7,_0x5c63da,{'stdio':_0x5cd4c1(0x143)}),_0xd44b09=await new Promise(_0x6ccd26=>{const _0x4f6675=_0x5cd4c1;_0x2de097['on'](_0x4f6675(0x192),_0x4a39d0=>{_0x6ccd26(_0x4a39d0||0x0);}),_0x2de097['on'](_0x4f6675(0x14f),_0x1d0c51=>{const _0x1353c2=_0x4f6675;console[_0x1353c2(0x14f)](a15_0x3db7a8[_0x1353c2(0x12d)](_0x1353c2(0x172)+_0x1d0c51['message'])),_0x6ccd26(0x1);});});this[_0x5cd4c1(0x183)]&&(await this[_0x5cd4c1(0x183)]['stop'](),console['log'](a15_0x3db7a8[_0x5cd4c1(0x13d)]('✓\x20TD\x20LLM\x20proxy\x20server\x20stopped')));if(this[_0x5cd4c1(0x190)]){await this[_0x5cd4c1(0x190)][_0x5cd4c1(0x155)]();const _0x2a3b90=this[_0x5cd4c1(0x190)][_0x5cd4c1(0x15b)]();console['log'](a15_0x3db7a8[_0x5cd4c1(0x13d)](_0x5cd4c1(0x146)+_0x2a3b90));}return this['originalSettings']&&(await restoreClaudeSettings(this[_0x5cd4c1(0x18e)]),console[_0x5cd4c1(0x193)](a15_0x3db7a8['green'](_0x5cd4c1(0x16e)))),_0xd44b09;}catch(_0x567040){this[_0x5cd4c1(0x183)]&&await this[_0x5cd4c1(0x183)][_0x5cd4c1(0x139)]();this[_0x5cd4c1(0x190)]&&await this['logger']['close']();this[_0x5cd4c1(0x18e)]&&await restoreClaudeSettings(this[_0x5cd4c1(0x18e)]);throw _0x567040;}}async[a15_0x32522a(0x179)](){return new Promise(_0x49fafd=>{const _0x1dddb7=a15_0x32ea,_0x347e96=spawn(_0x1dddb7(0x153),[_0x1dddb7(0x16d)]);let _0x408a9e='';_0x347e96['stdout']['on'](_0x1dddb7(0x13e),_0x367012=>{const _0x2057fe=_0x1dddb7;_0x408a9e+=_0x367012[_0x2057fe(0x158)]();}),_0x347e96['on']('exit',_0x403eed=>{const _0x5380f5=_0x1dddb7;_0x403eed===0x0&&_0x408a9e[_0x5380f5(0x144)]()?_0x49fafd(_0x408a9e['trim']()):_0x49fafd('claude');});});}}
1
+ const a15_0x47d289=a15_0x61f9;function a15_0x4e94(){const _0x5edf63=['trim','add','start','already\x20installed','✓\x20TD\x20LLM\x20proxy\x20running\x20on\x20port\x20','\x27\x20updated','Failed\x20to\x20configure\x20marketplace\x20\x27','✓\x20Logging\x20to\x20','red','data','✓\x20Marketplace\x20\x27','Installing\x20plugin\x20\x27','tdx','findClaudePath','string','execute','COMMAND_NOT_FOUND','56GCbdly','\x27...','log','debug','exit','INSTALLATION_FAILED','close','Configuring\x20MCP\x20server\x20\x27','workflow-skills','green','utf-8','cwd','info','ANTHROPIC_MODEL','site','marketplace','1348119aRzPqx','https://github.com/treasure-data/td-skills','5394292LHZAGe','https://docs.treasuredata.com/mcp','✓\x20Settings\x20configured:\x20.claude/settings.local.json','):\x20claude\x20','llm','cause','message','\x27\x20installed','Command\x20failed\x20(exit\x20','verbose','4367619yYmGkP','fail','which','logger','hostname','Creating\x20.claude/settings.local.json...','--transport','install','server','toString','tdx\x20--profile\x20','stderr','Setting\x20up\x20project...','getLogPath','\x20claude\x20statusline','error','includes','Failed\x20to\x20install\x20plugin\x20\x27','\x27\x20configured','ANTHROPIC_BASE_URL','stdout','type','Claude\x20Code\x20CLI\x20not\x20found','Failed\x20to\x20launch\x20Claude\x20Code:\x20','Initializing\x20proxy\x20logger...','Starting\x20TD\x20LLM\x20proxy\x20server...','logLevel','\x20already\x20configured','td-docs','stringify','\x20configuration\x20failed','env','stop','settings.local.json','11759502ULpZeG','✓\x20TD\x20LLM\x20proxy\x20server\x20stopped','Executing:\x20claude\x20','update','statusline','.claude','✓\x20Logs\x20saved\x20to\x20','getOrCreateDefaultProject','description','754710nyXXxg','✓\x20Plugin\x20\x27','Warning:\x20Failed\x20to\x20configure\x20','command','name','already\x20configured','td-skills\x20Plugins','claude','TD\x20Docs\x20MCP\x20Server','5AxfWIq','Skipping\x20TD\x20LLM\x20proxy\x20setup\x20(--no-proxy)','originalSettings','statusLine','text','td-skills','20QVjniu','plugin','parse','12358430WhiFFT','join','mcp','http://127.0.0.1:','105767CrQZGl','model','sonnet','✓\x20Settings\x20restored:\x20.claude/settings.local.json','Updating\x20marketplace\x20\x27','2vYqpGs','Finding\x20available\x20port...'];a15_0x4e94=function(){return _0x5edf63;};return a15_0x4e94();}(function(_0xe47e47,_0x48d9c0){const _0x40296c=a15_0x61f9,_0x26fc4e=_0xe47e47();while(!![]){try{const _0x3384cd=parseInt(_0x40296c(0x1cb))/0x1+parseInt(_0x40296c(0x1d0))/0x2*(-parseInt(_0x40296c(0x18a))/0x3)+-parseInt(_0x40296c(0x180))/0x4*(-parseInt(_0x40296c(0x1be))/0x5)+-parseInt(_0x40296c(0x1ac))/0x6+parseInt(_0x40296c(0x1c7))/0x7+parseInt(_0x40296c(0x1e3))/0x8*(parseInt(_0x40296c(0x17e))/0x9)+-parseInt(_0x40296c(0x1c4))/0xa*(-parseInt(_0x40296c(0x1b5))/0xb);if(_0x3384cd===_0x48d9c0)break;else _0x26fc4e['push'](_0x26fc4e['shift']());}catch(_0x55558d){_0x26fc4e['push'](_0x26fc4e['shift']());}}}(a15_0x4e94,0xf1a65));import{spawn}from'node:child_process';import{readFile,writeFile,mkdir}from'node:fs/promises';function a15_0x61f9(_0x175f4c,_0x2da378){const _0x4e946f=a15_0x4e94();return a15_0x61f9=function(_0x61f929,_0x8a1bc2){_0x61f929=_0x61f929-0x17b;let _0x22806a=_0x4e946f[_0x61f929];return _0x22806a;},a15_0x61f9(_0x175f4c,_0x2da378);}import{existsSync}from'node:fs';import{join}from'node:path';import a15_0xb87d5d from'chalk';import{BaseCommand}from'./command.js';import{ProxyServer}from'../proxy/server.js';import{TDXLogger}from'../utils/tdx-logger.js';import{findAvailablePort}from'../utils/port.js';import{SDKError,ErrorCode,errorContains}from'../sdk/errors.js';import{createCommandSpinner}from'../utils/spinner.js';function handleInstallationError(_0x3f18af,_0x58cb37,_0x36b633,_0x2e5111){const _0x254724=a15_0x61f9;errorContains(_0x3f18af,'already\x20exists',_0x254724(0x1d5),_0x254724(0x1ba))?(_0x36b633[_0x254724(0x1c2)]='✓\x20'+_0x58cb37+_0x254724(0x1a5),_0x2e5111?.['info'](_0x58cb37+_0x254724(0x1a5)),_0x3f18af instanceof SDKError&&_0x3f18af[_0x254724(0x185)]&&_0x2e5111?.[_0x254724(0x1e6)]('Command\x20output:\x20'+_0x3f18af['cause'][_0x254724(0x186)])):(_0x36b633['warn'](_0x254724(0x1b7)+_0x58cb37),_0x2e5111?.['error'](_0x58cb37+_0x254724(0x1a8),_0x3f18af));}async function executeClaudeCommand(_0x5c5983,_0x4770ce,_0x5e6d05){const _0x272d81=a15_0x61f9;return _0x5e6d05?.[_0x272d81(0x1ef)](_0x272d81(0x1ae)+_0x5c5983[_0x272d81(0x1c8)]('\x20')),new Promise((_0x56869d,_0x274a1e)=>{const _0x59d205=_0x272d81,_0x52d1fc=spawn('claude',_0x5c5983,{'stdio':'pipe'});let _0x3ca996='',_0x5360e6='';_0x52d1fc[_0x59d205(0x19e)]['on'](_0x59d205(0x1db),_0xf6d3e9=>{const _0x21c199=_0x59d205;_0x3ca996+=_0xf6d3e9[_0x21c199(0x193)]();}),_0x52d1fc[_0x59d205(0x195)]['on'](_0x59d205(0x1db),_0x558c57=>{_0x5360e6+=_0x558c57['toString']();}),_0x52d1fc['on'](_0x59d205(0x1e7),_0x280981=>{const _0x1c3286=_0x59d205;if(_0x280981===0x0)_0x56869d(_0x3ca996);else _0x4770ce?(_0x5e6d05?.[_0x1c3286(0x199)](_0x1c3286(0x188)+_0x280981+_0x1c3286(0x183)+_0x5c5983['join']('\x20')),_0x274a1e(new SDKError(ErrorCode[_0x1c3286(0x1e8)],_0x4770ce,new Error(_0x5360e6)))):_0x56869d('');});});}async function ensureMcpServer(_0xbbc1cb,_0x31f0ec,_0x51d91a,_0x338df4,_0x57fc13){const _0x4871f6=a15_0x61f9;_0x338df4[_0x4871f6(0x1c2)]=_0x4871f6(0x1ea)+_0xbbc1cb+_0x4871f6(0x1e4),await executeClaudeCommand([_0x4871f6(0x1c9),'add',_0xbbc1cb,_0x31f0ec,_0x4871f6(0x190),_0x51d91a],'Failed\x20to\x20configure\x20MCP\x20server\x20\x27'+_0xbbc1cb+'\x27',_0x57fc13),_0x338df4[_0x4871f6(0x1c2)]='✓\x20MCP\x20server\x20\x27'+_0xbbc1cb+_0x4871f6(0x19c);}async function ensureMarketplace(_0x22a68b,_0x345937,_0x18e810,_0x3905f9){const _0x398451=a15_0x61f9;_0x18e810['text']='Configuring\x20marketplace\x20\x27'+_0x22a68b+'\x27...',await executeClaudeCommand([_0x398451(0x1c5),_0x398451(0x17d),_0x398451(0x1d3),_0x345937],_0x398451(0x1d8)+_0x22a68b+'\x27',_0x3905f9),_0x18e810[_0x398451(0x1c2)]=_0x398451(0x1dc)+_0x22a68b+_0x398451(0x19c);}async function updateMarketplace(_0x371019,_0x12c498,_0x73eb03){const _0x1d4635=a15_0x61f9;_0x12c498[_0x1d4635(0x1c2)]=_0x1d4635(0x1cf)+_0x371019+_0x1d4635(0x1e4),await executeClaudeCommand(['plugin',_0x1d4635(0x17d),_0x1d4635(0x1af)],'Failed\x20to\x20update\x20marketplace\x20\x27'+_0x371019+'\x27',_0x73eb03),_0x12c498[_0x1d4635(0x1c2)]='✓\x20Marketplace\x20\x27'+_0x371019+_0x1d4635(0x1d7);}async function ensurePlugin(_0x2b9477,_0xe0968e,_0x1aa553,_0x190897){const _0x44813b=a15_0x61f9;_0x1aa553['text']=_0x44813b(0x1dd)+_0x2b9477+_0x44813b(0x1e4),await executeClaudeCommand(['plugin',_0x44813b(0x191),_0x2b9477+'@'+_0xe0968e],_0x44813b(0x19b)+_0x2b9477+'\x27',_0x190897),_0x1aa553[_0x44813b(0x1c2)]=_0x44813b(0x1b6)+_0x2b9477+_0x44813b(0x187);}async function createClaudeSettings(_0x4e34a4,_0x17b882=a15_0x47d289(0x1cd),_0x52cd33){const _0x22d63c=a15_0x47d289,_0x38164a=join(process[_0x22d63c(0x1ee)](),_0x22d63c(0x1b1)),_0x2a184c=join(_0x38164a,_0x22d63c(0x1ab));await mkdir(_0x38164a,{'recursive':!![]});let _0x44acdb={};if(existsSync(_0x2a184c))try{const _0xd107fe=await readFile(_0x2a184c,'utf-8');_0x44acdb=JSON['parse'](_0xd107fe);}catch{_0x44acdb={};}const _0x41b912=_0x44acdb[_0x22d63c(0x1a9)]||{},_0x321321={'ANTHROPIC_BASE_URL':_0x41b912[_0x22d63c(0x19d)],'ANTHROPIC_MODEL':_0x41b912[_0x22d63c(0x17b)],'statusLine':_0x44acdb[_0x22d63c(0x1c1)]},_0x3ddfd7={..._0x44acdb,'env':{..._0x41b912,'ANTHROPIC_BASE_URL':_0x22d63c(0x1ca)+_0x4e34a4,'ANTHROPIC_MODEL':_0x17b882},'statusLine':{'type':_0x22d63c(0x1b8),'command':_0x52cd33?_0x22d63c(0x194)+_0x52cd33+_0x22d63c(0x198):'tdx\x20claude\x20statusline'}};return await writeFile(_0x2a184c,JSON[_0x22d63c(0x1a7)](_0x3ddfd7,null,0x2)+'\x0a'),_0x321321;}async function restoreClaudeSettings(_0x200533){const _0x51af74=a15_0x47d289,_0x5986a2=join(process[_0x51af74(0x1ee)](),_0x51af74(0x1b1)),_0x43f263=join(_0x5986a2,_0x51af74(0x1ab));if(!existsSync(_0x43f263))return;try{const _0x5c7a4d=await readFile(_0x43f263,_0x51af74(0x1ed)),_0x2ef4dc=JSON[_0x51af74(0x1c6)](_0x5c7a4d),_0xb61892=_0x2ef4dc[_0x51af74(0x1a9)]||{},_0x3a47df=_0xb61892['ANTHROPIC_BASE_URL'],_0x4e337a=((()=>{const _0x2321d6=_0x51af74;if(typeof _0x3a47df!==_0x2321d6(0x1e0))return![];try{const _0x9c95f5=new URL(_0x3a47df);return _0x9c95f5['hostname']==='localhost'||_0x9c95f5[_0x2321d6(0x18e)]==='127.0.0.1';}catch{return![];}})());_0x4e337a?(delete _0xb61892['ANTHROPIC_BASE_URL'],delete _0xb61892[_0x51af74(0x17b)]):(_0x200533[_0x51af74(0x19d)]!==undefined?_0xb61892[_0x51af74(0x19d)]=_0x200533[_0x51af74(0x19d)]:delete _0xb61892[_0x51af74(0x19d)],_0x200533[_0x51af74(0x17b)]!==undefined?_0xb61892['ANTHROPIC_MODEL']=_0x200533[_0x51af74(0x17b)]:delete _0xb61892[_0x51af74(0x17b)]);const _0x235539=_0x2ef4dc[_0x51af74(0x1c1)],_0xf86ad6=((()=>{const _0x2438c5=_0x51af74;if(!_0x235539||typeof _0x235539!=='object')return![];if(_0x235539[_0x2438c5(0x19f)]!==_0x2438c5(0x1b8))return![];if(typeof _0x235539[_0x2438c5(0x1b8)]!=='string')return![];return _0x235539[_0x2438c5(0x1b8)][_0x2438c5(0x19a)](_0x2438c5(0x1de))&&_0x235539[_0x2438c5(0x1b8)][_0x2438c5(0x19a)](_0x2438c5(0x1b0));})());if(_0xf86ad6)delete _0x2ef4dc['statusLine'];else _0x200533['statusLine']!==undefined?_0x2ef4dc[_0x51af74(0x1c1)]=_0x200533[_0x51af74(0x1c1)]:delete _0x2ef4dc['statusLine'];_0x2ef4dc[_0x51af74(0x1a9)]=_0xb61892,await writeFile(_0x43f263,JSON['stringify'](_0x2ef4dc,null,0x2)+'\x0a');}catch{}}export class ClaudeCommand extends BaseCommand{[a15_0x47d289(0x1b9)]='claude';[a15_0x47d289(0x1b4)]='Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy';[a15_0x47d289(0x192)];[a15_0x47d289(0x1c0)];[a15_0x47d289(0x18d)];async[a15_0x47d289(0x1e1)](_0x101eb9){const _0x2655b1=a15_0x47d289,{tdx:_0x3471b3,options:_0x50470d,args:_0x40e413}=_0x101eb9;try{const _0x7583f8=_0x50470d,_0x2081a7=_0x7583f8[_0x2655b1(0x1cc)]||'sonnet',_0xae81e2=_0x7583f8['proxy']===![],_0x556e74=createCommandSpinner('Initializing...',{'verbose':_0x50470d[_0x2655b1(0x189)]});_0x556e74[_0x2655b1(0x1d4)]();try{if(!_0xae81e2){_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1d1);const _0x426640=await findAvailablePort(0xfa0);_0x556e74[_0x2655b1(0x1c2)]='✓\x20Port\x20'+_0x426640,_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x196);const _0x91bc8d=await _0x3471b3[_0x2655b1(0x184)][_0x2655b1(0x1b3)](),_0x3baf8e=_0x91bc8d['id'];_0x556e74['text']='✓\x20Using\x20project:\x20'+_0x91bc8d['attributes'][_0x2655b1(0x1b9)],_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1a2),this[_0x2655b1(0x18d)]=new TDXLogger(_0x50470d[_0x2655b1(0x1a4)],!![]),await this[_0x2655b1(0x18d)]['init']();const _0x525832=this[_0x2655b1(0x18d)][_0x2655b1(0x197)]();_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1d9)+_0x525832,_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1a3),this[_0x2655b1(0x192)]=new ProxyServer({'port':_0x426640,'projectId':_0x3baf8e,'tdx':_0x3471b3,'logger':this[_0x2655b1(0x18d)],'site':_0x50470d[_0x2655b1(0x17c)]}),await this['server'][_0x2655b1(0x1d4)](),_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1d6)+_0x426640,_0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x18f);const _0x2ff204=_0x50470d['profile'];this[_0x2655b1(0x1c0)]=await createClaudeSettings(_0x426640,_0x2081a7,_0x2ff204),_0x556e74['text']=_0x2655b1(0x182);}else _0x556e74[_0x2655b1(0x1c2)]=_0x2655b1(0x1bf);try{await ensureMcpServer(_0x2655b1(0x1a6),_0x2655b1(0x181),'http',_0x556e74,this[_0x2655b1(0x18d)]);}catch(_0x4a0f35){handleInstallationError(_0x4a0f35,_0x2655b1(0x1bd),_0x556e74,this[_0x2655b1(0x18d)]);}try{await ensureMarketplace(_0x2655b1(0x1c3),_0x2655b1(0x17f),_0x556e74,this['logger']),await updateMarketplace(_0x2655b1(0x1c3),_0x556e74,this[_0x2655b1(0x18d)]),await ensurePlugin('sql-skills','td-skills',_0x556e74,this[_0x2655b1(0x18d)]),await ensurePlugin(_0x2655b1(0x1eb),_0x2655b1(0x1c3),_0x556e74,this['logger']),await ensurePlugin('tdx-skills',_0x2655b1(0x1c3),_0x556e74,this['logger']);}catch(_0x292c44){handleInstallationError(_0x292c44,_0x2655b1(0x1bb),_0x556e74,this[_0x2655b1(0x18d)]);}_0x556e74[_0x2655b1(0x1aa)]();}catch(_0x1d5626){_0x556e74[_0x2655b1(0x18b)]('Setup\x20failed');throw _0x1d5626;}const _0xa58e81=await this['findClaudePath']();if(!_0xa58e81)throw new SDKError(ErrorCode[_0x2655b1(0x1e2)],_0x2655b1(0x1a0),undefined,{'helpText':'Please\x20install\x20Claude\x20Code\x20from\x20https://claude.com/claude-code'});const _0x5359e9=spawn(_0xa58e81,_0x40e413,{'stdio':'inherit'}),_0x5362de=await new Promise(_0x1a9cea=>{const _0x1d4926=_0x2655b1;_0x5359e9['on'](_0x1d4926(0x1e7),_0x480799=>{_0x1a9cea(_0x480799||0x0);}),_0x5359e9['on'](_0x1d4926(0x199),_0xdf3b6f=>{const _0x2e0db5=_0x1d4926;console['error'](a15_0xb87d5d[_0x2e0db5(0x1da)](_0x2e0db5(0x1a1)+_0xdf3b6f[_0x2e0db5(0x186)])),_0x1a9cea(0x1);});});this[_0x2655b1(0x192)]&&(await this['server'][_0x2655b1(0x1aa)](),console['log'](a15_0xb87d5d[_0x2655b1(0x1ec)](_0x2655b1(0x1ad))));if(this['logger']){await this[_0x2655b1(0x18d)][_0x2655b1(0x1e9)]();const _0x5dc414=this[_0x2655b1(0x18d)][_0x2655b1(0x197)]();console[_0x2655b1(0x1e5)](a15_0xb87d5d[_0x2655b1(0x1ec)](_0x2655b1(0x1b2)+_0x5dc414));}return this['originalSettings']&&(await restoreClaudeSettings(this[_0x2655b1(0x1c0)]),console['log'](a15_0xb87d5d[_0x2655b1(0x1ec)](_0x2655b1(0x1ce)))),_0x5362de;}catch(_0x836eda){this['server']&&await this[_0x2655b1(0x192)][_0x2655b1(0x1aa)]();this['logger']&&await this[_0x2655b1(0x18d)][_0x2655b1(0x1e9)]();this['originalSettings']&&await restoreClaudeSettings(this[_0x2655b1(0x1c0)]);throw _0x836eda;}}async[a15_0x47d289(0x1df)](){return new Promise(_0x3f4ad6=>{const _0x444705=a15_0x61f9,_0x432572=spawn(_0x444705(0x18c),[_0x444705(0x1bc)]);let _0x4aae00='';_0x432572['stdout']['on'](_0x444705(0x1db),_0x422c67=>{const _0x3c3ba3=_0x444705;_0x4aae00+=_0x422c67[_0x3c3ba3(0x193)]();}),_0x432572['on'](_0x444705(0x1e7),_0x3e2cfb=>{const _0xd153d3=_0x444705;_0x3e2cfb===0x0&&_0x4aae00[_0xd153d3(0x1d2)]()?_0x3f4ad6(_0x4aae00[_0xd153d3(0x1d2)]()):_0x3f4ad6(_0xd153d3(0x1bc));});});}}
@@ -1 +1 @@
1
- const a16_0x2ba4ff=a16_0x30da;(function(_0x316918,_0x5b68aa){const _0x52623e=a16_0x30da,_0x2ddfa2=_0x316918();while(!![]){try{const _0x2ed54e=parseInt(_0x52623e(0xc8))/0x1+-parseInt(_0x52623e(0xc4))/0x2*(-parseInt(_0x52623e(0xc5))/0x3)+parseInt(_0x52623e(0xd2))/0x4+parseInt(_0x52623e(0xca))/0x5*(parseInt(_0x52623e(0xb6))/0x6)+parseInt(_0x52623e(0xbd))/0x7*(-parseInt(_0x52623e(0xc0))/0x8)+-parseInt(_0x52623e(0xc3))/0x9*(parseInt(_0x52623e(0xd5))/0xa)+parseInt(_0x52623e(0xc6))/0xb*(-parseInt(_0x52623e(0xba))/0xc);if(_0x2ed54e===_0x5b68aa)break;else _0x2ddfa2['push'](_0x2ddfa2['shift']());}catch(_0x567517){_0x2ddfa2['push'](_0x2ddfa2['shift']());}}}(a16_0xc5fe,0xc8d46));import{createInterface}from'node:readline';function a16_0xc5fe(){const _0x345ea2=['Output\x20statusline\x20for\x20Claude\x20Code\x20(reads\x20JSON\x20from\x20stdin)','close','9RGWHku','254LprBQS','23334FBOYdN','11qlvocd','latestInputTokens','1405704nQgWXE','\x20today\x20/\x20','1075suVsiq','execute','model','stdin','Claude','parse','\x20|\x20','🧠\x20','3968928jEUlTs','\x20session\x20/\x20','toFixed','15532290dkGNqo','monthCredits','log','todayCredits','9678VhEYiQ','🤖\x20tdx\x20-\x20Claude','description','\x20month','7027008vpaiuz','push','join','21yTMcoe','🤖\x20tdx\x20-\x20','options','2056336GJbioP'];a16_0xc5fe=function(){return _0x345ea2;};return a16_0xc5fe();}import{BaseCommand}from'./command.js';function a16_0x30da(_0x46ee21,_0x1937cf){const _0xc5fe44=a16_0xc5fe();return a16_0x30da=function(_0x30da2c,_0x5191e1){_0x30da2c=_0x30da2c-0xb5;let _0x54f48c=_0xc5fe44[_0x30da2c];return _0x54f48c;},a16_0x30da(_0x46ee21,_0x1937cf);}import{getUsageStats}from'../proxy/claude-usage-tracker.js';import{getModelDisplayName,formatTokenCount,calculateContextPercentage}from'../utils/model-factors.js';async function readStdinJson(_0x2654ac=0x64){return new Promise(_0x446cc8=>{const _0x47ef59=a16_0x30da;let _0x31948d='',_0x3dc88f=![];const _0x35a8da=createInterface({'input':process[_0x47ef59(0xcd)],'terminal':![]}),_0x2eeb94=_0x1d0732=>{const _0x17e3f4=_0x47ef59;if(_0x3dc88f)return;_0x3dc88f=!![],clearTimeout(_0x1f57e8),_0x35a8da[_0x17e3f4(0xc2)](),_0x446cc8(_0x1d0732);},_0x1f57e8=setTimeout(()=>{_0x2eeb94(null);},_0x2654ac);_0x35a8da['on']('line',_0x485eb1=>{_0x31948d+=_0x485eb1;}),_0x35a8da['on'](_0x47ef59(0xc2),()=>{const _0x414aec=_0x47ef59;if(_0x3dc88f)return;try{const _0x437d97=JSON[_0x414aec(0xcf)](_0x31948d);_0x2eeb94(_0x437d97);}catch{_0x2eeb94(null);}});});}function formatCredits(_0x425040){const _0x5162ac=a16_0x30da;return _0x425040[_0x5162ac(0xd4)](0x2);}export class ClaudeStatuslineCommand extends BaseCommand{['name']='statusline';[a16_0x2ba4ff(0xb8)]=a16_0x2ba4ff(0xc1);async[a16_0x2ba4ff(0xcb)](_0x4f20c2){const _0x1738f3=a16_0x2ba4ff;try{const _0x82e98a=await readStdinJson();if(!_0x82e98a?.['session_id'])return console['log'](_0x1738f3(0xb7)),0x0;const _0xa2fc2a=_0x82e98a['session_id'],_0x2d48d1=_0x82e98a[_0x1738f3(0xcc)]?.['id']||'',_0x56d283=_0x82e98a['profile']||_0x4f20c2[_0x1738f3(0xbf)]['profile'],_0x40a725=await getUsageStats(_0xa2fc2a,_0x56d283),_0x400279=[],_0x6a0c4f=_0x2d48d1?getModelDisplayName(_0x2d48d1):_0x1738f3(0xce);_0x400279[_0x1738f3(0xbb)](_0x1738f3(0xbe)+_0x6a0c4f);const _0x3d9fa8=formatCredits(_0x40a725['sessionCredits']),_0x969b55=formatCredits(_0x40a725[_0x1738f3(0xb5)]),_0x45de5d=formatCredits(_0x40a725[_0x1738f3(0xd6)]);_0x400279[_0x1738f3(0xbb)]('🪙\x20credit:\x20'+_0x3d9fa8+_0x1738f3(0xd3)+_0x969b55+_0x1738f3(0xc9)+_0x45de5d+_0x1738f3(0xb9));if(_0x40a725[_0x1738f3(0xc7)]>0x0&&_0x2d48d1){const _0xab778f=formatTokenCount(_0x40a725[_0x1738f3(0xc7)]),_0x5ebecb=calculateContextPercentage(_0x40a725[_0x1738f3(0xc7)],_0x2d48d1);_0x400279['push'](_0x1738f3(0xd1)+_0xab778f+'\x20('+_0x5ebecb+'%)');}return console['log'](_0x400279[_0x1738f3(0xbc)](_0x1738f3(0xd0))),0x0;}catch{return console[_0x1738f3(0xd7)](_0x1738f3(0xb7)),0x0;}}}
1
+ const a16_0x2b50cb=a16_0x3c12;function a16_0x3801(){const _0x6ad8a4=['sessionCredits','🪙\x20credit:\x20','🤖\x20tdx\x20-\x20Claude','Output\x20statusline\x20for\x20Claude\x20Code\x20(reads\x20JSON\x20from\x20stdin)','stdin','170296EODlfs','2948645GGLKsr','246574eAKcdF','statusline','Claude','line','options','\x20today\x20/\x20','monthCredits','537DjrGSh','5290344DyIXzT','latestInputTokens','\x20|\x20','🤖\x20tdx\x20-\x20','log','push','25772ZfiVfy','parse','session_id','join','\x20month','model','936696VeUiCo','close','1852DxaKoD','🧠\x20'];a16_0x3801=function(){return _0x6ad8a4;};return a16_0x3801();}(function(_0x400dfd,_0x1a6802){const _0x2aa18a=a16_0x3c12,_0x4e3523=_0x400dfd();while(!![]){try{const _0x1900c5=parseInt(_0x2aa18a(0xf3))/0x1+-parseInt(_0x2aa18a(0x109))/0x2*(-parseInt(_0x2aa18a(0xfa))/0x3)+-parseInt(_0x2aa18a(0x101))/0x4+-parseInt(_0x2aa18a(0xf2))/0x5+-parseInt(_0x2aa18a(0x107))/0x6+parseInt(_0x2aa18a(0xf1))/0x7+parseInt(_0x2aa18a(0xfb))/0x8;if(_0x1900c5===_0x1a6802)break;else _0x4e3523['push'](_0x4e3523['shift']());}catch(_0x55f728){_0x4e3523['push'](_0x4e3523['shift']());}}}(a16_0x3801,0x5463d));import{createInterface}from'node:readline';import{BaseCommand}from'./command.js';function a16_0x3c12(_0x14cf48,_0x23c7e4){const _0x380147=a16_0x3801();return a16_0x3c12=function(_0x3c128e,_0x37fea2){_0x3c128e=_0x3c128e-0xef;let _0x32f2b1=_0x380147[_0x3c128e];return _0x32f2b1;},a16_0x3c12(_0x14cf48,_0x23c7e4);}import{getUsageStats}from'../proxy/claude-usage-tracker.js';import{getModelDisplayName,formatTokenCount,calculateContextPercentage}from'../utils/model-factors.js';async function readStdinJson(_0x2a14f8=0x64){return new Promise(_0x70bb55=>{const _0x45d454=a16_0x3c12;let _0x43ff42='',_0x248a87=![];const _0xce9643=createInterface({'input':process[_0x45d454(0xf0)],'terminal':![]}),_0x281f11=_0x59bb9f=>{const _0x34514a=_0x45d454;if(_0x248a87)return;_0x248a87=!![],clearTimeout(_0x395d83),_0xce9643[_0x34514a(0x108)](),_0x70bb55(_0x59bb9f);},_0x395d83=setTimeout(()=>{_0x281f11(null);},_0x2a14f8);_0xce9643['on'](_0x45d454(0xf6),_0x16bc87=>{_0x43ff42+=_0x16bc87;}),_0xce9643['on'](_0x45d454(0x108),()=>{const _0x5d728b=_0x45d454;if(_0x248a87)return;try{const _0x44408b=JSON[_0x5d728b(0x102)](_0x43ff42);_0x281f11(_0x44408b);}catch{_0x281f11(null);}});});}function formatCredits(_0x1dcdb8){return _0x1dcdb8['toFixed'](0x2);}export class ClaudeStatuslineCommand extends BaseCommand{['name']=a16_0x2b50cb(0xf4);['description']=a16_0x2b50cb(0xef);async['execute'](_0x18f2f6){const _0x272cc7=a16_0x2b50cb;try{const _0x236256=await readStdinJson();if(!_0x236256?.[_0x272cc7(0x103)])return console['log'](_0x272cc7(0x10d)),0x0;const _0x308612=_0x236256[_0x272cc7(0x103)],_0x23b4f0=_0x236256[_0x272cc7(0x106)]?.['id']||'',_0x42a818=_0x236256['profile']||_0x18f2f6[_0x272cc7(0xf7)]['profile'],_0x3dd6ef=await getUsageStats(_0x308612,_0x42a818),_0xed0683=[],_0x4b7106=_0x23b4f0?getModelDisplayName(_0x23b4f0):_0x272cc7(0xf5);_0xed0683[_0x272cc7(0x100)](_0x272cc7(0xfe)+_0x4b7106);const _0xb8f77a=formatCredits(_0x3dd6ef[_0x272cc7(0x10b)]),_0x3f99fe=formatCredits(_0x3dd6ef['todayCredits']),_0x454fe9=formatCredits(_0x3dd6ef[_0x272cc7(0xf9)]);_0xed0683['push'](_0x272cc7(0x10c)+_0xb8f77a+'\x20session\x20/\x20'+_0x3f99fe+_0x272cc7(0xf8)+_0x454fe9+_0x272cc7(0x105));if(_0x3dd6ef[_0x272cc7(0xfc)]>0x0&&_0x23b4f0){const _0x13b62a=formatTokenCount(_0x3dd6ef[_0x272cc7(0xfc)]),_0x444cca=calculateContextPercentage(_0x3dd6ef[_0x272cc7(0xfc)],_0x23b4f0);_0xed0683[_0x272cc7(0x100)](_0x272cc7(0x10a)+_0x13b62a+'\x20('+_0x444cca+'%)');}return console[_0x272cc7(0xff)](_0xed0683[_0x272cc7(0x104)](_0x272cc7(0xfd))),0x0;}catch{return console['log']('🤖\x20tdx\x20-\x20Claude'),0x0;}}}
@@ -1 +1 @@
1
- function a17_0x1ee2(){const _0x426bc9=['all','Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile','never','entryCount','todayCredits','length','execute','bold','(default)','Credits','2-digit','credits','message','numeric','lastUsedAt','totalCredits','outputTable','Usage\x20by\x20Profile','Unknown\x20error','repeat','padEnd','outputStructured','toLocaleTimeString','monthCredits','Requests','dim','16DWnZqO','2306316xcNjcp','1047261NjAIhY','\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','usage','profileCount','log','default','toFixed','en-US','5svDxyf','\x20\x20Today:\x20\x20\x20','2772518habJVY','toLocaleDateString','round','profile','name','short','max','4035213yQbCzY','\x20days\x20ago','today\x20','6647118tTHNCQ','map','padStart','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','error','cyan','Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.','json','Error:\x20','54jVeZou','en-CA','getTime','39583bnQcbh','\x20\x20Total:\x20\x20\x20','\x20credits','29514790QQMhmC'];a17_0x1ee2=function(){return _0x426bc9;};return a17_0x1ee2();}const a17_0x2d123c=a17_0x580f;(function(_0x512b8e,_0x1c9ea2){const _0x308ccb=a17_0x580f,_0x39b260=_0x512b8e();while(!![]){try{const _0x1b2ade=-parseInt(_0x308ccb(0x186))/0x1*(-parseInt(_0x308ccb(0x183))/0x2)+-parseInt(_0x308ccb(0x166))/0x3+parseInt(_0x308ccb(0x165))/0x4+-parseInt(_0x308ccb(0x16e))/0x5*(-parseInt(_0x308ccb(0x17a))/0x6)+parseInt(_0x308ccb(0x170))/0x7*(parseInt(_0x308ccb(0x164))/0x8)+parseInt(_0x308ccb(0x177))/0x9+-parseInt(_0x308ccb(0x149))/0xa;if(_0x1b2ade===_0x1c9ea2)break;else _0x39b260['push'](_0x39b260['shift']());}catch(_0x855601){_0x39b260['push'](_0x39b260['shift']());}}}(a17_0x1ee2,0xa9378));import a17_0x273368 from'chalk';function a17_0x580f(_0x51d4d4,_0x4b7339){const _0x1ee213=a17_0x1ee2();return a17_0x580f=function(_0x580fbd,_0x5ef29c){_0x580fbd=_0x580fbd-0x148;let _0x2176bf=_0x1ee213[_0x580fbd];return _0x2176bf;},a17_0x580f(_0x51d4d4,_0x4b7339);}import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{getAllProfileStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function formatCredits(_0x354afe){const _0x511236=a17_0x580f;return _0x354afe[_0x511236(0x16c)](0x2);}function formatLastUsed(_0x34bc4f){const _0x3bcf97=a17_0x580f;if(!_0x34bc4f)return _0x3bcf97(0x14c);const _0x2f6904=new Date(_0x34bc4f),_0x3f0fe3=new Date(),_0x50eec3=_0x2f6904[_0x3bcf97(0x171)](_0x3bcf97(0x184)),_0xa52516=_0x3f0fe3[_0x3bcf97(0x171)]('en-CA');if(_0x50eec3===_0xa52516)return _0x3bcf97(0x179)+_0x2f6904[_0x3bcf97(0x160)](_0x3bcf97(0x16d),{'hour':_0x3bcf97(0x154),'minute':_0x3bcf97(0x154)});const _0x6c64bb=new Date(_0x50eec3),_0xb0d35d=new Date(_0xa52516),_0x5e4304=Math[_0x3bcf97(0x172)]((_0xb0d35d[_0x3bcf97(0x185)]()-_0x6c64bb[_0x3bcf97(0x185)]())/(0x18*0x3c*0x3c*0x3e8));if(_0x5e4304===0x1)return'yesterday';else return _0x5e4304>0x1&&_0x5e4304<0x7?_0x5e4304+_0x3bcf97(0x178):_0x2f6904[_0x3bcf97(0x171)](_0x3bcf97(0x16d),{'month':_0x3bcf97(0x175),'day':_0x3bcf97(0x157)});}export class ClaudeUsageCommand extends BaseCommand{[a17_0x2d123c(0x174)]=a17_0x2d123c(0x168);['description']=a17_0x2d123c(0x14b);async[a17_0x2d123c(0x150)](_0xc62e54){const _0x1d668d=a17_0x2d123c,{options:_0x46bac7}=_0xc62e54,_0x48d8e5=_0x46bac7['format']===_0x1d668d(0x181)||_0x46bac7['format']==='jsonl'||_0x46bac7[_0x1d668d(0x181)];try{const [_0x2613d7,_0x39a2d9]=await Promise[_0x1d668d(0x14a)]([getAllProfileStats(),getUsageSummary()]);return _0x48d8e5?await this[_0x1d668d(0x15f)](_0x2613d7,_0x39a2d9,_0x46bac7):this[_0x1d668d(0x15a)](_0x2613d7,_0x39a2d9),0x0;}catch(_0x18f642){const _0xd0ac5e=_0x18f642 instanceof Error?_0x18f642[_0x1d668d(0x156)]:_0x1d668d(0x15c);return console[_0x1d668d(0x17e)](a17_0x273368['red'](_0x1d668d(0x182)+_0xd0ac5e)),0x1;}}async['outputStructured'](_0x140089,_0x43233c,_0x3663f9){const _0x557c49=a17_0x2d123c,_0x584d10={'summary':{'todayCredits':_0x43233c['todayCredits'],'monthCredits':_0x43233c[_0x557c49(0x161)],'totalCredits':_0x43233c[_0x557c49(0x159)],'profileCount':_0x43233c[_0x557c49(0x169)]},'profiles':_0x140089[_0x557c49(0x17b)](_0x50ffcf=>({'profile':_0x50ffcf[_0x557c49(0x173)],'credits':_0x50ffcf[_0x557c49(0x155)],'requests':_0x50ffcf[_0x557c49(0x14d)],'lastUsedAt':_0x50ffcf[_0x557c49(0x158)]}))};await handleSDKOutput([_0x584d10],_0x3663f9);}[a17_0x2d123c(0x15a)](_0x453013,_0x43974a){const _0x3732a8=a17_0x2d123c;console[_0x3732a8(0x16a)](a17_0x273368[_0x3732a8(0x151)]('\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary')),console[_0x3732a8(0x16a)](a17_0x273368[_0x3732a8(0x163)]('─'[_0x3732a8(0x15d)](0x32))),console[_0x3732a8(0x16a)](_0x3732a8(0x16f)+a17_0x273368[_0x3732a8(0x17f)](formatCredits(_0x43974a[_0x3732a8(0x14e)]))+_0x3732a8(0x148)),console['log']('\x20\x20Month:\x20\x20\x20'+a17_0x273368['cyan'](formatCredits(_0x43974a[_0x3732a8(0x161)]))+_0x3732a8(0x148)),console[_0x3732a8(0x16a)](_0x3732a8(0x187)+a17_0x273368[_0x3732a8(0x17f)](formatCredits(_0x43974a[_0x3732a8(0x159)]))+_0x3732a8(0x148)),console[_0x3732a8(0x16a)]();if(_0x453013[_0x3732a8(0x14f)]===0x0){console['log'](a17_0x273368[_0x3732a8(0x163)](_0x3732a8(0x17d))),console[_0x3732a8(0x16a)](a17_0x273368['dim'](_0x3732a8(0x167)));return;}console[_0x3732a8(0x16a)](a17_0x273368[_0x3732a8(0x151)](_0x3732a8(0x15b))),console[_0x3732a8(0x16a)](a17_0x273368[_0x3732a8(0x163)]('─'[_0x3732a8(0x15d)](0x3c)));const _0x15c4cd=Math[_0x3732a8(0x176)](0xc,..._0x453013[_0x3732a8(0x17b)](_0x31a6f2=>_0x31a6f2[_0x3732a8(0x173)]===_0x3732a8(0x16b)?_0x3732a8(0x152)[_0x3732a8(0x14f)]:_0x31a6f2['profile'][_0x3732a8(0x14f)])),_0x5ea5d5=0xa,_0x365db0=0xa;console[_0x3732a8(0x16a)]('\x20\x20'+'Profile'[_0x3732a8(0x15e)](_0x15c4cd)+'\x20\x20'+_0x3732a8(0x153)[_0x3732a8(0x17c)](_0x5ea5d5)+'\x20\x20'+_0x3732a8(0x162)[_0x3732a8(0x17c)](_0x365db0)+'\x20\x20'+'Last\x20Used');for(const _0x57d197 of _0x453013){const _0x596625=_0x57d197[_0x3732a8(0x173)]===_0x3732a8(0x16b)?_0x3732a8(0x152):_0x57d197['profile'],_0x227412=_0x596625[_0x3732a8(0x15e)](_0x15c4cd),_0x4882fa=_0x57d197[_0x3732a8(0x173)]===_0x3732a8(0x16b)?a17_0x273368['dim'](_0x227412):_0x227412;console['log']('\x20\x20'+_0x4882fa+'\x20\x20'+a17_0x273368[_0x3732a8(0x17f)](formatCredits(_0x57d197[_0x3732a8(0x155)])[_0x3732a8(0x17c)](_0x5ea5d5))+'\x20\x20'+String(_0x57d197[_0x3732a8(0x14d)])['padStart'](_0x365db0)+'\x20\x20'+a17_0x273368['dim'](formatLastUsed(_0x57d197['lastUsedAt'])));}console[_0x3732a8(0x16a)](),console[_0x3732a8(0x16a)](a17_0x273368['dim'](_0x3732a8(0x180))),console[_0x3732a8(0x16a)]();}}
1
+ function a17_0x1d7c(_0x608dd1,_0x280475){const _0x29d1fa=a17_0x29d1();return a17_0x1d7c=function(_0x1d7c8e,_0x30777c){_0x1d7c8e=_0x1d7c8e-0x10b;let _0x349e28=_0x29d1fa[_0x1d7c8e];return _0x349e28;},a17_0x1d7c(_0x608dd1,_0x280475);}const a17_0x5e1fff=a17_0x1d7c;(function(_0x1ad809,_0x2768de){const _0x58f039=a17_0x1d7c,_0x14a0d2=_0x1ad809();while(!![]){try{const _0xf82baa=parseInt(_0x58f039(0x10c))/0x1*(parseInt(_0x58f039(0x119))/0x2)+-parseInt(_0x58f039(0x12e))/0x3*(parseInt(_0x58f039(0x125))/0x4)+-parseInt(_0x58f039(0x128))/0x5*(parseInt(_0x58f039(0x110))/0x6)+parseInt(_0x58f039(0x130))/0x7*(parseInt(_0x58f039(0x120))/0x8)+-parseInt(_0x58f039(0x12f))/0x9+-parseInt(_0x58f039(0x11a))/0xa*(parseInt(_0x58f039(0x141))/0xb)+-parseInt(_0x58f039(0x129))/0xc*(-parseInt(_0x58f039(0x13c))/0xd);if(_0xf82baa===_0x2768de)break;else _0x14a0d2['push'](_0x14a0d2['shift']());}catch(_0x20af00){_0x14a0d2['push'](_0x14a0d2['shift']());}}}(a17_0x29d1,0xadfd8));import a17_0x4e3fcf from'chalk';import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../utils/command-output.js';import{getAllProfileStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function formatCredits(_0x30dcb5){const _0x5447c9=a17_0x1d7c;return _0x30dcb5[_0x5447c9(0x12d)](0x2);}function a17_0x29d1(){const _0x1efffd=['execute','cyan','entryCount','profileCount','1RrnGaH','padStart','message','log','106332PYvVQR','map','Error:\x20','toLocaleTimeString','\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','never','\x20\x20Today:\x20\x20\x20','Requests','Usage\x20by\x20Profile','1889042nnTayn','94310RFglDD','Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.','bold','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','format','jsonl','570320oYjowr','padEnd','(default)','outputStructured','dim','92vkhKnl','all','today\x20','145NjbUzC','1344hZXskY','\x20credits','repeat','\x20days\x20ago','toFixed','11940ZOPTQr','11566134ZhPcwa','7OCEGna','\x20\x20Total:\x20\x20\x20','totalCredits','round','description','en-CA','en-US','monthCredits','lastUsedAt','2-digit','\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary','toLocaleDateString','281684MpKqBm','yesterday','\x20\x20Month:\x20\x20\x20','max','outputTable','979ZWhrmp','json','Unknown\x20error','numeric','profile','Last\x20Used','length','todayCredits','Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile','default','credits','error'];a17_0x29d1=function(){return _0x1efffd;};return a17_0x29d1();}function formatLastUsed(_0x2bf58e){const _0x33cd5f=a17_0x1d7c;if(!_0x2bf58e)return _0x33cd5f(0x115);const _0x405d0f=new Date(_0x2bf58e),_0x3c5b70=new Date(),_0xf4b598=_0x405d0f['toLocaleDateString'](_0x33cd5f(0x135)),_0x159e78=_0x3c5b70[_0x33cd5f(0x13b)](_0x33cd5f(0x135));if(_0xf4b598===_0x159e78)return _0x33cd5f(0x127)+_0x405d0f[_0x33cd5f(0x113)](_0x33cd5f(0x136),{'hour':'2-digit','minute':_0x33cd5f(0x139)});const _0x15cd5c=new Date(_0xf4b598),_0x3e4de3=new Date(_0x159e78),_0x245132=Math[_0x33cd5f(0x133)]((_0x3e4de3['getTime']()-_0x15cd5c['getTime']())/(0x18*0x3c*0x3c*0x3e8));if(_0x245132===0x1)return _0x33cd5f(0x13d);else return _0x245132>0x1&&_0x245132<0x7?_0x245132+_0x33cd5f(0x12c):_0x405d0f[_0x33cd5f(0x13b)](_0x33cd5f(0x136),{'month':'short','day':_0x33cd5f(0x144)});}export class ClaudeUsageCommand extends BaseCommand{['name']='usage';[a17_0x5e1fff(0x134)]=a17_0x5e1fff(0x149);async[a17_0x5e1fff(0x14d)](_0x2bb7da){const _0x55b9f1=a17_0x5e1fff,{options:_0xd1647e}=_0x2bb7da,_0x3a50e2=_0xd1647e['format']===_0x55b9f1(0x142)||_0xd1647e[_0x55b9f1(0x11e)]===_0x55b9f1(0x11f)||_0xd1647e[_0x55b9f1(0x142)];try{const [_0xc26672,_0x4760d7]=await Promise[_0x55b9f1(0x126)]([getAllProfileStats(),getUsageSummary()]);return _0x3a50e2?await this[_0x55b9f1(0x123)](_0xc26672,_0x4760d7,_0xd1647e):this[_0x55b9f1(0x140)](_0xc26672,_0x4760d7),0x0;}catch(_0x3aa912){const _0x5bb672=_0x3aa912 instanceof Error?_0x3aa912[_0x55b9f1(0x10e)]:_0x55b9f1(0x143);return console[_0x55b9f1(0x14c)](a17_0x4e3fcf['red'](_0x55b9f1(0x112)+_0x5bb672)),0x1;}}async[a17_0x5e1fff(0x123)](_0x42d886,_0x2f4440,_0x1a59da){const _0x2a079c=a17_0x5e1fff,_0x34a3d7={'summary':{'todayCredits':_0x2f4440['todayCredits'],'monthCredits':_0x2f4440[_0x2a079c(0x137)],'totalCredits':_0x2f4440[_0x2a079c(0x132)],'profileCount':_0x2f4440[_0x2a079c(0x10b)]},'profiles':_0x42d886[_0x2a079c(0x111)](_0x46c641=>({'profile':_0x46c641['profile'],'credits':_0x46c641[_0x2a079c(0x14b)],'requests':_0x46c641['entryCount'],'lastUsedAt':_0x46c641['lastUsedAt']}))};await handleSDKOutput([_0x34a3d7],_0x1a59da);}[a17_0x5e1fff(0x140)](_0x1ae2ee,_0x668d1a){const _0x59ffcb=a17_0x5e1fff;console[_0x59ffcb(0x10f)](a17_0x4e3fcf[_0x59ffcb(0x11c)](_0x59ffcb(0x13a))),console['log'](a17_0x4e3fcf[_0x59ffcb(0x124)]('─'[_0x59ffcb(0x12b)](0x32))),console[_0x59ffcb(0x10f)](_0x59ffcb(0x116)+a17_0x4e3fcf[_0x59ffcb(0x14e)](formatCredits(_0x668d1a[_0x59ffcb(0x148)]))+_0x59ffcb(0x12a)),console[_0x59ffcb(0x10f)](_0x59ffcb(0x13e)+a17_0x4e3fcf['cyan'](formatCredits(_0x668d1a[_0x59ffcb(0x137)]))+'\x20credits'),console[_0x59ffcb(0x10f)](_0x59ffcb(0x131)+a17_0x4e3fcf[_0x59ffcb(0x14e)](formatCredits(_0x668d1a[_0x59ffcb(0x132)]))+_0x59ffcb(0x12a)),console[_0x59ffcb(0x10f)]();if(_0x1ae2ee[_0x59ffcb(0x147)]===0x0){console[_0x59ffcb(0x10f)](a17_0x4e3fcf[_0x59ffcb(0x124)](_0x59ffcb(0x11d))),console[_0x59ffcb(0x10f)](a17_0x4e3fcf[_0x59ffcb(0x124)](_0x59ffcb(0x114)));return;}console[_0x59ffcb(0x10f)](a17_0x4e3fcf[_0x59ffcb(0x11c)](_0x59ffcb(0x118))),console['log'](a17_0x4e3fcf[_0x59ffcb(0x124)]('─'['repeat'](0x3c)));const _0x2e0760=Math[_0x59ffcb(0x13f)](0xc,..._0x1ae2ee[_0x59ffcb(0x111)](_0x1d738a=>_0x1d738a['profile']===_0x59ffcb(0x14a)?'(default)'[_0x59ffcb(0x147)]:_0x1d738a['profile'][_0x59ffcb(0x147)])),_0x2aec7f=0xa,_0x1e8d52=0xa;console[_0x59ffcb(0x10f)]('\x20\x20'+'Profile'['padEnd'](_0x2e0760)+'\x20\x20'+'Credits'['padStart'](_0x2aec7f)+'\x20\x20'+_0x59ffcb(0x117)[_0x59ffcb(0x10d)](_0x1e8d52)+'\x20\x20'+_0x59ffcb(0x146));for(const _0x18ffe0 of _0x1ae2ee){const _0x14e8e6=_0x18ffe0[_0x59ffcb(0x145)]==='default'?_0x59ffcb(0x122):_0x18ffe0[_0x59ffcb(0x145)],_0x5f27a1=_0x14e8e6[_0x59ffcb(0x121)](_0x2e0760),_0x583d33=_0x18ffe0['profile']===_0x59ffcb(0x14a)?a17_0x4e3fcf[_0x59ffcb(0x124)](_0x5f27a1):_0x5f27a1;console[_0x59ffcb(0x10f)]('\x20\x20'+_0x583d33+'\x20\x20'+a17_0x4e3fcf['cyan'](formatCredits(_0x18ffe0[_0x59ffcb(0x14b)])[_0x59ffcb(0x10d)](_0x2aec7f))+'\x20\x20'+String(_0x18ffe0[_0x59ffcb(0x14f)])['padStart'](_0x1e8d52)+'\x20\x20'+a17_0x4e3fcf['dim'](formatLastUsed(_0x18ffe0[_0x59ffcb(0x138)])));}console[_0x59ffcb(0x10f)](),console[_0x59ffcb(0x10f)](a17_0x4e3fcf[_0x59ffcb(0x124)](_0x59ffcb(0x11b))),console[_0x59ffcb(0x10f)]();}}
@@ -1 +1 @@
1
- const a18_0x50a557=a18_0x5b30;(function(_0x23cf45,_0x498450){const _0x37bbec=a18_0x5b30,_0x55ab67=_0x23cf45();while(!![]){try{const _0x598aa3=parseInt(_0x37bbec(0x84))/0x1*(parseInt(_0x37bbec(0xab))/0x2)+-parseInt(_0x37bbec(0x83))/0x3*(parseInt(_0x37bbec(0x96))/0x4)+parseInt(_0x37bbec(0x89))/0x5+parseInt(_0x37bbec(0x8b))/0x6*(-parseInt(_0x37bbec(0x90))/0x7)+-parseInt(_0x37bbec(0x81))/0x8*(-parseInt(_0x37bbec(0x99))/0x9)+parseInt(_0x37bbec(0xa0))/0xa*(parseInt(_0x37bbec(0x8f))/0xb)+-parseInt(_0x37bbec(0x85))/0xc*(parseInt(_0x37bbec(0xa9))/0xd);if(_0x598aa3===_0x498450)break;else _0x55ab67['push'](_0x55ab67['shift']());}catch(_0x467e17){_0x55ab67['push'](_0x55ab67['shift']());}}}(a18_0x11aa,0x1881a));import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../client/http-client.js';import{SDKError,ErrorCategory}from'../sdk/errors.js';import a18_0x20feed from'chalk';export function printAuthError(_0x14856e,_0x3db56d=![],_0x25b9ef){const _0x48a0b6=a18_0x5b30,_0x43dd37=_0x14856e[_0x48a0b6(0x95)]?.['detail']||_0x14856e[_0x48a0b6(0x9a)];console[_0x48a0b6(0xa5)](a18_0x20feed[_0x48a0b6(0x8d)](_0x48a0b6(0x9f))),console[_0x48a0b6(0xa5)](a18_0x20feed[_0x48a0b6(0x8d)](_0x48a0b6(0xae)+_0x43dd37));if(_0x3db56d){const _0x5786c7=_0x25b9ef?_0x48a0b6(0x7c)+_0x25b9ef:'';console['error']('\x0aTo\x20set\x20up\x20authentication:'),console['error'](_0x48a0b6(0x93)+_0x5786c7+'\x0a'),console[_0x48a0b6(0xa5)](_0x48a0b6(0xac)),console[_0x48a0b6(0xa5)](_0x48a0b6(0x9d)+_0x5786c7);}}export class BaseCommand{[a18_0x50a557(0xa4)](_0x3f7afb){const _0x1c4fb6=a18_0x50a557,{options:_0x33f1e7}=_0x3f7afb,_0x3baf98=_0x33f1e7[_0x1c4fb6(0x8e)];if(_0x3baf98!==undefined){const _0x10cb60=typeof _0x3baf98===_0x1c4fb6(0xa6)?_0x3baf98:parseInt(_0x3baf98,0xa);if(isNaN(_0x10cb60))return'Invalid\x20limit\x20value:\x20'+_0x3baf98+_0x1c4fb6(0xa8);const _0x2e8aaf=validateLimitOption(_0x10cb60);if(!_0x2e8aaf[_0x1c4fb6(0x91)])return _0x2e8aaf['error'];_0x3f7afb[_0x1c4fb6(0x7e)]['limit']=_0x2e8aaf['value'];}return undefined;}[a18_0x50a557(0xa2)](_0x3fc8db){return undefined;}async[a18_0x50a557(0x98)](_0x9357ad){const _0x3e9836=a18_0x50a557;try{const _0x59e8be=this[_0x3e9836(0xa4)](_0x9357ad);if(_0x59e8be)return console[_0x3e9836(0xa5)](_0x3e9836(0xaa)+_0x59e8be),0x1;const _0x226fea=this[_0x3e9836(0xa2)](_0x9357ad);if(_0x226fea){const _0x16bb88=/^\s*(Usage|Note|Warning|Error):/i[_0x3e9836(0x82)](_0x226fea);return _0x16bb88?console[_0x3e9836(0xa5)](_0x226fea):console[_0x3e9836(0xa5)](_0x3e9836(0xaa)+_0x226fea),0x1;}const _0xe01d12=await this[_0x3e9836(0x87)](_0x9357ad);return _0xe01d12??0x0;}catch(_0x52a53b){if(_0x52a53b instanceof Error){if(_0x52a53b instanceof HTTPClientError&&_0x52a53b[_0x3e9836(0xaf)]===0x191){const _0x1046b8=_0x9357ad[_0x3e9836(0x7e)][_0x3e9836(0x7f)];return printAuthError(_0x52a53b,!![],_0x1046b8),_0x52a53b[_0x3e9836(0x8c)]&&_0x9357ad[_0x3e9836(0x94)]&&(_0x9357ad[_0x3e9836(0x94)][_0x3e9836(0xb2)][_0x3e9836(0xa7)](_0x3e9836(0x9e)),_0x9357ad['tdx']['logger'][_0x3e9836(0xa7)](_0x52a53b[_0x3e9836(0x8c)])),0x1;}console[_0x3e9836(0xa5)](a18_0x20feed[_0x3e9836(0x8d)](_0x3e9836(0xaa)+_0x52a53b[_0x3e9836(0x9a)]));_0x52a53b instanceof SDKError&&_0x52a53b['helpText']&&console['error'](a18_0x20feed[_0x3e9836(0x9c)](_0x52a53b[_0x3e9836(0xb1)]));const _0x38b97c=_0x52a53b instanceof SDKError&&_0x52a53b[_0x3e9836(0xa3)]===ErrorCategory[_0x3e9836(0x97)];_0x52a53b[_0x3e9836(0x8c)]&&!_0x38b97c&&console[_0x3e9836(0xa5)](_0x3e9836(0x88)+_0x52a53b[_0x3e9836(0x8c)]);}else console[_0x3e9836(0xa5)](_0x3e9836(0xaa)+String(_0x52a53b));return 0x1;}}}function a18_0x5b30(_0x57f1fc,_0x166caf){const _0x11aa32=a18_0x11aa();return a18_0x5b30=function(_0x5b30c9,_0xbc068e){_0x5b30c9=_0x5b30c9-0x7c;let _0x2c029e=_0x11aa32[_0x5b30c9];return _0x2c029e;},a18_0x5b30(_0x57f1fc,_0x166caf);}function a18_0x11aa(){const _0x4a5b43=['.\x20Must\x20be\x20a\x20number.','13vPbSEI','Error:\x20','168IYzxdq','To\x20check\x20your\x20current\x20auth\x20status:','register','Reason:\x20','status','get','helpText','logger','\x20--profile\x20','commands','options','profile','set','8yqLoyS','test','282MlSbmZ','1884VjLSkp','1463796FNQkMz','from','execute','\x0aStack\x20trace:\x0a','715000tteYQb','\x27\x20is\x20already\x20registered','997962SELscR','stack','red','limit','11XvXjQj','7dKGqJt','isValid','name','\x20\x20tdx\x20auth\x20setup','tdx','problemDetails','260dHiiio','USER_ERROR','run','684189ZrISlq','message','has','yellow','\x20\x20tdx\x20auth','Authentication\x20error\x20stack\x20trace:','Authentication\x20failed','175210jYSWhQ','values','validate','category','validateGlobalOptions','error','number','debug'];a18_0x11aa=function(){return _0x4a5b43;};return a18_0x11aa();}export class CommandRegistry{['commands']=new Map();[a18_0x50a557(0xad)](_0x448790){const _0x211c6d=a18_0x50a557;if(this['commands'][_0x211c6d(0x9b)](_0x448790[_0x211c6d(0x92)]))throw new Error('Command\x20\x27'+_0x448790['name']+_0x211c6d(0x8a));this[_0x211c6d(0x7d)][_0x211c6d(0x80)](_0x448790[_0x211c6d(0x92)],_0x448790);}[a18_0x50a557(0xb0)](_0x9497f2){const _0x38d81c=a18_0x50a557;return this[_0x38d81c(0x7d)][_0x38d81c(0xb0)](_0x9497f2);}['getAll'](){const _0x2e658c=a18_0x50a557;return Array[_0x2e658c(0x86)](this['commands'][_0x2e658c(0xa1)]());}[a18_0x50a557(0x9b)](_0x1e7e3e){const _0x270b13=a18_0x50a557;return this['commands'][_0x270b13(0x9b)](_0x1e7e3e);}}export const registry=new CommandRegistry();
1
+ const a18_0x2e7b68=a18_0x2ee0;function a18_0x2ee0(_0x20797b,_0xc49ed5){const _0x2fda4f=a18_0x2fda();return a18_0x2ee0=function(_0x2ee091,_0x38219e){_0x2ee091=_0x2ee091-0x118;let _0x1d5c9d=_0x2fda4f[_0x2ee091];return _0x1d5c9d;},a18_0x2ee0(_0x20797b,_0xc49ed5);}(function(_0x49a8bf,_0x26b31f){const _0x2ec457=a18_0x2ee0,_0x2d3477=_0x49a8bf();while(!![]){try{const _0x3262c6=parseInt(_0x2ec457(0x133))/0x1+-parseInt(_0x2ec457(0x141))/0x2*(-parseInt(_0x2ec457(0x11d))/0x3)+-parseInt(_0x2ec457(0x13b))/0x4+parseInt(_0x2ec457(0x131))/0x5*(parseInt(_0x2ec457(0x125))/0x6)+-parseInt(_0x2ec457(0x147))/0x7+parseInt(_0x2ec457(0x121))/0x8+parseInt(_0x2ec457(0x128))/0x9*(-parseInt(_0x2ec457(0x126))/0xa);if(_0x3262c6===_0x26b31f)break;else _0x2d3477['push'](_0x2d3477['shift']());}catch(_0x562a7a){_0x2d3477['push'](_0x2d3477['shift']());}}}(a18_0x2fda,0x2e72b));import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../client/http-client.js';import{SDKError,ErrorCategory}from'../sdk/errors.js';import a18_0x38b6ce from'chalk';function a18_0x2fda(){const _0x5df1f3=['Authentication\x20failed','has','error','number','red','To\x20check\x20your\x20current\x20auth\x20status:','limit','logger','.\x20Must\x20be\x20a\x20number.','124827IBcolZ','name','\x20\x20tdx\x20auth\x20setup','get','627688wDoGPv','validate','Error:\x20','\x0aTo\x20set\x20up\x20authentication:','14910yBNEUL','1998290sCjeuc','profile','9XuxvCo','execute','run','value','commands','\x20--profile\x20','\x0aStack\x20trace:\x0a','message','tdx','505zwMxZo','register','373491jVsnZR','set','debug','category','yellow','validateGlobalOptions','stack','values','793228CBCUil','Reason:\x20','USER_ERROR','\x27\x20is\x20already\x20registered','Authentication\x20error\x20stack\x20trace:','\x20\x20tdx\x20auth','2HfFQGF','helpText','problemDetails','Command\x20\x27','detail','getAll','1093113PecHyj','options'];a18_0x2fda=function(){return _0x5df1f3;};return a18_0x2fda();}export function printAuthError(_0x22fbb2,_0x21a985=![],_0x290e49){const _0x5762c4=a18_0x2ee0,_0x5d272f=_0x22fbb2[_0x5762c4(0x143)]?.[_0x5762c4(0x145)]||_0x22fbb2[_0x5762c4(0x12f)];console[_0x5762c4(0x14b)](a18_0x38b6ce[_0x5762c4(0x118)](_0x5762c4(0x149))),console[_0x5762c4(0x14b)](a18_0x38b6ce[_0x5762c4(0x118)](_0x5762c4(0x13c)+_0x5d272f));if(_0x21a985){const _0x5b0d43=_0x290e49?_0x5762c4(0x12d)+_0x290e49:'';console[_0x5762c4(0x14b)](_0x5762c4(0x124)),console[_0x5762c4(0x14b)](_0x5762c4(0x11f)+_0x5b0d43+'\x0a'),console[_0x5762c4(0x14b)](_0x5762c4(0x119)),console[_0x5762c4(0x14b)](_0x5762c4(0x140)+_0x5b0d43);}}export class BaseCommand{[a18_0x2e7b68(0x138)](_0x1ff3a8){const _0x4e568b=a18_0x2e7b68,{options:_0x383165}=_0x1ff3a8,_0x48675e=_0x383165[_0x4e568b(0x11a)];if(_0x48675e!==undefined){const _0x47f3ce=typeof _0x48675e===_0x4e568b(0x14c)?_0x48675e:parseInt(_0x48675e,0xa);if(isNaN(_0x47f3ce))return'Invalid\x20limit\x20value:\x20'+_0x48675e+_0x4e568b(0x11c);const _0x165a6e=validateLimitOption(_0x47f3ce);if(!_0x165a6e['isValid'])return _0x165a6e[_0x4e568b(0x14b)];_0x1ff3a8[_0x4e568b(0x148)][_0x4e568b(0x11a)]=_0x165a6e[_0x4e568b(0x12b)];}return undefined;}[a18_0x2e7b68(0x122)](_0x3d0d3b){return undefined;}async[a18_0x2e7b68(0x12a)](_0x529c02){const _0x7e8693=a18_0x2e7b68;try{const _0x34099c=this[_0x7e8693(0x138)](_0x529c02);if(_0x34099c)return console[_0x7e8693(0x14b)]('Error:\x20'+_0x34099c),0x1;const _0x41dcf6=this[_0x7e8693(0x122)](_0x529c02);if(_0x41dcf6){const _0x27e104=/^\s*(Usage|Note|Warning|Error):/i['test'](_0x41dcf6);return _0x27e104?console[_0x7e8693(0x14b)](_0x41dcf6):console['error'](_0x7e8693(0x123)+_0x41dcf6),0x1;}const _0xa09ad9=await this[_0x7e8693(0x129)](_0x529c02);return _0xa09ad9??0x0;}catch(_0x3055ac){if(_0x3055ac instanceof Error){if(_0x3055ac instanceof HTTPClientError&&_0x3055ac['status']===0x191){const _0x1bcc7c=_0x529c02[_0x7e8693(0x148)][_0x7e8693(0x127)];return printAuthError(_0x3055ac,!![],_0x1bcc7c),_0x3055ac[_0x7e8693(0x139)]&&_0x529c02[_0x7e8693(0x130)]&&(_0x529c02[_0x7e8693(0x130)][_0x7e8693(0x11b)][_0x7e8693(0x135)](_0x7e8693(0x13f)),_0x529c02[_0x7e8693(0x130)][_0x7e8693(0x11b)][_0x7e8693(0x135)](_0x3055ac[_0x7e8693(0x139)])),0x1;}console[_0x7e8693(0x14b)](a18_0x38b6ce[_0x7e8693(0x118)]('Error:\x20'+_0x3055ac['message']));_0x3055ac instanceof SDKError&&_0x3055ac[_0x7e8693(0x142)]&&console['error'](a18_0x38b6ce[_0x7e8693(0x137)](_0x3055ac[_0x7e8693(0x142)]));const _0x4eaf61=_0x3055ac instanceof SDKError&&_0x3055ac[_0x7e8693(0x136)]===ErrorCategory[_0x7e8693(0x13d)];_0x3055ac['stack']&&!_0x4eaf61&&console[_0x7e8693(0x14b)](_0x7e8693(0x12e)+_0x3055ac[_0x7e8693(0x139)]);}else console['error'](_0x7e8693(0x123)+String(_0x3055ac));return 0x1;}}}export class CommandRegistry{[a18_0x2e7b68(0x12c)]=new Map();[a18_0x2e7b68(0x132)](_0x156ece){const _0x538c4b=a18_0x2e7b68;if(this[_0x538c4b(0x12c)][_0x538c4b(0x14a)](_0x156ece[_0x538c4b(0x11e)]))throw new Error(_0x538c4b(0x144)+_0x156ece[_0x538c4b(0x11e)]+_0x538c4b(0x13e));this[_0x538c4b(0x12c)][_0x538c4b(0x134)](_0x156ece[_0x538c4b(0x11e)],_0x156ece);}['get'](_0x4a9dfe){const _0x5133fb=a18_0x2e7b68;return this[_0x5133fb(0x12c)][_0x5133fb(0x120)](_0x4a9dfe);}[a18_0x2e7b68(0x146)](){const _0x228779=a18_0x2e7b68;return Array['from'](this[_0x228779(0x12c)][_0x228779(0x13a)]());}[a18_0x2e7b68(0x14a)](_0x18b86f){const _0x2506c0=a18_0x2e7b68;return this[_0x2506c0(0x12c)][_0x2506c0(0x14a)](_0x18b86f);}}export const registry=new CommandRegistry();
@@ -1 +1 @@
1
- const a19_0x1830b7=a19_0x380c;(function(_0x5f4b51,_0x33da90){const _0x49cf58=a19_0x380c,_0x66dac8=_0x5f4b51();while(!![]){try{const _0x1fc3e3=parseInt(_0x49cf58(0x1a9))/0x1*(parseInt(_0x49cf58(0x1b6))/0x2)+-parseInt(_0x49cf58(0x1c0))/0x3*(-parseInt(_0x49cf58(0x1bb))/0x4)+-parseInt(_0x49cf58(0x1b3))/0x5*(-parseInt(_0x49cf58(0x1b2))/0x6)+-parseInt(_0x49cf58(0x1c3))/0x7*(parseInt(_0x49cf58(0x1b0))/0x8)+parseInt(_0x49cf58(0x1ac))/0x9*(parseInt(_0x49cf58(0x1b4))/0xa)+parseInt(_0x49cf58(0x1bc))/0xb*(parseInt(_0x49cf58(0x1c2))/0xc)+-parseInt(_0x49cf58(0x1ab))/0xd;if(_0x1fc3e3===_0x33da90)break;else _0x66dac8['push'](_0x66dac8['shift']());}catch(_0x58b6c4){_0x66dac8['push'](_0x66dac8['shift']());}}}(a19_0x9a51,0xbc59b));function a19_0x9a51(){const _0x498c5b=['Session\x20context\x20cleared\x20(session:\x20','session','Error:\x20','32pxysRq','context','6niylNK','2532505lCAHDp','2570OjhCLL','error','2SUUiUM','warn','\x20\x20tdx\x20use\x20--clear\x20\x20\x20#\x20Clear\x20session\x20context\x0a','description','\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context','4idAruq','24959FxPdXN','display','toString','Show\x20current\x20resolved\x20context','1004967jjzYZf','displayWithSources','5052qcWCZK','633395NUzxhR','clear','yellow','debug','493393zBpiIX','name','23580154GUGvUW','23013PnXURP'];a19_0x9a51=function(){return _0x498c5b;};return a19_0x9a51();}import{BaseCommand}from'./command.js';function a19_0x380c(_0x3bd7af,_0x38a5cd){const _0x9a5195=a19_0x9a51();return a19_0x380c=function(_0x380c94,_0x4bf9bb){_0x380c94=_0x380c94-0x1a6;let _0x242531=_0x9a5195[_0x380c94];return _0x242531;},a19_0x380c(_0x3bd7af,_0x38a5cd);}import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';import a19_0x4d9cb7 from'chalk';export class ContextCommand extends BaseCommand{[a19_0x1830b7(0x1aa)]=a19_0x1830b7(0x1b1);[a19_0x1830b7(0x1b9)]=a19_0x1830b7(0x1bf);async['execute'](_0x2ce856){const _0x4b90e2=a19_0x1830b7,{options:_0x1e4266}=_0x2ce856,_0x4cfd69=_0x1e4266[_0x4b90e2(0x1a8)],_0x4a5d0c=_0x1e4266[_0x4b90e2(0x1a6)];console[_0x4b90e2(0x1b7)](a19_0x4d9cb7[_0x4b90e2(0x1a7)]('Warning:\x20\x27tdx\x20context\x27\x20is\x20deprecated.\x20Use\x20\x27tdx\x20use\x27\x20instead.')),console[_0x4b90e2(0x1b7)](a19_0x4d9cb7[_0x4b90e2(0x1a7)](_0x4b90e2(0x1ba))),console[_0x4b90e2(0x1b7)](a19_0x4d9cb7[_0x4b90e2(0x1a7)](_0x4b90e2(0x1b8))),cleanExpiredSessions();try{if(_0x4a5d0c){clearSessionContext(_0x1e4266[_0x4b90e2(0x1ae)]);const _0x1e0290=_0x1e4266['session']||getCurrentSessionPID()[_0x4b90e2(0x1be)]();return console['log'](_0x4b90e2(0x1ad)+_0x1e0290+')'),0x0;}const _0xf7a276=new GlobalContext(_0x1e4266);return _0x4cfd69?_0xf7a276[_0x4b90e2(0x1c1)]():_0xf7a276[_0x4b90e2(0x1bd)](),0x0;}catch(_0x196d3c){return _0x196d3c instanceof Error&&console[_0x4b90e2(0x1b5)](_0x4b90e2(0x1af)+_0x196d3c['message']),0x1;}}}
1
+ const a19_0x3a8b4c=a19_0x4b6d;function a19_0x298a(){const _0x397471=['11080CiGFuh','Error:\x20','warn','16241920LSmdHB','4282803qWCaYd','context','2038532vUBfxp','clear','3528szrSPW','message','5yVeEYL','session','error','displayWithSources','yellow','display','73936RpedcT','581AWflWK','Session\x20context\x20cleared\x20(session:\x20','debug','13746LlauNn','49195047dNuXXh','toString','execute','\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context','7oVAAJN','log'];a19_0x298a=function(){return _0x397471;};return a19_0x298a();}function a19_0x4b6d(_0x178262,_0x19fb8d){const _0x298a67=a19_0x298a();return a19_0x4b6d=function(_0x4b6dc2,_0x56e59d){_0x4b6dc2=_0x4b6dc2-0x118;let _0x122ae8=_0x298a67[_0x4b6dc2];return _0x122ae8;},a19_0x4b6d(_0x178262,_0x19fb8d);}(function(_0x27f1b7,_0x266a40){const _0x42aa70=a19_0x4b6d,_0x505f9b=_0x27f1b7();while(!![]){try{const _0x3a1866=parseInt(_0x42aa70(0x124))/0x1*(parseInt(_0x42aa70(0x11b))/0x2)+-parseInt(_0x42aa70(0x12a))/0x3+parseInt(_0x42aa70(0x12c))/0x4*(-parseInt(_0x42aa70(0x130))/0x5)+parseInt(_0x42aa70(0x11f))/0x6*(parseInt(_0x42aa70(0x11c))/0x7)+-parseInt(_0x42aa70(0x126))/0x8*(parseInt(_0x42aa70(0x12e))/0x9)+-parseInt(_0x42aa70(0x129))/0xa+parseInt(_0x42aa70(0x120))/0xb;if(_0x3a1866===_0x266a40)break;else _0x505f9b['push'](_0x505f9b['shift']());}catch(_0x1c945a){_0x505f9b['push'](_0x505f9b['shift']());}}}(a19_0x298a,0xc76dc));import{BaseCommand}from'./command.js';import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';import a19_0x587f09 from'chalk';export class ContextCommand extends BaseCommand{['name']=a19_0x3a8b4c(0x12b);['description']='Show\x20current\x20resolved\x20context';async[a19_0x3a8b4c(0x122)](_0x48c12b){const _0x2a8ab7=a19_0x3a8b4c,{options:_0x108385}=_0x48c12b,_0x427be0=_0x108385[_0x2a8ab7(0x11e)],_0x54b461=_0x108385[_0x2a8ab7(0x12d)];console[_0x2a8ab7(0x128)](a19_0x587f09['yellow']('Warning:\x20\x27tdx\x20context\x27\x20is\x20deprecated.\x20Use\x20\x27tdx\x20use\x27\x20instead.')),console['warn'](a19_0x587f09[_0x2a8ab7(0x119)](_0x2a8ab7(0x123))),console[_0x2a8ab7(0x128)](a19_0x587f09[_0x2a8ab7(0x119)]('\x20\x20tdx\x20use\x20--clear\x20\x20\x20#\x20Clear\x20session\x20context\x0a')),cleanExpiredSessions();try{if(_0x54b461){clearSessionContext(_0x108385[_0x2a8ab7(0x131)]);const _0xa5f5a0=_0x108385[_0x2a8ab7(0x131)]||getCurrentSessionPID()[_0x2a8ab7(0x121)]();return console[_0x2a8ab7(0x125)](_0x2a8ab7(0x11d)+_0xa5f5a0+')'),0x0;}const _0x240d17=new GlobalContext(_0x108385);return _0x427be0?_0x240d17[_0x2a8ab7(0x118)]():_0x240d17[_0x2a8ab7(0x11a)](),0x0;}catch(_0x2af4aa){return _0x2af4aa instanceof Error&&console[_0x2a8ab7(0x132)](_0x2a8ab7(0x127)+_0x2af4aa[_0x2a8ab7(0x12f)]),0x1;}}}
@@ -1 +1 @@
1
- const a20_0xaf4693=a20_0x20ae;(function(_0x2d0557,_0x7ec647){const _0x4d93fd=a20_0x20ae,_0x3b3247=_0x2d0557();while(!![]){try{const _0x6d08e3=-parseInt(_0x4d93fd(0x158))/0x1+-parseInt(_0x4d93fd(0x16d))/0x2+parseInt(_0x4d93fd(0x15d))/0x3*(parseInt(_0x4d93fd(0x168))/0x4)+-parseInt(_0x4d93fd(0x170))/0x5+parseInt(_0x4d93fd(0x162))/0x6*(-parseInt(_0x4d93fd(0x161))/0x7)+-parseInt(_0x4d93fd(0x15c))/0x8+parseInt(_0x4d93fd(0x16f))/0x9;if(_0x6d08e3===_0x7ec647)break;else _0x3b3247['push'](_0x3b3247['shift']());}catch(_0x2119b3){_0x3b3247['push'](_0x3b3247['shift']());}}}(a20_0x5872,0x31970));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a20_0x20ae(_0x100fa2,_0x179388){const _0x587264=a20_0x5872();return a20_0x20ae=function(_0x20aeb8,_0x5729c4){_0x20aeb8=_0x20aeb8-0x157;let _0x5c98e9=_0x587264[_0x20aeb8];return _0x5c98e9;},a20_0x20ae(_0x100fa2,_0x179388);}function a20_0x5872(){const _0x401cc8=['15099MCmGyk','750VBBPJq','✔\x20Found\x20','query','length','message','Error:\x20','96njdikz','data','description','site','\x20database','725820cRDaQy','listDatabases','11259891pMnqtT','759835CudlTa','limit','List\x20all\x20databases','238102yhaaZO','verbose','execute','Site:\x20','1400312HEGVXa','18708xAJCRC','error','\x20\x20Cause:\x20','databases'];a20_0x5872=function(){return _0x401cc8;};return a20_0x5872();}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';export class DatabasesCommand extends BaseCommand{['name']=a20_0xaf4693(0x160);[a20_0xaf4693(0x16a)]=a20_0xaf4693(0x157);async[a20_0xaf4693(0x15a)](_0xe4cdd9){const _0x41030c=a20_0xaf4693,{options:_0xd4eefb,args:_0x3499ea,tdx:_0x77d8ad}=_0xe4cdd9,_0x50987f=_0x3499ea[0x0];try{_0xd4eefb[_0x41030c(0x159)]&&(console[_0x41030c(0x15e)](_0x41030c(0x15b)+_0xd4eefb[_0x41030c(0x16b)]),_0x50987f&&console[_0x41030c(0x15e)]('Pattern:\x20'+_0x50987f));const _0x511b62=resolveLimit(_0xd4eefb[_0x41030c(0x171)],DEFAULT_LISTING_LIMIT),_0x1a8b29=await withSpinner('Listing\x20databases...',()=>_0x77d8ad[_0x41030c(0x164)][_0x41030c(0x16e)](_0x50987f,_0x511b62),{'verbose':_0xd4eefb[_0x41030c(0x159)]}),_0x4fc2d7=_0x1a8b29[_0x41030c(0x169)];return console['error'](_0x41030c(0x163)+_0x4fc2d7['length']+_0x41030c(0x16c)+(_0x4fc2d7[_0x41030c(0x165)]!==0x1?'s':'')),await handleSDKOutput(_0x4fc2d7,{..._0xd4eefb,'limit':_0x511b62}),0x0;}catch(_0x4fb4f0){if(_0x4fb4f0 instanceof SDKError)return console['error'](_0x41030c(0x167)+_0x4fb4f0[_0x41030c(0x166)]),_0x4fb4f0['cause']&&console[_0x41030c(0x15e)](_0x41030c(0x15f)+_0x4fb4f0['cause']),0x1;throw _0x4fb4f0;}}}
1
+ const a20_0x157b50=a20_0x4762;(function(_0x3f2ef0,_0x48ded6){const _0x33a25d=a20_0x4762,_0x418a1a=_0x3f2ef0();while(!![]){try{const _0x5dd7d0=parseInt(_0x33a25d(0xa7))/0x1*(-parseInt(_0x33a25d(0xa9))/0x2)+-parseInt(_0x33a25d(0xac))/0x3+parseInt(_0x33a25d(0xb5))/0x4+-parseInt(_0x33a25d(0xaf))/0x5*(-parseInt(_0x33a25d(0xba))/0x6)+parseInt(_0x33a25d(0xb2))/0x7*(parseInt(_0x33a25d(0xaa))/0x8)+parseInt(_0x33a25d(0xbc))/0x9*(parseInt(_0x33a25d(0xb4))/0xa)+parseInt(_0x33a25d(0xbb))/0xb*(parseInt(_0x33a25d(0xbd))/0xc);if(_0x5dd7d0===_0x48ded6)break;else _0x418a1a['push'](_0x418a1a['shift']());}catch(_0x1a0944){_0x418a1a['push'](_0x418a1a['shift']());}}}(a20_0x4715,0xaa6c8));import{BaseCommand}from'./command.js';function a20_0x4762(_0x19fede,_0x148101){const _0x471535=a20_0x4715();return a20_0x4762=function(_0x47620d,_0x5ab6ea){_0x47620d=_0x47620d-0xa3;let _0x5c6af7=_0x471535[_0x47620d];return _0x5c6af7;},a20_0x4762(_0x19fede,_0x148101);}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a20_0x4715(){const _0x104274=['94885mhhwQB','data','60790xrXGzj','1733984OPjvJj','description','\x20\x20Cause:\x20','length','execute','1936458CHMifL','10193304OWssVL','531yCotby','12KWuTiM','\x20database','Site:\x20','error','query','Pattern:\x20','message','134522TkvNkD','site','10yCUSuL','136nVmiMP','cause','2703999QOzEVk','listDatabases','List\x20all\x20databases','5ABGxca','verbose','✔\x20Found\x20'];a20_0x4715=function(){return _0x104274;};return a20_0x4715();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';export class DatabasesCommand extends BaseCommand{['name']='databases';[a20_0x157b50(0xb6)]=a20_0x157b50(0xae);async[a20_0x157b50(0xb9)](_0x27fdf3){const _0x952113=a20_0x157b50,{options:_0x3544e0,args:_0x7f3cf9,tdx:_0x11ea14}=_0x27fdf3,_0x52b743=_0x7f3cf9[0x0];try{_0x3544e0[_0x952113(0xb0)]&&(console[_0x952113(0xa3)](_0x952113(0xbf)+_0x3544e0[_0x952113(0xa8)]),_0x52b743&&console[_0x952113(0xa3)](_0x952113(0xa5)+_0x52b743));const _0x19a1a1=resolveLimit(_0x3544e0['limit'],DEFAULT_LISTING_LIMIT),_0x3cc716=await withSpinner('Listing\x20databases...',()=>_0x11ea14[_0x952113(0xa4)][_0x952113(0xad)](_0x52b743,_0x19a1a1),{'verbose':_0x3544e0[_0x952113(0xb0)]}),_0x36b562=_0x3cc716[_0x952113(0xb3)];return console[_0x952113(0xa3)](_0x952113(0xb1)+_0x36b562['length']+_0x952113(0xbe)+(_0x36b562[_0x952113(0xb8)]!==0x1?'s':'')),await handleSDKOutput(_0x36b562,{..._0x3544e0,'limit':_0x19a1a1}),0x0;}catch(_0x27089e){if(_0x27089e instanceof SDKError)return console['error']('Error:\x20'+_0x27089e[_0x952113(0xa6)]),_0x27089e[_0x952113(0xab)]&&console['error'](_0x952113(0xb7)+_0x27089e[_0x952113(0xab)]),0x1;throw _0x27089e;}}}
@@ -1 +1 @@
1
- const a21_0x894e24=a21_0x3ca7;function a21_0x505e(){const _0xc96cc8=['...','Describe\x20table\x20schema','verbose','describeTable','892782nSyDFu','Describing\x20table\x20','Error:\x20','name','25UKceLs','541141WSEtfA','46530WaZTcb','✖\x20Table\x20not\x20found','message','Database:\x20','1834728FgcJtA','847245jxJKXm','\x20in\x20','database','40GHQJrj','7860ZSDqkR','cause','\x27\x20does\x20not\x20exist','error','data','516650WdvTMA','Table\x20\x27','validate','describe','description','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','Site:\x20','site','args','length','\x20column'];a21_0x505e=function(){return _0xc96cc8;};return a21_0x505e();}(function(_0x4a9bbb,_0x7fa631){const _0x1620d7=a21_0x3ca7,_0x55f811=_0x4a9bbb();while(!![]){try{const _0x53afb0=-parseInt(_0x1620d7(0x15b))/0x1+parseInt(_0x1620d7(0x16a))/0x2+-parseInt(_0x1620d7(0x156))/0x3+-parseInt(_0x1620d7(0x165))/0x4*(parseInt(_0x1620d7(0x15a))/0x5)+parseInt(_0x1620d7(0x160))/0x6+parseInt(_0x1620d7(0x161))/0x7*(parseInt(_0x1620d7(0x164))/0x8)+-parseInt(_0x1620d7(0x15c))/0x9;if(_0x53afb0===_0x7fa631)break;else _0x55f811['push'](_0x55f811['shift']());}catch(_0x57135a){_0x55f811['push'](_0x55f811['shift']());}}}(a21_0x505e,0x4d0a6));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a21_0x3ca7(_0x2dd0aa,_0x30c819){const _0x505e94=a21_0x505e();return a21_0x3ca7=function(_0x3ca740,_0x3796ec){_0x3ca740=_0x3ca740-0x154;let _0x39c622=_0x505e94[_0x3ca740];return _0x39c622;},a21_0x3ca7(_0x2dd0aa,_0x30c819);}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class DescribeCommand extends BaseCommand{[a21_0x894e24(0x159)]=a21_0x894e24(0x16d);[a21_0x894e24(0x16e)]=a21_0x894e24(0x176);async['execute'](_0x363f89){const _0x20a07a=a21_0x894e24;return this[_0x20a07a(0x155)](_0x363f89);}async[a21_0x894e24(0x155)](_0x1970cd){const _0x5dcdd7=a21_0x894e24,{options:_0x2dfed2,args:_0x31e02e,tdx:_0x4cee91}=_0x1970cd;let _0x267913;try{_0x267913=parseTableReference(_0x31e02e[0x0]);const _0x66bb59=_0x2dfed2[_0x5dcdd7(0x163)];!_0x267913['database']&&_0x66bb59&&(_0x267913[_0x5dcdd7(0x163)]=_0x66bb59);const _0x57bdbd=validateTableDescribeReference(_0x267913);if(_0x57bdbd)return console['error'](_0x5dcdd7(0x158)+_0x57bdbd),0x1;}catch(_0x53ca91){return console['error'](_0x5dcdd7(0x158)+_0x53ca91[_0x5dcdd7(0x15e)]),0x1;}const _0x5bacd4=_0x267913[_0x5dcdd7(0x163)],_0x597275=_0x267913['table'];try{_0x2dfed2[_0x5dcdd7(0x154)]&&(console[_0x5dcdd7(0x168)](_0x5dcdd7(0x170)+_0x2dfed2[_0x5dcdd7(0x171)]),console[_0x5dcdd7(0x168)](_0x5dcdd7(0x15f)+_0x5bacd4),console['error']('Table:\x20'+_0x597275));const _0x4bb65c=await withSpinner(_0x5dcdd7(0x157)+_0x5bacd4+'.'+_0x597275+_0x5dcdd7(0x175),()=>_0x4cee91['query']['describeTable'](_0x5bacd4,_0x597275),{'verbose':_0x2dfed2[_0x5dcdd7(0x154)]}),_0xb3d7ca=_0x4bb65c[_0x5dcdd7(0x169)];if(_0xb3d7ca[_0x5dcdd7(0x173)]===0x0)return console['error'](_0x5dcdd7(0x15d)),console[_0x5dcdd7(0x168)](_0x5dcdd7(0x16b)+_0x5bacd4+'.'+_0x597275+_0x5dcdd7(0x167)),0x1;return console['error']('✔\x20Found\x20'+_0xb3d7ca['length']+_0x5dcdd7(0x174)+(_0xb3d7ca['length']!==0x1?'s':'')+_0x5dcdd7(0x162)+_0x5bacd4+'.'+_0x597275),await handleSDKOutput(_0xb3d7ca,_0x2dfed2),0x0;}catch(_0x2e02ec){if(_0x2e02ec instanceof SDKError)return console[_0x5dcdd7(0x168)](_0x5dcdd7(0x158)+_0x2e02ec[_0x5dcdd7(0x15e)]),_0x2e02ec[_0x5dcdd7(0x166)]&&console[_0x5dcdd7(0x168)]('\x20\x20Cause:\x20'+_0x2e02ec[_0x5dcdd7(0x166)]),0x1;throw _0x2e02ec;}}[a21_0x894e24(0x16c)](_0x570be1){const _0x2f21c4=a21_0x894e24;if(_0x570be1[_0x2f21c4(0x172)][_0x2f21c4(0x173)]===0x0)return _0x2f21c4(0x16f);if(_0x570be1['args'][_0x2f21c4(0x173)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options';return undefined;}}
1
+ function a21_0x4070(){const _0x3a79c3=['message','22Ppddvl','data','\x20column','5893lMVqme','args','12fjkymx','✖\x20Table\x20not\x20found','query','verbose','\x27\x20does\x20not\x20exist','cause','...','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','error','Site:\x20','442072TpQVRa','5381299dlDXnE','site','name','5049GLRHXa','✔\x20Found\x20','Describe\x20table\x20schema','Database:\x20','1928570DjkkUW','execute','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','148NCXFZG','describe','Error:\x20','database','26930jdAxLO','Table:\x20','describeTable','Table\x20\x27','142mtxiIg','length','657gtzpbq','1252812OaukBv'];a21_0x4070=function(){return _0x3a79c3;};return a21_0x4070();}const a21_0x47b193=a21_0x529c;(function(_0x656690,_0xf756fc){const _0x3c9b56=a21_0x529c,_0x6010df=_0x656690();while(!![]){try{const _0x50b01d=parseInt(_0x3c9b56(0xcc))/0x1*(parseInt(_0x3c9b56(0xc4))/0x2)+parseInt(_0x3c9b56(0xb5))/0x3*(parseInt(_0x3c9b56(0xbc))/0x4)+parseInt(_0x3c9b56(0xb9))/0x5*(parseInt(_0x3c9b56(0xce))/0x6)+-parseInt(_0x3c9b56(0xb2))/0x7+-parseInt(_0x3c9b56(0xb1))/0x8+parseInt(_0x3c9b56(0xc6))/0x9*(parseInt(_0x3c9b56(0xc0))/0xa)+-parseInt(_0x3c9b56(0xc9))/0xb*(parseInt(_0x3c9b56(0xc7))/0xc);if(_0x50b01d===_0xf756fc)break;else _0x6010df['push'](_0x6010df['shift']());}catch(_0x15e94c){_0x6010df['push'](_0x6010df['shift']());}}}(a21_0x4070,0x65881));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 a21_0x529c(_0x3af0f6,_0x51127d){const _0x407096=a21_0x4070();return a21_0x529c=function(_0x529c2f,_0x1cd21d){_0x529c2f=_0x529c2f-0xad;let _0x47b4f1=_0x407096[_0x529c2f];return _0x47b4f1;},a21_0x529c(_0x3af0f6,_0x51127d);}import{withSpinner}from'../utils/spinner.js';export class DescribeCommand extends BaseCommand{[a21_0x47b193(0xb4)]=a21_0x47b193(0xbd);['description']=a21_0x47b193(0xb7);async[a21_0x47b193(0xba)](_0x5d4080){const _0x100b82=a21_0x47b193;return this[_0x100b82(0xc2)](_0x5d4080);}async[a21_0x47b193(0xc2)](_0x290a2b){const _0x4fd4e3=a21_0x47b193,{options:_0x5dad03,args:_0x316bc5,tdx:_0x5d0fe6}=_0x290a2b;let _0x4009be;try{_0x4009be=parseTableReference(_0x316bc5[0x0]);const _0x39c595=_0x5dad03[_0x4fd4e3(0xbf)];!_0x4009be['database']&&_0x39c595&&(_0x4009be[_0x4fd4e3(0xbf)]=_0x39c595);const _0xb05896=validateTableDescribeReference(_0x4009be);if(_0xb05896)return console[_0x4fd4e3(0xaf)](_0x4fd4e3(0xbe)+_0xb05896),0x1;}catch(_0x35336a){return console[_0x4fd4e3(0xaf)](_0x4fd4e3(0xbe)+_0x35336a[_0x4fd4e3(0xc8)]),0x1;}const _0x10fb72=_0x4009be[_0x4fd4e3(0xbf)],_0x21ccbe=_0x4009be['table'];try{_0x5dad03[_0x4fd4e3(0xd1)]&&(console[_0x4fd4e3(0xaf)](_0x4fd4e3(0xb0)+_0x5dad03[_0x4fd4e3(0xb3)]),console[_0x4fd4e3(0xaf)](_0x4fd4e3(0xb8)+_0x10fb72),console['error'](_0x4fd4e3(0xc1)+_0x21ccbe));const _0x32407e=await withSpinner('Describing\x20table\x20'+_0x10fb72+'.'+_0x21ccbe+_0x4fd4e3(0xad),()=>_0x5d0fe6[_0x4fd4e3(0xd0)][_0x4fd4e3(0xc2)](_0x10fb72,_0x21ccbe),{'verbose':_0x5dad03[_0x4fd4e3(0xd1)]}),_0x20fc01=_0x32407e[_0x4fd4e3(0xca)];if(_0x20fc01[_0x4fd4e3(0xc5)]===0x0)return console['error'](_0x4fd4e3(0xcf)),console[_0x4fd4e3(0xaf)](_0x4fd4e3(0xc3)+_0x10fb72+'.'+_0x21ccbe+_0x4fd4e3(0xd2)),0x1;return console[_0x4fd4e3(0xaf)](_0x4fd4e3(0xb6)+_0x20fc01['length']+_0x4fd4e3(0xcb)+(_0x20fc01[_0x4fd4e3(0xc5)]!==0x1?'s':'')+'\x20in\x20'+_0x10fb72+'.'+_0x21ccbe),await handleSDKOutput(_0x20fc01,_0x5dad03),0x0;}catch(_0x2dbb9b){if(_0x2dbb9b instanceof SDKError)return console['error'](_0x4fd4e3(0xbe)+_0x2dbb9b[_0x4fd4e3(0xc8)]),_0x2dbb9b[_0x4fd4e3(0xd3)]&&console[_0x4fd4e3(0xaf)]('\x20\x20Cause:\x20'+_0x2dbb9b['cause']),0x1;throw _0x2dbb9b;}}['validate'](_0x8e3169){const _0x21201b=a21_0x47b193;if(_0x8e3169[_0x21201b(0xcd)]['length']===0x0)return _0x21201b(0xae);if(_0x8e3169['args']['length']>0x1)return _0x21201b(0xbb);return undefined;}}