@treasuredata/tdx 2026.3.5 → 2026.3.6

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 (231) 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.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/api-command.js +1 -1
  11. package/dist/commands/auth-command.d.ts.map +1 -1
  12. package/dist/commands/auth-command.js +1 -1
  13. package/dist/commands/auth-command.js.map +1 -1
  14. package/dist/commands/auth-login-command.d.ts +29 -0
  15. package/dist/commands/auth-login-command.d.ts.map +1 -0
  16. package/dist/commands/auth-login-command.js +1 -0
  17. package/dist/commands/auth-login-command.js.map +1 -0
  18. package/dist/commands/chat-command.js +1 -1
  19. package/dist/commands/claude-command.js +1 -1
  20. package/dist/commands/claude-statusline-command.js +1 -1
  21. package/dist/commands/claude-usage-command.js +1 -1
  22. package/dist/commands/command.js +1 -1
  23. package/dist/commands/connection-command.js +1 -1
  24. package/dist/commands/databases.js +1 -1
  25. package/dist/commands/delivery-command.js +1 -1
  26. package/dist/commands/describe.js +1 -1
  27. package/dist/commands/engage-campaign-pull-command.js +1 -1
  28. package/dist/commands/engage-campaign-push-command.js +1 -1
  29. package/dist/commands/engage-campaign-validate-command.js +1 -1
  30. package/dist/commands/engage-command.js +1 -1
  31. package/dist/commands/engage-template-pull-command.js +1 -1
  32. package/dist/commands/engage-template-push-command.js +1 -1
  33. package/dist/commands/engage-template-validate-command.js +1 -1
  34. package/dist/commands/job-command.js +1 -1
  35. package/dist/commands/journey-command.js +1 -1
  36. package/dist/commands/journey-validate-command.js +1 -1
  37. package/dist/commands/llm-command.js +1 -1
  38. package/dist/commands/mcp-command.d.ts.map +1 -1
  39. package/dist/commands/mcp-command.js +1 -1
  40. package/dist/commands/mcp-command.js.map +1 -1
  41. package/dist/commands/parent-segment-command.js +1 -1
  42. package/dist/commands/profile-command.d.ts.map +1 -1
  43. package/dist/commands/profile-command.js +1 -1
  44. package/dist/commands/profile-command.js.map +1 -1
  45. package/dist/commands/profiles-command.js +1 -1
  46. package/dist/commands/query-command.js +1 -1
  47. package/dist/commands/schedule-command.js +1 -1
  48. package/dist/commands/segment-command.js +1 -1
  49. package/dist/commands/segment-create-command.js +1 -1
  50. package/dist/commands/segment-fields-command.js +1 -1
  51. package/dist/commands/segment-pull-command.js +1 -1
  52. package/dist/commands/segment-push-command.js +1 -1
  53. package/dist/commands/segment-update-command.js +1 -1
  54. package/dist/commands/segment-use-command.js +1 -1
  55. package/dist/commands/segment-validate-command.js +1 -1
  56. package/dist/commands/segments.js +1 -1
  57. package/dist/commands/show.js +1 -1
  58. package/dist/commands/status-command.d.ts.map +1 -1
  59. package/dist/commands/status-command.js +1 -1
  60. package/dist/commands/status-command.js.map +1 -1
  61. package/dist/commands/tables.js +1 -1
  62. package/dist/commands/unset-command.js +1 -1
  63. package/dist/commands/upgrade-command.js +1 -1
  64. package/dist/commands/use-command.js +1 -1
  65. package/dist/commands/user-command.js +1 -1
  66. package/dist/commands/workflow-command.js +1 -1
  67. package/dist/core/auth.js +1 -1
  68. package/dist/core/command-output.js +1 -1
  69. package/dist/core/config.js +1 -1
  70. package/dist/core/connection-cache.js +1 -1
  71. package/dist/core/constants.d.ts +11 -0
  72. package/dist/core/constants.d.ts.map +1 -1
  73. package/dist/core/constants.js +1 -1
  74. package/dist/core/constants.js.map +1 -1
  75. package/dist/core/credential-cache.js +1 -1
  76. package/dist/core/global-context.d.ts.map +1 -1
  77. package/dist/core/global-context.js +1 -1
  78. package/dist/core/global-context.js.map +1 -1
  79. package/dist/core/keychain.js +1 -1
  80. package/dist/core/oauth-keychain.d.ts +32 -0
  81. package/dist/core/oauth-keychain.d.ts.map +1 -0
  82. package/dist/core/oauth-keychain.js +1 -0
  83. package/dist/core/oauth-keychain.js.map +1 -0
  84. package/dist/core/oauth.d.ts +112 -0
  85. package/dist/core/oauth.d.ts.map +1 -0
  86. package/dist/core/oauth.js +1 -0
  87. package/dist/core/oauth.js.map +1 -0
  88. package/dist/core/profile.js +1 -1
  89. package/dist/core/project-config.js +1 -1
  90. package/dist/core/session.js +1 -1
  91. package/dist/core/user-cache.js +1 -1
  92. package/dist/core/version.js +1 -1
  93. package/dist/index.js +1 -1
  94. package/dist/mcp/server.js +1 -1
  95. package/dist/mcp/tools/index.js +1 -1
  96. package/dist/mcp/tools/tdx-run.js +1 -1
  97. package/dist/mcp/tools/tdx-search.js +1 -1
  98. package/dist/mcp/utils.js +1 -1
  99. package/dist/proxy/claude-usage-tracker.js +1 -1
  100. package/dist/proxy/passthrough-server.js +1 -1
  101. package/dist/proxy/sse-usage-parser.js +1 -1
  102. package/dist/sdk/agent/agent-config.js +1 -1
  103. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  104. package/dist/sdk/agent/agent-yaml.js +1 -1
  105. package/dist/sdk/agent/test/evaluator.js +1 -1
  106. package/dist/sdk/agent/test/executor.js +1 -1
  107. package/dist/sdk/agent/test/index.js +1 -1
  108. package/dist/sdk/agent/test/output.js +1 -1
  109. package/dist/sdk/agent/test/parser.js +1 -1
  110. package/dist/sdk/agent/tool-target-registry.js +1 -1
  111. package/dist/sdk/api.js +1 -1
  112. package/dist/sdk/client/cdp-api-client.js +1 -1
  113. package/dist/sdk/client/delivery-api-client.js +1 -1
  114. package/dist/sdk/client/endpoints.js +1 -1
  115. package/dist/sdk/client/endpoints.js.map +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 +16 -0
  120. package/dist/sdk/client/oauth-refresh.d.ts.map +1 -0
  121. package/dist/sdk/client/oauth-refresh.js +1 -0
  122. package/dist/sdk/client/oauth-refresh.js.map +1 -0
  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.d.ts.map +1 -1
  152. package/dist/sdk/llm/model-factors.js +1 -1
  153. package/dist/sdk/llm/model-factors.js.map +1 -1
  154. package/dist/sdk/personalization.js +1 -1
  155. package/dist/sdk/query/index.js +1 -1
  156. package/dist/sdk/query/sql-parser.js +1 -1
  157. package/dist/sdk/realtime.js +1 -1
  158. package/dist/sdk/schedule.js +1 -1
  159. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  160. package/dist/sdk/segment/fields-display.js +1 -1
  161. package/dist/sdk/segment/file-discovery.js +1 -1
  162. package/dist/sdk/segment/journey-utils.js +1 -1
  163. package/dist/sdk/segment/journey-validator.js +1 -1
  164. package/dist/sdk/segment/journey-yaml.js +1 -1
  165. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  166. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  167. package/dist/sdk/segment/pull-workflow.js +1 -1
  168. package/dist/sdk/segment/push-recovery.js +1 -1
  169. package/dist/sdk/segment/push-workflow.js +1 -1
  170. package/dist/sdk/segment/resolution-context.js +1 -1
  171. package/dist/sdk/segment/segment-path-parser.js +1 -1
  172. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  173. package/dist/sdk/segment/segment-validator.js +1 -1
  174. package/dist/sdk/segment/target-resolution.js +1 -1
  175. package/dist/sdk/segment/tdx-config.js +1 -1
  176. package/dist/sdk/segment/types/activation-schema.js +1 -1
  177. package/dist/sdk/segment/types/journey-def.js +1 -1
  178. package/dist/sdk/segment/types/journey-schema.js +1 -1
  179. package/dist/sdk/segment/types/segment-def.js +1 -1
  180. package/dist/sdk/segment/types/segment-schema.js +1 -1
  181. package/dist/sdk/segment/validate-files.js +1 -1
  182. package/dist/sdk/segment/yaml-validator.js +1 -1
  183. package/dist/sdk/segment.js +1 -1
  184. package/dist/sdk/types/index.js +1 -1
  185. package/dist/sdk/types/progress.js +1 -1
  186. package/dist/sdk/user.js +1 -1
  187. package/dist/sdk/util/format-detector.js +1 -1
  188. package/dist/sdk/util/formatters.js +1 -1
  189. package/dist/sdk/util/index.js +1 -1
  190. package/dist/sdk/util/paginate.js +1 -1
  191. package/dist/sdk/util/tree-formatter.js +1 -1
  192. package/dist/sdk/workflow/archive-validation.js +1 -1
  193. package/dist/sdk/workflow/clone-workflow.js +1 -1
  194. package/dist/sdk/workflow/index.js +1 -1
  195. package/dist/sdk/workflow/pull-workflow.js +1 -1
  196. package/dist/sdk/workflow/push-workflow.js +1 -1
  197. package/dist/sdk/workflow/tdx-config.js +1 -1
  198. package/dist/sdk/workflow/workflow-utils.js +1 -1
  199. package/dist/test-utils/command-runner.js +1 -1
  200. package/dist/test-utils/factories.js +1 -1
  201. package/dist/test-utils/fixtures.js +1 -1
  202. package/dist/test-utils/http-mock.js +1 -1
  203. package/dist/test-utils/index.js +1 -1
  204. package/dist/utils/async.js +1 -1
  205. package/dist/utils/colors.js +1 -1
  206. package/dist/utils/diff.js +1 -1
  207. package/dist/utils/file-permissions.js +1 -1
  208. package/dist/utils/file-reader.js +1 -1
  209. package/dist/utils/github-releases.js +1 -1
  210. package/dist/utils/global-cache.js +1 -1
  211. package/dist/utils/json-loader.js +1 -1
  212. package/dist/utils/local-cache.js +1 -1
  213. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  214. package/dist/utils/logger/formatters/index.js +1 -1
  215. package/dist/utils/logger/handlers/console-handler.js +1 -1
  216. package/dist/utils/logger/handlers/file-handler.js +1 -1
  217. package/dist/utils/logger/handlers/index.js +1 -1
  218. package/dist/utils/logger/handlers/null-handler.js +1 -1
  219. package/dist/utils/logger/index.js +1 -1
  220. package/dist/utils/logger/logger.js +1 -1
  221. package/dist/utils/logger/types.js +1 -1
  222. package/dist/utils/option-validation.js +1 -1
  223. package/dist/utils/process.js +1 -1
  224. package/dist/utils/prompt.js +1 -1
  225. package/dist/utils/spinner.js +1 -1
  226. package/dist/utils/sse-parser.js +1 -1
  227. package/dist/utils/string-utils.js +1 -1
  228. package/dist/utils/table-ref-parser.js +1 -1
  229. package/dist/utils/tdx-logger.js +1 -1
  230. package/dist/utils/version-check.js +1 -1
  231. package/package.json +1 -1
@@ -1 +1 @@
1
- const a46_0x3c2205=a46_0x5735;function a46_0x1d31(){const _0x5d7542=['(session:\x20','name','error','166923iIYmps','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','50707JEDdHt','log','Default\x20site\x20','session','llm_agent','Invalid\x20resource:\x20','tdx.json','dim','execute','database','message','site','includes','1035KGRnre','5473448zLLdyS','Usage:\x20tdx\x20unset\x20<resource>\x0a','Error:\x20','join','default','810AdKGBL','validate','parent_segment','engage_workspace','agent','31567452HvAlJX','Default\x20profile\x20','\x0aUpdated:\x20','29166lXzVSZ','232pmWips','llm_project','7MAsCGf','24kCRZbC','green','Clear\x20session-level\x20or\x20default\x20context\x20values','6567979daJRnm','cleared','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','profile','26247JABIUW','.\x20Must\x20be\x20one\x20of:\x20'];a46_0x1d31=function(){return _0x5d7542;};return a46_0x1d31();}(function(_0x4009ec,_0x761ea){const _0x50d511=a46_0x5735,_0x202eb8=_0x4009ec();while(!![]){try{const _0x46cd4e=-parseInt(_0x50d511(0x188))/0x1*(parseInt(_0x50d511(0x1a7))/0x2)+parseInt(_0x50d511(0x1ae))/0x3*(-parseInt(_0x50d511(0x1a4))/0x4)+-parseInt(_0x50d511(0x195))/0x5*(-parseInt(_0x50d511(0x1a3))/0x6)+parseInt(_0x50d511(0x1a6))/0x7*(-parseInt(_0x50d511(0x196))/0x8)+-parseInt(_0x50d511(0x1b3))/0x9*(parseInt(_0x50d511(0x19b))/0xa)+parseInt(_0x50d511(0x1aa))/0xb+parseInt(_0x50d511(0x1a0))/0xc;if(_0x46cd4e===_0x761ea)break;else _0x202eb8['push'](_0x202eb8['shift']());}catch(_0x4c300e){_0x202eb8['push'](_0x202eb8['shift']());}}}(a46_0x1d31,0xe36c3));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';function a46_0x5735(_0x298a1d,_0x5d6f78){_0x298a1d=_0x298a1d-0x187;const _0x1d311b=a46_0x1d31();let _0x5735da=_0x1d311b[_0x298a1d];return _0x5735da;}import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a46_0x1e69a0 from'chalk';import*as a46_0x23bed1 from'node:path';export class UnsetCommand extends BaseCommand{[a46_0x3c2205(0x1b1)]='unset';['description']=a46_0x3c2205(0x1a9);[a46_0x3c2205(0x19c)](_0x418a7e){const _0x23346d=a46_0x3c2205,{args:_0x225b5a,options:_0x206a48}=_0x418a7e,_0x56f36c=_0x206a48[_0x23346d(0x19a)];if(_0x225b5a['length']===0x0)return _0x23346d(0x197)+_0x23346d(0x1b4)+_0x23346d(0x1ac)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x419c2b=_0x225b5a[0x0],_0x132f05=[_0x23346d(0x193),_0x23346d(0x191),_0x23346d(0x19d),_0x23346d(0x1a5),_0x23346d(0x19f),'profile',_0x23346d(0x19e)];if(!_0x132f05[_0x23346d(0x194)](_0x419c2b))return _0x23346d(0x18d)+_0x419c2b+_0x23346d(0x1af)+_0x132f05[_0x23346d(0x199)](',\x20');if(_0x56f36c&&_0x419c2b!==_0x23346d(0x193)&&_0x419c2b!=='profile')return _0x23346d(0x187);return undefined;}async[a46_0x3c2205(0x190)](_0x56de8d){const _0x1d1040=a46_0x3c2205,{args:_0x584197,options:_0x340012}=_0x56de8d,_0x41c4b5=_0x340012[_0x1d1040(0x19a)];cleanExpiredSessions();try{const _0x1ca805=_0x584197[0x0],_0x61f273=a46_0x23bed1[_0x1d1040(0x199)](getConfigDir(),_0x1d1040(0x18e));if(_0x41c4b5){if(_0x1ca805==='site')return clearDefaultSiteFromUserConfig(),console['log'](_0x1d1040(0x18a)+a46_0x1e69a0[_0x1d1040(0x1a8)](_0x1d1040(0x1ab))),console[_0x1d1040(0x189)](a46_0x1e69a0[_0x1d1040(0x18f)](_0x1d1040(0x1a2)+_0x61f273)),0x0;if(_0x1ca805===_0x1d1040(0x1ad))return clearActiveProfileFromUserConfig(),console[_0x1d1040(0x189)](_0x1d1040(0x1a1)+a46_0x1e69a0[_0x1d1040(0x1a8)](_0x1d1040(0x1ab))),console['log'](a46_0x1e69a0[_0x1d1040(0x18f)](_0x1d1040(0x1a2)+_0x61f273)),0x0;}const _0x1db91a=getSessionID(_0x340012[_0x1d1040(0x18b)]),_0x388d47={'site':'site','database':_0x1d1040(0x191),'parent_segment':_0x1d1040(0x19d),'llm_project':'llm_project','agent':_0x1d1040(0x18c),'profile':_0x1d1040(0x1ad),'engage_workspace':'engage_workspace'},_0x5b0610=_0x388d47[_0x1ca805];return _0x5b0610&&(clearSessionContextField(_0x5b0610,_0x340012[_0x1d1040(0x18b)]),console[_0x1d1040(0x189)]('Session\x20'+_0x1ca805+'\x20'+a46_0x1e69a0[_0x1d1040(0x1a8)](_0x1d1040(0x1ab))+'\x20'+a46_0x1e69a0[_0x1d1040(0x18f)](_0x1d1040(0x1b0)+_0x1db91a+')'))),0x0;}catch(_0x2144c){return _0x2144c instanceof Error&&console[_0x1d1040(0x1b2)](_0x1d1040(0x198)+_0x2144c[_0x1d1040(0x192)]),0x1;}}}
1
+ const a47_0x7752c3=a47_0x5b1c;function a47_0x5b1c(_0x58752a,_0x304e9a){_0x58752a=_0x58752a-0x1c7;const _0x115672=a47_0x1156();let _0x5b1c95=_0x115672[_0x58752a];return _0x5b1c95;}(function(_0x21e198,_0x1b6e4a){const _0x4e4bd0=a47_0x5b1c,_0x10bd00=_0x21e198();while(!![]){try{const _0x423326=parseInt(_0x4e4bd0(0x1e4))/0x1+parseInt(_0x4e4bd0(0x1df))/0x2+-parseInt(_0x4e4bd0(0x1ca))/0x3*(-parseInt(_0x4e4bd0(0x1c9))/0x4)+-parseInt(_0x4e4bd0(0x1ed))/0x5*(-parseInt(_0x4e4bd0(0x1d4))/0x6)+-parseInt(_0x4e4bd0(0x1e6))/0x7+parseInt(_0x4e4bd0(0x1e1))/0x8+-parseInt(_0x4e4bd0(0x1cd))/0x9;if(_0x423326===_0x1b6e4a)break;else _0x10bd00['push'](_0x10bd00['shift']());}catch(_0x49d0b8){_0x10bd00['push'](_0x10bd00['shift']());}}}(a47_0x1156,0x34837));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';function a47_0x1156(){const _0x2e8ca5=['7570800ZzNBBH','.\x20Must\x20be\x20one\x20of:\x20','llm_project','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','validate','\x0aUpdated:\x20','808458ktCUya','agent','name','green','database','unset','parent_segment','Clear\x20session-level\x20or\x20default\x20context\x20values','dim','(session:\x20','error','475648XUJtpK','profile','2928256ovdZbO','length','Usage:\x20tdx\x20unset\x20<resource>\x0a','242970tDmjRS','Default\x20site\x20','2175544JxtvOv','Default\x20profile\x20','log','default','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','message','cleared','10HCtpNi','execute','description','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','site','4HkZQso','752325JshRog','engage_workspace','Error:\x20'];a47_0x1156=function(){return _0x2e8ca5;};return a47_0x1156();}import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a47_0x272dce from'chalk';import*as a47_0x122253 from'node:path';export class UnsetCommand extends BaseCommand{[a47_0x7752c3(0x1d6)]=a47_0x7752c3(0x1d9);[a47_0x7752c3(0x1ef)]=a47_0x7752c3(0x1db);[a47_0x7752c3(0x1d2)](_0xa2ebfc){const _0x3929a2=a47_0x7752c3,{args:_0x4c0df7,options:_0x5a7c6e}=_0xa2ebfc,_0x596bcc=_0x5a7c6e[_0x3929a2(0x1e9)];if(_0x4c0df7[_0x3929a2(0x1e2)]===0x0)return _0x3929a2(0x1e3)+_0x3929a2(0x1c7)+_0x3929a2(0x1d1)+_0x3929a2(0x1ea);const _0x123b2f=_0x4c0df7[0x0],_0x4e0a1d=[_0x3929a2(0x1c8),_0x3929a2(0x1d8),_0x3929a2(0x1da),_0x3929a2(0x1cf),_0x3929a2(0x1d5),_0x3929a2(0x1e0),'engage_workspace'];if(!_0x4e0a1d['includes'](_0x123b2f))return'Invalid\x20resource:\x20'+_0x123b2f+_0x3929a2(0x1ce)+_0x4e0a1d['join'](',\x20');if(_0x596bcc&&_0x123b2f!==_0x3929a2(0x1c8)&&_0x123b2f!==_0x3929a2(0x1e0))return _0x3929a2(0x1d0);return undefined;}async[a47_0x7752c3(0x1ee)](_0x595885){const _0x27b644=a47_0x7752c3,{args:_0x61c231,options:_0x5c4612}=_0x595885,_0x34c811=_0x5c4612[_0x27b644(0x1e9)];cleanExpiredSessions();try{const _0x295d44=_0x61c231[0x0],_0x4ddd41=a47_0x122253['join'](getConfigDir(),'tdx.json');if(_0x34c811){if(_0x295d44===_0x27b644(0x1c8))return clearDefaultSiteFromUserConfig(),console['log'](_0x27b644(0x1e5)+a47_0x272dce[_0x27b644(0x1d7)](_0x27b644(0x1ec))),console[_0x27b644(0x1e8)](a47_0x272dce[_0x27b644(0x1dc)](_0x27b644(0x1d3)+_0x4ddd41)),0x0;if(_0x295d44===_0x27b644(0x1e0))return clearActiveProfileFromUserConfig(),console[_0x27b644(0x1e8)](_0x27b644(0x1e7)+a47_0x272dce['green'](_0x27b644(0x1ec))),console[_0x27b644(0x1e8)](a47_0x272dce['dim'](_0x27b644(0x1d3)+_0x4ddd41)),0x0;}const _0x18aed0=getSessionID(_0x5c4612['session']),_0x141809={'site':_0x27b644(0x1c8),'database':_0x27b644(0x1d8),'parent_segment':_0x27b644(0x1da),'llm_project':_0x27b644(0x1cf),'agent':'llm_agent','profile':'profile','engage_workspace':_0x27b644(0x1cb)},_0x4bf140=_0x141809[_0x295d44];return _0x4bf140&&(clearSessionContextField(_0x4bf140,_0x5c4612['session']),console['log']('Session\x20'+_0x295d44+'\x20'+a47_0x272dce[_0x27b644(0x1d7)](_0x27b644(0x1ec))+'\x20'+a47_0x272dce[_0x27b644(0x1dc)](_0x27b644(0x1dd)+_0x18aed0+')'))),0x0;}catch(_0x4c98bb){return _0x4c98bb instanceof Error&&console[_0x27b644(0x1de)](_0x27b644(0x1cc)+_0x4c98bb[_0x27b644(0x1eb)]),0x1;}}}
@@ -1 +1 @@
1
- const a47_0x384b8f=a47_0x14ee;(function(_0x2db40d,_0x1a044a){const _0x532809=a47_0x14ee,_0x410ae7=_0x2db40d();while(!![]){try{const _0x370d40=-parseInt(_0x532809(0x1a6))/0x1*(parseInt(_0x532809(0x18d))/0x2)+parseInt(_0x532809(0x190))/0x3*(parseInt(_0x532809(0x185))/0x4)+-parseInt(_0x532809(0x19a))/0x5*(-parseInt(_0x532809(0x196))/0x6)+parseInt(_0x532809(0x186))/0x7*(-parseInt(_0x532809(0x197))/0x8)+parseInt(_0x532809(0x192))/0x9*(-parseInt(_0x532809(0x1ae))/0xa)+parseInt(_0x532809(0x1b3))/0xb*(-parseInt(_0x532809(0x187))/0xc)+parseInt(_0x532809(0x18a))/0xd;if(_0x370d40===_0x1a044a)break;else _0x410ae7['push'](_0x410ae7['shift']());}catch(_0x2107e0){_0x410ae7['push'](_0x410ae7['shift']());}}}(a47_0x4d60,0xb6b36));function a47_0x14ee(_0x2a11a4,_0x571a3f){_0x2a11a4=_0x2a11a4-0x185;const _0x4d6029=a47_0x4d60();let _0x14ee2c=_0x4d6029[_0x2a11a4];return _0x14ee2c;}import{gt}from'semver';import a47_0x438538 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';function a47_0x4d60(){const _0x296ad=['next','execPath','close','234hmhUcQ','toLowerCase','latest','bun','pnpm','upgrade','execute','Checking\x20','321110DmEjNG','global','Upgrade\x20failed\x20(exit\x20code\x20','install','red','117865PwmmAR','dim','Latest\x20version:','argv','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','Running:','yellow','540028xuhTmC','3568313ebxWiG','1632hOHMpJ','Target\x20version:','...','36284976OhnlKk','green','.bun/','5598WhoqrK','error','Current\x20version:','3dIXJUQ','log','9FQOASb','description','add','message','18pLXaoH','8KcOpLa','Already\x20up\x20to\x20date\x20(','join','793765qbyYxx','@treasuredata/tdx','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','dryRun','replace','yarn','Would\x20run:','includes','cyan'];a47_0x4d60=function(){return _0x296ad;};return a47_0x4d60();}const PACKAGE_NAME=a47_0x384b8f(0x19b);export function detectPackageManager(){const _0x1fb1a7=a47_0x384b8f,_0x562f56=process[_0x1fb1a7(0x1a4)][_0x1fb1a7(0x1a7)](),_0x3a1fb7=process[_0x1fb1a7(0x1b6)][0x1]??'';if(_0x562f56[_0x1fb1a7(0x1a1)](_0x1fb1a7(0x1a9))||_0x3a1fb7[_0x1fb1a7(0x1a1)](_0x1fb1a7(0x18c)))return _0x1fb1a7(0x1a9);if(_0x3a1fb7[_0x1fb1a7(0x1a1)](_0x1fb1a7(0x1aa)))return _0x1fb1a7(0x1aa);if(_0x3a1fb7['includes'](_0x1fb1a7(0x19f)))return _0x1fb1a7(0x19f);return'npm';}export function buildInstallArgs(_0x1e0b05,_0x389535){const _0x7dbea8=a47_0x384b8f;switch(_0x1e0b05){case'yarn':return[_0x7dbea8(0x1af),_0x7dbea8(0x194),_0x389535];case'pnpm':return[_0x7dbea8(0x194),'-g',_0x389535];default:return[_0x7dbea8(0x1b1),'-g',_0x389535];}}export class UpgradeCommand extends BaseCommand{['name']=a47_0x384b8f(0x1ab);[a47_0x384b8f(0x193)]=a47_0x384b8f(0x1b7);async[a47_0x384b8f(0x1ac)](_0x412885){const _0x3bda27=a47_0x384b8f,{options:_0x2fa9b2,args:_0x25810f}=_0x412885,_0x164184=!!_0x2fa9b2[_0x3bda27(0x19d)],{next:_0x8d1fd6,method:_0x440e27}=_0x2fa9b2,_0x3f8352=_0x8d1fd6?_0x3bda27(0x1a3):loadReleaseChannel(),_0x58af2a=_0x3f8352===_0x3bda27(0x1a3)?_0x3bda27(0x1a3):_0x3bda27(0x1a8),_0x4b3529=_0x25810f[0x0]?String(_0x25810f[0x0])[_0x3bda27(0x19e)](/^v/,''):undefined,_0x12f5e7=getVersion();if(isDevVersion())return console['error'](a47_0x438538[_0x3bda27(0x1b9)](_0x3bda27(0x19c))),console[_0x3bda27(0x18e)](a47_0x438538[_0x3bda27(0x1b4)]('Current\x20version:\x20'+_0x12f5e7)),0x1;let _0x6e4bfe;if(_0x4b3529)_0x6e4bfe=_0x4b3529,console[_0x3bda27(0x191)](a47_0x438538[_0x3bda27(0x1b4)]('Current\x20version:')+'\x20'+_0x12f5e7),console['log'](a47_0x438538[_0x3bda27(0x1b4)](_0x3bda27(0x188))+'\x20\x20'+a47_0x438538[_0x3bda27(0x18b)](_0x4b3529)),console[_0x3bda27(0x191)]();else{console[_0x3bda27(0x191)](a47_0x438538[_0x3bda27(0x1b4)](_0x3bda27(0x1ad)+PACKAGE_NAME+'@'+_0x58af2a+_0x3bda27(0x189)));try{_0x6e4bfe=await fetchLatestVersion(_0x3f8352);}catch(_0x13fdc9){return console['error'](a47_0x438538[_0x3bda27(0x1b2)]('Failed\x20to\x20check\x20for\x20updates:\x20'+(_0x13fdc9 instanceof Error?_0x13fdc9['message']:String(_0x13fdc9)))),0x1;}if(!gt(_0x6e4bfe,_0x12f5e7))return console[_0x3bda27(0x191)](a47_0x438538['green'](_0x3bda27(0x198)+_0x12f5e7+').')),0x0;console[_0x3bda27(0x191)](a47_0x438538[_0x3bda27(0x1b4)](_0x3bda27(0x18f))+'\x20'+_0x12f5e7),console[_0x3bda27(0x191)](a47_0x438538[_0x3bda27(0x1b4)](_0x3bda27(0x1b5))+'\x20\x20'+a47_0x438538[_0x3bda27(0x18b)](_0x6e4bfe)),console[_0x3bda27(0x191)]();}const _0x337108=_0x440e27??detectPackageManager(),_0x1e3a1b=_0x4b3529?PACKAGE_NAME+'@'+_0x4b3529:PACKAGE_NAME+'@'+_0x58af2a,_0x1466ac=buildInstallArgs(_0x337108,_0x1e3a1b);if(_0x164184)return console[_0x3bda27(0x191)](a47_0x438538[_0x3bda27(0x1b4)](_0x3bda27(0x1a0))),console[_0x3bda27(0x191)]('\x20\x20'+a47_0x438538[_0x3bda27(0x1a2)](_0x337108+'\x20'+_0x1466ac[_0x3bda27(0x199)]('\x20'))),0x0;return console[_0x3bda27(0x191)](a47_0x438538[_0x3bda27(0x1b4)](_0x3bda27(0x1b8))+'\x20'+_0x337108+'\x20'+_0x1466ac[_0x3bda27(0x199)]('\x20')),console[_0x3bda27(0x191)](),new Promise(_0x592643=>{const _0xcfdfcb=_0x3bda27,_0x272965=crossSpawn(_0x337108,_0x1466ac,{'stdio':'inherit'});_0x272965['on'](_0xcfdfcb(0x1a5),_0x5470c1=>{const _0x560fd3=_0xcfdfcb;console[_0x560fd3(0x191)](),_0x5470c1===0x0?console['log'](a47_0x438538[_0x560fd3(0x18b)]('Successfully\x20upgraded\x20to\x20'+_0x1e3a1b)):console[_0x560fd3(0x18e)](a47_0x438538[_0x560fd3(0x1b2)](_0x560fd3(0x1b0)+_0x5470c1+').')),_0x592643(_0x5470c1??0x1);}),_0x272965['on'](_0xcfdfcb(0x18e),_0x4a94b8=>{const _0x2f8f04=_0xcfdfcb;console['error'](a47_0x438538[_0x2f8f04(0x1b2)]('Failed\x20to\x20run\x20'+_0x337108+':\x20'+_0x4a94b8[_0x2f8f04(0x195)])),_0x592643(0x1);});});}}
1
+ const a48_0x486bff=a48_0x5262;(function(_0x21f0e1,_0x5256e7){const _0xc8d8e2=a48_0x5262,_0x171e88=_0x21f0e1();while(!![]){try{const _0x2996a3=-parseInt(_0xc8d8e2(0x14a))/0x1+-parseInt(_0xc8d8e2(0x133))/0x2+-parseInt(_0xc8d8e2(0x13c))/0x3+parseInt(_0xc8d8e2(0x144))/0x4+-parseInt(_0xc8d8e2(0x148))/0x5*(parseInt(_0xc8d8e2(0x12a))/0x6)+parseInt(_0xc8d8e2(0x13a))/0x7+-parseInt(_0xc8d8e2(0x130))/0x8*(-parseInt(_0xc8d8e2(0x12e))/0x9);if(_0x2996a3===_0x5256e7)break;else _0x171e88['push'](_0x171e88['shift']());}catch(_0x17b17e){_0x171e88['push'](_0x171e88['shift']());}}}(a48_0x42a4,0xe09b2));import{gt}from'semver';import a48_0x16a4e5 from'chalk';import{BaseCommand}from'./command.js';function a48_0x5262(_0x372325,_0x24e72e){_0x372325=_0x372325-0x11d;const _0x42a4a7=a48_0x42a4();let _0x52626a=_0x42a4a7[_0x372325];return _0x52626a;}import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';function a48_0x42a4(){const _0x3041fb=['Upgrade\x20failed\x20(exit\x20code\x20','join','@treasuredata/tdx','pnpm','3846304cZUNxM','Running:','execPath','Checking\x20','785PmAOsJ','execute','366032qeQdBc','global','...','error','message','description','includes','red','replace','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','Successfully\x20upgraded\x20to\x20','green','next','Failed\x20to\x20check\x20for\x20updates:\x20','dryRun','10506JsSTqq','toLowerCase','Current\x20version:','log','27315891rFcvHV','Latest\x20version:','8JRzDAS','name','dim','3318244yZUPsM','yarn','upgrade','Target\x20version:','bun','argv','cyan','115892HyqpOH','add','2379552GMvVUE','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','close','inherit'];a48_0x42a4=function(){return _0x3041fb;};return a48_0x42a4();}import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME=a48_0x486bff(0x142);export function detectPackageManager(){const _0x11a290=a48_0x486bff,_0x1e441a=process[_0x11a290(0x146)][_0x11a290(0x12b)](),_0x28529a=process[_0x11a290(0x138)][0x1]??'';if(_0x1e441a[_0x11a290(0x121)]('bun')||_0x28529a[_0x11a290(0x121)]('.bun/'))return _0x11a290(0x137);if(_0x28529a[_0x11a290(0x121)](_0x11a290(0x143)))return _0x11a290(0x143);if(_0x28529a['includes']('yarn'))return _0x11a290(0x134);return'npm';}export function buildInstallArgs(_0x338f99,_0x5e6582){const _0x3f59fb=a48_0x486bff;switch(_0x338f99){case _0x3f59fb(0x134):return[_0x3f59fb(0x14b),_0x3f59fb(0x13b),_0x5e6582];case _0x3f59fb(0x143):return[_0x3f59fb(0x13b),'-g',_0x5e6582];default:return['install','-g',_0x5e6582];}}export class UpgradeCommand extends BaseCommand{[a48_0x486bff(0x131)]=a48_0x486bff(0x135);[a48_0x486bff(0x120)]=a48_0x486bff(0x124);async[a48_0x486bff(0x149)](_0x260ad5){const _0x97ca20=a48_0x486bff,{options:_0x16c66f,args:_0x2f091c}=_0x260ad5,_0x231933=!!_0x16c66f[_0x97ca20(0x129)],{next:_0x302787,method:_0x4f2ebd}=_0x16c66f,_0x2069fd=_0x302787?_0x97ca20(0x127):loadReleaseChannel(),_0x234fbc=_0x2069fd===_0x97ca20(0x127)?_0x97ca20(0x127):'latest',_0x50bc8f=_0x2f091c[0x0]?String(_0x2f091c[0x0])[_0x97ca20(0x123)](/^v/,''):undefined,_0x501743=getVersion();if(isDevVersion())return console[_0x97ca20(0x11e)](a48_0x16a4e5['yellow'](_0x97ca20(0x13d))),console[_0x97ca20(0x11e)](a48_0x16a4e5[_0x97ca20(0x132)]('Current\x20version:\x20'+_0x501743)),0x1;let _0x3d2a99;if(_0x50bc8f)_0x3d2a99=_0x50bc8f,console[_0x97ca20(0x12d)](a48_0x16a4e5[_0x97ca20(0x132)](_0x97ca20(0x12c))+'\x20'+_0x501743),console[_0x97ca20(0x12d)](a48_0x16a4e5[_0x97ca20(0x132)](_0x97ca20(0x136))+'\x20\x20'+a48_0x16a4e5[_0x97ca20(0x126)](_0x50bc8f)),console['log']();else{console[_0x97ca20(0x12d)](a48_0x16a4e5[_0x97ca20(0x132)](_0x97ca20(0x147)+PACKAGE_NAME+'@'+_0x234fbc+_0x97ca20(0x11d)));try{_0x3d2a99=await fetchLatestVersion(_0x2069fd);}catch(_0x56d06c){return console[_0x97ca20(0x11e)](a48_0x16a4e5[_0x97ca20(0x122)](_0x97ca20(0x128)+(_0x56d06c instanceof Error?_0x56d06c[_0x97ca20(0x11f)]:String(_0x56d06c)))),0x1;}if(!gt(_0x3d2a99,_0x501743))return console[_0x97ca20(0x12d)](a48_0x16a4e5['green']('Already\x20up\x20to\x20date\x20('+_0x501743+').')),0x0;console[_0x97ca20(0x12d)](a48_0x16a4e5[_0x97ca20(0x132)]('Current\x20version:')+'\x20'+_0x501743),console[_0x97ca20(0x12d)](a48_0x16a4e5[_0x97ca20(0x132)](_0x97ca20(0x12f))+'\x20\x20'+a48_0x16a4e5[_0x97ca20(0x126)](_0x3d2a99)),console[_0x97ca20(0x12d)]();}const _0x56eccf=_0x4f2ebd??detectPackageManager(),_0x11c69d=_0x50bc8f?PACKAGE_NAME+'@'+_0x50bc8f:PACKAGE_NAME+'@'+_0x234fbc,_0x3c2f61=buildInstallArgs(_0x56eccf,_0x11c69d);if(_0x231933)return console[_0x97ca20(0x12d)](a48_0x16a4e5['dim']('Would\x20run:')),console[_0x97ca20(0x12d)]('\x20\x20'+a48_0x16a4e5[_0x97ca20(0x139)](_0x56eccf+'\x20'+_0x3c2f61[_0x97ca20(0x141)]('\x20'))),0x0;return console['log'](a48_0x16a4e5['dim'](_0x97ca20(0x145))+'\x20'+_0x56eccf+'\x20'+_0x3c2f61[_0x97ca20(0x141)]('\x20')),console[_0x97ca20(0x12d)](),new Promise(_0x2024a1=>{const _0x4d6aae=_0x97ca20,_0x57d29a=crossSpawn(_0x56eccf,_0x3c2f61,{'stdio':_0x4d6aae(0x13f)});_0x57d29a['on'](_0x4d6aae(0x13e),_0x93c68d=>{const _0x582366=_0x4d6aae;console[_0x582366(0x12d)](),_0x93c68d===0x0?console['log'](a48_0x16a4e5[_0x582366(0x126)](_0x582366(0x125)+_0x11c69d)):console[_0x582366(0x11e)](a48_0x16a4e5[_0x582366(0x122)](_0x582366(0x140)+_0x93c68d+').')),_0x2024a1(_0x93c68d??0x1);}),_0x57d29a['on']('error',_0xb14c43=>{const _0x23addb=_0x4d6aae;console[_0x23addb(0x11e)](a48_0x16a4e5[_0x23addb(0x122)]('Failed\x20to\x20run\x20'+_0x56eccf+':\x20'+_0xb14c43[_0x23addb(0x11f)])),_0x2024a1(0x1);});});}}
@@ -1 +1 @@
1
- const a48_0x2313a6=a48_0x3845;(function(_0x1fe412,_0x11fcdd){const _0x201c66=a48_0x3845,_0x20c50e=_0x1fe412();while(!![]){try{const _0x2cf5f1=parseInt(_0x201c66(0x18a))/0x1+-parseInt(_0x201c66(0x170))/0x2*(parseInt(_0x201c66(0x186))/0x3)+-parseInt(_0x201c66(0x172))/0x4+parseInt(_0x201c66(0x1ae))/0x5*(parseInt(_0x201c66(0x183))/0x6)+-parseInt(_0x201c66(0x180))/0x7+parseInt(_0x201c66(0x16e))/0x8*(parseInt(_0x201c66(0x16f))/0x9)+-parseInt(_0x201c66(0x16d))/0xa*(parseInt(_0x201c66(0x194))/0xb);if(_0x2cf5f1===_0x11fcdd)break;else _0x20c50e['push'](_0x20c50e['shift']());}catch(_0x543a70){_0x20c50e['push'](_0x20c50e['shift']());}}}(a48_0x3b2f,0x406dd));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a48_0x56f20f from'chalk';function a48_0x3845(_0x3c80fc,_0x5055ba){_0x3c80fc=_0x3c80fc-0x16c;const _0x3b2f77=a48_0x3b2f();let _0x384585=_0x3b2f77[_0x3c80fc];return _0x384585;}function a48_0x3b2f(){const _0x6cef6c=['stable','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','database','Session\x20site\x20set\x20to:\x20','Session\x20engage_workspace\x20set\x20to:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','next','11wJLGjh','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','length','dim','Session\x20profile\x20set\x20to:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','llm_project','name','engage_workspace','Error:\x20','Session\x20context\x20','Verifying\x20workspace\x20\x27','\x27\x20to\x20save\x20permanently','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','execute','\x27\x20does\x20not\x20exist','INVALID_ARGUMENT','validate','resolveWorkspaceId','message','tdx','Set\x20session-level\x20context','code','llm_agent','session','join','95fzFBpw','default','Session\x20llm_project\x20set\x20to:\x20','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','NOT_FOUND','(session:\x20','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','\x0aSaved\x20to:\x20','log','4727210Jdyjqh','40UqNRJQ','825732HqKSZN','70UqzCxY','use','785796goPthP','clear','cleared','displayWithSources','Session\x20parent_segment\x20set\x20to:\x20','release_channel','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','site','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Session\x20agent\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','green','engage','629230IkYGSK','error','display','90420aBrBSt','Session\x20database\x20set\x20to:\x20','agent','12603HbvMmH','profile','.\x20Must\x20be\x20one\x20of:\x20','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','424926NJVsog','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','parent_segment'];a48_0x3b2f=function(){return _0x6cef6c;};return a48_0x3b2f();}import*as a48_0x2a3789 from'node:path';export class UseCommand extends BaseCommand{[a48_0x2313a6(0x19b)]=a48_0x2313a6(0x171);['description']=a48_0x2313a6(0x1a9);[a48_0x2313a6(0x1a5)](_0x3af7b0){const _0x1ad09b=a48_0x2313a6,{args:_0x48a63a,options:_0x60b785}=_0x3af7b0,_0x173a49=_0x60b785['default'];if(_0x48a63a[_0x1ad09b(0x196)]===0x0)return undefined;if(_0x48a63a[_0x1ad09b(0x196)]===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+_0x1ad09b(0x178)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x1ad09b(0x199)+_0x1ad09b(0x195)+_0x1ad09b(0x18b);const _0x17ba8f=_0x48a63a[0x0],_0xecd578=['site',_0x1ad09b(0x18f),'parent_segment',_0x1ad09b(0x19a),_0x1ad09b(0x185),_0x1ad09b(0x187),_0x1ad09b(0x19c),_0x1ad09b(0x177)];if(!_0xecd578['includes'](_0x17ba8f))return'Invalid\x20resource:\x20'+_0x17ba8f+_0x1ad09b(0x188)+_0xecd578[_0x1ad09b(0x1ad)](',\x20');if(_0x173a49&&_0x17ba8f!==_0x1ad09b(0x179)&&_0x17ba8f!==_0x1ad09b(0x187)&&_0x17ba8f!==_0x1ad09b(0x177))return _0x1ad09b(0x1b1);if(_0x17ba8f==='release_channel'&&!_0x173a49)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x17ba8f===_0x1ad09b(0x177)){const _0xa63d19=_0x48a63a[0x1];if(_0xa63d19!==_0x1ad09b(0x18d)&&_0xa63d19!==_0x1ad09b(0x193))return'Invalid\x20release\x20channel:\x20'+_0xa63d19+_0x1ad09b(0x192);}return undefined;}async[a48_0x2313a6(0x1a2)](_0xde10d9){const _0x5e8f02=a48_0x2313a6,{args:_0x22e338,options:_0x36bd76}=_0xde10d9,_0x4efcfa=_0x36bd76['debug'],_0x32315c=_0x36bd76[_0x5e8f02(0x173)],_0x51845c=_0x36bd76[_0x5e8f02(0x1af)];cleanExpiredSessions();try{if(_0x32315c){clearSessionContext(_0x36bd76['session']);const _0x521728=getSessionID(_0x36bd76['session']);return console[_0x5e8f02(0x16c)](_0x5e8f02(0x19e)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x5e8f02(0x174))+'\x20'+a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b4)+_0x521728+')')),0x0;}if(_0x22e338['length']===0x0){const _0x476a38=new GlobalContext(_0x36bd76);return _0x4efcfa?_0x476a38[_0x5e8f02(0x175)]():_0x476a38[_0x5e8f02(0x182)](),console[_0x5e8f02(0x16c)](a48_0x56f20f[_0x5e8f02(0x197)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0x5e8f02(0x16c)](a48_0x56f20f[_0x5e8f02(0x197)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console['log'](a48_0x56f20f['dim'](_0x5e8f02(0x18e))),0x0;}const _0x286b01=_0x22e338[0x0],_0x355109=_0x22e338[0x1],_0x106148=a48_0x2a3789[_0x5e8f02(0x1ad)](getConfigDir(),'tdx.json');if(_0x51845c){if(_0x286b01===_0x5e8f02(0x179))return saveDefaultSiteToUserConfig(_0x355109),console[_0x5e8f02(0x16c)]('Default\x20site\x20set\x20to:\x20'+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)),console[_0x5e8f02(0x16c)](a48_0x56f20f['dim'](_0x5e8f02(0x1b6)+_0x106148)),0x0;if(_0x286b01===_0x5e8f02(0x187)){if(!profileExists(_0x355109))return console[_0x5e8f02(0x181)]('Error:\x20Profile\x20\x27'+_0x355109+_0x5e8f02(0x1a3)),console['error'](_0x5e8f02(0x17a)),0x1;return saveActiveProfileToUserConfig(_0x355109),console[_0x5e8f02(0x16c)]('Default\x20profile\x20set\x20to:\x20'+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)),console[_0x5e8f02(0x16c)](a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b6)+_0x106148)),0x0;}if(_0x286b01===_0x5e8f02(0x177))return saveReleaseChannel(_0x355109),console[_0x5e8f02(0x16c)]('Release\x20channel\x20set\x20to:\x20'+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)),console[_0x5e8f02(0x16c)](a48_0x56f20f[_0x5e8f02(0x197)]('\x0aSaved\x20to:\x20'+_0x106148)),_0x355109===_0x5e8f02(0x193)?(console['log'](a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x189))),console['log'](a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1a1)))):console[_0x5e8f02(0x16c)](a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b5))),0x0;}if(_0x286b01===_0x5e8f02(0x179)){const _0x2928fc=getSessionID(_0x36bd76[_0x5e8f02(0x1ac)]);return saveSessionContext({'site':_0x355109},_0x36bd76[_0x5e8f02(0x1ac)]),console[_0x5e8f02(0x16c)](_0x5e8f02(0x190)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)+'\x20'+a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b4)+_0x2928fc+')')),console[_0x5e8f02(0x16c)](a48_0x56f20f[_0x5e8f02(0x197)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x355109+'\x27\x20to\x20save\x20permanently')),0x0;}if(_0x286b01===_0x5e8f02(0x187)){if(!profileExists(_0x355109))return console[_0x5e8f02(0x181)]('Error:\x20Profile\x20\x27'+_0x355109+'\x27\x20does\x20not\x20exist'),console['error'](_0x5e8f02(0x17a)),0x1;const _0xe4bae5=getSessionID(_0x36bd76[_0x5e8f02(0x1ac)]);return saveSessionContext({'profile':_0x355109},_0x36bd76[_0x5e8f02(0x1ac)]),console[_0x5e8f02(0x16c)](_0x5e8f02(0x198)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)+'\x20'+a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b4)+_0xe4bae5+')')),console[_0x5e8f02(0x16c)](a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x17c)+_0x355109+_0x5e8f02(0x1a0))),0x0;}const _0x3e2d89={},_0x4ebeaf=getSessionID(_0x36bd76[_0x5e8f02(0x1ac)]);switch(_0x286b01){case _0x5e8f02(0x18f):_0x3e2d89['database']=_0x355109,console[_0x5e8f02(0x16c)](_0x5e8f02(0x184)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)+'\x20'+a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b4)+_0x4ebeaf+')'));break;case _0x5e8f02(0x18c):_0x3e2d89[_0x5e8f02(0x18c)]=_0x355109,console[_0x5e8f02(0x16c)](_0x5e8f02(0x176)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)+'\x20'+a48_0x56f20f['dim'](_0x5e8f02(0x1b4)+_0x4ebeaf+')'));break;case'llm_project':_0x3e2d89['llm_project']=_0x355109,console[_0x5e8f02(0x16c)](_0x5e8f02(0x1b0)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)+'\x20'+a48_0x56f20f['dim'](_0x5e8f02(0x1b4)+_0x4ebeaf+')'));break;case _0x5e8f02(0x185):{const {projectName:_0x44a3d8,agentName:_0xf0ea48}=parseAgentRef(_0x355109);_0xf0ea48?(_0x3e2d89[_0x5e8f02(0x19a)]=_0x44a3d8,_0x3e2d89['llm_agent']=_0xf0ea48,console[_0x5e8f02(0x16c)](_0x5e8f02(0x1b0)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x44a3d8)+'\x20'+a48_0x56f20f[_0x5e8f02(0x197)]('(session:\x20'+_0x4ebeaf+')')),console[_0x5e8f02(0x16c)](_0x5e8f02(0x17b)+a48_0x56f20f[_0x5e8f02(0x17e)](_0xf0ea48)+'\x20'+a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b4)+_0x4ebeaf+')'))):(_0x3e2d89[_0x5e8f02(0x1ab)]=_0x355109,console[_0x5e8f02(0x16c)](_0x5e8f02(0x17b)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)+'\x20'+a48_0x56f20f[_0x5e8f02(0x197)]('(session:\x20'+_0x4ebeaf+')')));break;}case'engage_workspace':{try{await withSpinner(_0x5e8f02(0x19f)+_0x355109+'\x27...',()=>_0xde10d9[_0x5e8f02(0x1a8)][_0x5e8f02(0x17f)][_0x5e8f02(0x1a6)](_0x355109));}catch(_0x109940){if(_0x109940 instanceof SDKError&&(_0x109940['code']===ErrorCode[_0x5e8f02(0x1b3)]||_0x109940[_0x5e8f02(0x1aa)]===ErrorCode[_0x5e8f02(0x1a4)]))return console['error'](_0x5e8f02(0x19d)+_0x109940[_0x5e8f02(0x1a7)]),console[_0x5e8f02(0x181)](_0x5e8f02(0x17d)),0x1;throw _0x109940;}_0x3e2d89['engage_workspace']=_0x355109,console[_0x5e8f02(0x16c)](_0x5e8f02(0x191)+a48_0x56f20f[_0x5e8f02(0x17e)](_0x355109)+'\x20'+a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b4)+_0x4ebeaf+')'));break;}}return saveSessionContext(_0x3e2d89,_0x36bd76['session']),console['log'](a48_0x56f20f[_0x5e8f02(0x197)](_0x5e8f02(0x1b2))),0x0;}catch(_0x3c7e50){return _0x3c7e50 instanceof Error&&console[_0x5e8f02(0x181)]('Error:\x20'+_0x3c7e50[_0x5e8f02(0x1a7)]),0x1;}}}
1
+ const a49_0x503465=a49_0x9a26;(function(_0x451bcc,_0x759e86){const _0x443a73=a49_0x9a26,_0x1ad7cd=_0x451bcc();while(!![]){try{const _0x4fbc1b=-parseInt(_0x443a73(0x1cf))/0x1*(-parseInt(_0x443a73(0x1c5))/0x2)+-parseInt(_0x443a73(0x1fc))/0x3+-parseInt(_0x443a73(0x1cd))/0x4*(parseInt(_0x443a73(0x1d9))/0x5)+parseInt(_0x443a73(0x1c2))/0x6+parseInt(_0x443a73(0x1c6))/0x7*(-parseInt(_0x443a73(0x1db))/0x8)+-parseInt(_0x443a73(0x1ca))/0x9+parseInt(_0x443a73(0x200))/0xa;if(_0x4fbc1b===_0x759e86)break;else _0x1ad7cd['push'](_0x1ad7cd['shift']());}catch(_0x215726){_0x1ad7cd['push'](_0x1ad7cd['shift']());}}}(a49_0x45f7,0x22e17));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';function a49_0x9a26(_0x4b60e4,_0x5dc40b){_0x4b60e4=_0x4b60e4-0x1b9;const _0x45f7a2=a49_0x45f7();let _0x9a2620=_0x45f7a2[_0x4b60e4];return _0x9a2620;}import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a49_0x18bedf from'chalk';import*as a49_0x575c0c from'node:path';function a49_0x45f7(){const _0x4b62a7=['5782HpfjdN','49AKOPUs','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','\x27\x20does\x20not\x20exist','2271519mprYfb','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','engage','32AcDOIp','Session\x20llm_project\x20set\x20to:\x20','31kdbtgm','\x27\x20to\x20save\x20permanently','NOT_FOUND','message','use','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','display','llm_project','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Session\x20profile\x20set\x20to:\x20','136160eubCPc','llm_agent','155336vfwaRa','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','session','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','parent_segment','Default\x20profile\x20set\x20to:\x20','release_channel','green','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','validate','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','execute','error','Verifying\x20workspace\x20\x27','tdx.json','resolveWorkspaceId','(session:\x20','debug','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','agent','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel\x0a','Session\x20database\x20set\x20to:\x20','log','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','\x27...','engage_workspace','site','length','.\x20Must\x20be\x20one\x20of:\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','displayWithSources','182118cunSvS','database','description','next','6014230ktGhUx','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','\x0aSaved\x20to:\x20','cleared','name','clear','Session\x20engage_workspace\x20set\x20to:\x20','Error:\x20','code','includes','Session\x20site\x20set\x20to:\x20','Release\x20channel\x20set\x20to:\x20','dim','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','Error:\x20Profile\x20\x27','default','profile','712194CxYsbk','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','Default\x20site\x20set\x20to:\x20'];a49_0x45f7=function(){return _0x4b62a7;};return a49_0x45f7();}export class UseCommand extends BaseCommand{[a49_0x503465(0x204)]=a49_0x503465(0x1d3);[a49_0x503465(0x1fe)]='Set\x20session-level\x20context';[a49_0x503465(0x1e5)](_0x3579dd){const _0x1f7aef=a49_0x503465,{args:_0x56f8ea,options:_0x47abec}=_0x3579dd,_0x1490e8=_0x47abec[_0x1f7aef(0x1c0)];if(_0x56f8ea[_0x1f7aef(0x1f7)]===0x0)return undefined;if(_0x56f8ea[_0x1f7aef(0x1f7)]===0x1)return _0x1f7aef(0x1d4)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+_0x1f7aef(0x1f3)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+_0x1f7aef(0x1cb)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a'+_0x1f7aef(0x1f0)+_0x1f7aef(0x1de);const _0x573b30=_0x56f8ea[0x0],_0x4fd3ce=['site',_0x1f7aef(0x1fd),_0x1f7aef(0x1e0),_0x1f7aef(0x1d6),'agent',_0x1f7aef(0x1c1),_0x1f7aef(0x1f5),'release_channel'];if(!_0x4fd3ce[_0x1f7aef(0x1ba)](_0x573b30))return'Invalid\x20resource:\x20'+_0x573b30+_0x1f7aef(0x1f8)+_0x4fd3ce['join'](',\x20');if(_0x1490e8&&_0x573b30!=='site'&&_0x573b30!==_0x1f7aef(0x1c1)&&_0x573b30!==_0x1f7aef(0x1e2))return _0x1f7aef(0x1be);if(_0x573b30==='release_channel'&&!_0x1490e8)return _0x1f7aef(0x1dc);if(_0x573b30===_0x1f7aef(0x1e2)){const _0x15ecb6=_0x56f8ea[0x1];if(_0x15ecb6!=='stable'&&_0x15ecb6!==_0x1f7aef(0x1ff))return'Invalid\x20release\x20channel:\x20'+_0x15ecb6+_0x1f7aef(0x201);}return undefined;}async[a49_0x503465(0x1e7)](_0x554037){const _0xbd7276=a49_0x503465,{args:_0x5a5309,options:_0x3f5f6a}=_0x554037,_0x4cc01c=_0x3f5f6a[_0xbd7276(0x1ed)],_0x39ac9a=_0x3f5f6a[_0xbd7276(0x205)],_0x33497f=_0x3f5f6a['default'];cleanExpiredSessions();try{if(_0x39ac9a){clearSessionContext(_0x3f5f6a[_0xbd7276(0x1dd)]);const _0x3e1893=getSessionID(_0x3f5f6a[_0xbd7276(0x1dd)]);return console[_0xbd7276(0x1f2)]('Session\x20context\x20'+a49_0x18bedf[_0xbd7276(0x1e3)](_0xbd7276(0x203))+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1ec)+_0x3e1893+')')),0x0;}if(_0x5a5309[_0xbd7276(0x1f7)]===0x0){const _0x55bace=new GlobalContext(_0x3f5f6a);return _0x4cc01c?_0x55bace[_0xbd7276(0x1fb)]():_0x55bace[_0xbd7276(0x1d5)](),console[_0xbd7276(0x1f2)](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1c7))),console['log'](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1e6))),console[_0xbd7276(0x1f2)](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1df))),0x0;}const _0x2168e7=_0x5a5309[0x0],_0x2e7374=_0x5a5309[0x1],_0x5eeef7=a49_0x575c0c['join'](getConfigDir(),_0xbd7276(0x1ea));if(_0x33497f){if(_0x2168e7==='site')return saveDefaultSiteToUserConfig(_0x2e7374),console[_0xbd7276(0x1f2)](_0xbd7276(0x1c4)+a49_0x18bedf[_0xbd7276(0x1e3)](_0x2e7374)),console[_0xbd7276(0x1f2)](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x202)+_0x5eeef7)),0x0;if(_0x2168e7===_0xbd7276(0x1c1)){if(!profileExists(_0x2e7374))return console[_0xbd7276(0x1e8)]('Error:\x20Profile\x20\x27'+_0x2e7374+_0xbd7276(0x1c9)),console[_0xbd7276(0x1e8)](_0xbd7276(0x1f9)),0x1;return saveActiveProfileToUserConfig(_0x2e7374),console['log'](_0xbd7276(0x1e1)+a49_0x18bedf[_0xbd7276(0x1e3)](_0x2e7374)),console[_0xbd7276(0x1f2)](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x202)+_0x5eeef7)),0x0;}if(_0x2168e7==='release_channel')return saveReleaseChannel(_0x2e7374),console['log'](_0xbd7276(0x1bc)+a49_0x18bedf[_0xbd7276(0x1e3)](_0x2e7374)),console[_0xbd7276(0x1f2)](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x202)+_0x5eeef7)),_0x2e7374===_0xbd7276(0x1ff)?(console[_0xbd7276(0x1f2)](a49_0x18bedf['dim'](_0xbd7276(0x1c8))),console[_0xbd7276(0x1f2)](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1c3)))):console[_0xbd7276(0x1f2)](a49_0x18bedf['dim'](_0xbd7276(0x1ee))),0x0;}if(_0x2168e7===_0xbd7276(0x1f6)){const _0x110d44=getSessionID(_0x3f5f6a[_0xbd7276(0x1dd)]);return saveSessionContext({'site':_0x2e7374},_0x3f5f6a['session']),console[_0xbd7276(0x1f2)](_0xbd7276(0x1bb)+a49_0x18bedf['green'](_0x2e7374)+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1ec)+_0x110d44+')')),console[_0xbd7276(0x1f2)](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1d7)+_0x2e7374+_0xbd7276(0x1d0))),0x0;}if(_0x2168e7==='profile'){if(!profileExists(_0x2e7374))return console['error'](_0xbd7276(0x1bf)+_0x2e7374+_0xbd7276(0x1c9)),console[_0xbd7276(0x1e8)](_0xbd7276(0x1f9)),0x1;const _0x367db7=getSessionID(_0x3f5f6a[_0xbd7276(0x1dd)]);return saveSessionContext({'profile':_0x2e7374},_0x3f5f6a[_0xbd7276(0x1dd)]),console[_0xbd7276(0x1f2)](_0xbd7276(0x1d8)+a49_0x18bedf[_0xbd7276(0x1e3)](_0x2e7374)+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1ec)+_0x367db7+')')),console['log'](a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1e4)+_0x2e7374+_0xbd7276(0x1d0))),0x0;}const _0x1ab0e1={},_0x1453ec=getSessionID(_0x3f5f6a['session']);switch(_0x2168e7){case _0xbd7276(0x1fd):_0x1ab0e1['database']=_0x2e7374,console['log'](_0xbd7276(0x1f1)+a49_0x18bedf[_0xbd7276(0x1e3)](_0x2e7374)+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1ec)+_0x1453ec+')'));break;case'parent_segment':_0x1ab0e1[_0xbd7276(0x1e0)]=_0x2e7374,console[_0xbd7276(0x1f2)]('Session\x20parent_segment\x20set\x20to:\x20'+a49_0x18bedf[_0xbd7276(0x1e3)](_0x2e7374)+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1ec)+_0x1453ec+')'));break;case'llm_project':_0x1ab0e1['llm_project']=_0x2e7374,console[_0xbd7276(0x1f2)](_0xbd7276(0x1ce)+a49_0x18bedf[_0xbd7276(0x1e3)](_0x2e7374)+'\x20'+a49_0x18bedf['dim']('(session:\x20'+_0x1453ec+')'));break;case _0xbd7276(0x1ef):{const {projectName:_0x34eb75,agentName:_0x500e52}=parseAgentRef(_0x2e7374);_0x500e52?(_0x1ab0e1[_0xbd7276(0x1d6)]=_0x34eb75,_0x1ab0e1[_0xbd7276(0x1da)]=_0x500e52,console['log'](_0xbd7276(0x1ce)+a49_0x18bedf[_0xbd7276(0x1e3)](_0x34eb75)+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1ec)+_0x1453ec+')')),console[_0xbd7276(0x1f2)]('Session\x20agent\x20set\x20to:\x20'+a49_0x18bedf[_0xbd7276(0x1e3)](_0x500e52)+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1ec)+_0x1453ec+')'))):(_0x1ab0e1['llm_agent']=_0x2e7374,console[_0xbd7276(0x1f2)]('Session\x20agent\x20set\x20to:\x20'+a49_0x18bedf[_0xbd7276(0x1e3)](_0x2e7374)+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)](_0xbd7276(0x1ec)+_0x1453ec+')')));break;}case _0xbd7276(0x1f5):{try{await withSpinner(_0xbd7276(0x1e9)+_0x2e7374+_0xbd7276(0x1f4),()=>_0x554037['tdx'][_0xbd7276(0x1cc)][_0xbd7276(0x1eb)](_0x2e7374));}catch(_0x33d864){if(_0x33d864 instanceof SDKError&&(_0x33d864[_0xbd7276(0x1b9)]===ErrorCode[_0xbd7276(0x1d1)]||_0x33d864[_0xbd7276(0x1b9)]===ErrorCode['INVALID_ARGUMENT']))return console[_0xbd7276(0x1e8)](_0xbd7276(0x207)+_0x33d864[_0xbd7276(0x1d2)]),console['error'](_0xbd7276(0x1fa)),0x1;throw _0x33d864;}_0x1ab0e1['engage_workspace']=_0x2e7374,console[_0xbd7276(0x1f2)](_0xbd7276(0x206)+a49_0x18bedf['green'](_0x2e7374)+'\x20'+a49_0x18bedf[_0xbd7276(0x1bd)]('(session:\x20'+_0x1453ec+')'));break;}}return saveSessionContext(_0x1ab0e1,_0x3f5f6a['session']),console[_0xbd7276(0x1f2)](a49_0x18bedf[_0xbd7276(0x1bd)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}catch(_0x3e2326){return _0x3e2326 instanceof Error&&console[_0xbd7276(0x1e8)](_0xbd7276(0x207)+_0x3e2326[_0xbd7276(0x1d2)]),0x1;}}}
@@ -1 +1 @@
1
- const a49_0x3f0da1=a49_0x1c08;(function(_0x55190a,_0x24a735){const _0x851635=a49_0x1c08,_0x1c19b5=_0x55190a();while(!![]){try{const _0x47dadb=parseInt(_0x851635(0xc8))/0x1+parseInt(_0x851635(0xbf))/0x2*(parseInt(_0x851635(0xc0))/0x3)+parseInt(_0x851635(0xc4))/0x4*(-parseInt(_0x851635(0xc6))/0x5)+parseInt(_0x851635(0xc1))/0x6*(parseInt(_0x851635(0xc9))/0x7)+parseInt(_0x851635(0xb4))/0x8+-parseInt(_0x851635(0xcc))/0x9+parseInt(_0x851635(0xb5))/0xa;if(_0x47dadb===_0x24a735)break;else _0x1c19b5['push'](_0x1c19b5['shift']());}catch(_0xd7312d){_0x1c19b5['push'](_0x1c19b5['shift']());}}}(a49_0x5562,0x3c09b));import{BaseCommand}from'./command.js';function a49_0x5562(){const _0x6e9f85=['469315pDTXrL','10178ZHnvjN','\x20\x20Cause:\x20','error','4202613JBWBUR','user\x20list','1123192pqFobO','2168930obvOUF','list','user','cause','Error:\x20','Listing\x20users...','Show\x20current\x20user\x20information','name','description','\x20user','448386tfzSyT','3YdadVe','258NUujuI','List\x20all\x20users\x20in\x20the\x20account','message','4AdCCBy','verbose','2002250XfGbDg','execute'];a49_0x5562=function(){return _0x6e9f85;};return a49_0x5562();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';function a49_0x1c08(_0x3c17d0,_0x49b05f){_0x3c17d0=_0x3c17d0-0xb4;const _0x55622c=a49_0x5562();let _0x1c08e4=_0x55622c[_0x3c17d0];return _0x1c08e4;}import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a49_0x3f0da1(0xbc)]=a49_0x3f0da1(0xb7);[a49_0x3f0da1(0xbd)]=a49_0x3f0da1(0xbb);async[a49_0x3f0da1(0xc7)](_0x3ba2eb){const _0x6c9fc2=a49_0x3f0da1,{options:_0x2a9ebe,tdx:_0x1ba3b8}=_0x3ba2eb;try{const _0x2b7fac=await withSpinner('Fetching\x20user\x20info...',()=>_0x1ba3b8['user']['getCurrent'](),{'verbose':_0x2a9ebe['verbose']}),_0x1dbe70=_0x2b7fac['data'];return await handleSingleObjectOutput(_0x1dbe70,_0x2a9ebe),0x0;}catch(_0x36eac2){if(_0x36eac2 instanceof SDKError)return console['error']('Error:\x20'+_0x36eac2[_0x6c9fc2(0xc3)]),_0x36eac2['cause']&&console[_0x6c9fc2(0xcb)](_0x6c9fc2(0xca)+_0x36eac2[_0x6c9fc2(0xb8)]),0x1;throw _0x36eac2;}}}export class UserListCommand extends BaseCommand{[a49_0x3f0da1(0xbc)]=a49_0x3f0da1(0xcd);['description']=a49_0x3f0da1(0xc2);async['execute'](_0x1a7bd5){const _0x5d6106=a49_0x3f0da1,{options:_0x5ad851,tdx:_0x40356a}=_0x1a7bd5;try{const _0x48adf0=await withSpinner(_0x5d6106(0xba),()=>_0x40356a[_0x5d6106(0xb7)][_0x5d6106(0xb6)](),{'verbose':_0x5ad851[_0x5d6106(0xc5)]}),_0x5a6583=_0x48adf0['data'];return console[_0x5d6106(0xcb)]('✔\x20Found\x20'+_0x5a6583['length']+_0x5d6106(0xbe)+(_0x5a6583['length']!==0x1?'s':'')),await handleSDKOutput(_0x5a6583,_0x5ad851),0x0;}catch(_0x281346){if(_0x281346 instanceof SDKError)return console[_0x5d6106(0xcb)](_0x5d6106(0xb9)+_0x281346[_0x5d6106(0xc3)]),_0x281346[_0x5d6106(0xb8)]&&console[_0x5d6106(0xcb)](_0x5d6106(0xca)+_0x281346['cause']),0x1;throw _0x281346;}}}
1
+ const a50_0x5cc0f6=a50_0x2293;(function(_0x3920c8,_0x5c75c7){const _0x15e5de=a50_0x2293,_0x2a8dac=_0x3920c8();while(!![]){try{const _0x7fbbb4=-parseInt(_0x15e5de(0x186))/0x1+parseInt(_0x15e5de(0x190))/0x2+-parseInt(_0x15e5de(0x196))/0x3+-parseInt(_0x15e5de(0x19a))/0x4+parseInt(_0x15e5de(0x198))/0x5+-parseInt(_0x15e5de(0x193))/0x6*(parseInt(_0x15e5de(0x18b))/0x7)+-parseInt(_0x15e5de(0x182))/0x8*(-parseInt(_0x15e5de(0x191))/0x9);if(_0x7fbbb4===_0x5c75c7)break;else _0x2a8dac['push'](_0x2a8dac['shift']());}catch(_0x218fc1){_0x2a8dac['push'](_0x2a8dac['shift']());}}}(a50_0x3e88,0xab579));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a50_0x3e88(){const _0x41fadd=['Listing\x20users...','Fetching\x20user\x20info...','890590vJnwVm','11079lgkAGL','name','360GfXorr','description','Show\x20current\x20user\x20information','3848994OAydUW','length','6997800KjIJZe','verbose','4541168tUjVHl','✔\x20Found\x20','list','15648URPKYl','cause','error','\x20user','300804FAITfv','data','getCurrent','Error:\x20','message','97041mMNhUV','user','\x20\x20Cause:\x20'];a50_0x3e88=function(){return _0x41fadd;};return a50_0x3e88();}export class UserCommand extends BaseCommand{['name']=a50_0x5cc0f6(0x18c);[a50_0x5cc0f6(0x194)]=a50_0x5cc0f6(0x195);async['execute'](_0x36d48b){const _0x4712f3=a50_0x5cc0f6,{options:_0x388a0b,tdx:_0x5251d1}=_0x36d48b;try{const _0x4aef3f=await withSpinner(_0x4712f3(0x18f),()=>_0x5251d1[_0x4712f3(0x18c)][_0x4712f3(0x188)](),{'verbose':_0x388a0b[_0x4712f3(0x199)]}),_0x37a8d4=_0x4aef3f[_0x4712f3(0x187)];return await handleSingleObjectOutput(_0x37a8d4,_0x388a0b),0x0;}catch(_0x174885){if(_0x174885 instanceof SDKError)return console[_0x4712f3(0x184)](_0x4712f3(0x189)+_0x174885[_0x4712f3(0x18a)]),_0x174885[_0x4712f3(0x183)]&&console['error'](_0x4712f3(0x18d)+_0x174885[_0x4712f3(0x183)]),0x1;throw _0x174885;}}}function a50_0x2293(_0xd83a54,_0x53b233){_0xd83a54=_0xd83a54-0x181;const _0x3e88ca=a50_0x3e88();let _0x22939e=_0x3e88ca[_0xd83a54];return _0x22939e;}export class UserListCommand extends BaseCommand{[a50_0x5cc0f6(0x192)]='user\x20list';['description']='List\x20all\x20users\x20in\x20the\x20account';async['execute'](_0x113b37){const _0x2aaaa3=a50_0x5cc0f6,{options:_0x45493c,tdx:_0x2de676}=_0x113b37;try{const _0x5d48ce=await withSpinner(_0x2aaaa3(0x18e),()=>_0x2de676['user'][_0x2aaaa3(0x181)](),{'verbose':_0x45493c[_0x2aaaa3(0x199)]}),_0x277c79=_0x5d48ce[_0x2aaaa3(0x187)];return console['error'](_0x2aaaa3(0x19b)+_0x277c79[_0x2aaaa3(0x197)]+_0x2aaaa3(0x185)+(_0x277c79['length']!==0x1?'s':'')),await handleSDKOutput(_0x277c79,_0x45493c),0x0;}catch(_0x5f560d){if(_0x5f560d instanceof SDKError)return console['error'](_0x2aaaa3(0x189)+_0x5f560d[_0x2aaaa3(0x18a)]),_0x5f560d['cause']&&console[_0x2aaaa3(0x184)]('\x20\x20Cause:\x20'+_0x5f560d[_0x2aaaa3(0x183)]),0x1;throw _0x5f560d;}}}