@treasuredata/tdx 2026.4.7 → 2026.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) 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.js +1 -1
  10. package/dist/commands/cas-command.js +1 -1
  11. package/dist/commands/cas-segment-command.js +1 -1
  12. package/dist/commands/chat-command.js +1 -1
  13. package/dist/commands/claude-command.js +1 -1
  14. package/dist/commands/claude-statusline-command.js +1 -1
  15. package/dist/commands/claude-usage-command.js +1 -1
  16. package/dist/commands/command.js +1 -1
  17. package/dist/commands/connection-command.js +1 -1
  18. package/dist/commands/databases.js +1 -1
  19. package/dist/commands/delivery-command.js +1 -1
  20. package/dist/commands/describe.js +1 -1
  21. package/dist/commands/engage-campaign-pull-command.js +1 -1
  22. package/dist/commands/engage-campaign-push-command.js +1 -1
  23. package/dist/commands/engage-campaign-validate-command.js +1 -1
  24. package/dist/commands/engage-command.js +1 -1
  25. package/dist/commands/engage-template-pull-command.js +1 -1
  26. package/dist/commands/engage-template-push-command.js +1 -1
  27. package/dist/commands/engage-template-validate-command.js +1 -1
  28. package/dist/commands/job-command.js +1 -1
  29. package/dist/commands/journey-command.js +1 -1
  30. package/dist/commands/journey-validate-command.js +1 -1
  31. package/dist/commands/llm-command.js +1 -1
  32. package/dist/commands/mcp-command.js +1 -1
  33. package/dist/commands/parent-segment-command.js +1 -1
  34. package/dist/commands/policy-command.js +1 -1
  35. package/dist/commands/profile-command.js +1 -1
  36. package/dist/commands/profiles-command.js +1 -1
  37. package/dist/commands/query-command.js +1 -1
  38. package/dist/commands/schedule-command.js +1 -1
  39. package/dist/commands/segment-command.js +1 -1
  40. package/dist/commands/segment-create-command.js +1 -1
  41. package/dist/commands/segment-fields-command.js +1 -1
  42. package/dist/commands/segment-pull-command.js +1 -1
  43. package/dist/commands/segment-push-command.js +1 -1
  44. package/dist/commands/segment-update-command.js +1 -1
  45. package/dist/commands/segment-use-command.js +1 -1
  46. package/dist/commands/segment-validate-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/status-command.js +1 -1
  50. package/dist/commands/tables.js +1 -1
  51. package/dist/commands/unset-command.js +1 -1
  52. package/dist/commands/upgrade-command.js +1 -1
  53. package/dist/commands/use-command.js +1 -1
  54. package/dist/commands/user-command.js +1 -1
  55. package/dist/commands/work-command.js +1 -1
  56. package/dist/commands/workflow-command.js +1 -1
  57. package/dist/core/auth.js +1 -1
  58. package/dist/core/command-output.js +1 -1
  59. package/dist/core/config.js +1 -1
  60. package/dist/core/connection-cache.js +1 -1
  61. package/dist/core/constants.js +1 -1
  62. package/dist/core/credential-cache.js +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/keychain.js +1 -1
  65. package/dist/core/oauth-keychain.js +1 -1
  66. package/dist/core/oauth.js +1 -1
  67. package/dist/core/profile.js +1 -1
  68. package/dist/core/project-config.js +1 -1
  69. package/dist/core/session.js +1 -1
  70. package/dist/core/user-cache.js +1 -1
  71. package/dist/core/version.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/mcp/server.js +1 -1
  74. package/dist/mcp/tools/index.js +1 -1
  75. package/dist/mcp/tools/tdx-run.js +1 -1
  76. package/dist/mcp/tools/tdx-search.js +1 -1
  77. package/dist/mcp/tools/work-create-item.js +1 -1
  78. package/dist/mcp/utils.js +1 -1
  79. package/dist/proxy/claude-usage-tracker.js +1 -1
  80. package/dist/proxy/passthrough-server.js +1 -1
  81. package/dist/proxy/sse-usage-parser.js +1 -1
  82. package/dist/sdk/agent/agent-config.js +1 -1
  83. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  84. package/dist/sdk/agent/agent-yaml.js +1 -1
  85. package/dist/sdk/agent/test/evaluator.js +1 -1
  86. package/dist/sdk/agent/test/executor.js +1 -1
  87. package/dist/sdk/agent/test/index.js +1 -1
  88. package/dist/sdk/agent/test/output.js +1 -1
  89. package/dist/sdk/agent/test/parser.js +1 -1
  90. package/dist/sdk/agent/tool-target-registry.js +1 -1
  91. package/dist/sdk/api.js +1 -1
  92. package/dist/sdk/cas/cas-api-client.js +1 -1
  93. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  94. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  95. package/dist/sdk/cas/index.js +1 -1
  96. package/dist/sdk/cas/pull-workflow.js +1 -1
  97. package/dist/sdk/cas/push-workflow.js +1 -1
  98. package/dist/sdk/client/cdp-api-client.js +1 -1
  99. package/dist/sdk/client/delivery-api-client.js +1 -1
  100. package/dist/sdk/client/endpoints.js +1 -1
  101. package/dist/sdk/client/engage-api-client.js +1 -1
  102. package/dist/sdk/client/http-client.js +1 -1
  103. package/dist/sdk/client/llm-api-client.js +1 -1
  104. package/dist/sdk/client/oauth-refresh.js +1 -1
  105. package/dist/sdk/client/rate-limiter.js +1 -1
  106. package/dist/sdk/client/td-api-client.js +1 -1
  107. package/dist/sdk/client/trino-api-client.js +1 -1
  108. package/dist/sdk/client/workflow-client.js +1 -1
  109. package/dist/sdk/connection-validator.js +1 -1
  110. package/dist/sdk/connection.js +1 -1
  111. package/dist/sdk/delivery.js +1 -1
  112. package/dist/sdk/engage/campaign-pull.js +1 -1
  113. package/dist/sdk/engage/campaign-push.js +1 -1
  114. package/dist/sdk/engage/campaign-validator.js +1 -1
  115. package/dist/sdk/engage/campaign-yaml.js +1 -1
  116. package/dist/sdk/engage/template-pull.js +1 -1
  117. package/dist/sdk/engage/template-push.js +1 -1
  118. package/dist/sdk/engage/template-validator.js +1 -1
  119. package/dist/sdk/engage/template-yaml.js +1 -1
  120. package/dist/sdk/engage/types/campaign-def.js +1 -1
  121. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  122. package/dist/sdk/engage/types/template-schema.js +1 -1
  123. package/dist/sdk/engage.js +1 -1
  124. package/dist/sdk/errors.js +1 -1
  125. package/dist/sdk/index.js +1 -1
  126. package/dist/sdk/io/index.js +1 -1
  127. package/dist/sdk/io/node-filesystem.js +1 -1
  128. package/dist/sdk/job.js +1 -1
  129. package/dist/sdk/journey.js +1 -1
  130. package/dist/sdk/llm/chat-cache.js +1 -1
  131. package/dist/sdk/llm/index.js +1 -1
  132. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  133. package/dist/sdk/llm/model-factors.js +1 -1
  134. package/dist/sdk/personalization.js +1 -1
  135. package/dist/sdk/policy.js +1 -1
  136. package/dist/sdk/query/index.js +1 -1
  137. package/dist/sdk/query/sql-parser.js +1 -1
  138. package/dist/sdk/realtime.js +1 -1
  139. package/dist/sdk/schedule.js +1 -1
  140. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  141. package/dist/sdk/segment/fields-display.js +1 -1
  142. package/dist/sdk/segment/file-discovery.js +1 -1
  143. package/dist/sdk/segment/journey-utils.js +1 -1
  144. package/dist/sdk/segment/journey-validator.js +1 -1
  145. package/dist/sdk/segment/journey-yaml.js +1 -1
  146. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  147. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  148. package/dist/sdk/segment/pull-workflow.js +1 -1
  149. package/dist/sdk/segment/push-recovery.js +1 -1
  150. package/dist/sdk/segment/push-workflow.js +1 -1
  151. package/dist/sdk/segment/resolution-context.js +1 -1
  152. package/dist/sdk/segment/segment-path-parser.js +1 -1
  153. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  154. package/dist/sdk/segment/segment-validator.js +1 -1
  155. package/dist/sdk/segment/target-resolution.js +1 -1
  156. package/dist/sdk/segment/tdx-config.js +1 -1
  157. package/dist/sdk/segment/types/activation-schema.js +1 -1
  158. package/dist/sdk/segment/types/journey-def.js +1 -1
  159. package/dist/sdk/segment/types/journey-schema.js +1 -1
  160. package/dist/sdk/segment/types/segment-def.js +1 -1
  161. package/dist/sdk/segment/types/segment-schema.js +1 -1
  162. package/dist/sdk/segment/validate-files.js +1 -1
  163. package/dist/sdk/segment/yaml-validator.js +1 -1
  164. package/dist/sdk/segment.js +1 -1
  165. package/dist/sdk/types/index.js +1 -1
  166. package/dist/sdk/types/progress.js +1 -1
  167. package/dist/sdk/types/workspace.js +1 -1
  168. package/dist/sdk/user.js +1 -1
  169. package/dist/sdk/util/format-detector.js +1 -1
  170. package/dist/sdk/util/formatters.js +1 -1
  171. package/dist/sdk/util/index.js +1 -1
  172. package/dist/sdk/util/paginate.js +1 -1
  173. package/dist/sdk/util/tree-formatter.js +1 -1
  174. package/dist/sdk/workflow/archive-validation.js +1 -1
  175. package/dist/sdk/workflow/clone-workflow.js +1 -1
  176. package/dist/sdk/workflow/index.js +1 -1
  177. package/dist/sdk/workflow/pull-workflow.js +1 -1
  178. package/dist/sdk/workflow/push-workflow.js +1 -1
  179. package/dist/sdk/workflow/tdx-config.js +1 -1
  180. package/dist/sdk/workflow/workflow-utils.js +1 -1
  181. package/dist/sdk/workspace/access-tracker.js +1 -1
  182. package/dist/sdk/workspace/frontmatter.js +1 -1
  183. package/dist/sdk/workspace/git.js +1 -1
  184. package/dist/sdk/workspace/index.js +1 -1
  185. package/dist/sdk/workspace/templates.js +1 -1
  186. package/dist/sdk/workspace/weekly.js +1 -1
  187. package/dist/sdk/workspace/wikilinks.js +1 -1
  188. package/dist/test-utils/command-runner.js +1 -1
  189. package/dist/test-utils/factories.js +1 -1
  190. package/dist/test-utils/fixtures.js +1 -1
  191. package/dist/test-utils/http-mock.js +1 -1
  192. package/dist/test-utils/index.js +1 -1
  193. package/dist/utils/async.js +1 -1
  194. package/dist/utils/colors.js +1 -1
  195. package/dist/utils/diff.js +1 -1
  196. package/dist/utils/file-permissions.js +1 -1
  197. package/dist/utils/file-reader.js +1 -1
  198. package/dist/utils/github-releases.js +1 -1
  199. package/dist/utils/global-cache.js +1 -1
  200. package/dist/utils/json-loader.js +1 -1
  201. package/dist/utils/local-cache.js +1 -1
  202. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  203. package/dist/utils/logger/formatters/index.js +1 -1
  204. package/dist/utils/logger/handlers/console-handler.js +1 -1
  205. package/dist/utils/logger/handlers/file-handler.js +1 -1
  206. package/dist/utils/logger/handlers/index.js +1 -1
  207. package/dist/utils/logger/handlers/null-handler.js +1 -1
  208. package/dist/utils/logger/index.js +1 -1
  209. package/dist/utils/logger/logger.js +1 -1
  210. package/dist/utils/logger/types.js +1 -1
  211. package/dist/utils/option-validation.js +1 -1
  212. package/dist/utils/process.js +1 -1
  213. package/dist/utils/prompt.js +1 -1
  214. package/dist/utils/spinner.js +1 -1
  215. package/dist/utils/sse-parser.js +1 -1
  216. package/dist/utils/string-utils.js +1 -1
  217. package/dist/utils/table-ref-parser.js +1 -1
  218. package/dist/utils/tdx-logger.js +1 -1
  219. package/dist/utils/version-check.js +1 -1
  220. package/package.json +1 -1
@@ -1 +1 @@
1
- const a48_0x1e8bf2=a48_0x30f2;(function(_0x254642,_0x6c64e){const _0x484522=a48_0x30f2,_0x2b9b30=_0x254642();while(!![]){try{const _0x3f02a5=parseInt(_0x484522(0x1b8))/0x1+-parseInt(_0x484522(0x1c8))/0x2+parseInt(_0x484522(0x1d5))/0x3+parseInt(_0x484522(0x1b0))/0x4+parseInt(_0x484522(0x1bb))/0x5+parseInt(_0x484522(0x1cc))/0x6*(parseInt(_0x484522(0x1b2))/0x7)+-parseInt(_0x484522(0x1c9))/0x8;if(_0x3f02a5===_0x6c64e)break;else _0x2b9b30['push'](_0x2b9b30['shift']());}catch(_0x1c7eea){_0x2b9b30['push'](_0x2b9b30['shift']());}}}(a48_0x32c7,0x420aa));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';function a48_0x30f2(_0x52a344,_0x2bd33d){_0x52a344=_0x52a344-0x1a4;const _0x32c7ec=a48_0x32c7();let _0x30f276=_0x32c7ec[_0x52a344];return _0x30f276;}import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a48_0x1e8bf2(0x1c4)]=a48_0x1e8bf2(0x1bc);['description']=a48_0x1e8bf2(0x1a7);async[a48_0x1e8bf2(0x1c6)](_0x1220d7){const _0x421ab8=a48_0x1e8bf2,{options:_0x15caa3,args:_0x358cf1,tdx:_0x56b745}=_0x1220d7;let _0x538f0c;if(_0x358cf1[_0x421ab8(0x1d2)]===0x0)_0x538f0c={'database':undefined,'table':undefined,'original':''};else{if(_0x358cf1[_0x421ab8(0x1d2)]===0x1)try{_0x538f0c=parseTableReference(_0x358cf1[0x0]);if(_0x538f0c[_0x421ab8(0x1b1)]&&!_0x538f0c[_0x421ab8(0x1c3)]&&!_0x538f0c[_0x421ab8(0x1b1)][_0x421ab8(0x1cd)]('*')&&!_0x538f0c[_0x421ab8(0x1b1)][_0x421ab8(0x1cd)]('?'))return console[_0x421ab8(0x1ca)](_0x421ab8(0x1d8)+_0x358cf1[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x421ab8(0x1ca)](_0x421ab8(0x1be)+_0x538f0c[_0x421ab8(0x1b1)]+'\x27?'),console[_0x421ab8(0x1ca)](_0x421ab8(0x1c7)+_0x538f0c[_0x421ab8(0x1b1)]+_0x421ab8(0x1b4)),console[_0x421ab8(0x1ca)](_0x421ab8(0x1ae)+_0x538f0c[_0x421ab8(0x1b1)]),console[_0x421ab8(0x1ca)](_0x421ab8(0x1c1)+_0x538f0c[_0x421ab8(0x1b1)]),console[_0x421ab8(0x1ca)](''),console[_0x421ab8(0x1ca)](_0x421ab8(0x1a8)+_0x358cf1[0x0]+_0x421ab8(0x1a9)+_0x538f0c[_0x421ab8(0x1b1)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x4cdf26){return console[_0x421ab8(0x1ca)](_0x421ab8(0x1ce)+_0x4cdf26[_0x421ab8(0x1b6)]),0x1;}else return console[_0x421ab8(0x1ca)](_0x421ab8(0x1d0)),console[_0x421ab8(0x1ca)](_0x421ab8(0x1ad)),console[_0x421ab8(0x1ca)](_0x421ab8(0x1c0)),console[_0x421ab8(0x1ca)]('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console[_0x421ab8(0x1ca)](_0x421ab8(0x1ba)),console['error']('Or\x20use\x20--in\x20flag:'),console[_0x421ab8(0x1ca)](_0x421ab8(0x1ab)),0x1;}const _0x33bafc=_0x15caa3['database'];!_0x538f0c[_0x421ab8(0x1c3)]&&_0x33bafc&&(_0x538f0c[_0x421ab8(0x1c3)]=_0x33bafc);try{const _0x206a23=_0x4ff8f6=>_0x4ff8f6&&(_0x4ff8f6[_0x421ab8(0x1cd)]('*')||_0x4ff8f6['includes']('?')),_0x49d535=_0x206a23(_0x538f0c[_0x421ab8(0x1c3)]);_0x15caa3['verbose']&&(console[_0x421ab8(0x1ca)](_0x421ab8(0x1a4)+_0x15caa3[_0x421ab8(0x1c5)]),_0x538f0c['database']?_0x49d535?console[_0x421ab8(0x1ca)](_0x421ab8(0x1c2)+_0x538f0c[_0x421ab8(0x1c3)]):console[_0x421ab8(0x1ca)](_0x421ab8(0x1d4)+_0x538f0c[_0x421ab8(0x1c3)]):console[_0x421ab8(0x1ca)](_0x421ab8(0x1b3)),_0x538f0c[_0x421ab8(0x1b1)]&&console[_0x421ab8(0x1ca)](_0x421ab8(0x1bf)+_0x538f0c[_0x421ab8(0x1b1)]));const _0x5eeaaf=_0x538f0c['database']&&!_0x49d535?_0x538f0c['database']:undefined,_0x3b27ca=_0x49d535?_0x538f0c[_0x421ab8(0x1c3)]:undefined,_0x260d06=_0x538f0c[_0x421ab8(0x1b1)],_0x57cbd9=resolveLimit(_0x15caa3[_0x421ab8(0x1d1)],DEFAULT_LISTING_LIMIT),_0x386b6f=await withSpinner(_0x421ab8(0x1b9),()=>_0x56b745[_0x421ab8(0x1b7)][_0x421ab8(0x1af)](_0x5eeaaf,_0x260d06,_0x3b27ca,_0x57cbd9),{'verbose':_0x15caa3['verbose']}),_0x1e196a=_0x386b6f[_0x421ab8(0x1b5)];if(_0x1e196a[_0x421ab8(0x1d2)]===0x0&&_0x538f0c[_0x421ab8(0x1c3)]&&!_0x49d535)return console['error'](_0x421ab8(0x1bd)),console[_0x421ab8(0x1ca)](_0x421ab8(0x1d3)+_0x538f0c[_0x421ab8(0x1c3)]+_0x421ab8(0x1cf)),0x1;console['error'](_0x421ab8(0x1d6)+_0x1e196a['length']+'\x20table'+(_0x1e196a[_0x421ab8(0x1d2)]!==0x1?'s':''));if(isStructuredFormat(_0x15caa3))await handleSDKOutput(_0x1e196a,{..._0x15caa3,'limit':_0x57cbd9});else for(const _0x54fa3a of _0x1e196a){const _0x4709e0=_0x54fa3a[_0x421ab8(0x1d7)]?_0x54fa3a[_0x421ab8(0x1d7)]+'.':'';console[_0x421ab8(0x1a5)](_0x421ab8(0x1ac)+_0x4709e0+_0x54fa3a[_0x421ab8(0x1cb)]);}return 0x0;}catch(_0x35312d){if(_0x35312d instanceof SDKError)return console['error'](_0x421ab8(0x1ce)+_0x35312d[_0x421ab8(0x1b6)]),_0x35312d['cause']&&console[_0x421ab8(0x1ca)](_0x421ab8(0x1aa)+_0x35312d[_0x421ab8(0x1a6)]),0x1;throw _0x35312d;}}['validate'](_0x2d0f35){return undefined;}}function a48_0x32c7(){const _0x4b228d=['tables','✖\x20No\x20tables\x20found','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','Table\x20pattern:\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Database\x20pattern:\x20','database','name','site','execute','\x20\x20Use:\x20tdx\x20tables\x20\x22','725354EHqkut','5496032fbrGkZ','error','table_name','667188sUPpkL','includes','Error:\x20','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','limit','length','Database\x20\x27','Database:\x20','736752KzMdeQ','✔\x20Found\x20','database_name','Error:\x20Pattern\x20\x27','Site:\x20','log','cause','List\x20tables\x20in\x20a\x20database','Note:\x20\x27','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x20\x20Cause:\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','📋\x20','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','listTables','1895248LOFHhZ','table','21pBmjqx','Database:\x20all','.*\x22','data','message','query','144102DHZcLD','Listing\x20tables...','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','615475BpaJim'];a48_0x32c7=function(){return _0x4b228d;};return a48_0x32c7();}
1
+ const a48_0x1400e3=a48_0x32f2;(function(_0x1efc18,_0x223864){const _0x98b874=a48_0x32f2,_0x561da8=_0x1efc18();while(!![]){try{const _0x56aa8d=parseInt(_0x98b874(0x197))/0x1*(-parseInt(_0x98b874(0x169))/0x2)+-parseInt(_0x98b874(0x18e))/0x3+-parseInt(_0x98b874(0x198))/0x4*(-parseInt(_0x98b874(0x18a))/0x5)+-parseInt(_0x98b874(0x19a))/0x6+parseInt(_0x98b874(0x182))/0x7+-parseInt(_0x98b874(0x180))/0x8*(-parseInt(_0x98b874(0x17f))/0x9)+-parseInt(_0x98b874(0x172))/0xa*(-parseInt(_0x98b874(0x183))/0xb);if(_0x56aa8d===_0x223864)break;else _0x561da8['push'](_0x561da8['shift']());}catch(_0x53296a){_0x561da8['push'](_0x561da8['shift']());}}}(a48_0x3abf,0xa51d7));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a48_0x32f2(_0x41d43e,_0x4b0458){_0x41d43e=_0x41d43e-0x169;const _0x3abfa8=a48_0x3abf();let _0x32f2b6=_0x3abfa8[_0x41d43e];return _0x32f2b6;}import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';function a48_0x3abf(){const _0x34f791=['765620xOYEea','\x20\x20Cause:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','error','List\x20tables\x20in\x20a\x20database','includes','data','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','Listing\x20tables...','Database:\x20all','execute','Error:\x20','database_name','9gkMdKC','1644936GzRmsN','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','3568376EUkyZG','176tSrwjE','Note:\x20\x27','✖\x20No\x20tables\x20found','log','Database:\x20','name','verbose','10LbZtVq','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','cause','Error:\x20Pattern\x20\x27','3244557DOMCWY','length','\x27\x20across\x20all\x20databases.','\x20\x20Use:\x20tdx\x20tables\x20\x22','Site:\x20','\x27\x20is\x20ambiguous.','\x20table','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','description','5riyebY','911076lstHmc','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','238260vVorGD','database','message','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Database\x20pattern:\x20','Table\x20pattern:\x20','239350sbEjwl','✔\x20Found\x20','Database\x20\x27','site','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','table','validate','Or\x20use\x20--in\x20flag:','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'];a48_0x3abf=function(){return _0x34f791;};return a48_0x3abf();}export class TablesCommand extends BaseCommand{[a48_0x1400e3(0x188)]='tables';[a48_0x1400e3(0x196)]=a48_0x1400e3(0x176);async[a48_0x1400e3(0x17c)](_0x4d52a8){const _0x3def4a=a48_0x1400e3,{options:_0xf18dd9,args:_0x149fda,tdx:_0x206d6a}=_0x4d52a8;let _0x4a034f;if(_0x149fda[_0x3def4a(0x18f)]===0x0)_0x4a034f={'database':undefined,'table':undefined,'original':''};else{if(_0x149fda['length']===0x1)try{_0x4a034f=parseTableReference(_0x149fda[0x0]);if(_0x4a034f['table']&&!_0x4a034f[_0x3def4a(0x19b)]&&!_0x4a034f[_0x3def4a(0x16e)][_0x3def4a(0x177)]('*')&&!_0x4a034f[_0x3def4a(0x16e)][_0x3def4a(0x177)]('?'))return console[_0x3def4a(0x175)](_0x3def4a(0x18d)+_0x149fda[0x0]+_0x3def4a(0x193)),console[_0x3def4a(0x175)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x4a034f[_0x3def4a(0x16e)]+'\x27?'),console[_0x3def4a(0x175)](_0x3def4a(0x191)+_0x4a034f[_0x3def4a(0x16e)]+'.*\x22'),console['error'](_0x3def4a(0x171)+_0x4a034f['table']),console[_0x3def4a(0x175)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x4a034f[_0x3def4a(0x16e)]),console['error'](''),console[_0x3def4a(0x175)](_0x3def4a(0x184)+_0x149fda[0x0]+_0x3def4a(0x179)+_0x4a034f['table']+_0x3def4a(0x190)),0x1;}catch(_0x282b34){return console[_0x3def4a(0x175)](_0x3def4a(0x17d)+_0x282b34[_0x3def4a(0x19c)]),0x1;}else return console['error'](_0x3def4a(0x18b)),console[_0x3def4a(0x175)](_0x3def4a(0x19d)),console[_0x3def4a(0x175)](_0x3def4a(0x181)),console[_0x3def4a(0x175)](_0x3def4a(0x16d)),console[_0x3def4a(0x175)](_0x3def4a(0x174)),console[_0x3def4a(0x175)](_0x3def4a(0x170)),console[_0x3def4a(0x175)](_0x3def4a(0x199)),0x1;}const _0x253a8e=_0xf18dd9[_0x3def4a(0x19b)];!_0x4a034f[_0x3def4a(0x19b)]&&_0x253a8e&&(_0x4a034f[_0x3def4a(0x19b)]=_0x253a8e);try{const _0x2ecc6c=_0x50d167=>_0x50d167&&(_0x50d167[_0x3def4a(0x177)]('*')||_0x50d167[_0x3def4a(0x177)]('?')),_0x3baa73=_0x2ecc6c(_0x4a034f[_0x3def4a(0x19b)]);_0xf18dd9['verbose']&&(console[_0x3def4a(0x175)](_0x3def4a(0x192)+_0xf18dd9[_0x3def4a(0x16c)]),_0x4a034f[_0x3def4a(0x19b)]?_0x3baa73?console['error'](_0x3def4a(0x19e)+_0x4a034f[_0x3def4a(0x19b)]):console[_0x3def4a(0x175)](_0x3def4a(0x187)+_0x4a034f[_0x3def4a(0x19b)]):console[_0x3def4a(0x175)](_0x3def4a(0x17b)),_0x4a034f[_0x3def4a(0x16e)]&&console[_0x3def4a(0x175)](_0x3def4a(0x19f)+_0x4a034f[_0x3def4a(0x16e)]));const _0x2cc5ab=_0x4a034f['database']&&!_0x3baa73?_0x4a034f[_0x3def4a(0x19b)]:undefined,_0x2201ed=_0x3baa73?_0x4a034f[_0x3def4a(0x19b)]:undefined,_0x4f2ea9=_0x4a034f['table'],_0x36522b=resolveLimit(_0xf18dd9['limit'],DEFAULT_LISTING_LIMIT),_0x418ebe=await withSpinner(_0x3def4a(0x17a),()=>_0x206d6a['query']['listTables'](_0x2cc5ab,_0x4f2ea9,_0x2201ed,_0x36522b),{'verbose':_0xf18dd9[_0x3def4a(0x189)]}),_0x43c519=_0x418ebe[_0x3def4a(0x178)];if(_0x43c519[_0x3def4a(0x18f)]===0x0&&_0x4a034f[_0x3def4a(0x19b)]&&!_0x3baa73)return console[_0x3def4a(0x175)](_0x3def4a(0x185)),console['error'](_0x3def4a(0x16b)+_0x4a034f[_0x3def4a(0x19b)]+_0x3def4a(0x195)),0x1;console[_0x3def4a(0x175)](_0x3def4a(0x16a)+_0x43c519[_0x3def4a(0x18f)]+_0x3def4a(0x194)+(_0x43c519['length']!==0x1?'s':''));if(isStructuredFormat(_0xf18dd9))await handleSDKOutput(_0x43c519,{..._0xf18dd9,'limit':_0x36522b});else for(const _0x25ec2e of _0x43c519){const _0x4d127b=_0x25ec2e[_0x3def4a(0x17e)]?_0x25ec2e[_0x3def4a(0x17e)]+'.':'';console[_0x3def4a(0x186)]('📋\x20'+_0x4d127b+_0x25ec2e['table_name']);}return 0x0;}catch(_0x4dc932){if(_0x4dc932 instanceof SDKError)return console[_0x3def4a(0x175)]('Error:\x20'+_0x4dc932[_0x3def4a(0x19c)]),_0x4dc932[_0x3def4a(0x18c)]&&console[_0x3def4a(0x175)](_0x3def4a(0x173)+_0x4dc932[_0x3def4a(0x18c)]),0x1;throw _0x4dc932;}}[a48_0x1400e3(0x16f)](_0x448b02){return undefined;}}
@@ -1 +1 @@
1
- const a49_0xbd8c40=a49_0x3c3e;(function(_0x3ed3bc,_0x1cc514){const _0x371057=a49_0x3c3e,_0x38029a=_0x3ed3bc();while(!![]){try{const _0x422901=-parseInt(_0x371057(0x6f))/0x1+-parseInt(_0x371057(0x83))/0x2*(-parseInt(_0x371057(0x7f))/0x3)+parseInt(_0x371057(0x6c))/0x4+-parseInt(_0x371057(0x89))/0x5*(parseInt(_0x371057(0x8d))/0x6)+-parseInt(_0x371057(0x8f))/0x7*(-parseInt(_0x371057(0x7a))/0x8)+-parseInt(_0x371057(0x6d))/0x9*(parseInt(_0x371057(0x7d))/0xa)+parseInt(_0x371057(0x67))/0xb*(parseInt(_0x371057(0x90))/0xc);if(_0x422901===_0x1cc514)break;else _0x38029a['push'](_0x38029a['shift']());}catch(_0x2af97f){_0x38029a['push'](_0x38029a['shift']());}}}(a49_0x32a9,0x9ba3a));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a49_0x5a98fd from'chalk';function a49_0x32a9(){const _0x120334=['255184IWCnNX','execute','Usage:\x20tdx\x20unset\x20<resource>\x0a','join','parent_segment','Default\x20site\x20','database','Session\x20','cas','composable_audience','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','144EhwuXT','(session:\x20','llm_agent','10GoEtQN','green','3267474WpPxUw','default','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','llm_project','2aRwUuT','length','Clear\x20session-level\x20or\x20default\x20context\x20values','message','agent','includes','6349355YpmuVC','Error:\x20','cleared','engage_workspace','6yaYejY','profile','460005UFRmCq','24oFVEce','unset','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas\x0a','site','176363jAIaWr','dim','validate','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','tdx.json','53500SQFoqG','1394244hLhkSj','log'];a49_0x32a9=function(){return _0x120334;};return a49_0x32a9();}import*as a49_0x50a86a from'node:path';function a49_0x3c3e(_0x134e59,_0x206c23){_0x134e59=_0x134e59-0x65;const _0x32a96d=a49_0x32a9();let _0x3c3e7d=_0x32a96d[_0x134e59];return _0x3c3e7d;}export class UnsetCommand extends BaseCommand{['name']=a49_0xbd8c40(0x91);['description']=a49_0xbd8c40(0x85);[a49_0xbd8c40(0x69)](_0xbd7ff5){const _0x29b3c9=a49_0xbd8c40,{args:_0x3b3a63,options:_0x22eada}=_0xbd7ff5,_0xc3d425=_0x22eada[_0x29b3c9(0x80)];if(_0x3b3a63[_0x29b3c9(0x84)]===0x0)return _0x29b3c9(0x71)+_0x29b3c9(0x81)+_0x29b3c9(0x65)+_0x29b3c9(0x6a);const _0x1aaf69=_0x3b3a63[0x0],_0x53bff3=['site',_0x29b3c9(0x75),_0x29b3c9(0x73),_0x29b3c9(0x82),_0x29b3c9(0x87),_0x29b3c9(0x8e),_0x29b3c9(0x8c),_0x29b3c9(0x77),'composable_audience'];if(!_0x53bff3[_0x29b3c9(0x88)](_0x1aaf69))return'Invalid\x20resource:\x20'+_0x1aaf69+'.\x20Must\x20be\x20one\x20of:\x20'+_0x53bff3['join'](',\x20');if(_0xc3d425&&_0x1aaf69!==_0x29b3c9(0x66)&&_0x1aaf69!=='profile')return _0x29b3c9(0x79);return undefined;}async[a49_0xbd8c40(0x70)](_0x46e55a){const _0x24444d=a49_0xbd8c40,{args:_0x5ce487,options:_0x5e54a1}=_0x46e55a,_0x30cca0=_0x5e54a1[_0x24444d(0x80)];cleanExpiredSessions();try{const _0x1d6ad4=_0x5ce487[0x0],_0x58bba8=a49_0x50a86a[_0x24444d(0x72)](getConfigDir(),_0x24444d(0x6b));if(_0x30cca0){if(_0x1d6ad4===_0x24444d(0x66))return clearDefaultSiteFromUserConfig(),console[_0x24444d(0x6e)](_0x24444d(0x74)+a49_0x5a98fd[_0x24444d(0x7e)](_0x24444d(0x8b))),console['log'](a49_0x5a98fd[_0x24444d(0x68)]('\x0aUpdated:\x20'+_0x58bba8)),0x0;if(_0x1d6ad4===_0x24444d(0x8e))return clearActiveProfileFromUserConfig(),console[_0x24444d(0x6e)]('Default\x20profile\x20'+a49_0x5a98fd[_0x24444d(0x7e)]('cleared')),console[_0x24444d(0x6e)](a49_0x5a98fd[_0x24444d(0x68)]('\x0aUpdated:\x20'+_0x58bba8)),0x0;}const _0x44070b=getSessionID(_0x5e54a1['session']),_0xa351ac={'site':'site','database':_0x24444d(0x75),'parent_segment':_0x24444d(0x73),'llm_project':'llm_project','agent':_0x24444d(0x7c),'profile':_0x24444d(0x8e),'engage_workspace':_0x24444d(0x8c),'cas':_0x24444d(0x78),'composable_audience':_0x24444d(0x78)},_0x19bffb=_0xa351ac[_0x1d6ad4];return _0x19bffb&&(clearSessionContextField(_0x19bffb,_0x5e54a1['session']),console[_0x24444d(0x6e)](_0x24444d(0x76)+_0x1d6ad4+'\x20'+a49_0x5a98fd[_0x24444d(0x7e)](_0x24444d(0x8b))+'\x20'+a49_0x5a98fd['dim'](_0x24444d(0x7b)+_0x44070b+')'))),0x0;}catch(_0x4a3bf0){return _0x4a3bf0 instanceof Error&&console['error'](_0x24444d(0x8a)+_0x4a3bf0[_0x24444d(0x86)]),0x1;}}}
1
+ const a49_0x2876c0=a49_0x1236;(function(_0x50e692,_0x2663ee){const _0x2f5e77=a49_0x1236,_0x2be5b2=_0x50e692();while(!![]){try{const _0x20bf8c=parseInt(_0x2f5e77(0x192))/0x1+-parseInt(_0x2f5e77(0x1a3))/0x2*(parseInt(_0x2f5e77(0x1b3))/0x3)+parseInt(_0x2f5e77(0x19d))/0x4*(parseInt(_0x2f5e77(0x19e))/0x5)+parseInt(_0x2f5e77(0x1a5))/0x6*(parseInt(_0x2f5e77(0x1a8))/0x7)+parseInt(_0x2f5e77(0x1aa))/0x8*(parseInt(_0x2f5e77(0x196))/0x9)+-parseInt(_0x2f5e77(0x198))/0xa+-parseInt(_0x2f5e77(0x1b9))/0xb;if(_0x20bf8c===_0x2663ee)break;else _0x2be5b2['push'](_0x2be5b2['shift']());}catch(_0x5e082c){_0x2be5b2['push'](_0x2be5b2['shift']());}}}(a49_0x55ad,0x5746f));function a49_0x55ad(){const _0xc95ccd=['llm_agent','Invalid\x20resource:\x20','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas\x0a','456744ENoIyU','20OThQQB','engage_workspace','default','cleared','description','1308686tqpkho','Usage:\x20tdx\x20unset\x20<resource>\x0a','6XRsePY','database','green','2472274voTAHW','Default\x20site\x20','712oKkjno','name','profile','site','message','session','length','includes','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','3XWQyKk','Default\x20profile\x20','composable_audience','error','\x0aUpdated:\x20','cas','6702366cHIiXC','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','parent_segment','570303amxjRz','log','.\x20Must\x20be\x20one\x20of:\x20','unset','47871GwfQbI','agent','2324840CTyIYn','dim'];a49_0x55ad=function(){return _0xc95ccd;};return a49_0x55ad();}import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a49_0x48e0dc from'chalk';function a49_0x1236(_0x21e723,_0x741489){_0x21e723=_0x21e723-0x190;const _0x55ade4=a49_0x55ad();let _0x12365c=_0x55ade4[_0x21e723];return _0x12365c;}import*as a49_0x264e17 from'node:path';export class UnsetCommand extends BaseCommand{[a49_0x2876c0(0x1ab)]=a49_0x2876c0(0x195);[a49_0x2876c0(0x1a2)]='Clear\x20session-level\x20or\x20default\x20context\x20values';['validate'](_0x1bc49e){const _0x1c1196=a49_0x2876c0,{args:_0x20917b,options:_0x411916}=_0x1bc49e,_0x38443c=_0x411916[_0x1c1196(0x1a0)];if(_0x20917b[_0x1c1196(0x1b0)]===0x0)return _0x1c1196(0x1a4)+_0x1c1196(0x1b2)+_0x1c1196(0x19c)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x1ba74a=_0x20917b[0x0],_0x33347e=[_0x1c1196(0x1ad),'database','parent_segment','llm_project',_0x1c1196(0x197),_0x1c1196(0x1ac),_0x1c1196(0x19f),_0x1c1196(0x1b8),_0x1c1196(0x1b5)];if(!_0x33347e[_0x1c1196(0x1b1)](_0x1ba74a))return _0x1c1196(0x19b)+_0x1ba74a+_0x1c1196(0x194)+_0x33347e['join'](',\x20');if(_0x38443c&&_0x1ba74a!==_0x1c1196(0x1ad)&&_0x1ba74a!==_0x1c1196(0x1ac))return _0x1c1196(0x190);return undefined;}async['execute'](_0x54c117){const _0x1d689f=a49_0x2876c0,{args:_0x42ffa8,options:_0x32303a}=_0x54c117,_0x44075e=_0x32303a[_0x1d689f(0x1a0)];cleanExpiredSessions();try{const _0x42dbaf=_0x42ffa8[0x0],_0x218993=a49_0x264e17['join'](getConfigDir(),'tdx.json');if(_0x44075e){if(_0x42dbaf===_0x1d689f(0x1ad))return clearDefaultSiteFromUserConfig(),console[_0x1d689f(0x193)](_0x1d689f(0x1a9)+a49_0x48e0dc[_0x1d689f(0x1a7)](_0x1d689f(0x1a1))),console[_0x1d689f(0x193)](a49_0x48e0dc[_0x1d689f(0x199)](_0x1d689f(0x1b7)+_0x218993)),0x0;if(_0x42dbaf==='profile')return clearActiveProfileFromUserConfig(),console[_0x1d689f(0x193)](_0x1d689f(0x1b4)+a49_0x48e0dc[_0x1d689f(0x1a7)](_0x1d689f(0x1a1))),console[_0x1d689f(0x193)](a49_0x48e0dc[_0x1d689f(0x199)]('\x0aUpdated:\x20'+_0x218993)),0x0;}const _0x486f54=getSessionID(_0x32303a[_0x1d689f(0x1af)]),_0x39d628={'site':_0x1d689f(0x1ad),'database':_0x1d689f(0x1a6),'parent_segment':_0x1d689f(0x191),'llm_project':'llm_project','agent':_0x1d689f(0x19a),'profile':_0x1d689f(0x1ac),'engage_workspace':'engage_workspace','cas':_0x1d689f(0x1b5),'composable_audience':_0x1d689f(0x1b5)},_0x25f756=_0x39d628[_0x42dbaf];return _0x25f756&&(clearSessionContextField(_0x25f756,_0x32303a[_0x1d689f(0x1af)]),console[_0x1d689f(0x193)]('Session\x20'+_0x42dbaf+'\x20'+a49_0x48e0dc[_0x1d689f(0x1a7)]('cleared')+'\x20'+a49_0x48e0dc[_0x1d689f(0x199)]('(session:\x20'+_0x486f54+')'))),0x0;}catch(_0x173f0a){return _0x173f0a instanceof Error&&console[_0x1d689f(0x1b6)]('Error:\x20'+_0x173f0a[_0x1d689f(0x1ae)]),0x1;}}}
@@ -1 +1 @@
1
- const a50_0xac0600=a50_0x5869;(function(_0x2f4e90,_0x419e32){const _0x6eda9=a50_0x5869,_0x921d34=_0x2f4e90();while(!![]){try{const _0xdedca0=-parseInt(_0x6eda9(0x172))/0x1+parseInt(_0x6eda9(0x188))/0x2*(-parseInt(_0x6eda9(0x168))/0x3)+-parseInt(_0x6eda9(0x16d))/0x4+-parseInt(_0x6eda9(0x185))/0x5+parseInt(_0x6eda9(0x158))/0x6+-parseInt(_0x6eda9(0x182))/0x7+-parseInt(_0x6eda9(0x16a))/0x8*(-parseInt(_0x6eda9(0x179))/0x9);if(_0xdedca0===_0x419e32)break;else _0x921d34['push'](_0x921d34['shift']());}catch(_0x40b29e){_0x921d34['push'](_0x921d34['shift']());}}}(a50_0x4bd0,0x52d15));import{gt}from'semver';import a50_0x1a217e from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';function a50_0x4bd0(){const _0x544a9d=['pnpm','argv','Current\x20version:','Would\x20run:','yarn','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','green','join','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','description','Upgrade\x20failed\x20(exit\x20code\x20','add','2118UETxzg','Already\x20up\x20to\x20date\x20(','1296512AlIlKD','install','error','2378548RbFPBX','dryRun','Target\x20version:','upgrade','Successfully\x20upgraded\x20to\x20','326206VHSlaZ','message','latest','Latest\x20version:','close','red','@treasuredata/tdx','108wYZplk','...','execPath','Running:','next','name','log','Current\x20version:\x20','inherit','4360125KpvOMz','cyan','dim','1321635adNmHo','bun','yellow','134uzSZtS','global','npm','1498800MoupyS','replace','toLowerCase','includes'];a50_0x4bd0=function(){return _0x544a9d;};return a50_0x4bd0();}import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME=a50_0xac0600(0x178);export function detectPackageManager(){const _0x2093dc=a50_0xac0600,_0x58b343=process[_0x2093dc(0x17b)][_0x2093dc(0x15a)](),_0x14db34=process[_0x2093dc(0x15d)][0x1]??'';if(_0x58b343[_0x2093dc(0x15b)](_0x2093dc(0x186))||_0x14db34[_0x2093dc(0x15b)]('.bun/'))return'bun';if(_0x14db34[_0x2093dc(0x15b)](_0x2093dc(0x15c)))return'pnpm';if(_0x14db34['includes'](_0x2093dc(0x160)))return'yarn';return _0x2093dc(0x157);}function a50_0x5869(_0x542e53,_0x1bfe60){_0x542e53=_0x542e53-0x156;const _0x4bd07a=a50_0x4bd0();let _0x5869c6=_0x4bd07a[_0x542e53];return _0x5869c6;}export function buildInstallArgs(_0x3fb7dc,_0x20a3fc){const _0x423030=a50_0xac0600;switch(_0x3fb7dc){case'yarn':return[_0x423030(0x156),_0x423030(0x167),_0x20a3fc];case _0x423030(0x15c):return['add','-g',_0x20a3fc];default:return[_0x423030(0x16b),'-g',_0x20a3fc];}}export class UpgradeCommand extends BaseCommand{[a50_0xac0600(0x17e)]=a50_0xac0600(0x170);[a50_0xac0600(0x165)]=a50_0xac0600(0x164);async['execute'](_0x59ec01){const _0x515173=a50_0xac0600,{options:_0x5f3f79,args:_0x130fd0}=_0x59ec01,_0x90dfee=!!_0x5f3f79[_0x515173(0x16e)],{next:_0x590076,method:_0xf2c499}=_0x5f3f79,_0x2a1a82=_0x590076?'next':loadReleaseChannel(),_0x5ca5c2=_0x2a1a82===_0x515173(0x17d)?_0x515173(0x17d):_0x515173(0x174),_0x1c9a9b=_0x130fd0[0x0]?String(_0x130fd0[0x0])[_0x515173(0x159)](/^v/,''):undefined,_0x3363a3=getVersion();if(isDevVersion())return console['error'](a50_0x1a217e[_0x515173(0x187)](_0x515173(0x161))),console['error'](a50_0x1a217e[_0x515173(0x184)](_0x515173(0x180)+_0x3363a3)),0x1;let _0x3f1629;if(_0x1c9a9b)_0x3f1629=_0x1c9a9b,console['log'](a50_0x1a217e['dim'](_0x515173(0x15e))+'\x20'+_0x3363a3),console['log'](a50_0x1a217e['dim'](_0x515173(0x16f))+'\x20\x20'+a50_0x1a217e[_0x515173(0x162)](_0x1c9a9b)),console[_0x515173(0x17f)]();else{console['log'](a50_0x1a217e[_0x515173(0x184)]('Checking\x20'+PACKAGE_NAME+'@'+_0x5ca5c2+_0x515173(0x17a)));try{_0x3f1629=await fetchLatestVersion(_0x2a1a82);}catch(_0x15c2b8){return console[_0x515173(0x16c)](a50_0x1a217e[_0x515173(0x177)]('Failed\x20to\x20check\x20for\x20updates:\x20'+(_0x15c2b8 instanceof Error?_0x15c2b8[_0x515173(0x173)]:String(_0x15c2b8)))),0x1;}if(!gt(_0x3f1629,_0x3363a3))return console['log'](a50_0x1a217e[_0x515173(0x162)](_0x515173(0x169)+_0x3363a3+').')),0x0;console['log'](a50_0x1a217e[_0x515173(0x184)](_0x515173(0x15e))+'\x20'+_0x3363a3),console[_0x515173(0x17f)](a50_0x1a217e[_0x515173(0x184)](_0x515173(0x175))+'\x20\x20'+a50_0x1a217e[_0x515173(0x162)](_0x3f1629)),console[_0x515173(0x17f)]();}const _0x41d9a6=_0xf2c499??detectPackageManager(),_0x4d5b1b=_0x1c9a9b?PACKAGE_NAME+'@'+_0x1c9a9b:PACKAGE_NAME+'@'+_0x5ca5c2,_0x5b250d=buildInstallArgs(_0x41d9a6,_0x4d5b1b);if(_0x90dfee)return console[_0x515173(0x17f)](a50_0x1a217e[_0x515173(0x184)](_0x515173(0x15f))),console[_0x515173(0x17f)]('\x20\x20'+a50_0x1a217e[_0x515173(0x183)](_0x41d9a6+'\x20'+_0x5b250d[_0x515173(0x163)]('\x20'))),0x0;return console[_0x515173(0x17f)](a50_0x1a217e[_0x515173(0x184)](_0x515173(0x17c))+'\x20'+_0x41d9a6+'\x20'+_0x5b250d[_0x515173(0x163)]('\x20')),console[_0x515173(0x17f)](),new Promise(_0x25abb3=>{const _0x30ca68=_0x515173,_0x5b7553=crossSpawn(_0x41d9a6,_0x5b250d,{'stdio':_0x30ca68(0x181)});_0x5b7553['on'](_0x30ca68(0x176),_0x5eb3f9=>{const _0xcd14cd=_0x30ca68;console[_0xcd14cd(0x17f)](),_0x5eb3f9===0x0?console[_0xcd14cd(0x17f)](a50_0x1a217e[_0xcd14cd(0x162)](_0xcd14cd(0x171)+_0x4d5b1b)):console['error'](a50_0x1a217e[_0xcd14cd(0x177)](_0xcd14cd(0x166)+_0x5eb3f9+').')),_0x25abb3(_0x5eb3f9??0x1);}),_0x5b7553['on'](_0x30ca68(0x16c),_0x4e68ff=>{const _0x97dce3=_0x30ca68;console[_0x97dce3(0x16c)](a50_0x1a217e[_0x97dce3(0x177)]('Failed\x20to\x20run\x20'+_0x41d9a6+':\x20'+_0x4e68ff[_0x97dce3(0x173)])),_0x25abb3(0x1);});});}}
1
+ const a50_0x2ebe46=a50_0x38bf;(function(_0x186dca,_0x36c33d){const _0x14199e=a50_0x38bf,_0x4d1afd=_0x186dca();while(!![]){try{const _0x546317=-parseInt(_0x14199e(0x1b3))/0x1*(parseInt(_0x14199e(0x1b5))/0x2)+parseInt(_0x14199e(0x1a4))/0x3*(-parseInt(_0x14199e(0x196))/0x4)+-parseInt(_0x14199e(0x1a0))/0x5+parseInt(_0x14199e(0x1a9))/0x6+parseInt(_0x14199e(0x1a1))/0x7+parseInt(_0x14199e(0x18e))/0x8+parseInt(_0x14199e(0x1b1))/0x9*(parseInt(_0x14199e(0x18d))/0xa);if(_0x546317===_0x36c33d)break;else _0x4d1afd['push'](_0x4d1afd['shift']());}catch(_0x22ad21){_0x4d1afd['push'](_0x4d1afd['shift']());}}}(a50_0x5612,0x44aeb));import{gt}from'semver';import a50_0x16f778 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';function a50_0x38bf(_0x58f107,_0x3ba18a){_0x58f107=_0x58f107-0x188;const _0x561213=a50_0x5612();let _0x38bf83=_0x561213[_0x58f107];return _0x38bf83;}import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';function a50_0x5612(){const _0x283420=['dryRun','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','yellow','bun','72490tlaGsS','800765axMLsP','pnpm','inherit','75YpsSBK','log','global','Failed\x20to\x20run\x20','error','474012rppCKn','red','includes','name','install','Current\x20version:\x20','next','Would\x20run:','28953OeoDPh','Current\x20version:','1JrvOUh','message','1102634VAknBq','@treasuredata/tdx','yarn','latest','dim','add','Checking\x20','upgrade','460zKMWxR','4228672yRoxjP','Latest\x20version:','execPath','npm','...','Running:','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','description','3652BYAyTn','toLowerCase','join','green','Already\x20up\x20to\x20date\x20(','execute'];a50_0x5612=function(){return _0x283420;};return a50_0x5612();}const PACKAGE_NAME=a50_0x2ebe46(0x1b6);export function detectPackageManager(){const _0xe7df5f=a50_0x2ebe46,_0x4ed139=process[_0xe7df5f(0x190)][_0xe7df5f(0x197)](),_0x2a665c=process['argv'][0x1]??'';if(_0x4ed139['includes'](_0xe7df5f(0x19f))||_0x2a665c[_0xe7df5f(0x1ab)]('.bun/'))return _0xe7df5f(0x19f);if(_0x2a665c['includes'](_0xe7df5f(0x1a2)))return _0xe7df5f(0x1a2);if(_0x2a665c[_0xe7df5f(0x1ab)](_0xe7df5f(0x1b7)))return _0xe7df5f(0x1b7);return _0xe7df5f(0x191);}export function buildInstallArgs(_0x46aa43,_0x9d522a){const _0x1ee1da=a50_0x2ebe46;switch(_0x46aa43){case'yarn':return[_0x1ee1da(0x1a6),_0x1ee1da(0x18a),_0x9d522a];case _0x1ee1da(0x1a2):return['add','-g',_0x9d522a];default:return[_0x1ee1da(0x1ad),'-g',_0x9d522a];}}export class UpgradeCommand extends BaseCommand{[a50_0x2ebe46(0x1ac)]=a50_0x2ebe46(0x18c);[a50_0x2ebe46(0x195)]=a50_0x2ebe46(0x19d);async[a50_0x2ebe46(0x19b)](_0x2f701b){const _0x3e6807=a50_0x2ebe46,{options:_0x11b166,args:_0x1e1927}=_0x2f701b,_0x52eac6=!!_0x11b166[_0x3e6807(0x19c)],{next:_0x42cdd3,method:_0x2ecb37}=_0x11b166,_0x25588a=_0x42cdd3?_0x3e6807(0x1af):loadReleaseChannel(),_0xf1fe25=_0x25588a===_0x3e6807(0x1af)?'next':_0x3e6807(0x188),_0xfa326b=_0x1e1927[0x0]?String(_0x1e1927[0x0])['replace'](/^v/,''):undefined,_0xa195=getVersion();if(isDevVersion())return console[_0x3e6807(0x1a8)](a50_0x16f778[_0x3e6807(0x19e)](_0x3e6807(0x194))),console[_0x3e6807(0x1a8)](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x1ae)+_0xa195)),0x1;let _0x22eecd;if(_0xfa326b)_0x22eecd=_0xfa326b,console[_0x3e6807(0x1a5)](a50_0x16f778['dim']('Current\x20version:')+'\x20'+_0xa195),console[_0x3e6807(0x1a5)](a50_0x16f778['dim']('Target\x20version:')+'\x20\x20'+a50_0x16f778['green'](_0xfa326b)),console['log']();else{console[_0x3e6807(0x1a5)](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x18b)+PACKAGE_NAME+'@'+_0xf1fe25+_0x3e6807(0x192)));try{_0x22eecd=await fetchLatestVersion(_0x25588a);}catch(_0x3044f7){return console[_0x3e6807(0x1a8)](a50_0x16f778[_0x3e6807(0x1aa)]('Failed\x20to\x20check\x20for\x20updates:\x20'+(_0x3044f7 instanceof Error?_0x3044f7[_0x3e6807(0x1b4)]:String(_0x3044f7)))),0x1;}if(!gt(_0x22eecd,_0xa195))return console[_0x3e6807(0x1a5)](a50_0x16f778[_0x3e6807(0x199)](_0x3e6807(0x19a)+_0xa195+').')),0x0;console[_0x3e6807(0x1a5)](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x1b2))+'\x20'+_0xa195),console[_0x3e6807(0x1a5)](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x18f))+'\x20\x20'+a50_0x16f778[_0x3e6807(0x199)](_0x22eecd)),console[_0x3e6807(0x1a5)]();}const _0x4119c9=_0x2ecb37??detectPackageManager(),_0x242ba4=_0xfa326b?PACKAGE_NAME+'@'+_0xfa326b:PACKAGE_NAME+'@'+_0xf1fe25,_0xcf47a3=buildInstallArgs(_0x4119c9,_0x242ba4);if(_0x52eac6)return console['log'](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x1b0))),console[_0x3e6807(0x1a5)]('\x20\x20'+a50_0x16f778['cyan'](_0x4119c9+'\x20'+_0xcf47a3['join']('\x20'))),0x0;return console['log'](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x193))+'\x20'+_0x4119c9+'\x20'+_0xcf47a3[_0x3e6807(0x198)]('\x20')),console['log'](),new Promise(_0x57ddd1=>{const _0xfc2013=_0x3e6807,_0x1d9b0d=crossSpawn(_0x4119c9,_0xcf47a3,{'stdio':_0xfc2013(0x1a3)});_0x1d9b0d['on']('close',_0x4657bd=>{const _0x23b6e4=_0xfc2013;console[_0x23b6e4(0x1a5)](),_0x4657bd===0x0?console[_0x23b6e4(0x1a5)](a50_0x16f778[_0x23b6e4(0x199)]('Successfully\x20upgraded\x20to\x20'+_0x242ba4)):console[_0x23b6e4(0x1a8)](a50_0x16f778['red']('Upgrade\x20failed\x20(exit\x20code\x20'+_0x4657bd+').')),_0x57ddd1(_0x4657bd??0x1);}),_0x1d9b0d['on'](_0xfc2013(0x1a8),_0x19ce87=>{const _0x431677=_0xfc2013;console[_0x431677(0x1a8)](a50_0x16f778['red'](_0x431677(0x1a7)+_0x4119c9+':\x20'+_0x19ce87[_0x431677(0x1b4)])),_0x57ddd1(0x1);});});}}
@@ -1 +1 @@
1
- const a51_0x4fc9f8=a51_0x4237;(function(_0x560450,_0x4d8bee){const _0x2f1103=a51_0x4237,_0x4760ca=_0x560450();while(!![]){try{const _0xd0bb1e=parseInt(_0x2f1103(0xed))/0x1*(-parseInt(_0x2f1103(0xfe))/0x2)+-parseInt(_0x2f1103(0x10a))/0x3*(-parseInt(_0x2f1103(0xe4))/0x4)+parseInt(_0x2f1103(0x11d))/0x5+parseInt(_0x2f1103(0xf2))/0x6+parseInt(_0x2f1103(0x123))/0x7*(parseInt(_0x2f1103(0x11b))/0x8)+parseInt(_0x2f1103(0x115))/0x9*(-parseInt(_0x2f1103(0x106))/0xa)+-parseInt(_0x2f1103(0x11c))/0xb;if(_0xd0bb1e===_0x4d8bee)break;else _0x4760ca['push'](_0x4760ca['shift']());}catch(_0x567884){_0x4760ca['push'](_0x4760ca['shift']());}}}(a51_0x2cd8,0x9cb0d));import{BaseCommand}from'./command.js';function a51_0x4237(_0x59efda,_0xadcc73){_0x59efda=_0x59efda-0xdd;const _0x2cd84e=a51_0x2cd8();let _0x4237c1=_0x2cd84e[_0x59efda];return _0x4237c1;}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';function a51_0x2cd8(){const _0x42e37b=['\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','includes','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','validate','53901ycgiTB','green','join','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','log','80vzyPwo','8263035OXtPmh','3039350KJpAoE','debug','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','execute','code','102228hqrywH','cas','use','Error:\x20','Session\x20database\x20set\x20to:\x20','tdx.json','message','parent_segment','INVALID_ARGUMENT','next','engage_workspace','length','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','Session\x20agent\x20set\x20to:\x20','NOT_FOUND','clear','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','120JsEFqG','Session\x20profile\x20set\x20to:\x20','Set\x20session-level\x20context','llm_project','description','session','\x0aSaved\x20to:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','\x27\x20does\x20not\x20exist','1IlfLRj','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\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','release_channel','Session\x20llm_project\x20set\x20to:\x20','6713412gmVeeX','stable','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','Invalid\x20resource:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','cleared','Session\x20context\x20','Verifying\x20workspace\x20\x27','profile','Error:\x20Profile\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','2348910blMaqm','(session:\x20','default','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','database','error','Default\x20profile\x20set\x20to:\x20','230jtbwyB','resolveWorkspaceId','composable_audience','Session\x20engage_workspace\x20set\x20to:\x20','83238wTazfj','Session\x20composable_audience\x20set\x20to:\x20','\x27\x20to\x20save\x20permanently','displayWithSources','llm_agent','dim'];a51_0x2cd8=function(){return _0x42e37b;};return a51_0x2cd8();}import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a51_0x487bcc from'chalk';import*as a51_0x5f9cdd from'node:path';export class UseCommand extends BaseCommand{['name']=a51_0x4fc9f8(0x125);[a51_0x4fc9f8(0xe8)]=a51_0x4fc9f8(0xe6);[a51_0x4fc9f8(0x114)](_0x375f41){const _0x52f3e1=a51_0x4fc9f8,{args:_0x202a4e,options:_0x176ff9}=_0x375f41,_0xfa2160=_0x176ff9[_0x52f3e1(0x100)];if(_0x202a4e[_0x52f3e1(0xde)]===0x0)return undefined;if(_0x202a4e[_0x52f3e1(0xde)]===0x1)return _0x52f3e1(0xf7)+_0x52f3e1(0xef)+_0x52f3e1(0x120)+_0x52f3e1(0xfd)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x52f3e1(0x113)+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a'+_0x52f3e1(0x110);const _0x30bf41=_0x202a4e[0x0],_0x20b460=['site',_0x52f3e1(0x103),_0x52f3e1(0x12a),_0x52f3e1(0xe7),'agent',_0x52f3e1(0xfb),_0x52f3e1(0xdd),_0x52f3e1(0x124),_0x52f3e1(0x108),_0x52f3e1(0xf0)];if(!_0x20b460[_0x52f3e1(0x112)](_0x30bf41))return _0x52f3e1(0xf5)+_0x30bf41+'.\x20Must\x20be\x20one\x20of:\x20'+_0x20b460['join'](',\x20');if(_0xfa2160&&_0x30bf41!==_0x52f3e1(0x11f)&&_0x30bf41!==_0x52f3e1(0xfb)&&_0x30bf41!==_0x52f3e1(0xf0))return _0x52f3e1(0xee);if(_0x30bf41===_0x52f3e1(0xf0)&&!_0xfa2160)return _0x52f3e1(0xf4);if(_0x30bf41===_0x52f3e1(0xf0)){const _0x4e32d2=_0x202a4e[0x1];if(_0x4e32d2!==_0x52f3e1(0xf3)&&_0x4e32d2!==_0x52f3e1(0x12c))return'Invalid\x20release\x20channel:\x20'+_0x4e32d2+_0x52f3e1(0xeb);}return undefined;}async[a51_0x4fc9f8(0x121)](_0x1f6371){const _0x4c19da=a51_0x4fc9f8,{args:_0x500a9c,options:_0x1d90f2}=_0x1f6371,_0x2fa1b4=_0x1d90f2[_0x4c19da(0x11e)],_0x82430a=_0x1d90f2[_0x4c19da(0xe2)],_0x310c27=_0x1d90f2[_0x4c19da(0x100)];cleanExpiredSessions();try{if(_0x82430a){clearSessionContext(_0x1d90f2[_0x4c19da(0xe9)]);const _0xa4d1bd=getSessionID(_0x1d90f2[_0x4c19da(0xe9)]);return console[_0x4c19da(0x11a)](_0x4c19da(0xf9)+a51_0x487bcc['green'](_0x4c19da(0xf8))+'\x20'+a51_0x487bcc['dim']('(session:\x20'+_0xa4d1bd+')')),0x0;}if(_0x500a9c[_0x4c19da(0xde)]===0x0){const _0x3f09c2=new GlobalContext(_0x1d90f2);return _0x2fa1b4?_0x3f09c2[_0x4c19da(0x10d)]():_0x3f09c2['display'](),console[_0x4c19da(0x11a)](a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0x111))),console['log'](a51_0x487bcc['dim'](_0x4c19da(0x101))),console['log'](a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xe3))),0x0;}const _0x1ac55b=_0x500a9c[0x0],_0x20165b=_0x500a9c[0x1],_0x18e15d=a51_0x5f9cdd[_0x4c19da(0x117)](getConfigDir(),_0x4c19da(0x128));if(_0x310c27){if(_0x1ac55b==='site')return saveDefaultSiteToUserConfig(_0x20165b),console[_0x4c19da(0x11a)]('Default\x20site\x20set\x20to:\x20'+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)),console[_0x4c19da(0x11a)](a51_0x487bcc[_0x4c19da(0x10f)]('\x0aSaved\x20to:\x20'+_0x18e15d)),0x0;if(_0x1ac55b===_0x4c19da(0xfb)){if(!profileExists(_0x20165b))return console[_0x4c19da(0x104)](_0x4c19da(0xfc)+_0x20165b+_0x4c19da(0xec)),console['error'](_0x4c19da(0x119)),0x1;return saveActiveProfileToUserConfig(_0x20165b),console[_0x4c19da(0x11a)](_0x4c19da(0x105)+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)),console[_0x4c19da(0x11a)](a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xea)+_0x18e15d)),0x0;}if(_0x1ac55b===_0x4c19da(0xf0))return saveReleaseChannel(_0x20165b),console['log']('Release\x20channel\x20set\x20to:\x20'+a51_0x487bcc['green'](_0x20165b)),console[_0x4c19da(0x11a)](a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xea)+_0x18e15d)),_0x20165b==='next'?(console[_0x4c19da(0x11a)](a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0x102))),console[_0x4c19da(0x11a)](a51_0x487bcc[_0x4c19da(0x10f)]('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console[_0x4c19da(0x11a)](a51_0x487bcc['dim'](_0x4c19da(0xdf))),0x0;}if(_0x1ac55b==='site'){const _0x37ff18=getSessionID(_0x1d90f2[_0x4c19da(0xe9)]);return saveSessionContext({'site':_0x20165b},_0x1d90f2[_0x4c19da(0xe9)]),console[_0x4c19da(0x11a)]('Session\x20site\x20set\x20to:\x20'+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)+'\x20'+a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xff)+_0x37ff18+')')),console[_0x4c19da(0x11a)](a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0x118)+_0x20165b+_0x4c19da(0x10c))),0x0;}if(_0x1ac55b===_0x4c19da(0xfb)){if(!profileExists(_0x20165b))return console[_0x4c19da(0x104)](_0x4c19da(0xfc)+_0x20165b+'\x27\x20does\x20not\x20exist'),console[_0x4c19da(0x104)](_0x4c19da(0x119)),0x1;const _0x3afc01=getSessionID(_0x1d90f2[_0x4c19da(0xe9)]);return saveSessionContext({'profile':_0x20165b},_0x1d90f2['session']),console[_0x4c19da(0x11a)](_0x4c19da(0xe5)+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)+'\x20'+a51_0x487bcc[_0x4c19da(0x10f)]('(session:\x20'+_0x3afc01+')')),console[_0x4c19da(0x11a)](a51_0x487bcc['dim'](_0x4c19da(0xf6)+_0x20165b+_0x4c19da(0x10c))),0x0;}const _0x29cb23={},_0x3f93b9=getSessionID(_0x1d90f2[_0x4c19da(0xe9)]);switch(_0x1ac55b){case _0x4c19da(0x103):_0x29cb23[_0x4c19da(0x103)]=_0x20165b,console['log'](_0x4c19da(0x127)+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)+'\x20'+a51_0x487bcc['dim'](_0x4c19da(0xff)+_0x3f93b9+')'));break;case _0x4c19da(0x12a):_0x29cb23[_0x4c19da(0x12a)]=_0x20165b,console[_0x4c19da(0x11a)]('Session\x20parent_segment\x20set\x20to:\x20'+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)+'\x20'+a51_0x487bcc[_0x4c19da(0x10f)]('(session:\x20'+_0x3f93b9+')'));break;case _0x4c19da(0xe7):_0x29cb23[_0x4c19da(0xe7)]=_0x20165b,console[_0x4c19da(0x11a)](_0x4c19da(0xf1)+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)+'\x20'+a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xff)+_0x3f93b9+')'));break;case'agent':{const {projectName:_0x565571,agentName:_0x29308f}=parseAgentRef(_0x20165b);_0x29308f?(_0x29cb23[_0x4c19da(0xe7)]=_0x565571,_0x29cb23[_0x4c19da(0x10e)]=_0x29308f,console[_0x4c19da(0x11a)]('Session\x20llm_project\x20set\x20to:\x20'+a51_0x487bcc[_0x4c19da(0x116)](_0x565571)+'\x20'+a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xff)+_0x3f93b9+')')),console['log'](_0x4c19da(0xe0)+a51_0x487bcc[_0x4c19da(0x116)](_0x29308f)+'\x20'+a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xff)+_0x3f93b9+')'))):(_0x29cb23[_0x4c19da(0x10e)]=_0x20165b,console[_0x4c19da(0x11a)]('Session\x20agent\x20set\x20to:\x20'+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)+'\x20'+a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xff)+_0x3f93b9+')')));break;}case _0x4c19da(0x124):case _0x4c19da(0x108):_0x29cb23['composable_audience']=_0x20165b,console[_0x4c19da(0x11a)](_0x4c19da(0x10b)+a51_0x487bcc[_0x4c19da(0x116)](_0x20165b)+'\x20'+a51_0x487bcc[_0x4c19da(0x10f)](_0x4c19da(0xff)+_0x3f93b9+')'));break;case'engage_workspace':{try{await withSpinner(_0x4c19da(0xfa)+_0x20165b+'\x27...',()=>_0x1f6371['tdx']['engage'][_0x4c19da(0x107)](_0x20165b));}catch(_0xbe9418){if(_0xbe9418 instanceof SDKError&&(_0xbe9418[_0x4c19da(0x122)]===ErrorCode[_0x4c19da(0xe1)]||_0xbe9418[_0x4c19da(0x122)]===ErrorCode[_0x4c19da(0x12b)]))return console[_0x4c19da(0x104)](_0x4c19da(0x126)+_0xbe9418[_0x4c19da(0x129)]),console[_0x4c19da(0x104)]('\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces'),0x1;throw _0xbe9418;}_0x29cb23[_0x4c19da(0xdd)]=_0x20165b,console[_0x4c19da(0x11a)](_0x4c19da(0x109)+a51_0x487bcc['green'](_0x20165b)+'\x20'+a51_0x487bcc['dim'](_0x4c19da(0xff)+_0x3f93b9+')'));break;}}return saveSessionContext(_0x29cb23,_0x1d90f2[_0x4c19da(0xe9)]),console[_0x4c19da(0x11a)](a51_0x487bcc[_0x4c19da(0x10f)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}catch(_0x243860){return _0x243860 instanceof Error&&console[_0x4c19da(0x104)](_0x4c19da(0x126)+_0x243860['message']),0x1;}}}
1
+ function a51_0x28f9(_0x22d757,_0xfee6e0){_0x22d757=_0x22d757-0x8c;const _0x1708fc=a51_0x1708();let _0x28f9d1=_0x1708fc[_0x22d757];return _0x28f9d1;}const a51_0x54ea96=a51_0x28f9;(function(_0x38a92b,_0x134926){const _0x4297f2=a51_0x28f9,_0x225f8d=_0x38a92b();while(!![]){try{const _0x38c9a7=-parseInt(_0x4297f2(0xcc))/0x1*(-parseInt(_0x4297f2(0xc8))/0x2)+parseInt(_0x4297f2(0xd1))/0x3+parseInt(_0x4297f2(0x8e))/0x4*(-parseInt(_0x4297f2(0x9f))/0x5)+-parseInt(_0x4297f2(0xa2))/0x6+-parseInt(_0x4297f2(0x98))/0x7+-parseInt(_0x4297f2(0xd0))/0x8+parseInt(_0x4297f2(0xb4))/0x9;if(_0x38c9a7===_0x134926)break;else _0x225f8d['push'](_0x225f8d['shift']());}catch(_0x35908e){_0x225f8d['push'](_0x225f8d['shift']());}}}(a51_0x1708,0x744c7));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 a51_0x2e77e4 from'chalk';function a51_0x1708(){const _0x216f92=['Session\x20llm_project\x20set\x20to:\x20','2vuYUGk','error','database','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','811869OCziOa','llm_agent','\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','validate','6797584mDGukZ','2583828YimVXM','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','length','Session\x20context\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','green','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','Session\x20engage_workspace\x20set\x20to:\x20','Invalid\x20release\x20channel:\x20','llm_project','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','165144cNyeNu','\x27\x20to\x20save\x20permanently','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','default','code','release_channel','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','3720864QRsFNX','log','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Set\x20session-level\x20context','includes','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','\x27\x20does\x20not\x20exist','65XsWPto','Session\x20site\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','4911576VkWAbR','message','Invalid\x20resource:\x20','use','INVALID_ARGUMENT','Error:\x20','tdx.json','join','Default\x20site\x20set\x20to:\x20','(session:\x20','Session\x20parent_segment\x20set\x20to:\x20','profile','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a','Session\x20profile\x20set\x20to:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','composable_audience','site','Session\x20database\x20set\x20to:\x20','13858002uKctcV','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x0aSaved\x20to:\x20','cas','\x27...','clear','Session\x20agent\x20set\x20to:\x20','agent','execute','session','Error:\x20Profile\x20\x27','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','Default\x20profile\x20set\x20to:\x20','parent_segment','next','NOT_FOUND','engage_workspace','description','display'];a51_0x1708=function(){return _0x216f92;};return a51_0x1708();}import*as a51_0x5296fe from'node:path';export class UseCommand extends BaseCommand{['name']=a51_0x54ea96(0xa5);[a51_0x54ea96(0xc5)]=a51_0x54ea96(0x9b);[a51_0x54ea96(0xcf)](_0x7e3969){const _0x4d4049=a51_0x54ea96,{args:_0x26988c,options:_0x4a235d}=_0x7e3969,_0x5b2a19=_0x4a235d[_0x4d4049(0x91)];if(_0x26988c[_0x4d4049(0xd3)]===0x0)return undefined;if(_0x26988c['length']===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x4d4049(0xce)+_0x4d4049(0xd5)+_0x4d4049(0x95)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x4d4049(0x9d)+_0x4d4049(0xae)+_0x4d4049(0xcb);const _0x100324=_0x26988c[0x0],_0x14fe98=[_0x4d4049(0xb2),_0x4d4049(0xca),_0x4d4049(0xc1),_0x4d4049(0x8c),_0x4d4049(0xbb),_0x4d4049(0xad),'engage_workspace',_0x4d4049(0xb7),'composable_audience',_0x4d4049(0x93)];if(!_0x14fe98[_0x4d4049(0x9c)](_0x100324))return _0x4d4049(0xa4)+_0x100324+_0x4d4049(0xa1)+_0x14fe98[_0x4d4049(0xa9)](',\x20');if(_0x5b2a19&&_0x100324!==_0x4d4049(0xb2)&&_0x100324!==_0x4d4049(0xad)&&_0x100324!==_0x4d4049(0x93))return _0x4d4049(0xd8);if(_0x100324===_0x4d4049(0x93)&&!_0x5b2a19)return _0x4d4049(0xd2);if(_0x100324===_0x4d4049(0x93)){const _0x1593a1=_0x26988c[0x1];if(_0x1593a1!=='stable'&&_0x1593a1!==_0x4d4049(0xc2))return _0x4d4049(0xda)+_0x1593a1+_0x4d4049(0xb0);}return undefined;}async[a51_0x54ea96(0xbc)](_0x5b07dc){const _0x378535=a51_0x54ea96,{args:_0x13fccc,options:_0x1f2d79}=_0x5b07dc,_0x59b036=_0x1f2d79['debug'],_0x33814a=_0x1f2d79[_0x378535(0xb9)],_0x5e85eb=_0x1f2d79['default'];cleanExpiredSessions();try{if(_0x33814a){clearSessionContext(_0x1f2d79[_0x378535(0xbd)]);const _0x31fa48=getSessionID(_0x1f2d79['session']);return console[_0x378535(0x99)](_0x378535(0xd4)+a51_0x2e77e4[_0x378535(0xd7)]('cleared')+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x31fa48+')')),0x0;}if(_0x13fccc[_0x378535(0xd3)]===0x0){const _0x5945b0=new GlobalContext(_0x1f2d79);return _0x59b036?_0x5945b0['displayWithSources']():_0x5945b0[_0x378535(0xc6)](),console['log'](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x8d))),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xd6))),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x97))),0x0;}const _0x1ff20a=_0x13fccc[0x0],_0x176365=_0x13fccc[0x1],_0x3b2f9e=a51_0x5296fe[_0x378535(0xa9)](getConfigDir(),_0x378535(0xa8));if(_0x5e85eb){if(_0x1ff20a===_0x378535(0xb2))return saveDefaultSiteToUserConfig(_0x176365),console[_0x378535(0x99)](_0x378535(0xaa)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)),console[_0x378535(0x99)](a51_0x2e77e4['dim'](_0x378535(0xb6)+_0x3b2f9e)),0x0;if(_0x1ff20a==='profile'){if(!profileExists(_0x176365))return console['error']('Error:\x20Profile\x20\x27'+_0x176365+_0x378535(0x9e)),console[_0x378535(0xc9)](_0x378535(0xb5)),0x1;return saveActiveProfileToUserConfig(_0x176365),console[_0x378535(0x99)](_0x378535(0xc0)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xb6)+_0x3b2f9e)),0x0;}if(_0x1ff20a===_0x378535(0x93))return saveReleaseChannel(_0x176365),console['log']('Release\x20channel\x20set\x20to:\x20'+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)),console['log'](a51_0x2e77e4[_0x378535(0x94)]('\x0aSaved\x20to:\x20'+_0x3b2f9e)),_0x176365===_0x378535(0xc2)?(console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xbf))),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)]('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x90))),0x0;}if(_0x1ff20a===_0x378535(0xb2)){const _0x41bee5=getSessionID(_0x1f2d79[_0x378535(0xbd)]);return saveSessionContext({'site':_0x176365},_0x1f2d79['session']),console['log'](_0x378535(0xa0)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4['dim'](_0x378535(0xab)+_0x41bee5+')')),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x9a)+_0x176365+_0x378535(0x8f))),0x0;}if(_0x1ff20a===_0x378535(0xad)){if(!profileExists(_0x176365))return console['error'](_0x378535(0xbe)+_0x176365+_0x378535(0x9e)),console['error'](_0x378535(0xb5)),0x1;const _0x351c01=getSessionID(_0x1f2d79[_0x378535(0xbd)]);return saveSessionContext({'profile':_0x176365},_0x1f2d79[_0x378535(0xbd)]),console[_0x378535(0x99)](_0x378535(0xaf)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x351c01+')')),console['log'](a51_0x2e77e4[_0x378535(0x94)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x176365+_0x378535(0x8f))),0x0;}const _0x4a838a={},_0x6374b2=getSessionID(_0x1f2d79[_0x378535(0xbd)]);switch(_0x1ff20a){case'database':_0x4a838a[_0x378535(0xca)]=_0x176365,console[_0x378535(0x99)](_0x378535(0xb3)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)]('(session:\x20'+_0x6374b2+')'));break;case _0x378535(0xc1):_0x4a838a[_0x378535(0xc1)]=_0x176365,console[_0x378535(0x99)](_0x378535(0xac)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x6374b2+')'));break;case'llm_project':_0x4a838a['llm_project']=_0x176365,console[_0x378535(0x99)](_0x378535(0xc7)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x6374b2+')'));break;case _0x378535(0xbb):{const {projectName:_0x22acc6,agentName:_0xf77657}=parseAgentRef(_0x176365);_0xf77657?(_0x4a838a[_0x378535(0x8c)]=_0x22acc6,_0x4a838a[_0x378535(0xcd)]=_0xf77657,console['log'](_0x378535(0xc7)+a51_0x2e77e4[_0x378535(0xd7)](_0x22acc6)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x6374b2+')')),console[_0x378535(0x99)](_0x378535(0xba)+a51_0x2e77e4[_0x378535(0xd7)](_0xf77657)+'\x20'+a51_0x2e77e4[_0x378535(0x94)]('(session:\x20'+_0x6374b2+')'))):(_0x4a838a[_0x378535(0xcd)]=_0x176365,console[_0x378535(0x99)]('Session\x20agent\x20set\x20to:\x20'+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4['dim'](_0x378535(0xab)+_0x6374b2+')')));break;}case _0x378535(0xb7):case'composable_audience':_0x4a838a[_0x378535(0xb1)]=_0x176365,console[_0x378535(0x99)]('Session\x20composable_audience\x20set\x20to:\x20'+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x6374b2+')'));break;case'engage_workspace':{try{await withSpinner('Verifying\x20workspace\x20\x27'+_0x176365+_0x378535(0xb8),()=>_0x5b07dc['tdx']['engage']['resolveWorkspaceId'](_0x176365));}catch(_0x5124b3){if(_0x5124b3 instanceof SDKError&&(_0x5124b3[_0x378535(0x92)]===ErrorCode[_0x378535(0xc3)]||_0x5124b3[_0x378535(0x92)]===ErrorCode[_0x378535(0xa6)]))return console['error'](_0x378535(0xa7)+_0x5124b3[_0x378535(0xa3)]),console[_0x378535(0xc9)]('\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces'),0x1;throw _0x5124b3;}_0x4a838a[_0x378535(0xc4)]=_0x176365,console['log'](_0x378535(0xd9)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4['dim']('(session:\x20'+_0x6374b2+')'));break;}}return saveSessionContext(_0x4a838a,_0x1f2d79[_0x378535(0xbd)]),console['log'](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x96))),0x0;}catch(_0x3fd77b){return _0x3fd77b instanceof Error&&console['error'](_0x378535(0xa7)+_0x3fd77b[_0x378535(0xa3)]),0x1;}}}
@@ -1 +1 @@
1
- const a52_0x1cb03c=a52_0x366b;function a52_0x3851(){const _0x3084d9=['getCurrent','10024032ZDHxmu','name','496955ZVcmcQ','\x20user','\x20(admin)','\x20\x20Cause:\x20','error','Error:\x20','25080336yizCcc','Listing\x20users...','verbose','log','List\x20all\x20users\x20in\x20the\x20account','23917FMllbz','data','484407bVMNoC','account_owner','message','user\x20list','email','3900404JZjeKM','localeCompare','sort','administrator','yellow','10ivdqLx','execute','Unknown','length','2479246KadXwB','Show\x20current\x20user\x20information','description','👤\x20','user','Fetching\x20user\x20info...','cause','18yGzwBV'];a52_0x3851=function(){return _0x3084d9;};return a52_0x3851();}function a52_0x366b(_0x13bcb0,_0x2f3cc5){_0x13bcb0=_0x13bcb0-0x1f4;const _0x38513a=a52_0x3851();let _0x366bc8=_0x38513a[_0x13bcb0];return _0x366bc8;}(function(_0x17d8a0,_0x567a2b){const _0x37a4b8=a52_0x366b,_0x286491=_0x17d8a0();while(!![]){try{const _0x45dfed=parseInt(_0x37a4b8(0x218))/0x1*(-parseInt(_0x37a4b8(0x1fe))/0x2)+parseInt(_0x37a4b8(0x1f4))/0x3+-parseInt(_0x37a4b8(0x1f9))/0x4+-parseInt(_0x37a4b8(0x20d))/0x5*(parseInt(_0x37a4b8(0x209))/0x6)+parseInt(_0x37a4b8(0x202))/0x7+-parseInt(_0x37a4b8(0x20b))/0x8+parseInt(_0x37a4b8(0x213))/0x9;if(_0x45dfed===_0x567a2b)break;else _0x286491['push'](_0x286491['shift']());}catch(_0x18493c){_0x286491['push'](_0x286491['shift']());}}}(a52_0x3851,0xa0468));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import a52_0x483360 from'chalk';export class UserCommand extends BaseCommand{[a52_0x1cb03c(0x20c)]='user';[a52_0x1cb03c(0x204)]=a52_0x1cb03c(0x203);async['execute'](_0x4bb9ea){const _0x352883=a52_0x1cb03c,{options:_0x24d5d1,tdx:_0x5e6d1}=_0x4bb9ea;try{const _0x6c2cbe=await withSpinner(_0x352883(0x207),()=>_0x5e6d1[_0x352883(0x206)][_0x352883(0x20a)](),{'verbose':_0x24d5d1[_0x352883(0x215)]}),_0x371660=_0x6c2cbe[_0x352883(0x219)];return await handleSingleObjectOutput(_0x371660,_0x24d5d1),0x0;}catch(_0x5dad36){if(_0x5dad36 instanceof SDKError)return console['error'](_0x352883(0x212)+_0x5dad36[_0x352883(0x1f6)]),_0x5dad36['cause']&&console[_0x352883(0x211)]('\x20\x20Cause:\x20'+_0x5dad36[_0x352883(0x208)]),0x1;throw _0x5dad36;}}}export class UserListCommand extends BaseCommand{[a52_0x1cb03c(0x20c)]=a52_0x1cb03c(0x1f7);[a52_0x1cb03c(0x204)]=a52_0x1cb03c(0x217);async[a52_0x1cb03c(0x1ff)](_0x26e8b6){const _0x4fa76e=a52_0x1cb03c,{options:_0x2eceaf,tdx:_0x175840}=_0x26e8b6;try{const _0x1a803b=await withSpinner(_0x4fa76e(0x214),()=>_0x175840['user']['list'](),{'verbose':_0x2eceaf[_0x4fa76e(0x215)]}),_0x961f7f=_0x1a803b[_0x4fa76e(0x219)];console[_0x4fa76e(0x211)]('✔\x20Found\x20'+_0x961f7f[_0x4fa76e(0x201)]+_0x4fa76e(0x20e)+(_0x961f7f[_0x4fa76e(0x201)]!==0x1?'s':''));if(isStructuredFormat(_0x2eceaf))await handleSDKOutput(_0x961f7f,_0x2eceaf);else{const _0x1bd3e5=[..._0x961f7f][_0x4fa76e(0x1fb)]((_0xd87972,_0x263da6)=>String(_0xd87972[_0x4fa76e(0x20c)]??'')[_0x4fa76e(0x1fa)](String(_0x263da6[_0x4fa76e(0x20c)]??'')));for(const _0x269be7 of _0x1bd3e5){const _0x3c5155=_0x269be7[_0x4fa76e(0x1f5)]?a52_0x483360['yellow']('\x20(owner)'):_0x269be7[_0x4fa76e(0x1fc)]?a52_0x483360[_0x4fa76e(0x1fd)](_0x4fa76e(0x20f)):'',_0x479916=_0x269be7[_0x4fa76e(0x1f8)]&&_0x269be7[_0x4fa76e(0x1f8)]!==_0x269be7['name']?a52_0x483360['dim']('\x20<'+_0x269be7['email']+'>'):'';console[_0x4fa76e(0x216)](_0x4fa76e(0x205)+(_0x269be7[_0x4fa76e(0x20c)]??_0x4fa76e(0x200))+_0x479916+_0x3c5155);}}return 0x0;}catch(_0x1cf60c){if(_0x1cf60c instanceof SDKError)return console[_0x4fa76e(0x211)](_0x4fa76e(0x212)+_0x1cf60c[_0x4fa76e(0x1f6)]),_0x1cf60c[_0x4fa76e(0x208)]&&console['error'](_0x4fa76e(0x210)+_0x1cf60c[_0x4fa76e(0x208)]),0x1;throw _0x1cf60c;}}}
1
+ const a52_0x5ef328=a52_0x2b4e;(function(_0x28dd90,_0x394074){const _0x4abe5f=a52_0x2b4e,_0x5413c7=_0x28dd90();while(!![]){try{const _0x3f692d=-parseInt(_0x4abe5f(0x10e))/0x1+-parseInt(_0x4abe5f(0x10d))/0x2+parseInt(_0x4abe5f(0x111))/0x3+parseInt(_0x4abe5f(0x119))/0x4+-parseInt(_0x4abe5f(0x10f))/0x5*(-parseInt(_0x4abe5f(0xfd))/0x6)+parseInt(_0x4abe5f(0x113))/0x7+parseInt(_0x4abe5f(0x10b))/0x8*(-parseInt(_0x4abe5f(0xfb))/0x9);if(_0x3f692d===_0x394074)break;else _0x5413c7['push'](_0x5413c7['shift']());}catch(_0x46f453){_0x5413c7['push'](_0x5413c7['shift']());}}}(a52_0x6972,0x71b9a));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';function a52_0x6972(){const _0x1a5891=['1992PVWKSz','getCurrent','494850uAhvTL','7696LQZMhC','3184085Gycvba','Fetching\x20user\x20info...','58083OromCD','length','6226283CzGfwI','sort','list','Unknown','Show\x20current\x20user\x20information','user','499912jaYKUB','\x20(owner)','yellow','verbose','execute','message','34326flLNsB','List\x20all\x20users\x20in\x20the\x20account','6cuKWBj','Error:\x20','\x20user','localeCompare','name','dim','email','error','Listing\x20users...','data','cause','✔\x20Found\x20','description','\x20\x20Cause:\x20'];a52_0x6972=function(){return _0x1a5891;};return a52_0x6972();}import{withSpinner}from'../utils/spinner.js';import a52_0x53d555 from'chalk';function a52_0x2b4e(_0x3f6f1f,_0x1698fe){_0x3f6f1f=_0x3f6f1f-0xf6;const _0x6972f4=a52_0x6972();let _0x2b4e9a=_0x6972f4[_0x3f6f1f];return _0x2b4e9a;}export class UserCommand extends BaseCommand{[a52_0x5ef328(0x101)]=a52_0x5ef328(0x118);[a52_0x5ef328(0x109)]=a52_0x5ef328(0x117);async[a52_0x5ef328(0xf9)](_0x5996ad){const _0x3f7c66=a52_0x5ef328,{options:_0x504136,tdx:_0x2406c5}=_0x5996ad;try{const _0x2b26c0=await withSpinner(_0x3f7c66(0x110),()=>_0x2406c5[_0x3f7c66(0x118)][_0x3f7c66(0x10c)](),{'verbose':_0x504136[_0x3f7c66(0xf8)]}),_0x294615=_0x2b26c0['data'];return await handleSingleObjectOutput(_0x294615,_0x504136),0x0;}catch(_0x745955){if(_0x745955 instanceof SDKError)return console[_0x3f7c66(0x104)](_0x3f7c66(0xfe)+_0x745955[_0x3f7c66(0xfa)]),_0x745955[_0x3f7c66(0x107)]&&console[_0x3f7c66(0x104)](_0x3f7c66(0x10a)+_0x745955[_0x3f7c66(0x107)]),0x1;throw _0x745955;}}}export class UserListCommand extends BaseCommand{[a52_0x5ef328(0x101)]='user\x20list';['description']=a52_0x5ef328(0xfc);async[a52_0x5ef328(0xf9)](_0x1a9411){const _0x1d504b=a52_0x5ef328,{options:_0x4516d9,tdx:_0x1fd061}=_0x1a9411;try{const _0x2e1688=await withSpinner(_0x1d504b(0x105),()=>_0x1fd061[_0x1d504b(0x118)][_0x1d504b(0x115)](),{'verbose':_0x4516d9[_0x1d504b(0xf8)]}),_0x50dbec=_0x2e1688[_0x1d504b(0x106)];console[_0x1d504b(0x104)](_0x1d504b(0x108)+_0x50dbec[_0x1d504b(0x112)]+_0x1d504b(0xff)+(_0x50dbec[_0x1d504b(0x112)]!==0x1?'s':''));if(isStructuredFormat(_0x4516d9))await handleSDKOutput(_0x50dbec,_0x4516d9);else{const _0x4b6e47=[..._0x50dbec][_0x1d504b(0x114)]((_0x5ce0ff,_0x30f229)=>String(_0x5ce0ff[_0x1d504b(0x101)]??'')[_0x1d504b(0x100)](String(_0x30f229[_0x1d504b(0x101)]??'')));for(const _0x4121db of _0x4b6e47){const _0x1d156c=_0x4121db['account_owner']?a52_0x53d555[_0x1d504b(0xf7)](_0x1d504b(0xf6)):_0x4121db['administrator']?a52_0x53d555[_0x1d504b(0xf7)]('\x20(admin)'):'',_0x13b60b=_0x4121db[_0x1d504b(0x103)]&&_0x4121db['email']!==_0x4121db[_0x1d504b(0x101)]?a52_0x53d555[_0x1d504b(0x102)]('\x20<'+_0x4121db[_0x1d504b(0x103)]+'>'):'';console['log']('👤\x20'+(_0x4121db[_0x1d504b(0x101)]??_0x1d504b(0x116))+_0x13b60b+_0x1d156c);}}return 0x0;}catch(_0x173c82){if(_0x173c82 instanceof SDKError)return console[_0x1d504b(0x104)](_0x1d504b(0xfe)+_0x173c82[_0x1d504b(0xfa)]),_0x173c82[_0x1d504b(0x107)]&&console[_0x1d504b(0x104)](_0x1d504b(0x10a)+_0x173c82[_0x1d504b(0x107)]),0x1;throw _0x173c82;}}}
@@ -1 +1 @@
1
- const a53_0xd7eaf=a53_0x3876;(function(_0x2a3f3c,_0xbb2635){const _0x5c8588=a53_0x3876,_0x446f48=_0x2a3f3c();while(!![]){try{const _0x1aa486=parseInt(_0x5c8588(0x1e6))/0x1*(-parseInt(_0x5c8588(0x226))/0x2)+-parseInt(_0x5c8588(0x1fc))/0x3+-parseInt(_0x5c8588(0x218))/0x4*(-parseInt(_0x5c8588(0x21f))/0x5)+-parseInt(_0x5c8588(0x20d))/0x6*(-parseInt(_0x5c8588(0x217))/0x7)+parseInt(_0x5c8588(0x21a))/0x8+-parseInt(_0x5c8588(0x1f8))/0x9*(-parseInt(_0x5c8588(0x21b))/0xa)+parseInt(_0x5c8588(0x20c))/0xb*(-parseInt(_0x5c8588(0x211))/0xc);if(_0x1aa486===_0xbb2635)break;else _0x446f48['push'](_0x446f48['shift']());}catch(_0xd417a4){_0x446f48['push'](_0x446f48['shift']());}}}(a53_0x2ad6,0x6644e));import{getChalk}from'../utils/colors.js';const chalk=getChalk();import{execFileSync}from'node:child_process';import a53_0x9dfa8c from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function buildStaleFilter(_0x1f2318){const _0x19f7c2=a53_0x3876;if(_0x1f2318[_0x19f7c2(0x20a)])return{'includeStale':!![]};if(_0x1f2318[_0x19f7c2(0x1ee)])return{'updatedWithin':parseInt(_0x1f2318[_0x19f7c2(0x1ee)],0xa)};return undefined;}const VALID_KINDS=new Set([a53_0xd7eaf(0x1d0),a53_0xd7eaf(0x204),'guide','note',a53_0xd7eaf(0x1f7),a53_0xd7eaf(0x223),a53_0xd7eaf(0x1e8)]),VALID_PRIORITIES=new Set([a53_0xd7eaf(0x1da),a53_0xd7eaf(0x21e),a53_0xd7eaf(0x229),'low']),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0x56f31d=a53_0xd7eaf,_0xf24b55=resolveWorkspacePath();return!_0xf24b55&&(console[_0x56f31d(0x21d)](chalk[_0x56f31d(0x215)](_0x56f31d(0x212))+_0x56f31d(0x1db)+chalk[_0x56f31d(0x1eb)](_0x56f31d(0x1e9))+_0x56f31d(0x21c)),process[_0x56f31d(0x1fe)](0x1)),new WorkspaceSDK(_0xf24b55);}function priorityDot(_0x51b9b1){const _0xef5325=a53_0xd7eaf;switch(_0x51b9b1){case _0xef5325(0x1da):return chalk[_0xef5325(0x215)]('●');case'high':return chalk[_0xef5325(0x1cb)]('●');case _0xef5325(0x229):return chalk[_0xef5325(0x208)]('●');case _0xef5325(0x219):return chalk['gray']('●');default:return chalk['blue']('●');}}function statusColor(_0x11b105){const _0x580eda=a53_0xd7eaf;switch(_0x11b105){case _0x580eda(0x1f1):return chalk['green'](_0x11b105);case _0x580eda(0x1fd):return chalk[_0x580eda(0x1f4)](_0x11b105);case _0x580eda(0x1d3):return chalk['cyan'](_0x11b105);case _0x580eda(0x1dc):return chalk['magenta'](_0x11b105);case _0x580eda(0x1ed):case _0x580eda(0x1e4):return chalk[_0x580eda(0x1cb)](_0x11b105);case'todo':return chalk[_0x580eda(0x1d5)](_0x11b105);case'backlog':return chalk[_0x580eda(0x1d4)](_0x11b105);default:return _0x11b105;}}export async function workSummaryAction(_0x203e4b){const _0x1a81c1=a53_0xd7eaf,_0xcca874=getSDK(),_0x5837b9=buildStaleFilter(_0x203e4b),_0x27427a=_0xcca874[_0x1a81c1(0x1d9)](_0x5837b9);console[_0x1a81c1(0x1f9)](chalk[_0x1a81c1(0x1ec)](_0x1a81c1(0x1d1)+_0x27427a[_0x1a81c1(0x1df)])),console[_0x1a81c1(0x1f9)](chalk[_0x1a81c1(0x1d4)](_0x27427a[_0x1a81c1(0x1cf)])),console[_0x1a81c1(0x1f9)]();const _0x1f4aaa=Object[_0x1a81c1(0x1c8)](_0x27427a['taskCounts'])['reduce']((_0xae5bb8,_0x53abb7)=>_0xae5bb8+_0x53abb7,0x0);if(_0x1f4aaa===0x0)console['log'](chalk[_0x1a81c1(0x1d4)]('No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>'));else{console[_0x1a81c1(0x1f9)](chalk[_0x1a81c1(0x1ec)](_0x1a81c1(0x216)));for(const [_0x1cf459,_0x427484]of Object['entries'](_0x27427a[_0x1a81c1(0x1f3)])){_0x427484>0x0&&console['log']('\x20\x20'+statusColor(_0x1cf459)+':\x20'+_0x427484);}console[_0x1a81c1(0x1f9)]();}if(_0x27427a[_0x1a81c1(0x202)][_0x1a81c1(0x1dd)]>0x0){console[_0x1a81c1(0x1f9)](chalk[_0x1a81c1(0x1ec)]('Goals'));for(const _0x4159f1 of _0x27427a[_0x1a81c1(0x202)]){const _0x30af2b=progressBar(_0x4159f1['progress']);console[_0x1a81c1(0x1f9)]('\x20\x20'+_0x4159f1[_0x1a81c1(0x1de)]+'\x20'+_0x30af2b+'\x20'+_0x4159f1[_0x1a81c1(0x22f)]+'%');}}}function progressBar(_0x208e40){const _0x20012d=a53_0xd7eaf,_0x3b87e9=0x14,_0x225edd=Math[_0x20012d(0x1ce)](_0x208e40/0x64*_0x3b87e9),_0x5e6e50=_0x3b87e9-_0x225edd;return chalk[_0x20012d(0x222)]('█'[_0x20012d(0x22d)](_0x225edd))+chalk[_0x20012d(0x1d4)]('░'['repeat'](_0x5e6e50));}function a53_0x2ad6(){const _0x59cece=['workflow','map','basename','130490agGAWP','trim','\x20\x20←\x20','medium','body','flatMap','entries','repeat','Workspace\x20initialized:','progress','values','readDocument','init','yellow','Moved:','assignee','round','path','item','Workspace:\x20','initAt','in_progress','dim','white','.\x20Valid:\x20','moveTask','resolvedPath','getSummary','critical','\x20Run\x20','review','length','title','name','Document\x20not\x20found:\x20','\x20\x20(empty)','Linked\x20to\x20GitHub:\x20','resolvedKind','design_review','kind','9VgpTdR','displayText','template','tdx\x20work\x20init\x20<name>','workspacePath','cyan','bold','planning','days','No\x20outgoing\x20wiki-links','frontmatter','done','Incoming','taskCounts','gray','createDocument','join','reference','1310283uAkwPZ','log','has','Created:','785952GxLLWx','void','exit','Outgoing','Invalid\x20kind:\x20','status','goals','\x20→\x20','goal','split','getTasksByStatus','filePath','blue','\x20[[','all','getBacklinks','55QVeUQZ','6cpaMVr','Invalid\x20status:\x20','slug','underline','603852vwjmfU','No\x20workspace\x20found.','github','priority','red','Tasks','4054379Ymsqgm','408lZPyeZ','low','2014056yZJqyi','40TctJpq','\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.','error','high','5215iaJNPJ','tags','fileName','green'];a53_0x2ad6=function(){return _0x59cece;};return a53_0x2ad6();}export async function workInitAction(_0x15b077,_0x316ccd){const _0xbfd7fe=a53_0xd7eaf,_0x2e5c4e=_0x15b077||a53_0x9dfa8c[_0xbfd7fe(0x225)](process['cwd']());if(_0x316ccd[_0xbfd7fe(0x213)]){const _0x400153=WorkspaceSDK[_0xbfd7fe(0x1d2)](_0x2e5c4e,{'github':_0x316ccd[_0xbfd7fe(0x213)]});console[_0xbfd7fe(0x1f9)](chalk['green'](_0xbfd7fe(0x22e))+'\x20'+_0x400153[_0xbfd7fe(0x1ea)]),console[_0xbfd7fe(0x1f9)](chalk[_0xbfd7fe(0x1d4)](_0xbfd7fe(0x1e2)+_0x316ccd[_0xbfd7fe(0x213)]));}else{if(_0x15b077){const _0x1d5a8d=WorkspaceSDK[_0xbfd7fe(0x1d2)](_0x15b077);console[_0xbfd7fe(0x1f9)](chalk[_0xbfd7fe(0x222)]('Workspace\x20initialized:')+'\x20'+_0x1d5a8d[_0xbfd7fe(0x1ea)]);}else{const _0x1edff8=new WorkspaceSDK(process['cwd']());_0x1edff8[_0xbfd7fe(0x1ca)](_0x2e5c4e),console[_0xbfd7fe(0x1f9)](chalk[_0xbfd7fe(0x222)]('Workspace\x20initialized\x20in\x20current\x20directory'));}}}export async function workNewAction(_0x23da3a,_0x47fae6){const _0x346ba7=a53_0xd7eaf,_0x30e330=getSDK(),_0xc62ae8=_0x47fae6[_0x346ba7(0x1e5)]||_0x346ba7(0x1d0);!VALID_KINDS['has'](_0xc62ae8)&&(console[_0x346ba7(0x21d)](chalk[_0x346ba7(0x215)](_0x346ba7(0x200)+_0xc62ae8+_0x346ba7(0x1d6)+[...VALID_KINDS][_0x346ba7(0x1f6)](',\x20'))),process[_0x346ba7(0x1fe)](0x1));_0x47fae6[_0x346ba7(0x214)]&&!VALID_PRIORITIES[_0x346ba7(0x1fa)](_0x47fae6[_0x346ba7(0x214)])&&(console[_0x346ba7(0x21d)](chalk[_0x346ba7(0x215)]('Invalid\x20priority:\x20'+_0x47fae6[_0x346ba7(0x214)]+_0x346ba7(0x1d6)+[...VALID_PRIORITIES][_0x346ba7(0x1f6)](',\x20'))),process[_0x346ba7(0x1fe)](0x1));_0x47fae6[_0x346ba7(0x201)]&&!VALID_STATUSES[_0x346ba7(0x1fa)](_0x47fae6['status'])&&(console[_0x346ba7(0x21d)](chalk['red'](_0x346ba7(0x20e)+_0x47fae6['status']+'.\x20Valid:\x20'+[...VALID_STATUSES]['join'](',\x20'))),process[_0x346ba7(0x1fe)](0x1));const _0x4cbff5=_0x47fae6[_0x346ba7(0x220)]?_0x47fae6[_0x346ba7(0x220)][_0x346ba7(0x205)](',')[_0x346ba7(0x224)](_0x20d1fe=>_0x20d1fe[_0x346ba7(0x227)]()):undefined,_0xa45f93=_0x30e330[_0x346ba7(0x1f5)]({'title':_0x23da3a,'kind':_0xc62ae8,'tags':_0x4cbff5,'priority':_0x47fae6['priority'],'body':_0x47fae6[_0x346ba7(0x22a)],'template':_0x47fae6[_0x346ba7(0x1e8)],'status':_0x47fae6['status'],'assignee':_0x47fae6[_0x346ba7(0x1cd)]});console['log'](chalk['green'](_0x346ba7(0x1fb))+'\x20'+_0xa45f93['fileName']),console['log'](chalk[_0x346ba7(0x1d4)](_0xa45f93['filePath']));}export async function workMoveAction(_0x5caae9,_0x1b669d){const _0x451d25=a53_0xd7eaf;!VALID_STATUSES[_0x451d25(0x1fa)](_0x1b669d)&&(console[_0x451d25(0x21d)](chalk[_0x451d25(0x215)]('Invalid\x20status:\x20'+_0x1b669d+'.\x20Valid:\x20'+[...VALID_STATUSES][_0x451d25(0x1f6)](',\x20'))),process[_0x451d25(0x1fe)](0x1));const _0x561c8f=getSDK(),_0x5e602c=_0x561c8f[_0x451d25(0x1d7)](_0x5caae9,_0x1b669d);!_0x5e602c&&(console[_0x451d25(0x21d)](chalk[_0x451d25(0x215)](_0x451d25(0x1e0)+_0x5caae9)),process[_0x451d25(0x1fe)](0x1));const _0x7264f6=_0x5e602c['frontmatter'][_0x451d25(0x1de)]||_0x5e602c[_0x451d25(0x221)];console['log'](chalk['green'](_0x451d25(0x1cc))+('\x20'+_0x7264f6+_0x451d25(0x203)+statusColor(_0x1b669d)));}export async function workBoardAction(_0x14eab5){const _0x56794c=a53_0xd7eaf,_0x1ad4f0=getSDK(),_0x4c79f0=buildStaleFilter(_0x14eab5),{grouped:_0x376999}=_0x1ad4f0[_0x56794c(0x206)](_0x4c79f0);for(const [_0x129eed,_0x564871]of Object[_0x56794c(0x22c)](STATUS_PHASES)){const _0xff523=_0x564871[_0x56794c(0x22b)](_0x5479e9=>_0x376999[_0x5479e9]||[]);console[_0x56794c(0x1f9)](chalk[_0x56794c(0x1ec)][_0x56794c(0x210)](_0x129eed)+chalk['dim']('\x20('+_0xff523[_0x56794c(0x1dd)]+')'));if(_0xff523[_0x56794c(0x1dd)]===0x0)console[_0x56794c(0x1f9)](chalk['dim'](_0x56794c(0x1e1)));else for(const _0x275aba of _0xff523){const _0x1c6565=_0x275aba[_0x56794c(0x1f0)],_0x57e467=priorityDot(_0x1c6565[_0x56794c(0x214)]),_0x4add7e=_0x1c6565[_0x56794c(0x1de)]||_0x275aba[_0x56794c(0x221)],_0x5069b3=normalizeTags(_0x1c6565['tags']),_0x32cff2=_0x5069b3[_0x56794c(0x1dd)]?chalk[_0x56794c(0x1d4)]('\x20['+_0x5069b3['join'](',\x20')+']'):'',_0x4c708e=chalk[_0x56794c(0x1d4)]('('+_0x1c6565[_0x56794c(0x201)]+')');console['log']('\x20\x20'+_0x57e467+'\x20'+_0x4add7e+'\x20'+_0x4c708e+_0x32cff2);}console[_0x56794c(0x1f9)]();}}function a53_0x3876(_0x4611b0,_0x256ee7){_0x4611b0=_0x4611b0-0x1c8;const _0x2ad6b6=a53_0x2ad6();let _0x387601=_0x2ad6b6[_0x4611b0];return _0x387601;}export async function workShowAction(_0x5c2c79){const _0x559d3f=a53_0xd7eaf,_0x46b4c6=getSDK(),_0x103ffa=_0x46b4c6[_0x559d3f(0x1c9)](_0x5c2c79);!_0x103ffa&&(console[_0x559d3f(0x21d)](chalk[_0x559d3f(0x215)]('Document\x20not\x20found:\x20'+_0x5c2c79)),process[_0x559d3f(0x1fe)](0x1));console[_0x559d3f(0x1f9)](chalk[_0x559d3f(0x1ec)](_0x103ffa[_0x559d3f(0x1f0)][_0x559d3f(0x1de)]||_0x103ffa[_0x559d3f(0x221)])),console[_0x559d3f(0x1f9)](chalk[_0x559d3f(0x1d4)](_0x103ffa[_0x559d3f(0x207)])),console[_0x559d3f(0x1f9)]();const _0x834778=_0x103ffa['frontmatter'];for(const [_0x41fefe,_0x37e6c0]of Object[_0x559d3f(0x22c)](_0x834778)){if(_0x41fefe===_0x559d3f(0x1de))continue;if(_0x37e6c0===undefined||_0x37e6c0===null)continue;const _0x2311b=Array['isArray'](_0x37e6c0)?_0x37e6c0[_0x559d3f(0x1f6)](',\x20'):String(_0x37e6c0);console['log']('\x20\x20'+chalk['cyan'](_0x41fefe)+':\x20'+_0x2311b);}console[_0x559d3f(0x1f9)]();_0x103ffa[_0x559d3f(0x22a)]['trim']()&&(console[_0x559d3f(0x1f9)](_0x103ffa[_0x559d3f(0x22a)][_0x559d3f(0x227)]()),console['log']());const _0x2b3341=_0x46b4c6['resolveWikiLinks'](_0x103ffa['body']);if(_0x2b3341['length']>0x0){console[_0x559d3f(0x1f9)](chalk[_0x559d3f(0x1ec)]('Wiki-links'));for(const _0x2ffbd1 of _0x2b3341){const _0x3f2b65=_0x2ffbd1['resolvedPath']?chalk[_0x559d3f(0x222)]('✓'):chalk['red']('✗'),_0x115f52=_0x2ffbd1[_0x559d3f(0x1e7)]||_0x2ffbd1['slug'];console[_0x559d3f(0x1f9)]('\x20\x20'+_0x3f2b65+_0x559d3f(0x209)+_0x115f52+']]');}console[_0x559d3f(0x1f9)]();}const _0x53f258=_0x46b4c6[_0x559d3f(0x20b)](_0x103ffa[_0x559d3f(0x221)]);if(_0x53f258['length']>0x0){console[_0x559d3f(0x1f9)](chalk[_0x559d3f(0x1ec)]('Backlinks'));for(const _0x5e5957 of _0x53f258){console[_0x559d3f(0x1f9)](_0x559d3f(0x228)+_0x5e5957[_0x559d3f(0x1de)]+'\x20'+chalk[_0x559d3f(0x1d4)]('('+_0x5e5957[_0x559d3f(0x1e5)]+')'));}}}export async function workLinksAction(_0x2cc85b){const _0x5027a0=a53_0xd7eaf,_0x41a129=getSDK(),_0x427e46=_0x41a129[_0x5027a0(0x1c9)](_0x2cc85b);!_0x427e46&&(console[_0x5027a0(0x21d)](chalk[_0x5027a0(0x215)]('Document\x20not\x20found:\x20'+_0x2cc85b)),process[_0x5027a0(0x1fe)](0x1));const _0x4470e5=_0x427e46[_0x5027a0(0x1f0)][_0x5027a0(0x1de)]||_0x427e46[_0x5027a0(0x221)];console[_0x5027a0(0x1f9)](chalk[_0x5027a0(0x1ec)]('Links\x20for:\x20'+_0x4470e5)),console[_0x5027a0(0x1f9)]();const _0x4fc3bb=_0x41a129['resolveWikiLinks'](_0x427e46['body']);if(_0x4fc3bb[_0x5027a0(0x1dd)]>0x0){console['log'](chalk[_0x5027a0(0x1ec)](_0x5027a0(0x1ff)));for(const _0x22c7f1 of _0x4fc3bb){const _0x4068b8=_0x22c7f1[_0x5027a0(0x1d8)]?chalk[_0x5027a0(0x222)]('✓'):chalk['red']('✗'),_0x43c244=_0x22c7f1['displayText']||_0x22c7f1[_0x5027a0(0x20f)],_0x3bb34f=_0x22c7f1['resolvedKind']?chalk[_0x5027a0(0x1d4)]('\x20('+_0x22c7f1[_0x5027a0(0x1e3)]+')'):'';console[_0x5027a0(0x1f9)]('\x20\x20'+_0x4068b8+_0x5027a0(0x209)+_0x43c244+']]'+_0x3bb34f);}}else console['log'](chalk[_0x5027a0(0x1d4)](_0x5027a0(0x1ef)));console[_0x5027a0(0x1f9)]();const _0x5b1577=_0x41a129[_0x5027a0(0x20b)](_0x427e46[_0x5027a0(0x221)]);if(_0x5b1577['length']>0x0){console[_0x5027a0(0x1f9)](chalk[_0x5027a0(0x1ec)](_0x5027a0(0x1f2)));for(const _0x4f2617 of _0x5b1577){console[_0x5027a0(0x1f9)]('\x20\x20←\x20'+_0x4f2617[_0x5027a0(0x1de)]+'\x20'+chalk[_0x5027a0(0x1d4)]('('+_0x4f2617[_0x5027a0(0x1e5)]+')'));}}else console['log'](chalk[_0x5027a0(0x1d4)]('No\x20incoming\x20backlinks'));}export async function workOpenAction(_0x587eef){const _0x2854c3=a53_0xd7eaf,_0x3ab9e8=getSDK(),_0x3572e4=_0x3ab9e8[_0x2854c3(0x1c9)](_0x587eef);!_0x3572e4&&(console[_0x2854c3(0x21d)](chalk[_0x2854c3(0x215)](_0x2854c3(0x1e0)+_0x587eef)),process[_0x2854c3(0x1fe)](0x1));const _0xf88159=process.env.EDITOR||'vi';try{execFileSync(_0xf88159,[_0x3572e4[_0x2854c3(0x207)]],{'stdio':'inherit'});}catch{console[_0x2854c3(0x21d)](chalk['red']('Failed\x20to\x20open\x20editor:\x20'+_0xf88159)),process['exit'](0x1);}}
1
+ const a53_0x9211f3=a53_0x59d5;(function(_0x44e7cb,_0x300cff){const _0x126b6f=a53_0x59d5,_0x12adf1=_0x44e7cb();while(!![]){try{const _0x1f8af5=parseInt(_0x126b6f(0xf5))/0x1*(-parseInt(_0x126b6f(0xc0))/0x2)+-parseInt(_0x126b6f(0xff))/0x3+-parseInt(_0x126b6f(0xb9))/0x4*(parseInt(_0x126b6f(0xc2))/0x5)+parseInt(_0x126b6f(0xc9))/0x6+-parseInt(_0x126b6f(0x105))/0x7+-parseInt(_0x126b6f(0xf6))/0x8+parseInt(_0x126b6f(0xfa))/0x9*(parseInt(_0x126b6f(0xe4))/0xa);if(_0x1f8af5===_0x300cff)break;else _0x12adf1['push'](_0x12adf1['shift']());}catch(_0x4ed701){_0x12adf1['push'](_0x12adf1['shift']());}}}(a53_0x2bfe,0x5166b));import{getChalk}from'../utils/colors.js';const chalk=getChalk();import{execFileSync}from'node:child_process';import a53_0x5f1361 from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';function a53_0x59d5(_0x418758,_0x1b8f20){_0x418758=_0x418758-0xaf;const _0x2bfe9c=a53_0x2bfe();let _0x59d5d5=_0x2bfe9c[_0x418758];return _0x59d5d5;}import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function buildStaleFilter(_0x522dd3){const _0x446e8d=a53_0x59d5;if(_0x522dd3[_0x446e8d(0x113)])return{'includeStale':!![]};if(_0x522dd3[_0x446e8d(0xdb)])return{'updatedWithin':parseInt(_0x522dd3[_0x446e8d(0xdb)],0xa)};return undefined;}const VALID_KINDS=new Set([a53_0x9211f3(0xe0),a53_0x9211f3(0x10c),a53_0x9211f3(0xd0),a53_0x9211f3(0xfd),a53_0x9211f3(0x114),'workflow',a53_0x9211f3(0x103)]),VALID_PRIORITIES=new Set([a53_0x9211f3(0xc7),a53_0x9211f3(0xd6),a53_0x9211f3(0xe7),'low']),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0x51b655=a53_0x9211f3,_0x2f1052=resolveWorkspacePath();return!_0x2f1052&&(console['error'](chalk[_0x51b655(0xf0)](_0x51b655(0xee))+_0x51b655(0xcd)+chalk['cyan'](_0x51b655(0xb1))+_0x51b655(0xe3)),process[_0x51b655(0xbc)](0x1)),new WorkspaceSDK(_0x2f1052);}function a53_0x2bfe(){const _0x50ca74=['No\x20outgoing\x20wiki-links','225990OYprGR','has','Created:','yellow','template','moveTask','1445465VPTHQh','split','fileName','Failed\x20to\x20open\x20editor:\x20','isArray','taskCounts','body','goal','title','low','slug','No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>','entries','join','all','reference','blue','Invalid\x20status:\x20','Workspace\x20initialized\x20in\x20current\x20directory','Wiki-links','Invalid\x20priority:\x20','void','tdx\x20work\x20init\x20<name>','getBacklinks','flatMap','magenta','\x20\x20←\x20','readDocument','workspacePath','green','12WTCDPR','gray','filePath','exit','resolvedKind','map','github','2MONLUu','Outgoing','977035LSQYdO','resolvedPath','round','\x20[[','todo','critical','goals','41742pfqiWw','Document\x20not\x20found:\x20','cwd','No\x20incoming\x20backlinks','\x20Run\x20','error','values','guide','repeat','getTasksByStatus','\x20\x20(empty)','Workspace\x20initialized:','dim','high','displayText','Backlinks','Linked\x20to\x20GitHub:\x20','reduce','days','Incoming','bold','frontmatter','in_progress','item','\x20→\x20','Moved:','\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.','276670uHXVnC','Invalid\x20kind:\x20','log','medium','status','initAt','trim','progress','.\x20Valid:\x20','length','No\x20workspace\x20found.','Goals','red','design_review','backlog','inherit','white','103612FiYNiQ','3116536OiAIVx','cyan','tags','kind','549DRoHGZ','getSummary','priority','note'];a53_0x2bfe=function(){return _0x50ca74;};return a53_0x2bfe();}function priorityDot(_0x2e46a8){const _0x402c54=a53_0x9211f3;switch(_0x2e46a8){case _0x402c54(0xc7):return chalk[_0x402c54(0xf0)]('●');case'high':return chalk[_0x402c54(0x102)]('●');case'medium':return chalk[_0x402c54(0x115)]('●');case _0x402c54(0x10e):return chalk['gray']('●');default:return chalk[_0x402c54(0x115)]('●');}}function statusColor(_0x4381e5){const _0x5019a4=a53_0x9211f3;switch(_0x4381e5){case'done':return chalk[_0x5019a4(0xb8)](_0x4381e5);case _0x5019a4(0xb0):return chalk[_0x5019a4(0xba)](_0x4381e5);case _0x5019a4(0xdf):return chalk[_0x5019a4(0xf7)](_0x4381e5);case'review':return chalk[_0x5019a4(0xb4)](_0x4381e5);case'planning':case _0x5019a4(0xf1):return chalk[_0x5019a4(0x102)](_0x4381e5);case _0x5019a4(0xc6):return chalk[_0x5019a4(0xf4)](_0x4381e5);case _0x5019a4(0xf2):return chalk[_0x5019a4(0xd5)](_0x4381e5);default:return _0x4381e5;}}export async function workSummaryAction(_0x4d0307){const _0x40b85b=a53_0x9211f3,_0x44e0c2=getSDK(),_0x2f6f48=buildStaleFilter(_0x4d0307),_0x3e1b65=_0x44e0c2[_0x40b85b(0xfb)](_0x2f6f48);console[_0x40b85b(0xe6)](chalk[_0x40b85b(0xdd)]('Workspace:\x20'+_0x3e1b65['name'])),console[_0x40b85b(0xe6)](chalk['dim'](_0x3e1b65['path'])),console[_0x40b85b(0xe6)]();const _0xf2eb41=Object[_0x40b85b(0xcf)](_0x3e1b65[_0x40b85b(0x10a)])[_0x40b85b(0xda)]((_0x407e26,_0x427dbe)=>_0x407e26+_0x427dbe,0x0);if(_0xf2eb41===0x0)console[_0x40b85b(0xe6)](chalk['dim'](_0x40b85b(0x110)));else{console[_0x40b85b(0xe6)](chalk[_0x40b85b(0xdd)]('Tasks'));for(const [_0x589f2d,_0x1a448e]of Object[_0x40b85b(0x111)](_0x3e1b65[_0x40b85b(0x10a)])){_0x1a448e>0x0&&console[_0x40b85b(0xe6)]('\x20\x20'+statusColor(_0x589f2d)+':\x20'+_0x1a448e);}console['log']();}if(_0x3e1b65[_0x40b85b(0xc8)][_0x40b85b(0xed)]>0x0){console[_0x40b85b(0xe6)](chalk[_0x40b85b(0xdd)](_0x40b85b(0xef)));for(const _0x91effb of _0x3e1b65[_0x40b85b(0xc8)]){const _0x25f86a=progressBar(_0x91effb['progress']);console[_0x40b85b(0xe6)]('\x20\x20'+_0x91effb[_0x40b85b(0x10d)]+'\x20'+_0x25f86a+'\x20'+_0x91effb[_0x40b85b(0xeb)]+'%');}}}function progressBar(_0x2cb6e8){const _0x354be6=a53_0x9211f3,_0x23b65c=0x14,_0xb31bb4=Math[_0x354be6(0xc4)](_0x2cb6e8/0x64*_0x23b65c),_0x4811f9=_0x23b65c-_0xb31bb4;return chalk['green']('█'[_0x354be6(0xd1)](_0xb31bb4))+chalk[_0x354be6(0xd5)]('░'[_0x354be6(0xd1)](_0x4811f9));}export async function workInitAction(_0x242655,_0x433825){const _0x1af539=a53_0x9211f3,_0x53a2a4=_0x242655||a53_0x5f1361['basename'](process[_0x1af539(0xcb)]());if(_0x433825[_0x1af539(0xbf)]){const _0xf9f5a6=WorkspaceSDK[_0x1af539(0xe9)](_0x53a2a4,{'github':_0x433825[_0x1af539(0xbf)]});console['log'](chalk[_0x1af539(0xb8)](_0x1af539(0xd4))+'\x20'+_0xf9f5a6[_0x1af539(0xb7)]),console[_0x1af539(0xe6)](chalk[_0x1af539(0xd5)](_0x1af539(0xd9)+_0x433825[_0x1af539(0xbf)]));}else{if(_0x242655){const _0x326b95=WorkspaceSDK[_0x1af539(0xe9)](_0x242655);console[_0x1af539(0xe6)](chalk[_0x1af539(0xb8)](_0x1af539(0xd4))+'\x20'+_0x326b95[_0x1af539(0xb7)]);}else{const _0x46691c=new WorkspaceSDK(process[_0x1af539(0xcb)]());_0x46691c['init'](_0x53a2a4),console[_0x1af539(0xe6)](chalk['green'](_0x1af539(0x117)));}}}export async function workNewAction(_0x53ec3b,_0xef9cc){const _0x341f79=a53_0x9211f3,_0x26f92d=getSDK(),_0x1fde97=_0xef9cc[_0x341f79(0xf9)]||_0x341f79(0xe0);!VALID_KINDS[_0x341f79(0x100)](_0x1fde97)&&(console['error'](chalk[_0x341f79(0xf0)](_0x341f79(0xe5)+_0x1fde97+_0x341f79(0xec)+[...VALID_KINDS][_0x341f79(0x112)](',\x20'))),process['exit'](0x1));_0xef9cc[_0x341f79(0xfc)]&&!VALID_PRIORITIES[_0x341f79(0x100)](_0xef9cc[_0x341f79(0xfc)])&&(console[_0x341f79(0xce)](chalk[_0x341f79(0xf0)](_0x341f79(0xaf)+_0xef9cc[_0x341f79(0xfc)]+'.\x20Valid:\x20'+[...VALID_PRIORITIES][_0x341f79(0x112)](',\x20'))),process[_0x341f79(0xbc)](0x1));_0xef9cc['status']&&!VALID_STATUSES[_0x341f79(0x100)](_0xef9cc[_0x341f79(0xe8)])&&(console[_0x341f79(0xce)](chalk['red'](_0x341f79(0x116)+_0xef9cc[_0x341f79(0xe8)]+_0x341f79(0xec)+[...VALID_STATUSES][_0x341f79(0x112)](',\x20'))),process[_0x341f79(0xbc)](0x1));const _0x4121e8=_0xef9cc[_0x341f79(0xf8)]?_0xef9cc[_0x341f79(0xf8)][_0x341f79(0x106)](',')[_0x341f79(0xbe)](_0x1aefc2=>_0x1aefc2[_0x341f79(0xea)]()):undefined,_0x1ecca4=_0x26f92d['createDocument']({'title':_0x53ec3b,'kind':_0x1fde97,'tags':_0x4121e8,'priority':_0xef9cc[_0x341f79(0xfc)],'body':_0xef9cc['body'],'template':_0xef9cc[_0x341f79(0x103)],'status':_0xef9cc[_0x341f79(0xe8)],'assignee':_0xef9cc['assignee']});console['log'](chalk['green'](_0x341f79(0x101))+'\x20'+_0x1ecca4[_0x341f79(0x107)]),console[_0x341f79(0xe6)](chalk[_0x341f79(0xd5)](_0x1ecca4[_0x341f79(0xbb)]));}export async function workMoveAction(_0x191883,_0x338bf5){const _0x2270ed=a53_0x9211f3;!VALID_STATUSES[_0x2270ed(0x100)](_0x338bf5)&&(console[_0x2270ed(0xce)](chalk[_0x2270ed(0xf0)]('Invalid\x20status:\x20'+_0x338bf5+'.\x20Valid:\x20'+[...VALID_STATUSES][_0x2270ed(0x112)](',\x20'))),process[_0x2270ed(0xbc)](0x1));const _0x3db2c6=getSDK(),_0x23b1cd=_0x3db2c6[_0x2270ed(0x104)](_0x191883,_0x338bf5);!_0x23b1cd&&(console[_0x2270ed(0xce)](chalk['red']('Document\x20not\x20found:\x20'+_0x191883)),process['exit'](0x1));const _0x87151c=_0x23b1cd[_0x2270ed(0xde)][_0x2270ed(0x10d)]||_0x23b1cd['fileName'];console[_0x2270ed(0xe6)](chalk[_0x2270ed(0xb8)](_0x2270ed(0xe2))+('\x20'+_0x87151c+_0x2270ed(0xe1)+statusColor(_0x338bf5)));}export async function workBoardAction(_0x5a82a6){const _0x356918=a53_0x9211f3,_0x45ca6d=getSDK(),_0x534cd7=buildStaleFilter(_0x5a82a6),{grouped:_0x83a4e}=_0x45ca6d[_0x356918(0xd2)](_0x534cd7);for(const [_0x173ce4,_0x291561]of Object['entries'](STATUS_PHASES)){const _0x4241cd=_0x291561[_0x356918(0xb3)](_0x7c2bd9=>_0x83a4e[_0x7c2bd9]||[]);console[_0x356918(0xe6)](chalk['bold']['underline'](_0x173ce4)+chalk['dim']('\x20('+_0x4241cd[_0x356918(0xed)]+')'));if(_0x4241cd['length']===0x0)console['log'](chalk[_0x356918(0xd5)](_0x356918(0xd3)));else for(const _0x1063b2 of _0x4241cd){const _0x1b31b3=_0x1063b2[_0x356918(0xde)],_0x13e8dd=priorityDot(_0x1b31b3[_0x356918(0xfc)]),_0x5cd7b6=_0x1b31b3[_0x356918(0x10d)]||_0x1063b2[_0x356918(0x107)],_0x30ee52=normalizeTags(_0x1b31b3[_0x356918(0xf8)]),_0x8d8480=_0x30ee52[_0x356918(0xed)]?chalk[_0x356918(0xd5)]('\x20['+_0x30ee52[_0x356918(0x112)](',\x20')+']'):'',_0x17ca86=chalk[_0x356918(0xd5)]('('+_0x1b31b3['status']+')');console[_0x356918(0xe6)]('\x20\x20'+_0x13e8dd+'\x20'+_0x5cd7b6+'\x20'+_0x17ca86+_0x8d8480);}console[_0x356918(0xe6)]();}}export async function workShowAction(_0x23535b){const _0x2bc918=a53_0x9211f3,_0x4b3d40=getSDK(),_0x3f0fe4=_0x4b3d40[_0x2bc918(0xb6)](_0x23535b);!_0x3f0fe4&&(console[_0x2bc918(0xce)](chalk[_0x2bc918(0xf0)]('Document\x20not\x20found:\x20'+_0x23535b)),process['exit'](0x1));console[_0x2bc918(0xe6)](chalk[_0x2bc918(0xdd)](_0x3f0fe4['frontmatter'][_0x2bc918(0x10d)]||_0x3f0fe4['fileName'])),console[_0x2bc918(0xe6)](chalk[_0x2bc918(0xd5)](_0x3f0fe4['filePath'])),console[_0x2bc918(0xe6)]();const _0x3863e6=_0x3f0fe4['frontmatter'];for(const [_0x2563da,_0xb4e61d]of Object[_0x2bc918(0x111)](_0x3863e6)){if(_0x2563da===_0x2bc918(0x10d))continue;if(_0xb4e61d===undefined||_0xb4e61d===null)continue;const _0x1b7283=Array[_0x2bc918(0x109)](_0xb4e61d)?_0xb4e61d[_0x2bc918(0x112)](',\x20'):String(_0xb4e61d);console[_0x2bc918(0xe6)]('\x20\x20'+chalk[_0x2bc918(0xf7)](_0x2563da)+':\x20'+_0x1b7283);}console['log']();_0x3f0fe4[_0x2bc918(0x10b)]['trim']()&&(console[_0x2bc918(0xe6)](_0x3f0fe4['body'][_0x2bc918(0xea)]()),console['log']());const _0x26025e=_0x4b3d40['resolveWikiLinks'](_0x3f0fe4[_0x2bc918(0x10b)]);if(_0x26025e[_0x2bc918(0xed)]>0x0){console[_0x2bc918(0xe6)](chalk['bold'](_0x2bc918(0x118)));for(const _0x1124b5 of _0x26025e){const _0x55c882=_0x1124b5[_0x2bc918(0xc3)]?chalk['green']('✓'):chalk[_0x2bc918(0xf0)]('✗'),_0x1111d8=_0x1124b5[_0x2bc918(0xd7)]||_0x1124b5[_0x2bc918(0x10f)];console[_0x2bc918(0xe6)]('\x20\x20'+_0x55c882+'\x20[['+_0x1111d8+']]');}console[_0x2bc918(0xe6)]();}const _0x52da41=_0x4b3d40[_0x2bc918(0xb2)](_0x3f0fe4[_0x2bc918(0x107)]);if(_0x52da41[_0x2bc918(0xed)]>0x0){console[_0x2bc918(0xe6)](chalk[_0x2bc918(0xdd)](_0x2bc918(0xd8)));for(const _0x2f9bc3 of _0x52da41){console['log'](_0x2bc918(0xb5)+_0x2f9bc3['title']+'\x20'+chalk[_0x2bc918(0xd5)]('('+_0x2f9bc3[_0x2bc918(0xf9)]+')'));}}}export async function workLinksAction(_0x3d532e){const _0x5e3905=a53_0x9211f3,_0x451da3=getSDK(),_0x2351cf=_0x451da3[_0x5e3905(0xb6)](_0x3d532e);!_0x2351cf&&(console[_0x5e3905(0xce)](chalk[_0x5e3905(0xf0)]('Document\x20not\x20found:\x20'+_0x3d532e)),process['exit'](0x1));const _0x287c73=_0x2351cf[_0x5e3905(0xde)]['title']||_0x2351cf[_0x5e3905(0x107)];console[_0x5e3905(0xe6)](chalk[_0x5e3905(0xdd)]('Links\x20for:\x20'+_0x287c73)),console[_0x5e3905(0xe6)]();const _0x3aba09=_0x451da3['resolveWikiLinks'](_0x2351cf['body']);if(_0x3aba09[_0x5e3905(0xed)]>0x0){console[_0x5e3905(0xe6)](chalk[_0x5e3905(0xdd)](_0x5e3905(0xc1)));for(const _0x224973 of _0x3aba09){const _0x45074b=_0x224973[_0x5e3905(0xc3)]?chalk[_0x5e3905(0xb8)]('✓'):chalk[_0x5e3905(0xf0)]('✗'),_0x4975b3=_0x224973['displayText']||_0x224973[_0x5e3905(0x10f)],_0x4fd4bd=_0x224973['resolvedKind']?chalk[_0x5e3905(0xd5)]('\x20('+_0x224973[_0x5e3905(0xbd)]+')'):'';console[_0x5e3905(0xe6)]('\x20\x20'+_0x45074b+_0x5e3905(0xc5)+_0x4975b3+']]'+_0x4fd4bd);}}else console[_0x5e3905(0xe6)](chalk['dim'](_0x5e3905(0xfe)));console[_0x5e3905(0xe6)]();const _0x12b0eb=_0x451da3['getBacklinks'](_0x2351cf['fileName']);if(_0x12b0eb[_0x5e3905(0xed)]>0x0){console['log'](chalk[_0x5e3905(0xdd)](_0x5e3905(0xdc)));for(const _0x265bf4 of _0x12b0eb){console[_0x5e3905(0xe6)](_0x5e3905(0xb5)+_0x265bf4[_0x5e3905(0x10d)]+'\x20'+chalk[_0x5e3905(0xd5)]('('+_0x265bf4[_0x5e3905(0xf9)]+')'));}}else console[_0x5e3905(0xe6)](chalk[_0x5e3905(0xd5)](_0x5e3905(0xcc)));}export async function workOpenAction(_0x24f9e1){const _0x2b3bae=a53_0x9211f3,_0x4311f8=getSDK(),_0x1b7bd8=_0x4311f8[_0x2b3bae(0xb6)](_0x24f9e1);!_0x1b7bd8&&(console[_0x2b3bae(0xce)](chalk['red'](_0x2b3bae(0xca)+_0x24f9e1)),process[_0x2b3bae(0xbc)](0x1));const _0xf94e95=process.env.EDITOR||'vi';try{execFileSync(_0xf94e95,[_0x1b7bd8[_0x2b3bae(0xbb)]],{'stdio':_0x2b3bae(0xf3)});}catch{console['error'](chalk['red'](_0x2b3bae(0x108)+_0xf94e95)),process[_0x2b3bae(0xbc)](0x1);}}