@treasuredata/tdx 2026.7.2 → 2026.7.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 (246) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.d.ts.map +1 -1
  10. package/dist/commands/auth-command.js +1 -1
  11. package/dist/commands/auth-command.js.map +1 -1
  12. package/dist/commands/cas-command.js +1 -1
  13. package/dist/commands/cas-segment-command.js +1 -1
  14. package/dist/commands/chat-command.js +1 -1
  15. package/dist/commands/claude-command.d.ts.map +1 -1
  16. package/dist/commands/claude-command.js +1 -1
  17. package/dist/commands/claude-command.js.map +1 -1
  18. package/dist/commands/claude-statusline-command.js +1 -1
  19. package/dist/commands/claude-usage-command.js +1 -1
  20. package/dist/commands/command.js +1 -1
  21. package/dist/commands/connection-command.js +1 -1
  22. package/dist/commands/databases.js +1 -1
  23. package/dist/commands/delivery-command.js +1 -1
  24. package/dist/commands/describe.js +1 -1
  25. package/dist/commands/engage-campaign-pull-command.js +1 -1
  26. package/dist/commands/engage-campaign-push-command.js +1 -1
  27. package/dist/commands/engage-campaign-validate-command.js +1 -1
  28. package/dist/commands/engage-command.js +1 -1
  29. package/dist/commands/engage-template-pull-command.js +1 -1
  30. package/dist/commands/engage-template-push-command.js +1 -1
  31. package/dist/commands/engage-template-validate-command.js +1 -1
  32. package/dist/commands/job-command.js +1 -1
  33. package/dist/commands/journey-command.js +1 -1
  34. package/dist/commands/journey-validate-command.js +1 -1
  35. package/dist/commands/llm-command.js +1 -1
  36. package/dist/commands/mcp-command.js +1 -1
  37. package/dist/commands/parent-segment-command.js +1 -1
  38. package/dist/commands/policy-command.js +1 -1
  39. package/dist/commands/profile-command.js +1 -1
  40. package/dist/commands/profiles-command.js +1 -1
  41. package/dist/commands/query-command.js +1 -1
  42. package/dist/commands/schedule-command.js +1 -1
  43. package/dist/commands/segment-command.js +1 -1
  44. package/dist/commands/segment-create-command.js +1 -1
  45. package/dist/commands/segment-fields-command.js +1 -1
  46. package/dist/commands/segment-move-command.js +1 -1
  47. package/dist/commands/segment-pull-command.js +1 -1
  48. package/dist/commands/segment-push-command.js +1 -1
  49. package/dist/commands/segment-update-command.js +1 -1
  50. package/dist/commands/segment-use-command.js +1 -1
  51. package/dist/commands/segment-validate-command.js +1 -1
  52. package/dist/commands/segments.js +1 -1
  53. package/dist/commands/show.js +1 -1
  54. package/dist/commands/status-command.js +1 -1
  55. package/dist/commands/table-deleted.js +1 -1
  56. package/dist/commands/tables.js +1 -1
  57. package/dist/commands/unset-command.js +1 -1
  58. package/dist/commands/upgrade-command.js +1 -1
  59. package/dist/commands/use-command.js +1 -1
  60. package/dist/commands/user-command.js +1 -1
  61. package/dist/commands/work-command.js +1 -1
  62. package/dist/commands/workflow-command.js +1 -1
  63. package/dist/core/auth.js +1 -1
  64. package/dist/core/command-output.js +1 -1
  65. package/dist/core/config.js +1 -1
  66. package/dist/core/connection-cache.js +1 -1
  67. package/dist/core/constants.js +1 -1
  68. package/dist/core/credential-cache.js +1 -1
  69. package/dist/core/global-context.js +1 -1
  70. package/dist/core/keychain.js +1 -1
  71. package/dist/core/oauth-keychain.js +1 -1
  72. package/dist/core/oauth.d.ts +11 -2
  73. package/dist/core/oauth.d.ts.map +1 -1
  74. package/dist/core/oauth.js +1 -1
  75. package/dist/core/oauth.js.map +1 -1
  76. package/dist/core/profile.js +1 -1
  77. package/dist/core/project-config.js +1 -1
  78. package/dist/core/session.js +1 -1
  79. package/dist/core/user-cache.js +1 -1
  80. package/dist/core/version.js +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/mcp/server.js +1 -1
  83. package/dist/mcp/tools/index.js +1 -1
  84. package/dist/mcp/tools/tdx-run.js +1 -1
  85. package/dist/mcp/tools/tdx-search.js +1 -1
  86. package/dist/mcp/tools/work-create-item.js +1 -1
  87. package/dist/mcp/utils.js +1 -1
  88. package/dist/proxy/claude-usage-tracker.js +1 -1
  89. package/dist/proxy/passthrough-server.d.ts +16 -0
  90. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  91. package/dist/proxy/passthrough-server.js +1 -1
  92. package/dist/proxy/passthrough-server.js.map +1 -1
  93. package/dist/proxy/sse-usage-parser.js +1 -1
  94. package/dist/sdk/agent/agent-config.js +1 -1
  95. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  96. package/dist/sdk/agent/agent-yaml.js +1 -1
  97. package/dist/sdk/agent/test/evaluator.js +1 -1
  98. package/dist/sdk/agent/test/executor.js +1 -1
  99. package/dist/sdk/agent/test/index.js +1 -1
  100. package/dist/sdk/agent/test/output.js +1 -1
  101. package/dist/sdk/agent/test/parser.js +1 -1
  102. package/dist/sdk/agent/tool-target-registry.js +1 -1
  103. package/dist/sdk/api.js +1 -1
  104. package/dist/sdk/cas/cas-api-client.js +1 -1
  105. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  106. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  107. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  108. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  109. package/dist/sdk/cas/index.js +1 -1
  110. package/dist/sdk/cas/pull-workflow.js +1 -1
  111. package/dist/sdk/cas/push-workflow.js +1 -1
  112. package/dist/sdk/cas/validate-files.js +1 -1
  113. package/dist/sdk/client/cdp-api-client.js +1 -1
  114. package/dist/sdk/client/delivery-api-client.js +1 -1
  115. package/dist/sdk/client/endpoints.js +1 -1
  116. package/dist/sdk/client/engage-api-client.js +1 -1
  117. package/dist/sdk/client/http-client.js +1 -1
  118. package/dist/sdk/client/llm-api-client.js +1 -1
  119. package/dist/sdk/client/oauth-refresh.d.ts +5 -1
  120. package/dist/sdk/client/oauth-refresh.d.ts.map +1 -1
  121. package/dist/sdk/client/oauth-refresh.js +1 -1
  122. package/dist/sdk/client/oauth-refresh.js.map +1 -1
  123. package/dist/sdk/client/rate-limiter.js +1 -1
  124. package/dist/sdk/client/td-api-client.js +1 -1
  125. package/dist/sdk/client/trino-api-client.js +1 -1
  126. package/dist/sdk/client/workflow-client.js +1 -1
  127. package/dist/sdk/connection-validator.js +1 -1
  128. package/dist/sdk/connection.js +1 -1
  129. package/dist/sdk/delivery.js +1 -1
  130. package/dist/sdk/engage/campaign-pull.js +1 -1
  131. package/dist/sdk/engage/campaign-push.js +1 -1
  132. package/dist/sdk/engage/campaign-validator.js +1 -1
  133. package/dist/sdk/engage/campaign-yaml.js +1 -1
  134. package/dist/sdk/engage/template-pull.js +1 -1
  135. package/dist/sdk/engage/template-push.js +1 -1
  136. package/dist/sdk/engage/template-validator.js +1 -1
  137. package/dist/sdk/engage/template-yaml.js +1 -1
  138. package/dist/sdk/engage/types/campaign-def.js +1 -1
  139. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  140. package/dist/sdk/engage/types/template-schema.js +1 -1
  141. package/dist/sdk/engage.js +1 -1
  142. package/dist/sdk/errors.js +1 -1
  143. package/dist/sdk/index.js +1 -1
  144. package/dist/sdk/io/index.js +1 -1
  145. package/dist/sdk/io/node-filesystem.js +1 -1
  146. package/dist/sdk/job.js +1 -1
  147. package/dist/sdk/journey.js +1 -1
  148. package/dist/sdk/llm/chat-cache.js +1 -1
  149. package/dist/sdk/llm/index.js +1 -1
  150. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  151. package/dist/sdk/llm/model-factors.js +1 -1
  152. package/dist/sdk/llm/user-settings.js +1 -1
  153. package/dist/sdk/personalization.js +1 -1
  154. package/dist/sdk/policy.js +1 -1
  155. package/dist/sdk/query/deleted-table-validation.js +1 -1
  156. package/dist/sdk/query/index.js +1 -1
  157. package/dist/sdk/query/sql-parser.js +1 -1
  158. package/dist/sdk/realtime.js +1 -1
  159. package/dist/sdk/schedule.js +1 -1
  160. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  161. package/dist/sdk/segment/fields-display.js +1 -1
  162. package/dist/sdk/segment/file-discovery.js +1 -1
  163. package/dist/sdk/segment/journey-utils.js +1 -1
  164. package/dist/sdk/segment/journey-validator.js +1 -1
  165. package/dist/sdk/segment/journey-yaml.js +1 -1
  166. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  167. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  168. package/dist/sdk/segment/pull-workflow.js +1 -1
  169. package/dist/sdk/segment/push-recovery.js +1 -1
  170. package/dist/sdk/segment/push-workflow.js +1 -1
  171. package/dist/sdk/segment/resolution-context.js +1 -1
  172. package/dist/sdk/segment/segment-path-parser.js +1 -1
  173. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  174. package/dist/sdk/segment/segment-validator.js +1 -1
  175. package/dist/sdk/segment/target-resolution.js +1 -1
  176. package/dist/sdk/segment/tdx-config.js +1 -1
  177. package/dist/sdk/segment/types/activation-schema.js +1 -1
  178. package/dist/sdk/segment/types/journey-def.js +1 -1
  179. package/dist/sdk/segment/types/journey-schema.js +1 -1
  180. package/dist/sdk/segment/types/segment-def.js +1 -1
  181. package/dist/sdk/segment/types/segment-schema.js +1 -1
  182. package/dist/sdk/segment/validate-files.js +1 -1
  183. package/dist/sdk/segment/yaml-validator.js +1 -1
  184. package/dist/sdk/segment.js +1 -1
  185. package/dist/sdk/types/index.js +1 -1
  186. package/dist/sdk/types/progress.js +1 -1
  187. package/dist/sdk/types/workspace.js +1 -1
  188. package/dist/sdk/user.js +1 -1
  189. package/dist/sdk/util/format-detector.js +1 -1
  190. package/dist/sdk/util/formatters.js +1 -1
  191. package/dist/sdk/util/index.js +1 -1
  192. package/dist/sdk/util/paginate.js +1 -1
  193. package/dist/sdk/util/tree-formatter.js +1 -1
  194. package/dist/sdk/util/tree-search.js +1 -1
  195. package/dist/sdk/workflow/archive-validation.js +1 -1
  196. package/dist/sdk/workflow/clone-workflow.js +1 -1
  197. package/dist/sdk/workflow/index.js +1 -1
  198. package/dist/sdk/workflow/pull-workflow.js +1 -1
  199. package/dist/sdk/workflow/push-workflow.js +1 -1
  200. package/dist/sdk/workflow/task-graph.js +1 -1
  201. package/dist/sdk/workflow/tdx-config.js +1 -1
  202. package/dist/sdk/workflow/workflow-utils.js +1 -1
  203. package/dist/sdk/workspace/access-tracker.js +1 -1
  204. package/dist/sdk/workspace/frontmatter.js +1 -1
  205. package/dist/sdk/workspace/git.js +1 -1
  206. package/dist/sdk/workspace/index.js +1 -1
  207. package/dist/sdk/workspace/templates.js +1 -1
  208. package/dist/sdk/workspace/weekly.js +1 -1
  209. package/dist/sdk/workspace/wikilinks.js +1 -1
  210. package/dist/test-utils/command-runner.js +1 -1
  211. package/dist/test-utils/factories.js +1 -1
  212. package/dist/test-utils/fixtures.js +1 -1
  213. package/dist/test-utils/http-mock.js +1 -1
  214. package/dist/test-utils/index.js +1 -1
  215. package/dist/utils/async.js +1 -1
  216. package/dist/utils/colors.js +1 -1
  217. package/dist/utils/diff.js +1 -1
  218. package/dist/utils/file-permissions.js +1 -1
  219. package/dist/utils/file-reader.js +1 -1
  220. package/dist/utils/github-releases.js +1 -1
  221. package/dist/utils/global-cache.js +1 -1
  222. package/dist/utils/json-loader.js +1 -1
  223. package/dist/utils/local-cache.js +1 -1
  224. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  225. package/dist/utils/logger/formatters/index.js +1 -1
  226. package/dist/utils/logger/handlers/console-handler.js +1 -1
  227. package/dist/utils/logger/handlers/file-handler.js +1 -1
  228. package/dist/utils/logger/handlers/index.js +1 -1
  229. package/dist/utils/logger/handlers/null-handler.js +1 -1
  230. package/dist/utils/logger/index.js +1 -1
  231. package/dist/utils/logger/logger.js +1 -1
  232. package/dist/utils/logger/types.js +1 -1
  233. package/dist/utils/option-validation.js +1 -1
  234. package/dist/utils/process.js +1 -1
  235. package/dist/utils/prompt.js +1 -1
  236. package/dist/utils/proxy-fetch.d.ts +29 -0
  237. package/dist/utils/proxy-fetch.d.ts.map +1 -0
  238. package/dist/utils/proxy-fetch.js +1 -0
  239. package/dist/utils/proxy-fetch.js.map +1 -0
  240. package/dist/utils/spinner.js +1 -1
  241. package/dist/utils/sse-parser.js +1 -1
  242. package/dist/utils/string-utils.js +1 -1
  243. package/dist/utils/table-ref-parser.js +1 -1
  244. package/dist/utils/tdx-logger.js +1 -1
  245. package/dist/utils/version-check.js +1 -1
  246. package/package.json +1 -1
@@ -1 +1 @@
1
- const a67_0x6b6cb2=a67_0x45c8;(function(_0x3d1e32,_0x1e6e92){const _0x557d68=a67_0x45c8,_0x48162c=_0x3d1e32();while(!![]){try{const _0x53a51d=-parseInt(_0x557d68(0xf9))/0x1*(-parseInt(_0x557d68(0xea))/0x2)+-parseInt(_0x557d68(0xff))/0x3*(parseInt(_0x557d68(0x111))/0x4)+parseInt(_0x557d68(0x102))/0x5+parseInt(_0x557d68(0xf3))/0x6+-parseInt(_0x557d68(0x120))/0x7*(-parseInt(_0x557d68(0x122))/0x8)+parseInt(_0x557d68(0x101))/0x9+-parseInt(_0x557d68(0xe1))/0xa*(parseInt(_0x557d68(0xd9))/0xb);if(_0x53a51d===_0x1e6e92)break;else _0x48162c['push'](_0x48162c['shift']());}catch(_0x445da8){_0x48162c['push'](_0x48162c['shift']());}}}(a67_0x2c9b,0x6b2b5));import*as a67_0x37de71 from'node:fs';import*as a67_0x57df02 from'node:path';import{SDKError,ErrorCode}from'../sdk/errors.js';import{getConfigDir}from'./config.js';import{createSecureDirectory,writeSecureFile}from'../utils/file-permissions.js';import{findProjectConfigPath}from'./project-config.js';import{loadSessionContext}from'./session.js';export const STUDIO_PROFILE_NAME=a67_0x6b6cb2(0x10c);export function getProfileParams(_0x26b932){const _0x4af1c0=a67_0x6b6cb2,_0x2b64d3={};if(!_0x26b932)return _0x2b64d3;for(const [_0x382b7e,_0x3fa4a0]of Object['entries'](_0x26b932)){_0x382b7e!==_0x4af1c0(0xdc)&&_0x3fa4a0!==undefined&&(_0x2b64d3[_0x382b7e]=_0x3fa4a0);}return _0x2b64d3;}export function getProfilesDir(){const _0x2b979c=a67_0x6b6cb2;return a67_0x57df02[_0x2b979c(0x114)](getConfigDir(),'profiles');}function getProfileDir(_0x50aa19){const _0x2b9fce=a67_0x6b6cb2;return a67_0x57df02[_0x2b9fce(0x114)](getProfilesDir(),_0x50aa19);}function getProfileConfigPath(_0x43f4ce){const _0x2148d9=a67_0x6b6cb2;return a67_0x57df02[_0x2148d9(0x114)](getProfileDir(_0x43f4ce),_0x2148d9(0x10f));}function getProfileEnvPath(_0x320999){const _0x497a39=a67_0x6b6cb2;return a67_0x57df02[_0x497a39(0x114)](getProfileDir(_0x320999),_0x497a39(0x119));}function getGlobalConfigPath(){const _0x508169=a67_0x6b6cb2;return a67_0x57df02[_0x508169(0x114)](getConfigDir(),_0x508169(0x10f));}function validateProfileName(_0x5b9339){const _0x34a1c8=a67_0x6b6cb2;if(/^@?[a-zA-Z0-9_-]+$/['test'](_0x5b9339))return;if(/^@tdx-studio:[a-zA-Z0-9_-]+:\d+(:\d+)?$/[_0x34a1c8(0x107)](_0x5b9339))return;throw new Error(_0x34a1c8(0x125)+_0x5b9339+'.\x20Must\x20contain\x20only\x20alphanumeric\x20characters,\x20dash,\x20underscore,\x20and\x20optional\x20@\x20prefix\x20for\x20reserved\x20profiles.');}function validateProfileConfig(_0x3ea8d0,_0x5066ae){const _0x24bb20=a67_0x6b6cb2;if(typeof _0x3ea8d0!==_0x24bb20(0x104)||_0x3ea8d0===null)throw new SDKError(ErrorCode[_0x24bb20(0xfa)],_0x24bb20(0xeb)+_0x5066ae+_0x24bb20(0xec));const _0x3a9b77=['description',_0x24bb20(0xf7),_0x24bb20(0x11b),_0x24bb20(0x11c),_0x24bb20(0xfb),'llm_agent',_0x24bb20(0x11d),_0x24bb20(0x10b)],_0x1c73b8=_0x3ea8d0;for(const _0x494ab8 of Object['keys'](_0x1c73b8)){!_0x3a9b77[_0x24bb20(0x123)](_0x494ab8)&&console[_0x24bb20(0x118)](_0x24bb20(0x106)+_0x5066ae+_0x24bb20(0xe6)+_0x494ab8+_0x24bb20(0xdf));}const _0x51c131=_0x3a9b77[_0x24bb20(0x105)](_0x15003f=>_0x15003f!==_0x24bb20(0x10b));for(const _0xfd981c of _0x51c131){if(_0x1c73b8[_0xfd981c]!==undefined&&typeof _0x1c73b8[_0xfd981c]!==_0x24bb20(0xef))throw new SDKError(ErrorCode[_0x24bb20(0xfa)],_0x24bb20(0xeb)+_0x5066ae+_0x24bb20(0xdb)+_0xfd981c+_0x24bb20(0x10d));}return!![];}function loadProfilesFromTdxJson(_0x352add,_0x54c0fc){const _0x100a50=a67_0x6b6cb2;if(!a67_0x37de71[_0x100a50(0xe9)](_0x352add))return[];try{const _0x2bfd86=a67_0x37de71['readFileSync'](_0x352add,_0x100a50(0xee)),_0x34aa03=JSON[_0x100a50(0x115)](_0x2bfd86);if(!_0x34aa03['profiles']||typeof _0x34aa03[_0x100a50(0x124)]!==_0x100a50(0x104))return[];const _0x2fdd6e=[];for(const [_0x5ea0ed,_0x23b99d]of Object[_0x100a50(0xf4)](_0x34aa03[_0x100a50(0x124)])){try{validateProfileConfig(_0x23b99d,_0x5ea0ed);const _0x45686e=getNewCredentialPath(_0x5ea0ed),_0x2c08ee=getOldCredentialPath(_0x5ea0ed),_0x821e91=a67_0x37de71[_0x100a50(0xe9)](_0x45686e)||a67_0x37de71['existsSync'](_0x2c08ee);_0x2fdd6e[_0x100a50(0xd8)]({'name':_0x5ea0ed,'config':_0x23b99d,'metadata':{'name':_0x5ea0ed,'createdAt':new Date()[_0x100a50(0xda)]()},'hasCredentials':_0x821e91,'scope':_0x54c0fc});}catch(_0x176fd5){_0x176fd5 instanceof Error&&(console[_0x100a50(0x118)](_0x100a50(0x10e)+_0x352add+':'),console[_0x100a50(0x118)]('\x20\x20'+_0x176fd5['message']+'\x0a'));}}return _0x2fdd6e;}catch(_0x15d776){return _0x15d776 instanceof SyntaxError?(console[_0x100a50(0x118)](_0x100a50(0x108)+_0x352add+_0x100a50(0x11e)),console[_0x100a50(0x118)](_0x100a50(0xde)+_0x15d776[_0x100a50(0xe2)]+'\x0a')):console['warn'](_0x100a50(0xf2)+_0x352add+':\x20'+_0x15d776+'\x0a'),[];}}export function getNewCredentialPath(_0x10f09a){return a67_0x57df02['join'](getConfigDir(),'.env.'+_0x10f09a);}function getOldCredentialPath(_0x5f1d06){const _0xcce4e7=a67_0x6b6cb2;return a67_0x57df02[_0xcce4e7(0x114)](getProfilesDir(),_0x5f1d06,_0xcce4e7(0x119));}function loadProfilesFromTdxJsonFiles(){const _0x3ce405=a67_0x6b6cb2,_0x306c86=[],_0x4caaad=findProjectConfigPath();_0x4caaad&&_0x306c86[_0x3ce405(0xd8)](...loadProfilesFromTdxJson(_0x4caaad,'local'));const _0x14f956=a67_0x57df02[_0x3ce405(0x114)](getConfigDir(),_0x3ce405(0x10f));return _0x306c86[_0x3ce405(0xd8)](...loadProfilesFromTdxJson(_0x14f956,_0x3ce405(0x100))),_0x306c86;}function loadProfilesFromDirectories(){const _0x31ccf9=a67_0x6b6cb2,_0x4345c5=getProfilesDir();if(!a67_0x37de71[_0x31ccf9(0xe9)](_0x4345c5))return[];try{return a67_0x37de71[_0x31ccf9(0xe0)](_0x4345c5,{'withFileTypes':!![]})[_0x31ccf9(0x105)](_0x5aa1ac=>_0x5aa1ac['isDirectory']())[_0x31ccf9(0xdd)](_0x562b09=>_0x562b09[_0x31ccf9(0xf1)])['filter'](_0x73631b=>{const _0x2cdd00=_0x31ccf9,_0x2ef7bf=getProfileConfigPath(_0x73631b),_0x3488d6=getProfileEnvPath(_0x73631b);return a67_0x37de71[_0x2cdd00(0xe9)](_0x2ef7bf)||a67_0x37de71[_0x2cdd00(0xe9)](_0x3488d6);})[_0x31ccf9(0xdd)](_0x1d243b=>{const _0xc72978=_0x31ccf9,_0x23d0fe=loadProfileFromDirectory(_0x1d243b);if(_0x23d0fe)return{..._0x23d0fe,'scope':_0xc72978(0x116)};return null;})[_0x31ccf9(0x105)](_0xefaf5e=>_0xefaf5e!==null);}catch{return[];}}function loadProfileFromDirectory(_0x199317){const _0x58fcff=a67_0x6b6cb2,_0x24d53b=getProfileConfigPath(_0x199317),_0x3bbb5c=getOldCredentialPath(_0x199317);if(!a67_0x37de71[_0x58fcff(0xe9)](_0x24d53b)&&!a67_0x37de71[_0x58fcff(0xe9)](_0x3bbb5c))return null;let _0x58283e={},_0x4ff699={'name':_0x199317,'createdAt':new Date()[_0x58fcff(0xda)]()};if(a67_0x37de71['existsSync'](_0x24d53b))try{const _0x40525e=a67_0x37de71[_0x58fcff(0x103)](_0x24d53b,'utf-8'),_0x33e32f=JSON[_0x58fcff(0x115)](_0x40525e),{metadata:_0x51d6ab,..._0x49862f}=_0x33e32f;_0x58283e=_0x49862f,_0x51d6ab&&(_0x4ff699=_0x51d6ab);}catch{}return{'name':_0x199317,'config':_0x58283e,'metadata':_0x4ff699,'hasCredentials':a67_0x37de71[_0x58fcff(0xe9)](_0x3bbb5c),'scope':_0x58fcff(0x116)};}export function listProfiles(){const _0xd905bc=a67_0x6b6cb2,_0x39930c=loadProfilesFromTdxJsonFiles(),_0x1b8cdc=loadProfilesFromDirectories();if(_0x1b8cdc[_0xd905bc(0x117)]>0x0){const _0x1c69a1=_0x1b8cdc[_0xd905bc(0xdd)](_0x4ca2ec=>_0x4ca2ec[_0xd905bc(0xf1)])['join'](',\x20'),_0x2b682d=getConfigDir();console[_0xd905bc(0x118)](_0xd905bc(0xf6)+_0x1c69a1),console['warn'](_0xd905bc(0xe5)),console['warn']('\x20\x201.\x20Edit:\x20'+a67_0x57df02['join'](_0x2b682d,_0xd905bc(0x10f))),console[_0xd905bc(0x118)](_0xd905bc(0xe7)),console[_0xd905bc(0x118)](_0xd905bc(0x10a));}const _0x3ca68b=[..._0x39930c,..._0x1b8cdc],_0xfcf0a1=new Map();for(const _0xe2651e of _0x3ca68b){!_0xfcf0a1[_0xd905bc(0xfe)](_0xe2651e[_0xd905bc(0xf1)])&&_0xfcf0a1[_0xd905bc(0x110)](_0xe2651e['name'],_0xe2651e);}return Array[_0xd905bc(0xe8)](_0xfcf0a1['values']())[_0xd905bc(0x113)]((_0x3b7b6f,_0x28026a)=>_0x3b7b6f[_0xd905bc(0xf1)][_0xd905bc(0xfd)](_0x28026a[_0xd905bc(0xf1)]));}function a67_0x2c9b(){const _0x566f59=['\x0aWarning:\x20Profiles\x20in\x20directories\x20are\x20deprecated:\x20','site','To\x20migrate:','40485VRDerX','INVALID_PROFILE_CONFIG','llm_project',',\x20creating\x20new\x20file','localeCompare','has','3879rOwGqY','user','5668758yfAkYg','4006700OQDXKS','readFileSync','object','filter','Warning:\x20Profile\x20\x27','test','\x0aWarning:\x20Failed\x20to\x20parse\x20','some','\x20\x203.\x20Move\x20credentials:\x20mv\x20~/.config/tdx/profiles/<name>/.env\x20~/.config/tdx/.env.<name>\x0a','user_info','@tdx-studio','\x27\x20must\x20be\x20a\x20string','\x0aWarning:\x20Skipping\x20invalid\x20profile\x20in\x20','tdx.json','set','2472zSXAUI','profile','sort','join','parse','directory','length','warn','.env','Warning:\x20Failed\x20to\x20parse\x20','database','parent_segment','account_name',':\x20Invalid\x20JSON\x20syntax','Profile\x20','17514eKSotV','\x0aWarning:\x20Using\x20deprecated\x20credential\x20location\x20for\x20profile\x20\x27','1544sbGMAO','includes','profiles','Invalid\x20profile\x20name:\x20','push','2640869CSXRML','toISOString','\x27:\x20\x27','description','map','Error:\x20','\x27\x20will\x20be\x20ignored','readdirSync','40lDBGaW','message','\x20\x20mv\x20\x22','Then\x20define\x20profiles\x20in\x20~/.config/tdx/tdx.json\x0a','Please\x20migrate\x20to\x20~/.config/tdx/tdx.json:','\x27:\x20unknown\x20config\x20key\x20\x27','\x20\x202.\x20Add\x20profiles\x20under\x20a\x20\x22profiles\x22\x20key\x20(see\x20\x27tdx\x20profiles\x27\x20for\x20current\x20config)','from','existsSync','2HRyASk','Profile\x20\x27','\x27:\x20config\x20must\x20be\x20an\x20object','\x20does\x20not\x20exist','utf-8','string','\x27\x20not\x20found\x20in\x20user\x20configuration','name','\x0aWarning:\x20Failed\x20to\x20load\x20profiles\x20from\x20','1462692IBPMhb','entries','stringify'];a67_0x2c9b=function(){return _0x566f59;};return a67_0x2c9b();}export function profileExists(_0x5e375d){const _0x1de6f5=a67_0x6b6cb2,_0x32dda1=listProfiles();return _0x32dda1[_0x1de6f5(0x109)](_0x21656e=>_0x21656e[_0x1de6f5(0xf1)]===_0x5e375d);}export function loadProfile(_0x17ae76){validateProfileName(_0x17ae76);const _0x403286=listProfiles(),_0x5b4d12=_0x403286['find'](_0x43f47b=>_0x43f47b['name']===_0x17ae76);return _0x5b4d12||null;}export function saveProfile(_0x1af395,_0x141119,_0x34d6f1=![]){saveProfileToUserConfig(_0x1af395,_0x141119);}export function deleteProfile(_0x518e9a){const _0xb4b140=a67_0x6b6cb2;validateProfileName(_0x518e9a);const _0x19ce96=getProfileDir(_0x518e9a);if(!a67_0x37de71[_0xb4b140(0xe9)](_0x19ce96))throw new Error('Profile\x20'+_0x518e9a+'\x20does\x20not\x20exist');a67_0x37de71['rmSync'](_0x19ce96,{'recursive':!![],'force':!![]});}export function saveProfileToUserConfig(_0x254cde,_0xc0a82e){const _0x5a96a0=a67_0x6b6cb2;validateProfileName(_0x254cde);const _0x5a65dd=getGlobalConfigPath(),_0x19cdf3=getConfigDir();!a67_0x37de71['existsSync'](_0x19cdf3)&&createSecureDirectory(_0x19cdf3);let _0x430b14={};if(a67_0x37de71[_0x5a96a0(0xe9)](_0x5a65dd))try{const _0x8316eb=a67_0x37de71[_0x5a96a0(0x103)](_0x5a65dd,_0x5a96a0(0xee));_0x430b14=JSON[_0x5a96a0(0x115)](_0x8316eb);}catch{console[_0x5a96a0(0x118)]('Warning:\x20Failed\x20to\x20parse\x20'+_0x5a65dd+_0x5a96a0(0xfc));}!_0x430b14[_0x5a96a0(0x124)]&&(_0x430b14[_0x5a96a0(0x124)]={}),_0x430b14[_0x5a96a0(0x124)][_0x254cde]=_0xc0a82e,writeSecureFile(_0x5a65dd,JSON['stringify'](_0x430b14,null,0x2));}export function removeProfileFromUserConfig(_0x15bf7f){const _0x4ea40e=a67_0x6b6cb2;validateProfileName(_0x15bf7f);const _0x52e03b=getGlobalConfigPath();if(!a67_0x37de71[_0x4ea40e(0xe9)](_0x52e03b))throw new Error(_0x4ea40e(0xeb)+_0x15bf7f+_0x4ea40e(0xf0));let _0xb0aced={};try{const _0x19e4ef=a67_0x37de71[_0x4ea40e(0x103)](_0x52e03b,_0x4ea40e(0xee));_0xb0aced=JSON['parse'](_0x19e4ef);}catch{throw new Error('Failed\x20to\x20parse\x20'+_0x52e03b);}if(!_0xb0aced[_0x4ea40e(0x124)]||!_0xb0aced['profiles'][_0x15bf7f])throw new Error('Profile\x20\x27'+_0x15bf7f+'\x27\x20not\x20found\x20in\x20user\x20configuration');delete _0xb0aced[_0x4ea40e(0x124)][_0x15bf7f],_0xb0aced[_0x4ea40e(0x112)]===_0x15bf7f&&delete _0xb0aced[_0x4ea40e(0x112)],writeSecureFile(_0x52e03b,JSON[_0x4ea40e(0xf5)](_0xb0aced,null,0x2));}export function getActiveProfile(){const _0x486165=a67_0x6b6cb2,_0x166e5b=loadSessionContext();if(_0x166e5b?.[_0x486165(0x112)])return _0x166e5b[_0x486165(0x112)];if(process.env.TDX_PROFILE)return process.env.TDX_PROFILE;const _0x2ae63c=getGlobalConfigPath();if(!a67_0x37de71[_0x486165(0xe9)](_0x2ae63c))return null;try{const _0x58cd10=a67_0x37de71[_0x486165(0x103)](_0x2ae63c,_0x486165(0xee)),_0x2be27d=JSON['parse'](_0x58cd10);return _0x2be27d[_0x486165(0x112)]||null;}catch{return null;}}export function saveDefaultSiteToUserConfig(_0xc8da2d){const _0x28e96e=a67_0x6b6cb2,_0x6bbde4=getGlobalConfigPath(),_0x5377c7=getConfigDir();!a67_0x37de71[_0x28e96e(0xe9)](_0x5377c7)&&createSecureDirectory(_0x5377c7);let _0x354c51={};if(a67_0x37de71['existsSync'](_0x6bbde4))try{const _0x3baf2f=a67_0x37de71['readFileSync'](_0x6bbde4,_0x28e96e(0xee));_0x354c51=JSON[_0x28e96e(0x115)](_0x3baf2f);}catch{console[_0x28e96e(0x118)](_0x28e96e(0x11a)+_0x6bbde4+_0x28e96e(0xfc));}_0x354c51[_0x28e96e(0xf7)]=_0xc8da2d,writeSecureFile(_0x6bbde4,JSON[_0x28e96e(0xf5)](_0x354c51,null,0x2));}export function saveActiveProfileToUserConfig(_0x15d376){const _0x81e0b8=a67_0x6b6cb2;validateProfileName(_0x15d376);const _0x287c13=getGlobalConfigPath(),_0x4a0599=getConfigDir();!a67_0x37de71[_0x81e0b8(0xe9)](_0x4a0599)&&createSecureDirectory(_0x4a0599);let _0xa667c8={};if(a67_0x37de71[_0x81e0b8(0xe9)](_0x287c13))try{const _0x9c0fef=a67_0x37de71['readFileSync'](_0x287c13,_0x81e0b8(0xee));_0xa667c8=JSON[_0x81e0b8(0x115)](_0x9c0fef);}catch{console['warn'](_0x81e0b8(0x11a)+_0x287c13+',\x20creating\x20new\x20file');}_0xa667c8['profile']=_0x15d376,writeSecureFile(_0x287c13,JSON['stringify'](_0xa667c8,null,0x2));}function a67_0x45c8(_0x2112e8,_0x2bd4be){_0x2112e8=_0x2112e8-0xd8;const _0x2c9b42=a67_0x2c9b();let _0x45c8d4=_0x2c9b42[_0x2112e8];return _0x45c8d4;}function clearFieldFromUserConfig(_0x6b3cc0){const _0x205a0e=a67_0x6b6cb2,_0x2700a5=getGlobalConfigPath();if(!a67_0x37de71[_0x205a0e(0xe9)](_0x2700a5))return;let _0xcc114a={};try{const _0x4fa836=a67_0x37de71[_0x205a0e(0x103)](_0x2700a5,_0x205a0e(0xee));_0xcc114a=JSON['parse'](_0x4fa836);}catch{return;}delete _0xcc114a[_0x6b3cc0],writeSecureFile(_0x2700a5,JSON[_0x205a0e(0xf5)](_0xcc114a,null,0x2));}export function clearDefaultSiteFromUserConfig(){const _0x4647d8=a67_0x6b6cb2;clearFieldFromUserConfig(_0x4647d8(0xf7));}export function clearActiveProfileFromUserConfig(){const _0x11399b=a67_0x6b6cb2;clearFieldFromUserConfig(_0x11399b(0x112));}export function createProfile(_0x2bfd20,_0x59991a){const _0x439eac=a67_0x6b6cb2;validateProfileName(_0x2bfd20);if(profileExists(_0x2bfd20))throw new Error(_0x439eac(0x11f)+_0x2bfd20+'\x20already\x20exists');saveProfile(_0x2bfd20,_0x59991a);}export function saveProfileCredentials(_0x103aeb,_0x5d1d24){const _0x4b8ec6=a67_0x6b6cb2;validateProfileName(_0x103aeb);if(!profileExists(_0x103aeb))throw new Error(_0x4b8ec6(0x11f)+_0x103aeb+_0x4b8ec6(0xed));const _0x25fb45=getNewCredentialPath(_0x103aeb);writeSecureFile(_0x25fb45,_0x5d1d24);}export function loadProfileCredentials(_0x205332){const _0x52c869=a67_0x6b6cb2;validateProfileName(_0x205332);const _0x38aaec=getNewCredentialPath(_0x205332);if(a67_0x37de71[_0x52c869(0xe9)](_0x38aaec))try{return a67_0x37de71[_0x52c869(0x103)](_0x38aaec,_0x52c869(0xee));}catch{}const _0x331281=getOldCredentialPath(_0x205332);if(a67_0x37de71[_0x52c869(0xe9)](_0x331281)){console[_0x52c869(0x118)](_0x52c869(0x121)+_0x205332+'\x27'),console[_0x52c869(0x118)](_0x52c869(0xf8)),console[_0x52c869(0x118)](_0x52c869(0xe3)+_0x331281+'\x22\x20\x22'+_0x38aaec+'\x22'),console[_0x52c869(0x118)](_0x52c869(0xe4));try{return a67_0x37de71[_0x52c869(0x103)](_0x331281,_0x52c869(0xee));}catch{return null;}}return null;}
1
+ const a67_0x158331=a67_0x7389;(function(_0x2b79f7,_0x212d5d){const _0x241fbf=a67_0x7389,_0x4783e5=_0x2b79f7();while(!![]){try{const _0x17e17b=-parseInt(_0x241fbf(0x1e5))/0x1*(parseInt(_0x241fbf(0x20e))/0x2)+-parseInt(_0x241fbf(0x213))/0x3*(parseInt(_0x241fbf(0x1e1))/0x4)+-parseInt(_0x241fbf(0x219))/0x5*(-parseInt(_0x241fbf(0x208))/0x6)+-parseInt(_0x241fbf(0x20b))/0x7+parseInt(_0x241fbf(0x204))/0x8+-parseInt(_0x241fbf(0x1e2))/0x9+-parseInt(_0x241fbf(0x201))/0xa*(-parseInt(_0x241fbf(0x207))/0xb);if(_0x17e17b===_0x212d5d)break;else _0x4783e5['push'](_0x4783e5['shift']());}catch(_0x38f8eb){_0x4783e5['push'](_0x4783e5['shift']());}}}(a67_0x37e5,0xf15dc));import*as a67_0x5a609d from'node:fs';import*as a67_0x37664f from'node:path';import{SDKError,ErrorCode}from'../sdk/errors.js';import{getConfigDir}from'./config.js';import{createSecureDirectory,writeSecureFile}from'../utils/file-permissions.js';import{findProjectConfigPath}from'./project-config.js';import{loadSessionContext}from'./session.js';export const STUDIO_PROFILE_NAME=a67_0x158331(0x1dd);export function getProfileParams(_0x2cd4e6){const _0xea9001=a67_0x158331,_0xf1333f={};if(!_0x2cd4e6)return _0xf1333f;for(const [_0x5e2021,_0x3b2402]of Object['entries'](_0x2cd4e6)){_0x5e2021!==_0xea9001(0x203)&&_0x3b2402!==undefined&&(_0xf1333f[_0x5e2021]=_0x3b2402);}return _0xf1333f;}export function getProfilesDir(){const _0x5c6230=a67_0x158331;return a67_0x37664f['join'](getConfigDir(),_0x5c6230(0x205));}function getProfileDir(_0x57bffe){const _0x519834=a67_0x158331;return a67_0x37664f[_0x519834(0x22a)](getProfilesDir(),_0x57bffe);}function getProfileConfigPath(_0x5c0643){const _0x49d442=a67_0x158331;return a67_0x37664f[_0x49d442(0x22a)](getProfileDir(_0x5c0643),'tdx.json');}function getProfileEnvPath(_0x3fea89){const _0x1f0b98=a67_0x158331;return a67_0x37664f['join'](getProfileDir(_0x3fea89),_0x1f0b98(0x21b));}function getGlobalConfigPath(){const _0x1a19c4=a67_0x158331;return a67_0x37664f['join'](getConfigDir(),_0x1a19c4(0x220));}function validateProfileName(_0x5c20b4){const _0x4d8693=a67_0x158331;if(/^@?[a-zA-Z0-9_-]+$/[_0x4d8693(0x1fa)](_0x5c20b4))return;if(/^@tdx-studio:[a-zA-Z0-9_-]+:\d+(:\d+)?$/[_0x4d8693(0x1fa)](_0x5c20b4))return;throw new Error(_0x4d8693(0x1e4)+_0x5c20b4+_0x4d8693(0x1ff));}function a67_0x7389(_0x3ed54c,_0x568871){_0x3ed54c=_0x3ed54c-0x1d8;const _0x37e58a=a67_0x37e5();let _0x7389a8=_0x37e58a[_0x3ed54c];return _0x7389a8;}function validateProfileConfig(_0x2c2bab,_0x228f50){const _0x333115=a67_0x158331;if(typeof _0x2c2bab!==_0x333115(0x200)||_0x2c2bab===null)throw new SDKError(ErrorCode[_0x333115(0x1fc)],'Profile\x20\x27'+_0x228f50+_0x333115(0x217));const _0x362971=[_0x333115(0x203),'site',_0x333115(0x210),_0x333115(0x1df),_0x333115(0x1f6),_0x333115(0x1da),_0x333115(0x224),_0x333115(0x1dc)],_0x1ce613=_0x2c2bab;for(const _0x456b90 of Object[_0x333115(0x1e7)](_0x1ce613)){!_0x362971['includes'](_0x456b90)&&console[_0x333115(0x1f5)](_0x333115(0x228)+_0x228f50+_0x333115(0x20a)+_0x456b90+'\x27\x20will\x20be\x20ignored');}const _0x1a6f08=_0x362971[_0x333115(0x227)](_0x314619=>_0x314619!==_0x333115(0x1dc));for(const _0x5b4d16 of _0x1a6f08){if(_0x1ce613[_0x5b4d16]!==undefined&&typeof _0x1ce613[_0x5b4d16]!==_0x333115(0x1ef))throw new SDKError(ErrorCode[_0x333115(0x1fc)],_0x333115(0x212)+_0x228f50+_0x333115(0x221)+_0x5b4d16+'\x27\x20must\x20be\x20a\x20string');}return!![];}function loadProfilesFromTdxJson(_0x1e5df5,_0x2bf5ef){const _0x29185e=a67_0x158331;if(!a67_0x5a609d[_0x29185e(0x226)](_0x1e5df5))return[];try{const _0x4f03b3=a67_0x5a609d[_0x29185e(0x1f4)](_0x1e5df5,'utf-8'),_0x3796fb=JSON[_0x29185e(0x20c)](_0x4f03b3);if(!_0x3796fb[_0x29185e(0x205)]||typeof _0x3796fb[_0x29185e(0x205)]!==_0x29185e(0x200))return[];const _0x468405=[];for(const [_0x5a8ca8,_0x326ce4]of Object['entries'](_0x3796fb[_0x29185e(0x205)])){try{validateProfileConfig(_0x326ce4,_0x5a8ca8);const _0x1241fb=getNewCredentialPath(_0x5a8ca8),_0x2e65ba=getOldCredentialPath(_0x5a8ca8),_0x2390c5=a67_0x5a609d[_0x29185e(0x226)](_0x1241fb)||a67_0x5a609d[_0x29185e(0x226)](_0x2e65ba);_0x468405[_0x29185e(0x1d9)]({'name':_0x5a8ca8,'config':_0x326ce4,'metadata':{'name':_0x5a8ca8,'createdAt':new Date()[_0x29185e(0x1f3)]()},'hasCredentials':_0x2390c5,'scope':_0x2bf5ef});}catch(_0x405950){_0x405950 instanceof Error&&(console['warn'](_0x29185e(0x202)+_0x1e5df5+':'),console[_0x29185e(0x1f5)]('\x20\x20'+_0x405950[_0x29185e(0x211)]+'\x0a'));}}return _0x468405;}catch(_0x43e293){return _0x43e293 instanceof SyntaxError?(console[_0x29185e(0x1f5)](_0x29185e(0x21f)+_0x1e5df5+_0x29185e(0x1ee)),console[_0x29185e(0x1f5)](_0x29185e(0x229)+_0x43e293[_0x29185e(0x211)]+'\x0a')):console['warn'](_0x29185e(0x20d)+_0x1e5df5+':\x20'+_0x43e293+'\x0a'),[];}}export function getNewCredentialPath(_0x5757e6){const _0x458c92=a67_0x158331;return a67_0x37664f[_0x458c92(0x22a)](getConfigDir(),'.env.'+_0x5757e6);}function getOldCredentialPath(_0x2d1bc0){const _0x36b6b2=a67_0x158331;return a67_0x37664f[_0x36b6b2(0x22a)](getProfilesDir(),_0x2d1bc0,_0x36b6b2(0x21b));}function loadProfilesFromTdxJsonFiles(){const _0x5c4a4f=a67_0x158331,_0x82028f=[],_0x54f3b2=findProjectConfigPath();_0x54f3b2&&_0x82028f['push'](...loadProfilesFromTdxJson(_0x54f3b2,_0x5c4a4f(0x1e0)));const _0x48ab81=a67_0x37664f['join'](getConfigDir(),'tdx.json');return _0x82028f[_0x5c4a4f(0x1d9)](...loadProfilesFromTdxJson(_0x48ab81,_0x5c4a4f(0x1fd))),_0x82028f;}function loadProfilesFromDirectories(){const _0x4a02bc=a67_0x158331,_0x4be14d=getProfilesDir();if(!a67_0x5a609d[_0x4a02bc(0x226)](_0x4be14d))return[];try{return a67_0x5a609d['readdirSync'](_0x4be14d,{'withFileTypes':!![]})[_0x4a02bc(0x227)](_0x106cd6=>_0x106cd6[_0x4a02bc(0x1f9)]())['map'](_0x2a810f=>_0x2a810f[_0x4a02bc(0x1f0)])['filter'](_0x19947a=>{const _0x230169=_0x4a02bc,_0xd05b0d=getProfileConfigPath(_0x19947a),_0x39de25=getProfileEnvPath(_0x19947a);return a67_0x5a609d[_0x230169(0x226)](_0xd05b0d)||a67_0x5a609d[_0x230169(0x226)](_0x39de25);})[_0x4a02bc(0x21c)](_0x54bfbe=>{const _0x2c69fc=_0x4a02bc,_0x4c3767=loadProfileFromDirectory(_0x54bfbe);if(_0x4c3767)return{..._0x4c3767,'scope':_0x2c69fc(0x214)};return null;})[_0x4a02bc(0x227)](_0x2d2848=>_0x2d2848!==null);}catch{return[];}}function loadProfileFromDirectory(_0x4b6153){const _0x5e17b1=a67_0x158331,_0x277f07=getProfileConfigPath(_0x4b6153),_0x3a6ab3=getOldCredentialPath(_0x4b6153);if(!a67_0x5a609d['existsSync'](_0x277f07)&&!a67_0x5a609d[_0x5e17b1(0x226)](_0x3a6ab3))return null;let _0x345cd7={},_0x1021c6={'name':_0x4b6153,'createdAt':new Date()[_0x5e17b1(0x1f3)]()};if(a67_0x5a609d[_0x5e17b1(0x226)](_0x277f07))try{const _0x26a6ca=a67_0x5a609d[_0x5e17b1(0x1f4)](_0x277f07,'utf-8'),_0x45f531=JSON[_0x5e17b1(0x20c)](_0x26a6ca),{metadata:_0xd33c0d,..._0x5e2f36}=_0x45f531;_0x345cd7=_0x5e2f36,_0xd33c0d&&(_0x1021c6=_0xd33c0d);}catch{}return{'name':_0x4b6153,'config':_0x345cd7,'metadata':_0x1021c6,'hasCredentials':a67_0x5a609d[_0x5e17b1(0x226)](_0x3a6ab3),'scope':_0x5e17b1(0x214)};}export function listProfiles(){const _0x3ec144=a67_0x158331,_0x39a37e=loadProfilesFromTdxJsonFiles(),_0x1bdefc=loadProfilesFromDirectories();if(_0x1bdefc[_0x3ec144(0x1ea)]>0x0){const _0x2eab4e=_0x1bdefc['map'](_0x361a42=>_0x361a42[_0x3ec144(0x1f0)])[_0x3ec144(0x22a)](',\x20'),_0x30cb82=getConfigDir();console['warn'](_0x3ec144(0x1ec)+_0x2eab4e),console[_0x3ec144(0x1f5)](_0x3ec144(0x209)),console[_0x3ec144(0x1f5)](_0x3ec144(0x215)+a67_0x37664f[_0x3ec144(0x22a)](_0x30cb82,_0x3ec144(0x220))),console[_0x3ec144(0x1f5)](_0x3ec144(0x1f7)),console['warn'](_0x3ec144(0x1e9));}const _0xde1ef5=[..._0x39a37e,..._0x1bdefc],_0x51ce88=new Map();for(const _0x5492ea of _0xde1ef5){!_0x51ce88[_0x3ec144(0x223)](_0x5492ea['name'])&&_0x51ce88[_0x3ec144(0x1f1)](_0x5492ea[_0x3ec144(0x1f0)],_0x5492ea);}return Array[_0x3ec144(0x1fe)](_0x51ce88[_0x3ec144(0x1d8)]())[_0x3ec144(0x222)]((_0x3eabca,_0x42b172)=>_0x3eabca['name'][_0x3ec144(0x1de)](_0x42b172[_0x3ec144(0x1f0)]));}export function profileExists(_0x30d0bb){const _0xa023ad=a67_0x158331,_0x20848c=listProfiles();return _0x20848c[_0xa023ad(0x1ed)](_0x3310d4=>_0x3310d4[_0xa023ad(0x1f0)]===_0x30d0bb);}export function loadProfile(_0x4af9e7){const _0x8c8f36=a67_0x158331;validateProfileName(_0x4af9e7);const _0x4c0a04=listProfiles(),_0x95a088=_0x4c0a04[_0x8c8f36(0x21e)](_0x53ab83=>_0x53ab83['name']===_0x4af9e7);return _0x95a088||null;}export function saveProfile(_0x3fbacd,_0x5708fb,_0xd929a8=![]){saveProfileToUserConfig(_0x3fbacd,_0x5708fb);}export function deleteProfile(_0x11a016){const _0x5583b6=a67_0x158331;validateProfileName(_0x11a016);const _0x44697d=getProfileDir(_0x11a016);if(!a67_0x5a609d[_0x5583b6(0x226)](_0x44697d))throw new Error(_0x5583b6(0x218)+_0x11a016+'\x20does\x20not\x20exist');a67_0x5a609d[_0x5583b6(0x1fb)](_0x44697d,{'recursive':!![],'force':!![]});}export function saveProfileToUserConfig(_0x238bae,_0x1bff73){const _0x3fb4a9=a67_0x158331;validateProfileName(_0x238bae);const _0x31bdd2=getGlobalConfigPath(),_0x457787=getConfigDir();!a67_0x5a609d['existsSync'](_0x457787)&&createSecureDirectory(_0x457787);let _0x41a51a={};if(a67_0x5a609d[_0x3fb4a9(0x226)](_0x31bdd2))try{const _0x153aa4=a67_0x5a609d[_0x3fb4a9(0x1f4)](_0x31bdd2,_0x3fb4a9(0x1e6));_0x41a51a=JSON[_0x3fb4a9(0x20c)](_0x153aa4);}catch{console[_0x3fb4a9(0x1f5)](_0x3fb4a9(0x1f2)+_0x31bdd2+_0x3fb4a9(0x1e3));}!_0x41a51a[_0x3fb4a9(0x205)]&&(_0x41a51a[_0x3fb4a9(0x205)]={}),_0x41a51a[_0x3fb4a9(0x205)][_0x238bae]=_0x1bff73,writeSecureFile(_0x31bdd2,JSON['stringify'](_0x41a51a,null,0x2));}export function removeProfileFromUserConfig(_0x26514d){const _0xbe9dd7=a67_0x158331;validateProfileName(_0x26514d);const _0x4b42d9=getGlobalConfigPath();if(!a67_0x5a609d[_0xbe9dd7(0x226)](_0x4b42d9))throw new Error(_0xbe9dd7(0x212)+_0x26514d+_0xbe9dd7(0x206));let _0x4886b5={};try{const _0x2fa244=a67_0x5a609d[_0xbe9dd7(0x1f4)](_0x4b42d9,_0xbe9dd7(0x1e6));_0x4886b5=JSON[_0xbe9dd7(0x20c)](_0x2fa244);}catch{throw new Error(_0xbe9dd7(0x1eb)+_0x4b42d9);}if(!_0x4886b5[_0xbe9dd7(0x205)]||!_0x4886b5[_0xbe9dd7(0x205)][_0x26514d])throw new Error('Profile\x20\x27'+_0x26514d+_0xbe9dd7(0x206));delete _0x4886b5[_0xbe9dd7(0x205)][_0x26514d],_0x4886b5[_0xbe9dd7(0x1db)]===_0x26514d&&delete _0x4886b5[_0xbe9dd7(0x1db)],writeSecureFile(_0x4b42d9,JSON['stringify'](_0x4886b5,null,0x2));}export function getActiveProfile(){const _0x566d74=a67_0x158331,_0x340f1c=loadSessionContext();if(_0x340f1c?.['profile'])return _0x340f1c['profile'];if(process.env.TDX_PROFILE)return process.env.TDX_PROFILE;const _0x3fef1e=getGlobalConfigPath();if(!a67_0x5a609d[_0x566d74(0x226)](_0x3fef1e))return null;try{const _0x582f1d=a67_0x5a609d[_0x566d74(0x1f4)](_0x3fef1e,_0x566d74(0x1e6)),_0xc728cd=JSON[_0x566d74(0x20c)](_0x582f1d);return _0xc728cd[_0x566d74(0x1db)]||null;}catch{return null;}}export function saveDefaultSiteToUserConfig(_0x12f9d3){const _0x39d280=a67_0x158331,_0x5d8c6f=getGlobalConfigPath(),_0x1e1888=getConfigDir();!a67_0x5a609d['existsSync'](_0x1e1888)&&createSecureDirectory(_0x1e1888);let _0x262c0d={};if(a67_0x5a609d[_0x39d280(0x226)](_0x5d8c6f))try{const _0x3844e1=a67_0x5a609d['readFileSync'](_0x5d8c6f,_0x39d280(0x1e6));_0x262c0d=JSON[_0x39d280(0x20c)](_0x3844e1);}catch{console['warn'](_0x39d280(0x1f2)+_0x5d8c6f+_0x39d280(0x1e3));}_0x262c0d[_0x39d280(0x21d)]=_0x12f9d3,writeSecureFile(_0x5d8c6f,JSON[_0x39d280(0x1f8)](_0x262c0d,null,0x2));}function a67_0x37e5(){const _0xb1d80=['sort','has','account_name','\x22\x20\x22','existsSync','filter','Warning:\x20Profile\x20\x27','Error:\x20','join','values','push','llm_agent','profile','user_info','@tdx-studio','localeCompare','parent_segment','local','212MRJWoz','9272169RDQiWK',',\x20creating\x20new\x20file','Invalid\x20profile\x20name:\x20','17189QDVdPB','utf-8','keys','\x20\x20mv\x20\x22','\x20\x203.\x20Move\x20credentials:\x20mv\x20~/.config/tdx/profiles/<name>/.env\x20~/.config/tdx/.env.<name>\x0a','length','Failed\x20to\x20parse\x20','\x0aWarning:\x20Profiles\x20in\x20directories\x20are\x20deprecated:\x20','some',':\x20Invalid\x20JSON\x20syntax','string','name','set','Warning:\x20Failed\x20to\x20parse\x20','toISOString','readFileSync','warn','llm_project','\x20\x202.\x20Add\x20profiles\x20under\x20a\x20\x22profiles\x22\x20key\x20(see\x20\x27tdx\x20profiles\x27\x20for\x20current\x20config)','stringify','isDirectory','test','rmSync','INVALID_PROFILE_CONFIG','user','from','.\x20Must\x20contain\x20only\x20alphanumeric\x20characters,\x20dash,\x20underscore,\x20and\x20optional\x20@\x20prefix\x20for\x20reserved\x20profiles.','object','4895970Jcpqjx','\x0aWarning:\x20Skipping\x20invalid\x20profile\x20in\x20','description','7108088cHQvcG','profiles','\x27\x20not\x20found\x20in\x20user\x20configuration','66XcFefy','18nWyUgj','Please\x20migrate\x20to\x20~/.config/tdx/tdx.json:','\x27:\x20unknown\x20config\x20key\x20\x27','11650681VWSLji','parse','\x0aWarning:\x20Failed\x20to\x20load\x20profiles\x20from\x20','28BplxIL','To\x20migrate:','database','message','Profile\x20\x27','62130CcSrmv','directory','\x20\x201.\x20Edit:\x20','\x20already\x20exists','\x27:\x20config\x20must\x20be\x20an\x20object','Profile\x20','1992405tyzayo','\x20does\x20not\x20exist','.env','map','site','find','\x0aWarning:\x20Failed\x20to\x20parse\x20','tdx.json','\x27:\x20\x27'];a67_0x37e5=function(){return _0xb1d80;};return a67_0x37e5();}export function saveActiveProfileToUserConfig(_0x4d3fc7){const _0x37c121=a67_0x158331;validateProfileName(_0x4d3fc7);const _0x587ac8=getGlobalConfigPath(),_0x3ae225=getConfigDir();!a67_0x5a609d[_0x37c121(0x226)](_0x3ae225)&&createSecureDirectory(_0x3ae225);let _0x547cca={};if(a67_0x5a609d[_0x37c121(0x226)](_0x587ac8))try{const _0x4d2992=a67_0x5a609d[_0x37c121(0x1f4)](_0x587ac8,'utf-8');_0x547cca=JSON[_0x37c121(0x20c)](_0x4d2992);}catch{console[_0x37c121(0x1f5)](_0x37c121(0x1f2)+_0x587ac8+_0x37c121(0x1e3));}_0x547cca[_0x37c121(0x1db)]=_0x4d3fc7,writeSecureFile(_0x587ac8,JSON['stringify'](_0x547cca,null,0x2));}function clearFieldFromUserConfig(_0xe154e3){const _0x27fab5=a67_0x158331,_0x274618=getGlobalConfigPath();if(!a67_0x5a609d[_0x27fab5(0x226)](_0x274618))return;let _0x44e391={};try{const _0xe474f=a67_0x5a609d['readFileSync'](_0x274618,_0x27fab5(0x1e6));_0x44e391=JSON[_0x27fab5(0x20c)](_0xe474f);}catch{return;}delete _0x44e391[_0xe154e3],writeSecureFile(_0x274618,JSON[_0x27fab5(0x1f8)](_0x44e391,null,0x2));}export function clearDefaultSiteFromUserConfig(){clearFieldFromUserConfig('site');}export function clearActiveProfileFromUserConfig(){const _0x347480=a67_0x158331;clearFieldFromUserConfig(_0x347480(0x1db));}export function createProfile(_0x4aaf5c,_0x3651c3){const _0x3256ed=a67_0x158331;validateProfileName(_0x4aaf5c);if(profileExists(_0x4aaf5c))throw new Error(_0x3256ed(0x218)+_0x4aaf5c+_0x3256ed(0x216));saveProfile(_0x4aaf5c,_0x3651c3);}export function saveProfileCredentials(_0x57bc4f,_0x39285c){const _0x187d4c=a67_0x158331;validateProfileName(_0x57bc4f);if(!profileExists(_0x57bc4f))throw new Error('Profile\x20'+_0x57bc4f+_0x187d4c(0x21a));const _0x19f5d6=getNewCredentialPath(_0x57bc4f);writeSecureFile(_0x19f5d6,_0x39285c);}export function loadProfileCredentials(_0x4167fd){const _0x2d52d6=a67_0x158331;validateProfileName(_0x4167fd);const _0x2205b1=getNewCredentialPath(_0x4167fd);if(a67_0x5a609d[_0x2d52d6(0x226)](_0x2205b1))try{return a67_0x5a609d[_0x2d52d6(0x1f4)](_0x2205b1,_0x2d52d6(0x1e6));}catch{}const _0x188fa1=getOldCredentialPath(_0x4167fd);if(a67_0x5a609d['existsSync'](_0x188fa1)){console[_0x2d52d6(0x1f5)]('\x0aWarning:\x20Using\x20deprecated\x20credential\x20location\x20for\x20profile\x20\x27'+_0x4167fd+'\x27'),console[_0x2d52d6(0x1f5)](_0x2d52d6(0x20f)),console[_0x2d52d6(0x1f5)](_0x2d52d6(0x1e8)+_0x188fa1+_0x2d52d6(0x225)+_0x2205b1+'\x22'),console[_0x2d52d6(0x1f5)]('Then\x20define\x20profiles\x20in\x20~/.config/tdx/tdx.json\x0a');try{return a67_0x5a609d[_0x2d52d6(0x1f4)](_0x188fa1,_0x2d52d6(0x1e6));}catch{return null;}}return null;}
@@ -1 +1 @@
1
- const a68_0x539927=a68_0x31b9;function a68_0xb1da(){const _0x36a902=['cwd','1099935XAjeJP','apiKey','writeFileSync','api_key','code','90cCnCYN','\x20is\x20ignored.\x20','utf-8','parse','7CEVnvI','join','API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20project\x20configuration.\x20Use\x20.env\x20files\x20instead.','1884099xXiLbG','396640bhHckU','dirname','Use\x20~/.config/tdx/.env\x20or\x20profile\x20.env\x20files\x20instead.','profile','ENOENT','stringify','warn','Active\x20profile\x20is\x20set\x20in\x20~/.config/tdx/tdx.json','654754waHRlG','includes','88910QYJPDP','6571280MTXpPR','\x27profile\x27\x20should\x20not\x20be\x20set\x20in\x20project\x20config.\x20Use\x20\x27tdx\x20profile\x20use\x27\x20instead.','Warning:\x20\x27profile\x27\x20field\x20in\x20',').\x20','1QBImcW','8239458LUBZbs','TD_API_KEY','tdx.json','readFileSync','existsSync'];a68_0xb1da=function(){return _0x36a902;};return a68_0xb1da();}function a68_0x31b9(_0x35598b,_0x5f0860){_0x35598b=_0x35598b-0x83;const _0xb1daed=a68_0xb1da();let _0x31b97c=_0xb1daed[_0x35598b];return _0x31b97c;}(function(_0x3ba9d6,_0xb9cdf4){const _0x474052=a68_0x31b9,_0x3d0018=_0x3ba9d6();while(!![]){try{const _0x1a1111=parseInt(_0x474052(0x9f))/0x1*(parseInt(_0x474052(0x98))/0x2)+-parseInt(_0x474052(0x8f))/0x3+-parseInt(_0x474052(0x90))/0x4+parseInt(_0x474052(0x9a))/0x5+-parseInt(_0x474052(0xa0))/0x6*(-parseInt(_0x474052(0x8c))/0x7)+parseInt(_0x474052(0x9b))/0x8+-parseInt(_0x474052(0x83))/0x9*(parseInt(_0x474052(0x88))/0xa);if(_0x1a1111===_0xb9cdf4)break;else _0x3d0018['push'](_0x3d0018['shift']());}catch(_0x4efc0c){_0x3d0018['push'](_0x3d0018['shift']());}}}(a68_0xb1da,0xadfec));import*as a68_0x2ab5f8 from'node:fs';import*as a68_0x3955fc from'node:path';const PROJECT_CONFIG_FILENAME=a68_0x539927(0xa2);export function findProjectConfigPath(_0x5df668){const _0x425d35=a68_0x539927;let _0x5d7a66=_0x5df668||process[_0x425d35(0xa5)]();while(!![]){const _0x5a3c4d=a68_0x3955fc[_0x425d35(0x8d)](_0x5d7a66,PROJECT_CONFIG_FILENAME);if(a68_0x2ab5f8[_0x425d35(0xa4)](_0x5a3c4d))return _0x5a3c4d;const _0x1bc726=a68_0x3955fc[_0x425d35(0x91)](_0x5d7a66);if(_0x1bc726===_0x5d7a66)return null;_0x5d7a66=_0x1bc726;}}export function loadProjectConfig(_0x35bcc2){const _0x65b032=a68_0x539927,_0x35a12d=findProjectConfigPath(_0x35bcc2);if(!_0x35a12d)return null;try{const _0x255585=a68_0x2ab5f8[_0x65b032(0xa3)](_0x35a12d,_0x65b032(0x8a)),_0x4c83fc=JSON[_0x65b032(0x8b)](_0x255585),_0x26219b=JSON[_0x65b032(0x95)](_0x4c83fc);if(_0x26219b['includes'](_0x65b032(0xa1))||_0x26219b['includes'](_0x65b032(0x84))||_0x26219b[_0x65b032(0x99)](_0x65b032(0x86)))throw new Error('Security\x20error:\x20API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20project\x20config\x20('+_0x35a12d+_0x65b032(0x9e)+_0x65b032(0x92));const {metadata:_0x1d5538,profile:_0x6c47c5,..._0x4d748c}=_0x4c83fc;return _0x6c47c5&&console[_0x65b032(0x96)](_0x65b032(0x9d)+_0x35a12d+_0x65b032(0x89)+_0x65b032(0x97)),_0x4d748c;}catch(_0x583c12){if(_0x583c12 instanceof Error&&_0x65b032(0x87)in _0x583c12&&_0x583c12[_0x65b032(0x87)]===_0x65b032(0x94))return null;throw new Error('Failed\x20to\x20load\x20project\x20config\x20from\x20'+_0x35a12d+':\x20'+_0x583c12);}}export function saveProjectConfig(_0x3868b3,_0x175447){const _0x495558=a68_0x539927,_0x3cfce4=_0x175447||process[_0x495558(0xa5)](),_0x5457d3=a68_0x3955fc[_0x495558(0x8d)](_0x3cfce4,PROJECT_CONFIG_FILENAME),_0x30a94d=JSON[_0x495558(0x95)](_0x3868b3);if(_0x30a94d[_0x495558(0x99)]('TD_API_KEY')||_0x30a94d[_0x495558(0x99)](_0x495558(0x84))||_0x30a94d[_0x495558(0x99)](_0x495558(0x86)))throw new Error(_0x495558(0x8e));if(_0x495558(0x93)in _0x3868b3)throw new Error(_0x495558(0x9c));a68_0x2ab5f8[_0x495558(0x85)](_0x5457d3,JSON[_0x495558(0x95)](_0x3868b3,null,0x2));}export function hasProjectConfig(_0x5f766d){return findProjectConfigPath(_0x5f766d)!==null;}export function getProjectRoot(_0x12b0a4){const _0x4bae99=findProjectConfigPath(_0x12b0a4);return _0x4bae99?a68_0x3955fc['dirname'](_0x4bae99):null;}
1
+ (function(_0x2cb6d1,_0x5eeda0){const _0x1a8b34=a68_0x38b4,_0x2dedec=_0x2cb6d1();while(!![]){try{const _0x55c98d=-parseInt(_0x1a8b34(0x74))/0x1+parseInt(_0x1a8b34(0x79))/0x2+parseInt(_0x1a8b34(0x7d))/0x3*(parseInt(_0x1a8b34(0x7f))/0x4)+-parseInt(_0x1a8b34(0x85))/0x5+parseInt(_0x1a8b34(0x77))/0x6+-parseInt(_0x1a8b34(0x6e))/0x7+parseInt(_0x1a8b34(0x7a))/0x8;if(_0x55c98d===_0x5eeda0)break;else _0x2dedec['push'](_0x2dedec['shift']());}catch(_0x261dd3){_0x2dedec['push'](_0x2dedec['shift']());}}}(a68_0x2fc5,0x60d5a));import*as a68_0x4f7c67 from'node:fs';import*as a68_0x2f996c from'node:path';const PROJECT_CONFIG_FILENAME='tdx.json';export function findProjectConfigPath(_0x4eeeac){const _0x556c0a=a68_0x38b4;let _0x5bfdf2=_0x4eeeac||process[_0x556c0a(0x84)]();while(!![]){const _0x42e729=a68_0x2f996c[_0x556c0a(0x7c)](_0x5bfdf2,PROJECT_CONFIG_FILENAME);if(a68_0x4f7c67[_0x556c0a(0x6f)](_0x42e729))return _0x42e729;const _0x4234f9=a68_0x2f996c['dirname'](_0x5bfdf2);if(_0x4234f9===_0x5bfdf2)return null;_0x5bfdf2=_0x4234f9;}}function a68_0x38b4(_0xdd2ce2,_0x47ece3){_0xdd2ce2=_0xdd2ce2-0x6d;const _0x2fc5f2=a68_0x2fc5();let _0x38b45d=_0x2fc5f2[_0xdd2ce2];return _0x38b45d;}export function loadProjectConfig(_0xc387d3){const _0x2c1bc7=a68_0x38b4,_0xb40aee=findProjectConfigPath(_0xc387d3);if(!_0xb40aee)return null;try{const _0x4f9efb=a68_0x4f7c67[_0x2c1bc7(0x78)](_0xb40aee,'utf-8'),_0x1ecee2=JSON['parse'](_0x4f9efb),_0x1a6c8c=JSON[_0x2c1bc7(0x82)](_0x1ecee2);if(_0x1a6c8c[_0x2c1bc7(0x7e)]('TD_API_KEY')||_0x1a6c8c[_0x2c1bc7(0x7e)](_0x2c1bc7(0x7b))||_0x1a6c8c['includes'](_0x2c1bc7(0x70)))throw new Error(_0x2c1bc7(0x71)+_0xb40aee+_0x2c1bc7(0x72)+_0x2c1bc7(0x75));const {metadata:_0x5e0354,profile:_0x1a6333,..._0x3ac16d}=_0x1ecee2;return _0x1a6333&&console['warn'](_0x2c1bc7(0x83)+_0xb40aee+'\x20is\x20ignored.\x20'+_0x2c1bc7(0x73)),_0x3ac16d;}catch(_0x54fba0){if(_0x54fba0 instanceof Error&&'code'in _0x54fba0&&_0x54fba0[_0x2c1bc7(0x80)]==='ENOENT')return null;throw new Error(_0x2c1bc7(0x6d)+_0xb40aee+':\x20'+_0x54fba0);}}export function saveProjectConfig(_0x247ed1,_0x4fdd63){const _0x32a563=a68_0x38b4,_0x1fe2b6=_0x4fdd63||process[_0x32a563(0x84)](),_0x5536de=a68_0x2f996c[_0x32a563(0x7c)](_0x1fe2b6,PROJECT_CONFIG_FILENAME),_0xdc3577=JSON[_0x32a563(0x82)](_0x247ed1);if(_0xdc3577[_0x32a563(0x7e)]('TD_API_KEY')||_0xdc3577['includes'](_0x32a563(0x7b))||_0xdc3577[_0x32a563(0x7e)](_0x32a563(0x70)))throw new Error(_0x32a563(0x81));if(_0x32a563(0x76)in _0x247ed1)throw new Error('\x27profile\x27\x20should\x20not\x20be\x20set\x20in\x20project\x20config.\x20Use\x20\x27tdx\x20profile\x20use\x27\x20instead.');a68_0x4f7c67['writeFileSync'](_0x5536de,JSON[_0x32a563(0x82)](_0x247ed1,null,0x2));}export function hasProjectConfig(_0x3b596b){return findProjectConfigPath(_0x3b596b)!==null;}export function getProjectRoot(_0x43eeb9){const _0x5932e1=findProjectConfigPath(_0x43eeb9);return _0x5932e1?a68_0x2f996c['dirname'](_0x5932e1):null;}function a68_0x2fc5(){const _0x106b55=['includes','4FrUoHW','code','API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20project\x20configuration.\x20Use\x20.env\x20files\x20instead.','stringify','Warning:\x20\x27profile\x27\x20field\x20in\x20','cwd','332910nDiJht','Failed\x20to\x20load\x20project\x20config\x20from\x20','4648637IrZDKV','existsSync','api_key','Security\x20error:\x20API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20project\x20config\x20(',').\x20','Active\x20profile\x20is\x20set\x20in\x20~/.config/tdx/tdx.json','393975mCbkUX','Use\x20~/.config/tdx/.env\x20or\x20profile\x20.env\x20files\x20instead.','profile','1377504byHuZD','readFileSync','131244Wfkead','9081248kCLNrP','apiKey','join','272760dFPvpG'];a68_0x2fc5=function(){return _0x106b55;};return a68_0x2fc5();}
@@ -1 +1 @@
1
- (function(_0x18bb35,_0x3432c2){const _0x5deba3=a69_0xb8d5,_0x509280=_0x18bb35();while(!![]){try{const _0x388dcf=-parseInt(_0x5deba3(0x86))/0x1*(-parseInt(_0x5deba3(0x88))/0x2)+parseInt(_0x5deba3(0x85))/0x3+-parseInt(_0x5deba3(0xa4))/0x4*(parseInt(_0x5deba3(0xa6))/0x5)+-parseInt(_0x5deba3(0x9e))/0x6+parseInt(_0x5deba3(0xa3))/0x7+parseInt(_0x5deba3(0x97))/0x8*(-parseInt(_0x5deba3(0x8e))/0x9)+parseInt(_0x5deba3(0xa8))/0xa*(parseInt(_0x5deba3(0x8c))/0xb);if(_0x388dcf===_0x3432c2)break;else _0x509280['push'](_0x509280['shift']());}catch(_0x2054d1){_0x509280['push'](_0x509280['shift']());}}}(a69_0x554c,0x2fee2));import*as a69_0xdeded8 from'node:fs';function a69_0xb8d5(_0x25c5d9,_0x14a7b3){_0x25c5d9=_0x25c5d9-0x82;const _0x554cef=a69_0x554c();let _0xb8d513=_0x554cef[_0x25c5d9];return _0xb8d513;}import*as a69_0x36e83a from'node:path';import*as a69_0x4fe586 from'node:os';function a69_0x554c(){const _0x2d3d11=['warn','test','459041JDJEtH','now','18OHtxCe','push','sessions','stringify','parse','toString','existsSync','.json','api_key','444608PZytkH','endsWith','homedir','sort','toISOString','join','createdAt','1248894ODmxHo','includes','readdirSync','.\x20This\x20is\x20insecure.\x20Removing\x20session.','TD_API_KEY','1541456ampLvY','1416392FicIYr','getTime','5UWuRDb','Warning:\x20API\x20keys\x20found\x20in\x20session\x20file\x20','30izyXPo','readFileSync','utf-8','apiKey','API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20session\x20context.\x20Use\x20.env\x20files\x20instead.','795711FfRCkr','9eqQUlO','unlinkSync','57574bgiciJ','replace'];a69_0x554c=function(){return _0x2d3d11;};return a69_0x554c();}import{getPPID,isProcessRunning}from'../utils/process.js';import{createSecureDirectory}from'../utils/file-permissions.js';const SESSION_EXPIRATION_MS=0x18*0x3c*0x3c*0x3e8;function getSessionsDir(){const _0x341db2=a69_0xb8d5,_0x494c4c=process.env.TDX_CONFIG_DIR||a69_0x36e83a[_0x341db2(0x9c)](a69_0x4fe586[_0x341db2(0x99)](),'.config','tdx');return a69_0x36e83a[_0x341db2(0x9c)](_0x494c4c,_0x341db2(0x90));}function getSessionPath(_0x4d3f07){const _0x309f87=a69_0xb8d5;return a69_0x36e83a[_0x309f87(0x9c)](getSessionsDir(),_0x4d3f07+_0x309f87(0x95));}export function getCurrentSessionPID(){return getPPID();}export function getSessionID(_0x4883ad){const _0x462f33=a69_0xb8d5;if(_0x4883ad)return _0x4883ad;if(process.env.TDX_SESSION)return process.env.TDX_SESSION;return getCurrentSessionPID()[_0x462f33(0x93)]();}export function loadSessionContext(_0x534e02){const _0x221e57=a69_0xb8d5,_0x321d11=getSessionID(_0x534e02),_0x1aefe4=/^\d+$/[_0x221e57(0x8b)](_0x321d11)?parseInt(_0x321d11,0xa):null;return _0x1aefe4!==null?loadSessionContextByPID(_0x1aefe4):loadSessionContextByString(_0x321d11);}export function loadSessionContextByPID(_0x4c1ae7){const _0x59150c=a69_0xb8d5,_0x863903=getSessionPath(_0x4c1ae7);if(!a69_0xdeded8['existsSync'](_0x863903))return null;try{const _0x48b1d1=a69_0xdeded8['readFileSync'](_0x863903,_0x59150c(0x82)),_0x144c0b=JSON[_0x59150c(0x92)](_0x48b1d1),_0x4fab7d=new Date(_0x144c0b['createdAt'])[_0x59150c(0xa5)](),_0x3030a6=Date[_0x59150c(0x8d)]();if(_0x3030a6-_0x4fab7d>SESSION_EXPIRATION_MS)return a69_0xdeded8[_0x59150c(0x87)](_0x863903),null;const _0x5e97a6=JSON[_0x59150c(0x91)](_0x144c0b);if(_0x5e97a6[_0x59150c(0x9f)](_0x59150c(0xa2))||_0x5e97a6['includes']('apiKey')||_0x5e97a6[_0x59150c(0x9f)](_0x59150c(0x96)))return console[_0x59150c(0x8a)]('Warning:\x20API\x20keys\x20found\x20in\x20session\x20file\x20'+_0x863903+_0x59150c(0xa1)),a69_0xdeded8[_0x59150c(0x87)](_0x863903),null;return _0x144c0b;}catch{try{a69_0xdeded8[_0x59150c(0x87)](_0x863903);}catch{}return null;}}function loadSessionContextByString(_0x58ee56){const _0x43c4a9=a69_0xb8d5,_0xfafc61=a69_0x36e83a['join'](getSessionsDir(),_0x58ee56+'.json');if(!a69_0xdeded8[_0x43c4a9(0x94)](_0xfafc61))return null;try{const _0x287948=a69_0xdeded8[_0x43c4a9(0xa9)](_0xfafc61,_0x43c4a9(0x82)),_0x4ea985=JSON[_0x43c4a9(0x92)](_0x287948),_0x1392e7=new Date(_0x4ea985[_0x43c4a9(0x9d)])['getTime'](),_0x4845d9=Date['now']();if(_0x4845d9-_0x1392e7>SESSION_EXPIRATION_MS)return a69_0xdeded8[_0x43c4a9(0x87)](_0xfafc61),null;const _0x2ed3fa=JSON['stringify'](_0x4ea985);if(_0x2ed3fa[_0x43c4a9(0x9f)](_0x43c4a9(0xa2))||_0x2ed3fa[_0x43c4a9(0x9f)](_0x43c4a9(0x83))||_0x2ed3fa['includes']('api_key'))return console[_0x43c4a9(0x8a)](_0x43c4a9(0xa7)+_0xfafc61+_0x43c4a9(0xa1)),a69_0xdeded8[_0x43c4a9(0x87)](_0xfafc61),null;return _0x4ea985;}catch{try{a69_0xdeded8['unlinkSync'](_0xfafc61);}catch{}return null;}}export function saveSessionContext(_0x1e3c2b,_0x2417da){const _0x441ea4=a69_0xb8d5,_0x1ca9e5=getSessionID(_0x2417da),_0x1ceaca=/^\d+$/[_0x441ea4(0x8b)](_0x1ca9e5)?parseInt(_0x1ca9e5,0xa):getCurrentSessionPID(),_0x18d7db=a69_0x36e83a[_0x441ea4(0x9c)](getSessionsDir(),_0x1ca9e5+_0x441ea4(0x95)),_0x4e0eed=getSessionsDir();createSecureDirectory(_0x4e0eed);const _0x4ee54c=JSON['stringify'](_0x1e3c2b);if(_0x4ee54c[_0x441ea4(0x9f)](_0x441ea4(0xa2))||_0x4ee54c[_0x441ea4(0x9f)](_0x441ea4(0x83))||_0x4ee54c[_0x441ea4(0x9f)](_0x441ea4(0x96)))throw new Error(_0x441ea4(0x84));let _0x36a857;const _0x556959=/^\d+$/['test'](_0x1ca9e5)?loadSessionContextByPID(parseInt(_0x1ca9e5,0xa)):loadSessionContextByString(_0x1ca9e5);_0x556959?_0x36a857={..._0x556959,..._0x1e3c2b,'pid':_0x1ceaca,'sessionId':_0x1ca9e5!==_0x1ceaca[_0x441ea4(0x93)]()?_0x1ca9e5:undefined,'updatedAt':new Date()[_0x441ea4(0x9b)]()}:_0x36a857={'pid':_0x1ceaca,'sessionId':_0x1ca9e5!==_0x1ceaca[_0x441ea4(0x93)]()?_0x1ca9e5:undefined,..._0x1e3c2b,'createdAt':new Date()[_0x441ea4(0x9b)](),'updatedAt':new Date()[_0x441ea4(0x9b)]()},a69_0xdeded8['writeFileSync'](_0x18d7db,JSON['stringify'](_0x36a857,null,0x2));}export function clearSessionContext(_0x466c07){const _0x4562fc=a69_0xb8d5,_0x98ffbe=getSessionID(_0x466c07),_0x1c92ea=a69_0x36e83a['join'](getSessionsDir(),_0x98ffbe+'.json');a69_0xdeded8[_0x4562fc(0x94)](_0x1c92ea)&&a69_0xdeded8[_0x4562fc(0x87)](_0x1c92ea);}export function clearSessionContextField(_0x1c8ba1,_0x5c9472){const _0x2ea34a=a69_0xb8d5,_0x3b63cd=getSessionID(_0x5c9472),_0x52e529=a69_0x36e83a['join'](getSessionsDir(),_0x3b63cd+'.json');if(!a69_0xdeded8['existsSync'](_0x52e529))return;try{const _0x2287f9=a69_0xdeded8[_0x2ea34a(0xa9)](_0x52e529,'utf-8'),_0x7379a3=JSON[_0x2ea34a(0x92)](_0x2287f9);delete _0x7379a3[_0x1c8ba1],a69_0xdeded8['writeFileSync'](_0x52e529,JSON['stringify'](_0x7379a3,null,0x2));}catch{}}export function cleanExpiredSessions(){const _0xd26921=a69_0xb8d5,_0x423c2f=getSessionsDir();if(!a69_0xdeded8[_0xd26921(0x94)](_0x423c2f))return 0x0;let _0xc928d4=0x0;const _0x2a32d7=Date['now']();try{const _0x4d0c77=a69_0xdeded8[_0xd26921(0xa0)](_0x423c2f);for(const _0x1a0784 of _0x4d0c77){if(!_0x1a0784[_0xd26921(0x98)](_0xd26921(0x95)))continue;const _0x2296a0=a69_0x36e83a['join'](_0x423c2f,_0x1a0784),_0x4e0ff0=_0x1a0784['replace'](_0xd26921(0x95),''),_0x130627=parseInt(_0x4e0ff0,0xa),_0x362c3e=!isNaN(_0x130627);if(_0x362c3e){if(!isProcessRunning(_0x130627)){a69_0xdeded8[_0xd26921(0x87)](_0x2296a0),_0xc928d4++;continue;}}try{const _0x266528=a69_0xdeded8[_0xd26921(0xa9)](_0x2296a0,_0xd26921(0x82)),_0x581735=JSON[_0xd26921(0x92)](_0x266528),_0x9c50f8=new Date(_0x581735[_0xd26921(0x9d)])['getTime']();_0x2a32d7-_0x9c50f8>SESSION_EXPIRATION_MS&&(a69_0xdeded8[_0xd26921(0x87)](_0x2296a0),_0xc928d4++);}catch{a69_0xdeded8[_0xd26921(0x87)](_0x2296a0),_0xc928d4++;}}}catch{}return _0xc928d4;}export function listActiveSessions(){const _0x301f23=a69_0xb8d5,_0x5db963=getSessionsDir();if(!a69_0xdeded8[_0x301f23(0x94)](_0x5db963))return[];try{const _0x56aea7=a69_0xdeded8[_0x301f23(0xa0)](_0x5db963),_0x236a22=[];for(const _0x414afe of _0x56aea7){if(!_0x414afe[_0x301f23(0x98)]('.json'))continue;const _0x22f862=_0x414afe[_0x301f23(0x89)](_0x301f23(0x95),''),_0x619d86=parseInt(_0x22f862,0xa);!isNaN(_0x619d86)&&isProcessRunning(_0x619d86)&&_0x236a22[_0x301f23(0x8f)](_0x619d86);}return _0x236a22[_0x301f23(0x9a)]((_0x24907c,_0x4a7fb0)=>_0x24907c-_0x4a7fb0);}catch{return[];}}
1
+ (function(_0x54eb6f,_0x35c04f){const _0x4e2d8b=a69_0x1515,_0x2b0fc3=_0x54eb6f();while(!![]){try{const _0x2cf6db=-parseInt(_0x4e2d8b(0x1b2))/0x1*(-parseInt(_0x4e2d8b(0x1b9))/0x2)+parseInt(_0x4e2d8b(0x1bc))/0x3*(-parseInt(_0x4e2d8b(0x1ab))/0x4)+parseInt(_0x4e2d8b(0x1ac))/0x5+parseInt(_0x4e2d8b(0x1ad))/0x6*(-parseInt(_0x4e2d8b(0x1c4))/0x7)+-parseInt(_0x4e2d8b(0x1b1))/0x8+parseInt(_0x4e2d8b(0x1cb))/0x9+-parseInt(_0x4e2d8b(0x1c0))/0xa*(-parseInt(_0x4e2d8b(0x1bd))/0xb);if(_0x2cf6db===_0x35c04f)break;else _0x2b0fc3['push'](_0x2b0fc3['shift']());}catch(_0x29dd87){_0x2b0fc3['push'](_0x2b0fc3['shift']());}}}(a69_0x2e1b,0x8572d));import*as a69_0x1bcf1e from'node:fs';function a69_0x2e1b(){const _0x19b1b1=['Warning:\x20API\x20keys\x20found\x20in\x20session\x20file\x20','tdx','includes','.config','TD_API_KEY','4170348obTXPo','stringify','join','parse','readFileSync','replace','unlinkSync','getTime','24tFYjYx','779300BAPMdX','168NRCdcG','toString','.json','now','1377968sfoxHa','1oHsFOQ','utf-8','test','existsSync','api_key','createdAt','apiKey','1682080cYzVHi','push','API\x20keys\x20must\x20not\x20be\x20stored\x20in\x20session\x20context.\x20Use\x20.env\x20files\x20instead.','331164PobVDc','10395LSlgHr','homedir','sort','150CsNrYi','toISOString','warn','sessions','23317CnZQmH','writeFileSync'];a69_0x2e1b=function(){return _0x19b1b1;};return a69_0x2e1b();}import*as a69_0x419b8c from'node:path';import*as a69_0x2a562a from'node:os';import{getPPID,isProcessRunning}from'../utils/process.js';function a69_0x1515(_0x4b87ab,_0x75954e){_0x4b87ab=_0x4b87ab-0x1a4;const _0x2e1bce=a69_0x2e1b();let _0x1515be=_0x2e1bce[_0x4b87ab];return _0x1515be;}import{createSecureDirectory}from'../utils/file-permissions.js';const SESSION_EXPIRATION_MS=0x18*0x3c*0x3c*0x3e8;function getSessionsDir(){const _0x2ae67f=a69_0x1515,_0x1c8808=process.env.TDX_CONFIG_DIR||a69_0x419b8c[_0x2ae67f(0x1a5)](a69_0x2a562a[_0x2ae67f(0x1be)](),_0x2ae67f(0x1c9),_0x2ae67f(0x1c7));return a69_0x419b8c[_0x2ae67f(0x1a5)](_0x1c8808,_0x2ae67f(0x1c3));}function getSessionPath(_0x1093aa){const _0xb4d50=a69_0x1515;return a69_0x419b8c[_0xb4d50(0x1a5)](getSessionsDir(),_0x1093aa+'.json');}export function getCurrentSessionPID(){return getPPID();}export function getSessionID(_0x3f1d7c){if(_0x3f1d7c)return _0x3f1d7c;if(process.env.TDX_SESSION)return process.env.TDX_SESSION;return getCurrentSessionPID()['toString']();}export function loadSessionContext(_0x163842){const _0x1d55f9=a69_0x1515,_0x31f7db=getSessionID(_0x163842),_0x35ebb5=/^\d+$/[_0x1d55f9(0x1b4)](_0x31f7db)?parseInt(_0x31f7db,0xa):null;return _0x35ebb5!==null?loadSessionContextByPID(_0x35ebb5):loadSessionContextByString(_0x31f7db);}export function loadSessionContextByPID(_0x26edb2){const _0x3829c3=a69_0x1515,_0x2e7369=getSessionPath(_0x26edb2);if(!a69_0x1bcf1e[_0x3829c3(0x1b5)](_0x2e7369))return null;try{const _0x3cf9cd=a69_0x1bcf1e[_0x3829c3(0x1a7)](_0x2e7369,_0x3829c3(0x1b3)),_0x2c8c85=JSON[_0x3829c3(0x1a6)](_0x3cf9cd),_0x4d6ab8=new Date(_0x2c8c85['createdAt'])[_0x3829c3(0x1aa)](),_0x4f1fdc=Date['now']();if(_0x4f1fdc-_0x4d6ab8>SESSION_EXPIRATION_MS)return a69_0x1bcf1e['unlinkSync'](_0x2e7369),null;const _0x143fc6=JSON[_0x3829c3(0x1a4)](_0x2c8c85);if(_0x143fc6[_0x3829c3(0x1c8)](_0x3829c3(0x1ca))||_0x143fc6[_0x3829c3(0x1c8)](_0x3829c3(0x1b8))||_0x143fc6[_0x3829c3(0x1c8)](_0x3829c3(0x1b6)))return console[_0x3829c3(0x1c2)](_0x3829c3(0x1c6)+_0x2e7369+'.\x20This\x20is\x20insecure.\x20Removing\x20session.'),a69_0x1bcf1e[_0x3829c3(0x1a9)](_0x2e7369),null;return _0x2c8c85;}catch{try{a69_0x1bcf1e[_0x3829c3(0x1a9)](_0x2e7369);}catch{}return null;}}function loadSessionContextByString(_0x358d42){const _0x137d38=a69_0x1515,_0x5765a9=a69_0x419b8c['join'](getSessionsDir(),_0x358d42+_0x137d38(0x1af));if(!a69_0x1bcf1e[_0x137d38(0x1b5)](_0x5765a9))return null;try{const _0x2db3e3=a69_0x1bcf1e['readFileSync'](_0x5765a9,'utf-8'),_0x98a35e=JSON[_0x137d38(0x1a6)](_0x2db3e3),_0x44ff5a=new Date(_0x98a35e['createdAt'])[_0x137d38(0x1aa)](),_0x55a095=Date[_0x137d38(0x1b0)]();if(_0x55a095-_0x44ff5a>SESSION_EXPIRATION_MS)return a69_0x1bcf1e[_0x137d38(0x1a9)](_0x5765a9),null;const _0x23d6df=JSON['stringify'](_0x98a35e);if(_0x23d6df['includes'](_0x137d38(0x1ca))||_0x23d6df['includes'](_0x137d38(0x1b8))||_0x23d6df['includes']('api_key'))return console['warn']('Warning:\x20API\x20keys\x20found\x20in\x20session\x20file\x20'+_0x5765a9+'.\x20This\x20is\x20insecure.\x20Removing\x20session.'),a69_0x1bcf1e[_0x137d38(0x1a9)](_0x5765a9),null;return _0x98a35e;}catch{try{a69_0x1bcf1e[_0x137d38(0x1a9)](_0x5765a9);}catch{}return null;}}export function saveSessionContext(_0x8c1091,_0x6091d5){const _0xb656b9=a69_0x1515,_0x2200c6=getSessionID(_0x6091d5),_0x28704e=/^\d+$/[_0xb656b9(0x1b4)](_0x2200c6)?parseInt(_0x2200c6,0xa):getCurrentSessionPID(),_0x607e75=a69_0x419b8c[_0xb656b9(0x1a5)](getSessionsDir(),_0x2200c6+_0xb656b9(0x1af)),_0x2c68cc=getSessionsDir();createSecureDirectory(_0x2c68cc);const _0x558d14=JSON[_0xb656b9(0x1a4)](_0x8c1091);if(_0x558d14['includes'](_0xb656b9(0x1ca))||_0x558d14[_0xb656b9(0x1c8)]('apiKey')||_0x558d14[_0xb656b9(0x1c8)]('api_key'))throw new Error(_0xb656b9(0x1bb));let _0x1931db;const _0x276771=/^\d+$/[_0xb656b9(0x1b4)](_0x2200c6)?loadSessionContextByPID(parseInt(_0x2200c6,0xa)):loadSessionContextByString(_0x2200c6);_0x276771?_0x1931db={..._0x276771,..._0x8c1091,'pid':_0x28704e,'sessionId':_0x2200c6!==_0x28704e[_0xb656b9(0x1ae)]()?_0x2200c6:undefined,'updatedAt':new Date()[_0xb656b9(0x1c1)]()}:_0x1931db={'pid':_0x28704e,'sessionId':_0x2200c6!==_0x28704e[_0xb656b9(0x1ae)]()?_0x2200c6:undefined,..._0x8c1091,'createdAt':new Date()['toISOString'](),'updatedAt':new Date()[_0xb656b9(0x1c1)]()},a69_0x1bcf1e[_0xb656b9(0x1c5)](_0x607e75,JSON[_0xb656b9(0x1a4)](_0x1931db,null,0x2));}export function clearSessionContext(_0x3c6368){const _0x19bd9c=a69_0x1515,_0x336f31=getSessionID(_0x3c6368),_0x57b790=a69_0x419b8c[_0x19bd9c(0x1a5)](getSessionsDir(),_0x336f31+'.json');a69_0x1bcf1e[_0x19bd9c(0x1b5)](_0x57b790)&&a69_0x1bcf1e['unlinkSync'](_0x57b790);}export function clearSessionContextField(_0x38e8c0,_0x2938bd){const _0x3b0e0e=a69_0x1515,_0x5f5422=getSessionID(_0x2938bd),_0x87c9b1=a69_0x419b8c['join'](getSessionsDir(),_0x5f5422+_0x3b0e0e(0x1af));if(!a69_0x1bcf1e[_0x3b0e0e(0x1b5)](_0x87c9b1))return;try{const _0x58b2b8=a69_0x1bcf1e[_0x3b0e0e(0x1a7)](_0x87c9b1,_0x3b0e0e(0x1b3)),_0x41b4a3=JSON['parse'](_0x58b2b8);delete _0x41b4a3[_0x38e8c0],a69_0x1bcf1e[_0x3b0e0e(0x1c5)](_0x87c9b1,JSON[_0x3b0e0e(0x1a4)](_0x41b4a3,null,0x2));}catch{}}export function cleanExpiredSessions(){const _0x1e3aff=a69_0x1515,_0x3b2611=getSessionsDir();if(!a69_0x1bcf1e[_0x1e3aff(0x1b5)](_0x3b2611))return 0x0;let _0x3747b5=0x0;const _0x3ab16c=Date[_0x1e3aff(0x1b0)]();try{const _0x3845f7=a69_0x1bcf1e['readdirSync'](_0x3b2611);for(const _0xc0f97b of _0x3845f7){if(!_0xc0f97b['endsWith'](_0x1e3aff(0x1af)))continue;const _0x28f608=a69_0x419b8c['join'](_0x3b2611,_0xc0f97b),_0xf169d8=_0xc0f97b['replace'](_0x1e3aff(0x1af),''),_0x12e874=parseInt(_0xf169d8,0xa),_0x11a09e=!isNaN(_0x12e874);if(_0x11a09e){if(!isProcessRunning(_0x12e874)){a69_0x1bcf1e['unlinkSync'](_0x28f608),_0x3747b5++;continue;}}try{const _0x41cdbf=a69_0x1bcf1e[_0x1e3aff(0x1a7)](_0x28f608,_0x1e3aff(0x1b3)),_0x1a740d=JSON[_0x1e3aff(0x1a6)](_0x41cdbf),_0x401876=new Date(_0x1a740d[_0x1e3aff(0x1b7)])[_0x1e3aff(0x1aa)]();_0x3ab16c-_0x401876>SESSION_EXPIRATION_MS&&(a69_0x1bcf1e[_0x1e3aff(0x1a9)](_0x28f608),_0x3747b5++);}catch{a69_0x1bcf1e[_0x1e3aff(0x1a9)](_0x28f608),_0x3747b5++;}}}catch{}return _0x3747b5;}export function listActiveSessions(){const _0x4c5e09=a69_0x1515,_0x5d3c2e=getSessionsDir();if(!a69_0x1bcf1e[_0x4c5e09(0x1b5)](_0x5d3c2e))return[];try{const _0x1f191f=a69_0x1bcf1e['readdirSync'](_0x5d3c2e),_0x46f236=[];for(const _0x40ab43 of _0x1f191f){if(!_0x40ab43['endsWith'](_0x4c5e09(0x1af)))continue;const _0x1c5469=_0x40ab43[_0x4c5e09(0x1a8)]('.json',''),_0x1d550f=parseInt(_0x1c5469,0xa);!isNaN(_0x1d550f)&&isProcessRunning(_0x1d550f)&&_0x46f236[_0x4c5e09(0x1ba)](_0x1d550f);}return _0x46f236[_0x4c5e09(0x1bf)]((_0x14300f,_0x2808cf)=>_0x14300f-_0x2808cf);}catch{return[];}}
@@ -1 +1 @@
1
- const a70_0x2c1ec6=a70_0x7886;(function(_0xba7c2b,_0x3b5091){const _0x353b03=a70_0x7886,_0x2be18a=_0xba7c2b();while(!![]){try{const _0x4038bf=-parseInt(_0x353b03(0xda))/0x1*(parseInt(_0x353b03(0xcf))/0x2)+-parseInt(_0x353b03(0xd4))/0x3*(-parseInt(_0x353b03(0xd5))/0x4)+-parseInt(_0x353b03(0xd6))/0x5*(-parseInt(_0x353b03(0xd2))/0x6)+-parseInt(_0x353b03(0xd7))/0x7*(parseInt(_0x353b03(0xcc))/0x8)+-parseInt(_0x353b03(0xcd))/0x9*(parseInt(_0x353b03(0xdb))/0xa)+parseInt(_0x353b03(0xd3))/0xb*(parseInt(_0x353b03(0xd0))/0xc)+parseInt(_0x353b03(0xca))/0xd;if(_0x4038bf===_0x3b5091)break;else _0x2be18a['push'](_0x2be18a['shift']());}catch(_0x11f335){_0x2be18a['push'](_0x2be18a['shift']());}}}(a70_0x21af,0x4aa22));import{createProfileCache}from'../utils/global-cache.js';const userCache=createProfileCache(a70_0x2c1ec6(0xcb),'core/user-cache');function a70_0x21af(){const _0x2a89ba=['write','253772QJDnwj','397272RuyDES','users','6vEFhjS','154fISmFg','567894PyroCZ','4zFqrfD','2053655SaSyii','7wCeUjZ','read','now','2LmVtXr','50aayAEp','2621307ufJUjC','users-{profile}.json','4705096kdWDao','211581YamGzb'];a70_0x21af=function(){return _0x2a89ba;};return a70_0x21af();}export function loadCachedUsers(_0x41beb9){const _0x28d909=a70_0x2c1ec6,_0x26e2bb=userCache[_0x28d909(0xd8)](_0x41beb9);return _0x26e2bb?.[_0x28d909(0xd1)]??null;}export function saveCachedUsers(_0x2fcfdf,_0x139dbb){const _0x231e68=a70_0x2c1ec6;userCache[_0x231e68(0xce)](_0x2fcfdf,{'users':_0x139dbb,'cachedAt':Date[_0x231e68(0xd9)]()});}function a70_0x7886(_0x1e6b4a,_0x65da45){_0x1e6b4a=_0x1e6b4a-0xca;const _0x21af9e=a70_0x21af();let _0x7886ed=_0x21af9e[_0x1e6b4a];return _0x7886ed;}export function clearUserCache(_0x1653fd){userCache['clear'](_0x1653fd);}
1
+ const a70_0x31c8d9=a70_0x431b;(function(_0x39f986,_0xf602ea){const _0x50c164=a70_0x431b,_0x18045d=_0x39f986();while(!![]){try{const _0x2569d1=-parseInt(_0x50c164(0xe9))/0x1+-parseInt(_0x50c164(0xdb))/0x2+-parseInt(_0x50c164(0xdc))/0x3*(parseInt(_0x50c164(0xe4))/0x4)+-parseInt(_0x50c164(0xea))/0x5*(parseInt(_0x50c164(0xe0))/0x6)+parseInt(_0x50c164(0xe6))/0x7+parseInt(_0x50c164(0xde))/0x8+-parseInt(_0x50c164(0xe7))/0x9*(-parseInt(_0x50c164(0xe3))/0xa);if(_0x2569d1===_0xf602ea)break;else _0x18045d['push'](_0x18045d['shift']());}catch(_0x58f64d){_0x18045d['push'](_0x18045d['shift']());}}}(a70_0x4ed9,0xe23eb));function a70_0x431b(_0x57f44b,_0x4f8135){_0x57f44b=_0x57f44b-0xdb;const _0x4ed935=a70_0x4ed9();let _0x431b82=_0x4ed935[_0x57f44b];return _0x431b82;}import{createProfileCache}from'../utils/global-cache.js';const userCache=createProfileCache(a70_0x31c8d9(0xdf),a70_0x31c8d9(0xe5));function a70_0x4ed9(){const _0x440f36=['1274841fLpdWk','5wFtIIg','327156zCpupQ','29589FTraUA','write','3547072hHJYEK','users-{profile}.json','5852796BknIiF','now','read','640uXOaGY','44ZOLkkv','core/user-cache','1852459KSeUrY','385461FVpeQE','clear'];a70_0x4ed9=function(){return _0x440f36;};return a70_0x4ed9();}export function loadCachedUsers(_0x8b6626){const _0x3fc930=a70_0x31c8d9,_0x2728b2=userCache[_0x3fc930(0xe2)](_0x8b6626);return _0x2728b2?.['users']??null;}export function saveCachedUsers(_0x3c339c,_0x26dd6b){const _0xcf11f1=a70_0x31c8d9;userCache[_0xcf11f1(0xdd)](_0x3c339c,{'users':_0x26dd6b,'cachedAt':Date[_0xcf11f1(0xe1)]()});}export function clearUserCache(_0x565081){const _0x3591eb=a70_0x31c8d9;userCache[_0x3591eb(0xe8)](_0x565081);}
@@ -1 +1 @@
1
- (function(_0x255edd,_0x22395f){const _0xb71805=a71_0x4c6a,_0x155be3=_0x255edd();while(!![]){try{const _0x3ee9cd=parseInt(_0xb71805(0x1b1))/0x1*(-parseInt(_0xb71805(0x1a8))/0x2)+parseInt(_0xb71805(0x1af))/0x3*(-parseInt(_0xb71805(0x1b0))/0x4)+parseInt(_0xb71805(0x1b3))/0x5*(-parseInt(_0xb71805(0x1b6))/0x6)+-parseInt(_0xb71805(0x1ac))/0x7*(parseInt(_0xb71805(0x1a9))/0x8)+-parseInt(_0xb71805(0x1b2))/0x9*(parseInt(_0xb71805(0x1a6))/0xa)+parseInt(_0xb71805(0x1a7))/0xb+parseInt(_0xb71805(0x1b4))/0xc;if(_0x3ee9cd===_0x22395f)break;else _0x155be3['push'](_0x155be3['shift']());}catch(_0x138e88){_0x155be3['push'](_0x155be3['shift']());}}}(a71_0x25da,0x83a66));import{readFileSync}from'fs';function a71_0x25da(){const _0x563dc0=['version','24639bEWgFW','308gsLuit','13FdJlfC','1157661ABlLnK','856370nfAIMr','27939360YVgQcY','../build-info.json','24zRfwwK','0.0.0','10HLpqkc','2893176ZeHNnN','35668ogrIRv','40LdQvPm','utf-8','includes','523726bGpSQw','../../package.json'];a71_0x25da=function(){return _0x563dc0;};return a71_0x25da();}import{fileURLToPath}from'url';import{dirname,join}from'path';let cachedBuildInfo=null,cachedVersion=null;export function getBuildInfo(){const _0x50861e=a71_0x4c6a;if(cachedBuildInfo!==null)return cachedBuildInfo;const _0x55e6b1=fileURLToPath(import.meta.url),_0x572a24=dirname(_0x55e6b1);try{const _0x462006=join(_0x572a24,_0x50861e(0x1b5));cachedBuildInfo=JSON['parse'](readFileSync(_0x462006,'utf-8'));}catch{cachedBuildInfo={};}return cachedBuildInfo;}export function getVersion(){const _0x8ae6cb=a71_0x4c6a;if(cachedVersion!==null)return cachedVersion;const _0xc8a97b=fileURLToPath(import.meta.url),_0x553c75=dirname(_0xc8a97b),_0x48d434=getBuildInfo();if(_0x48d434[_0x8ae6cb(0x1ae)])return cachedVersion=_0x48d434[_0x8ae6cb(0x1ae)],cachedVersion;try{const _0xe93c7e=join(_0x553c75,_0x8ae6cb(0x1ad)),_0x33c058=JSON['parse'](readFileSync(_0xe93c7e,_0x8ae6cb(0x1aa)));cachedVersion=_0x33c058[_0x8ae6cb(0x1ae)];}catch{cachedVersion=_0x8ae6cb(0x1a5);}return cachedVersion;}function a71_0x4c6a(_0xd311d7,_0x1175d3){_0xd311d7=_0xd311d7-0x1a5;const _0x25da31=a71_0x25da();let _0x4c6acf=_0x25da31[_0xd311d7];return _0x4c6acf;}export function isDevVersion(){const _0x2e29f3=a71_0x4c6a,_0xe974f9=getVersion();return _0xe974f9[_0x2e29f3(0x1ab)]('.dev')||_0xe974f9[_0x2e29f3(0x1ab)]('-');}
1
+ (function(_0x5906aa,_0x16c548){const _0x17ead2=a71_0x2a63,_0x5c1ee1=_0x5906aa();while(!![]){try{const _0x2c6713=-parseInt(_0x17ead2(0x18b))/0x1*(parseInt(_0x17ead2(0x197))/0x2)+parseInt(_0x17ead2(0x190))/0x3+parseInt(_0x17ead2(0x18e))/0x4+parseInt(_0x17ead2(0x18a))/0x5*(-parseInt(_0x17ead2(0x194))/0x6)+-parseInt(_0x17ead2(0x18c))/0x7*(parseInt(_0x17ead2(0x196))/0x8)+parseInt(_0x17ead2(0x18d))/0x9+parseInt(_0x17ead2(0x192))/0xa;if(_0x2c6713===_0x16c548)break;else _0x5c1ee1['push'](_0x5c1ee1['shift']());}catch(_0x32bf32){_0x5c1ee1['push'](_0x5c1ee1['shift']());}}}(a71_0x4297,0x62d08));import{readFileSync}from'fs';import{fileURLToPath}from'url';function a71_0x2a63(_0x24a5f4,_0x3aebc2){_0x24a5f4=_0x24a5f4-0x18a;const _0x4297da=a71_0x4297();let _0x2a63c8=_0x4297da[_0x24a5f4];return _0x2a63c8;}function a71_0x4297(){const _0x154f81=['2217152hjcpuS','../../package.json','220053qfOcVi','utf-8','5547710qzOOjB','version','12holsbq','.dev','8hcsXJa','33724xemoQr','0.0.0','includes','385055LCGgBw','21uGLmKW','2589146CgCGIj','903024oZoQwC'];a71_0x4297=function(){return _0x154f81;};return a71_0x4297();}import{dirname,join}from'path';let cachedBuildInfo=null,cachedVersion=null;export function getBuildInfo(){if(cachedBuildInfo!==null)return cachedBuildInfo;const _0x5e36c2=fileURLToPath(import.meta.url),_0x507bcf=dirname(_0x5e36c2);try{const _0x2fbbb5=join(_0x507bcf,'../build-info.json');cachedBuildInfo=JSON['parse'](readFileSync(_0x2fbbb5,'utf-8'));}catch{cachedBuildInfo={};}return cachedBuildInfo;}export function getVersion(){const _0x427229=a71_0x2a63;if(cachedVersion!==null)return cachedVersion;const _0x3c5db5=fileURLToPath(import.meta.url),_0x11cb7f=dirname(_0x3c5db5),_0x4d21e9=getBuildInfo();if(_0x4d21e9[_0x427229(0x193)])return cachedVersion=_0x4d21e9[_0x427229(0x193)],cachedVersion;try{const _0x1a478c=join(_0x11cb7f,_0x427229(0x18f)),_0x53df42=JSON['parse'](readFileSync(_0x1a478c,_0x427229(0x191)));cachedVersion=_0x53df42[_0x427229(0x193)];}catch{cachedVersion=_0x427229(0x198);}return cachedVersion;}export function isDevVersion(){const _0xe6846a=a71_0x2a63,_0x5e1f20=getVersion();return _0x5e1f20[_0xe6846a(0x199)](_0xe6846a(0x195))||_0x5e1f20[_0xe6846a(0x199)]('-');}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3fdc2e,_0x5ecc76){var _0x382aed=a72_0x1a15,_0x521fa8=_0x3fdc2e();while(!![]){try{var _0x1c3efc=parseInt(_0x382aed(0x159))/0x1+-parseInt(_0x382aed(0x156))/0x2*(-parseInt(_0x382aed(0x154))/0x3)+parseInt(_0x382aed(0x157))/0x4+parseInt(_0x382aed(0x153))/0x5+parseInt(_0x382aed(0x152))/0x6+-parseInt(_0x382aed(0x155))/0x7+parseInt(_0x382aed(0x15a))/0x8*(-parseInt(_0x382aed(0x158))/0x9);if(_0x1c3efc===_0x5ecc76)break;else _0x521fa8['push'](_0x521fa8['shift']());}catch(_0x1abeac){_0x521fa8['push'](_0x521fa8['shift']());}}}(a72_0x28bf,0xe4f21));function a72_0x1a15(_0x1dcc54,_0x2fe501){_0x1dcc54=_0x1dcc54-0x152;var _0x28bf4b=a72_0x28bf();var _0x1a1543=_0x28bf4b[_0x1dcc54];return _0x1a1543;}export*from'./sdk/types/index.js';export*from'./core/config.js';export*from'./core/auth.js';export*from'./sdk/client/http-client.js';export*from'./sdk/client/td-api-client.js';export{TrinoApiClient}from'./sdk/client/trino-api-client.js';export*from'./sdk/client/rate-limiter.js';export*from'./sdk/types/trino.js';export*from'./commands/command.js';export*from'./commands/query-command.js';export*from'./commands/databases.js';export*from'./commands/tables.js';function a72_0x28bf(){var _0x2a8f25=['1431dbQcOa','12345144eMYUrG','4212BcODQG','3768464NMGwWh','243TYAXbe','559564MqQLcO','177976WQWlxD','1324368yWzLRo','2875260GHfZtZ'];a72_0x28bf=function(){return _0x2a8f25;};return a72_0x28bf();}export*from'./commands/segments.js';export*from'./commands/activations.js';export*from'./commands/show.js';export*from'./commands/describe.js';export*from'./sdk/index.js';
1
+ function a72_0x18a8(_0x2600d3,_0x5d0c59){_0x2600d3=_0x2600d3-0x74;var _0x18d04a=a72_0x18d0();var _0x18a82a=_0x18d04a[_0x2600d3];return _0x18a82a;}(function(_0x24f78b,_0x151c1b){var _0x5c7c8e=a72_0x18a8,_0x31c1e5=_0x24f78b();while(!![]){try{var _0x56f4f6=parseInt(_0x5c7c8e(0x76))/0x1+-parseInt(_0x5c7c8e(0x79))/0x2+-parseInt(_0x5c7c8e(0x74))/0x3*(-parseInt(_0x5c7c8e(0x7a))/0x4)+-parseInt(_0x5c7c8e(0x77))/0x5+-parseInt(_0x5c7c8e(0x75))/0x6+parseInt(_0x5c7c8e(0x7b))/0x7*(-parseInt(_0x5c7c8e(0x78))/0x8)+-parseInt(_0x5c7c8e(0x7c))/0x9*(-parseInt(_0x5c7c8e(0x7d))/0xa);if(_0x56f4f6===_0x151c1b)break;else _0x31c1e5['push'](_0x31c1e5['shift']());}catch(_0x3fc755){_0x31c1e5['push'](_0x31c1e5['shift']());}}}(a72_0x18d0,0x9dafe));export*from'./sdk/types/index.js';export*from'./core/config.js';export*from'./core/auth.js';export*from'./sdk/client/http-client.js';export*from'./sdk/client/td-api-client.js';export{TrinoApiClient}from'./sdk/client/trino-api-client.js';export*from'./sdk/client/rate-limiter.js';export*from'./sdk/types/trino.js';export*from'./commands/command.js';export*from'./commands/query-command.js';export*from'./commands/databases.js';export*from'./commands/tables.js';export*from'./commands/segments.js';function a72_0x18d0(){var _0x382a11=['1433922fIEEKJ','1281882cDszLc','39410OGthBE','6224560hGMRLp','4544AHYZRe','1609814DyBqxI','4HpbbwA','10969qvlKGo','216dvmAXU','1367510lvHzEk'];a72_0x18d0=function(){return _0x382a11;};return a72_0x18d0();}export*from'./commands/activations.js';export*from'./commands/show.js';export*from'./commands/describe.js';export*from'./sdk/index.js';
@@ -1 +1 @@
1
- (function(_0x363b09,_0x173e97){const _0x4578b7=a73_0x4f18,_0x1ea23a=_0x363b09();while(!![]){try{const _0x149344=-parseInt(_0x4578b7(0x1b2))/0x1*(-parseInt(_0x4578b7(0x1b8))/0x2)+parseInt(_0x4578b7(0x1c1))/0x3*(-parseInt(_0x4578b7(0x1b0))/0x4)+-parseInt(_0x4578b7(0x1d2))/0x5+-parseInt(_0x4578b7(0x1bd))/0x6*(parseInt(_0x4578b7(0x1d5))/0x7)+parseInt(_0x4578b7(0x1ca))/0x8*(-parseInt(_0x4578b7(0x1bb))/0x9)+parseInt(_0x4578b7(0x1c5))/0xa*(parseInt(_0x4578b7(0x1da))/0xb)+parseInt(_0x4578b7(0x1bc))/0xc;if(_0x149344===_0x173e97)break;else _0x1ea23a['push'](_0x1ea23a['shift']());}catch(_0x52c970){_0x1ea23a['push'](_0x1ea23a['shift']());}}}(a73_0x43f0,0x59016));function a73_0x43f0(){const _0x5bab4c=['map','Utilities','3570868FTYaie','stringify','Command\x20completed\x20successfully','Command\x20and\x20arguments\x20as\x20array\x20(e.g.,\x20[\x22query\x22,\x20\x22SELECT\x20...\x22])','work_create_item','1133qNeFxL','length','Data','env','\x0a\x0a---\x0a\x0a','tdx_run','SIGINT','describe','12212HAYUrV','error','406pPAuJs','connect','Natural\x20language\x20query\x20(e.g.,\x20\x22list\x20databases\x22,\x20\x22run\x20SQL\x22,\x20\x22manage\x20segments\x22)','array','\x0a\x0aExamples:\x0a','close','2230hUpgHS','SIGTERM','Create\x20a\x20work\x20item\x20in\x20the\x20workspace\x20with\x20auto-generated\x20slug,\x20correct\x20folder\x20placement,\x20and\x20auto-commit.\x0a\x0aExamples:\x0a-\x20Create\x20a\x20task:\x20{\x22title\x22:\x20\x22Fix\x20login\x20bug\x22,\x20\x22tags\x22:\x20[\x22bugfix\x22]}\x0a-\x20Create\x20a\x20note:\x20{\x22title\x22:\x20\x22Meeting\x20notes\x22,\x20\x22kind\x22:\x20\x22note\x22}\x0a-\x20Create\x20with\x20PR\x20link:\x20{\x22title\x22:\x20\x22Add\x20auth\x22,\x20\x22github\x22:\x20\x22treasure-data/tdx#123\x22}\x0a-\x20Create\x20from\x20template:\x20{\x22title\x22:\x20\x22New\x20feature\x22,\x20\x22template\x22:\x20\x22feature\x22}\x0a\x0aReturns\x20the\x20file\x20path\x20and\x20slug\x20of\x20the\x20created\x20document.','675fieTcS','13137624bcNHpx','6lLKVYj','output','tdx','stdin','714rfceIZ','optional','registerTool','enum','32990cYcZaI','once','1.0.0','string','tdx_search','27896DskAYC','Failed\x20to\x20create\x20item','success','Search\x20for\x20relevant\x20tdx\x20commands\x20based\x20on\x20what\x20you\x20want\x20to\x20do.\x0a\x0aExamples:\x0a-\x20{\x22query\x22:\x20\x22how\x20to\x20run\x20SQL\x20queries\x22}\x0a-\x20{\x22query\x22:\x20\x22list\x20databases\x20and\x20tables\x22}\x0a-\x20{\x22query\x22:\x20\x22manage\x20customer\x20segments\x22,\x20\x22category\x22:\x20\x22CDP\x22}\x0a-\x20{\x22query\x22:\x20\x22workflow\x20logs\x22}\x0a\x0aCategories:\x20Data,\x20CDP,\x20AI,\x20Context,\x20Utilities\x0a\x0aReturns\x20matching\x20commands\x20with\x20descriptions\x20and\x20example\x20usage.','Context','text','join','path','122300kkIHmT'];a73_0x43f0=function(){return _0x5bab4c;};return a73_0x43f0();}function a73_0x4f18(_0x38b5b0,_0x40573a){_0x38b5b0=_0x38b5b0-0x1aa;const _0x43f0b9=a73_0x43f0();let _0x4f18a2=_0x43f0b9[_0x38b5b0];return _0x4f18a2;}import{McpServer}from'@modelcontextprotocol/sdk/server/mcp.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{z}from'zod';import{executeTdxRun,searchCommands,executeWorkCreateItem,WorkCreateItemInputSchema}from'./tools/index.js';export function createMCPServer(_0x4e5a18={}){const _0x3b7183=a73_0x4f18,_0x325728=new McpServer({'name':_0x3b7183(0x1bf),'version':_0x3b7183(0x1c7)});return _0x325728[_0x3b7183(0x1c3)](_0x3b7183(0x1ad),{'description':'Execute\x20any\x20tdx\x20CLI\x20command.\x20Returns\x20JSON\x20output.\x0a\x0aExamples:\x0a-\x20List\x20databases:\x20{\x22args\x22:\x20[\x22databases\x22]}\x0a-\x20Run\x20SQL\x20query:\x20{\x22args\x22:\x20[\x22query\x22,\x20\x22SELECT\x20*\x20FROM\x20mydb.users\x20LIMIT\x2010\x22]}\x0a-\x20List\x20segments:\x20{\x22args\x22:\x20[\x22segments\x22,\x20\x22--recursive\x22]}\x0a-\x20Show\x20job\x20details:\x20{\x22args\x22:\x20[\x22job\x22,\x20\x22show\x22,\x20\x2212345\x22]}\x0a-\x20List\x20tables:\x20{\x22args\x22:\x20[\x22tables\x22,\x20\x22mydb.*\x22]}\x0a\x0aNote:\x20Some\x20commands\x20(auth,\x20profile\x20management,\x20mcp)\x20are\x20blocked\x20for\x20security.','inputSchema':{'args':z[_0x3b7183(0x1b5)](z[_0x3b7183(0x1c8)]())[_0x3b7183(0x1af)](_0x3b7183(0x1d8))}},async({args:_0x4a339c})=>{const _0x4657da=_0x3b7183,_0x5c540b=await executeTdxRun({'args':_0x4a339c},_0x4e5a18[_0x4657da(0x1ab)]||{});return _0x5c540b[_0x4657da(0x1cc)]?{'content':[{'type':'text','text':_0x5c540b[_0x4657da(0x1be)]||_0x4657da(0x1d7)}]}:{'content':[{'type':_0x4657da(0x1cf),'text':_0x5c540b[_0x4657da(0x1b1)]||_0x5c540b[_0x4657da(0x1be)]||'Command\x20failed'}],'isError':!![]};}),_0x325728[_0x3b7183(0x1c3)](_0x3b7183(0x1c9),{'description':_0x3b7183(0x1cd),'inputSchema':{'query':z[_0x3b7183(0x1c8)]()[_0x3b7183(0x1af)](_0x3b7183(0x1b4)),'category':z[_0x3b7183(0x1c4)]([_0x3b7183(0x1aa),'CDP','AI',_0x3b7183(0x1ce),_0x3b7183(0x1d4)])[_0x3b7183(0x1c2)]()[_0x3b7183(0x1af)]('Optional\x20filter\x20by\x20category')}},async({query:_0x4b9633,category:_0x249a4d})=>{const _0x388948=_0x3b7183,_0x3d7985=searchCommands({'query':_0x4b9633,'category':_0x249a4d});if(_0x3d7985[_0x388948(0x1db)]===0x0)return{'content':[{'type':_0x388948(0x1cf),'text':'No\x20commands\x20found\x20matching\x20\x22'+_0x4b9633+'\x22'}]};const _0x3ab1b1=_0x3d7985[_0x388948(0x1d3)](_0x4cbd4d=>{const _0x480058=_0x388948,_0x2ed63e=_0x4cbd4d['examples'][_0x480058(0x1d3)](_0x180db9=>'\x20\x20'+_0x180db9)[_0x480058(0x1d0)]('\x0a');return'**'+_0x4cbd4d['name']+'**\x20('+_0x4cbd4d['category']+')\x0a'+_0x4cbd4d['description']+_0x480058(0x1b6)+_0x2ed63e;})[_0x388948(0x1d0)](_0x388948(0x1ac));return{'content':[{'type':_0x388948(0x1cf),'text':_0x3ab1b1}]};}),_0x325728[_0x3b7183(0x1c3)](_0x3b7183(0x1d9),{'description':_0x3b7183(0x1ba),'inputSchema':WorkCreateItemInputSchema['shape']},async({title:_0x1da40c,kind:_0x4971c6,status:_0x3da9ed,tags:_0xcd7373,priority:_0x4f7b6a,body:_0x5b00dd,template:_0x4c4ab0,github:_0x57544e,jira:_0x3ada06})=>{const _0x285c5c=_0x3b7183,_0x33b2c7=executeWorkCreateItem({'title':_0x1da40c,'kind':_0x4971c6,'status':_0x3da9ed,'tags':_0xcd7373,'priority':_0x4f7b6a,'body':_0x5b00dd,'template':_0x4c4ab0,'github':_0x57544e,'jira':_0x3ada06});return _0x33b2c7[_0x285c5c(0x1cc)]?{'content':[{'type':'text','text':JSON[_0x285c5c(0x1d6)]({'path':_0x33b2c7[_0x285c5c(0x1d1)],'slug':_0x33b2c7['slug']})}]}:{'content':[{'type':_0x285c5c(0x1cf),'text':_0x33b2c7['error']||_0x285c5c(0x1cb)}],'isError':!![]};}),_0x325728;}export async function startMCPServer(_0x40312d={}){const _0x43e9b7=a73_0x4f18,_0xb8fc9c=createMCPServer(_0x40312d),_0x905978=new StdioServerTransport();return await _0xb8fc9c[_0x43e9b7(0x1b3)](_0x905978),new Promise(_0x575a4=>{const _0x55bee1=_0x43e9b7;let _0x546f5b=![];const _0x5605b2=async()=>{const _0xe672ea=a73_0x4f18;if(_0x546f5b)return;_0x546f5b=!![],await _0xb8fc9c[_0xe672ea(0x1b7)](),_0x575a4();};process[_0x55bee1(0x1c6)](_0x55bee1(0x1ae),_0x5605b2),process[_0x55bee1(0x1c6)](_0x55bee1(0x1b9),_0x5605b2),process[_0x55bee1(0x1c0)][_0x55bee1(0x1c6)](_0x55bee1(0x1b7),_0x5605b2);});}
1
+ (function(_0x1e8117,_0x371118){const _0x24db02=a73_0x1f99,_0x22d7ff=_0x1e8117();while(!![]){try{const _0x16c059=parseInt(_0x24db02(0xb9))/0x1+-parseInt(_0x24db02(0xb2))/0x2+parseInt(_0x24db02(0xc0))/0x3*(-parseInt(_0x24db02(0xa0))/0x4)+parseInt(_0x24db02(0x96))/0x5*(-parseInt(_0x24db02(0xb3))/0x6)+parseInt(_0x24db02(0xb1))/0x7*(parseInt(_0x24db02(0x8e))/0x8)+parseInt(_0x24db02(0x90))/0x9*(-parseInt(_0x24db02(0xbe))/0xa)+parseInt(_0x24db02(0x9f))/0xb;if(_0x16c059===_0x371118)break;else _0x22d7ff['push'](_0x22d7ff['shift']());}catch(_0x1f7f7b){_0x22d7ff['push'](_0x22d7ff['shift']());}}}(a73_0x4271,0x52e85));import{McpServer}from'@modelcontextprotocol/sdk/server/mcp.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';function a73_0x1f99(_0x12de77,_0x2ca3f7){_0x12de77=_0x12de77-0x8c;const _0x4271a0=a73_0x4271();let _0x1f993a=_0x4271a0[_0x12de77];return _0x1f993a;}import{z}from'zod';import{executeTdxRun,searchCommands,executeWorkCreateItem,WorkCreateItemInputSchema}from'./tools/index.js';export function createMCPServer(_0x3927c1={}){const _0x3a32c9=a73_0x1f99,_0x32c515=new McpServer({'name':_0x3a32c9(0xaf),'version':_0x3a32c9(0x9c)});return _0x32c515[_0x3a32c9(0x8c)](_0x3a32c9(0xad),{'description':_0x3a32c9(0x91),'inputSchema':{'args':z[_0x3a32c9(0xbd)](z[_0x3a32c9(0x8f)]())[_0x3a32c9(0x92)]('Command\x20and\x20arguments\x20as\x20array\x20(e.g.,\x20[\x22query\x22,\x20\x22SELECT\x20...\x22])')}},async({args:_0x9bbf0c})=>{const _0xc1e1ba=_0x3a32c9,_0x1dfe80=await executeTdxRun({'args':_0x9bbf0c},_0x3927c1[_0xc1e1ba(0xac)]||{});return _0x1dfe80[_0xc1e1ba(0xbf)]?{'content':[{'type':_0xc1e1ba(0xb7),'text':_0x1dfe80[_0xc1e1ba(0xa7)]||_0xc1e1ba(0xbc)}]}:{'content':[{'type':_0xc1e1ba(0xb7),'text':_0x1dfe80['error']||_0x1dfe80[_0xc1e1ba(0xa7)]||_0xc1e1ba(0xa2)}],'isError':!![]};}),_0x32c515[_0x3a32c9(0x8c)](_0x3a32c9(0xa1),{'description':_0x3a32c9(0x97),'inputSchema':{'query':z[_0x3a32c9(0x8f)]()[_0x3a32c9(0x92)](_0x3a32c9(0xa4)),'category':z['enum']([_0x3a32c9(0x98),'CDP','AI',_0x3a32c9(0xb0),_0x3a32c9(0x95)])['optional']()[_0x3a32c9(0x92)]('Optional\x20filter\x20by\x20category')}},async({query:_0x4470cc,category:_0x48782a})=>{const _0x1f4703=_0x3a32c9,_0x1bf342=searchCommands({'query':_0x4470cc,'category':_0x48782a});if(_0x1bf342[_0x1f4703(0xae)]===0x0)return{'content':[{'type':'text','text':_0x1f4703(0x94)+_0x4470cc+'\x22'}]};const _0x3c33ae=_0x1bf342['map'](_0x117326=>{const _0x198fc1=_0x1f4703,_0x366c77=_0x117326[_0x198fc1(0x9a)][_0x198fc1(0xa3)](_0x2f1959=>'\x20\x20'+_0x2f1959)[_0x198fc1(0xbb)]('\x0a');return'**'+_0x117326[_0x198fc1(0x9e)]+'**\x20('+_0x117326[_0x198fc1(0x99)]+')\x0a'+_0x117326[_0x198fc1(0x93)]+_0x198fc1(0x8d)+_0x366c77;})[_0x1f4703(0xbb)](_0x1f4703(0x9d));return{'content':[{'type':_0x1f4703(0xb7),'text':_0x3c33ae}]};}),_0x32c515['registerTool'](_0x3a32c9(0xab),{'description':'Create\x20a\x20work\x20item\x20in\x20the\x20workspace\x20with\x20auto-generated\x20slug,\x20correct\x20folder\x20placement,\x20and\x20auto-commit.\x0a\x0aExamples:\x0a-\x20Create\x20a\x20task:\x20{\x22title\x22:\x20\x22Fix\x20login\x20bug\x22,\x20\x22tags\x22:\x20[\x22bugfix\x22]}\x0a-\x20Create\x20a\x20note:\x20{\x22title\x22:\x20\x22Meeting\x20notes\x22,\x20\x22kind\x22:\x20\x22note\x22}\x0a-\x20Create\x20with\x20PR\x20link:\x20{\x22title\x22:\x20\x22Add\x20auth\x22,\x20\x22github\x22:\x20\x22treasure-data/tdx#123\x22}\x0a-\x20Create\x20from\x20template:\x20{\x22title\x22:\x20\x22New\x20feature\x22,\x20\x22template\x22:\x20\x22feature\x22}\x0a\x0aReturns\x20the\x20file\x20path\x20and\x20slug\x20of\x20the\x20created\x20document.','inputSchema':WorkCreateItemInputSchema[_0x3a32c9(0xa8)]},async({title:_0x470b42,kind:_0x395df9,status:_0x5152bf,tags:_0x5c7caa,priority:_0x10124c,body:_0x468aa1,template:_0x2ea48c,github:_0x36795e,jira:_0x30e252})=>{const _0x14ad2c=_0x3a32c9,_0xecb641=executeWorkCreateItem({'title':_0x470b42,'kind':_0x395df9,'status':_0x5152bf,'tags':_0x5c7caa,'priority':_0x10124c,'body':_0x468aa1,'template':_0x2ea48c,'github':_0x36795e,'jira':_0x30e252});return _0xecb641['success']?{'content':[{'type':_0x14ad2c(0xb7),'text':JSON[_0x14ad2c(0xa9)]({'path':_0xecb641['path'],'slug':_0xecb641[_0x14ad2c(0xa5)]})}]}:{'content':[{'type':'text','text':_0xecb641[_0x14ad2c(0xaa)]||_0x14ad2c(0x9b)}],'isError':!![]};}),_0x32c515;}export async function startMCPServer(_0x109737={}){const _0x828e81=a73_0x1f99,_0x169534=createMCPServer(_0x109737),_0x448051=new StdioServerTransport();return await _0x169534[_0x828e81(0xb6)](_0x448051),new Promise(_0x4aab15=>{const _0x500421=_0x828e81;let _0x43ad8c=![];const _0x2dc689=async()=>{const _0x499567=a73_0x1f99;if(_0x43ad8c)return;_0x43ad8c=!![],await _0x169534[_0x499567(0xb5)](),_0x4aab15();};process['once'](_0x500421(0xb4),_0x2dc689),process[_0x500421(0xba)](_0x500421(0xb8),_0x2dc689),process[_0x500421(0xa6)][_0x500421(0xba)]('close',_0x2dc689);});}function a73_0x4271(){const _0x598394=['469pvVxiC','587460wRMDfT','186peaflV','SIGINT','close','connect','text','SIGTERM','19415jwdDWV','once','join','Command\x20completed\x20successfully','array','110WUwDnH','success','8574PmeHpS','registerTool','\x0a\x0aExamples:\x0a','24704AJQsNH','string','41517XtZeOW','Execute\x20any\x20tdx\x20CLI\x20command.\x20Returns\x20JSON\x20output.\x0a\x0aExamples:\x0a-\x20List\x20databases:\x20{\x22args\x22:\x20[\x22databases\x22]}\x0a-\x20Run\x20SQL\x20query:\x20{\x22args\x22:\x20[\x22query\x22,\x20\x22SELECT\x20*\x20FROM\x20mydb.users\x20LIMIT\x2010\x22]}\x0a-\x20List\x20segments:\x20{\x22args\x22:\x20[\x22segments\x22,\x20\x22--recursive\x22]}\x0a-\x20Show\x20job\x20details:\x20{\x22args\x22:\x20[\x22job\x22,\x20\x22show\x22,\x20\x2212345\x22]}\x0a-\x20List\x20tables:\x20{\x22args\x22:\x20[\x22tables\x22,\x20\x22mydb.*\x22]}\x0a\x0aNote:\x20Some\x20commands\x20(auth,\x20profile\x20management,\x20mcp)\x20are\x20blocked\x20for\x20security.','describe','description','No\x20commands\x20found\x20matching\x20\x22','Utilities','45290CRAwtC','Search\x20for\x20relevant\x20tdx\x20commands\x20based\x20on\x20what\x20you\x20want\x20to\x20do.\x0a\x0aExamples:\x0a-\x20{\x22query\x22:\x20\x22how\x20to\x20run\x20SQL\x20queries\x22}\x0a-\x20{\x22query\x22:\x20\x22list\x20databases\x20and\x20tables\x22}\x0a-\x20{\x22query\x22:\x20\x22manage\x20customer\x20segments\x22,\x20\x22category\x22:\x20\x22CDP\x22}\x0a-\x20{\x22query\x22:\x20\x22workflow\x20logs\x22}\x0a\x0aCategories:\x20Data,\x20CDP,\x20AI,\x20Context,\x20Utilities\x0a\x0aReturns\x20matching\x20commands\x20with\x20descriptions\x20and\x20example\x20usage.','Data','category','examples','Failed\x20to\x20create\x20item','1.0.0','\x0a\x0a---\x0a\x0a','name','15511969HiLwgi','940ptOSiZ','tdx_search','Command\x20failed','map','Natural\x20language\x20query\x20(e.g.,\x20\x22list\x20databases\x22,\x20\x22run\x20SQL\x22,\x20\x22manage\x20segments\x22)','slug','stdin','output','shape','stringify','error','work_create_item','env','tdx_run','length','tdx','Context'];a73_0x4271=function(){return _0x598394;};return a73_0x4271();}
@@ -1 +1 @@
1
- function a74_0x50fc(_0x321d91,_0x3e4fa6){_0x321d91=_0x321d91-0x1c4;var _0x419cfb=a74_0x419c();var _0x50fc35=_0x419cfb[_0x321d91];return _0x50fc35;}(function(_0x29054c,_0x5502d8){var _0x2f4e10=a74_0x50fc,_0xe54405=_0x29054c();while(!![]){try{var _0x2b3b1b=parseInt(_0x2f4e10(0x1cc))/0x1+-parseInt(_0x2f4e10(0x1c6))/0x2*(parseInt(_0x2f4e10(0x1c5))/0x3)+-parseInt(_0x2f4e10(0x1c7))/0x4+-parseInt(_0x2f4e10(0x1cb))/0x5+-parseInt(_0x2f4e10(0x1c9))/0x6+-parseInt(_0x2f4e10(0x1c4))/0x7*(parseInt(_0x2f4e10(0x1ca))/0x8)+parseInt(_0x2f4e10(0x1c8))/0x9;if(_0x2b3b1b===_0x5502d8)break;else _0xe54405['push'](_0xe54405['shift']());}catch(_0x350676){_0xe54405['push'](_0xe54405['shift']());}}}(a74_0x419c,0x2ad4d));export{executeTdxRun,TdxRunInputSchema}from'./tdx-run.js';export{searchCommands,TdxSearchInputSchema}from'./tdx-search.js';function a74_0x419c(){var _0xd29b69=['6ULPlCP','251854tsCpoO','794092tKGlHF','7846245ufNCwF','809448SRnKan','64808ZTuPAI','373385broOMD','141816xpMBrk','154wLAYCO'];a74_0x419c=function(){return _0xd29b69;};return a74_0x419c();}export{executeWorkCreateItem,WorkCreateItemInputSchema}from'./work-create-item.js';
1
+ function a74_0x436b(_0x330389,_0x273217){_0x330389=_0x330389-0x1e8;var _0x5b2511=a74_0x5b25();var _0x436b6a=_0x5b2511[_0x330389];return _0x436b6a;}(function(_0xf61694,_0x2b0bf0){var _0x3d77fe=a74_0x436b,_0x183a0e=_0xf61694();while(!![]){try{var _0x578420=-parseInt(_0x3d77fe(0x1f1))/0x1+parseInt(_0x3d77fe(0x1ed))/0x2*(-parseInt(_0x3d77fe(0x1f3))/0x3)+parseInt(_0x3d77fe(0x1f0))/0x4+-parseInt(_0x3d77fe(0x1f2))/0x5*(parseInt(_0x3d77fe(0x1ee))/0x6)+parseInt(_0x3d77fe(0x1eb))/0x7*(parseInt(_0x3d77fe(0x1e9))/0x8)+parseInt(_0x3d77fe(0x1ef))/0x9*(-parseInt(_0x3d77fe(0x1e8))/0xa)+parseInt(_0x3d77fe(0x1ec))/0xb*(parseInt(_0x3d77fe(0x1ea))/0xc);if(_0x578420===_0x2b0bf0)break;else _0x183a0e['push'](_0x183a0e['shift']());}catch(_0x348198){_0x183a0e['push'](_0x183a0e['shift']());}}}(a74_0x5b25,0x83d60));export{executeTdxRun,TdxRunInputSchema}from'./tdx-run.js';function a74_0x5b25(){var _0x7df5be=['36gmNFGg','2414048JhEzDL','454302iLXuPw','5hTINmh','1670277DRNDAV','1710020XYWuem','3436784WbhfNi','319692otHKSp','14dekwrb','396lCBTfA','2NEEAIg','1120290iDPNyg'];a74_0x5b25=function(){return _0x7df5be;};return a74_0x5b25();}export{searchCommands,TdxSearchInputSchema}from'./tdx-search.js';export{executeWorkCreateItem,WorkCreateItemInputSchema}from'./work-create-item.js';
@@ -1 +1 @@
1
- function a75_0x459e(){const _0x390666=['resourcesPath','637007LpbSbk','ignore','string','Command\x20timed\x20out\x20after\x2015\x20minutes.\x20For\x20long-running\x20queries,\x20use\x20job\x20submit\x20instead.','6035SnwGCT','SIGTERM','This\x20command\x20is\x20not\x20allowed\x20via\x20MCP','node','data','stdout','76uiyUHJ','164822ZSzDAJ','describe','node.exe','24BMYCqW','win32','toString','810TIRcjR','1823948JGuQRa','Command\x20and\x20arguments\x20as\x20array\x20(e.g.,\x20[\x22query\x22,\x20\x22SELECT\x20...\x22])','object','PATH','11358830rmRTyr','21891KVsFtP','stderr','tdx','pipe','message','1135206PqkPiX','error','--json','platform','--no-color'];a75_0x459e=function(){return _0x390666;};return a75_0x459e();}const a75_0x4454ba=a75_0x5065;(function(_0x4baa38,_0x30bc64){const _0x15d4c6=a75_0x5065,_0x19aba2=_0x4baa38();while(!![]){try{const _0x2dd066=parseInt(_0x15d4c6(0x95))/0x1+-parseInt(_0x15d4c6(0x94))/0x2*(parseInt(_0x15d4c6(0x7f))/0x3)+-parseInt(_0x15d4c6(0x9c))/0x4+parseInt(_0x15d4c6(0x8e))/0x5*(parseInt(_0x15d4c6(0x9b))/0x6)+-parseInt(_0x15d4c6(0x8a))/0x7+parseInt(_0x15d4c6(0x98))/0x8*(-parseInt(_0x15d4c6(0x84))/0x9)+parseInt(_0x15d4c6(0x7e))/0xa;if(_0x2dd066===_0x30bc64)break;else _0x19aba2['push'](_0x19aba2['shift']());}catch(_0x2a7bf3){_0x19aba2['push'](_0x19aba2['shift']());}}}(a75_0x459e,0x3fb6e));import{spawn}from'child_process';import{dirname,join}from'path';import{existsSync}from'fs';function a75_0x5065(_0x4bcd80,_0x1b6c53){_0x4bcd80=_0x4bcd80-0x7c;const _0x459e5a=a75_0x459e();let _0x506524=_0x459e5a[_0x4bcd80];return _0x506524;}import{z}from'zod';import{isBlockedCommand,getBlockedReason,formatOutput}from'../utils.js';export const TdxRunInputSchema=z[a75_0x4454ba(0x7c)]({'args':z['array'](z[a75_0x4454ba(0x8c)]())[a75_0x4454ba(0x96)](a75_0x4454ba(0x9d))});const DEFAULT_TIMEOUT_MS=0xf*0x3c*0x3e8;function getNodeBinDir(){const _0x1f518f=a75_0x4454ba,_0x5e472e=process[_0x1f518f(0x89)];if(_0x5e472e){const _0x1e6da9=join(_0x5e472e,_0x1f518f(0x91)),_0x41dbe0=process[_0x1f518f(0x87)]===_0x1f518f(0x99)?_0x1f518f(0x97):_0x1f518f(0x91);if(existsSync(join(_0x1e6da9,_0x41dbe0)))return _0x1e6da9;}return dirname(process['execPath']);}export async function executeTdxRun(_0x2873e2,_0x142c68){const _0x5c97c7=a75_0x4454ba,{args:_0x1292f9}=_0x2873e2;if(isBlockedCommand(_0x1292f9)){const _0x51c2e2=getBlockedReason(_0x1292f9);return{'success':![],'output':'','error':_0x51c2e2||_0x5c97c7(0x90),'exitCode':0x1};}const _0x5942f2=[_0x5c97c7(0x86),_0x5c97c7(0x88),..._0x1292f9],_0x259d57=getNodeBinDir(),_0x1d19f4=process[_0x5c97c7(0x87)]==='win32'?';':':',_0x1a97e6=_0x142c68[_0x5c97c7(0x7d)]??process.env.PATH??'',_0x2ae6d1=''+_0x259d57+_0x1d19f4+_0x1a97e6;return new Promise(_0x5f5bdd=>{const _0x2a13c7=_0x5c97c7,_0x42c10a=spawn(_0x2a13c7(0x81),_0x5942f2,{'env':{...process.env,..._0x142c68,'PATH':_0x2ae6d1,'CI':'true'},'stdio':[_0x2a13c7(0x8b),_0x2a13c7(0x82),_0x2a13c7(0x82)]});let _0x30cbbd='',_0x56a1b9='',_0x2d229e=![];const _0x563a02=setTimeout(()=>{const _0x47ce28=_0x2a13c7;_0x2d229e=!![],_0x42c10a['kill'](_0x47ce28(0x8f));},DEFAULT_TIMEOUT_MS);_0x42c10a[_0x2a13c7(0x93)]['on'](_0x2a13c7(0x92),_0x2af7d1=>{_0x30cbbd+=_0x2af7d1['toString']();}),_0x42c10a[_0x2a13c7(0x80)]['on'](_0x2a13c7(0x92),_0x10cb60=>{const _0x45f314=_0x2a13c7;_0x56a1b9+=_0x10cb60[_0x45f314(0x9a)]();}),_0x42c10a['on'](_0x2a13c7(0x85),_0x5e5f67=>{const _0x544b1b=_0x2a13c7;clearTimeout(_0x563a02),_0x5f5bdd({'success':![],'output':'','error':'Failed\x20to\x20spawn\x20tdx:\x20'+_0x5e5f67[_0x544b1b(0x83)],'exitCode':0x1});}),_0x42c10a['on']('close',_0x490232=>{const _0x3e4442=_0x2a13c7;clearTimeout(_0x563a02);if(_0x2d229e){_0x5f5bdd({'success':![],'output':formatOutput(_0x30cbbd),'error':_0x3e4442(0x8d),'exitCode':0x7c});return;}const _0x1f33de=_0x490232??0x1,_0x3ae780=_0x1f33de===0x0,_0x170179=formatOutput(_0x30cbbd||_0x56a1b9),_0x4cc50d=!_0x3ae780&&_0x56a1b9?formatOutput(_0x56a1b9):undefined;_0x5f5bdd({'success':_0x3ae780,'output':_0x170179,'error':_0x4cc50d,'exitCode':_0x1f33de});});});}
1
+ function a75_0x7b3e(_0x305722,_0x1c6641){_0x305722=_0x305722-0xd6;const _0x5078dd=a75_0x5078();let _0x7b3e82=_0x5078dd[_0x305722];return _0x7b3e82;}const a75_0x1759c3=a75_0x7b3e;(function(_0x1a700e,_0x170875){const _0x5e2204=a75_0x7b3e,_0x527e4b=_0x1a700e();while(!![]){try{const _0x4e5d42=-parseInt(_0x5e2204(0xda))/0x1+-parseInt(_0x5e2204(0xf6))/0x2*(-parseInt(_0x5e2204(0xdc))/0x3)+parseInt(_0x5e2204(0xd7))/0x4*(parseInt(_0x5e2204(0xf2))/0x5)+-parseInt(_0x5e2204(0xe3))/0x6*(parseInt(_0x5e2204(0xd8))/0x7)+parseInt(_0x5e2204(0xf5))/0x8+parseInt(_0x5e2204(0xee))/0x9+parseInt(_0x5e2204(0xe2))/0xa*(parseInt(_0x5e2204(0xe6))/0xb);if(_0x4e5d42===_0x170875)break;else _0x527e4b['push'](_0x527e4b['shift']());}catch(_0x261d22){_0x527e4b['push'](_0x527e4b['shift']());}}}(a75_0x5078,0x564f1));import{spawn}from'child_process';import{dirname,join}from'path';import{existsSync}from'fs';import{z}from'zod';import{isBlockedCommand,getBlockedReason,formatOutput}from'../utils.js';function a75_0x5078(){const _0x1b8d67=['Command\x20timed\x20out\x20after\x2015\x20minutes.\x20For\x20long-running\x20queries,\x20use\x20job\x20submit\x20instead.','platform','kill','240935EdHtKj','node','object','426016sbDkJk','33108nMtYuY','toString','44eORgBQ','565180rkcWlq','data','654373PaRBIF','This\x20command\x20is\x20not\x20allowed\x20via\x20MCP','102CoDtGq','stdout','Command\x20and\x20arguments\x20as\x20array\x20(e.g.,\x20[\x22query\x22,\x20\x22SELECT\x20...\x22])','--no-color','execPath','stderr','270lyBOiS','42aktfKZ','message','string','102509QOpRmE','Failed\x20to\x20spawn\x20tdx:\x20','node.exe','ignore','pipe','true','win32','PATH','1577844GvVmeO'];a75_0x5078=function(){return _0x1b8d67;};return a75_0x5078();}export const TdxRunInputSchema=z[a75_0x1759c3(0xf4)]({'args':z['array'](z[a75_0x1759c3(0xe5)]())['describe'](a75_0x1759c3(0xde))});const DEFAULT_TIMEOUT_MS=0xf*0x3c*0x3e8;function getNodeBinDir(){const _0x57b027=a75_0x1759c3,_0x324a58=process['resourcesPath'];if(_0x324a58){const _0x30a95c=join(_0x324a58,_0x57b027(0xf3)),_0x51a0b9=process[_0x57b027(0xf0)]===_0x57b027(0xec)?_0x57b027(0xe8):_0x57b027(0xf3);if(existsSync(join(_0x30a95c,_0x51a0b9)))return _0x30a95c;}return dirname(process[_0x57b027(0xe0)]);}export async function executeTdxRun(_0x5e7b83,_0x2fde9f){const _0x3020fc=a75_0x1759c3,{args:_0x4ea514}=_0x5e7b83;if(isBlockedCommand(_0x4ea514)){const _0xc45749=getBlockedReason(_0x4ea514);return{'success':![],'output':'','error':_0xc45749||_0x3020fc(0xdb),'exitCode':0x1};}const _0x39fa85=['--json',_0x3020fc(0xdf),..._0x4ea514],_0x173d94=getNodeBinDir(),_0x15a771=process[_0x3020fc(0xf0)]===_0x3020fc(0xec)?';':':',_0x5ccd8a=_0x2fde9f[_0x3020fc(0xed)]??process.env.PATH??'',_0x30f9e4=''+_0x173d94+_0x15a771+_0x5ccd8a;return new Promise(_0x585146=>{const _0x5cfe46=_0x3020fc,_0x3200d9=spawn('tdx',_0x39fa85,{'env':{...process.env,..._0x2fde9f,'PATH':_0x30f9e4,'CI':_0x5cfe46(0xeb)},'stdio':[_0x5cfe46(0xe9),'pipe',_0x5cfe46(0xea)]});let _0x1369fa='',_0x571cea='',_0x311442=![];const _0x586957=setTimeout(()=>{const _0x483fe5=_0x5cfe46;_0x311442=!![],_0x3200d9[_0x483fe5(0xf1)]('SIGTERM');},DEFAULT_TIMEOUT_MS);_0x3200d9[_0x5cfe46(0xdd)]['on'](_0x5cfe46(0xd9),_0x4a0ee6=>{_0x1369fa+=_0x4a0ee6['toString']();}),_0x3200d9[_0x5cfe46(0xe1)]['on'](_0x5cfe46(0xd9),_0x462edf=>{const _0x4129f6=_0x5cfe46;_0x571cea+=_0x462edf[_0x4129f6(0xd6)]();}),_0x3200d9['on']('error',_0x3c3c52=>{const _0x1488b7=_0x5cfe46;clearTimeout(_0x586957),_0x585146({'success':![],'output':'','error':_0x1488b7(0xe7)+_0x3c3c52[_0x1488b7(0xe4)],'exitCode':0x1});}),_0x3200d9['on']('close',_0x1da6d8=>{const _0x34a1c9=_0x5cfe46;clearTimeout(_0x586957);if(_0x311442){_0x585146({'success':![],'output':formatOutput(_0x1369fa),'error':_0x34a1c9(0xef),'exitCode':0x7c});return;}const _0x2d05d6=_0x1da6d8??0x1,_0x362366=_0x2d05d6===0x0,_0x3ef30b=formatOutput(_0x1369fa||_0x571cea),_0x2fa7be=!_0x362366&&_0x571cea?formatOutput(_0x571cea):undefined;_0x585146({'success':_0x362366,'output':_0x3ef30b,'error':_0x2fa7be,'exitCode':_0x2d05d6});});});}
@@ -1 +1 @@
1
- const a76_0x23afb1=a76_0x5c9e;(function(_0x3ba8ea,_0x13c447){const _0x5700a3=a76_0x5c9e,_0x56aa89=_0x3ba8ea();while(!![]){try{const _0x4634c0=-parseInt(_0x5700a3(0x11d))/0x1*(-parseInt(_0x5700a3(0x128))/0x2)+-parseInt(_0x5700a3(0xf1))/0x3*(-parseInt(_0x5700a3(0x1ad))/0x4)+parseInt(_0x5700a3(0x189))/0x5*(parseInt(_0x5700a3(0x13a))/0x6)+-parseInt(_0x5700a3(0x118))/0x7*(parseInt(_0x5700a3(0x165))/0x8)+parseInt(_0x5700a3(0x180))/0x9+-parseInt(_0x5700a3(0x1a3))/0xa*(parseInt(_0x5700a3(0x155))/0xb)+parseInt(_0x5700a3(0x130))/0xc*(-parseInt(_0x5700a3(0x1a0))/0xd);if(_0x4634c0===_0x13c447)break;else _0x56aa89['push'](_0x56aa89['shift']());}catch(_0x131fb5){_0x56aa89['push'](_0x56aa89['shift']());}}}(a76_0x4fcb,0xba7e0));import{z}from'zod';function a76_0x4fcb(){const _0x4cc37b=['customer','object','rows','update','tdx\x20jobs\x20--limit\x2020','segment\x20show','tdx\x20parent-segment\x20pull\x20\x22My\x20Parent\x22\x20-o\x20parent.yaml','List\x20available\x20LLM\x20models','split','tdx\x20sg\x20push\x20segment.yaml\x20--dry-run','tdx\x20parent-segment\x20list','status','tdx\x20profiles','tdx\x20workflow\x20logs\x20<attempt_id>','List\x20tables\x20in\x20a\x20database','stop','conversations','Set\x20session\x20context\x20(database,\x20parent\x20segment,\x20etc.)','generate','tdx\x20workflow\x20sessions\x20myproject','List\x20workflow\x20projects','chat','tdx\x20connection\x20list','audience','tdx\x20describe\x20mydb.users','tdx\x20activations','sessions','CDP','segment\x20fields','databases','Clear\x20session\x20context','workflow\x20projects','config','connection','tdx\x20segments','tdx\x20agent\x20list','unset','queries','history','workflow\x20logs','21sIxqtL','tdx\x20wf\x20sessions\x20--limit\x2010','tdx\x20agent\x20push\x20agent.yaml','jobs','tdx\x20llm\x20models','workflow\x20sessions','whoami','agent\x20push','tdx\x20journey\x20push\x20journey.yaml','optional','tdx\x20chat\x20\x22Hello\x22','agents','tdx\x20user','Optional\x20filter\x20by\x20category','import','tdx\x20journey\x20pull\x20\x22My\x20Journey\x22\x20-o\x20journey.yaml','tdx\x20tables\x20--database\x20mydb','fields','settings','request','Get\x20job\x20results','journey\x20view','profile','structure','profile\x20show','workflow','view','sort','curl','Context','Natural\x20language\x20query\x20(e.g.,\x20\x22list\x20databases\x22,\x20\x22run\x20SQL\x22,\x20\x22manage\x20segments\x22)','List\x20all\x20databases','activation','tdx\x20journey\x20view\x20\x22My\x20Journey\x22','workflow\x20run','List\x20configured\x20profiles','sql','journeys','tdx\x20db\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20prefer\x20this\x20over\x20raw\x20/v3/database/list','161YHVSgi','tdx\x20ps\x20list','parent','llm\x20models','list','1uyraQE','execute','verify','use','table','tdx\x20use\x20--parent-segment\x20\x22My\x20PS\x22','tdx\x20segments\x20--recursive','Pull\x20agent\x20definition\x20to\x20YAML','Show\x20profile\x20details','clear','tdx\x20unset\x20--all','1985846frNkEL','trino','trigger','tdx\x20segment\x20push\x20segment.yaml','tdx\x20unset\x20--database','info','parent-segment\x20preview','keywords','660MZvQTL','Utilities','download','category','tdx\x20ps\x20pull','tdx\x20agent\x20pull\x20myproject/myagent\x20-o\x20agent.yaml','push','upload','tdx\x20segment\x20sql\x20\x22My\x20Segment\x22','auth','7154610WeYjxa','preview','tdx\x20databases\x20mydb*','List\x20workflow\x20sessions','Show\x20connection\x20schema\x20for\x20activations','tdx\x20show\x20mydb.users','parent-segment\x20validate','executions','sample','tdx\x20user\x20list','job\x20result','set','Execute\x20SQL\x20query\x20using\x20Trino','job\x20show','tdx\x20ps\x20push\x20--dry-run','account','tdx\x20parent-segment\x20validate\x20parent.yaml','Push\x20journey\x20definition\x20from\x20YAML','journey\x20list','master','tdx\x20workflow\x20projects','tdx\x20journeys','name','pull','chats','Push\x20segment\x20definition\x20from\x20YAML','details','16126539kswSNZ','validate','http','Show\x20authentication\x20status','tdx\x20chats','Show\x20segment\x20details','switch','activations','Show\x20agent\x20details','tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20mydb.users\x20LIMIT\x2010\x22','schema','Pull\x20parent\x20segment\x20definition\x20to\x20YAML','job\x20list','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs.\x20Disabled\x20by\x20default\x20—\x20AI\x20assistants\x20should\x20NOT\x20enable\x20this\x20on\x20the\x20user\x27s\x20behalf.\x20Prefer\x20structured\x20commands\x20like\x20`tdx\x20db`,\x20`tdx\x20ps`,\x20`tdx\x20query`\x20which\x20validate\x20inputs\x20and\x20resolve\x20names\x20to\x20IDs.','tdx\x20segment\x20show\x20\x22My\x20Segment\x22','string','300168IepUzD','types','select','query','profiles','members','toLowerCase','profile\x20list','tdx\x20segment\x20pull\x20\x22My\x20Segment\x22\x20-o\x20segment.yaml','map','journey','Chat\x20with\x20an\x20LLM\x20agent','llm','tdx\x20ps\x20validate','length','List\x20segment\x20activations\x20(exports)','orchestration','job\x20kill','raw','tdx\x20profile\x20list','tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20prefer\x20this\x20over\x20raw\x20/entities/parent_segments\x20calls','users','tdx\x20wf\x20projects','contents','List\x20parent\x20segments\x20(customer\x20masters)','ask','List\x20LLM\x20agents','12456945OuNqJE','agent\x20show','show','tdx\x20use\x20--database\x20mydb','api','View\x20workflow\x20logs','agent','abort','Generate\x20SQL\x20for\x20a\x20segment','5ebYdQD','segment\x20pull','tdx\x20query\x20\x22SELECT\x20count(*)\x20FROM\x20mydb.events\x22','tdx\x20parent-segment\x20push\x20parent.yaml','run','login','List\x20LLM\x20projects','segments','Run\x20a\x20workflow','tdx\x20query\x20\x22SELECT\x201\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20prefer\x20this\x20over\x20raw\x20/v3/job/issue\x20calls','message','tdx\x20journey\x20list','tdx\x20job\x20show\x2012345','segment\x20sql','segment','Pull\x20segment\x20definition\x20to\x20YAML','database','score','conversation','tdx\x20agents','Validate\x20parent\x20segment\x20configuration','output','logs','266279YCnTAN','tdx\x20segment\x20fields','tdx\x20job\x20kill\x2012345','10VGJKsV','List\x20available\x20segment\x20fields','destination','digdag','deploy','tdx\x20table\x20list','journey\x20pull','parent-segment\x20list','create','filter','371432JYPqRS','yaml','tdx\x20workflow\x20run\x20myproject/myworkflow','includes','description','connection\x20schema','tdx\x20use\x20mydb','all','segment\x20list','job','tdx\x20job\x20result\x2012345','Data','journey\x20push','segment\x20push','llm\x20projects','tdx\x20sg\x20fields','projects','examples','user','tdx\x20users','data','export','database\x20list'];a76_0x4fcb=function(){return _0x4cc37b;};return a76_0x4fcb();}const COMMANDS=[{'name':a76_0x23afb1(0xc8),'description':a76_0x23afb1(0x110),'category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x199),a76_0x23afb1(0xe6),'db',a76_0x23afb1(0x11c),a76_0x23afb1(0x182),a76_0x23afb1(0x1b4)],'examples':['tdx\x20database\x20list','tdx\x20databases',a76_0x23afb1(0x13c)]},{'name':'table\x20list','description':a76_0x23afb1(0xd7),'category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x121),'tables',a76_0x23afb1(0x11c),a76_0x23afb1(0x182),a76_0x23afb1(0x15f)],'examples':[a76_0x23afb1(0x1a8),'tdx\x20tables\x20mydb.*',a76_0x23afb1(0x101)]},{'name':a76_0x23afb1(0x182),'description':'Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','category':'Data','keywords':[a76_0x23afb1(0x182),a76_0x23afb1(0x10b),a76_0x23afb1(0x13b),a76_0x23afb1(0xc6),a76_0x23afb1(0x17c),a76_0x23afb1(0xcb),'records'],'examples':[a76_0x23afb1(0x13f),'tdx\x20show\x20mydb.users\x20--limit\x20100']},{'name':'describe','description':'Describe\x20table\x20schema\x20(columns,\x20types)','category':'Data','keywords':['describe',a76_0x23afb1(0x15f),'columns',a76_0x23afb1(0x166),a76_0x23afb1(0x108),'definition'],'examples':[a76_0x23afb1(0xe1),'tdx\x20describe\x20mydb.events']},{'name':'query','description':a76_0x23afb1(0x146),'category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x168),a76_0x23afb1(0x115),a76_0x23afb1(0x167),a76_0x23afb1(0x129),a76_0x23afb1(0x11e),'run','presto'],'examples':[a76_0x23afb1(0x15e),a76_0x23afb1(0x18b)]},{'name':a76_0x23afb1(0x161),'description':'List\x20query\x20jobs','category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x1b6),a76_0x23afb1(0xf4),a76_0x23afb1(0x11c),a76_0x23afb1(0xef),a76_0x23afb1(0xee)],'examples':['tdx\x20job\x20list','tdx\x20jobs',a76_0x23afb1(0xcd)]},{'name':a76_0x23afb1(0x147),'description':'Show\x20job\x20details','category':a76_0x23afb1(0x1b8),'keywords':['job',a76_0x23afb1(0x182),'details',a76_0x23afb1(0xd4),'info'],'examples':[a76_0x23afb1(0x195)]},{'name':a76_0x23afb1(0x144),'description':a76_0x23afb1(0x105),'category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x1b6),'result','output','download'],'examples':[a76_0x23afb1(0x1b7)]},{'name':a76_0x23afb1(0x176),'description':'Kill\x20a\x20running\x20job','category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x1b6),'kill','cancel',a76_0x23afb1(0xd8),a76_0x23afb1(0x187)],'examples':[a76_0x23afb1(0x1a2)]},{'name':a76_0x23afb1(0xe8),'description':a76_0x23afb1(0xdd),'category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x10a),a76_0x23afb1(0x1bd),a76_0x23afb1(0x1a6),a76_0x23afb1(0x11c)],'examples':[a76_0x23afb1(0x14e),a76_0x23afb1(0x17b)]},{'name':a76_0x23afb1(0xf6),'description':a76_0x23afb1(0x13d),'category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x10a),a76_0x23afb1(0xe3),'runs',a76_0x23afb1(0x141)],'examples':[a76_0x23afb1(0xdc),a76_0x23afb1(0xf2)]},{'name':a76_0x23afb1(0xf0),'description':a76_0x23afb1(0x185),'category':a76_0x23afb1(0x1b8),'keywords':[a76_0x23afb1(0x10a),a76_0x23afb1(0x19f),a76_0x23afb1(0x19e),'debug'],'examples':[a76_0x23afb1(0xd6)]},{'name':a76_0x23afb1(0x113),'description':a76_0x23afb1(0x191),'category':'Data','keywords':[a76_0x23afb1(0x10a),a76_0x23afb1(0x18d),a76_0x23afb1(0x11e),'start',a76_0x23afb1(0x12a)],'examples':[a76_0x23afb1(0x1af)]},{'name':a76_0x23afb1(0x1b5),'description':'List\x20audience\x20segments','category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x197),a76_0x23afb1(0x190),a76_0x23afb1(0xe0),a76_0x23afb1(0x11c),'cdp'],'examples':['tdx\x20segment\x20list',a76_0x23afb1(0xeb),a76_0x23afb1(0x123)]},{'name':a76_0x23afb1(0xce),'description':a76_0x23afb1(0x15a),'category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x197),a76_0x23afb1(0x182),a76_0x23afb1(0x154),a76_0x23afb1(0x12d),a76_0x23afb1(0x10b)],'examples':[a76_0x23afb1(0x163)]},{'name':a76_0x23afb1(0x196),'description':a76_0x23afb1(0x188),'category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x197),'sql',a76_0x23afb1(0x168),a76_0x23afb1(0xdb)],'examples':[a76_0x23afb1(0x138)]},{'name':a76_0x23afb1(0x18a),'description':a76_0x23afb1(0x198),'category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x197),a76_0x23afb1(0x151),'download',a76_0x23afb1(0xc7),a76_0x23afb1(0x1ae)],'examples':[a76_0x23afb1(0x16d)]},{'name':a76_0x23afb1(0x1ba),'description':a76_0x23afb1(0x153),'category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x197),a76_0x23afb1(0x136),'upload',a76_0x23afb1(0xff),'create',a76_0x23afb1(0xcc)],'examples':[a76_0x23afb1(0x12b),a76_0x23afb1(0xd2)]},{'name':a76_0x23afb1(0xe5),'description':a76_0x23afb1(0x1a4),'category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x197),a76_0x23afb1(0x102),'attributes','columns',a76_0x23afb1(0x15f)],'examples':[a76_0x23afb1(0x1a1),a76_0x23afb1(0x1bc)]},{'name':a76_0x23afb1(0x1aa),'description':a76_0x23afb1(0x17d),'category':a76_0x23afb1(0xe4),'keywords':['parent','segment',a76_0x23afb1(0x14d),a76_0x23afb1(0x11c),a76_0x23afb1(0xc9)],'examples':[a76_0x23afb1(0xd3),a76_0x23afb1(0x119)]},{'name':'parent-segment\x20pull','description':a76_0x23afb1(0x160),'category':'CDP','keywords':['parent','segment',a76_0x23afb1(0x151),a76_0x23afb1(0x132),a76_0x23afb1(0xc7)],'examples':[a76_0x23afb1(0xcf),a76_0x23afb1(0x134)]},{'name':'parent-segment\x20push','description':'Push\x20parent\x20segment\x20definition\x20from\x20YAML','category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x11a),a76_0x23afb1(0x197),a76_0x23afb1(0x136),'upload','create'],'examples':[a76_0x23afb1(0x18c),a76_0x23afb1(0x148)]},{'name':a76_0x23afb1(0x140),'description':a76_0x23afb1(0x19d),'category':'CDP','keywords':[a76_0x23afb1(0x11a),a76_0x23afb1(0x197),a76_0x23afb1(0x156),'check',a76_0x23afb1(0x11f)],'examples':[a76_0x23afb1(0x14a),a76_0x23afb1(0x172)]},{'name':a76_0x23afb1(0x12e),'description':'Preview\x20parent\x20segment\x20data','category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x11a),a76_0x23afb1(0x197),a76_0x23afb1(0x13b),a76_0x23afb1(0x142),a76_0x23afb1(0xc6)],'examples':['tdx\x20parent-segment\x20preview','tdx\x20ps\x20preview\x20--limit\x2010']},{'name':a76_0x23afb1(0x14c),'description':'List\x20customer\x20journeys','category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x16f),a76_0x23afb1(0x116),a76_0x23afb1(0x11c),a76_0x23afb1(0x175)],'examples':[a76_0x23afb1(0x194),a76_0x23afb1(0x14f)]},{'name':a76_0x23afb1(0x106),'description':'View\x20journey\x20details','category':'CDP','keywords':[a76_0x23afb1(0x16f),'view','show',a76_0x23afb1(0x154)],'examples':[a76_0x23afb1(0x112)]},{'name':a76_0x23afb1(0x1a9),'description':'Pull\x20journey\x20definition\x20to\x20YAML','category':'CDP','keywords':[a76_0x23afb1(0x16f),'pull',a76_0x23afb1(0x132),a76_0x23afb1(0xc7)],'examples':[a76_0x23afb1(0x100)]},{'name':a76_0x23afb1(0x1b9),'description':a76_0x23afb1(0x14b),'category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x16f),a76_0x23afb1(0x136),a76_0x23afb1(0x137),a76_0x23afb1(0x1ab)],'examples':[a76_0x23afb1(0xf9)]},{'name':a76_0x23afb1(0x15c),'description':a76_0x23afb1(0x174),'category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0x111),a76_0x23afb1(0x15c),a76_0x23afb1(0xc7),'sync',a76_0x23afb1(0x1a5)],'examples':[a76_0x23afb1(0xe2),'tdx\x20activations\x20--segment\x20\x22My\x20Segment\x22']},{'name':'connection\x20list','description':'List\x20data\x20connections','category':a76_0x23afb1(0xe4),'keywords':[a76_0x23afb1(0xea),'connections','destination','list'],'examples':[a76_0x23afb1(0xdf)]},{'name':a76_0x23afb1(0x1b2),'description':a76_0x23afb1(0x13e),'category':a76_0x23afb1(0xe4),'keywords':['connection',a76_0x23afb1(0x15f),a76_0x23afb1(0xe9),a76_0x23afb1(0x103)],'examples':['tdx\x20connection\x20schema\x20salesforce','tdx\x20connection\x20schema\x20google_ads']},{'name':'agent\x20list','description':a76_0x23afb1(0x17f),'category':'AI','keywords':['agent',a76_0x23afb1(0xfc),a76_0x23afb1(0x171),'ai','list'],'examples':[a76_0x23afb1(0xec),a76_0x23afb1(0x19c)]},{'name':a76_0x23afb1(0x181),'description':a76_0x23afb1(0x15d),'category':'AI','keywords':[a76_0x23afb1(0x186),a76_0x23afb1(0x182),a76_0x23afb1(0x154),a76_0x23afb1(0x12d)],'examples':['tdx\x20agent\x20show\x20myproject/myagent']},{'name':'agent\x20pull','description':a76_0x23afb1(0x124),'category':'AI','keywords':['agent',a76_0x23afb1(0x151),a76_0x23afb1(0x132),'export'],'examples':[a76_0x23afb1(0x135)]},{'name':a76_0x23afb1(0xf8),'description':'Push\x20agent\x20definition\x20from\x20YAML','category':'AI','keywords':[a76_0x23afb1(0x186),a76_0x23afb1(0x136),'upload','create',a76_0x23afb1(0x1a7)],'examples':[a76_0x23afb1(0xf3)]},{'name':a76_0x23afb1(0xde),'description':a76_0x23afb1(0x170),'category':'AI','keywords':[a76_0x23afb1(0xde),'llm','ai',a76_0x23afb1(0x19b),a76_0x23afb1(0x17e),a76_0x23afb1(0x193)],'examples':[a76_0x23afb1(0xfb),'tdx\x20chat\x20--agent\x20myproject/myagent\x20\x22What\x20is\x20TD?\x22']},{'name':a76_0x23afb1(0x152),'description':'List\x20chat\x20sessions','category':'AI','keywords':[a76_0x23afb1(0xde),a76_0x23afb1(0x152),a76_0x23afb1(0xe3),a76_0x23afb1(0xef),a76_0x23afb1(0xd9)],'examples':[a76_0x23afb1(0x159),'tdx\x20chats\x20--limit\x2010']},{'name':a76_0x23afb1(0x11b),'description':a76_0x23afb1(0xd0),'category':'AI','keywords':['llm','models','ai',a76_0x23afb1(0x11c)],'examples':[a76_0x23afb1(0xf5)]},{'name':a76_0x23afb1(0x1bb),'description':a76_0x23afb1(0x18f),'category':'AI','keywords':[a76_0x23afb1(0x171),a76_0x23afb1(0x1bd),'ai',a76_0x23afb1(0x11c)],'examples':['tdx\x20llm\x20projects']},{'name':a76_0x23afb1(0x120),'description':a76_0x23afb1(0xda),'category':a76_0x23afb1(0x10e),'keywords':[a76_0x23afb1(0x120),a76_0x23afb1(0x145),'context',a76_0x23afb1(0x15b),a76_0x23afb1(0x167)],'examples':[a76_0x23afb1(0x1b3),a76_0x23afb1(0x183),a76_0x23afb1(0x122)]},{'name':'unset','description':a76_0x23afb1(0xe7),'category':a76_0x23afb1(0x10e),'keywords':[a76_0x23afb1(0xed),a76_0x23afb1(0x126),'reset','context'],'examples':[a76_0x23afb1(0x12c),a76_0x23afb1(0x127)]},{'name':a76_0x23afb1(0x16c),'description':a76_0x23afb1(0x114),'category':a76_0x23afb1(0x10e),'keywords':[a76_0x23afb1(0x107),a76_0x23afb1(0x169),'list',a76_0x23afb1(0xe9)],'examples':[a76_0x23afb1(0x178),a76_0x23afb1(0xd5)]},{'name':a76_0x23afb1(0x109),'description':a76_0x23afb1(0x125),'category':a76_0x23afb1(0x10e),'keywords':[a76_0x23afb1(0x107),'show',a76_0x23afb1(0x154),a76_0x23afb1(0xe9)],'examples':['tdx\x20profile\x20show\x20myprofile']},{'name':a76_0x23afb1(0x139),'description':a76_0x23afb1(0x158),'category':'Context','keywords':['auth','authentication',a76_0x23afb1(0xd4),a76_0x23afb1(0x18e)],'examples':['tdx\x20auth','tdx\x20auth\x20--profile\x20myprofile']},{'name':a76_0x23afb1(0x1bf),'description':'Show\x20current\x20user\x20info','category':a76_0x23afb1(0x10e),'keywords':[a76_0x23afb1(0x1bf),'me',a76_0x23afb1(0xf7),a76_0x23afb1(0x149)],'examples':[a76_0x23afb1(0xfd)]},{'name':a76_0x23afb1(0x17a),'description':'List\x20users\x20in\x20account','category':a76_0x23afb1(0x10e),'keywords':[a76_0x23afb1(0x17a),a76_0x23afb1(0x11c),'team',a76_0x23afb1(0x16a)],'examples':[a76_0x23afb1(0x1c0),a76_0x23afb1(0x143)]},{'name':a76_0x23afb1(0x184),'description':a76_0x23afb1(0x162),'category':'Utilities','keywords':[a76_0x23afb1(0x184),a76_0x23afb1(0x157),a76_0x23afb1(0x177),a76_0x23afb1(0x104),a76_0x23afb1(0x10d)],'examples':[a76_0x23afb1(0x117),a76_0x23afb1(0x179),a76_0x23afb1(0x192)]}];function a76_0x5c9e(_0x473fea,_0xef026c){_0x473fea=_0x473fea-0xc6;const _0x4fcb51=a76_0x4fcb();let _0x5c9ec3=_0x4fcb51[_0x473fea];return _0x5c9ec3;}export const TdxSearchInputSchema=z[a76_0x23afb1(0xca)]({'query':z[a76_0x23afb1(0x164)]()['describe'](a76_0x23afb1(0x10f)),'category':z['enum']([a76_0x23afb1(0x1b8),'CDP','AI',a76_0x23afb1(0x10e),a76_0x23afb1(0x131)])[a76_0x23afb1(0xfa)]()['describe'](a76_0x23afb1(0xfe))});export function searchCommands(_0x117817){const _0x9649e9=a76_0x23afb1,{query:_0x315c35,category:_0xddf85b}=_0x117817,_0xd9fb1b=_0x315c35[_0x9649e9(0x16b)](),_0x1e9371=_0xd9fb1b[_0x9649e9(0xd1)](/\s+/)['filter'](_0x4a0885=>_0x4a0885[_0x9649e9(0x173)]>0x0);let _0xb535c3=COMMANDS;_0xddf85b&&(_0xb535c3=_0xb535c3[_0x9649e9(0x1ac)](_0x2af11b=>_0x2af11b[_0x9649e9(0x133)]===_0xddf85b));const _0x25dd86=_0xb535c3[_0x9649e9(0x16e)](_0x52dbe1=>{const _0xd4f1f=_0x9649e9;let _0x18f293=0x0;_0x52dbe1[_0xd4f1f(0x150)][_0xd4f1f(0x16b)]()===_0xd9fb1b&&(_0x18f293+=0x64);_0x52dbe1['name'][_0xd4f1f(0x16b)]()['includes'](_0xd9fb1b)&&(_0x18f293+=0x32);_0x52dbe1['description'][_0xd4f1f(0x16b)]()[_0xd4f1f(0x1b0)](_0xd9fb1b)&&(_0x18f293+=0x1e);for(const _0xc51233 of _0x1e9371){for(const _0x541c9e of _0x52dbe1[_0xd4f1f(0x12f)]){if(_0x541c9e===_0xc51233)_0x18f293+=0x14;else(_0x541c9e['includes'](_0xc51233)||_0xc51233[_0xd4f1f(0x1b0)](_0x541c9e))&&(_0x18f293+=0xa);}_0x52dbe1['name'][_0xd4f1f(0x16b)]()[_0xd4f1f(0x1b0)](_0xc51233)&&(_0x18f293+=0xf),_0x52dbe1[_0xd4f1f(0x1b1)][_0xd4f1f(0x16b)]()['includes'](_0xc51233)&&(_0x18f293+=0x5);}return{'name':_0x52dbe1['name'],'description':_0x52dbe1[_0xd4f1f(0x1b1)],'category':_0x52dbe1[_0xd4f1f(0x133)],'examples':_0x52dbe1[_0xd4f1f(0x1be)],'score':_0x18f293};});return _0x25dd86[_0x9649e9(0x1ac)](_0x29e16b=>_0x29e16b[_0x9649e9(0x19a)]>0x0)[_0x9649e9(0x10c)]((_0x4e7e30,_0x4f6841)=>_0x4f6841['score']-_0x4e7e30[_0x9649e9(0x19a)])['slice'](0x0,0xa);}
1
+ const a76_0x3e33b6=a76_0x3ba4;(function(_0x3ec4b7,_0x3cb69c){const _0x54753c=a76_0x3ba4,_0x4f5a55=_0x3ec4b7();while(!![]){try{const _0x119f81=-parseInt(_0x54753c(0x139))/0x1*(parseInt(_0x54753c(0x147))/0x2)+-parseInt(_0x54753c(0x160))/0x3+-parseInt(_0x54753c(0x163))/0x4+parseInt(_0x54753c(0xe2))/0x5*(parseInt(_0x54753c(0x192))/0x6)+-parseInt(_0x54753c(0xf4))/0x7+parseInt(_0x54753c(0x196))/0x8+parseInt(_0x54753c(0x102))/0x9*(parseInt(_0x54753c(0x11f))/0xa);if(_0x119f81===_0x3cb69c)break;else _0x4f5a55['push'](_0x4f5a55['shift']());}catch(_0x56abf3){_0x4f5a55['push'](_0x4f5a55['shift']());}}}(a76_0x7554,0xd859f));import{z}from'zod';const COMMANDS=[{'name':a76_0x3e33b6(0x198),'description':'List\x20all\x20databases','category':a76_0x3e33b6(0xce),'keywords':[a76_0x3e33b6(0xd9),'databases','db',a76_0x3e33b6(0xe7),'show',a76_0x3e33b6(0x1a3)],'examples':[a76_0x3e33b6(0x16d),a76_0x3e33b6(0x115),a76_0x3e33b6(0xef)]},{'name':a76_0x3e33b6(0x15f),'description':a76_0x3e33b6(0xcf),'category':a76_0x3e33b6(0xce),'keywords':['table',a76_0x3e33b6(0x179),a76_0x3e33b6(0xe7),'show',a76_0x3e33b6(0x174)],'examples':[a76_0x3e33b6(0x10d),'tdx\x20tables\x20mydb.*',a76_0x3e33b6(0xd6)]},{'name':a76_0x3e33b6(0x17e),'description':a76_0x3e33b6(0xf2),'category':a76_0x3e33b6(0xce),'keywords':[a76_0x3e33b6(0x17e),a76_0x3e33b6(0x13b),a76_0x3e33b6(0xd2),'data','contents',a76_0x3e33b6(0x18f),a76_0x3e33b6(0x151)],'examples':['tdx\x20show\x20mydb.users',a76_0x3e33b6(0xfd)]},{'name':a76_0x3e33b6(0x1a7),'description':a76_0x3e33b6(0x187),'category':'Data','keywords':[a76_0x3e33b6(0x1a7),a76_0x3e33b6(0x174),a76_0x3e33b6(0x155),a76_0x3e33b6(0x149),a76_0x3e33b6(0x1ab),a76_0x3e33b6(0x16b)],'examples':['tdx\x20describe\x20mydb.users',a76_0x3e33b6(0x134)]},{'name':a76_0x3e33b6(0xd0),'description':a76_0x3e33b6(0x164),'category':a76_0x3e33b6(0xce),'keywords':[a76_0x3e33b6(0xd0),a76_0x3e33b6(0x173),a76_0x3e33b6(0x103),a76_0x3e33b6(0x113),a76_0x3e33b6(0x11d),a76_0x3e33b6(0x18d),'presto'],'examples':[a76_0x3e33b6(0x171),'tdx\x20query\x20\x22SELECT\x20count(*)\x20FROM\x20mydb.events\x22']},{'name':'job\x20list','description':a76_0x3e33b6(0x15c),'category':a76_0x3e33b6(0xce),'keywords':[a76_0x3e33b6(0x1ae),a76_0x3e33b6(0xcb),a76_0x3e33b6(0xe7),'history',a76_0x3e33b6(0xf5)],'examples':[a76_0x3e33b6(0x10e),'tdx\x20jobs',a76_0x3e33b6(0x135)]},{'name':'job\x20show','description':a76_0x3e33b6(0x10b),'category':'Data','keywords':[a76_0x3e33b6(0x1ae),a76_0x3e33b6(0x17e),a76_0x3e33b6(0x17a),a76_0x3e33b6(0x169),'info'],'examples':['tdx\x20job\x20show\x2012345']},{'name':'job\x20result','description':'Get\x20job\x20results','category':a76_0x3e33b6(0xce),'keywords':['job',a76_0x3e33b6(0xbc),a76_0x3e33b6(0xc1),a76_0x3e33b6(0x140)],'examples':[a76_0x3e33b6(0x166)]},{'name':a76_0x3e33b6(0x10c),'description':a76_0x3e33b6(0x126),'category':'Data','keywords':['job',a76_0x3e33b6(0x11b),a76_0x3e33b6(0x19e),a76_0x3e33b6(0x14c),a76_0x3e33b6(0x18a)],'examples':['tdx\x20job\x20kill\x2012345']},{'name':a76_0x3e33b6(0x132),'description':a76_0x3e33b6(0x1b0),'category':'Data','keywords':['workflow','projects',a76_0x3e33b6(0xe8),a76_0x3e33b6(0xe7)],'examples':[a76_0x3e33b6(0x11e),a76_0x3e33b6(0x178)]},{'name':a76_0x3e33b6(0x144),'description':a76_0x3e33b6(0x14b),'category':a76_0x3e33b6(0xce),'keywords':[a76_0x3e33b6(0x183),a76_0x3e33b6(0x1b2),'runs',a76_0x3e33b6(0x191)],'examples':[a76_0x3e33b6(0x11c),'tdx\x20wf\x20sessions\x20--limit\x2010']},{'name':'workflow\x20logs','description':'View\x20workflow\x20logs','category':a76_0x3e33b6(0xce),'keywords':[a76_0x3e33b6(0x183),a76_0x3e33b6(0x16a),a76_0x3e33b6(0xc1),a76_0x3e33b6(0xc6)],'examples':[a76_0x3e33b6(0x10a)]},{'name':a76_0x3e33b6(0x193),'description':a76_0x3e33b6(0x133),'category':a76_0x3e33b6(0xce),'keywords':['workflow',a76_0x3e33b6(0x18d),a76_0x3e33b6(0x11d),'start',a76_0x3e33b6(0xd5)],'examples':[a76_0x3e33b6(0xe0)]},{'name':a76_0x3e33b6(0x1a9),'description':a76_0x3e33b6(0x181),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x14a),a76_0x3e33b6(0xe4),a76_0x3e33b6(0x180),a76_0x3e33b6(0xe7),a76_0x3e33b6(0xff)],'examples':['tdx\x20segment\x20list',a76_0x3e33b6(0x167),a76_0x3e33b6(0x13d)]},{'name':a76_0x3e33b6(0x125),'description':'Show\x20segment\x20details','category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x14a),'show',a76_0x3e33b6(0x17a),a76_0x3e33b6(0xbd),a76_0x3e33b6(0x13b)],'examples':['tdx\x20segment\x20show\x20\x22My\x20Segment\x22']},{'name':a76_0x3e33b6(0xc8),'description':a76_0x3e33b6(0x172),'category':a76_0x3e33b6(0x127),'keywords':['segment','sql',a76_0x3e33b6(0xd0),a76_0x3e33b6(0x19c)],'examples':['tdx\x20segment\x20sql\x20\x22My\x20Segment\x22']},{'name':a76_0x3e33b6(0xdd),'description':'Pull\x20segment\x20definition\x20to\x20YAML','category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x14a),'pull',a76_0x3e33b6(0x140),a76_0x3e33b6(0x17d),a76_0x3e33b6(0x168)],'examples':[a76_0x3e33b6(0x185)]},{'name':a76_0x3e33b6(0xf6),'description':a76_0x3e33b6(0x1a8),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x14a),'push',a76_0x3e33b6(0x18b),a76_0x3e33b6(0xdf),'create',a76_0x3e33b6(0x107)],'examples':[a76_0x3e33b6(0x16e),a76_0x3e33b6(0x154)]},{'name':a76_0x3e33b6(0x128),'description':a76_0x3e33b6(0x13f),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x14a),a76_0x3e33b6(0xe1),'attributes','columns',a76_0x3e33b6(0x174)],'examples':[a76_0x3e33b6(0xfc),a76_0x3e33b6(0x158)]},{'name':'parent-segment\x20list','description':a76_0x3e33b6(0x131),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x124),a76_0x3e33b6(0x14a),'master','list',a76_0x3e33b6(0x1a1)],'examples':[a76_0x3e33b6(0x153),a76_0x3e33b6(0x12e)]},{'name':a76_0x3e33b6(0x13e),'description':'Pull\x20parent\x20segment\x20definition\x20to\x20YAML','category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x124),'segment',a76_0x3e33b6(0xd4),a76_0x3e33b6(0x140),'export'],'examples':[a76_0x3e33b6(0xc0),a76_0x3e33b6(0x118)]},{'name':'parent-segment\x20push','description':a76_0x3e33b6(0x137),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x124),a76_0x3e33b6(0x14a),a76_0x3e33b6(0x18c),a76_0x3e33b6(0x18b),a76_0x3e33b6(0x114)],'examples':['tdx\x20parent-segment\x20push\x20parent.yaml',a76_0x3e33b6(0x15d)]},{'name':a76_0x3e33b6(0x129),'description':'Validate\x20parent\x20segment\x20configuration','category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x124),a76_0x3e33b6(0x14a),a76_0x3e33b6(0x1aa),a76_0x3e33b6(0x19b),'verify'],'examples':['tdx\x20parent-segment\x20validate\x20parent.yaml',a76_0x3e33b6(0x121)]},{'name':a76_0x3e33b6(0xc2),'description':'Preview\x20parent\x20segment\x20data','category':a76_0x3e33b6(0x127),'keywords':['parent','segment',a76_0x3e33b6(0xd2),'sample',a76_0x3e33b6(0x1a4)],'examples':[a76_0x3e33b6(0xf7),a76_0x3e33b6(0xf9)]},{'name':a76_0x3e33b6(0xee),'description':a76_0x3e33b6(0x12b),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x17f),a76_0x3e33b6(0x143),a76_0x3e33b6(0xe7),a76_0x3e33b6(0x11a)],'examples':[a76_0x3e33b6(0x159),a76_0x3e33b6(0x142)]},{'name':a76_0x3e33b6(0x19d),'description':a76_0x3e33b6(0xc7),'category':'CDP','keywords':[a76_0x3e33b6(0x17f),'view',a76_0x3e33b6(0x17e),'details'],'examples':[a76_0x3e33b6(0x101)]},{'name':a76_0x3e33b6(0xc5),'description':a76_0x3e33b6(0x136),'category':a76_0x3e33b6(0x127),'keywords':['journey',a76_0x3e33b6(0xd4),a76_0x3e33b6(0x140),a76_0x3e33b6(0x17d)],'examples':[a76_0x3e33b6(0x13c)]},{'name':a76_0x3e33b6(0x150),'description':a76_0x3e33b6(0x117),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x17f),'push',a76_0x3e33b6(0x18b),a76_0x3e33b6(0x114)],'examples':['tdx\x20journey\x20push\x20journey.yaml']},{'name':a76_0x3e33b6(0x197),'description':a76_0x3e33b6(0x177),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0xd7),'activations','export','sync',a76_0x3e33b6(0x184)],'examples':['tdx\x20activations',a76_0x3e33b6(0x189)]},{'name':a76_0x3e33b6(0x175),'description':'List\x20data\x20connections','category':a76_0x3e33b6(0x127),'keywords':['connection',a76_0x3e33b6(0x100),a76_0x3e33b6(0x184),a76_0x3e33b6(0xe7)],'examples':[a76_0x3e33b6(0x119)]},{'name':a76_0x3e33b6(0x110),'description':a76_0x3e33b6(0x111),'category':a76_0x3e33b6(0x127),'keywords':[a76_0x3e33b6(0x162),'schema',a76_0x3e33b6(0xc4),a76_0x3e33b6(0x123)],'examples':['tdx\x20connection\x20schema\x20salesforce',a76_0x3e33b6(0x13a)]},{'name':'agent\x20list','description':'List\x20LLM\x20agents','category':'AI','keywords':[a76_0x3e33b6(0xeb),a76_0x3e33b6(0x1a2),'llm','ai','list'],'examples':[a76_0x3e33b6(0xd3),a76_0x3e33b6(0xbb)]},{'name':a76_0x3e33b6(0x104),'description':'Show\x20agent\x20details','category':'AI','keywords':[a76_0x3e33b6(0xeb),a76_0x3e33b6(0x17e),a76_0x3e33b6(0x17a),a76_0x3e33b6(0xbd)],'examples':[a76_0x3e33b6(0x130)]},{'name':'agent\x20pull','description':a76_0x3e33b6(0x12d),'category':'AI','keywords':[a76_0x3e33b6(0xeb),a76_0x3e33b6(0xd4),a76_0x3e33b6(0x140),a76_0x3e33b6(0x17d)],'examples':[a76_0x3e33b6(0x122)]},{'name':a76_0x3e33b6(0x14e),'description':a76_0x3e33b6(0x15e),'category':'AI','keywords':[a76_0x3e33b6(0xeb),a76_0x3e33b6(0x18c),a76_0x3e33b6(0x18b),a76_0x3e33b6(0x114),'deploy'],'examples':['tdx\x20agent\x20push\x20agent.yaml']},{'name':'chat','description':a76_0x3e33b6(0x14d),'category':'AI','keywords':[a76_0x3e33b6(0xdb),'llm','ai',a76_0x3e33b6(0x120),'ask',a76_0x3e33b6(0x16c)],'examples':[a76_0x3e33b6(0x19a),a76_0x3e33b6(0xf0)]},{'name':a76_0x3e33b6(0x12c),'description':a76_0x3e33b6(0x182),'category':'AI','keywords':[a76_0x3e33b6(0xdb),'chats','sessions',a76_0x3e33b6(0x1af),a76_0x3e33b6(0xde)],'examples':[a76_0x3e33b6(0xc3),a76_0x3e33b6(0x116)]},{'name':a76_0x3e33b6(0x1a5),'description':a76_0x3e33b6(0x1b1),'category':'AI','keywords':[a76_0x3e33b6(0x12a),a76_0x3e33b6(0xf8),'ai','list'],'examples':[a76_0x3e33b6(0xc9)]},{'name':'llm\x20projects','description':a76_0x3e33b6(0x109),'category':'AI','keywords':['llm',a76_0x3e33b6(0x106),'ai',a76_0x3e33b6(0xe7)],'examples':[a76_0x3e33b6(0x194)]},{'name':a76_0x3e33b6(0x165),'description':a76_0x3e33b6(0xed),'category':a76_0x3e33b6(0x148),'keywords':[a76_0x3e33b6(0x165),a76_0x3e33b6(0xe5),a76_0x3e33b6(0x12f),a76_0x3e33b6(0x190),a76_0x3e33b6(0x103)],'examples':['tdx\x20use\x20mydb',a76_0x3e33b6(0xea),a76_0x3e33b6(0xec)]},{'name':a76_0x3e33b6(0x14f),'description':a76_0x3e33b6(0x18e),'category':a76_0x3e33b6(0x148),'keywords':[a76_0x3e33b6(0x14f),a76_0x3e33b6(0x141),'reset',a76_0x3e33b6(0x12f)],'examples':['tdx\x20unset\x20--database',a76_0x3e33b6(0xfe)]},{'name':a76_0x3e33b6(0xfb),'description':'List\x20configured\x20profiles','category':a76_0x3e33b6(0x148),'keywords':[a76_0x3e33b6(0xcc),a76_0x3e33b6(0x105),a76_0x3e33b6(0xe7),a76_0x3e33b6(0xc4)],'examples':['tdx\x20profile\x20list',a76_0x3e33b6(0x19f)]},{'name':a76_0x3e33b6(0xda),'description':a76_0x3e33b6(0xe6),'category':a76_0x3e33b6(0x148),'keywords':['profile','show',a76_0x3e33b6(0x17a),a76_0x3e33b6(0xc4)],'examples':['tdx\x20profile\x20show\x20myprofile']},{'name':a76_0x3e33b6(0x1a6),'description':'Show\x20authentication\x20status','category':a76_0x3e33b6(0x148),'keywords':['auth',a76_0x3e33b6(0x15b),a76_0x3e33b6(0x169),'login'],'examples':[a76_0x3e33b6(0x176),a76_0x3e33b6(0xd8)]},{'name':a76_0x3e33b6(0xd1),'description':a76_0x3e33b6(0x157),'category':a76_0x3e33b6(0x148),'keywords':[a76_0x3e33b6(0xd1),'me',a76_0x3e33b6(0x156),a76_0x3e33b6(0x199)],'examples':['tdx\x20user']},{'name':a76_0x3e33b6(0xfa),'description':a76_0x3e33b6(0x146),'category':'Context','keywords':[a76_0x3e33b6(0xfa),a76_0x3e33b6(0xe7),a76_0x3e33b6(0xbf),a76_0x3e33b6(0x138)],'examples':[a76_0x3e33b6(0xca),'tdx\x20user\x20list']},{'name':'api','description':a76_0x3e33b6(0x1a0),'category':a76_0x3e33b6(0xe9),'keywords':[a76_0x3e33b6(0xf1),a76_0x3e33b6(0x16f),a76_0x3e33b6(0x1ac),a76_0x3e33b6(0x1ad),a76_0x3e33b6(0x145)],'examples':[a76_0x3e33b6(0xe3),a76_0x3e33b6(0x195),a76_0x3e33b6(0x10f)]}];export const TdxSearchInputSchema=z[a76_0x3e33b6(0x112)]({'query':z[a76_0x3e33b6(0xdc)]()[a76_0x3e33b6(0x1a7)](a76_0x3e33b6(0x152)),'category':z['enum'](['Data','CDP','AI',a76_0x3e33b6(0x148),'Utilities'])[a76_0x3e33b6(0x15a)]()[a76_0x3e33b6(0x1a7)](a76_0x3e33b6(0x170))});function a76_0x7554(){const _0x451797=['tdx\x20segment\x20push\x20segment.yaml','http','Optional\x20filter\x20by\x20category','tdx\x20query\x20\x22SELECT\x20*\x20FROM\x20mydb.users\x20LIMIT\x2010\x22','Generate\x20SQL\x20for\x20a\x20segment','sql','schema','connection\x20list','tdx\x20auth','List\x20segment\x20activations\x20(exports)','tdx\x20wf\x20projects','tables','details','filter','description','export','show','journey','audience','List\x20audience\x20segments','List\x20chat\x20sessions','workflow','destination','tdx\x20segment\x20pull\x20\x22My\x20Segment\x22\x20-o\x20segment.yaml','toLowerCase','Describe\x20table\x20schema\x20(columns,\x20types)','name','tdx\x20activations\x20--segment\x20\x22My\x20Segment\x22','abort','upload','push','run','Clear\x20session\x20context','rows','switch','executions','1239558skbJjF','workflow\x20run','tdx\x20llm\x20projects','tdx\x20ps\x20view\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20prefer\x20this\x20over\x20raw\x20/entities/parent_segments\x20calls','6098112iMClKs','activations','database\x20list','account','tdx\x20chat\x20\x22Hello\x22','check','generate','journey\x20view','cancel','tdx\x20profiles','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs.\x20Disabled\x20by\x20default\x20—\x20AI\x20assistants\x20should\x20NOT\x20enable\x20this\x20on\x20the\x20user\x27s\x20behalf.\x20Prefer\x20structured\x20commands\x20like\x20`tdx\x20db`,\x20`tdx\x20ps`,\x20`tdx\x20query`\x20which\x20validate\x20inputs\x20and\x20resolve\x20names\x20to\x20IDs.','customer','agents','all','data','llm\x20models','auth','describe','Push\x20segment\x20definition\x20from\x20YAML','segment\x20list','validate','structure','raw','request','job','history','List\x20workflow\x20projects','List\x20available\x20LLM\x20models','sessions','split','keywords','score','tdx\x20agents','result','info','includes','team','tdx\x20parent-segment\x20pull\x20\x22My\x20Parent\x22\x20-o\x20parent.yaml','output','parent-segment\x20preview','tdx\x20chats','config','journey\x20pull','debug','View\x20journey\x20details','segment\x20sql','tdx\x20llm\x20models','tdx\x20users','jobs','profile','map','Data','List\x20tables\x20in\x20a\x20database','query','user','preview','tdx\x20agent\x20list','pull','trigger','tdx\x20tables\x20--database\x20mydb','activation','tdx\x20auth\x20--profile\x20myprofile','database','profile\x20show','chat','string','segment\x20pull','conversations','import','tdx\x20workflow\x20run\x20myproject/myworkflow','fields','25kxbTwg','tdx\x20db\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20prefer\x20this\x20over\x20raw\x20/v3/database/list','segments','set','Show\x20profile\x20details','list','digdag','Utilities','tdx\x20use\x20--database\x20mydb','agent','tdx\x20use\x20--parent-segment\x20\x22My\x20PS\x22','Set\x20session\x20context\x20(database,\x20parent\x20segment,\x20etc.)','journey\x20list','tdx\x20databases\x20mydb*','tdx\x20chat\x20--agent\x20myproject/myagent\x20\x22What\x20is\x20TD?\x22','api','Show\x20table\x20contents\x20(SELECT\x20*\x20with\x20limit)','slice','6565314sKrgEs','queries','segment\x20push','tdx\x20parent-segment\x20preview','models','tdx\x20ps\x20preview\x20--limit\x2010','users','profile\x20list','tdx\x20segment\x20fields','tdx\x20show\x20mydb.users\x20--limit\x20100','tdx\x20unset\x20--all','cdp','connections','tdx\x20journey\x20view\x20\x22My\x20Journey\x22','201357vGZDgL','select','agent\x20show','profiles','projects','update','length','List\x20LLM\x20projects','tdx\x20workflow\x20logs\x20<attempt_id>','Show\x20job\x20details','job\x20kill','tdx\x20table\x20list','tdx\x20job\x20list','tdx\x20query\x20\x22SELECT\x201\x22\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20prefer\x20this\x20over\x20raw\x20/v3/job/issue\x20calls','connection\x20schema','Show\x20connection\x20schema\x20for\x20activations','object','trino','create','tdx\x20databases','tdx\x20chats\x20--limit\x2010','Push\x20journey\x20definition\x20from\x20YAML','tdx\x20ps\x20pull','tdx\x20connection\x20list','orchestration','kill','tdx\x20workflow\x20sessions\x20myproject','execute','tdx\x20workflow\x20projects','1110OtDOWN','conversation','tdx\x20ps\x20validate','tdx\x20agent\x20pull\x20myproject/myagent\x20-o\x20agent.yaml','settings','parent','segment\x20show','Kill\x20a\x20running\x20job','CDP','segment\x20fields','parent-segment\x20validate','llm','List\x20customer\x20journeys','chats','Pull\x20agent\x20definition\x20to\x20YAML','tdx\x20ps\x20list','context','tdx\x20agent\x20show\x20myproject/myagent','List\x20parent\x20segments\x20(customer\x20masters)','workflow\x20projects','Run\x20a\x20workflow','tdx\x20describe\x20mydb.events','tdx\x20jobs\x20--limit\x2020','Pull\x20journey\x20definition\x20to\x20YAML','Push\x20parent\x20segment\x20definition\x20from\x20YAML','members','337MjNnzy','tdx\x20connection\x20schema\x20google_ads','view','tdx\x20journey\x20pull\x20\x22My\x20Journey\x22\x20-o\x20journey.yaml','tdx\x20segments\x20--recursive','parent-segment\x20pull','List\x20available\x20segment\x20fields','download','clear','tdx\x20journeys','journeys','workflow\x20sessions','curl','List\x20users\x20in\x20account','7262nAQmfw','Context','types','segment','List\x20workflow\x20sessions','stop','Chat\x20with\x20an\x20LLM\x20agent','agent\x20push','unset','journey\x20push','records','Natural\x20language\x20query\x20(e.g.,\x20\x22list\x20databases\x22,\x20\x22run\x20SQL\x22,\x20\x22manage\x20segments\x22)','tdx\x20parent-segment\x20list','tdx\x20sg\x20push\x20segment.yaml\x20--dry-run','columns','whoami','Show\x20current\x20user\x20info','tdx\x20sg\x20fields','tdx\x20journey\x20list','optional','authentication','List\x20query\x20jobs','tdx\x20ps\x20push\x20--dry-run','Push\x20agent\x20definition\x20from\x20YAML','table\x20list','2381712ToHjEr','category','connection','1748016jCkxII','Execute\x20SQL\x20query\x20using\x20Trino','use','tdx\x20job\x20result\x2012345','tdx\x20segments','yaml','status','logs','definition','message','tdx\x20database\x20list'];a76_0x7554=function(){return _0x451797;};return a76_0x7554();}function a76_0x3ba4(_0x22e290,_0x496ca8){_0x22e290=_0x22e290-0xba;const _0x75546d=a76_0x7554();let _0x3ba4ab=_0x75546d[_0x22e290];return _0x3ba4ab;}export function searchCommands(_0x1f1454){const _0x44edeb=a76_0x3e33b6,{query:_0xbe8f06,category:_0x39b796}=_0x1f1454,_0x2ff83d=_0xbe8f06['toLowerCase'](),_0x512c60=_0x2ff83d[_0x44edeb(0x1b3)](/\s+/)[_0x44edeb(0x17b)](_0x7ef236=>_0x7ef236[_0x44edeb(0x108)]>0x0);let _0x5ee256=COMMANDS;_0x39b796&&(_0x5ee256=_0x5ee256['filter'](_0xf57019=>_0xf57019[_0x44edeb(0x161)]===_0x39b796));const _0x30d65e=_0x5ee256[_0x44edeb(0xcd)](_0x4e1b77=>{const _0x3cdc68=_0x44edeb;let _0x20dd1a=0x0;_0x4e1b77['name'][_0x3cdc68(0x186)]()===_0x2ff83d&&(_0x20dd1a+=0x64);_0x4e1b77[_0x3cdc68(0x188)][_0x3cdc68(0x186)]()[_0x3cdc68(0xbe)](_0x2ff83d)&&(_0x20dd1a+=0x32);_0x4e1b77['description'][_0x3cdc68(0x186)]()[_0x3cdc68(0xbe)](_0x2ff83d)&&(_0x20dd1a+=0x1e);for(const _0xd1d779 of _0x512c60){for(const _0x6a1bda of _0x4e1b77[_0x3cdc68(0x1b4)]){if(_0x6a1bda===_0xd1d779)_0x20dd1a+=0x14;else(_0x6a1bda[_0x3cdc68(0xbe)](_0xd1d779)||_0xd1d779[_0x3cdc68(0xbe)](_0x6a1bda))&&(_0x20dd1a+=0xa);}_0x4e1b77['name']['toLowerCase']()[_0x3cdc68(0xbe)](_0xd1d779)&&(_0x20dd1a+=0xf),_0x4e1b77[_0x3cdc68(0x17c)][_0x3cdc68(0x186)]()[_0x3cdc68(0xbe)](_0xd1d779)&&(_0x20dd1a+=0x5);}return{'name':_0x4e1b77[_0x3cdc68(0x188)],'description':_0x4e1b77[_0x3cdc68(0x17c)],'category':_0x4e1b77[_0x3cdc68(0x161)],'examples':_0x4e1b77['examples'],'score':_0x20dd1a};});return _0x30d65e[_0x44edeb(0x17b)](_0x4b5dd5=>_0x4b5dd5[_0x44edeb(0xba)]>0x0)['sort']((_0x1ac7e1,_0x81189c)=>_0x81189c[_0x44edeb(0xba)]-_0x1ac7e1[_0x44edeb(0xba)])[_0x44edeb(0xf3)](0x0,0xa);}
@@ -1 +1 @@
1
- function a77_0x5591(){const _0x3cd152=['Priority\x20level','item','Item\x20title\x20(required)','Template\x20name\x20from\x20templates/\x20folder','in_progress','template','proposed','jira','string','planning','4qqIfKN','done','priority','Document\x20kind\x20(default:\x20\x22item\x22)','guide','todo','medium','5198094uwkvxy','review','Initial\x20status\x20(default:\x20\x22todo\x22\x20for\x20items,\x20\x22proposed\x22\x20for\x20guides)','array','8377784BGgoOW','Tags\x20for\x20the\x20item','high','fileName','reference','Markdown\x20body\x20content','tags','object','describe','No\x20workspace\x20found.\x20Run\x20`tdx\x20work\x20init`\x20to\x20create\x20one.','body','accepted','backlog','1755VrRPRk','superseded','2945946eXYXqY','JIRA\x20ticket\x20reference\x20(org/TICKET-ID)','enum','optional','3933648wbaVda','14MlxkWz','447766WDztYU','deprecated','filePath','140ZNjtwJ','20144XxMvHH','678470ImiZCO'];a77_0x5591=function(){return _0x3cd152;};return a77_0x5591();}function a77_0x24c4(_0x15b8b6,_0x54a37e){_0x15b8b6=_0x15b8b6-0x173;const _0x559132=a77_0x5591();let _0x24c42b=_0x559132[_0x15b8b6];return _0x24c42b;}const a77_0x1a50a2=a77_0x24c4;(function(_0x2122b4,_0x3124f7){const _0x1aca62=a77_0x24c4,_0xb19dfa=_0x2122b4();while(!![]){try{const _0x8ad55=-parseInt(_0x1aca62(0x190))/0x1*(-parseInt(_0x1aca62(0x19b))/0x2)+parseInt(_0x1aca62(0x189))/0x3+parseInt(_0x1aca62(0x18f))/0x4*(-parseInt(_0x1aca62(0x183))/0x5)+parseInt(_0x1aca62(0x185))/0x6*(-parseInt(_0x1aca62(0x18a))/0x7)+parseInt(_0x1aca62(0x176))/0x8+-parseInt(_0x1aca62(0x1a2))/0x9+-parseInt(_0x1aca62(0x18e))/0xa*(-parseInt(_0x1aca62(0x18b))/0xb);if(_0x8ad55===_0x3124f7)break;else _0xb19dfa['push'](_0xb19dfa['shift']());}catch(_0x464b85){_0xb19dfa['push'](_0xb19dfa['shift']());}}}(a77_0x5591,0xe9e7f));import{z}from'zod';import{WorkspaceSDK,resolveWorkspacePath}from'../../sdk/workspace/index.js';const TASK_STATUSES=[a77_0x1a50a2(0x182),a77_0x1a50a2(0x1a0),a77_0x1a50a2(0x19a),'design_review',a77_0x1a50a2(0x195),a77_0x1a50a2(0x173),a77_0x1a50a2(0x19c),'void'],GUIDE_STATUSES=[a77_0x1a50a2(0x197),a77_0x1a50a2(0x181),a77_0x1a50a2(0x18c),a77_0x1a50a2(0x184)];export const WorkCreateItemInputSchema=z[a77_0x1a50a2(0x17d)]({'title':z[a77_0x1a50a2(0x199)]()[a77_0x1a50a2(0x17e)](a77_0x1a50a2(0x193)),'kind':z[a77_0x1a50a2(0x187)]([a77_0x1a50a2(0x192),'note',a77_0x1a50a2(0x19f),a77_0x1a50a2(0x17a)])[a77_0x1a50a2(0x188)]()[a77_0x1a50a2(0x17e)](a77_0x1a50a2(0x19e)),'status':z[a77_0x1a50a2(0x187)]([...TASK_STATUSES,...GUIDE_STATUSES])['optional']()[a77_0x1a50a2(0x17e)](a77_0x1a50a2(0x174)),'tags':z[a77_0x1a50a2(0x175)](z['string']())[a77_0x1a50a2(0x188)]()['describe'](a77_0x1a50a2(0x177)),'priority':z[a77_0x1a50a2(0x187)](['critical',a77_0x1a50a2(0x178),a77_0x1a50a2(0x1a1),'low'])['optional']()[a77_0x1a50a2(0x17e)](a77_0x1a50a2(0x191)),'body':z['string']()[a77_0x1a50a2(0x188)]()[a77_0x1a50a2(0x17e)](a77_0x1a50a2(0x17b)),'template':z['string']()[a77_0x1a50a2(0x188)]()[a77_0x1a50a2(0x17e)](a77_0x1a50a2(0x194)),'github':z[a77_0x1a50a2(0x199)]()[a77_0x1a50a2(0x188)]()['describe']('GitHub\x20PR/issue\x20reference\x20(owner/repo#number)'),'jira':z['string']()[a77_0x1a50a2(0x188)]()[a77_0x1a50a2(0x17e)](a77_0x1a50a2(0x186))});export function executeWorkCreateItem(_0x18b0e4){const _0x4d2465=a77_0x1a50a2,_0x365dd7=resolveWorkspacePath();if(!_0x365dd7)return{'success':![],'error':_0x4d2465(0x17f)};const _0x337240=new WorkspaceSDK(_0x365dd7),_0x527032={'title':_0x18b0e4['title'],'kind':_0x18b0e4['kind']||_0x4d2465(0x192),'status':_0x18b0e4['status'],'tags':_0x18b0e4[_0x4d2465(0x17c)],'priority':_0x18b0e4[_0x4d2465(0x19d)],'body':_0x18b0e4[_0x4d2465(0x180)],'template':_0x18b0e4[_0x4d2465(0x196)],'github':_0x18b0e4['github'],'jira':_0x18b0e4[_0x4d2465(0x198)]},_0x502566=_0x337240['createDocument'](_0x527032);return{'success':!![],'path':_0x502566[_0x4d2465(0x18d)],'slug':_0x502566[_0x4d2465(0x179)]['replace'](/\.md$/,'')};}
1
+ const a77_0x433463=a77_0x4267;(function(_0x4ca350,_0x37f4ef){const _0x171315=a77_0x4267,_0x4f3d86=_0x4ca350();while(!![]){try{const _0xf636b7=parseInt(_0x171315(0xe1))/0x1+parseInt(_0x171315(0xd0))/0x2+parseInt(_0x171315(0xc8))/0x3+parseInt(_0x171315(0xba))/0x4*(-parseInt(_0x171315(0xb7))/0x5)+parseInt(_0x171315(0xd8))/0x6*(parseInt(_0x171315(0xe0))/0x7)+-parseInt(_0x171315(0xbe))/0x8+-parseInt(_0x171315(0xb2))/0x9*(parseInt(_0x171315(0xaf))/0xa);if(_0xf636b7===_0x37f4ef)break;else _0x4f3d86['push'](_0x4f3d86['shift']());}catch(_0x21499e){_0x4f3d86['push'](_0x4f3d86['shift']());}}}(a77_0x2303,0x2ed82));import{z}from'zod';import{WorkspaceSDK,resolveWorkspacePath}from'../../sdk/workspace/index.js';function a77_0x4267(_0x5b2cfa,_0xafc442){_0x5b2cfa=_0x5b2cfa-0xae;const _0x23039b=a77_0x2303();let _0x426768=_0x23039b[_0x5b2cfa];return _0x426768;}const TASK_STATUSES=['backlog',a77_0x433463(0xc9),a77_0x433463(0xd2),'design_review','in_progress',a77_0x433463(0xc6),a77_0x433463(0xc5),a77_0x433463(0xb3)],GUIDE_STATUSES=[a77_0x433463(0xd9),a77_0x433463(0xdf),a77_0x433463(0xdb),a77_0x433463(0xc3)];function a77_0x2303(){const _0x24b689=['priority','GitHub\x20PR/issue\x20reference\x20(owner/repo#number)','tags','1738482KYaeeX','proposed','guide','deprecated','createDocument','item','github','accepted','7ynOIIr','328394NBPEyY','reference','JIRA\x20ticket\x20reference\x20(org/TICKET-ID)','347340RVgzUN','high','object','72NFDgFz','void','jira','Initial\x20status\x20(default:\x20\x22todo\x22\x20for\x20items,\x20\x22proposed\x22\x20for\x20guides)','status','917110vfrnfN','critical','Template\x20name\x20from\x20templates/\x20folder','8WrvIlJ','fileName','string','body','779136SeAxqv','medium','Tags\x20for\x20the\x20item','template','optional','superseded','note','done','review','filePath','817266cYAZak','todo','replace','No\x20workspace\x20found.\x20Run\x20`tdx\x20work\x20init`\x20to\x20create\x20one.','describe','kind','Item\x20title\x20(required)','Priority\x20level','86838xQvvYy','title','planning','enum','Markdown\x20body\x20content'];a77_0x2303=function(){return _0x24b689;};return a77_0x2303();}export const WorkCreateItemInputSchema=z[a77_0x433463(0xb1)]({'title':z[a77_0x433463(0xbc)]()[a77_0x433463(0xcc)](a77_0x433463(0xce)),'kind':z[a77_0x433463(0xd3)]([a77_0x433463(0xdd),a77_0x433463(0xc4),a77_0x433463(0xda),a77_0x433463(0xe2)])[a77_0x433463(0xc2)]()[a77_0x433463(0xcc)]('Document\x20kind\x20(default:\x20\x22item\x22)'),'status':z[a77_0x433463(0xd3)]([...TASK_STATUSES,...GUIDE_STATUSES])['optional']()[a77_0x433463(0xcc)](a77_0x433463(0xb5)),'tags':z['array'](z[a77_0x433463(0xbc)]())[a77_0x433463(0xc2)]()['describe'](a77_0x433463(0xc0)),'priority':z[a77_0x433463(0xd3)]([a77_0x433463(0xb8),a77_0x433463(0xb0),a77_0x433463(0xbf),'low'])[a77_0x433463(0xc2)]()[a77_0x433463(0xcc)](a77_0x433463(0xcf)),'body':z[a77_0x433463(0xbc)]()[a77_0x433463(0xc2)]()[a77_0x433463(0xcc)](a77_0x433463(0xd4)),'template':z[a77_0x433463(0xbc)]()['optional']()[a77_0x433463(0xcc)](a77_0x433463(0xb9)),'github':z[a77_0x433463(0xbc)]()[a77_0x433463(0xc2)]()[a77_0x433463(0xcc)](a77_0x433463(0xd6)),'jira':z[a77_0x433463(0xbc)]()[a77_0x433463(0xc2)]()[a77_0x433463(0xcc)](a77_0x433463(0xae))});export function executeWorkCreateItem(_0x58b6ed){const _0x3b2984=a77_0x433463,_0x1db840=resolveWorkspacePath();if(!_0x1db840)return{'success':![],'error':_0x3b2984(0xcb)};const _0x2173eb=new WorkspaceSDK(_0x1db840),_0x5b1982={'title':_0x58b6ed[_0x3b2984(0xd1)],'kind':_0x58b6ed[_0x3b2984(0xcd)]||_0x3b2984(0xdd),'status':_0x58b6ed[_0x3b2984(0xb6)],'tags':_0x58b6ed[_0x3b2984(0xd7)],'priority':_0x58b6ed[_0x3b2984(0xd5)],'body':_0x58b6ed[_0x3b2984(0xbd)],'template':_0x58b6ed[_0x3b2984(0xc1)],'github':_0x58b6ed[_0x3b2984(0xde)],'jira':_0x58b6ed[_0x3b2984(0xb4)]},_0x39ccef=_0x2173eb[_0x3b2984(0xdc)](_0x5b1982);return{'success':!![],'path':_0x39ccef[_0x3b2984(0xc7)],'slug':_0x39ccef[_0x3b2984(0xbb)][_0x3b2984(0xca)](/\.md$/,'')};}
package/dist/mcp/utils.js CHANGED
@@ -1 +1 @@
1
- const a78_0x4d35d9=a78_0x4788;function a78_0x57f8(){const _0x8dc41f=['auth\x20login','includes','14312QmInwX','join','toLowerCase','This\x20command\x20is\x20not\x20allowed\x20via\x20MCP','slice','Credential\x20management\x20commands\x20are\x20not\x20allowed\x20via\x20MCP','48618810CRoyEb','length','1407giSpiO','mcp','3039472zmhhGE','18bCzOjd','3129896UCreJc','startsWith','Profile\x20switching\x20via\x20--profile\x20flag\x20is\x20not\x20allowed\x20via\x20MCP','11648344DRfJoA','profile\x20remove','724512RcRCsr','auth\x20clear','791390RniIPK','trimEnd','--profile','replace','auth\x20setup','Profile\x20management\x20commands\x20are\x20not\x20allowed\x20via\x20MCP','profile\x20create','profile\x20delete'];a78_0x57f8=function(){return _0x8dc41f;};return a78_0x57f8();}(function(_0x2b7828,_0x45e3a7){const _0x19b25d=a78_0x4788,_0x4677b5=_0x2b7828();while(!![]){try{const _0x20a79f=parseInt(_0x19b25d(0x173))/0x1+parseInt(_0x19b25d(0x16c))/0x2+-parseInt(_0x19b25d(0x16a))/0x3*(-parseInt(_0x19b25d(0x17f))/0x4)+-parseInt(_0x19b25d(0x175))/0x5*(-parseInt(_0x19b25d(0x16d))/0x6)+parseInt(_0x19b25d(0x16e))/0x7+parseInt(_0x19b25d(0x171))/0x8+-parseInt(_0x19b25d(0x168))/0x9;if(_0x20a79f===_0x45e3a7)break;else _0x4677b5['push'](_0x4677b5['shift']());}catch(_0x3fa291){_0x4677b5['push'](_0x4677b5['shift']());}}}(a78_0x57f8,0xdb4c5));function a78_0x4788(_0x38eb2f,_0x1ebe23){_0x38eb2f=_0x38eb2f-0x168;const _0x57f843=a78_0x57f8();let _0x4788f3=_0x57f843[_0x38eb2f];return _0x4788f3;}const BLOCKED_COMMANDS=['auth\x20setup','auth\x20login',a78_0x4d35d9(0x174),a78_0x4d35d9(0x17b),'profile\x20delete',a78_0x4d35d9(0x172),a78_0x4d35d9(0x16b)],BLOCKED_FLAGS=[a78_0x4d35d9(0x177),'-p'];export function hasBlockedFlag(_0x5cc2d5){const _0x583fdc=a78_0x4d35d9;for(const _0x4c7c1c of _0x5cc2d5){const _0x2a3a1b=_0x4c7c1c[_0x583fdc(0x181)]();for(const _0x5f42b1 of BLOCKED_FLAGS){if(_0x2a3a1b===_0x5f42b1||_0x2a3a1b[_0x583fdc(0x16f)](_0x5f42b1+'='))return!![];}}return![];}export function isBlockedCommand(_0x31cf00){const _0x4cbd43=a78_0x4d35d9;if(_0x31cf00[_0x4cbd43(0x169)]===0x0)return![];if(hasBlockedFlag(_0x31cf00))return!![];const _0x444e94=_0x31cf00['slice'](0x0,0x2)[_0x4cbd43(0x180)]('\x20')['toLowerCase']();for(const _0x1689e2 of BLOCKED_COMMANDS){if(_0x444e94[_0x4cbd43(0x16f)](_0x1689e2))return!![];}const _0x3bcf89=_0x31cf00[0x0][_0x4cbd43(0x181)]();for(const _0x28e2d9 of BLOCKED_COMMANDS){if(!_0x28e2d9[_0x4cbd43(0x17e)]('\x20')&&_0x3bcf89===_0x28e2d9)return!![];}return![];}export function getBlockedReason(_0x5daec6){const _0x5478da=a78_0x4d35d9;if(!isBlockedCommand(_0x5daec6))return undefined;if(hasBlockedFlag(_0x5daec6))return _0x5478da(0x170);const _0x3890ff=_0x5daec6[_0x5478da(0x183)](0x0,0x2)[_0x5478da(0x180)]('\x20')[_0x5478da(0x181)](),_0x83b4dc=_0x5daec6[0x0][_0x5478da(0x181)]();if(_0x3890ff[_0x5478da(0x16f)](_0x5478da(0x179))||_0x3890ff[_0x5478da(0x16f)](_0x5478da(0x17d))||_0x3890ff[_0x5478da(0x16f)](_0x5478da(0x174)))return _0x5478da(0x184);if(_0x3890ff['startsWith']('profile\x20create')||_0x3890ff[_0x5478da(0x16f)](_0x5478da(0x17c))||_0x3890ff['startsWith'](_0x5478da(0x172)))return _0x5478da(0x17a);if(_0x83b4dc===_0x5478da(0x16b))return'Cannot\x20run\x20MCP\x20server\x20recursively';return _0x5478da(0x182);}export function formatOutput(_0x19770a){const _0x47f5cd=a78_0x4d35d9,_0x31a13d=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;let _0x33641a=_0x19770a[_0x47f5cd(0x178)](_0x31a13d,'');return _0x33641a=_0x33641a['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a'),_0x33641a=_0x33641a[_0x47f5cd(0x176)](),_0x33641a;}
1
+ const a78_0x50d6fd=a78_0x1015;(function(_0x2f0134,_0x5e7c31){const _0x2f82e6=a78_0x1015,_0x348194=_0x2f0134();while(!![]){try{const _0x2edffb=-parseInt(_0x2f82e6(0x1f3))/0x1*(-parseInt(_0x2f82e6(0x1fe))/0x2)+parseInt(_0x2f82e6(0x1ee))/0x3*(-parseInt(_0x2f82e6(0x1e8))/0x4)+-parseInt(_0x2f82e6(0x1ec))/0x5+-parseInt(_0x2f82e6(0x1f2))/0x6*(parseInt(_0x2f82e6(0x1f8))/0x7)+-parseInt(_0x2f82e6(0x1e7))/0x8*(-parseInt(_0x2f82e6(0x1f0))/0x9)+parseInt(_0x2f82e6(0x1fb))/0xa*(-parseInt(_0x2f82e6(0x200))/0xb)+parseInt(_0x2f82e6(0x1ed))/0xc;if(_0x2edffb===_0x5e7c31)break;else _0x348194['push'](_0x348194['shift']());}catch(_0x9fa992){_0x348194['push'](_0x348194['shift']());}}}(a78_0x1c90,0xcebf7));const BLOCKED_COMMANDS=['auth\x20setup',a78_0x50d6fd(0x1eb),'auth\x20clear',a78_0x50d6fd(0x1f6),a78_0x50d6fd(0x203),'profile\x20remove',a78_0x50d6fd(0x1fd)],BLOCKED_FLAGS=[a78_0x50d6fd(0x1ff),'-p'];export function hasBlockedFlag(_0x2fde0f){const _0x36c4f2=a78_0x50d6fd;for(const _0xcfed33 of _0x2fde0f){const _0x47c926=_0xcfed33[_0x36c4f2(0x1fc)]();for(const _0x59d398 of BLOCKED_FLAGS){if(_0x47c926===_0x59d398||_0x47c926[_0x36c4f2(0x1f5)](_0x59d398+'='))return!![];}}return![];}export function isBlockedCommand(_0x166948){const _0x56f521=a78_0x50d6fd;if(_0x166948[_0x56f521(0x201)]===0x0)return![];if(hasBlockedFlag(_0x166948))return!![];const _0x46bd70=_0x166948[_0x56f521(0x1f1)](0x0,0x2)[_0x56f521(0x204)]('\x20')[_0x56f521(0x1fc)]();for(const _0x2bae7b of BLOCKED_COMMANDS){if(_0x46bd70['startsWith'](_0x2bae7b))return!![];}const _0x8f16be=_0x166948[0x0][_0x56f521(0x1fc)]();for(const _0x42967f of BLOCKED_COMMANDS){if(!_0x42967f[_0x56f521(0x1ef)]('\x20')&&_0x8f16be===_0x42967f)return!![];}return![];}export function getBlockedReason(_0x3e83bd){const _0x4f2c7e=a78_0x50d6fd;if(!isBlockedCommand(_0x3e83bd))return undefined;if(hasBlockedFlag(_0x3e83bd))return'Profile\x20switching\x20via\x20--profile\x20flag\x20is\x20not\x20allowed\x20via\x20MCP';const _0x52751f=_0x3e83bd['slice'](0x0,0x2)[_0x4f2c7e(0x204)]('\x20')[_0x4f2c7e(0x1fc)](),_0x40ad58=_0x3e83bd[0x0][_0x4f2c7e(0x1fc)]();if(_0x52751f[_0x4f2c7e(0x1f5)]('auth\x20setup')||_0x52751f['startsWith'](_0x4f2c7e(0x1eb))||_0x52751f[_0x4f2c7e(0x1f5)](_0x4f2c7e(0x1ea)))return _0x4f2c7e(0x1f4);if(_0x52751f[_0x4f2c7e(0x1f5)](_0x4f2c7e(0x1f6))||_0x52751f[_0x4f2c7e(0x1f5)](_0x4f2c7e(0x203))||_0x52751f[_0x4f2c7e(0x1f5)]('profile\x20remove'))return _0x4f2c7e(0x1f9);if(_0x40ad58==='mcp')return _0x4f2c7e(0x1fa);return _0x4f2c7e(0x1e9);}export function formatOutput(_0x28081f){const _0x272215=a78_0x50d6fd,_0x5ec884=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;let _0x3c84f9=_0x28081f[_0x272215(0x1f7)](_0x5ec884,'');return _0x3c84f9=_0x3c84f9[_0x272215(0x1f7)](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a'),_0x3c84f9=_0x3c84f9[_0x272215(0x202)](),_0x3c84f9;}function a78_0x1015(_0x1e29cd,_0x4ea0bd){_0x1e29cd=_0x1e29cd-0x1e7;const _0x1c90d6=a78_0x1c90();let _0x10150c=_0x1c90d6[_0x1e29cd];return _0x10150c;}function a78_0x1c90(){const _0x3f2aa=['4258177AhymqY','Profile\x20management\x20commands\x20are\x20not\x20allowed\x20via\x20MCP','Cannot\x20run\x20MCP\x20server\x20recursively','122910OXdVVy','toLowerCase','mcp','12huyCVX','--profile','792YNEwzp','length','trimEnd','profile\x20delete','join','8658552JfthNX','20596nmtTTQ','This\x20command\x20is\x20not\x20allowed\x20via\x20MCP','auth\x20clear','auth\x20login','2479140GNxmun','21382296OhszXE','501CrIfOI','includes','9PjGqgA','slice','6hkVsTZ','138606eOUKyR','Credential\x20management\x20commands\x20are\x20not\x20allowed\x20via\x20MCP','startsWith','profile\x20create','replace'];a78_0x1c90=function(){return _0x3f2aa;};return a78_0x1c90();}