@treasuredata/tdx 0.2.1 → 0.2.3

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 (87) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/client/cdp-client.js +1 -1
  4. package/dist/client/http-client.js +1 -1
  5. package/dist/client/llm-client.js +1 -1
  6. package/dist/client/rate-limiter.js +1 -1
  7. package/dist/client/td-client.js +1 -1
  8. package/dist/client/trino-client.js +1 -1
  9. package/dist/client/workflow-client.js +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/context-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/describe.js +1 -1
  18. package/dist/commands/job-command.js +1 -1
  19. package/dist/commands/llm-command.js +1 -1
  20. package/dist/commands/llm-proxy.js +1 -1
  21. package/dist/commands/parent-segment-command.js +1 -1
  22. package/dist/commands/profiles-command.js +1 -1
  23. package/dist/commands/query-command.js +1 -1
  24. package/dist/commands/segment-command.js +1 -1
  25. package/dist/commands/segment-create-command.js +1 -1
  26. package/dist/commands/segment-fields-command.js +1 -1
  27. package/dist/commands/segment-pwd-command.js +1 -1
  28. package/dist/commands/segment-update-command.js +1 -1
  29. package/dist/commands/segment-use-command.js +1 -1
  30. package/dist/commands/segments.js +1 -1
  31. package/dist/commands/show.js +1 -1
  32. package/dist/commands/tables.js +1 -1
  33. package/dist/commands/use-command.js +1 -1
  34. package/dist/commands/workflow-command.js +1 -1
  35. package/dist/core/auth.js +1 -1
  36. package/dist/core/config.js +1 -1
  37. package/dist/core/global-context.js +1 -1
  38. package/dist/core/profile.js +1 -1
  39. package/dist/core/project-config.js +1 -1
  40. package/dist/core/session.js +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/proxy/anthropic-adapter.d.ts +27 -3
  43. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  44. package/dist/proxy/anthropic-adapter.js +1 -1
  45. package/dist/proxy/anthropic-adapter.js.map +1 -1
  46. package/dist/proxy/server.d.ts.map +1 -1
  47. package/dist/proxy/server.js +1 -1
  48. package/dist/proxy/server.js.map +1 -1
  49. package/dist/proxy/session-cache.js +1 -1
  50. package/dist/sdk/api.js +1 -1
  51. package/dist/sdk/database.js +1 -1
  52. package/dist/sdk/errors.js +1 -1
  53. package/dist/sdk/index.js +1 -1
  54. package/dist/sdk/job.js +1 -1
  55. package/dist/sdk/llm.js +1 -1
  56. package/dist/sdk/query.js +1 -1
  57. package/dist/sdk/segment.js +1 -1
  58. package/dist/sdk/table.js +1 -1
  59. package/dist/sdk/workflow.js +1 -1
  60. package/dist/types/endpoints.js +1 -1
  61. package/dist/types/index.js +1 -1
  62. package/dist/utils/agent-ref-parser.js +1 -1
  63. package/dist/utils/chat-cache.js +1 -1
  64. package/dist/utils/colors.js +1 -1
  65. package/dist/utils/command-output.js +1 -1
  66. package/dist/utils/constants.js +1 -1
  67. package/dist/utils/file-permissions.js +1 -1
  68. package/dist/utils/format-detector.js +1 -1
  69. package/dist/utils/formatters.js +1 -1
  70. package/dist/utils/json-loader.js +1 -1
  71. package/dist/utils/model-aliases.js +1 -1
  72. package/dist/utils/option-validation.js +1 -1
  73. package/dist/utils/port.js +1 -1
  74. package/dist/utils/process.js +1 -1
  75. package/dist/utils/prompt.js +1 -1
  76. package/dist/utils/segment-path-parser.js +1 -1
  77. package/dist/utils/segment-ref-parser.js +1 -1
  78. package/dist/utils/spinner.js +1 -1
  79. package/dist/utils/sql-parser.js +1 -1
  80. package/dist/utils/sse-parser.js +1 -1
  81. package/dist/utils/string-utils.js +1 -1
  82. package/dist/utils/table-ref-parser.js +1 -1
  83. package/dist/utils/tdx-logger.js +1 -1
  84. package/dist/utils/tree-formatter.js +1 -1
  85. package/dist/utils/version-check.js +1 -1
  86. package/dist/utils/workflow-utils.js +1 -1
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- const a27_0x199f86=a27_0x49f3;(function(_0x16ee52,_0x3395c9){const _0x40f2c0=a27_0x49f3,_0x3e25ba=_0x16ee52();while(!![]){try{const _0x37b2a9=parseInt(_0x40f2c0(0xb2))/0x1+-parseInt(_0x40f2c0(0x9c))/0x2*(-parseInt(_0x40f2c0(0xc8))/0x3)+parseInt(_0x40f2c0(0xa4))/0x4+parseInt(_0x40f2c0(0xc7))/0x5*(-parseInt(_0x40f2c0(0xcb))/0x6)+parseInt(_0x40f2c0(0xb5))/0x7+-parseInt(_0x40f2c0(0xa8))/0x8*(-parseInt(_0x40f2c0(0xb7))/0x9)+parseInt(_0x40f2c0(0xb9))/0xa*(-parseInt(_0x40f2c0(0xb8))/0xb);if(_0x37b2a9===_0x3395c9)break;else _0x3e25ba['push'](_0x3e25ba['shift']());}catch(_0x3f737e){_0x3e25ba['push'](_0x3e25ba['shift']());}}}(a27_0x6cf8,0x9faaa));function a27_0x6cf8(){const _0x22a036=['Resolved\x20path\x20type:\x20','Parent\x20ID:\x20','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','resolvePathToResource','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','456755wNZidd','3lCxspZ','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','segment','30prGlTH','session','name','split','Folder\x20ID:\x20','754346wuMTTw','length','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Resolved\x20relative\x20path\x20to:\x20','Use:\x20tdx\x20segment\x20use\x20','description','Error:\x20Path\x20is\x20required','type','3590956hkdokh','Site:\x20','isAbsolute','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','8HTAqre','join','log','data','segmentPath','error','Usage:\x20tdx\x20segment\x20use\x20<path>','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','execute','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','709364LYVxnK','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','segments','3085012JwjOzf','Context\x20cleared.\x20Back\x20to\x20root.','7914591popLnt','446853BPcUTW','540QdtCZi','segment:use','fullPath','parentId','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','folderPath','Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context','verbose','folderId'];a27_0x6cf8=function(){return _0x22a036;};return a27_0x6cf8();}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';function a27_0x49f3(_0x49d9cb,_0x3a84b6){const _0x6cf8fa=a27_0x6cf8();return a27_0x49f3=function(_0x49f359,_0x5d9924){_0x49f359=_0x49f359-0x99;let _0x128c5f=_0x6cf8fa[_0x49f359];return _0x128c5f;},a27_0x49f3(_0x49d9cb,_0x3a84b6);}export class SegmentUseCommand extends BaseCommand{[a27_0x199f86(0x99)]=a27_0x199f86(0xba);[a27_0x199f86(0xa1)]=a27_0x199f86(0xb3);async[a27_0x199f86(0xb0)](_0x47d91a){const _0x1160b7=a27_0x199f86,{options:_0x1195d1,args:_0x39b62d,tdx:_0x4e8ef3}=_0x47d91a;if(_0x39b62d[_0x1160b7(0x9d)]===0x0)return console['error'](_0x1160b7(0xa2)),console[_0x1160b7(0xad)](_0x1160b7(0xae)),console[_0x1160b7(0xad)]('Examples:'),console[_0x1160b7(0xad)](_0x1160b7(0x9e)),console[_0x1160b7(0xad)](_0x1160b7(0xb1)),console['error'](_0x1160b7(0xa7)),console[_0x1160b7(0xad)]('\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 _0xd8e5c=_0x39b62d[0x0],_0x5686e9=_0x1195d1[_0x1160b7(0xcc)];try{if(_0xd8e5c==='/')return saveSessionContext({'segment_path':undefined},_0x5686e9),console[_0x1160b7(0xaa)](_0x1160b7(0xb6)),0x0;const _0x3a4e80=_0x1195d1[_0x1160b7(0xac)];let _0x4ec3c8=_0xd8e5c;const _0x40f566=parsePath(_0xd8e5c);if(!_0x40f566[_0x1160b7(0xa6)]){if(!_0x3a4e80)return console[_0x1160b7(0xad)](_0x1160b7(0xc9)),console[_0x1160b7(0xad)](_0x1160b7(0xc6)),0x1;if(_0xd8e5c==='..'){const _0x50f1b6=_0x3a4e80[_0x1160b7(0x9a)]('/')['slice'](0x0,-0x1)[_0x1160b7(0xa9)]('/');_0x4ec3c8=_0x50f1b6||'/';}else _0xd8e5c==='.'?_0x4ec3c8=_0x3a4e80:_0x4ec3c8=_0x3a4e80+'/'+_0xd8e5c;_0x1195d1[_0x1160b7(0xc0)]&&console[_0x1160b7(0xad)](_0x1160b7(0x9f)+_0x4ec3c8);}if(_0x4ec3c8==='/'||_0x4ec3c8==='')return saveSessionContext({'segment_path':undefined},_0x5686e9),console[_0x1160b7(0xaa)](_0x1160b7(0xb6)),0x0;_0x4ec3c8=normalizePath(_0x4ec3c8);const _0x1c4e8e=parsePath(_0x4ec3c8)[_0x1160b7(0xb4)];if(_0x1c4e8e['length']===0x0)return saveSessionContext({'segment_path':undefined},_0x5686e9),console['log'](_0x1160b7(0xb6)),0x0;_0x1195d1[_0x1160b7(0xc0)]&&(console[_0x1160b7(0xad)](_0x1160b7(0xa5)+_0x1195d1['site']),console[_0x1160b7(0xad)]('Target\x20path:\x20'+_0x4ec3c8));const _0x14a081=await withSpinner('Resolving\x20path\x20\x27'+_0x4ec3c8+'\x27...',()=>_0x4e8ef3[_0x1160b7(0xca)][_0x1160b7(0xc5)](_0x4ec3c8),{'verbose':_0x1195d1[_0x1160b7(0xc0)]}),_0x23213b=_0x14a081[_0x1160b7(0xab)];_0x1195d1[_0x1160b7(0xc0)]&&(console[_0x1160b7(0xad)](_0x1160b7(0xc2)+_0x23213b['type']),console['error'](_0x1160b7(0xc3)+_0x23213b[_0x1160b7(0xbc)]),_0x23213b[_0x1160b7(0xc1)]&&console[_0x1160b7(0xad)](_0x1160b7(0x9b)+_0x23213b[_0x1160b7(0xc1)]));if(_0x23213b[_0x1160b7(0xa3)]==='segment')return console[_0x1160b7(0xad)](_0x1160b7(0xbd)),console[_0x1160b7(0xad)](_0x1160b7(0xc4)),console['error'](_0x1160b7(0xa0)+_0x23213b['parentName']+(_0x23213b[_0x1160b7(0xbe)]?'/'+_0x23213b['folderPath'][_0x1160b7(0xa9)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x23213b[_0x1160b7(0xbb)],'parent_segment':_0x23213b['parentName']},_0x5686e9),console[_0x1160b7(0xaa)]('Context\x20set\x20to:\x20'+_0x23213b[_0x1160b7(0xbb)]),_0x1195d1['verbose']&&(console[_0x1160b7(0xad)](_0x1160b7(0xbf)),console[_0x1160b7(0xad)](_0x1160b7(0xaf)),console['error']('Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters')),0x0;}catch(_0x39fb2a){throw _0x39fb2a;}}}
1
+ const a27_0x6d23f8=a27_0x1fa3;function a27_0x1fa3(_0x295950,_0x4f830b){const _0x1ce81a=a27_0x1ce8();return a27_0x1fa3=function(_0x1fa37e,_0x1d270b){_0x1fa37e=_0x1fa37e-0x1a7;let _0x34f342=_0x1ce81a[_0x1fa37e];return _0x34f342;},a27_0x1fa3(_0x295950,_0x4f830b);}(function(_0x2ebfdb,_0x28d094){const _0x2a6789=a27_0x1fa3,_0x59daae=_0x2ebfdb();while(!![]){try{const _0x23f501=parseInt(_0x2a6789(0x1ba))/0x1+-parseInt(_0x2a6789(0x1af))/0x2*(-parseInt(_0x2a6789(0x1da))/0x3)+-parseInt(_0x2a6789(0x1c0))/0x4+-parseInt(_0x2a6789(0x1d5))/0x5+parseInt(_0x2a6789(0x1cc))/0x6*(parseInt(_0x2a6789(0x1ac))/0x7)+parseInt(_0x2a6789(0x1c5))/0x8*(parseInt(_0x2a6789(0x1bf))/0x9)+-parseInt(_0x2a6789(0x1dc))/0xa*(parseInt(_0x2a6789(0x1c4))/0xb);if(_0x23f501===_0x28d094)break;else _0x59daae['push'](_0x59daae['shift']());}catch(_0x4b76bd){_0x59daae['push'](_0x59daae['shift']());}}}(a27_0x1ce8,0x966f7));import{BaseCommand}from'./command.js';function a27_0x1ce8(){const _0x24aba6=['\x27...','Error:\x20Cannot\x20set\x20context\x20to\x20a\x20segment.','slice','\x20\x20tdx\x20segment\x20use\x20..\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Go\x20to\x20parent','site','Use:\x20tdx\x20segment\x20use\x20','593490dgyIRa','Context\x20set\x20to:\x20','Error:\x20Path\x20is\x20required','Site:\x20','segmentPath','segment:use','log','Set\x20current\x20segment/folder\x20context\x20for\x20navigation','data','394595McVTSm','Context\x20can\x20only\x20be\x20set\x20to\x20a\x20parent\x20segment\x20or\x20folder.','session','Target\x20path:\x20','folderId','45LttNEJ','length','750XpWCTg','fullPath','Usage:\x20tdx\x20segment\x20use\x20<path>','Resolving\x20path\x20\x27','folderPath','resolvePathToResource','21cGqQOV','join','isAbsolute','142804XHXeGe','Folder\x20ID:\x20','segments','segment','Error:\x20No\x20context\x20set.\x20Cannot\x20use\x20relative\x20path.','verbose','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience\x22','Use\x20\x22tdx\x20segment\x20pwd\x22\x20to\x20show\x20current\x20context','Examples:','Use\x20an\x20absolute\x20path\x20or\x20set\x20context\x20with:\x20tdx\x20segment\x20use\x20<parent_name>','error','767500gXaJgU','parentName','\x20\x20tdx\x20segment\x20use\x20/\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clear\x20context','type','Parent\x20ID:\x20','2120193NQkyym','3126732hLHNpH','Use\x20\x22tdx\x20context\x22\x20to\x20see\x20all\x20context\x20parameters','Context\x20cleared.\x20Back\x20to\x20root.','\x20\x20tdx\x20segment\x20use\x20\x22My\x20Audience/Marketing\x22','269335wMmgcE','40xiRAcW'];a27_0x1ce8=function(){return _0x24aba6;};return a27_0x1ce8();}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{['name']=a27_0x6d23f8(0x1d1);['description']=a27_0x6d23f8(0x1d3);async['execute'](_0x38f5d7){const _0x18e4f5=a27_0x6d23f8,{options:_0x50c536,args:_0x2258b4,tdx:_0x540630}=_0x38f5d7;if(_0x2258b4[_0x18e4f5(0x1db)]===0x0)return console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1ce)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1a8)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b7)),console['error'](_0x18e4f5(0x1b5)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1c3)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1bc)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1c9)),0x1;const _0x3d84ed=_0x2258b4[0x0],_0x137b95=_0x50c536[_0x18e4f5(0x1d7)];try{if(_0x3d84ed==='/')return saveSessionContext({'segment_path':undefined},_0x137b95),console[_0x18e4f5(0x1d2)](_0x18e4f5(0x1c2)),0x0;const _0x9864ad=_0x50c536[_0x18e4f5(0x1d0)];let _0x423fca=_0x3d84ed;const _0x132942=parsePath(_0x3d84ed);if(!_0x132942[_0x18e4f5(0x1ae)]){if(!_0x9864ad)return console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b3)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b8)),0x1;if(_0x3d84ed==='..'){const _0x123bd1=_0x9864ad['split']('/')[_0x18e4f5(0x1c8)](0x0,-0x1)[_0x18e4f5(0x1ad)]('/');_0x423fca=_0x123bd1||'/';}else _0x3d84ed==='.'?_0x423fca=_0x9864ad:_0x423fca=_0x9864ad+'/'+_0x3d84ed;_0x50c536[_0x18e4f5(0x1b4)]&&console[_0x18e4f5(0x1b9)]('Resolved\x20relative\x20path\x20to:\x20'+_0x423fca);}if(_0x423fca==='/'||_0x423fca==='')return saveSessionContext({'segment_path':undefined},_0x137b95),console[_0x18e4f5(0x1d2)](_0x18e4f5(0x1c2)),0x0;_0x423fca=normalizePath(_0x423fca);const _0x4a8457=parsePath(_0x423fca)[_0x18e4f5(0x1b1)];if(_0x4a8457[_0x18e4f5(0x1db)]===0x0)return saveSessionContext({'segment_path':undefined},_0x137b95),console[_0x18e4f5(0x1d2)]('Context\x20cleared.\x20Back\x20to\x20root.'),0x0;_0x50c536['verbose']&&(console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1cf)+_0x50c536[_0x18e4f5(0x1ca)]),console['error'](_0x18e4f5(0x1d8)+_0x423fca));const _0x591eb5=await withSpinner(_0x18e4f5(0x1a9)+_0x423fca+_0x18e4f5(0x1c6),()=>_0x540630[_0x18e4f5(0x1b2)][_0x18e4f5(0x1ab)](_0x423fca),{'verbose':_0x50c536[_0x18e4f5(0x1b4)]}),_0x72c0a6=_0x591eb5[_0x18e4f5(0x1d4)];_0x50c536[_0x18e4f5(0x1b4)]&&(console['error']('Resolved\x20path\x20type:\x20'+_0x72c0a6[_0x18e4f5(0x1bd)]),console['error'](_0x18e4f5(0x1be)+_0x72c0a6['parentId']),_0x72c0a6[_0x18e4f5(0x1d9)]&&console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b0)+_0x72c0a6['folderId']));if(_0x72c0a6[_0x18e4f5(0x1bd)]===_0x18e4f5(0x1b2))return console['error'](_0x18e4f5(0x1c7)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1d6)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1cb)+_0x72c0a6[_0x18e4f5(0x1bb)]+(_0x72c0a6['folderPath']?'/'+_0x72c0a6[_0x18e4f5(0x1aa)][_0x18e4f5(0x1ad)]('/'):'')),0x1;return saveSessionContext({'segment_path':_0x72c0a6[_0x18e4f5(0x1a7)],'parent_segment':_0x72c0a6['parentName']},_0x137b95),console['log'](_0x18e4f5(0x1cd)+_0x72c0a6[_0x18e4f5(0x1a7)]),_0x50c536[_0x18e4f5(0x1b4)]&&(console[_0x18e4f5(0x1b9)]('Use\x20\x22tdx\x20segments\x22\x20to\x20list\x20contents\x20in\x20this\x20context'),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1b6)),console[_0x18e4f5(0x1b9)](_0x18e4f5(0x1c1))),0x0;}catch(_0x26195b){throw _0x26195b;}}}
@@ -1 +1 @@
1
- const a28_0x250888=a28_0x5bc9;(function(_0x148ee2,_0x2089c7){const _0x2cb4b0=a28_0x5bc9,_0x3b4f86=_0x148ee2();while(!![]){try{const _0x33e14a=parseInt(_0x2cb4b0(0x117))/0x1+-parseInt(_0x2cb4b0(0xf6))/0x2+-parseInt(_0x2cb4b0(0xed))/0x3*(-parseInt(_0x2cb4b0(0xe7))/0x4)+parseInt(_0x2cb4b0(0x10c))/0x5*(-parseInt(_0x2cb4b0(0xfa))/0x6)+parseInt(_0x2cb4b0(0x10d))/0x7*(parseInt(_0x2cb4b0(0xf2))/0x8)+parseInt(_0x2cb4b0(0x111))/0x9*(-parseInt(_0x2cb4b0(0x10e))/0xa)+parseInt(_0x2cb4b0(0x10b))/0xb;if(_0x33e14a===_0x2089c7)break;else _0x3b4f86['push'](_0x3b4f86['shift']());}catch(_0x2adc62){_0x3b4f86['push'](_0x3b4f86['shift']());}}}(a28_0x2c36,0x1ac86));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x5bc9(_0x51add5,_0x5da58d){const _0x2c363a=a28_0x2c36();return a28_0x5bc9=function(_0x5bc9fd,_0x578dc5){_0x5bc9fd=_0x5bc9fd-0xe7;let _0x25d80b=_0x2c363a[_0x5bc9fd];return _0x25d80b;},a28_0x5bc9(_0x51add5,_0x5da58d);}function a28_0x2c36(){const _0x2a0f1e=['segment','\x20\x20Cause:\x20','listRecursive','\x20top-level\x20items','segmentPath','jsonl','👥\x20','4pUqHLo','listParents','Building\x20hierarchy\x20tree...','localeCompare','log','filter','97374BLDOeY','includes','\x20parent\x20segment','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','folder','8olxQGV','data','Listing\x20parent\x20segments...','Current\x20context:\x20','172552EoYhUI','Parent\x20ID:\x20','sort','Listing\x20folders\x20and\x20segments...','13956ilkjhh','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','verbose','length','\x20matching\x20\x27','population','Folder\x20ID:\x20','listUnified','attributes','replace','format','✔\x20Found\x20','maxDepth','json','\x20segment','resolvePathToResource','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).','1321892EzCzaU','320kSdYhB','799288xqfWrz','3530QGhEiR','Site:\x20','parentId','1638iGJqvL','[parent\x20segments]','\x27...','✔\x20Built\x20tree\x20with\x20','execute','message','142274tYtgsT','dim','Path/pattern\x20arg:\x20','segments','folderId','description','Recursive\x20mode:\x20enabled','Resolving\x20context\x20path\x20\x27','name','map','error','site','(empty)'];a28_0x2c36=function(){return _0x2a0f1e;};return a28_0x2c36();}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_0x4d7d50 from'chalk';export class SegmentsCommand extends BaseCommand{['name']=a28_0x250888(0x11a);[a28_0x250888(0x11c)]=a28_0x250888(0xf0);async[a28_0x250888(0x115)](_0x1e8252){const _0x392713=a28_0x250888,{options:_0x29b3b2,args:_0x10ad84}=_0x1e8252,_0x1319c8=_0x29b3b2['recursive'],_0x21b051=_0x10ad84[0x0];try{const _0xa663f0=_0x29b3b2[_0x392713(0x128)];_0x29b3b2[_0x392713(0xfc)]&&(console[_0x392713(0x121)](_0x392713(0x10f)+_0x29b3b2[_0x392713(0x122)]),console[_0x392713(0x121)](_0x392713(0xf5)+(_0xa663f0||'/')),_0x21b051&&console[_0x392713(0x121)](_0x392713(0x119)+_0x21b051),_0x1319c8&&console[_0x392713(0x121)](_0x392713(0x11d)));if(_0x21b051){const _0x19aa62=_0x21b051[_0x392713(0xee)]('*')||_0x21b051[_0x392713(0xee)]('?');if(_0x19aa62&&!_0xa663f0)return await this['listParentsWithPattern'](_0x1e8252,_0x21b051);else return _0x19aa62?(console['error'](_0x392713(0x10a)),console[_0x392713(0x121)](_0x392713(0xfb)),0x1):_0x1319c8?await this['listRecursive'](_0x1e8252,_0x21b051):await this[_0x392713(0x101)](_0x1e8252,_0x21b051);}if(!_0xa663f0)return await this[_0x392713(0xe8)](_0x1e8252);return _0x1319c8?await this[_0x392713(0x126)](_0x1e8252,_0xa663f0):await this[_0x392713(0x101)](_0x1e8252,_0xa663f0);}catch(_0x4c7b40){if(_0x4c7b40 instanceof SDKError)return console[_0x392713(0x121)]('Error:\x20'+_0x4c7b40[_0x392713(0x116)]),_0x4c7b40['cause']&&console[_0x392713(0x121)](_0x392713(0x125)+_0x4c7b40['cause']),0x1;throw _0x4c7b40;}}async['listParentsWithPattern'](_0x1ee13b,_0x403771){const _0x1b497a=a28_0x250888,{options:_0x45619c,tdx:_0x2e9db2}=_0x1ee13b,_0x428ce4=await withSpinner('Listing\x20parent\x20segments\x20matching\x20\x27'+_0x403771+_0x1b497a(0x113),()=>_0x2e9db2[_0x1b497a(0x124)][_0x1b497a(0xe8)](),{'verbose':_0x45619c['verbose']}),_0x3d0654=_0x428ce4[_0x1b497a(0xf3)],_0x36a1df=_0x403771[_0x1b497a(0x103)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x1b497a(0x103)](/\*/g,'.*')[_0x1b497a(0x103)](/\?/g,'.'),_0x5ec578=new RegExp('^'+_0x36a1df+'$','i'),_0x18c50e=_0x3d0654[_0x1b497a(0xec)](_0x441900=>_0x5ec578['test'](_0x441900[_0x1b497a(0x102)][_0x1b497a(0x11f)]));console['error'](_0x1b497a(0x105)+_0x18c50e[_0x1b497a(0xfd)]+_0x1b497a(0xef)+(_0x18c50e[_0x1b497a(0xfd)]!==0x1?'s':'')+_0x1b497a(0xfe)+_0x403771+'\x27');if(_0x45619c['format']===_0x1b497a(0x107)||_0x45619c[_0x1b497a(0x104)]===_0x1b497a(0x129))await handleSDKOutput(_0x18c50e,_0x45619c);else{if(_0x18c50e[_0x1b497a(0xfd)]===0x0)console[_0x1b497a(0xeb)]('No\x20parent\x20segments\x20match\x20pattern:\x20'+_0x403771);else{console['log'](_0x1b497a(0x112));for(const _0x1fff82 of _0x18c50e){const _0x5a9b60=_0x1fff82[_0x1b497a(0x102)][_0x1b497a(0xff)]?a28_0x4d7d50[_0x1b497a(0x118)]('\x20('+formatRows(_0x1fff82[_0x1b497a(0x102)][_0x1b497a(0xff)])+')'):'';console[_0x1b497a(0xeb)](_0x1b497a(0x12a)+_0x1fff82[_0x1b497a(0x102)][_0x1b497a(0x11f)]+_0x5a9b60);}}}return 0x0;}async[a28_0x250888(0xe8)](_0x52638d){const _0x2c7cd0=a28_0x250888,{options:_0x1253a1,tdx:_0x5c4132}=_0x52638d,_0x43a7d2=await withSpinner(_0x2c7cd0(0xf4),()=>_0x5c4132[_0x2c7cd0(0x124)][_0x2c7cd0(0xe8)](),{'verbose':_0x1253a1[_0x2c7cd0(0xfc)]}),_0x3c7498=_0x43a7d2[_0x2c7cd0(0xf3)];console[_0x2c7cd0(0x121)]('✔\x20Found\x20'+_0x3c7498[_0x2c7cd0(0xfd)]+_0x2c7cd0(0xef)+(_0x3c7498['length']!==0x1?'s':''));if(_0x1253a1[_0x2c7cd0(0x104)]===_0x2c7cd0(0x107)||_0x1253a1[_0x2c7cd0(0x104)]==='jsonl')await handleSDKOutput(_0x3c7498,_0x1253a1);else{console[_0x2c7cd0(0xeb)](_0x2c7cd0(0x112));for(const _0x3c64fe of _0x3c7498){const _0x4f8275=_0x3c64fe[_0x2c7cd0(0x102)]['population']?a28_0x4d7d50[_0x2c7cd0(0x118)]('\x20('+formatRows(_0x3c64fe[_0x2c7cd0(0x102)][_0x2c7cd0(0xff)])+')'):'';console[_0x2c7cd0(0xeb)](_0x2c7cd0(0x12a)+_0x3c64fe[_0x2c7cd0(0x102)][_0x2c7cd0(0x11f)]+_0x4f8275);}}return 0x0;}async[a28_0x250888(0x101)](_0x5c8228,_0x4115d9){const _0x12e634=a28_0x250888,{options:_0x4e24d4,tdx:_0x52b798}=_0x5c8228,_0x4f5c48=await withSpinner(_0x12e634(0x11e)+_0x4115d9+_0x12e634(0x113),()=>_0x52b798[_0x12e634(0x124)][_0x12e634(0x109)](_0x4115d9),{'verbose':_0x4e24d4[_0x12e634(0xfc)]}),_0x8dbe0=_0x4f5c48['data'];_0x4e24d4['verbose']&&(console[_0x12e634(0x121)](_0x12e634(0xf7)+_0x8dbe0[_0x12e634(0x110)]),_0x8dbe0[_0x12e634(0x11b)]&&console[_0x12e634(0x121)](_0x12e634(0x100)+_0x8dbe0[_0x12e634(0x11b)]));const _0x42d41a=await withSpinner(_0x12e634(0xf9),()=>_0x52b798[_0x12e634(0x124)][_0x12e634(0x101)](_0x8dbe0[_0x12e634(0x110)],_0x8dbe0[_0x12e634(0x11b)]),{'verbose':_0x4e24d4[_0x12e634(0xfc)]}),{folders:_0x11049d,segments:_0x5794af}=_0x42d41a[_0x12e634(0xf3)],_0x347340=_0x11049d[_0x12e634(0xfd)]+_0x5794af['length'];console[_0x12e634(0x121)](_0x12e634(0x105)+_0x11049d[_0x12e634(0xfd)]+'\x20folder'+(_0x11049d[_0x12e634(0xfd)]!==0x1?'s':'')+'\x20and\x20'+_0x5794af[_0x12e634(0xfd)]+_0x12e634(0x108)+(_0x5794af[_0x12e634(0xfd)]!==0x1?'s':''));if(_0x4e24d4[_0x12e634(0x104)]===_0x12e634(0x107)||_0x4e24d4[_0x12e634(0x104)]===_0x12e634(0x129)){const _0x1f2672=[..._0x11049d[_0x12e634(0x120)](_0x5ee5ad=>({..._0x5ee5ad,'type':_0x12e634(0xf1)})),..._0x5794af[_0x12e634(0x120)](_0xbd6adf=>({..._0xbd6adf,'type':_0x12e634(0x124)}))][_0x12e634(0xf8)]((_0x37a4a6,_0x28ab79)=>_0x37a4a6['name'][_0x12e634(0xea)](_0x28ab79[_0x12e634(0x11f)]));await handleSDKOutput(_0x1f2672,_0x4e24d4);}else{if(_0x347340===0x0)console[_0x12e634(0xeb)](a28_0x4d7d50[_0x12e634(0x118)]('[/'+_0x4115d9+']')),console[_0x12e634(0xeb)](_0x12e634(0x123));else{console['log'](a28_0x4d7d50[_0x12e634(0x118)]('[/'+_0x4115d9+']'));const _0x32b3f7=formatFlatList(_0x11049d,_0x5794af,{'showMetadata':!![]});console['log'](_0x32b3f7);}}return 0x0;}async['listRecursive'](_0x843b93,_0x5c4a41){const _0x3dc26e=a28_0x250888,{options:_0x1144ed,tdx:_0x527ce6}=_0x843b93,_0xcfffb2=await withSpinner(_0x3dc26e(0x11e)+_0x5c4a41+_0x3dc26e(0x113),()=>_0x527ce6[_0x3dc26e(0x124)]['resolvePathToResource'](_0x5c4a41),{'verbose':_0x1144ed[_0x3dc26e(0xfc)]}),_0x163c92=_0xcfffb2[_0x3dc26e(0xf3)];_0x1144ed['verbose']&&(console[_0x3dc26e(0x121)](_0x3dc26e(0xf7)+_0x163c92[_0x3dc26e(0x110)]),_0x163c92[_0x3dc26e(0x11b)]&&console['error']('Folder\x20ID:\x20'+_0x163c92['folderId']));const _0x109e96=_0x1144ed[_0x3dc26e(0x106)]||0xa,_0x1b9a36=await withSpinner(_0x3dc26e(0xe9),()=>_0x527ce6[_0x3dc26e(0x124)][_0x3dc26e(0x126)](_0x163c92[_0x3dc26e(0x110)],_0x163c92[_0x3dc26e(0x11b)],0x0,_0x109e96),{'verbose':_0x1144ed['verbose']}),_0x27fc24=_0x1b9a36['data'];console[_0x3dc26e(0x121)](_0x3dc26e(0x114)+_0x27fc24['length']+_0x3dc26e(0x127));if(_0x1144ed[_0x3dc26e(0x104)]===_0x3dc26e(0x107)||_0x1144ed['format']===_0x3dc26e(0x129))await handleSDKOutput(_0x27fc24,_0x1144ed);else{console[_0x3dc26e(0xeb)](a28_0x4d7d50[_0x3dc26e(0x118)]('[/'+_0x5c4a41+']'));const _0x22095a=formatTree(_0x27fc24,{'showMetadata':!![]});console[_0x3dc26e(0xeb)](_0x22095a);}return 0x0;}}
1
+ const a28_0x5435d2=a28_0x5299;(function(_0x5503ed,_0x489d17){const _0x5d84ed=a28_0x5299,_0x1632b1=_0x5503ed();while(!![]){try{const _0x366fff=-parseInt(_0x5d84ed(0xf7))/0x1+parseInt(_0x5d84ed(0xdc))/0x2+-parseInt(_0x5d84ed(0xf4))/0x3+parseInt(_0x5d84ed(0xe0))/0x4*(parseInt(_0x5d84ed(0xfc))/0x5)+-parseInt(_0x5d84ed(0xfb))/0x6+parseInt(_0x5d84ed(0xe9))/0x7*(-parseInt(_0x5d84ed(0xf8))/0x8)+parseInt(_0x5d84ed(0x111))/0x9;if(_0x366fff===_0x489d17)break;else _0x1632b1['push'](_0x1632b1['shift']());}catch(_0x4219d8){_0x1632b1['push'](_0x1632b1['shift']());}}}(a28_0x2d49,0x26873));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a28_0x5299(_0x4a8091,_0x1a44c3){const _0x2d49de=a28_0x2d49();return a28_0x5299=function(_0x52996e,_0x48f0d9){_0x52996e=_0x52996e-0xd0;let _0x47f4c3=_0x2d49de[_0x52996e];return _0x47f4c3;},a28_0x5299(_0x4a8091,_0x1a44c3);}import{handleSDKOutput}from'../utils/command-output.js';import{withSpinner}from'../utils/spinner.js';import{formatFlatList,formatTree}from'../utils/tree-formatter.js';function a28_0x2d49(){const _0x2d547b=['365052HVCVWE','listParentsWithPattern','Clear\x20context\x20with:\x20tdx\x20segment\x20use\x20/','listRecursive','12MWvYxv','listParents','folder','\x20and\x20','folderId','\x20matching\x20\x27','listUnified','\x27...','segment','14bwIdiI','name','description','Recursive\x20mode:\x20enabled','attributes','✔\x20Built\x20tree\x20with\x20','error','replace','filter','Listing\x20parent\x20segments\x20matching\x20\x27','[parent\x20segments]','724476hxaUuZ','Listing\x20folders\x20and\x20segments...','jsonl','123833MfiTGe','952888faFrJx','verbose','(empty)','953298mMWmQZ','384365XLavrf','Site:\x20','site','data','population','\x20top-level\x20items','format','Error:\x20','sort','No\x20parent\x20segments\x20match\x20pattern:\x20','Resolving\x20context\x20path\x20\x27','\x20segment','Folder\x20ID:\x20','dim','map','cause','json','parentId','execute','log','length','4563864ocojeH','segmentPath','Building\x20hierarchy\x20tree...','✔\x20Found\x20','resolvePathToResource','👥\x20','test','includes','message','segments','Parent\x20ID:\x20','\x20parent\x20segment','List\x20parent\x20segments,\x20folders,\x20and\x20child\x20segments','Error:\x20Pattern\x20matching\x20is\x20only\x20supported\x20at\x20root\x20level\x20(no\x20context\x20set).'];a28_0x2d49=function(){return _0x2d547b;};return a28_0x2d49();}import{formatRows}from'../utils/formatters.js';import a28_0x19b78f from'chalk';export class SegmentsCommand extends BaseCommand{[a28_0x5435d2(0xea)]=a28_0x5435d2(0xd7);[a28_0x5435d2(0xeb)]=a28_0x5435d2(0xda);async[a28_0x5435d2(0x10e)](_0x4c6037){const _0x1382af=a28_0x5435d2,{options:_0x25067b,args:_0x247b56}=_0x4c6037,_0x4eb086=_0x25067b['recursive'],_0x4bfb1f=_0x247b56[0x0];try{const _0x2fb325=_0x25067b[_0x1382af(0x112)];_0x25067b['verbose']&&(console[_0x1382af(0xef)](_0x1382af(0xfd)+_0x25067b[_0x1382af(0xfe)]),console['error']('Current\x20context:\x20'+(_0x2fb325||'/')),_0x4bfb1f&&console[_0x1382af(0xef)]('Path/pattern\x20arg:\x20'+_0x4bfb1f),_0x4eb086&&console[_0x1382af(0xef)](_0x1382af(0xec)));if(_0x4bfb1f){const _0x1e7bcb=_0x4bfb1f[_0x1382af(0xd5)]('*')||_0x4bfb1f['includes']('?');if(_0x1e7bcb&&!_0x2fb325)return await this[_0x1382af(0xdd)](_0x4c6037,_0x4bfb1f);else return _0x1e7bcb?(console['error'](_0x1382af(0xdb)),console[_0x1382af(0xef)](_0x1382af(0xde)),0x1):_0x4eb086?await this[_0x1382af(0xdf)](_0x4c6037,_0x4bfb1f):await this[_0x1382af(0xe6)](_0x4c6037,_0x4bfb1f);}if(!_0x2fb325)return await this[_0x1382af(0xe1)](_0x4c6037);return _0x4eb086?await this[_0x1382af(0xdf)](_0x4c6037,_0x2fb325):await this[_0x1382af(0xe6)](_0x4c6037,_0x2fb325);}catch(_0x3b99f9){if(_0x3b99f9 instanceof SDKError)return console['error'](_0x1382af(0x103)+_0x3b99f9[_0x1382af(0xd6)]),_0x3b99f9[_0x1382af(0x10b)]&&console[_0x1382af(0xef)]('\x20\x20Cause:\x20'+_0x3b99f9['cause']),0x1;throw _0x3b99f9;}}async[a28_0x5435d2(0xdd)](_0x54219e,_0x59ed00){const _0x9d47df=a28_0x5435d2,{options:_0xfce9f2,tdx:_0x7ad57e}=_0x54219e,_0x5a6872=await withSpinner(_0x9d47df(0xf2)+_0x59ed00+_0x9d47df(0xe7),()=>_0x7ad57e[_0x9d47df(0xe8)][_0x9d47df(0xe1)](),{'verbose':_0xfce9f2['verbose']}),_0x327e34=_0x5a6872['data'],_0x30abb8=_0x59ed00[_0x9d47df(0xf0)](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0x9d47df(0xf0)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x4ab7d9=new RegExp('^'+_0x30abb8+'$','i'),_0xc9fa55=_0x327e34[_0x9d47df(0xf1)](_0x1d72cd=>_0x4ab7d9[_0x9d47df(0xd4)](_0x1d72cd['attributes'][_0x9d47df(0xea)]));console[_0x9d47df(0xef)](_0x9d47df(0xd1)+_0xc9fa55['length']+_0x9d47df(0xd9)+(_0xc9fa55['length']!==0x1?'s':'')+_0x9d47df(0xe5)+_0x59ed00+'\x27');if(_0xfce9f2[_0x9d47df(0x102)]==='json'||_0xfce9f2[_0x9d47df(0x102)]===_0x9d47df(0xf6))await handleSDKOutput(_0xc9fa55,_0xfce9f2);else{if(_0xc9fa55[_0x9d47df(0x110)]===0x0)console['log'](_0x9d47df(0x105)+_0x59ed00);else{console[_0x9d47df(0x10f)](_0x9d47df(0xf3));for(const _0x105057 of _0xc9fa55){const _0x582bf1=_0x105057['attributes'][_0x9d47df(0x100)]?a28_0x19b78f[_0x9d47df(0x109)]('\x20('+formatRows(_0x105057[_0x9d47df(0xed)][_0x9d47df(0x100)])+')'):'';console['log']('👥\x20'+_0x105057[_0x9d47df(0xed)][_0x9d47df(0xea)]+_0x582bf1);}}}return 0x0;}async[a28_0x5435d2(0xe1)](_0x42958d){const _0x4eed8e=a28_0x5435d2,{options:_0xb30d1c,tdx:_0x52bb64}=_0x42958d,_0x3e8221=await withSpinner('Listing\x20parent\x20segments...',()=>_0x52bb64['segment'][_0x4eed8e(0xe1)](),{'verbose':_0xb30d1c[_0x4eed8e(0xf9)]}),_0x19485d=_0x3e8221['data'];console[_0x4eed8e(0xef)](_0x4eed8e(0xd1)+_0x19485d[_0x4eed8e(0x110)]+_0x4eed8e(0xd9)+(_0x19485d[_0x4eed8e(0x110)]!==0x1?'s':''));if(_0xb30d1c[_0x4eed8e(0x102)]===_0x4eed8e(0x10c)||_0xb30d1c['format']===_0x4eed8e(0xf6))await handleSDKOutput(_0x19485d,_0xb30d1c);else{console['log'](_0x4eed8e(0xf3));for(const _0x4f13b7 of _0x19485d){const _0x56cbfa=_0x4f13b7[_0x4eed8e(0xed)][_0x4eed8e(0x100)]?a28_0x19b78f[_0x4eed8e(0x109)]('\x20('+formatRows(_0x4f13b7['attributes'][_0x4eed8e(0x100)])+')'):'';console[_0x4eed8e(0x10f)](_0x4eed8e(0xd3)+_0x4f13b7[_0x4eed8e(0xed)][_0x4eed8e(0xea)]+_0x56cbfa);}}return 0x0;}async[a28_0x5435d2(0xe6)](_0x3a6fa5,_0x130a0e){const _0x1991bc=a28_0x5435d2,{options:_0x5e5bf1,tdx:_0x4a6ee8}=_0x3a6fa5,_0x7d24fb=await withSpinner(_0x1991bc(0x106)+_0x130a0e+_0x1991bc(0xe7),()=>_0x4a6ee8[_0x1991bc(0xe8)]['resolvePathToResource'](_0x130a0e),{'verbose':_0x5e5bf1[_0x1991bc(0xf9)]}),_0x210d13=_0x7d24fb[_0x1991bc(0xff)];_0x5e5bf1[_0x1991bc(0xf9)]&&(console[_0x1991bc(0xef)](_0x1991bc(0xd8)+_0x210d13[_0x1991bc(0x10d)]),_0x210d13[_0x1991bc(0xe4)]&&console[_0x1991bc(0xef)]('Folder\x20ID:\x20'+_0x210d13['folderId']));const _0x581d5d=await withSpinner(_0x1991bc(0xf5),()=>_0x4a6ee8['segment'][_0x1991bc(0xe6)](_0x210d13[_0x1991bc(0x10d)],_0x210d13[_0x1991bc(0xe4)]),{'verbose':_0x5e5bf1[_0x1991bc(0xf9)]}),{folders:_0xa15293,segments:_0x25f0ba}=_0x581d5d['data'],_0x1577a1=_0xa15293['length']+_0x25f0ba['length'];console[_0x1991bc(0xef)](_0x1991bc(0xd1)+_0xa15293[_0x1991bc(0x110)]+'\x20folder'+(_0xa15293['length']!==0x1?'s':'')+_0x1991bc(0xe3)+_0x25f0ba['length']+_0x1991bc(0x107)+(_0x25f0ba['length']!==0x1?'s':''));if(_0x5e5bf1[_0x1991bc(0x102)]===_0x1991bc(0x10c)||_0x5e5bf1[_0x1991bc(0x102)]===_0x1991bc(0xf6)){const _0x516aea=[..._0xa15293[_0x1991bc(0x10a)](_0x517829=>({..._0x517829,'type':_0x1991bc(0xe2)})),..._0x25f0ba[_0x1991bc(0x10a)](_0x12e054=>({..._0x12e054,'type':_0x1991bc(0xe8)}))][_0x1991bc(0x104)]((_0x5ad9d8,_0x137dd1)=>_0x5ad9d8[_0x1991bc(0xea)]['localeCompare'](_0x137dd1[_0x1991bc(0xea)]));await handleSDKOutput(_0x516aea,_0x5e5bf1);}else{if(_0x1577a1===0x0)console['log'](a28_0x19b78f[_0x1991bc(0x109)]('[/'+_0x130a0e+']')),console['log'](_0x1991bc(0xfa));else{console[_0x1991bc(0x10f)](a28_0x19b78f[_0x1991bc(0x109)]('[/'+_0x130a0e+']'));const _0x1b1151=formatFlatList(_0xa15293,_0x25f0ba,{'showMetadata':!![]});console[_0x1991bc(0x10f)](_0x1b1151);}}return 0x0;}async[a28_0x5435d2(0xdf)](_0x18aba1,_0x38f07e){const _0x25a1ce=a28_0x5435d2,{options:_0x283477,tdx:_0x2cb090}=_0x18aba1,_0x34d8a8=await withSpinner(_0x25a1ce(0x106)+_0x38f07e+_0x25a1ce(0xe7),()=>_0x2cb090[_0x25a1ce(0xe8)][_0x25a1ce(0xd2)](_0x38f07e),{'verbose':_0x283477[_0x25a1ce(0xf9)]}),_0x4cd066=_0x34d8a8[_0x25a1ce(0xff)];_0x283477['verbose']&&(console[_0x25a1ce(0xef)](_0x25a1ce(0xd8)+_0x4cd066['parentId']),_0x4cd066[_0x25a1ce(0xe4)]&&console[_0x25a1ce(0xef)](_0x25a1ce(0x108)+_0x4cd066[_0x25a1ce(0xe4)]));const _0x234617=_0x283477['maxDepth']||0xa,_0xdb9817=await withSpinner(_0x25a1ce(0xd0),()=>_0x2cb090['segment'][_0x25a1ce(0xdf)](_0x4cd066[_0x25a1ce(0x10d)],_0x4cd066[_0x25a1ce(0xe4)],0x0,_0x234617),{'verbose':_0x283477[_0x25a1ce(0xf9)]}),_0x5a1006=_0xdb9817[_0x25a1ce(0xff)];console[_0x25a1ce(0xef)](_0x25a1ce(0xee)+_0x5a1006[_0x25a1ce(0x110)]+_0x25a1ce(0x101));if(_0x283477[_0x25a1ce(0x102)]===_0x25a1ce(0x10c)||_0x283477[_0x25a1ce(0x102)]===_0x25a1ce(0xf6))await handleSDKOutput(_0x5a1006,_0x283477);else{console[_0x25a1ce(0x10f)](a28_0x19b78f[_0x25a1ce(0x109)]('[/'+_0x38f07e+']'));const _0x1c6c58=formatTree(_0x5a1006,{'showMetadata':!![]});console['log'](_0x1c6c58);}return 0x0;}}
@@ -1 +1 @@
1
- const a29_0x131b09=a29_0x4a74;(function(_0x52fe68,_0x4b4a66){const _0x55ac7e=a29_0x4a74,_0x2858fb=_0x52fe68();while(!![]){try{const _0x2ad627=parseInt(_0x55ac7e(0x205))/0x1*(-parseInt(_0x55ac7e(0x1ed))/0x2)+-parseInt(_0x55ac7e(0x1f5))/0x3*(parseInt(_0x55ac7e(0x208))/0x4)+-parseInt(_0x55ac7e(0x1f3))/0x5+parseInt(_0x55ac7e(0x200))/0x6+-parseInt(_0x55ac7e(0x1ee))/0x7+parseInt(_0x55ac7e(0x1f2))/0x8*(-parseInt(_0x55ac7e(0x1f4))/0x9)+parseInt(_0x55ac7e(0x1f9))/0xa;if(_0x2ad627===_0x4b4a66)break;else _0x2858fb['push'](_0x2858fb['shift']());}catch(_0x7bb5b5){_0x2858fb['push'](_0x2858fb['shift']());}}}(a29_0x2c4f,0x8ca1f));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a29_0x2c4f(){const _0x24bfcb=['table','130KYAKNc','Site:\x20','show','2136pzpOAF','\x20row','error','Querying\x20','Database:\x20','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','args','description','Error:\x20','limit','length','execute','1010qJwXom','3494736KdKCWt','data','database','validate','8mQDKVT','1225220tEtdtv','1488987KcZPOP','5682aLtSlT','showTable','✔\x20Retrieved\x20','Limit:\x20','23193150BlPCva','message','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','\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>','Usage:\x20tdx\x20show\x20<database.table>','\x20\x20Cause:\x20','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','1460982irUEdk','Catalog:\x20','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','Show\x20table\x20contents'];a29_0x2c4f=function(){return _0x24bfcb;};return a29_0x2c4f();}import{handleSDKOutput}from'../utils/command-output.js';import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';function a29_0x4a74(_0x3ee8ec,_0x3a5c90){const _0x2c4f40=a29_0x2c4f();return a29_0x4a74=function(_0x4a74e5,_0x58ffe9){_0x4a74e5=_0x4a74e5-0x1ea;let _0x2e7839=_0x2c4f40[_0x4a74e5];return _0x2e7839;},a29_0x4a74(_0x3ee8ec,_0x3a5c90);}export class ShowCommand extends BaseCommand{['name']=a29_0x131b09(0x207);[a29_0x131b09(0x20f)]=a29_0x131b09(0x203);async[a29_0x131b09(0x1ec)](_0x4e2905){const _0x5e8e0b=a29_0x131b09;return this[_0x5e8e0b(0x1f6)](_0x4e2905);}async['showTable'](_0x9c1eef){const _0xd9646b=a29_0x131b09,{options:_0x2a59bb,args:_0xe34f10,tdx:_0x497624}=_0x9c1eef;let _0x332305;try{_0x332305=parseTableReference(_0xe34f10[0x0]);const _0xec2492=_0x2a59bb[_0xd9646b(0x1f0)];!_0x332305[_0xd9646b(0x1f0)]&&_0xec2492&&(_0x332305[_0xd9646b(0x1f0)]=_0xec2492);const _0x1d1a2a=validateTableDescribeReference(_0x332305);if(_0x1d1a2a)return console[_0xd9646b(0x20a)](_0xd9646b(0x210)+_0x1d1a2a),console[_0xd9646b(0x20a)](_0xd9646b(0x1fd)),console['error'](_0xd9646b(0x1ff)),console[_0xd9646b(0x20a)](_0xd9646b(0x1fc)),0x1;}catch(_0x3a950b){return console[_0xd9646b(0x20a)](_0xd9646b(0x210)+_0x3a950b[_0xd9646b(0x1fa)]),console[_0xd9646b(0x20a)](_0xd9646b(0x1fd)),console[_0xd9646b(0x20a)](_0xd9646b(0x1ff)),console['error'](_0xd9646b(0x1fc)),0x1;}const _0x76aef1=_0x332305['catalog'],_0x28e69b=_0x332305[_0xd9646b(0x1f0)],_0x1fb12e=_0x332305[_0xd9646b(0x204)],_0xa98b23=resolveLimit(_0x2a59bb[_0xd9646b(0x1ea)],DEFAULT_DISPLAY_LIMIT);try{_0x2a59bb['verbose']&&(console[_0xd9646b(0x20a)](_0xd9646b(0x206)+_0x2a59bb['site']),_0x76aef1&&console[_0xd9646b(0x20a)](_0xd9646b(0x201)+_0x76aef1),console[_0xd9646b(0x20a)](_0xd9646b(0x20c)+_0x28e69b),console[_0xd9646b(0x20a)]('Table:\x20'+_0x1fb12e),console['error'](_0xd9646b(0x1f8)+_0xa98b23));const _0x15cf54=_0x76aef1?_0x76aef1+'.'+_0x28e69b+'.'+_0x1fb12e:_0x28e69b+'.'+_0x1fb12e,_0x367835=await withSpinner(_0xd9646b(0x20b)+_0x15cf54+'...',()=>_0x497624['table'][_0xd9646b(0x207)](_0x28e69b,_0x1fb12e,_0xa98b23,_0x76aef1),{'verbose':_0x2a59bb['verbose']}),_0x29a917=_0x367835[_0xd9646b(0x1ef)],_0x31fc2b=_0x29a917[_0xd9646b(0x1ef)];return _0x31fc2b[_0xd9646b(0x1eb)]===0x0?console[_0xd9646b(0x20a)](_0xd9646b(0x20d)):console[_0xd9646b(0x20a)](_0xd9646b(0x1f7)+_0x31fc2b[_0xd9646b(0x1eb)]+_0xd9646b(0x209)+(_0x31fc2b[_0xd9646b(0x1eb)]!==0x1?'s':'')+'\x20from\x20'+_0x15cf54),await handleSDKOutput(_0x31fc2b,_0x2a59bb),0x0;}catch(_0xd88c8e){if(_0xd88c8e instanceof SDKError)return console[_0xd9646b(0x20a)]('Error:\x20'+_0xd88c8e[_0xd9646b(0x1fa)]),_0xd88c8e['cause']&&console['error'](_0xd9646b(0x1fe)+_0xd88c8e['cause']),0x1;throw _0xd88c8e;}}[a29_0x131b09(0x1f1)](_0x3b41df){const _0x1229c1=a29_0x131b09;if(_0x3b41df['args']['length']===0x0)return _0x1229c1(0x1fb);if(_0x3b41df[_0x1229c1(0x20e)][_0x1229c1(0x1eb)]>0x1)return _0x1229c1(0x202);return undefined;}}
1
+ const a29_0x47d4f4=a29_0x477e;(function(_0x362304,_0x212fa8){const _0x2ebb27=a29_0x477e,_0x42c2f4=_0x362304();while(!![]){try{const _0x1365fd=-parseInt(_0x2ebb27(0x204))/0x1*(parseInt(_0x2ebb27(0x1f5))/0x2)+parseInt(_0x2ebb27(0x20b))/0x3+parseInt(_0x2ebb27(0x208))/0x4*(-parseInt(_0x2ebb27(0x210))/0x5)+-parseInt(_0x2ebb27(0x1ef))/0x6*(-parseInt(_0x2ebb27(0x20c))/0x7)+parseInt(_0x2ebb27(0x1f4))/0x8*(-parseInt(_0x2ebb27(0x212))/0x9)+parseInt(_0x2ebb27(0x20e))/0xa+parseInt(_0x2ebb27(0x1ff))/0xb*(parseInt(_0x2ebb27(0x20a))/0xc);if(_0x1365fd===_0x212fa8)break;else _0x42c2f4['push'](_0x42c2f4['shift']());}catch(_0x129dbf){_0x42c2f4['push'](_0x42c2f4['shift']());}}}(a29_0x4333,0x75523));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a29_0x477e(_0xffb2d2,_0x59935d){const _0x4333e4=a29_0x4333();return a29_0x477e=function(_0x477e6a,_0x3ee307){_0x477e6a=_0x477e6a-0x1ee;let _0x44e1d7=_0x4333e4[_0x477e6a];return _0x44e1d7;},a29_0x477e(_0xffb2d2,_0x59935d);}import{handleSDKOutput}from'../utils/command-output.js';function a29_0x4333(){const _0x3b4959=['2376066vQWrcx','120463SjcXZb','Error:\x20','4028170YkItFw','message','655lUKVnc','\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>','247806wDGLbN','✔\x20Query\x20successful\x20-\x200\x20rows\x20returned','args','error','Catalog:\x20','Show\x20table\x20contents','length','276MnTxWs','site','database','validate','data','120cURcvV','850946WWuXQr','catalog','description','name','Usage:\x20tdx\x20show\x20<database.table>','limit','✔\x20Retrieved\x20','execute','Limit:\x20','show','11qztNCF','table','\x20from\x20','Querying\x20','\x20row','2dpKiRy','Site:\x20','showTable','\x20\x20Cause:\x20','10928INokJJ','verbose','1391304fMYBpt'];a29_0x4333=function(){return _0x3b4959;};return a29_0x4333();}import{parseTableReference,validateTableDescribeReference}from'../utils/table-ref-parser.js';import{withSpinner}from'../utils/spinner.js';import{DEFAULT_DISPLAY_LIMIT,resolveLimit}from'../utils/constants.js';export class ShowCommand extends BaseCommand{[a29_0x47d4f4(0x1f8)]=a29_0x47d4f4(0x1fe);[a29_0x47d4f4(0x1f7)]=a29_0x47d4f4(0x217);async[a29_0x47d4f4(0x1fc)](_0x420dd3){const _0x42e5ba=a29_0x47d4f4;return this[_0x42e5ba(0x206)](_0x420dd3);}async[a29_0x47d4f4(0x206)](_0xdc96aa){const _0x41c3ae=a29_0x47d4f4,{options:_0x4cdae1,args:_0x593d45,tdx:_0x5c436e}=_0xdc96aa;let _0x4bdf30;try{_0x4bdf30=parseTableReference(_0x593d45[0x0]);const _0x525117=_0x4cdae1[_0x41c3ae(0x1f1)];!_0x4bdf30[_0x41c3ae(0x1f1)]&&_0x525117&&(_0x4bdf30[_0x41c3ae(0x1f1)]=_0x525117);const _0x2e7253=validateTableDescribeReference(_0x4bdf30);if(_0x2e7253)return console['error'](_0x41c3ae(0x20d)+_0x2e7253),console['error'](_0x41c3ae(0x1f9)),console[_0x41c3ae(0x215)]('\x20\x20\x20or:\x20tdx\x20show\x20<catalog.database.table>'),console[_0x41c3ae(0x215)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}catch(_0x29d54c){return console[_0x41c3ae(0x215)]('Error:\x20'+_0x29d54c[_0x41c3ae(0x20f)]),console['error'](_0x41c3ae(0x1f9)),console[_0x41c3ae(0x215)](_0x41c3ae(0x211)),console[_0x41c3ae(0x215)]('\x20\x20\x20or:\x20tdx\x20show\x20<table>\x20--database\x20<database>'),0x1;}const _0x5121a2=_0x4bdf30[_0x41c3ae(0x1f6)],_0x13ae55=_0x4bdf30[_0x41c3ae(0x1f1)],_0x1aace7=_0x4bdf30[_0x41c3ae(0x200)],_0x2ec17e=resolveLimit(_0x4cdae1[_0x41c3ae(0x1fa)],DEFAULT_DISPLAY_LIMIT);try{_0x4cdae1[_0x41c3ae(0x209)]&&(console[_0x41c3ae(0x215)](_0x41c3ae(0x205)+_0x4cdae1[_0x41c3ae(0x1f0)]),_0x5121a2&&console[_0x41c3ae(0x215)](_0x41c3ae(0x216)+_0x5121a2),console['error']('Database:\x20'+_0x13ae55),console[_0x41c3ae(0x215)]('Table:\x20'+_0x1aace7),console[_0x41c3ae(0x215)](_0x41c3ae(0x1fd)+_0x2ec17e));const _0x5b5a84=_0x5121a2?_0x5121a2+'.'+_0x13ae55+'.'+_0x1aace7:_0x13ae55+'.'+_0x1aace7,_0x1afe8a=await withSpinner(_0x41c3ae(0x202)+_0x5b5a84+'...',()=>_0x5c436e[_0x41c3ae(0x200)]['show'](_0x13ae55,_0x1aace7,_0x2ec17e,_0x5121a2),{'verbose':_0x4cdae1[_0x41c3ae(0x209)]}),_0x247717=_0x1afe8a['data'],_0x47647d=_0x247717[_0x41c3ae(0x1f3)];return _0x47647d[_0x41c3ae(0x1ee)]===0x0?console[_0x41c3ae(0x215)](_0x41c3ae(0x213)):console['error'](_0x41c3ae(0x1fb)+_0x47647d[_0x41c3ae(0x1ee)]+_0x41c3ae(0x203)+(_0x47647d[_0x41c3ae(0x1ee)]!==0x1?'s':'')+_0x41c3ae(0x201)+_0x5b5a84),await handleSDKOutput(_0x47647d,_0x4cdae1),0x0;}catch(_0x5e5040){if(_0x5e5040 instanceof SDKError)return console[_0x41c3ae(0x215)](_0x41c3ae(0x20d)+_0x5e5040[_0x41c3ae(0x20f)]),_0x5e5040['cause']&&console[_0x41c3ae(0x215)](_0x41c3ae(0x207)+_0x5e5040['cause']),0x1;throw _0x5e5040;}}[a29_0x47d4f4(0x1f2)](_0x3a6396){const _0x4ed8ed=a29_0x47d4f4;if(_0x3a6396[_0x4ed8ed(0x214)][_0x4ed8ed(0x1ee)]===0x0)return'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';if(_0x3a6396[_0x4ed8ed(0x214)][_0x4ed8ed(0x1ee)]>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
- function a30_0x3b29(_0x267f01,_0x3637b8){const _0x7d7b0d=a30_0x7d7b();return a30_0x3b29=function(_0x3b295c,_0x449969){_0x3b295c=_0x3b295c-0xd7;let _0x56995d=_0x7d7b0d[_0x3b295c];return _0x56995d;},a30_0x3b29(_0x267f01,_0x3637b8);}const a30_0x538211=a30_0x3b29;(function(_0x1dde5f,_0x34780a){const _0x201d05=a30_0x3b29,_0x2f9647=_0x1dde5f();while(!![]){try{const _0x117afa=parseInt(_0x201d05(0xed))/0x1*(parseInt(_0x201d05(0xf0))/0x2)+-parseInt(_0x201d05(0xe4))/0x3*(-parseInt(_0x201d05(0xe7))/0x4)+parseInt(_0x201d05(0x101))/0x5*(parseInt(_0x201d05(0xeb))/0x6)+-parseInt(_0x201d05(0xdd))/0x7+-parseInt(_0x201d05(0x104))/0x8+parseInt(_0x201d05(0xf3))/0x9+parseInt(_0x201d05(0x10b))/0xa*(-parseInt(_0x201d05(0xe0))/0xb);if(_0x117afa===_0x34780a)break;else _0x2f9647['push'](_0x2f9647['shift']());}catch(_0xbcf167){_0x2f9647['push'](_0x2f9647['shift']());}}}(a30_0x7d7b,0xa7940));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_0x7d7b(){const _0x22156d=['Error:\x20','cause','table','limit','5928530ncWYjh','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','tables','Error:\x20Pattern\x20\x27','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','name','verbose','2044546XgHRkZ','.*\x22','data','33rLXYxm','description','\x20\x20Use:\x20tdx\x20tables\x20\x22','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','9NCIogC','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','site','1312232ACxJNk','\x27\x20across\x20all\x20databases.','database','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','419082ldZwAS','list','526423ftpqof','Database:\x20all','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','2uYAnZC','message','Site:\x20','3441942NVBbKb','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','error','Table\x20pattern:\x20','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x27\x20is\x20ambiguous.','execute','includes','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','Database\x20pattern:\x20','validate','✔\x20Found\x20','Note:\x20\x27','80GYToaY','\x20\x20Cause:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','2028400kaiaOA','length','\x20table'];a30_0x7d7b=function(){return _0x22156d;};return a30_0x7d7b();}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x538211(0xdb)]=a30_0x538211(0xd8);[a30_0x538211(0xe1)]='List\x20tables\x20in\x20a\x20database';async[a30_0x538211(0xfa)](_0x2cc64f){const _0x5527aa=a30_0x538211,{options:_0x21f8e3,args:_0x218ea2,tdx:_0x569f01}=_0x2cc64f;let _0x3d1f61;if(_0x218ea2['length']===0x0)_0x3d1f61={'database':undefined,'table':undefined,'original':''};else{if(_0x218ea2[_0x5527aa(0x105)]===0x1)try{_0x3d1f61=parseTableReference(_0x218ea2[0x0]);if(_0x3d1f61[_0x5527aa(0x109)]&&!_0x3d1f61['database']&&!_0x3d1f61[_0x5527aa(0x109)][_0x5527aa(0xfb)]('*')&&!_0x3d1f61[_0x5527aa(0x109)][_0x5527aa(0xfb)]('?'))return console[_0x5527aa(0xf5)](_0x5527aa(0xd9)+_0x218ea2[0x0]+_0x5527aa(0xf9)),console[_0x5527aa(0xf5)](_0x5527aa(0xf7)+_0x3d1f61[_0x5527aa(0x109)]+'\x27?'),console[_0x5527aa(0xf5)](_0x5527aa(0xe2)+_0x3d1f61['table']+_0x5527aa(0xde)),console[_0x5527aa(0xf5)](_0x5527aa(0xef)+_0x3d1f61[_0x5527aa(0x109)]),console[_0x5527aa(0xf5)](_0x5527aa(0xf8)+_0x3d1f61[_0x5527aa(0x109)]),console[_0x5527aa(0xf5)](''),console['error'](_0x5527aa(0x100)+_0x218ea2[0x0]+_0x5527aa(0x103)+_0x3d1f61['table']+_0x5527aa(0xe8)),0x1;}catch(_0x3700bb){return console[_0x5527aa(0xf5)](_0x5527aa(0x107)+_0x3700bb[_0x5527aa(0xf1)]),0x1;}else return console['error'](_0x5527aa(0xfc)),console['error'](_0x5527aa(0xda)),console[_0x5527aa(0xf5)](_0x5527aa(0xe5)),console[_0x5527aa(0xf5)](_0x5527aa(0xd7)),console[_0x5527aa(0xf5)](_0x5527aa(0xea)),console['error']('Or\x20use\x20--in\x20flag:'),console['error'](_0x5527aa(0xe3)),0x1;}const _0x44c3e7=_0x21f8e3[_0x5527aa(0xe9)];!_0x3d1f61[_0x5527aa(0xe9)]&&_0x44c3e7&&(_0x3d1f61[_0x5527aa(0xe9)]=_0x44c3e7);try{const _0x40aa6c=_0x1a4ccb=>_0x1a4ccb&&(_0x1a4ccb[_0x5527aa(0xfb)]('*')||_0x1a4ccb[_0x5527aa(0xfb)]('?')),_0x12a9ef=_0x40aa6c(_0x3d1f61[_0x5527aa(0xe9)]);_0x21f8e3[_0x5527aa(0xdc)]&&(console['error'](_0x5527aa(0xf2)+_0x21f8e3[_0x5527aa(0xe6)]),_0x3d1f61['database']?_0x12a9ef?console['error'](_0x5527aa(0xfd)+_0x3d1f61[_0x5527aa(0xe9)]):console[_0x5527aa(0xf5)]('Database:\x20'+_0x3d1f61['database']):console[_0x5527aa(0xf5)](_0x5527aa(0xee)),_0x3d1f61['table']&&console[_0x5527aa(0xf5)](_0x5527aa(0xf6)+_0x3d1f61['table']));const _0x58e18b=_0x3d1f61[_0x5527aa(0xe9)]&&!_0x12a9ef?_0x3d1f61['database']:undefined,_0x5e81f6=_0x12a9ef?_0x3d1f61['database']:undefined,_0x23015b=_0x3d1f61[_0x5527aa(0x109)],_0x3f3f3d=resolveLimit(_0x21f8e3[_0x5527aa(0x10a)],DEFAULT_LISTING_LIMIT),_0x39f441=await withSpinner('Listing\x20tables...',()=>_0x569f01['table'][_0x5527aa(0xec)](_0x58e18b,_0x23015b,_0x5e81f6,_0x3f3f3d),{'verbose':_0x21f8e3['verbose']}),_0x3b5550=_0x39f441[_0x5527aa(0xdf)];if(_0x3b5550['length']===0x0&&_0x3d1f61[_0x5527aa(0xe9)]&&!_0x12a9ef)return console[_0x5527aa(0xf5)]('✖\x20No\x20tables\x20found'),console['error']('Database\x20\x27'+_0x3d1f61['database']+_0x5527aa(0xf4)),0x1;return console[_0x5527aa(0xf5)](_0x5527aa(0xff)+_0x3b5550[_0x5527aa(0x105)]+_0x5527aa(0x106)+(_0x3b5550[_0x5527aa(0x105)]!==0x1?'s':'')),await handleSDKOutput(_0x3b5550,{..._0x21f8e3,'limit':_0x3f3f3d}),0x0;}catch(_0x9333dd){if(_0x9333dd instanceof SDKError)return console[_0x5527aa(0xf5)](_0x5527aa(0x107)+_0x9333dd[_0x5527aa(0xf1)]),_0x9333dd[_0x5527aa(0x108)]&&console[_0x5527aa(0xf5)](_0x5527aa(0x102)+_0x9333dd[_0x5527aa(0x108)]),0x1;throw _0x9333dd;}}[a30_0x538211(0xfe)](_0x1c7d16){return undefined;}}
1
+ const a30_0x368777=a30_0x46d9;(function(_0x22acbd,_0x5651fc){const _0x5270a9=a30_0x46d9,_0x2e62e2=_0x22acbd();while(!![]){try{const _0x3c2ac9=-parseInt(_0x5270a9(0x1b1))/0x1+-parseInt(_0x5270a9(0x1aa))/0x2*(parseInt(_0x5270a9(0x1a8))/0x3)+-parseInt(_0x5270a9(0x195))/0x4*(-parseInt(_0x5270a9(0x186))/0x5)+-parseInt(_0x5270a9(0x189))/0x6+parseInt(_0x5270a9(0x1b0))/0x7*(-parseInt(_0x5270a9(0x194))/0x8)+parseInt(_0x5270a9(0x1b3))/0x9*(-parseInt(_0x5270a9(0x19e))/0xa)+parseInt(_0x5270a9(0x19a))/0xb;if(_0x3c2ac9===_0x5651fc)break;else _0x2e62e2['push'](_0x2e62e2['shift']());}catch(_0x30173c){_0x2e62e2['push'](_0x2e62e2['shift']());}}}(a30_0x375a,0x96997));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../utils/command-output.js';function a30_0x46d9(_0x4ac03f,_0x3f0588){const _0x375ab6=a30_0x375a();return a30_0x46d9=function(_0x46d95e,_0x592bdf){_0x46d95e=_0x46d95e-0x185;let _0x49cb8b=_0x375ab6[_0x46d95e];return _0x49cb8b;},a30_0x46d9(_0x4ac03f,_0x3f0588);}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../utils/constants.js';function a30_0x375a(){const _0x2aaa18=['site','includes','length','\x20\x20Cause:\x20','Or\x20use\x20--in\x20flag:','Note:\x20\x27','description','database','message','6wjOqlv','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','957464bHheYu','✔\x20Found\x20','Table\x20pattern:\x20','\x20\x20Use:\x20tdx\x20tables\x20\x22','limit','\x20table','8687hcFUda','45063uwfckc','.*\x22','18tszipv','\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','List\x20tables\x20in\x20a\x20database','528365alQtZM','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','5766006rWEXga','Error:\x20Pattern\x20\x27','Database\x20pattern:\x20','Database:\x20all','Listing\x20tables...','Site:\x20','\x27\x20across\x20all\x20databases.','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','tables','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','error','2456NILXKT','8zFlHnu','validate','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','name','list','41112632llwTTG','table','cause','Error:\x20','4937440tmPdNy'];a30_0x375a=function(){return _0x2aaa18;};return a30_0x375a();}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a30_0x368777(0x198)]=a30_0x368777(0x191);[a30_0x368777(0x1a5)]=a30_0x368777(0x185);async['execute'](_0x35b0b5){const _0x20af31=a30_0x368777,{options:_0x2139d4,args:_0x3b2d62,tdx:_0x5204cc}=_0x35b0b5;let _0x51516d;if(_0x3b2d62['length']===0x0)_0x51516d={'database':undefined,'table':undefined,'original':''};else{if(_0x3b2d62[_0x20af31(0x1a1)]===0x1)try{_0x51516d=parseTableReference(_0x3b2d62[0x0]);if(_0x51516d[_0x20af31(0x19b)]&&!_0x51516d['database']&&!_0x51516d[_0x20af31(0x19b)][_0x20af31(0x1a0)]('*')&&!_0x51516d[_0x20af31(0x19b)][_0x20af31(0x1a0)]('?'))return console[_0x20af31(0x193)](_0x20af31(0x18a)+_0x3b2d62[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x20af31(0x193)](_0x20af31(0x197)+_0x51516d[_0x20af31(0x19b)]+'\x27?'),console[_0x20af31(0x193)](_0x20af31(0x1ad)+_0x51516d[_0x20af31(0x19b)]+_0x20af31(0x1b2)),console[_0x20af31(0x193)](_0x20af31(0x188)+_0x51516d[_0x20af31(0x19b)]),console[_0x20af31(0x193)](_0x20af31(0x187)+_0x51516d[_0x20af31(0x19b)]),console[_0x20af31(0x193)](''),console[_0x20af31(0x193)](_0x20af31(0x1a4)+_0x3b2d62[0x0]+_0x20af31(0x1b4)+_0x51516d[_0x20af31(0x19b)]+_0x20af31(0x18f)),0x1;}catch(_0x32effd){return console['error'](_0x20af31(0x19d)+_0x32effd[_0x20af31(0x1a7)]),0x1;}else return console['error']('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console[_0x20af31(0x193)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x20af31(0x193)](_0x20af31(0x1b5)),console[_0x20af31(0x193)](_0x20af31(0x1a9)),console[_0x20af31(0x193)](_0x20af31(0x190)),console[_0x20af31(0x193)](_0x20af31(0x1a3)),console[_0x20af31(0x193)]('\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),0x1;}const _0x4740de=_0x2139d4[_0x20af31(0x1a6)];!_0x51516d[_0x20af31(0x1a6)]&&_0x4740de&&(_0x51516d[_0x20af31(0x1a6)]=_0x4740de);try{const _0xa27f05=_0x1fe7f4=>_0x1fe7f4&&(_0x1fe7f4[_0x20af31(0x1a0)]('*')||_0x1fe7f4[_0x20af31(0x1a0)]('?')),_0x38807b=_0xa27f05(_0x51516d['database']);_0x2139d4['verbose']&&(console[_0x20af31(0x193)](_0x20af31(0x18e)+_0x2139d4[_0x20af31(0x19f)]),_0x51516d[_0x20af31(0x1a6)]?_0x38807b?console[_0x20af31(0x193)](_0x20af31(0x18b)+_0x51516d['database']):console['error']('Database:\x20'+_0x51516d[_0x20af31(0x1a6)]):console[_0x20af31(0x193)](_0x20af31(0x18c)),_0x51516d[_0x20af31(0x19b)]&&console['error'](_0x20af31(0x1ac)+_0x51516d[_0x20af31(0x19b)]));const _0x50a933=_0x51516d[_0x20af31(0x1a6)]&&!_0x38807b?_0x51516d[_0x20af31(0x1a6)]:undefined,_0x42d27e=_0x38807b?_0x51516d[_0x20af31(0x1a6)]:undefined,_0xe1588f=_0x51516d[_0x20af31(0x19b)],_0x5dc15e=resolveLimit(_0x2139d4[_0x20af31(0x1ae)],DEFAULT_LISTING_LIMIT),_0x4380af=await withSpinner(_0x20af31(0x18d),()=>_0x5204cc['table'][_0x20af31(0x199)](_0x50a933,_0xe1588f,_0x42d27e,_0x5dc15e),{'verbose':_0x2139d4['verbose']}),_0x15645f=_0x4380af['data'];if(_0x15645f[_0x20af31(0x1a1)]===0x0&&_0x51516d[_0x20af31(0x1a6)]&&!_0x38807b)return console[_0x20af31(0x193)]('✖\x20No\x20tables\x20found'),console[_0x20af31(0x193)]('Database\x20\x27'+_0x51516d[_0x20af31(0x1a6)]+_0x20af31(0x192)),0x1;return console[_0x20af31(0x193)](_0x20af31(0x1ab)+_0x15645f['length']+_0x20af31(0x1af)+(_0x15645f[_0x20af31(0x1a1)]!==0x1?'s':'')),await handleSDKOutput(_0x15645f,{..._0x2139d4,'limit':_0x5dc15e}),0x0;}catch(_0x72382a){if(_0x72382a instanceof SDKError)return console[_0x20af31(0x193)](_0x20af31(0x19d)+_0x72382a[_0x20af31(0x1a7)]),_0x72382a[_0x20af31(0x19c)]&&console[_0x20af31(0x193)](_0x20af31(0x1a2)+_0x72382a[_0x20af31(0x19c)]),0x1;throw _0x72382a;}}[a30_0x368777(0x196)](_0x2e4a55){return undefined;}}
@@ -1 +1 @@
1
- const a31_0x540c43=a31_0x3326;function a31_0xf792(){const _0x6fcf1d=['\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','error','Session\x20profile\x20set\x20to:\x20','\x20(session:\x20','Invalid\x20resource:\x20','includes','776531tcDxpz','1447023XktCEw','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','Session\x20llm_project\x20set\x20to:\x20','profile','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','115ZDOIgm','.\x20Must\x20be\x20one\x20of:\x20','4983424VZoPeN','18rkXNyG','56982CmZgYY','session','llm_project','2477488HnQLwt','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','1675830JGsRGV','Session\x20parent_segment\x20set\x20to:\x20','Error:\x20Profile\x20\x27','184XsZSKo','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','parent_segment','log','Session\x20database\x20set\x20to:\x20','2764JxuuPa','database','toString','name'];a31_0xf792=function(){return _0x6fcf1d;};return a31_0xf792();}(function(_0x5935b4,_0x2e334f){const _0x1538ff=a31_0x3326,_0x5c4f0e=_0x5935b4();while(!![]){try{const _0x3e3f14=parseInt(_0x1538ff(0x195))/0x1*(parseInt(_0x1538ff(0x19a))/0x2)+-parseInt(_0x1538ff(0x1a5))/0x3+parseInt(_0x1538ff(0x190))/0x4+parseInt(_0x1538ff(0x189))/0x5*(parseInt(_0x1538ff(0x18d))/0x6)+parseInt(_0x1538ff(0x1a4))/0x7+-parseInt(_0x1538ff(0x18b))/0x8+parseInt(_0x1538ff(0x18c))/0x9*(parseInt(_0x1538ff(0x192))/0xa);if(_0x3e3f14===_0x2e334f)break;else _0x5c4f0e['push'](_0x5c4f0e['shift']());}catch(_0x1af49d){_0x5c4f0e['push'](_0x5c4f0e['shift']());}}}(a31_0xf792,0x69b19));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';function a31_0x3326(_0x2da475,_0x2d4c15){const _0xf7928b=a31_0xf792();return a31_0x3326=function(_0x332698,_0x73832){_0x332698=_0x332698-0x188;let _0x419d92=_0xf7928b[_0x332698];return _0x419d92;},a31_0x3326(_0x2da475,_0x2d4c15);}export class UseCommand extends BaseCommand{[a31_0x540c43(0x19d)]='use';['description']='Set\x20session-level\x20context';['validate'](_0x2309db){const _0x540898=a31_0x540c43,{args:_0x34cde9}=_0x2309db;if(_0x34cde9['length']<0x2)return _0x540898(0x1a6)+'Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a'+_0x540898(0x188)+_0x540898(0x19e);const _0x358178=_0x34cde9[0x0],_0x5e040e=[_0x540898(0x19b),'parent_segment',_0x540898(0x18f),_0x540898(0x1a8)];if(!_0x5e040e[_0x540898(0x1a3)](_0x358178))return _0x540898(0x1a2)+_0x358178+_0x540898(0x18a)+_0x5e040e['join'](',\x20');return undefined;}async['execute'](_0x241145){const _0x2a822c=a31_0x540c43,{args:_0x3e948c,options:_0x143391}=_0x241145;try{const _0x5d6186=_0x3e948c[0x0],_0x21e311=_0x3e948c[0x1];if(_0x5d6186===_0x2a822c(0x1a8)){if(!profileExists(_0x21e311))return console['error'](_0x2a822c(0x194)+_0x21e311+'\x27\x20does\x20not\x20exist'),console[_0x2a822c(0x19f)](_0x2a822c(0x191)),0x1;const _0x35d20f=_0x143391[_0x2a822c(0x18e)]||getCurrentSessionPID()[_0x2a822c(0x19c)]();return saveSessionContext({'profile':_0x21e311},_0x143391[_0x2a822c(0x18e)]),console[_0x2a822c(0x198)](_0x2a822c(0x1a0)+_0x21e311+_0x2a822c(0x1a1)+_0x35d20f+')'),console[_0x2a822c(0x198)](_0x2a822c(0x196)),0x0;}const _0x1deb37={},_0x2a3471=_0x143391[_0x2a822c(0x18e)]||getCurrentSessionPID()[_0x2a822c(0x19c)]();switch(_0x5d6186){case _0x2a822c(0x19b):_0x1deb37[_0x2a822c(0x19b)]=_0x21e311,console[_0x2a822c(0x198)](_0x2a822c(0x199)+_0x21e311+_0x2a822c(0x1a1)+_0x2a3471+')');break;case'parent_segment':_0x1deb37[_0x2a822c(0x197)]=_0x21e311,console[_0x2a822c(0x198)](_0x2a822c(0x193)+_0x21e311+_0x2a822c(0x1a1)+_0x2a3471+')');break;case _0x2a822c(0x18f):_0x1deb37[_0x2a822c(0x18f)]=_0x21e311,console[_0x2a822c(0x198)](_0x2a822c(0x1a7)+_0x21e311+'\x20(session:\x20'+_0x2a3471+')');break;}return saveSessionContext(_0x1deb37,_0x143391[_0x2a822c(0x18e)]),console[_0x2a822c(0x198)](_0x2a822c(0x196)),0x0;}catch(_0x2d7225){return _0x2d7225 instanceof Error&&console[_0x2a822c(0x19f)]('Error:\x20'+_0x2d7225['message']),0x1;}}}
1
+ const a31_0x430654=a31_0x4137;(function(_0x201fee,_0x29d743){const _0x2e0cc5=a31_0x4137,_0x35ab4c=_0x201fee();while(!![]){try{const _0x4eaf1b=-parseInt(_0x2e0cc5(0x118))/0x1*(parseInt(_0x2e0cc5(0xf4))/0x2)+parseInt(_0x2e0cc5(0x10a))/0x3*(-parseInt(_0x2e0cc5(0x101))/0x4)+-parseInt(_0x2e0cc5(0x10b))/0x5+parseInt(_0x2e0cc5(0x100))/0x6*(parseInt(_0x2e0cc5(0xfc))/0x7)+parseInt(_0x2e0cc5(0xff))/0x8+-parseInt(_0x2e0cc5(0xf2))/0x9*(-parseInt(_0x2e0cc5(0x104))/0xa)+parseInt(_0x2e0cc5(0xf6))/0xb*(-parseInt(_0x2e0cc5(0xf7))/0xc);if(_0x4eaf1b===_0x29d743)break;else _0x35ab4c['push'](_0x35ab4c['shift']());}catch(_0x4b609e){_0x35ab4c['push'](_0x35ab4c['shift']());}}}(a31_0x27e5,0x88d4c));function a31_0x27e5(){const _0x2c59d4=['220MsEOfc','135408sMKbAy','includes','session','\x27\x20does\x20not\x20exist','llm_project','3871lcpFcT','validate','message','1066000fdgDMg','2076csAcGK','53752ZeeCxP','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Invalid\x20resource:\x20','2843380ZREPJj','\x20(session:\x20','length','Or\x20use:\x20tdx\x20context\x20--clear\x20to\x20clear\x20session\x20context\x0a','Set\x20session-level\x20context','database','57KTtVpN','70245CRQpXM','\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20database\x20set\x20to:\x20','Session\x20parent_segment\x20set\x20to:\x20','use','execute','error','name','toString','profile','join','parent_segment','.\x20Must\x20be\x20one\x20of:\x20','122091cmfdnm','Error:\x20Profile\x20\x27','log','27jFhgwc','Resources:\x20database,\x20parent_segment,\x20llm_project,\x20profile\x0a','2wjFYIf','description'];a31_0x27e5=function(){return _0x2c59d4;};return a31_0x27e5();}import{BaseCommand}from'./command.js';function a31_0x4137(_0x3cfc90,_0x2a81f7){const _0x27e50c=a31_0x27e5();return a31_0x4137=function(_0x413723,_0x1ddcd3){_0x413723=_0x413723-0xf2;let _0x1af99c=_0x27e50c[_0x413723];return _0x1af99c;},a31_0x4137(_0x3cfc90,_0x2a81f7);}import{saveSessionContext,getCurrentSessionPID}from'../core/session.js';import{profileExists}from'../core/profile.js';export class UseCommand extends BaseCommand{[a31_0x430654(0x112)]=a31_0x430654(0x10f);[a31_0x430654(0xf5)]=a31_0x430654(0x108);[a31_0x430654(0xfd)](_0x2fed6b){const _0x2d6f5d=a31_0x430654,{args:_0xc2bd12}=_0x2fed6b;if(_0xc2bd12[_0x2d6f5d(0x106)]<0x2)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x2d6f5d(0xf3)+_0x2d6f5d(0x107)+_0x2d6f5d(0x102);const _0x7ba71d=_0xc2bd12[0x0],_0x2eec27=['database',_0x2d6f5d(0x116),_0x2d6f5d(0xfb),_0x2d6f5d(0x114)];if(!_0x2eec27[_0x2d6f5d(0xf8)](_0x7ba71d))return _0x2d6f5d(0x103)+_0x7ba71d+_0x2d6f5d(0x117)+_0x2eec27[_0x2d6f5d(0x115)](',\x20');return undefined;}async[a31_0x430654(0x110)](_0x1f4dad){const _0x5e2da1=a31_0x430654,{args:_0x38bbcb,options:_0x2293a5}=_0x1f4dad;try{const _0x2ae545=_0x38bbcb[0x0],_0x27d9ff=_0x38bbcb[0x1];if(_0x2ae545===_0x5e2da1(0x114)){if(!profileExists(_0x27d9ff))return console[_0x5e2da1(0x111)](_0x5e2da1(0x119)+_0x27d9ff+_0x5e2da1(0xfa)),console[_0x5e2da1(0x111)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x3a432e=_0x2293a5[_0x5e2da1(0xf9)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x27d9ff},_0x2293a5['session']),console[_0x5e2da1(0x11a)]('Session\x20profile\x20set\x20to:\x20'+_0x27d9ff+_0x5e2da1(0x105)+_0x3a432e+')'),console[_0x5e2da1(0x11a)](_0x5e2da1(0x10c)),0x0;}const _0x23ffe1={},_0x126c4f=_0x2293a5[_0x5e2da1(0xf9)]||getCurrentSessionPID()[_0x5e2da1(0x113)]();switch(_0x2ae545){case _0x5e2da1(0x109):_0x23ffe1[_0x5e2da1(0x109)]=_0x27d9ff,console[_0x5e2da1(0x11a)](_0x5e2da1(0x10d)+_0x27d9ff+_0x5e2da1(0x105)+_0x126c4f+')');break;case'parent_segment':_0x23ffe1[_0x5e2da1(0x116)]=_0x27d9ff,console[_0x5e2da1(0x11a)](_0x5e2da1(0x10e)+_0x27d9ff+_0x5e2da1(0x105)+_0x126c4f+')');break;case _0x5e2da1(0xfb):_0x23ffe1['llm_project']=_0x27d9ff,console[_0x5e2da1(0x11a)]('Session\x20llm_project\x20set\x20to:\x20'+_0x27d9ff+_0x5e2da1(0x105)+_0x126c4f+')');break;}return saveSessionContext(_0x23ffe1,_0x2293a5[_0x5e2da1(0xf9)]),console[_0x5e2da1(0x11a)]('\x0aTip:\x20Use\x20\x27tdx\x20context\x20--clear\x27\x20to\x20clear\x20session\x20overrides'),0x0;}catch(_0x7c0d16){return _0x7c0d16 instanceof Error&&console['error']('Error:\x20'+_0x7c0d16[_0x5e2da1(0xfe)]),0x1;}}}
@@ -1 +1 @@
1
- const a32_0x48b085=a32_0x4638;(function(_0x4abf6e,_0x1d2eab){const _0x13967a=a32_0x4638,_0x28a626=_0x4abf6e();while(!![]){try{const _0x14865f=parseInt(_0x13967a(0x159))/0x1*(-parseInt(_0x13967a(0x157))/0x2)+parseInt(_0x13967a(0x183))/0x3*(parseInt(_0x13967a(0x164))/0x4)+parseInt(_0x13967a(0x185))/0x5*(-parseInt(_0x13967a(0x19f))/0x6)+parseInt(_0x13967a(0x198))/0x7+parseInt(_0x13967a(0x178))/0x8*(parseInt(_0x13967a(0x16c))/0x9)+-parseInt(_0x13967a(0x16e))/0xa*(-parseInt(_0x13967a(0x1c1))/0xb)+-parseInt(_0x13967a(0x1b3))/0xc;if(_0x14865f===_0x1d2eab)break;else _0x28a626['push'](_0x28a626['shift']());}catch(_0xc6e640){_0x28a626['push'](_0x28a626['shift']());}}}(a32_0x198f,0x24854));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_0x48b085(0x1b9)]=a32_0x48b085(0x1c4);[a32_0x48b085(0x15f)]=a32_0x48b085(0x16d);async[a32_0x48b085(0x1b6)](_0x5441f8){const _0x314165=a32_0x48b085,{options:_0x5acca1,args:_0x27d783,tdx:_0x1c5677}=_0x5441f8,_0x4a6ab7=_0x27d783[0x0];try{_0x5acca1['verbose']&&_0x4a6ab7&&console[_0x314165(0x18f)](_0x314165(0x14c)+_0x4a6ab7);const _0x4c8b9c=await withSpinner(_0x314165(0x1a4),()=>_0x1c5677[_0x314165(0x147)][_0x314165(0x18b)](_0x4a6ab7,{'limit':_0x5acca1[_0x314165(0x19d)]}),{'verbose':_0x5acca1[_0x314165(0x146)]}),_0x283c71=_0x4c8b9c[_0x314165(0x162)];return console['error']('✔\x20Found\x20'+_0x283c71['length']+'\x20project'+(_0x283c71[_0x314165(0x187)]!==0x1?'s':'')),await handleSDKOutput(_0x283c71,_0x5acca1),0x0;}catch(_0x2bcfae){if(_0x2bcfae instanceof SDKError)return console[_0x314165(0x18f)](_0x314165(0x18e)+_0x2bcfae[_0x314165(0x165)]),_0x2bcfae[_0x314165(0x170)]&&console[_0x314165(0x18f)](_0x314165(0x1be)+_0x2bcfae[_0x314165(0x170)]),0x1;throw _0x2bcfae;}}}export class WorkflowWorkflowsCommand extends BaseCommand{['name']=a32_0x48b085(0x17a);[a32_0x48b085(0x15f)]=a32_0x48b085(0x1a0);async['execute'](_0x37f15e){const _0x2b6081=a32_0x48b085,{options:_0x13107a,args:_0x5438e9,tdx:_0x34526a}=_0x37f15e,_0x3f9c84=_0x5438e9[0x0];try{_0x13107a[_0x2b6081(0x146)]&&_0x3f9c84&&console['error'](_0x2b6081(0x1a9)+_0x3f9c84);const _0x3a1a6a=await withSpinner(_0x2b6081(0x1b4),()=>_0x34526a[_0x2b6081(0x147)][_0x2b6081(0x171)](_0x3f9c84,{'limit':_0x13107a['limit']}),{'verbose':_0x13107a[_0x2b6081(0x146)]}),_0x2d4ed2=_0x3a1a6a[_0x2b6081(0x162)];return console[_0x2b6081(0x18f)](_0x2b6081(0x197)+_0x2d4ed2[_0x2b6081(0x187)]+_0x2b6081(0x17b)+(_0x2d4ed2['length']!==0x1?'s':'')),await handleSDKOutput(_0x2d4ed2,_0x13107a),0x0;}catch(_0x2fa1d7){if(_0x2fa1d7 instanceof SDKError)return console['error'](_0x2b6081(0x18e)+_0x2fa1d7[_0x2b6081(0x165)]),_0x2fa1d7['cause']&&console[_0x2b6081(0x18f)](_0x2b6081(0x1be)+_0x2fa1d7['cause']),0x1;throw _0x2fa1d7;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a32_0x48b085(0x17f);['description']=a32_0x48b085(0x179);async[a32_0x48b085(0x1b6)](_0x47a1d0){const _0x3332ec=a32_0x48b085,{options:_0x3c2228,args:_0x35164c,tdx:_0xd6e181}=_0x47a1d0;let _0x29c14a,_0x2fc659;if(_0x35164c[0x0]){const _0x48a907=_0x35164c[0x0][_0x3332ec(0x14a)]('.');if(_0x48a907[_0x3332ec(0x187)]===0x1)_0x29c14a=_0x48a907[0x0];else{if(_0x48a907['length']===0x2)[_0x29c14a,_0x2fc659]=_0x48a907;else return console[_0x3332ec(0x18f)](_0x3332ec(0x1c2)),0x1;}}try{if(_0x3c2228[_0x3332ec(0x146)]){if(_0x29c14a&&_0x2fc659)console[_0x3332ec(0x18f)](_0x3332ec(0x163)+_0x29c14a+'.'+_0x2fc659);else _0x29c14a&&console['error']('Filter:\x20project='+_0x29c14a);const _0xa1d4a8=_0x3c2228[_0x3332ec(0x1ba)];_0xa1d4a8&&console['error'](_0x3332ec(0x1b7)+_0xa1d4a8);}const _0x289175=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0xd6e181['workflow'][_0x3332ec(0x143)]({'projectName':_0x29c14a,'workflowName':_0x2fc659,'status':_0x3c2228[_0x3332ec(0x1ba)],'fromTime':_0x3c2228[_0x3332ec(0x188)],'toTime':_0x3c2228['to'],'limit':_0x3c2228[_0x3332ec(0x19d)]}),{'verbose':_0x3c2228['verbose']}),_0x37dc06=_0x289175[_0x3332ec(0x162)];return console[_0x3332ec(0x18f)](_0x3332ec(0x197)+_0x37dc06[_0x3332ec(0x187)]+_0x3332ec(0x1ab)+(_0x37dc06[_0x3332ec(0x187)]!==0x1?'s':'')),await handleSDKOutput(_0x37dc06,_0x3c2228),0x0;}catch(_0x33d41f){if(_0x33d41f instanceof SDKError)return console[_0x3332ec(0x18f)]('Error:\x20'+_0x33d41f[_0x3332ec(0x165)]),_0x33d41f[_0x3332ec(0x170)]&&console[_0x3332ec(0x18f)](_0x3332ec(0x1be)+_0x33d41f[_0x3332ec(0x170)]),0x1;throw _0x33d41f;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x48b085(0x1b9)]='workflow:attempts';[a32_0x48b085(0x15f)]=a32_0x48b085(0x1a8);async[a32_0x48b085(0x1b6)](_0x4bef0d){const _0x26805c=a32_0x48b085,{options:_0x1a6c44,args:_0x37a093,tdx:_0x3bf59a}=_0x4bef0d;let _0x4bc598,_0x59445b;if(_0x37a093[0x0]){const _0x178740=_0x37a093[0x0][_0x26805c(0x14a)]('.');if(_0x178740[_0x26805c(0x187)]===0x1)_0x4bc598=_0x178740[0x0];else{if(_0x178740[_0x26805c(0x187)]===0x2)[_0x4bc598,_0x59445b]=_0x178740;else return console[_0x26805c(0x18f)](_0x26805c(0x1c2)),0x1;}}try{const _0x4e0ec3=_0x1a6c44[_0x26805c(0x16b)];if(_0x1a6c44[_0x26805c(0x146)]){if(_0x4bc598&&_0x59445b)console[_0x26805c(0x18f)]('Filter:\x20'+_0x4bc598+'.'+_0x59445b);else _0x4bc598&&console[_0x26805c(0x18f)](_0x26805c(0x1af)+_0x4bc598);_0x4e0ec3&&console[_0x26805c(0x18f)]('Include\x20retried:\x20yes');}const _0x2be702=await withSpinner(_0x26805c(0x172),()=>_0x3bf59a[_0x26805c(0x147)]['attempts']({'projectName':_0x4bc598,'workflowName':_0x59445b,'includeRetried':_0x4e0ec3,'limit':_0x1a6c44[_0x26805c(0x19d)]}),{'verbose':_0x1a6c44[_0x26805c(0x146)]}),_0x37f78d=_0x2be702[_0x26805c(0x162)];return console[_0x26805c(0x18f)]('✔\x20Found\x20'+_0x37f78d['length']+_0x26805c(0x181)+(_0x37f78d[_0x26805c(0x187)]!==0x1?'s':'')),await handleSDKOutput(_0x37f78d,_0x1a6c44),0x0;}catch(_0x9c793c){if(_0x9c793c instanceof SDKError)return console[_0x26805c(0x18f)]('Error:\x20'+_0x9c793c['message']),_0x9c793c[_0x26805c(0x170)]&&console[_0x26805c(0x18f)](_0x26805c(0x1be)+_0x9c793c[_0x26805c(0x170)]),0x1;throw _0x9c793c;}}}export class WorkflowAttemptCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x15e);['description']=a32_0x48b085(0x1b8);async['execute'](_0x3034fa){const _0x5023c3=a32_0x48b085,{options:_0x497124,args:_0x1cd100,tdx:_0x213b14}=_0x3034fa,_0x7a6042=_0x1cd100[0x0];if(!_0x7a6042)return console[_0x5023c3(0x18f)](_0x5023c3(0x199)),0x1;try{_0x497124[_0x5023c3(0x146)]&&console[_0x5023c3(0x18f)]('Attempt\x20ID:\x20'+_0x7a6042);const _0x2e440f=await withSpinner(_0x5023c3(0x1c0),()=>_0x213b14['workflow'][_0x5023c3(0x175)](_0x7a6042),{'verbose':_0x497124[_0x5023c3(0x146)]}),_0x553359=_0x2e440f[_0x5023c3(0x162)];return await handleSDKOutput([_0x553359],_0x497124),0x0;}catch(_0x272712){if(_0x272712 instanceof SDKError)return console[_0x5023c3(0x18f)](_0x5023c3(0x18e)+_0x272712[_0x5023c3(0x165)]),_0x272712[_0x5023c3(0x170)]&&console[_0x5023c3(0x18f)](_0x5023c3(0x1be)+_0x272712[_0x5023c3(0x170)]),0x1;throw _0x272712;}}}export class WorkflowTasksCommand extends BaseCommand{[a32_0x48b085(0x1b9)]='workflow:tasks';['description']=a32_0x48b085(0x169);async[a32_0x48b085(0x1b6)](_0x303da){const _0x37cd72=a32_0x48b085,{options:_0x1810fe,args:_0x1c234d,tdx:_0x563b67}=_0x303da,_0x1910ea=_0x1c234d[0x0];if(!_0x1910ea)return console[_0x37cd72(0x18f)](_0x37cd72(0x199)),0x1;try{const _0x2dc2ed=_0x1810fe[_0x37cd72(0x19e)];_0x1810fe['verbose']&&(console[_0x37cd72(0x18f)](_0x37cd72(0x180)+_0x1910ea),_0x2dc2ed&&console[_0x37cd72(0x18f)](_0x37cd72(0x16f)));const _0x28a849=await withSpinner(_0x37cd72(0x156),()=>_0x563b67['workflow'][_0x37cd72(0x193)](_0x1910ea,_0x2dc2ed||![]),{'verbose':_0x1810fe[_0x37cd72(0x146)]}),_0x7ae422=_0x28a849[_0x37cd72(0x162)];return console[_0x37cd72(0x18f)](_0x37cd72(0x197)+_0x7ae422['length']+_0x37cd72(0x18c)+(_0x7ae422[_0x37cd72(0x187)]!==0x1?'s':'')),await handleSDKOutput(_0x7ae422,_0x1810fe),0x0;}catch(_0x230ae1){if(_0x230ae1 instanceof SDKError)return console['error'](_0x37cd72(0x18e)+_0x230ae1[_0x37cd72(0x165)]),_0x230ae1['cause']&&console[_0x37cd72(0x18f)](_0x37cd72(0x1be)+_0x230ae1[_0x37cd72(0x170)]),0x1;throw _0x230ae1;}}}export class WorkflowLogsCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x1bf);[a32_0x48b085(0x15f)]=a32_0x48b085(0x1ac);async['execute'](_0x42be70){const _0x48ca37=a32_0x48b085,{options:_0xa8499d,args:_0x5e422d,tdx:_0x3cf004}=_0x42be70,_0x536981=_0x5e422d[0x0],_0x1b5e64=_0x5e422d[0x1];if(!_0x536981||!_0x1b5e64)return console['error'](_0x48ca37(0x1a7)),0x1;try{_0xa8499d[_0x48ca37(0x146)]&&(console[_0x48ca37(0x18f)](_0x48ca37(0x180)+_0x536981),console[_0x48ca37(0x18f)]('Task\x20name:\x20'+_0x1b5e64));const _0x5ee59b=_0xa8499d[_0x48ca37(0x152)],_0x2b7395=await withSpinner(_0x48ca37(0x1b5),()=>_0x3cf004[_0x48ca37(0x147)]['logs'](_0x536981,_0x1b5e64,{'offset':_0x5ee59b,'limit':_0xa8499d[_0x48ca37(0x19d)]}),{'verbose':_0xa8499d[_0x48ca37(0x146)]}),_0x15f458=_0x2b7395['data'];return console[_0x48ca37(0x18f)](_0x48ca37(0x197)+_0x15f458[_0x48ca37(0x187)]+_0x48ca37(0x1a2)+(_0x15f458[_0x48ca37(0x187)]!==0x1?'ies':'y')),await handleSDKOutput(_0x15f458,_0xa8499d),0x0;}catch(_0x3bfe31){if(_0x3bfe31 instanceof SDKError)return console[_0x48ca37(0x18f)](_0x48ca37(0x18e)+_0x3bfe31[_0x48ca37(0x165)]),_0x3bfe31[_0x48ca37(0x170)]&&console[_0x48ca37(0x18f)](_0x48ca37(0x1be)+_0x3bfe31[_0x48ca37(0x170)]),0x1;throw _0x3bfe31;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x1b2);[a32_0x48b085(0x15f)]=a32_0x48b085(0x173);async[a32_0x48b085(0x1b6)](_0x1bdf07){const _0x5a9412=a32_0x48b085,{options:_0x481118,args:_0xe80fc6,tdx:_0x2ef98e}=_0x1bdf07,_0x449b17=_0xe80fc6[0x0];if(!_0x449b17)return console[_0x5a9412(0x18f)](_0x5a9412(0x199)),0x1;try{const _0x108e2f=_0x481118[_0x5a9412(0x168)];_0x481118['verbose']&&(console['error'](_0x5a9412(0x180)+_0x449b17),_0x108e2f&&console[_0x5a9412(0x18f)]('Reason:\x20'+_0x108e2f));if(!_0x481118['yes']){const _0x5080b5=await confirm(_0x5a9412(0x145)+_0x449b17+'?');if(!_0x5080b5)return console[_0x5a9412(0x18f)](_0x5a9412(0x1b1)),0x0;}const _0x30e8d8=await withSpinner(_0x5a9412(0x15c),()=>_0x2ef98e[_0x5a9412(0x147)][_0x5a9412(0x1bc)](_0x449b17,_0x108e2f),{'verbose':_0x481118[_0x5a9412(0x146)]}),_0x48832e=_0x30e8d8[_0x5a9412(0x162)];return console['error']('✔\x20'+_0x48832e),0x0;}catch(_0x3032a7){if(_0x3032a7 instanceof SDKError)return console['error'](_0x5a9412(0x18e)+_0x3032a7[_0x5a9412(0x165)]),_0x3032a7[_0x5a9412(0x170)]&&console[_0x5a9412(0x18f)](_0x5a9412(0x1be)+_0x3032a7[_0x5a9412(0x170)]),0x1;throw _0x3032a7;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x158);['description']=a32_0x48b085(0x144);async[a32_0x48b085(0x1b6)](_0x49fca8){const _0x5a5591=a32_0x48b085,{options:_0x3eb537,args:_0x156669,tdx:_0xd35479}=_0x49fca8,_0xce899=_0x156669[0x0];if(!_0xce899)return console[_0x5a5591(0x18f)](_0x5a5591(0x167)),console['error'](_0x5a5591(0x1aa)),0x1;let _0x194962=![],_0x580c55=_0xce899;if(_0xce899[_0x5a5591(0x150)](_0x5a5591(0x186)))_0x194962=!![],_0x580c55=_0xce899[_0x5a5591(0x195)](0x8);else{if(_0xce899['startsWith']('attempt:'))_0x194962=![],_0x580c55=_0xce899[_0x5a5591(0x195)](0x8);else return console[_0x5a5591(0x18f)]('Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22'),console['error'](_0x5a5591(0x1aa)),0x1;}try{const _0x42ac1a=_0x3eb537['fromTask'],_0x2b4da9=_0x3eb537['resumeFrom'],_0x1cef0b=_0x3eb537[_0x5a5591(0x177)],_0x32bef1=_0x3eb537['force'];_0x3eb537[_0x5a5591(0x146)]&&(console[_0x5a5591(0x18f)]('Target:\x20'+(_0x194962?'session':_0x5a5591(0x175))+'\x20'+_0x580c55),_0x42ac1a&&console['error']('From\x20task:\x20'+_0x42ac1a),_0x2b4da9&&console[_0x5a5591(0x18f)]('Resume\x20from:\x20'+_0x2b4da9),_0x1cef0b&&console[_0x5a5591(0x18f)](_0x5a5591(0x18a)+_0x1cef0b),_0x32bef1&&console[_0x5a5591(0x18f)](_0x5a5591(0x15d)));let _0x5bbd22;if(_0x1cef0b)try{if(_0x1cef0b['startsWith']('@')){const _0x5dbaf4=await import(_0x5a5591(0x149)),_0x546fbb=_0x1cef0b[_0x5a5591(0x195)](0x1),_0x55594b=await _0x5dbaf4[_0x5a5591(0x18d)](_0x546fbb,'utf-8');_0x5bbd22=JSON[_0x5a5591(0x191)](_0x55594b);}else _0x5bbd22=JSON['parse'](_0x1cef0b);}catch{return console[_0x5a5591(0x18f)](_0x5a5591(0x184)),0x1;}if(!_0x3eb537[_0x5a5591(0x1a6)]){const _0x345549=await confirm(_0x5a5591(0x17d)+(_0x194962?_0x5a5591(0x14d):_0x5a5591(0x175))+'\x20'+_0x580c55+'?');if(!_0x345549)return console[_0x5a5591(0x18f)](_0x5a5591(0x1b1)),0x0;}let _0x442daa;_0x194962?_0x442daa=await withSpinner(_0x5a5591(0x1c3),()=>_0xd35479['workflow']['retrySession'](_0x580c55,{'fromTask':_0x42ac1a,'retryParams':_0x5bbd22}),{'verbose':_0x3eb537['verbose']}):_0x442daa=await withSpinner(_0x5a5591(0x166),()=>_0xd35479['workflow'][_0x5a5591(0x17e)](_0x580c55,{'resumeFrom':_0x2b4da9,'retryParams':_0x5bbd22,'force':_0x32bef1}),{'verbose':_0x3eb537['verbose']});const _0x55f2a1=_0x442daa[_0x5a5591(0x162)];return console[_0x5a5591(0x18f)](_0x5a5591(0x161)),console[_0x5a5591(0x18f)](_0x5a5591(0x19b)+_0x55f2a1[_0x5a5591(0x19c)]),console['error'](_0x5a5591(0x15a)+_0x55f2a1[_0x5a5591(0x190)]),0x0;}catch(_0x3f5c13){if(_0x3f5c13 instanceof SDKError)return console[_0x5a5591(0x18f)](_0x5a5591(0x18e)+_0x3f5c13[_0x5a5591(0x165)]),_0x3f5c13[_0x5a5591(0x170)]&&console['error'](_0x5a5591(0x1be)+_0x3f5c13['cause']),0x1;throw _0x3f5c13;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x196);[a32_0x48b085(0x15f)]=a32_0x48b085(0x14e);async['execute'](_0x4bc222){const _0x11efc1=a32_0x48b085,{options:_0x3d1b21,args:_0x48403b,tdx:_0x2b3db7}=_0x4bc222,_0x419a96=_0x48403b[0x0],_0x2dece9=_0x48403b[0x1]||'.';if(!_0x419a96)return console[_0x11efc1(0x18f)](_0x11efc1(0x151)),console[_0x11efc1(0x18f)](_0x11efc1(0x1a5)),0x1;const _0x46b602=_0x3d1b21[_0x11efc1(0x1ad)];_0x3d1b21[_0x11efc1(0x146)]&&(console[_0x11efc1(0x18f)](_0x11efc1(0x160)+_0x419a96),console[_0x11efc1(0x18f)]('Output\x20directory:\x20'+_0x2dece9),_0x46b602&&console[_0x11efc1(0x18f)](_0x11efc1(0x148)+_0x46b602));const _0x4a3832=await withSpinner(_0x11efc1(0x192)+_0x419a96+_0x11efc1(0x1bb),()=>_0x2b3db7['workflow']['download'](_0x419a96,_0x2dece9,{'revision':_0x46b602}),{'verbose':_0x3d1b21[_0x11efc1(0x146)]}),_0x519941=_0x4a3832[_0x11efc1(0x162)];return console[_0x11efc1(0x18f)](_0x11efc1(0x176)+_0x519941[_0x11efc1(0x14b)]),console['error']('\x20\x20Revision:\x20'+_0x519941[_0x11efc1(0x1ad)]),console[_0x11efc1(0x18f)](_0x11efc1(0x1bd)+_0x519941['filesExtracted']),console[_0x11efc1(0x18f)](_0x11efc1(0x1b0)+_0x2dece9+'/'+_0x519941[_0x11efc1(0x14b)]),0x0;}}export class WorkflowPushCommand extends BaseCommand{['name']='workflow:push';[a32_0x48b085(0x15f)]='Push\x20workflow\x20project\x20to\x20Treasure\x20Data';async[a32_0x48b085(0x1b6)](_0x239edc){const _0xb0d47b=a32_0x48b085,{options:_0x3d574e,args:_0x1eddf2,tdx:_0x2b33f7}=_0x239edc;let _0x6705c0='.',_0x5eb999=_0x3d574e[_0xb0d47b(0x1b9)];if(_0x1eddf2[0x0]){const {promises:_0xc4700}=await import('fs');try{const _0x3dac8c=await _0xc4700[_0xb0d47b(0x194)](_0x1eddf2[0x0]);if(_0x3dac8c['isDirectory']())_0x6705c0=_0x1eddf2[0x0];else return console[_0xb0d47b(0x18f)]('Error:\x20'+_0x1eddf2[0x0]+_0xb0d47b(0x15b)),0x1;}catch{_0x5eb999=_0x1eddf2[0x0],_0x6705c0='.';}}const _0x454a79=_0x3d574e[_0xb0d47b(0x1ad)],_0x7ba08b=_0x3d574e['skipValidation'];_0x3d574e[_0xb0d47b(0x146)]&&(console['error'](_0xb0d47b(0x17c)+_0x6705c0),_0x5eb999&&console[_0xb0d47b(0x18f)](_0xb0d47b(0x19a)+_0x5eb999),_0x454a79&&console[_0xb0d47b(0x18f)]('Revision:\x20'+_0x454a79),_0x7ba08b&&console[_0xb0d47b(0x18f)](_0xb0d47b(0x1a3)));const _0x577f17=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x2b33f7[_0xb0d47b(0x147)][_0xb0d47b(0x182)](_0x6705c0,{'projectName':_0x5eb999,'revision':_0x454a79,'skipValidation':_0x7ba08b}),{'verbose':_0x3d574e['verbose']}),_0x50612d=_0x577f17['data'];return console['error'](_0xb0d47b(0x14f)+_0x50612d[_0xb0d47b(0x14b)]),console[_0xb0d47b(0x18f)]('\x20\x20Project\x20ID:\x20'+_0x50612d[_0xb0d47b(0x189)]),console['error'](_0xb0d47b(0x154)+_0x50612d[_0xb0d47b(0x1ad)]),0x0;}}function a32_0x4638(_0x12f92c,_0x3e9b67){const _0x198fb4=a32_0x198f();return a32_0x4638=function(_0x46386d,_0x55cbf2){_0x46386d=_0x46386d-0x143;let _0xe3a579=_0x198fb4[_0x46386d];return _0xe3a579;},a32_0x4638(_0x12f92c,_0x3e9b67);}function a32_0x198f(){const _0x163e20=['List\x20workflows','delete','\x20log\x20entr','Validation:\x20skipped','Listing\x20workflow\x20projects...','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','yes','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','List\x20workflow\x20attempts','Project\x20filter:\x20','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','\x20session','Show\x20logs\x20for\x20a\x20specific\x20task','revision','Usage:\x20workflow:delete\x20<project-name-or-id>','Filter:\x20project=','\x20\x20Location:\x20','Cancelled','workflow:kill','300528CgrAhK','Listing\x20workflows...','Getting\x20task\x20logs...','execute','Status:\x20','Show\x20specific\x20attempt\x20details','name','status','...','kill','\x20\x20Files\x20extracted:\x20','\x20\x20Cause:\x20','workflow:logs','Getting\x20attempt\x20details...','110FoJOlN','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','Retrying\x20session...','workflow:projects','sessions','Retry\x20a\x20session\x20or\x20attempt','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','verbose','workflow','Revision:\x20','fs/promises','split','projectName','Pattern:\x20','session','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','✔\x20Pushed\x20','startsWith','Error:\x20Project\x20name\x20is\x20required','offset','\x22?\x20This\x20cannot\x20be\x20undone.','\x20\x20Revision:\x20','Deleting\x20project\x20','Getting\x20attempt\x20tasks...','10IdHCyU','workflow:retry','31011ihFyEr','\x20\x20Session\x20ID:\x20','\x20is\x20not\x20a\x20directory','Killing\x20attempt...','Force:\x20yes','workflow:attempt','description','Project:\x20','✔\x20Retry\x20started','data','Filter:\x20','44700WMUbsl','message','Retrying\x20attempt...','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','reason','Show\x20tasks\x20for\x20an\x20attempt','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','includeRetried','18558pQkslr','List\x20all\x20workflow\x20projects','103160VRJXAv','Including\x20subtasks:\x20yes','cause','workflows','Listing\x20workflow\x20attempts...','Kill\x20a\x20running\x20attempt','workflow:delete','attempt','✔\x20Downloaded\x20','params','128xCoSMl','List\x20workflow\x20execution\x20sessions','workflow:workflows','\x20workflow','Project\x20directory:\x20','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','retryAttempt','workflow:sessions','Attempt\x20ID:\x20','\x20attempt','push','57jmmlkh','Error:\x20Invalid\x20JSON\x20in\x20--params','4255AuqmIw','session:','length','from','projectId','Params:\x20','projects','\x20task','readFile','Error:\x20','error','sessionId','parse','Downloading\x20project\x20','tasks','stat','substring','workflow:download','✔\x20Found\x20','219933MBBdUj','Error:\x20Attempt\x20ID\x20is\x20required','Project\x20name:\x20','\x20\x20New\x20attempt\x20ID:\x20','attemptId','limit','includeSubtasks','354jEoRrL'];a32_0x198f=function(){return _0x163e20;};return a32_0x198f();}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x48b085(0x1b9)]=a32_0x48b085(0x174);[a32_0x48b085(0x15f)]='Delete\x20workflow\x20project\x20from\x20Treasure\x20Data';async['execute'](_0x47a198){const _0x1dec1d=a32_0x48b085,{options:_0x3dd8cc,args:_0x58f67e,tdx:_0x3be1b3}=_0x47a198,_0x55cc99=_0x58f67e[0x0];if(!_0x55cc99)return console[_0x1dec1d(0x18f)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console[_0x1dec1d(0x18f)](_0x1dec1d(0x1ae)),0x1;_0x3dd8cc[_0x1dec1d(0x146)]&&console[_0x1dec1d(0x18f)](_0x1dec1d(0x160)+_0x55cc99);if(!_0x3dd8cc[_0x1dec1d(0x1a6)]){const _0x1aa1e7=await confirm(_0x1dec1d(0x16a)+_0x55cc99+_0x1dec1d(0x153));if(!_0x1aa1e7)return console[_0x1dec1d(0x18f)](_0x1dec1d(0x1b1)),0x0;}const _0x4145b0=await withSpinner(_0x1dec1d(0x155)+_0x55cc99+_0x1dec1d(0x1bb),()=>_0x3be1b3[_0x1dec1d(0x147)][_0x1dec1d(0x1a1)](_0x55cc99),{'verbose':_0x3dd8cc[_0x1dec1d(0x146)]}),_0x2508db=_0x4145b0[_0x1dec1d(0x162)];return console[_0x1dec1d(0x18f)]('✔\x20Deleted\x20project\x20'+_0x2508db[_0x1dec1d(0x14b)]),console[_0x1dec1d(0x18f)]('\x20\x20Project\x20ID:\x20'+_0x2508db[_0x1dec1d(0x189)]),0x0;}}
1
+ const a32_0x14d260=a32_0x32ca;(function(_0x35ec07,_0x4d78f3){const _0x37bd01=a32_0x32ca,_0x34d2f7=_0x35ec07();while(!![]){try{const _0xeb9b37=-parseInt(_0x37bd01(0x14b))/0x1+parseInt(_0x37bd01(0x16c))/0x2*(parseInt(_0x37bd01(0x13e))/0x3)+-parseInt(_0x37bd01(0x15c))/0x4*(-parseInt(_0x37bd01(0x19a))/0x5)+-parseInt(_0x37bd01(0x142))/0x6*(parseInt(_0x37bd01(0x16f))/0x7)+-parseInt(_0x37bd01(0x137))/0x8*(-parseInt(_0x37bd01(0x175))/0x9)+parseInt(_0x37bd01(0x19f))/0xa+-parseInt(_0x37bd01(0x13a))/0xb;if(_0xeb9b37===_0x4d78f3)break;else _0x34d2f7['push'](_0x34d2f7['shift']());}catch(_0x455f42){_0x34d2f7['push'](_0x34d2f7['shift']());}}}(a32_0x6a51,0x6a478));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_0x14d260(0x16d)]=a32_0x14d260(0x169);['description']=a32_0x14d260(0x12f);async['execute'](_0x22ce32){const _0x1b266b=a32_0x14d260,{options:_0xce4c2d,args:_0x2db416,tdx:_0x22db2d}=_0x22ce32,_0x49f073=_0x2db416[0x0];try{_0xce4c2d[_0x1b266b(0x1a0)]&&_0x49f073&&console['error'](_0x1b266b(0x157)+_0x49f073);const _0x46e4d0=await withSpinner(_0x1b266b(0x13c),()=>_0x22db2d[_0x1b266b(0x159)][_0x1b266b(0x14c)](_0x49f073,{'limit':_0xce4c2d[_0x1b266b(0x16b)]}),{'verbose':_0xce4c2d['verbose']}),_0x12d801=_0x46e4d0['data'];return console['error'](_0x1b266b(0x16a)+_0x12d801[_0x1b266b(0x15a)]+_0x1b266b(0x132)+(_0x12d801[_0x1b266b(0x15a)]!==0x1?'s':'')),await handleSDKOutput(_0x12d801,_0xce4c2d),0x0;}catch(_0x2ee2ff){if(_0x2ee2ff instanceof SDKError)return console[_0x1b266b(0x14d)]('Error:\x20'+_0x2ee2ff[_0x1b266b(0x15f)]),_0x2ee2ff[_0x1b266b(0x17d)]&&console['error']('\x20\x20Cause:\x20'+_0x2ee2ff[_0x1b266b(0x17d)]),0x1;throw _0x2ee2ff;}}}export class WorkflowWorkflowsCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x165);[a32_0x14d260(0x181)]='List\x20workflows';async[a32_0x14d260(0x12a)](_0x34d7dd){const _0x1a8121=a32_0x14d260,{options:_0x492870,args:_0x176897,tdx:_0x2e2220}=_0x34d7dd,_0x5ebdd1=_0x176897[0x0];try{_0x492870['verbose']&&_0x5ebdd1&&console[_0x1a8121(0x14d)](_0x1a8121(0x122)+_0x5ebdd1);const _0x569a10=await withSpinner('Listing\x20workflows...',()=>_0x2e2220[_0x1a8121(0x159)][_0x1a8121(0x172)](_0x5ebdd1,{'limit':_0x492870[_0x1a8121(0x16b)]}),{'verbose':_0x492870[_0x1a8121(0x1a0)]}),_0x515736=_0x569a10['data'];return console[_0x1a8121(0x14d)](_0x1a8121(0x16a)+_0x515736[_0x1a8121(0x15a)]+'\x20workflow'+(_0x515736[_0x1a8121(0x15a)]!==0x1?'s':'')),await handleSDKOutput(_0x515736,_0x492870),0x0;}catch(_0x5dd5eb){if(_0x5dd5eb instanceof SDKError)return console[_0x1a8121(0x14d)](_0x1a8121(0x156)+_0x5dd5eb['message']),_0x5dd5eb[_0x1a8121(0x17d)]&&console['error'](_0x1a8121(0x151)+_0x5dd5eb[_0x1a8121(0x17d)]),0x1;throw _0x5dd5eb;}}}export class WorkflowSessionsCommand extends BaseCommand{['name']=a32_0x14d260(0x124);[a32_0x14d260(0x181)]=a32_0x14d260(0x191);async[a32_0x14d260(0x12a)](_0x19b622){const _0x1bf468=a32_0x14d260,{options:_0x4f0522,args:_0x354e17,tdx:_0x11cdb4}=_0x19b622;let _0x10efbf,_0x387a1a;if(_0x354e17[0x0]){const _0x59da9d=_0x354e17[0x0][_0x1bf468(0x160)]('.');if(_0x59da9d['length']===0x1)_0x10efbf=_0x59da9d[0x0];else{if(_0x59da9d['length']===0x2)[_0x10efbf,_0x387a1a]=_0x59da9d;else return console[_0x1bf468(0x14d)](_0x1bf468(0x188)),0x1;}}try{if(_0x4f0522[_0x1bf468(0x1a0)]){if(_0x10efbf&&_0x387a1a)console[_0x1bf468(0x14d)]('Filter:\x20'+_0x10efbf+'.'+_0x387a1a);else _0x10efbf&&console[_0x1bf468(0x14d)]('Filter:\x20project='+_0x10efbf);const _0x142efd=_0x4f0522[_0x1bf468(0x182)];_0x142efd&&console[_0x1bf468(0x14d)]('Status:\x20'+_0x142efd);}const _0x481574=await withSpinner('Listing\x20workflow\x20sessions...',()=>_0x11cdb4[_0x1bf468(0x159)][_0x1bf468(0x141)]({'projectName':_0x10efbf,'workflowName':_0x387a1a,'status':_0x4f0522['status'],'fromTime':_0x4f0522[_0x1bf468(0x12b)],'toTime':_0x4f0522['to'],'limit':_0x4f0522['limit']}),{'verbose':_0x4f0522[_0x1bf468(0x1a0)]}),_0x5f4356=_0x481574[_0x1bf468(0x17e)];return console[_0x1bf468(0x14d)]('✔\x20Found\x20'+_0x5f4356['length']+_0x1bf468(0x121)+(_0x5f4356[_0x1bf468(0x15a)]!==0x1?'s':'')),await handleSDKOutput(_0x5f4356,_0x4f0522),0x0;}catch(_0x46bd83){if(_0x46bd83 instanceof SDKError)return console[_0x1bf468(0x14d)](_0x1bf468(0x156)+_0x46bd83['message']),_0x46bd83[_0x1bf468(0x17d)]&&console[_0x1bf468(0x14d)](_0x1bf468(0x151)+_0x46bd83[_0x1bf468(0x17d)]),0x1;throw _0x46bd83;}}}export class WorkflowAttemptsCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x127);['description']=a32_0x14d260(0x152);async[a32_0x14d260(0x12a)](_0x288c6d){const _0x35ce4f=a32_0x14d260,{options:_0x2c999f,args:_0x51433e,tdx:_0x4ea555}=_0x288c6d;let _0x4862f4,_0x2c7093;if(_0x51433e[0x0]){const _0x2f4e61=_0x51433e[0x0][_0x35ce4f(0x160)]('.');if(_0x2f4e61['length']===0x1)_0x4862f4=_0x2f4e61[0x0];else{if(_0x2f4e61[_0x35ce4f(0x15a)]===0x2)[_0x4862f4,_0x2c7093]=_0x2f4e61;else return console[_0x35ce4f(0x14d)](_0x35ce4f(0x188)),0x1;}}try{const _0x23ca76=_0x2c999f['includeRetried'];if(_0x2c999f[_0x35ce4f(0x1a0)]){if(_0x4862f4&&_0x2c7093)console[_0x35ce4f(0x14d)](_0x35ce4f(0x199)+_0x4862f4+'.'+_0x2c7093);else _0x4862f4&&console[_0x35ce4f(0x14d)](_0x35ce4f(0x177)+_0x4862f4);_0x23ca76&&console['error'](_0x35ce4f(0x11f));}const _0x50420c=await withSpinner(_0x35ce4f(0x13d),()=>_0x4ea555[_0x35ce4f(0x159)]['attempts']({'projectName':_0x4862f4,'workflowName':_0x2c7093,'includeRetried':_0x23ca76,'limit':_0x2c999f[_0x35ce4f(0x16b)]}),{'verbose':_0x2c999f[_0x35ce4f(0x1a0)]}),_0x330a7b=_0x50420c[_0x35ce4f(0x17e)];return console[_0x35ce4f(0x14d)](_0x35ce4f(0x16a)+_0x330a7b[_0x35ce4f(0x15a)]+_0x35ce4f(0x144)+(_0x330a7b[_0x35ce4f(0x15a)]!==0x1?'s':'')),await handleSDKOutput(_0x330a7b,_0x2c999f),0x0;}catch(_0x1668f2){if(_0x1668f2 instanceof SDKError)return console[_0x35ce4f(0x14d)](_0x35ce4f(0x156)+_0x1668f2[_0x35ce4f(0x15f)]),_0x1668f2[_0x35ce4f(0x17d)]&&console[_0x35ce4f(0x14d)](_0x35ce4f(0x151)+_0x1668f2[_0x35ce4f(0x17d)]),0x1;throw _0x1668f2;}}}export class WorkflowAttemptCommand extends BaseCommand{['name']='workflow:attempt';[a32_0x14d260(0x181)]=a32_0x14d260(0x1a5);async['execute'](_0x2d29eb){const _0x8e834b=a32_0x14d260,{options:_0x2ae73c,args:_0x32ecee,tdx:_0x30b04d}=_0x2d29eb,_0x12b0d1=_0x32ecee[0x0];if(!_0x12b0d1)return console['error'](_0x8e834b(0x179)),0x1;try{_0x2ae73c[_0x8e834b(0x1a0)]&&console['error'](_0x8e834b(0x174)+_0x12b0d1);const _0x2a0fb0=await withSpinner(_0x8e834b(0x161),()=>_0x30b04d[_0x8e834b(0x159)][_0x8e834b(0x129)](_0x12b0d1),{'verbose':_0x2ae73c[_0x8e834b(0x1a0)]}),_0xca79e8=_0x2a0fb0[_0x8e834b(0x17e)];return await handleSDKOutput([_0xca79e8],_0x2ae73c),0x0;}catch(_0x1d12b1){if(_0x1d12b1 instanceof SDKError)return console['error'](_0x8e834b(0x156)+_0x1d12b1[_0x8e834b(0x15f)]),_0x1d12b1[_0x8e834b(0x17d)]&&console[_0x8e834b(0x14d)](_0x8e834b(0x151)+_0x1d12b1['cause']),0x1;throw _0x1d12b1;}}}function a32_0x32ca(_0x2b498f,_0x4d0ceb){const _0x6a51b=a32_0x6a51();return a32_0x32ca=function(_0x32cab1,_0x514cd7){_0x32cab1=_0x32cab1-0x11d;let _0x4b469b=_0x6a51b[_0x32cab1];return _0x4b469b;},a32_0x32ca(_0x2b498f,_0x4d0ceb);}export class WorkflowTasksCommand extends BaseCommand{['name']=a32_0x14d260(0x153);[a32_0x14d260(0x181)]=a32_0x14d260(0x15d);async[a32_0x14d260(0x12a)](_0x519810){const _0x31d28a=a32_0x14d260,{options:_0x1bf5c0,args:_0x39edfe,tdx:_0x442e56}=_0x519810,_0x2163c4=_0x39edfe[0x0];if(!_0x2163c4)return console[_0x31d28a(0x14d)](_0x31d28a(0x179)),0x1;try{const _0x28865a=_0x1bf5c0['includeSubtasks'];_0x1bf5c0[_0x31d28a(0x1a0)]&&(console[_0x31d28a(0x14d)](_0x31d28a(0x174)+_0x2163c4),_0x28865a&&console['error']('Including\x20subtasks:\x20yes'));const _0x26ed70=await withSpinner(_0x31d28a(0x14e),()=>_0x442e56['workflow']['tasks'](_0x2163c4,_0x28865a||![]),{'verbose':_0x1bf5c0[_0x31d28a(0x1a0)]}),_0x454583=_0x26ed70[_0x31d28a(0x17e)];return console['error'](_0x31d28a(0x16a)+_0x454583['length']+_0x31d28a(0x1a6)+(_0x454583['length']!==0x1?'s':'')),await handleSDKOutput(_0x454583,_0x1bf5c0),0x0;}catch(_0x461377){if(_0x461377 instanceof SDKError)return console['error'](_0x31d28a(0x156)+_0x461377[_0x31d28a(0x15f)]),_0x461377[_0x31d28a(0x17d)]&&console['error'](_0x31d28a(0x151)+_0x461377[_0x31d28a(0x17d)]),0x1;throw _0x461377;}}}export class WorkflowLogsCommand extends BaseCommand{['name']=a32_0x14d260(0x135);['description']=a32_0x14d260(0x171);async['execute'](_0x190865){const _0x2ccacd=a32_0x14d260,{options:_0x200c1f,args:_0x1e31e5,tdx:_0x438c91}=_0x190865,_0x36e806=_0x1e31e5[0x0],_0x5ce958=_0x1e31e5[0x1];if(!_0x36e806||!_0x5ce958)return console[_0x2ccacd(0x14d)](_0x2ccacd(0x18b)),0x1;try{_0x200c1f[_0x2ccacd(0x1a0)]&&(console[_0x2ccacd(0x14d)]('Attempt\x20ID:\x20'+_0x36e806),console[_0x2ccacd(0x14d)](_0x2ccacd(0x187)+_0x5ce958));const _0x1acfcd=_0x200c1f[_0x2ccacd(0x148)],_0x55d894=await withSpinner(_0x2ccacd(0x180),()=>_0x438c91['workflow'][_0x2ccacd(0x178)](_0x36e806,_0x5ce958,{'offset':_0x1acfcd,'limit':_0x200c1f[_0x2ccacd(0x16b)]}),{'verbose':_0x200c1f['verbose']}),_0x100278=_0x55d894[_0x2ccacd(0x17e)];return console[_0x2ccacd(0x14d)](_0x2ccacd(0x16a)+_0x100278[_0x2ccacd(0x15a)]+_0x2ccacd(0x18d)+(_0x100278['length']!==0x1?_0x2ccacd(0x173):'y')),await handleSDKOutput(_0x100278,_0x200c1f),0x0;}catch(_0x48a79d){if(_0x48a79d instanceof SDKError)return console[_0x2ccacd(0x14d)]('Error:\x20'+_0x48a79d[_0x2ccacd(0x15f)]),_0x48a79d[_0x2ccacd(0x17d)]&&console[_0x2ccacd(0x14d)](_0x2ccacd(0x151)+_0x48a79d['cause']),0x1;throw _0x48a79d;}}}export class WorkflowKillCommand extends BaseCommand{[a32_0x14d260(0x16d)]='workflow:kill';['description']=a32_0x14d260(0x1a2);async[a32_0x14d260(0x12a)](_0x4f674c){const _0x550f67=a32_0x14d260,{options:_0x549541,args:_0x5c770e,tdx:_0x164ddd}=_0x4f674c,_0x18a002=_0x5c770e[0x0];if(!_0x18a002)return console[_0x550f67(0x14d)](_0x550f67(0x179)),0x1;try{const _0x3f7c9c=_0x549541[_0x550f67(0x192)];_0x549541['verbose']&&(console[_0x550f67(0x14d)](_0x550f67(0x174)+_0x18a002),_0x3f7c9c&&console[_0x550f67(0x14d)](_0x550f67(0x18a)+_0x3f7c9c));if(!_0x549541[_0x550f67(0x168)]){const _0x2781e1=await confirm(_0x550f67(0x11e)+_0x18a002+'?');if(!_0x2781e1)return console[_0x550f67(0x14d)]('Cancelled'),0x0;}const _0x490266=await withSpinner('Killing\x20attempt...',()=>_0x164ddd[_0x550f67(0x159)][_0x550f67(0x194)](_0x18a002,_0x3f7c9c),{'verbose':_0x549541[_0x550f67(0x1a0)]}),_0x4d774c=_0x490266[_0x550f67(0x17e)];return console['error']('✔\x20'+_0x4d774c),0x0;}catch(_0x303001){if(_0x303001 instanceof SDKError)return console['error'](_0x550f67(0x156)+_0x303001[_0x550f67(0x15f)]),_0x303001[_0x550f67(0x17d)]&&console[_0x550f67(0x14d)](_0x550f67(0x151)+_0x303001[_0x550f67(0x17d)]),0x1;throw _0x303001;}}}export class WorkflowRetryCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x133);[a32_0x14d260(0x181)]=a32_0x14d260(0x15e);async[a32_0x14d260(0x12a)](_0x2afbd1){const _0x4d60dc=a32_0x14d260,{options:_0x18a230,args:_0x4a97e1,tdx:_0x5e015f}=_0x2afbd1,_0x92ae5a=_0x4a97e1[0x0];if(!_0x92ae5a)return console[_0x4d60dc(0x14d)](_0x4d60dc(0x1a4)),console['error'](_0x4d60dc(0x16e)),0x1;let _0x2baa83=![],_0x212bf=_0x92ae5a;if(_0x92ae5a[_0x4d60dc(0x19d)](_0x4d60dc(0x130)))_0x2baa83=!![],_0x212bf=_0x92ae5a['substring'](0x8);else{if(_0x92ae5a[_0x4d60dc(0x19d)](_0x4d60dc(0x158)))_0x2baa83=![],_0x212bf=_0x92ae5a[_0x4d60dc(0x136)](0x8);else return console[_0x4d60dc(0x14d)](_0x4d60dc(0x164)),console[_0x4d60dc(0x14d)](_0x4d60dc(0x16e)),0x1;}try{const _0x5e500d=_0x18a230[_0x4d60dc(0x147)],_0x2885ab=_0x18a230[_0x4d60dc(0x18e)],_0x16207b=_0x18a230[_0x4d60dc(0x17b)],_0x168ab1=_0x18a230[_0x4d60dc(0x131)];_0x18a230[_0x4d60dc(0x1a0)]&&(console[_0x4d60dc(0x14d)]('Target:\x20'+(_0x2baa83?_0x4d60dc(0x128):_0x4d60dc(0x129))+'\x20'+_0x212bf),_0x5e500d&&console[_0x4d60dc(0x14d)](_0x4d60dc(0x140)+_0x5e500d),_0x2885ab&&console[_0x4d60dc(0x14d)]('Resume\x20from:\x20'+_0x2885ab),_0x16207b&&console[_0x4d60dc(0x14d)](_0x4d60dc(0x184)+_0x16207b),_0x168ab1&&console[_0x4d60dc(0x14d)](_0x4d60dc(0x120)));let _0x45cfc2;if(_0x16207b)try{if(_0x16207b[_0x4d60dc(0x19d)]('@')){const _0x56e137=await import(_0x4d60dc(0x14a)),_0x413637=_0x16207b['substring'](0x1),_0x1aca7b=await _0x56e137[_0x4d60dc(0x12d)](_0x413637,_0x4d60dc(0x167));_0x45cfc2=JSON['parse'](_0x1aca7b);}else _0x45cfc2=JSON[_0x4d60dc(0x155)](_0x16207b);}catch{return console[_0x4d60dc(0x14d)](_0x4d60dc(0x138)),0x1;}if(!_0x18a230[_0x4d60dc(0x168)]){const _0x34aca4=await confirm('Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20'+(_0x2baa83?_0x4d60dc(0x128):_0x4d60dc(0x129))+'\x20'+_0x212bf+'?');if(!_0x34aca4)return console[_0x4d60dc(0x14d)](_0x4d60dc(0x17f)),0x0;}let _0x13de8b;_0x2baa83?_0x13de8b=await withSpinner(_0x4d60dc(0x13f),()=>_0x5e015f[_0x4d60dc(0x159)][_0x4d60dc(0x170)](_0x212bf,{'fromTask':_0x5e500d,'retryParams':_0x45cfc2}),{'verbose':_0x18a230[_0x4d60dc(0x1a0)]}):_0x13de8b=await withSpinner(_0x4d60dc(0x12e),()=>_0x5e015f[_0x4d60dc(0x159)][_0x4d60dc(0x196)](_0x212bf,{'resumeFrom':_0x2885ab,'retryParams':_0x45cfc2,'force':_0x168ab1}),{'verbose':_0x18a230['verbose']});const _0x334b16=_0x13de8b['data'];return console['error']('✔\x20Retry\x20started'),console[_0x4d60dc(0x14d)](_0x4d60dc(0x195)+_0x334b16[_0x4d60dc(0x186)]),console[_0x4d60dc(0x14d)](_0x4d60dc(0x176)+_0x334b16[_0x4d60dc(0x163)]),0x0;}catch(_0x549935){if(_0x549935 instanceof SDKError)return console[_0x4d60dc(0x14d)](_0x4d60dc(0x156)+_0x549935['message']),_0x549935[_0x4d60dc(0x17d)]&&console[_0x4d60dc(0x14d)](_0x4d60dc(0x151)+_0x549935[_0x4d60dc(0x17d)]),0x1;throw _0x549935;}}}export class WorkflowDownloadCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x145);[a32_0x14d260(0x181)]=a32_0x14d260(0x150);async[a32_0x14d260(0x12a)](_0x2b75a9){const _0x16b1ae=a32_0x14d260,{options:_0x13ab24,args:_0x481705,tdx:_0x4a0767}=_0x2b75a9,_0x476b85=_0x481705[0x0],_0x52d2a1=_0x481705[0x1]||'.';if(!_0x476b85)return console[_0x16b1ae(0x14d)](_0x16b1ae(0x190)),console[_0x16b1ae(0x14d)](_0x16b1ae(0x18f)),0x1;const _0x3982c6=_0x13ab24[_0x16b1ae(0x185)];_0x13ab24[_0x16b1ae(0x1a0)]&&(console[_0x16b1ae(0x14d)]('Project:\x20'+_0x476b85),console['error'](_0x16b1ae(0x19b)+_0x52d2a1),_0x3982c6&&console['error'](_0x16b1ae(0x183)+_0x3982c6));const _0x2b0ad9=await withSpinner(_0x16b1ae(0x143)+_0x476b85+_0x16b1ae(0x154),()=>_0x4a0767[_0x16b1ae(0x159)][_0x16b1ae(0x146)](_0x476b85,_0x52d2a1,{'revision':_0x3982c6}),{'verbose':_0x13ab24[_0x16b1ae(0x1a0)]}),_0x207f9=_0x2b0ad9['data'];return console[_0x16b1ae(0x14d)](_0x16b1ae(0x1a3)+_0x207f9[_0x16b1ae(0x198)]),console[_0x16b1ae(0x14d)](_0x16b1ae(0x123)+_0x207f9[_0x16b1ae(0x185)]),console['error'](_0x16b1ae(0x162)+_0x207f9[_0x16b1ae(0x13b)]),console['error'](_0x16b1ae(0x189)+_0x52d2a1+'/'+_0x207f9[_0x16b1ae(0x198)]),0x0;}}function a32_0x6a51(){const _0x9babf0=['attempt:','workflow','length','Project\x20name:\x20','3381836hivtLD','Show\x20tasks\x20for\x20an\x20attempt','Retry\x20a\x20session\x20or\x20attempt','message','split','Getting\x20attempt\x20details...','\x20\x20Files\x20extracted:\x20','sessionId','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','workflow:workflows','workflow:delete','utf-8','yes','workflow:projects','✔\x20Found\x20','limit','3614VIZfPv','name','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','7VVWvYH','retrySession','Show\x20logs\x20for\x20a\x20specific\x20task','workflows','ies','Attempt\x20ID:\x20','414GjNBoF','\x20\x20Session\x20ID:\x20','Filter:\x20project=','logs','Error:\x20Attempt\x20ID\x20is\x20required','✔\x20Pushed\x20','params','skipValidation','cause','data','Cancelled','Getting\x20task\x20logs...','description','status','Revision:\x20','Params:\x20','revision','attemptId','Task\x20name:\x20','Error:\x20Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','\x20\x20Location:\x20','Reason:\x20','Error:\x20Attempt\x20ID\x20and\x20task\x20name\x20are\x20required','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','\x20log\x20entr','resumeFrom','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Error:\x20Project\x20name\x20is\x20required','List\x20workflow\x20execution\x20sessions','reason','isDirectory','kill','\x20\x20New\x20attempt\x20ID:\x20','retryAttempt','Project\x20directory:\x20','projectName','Filter:\x20','5MwTKrs','Output\x20directory:\x20','Project:\x20','startsWith','Push\x20workflow\x20project\x20to\x20Treasure\x20Data','6816820OStRLv','verbose','projectId','Kill\x20a\x20running\x20attempt','✔\x20Downloaded\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','Show\x20specific\x20attempt\x20details','\x20task','\x22?\x20This\x20cannot\x20be\x20undone.','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Include\x20retried:\x20yes','Force:\x20yes','\x20session','Project\x20filter:\x20','\x20\x20Revision:\x20','workflow:sessions','push','Pushing\x20workflow\x20project...','workflow:attempts','session','attempt','execute','from','\x20is\x20not\x20a\x20directory','readFile','Retrying\x20attempt...','List\x20all\x20workflow\x20projects','session:','force','\x20project','workflow:retry','\x20\x20Project\x20ID:\x20','workflow:logs','substring','27616OyDNFH','Error:\x20Invalid\x20JSON\x20in\x20--params','delete','2694846onEIcq','filesExtracted','Listing\x20workflow\x20projects...','Listing\x20workflow\x20attempts...','33clwqhm','Retrying\x20session...','From\x20task:\x20','sessions','4244442LsKpuh','Downloading\x20project\x20','\x20attempt','workflow:download','download','fromTask','offset','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','fs/promises','318097aWEGoP','projects','error','Getting\x20attempt\x20tasks...','Deleting\x20project\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20\x20Cause:\x20','List\x20workflow\x20attempts','workflow:tasks','...','parse','Error:\x20','Pattern:\x20'];a32_0x6a51=function(){return _0x9babf0;};return a32_0x6a51();}export class WorkflowPushCommand extends BaseCommand{[a32_0x14d260(0x16d)]='workflow:push';[a32_0x14d260(0x181)]=a32_0x14d260(0x19e);async[a32_0x14d260(0x12a)](_0x381b4d){const _0xdf95a4=a32_0x14d260,{options:_0x269cc1,args:_0xefcf54,tdx:_0x4da58a}=_0x381b4d;let _0x1dbc8e='.',_0x3d5229=_0x269cc1[_0xdf95a4(0x16d)];if(_0xefcf54[0x0]){const {promises:_0x544860}=await import('fs');try{const _0x54f271=await _0x544860['stat'](_0xefcf54[0x0]);if(_0x54f271[_0xdf95a4(0x193)]())_0x1dbc8e=_0xefcf54[0x0];else return console[_0xdf95a4(0x14d)](_0xdf95a4(0x156)+_0xefcf54[0x0]+_0xdf95a4(0x12c)),0x1;}catch{_0x3d5229=_0xefcf54[0x0],_0x1dbc8e='.';}}const _0x54b423=_0x269cc1[_0xdf95a4(0x185)],_0x35e4cf=_0x269cc1[_0xdf95a4(0x17c)];_0x269cc1[_0xdf95a4(0x1a0)]&&(console['error'](_0xdf95a4(0x197)+_0x1dbc8e),_0x3d5229&&console[_0xdf95a4(0x14d)](_0xdf95a4(0x15b)+_0x3d5229),_0x54b423&&console[_0xdf95a4(0x14d)](_0xdf95a4(0x183)+_0x54b423),_0x35e4cf&&console[_0xdf95a4(0x14d)]('Validation:\x20skipped'));const _0x17fa43=await withSpinner(_0xdf95a4(0x126),()=>_0x4da58a[_0xdf95a4(0x159)][_0xdf95a4(0x125)](_0x1dbc8e,{'projectName':_0x3d5229,'revision':_0x54b423,'skipValidation':_0x35e4cf}),{'verbose':_0x269cc1[_0xdf95a4(0x1a0)]}),_0x357ef9=_0x17fa43[_0xdf95a4(0x17e)];return console[_0xdf95a4(0x14d)](_0xdf95a4(0x17a)+_0x357ef9['projectName']),console['error'](_0xdf95a4(0x134)+_0x357ef9['projectId']),console[_0xdf95a4(0x14d)](_0xdf95a4(0x123)+_0x357ef9[_0xdf95a4(0x185)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a32_0x14d260(0x16d)]=a32_0x14d260(0x166);[a32_0x14d260(0x181)]=a32_0x14d260(0x149);async[a32_0x14d260(0x12a)](_0x3264d2){const _0x46b1b1=a32_0x14d260,{options:_0xdb9d76,args:_0x323c73,tdx:_0x4d8320}=_0x3264d2,_0x1ea421=_0x323c73[0x0];if(!_0x1ea421)return console[_0x46b1b1(0x14d)]('Error:\x20Project\x20name\x20or\x20ID\x20is\x20required'),console['error']('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0xdb9d76[_0x46b1b1(0x1a0)]&&console['error'](_0x46b1b1(0x19c)+_0x1ea421);if(!_0xdb9d76[_0x46b1b1(0x168)]){const _0x30244d=await confirm(_0x46b1b1(0x18c)+_0x1ea421+_0x46b1b1(0x11d));if(!_0x30244d)return console[_0x46b1b1(0x14d)](_0x46b1b1(0x17f)),0x0;}const _0x2a0664=await withSpinner(_0x46b1b1(0x14f)+_0x1ea421+'...',()=>_0x4d8320['workflow'][_0x46b1b1(0x139)](_0x1ea421),{'verbose':_0xdb9d76['verbose']}),_0x548481=_0x2a0664[_0x46b1b1(0x17e)];return console[_0x46b1b1(0x14d)]('✔\x20Deleted\x20project\x20'+_0x548481[_0x46b1b1(0x198)]),console[_0x46b1b1(0x14d)]('\x20\x20Project\x20ID:\x20'+_0x548481[_0x46b1b1(0x1a1)]),0x0;}}
package/dist/core/auth.js CHANGED
@@ -1 +1 @@
1
- (function(_0x247d77,_0x2d3616){const _0x13ec35=a33_0x145a,_0x3bbf41=_0x247d77();while(!![]){try{const _0x362b04=-parseInt(_0x13ec35(0x190))/0x1+parseInt(_0x13ec35(0x186))/0x2+parseInt(_0x13ec35(0x185))/0x3+-parseInt(_0x13ec35(0x196))/0x4+parseInt(_0x13ec35(0x18a))/0x5*(-parseInt(_0x13ec35(0x18e))/0x6)+parseInt(_0x13ec35(0x18d))/0x7+parseInt(_0x13ec35(0x184))/0x8;if(_0x362b04===_0x2d3616)break;else _0x3bbf41['push'](_0x3bbf41['shift']());}catch(_0x82a4e8){_0x3bbf41['push'](_0x3bbf41['shift']());}}}(a33_0x42e8,0x3a57b));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';function a33_0x145a(_0x5d973b,_0x2fddfc){const _0x42e88a=a33_0x42e8();return a33_0x145a=function(_0x145a61,_0x362d36){_0x145a61=_0x145a61-0x184;let _0x32ad0b=_0x42e88a[_0x145a61];return _0x32ad0b;},a33_0x145a(_0x5d973b,_0x2fddfc);}import{dirname,join}from'path';import{getAPIKey}from'./config.js';export function getVersion(){const _0x4a2531=a33_0x145a;try{const _0x199bd6=fileURLToPath(import.meta[_0x4a2531(0x194)]),_0x40e747=dirname(_0x199bd6),_0x58c62a=join(_0x40e747,'../../package.json'),_0x3025fc=JSON[_0x4a2531(0x193)](readFileSync(_0x58c62a,_0x4a2531(0x18f)));return _0x3025fc[_0x4a2531(0x192)];}catch{return _0x4a2531(0x18b);}}export function getUserAgent(){const _0xca94c5=a33_0x145a,_0x1308c8=getVersion(),_0x519d8f=platform(),_0x156d70=process['version'][_0xca94c5(0x191)]('v','');return _0xca94c5(0x197)+_0x1308c8+'\x20('+_0x519d8f+';\x20node/'+_0x156d70+')';}export function getAuthHeaders(_0x27fc72,_0x3917f7){const _0x3a65fd=a33_0x145a,_0x3b27ad=getVersion(),_0x5cfe9c={'User-Agent':getUserAgent(),'X-TD-Client':_0x3a65fd(0x187),'X-TD-Client-Version':_0x3b27ad};return _0x3917f7&&(_0x5cfe9c['Authorization']='TD1\x20'+_0x3917f7),_0x5cfe9c;}function a33_0x42e8(){const _0x487fe4=['305879zyTftQ','replace','version','parse','url','Authorization','146116cOJJxO','tdx/','230088duopgE','1270524QHvupE','351986VtuFqQ','tdx','length','entries','1356865DiCRub','0.0.0','X-Trino-User','1571430XHOwnt','6GlpKXh','utf-8'];a33_0x42e8=function(){return _0x487fe4;};return a33_0x42e8();}export function toHeaderRecord(_0x14eb27){const _0x3fe27e=a33_0x145a,_0x59965d={};for(const [_0x56d123,_0x295149]of Object[_0x3fe27e(0x189)](_0x14eb27)){_0x295149!==undefined&&(_0x59965d[_0x56d123]=_0x295149);}return _0x59965d;}export function getTrinoHeaders(_0x33b1da,_0x1e5db4){const _0x4ba20a=a33_0x145a,_0x5d6345=getAuthHeaders(_0x33b1da,_0x1e5db4),_0x4ee5ea=toHeaderRecord(_0x5d6345);return delete _0x4ee5ea[_0x4ba20a(0x195)],_0x1e5db4&&(_0x4ee5ea[_0x4ba20a(0x18c)]=_0x1e5db4),_0x4ee5ea;}export function hasAPIKey(_0x1f369f){const _0x447d0c=a33_0x145a,_0x37ae49=getAPIKey(_0x1f369f);return _0x37ae49!==undefined&&_0x37ae49[_0x447d0c(0x188)]>0x0;}
1
+ (function(_0x4b96e4,_0x325107){const _0x176a19=a33_0x3e46,_0x8239fa=_0x4b96e4();while(!![]){try{const _0x75ff14=-parseInt(_0x176a19(0x8d))/0x1*(-parseInt(_0x176a19(0x9a))/0x2)+parseInt(_0x176a19(0x99))/0x3+parseInt(_0x176a19(0x91))/0x4+parseInt(_0x176a19(0x8e))/0x5*(parseInt(_0x176a19(0x97))/0x6)+parseInt(_0x176a19(0x8c))/0x7+parseInt(_0x176a19(0x93))/0x8*(-parseInt(_0x176a19(0x9d))/0x9)+-parseInt(_0x176a19(0x8f))/0xa*(parseInt(_0x176a19(0xa0))/0xb);if(_0x75ff14===_0x325107)break;else _0x8239fa['push'](_0x8239fa['shift']());}catch(_0x33d57b){_0x8239fa['push'](_0x8239fa['shift']());}}}(a33_0x2638,0x585a2));import{platform}from'os';import{readFileSync}from'fs';import{fileURLToPath}from'url';import{dirname,join}from'path';function a33_0x3e46(_0xc55067,_0x22f569){const _0x26385e=a33_0x2638();return a33_0x3e46=function(_0x3e462c,_0x513fc5){_0x3e462c=_0x3e462c-0x8c;let _0x2857ce=_0x26385e[_0x3e462c];return _0x2857ce;},a33_0x3e46(_0xc55067,_0x22f569);}import{getAPIKey}from'./config.js';export function getVersion(){const _0x4c14ff=a33_0x3e46;try{const _0x2a849f=fileURLToPath(import.meta[_0x4c14ff(0x98)]),_0x662b57=dirname(_0x2a849f),_0xce3d34=join(_0x662b57,'../../package.json'),_0xf95661=JSON['parse'](readFileSync(_0xce3d34,_0x4c14ff(0x95)));return _0xf95661[_0x4c14ff(0x9e)];}catch{return'0.0.0';}}export function getUserAgent(){const _0x371cbe=a33_0x3e46,_0x34e020=getVersion(),_0x590e2c=platform(),_0xddb1ad=process['version'][_0x371cbe(0x9f)]('v','');return _0x371cbe(0x96)+_0x34e020+'\x20('+_0x590e2c+';\x20node/'+_0xddb1ad+')';}function a33_0x2638(){const _0x207be7=['519545IYVqeV','10JiSFef','X-Trino-User','1739524PrWEUU','tdx','8RfuBIk','length','utf-8','tdx/','6CAXURW','url','996786UHoRIB','994NfXOHl','TD1\x20','entries','6345225bXeGNq','version','replace','5190944hOrvyi','Authorization','1414546HzGfem','937yscVMb'];a33_0x2638=function(){return _0x207be7;};return a33_0x2638();}export function getAuthHeaders(_0x209569,_0x811d65){const _0x4a3713=a33_0x3e46,_0x35b411=getVersion(),_0x24ed82={'User-Agent':getUserAgent(),'X-TD-Client':_0x4a3713(0x92),'X-TD-Client-Version':_0x35b411};return _0x811d65&&(_0x24ed82[_0x4a3713(0xa1)]=_0x4a3713(0x9b)+_0x811d65),_0x24ed82;}export function toHeaderRecord(_0x176e69){const _0x56519e=a33_0x3e46,_0x427058={};for(const [_0x19ce89,_0x5ec4ad]of Object[_0x56519e(0x9c)](_0x176e69)){_0x5ec4ad!==undefined&&(_0x427058[_0x19ce89]=_0x5ec4ad);}return _0x427058;}export function getTrinoHeaders(_0x207587,_0x4fa5ef){const _0x308e3a=a33_0x3e46,_0x1eeca7=getAuthHeaders(_0x207587,_0x4fa5ef),_0x26117f=toHeaderRecord(_0x1eeca7);return delete _0x26117f[_0x308e3a(0xa1)],_0x4fa5ef&&(_0x26117f[_0x308e3a(0x90)]=_0x4fa5ef),_0x26117f;}export function hasAPIKey(_0x1952bd){const _0x1f5624=a33_0x3e46,_0x5d4dd2=getAPIKey(_0x1952bd);return _0x5d4dd2!==undefined&&_0x5d4dd2[_0x1f5624(0x94)]>0x0;}
@@ -1 +1 @@
1
- (function(_0xed599a,_0x434454){const _0x14dbae=a34_0x31d9,_0x5b1f30=_0xed599a();while(!![]){try{const _0x58c720=-parseInt(_0x14dbae(0x177))/0x1*(parseInt(_0x14dbae(0x168))/0x2)+-parseInt(_0x14dbae(0x16f))/0x3*(-parseInt(_0x14dbae(0x184))/0x4)+parseInt(_0x14dbae(0x188))/0x5*(-parseInt(_0x14dbae(0x174))/0x6)+-parseInt(_0x14dbae(0x172))/0x7*(parseInt(_0x14dbae(0x189))/0x8)+parseInt(_0x14dbae(0x16a))/0x9*(-parseInt(_0x14dbae(0x17a))/0xa)+parseInt(_0x14dbae(0x18b))/0xb*(-parseInt(_0x14dbae(0x187))/0xc)+parseInt(_0x14dbae(0x166))/0xd;if(_0x58c720===_0x434454)break;else _0x5b1f30['push'](_0x5b1f30['shift']());}catch(_0x5ba649){_0x5b1f30['push'](_0x5b1f30['shift']());}}}(a34_0x17f1,0xa7e29));import{homedir}from'os';import{join}from'path';import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0x98a404 from'node:fs';import*as a34_0x4a675b from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';function a34_0x31d9(_0x36a280,_0x294e53){const _0x17f1af=a34_0x17f1();return a34_0x31d9=function(_0x31d965,_0x44be5d){_0x31d965=_0x31d965-0x158;let _0x150ea4=_0x17f1af[_0x31d965];return _0x150ea4;},a34_0x31d9(_0x36a280,_0x294e53);}export function getConfigDir(){const _0x2e6afc=a34_0x31d9;return process[_0x2e6afc(0x15b)][_0x2e6afc(0x175)]||join(homedir(),_0x2e6afc(0x17f),'tdx');}function a34_0x17f1(){const _0x2c35fc=['ap02','.env.','warn','\x27,\x20defaulting\x20to\x20us01','860wByjJZ','env:\x20TD_API_KEY','existsSync','12LSVtlY','131060igUUbh','8JFVUFi','Warning:\x20Unknown\x20site\x20\x27','12951037ikRrid','stg-us01','tdx','llm_default_project','toUpperCase','.env','jp01','readFileSync','tdx.json','Warning:\x20Failed\x20to\x20load\x20','env','parse','\x20(TD_API_KEY)','TDX_CACHE_DIR','eu01','error','global:\x20','startsWith','profile','profiles','slice','49765781twSRzS','join','23570NfxqKw','utf-8','5363397WHtSit','profile:\x20','TD_API_KEY','replace','TD_API_KEY_','11973DVzMWT','us01','dev-us01','982345cWCpXI','stg-ap03','36fMQBcO','TDX_CONFIG_DIR','stg-jp01','113gCuoKT','endsWith','entries','20NISygi','trim','includes','map','ap03','.config'];a34_0x17f1=function(){return _0x2c35fc;};return a34_0x17f1();}export function getConfigFile(){const _0x199642=a34_0x31d9;return join(getConfigDir(),_0x199642(0x190));}export function getCacheDir(){const _0x5d5a42=a34_0x31d9;return process[_0x5d5a42(0x15b)][_0x5d5a42(0x15e)]||join(homedir(),'.cache',_0x5d5a42(0x18d));}export function getLLMProjectCacheFile(){const _0xcbe431=a34_0x31d9;return join(getCacheDir(),_0xcbe431(0x18e));}export function readCachedLLMProject(){const _0x1052b0=a34_0x31d9;try{const _0x2b0d04=getLLMProjectCacheFile();if(!existsSync(_0x2b0d04))return null;return readFileSync(_0x2b0d04,_0x1052b0(0x169))['trim']();}catch{return null;}}export function writeCachedLLMProject(_0x8d777e){const _0x43ba5e=a34_0x31d9;try{const _0x554701=getCacheDir(),_0x387aaf=getLLMProjectCacheFile();!existsSync(_0x554701)&&mkdirSync(_0x554701,{'recursive':!![]}),writeFileSync(_0x387aaf,_0x8d777e,'utf-8');}catch(_0x5bffc5){console[_0x43ba5e(0x160)]('Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:',_0x5bffc5);}}export function parseEnvFile(_0x80f934){const _0x5c783f=a34_0x31d9,_0xaa6310={};for(const _0x38b430 of _0x80f934['split']('\x0a')){const _0x31fff7=_0x38b430[_0x5c783f(0x17b)]();if(!_0x31fff7||_0x31fff7[_0x5c783f(0x162)]('#'))continue;const _0x5cfca4=_0x31fff7['match'](/^([^=]+)=(.*)$/);if(_0x5cfca4){const _0xe1be6c=_0x5cfca4[0x1][_0x5c783f(0x17b)]();let _0x18ad1f=_0x5cfca4[0x2][_0x5c783f(0x17b)]();(_0x18ad1f[_0x5c783f(0x162)]('\x22')&&_0x18ad1f[_0x5c783f(0x178)]('\x22')||_0x18ad1f[_0x5c783f(0x162)]('\x27')&&_0x18ad1f[_0x5c783f(0x178)]('\x27'))&&(_0x18ad1f=_0x18ad1f[_0x5c783f(0x165)](0x1,-0x1)),_0xaa6310[_0xe1be6c]=_0x18ad1f;}}return _0xaa6310;}export function readUserConfig(){const _0x274c8c=a34_0x31d9,_0xbe92cd=getConfigFile();if(!existsSync(_0xbe92cd))return{};try{const _0x2ceedb=readFileSync(_0xbe92cd,_0x274c8c(0x169));return parseEnvFile(_0x2ceedb);}catch(_0x18b65d){return console['warn']('Warning:\x20Failed\x20to\x20read\x20config\x20file\x20'+_0xbe92cd+':',_0x18b65d),{};}}export function resolveSite(_0x3d0a6b){const _0x28c8f1=a34_0x31d9,_0x2d6864=[_0x28c8f1(0x170),_0x28c8f1(0x191),_0x28c8f1(0x15f),_0x28c8f1(0x180),_0x28c8f1(0x17e),'dev-us01','dev-eu01',_0x28c8f1(0x18c),_0x28c8f1(0x176),_0x28c8f1(0x173)];if(_0x2d6864[_0x28c8f1(0x17c)](_0x3d0a6b))return _0x3d0a6b;if(_0x3d0a6b in SITE_ALIASES)return SITE_ALIASES[_0x3d0a6b];return console['warn'](_0x28c8f1(0x18a)+_0x3d0a6b+_0x28c8f1(0x183)),_0x28c8f1(0x170);}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x40d678,_0x589191){const _0x1cede2=a34_0x31d9,_0x496a33=_0x40d678['toUpperCase']()['replace'](/-/g,'_'),_0x43d4b3=_0x1cede2(0x16e)+_0x496a33;if(process[_0x1cede2(0x15b)][_0x43d4b3])return process[_0x1cede2(0x15b)][_0x43d4b3];if(process[_0x1cede2(0x15b)]['TD_API_KEY'])return process['env'][_0x1cede2(0x16c)];const _0x3af230=_0x589191||getActiveProfileName();if(_0x3af230){const _0x594e94=loadProfileEnv(_0x3af230);if(_0x594e94){if(_0x594e94[_0x43d4b3])return _0x594e94[_0x43d4b3];if(_0x594e94[_0x1cede2(0x16c)])return _0x594e94[_0x1cede2(0x16c)];}}const _0x167a14=loadUserConfigOnce();if(_0x167a14[_0x43d4b3])return _0x167a14[_0x43d4b3];if(_0x167a14['TD_API_KEY'])return _0x167a14['TD_API_KEY'];return undefined;}export function getAPIKeySource(_0x1f95c,_0x2dde7a){const _0x29657f=a34_0x31d9,_0x381ac8='TD_API_KEY_'+_0x1f95c[_0x29657f(0x18f)]()[_0x29657f(0x16d)](/-/g,'_');if(process[_0x29657f(0x15b)][_0x381ac8])return'env:\x20'+_0x381ac8;if(process[_0x29657f(0x15b)][_0x29657f(0x16c)])return _0x29657f(0x185);const _0xa0ab2b=_0x2dde7a||getActiveProfileName();if(_0xa0ab2b){const _0x458c7f=loadProfileEnv(_0xa0ab2b);if(_0x458c7f){if(_0x458c7f[_0x381ac8])return'profile:\x20'+_0xa0ab2b+'\x20('+_0x381ac8+')';if(_0x458c7f[_0x29657f(0x16c)])return _0x29657f(0x16b)+_0xa0ab2b+_0x29657f(0x15d);}}const _0x35b247=loadUserConfigOnce(),_0x317565=getConfigFile();if(_0x35b247[_0x381ac8])return _0x29657f(0x161)+_0x317565+'\x20('+_0x381ac8+')';if(_0x35b247[_0x29657f(0x16c)])return _0x29657f(0x161)+_0x317565+_0x29657f(0x15d);return null;}function loadProfileEnv(_0x2b52d3){const _0x2259d0=a34_0x31d9,_0x15cd59=a34_0x4a675b[_0x2259d0(0x167)](getConfigDir(),_0x2259d0(0x181)+_0x2b52d3);if(a34_0x98a404[_0x2259d0(0x186)](_0x15cd59)){validateSecureFilePermissions(_0x15cd59);try{const _0x118ed8=a34_0x98a404[_0x2259d0(0x158)](_0x15cd59,_0x2259d0(0x169));return parseEnvFile(_0x118ed8);}catch(_0x1bf096){console['warn'](_0x2259d0(0x15a)+_0x15cd59+':\x20'+_0x1bf096);}}const _0x2aa105=a34_0x4a675b[_0x2259d0(0x167)](getConfigDir(),_0x2259d0(0x164),_0x2b52d3,'.env');if(a34_0x98a404[_0x2259d0(0x186)](_0x2aa105)){validateSecureFilePermissions(_0x2aa105);try{const _0x3df7ae=a34_0x98a404['readFileSync'](_0x2aa105,_0x2259d0(0x169));return parseEnvFile(_0x3df7ae);}catch(_0x314384){return console[_0x2259d0(0x182)](_0x2259d0(0x15a)+_0x2aa105+':\x20'+_0x314384),null;}}return null;}function getActiveProfileName(){const _0x522e1f=a34_0x31d9,_0x3d5cf1=a34_0x4a675b[_0x522e1f(0x167)](getConfigDir(),_0x522e1f(0x159));if(!a34_0x98a404['existsSync'](_0x3d5cf1))return null;try{const _0x434b50=a34_0x98a404['readFileSync'](_0x3d5cf1,_0x522e1f(0x169)),_0x3a90ed=JSON[_0x522e1f(0x15c)](_0x434b50);return _0x3a90ed[_0x522e1f(0x163)]||null;}catch{return null;}}export function saveAPIKey(_0x1bd9f8,_0x1c8711){const _0x20f618=a34_0x31d9,_0x3feb5f=getConfigDir(),_0x4a3ed5=getConfigFile();!existsSync(_0x3feb5f)&&mkdirSync(_0x3feb5f,{'recursive':!![],'mode':0x1c0});const _0x5db2ca=readUserConfig(),_0x109d95=_0x1bd9f8[_0x20f618(0x18f)]()['replace'](/-/g,'_');_0x5db2ca[_0x20f618(0x16e)+_0x109d95]=_0x1c8711;const _0x379ccb=Object[_0x20f618(0x179)](_0x5db2ca)[_0x20f618(0x17d)](([_0x1ceadd,_0x2160f0])=>_0x1ceadd+'='+_0x2160f0);writeFileSync(_0x4a3ed5,_0x379ccb['join']('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x5cdcbc=a34_0x31d9,_0x2b233d={'apiKeys':{},'defaultSite':_0x5cdcbc(0x170)},_0x49b03d=['us01','jp01',_0x5cdcbc(0x15f),_0x5cdcbc(0x180),_0x5cdcbc(0x17e),_0x5cdcbc(0x171),'dev-eu01',_0x5cdcbc(0x18c),'stg-jp01',_0x5cdcbc(0x173)];for(const _0x5a513f of _0x49b03d){const _0x53b3b1=getAPIKey(_0x5a513f);_0x53b3b1&&(_0x2b233d['apiKeys'][_0x5a513f]=_0x53b3b1);}return _0x2b233d;}
1
+ (function(_0x26d1ed,_0x3939fa){const _0x1604a9=a34_0x4b54,_0x13a941=_0x26d1ed();while(!![]){try{const _0x17e8db=parseInt(_0x1604a9(0x8e))/0x1*(-parseInt(_0x1604a9(0xb0))/0x2)+-parseInt(_0x1604a9(0xb8))/0x3*(parseInt(_0x1604a9(0xb9))/0x4)+parseInt(_0x1604a9(0xb6))/0x5+parseInt(_0x1604a9(0x8c))/0x6+parseInt(_0x1604a9(0x99))/0x7+-parseInt(_0x1604a9(0xab))/0x8*(parseInt(_0x1604a9(0xaf))/0x9)+-parseInt(_0x1604a9(0x9b))/0xa*(-parseInt(_0x1604a9(0xaa))/0xb);if(_0x17e8db===_0x3939fa)break;else _0x13a941['push'](_0x13a941['shift']());}catch(_0x48b9be){_0x13a941['push'](_0x13a941['shift']());}}}(a34_0x4f37,0xb735c));import{homedir}from'os';function a34_0x4b54(_0x43ae68,_0x1d0fc7){const _0x4f372a=a34_0x4f37();return a34_0x4b54=function(_0x4b5439,_0x18252){_0x4b5439=_0x4b5439-0x85;let _0x1a6990=_0x4f372a[_0x4b5439];return _0x1a6990;},a34_0x4b54(_0x43ae68,_0x1d0fc7);}import{join}from'path';function a34_0x4f37(){const _0x4e4a90=['TD_API_KEY','Warning:\x20Failed\x20to\x20read\x20config\x20file\x20','split','.config','parse','10383779IgVAAJ','entries','41730DhSxct','Warning:\x20Unknown\x20site\x20\x27','tdx','ap02','env:\x20','endsWith','env:\x20TD_API_KEY','toUpperCase','Warning:\x20Failed\x20to\x20load\x20','warn','map','us01','env','slice','profile:\x20','3729tuOtgs','9723272OAcrOk','stg-us01','trim','TD_API_KEY_','9NFFEhJ','882298YOedIK','eu01','error','readFileSync','existsSync','jp01','2292040RURcTn','apiKeys','92985oIdGRT','96GNvtIz','Warning:\x20Failed\x20to\x20cache\x20LLM\x20project\x20name:','\x20(TD_API_KEY)','.cache','global:\x20','join','profile','startsWith','profiles','tdx.json','utf-8','llm_default_project','includes','\x27,\x20defaulting\x20to\x20us01','stg-jp01','4060272TPvuyo','replace','3mMETLv','TDX_CONFIG_DIR','dev-eu01','match','dev-us01','ap03'];a34_0x4f37=function(){return _0x4e4a90;};return a34_0x4f37();}import{existsSync,readFileSync,writeFileSync,mkdirSync}from'fs';import*as a34_0xcbe5ac from'node:fs';import*as a34_0xe58083 from'node:path';import{SITE_ALIASES}from'../types/index.js';import{validateSecureFilePermissions}from'../utils/file-permissions.js';export function getConfigDir(){const _0x2feb8a=a34_0x4b54;return process['env'][_0x2feb8a(0x8f)]||join(homedir(),_0x2feb8a(0x97),_0x2feb8a(0x9d));}export function getConfigFile(){return join(getConfigDir(),'.env');}export function getCacheDir(){const _0x4953a4=a34_0x4b54;return process[_0x4953a4(0xa7)]['TDX_CACHE_DIR']||join(homedir(),_0x4953a4(0xbc),_0x4953a4(0x9d));}export function getLLMProjectCacheFile(){const _0x36fa5c=a34_0x4b54;return join(getCacheDir(),_0x36fa5c(0x88));}export function readCachedLLMProject(){const _0xed4522=a34_0x4b54;try{const _0x29d4aa=getLLMProjectCacheFile();if(!existsSync(_0x29d4aa))return null;return readFileSync(_0x29d4aa,_0xed4522(0x87))[_0xed4522(0xad)]();}catch{return null;}}export function writeCachedLLMProject(_0x5aad16){const _0x384102=a34_0x4b54;try{const _0x5ba385=getCacheDir(),_0x290fe0=getLLMProjectCacheFile();!existsSync(_0x5ba385)&&mkdirSync(_0x5ba385,{'recursive':!![]}),writeFileSync(_0x290fe0,_0x5aad16,_0x384102(0x87));}catch(_0x3d2dcf){console[_0x384102(0xb2)](_0x384102(0xba),_0x3d2dcf);}}export function parseEnvFile(_0x3464fc){const _0x3f31d7=a34_0x4b54,_0x19a1a0={};for(const _0x4525df of _0x3464fc[_0x3f31d7(0x96)]('\x0a')){const _0x32cf24=_0x4525df[_0x3f31d7(0xad)]();if(!_0x32cf24||_0x32cf24['startsWith']('#'))continue;const _0x13b3e4=_0x32cf24[_0x3f31d7(0x91)](/^([^=]+)=(.*)$/);if(_0x13b3e4){const _0x533ef5=_0x13b3e4[0x1][_0x3f31d7(0xad)]();let _0x180b74=_0x13b3e4[0x2][_0x3f31d7(0xad)]();(_0x180b74[_0x3f31d7(0xc0)]('\x22')&&_0x180b74[_0x3f31d7(0xa0)]('\x22')||_0x180b74[_0x3f31d7(0xc0)]('\x27')&&_0x180b74['endsWith']('\x27'))&&(_0x180b74=_0x180b74[_0x3f31d7(0xa8)](0x1,-0x1)),_0x19a1a0[_0x533ef5]=_0x180b74;}}return _0x19a1a0;}export function readUserConfig(){const _0x3c115a=a34_0x4b54,_0x552406=getConfigFile();if(!existsSync(_0x552406))return{};try{const _0x5aab57=readFileSync(_0x552406,'utf-8');return parseEnvFile(_0x5aab57);}catch(_0x49d29a){return console['warn'](_0x3c115a(0x95)+_0x552406+':',_0x49d29a),{};}}export function resolveSite(_0x5650b4){const _0x435b7c=a34_0x4b54,_0xb3ce36=[_0x435b7c(0xa6),_0x435b7c(0xb5),_0x435b7c(0xb1),'ap02','ap03','dev-us01',_0x435b7c(0x90),_0x435b7c(0xac),_0x435b7c(0x8b),'stg-ap03'];if(_0xb3ce36[_0x435b7c(0x89)](_0x5650b4))return _0x5650b4;if(_0x5650b4 in SITE_ALIASES)return SITE_ALIASES[_0x5650b4];return console[_0x435b7c(0xa4)](_0x435b7c(0x9c)+_0x5650b4+_0x435b7c(0x8a)),'us01';}let cachedUserConfig=null;export function loadUserConfigOnce(){return cachedUserConfig===null&&(cachedUserConfig=readUserConfig()),cachedUserConfig;}export function clearConfigCache(){cachedUserConfig=null;}export function getAPIKey(_0x320067,_0x3e1e06){const _0x226d71=a34_0x4b54,_0xcfe5e1=_0x320067[_0x226d71(0xa2)]()[_0x226d71(0x8d)](/-/g,'_'),_0x30ced7='TD_API_KEY_'+_0xcfe5e1;if(process[_0x226d71(0xa7)][_0x30ced7])return process[_0x226d71(0xa7)][_0x30ced7];if(process[_0x226d71(0xa7)][_0x226d71(0x94)])return process[_0x226d71(0xa7)][_0x226d71(0x94)];const _0x2fc6c2=_0x3e1e06||getActiveProfileName();if(_0x2fc6c2){const _0x13fee3=loadProfileEnv(_0x2fc6c2);if(_0x13fee3){if(_0x13fee3[_0x30ced7])return _0x13fee3[_0x30ced7];if(_0x13fee3['TD_API_KEY'])return _0x13fee3[_0x226d71(0x94)];}}const _0x503dea=loadUserConfigOnce();if(_0x503dea[_0x30ced7])return _0x503dea[_0x30ced7];if(_0x503dea['TD_API_KEY'])return _0x503dea['TD_API_KEY'];return undefined;}export function getAPIKeySource(_0x535ccb,_0x2a0b69){const _0x123d1b=a34_0x4b54,_0x34f997=_0x123d1b(0xae)+_0x535ccb[_0x123d1b(0xa2)]()[_0x123d1b(0x8d)](/-/g,'_');if(process[_0x123d1b(0xa7)][_0x34f997])return _0x123d1b(0x9f)+_0x34f997;if(process[_0x123d1b(0xa7)][_0x123d1b(0x94)])return _0x123d1b(0xa1);const _0x467c3f=_0x2a0b69||getActiveProfileName();if(_0x467c3f){const _0x2a585a=loadProfileEnv(_0x467c3f);if(_0x2a585a){if(_0x2a585a[_0x34f997])return _0x123d1b(0xa9)+_0x467c3f+'\x20('+_0x34f997+')';if(_0x2a585a[_0x123d1b(0x94)])return _0x123d1b(0xa9)+_0x467c3f+_0x123d1b(0xbb);}}const _0xbe4ced=loadUserConfigOnce(),_0x4e73fc=getConfigFile();if(_0xbe4ced[_0x34f997])return'global:\x20'+_0x4e73fc+'\x20('+_0x34f997+')';if(_0xbe4ced[_0x123d1b(0x94)])return _0x123d1b(0xbd)+_0x4e73fc+_0x123d1b(0xbb);return null;}function loadProfileEnv(_0x56da9e){const _0x427278=a34_0x4b54,_0x27695a=a34_0xe58083[_0x427278(0xbe)](getConfigDir(),'.env.'+_0x56da9e);if(a34_0xcbe5ac[_0x427278(0xb4)](_0x27695a)){validateSecureFilePermissions(_0x27695a);try{const _0x807231=a34_0xcbe5ac['readFileSync'](_0x27695a,'utf-8');return parseEnvFile(_0x807231);}catch(_0x3a2d72){console['warn'](_0x427278(0xa3)+_0x27695a+':\x20'+_0x3a2d72);}}const _0x52345d=a34_0xe58083[_0x427278(0xbe)](getConfigDir(),_0x427278(0x85),_0x56da9e,'.env');if(a34_0xcbe5ac[_0x427278(0xb4)](_0x52345d)){validateSecureFilePermissions(_0x52345d);try{const _0x4010ea=a34_0xcbe5ac[_0x427278(0xb3)](_0x52345d,_0x427278(0x87));return parseEnvFile(_0x4010ea);}catch(_0x361df2){return console[_0x427278(0xa4)]('Warning:\x20Failed\x20to\x20load\x20'+_0x52345d+':\x20'+_0x361df2),null;}}return null;}function getActiveProfileName(){const _0x1d4fae=a34_0x4b54,_0x55e0ad=a34_0xe58083['join'](getConfigDir(),_0x1d4fae(0x86));if(!a34_0xcbe5ac[_0x1d4fae(0xb4)](_0x55e0ad))return null;try{const _0x538044=a34_0xcbe5ac[_0x1d4fae(0xb3)](_0x55e0ad,_0x1d4fae(0x87)),_0x201868=JSON[_0x1d4fae(0x98)](_0x538044);return _0x201868[_0x1d4fae(0xbf)]||null;}catch{return null;}}export function saveAPIKey(_0x46dbea,_0x3415b6){const _0x4823db=a34_0x4b54,_0x45ea67=getConfigDir(),_0x288858=getConfigFile();!existsSync(_0x45ea67)&&mkdirSync(_0x45ea67,{'recursive':!![],'mode':0x1c0});const _0x155f0e=readUserConfig(),_0xf15097=_0x46dbea[_0x4823db(0xa2)]()['replace'](/-/g,'_');_0x155f0e[_0x4823db(0xae)+_0xf15097]=_0x3415b6;const _0x28ede2=Object[_0x4823db(0x9a)](_0x155f0e)[_0x4823db(0xa5)](([_0x564446,_0x9718ff])=>_0x564446+'='+_0x9718ff);writeFileSync(_0x288858,_0x28ede2['join']('\x0a')+'\x0a',{'mode':0x180});}export function loadConfig(){const _0x484fa4=a34_0x4b54,_0x8ae208={'apiKeys':{},'defaultSite':'us01'},_0x1ac706=[_0x484fa4(0xa6),_0x484fa4(0xb5),'eu01',_0x484fa4(0x9e),_0x484fa4(0x93),_0x484fa4(0x92),_0x484fa4(0x90),_0x484fa4(0xac),_0x484fa4(0x8b),'stg-ap03'];for(const _0x4b96ae of _0x1ac706){const _0x1ff93d=getAPIKey(_0x4b96ae);_0x1ff93d&&(_0x8ae208[_0x484fa4(0xb7)][_0x4b96ae]=_0x1ff93d);}return _0x8ae208;}
@@ -1 +1 @@
1
- const a35_0x4d679b=a35_0x1ec1;(function(_0x315572,_0xae8491){const _0x3f194b=a35_0x1ec1,_0x56bcbf=_0x315572();while(!![]){try{const _0x7ed201=parseInt(_0x3f194b(0x190))/0x1+parseInt(_0x3f194b(0x16c))/0x2+parseInt(_0x3f194b(0x162))/0x3*(parseInt(_0x3f194b(0x19c))/0x4)+-parseInt(_0x3f194b(0x17b))/0x5+parseInt(_0x3f194b(0x187))/0x6*(-parseInt(_0x3f194b(0x15a))/0x7)+-parseInt(_0x3f194b(0x169))/0x8+parseInt(_0x3f194b(0x18e))/0x9;if(_0x7ed201===_0xae8491)break;else _0x56bcbf['push'](_0x56bcbf['shift']());}catch(_0x42dc9d){_0x56bcbf['push'](_0x56bcbf['shift']());}}}(a35_0x449c,0xe74d9));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{LogLevel}from'../utils/tdx-logger.js';import*as a35_0x17afa9 from'node:fs';import*as a35_0x183dc8 from'node:path';function a35_0x1ec1(_0x269bf8,_0x2fc80c){const _0x449c8f=a35_0x449c();return a35_0x1ec1=function(_0x1ec176,_0xa9968b){_0x1ec176=_0x1ec176-0x157;let _0xa3a448=_0x449c8f[_0x1ec176];return _0xa3a448;},a35_0x1ec1(_0x269bf8,_0x2fc80c);}export class GlobalContext{[a35_0x4d679b(0x168)];[a35_0x4d679b(0x19b)];[a35_0x4d679b(0x17c)];[a35_0x4d679b(0x18d)];[a35_0x4d679b(0x193)];['apiKey'];[a35_0x4d679b(0x198)];[a35_0x4d679b(0x16e)];[a35_0x4d679b(0x182)];[a35_0x4d679b(0x17e)];[a35_0x4d679b(0x15d)];['configFiles'];constructor(_0x16aa52){const _0xc87b23=a35_0x4d679b;this[_0xc87b23(0x15d)]=_0x16aa52[_0xc87b23(0x196)]||process[_0xc87b23(0x160)][_0xc87b23(0x194)]();const _0x54549f=loadSessionContext(_0x16aa52['session']),_0x732631=loadProjectConfig(),_0x2f8f40=this[_0xc87b23(0x172)]();this[_0xc87b23(0x17e)]=_0x16aa52[_0xc87b23(0x178)]||_0x54549f?.[_0xc87b23(0x178)]||_0x2f8f40[_0xc87b23(0x178)]||getActiveProfile();const _0x335893=this['activeProfile']?loadProfile(this[_0xc87b23(0x17e)]):null,_0x3bdff2=_0x4b053d=>{const _0x310972=_0xc87b23;if(!_0x4b053d)return{};const _0x278625=_0x4b053d,_0x325db0={};for(const [_0x2a9c8a,_0x41e192]of Object[_0x310972(0x18c)](_0x278625)){typeof _0x41e192===_0x310972(0x195)&&(_0x325db0[_0x2a9c8a]=_0x41e192);}return _0x325db0;},_0x35b788={};if(_0x16aa52[_0xc87b23(0x168)]&&_0x16aa52[_0xc87b23(0x168)]!==_0xc87b23(0x166))_0x35b788[_0xc87b23(0x168)]=_0x16aa52[_0xc87b23(0x168)];const _0x303b73=_0x54549f?.[_0xc87b23(0x19b)],_0x1ca878=_0x732631?.[_0xc87b23(0x19b)],_0xf6090=_0x335893?.[_0xc87b23(0x174)]?.['database'],_0x48904a=_0x2f8f40[_0xc87b23(0x19b)];_0x16aa52[_0xc87b23(0x19b)]&&(_0x16aa52[_0xc87b23(0x19b)]!==_0x303b73&&_0x16aa52[_0xc87b23(0x19b)]!==_0x1ca878&&_0x16aa52['database']!==_0xf6090&&_0x16aa52[_0xc87b23(0x19b)]!==_0x48904a)&&(_0x35b788[_0xc87b23(0x19b)]=_0x16aa52[_0xc87b23(0x19b)]);if(_0x16aa52[_0xc87b23(0x17a)])_0x35b788[_0xc87b23(0x17c)]=_0x16aa52[_0xc87b23(0x17a)];if(_0x16aa52[_0xc87b23(0x16a)])_0x35b788[_0xc87b23(0x193)]=_0x16aa52[_0xc87b23(0x16a)];if(_0x16aa52[_0xc87b23(0x178)])_0x35b788['profile']=_0x16aa52[_0xc87b23(0x178)];this[_0xc87b23(0x182)]={'cliFlags':_0x35b788,'session':_0x3bdff2(_0x54549f),'project':_0x3bdff2(_0x732631),'profile':_0x3bdff2(_0x335893?.[_0xc87b23(0x174)]),'global':_0x3bdff2(_0x2f8f40)};const _0x40ec12={...this[_0xc87b23(0x182)][_0xc87b23(0x15e)],...this['layers'][_0xc87b23(0x178)],...this[_0xc87b23(0x182)]['project'],...this['layers'][_0xc87b23(0x196)],...this[_0xc87b23(0x182)][_0xc87b23(0x167)]},_0x4b8388=_0x40ec12[_0xc87b23(0x168)]||_0xc87b23(0x166);this[_0xc87b23(0x168)]=resolveSite(_0x4b8388),this[_0xc87b23(0x19b)]=_0x40ec12[_0xc87b23(0x19b)],this['parent_segment']=_0x40ec12[_0xc87b23(0x17c)],this['segment_path']=_0x40ec12['segment_path'],this[_0xc87b23(0x193)]=_0x40ec12['llm_project'],this[_0xc87b23(0x198)]=_0x16aa52[_0xc87b23(0x198)]||![],this[_0xc87b23(0x16e)]=_0x16aa52[_0xc87b23(0x16e)]??LogLevel[_0xc87b23(0x177)],this[_0xc87b23(0x16b)]=getAPIKey(this['site'],this[_0xc87b23(0x17e)]||undefined);const _0x1d4cad=getConfigDir(),_0x30afbc=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,_0xc87b23(0x173),this[_0xc87b23(0x15d)]+_0xc87b23(0x180)),_0x3ef95d=findProjectConfigPath(),_0x18cedc=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,_0xc87b23(0x189)),_0x5befd8=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,_0xc87b23(0x15f));let _0xe9ebef=null,_0x128fda=null;this[_0xc87b23(0x17e)]&&(_0xe9ebef=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,_0xc87b23(0x171),this[_0xc87b23(0x17e)],_0xc87b23(0x189)),_0x128fda=a35_0x183dc8[_0xc87b23(0x197)](_0x1d4cad,'profiles',this[_0xc87b23(0x17e)],'.env')),this[_0xc87b23(0x18b)]={'session':a35_0x17afa9[_0xc87b23(0x176)](_0x30afbc)?_0x30afbc:null,'project':_0x3ef95d,'profile':_0xe9ebef&&a35_0x17afa9['existsSync'](_0xe9ebef)?_0xe9ebef:null,'profileCredentials':_0x128fda&&a35_0x17afa9[_0xc87b23(0x176)](_0x128fda)?_0x128fda:null,'global':a35_0x17afa9[_0xc87b23(0x176)](_0x18cedc)?_0x18cedc:null,'globalCredentials':a35_0x17afa9[_0xc87b23(0x176)](_0x5befd8)?_0x5befd8:null};}[a35_0x4d679b(0x185)](_0x5b49a5,_0x14d741){const _0x5d058f=a35_0x4d679b;if(!_0x14d741)return _0x5d058f(0x186);const _0x5503bd=_0x14d741;if(this[_0x5d058f(0x182)]['cliFlags'][_0x5b49a5]===_0x5503bd){if(_0x5b49a5===_0x5d058f(0x168)&&_0x5503bd===_0x5d058f(0x166)&&!this[_0x5d058f(0x182)][_0x5d058f(0x196)][_0x5d058f(0x168)]&&!this[_0x5d058f(0x182)][_0x5d058f(0x199)][_0x5d058f(0x168)]&&!this[_0x5d058f(0x182)]['profile'][_0x5d058f(0x168)]&&!this[_0x5d058f(0x182)]['global'][_0x5d058f(0x168)])return'default';return _0x5d058f(0x170)+_0x5b49a5[_0x5d058f(0x158)](/_/g,'-');}if(this[_0x5d058f(0x182)][_0x5d058f(0x196)][_0x5b49a5]===_0x5503bd)return _0x5d058f(0x196);if(this[_0x5d058f(0x182)][_0x5d058f(0x199)][_0x5b49a5]===_0x5503bd)return'project';if(this[_0x5d058f(0x182)][_0x5d058f(0x178)][_0x5b49a5]===_0x5503bd)return _0x5d058f(0x183)+this[_0x5d058f(0x17e)];if(this[_0x5d058f(0x182)][_0x5d058f(0x15e)][_0x5b49a5]===_0x5503bd)return _0x5d058f(0x15e);return _0x5d058f(0x159);}[a35_0x4d679b(0x172)](){const _0x217715=a35_0x4d679b,_0x16e682=a35_0x183dc8['join'](getConfigDir(),_0x217715(0x189));if(!a35_0x17afa9[_0x217715(0x176)](_0x16e682))return{};try{const _0xcfe82c=a35_0x17afa9[_0x217715(0x16f)](_0x16e682,_0x217715(0x188));return JSON[_0x217715(0x18f)](_0xcfe82c);}catch{return{};}}[a35_0x4d679b(0x165)](_0x1d5c14){const _0x5ce5cd=a35_0x4d679b;_0x1d5c14['site']=this[_0x5ce5cd(0x168)],!_0x1d5c14['database']&&this['database']&&(_0x1d5c14[_0x5ce5cd(0x19b)]=this['database']),!_0x1d5c14[_0x5ce5cd(0x17a)]&&this[_0x5ce5cd(0x17c)]&&(_0x1d5c14[_0x5ce5cd(0x17a)]=this['parent_segment']),!_0x1d5c14[_0x5ce5cd(0x19a)]&&this[_0x5ce5cd(0x18d)]&&(_0x1d5c14[_0x5ce5cd(0x19a)]=this[_0x5ce5cd(0x18d)]),!_0x1d5c14[_0x5ce5cd(0x16a)]&&this['llm_project']&&(_0x1d5c14[_0x5ce5cd(0x16a)]=this[_0x5ce5cd(0x193)]);}[a35_0x4d679b(0x175)](){const _0x1deab8=a35_0x4d679b;return[{'key':'site','value':this[_0x1deab8(0x168)]},{'key':_0x1deab8(0x19b),'value':this[_0x1deab8(0x19b)]},{'key':'parent_segment','value':this[_0x1deab8(0x17c)]},{'key':_0x1deab8(0x18d),'value':this['segment_path']},{'key':'llm_project','value':this[_0x1deab8(0x193)]},{'key':_0x1deab8(0x178),'value':this[_0x1deab8(0x17e)]||undefined}];}[a35_0x4d679b(0x163)](){const _0x2c3767=a35_0x4d679b;console[_0x2c3767(0x15b)](_0x2c3767(0x15c));for(const {key:_0x33c99d,value:_0x3916e1}of this[_0x2c3767(0x175)]()){_0x3916e1&&console['log'](_0x33c99d+':\x20'+_0x3916e1);}}['displayWithSources'](){const _0x23094e=a35_0x4d679b;console[_0x23094e(0x15b)](_0x23094e(0x15c));for(const {key:_0x3a6627,value:_0x13e3b3}of this[_0x23094e(0x175)]()){if(_0x13e3b3){const _0x57e0d2=_0x3a6627===_0x23094e(0x178)?_0x23094e(0x179):'('+this[_0x23094e(0x185)](_0x3a6627,_0x13e3b3)+')';console[_0x23094e(0x15b)](_0x3a6627+':\x20'+_0x13e3b3+'\x20'+_0x57e0d2);}}console[_0x23094e(0x15b)](_0x23094e(0x192));const _0x5010a5=[{'label':_0x23094e(0x161),'path':this[_0x23094e(0x18b)][_0x23094e(0x196)],'extra':_0x23094e(0x16d)+this['sessionId']+')'},{'label':_0x23094e(0x18a),'path':this[_0x23094e(0x18b)][_0x23094e(0x199)]},{'label':_0x23094e(0x191),'path':this[_0x23094e(0x18b)][_0x23094e(0x178)]},{'label':_0x23094e(0x17d),'path':this[_0x23094e(0x18b)][_0x23094e(0x181)]},{'label':_0x23094e(0x157),'path':this[_0x23094e(0x18b)][_0x23094e(0x15e)]},{'label':_0x23094e(0x184),'path':this[_0x23094e(0x18b)][_0x23094e(0x17f)]}];for(const {label:_0x1f0da8,path:_0x131856,extra:_0x597a2a}of _0x5010a5){if(_0x131856)console[_0x23094e(0x15b)](_0x1f0da8+':\x20'+_0x131856+'\x20✓'+(_0x597a2a?'\x20'+_0x597a2a:''));else{if(_0x1f0da8===_0x23094e(0x161))console[_0x23094e(0x15b)](_0x1f0da8+_0x23094e(0x164)+this['sessionId']+')');else(_0x1f0da8===_0x23094e(0x18a)||_0x1f0da8===_0x23094e(0x157))&&console[_0x23094e(0x15b)](_0x1f0da8+':\x20none');}}}}function a35_0x449c(){const _0x16134c=['globalCredentials','.json','profileCredentials','layers','profile:\x20','Global\x20Credentials','getSource','not\x20set','12mlzMJr','utf-8','tdx.json','Project','configFiles','entries','segment_path','14700627UJEDko','parse','573099okhTAo','Profile','\x0a[configuration\x20files]','llm_project','toString','string','session','join','verbose','project','segmentPath','database','5041372YJNgaX','Global','replace','default','3520405ZsyQjT','log','[context]','sessionId','global','.env','ppid','Session','3jStpTy','display',':\x20none\x20(using\x20session:\x20','injectIntoOptions','us01','cliFlags','site','8087080NANHSL','llmProject','apiKey','2369584AxhvgA','(session:\x20','logLevel','readFileSync','CLI\x20flag:\x20--','profiles','loadGlobalConfig','sessions','config','getParameters','existsSync','INFO','profile','(active)','parentSegment','8437525wVdwCv','parent_segment','Profile\x20Credentials','activeProfile'];a35_0x449c=function(){return _0x16134c;};return a35_0x449c();}
1
+ const a35_0x50be37=a35_0xd2ee;(function(_0x345b49,_0x1c2778){const _0x256471=a35_0xd2ee,_0x54e106=_0x345b49();while(!![]){try{const _0x47e6ea=parseInt(_0x256471(0xd7))/0x1+-parseInt(_0x256471(0xed))/0x2*(parseInt(_0x256471(0xf3))/0x3)+-parseInt(_0x256471(0xf4))/0x4*(parseInt(_0x256471(0xf6))/0x5)+-parseInt(_0x256471(0xd8))/0x6*(parseInt(_0x256471(0xc8))/0x7)+parseInt(_0x256471(0xc4))/0x8*(parseInt(_0x256471(0xde))/0x9)+parseInt(_0x256471(0xec))/0xa*(-parseInt(_0x256471(0xc3))/0xb)+parseInt(_0x256471(0xe2))/0xc;if(_0x47e6ea===_0x1c2778)break;else _0x54e106['push'](_0x54e106['shift']());}catch(_0x23c7be){_0x54e106['push'](_0x54e106['shift']());}}}(a35_0x2c10,0x4d2fc));function a35_0xd2ee(_0x5626b9,_0x581c40){const _0x2c1044=a35_0x2c10();return a35_0xd2ee=function(_0xd2ee30,_0x4a97cf){_0xd2ee30=_0xd2ee30-0xb5;let _0x5d91f3=_0x2c1044[_0xd2ee30];return _0x5d91f3;},a35_0xd2ee(_0x5626b9,_0x581c40);}function a35_0x2c10(){const _0x4ba2e7=['replace','parentSegment','entries','profile','260OfTtYF','399478LotqkA','default','profile:\x20','apiKey','config','injectIntoOptions','3GtYyWA','6136bMDyDh','string','565rfmPHf','activeProfile','utf-8','configFiles','global','Profile\x20Credentials','llm_project','[context]','display','\x0a[configuration\x20files]','logLevel','INFO','verbose','Profile','llmProject','project','not\x20set','153593tkvqtA','8JFyvEx','Global','existsSync','(session:\x20','1401197PuzSjl','loadGlobalConfig','Project','getParameters',':\x20none','.env','segmentPath','us01',':\x20none\x20(using\x20session:\x20','log','session','cliFlags','tdx.json','CLI\x20flag:\x20--','profileCredentials','494503vImXKq','12QHmeMw','getSource','parse','site','.json','layers','2221227DnVScA','database','Session','join','8535732DnkYiO','sessionId','displayWithSources','profiles','parent_segment','segment_path'];a35_0x2c10=function(){return _0x4ba2e7;};return a35_0x2c10();}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{LogLevel}from'../utils/tdx-logger.js';import*as a35_0x3445d3 from'node:fs';import*as a35_0x7bce53 from'node:path';export class GlobalContext{[a35_0x50be37(0xdb)];[a35_0x50be37(0xdf)];[a35_0x50be37(0xe6)];[a35_0x50be37(0xe7)];[a35_0x50be37(0xb8)];['apiKey'];[a35_0x50be37(0xbe)];[a35_0x50be37(0xbc)];['layers'];[a35_0x50be37(0xf7)];['sessionId'];[a35_0x50be37(0xb5)];constructor(_0x4e473c){const _0x1ce954=a35_0x50be37;this[_0x1ce954(0xe3)]=_0x4e473c[_0x1ce954(0xd2)]||process['ppid']['toString']();const _0x19202b=loadSessionContext(_0x4e473c[_0x1ce954(0xd2)]),_0xa84fd9=loadProjectConfig(),_0x37b1f9=this[_0x1ce954(0xc9)]();this['activeProfile']=_0x4e473c['profile']||_0x19202b?.[_0x1ce954(0xeb)]||_0x37b1f9[_0x1ce954(0xeb)]||getActiveProfile();const _0x282d14=this[_0x1ce954(0xf7)]?loadProfile(this[_0x1ce954(0xf7)]):null,_0x3b7468=_0x11bfec=>{const _0x32bf0b=_0x1ce954;if(!_0x11bfec)return{};const _0x9f2481=_0x11bfec,_0x4dd047={};for(const [_0x348972,_0x50c206]of Object[_0x32bf0b(0xea)](_0x9f2481)){typeof _0x50c206===_0x32bf0b(0xf5)&&(_0x4dd047[_0x348972]=_0x50c206);}return _0x4dd047;},_0x38e7bb={};if(_0x4e473c[_0x1ce954(0xdb)]&&_0x4e473c['site']!==_0x1ce954(0xcf))_0x38e7bb[_0x1ce954(0xdb)]=_0x4e473c[_0x1ce954(0xdb)];const _0x5224b8=_0x19202b?.[_0x1ce954(0xdf)],_0x10f974=_0xa84fd9?.['database'],_0x512f55=_0x282d14?.[_0x1ce954(0xf1)]?.[_0x1ce954(0xdf)],_0x314ecc=_0x37b1f9[_0x1ce954(0xdf)];_0x4e473c[_0x1ce954(0xdf)]&&(_0x4e473c[_0x1ce954(0xdf)]!==_0x5224b8&&_0x4e473c[_0x1ce954(0xdf)]!==_0x10f974&&_0x4e473c['database']!==_0x512f55&&_0x4e473c[_0x1ce954(0xdf)]!==_0x314ecc)&&(_0x38e7bb[_0x1ce954(0xdf)]=_0x4e473c[_0x1ce954(0xdf)]);if(_0x4e473c['parentSegment'])_0x38e7bb[_0x1ce954(0xe6)]=_0x4e473c[_0x1ce954(0xe9)];if(_0x4e473c['llmProject'])_0x38e7bb[_0x1ce954(0xb8)]=_0x4e473c[_0x1ce954(0xc0)];if(_0x4e473c['profile'])_0x38e7bb[_0x1ce954(0xeb)]=_0x4e473c[_0x1ce954(0xeb)];this['layers']={'cliFlags':_0x38e7bb,'session':_0x3b7468(_0x19202b),'project':_0x3b7468(_0xa84fd9),'profile':_0x3b7468(_0x282d14?.[_0x1ce954(0xf1)]),'global':_0x3b7468(_0x37b1f9)};const _0x3ed4ae={...this[_0x1ce954(0xdd)][_0x1ce954(0xb6)],...this['layers'][_0x1ce954(0xeb)],...this[_0x1ce954(0xdd)][_0x1ce954(0xc1)],...this[_0x1ce954(0xdd)][_0x1ce954(0xd2)],...this[_0x1ce954(0xdd)][_0x1ce954(0xd3)]},_0x4f4658=_0x3ed4ae[_0x1ce954(0xdb)]||_0x1ce954(0xcf);this[_0x1ce954(0xdb)]=resolveSite(_0x4f4658),this[_0x1ce954(0xdf)]=_0x3ed4ae[_0x1ce954(0xdf)],this[_0x1ce954(0xe6)]=_0x3ed4ae[_0x1ce954(0xe6)],this[_0x1ce954(0xe7)]=_0x3ed4ae['segment_path'],this[_0x1ce954(0xb8)]=_0x3ed4ae[_0x1ce954(0xb8)],this[_0x1ce954(0xbe)]=_0x4e473c[_0x1ce954(0xbe)]||![],this[_0x1ce954(0xbc)]=_0x4e473c[_0x1ce954(0xbc)]??LogLevel[_0x1ce954(0xbd)],this[_0x1ce954(0xf0)]=getAPIKey(this[_0x1ce954(0xdb)],this[_0x1ce954(0xf7)]||undefined);const _0x524a99=getConfigDir(),_0x4db783=a35_0x7bce53[_0x1ce954(0xe1)](_0x524a99,'sessions',this[_0x1ce954(0xe3)]+_0x1ce954(0xdc)),_0x497f3a=findProjectConfigPath(),_0x45eb6b=a35_0x7bce53[_0x1ce954(0xe1)](_0x524a99,'tdx.json'),_0x118975=a35_0x7bce53['join'](_0x524a99,'.env');let _0x480306=null,_0x3a4f96=null;this[_0x1ce954(0xf7)]&&(_0x480306=a35_0x7bce53[_0x1ce954(0xe1)](_0x524a99,_0x1ce954(0xe5),this['activeProfile'],_0x1ce954(0xd4)),_0x3a4f96=a35_0x7bce53[_0x1ce954(0xe1)](_0x524a99,_0x1ce954(0xe5),this[_0x1ce954(0xf7)],_0x1ce954(0xcd))),this[_0x1ce954(0xb5)]={'session':a35_0x3445d3[_0x1ce954(0xc6)](_0x4db783)?_0x4db783:null,'project':_0x497f3a,'profile':_0x480306&&a35_0x3445d3[_0x1ce954(0xc6)](_0x480306)?_0x480306:null,'profileCredentials':_0x3a4f96&&a35_0x3445d3['existsSync'](_0x3a4f96)?_0x3a4f96:null,'global':a35_0x3445d3[_0x1ce954(0xc6)](_0x45eb6b)?_0x45eb6b:null,'globalCredentials':a35_0x3445d3['existsSync'](_0x118975)?_0x118975:null};}[a35_0x50be37(0xd9)](_0x3c16bb,_0x2bbdd6){const _0x1d81c0=a35_0x50be37;if(!_0x2bbdd6)return _0x1d81c0(0xc2);const _0x8226b5=_0x2bbdd6;if(this[_0x1d81c0(0xdd)][_0x1d81c0(0xd3)][_0x3c16bb]===_0x8226b5){if(_0x3c16bb===_0x1d81c0(0xdb)&&_0x8226b5===_0x1d81c0(0xcf)&&!this[_0x1d81c0(0xdd)][_0x1d81c0(0xd2)][_0x1d81c0(0xdb)]&&!this['layers'][_0x1d81c0(0xc1)]['site']&&!this[_0x1d81c0(0xdd)]['profile'][_0x1d81c0(0xdb)]&&!this[_0x1d81c0(0xdd)][_0x1d81c0(0xb6)][_0x1d81c0(0xdb)])return _0x1d81c0(0xee);return _0x1d81c0(0xd5)+_0x3c16bb[_0x1d81c0(0xe8)](/_/g,'-');}if(this[_0x1d81c0(0xdd)][_0x1d81c0(0xd2)][_0x3c16bb]===_0x8226b5)return _0x1d81c0(0xd2);if(this[_0x1d81c0(0xdd)][_0x1d81c0(0xc1)][_0x3c16bb]===_0x8226b5)return'project';if(this[_0x1d81c0(0xdd)][_0x1d81c0(0xeb)][_0x3c16bb]===_0x8226b5)return _0x1d81c0(0xef)+this[_0x1d81c0(0xf7)];if(this[_0x1d81c0(0xdd)][_0x1d81c0(0xb6)][_0x3c16bb]===_0x8226b5)return _0x1d81c0(0xb6);return _0x1d81c0(0xee);}[a35_0x50be37(0xc9)](){const _0x589bc1=a35_0x50be37,_0x588c60=a35_0x7bce53[_0x589bc1(0xe1)](getConfigDir(),_0x589bc1(0xd4));if(!a35_0x3445d3['existsSync'](_0x588c60))return{};try{const _0x440198=a35_0x3445d3['readFileSync'](_0x588c60,_0x589bc1(0xf8));return JSON[_0x589bc1(0xda)](_0x440198);}catch{return{};}}[a35_0x50be37(0xf2)](_0x25f22b){const _0x59225e=a35_0x50be37;_0x25f22b[_0x59225e(0xdb)]=this[_0x59225e(0xdb)],!_0x25f22b[_0x59225e(0xdf)]&&this['database']&&(_0x25f22b['database']=this['database']),!_0x25f22b['parentSegment']&&this['parent_segment']&&(_0x25f22b['parentSegment']=this[_0x59225e(0xe6)]),!_0x25f22b[_0x59225e(0xce)]&&this[_0x59225e(0xe7)]&&(_0x25f22b[_0x59225e(0xce)]=this['segment_path']),!_0x25f22b['llmProject']&&this[_0x59225e(0xb8)]&&(_0x25f22b['llmProject']=this[_0x59225e(0xb8)]);}['getParameters'](){const _0x269a35=a35_0x50be37;return[{'key':_0x269a35(0xdb),'value':this[_0x269a35(0xdb)]},{'key':_0x269a35(0xdf),'value':this[_0x269a35(0xdf)]},{'key':_0x269a35(0xe6),'value':this[_0x269a35(0xe6)]},{'key':'segment_path','value':this[_0x269a35(0xe7)]},{'key':_0x269a35(0xb8),'value':this['llm_project']},{'key':_0x269a35(0xeb),'value':this[_0x269a35(0xf7)]||undefined}];}[a35_0x50be37(0xba)](){const _0x111e05=a35_0x50be37;console[_0x111e05(0xd1)]('[context]');for(const {key:_0x51862d,value:_0x5933d0}of this[_0x111e05(0xcb)]()){_0x5933d0&&console[_0x111e05(0xd1)](_0x51862d+':\x20'+_0x5933d0);}}[a35_0x50be37(0xe4)](){const _0x1893ff=a35_0x50be37;console[_0x1893ff(0xd1)](_0x1893ff(0xb9));for(const {key:_0xcefe5e,value:_0x1b29a1}of this[_0x1893ff(0xcb)]()){if(_0x1b29a1){const _0x525031=_0xcefe5e===_0x1893ff(0xeb)?'(active)':'('+this[_0x1893ff(0xd9)](_0xcefe5e,_0x1b29a1)+')';console['log'](_0xcefe5e+':\x20'+_0x1b29a1+'\x20'+_0x525031);}}console['log'](_0x1893ff(0xbb));const _0x2bc021=[{'label':_0x1893ff(0xe0),'path':this[_0x1893ff(0xb5)][_0x1893ff(0xd2)],'extra':_0x1893ff(0xc7)+this['sessionId']+')'},{'label':'Project','path':this[_0x1893ff(0xb5)][_0x1893ff(0xc1)]},{'label':_0x1893ff(0xbf),'path':this[_0x1893ff(0xb5)][_0x1893ff(0xeb)]},{'label':_0x1893ff(0xb7),'path':this[_0x1893ff(0xb5)][_0x1893ff(0xd6)]},{'label':_0x1893ff(0xc5),'path':this[_0x1893ff(0xb5)][_0x1893ff(0xb6)]},{'label':'Global\x20Credentials','path':this[_0x1893ff(0xb5)]['globalCredentials']}];for(const {label:_0x1327a1,path:_0x483ec2,extra:_0x3ee147}of _0x2bc021){if(_0x483ec2)console[_0x1893ff(0xd1)](_0x1327a1+':\x20'+_0x483ec2+'\x20✓'+(_0x3ee147?'\x20'+_0x3ee147:''));else{if(_0x1327a1===_0x1893ff(0xe0))console[_0x1893ff(0xd1)](_0x1327a1+_0x1893ff(0xd0)+this[_0x1893ff(0xe3)]+')');else(_0x1327a1===_0x1893ff(0xca)||_0x1327a1===_0x1893ff(0xc5))&&console[_0x1893ff(0xd1)](_0x1327a1+_0x1893ff(0xcc));}}}}