@treasuredata/tdx 0.7.1 → 0.7.2

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 (104) 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.d.ts.map +1 -1
  29. package/dist/commands/parent-segment-command.js +1 -1
  30. package/dist/commands/parent-segment-command.js.map +1 -1
  31. package/dist/commands/profiles-command.js +1 -1
  32. package/dist/commands/query-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pwd-command.js +1 -1
  37. package/dist/commands/segment-update-command.js +1 -1
  38. package/dist/commands/segment-use-command.js +1 -1
  39. package/dist/commands/segments.js +1 -1
  40. package/dist/commands/show.js +1 -1
  41. package/dist/commands/tables.js +1 -1
  42. package/dist/commands/use-command.js +1 -1
  43. package/dist/commands/workflow-command.js +1 -1
  44. package/dist/core/auth.js +1 -1
  45. package/dist/core/config.js +1 -1
  46. package/dist/core/credential-cache.js +1 -1
  47. package/dist/core/global-context.js +1 -1
  48. package/dist/core/keychain.js +1 -1
  49. package/dist/core/profile.js +1 -1
  50. package/dist/core/project-config.js +1 -1
  51. package/dist/core/session.js +1 -1
  52. package/dist/index.js +1 -1
  53. package/dist/proxy/anthropic-adapter.js +1 -1
  54. package/dist/proxy/claude-usage-tracker.js +1 -1
  55. package/dist/proxy/context-signature.js +1 -1
  56. package/dist/proxy/conversation-utils.js +1 -1
  57. package/dist/proxy/server.js +1 -1
  58. package/dist/proxy/session-cache.js +1 -1
  59. package/dist/sdk/api.js +1 -1
  60. package/dist/sdk/engage.js +1 -1
  61. package/dist/sdk/errors.js +1 -1
  62. package/dist/sdk/index.js +1 -1
  63. package/dist/sdk/job.js +1 -1
  64. package/dist/sdk/llm.js +1 -1
  65. package/dist/sdk/query.js +1 -1
  66. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  67. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  68. package/dist/sdk/segment.js +1 -1
  69. package/dist/sdk/workflow.js +1 -1
  70. package/dist/types/endpoints.d.ts +12 -0
  71. package/dist/types/endpoints.d.ts.map +1 -1
  72. package/dist/types/endpoints.js +1 -1
  73. package/dist/types/endpoints.js.map +1 -1
  74. package/dist/types/index.js +1 -1
  75. package/dist/utils/agent-ref-parser.js +1 -1
  76. package/dist/utils/chat-cache.js +1 -1
  77. package/dist/utils/colors.js +1 -1
  78. package/dist/utils/command-output.js +1 -1
  79. package/dist/utils/constants.js +1 -1
  80. package/dist/utils/diff.js +1 -1
  81. package/dist/utils/fields-display.js +1 -1
  82. package/dist/utils/file-permissions.js +1 -1
  83. package/dist/utils/format-detector.js +1 -1
  84. package/dist/utils/formatters.js +1 -1
  85. package/dist/utils/json-loader.js +1 -1
  86. package/dist/utils/llm-backup-utils.js +1 -1
  87. package/dist/utils/model-aliases.js +1 -1
  88. package/dist/utils/model-factors.js +1 -1
  89. package/dist/utils/option-validation.js +1 -1
  90. package/dist/utils/port.js +1 -1
  91. package/dist/utils/process.js +1 -1
  92. package/dist/utils/prompt.js +1 -1
  93. package/dist/utils/segment-path-parser.js +1 -1
  94. package/dist/utils/segment-ref-parser.js +1 -1
  95. package/dist/utils/spinner.js +1 -1
  96. package/dist/utils/sql-parser.js +1 -1
  97. package/dist/utils/sse-parser.js +1 -1
  98. package/dist/utils/string-utils.js +1 -1
  99. package/dist/utils/table-ref-parser.js +1 -1
  100. package/dist/utils/tdx-logger.js +1 -1
  101. package/dist/utils/tree-formatter.js +1 -1
  102. package/dist/utils/version-check.js +1 -1
  103. package/dist/utils/workflow-utils.js +1 -1
  104. package/package.json +1 -1
@@ -1 +1 @@
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
+ const a12_0x2115f3=a12_0x5529;function a12_0x5529(_0x392d00,_0x1a5f35){const _0xc956b6=a12_0xc956();return a12_0x5529=function(_0x5529a1,_0x5a48b8){_0x5529a1=_0x5529a1-0xb4;let _0x3d4aea=_0xc956b6[_0x5529a1];return _0x3d4aea;},a12_0x5529(_0x392d00,_0x1a5f35);}(function(_0x17bfa4,_0x2b9c18){const _0x3ddf90=a12_0x5529,_0x4499d8=_0x17bfa4();while(!![]){try{const _0x15da0e=-parseInt(_0x3ddf90(0xc1))/0x1+parseInt(_0x3ddf90(0xe7))/0x2+parseInt(_0x3ddf90(0xc4))/0x3+-parseInt(_0x3ddf90(0xb7))/0x4*(-parseInt(_0x3ddf90(0xd5))/0x5)+parseInt(_0x3ddf90(0xe5))/0x6*(parseInt(_0x3ddf90(0xbb))/0x7)+-parseInt(_0x3ddf90(0xd3))/0x8*(parseInt(_0x3ddf90(0xe4))/0x9)+-parseInt(_0x3ddf90(0xf5))/0xa*(parseInt(_0x3ddf90(0xc0))/0xb);if(_0x15da0e===_0x2b9c18)break;else _0x4499d8['push'](_0x4499d8['shift']());}catch(_0x1043e9){_0x4499d8['push'](_0x4499d8['shift']());}}}(a12_0xc956,0x954a8));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';function a12_0xc956(){const _0x4b67b4=['set-cookie','136XWptxF','length','set-cookie2','x-xsrf-token','33929AkGGrQ','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','request','verbose','proxy-authorization','11xeccHc','800102eMMkrv','Invalid\x20API\x20type:\x20','trim','3273753VcgmVM','Invalid\x20HTTP\x20method:\x20','error','substring','.\x20Valid\x20types:\x20','validate','toLowerCase','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','includes','color','trino','x-trino-user','status','authorization','body','11368dnUDYS','noColor','12150XATerb','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','toUpperCase','has','api','type','Error:\x20','entries','PATCH','llm','startsWith','<\x20HTTP/1.1\x20','execute','Invalid\x20header\x20format:\x20\x22','\x22.\x20','4563BRpyCx','1464CBdlPi','join','343014HhSEjL','PUT','file','header','site','headers','stack','cdp','message','DELETE','name','method','Results\x20saved\x20to\x20','Endpoint\x20must\x20start\x20with\x20/:\x20','3960010eyYnlg','GET','data','output','POST'];a12_0xc956=function(){return _0x4b67b4;};return a12_0xc956();}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_0x2115f3(0xd1),a12_0x2115f3(0xbf),'cookie',a12_0x2115f3(0xb6),a12_0x2115f3(0xb9),a12_0x2115f3(0xba),'x-auth-token',a12_0x2115f3(0xcf)]);function isSensitiveHeader(_0x2ec897){const _0x23811f=a12_0x2115f3;return SENSITIVE_HEADERS[_0x23811f(0xd8)](_0x2ec897[_0x23811f(0xca)]());}function parseHeader(_0x396cc9){const _0x2ddb2c=a12_0x2115f3,_0x4dc510=_0x396cc9['indexOf'](':');if(_0x4dc510===-0x1)throw new Error(_0x2ddb2c(0xe2)+_0x396cc9+_0x2ddb2c(0xe3)+'Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22');const _0x2f71ee=_0x396cc9[_0x2ddb2c(0xc7)](0x0,_0x4dc510)[_0x2ddb2c(0xc3)](),_0xa86953=_0x396cc9[_0x2ddb2c(0xc7)](_0x4dc510+0x1)[_0x2ddb2c(0xc3)]();if(!_0x2f71ee)throw new Error(_0x2ddb2c(0xd6)+_0x396cc9+'\x22');return[_0x2f71ee,_0xa86953];}export class ApiCommand extends BaseCommand{[a12_0x2115f3(0xf1)]=a12_0x2115f3(0xd9);['description']='Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs';[a12_0x2115f3(0xc9)](_0x1b0e7d){const _0x3b6dab=a12_0x2115f3,{args:_0xc4d1d2,options:_0x16b4f4}=_0x1b0e7d,_0x266077=_0x16b4f4;if(_0xc4d1d2[_0x3b6dab(0xb8)]===0x0)return _0x3b6dab(0xbc);const _0x2ee4a5=_0xc4d1d2[0x0];if(!_0x2ee4a5[_0x3b6dab(0xdf)]('/'))return _0x3b6dab(0xf4)+_0x2ee4a5;const _0x59f4f3=_0x266077[_0x3b6dab(0xf7)],_0x11f423=_0x266077['file'];if(_0x59f4f3&&_0x11f423)return _0x3b6dab(0xcb);const _0x2eda16=_0x266077[_0x3b6dab(0xf2)]||_0x3b6dab(0xf6),_0x4e9fa2=[_0x3b6dab(0xf6),_0x3b6dab(0xb5),_0x3b6dab(0xe8),_0x3b6dab(0xf0),_0x3b6dab(0xdd)];if(!_0x4e9fa2[_0x3b6dab(0xcc)](_0x2eda16['toUpperCase']()))return _0x3b6dab(0xc5)+_0x2eda16+'.\x20Valid\x20methods:\x20'+_0x4e9fa2[_0x3b6dab(0xe6)](',\x20');const _0x5a4745=_0x266077[_0x3b6dab(0xda)]||'td',_0x5b00e0=['td',_0x3b6dab(0xee),'workflow',_0x3b6dab(0xce),_0x3b6dab(0xde)];if(!_0x5b00e0[_0x3b6dab(0xcc)](_0x5a4745))return _0x3b6dab(0xc2)+_0x5a4745+_0x3b6dab(0xc8)+_0x5b00e0[_0x3b6dab(0xe6)](',\x20');return undefined;}async[a12_0x2115f3(0xe1)](_0x30c7c2){const _0x3deca4=a12_0x2115f3,{options:_0x10e5bc,args:_0x2b1086,tdx:_0x3b1d45}=_0x30c7c2,_0xe0b7bf=_0x10e5bc,_0x5b228b=_0x2b1086[0x0],_0x5ba96d=(_0xe0b7bf[_0x3deca4(0xf2)]||'GET')[_0x3deca4(0xd7)](),_0x1230a6=_0xe0b7bf[_0x3deca4(0xf7)],_0x50e508=_0xe0b7bf[_0x3deca4(0xe9)],_0x274ac2=_0xe0b7bf[_0x3deca4(0xea)],_0x59954d=_0xe0b7bf[_0x3deca4(0xda)]||'td';try{const _0x3a05f1={};if(_0x274ac2){const _0x1dce95=Array['isArray'](_0x274ac2)?_0x274ac2:[_0x274ac2];for(const _0x2662fa of _0x1dce95){const [_0x38494e,_0x5cca51]=parseHeader(_0x2662fa);_0x3a05f1[_0x38494e]=_0x5cca51;}}let _0x115cc5;if(_0x1230a6)_0x115cc5=_0x1230a6;else{if(_0x50e508)try{_0x115cc5=RawAPI['readBodyFromFile'](_0x50e508);}catch(_0x245a29){return console[_0x3deca4(0xc6)]('Error:\x20'+(_0x245a29 instanceof Error?_0x245a29['message']:String(_0x245a29))),0x1;}}const _0x157be0={'method':_0x5ba96d,'apiType':_0x59954d,'includeHeaders':_0x10e5bc['verbose']};_0x115cc5&&(_0x157be0[_0x3deca4(0xd2)]=_0x115cc5);Object['keys'](_0x3a05f1)[_0x3deca4(0xb8)]>0x0&&(_0x157be0[_0x3deca4(0xec)]=_0x3a05f1);if(_0x10e5bc['verbose']){const _0x127ba9=resolveSite(_0x10e5bc[_0x3deca4(0xeb)]),_0x4998e2=getEndpoint(_0x127ba9,_0x59954d),_0x2fc172=''+_0x4998e2+_0x5b228b;console['error']('>\x20'+_0x5ba96d+'\x20'+_0x2fc172);const _0x2bd194=getAuthHeaders(_0x127ba9),_0x5c16e9={..._0x2bd194,..._0x3a05f1};for(const [_0xb959d4,_0x2a2e53]of Object[_0x3deca4(0xdc)](_0x5c16e9)){!isSensitiveHeader(_0xb959d4)&&console[_0x3deca4(0xc6)]('>\x20'+_0xb959d4+':\x20'+_0x2a2e53);}_0x115cc5&&console[_0x3deca4(0xc6)]('>'),console[_0x3deca4(0xc6)]('');}const _0x331a06=await _0x3b1d45[_0x3deca4(0xd9)][_0x3deca4(0xbd)](_0x5b228b,_0x157be0);if(_0x10e5bc[_0x3deca4(0xbe)]&&_0x331a06[_0x3deca4(0xec)]){console[_0x3deca4(0xc6)](_0x3deca4(0xe0)+_0x331a06[_0x3deca4(0xd0)]);for(const [_0x543176,_0x568b26]of Object[_0x3deca4(0xdc)](_0x331a06[_0x3deca4(0xec)])){!isSensitiveHeader(_0x543176)&&console[_0x3deca4(0xc6)]('<\x20'+_0x543176+':\x20'+_0x568b26);}console[_0x3deca4(0xc6)]('');}const _0x5698ff=Boolean(_0x10e5bc[_0x3deca4(0xb4)]),_0x523de7={'color':_0x10e5bc['color'],'noColor':_0x10e5bc[_0x3deca4(0xd4)]||_0x5698ff&&!_0x10e5bc[_0x3deca4(0xcd)]},_0x123c59=colorizeJSON(_0x331a06[_0x3deca4(0xf7)],_0x523de7);return _0x10e5bc['output']?(writeFileSync(_0x10e5bc[_0x3deca4(0xb4)],_0x123c59),console['error'](_0x3deca4(0xf3)+_0x10e5bc[_0x3deca4(0xb4)])):console['log'](_0x123c59),0x0;}catch(_0x5bb1a0){return _0x5bb1a0 instanceof Error?(console['error'](_0x3deca4(0xdb)+_0x5bb1a0[_0x3deca4(0xef)]),_0x10e5bc[_0x3deca4(0xbe)]&&_0x5bb1a0[_0x3deca4(0xed)]&&console[_0x3deca4(0xc6)]('\x0aStack\x20trace:\x0a'+_0x5bb1a0['stack'])):console[_0x3deca4(0xc6)](_0x3deca4(0xdb)+String(_0x5bb1a0)),0x1;}}}
@@ -1 +1 @@
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
+ const a13_0x2eaad2=a13_0x4467;(function(_0x3b1a09,_0x130582){const _0x6cf3c3=a13_0x4467,_0xfdc190=_0x3b1a09();while(!![]){try{const _0x266136=-parseInt(_0x6cf3c3(0xa2))/0x1+parseInt(_0x6cf3c3(0xd1))/0x2*(-parseInt(_0x6cf3c3(0xc0))/0x3)+parseInt(_0x6cf3c3(0xcf))/0x4+parseInt(_0x6cf3c3(0xb6))/0x5+-parseInt(_0x6cf3c3(0xb2))/0x6*(parseInt(_0x6cf3c3(0xa7))/0x7)+-parseInt(_0x6cf3c3(0xe5))/0x8*(parseInt(_0x6cf3c3(0xac))/0x9)+parseInt(_0x6cf3c3(0xd7))/0xa;if(_0x266136===_0x130582)break;else _0xfdc190['push'](_0xfdc190['shift']());}catch(_0x215121){_0xfdc190['push'](_0xfdc190['shift']());}}}(a13_0x3e01,0xe2410));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';import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';import a13_0x2c2bce from'prompts';import{HTTPClientError}from'../client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a13_0x1e3024 from'chalk';export class AuthSetupCommand extends BaseCommand{[a13_0x2eaad2(0x9d)]=a13_0x2eaad2(0xb9);[a13_0x2eaad2(0x9e)]='Setup\x20API\x20key\x20authentication\x20interactively';async[a13_0x2eaad2(0xb8)](_0x485dfd){const _0x53fbff=a13_0x2eaad2,{options:_0x3f35fe}=_0x485dfd,_0x33a66c=_0x3f35fe[_0x53fbff(0x99)];console[_0x53fbff(0xcc)](a13_0x1e3024[_0x53fbff(0xa1)](_0x53fbff(0xeb)));const _0x5e2241=_0x3f35fe[_0x53fbff(0xea)]||'us01',_0xc305e1=[{'title':_0x53fbff(0x9a),'value':_0x53fbff(0xb3)},{'title':'jp\x20\x20\x20-\x20Japan','value':_0x53fbff(0xd6)},{'title':'eu\x20\x20\x20-\x20Europe','value':_0x53fbff(0xbc)},{'title':_0x53fbff(0xe2),'value':'ap02'}];let _0x379af8=_0xc305e1['findIndex'](_0x7593a4=>_0x7593a4[_0x53fbff(0xc9)]===_0x5e2241);_0x379af8===-0x1&&_0x5e2241!==_0x53fbff(0xb3)&&(_0xc305e1[_0x53fbff(0xe4)]({'title':_0x5e2241,'value':_0x5e2241}),_0x379af8=_0xc305e1[_0x53fbff(0xc5)]-0x1);_0xc305e1[_0x53fbff(0xe4)]({'title':'Enter\x20custom\x20site','value':'other'});const _0x5e248a=_0x33a66c?'Select\x20your\x20Treasure\x20Data\x20site\x20(for\x20profile:\x20'+_0x33a66c+'):':'Select\x20your\x20Treasure\x20Data\x20site:',_0x370f91=await a13_0x2c2bce({'type':_0x53fbff(0xc6),'name':_0x53fbff(0xea),'message':_0x5e248a,'choices':_0xc305e1,'initial':_0x379af8>=0x0?_0x379af8:0x0});if(!_0x370f91['site'])return console['log'](_0x53fbff(0xe0)),0x1;let _0x45b505;if(_0x370f91['site']===_0x53fbff(0x9c)){const _0x28ad6f=await a13_0x2c2bce({'type':_0x53fbff(0xd9),'name':_0x53fbff(0xae),'message':_0x53fbff(0xa0),'initial':'us01','validate':_0x4eae4d=>{const _0x39569c=_0x53fbff;if(!_0x4eae4d||!_0x4eae4d['trim']())return'Site\x20name\x20cannot\x20be\x20empty';if(!/^[a-z0-9-]+$/['test'](_0x4eae4d[_0x39569c(0xe3)]()))return _0x39569c(0xdc);return!![];}});if(!_0x28ad6f[_0x53fbff(0xae)])return console['log'](_0x53fbff(0xe0)),0x1;_0x45b505=_0x28ad6f['customSite'];}else _0x45b505=_0x370f91[_0x53fbff(0xea)];const _0x107c19=resolveSite(_0x45b505);console[_0x53fbff(0xcc)](_0x53fbff(0xb4)+_0x107c19),console[_0x53fbff(0xcc)](_0x53fbff(0xa3)),console[_0x53fbff(0xcc)]('\x20\x20'+getConsoleUrl(_0x107c19,_0x53fbff(0xbe)));const _0x3bcdef=await a13_0x2c2bce({'type':_0x53fbff(0xb5),'name':_0x53fbff(0xdf),'message':_0x53fbff(0xd2),'validate':_0x4defd3=>{const _0x4d7ed6=_0x53fbff;if(!_0x4defd3||!_0x4defd3[_0x4d7ed6(0xe3)]())return'API\x20key\x20cannot\x20be\x20empty';return!![];}});if(!_0x3bcdef['apiKey'])return console[_0x53fbff(0xcc)](_0x53fbff(0xe0)),0x1;const _0x14f889=_0x3bcdef[_0x53fbff(0xdf)];console[_0x53fbff(0xcc)](_0x53fbff(0xd5));try{const _0x38b7e9=TDX[_0x53fbff(0xe8)]({'site':_0x107c19,'apiKey':_0x14f889[_0x53fbff(0xe3)](),'logLevel':_0x3f35fe[_0x53fbff(0xa4)]??LogLevel[_0x53fbff(0xd0)]}),_0x2cad58=await _0x38b7e9[_0x53fbff(0xbb)][_0x53fbff(0xe7)]();console[_0x53fbff(0xcc)](_0x53fbff(0xe1)+_0x2cad58[_0x53fbff(0xde)]+')');const _0x344601=await isKeychainAvailable();_0x344601?(await saveAPIKeyAsync(_0x14f889[_0x53fbff(0xe3)](),_0x107c19,_0x33a66c),console[_0x53fbff(0xcc)]('✓\x20API\x20key\x20saved\x20to\x20system\x20keychain'+(_0x33a66c?'\x20(profile:\x20'+_0x33a66c+')':''))):(console[_0x53fbff(0x9f)](a13_0x1e3024[_0x53fbff(0xba)](_0x53fbff(0xc4))),console[_0x53fbff(0x9f)](a13_0x1e3024[_0x53fbff(0xba)]('\x20\x20Set\x20TD_API_KEY\x20environment\x20variable\x20for\x20authentication.')));if(_0x33a66c){const _0x57a0ed={'site':_0x107c19};saveProfileToUserConfig(_0x33a66c,_0x57a0ed),console[_0x53fbff(0xcc)](_0x53fbff(0xbd)+_0x33a66c+_0x53fbff(0xd8));}const _0x1502c5=_0x33a66c?_0x53fbff(0xca)+_0x33a66c:'';return console[_0x53fbff(0xcc)](),console[_0x53fbff(0xcc)](_0x53fbff(0xa8)),console[_0x53fbff(0xcc)](_0x53fbff(0xec)+_0x1502c5+_0x53fbff(0xe9)),console[_0x53fbff(0xcc)]('\x20\x20tdx'+_0x1502c5+_0x53fbff(0xbf)),0x0;}catch(_0x100a54){if(_0x100a54 instanceof HTTPClientError&&_0x100a54[_0x53fbff(0xb1)]===0x191)return printAuthError(_0x100a54),0x1;return console[_0x53fbff(0xd3)](a13_0x1e3024['red'](_0x53fbff(0xd4)+(_0x100a54 instanceof Error?_0x100a54[_0x53fbff(0xc1)]:String(_0x100a54)))),console[_0x53fbff(0xd3)]('API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.'),0x1;}}}export class AuthStatusCommand extends BaseCommand{[a13_0x2eaad2(0x9d)]='auth';[a13_0x2eaad2(0x9e)]=a13_0x2eaad2(0xce);async[a13_0x2eaad2(0xb8)](_0x524859){const _0x697d22=a13_0x2eaad2,{options:_0x2ba785,tdx:_0x37afd3}=_0x524859,_0x47711c=_0x2ba785[_0x697d22(0xea)],_0x4dd1f5=_0x2ba785[_0x697d22(0x99)],_0x513f82=_0x4dd1f5?_0x4dd1f5:_0x697d22(0xdd);console['log']('tdx\x20profile:\x20'+_0x513f82+_0x697d22(0xc8)+_0x47711c+')');const _0x33241a=await resolveAPIKeyAsync(_0x47711c,_0x4dd1f5);if(_0x33241a){const {source:_0x4d2836,isDeprecated:_0x7ddd5}=_0x33241a,_0x2e87cf=_0x697d22(0xa6)+_0x4d2836;console[_0x697d22(0xcc)](_0x7ddd5?a13_0x1e3024[_0x697d22(0xba)](_0x2e87cf):_0x2e87cf);}else console[_0x697d22(0xcc)](a13_0x1e3024[_0x697d22(0xba)](_0x697d22(0xdb)));try{const _0x4d5be7=await _0x37afd3['jobs']['getUserInfo']();return console[_0x697d22(0xcc)](a13_0x1e3024[_0x697d22(0xb0)](_0x697d22(0xc2))),console[_0x697d22(0xcc)](_0x697d22(0xab)+_0x4d5be7[_0x697d22(0xde)]),(_0x4d5be7[_0x697d22(0x9b)]||_0x4d5be7['last_name'])&&console[_0x697d22(0xcc)](_0x697d22(0xda)+[_0x4d5be7[_0x697d22(0x9b)],_0x4d5be7[_0x697d22(0xaf)]]['filter'](Boolean)[_0x697d22(0xcd)]('\x20')),0x0;}catch(_0x1ba72c){return _0x1ba72c instanceof HTTPClientError&&_0x1ba72c['status']===0x191?printAuthError(_0x1ba72c,!![],_0x4dd1f5):console[_0x697d22(0xd3)](a13_0x1e3024[_0x697d22(0xa9)](_0x697d22(0xd4)+(_0x1ba72c instanceof Error?_0x1ba72c[_0x697d22(0xc1)]:String(_0x1ba72c)))),0x1;}}}export class AuthClearCommand extends BaseCommand{['name']=a13_0x2eaad2(0xc3);[a13_0x2eaad2(0x9e)]=a13_0x2eaad2(0xe6);async[a13_0x2eaad2(0xb8)](_0x24e849){const _0x77eac3=a13_0x2eaad2,{options:_0x5851fd}=_0x24e849,_0x25f09f=_0x5851fd[_0x77eac3(0x99)];console[_0x77eac3(0xcc)](a13_0x1e3024[_0x77eac3(0xa1)](_0x77eac3(0xaa)));const _0x2d2a6b=await isKeychainAvailable();if(!_0x2d2a6b)return console['error'](a13_0x1e3024[_0x77eac3(0xa9)](_0x77eac3(0xad))),0x1;const _0x3772df=await deleteKeychainAPIKey(_0x25f09f);return _0x3772df?(clearCredentialCache(),console[_0x77eac3(0xcc)](_0x77eac3(0xc7)+(_0x25f09f?_0x77eac3(0xb7)+_0x25f09f+')':'')),0x0):(console[_0x77eac3(0xcc)](_0x77eac3(0xcb)+(_0x25f09f?_0x77eac3(0xa5)+_0x25f09f:'')),0x1);}}function a13_0x4467(_0x3309cc,_0x132968){const _0x3e0141=a13_0x3e01();return a13_0x4467=function(_0x44674b,_0x25aedd){_0x44674b=_0x44674b-0x99;let _0x1fd7f1=_0x3e0141[_0x44674b];return _0x1fd7f1;},a13_0x4467(_0x3309cc,_0x132968);}function a13_0x3e01(){const _0x199a02=['execute','auth:setup','yellow','jobs','eu01','✓\x20Profile\x20\x27','/app/mp/ak','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','1953roKAHH','message','✓\x20Authentication\x20successful\x0a','auth:clear','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','length','select','✓\x20API\x20key\x20removed\x20from\x20keychain','\x20(site:\x20','value','\x20--profile\x20','No\x20API\x20key\x20found\x20in\x20keychain','log','join','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','175852UWFiap','ERROR','3108pzfRuU','Enter\x20your\x20TD\x20API\x20key:','error','✗\x20Validation\x20failed:\x20','Validating\x20API\x20key...','jp01','52965050WhcZdZ','\x27\x20registered','text','Name:\x20','No\x20credential\x20found','Site\x20name\x20must\x20contain\x20only\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','N/A','email','apiKey','\x0aSetup\x20cancelled','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','ap02\x20-\x20Korea','trim','push','4156184GJEwDD','Remove\x20API\x20key\x20from\x20system\x20keychain','getUserInfo','create','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','site','tdx:\x20auth\x20setup','\x20\x20tdx','profile','us\x20\x20\x20-\x20United\x20States','first_name','other','name','description','warn','Enter\x20site\x20name:','bold','695778IMttlT','You\x20can\x20find\x20your\x20API\x20key\x20at:','logLevel','\x20for\x20profile:\x20','Read\x20credential\x20from\x20','11028164ueNgFG','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','red','tdx:\x20auth\x20clear','User:\x20','27nNyOcj','System\x20keychain\x20is\x20not\x20available','customSite','last_name','green','status','6dIpBNm','us01','Setting\x20up\x20authentication\x20for\x20site:\x20','password','2138605ysoQPZ','\x20(profile:\x20'];a13_0x3e01=function(){return _0x199a02;};return a13_0x3e01();}
@@ -1 +1 @@
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
+ const a14_0xa33ba0=a14_0x48ee;(function(_0x4b5033,_0x1244ae){const _0x39dc3b=a14_0x48ee,_0xa37a41=_0x4b5033();while(!![]){try{const _0x2b7898=-parseInt(_0x39dc3b(0x182))/0x1+-parseInt(_0x39dc3b(0x15e))/0x2*(-parseInt(_0x39dc3b(0x15f))/0x3)+parseInt(_0x39dc3b(0x18e))/0x4*(parseInt(_0x39dc3b(0x14f))/0x5)+-parseInt(_0x39dc3b(0x18b))/0x6+parseInt(_0x39dc3b(0x18a))/0x7+parseInt(_0x39dc3b(0x166))/0x8*(parseInt(_0x39dc3b(0x16b))/0x9)+-parseInt(_0x39dc3b(0x186))/0xa*(-parseInt(_0x39dc3b(0x17f))/0xb);if(_0x2b7898===_0x1244ae)break;else _0xa37a41['push'](_0xa37a41['shift']());}catch(_0x55a19b){_0xa37a41['push'](_0xa37a41['shift']());}}}(a14_0x2575,0x32ecd));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';function a14_0x48ee(_0x3e49c0,_0xa89890){const _0x25750a=a14_0x2575();return a14_0x48ee=function(_0x48ee7c,_0xe79398){_0x48ee7c=_0x48ee7c-0x14f;let _0x5c7e1a=_0x25750a[_0x48ee7c];return _0x5c7e1a;},a14_0x48ee(_0x3e49c0,_0xa89890);}import{saveLastChatId,loadLastChatId}from'../utils/chat-cache.js';import{resolveModelAlias}from'../utils/model-aliases.js';function handleSDKError(_0xc58d7a,_0x5e5acf){const _0x11116c=a14_0x48ee;if(_0xc58d7a instanceof SDKError)console[_0x11116c(0x183)](_0x11116c(0x164)+_0xc58d7a[_0x11116c(0x181)]),_0x5e5acf['verbose']&&(_0xc58d7a['cause']&&console[_0x11116c(0x183)](_0x11116c(0x15d)+_0xc58d7a[_0x11116c(0x152)]),_0xc58d7a['stack']&&(console['error'](_0x11116c(0x175)),console[_0x11116c(0x183)](_0xc58d7a[_0x11116c(0x157)])));else throw _0xc58d7a;}export class ChatCommand extends BaseCommand{[a14_0xa33ba0(0x179)]=a14_0xa33ba0(0x184);[a14_0xa33ba0(0x17b)]=a14_0xa33ba0(0x16f);[a14_0xa33ba0(0x16d)](_0x237b06){const _0x56b771=a14_0xa33ba0,_0x39ca14=_0x237b06[_0x56b771(0x17a)][_0x56b771(0x158)]('\x20');if(!_0x39ca14)return _0x56b771(0x18d);return undefined;}async[a14_0xa33ba0(0x16a)](_0x9fe254,_0x4c82c4,_0x2df8d4,_0xca9706,_0x439b19){const _0x527695=a14_0xa33ba0;for await(const _0x5356ae of _0x9fe254[_0x527695(0x161)][_0x527695(0x184)](_0x4c82c4,{'agentId':_0x2df8d4,'chatId':_0xca9706})){if(_0x5356ae['type']===_0x527695(0x170)){const _0xd025c0=_0x5356ae[_0x527695(0x165)][_0x527695(0x153)];saveLastChatId(_0xd025c0),_0x439b19&&console[_0x527695(0x183)](_0x527695(0x162)+_0xd025c0);}else _0x5356ae[_0x527695(0x16c)]==='event'&&this[_0x527695(0x160)](_0x5356ae[_0x527695(0x165)]);}}async[a14_0xa33ba0(0x169)](_0x477840,_0x1ad19c,_0x3e2bc3,_0x31da9f,_0x4ff75e){const _0x127a7d=a14_0xa33ba0;if(_0x1ad19c){const {projectName:_0x296800,agentName:_0xacce47}=parseAgentRef(_0x1ad19c);if(!_0xacce47)throw new Error('Agent\x20reference\x20must\x20include\x20project\x20name.\x20Usage:\x20--agent\x20\x22Project/Agent\x22');const _0x165ff2=await withSpinner(_0x127a7d(0x188)+_0x296800+'\x27...',()=>_0x477840[_0x127a7d(0x161)][_0x127a7d(0x173)](_0x296800),{'verbose':_0x4ff75e}),_0x9fe4ad=await withSpinner(_0x127a7d(0x17d)+_0xacce47+'\x27...',()=>_0x477840[_0x127a7d(0x161)][_0x127a7d(0x15a)](_0xacce47,_0x165ff2[_0x127a7d(0x165)]),{'verbose':_0x4ff75e});return _0x9fe4ad[_0x127a7d(0x165)];}else{const _0x4d438c=_0x3e2bc3||_0x127a7d(0x159),_0x476408=resolveModelAlias(_0x4d438c),_0x586511=await withSpinner(_0x127a7d(0x174)+_0x476408+'\x27...',()=>_0x477840[_0x127a7d(0x161)]['getOrCreateDefaultAgent'](_0x476408,0x0,_0x31da9f),{'verbose':_0x4ff75e});return _0x586511[_0x127a7d(0x165)]['id'];}}async[a14_0xa33ba0(0x177)](_0xbaadb1){const _0x5e7439=a14_0xa33ba0,{options:_0x10c242,args:_0x4e6c45,tdx:_0x3cb8e7}=_0xbaadb1,_0x4fd653=_0x4e6c45[_0x5e7439(0x158)]('\x20'),_0x5e33ec=_0x10c242,_0x1f8c52=_0x5e33ec[_0x5e7439(0x185)],_0x10c28b=_0x5e33ec[_0x5e7439(0x172)],_0x1556f1=_0x5e33ec[_0x5e7439(0x167)]?Number(_0x5e33ec[_0x5e7439(0x167)]):undefined,_0x39329c=_0x5e33ec[_0x5e7439(0x187)];try{let _0x2badb9,_0x393a77;!_0x39329c&&(_0x393a77=loadLastChatId(),_0x393a77&&_0x10c242['verbose']&&console[_0x5e7439(0x183)](_0x5e7439(0x168)+_0x393a77));(_0x39329c||!_0x393a77)&&(_0x2badb9=await this[_0x5e7439(0x169)](_0x3cb8e7,_0x1f8c52,_0x10c28b,_0x1556f1,_0x10c242['verbose']));try{await this[_0x5e7439(0x16a)](_0x3cb8e7,_0x4fd653,_0x2badb9,_0x393a77,_0x10c242['verbose']);}catch(_0x4eea2d){const _0x3d5457=_0x4eea2d instanceof SDKError&&_0x4eea2d[_0x5e7439(0x15b)]===ErrorCode['CHAT_NOT_FOUND']||_0x4eea2d instanceof Error&&_0x4eea2d[_0x5e7439(0x181)][_0x5e7439(0x163)](_0x5e7439(0x16e));if(_0x3d5457)_0x10c242[_0x5e7439(0x171)]&&console[_0x5e7439(0x183)](_0x5e7439(0x15c)),!_0x2badb9&&(_0x2badb9=await this['getAgentId'](_0x3cb8e7,_0x1f8c52,_0x10c28b,_0x1556f1,_0x10c242['verbose'])),await this[_0x5e7439(0x16a)](_0x3cb8e7,_0x4fd653,_0x2badb9,undefined,_0x10c242[_0x5e7439(0x171)]);else throw _0x4eea2d;}return console['log'](),0x0;}catch(_0x3029cb){return console[_0x5e7439(0x183)](),handleSDKError(_0x3029cb,_0x10c242),0x1;}}['handleSSEEvent'](_0x473c26){const _0x24b14c=a14_0xa33ba0;if(_0x24b14c(0x189)in _0x473c26)process[_0x24b14c(0x155)]['write'](_0x473c26[_0x24b14c(0x189)]);else{if(_0x24b14c(0x176)in _0x473c26)process['stderr']['write'](_0x24b14c(0x154)+_0x473c26[_0x24b14c(0x176)][_0x24b14c(0x18c)]+']\x0a');else{if(_0x24b14c(0x156)in _0x473c26)process[_0x24b14c(0x17c)][_0x24b14c(0x151)](_0x24b14c(0x180)+_0x473c26['tool']['functionName']+']\x0a');else{if(_0x24b14c(0x150)in _0x473c26)process[_0x24b14c(0x17c)][_0x24b14c(0x151)](_0x24b14c(0x17e)+_0x473c26[_0x24b14c(0x150)]['name']+']\x0a'),process['stderr'][_0x24b14c(0x151)](_0x473c26['output'][_0x24b14c(0x189)]+'\x0a');else _0x24b14c(0x183)in _0x473c26&&process[_0x24b14c(0x17c)][_0x24b14c(0x151)](_0x24b14c(0x178)+_0x473c26[_0x24b14c(0x183)]+']\x0a');}}}}}function a14_0x2575(){const _0x5d11f5=['286FwXLEU','8418OAkXmh','handleSSEEvent','llm','Chat\x20session:\x20','includes','Error:\x20','data','8cgaHwX','temperature','Continuing\x20chat:\x20','getAgentId','streamChat','426366qusANQ','type','validate','404','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)','metadata','verbose','model','resolveProjectId','Getting\x20agent\x20for\x20model\x20\x27','\x0aStack\x20trace:','tool_call','execute','\x0a[Error:\x20','name','args','description','stderr','Resolving\x20agent\x20\x27','\x0a[Output:\x20','329549eObOqN','[Tool\x20result:\x20','message','381371KMLezB','error','chat','agent','10ELJpkt','new','Resolving\x20project\x20\x27','content','1089753rTNoyy','620070CyggWI','functionName','Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options','4tEQjNu','295175FDUJwX','output','write','cause','chatId','\x0a[Tool:\x20','stdout','tool','stack','join','haiku','resolveAgentId','code','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','\x20\x20Cause:\x20'];a14_0x2575=function(){return _0x5d11f5;};return a14_0x2575();}
@@ -1 +1 @@
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
+ const a15_0x4f5c1e=a15_0x3080;(function(_0x295863,_0x1263c4){const _0x57260b=a15_0x3080,_0x1e20e3=_0x295863();while(!![]){try{const _0x159924=-parseInt(_0x57260b(0x10f))/0x1*(parseInt(_0x57260b(0x125))/0x2)+parseInt(_0x57260b(0x106))/0x3*(parseInt(_0x57260b(0xdc))/0x4)+-parseInt(_0x57260b(0x10c))/0x5+-parseInt(_0x57260b(0xe2))/0x6+parseInt(_0x57260b(0x112))/0x7*(-parseInt(_0x57260b(0x130))/0x8)+-parseInt(_0x57260b(0xf7))/0x9+-parseInt(_0x57260b(0xcb))/0xa*(-parseInt(_0x57260b(0x13a))/0xb);if(_0x159924===_0x1263c4)break;else _0x1e20e3['push'](_0x1e20e3['shift']());}catch(_0x406dc7){_0x1e20e3['push'](_0x1e20e3['shift']());}}}(a15_0x1a3b,0xbea15));import{spawn}from'node:child_process';import{readFile,writeFile,mkdir}from'node:fs/promises';import{existsSync}from'node:fs';import{join}from'node:path';import a15_0x202161 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(_0x39933c,_0x48b090,_0x54974f,_0x23f717){const _0x52a5c9=a15_0x3080;errorContains(_0x39933c,_0x52a5c9(0xc8),_0x52a5c9(0xd0),_0x52a5c9(0xf2))?(_0x54974f['text']='✓\x20'+_0x48b090+'\x20already\x20configured',_0x23f717?.[_0x52a5c9(0x11b)](_0x48b090+_0x52a5c9(0xd7)),_0x39933c instanceof SDKError&&_0x39933c['cause']&&_0x23f717?.[_0x52a5c9(0xcd)]('Command\x20output:\x20'+_0x39933c[_0x52a5c9(0xd3)][_0x52a5c9(0xf3)])):(_0x54974f[_0x52a5c9(0xf0)]('Warning:\x20Failed\x20to\x20configure\x20'+_0x48b090),_0x23f717?.['error'](_0x48b090+_0x52a5c9(0x135),_0x39933c));}async function executeClaudeCommand(_0x1e1a3b,_0x3d53bf,_0x155650){const _0x21dd3c=a15_0x3080;return _0x155650?.[_0x21dd3c(0x11b)](_0x21dd3c(0x132)+_0x1e1a3b[_0x21dd3c(0xe5)]('\x20')),new Promise((_0x363647,_0x3bc647)=>{const _0x1662f5=_0x21dd3c,_0x2b1eb9=spawn(_0x1662f5(0x118),_0x1e1a3b,{'stdio':_0x1662f5(0x133)});let _0x443a98='',_0x2ac150='';_0x2b1eb9[_0x1662f5(0xe0)]['on'](_0x1662f5(0x127),_0x5d323a=>{const _0x2a651e=_0x1662f5;_0x443a98+=_0x5d323a[_0x2a651e(0x111)]();}),_0x2b1eb9[_0x1662f5(0xf4)]['on'](_0x1662f5(0x127),_0x2ee44b=>{const _0x9cc02a=_0x1662f5;_0x2ac150+=_0x2ee44b[_0x9cc02a(0x111)]();}),_0x2b1eb9['on'](_0x1662f5(0x109),_0x387bcd=>{const _0x548d2e=_0x1662f5;if(_0x387bcd===0x0)_0x363647(_0x443a98);else _0x3d53bf?(_0x155650?.[_0x548d2e(0xe7)](_0x548d2e(0x122)+_0x387bcd+'):\x20claude\x20'+_0x1e1a3b[_0x548d2e(0xe5)]('\x20')),_0x3bc647(new SDKError(ErrorCode[_0x548d2e(0x137)],_0x3d53bf,new Error(_0x2ac150)))):_0x363647('');});});}async function ensureMcpServer(_0x39ab1d,_0x5274e3,_0x38720a,_0x22d3ac,_0x29901a){const _0x2a0d7d=a15_0x3080;_0x22d3ac[_0x2a0d7d(0x102)]=_0x2a0d7d(0xf5)+_0x39ab1d+'\x27...',await executeClaudeCommand([_0x2a0d7d(0xdf),'add',_0x39ab1d,_0x5274e3,_0x2a0d7d(0x124),_0x38720a],'Failed\x20to\x20configure\x20MCP\x20server\x20\x27'+_0x39ab1d+'\x27',_0x29901a),_0x22d3ac[_0x2a0d7d(0x102)]=_0x2a0d7d(0xf8)+_0x39ab1d+_0x2a0d7d(0xc6);}async function ensureMarketplace(_0xb5c60,_0x57b055,_0x575ed5,_0x3a49af){const _0x4cc7a3=a15_0x3080;_0x575ed5[_0x4cc7a3(0x102)]=_0x4cc7a3(0xef)+_0xb5c60+'\x27...',await executeClaudeCommand([_0x4cc7a3(0xee),'marketplace','add',_0x57b055],_0x4cc7a3(0x12f)+_0xb5c60+'\x27',_0x3a49af),_0x575ed5['text']=_0x4cc7a3(0xcf)+_0xb5c60+_0x4cc7a3(0xc6);}async function updateMarketplace(_0x5e67fd,_0x207c1b,_0x1b72fd){const _0x318118=a15_0x3080;_0x207c1b['text']=_0x318118(0xd2)+_0x5e67fd+'\x27...',await executeClaudeCommand([_0x318118(0xee),'marketplace',_0x318118(0x12b)],_0x318118(0xd8)+_0x5e67fd+'\x27',_0x1b72fd),_0x207c1b[_0x318118(0x102)]=_0x318118(0xcf)+_0x5e67fd+_0x318118(0xe9);}function a15_0x1a3b(){const _0xe07fd9=['debug','env','✓\x20Marketplace\x20\x27','already\x20installed','proxy','Updating\x20marketplace\x20\x27','cause','ANTHROPIC_BASE_URL','ANTHROPIC_MODEL','workflow-skills','\x20already\x20configured','Failed\x20to\x20update\x20marketplace\x20\x27','Skipping\x20TD\x20LLM\x20proxy\x20setup\x20(--no-proxy)','install','getLogPath','35396WZqhqI','trim','start','mcp','stdout','statusLine','1848510PZhxGA','model','string','join','llm','error','green','\x27\x20updated','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy','which','log','Initializing...','plugin','Configuring\x20marketplace\x20\x27','warn','TD\x20Docs\x20MCP\x20Server','already\x20configured','message','stderr','Configuring\x20MCP\x20server\x20\x27','Failed\x20to\x20launch\x20Claude\x20Code:\x20','9458343AOBAyX','✓\x20MCP\x20server\x20\x27','utf-8','execute','inherit','sonnet','\x27\x20installed','Failed\x20to\x20install\x20plugin\x20\x27','settings.local.json','tdx\x20--profile\x20','tdx\x20claude\x20statusline','text','localhost','parse','stringify','69eTZbbE','Claude\x20Code\x20CLI\x20not\x20found','✓\x20Logs\x20saved\x20to\x20','exit','server','✓\x20TD\x20LLM\x20proxy\x20server\x20stopped','1008420jvLiHI','Initializing\x20proxy\x20logger...','logger','338017zfSXDa','cwd','toString','1599913DSPiEe','stop','includes','COMMAND_NOT_FOUND','findClaudePath','✓\x20Settings\x20restored:\x20.claude/settings.local.json','claude','✓\x20TD\x20LLM\x20proxy\x20running\x20on\x20port\x20','td-skills','info','✓\x20Plugin\x20\x27','sql-skills','Please\x20install\x20Claude\x20Code\x20from\x20https://claude.com/claude-code','close','getOrCreateDefaultProject','originalSettings','Command\x20failed\x20(exit\x20','https://docs.treasuredata.com/mcp','--transport','2vLLBtH','https://github.com/treasure-data/td-skills','data','td-skills\x20Plugins','tdx','name','update','fail','site','attributes','Failed\x20to\x20configure\x20marketplace\x20\x27','8vKkEpb','\x27...','Executing:\x20claude\x20','pipe','Setup\x20failed','\x20configuration\x20failed','init','INSTALLATION_FAILED','✓\x20Settings\x20configured:\x20.claude/settings.local.json','Finding\x20available\x20port...','66ZOMnwX','http','command','\x27\x20configured','http://127.0.0.1:','already\x20exists','Starting\x20TD\x20LLM\x20proxy\x20server...','hostname','4507610BpLAnG','.claude'];a15_0x1a3b=function(){return _0xe07fd9;};return a15_0x1a3b();}async function ensurePlugin(_0x25ff94,_0x557b41,_0x4a6d23,_0x5cb6c2){const _0x2f957a=a15_0x3080;_0x4a6d23[_0x2f957a(0x102)]='Installing\x20plugin\x20\x27'+_0x25ff94+_0x2f957a(0x131),await executeClaudeCommand([_0x2f957a(0xee),_0x2f957a(0xda),_0x25ff94+'@'+_0x557b41],_0x2f957a(0xfe)+_0x25ff94+'\x27',_0x5cb6c2),_0x4a6d23[_0x2f957a(0x102)]=_0x2f957a(0x11c)+_0x25ff94+_0x2f957a(0xfd);}async function createClaudeSettings(_0x253c05,_0x66a7f5=a15_0x4f5c1e(0xfc),_0x4a72d3){const _0x2e1ab8=a15_0x4f5c1e,_0x454251=join(process[_0x2e1ab8(0x110)](),_0x2e1ab8(0xcc)),_0x563a52=join(_0x454251,_0x2e1ab8(0xff));await mkdir(_0x454251,{'recursive':!![]});let _0x1d5b16={};if(existsSync(_0x563a52))try{const _0x2796b0=await readFile(_0x563a52,_0x2e1ab8(0xf9));_0x1d5b16=JSON[_0x2e1ab8(0x104)](_0x2796b0);}catch{_0x1d5b16={};}const _0x2e85aa=_0x1d5b16[_0x2e1ab8(0xce)]||{},_0x5d3bca={'ANTHROPIC_BASE_URL':_0x2e85aa[_0x2e1ab8(0xd4)],'ANTHROPIC_MODEL':_0x2e85aa['ANTHROPIC_MODEL'],'statusLine':_0x1d5b16['statusLine']},_0x40e025={..._0x1d5b16,'env':{..._0x2e85aa,'ANTHROPIC_BASE_URL':_0x2e1ab8(0xc7)+_0x253c05,'ANTHROPIC_MODEL':_0x66a7f5},'statusLine':{'type':_0x2e1ab8(0x13c),'command':_0x4a72d3?_0x2e1ab8(0x100)+_0x4a72d3+'\x20claude\x20statusline':_0x2e1ab8(0x101)}};return await writeFile(_0x563a52,JSON[_0x2e1ab8(0x105)](_0x40e025,null,0x2)+'\x0a'),_0x5d3bca;}function a15_0x3080(_0x5ab275,_0x20ac5c){const _0x1a3b79=a15_0x1a3b();return a15_0x3080=function(_0x3080e6,_0x2cc339){_0x3080e6=_0x3080e6-0xc6;let _0x4c9e42=_0x1a3b79[_0x3080e6];return _0x4c9e42;},a15_0x3080(_0x5ab275,_0x20ac5c);}async function restoreClaudeSettings(_0x15e7af){const _0x59305d=a15_0x4f5c1e,_0x3a0e18=join(process[_0x59305d(0x110)](),'.claude'),_0x457941=join(_0x3a0e18,_0x59305d(0xff));if(!existsSync(_0x457941))return;try{const _0x44e874=await readFile(_0x457941,_0x59305d(0xf9)),_0x2c2ade=JSON['parse'](_0x44e874),_0x410653=_0x2c2ade[_0x59305d(0xce)]||{},_0x35eac3=_0x410653[_0x59305d(0xd4)],_0x3d8a49=((()=>{const _0x265a91=_0x59305d;if(typeof _0x35eac3!=='string')return![];try{const _0x53eaf6=new URL(_0x35eac3);return _0x53eaf6['hostname']===_0x265a91(0x103)||_0x53eaf6[_0x265a91(0xca)]==='127.0.0.1';}catch{return![];}})());_0x3d8a49?(delete _0x410653[_0x59305d(0xd4)],delete _0x410653['ANTHROPIC_MODEL']):(_0x15e7af['ANTHROPIC_BASE_URL']!==undefined?_0x410653[_0x59305d(0xd4)]=_0x15e7af['ANTHROPIC_BASE_URL']:delete _0x410653[_0x59305d(0xd4)],_0x15e7af[_0x59305d(0xd5)]!==undefined?_0x410653[_0x59305d(0xd5)]=_0x15e7af[_0x59305d(0xd5)]:delete _0x410653[_0x59305d(0xd5)]);const _0x24c2ae=_0x2c2ade['statusLine'],_0x493aee=((()=>{const _0x2b3c4b=_0x59305d;if(!_0x24c2ae||typeof _0x24c2ae!=='object')return![];if(_0x24c2ae['type']!=='command')return![];if(typeof _0x24c2ae[_0x2b3c4b(0x13c)]!==_0x2b3c4b(0xe4))return![];return _0x24c2ae[_0x2b3c4b(0x13c)][_0x2b3c4b(0x114)](_0x2b3c4b(0x129))&&_0x24c2ae['command'][_0x2b3c4b(0x114)]('statusline');})());if(_0x493aee)delete _0x2c2ade[_0x59305d(0xe1)];else _0x15e7af['statusLine']!==undefined?_0x2c2ade[_0x59305d(0xe1)]=_0x15e7af[_0x59305d(0xe1)]:delete _0x2c2ade[_0x59305d(0xe1)];_0x2c2ade[_0x59305d(0xce)]=_0x410653,await writeFile(_0x457941,JSON[_0x59305d(0x105)](_0x2c2ade,null,0x2)+'\x0a');}catch{}}export class ClaudeCommand extends BaseCommand{[a15_0x4f5c1e(0x12a)]=a15_0x4f5c1e(0x118);['description']=a15_0x4f5c1e(0xea);[a15_0x4f5c1e(0x10a)];[a15_0x4f5c1e(0x121)];[a15_0x4f5c1e(0x10e)];async[a15_0x4f5c1e(0xfa)](_0x5baa59){const _0x3f3f4b=a15_0x4f5c1e,{tdx:_0x31dcfc,options:_0x9b4193,args:_0x29a3c8}=_0x5baa59;try{const _0x221fd0=_0x9b4193,_0x5d425d=_0x221fd0[_0x3f3f4b(0xe3)]||_0x3f3f4b(0xfc),_0x39a0bc=_0x221fd0[_0x3f3f4b(0xd1)]===![],_0x204092=createCommandSpinner(_0x3f3f4b(0xed),{'verbose':_0x9b4193['verbose']});_0x204092[_0x3f3f4b(0xde)]();try{if(!_0x39a0bc){_0x204092[_0x3f3f4b(0x102)]=_0x3f3f4b(0x139);const _0x30b568=await findAvailablePort(0xfa0);_0x204092[_0x3f3f4b(0x102)]='✓\x20Port\x20'+_0x30b568,_0x204092[_0x3f3f4b(0x102)]='Setting\x20up\x20project...';const _0xf5a454=await _0x31dcfc[_0x3f3f4b(0xe6)][_0x3f3f4b(0x120)](),_0x464c66=_0xf5a454['id'];_0x204092[_0x3f3f4b(0x102)]='✓\x20Using\x20project:\x20'+_0xf5a454[_0x3f3f4b(0x12e)][_0x3f3f4b(0x12a)],_0x204092[_0x3f3f4b(0x102)]=_0x3f3f4b(0x10d),this[_0x3f3f4b(0x10e)]=new TDXLogger(_0x9b4193['logLevel'],!![]),await this[_0x3f3f4b(0x10e)][_0x3f3f4b(0x136)]();const _0x5eeed4=this[_0x3f3f4b(0x10e)]['getLogPath']();_0x204092[_0x3f3f4b(0x102)]='✓\x20Logging\x20to\x20'+_0x5eeed4,_0x204092[_0x3f3f4b(0x102)]=_0x3f3f4b(0xc9),this[_0x3f3f4b(0x10a)]=new ProxyServer({'port':_0x30b568,'projectId':_0x464c66,'tdx':_0x31dcfc,'logger':this[_0x3f3f4b(0x10e)],'site':_0x9b4193[_0x3f3f4b(0x12d)]}),await this[_0x3f3f4b(0x10a)][_0x3f3f4b(0xde)](),_0x204092['text']=_0x3f3f4b(0x119)+_0x30b568,_0x204092['text']='Creating\x20.claude/settings.local.json...';const _0x62b3b8=_0x9b4193['profile'];this[_0x3f3f4b(0x121)]=await createClaudeSettings(_0x30b568,_0x5d425d,_0x62b3b8),_0x204092['text']=_0x3f3f4b(0x138);}else _0x204092['text']=_0x3f3f4b(0xd9);try{await ensureMcpServer('td-docs',_0x3f3f4b(0x123),_0x3f3f4b(0x13b),_0x204092,this[_0x3f3f4b(0x10e)]);}catch(_0x4a159b){handleInstallationError(_0x4a159b,_0x3f3f4b(0xf1),_0x204092,this[_0x3f3f4b(0x10e)]);}try{await ensureMarketplace(_0x3f3f4b(0x11a),_0x3f3f4b(0x126),_0x204092,this[_0x3f3f4b(0x10e)]),await updateMarketplace(_0x3f3f4b(0x11a),_0x204092,this[_0x3f3f4b(0x10e)]),await ensurePlugin(_0x3f3f4b(0x11d),_0x3f3f4b(0x11a),_0x204092,this[_0x3f3f4b(0x10e)]),await ensurePlugin(_0x3f3f4b(0xd6),_0x3f3f4b(0x11a),_0x204092,this[_0x3f3f4b(0x10e)]),await ensurePlugin('tdx-skills',_0x3f3f4b(0x11a),_0x204092,this['logger']);}catch(_0x2c0864){handleInstallationError(_0x2c0864,_0x3f3f4b(0x128),_0x204092,this[_0x3f3f4b(0x10e)]);}_0x204092[_0x3f3f4b(0x113)]();}catch(_0x3d7358){_0x204092[_0x3f3f4b(0x12c)](_0x3f3f4b(0x134));throw _0x3d7358;}const _0x36e0ed=await this[_0x3f3f4b(0x116)]();if(!_0x36e0ed)throw new SDKError(ErrorCode[_0x3f3f4b(0x115)],_0x3f3f4b(0x107),undefined,{'helpText':_0x3f3f4b(0x11e)});const _0x10b434=spawn(_0x36e0ed,_0x29a3c8,{'stdio':_0x3f3f4b(0xfb)}),_0x52b123=await new Promise(_0x2740e4=>{const _0x47c826=_0x3f3f4b;_0x10b434['on'](_0x47c826(0x109),_0x5e3219=>{_0x2740e4(_0x5e3219||0x0);}),_0x10b434['on'](_0x47c826(0xe7),_0x408ef4=>{const _0x2408e3=_0x47c826;console['error'](a15_0x202161['red'](_0x2408e3(0xf6)+_0x408ef4['message'])),_0x2740e4(0x1);});});this['server']&&(await this[_0x3f3f4b(0x10a)][_0x3f3f4b(0x113)](),console['log'](a15_0x202161[_0x3f3f4b(0xe8)](_0x3f3f4b(0x10b))));if(this['logger']){await this['logger'][_0x3f3f4b(0x11f)]();const _0x1b23ed=this[_0x3f3f4b(0x10e)][_0x3f3f4b(0xdb)]();console[_0x3f3f4b(0xec)](a15_0x202161[_0x3f3f4b(0xe8)](_0x3f3f4b(0x108)+_0x1b23ed));}return this[_0x3f3f4b(0x121)]&&(await restoreClaudeSettings(this['originalSettings']),console[_0x3f3f4b(0xec)](a15_0x202161[_0x3f3f4b(0xe8)](_0x3f3f4b(0x117)))),_0x52b123;}catch(_0x286b54){this['server']&&await this[_0x3f3f4b(0x10a)][_0x3f3f4b(0x113)]();this[_0x3f3f4b(0x10e)]&&await this[_0x3f3f4b(0x10e)][_0x3f3f4b(0x11f)]();this[_0x3f3f4b(0x121)]&&await restoreClaudeSettings(this[_0x3f3f4b(0x121)]);throw _0x286b54;}}async[a15_0x4f5c1e(0x116)](){return new Promise(_0x2287cd=>{const _0x32ad68=a15_0x3080,_0x5a382b=spawn(_0x32ad68(0xeb),[_0x32ad68(0x118)]);let _0x279695='';_0x5a382b[_0x32ad68(0xe0)]['on'](_0x32ad68(0x127),_0x5d433b=>{const _0x30ea99=_0x32ad68;_0x279695+=_0x5d433b[_0x30ea99(0x111)]();}),_0x5a382b['on'](_0x32ad68(0x109),_0x37f255=>{const _0x3257d8=_0x32ad68;_0x37f255===0x0&&_0x279695[_0x3257d8(0xdd)]()?_0x2287cd(_0x279695[_0x3257d8(0xdd)]()):_0x2287cd(_0x3257d8(0x118));});});}}
@@ -1 +1 @@
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
+ const a16_0x563944=a16_0x517f;(function(_0x3100cf,_0x466599){const _0x4477d0=a16_0x517f,_0x7cdefc=_0x3100cf();while(!![]){try{const _0x550e9c=parseInt(_0x4477d0(0x125))/0x1+parseInt(_0x4477d0(0x132))/0x2+parseInt(_0x4477d0(0x13b))/0x3+parseInt(_0x4477d0(0x12d))/0x4+-parseInt(_0x4477d0(0x134))/0x5*(parseInt(_0x4477d0(0x12e))/0x6)+-parseInt(_0x4477d0(0x120))/0x7*(parseInt(_0x4477d0(0x11d))/0x8)+-parseInt(_0x4477d0(0x11c))/0x9;if(_0x550e9c===_0x466599)break;else _0x7cdefc['push'](_0x7cdefc['shift']());}catch(_0x5d9e55){_0x7cdefc['push'](_0x7cdefc['shift']());}}}(a16_0x3661,0xc039f));import{createInterface}from'node:readline';import{BaseCommand}from'./command.js';function a16_0x517f(_0x25cf69,_0x3283d3){const _0x36619e=a16_0x3661();return a16_0x517f=function(_0x517f7b,_0x55dee7){_0x517f7b=_0x517f7b-0x11b;let _0x2fb0d9=_0x36619e[_0x517f7b];return _0x2fb0d9;},a16_0x517f(_0x25cf69,_0x3283d3);}import{getUsageStats}from'../proxy/claude-usage-tracker.js';function a16_0x3661(){const _0x42ebf1=['toFixed','🧠\x20','monthCredits','1365319wNKfpF','close','🪙\x20credit:\x20','latestInputTokens','statusline','profile','todayCredits','push','1685100NkOpPn','6kUCgFl','model','sessionCredits','parse','1073434pjTGoC','session_id','5183410mJbfjf','join','\x20|\x20','\x20session\x20/\x20','stdin','description','execute','4262814aXCQsa','\x20today\x20/\x20','log','17070228WWbEeb','47032OSFMEP','🤖\x20tdx\x20-\x20Claude','\x20month','28BEscQB','Output\x20statusline\x20for\x20Claude\x20Code\x20(reads\x20JSON\x20from\x20stdin)'];a16_0x3661=function(){return _0x42ebf1;};return a16_0x3661();}import{getModelDisplayName,formatTokenCount,calculateContextPercentage}from'../utils/model-factors.js';async function readStdinJson(_0x4ef958=0x64){return new Promise(_0x20da42=>{const _0x2bdf35=a16_0x517f;let _0x37826f='',_0x16e89d=![];const _0x22485e=createInterface({'input':process[_0x2bdf35(0x138)],'terminal':![]}),_0x34d644=_0x40441e=>{const _0x4734b7=_0x2bdf35;if(_0x16e89d)return;_0x16e89d=!![],clearTimeout(_0x1be75f),_0x22485e[_0x4734b7(0x126)](),_0x20da42(_0x40441e);},_0x1be75f=setTimeout(()=>{_0x34d644(null);},_0x4ef958);_0x22485e['on']('line',_0x3eafa6=>{_0x37826f+=_0x3eafa6;}),_0x22485e['on']('close',()=>{const _0x579509=_0x2bdf35;if(_0x16e89d)return;try{const _0x3976d2=JSON[_0x579509(0x131)](_0x37826f);_0x34d644(_0x3976d2);}catch{_0x34d644(null);}});});}function formatCredits(_0x7870f6){const _0x16c2dd=a16_0x517f;return _0x7870f6[_0x16c2dd(0x122)](0x2);}export class ClaudeStatuslineCommand extends BaseCommand{['name']=a16_0x563944(0x129);[a16_0x563944(0x139)]=a16_0x563944(0x121);async[a16_0x563944(0x13a)](_0x35a29b){const _0x453b44=a16_0x563944;try{const _0x9aeb96=await readStdinJson();if(!_0x9aeb96?.[_0x453b44(0x133)])return console['log'](_0x453b44(0x11e)),0x0;const _0x15ee05=_0x9aeb96[_0x453b44(0x133)],_0xaba01d=_0x9aeb96[_0x453b44(0x12f)]?.['id']||'',_0x310798=_0x9aeb96['profile']||_0x35a29b['options'][_0x453b44(0x12a)],_0x13a51f=await getUsageStats(_0x15ee05,_0x310798),_0x35a448=[],_0x21d7d1=_0xaba01d?getModelDisplayName(_0xaba01d):'Claude';_0x35a448[_0x453b44(0x12c)]('🤖\x20tdx\x20-\x20'+_0x21d7d1);const _0x2f798d=formatCredits(_0x13a51f[_0x453b44(0x130)]),_0x520669=formatCredits(_0x13a51f[_0x453b44(0x12b)]),_0x11cc4c=formatCredits(_0x13a51f[_0x453b44(0x124)]);_0x35a448[_0x453b44(0x12c)](_0x453b44(0x127)+_0x2f798d+_0x453b44(0x137)+_0x520669+_0x453b44(0x13c)+_0x11cc4c+_0x453b44(0x11f));if(_0x13a51f[_0x453b44(0x128)]>0x0&&_0xaba01d){const _0x14883f=formatTokenCount(_0x13a51f[_0x453b44(0x128)]),_0x2b7859=calculateContextPercentage(_0x13a51f[_0x453b44(0x128)],_0xaba01d);_0x35a448[_0x453b44(0x12c)](_0x453b44(0x123)+_0x14883f+'\x20('+_0x2b7859+'%)');}return console[_0x453b44(0x11b)](_0x35a448[_0x453b44(0x135)](_0x453b44(0x136))),0x0;}catch{return console[_0x453b44(0x11b)](_0x453b44(0x11e)),0x0;}}}
@@ -1 +1 @@
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
+ const a17_0x116bd7=a17_0x1992;(function(_0x462f9b,_0x4d1727){const _0x426ea3=a17_0x1992,_0x574f66=_0x462f9b();while(!![]){try{const _0x429d92=-parseInt(_0x426ea3(0x1ab))/0x1*(parseInt(_0x426ea3(0x17a))/0x2)+-parseInt(_0x426ea3(0x184))/0x3+-parseInt(_0x426ea3(0x186))/0x4+parseInt(_0x426ea3(0x187))/0x5*(parseInt(_0x426ea3(0x171))/0x6)+parseInt(_0x426ea3(0x1a6))/0x7+-parseInt(_0x426ea3(0x1a0))/0x8*(parseInt(_0x426ea3(0x1a1))/0x9)+parseInt(_0x426ea3(0x1aa))/0xa*(parseInt(_0x426ea3(0x1af))/0xb);if(_0x429d92===_0x4d1727)break;else _0x574f66['push'](_0x574f66['shift']());}catch(_0x3f849d){_0x574f66['push'](_0x574f66['shift']());}}}(a17_0x4d7d,0xab6cf));import a17_0x5bc90f from'chalk';import{BaseCommand}from'./command.js';function a17_0x1992(_0x527a45,_0x5191fa){const _0x4d7dd2=a17_0x4d7d();return a17_0x1992=function(_0x1992dd,_0x48e0de){_0x1992dd=_0x1992dd-0x16e;let _0x2b27df=_0x4d7dd2[_0x1992dd];return _0x2b27df;},a17_0x1992(_0x527a45,_0x5191fa);}import{handleSDKOutput}from'../utils/command-output.js';import{getAllProfileStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function formatCredits(_0x3633fb){const _0x2f6720=a17_0x1992;return _0x3633fb[_0x2f6720(0x194)](0x2);}function formatLastUsed(_0x57b63e){const _0x25a36e=a17_0x1992;if(!_0x57b63e)return _0x25a36e(0x197);const _0x3735e4=new Date(_0x57b63e),_0x2c5c5b=new Date(),_0x596841=_0x3735e4[_0x25a36e(0x19d)](_0x25a36e(0x1ac)),_0x3283dc=_0x2c5c5b[_0x25a36e(0x19d)](_0x25a36e(0x1ac));if(_0x596841===_0x3283dc)return _0x25a36e(0x172)+_0x3735e4[_0x25a36e(0x18d)](_0x25a36e(0x183),{'hour':_0x25a36e(0x19e),'minute':_0x25a36e(0x19e)});const _0x16fb99=new Date(_0x596841),_0xcd9c61=new Date(_0x3283dc),_0x46ee94=Math[_0x25a36e(0x198)]((_0xcd9c61[_0x25a36e(0x1a4)]()-_0x16fb99['getTime']())/(0x18*0x3c*0x3c*0x3e8));if(_0x46ee94===0x1)return _0x25a36e(0x17b);else return _0x46ee94>0x1&&_0x46ee94<0x7?_0x46ee94+_0x25a36e(0x1a9):_0x3735e4['toLocaleDateString'](_0x25a36e(0x183),{'month':_0x25a36e(0x18e),'day':_0x25a36e(0x19c)});}function a17_0x4d7d(){const _0x12be8a=['totalCredits','\x20credits','en-US','2417499fEJxcj','json','4003140VjffyL','3282990tkYFKu','map','jsonl','profileCount','profile','outputTable','toLocaleTimeString','short','Profile','max','all','(default)','red','toFixed','Requests','padStart','never','round','\x20\x20Run\x20\x22tdx\x20claude\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','bold','name','numeric','toLocaleDateString','2-digit','length','688rrTbso','38853KYwbdG','usage','todayCredits','getTime','repeat','6767446dZASsu','log','execute','\x20days\x20ago','10kfxibv','586WbsbEU','en-CA','Usage\x20by\x20Profile','entryCount','17955179ZsaAZJ','Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.','\x20\x20Month:\x20\x20\x20','Credits','Unknown\x20error','\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','Last\x20Used','format','6IkacFE','today\x20','monthCredits','message','padEnd','description','credits','\x20\x20Total:\x20\x20\x20','Error:\x20','1282GMGCwf','yesterday','dim','cyan','lastUsedAt','outputStructured','default'];a17_0x4d7d=function(){return _0x12be8a;};return a17_0x4d7d();}export class ClaudeUsageCommand extends BaseCommand{[a17_0x116bd7(0x19b)]=a17_0x116bd7(0x1a2);[a17_0x116bd7(0x176)]='Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile';async[a17_0x116bd7(0x1a8)](_0x55020c){const _0x48c0a0=a17_0x116bd7,{options:_0x4b9c5b}=_0x55020c,_0x2192ec=_0x4b9c5b[_0x48c0a0(0x170)]===_0x48c0a0(0x185)||_0x4b9c5b['format']===_0x48c0a0(0x189)||_0x4b9c5b[_0x48c0a0(0x185)];try{const [_0x2d3cae,_0x20b424]=await Promise[_0x48c0a0(0x191)]([getAllProfileStats(),getUsageSummary()]);return _0x2192ec?await this['outputStructured'](_0x2d3cae,_0x20b424,_0x4b9c5b):this[_0x48c0a0(0x18c)](_0x2d3cae,_0x20b424),0x0;}catch(_0x111bae){const _0x5a9420=_0x111bae instanceof Error?_0x111bae[_0x48c0a0(0x174)]:_0x48c0a0(0x1b3);return console['error'](a17_0x5bc90f[_0x48c0a0(0x193)](_0x48c0a0(0x179)+_0x5a9420)),0x1;}}async[a17_0x116bd7(0x17f)](_0x7e56df,_0x2afbd6,_0x370c29){const _0x410a01=a17_0x116bd7,_0x2e6cdb={'summary':{'todayCredits':_0x2afbd6[_0x410a01(0x1a3)],'monthCredits':_0x2afbd6[_0x410a01(0x173)],'totalCredits':_0x2afbd6[_0x410a01(0x181)],'profileCount':_0x2afbd6[_0x410a01(0x18a)]},'profiles':_0x7e56df[_0x410a01(0x188)](_0x45f9c3=>({'profile':_0x45f9c3[_0x410a01(0x18b)],'credits':_0x45f9c3[_0x410a01(0x177)],'requests':_0x45f9c3['entryCount'],'lastUsedAt':_0x45f9c3[_0x410a01(0x17e)]}))};await handleSDKOutput([_0x2e6cdb],_0x370c29);}[a17_0x116bd7(0x18c)](_0x14557f,_0x255c20){const _0x5b8de9=a17_0x116bd7;console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x19a)](_0x5b8de9(0x1b4))),console['log'](a17_0x5bc90f[_0x5b8de9(0x17c)]('─'[_0x5b8de9(0x1a5)](0x32))),console[_0x5b8de9(0x1a7)]('\x20\x20Today:\x20\x20\x20'+a17_0x5bc90f[_0x5b8de9(0x17d)](formatCredits(_0x255c20[_0x5b8de9(0x1a3)]))+_0x5b8de9(0x182)),console[_0x5b8de9(0x1a7)](_0x5b8de9(0x1b1)+a17_0x5bc90f['cyan'](formatCredits(_0x255c20[_0x5b8de9(0x173)]))+_0x5b8de9(0x182)),console['log'](_0x5b8de9(0x178)+a17_0x5bc90f[_0x5b8de9(0x17d)](formatCredits(_0x255c20['totalCredits']))+_0x5b8de9(0x182)),console[_0x5b8de9(0x1a7)]();if(_0x14557f[_0x5b8de9(0x19f)]===0x0){console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x17c)](_0x5b8de9(0x16e))),console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x17c)](_0x5b8de9(0x199)));return;}console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x19a)](_0x5b8de9(0x1ad))),console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x17c)]('─'['repeat'](0x3c)));const _0x6454e2=Math[_0x5b8de9(0x190)](0xc,..._0x14557f[_0x5b8de9(0x188)](_0x2628d2=>_0x2628d2[_0x5b8de9(0x18b)]===_0x5b8de9(0x180)?'(default)'[_0x5b8de9(0x19f)]:_0x2628d2[_0x5b8de9(0x18b)][_0x5b8de9(0x19f)])),_0x586937=0xa,_0x25c970=0xa;console[_0x5b8de9(0x1a7)]('\x20\x20'+_0x5b8de9(0x18f)[_0x5b8de9(0x175)](_0x6454e2)+'\x20\x20'+_0x5b8de9(0x1b2)[_0x5b8de9(0x196)](_0x586937)+'\x20\x20'+_0x5b8de9(0x195)[_0x5b8de9(0x196)](_0x25c970)+'\x20\x20'+_0x5b8de9(0x16f));for(const _0x173639 of _0x14557f){const _0xa9bce1=_0x173639[_0x5b8de9(0x18b)]===_0x5b8de9(0x180)?_0x5b8de9(0x192):_0x173639[_0x5b8de9(0x18b)],_0x493da9=_0xa9bce1[_0x5b8de9(0x175)](_0x6454e2),_0x53ad5d=_0x173639[_0x5b8de9(0x18b)]==='default'?a17_0x5bc90f[_0x5b8de9(0x17c)](_0x493da9):_0x493da9;console[_0x5b8de9(0x1a7)]('\x20\x20'+_0x53ad5d+'\x20\x20'+a17_0x5bc90f[_0x5b8de9(0x17d)](formatCredits(_0x173639[_0x5b8de9(0x177)])['padStart'](_0x586937))+'\x20\x20'+String(_0x173639[_0x5b8de9(0x1ae)])['padStart'](_0x25c970)+'\x20\x20'+a17_0x5bc90f[_0x5b8de9(0x17c)](formatLastUsed(_0x173639['lastUsedAt'])));}console[_0x5b8de9(0x1a7)](),console[_0x5b8de9(0x1a7)](a17_0x5bc90f[_0x5b8de9(0x17c)](_0x5b8de9(0x1b0))),console['log']();}}
@@ -1 +1 @@
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
+ function a18_0x1249(){const _0xa60d7d=['validate','helpText','options','get','48JmmaMH','Reason:\x20','limit','message','validateGlobalOptions','red','Invalid\x20limit\x20value:\x20','260322OgHSVH','22oilDFl','468770tYDzcS','has','status','Authentication\x20error\x20stack\x20trace:','commands','.\x20Must\x20be\x20a\x20number.','\x20\x20tdx\x20auth\x20setup','values','7qolYJb','596241nIvSba','profile','category','test','yellow','\x27\x20is\x20already\x20registered','820688iESYOa','isValid','\x20\x20tdx\x20auth','problemDetails','stack','set','\x20--profile\x20','Command\x20\x27','register','631872tyXtpu','To\x20check\x20your\x20current\x20auth\x20status:','tdx','\x0aTo\x20set\x20up\x20authentication:','217771qGiodh','Error:\x20','\x0aStack\x20trace:\x0a','number','6QHwtzh','4055315goOrHA','error','name','detail','logger','run','Authentication\x20failed','from'];a18_0x1249=function(){return _0xa60d7d;};return a18_0x1249();}const a18_0x1038a8=a18_0x1337;(function(_0x44f473,_0xb38fa0){const _0x3c2076=a18_0x1337,_0xe994a4=_0x44f473();while(!![]){try{const _0x39d00a=parseInt(_0x3c2076(0xeb))/0x1+-parseInt(_0x3c2076(0x103))/0x2*(-parseInt(_0x3c2076(0xef))/0x3)+-parseInt(_0x3c2076(0xde))/0x4+parseInt(_0x3c2076(0xf0))/0x5+-parseInt(_0x3c2076(0xe7))/0x6*(parseInt(_0x3c2076(0xd7))/0x7)+-parseInt(_0x3c2076(0xfc))/0x8*(parseInt(_0x3c2076(0xd8))/0x9)+parseInt(_0x3c2076(0x105))/0xa*(-parseInt(_0x3c2076(0x104))/0xb);if(_0x39d00a===_0xb38fa0)break;else _0xe994a4['push'](_0xe994a4['shift']());}catch(_0x2ade3c){_0xe994a4['push'](_0xe994a4['shift']());}}}(a18_0x1249,0x77000));import{validateLimitOption}from'../utils/option-validation.js';import{HTTPClientError}from'../client/http-client.js';import{SDKError,ErrorCategory}from'../sdk/errors.js';function a18_0x1337(_0x2cec84,_0x37ff9f){const _0x1249b4=a18_0x1249();return a18_0x1337=function(_0x133765,_0x2bff69){_0x133765=_0x133765-0xd3;let _0x35fc5f=_0x1249b4[_0x133765];return _0x35fc5f;},a18_0x1337(_0x2cec84,_0x37ff9f);}import a18_0x1cf394 from'chalk';export function printAuthError(_0x43be0c,_0x36f59c=![],_0x665d1a){const _0x46feec=a18_0x1337,_0x129825=_0x43be0c[_0x46feec(0xe1)]?.[_0x46feec(0xf3)]||_0x43be0c['message'];console[_0x46feec(0xf1)](a18_0x1cf394[_0x46feec(0x101)](_0x46feec(0xf6))),console[_0x46feec(0xf1)](a18_0x1cf394[_0x46feec(0x101)](_0x46feec(0xfd)+_0x129825));if(_0x36f59c){const _0x4d7f7a=_0x665d1a?_0x46feec(0xe4)+_0x665d1a:'';console[_0x46feec(0xf1)](_0x46feec(0xea)),console[_0x46feec(0xf1)](_0x46feec(0xd5)+_0x4d7f7a+'\x0a'),console['error'](_0x46feec(0xe8)),console[_0x46feec(0xf1)](_0x46feec(0xe0)+_0x4d7f7a);}}export class BaseCommand{[a18_0x1038a8(0x100)](_0xf02538){const _0xbb430e=a18_0x1038a8,{options:_0x1cf966}=_0xf02538,_0xedfd2b=_0x1cf966[_0xbb430e(0xfe)];if(_0xedfd2b!==undefined){const _0x234465=typeof _0xedfd2b===_0xbb430e(0xee)?_0xedfd2b:parseInt(_0xedfd2b,0xa);if(isNaN(_0x234465))return _0xbb430e(0x102)+_0xedfd2b+_0xbb430e(0xd4);const _0x368037=validateLimitOption(_0x234465);if(!_0x368037[_0xbb430e(0xdf)])return _0x368037[_0xbb430e(0xf1)];_0xf02538[_0xbb430e(0xfa)][_0xbb430e(0xfe)]=_0x368037['value'];}return undefined;}['validate'](_0x25b76a){return undefined;}async[a18_0x1038a8(0xf5)](_0x1ec483){const _0x4f3f58=a18_0x1038a8;try{const _0x41df69=this[_0x4f3f58(0x100)](_0x1ec483);if(_0x41df69)return console[_0x4f3f58(0xf1)](_0x4f3f58(0xec)+_0x41df69),0x1;const _0x3ffb2e=this[_0x4f3f58(0xf8)](_0x1ec483);if(_0x3ffb2e){const _0x3008ab=/^\s*(Usage|Note|Warning|Error):/i[_0x4f3f58(0xdb)](_0x3ffb2e);return _0x3008ab?console[_0x4f3f58(0xf1)](_0x3ffb2e):console['error'](_0x4f3f58(0xec)+_0x3ffb2e),0x1;}const _0x7adccd=await this['execute'](_0x1ec483);return _0x7adccd??0x0;}catch(_0x4bb632){if(_0x4bb632 instanceof Error){if(_0x4bb632 instanceof HTTPClientError&&_0x4bb632[_0x4f3f58(0x107)]===0x191){const _0x3342b8=_0x1ec483['options'][_0x4f3f58(0xd9)];return printAuthError(_0x4bb632,!![],_0x3342b8),_0x4bb632[_0x4f3f58(0xe2)]&&_0x1ec483[_0x4f3f58(0xe9)]&&(_0x1ec483[_0x4f3f58(0xe9)][_0x4f3f58(0xf4)]['debug'](_0x4f3f58(0x108)),_0x1ec483[_0x4f3f58(0xe9)][_0x4f3f58(0xf4)]['debug'](_0x4bb632[_0x4f3f58(0xe2)])),0x1;}console[_0x4f3f58(0xf1)](a18_0x1cf394['red'](_0x4f3f58(0xec)+_0x4bb632[_0x4f3f58(0xff)]));_0x4bb632 instanceof SDKError&&_0x4bb632[_0x4f3f58(0xf9)]&&console[_0x4f3f58(0xf1)](a18_0x1cf394[_0x4f3f58(0xdc)](_0x4bb632[_0x4f3f58(0xf9)]));const _0x478058=_0x4bb632 instanceof SDKError&&_0x4bb632[_0x4f3f58(0xda)]===ErrorCategory['USER_ERROR'];_0x4bb632['stack']&&!_0x478058&&console['error'](_0x4f3f58(0xed)+_0x4bb632[_0x4f3f58(0xe2)]);}else console[_0x4f3f58(0xf1)](_0x4f3f58(0xec)+String(_0x4bb632));return 0x1;}}}export class CommandRegistry{[a18_0x1038a8(0xd3)]=new Map();[a18_0x1038a8(0xe6)](_0x66e3bb){const _0x34a710=a18_0x1038a8;if(this[_0x34a710(0xd3)]['has'](_0x66e3bb[_0x34a710(0xf2)]))throw new Error(_0x34a710(0xe5)+_0x66e3bb['name']+_0x34a710(0xdd));this[_0x34a710(0xd3)][_0x34a710(0xe3)](_0x66e3bb[_0x34a710(0xf2)],_0x66e3bb);}[a18_0x1038a8(0xfb)](_0x4bfedf){const _0x38e9c9=a18_0x1038a8;return this[_0x38e9c9(0xd3)]['get'](_0x4bfedf);}['getAll'](){const _0x5d9f89=a18_0x1038a8;return Array[_0x5d9f89(0xf7)](this['commands'][_0x5d9f89(0xd6)]());}[a18_0x1038a8(0x106)](_0x5de96d){const _0x1c98d0=a18_0x1038a8;return this[_0x1c98d0(0xd3)][_0x1c98d0(0x106)](_0x5de96d);}}export const registry=new CommandRegistry();
@@ -1 +1 @@
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
+ const a19_0x3fee9c=a19_0xe8bc;(function(_0x543a14,_0x4898fc){const _0x3e7495=a19_0xe8bc,_0xa7270e=_0x543a14();while(!![]){try{const _0x45d489=-parseInt(_0x3e7495(0x1ab))/0x1*(parseInt(_0x3e7495(0x1a5))/0x2)+-parseInt(_0x3e7495(0x1ad))/0x3+parseInt(_0x3e7495(0x1a6))/0x4+parseInt(_0x3e7495(0x1a4))/0x5*(-parseInt(_0x3e7495(0x193))/0x6)+-parseInt(_0x3e7495(0x197))/0x7*(parseInt(_0x3e7495(0x19e))/0x8)+parseInt(_0x3e7495(0x1a7))/0x9*(-parseInt(_0x3e7495(0x198))/0xa)+-parseInt(_0x3e7495(0x1a9))/0xb*(-parseInt(_0x3e7495(0x1ac))/0xc);if(_0x45d489===_0x4898fc)break;else _0xa7270e['push'](_0xa7270e['shift']());}catch(_0x4e22dc){_0xa7270e['push'](_0xa7270e['shift']());}}}(a19_0x162d,0x3c010));import{BaseCommand}from'./command.js';import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';import a19_0x50dfd7 from'chalk';function a19_0xe8bc(_0x83f158,_0x3c2c3d){const _0x162dd8=a19_0x162d();return a19_0xe8bc=function(_0xe8bcda,_0x57250e){_0xe8bcda=_0xe8bcda-0x191;let _0x3edda6=_0x162dd8[_0xe8bcda];return _0x3edda6;},a19_0xe8bc(_0x83f158,_0x3c2c3d);}function a19_0x162d(){const _0x5911d4=['log','warn','8rkeLqu','error','Session\x20context\x20cleared\x20(session:\x20','name','Show\x20current\x20resolved\x20context','yellow','9815ubcEFM','2vTnZBj','681828kpgaYR','9XyCxBX','context','2244143YyLuXW','message','99931BtUjcu','96jaWZrf','1180266XybLmx','clear','toString','1386zwkJgn','execute','\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context','debug','1063090AZAXar','4581090vPZxEW','session','display','displayWithSources'];a19_0x162d=function(){return _0x5911d4;};return a19_0x162d();}export class ContextCommand extends BaseCommand{[a19_0x3fee9c(0x1a1)]=a19_0x3fee9c(0x1a8);['description']=a19_0x3fee9c(0x1a2);async[a19_0x3fee9c(0x194)](_0x4b8d8b){const _0x4bf547=a19_0x3fee9c,{options:_0xeded17}=_0x4b8d8b,_0x38f9f1=_0xeded17[_0x4bf547(0x196)],_0x30b33f=_0xeded17[_0x4bf547(0x191)];console[_0x4bf547(0x19d)](a19_0x50dfd7[_0x4bf547(0x1a3)]('Warning:\x20\x27tdx\x20context\x27\x20is\x20deprecated.\x20Use\x20\x27tdx\x20use\x27\x20instead.')),console[_0x4bf547(0x19d)](a19_0x50dfd7['yellow'](_0x4bf547(0x195))),console[_0x4bf547(0x19d)](a19_0x50dfd7[_0x4bf547(0x1a3)]('\x20\x20tdx\x20use\x20--clear\x20\x20\x20#\x20Clear\x20session\x20context\x0a')),cleanExpiredSessions();try{if(_0x30b33f){clearSessionContext(_0xeded17['session']);const _0x4013b6=_0xeded17[_0x4bf547(0x199)]||getCurrentSessionPID()[_0x4bf547(0x192)]();return console[_0x4bf547(0x19c)](_0x4bf547(0x1a0)+_0x4013b6+')'),0x0;}const _0x8a4138=new GlobalContext(_0xeded17);return _0x38f9f1?_0x8a4138[_0x4bf547(0x19b)]():_0x8a4138[_0x4bf547(0x19a)](),0x0;}catch(_0x3cbb12){return _0x3cbb12 instanceof Error&&console[_0x4bf547(0x19f)]('Error:\x20'+_0x3cbb12[_0x4bf547(0x1aa)]),0x1;}}}
@@ -1 +1 @@
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
+ const a20_0x341809=a20_0x3df5;(function(_0x3da77e,_0x192720){const _0x910f39=a20_0x3df5,_0x2988c4=_0x3da77e();while(!![]){try{const _0x45b150=-parseInt(_0x910f39(0x13e))/0x1+-parseInt(_0x910f39(0x130))/0x2+-parseInt(_0x910f39(0x13d))/0x3+parseInt(_0x910f39(0x12d))/0x4+parseInt(_0x910f39(0x131))/0x5*(parseInt(_0x910f39(0x140))/0x6)+-parseInt(_0x910f39(0x141))/0x7*(-parseInt(_0x910f39(0x12a))/0x8)+parseInt(_0x910f39(0x136))/0x9;if(_0x45b150===_0x192720)break;else _0x2988c4['push'](_0x2988c4['shift']());}catch(_0x37c5d0){_0x2988c4['push'](_0x2988c4['shift']());}}}(a20_0x5023,0x1f699));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a20_0x3df5(_0x13baf3,_0x42d280){const _0x502384=a20_0x5023();return a20_0x3df5=function(_0x3df59e,_0x2d7602){_0x3df59e=_0x3df59e-0x129;let _0x2cd356=_0x502384[_0x3df59e];return _0x2cd356;},a20_0x3df5(_0x13baf3,_0x42d280);}import{handleSDKOutput}from'../utils/command-output.js';function a20_0x5023(){const _0x1ae372=['217GSxuXA','execute','22064ebtCJK','site','listDatabases','177076uhfgLo','Pattern:\x20','cause','381050mxVCSC','601505rcIWrB','error','databases','length','verbose','1009485QGyufS','limit','Listing\x20databases...','query','data','\x20\x20Cause:\x20','Error:\x20','3486uAlbTt','162182ZqMcnm','✔\x20Found\x20','12pQUDsU'];a20_0x5023=function(){return _0x1ae372;};return a20_0x5023();}import{withSpinner}from'../utils/spinner.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';export class DatabasesCommand extends BaseCommand{['name']=a20_0x341809(0x133);['description']='List\x20all\x20databases';async[a20_0x341809(0x129)](_0x2a9398){const _0x569472=a20_0x341809,{options:_0x1ec08b,args:_0x177606,tdx:_0x232e95}=_0x2a9398,_0x7f4a40=_0x177606[0x0];try{_0x1ec08b[_0x569472(0x135)]&&(console['error']('Site:\x20'+_0x1ec08b[_0x569472(0x12b)]),_0x7f4a40&&console[_0x569472(0x132)](_0x569472(0x12e)+_0x7f4a40));const _0x2205fc=resolveLimit(_0x1ec08b[_0x569472(0x137)],DEFAULT_LISTING_LIMIT),_0x4ccba1=await withSpinner(_0x569472(0x138),()=>_0x232e95[_0x569472(0x139)][_0x569472(0x12c)](_0x7f4a40,_0x2205fc),{'verbose':_0x1ec08b[_0x569472(0x135)]}),_0x30289e=_0x4ccba1[_0x569472(0x13a)];return console[_0x569472(0x132)](_0x569472(0x13f)+_0x30289e[_0x569472(0x134)]+'\x20database'+(_0x30289e[_0x569472(0x134)]!==0x1?'s':'')),await handleSDKOutput(_0x30289e,{..._0x1ec08b,'limit':_0x2205fc}),0x0;}catch(_0x4f4a2e){if(_0x4f4a2e instanceof SDKError)return console[_0x569472(0x132)](_0x569472(0x13c)+_0x4f4a2e['message']),_0x4f4a2e[_0x569472(0x12f)]&&console[_0x569472(0x132)](_0x569472(0x13b)+_0x4f4a2e[_0x569472(0x12f)]),0x1;throw _0x4f4a2e;}}}
@@ -1 +1 @@
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;}}
1
+ const a21_0x2c1235=a21_0x5321;(function(_0x5abe08,_0x2b4cb2){const _0x519c97=a21_0x5321,_0x792d9d=_0x5abe08();while(!![]){try{const _0x1ad2f8=parseInt(_0x519c97(0x1d5))/0x1+parseInt(_0x519c97(0x1e3))/0x2*(-parseInt(_0x519c97(0x1d1))/0x3)+-parseInt(_0x519c97(0x1e6))/0x4+parseInt(_0x519c97(0x1d9))/0x5*(-parseInt(_0x519c97(0x1d3))/0x6)+-parseInt(_0x519c97(0x1de))/0x7*(-parseInt(_0x519c97(0x1c5))/0x8)+-parseInt(_0x519c97(0x1ea))/0x9*(-parseInt(_0x519c97(0x1e5))/0xa)+-parseInt(_0x519c97(0x1d6))/0xb*(-parseInt(_0x519c97(0x1e8))/0xc);if(_0x1ad2f8===_0x2b4cb2)break;else _0x792d9d['push'](_0x792d9d['shift']());}catch(_0xcaba03){_0x792d9d['push'](_0x792d9d['shift']());}}}(a21_0x4776,0xd2a1b));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_0x4776(){const _0x121d2d=['...','error','107178NuLTnj','query','6msWURW','Describing\x20table\x20','996961LDLVWm','704DCALsb','Table\x20\x27','table','6796645juirmG','Site:\x20','verbose','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','\x20column','7JPJiwd','Table:\x20','validate','args','site','18mgFOwf','Database:\x20','120UGySKz','3805764ybicAk','database','136020KasNjw','name','176067duZVGZ','description','Describe\x20table\x20schema','12303152pHtbTc','describe','length','Error:\x20','data','✖\x20Table\x20not\x20found','message','\x20\x20Cause:\x20','cause','describeTable'];a21_0x4776=function(){return _0x121d2d;};return a21_0x4776();}import{withSpinner}from'../utils/spinner.js';function a21_0x5321(_0x445b78,_0x3e97a7){const _0x477601=a21_0x4776();return a21_0x5321=function(_0x53215a,_0x1acc81){_0x53215a=_0x53215a-0x1c4;let _0x176fe4=_0x477601[_0x53215a];return _0x176fe4;},a21_0x5321(_0x445b78,_0x3e97a7);}export class DescribeCommand extends BaseCommand{[a21_0x2c1235(0x1e9)]=a21_0x2c1235(0x1c6);[a21_0x2c1235(0x1eb)]=a21_0x2c1235(0x1c4);async['execute'](_0x2036dc){return this['describeTable'](_0x2036dc);}async['describeTable'](_0x26697b){const _0x1752ec=a21_0x2c1235,{options:_0x273a2e,args:_0x25c83c,tdx:_0xa089be}=_0x26697b;let _0x4222fb;try{_0x4222fb=parseTableReference(_0x25c83c[0x0]);const _0x3199b4=_0x273a2e['database'];!_0x4222fb[_0x1752ec(0x1e7)]&&_0x3199b4&&(_0x4222fb[_0x1752ec(0x1e7)]=_0x3199b4);const _0x50d201=validateTableDescribeReference(_0x4222fb);if(_0x50d201)return console[_0x1752ec(0x1d0)](_0x1752ec(0x1c8)+_0x50d201),0x1;}catch(_0x317ffe){return console[_0x1752ec(0x1d0)](_0x1752ec(0x1c8)+_0x317ffe[_0x1752ec(0x1cb)]),0x1;}const _0x4ca606=_0x4222fb[_0x1752ec(0x1e7)],_0x38c9e2=_0x4222fb[_0x1752ec(0x1d8)];try{_0x273a2e[_0x1752ec(0x1db)]&&(console[_0x1752ec(0x1d0)](_0x1752ec(0x1da)+_0x273a2e[_0x1752ec(0x1e2)]),console[_0x1752ec(0x1d0)](_0x1752ec(0x1e4)+_0x4ca606),console[_0x1752ec(0x1d0)](_0x1752ec(0x1df)+_0x38c9e2));const _0x689f6c=await withSpinner(_0x1752ec(0x1d4)+_0x4ca606+'.'+_0x38c9e2+_0x1752ec(0x1cf),()=>_0xa089be[_0x1752ec(0x1d2)][_0x1752ec(0x1ce)](_0x4ca606,_0x38c9e2),{'verbose':_0x273a2e[_0x1752ec(0x1db)]}),_0x178e57=_0x689f6c[_0x1752ec(0x1c9)];if(_0x178e57[_0x1752ec(0x1c7)]===0x0)return console[_0x1752ec(0x1d0)](_0x1752ec(0x1ca)),console[_0x1752ec(0x1d0)](_0x1752ec(0x1d7)+_0x4ca606+'.'+_0x38c9e2+'\x27\x20does\x20not\x20exist'),0x1;return console[_0x1752ec(0x1d0)]('✔\x20Found\x20'+_0x178e57['length']+_0x1752ec(0x1dd)+(_0x178e57[_0x1752ec(0x1c7)]!==0x1?'s':'')+'\x20in\x20'+_0x4ca606+'.'+_0x38c9e2),await handleSDKOutput(_0x178e57,_0x273a2e),0x0;}catch(_0x257025){if(_0x257025 instanceof SDKError)return console[_0x1752ec(0x1d0)]('Error:\x20'+_0x257025[_0x1752ec(0x1cb)]),_0x257025[_0x1752ec(0x1cd)]&&console[_0x1752ec(0x1d0)](_0x1752ec(0x1cc)+_0x257025[_0x1752ec(0x1cd)]),0x1;throw _0x257025;}}[a21_0x2c1235(0x1e0)](_0x4494a8){const _0x4c7042=a21_0x2c1235;if(_0x4494a8[_0x4c7042(0x1e1)][_0x4c7042(0x1c7)]===0x0)return'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';if(_0x4494a8[_0x4c7042(0x1e1)][_0x4c7042(0x1c7)]>0x1)return _0x4c7042(0x1dc);return undefined;}}