@treasuredata/tdx 0.1.15 → 0.1.16

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 (80) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/client/cdp-client.js +1 -1
  3. package/dist/client/http-client.js +1 -1
  4. package/dist/client/llm-client.js +1 -1
  5. package/dist/client/rate-limiter.js +1 -1
  6. package/dist/client/td-client.js +1 -1
  7. package/dist/client/trino-client.js +1 -1
  8. package/dist/client/workflow-client.js +1 -1
  9. package/dist/commands/activations.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/chat-command.js +1 -1
  12. package/dist/commands/claude-command.js +1 -1
  13. package/dist/commands/command.js +1 -1
  14. package/dist/commands/context-command.js +1 -1
  15. package/dist/commands/databases.js +1 -1
  16. package/dist/commands/describe.js +1 -1
  17. package/dist/commands/job-command.js +1 -1
  18. package/dist/commands/llm-command.js +1 -1
  19. package/dist/commands/llm-proxy.js +1 -1
  20. package/dist/commands/parent-segment-command.js +1 -1
  21. package/dist/commands/profiles-command.js +1 -1
  22. package/dist/commands/query-command.js +1 -1
  23. package/dist/commands/segment-command.js +1 -1
  24. package/dist/commands/segment-create-command.js +1 -1
  25. package/dist/commands/segment-fields-command.js +1 -1
  26. package/dist/commands/segment-pwd-command.js +1 -1
  27. package/dist/commands/segment-update-command.js +1 -1
  28. package/dist/commands/segment-use-command.js +1 -1
  29. package/dist/commands/segments.js +1 -1
  30. package/dist/commands/show.js +1 -1
  31. package/dist/commands/tables.js +1 -1
  32. package/dist/commands/use-command.js +1 -1
  33. package/dist/commands/workflow-command.js +1 -1
  34. package/dist/core/auth.js +1 -1
  35. package/dist/core/config.js +1 -1
  36. package/dist/core/global-context.js +1 -1
  37. package/dist/core/profile.js +1 -1
  38. package/dist/core/project-config.js +1 -1
  39. package/dist/core/session.js +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/proxy/anthropic-adapter.d.ts +1 -0
  42. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  43. package/dist/proxy/anthropic-adapter.js +1 -1
  44. package/dist/proxy/anthropic-adapter.js.map +1 -1
  45. package/dist/proxy/server.js +1 -1
  46. package/dist/sdk/api.js +1 -1
  47. package/dist/sdk/database.js +1 -1
  48. package/dist/sdk/errors.js +1 -1
  49. package/dist/sdk/index.js +1 -1
  50. package/dist/sdk/job.js +1 -1
  51. package/dist/sdk/llm.js +1 -1
  52. package/dist/sdk/query.js +1 -1
  53. package/dist/sdk/segment.js +1 -1
  54. package/dist/sdk/table.js +1 -1
  55. package/dist/sdk/workflow.js +1 -1
  56. package/dist/types/endpoints.js +1 -1
  57. package/dist/types/index.js +1 -1
  58. package/dist/utils/agent-ref-parser.js +1 -1
  59. package/dist/utils/chat-cache.js +1 -1
  60. package/dist/utils/colors.js +1 -1
  61. package/dist/utils/command-output.js +1 -1
  62. package/dist/utils/file-permissions.js +1 -1
  63. package/dist/utils/format-detector.js +1 -1
  64. package/dist/utils/formatters.js +1 -1
  65. package/dist/utils/json-loader.js +1 -1
  66. package/dist/utils/model-aliases.js +1 -1
  67. package/dist/utils/option-validation.js +1 -1
  68. package/dist/utils/port.js +1 -1
  69. package/dist/utils/process.js +1 -1
  70. package/dist/utils/prompt.js +1 -1
  71. package/dist/utils/segment-path-parser.js +1 -1
  72. package/dist/utils/segment-ref-parser.js +1 -1
  73. package/dist/utils/spinner.js +1 -1
  74. package/dist/utils/sql-parser.js +1 -1
  75. package/dist/utils/sse-parser.js +1 -1
  76. package/dist/utils/string-utils.js +1 -1
  77. package/dist/utils/table-ref-parser.js +1 -1
  78. package/dist/utils/tree-formatter.js +1 -1
  79. package/dist/utils/workflow-utils.js +1 -1
  80. package/package.json +1 -1
@@ -1 +1 @@
1
- function a27_0xb566(_0x26837e,_0x252558){const _0x26d3d9=a27_0x26d3();return a27_0xb566=function(_0xb566d1,_0x47f7bc){_0xb566d1=_0xb566d1-0x195;let _0x4327b8=_0x26d3d9[_0xb566d1];return _0x4327b8;},a27_0xb566(_0x26837e,_0x252558);}const a27_0x45ba9c=a27_0xb566;(function(_0x2c2f3b,_0x79f54c){const _0x4da0dd=a27_0xb566,_0x492dd5=_0x2c2f3b();while(!![]){try{const _0x2d0aa1=-parseInt(_0x4da0dd(0x198))/0x1+parseInt(_0x4da0dd(0x197))/0x2+-parseInt(_0x4da0dd(0x19c))/0x3+parseInt(_0x4da0dd(0x1a9))/0x4*(parseInt(_0x4da0dd(0x19b))/0x5)+-parseInt(_0x4da0dd(0x1a5))/0x6*(-parseInt(_0x4da0dd(0x1bc))/0x7)+parseInt(_0x4da0dd(0x199))/0x8*(-parseInt(_0x4da0dd(0x1b0))/0x9)+parseInt(_0x4da0dd(0x1ba))/0xa*(-parseInt(_0x4da0dd(0x1b6))/0xb);if(_0x2d0aa1===_0x79f54c)break;else _0x492dd5['push'](_0x492dd5['shift']());}catch(_0x4add94){_0x492dd5['push'](_0x492dd5['shift']());}}}(a27_0x26d3,0x3af04));function a27_0x26d3(){const _0x4e1641=['7prNinl','fullPath','length','Context\x20set\x20to:\x20','type','Error:\x20Path\x20is\x20required','folderPath','execute','name','join','session','split','604532cLRRiq','158929JzdyXZ','24ASfyex','Resolving\x20path\x20\x27','1756210CQVntk','55470hekvXV','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Folder\x20ID:\x20','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','resolvePathToResource','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','error','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','1986834zOKyUw','Resolved\x20relative\x20path\x20to:\x20','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','Parent\x20ID:\x20','4dgmVph','slice','verbose','Usage:\x20tdx\x20segment\x20use\x20<path>','Use:\x20tdx\x20segment\x20use\x20','log','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','1439595qFFzIL','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','folderId','parentName','Target\x20path:\x20','407ahsaDW','segment:use','segmentPath','segment','23230xriZbv','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context'];a27_0x26d3=function(){return _0x4e1641;};return a27_0x26d3();}import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a27_0x45ba9c(0x1c4)]=a27_0x45ba9c(0x1b7);['description']=a27_0x45ba9c(0x1a7);async[a27_0x45ba9c(0x1c3)](_0x1aca81){const _0x36b10f=a27_0x45ba9c,{options:_0x1f2775,args:_0x19f7c6,tdx:_0x5ba384}=_0x1aca81;if(_0x19f7c6[_0x36b10f(0x1be)]===0x0)return console[_0x36b10f(0x1a2)](_0x36b10f(0x1c1)),console[_0x36b10f(0x1a2)](_0x36b10f(0x1ac)),console[_0x36b10f(0x1a2)]('Examples:'),console[_0x36b10f(0x1a2)](_0x36b10f(0x19d)),console[_0x36b10f(0x1a2)]('\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22'),console[_0x36b10f(0x1a2)](_0x36b10f(0x1bb)),console['error'](_0x36b10f(0x1b2)),0x1;const _0x503ae3=_0x19f7c6[0x0],_0x15b7b5=_0x1f2775[_0x36b10f(0x195)];try{if(_0x503ae3==='/')return saveSessionContext({'segment_path':undefined},_0x15b7b5),console[_0x36b10f(0x1ae)](_0x36b10f(0x1b1)),0x0;const _0x3f6294=_0x1f2775[_0x36b10f(0x1b8)];let _0x2171f5=_0x503ae3;const _0x2d3d7d=parsePath(_0x503ae3);if(!_0x2d3d7d['isAbsolute']){if(!_0x3f6294)return console[_0x36b10f(0x1a2)](_0x36b10f(0x1af)),console['error']('Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>'),0x1;if(_0x503ae3==='..'){const _0x1f4fb7=_0x3f6294[_0x36b10f(0x196)]('/')[_0x36b10f(0x1aa)](0x0,-0x1)[_0x36b10f(0x1c5)]('/');_0x2171f5=_0x1f4fb7||'/';}else _0x503ae3==='.'?_0x2171f5=_0x3f6294:_0x2171f5=_0x3f6294+'/'+_0x503ae3;_0x1f2775[_0x36b10f(0x1ab)]&&console[_0x36b10f(0x1a2)](_0x36b10f(0x1a6)+_0x2171f5);}if(_0x2171f5==='/'||_0x2171f5==='')return saveSessionContext({'segment_path':undefined},_0x15b7b5),console[_0x36b10f(0x1ae)](_0x36b10f(0x1b1)),0x0;_0x2171f5=normalizePath(_0x2171f5);const _0x3581b0=parsePath(_0x2171f5)['segments'];if(_0x3581b0[_0x36b10f(0x1be)]===0x0)return saveSessionContext({'segment_path':undefined},_0x15b7b5),console[_0x36b10f(0x1ae)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x1f2775[_0x36b10f(0x1ab)]&&(console[_0x36b10f(0x1a2)]('Site:\x20'+_0x1f2775['site']),console['error'](_0x36b10f(0x1b5)+_0x2171f5));const _0x1b0922=await withSpinner(_0x36b10f(0x19a)+_0x2171f5+'\x27...',()=>_0x5ba384[_0x36b10f(0x1b9)][_0x36b10f(0x1a0)](_0x2171f5),{'verbose':_0x1f2775[_0x36b10f(0x1ab)]}),_0x56047e=_0x1b0922['data'];_0x1f2775[_0x36b10f(0x1ab)]&&(console[_0x36b10f(0x1a2)]('Resolved\x20path\x20type:\x20'+_0x56047e[_0x36b10f(0x1c0)]),console[_0x36b10f(0x1a2)](_0x36b10f(0x1a8)+_0x56047e['parentId']),_0x56047e[_0x36b10f(0x1b3)]&&console[_0x36b10f(0x1a2)](_0x36b10f(0x19e)+_0x56047e['folderId']));if(_0x56047e[_0x36b10f(0x1c0)]===_0x36b10f(0x1b9))return console[_0x36b10f(0x1a2)](_0x36b10f(0x1a4)),console[_0x36b10f(0x1a2)]('Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.'),console['error'](_0x36b10f(0x1ad)+_0x56047e[_0x36b10f(0x1b4)]+(_0x56047e[_0x36b10f(0x1c2)]?'/'+_0x56047e[_0x36b10f(0x1c2)]['join']('/'):'')),0x1;return saveSessionContext({'segment_path':_0x56047e[_0x36b10f(0x1bd)],'parent_segment':_0x56047e[_0x36b10f(0x1b4)]},_0x15b7b5),console[_0x36b10f(0x1ae)](_0x36b10f(0x1bf)+_0x56047e[_0x36b10f(0x1bd)]),_0x1f2775[_0x36b10f(0x1ab)]&&(console[_0x36b10f(0x1a2)](_0x36b10f(0x19f)),console[_0x36b10f(0x1a2)](_0x36b10f(0x1a1)),console[_0x36b10f(0x1a2)](_0x36b10f(0x1a3))),0x0;}catch(_0x52f297){throw _0x52f297;}}}
1
+ const a27_0x11164a=a27_0x1258;function a27_0x1258(_0x3a67e2,_0x36bb2a){const _0x40c9b8=a27_0x40c9();return a27_0x1258=function(_0x125855,_0x5b77a9){_0x125855=_0x125855-0xba;let _0x30044c=_0x40c9b8[_0x125855];return _0x30044c;},a27_0x1258(_0x3a67e2,_0x36bb2a);}function a27_0x40c9(){const _0x38d5d5=['Context\x20cleared.\x20Back\x20to\x20root.','resolvePathToResource','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','segment','segmentPath','execute','Site:\x20','Usage:\x20tdx\x20segment\x20use\x20<path>','join','Parent\x20ID:\x20','Examples:','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','length','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','315845dfvnRa','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','329418mQJFbW','site','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','3771901KYplxa','slice','data','823616PTzfdh','description','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','parentName','14FRRZLj','log','folderId','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','verbose','Use:\x20tdx\x20segment\x20use\x20','segments','fullPath','parentId','type','Resolved\x20path\x20type:\x20','Resolving\x20path\x20\x27','session','Target\x20path:\x20','72gnzjvd','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','folderPath','26244252ymDVyH','name','Resolved\x20relative\x20path\x20to:\x20','949324YYtNFz','error','7542736VXjbGd'];a27_0x40c9=function(){return _0x38d5d5;};return a27_0x40c9();}(function(_0x3faf78,_0x26443d){const _0x37df89=a27_0x1258,_0x451c2d=_0x3faf78();while(!![]){try{const _0x1eb383=-parseInt(_0x37df89(0xd2))/0x1+-parseInt(_0x37df89(0xbe))/0x2*(parseInt(_0x37df89(0xe6))/0x3)+parseInt(_0x37df89(0xba))/0x4+-parseInt(_0x37df89(0xe4))/0x5*(-parseInt(_0x37df89(0xcc))/0x6)+-parseInt(_0x37df89(0xea))/0x7+-parseInt(_0x37df89(0xd4))/0x8+parseInt(_0x37df89(0xcf))/0x9;if(_0x1eb383===_0x26443d)break;else _0x451c2d['push'](_0x451c2d['shift']());}catch(_0x40221a){_0x451c2d['push'](_0x451c2d['shift']());}}}(a27_0x40c9,0xa6175));import{BaseCommand}from'./command.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{parsePath,normalizePath}from'../utils/segment-path-parser.js';export class SegmentUseCommand extends BaseCommand{[a27_0x11164a(0xd0)]='segment:use';[a27_0x11164a(0xbb)]=a27_0x11164a(0xe8);async[a27_0x11164a(0xdb)](_0x4932ad){const _0x5ceb23=a27_0x11164a,{options:_0x49b034,args:_0x1e5cee,tdx:_0x4ffeb6}=_0x4932ad;if(_0x1e5cee[_0x5ceb23(0xe2)]===0x0)return console['error']('Error:\x20Path\x20is\x20required'),console[_0x5ceb23(0xd3)](_0x5ceb23(0xdd)),console['error'](_0x5ceb23(0xe0)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xc1)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xe5)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xe9)),console['error']('\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent'),0x1;const _0x5a520d=_0x1e5cee[0x0],_0x22090f=_0x49b034[_0x5ceb23(0xca)];try{if(_0x5a520d==='/')return saveSessionContext({'segment_path':undefined},_0x22090f),console['log'](_0x5ceb23(0xd5)),0x0;const _0x5226de=_0x49b034[_0x5ceb23(0xda)];let _0x4705ae=_0x5a520d;const _0x3e4d42=parsePath(_0x5a520d);if(!_0x3e4d42['isAbsolute']){if(!_0x5226de)return console[_0x5ceb23(0xd3)]('Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.'),console[_0x5ceb23(0xd3)](_0x5ceb23(0xcd)),0x1;if(_0x5a520d==='..'){const _0x5d4d0a=_0x5226de['split']('/')[_0x5ceb23(0xeb)](0x0,-0x1)[_0x5ceb23(0xde)]('/');_0x4705ae=_0x5d4d0a||'/';}else _0x5a520d==='.'?_0x4705ae=_0x5226de:_0x4705ae=_0x5226de+'/'+_0x5a520d;_0x49b034[_0x5ceb23(0xc2)]&&console[_0x5ceb23(0xd3)](_0x5ceb23(0xd1)+_0x4705ae);}if(_0x4705ae==='/'||_0x4705ae==='')return saveSessionContext({'segment_path':undefined},_0x22090f),console[_0x5ceb23(0xbf)](_0x5ceb23(0xd5)),0x0;_0x4705ae=normalizePath(_0x4705ae);const _0x53b865=parsePath(_0x4705ae)[_0x5ceb23(0xc4)];if(_0x53b865[_0x5ceb23(0xe2)]===0x0)return saveSessionContext({'segment_path':undefined},_0x22090f),console['log']('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x49b034['verbose']&&(console[_0x5ceb23(0xd3)](_0x5ceb23(0xdc)+_0x49b034[_0x5ceb23(0xe7)]),console[_0x5ceb23(0xd3)](_0x5ceb23(0xcb)+_0x4705ae));const _0x4d99f1=await withSpinner(_0x5ceb23(0xc9)+_0x4705ae+'\x27...',()=>_0x4ffeb6[_0x5ceb23(0xd9)][_0x5ceb23(0xd6)](_0x4705ae),{'verbose':_0x49b034[_0x5ceb23(0xc2)]}),_0x17ff94=_0x4d99f1[_0x5ceb23(0xec)];_0x49b034[_0x5ceb23(0xc2)]&&(console[_0x5ceb23(0xd3)](_0x5ceb23(0xc8)+_0x17ff94[_0x5ceb23(0xc7)]),console['error'](_0x5ceb23(0xdf)+_0x17ff94[_0x5ceb23(0xc6)]),_0x17ff94[_0x5ceb23(0xc0)]&&console[_0x5ceb23(0xd3)]('Folder\x20ID:\x20'+_0x17ff94['folderId']));if(_0x17ff94[_0x5ceb23(0xc7)]==='segment')return console[_0x5ceb23(0xd3)](_0x5ceb23(0xbc)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xe1)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xc3)+_0x17ff94['parentName']+(_0x17ff94['folderPath']?'/'+_0x17ff94[_0x5ceb23(0xce)]['join']('/'):'')),0x1;return saveSessionContext({'segment_path':_0x17ff94[_0x5ceb23(0xc5)],'parent_segment':_0x17ff94[_0x5ceb23(0xbd)]},_0x22090f),console[_0x5ceb23(0xbf)]('Context\x20set\x20to:\x20'+_0x17ff94[_0x5ceb23(0xc5)]),_0x49b034[_0x5ceb23(0xc2)]&&(console[_0x5ceb23(0xd3)](_0x5ceb23(0xd8)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xd7)),console[_0x5ceb23(0xd3)](_0x5ceb23(0xe3))),0x0;}catch(_0x278f8c){throw _0x278f8c;}}}
@@ -1 +1 @@
1
- function a28_0x4b6f(_0x501b05,_0x433bfc){const _0x12122a=a28_0x1212();return a28_0x4b6f=function(_0x4b6f0a,_0x3c7b15){_0x4b6f0a=_0x4b6f0a-0xa5;let _0x331c5d=_0x12122a[_0x4b6f0a];return _0x331c5d;},a28_0x4b6f(_0x501b05,_0x433bfc);}const a28_0x431420=a28_0x4b6f;(function(_0xa40aee,_0x448cac){const _0x131f42=a28_0x4b6f,_0x388bd6=_0xa40aee();while(!![]){try{const _0x815037=parseInt(_0x131f42(0xdd))/0x1+parseInt(_0x131f42(0xd7))/0x2+-parseInt(_0x131f42(0xc0))/0x3*(-parseInt(_0x131f42(0xd4))/0x4)+-parseInt(_0x131f42(0xa7))/0x5*(parseInt(_0x131f42(0xa6))/0x6)+parseInt(_0x131f42(0xc3))/0x7+parseInt(_0x131f42(0xc7))/0x8+-parseInt(_0x131f42(0xaa))/0x9;if(_0x815037===_0x448cac)break;else _0x388bd6['push'](_0x388bd6['shift']());}catch(_0x42c3f8){_0x388bd6['push'](_0x388bd6['shift']());}}}(a28_0x1212,0xa6dea));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a28_0x1212(){const _0x35f1cb=['error','attributes','210891IFvQwL','execute','jsonl','8269198vdQRpi','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','\x20segment','\x27...','123328lSDiKp','👥\x20','Building\x20hierarchy\x20tree...','listParents','dim','Error:\x20','[parent\x20segments]','Folder\x20ID:\x20','segments','map','site','sort','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','76cjlxGp','Listing\x20parent\x20segments...','verbose','1695200DdfNaq','resolvePathToResource','(empty)','Path/pattern\x20arg:\x20','\x20top-level\x20items','listParentsWithPattern','255959NmcmOg','listUnified','Listing\x20folders\x20and\x20segments...','format','segmentPath','listRecursive','\x20matching\x20\x27','length','Current\x20context:\x20','cause','log','228lPyizQ','87860PVNOUr','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','Recursive\x20mode:\x20enabled','20562282MsCEAF','segment','population','✔\x20Found\x20','json','folderId','Listing\x20parent\x20segments\x20matching\x20\x27','folder','replace','name','message','includes','filter','data','\x20\x20Cause:\x20','Site:\x20','test','Parent\x20ID:\x20','localeCompare','parentId'];a28_0x1212=function(){return _0x35f1cb;};return a28_0x1212();}import{formatRows}from'../utils/formatters.js';import a28_0x3b2069 from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x431420(0xb3)]=a28_0x431420(0xcf);['description']=a28_0x431420(0xc4);async[a28_0x431420(0xc1)](_0x29a58b){const _0x3bbdf0=a28_0x431420,{options:_0x1b9450,args:_0x499edb}=_0x29a58b,_0xf2b418=_0x1b9450['recursive'],_0x3f94fe=_0x499edb[0x0];try{const _0x49ba91=_0x1b9450[_0x3bbdf0(0xe1)];_0x1b9450['verbose']&&(console[_0x3bbdf0(0xbe)](_0x3bbdf0(0xb9)+_0x1b9450[_0x3bbdf0(0xd1)]),console[_0x3bbdf0(0xbe)](_0x3bbdf0(0xe5)+(_0x49ba91||'/')),_0x3f94fe&&console[_0x3bbdf0(0xbe)](_0x3bbdf0(0xda)+_0x3f94fe),_0xf2b418&&console[_0x3bbdf0(0xbe)](_0x3bbdf0(0xa9)));if(_0x3f94fe){const _0x4837ae=_0x3f94fe[_0x3bbdf0(0xb5)]('*')||_0x3f94fe[_0x3bbdf0(0xb5)]('?');if(_0x4837ae&&!_0x49ba91)return await this[_0x3bbdf0(0xdc)](_0x29a58b,_0x3f94fe);else return _0x4837ae?(console['error'](_0x3bbdf0(0xa8)),console['error'](_0x3bbdf0(0xd3)),0x1):_0xf2b418?await this[_0x3bbdf0(0xe2)](_0x29a58b,_0x3f94fe):await this[_0x3bbdf0(0xde)](_0x29a58b,_0x3f94fe);}if(!_0x49ba91)return await this[_0x3bbdf0(0xca)](_0x29a58b);return _0xf2b418?await this[_0x3bbdf0(0xe2)](_0x29a58b,_0x49ba91):await this['listUnified'](_0x29a58b,_0x49ba91);}catch(_0x1be689){if(_0x1be689 instanceof SDKError)return console[_0x3bbdf0(0xbe)](_0x3bbdf0(0xcc)+_0x1be689[_0x3bbdf0(0xb4)]),_0x1be689[_0x3bbdf0(0xe6)]&&console['error'](_0x3bbdf0(0xb8)+_0x1be689[_0x3bbdf0(0xe6)]),0x1;throw _0x1be689;}}async[a28_0x431420(0xdc)](_0x4b7c31,_0x713a64){const _0x2a58b9=a28_0x431420,{options:_0x26810f,tdx:_0x2a3d64}=_0x4b7c31,_0x583898=await withSpinner(_0x2a58b9(0xb0)+_0x713a64+_0x2a58b9(0xc6),()=>_0x2a3d64['segment'][_0x2a58b9(0xca)](),{'verbose':_0x26810f[_0x2a58b9(0xd6)]}),_0x4bf466=_0x583898[_0x2a58b9(0xb7)],_0x47483c=_0x713a64[_0x2a58b9(0xb2)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x2a58b9(0xb2)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x16d38e=new RegExp('^'+_0x47483c+'$','i'),_0x5605ab=_0x4bf466[_0x2a58b9(0xb6)](_0x54f47b=>_0x16d38e[_0x2a58b9(0xba)](_0x54f47b[_0x2a58b9(0xbf)][_0x2a58b9(0xb3)]));console[_0x2a58b9(0xbe)](_0x2a58b9(0xad)+_0x5605ab[_0x2a58b9(0xe4)]+'\x20parent\x20segment'+(_0x5605ab[_0x2a58b9(0xe4)]!==0x1?'s':'')+_0x2a58b9(0xe3)+_0x713a64+'\x27');if(_0x26810f[_0x2a58b9(0xe0)]==='json'||_0x26810f[_0x2a58b9(0xe0)]===_0x2a58b9(0xc2))await handleSDKOutput(_0x5605ab,_0x26810f);else{if(_0x5605ab['length']===0x0)console[_0x2a58b9(0xa5)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x713a64);else{console['log'](_0x2a58b9(0xcd));for(const _0x3e48b8 of _0x5605ab){const _0x26f94f=_0x3e48b8[_0x2a58b9(0xbf)]['population']?a28_0x3b2069[_0x2a58b9(0xcb)]('\x20('+formatRows(_0x3e48b8[_0x2a58b9(0xbf)][_0x2a58b9(0xac)])+')'):'';console[_0x2a58b9(0xa5)](_0x2a58b9(0xc8)+_0x3e48b8['attributes']['name']+_0x26f94f);}}}return 0x0;}async['listParents'](_0x412eac){const _0x592155=a28_0x431420,{options:_0x37278e,tdx:_0x243f03}=_0x412eac,_0x1a2c2d=await withSpinner(_0x592155(0xd5),()=>_0x243f03[_0x592155(0xab)]['listParents'](),{'verbose':_0x37278e[_0x592155(0xd6)]}),_0x39e30e=_0x1a2c2d[_0x592155(0xb7)];console['error']('✔\x20Found\x20'+_0x39e30e[_0x592155(0xe4)]+'\x20parent\x20segment'+(_0x39e30e[_0x592155(0xe4)]!==0x1?'s':''));if(_0x37278e[_0x592155(0xe0)]===_0x592155(0xae)||_0x37278e['format']==='jsonl')await handleSDKOutput(_0x39e30e,_0x37278e);else{console[_0x592155(0xa5)](_0x592155(0xcd));for(const _0x49d718 of _0x39e30e){const _0x2c20c0=_0x49d718['attributes'][_0x592155(0xac)]?a28_0x3b2069[_0x592155(0xcb)]('\x20('+formatRows(_0x49d718[_0x592155(0xbf)][_0x592155(0xac)])+')'):'';console[_0x592155(0xa5)]('👥\x20'+_0x49d718[_0x592155(0xbf)][_0x592155(0xb3)]+_0x2c20c0);}}return 0x0;}async[a28_0x431420(0xde)](_0x35403c,_0x4bc16a){const _0x5e6c73=a28_0x431420,{options:_0x3c8f71,tdx:_0x1c7713}=_0x35403c,_0x3ecc10=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x4bc16a+_0x5e6c73(0xc6),()=>_0x1c7713[_0x5e6c73(0xab)][_0x5e6c73(0xd8)](_0x4bc16a),{'verbose':_0x3c8f71['verbose']}),_0x43512a=_0x3ecc10[_0x5e6c73(0xb7)];_0x3c8f71[_0x5e6c73(0xd6)]&&(console[_0x5e6c73(0xbe)](_0x5e6c73(0xbb)+_0x43512a[_0x5e6c73(0xbd)]),_0x43512a[_0x5e6c73(0xaf)]&&console[_0x5e6c73(0xbe)](_0x5e6c73(0xce)+_0x43512a[_0x5e6c73(0xaf)]));const _0x114c03=await withSpinner(_0x5e6c73(0xdf),()=>_0x1c7713[_0x5e6c73(0xab)][_0x5e6c73(0xde)](_0x43512a[_0x5e6c73(0xbd)],_0x43512a['folderId']),{'verbose':_0x3c8f71[_0x5e6c73(0xd6)]}),{folders:_0x2935c4,segments:_0xbcf2eb}=_0x114c03[_0x5e6c73(0xb7)],_0x1d1b82=_0x2935c4[_0x5e6c73(0xe4)]+_0xbcf2eb[_0x5e6c73(0xe4)];console[_0x5e6c73(0xbe)](_0x5e6c73(0xad)+_0x2935c4[_0x5e6c73(0xe4)]+'\x20folder'+(_0x2935c4[_0x5e6c73(0xe4)]!==0x1?'s':'')+'\x20and\x20'+_0xbcf2eb[_0x5e6c73(0xe4)]+_0x5e6c73(0xc5)+(_0xbcf2eb[_0x5e6c73(0xe4)]!==0x1?'s':''));if(_0x3c8f71[_0x5e6c73(0xe0)]===_0x5e6c73(0xae)||_0x3c8f71['format']==='jsonl'){const _0x4d72f5=[..._0x2935c4[_0x5e6c73(0xd0)](_0x34dbf2=>({..._0x34dbf2,'type':_0x5e6c73(0xb1)})),..._0xbcf2eb[_0x5e6c73(0xd0)](_0x4ec4bf=>({..._0x4ec4bf,'type':_0x5e6c73(0xab)}))][_0x5e6c73(0xd2)]((_0x3d7b93,_0x4297b6)=>_0x3d7b93[_0x5e6c73(0xb3)][_0x5e6c73(0xbc)](_0x4297b6[_0x5e6c73(0xb3)]));await handleSDKOutput(_0x4d72f5,_0x3c8f71);}else{if(_0x1d1b82===0x0)console[_0x5e6c73(0xa5)](a28_0x3b2069[_0x5e6c73(0xcb)]('[/'+_0x4bc16a+']')),console[_0x5e6c73(0xa5)](_0x5e6c73(0xd9));else{console[_0x5e6c73(0xa5)](a28_0x3b2069['dim']('[/'+_0x4bc16a+']'));const _0x1e7ef9=formatFlatList(_0x2935c4,_0xbcf2eb,{'showMetadata':!![]});console[_0x5e6c73(0xa5)](_0x1e7ef9);}}return 0x0;}async[a28_0x431420(0xe2)](_0x2c2a5f,_0x4c4bdc){const _0x1ecda8=a28_0x431420,{options:_0xb4f6a0,tdx:_0x4d955b}=_0x2c2a5f,_0x36e1a8=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x4c4bdc+'\x27...',()=>_0x4d955b['segment'][_0x1ecda8(0xd8)](_0x4c4bdc),{'verbose':_0xb4f6a0['verbose']}),_0x476d26=_0x36e1a8[_0x1ecda8(0xb7)];_0xb4f6a0[_0x1ecda8(0xd6)]&&(console['error'](_0x1ecda8(0xbb)+_0x476d26[_0x1ecda8(0xbd)]),_0x476d26[_0x1ecda8(0xaf)]&&console[_0x1ecda8(0xbe)](_0x1ecda8(0xce)+_0x476d26['folderId']));const _0x50a3c2=_0xb4f6a0['maxDepth']||0xa,_0x3b3295=await withSpinner(_0x1ecda8(0xc9),()=>_0x4d955b['segment'][_0x1ecda8(0xe2)](_0x476d26[_0x1ecda8(0xbd)],_0x476d26['folderId'],0x0,_0x50a3c2),{'verbose':_0xb4f6a0[_0x1ecda8(0xd6)]}),_0x1e282b=_0x3b3295['data'];console[_0x1ecda8(0xbe)]('✔\x20Built\x20tree\x20with\x20'+_0x1e282b['length']+_0x1ecda8(0xdb));if(_0xb4f6a0[_0x1ecda8(0xe0)]===_0x1ecda8(0xae)||_0xb4f6a0[_0x1ecda8(0xe0)]===_0x1ecda8(0xc2))await handleSDKOutput(_0x1e282b,_0xb4f6a0);else{console[_0x1ecda8(0xa5)](a28_0x3b2069[_0x1ecda8(0xcb)]('[/'+_0x4c4bdc+']'));const _0x1a0bfb=formatTree(_0x1e282b,{'showMetadata':!![]});console[_0x1ecda8(0xa5)](_0x1a0bfb);}return 0x0;}}
1
+ const a28_0x34baa7=a28_0x2f66;(function(_0x1eab11,_0x5694af){const _0x4d3c33=a28_0x2f66,_0x473b8d=_0x1eab11();while(!![]){try{const _0x58e2b0=-parseInt(_0x4d3c33(0x21d))/0x1+-parseInt(_0x4d3c33(0x1f3))/0x2*(-parseInt(_0x4d3c33(0x20f))/0x3)+-parseInt(_0x4d3c33(0x223))/0x4+parseInt(_0x4d3c33(0x20b))/0x5*(-parseInt(_0x4d3c33(0x21f))/0x6)+-parseInt(_0x4d3c33(0x210))/0x7*(parseInt(_0x4d3c33(0x1e9))/0x8)+parseInt(_0x4d3c33(0x222))/0x9+parseInt(_0x4d3c33(0x209))/0xa;if(_0x58e2b0===_0x5694af)break;else _0x473b8d['push'](_0x473b8d['shift']());}catch(_0x1ea52f){_0x473b8d['push'](_0x473b8d['shift']());}}}(a28_0x4f7b,0xa4811));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x2f66(_0xe58cb1,_0x1a82b3){const _0x4f7b3e=a28_0x4f7b();return a28_0x2f66=function(_0x2f6676,_0xb75d8){_0x2f6676=_0x2f6676-0x1e5;let _0x130d4f=_0x4f7b3e[_0x2f6676];return _0x130d4f;},a28_0x2f66(_0xe58cb1,_0x1a82b3);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';import{formatRows}from'../utils/formatters.js';import a28_0x2df25f from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x34baa7(0x202)]=a28_0x34baa7(0x1ff);['description']='List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments';async[a28_0x34baa7(0x216)](_0x42f665){const _0x448f4b=a28_0x34baa7,{options:_0x3e93f5,args:_0x4389d3}=_0x42f665,_0x4d8630=_0x3e93f5[_0x448f4b(0x1ef)],_0x5c861e=_0x4389d3[0x0];try{const _0x5c9e56=_0x3e93f5['segmentPath'];_0x3e93f5[_0x448f4b(0x20c)]&&(console[_0x448f4b(0x208)]('Site:\x20'+_0x3e93f5[_0x448f4b(0x1ee)]),console[_0x448f4b(0x208)]('Current\x20context:\x20'+(_0x5c9e56||'/')),_0x5c861e&&console['error'](_0x448f4b(0x1ed)+_0x5c861e),_0x4d8630&&console[_0x448f4b(0x208)]('Recursive\x20mode:\x20enabled'));if(_0x5c861e){const _0x5d1a16=_0x5c861e['includes']('*')||_0x5c861e['includes']('?');if(_0x5d1a16&&!_0x5c9e56)return await this[_0x448f4b(0x1fa)](_0x42f665,_0x5c861e);else return _0x5d1a16?(console[_0x448f4b(0x208)](_0x448f4b(0x214)),console[_0x448f4b(0x208)]('Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/'),0x1):_0x4d8630?await this[_0x448f4b(0x20d)](_0x42f665,_0x5c861e):await this['listUnified'](_0x42f665,_0x5c861e);}if(!_0x5c9e56)return await this[_0x448f4b(0x213)](_0x42f665);return _0x4d8630?await this['listRecursive'](_0x42f665,_0x5c9e56):await this[_0x448f4b(0x1e8)](_0x42f665,_0x5c9e56);}catch(_0x5375d9){if(_0x5375d9 instanceof SDKError)return console[_0x448f4b(0x208)](_0x448f4b(0x1f4)+_0x5375d9[_0x448f4b(0x1f0)]),_0x5375d9[_0x448f4b(0x1f6)]&&console['error'](_0x448f4b(0x217)+_0x5375d9[_0x448f4b(0x1f6)]),0x1;throw _0x5375d9;}}async[a28_0x34baa7(0x1fa)](_0x44839d,_0x20460c){const _0x14607a=a28_0x34baa7,{options:_0x2e06ef,tdx:_0x5dfec7}=_0x44839d,_0x1a0b19=await withSpinner(_0x14607a(0x1fb)+_0x20460c+'\x27...',()=>_0x5dfec7[_0x14607a(0x224)][_0x14607a(0x213)](),{'verbose':_0x2e06ef['verbose']}),_0x96f0b9=_0x1a0b19['data'],_0x4a2e02=_0x20460c[_0x14607a(0x201)](/[.+^${}()|[\]\\]/g,_0x14607a(0x21e))[_0x14607a(0x201)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x1b9650=new RegExp('^'+_0x4a2e02+'$','i'),_0x169ef7=_0x96f0b9[_0x14607a(0x1e5)](_0x4c571f=>_0x1b9650[_0x14607a(0x1f1)](_0x4c571f[_0x14607a(0x1ea)]['name']));console[_0x14607a(0x208)]('✔\x20Found\x20'+_0x169ef7[_0x14607a(0x21b)]+'\x20parent\x20segment'+(_0x169ef7[_0x14607a(0x21b)]!==0x1?'s':'')+_0x14607a(0x20a)+_0x20460c+'\x27');if(_0x2e06ef[_0x14607a(0x211)]===_0x14607a(0x221)||_0x2e06ef[_0x14607a(0x211)]===_0x14607a(0x219))await handleSDKOutput(_0x169ef7,_0x2e06ef);else{if(_0x169ef7['length']===0x0)console[_0x14607a(0x1ec)](_0x14607a(0x1f2)+_0x20460c);else{console['log'](_0x14607a(0x21a));for(const _0x1272dd of _0x169ef7){const _0x37fd17=_0x1272dd[_0x14607a(0x1ea)][_0x14607a(0x1fc)]?a28_0x2df25f[_0x14607a(0x205)]('\x20('+formatRows(_0x1272dd[_0x14607a(0x1ea)][_0x14607a(0x1fc)])+')'):'';console[_0x14607a(0x1ec)]('👥\x20'+_0x1272dd[_0x14607a(0x1ea)][_0x14607a(0x202)]+_0x37fd17);}}}return 0x0;}async[a28_0x34baa7(0x213)](_0x55ce6e){const _0x5d4b46=a28_0x34baa7,{options:_0x1f75f8,tdx:_0x5b9d1e}=_0x55ce6e,_0x27768d=await withSpinner(_0x5d4b46(0x204),()=>_0x5b9d1e[_0x5d4b46(0x224)][_0x5d4b46(0x213)](),{'verbose':_0x1f75f8['verbose']}),_0x5ea374=_0x27768d['data'];console['error']('✔\x20Found\x20'+_0x5ea374[_0x5d4b46(0x21b)]+'\x20parent\x20segment'+(_0x5ea374[_0x5d4b46(0x21b)]!==0x1?'s':''));if(_0x1f75f8['format']===_0x5d4b46(0x221)||_0x1f75f8[_0x5d4b46(0x211)]==='jsonl')await handleSDKOutput(_0x5ea374,_0x1f75f8);else{console[_0x5d4b46(0x1ec)](_0x5d4b46(0x21a));for(const _0x3b7c83 of _0x5ea374){const _0x2e9ade=_0x3b7c83[_0x5d4b46(0x1ea)][_0x5d4b46(0x1fc)]?a28_0x2df25f[_0x5d4b46(0x205)]('\x20('+formatRows(_0x3b7c83[_0x5d4b46(0x1ea)][_0x5d4b46(0x1fc)])+')'):'';console['log'](_0x5d4b46(0x1f8)+_0x3b7c83['attributes'][_0x5d4b46(0x202)]+_0x2e9ade);}}return 0x0;}async['listUnified'](_0x1cc21d,_0x1120e9){const _0x18849d=a28_0x34baa7,{options:_0x438bf0,tdx:_0x283ee7}=_0x1cc21d,_0x301f07=await withSpinner(_0x18849d(0x218)+_0x1120e9+'\x27...',()=>_0x283ee7[_0x18849d(0x224)]['resolvePathToResource'](_0x1120e9),{'verbose':_0x438bf0[_0x18849d(0x20c)]}),_0x3c991c=_0x301f07[_0x18849d(0x1fe)];_0x438bf0[_0x18849d(0x20c)]&&(console[_0x18849d(0x208)](_0x18849d(0x1f9)+_0x3c991c[_0x18849d(0x200)]),_0x3c991c[_0x18849d(0x20e)]&&console[_0x18849d(0x208)](_0x18849d(0x207)+_0x3c991c[_0x18849d(0x20e)]));const _0x1e75d2=await withSpinner(_0x18849d(0x212),()=>_0x283ee7[_0x18849d(0x224)][_0x18849d(0x1e8)](_0x3c991c['parentId'],_0x3c991c[_0x18849d(0x20e)]),{'verbose':_0x438bf0['verbose']}),{folders:_0x36e239,segments:_0x586df0}=_0x1e75d2[_0x18849d(0x1fe)],_0x2ff133=_0x36e239[_0x18849d(0x21b)]+_0x586df0['length'];console[_0x18849d(0x208)](_0x18849d(0x206)+_0x36e239[_0x18849d(0x21b)]+'\x20folder'+(_0x36e239['length']!==0x1?'s':'')+'\x20and\x20'+_0x586df0[_0x18849d(0x21b)]+_0x18849d(0x220)+(_0x586df0['length']!==0x1?'s':''));if(_0x438bf0[_0x18849d(0x211)]===_0x18849d(0x221)||_0x438bf0[_0x18849d(0x211)]===_0x18849d(0x219)){const _0xabccc2=[..._0x36e239['map'](_0x2d07f3=>({..._0x2d07f3,'type':_0x18849d(0x203)})),..._0x586df0[_0x18849d(0x1e7)](_0x2d6517=>({..._0x2d6517,'type':_0x18849d(0x224)}))][_0x18849d(0x215)]((_0x586aeb,_0x3c79f1)=>_0x586aeb[_0x18849d(0x202)][_0x18849d(0x1e6)](_0x3c79f1[_0x18849d(0x202)]));await handleSDKOutput(_0xabccc2,_0x438bf0);}else{if(_0x2ff133===0x0)console[_0x18849d(0x1ec)](a28_0x2df25f[_0x18849d(0x205)]('[/'+_0x1120e9+']')),console[_0x18849d(0x1ec)](_0x18849d(0x21c));else{console[_0x18849d(0x1ec)](a28_0x2df25f[_0x18849d(0x205)]('[/'+_0x1120e9+']'));const _0xd3286a=formatFlatList(_0x36e239,_0x586df0,{'showMetadata':!![]});console[_0x18849d(0x1ec)](_0xd3286a);}}return 0x0;}async[a28_0x34baa7(0x20d)](_0x3e896f,_0x3fd5e6){const _0x5900e9=a28_0x34baa7,{options:_0x30f81e,tdx:_0x1c248a}=_0x3e896f,_0x4c4d54=await withSpinner('Resolving\x20context\x20path\x20\x27'+_0x3fd5e6+_0x5900e9(0x1eb),()=>_0x1c248a[_0x5900e9(0x224)]['resolvePathToResource'](_0x3fd5e6),{'verbose':_0x30f81e[_0x5900e9(0x20c)]}),_0xb6f80e=_0x4c4d54[_0x5900e9(0x1fe)];_0x30f81e['verbose']&&(console[_0x5900e9(0x208)](_0x5900e9(0x1f9)+_0xb6f80e[_0x5900e9(0x200)]),_0xb6f80e[_0x5900e9(0x20e)]&&console['error'](_0x5900e9(0x207)+_0xb6f80e[_0x5900e9(0x20e)]));const _0x58eb8c=_0x30f81e[_0x5900e9(0x1f5)]||0xa,_0x2395d1=await withSpinner(_0x5900e9(0x1fd),()=>_0x1c248a[_0x5900e9(0x224)]['listRecursive'](_0xb6f80e['parentId'],_0xb6f80e['folderId'],0x0,_0x58eb8c),{'verbose':_0x30f81e['verbose']}),_0x5456ff=_0x2395d1['data'];console[_0x5900e9(0x208)]('✔\x20Built\x20tree\x20with\x20'+_0x5456ff[_0x5900e9(0x21b)]+_0x5900e9(0x1f7));if(_0x30f81e['format']===_0x5900e9(0x221)||_0x30f81e[_0x5900e9(0x211)]===_0x5900e9(0x219))await handleSDKOutput(_0x5456ff,_0x30f81e);else{console[_0x5900e9(0x1ec)](a28_0x2df25f['dim']('[/'+_0x3fd5e6+']'));const _0x21e9f8=formatTree(_0x5456ff,{'showMetadata':!![]});console[_0x5900e9(0x1ec)](_0x21e9f8);}return 0x0;}}function a28_0x4f7b(){const _0x414a2b=['json','1033128TvGSWU','196964vFfxoU','segment','filter','localeCompare','map','listUnified','1827792NDTmMP','attributes','\x27...','log','Path/pattern\x20arg:\x20','site','recursive','message','test','No\x20parent\x20segments\x20match\x20pattern:\x20','2FhmmDq','Error:\x20','maxDepth','cause','\x20top-level\x20items','👥\x20','Parent\x20ID:\x20','listParentsWithPattern','Listing\x20parent\x20segments\x20matching\x20\x27','population','Building\x20hierarchy\x20tree...','data','segments','parentId','replace','name','folder','Listing\x20parent\x20segments...','dim','✔\x20Found\x20','Folder\x20ID:\x20','error','16259330uxSGmS','\x20matching\x20\x27','1996525RauyxL','verbose','listRecursive','folderId','1510503NoZhfW','28ZMTIop','format','Listing\x20folders\x20and\x20segments...','listParents','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','sort','execute','\x20\x20Cause:\x20','Resolving\x20context\x20path\x20\x27','jsonl','[parent\x20segments]','length','(empty)','207975zQxrZM','\x5c$&','6gVOhdZ','\x20segment'];a28_0x4f7b=function(){return _0x414a2b;};return a28_0x4f7b();}
@@ -1 +1 @@
1
- function a29_0x5b22(){const _0x706248=['table','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','...','9524kmwKaF','✔\x20Retrieved\x20','Site:\x20','show','message','name','Catalog:\x20','Table:\x20','Show\x20table\x20contents','4579078bNHEuh','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','database','\x20from\x20','642642wIuUnq','catalog','795210dexOAq','validate','1215136lPEOMx','args','Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','894doKHre','execute','Error:\x20','length','Usage:\x20tdx\x20show\x20<database.table>','1825722ZPtSAN','35NgIywl','772080tHDQvs','cause','site','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','Database:\x20','verbose','error'];a29_0x5b22=function(){return _0x706248;};return a29_0x5b22();}const a29_0x2f0303=a29_0x278c;(function(_0x33e10e,_0x449cf1){const _0x21bf97=a29_0x278c,_0x4ff0b7=_0x33e10e();while(!![]){try{const _0x2cdb7a=parseInt(_0x21bf97(0x15f))/0x1+parseInt(_0x21bf97(0x163))/0x2+-parseInt(_0x21bf97(0x166))/0x3*(-parseInt(_0x21bf97(0x177))/0x4)+parseInt(_0x21bf97(0x16c))/0x5*(-parseInt(_0x21bf97(0x161))/0x6)+-parseInt(_0x21bf97(0x15a))/0x7+parseInt(_0x21bf97(0x16d))/0x8+parseInt(_0x21bf97(0x16b))/0x9;if(_0x2cdb7a===_0x449cf1)break;else _0x4ff0b7['push'](_0x4ff0b7['shift']());}catch(_0x2ca31f){_0x4ff0b7['push'](_0x4ff0b7['shift']());}}}(a29_0x5b22,0xa5561));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';function a29_0x278c(_0x4c194e,_0x386870){const _0x5b22e3=a29_0x5b22();return a29_0x278c=function(_0x278c6f,_0x2d0573){_0x278c6f=_0x278c6f-0x153;let _0x30711e=_0x5b22e3[_0x278c6f];return _0x30711e;},a29_0x278c(_0x4c194e,_0x386870);}export class ShowCommand extends BaseCommand{[a29_0x2f0303(0x156)]='show';['description']=a29_0x2f0303(0x159);async[a29_0x2f0303(0x167)](_0x461b18){return this['showTable'](_0x461b18);}async['showTable'](_0x521b5c){const _0x73c251=a29_0x2f0303,{options:_0x35bbba,args:_0x204d91,tdx:_0xe854bd}=_0x521b5c;let _0x235cb4;try{_0x235cb4=parseTableReference(_0x204d91[0x0]);const _0x281c93=_0x35bbba[_0x73c251(0x15d)];!_0x235cb4[_0x73c251(0x15d)]&&_0x281c93&&(_0x235cb4['database']=_0x281c93);const _0x55a693=validateTableDescribeReference(_0x235cb4);if(_0x55a693)return console[_0x73c251(0x173)](_0x73c251(0x168)+_0x55a693),console[_0x73c251(0x173)](_0x73c251(0x16a)),console[_0x73c251(0x173)](_0x73c251(0x170)),console[_0x73c251(0x173)](_0x73c251(0x175)),0x1;}catch(_0x3a3c8a){return console[_0x73c251(0x173)](_0x73c251(0x168)+_0x3a3c8a[_0x73c251(0x155)]),console[_0x73c251(0x173)]('Usage:\x20tdx\x20show\x20<database.table>'),console[_0x73c251(0x173)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console['error']('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x251c13=_0x235cb4[_0x73c251(0x160)],_0x44bc35=_0x235cb4[_0x73c251(0x15d)],_0x28591e=_0x235cb4[_0x73c251(0x174)],_0x5b08df=_0x35bbba['limit'];try{_0x35bbba['verbose']&&(console[_0x73c251(0x173)](_0x73c251(0x153)+_0x35bbba[_0x73c251(0x16f)]),_0x251c13&&console['error'](_0x73c251(0x157)+_0x251c13),console[_0x73c251(0x173)](_0x73c251(0x171)+_0x44bc35),console['error'](_0x73c251(0x158)+_0x28591e),console[_0x73c251(0x173)]('Limit:\x20'+_0x5b08df));const _0x38bcea=_0x251c13?_0x251c13+'.'+_0x44bc35+'.'+_0x28591e:_0x44bc35+'.'+_0x28591e,_0x4de46f=await withSpinner('Querying\x20'+_0x38bcea+_0x73c251(0x176),()=>_0xe854bd[_0x73c251(0x174)][_0x73c251(0x154)](_0x44bc35,_0x28591e,_0x5b08df,_0x251c13),{'verbose':_0x35bbba[_0x73c251(0x172)]}),_0x4321e5=_0x4de46f['data'],_0x8c00=_0x4321e5['data'];return _0x8c00[_0x73c251(0x169)]===0x0?console['error'](_0x73c251(0x15b)):console[_0x73c251(0x173)](_0x73c251(0x178)+_0x8c00[_0x73c251(0x169)]+'\x20row'+(_0x8c00[_0x73c251(0x169)]!==0x1?'s':'')+_0x73c251(0x15e)+_0x38bcea),await handleSDKOutput(_0x8c00,_0x35bbba),0x0;}catch(_0x57f97f){if(_0x57f97f instanceof SDKError)return console[_0x73c251(0x173)](_0x73c251(0x168)+_0x57f97f[_0x73c251(0x155)]),_0x57f97f[_0x73c251(0x16e)]&&console[_0x73c251(0x173)]('\x20\x20Cause:\x20'+_0x57f97f[_0x73c251(0x16e)]),0x1;throw _0x57f97f;}}[a29_0x2f0303(0x162)](_0x2301ad){const _0x1bcbb7=a29_0x2f0303;if(_0x2301ad[_0x1bcbb7(0x164)][_0x1bcbb7(0x169)]===0x0)return _0x1bcbb7(0x15c);if(_0x2301ad['args']['length']>0x1)return _0x1bcbb7(0x165);return undefined;}}
1
+ const a29_0x461745=a29_0x14f2;function a29_0x4cf8(){const _0x5868a0=['Database:\x20','verbose','Table:\x20','args','\x20\x20Cause:\x20','743788VirWwJ','Limit:\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','database','length','table','data','\x20row','2438530wBHMrg','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','1521xiXsrb','843270kbQzOd','1848300tJDkbE','272964DjXaGF','Show\x20table\x20contents','message','Querying\x20','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','cause','show','showTable','Usage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--in\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options','validate','\x20from\x20','name','error','limit','Site:\x20','23224ORwiSU','Usage:\x20tdx\x20show\x20<database.table>','execute','68968lVuGOl','Error:\x20','21AltEYW','site'];a29_0x4cf8=function(){return _0x5868a0;};return a29_0x4cf8();}(function(_0xc44888,_0x25c752){const _0x1eff81=a29_0x14f2,_0x5e82e7=_0xc44888();while(!![]){try{const _0xa718aa=parseInt(_0x1eff81(0x1b1))/0x1+parseInt(_0x1eff81(0x1ba))/0x2+-parseInt(_0x1eff81(0x1c7))/0x3+parseInt(_0x1eff81(0x1c6))/0x4+-parseInt(_0x1eff81(0x1c2))/0x5+parseInt(_0x1eff81(0x1c5))/0x6*(parseInt(_0x1eff81(0x1b3))/0x7)+parseInt(_0x1eff81(0x1ae))/0x8*(-parseInt(_0x1eff81(0x1c4))/0x9);if(_0xa718aa===_0x25c752)break;else _0x5e82e7['push'](_0x5e82e7['shift']());}catch(_0x3367aa){_0x5e82e7['push'](_0x5e82e7['shift']());}}}(a29_0x4cf8,0x3e527));import{BaseCommand}from'./command.js';function a29_0x14f2(_0x509498,_0x3439b4){const _0x4cf884=a29_0x4cf8();return a29_0x14f2=function(_0x14f26c,_0x3023cf){_0x14f26c=_0x14f26c-0x1a6;let _0x457882=_0x4cf884[_0x14f26c];return _0x457882;},a29_0x14f2(_0x509498,_0x3439b4);}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 ShowCommand extends BaseCommand{[a29_0x461745(0x1aa)]=a29_0x461745(0x1cd);['description']=a29_0x461745(0x1c8);async[a29_0x461745(0x1b0)](_0x2729bf){const _0x51ac5a=a29_0x461745;return this[_0x51ac5a(0x1a6)](_0x2729bf);}async['showTable'](_0x4eefe7){const _0x23382f=a29_0x461745,{options:_0x3a7ef6,args:_0x31f914,tdx:_0x2f861a}=_0x4eefe7;let _0x47172a;try{_0x47172a=parseTableReference(_0x31f914[0x0]);const _0xee5188=_0x3a7ef6['database'];!_0x47172a[_0x23382f(0x1bd)]&&_0xee5188&&(_0x47172a[_0x23382f(0x1bd)]=_0xee5188);const _0x4e5ea4=validateTableDescribeReference(_0x47172a);if(_0x4e5ea4)return console[_0x23382f(0x1ab)](_0x23382f(0x1b2)+_0x4e5ea4),console[_0x23382f(0x1ab)](_0x23382f(0x1af)),console[_0x23382f(0x1ab)](_0x23382f(0x1c3)),console[_0x23382f(0x1ab)](_0x23382f(0x1cb)),0x1;}catch(_0x1f5f10){return console[_0x23382f(0x1ab)](_0x23382f(0x1b2)+_0x1f5f10[_0x23382f(0x1c9)]),console[_0x23382f(0x1ab)](_0x23382f(0x1af)),console[_0x23382f(0x1ab)](_0x23382f(0x1c3)),console['error'](_0x23382f(0x1cb)),0x1;}const _0x1abd27=_0x47172a['catalog'],_0x53b250=_0x47172a[_0x23382f(0x1bd)],_0x520768=_0x47172a[_0x23382f(0x1bf)],_0x4a3259=_0x3a7ef6[_0x23382f(0x1ac)];try{_0x3a7ef6[_0x23382f(0x1b6)]&&(console[_0x23382f(0x1ab)](_0x23382f(0x1ad)+_0x3a7ef6[_0x23382f(0x1b4)]),_0x1abd27&&console[_0x23382f(0x1ab)]('Catalog:\x20'+_0x1abd27),console[_0x23382f(0x1ab)](_0x23382f(0x1b5)+_0x53b250),console['error'](_0x23382f(0x1b7)+_0x520768),console[_0x23382f(0x1ab)](_0x23382f(0x1bb)+_0x4a3259));const _0x25dde7=_0x1abd27?_0x1abd27+'.'+_0x53b250+'.'+_0x520768:_0x53b250+'.'+_0x520768,_0x737159=await withSpinner(_0x23382f(0x1ca)+_0x25dde7+'...',()=>_0x2f861a[_0x23382f(0x1bf)][_0x23382f(0x1cd)](_0x53b250,_0x520768,_0x4a3259,_0x1abd27),{'verbose':_0x3a7ef6[_0x23382f(0x1b6)]}),_0x9d8686=_0x737159[_0x23382f(0x1c0)],_0x41cece=_0x9d8686['data'];return _0x41cece[_0x23382f(0x1be)]===0x0?console[_0x23382f(0x1ab)](_0x23382f(0x1bc)):console['error']('✔\x20Retrieved\x20'+_0x41cece[_0x23382f(0x1be)]+_0x23382f(0x1c1)+(_0x41cece[_0x23382f(0x1be)]!==0x1?'s':'')+_0x23382f(0x1a9)+_0x25dde7),await handleSDKOutput(_0x41cece,_0x3a7ef6),0x0;}catch(_0x110f5f){if(_0x110f5f instanceof SDKError)return console[_0x23382f(0x1ab)](_0x23382f(0x1b2)+_0x110f5f[_0x23382f(0x1c9)]),_0x110f5f['cause']&&console[_0x23382f(0x1ab)](_0x23382f(0x1b9)+_0x110f5f[_0x23382f(0x1cc)]),0x1;throw _0x110f5f;}}[a29_0x461745(0x1a8)](_0x30ec61){const _0x23e8ab=a29_0x461745;if(_0x30ec61['args'][_0x23e8ab(0x1be)]===0x0)return _0x23e8ab(0x1a7);if(_0x30ec61[_0x23e8ab(0x1b8)][_0x23e8ab(0x1be)]>0x1)return'Too\x20many\x20arguments\x0aUsage:\x20tdx\x20show\x20<database.table>\x0a\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>\x0a\x0aRun\x20\x27tdx\x20show\x20--help\x27\x20for\x20more\x20options';return undefined;}}
@@ -1 +1 @@
1
- const a30_0x5b3315=a30_0x3eac;(function(_0x34a3f8,_0x5a7689){const _0x29cf75=a30_0x3eac,_0xf96673=_0x34a3f8();while(!![]){try{const _0x3712e9=-parseInt(_0x29cf75(0xde))/0x1*(parseInt(_0x29cf75(0xcf))/0x2)+parseInt(_0x29cf75(0xdd))/0x3*(parseInt(_0x29cf75(0xc7))/0x4)+parseInt(_0x29cf75(0xc4))/0x5+-parseInt(_0x29cf75(0xcb))/0x6*(-parseInt(_0x29cf75(0xdf))/0x7)+parseInt(_0x29cf75(0xe5))/0x8*(-parseInt(_0x29cf75(0xb8))/0x9)+parseInt(_0x29cf75(0xe1))/0xa+-parseInt(_0x29cf75(0xc1))/0xb;if(_0x3712e9===_0x5a7689)break;else _0xf96673['push'](_0xf96673['shift']());}catch(_0x3e189e){_0xf96673['push'](_0xf96673['shift']());}}}(a30_0x1437,0x69d78));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a30_0x3eac(_0x50965e,_0x42a74f){const _0x1437bd=a30_0x1437();return a30_0x3eac=function(_0x3eacc3,_0x18d77d){_0x3eacc3=_0x3eacc3-0xb7;let _0x367d32=_0x1437bd[_0x3eacc3];return _0x367d32;},a30_0x3eac(_0x50965e,_0x42a74f);}import{withSpinner}from'../utils/spinner.js';function a30_0x1437(){const _0x3c4054=['description','8nUPQkn','\x20table','367191DtVZdB','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','List\x20tables\x20in\x20a\x20database','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x27\x20is\x20ambiguous.','table','list','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','4504456otVazF','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Or\x20use\x20--in\x20flag:','3332035bdqbbo','Listing\x20tables...','\x20\x20Cause:\x20','12GECFjh','Database:\x20','✔\x20Found\x20','verbose','12oDNbfz','includes','Error:\x20Pattern\x20\x27','✖\x20No\x20tables\x20found','36KBgNAc','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','length','Table\x20pattern:\x20','Error:\x20','name','site','database','message','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Note:\x20\x27','.*\x22','Database\x20\x27','274269BjnPyX','47469fByxOG','577759wkDYWO','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','6325150zpJDZu','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','error'];a30_0x1437=function(){return _0x3c4054;};return a30_0x1437();}export class TablesCommand extends BaseCommand{[a30_0x5b3315(0xd5)]='tables';[a30_0x5b3315(0xe4)]=a30_0x5b3315(0xba);async['execute'](_0x140449){const _0x58af73=a30_0x5b3315,{options:_0x1dc3c3,args:_0x2fc09b,tdx:_0x35ffe3}=_0x140449;let _0x54f8d2;if(_0x2fc09b['length']===0x0)_0x54f8d2={'database':undefined,'table':undefined,'original':''};else{if(_0x2fc09b[_0x58af73(0xd2)]===0x1)try{_0x54f8d2=parseTableReference(_0x2fc09b[0x0]);if(_0x54f8d2[_0x58af73(0xbd)]&&!_0x54f8d2[_0x58af73(0xd7)]&&!_0x54f8d2[_0x58af73(0xbd)]['includes']('*')&&!_0x54f8d2[_0x58af73(0xbd)][_0x58af73(0xcc)]('?'))return console[_0x58af73(0xe3)](_0x58af73(0xcd)+_0x2fc09b[0x0]+_0x58af73(0xbc)),console[_0x58af73(0xe3)](_0x58af73(0xbb)+_0x54f8d2[_0x58af73(0xbd)]+'\x27?'),console['error']('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x54f8d2[_0x58af73(0xbd)]+_0x58af73(0xdb)),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x54f8d2[_0x58af73(0xbd)]),console['error'](_0x58af73(0xd1)+_0x54f8d2['table']),console[_0x58af73(0xe3)](''),console[_0x58af73(0xe3)](_0x58af73(0xda)+_0x2fc09b[0x0]+_0x58af73(0xbf)+_0x54f8d2[_0x58af73(0xbd)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x3ea726){return console[_0x58af73(0xe3)](_0x58af73(0xd4)+_0x3ea726[_0x58af73(0xd8)]),0x1;}else return console[_0x58af73(0xe3)](_0x58af73(0xd9)),console[_0x58af73(0xe3)](_0x58af73(0xc2)),console['error'](_0x58af73(0xc0)),console[_0x58af73(0xe3)](_0x58af73(0xe2)),console['error'](_0x58af73(0xb9)),console[_0x58af73(0xe3)](_0x58af73(0xc3)),console[_0x58af73(0xe3)](_0x58af73(0xd0)),0x1;}const _0x13748e=_0x1dc3c3['database'];!_0x54f8d2[_0x58af73(0xd7)]&&_0x13748e&&(_0x54f8d2['database']=_0x13748e);try{const _0x3c7a0e=_0x2d5d4a=>_0x2d5d4a&&(_0x2d5d4a['includes']('*')||_0x2d5d4a[_0x58af73(0xcc)]('?')),_0xe03d4b=_0x3c7a0e(_0x54f8d2[_0x58af73(0xd7)]);_0x1dc3c3[_0x58af73(0xca)]&&(console[_0x58af73(0xe3)]('Site:\x20'+_0x1dc3c3[_0x58af73(0xd6)]),_0x54f8d2['database']?_0xe03d4b?console[_0x58af73(0xe3)]('Database\x20pattern:\x20'+_0x54f8d2[_0x58af73(0xd7)]):console[_0x58af73(0xe3)](_0x58af73(0xc8)+_0x54f8d2[_0x58af73(0xd7)]):console[_0x58af73(0xe3)]('Database:\x20all'),_0x54f8d2['table']&&console[_0x58af73(0xe3)](_0x58af73(0xd3)+_0x54f8d2['table']));const _0x30f36c=_0x54f8d2[_0x58af73(0xd7)]&&!_0xe03d4b?_0x54f8d2[_0x58af73(0xd7)]:undefined,_0x443121=_0xe03d4b?_0x54f8d2[_0x58af73(0xd7)]:undefined,_0x21dd24=_0x54f8d2[_0x58af73(0xbd)],_0x24832a=await withSpinner(_0x58af73(0xc5),()=>_0x35ffe3['table'][_0x58af73(0xbe)](_0x30f36c,_0x21dd24,_0x443121),{'verbose':_0x1dc3c3[_0x58af73(0xca)]}),_0x212f8b=_0x24832a['data'];if(_0x212f8b[_0x58af73(0xd2)]===0x0&&_0x54f8d2[_0x58af73(0xd7)]&&!_0xe03d4b)return console[_0x58af73(0xe3)](_0x58af73(0xce)),console[_0x58af73(0xe3)](_0x58af73(0xdc)+_0x54f8d2[_0x58af73(0xd7)]+_0x58af73(0xe0)),0x1;return console[_0x58af73(0xe3)](_0x58af73(0xc9)+_0x212f8b[_0x58af73(0xd2)]+_0x58af73(0xb7)+(_0x212f8b[_0x58af73(0xd2)]!==0x1?'s':'')),await handleSDKOutput(_0x212f8b,_0x1dc3c3),0x0;}catch(_0x3b8967){if(_0x3b8967 instanceof SDKError)return console[_0x58af73(0xe3)](_0x58af73(0xd4)+_0x3b8967[_0x58af73(0xd8)]),_0x3b8967['cause']&&console['error'](_0x58af73(0xc6)+_0x3b8967['cause']),0x1;throw _0x3b8967;}}['validate'](_0x544919){return undefined;}}
1
+ function a30_0x4004(){const _0x26827f=['validate','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','Error:\x20','.*\x22','cause','list','Database\x20pattern:\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Database:\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','verbose','300IAbnyF','length','\x20table','site','277096OQAWIO','description','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','473886WeKePZ','357302BGNhtr','error','Note:\x20\x27','27ehDIpC','execute','table','\x27\x20across\x20all\x20databases.','includes','name','1250136mZefHL','450366Cmjbrp','✖\x20No\x20tables\x20found','Listing\x20tables...','tables','3308207poTwum','55adFhob','18296qpxvwt','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','database','message','219OREUTS','✔\x20Found\x20','Table\x20pattern:\x20','data'];a30_0x4004=function(){return _0x26827f;};return a30_0x4004();}const a30_0x132627=a30_0x5284;function a30_0x5284(_0x4eb0fa,_0x146682){const _0x4004da=a30_0x4004();return a30_0x5284=function(_0x5284b0,_0x138ad7){_0x5284b0=_0x5284b0-0xcc;let _0x2e9a17=_0x4004da[_0x5284b0];return _0x2e9a17;},a30_0x5284(_0x4eb0fa,_0x146682);}(function(_0x34bc5d,_0x10ab6b){const _0x33eda3=a30_0x5284,_0x27d77b=_0x34bc5d();while(!![]){try{const _0x30f8fd=parseInt(_0x33eda3(0xd5))/0x1+-parseInt(_0x33eda3(0xe3))/0x2+parseInt(_0x33eda3(0xee))/0x3*(-parseInt(_0x33eda3(0xe9))/0x4)+parseInt(_0x33eda3(0xe8))/0x5*(parseInt(_0x33eda3(0xd8))/0x6)+parseInt(_0x33eda3(0xe7))/0x7+parseInt(_0x33eda3(0xe2))/0x8*(parseInt(_0x33eda3(0xdc))/0x9)+-parseInt(_0x33eda3(0xd1))/0xa*(parseInt(_0x33eda3(0xd9))/0xb);if(_0x30f8fd===_0x10ab6b)break;else _0x27d77b['push'](_0x27d77b['shift']());}catch(_0x2cca15){_0x27d77b['push'](_0x27d77b['shift']());}}}(a30_0x4004,0x87310));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x132627(0xe1)]=a30_0x132627(0xe6);[a30_0x132627(0xd6)]='List\x20tables\x20in\x20a\x20database';async[a30_0x132627(0xdd)](_0x1572f4){const _0x1f80ae=a30_0x132627,{options:_0x32e0c6,args:_0x51d474,tdx:_0x52b47e}=_0x1572f4;let _0x1e65b8;if(_0x51d474[_0x1f80ae(0xd2)]===0x0)_0x1e65b8={'database':undefined,'table':undefined,'original':''};else{if(_0x51d474[_0x1f80ae(0xd2)]===0x1)try{_0x1e65b8=parseTableReference(_0x51d474[0x0]);if(_0x1e65b8['table']&&!_0x1e65b8[_0x1f80ae(0xec)]&&!_0x1e65b8[_0x1f80ae(0xde)]['includes']('*')&&!_0x1e65b8[_0x1f80ae(0xde)]['includes']('?'))return console[_0x1f80ae(0xda)]('Error:\x20Pattern\x20\x27'+_0x51d474[0x0]+'\x27\x20is\x20ambiguous.'),console['error'](_0x1f80ae(0xd7)+_0x1e65b8[_0x1f80ae(0xde)]+'\x27?'),console['error'](_0x1f80ae(0xce)+_0x1e65b8[_0x1f80ae(0xde)]+_0x1f80ae(0xf5)),console[_0x1f80ae(0xda)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x1e65b8[_0x1f80ae(0xde)]),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x1e65b8[_0x1f80ae(0xde)]),console[_0x1f80ae(0xda)](''),console[_0x1f80ae(0xda)](_0x1f80ae(0xdb)+_0x51d474[0x0]+'\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27'+_0x1e65b8[_0x1f80ae(0xde)]+_0x1f80ae(0xdf)),0x1;}catch(_0xcfc31a){return console[_0x1f80ae(0xda)](_0x1f80ae(0xf4)+_0xcfc31a[_0x1f80ae(0xed)]),0x1;}else return console[_0x1f80ae(0xda)](_0x1f80ae(0xeb)),console[_0x1f80ae(0xda)](_0x1f80ae(0xea)),console['error'](_0x1f80ae(0xcd)),console[_0x1f80ae(0xda)](_0x1f80ae(0xcf)),console[_0x1f80ae(0xda)](_0x1f80ae(0xf3)),console[_0x1f80ae(0xda)]('Or\x20use\x20--in\x20flag:'),console[_0x1f80ae(0xda)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0xfa84df=_0x32e0c6[_0x1f80ae(0xec)];!_0x1e65b8[_0x1f80ae(0xec)]&&_0xfa84df&&(_0x1e65b8[_0x1f80ae(0xec)]=_0xfa84df);try{const _0x5f1bac=_0x6313dc=>_0x6313dc&&(_0x6313dc[_0x1f80ae(0xe0)]('*')||_0x6313dc[_0x1f80ae(0xe0)]('?')),_0x520e75=_0x5f1bac(_0x1e65b8['database']);_0x32e0c6[_0x1f80ae(0xd0)]&&(console[_0x1f80ae(0xda)]('Site:\x20'+_0x32e0c6[_0x1f80ae(0xd4)]),_0x1e65b8[_0x1f80ae(0xec)]?_0x520e75?console[_0x1f80ae(0xda)](_0x1f80ae(0xf8)+_0x1e65b8[_0x1f80ae(0xec)]):console[_0x1f80ae(0xda)](_0x1f80ae(0xcc)+_0x1e65b8[_0x1f80ae(0xec)]):console[_0x1f80ae(0xda)]('Database:\x20all'),_0x1e65b8[_0x1f80ae(0xde)]&&console[_0x1f80ae(0xda)](_0x1f80ae(0xf0)+_0x1e65b8['table']));const _0x283565=_0x1e65b8[_0x1f80ae(0xec)]&&!_0x520e75?_0x1e65b8[_0x1f80ae(0xec)]:undefined,_0x52cfc1=_0x520e75?_0x1e65b8[_0x1f80ae(0xec)]:undefined,_0x3452bb=_0x1e65b8['table'],_0xd0945c=await withSpinner(_0x1f80ae(0xe5),()=>_0x52b47e['table'][_0x1f80ae(0xf7)](_0x283565,_0x3452bb,_0x52cfc1),{'verbose':_0x32e0c6[_0x1f80ae(0xd0)]}),_0x161c23=_0xd0945c[_0x1f80ae(0xf1)];if(_0x161c23['length']===0x0&&_0x1e65b8[_0x1f80ae(0xec)]&&!_0x520e75)return console[_0x1f80ae(0xda)](_0x1f80ae(0xe4)),console['error']('Database\x20\x27'+_0x1e65b8[_0x1f80ae(0xec)]+_0x1f80ae(0xf9)),0x1;return console[_0x1f80ae(0xda)](_0x1f80ae(0xef)+_0x161c23[_0x1f80ae(0xd2)]+_0x1f80ae(0xd3)+(_0x161c23['length']!==0x1?'s':'')),await handleSDKOutput(_0x161c23,_0x32e0c6),0x0;}catch(_0x271898){if(_0x271898 instanceof SDKError)return console['error']('Error:\x20'+_0x271898[_0x1f80ae(0xed)]),_0x271898['cause']&&console['error']('\x20\x20Cause:\x20'+_0x271898[_0x1f80ae(0xf6)]),0x1;throw _0x271898;}}[a30_0x132627(0xf2)](_0x13c38a){return undefined;}}
@@ -1 +1 @@
1
- const a31_0x16a15e=a31_0x5b85;(function(_0x356cd2,_0x1ab5b7){const _0x1d5c57=a31_0x5b85,_0x5e2913=_0x356cd2();while(!![]){try{const _0x1f8cc2=parseInt(_0x1d5c57(0xfe))/0x1*(-parseInt(_0x1d5c57(0x119))/0x2)+-parseInt(_0x1d5c57(0x11d))/0x3+parseInt(_0x1d5c57(0x104))/0x4+parseInt(_0x1d5c57(0x11a))/0x5+-parseInt(_0x1d5c57(0x110))/0x6+-parseInt(_0x1d5c57(0x10f))/0x7+parseInt(_0x1d5c57(0x101))/0x8;if(_0x1f8cc2===_0x1ab5b7)break;else _0x5e2913['push'](_0x5e2913['shift']());}catch(_0x2699a6){_0x5e2913['push'](_0x5e2913['shift']());}}}(a31_0x4ddb,0xb795a));function a31_0x5b85(_0x51a741,_0x3dd898){const _0x4ddb35=a31_0x4ddb();return a31_0x5b85=function(_0x5b8570,_0x3c3484){_0x5b8570=_0x5b8570-0xfd;let _0x3da9a8=_0x4ddb35[_0x5b8570];return _0x3da9a8;},a31_0x5b85(_0x51a741,_0x3dd898);}import{BaseCommand}from'./command.js';function a31_0x4ddb(){const _0x3d827c=['3041812CMYpIc','toString','profile','description','name','execute','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','database','llm_project','parent_segment','5232640SsIWee','1257798NghxJn','validate','Invalid\x20resource:\x20','log','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','length','Session\x20database\x20set\x20to:\x20','session','Session\x20parent_segment\x20set\x20to:\x20','1201708lhlwXF','4158980VQPZbG','.\x20Must\x20be\x20one\x20of:\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','2086818mVUiGk','\x20(session:\x20','1OkFeHk','Set\x20session-level\x20context','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','11306608LTtONb','error','Session\x20llm_project\x20set\x20to:\x20'];a31_0x4ddb=function(){return _0x3d827c;};return a31_0x4ddb();}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x16a15e(0x108)]='use';[a31_0x16a15e(0x107)]=a31_0x16a15e(0xff);[a31_0x16a15e(0x111)](_0x3fc274){const _0x5b6815=a31_0x16a15e,{args:_0xded94c}=_0x3fc274;if(_0xded94c[_0x5b6815(0x115)]<0x2)return _0x5b6815(0x11c)+_0x5b6815(0x100)+_0x5b6815(0x10a)+'\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options';const _0x3094ba=_0xded94c[0x0],_0x196362=[_0x5b6815(0x10c),_0x5b6815(0x10e),_0x5b6815(0x10d),_0x5b6815(0x106)];if(!_0x196362['includes'](_0x3094ba))return _0x5b6815(0x112)+_0x3094ba+_0x5b6815(0x11b)+_0x196362['join'](',\x20');return undefined;}async[a31_0x16a15e(0x109)](_0x17d904){const _0x209526=a31_0x16a15e,{args:_0x1bd7c2,options:_0x915422}=_0x17d904;try{const _0x358a5d=_0x1bd7c2[0x0],_0x212a41=_0x1bd7c2[0x1];if(_0x358a5d==='profile'){if(!profileExists(_0x212a41))return console[_0x209526(0x102)]('Error:\x20Profile\x20\x27'+_0x212a41+'\x27\x20does\x20not\x20exist'),console[_0x209526(0x102)](_0x209526(0x10b)),0x1;const _0x41479b=_0x915422[_0x209526(0x117)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x212a41},_0x915422['session']),console[_0x209526(0x113)]('Session\x20profile\x20set\x20to:\x20'+_0x212a41+_0x209526(0xfd)+_0x41479b+')'),console['log'](_0x209526(0x114)),0x0;}const _0x1bec42={},_0x15b3d3=_0x915422[_0x209526(0x117)]||getCurrentSessionPID()[_0x209526(0x105)]();switch(_0x358a5d){case _0x209526(0x10c):_0x1bec42[_0x209526(0x10c)]=_0x212a41,console[_0x209526(0x113)](_0x209526(0x116)+_0x212a41+'\x20(session:\x20'+_0x15b3d3+')');break;case _0x209526(0x10e):_0x1bec42[_0x209526(0x10e)]=_0x212a41,console[_0x209526(0x113)](_0x209526(0x118)+_0x212a41+_0x209526(0xfd)+_0x15b3d3+')');break;case'llm_project':_0x1bec42[_0x209526(0x10d)]=_0x212a41,console[_0x209526(0x113)](_0x209526(0x103)+_0x212a41+_0x209526(0xfd)+_0x15b3d3+')');break;}return saveSessionContext(_0x1bec42,_0x915422[_0x209526(0x117)]),console['log'](_0x209526(0x114)),0x0;}catch(_0x257d82){return _0x257d82 instanceof Error&&console[_0x209526(0x102)]('Error:\x20'+_0x257d82['message']),0x1;}}}
1
+ function a31_0x2044(_0x9b03a3,_0x17e313){const _0x213f63=a31_0x213f();return a31_0x2044=function(_0x20447f,_0x2123dd){_0x20447f=_0x20447f-0x172;let _0x306ad4=_0x213f63[_0x20447f];return _0x306ad4;},a31_0x2044(_0x9b03a3,_0x17e313);}const a31_0x1613dd=a31_0x2044;function a31_0x213f(){const _0x326654=['validate','join','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','execute','Session\x20database\x20set\x20to:\x20','5768yvWHoZ','9rcldlP','Invalid\x20resource:\x20','toString','1206340brihrx','5399530xRzKKG','Session\x20llm_project\x20set\x20to:\x20','699014XQRHAW','245pFwUUO','description','session','includes','llm_project','3sQhFzT','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','6109776fcYpjB','Error:\x20Profile\x20\x27','parent_segment','log','\x27\x20does\x20not\x20exist','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','use','error','Error:\x20','41556053gLPteL','2100744mvMgVD','profile','database','\x20(session:\x20','.\x20Must\x20be\x20one\x20of:\x20','length','name','28jIAIYH','Session\x20profile\x20set\x20to:\x20'];a31_0x213f=function(){return _0x326654;};return a31_0x213f();}(function(_0x18fd28,_0x436ec0){const _0x3ffc30=a31_0x2044,_0x1ca7ef=_0x18fd28();while(!![]){try{const _0x1569a8=-parseInt(_0x3ffc30(0x192))/0x1+-parseInt(_0x3ffc30(0x195))/0x2*(parseInt(_0x3ffc30(0x174))/0x3)+parseInt(_0x3ffc30(0x18e))/0x4*(parseInt(_0x3ffc30(0x196))/0x5)+-parseInt(_0x3ffc30(0x176))/0x6+parseInt(_0x3ffc30(0x187))/0x7*(-parseInt(_0x3ffc30(0x180))/0x8)+-parseInt(_0x3ffc30(0x18f))/0x9*(-parseInt(_0x3ffc30(0x193))/0xa)+parseInt(_0x3ffc30(0x17f))/0xb;if(_0x1569a8===_0x436ec0)break;else _0x1ca7ef['push'](_0x1ca7ef['shift']());}catch(_0x17837e){_0x1ca7ef['push'](_0x1ca7ef['shift']());}}}(a31_0x213f,0xba80f));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x1613dd(0x186)]=a31_0x1613dd(0x17c);[a31_0x1613dd(0x197)]='Set\x20session-level\x20context';[a31_0x1613dd(0x189)](_0xa54840){const _0x622c10=a31_0x1613dd,{args:_0x175d6b}=_0xa54840;if(_0x175d6b[_0x622c10(0x185)]<0x2)return _0x622c10(0x18b)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+'Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a'+_0x622c10(0x17b);const _0x46a0d4=_0x175d6b[0x0],_0x44505c=[_0x622c10(0x182),_0x622c10(0x178),_0x622c10(0x173),_0x622c10(0x181)];if(!_0x44505c[_0x622c10(0x172)](_0x46a0d4))return _0x622c10(0x190)+_0x46a0d4+_0x622c10(0x184)+_0x44505c[_0x622c10(0x18a)](',\x20');return undefined;}async[a31_0x1613dd(0x18c)](_0xab0fc7){const _0x1acc5c=a31_0x1613dd,{args:_0xd6bed6,options:_0xaeda1c}=_0xab0fc7;try{const _0x2c6bfd=_0xd6bed6[0x0],_0x2b7c5e=_0xd6bed6[0x1];if(_0x2c6bfd===_0x1acc5c(0x181)){if(!profileExists(_0x2b7c5e))return console[_0x1acc5c(0x17d)](_0x1acc5c(0x177)+_0x2b7c5e+_0x1acc5c(0x17a)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x46df0e=_0xaeda1c[_0x1acc5c(0x198)]||getCurrentSessionPID()[_0x1acc5c(0x191)]();return saveSessionContext({'profile':_0x2b7c5e},_0xaeda1c[_0x1acc5c(0x198)]),console[_0x1acc5c(0x179)](_0x1acc5c(0x188)+_0x2b7c5e+_0x1acc5c(0x183)+_0x46df0e+')'),console['log'](_0x1acc5c(0x175)),0x0;}const _0x49561a={},_0x5ca48=_0xaeda1c['session']||getCurrentSessionPID()[_0x1acc5c(0x191)]();switch(_0x2c6bfd){case _0x1acc5c(0x182):_0x49561a[_0x1acc5c(0x182)]=_0x2b7c5e,console[_0x1acc5c(0x179)](_0x1acc5c(0x18d)+_0x2b7c5e+_0x1acc5c(0x183)+_0x5ca48+')');break;case _0x1acc5c(0x178):_0x49561a[_0x1acc5c(0x178)]=_0x2b7c5e,console[_0x1acc5c(0x179)]('Session\x20parent_segment\x20set\x20to:\x20'+_0x2b7c5e+'\x20(session:\x20'+_0x5ca48+')');break;case _0x1acc5c(0x173):_0x49561a['llm_project']=_0x2b7c5e,console['log'](_0x1acc5c(0x194)+_0x2b7c5e+'\x20(session:\x20'+_0x5ca48+')');break;}return saveSessionContext(_0x49561a,_0xaeda1c[_0x1acc5c(0x198)]),console[_0x1acc5c(0x179)](_0x1acc5c(0x175)),0x0;}catch(_0x1e69dd){return _0x1e69dd instanceof Error&&console[_0x1acc5c(0x17d)](_0x1acc5c(0x17e)+_0x1e69dd['message']),0x1;}}}
@@ -1 +1 @@
1
- const a32_0x1beda1=a32_0x3086;(function(_0x2fd3cc,_0x526b3f){const _0x5ba895=a32_0x3086,_0x2f9f75=_0x2fd3cc();while(!![]){try{const _0x3eb4b4=parseInt(_0x5ba895(0xa5))/0x1+-parseInt(_0x5ba895(0x89))/0x2+parseInt(_0x5ba895(0xdd))/0x3+parseInt(_0x5ba895(0xfd))/0x4*(parseInt(_0x5ba895(0xb8))/0x5)+-parseInt(_0x5ba895(0xe9))/0x6+parseInt(_0x5ba895(0x97))/0x7*(-parseInt(_0x5ba895(0xe2))/0x8)+parseInt(_0x5ba895(0xf8))/0x9;if(_0x3eb4b4===_0x526b3f)break;else _0x2f9f75['push'](_0x2f9f75['shift']());}catch(_0x36aad4){_0x2f9f75['push'](_0x2f9f75['shift']());}}}(a32_0x1186,0x532d3));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0x1beda1(0x92)]='workflow:projects';['description']=a32_0x1beda1(0x8b);async['execute'](_0x1a95db){const _0x245293=a32_0x1beda1,{options:_0x5b7c39,args:_0x29b04a,tdx:_0x172190}=_0x1a95db,_0x10a886=_0x29b04a[0x0];try{_0x5b7c39[_0x245293(0xa2)]&&_0x10a886&&console[_0x245293(0xba)]('Pattern:\x20'+_0x10a886);const _0xa905f7=await withSpinner('Listing\x20workflow\x20projects...',()=>_0x172190[_0x245293(0xcc)]['projects'](_0x10a886,{'limit':_0x5b7c39[_0x245293(0xaa)]}),{'verbose':_0x5b7c39[_0x245293(0xa2)]}),_0x57fc43=_0xa905f7[_0x245293(0xdf)];return console[_0x245293(0xba)]('✔\x20Found\x20'+_0x57fc43['length']+'\x20project'+(_0x57fc43[_0x245293(0xa7)]!==0x1?'s':'')),await handleSDKOutput(_0x57fc43,_0x5b7c39),0x0;}catch(_0x32ef27){if(_0x32ef27 instanceof SDKError)return console[_0x245293(0xba)]('Error:\x20'+_0x32ef27[_0x245293(0xe0)]),_0x32ef27['cause']&&console[_0x245293(0xba)](_0x245293(0xaf)+_0x32ef27[_0x245293(0xd6)]),0x1;throw _0x32ef27;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x1beda1(0x92)]=a32_0x1beda1(0x96);['description']='List\x20workflows';async['execute'](_0x4cc66a){const _0x4a261b=a32_0x1beda1,{options:_0x15ac58,args:_0x88dab3,tdx:_0x51b37a}=_0x4cc66a,_0x1dd055=_0x88dab3[0x0];try{_0x15ac58['verbose']&&_0x1dd055&&console[_0x4a261b(0xba)]('Project\x20filter:\x20'+_0x1dd055);const _0xde1583=await withSpinner(_0x4a261b(0xd4),()=>_0x51b37a[_0x4a261b(0xcc)][_0x4a261b(0xe5)](_0x1dd055,{'limit':_0x15ac58[_0x4a261b(0xaa)]}),{'verbose':_0x15ac58[_0x4a261b(0xa2)]}),_0x390e68=_0xde1583['data'];return console[_0x4a261b(0xba)](_0x4a261b(0xde)+_0x390e68['length']+_0x4a261b(0xdc)+(_0x390e68[_0x4a261b(0xa7)]!==0x1?'s':'')),await handleSDKOutput(_0x390e68,_0x15ac58),0x0;}catch(_0x4f4078){if(_0x4f4078 instanceof SDKError)return console[_0x4a261b(0xba)](_0x4a261b(0xe8)+_0x4f4078[_0x4a261b(0xe0)]),_0x4f4078[_0x4a261b(0xd6)]&&console[_0x4a261b(0xba)](_0x4a261b(0xaf)+_0x4f4078[_0x4a261b(0xd6)]),0x1;throw _0x4f4078;}}}export class WorkflowSessionsCommand extends BaseCommand{[a32_0x1beda1(0x92)]='workflow:sessions';[a32_0x1beda1(0xff)]='List\x20workflow\x20execution\x20sessions';async[a32_0x1beda1(0x84)](_0x576087){const _0x2c4c9c=a32_0x1beda1,{options:_0x65c073,args:_0x204f70,tdx:_0x23144d}=_0x576087;let _0x4b10d6,_0x567f9a;if(_0x204f70[0x0]){const _0x5e5dcb=_0x204f70[0x0][_0x2c4c9c(0x94)]('.');if(_0x5e5dcb[_0x2c4c9c(0xa7)]===0x1)_0x4b10d6=_0x5e5dcb[0x0];else{if(_0x5e5dcb[_0x2c4c9c(0xa7)]===0x2)[_0x4b10d6,_0x567f9a]=_0x5e5dcb;else return console[_0x2c4c9c(0xba)](_0x2c4c9c(0xc4)),0x1;}}try{if(_0x65c073[_0x2c4c9c(0xa2)]){if(_0x4b10d6&&_0x567f9a)console[_0x2c4c9c(0xba)](_0x2c4c9c(0x90)+_0x4b10d6+'.'+_0x567f9a);else _0x4b10d6&&console[_0x2c4c9c(0xba)](_0x2c4c9c(0x87)+_0x4b10d6);const _0x3a0777=_0x65c073[_0x2c4c9c(0xc2)];_0x3a0777&&console[_0x2c4c9c(0xba)](_0x2c4c9c(0xf5)+_0x3a0777);}const _0x2d9dc9=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x23144d[_0x2c4c9c(0xcc)][_0x2c4c9c(0x8c)]({'projectName':_0x4b10d6,'workflowName':_0x567f9a,'status':_0x65c073[_0x2c4c9c(0xc2)],'fromTime':_0x65c073[_0x2c4c9c(0xb9)],'toTime':_0x65c073['to'],'limit':_0x65c073[_0x2c4c9c(0xaa)]}),{'verbose':_0x65c073[_0x2c4c9c(0xa2)]}),_0x14ea06=_0x2d9dc9['data'];return console[_0x2c4c9c(0xba)](_0x2c4c9c(0xde)+_0x14ea06[_0x2c4c9c(0xa7)]+_0x2c4c9c(0xd9)+(_0x14ea06['length']!==0x1?'s':'')),await handleSDKOutput(_0x14ea06,_0x65c073),0x0;}catch(_0x2cfd68){if(_0x2cfd68 instanceof SDKError)return console[_0x2c4c9c(0xba)]('Error:\x20'+_0x2cfd68['message']),_0x2cfd68[_0x2c4c9c(0xd6)]&&console['error']('\x20\x20Cause:\x20'+_0x2cfd68[_0x2c4c9c(0xd6)]),0x1;throw _0x2cfd68;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x1beda1(0x92)]=a32_0x1beda1(0xed);['description']=a32_0x1beda1(0xf0);async[a32_0x1beda1(0x84)](_0x1bffeb){const _0xb71afd=a32_0x1beda1,{options:_0x16a6d7,args:_0x5e5650,tdx:_0x96937a}=_0x1bffeb;let _0x2c2b19,_0x2da148;if(_0x5e5650[0x0]){const _0x169d45=_0x5e5650[0x0][_0xb71afd(0x94)]('.');if(_0x169d45[_0xb71afd(0xa7)]===0x1)_0x2c2b19=_0x169d45[0x0];else{if(_0x169d45[_0xb71afd(0xa7)]===0x2)[_0x2c2b19,_0x2da148]=_0x169d45;else return console[_0xb71afd(0xba)](_0xb71afd(0xc4)),0x1;}}try{const _0x372dd5=_0x16a6d7['includeRetried'];if(_0x16a6d7[_0xb71afd(0xa2)]){if(_0x2c2b19&&_0x2da148)console[_0xb71afd(0xba)](_0xb71afd(0x90)+_0x2c2b19+'.'+_0x2da148);else _0x2c2b19&&console[_0xb71afd(0xba)](_0xb71afd(0x87)+_0x2c2b19);_0x372dd5&&console[_0xb71afd(0xba)](_0xb71afd(0xc7));}const _0x2787a9=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x96937a[_0xb71afd(0xcc)]['attempts']({'projectName':_0x2c2b19,'workflowName':_0x2da148,'includeRetried':_0x372dd5,'limit':_0x16a6d7[_0xb71afd(0xaa)]}),{'verbose':_0x16a6d7[_0xb71afd(0xa2)]}),_0x55189c=_0x2787a9['data'];return console[_0xb71afd(0xba)](_0xb71afd(0xde)+_0x55189c[_0xb71afd(0xa7)]+'\x20attempt'+(_0x55189c['length']!==0x1?'s':'')),await handleSDKOutput(_0x55189c,_0x16a6d7),0x0;}catch(_0xedb67a){if(_0xedb67a instanceof SDKError)return console['error']('Error:\x20'+_0xedb67a[_0xb71afd(0xe0)]),_0xedb67a[_0xb71afd(0xd6)]&&console[_0xb71afd(0xba)](_0xb71afd(0xaf)+_0xedb67a[_0xb71afd(0xd6)]),0x1;throw _0xedb67a;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a32_0x1beda1(0xea);[a32_0x1beda1(0xff)]='Show\x20specific\x20attempt\x20details';async[a32_0x1beda1(0x84)](_0x3930bd){const _0x59c8ef=a32_0x1beda1,{options:_0x4b3b41,args:_0x3aa951,tdx:_0x59837d}=_0x3930bd,_0x59e934=_0x3aa951[0x0];if(!_0x59e934)return console[_0x59c8ef(0xba)](_0x59c8ef(0x91)),0x1;try{_0x4b3b41[_0x59c8ef(0xa2)]&&console[_0x59c8ef(0xba)](_0x59c8ef(0xbe)+_0x59e934);const _0x2b1053=await withSpinner(_0x59c8ef(0xca),()=>_0x59837d['workflow']['attempt'](_0x59e934),{'verbose':_0x4b3b41[_0x59c8ef(0xa2)]}),_0x70bfa9=_0x2b1053[_0x59c8ef(0xdf)];return await handleSDKOutput([_0x70bfa9],_0x4b3b41),0x0;}catch(_0x1c572e){if(_0x1c572e instanceof SDKError)return console[_0x59c8ef(0xba)](_0x59c8ef(0xe8)+_0x1c572e[_0x59c8ef(0xe0)]),_0x1c572e['cause']&&console[_0x59c8ef(0xba)](_0x59c8ef(0xaf)+_0x1c572e[_0x59c8ef(0xd6)]),0x1;throw _0x1c572e;}}}export class WorkflowTasksCommand extends BaseCommand{['name']='workflow:tasks';[a32_0x1beda1(0xff)]=a32_0x1beda1(0x88);async['execute'](_0x2ee953){const _0x5ca35a=a32_0x1beda1,{options:_0x393601,args:_0x2e7d6f,tdx:_0x32d91d}=_0x2ee953,_0x49ca40=_0x2e7d6f[0x0];if(!_0x49ca40)return console[_0x5ca35a(0xba)](_0x5ca35a(0x91)),0x1;try{const _0x227e96=_0x393601[_0x5ca35a(0xfc)];_0x393601[_0x5ca35a(0xa2)]&&(console[_0x5ca35a(0xba)](_0x5ca35a(0xbe)+_0x49ca40),_0x227e96&&console[_0x5ca35a(0xba)](_0x5ca35a(0xa8)));const _0x5c0b18=await withSpinner('Getting\x20attempt\x20tasks...',()=>_0x32d91d[_0x5ca35a(0xcc)][_0x5ca35a(0x86)](_0x49ca40,_0x227e96||![]),{'verbose':_0x393601['verbose']}),_0x5b2c4c=_0x5c0b18[_0x5ca35a(0xdf)];return console[_0x5ca35a(0xba)](_0x5ca35a(0xde)+_0x5b2c4c[_0x5ca35a(0xa7)]+'\x20task'+(_0x5b2c4c[_0x5ca35a(0xa7)]!==0x1?'s':'')),await handleSDKOutput(_0x5b2c4c,_0x393601),0x0;}catch(_0x2db4b2){if(_0x2db4b2 instanceof SDKError)return console['error'](_0x5ca35a(0xe8)+_0x2db4b2[_0x5ca35a(0xe0)]),_0x2db4b2[_0x5ca35a(0xd6)]&&console[_0x5ca35a(0xba)]('\x20\x20Cause:\x20'+_0x2db4b2[_0x5ca35a(0xd6)]),0x1;throw _0x2db4b2;}}}function a32_0x3086(_0x841e55,_0x5dd4d2){const _0x118661=a32_0x1186();return a32_0x3086=function(_0x3086a0,_0x24863f){_0x3086a0=_0x3086a0-0x83;let _0x7268b2=_0x118661[_0x3086a0];return _0x7268b2;},a32_0x3086(_0x841e55,_0x5dd4d2);}export class WorkflowLogsCommand extends BaseCommand{[a32_0x1beda1(0x92)]='workflow:logs';[a32_0x1beda1(0xff)]=a32_0x1beda1(0xf3);async[a32_0x1beda1(0x84)](_0x4cb8b1){const _0x2e26c3=a32_0x1beda1,{options:_0x2e647e,args:_0x486f36,tdx:_0x57320f}=_0x4cb8b1,_0x3cc726=_0x486f36[0x0],_0x27b6a8=_0x486f36[0x1];if(!_0x3cc726||!_0x27b6a8)return console[_0x2e26c3(0xba)](_0x2e26c3(0xc8)),0x1;try{_0x2e647e[_0x2e26c3(0xa2)]&&(console[_0x2e26c3(0xba)](_0x2e26c3(0xbe)+_0x3cc726),console['error'](_0x2e26c3(0x99)+_0x27b6a8));const _0x3c6090=_0x2e647e[_0x2e26c3(0x98)],_0x4f5db2=await withSpinner(_0x2e26c3(0xac),()=>_0x57320f[_0x2e26c3(0xcc)][_0x2e26c3(0x95)](_0x3cc726,_0x27b6a8,{'offset':_0x3c6090,'limit':_0x2e647e[_0x2e26c3(0xaa)]}),{'verbose':_0x2e647e['verbose']}),_0x1bb2b6=_0x4f5db2[_0x2e26c3(0xdf)];return console[_0x2e26c3(0xba)](_0x2e26c3(0xde)+_0x1bb2b6[_0x2e26c3(0xa7)]+'\x20log\x20entr'+(_0x1bb2b6[_0x2e26c3(0xa7)]!==0x1?_0x2e26c3(0xce):'y')),await handleSDKOutput(_0x1bb2b6,_0x2e647e),0x0;}catch(_0x80c2ac){if(_0x80c2ac instanceof SDKError)return console['error']('Error:\x20'+_0x80c2ac[_0x2e26c3(0xe0)]),_0x80c2ac['cause']&&console[_0x2e26c3(0xba)](_0x2e26c3(0xaf)+_0x80c2ac[_0x2e26c3(0xd6)]),0x1;throw _0x80c2ac;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x1beda1(0x92)]=a32_0x1beda1(0xc0);[a32_0x1beda1(0xff)]=a32_0x1beda1(0x8a);async[a32_0x1beda1(0x84)](_0x3a7e7f){const _0x266adf=a32_0x1beda1,{options:_0x483c8d,args:_0x12dc95,tdx:_0x1cd750}=_0x3a7e7f,_0x538e1d=_0x12dc95[0x0];if(!_0x538e1d)return console[_0x266adf(0xba)](_0x266adf(0x91)),0x1;try{const _0x1a3c15=_0x483c8d[_0x266adf(0xb3)];_0x483c8d['verbose']&&(console[_0x266adf(0xba)](_0x266adf(0xbe)+_0x538e1d),_0x1a3c15&&console['error']('Reason:\x20'+_0x1a3c15));if(!_0x483c8d[_0x266adf(0xe6)]){const _0x307432=await confirm(_0x266adf(0xc3)+_0x538e1d+'?');if(!_0x307432)return console[_0x266adf(0xba)](_0x266adf(0xcf)),0x0;}const _0x2033dd=await withSpinner(_0x266adf(0xe7),()=>_0x1cd750[_0x266adf(0xcc)]['kill'](_0x538e1d,_0x1a3c15),{'verbose':_0x483c8d[_0x266adf(0xa2)]}),_0xcc4b81=_0x2033dd['data'];return console['error']('✔\x20'+_0xcc4b81),0x0;}catch(_0x1edf34){if(_0x1edf34 instanceof SDKError)return console[_0x266adf(0xba)](_0x266adf(0xe8)+_0x1edf34[_0x266adf(0xe0)]),_0x1edf34[_0x266adf(0xd6)]&&console[_0x266adf(0xba)]('\x20\x20Cause:\x20'+_0x1edf34['cause']),0x1;throw _0x1edf34;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x1beda1(0x92)]=a32_0x1beda1(0xb7);[a32_0x1beda1(0xff)]=a32_0x1beda1(0xae);async['execute'](_0x128cd2){const _0x4a1b7a=a32_0x1beda1,{options:_0x5b58cd,args:_0x29bba2,tdx:_0x34d5e9}=_0x128cd2,_0x3cf964=_0x29bba2[0x0];if(!_0x3cf964)return console[_0x4a1b7a(0xba)](_0x4a1b7a(0xe4)),console[_0x4a1b7a(0xba)](_0x4a1b7a(0x8d)),0x1;let _0x1d7c29=![],_0x5273af=_0x3cf964;if(_0x3cf964['startsWith'](_0x4a1b7a(0xbc)))_0x1d7c29=!![],_0x5273af=_0x3cf964[_0x4a1b7a(0xa1)](0x8);else{if(_0x3cf964[_0x4a1b7a(0xd5)](_0x4a1b7a(0x85)))_0x1d7c29=![],_0x5273af=_0x3cf964[_0x4a1b7a(0xa1)](0x8);else return console['error']('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console[_0x4a1b7a(0xba)](_0x4a1b7a(0x8d)),0x1;}try{const _0x325724=_0x5b58cd[_0x4a1b7a(0xdb)],_0xcf05bb=_0x5b58cd[_0x4a1b7a(0xc6)],_0x4a9b55=_0x5b58cd[_0x4a1b7a(0xef)],_0x37d19b=_0x5b58cd['force'];_0x5b58cd[_0x4a1b7a(0xa2)]&&(console[_0x4a1b7a(0xba)](_0x4a1b7a(0xa9)+(_0x1d7c29?_0x4a1b7a(0xb6):_0x4a1b7a(0x83))+'\x20'+_0x5273af),_0x325724&&console[_0x4a1b7a(0xba)](_0x4a1b7a(0xb5)+_0x325724),_0xcf05bb&&console[_0x4a1b7a(0xba)](_0x4a1b7a(0xa3)+_0xcf05bb),_0x4a9b55&&console['error']('Params:\x20'+_0x4a9b55),_0x37d19b&&console[_0x4a1b7a(0xba)](_0x4a1b7a(0xfa)));let _0x598591;if(_0x4a9b55)try{if(_0x4a9b55[_0x4a1b7a(0xd5)]('@')){const _0x2df587=await import(_0x4a1b7a(0xf6)),_0x41de86=_0x4a9b55['substring'](0x1),_0x217380=await _0x2df587[_0x4a1b7a(0x8f)](_0x41de86,_0x4a1b7a(0xbb));_0x598591=JSON[_0x4a1b7a(0xd0)](_0x217380);}else _0x598591=JSON['parse'](_0x4a9b55);}catch{return console[_0x4a1b7a(0xba)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x5b58cd[_0x4a1b7a(0xe6)]){const _0x476458=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x1d7c29?_0x4a1b7a(0xb6):'attempt')+'\x20'+_0x5273af+'?');if(!_0x476458)return console[_0x4a1b7a(0xba)](_0x4a1b7a(0xcf)),0x0;}let _0x268694;_0x1d7c29?_0x268694=await withSpinner(_0x4a1b7a(0x9f),()=>_0x34d5e9[_0x4a1b7a(0xcc)][_0x4a1b7a(0x93)](_0x5273af,{'fromTask':_0x325724,'retryParams':_0x598591}),{'verbose':_0x5b58cd[_0x4a1b7a(0xa2)]}):_0x268694=await withSpinner(_0x4a1b7a(0xda),()=>_0x34d5e9['workflow'][_0x4a1b7a(0x9c)](_0x5273af,{'resumeFrom':_0xcf05bb,'retryParams':_0x598591,'force':_0x37d19b}),{'verbose':_0x5b58cd['verbose']});const _0x2ed374=_0x268694[_0x4a1b7a(0xdf)];return console['error'](_0x4a1b7a(0xeb)),console[_0x4a1b7a(0xba)](_0x4a1b7a(0xfe)+_0x2ed374[_0x4a1b7a(0x9a)]),console['error'](_0x4a1b7a(0xb0)+_0x2ed374[_0x4a1b7a(0xd2)]),0x0;}catch(_0x201d86){if(_0x201d86 instanceof SDKError)return console[_0x4a1b7a(0xba)](_0x4a1b7a(0xe8)+_0x201d86[_0x4a1b7a(0xe0)]),_0x201d86['cause']&&console[_0x4a1b7a(0xba)](_0x4a1b7a(0xaf)+_0x201d86[_0x4a1b7a(0xd6)]),0x1;throw _0x201d86;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x1beda1(0x92)]=a32_0x1beda1(0xab);['description']='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a32_0x1beda1(0x84)](_0x109b12){const _0x3b7288=a32_0x1beda1,{options:_0x3d4b5e,args:_0x43bc44,tdx:_0x44e541}=_0x109b12,_0x5653d8=_0x43bc44[0x0],_0x33f3d9=_0x43bc44[0x1]||'.';if(!_0x5653d8)return console['error'](_0x3b7288(0x9d)),console[_0x3b7288(0xba)]('Usage:\x20workflow:download\x20<project-name>\x20[output-dir]'),0x1;const _0x5d5442=_0x3d4b5e[_0x3b7288(0xf2)];_0x3d4b5e[_0x3b7288(0xa2)]&&(console[_0x3b7288(0xba)](_0x3b7288(0xad)+_0x5653d8),console['error'](_0x3b7288(0xb1)+_0x33f3d9),_0x5d5442&&console[_0x3b7288(0xba)](_0x3b7288(0xc5)+_0x5d5442));const _0x227799=await withSpinner(_0x3b7288(0xf4)+_0x5653d8+_0x3b7288(0xb4),()=>_0x44e541[_0x3b7288(0xcc)][_0x3b7288(0x9b)](_0x5653d8,_0x33f3d9,{'revision':_0x5d5442}),{'verbose':_0x3d4b5e['verbose']}),_0x51655b=_0x227799[_0x3b7288(0xdf)];return console['error'](_0x3b7288(0xd7)+_0x51655b[_0x3b7288(0xbf)]),console['error']('\x20\x20Revision:\x20'+_0x51655b[_0x3b7288(0xf2)]),console[_0x3b7288(0xba)](_0x3b7288(0xc9)+_0x51655b[_0x3b7288(0x8e)]),console[_0x3b7288(0xba)](_0x3b7288(0xee)+_0x33f3d9+'/'+_0x51655b[_0x3b7288(0xbf)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']=a32_0x1beda1(0xf1);['description']=a32_0x1beda1(0xe3);async[a32_0x1beda1(0x84)](_0x526942){const _0x500ee8=a32_0x1beda1,{options:_0x144368,args:_0x338346,tdx:_0x913bd7}=_0x526942;let _0x2de593='.',_0x225409=_0x144368['name'];if(_0x338346[0x0]){const {promises:_0x20d5bd}=await import('fs');try{const _0x1c58a6=await _0x20d5bd[_0x500ee8(0xa4)](_0x338346[0x0]);if(_0x1c58a6[_0x500ee8(0xf9)]())_0x2de593=_0x338346[0x0];else return console[_0x500ee8(0xba)](_0x500ee8(0xe8)+_0x338346[0x0]+_0x500ee8(0xd8)),0x1;}catch{_0x225409=_0x338346[0x0],_0x2de593='.';}}const _0x5bc5fd=_0x144368[_0x500ee8(0xf2)],_0x2cfc1d=_0x144368[_0x500ee8(0xb2)];_0x144368[_0x500ee8(0xa2)]&&(console[_0x500ee8(0xba)]('Project\x20directory:\x20'+_0x2de593),_0x225409&&console['error']('Project\x20name:\x20'+_0x225409),_0x5bc5fd&&console[_0x500ee8(0xba)](_0x500ee8(0xc5)+_0x5bc5fd),_0x2cfc1d&&console[_0x500ee8(0xba)](_0x500ee8(0xa6)));const _0x9389da=await withSpinner(_0x500ee8(0xcb),()=>_0x913bd7[_0x500ee8(0xcc)][_0x500ee8(0xfb)](_0x2de593,{'projectName':_0x225409,'revision':_0x5bc5fd,'skipValidation':_0x2cfc1d}),{'verbose':_0x144368[_0x500ee8(0xa2)]}),_0x3e2393=_0x9389da['data'];return console[_0x500ee8(0xba)]('✔\x20Pushed\x20'+_0x3e2393[_0x500ee8(0xbf)]),console[_0x500ee8(0xba)](_0x500ee8(0xc1)+_0x3e2393[_0x500ee8(0xec)]),console[_0x500ee8(0xba)](_0x500ee8(0x9e)+_0x3e2393[_0x500ee8(0xf2)]),0x0;}}function a32_0x1186(){const _0x289ccc=['name','retrySession','split','logs','workflow:workflows','406tZGsib','offset','Task\x20name:\x20','attemptId','download','retryAttempt','Error:\x20Project\x20name\x20is\x20required','\x20\x20Revision:\x20','Retrying\x20session...','\x22?\x20This\x20cannot\x20be\x20undone.','substring','verbose','Resume\x20from:\x20','stat','637603pakcIg','Validation:\x20skipped','length','Including\x20subtasks:\x20yes','Target:\x20','limit','workflow:download','Getting\x20task\x20logs...','Project:\x20','Retry\x20a\x20session\x20or\x20attempt','\x20\x20Cause:\x20','\x20\x20Session\x20ID:\x20','Output\x20directory:\x20','skipValidation','reason','...','From\x20task:\x20','session','workflow:retry','5ZItKrn','from','error','utf-8','session:','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Attempt\x20ID:\x20','projectName','workflow:kill','\x20\x20Project\x20ID:\x20','status','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Revision:\x20','resumeFrom','Include\x20retried:\x20yes','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','\x20\x20Files\x20extracted:\x20','Getting\x20attempt\x20details...','Pushing\x20workflow\x20project...','workflow','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','ies','Cancelled','parse','workflow:delete','sessionId','Usage:\x20workflow:delete\x20<project-name-or-id>','Listing\x20workflows...','startsWith','cause','✔\x20Downloaded\x20','\x20is\x20not\x20a\x20directory','\x20session','Retrying\x20attempt...','fromTask','\x20workflow','918945NGkHTe','✔\x20Found\x20','data','message','Deleting\x20project\x20','13880sYOwMq','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','workflows','yes','Killing\x20attempt...','Error:\x20','3988194kQXhjo','workflow:attempt','✔\x20Retry\x20started','projectId','workflow:attempts','\x20\x20Location:\x20','params','List\x20workflow\x20attempts','workflow:push','revision','Show\x20logs\x20for\x20a\x20specific\x20task','Downloading\x20project\x20','Status:\x20','fs/promises','✔\x20Deleted\x20project\x20','1060794LkPgOH','isDirectory','Force:\x20yes','push','includeSubtasks','1747304sOKdGK','\x20\x20New\x20attempt\x20ID:\x20','description','attempt','execute','attempt:','tasks','Filter:\x20project=','Show\x20tasks\x20for\x20an\x20attempt','785180wjkATu','Kill\x20a\x20running\x20attempt','List\x20all\x20workflow\x20projects','sessions','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','filesExtracted','readFile','Filter:\x20','Error:\x20Attempt\x20ID\x20is\x20required'];a32_0x1186=function(){return _0x289ccc;};return a32_0x1186();}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x1beda1(0x92)]=a32_0x1beda1(0xd1);[a32_0x1beda1(0xff)]=a32_0x1beda1(0xbd);async[a32_0x1beda1(0x84)](_0x21bb06){const _0x10e76c=a32_0x1beda1,{options:_0x4a45e0,args:_0x52c63f,tdx:_0x10bbca}=_0x21bb06,_0x2b7082=_0x52c63f[0x0];if(!_0x2b7082)return console[_0x10e76c(0xba)](_0x10e76c(0xcd)),console[_0x10e76c(0xba)](_0x10e76c(0xd3)),0x1;_0x4a45e0[_0x10e76c(0xa2)]&&console[_0x10e76c(0xba)](_0x10e76c(0xad)+_0x2b7082);if(!_0x4a45e0[_0x10e76c(0xe6)]){const _0x500162=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x2b7082+_0x10e76c(0xa0));if(!_0x500162)return console[_0x10e76c(0xba)]('Cancelled'),0x0;}const _0x1f7922=await withSpinner(_0x10e76c(0xe1)+_0x2b7082+_0x10e76c(0xb4),()=>_0x10bbca['workflow']['delete'](_0x2b7082),{'verbose':_0x4a45e0[_0x10e76c(0xa2)]}),_0x915d0d=_0x1f7922[_0x10e76c(0xdf)];return console[_0x10e76c(0xba)](_0x10e76c(0xf7)+_0x915d0d['projectName']),console[_0x10e76c(0xba)](_0x10e76c(0xc1)+_0x915d0d[_0x10e76c(0xec)]),0x0;}}
1
+ const a32_0x36fa37=a32_0x3536;(function(_0x50f280,_0x15b4a9){const _0x51ce25=a32_0x3536,_0x5efccd=_0x50f280();while(!![]){try{const _0xe4469f=-parseInt(_0x51ce25(0x231))/0x1+-parseInt(_0x51ce25(0x227))/0x2*(parseInt(_0x51ce25(0x1fc))/0x3)+-parseInt(_0x51ce25(0x22d))/0x4+parseInt(_0x51ce25(0x258))/0x5+-parseInt(_0x51ce25(0x24b))/0x6*(parseInt(_0x51ce25(0x249))/0x7)+parseInt(_0x51ce25(0x24d))/0x8*(parseInt(_0x51ce25(0x253))/0x9)+parseInt(_0x51ce25(0x217))/0xa;if(_0xe4469f===_0x15b4a9)break;else _0x5efccd['push'](_0x5efccd['shift']());}catch(_0x45cb57){_0x5efccd['push'](_0x5efccd['shift']());}}}(a32_0x15ab,0x2a4bc));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';function a32_0x15ab(){const _0x14cd3f=['workflow:logs','kill','cause','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','error','\x20\x20Location:\x20','workflow:attempts','Validation:\x20skipped','Project\x20filter:\x20','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','Deleting\x20project\x20','28dBPtrj','✔\x20Found\x20','311874VOyhXd','Project:\x20','546528ukkGYP','isDirectory','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','Filter:\x20project=','sessions','Error:\x20Attempt\x20ID\x20is\x20required','9lvrsPJ','session','Listing\x20workflow\x20sessions...','Listing\x20workflow\x20attempts...','\x20session','713600dxIKPT','\x22?\x20This\x20cannot\x20be\x20undone.','status','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','utf-8','✔\x20Downloaded\x20','Getting\x20attempt\x20tasks...','fromTask','Pattern:\x20','name','sessionId','Listing\x20workflows...','Project\x20directory:\x20','Kill\x20a\x20running\x20attempt','Reason:\x20','session:','List\x20workflows','workflow:push','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','message','\x20\x20Revision:\x20','filesExtracted','Listing\x20workflow\x20projects...','Attempt\x20ID:\x20','✔\x20Deleted\x20project\x20','\x20log\x20entr','Downloading\x20project\x20','offset','Revision:\x20','attempt:','Task\x20name:\x20','\x20\x20New\x20attempt\x20ID:\x20','push','List\x20workflow\x20execution\x20sessions','Show\x20logs\x20for\x20a\x20specific\x20task','workflow:delete','List\x20all\x20workflow\x20projects','Getting\x20attempt\x20details...','length','869502XYgWXt','revision','Params:\x20','Killing\x20attempt...','description','\x20\x20Cause:\x20','Usage:\x20workflow:delete\x20<project-name-or-id>','Show\x20tasks\x20for\x20an\x20attempt','workflow:retry','logs','data','includeRetried','...','Error:\x20Project\x20name\x20is\x20required','limit','attemptId','Error:\x20Invalid\x20JSON\x20in\x20--params','\x20project','resumeFrom','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Force:\x20yes','from','workflows','workflow:tasks','From\x20task:\x20','split','verbose','8774700GutBQT','\x20\x20Project\x20ID:\x20','Retrying\x20session...','yes','workflow:kill','retryAttempt','workflow:projects','execute','force','reason','substring','projectName','workflow:sessions','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','parse','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','2NiyhDA','Show\x20specific\x20attempt\x20details','startsWith','Cancelled','\x20\x20Session\x20ID:\x20','Target:\x20','335296jzsKMQ','workflow','\x20task','fs/promises','333688FIESju','ies','Resume\x20from:\x20','workflow:download','Error:\x20','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Output\x20directory:\x20','stat','params','\x20workflow','Filter:\x20','attempt'];a32_0x15ab=function(){return _0x14cd3f;};return a32_0x15ab();}import{confirm}from'../utils/prompt.js';export class WorkflowProjectsCommand extends BaseCommand{[a32_0x36fa37(0x1de)]=a32_0x36fa37(0x21d);[a32_0x36fa37(0x200)]=a32_0x36fa37(0x1f9);async['execute'](_0x58de6d){const _0x352807=a32_0x36fa37,{options:_0x58cef6,args:_0x163a65,tdx:_0x43e602}=_0x58de6d,_0x133a58=_0x163a65[0x0];try{_0x58cef6[_0x352807(0x216)]&&_0x133a58&&console['error'](_0x352807(0x1dd)+_0x133a58);const _0x598774=await withSpinner(_0x352807(0x1eb),()=>_0x43e602[_0x352807(0x22e)]['projects'](_0x133a58,{'limit':_0x58cef6[_0x352807(0x20a)]}),{'verbose':_0x58cef6[_0x352807(0x216)]}),_0x4e296c=_0x598774[_0x352807(0x206)];return console['error'](_0x352807(0x24a)+_0x4e296c[_0x352807(0x1fb)]+_0x352807(0x20d)+(_0x4e296c['length']!==0x1?'s':'')),await handleSDKOutput(_0x4e296c,_0x58cef6),0x0;}catch(_0x460aa7){if(_0x460aa7 instanceof SDKError)return console[_0x352807(0x242)]('Error:\x20'+_0x460aa7[_0x352807(0x1e8)]),_0x460aa7[_0x352807(0x23f)]&&console[_0x352807(0x242)](_0x352807(0x201)+_0x460aa7['cause']),0x1;throw _0x460aa7;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']='workflow:workflows';[a32_0x36fa37(0x200)]=a32_0x36fa37(0x1e5);async['execute'](_0x363945){const _0x12f047=a32_0x36fa37,{options:_0x19f234,args:_0x56fbc7,tdx:_0x17140b}=_0x363945,_0x2363b7=_0x56fbc7[0x0];try{_0x19f234[_0x12f047(0x216)]&&_0x2363b7&&console[_0x12f047(0x242)](_0x12f047(0x246)+_0x2363b7);const _0x39248f=await withSpinner(_0x12f047(0x1e0),()=>_0x17140b[_0x12f047(0x22e)][_0x12f047(0x212)](_0x2363b7,{'limit':_0x19f234[_0x12f047(0x20a)]}),{'verbose':_0x19f234[_0x12f047(0x216)]}),_0x3b2906=_0x39248f[_0x12f047(0x206)];return console[_0x12f047(0x242)](_0x12f047(0x24a)+_0x3b2906['length']+_0x12f047(0x23a)+(_0x3b2906[_0x12f047(0x1fb)]!==0x1?'s':'')),await handleSDKOutput(_0x3b2906,_0x19f234),0x0;}catch(_0x27f0e9){if(_0x27f0e9 instanceof SDKError)return console[_0x12f047(0x242)](_0x12f047(0x235)+_0x27f0e9[_0x12f047(0x1e8)]),_0x27f0e9[_0x12f047(0x23f)]&&console[_0x12f047(0x242)]('\x20\x20Cause:\x20'+_0x27f0e9[_0x12f047(0x23f)]),0x1;throw _0x27f0e9;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a32_0x36fa37(0x223);[a32_0x36fa37(0x200)]=a32_0x36fa37(0x1f6);async[a32_0x36fa37(0x21e)](_0x544792){const _0x58972c=a32_0x36fa37,{options:_0x5beeb9,args:_0xdc7e7b,tdx:_0x36c980}=_0x544792;let _0x58dfb4,_0x3988b7;if(_0xdc7e7b[0x0]){const _0x2d256e=_0xdc7e7b[0x0]['split']('.');if(_0x2d256e[_0x58972c(0x1fb)]===0x1)_0x58dfb4=_0x2d256e[0x0];else{if(_0x2d256e['length']===0x2)[_0x58dfb4,_0x3988b7]=_0x2d256e;else return console['error'](_0x58972c(0x241)),0x1;}}try{if(_0x5beeb9['verbose']){if(_0x58dfb4&&_0x3988b7)console[_0x58972c(0x242)](_0x58972c(0x23b)+_0x58dfb4+'.'+_0x3988b7);else _0x58dfb4&&console['error'](_0x58972c(0x250)+_0x58dfb4);const _0x4a3d3e=_0x5beeb9[_0x58972c(0x1d7)];_0x4a3d3e&&console[_0x58972c(0x242)]('Status:\x20'+_0x4a3d3e);}const _0x118fa3=await withSpinner(_0x58972c(0x255),()=>_0x36c980[_0x58972c(0x22e)][_0x58972c(0x251)]({'projectName':_0x58dfb4,'workflowName':_0x3988b7,'status':_0x5beeb9[_0x58972c(0x1d7)],'fromTime':_0x5beeb9[_0x58972c(0x211)],'toTime':_0x5beeb9['to'],'limit':_0x5beeb9[_0x58972c(0x20a)]}),{'verbose':_0x5beeb9[_0x58972c(0x216)]}),_0x5cc460=_0x118fa3[_0x58972c(0x206)];return console[_0x58972c(0x242)](_0x58972c(0x24a)+_0x5cc460[_0x58972c(0x1fb)]+_0x58972c(0x257)+(_0x5cc460['length']!==0x1?'s':'')),await handleSDKOutput(_0x5cc460,_0x5beeb9),0x0;}catch(_0x5ae9aa){if(_0x5ae9aa instanceof SDKError)return console[_0x58972c(0x242)](_0x58972c(0x235)+_0x5ae9aa[_0x58972c(0x1e8)]),_0x5ae9aa[_0x58972c(0x23f)]&&console[_0x58972c(0x242)]('\x20\x20Cause:\x20'+_0x5ae9aa[_0x58972c(0x23f)]),0x1;throw _0x5ae9aa;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x36fa37(0x1de)]=a32_0x36fa37(0x244);['description']='List\x20workflow\x20attempts';async[a32_0x36fa37(0x21e)](_0x26c3b3){const _0x14750e=a32_0x36fa37,{options:_0xcdd28e,args:_0x5ad534,tdx:_0x70b5b7}=_0x26c3b3;let _0x490ea3,_0x509425;if(_0x5ad534[0x0]){const _0x255c24=_0x5ad534[0x0][_0x14750e(0x215)]('.');if(_0x255c24[_0x14750e(0x1fb)]===0x1)_0x490ea3=_0x255c24[0x0];else{if(_0x255c24[_0x14750e(0x1fb)]===0x2)[_0x490ea3,_0x509425]=_0x255c24;else return console[_0x14750e(0x242)](_0x14750e(0x241)),0x1;}}try{const _0x599a06=_0xcdd28e[_0x14750e(0x207)];if(_0xcdd28e[_0x14750e(0x216)]){if(_0x490ea3&&_0x509425)console[_0x14750e(0x242)](_0x14750e(0x23b)+_0x490ea3+'.'+_0x509425);else _0x490ea3&&console[_0x14750e(0x242)]('Filter:\x20project='+_0x490ea3);_0x599a06&&console[_0x14750e(0x242)]('Include\x20retried:\x20yes');}const _0x23f15f=await withSpinner(_0x14750e(0x256),()=>_0x70b5b7[_0x14750e(0x22e)]['attempts']({'projectName':_0x490ea3,'workflowName':_0x509425,'includeRetried':_0x599a06,'limit':_0xcdd28e[_0x14750e(0x20a)]}),{'verbose':_0xcdd28e[_0x14750e(0x216)]}),_0x3f412d=_0x23f15f['data'];return console['error']('✔\x20Found\x20'+_0x3f412d[_0x14750e(0x1fb)]+'\x20attempt'+(_0x3f412d[_0x14750e(0x1fb)]!==0x1?'s':'')),await handleSDKOutput(_0x3f412d,_0xcdd28e),0x0;}catch(_0x1c4302){if(_0x1c4302 instanceof SDKError)return console[_0x14750e(0x242)](_0x14750e(0x235)+_0x1c4302[_0x14750e(0x1e8)]),_0x1c4302[_0x14750e(0x23f)]&&console[_0x14750e(0x242)]('\x20\x20Cause:\x20'+_0x1c4302[_0x14750e(0x23f)]),0x1;throw _0x1c4302;}}}export class WorkflowAttemptCommand extends BaseCommand{[a32_0x36fa37(0x1de)]='workflow:attempt';[a32_0x36fa37(0x200)]=a32_0x36fa37(0x228);async['execute'](_0x4f80db){const _0x128103=a32_0x36fa37,{options:_0x93675f,args:_0x4123d5,tdx:_0x5f2a54}=_0x4f80db,_0x58f2f9=_0x4123d5[0x0];if(!_0x58f2f9)return console[_0x128103(0x242)](_0x128103(0x252)),0x1;try{_0x93675f['verbose']&&console['error']('Attempt\x20ID:\x20'+_0x58f2f9);const _0x3139ab=await withSpinner(_0x128103(0x1fa),()=>_0x5f2a54[_0x128103(0x22e)][_0x128103(0x23c)](_0x58f2f9),{'verbose':_0x93675f[_0x128103(0x216)]}),_0x403245=_0x3139ab[_0x128103(0x206)];return await handleSDKOutput([_0x403245],_0x93675f),0x0;}catch(_0x2b847d){if(_0x2b847d instanceof SDKError)return console[_0x128103(0x242)]('Error:\x20'+_0x2b847d['message']),_0x2b847d[_0x128103(0x23f)]&&console[_0x128103(0x242)](_0x128103(0x201)+_0x2b847d[_0x128103(0x23f)]),0x1;throw _0x2b847d;}}}function a32_0x3536(_0x5349d1,_0x310b30){const _0x15ab39=a32_0x15ab();return a32_0x3536=function(_0x35364f,_0x147f0c){_0x35364f=_0x35364f-0x1d6;let _0x437f85=_0x15ab39[_0x35364f];return _0x437f85;},a32_0x3536(_0x5349d1,_0x310b30);}export class WorkflowTasksCommand extends BaseCommand{[a32_0x36fa37(0x1de)]=a32_0x36fa37(0x213);['description']=a32_0x36fa37(0x203);async[a32_0x36fa37(0x21e)](_0x2113f9){const _0x1b32ee=a32_0x36fa37,{options:_0x1afcc2,args:_0x26c2d2,tdx:_0x42b38c}=_0x2113f9,_0x5d470e=_0x26c2d2[0x0];if(!_0x5d470e)return console[_0x1b32ee(0x242)](_0x1b32ee(0x252)),0x1;try{const _0x150f35=_0x1afcc2['includeSubtasks'];_0x1afcc2[_0x1b32ee(0x216)]&&(console[_0x1b32ee(0x242)](_0x1b32ee(0x1ec)+_0x5d470e),_0x150f35&&console[_0x1b32ee(0x242)]('Including\x20subtasks:\x20yes'));const _0x23b115=await withSpinner(_0x1b32ee(0x1db),()=>_0x42b38c[_0x1b32ee(0x22e)]['tasks'](_0x5d470e,_0x150f35||![]),{'verbose':_0x1afcc2[_0x1b32ee(0x216)]}),_0x522d0d=_0x23b115[_0x1b32ee(0x206)];return console[_0x1b32ee(0x242)]('✔\x20Found\x20'+_0x522d0d[_0x1b32ee(0x1fb)]+_0x1b32ee(0x22f)+(_0x522d0d[_0x1b32ee(0x1fb)]!==0x1?'s':'')),await handleSDKOutput(_0x522d0d,_0x1afcc2),0x0;}catch(_0x9b0242){if(_0x9b0242 instanceof SDKError)return console[_0x1b32ee(0x242)](_0x1b32ee(0x235)+_0x9b0242[_0x1b32ee(0x1e8)]),_0x9b0242[_0x1b32ee(0x23f)]&&console['error'](_0x1b32ee(0x201)+_0x9b0242[_0x1b32ee(0x23f)]),0x1;throw _0x9b0242;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0x36fa37(0x1de)]=a32_0x36fa37(0x23d);[a32_0x36fa37(0x200)]=a32_0x36fa37(0x1f7);async[a32_0x36fa37(0x21e)](_0x4bf76a){const _0xc36122=a32_0x36fa37,{options:_0x2cdbb3,args:_0x416c8b,tdx:_0x287bbf}=_0x4bf76a,_0xa4dcde=_0x416c8b[0x0],_0x1eaba2=_0x416c8b[0x1];if(!_0xa4dcde||!_0x1eaba2)return console[_0xc36122(0x242)]('Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required'),0x1;try{_0x2cdbb3[_0xc36122(0x216)]&&(console[_0xc36122(0x242)]('Attempt\x20ID:\x20'+_0xa4dcde),console[_0xc36122(0x242)](_0xc36122(0x1f3)+_0x1eaba2));const _0xe4fb38=_0x2cdbb3[_0xc36122(0x1f0)],_0x419753=await withSpinner('Getting\x20task\x20logs...',()=>_0x287bbf['workflow'][_0xc36122(0x205)](_0xa4dcde,_0x1eaba2,{'offset':_0xe4fb38,'limit':_0x2cdbb3[_0xc36122(0x20a)]}),{'verbose':_0x2cdbb3['verbose']}),_0x4d8c84=_0x419753[_0xc36122(0x206)];return console['error'](_0xc36122(0x24a)+_0x4d8c84[_0xc36122(0x1fb)]+_0xc36122(0x1ee)+(_0x4d8c84[_0xc36122(0x1fb)]!==0x1?_0xc36122(0x232):'y')),await handleSDKOutput(_0x4d8c84,_0x2cdbb3),0x0;}catch(_0x266399){if(_0x266399 instanceof SDKError)return console['error'](_0xc36122(0x235)+_0x266399['message']),_0x266399[_0xc36122(0x23f)]&&console[_0xc36122(0x242)](_0xc36122(0x201)+_0x266399[_0xc36122(0x23f)]),0x1;throw _0x266399;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x36fa37(0x1de)]=a32_0x36fa37(0x21b);[a32_0x36fa37(0x200)]=a32_0x36fa37(0x1e2);async['execute'](_0x5cd58e){const _0x57265f=a32_0x36fa37,{options:_0x23e819,args:_0x4678df,tdx:_0x477690}=_0x5cd58e,_0x2f829b=_0x4678df[0x0];if(!_0x2f829b)return console['error'](_0x57265f(0x252)),0x1;try{const _0x37e56=_0x23e819[_0x57265f(0x220)];_0x23e819[_0x57265f(0x216)]&&(console['error'](_0x57265f(0x1ec)+_0x2f829b),_0x37e56&&console[_0x57265f(0x242)](_0x57265f(0x1e3)+_0x37e56));if(!_0x23e819[_0x57265f(0x21a)]){const _0xc00208=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20'+_0x2f829b+'?');if(!_0xc00208)return console[_0x57265f(0x242)](_0x57265f(0x22a)),0x0;}const _0x90b140=await withSpinner(_0x57265f(0x1ff),()=>_0x477690[_0x57265f(0x22e)][_0x57265f(0x23e)](_0x2f829b,_0x37e56),{'verbose':_0x23e819[_0x57265f(0x216)]}),_0x58c252=_0x90b140[_0x57265f(0x206)];return console[_0x57265f(0x242)]('✔\x20'+_0x58c252),0x0;}catch(_0x3ec6c5){if(_0x3ec6c5 instanceof SDKError)return console[_0x57265f(0x242)](_0x57265f(0x235)+_0x3ec6c5['message']),_0x3ec6c5[_0x57265f(0x23f)]&&console[_0x57265f(0x242)](_0x57265f(0x201)+_0x3ec6c5['cause']),0x1;throw _0x3ec6c5;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x36fa37(0x1de)]=a32_0x36fa37(0x204);[a32_0x36fa37(0x200)]='Retry\x20a\x20session\x20or\x20attempt';async[a32_0x36fa37(0x21e)](_0x16cde7){const _0xc481d5=a32_0x36fa37,{options:_0x70c818,args:_0x20a5f8,tdx:_0x3ec46e}=_0x16cde7,_0x33ec1d=_0x20a5f8[0x0];if(!_0x33ec1d)return console['error'](_0xc481d5(0x20f)),console[_0xc481d5(0x242)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x565141=![],_0x5952a9=_0x33ec1d;if(_0x33ec1d[_0xc481d5(0x229)](_0xc481d5(0x1e4)))_0x565141=!![],_0x5952a9=_0x33ec1d[_0xc481d5(0x221)](0x8);else{if(_0x33ec1d[_0xc481d5(0x229)](_0xc481d5(0x1f2)))_0x565141=![],_0x5952a9=_0x33ec1d[_0xc481d5(0x221)](0x8);else return console[_0xc481d5(0x242)](_0xc481d5(0x226)),console[_0xc481d5(0x242)](_0xc481d5(0x224)),0x1;}try{const _0x3bba61=_0x70c818[_0xc481d5(0x1dc)],_0x59ca0b=_0x70c818[_0xc481d5(0x20e)],_0x466eb3=_0x70c818[_0xc481d5(0x239)],_0x12e206=_0x70c818[_0xc481d5(0x21f)];_0x70c818['verbose']&&(console[_0xc481d5(0x242)](_0xc481d5(0x22c)+(_0x565141?_0xc481d5(0x254):_0xc481d5(0x23c))+'\x20'+_0x5952a9),_0x3bba61&&console['error'](_0xc481d5(0x214)+_0x3bba61),_0x59ca0b&&console[_0xc481d5(0x242)](_0xc481d5(0x233)+_0x59ca0b),_0x466eb3&&console[_0xc481d5(0x242)](_0xc481d5(0x1fe)+_0x466eb3),_0x12e206&&console[_0xc481d5(0x242)](_0xc481d5(0x210)));let _0x33f252;if(_0x466eb3)try{if(_0x466eb3[_0xc481d5(0x229)]('@')){const _0x4cf502=await import(_0xc481d5(0x230)),_0x3d6118=_0x466eb3['substring'](0x1),_0x1199dd=await _0x4cf502['readFile'](_0x3d6118,_0xc481d5(0x1d9));_0x33f252=JSON[_0xc481d5(0x225)](_0x1199dd);}else _0x33f252=JSON['parse'](_0x466eb3);}catch{return console[_0xc481d5(0x242)](_0xc481d5(0x20c)),0x1;}if(!_0x70c818['yes']){const _0x16e7ef=await confirm(_0xc481d5(0x240)+(_0x565141?'session':_0xc481d5(0x23c))+'\x20'+_0x5952a9+'?');if(!_0x16e7ef)return console[_0xc481d5(0x242)](_0xc481d5(0x22a)),0x0;}let _0x3a03c2;_0x565141?_0x3a03c2=await withSpinner(_0xc481d5(0x219),()=>_0x3ec46e['workflow']['retrySession'](_0x5952a9,{'fromTask':_0x3bba61,'retryParams':_0x33f252}),{'verbose':_0x70c818[_0xc481d5(0x216)]}):_0x3a03c2=await withSpinner('Retrying\x20attempt...',()=>_0x3ec46e['workflow'][_0xc481d5(0x21c)](_0x5952a9,{'resumeFrom':_0x59ca0b,'retryParams':_0x33f252,'force':_0x12e206}),{'verbose':_0x70c818[_0xc481d5(0x216)]});const _0x2e61ef=_0x3a03c2[_0xc481d5(0x206)];return console['error']('✔\x20Retry\x20started'),console[_0xc481d5(0x242)](_0xc481d5(0x1f4)+_0x2e61ef[_0xc481d5(0x20b)]),console[_0xc481d5(0x242)](_0xc481d5(0x22b)+_0x2e61ef[_0xc481d5(0x1df)]),0x0;}catch(_0x44c06a){if(_0x44c06a instanceof SDKError)return console[_0xc481d5(0x242)](_0xc481d5(0x235)+_0x44c06a[_0xc481d5(0x1e8)]),_0x44c06a[_0xc481d5(0x23f)]&&console[_0xc481d5(0x242)](_0xc481d5(0x201)+_0x44c06a['cause']),0x1;throw _0x44c06a;}}}export class WorkflowDownloadCommand extends BaseCommand{['name']=a32_0x36fa37(0x234);['description']='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a32_0x36fa37(0x21e)](_0x20c7aa){const _0x366331=a32_0x36fa37,{options:_0x266831,args:_0x26f3c7,tdx:_0x4c8b0c}=_0x20c7aa,_0x137e0a=_0x26f3c7[0x0],_0x32b8db=_0x26f3c7[0x1]||'.';if(!_0x137e0a)return console[_0x366331(0x242)](_0x366331(0x209)),console[_0x366331(0x242)](_0x366331(0x236)),0x1;const _0x283ae3=_0x266831[_0x366331(0x1fd)];_0x266831[_0x366331(0x216)]&&(console[_0x366331(0x242)](_0x366331(0x24c)+_0x137e0a),console['error'](_0x366331(0x237)+_0x32b8db),_0x283ae3&&console[_0x366331(0x242)](_0x366331(0x1f1)+_0x283ae3));const _0x3b0d7b=await withSpinner(_0x366331(0x1ef)+_0x137e0a+_0x366331(0x208),()=>_0x4c8b0c[_0x366331(0x22e)]['download'](_0x137e0a,_0x32b8db,{'revision':_0x283ae3}),{'verbose':_0x266831[_0x366331(0x216)]}),_0x5dbb37=_0x3b0d7b['data'];return console[_0x366331(0x242)](_0x366331(0x1da)+_0x5dbb37[_0x366331(0x222)]),console[_0x366331(0x242)]('\x20\x20Revision:\x20'+_0x5dbb37[_0x366331(0x1fd)]),console[_0x366331(0x242)]('\x20\x20Files\x20extracted:\x20'+_0x5dbb37[_0x366331(0x1ea)]),console[_0x366331(0x242)](_0x366331(0x243)+_0x32b8db+'/'+_0x5dbb37[_0x366331(0x222)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{[a32_0x36fa37(0x1de)]=a32_0x36fa37(0x1e6);[a32_0x36fa37(0x200)]=a32_0x36fa37(0x1d8);async[a32_0x36fa37(0x21e)](_0x10c031){const _0x713543=a32_0x36fa37,{options:_0x201c86,args:_0x3d42e2,tdx:_0x51d5f4}=_0x10c031;let _0x742bdc='.',_0x143087=_0x201c86[_0x713543(0x1de)];if(_0x3d42e2[0x0]){const {promises:_0x1d2fdc}=await import('fs');try{const _0x517e9f=await _0x1d2fdc[_0x713543(0x238)](_0x3d42e2[0x0]);if(_0x517e9f[_0x713543(0x24e)]())_0x742bdc=_0x3d42e2[0x0];else return console[_0x713543(0x242)](_0x713543(0x235)+_0x3d42e2[0x0]+'\x20is\x20not\x20a\x20directory'),0x1;}catch{_0x143087=_0x3d42e2[0x0],_0x742bdc='.';}}const _0x226879=_0x201c86[_0x713543(0x1fd)],_0x159376=_0x201c86['skipValidation'];_0x201c86[_0x713543(0x216)]&&(console[_0x713543(0x242)](_0x713543(0x1e1)+_0x742bdc),_0x143087&&console[_0x713543(0x242)]('Project\x20name:\x20'+_0x143087),_0x226879&&console[_0x713543(0x242)](_0x713543(0x1f1)+_0x226879),_0x159376&&console['error'](_0x713543(0x245)));const _0x46b209=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x51d5f4[_0x713543(0x22e)][_0x713543(0x1f5)](_0x742bdc,{'projectName':_0x143087,'revision':_0x226879,'skipValidation':_0x159376}),{'verbose':_0x201c86[_0x713543(0x216)]}),_0x3ddb69=_0x46b209[_0x713543(0x206)];return console[_0x713543(0x242)]('✔\x20Pushed\x20'+_0x3ddb69[_0x713543(0x222)]),console[_0x713543(0x242)](_0x713543(0x218)+_0x3ddb69['projectId']),console[_0x713543(0x242)](_0x713543(0x1e9)+_0x3ddb69[_0x713543(0x1fd)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x36fa37(0x1de)]=a32_0x36fa37(0x1f8);[a32_0x36fa37(0x200)]=a32_0x36fa37(0x247);async[a32_0x36fa37(0x21e)](_0x234ab7){const _0x4fddad=a32_0x36fa37,{options:_0xfe1ca3,args:_0x161a23,tdx:_0x5c3c14}=_0x234ab7,_0xa9ed53=_0x161a23[0x0];if(!_0xa9ed53)return console['error'](_0x4fddad(0x1e7)),console[_0x4fddad(0x242)](_0x4fddad(0x202)),0x1;_0xfe1ca3['verbose']&&console[_0x4fddad(0x242)](_0x4fddad(0x24c)+_0xa9ed53);if(!_0xfe1ca3[_0x4fddad(0x21a)]){const _0x335cb6=await confirm(_0x4fddad(0x24f)+_0xa9ed53+_0x4fddad(0x1d6));if(!_0x335cb6)return console[_0x4fddad(0x242)](_0x4fddad(0x22a)),0x0;}const _0x46902f=await withSpinner(_0x4fddad(0x248)+_0xa9ed53+_0x4fddad(0x208),()=>_0x5c3c14[_0x4fddad(0x22e)]['delete'](_0xa9ed53),{'verbose':_0xfe1ca3[_0x4fddad(0x216)]}),_0x12830c=_0x46902f[_0x4fddad(0x206)];return console[_0x4fddad(0x242)](_0x4fddad(0x1ed)+_0x12830c['projectName']),console[_0x4fddad(0x242)](_0x4fddad(0x218)+_0x12830c['projectId']),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4987bc,_0x5072a2){const _0x1ae149=a33_0x5e88,_0x4da669=_0x4987bc();while(!![]){try{const _0x4ff33d=-parseInt(_0x1ae149(0xd0))/0x1*(-parseInt(_0x1ae149(0xcb))/0x2)+-parseInt(_0x1ae149(0xd6))/0x3*(parseInt(_0x1ae149(0xc6))/0x4)+-parseInt(_0x1ae149(0xc7))/0x5*(-parseInt(_0x1ae149(0xca))/0x6)+parseInt(_0x1ae149(0xc0))/0x7+-parseInt(_0x1ae149(0xc3))/0x8*(-parseInt(_0x1ae149(0xc9))/0x9)+-parseInt(_0x1ae149(0xd5))/0xa*(-parseInt(_0x1ae149(0xd3))/0xb)+-parseInt(_0x1ae149(0xd2))/0xc;if(_0x4ff33d===_0x5072a2)break;else _0x4da669['push'](_0x4da669['shift']());}catch(_0x45b394){_0x4da669['push'](_0x4da669['shift']());}}}(a33_0x54d2,0x1f026));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a33_0x54d2(){const _0x2d6ca6=['2QhcYaJ','tdx','TD1\x20','../../package.json','entries','61518zJUDBW','replace','6315264lvKDKF','359194vraEvM','length','10deMkXN','633qXTuIz','X-Trino-User','1546741MvFexv','parse','utf-8','40CIeJxC','version','Authorization','888MVZQNz','5Qbuggv','url','239787NShDaj','1510668KIExaT'];a33_0x54d2=function(){return _0x2d6ca6;};return a33_0x54d2();}import{getAPIKey}from'./config.js';export function getVersion(){const _0x5f074a=a33_0x5e88;try{const _0x58ddd3=fileURLToPath(import.meta[_0x5f074a(0xc8)]),_0x7dc0fa=dirname(_0x58ddd3),_0x1ae5db=join(_0x7dc0fa,_0x5f074a(0xce)),_0x5312d3=JSON[_0x5f074a(0xc1)](readFileSync(_0x1ae5db,_0x5f074a(0xc2)));return _0x5312d3['version'];}catch{return'0.0.0';}}function a33_0x5e88(_0x29dd1f,_0x7e97){const _0x54d261=a33_0x54d2();return a33_0x5e88=function(_0x5e8866,_0x15fcf3){_0x5e8866=_0x5e8866-0xbf;let _0x170738=_0x54d261[_0x5e8866];return _0x170738;},a33_0x5e88(_0x29dd1f,_0x7e97);}export function getUserAgent(){const _0x69223b=a33_0x5e88,_0x2d445a=getVersion(),_0x1b3a87=platform(),_0x1d14d5=process[_0x69223b(0xc4)][_0x69223b(0xd1)]('v','');return'tdx/'+_0x2d445a+'\x20('+_0x1b3a87+';\x20node/'+_0x1d14d5+')';}export function getAuthHeaders(_0x553238,_0x3671a5){const _0xb35b98=a33_0x5e88,_0x37a9e6=getVersion(),_0x552ae6={'User-Agent':getUserAgent(),'X-TD-Client':_0xb35b98(0xcc),'X-TD-Client-Version':_0x37a9e6};return _0x3671a5&&(_0x552ae6['Authorization']=_0xb35b98(0xcd)+_0x3671a5),_0x552ae6;}export function toHeaderRecord(_0x57106a){const _0x1d0d74=a33_0x5e88,_0x735bc8={};for(const [_0x81e25e,_0x2a70c5]of Object[_0x1d0d74(0xcf)](_0x57106a)){_0x2a70c5!==undefined&&(_0x735bc8[_0x81e25e]=_0x2a70c5);}return _0x735bc8;}export function getTrinoHeaders(_0x3280bd,_0x893b5b){const _0x362aa0=a33_0x5e88,_0x501a0c=getAuthHeaders(_0x3280bd,_0x893b5b),_0x2e1bac=toHeaderRecord(_0x501a0c);return delete _0x2e1bac[_0x362aa0(0xc5)],_0x893b5b&&(_0x2e1bac[_0x362aa0(0xbf)]=_0x893b5b),_0x2e1bac;}export function hasAPIKey(_0xeec7){const _0x5b20fc=a33_0x5e88,_0x32e5fd=getAPIKey(_0xeec7);return _0x32e5fd!==undefined&&_0x32e5fd[_0x5b20fc(0xd4)]>0x0;}
1
+ (function(_0x2fc283,_0x2c6456){const _0x3a0ba3=a33_0x52da,_0x2e8238=_0x2fc283();while(!![]){try{const _0x379ee4=parseInt(_0x3a0ba3(0x1df))/0x1+parseInt(_0x3a0ba3(0x1ec))/0x2+parseInt(_0x3a0ba3(0x1e8))/0x3+-parseInt(_0x3a0ba3(0x1f5))/0x4*(parseInt(_0x3a0ba3(0x1f1))/0x5)+-parseInt(_0x3a0ba3(0x1f3))/0x6*(parseInt(_0x3a0ba3(0x1f4))/0x7)+parseInt(_0x3a0ba3(0x1e4))/0x8+-parseInt(_0x3a0ba3(0x1ea))/0x9*(parseInt(_0x3a0ba3(0x1e6))/0xa);if(_0x379ee4===_0x2c6456)break;else _0x2e8238['push'](_0x2e8238['shift']());}catch(_0x132d6e){_0x2e8238['push'](_0x2e8238['shift']());}}}(a33_0x4184,0x1aadc));import{platform}from'os';function a33_0x52da(_0x5da9d7,_0x3e7fb9){const _0x4184a9=a33_0x4184();return a33_0x52da=function(_0x52da3b,_0x38c47c){_0x52da3b=_0x52da3b-0x1de;let _0x250fe9=_0x4184a9[_0x52da3b];return _0x250fe9;},a33_0x52da(_0x5da9d7,_0x3e7fb9);}import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x4198b3=a33_0x52da;try{const _0x1145e3=fileURLToPath(import.meta[_0x4198b3(0x1eb)]),_0x234488=dirname(_0x1145e3),_0x9fc7fc=join(_0x234488,_0x4198b3(0x1ee)),_0x61bff8=JSON[_0x4198b3(0x1f0)](readFileSync(_0x9fc7fc,_0x4198b3(0x1e3)));return _0x61bff8[_0x4198b3(0x1e9)];}catch{return _0x4198b3(0x1de);}}function a33_0x4184(){const _0x17a373=['../../package.json','X-Trino-User','parse','45mSWJGf','tdx','12QFqaTR','24997QeAQaX','37388oadDxt','0.0.0','216780BRhBcR','length','Authorization',';\x20node/','utf-8','201480yXAPrN','entries','1465810GEHZCq','replace','209361MhFxsT','version','9CHOIeh','url','70740qWRYxU','TD1\x20'];a33_0x4184=function(){return _0x17a373;};return a33_0x4184();}export function getUserAgent(){const _0x11bc9b=a33_0x52da,_0x4f0da3=getVersion(),_0x54fecc=platform(),_0x1afadc=process[_0x11bc9b(0x1e9)][_0x11bc9b(0x1e7)]('v','');return'tdx/'+_0x4f0da3+'\x20('+_0x54fecc+_0x11bc9b(0x1e2)+_0x1afadc+')';}export function getAuthHeaders(_0x5b155b,_0x3e102){const _0x1683f6=a33_0x52da,_0x2cb131=getVersion(),_0x4b68d1={'User-Agent':getUserAgent(),'X-TD-Client':_0x1683f6(0x1f2),'X-TD-Client-Version':_0x2cb131};return _0x3e102&&(_0x4b68d1[_0x1683f6(0x1e1)]=_0x1683f6(0x1ed)+_0x3e102),_0x4b68d1;}export function toHeaderRecord(_0x24b27f){const _0x35c5ae=a33_0x52da,_0x5f32aa={};for(const [_0x335412,_0x36a2b0]of Object[_0x35c5ae(0x1e5)](_0x24b27f)){_0x36a2b0!==undefined&&(_0x5f32aa[_0x335412]=_0x36a2b0);}return _0x5f32aa;}export function getTrinoHeaders(_0x199e7a,_0x41333a){const _0x4dae6d=a33_0x52da,_0x103518=getAuthHeaders(_0x199e7a,_0x41333a),_0x4d9948=toHeaderRecord(_0x103518);return delete _0x4d9948[_0x4dae6d(0x1e1)],_0x41333a&&(_0x4d9948[_0x4dae6d(0x1ef)]=_0x41333a),_0x4d9948;}export function hasAPIKey(_0x24278d){const _0x4a1165=a33_0x52da,_0x9d8b91=getAPIKey(_0x24278d);return _0x9d8b91!==undefined&&_0x9d8b91[_0x4a1165(0x1e0)]>0x0;}
@@ -1 +1 @@
1
- (function(_0x4ce0f7,_0x1040b7){const _0x4df924=a34_0x1044,_0x37ff33=_0x4ce0f7();while(!![]){try{const _0x304d57=parseInt(_0x4df924(0xdd))/0x1+-parseInt(_0x4df924(0xcb))/0x2+-parseInt(_0x4df924(0xc9))/0x3*(-parseInt(_0x4df924(0xc7))/0x4)+-parseInt(_0x4df924(0xe1))/0x5*(parseInt(_0x4df924(0xbe))/0x6)+parseInt(_0x4df924(0xd8))/0x7*(parseInt(_0x4df924(0xb1))/0x8)+parseInt(_0x4df924(0xd7))/0x9+-parseInt(_0x4df924(0xce))/0xa*(-parseInt(_0x4df924(0xe2))/0xb);if(_0x304d57===_0x1040b7)break;else _0x37ff33['push'](_0x37ff33['shift']());}catch(_0x1e1c9e){_0x37ff33['push'](_0x37ff33['shift']());}}}(a34_0x2ab3,0x781b3));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x3709ec from'node:fs';import*as a34_0x2eb08a from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x126a98=a34_0x1044;return process[_0x126a98(0xc2)][_0x126a98(0xcf)]||join(homedir(),_0x126a98(0xd1),'tdx');}export function getConfigFile(){return join(getConfigDir(),'.env');}export function getCacheDir(){const _0x45dee0=a34_0x1044;return process[_0x45dee0(0xc2)][_0x45dee0(0xb8)]||join(homedir(),_0x45dee0(0xbf),'tdx');}export function getLLMProjectCacheFile(){return join(getCacheDir(),'llm_default_project');}export function readCachedLLMProject(){const _0x3a7339=a34_0x1044;try{const _0x4bb3d9=getLLMProjectCacheFile();if(!existsSync(_0x4bb3d9))return null;return readFileSync(_0x4bb3d9,_0x3a7339(0xe0))[_0x3a7339(0xb0)]();}catch{return null;}}function a34_0x1044(_0xb28d2f,_0x410c9c){const _0x2ab3b6=a34_0x2ab3();return a34_0x1044=function(_0x10445e,_0x1b0ad4){_0x10445e=_0x10445e-0xaa;let _0x24c955=_0x2ab3b6[_0x10445e];return _0x24c955;},a34_0x1044(_0xb28d2f,_0x410c9c);}export function writeCachedLLMProject(_0x18add7){const _0x10513d=a34_0x1044;try{const _0x1a186b=getCacheDir(),_0x64c5a1=getLLMProjectCacheFile();!existsSync(_0x1a186b)&&mkdirSync(_0x1a186b,{'recursive':!![]}),writeFileSync(_0x64c5a1,_0x18add7,_0x10513d(0xe0));}catch(_0x58163e){console['error']('Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:',_0x58163e);}}export function parseEnvFile(_0x171990){const _0x547dba=a34_0x1044,_0x50219d={};for(const _0x30e490 of _0x171990[_0x547dba(0xd2)]('\x0a')){const _0x29190e=_0x30e490[_0x547dba(0xb0)]();if(!_0x29190e||_0x29190e[_0x547dba(0xb2)]('#'))continue;const _0x169cc1=_0x29190e[_0x547dba(0xc6)](/^([^=]+)=(.*)$/);if(_0x169cc1){const _0x15c4fb=_0x169cc1[0x1][_0x547dba(0xb0)]();let _0x277450=_0x169cc1[0x2][_0x547dba(0xb0)]();(_0x277450[_0x547dba(0xb2)]('\x22')&&_0x277450['endsWith']('\x22')||_0x277450[_0x547dba(0xb2)]('\x27')&&_0x277450[_0x547dba(0xde)]('\x27'))&&(_0x277450=_0x277450[_0x547dba(0xb6)](0x1,-0x1)),_0x50219d[_0x15c4fb]=_0x277450;}}return _0x50219d;}export function readUserConfig(){const _0x1314bb=a34_0x1044,_0x2e154f=getConfigFile();if(!existsSync(_0x2e154f))return{};try{const _0x87c009=readFileSync(_0x2e154f,_0x1314bb(0xe0));return parseEnvFile(_0x87c009);}catch(_0x113dfa){return console['warn'](_0x1314bb(0xb5)+_0x2e154f+':',_0x113dfa),{};}}export function resolveSite(_0x17dbf8){const _0x5bea27=a34_0x1044,_0xe374ce=['us01',_0x5bea27(0xac),'eu01',_0x5bea27(0xdf),_0x5bea27(0xb3),_0x5bea27(0xc8),_0x5bea27(0xd0),_0x5bea27(0xbb),_0x5bea27(0xc3),_0x5bea27(0xb9)];if(_0xe374ce['includes'](_0x17dbf8))return _0x17dbf8;if(_0x17dbf8 in SITE_ALIASES)return SITE_ALIASES[_0x17dbf8];return console['warn']('Warning:\x20Unknown\x20site\x20\x27'+_0x17dbf8+_0x5bea27(0xae)),_0x5bea27(0xc4);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x59db52,_0x3732f2){const _0x1ec6c8=a34_0x1044,_0x3e7d47=_0x59db52['toUpperCase']()['replace'](/-/g,'_'),_0x227407=_0x1ec6c8(0xdc)+_0x3e7d47;if(process[_0x1ec6c8(0xc2)][_0x227407])return process[_0x1ec6c8(0xc2)][_0x227407];if(process[_0x1ec6c8(0xc2)]['TD_API_KEY'])return process['env'][_0x1ec6c8(0xd5)];const _0x33b4e5=_0x3732f2||getActiveProfileName();if(_0x33b4e5){const _0x1947b5=loadProfileEnv(_0x33b4e5);if(_0x1947b5){if(_0x1947b5[_0x227407])return _0x1947b5[_0x227407];if(_0x1947b5['TD_API_KEY'])return _0x1947b5[_0x1ec6c8(0xd5)];}}const _0x286519=loadUserConfigOnce();if(_0x286519[_0x227407])return _0x286519[_0x227407];if(_0x286519['TD_API_KEY'])return _0x286519['TD_API_KEY'];return undefined;}export function getAPIKeySource(_0x103d1f,_0x480154){const _0x51faef=a34_0x1044,_0x1db738=_0x51faef(0xdc)+_0x103d1f[_0x51faef(0xab)]()[_0x51faef(0xd4)](/-/g,'_');if(process[_0x51faef(0xc2)][_0x1db738])return _0x51faef(0xca)+_0x1db738;if(process[_0x51faef(0xc2)][_0x51faef(0xd5)])return _0x51faef(0xbd);const _0x1a0e21=_0x480154||getActiveProfileName();if(_0x1a0e21){const _0xcedaca=loadProfileEnv(_0x1a0e21);if(_0xcedaca){if(_0xcedaca[_0x1db738])return _0x51faef(0xd3)+_0x1a0e21+'\x20('+_0x1db738+')';if(_0xcedaca[_0x51faef(0xd5)])return'profile:\x20'+_0x1a0e21+_0x51faef(0xad);}}const _0x4911e7=loadUserConfigOnce(),_0x3fcace=getConfigFile();if(_0x4911e7[_0x1db738])return'global:\x20'+_0x3fcace+'\x20('+_0x1db738+')';if(_0x4911e7['TD_API_KEY'])return _0x51faef(0xcc)+_0x3fcace+'\x20(TD_API_KEY)';return null;}function a34_0x2ab3(){const _0xf172f7=['174174xciEGL','existsSync','toUpperCase','jp01','\x20(TD_API_KEY)','\x27,\x20defaulting\x20to\x20us01','readFileSync','trim','8MxKRYK','startsWith','ap03','Warning:\x20Failed\x20to\x20load\x20','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','slice','apiKeys','TDX_CACHE_DIR','stg-ap03','profiles','stg-us01','parse','env:\x20TD_API_KEY','120SiwpgE','.cache','.env.','warn','env','stg-jp01','us01','eu01','match','22972WUEWOZ','dev-us01','246eRWWbf','env:\x20','1403400bKKkYQ','global:\x20','map','280xsxuJk','TDX_CONFIG_DIR','dev-eu01','.config','split','profile:\x20','replace','TD_API_KEY','.env','506745AnRXZr','4659536RclDfR','profile','tdx.json','join','TD_API_KEY_','396264ltdRuA','endsWith','ap02','utf-8','209710zTwmPI'];a34_0x2ab3=function(){return _0xf172f7;};return a34_0x2ab3();}function loadProfileEnv(_0x29f8c9){const _0x1b5fa6=a34_0x1044,_0x2b6dd4=a34_0x2eb08a[_0x1b5fa6(0xdb)](getConfigDir(),_0x1b5fa6(0xc0)+_0x29f8c9);if(a34_0x3709ec[_0x1b5fa6(0xaa)](_0x2b6dd4)){validateSecureFilePermissions(_0x2b6dd4);try{const _0x435d5e=a34_0x3709ec['readFileSync'](_0x2b6dd4,_0x1b5fa6(0xe0));return parseEnvFile(_0x435d5e);}catch(_0x54e21e){console[_0x1b5fa6(0xc1)](_0x1b5fa6(0xb4)+_0x2b6dd4+':\x20'+_0x54e21e);}}const _0x5ac53c=a34_0x2eb08a['join'](getConfigDir(),_0x1b5fa6(0xba),_0x29f8c9,_0x1b5fa6(0xd6));if(a34_0x3709ec[_0x1b5fa6(0xaa)](_0x5ac53c)){validateSecureFilePermissions(_0x5ac53c);try{const _0x12afbb=a34_0x3709ec[_0x1b5fa6(0xaf)](_0x5ac53c,_0x1b5fa6(0xe0));return parseEnvFile(_0x12afbb);}catch(_0x250ed7){return console['warn']('Warning:\x20Failed\x20to\x20load\x20'+_0x5ac53c+':\x20'+_0x250ed7),null;}}return null;}function getActiveProfileName(){const _0x334f88=a34_0x1044,_0x2e27c0=a34_0x2eb08a[_0x334f88(0xdb)](getConfigDir(),_0x334f88(0xda));if(!a34_0x3709ec[_0x334f88(0xaa)](_0x2e27c0))return null;try{const _0x4c58e2=a34_0x3709ec['readFileSync'](_0x2e27c0,_0x334f88(0xe0)),_0x1c7242=JSON[_0x334f88(0xbc)](_0x4c58e2);return _0x1c7242[_0x334f88(0xd9)]||null;}catch{return null;}}export function saveAPIKey(_0x1bdb31,_0x64c341){const _0x556f4f=a34_0x1044,_0x455154=getConfigDir(),_0x14b57c=getConfigFile();!existsSync(_0x455154)&&mkdirSync(_0x455154,{'recursive':!![],'mode':0x1c0});const _0x41904e=readUserConfig(),_0x53e70a=_0x1bdb31[_0x556f4f(0xab)]()[_0x556f4f(0xd4)](/-/g,'_');_0x41904e['TD_API_KEY_'+_0x53e70a]=_0x64c341;const _0x22e4d3=Object['entries'](_0x41904e)[_0x556f4f(0xcd)](([_0x26432a,_0x24846c])=>_0x26432a+'='+_0x24846c);writeFileSync(_0x14b57c,_0x22e4d3['join']('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x2f1bea=a34_0x1044,_0x48966e={'apiKeys':{},'defaultSite':'us01'},_0x338ead=[_0x2f1bea(0xc4),_0x2f1bea(0xac),_0x2f1bea(0xc5),_0x2f1bea(0xdf),_0x2f1bea(0xb3),_0x2f1bea(0xc8),_0x2f1bea(0xd0),'stg-us01',_0x2f1bea(0xc3),_0x2f1bea(0xb9)];for(const _0x309dfb of _0x338ead){const _0x43f334=getAPIKey(_0x309dfb);_0x43f334&&(_0x48966e[_0x2f1bea(0xb7)][_0x309dfb]=_0x43f334);}return _0x48966e;}
1
+ (function(_0xa0a373,_0x2f9f44){const _0x8b725d=a34_0x1aad,_0x520cc9=_0xa0a373();while(!![]){try{const _0x5eb845=-parseInt(_0x8b725d(0x1a0))/0x1+-parseInt(_0x8b725d(0x182))/0x2+-parseInt(_0x8b725d(0x188))/0x3+-parseInt(_0x8b725d(0x1a3))/0x4+parseInt(_0x8b725d(0x1a7))/0x5+parseInt(_0x8b725d(0x1a8))/0x6+parseInt(_0x8b725d(0x195))/0x7;if(_0x5eb845===_0x2f9f44)break;else _0x520cc9['push'](_0x520cc9['shift']());}catch(_0x20a444){_0x520cc9['push'](_0x520cc9['shift']());}}}(a34_0x11d7,0xda39f));function a34_0x1aad(_0x40e450,_0x112a4f){const _0x11d7be=a34_0x11d7();return a34_0x1aad=function(_0x1aadc1,_0x251983){_0x1aadc1=_0x1aadc1-0x178;let _0x26628d=_0x11d7be[_0x1aadc1];return _0x26628d;},a34_0x1aad(_0x40e450,_0x112a4f);}import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x550d4a from'node:fs';import*as a34_0x499b73 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x5d4140=a34_0x1aad;return process[_0x5d4140(0x1a1)][_0x5d4140(0x194)]||join(homedir(),_0x5d4140(0x18b),_0x5d4140(0x186));}export function getConfigFile(){const _0x3e7670=a34_0x1aad;return join(getConfigDir(),_0x3e7670(0x179));}export function getCacheDir(){const _0x71ad54=a34_0x1aad;return process[_0x71ad54(0x1a1)][_0x71ad54(0x183)]||join(homedir(),'.cache',_0x71ad54(0x186));}export function getLLMProjectCacheFile(){return join(getCacheDir(),'llm_default_project');}export function readCachedLLMProject(){const _0x17f442=a34_0x1aad;try{const _0x5888ce=getLLMProjectCacheFile();if(!existsSync(_0x5888ce))return null;return readFileSync(_0x5888ce,_0x17f442(0x17f))[_0x17f442(0x1a2)]();}catch{return null;}}export function writeCachedLLMProject(_0x57392a){const _0x1b0616=a34_0x1aad;try{const _0x77afbf=getCacheDir(),_0x1a823f=getLLMProjectCacheFile();!existsSync(_0x77afbf)&&mkdirSync(_0x77afbf,{'recursive':!![]}),writeFileSync(_0x1a823f,_0x57392a,_0x1b0616(0x17f));}catch(_0x51d52d){console[_0x1b0616(0x19b)](_0x1b0616(0x17b),_0x51d52d);}}export function parseEnvFile(_0xba41e5){const _0xfba6a7=a34_0x1aad,_0x48183e={};for(const _0x3bd33d of _0xba41e5[_0xfba6a7(0x1a4)]('\x0a')){const _0x3e571b=_0x3bd33d[_0xfba6a7(0x1a2)]();if(!_0x3e571b||_0x3e571b[_0xfba6a7(0x1aa)]('#'))continue;const _0x4323bc=_0x3e571b['match'](/^([^=]+)=(.*)$/);if(_0x4323bc){const _0x465cfc=_0x4323bc[0x1]['trim']();let _0x548c97=_0x4323bc[0x2][_0xfba6a7(0x1a2)]();(_0x548c97[_0xfba6a7(0x1aa)]('\x22')&&_0x548c97['endsWith']('\x22')||_0x548c97[_0xfba6a7(0x1aa)]('\x27')&&_0x548c97['endsWith']('\x27'))&&(_0x548c97=_0x548c97[_0xfba6a7(0x19f)](0x1,-0x1)),_0x48183e[_0x465cfc]=_0x548c97;}}return _0x48183e;}function a34_0x11d7(){const _0x151342=['Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','us01','ap03','.env.','utf-8','dev-us01','global:\x20','1509626bgsAgq','TDX_CACHE_DIR','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','\x20(TD_API_KEY)','tdx','TD_API_KEY','1947732DyCoKm','join','eu01','.config','stg-jp01','entries','profiles','replace','dev-eu01','toUpperCase','jp01','profile','TDX_CONFIG_DIR','29470147HGdtCW','\x27,\x20defaulting\x20to\x20us01','env:\x20TD_API_KEY','stg-us01','readFileSync','tdx.json','error','TD_API_KEY_','env:\x20','profile:\x20','slice','1244990VpEXHm','env','trim','6454188kutZCH','split','parse','stg-ap03','4570365AhCdAr','194130ZqafMJ','existsSync','startsWith','Warning:\x20Failed\x20to\x20load\x20','includes','ap02','.env','warn'];a34_0x11d7=function(){return _0x151342;};return a34_0x11d7();}export function readUserConfig(){const _0x54adbd=a34_0x1aad,_0x4a71ad=getConfigFile();if(!existsSync(_0x4a71ad))return{};try{const _0x3c9993=readFileSync(_0x4a71ad,_0x54adbd(0x17f));return parseEnvFile(_0x3c9993);}catch(_0x5e8687){return console[_0x54adbd(0x17a)](_0x54adbd(0x184)+_0x4a71ad+':',_0x5e8687),{};}}export function resolveSite(_0x7d2e6f){const _0x384f28=a34_0x1aad,_0x121e6b=[_0x384f28(0x17c),'jp01',_0x384f28(0x18a),_0x384f28(0x178),_0x384f28(0x17d),_0x384f28(0x180),_0x384f28(0x190),_0x384f28(0x198),_0x384f28(0x18c),_0x384f28(0x1a6)];if(_0x121e6b[_0x384f28(0x1ac)](_0x7d2e6f))return _0x7d2e6f;if(_0x7d2e6f in SITE_ALIASES)return SITE_ALIASES[_0x7d2e6f];return console[_0x384f28(0x17a)]('Warning:\x20Unknown\x20site\x20\x27'+_0x7d2e6f+_0x384f28(0x196)),_0x384f28(0x17c);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x3305ee,_0x1174af){const _0x472b01=a34_0x1aad,_0x560df4=_0x3305ee[_0x472b01(0x191)]()['replace'](/-/g,'_'),_0x2a41f2=_0x472b01(0x19c)+_0x560df4;if(process[_0x472b01(0x1a1)][_0x2a41f2])return process['env'][_0x2a41f2];if(process[_0x472b01(0x1a1)]['TD_API_KEY'])return process[_0x472b01(0x1a1)]['TD_API_KEY'];const _0x56b502=_0x1174af||getActiveProfileName();if(_0x56b502){const _0x4ab3f9=loadProfileEnv(_0x56b502);if(_0x4ab3f9){if(_0x4ab3f9[_0x2a41f2])return _0x4ab3f9[_0x2a41f2];if(_0x4ab3f9['TD_API_KEY'])return _0x4ab3f9[_0x472b01(0x187)];}}const _0x40604a=loadUserConfigOnce();if(_0x40604a[_0x2a41f2])return _0x40604a[_0x2a41f2];if(_0x40604a[_0x472b01(0x187)])return _0x40604a[_0x472b01(0x187)];return undefined;}export function getAPIKeySource(_0x235915,_0x1be513){const _0x14fb39=a34_0x1aad,_0x3a93a1=_0x14fb39(0x19c)+_0x235915[_0x14fb39(0x191)]()['replace'](/-/g,'_');if(process['env'][_0x3a93a1])return _0x14fb39(0x19d)+_0x3a93a1;if(process[_0x14fb39(0x1a1)][_0x14fb39(0x187)])return _0x14fb39(0x197);const _0x3742e2=_0x1be513||getActiveProfileName();if(_0x3742e2){const _0x5d89bc=loadProfileEnv(_0x3742e2);if(_0x5d89bc){if(_0x5d89bc[_0x3a93a1])return _0x14fb39(0x19e)+_0x3742e2+'\x20('+_0x3a93a1+')';if(_0x5d89bc[_0x14fb39(0x187)])return _0x14fb39(0x19e)+_0x3742e2+_0x14fb39(0x185);}}const _0xd435eb=loadUserConfigOnce(),_0xa1f3c7=getConfigFile();if(_0xd435eb[_0x3a93a1])return _0x14fb39(0x181)+_0xa1f3c7+'\x20('+_0x3a93a1+')';if(_0xd435eb[_0x14fb39(0x187)])return _0x14fb39(0x181)+_0xa1f3c7+_0x14fb39(0x185);return null;}function loadProfileEnv(_0x4812c1){const _0x4515b4=a34_0x1aad,_0x75ae65=a34_0x499b73[_0x4515b4(0x189)](getConfigDir(),_0x4515b4(0x17e)+_0x4812c1);if(a34_0x550d4a[_0x4515b4(0x1a9)](_0x75ae65)){validateSecureFilePermissions(_0x75ae65);try{const _0x5d1d8c=a34_0x550d4a[_0x4515b4(0x199)](_0x75ae65,'utf-8');return parseEnvFile(_0x5d1d8c);}catch(_0x3f503e){console['warn'](_0x4515b4(0x1ab)+_0x75ae65+':\x20'+_0x3f503e);}}const _0x31379e=a34_0x499b73[_0x4515b4(0x189)](getConfigDir(),_0x4515b4(0x18e),_0x4812c1,_0x4515b4(0x179));if(a34_0x550d4a[_0x4515b4(0x1a9)](_0x31379e)){validateSecureFilePermissions(_0x31379e);try{const _0x5d6c66=a34_0x550d4a[_0x4515b4(0x199)](_0x31379e,_0x4515b4(0x17f));return parseEnvFile(_0x5d6c66);}catch(_0x32340c){return console['warn'](_0x4515b4(0x1ab)+_0x31379e+':\x20'+_0x32340c),null;}}return null;}function getActiveProfileName(){const _0x1a2ac6=a34_0x1aad,_0xf386d4=a34_0x499b73[_0x1a2ac6(0x189)](getConfigDir(),_0x1a2ac6(0x19a));if(!a34_0x550d4a[_0x1a2ac6(0x1a9)](_0xf386d4))return null;try{const _0x3acacb=a34_0x550d4a['readFileSync'](_0xf386d4,'utf-8'),_0x2de4ee=JSON[_0x1a2ac6(0x1a5)](_0x3acacb);return _0x2de4ee[_0x1a2ac6(0x193)]||null;}catch{return null;}}export function saveAPIKey(_0x481498,_0x5e7c0a){const _0x15facd=a34_0x1aad,_0x4e0e35=getConfigDir(),_0x1b28e4=getConfigFile();!existsSync(_0x4e0e35)&&mkdirSync(_0x4e0e35,{'recursive':!![],'mode':0x1c0});const _0x2e3e05=readUserConfig(),_0x3b84de=_0x481498[_0x15facd(0x191)]()[_0x15facd(0x18f)](/-/g,'_');_0x2e3e05[_0x15facd(0x19c)+_0x3b84de]=_0x5e7c0a;const _0x405119=Object[_0x15facd(0x18d)](_0x2e3e05)['map'](([_0x443a95,_0x40c682])=>_0x443a95+'='+_0x40c682);writeFileSync(_0x1b28e4,_0x405119['join']('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x5843b0=a34_0x1aad,_0x527721={'apiKeys':{},'defaultSite':_0x5843b0(0x17c)},_0x369d6d=[_0x5843b0(0x17c),_0x5843b0(0x192),_0x5843b0(0x18a),_0x5843b0(0x178),'ap03',_0x5843b0(0x180),_0x5843b0(0x190),_0x5843b0(0x198),'stg-jp01',_0x5843b0(0x1a6)];for(const _0x18cf2c of _0x369d6d){const _0x446147=getAPIKey(_0x18cf2c);_0x446147&&(_0x527721['apiKeys'][_0x18cf2c]=_0x446147);}return _0x527721;}
@@ -1 +1 @@
1
- const a35_0x33eb43=a35_0xe772;(function(_0x431ab5,_0x299388){const _0x528ce9=a35_0xe772,_0x2f8c31=_0x431ab5();while(!![]){try{const _0x56a296=-parseInt(_0x528ce9(0x18b))/0x1*(parseInt(_0x528ce9(0x17e))/0x2)+-parseInt(_0x528ce9(0x188))/0x3*(parseInt(_0x528ce9(0x180))/0x4)+-parseInt(_0x528ce9(0x196))/0x5+-parseInt(_0x528ce9(0x197))/0x6+parseInt(_0x528ce9(0x193))/0x7*(parseInt(_0x528ce9(0x190))/0x8)+-parseInt(_0x528ce9(0x1b0))/0x9+parseInt(_0x528ce9(0x1ac))/0xa;if(_0x56a296===_0x299388)break;else _0x2f8c31['push'](_0x2f8c31['shift']());}catch(_0x5e3daa){_0x2f8c31['push'](_0x2f8c31['shift']());}}}(a35_0x5e1f,0x35e02));import{resolveSite,getAPIKey,getConfigDir}from'./config.js';function a35_0xe772(_0x17026b,_0x45d262){const _0x5e1fd6=a35_0x5e1f();return a35_0xe772=function(_0xe772c0,_0x5ed432){_0xe772c0=_0xe772c0-0x174;let _0x28b5f6=_0x5e1fd6[_0xe772c0];return _0x28b5f6;},a35_0xe772(_0x17026b,_0x45d262);}import{loadSessionContext}from'./session.js';function a35_0x5e1f(){const _0x1a6c15=['log','(active)','display','profile:\x20','join','profiles','replace','Profile','profile','toString','Global\x20Credentials','loadGlobalConfig','.env','globalCredentials',':\x20none\x20(using\x20session:\x20','sessionId','\x0a[configuration\x20files]','Project','getSource','14181770CdFrkD',':\x20none','site','verbose','2826882aOHrcQ','.json','session','global','Profile\x20Credentials','segmentPath','apiKey','Session','sessions','us01','llm_project','ppid','profileCredentials','default','injectIntoOptions','[context]','1778kspNwx','configFiles','383164AJOSEK','database','cliFlags','segment_path','parent_segment','existsSync','project','Global','9boXbfn','utf-8','tdx.json','319fohgUx','activeProfile','parse','llmProject','getParameters','8KMuUjy','layers','config','491897EArnwT','CLI\x20flag:\x20--','readFileSync','925295hzXJhr','1185918pPxSCl','parentSegment'];a35_0x5e1f=function(){return _0x1a6c15;};return a35_0x5e1f();}import{loadProjectConfig,findProjectConfigPath}from'./project-config.js';import{getActiveProfile,loadProfile}from'./profile.js';import*as a35_0x334c5d from'node:fs';import*as a35_0x43c68e from'node:path';export class GlobalContext{[a35_0x33eb43(0x1ae)];[a35_0x33eb43(0x181)];[a35_0x33eb43(0x184)];[a35_0x33eb43(0x183)];['llm_project'];[a35_0x33eb43(0x174)];[a35_0x33eb43(0x1af)];[a35_0x33eb43(0x191)];[a35_0x33eb43(0x18c)];['sessionId'];['configFiles'];constructor(_0x2a7d9d){const _0x50226b=a35_0x33eb43;this['sessionId']=_0x2a7d9d[_0x50226b(0x1b2)]||process[_0x50226b(0x179)][_0x50226b(0x1a2)]();const _0xd36e22=loadSessionContext(_0x2a7d9d[_0x50226b(0x1b2)]),_0x3d453d=loadProjectConfig(),_0x524a24=this['loadGlobalConfig']();this[_0x50226b(0x18c)]=_0x2a7d9d[_0x50226b(0x1a1)]||_0xd36e22?.[_0x50226b(0x1a1)]||_0x524a24[_0x50226b(0x1a1)]||getActiveProfile();const _0x449264=this['activeProfile']?loadProfile(this[_0x50226b(0x18c)]):null,_0x5a90f7=_0x13f710=>{if(!_0x13f710)return{};const _0x5d6be5=_0x13f710,_0x215885={};for(const [_0x1a56f0,_0x10aa9c]of Object['entries'](_0x5d6be5)){typeof _0x10aa9c==='string'&&(_0x215885[_0x1a56f0]=_0x10aa9c);}return _0x215885;},_0x469179={};if(_0x2a7d9d[_0x50226b(0x1ae)]&&_0x2a7d9d[_0x50226b(0x1ae)]!==_0x50226b(0x177))_0x469179['site']=_0x2a7d9d['site'];const _0x4245ee=_0xd36e22?.[_0x50226b(0x181)],_0x46dfaf=_0x3d453d?.[_0x50226b(0x181)],_0x2944a0=_0x449264?.[_0x50226b(0x192)]?.['database'],_0x47df19=_0x524a24[_0x50226b(0x181)];_0x2a7d9d[_0x50226b(0x181)]&&(_0x2a7d9d[_0x50226b(0x181)]!==_0x4245ee&&_0x2a7d9d[_0x50226b(0x181)]!==_0x46dfaf&&_0x2a7d9d[_0x50226b(0x181)]!==_0x2944a0&&_0x2a7d9d[_0x50226b(0x181)]!==_0x47df19)&&(_0x469179[_0x50226b(0x181)]=_0x2a7d9d[_0x50226b(0x181)]);if(_0x2a7d9d['parentSegment'])_0x469179['parent_segment']=_0x2a7d9d['parentSegment'];if(_0x2a7d9d['llmProject'])_0x469179['llm_project']=_0x2a7d9d[_0x50226b(0x18e)];if(_0x2a7d9d[_0x50226b(0x1a1)])_0x469179[_0x50226b(0x1a1)]=_0x2a7d9d[_0x50226b(0x1a1)];this['layers']={'cliFlags':_0x469179,'session':_0x5a90f7(_0xd36e22),'project':_0x5a90f7(_0x3d453d),'profile':_0x5a90f7(_0x449264?.['config']),'global':_0x5a90f7(_0x524a24)};const _0x3bf070={...this[_0x50226b(0x191)][_0x50226b(0x1b3)],...this[_0x50226b(0x191)]['profile'],...this['layers']['project'],...this[_0x50226b(0x191)][_0x50226b(0x1b2)],...this[_0x50226b(0x191)][_0x50226b(0x182)]},_0x7f870e=_0x3bf070[_0x50226b(0x1ae)]||'us01';this[_0x50226b(0x1ae)]=resolveSite(_0x7f870e),this['database']=_0x3bf070['database'],this['parent_segment']=_0x3bf070[_0x50226b(0x184)],this[_0x50226b(0x183)]=_0x3bf070[_0x50226b(0x183)],this[_0x50226b(0x178)]=_0x3bf070['llm_project'],this[_0x50226b(0x1af)]=_0x2a7d9d[_0x50226b(0x1af)]||![],this[_0x50226b(0x174)]=getAPIKey(this[_0x50226b(0x1ae)],this['activeProfile']||undefined);const _0x3e6e77=getConfigDir(),_0x27837b=a35_0x43c68e['join'](_0x3e6e77,_0x50226b(0x176),this[_0x50226b(0x1a8)]+_0x50226b(0x1b1)),_0x142bd8=findProjectConfigPath(),_0x31291a=a35_0x43c68e[_0x50226b(0x19d)](_0x3e6e77,'tdx.json'),_0x122c2b=a35_0x43c68e[_0x50226b(0x19d)](_0x3e6e77,_0x50226b(0x1a5));let _0x14642a=null,_0x56a2f5=null;this['activeProfile']&&(_0x14642a=a35_0x43c68e[_0x50226b(0x19d)](_0x3e6e77,_0x50226b(0x19e),this[_0x50226b(0x18c)],_0x50226b(0x18a)),_0x56a2f5=a35_0x43c68e[_0x50226b(0x19d)](_0x3e6e77,_0x50226b(0x19e),this[_0x50226b(0x18c)],'.env')),this[_0x50226b(0x17f)]={'session':a35_0x334c5d[_0x50226b(0x185)](_0x27837b)?_0x27837b:null,'project':_0x142bd8,'profile':_0x14642a&&a35_0x334c5d[_0x50226b(0x185)](_0x14642a)?_0x14642a:null,'profileCredentials':_0x56a2f5&&a35_0x334c5d['existsSync'](_0x56a2f5)?_0x56a2f5:null,'global':a35_0x334c5d[_0x50226b(0x185)](_0x31291a)?_0x31291a:null,'globalCredentials':a35_0x334c5d[_0x50226b(0x185)](_0x122c2b)?_0x122c2b:null};}[a35_0x33eb43(0x1ab)](_0x20fdcf,_0x1e4bce){const _0x355877=a35_0x33eb43;if(!_0x1e4bce)return'not\x20set';const _0xde94b9=_0x1e4bce;if(this[_0x355877(0x191)][_0x355877(0x182)][_0x20fdcf]===_0xde94b9){if(_0x20fdcf===_0x355877(0x1ae)&&_0xde94b9==='us01'&&!this[_0x355877(0x191)][_0x355877(0x1b2)][_0x355877(0x1ae)]&&!this[_0x355877(0x191)][_0x355877(0x186)][_0x355877(0x1ae)]&&!this[_0x355877(0x191)][_0x355877(0x1a1)][_0x355877(0x1ae)]&&!this['layers']['global'][_0x355877(0x1ae)])return'default';return _0x355877(0x194)+_0x20fdcf[_0x355877(0x19f)](/_/g,'-');}if(this[_0x355877(0x191)][_0x355877(0x1b2)][_0x20fdcf]===_0xde94b9)return _0x355877(0x1b2);if(this[_0x355877(0x191)][_0x355877(0x186)][_0x20fdcf]===_0xde94b9)return _0x355877(0x186);if(this[_0x355877(0x191)][_0x355877(0x1a1)][_0x20fdcf]===_0xde94b9)return _0x355877(0x19c)+this[_0x355877(0x18c)];if(this[_0x355877(0x191)][_0x355877(0x1b3)][_0x20fdcf]===_0xde94b9)return _0x355877(0x1b3);return _0x355877(0x17b);}[a35_0x33eb43(0x1a4)](){const _0x5e016d=a35_0x33eb43,_0x3097c7=a35_0x43c68e['join'](getConfigDir(),_0x5e016d(0x18a));if(!a35_0x334c5d[_0x5e016d(0x185)](_0x3097c7))return{};try{const _0x116d2e=a35_0x334c5d[_0x5e016d(0x195)](_0x3097c7,_0x5e016d(0x189));return JSON[_0x5e016d(0x18d)](_0x116d2e);}catch{return{};}}[a35_0x33eb43(0x17c)](_0x256181){const _0x4d47c9=a35_0x33eb43;_0x256181[_0x4d47c9(0x1ae)]=this[_0x4d47c9(0x1ae)],!_0x256181[_0x4d47c9(0x181)]&&this[_0x4d47c9(0x181)]&&(_0x256181[_0x4d47c9(0x181)]=this['database']),!_0x256181[_0x4d47c9(0x198)]&&this[_0x4d47c9(0x184)]&&(_0x256181[_0x4d47c9(0x198)]=this[_0x4d47c9(0x184)]),!_0x256181[_0x4d47c9(0x1b5)]&&this[_0x4d47c9(0x183)]&&(_0x256181[_0x4d47c9(0x1b5)]=this['segment_path']),!_0x256181[_0x4d47c9(0x18e)]&&this[_0x4d47c9(0x178)]&&(_0x256181['llmProject']=this[_0x4d47c9(0x178)]);}['getParameters'](){const _0x2e5514=a35_0x33eb43;return[{'key':_0x2e5514(0x1ae),'value':this[_0x2e5514(0x1ae)]},{'key':_0x2e5514(0x181),'value':this[_0x2e5514(0x181)]},{'key':_0x2e5514(0x184),'value':this[_0x2e5514(0x184)]},{'key':_0x2e5514(0x183),'value':this[_0x2e5514(0x183)]},{'key':_0x2e5514(0x178),'value':this['llm_project']},{'key':_0x2e5514(0x1a1),'value':this['activeProfile']||undefined}];}[a35_0x33eb43(0x19b)](){const _0x54f68b=a35_0x33eb43;console[_0x54f68b(0x199)](_0x54f68b(0x17d));for(const {key:_0x3d463a,value:_0x2961c8}of this[_0x54f68b(0x18f)]()){_0x2961c8&&console['log'](_0x3d463a+':\x20'+_0x2961c8);}}['displayWithSources'](){const _0x500212=a35_0x33eb43;console[_0x500212(0x199)]('[context]');for(const {key:_0xe4d500,value:_0x2cba14}of this[_0x500212(0x18f)]()){if(_0x2cba14){const _0x20c469=_0xe4d500==='profile'?_0x500212(0x19a):'('+this['getSource'](_0xe4d500,_0x2cba14)+')';console[_0x500212(0x199)](_0xe4d500+':\x20'+_0x2cba14+'\x20'+_0x20c469);}}console['log'](_0x500212(0x1a9));const _0x314709=[{'label':_0x500212(0x175),'path':this[_0x500212(0x17f)][_0x500212(0x1b2)],'extra':'(session:\x20'+this[_0x500212(0x1a8)]+')'},{'label':_0x500212(0x1aa),'path':this[_0x500212(0x17f)][_0x500212(0x186)]},{'label':_0x500212(0x1a0),'path':this[_0x500212(0x17f)][_0x500212(0x1a1)]},{'label':_0x500212(0x1b4),'path':this[_0x500212(0x17f)][_0x500212(0x17a)]},{'label':'Global','path':this[_0x500212(0x17f)]['global']},{'label':_0x500212(0x1a3),'path':this[_0x500212(0x17f)][_0x500212(0x1a6)]}];for(const {label:_0x32406a,path:_0x2936c2,extra:_0x6fec7f}of _0x314709){if(_0x2936c2)console['log'](_0x32406a+':\x20'+_0x2936c2+'\x20✓'+(_0x6fec7f?'\x20'+_0x6fec7f:''));else{if(_0x32406a===_0x500212(0x175))console['log'](_0x32406a+_0x500212(0x1a7)+this[_0x500212(0x1a8)]+')');else(_0x32406a===_0x500212(0x1aa)||_0x32406a===_0x500212(0x187))&&console[_0x500212(0x199)](_0x32406a+_0x500212(0x1ad));}}}}
1
+ function a35_0x4389(_0x5ad661,_0x40171c){const _0x353832=a35_0x3538();return a35_0x4389=function(_0x4389e5,_0x35ac65){_0x4389e5=_0x4389e5-0x9e;let _0xaba38e=_0x353832[_0x4389e5];return _0xaba38e;},a35_0x4389(_0x5ad661,_0x40171c);}function a35_0x3538(){const _0x5c95d7=['activeProfile','866999Ouokla','50fMHAoN','2453008dlTupE','apiKey','Profile','llm_project','globalCredentials','tdx.json','segmentPath','2361508kQcAne','project',':\x20none\x20(using\x20session:\x20','session','join','[context]','global','verbose','Global\x20Credentials','segment_path','profile:\x20','display','2004399azxArD','2229075NZEQtG','cliFlags','llmProject','Profile\x20Credentials',':\x20none','parse','parent_segment','ppid','injectIntoOptions','12sqxtAz','loadGlobalConfig','.json','configFiles','sessions','.env','getSource','replace','profiles','sessionId','\x0a[configuration\x20files]','string','database','(active)','config','layers','default','existsSync','814631rDUHjr','parentSegment','readFileSync','profile','1938cJKcCJ','1029SKEBjN','not\x20set','Project','site','profileCredentials','Session','getParameters','log'];a35_0x3538=function(){return _0x5c95d7;};return a35_0x3538();}const a35_0x306e5b=a35_0x4389;(function(_0x309902,_0x37a7b2){const _0x7af5f5=a35_0x4389,_0x586516=_0x309902();while(!![]){try{const _0x50fbc2=-parseInt(_0x7af5f5(0xa3))/0x1+parseInt(_0x7af5f5(0xa7))/0x2*(parseInt(_0x7af5f5(0xa8))/0x3)+-parseInt(_0x7af5f5(0xba))/0x4+parseInt(_0x7af5f5(0xc7))/0x5+-parseInt(_0x7af5f5(0xd0))/0x6*(-parseInt(_0x7af5f5(0xb1))/0x7)+-parseInt(_0x7af5f5(0xb3))/0x8+-parseInt(_0x7af5f5(0xc6))/0x9*(-parseInt(_0x7af5f5(0xb2))/0xa);if(_0x50fbc2===_0x37a7b2)break;else _0x586516['push'](_0x586516['shift']());}catch(_0x4e84a2){_0x586516['push'](_0x586516['shift']());}}}(a35_0x3538,0x68729));import{resolveSite,getAPIKey,getConfigDir}from'./config.js';import{loadSessionContext}from'./session.js';import{loadProjectConfig,findProjectConfigPath}from'./project-config.js';import{getActiveProfile,loadProfile}from'./profile.js';import*as a35_0x4561e4 from'node:fs';import*as a35_0x261548 from'node:path';export class GlobalContext{['site'];[a35_0x306e5b(0xdc)];['parent_segment'];[a35_0x306e5b(0xc3)];['llm_project'];[a35_0x306e5b(0xb4)];[a35_0x306e5b(0xc1)];[a35_0x306e5b(0xa0)];[a35_0x306e5b(0xb0)];[a35_0x306e5b(0xd9)];[a35_0x306e5b(0xd3)];constructor(_0x5e6efb){const _0x124179=a35_0x306e5b;this[_0x124179(0xd9)]=_0x5e6efb[_0x124179(0xbd)]||process[_0x124179(0xce)]['toString']();const _0x294e8c=loadSessionContext(_0x5e6efb[_0x124179(0xbd)]),_0x586ff6=loadProjectConfig(),_0x4efeca=this[_0x124179(0xd1)]();this[_0x124179(0xb0)]=_0x5e6efb[_0x124179(0xa6)]||_0x294e8c?.[_0x124179(0xa6)]||_0x4efeca[_0x124179(0xa6)]||getActiveProfile();const _0x287081=this[_0x124179(0xb0)]?loadProfile(this['activeProfile']):null,_0x3eb94c=_0x1c10f6=>{const _0x4029b7=_0x124179;if(!_0x1c10f6)return{};const _0x2a0efa=_0x1c10f6,_0x2b7539={};for(const [_0x390d59,_0x25b583]of Object['entries'](_0x2a0efa)){typeof _0x25b583===_0x4029b7(0xdb)&&(_0x2b7539[_0x390d59]=_0x25b583);}return _0x2b7539;},_0x267161={};if(_0x5e6efb['site']&&_0x5e6efb[_0x124179(0xab)]!=='us01')_0x267161['site']=_0x5e6efb[_0x124179(0xab)];const _0x5a1451=_0x294e8c?.['database'],_0x3220f8=_0x586ff6?.['database'],_0x13913d=_0x287081?.[_0x124179(0x9f)]?.['database'],_0x593ffe=_0x4efeca[_0x124179(0xdc)];_0x5e6efb['database']&&(_0x5e6efb[_0x124179(0xdc)]!==_0x5a1451&&_0x5e6efb[_0x124179(0xdc)]!==_0x3220f8&&_0x5e6efb[_0x124179(0xdc)]!==_0x13913d&&_0x5e6efb[_0x124179(0xdc)]!==_0x593ffe)&&(_0x267161[_0x124179(0xdc)]=_0x5e6efb['database']);if(_0x5e6efb[_0x124179(0xa4)])_0x267161[_0x124179(0xcd)]=_0x5e6efb[_0x124179(0xa4)];if(_0x5e6efb[_0x124179(0xc9)])_0x267161['llm_project']=_0x5e6efb[_0x124179(0xc9)];if(_0x5e6efb[_0x124179(0xa6)])_0x267161[_0x124179(0xa6)]=_0x5e6efb[_0x124179(0xa6)];this[_0x124179(0xa0)]={'cliFlags':_0x267161,'session':_0x3eb94c(_0x294e8c),'project':_0x3eb94c(_0x586ff6),'profile':_0x3eb94c(_0x287081?.[_0x124179(0x9f)]),'global':_0x3eb94c(_0x4efeca)};const _0x6370d7={...this[_0x124179(0xa0)]['global'],...this[_0x124179(0xa0)]['profile'],...this[_0x124179(0xa0)]['project'],...this[_0x124179(0xa0)][_0x124179(0xbd)],...this['layers'][_0x124179(0xc8)]},_0x5d75ab=_0x6370d7[_0x124179(0xab)]||'us01';this[_0x124179(0xab)]=resolveSite(_0x5d75ab),this[_0x124179(0xdc)]=_0x6370d7[_0x124179(0xdc)],this[_0x124179(0xcd)]=_0x6370d7[_0x124179(0xcd)],this[_0x124179(0xc3)]=_0x6370d7[_0x124179(0xc3)],this['llm_project']=_0x6370d7[_0x124179(0xb6)],this['verbose']=_0x5e6efb[_0x124179(0xc1)]||![],this[_0x124179(0xb4)]=getAPIKey(this[_0x124179(0xab)],this['activeProfile']||undefined);const _0x2dfe44=getConfigDir(),_0xca478e=a35_0x261548[_0x124179(0xbe)](_0x2dfe44,_0x124179(0xd4),this['sessionId']+_0x124179(0xd2)),_0x32214f=findProjectConfigPath(),_0x5c86ac=a35_0x261548[_0x124179(0xbe)](_0x2dfe44,_0x124179(0xb8)),_0x4fa03f=a35_0x261548[_0x124179(0xbe)](_0x2dfe44,_0x124179(0xd5));let _0x19c44b=null,_0x37221d=null;this['activeProfile']&&(_0x19c44b=a35_0x261548[_0x124179(0xbe)](_0x2dfe44,_0x124179(0xd8),this[_0x124179(0xb0)],'tdx.json'),_0x37221d=a35_0x261548[_0x124179(0xbe)](_0x2dfe44,_0x124179(0xd8),this[_0x124179(0xb0)],'.env')),this[_0x124179(0xd3)]={'session':a35_0x4561e4[_0x124179(0xa2)](_0xca478e)?_0xca478e:null,'project':_0x32214f,'profile':_0x19c44b&&a35_0x4561e4[_0x124179(0xa2)](_0x19c44b)?_0x19c44b:null,'profileCredentials':_0x37221d&&a35_0x4561e4['existsSync'](_0x37221d)?_0x37221d:null,'global':a35_0x4561e4[_0x124179(0xa2)](_0x5c86ac)?_0x5c86ac:null,'globalCredentials':a35_0x4561e4[_0x124179(0xa2)](_0x4fa03f)?_0x4fa03f:null};}['getSource'](_0x56dd06,_0x4702bc){const _0x5e57bf=a35_0x306e5b;if(!_0x4702bc)return _0x5e57bf(0xa9);const _0x4d42e0=_0x4702bc;if(this[_0x5e57bf(0xa0)][_0x5e57bf(0xc8)][_0x56dd06]===_0x4d42e0){if(_0x56dd06===_0x5e57bf(0xab)&&_0x4d42e0==='us01'&&!this[_0x5e57bf(0xa0)][_0x5e57bf(0xbd)][_0x5e57bf(0xab)]&&!this[_0x5e57bf(0xa0)][_0x5e57bf(0xbb)][_0x5e57bf(0xab)]&&!this[_0x5e57bf(0xa0)][_0x5e57bf(0xa6)]['site']&&!this['layers'][_0x5e57bf(0xc0)]['site'])return _0x5e57bf(0xa1);return'CLI\x20flag:\x20--'+_0x56dd06[_0x5e57bf(0xd7)](/_/g,'-');}if(this[_0x5e57bf(0xa0)][_0x5e57bf(0xbd)][_0x56dd06]===_0x4d42e0)return _0x5e57bf(0xbd);if(this[_0x5e57bf(0xa0)][_0x5e57bf(0xbb)][_0x56dd06]===_0x4d42e0)return _0x5e57bf(0xbb);if(this['layers'][_0x5e57bf(0xa6)][_0x56dd06]===_0x4d42e0)return _0x5e57bf(0xc4)+this['activeProfile'];if(this['layers'][_0x5e57bf(0xc0)][_0x56dd06]===_0x4d42e0)return _0x5e57bf(0xc0);return _0x5e57bf(0xa1);}[a35_0x306e5b(0xd1)](){const _0x1eccde=a35_0x306e5b,_0x375570=a35_0x261548[_0x1eccde(0xbe)](getConfigDir(),'tdx.json');if(!a35_0x4561e4['existsSync'](_0x375570))return{};try{const _0x5150d7=a35_0x4561e4[_0x1eccde(0xa5)](_0x375570,'utf-8');return JSON[_0x1eccde(0xcc)](_0x5150d7);}catch{return{};}}[a35_0x306e5b(0xcf)](_0x5cd565){const _0x51dbeb=a35_0x306e5b;_0x5cd565[_0x51dbeb(0xab)]=this[_0x51dbeb(0xab)],!_0x5cd565[_0x51dbeb(0xdc)]&&this[_0x51dbeb(0xdc)]&&(_0x5cd565[_0x51dbeb(0xdc)]=this[_0x51dbeb(0xdc)]),!_0x5cd565['parentSegment']&&this[_0x51dbeb(0xcd)]&&(_0x5cd565[_0x51dbeb(0xa4)]=this[_0x51dbeb(0xcd)]),!_0x5cd565[_0x51dbeb(0xb9)]&&this[_0x51dbeb(0xc3)]&&(_0x5cd565[_0x51dbeb(0xb9)]=this[_0x51dbeb(0xc3)]),!_0x5cd565[_0x51dbeb(0xc9)]&&this[_0x51dbeb(0xb6)]&&(_0x5cd565[_0x51dbeb(0xc9)]=this[_0x51dbeb(0xb6)]);}[a35_0x306e5b(0xae)](){const _0x238224=a35_0x306e5b;return[{'key':_0x238224(0xab),'value':this[_0x238224(0xab)]},{'key':'database','value':this['database']},{'key':_0x238224(0xcd),'value':this['parent_segment']},{'key':_0x238224(0xc3),'value':this[_0x238224(0xc3)]},{'key':_0x238224(0xb6),'value':this['llm_project']},{'key':'profile','value':this['activeProfile']||undefined}];}[a35_0x306e5b(0xc5)](){const _0x1ce2c4=a35_0x306e5b;console[_0x1ce2c4(0xaf)]('[context]');for(const {key:_0x59ba39,value:_0x20756f}of this['getParameters']()){_0x20756f&&console['log'](_0x59ba39+':\x20'+_0x20756f);}}['displayWithSources'](){const _0x2314cb=a35_0x306e5b;console[_0x2314cb(0xaf)](_0x2314cb(0xbf));for(const {key:_0x5c8f80,value:_0x14ea19}of this[_0x2314cb(0xae)]()){if(_0x14ea19){const _0x1bbe5e=_0x5c8f80==='profile'?_0x2314cb(0x9e):'('+this[_0x2314cb(0xd6)](_0x5c8f80,_0x14ea19)+')';console[_0x2314cb(0xaf)](_0x5c8f80+':\x20'+_0x14ea19+'\x20'+_0x1bbe5e);}}console[_0x2314cb(0xaf)](_0x2314cb(0xda));const _0x26679b=[{'label':_0x2314cb(0xad),'path':this[_0x2314cb(0xd3)]['session'],'extra':'(session:\x20'+this[_0x2314cb(0xd9)]+')'},{'label':'Project','path':this[_0x2314cb(0xd3)]['project']},{'label':_0x2314cb(0xb5),'path':this[_0x2314cb(0xd3)]['profile']},{'label':_0x2314cb(0xca),'path':this['configFiles'][_0x2314cb(0xac)]},{'label':'Global','path':this[_0x2314cb(0xd3)][_0x2314cb(0xc0)]},{'label':_0x2314cb(0xc2),'path':this[_0x2314cb(0xd3)][_0x2314cb(0xb7)]}];for(const {label:_0x1bd5fe,path:_0x444c34,extra:_0x167fff}of _0x26679b){if(_0x444c34)console['log'](_0x1bd5fe+':\x20'+_0x444c34+'\x20✓'+(_0x167fff?'\x20'+_0x167fff:''));else{if(_0x1bd5fe===_0x2314cb(0xad))console[_0x2314cb(0xaf)](_0x1bd5fe+_0x2314cb(0xbc)+this[_0x2314cb(0xd9)]+')');else(_0x1bd5fe===_0x2314cb(0xaa)||_0x1bd5fe==='Global')&&console['log'](_0x1bd5fe+_0x2314cb(0xcb));}}}}