@treasuredata/tdx 0.1.7 → 0.1.8
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.
- package/README.md +72 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/trino-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.d.ts +24 -0
- package/dist/commands/llm-proxy.d.ts.map +1 -0
- package/dist/commands/llm-proxy.js +1 -0
- package/dist/commands/llm-proxy.js.map +1 -0
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.d.ts +44 -0
- package/dist/proxy/anthropic-adapter.d.ts.map +1 -0
- package/dist/proxy/anthropic-adapter.js +1 -0
- package/dist/proxy/anthropic-adapter.js.map +1 -0
- package/dist/proxy/server.d.ts +59 -0
- package/dist/proxy/server.d.ts.map +1 -0
- package/dist/proxy/server.js +1 -0
- package/dist/proxy/server.js.map +1 -0
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/anthropic.d.ts +139 -0
- package/dist/types/anthropic.d.ts.map +1 -0
- package/dist/types/anthropic.js +1 -0
- package/dist/types/anthropic.js.map +1 -0
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +3 -1
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x116566,_0x45900b){const _0x1533e2=a61_0x1b4c,_0x430dd8=_0x116566();while(!![]){try{const _0x5db1eb=parseInt(_0x1533e2(0x125))/0x1+parseInt(_0x1533e2(0x12e))/0x2*(-parseInt(_0x1533e2(0x134))/0x3)+-parseInt(_0x1533e2(0x127))/0x4+parseInt(_0x1533e2(0x122))/0x5+parseInt(_0x1533e2(0x12c))/0x6+parseInt(_0x1533e2(0x12b))/0x7*(parseInt(_0x1533e2(0x11d))/0x8)+-parseInt(_0x1533e2(0x128))/0x9*(parseInt(_0x1533e2(0x129))/0xa);if(_0x5db1eb===_0x45900b)break;else _0x430dd8['push'](_0x430dd8['shift']());}catch(_0x5bb23){_0x430dd8['push'](_0x430dd8['shift']());}}}(a61_0x1d79,0x196d5));export async function*parseSSEStream(_0x5d12d2){const _0x5bd227=a61_0x1b4c;if(!_0x5d12d2[_0x5bd227(0x12d)])throw new Error(_0x5bd227(0x132));const _0x343309=_0x5d12d2[_0x5bd227(0x12d)][_0x5bd227(0x130)](),_0x32a8bf=new TextDecoder();let _0x5957bb='',_0x25f8e7={};try{while(!![]){const {done:_0x3ed859,value:_0xac373a}=await _0x343309[_0x5bd227(0x120)]();if(_0x3ed859){_0x25f8e7[_0x5bd227(0x123)]&&(yield parseSSEData(_0x25f8e7[_0x5bd227(0x123)]));break;}_0x5957bb+=_0x32a8bf[_0x5bd227(0x124)](_0xac373a,{'stream':!![]});const _0x55cee4=_0x5957bb[_0x5bd227(0x121)]('\x0a');_0x5957bb=_0x55cee4[_0x5bd227(0x11c)]()||'';for(const _0x129bd9 of _0x55cee4){if(_0x129bd9[_0x5bd227(0x131)]()===''){_0x25f8e7['data']&&(yield parseSSEData(_0x25f8e7[_0x5bd227(0x123)]),_0x25f8e7={});continue;}if(_0x129bd9['startsWith'](':'))continue;const _0x41970c=_0x129bd9[_0x5bd227(0x11f)](':');if(_0x41970c===-0x1)continue;const _0x58ee06=_0x129bd9[_0x5bd227(0x11e)](0x0,_0x41970c);let _0x24e99d=_0x129bd9[_0x5bd227(0x11e)](_0x41970c+0x1);_0x24e99d['startsWith']('\x20')&&(_0x24e99d=_0x24e99d[_0x5bd227(0x11e)](0x1));switch(_0x58ee06){case _0x5bd227(0x12a):_0x25f8e7['event']=_0x24e99d;break;case'data':_0x25f8e7[_0x5bd227(0x123)]=_0x25f8e7[_0x5bd227(0x123)]?_0x25f8e7['data']+'\x0a'+_0x24e99d:_0x24e99d;break;case'id':_0x25f8e7['id']=_0x24e99d;break;}}}}finally{_0x343309[_0x5bd227(0x133)]();}}function a61_0x1b4c(_0x9231c3,_0x2e13bb){const _0x1d798c=a61_0x1d79();return a61_0x1b4c=function(_0x1b4ccb,_0x1f49e4){_0x1b4ccb=_0x1b4ccb-0x11c;let _0x530c30=_0x1d798c[_0x1b4ccb];return _0x530c30;},a61_0x1b4c(_0x9231c3,_0x2e13bb);}function parseSSEData(_0x3b8e76){const _0x4f3e41=a61_0x1b4c;try{return JSON[_0x4f3e41(0x12f)](_0x3b8e76);}catch(_0x360c78){throw new Error(_0x4f3e41(0x126)+_0x3b8e76,{'cause':_0x360c78});}}function a61_0x1d79(){const _0x18cd6c=['339888KACFes','slice','indexOf','read','split','1012565stSDVL','data','decode','40940UreEmV','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','366128LgmMIh','483282EOVVQc','60utVKHe','event','28jPuPac','764370fdbEkU','body','2gLyvKr','parse','getReader','trim','Response\x20body\x20is\x20null','releaseLock','68769oKbrMV','pop'];a61_0x1d79=function(){return _0x18cd6c;};return a61_0x1d79();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a62_0x58f5(){const _0x4839f1=['length','5758836HjpvlN','8838641wmbvem','964640xSqqCC','random','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','slice','test','30iccCUI','15104650fvXbGV','20WSGHTx','138324yQGeke','USER','USERNAME','replace','3EhFnCG','floor','env','trim','toString','repeat','padStart','substring','3560gLBffr','unknown','13905FWThaU','1133DcXezw','82024CWGDyz'];a62_0x58f5=function(){return _0x4839f1;};return a62_0x58f5();}(function(_0xe00dce,_0x40f216){const _0xccfa09=a62_0x3081,_0x549539=_0xe00dce();while(!![]){try{const _0x5a9848=-parseInt(_0xccfa09(0x6e))/0x1*(parseInt(_0xccfa09(0x79))/0x2)+parseInt(_0xccfa09(0x7e))/0x3*(-parseInt(_0xccfa09(0x70))/0x4)+-parseInt(_0xccfa09(0x72))/0x5*(-parseInt(_0xccfa09(0x77))/0x6)+-parseInt(_0xccfa09(0x71))/0x7+-parseInt(_0xccfa09(0x6a))/0x8*(-parseInt(_0xccfa09(0x6c))/0x9)+parseInt(_0xccfa09(0x78))/0xa+-parseInt(_0xccfa09(0x6d))/0xb*(-parseInt(_0xccfa09(0x7a))/0xc);if(_0x5a9848===_0x40f216)break;else _0x549539['push'](_0x549539['shift']());}catch(_0x4597f2){_0x549539['push'](_0x549539['shift']());}}}(a62_0x58f5,0xc9fa3));import a62_0x5dd38a from'string-width';function a62_0x3081(_0xb73807,_0x35db38){const _0x58f517=a62_0x58f5();return a62_0x3081=function(_0x3081d5,_0x31d076){_0x3081d5=_0x3081d5-0x69;let _0x87eaee=_0x58f517[_0x3081d5];return _0x87eaee;},a62_0x3081(_0xb73807,_0x35db38);}export function stringWidth(_0x4f9c7c){return a62_0x5dd38a(_0x4f9c7c);}export function padEnd(_0x3316b0,_0x308db7){const _0x365b16=a62_0x3081,_0x47c0e9=stringWidth(_0x3316b0);if(_0x47c0e9>=_0x308db7)return _0x3316b0;return _0x3316b0+'\x20'[_0x365b16(0x83)](_0x308db7-_0x47c0e9);}export function padStart(_0x2bf237,_0x23d473){const _0x19bc52=stringWidth(_0x2bf237);if(_0x19bc52>=_0x23d473)return _0x2bf237;return'\x20'['repeat'](_0x23d473-_0x19bc52)+_0x2bf237;}export function centerAlign(_0xcb6e70,_0x1f71c1){const _0x537188=a62_0x3081,_0x3092f1=stringWidth(_0xcb6e70);if(_0x3092f1>_0x1f71c1){if(_0x1f71c1<=0x1)return'…'[_0x537188(0x69)](0x0,_0x1f71c1);let _0x280f03=_0xcb6e70;while(stringWidth(_0x280f03+'…')>_0x1f71c1){_0x280f03=_0x280f03[_0x537188(0x75)](0x0,-0x1);}return _0x280f03+'…';}if(_0x3092f1===_0x1f71c1)return _0xcb6e70;const _0x27d9ee=_0x1f71c1-_0x3092f1,_0x53cc4d=Math[_0x537188(0x7f)](_0x27d9ee/0x2),_0x4ed1a2=_0x27d9ee-_0x53cc4d;return'\x20'[_0x537188(0x83)](_0x53cc4d)+_0xcb6e70+'\x20'[_0x537188(0x83)](_0x4ed1a2);}export function escapeStringLiteral(_0x49f6ef){const _0x47e125=a62_0x3081;if(!_0x49f6ef||_0x49f6ef[_0x47e125(0x81)]()[_0x47e125(0x6f)]===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x5359cf=_0x49f6ef['replace'](/'/g,'\x27\x27');return'\x27'+_0x5359cf+'\x27';}export function globToLike(_0x5d9600){const _0x579cc7=a62_0x3081;let _0x56baf5=_0x5d9600['replace'](/\\/g,'\x5c\x5c')[_0x579cc7(0x7d)](/%/g,'\x5c%')[_0x579cc7(0x7d)](/_/g,'\x5c_');return _0x56baf5=_0x56baf5[_0x579cc7(0x7d)](/\*/g,'%')[_0x579cc7(0x7d)](/\?/g,'_'),_0x56baf5;}export function buildLikePattern(_0x3699ef){const _0x445ddd=a62_0x3081;if(!_0x3699ef||_0x3699ef[_0x445ddd(0x81)]()[_0x445ddd(0x6f)]===0x0)throw new Error(_0x445ddd(0x74));const _0x124598=globToLike(_0x3699ef),_0x1d7266=_0x124598[_0x445ddd(0x7d)](/'/g,'\x27\x27');return'\x27'+_0x1d7266+'\x27';}export function matchGlobPattern(_0x2e50d1,_0x468466){const _0x12b481=a62_0x3081,_0x202290=_0x468466[_0x12b481(0x7d)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x12b481(0x7d)](/\*/g,'.*')[_0x12b481(0x7d)](/\?/g,'.'),_0x13d2c1=new RegExp('^'+_0x202290+'$');return _0x13d2c1[_0x12b481(0x76)](_0x2e50d1);}export function getSanitizedUsername(){const _0x66a7ae=a62_0x3081,_0x38c447=process[_0x66a7ae(0x80)][_0x66a7ae(0x7b)]||process['env'][_0x66a7ae(0x7c)]||_0x66a7ae(0x6b);return _0x38c447[_0x66a7ae(0x7d)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x2f859d=a62_0x3081,_0x4b7060=Math['floor'](Math[_0x2f859d(0x73)]()*0xfffff);return _0x4b7060[_0x2f859d(0x82)](0x10)[_0x2f859d(0x84)](0x5,'0');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2bb32d,_0x1a6e9c){const _0x5f6043=a63_0x5684,_0x3d9c64=_0x2bb32d();while(!![]){try{const _0x4e8d9e=-parseInt(_0x5f6043(0x1d7))/0x1*(-parseInt(_0x5f6043(0x1c4))/0x2)+parseInt(_0x5f6043(0x1cc))/0x3*(-parseInt(_0x5f6043(0x1cd))/0x4)+parseInt(_0x5f6043(0x1d0))/0x5+-parseInt(_0x5f6043(0x1c3))/0x6*(-parseInt(_0x5f6043(0x1bf))/0x7)+-parseInt(_0x5f6043(0x1c7))/0x8*(parseInt(_0x5f6043(0x1d8))/0x9)+-parseInt(_0x5f6043(0x1c5))/0xa+-parseInt(_0x5f6043(0x1d2))/0xb*(parseInt(_0x5f6043(0x1d4))/0xc);if(_0x4e8d9e===_0x1a6e9c)break;else _0x3d9c64['push'](_0x3d9c64['shift']());}catch(_0x290f4d){_0x3d9c64['push'](_0x3d9c64['shift']());}}}(a63_0x3337,0x383bf));function hasWildcard(_0x310981){const _0x2b8aec=a63_0x5684;return _0x310981['includes']('*')||_0x310981[_0x2b8aec(0x1cb)]('?');}export function parseTableReference(_0x427f01){const _0x162d66=a63_0x5684;if(!_0x427f01||_0x427f01[_0x162d66(0x1c6)]()['length']===0x0)throw new Error(_0x162d66(0x1ca));const _0x143d37=_0x427f01[_0x162d66(0x1c6)](),_0x418f9a={'original':_0x143d37},_0x3eb92e=_0x143d37[_0x162d66(0x1be)]('.');if(_0x3eb92e[_0x162d66(0x1ce)]===0x1){const _0x5f1b86=_0x3eb92e[0x0];if(!_0x5f1b86)throw new Error(_0x162d66(0x1d3));_0x418f9a[_0x162d66(0x1d9)]=_0x5f1b86;}else{if(_0x3eb92e['length']===0x2){const [_0x349398,_0x247e8c]=_0x3eb92e;if(!_0x349398)throw new Error(_0x162d66(0x1d6));if(!_0x247e8c)throw new Error(_0x162d66(0x1bd));_0x418f9a['database']=_0x349398,_0x418f9a[_0x162d66(0x1d9)]=_0x247e8c;}else{if(_0x3eb92e[_0x162d66(0x1ce)]===0x3){const [_0x34c956,_0x414fc8,_0x1be71f]=_0x3eb92e;if(!_0x34c956||!_0x414fc8||!_0x1be71f)throw new Error(_0x162d66(0x1d5));_0x418f9a[_0x162d66(0x1cf)]=_0x34c956,_0x418f9a['database']=_0x414fc8,_0x418f9a[_0x162d66(0x1d9)]=_0x1be71f;}else throw new Error(_0x162d66(0x1c9));}}return _0x418f9a;}function a63_0x3337(){const _0x3ce552=['2687230QtviMk','trim','185176ZRiaax','push','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','includes','540693WcBOYJ','4fBweir','length','catalog','1746975qfcBHD','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','999163xTsMmV','Pattern\x20cannot\x20be\x20just\x20a\x20dot','12bwPwPl','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','43399wjtJhZ','9bBaIjs','table','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','split','14ePkzLf','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','database','join','1071228mOfKcb','4NehGmP'];a63_0x3337=function(){return _0x3ce552;};return a63_0x3337();}export function formatTableReference(_0x5f3f1f){const _0x27c88d=a63_0x5684,_0x15e4df=[];return _0x5f3f1f[_0x27c88d(0x1cf)]&&_0x15e4df[_0x27c88d(0x1c8)](_0x5f3f1f[_0x27c88d(0x1cf)]),_0x5f3f1f[_0x27c88d(0x1c1)]&&_0x15e4df[_0x27c88d(0x1c8)](_0x5f3f1f[_0x27c88d(0x1c1)]),_0x5f3f1f[_0x27c88d(0x1d9)]&&_0x15e4df[_0x27c88d(0x1c8)](_0x5f3f1f['table']),_0x15e4df[_0x27c88d(0x1c2)]('.');}export function validateTableListReference(_0x33a527){return undefined;}function a63_0x5684(_0x46c249,_0x1e781f){const _0x3337af=a63_0x3337();return a63_0x5684=function(_0x568452,_0x36be30){_0x568452=_0x568452-0x1bd;let _0x4dc655=_0x3337af[_0x568452];return _0x4dc655;},a63_0x5684(_0x46c249,_0x1e781f);}export function validateTableDescribeReference(_0x3ec56a){const _0x2072bf=a63_0x5684;if(!_0x3ec56a['table'])return _0x2072bf(0x1c0);if(_0x3ec56a[_0x2072bf(0x1c1)]&&hasWildcard(_0x3ec56a[_0x2072bf(0x1c1)]))return _0x2072bf(0x1d1);if(hasWildcard(_0x3ec56a[_0x2072bf(0x1d9)]))return _0x2072bf(0x1da);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x2dd966=a64_0x36a0;(function(_0x234ea7,_0x34421f){const _0x11b9aa=a64_0x36a0,_0x41e5a8=_0x234ea7();while(!![]){try{const _0x426b76=parseInt(_0x11b9aa(0xb6))/0x1*(parseInt(_0x11b9aa(0xbd))/0x2)+parseInt(_0x11b9aa(0xbe))/0x3+-parseInt(_0x11b9aa(0xbf))/0x4+parseInt(_0x11b9aa(0xb4))/0x5*(-parseInt(_0x11b9aa(0xb9))/0x6)+parseInt(_0x11b9aa(0xb5))/0x7+parseInt(_0x11b9aa(0xba))/0x8*(parseInt(_0x11b9aa(0xbb))/0x9)+-parseInt(_0x11b9aa(0xbc))/0xa;if(_0x426b76===_0x34421f)break;else _0x41e5a8['push'](_0x41e5a8['shift']());}catch(_0x51a2c4){_0x41e5a8['push'](_0x41e5a8['shift']());}}}(a64_0x5a92,0x2d22f));function a64_0x36a0(_0x3163ec,_0x1a462d){const _0x5a92c8=a64_0x5a92();return a64_0x36a0=function(_0x36a099,_0xef6b00){_0x36a099=_0x36a099-0xb4;let _0x467779=_0x5a92c8[_0x36a099];return _0x467779;},a64_0x36a0(_0x3163ec,_0x1a462d);}export const WORKFLOW_FILE_EXTENSION=a64_0x2dd966(0xb8);function a64_0x5a92(){const _0x5253b7=['11680SzzvTP','492358OxPYrG','620313UKOxYw','166332uxNZEw','1559215xiTfEP','502733vqzpnE','1mgxWcm','startsWith','.dig','6rsGRiO','128StlfsT','8271RmyyWF'];a64_0x5a92=function(){return _0x5253b7;};return a64_0x5a92();}export function shouldIncludeInArchive(_0x1546ba){const _0x1bb389=a64_0x2dd966;if(_0x1546ba==='.digdag')return!![];if(_0x1546ba[_0x1bb389(0xb7)]('.'))return![];return!![];}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treasuredata/tdx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "AI-native CLI for Treasure Data - optimized for both human engineers and AI coding assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -60,11 +60,13 @@
|
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://github.com/treasure-data/tdx#readme",
|
|
62
62
|
"dependencies": {
|
|
63
|
+
"@fastify/cors": "^10.0.1",
|
|
63
64
|
"@types/json-bigint": "^1.0.4",
|
|
64
65
|
"chalk": "^5.3.0",
|
|
65
66
|
"cli-table3": "^0.6.5",
|
|
66
67
|
"commander": "^14.0.2",
|
|
67
68
|
"dotenv": "^17.2.3",
|
|
69
|
+
"fastify": "^5.2.0",
|
|
68
70
|
"json-bigint": "^1.0.0",
|
|
69
71
|
"ora": "^9.0.0",
|
|
70
72
|
"string-width": "^8.1.0",
|