@treasuredata/tdx 0.1.11 → 0.1.12

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 (68) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/client/cdp-client.js +1 -1
  3. package/dist/client/http-client.js +1 -1
  4. package/dist/client/llm-client.js +1 -1
  5. package/dist/client/rate-limiter.js +1 -1
  6. package/dist/client/td-client.js +1 -1
  7. package/dist/client/trino-client.js +1 -1
  8. package/dist/client/workflow-client.js +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/command.js +1 -1
  14. package/dist/commands/context-command.js +1 -1
  15. package/dist/commands/databases.js +1 -1
  16. package/dist/commands/describe.js +1 -1
  17. package/dist/commands/llm-command.js +1 -1
  18. package/dist/commands/llm-proxy.js +1 -1
  19. package/dist/commands/profiles-command.js +1 -1
  20. package/dist/commands/query-command.js +1 -1
  21. package/dist/commands/segment-command.js +1 -1
  22. package/dist/commands/segments.js +1 -1
  23. package/dist/commands/show.js +1 -1
  24. package/dist/commands/tables.js +1 -1
  25. package/dist/commands/use-command.js +1 -1
  26. package/dist/commands/workflow-command.js +1 -1
  27. package/dist/core/auth.d.ts +0 -6
  28. package/dist/core/auth.d.ts.map +1 -1
  29. package/dist/core/auth.js +1 -1
  30. package/dist/core/auth.js.map +1 -1
  31. package/dist/core/config.js +1 -1
  32. package/dist/core/global-context.js +1 -1
  33. package/dist/core/profile.js +1 -1
  34. package/dist/core/project-config.js +1 -1
  35. package/dist/core/session.js +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/proxy/anthropic-adapter.js +1 -1
  38. package/dist/proxy/server.js +1 -1
  39. package/dist/sdk/api.js +1 -1
  40. package/dist/sdk/database.js +1 -1
  41. package/dist/sdk/errors.js +1 -1
  42. package/dist/sdk/index.js +1 -1
  43. package/dist/sdk/llm.js +1 -1
  44. package/dist/sdk/query.js +1 -1
  45. package/dist/sdk/segment.js +1 -1
  46. package/dist/sdk/table.js +1 -1
  47. package/dist/sdk/workflow.js +1 -1
  48. package/dist/types/endpoints.js +1 -1
  49. package/dist/types/index.js +1 -1
  50. package/dist/utils/agent-ref-parser.js +1 -1
  51. package/dist/utils/chat-cache.js +1 -1
  52. package/dist/utils/colors.js +1 -1
  53. package/dist/utils/command-output.js +1 -1
  54. package/dist/utils/file-permissions.js +1 -1
  55. package/dist/utils/format-detector.js +1 -1
  56. package/dist/utils/formatters.js +1 -1
  57. package/dist/utils/model-aliases.js +1 -1
  58. package/dist/utils/option-validation.js +1 -1
  59. package/dist/utils/port.js +1 -1
  60. package/dist/utils/process.js +1 -1
  61. package/dist/utils/segment-ref-parser.js +1 -1
  62. package/dist/utils/spinner.js +1 -1
  63. package/dist/utils/sql-parser.js +1 -1
  64. package/dist/utils/sse-parser.js +1 -1
  65. package/dist/utils/string-utils.js +1 -1
  66. package/dist/utils/table-ref-parser.js +1 -1
  67. package/dist/utils/workflow-utils.js +1 -1
  68. package/package.json +1 -1
@@ -1 +1 @@
1
- const a7_0x399966=a7_0x38ef;(function(_0x173659,_0x1cabb2){const _0x4c1411=a7_0x38ef,_0x402f1a=_0x173659();while(!![]){try{const _0x4d9b06=-parseInt(_0x4c1411(0x20b))/0x1+parseInt(_0x4c1411(0x21d))/0x2*(-parseInt(_0x4c1411(0x203))/0x3)+-parseInt(_0x4c1411(0x211))/0x4+parseInt(_0x4c1411(0x212))/0x5+parseInt(_0x4c1411(0x222))/0x6+parseInt(_0x4c1411(0x1f6))/0x7+parseInt(_0x4c1411(0x221))/0x8*(parseInt(_0x4c1411(0x231))/0x9);if(_0x4d9b06===_0x1cabb2)break;else _0x402f1a['push'](_0x402f1a['shift']());}catch(_0x22d2f0){_0x402f1a['push'](_0x402f1a['shift']());}}}(a7_0x4169,0x7eae7));function a7_0x38ef(_0x4b5224,_0x3139bf){const _0x416972=a7_0x4169();return a7_0x38ef=function(_0x38ef28,_0x3b69e8){_0x38ef28=_0x38ef28-0x1f1;let _0x32c845=_0x416972[_0x38ef28];return _0x32c845;},a7_0x38ef(_0x4b5224,_0x3139bf);}import{HTTPClient}from'./http-client.js';function a7_0x4169(){const _0x5e624c=['project_id','name_pattern','true','request','logs','/logs','157668EWOjNx','listWorkflows','deleteProject','projects','workflow','project_name','2039396ibJbJO','920730fkwhPt','/api/sessions','force','from_time','tasks','resume_from','retrySession','workflows','sessions','retry_params','last_id','2hpTeOK','writeFile','limit','uploadProjectArchive','8232Mkbnzp','765918VqkIsB','project','forEach','getTaskLogs','POST','/api/projects?','clear_schedule','readFile','include_retried','clear_schedule_all','scheduleFrom','listProjects','PUT','/api/workflows?','/api/attempts/','5967XeEjyA','revision','replace','from_task','/archive?','search_project_name','include_subtasks','apiKey','listSessions','clearSchedule','authHeaders','filter','lastId','offset','site','GET','downloadProjectArchive','/retry','to_time','/api/attempts','append','name','6771625vBlSKo','/tasks','toString','workflow_name','/sessions','attempts','/api/attempts?','status','/tasks/','/archive','getAttemptTasks','/api/projects/','application/gzip','2324991EAduJO','httpClient'];a7_0x4169=function(){return _0x5e624c;};return a7_0x4169();}import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{matchGlobPattern}from'../utils/string-utils.js';export class WorkflowClient{[a7_0x399966(0x204)];[a7_0x399966(0x23b)];constructor(_0x55bea3){const _0x4b31ee=a7_0x399966,_0x28deca=getEndpoint(_0x55bea3[_0x4b31ee(0x23f)],_0x4b31ee(0x20f));this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x55bea3['site'],_0x55bea3[_0x4b31ee(0x238)])),this[_0x4b31ee(0x204)]=new HTTPClient(_0x28deca,this[_0x4b31ee(0x23b)]);}async[a7_0x399966(0x22d)](_0x3699a9){const _0x275573=a7_0x399966,_0x284922=new URLSearchParams();if(_0x3699a9?.[_0x275573(0x21f)])_0x284922[_0x275573(0x1f4)](_0x275573(0x21f),String(_0x3699a9[_0x275573(0x21f)]));if(_0x3699a9?.[_0x275573(0x21c)])_0x284922['append'](_0x275573(0x21c),_0x3699a9[_0x275573(0x21c)]);if(_0x3699a9?.[_0x275573(0x206)]){const _0xdb812b=_0x3699a9[_0x275573(0x206)][_0x275573(0x233)](/[*?]/g,'');_0xdb812b&&_0x284922[_0x275573(0x1f4)]('name_pattern',_0xdb812b);}const _0x40d4cb=_0x284922[_0x275573(0x1f8)](),_0x5d2bbb=_0x40d4cb?_0x275573(0x227)+_0x40d4cb:'/api/projects',_0xec7ac6=await this[_0x275573(0x204)][_0x275573(0x208)](_0x275573(0x240),_0x5d2bbb);let _0x4cf57e=_0xec7ac6[_0x275573(0x20e)]||[];return _0x3699a9?.[_0x275573(0x206)]&&(_0x4cf57e=_0x4cf57e[_0x275573(0x23c)](_0x134726=>{const _0x377de2=_0x275573;return matchGlobPattern(_0x134726['name'],_0x3699a9[_0x377de2(0x206)]);})),{'data':_0x4cf57e,'lastId':_0xec7ac6['lastId']};}async[a7_0x399966(0x20c)](_0x1c8284){const _0x4de073=a7_0x399966,_0x25d429=new URLSearchParams();if(_0x1c8284?.[_0x4de073(0x21f)])_0x25d429['append'](_0x4de073(0x21f),String(_0x1c8284[_0x4de073(0x21f)]));if(_0x1c8284?.[_0x4de073(0x21c)])_0x25d429['append'](_0x4de073(0x21c),_0x1c8284[_0x4de073(0x21c)]);if(_0x1c8284?.[_0x4de073(0x210)]){const _0x536a1d=_0x1c8284['project_name']['replace'](/[*?]/g,'');_0x536a1d&&(_0x25d429[_0x4de073(0x1f4)]('name_pattern',_0x536a1d),_0x25d429[_0x4de073(0x1f4)](_0x4de073(0x236),_0x4de073(0x207)));}const _0x679bbd=_0x25d429[_0x4de073(0x1f8)](),_0x2163ac=_0x679bbd?_0x4de073(0x22f)+_0x679bbd:'/api/workflows',_0x1240dd=await this['httpClient'][_0x4de073(0x208)](_0x4de073(0x240),_0x2163ac);let _0x48e1b7=_0x1240dd[_0x4de073(0x219)]||[];return _0x1c8284?.['project_name']&&(_0x48e1b7=_0x48e1b7[_0x4de073(0x23c)](_0x5cb65a=>{const _0x4d5996=_0x4de073,_0x20f22f=_0x5cb65a[_0x4d5996(0x223)]?.[_0x4d5996(0x1f5)];if(!_0x20f22f)return![];return matchGlobPattern(_0x20f22f,_0x1c8284['project_name']);})),{'data':_0x48e1b7,'lastId':_0x1240dd['lastId']};}async[a7_0x399966(0x239)](_0x561201){const _0x48ca2b=a7_0x399966;let _0x31b6c5=_0x48ca2b(0x213);_0x561201?.[_0x48ca2b(0x205)]&&(_0x31b6c5=_0x48ca2b(0x201)+encodeURIComponent(_0x561201[_0x48ca2b(0x205)])+_0x48ca2b(0x1fa));const _0x736710=new URLSearchParams();if(_0x561201?.[_0x48ca2b(0x1f9)])_0x736710['append'](_0x48ca2b(0x20f),_0x561201['workflow_name']);if(_0x561201?.['status'])_0x736710['append'](_0x48ca2b(0x1fd),_0x561201['status']);if(_0x561201?.['from_time'])_0x736710['append'](_0x48ca2b(0x215),_0x561201[_0x48ca2b(0x215)]);if(_0x561201?.[_0x48ca2b(0x1f2)])_0x736710[_0x48ca2b(0x1f4)](_0x48ca2b(0x1f2),_0x561201[_0x48ca2b(0x1f2)]);if(_0x561201?.[_0x48ca2b(0x21f)])_0x736710[_0x48ca2b(0x1f4)]('limit',String(_0x561201[_0x48ca2b(0x21f)]));if(_0x561201?.['last_id'])_0x736710[_0x48ca2b(0x1f4)](_0x48ca2b(0x21c),_0x561201[_0x48ca2b(0x21c)]);const _0x1d5884=_0x736710[_0x48ca2b(0x1f8)]();_0x1d5884&&(_0x31b6c5=_0x31b6c5+'?'+_0x1d5884);const _0x14f68b=await this['httpClient'][_0x48ca2b(0x208)](_0x48ca2b(0x240),_0x31b6c5);return{'data':_0x14f68b[_0x48ca2b(0x21a)]||[],'lastId':_0x14f68b[_0x48ca2b(0x23d)]};}async['listAttempts'](_0x5ba542){const _0x14c2f8=a7_0x399966,_0x52e945=new URLSearchParams();if(_0x5ba542?.[_0x14c2f8(0x210)])_0x52e945['append'](_0x14c2f8(0x223),_0x5ba542[_0x14c2f8(0x210)]);if(_0x5ba542?.[_0x14c2f8(0x1f9)])_0x52e945[_0x14c2f8(0x1f4)]('workflow',_0x5ba542['workflow_name']);if(_0x5ba542?.[_0x14c2f8(0x22a)])_0x52e945['append'](_0x14c2f8(0x22a),'1');if(_0x5ba542?.[_0x14c2f8(0x21f)])_0x52e945[_0x14c2f8(0x1f4)](_0x14c2f8(0x21f),String(_0x5ba542[_0x14c2f8(0x21f)]));if(_0x5ba542?.['last_id'])_0x52e945[_0x14c2f8(0x1f4)](_0x14c2f8(0x21c),_0x5ba542[_0x14c2f8(0x21c)]);const _0x3bb81b=_0x52e945[_0x14c2f8(0x1f8)](),_0x26445c=_0x3bb81b?_0x14c2f8(0x1fc)+_0x3bb81b:_0x14c2f8(0x1f3),_0x1d1431=await this[_0x14c2f8(0x204)][_0x14c2f8(0x208)]('GET',_0x26445c);return{'data':_0x1d1431[_0x14c2f8(0x1fb)]||[],'lastId':_0x1d1431['lastId']};}async['getAttempt'](_0x58b7fe){const _0x3183dc=a7_0x399966;return await this['httpClient'][_0x3183dc(0x208)]('GET',_0x3183dc(0x230)+encodeURIComponent(_0x58b7fe));}async[a7_0x399966(0x200)](_0x4a8c2b,_0x4c54d9=![]){const _0x39dd11=a7_0x399966,_0x3a8506=new URLSearchParams();_0x4c54d9&&_0x3a8506['append'](_0x39dd11(0x237),_0x39dd11(0x207));const _0x2a4ec7=_0x3a8506[_0x39dd11(0x1f8)](),_0x5bbb81=_0x2a4ec7?'/api/attempts/'+encodeURIComponent(_0x4a8c2b)+'/tasks?'+_0x2a4ec7:'/api/attempts/'+encodeURIComponent(_0x4a8c2b)+_0x39dd11(0x1f7),_0x31e959=await this[_0x39dd11(0x204)]['request'](_0x39dd11(0x240),_0x5bbb81);return _0x31e959[_0x39dd11(0x216)]||[];}async[a7_0x399966(0x225)](_0x2906,_0x2ba5db,_0x216fea){const _0x10c49f=a7_0x399966,_0x3e39ec=new URLSearchParams();_0x216fea?.['offset']!==undefined&&_0x3e39ec[_0x10c49f(0x1f4)]('offset',String(_0x216fea[_0x10c49f(0x23e)]));_0x216fea?.[_0x10c49f(0x21f)]!==undefined&&_0x3e39ec[_0x10c49f(0x1f4)]('limit',String(_0x216fea[_0x10c49f(0x21f)]));const _0x2050bf=_0x3e39ec[_0x10c49f(0x1f8)](),_0x3d4f5d=_0x2050bf?_0x10c49f(0x230)+encodeURIComponent(_0x2906)+_0x10c49f(0x1fe)+encodeURIComponent(_0x2ba5db)+'/logs?'+_0x2050bf:_0x10c49f(0x230)+encodeURIComponent(_0x2906)+'/tasks/'+encodeURIComponent(_0x2ba5db)+_0x10c49f(0x20a),_0x5eae2b=await this[_0x10c49f(0x204)][_0x10c49f(0x208)](_0x10c49f(0x240),_0x3d4f5d);return _0x5eae2b[_0x10c49f(0x209)]||[];}async['killAttempt'](_0x12c75e,_0x45a40b){const _0x1a17a3=a7_0x399966,_0x2219a0={};return _0x45a40b&&(_0x2219a0['reason']=_0x45a40b),await this['httpClient'][_0x1a17a3(0x208)]('POST',_0x1a17a3(0x230)+encodeURIComponent(_0x12c75e)+'/kill',{'body':_0x2219a0});}async[a7_0x399966(0x218)](_0x713431,_0x307895){const _0x14eec0=a7_0x399966,_0x1a835a={};return _0x307895?.[_0x14eec0(0x234)]&&(_0x1a835a[_0x14eec0(0x234)]=_0x307895[_0x14eec0(0x234)]),_0x307895?.[_0x14eec0(0x21b)]&&(_0x1a835a[_0x14eec0(0x21b)]=_0x307895['retry_params']),await this['httpClient'][_0x14eec0(0x208)](_0x14eec0(0x226),'/api/sessions/'+encodeURIComponent(_0x713431)+_0x14eec0(0x1f1),{'body':_0x1a835a});}async['retryAttempt'](_0x1194eb,_0x2f48be){const _0x19efa5=a7_0x399966,_0x2cc5ff={};return _0x2f48be?.[_0x19efa5(0x217)]&&(_0x2cc5ff[_0x19efa5(0x217)]=_0x2f48be[_0x19efa5(0x217)]),_0x2f48be?.[_0x19efa5(0x21b)]&&(_0x2cc5ff['retry_params']=_0x2f48be[_0x19efa5(0x21b)]),_0x2f48be?.[_0x19efa5(0x214)]&&(_0x2cc5ff[_0x19efa5(0x214)]=_0x2f48be[_0x19efa5(0x214)]),await this[_0x19efa5(0x204)][_0x19efa5(0x208)]('POST',_0x19efa5(0x230)+encodeURIComponent(_0x1194eb)+'/retry',{'body':_0x2cc5ff});}async[a7_0x399966(0x241)](_0x246d9f,_0x18db39,_0x4b29ed){const _0x2782fc=a7_0x399966,{promises:_0x46f8fd}=await import('fs'),_0x4dbb97=new URLSearchParams();_0x4b29ed&&_0x4dbb97[_0x2782fc(0x1f4)]('revision',_0x4b29ed);const _0xe368fd=_0x4dbb97[_0x2782fc(0x1f8)](),_0x293e59=_0xe368fd?'/api/projects/'+encodeURIComponent(_0x246d9f)+_0x2782fc(0x235)+_0xe368fd:_0x2782fc(0x201)+encodeURIComponent(_0x246d9f)+_0x2782fc(0x1ff),_0x9a3e5a=await this[_0x2782fc(0x204)]['request'](_0x2782fc(0x240),_0x293e59,{'headers':{'Accept':_0x2782fc(0x202)},'responseType':'arraybuffer'});return await _0x46f8fd[_0x2782fc(0x21e)](_0x18db39,_0x9a3e5a),_0x18db39;}async[a7_0x399966(0x220)](_0x534d86,_0x33310d,_0x21e011,_0x22d81c){const _0x19e163=a7_0x399966,{promises:_0x5b02e0}=await import('fs'),_0x227cb5=new URLSearchParams();_0x227cb5[_0x19e163(0x1f4)]('project',_0x534d86),_0x227cb5[_0x19e163(0x1f4)](_0x19e163(0x232),_0x33310d);_0x22d81c?.[_0x19e163(0x22c)]&&_0x227cb5['append']('schedule_from',_0x22d81c['scheduleFrom']);_0x22d81c?.[_0x19e163(0x23a)]&&_0x22d81c[_0x19e163(0x23a)][_0x19e163(0x224)](_0x1d7ccb=>{const _0x3c9dcc=_0x19e163;_0x227cb5[_0x3c9dcc(0x1f4)](_0x3c9dcc(0x228),_0x1d7ccb);});_0x22d81c?.['clearScheduleAll']&&_0x227cb5[_0x19e163(0x1f4)](_0x19e163(0x22b),_0x19e163(0x207));const _0x3776d1=_0x227cb5[_0x19e163(0x1f8)](),_0x4bf97b=_0x19e163(0x227)+_0x3776d1,_0x3ddbd8=await _0x5b02e0[_0x19e163(0x229)](_0x21e011);return await this[_0x19e163(0x204)]['request'](_0x19e163(0x22e),_0x4bf97b,{'body':_0x3ddbd8,'headers':{'Content-Type':'application/gzip'}});}async[a7_0x399966(0x20d)](_0xf8f6e){const _0x167ed4=a7_0x399966;return await this[_0x167ed4(0x204)]['request']('DELETE','/api/projects/'+encodeURIComponent(_0xf8f6e));}}
1
+ function a7_0x5940(_0x3ff032,_0x5ea590){const _0x56268e=a7_0x5626();return a7_0x5940=function(_0x594067,_0x16df7b){_0x594067=_0x594067-0x1b2;let _0x4ff4df=_0x56268e[_0x594067];return _0x4ff4df;},a7_0x5940(_0x3ff032,_0x5ea590);}const a7_0x2d0000=a7_0x5940;(function(_0x4fa365,_0x167fa5){const _0x31c7bc=a7_0x5940,_0xcf943c=_0x4fa365();while(!![]){try{const _0x22cde7=-parseInt(_0x31c7bc(0x1ec))/0x1*(-parseInt(_0x31c7bc(0x1de))/0x2)+parseInt(_0x31c7bc(0x202))/0x3*(parseInt(_0x31c7bc(0x1f6))/0x4)+-parseInt(_0x31c7bc(0x1bc))/0x5*(-parseInt(_0x31c7bc(0x1e3))/0x6)+-parseInt(_0x31c7bc(0x1c0))/0x7*(parseInt(_0x31c7bc(0x1d1))/0x8)+-parseInt(_0x31c7bc(0x1cc))/0x9*(parseInt(_0x31c7bc(0x1ce))/0xa)+parseInt(_0x31c7bc(0x1fe))/0xb+-parseInt(_0x31c7bc(0x1e9))/0xc;if(_0x22cde7===_0x167fa5)break;else _0xcf943c['push'](_0xcf943c['shift']());}catch(_0x3e2331){_0xcf943c['push'](_0xcf943c['shift']());}}}(a7_0x5626,0x2c341));import{HTTPClient}from'./http-client.js';import{getEndpoint}from'../types/index.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';import{matchGlobPattern}from'../utils/string-utils.js';export class WorkflowClient{[a7_0x2d0000(0x1ff)];[a7_0x2d0000(0x1da)];constructor(_0x237bfe){const _0x3bbf0c=a7_0x2d0000,_0x163123=getEndpoint(_0x237bfe['site'],_0x3bbf0c(0x1ba));this['authHeaders']=toHeaderRecord(getAuthHeaders(_0x237bfe[_0x3bbf0c(0x205)],_0x237bfe['apiKey'])),this[_0x3bbf0c(0x1ff)]=new HTTPClient(_0x163123,this[_0x3bbf0c(0x1da)]);}async['listProjects'](_0x3e623f){const _0x44a1f8=a7_0x2d0000,_0x271cf2=new URLSearchParams();if(_0x3e623f?.[_0x44a1f8(0x1c7)])_0x271cf2[_0x44a1f8(0x1ef)](_0x44a1f8(0x1c7),String(_0x3e623f[_0x44a1f8(0x1c7)]));if(_0x3e623f?.[_0x44a1f8(0x1fc)])_0x271cf2[_0x44a1f8(0x1ef)]('last_id',_0x3e623f['last_id']);if(_0x3e623f?.[_0x44a1f8(0x1f9)]){const _0x47d58d=_0x3e623f[_0x44a1f8(0x1f9)][_0x44a1f8(0x1e7)](/[*?]/g,'');_0x47d58d&&_0x271cf2[_0x44a1f8(0x1ef)](_0x44a1f8(0x1f9),_0x47d58d);}const _0x3475d8=_0x271cf2[_0x44a1f8(0x1ee)](),_0x273eb7=_0x3475d8?_0x44a1f8(0x1f4)+_0x3475d8:'/api/projects',_0xd9fff9=await this[_0x44a1f8(0x1ff)][_0x44a1f8(0x1ed)](_0x44a1f8(0x1d5),_0x273eb7);let _0x5d7d70=_0xd9fff9[_0x44a1f8(0x1d6)]||[];return _0x3e623f?.[_0x44a1f8(0x1f9)]&&(_0x5d7d70=_0x5d7d70[_0x44a1f8(0x1f5)](_0x2ec9cf=>{const _0x3253a1=_0x44a1f8;return matchGlobPattern(_0x2ec9cf[_0x3253a1(0x1bd)],_0x3e623f[_0x3253a1(0x1f9)]);})),{'data':_0x5d7d70,'lastId':_0xd9fff9[_0x44a1f8(0x1b9)]};}async[a7_0x2d0000(0x1f2)](_0x398723){const _0x9e391b=a7_0x2d0000,_0x569fb1=new URLSearchParams();if(_0x398723?.[_0x9e391b(0x1c7)])_0x569fb1['append'](_0x9e391b(0x1c7),String(_0x398723[_0x9e391b(0x1c7)]));if(_0x398723?.[_0x9e391b(0x1fc)])_0x569fb1['append']('last_id',_0x398723[_0x9e391b(0x1fc)]);if(_0x398723?.[_0x9e391b(0x1c6)]){const _0x5b7976=_0x398723['project_name'][_0x9e391b(0x1e7)](/[*?]/g,'');_0x5b7976&&(_0x569fb1[_0x9e391b(0x1ef)](_0x9e391b(0x1f9),_0x5b7976),_0x569fb1[_0x9e391b(0x1ef)](_0x9e391b(0x1b6),_0x9e391b(0x1c9)));}const _0x42c9e0=_0x569fb1[_0x9e391b(0x1ee)](),_0x26df39=_0x42c9e0?_0x9e391b(0x1c5)+_0x42c9e0:_0x9e391b(0x1d0),_0x38509a=await this[_0x9e391b(0x1ff)]['request'](_0x9e391b(0x1d5),_0x26df39);let _0xc2e29e=_0x38509a[_0x9e391b(0x1f3)]||[];return _0x398723?.[_0x9e391b(0x1c6)]&&(_0xc2e29e=_0xc2e29e[_0x9e391b(0x1f5)](_0x1a5ba1=>{const _0x5cb4f7=_0x9e391b,_0x549e0e=_0x1a5ba1['project']?.[_0x5cb4f7(0x1bd)];if(!_0x549e0e)return![];return matchGlobPattern(_0x549e0e,_0x398723['project_name']);})),{'data':_0xc2e29e,'lastId':_0x38509a[_0x9e391b(0x1b9)]};}async[a7_0x2d0000(0x1f0)](_0xc7827f){const _0xcba62f=a7_0x2d0000;let _0x4023b3='/api/sessions';_0xc7827f?.[_0xcba62f(0x1c2)]&&(_0x4023b3='/api/projects/'+encodeURIComponent(_0xc7827f[_0xcba62f(0x1c2)])+_0xcba62f(0x1b5));const _0x37731d=new URLSearchParams();if(_0xc7827f?.['workflow_name'])_0x37731d[_0xcba62f(0x1ef)](_0xcba62f(0x1ba),_0xc7827f[_0xcba62f(0x1e8)]);if(_0xc7827f?.[_0xcba62f(0x1fd)])_0x37731d[_0xcba62f(0x1ef)](_0xcba62f(0x1fd),_0xc7827f[_0xcba62f(0x1fd)]);if(_0xc7827f?.[_0xcba62f(0x1c8)])_0x37731d[_0xcba62f(0x1ef)]('from_time',_0xc7827f[_0xcba62f(0x1c8)]);if(_0xc7827f?.[_0xcba62f(0x1c3)])_0x37731d['append']('to_time',_0xc7827f[_0xcba62f(0x1c3)]);if(_0xc7827f?.['limit'])_0x37731d['append'](_0xcba62f(0x1c7),String(_0xc7827f[_0xcba62f(0x1c7)]));if(_0xc7827f?.['last_id'])_0x37731d[_0xcba62f(0x1ef)](_0xcba62f(0x1fc),_0xc7827f['last_id']);const _0x1ecf49=_0x37731d[_0xcba62f(0x1ee)]();_0x1ecf49&&(_0x4023b3=_0x4023b3+'?'+_0x1ecf49);const _0x559826=await this['httpClient'][_0xcba62f(0x1ed)]('GET',_0x4023b3);return{'data':_0x559826['sessions']||[],'lastId':_0x559826[_0xcba62f(0x1b9)]};}async[a7_0x2d0000(0x1f7)](_0x404648){const _0x434daa=a7_0x2d0000,_0x151c0e=new URLSearchParams();if(_0x404648?.['project_name'])_0x151c0e[_0x434daa(0x1ef)](_0x434daa(0x1f1),_0x404648[_0x434daa(0x1c6)]);if(_0x404648?.['workflow_name'])_0x151c0e[_0x434daa(0x1ef)]('workflow',_0x404648[_0x434daa(0x1e8)]);if(_0x404648?.['include_retried'])_0x151c0e[_0x434daa(0x1ef)](_0x434daa(0x1c1),'1');if(_0x404648?.['limit'])_0x151c0e[_0x434daa(0x1ef)](_0x434daa(0x1c7),String(_0x404648[_0x434daa(0x1c7)]));if(_0x404648?.[_0x434daa(0x1fc)])_0x151c0e[_0x434daa(0x1ef)](_0x434daa(0x1fc),_0x404648['last_id']);const _0x5df755=_0x151c0e[_0x434daa(0x1ee)](),_0x9cf7b7=_0x5df755?_0x434daa(0x1cd)+_0x5df755:_0x434daa(0x1eb),_0x1ad681=await this[_0x434daa(0x1ff)]['request']('GET',_0x9cf7b7);return{'data':_0x1ad681[_0x434daa(0x1f8)]||[],'lastId':_0x1ad681['lastId']};}async['getAttempt'](_0x40a958){const _0x235263=a7_0x2d0000;return await this[_0x235263(0x1ff)][_0x235263(0x1ed)](_0x235263(0x1d5),'/api/attempts/'+encodeURIComponent(_0x40a958));}async['getAttemptTasks'](_0x4b8921,_0x5a0833=![]){const _0x268b91=a7_0x2d0000,_0x2b4a0d=new URLSearchParams();_0x5a0833&&_0x2b4a0d[_0x268b91(0x1ef)](_0x268b91(0x1d7),_0x268b91(0x1c9));const _0x53aa4a=_0x2b4a0d[_0x268b91(0x1ee)](),_0xb35b0f=_0x53aa4a?_0x268b91(0x1fa)+encodeURIComponent(_0x4b8921)+_0x268b91(0x1dd)+_0x53aa4a:_0x268b91(0x1fa)+encodeURIComponent(_0x4b8921)+_0x268b91(0x1c4),_0x593f6c=await this[_0x268b91(0x1ff)][_0x268b91(0x1ed)]('GET',_0xb35b0f);return _0x593f6c[_0x268b91(0x1e4)]||[];}async[a7_0x2d0000(0x1b3)](_0x54965e,_0x2c3817,_0x1fb8ba){const _0x4a193b=a7_0x2d0000,_0x1afb54=new URLSearchParams();_0x1fb8ba?.[_0x4a193b(0x1e2)]!==undefined&&_0x1afb54[_0x4a193b(0x1ef)](_0x4a193b(0x1e2),String(_0x1fb8ba[_0x4a193b(0x1e2)]));_0x1fb8ba?.[_0x4a193b(0x1c7)]!==undefined&&_0x1afb54[_0x4a193b(0x1ef)](_0x4a193b(0x1c7),String(_0x1fb8ba['limit']));const _0x37bb4e=_0x1afb54[_0x4a193b(0x1ee)](),_0x296f0e=_0x37bb4e?'/api/attempts/'+encodeURIComponent(_0x54965e)+_0x4a193b(0x1cf)+encodeURIComponent(_0x2c3817)+_0x4a193b(0x200)+_0x37bb4e:_0x4a193b(0x1fa)+encodeURIComponent(_0x54965e)+'/tasks/'+encodeURIComponent(_0x2c3817)+_0x4a193b(0x1cb),_0x4ac279=await this['httpClient'][_0x4a193b(0x1ed)]('GET',_0x296f0e);return _0x4ac279['logs']||[];}async[a7_0x2d0000(0x203)](_0x4f3bf0,_0x5ae86a){const _0x27d33e=a7_0x2d0000,_0x5743ba={};return _0x5ae86a&&(_0x5743ba[_0x27d33e(0x1bb)]=_0x5ae86a),await this[_0x27d33e(0x1ff)][_0x27d33e(0x1ed)]('POST',_0x27d33e(0x1fa)+encodeURIComponent(_0x4f3bf0)+'/kill',{'body':_0x5743ba});}async[a7_0x2d0000(0x201)](_0x112383,_0xf9df2b){const _0x31c061=a7_0x2d0000,_0x43d418={};return _0xf9df2b?.[_0x31c061(0x1d9)]&&(_0x43d418[_0x31c061(0x1d9)]=_0xf9df2b['from_task']),_0xf9df2b?.[_0x31c061(0x1bf)]&&(_0x43d418[_0x31c061(0x1bf)]=_0xf9df2b[_0x31c061(0x1bf)]),await this[_0x31c061(0x1ff)][_0x31c061(0x1ed)](_0x31c061(0x1b7),_0x31c061(0x1ca)+encodeURIComponent(_0x112383)+_0x31c061(0x1d8),{'body':_0x43d418});}async['retryAttempt'](_0x228878,_0x470d78){const _0x46fadc=a7_0x2d0000,_0x1be03b={};return _0x470d78?.['resume_from']&&(_0x1be03b[_0x46fadc(0x1d3)]=_0x470d78[_0x46fadc(0x1d3)]),_0x470d78?.[_0x46fadc(0x1bf)]&&(_0x1be03b[_0x46fadc(0x1bf)]=_0x470d78[_0x46fadc(0x1bf)]),_0x470d78?.[_0x46fadc(0x1d4)]&&(_0x1be03b['force']=_0x470d78[_0x46fadc(0x1d4)]),await this[_0x46fadc(0x1ff)][_0x46fadc(0x1ed)](_0x46fadc(0x1b7),'/api/attempts/'+encodeURIComponent(_0x228878)+'/retry',{'body':_0x1be03b});}async[a7_0x2d0000(0x1b2)](_0x883007,_0x70e148,_0x393a22){const _0x56a3a4=a7_0x2d0000,{promises:_0x4dc013}=await import('fs'),_0x10e237=new URLSearchParams();_0x393a22&&_0x10e237[_0x56a3a4(0x1ef)](_0x56a3a4(0x1df),_0x393a22);const _0x18e441=_0x10e237[_0x56a3a4(0x1ee)](),_0x317408=_0x18e441?'/api/projects/'+encodeURIComponent(_0x883007)+'/archive?'+_0x18e441:_0x56a3a4(0x1be)+encodeURIComponent(_0x883007)+_0x56a3a4(0x1e6),_0xc4a059=await this[_0x56a3a4(0x1ff)]['request'](_0x56a3a4(0x1d5),_0x317408,{'headers':{'Accept':_0x56a3a4(0x1fb)},'responseType':'arraybuffer'});return await _0x4dc013[_0x56a3a4(0x1d2)](_0x70e148,_0xc4a059),_0x70e148;}async[a7_0x2d0000(0x1e1)](_0x2e0a61,_0x39043a,_0xad8cc6,_0x17a4eb){const _0x993cfb=a7_0x2d0000,{promises:_0x519a70}=await import('fs'),_0x2d3e1c=new URLSearchParams();_0x2d3e1c[_0x993cfb(0x1ef)](_0x993cfb(0x1f1),_0x2e0a61),_0x2d3e1c['append'](_0x993cfb(0x1df),_0x39043a);_0x17a4eb?.[_0x993cfb(0x1ea)]&&_0x2d3e1c['append'](_0x993cfb(0x204),_0x17a4eb[_0x993cfb(0x1ea)]);_0x17a4eb?.['clearSchedule']&&_0x17a4eb[_0x993cfb(0x1b4)][_0x993cfb(0x1dc)](_0x14c5c2=>{const _0x41b915=_0x993cfb;_0x2d3e1c[_0x41b915(0x1ef)](_0x41b915(0x1db),_0x14c5c2);});_0x17a4eb?.['clearScheduleAll']&&_0x2d3e1c[_0x993cfb(0x1ef)]('clear_schedule_all',_0x993cfb(0x1c9));const _0x302846=_0x2d3e1c['toString'](),_0x3330d2=_0x993cfb(0x1f4)+_0x302846,_0x1929a7=await _0x519a70[_0x993cfb(0x1b8)](_0xad8cc6);return await this[_0x993cfb(0x1ff)][_0x993cfb(0x1ed)]('PUT',_0x3330d2,{'body':_0x1929a7,'headers':{'Content-Type':_0x993cfb(0x1fb)}});}async[a7_0x2d0000(0x1e0)](_0x363d87){const _0x49bb76=a7_0x2d0000;return await this['httpClient'][_0x49bb76(0x1ed)](_0x49bb76(0x1e5),'/api/projects/'+encodeURIComponent(_0x363d87));}}function a7_0x5626(){const _0x3d52fe=['listSessions','project','listWorkflows','workflows','/api/projects?','filter','28BFSyOQ','listAttempts','attempts','name_pattern','/api/attempts/','application/gzip','last_id','status','2561537GdTrTp','httpClient','/logs?','retrySession','50469wcEKwA','killAttempt','schedule_from','site','downloadProjectArchive','getTaskLogs','clearSchedule','/sessions','search_project_name','POST','readFile','lastId','workflow','reason','231815gxXGCI','name','/api/projects/','retry_params','35903gumAKe','include_retried','project_id','to_time','/tasks','/api/workflows?','project_name','limit','from_time','true','/api/sessions/','/logs','423hibQTl','/api/attempts?','76590NBLRxL','/tasks/','/api/workflows','264AnIiPT','writeFile','resume_from','force','GET','projects','include_subtasks','/retry','from_task','authHeaders','clear_schedule','forEach','/tasks?','115438EuzZKq','revision','deleteProject','uploadProjectArchive','offset','42uHUqfC','tasks','DELETE','/archive','replace','workflow_name','271212fFIrSk','scheduleFrom','/api/attempts','1ptdysO','request','toString','append'];a7_0x5626=function(){return _0x3d52fe;};return a7_0x5626();}
@@ -1 +1 @@
1
- function a8_0x3361(){const _0x537499=['510JaFXUv','445439kcaGRc','Site:\x20','\x20\x20Cause:\x20','18708KcsUMz','segment','Error:\x20','12249XJfDlY','2896tHWKrg','1138906TKumCl','1002572TnOHio','Parent\x20name:\x20','description','site','3078285YgABEa','Resolved\x20child\x20ID:\x20','Listing\x20activations\x20for\x20segment\x20\x27','Resolving\x20parent\x20segment\x20\x27','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','error','Resolving\x20child\x20segment\x20\x27','Child\x20name:\x20','22TweumX','execute','name','message','\x27...','verbose','✔\x20Found\x20','Resolved\x20parent\x20ID:\x20','length','cause','3FuoEyv','Error:\x20Segment\x20name\x20is\x20required','5284970GhJASa','activations','data'];a8_0x3361=function(){return _0x537499;};return a8_0x3361();}const a8_0x5d74c8=a8_0x11f5;(function(_0x57c66b,_0x360567){const _0x348f2a=a8_0x11f5,_0x1d1212=_0x57c66b();while(!![]){try{const _0x5c9ccd=parseInt(_0x348f2a(0x1c5))/0x1+parseInt(_0x348f2a(0x1cd))/0x2+-parseInt(_0x348f2a(0x1bf))/0x3*(parseInt(_0x348f2a(0x1ce))/0x4)+-parseInt(_0x348f2a(0x1c4))/0x5*(parseInt(_0x348f2a(0x1c8))/0x6)+parseInt(_0x348f2a(0x1d2))/0x7+parseInt(_0x348f2a(0x1cc))/0x8*(parseInt(_0x348f2a(0x1cb))/0x9)+parseInt(_0x348f2a(0x1c1))/0xa*(-parseInt(_0x348f2a(0x1b5))/0xb);if(_0x5c9ccd===_0x360567)break;else _0x1d1212['push'](_0x1d1212['shift']());}catch(_0x5ded09){_0x1d1212['push'](_0x1d1212['shift']());}}}(a8_0x3361,0x4e878));function a8_0x11f5(_0x5bbf46,_0x54a0c1){const _0x336192=a8_0x3361();return a8_0x11f5=function(_0x11f5f6,_0x486592){_0x11f5f6=_0x11f5f6-0x1b5;let _0x5e9888=_0x336192[_0x11f5f6];return _0x5e9888;},a8_0x11f5(_0x5bbf46,_0x54a0c1);}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a8_0x5d74c8(0x1b7)]=a8_0x5d74c8(0x1c2);[a8_0x5d74c8(0x1d0)]='List\x20activations\x20for\x20a\x20segment';async[a8_0x5d74c8(0x1b6)](_0x365cd7){const _0x5c6140=a8_0x5d74c8,{options:_0x248893,args:_0x4fd61b,tdx:_0x409f3c}=_0x365cd7;if(_0x4fd61b[_0x5c6140(0x1bd)]===0x0)return console[_0x5c6140(0x1d7)](_0x5c6140(0x1c0)),console[_0x5c6140(0x1d7)](_0x5c6140(0x1d6)),0x1;try{const {parentId:_0x2246e2,childId:_0x1db013}=parseSegmentRef(_0x4fd61b[0x0]);if(!_0x1db013)return console[_0x5c6140(0x1d7)]('Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations'),console[_0x5c6140(0x1d7)]('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;_0x248893['verbose']&&(console[_0x5c6140(0x1d7)](_0x5c6140(0x1c6)+_0x248893[_0x5c6140(0x1d1)]),console[_0x5c6140(0x1d7)](_0x5c6140(0x1cf)+_0x2246e2),console[_0x5c6140(0x1d7)](_0x5c6140(0x1d9)+_0x1db013));const _0x11523e=await withSpinner(_0x5c6140(0x1d5)+_0x2246e2+'\x27...',()=>_0x409f3c[_0x5c6140(0x1c9)]['resolveParentId'](_0x2246e2),{'verbose':_0x248893['verbose']}),_0x15d55e=_0x11523e['data'];_0x248893[_0x5c6140(0x1ba)]&&console[_0x5c6140(0x1d7)](_0x5c6140(0x1bc)+_0x15d55e);const _0x2593d2=await withSpinner(_0x5c6140(0x1d8)+_0x1db013+_0x5c6140(0x1b9),()=>_0x409f3c['segment']['resolveSegmentId'](_0x15d55e,_0x1db013),{'verbose':_0x248893['verbose']}),_0x548d06=_0x2593d2[_0x5c6140(0x1c3)];_0x248893[_0x5c6140(0x1ba)]&&console[_0x5c6140(0x1d7)](_0x5c6140(0x1d3)+_0x548d06);const _0x5b8385=await withSpinner(_0x5c6140(0x1d4)+_0x1db013+_0x5c6140(0x1b9),()=>_0x409f3c['segment']['listActivations'](_0x15d55e,_0x548d06),{'verbose':_0x248893[_0x5c6140(0x1ba)]}),_0x420329=_0x5b8385[_0x5c6140(0x1c3)];return console[_0x5c6140(0x1d7)](_0x5c6140(0x1bb)+_0x420329[_0x5c6140(0x1bd)]+'\x20activation'+(_0x420329['length']!==0x1?'s':'')),await handleSDKOutput(_0x420329,_0x248893),0x0;}catch(_0x295bef){if(_0x295bef instanceof SDKError)return console[_0x5c6140(0x1d7)](_0x5c6140(0x1ca)+_0x295bef[_0x5c6140(0x1b8)]),_0x295bef[_0x5c6140(0x1be)]&&console[_0x5c6140(0x1d7)](_0x5c6140(0x1c7)+_0x295bef[_0x5c6140(0x1be)]),0x1;throw _0x295bef;}}}
1
+ const a8_0x2b09c0=a8_0x149c;function a8_0x391d(){const _0xd2a057=['Child\x20name:\x20','✔\x20Found\x20','listActivations','cause','segment','Resolving\x20parent\x20segment\x20\x27','92910hPMYWe','site','Site:\x20','4817835XiZWom','14SJRnaE','Resolving\x20child\x20segment\x20\x27','description','211966eOBONe','message','6030965WKJYei','resolveSegmentId','activations','execute','verbose','10rCuzPc','error','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','data','\x27...','Resolved\x20child\x20ID:\x20','length','\x20activation','4451992UleCjk','4140650eXvyRM','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','Parent\x20name:\x20','name','1174884oNxDxa','Resolved\x20parent\x20ID:\x20','4JTZQUm','resolveParentId'];a8_0x391d=function(){return _0xd2a057;};return a8_0x391d();}(function(_0xb1ca69,_0x3b1f3b){const _0x21ef68=a8_0x149c,_0x4f5ea4=_0xb1ca69();while(!![]){try{const _0x424cb0=parseInt(_0x21ef68(0x1df))/0x1*(parseInt(_0x21ef68(0x1d8))/0x2)+-parseInt(_0x21ef68(0x1c7))/0x3+parseInt(_0x21ef68(0x1c9))/0x4*(-parseInt(_0x21ef68(0x1da))/0x5)+parseInt(_0x21ef68(0x1d1))/0x6+parseInt(_0x21ef68(0x1d5))/0x7*(parseInt(_0x21ef68(0x1e7))/0x8)+parseInt(_0x21ef68(0x1d4))/0x9+-parseInt(_0x21ef68(0x1e8))/0xa;if(_0x424cb0===_0x3b1f3b)break;else _0x4f5ea4['push'](_0x4f5ea4['shift']());}catch(_0x4eda1f){_0x4f5ea4['push'](_0x4f5ea4['shift']());}}}(a8_0x391d,0xadc3e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../utils/segment-ref-parser.js';function a8_0x149c(_0x251410,_0x51b70b){const _0x391d72=a8_0x391d();return a8_0x149c=function(_0x149c48,_0xb3ca3c){_0x149c48=_0x149c48-0x1c7;let _0xaf4fbe=_0x391d72[_0x149c48];return _0xaf4fbe;},a8_0x149c(_0x251410,_0x51b70b);}export class ActivationsCommand extends BaseCommand{[a8_0x2b09c0(0x1eb)]=a8_0x2b09c0(0x1dc);[a8_0x2b09c0(0x1d7)]='List\x20activations\x20for\x20a\x20segment';async[a8_0x2b09c0(0x1dd)](_0x1f1c3e){const _0x4eca85=a8_0x2b09c0,{options:_0x2b8c2f,args:_0x1fca73,tdx:_0x5eda4c}=_0x1f1c3e;if(_0x1fca73['length']===0x0)return console[_0x4eca85(0x1e0)]('Error:\x20Segment\x20name\x20is\x20required'),console[_0x4eca85(0x1e0)]('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;try{const {parentId:_0x160fae,childId:_0x1412af}=parseSegmentRef(_0x1fca73[0x0]);if(!_0x1412af)return console[_0x4eca85(0x1e0)](_0x4eca85(0x1e1)),console[_0x4eca85(0x1e0)](_0x4eca85(0x1e9)),0x1;_0x2b8c2f[_0x4eca85(0x1de)]&&(console[_0x4eca85(0x1e0)](_0x4eca85(0x1d3)+_0x2b8c2f[_0x4eca85(0x1d2)]),console[_0x4eca85(0x1e0)](_0x4eca85(0x1ea)+_0x160fae),console[_0x4eca85(0x1e0)](_0x4eca85(0x1cb)+_0x1412af));const _0x5c02a9=await withSpinner(_0x4eca85(0x1d0)+_0x160fae+_0x4eca85(0x1e3),()=>_0x5eda4c['segment'][_0x4eca85(0x1ca)](_0x160fae),{'verbose':_0x2b8c2f[_0x4eca85(0x1de)]}),_0xc12aa8=_0x5c02a9[_0x4eca85(0x1e2)];_0x2b8c2f[_0x4eca85(0x1de)]&&console['error'](_0x4eca85(0x1c8)+_0xc12aa8);const _0x565f84=await withSpinner(_0x4eca85(0x1d6)+_0x1412af+_0x4eca85(0x1e3),()=>_0x5eda4c[_0x4eca85(0x1cf)][_0x4eca85(0x1db)](_0xc12aa8,_0x1412af),{'verbose':_0x2b8c2f[_0x4eca85(0x1de)]}),_0x39c422=_0x565f84[_0x4eca85(0x1e2)];_0x2b8c2f[_0x4eca85(0x1de)]&&console[_0x4eca85(0x1e0)](_0x4eca85(0x1e4)+_0x39c422);const _0x14361b=await withSpinner('Listing\x20activations\x20for\x20segment\x20\x27'+_0x1412af+'\x27...',()=>_0x5eda4c[_0x4eca85(0x1cf)][_0x4eca85(0x1cd)](_0xc12aa8,_0x39c422),{'verbose':_0x2b8c2f[_0x4eca85(0x1de)]}),_0x398a54=_0x14361b['data'];return console['error'](_0x4eca85(0x1cc)+_0x398a54['length']+_0x4eca85(0x1e6)+(_0x398a54[_0x4eca85(0x1e5)]!==0x1?'s':'')),await handleSDKOutput(_0x398a54,_0x2b8c2f),0x0;}catch(_0x205dd9){if(_0x205dd9 instanceof SDKError)return console[_0x4eca85(0x1e0)]('Error:\x20'+_0x205dd9[_0x4eca85(0x1d9)]),_0x205dd9[_0x4eca85(0x1ce)]&&console['error']('\x20\x20Cause:\x20'+_0x205dd9['cause']),0x1;throw _0x205dd9;}}}
@@ -1 +1 @@
1
- function a9_0x5e14(_0x12f899,_0x45cc82){const _0x1a40c3=a9_0x1a40();return a9_0x5e14=function(_0x5e1476,_0x2f210d){_0x5e1476=_0x5e1476-0x73;let _0x149e32=_0x1a40c3[_0x5e1476];return _0x149e32;},a9_0x5e14(_0x12f899,_0x45cc82);}const a9_0x2bac8f=a9_0x5e14;(function(_0x59bfdf,_0x324c3a){const _0x58df32=a9_0x5e14,_0x4078e5=_0x59bfdf();while(!![]){try{const _0x44b4d0=-parseInt(_0x58df32(0x7a))/0x1*(-parseInt(_0x58df32(0x9a))/0x2)+-parseInt(_0x58df32(0x9e))/0x3*(-parseInt(_0x58df32(0x98))/0x4)+parseInt(_0x58df32(0x89))/0x5*(parseInt(_0x58df32(0x74))/0x6)+-parseInt(_0x58df32(0x88))/0x7*(parseInt(_0x58df32(0xb2))/0x8)+-parseInt(_0x58df32(0x73))/0x9*(parseInt(_0x58df32(0xa6))/0xa)+parseInt(_0x58df32(0xa7))/0xb+parseInt(_0x58df32(0xaa))/0xc;if(_0x44b4d0===_0x324c3a)break;else _0x4078e5['push'](_0x4078e5['shift']());}catch(_0x399962){_0x4078e5['push'](_0x4078e5['shift']());}}}(a9_0x1a40,0x74343));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';function a9_0x1a40(){const _0x319a3b=['output','log','1724MkNJOP','../core/config.js','102734uVlTBf','startsWith','workflow','toLowerCase','5511CvmEhD','POST','color','x-auth-token','Endpoint\x20must\x20start\x20with\x20/:\x20','execute','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','status','9387910fTKEkS','2006378WhvtUW','type','description','529488syhaYn','includes','data','\x22.\x20','Results\x20saved\x20to\x20','authorization','Error:\x20','GET','88iicMSy','\x0aStack\x20trace:\x0a','entries','DELETE','noColor','request','../types/index.js','method','9enblsk','4378314Eoklso','headers','validate','header','.\x20Valid\x20types:\x20','readBodyFromFile','1tAbbwG','x-xsrf-token','api','Invalid\x20API\x20type:\x20','message','llm','Invalid\x20HTTP\x20method:\x20','keys','stack','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','PATCH','substring','join','error','244741VqovlO','5WCxEiX','file','../core/auth.js','set-cookie2','name','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','Invalid\x20header\x20format:\x20\x22','length','x-trino-user','verbose','indexOf','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','trim'];a9_0x1a40=function(){return _0x319a3b;};return a9_0x1a40();}import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';const SENSITIVE_HEADERS=new Set([a9_0x2bac8f(0xaf),'proxy-authorization','cookie','set-cookie',a9_0x2bac8f(0x8c),a9_0x2bac8f(0x7b),a9_0x2bac8f(0xa1),a9_0x2bac8f(0x91)]);function isSensitiveHeader(_0x4218bb){const _0x2c36e9=a9_0x2bac8f;return SENSITIVE_HEADERS['has'](_0x4218bb[_0x2c36e9(0x9d)]());}function parseHeader(_0xe623bf){const _0x2bb6db=a9_0x2bac8f,_0xa3bcf7=_0xe623bf[_0x2bb6db(0x93)](':');if(_0xa3bcf7===-0x1)throw new Error(_0x2bb6db(0x8f)+_0xe623bf+_0x2bb6db(0xad)+_0x2bb6db(0xa4));const _0x346156=_0xe623bf['substring'](0x0,_0xa3bcf7)[_0x2bb6db(0x95)](),_0x1de0df=_0xe623bf[_0x2bb6db(0x85)](_0xa3bcf7+0x1)[_0x2bb6db(0x95)]();if(!_0x346156)throw new Error('Header\x20key\x20cannot\x20be\x20empty:\x20\x22'+_0xe623bf+'\x22');return[_0x346156,_0x1de0df];}export class ApiCommand extends BaseCommand{[a9_0x2bac8f(0x8d)]=a9_0x2bac8f(0x7c);[a9_0x2bac8f(0xa9)]=a9_0x2bac8f(0x83);[a9_0x2bac8f(0x76)](_0x2fd852){const _0x2a71f4=a9_0x2bac8f,{args:_0x384e3d,options:_0x421ee8}=_0x2fd852,_0x2837b2=_0x421ee8;if(_0x384e3d[_0x2a71f4(0x90)]===0x0)return _0x2a71f4(0x94);const _0x33078c=_0x384e3d[0x0];if(!_0x33078c[_0x2a71f4(0x9b)]('/'))return _0x2a71f4(0xa2)+_0x33078c;const _0xb30388=_0x2837b2['data'],_0x55e6b0=_0x2837b2[_0x2a71f4(0x8a)];if(_0xb30388&&_0x55e6b0)return _0x2a71f4(0x8e);const _0x56dd1c=_0x2837b2['method']||_0x2a71f4(0xb1),_0x9566cf=[_0x2a71f4(0xb1),_0x2a71f4(0x9f),'PUT',_0x2a71f4(0xb5),_0x2a71f4(0x84)];if(!_0x9566cf['includes'](_0x56dd1c['toUpperCase']()))return _0x2a71f4(0x80)+_0x56dd1c+'.\x20Valid\x20methods:\x20'+_0x9566cf[_0x2a71f4(0x86)](',\x20');const _0x42a9ed=_0x2837b2[_0x2a71f4(0xa8)]||'td',_0x20ca91=['td','cdp',_0x2a71f4(0x9c),'trino',_0x2a71f4(0x7f)];if(!_0x20ca91[_0x2a71f4(0xab)](_0x42a9ed))return _0x2a71f4(0x7d)+_0x42a9ed+_0x2a71f4(0x78)+_0x20ca91[_0x2a71f4(0x86)](',\x20');return undefined;}async[a9_0x2bac8f(0xa3)](_0x411b20){const _0x57ea50=a9_0x2bac8f,{options:_0x30d5aa,args:_0x3de130,tdx:_0x1e55bb}=_0x411b20,_0x350de4=_0x30d5aa,_0x18d5ed=_0x3de130[0x0],_0x37acf2=(_0x350de4[_0x57ea50(0xb9)]||'GET')['toUpperCase'](),_0x3bab0a=_0x350de4[_0x57ea50(0xac)],_0x3e38d8=_0x350de4[_0x57ea50(0x8a)],_0x1bce19=_0x350de4[_0x57ea50(0x77)],_0x1cb1a5=_0x350de4['type']||'td';try{const _0x5eacd2={};if(_0x1bce19){const _0x1206a5=Array['isArray'](_0x1bce19)?_0x1bce19:[_0x1bce19];for(const _0x327393 of _0x1206a5){const [_0x23a864,_0x2b2104]=parseHeader(_0x327393);_0x5eacd2[_0x23a864]=_0x2b2104;}}let _0x155efb;if(_0x3bab0a)_0x155efb=_0x3bab0a;else{if(_0x3e38d8)try{_0x155efb=RawAPI[_0x57ea50(0x79)](_0x3e38d8);}catch(_0x38957b){return console[_0x57ea50(0x87)](_0x57ea50(0xb0)+(_0x38957b instanceof Error?_0x38957b[_0x57ea50(0x7e)]:String(_0x38957b))),0x1;}}const _0x544749={'method':_0x37acf2,'apiType':_0x1cb1a5,'includeHeaders':_0x30d5aa[_0x57ea50(0x92)]};_0x155efb&&(_0x544749['body']=_0x155efb);Object[_0x57ea50(0x81)](_0x5eacd2)['length']>0x0&&(_0x544749[_0x57ea50(0x75)]=_0x5eacd2);if(_0x30d5aa[_0x57ea50(0x92)]){const {getEndpoint:_0x266463}=await import(_0x57ea50(0xb8)),{resolveSite:_0x3912dc}=await import(_0x57ea50(0x99)),{getAuthHeaders:_0xdcd6c0}=await import(_0x57ea50(0x8b)),_0x1c9c82=_0x3912dc(_0x30d5aa['site']),_0x515842=_0x266463(_0x1c9c82,_0x1cb1a5),_0x1a09b3=''+_0x515842+_0x18d5ed;console[_0x57ea50(0x87)]('>\x20'+_0x37acf2+'\x20'+_0x1a09b3);const _0x59ec22=_0xdcd6c0(_0x1c9c82),_0x5b352b={..._0x59ec22,..._0x5eacd2};for(const [_0x1b4dac,_0x27678c]of Object['entries'](_0x5b352b)){!isSensitiveHeader(_0x1b4dac)&&console[_0x57ea50(0x87)]('>\x20'+_0x1b4dac+':\x20'+_0x27678c);}_0x155efb&&console[_0x57ea50(0x87)]('>'),console[_0x57ea50(0x87)]('');}const _0x2089e9=await _0x1e55bb[_0x57ea50(0x7c)][_0x57ea50(0xb7)](_0x18d5ed,_0x544749);if(_0x30d5aa[_0x57ea50(0x92)]&&_0x2089e9[_0x57ea50(0x75)]){console[_0x57ea50(0x87)]('<\x20HTTP/1.1\x20'+_0x2089e9[_0x57ea50(0xa5)]);for(const [_0x333798,_0x5f4462]of Object[_0x57ea50(0xb4)](_0x2089e9[_0x57ea50(0x75)])){!isSensitiveHeader(_0x333798)&&console['error']('<\x20'+_0x333798+':\x20'+_0x5f4462);}console[_0x57ea50(0x87)]('');}const _0x20c7c3=Boolean(_0x30d5aa['output']),_0x51eb0b={'color':_0x30d5aa[_0x57ea50(0xa0)],'noColor':_0x30d5aa[_0x57ea50(0xb6)]||_0x20c7c3&&!_0x30d5aa['color']},_0x1a2551=colorizeJSON(_0x2089e9[_0x57ea50(0xac)],_0x51eb0b);return _0x30d5aa[_0x57ea50(0x96)]?(writeFileSync(_0x30d5aa[_0x57ea50(0x96)],_0x1a2551),console[_0x57ea50(0x87)](_0x57ea50(0xae)+_0x30d5aa['output'])):console[_0x57ea50(0x97)](_0x1a2551),0x0;}catch(_0x54b517){return _0x54b517 instanceof Error?(console[_0x57ea50(0x87)]('Error:\x20'+_0x54b517['message']),_0x30d5aa[_0x57ea50(0x92)]&&_0x54b517[_0x57ea50(0x82)]&&console[_0x57ea50(0x87)](_0x57ea50(0xb3)+_0x54b517[_0x57ea50(0x82)])):console[_0x57ea50(0x87)]('Error:\x20'+String(_0x54b517)),0x1;}}}
1
+ function a9_0x4a50(_0x57cb57,_0x34f942){const _0x125d32=a9_0x125d();return a9_0x4a50=function(_0x4a504c,_0x571659){_0x4a504c=_0x4a504c-0x71;let _0x1739c3=_0x125d32[_0x4a504c];return _0x1739c3;},a9_0x4a50(_0x57cb57,_0x34f942);}function a9_0x125d(){const _0x3f3a88=['stack','8818630ioKUPk','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','30ZkQndE','.\x20Valid\x20types:\x20','file','\x0aStack\x20trace:\x0a','2583423HUNgyP','has','keys','1158912FomITT','llm','37877gGzITs','x-trino-user','validate','PATCH','includes','verbose','\x22.\x20','output','1258488XqcHoG','execute','method','x-auth-token','6avscnm','<\x20HTTP/1.1\x20','entries','length','toUpperCase','24ooKwRY','api','site','isArray','Results\x20saved\x20to\x20','GET','cookie','trino','../core/config.js','PUT','headers','POST','data','Invalid\x20HTTP\x20method:\x20','name','166484SSAbcj','log','Error:\x20','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','../core/auth.js','body','description','error','authorization','x-xsrf-token','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','type','indexOf','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','../types/index.js','cdp','header','color','trim','105188EzCIxA','.\x20Valid\x20methods:\x20'];a9_0x125d=function(){return _0x3f3a88;};return a9_0x125d();}const a9_0x339bfb=a9_0x4a50;(function(_0x4c28ab,_0x2047e8){const _0x1540fa=a9_0x4a50,_0x1160a9=_0x4c28ab();while(!![]){try{const _0x339d29=-parseInt(_0x1540fa(0xa4))/0x1+-parseInt(_0x1540fa(0x83))/0x2+-parseInt(_0x1540fa(0xb0))/0x3*(-parseInt(_0x1540fa(0x96))/0x4)+parseInt(_0x1540fa(0x9b))/0x5*(-parseInt(_0x1540fa(0xa2))/0x6)+parseInt(_0x1540fa(0xac))/0x7+parseInt(_0x1540fa(0x74))/0x8*(parseInt(_0x1540fa(0x9f))/0x9)+parseInt(_0x1540fa(0x99))/0xa;if(_0x339d29===_0x2047e8)break;else _0x1160a9['push'](_0x1160a9['shift']());}catch(_0xbdc30d){_0x1160a9['push'](_0x1160a9['shift']());}}}(a9_0x125d,0xa9c37));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';const SENSITIVE_HEADERS=new Set([a9_0x339bfb(0x8b),'proxy-authorization',a9_0x339bfb(0x7a),'set-cookie','set-cookie2',a9_0x339bfb(0x8c),a9_0x339bfb(0xaf),a9_0x339bfb(0xa5)]);function isSensitiveHeader(_0x33feab){const _0x4f12eb=a9_0x339bfb;return SENSITIVE_HEADERS[_0x4f12eb(0xa0)](_0x33feab['toLowerCase']());}function parseHeader(_0x892bf9){const _0x5c01fe=a9_0x339bfb,_0x39c728=_0x892bf9[_0x5c01fe(0x8f)](':');if(_0x39c728===-0x1)throw new Error('Invalid\x20header\x20format:\x20\x22'+_0x892bf9+_0x5c01fe(0xaa)+_0x5c01fe(0x8d));const _0x4003b=_0x892bf9['substring'](0x0,_0x39c728)[_0x5c01fe(0x95)](),_0x2a4c7b=_0x892bf9['substring'](_0x39c728+0x1)[_0x5c01fe(0x95)]();if(!_0x4003b)throw new Error(_0x5c01fe(0x90)+_0x892bf9+'\x22');return[_0x4003b,_0x2a4c7b];}export class ApiCommand extends BaseCommand{[a9_0x339bfb(0x82)]=a9_0x339bfb(0x75);[a9_0x339bfb(0x89)]=a9_0x339bfb(0x86);[a9_0x339bfb(0xa6)](_0x552a4a){const _0x220543=a9_0x339bfb,{args:_0x4bd5bd,options:_0x588db5}=_0x552a4a,_0x465311=_0x588db5;if(_0x4bd5bd[_0x220543(0x72)]===0x0)return'Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list';const _0x179998=_0x4bd5bd[0x0];if(!_0x179998['startsWith']('/'))return'Endpoint\x20must\x20start\x20with\x20/:\x20'+_0x179998;const _0x2db084=_0x465311[_0x220543(0x80)],_0x73b8ab=_0x465311[_0x220543(0x9d)];if(_0x2db084&&_0x73b8ab)return _0x220543(0x9a);const _0x4ca644=_0x465311[_0x220543(0xae)]||_0x220543(0x79),_0x1f507e=['GET',_0x220543(0x7f),_0x220543(0x7d),'DELETE',_0x220543(0xa7)];if(!_0x1f507e['includes'](_0x4ca644[_0x220543(0x73)]()))return _0x220543(0x81)+_0x4ca644+_0x220543(0x97)+_0x1f507e['join'](',\x20');const _0x1b0426=_0x465311[_0x220543(0x8e)]||'td',_0x86cbc0=['td',_0x220543(0x92),'workflow',_0x220543(0x7b),_0x220543(0xa3)];if(!_0x86cbc0[_0x220543(0xa8)](_0x1b0426))return'Invalid\x20API\x20type:\x20'+_0x1b0426+_0x220543(0x9c)+_0x86cbc0['join'](',\x20');return undefined;}async[a9_0x339bfb(0xad)](_0x4fe709){const _0x49733e=a9_0x339bfb,{options:_0x2c5f25,args:_0x72f8d3,tdx:_0x15f7e6}=_0x4fe709,_0x43bb59=_0x2c5f25,_0x33dbce=_0x72f8d3[0x0],_0x45d5dc=(_0x43bb59['method']||_0x49733e(0x79))[_0x49733e(0x73)](),_0x463bd7=_0x43bb59[_0x49733e(0x80)],_0x4d7db2=_0x43bb59[_0x49733e(0x9d)],_0x4d7314=_0x43bb59[_0x49733e(0x93)],_0x226d1b=_0x43bb59[_0x49733e(0x8e)]||'td';try{const _0x324dc1={};if(_0x4d7314){const _0x16d880=Array[_0x49733e(0x77)](_0x4d7314)?_0x4d7314:[_0x4d7314];for(const _0x391de5 of _0x16d880){const [_0x15db75,_0x1a60d3]=parseHeader(_0x391de5);_0x324dc1[_0x15db75]=_0x1a60d3;}}let _0x131ea8;if(_0x463bd7)_0x131ea8=_0x463bd7;else{if(_0x4d7db2)try{_0x131ea8=RawAPI['readBodyFromFile'](_0x4d7db2);}catch(_0xcfe599){return console[_0x49733e(0x8a)](_0x49733e(0x85)+(_0xcfe599 instanceof Error?_0xcfe599['message']:String(_0xcfe599))),0x1;}}const _0x180f74={'method':_0x45d5dc,'apiType':_0x226d1b,'includeHeaders':_0x2c5f25[_0x49733e(0xa9)]};_0x131ea8&&(_0x180f74[_0x49733e(0x88)]=_0x131ea8);Object[_0x49733e(0xa1)](_0x324dc1)[_0x49733e(0x72)]>0x0&&(_0x180f74[_0x49733e(0x7e)]=_0x324dc1);if(_0x2c5f25[_0x49733e(0xa9)]){const {getEndpoint:_0x159360}=await import(_0x49733e(0x91)),{resolveSite:_0x303aae}=await import(_0x49733e(0x7c)),{getAuthHeaders:_0xecc805}=await import(_0x49733e(0x87)),_0x5d2dcf=_0x303aae(_0x2c5f25[_0x49733e(0x76)]),_0x277a6d=_0x159360(_0x5d2dcf,_0x226d1b),_0x552003=''+_0x277a6d+_0x33dbce;console[_0x49733e(0x8a)]('>\x20'+_0x45d5dc+'\x20'+_0x552003);const _0x413044=_0xecc805(_0x5d2dcf),_0x80be5c={..._0x413044,..._0x324dc1};for(const [_0x2435a1,_0x5de298]of Object[_0x49733e(0x71)](_0x80be5c)){!isSensitiveHeader(_0x2435a1)&&console[_0x49733e(0x8a)]('>\x20'+_0x2435a1+':\x20'+_0x5de298);}_0x131ea8&&console[_0x49733e(0x8a)]('>'),console[_0x49733e(0x8a)]('');}const _0x3d31bf=await _0x15f7e6[_0x49733e(0x75)]['request'](_0x33dbce,_0x180f74);if(_0x2c5f25[_0x49733e(0xa9)]&&_0x3d31bf[_0x49733e(0x7e)]){console[_0x49733e(0x8a)](_0x49733e(0xb1)+_0x3d31bf['status']);for(const [_0xc3f9aa,_0x4491dd]of Object[_0x49733e(0x71)](_0x3d31bf[_0x49733e(0x7e)])){!isSensitiveHeader(_0xc3f9aa)&&console[_0x49733e(0x8a)]('<\x20'+_0xc3f9aa+':\x20'+_0x4491dd);}console[_0x49733e(0x8a)]('');}const _0x317843=Boolean(_0x2c5f25['output']),_0xdc3fdd={'color':_0x2c5f25[_0x49733e(0x94)],'noColor':_0x2c5f25['noColor']||_0x317843&&!_0x2c5f25[_0x49733e(0x94)]},_0x213dc3=colorizeJSON(_0x3d31bf[_0x49733e(0x80)],_0xdc3fdd);return _0x2c5f25[_0x49733e(0xab)]?(writeFileSync(_0x2c5f25[_0x49733e(0xab)],_0x213dc3),console[_0x49733e(0x8a)](_0x49733e(0x78)+_0x2c5f25[_0x49733e(0xab)])):console[_0x49733e(0x84)](_0x213dc3),0x0;}catch(_0x210a4f){return _0x210a4f instanceof Error?(console['error']('Error:\x20'+_0x210a4f['message']),_0x2c5f25[_0x49733e(0xa9)]&&_0x210a4f['stack']&&console['error'](_0x49733e(0x9e)+_0x210a4f[_0x49733e(0x98)])):console[_0x49733e(0x8a)]('Error:\x20'+String(_0x210a4f)),0x1;}}}
@@ -1 +1 @@
1
- function a10_0x3381(_0x67cdeb,_0x353fb0){const _0x62cf5=a10_0x62cf();return a10_0x3381=function(_0x33817e,_0x522639){_0x33817e=_0x33817e-0xf5;let _0x2c4eb9=_0x62cf5[_0x33817e];return _0x2c4eb9;},a10_0x3381(_0x67cdeb,_0x353fb0);}const a10_0x46c4c3=a10_0x3381;(function(_0x40eb01,_0x3556c5){const _0x4c0b47=a10_0x3381,_0x511c6c=_0x40eb01();while(!![]){try{const _0x5bfd36=parseInt(_0x4c0b47(0x115))/0x1+-parseInt(_0x4c0b47(0x103))/0x2+parseInt(_0x4c0b47(0x108))/0x3*(-parseInt(_0x4c0b47(0x102))/0x4)+parseInt(_0x4c0b47(0x11b))/0x5*(-parseInt(_0x4c0b47(0xf9))/0x6)+parseInt(_0x4c0b47(0x11f))/0x7*(-parseInt(_0x4c0b47(0x10e))/0x8)+-parseInt(_0x4c0b47(0x105))/0x9*(-parseInt(_0x4c0b47(0x10f))/0xa)+parseInt(_0x4c0b47(0x125))/0xb;if(_0x5bfd36===_0x3556c5)break;else _0x511c6c['push'](_0x511c6c['shift']());}catch(_0x4886e6){_0x511c6c['push'](_0x511c6c['shift']());}}}(a10_0x62cf,0xdcb39));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import{parseAgentRef}from'../utils/agent-ref-parser.js';import{saveLastChatId,loadLastChatId}from'../utils/chat-cache.js';import{resolveModelAlias}from'../utils/model-aliases.js';function handleSDKError(_0x447f09,_0x189569){const _0xe945d0=a10_0x3381;if(_0x447f09 instanceof SDKError)console[_0xe945d0(0x10d)](_0xe945d0(0xf5)+_0x447f09['message']),_0x189569[_0xe945d0(0x124)]&&(_0x447f09[_0xe945d0(0x128)]&&console[_0xe945d0(0x10d)]('\x20\x20Cause:\x20'+_0x447f09[_0xe945d0(0x128)]),_0x447f09[_0xe945d0(0x114)]&&(console['error'](_0xe945d0(0x120)),console[_0xe945d0(0x10d)](_0x447f09[_0xe945d0(0x114)])));else throw _0x447f09;}function a10_0x62cf(){const _0x20f1a8=['event','getAgentId','functionName','Error:\x20','haiku','new','log','72yaPaZV','name','code','includes','output','404','stderr','CHAT_NOT_FOUND','validate','3164ilaUZR','1568944TueMIl','tool','117EeBVTv','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','chat','1104sTjVFS','\x27...','handleSSEEvent','data','metadata','error','7090640rvStVq','456670pNCuKj','Chat\x20session:\x20','tool_call','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)','\x0a[Error:\x20','stack','1774393OiTmEU','resolveProjectId','stdout','agent','args','execute','447955Asnnzp','Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options','write','Getting\x20agent\x20for\x20model\x20\x27','14PQxdBU','\x0aStack\x20trace:','streamChat','type','\x0a[Tool:\x20','verbose','27051651ZssHAY','temperature','message','cause','model','\x0a[Output:\x20','Resolving\x20agent\x20\x27','join','content','llm'];a10_0x62cf=function(){return _0x20f1a8;};return a10_0x62cf();}export class ChatCommand extends BaseCommand{['name']='chat';['description']=a10_0x46c4c3(0x112);[a10_0x46c4c3(0x101)](_0x4d185e){const _0xe848a6=a10_0x46c4c3,_0x11ac02=_0x4d185e[_0xe848a6(0x119)]['join']('\x20');if(!_0x11ac02)return _0xe848a6(0x11c);return undefined;}async[a10_0x46c4c3(0x121)](_0x17ad00,_0x4d829e,_0xd5d5f1,_0x3af56e,_0x378740){const _0x43348b=a10_0x46c4c3;for await(const _0x165f48 of _0x17ad00[_0x43348b(0x12e)][_0x43348b(0x107)](_0x4d829e,{'agentId':_0xd5d5f1,'chatId':_0x3af56e})){if(_0x165f48[_0x43348b(0x122)]===_0x43348b(0x10c)){const _0x3459ed=_0x165f48[_0x43348b(0x10b)]['chatId'];saveLastChatId(_0x3459ed),_0x378740&&console[_0x43348b(0x10d)](_0x43348b(0x110)+_0x3459ed);}else _0x165f48[_0x43348b(0x122)]===_0x43348b(0x12f)&&this[_0x43348b(0x10a)](_0x165f48['data']);}}async['getAgentId'](_0x2385cc,_0x4bdbaf,_0x39ff86,_0x513cc3,_0x165e7c){const _0x780a5f=a10_0x46c4c3;if(_0x4bdbaf){const {projectName:_0x5d7aff,agentName:_0x31edcc}=parseAgentRef(_0x4bdbaf);if(!_0x31edcc)throw new Error('Agent\x20reference\x20must\x20include\x20project\x20name.\x20Usage:\x20--agent\x20\x22Project/Agent\x22');const _0x738e1c=await withSpinner('Resolving\x20project\x20\x27'+_0x5d7aff+_0x780a5f(0x109),()=>_0x2385cc['llm'][_0x780a5f(0x116)](_0x5d7aff),{'verbose':_0x165e7c}),_0x1c8d8e=await withSpinner(_0x780a5f(0x12b)+_0x31edcc+'\x27...',()=>_0x2385cc[_0x780a5f(0x12e)]['resolveAgentId'](_0x31edcc,_0x738e1c[_0x780a5f(0x10b)]),{'verbose':_0x165e7c});return _0x1c8d8e[_0x780a5f(0x10b)];}else{const _0x38da2c=_0x39ff86||_0x780a5f(0xf6),_0x4f6a8f=resolveModelAlias(_0x38da2c),_0x216c39=await withSpinner(_0x780a5f(0x11e)+_0x4f6a8f+_0x780a5f(0x109),()=>_0x2385cc[_0x780a5f(0x12e)]['getOrCreateDefaultAgent'](_0x4f6a8f,_0x513cc3),{'verbose':_0x165e7c});return _0x216c39[_0x780a5f(0x10b)]['id'];}}async[a10_0x46c4c3(0x11a)](_0x142bfd){const _0x33dbdb=a10_0x46c4c3,{options:_0x4b718a,args:_0x3c2078,tdx:_0x4154c7}=_0x142bfd,_0x1825a9=_0x3c2078[_0x33dbdb(0x12c)]('\x20'),_0x881f0c=_0x4b718a,_0xb4d229=_0x881f0c[_0x33dbdb(0x118)],_0x50120c=_0x881f0c[_0x33dbdb(0x129)],_0x50f4ce=_0x881f0c[_0x33dbdb(0x126)]?Number(_0x881f0c[_0x33dbdb(0x126)]):undefined,_0x504bf4=_0x881f0c[_0x33dbdb(0xf7)];try{let _0x59cc2c,_0x4faa90;!_0x504bf4&&(_0x4faa90=loadLastChatId(),_0x4faa90&&_0x4b718a[_0x33dbdb(0x124)]&&console[_0x33dbdb(0x10d)]('Continuing\x20chat:\x20'+_0x4faa90));(_0x504bf4||!_0x4faa90)&&(_0x59cc2c=await this[_0x33dbdb(0x130)](_0x4154c7,_0xb4d229,_0x50120c,_0x50f4ce,_0x4b718a[_0x33dbdb(0x124)]));try{await this['streamChat'](_0x4154c7,_0x1825a9,_0x59cc2c,_0x4faa90,_0x4b718a[_0x33dbdb(0x124)]);}catch(_0xd80fc8){const _0xd5fef0=_0xd80fc8 instanceof SDKError&&_0xd80fc8[_0x33dbdb(0xfb)]===ErrorCode[_0x33dbdb(0x100)]||_0xd80fc8 instanceof Error&&_0xd80fc8[_0x33dbdb(0x127)][_0x33dbdb(0xfc)](_0x33dbdb(0xfe));if(_0xd5fef0)_0x4b718a['verbose']&&console[_0x33dbdb(0x10d)](_0x33dbdb(0x106)),!_0x59cc2c&&(_0x59cc2c=await this[_0x33dbdb(0x130)](_0x4154c7,_0xb4d229,_0x50120c,_0x50f4ce,_0x4b718a['verbose'])),await this['streamChat'](_0x4154c7,_0x1825a9,_0x59cc2c,undefined,_0x4b718a['verbose']);else throw _0xd80fc8;}return console[_0x33dbdb(0xf8)](),0x0;}catch(_0x1b6966){return console[_0x33dbdb(0x10d)](),handleSDKError(_0x1b6966,_0x4b718a),0x1;}}[a10_0x46c4c3(0x10a)](_0x288de2){const _0x4d89a9=a10_0x46c4c3;if(_0x4d89a9(0x12d)in _0x288de2)process[_0x4d89a9(0x117)][_0x4d89a9(0x11d)](_0x288de2[_0x4d89a9(0x12d)]);else{if(_0x4d89a9(0x111)in _0x288de2)process['stderr'][_0x4d89a9(0x11d)](_0x4d89a9(0x123)+_0x288de2[_0x4d89a9(0x111)]['functionName']+']\x0a');else{if(_0x4d89a9(0x104)in _0x288de2)process[_0x4d89a9(0xff)][_0x4d89a9(0x11d)]('[Tool\x20result:\x20'+_0x288de2[_0x4d89a9(0x104)][_0x4d89a9(0x131)]+']\x0a');else{if(_0x4d89a9(0xfd)in _0x288de2)process[_0x4d89a9(0xff)][_0x4d89a9(0x11d)](_0x4d89a9(0x12a)+_0x288de2[_0x4d89a9(0xfd)][_0x4d89a9(0xfa)]+']\x0a'),process['stderr'][_0x4d89a9(0x11d)](_0x288de2[_0x4d89a9(0xfd)][_0x4d89a9(0x12d)]+'\x0a');else _0x4d89a9(0x10d)in _0x288de2&&process[_0x4d89a9(0xff)][_0x4d89a9(0x11d)](_0x4d89a9(0x113)+_0x288de2[_0x4d89a9(0x10d)]+']\x0a');}}}}}
1
+ const a10_0x2208a8=a10_0x236c;function a10_0x236c(_0x52969f,_0x315adc){const _0x429c85=a10_0x429c();return a10_0x236c=function(_0x236cb8,_0x3f03da){_0x236cb8=_0x236cb8-0x125;let _0x47beb6=_0x429c85[_0x236cb8];return _0x47beb6;},a10_0x236c(_0x52969f,_0x315adc);}(function(_0x1b9af4,_0x436251){const _0x2905b4=a10_0x236c,_0x4b534a=_0x1b9af4();while(!![]){try{const _0x2038bd=parseInt(_0x2905b4(0x132))/0x1*(-parseInt(_0x2905b4(0x150))/0x2)+parseInt(_0x2905b4(0x13d))/0x3+parseInt(_0x2905b4(0x131))/0x4*(parseInt(_0x2905b4(0x13c))/0x5)+-parseInt(_0x2905b4(0x153))/0x6+-parseInt(_0x2905b4(0x156))/0x7+-parseInt(_0x2905b4(0x128))/0x8+-parseInt(_0x2905b4(0x12a))/0x9*(-parseInt(_0x2905b4(0x125))/0xa);if(_0x2038bd===_0x436251)break;else _0x4b534a['push'](_0x4b534a['shift']());}catch(_0x4cc389){_0x4b534a['push'](_0x4b534a['shift']());}}}(a10_0x429c,0x4f0d3));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/errors.js';function a10_0x429c(){const _0x3a84e0=['handleSSEEvent','Error:\x20','[Tool\x20result:\x20','Continuing\x20chat:\x20','write','\x0a[Tool:\x20','haiku','streamChat','cause','output','llm','type','execute','getOrCreateDefaultAgent','resolveAgentId','1237398JqzSVZ','Resolving\x20agent\x20\x27','\x27...','3670320CdlnzX','Getting\x20agent\x20for\x20model\x20\x27','data','1350517MQijMZ','functionName','includes','\x0aStack\x20trace:','Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options','Resolving\x20project\x20\x27','Chat\x20session:\x20','stack','2907160LMGaVx','args','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)','942032EHwVrM','verbose','27whNLwf','join','tool','stderr','\x0a[Output:\x20','error','stdout','48FrChLc','1OQVAhU','new','validate','CHAT_NOT_FOUND','chatId','\x0a[Error:\x20','code','content','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','message','171655nCZbye','1742337ZaZlDN','getAgentId','tool_call','temperature'];a10_0x429c=function(){return _0x3a84e0;};return a10_0x429c();}import{withSpinner}from'../utils/spinner.js';import{parseAgentRef}from'../utils/agent-ref-parser.js';import{saveLastChatId,loadLastChatId}from'../utils/chat-cache.js';import{resolveModelAlias}from'../utils/model-aliases.js';function handleSDKError(_0xc8a917,_0x49a02e){const _0x4129ec=a10_0x236c;if(_0xc8a917 instanceof SDKError)console['error'](_0x4129ec(0x142)+_0xc8a917[_0x4129ec(0x13b)]),_0x49a02e[_0x4129ec(0x129)]&&(_0xc8a917[_0x4129ec(0x149)]&&console[_0x4129ec(0x12f)]('\x20\x20Cause:\x20'+_0xc8a917[_0x4129ec(0x149)]),_0xc8a917[_0x4129ec(0x15d)]&&(console[_0x4129ec(0x12f)](_0x4129ec(0x159)),console[_0x4129ec(0x12f)](_0xc8a917[_0x4129ec(0x15d)])));else throw _0xc8a917;}export class ChatCommand extends BaseCommand{['name']='chat';['description']=a10_0x2208a8(0x127);[a10_0x2208a8(0x134)](_0x1c39f7){const _0xc80d11=a10_0x2208a8,_0x450d57=_0x1c39f7[_0xc80d11(0x126)]['join']('\x20');if(!_0x450d57)return _0xc80d11(0x15a);return undefined;}async[a10_0x2208a8(0x148)](_0x380f8f,_0x36e4ff,_0x26b3b4,_0x5473dd,_0x22010a){const _0x269cac=a10_0x2208a8;for await(const _0x599e3a of _0x380f8f[_0x269cac(0x14b)]['chat'](_0x36e4ff,{'agentId':_0x26b3b4,'chatId':_0x5473dd})){if(_0x599e3a[_0x269cac(0x14c)]==='metadata'){const _0x10d548=_0x599e3a[_0x269cac(0x155)][_0x269cac(0x136)];saveLastChatId(_0x10d548),_0x22010a&&console[_0x269cac(0x12f)](_0x269cac(0x15c)+_0x10d548);}else _0x599e3a[_0x269cac(0x14c)]==='event'&&this[_0x269cac(0x141)](_0x599e3a[_0x269cac(0x155)]);}}async['getAgentId'](_0x29c2d6,_0x30c67b,_0x22a30a,_0xd6878a,_0x512174){const _0x4d1d3d=a10_0x2208a8;if(_0x30c67b){const {projectName:_0xec8e0,agentName:_0x1bba28}=parseAgentRef(_0x30c67b);if(!_0x1bba28)throw new Error('Agent\x20reference\x20must\x20include\x20project\x20name.\x20Usage:\x20--agent\x20\x22Project/Agent\x22');const _0x2c1dba=await withSpinner(_0x4d1d3d(0x15b)+_0xec8e0+_0x4d1d3d(0x152),()=>_0x29c2d6[_0x4d1d3d(0x14b)]['resolveProjectId'](_0xec8e0),{'verbose':_0x512174}),_0x219d2b=await withSpinner(_0x4d1d3d(0x151)+_0x1bba28+_0x4d1d3d(0x152),()=>_0x29c2d6[_0x4d1d3d(0x14b)][_0x4d1d3d(0x14f)](_0x1bba28,_0x2c1dba['data']),{'verbose':_0x512174});return _0x219d2b['data'];}else{const _0x1e609b=_0x22a30a||_0x4d1d3d(0x147),_0x18d446=resolveModelAlias(_0x1e609b),_0x5e06c1=await withSpinner(_0x4d1d3d(0x154)+_0x18d446+_0x4d1d3d(0x152),()=>_0x29c2d6[_0x4d1d3d(0x14b)][_0x4d1d3d(0x14e)](_0x18d446,_0xd6878a),{'verbose':_0x512174});return _0x5e06c1['data']['id'];}}async[a10_0x2208a8(0x14d)](_0x4365b9){const _0x4a5c1d=a10_0x2208a8,{options:_0x5b3c84,args:_0x568223,tdx:_0x30246}=_0x4365b9,_0x43f0cc=_0x568223[_0x4a5c1d(0x12b)]('\x20'),_0x576dcd=_0x5b3c84,_0x436dd8=_0x576dcd['agent'],_0x469cf9=_0x576dcd['model'],_0x5ead0b=_0x576dcd[_0x4a5c1d(0x140)]?Number(_0x576dcd[_0x4a5c1d(0x140)]):undefined,_0x64bed=_0x576dcd[_0x4a5c1d(0x133)];try{let _0x13f4ba,_0x380e2f;!_0x64bed&&(_0x380e2f=loadLastChatId(),_0x380e2f&&_0x5b3c84['verbose']&&console[_0x4a5c1d(0x12f)](_0x4a5c1d(0x144)+_0x380e2f));(_0x64bed||!_0x380e2f)&&(_0x13f4ba=await this[_0x4a5c1d(0x13e)](_0x30246,_0x436dd8,_0x469cf9,_0x5ead0b,_0x5b3c84[_0x4a5c1d(0x129)]));try{await this['streamChat'](_0x30246,_0x43f0cc,_0x13f4ba,_0x380e2f,_0x5b3c84[_0x4a5c1d(0x129)]);}catch(_0x16f039){const _0x21b200=_0x16f039 instanceof SDKError&&_0x16f039[_0x4a5c1d(0x138)]===ErrorCode[_0x4a5c1d(0x135)]||_0x16f039 instanceof Error&&_0x16f039[_0x4a5c1d(0x13b)][_0x4a5c1d(0x158)]('404');if(_0x21b200)_0x5b3c84[_0x4a5c1d(0x129)]&&console[_0x4a5c1d(0x12f)](_0x4a5c1d(0x13a)),!_0x13f4ba&&(_0x13f4ba=await this[_0x4a5c1d(0x13e)](_0x30246,_0x436dd8,_0x469cf9,_0x5ead0b,_0x5b3c84['verbose'])),await this['streamChat'](_0x30246,_0x43f0cc,_0x13f4ba,undefined,_0x5b3c84[_0x4a5c1d(0x129)]);else throw _0x16f039;}return console['log'](),0x0;}catch(_0xe553f3){return console['error'](),handleSDKError(_0xe553f3,_0x5b3c84),0x1;}}[a10_0x2208a8(0x141)](_0x3504a8){const _0x4d3b71=a10_0x2208a8;if(_0x4d3b71(0x139)in _0x3504a8)process[_0x4d3b71(0x130)]['write'](_0x3504a8[_0x4d3b71(0x139)]);else{if(_0x4d3b71(0x13f)in _0x3504a8)process[_0x4d3b71(0x12d)]['write'](_0x4d3b71(0x146)+_0x3504a8[_0x4d3b71(0x13f)][_0x4d3b71(0x157)]+']\x0a');else{if(_0x4d3b71(0x12c)in _0x3504a8)process[_0x4d3b71(0x12d)][_0x4d3b71(0x145)](_0x4d3b71(0x143)+_0x3504a8[_0x4d3b71(0x12c)][_0x4d3b71(0x157)]+']\x0a');else{if(_0x4d3b71(0x14a)in _0x3504a8)process[_0x4d3b71(0x12d)][_0x4d3b71(0x145)](_0x4d3b71(0x12e)+_0x3504a8[_0x4d3b71(0x14a)]['name']+']\x0a'),process[_0x4d3b71(0x12d)][_0x4d3b71(0x145)](_0x3504a8[_0x4d3b71(0x14a)][_0x4d3b71(0x139)]+'\x0a');else'error'in _0x3504a8&&process[_0x4d3b71(0x12d)]['write'](_0x4d3b71(0x137)+_0x3504a8[_0x4d3b71(0x12f)]+']\x0a');}}}}}
@@ -1 +1 @@
1
- const a11_0x4eff4b=a11_0x4860;(function(_0x37266e,_0x3178d3){const _0x20b77c=a11_0x4860,_0x4de974=_0x37266e();while(!![]){try{const _0x476997=parseInt(_0x20b77c(0xea))/0x1+parseInt(_0x20b77c(0xdf))/0x2+-parseInt(_0x20b77c(0xd5))/0x3*(parseInt(_0x20b77c(0xc8))/0x4)+-parseInt(_0x20b77c(0xd1))/0x5+parseInt(_0x20b77c(0xd0))/0x6+parseInt(_0x20b77c(0xec))/0x7+-parseInt(_0x20b77c(0xf0))/0x8*(parseInt(_0x20b77c(0xd3))/0x9);if(_0x476997===_0x3178d3)break;else _0x4de974['push'](_0x4de974['shift']());}catch(_0x1aa7c0){_0x4de974['push'](_0x4de974['shift']());}}}(a11_0x335a,0x6bc22));import{spawn}from'node:child_process';function a11_0x335a(){const _0x3751ad=['execute','✓\x20Settings\x20configured','server','inherit','12QjmVAq','description','✓\x20TD\x20LLM\x20proxy\x20server\x20stopped','llm','exit','stringify','green','stdout','4719660rmJGWo','1957865kvFQnW','model','234SCWZcN','findClaudePath','517623lAaiVN','cwd','Setting\x20up\x20project\x20and\x20agent...','debug','which','toString','ANTHROPIC_MODEL','sonnet','parse','Claude\x20Code\x20CLI\x20not\x20found','1235752vsJhBn','getOrCreateDefaultAgent','name','Initializing...','trim','text','getOrCreateDefaultProject','env','http://127.0.0.1:','ANTHROPIC_BASE_URL','originalEnv','565911HDbBHa','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy','5814473tZFiwK','✓\x20TD\x20LLM\x20proxy\x20running\x20on\x20port\x20','ANTHROPIC_AUTH_TOKEN','start','446296UwGBGI','Creating\x20.claude/settings.local.json...','log','verbose','settings.local.json','Starting\x20TD\x20LLM\x20proxy\x20server...','attributes','.claude','utf-8','message','Setup\x20failed','stop','Failed\x20to\x20launch\x20Claude\x20Code:\x20','fail','error','Finding\x20available\x20port...','claude','COMMAND_NOT_FOUND'];a11_0x335a=function(){return _0x3751ad;};return a11_0x335a();}import{readFile,writeFile,mkdir}from'node:fs/promises';import{existsSync}from'node:fs';import{join}from'node:path';import a11_0x4b054c from'chalk';import{BaseCommand}from'./command.js';function a11_0x4860(_0x28010f,_0x3f8f9c){const _0x335a7f=a11_0x335a();return a11_0x4860=function(_0x4860cd,_0x3847f5){_0x4860cd=_0x4860cd-0xc7;let _0x3e24ab=_0x335a7f[_0x4860cd];return _0x3e24ab;},a11_0x4860(_0x28010f,_0x3f8f9c);}import{ProxyServer}from'../proxy/server.js';import{findAvailablePort}from'../utils/port.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{resolveModelAlias}from'../utils/model-aliases.js';import{createCommandSpinner}from'../utils/spinner.js';async function createClaudeSettings(_0x44ccd0,_0x1a78c7=a11_0x4eff4b(0xdc)){const _0x40b03a=a11_0x4eff4b,_0x44f93d=join(process[_0x40b03a(0xd6)](),_0x40b03a(0xf7)),_0x22145a=join(_0x44f93d,_0x40b03a(0xf4));await mkdir(_0x44f93d,{'recursive':!![]});let _0x3511b7={};if(existsSync(_0x22145a))try{const _0x11be3c=await readFile(_0x22145a,_0x40b03a(0xf8));_0x3511b7=JSON[_0x40b03a(0xdd)](_0x11be3c);}catch{_0x3511b7={};}const _0x1f019d=_0x3511b7[_0x40b03a(0xe6)]||{},_0x2730a2={'ANTHROPIC_BASE_URL':_0x1f019d['ANTHROPIC_BASE_URL'],'ANTHROPIC_AUTH_TOKEN':_0x1f019d[_0x40b03a(0xee)],'ANTHROPIC_MODEL':_0x1f019d[_0x40b03a(0xdb)]},_0x23b103={..._0x3511b7,'env':{..._0x1f019d,'ANTHROPIC_BASE_URL':_0x40b03a(0xe7)+_0x44ccd0,'ANTHROPIC_AUTH_TOKEN':'dummy','ANTHROPIC_MODEL':_0x1a78c7}};return await writeFile(_0x22145a,JSON['stringify'](_0x23b103,null,0x2)+'\x0a'),_0x2730a2;}async function restoreClaudeSettings(_0x3601ac){const _0x14b745=a11_0x4eff4b,_0x5edc1d=join(process[_0x14b745(0xd6)](),_0x14b745(0xf7)),_0x5c56f5=join(_0x5edc1d,_0x14b745(0xf4));if(!existsSync(_0x5c56f5))return;try{const _0x2a0b86=await readFile(_0x5c56f5,_0x14b745(0xf8)),_0x372593=JSON[_0x14b745(0xdd)](_0x2a0b86),_0x3be176=_0x372593['env']||{};_0x3601ac[_0x14b745(0xe8)]!==undefined?_0x3be176[_0x14b745(0xe8)]=_0x3601ac[_0x14b745(0xe8)]:delete _0x3be176[_0x14b745(0xe8)],_0x3601ac['ANTHROPIC_AUTH_TOKEN']!==undefined?_0x3be176[_0x14b745(0xee)]=_0x3601ac[_0x14b745(0xee)]:delete _0x3be176[_0x14b745(0xee)],_0x3601ac['ANTHROPIC_MODEL']!==undefined?_0x3be176['ANTHROPIC_MODEL']=_0x3601ac['ANTHROPIC_MODEL']:delete _0x3be176['ANTHROPIC_MODEL'],_0x372593[_0x14b745(0xe6)]=_0x3be176,await writeFile(_0x5c56f5,JSON[_0x14b745(0xcd)](_0x372593,null,0x2)+'\x0a');}catch{}}export class ClaudeCommand extends BaseCommand{[a11_0x4eff4b(0xe1)]=a11_0x4eff4b(0x100);[a11_0x4eff4b(0xc9)]=a11_0x4eff4b(0xeb);[a11_0x4eff4b(0x104)];[a11_0x4eff4b(0xe9)];async[a11_0x4eff4b(0x102)](_0x33c39d){const _0x287533=a11_0x4eff4b,{tdx:_0x4c78f7,options:_0x34f694}=_0x33c39d;try{const _0x16e9de=_0x34f694,_0x1a35e7=_0x16e9de[_0x287533(0xd8)],_0x182056=_0x16e9de[_0x287533(0xd2)]||'sonnet',_0x356383=createCommandSpinner(_0x287533(0xe2),{'verbose':_0x34f694[_0x287533(0xf3)]});_0x356383[_0x287533(0xef)]();try{_0x356383[_0x287533(0xe4)]=_0x287533(0xff);const _0x14295e=await findAvailablePort(0xfa0);_0x356383['text']='✓\x20Port\x20'+_0x14295e,_0x356383[_0x287533(0xe4)]=_0x287533(0xd7);const _0x14b68c=await _0x4c78f7[_0x287533(0xcb)][_0x287533(0xe5)](),_0x23d0af=_0x14b68c['id'],_0x746fcd=resolveModelAlias(_0x182056),_0x120893=await _0x4c78f7[_0x287533(0xcb)][_0x287533(0xe0)](_0x746fcd),_0x599548=_0x120893['id'];_0x356383['text']='✓\x20Using\x20'+_0x120893[_0x287533(0xf6)][_0x287533(0xe1)],_0x356383[_0x287533(0xe4)]=_0x287533(0xf5),this[_0x287533(0x104)]=new ProxyServer({'port':_0x14295e,'projectId':_0x23d0af,'agentId':_0x599548,'tdx':_0x4c78f7,'debug':_0x1a35e7}),await this[_0x287533(0x104)][_0x287533(0xef)](),_0x356383[_0x287533(0xe4)]=_0x287533(0xed)+_0x14295e,_0x356383[_0x287533(0xe4)]=_0x287533(0xf1),this[_0x287533(0xe9)]=await createClaudeSettings(_0x14295e,_0x182056),_0x356383[_0x287533(0xe4)]=_0x287533(0x103),_0x356383[_0x287533(0xfb)]();}catch(_0x388cc4){_0x356383[_0x287533(0xfd)](_0x287533(0xfa));throw _0x388cc4;}const _0x32f78f=await this[_0x287533(0xd4)]();if(!_0x32f78f)throw new SDKError(ErrorCode[_0x287533(0x101)],_0x287533(0xde),undefined,{'helpText':'Please\x20install\x20Claude\x20Code\x20from\x20https://claude.com/claude-code'});const _0x121236=spawn(_0x32f78f,[],{'stdio':_0x287533(0xc7)}),_0x54bd92=await new Promise(_0x9696a2=>{const _0x5c4f39=_0x287533;_0x121236['on'](_0x5c4f39(0xcc),_0x2a55e3=>{_0x9696a2(_0x2a55e3||0x0);}),_0x121236['on']('error',_0x4c93e7=>{const _0x36fbf4=_0x5c4f39;console[_0x36fbf4(0xfe)](a11_0x4b054c['red'](_0x36fbf4(0xfc)+_0x4c93e7[_0x36fbf4(0xf9)])),_0x9696a2(0x1);});});return this[_0x287533(0x104)]&&(await this[_0x287533(0x104)][_0x287533(0xfb)](),console[_0x287533(0xf2)](a11_0x4b054c[_0x287533(0xce)](_0x287533(0xca)))),this[_0x287533(0xe9)]&&(await restoreClaudeSettings(this[_0x287533(0xe9)]),console[_0x287533(0xf2)](a11_0x4b054c[_0x287533(0xce)]('✓\x20Settings\x20restored'))),_0x54bd92;}catch(_0x3f7d30){this[_0x287533(0x104)]&&await this['server'][_0x287533(0xfb)]();this['originalEnv']&&await restoreClaudeSettings(this[_0x287533(0xe9)]);throw _0x3f7d30;}}async[a11_0x4eff4b(0xd4)](){return new Promise(_0x1263a9=>{const _0x1a138a=a11_0x4860,_0x119ad1=spawn(_0x1a138a(0xd9),[_0x1a138a(0x100)]);let _0x5c5fc5='';_0x119ad1[_0x1a138a(0xcf)]['on']('data',_0x387c28=>{const _0x4d3e52=_0x1a138a;_0x5c5fc5+=_0x387c28[_0x4d3e52(0xda)]();}),_0x119ad1['on'](_0x1a138a(0xcc),_0x154a03=>{const _0x41e0e5=_0x1a138a;_0x154a03===0x0&&_0x5c5fc5[_0x41e0e5(0xe3)]()?_0x1263a9(_0x5c5fc5['trim']()):_0x1263a9(_0x41e0e5(0x100));});});}}
1
+ function a11_0x3f63(_0x1e5618,_0x37e8e9){const _0x4dda0c=a11_0x4dda();return a11_0x3f63=function(_0x3f631b,_0x3010e5){_0x3f631b=_0x3f631b-0x137;let _0x7a9b9e=_0x4dda0c[_0x3f631b];return _0x7a9b9e;},a11_0x3f63(_0x1e5618,_0x37e8e9);}function a11_0x4dda(){const _0x31f437=['message','claude','10MaGtbp','Initializing...','5217381SeOUWM','✓\x20Settings\x20configured','46320FiEXQi','Starting\x20TD\x20LLM\x20proxy\x20server...','getOrCreateDefaultAgent','server','Setup\x20failed','6127360ECGIbv','originalEnv','Launch\x20Claude\x20Code\x20with\x20integrated\x20LLM\x20proxy','text','✓\x20TD\x20LLM\x20proxy\x20running\x20on\x20port\x20','error','env','145674atZIjy','ANTHROPIC_MODEL','Failed\x20to\x20launch\x20Claude\x20Code:\x20','settings.local.json','115GbreWt','llm','toString','ANTHROPIC_BASE_URL','cwd','trim','red','168Sbtaen','utf-8','1330499htHrKi','stringify','stop','stdout','model','ANTHROPIC_AUTH_TOKEN','✓\x20Using\x20','exit','verbose','getOrCreateDefaultProject','fail','Please\x20install\x20Claude\x20Code\x20from\x20https://claude.com/claude-code','parse','COMMAND_NOT_FOUND','name','Setting\x20up\x20project\x20and\x20agent...','log','10249337SQHnGI','start','inherit','1443256iWYjWU','findClaudePath','.claude'];a11_0x4dda=function(){return _0x31f437;};return a11_0x4dda();}const a11_0x52f490=a11_0x3f63;(function(_0x232d9c,_0x110522){const _0x298580=a11_0x3f63,_0x7dc2aa=_0x232d9c();while(!![]){try{const _0x498078=-parseInt(_0x298580(0x159))/0x1+parseInt(_0x298580(0x137))/0x2+-parseInt(_0x298580(0x140))/0x3*(-parseInt(_0x298580(0x157))/0x4)+parseInt(_0x298580(0x150))/0x5*(-parseInt(_0x298580(0x14c))/0x6)+parseInt(_0x298580(0x16a))/0x7+-parseInt(_0x298580(0x145))/0x8+-parseInt(_0x298580(0x13e))/0x9*(-parseInt(_0x298580(0x13c))/0xa);if(_0x498078===_0x110522)break;else _0x7dc2aa['push'](_0x7dc2aa['shift']());}catch(_0x12548c){_0x7dc2aa['push'](_0x7dc2aa['shift']());}}}(a11_0x4dda,0xb9584));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 a11_0x2b3515 from'chalk';import{BaseCommand}from'./command.js';import{ProxyServer}from'../proxy/server.js';import{findAvailablePort}from'../utils/port.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{resolveModelAlias}from'../utils/model-aliases.js';import{createCommandSpinner}from'../utils/spinner.js';async function createClaudeSettings(_0x421a5a,_0x21e7ba='sonnet'){const _0x95ad33=a11_0x3f63,_0x1d8037=join(process[_0x95ad33(0x154)](),_0x95ad33(0x139)),_0x59d8a5=join(_0x1d8037,'settings.local.json');await mkdir(_0x1d8037,{'recursive':!![]});let _0x4e2163={};if(existsSync(_0x59d8a5))try{const _0x2e1c2a=await readFile(_0x59d8a5,_0x95ad33(0x158));_0x4e2163=JSON[_0x95ad33(0x165)](_0x2e1c2a);}catch{_0x4e2163={};}const _0x43fb69=_0x4e2163[_0x95ad33(0x14b)]||{},_0x4f30cf={'ANTHROPIC_BASE_URL':_0x43fb69['ANTHROPIC_BASE_URL'],'ANTHROPIC_AUTH_TOKEN':_0x43fb69[_0x95ad33(0x15e)],'ANTHROPIC_MODEL':_0x43fb69[_0x95ad33(0x14d)]},_0x186210={..._0x4e2163,'env':{..._0x43fb69,'ANTHROPIC_BASE_URL':'http://127.0.0.1:'+_0x421a5a,'ANTHROPIC_AUTH_TOKEN':'dummy','ANTHROPIC_MODEL':_0x21e7ba}};return await writeFile(_0x59d8a5,JSON[_0x95ad33(0x15a)](_0x186210,null,0x2)+'\x0a'),_0x4f30cf;}async function restoreClaudeSettings(_0x4d7f51){const _0x271c64=a11_0x3f63,_0x5f0bba=join(process[_0x271c64(0x154)](),_0x271c64(0x139)),_0x30d368=join(_0x5f0bba,_0x271c64(0x14f));if(!existsSync(_0x30d368))return;try{const _0x2c4fd6=await readFile(_0x30d368,_0x271c64(0x158)),_0x561bb6=JSON[_0x271c64(0x165)](_0x2c4fd6),_0x428e04=_0x561bb6[_0x271c64(0x14b)]||{};_0x4d7f51['ANTHROPIC_BASE_URL']!==undefined?_0x428e04['ANTHROPIC_BASE_URL']=_0x4d7f51[_0x271c64(0x153)]:delete _0x428e04[_0x271c64(0x153)],_0x4d7f51[_0x271c64(0x15e)]!==undefined?_0x428e04['ANTHROPIC_AUTH_TOKEN']=_0x4d7f51['ANTHROPIC_AUTH_TOKEN']:delete _0x428e04[_0x271c64(0x15e)],_0x4d7f51[_0x271c64(0x14d)]!==undefined?_0x428e04[_0x271c64(0x14d)]=_0x4d7f51[_0x271c64(0x14d)]:delete _0x428e04[_0x271c64(0x14d)],_0x561bb6['env']=_0x428e04,await writeFile(_0x30d368,JSON[_0x271c64(0x15a)](_0x561bb6,null,0x2)+'\x0a');}catch{}}export class ClaudeCommand extends BaseCommand{[a11_0x52f490(0x167)]=a11_0x52f490(0x13b);['description']=a11_0x52f490(0x147);[a11_0x52f490(0x143)];[a11_0x52f490(0x146)];async['execute'](_0x2ceb52){const _0x44617c=a11_0x52f490,{tdx:_0x5c05dc,options:_0x3574ae}=_0x2ceb52;try{const _0x2abeff=_0x3574ae,_0x55f68b=_0x2abeff['debug'],_0x34393d=_0x2abeff[_0x44617c(0x15d)]||'sonnet',_0x666950=createCommandSpinner(_0x44617c(0x13d),{'verbose':_0x3574ae[_0x44617c(0x161)]});_0x666950[_0x44617c(0x16b)]();try{_0x666950[_0x44617c(0x148)]='Finding\x20available\x20port...';const _0x26bc90=await findAvailablePort(0xfa0);_0x666950[_0x44617c(0x148)]='✓\x20Port\x20'+_0x26bc90,_0x666950[_0x44617c(0x148)]=_0x44617c(0x168);const _0x568bd5=await _0x5c05dc[_0x44617c(0x151)][_0x44617c(0x162)](),_0x40598f=_0x568bd5['id'],_0x16a0c8=resolveModelAlias(_0x34393d),_0x3ba66f=await _0x5c05dc['llm'][_0x44617c(0x142)](_0x16a0c8),_0x3b2c87=_0x3ba66f['id'];_0x666950[_0x44617c(0x148)]=_0x44617c(0x15f)+_0x3ba66f['attributes']['name'],_0x666950[_0x44617c(0x148)]=_0x44617c(0x141),this['server']=new ProxyServer({'port':_0x26bc90,'projectId':_0x40598f,'agentId':_0x3b2c87,'tdx':_0x5c05dc,'debug':_0x55f68b}),await this['server']['start'](),_0x666950[_0x44617c(0x148)]=_0x44617c(0x149)+_0x26bc90,_0x666950[_0x44617c(0x148)]='Creating\x20.claude/settings.local.json...',this[_0x44617c(0x146)]=await createClaudeSettings(_0x26bc90,_0x34393d),_0x666950['text']=_0x44617c(0x13f),_0x666950[_0x44617c(0x15b)]();}catch(_0x1931f6){_0x666950[_0x44617c(0x163)](_0x44617c(0x144));throw _0x1931f6;}const _0x47720e=await this[_0x44617c(0x138)]();if(!_0x47720e)throw new SDKError(ErrorCode[_0x44617c(0x166)],'Claude\x20Code\x20CLI\x20not\x20found',undefined,{'helpText':_0x44617c(0x164)});const _0x846df7=spawn(_0x47720e,[],{'stdio':_0x44617c(0x16c)}),_0x313493=await new Promise(_0x3cc444=>{const _0x24583a=_0x44617c;_0x846df7['on'](_0x24583a(0x160),_0x4de894=>{_0x3cc444(_0x4de894||0x0);}),_0x846df7['on'](_0x24583a(0x14a),_0x556cf7=>{const _0xc4782e=_0x24583a;console['error'](a11_0x2b3515[_0xc4782e(0x156)](_0xc4782e(0x14e)+_0x556cf7[_0xc4782e(0x13a)])),_0x3cc444(0x1);});});return this['server']&&(await this[_0x44617c(0x143)][_0x44617c(0x15b)](),console[_0x44617c(0x169)](a11_0x2b3515['green']('✓\x20TD\x20LLM\x20proxy\x20server\x20stopped'))),this[_0x44617c(0x146)]&&(await restoreClaudeSettings(this[_0x44617c(0x146)]),console[_0x44617c(0x169)](a11_0x2b3515['green']('✓\x20Settings\x20restored'))),_0x313493;}catch(_0x5e073b){this[_0x44617c(0x143)]&&await this['server'][_0x44617c(0x15b)]();this[_0x44617c(0x146)]&&await restoreClaudeSettings(this[_0x44617c(0x146)]);throw _0x5e073b;}}async[a11_0x52f490(0x138)](){return new Promise(_0x2a8064=>{const _0x1a315f=a11_0x3f63,_0x185e4a=spawn('which',[_0x1a315f(0x13b)]);let _0x3aa6fe='';_0x185e4a[_0x1a315f(0x15c)]['on']('data',_0x41ef89=>{const _0x13f1c5=_0x1a315f;_0x3aa6fe+=_0x41ef89[_0x13f1c5(0x152)]();}),_0x185e4a['on'](_0x1a315f(0x160),_0x50b7a1=>{const _0x2788da=_0x1a315f;_0x50b7a1===0x0&&_0x3aa6fe[_0x2788da(0x155)]()?_0x2a8064(_0x3aa6fe[_0x2788da(0x155)]()):_0x2a8064(_0x2788da(0x13b));});});}}
@@ -1 +1 @@
1
- const a12_0x1eeff2=a12_0x46eb;(function(_0x44ae3d,_0x48ae3f){const _0x5805e6=a12_0x46eb,_0x319bc2=_0x44ae3d();while(!![]){try{const _0x448d73=parseInt(_0x5805e6(0xbe))/0x1*(-parseInt(_0x5805e6(0xcd))/0x2)+-parseInt(_0x5805e6(0xd2))/0x3*(-parseInt(_0x5805e6(0xcb))/0x4)+parseInt(_0x5805e6(0xba))/0x5*(-parseInt(_0x5805e6(0xb3))/0x6)+-parseInt(_0x5805e6(0xb8))/0x7+parseInt(_0x5805e6(0xb6))/0x8+parseInt(_0x5805e6(0xbc))/0x9*(parseInt(_0x5805e6(0xb4))/0xa)+parseInt(_0x5805e6(0xb5))/0xb;if(_0x448d73===_0x48ae3f)break;else _0x319bc2['push'](_0x319bc2['shift']());}catch(_0x9e23c5){_0x319bc2['push'](_0x319bc2['shift']());}}}(a12_0xa010,0x8155b));function a12_0x46eb(_0x6b6fa3,_0x2c9692){const _0xa01061=a12_0xa010();return a12_0x46eb=function(_0x46eb30,_0x28e54f){_0x46eb30=_0x46eb30-0xb2;let _0x449c2=_0xa01061[_0x46eb30];return _0x449c2;},a12_0x46eb(_0x6b6fa3,_0x2c9692);}import{validateLimitOption}from'../utils/option-validation.js';export class BaseCommand{['validateGlobalOptions'](_0x5a31bf){const _0x1a3c5d=a12_0x46eb,{options:_0x511825}=_0x5a31bf,_0x2d092b=_0x511825['limit'],_0x61937a=_0x2d092b!==undefined?typeof _0x2d092b==='number'?_0x2d092b:parseInt(_0x2d092b,0xa):0x28;if(isNaN(_0x61937a))return _0x1a3c5d(0xca)+_0x2d092b+_0x1a3c5d(0xcc);const _0x2ac973=validateLimitOption(_0x61937a);if(!_0x2ac973[_0x1a3c5d(0xd4)])return _0x2ac973[_0x1a3c5d(0xc5)];return _0x5a31bf[_0x1a3c5d(0xb2)][_0x1a3c5d(0xbb)]=_0x2ac973['value'],undefined;}[a12_0x1eeff2(0xc6)](_0x168204){return undefined;}async[a12_0x1eeff2(0xc1)](_0x44b7d0){const _0x55b1ad=a12_0x1eeff2;try{const _0x43db5e=this[_0x55b1ad(0xc2)](_0x44b7d0);if(_0x43db5e)return console[_0x55b1ad(0xc5)](_0x55b1ad(0xbd)+_0x43db5e),0x1;const _0x3ba909=this['validate'](_0x44b7d0);if(_0x3ba909){const _0x48f184=/^\s*(Usage|Note|Warning|Error):/i[_0x55b1ad(0xbf)](_0x3ba909);return _0x48f184?console[_0x55b1ad(0xc5)](_0x3ba909):console[_0x55b1ad(0xc5)](_0x55b1ad(0xbd)+_0x3ba909),0x1;}const _0x4b421c=await this[_0x55b1ad(0xc3)](_0x44b7d0);return _0x4b421c??0x0;}catch(_0x11d7dd){if(_0x11d7dd instanceof Error){console[_0x55b1ad(0xc5)]('Error:\x20'+_0x11d7dd[_0x55b1ad(0xc9)]);const _0x24b401=_0x11d7dd;_0x24b401[_0x55b1ad(0xd3)]&&console['error'](_0x24b401[_0x55b1ad(0xd3)]),_0x11d7dd[_0x55b1ad(0xd1)]&&console[_0x55b1ad(0xc5)](_0x55b1ad(0xc8)+_0x11d7dd[_0x55b1ad(0xd1)]);}else console[_0x55b1ad(0xc5)]('Error:\x20'+String(_0x11d7dd));return 0x1;}}}function a12_0xa010(){const _0x45f352=['Error:\x20','680423eklopm','test','name','run','validateGlobalOptions','execute','register','error','validate','Command\x20\x27','\x0aStack\x20trace:\x0a','message','Invalid\x20limit\x20value:\x20','16804DBIzZV','.\x20Must\x20be\x20a\x20number.','2wbQyem','from','\x27\x20is\x20already\x20registered','getAll','stack','477moHkZS','helpText','isValid','options','91410VWwqVx','681950dPhLuv','1203587saNlqu','6664984vIiFCn','has','3624957fTKxIp','commands','230yQHDAQ','limit','108AQPDOs'];a12_0xa010=function(){return _0x45f352;};return a12_0xa010();}export class CommandRegistry{[a12_0x1eeff2(0xb9)]=new Map();[a12_0x1eeff2(0xc4)](_0x58df3a){const _0x17a0da=a12_0x1eeff2;if(this[_0x17a0da(0xb9)][_0x17a0da(0xb7)](_0x58df3a[_0x17a0da(0xc0)]))throw new Error(_0x17a0da(0xc7)+_0x58df3a[_0x17a0da(0xc0)]+_0x17a0da(0xcf));this['commands']['set'](_0x58df3a[_0x17a0da(0xc0)],_0x58df3a);}['get'](_0x135863){const _0x1cfa06=a12_0x1eeff2;return this[_0x1cfa06(0xb9)]['get'](_0x135863);}[a12_0x1eeff2(0xd0)](){const _0x2c2d9c=a12_0x1eeff2;return Array[_0x2c2d9c(0xce)](this[_0x2c2d9c(0xb9)]['values']());}['has'](_0x326995){const _0x165dd5=a12_0x1eeff2;return this[_0x165dd5(0xb9)][_0x165dd5(0xb7)](_0x326995);}}export const registry=new CommandRegistry();
1
+ const a12_0x336b9e=a12_0x5c77;(function(_0x4b843d,_0x5a4818){const _0x523669=a12_0x5c77,_0x2cfa09=_0x4b843d();while(!![]){try{const _0x55d492=-parseInt(_0x523669(0xde))/0x1*(-parseInt(_0x523669(0xf0))/0x2)+parseInt(_0x523669(0xe7))/0x3+parseInt(_0x523669(0xeb))/0x4+-parseInt(_0x523669(0xe6))/0x5+-parseInt(_0x523669(0xf3))/0x6+-parseInt(_0x523669(0xd3))/0x7*(parseInt(_0x523669(0xdb))/0x8)+parseInt(_0x523669(0xec))/0x9*(parseInt(_0x523669(0xe8))/0xa);if(_0x55d492===_0x5a4818)break;else _0x2cfa09['push'](_0x2cfa09['shift']());}catch(_0x1b05c4){_0x2cfa09['push'](_0x2cfa09['shift']());}}}(a12_0x4596,0x8d069));import{validateLimitOption}from'../utils/option-validation.js';export class BaseCommand{[a12_0x336b9e(0xed)](_0xf7ee85){const _0x16ee73=a12_0x336b9e,{options:_0x5aa96f}=_0xf7ee85,_0x258680=_0x5aa96f['limit'],_0x14a6fe=_0x258680!==undefined?typeof _0x258680===_0x16ee73(0xea)?_0x258680:parseInt(_0x258680,0xa):0x28;if(isNaN(_0x14a6fe))return _0x16ee73(0xd2)+_0x258680+'.\x20Must\x20be\x20a\x20number.';const _0x4e8e90=validateLimitOption(_0x14a6fe);if(!_0x4e8e90['isValid'])return _0x4e8e90['error'];return _0xf7ee85[_0x16ee73(0xda)][_0x16ee73(0xd9)]=_0x4e8e90[_0x16ee73(0xe0)],undefined;}[a12_0x336b9e(0xd8)](_0xcaa2ff){return undefined;}async[a12_0x336b9e(0xe4)](_0x5d3253){const _0xb31a3=a12_0x336b9e;try{const _0x5ac082=this[_0xb31a3(0xed)](_0x5d3253);if(_0x5ac082)return console[_0xb31a3(0xf1)](_0xb31a3(0xd6)+_0x5ac082),0x1;const _0x5b34e4=this['validate'](_0x5d3253);if(_0x5b34e4){const _0x196f84=/^\s*(Usage|Note|Warning|Error):/i[_0xb31a3(0xe5)](_0x5b34e4);return _0x196f84?console[_0xb31a3(0xf1)](_0x5b34e4):console['error'](_0xb31a3(0xd6)+_0x5b34e4),0x1;}const _0x431ba1=await this[_0xb31a3(0xd5)](_0x5d3253);return _0x431ba1??0x0;}catch(_0x1d0010){if(_0x1d0010 instanceof Error){console['error']('Error:\x20'+_0x1d0010[_0xb31a3(0xe2)]);const _0x5ccc21=_0x1d0010;_0x5ccc21[_0xb31a3(0xef)]&&console['error'](_0x5ccc21['helpText']),_0x1d0010[_0xb31a3(0xee)]&&console['error'](_0xb31a3(0xd7)+_0x1d0010['stack']);}else console[_0xb31a3(0xf1)](_0xb31a3(0xd6)+String(_0x1d0010));return 0x1;}}}function a12_0x4596(){const _0x2de9e9=['105144SufngI','30726wbUuIJ','validateGlobalOptions','stack','helpText','4dCuxgg','error','Command\x20\x27','5843526gaTRkM','Invalid\x20limit\x20value:\x20','34853tYtJYN','\x27\x20is\x20already\x20registered','execute','Error:\x20','\x0aStack\x20trace:\x0a','validate','limit','options','752cGttgW','name','get','275210sbnxZn','getAll','value','register','message','has','run','test','3717140oWfWtf','680022CWaxkS','5740CsSryg','commands','number'];a12_0x4596=function(){return _0x2de9e9;};return a12_0x4596();}export class CommandRegistry{[a12_0x336b9e(0xe9)]=new Map();[a12_0x336b9e(0xe1)](_0x1a3720){const _0x43087e=a12_0x336b9e;if(this[_0x43087e(0xe9)][_0x43087e(0xe3)](_0x1a3720[_0x43087e(0xdc)]))throw new Error(_0x43087e(0xf2)+_0x1a3720[_0x43087e(0xdc)]+_0x43087e(0xd4));this[_0x43087e(0xe9)]['set'](_0x1a3720[_0x43087e(0xdc)],_0x1a3720);}[a12_0x336b9e(0xdd)](_0x58874c){const _0x528315=a12_0x336b9e;return this[_0x528315(0xe9)][_0x528315(0xdd)](_0x58874c);}[a12_0x336b9e(0xdf)](){const _0x3f151e=a12_0x336b9e;return Array['from'](this[_0x3f151e(0xe9)]['values']());}[a12_0x336b9e(0xe3)](_0x31c6ae){const _0x35e520=a12_0x336b9e;return this[_0x35e520(0xe9)][_0x35e520(0xe3)](_0x31c6ae);}}function a12_0x5c77(_0x4d7cb0,_0x5325cb){const _0x45962d=a12_0x4596();return a12_0x5c77=function(_0x5c77b2,_0x2c1cfc){_0x5c77b2=_0x5c77b2-0xd2;let _0x112895=_0x45962d[_0x5c77b2];return _0x112895;},a12_0x5c77(_0x4d7cb0,_0x5325cb);}export const registry=new CommandRegistry();
@@ -1 +1 @@
1
- const a13_0x4310f9=a13_0x296e;(function(_0x2abf86,_0x1a505e){const _0x44d6dc=a13_0x296e,_0x485d90=_0x2abf86();while(!![]){try{const _0x1e5cd1=-parseInt(_0x44d6dc(0xe7))/0x1*(-parseInt(_0x44d6dc(0xe2))/0x2)+parseInt(_0x44d6dc(0xd5))/0x3*(-parseInt(_0x44d6dc(0xd3))/0x4)+-parseInt(_0x44d6dc(0xe0))/0x5+-parseInt(_0x44d6dc(0xe5))/0x6*(-parseInt(_0x44d6dc(0xd2))/0x7)+parseInt(_0x44d6dc(0xe4))/0x8+parseInt(_0x44d6dc(0xda))/0x9*(parseInt(_0x44d6dc(0xe6))/0xa)+parseInt(_0x44d6dc(0xdb))/0xb*(-parseInt(_0x44d6dc(0xdf))/0xc);if(_0x1e5cd1===_0x1a505e)break;else _0x485d90['push'](_0x485d90['shift']());}catch(_0x5dc1ff){_0x485d90['push'](_0x485d90['shift']());}}}(a13_0x7567,0x4246a));function a13_0x7567(){const _0xc3417d=['description','20331MgfDFI','49126HqUzOr','message','log','clear','1416Vclomz','2412160YuUQiO','Error:\x20','2gtDMRr','Session\x20context\x20cleared\x20(session:\x20','3206600oZeKJE','1689414cFfDoK','1170CPZDtP','483669RZdwjP','displayWithSources','error','name','7ioQuwV','32zLsrYA','Show\x20current\x20resolved\x20context','56055vMTceM','toString','context','session'];a13_0x7567=function(){return _0xc3417d;};return a13_0x7567();}import{BaseCommand}from'./command.js';import{GlobalContext}from'../core/global-context.js';import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';function a13_0x296e(_0x4e08b0,_0x1683b5){const _0x75677f=a13_0x7567();return a13_0x296e=function(_0x296e86,_0x1e5c24){_0x296e86=_0x296e86-0xd2;let _0x15bf85=_0x75677f[_0x296e86];return _0x15bf85;},a13_0x296e(_0x4e08b0,_0x1683b5);}export class ContextCommand extends BaseCommand{[a13_0x4310f9(0xea)]=a13_0x4310f9(0xd7);[a13_0x4310f9(0xd9)]=a13_0x4310f9(0xd4);async['execute'](_0x3e8def){const _0xbdc42=a13_0x4310f9,{options:_0xbd93e3}=_0x3e8def,_0x49c0c6=_0xbd93e3['debug'],_0x4b8ca2=_0xbd93e3[_0xbdc42(0xde)];cleanExpiredSessions();try{if(_0x4b8ca2){clearSessionContext(_0xbd93e3[_0xbdc42(0xd8)]);const _0x5333e8=_0xbd93e3[_0xbdc42(0xd8)]||getCurrentSessionPID()[_0xbdc42(0xd6)]();return console[_0xbdc42(0xdd)](_0xbdc42(0xe3)+_0x5333e8+')'),0x0;}const _0x7d3792=new GlobalContext(_0xbd93e3);return _0x49c0c6?_0x7d3792[_0xbdc42(0xe8)]():_0x7d3792['display'](),0x0;}catch(_0x368ac3){return _0x368ac3 instanceof Error&&console[_0xbdc42(0xe9)](_0xbdc42(0xe1)+_0x368ac3[_0xbdc42(0xdc)]),0x1;}}}
1
+ const a13_0x31c2e5=a13_0x5111;(function(_0x53639c,_0x25b221){const _0x4f10c9=a13_0x5111,_0x238683=_0x53639c();while(!![]){try{const _0x43804a=parseInt(_0x4f10c9(0xaf))/0x1+parseInt(_0x4f10c9(0x9f))/0x2+-parseInt(_0x4f10c9(0xab))/0x3*(parseInt(_0x4f10c9(0xb1))/0x4)+parseInt(_0x4f10c9(0xaa))/0x5*(-parseInt(_0x4f10c9(0xa7))/0x6)+-parseInt(_0x4f10c9(0xb3))/0x7*(parseInt(_0x4f10c9(0xb0))/0x8)+-parseInt(_0x4f10c9(0xb4))/0x9+-parseInt(_0x4f10c9(0xb2))/0xa*(-parseInt(_0x4f10c9(0x9e))/0xb);if(_0x43804a===_0x25b221)break;else _0x238683['push'](_0x238683['shift']());}catch(_0x2fb2ce){_0x238683['push'](_0x238683['shift']());}}}(a13_0x45a0,0xa03f4));function a13_0x45a0(){const _0x3b1de9=['session','name','435815fmhEcb','552bnHfgY','4894616CDDlTn','10ZMXTJs','110341okHgSQ','8318187NNfXWE','38915811cKRbAH','1786982vYdfbD','toString','Show\x20current\x20resolved\x20context','Error:\x20','Session\x20context\x20cleared\x20(session:\x20','message','debug','clear','42RuADoF','execute','description','696565HWsFGM','3yUuVIh','displayWithSources'];a13_0x45a0=function(){return _0x3b1de9;};return a13_0x45a0();}import{BaseCommand}from'./command.js';import{GlobalContext}from'../core/global-context.js';function a13_0x5111(_0x1afe22,_0x2b6923){const _0x45a07f=a13_0x45a0();return a13_0x5111=function(_0x5111a6,_0xc2b84){_0x5111a6=_0x5111a6-0x9e;let _0x5c7599=_0x45a07f[_0x5111a6];return _0x5c7599;},a13_0x5111(_0x1afe22,_0x2b6923);}import{cleanExpiredSessions,clearSessionContext,getCurrentSessionPID}from'../core/session.js';export class ContextCommand extends BaseCommand{[a13_0x31c2e5(0xae)]='context';[a13_0x31c2e5(0xa9)]=a13_0x31c2e5(0xa1);async[a13_0x31c2e5(0xa8)](_0x4cc80d){const _0x82fffc=a13_0x31c2e5,{options:_0x470a15}=_0x4cc80d,_0x428692=_0x470a15[_0x82fffc(0xa5)],_0x1f3c17=_0x470a15[_0x82fffc(0xa6)];cleanExpiredSessions();try{if(_0x1f3c17){clearSessionContext(_0x470a15[_0x82fffc(0xad)]);const _0x3dcb5d=_0x470a15['session']||getCurrentSessionPID()[_0x82fffc(0xa0)]();return console['log'](_0x82fffc(0xa3)+_0x3dcb5d+')'),0x0;}const _0x1ad836=new GlobalContext(_0x470a15);return _0x428692?_0x1ad836[_0x82fffc(0xac)]():_0x1ad836['display'](),0x0;}catch(_0x17e722){return _0x17e722 instanceof Error&&console['error'](_0x82fffc(0xa2)+_0x17e722[_0x82fffc(0xa4)]),0x1;}}}
@@ -1 +1 @@
1
- function a14_0x14f1(_0x27895e,_0x388f37){const _0x100cb2=a14_0x100c();return a14_0x14f1=function(_0x14f1c2,_0x3ab67f){_0x14f1c2=_0x14f1c2-0x1c8;let _0x2adced=_0x100cb2[_0x14f1c2];return _0x2adced;},a14_0x14f1(_0x27895e,_0x388f37);}const a14_0x1c6b1e=a14_0x14f1;(function(_0xf16a72,_0x3acd24){const _0x1da2ed=a14_0x14f1,_0x13f91d=_0xf16a72();while(!![]){try{const _0x3bf313=-parseInt(_0x1da2ed(0x1e0))/0x1*(-parseInt(_0x1da2ed(0x1d0))/0x2)+-parseInt(_0x1da2ed(0x1de))/0x3+parseInt(_0x1da2ed(0x1d9))/0x4+-parseInt(_0x1da2ed(0x1d5))/0x5*(-parseInt(_0x1da2ed(0x1cd))/0x6)+parseInt(_0x1da2ed(0x1db))/0x7+-parseInt(_0x1da2ed(0x1d6))/0x8*(-parseInt(_0x1da2ed(0x1d2))/0x9)+-parseInt(_0x1da2ed(0x1dd))/0xa;if(_0x3bf313===_0x3acd24)break;else _0x13f91d['push'](_0x13f91d['shift']());}catch(_0x144a02){_0x13f91d['push'](_0x13f91d['shift']());}}}(a14_0x100c,0xe7b66));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a14_0x100c(){const _0x166ae0=['execute','7187796wKSLIO','✔\x20Found\x20','28458730lIhKXk','2299089mmoecW','error','1bEygWn','length','Site:\x20','databases','\x20\x20Cause:\x20','Listing\x20databases...','234LYmkCE','message','verbose','1235140rTEEpn','list','846dHscrq','cause','database','159135MFaaCl','111032awRPBO','\x20database','Pattern:\x20','1484212ufPgYr'];a14_0x100c=function(){return _0x166ae0;};return a14_0x100c();}import{withSpinner}from'../utils/spinner.js';export class DatabasesCommand extends BaseCommand{['name']=a14_0x1c6b1e(0x1ca);['description']='List\x20all\x20databases';async[a14_0x1c6b1e(0x1da)](_0x21a3bf){const _0x1a281f=a14_0x1c6b1e,{options:_0x3f2908,args:_0x1f4382,tdx:_0x3159a0}=_0x21a3bf,_0x11bbb1=_0x1f4382[0x0];try{_0x3f2908[_0x1a281f(0x1cf)]&&(console[_0x1a281f(0x1df)](_0x1a281f(0x1c9)+_0x3f2908['site']),_0x11bbb1&&console[_0x1a281f(0x1df)](_0x1a281f(0x1d8)+_0x11bbb1));const _0x47deb4=await withSpinner(_0x1a281f(0x1cc),()=>_0x3159a0[_0x1a281f(0x1d4)][_0x1a281f(0x1d1)](_0x11bbb1),{'verbose':_0x3f2908['verbose']}),_0x47f10f=_0x47deb4['data'];return console[_0x1a281f(0x1df)](_0x1a281f(0x1dc)+_0x47f10f[_0x1a281f(0x1c8)]+_0x1a281f(0x1d7)+(_0x47f10f[_0x1a281f(0x1c8)]!==0x1?'s':'')),await handleSDKOutput(_0x47f10f,_0x3f2908),0x0;}catch(_0x44753d){if(_0x44753d instanceof SDKError)return console[_0x1a281f(0x1df)]('Error:\x20'+_0x44753d[_0x1a281f(0x1ce)]),_0x44753d[_0x1a281f(0x1d3)]&&console[_0x1a281f(0x1df)](_0x1a281f(0x1cb)+_0x44753d[_0x1a281f(0x1d3)]),0x1;throw _0x44753d;}}}
1
+ function a14_0x2b20(){const _0x6b2502=['Listing\x20databases...','name','1388313MaZLyD','list','365084Xdfglb','databases','123PgXhDa','\x20database','data','site','2370SLtzRL','Pattern:\x20','Error:\x20','message','error','\x20\x20Cause:\x20','8890416qCkLpM','21ueDzOP','102692WGSMIZ','Site:\x20','14010MblNhp','List\x20all\x20databases','execute','verbose','database','18711480QtJoya','3033608jmQGqq'];a14_0x2b20=function(){return _0x6b2502;};return a14_0x2b20();}function a14_0x154c(_0x2a6e83,_0x32a8a4){const _0x2b2060=a14_0x2b20();return a14_0x154c=function(_0x154c5a,_0x2ff675){_0x154c5a=_0x154c5a-0x68;let _0x18ef6c=_0x2b2060[_0x154c5a];return _0x18ef6c;},a14_0x154c(_0x2a6e83,_0x32a8a4);}const a14_0x2270c3=a14_0x154c;(function(_0xef29cb,_0x20adb3){const _0x43246d=a14_0x154c,_0x278b20=_0xef29cb();while(!![]){try{const _0x9f3e85=-parseInt(_0x43246d(0x72))/0x1+parseInt(_0x43246d(0x74))/0x2+parseInt(_0x43246d(0x76))/0x3*(parseInt(_0x43246d(0x82))/0x4)+-parseInt(_0x43246d(0x7a))/0x5*(-parseInt(_0x43246d(0x69))/0x6)+-parseInt(_0x43246d(0x81))/0x7*(parseInt(_0x43246d(0x6f))/0x8)+-parseInt(_0x43246d(0x80))/0x9+parseInt(_0x43246d(0x6e))/0xa;if(_0x9f3e85===_0x20adb3)break;else _0x278b20['push'](_0x278b20['shift']());}catch(_0x556b2e){_0x278b20['push'](_0x278b20['shift']());}}}(a14_0x2b20,0xaabc5));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';export class DatabasesCommand extends BaseCommand{[a14_0x2270c3(0x71)]=a14_0x2270c3(0x75);['description']=a14_0x2270c3(0x6a);async[a14_0x2270c3(0x6b)](_0x46d613){const _0x4d2b72=a14_0x2270c3,{options:_0x156d51,args:_0x42a754,tdx:_0x2044a6}=_0x46d613,_0x997488=_0x42a754[0x0];try{_0x156d51[_0x4d2b72(0x6c)]&&(console[_0x4d2b72(0x7e)](_0x4d2b72(0x68)+_0x156d51[_0x4d2b72(0x79)]),_0x997488&&console[_0x4d2b72(0x7e)](_0x4d2b72(0x7b)+_0x997488));const _0x1a4894=await withSpinner(_0x4d2b72(0x70),()=>_0x2044a6[_0x4d2b72(0x6d)][_0x4d2b72(0x73)](_0x997488),{'verbose':_0x156d51[_0x4d2b72(0x6c)]}),_0x1d8ae7=_0x1a4894[_0x4d2b72(0x78)];return console[_0x4d2b72(0x7e)]('✔\x20Found\x20'+_0x1d8ae7['length']+_0x4d2b72(0x77)+(_0x1d8ae7['length']!==0x1?'s':'')),await handleSDKOutput(_0x1d8ae7,_0x156d51),0x0;}catch(_0x3dad38){if(_0x3dad38 instanceof SDKError)return console[_0x4d2b72(0x7e)](_0x4d2b72(0x7c)+_0x3dad38[_0x4d2b72(0x7d)]),_0x3dad38['cause']&&console[_0x4d2b72(0x7e)](_0x4d2b72(0x7f)+_0x3dad38['cause']),0x1;throw _0x3dad38;}}}
@@ -1 +1 @@
1
- const a15_0x98b91e=a15_0x2a7b;(function(_0x49cdea,_0x411086){const _0x5b65a9=a15_0x2a7b,_0x507666=_0x49cdea();while(!![]){try{const _0x48e7ff=parseInt(_0x5b65a9(0xd9))/0x1+-parseInt(_0x5b65a9(0xc7))/0x2*(-parseInt(_0x5b65a9(0xd6))/0x3)+parseInt(_0x5b65a9(0xc6))/0x4+-parseInt(_0x5b65a9(0xc2))/0x5*(parseInt(_0x5b65a9(0xba))/0x6)+-parseInt(_0x5b65a9(0xb9))/0x7*(parseInt(_0x5b65a9(0xbd))/0x8)+-parseInt(_0x5b65a9(0xc8))/0x9+-parseInt(_0x5b65a9(0xcb))/0xa*(-parseInt(_0x5b65a9(0xd3))/0xb);if(_0x48e7ff===_0x411086)break;else _0x507666['push'](_0x507666['shift']());}catch(_0x3cbc51){_0x507666['push'](_0x507666['shift']());}}}(a15_0x4404,0x87784));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a15_0x2a7b(_0x2e7dd5,_0x37034e){const _0x4404bb=a15_0x4404();return a15_0x2a7b=function(_0x2a7bc5,_0x326024){_0x2a7bc5=_0x2a7bc5-0xb8;let _0x3b9f35=_0x4404bb[_0x2a7bc5];return _0x3b9f35;},a15_0x2a7b(_0x2e7dd5,_0x37034e);}import{handleSDKOutput}from'../utils/command-output.js';function a15_0x4404(){const _0x477200=['✔\x20Found\x20','11VkmkWY','message','Error:\x20','3BFvSPf','\x20in\x20','database','778994IHwVwD','Database:\x20','name','\x27\x20does\x20not\x20exist','args','data','description','\x20\x20Cause:\x20','Site:\x20','1159907PhWXJe','900uFnFvK','length','Table:\x20','24PYSwON','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','Describing\x20table\x20','site','\x20column','20975RjLmuM','validate','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','1125336gPOotb','515044OhxXsy','6937794SMbmLs','describe','verbose','11342530cRiHFu','table','Describe\x20table\x20schema','✖\x20Table\x20not\x20found','describeTable','Table\x20\x27','execute'];a15_0x4404=function(){return _0x477200;};return a15_0x4404();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class DescribeCommand extends BaseCommand{[a15_0x98b91e(0xdb)]=a15_0x98b91e(0xc9);[a15_0x98b91e(0xdf)]=a15_0x98b91e(0xcd);async[a15_0x98b91e(0xd1)](_0x332bd5){const _0x2360e2=a15_0x98b91e;return this[_0x2360e2(0xcf)](_0x332bd5);}async['describeTable'](_0x486f6e){const _0x11405c=a15_0x98b91e,{options:_0x303d95,args:_0x1365c4,tdx:_0x1c897b}=_0x486f6e;let _0x1781cc;try{_0x1781cc=parseTableReference(_0x1365c4[0x0]);const _0x14e775=_0x303d95['database'];!_0x1781cc[_0x11405c(0xd8)]&&_0x14e775&&(_0x1781cc[_0x11405c(0xd8)]=_0x14e775);const _0x21583c=validateTableDescribeReference(_0x1781cc);if(_0x21583c)return console['error']('Error:\x20'+_0x21583c),0x1;}catch(_0x49ebbd){return console[_0x11405c(0xc5)](_0x11405c(0xd5)+_0x49ebbd[_0x11405c(0xd4)]),0x1;}const _0x50b780=_0x1781cc[_0x11405c(0xd8)],_0x1859e3=_0x1781cc[_0x11405c(0xcc)];try{_0x303d95['verbose']&&(console[_0x11405c(0xc5)](_0x11405c(0xb8)+_0x303d95[_0x11405c(0xc0)]),console[_0x11405c(0xc5)](_0x11405c(0xda)+_0x50b780),console[_0x11405c(0xc5)](_0x11405c(0xbc)+_0x1859e3));const _0x15efb4=await withSpinner(_0x11405c(0xbf)+_0x50b780+'.'+_0x1859e3+'...',()=>_0x1c897b[_0x11405c(0xcc)][_0x11405c(0xc9)](_0x50b780,_0x1859e3),{'verbose':_0x303d95[_0x11405c(0xca)]}),_0x5caefa=_0x15efb4[_0x11405c(0xde)];if(_0x5caefa[_0x11405c(0xbb)]===0x0)return console['error'](_0x11405c(0xce)),console[_0x11405c(0xc5)](_0x11405c(0xd0)+_0x50b780+'.'+_0x1859e3+_0x11405c(0xdc)),0x1;return console[_0x11405c(0xc5)](_0x11405c(0xd2)+_0x5caefa['length']+_0x11405c(0xc1)+(_0x5caefa[_0x11405c(0xbb)]!==0x1?'s':'')+_0x11405c(0xd7)+_0x50b780+'.'+_0x1859e3),await handleSDKOutput(_0x5caefa,_0x303d95),0x0;}catch(_0x55b88e){if(_0x55b88e instanceof SDKError)return console[_0x11405c(0xc5)]('Error:\x20'+_0x55b88e[_0x11405c(0xd4)]),_0x55b88e['cause']&&console['error'](_0x11405c(0xe0)+_0x55b88e['cause']),0x1;throw _0x55b88e;}}[a15_0x98b91e(0xc3)](_0x3216b8){const _0x5a6400=a15_0x98b91e;if(_0x3216b8[_0x5a6400(0xdd)]['length']===0x0)return _0x5a6400(0xc4);if(_0x3216b8['args']['length']>0x1)return _0x5a6400(0xbe);return undefined;}}
1
+ const a15_0xe4e0ff=a15_0x50ea;(function(_0x5f3112,_0xea1af){const _0x10f1e2=a15_0x50ea,_0x50d178=_0x5f3112();while(!![]){try{const _0xdd8843=-parseInt(_0x10f1e2(0x14d))/0x1+-parseInt(_0x10f1e2(0x140))/0x2+parseInt(_0x10f1e2(0x149))/0x3+-parseInt(_0x10f1e2(0x135))/0x4+-parseInt(_0x10f1e2(0x13a))/0x5*(-parseInt(_0x10f1e2(0x148))/0x6)+parseInt(_0x10f1e2(0x147))/0x7*(-parseInt(_0x10f1e2(0x13e))/0x8)+-parseInt(_0x10f1e2(0x14e))/0x9*(-parseInt(_0x10f1e2(0x132))/0xa);if(_0xdd8843===_0xea1af)break;else _0x50d178['push'](_0x50d178['shift']());}catch(_0x5bbcda){_0x50d178['push'](_0x50d178['shift']());}}}(a15_0x3a9a,0x9f051));import{BaseCommand}from'./command.js';function a15_0x50ea(_0x181319,_0x319094){const _0x3a9abc=a15_0x3a9a();return a15_0x50ea=function(_0x50ea40,_0x466931){_0x50ea40=_0x50ea40-0x12e;let _0xf1b015=_0x3a9abc[_0x50ea40];return _0xf1b015;},a15_0x50ea(_0x181319,_0x319094);}function a15_0x3a9a(){const _0x4b1bbf=['cause','\x20in\x20','\x20column','Usage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options','Site:\x20','1421780ScaCVj','table','describeTable','812120PNBDME','execute','verbose','database','...','5GWIPrs','error','Table:\x20','message','699432UKDcpR','Error:\x20','372346YUtgMl','Table\x20\x27','description','Describe\x20table\x20schema','length','describe','\x20\x20Cause:\x20','77SQPqlX','4547208pZMMhk','949587bcQwHR','Database:\x20','args','name','920444lUEarQ','117shvgTj'];a15_0x3a9a=function(){return _0x4b1bbf;};return a15_0x3a9a();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class DescribeCommand extends BaseCommand{[a15_0xe4e0ff(0x14c)]=a15_0xe4e0ff(0x145);[a15_0xe4e0ff(0x142)]=a15_0xe4e0ff(0x143);async[a15_0xe4e0ff(0x136)](_0x470960){const _0x543bbc=a15_0xe4e0ff;return this[_0x543bbc(0x134)](_0x470960);}async['describeTable'](_0x2e9fab){const _0x2ef957=a15_0xe4e0ff,{options:_0x532f93,args:_0x56f3e7,tdx:_0x284d35}=_0x2e9fab;let _0x13c6a1;try{_0x13c6a1=parseTableReference(_0x56f3e7[0x0]);const _0x34b459=_0x532f93[_0x2ef957(0x138)];!_0x13c6a1[_0x2ef957(0x138)]&&_0x34b459&&(_0x13c6a1[_0x2ef957(0x138)]=_0x34b459);const _0x4037f5=validateTableDescribeReference(_0x13c6a1);if(_0x4037f5)return console['error']('Error:\x20'+_0x4037f5),0x1;}catch(_0x10a4b8){return console[_0x2ef957(0x13b)](_0x2ef957(0x13f)+_0x10a4b8[_0x2ef957(0x13d)]),0x1;}const _0x1f8a99=_0x13c6a1[_0x2ef957(0x138)],_0x123974=_0x13c6a1[_0x2ef957(0x133)];try{_0x532f93[_0x2ef957(0x137)]&&(console[_0x2ef957(0x13b)](_0x2ef957(0x131)+_0x532f93['site']),console[_0x2ef957(0x13b)](_0x2ef957(0x14a)+_0x1f8a99),console[_0x2ef957(0x13b)](_0x2ef957(0x13c)+_0x123974));const _0x24f113=await withSpinner('Describing\x20table\x20'+_0x1f8a99+'.'+_0x123974+_0x2ef957(0x139),()=>_0x284d35[_0x2ef957(0x133)][_0x2ef957(0x145)](_0x1f8a99,_0x123974),{'verbose':_0x532f93[_0x2ef957(0x137)]}),_0x585501=_0x24f113['data'];if(_0x585501[_0x2ef957(0x144)]===0x0)return console[_0x2ef957(0x13b)]('✖\x20Table\x20not\x20found'),console[_0x2ef957(0x13b)](_0x2ef957(0x141)+_0x1f8a99+'.'+_0x123974+'\x27\x20does\x20not\x20exist'),0x1;return console['error']('✔\x20Found\x20'+_0x585501[_0x2ef957(0x144)]+_0x2ef957(0x12f)+(_0x585501['length']!==0x1?'s':'')+_0x2ef957(0x12e)+_0x1f8a99+'.'+_0x123974),await handleSDKOutput(_0x585501,_0x532f93),0x0;}catch(_0x1906e0){if(_0x1906e0 instanceof SDKError)return console[_0x2ef957(0x13b)](_0x2ef957(0x13f)+_0x1906e0[_0x2ef957(0x13d)]),_0x1906e0[_0x2ef957(0x14f)]&&console[_0x2ef957(0x13b)](_0x2ef957(0x146)+_0x1906e0[_0x2ef957(0x14f)]),0x1;throw _0x1906e0;}}['validate'](_0x51cf9b){const _0x37d045=a15_0xe4e0ff;if(_0x51cf9b[_0x37d045(0x14b)][_0x37d045(0x144)]===0x0)return _0x37d045(0x130);if(_0x51cf9b[_0x37d045(0x14b)]['length']>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20describe\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20describe\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20describe\x20--help\x27\x20for\x20more\x20options';return undefined;}}
@@ -1 +1 @@
1
- const a16_0x4d7218=a16_0x5b81;(function(_0x2599f8,_0x4c55de){const _0x171988=a16_0x5b81,_0x2138d7=_0x2599f8();while(!![]){try{const _0x5b622d=-parseInt(_0x171988(0x9c))/0x1+-parseInt(_0x171988(0xb1))/0x2*(parseInt(_0x171988(0x9d))/0x3)+-parseInt(_0x171988(0xa2))/0x4+parseInt(_0x171988(0xc9))/0x5*(parseInt(_0x171988(0xe0))/0x6)+-parseInt(_0x171988(0xa3))/0x7*(parseInt(_0x171988(0xa0))/0x8)+parseInt(_0x171988(0xa9))/0x9*(parseInt(_0x171988(0xb6))/0xa)+-parseInt(_0x171988(0xc3))/0xb*(-parseInt(_0x171988(0xc4))/0xc);if(_0x5b622d===_0x4c55de)break;else _0x2138d7['push'](_0x2138d7['shift']());}catch(_0x3049c9){_0x2138d7['push'](_0x2138d7['shift']());}}}(a16_0x237e,0x60a6e));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';function handleSDKError(_0x48c808,_0x150890){const _0xbd48db=a16_0x5b81;if(_0x48c808 instanceof SDKError)console[_0xbd48db(0xd5)](_0xbd48db(0xb7)+_0x48c808['message']),_0x150890[_0xbd48db(0xbf)]&&(_0x48c808[_0xbd48db(0xcd)]&&console[_0xbd48db(0xd5)]('\x20\x20Cause:\x20'+_0x48c808[_0xbd48db(0xcd)]),_0x48c808[_0xbd48db(0xda)]&&(console[_0xbd48db(0xd5)](_0xbd48db(0x98)),console['error'](_0x48c808[_0xbd48db(0xda)])));else throw _0x48c808;}function a16_0x5b81(_0x4dd2b9,_0x238c2e){const _0x237e30=a16_0x237e();return a16_0x5b81=function(_0x5b81b6,_0x4671ff){_0x5b81b6=_0x5b81b6-0x97;let _0x2bff78=_0x237e30[_0x5b81b6];return _0x2bff78;},a16_0x5b81(_0x4dd2b9,_0x238c2e);}async function getProjectIdOrDefault(_0x894e){const _0x18cc29=a16_0x5b81,{tdx:_0x1ff1b8,options:_0x3f10c5}=_0x894e,_0x485dda=_0x3f10c5[_0x18cc29(0xac)];if(_0x485dda){const _0x2a04b6=await withSpinner(_0x18cc29(0xe2)+_0x485dda+_0x18cc29(0xab),()=>_0x1ff1b8[_0x18cc29(0xd7)][_0x18cc29(0xe7)](_0x485dda),{'verbose':_0x3f10c5[_0x18cc29(0xbf)]});return _0x2a04b6[_0x18cc29(0xa4)];}let _0x169ec8=_0x1ff1b8['llm'][_0x18cc29(0xde)]();if(_0x169ec8)return _0x169ec8;const _0x59804d=await withSpinner('Getting\x20default\x20project...',()=>_0x1ff1b8[_0x18cc29(0xd7)][_0x18cc29(0xca)](),{'verbose':_0x3f10c5[_0x18cc29(0xbf)]});return _0x59804d[_0x18cc29(0xa4)]['id'];}function toLLMProjectInfo(_0x7cb0b1){const _0x3a558b=a16_0x5b81;return{'name':_0x7cb0b1[_0x3a558b(0xcc)][_0x3a558b(0x9b)],'description':_0x7cb0b1[_0x3a558b(0xcc)][_0x3a558b(0xc6)],'createdAt':_0x7cb0b1[_0x3a558b(0xcc)][_0x3a558b(0xb5)],'updatedAt':_0x7cb0b1[_0x3a558b(0xcc)][_0x3a558b(0xd1)]};}function toAgentInfo(_0x26fb99){const _0x578e34=a16_0x5b81;return{'name':_0x26fb99[_0x578e34(0xcc)]['name'],'description':_0x26fb99[_0x578e34(0xcc)][_0x578e34(0xc6)],'prompt':truncatePrompt(_0x26fb99[_0x578e34(0xcc)][_0x578e34(0xae)]),'createdAt':_0x26fb99[_0x578e34(0xcc)][_0x578e34(0xb5)],'updatedAt':_0x26fb99['attributes'][_0x578e34(0xd1)]};}function truncatePrompt(_0x2b1285){const _0x3626aa=a16_0x5b81;if(!_0x2b1285)return undefined;const _0x1e4b15=0x64;if(_0x2b1285[_0x3626aa(0xe6)]<=_0x1e4b15)return _0x2b1285;return _0x2b1285[_0x3626aa(0xd9)](0x0,_0x1e4b15)+_0x3626aa(0xb4);}export class LLMModelsCommand extends BaseCommand{[a16_0x4d7218(0x9b)]='llm:models';[a16_0x4d7218(0xc6)]='List\x20available\x20LLM\x20models';async[a16_0x4d7218(0xea)](_0x3976de){const _0x1a82f8=a16_0x4d7218,{options:_0x196b15,tdx:_0x284364}=_0x3976de;try{const _0x39b52e=await withSpinner('Fetching\x20available\x20models...',()=>_0x284364[_0x1a82f8(0xd7)][_0x1a82f8(0xd6)](),{'verbose':_0x196b15['verbose']});return await handleSDKOutput(_0x39b52e[_0x1a82f8(0xa4)],_0x196b15),0x0;}catch(_0x1f5324){return handleSDKError(_0x1f5324,_0x196b15),0x1;}}}export class LLMProjectsCommand extends BaseCommand{[a16_0x4d7218(0x9b)]='llm:projects';[a16_0x4d7218(0xc6)]=a16_0x4d7218(0xb3);async[a16_0x4d7218(0xea)](_0x3ca560){const _0x23042d=a16_0x4d7218,{options:_0x1f406b,args:_0x4a4b94,tdx:_0x3de064}=_0x3ca560;try{const _0x5aaac6=_0x4a4b94[0x0],_0x29f7f0=_0x1f406b['limit']?Number(_0x1f406b[_0x23042d(0xbc)]):0x32,_0x133b42=await withSpinner('Fetching\x20projects...',()=>_0x3de064[_0x23042d(0xd7)][_0x23042d(0xad)](_0x29f7f0),{'verbose':_0x1f406b[_0x23042d(0xbf)]});let _0x800156=_0x133b42[_0x23042d(0xa4)];_0x5aaac6&&(_0x800156=_0x133b42['data'][_0x23042d(0xc1)](_0x51fe87=>matchGlobPattern(_0x51fe87[_0x23042d(0xcc)]['name'],_0x5aaac6)));const _0xb44a15=_0x800156[_0x23042d(0xe5)](toLLMProjectInfo);return await handleSDKOutput(_0xb44a15,_0x1f406b),0x0;}catch(_0x68ac0f){return handleSDKError(_0x68ac0f,_0x1f406b),0x1;}}}export class LLMAgentsCommand extends BaseCommand{[a16_0x4d7218(0x9b)]=a16_0x4d7218(0xa1);[a16_0x4d7218(0xc6)]=a16_0x4d7218(0xdd);async[a16_0x4d7218(0xea)](_0x33ca1c){const _0x430543=a16_0x4d7218,{options:_0xd88869,args:_0x3b16cb,tdx:_0x4f4b0a}=_0x33ca1c;try{const _0x409bce=_0x3b16cb[0x0],_0x45ced4=await getProjectIdOrDefault(_0x33ca1c),_0x414446=await withSpinner('Fetching\x20agents...',()=>_0x4f4b0a[_0x430543(0xd7)]['agents'](_0x45ced4),{'verbose':_0xd88869[_0x430543(0xbf)]});let _0x832ef4=_0x414446[_0x430543(0xa4)];_0x409bce&&(_0x832ef4=_0x414446['data'][_0x430543(0xc1)](_0x96b5f=>matchGlobPattern(_0x96b5f[_0x430543(0xcc)][_0x430543(0x9b)],_0x409bce)));const _0x440b34=_0x832ef4[_0x430543(0xe5)](toAgentInfo);return await handleSDKOutput(_0x440b34,_0xd88869),0x0;}catch(_0x1994d2){return handleSDKError(_0x1994d2,_0xd88869),0x1;}}}export class LLMAgentShowCommand extends BaseCommand{[a16_0x4d7218(0x9b)]='llm:agent:show';['description']=a16_0x4d7218(0xaa);async[a16_0x4d7218(0xea)](_0x2f76e1){const _0x2c83ec=a16_0x4d7218,{options:_0x579ac7,args:_0x43e07b,tdx:_0x5a45d9}=_0x2f76e1;if(_0x43e07b['length']===0x0)return console[_0x2c83ec(0xd5)](_0x2c83ec(0xe9)),console[_0x2c83ec(0xd5)](_0x2c83ec(0xa8)),0x1;const _0x284da1=_0x43e07b[0x0];try{const _0x1f4af4=await getProjectIdOrDefault(_0x2f76e1),_0x4b37df=await withSpinner('Resolving\x20agent\x20\x27'+_0x284da1+_0x2c83ec(0xab),()=>_0x5a45d9[_0x2c83ec(0xd7)][_0x2c83ec(0xdf)](_0x284da1,_0x1f4af4),{'verbose':_0x579ac7['verbose']}),_0x101643=await withSpinner('Fetching\x20agent...',()=>_0x5a45d9[_0x2c83ec(0xd7)]['agent'](_0x4b37df[_0x2c83ec(0xa4)]),{'verbose':_0x579ac7[_0x2c83ec(0xbf)]});return await handleSDKOutput([_0x101643[_0x2c83ec(0xa4)]],_0x579ac7),0x0;}catch(_0x86cc2){return handleSDKError(_0x86cc2,_0x579ac7),0x1;}}}export class LLMAgentCreateCommand extends BaseCommand{['name']=a16_0x4d7218(0xce);[a16_0x4d7218(0xc6)]='Create\x20a\x20new\x20agent\x20in\x20current\x20project';async[a16_0x4d7218(0xea)](_0x4e2138){const _0x252614=a16_0x4d7218,{options:_0x5f52fa,args:_0x3f5d70,tdx:_0x53f652}=_0x4e2138;if(_0x3f5d70[_0x252614(0xe6)]===0x0)return console[_0x252614(0xd5)](_0x252614(0xe9)),console[_0x252614(0xd5)]('Usage:\x20tdx\x20llm\x20agent\x20create\x20<name>\x20[options]'),0x1;const _0x4795a2=_0x3f5d70[0x0],_0x1b56ea=_0x5f52fa,_0x326468=_0x1b56ea[_0x252614(0xcb)],_0x5c54fe=_0x1b56ea['model']||_0x252614(0xa5),_0x5c730e=_0x1b56ea[_0x252614(0xc2)],_0x214a39=_0x1b56ea[_0x252614(0xe1)]?Number(_0x1b56ea['maxToolIterations']):undefined,_0x3132b7=_0x1b56ea[_0x252614(0xb9)]?Number(_0x1b56ea[_0x252614(0xb9)]):undefined;try{const _0x12fb2b=await getProjectIdOrDefault(_0x4e2138),_0x33c130=await withSpinner('Creating\x20agent\x20\x27'+_0x4795a2+'\x27...',()=>_0x53f652['llm'][_0x252614(0xb0)]({'name':_0x4795a2,'projectId':_0x12fb2b,'modelType':_0x5c54fe,'systemPrompt':_0x326468,'starterMessage':_0x5c730e,'maxToolIterations':_0x214a39,'temperature':_0x3132b7}),{'verbose':_0x5f52fa[_0x252614(0xbf)]});return console['log']('Agent\x20created:\x20'+_0x33c130[_0x252614(0xa4)]['id']),await handleSDKOutput([_0x33c130[_0x252614(0xa4)]],_0x5f52fa),0x0;}catch(_0x24cb45){return handleSDKError(_0x24cb45,_0x5f52fa),0x1;}}}export class LLMAgentUpdateCommand extends BaseCommand{[a16_0x4d7218(0x9b)]='llm:agent:update';[a16_0x4d7218(0xc6)]=a16_0x4d7218(0xeb);async[a16_0x4d7218(0xea)](_0x4053b6){const _0x5ee532=a16_0x4d7218,{options:_0x56879b,args:_0x4f5edb,tdx:_0x3326da}=_0x4053b6;if(_0x4f5edb[_0x5ee532(0xe6)]===0x0)return console[_0x5ee532(0xd5)](_0x5ee532(0xe9)),console[_0x5ee532(0xd5)](_0x5ee532(0x97)),0x1;const _0x3f255d=_0x4f5edb[0x0],_0x57a74d=_0x56879b,_0x1192b3=_0x57a74d[_0x5ee532(0x9b)],_0x5c4138=_0x57a74d[_0x5ee532(0xae)],_0x36bf4b=_0x57a74d['description'],_0x2c8fed=_0x57a74d[_0x5ee532(0xc2)];if(!_0x1192b3&&!_0x5c4138&&!_0x36bf4b&&!_0x2c8fed)return console[_0x5ee532(0xd5)](_0x5ee532(0xc0)),console['error']('Options:\x20--name,\x20--prompt,\x20--description,\x20--starter-message'),0x1;try{const _0x44b38b=await getProjectIdOrDefault(_0x4053b6),_0x3c3b6f=await withSpinner('Resolving\x20agent\x20\x27'+_0x3f255d+'\x27...',()=>_0x3326da[_0x5ee532(0xd7)]['resolveAgentId'](_0x3f255d,_0x44b38b),{'verbose':_0x56879b[_0x5ee532(0xbf)]}),_0x34ac7e=_0x3c3b6f[_0x5ee532(0xa4)],_0xfecf44=await withSpinner(_0x5ee532(0xb2),()=>_0x3326da['llm'][_0x5ee532(0xdc)](_0x34ac7e,{'name':_0x1192b3,'prompt':_0x5c4138,'description':_0x36bf4b,'starterMessage':_0x2c8fed}),{'verbose':_0x56879b[_0x5ee532(0xbf)]});return console[_0x5ee532(0x9e)]('Agent\x20updated:\x20'+_0xfecf44[_0x5ee532(0xa4)]['id']),await handleSDKOutput([_0xfecf44[_0x5ee532(0xa4)]],_0x56879b),0x0;}catch(_0x5b4e9f){return handleSDKError(_0x5b4e9f,_0x56879b),0x1;}}}export class LLMAgentDeleteCommand extends BaseCommand{[a16_0x4d7218(0x9b)]='llm:agent:delete';[a16_0x4d7218(0xc6)]='Delete\x20an\x20agent';async['execute'](_0x41d6e3){const _0x43b9df=a16_0x4d7218,{options:_0x417102,args:_0x56e558,tdx:_0x130283}=_0x41d6e3;if(_0x56e558[_0x43b9df(0xe6)]===0x0)return console[_0x43b9df(0xd5)](_0x43b9df(0xe9)),console[_0x43b9df(0xd5)](_0x43b9df(0xb8)),0x1;const _0x265fc4=_0x56e558[0x0];try{const _0x2da1fc=await getProjectIdOrDefault(_0x41d6e3),_0x147a4e=await withSpinner(_0x43b9df(0xd8)+_0x265fc4+_0x43b9df(0xab),()=>_0x130283[_0x43b9df(0xd7)]['resolveAgentId'](_0x265fc4,_0x2da1fc),{'verbose':_0x417102[_0x43b9df(0xbf)]}),_0x332330=_0x147a4e['data'];return await withSpinner(_0x43b9df(0xbb),()=>_0x130283[_0x43b9df(0xd7)][_0x43b9df(0xc7)](_0x332330),{'verbose':_0x417102[_0x43b9df(0xbf)]}),console['log'](_0x43b9df(0xd4)+_0x332330),0x0;}catch(_0x47ab8b){return handleSDKError(_0x47ab8b,_0x417102),0x1;}}}export class LLMHistoryCommand extends BaseCommand{[a16_0x4d7218(0x9b)]=a16_0x4d7218(0xd3);['description']=a16_0x4d7218(0xc5);async[a16_0x4d7218(0xea)](_0x36a1eb){const _0x10ddb4=a16_0x4d7218,{options:_0x478f57,args:_0x5946f4,tdx:_0x474313}=_0x36a1eb,_0xc7fdc5=_0x5946f4[0x0];try{if(!_0xc7fdc5){const _0x24c40d=_0x478f57[_0x10ddb4(0xbc)]?Number(_0x478f57[_0x10ddb4(0xbc)]):0x32,_0x7077af=await withSpinner(_0x10ddb4(0xc8),()=>_0x474313['llm']['chats'](_0x24c40d),{'verbose':_0x478f57['verbose']});return await handleSDKOutput(_0x7077af[_0x10ddb4(0xa4)],_0x478f57),0x0;}else{const _0x516653=await withSpinner(_0x10ddb4(0xe4)+_0xc7fdc5+_0x10ddb4(0xab),()=>_0x474313[_0x10ddb4(0xd7)][_0x10ddb4(0x99)](_0xc7fdc5),{'verbose':_0x478f57[_0x10ddb4(0xbf)]});return await handleSDKOutput(_0x516653[_0x10ddb4(0xa4)][_0x10ddb4(0xa7)],_0x478f57),0x0;}}catch(_0xef6984){return handleSDKError(_0xef6984,_0x478f57),0x1;}}}function a16_0x237e(){const _0x3c393e=['Deleting\x20project\x20\x27','name','210654lNWQDa','3LxswFW','log','Creating\x20project\x20\x27','547864nsjbyE','llm:agents','2302468byDcBh','77kxqwIR','data','claude-4.5-haiku','Usage:\x20tdx\x20llm\x20use\x20<project-name>','messages','Usage:\x20tdx\x20llm\x20agent\x20show\x20<agent-name>','18cXWXaT','Show\x20agent\x20details','\x27...','llmProject','projects','prompt','llm:project:delete','createAgent','1488820LSuGpz','Updating\x20agent...','List\x20all\x20LLM\x20projects','...','createdAt','2128340LmJRGo','Error:\x20','Usage:\x20tdx\x20llm\x20agent\x20delete\x20<agent-name>','temperature','Delete\x20an\x20LLM\x20project','Deleting\x20agent...','limit','Project\x20deleted:\x20','llm:use','verbose','Error:\x20At\x20least\x20one\x20update\x20field\x20is\x20required','filter','starterMessage','2145UBGkNi','125460qShouK','Show\x20chat\x20history\x20or\x20list\x20chat\x20sessions','description','deleteAgent','Fetching\x20chat\x20sessions...','345fulJDa','getOrCreateDefaultProject','systemPrompt','attributes','cause','llm:agent:create','Project\x20context\x20set\x20to:\x20','Setting\x20project\x20context\x20to\x20\x27','updatedAt','createProject','llm:history','Agent\x20deleted:\x20','error','models','llm','Resolving\x20agent\x20\x27','slice','stack','llm:project:create','updateAgent','List\x20agents\x20in\x20current\x20project','getCurrentProject','resolveAgentId','18738POmZqM','maxToolIterations','Resolving\x20project\x20\x27','deleteProject','Fetching\x20chat\x20history\x20for\x20\x27','map','length','resolveProjectId','Usage:\x20tdx\x20llm\x20project\x20create\x20<name>\x20[--description\x20<text>]','Error:\x20Agent\x20name\x20is\x20required','execute','Update\x20an\x20existing\x20agent','Usage:\x20tdx\x20llm\x20agent\x20update\x20<agent-name>\x20[options]','\x0aStack\x20trace:','history'];a16_0x237e=function(){return _0x3c393e;};return a16_0x237e();}export class LLMUseCommand extends BaseCommand{['name']=a16_0x4d7218(0xbe);[a16_0x4d7218(0xc6)]='Set\x20current\x20project\x20context';async[a16_0x4d7218(0xea)](_0x5190d){const _0x10dd24=a16_0x4d7218,{options:_0x5e36c8,args:_0x1ab67b,tdx:_0x5b5f58}=_0x5190d;if(_0x1ab67b[_0x10dd24(0xe6)]===0x0)return console[_0x10dd24(0xd5)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x10dd24(0xa6)),0x1;const _0x4367f9=_0x1ab67b[0x0];try{return await withSpinner(_0x10dd24(0xd0)+_0x4367f9+_0x10dd24(0xab),()=>_0x5b5f58['llm']['setCurrentProject'](_0x4367f9),{'verbose':_0x5e36c8[_0x10dd24(0xbf)]}),console[_0x10dd24(0x9e)](_0x10dd24(0xcf)+_0x4367f9),0x0;}catch(_0x57bd49){return handleSDKError(_0x57bd49,_0x5e36c8),0x1;}}}export class LLMProjectCreateCommand extends BaseCommand{[a16_0x4d7218(0x9b)]=a16_0x4d7218(0xdb);[a16_0x4d7218(0xc6)]='Create\x20a\x20new\x20LLM\x20project';async[a16_0x4d7218(0xea)](_0x3eb576){const _0x5845ed=a16_0x4d7218,{options:_0x134111,args:_0xf5990d,tdx:_0x178af7}=_0x3eb576;if(_0xf5990d[_0x5845ed(0xe6)]===0x0)return console[_0x5845ed(0xd5)]('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x5845ed(0xe8)),0x1;const _0x4c5189=_0xf5990d[0x0],_0x3ab48f=_0x134111,_0x42c626=_0x3ab48f['description'];try{const _0x29da0f=await withSpinner(_0x5845ed(0x9f)+_0x4c5189+_0x5845ed(0xab),()=>_0x178af7[_0x5845ed(0xd7)][_0x5845ed(0xd2)]({'name':_0x4c5189,'description':_0x42c626}),{'verbose':_0x134111[_0x5845ed(0xbf)]});console['log']('Project\x20created:\x20'+_0x29da0f[_0x5845ed(0xa4)]['id']);const _0x4f704c=toLLMProjectInfo(_0x29da0f['data']);return await handleSDKOutput([_0x4f704c],_0x134111),0x0;}catch(_0x4ed0a2){return handleSDKError(_0x4ed0a2,_0x134111),0x1;}}}export class LLMProjectDeleteCommand extends BaseCommand{[a16_0x4d7218(0x9b)]=a16_0x4d7218(0xaf);[a16_0x4d7218(0xc6)]=a16_0x4d7218(0xba);async['execute'](_0x943af9){const _0x1827db=a16_0x4d7218,{options:_0x3fedeb,args:_0x4bddef,tdx:_0xcd5e03}=_0x943af9;if(_0x4bddef[_0x1827db(0xe6)]===0x0)return console[_0x1827db(0xd5)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x1827db(0xd5)]('Usage:\x20tdx\x20llm\x20project\x20delete\x20<name>'),0x1;const _0x173e88=_0x4bddef[0x0];try{return await withSpinner(_0x1827db(0x9a)+_0x173e88+_0x1827db(0xab),()=>_0xcd5e03[_0x1827db(0xd7)][_0x1827db(0xe3)](_0x173e88),{'verbose':_0x3fedeb[_0x1827db(0xbf)]}),console[_0x1827db(0x9e)](_0x1827db(0xbd)+_0x173e88),0x0;}catch(_0x344af4){return handleSDKError(_0x344af4,_0x3fedeb),0x1;}}}
1
+ const a16_0x4dc8a9=a16_0x428b;(function(_0x55d445,_0x20d484){const _0x1d6c16=a16_0x428b,_0x55949f=_0x55d445();while(!![]){try{const _0x23c56a=-parseInt(_0x1d6c16(0x92))/0x1+-parseInt(_0x1d6c16(0x86))/0x2+-parseInt(_0x1d6c16(0xb9))/0x3+parseInt(_0x1d6c16(0xad))/0x4*(-parseInt(_0x1d6c16(0x85))/0x5)+-parseInt(_0x1d6c16(0xbf))/0x6+-parseInt(_0x1d6c16(0xce))/0x7*(parseInt(_0x1d6c16(0xd1))/0x8)+-parseInt(_0x1d6c16(0xac))/0x9*(-parseInt(_0x1d6c16(0xa3))/0xa);if(_0x23c56a===_0x20d484)break;else _0x55949f['push'](_0x55949f['shift']());}catch(_0x8418f){_0x55949f['push'](_0x55949f['shift']());}}}(a16_0x2afe,0x652ae));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{matchGlobPattern}from'../utils/string-utils.js';function handleSDKError(_0x7fb3e2,_0x369a67){const _0x37e0b0=a16_0x428b;if(_0x7fb3e2 instanceof SDKError)console[_0x37e0b0(0xc2)](_0x37e0b0(0xb5)+_0x7fb3e2['message']),_0x369a67['verbose']&&(_0x7fb3e2[_0x37e0b0(0xb4)]&&console['error']('\x20\x20Cause:\x20'+_0x7fb3e2['cause']),_0x7fb3e2[_0x37e0b0(0x9f)]&&(console[_0x37e0b0(0xc2)](_0x37e0b0(0xa6)),console[_0x37e0b0(0xc2)](_0x7fb3e2[_0x37e0b0(0x9f)])));else throw _0x7fb3e2;}async function getProjectIdOrDefault(_0x12c884){const _0x3a33ff=a16_0x428b,{tdx:_0x500991,options:_0x5e22c6}=_0x12c884,_0x4ab6ee=_0x5e22c6[_0x3a33ff(0xa1)];if(_0x4ab6ee){const _0xc8b9df=await withSpinner('Resolving\x20project\x20\x27'+_0x4ab6ee+'\x27...',()=>_0x500991[_0x3a33ff(0xd7)]['resolveProjectId'](_0x4ab6ee),{'verbose':_0x5e22c6[_0x3a33ff(0x8e)]});return _0xc8b9df[_0x3a33ff(0xb2)];}let _0x1ae0da=_0x500991['llm'][_0x3a33ff(0xa7)]();if(_0x1ae0da)return _0x1ae0da;const _0x5e0484=await withSpinner(_0x3a33ff(0xae),()=>_0x500991[_0x3a33ff(0xd7)][_0x3a33ff(0x84)](),{'verbose':_0x5e22c6[_0x3a33ff(0x8e)]});return _0x5e0484['data']['id'];}function toLLMProjectInfo(_0x433878){const _0x3d7ca2=a16_0x428b;return{'name':_0x433878[_0x3d7ca2(0x90)]['name'],'description':_0x433878[_0x3d7ca2(0x90)][_0x3d7ca2(0xbb)],'createdAt':_0x433878[_0x3d7ca2(0x90)]['createdAt'],'updatedAt':_0x433878['attributes'][_0x3d7ca2(0x95)]};}function toAgentInfo(_0x163b65){const _0x4c9b71=a16_0x428b;return{'name':_0x163b65[_0x4c9b71(0x90)][_0x4c9b71(0x93)],'description':_0x163b65[_0x4c9b71(0x90)][_0x4c9b71(0xbb)],'prompt':truncatePrompt(_0x163b65[_0x4c9b71(0x90)]['prompt']),'createdAt':_0x163b65[_0x4c9b71(0x90)]['createdAt'],'updatedAt':_0x163b65[_0x4c9b71(0x90)][_0x4c9b71(0x95)]};}function truncatePrompt(_0x10edb9){const _0xb6d2f7=a16_0x428b;if(!_0x10edb9)return undefined;const _0x469868=0x64;if(_0x10edb9[_0xb6d2f7(0xd4)]<=_0x469868)return _0x10edb9;return _0x10edb9['slice'](0x0,_0x469868)+_0xb6d2f7(0xc8);}export class LLMModelsCommand extends BaseCommand{[a16_0x4dc8a9(0x93)]=a16_0x4dc8a9(0xb1);[a16_0x4dc8a9(0xbb)]=a16_0x4dc8a9(0x87);async['execute'](_0x4e53a9){const _0x53685c=a16_0x4dc8a9,{options:_0xf39a79,tdx:_0x444360}=_0x4e53a9;try{const _0x17e8f2=await withSpinner(_0x53685c(0xb0),()=>_0x444360['llm']['models'](),{'verbose':_0xf39a79[_0x53685c(0x8e)]});return await handleSDKOutput(_0x17e8f2[_0x53685c(0xb2)],_0xf39a79),0x0;}catch(_0xb7a491){return handleSDKError(_0xb7a491,_0xf39a79),0x1;}}}export class LLMProjectsCommand extends BaseCommand{['name']='llm:projects';['description']='List\x20all\x20LLM\x20projects';async[a16_0x4dc8a9(0xd6)](_0x2a5dd6){const _0x1e7aee=a16_0x4dc8a9,{options:_0x5b4a08,args:_0x18125b,tdx:_0x13cab1}=_0x2a5dd6;try{const _0x5e2786=_0x18125b[0x0],_0x343561=_0x5b4a08[_0x1e7aee(0x82)]?Number(_0x5b4a08[_0x1e7aee(0x82)]):0x32,_0x280166=await withSpinner(_0x1e7aee(0x9b),()=>_0x13cab1[_0x1e7aee(0xd7)][_0x1e7aee(0x8a)](_0x343561),{'verbose':_0x5b4a08['verbose']});let _0x208845=_0x280166[_0x1e7aee(0xb2)];_0x5e2786&&(_0x208845=_0x280166[_0x1e7aee(0xb2)][_0x1e7aee(0xa9)](_0x582682=>matchGlobPattern(_0x582682['attributes'][_0x1e7aee(0x93)],_0x5e2786)));const _0x537ed1=_0x208845[_0x1e7aee(0xbc)](toLLMProjectInfo);return await handleSDKOutput(_0x537ed1,_0x5b4a08),0x0;}catch(_0x45db92){return handleSDKError(_0x45db92,_0x5b4a08),0x1;}}}function a16_0x428b(_0x13dd8a,_0x43c4ca){const _0x2afe73=a16_0x2afe();return a16_0x428b=function(_0x428b3f,_0x1867f8){_0x428b3f=_0x428b3f-0x82;let _0x480d6b=_0x2afe73[_0x428b3f];return _0x480d6b;},a16_0x428b(_0x13dd8a,_0x43c4ca);}export class LLMAgentsCommand extends BaseCommand{[a16_0x4dc8a9(0x93)]=a16_0x4dc8a9(0xab);[a16_0x4dc8a9(0xbb)]=a16_0x4dc8a9(0x96);async[a16_0x4dc8a9(0xd6)](_0x5bb428){const _0x22783f=a16_0x4dc8a9,{options:_0x69f6f4,args:_0x4f3c0c,tdx:_0x33c00d}=_0x5bb428;try{const _0x39fe4c=_0x4f3c0c[0x0],_0x26a117=await getProjectIdOrDefault(_0x5bb428),_0x4b9783=await withSpinner('Fetching\x20agents...',()=>_0x33c00d[_0x22783f(0xd7)][_0x22783f(0xca)](_0x26a117),{'verbose':_0x69f6f4[_0x22783f(0x8e)]});let _0x17f42a=_0x4b9783[_0x22783f(0xb2)];_0x39fe4c&&(_0x17f42a=_0x4b9783['data'][_0x22783f(0xa9)](_0x5f494e=>matchGlobPattern(_0x5f494e[_0x22783f(0x90)][_0x22783f(0x93)],_0x39fe4c)));const _0xa7d4d6=_0x17f42a['map'](toAgentInfo);return await handleSDKOutput(_0xa7d4d6,_0x69f6f4),0x0;}catch(_0x520369){return handleSDKError(_0x520369,_0x69f6f4),0x1;}}}export class LLMAgentShowCommand extends BaseCommand{[a16_0x4dc8a9(0x93)]=a16_0x4dc8a9(0x98);[a16_0x4dc8a9(0xbb)]=a16_0x4dc8a9(0x89);async['execute'](_0x54ae87){const _0x3cc368=a16_0x4dc8a9,{options:_0x3d38bd,args:_0x3e973a,tdx:_0x4a0e69}=_0x54ae87;if(_0x3e973a[_0x3cc368(0xd4)]===0x0)return console[_0x3cc368(0xc2)](_0x3cc368(0xa8)),console[_0x3cc368(0xc2)](_0x3cc368(0x99)),0x1;const _0x57868c=_0x3e973a[0x0];try{const _0x388f9c=await getProjectIdOrDefault(_0x54ae87),_0x588f7c=await withSpinner('Resolving\x20agent\x20\x27'+_0x57868c+'\x27...',()=>_0x4a0e69[_0x3cc368(0xd7)]['resolveAgentId'](_0x57868c,_0x388f9c),{'verbose':_0x3d38bd[_0x3cc368(0x8e)]}),_0x3639d2=await withSpinner('Fetching\x20agent...',()=>_0x4a0e69[_0x3cc368(0xd7)]['agent'](_0x588f7c['data']),{'verbose':_0x3d38bd[_0x3cc368(0x8e)]});return await handleSDKOutput([_0x3639d2[_0x3cc368(0xb2)]],_0x3d38bd),0x0;}catch(_0x1b0bb4){return handleSDKError(_0x1b0bb4,_0x3d38bd),0x1;}}}export class LLMAgentCreateCommand extends BaseCommand{[a16_0x4dc8a9(0x93)]=a16_0x4dc8a9(0x91);['description']=a16_0x4dc8a9(0x8d);async[a16_0x4dc8a9(0xd6)](_0x3f9cd0){const _0x3e7dbb=a16_0x4dc8a9,{options:_0x25c8c4,args:_0x3db79e,tdx:_0x2831aa}=_0x3f9cd0;if(_0x3db79e[_0x3e7dbb(0xd4)]===0x0)return console[_0x3e7dbb(0xc2)]('Error:\x20Agent\x20name\x20is\x20required'),console[_0x3e7dbb(0xc2)](_0x3e7dbb(0xd5)),0x1;const _0x16bc5e=_0x3db79e[0x0],_0x230ed3=_0x25c8c4,_0x37381e=_0x230ed3[_0x3e7dbb(0xa2)],_0x4c9c47=_0x230ed3[_0x3e7dbb(0xa0)]||_0x3e7dbb(0xc3),_0x421eed=_0x230ed3[_0x3e7dbb(0xaa)],_0x255f1e=_0x230ed3[_0x3e7dbb(0xb6)]?Number(_0x230ed3['maxToolIterations']):undefined,_0x1b6289=_0x230ed3[_0x3e7dbb(0xc1)]?Number(_0x230ed3[_0x3e7dbb(0xc1)]):undefined;try{const _0x1ebaae=await getProjectIdOrDefault(_0x3f9cd0),_0x54a267=await withSpinner('Creating\x20agent\x20\x27'+_0x16bc5e+'\x27...',()=>_0x2831aa[_0x3e7dbb(0xd7)]['createAgent']({'name':_0x16bc5e,'projectId':_0x1ebaae,'modelType':_0x4c9c47,'systemPrompt':_0x37381e,'starterMessage':_0x421eed,'maxToolIterations':_0x255f1e,'temperature':_0x1b6289}),{'verbose':_0x25c8c4[_0x3e7dbb(0x8e)]});return console[_0x3e7dbb(0xc6)](_0x3e7dbb(0xc9)+_0x54a267[_0x3e7dbb(0xb2)]['id']),await handleSDKOutput([_0x54a267[_0x3e7dbb(0xb2)]],_0x25c8c4),0x0;}catch(_0x5a4d12){return handleSDKError(_0x5a4d12,_0x25c8c4),0x1;}}}export class LLMAgentUpdateCommand extends BaseCommand{[a16_0x4dc8a9(0x93)]=a16_0x4dc8a9(0x9e);['description']=a16_0x4dc8a9(0xc4);async[a16_0x4dc8a9(0xd6)](_0x26ef62){const _0x2e829c=a16_0x4dc8a9,{options:_0x52a6e6,args:_0x21625b,tdx:_0xdb51e8}=_0x26ef62;if(_0x21625b[_0x2e829c(0xd4)]===0x0)return console[_0x2e829c(0xc2)](_0x2e829c(0xa8)),console[_0x2e829c(0xc2)](_0x2e829c(0xba)),0x1;const _0x257515=_0x21625b[0x0],_0x130f34=_0x52a6e6,_0x1cc711=_0x130f34['name'],_0x2ff88c=_0x130f34['prompt'],_0x87af99=_0x130f34['description'],_0x165608=_0x130f34[_0x2e829c(0xaa)];if(!_0x1cc711&&!_0x2ff88c&&!_0x87af99&&!_0x165608)return console[_0x2e829c(0xc2)]('Error:\x20At\x20least\x20one\x20update\x20field\x20is\x20required'),console[_0x2e829c(0xc2)](_0x2e829c(0xa5)),0x1;try{const _0x593d02=await getProjectIdOrDefault(_0x26ef62),_0x92453c=await withSpinner(_0x2e829c(0x94)+_0x257515+_0x2e829c(0x9a),()=>_0xdb51e8[_0x2e829c(0xd7)][_0x2e829c(0xa4)](_0x257515,_0x593d02),{'verbose':_0x52a6e6[_0x2e829c(0x8e)]}),_0x5f31bb=_0x92453c[_0x2e829c(0xb2)],_0x16df4e=await withSpinner(_0x2e829c(0xc5),()=>_0xdb51e8[_0x2e829c(0xd7)][_0x2e829c(0xaf)](_0x5f31bb,{'name':_0x1cc711,'prompt':_0x2ff88c,'description':_0x87af99,'starterMessage':_0x165608}),{'verbose':_0x52a6e6[_0x2e829c(0x8e)]});return console[_0x2e829c(0xc6)]('Agent\x20updated:\x20'+_0x16df4e[_0x2e829c(0xb2)]['id']),await handleSDKOutput([_0x16df4e[_0x2e829c(0xb2)]],_0x52a6e6),0x0;}catch(_0x252a59){return handleSDKError(_0x252a59,_0x52a6e6),0x1;}}}export class LLMAgentDeleteCommand extends BaseCommand{[a16_0x4dc8a9(0x93)]=a16_0x4dc8a9(0xb7);['description']='Delete\x20an\x20agent';async['execute'](_0x2959b6){const _0x34a328=a16_0x4dc8a9,{options:_0x1ce432,args:_0x353be0,tdx:_0x547a93}=_0x2959b6;if(_0x353be0[_0x34a328(0xd4)]===0x0)return console[_0x34a328(0xc2)](_0x34a328(0xa8)),console['error'](_0x34a328(0xb3)),0x1;const _0x4f4b85=_0x353be0[0x0];try{const _0x1bb587=await getProjectIdOrDefault(_0x2959b6),_0x139ee8=await withSpinner('Resolving\x20agent\x20\x27'+_0x4f4b85+_0x34a328(0x9a),()=>_0x547a93['llm']['resolveAgentId'](_0x4f4b85,_0x1bb587),{'verbose':_0x1ce432[_0x34a328(0x8e)]}),_0x5e6abb=_0x139ee8[_0x34a328(0xb2)];return await withSpinner(_0x34a328(0x9d),()=>_0x547a93[_0x34a328(0xd7)][_0x34a328(0x97)](_0x5e6abb),{'verbose':_0x1ce432[_0x34a328(0x8e)]}),console['log']('Agent\x20deleted:\x20'+_0x5e6abb),0x0;}catch(_0x337614){return handleSDKError(_0x337614,_0x1ce432),0x1;}}}export class LLMHistoryCommand extends BaseCommand{[a16_0x4dc8a9(0x93)]=a16_0x4dc8a9(0x8c);['description']=a16_0x4dc8a9(0xcd);async[a16_0x4dc8a9(0xd6)](_0x227b79){const _0x54d41f=a16_0x4dc8a9,{options:_0x637111,args:_0x1c41e7,tdx:_0x524a17}=_0x227b79,_0xf4071f=_0x1c41e7[0x0];try{if(!_0xf4071f){const _0x2361af=_0x637111[_0x54d41f(0x82)]?Number(_0x637111[_0x54d41f(0x82)]):0x32,_0x56546b=await withSpinner('Fetching\x20chat\x20sessions...',()=>_0x524a17[_0x54d41f(0xd7)][_0x54d41f(0xc7)](_0x2361af),{'verbose':_0x637111[_0x54d41f(0x8e)]});return await handleSDKOutput(_0x56546b['data'],_0x637111),0x0;}else{const _0x423b44=await withSpinner(_0x54d41f(0xc0)+_0xf4071f+_0x54d41f(0x9a),()=>_0x524a17['llm'][_0x54d41f(0x8f)](_0xf4071f),{'verbose':_0x637111['verbose']});return await handleSDKOutput(_0x423b44['data']['messages'],_0x637111),0x0;}}catch(_0x5cc43a){return handleSDKError(_0x5cc43a,_0x637111),0x1;}}}function a16_0x2afe(){const _0x815a46=['Creating\x20project\x20\x27','166410kUTVzD','Usage:\x20tdx\x20llm\x20agent\x20update\x20<agent-name>\x20[options]','description','map','setCurrentProject','Setting\x20project\x20context\x20to\x20\x27','4681434aWlEiP','Fetching\x20chat\x20history\x20for\x20\x27','temperature','error','claude-4.5-haiku','Update\x20an\x20existing\x20agent','Updating\x20agent...','log','chats','...','Agent\x20created:\x20','agents','Usage:\x20tdx\x20llm\x20project\x20create\x20<name>\x20[--description\x20<text>]','Set\x20current\x20project\x20context','Show\x20chat\x20history\x20or\x20list\x20chat\x20sessions','14gpdzeN','llm:project:delete','deleteProject','3306760tqnfzR','Delete\x20an\x20LLM\x20project','createProject','length','Usage:\x20tdx\x20llm\x20agent\x20create\x20<name>\x20[options]','execute','llm','limit','Usage:\x20tdx\x20llm\x20project\x20delete\x20<name>','getOrCreateDefaultProject','85NZmjPX','792766MaKUUa','List\x20available\x20LLM\x20models','Create\x20a\x20new\x20LLM\x20project','Show\x20agent\x20details','projects','llm:project:create','llm:history','Create\x20a\x20new\x20agent\x20in\x20current\x20project','verbose','history','attributes','llm:agent:create','717PcgMZM','name','Resolving\x20agent\x20\x27','updatedAt','List\x20agents\x20in\x20current\x20project','deleteAgent','llm:agent:show','Usage:\x20tdx\x20llm\x20agent\x20show\x20<agent-name>','\x27...','Fetching\x20projects...','Project\x20deleted:\x20','Deleting\x20agent...','llm:agent:update','stack','model','llmProject','systemPrompt','20gwWNyc','resolveAgentId','Options:\x20--name,\x20--prompt,\x20--description,\x20--starter-message','\x0aStack\x20trace:','getCurrentProject','Error:\x20Agent\x20name\x20is\x20required','filter','starterMessage','llm:agents','13164534cBkZNN','106252Pcuuzf','Getting\x20default\x20project...','updateAgent','Fetching\x20available\x20models...','llm:models','data','Usage:\x20tdx\x20llm\x20agent\x20delete\x20<agent-name>','cause','Error:\x20','maxToolIterations','llm:agent:delete'];a16_0x2afe=function(){return _0x815a46;};return a16_0x2afe();}export class LLMUseCommand extends BaseCommand{['name']='llm:use';[a16_0x4dc8a9(0xbb)]=a16_0x4dc8a9(0xcc);async[a16_0x4dc8a9(0xd6)](_0x5aa690){const _0x5bc746=a16_0x4dc8a9,{options:_0x1e3b22,args:_0x2add9a,tdx:_0x2b8057}=_0x5aa690;if(_0x2add9a[_0x5bc746(0xd4)]===0x0)return console[_0x5bc746(0xc2)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x5bc746(0xc2)]('Usage:\x20tdx\x20llm\x20use\x20<project-name>'),0x1;const _0xa9d6e1=_0x2add9a[0x0];try{return await withSpinner(_0x5bc746(0xbe)+_0xa9d6e1+_0x5bc746(0x9a),()=>_0x2b8057[_0x5bc746(0xd7)][_0x5bc746(0xbd)](_0xa9d6e1),{'verbose':_0x1e3b22[_0x5bc746(0x8e)]}),console[_0x5bc746(0xc6)]('Project\x20context\x20set\x20to:\x20'+_0xa9d6e1),0x0;}catch(_0x4d1998){return handleSDKError(_0x4d1998,_0x1e3b22),0x1;}}}export class LLMProjectCreateCommand extends BaseCommand{['name']=a16_0x4dc8a9(0x8b);[a16_0x4dc8a9(0xbb)]=a16_0x4dc8a9(0x88);async[a16_0x4dc8a9(0xd6)](_0x44165b){const _0x5f1370=a16_0x4dc8a9,{options:_0xe5eeb,args:_0x2ae9d7,tdx:_0xe5d55b}=_0x44165b;if(_0x2ae9d7[_0x5f1370(0xd4)]===0x0)return console[_0x5f1370(0xc2)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x5f1370(0xc2)](_0x5f1370(0xcb)),0x1;const _0x538eb7=_0x2ae9d7[0x0],_0x2ba231=_0xe5eeb,_0x5dbbc6=_0x2ba231[_0x5f1370(0xbb)];try{const _0x5a1bd7=await withSpinner(_0x5f1370(0xb8)+_0x538eb7+_0x5f1370(0x9a),()=>_0xe5d55b['llm'][_0x5f1370(0xd3)]({'name':_0x538eb7,'description':_0x5dbbc6}),{'verbose':_0xe5eeb[_0x5f1370(0x8e)]});console[_0x5f1370(0xc6)]('Project\x20created:\x20'+_0x5a1bd7[_0x5f1370(0xb2)]['id']);const _0x5d9119=toLLMProjectInfo(_0x5a1bd7[_0x5f1370(0xb2)]);return await handleSDKOutput([_0x5d9119],_0xe5eeb),0x0;}catch(_0x21d823){return handleSDKError(_0x21d823,_0xe5eeb),0x1;}}}export class LLMProjectDeleteCommand extends BaseCommand{['name']=a16_0x4dc8a9(0xcf);[a16_0x4dc8a9(0xbb)]=a16_0x4dc8a9(0xd2);async[a16_0x4dc8a9(0xd6)](_0x327b1b){const _0x219c02=a16_0x4dc8a9,{options:_0xc4f9f6,args:_0x359e4c,tdx:_0x5366ec}=_0x327b1b;if(_0x359e4c[_0x219c02(0xd4)]===0x0)return console['error']('Error:\x20Project\x20name\x20is\x20required'),console['error'](_0x219c02(0x83)),0x1;const _0x4fb4ce=_0x359e4c[0x0];try{return await withSpinner('Deleting\x20project\x20\x27'+_0x4fb4ce+'\x27...',()=>_0x5366ec['llm'][_0x219c02(0xd0)](_0x4fb4ce),{'verbose':_0xc4f9f6['verbose']}),console[_0x219c02(0xc6)](_0x219c02(0x9c)+_0x4fb4ce),0x0;}catch(_0x571b25){return handleSDKError(_0x571b25,_0xc4f9f6),0x1;}}}
@@ -1 +1 @@
1
- const a17_0x1e2c86=a17_0x88a0;(function(_0x359600,_0xd3a58d){const _0xc74b8e=a17_0x88a0,_0x445537=_0x359600();while(!![]){try{const _0xcf940b=-parseInt(_0xc74b8e(0xf4))/0x1*(-parseInt(_0xc74b8e(0xce))/0x2)+-parseInt(_0xc74b8e(0xbd))/0x3+-parseInt(_0xc74b8e(0xde))/0x4*(-parseInt(_0xc74b8e(0xd9))/0x5)+-parseInt(_0xc74b8e(0xef))/0x6*(-parseInt(_0xc74b8e(0xe0))/0x7)+-parseInt(_0xc74b8e(0xfd))/0x8*(-parseInt(_0xc74b8e(0xe1))/0x9)+-parseInt(_0xc74b8e(0xd5))/0xa+-parseInt(_0xc74b8e(0xe3))/0xb*(-parseInt(_0xc74b8e(0xdb))/0xc);if(_0xcf940b===_0xd3a58d)break;else _0x445537['push'](_0x445537['shift']());}catch(_0x330016){_0x445537['push'](_0x445537['shift']());}}}(a17_0x4efc,0x84889));import a17_0x36adde from'chalk';function a17_0x88a0(_0x3436ac,_0x7222cb){const _0x4efc04=a17_0x4efc();return a17_0x88a0=function(_0x88a0b7,_0x444791){_0x88a0b7=_0x88a0b7-0xbc;let _0x53c47f=_0x4efc04[_0x88a0b7];return _0x53c47f;},a17_0x88a0(_0x3436ac,_0x7222cb);}import{BaseCommand}from'./command.js';import{ProxyServer}from'../proxy/server.js';import{SDKError,ErrorCode}from'../sdk/errors.js';async function getProjectIdOrDefault(_0x4d405b,_0x48ff11){const _0x4529dd=a17_0x88a0,{tdx:_0x215cd1,options:_0x4d3f96}=_0x4d405b,_0x423903=_0x48ff11||_0x4d3f96['llmProject'];if(_0x423903){const _0x36a2b2=await _0x215cd1[_0x4529dd(0xf3)][_0x4529dd(0xe2)](),_0xed1013=_0x36a2b2['find'](_0x88fa87=>_0x88fa87[_0x4529dd(0xe8)]['name']===_0x423903);if(!_0xed1013)throw new SDKError(ErrorCode['NOT_FOUND'],'Project\x20\x27'+_0x423903+_0x4529dd(0xdd),undefined,{'helpText':_0x4529dd(0xed)});return _0xed1013['id'];}const _0x40a492=await _0x215cd1['llm'][_0x4529dd(0xfc)]();return _0x40a492['id'];}async function getAgentIdOrDefault(_0x5dd5f7,_0x13a38c,_0x27b812){const _0xf2c223=a17_0x88a0,{tdx:_0x1ea2b3,options:_0x587b1d}=_0x5dd5f7,_0x1ecf98=_0x27b812||_0x587b1d[_0xf2c223(0xf2)];if(_0x1ecf98){const _0x53a351=await _0x1ea2b3['llm'][_0xf2c223(0xec)](_0x13a38c),_0x2be350=_0x53a351[_0xf2c223(0xc4)](_0x22107b=>_0x22107b[_0xf2c223(0xe8)][_0xf2c223(0xc0)]===_0x1ecf98);if(!_0x2be350)throw new SDKError(ErrorCode[_0xf2c223(0xf8)],_0xf2c223(0xd8)+_0x1ecf98+_0xf2c223(0xda),undefined,{'helpText':'Use\x20\x22tdx\x20llm\x20agents\x22\x20to\x20see\x20available\x20agents'});return _0x2be350['id'];}const _0x369f83=await _0x1ea2b3[_0xf2c223(0xf3)][_0xf2c223(0xf0)]();return _0x369f83['id'];}export class LLMProxyCommand extends BaseCommand{[a17_0x1e2c86(0xc0)]=a17_0x1e2c86(0xd6);[a17_0x1e2c86(0xe7)]=a17_0x1e2c86(0xcd);['server'];async[a17_0x1e2c86(0xf7)](_0x401ffe){const _0x300ff8=a17_0x1e2c86,{tdx:_0x4cb468,options:_0x4e1aa4}=_0x401ffe;try{const _0x20496d=_0x4e1aa4,_0x355bd5=_0x20496d[_0x300ff8(0xfe)]||0xfa0,_0x517b43=_0x20496d[_0x300ff8(0xcb)],_0x5661ae=_0x20496d['agent'],_0x5ec728=_0x20496d[_0x300ff8(0xf9)];console['log'](a17_0x36adde['dim'](_0x300ff8(0xfb)));const _0x4e31a7=await getProjectIdOrDefault(_0x401ffe,_0x517b43),_0x3dd6e0=await getAgentIdOrDefault(_0x401ffe,_0x4e31a7,_0x5661ae),_0x1a74ac=await _0x4cb468['llm'][_0x300ff8(0xe2)](),_0x238e6f=_0x1a74ac[_0x300ff8(0xc4)](_0x59bcf4=>_0x59bcf4['id']===_0x4e31a7),_0x29d819=await _0x4cb468[_0x300ff8(0xf3)][_0x300ff8(0xec)](_0x4e31a7),_0x2609db=_0x29d819[_0x300ff8(0xc4)](_0x37032f=>_0x37032f['id']===_0x3dd6e0);console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xe5)](_0x300ff8(0xbc))),this[_0x300ff8(0xea)]=new ProxyServer({'port':_0x355bd5,'projectId':_0x4e31a7,'agentId':_0x3dd6e0,'tdx':_0x4cb468,'debug':_0x5ec728}),await this[_0x300ff8(0xea)][_0x300ff8(0xd3)](),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xf6)]['bold'](_0x300ff8(0xc6))),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xf6)](_0x300ff8(0xdc))),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xf6)](_0x300ff8(0xbe))),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xc9)][_0x300ff8(0xf1)](_0x300ff8(0xd4))),console['log'](a17_0x36adde[_0x300ff8(0xd1)]('Server\x20Configuration:')),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xe5)](_0x300ff8(0xc8)),a17_0x36adde[_0x300ff8(0xcf)](_0x300ff8(0xd0)+_0x355bd5)),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xe5)](_0x300ff8(0xe4)),a17_0x36adde[_0x300ff8(0xcf)](_0x238e6f?.['attributes'][_0x300ff8(0xc0)]||_0x4e31a7)),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xe5)]('\x20\x20Agent:'),a17_0x36adde[_0x300ff8(0xcf)](_0x2609db?.['attributes']['name']||_0x3dd6e0)),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xe5)](_0x300ff8(0xd7)),a17_0x36adde['white'](_0x4e1aa4[_0x300ff8(0xc2)]));_0x5ec728&&console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xf6)](_0x300ff8(0xc3)),a17_0x36adde['white']('enabled\x20(request/response\x20logging\x20to\x20stderr)'));console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xd1)](_0x300ff8(0xc1))),console[_0x300ff8(0xca)](a17_0x36adde['dim']('\x20\x20Create\x20a\x20.claude/settings.local.json\x20file\x20with:\x0a')),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xcf)]('\x20\x20{')),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xcf)]('\x20\x20\x20\x20\x22env\x22:\x20{')),console['log'](a17_0x36adde[_0x300ff8(0xcf)](_0x300ff8(0xd2)+_0x355bd5+'\x22,')),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xcf)]('\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_AUTH_TOKEN\x22:\x20\x22dummy\x22,')),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xcf)](_0x300ff8(0xdf))),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xcf)](_0x300ff8(0xfa))),console['log'](a17_0x36adde['white'](_0x300ff8(0xcc))),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xd1)](_0x300ff8(0xc5))),console['log'](a17_0x36adde[_0x300ff8(0xe5)](_0x300ff8(0xe9))),console['log'](a17_0x36adde[_0x300ff8(0xe5)](_0x300ff8(0xeb))),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xe5)](_0x300ff8(0xee))),console[_0x300ff8(0xca)](a17_0x36adde[_0x300ff8(0xf6)]('Press\x20Ctrl+C\x20to\x20stop\x20the\x20server\x0a'));const _0x489590=async()=>{const _0x6e76d0=_0x300ff8;console[_0x6e76d0(0xca)](a17_0x36adde['dim']('\x0a\x0aShutting\x20down\x20proxy\x20server...')),this[_0x6e76d0(0xea)]&&await this[_0x6e76d0(0xea)][_0x6e76d0(0xf5)](),console['log'](a17_0x36adde[_0x6e76d0(0xc9)](_0x6e76d0(0xbf))),process[_0x6e76d0(0xc7)](0x0);};return process['on']('SIGINT',_0x489590),process['on'](_0x300ff8(0xe6),_0x489590),await new Promise(()=>{}),0x0;}catch(_0x199071){this[_0x300ff8(0xea)]&&await this[_0x300ff8(0xea)][_0x300ff8(0xf5)]();throw _0x199071;}}}function a17_0x4efc(){const _0x4b24f9=['\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_MODEL\x22:\x20\x22sonnet\x22','7qIUegO','4221765EPFxww','projects','209YGjYvW','\x20\x20Project:','dim','SIGTERM','description','attributes','\x20\x20The\x20proxy\x20can\x20also\x20be\x20tested\x20with\x20Claude\x20Agent\x20SDK','server','\x20\x20https://docs.claude.com/en/docs/agent-sdk/typescript','agents','Use\x20\x22tdx\x20llm\x20projects\x22\x20to\x20see\x20available\x20projects','\x20\x20The\x20SDK\x20reads\x20.claude/settings.json\x20for\x20ANTHROPIC_BASE_URL\x0a','2813352lNdrQl','getOrCreateDefaultAgent','bold','llmAgent','llm','1xukWcs','stop','yellow','execute','NOT_FOUND','debug','\x20\x20\x20\x20}','Resolving\x20project\x20and\x20agent...','getOrCreateDefaultProject','8yfHHUb','port','Starting\x20proxy\x20server...','1034076ZiGabh','Please\x20report\x20issues\x20at:\x20https://github.com/treasure-data/tdx/issues\x0a','✓\x20Proxy\x20server\x20stopped','name','\x0aClaude\x20Code\x20Configuration:','site','\x20\x20Debug:','find','\x0aTesting\x20with\x20Agent\x20SDK:','\x0a⚠️\x20\x20EXPERIMENTAL\x20FEATURE','exit','\x20\x20Address:','green','log','project','\x20\x20}','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration','588212SoAWpm','white','http://0.0.0.0:','cyan','\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_BASE_URL\x22:\x20\x22http://127.0.0.1:','start','✓\x20TD\x20LLM\x20Proxy\x20Server\x20is\x20running!\x0a','9307190crmMkt','llm:proxy','\x20\x20Site:','Agent\x20\x27','83215PhainH','\x27\x20not\x20found\x20in\x20project','138972WexAdV','This\x20proxy\x20server\x20is\x20experimental\x20and\x20may\x20have\x20limitations.','\x27\x20not\x20found','88OHKTmD'];a17_0x4efc=function(){return _0x4b24f9;};return a17_0x4efc();}
1
+ function a17_0x750e(_0x58a954,_0x2ee30e){const _0x2b06f2=a17_0x2b06();return a17_0x750e=function(_0x750e89,_0x592b81){_0x750e89=_0x750e89-0x7b;let _0x48ed29=_0x2b06f2[_0x750e89];return _0x48ed29;},a17_0x750e(_0x58a954,_0x2ee30e);}const a17_0x309fea=a17_0x750e;(function(_0x2aabe8,_0x28cbe8){const _0x3cb1c2=a17_0x750e,_0x683fcc=_0x2aabe8();while(!![]){try{const _0x2765d6=-parseInt(_0x3cb1c2(0x88))/0x1+parseInt(_0x3cb1c2(0x90))/0x2+-parseInt(_0x3cb1c2(0xad))/0x3*(-parseInt(_0x3cb1c2(0x8f))/0x4)+parseInt(_0x3cb1c2(0x84))/0x5*(parseInt(_0x3cb1c2(0x91))/0x6)+-parseInt(_0x3cb1c2(0x8e))/0x7+parseInt(_0x3cb1c2(0x82))/0x8*(parseInt(_0x3cb1c2(0xba))/0x9)+-parseInt(_0x3cb1c2(0xa3))/0xa*(-parseInt(_0x3cb1c2(0xa8))/0xb);if(_0x2765d6===_0x28cbe8)break;else _0x683fcc['push'](_0x683fcc['shift']());}catch(_0x791b5b){_0x683fcc['push'](_0x683fcc['shift']());}}}(a17_0x2b06,0xcf544));import a17_0x372ea6 from'chalk';import{BaseCommand}from'./command.js';function a17_0x2b06(){const _0x58075d=['\x0aTesting\x20with\x20Agent\x20SDK:','debug','bold','Use\x20\x22tdx\x20llm\x20projects\x22\x20to\x20see\x20available\x20projects','2713329XlqbcB','\x0aClaude\x20Code\x20Configuration:','getOrCreateDefaultProject','\x20\x20Project:','port','\x0a⚠️\x20\x20EXPERIMENTAL\x20FEATURE','llm','\x20\x20The\x20proxy\x20can\x20also\x20be\x20tested\x20with\x20Claude\x20Agent\x20SDK','dim','Agent\x20\x27','exit','getOrCreateDefaultAgent','✓\x20Proxy\x20server\x20stopped','8ZtKAMP','white','27590NMPVVC','\x27\x20not\x20found','\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_MODEL\x22:\x20\x22sonnet\x22','\x20\x20}','715094dHJgWM','\x20\x20Debug:','\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_AUTH_TOKEN\x22:\x20\x22dummy\x22,','server','\x20\x20Agent:','agent','9750804QStNdT','4PniZiH','2033464hUvvhv','1416GVuxFX','projects','\x20\x20Address:','execute','\x20\x20\x20\x20\x22env\x22:\x20{','Please\x20report\x20issues\x20at:\x20https://github.com/treasure-data/tdx/issues\x0a','Press\x20Ctrl+C\x20to\x20stop\x20the\x20server\x0a','http://0.0.0.0:','description','attributes','llm:proxy','Starting\x20proxy\x20server...','cyan','\x27\x20not\x20found\x20in\x20project','llmProject','NOT_FOUND','find','log','13660tcsAkd','This\x20proxy\x20server\x20is\x20experimental\x20and\x20may\x20have\x20limitations.','stop','\x20\x20Create\x20a\x20.claude/settings.local.json\x20file\x20with:\x0a','\x20\x20\x20\x20}','671jwKSUe','start','site','agents','\x20\x20https://docs.claude.com/en/docs/agent-sdk/typescript','760497btgPew','yellow','SIGTERM','\x20\x20Site:','Use\x20\x22tdx\x20llm\x20agents\x22\x20to\x20see\x20available\x20agents','[EXPERIMENTAL]\x20Start\x20LLM\x20proxy\x20server\x20for\x20Claude\x20Code\x20integration','green','Resolving\x20project\x20and\x20agent...','name'];a17_0x2b06=function(){return _0x58075d;};return a17_0x2b06();}import{ProxyServer}from'../proxy/server.js';import{SDKError,ErrorCode}from'../sdk/errors.js';async function getProjectIdOrDefault(_0x4b9186,_0x4fcc77){const _0x611148=a17_0x750e,{tdx:_0x18736c,options:_0x2fa03f}=_0x4b9186,_0x5492bc=_0x4fcc77||_0x2fa03f[_0x611148(0x9f)];if(_0x5492bc){const _0x5e338a=await _0x18736c[_0x611148(0x7b)]['projects'](),_0x1abd8f=_0x5e338a['find'](_0x55d7a0=>_0x55d7a0[_0x611148(0x9a)]['name']===_0x5492bc);if(!_0x1abd8f)throw new SDKError(ErrorCode[_0x611148(0xa0)],'Project\x20\x27'+_0x5492bc+_0x611148(0x85),undefined,{'helpText':_0x611148(0xb9)});return _0x1abd8f['id'];}const _0x29cce4=await _0x18736c[_0x611148(0x7b)][_0x611148(0xbc)]();return _0x29cce4['id'];}async function getAgentIdOrDefault(_0x1b8906,_0x3b4f69,_0x3606c7){const _0x3dc40f=a17_0x750e,{tdx:_0x4c4e05,options:_0xdade96}=_0x1b8906,_0x4bcd7c=_0x3606c7||_0xdade96['llmAgent'];if(_0x4bcd7c){const _0x52c471=await _0x4c4e05[_0x3dc40f(0x7b)][_0x3dc40f(0xab)](_0x3b4f69),_0x58c673=_0x52c471[_0x3dc40f(0xa1)](_0xca2882=>_0xca2882[_0x3dc40f(0x9a)][_0x3dc40f(0xb5)]===_0x4bcd7c);if(!_0x58c673)throw new SDKError(ErrorCode[_0x3dc40f(0xa0)],_0x3dc40f(0x7e)+_0x4bcd7c+_0x3dc40f(0x9e),undefined,{'helpText':_0x3dc40f(0xb1)});return _0x58c673['id'];}const _0xbea80f=await _0x4c4e05['llm'][_0x3dc40f(0x80)]();return _0xbea80f['id'];}export class LLMProxyCommand extends BaseCommand{[a17_0x309fea(0xb5)]=a17_0x309fea(0x9b);[a17_0x309fea(0x99)]=a17_0x309fea(0xb2);[a17_0x309fea(0x8b)];async[a17_0x309fea(0x94)](_0x1c42e1){const _0x37902e=a17_0x309fea,{tdx:_0x13ba4e,options:_0x41fb60}=_0x1c42e1;try{const _0x4c12ea=_0x41fb60,_0x80b381=_0x4c12ea[_0x37902e(0xbe)]||0xfa0,_0x1efe3e=_0x4c12ea['project'],_0x5c203b=_0x4c12ea[_0x37902e(0x8d)],_0x4dc5eb=_0x4c12ea[_0x37902e(0xb7)];console['log'](a17_0x372ea6['dim'](_0x37902e(0xb4)));const _0x2c9d07=await getProjectIdOrDefault(_0x1c42e1,_0x1efe3e),_0x3b52c7=await getAgentIdOrDefault(_0x1c42e1,_0x2c9d07,_0x5c203b),_0x4f5008=await _0x13ba4e[_0x37902e(0x7b)][_0x37902e(0x92)](),_0x284fce=_0x4f5008[_0x37902e(0xa1)](_0x49b7f7=>_0x49b7f7['id']===_0x2c9d07),_0x4545d9=await _0x13ba4e[_0x37902e(0x7b)][_0x37902e(0xab)](_0x2c9d07),_0x43b81a=_0x4545d9['find'](_0x208f62=>_0x208f62['id']===_0x3b52c7);console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x7d)](_0x37902e(0x9c))),this['server']=new ProxyServer({'port':_0x80b381,'projectId':_0x2c9d07,'agentId':_0x3b52c7,'tdx':_0x13ba4e,'debug':_0x4dc5eb}),await this[_0x37902e(0x8b)][_0x37902e(0xa9)](),console[_0x37902e(0xa2)](a17_0x372ea6['yellow'][_0x37902e(0xb8)](_0x37902e(0xbf))),console[_0x37902e(0xa2)](a17_0x372ea6['yellow'](_0x37902e(0xa4))),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0xae)](_0x37902e(0x96))),console[_0x37902e(0xa2)](a17_0x372ea6['green'][_0x37902e(0xb8)]('✓\x20TD\x20LLM\x20Proxy\x20Server\x20is\x20running!\x0a')),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x9d)]('Server\x20Configuration:')),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x7d)](_0x37902e(0x93)),a17_0x372ea6[_0x37902e(0x83)](_0x37902e(0x98)+_0x80b381)),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x7d)](_0x37902e(0xbd)),a17_0x372ea6[_0x37902e(0x83)](_0x284fce?.[_0x37902e(0x9a)]['name']||_0x2c9d07)),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x7d)](_0x37902e(0x8c)),a17_0x372ea6[_0x37902e(0x83)](_0x43b81a?.['attributes'][_0x37902e(0xb5)]||_0x3b52c7)),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x7d)](_0x37902e(0xb0)),a17_0x372ea6['white'](_0x41fb60[_0x37902e(0xaa)]));_0x4dc5eb&&console[_0x37902e(0xa2)](a17_0x372ea6['yellow'](_0x37902e(0x89)),a17_0x372ea6[_0x37902e(0x83)]('enabled\x20(request/response\x20logging\x20to\x20stderr)'));console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x9d)](_0x37902e(0xbb))),console[_0x37902e(0xa2)](a17_0x372ea6['dim'](_0x37902e(0xa6))),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x83)]('\x20\x20{')),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0x83)](_0x37902e(0x95))),console[_0x37902e(0xa2)](a17_0x372ea6['white']('\x20\x20\x20\x20\x20\x20\x22ANTHROPIC_BASE_URL\x22:\x20\x22http://127.0.0.1:'+_0x80b381+'\x22,')),console['log'](a17_0x372ea6[_0x37902e(0x83)](_0x37902e(0x8a))),console['log'](a17_0x372ea6['white'](_0x37902e(0x86))),console['log'](a17_0x372ea6[_0x37902e(0x83)](_0x37902e(0xa7))),console['log'](a17_0x372ea6[_0x37902e(0x83)](_0x37902e(0x87))),console['log'](a17_0x372ea6['cyan'](_0x37902e(0xb6))),console['log'](a17_0x372ea6[_0x37902e(0x7d)](_0x37902e(0x7c))),console['log'](a17_0x372ea6['dim'](_0x37902e(0xac))),console['log'](a17_0x372ea6[_0x37902e(0x7d)]('\x20\x20The\x20SDK\x20reads\x20.claude/settings.json\x20for\x20ANTHROPIC_BASE_URL\x0a')),console[_0x37902e(0xa2)](a17_0x372ea6[_0x37902e(0xae)](_0x37902e(0x97)));const _0x1b538a=async()=>{const _0x374159=_0x37902e;console[_0x374159(0xa2)](a17_0x372ea6[_0x374159(0x7d)]('\x0a\x0aShutting\x20down\x20proxy\x20server...')),this[_0x374159(0x8b)]&&await this[_0x374159(0x8b)]['stop'](),console[_0x374159(0xa2)](a17_0x372ea6[_0x374159(0xb3)](_0x374159(0x81))),process[_0x374159(0x7f)](0x0);};return process['on']('SIGINT',_0x1b538a),process['on'](_0x37902e(0xaf),_0x1b538a),await new Promise(()=>{}),0x0;}catch(_0x4672aa){this[_0x37902e(0x8b)]&&await this[_0x37902e(0x8b)][_0x37902e(0xa5)]();throw _0x4672aa;}}}
@@ -1 +1 @@
1
- const a18_0xd3cb24=a18_0x4250;(function(_0x237613,_0x4f3210){const _0x56c6cc=a18_0x4250,_0x4a2d3a=_0x237613();while(!![]){try{const _0x34aacc=-parseInt(_0x56c6cc(0x1ec))/0x1*(parseInt(_0x56c6cc(0x201))/0x2)+parseInt(_0x56c6cc(0x1fe))/0x3*(parseInt(_0x56c6cc(0x1f6))/0x4)+-parseInt(_0x56c6cc(0x1fd))/0x5*(parseInt(_0x56c6cc(0x1ee))/0x6)+-parseInt(_0x56c6cc(0x1f5))/0x7*(-parseInt(_0x56c6cc(0x1ef))/0x8)+-parseInt(_0x56c6cc(0x1fa))/0x9*(-parseInt(_0x56c6cc(0x203))/0xa)+-parseInt(_0x56c6cc(0x1f3))/0xb+-parseInt(_0x56c6cc(0x1f4))/0xc*(parseInt(_0x56c6cc(0x1f7))/0xd);if(_0x34aacc===_0x4f3210)break;else _0x4a2d3a['push'](_0x4a2d3a['shift']());}catch(_0x16737a){_0x4a2d3a['push'](_0x4a2d3a['shift']());}}}(a18_0x5245,0x26fb8));function a18_0x5245(){const _0x31dca7=['map','config','24814qBUpAX','Error:\x20','2060810BiILeu','error','name','execute','1LYdGtR','\x20\x20Global:\x20~/.config/tdx/tdx.json','11814ZwHgDE','80plUKJY','description','length','scope','1429065nOiQli','3838152POMseT','189427DTjRus','160CWHckI','13hZTEzR','No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','9UEdIiD','log','List\x20all\x20available\x20profiles','95RceIoI','13692rCwCUS'];a18_0x5245=function(){return _0x31dca7;};return a18_0x5245();}import{BaseCommand}from'./command.js';function a18_0x4250(_0x59c47a,_0x5d993a){const _0x524518=a18_0x5245();return a18_0x4250=function(_0x42506c,_0x1674c7){_0x42506c=_0x42506c-0x1ec;let _0x212b5b=_0x524518[_0x42506c];return _0x212b5b;},a18_0x4250(_0x59c47a,_0x5d993a);}import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';import{handleSDKOutput}from'../utils/command-output.js';export class ProfilesCommand extends BaseCommand{[a18_0xd3cb24(0x205)]='profiles';[a18_0xd3cb24(0x1f0)]=a18_0xd3cb24(0x1fc);async[a18_0xd3cb24(0x206)](_0x35d803){const _0x1e0dae=a18_0xd3cb24,{options:_0x29b9a0}=_0x35d803;try{const _0x528cb6=listProfiles(),_0x3264f9=getActiveProfile();if(_0x528cb6[_0x1e0dae(0x1f1)]===0x0)return console[_0x1e0dae(0x1fb)](_0x1e0dae(0x1f8)),console[_0x1e0dae(0x1fb)](_0x1e0dae(0x1f9)),console['log'](_0x1e0dae(0x1ed)),0x0;const _0x58ebd4=_0x528cb6[_0x1e0dae(0x1ff)](_0x40e87a=>{const _0x5d0bc5=_0x1e0dae,_0x4aa6a6=_0x40e87a['name']===_0x3264f9,_0x2d4d7b=getProfileParams(_0x40e87a['config']);return{'name':_0x40e87a['name'],'active':_0x4aa6a6,'scope':_0x40e87a[_0x5d0bc5(0x1f2)],'description':_0x40e87a[_0x5d0bc5(0x200)][_0x5d0bc5(0x1f0)]||'','params':_0x2d4d7b};});return await handleSDKOutput(_0x58ebd4,_0x29b9a0),0x0;}catch(_0x16a74f){return _0x16a74f instanceof Error&&console[_0x1e0dae(0x204)](_0x1e0dae(0x202)+_0x16a74f['message']),0x1;}}}
1
+ const a18_0x2616c0=a18_0x2f3d;function a18_0x3de6(){const _0xdc1e72=['100UnDUrI','559542Xrmddx','\x20\x20Local:\x20\x20(project\x20folder)/tdx.json','description','List\x20all\x20available\x20profiles','305816CMtVHO','profiles','name','Error:\x20','51180KgMpqy','map','message','No\x20profiles\x20found.\x20Define\x20profiles\x20in\x20tdx.json:\x0a','2226222WnWrHm','101155EhJXQM','log','\x20\x20Global:\x20~/.config/tdx/tdx.json','1887744wSwnZn','675kadWbd','7232281oRRbaG','config','scope'];a18_0x3de6=function(){return _0xdc1e72;};return a18_0x3de6();}function a18_0x2f3d(_0x3b659b,_0x4254b2){const _0x3de6ba=a18_0x3de6();return a18_0x2f3d=function(_0x2f3dc1,_0x232aaf){_0x2f3dc1=_0x2f3dc1-0x181;let _0x4b213a=_0x3de6ba[_0x2f3dc1];return _0x4b213a;},a18_0x2f3d(_0x3b659b,_0x4254b2);}(function(_0x4ce2c6,_0x540060){const _0x30b007=a18_0x2f3d,_0x5eabfa=_0x4ce2c6();while(!![]){try{const _0x25924d=-parseInt(_0x30b007(0x18c))/0x1+-parseInt(_0x30b007(0x190))/0x2+parseInt(_0x30b007(0x184))/0x3+-parseInt(_0x30b007(0x183))/0x4*(parseInt(_0x30b007(0x191))/0x5)+parseInt(_0x30b007(0x194))/0x6+-parseInt(_0x30b007(0x196))/0x7+-parseInt(_0x30b007(0x188))/0x8*(-parseInt(_0x30b007(0x195))/0x9);if(_0x25924d===_0x540060)break;else _0x5eabfa['push'](_0x5eabfa['shift']());}catch(_0x5a39ae){_0x5eabfa['push'](_0x5eabfa['shift']());}}}(a18_0x3de6,0xa2552));import{BaseCommand}from'./command.js';import{listProfiles,getActiveProfile,getProfileParams}from'../core/profile.js';import{handleSDKOutput}from'../utils/command-output.js';export class ProfilesCommand extends BaseCommand{[a18_0x2616c0(0x18a)]=a18_0x2616c0(0x189);['description']=a18_0x2616c0(0x187);async['execute'](_0x38c663){const _0x5c418c=a18_0x2616c0,{options:_0x22210e}=_0x38c663;try{const _0x3e8c00=listProfiles(),_0x1cca7b=getActiveProfile();if(_0x3e8c00['length']===0x0)return console['log'](_0x5c418c(0x18f)),console['log'](_0x5c418c(0x185)),console[_0x5c418c(0x192)](_0x5c418c(0x193)),0x0;const _0x46881f=_0x3e8c00[_0x5c418c(0x18d)](_0x30084c=>{const _0x3d514d=_0x5c418c,_0x4d4f14=_0x30084c[_0x3d514d(0x18a)]===_0x1cca7b,_0x9af858=getProfileParams(_0x30084c[_0x3d514d(0x181)]);return{'name':_0x30084c[_0x3d514d(0x18a)],'active':_0x4d4f14,'scope':_0x30084c[_0x3d514d(0x182)],'description':_0x30084c[_0x3d514d(0x181)][_0x3d514d(0x186)]||'','params':_0x9af858};});return await handleSDKOutput(_0x46881f,_0x22210e),0x0;}catch(_0x4cc7e1){return _0x4cc7e1 instanceof Error&&console['error'](_0x5c418c(0x18b)+_0x4cc7e1[_0x5c418c(0x18e)]),0x1;}}}