@treasuredata/tdx 2026.8.7 → 2026.9.1

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 (416) hide show
  1. package/README.md +2 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli-categories.d.ts +1 -1
  5. package/dist/cli-categories.js +1 -1
  6. package/dist/cli-categories.js.map +1 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/activations.js +1 -1
  11. package/dist/commands/agent-command.js +1 -1
  12. package/dist/commands/agent-test-command.js +1 -1
  13. package/dist/commands/ai-usage-command-base.d.ts +26 -0
  14. package/dist/commands/ai-usage-command-base.d.ts.map +1 -0
  15. package/dist/commands/ai-usage-command-base.js +1 -0
  16. package/dist/commands/ai-usage-command-base.js.map +1 -0
  17. package/dist/commands/api-command.js +1 -1
  18. package/dist/commands/auth-command.js +1 -1
  19. package/dist/commands/cas-command.js +1 -1
  20. package/dist/commands/cas-segment-command.js +1 -1
  21. package/dist/commands/chat-command.js +1 -1
  22. package/dist/commands/claude-command.d.ts +60 -3
  23. package/dist/commands/claude-command.d.ts.map +1 -1
  24. package/dist/commands/claude-command.js +1 -1
  25. package/dist/commands/claude-command.js.map +1 -1
  26. package/dist/commands/claude-statusline-command.js +1 -1
  27. package/dist/commands/claude-usage-command.d.ts +4 -7
  28. package/dist/commands/claude-usage-command.d.ts.map +1 -1
  29. package/dist/commands/claude-usage-command.js +1 -1
  30. package/dist/commands/claude-usage-command.js.map +1 -1
  31. package/dist/commands/codex-command.js +1 -1
  32. package/dist/commands/command.js +1 -1
  33. package/dist/commands/connection-command.js +1 -1
  34. package/dist/commands/databases.js +1 -1
  35. package/dist/commands/delivery-command.js +1 -1
  36. package/dist/commands/describe.js +1 -1
  37. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  38. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  39. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  40. package/dist/commands/engage-campaign-pull-command.js +1 -1
  41. package/dist/commands/engage-campaign-push-command.js +1 -1
  42. package/dist/commands/engage-campaign-validate-command.js +1 -1
  43. package/dist/commands/engage-command.d.ts +48 -0
  44. package/dist/commands/engage-command.d.ts.map +1 -1
  45. package/dist/commands/engage-command.js +1 -1
  46. package/dist/commands/engage-command.js.map +1 -1
  47. package/dist/commands/engage-in-browser-message-command.d.ts +33 -0
  48. package/dist/commands/engage-in-browser-message-command.d.ts.map +1 -0
  49. package/dist/commands/engage-in-browser-message-command.js +1 -0
  50. package/dist/commands/engage-in-browser-message-command.js.map +1 -0
  51. package/dist/commands/engage-landing-page-command.d.ts +48 -0
  52. package/dist/commands/engage-landing-page-command.d.ts.map +1 -0
  53. package/dist/commands/engage-landing-page-command.js +1 -0
  54. package/dist/commands/engage-landing-page-command.js.map +1 -0
  55. package/dist/commands/engage-template-pull-command.js +1 -1
  56. package/dist/commands/engage-template-push-command.js +1 -1
  57. package/dist/commands/engage-template-validate-command.js +1 -1
  58. package/dist/commands/job-command.js +1 -1
  59. package/dist/commands/journey-command.d.ts.map +1 -1
  60. package/dist/commands/journey-command.js +1 -1
  61. package/dist/commands/journey-command.js.map +1 -1
  62. package/dist/commands/journey-validate-command.js +1 -1
  63. package/dist/commands/llm-command.js +1 -1
  64. package/dist/commands/mcp-command.js +1 -1
  65. package/dist/commands/opencode-command.d.ts +18 -0
  66. package/dist/commands/opencode-command.d.ts.map +1 -0
  67. package/dist/commands/opencode-command.js +1 -0
  68. package/dist/commands/opencode-command.js.map +1 -0
  69. package/dist/commands/opencode-usage-command.d.ts +19 -0
  70. package/dist/commands/opencode-usage-command.d.ts.map +1 -0
  71. package/dist/commands/opencode-usage-command.js +1 -0
  72. package/dist/commands/opencode-usage-command.js.map +1 -0
  73. package/dist/commands/p13n-command.d.ts +36 -0
  74. package/dist/commands/p13n-command.d.ts.map +1 -1
  75. package/dist/commands/p13n-command.js +1 -1
  76. package/dist/commands/p13n-command.js.map +1 -1
  77. package/dist/commands/parent-segment-command.d.ts.map +1 -1
  78. package/dist/commands/parent-segment-command.js +1 -1
  79. package/dist/commands/parent-segment-command.js.map +1 -1
  80. package/dist/commands/policy-command.js +1 -1
  81. package/dist/commands/profile-command.js +1 -1
  82. package/dist/commands/profiles-command.js +1 -1
  83. package/dist/commands/query-command.js +1 -1
  84. package/dist/commands/schedule-command.js +1 -1
  85. package/dist/commands/segment-command.js +1 -1
  86. package/dist/commands/segment-create-command.js +1 -1
  87. package/dist/commands/segment-fields-command.js +1 -1
  88. package/dist/commands/segment-move-command.js +1 -1
  89. package/dist/commands/segment-pull-command.js +1 -1
  90. package/dist/commands/segment-push-command.js +1 -1
  91. package/dist/commands/segment-update-command.js +1 -1
  92. package/dist/commands/segment-use-command.js +1 -1
  93. package/dist/commands/segment-validate-command.js +1 -1
  94. package/dist/commands/segments.js +1 -1
  95. package/dist/commands/show.js +1 -1
  96. package/dist/commands/status-command.js +1 -1
  97. package/dist/commands/table-deleted.js +1 -1
  98. package/dist/commands/tables.js +1 -1
  99. package/dist/commands/unset-command.js +1 -1
  100. package/dist/commands/upgrade-command.js +1 -1
  101. package/dist/commands/use-command.js +1 -1
  102. package/dist/commands/user-command.js +1 -1
  103. package/dist/commands/work-command.js +1 -1
  104. package/dist/commands/workflow-command.js +1 -1
  105. package/dist/core/auth.js +1 -1
  106. package/dist/core/command-output.js +1 -1
  107. package/dist/core/config.js +1 -1
  108. package/dist/core/connection-cache.js +1 -1
  109. package/dist/core/constants.js +1 -1
  110. package/dist/core/credential-cache.js +1 -1
  111. package/dist/core/global-context.js +1 -1
  112. package/dist/core/keychain.js +1 -1
  113. package/dist/core/oauth-keychain.js +1 -1
  114. package/dist/core/oauth.js +1 -1
  115. package/dist/core/profile.js +1 -1
  116. package/dist/core/project-config.js +1 -1
  117. package/dist/core/session.js +1 -1
  118. package/dist/core/site-mismatch.js +1 -1
  119. package/dist/core/user-cache.js +1 -1
  120. package/dist/core/version.js +1 -1
  121. package/dist/index.js +1 -1
  122. package/dist/mcp/server.js +1 -1
  123. package/dist/mcp/tools/index.js +1 -1
  124. package/dist/mcp/tools/tdx-run.d.ts +28 -0
  125. package/dist/mcp/tools/tdx-run.d.ts.map +1 -1
  126. package/dist/mcp/tools/tdx-run.js +1 -1
  127. package/dist/mcp/tools/tdx-run.js.map +1 -1
  128. package/dist/mcp/tools/tdx-search.js +1 -1
  129. package/dist/mcp/tools/work-create-item.js +1 -1
  130. package/dist/mcp/utils.js +1 -1
  131. package/dist/proxy/claude-usage-tracker.d.ts +1 -1
  132. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  133. package/dist/proxy/claude-usage-tracker.js +1 -1
  134. package/dist/proxy/passthrough-server.d.ts +33 -0
  135. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  136. package/dist/proxy/passthrough-server.js +1 -1
  137. package/dist/proxy/passthrough-server.js.map +1 -1
  138. package/dist/proxy/sse-usage-parser.js +1 -1
  139. package/dist/sdk/agent/agent-config.js +1 -1
  140. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  141. package/dist/sdk/agent/agent-yaml.js +1 -1
  142. package/dist/sdk/agent/test/evaluator.js +1 -1
  143. package/dist/sdk/agent/test/executor.js +1 -1
  144. package/dist/sdk/agent/test/index.js +1 -1
  145. package/dist/sdk/agent/test/output.js +1 -1
  146. package/dist/sdk/agent/test/parser.js +1 -1
  147. package/dist/sdk/agent/tool-target-registry.js +1 -1
  148. package/dist/sdk/api.js +1 -1
  149. package/dist/sdk/auth-token.js +1 -1
  150. package/dist/sdk/cas/cas-api-client.d.ts +27 -0
  151. package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
  152. package/dist/sdk/cas/cas-api-client.js +1 -1
  153. package/dist/sdk/cas/cas-api-client.js.map +1 -1
  154. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  155. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  156. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  157. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  158. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  159. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  160. package/dist/sdk/cas/index.d.ts +51 -1
  161. package/dist/sdk/cas/index.d.ts.map +1 -1
  162. package/dist/sdk/cas/index.js +1 -1
  163. package/dist/sdk/cas/index.js.map +1 -1
  164. package/dist/sdk/cas/pull-workflow.js +1 -1
  165. package/dist/sdk/cas/push-workflow.js +1 -1
  166. package/dist/sdk/cas/validate-files.js +1 -1
  167. package/dist/sdk/client/cdp-api-client.js +1 -1
  168. package/dist/sdk/client/delivery-api-client.js +1 -1
  169. package/dist/sdk/client/endpoints.d.ts +9 -0
  170. package/dist/sdk/client/endpoints.d.ts.map +1 -1
  171. package/dist/sdk/client/endpoints.js +1 -1
  172. package/dist/sdk/client/endpoints.js.map +1 -1
  173. package/dist/sdk/client/engage-api-client.d.ts +66 -1
  174. package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
  175. package/dist/sdk/client/engage-api-client.js +1 -1
  176. package/dist/sdk/client/engage-api-client.js.map +1 -1
  177. package/dist/sdk/client/http-client.d.ts +25 -1
  178. package/dist/sdk/client/http-client.d.ts.map +1 -1
  179. package/dist/sdk/client/http-client.js +1 -1
  180. package/dist/sdk/client/http-client.js.map +1 -1
  181. package/dist/sdk/client/llm-api-client.js +1 -1
  182. package/dist/sdk/client/oauth-refresh.js +1 -1
  183. package/dist/sdk/client/p13n-studio-api-client.d.ts +62 -7
  184. package/dist/sdk/client/p13n-studio-api-client.d.ts.map +1 -1
  185. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  186. package/dist/sdk/client/p13n-studio-api-client.js.map +1 -1
  187. package/dist/sdk/client/rate-limiter.js +1 -1
  188. package/dist/sdk/client/td-api-client.js +1 -1
  189. package/dist/sdk/client/trino-api-client.js +1 -1
  190. package/dist/sdk/client/workflow-client.js +1 -1
  191. package/dist/sdk/connection-validator.js +1 -1
  192. package/dist/sdk/connection.js +1 -1
  193. package/dist/sdk/delivery.js +1 -1
  194. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  195. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  196. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  197. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  198. package/dist/sdk/engage/campaign-pull.js +1 -1
  199. package/dist/sdk/engage/campaign-push.js +1 -1
  200. package/dist/sdk/engage/campaign-validator.js +1 -1
  201. package/dist/sdk/engage/campaign-yaml.js +1 -1
  202. package/dist/sdk/engage/in-browser-message-pull.d.ts +41 -0
  203. package/dist/sdk/engage/in-browser-message-pull.d.ts.map +1 -0
  204. package/dist/sdk/engage/in-browser-message-pull.js +1 -0
  205. package/dist/sdk/engage/in-browser-message-pull.js.map +1 -0
  206. package/dist/sdk/engage/in-browser-message-push.d.ts +59 -0
  207. package/dist/sdk/engage/in-browser-message-push.d.ts.map +1 -0
  208. package/dist/sdk/engage/in-browser-message-push.js +1 -0
  209. package/dist/sdk/engage/in-browser-message-push.js.map +1 -0
  210. package/dist/sdk/engage/in-browser-message-validator.d.ts +9 -0
  211. package/dist/sdk/engage/in-browser-message-validator.d.ts.map +1 -0
  212. package/dist/sdk/engage/in-browser-message-validator.js +1 -0
  213. package/dist/sdk/engage/in-browser-message-validator.js.map +1 -0
  214. package/dist/sdk/engage/in-browser-message-yaml.d.ts +36 -0
  215. package/dist/sdk/engage/in-browser-message-yaml.d.ts.map +1 -0
  216. package/dist/sdk/engage/in-browser-message-yaml.js +1 -0
  217. package/dist/sdk/engage/in-browser-message-yaml.js.map +1 -0
  218. package/dist/sdk/engage/landing-page-init.d.ts +15 -0
  219. package/dist/sdk/engage/landing-page-init.d.ts.map +1 -0
  220. package/dist/sdk/engage/landing-page-init.js +1 -0
  221. package/dist/sdk/engage/landing-page-init.js.map +1 -0
  222. package/dist/sdk/engage/landing-page-public-asset.d.ts +16 -0
  223. package/dist/sdk/engage/landing-page-public-asset.d.ts.map +1 -0
  224. package/dist/sdk/engage/landing-page-public-asset.js +1 -0
  225. package/dist/sdk/engage/landing-page-public-asset.js.map +1 -0
  226. package/dist/sdk/engage/landing-page-pull.d.ts +42 -0
  227. package/dist/sdk/engage/landing-page-pull.d.ts.map +1 -0
  228. package/dist/sdk/engage/landing-page-pull.js +1 -0
  229. package/dist/sdk/engage/landing-page-pull.js.map +1 -0
  230. package/dist/sdk/engage/landing-page-push.d.ts +44 -0
  231. package/dist/sdk/engage/landing-page-push.d.ts.map +1 -0
  232. package/dist/sdk/engage/landing-page-push.js +1 -0
  233. package/dist/sdk/engage/landing-page-push.js.map +1 -0
  234. package/dist/sdk/engage/landing-page-static-site.d.ts +37 -0
  235. package/dist/sdk/engage/landing-page-static-site.d.ts.map +1 -0
  236. package/dist/sdk/engage/landing-page-static-site.js +1 -0
  237. package/dist/sdk/engage/landing-page-static-site.js.map +1 -0
  238. package/dist/sdk/engage/landing-page-validator.d.ts +17 -0
  239. package/dist/sdk/engage/landing-page-validator.d.ts.map +1 -0
  240. package/dist/sdk/engage/landing-page-validator.js +1 -0
  241. package/dist/sdk/engage/landing-page-validator.js.map +1 -0
  242. package/dist/sdk/engage/landing-page-workspace.d.ts +10 -0
  243. package/dist/sdk/engage/landing-page-workspace.d.ts.map +1 -0
  244. package/dist/sdk/engage/landing-page-workspace.js +1 -0
  245. package/dist/sdk/engage/landing-page-workspace.js.map +1 -0
  246. package/dist/sdk/engage/landing-page-yaml.d.ts +20 -0
  247. package/dist/sdk/engage/landing-page-yaml.d.ts.map +1 -0
  248. package/dist/sdk/engage/landing-page-yaml.js +1 -0
  249. package/dist/sdk/engage/landing-page-yaml.js.map +1 -0
  250. package/dist/sdk/engage/template-pull.js +1 -1
  251. package/dist/sdk/engage/template-push.js +1 -1
  252. package/dist/sdk/engage/template-validator.js +1 -1
  253. package/dist/sdk/engage/template-yaml.js +1 -1
  254. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  255. package/dist/sdk/engage/types/campaign-def.js +1 -1
  256. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  257. package/dist/sdk/engage/types/in-browser-message-schema.d.ts +32 -0
  258. package/dist/sdk/engage/types/in-browser-message-schema.d.ts.map +1 -0
  259. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -0
  260. package/dist/sdk/engage/types/in-browser-message-schema.js.map +1 -0
  261. package/dist/sdk/engage/types/landing-page-schema.d.ts +21 -0
  262. package/dist/sdk/engage/types/landing-page-schema.d.ts.map +1 -0
  263. package/dist/sdk/engage/types/landing-page-schema.js +1 -0
  264. package/dist/sdk/engage/types/landing-page-schema.js.map +1 -0
  265. package/dist/sdk/engage/types/template-schema.js +1 -1
  266. package/dist/sdk/engage.d.ts +114 -2
  267. package/dist/sdk/engage.d.ts.map +1 -1
  268. package/dist/sdk/engage.js +1 -1
  269. package/dist/sdk/engage.js.map +1 -1
  270. package/dist/sdk/errors.d.ts +12 -0
  271. package/dist/sdk/errors.d.ts.map +1 -1
  272. package/dist/sdk/errors.js +1 -1
  273. package/dist/sdk/errors.js.map +1 -1
  274. package/dist/sdk/index.d.ts +1 -1
  275. package/dist/sdk/index.d.ts.map +1 -1
  276. package/dist/sdk/index.js +1 -1
  277. package/dist/sdk/index.js.map +1 -1
  278. package/dist/sdk/io/index.js +1 -1
  279. package/dist/sdk/io/node-filesystem.js +1 -1
  280. package/dist/sdk/job.js +1 -1
  281. package/dist/sdk/journey.d.ts +38 -1
  282. package/dist/sdk/journey.d.ts.map +1 -1
  283. package/dist/sdk/journey.js +1 -1
  284. package/dist/sdk/journey.js.map +1 -1
  285. package/dist/sdk/llm/chat-cache.js +1 -1
  286. package/dist/sdk/llm/index.js +1 -1
  287. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  288. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  289. package/dist/sdk/llm/model-factors.js +1 -1
  290. package/dist/sdk/llm/model-factors.js.map +1 -1
  291. package/dist/sdk/llm/user-settings.js +1 -1
  292. package/dist/sdk/p13n-studio-errors.d.ts +91 -0
  293. package/dist/sdk/p13n-studio-errors.d.ts.map +1 -0
  294. package/dist/sdk/p13n-studio-errors.js +1 -0
  295. package/dist/sdk/p13n-studio-errors.js.map +1 -0
  296. package/dist/sdk/p13n-studio.d.ts +84 -8
  297. package/dist/sdk/p13n-studio.d.ts.map +1 -1
  298. package/dist/sdk/p13n-studio.js +1 -1
  299. package/dist/sdk/p13n-studio.js.map +1 -1
  300. package/dist/sdk/personalization.js +1 -1
  301. package/dist/sdk/policy.js +1 -1
  302. package/dist/sdk/query/deleted-table-validation.js +1 -1
  303. package/dist/sdk/query/index.js +1 -1
  304. package/dist/sdk/query/sql-parser.js +1 -1
  305. package/dist/sdk/realtime.js +1 -1
  306. package/dist/sdk/schedule.js +1 -1
  307. package/dist/sdk/segment/audience-context.d.ts +117 -0
  308. package/dist/sdk/segment/audience-context.d.ts.map +1 -0
  309. package/dist/sdk/segment/audience-context.js +1 -0
  310. package/dist/sdk/segment/audience-context.js.map +1 -0
  311. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  312. package/dist/sdk/segment/fields-display.js +1 -1
  313. package/dist/sdk/segment/file-discovery.js +1 -1
  314. package/dist/sdk/segment/journey-utils.js +1 -1
  315. package/dist/sdk/segment/journey-validator.js +1 -1
  316. package/dist/sdk/segment/journey-yaml.js +1 -1
  317. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  318. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  319. package/dist/sdk/segment/pull-workflow.js +1 -1
  320. package/dist/sdk/segment/push-recovery.js +1 -1
  321. package/dist/sdk/segment/push-workflow.js +1 -1
  322. package/dist/sdk/segment/resolution-context.js +1 -1
  323. package/dist/sdk/segment/segment-path-parser.js +1 -1
  324. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  325. package/dist/sdk/segment/segment-validator.js +1 -1
  326. package/dist/sdk/segment/target-resolution.js +1 -1
  327. package/dist/sdk/segment/tdx-config.js +1 -1
  328. package/dist/sdk/segment/types/activation-schema.js +1 -1
  329. package/dist/sdk/segment/types/journey-def.js +1 -1
  330. package/dist/sdk/segment/types/journey-schema.d.ts +1 -1
  331. package/dist/sdk/segment/types/journey-schema.js +1 -1
  332. package/dist/sdk/segment/types/segment-def.js +1 -1
  333. package/dist/sdk/segment/types/segment-schema.js +1 -1
  334. package/dist/sdk/segment/validate-files.d.ts +4 -1
  335. package/dist/sdk/segment/validate-files.d.ts.map +1 -1
  336. package/dist/sdk/segment/validate-files.js +1 -1
  337. package/dist/sdk/segment/validate-files.js.map +1 -1
  338. package/dist/sdk/segment/yaml-validator.d.ts +1 -1
  339. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
  340. package/dist/sdk/segment/yaml-validator.js +1 -1
  341. package/dist/sdk/segment/yaml-validator.js.map +1 -1
  342. package/dist/sdk/segment.d.ts +56 -0
  343. package/dist/sdk/segment.d.ts.map +1 -1
  344. package/dist/sdk/segment.js +1 -1
  345. package/dist/sdk/segment.js.map +1 -1
  346. package/dist/sdk/types/cas.d.ts +12 -0
  347. package/dist/sdk/types/cas.d.ts.map +1 -1
  348. package/dist/sdk/types/engage.d.ts +248 -0
  349. package/dist/sdk/types/engage.d.ts.map +1 -1
  350. package/dist/sdk/types/index.d.ts +2 -2
  351. package/dist/sdk/types/index.d.ts.map +1 -1
  352. package/dist/sdk/types/index.js +1 -1
  353. package/dist/sdk/types/index.js.map +1 -1
  354. package/dist/sdk/types/p13n-studio.d.ts +77 -1
  355. package/dist/sdk/types/p13n-studio.d.ts.map +1 -1
  356. package/dist/sdk/types/progress.js +1 -1
  357. package/dist/sdk/types/workspace.js +1 -1
  358. package/dist/sdk/user.js +1 -1
  359. package/dist/sdk/util/format-detector.js +1 -1
  360. package/dist/sdk/util/formatters.js +1 -1
  361. package/dist/sdk/util/index.js +1 -1
  362. package/dist/sdk/util/paginate.js +1 -1
  363. package/dist/sdk/util/tree-formatter.js +1 -1
  364. package/dist/sdk/util/tree-search.js +1 -1
  365. package/dist/sdk/workflow/archive-validation.js +1 -1
  366. package/dist/sdk/workflow/clone-workflow.js +1 -1
  367. package/dist/sdk/workflow/index.js +1 -1
  368. package/dist/sdk/workflow/pull-workflow.js +1 -1
  369. package/dist/sdk/workflow/push-workflow.js +1 -1
  370. package/dist/sdk/workflow/task-graph.js +1 -1
  371. package/dist/sdk/workflow/tdx-config.js +1 -1
  372. package/dist/sdk/workflow/workflow-utils.js +1 -1
  373. package/dist/sdk/workspace/access-tracker.js +1 -1
  374. package/dist/sdk/workspace/frontmatter.js +1 -1
  375. package/dist/sdk/workspace/git.js +1 -1
  376. package/dist/sdk/workspace/index.js +1 -1
  377. package/dist/sdk/workspace/templates.js +1 -1
  378. package/dist/sdk/workspace/weekly.js +1 -1
  379. package/dist/sdk/workspace/wikilinks.js +1 -1
  380. package/dist/test-utils/command-runner.js +1 -1
  381. package/dist/test-utils/factories.js +1 -1
  382. package/dist/test-utils/fixtures.js +1 -1
  383. package/dist/test-utils/http-mock.js +1 -1
  384. package/dist/test-utils/index.js +1 -1
  385. package/dist/utils/async.js +1 -1
  386. package/dist/utils/claude-code-state.js +1 -1
  387. package/dist/utils/colors.js +1 -1
  388. package/dist/utils/diff.js +1 -1
  389. package/dist/utils/file-permissions.js +1 -1
  390. package/dist/utils/file-reader.js +1 -1
  391. package/dist/utils/github-releases.js +1 -1
  392. package/dist/utils/global-cache.js +1 -1
  393. package/dist/utils/json-loader.js +1 -1
  394. package/dist/utils/local-cache.js +1 -1
  395. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  396. package/dist/utils/logger/formatters/index.js +1 -1
  397. package/dist/utils/logger/handlers/console-handler.js +1 -1
  398. package/dist/utils/logger/handlers/file-handler.js +1 -1
  399. package/dist/utils/logger/handlers/index.js +1 -1
  400. package/dist/utils/logger/handlers/null-handler.js +1 -1
  401. package/dist/utils/logger/index.js +1 -1
  402. package/dist/utils/logger/logger.js +1 -1
  403. package/dist/utils/logger/types.js +1 -1
  404. package/dist/utils/option-validation.js +1 -1
  405. package/dist/utils/process.d.ts.map +1 -1
  406. package/dist/utils/process.js +1 -1
  407. package/dist/utils/process.js.map +1 -1
  408. package/dist/utils/prompt.js +1 -1
  409. package/dist/utils/proxy-fetch.js +1 -1
  410. package/dist/utils/spinner.js +1 -1
  411. package/dist/utils/sse-parser.js +1 -1
  412. package/dist/utils/string-utils.js +1 -1
  413. package/dist/utils/table-ref-parser.js +1 -1
  414. package/dist/utils/tdx-logger.js +1 -1
  415. package/dist/utils/version-check.js +1 -1
  416. package/package.json +5 -5
@@ -1 +1 @@
1
- function a3_0x1eed(_0x179ce5,_0x50e001){_0x179ce5=_0x179ce5-0x121;const _0x31b74f=a3_0x31b7();let _0x1eed1d=_0x31b74f[_0x179ce5];return _0x1eed1d;}const a3_0x5e6396=a3_0x1eed;(function(_0x36f5be,_0x5e9383){const _0x39ace8=a3_0x1eed,_0x1d698c=_0x36f5be();while(!![]){try{const _0x2e866e=-parseInt(_0x39ace8(0x142))/0x1+-parseInt(_0x39ace8(0x12c))/0x2+-parseInt(_0x39ace8(0x129))/0x3*(-parseInt(_0x39ace8(0x13f))/0x4)+-parseInt(_0x39ace8(0x13c))/0x5*(parseInt(_0x39ace8(0x134))/0x6)+-parseInt(_0x39ace8(0x141))/0x7+parseInt(_0x39ace8(0x13a))/0x8+parseInt(_0x39ace8(0x128))/0x9;if(_0x2e866e===_0x5e9383)break;else _0x1d698c['push'](_0x1d698c['shift']());}catch(_0x223ac0){_0x1d698c['push'](_0x1d698c['shift']());}}}(a3_0x31b7,0x4d577));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{['name']=a3_0x5e6396(0x121);[a3_0x5e6396(0x127)]=a3_0x5e6396(0x124);async[a3_0x5e6396(0x133)](_0x430b02){const _0x4e5900=a3_0x5e6396,{options:_0x4d90b9,args:_0x930d58,tdx:_0x2a0c66}=_0x430b02;if(_0x930d58[_0x4e5900(0x135)]===0x0)return console[_0x4e5900(0x140)](_0x4e5900(0x137)),console[_0x4e5900(0x140)](_0x4e5900(0x139)),0x1;try{const {parentId:_0x2c6f0a,childId:_0x296d91}=parseSegmentRef(_0x930d58[0x0]);if(!_0x296d91)return console['error'](_0x4e5900(0x13d)),console[_0x4e5900(0x140)]('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;_0x4d90b9[_0x4e5900(0x12f)]&&(console[_0x4e5900(0x140)](_0x4e5900(0x125)+_0x4d90b9[_0x4e5900(0x12d)]),console[_0x4e5900(0x140)](_0x4e5900(0x126)+_0x2c6f0a),console['error']('Child\x20name:\x20'+_0x296d91));const _0x5d91dd=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x2c6f0a+_0x4e5900(0x138),()=>_0x2a0c66['segment']['resolveParentId'](_0x2c6f0a),{'verbose':_0x4d90b9[_0x4e5900(0x12f)]}),_0x5e702b=_0x5d91dd[_0x4e5900(0x12a)];_0x4d90b9[_0x4e5900(0x12f)]&&console[_0x4e5900(0x140)](_0x4e5900(0x13b)+_0x5e702b);const _0x5d7a9b=await withSpinner(_0x4e5900(0x122)+_0x296d91+_0x4e5900(0x138),()=>_0x2a0c66['segment'][_0x4e5900(0x143)](_0x5e702b,_0x296d91),{'verbose':_0x4d90b9[_0x4e5900(0x12f)]}),_0x1b7b68=_0x5d7a9b[_0x4e5900(0x12a)];_0x4d90b9[_0x4e5900(0x12f)]&&console[_0x4e5900(0x140)](_0x4e5900(0x130)+_0x1b7b68);const _0x2fa6e4=await withSpinner(_0x4e5900(0x13e)+_0x296d91+'\x27...',()=>_0x2a0c66[_0x4e5900(0x123)]['listActivations'](_0x5e702b,_0x1b7b68),{'verbose':_0x4d90b9[_0x4e5900(0x12f)]}),_0x49e7c8=_0x2fa6e4[_0x4e5900(0x12a)];return console[_0x4e5900(0x140)]('✔\x20Found\x20'+_0x49e7c8[_0x4e5900(0x135)]+_0x4e5900(0x136)+(_0x49e7c8[_0x4e5900(0x135)]!==0x1?'s':'')),await handleSDKOutput(_0x49e7c8,_0x4d90b9),0x0;}catch(_0xc9452){if(_0xc9452 instanceof SDKError)return console[_0x4e5900(0x140)](_0x4e5900(0x12b)+_0xc9452[_0x4e5900(0x132)]),_0xc9452[_0x4e5900(0x12e)]&&console[_0x4e5900(0x140)](_0x4e5900(0x131)+_0xc9452[_0x4e5900(0x12e)]),0x1;throw _0xc9452;}}}function a3_0x31b7(){const _0x18de9b=['6DArwYP','length','\x20activation','Error:\x20Segment\x20name\x20is\x20required','\x27...','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','1451816PkPZUg','Resolved\x20parent\x20ID:\x20','1628470ZplQvH','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','Listing\x20activations\x20for\x20segment\x20\x27','2179292DsRTdQ','error','1642669wCnAyD','193590sYChUr','resolveSegmentId','activations','Resolving\x20child\x20segment\x20\x27','segment','List\x20activations\x20for\x20a\x20segment','Site:\x20','Parent\x20name:\x20','description','3789351fDLxnd','3CsEMzw','data','Error:\x20','153194vnXudk','site','cause','verbose','Resolved\x20child\x20ID:\x20','\x20\x20Cause:\x20','message','execute'];a3_0x31b7=function(){return _0x18de9b;};return a3_0x31b7();}
1
+ const a3_0x5f4b89=a3_0x45d5;(function(_0x7e6798,_0x1f5923){const _0x23c340=a3_0x45d5,_0x19d149=_0x7e6798();while(!![]){try{const _0xd08590=-parseInt(_0x23c340(0x1dc))/0x1*(parseInt(_0x23c340(0x1d3))/0x2)+parseInt(_0x23c340(0x1ce))/0x3+-parseInt(_0x23c340(0x1d6))/0x4+parseInt(_0x23c340(0x1d5))/0x5+-parseInt(_0x23c340(0x1c9))/0x6+-parseInt(_0x23c340(0x1d9))/0x7+parseInt(_0x23c340(0x1cd))/0x8;if(_0xd08590===_0x1f5923)break;else _0x19d149['push'](_0x19d149['shift']());}catch(_0x1996fd){_0x19d149['push'](_0x19d149['shift']());}}}(a3_0x1b48,0xd6b61));import{BaseCommand}from'./command.js';function a3_0x45d5(_0x4d6a52,_0x1adfad){_0x4d6a52=_0x4d6a52-0x1be;const _0x1b4890=a3_0x1b48();let _0x45d562=_0x1b4890[_0x4d6a52];return _0x45d562;}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';function a3_0x1b48(){const _0x420c51=['verbose','838QcOqqj','Parent\x20name:\x20','8034655qQlvit','1559920vIMsXm','data','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','3851883LKvZpB','site','List\x20activations\x20for\x20a\x20segment','4039imqccD','Resolving\x20child\x20segment\x20\x27','Resolved\x20parent\x20ID:\x20','length','Error:\x20','activations','\x20activation','resolveSegmentId','cause','Site:\x20','error','Listing\x20activations\x20for\x20segment\x20\x27','resolveParentId','Resolved\x20child\x20ID:\x20','Error:\x20Segment\x20name\x20is\x20required','execute','6613200PrylMc','description','\x20\x20Cause:\x20','\x27...','19825232AUfIUB','1587486IEECcz','listActivations','segment','Child\x20name:\x20'];a3_0x1b48=function(){return _0x420c51;};return a3_0x1b48();}export class ActivationsCommand extends BaseCommand{['name']=a3_0x5f4b89(0x1be);[a3_0x5f4b89(0x1ca)]=a3_0x5f4b89(0x1db);async[a3_0x5f4b89(0x1c8)](_0x45f904){const _0x65070=a3_0x5f4b89,{options:_0x5387fb,args:_0x3d1e62,tdx:_0x493893}=_0x45f904;if(_0x3d1e62['length']===0x0)return console[_0x65070(0x1c3)](_0x65070(0x1c7)),console[_0x65070(0x1c3)]('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;try{const {parentId:_0x5ed540,childId:_0x6d9310}=parseSegmentRef(_0x3d1e62[0x0]);if(!_0x6d9310)return console[_0x65070(0x1c3)](_0x65070(0x1d8)),console[_0x65070(0x1c3)]('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;_0x5387fb[_0x65070(0x1d2)]&&(console[_0x65070(0x1c3)](_0x65070(0x1c2)+_0x5387fb[_0x65070(0x1da)]),console[_0x65070(0x1c3)](_0x65070(0x1d4)+_0x5ed540),console[_0x65070(0x1c3)](_0x65070(0x1d1)+_0x6d9310));const _0x4a1a87=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x5ed540+_0x65070(0x1cc),()=>_0x493893[_0x65070(0x1d0)][_0x65070(0x1c5)](_0x5ed540),{'verbose':_0x5387fb[_0x65070(0x1d2)]}),_0x21beb4=_0x4a1a87['data'];_0x5387fb[_0x65070(0x1d2)]&&console[_0x65070(0x1c3)](_0x65070(0x1de)+_0x21beb4);const _0x10d87b=await withSpinner(_0x65070(0x1dd)+_0x6d9310+_0x65070(0x1cc),()=>_0x493893[_0x65070(0x1d0)][_0x65070(0x1c0)](_0x21beb4,_0x6d9310),{'verbose':_0x5387fb[_0x65070(0x1d2)]}),_0x100648=_0x10d87b[_0x65070(0x1d7)];_0x5387fb[_0x65070(0x1d2)]&&console[_0x65070(0x1c3)](_0x65070(0x1c6)+_0x100648);const _0x395683=await withSpinner(_0x65070(0x1c4)+_0x6d9310+'\x27...',()=>_0x493893[_0x65070(0x1d0)][_0x65070(0x1cf)](_0x21beb4,_0x100648),{'verbose':_0x5387fb[_0x65070(0x1d2)]}),_0xd1f580=_0x395683[_0x65070(0x1d7)];return console['error']('✔\x20Found\x20'+_0xd1f580[_0x65070(0x1df)]+_0x65070(0x1bf)+(_0xd1f580[_0x65070(0x1df)]!==0x1?'s':'')),await handleSDKOutput(_0xd1f580,_0x5387fb),0x0;}catch(_0x47cea2){if(_0x47cea2 instanceof SDKError)return console[_0x65070(0x1c3)](_0x65070(0x1e0)+_0x47cea2['message']),_0x47cea2[_0x65070(0x1c1)]&&console[_0x65070(0x1c3)](_0x65070(0x1cb)+_0x47cea2[_0x65070(0x1c1)]),0x1;throw _0x47cea2;}}}
@@ -1 +1 @@
1
- const a4_0x30fe7e=a4_0x7cc9;(function(_0x302502,_0x3b895c){const _0x65398c=a4_0x7cc9,_0x24cfa9=_0x302502();while(!![]){try{const _0x4a38ea=-parseInt(_0x65398c(0xde))/0x1+parseInt(_0x65398c(0xc2))/0x2*(-parseInt(_0x65398c(0xb4))/0x3)+-parseInt(_0x65398c(0x126))/0x4+parseInt(_0x65398c(0x12b))/0x5+parseInt(_0x65398c(0xca))/0x6*(-parseInt(_0x65398c(0xa1))/0x7)+parseInt(_0x65398c(0xd9))/0x8+parseInt(_0x65398c(0xfc))/0x9*(parseInt(_0x65398c(0x121))/0xa);if(_0x4a38ea===_0x3b895c)break;else _0x24cfa9['push'](_0x24cfa9['shift']());}catch(_0x71c4d2){_0x24cfa9['push'](_0x24cfa9['shift']());}}}(a4_0x406f,0x2bd4d));import a4_0x5c037e from'chalk';import a4_0x4fc7ef from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';function a4_0x7cc9(_0x179dbf,_0x4e26bf){_0x179dbf=_0x179dbf-0x76;const _0x406f5d=a4_0x406f();let _0x7cc982=_0x406f5d[_0x179dbf];return _0x7cc982;}function a4_0x406f(){const _0x2d8479=['Errors:','execute','action','newProjectName','\x0aChanges\x20to\x20chat\x20interface\x20\x27','Output:\x20','yellow','pushProject','\x20changed','experimentalArtifacts','Cancelled','No\x20tdx.json\x20found\x20in\x20','tdx.json','\x0aChanges\x20to\x20integration\x20\x27','yes','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','New\x20project:\x20','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','\x27\x20to\x20create\x20the\x20folder\x20structure.','\x20\x20Integration\x20\x22','\x0a✔\x20Pulled\x20','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project','Pushing\x20agent\x20from\x20\x22','diff','New\x20project\x20name\x20is\x20required','Output\x20path:\x20','textKnowledgeBases','Cannot\x20clone\x20from\x20context\x20project\x20\x22','agentName','sourceProjectName','profile','Project\x20cloned\x20successfully','created','\x20resources?','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','new','outputPath','\x20\x20Chat\x20Interface\x20\x22','hasChanges','integrations','\x20files?','push','prompts','agent:pull','utf-8','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','dryRun','description','pullProject','\x20\x20Integrations:\x20','\x0aWrite\x20','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','441364dLMNhi','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','\x22...','\x20\x20Text\x20Knowledge\x20Bases:\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','agent.yml','knowledgeBases','counts','\x20\x20Knowledge\x20Bases:\x20','Project\x20cloned\x20with\x20errors','llm','\x20\x20Form\x20Interface\x20\x22','cloneProject','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20project','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','formInterfaces','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','\x22:\x20','\x20created','662253MfDJsY','\x22\x20to\x20a\x20different\x20profile','\x0aPush\x20','\x0aProject\x20pushed\x20with\x20errors','error','Agent\x20','experimentalKnowledgeBases','Pulling\x20agent\x20\x22','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','\x20\x20tdx\x20agent\x20clone\x20agents/','Status:\x20','Pushing\x20to\x20project...','agent','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','2XEmMHf','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','\x20unchanged','<new-name>','\x20--profile\x20','\x20=\x20','\x0aError:','Agent:\x20','30YZHNAO','\x20updated','\x0aPush\x20summary\x20for\x20\x27','✔\x20Context\x20set:\x20','llmProject','repeat','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','green','\x20\x20Agents:\x20','\x20\x20tdx\x20agent\x20clone\x20--name\x20<new-name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clone\x20from\x20context\x20(llm_project)','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project','\x20\x20Source:\x20','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','projectName','updated','266736AtpJch','Using\x20project\x20from\x20context:\x20','session','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','Cloning\x20\x22','332508BepRAy','\x0aErrors\x20found:','\x20\x20Chat\x20Interfaces:\x20','\x20errors','\x20\x20Experimental\x20Artifacts:\x20','\x20\x20Experimental\x20Artifact\x20\x22','log','name','\x20resources\x20to\x20\x27','llm_project','\x20\x20Target:\x20','Using\x20current\x20project:\x20','INVALID_ARGUMENT','join','New\x20project\x20ID:\x20','message','\x20|\x20','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','\x20successfully','projectDir','Source:\x20','cwd','cyan','pushAgent','agents','Would\x20push\x20agent:\x20','total','cwd-config','\x20\x20Knowledge\x20Base\x20\x22','Using\x20context\x20project:\x20','289062mcVfFT','Summary:','Usage:\x20tdx\x20agent\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)','unchanged','\x22\x20to\x20\x22','gray','no_local_folder','-\x20no\x20files\x20written','\x20\x20Prompts:\x20','Project:\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','context','\x20\x20tdx\x20agent\x20pull\x20','Analyzing\x20project\x20\x22','agentId','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','\x20\x20Prompt\x20\x22','errors','Analyzing\x20changes\x20to\x20push...','parse','\x0a✔\x20Pushed\x20','\x20\x20Agent\x20\x22','site','\x20new','\x20\x20Form\x20Interfaces:\x20','\x0aChanges:','red','found','pullAgent','Dry\x20run\x20-\x20no\x20changes\x20made','output','arg-dir','dirname','Would\x20pull\x20agent:\x20','isNew','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','source','390afkUSw','Failed\x20to\x20push\x20agent:\x20','force','\x20\x20Text\x20Knowledge\x20Base\x20\x22','Clone\x20\x22','1414044TUYwoM','\x0aChanges\x20to\x20agent\x20\x27','newProjectId','Would\x20clone:','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','578095KkKpay','Using\x20local\x20project:\x20','projectId','reason','dim','Chat:\x20','chatInterfaces','MISSING_ARGUMENT'];a4_0x406f=function(){return _0x2d8479;};return a4_0x406f();}import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function formatCountSummary(_0x26c792){const _0x362440=a4_0x7cc9,_0x5920e7=[];if(_0x26c792['total']!==undefined)_0x5920e7[_0x362440(0x96)](_0x26c792[_0x362440(0xf8)]+'\x20total');if(_0x26c792[_0x362440(0x90)]!==undefined&&_0x26c792[_0x362440(0x90)]>0x0)_0x5920e7[_0x362440(0x96)](a4_0x5c037e[_0x362440(0xd1)](_0x26c792['new']+_0x362440(0x113)));if(_0x26c792[_0x362440(0x8d)]!==undefined&&_0x26c792[_0x362440(0x8d)]>0x0)_0x5920e7['push'](a4_0x5c037e['green'](_0x26c792[_0x362440(0x8d)]+_0x362440(0xb3)));if(_0x26c792[_0x362440(0xd8)]!==undefined&&_0x26c792[_0x362440(0xd8)]>0x0)_0x5920e7[_0x362440(0x96)](a4_0x5c037e[_0x362440(0x139)](_0x26c792[_0x362440(0xd8)]+_0x362440(0xcb)));if(_0x26c792[_0x362440(0xff)]!==undefined&&_0x26c792[_0x362440(0xff)]>0x0)_0x5920e7[_0x362440(0x96)](a4_0x5c037e['gray'](_0x26c792['unchanged']+_0x362440(0xc4)));if(_0x26c792[_0x362440(0x10d)]!==undefined&&_0x26c792['errors']>0x0)_0x5920e7[_0x362440(0x96)](a4_0x5c037e[_0x362440(0x116)](_0x26c792[_0x362440(0x10d)]+_0x362440(0xe1)));return _0x5920e7[_0x362440(0xeb)](',\x20');}function displayDiffs(_0x2c2ce3,_0xf308ea,_0x3ad83f,_0x111424,_0x40eb91,_0x4ac43f,_0x4746f4,_0x529245,_0xe163d7){const _0x300b15=a4_0x7cc9;for(const _0x565b25 of _0x2c2ce3){if(_0x565b25['diff']){const _0xe25f51=_0x565b25['agentName']||_0x565b25[_0x300b15(0xe5)];console[_0x300b15(0xe4)](_0x300b15(0x127)+_0xe25f51+'\x27:'),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c)),console[_0x300b15(0xe4)](_0x565b25[_0x300b15(0x84)]),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c));}}for(const _0x49923c of _0xf308ea){_0x49923c[_0x300b15(0x84)]&&(console[_0x300b15(0xe4)](_0x300b15(0xa2)+_0x49923c[_0x300b15(0xe5)]+'\x27:'),console['log']('─'[_0x300b15(0xcf)](0x3c)),console['log'](_0x49923c[_0x300b15(0x84)]),console['log']('─'[_0x300b15(0xcf)](0x3c)));}for(const _0x5ba6a3 of _0x3ad83f){_0x5ba6a3[_0x300b15(0x84)]&&(console[_0x300b15(0xe4)](_0x300b15(0x7b)+_0x5ba6a3[_0x300b15(0xe5)]+'\x27:'),console['log']('─'[_0x300b15(0xcf)](0x3c)),console[_0x300b15(0xe4)](_0x5ba6a3[_0x300b15(0x84)]),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c)));}for(const _0x5a678c of _0x111424){_0x5a678c[_0x300b15(0x84)]&&(console['log']('\x0aChanges\x20to\x20prompt\x20\x27'+_0x5a678c[_0x300b15(0xe5)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x300b15(0xe4)](_0x5a678c[_0x300b15(0x84)]),console['log']('─'[_0x300b15(0xcf)](0x3c)));}for(const _0x312b81 of _0x40eb91){_0x312b81['diff']&&(console[_0x300b15(0xe4)](_0x300b15(0x79)+_0x312b81['name']+'\x27:'),console['log']('─'[_0x300b15(0xcf)](0x3c)),console[_0x300b15(0xe4)](_0x312b81[_0x300b15(0x84)]),console['log']('─'[_0x300b15(0xcf)](0x3c)));}for(const _0x678192 of _0x4ac43f){_0x678192[_0x300b15(0x84)]&&(console[_0x300b15(0xe4)](_0x300b15(0xbc)+_0x678192[_0x300b15(0xe5)]+'\x27:'),console[_0x300b15(0xe4)]('─'['repeat'](0x3c)),console[_0x300b15(0xe4)](_0x678192['diff']),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c)));}for(const _0x4347fc of _0x4746f4){_0x4347fc['diff']&&(console[_0x300b15(0xe4)](_0x300b15(0x11f)+_0x4347fc[_0x300b15(0xe5)]+'\x27:'),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c)),console[_0x300b15(0xe4)](_0x4347fc['diff']),console['log']('─'['repeat'](0x3c)));}for(const _0x3dc372 of _0x529245){_0x3dc372['diff']&&(console[_0x300b15(0xe4)]('\x0aChanges\x20to\x20form\x20interface\x20\x27'+_0x3dc372[_0x300b15(0xe5)]+'\x27:'),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c)),console[_0x300b15(0xe4)](_0x3dc372[_0x300b15(0x84)]),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c)));}for(const _0x47e2a0 of _0xe163d7){_0x47e2a0[_0x300b15(0x84)]&&(console[_0x300b15(0xe4)](_0x300b15(0x137)+_0x47e2a0[_0x300b15(0xe5)]+'\x27:'),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c)),console[_0x300b15(0xe4)](_0x47e2a0[_0x300b15(0x84)]),console[_0x300b15(0xe4)]('─'[_0x300b15(0xcf)](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x30fe7e(0xe5)]=a4_0x30fe7e(0x98);[a4_0x30fe7e(0x9c)]='Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files';async[a4_0x30fe7e(0x134)](_0x250ecd){const _0x5ae605=a4_0x30fe7e,{options:_0x2c51c8,args:_0x5c25e3,tdx:_0x150fcb}=_0x250ecd,_0x575c0f=_0x5c25e3[0x0],_0x3dada4=_0x5c25e3[0x1],_0x4dd03e=_0x2c51c8[_0x5ae605(0x11a)],_0x4ff10a=_0x2c51c8[_0x5ae605(0x9b)],_0x1cea52=_0x2c51c8[_0x5ae605(0x123)],_0x3ebbe9=_0x2c51c8[_0x5ae605(0x7a)],_0x4a9c18=_0x2c51c8[_0x5ae605(0xce)],_0x21afd9=_0x2c51c8[_0x5ae605(0xc0)];let _0x4f06a7;if(_0x575c0f){const _0x13f958=a4_0x4fc7ef[_0x5ae605(0xeb)](_0x575c0f,'tdx.json');if(existsSync(_0x13f958))try{const _0x5afdb6=JSON['parse'](readFileSync(_0x13f958,_0x5ae605(0x99)));_0x5afdb6[_0x5ae605(0xe7)]&&(_0x4f06a7={'llm_project':_0x5afdb6['llm_project']});}catch{}}const _0x4b43d6=findAgentConfigPath(process['cwd']());let _0x28a70e;if(_0x4b43d6)try{const _0xe9c96=JSON[_0x5ae605(0x10f)](readFileSync(_0x4b43d6,'utf-8'));_0xe9c96['llm_project']&&(_0x28a70e={'llm_project':_0xe9c96['llm_project']});}catch{}const _0x9d08b7=resolveAgentPullArgs({'arg':_0x575c0f,'agentNameArg':_0x3dada4,'agentFlag':_0x21afd9,'contextProject':_0x4a9c18,'argDirConfig':_0x4f06a7,'cwdConfigPath':_0x4b43d6||undefined,'cwdConfig':_0x28a70e}),{projectNameOrId:_0x4df0d4,targetAgentName:_0x15fefd,existingOutputDir:_0x3482e5,source:_0x1ab720}=_0x9d08b7;if(_0x1ab720===_0x5ae605(0x11b))console['log'](a4_0x5c037e[_0x5ae605(0x12f)]('Using\x20project\x20from\x20'+a4_0x4fc7ef[_0x5ae605(0xeb)](_0x575c0f,_0x5ae605(0x78))+':\x20'+_0x4df0d4));else{if(_0x1ab720===_0x5ae605(0xf9))console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0x12f)]('Using\x20project:\x20'+_0x4df0d4));else _0x1ab720===_0x5ae605(0x107)&&console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0x12f)](_0x5ae605(0xda)+_0x4df0d4));}if(!_0x4df0d4)return _0x21afd9?(console['log'](a4_0x5c037e[_0x5ae605(0x139)](_0x5ae605(0xb1))),console[_0x5ae605(0xe4)]('Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>'),console[_0x5ae605(0xe4)](_0x5ae605(0xd6))):(console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0x139)](_0x5ae605(0xa0))),console[_0x5ae605(0xe4)](_0x5ae605(0xfe)),console['log'](_0x5ae605(0x82)),console[_0x5ae605(0xe4)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<local-dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20to\x20existing\x20local\x20directory'),console['log'](_0x5ae605(0xd4)),console[_0x5ae605(0xe4)](_0x5ae605(0xae))),0x1;if(_0x15fefd){const {data:_0xbc6817}=await withSpinner(_0x5ae605(0xbb)+_0x15fefd+'\x22\x20from\x20project\x20\x22'+_0x4df0d4+_0x5ae605(0xa3),()=>_0x150fcb[_0x5ae605(0xab)][_0x5ae605(0x118)](_0x4df0d4,_0x15fefd,_0x4dd03e,{'dryRun':_0x4ff10a,'force':_0x1cea52}));if(_0x4ff10a)return console['log'](a4_0x5c037e['yellow']('Dry\x20run\x20-\x20no\x20files\x20written')),console['log'](_0x5ae605(0x11d)+_0xbc6817['agentName']),console[_0x5ae605(0xe4)](_0x5ae605(0x86)+_0xbc6817[_0x5ae605(0x91)]),_0xbc6817[_0x5ae605(0x84)]&&(console[_0x5ae605(0xe4)](_0x5ae605(0x115)),console['log']('─'['repeat'](0x3c)),console[_0x5ae605(0xe4)](_0xbc6817[_0x5ae605(0x84)]),console[_0x5ae605(0xe4)]('─'['repeat'](0x3c))),0x0;return console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0xd1)]('Agent\x20pulled\x20successfully')),console[_0x5ae605(0xe4)](_0x5ae605(0xc9)+_0xbc6817[_0x5ae605(0x89)]),console[_0x5ae605(0xe4)](_0x5ae605(0x138)+_0xbc6817['outputPath']),console[_0x5ae605(0xe4)](_0x5ae605(0xbe)+(_0xbc6817[_0x5ae605(0x11e)]?a4_0x5c037e[_0x5ae605(0xd1)](_0x5ae605(0x90)):_0xbc6817[_0x5ae605(0x93)]?a4_0x5c037e['yellow']('updated'):a4_0x5c037e[_0x5ae605(0x101)](_0x5ae605(0xff)))),0x0;}const _0x237316=_0x3482e5||_0x4dd03e,{data:_0x13fe3c}=await withSpinner(_0x5ae605(0x109)+_0x4df0d4+_0x5ae605(0xa3),()=>_0x150fcb[_0x5ae605(0xab)][_0x5ae605(0x9d)](_0x4df0d4,_0x237316,{'dryRun':!![]})),_0x3a9d79=_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xf6)]['new']+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xa7)]['new']+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x87)]['new']+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x97)][_0x5ae605(0x90)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x94)]['new']+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xba)]['new']+_0x13fe3c['counts'][_0x5ae605(0x13c)]['new']+_0x13fe3c[_0x5ae605(0xa8)]['formInterfaces'][_0x5ae605(0x90)]+_0x13fe3c[_0x5ae605(0xa8)]['chatInterfaces']['new'],_0x43dbb0=_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xf6)]['updated']+_0x13fe3c[_0x5ae605(0xa8)]['knowledgeBases'][_0x5ae605(0xd8)]+_0x13fe3c['counts'][_0x5ae605(0x87)][_0x5ae605(0xd8)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x97)][_0x5ae605(0xd8)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x94)][_0x5ae605(0xd8)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xba)][_0x5ae605(0xd8)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x13c)][_0x5ae605(0xd8)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xb0)]['updated']+_0x13fe3c['counts']['chatInterfaces'][_0x5ae605(0xd8)],_0x298e0b=_0x13fe3c[_0x5ae605(0xa8)]['agents'][_0x5ae605(0xff)]+_0x13fe3c['counts'][_0x5ae605(0xa7)][_0x5ae605(0xff)]+_0x13fe3c[_0x5ae605(0xa8)]['textKnowledgeBases'][_0x5ae605(0xff)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x97)][_0x5ae605(0xff)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x94)][_0x5ae605(0xff)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xba)][_0x5ae605(0xff)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x13c)]['unchanged']+_0x13fe3c[_0x5ae605(0xa8)]['formInterfaces'][_0x5ae605(0xff)]+_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x131)][_0x5ae605(0xff)];console[_0x5ae605(0xe4)]('\x0aPull\x20summary\x20for\x20\x27'+_0x13fe3c[_0x5ae605(0xd7)]+'\x27:'),console[_0x5ae605(0xe4)]('\x20\x20'+a4_0x5c037e[_0x5ae605(0xd1)]('+\x20'+_0x3a9d79+'\x20new')+'\x20|\x20'+a4_0x5c037e['yellow']('~\x20'+_0x43dbb0+'\x20changed')+'\x20|\x20'+a4_0x5c037e[_0x5ae605(0x12f)]('=\x20'+_0x298e0b+_0x5ae605(0xc4))),console['log'](_0x5ae605(0xd2)+formatCountSummary(_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xf6)])),console[_0x5ae605(0xe4)](_0x5ae605(0xa9)+formatCountSummary(_0x13fe3c[_0x5ae605(0xa8)]['knowledgeBases'])),console[_0x5ae605(0xe4)](_0x5ae605(0xa4)+formatCountSummary(_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x87)])),console['log']('\x20\x20Prompts:\x20'+formatCountSummary(_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x97)])),console[_0x5ae605(0xe4)](_0x5ae605(0x9e)+formatCountSummary(_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x94)])),console[_0x5ae605(0xe4)]('\x20\x20Form\x20Interfaces:\x20'+formatCountSummary(_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0xb0)])),console[_0x5ae605(0xe4)](_0x5ae605(0xe0)+formatCountSummary(_0x13fe3c[_0x5ae605(0xa8)][_0x5ae605(0x131)]));const _0x52645d=_0x13fe3c['counts'][_0x5ae605(0xba)][_0x5ae605(0xf8)]>0x0||_0x13fe3c['counts'][_0x5ae605(0x13c)]['total']>0x0;_0x52645d&&(console['log'](_0x5ae605(0xef)+formatCountSummary(_0x13fe3c['counts']['experimentalKnowledgeBases'])),console[_0x5ae605(0xe4)](_0x5ae605(0xe2)+formatCountSummary(_0x13fe3c['counts'][_0x5ae605(0x13c)])));console[_0x5ae605(0xe4)](_0x5ae605(0xe8)+a4_0x5c037e[_0x5ae605(0xf4)](_0x13fe3c['outputDir'])),displayDiffs(_0x13fe3c[_0x5ae605(0xf6)],_0x13fe3c[_0x5ae605(0xa7)],_0x13fe3c[_0x5ae605(0x87)],_0x13fe3c[_0x5ae605(0x97)],_0x13fe3c[_0x5ae605(0x94)],_0x13fe3c['experimentalKnowledgeBases'],_0x13fe3c[_0x5ae605(0x13c)],_0x13fe3c[_0x5ae605(0xb0)],_0x13fe3c[_0x5ae605(0x131)]);if(_0x4ff10a)return console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0x139)](_0x5ae605(0xc3))),0x0;if(_0x3a9d79===0x0&&_0x43dbb0===0x0)return console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0xd1)]('\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'llm_project':_0x13fe3c[_0x5ae605(0xd7)]},_0x2c51c8[_0x5ae605(0xdb)]),console[_0x5ae605(0xe4)](a4_0x5c037e['green'](_0x5ae605(0xcd)+a4_0x5c037e[_0x5ae605(0x12f)](_0x5ae605(0xe7))+_0x5ae605(0xc7)+a4_0x5c037e[_0x5ae605(0xf4)](_0x13fe3c[_0x5ae605(0xd7)]))),0x0;if(!_0x3ebbe9&&!_0x1cea52){if(!isInteractive())return console['error'](a4_0x5c037e[_0x5ae605(0x116)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5ae605(0xb8)](a4_0x5c037e['dim'](_0x5ae605(0x106))),0x1;const _0x4dea30=await confirmKey(_0x5ae605(0x9f)+(_0x3a9d79+_0x43dbb0)+_0x5ae605(0x95));if(!_0x4dea30)return console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0x139)](_0x5ae605(0x76)),_0x5ae605(0x103)),0x1;}const {data:_0x1536cf}=await withSpinner('Writing\x20files...',()=>_0x150fcb[_0x5ae605(0xab)][_0x5ae605(0x9d)](_0x4df0d4,_0x237316,{'force':_0x1cea52}));return console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0xd1)](_0x5ae605(0x80)+(_0x3a9d79+_0x43dbb0)+'\x20files\x20to\x20'+_0x1536cf['outputDir'])),saveSessionContext({'llm_project':_0x1536cf[_0x5ae605(0xd7)]},_0x2c51c8[_0x5ae605(0xdb)]),console[_0x5ae605(0xe4)](a4_0x5c037e[_0x5ae605(0xd1)]('✔\x20Context\x20set:\x20'+a4_0x5c037e[_0x5ae605(0x12f)](_0x5ae605(0xe7))+_0x5ae605(0xc7)+a4_0x5c037e['cyan'](_0x1536cf['projectName']))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x30fe7e(0xe5)]='agent:clone';[a4_0x30fe7e(0x9c)]=a4_0x30fe7e(0x12a);async['execute'](_0x2b2f77){const _0x9a6379=a4_0x30fe7e,{options:_0x192584,args:_0x5dfbe3,tdx:_0x37b077}=_0x2b2f77,_0x754f3=_0x5dfbe3[0x0],_0x3a5b26=_0x192584[_0x9a6379(0xe5)],_0x22dbe2=_0x192584['dryRun'],_0x1f83fd=_0x192584[_0x9a6379(0x7a)],_0xf617ff=_0x192584[_0x9a6379(0x112)],_0x2e3bfc=_0x192584['llmProject'];let _0xa6c4d;const _0x484267=findAgentConfigPath(process[_0x9a6379(0xf3)]());if(_0x754f3){const _0x18ea6=a4_0x4fc7ef['join'](_0x754f3,'tdx.json');existsSync(_0x18ea6)?(_0xa6c4d=_0x754f3,console[_0x9a6379(0xe4)](a4_0x5c037e['dim'](_0x9a6379(0x12c)+_0x754f3))):_0xa6c4d=_0x754f3;}else{if(_0x484267)_0xa6c4d=a4_0x4fc7ef[_0x9a6379(0x11c)](_0x484267),console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x12f)](_0x9a6379(0xe9)+_0xa6c4d));else{if(_0x2e3bfc){const _0x4a1442=sanitizeForFilesystem(_0x2e3bfc);let _0x566864=_0x4a1442,_0x4481c8=a4_0x4fc7ef[_0x9a6379(0xeb)](process['cwd'](),_0x9a6379(0xf6),_0x4a1442,_0x9a6379(0x78));if(!existsSync(_0x4481c8)){const _0x89d9aa=normalizeName(_0x2e3bfc),_0x3069fe=a4_0x4fc7ef[_0x9a6379(0xeb)](process[_0x9a6379(0xf3)](),_0x9a6379(0xf6),_0x89d9aa,_0x9a6379(0x78));existsSync(_0x3069fe)&&(_0x566864=_0x89d9aa,_0x4481c8=_0x3069fe);}if(existsSync(_0x4481c8))_0xa6c4d=a4_0x4fc7ef[_0x9a6379(0x11c)](_0x4481c8),console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x12f)]('Using\x20local\x20project:\x20'+_0xa6c4d));else{const _0x503d1e=_0x192584[_0x9a6379(0x8b)];if(_0x503d1e)throw new SDKError(ErrorCode[_0x9a6379(0xea)],_0x9a6379(0x88)+_0x2e3bfc+_0x9a6379(0xb5),undefined,{'helpText':'When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a'+_0x9a6379(0xd0)+(_0x9a6379(0x108)+_0x2e3bfc+'\x0a')+(_0x9a6379(0xbd)+_0x566864+'\x20--name\x20'+(_0x3a5b26||_0x9a6379(0xc5))+_0x9a6379(0xc6)+_0x503d1e)});_0xa6c4d=_0x2e3bfc,console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x12f)](_0x9a6379(0xfb)+_0x2e3bfc));}}}}if(!_0xa6c4d)return console['log'](a4_0x5c037e[_0x9a6379(0x139)](_0x9a6379(0xc1))),console[_0x9a6379(0xe4)](_0x9a6379(0x7d)),console['log'](_0x9a6379(0xaf)),console[_0x9a6379(0xe4)](_0x9a6379(0xd3)),console[_0x9a6379(0xe4)](_0x9a6379(0x10b)),0x1;if(!_0x3a5b26)throw new SDKError(ErrorCode[_0x9a6379(0x132)],_0x9a6379(0x85),undefined,{'helpText':_0x9a6379(0xa5)});if(!_0x1f83fd&&!_0x22dbe2){if(!isInteractive())return console[_0x9a6379(0xb8)](a4_0x5c037e[_0x9a6379(0x116)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x9a6379(0xb8)](a4_0x5c037e['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4ce90f=await confirmKey(_0x9a6379(0x125)+_0xa6c4d+'\x22\x20to\x20new\x20project\x20\x22'+_0x3a5b26+'\x22?');if(!_0x4ce90f)return console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x139)](_0x9a6379(0x76))),0x1;}const {data:_0x13ddb3}=await withSpinner(_0x9a6379(0xdd)+_0xa6c4d+_0x9a6379(0x100)+_0x3a5b26+_0x9a6379(0xa3),()=>_0x37b077[_0x9a6379(0xab)][_0x9a6379(0xad)](_0xa6c4d,_0x3a5b26,{'dryRun':_0x22dbe2}));if(_0x22dbe2){console[_0x9a6379(0xe4)](a4_0x5c037e['yellow'](_0x9a6379(0x119))),console[_0x9a6379(0xe4)](_0x9a6379(0xf2)+_0x13ddb3[_0x9a6379(0x8a)]),console['log'](_0x9a6379(0x7c)+_0x3a5b26),console[_0x9a6379(0xe4)](_0x9a6379(0x129)),console[_0x9a6379(0xe4)](_0x9a6379(0xd2)+_0x13ddb3[_0x9a6379(0xa8)]['agents'][_0x9a6379(0x8d)]),console['log'](_0x9a6379(0xa9)+_0x13ddb3['counts'][_0x9a6379(0xa7)][_0x9a6379(0x8d)]),console['log'](_0x9a6379(0x104)+_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x97)][_0x9a6379(0x8d)]),console['log']('\x20\x20Form\x20Interfaces:\x20'+_0x13ddb3[_0x9a6379(0xa8)]['formInterfaces']['created']),console['log'](_0x9a6379(0xe0)+_0x13ddb3[_0x9a6379(0xa8)]['chatInterfaces']['created']);const _0x3bd9c4=_0x13ddb3[_0x9a6379(0xa8)]['experimentalKnowledgeBases'][_0x9a6379(0x8d)]>0x0||_0x13ddb3['counts']['experimentalArtifacts'][_0x9a6379(0x8d)]>0x0;return _0x3bd9c4&&(console[_0x9a6379(0xe4)](_0x9a6379(0xef)+_0x13ddb3['counts']['experimentalKnowledgeBases'][_0x9a6379(0x8d)]),console[_0x9a6379(0xe4)](_0x9a6379(0xe2)+_0x13ddb3['counts'][_0x9a6379(0x13c)]['created'])),0x0;}const _0x4e6a07=_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0xf6)][_0x9a6379(0x10d)]>0x0||_0x13ddb3[_0x9a6379(0xa8)]['knowledgeBases'][_0x9a6379(0x10d)]>0x0||_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x97)][_0x9a6379(0x10d)]>0x0||_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0xb0)][_0x9a6379(0x10d)]>0x0||_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x131)][_0x9a6379(0x10d)]>0x0||_0x13ddb3['counts'][_0x9a6379(0xba)][_0x9a6379(0x10d)]>0x0||_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x13c)][_0x9a6379(0x10d)]>0x0;_0x4e6a07?console[_0x9a6379(0xe4)](a4_0x5c037e['yellow'](_0x9a6379(0xaa))):console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0xd1)](_0x9a6379(0x8c)));console[_0x9a6379(0xe4)](_0x9a6379(0xf2)+_0x13ddb3[_0x9a6379(0x8a)]),console[_0x9a6379(0xe4)]('New\x20project:\x20'+_0x13ddb3[_0x9a6379(0x136)]),console[_0x9a6379(0xe4)](_0x9a6379(0xec)+_0x13ddb3[_0x9a6379(0x128)]),console['log'](),console[_0x9a6379(0xe4)](_0x9a6379(0xfd)),console[_0x9a6379(0xe4)](_0x9a6379(0xd2)+formatCountSummary(_0x13ddb3[_0x9a6379(0xa8)]['agents'])),console[_0x9a6379(0xe4)](_0x9a6379(0xa9)+formatCountSummary(_0x13ddb3[_0x9a6379(0xa8)]['knowledgeBases'])),console['log'](_0x9a6379(0x104)+formatCountSummary(_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x97)])),console[_0x9a6379(0xe4)](_0x9a6379(0x9e)+formatCountSummary(_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x94)])),console[_0x9a6379(0xe4)](_0x9a6379(0x114)+formatCountSummary(_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0xb0)])),console[_0x9a6379(0xe4)]('\x20\x20Chat\x20Interfaces:\x20'+formatCountSummary(_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x131)]));const _0x4f59cb=_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0xba)][_0x9a6379(0x8d)]>0x0||_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0xba)]['updated']>0x0||_0x13ddb3[_0x9a6379(0xa8)]['experimentalKnowledgeBases'][_0x9a6379(0xff)]>0x0||_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x13c)][_0x9a6379(0x8d)]>0x0||_0x13ddb3[_0x9a6379(0xa8)]['experimentalArtifacts'][_0x9a6379(0xd8)]>0x0||_0x13ddb3['counts'][_0x9a6379(0x13c)][_0x9a6379(0xff)]>0x0;_0x4f59cb&&(console['log'](_0x9a6379(0xef)+formatCountSummary(_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0xba)])),console[_0x9a6379(0xe4)](_0x9a6379(0xe2)+formatCountSummary(_0x13ddb3[_0x9a6379(0xa8)][_0x9a6379(0x13c)])));if(_0x4e6a07){console[_0x9a6379(0xe4)](),console['log'](a4_0x5c037e[_0x9a6379(0x116)]('Errors:'));for(const _0x325555 of _0x13ddb3[_0x9a6379(0xf6)]){_0x325555[_0x9a6379(0x135)]==='error'&&console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x116)](_0x9a6379(0x111)+_0x325555['agentName']+_0x9a6379(0xb2)+_0x325555[_0x9a6379(0xb8)]));}for(const _0x503b90 of _0x13ddb3['knowledgeBases']){_0x503b90[_0x9a6379(0x135)]===_0x9a6379(0xb8)&&console['log'](a4_0x5c037e['red'](_0x9a6379(0xfa)+_0x503b90['name']+_0x9a6379(0xb2)+_0x503b90[_0x9a6379(0xb8)]));}for(const _0x944a09 of _0x13ddb3[_0x9a6379(0x97)]){_0x944a09[_0x9a6379(0x135)]===_0x9a6379(0xb8)&&console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x116)](_0x9a6379(0x10c)+_0x944a09[_0x9a6379(0xe5)]+_0x9a6379(0xb2)+_0x944a09['error']));}for(const _0x2c8d44 of _0x13ddb3['integrations']){_0x2c8d44[_0x9a6379(0x135)]==='error'&&console[_0x9a6379(0xe4)](a4_0x5c037e['red'](_0x9a6379(0x7f)+_0x2c8d44['name']+'\x22:\x20'+_0x2c8d44[_0x9a6379(0xb8)]));}for(const _0x36caf3 of _0x13ddb3['formInterfaces']){_0x36caf3[_0x9a6379(0x135)]===_0x9a6379(0xb8)&&console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x116)](_0x9a6379(0xac)+_0x36caf3[_0x9a6379(0xe5)]+_0x9a6379(0xb2)+_0x36caf3[_0x9a6379(0xb8)]));}for(const _0x5ec37e of _0x13ddb3['chatInterfaces']){_0x5ec37e[_0x9a6379(0x135)]==='error'&&console['log'](a4_0x5c037e[_0x9a6379(0x116)](_0x9a6379(0x92)+_0x5ec37e[_0x9a6379(0xe5)]+_0x9a6379(0xb2)+_0x5ec37e[_0x9a6379(0xb8)]));}for(const _0x1530c0 of _0x13ddb3[_0x9a6379(0xba)]){_0x1530c0['action']==='error'&&console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x116)](_0x9a6379(0x8f)+_0x1530c0[_0x9a6379(0xe5)]+_0x9a6379(0xb2)+_0x1530c0['error']));}for(const _0x553c4e of _0x13ddb3[_0x9a6379(0x13c)]){_0x553c4e[_0x9a6379(0x135)]===_0x9a6379(0xb8)&&console[_0x9a6379(0xe4)](a4_0x5c037e[_0x9a6379(0x116)](_0x9a6379(0xe3)+_0x553c4e[_0x9a6379(0xe5)]+_0x9a6379(0xb2)+_0x553c4e['error']));}return 0x1;}console[_0x9a6379(0xe4)]();const _0x10e9d5=getLLMProjectUrl(_0xf617ff,_0x13ddb3[_0x9a6379(0x128)]);return console[_0x9a6379(0xe4)](_0x9a6379(0x105)+a4_0x5c037e[_0x9a6379(0xf4)](_0x10e9d5)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x30fe7e(0xe5)]='agent:push';[a4_0x30fe7e(0x9c)]='Push\x20local\x20agent\x20files\x20to\x20LLM\x20project';async[a4_0x30fe7e(0x134)](_0x2e44d1){const _0x321f13=a4_0x30fe7e,{options:_0x1bc3e0,args:_0x3022f3,tdx:_0x21e2ed}=_0x2e44d1;let _0x4a4b93=_0x3022f3[0x0]||process[_0x321f13(0xf3)]();const _0x27cd7a=_0x1bc3e0[_0x321f13(0x9b)],_0x3c0510=_0x1bc3e0[_0x321f13(0x123)],_0x582a3a=_0x1bc3e0['yes'],_0x17e61b=_0x1bc3e0[_0x321f13(0x112)],_0x2e4a9c=a4_0x4fc7ef[_0x321f13(0xeb)](_0x4a4b93,_0x321f13(0xa6)),_0x20637e=existsSync(_0x2e4a9c);if(_0x20637e){const {data:_0x5aba0c}=await withSpinner(_0x321f13(0x83)+_0x4a4b93+_0x321f13(0xa3),()=>_0x21e2ed['llm'][_0x321f13(0xf5)](_0x4a4b93,{'dryRun':_0x27cd7a,'force':_0x3c0510}));if(_0x27cd7a)return console['log'](a4_0x5c037e[_0x321f13(0x139)](_0x321f13(0x119))),console[_0x321f13(0xe4)](_0x321f13(0xf7)+_0x5aba0c[_0x321f13(0x89)]),0x0;if(_0x5aba0c[_0x321f13(0x135)]==='error')return console['log'](a4_0x5c037e['red'](_0x321f13(0x122)+_0x5aba0c[_0x321f13(0xb8)])),0x1;console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0xd1)](_0x321f13(0xb9)+_0x5aba0c['action']+_0x321f13(0xf0))),console[_0x321f13(0xe4)](_0x321f13(0xc9)+_0x5aba0c['agentName']);if(_0x5aba0c[_0x321f13(0x10a)]&&_0x5aba0c['projectId']){const _0x15184b=getLLMAgentChatUrl(_0x17e61b,_0x5aba0c[_0x321f13(0x12d)],_0x5aba0c['agentId']);console['log'](_0x321f13(0x130)+a4_0x5c037e[_0x321f13(0xf4)](_0x15184b));}return 0x0;}const _0x3dc55c=_0x1bc3e0[_0x321f13(0xce)],_0x14c211=resolveProjectFromContext(_0x4a4b93,_0x3dc55c);if(_0x14c211[_0x321f13(0x117)])_0x4a4b93=_0x14c211[_0x321f13(0xf1)],_0x14c211[_0x321f13(0x120)]===_0x321f13(0x107)&&console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0x12f)]('Using\x20project:\x20'+_0x4a4b93));else{let _0x41df23='Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.';_0x14c211[_0x321f13(0x12e)]===_0x321f13(0x102)&&(_0x41df23=_0x14c211[_0x321f13(0xed)]+_0x321f13(0x81)+_0x14c211[_0x321f13(0xce)]+_0x321f13(0x7e));throw new SDKError(ErrorCode[_0x321f13(0xea)],_0x14c211[_0x321f13(0x12e)]==='no_context'?_0x14c211[_0x321f13(0xed)]:_0x321f13(0x77)+_0x4a4b93,undefined,{'helpText':_0x41df23});}const {data:_0x255611}=await withSpinner(_0x321f13(0x10e),()=>_0x21e2ed[_0x321f13(0xab)]['pushProject'](_0x4a4b93,{'dryRun':!![]})),_0x552cff=_0x255611[_0x321f13(0xa8)][_0x321f13(0xf6)]['errors']>0x0;if(_0x552cff){console['log'](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0xdf)));for(const _0x499fd1 of _0x255611[_0x321f13(0xf6)]){_0x499fd1[_0x321f13(0x135)]===_0x321f13(0xb8)&&console['log'](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0x111)+_0x499fd1[_0x321f13(0x89)]+'\x22:\x20'+_0x499fd1['error']));}return 0x1;}const _0x47d83a=_0x255611['counts'][_0x321f13(0xf6)][_0x321f13(0x8d)]+_0x255611[_0x321f13(0xa8)]['knowledgeBases'][_0x321f13(0x8d)]+_0x255611[_0x321f13(0xa8)]['textKnowledgeBases'][_0x321f13(0x8d)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0x97)][_0x321f13(0x8d)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0x94)][_0x321f13(0x8d)]+_0x255611['counts']['experimentalKnowledgeBases'][_0x321f13(0x8d)]+_0x255611[_0x321f13(0xa8)]['experimentalArtifacts']['created']+_0x255611['counts'][_0x321f13(0xb0)]['created']+_0x255611[_0x321f13(0xa8)][_0x321f13(0x131)][_0x321f13(0x8d)],_0x568ab0=_0x255611[_0x321f13(0xa8)][_0x321f13(0xf6)]['updated']+_0x255611[_0x321f13(0xa8)][_0x321f13(0xa7)][_0x321f13(0xd8)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0x87)][_0x321f13(0xd8)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0x97)]['updated']+_0x255611['counts'][_0x321f13(0x94)]['updated']+_0x255611[_0x321f13(0xa8)][_0x321f13(0xba)][_0x321f13(0xd8)]+_0x255611[_0x321f13(0xa8)]['experimentalArtifacts']['updated']+_0x255611['counts'][_0x321f13(0xb0)][_0x321f13(0xd8)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0x131)]['updated'],_0x111d4e=_0x255611[_0x321f13(0xa8)][_0x321f13(0xf6)][_0x321f13(0xff)]+_0x255611['counts']['knowledgeBases']['unchanged']+_0x255611[_0x321f13(0xa8)][_0x321f13(0x87)][_0x321f13(0xff)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0x97)][_0x321f13(0xff)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0x94)][_0x321f13(0xff)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0xba)][_0x321f13(0xff)]+_0x255611[_0x321f13(0xa8)]['experimentalArtifacts'][_0x321f13(0xff)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0xb0)][_0x321f13(0xff)]+_0x255611[_0x321f13(0xa8)][_0x321f13(0x131)][_0x321f13(0xff)];console['log'](_0x321f13(0xcc)+_0x255611[_0x321f13(0xd7)]+'\x27:'),console[_0x321f13(0xe4)]('\x20\x20'+a4_0x5c037e[_0x321f13(0xd1)]('+\x20'+_0x47d83a+_0x321f13(0x113))+'\x20|\x20'+a4_0x5c037e[_0x321f13(0x139)]('~\x20'+_0x568ab0+_0x321f13(0x13b))+_0x321f13(0xee)+a4_0x5c037e['dim']('=\x20'+_0x111d4e+'\x20unchanged')),console[_0x321f13(0xe4)]('\x20\x20Agents:\x20'+formatCountSummary(_0x255611[_0x321f13(0xa8)][_0x321f13(0xf6)])),console[_0x321f13(0xe4)](_0x321f13(0xa9)+formatCountSummary(_0x255611['counts'][_0x321f13(0xa7)])),console[_0x321f13(0xe4)](_0x321f13(0xa4)+formatCountSummary(_0x255611[_0x321f13(0xa8)]['textKnowledgeBases'])),console[_0x321f13(0xe4)](_0x321f13(0x104)+formatCountSummary(_0x255611[_0x321f13(0xa8)]['prompts'])),console[_0x321f13(0xe4)](_0x321f13(0x9e)+formatCountSummary(_0x255611['counts']['integrations'])),console[_0x321f13(0xe4)](_0x321f13(0x114)+formatCountSummary(_0x255611[_0x321f13(0xa8)][_0x321f13(0xb0)])),console[_0x321f13(0xe4)](_0x321f13(0xe0)+formatCountSummary(_0x255611[_0x321f13(0xa8)][_0x321f13(0x131)]));const _0x42fb3c=_0x255611[_0x321f13(0xa8)][_0x321f13(0xba)][_0x321f13(0x8d)]>0x0||_0x255611[_0x321f13(0xa8)]['experimentalKnowledgeBases'][_0x321f13(0xd8)]>0x0||_0x255611[_0x321f13(0xa8)][_0x321f13(0xba)][_0x321f13(0xff)]>0x0||_0x255611[_0x321f13(0xa8)][_0x321f13(0x13c)]['created']>0x0||_0x255611[_0x321f13(0xa8)]['experimentalArtifacts'][_0x321f13(0xd8)]>0x0||_0x255611['counts'][_0x321f13(0x13c)]['unchanged']>0x0;_0x42fb3c&&(console[_0x321f13(0xe4)](_0x321f13(0xef)+formatCountSummary(_0x255611['counts']['experimentalKnowledgeBases'])),console['log'](_0x321f13(0xe2)+formatCountSummary(_0x255611[_0x321f13(0xa8)]['experimentalArtifacts'])));console['log'](_0x321f13(0xd5)+a4_0x5c037e[_0x321f13(0xf4)](_0x4a4b93)),displayDiffs(_0x255611['agents'],_0x255611[_0x321f13(0xa7)],_0x255611[_0x321f13(0x87)],_0x255611[_0x321f13(0x97)],_0x255611[_0x321f13(0x94)],_0x255611['experimentalKnowledgeBases'],_0x255611['experimentalArtifacts'],_0x255611[_0x321f13(0xb0)],_0x255611['chatInterfaces']);if(_0x27cd7a)return console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0x139)](_0x321f13(0x9a))),0x0;if(_0x47d83a===0x0&&_0x568ab0===0x0){console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0xd1)](_0x321f13(0xdc)));const _0x10a3cd=getLLMProjectUrl(_0x17e61b,_0x255611[_0x321f13(0x12d)]);return console[_0x321f13(0xe4)]('Project:\x20'+a4_0x5c037e[_0x321f13(0xf4)](_0x10a3cd)),0x0;}if(!_0x582a3a&&!_0x3c0510){if(!isInteractive())return console[_0x321f13(0xb8)](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0xc8)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x321f13(0xb8)](a4_0x5c037e['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xb7d0a7=await confirmKey(_0x321f13(0xb6)+(_0x47d83a+_0x568ab0)+_0x321f13(0x8e));if(!_0xb7d0a7)return console[_0x321f13(0xe4)](a4_0x5c037e['yellow'](_0x321f13(0x76)),'-\x20nothing\x20pushed'),0x1;}const {data:_0x3e9276}=await withSpinner(_0x321f13(0xbf),()=>_0x21e2ed['llm'][_0x321f13(0x13a)](_0x4a4b93,{'force':_0x3c0510})),_0x5ce6f9=_0x3e9276[_0x321f13(0xa8)][_0x321f13(0xf6)][_0x321f13(0x10d)]>0x0||_0x3e9276[_0x321f13(0xa8)]['knowledgeBases'][_0x321f13(0x10d)]>0x0||_0x3e9276['counts'][_0x321f13(0x87)]['errors']>0x0||_0x3e9276[_0x321f13(0xa8)][_0x321f13(0x97)][_0x321f13(0x10d)]>0x0||_0x3e9276[_0x321f13(0xa8)][_0x321f13(0xb0)][_0x321f13(0x10d)]>0x0||_0x3e9276[_0x321f13(0xa8)][_0x321f13(0x131)][_0x321f13(0x10d)]>0x0;if(_0x5ce6f9){console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0x139)](_0x321f13(0xb7))),console[_0x321f13(0xe4)](),console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0x133)));for(const _0x5c9147 of _0x3e9276[_0x321f13(0xf6)]){_0x5c9147[_0x321f13(0x135)]===_0x321f13(0xb8)&&console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0x111)+_0x5c9147[_0x321f13(0x89)]+_0x321f13(0xb2)+_0x5c9147[_0x321f13(0xb8)]));}for(const _0x533dfb of _0x3e9276[_0x321f13(0xa7)]){_0x533dfb['action']===_0x321f13(0xb8)&&console[_0x321f13(0xe4)](a4_0x5c037e['red'](_0x321f13(0xfa)+_0x533dfb[_0x321f13(0xe5)]+_0x321f13(0xb2)+_0x533dfb[_0x321f13(0xb8)]));}for(const _0x1899f2 of _0x3e9276[_0x321f13(0x87)]){_0x1899f2[_0x321f13(0x135)]===_0x321f13(0xb8)&&console['log'](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0x124)+_0x1899f2['name']+_0x321f13(0xb2)+_0x1899f2[_0x321f13(0xb8)]));}for(const _0x357bac of _0x3e9276[_0x321f13(0x97)]){_0x357bac[_0x321f13(0x135)]===_0x321f13(0xb8)&&console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0x10c)+_0x357bac[_0x321f13(0xe5)]+'\x22:\x20'+_0x357bac['error']));}for(const _0x403790 of _0x3e9276['integrations']){_0x403790[_0x321f13(0x135)]===_0x321f13(0xb8)&&console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0x116)]('\x20\x20Integration\x20\x22'+_0x403790[_0x321f13(0xe5)]+_0x321f13(0xb2)+_0x403790[_0x321f13(0xb8)]));}for(const _0x553ccc of _0x3e9276[_0x321f13(0xb0)]){_0x553ccc[_0x321f13(0x135)]==='error'&&console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0xac)+_0x553ccc['name']+_0x321f13(0xb2)+_0x553ccc[_0x321f13(0xb8)]));}for(const _0x409c0f of _0x3e9276['chatInterfaces']){_0x409c0f['action']==='error'&&console['log'](a4_0x5c037e[_0x321f13(0x116)](_0x321f13(0x92)+_0x409c0f[_0x321f13(0xe5)]+_0x321f13(0xb2)+_0x409c0f[_0x321f13(0xb8)]));}return 0x1;}console[_0x321f13(0xe4)](a4_0x5c037e[_0x321f13(0xd1)](_0x321f13(0x110)+(_0x47d83a+_0x568ab0)+_0x321f13(0xe6)+_0x3e9276[_0x321f13(0xd7)]+'\x27'));const _0x380501=getLLMProjectUrl(_0x17e61b,_0x3e9276[_0x321f13(0x12d)]);return console[_0x321f13(0xe4)](_0x321f13(0x105)+a4_0x5c037e['cyan'](_0x380501)),0x0;}}
1
+ const a4_0x1c6899=a4_0x1107;function a4_0x1107(_0x4ad24d,_0x57014a){_0x4ad24d=_0x4ad24d-0x1d0;const _0x46eca8=a4_0x46ec();let _0x1107c7=_0x46eca8[_0x4ad24d];return _0x1107c7;}function a4_0x46ec(){const _0x231fe4=['Using\x20project:\x20','\x20total','\x0aChanges\x20to\x20form\x20interface\x20\x27','created','message','force','\x20\x20Integration\x20\x22','\x20\x20tdx\x20agent\x20pull\x20','cyan','diff','found','agent.yml','projectDir','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','\x20\x20tdx\x20agent\x20clone\x20--name\x20<new-name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clone\x20from\x20context\x20(llm_project)','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','tdx.json','projectName','\x0aPush\x20','\x0aChanges\x20to\x20prompt\x20\x27','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20project','INVALID_ARGUMENT','\x20resources\x20to\x20\x27','dirname','pushAgent','\x20\x20Chat\x20Interfaces:\x20','\x20\x20Form\x20Interface\x20\x22','cwd','counts','execute','\x20successfully','\x20\x20Target:\x20','name','18615PzvZGL','unchanged','red','chatInterfaces','\x0a✔\x20Pushed\x20','\x20\x20Prompts:\x20','\x20created','parse','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x0aWrite\x20','Cloning\x20\x22','\x20\x20Prompt\x20\x22','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','agentId','cloneProject','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','Source:\x20','projectId','Dry\x20run\x20-\x20no\x20changes\x20made','\x0aChanges\x20to\x20integration\x20\x27','new','\x20\x20Chat\x20Interface\x20\x22','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','\x0aErrors\x20found:','agent:push','\x22\x20to\x20new\x20project\x20\x22','\x20resources?','updated','reason','Output:\x20','\x0aPull\x20summary\x20for\x20\x27','\x20errors','\x20\x20Form\x20Interfaces:\x20','sourceProjectName','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','\x20\x20Agent\x20\x22','-\x20nothing\x20pushed','repeat','\x20\x20Experimental\x20Artifact\x20\x22','dryRun','\x0aChanges\x20to\x20chat\x20interface\x20\x27','Agent\x20pulled\x20successfully','formInterfaces','\x20\x20Knowledge\x20Bases:\x20','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','error','errors','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','session','84rDKWki','Cancelled','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','<new-name>','Pushing\x20agent\x20from\x20\x22','arg-dir','cwd-config','experimentalKnowledgeBases','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','New\x20project:\x20','-\x20no\x20files\x20written','\x22\x20from\x20project\x20\x22','Analyzing\x20changes\x20to\x20push...','\x20=\x20','Chat:\x20','\x20changed','agents','\x20new','Usage:\x20tdx\x20agent\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)','\x22:\x20','421897llbIuw','Would\x20pull\x20agent:\x20','\x20|\x20','Using\x20project\x20from\x20context:\x20','outputDir','experimentalArtifacts','source','Status:\x20','26905572MLWaId','Using\x20local\x20project:\x20','context','Using\x20current\x20project:\x20','\x20files?','green','No\x20tdx.json\x20found\x20in\x20','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','Pushing\x20to\x20project...','\x27\x20to\x20create\x20the\x20folder\x20structure.','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','log','220438WKaQRn','\x0aPush\x20summary\x20for\x20\x27','llm_project','Output\x20path:\x20','Errors:','\x20unchanged','prompts','Dry\x20run\x20-\x20no\x20files\x20written','\x20files\x20to\x20','dim','pullProject','yellow','Analyzing\x20project\x20\x22','6941808gMZbyV','Agent:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<local-dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20to\x20existing\x20local\x20directory','push','gray','MISSING_ARGUMENT','isNew','agentName','\x0aChanges:','\x20\x20Experimental\x20Artifacts:\x20','newProjectId','33cmzPNR','\x20\x20tdx\x20agent\x20clone\x20agents/','action','\x20\x20Knowledge\x20Base\x20\x22','hasChanges','\x20\x20Integrations:\x20','Writing\x20files...','Would\x20push\x20agent:\x20','\x20\x20Agents:\x20','llm','newProjectName','join','no_local_folder','yes','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','pushProject','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project','utf-8','Project:\x20','agent','\x22...','description','Project\x20cloned\x20with\x20errors','total','\x20--profile\x20','Using\x20context\x20project:\x20','\x20--name\x20','\x20\x20Text\x20Knowledge\x20Bases:\x20','Summary:','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','integrations','pullAgent','✔\x20Context\x20set:\x20','llmProject','1412500UpeyLV','689810liWMMQ','textKnowledgeBases','knowledgeBases','\x0aError:','New\x20project\x20ID:\x20','profile','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','\x20updated','outputPath'];a4_0x46ec=function(){return _0x231fe4;};return a4_0x46ec();}(function(_0x208b42,_0x1d3d6d){const _0x7bf5cc=a4_0x1107,_0x355dfd=_0x208b42();while(!![]){try{const _0x3aa864=-parseInt(_0x7bf5cc(0x27e))/0x1+-parseInt(_0x7bf5cc(0x242))/0x2*(parseInt(_0x7bf5cc(0x25a))/0x3)+-parseInt(_0x7bf5cc(0x27d))/0x4+-parseInt(_0x7bf5cc(0x1e6))/0x5+parseInt(_0x7bf5cc(0x21a))/0x6*(parseInt(_0x7bf5cc(0x22e))/0x7)+-parseInt(_0x7bf5cc(0x24f))/0x8+parseInt(_0x7bf5cc(0x236))/0x9;if(_0x3aa864===_0x1d3d6d)break;else _0x355dfd['push'](_0x355dfd['shift']());}catch(_0x398a4c){_0x355dfd['push'](_0x355dfd['shift']());}}}(a4_0x46ec,0xac7cd));import a4_0x33712f from'chalk';import a4_0x21a3c8 from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function formatCountSummary(_0x732e5f){const _0x7bc9ef=a4_0x1107,_0x444ece=[];if(_0x732e5f['total']!==undefined)_0x444ece[_0x7bc9ef(0x252)](_0x732e5f['total']+_0x7bc9ef(0x288));if(_0x732e5f[_0x7bc9ef(0x1fc)]!==undefined&&_0x732e5f[_0x7bc9ef(0x1fc)]>0x0)_0x444ece[_0x7bc9ef(0x252)](a4_0x33712f[_0x7bc9ef(0x23b)](_0x732e5f[_0x7bc9ef(0x1fc)]+'\x20new'));if(_0x732e5f[_0x7bc9ef(0x28a)]!==undefined&&_0x732e5f[_0x7bc9ef(0x28a)]>0x0)_0x444ece['push'](a4_0x33712f[_0x7bc9ef(0x23b)](_0x732e5f[_0x7bc9ef(0x28a)]+_0x7bc9ef(0x1ec)));if(_0x732e5f[_0x7bc9ef(0x203)]!==undefined&&_0x732e5f[_0x7bc9ef(0x203)]>0x0)_0x444ece[_0x7bc9ef(0x252)](a4_0x33712f[_0x7bc9ef(0x24d)](_0x732e5f[_0x7bc9ef(0x203)]+_0x7bc9ef(0x285)));if(_0x732e5f['unchanged']!==undefined&&_0x732e5f[_0x7bc9ef(0x1e7)]>0x0)_0x444ece[_0x7bc9ef(0x252)](a4_0x33712f[_0x7bc9ef(0x253)](_0x732e5f['unchanged']+_0x7bc9ef(0x247)));if(_0x732e5f[_0x7bc9ef(0x217)]!==undefined&&_0x732e5f[_0x7bc9ef(0x217)]>0x0)_0x444ece[_0x7bc9ef(0x252)](a4_0x33712f[_0x7bc9ef(0x1e8)](_0x732e5f[_0x7bc9ef(0x217)]+_0x7bc9ef(0x207)));return _0x444ece['join'](',\x20');}function displayDiffs(_0x1023e1,_0x200940,_0x48f486,_0x160066,_0x2677a3,_0x98d738,_0x5d4383,_0x58e97f,_0x4c68f0){const _0xba4df3=a4_0x1107;for(const _0x4acc76 of _0x1023e1){if(_0x4acc76[_0xba4df3(0x290)]){const _0x1d642e=_0x4acc76[_0xba4df3(0x256)]||_0x4acc76[_0xba4df3(0x1e5)];console[_0xba4df3(0x241)]('\x0aChanges\x20to\x20agent\x20\x27'+_0x1d642e+'\x27:'),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)),console[_0xba4df3(0x241)](_0x4acc76[_0xba4df3(0x290)]),console['log']('─'[_0xba4df3(0x20d)](0x3c));}}for(const _0x425e5b of _0x200940){_0x425e5b[_0xba4df3(0x290)]&&(console[_0xba4df3(0x241)](_0xba4df3(0x214)+_0x425e5b[_0xba4df3(0x1e5)]+'\x27:'),console['log']('─'[_0xba4df3(0x20d)](0x3c)),console[_0xba4df3(0x241)](_0x425e5b[_0xba4df3(0x290)]),console[_0xba4df3(0x241)]('─'['repeat'](0x3c)));}for(const _0x542ff1 of _0x48f486){_0x542ff1[_0xba4df3(0x290)]&&(console[_0xba4df3(0x241)](_0xba4df3(0x278)+_0x542ff1[_0xba4df3(0x1e5)]+'\x27:'),console['log']('─'[_0xba4df3(0x20d)](0x3c)),console[_0xba4df3(0x241)](_0x542ff1[_0xba4df3(0x290)]),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)));}for(const _0x193164 of _0x160066){_0x193164[_0xba4df3(0x290)]&&(console['log'](_0xba4df3(0x1d7)+_0x193164['name']+'\x27:'),console[_0xba4df3(0x241)]('─'['repeat'](0x3c)),console[_0xba4df3(0x241)](_0x193164[_0xba4df3(0x290)]),console[_0xba4df3(0x241)]('─'['repeat'](0x3c)));}for(const _0x31ea4f of _0x2677a3){_0x31ea4f['diff']&&(console['log'](_0xba4df3(0x1fb)+_0x31ea4f[_0xba4df3(0x1e5)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console['log'](_0x31ea4f[_0xba4df3(0x290)]),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)));}for(const _0x13ecaa of _0x98d738){_0x13ecaa['diff']&&(console['log'](_0xba4df3(0x222)+_0x13ecaa[_0xba4df3(0x1e5)]+'\x27:'),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)),console[_0xba4df3(0x241)](_0x13ecaa[_0xba4df3(0x290)]),console['log']('─'[_0xba4df3(0x20d)](0x3c)));}for(const _0x270973 of _0x5d4383){_0x270973[_0xba4df3(0x290)]&&(console[_0xba4df3(0x241)]('\x0aChanges\x20to\x20experimental\x20artifact\x20\x27'+_0x270973[_0xba4df3(0x1e5)]+'\x27:'),console[_0xba4df3(0x241)]('─'['repeat'](0x3c)),console['log'](_0x270973[_0xba4df3(0x290)]),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)));}for(const _0x2cb3c6 of _0x58e97f){_0x2cb3c6['diff']&&(console[_0xba4df3(0x241)](_0xba4df3(0x289)+_0x2cb3c6[_0xba4df3(0x1e5)]+'\x27:'),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)),console[_0xba4df3(0x241)](_0x2cb3c6[_0xba4df3(0x290)]),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)));}for(const _0x110d6a of _0x4c68f0){_0x110d6a[_0xba4df3(0x290)]&&(console[_0xba4df3(0x241)](_0xba4df3(0x210)+_0x110d6a[_0xba4df3(0x1e5)]+'\x27:'),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)),console[_0xba4df3(0x241)](_0x110d6a[_0xba4df3(0x290)]),console[_0xba4df3(0x241)]('─'[_0xba4df3(0x20d)](0x3c)));}}export class AgentPullCommand extends BaseCommand{['name']='agent:pull';['description']=a4_0x1c6899(0x1d1);async[a4_0x1c6899(0x1e2)](_0x3b892d){const _0xa12523=a4_0x1c6899,{options:_0x11bf4c,args:_0x54e08e,tdx:_0x43cab2}=_0x3b892d,_0x3b185e=_0x54e08e[0x0],_0x47b914=_0x54e08e[0x1],_0x1b2495=_0x11bf4c['output'],_0x3ed9a6=_0x11bf4c[_0xa12523(0x20f)],_0x1602ca=_0x11bf4c[_0xa12523(0x28c)],_0x3addc3=_0x11bf4c[_0xa12523(0x267)],_0x140f01=_0x11bf4c[_0xa12523(0x27c)],_0x56383a=_0x11bf4c[_0xa12523(0x26d)];let _0x21e085;if(_0x3b185e){const _0x45d976=a4_0x21a3c8[_0xa12523(0x265)](_0x3b185e,_0xa12523(0x1d4));if(existsSync(_0x45d976))try{const _0x3f78bf=JSON['parse'](readFileSync(_0x45d976,'utf-8'));_0x3f78bf[_0xa12523(0x244)]&&(_0x21e085={'llm_project':_0x3f78bf[_0xa12523(0x244)]});}catch{}}const _0x448317=findAgentConfigPath(process[_0xa12523(0x1e0)]());let _0x15a6a7;if(_0x448317)try{const _0x1b32ae=JSON[_0xa12523(0x1ed)](readFileSync(_0x448317,_0xa12523(0x26b)));_0x1b32ae[_0xa12523(0x244)]&&(_0x15a6a7={'llm_project':_0x1b32ae[_0xa12523(0x244)]});}catch{}const _0x10b522=resolveAgentPullArgs({'arg':_0x3b185e,'agentNameArg':_0x47b914,'agentFlag':_0x56383a,'contextProject':_0x140f01,'argDirConfig':_0x21e085,'cwdConfigPath':_0x448317||undefined,'cwdConfig':_0x15a6a7}),{projectNameOrId:_0x436d24,targetAgentName:_0x3640db,existingOutputDir:_0x520cb7,source:_0x32418c}=_0x10b522;if(_0x32418c===_0xa12523(0x21f))console[_0xa12523(0x241)](a4_0x33712f['dim']('Using\x20project\x20from\x20'+a4_0x21a3c8[_0xa12523(0x265)](_0x3b185e,'tdx.json')+':\x20'+_0x436d24));else{if(_0x32418c===_0xa12523(0x220))console[_0xa12523(0x241)](a4_0x33712f[_0xa12523(0x24b)](_0xa12523(0x287)+_0x436d24));else _0x32418c==='context'&&console['log'](a4_0x33712f[_0xa12523(0x24b)](_0xa12523(0x231)+_0x436d24));}if(!_0x436d24)return _0x56383a?(console[_0xa12523(0x241)](a4_0x33712f['yellow']('The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a')),console[_0xa12523(0x241)](_0xa12523(0x284)),console['log'](_0xa12523(0x1d3))):(console[_0xa12523(0x241)](a4_0x33712f[_0xa12523(0x24d)](_0xa12523(0x1ee))),console[_0xa12523(0x241)](_0xa12523(0x22c)),console[_0xa12523(0x241)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project'),console[_0xa12523(0x241)](_0xa12523(0x251)),console[_0xa12523(0x241)](_0xa12523(0x26a)),console[_0xa12523(0x241)](_0xa12523(0x1d9))),0x1;if(_0x3640db){const {data:_0x5b381d}=await withSpinner('Pulling\x20agent\x20\x22'+_0x3640db+_0xa12523(0x225)+_0x436d24+_0xa12523(0x26e),()=>_0x43cab2[_0xa12523(0x263)][_0xa12523(0x27a)](_0x436d24,_0x3640db,_0x1b2495,{'dryRun':_0x3ed9a6,'force':_0x1602ca}));if(_0x3ed9a6)return console['log'](a4_0x33712f['yellow'](_0xa12523(0x249))),console[_0xa12523(0x241)](_0xa12523(0x22f)+_0x5b381d[_0xa12523(0x256)]),console[_0xa12523(0x241)](_0xa12523(0x245)+_0x5b381d[_0xa12523(0x286)]),_0x5b381d[_0xa12523(0x290)]&&(console['log'](_0xa12523(0x257)),console[_0xa12523(0x241)]('─'[_0xa12523(0x20d)](0x3c)),console[_0xa12523(0x241)](_0x5b381d[_0xa12523(0x290)]),console[_0xa12523(0x241)]('─'[_0xa12523(0x20d)](0x3c))),0x0;return console[_0xa12523(0x241)](a4_0x33712f[_0xa12523(0x23b)](_0xa12523(0x211))),console[_0xa12523(0x241)](_0xa12523(0x250)+_0x5b381d[_0xa12523(0x256)]),console[_0xa12523(0x241)](_0xa12523(0x205)+_0x5b381d[_0xa12523(0x286)]),console[_0xa12523(0x241)](_0xa12523(0x235)+(_0x5b381d[_0xa12523(0x255)]?a4_0x33712f[_0xa12523(0x23b)]('new'):_0x5b381d[_0xa12523(0x25e)]?a4_0x33712f[_0xa12523(0x24d)](_0xa12523(0x203)):a4_0x33712f[_0xa12523(0x253)](_0xa12523(0x1e7)))),0x0;}const _0x39596f=_0x520cb7||_0x1b2495,{data:_0x573ea5}=await withSpinner(_0xa12523(0x24e)+_0x436d24+_0xa12523(0x26e),()=>_0x43cab2[_0xa12523(0x263)]['pullProject'](_0x436d24,_0x39596f,{'dryRun':!![]})),_0x488b82=_0x573ea5['counts']['agents'][_0xa12523(0x1fc)]+_0x573ea5[_0xa12523(0x1e1)]['knowledgeBases'][_0xa12523(0x1fc)]+_0x573ea5[_0xa12523(0x1e1)]['textKnowledgeBases'][_0xa12523(0x1fc)]+_0x573ea5['counts'][_0xa12523(0x248)][_0xa12523(0x1fc)]+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x279)][_0xa12523(0x1fc)]+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x221)][_0xa12523(0x1fc)]+_0x573ea5[_0xa12523(0x1e1)]['experimentalArtifacts']['new']+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x212)][_0xa12523(0x1fc)]+_0x573ea5['counts'][_0xa12523(0x1e9)]['new'],_0x21e7a9=_0x573ea5[_0xa12523(0x1e1)]['agents']['updated']+_0x573ea5['counts'][_0xa12523(0x280)][_0xa12523(0x203)]+_0x573ea5[_0xa12523(0x1e1)]['textKnowledgeBases']['updated']+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x248)][_0xa12523(0x203)]+_0x573ea5['counts'][_0xa12523(0x279)]['updated']+_0x573ea5[_0xa12523(0x1e1)]['experimentalKnowledgeBases'][_0xa12523(0x203)]+_0x573ea5[_0xa12523(0x1e1)]['experimentalArtifacts'][_0xa12523(0x203)]+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x212)][_0xa12523(0x203)]+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x1e9)][_0xa12523(0x203)],_0xfe0260=_0x573ea5[_0xa12523(0x1e1)]['agents']['unchanged']+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x280)][_0xa12523(0x1e7)]+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x27f)][_0xa12523(0x1e7)]+_0x573ea5[_0xa12523(0x1e1)]['prompts'][_0xa12523(0x1e7)]+_0x573ea5['counts'][_0xa12523(0x279)]['unchanged']+_0x573ea5[_0xa12523(0x1e1)]['experimentalKnowledgeBases'][_0xa12523(0x1e7)]+_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x233)][_0xa12523(0x1e7)]+_0x573ea5[_0xa12523(0x1e1)]['formInterfaces']['unchanged']+_0x573ea5[_0xa12523(0x1e1)]['chatInterfaces'][_0xa12523(0x1e7)];console[_0xa12523(0x241)](_0xa12523(0x206)+_0x573ea5[_0xa12523(0x1d5)]+'\x27:'),console[_0xa12523(0x241)]('\x20\x20'+a4_0x33712f['green']('+\x20'+_0x488b82+'\x20new')+_0xa12523(0x230)+a4_0x33712f[_0xa12523(0x24d)]('~\x20'+_0x21e7a9+_0xa12523(0x229))+_0xa12523(0x230)+a4_0x33712f[_0xa12523(0x24b)]('=\x20'+_0xfe0260+_0xa12523(0x247))),console[_0xa12523(0x241)](_0xa12523(0x262)+formatCountSummary(_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x22a)])),console[_0xa12523(0x241)](_0xa12523(0x213)+formatCountSummary(_0x573ea5[_0xa12523(0x1e1)]['knowledgeBases'])),console['log'](_0xa12523(0x275)+formatCountSummary(_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x27f)])),console['log'](_0xa12523(0x1eb)+formatCountSummary(_0x573ea5['counts'][_0xa12523(0x248)])),console[_0xa12523(0x241)](_0xa12523(0x25f)+formatCountSummary(_0x573ea5['counts'][_0xa12523(0x279)])),console[_0xa12523(0x241)](_0xa12523(0x208)+formatCountSummary(_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x212)])),console['log'](_0xa12523(0x1de)+formatCountSummary(_0x573ea5['counts']['chatInterfaces']));const _0x216e0c=_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x221)]['total']>0x0||_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x233)][_0xa12523(0x271)]>0x0;_0x216e0c&&(console[_0xa12523(0x241)](_0xa12523(0x23d)+formatCountSummary(_0x573ea5[_0xa12523(0x1e1)][_0xa12523(0x221)])),console[_0xa12523(0x241)](_0xa12523(0x258)+formatCountSummary(_0x573ea5[_0xa12523(0x1e1)]['experimentalArtifacts'])));console[_0xa12523(0x241)](_0xa12523(0x1e4)+a4_0x33712f[_0xa12523(0x28f)](_0x573ea5[_0xa12523(0x232)])),displayDiffs(_0x573ea5['agents'],_0x573ea5[_0xa12523(0x280)],_0x573ea5[_0xa12523(0x27f)],_0x573ea5[_0xa12523(0x248)],_0x573ea5[_0xa12523(0x279)],_0x573ea5[_0xa12523(0x221)],_0x573ea5[_0xa12523(0x233)],_0x573ea5[_0xa12523(0x212)],_0x573ea5[_0xa12523(0x1e9)]);if(_0x3ed9a6)return console['log'](a4_0x33712f[_0xa12523(0x24d)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x488b82===0x0&&_0x21e7a9===0x0)return console['log'](a4_0x33712f['green'](_0xa12523(0x240))),saveSessionContext({'llm_project':_0x573ea5[_0xa12523(0x1d5)]},_0x11bf4c[_0xa12523(0x219)]),console[_0xa12523(0x241)](a4_0x33712f[_0xa12523(0x23b)](_0xa12523(0x27b)+a4_0x33712f[_0xa12523(0x24b)]('llm_project')+_0xa12523(0x227)+a4_0x33712f['cyan'](_0x573ea5[_0xa12523(0x1d5)]))),0x0;if(!_0x3addc3&&!_0x1602ca){if(!isInteractive())return console[_0xa12523(0x216)](a4_0x33712f['red'](_0xa12523(0x281)),_0xa12523(0x1f3)),console[_0xa12523(0x216)](a4_0x33712f[_0xa12523(0x24b)](_0xa12523(0x1ef))),0x1;const _0x310ebd=await confirmKey(_0xa12523(0x1f0)+(_0x488b82+_0x21e7a9)+_0xa12523(0x23a));if(!_0x310ebd)return console[_0xa12523(0x241)](a4_0x33712f['yellow'](_0xa12523(0x21b)),_0xa12523(0x224)),0x1;}const {data:_0x1f13e2}=await withSpinner(_0xa12523(0x260),()=>_0x43cab2[_0xa12523(0x263)][_0xa12523(0x24c)](_0x436d24,_0x39596f,{'force':_0x1602ca}));return console[_0xa12523(0x241)](a4_0x33712f[_0xa12523(0x23b)]('\x0a✔\x20Pulled\x20'+(_0x488b82+_0x21e7a9)+_0xa12523(0x24a)+_0x1f13e2['outputDir'])),saveSessionContext({'llm_project':_0x1f13e2['projectName']},_0x11bf4c[_0xa12523(0x219)]),console[_0xa12523(0x241)](a4_0x33712f[_0xa12523(0x23b)](_0xa12523(0x27b)+a4_0x33712f['dim']('llm_project')+_0xa12523(0x227)+a4_0x33712f['cyan'](_0x1f13e2[_0xa12523(0x1d5)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x1c6899(0x1e5)]='agent:clone';[a4_0x1c6899(0x26f)]=a4_0x1c6899(0x1f7);async[a4_0x1c6899(0x1e2)](_0x31f1ae){const _0x28695b=a4_0x1c6899,{options:_0x45b089,args:_0x1e538c,tdx:_0x53f453}=_0x31f1ae,_0x2af92c=_0x1e538c[0x0],_0x465c59=_0x45b089[_0x28695b(0x1e5)],_0x3fd0b9=_0x45b089[_0x28695b(0x20f)],_0x44ad0b=_0x45b089[_0x28695b(0x267)],_0x4ef885=_0x45b089[_0x28695b(0x1d8)],_0xa46fec=_0x45b089['llmProject'];let _0x17a88b;const _0x4d1aa6=findAgentConfigPath(process['cwd']());if(_0x2af92c){const _0x1bffcb=a4_0x21a3c8[_0x28695b(0x265)](_0x2af92c,_0x28695b(0x1d4));existsSync(_0x1bffcb)?(_0x17a88b=_0x2af92c,console[_0x28695b(0x241)](a4_0x33712f['dim']('Using\x20local\x20project:\x20'+_0x2af92c))):_0x17a88b=_0x2af92c;}else{if(_0x4d1aa6)_0x17a88b=a4_0x21a3c8[_0x28695b(0x1dc)](_0x4d1aa6),console[_0x28695b(0x241)](a4_0x33712f[_0x28695b(0x24b)](_0x28695b(0x239)+_0x17a88b));else{if(_0xa46fec){const _0x3c1929=sanitizeForFilesystem(_0xa46fec);let _0x29dfa5=_0x3c1929,_0x2a9891=a4_0x21a3c8[_0x28695b(0x265)](process[_0x28695b(0x1e0)](),_0x28695b(0x22a),_0x3c1929,_0x28695b(0x1d4));if(!existsSync(_0x2a9891)){const _0x289c03=normalizeName(_0xa46fec),_0x304fc2=a4_0x21a3c8[_0x28695b(0x265)](process['cwd'](),_0x28695b(0x22a),_0x289c03,_0x28695b(0x1d4));existsSync(_0x304fc2)&&(_0x29dfa5=_0x289c03,_0x2a9891=_0x304fc2);}if(existsSync(_0x2a9891))_0x17a88b=a4_0x21a3c8[_0x28695b(0x1dc)](_0x2a9891),console[_0x28695b(0x241)](a4_0x33712f['dim'](_0x28695b(0x237)+_0x17a88b));else{const _0x1d3950=_0x45b089[_0x28695b(0x283)];if(_0x1d3950)throw new SDKError(ErrorCode[_0x28695b(0x1da)],'Cannot\x20clone\x20from\x20context\x20project\x20\x22'+_0xa46fec+'\x22\x20to\x20a\x20different\x20profile',undefined,{'helpText':_0x28695b(0x21c)+'First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a'+(_0x28695b(0x28e)+_0xa46fec+'\x0a')+(_0x28695b(0x25b)+_0x29dfa5+_0x28695b(0x274)+(_0x465c59||_0x28695b(0x21d))+_0x28695b(0x272)+_0x1d3950)});_0x17a88b=_0xa46fec,console['log'](a4_0x33712f[_0x28695b(0x24b)](_0x28695b(0x273)+_0xa46fec));}}}}if(!_0x17a88b)return console[_0x28695b(0x241)](a4_0x33712f[_0x28695b(0x24d)](_0x28695b(0x268))),console[_0x28695b(0x241)](_0x28695b(0x215)),console[_0x28695b(0x241)]('\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory'),console[_0x28695b(0x241)](_0x28695b(0x1d2)),console[_0x28695b(0x241)]('\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>'),0x1;if(!_0x465c59)throw new SDKError(ErrorCode[_0x28695b(0x254)],'New\x20project\x20name\x20is\x20required',undefined,{'helpText':'Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>'});if(!_0x44ad0b&&!_0x3fd0b9){if(!isInteractive())return console['error'](a4_0x33712f[_0x28695b(0x1e8)](_0x28695b(0x281)),_0x28695b(0x1f3)),console[_0x28695b(0x216)](a4_0x33712f['dim'](_0x28695b(0x1ef))),0x1;const _0x23f47e=await confirmKey('Clone\x20\x22'+_0x17a88b+_0x28695b(0x201)+_0x465c59+'\x22?');if(!_0x23f47e)return console[_0x28695b(0x241)](a4_0x33712f[_0x28695b(0x24d)](_0x28695b(0x21b))),0x1;}const {data:_0x19e1ee}=await withSpinner(_0x28695b(0x1f1)+_0x17a88b+'\x22\x20to\x20\x22'+_0x465c59+'\x22...',()=>_0x53f453[_0x28695b(0x263)][_0x28695b(0x1f6)](_0x17a88b,_0x465c59,{'dryRun':_0x3fd0b9}));if(_0x3fd0b9){console[_0x28695b(0x241)](a4_0x33712f[_0x28695b(0x24d)](_0x28695b(0x1fa))),console[_0x28695b(0x241)](_0x28695b(0x1f8)+_0x19e1ee[_0x28695b(0x209)]),console[_0x28695b(0x241)](_0x28695b(0x223)+_0x465c59),console['log']('Would\x20clone:'),console['log'](_0x28695b(0x262)+_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x22a)][_0x28695b(0x28a)]),console[_0x28695b(0x241)]('\x20\x20Knowledge\x20Bases:\x20'+_0x19e1ee[_0x28695b(0x1e1)]['knowledgeBases'][_0x28695b(0x28a)]),console[_0x28695b(0x241)](_0x28695b(0x1eb)+_0x19e1ee['counts']['prompts'][_0x28695b(0x28a)]),console['log'](_0x28695b(0x208)+_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x212)][_0x28695b(0x28a)]),console[_0x28695b(0x241)](_0x28695b(0x1de)+_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x1e9)][_0x28695b(0x28a)]);const _0x5c6f9a=_0x19e1ee['counts'][_0x28695b(0x221)]['created']>0x0||_0x19e1ee['counts'][_0x28695b(0x233)][_0x28695b(0x28a)]>0x0;return _0x5c6f9a&&(console[_0x28695b(0x241)](_0x28695b(0x23d)+_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x221)][_0x28695b(0x28a)]),console[_0x28695b(0x241)]('\x20\x20Experimental\x20Artifacts:\x20'+_0x19e1ee['counts'][_0x28695b(0x233)][_0x28695b(0x28a)])),0x0;}const _0x2d935f=_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x22a)][_0x28695b(0x217)]>0x0||_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x280)][_0x28695b(0x217)]>0x0||_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x248)]['errors']>0x0||_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x212)]['errors']>0x0||_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x1e9)][_0x28695b(0x217)]>0x0||_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x221)][_0x28695b(0x217)]>0x0||_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x233)][_0x28695b(0x217)]>0x0;_0x2d935f?console['log'](a4_0x33712f[_0x28695b(0x24d)](_0x28695b(0x270))):console['log'](a4_0x33712f[_0x28695b(0x23b)]('Project\x20cloned\x20successfully'));console[_0x28695b(0x241)](_0x28695b(0x1f8)+_0x19e1ee['sourceProjectName']),console['log'](_0x28695b(0x223)+_0x19e1ee[_0x28695b(0x264)]),console[_0x28695b(0x241)](_0x28695b(0x282)+_0x19e1ee['newProjectId']),console[_0x28695b(0x241)](),console[_0x28695b(0x241)](_0x28695b(0x276)),console['log'](_0x28695b(0x262)+formatCountSummary(_0x19e1ee[_0x28695b(0x1e1)]['agents'])),console[_0x28695b(0x241)](_0x28695b(0x213)+formatCountSummary(_0x19e1ee[_0x28695b(0x1e1)]['knowledgeBases'])),console[_0x28695b(0x241)](_0x28695b(0x1eb)+formatCountSummary(_0x19e1ee['counts']['prompts'])),console[_0x28695b(0x241)](_0x28695b(0x25f)+formatCountSummary(_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x279)])),console[_0x28695b(0x241)](_0x28695b(0x208)+formatCountSummary(_0x19e1ee['counts']['formInterfaces'])),console['log'](_0x28695b(0x1de)+formatCountSummary(_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x1e9)]));const _0x1ea94a=_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x221)][_0x28695b(0x28a)]>0x0||_0x19e1ee['counts'][_0x28695b(0x221)]['updated']>0x0||_0x19e1ee['counts']['experimentalKnowledgeBases']['unchanged']>0x0||_0x19e1ee['counts'][_0x28695b(0x233)][_0x28695b(0x28a)]>0x0||_0x19e1ee['counts']['experimentalArtifacts'][_0x28695b(0x203)]>0x0||_0x19e1ee[_0x28695b(0x1e1)][_0x28695b(0x233)]['unchanged']>0x0;_0x1ea94a&&(console[_0x28695b(0x241)](_0x28695b(0x23d)+formatCountSummary(_0x19e1ee['counts'][_0x28695b(0x221)])),console[_0x28695b(0x241)]('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x19e1ee['counts'][_0x28695b(0x233)])));if(_0x2d935f){console[_0x28695b(0x241)](),console[_0x28695b(0x241)](a4_0x33712f['red'](_0x28695b(0x246)));for(const _0x2b9b0d of _0x19e1ee[_0x28695b(0x22a)]){_0x2b9b0d[_0x28695b(0x25c)]===_0x28695b(0x216)&&console[_0x28695b(0x241)](a4_0x33712f[_0x28695b(0x1e8)]('\x20\x20Agent\x20\x22'+_0x2b9b0d['agentName']+'\x22:\x20'+_0x2b9b0d[_0x28695b(0x216)]));}for(const _0x5e1896 of _0x19e1ee['knowledgeBases']){_0x5e1896[_0x28695b(0x25c)]===_0x28695b(0x216)&&console[_0x28695b(0x241)](a4_0x33712f['red']('\x20\x20Knowledge\x20Base\x20\x22'+_0x5e1896[_0x28695b(0x1e5)]+'\x22:\x20'+_0x5e1896['error']));}for(const _0x3b73dc of _0x19e1ee[_0x28695b(0x248)]){_0x3b73dc[_0x28695b(0x25c)]===_0x28695b(0x216)&&console['log'](a4_0x33712f[_0x28695b(0x1e8)](_0x28695b(0x1f2)+_0x3b73dc[_0x28695b(0x1e5)]+_0x28695b(0x22d)+_0x3b73dc[_0x28695b(0x216)]));}for(const _0x5dac43 of _0x19e1ee[_0x28695b(0x279)]){_0x5dac43['action']===_0x28695b(0x216)&&console['log'](a4_0x33712f[_0x28695b(0x1e8)](_0x28695b(0x28d)+_0x5dac43[_0x28695b(0x1e5)]+_0x28695b(0x22d)+_0x5dac43['error']));}for(const _0x1e149d of _0x19e1ee['formInterfaces']){_0x1e149d[_0x28695b(0x25c)]===_0x28695b(0x216)&&console[_0x28695b(0x241)](a4_0x33712f['red']('\x20\x20Form\x20Interface\x20\x22'+_0x1e149d[_0x28695b(0x1e5)]+'\x22:\x20'+_0x1e149d['error']));}for(const _0x48cc13 of _0x19e1ee['chatInterfaces']){_0x48cc13['action']===_0x28695b(0x216)&&console[_0x28695b(0x241)](a4_0x33712f[_0x28695b(0x1e8)](_0x28695b(0x1fd)+_0x48cc13['name']+'\x22:\x20'+_0x48cc13[_0x28695b(0x216)]));}for(const _0x35f590 of _0x19e1ee[_0x28695b(0x221)]){_0x35f590[_0x28695b(0x25c)]===_0x28695b(0x216)&&console[_0x28695b(0x241)](a4_0x33712f[_0x28695b(0x1e8)](_0x28695b(0x20a)+_0x35f590[_0x28695b(0x1e5)]+_0x28695b(0x22d)+_0x35f590['error']));}for(const _0x5108a9 of _0x19e1ee[_0x28695b(0x233)]){_0x5108a9[_0x28695b(0x25c)]===_0x28695b(0x216)&&console[_0x28695b(0x241)](a4_0x33712f[_0x28695b(0x1e8)](_0x28695b(0x20e)+_0x5108a9[_0x28695b(0x1e5)]+'\x22:\x20'+_0x5108a9[_0x28695b(0x216)]));}return 0x1;}console[_0x28695b(0x241)]();const _0x106719=getLLMProjectUrl(_0x4ef885,_0x19e1ee[_0x28695b(0x259)]);return console[_0x28695b(0x241)](_0x28695b(0x26c)+a4_0x33712f[_0x28695b(0x28f)](_0x106719)),0x0;}}export class AgentPushCommand extends BaseCommand{['name']=a4_0x1c6899(0x200);[a4_0x1c6899(0x26f)]=a4_0x1c6899(0x218);async['execute'](_0x1774fc){const _0x5dc35c=a4_0x1c6899,{options:_0x39d2ad,args:_0x157547,tdx:_0x1dedfc}=_0x1774fc;let _0x45905e=_0x157547[0x0]||process['cwd']();const _0x157487=_0x39d2ad[_0x5dc35c(0x20f)],_0x1ab134=_0x39d2ad[_0x5dc35c(0x28c)],_0x2ce656=_0x39d2ad[_0x5dc35c(0x267)],_0x51bd3f=_0x39d2ad[_0x5dc35c(0x1d8)],_0x520d52=a4_0x21a3c8['join'](_0x45905e,_0x5dc35c(0x292)),_0x49b7f4=existsSync(_0x520d52);if(_0x49b7f4){const {data:_0x27a1a1}=await withSpinner(_0x5dc35c(0x21e)+_0x45905e+_0x5dc35c(0x26e),()=>_0x1dedfc[_0x5dc35c(0x263)][_0x5dc35c(0x1dd)](_0x45905e,{'dryRun':_0x157487,'force':_0x1ab134}));if(_0x157487)return console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x24d)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x5dc35c(0x241)](_0x5dc35c(0x261)+_0x27a1a1[_0x5dc35c(0x256)]),0x0;if(_0x27a1a1[_0x5dc35c(0x25c)]===_0x5dc35c(0x216))return console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x1e8)]('Failed\x20to\x20push\x20agent:\x20'+_0x27a1a1[_0x5dc35c(0x216)])),0x1;console['log'](a4_0x33712f['green']('Agent\x20'+_0x27a1a1[_0x5dc35c(0x25c)]+_0x5dc35c(0x1e3))),console[_0x5dc35c(0x241)](_0x5dc35c(0x250)+_0x27a1a1['agentName']);if(_0x27a1a1[_0x5dc35c(0x1f5)]&&_0x27a1a1['projectId']){const _0x4ae801=getLLMAgentChatUrl(_0x51bd3f,_0x27a1a1[_0x5dc35c(0x1f9)],_0x27a1a1['agentId']);console[_0x5dc35c(0x241)](_0x5dc35c(0x228)+a4_0x33712f[_0x5dc35c(0x28f)](_0x4ae801));}return 0x0;}const _0xd4a3b=_0x39d2ad[_0x5dc35c(0x27c)],_0x2f6cf3=resolveProjectFromContext(_0x45905e,_0xd4a3b);if(_0x2f6cf3[_0x5dc35c(0x291)])_0x45905e=_0x2f6cf3[_0x5dc35c(0x1d0)],_0x2f6cf3[_0x5dc35c(0x234)]===_0x5dc35c(0x238)&&console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x24b)](_0x5dc35c(0x287)+_0x45905e));else{let _0x3cf1d6='Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.';_0x2f6cf3['reason']===_0x5dc35c(0x266)&&(_0x3cf1d6=_0x2f6cf3[_0x5dc35c(0x28b)]+_0x5dc35c(0x1f4)+_0x2f6cf3['llmProject']+_0x5dc35c(0x23f));throw new SDKError(ErrorCode[_0x5dc35c(0x1da)],_0x2f6cf3[_0x5dc35c(0x204)]==='no_context'?_0x2f6cf3[_0x5dc35c(0x28b)]:_0x5dc35c(0x23c)+_0x45905e,undefined,{'helpText':_0x3cf1d6});}const {data:_0x2c8e94}=await withSpinner(_0x5dc35c(0x226),()=>_0x1dedfc['llm']['pushProject'](_0x45905e,{'dryRun':!![]})),_0x28f814=_0x2c8e94['counts'][_0x5dc35c(0x22a)][_0x5dc35c(0x217)]>0x0;if(_0x28f814){console['log'](a4_0x33712f[_0x5dc35c(0x1e8)](_0x5dc35c(0x1ff)));for(const _0x34ac47 of _0x2c8e94[_0x5dc35c(0x22a)]){_0x34ac47[_0x5dc35c(0x25c)]===_0x5dc35c(0x216)&&console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x1e8)]('\x20\x20Agent\x20\x22'+_0x34ac47[_0x5dc35c(0x256)]+_0x5dc35c(0x22d)+_0x34ac47[_0x5dc35c(0x216)]));}return 0x1;}const _0x48529f=_0x2c8e94[_0x5dc35c(0x1e1)]['agents'][_0x5dc35c(0x28a)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x280)][_0x5dc35c(0x28a)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x27f)][_0x5dc35c(0x28a)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x248)][_0x5dc35c(0x28a)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x279)][_0x5dc35c(0x28a)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x221)]['created']+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x233)]['created']+_0x2c8e94['counts'][_0x5dc35c(0x212)][_0x5dc35c(0x28a)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x1e9)][_0x5dc35c(0x28a)],_0x509403=_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x22a)]['updated']+_0x2c8e94[_0x5dc35c(0x1e1)]['knowledgeBases'][_0x5dc35c(0x203)]+_0x2c8e94['counts'][_0x5dc35c(0x27f)][_0x5dc35c(0x203)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x248)][_0x5dc35c(0x203)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x279)][_0x5dc35c(0x203)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x221)]['updated']+_0x2c8e94['counts']['experimentalArtifacts'][_0x5dc35c(0x203)]+_0x2c8e94['counts']['formInterfaces'][_0x5dc35c(0x203)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x1e9)][_0x5dc35c(0x203)],_0xa73c42=_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x22a)][_0x5dc35c(0x1e7)]+_0x2c8e94[_0x5dc35c(0x1e1)]['knowledgeBases'][_0x5dc35c(0x1e7)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x27f)][_0x5dc35c(0x1e7)]+_0x2c8e94[_0x5dc35c(0x1e1)]['prompts'][_0x5dc35c(0x1e7)]+_0x2c8e94['counts'][_0x5dc35c(0x279)]['unchanged']+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x221)][_0x5dc35c(0x1e7)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x233)][_0x5dc35c(0x1e7)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x212)][_0x5dc35c(0x1e7)]+_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x1e9)][_0x5dc35c(0x1e7)];console['log'](_0x5dc35c(0x243)+_0x2c8e94['projectName']+'\x27:'),console['log']('\x20\x20'+a4_0x33712f['green']('+\x20'+_0x48529f+_0x5dc35c(0x22b))+_0x5dc35c(0x230)+a4_0x33712f[_0x5dc35c(0x24d)]('~\x20'+_0x509403+_0x5dc35c(0x229))+_0x5dc35c(0x230)+a4_0x33712f[_0x5dc35c(0x24b)]('=\x20'+_0xa73c42+_0x5dc35c(0x247))),console[_0x5dc35c(0x241)](_0x5dc35c(0x262)+formatCountSummary(_0x2c8e94[_0x5dc35c(0x1e1)]['agents'])),console['log']('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x280)])),console[_0x5dc35c(0x241)](_0x5dc35c(0x275)+formatCountSummary(_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x27f)])),console[_0x5dc35c(0x241)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x248)])),console['log'](_0x5dc35c(0x25f)+formatCountSummary(_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x279)])),console[_0x5dc35c(0x241)](_0x5dc35c(0x208)+formatCountSummary(_0x2c8e94['counts'][_0x5dc35c(0x212)])),console[_0x5dc35c(0x241)]('\x20\x20Chat\x20Interfaces:\x20'+formatCountSummary(_0x2c8e94['counts']['chatInterfaces']));const _0x5a3a33=_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x221)][_0x5dc35c(0x28a)]>0x0||_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x221)][_0x5dc35c(0x203)]>0x0||_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x221)][_0x5dc35c(0x1e7)]>0x0||_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x233)][_0x5dc35c(0x28a)]>0x0||_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x233)][_0x5dc35c(0x203)]>0x0||_0x2c8e94[_0x5dc35c(0x1e1)]['experimentalArtifacts']['unchanged']>0x0;_0x5a3a33&&(console['log']('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x2c8e94[_0x5dc35c(0x1e1)]['experimentalKnowledgeBases'])),console['log']('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x2c8e94[_0x5dc35c(0x1e1)][_0x5dc35c(0x233)])));console[_0x5dc35c(0x241)]('\x20\x20Source:\x20'+a4_0x33712f['cyan'](_0x45905e)),displayDiffs(_0x2c8e94[_0x5dc35c(0x22a)],_0x2c8e94['knowledgeBases'],_0x2c8e94['textKnowledgeBases'],_0x2c8e94[_0x5dc35c(0x248)],_0x2c8e94[_0x5dc35c(0x279)],_0x2c8e94[_0x5dc35c(0x221)],_0x2c8e94['experimentalArtifacts'],_0x2c8e94['formInterfaces'],_0x2c8e94['chatInterfaces']);if(_0x157487)return console['log'](a4_0x33712f[_0x5dc35c(0x24d)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed')),0x0;if(_0x48529f===0x0&&_0x509403===0x0){console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x23b)](_0x5dc35c(0x1fe)));const _0x37c711=getLLMProjectUrl(_0x51bd3f,_0x2c8e94[_0x5dc35c(0x1f9)]);return console[_0x5dc35c(0x241)](_0x5dc35c(0x26c)+a4_0x33712f[_0x5dc35c(0x28f)](_0x37c711)),0x0;}if(!_0x2ce656&&!_0x1ab134){if(!isInteractive())return console['error'](a4_0x33712f['red'](_0x5dc35c(0x281)),_0x5dc35c(0x1f3)),console[_0x5dc35c(0x216)](a4_0x33712f[_0x5dc35c(0x24b)](_0x5dc35c(0x1ef))),0x1;const _0x17a1c7=await confirmKey(_0x5dc35c(0x1d6)+(_0x48529f+_0x509403)+_0x5dc35c(0x202));if(!_0x17a1c7)return console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x24d)](_0x5dc35c(0x21b)),_0x5dc35c(0x20c)),0x1;}const {data:_0x370b1a}=await withSpinner(_0x5dc35c(0x23e),()=>_0x1dedfc[_0x5dc35c(0x263)][_0x5dc35c(0x269)](_0x45905e,{'force':_0x1ab134})),_0x327d36=_0x370b1a[_0x5dc35c(0x1e1)][_0x5dc35c(0x22a)][_0x5dc35c(0x217)]>0x0||_0x370b1a[_0x5dc35c(0x1e1)][_0x5dc35c(0x280)][_0x5dc35c(0x217)]>0x0||_0x370b1a[_0x5dc35c(0x1e1)][_0x5dc35c(0x27f)][_0x5dc35c(0x217)]>0x0||_0x370b1a['counts'][_0x5dc35c(0x248)]['errors']>0x0||_0x370b1a[_0x5dc35c(0x1e1)][_0x5dc35c(0x212)]['errors']>0x0||_0x370b1a[_0x5dc35c(0x1e1)][_0x5dc35c(0x1e9)][_0x5dc35c(0x217)]>0x0;if(_0x327d36){console[_0x5dc35c(0x241)](a4_0x33712f['yellow']('\x0aProject\x20pushed\x20with\x20errors')),console[_0x5dc35c(0x241)](),console['log'](a4_0x33712f[_0x5dc35c(0x1e8)]('Errors:'));for(const _0xc9b765 of _0x370b1a[_0x5dc35c(0x22a)]){_0xc9b765['action']===_0x5dc35c(0x216)&&console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x1e8)](_0x5dc35c(0x20b)+_0xc9b765['agentName']+_0x5dc35c(0x22d)+_0xc9b765[_0x5dc35c(0x216)]));}for(const _0xdad9a1 of _0x370b1a[_0x5dc35c(0x280)]){_0xdad9a1[_0x5dc35c(0x25c)]==='error'&&console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x1e8)](_0x5dc35c(0x25d)+_0xdad9a1['name']+_0x5dc35c(0x22d)+_0xdad9a1['error']));}for(const _0x4cdb34 of _0x370b1a[_0x5dc35c(0x27f)]){_0x4cdb34[_0x5dc35c(0x25c)]==='error'&&console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x1e8)](_0x5dc35c(0x277)+_0x4cdb34[_0x5dc35c(0x1e5)]+_0x5dc35c(0x22d)+_0x4cdb34[_0x5dc35c(0x216)]));}for(const _0x1c1a04 of _0x370b1a[_0x5dc35c(0x248)]){_0x1c1a04[_0x5dc35c(0x25c)]===_0x5dc35c(0x216)&&console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x1e8)](_0x5dc35c(0x1f2)+_0x1c1a04[_0x5dc35c(0x1e5)]+_0x5dc35c(0x22d)+_0x1c1a04[_0x5dc35c(0x216)]));}for(const _0x12a630 of _0x370b1a['integrations']){_0x12a630['action']==='error'&&console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x1e8)](_0x5dc35c(0x28d)+_0x12a630[_0x5dc35c(0x1e5)]+'\x22:\x20'+_0x12a630[_0x5dc35c(0x216)]));}for(const _0x216334 of _0x370b1a[_0x5dc35c(0x212)]){_0x216334[_0x5dc35c(0x25c)]==='error'&&console[_0x5dc35c(0x241)](a4_0x33712f['red'](_0x5dc35c(0x1df)+_0x216334[_0x5dc35c(0x1e5)]+_0x5dc35c(0x22d)+_0x216334[_0x5dc35c(0x216)]));}for(const _0x50bdbc of _0x370b1a[_0x5dc35c(0x1e9)]){_0x50bdbc[_0x5dc35c(0x25c)]===_0x5dc35c(0x216)&&console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x1e8)]('\x20\x20Chat\x20Interface\x20\x22'+_0x50bdbc[_0x5dc35c(0x1e5)]+'\x22:\x20'+_0x50bdbc[_0x5dc35c(0x216)]));}return 0x1;}console[_0x5dc35c(0x241)](a4_0x33712f[_0x5dc35c(0x23b)](_0x5dc35c(0x1ea)+(_0x48529f+_0x509403)+_0x5dc35c(0x1db)+_0x370b1a[_0x5dc35c(0x1d5)]+'\x27'));const _0x194b4c=getLLMProjectUrl(_0x51bd3f,_0x370b1a['projectId']);return console[_0x5dc35c(0x241)]('Project:\x20'+a4_0x33712f[_0x5dc35c(0x28f)](_0x194b4c)),0x0;}}
@@ -1 +1 @@
1
- const a5_0x17415b=a5_0xf3b3;(function(_0x4c544d,_0x1f8934){const _0x5572eb=a5_0xf3b3,_0x250281=_0x4c544d();while(!![]){try{const _0x232eea=-parseInt(_0x5572eb(0x1cb))/0x1+-parseInt(_0x5572eb(0x250))/0x2+parseInt(_0x5572eb(0x229))/0x3+parseInt(_0x5572eb(0x24a))/0x4+parseInt(_0x5572eb(0x1f1))/0x5*(-parseInt(_0x5572eb(0x228))/0x6)+parseInt(_0x5572eb(0x20b))/0x7*(parseInt(_0x5572eb(0x233))/0x8)+parseInt(_0x5572eb(0x201))/0x9;if(_0x232eea===_0x1f8934)break;else _0x250281['push'](_0x250281['shift']());}catch(_0x37f894){_0x250281['push'](_0x250281['shift']());}}}(a5_0x20de,0x96ad2));import*as a5_0x178dc4 from'node:fs';function a5_0x20de(){const _0x5e0e4d=['Conversation\x20URL:\x20','stop','\x22,\x20but\x20current\x20site\x20is\x20\x22','Evaluating\x20response...','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','join','trim','\x20\x20Site:\x20','dim','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','filter','Round\x20','substring','Error\x20writing\x20output\x20file:\x20','red','toISOString','length','projectDir','not\x20found','\x20(cached)','545884DLQgEn','jsonl','start','tests','\x20-\x20','yellow','1451746VdLZPB','status','push','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','\x20\x20Conversation:\x20','green','Passed:\x20\x20\x20','tsv','Re-evaluating...','Total:\x20\x20\x20\x20','813070OsSTIp','resolveAgentId','...\x20','Using\x20agent:\x20','PASS','✗\x20FAIL:\x20','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','Duration:\x20','round','llm','ERROR','size','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','table','Running\x20test:\x20','basename','message','some','Failed:\x20\x20\x20','✗\x20ERROR:\x20','No\x20tests\x20have\x20tags\x20defined.','Test\x20','json','agentDirs','repeat','no_local_folder','Errors:\x20\x20\x20','isSpinning','agent','\x22:\x20','Re-evaluating\x20cached\x20test\x20run...','Usage:','includes','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','text','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','3505JRXLmJ','conversations','llmProject','name','conversation_url','source','site','resolve','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','forEach','testName','no_tests','white','Agent:\x20','✗\x20ERROR:\x20Project\x20not\x20found:\x20','\x20(new)','20616534WSqjUh','now','New\x20tests\x20to\x20execute:\x20','tags','executeReeval','✓\x20PASS:\x20','Output\x20written\x20to:\x20','Run\x20\x27tdx\x20agent\x20pull\x20','agentName','log','7AsFIth','output','Test\x20Summary','cyan','no_context','resolveProjectId','utf-8','writeFileSync','Round\x201/','add','reeval','verbose','map','projectName','404','split','\x20\x20Evaluating...\x20','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','toLowerCase','Cached\x20run\x20is\x20from\x20site\x20\x22','FAIL','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','\x20\x20Round\x20','Running:\x20','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','has','reason','Available\x20tags:\x20','Site:\x20','6798PArZsN','696198rWyEgM','Failed\x20Tests:','Project\x20path:\x20','rounds','Run\x20tests\x20for\x20an\x20LLM\x20agent','\x27\x20to\x20create\x20the\x20folder\x20structure.',':\x20Sending\x20user\x20input...','\x20\x20Project:\x20','Available\x20tests:\x20','context','2328664FBHGtz','\x20\x20Agent:\x20','Cached\x20run\x20from:\x20'];a5_0x20de=function(){return _0x5e0e4d;};return a5_0x20de();}import*as a5_0x3f3055 from'node:path';import a5_0x4d72d3 from'chalk';function a5_0xf3b3(_0x453d1b,_0x2281fb){_0x453d1b=_0x453d1b-0x1c3;const _0x20de5c=a5_0x20de();let _0xf3b3f5=_0x20de5c[_0x453d1b];return _0xf3b3f5;}import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x17415b(0x1f4)]='agent:test';['description']=a5_0x17415b(0x22d);async['execute'](_0x170f34){const _0x5aa758=a5_0x17415b,{options:_0x548d32,args:_0x227d1a,tdx:_0x190766}=_0x170f34,_0x13bd5e=_0x227d1a[0x0]||'.',_0x2c94df=_0x548d32['dryRun'],_0x1fd105=_0x548d32,_0x59da2a=_0x1fd105['eval']===![],_0x45dd0c=_0x1fd105[_0x5aa758(0x215)],_0x55ffce=_0x1fd105[_0x5aa758(0x1f4)],_0x2bafaf=_0x1fd105[_0x5aa758(0x204)],_0x63d97b=_0x548d32[_0x5aa758(0x1f7)],_0x5dd7fa=_0x1fd105[_0x5aa758(0x20c)];if(_0x45dd0c&&_0x59da2a)return console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x244)](_0x5aa758(0x1c3))),0x1;let _0x2b6379=_0x5aa758(0x1d9);if(_0x1fd105[_0x5aa758(0x1e2)])_0x2b6379=_0x5aa758(0x1e2);else{if(_0x1fd105[_0x5aa758(0x24b)])_0x2b6379=_0x5aa758(0x24b);else{if(_0x1fd105[_0x5aa758(0x1c8)])_0x2b6379='tsv';else{if(_0x1fd105[_0x5aa758(0x1d9)])_0x2b6379=_0x5aa758(0x1d9);}}}const _0x39806e=_0x1fd105[_0x5aa758(0x1f3)];let _0x23ea47=_0x13bd5e;const _0x135c2a=a5_0x178dc4['existsSync'](_0x13bd5e),_0x37aeaf=_0x13bd5e==='.';if(!_0x135c2a||_0x37aeaf){const _0xf9c0df=resolveProjectFromContext(_0x13bd5e,_0x39806e,{'requireFile':'test.yml'});if(_0xf9c0df['found'])_0x23ea47=_0xf9c0df[_0x5aa758(0x247)],_0xf9c0df[_0x5aa758(0x1f6)]===_0x5aa758(0x232)&&console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x23e)](_0x5aa758(0x1ce)+_0x23ea47));else switch(_0xf9c0df[_0x5aa758(0x225)]){case _0x5aa758(0x20f):console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x24f)](_0xf9c0df['message'])),console['log'](),console[_0x5aa758(0x20a)](_0x5aa758(0x1eb)),console[_0x5aa758(0x20a)]('\x20\x20tdx\x20agent\x20test\x20<path>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20from\x20path'),console['log']('\x20\x20tdx\x20agent\x20test\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x5aa758(0x20a)](),console[_0x5aa758(0x20a)](_0x5aa758(0x1d8));return 0x1;case _0x5aa758(0x1e5):console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x24f)](_0xf9c0df[_0x5aa758(0x1dc)])),console['log'](),console['log'](_0x5aa758(0x208)+_0xf9c0df['llmProject']+_0x5aa758(0x22e));return 0x1;case'multiple_agents':{const _0x5d73b8=a5_0x3f3055[_0x5aa758(0x1db)](_0xf9c0df['projectDir']);console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x24f)]('Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22'+_0xf9c0df[_0x5aa758(0x1f3)]+'\x22:'));for(const _0x153886 of _0xf9c0df[_0x5aa758(0x1e3)]){console[_0x5aa758(0x20a)]('\x20\x20-\x20'+_0x153886);}return console[_0x5aa758(0x20a)](),console[_0x5aa758(0x20a)](_0x5aa758(0x220)+_0x5d73b8+'/<agent-name>'),0x1;}case _0x5aa758(0x1fc):console[_0x5aa758(0x20a)](a5_0x4d72d3['yellow'](_0x5aa758(0x1f9)+_0xf9c0df[_0x5aa758(0x1f3)]+'\x22.')),console[_0x5aa758(0x20a)](a5_0x4d72d3['dim'](_0x5aa758(0x22b)+_0xf9c0df[_0x5aa758(0x247)])),console[_0x5aa758(0x20a)](),console['log'](_0x5aa758(0x1d7));return 0x1;}}const {definition:_0x1aebe8,agentInfo:_0x255050}=parseTestFile(_0x23ea47);let _0x3b5167=_0x1aebe8[_0x5aa758(0x24d)];if(_0x55ffce){const _0x2ea248=_0x55ffce[_0x5aa758(0x21a)](',')[_0x5aa758(0x217)](_0x4bdbab=>_0x4bdbab[_0x5aa758(0x23c)]());_0x3b5167=_0x1aebe8[_0x5aa758(0x24d)][_0x5aa758(0x240)](_0x158a0a=>_0x2ea248['includes'](_0x158a0a[_0x5aa758(0x1f4)]));if(_0x3b5167[_0x5aa758(0x246)]===0x0)return console[_0x5aa758(0x20a)](a5_0x4d72d3['yellow']('No\x20tests\x20found\x20matching:\x20'+_0x55ffce)),console['log'](a5_0x4d72d3[_0x5aa758(0x23e)](_0x5aa758(0x231)+_0x1aebe8['tests'][_0x5aa758(0x217)](_0x26276c=>_0x26276c[_0x5aa758(0x1f4)])['join'](',\x20'))),0x1;}if(_0x2bafaf){const _0x1619e4=_0x2bafaf[_0x5aa758(0x21a)](',')[_0x5aa758(0x217)](_0x56bf40=>_0x56bf40['trim']()['toLowerCase']());_0x3b5167=_0x3b5167[_0x5aa758(0x240)](_0x1c8a1c=>_0x1c8a1c[_0x5aa758(0x204)]?.[_0x5aa758(0x1dd)](_0x8f7b65=>_0x1619e4[_0x5aa758(0x1ec)](_0x8f7b65[_0x5aa758(0x21d)]())));if(_0x3b5167[_0x5aa758(0x246)]===0x0){console['log'](a5_0x4d72d3[_0x5aa758(0x24f)]('No\x20tests\x20found\x20with\x20tags:\x20'+_0x2bafaf));const _0x580d83=new Set();return _0x1aebe8[_0x5aa758(0x24d)][_0x5aa758(0x1fa)](_0x4f0b18=>_0x4f0b18[_0x5aa758(0x204)]?.[_0x5aa758(0x1fa)](_0x488af8=>_0x580d83[_0x5aa758(0x214)](_0x488af8))),_0x580d83[_0x5aa758(0x1d6)]>0x0?console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x23e)](_0x5aa758(0x226)+[..._0x580d83][_0x5aa758(0x23b)](',\x20'))):console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x23e)](_0x5aa758(0x1e0))),0x1;}}if(_0x45dd0c)return this[_0x5aa758(0x205)](_0x170f34,{'definition':{'tests':_0x3b5167},'agentInfo':_0x255050,'outputFormat':_0x2b6379,'outputFile':_0x5dd7fa,'testNames':_0x55ffce});if(_0x2c94df){console['log'](a5_0x4d72d3[_0x5aa758(0x20e)]('Test\x20Configuration:')),console[_0x5aa758(0x20a)](_0x5aa758(0x23d)+a5_0x4d72d3[_0x5aa758(0x1fd)](_0x63d97b)),console['log'](_0x5aa758(0x230)+a5_0x4d72d3[_0x5aa758(0x1fd)](_0x255050[_0x5aa758(0x218)])),console['log'](_0x5aa758(0x234)+a5_0x4d72d3[_0x5aa758(0x1fd)](_0x255050[_0x5aa758(0x209)])),console[_0x5aa758(0x20a)](),console[_0x5aa758(0x20a)]('Tests\x20found:\x20'+a5_0x4d72d3['white'](_0x3b5167[_0x5aa758(0x246)]));for(let _0x6e12af=0x0;_0x6e12af<_0x3b5167['length'];_0x6e12af++){const _0x1fef87=_0x3b5167[_0x6e12af],_0x3d164a=_0x1fef87['rounds']['length']===0x1?_0x5aa758(0x1d3):_0x5aa758(0x22c),_0xed93bb=_0x1fef87[_0x5aa758(0x204)]?.[_0x5aa758(0x246)]?'\x20['+_0x1fef87[_0x5aa758(0x204)][_0x5aa758(0x23b)](',\x20')+']':'';console[_0x5aa758(0x20a)]('\x20\x20'+(_0x6e12af+0x1)+'.\x20'+a5_0x4d72d3[_0x5aa758(0x1fd)](_0x1fef87[_0x5aa758(0x1f4)])+'\x20('+_0x1fef87[_0x5aa758(0x22c)]['length']+'\x20'+_0x3d164a+')'+a5_0x4d72d3[_0x5aa758(0x23e)](_0xed93bb));}return 0x0;}let _0x1764ed,_0x57e379;try{_0x1764ed=await _0x190766[_0x5aa758(0x1d4)][_0x5aa758(0x210)](_0x255050[_0x5aa758(0x218)]);}catch(_0x49dbad){const _0x19ccfc=_0x49dbad instanceof Error?_0x49dbad[_0x5aa758(0x1dc)]:String(_0x49dbad);return _0x19ccfc[_0x5aa758(0x1ec)](_0x5aa758(0x219))||_0x19ccfc['toLowerCase']()['includes'](_0x5aa758(0x248))?console['log'](a5_0x4d72d3[_0x5aa758(0x244)](_0x5aa758(0x1ff)+_0x255050[_0x5aa758(0x218)])):console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x244)](_0x5aa758(0x1ee)+_0x255050['projectName']+_0x5aa758(0x1e9)+_0x19ccfc)),0x1;}try{_0x57e379=await _0x190766[_0x5aa758(0x1d4)][_0x5aa758(0x1cc)](_0x255050[_0x5aa758(0x209)],_0x1764ed);}catch(_0x202625){const _0x2c8474=_0x202625 instanceof Error?_0x202625['message']:String(_0x202625);return _0x2c8474[_0x5aa758(0x1ec)](_0x5aa758(0x219))||_0x2c8474[_0x5aa758(0x21d)]()[_0x5aa758(0x1ec)](_0x5aa758(0x248))?console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x244)](_0x5aa758(0x23a)+_0x255050[_0x5aa758(0x209)])):console['log'](a5_0x4d72d3[_0x5aa758(0x244)](_0x5aa758(0x1f0)+_0x255050[_0x5aa758(0x209)]+_0x5aa758(0x1e9)+_0x2c8474)),0x1;}let _0x5f30cf;if(!_0x59da2a)try{_0x5f30cf=await setupEvaluatorAgent(_0x190766[_0x5aa758(0x1d4)],_0x548d32[_0x5aa758(0x216)]);}catch(_0x41baf5){const _0x346202=_0x41baf5 instanceof Error?_0x41baf5[_0x5aa758(0x1dc)]:String(_0x41baf5);return console[_0x5aa758(0x20a)](a5_0x4d72d3['red']('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x346202)),0x1;}console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x20e)]('Running\x20agent\x20tests...')),console[_0x5aa758(0x20a)](_0x5aa758(0x227)+a5_0x4d72d3[_0x5aa758(0x1fd)](_0x63d97b)),console[_0x5aa758(0x20a)](_0x5aa758(0x1fe)+a5_0x4d72d3[_0x5aa758(0x1fd)](_0x255050[_0x5aa758(0x218)]+'/'+_0x255050[_0x5aa758(0x209)])),console['log']();const _0x1f8676=[],_0x40b134=[],_0x26fd48=Date[_0x5aa758(0x202)]();for(let _0x4bc6c5=0x0;_0x4bc6c5<_0x3b5167[_0x5aa758(0x246)];_0x4bc6c5++){const _0x11aa68=_0x3b5167[_0x4bc6c5];_0x3b5167['length']>0x1?console['log'](_0x5aa758(0x1e1)+(_0x4bc6c5+0x1)+'/'+_0x3b5167[_0x5aa758(0x246)]+':\x20'+a5_0x4d72d3[_0x5aa758(0x1fd)](_0x11aa68[_0x5aa758(0x1f4)])):console[_0x5aa758(0x20a)](_0x5aa758(0x1da)+a5_0x4d72d3[_0x5aa758(0x1fd)](_0x11aa68[_0x5aa758(0x1f4)]));const _0x325a54=createCommandSpinner(_0x5aa758(0x213)+_0x11aa68[_0x5aa758(0x22c)][_0x5aa758(0x246)]+':\x20Sending\x20user\x20input...');_0x325a54[_0x5aa758(0x24c)]();try{const {result:_0x74e939,conversation:_0x216a5d}=await runTest(_0x190766[_0x5aa758(0x1d4)],_0x11aa68,{'agentId':_0x57e379,'projectId':_0x1764ed,'site':_0x63d97b,'noEval':_0x59da2a,'evaluatorId':_0x5f30cf,'onRoundStart':(_0xb83e38,_0x413391)=>{const _0xf743f=_0x5aa758;_0x325a54[_0xf743f(0x1ef)]='Round\x20'+(_0xb83e38+0x1)+'/'+_0x413391+_0xf743f(0x22f);},'onRoundComplete':(_0x5ae153,_0x4caa8e,_0xb80dac)=>{const _0x10c973=_0x5aa758,_0x4fb856=formatElapsed(_0x4caa8e);_0xb80dac?console['log'](_0x10c973(0x221)+(_0x5ae153+0x1)+'/'+_0x11aa68[_0x10c973(0x22c)][_0x10c973(0x246)]+'...\x20'+a5_0x4d72d3['green']('✓')+'\x20('+_0x4fb856+')'):console[_0x10c973(0x20a)]('\x20\x20Round\x20'+(_0x5ae153+0x1)+'/'+_0x11aa68[_0x10c973(0x22c)][_0x10c973(0x246)]+'...\x20'+a5_0x4d72d3[_0x10c973(0x244)]('✗'));},'onEvaluationStart':()=>{const _0xfdb117=_0x5aa758;_0x325a54[_0xfdb117(0x1ef)]='Evaluating\x20response...';},'onEvaluationComplete':_0x5f0432=>{const _0x277549=_0x5aa758,_0x1a9363=formatElapsed(_0x5f0432);console[_0x277549(0x20a)](_0x277549(0x21b)+a5_0x4d72d3[_0x277549(0x1c6)]('✓')+'\x20('+_0x1a9363+')');}});_0x325a54[_0x5aa758(0x237)](),_0x1f8676[_0x5aa758(0x252)](_0x74e939),_0x40b134[_0x5aa758(0x252)](_0x216a5d);if(_0x74e939[_0x5aa758(0x251)]===_0x5aa758(0x1cf))console['log'](a5_0x4d72d3['green']('✓\x20PASS:\x20'+_0x74e939[_0x5aa758(0x225)]));else _0x74e939['status']===_0x5aa758(0x21f)?console[_0x5aa758(0x20a)](a5_0x4d72d3['red'](_0x5aa758(0x1d0)+_0x74e939[_0x5aa758(0x225)])):console['log'](a5_0x4d72d3[_0x5aa758(0x244)](_0x5aa758(0x1df)+_0x74e939['reason']));_0x74e939['conversation_url']&&console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x23e)](_0x5aa758(0x236)+_0x74e939[_0x5aa758(0x1f5)])),console[_0x5aa758(0x20a)]();}catch(_0x1608ea){_0x325a54[_0x5aa758(0x237)]();const _0x39d556=_0x1608ea instanceof Error?_0x1608ea[_0x5aa758(0x1dc)]:String(_0x1608ea);console[_0x5aa758(0x20a)](a5_0x4d72d3[_0x5aa758(0x244)](_0x5aa758(0x1df)+_0x39d556)),console[_0x5aa758(0x20a)](),_0x1f8676[_0x5aa758(0x252)]({'name':_0x11aa68['name'],'status':_0x5aa758(0x1d5),'reason':_0x39d556,'timestamp':new Date()[_0x5aa758(0x245)](),'duration_ms':0x0});}}const _0x46fd26=Date[_0x5aa758(0x202)]()-_0x26fd48,_0x53edff=_0x1f8676[_0x5aa758(0x240)](_0x47a9ce=>_0x47a9ce[_0x5aa758(0x251)]===_0x5aa758(0x1cf))[_0x5aa758(0x246)],_0x28869b=_0x1f8676['filter'](_0x512ccc=>_0x512ccc[_0x5aa758(0x251)]===_0x5aa758(0x21f))[_0x5aa758(0x246)],_0x4ed43f=_0x1f8676[_0x5aa758(0x240)](_0x1c5f80=>_0x1c5f80[_0x5aa758(0x251)]===_0x5aa758(0x1d5))['length'];console['log']('━'[_0x5aa758(0x1e4)](0x3c)),console[_0x5aa758(0x20a)](_0x5aa758(0x20d)),console[_0x5aa758(0x20a)]('━'[_0x5aa758(0x1e4)](0x3c)),console[_0x5aa758(0x20a)](_0x5aa758(0x1ca)+_0x1f8676[_0x5aa758(0x246)]),console['log'](_0x5aa758(0x1c7)+a5_0x4d72d3[_0x5aa758(0x1c6)](_0x53edff)),console['log'](_0x5aa758(0x1de)+a5_0x4d72d3[_0x5aa758(0x244)](_0x28869b));_0x4ed43f>0x0&&console[_0x5aa758(0x20a)](_0x5aa758(0x1e6)+a5_0x4d72d3[_0x5aa758(0x244)](_0x4ed43f));console[_0x5aa758(0x20a)]('Duration:\x20'+formatElapsed(_0x46fd26)),console[_0x5aa758(0x20a)]('━'[_0x5aa758(0x1e4)](0x3c));const _0x56863c=_0x1f8676[_0x5aa758(0x240)](_0xb1d09c=>_0xb1d09c[_0x5aa758(0x251)]!==_0x5aa758(0x1cf));if(_0x56863c[_0x5aa758(0x246)]>0x0){console[_0x5aa758(0x20a)](),console[_0x5aa758(0x20a)](_0x5aa758(0x22a));for(const _0x2f7e12 of _0x56863c){const _0x3beb51=a5_0x4d72d3['red']('✗'),_0x138780=_0x2f7e12[_0x5aa758(0x225)]['length']>0x32?_0x2f7e12['reason'][_0x5aa758(0x242)](0x0,0x32)+'...':_0x2f7e12['reason'];console[_0x5aa758(0x20a)]('\x20\x20'+_0x3beb51+'\x20'+_0x2f7e12[_0x5aa758(0x1f4)]+':\x20'+_0x138780);}}const _0x26de0e={'summary':{'total':_0x1f8676['length'],'passed':_0x53edff,'failed':_0x28869b,'errors':_0x4ed43f>0x0?_0x4ed43f:undefined,'duration_ms':_0x46fd26},'tests':_0x1f8676,'agent':{'project':_0x255050[_0x5aa758(0x218)],'name':_0x255050[_0x5aa758(0x209)],'site':_0x63d97b},'timestamp':new Date(_0x26fd48)[_0x5aa758(0x245)]()};try{const _0x42a104=buildCachedTestRun(_0x40b134,{'site':_0x63d97b,'projectId':_0x1764ed,'projectName':_0x255050[_0x5aa758(0x218)],'agentId':_0x57e379,'agentName':_0x255050[_0x5aa758(0x209)],'testYmlPath':a5_0x3f3055[_0x5aa758(0x1f8)](_0x255050['testYmlPath'])});saveLastTestRun(_0x42a104);}catch{}if(_0x2b6379!=='table'||_0x5dd7fa){const _0xdc3255=formatResults(_0x26de0e,_0x2b6379);if(_0x5dd7fa)try{a5_0x178dc4[_0x5aa758(0x212)](_0x5dd7fa,_0xdc3255,_0x5aa758(0x211)),console[_0x5aa758(0x20a)](),console['log'](a5_0x4d72d3[_0x5aa758(0x23e)](_0x5aa758(0x207)+_0x5dd7fa));}catch(_0x229e90){return console['log'](),console[_0x5aa758(0x20a)](a5_0x4d72d3['red'](_0x5aa758(0x243)+_0x229e90)),0x1;}else console[_0x5aa758(0x20a)](),console[_0x5aa758(0x20a)](_0xdc3255);}return _0x56863c[_0x5aa758(0x246)]>0x0?0x1:0x0;}async[a5_0x17415b(0x205)](_0x35e122,_0x2058a1){const _0x19cdfa=a5_0x17415b,{options:_0x4c2dcc,tdx:_0x3e74ba}=_0x35e122,{definition:_0x36679a,agentInfo:_0x348cc9,outputFormat:_0x543108,outputFile:_0x35d0c0}=_0x2058a1,_0x1ec1bc=_0x4c2dcc[_0x19cdfa(0x1f7)],_0x195c8d=loadLastTestRun();if(!_0x195c8d)return console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x244)]('Error:\x20No\x20previous\x20test\x20run\x20found.')),console[_0x19cdfa(0x20a)](a5_0x4d72d3['dim']('Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.')),0x1;if(_0x195c8d['agent'][_0x19cdfa(0x209)]!==_0x348cc9[_0x19cdfa(0x209)])return console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x244)](_0x19cdfa(0x21c)+_0x195c8d['agent'][_0x19cdfa(0x209)]+_0x19cdfa(0x1d1)+_0x348cc9[_0x19cdfa(0x209)]+'\x22.')),console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x23e)]('Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.')),0x1;const _0x55fb1d=new Set(_0x195c8d[_0x19cdfa(0x1f2)][_0x19cdfa(0x217)](_0x116f3c=>_0x116f3c[_0x19cdfa(0x1fb)])),_0x36da69=_0x36679a['tests'][_0x19cdfa(0x240)](_0x4ab52c=>!_0x55fb1d[_0x19cdfa(0x224)](_0x4ab52c[_0x19cdfa(0x1f4)]));if(_0x36da69[_0x19cdfa(0x246)]>0x0&&_0x195c8d[_0x19cdfa(0x1f7)]!==_0x1ec1bc)return console[_0x19cdfa(0x20a)](a5_0x4d72d3['red'](_0x19cdfa(0x1ed))),console['log'](a5_0x4d72d3[_0x19cdfa(0x23e)](_0x19cdfa(0x21e)+_0x195c8d[_0x19cdfa(0x1f7)]+_0x19cdfa(0x238)+_0x1ec1bc+'\x22.')),console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x23e)]('Either\x20switch\x20to\x20the\x20\x22'+_0x195c8d[_0x19cdfa(0x1f7)]+_0x19cdfa(0x1c4))),0x1;const _0x2548a9=_0x36679a['tests'][_0x19cdfa(0x240)](_0x1396c8=>_0x55fb1d[_0x19cdfa(0x224)](_0x1396c8['name'])),_0x58a952=_0x36da69;let _0x34fa67;try{_0x34fa67=await setupEvaluatorAgent(_0x3e74ba[_0x19cdfa(0x1d4)],_0x4c2dcc[_0x19cdfa(0x216)]);}catch(_0x21a759){const _0x4c3b98=_0x21a759 instanceof Error?_0x21a759[_0x19cdfa(0x1dc)]:String(_0x21a759);return console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x244)](_0x19cdfa(0x223)+_0x4c3b98)),0x1;}console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x20e)](_0x19cdfa(0x1ea))),console[_0x19cdfa(0x20a)](_0x19cdfa(0x235)+a5_0x4d72d3[_0x19cdfa(0x1fd)](_0x195c8d['timestamp'])),console[_0x19cdfa(0x20a)](_0x19cdfa(0x1fe)+a5_0x4d72d3['white'](_0x195c8d[_0x19cdfa(0x1e8)][_0x19cdfa(0x218)]+'/'+_0x195c8d[_0x19cdfa(0x1e8)][_0x19cdfa(0x209)]));_0x58a952['length']>0x0&&console[_0x19cdfa(0x20a)](_0x19cdfa(0x203)+a5_0x4d72d3['yellow'](_0x58a952[_0x19cdfa(0x246)]));console[_0x19cdfa(0x20a)]();const _0x2b4c88=[],_0x18ab8f=Date[_0x19cdfa(0x202)](),_0x17f2a5=createCommandSpinner(_0x19cdfa(0x1c9));if(_0x2548a9[_0x19cdfa(0x246)]>0x0)try{const _0xe43000=await reevaluateFromCache(_0x3e74ba[_0x19cdfa(0x1d4)],_0x195c8d,{'tests':_0x2548a9},{'evaluatorId':_0x34fa67,'onTestStart':(_0x260822,_0x3c8dd6,_0x294f9b)=>{const _0x3b59b=_0x19cdfa;_0x17f2a5[_0x3b59b(0x1ef)]='Re-evaluating\x20'+(_0x3c8dd6+0x1)+'/'+_0x294f9b+':\x20'+_0x260822+'...';if(!_0x17f2a5[_0x3b59b(0x1e7)])_0x17f2a5['start']();},'onTestComplete':(_0x22fb80,_0x37b97b)=>{const _0x3a6b0c=_0x19cdfa;_0x17f2a5['stop']();if(_0x37b97b[_0x3a6b0c(0x251)]===_0x3a6b0c(0x1cf))console['log'](a5_0x4d72d3[_0x3a6b0c(0x1c6)]('✓\x20PASS:\x20'+_0x22fb80)+a5_0x4d72d3['dim'](_0x3a6b0c(0x249)));else _0x37b97b[_0x3a6b0c(0x251)]===_0x3a6b0c(0x21f)?console[_0x3a6b0c(0x20a)](a5_0x4d72d3[_0x3a6b0c(0x244)](_0x3a6b0c(0x1d0)+_0x22fb80+_0x3a6b0c(0x24e)+_0x37b97b[_0x3a6b0c(0x225)])+a5_0x4d72d3[_0x3a6b0c(0x23e)]('\x20(cached)')):console[_0x3a6b0c(0x20a)](a5_0x4d72d3['red']('✗\x20ERROR:\x20'+_0x22fb80+_0x3a6b0c(0x24e)+_0x37b97b[_0x3a6b0c(0x225)]));_0x37b97b[_0x3a6b0c(0x1f5)]&&console[_0x3a6b0c(0x20a)](a5_0x4d72d3[_0x3a6b0c(0x23e)](_0x3a6b0c(0x1c5)+_0x37b97b[_0x3a6b0c(0x1f5)])),_0x2b4c88[_0x3a6b0c(0x252)](_0x37b97b);},'onTestSkipped':(_0x44a0a9,_0x2d544b)=>{const _0x4bddb0=_0x19cdfa;_0x17f2a5[_0x4bddb0(0x237)](),console[_0x4bddb0(0x20a)](a5_0x4d72d3[_0x4bddb0(0x24f)]('⚠\x20SKIPPED:\x20'+_0x44a0a9+_0x4bddb0(0x24e)+_0x2d544b));}});for(const _0x5a047e of _0xe43000){!_0x2b4c88['find'](_0x5ede00=>_0x5ede00['name']===_0x5a047e[_0x19cdfa(0x1f4)])&&_0x2b4c88[_0x19cdfa(0x252)](_0x5a047e);}}catch(_0x441ab5){_0x17f2a5[_0x19cdfa(0x237)]();const _0x18a17f=_0x441ab5 instanceof Error?_0x441ab5[_0x19cdfa(0x1dc)]:String(_0x441ab5);return console[_0x19cdfa(0x20a)](a5_0x4d72d3['red'](_0x19cdfa(0x23f)+_0x18a17f)),0x1;}_0x17f2a5[_0x19cdfa(0x237)]();if(_0x58a952[_0x19cdfa(0x246)]>0x0){console[_0x19cdfa(0x20a)](),console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x20e)]('Executing\x20new\x20tests...'));const {projectId:_0x1317b0,agentId:_0x3a4ac7}=_0x195c8d[_0x19cdfa(0x1e8)];for(const _0x19dea7 of _0x58a952){console[_0x19cdfa(0x20a)](_0x19cdfa(0x222)+a5_0x4d72d3[_0x19cdfa(0x1fd)](_0x19dea7['name']));const _0x27a882=createCommandSpinner(_0x19cdfa(0x213)+_0x19dea7['rounds']['length']+_0x19cdfa(0x22f));_0x27a882['start']();try{const {result:_0x3661d1}=await runTest(_0x3e74ba[_0x19cdfa(0x1d4)],_0x19dea7,{'agentId':_0x3a4ac7,'projectId':_0x1317b0,'site':_0x195c8d['site'],'noEval':![],'evaluatorId':_0x34fa67,'onRoundStart':(_0x368cc4,_0x428ab5)=>{const _0xe306d1=_0x19cdfa;_0x27a882[_0xe306d1(0x1ef)]=_0xe306d1(0x241)+(_0x368cc4+0x1)+'/'+_0x428ab5+_0xe306d1(0x22f);},'onRoundComplete':(_0x5c4206,_0x414b41,_0x27e953)=>{const _0x3e9cca=_0x19cdfa,_0xc0c6e=formatElapsed(_0x414b41);_0x27e953?console[_0x3e9cca(0x20a)]('\x20\x20Round\x20'+(_0x5c4206+0x1)+'/'+_0x19dea7['rounds'][_0x3e9cca(0x246)]+'...\x20'+a5_0x4d72d3[_0x3e9cca(0x1c6)]('✓')+'\x20('+_0xc0c6e+')'):console[_0x3e9cca(0x20a)](_0x3e9cca(0x221)+(_0x5c4206+0x1)+'/'+_0x19dea7[_0x3e9cca(0x22c)][_0x3e9cca(0x246)]+_0x3e9cca(0x1cd)+a5_0x4d72d3[_0x3e9cca(0x244)]('✗'));},'onEvaluationStart':()=>{const _0x2c071e=_0x19cdfa;_0x27a882[_0x2c071e(0x1ef)]=_0x2c071e(0x239);},'onEvaluationComplete':_0x499e65=>{const _0x5182e6=_0x19cdfa,_0x53361c=formatElapsed(_0x499e65);console[_0x5182e6(0x20a)](_0x5182e6(0x21b)+a5_0x4d72d3[_0x5182e6(0x1c6)]('✓')+'\x20('+_0x53361c+')');}});_0x27a882[_0x19cdfa(0x237)](),_0x2b4c88[_0x19cdfa(0x252)](_0x3661d1);if(_0x3661d1[_0x19cdfa(0x251)]===_0x19cdfa(0x1cf))console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x1c6)](_0x19cdfa(0x206)+_0x3661d1[_0x19cdfa(0x225)])+a5_0x4d72d3[_0x19cdfa(0x23e)](_0x19cdfa(0x200)));else _0x3661d1[_0x19cdfa(0x251)]===_0x19cdfa(0x21f)?console['log'](a5_0x4d72d3[_0x19cdfa(0x244)](_0x19cdfa(0x1d0)+_0x3661d1[_0x19cdfa(0x225)])+a5_0x4d72d3[_0x19cdfa(0x23e)](_0x19cdfa(0x200))):console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x244)]('✗\x20ERROR:\x20'+_0x3661d1[_0x19cdfa(0x225)]));_0x3661d1['conversation_url']&&console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x23e)](_0x19cdfa(0x1c5)+_0x3661d1['conversation_url']));}catch(_0x4fcca8){_0x27a882[_0x19cdfa(0x237)]();const _0x1b54b2=_0x4fcca8 instanceof Error?_0x4fcca8[_0x19cdfa(0x1dc)]:String(_0x4fcca8);console[_0x19cdfa(0x20a)](a5_0x4d72d3['red'](_0x19cdfa(0x1df)+_0x1b54b2)),_0x2b4c88['push']({'name':_0x19dea7[_0x19cdfa(0x1f4)],'status':_0x19cdfa(0x1d5),'reason':_0x1b54b2,'timestamp':new Date()[_0x19cdfa(0x245)](),'duration_ms':0x0});}}}console[_0x19cdfa(0x20a)]();const _0x17b2f5=Date[_0x19cdfa(0x202)]()-_0x18ab8f,_0x59d90c=_0x2b4c88[_0x19cdfa(0x240)](_0x57eca5=>_0x57eca5[_0x19cdfa(0x251)]===_0x19cdfa(0x1cf))['length'],_0x38b591=_0x2b4c88['filter'](_0x24b983=>_0x24b983[_0x19cdfa(0x251)]===_0x19cdfa(0x21f))['length'],_0x43ad0a=_0x2b4c88[_0x19cdfa(0x240)](_0x571528=>_0x571528[_0x19cdfa(0x251)]===_0x19cdfa(0x1d5))[_0x19cdfa(0x246)];console[_0x19cdfa(0x20a)]('━'['repeat'](0x3c)),console[_0x19cdfa(0x20a)]('Re-evaluation\x20Summary'),console[_0x19cdfa(0x20a)]('━'[_0x19cdfa(0x1e4)](0x3c)),console['log'](_0x19cdfa(0x1ca)+_0x2b4c88[_0x19cdfa(0x246)]),console[_0x19cdfa(0x20a)]('Passed:\x20\x20\x20'+a5_0x4d72d3[_0x19cdfa(0x1c6)](_0x59d90c)),console['log'](_0x19cdfa(0x1de)+a5_0x4d72d3['red'](_0x38b591));_0x43ad0a>0x0&&console['log'](_0x19cdfa(0x1e6)+a5_0x4d72d3[_0x19cdfa(0x244)](_0x43ad0a));console[_0x19cdfa(0x20a)](_0x19cdfa(0x1d2)+formatElapsed(_0x17b2f5)),console['log']('━'[_0x19cdfa(0x1e4)](0x3c));const _0x44d5c1={'summary':{'total':_0x2b4c88[_0x19cdfa(0x246)],'passed':_0x59d90c,'failed':_0x38b591,'errors':_0x43ad0a>0x0?_0x43ad0a:undefined,'duration_ms':_0x17b2f5},'tests':_0x2b4c88,'agent':{'project':_0x348cc9['projectName'],'name':_0x348cc9[_0x19cdfa(0x209)],'site':_0x1ec1bc},'timestamp':new Date(_0x18ab8f)[_0x19cdfa(0x245)]()};if(_0x543108!==_0x19cdfa(0x1d9)||_0x35d0c0){const _0x4cbee0=formatResults(_0x44d5c1,_0x543108);if(_0x35d0c0)try{a5_0x178dc4[_0x19cdfa(0x212)](_0x35d0c0,_0x4cbee0,'utf-8'),console['log'](),console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x23e)]('Output\x20written\x20to:\x20'+_0x35d0c0));}catch(_0x5ceed1){return console[_0x19cdfa(0x20a)](),console[_0x19cdfa(0x20a)](a5_0x4d72d3[_0x19cdfa(0x244)](_0x19cdfa(0x243)+_0x5ceed1)),0x1;}else console['log'](),console[_0x19cdfa(0x20a)](_0x4cbee0);}const _0x356f34=_0x2b4c88['filter'](_0x1140f9=>_0x1140f9[_0x19cdfa(0x251)]!=='PASS');return _0x356f34[_0x19cdfa(0x246)]>0x0?0x1:0x0;}}
1
+ const a5_0x4c0922=a5_0x4088;(function(_0x113159,_0x412914){const _0x16df86=a5_0x4088,_0x3895bc=_0x113159();while(!![]){try{const _0x50ce68=-parseInt(_0x16df86(0x12d))/0x1*(-parseInt(_0x16df86(0x13d))/0x2)+parseInt(_0x16df86(0x12b))/0x3*(-parseInt(_0x16df86(0xf3))/0x4)+parseInt(_0x16df86(0xf5))/0x5*(-parseInt(_0x16df86(0xef))/0x6)+parseInt(_0x16df86(0x136))/0x7*(-parseInt(_0x16df86(0x14b))/0x8)+-parseInt(_0x16df86(0x12a))/0x9+parseInt(_0x16df86(0x14a))/0xa+parseInt(_0x16df86(0xdd))/0xb;if(_0x50ce68===_0x412914)break;else _0x3895bc['push'](_0x3895bc['shift']());}catch(_0x10b911){_0x3895bc['push'](_0x3895bc['shift']());}}}(a5_0x9cc7,0x6aa2b));import*as a5_0x5a58c7 from'node:fs';import*as a5_0x4c008d from'node:path';import a5_0x259fd0 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';function a5_0x4088(_0x3139c3,_0x2b9651){_0x3139c3=_0x3139c3-0xbb;const _0x9cc71b=a5_0x9cc7();let _0x4088b1=_0x9cc71b[_0x3139c3];return _0x4088b1;}import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';function a5_0x9cc7(){const _0x40ad6e=['resolveProjectId','Running\x20agent\x20tests...','toISOString','52468PnMLmf','\x20\x20-\x20','Test\x20Summary','white','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','Output\x20written\x20to:\x20','Round\x201/','conversation_url','Errors:\x20\x20\x20','rounds','repeat','Available\x20tags:\x20','length','7572050RyrtUx','423152qDWUIz','\x20\x20Project:\x20','writeFileSync','Test\x20','execute','not\x20found','No\x20tests\x20have\x20tags\x20defined.','New\x20tests\x20to\x20execute:\x20','PASS','ERROR','agentName','site','agent:test','log','tags','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','Running\x20test:\x20','\x20(cached)','name','\x20\x20Round\x20','Run\x20tests\x20for\x20an\x20LLM\x20agent','✓\x20PASS:\x20','No\x20tests\x20found\x20with\x20tags:\x20','\x20\x20Agent:\x20','no_context','testYmlPath','\x22,\x20but\x20current\x20site\x20is\x20\x22','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/',':\x20Sending\x20user\x20input...','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','Re-evaluating...','jsonl','green','trim','Using\x20agent:\x20','\x20\x20tdx\x20agent\x20test\x20<path>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20from\x20path','json','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','message','404','Agent:\x20','Re-evaluating\x20','18340509DbkrAw','Conversation\x20URL:\x20','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','status','context','yellow','Cached\x20run\x20from:\x20','\x20\x20tdx\x20agent\x20test\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20(requires\x20context\x20or\x20tdx.json)','size','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','FAIL','Total:\x20\x20\x20\x20','join','red','no_tests','filter','output','36498AFpxIC','split','existsSync','dryRun','468yJNeQe','executeReeval','190stcaxg','verbose','toLowerCase','utf-8','eval','push','stop','\x27\x20to\x20create\x20the\x20folder\x20structure.','\x20-\x20','forEach','✗\x20FAIL:\x20','Failed\x20Tests:','\x20(new)','map','Run\x20\x27tdx\x20agent\x20pull\x20','llmProject','/<agent-name>','...','projectName','Project\x20path:\x20','Duration:\x20','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','Round\x20','projectDir','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','round','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','✗\x20ERROR:\x20','...\x20','⚠\x20SKIPPED:\x20','found','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','Test\x20Configuration:','text','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','cyan','start','tests','\x20\x20Site:\x20','Error\x20writing\x20output\x20file:\x20','some','now','Re-evaluation\x20Summary','Failed:\x20\x20\x20','llm','find','Re-evaluating\x20cached\x20test\x20run...','Executing\x20new\x20tests...','agent','table','✗\x20ERROR:\x20Project\x20not\x20found:\x20','Error:\x20No\x20previous\x20test\x20run\x20found.','has','7733250WEKFXr','14133ZadOgR','\x20\x20Conversation:\x20','11sbCXRR','\x20\x20Evaluating...\x20','Passed:\x20\x20\x20','reason','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','Tests\x20found:\x20','dim','\x22:\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','84BSmLVL','includes','test.yml','tsv'];a5_0x9cc7=function(){return _0x40ad6e;};return a5_0x9cc7();}export class AgentTestCommand extends BaseCommand{[a5_0x4c0922(0xc4)]=a5_0x4c0922(0xbe);['description']=a5_0x4c0922(0xc6);async[a5_0x4c0922(0x14f)](_0x2ccc8d){const _0x5a729c=a5_0x4c0922,{options:_0x23ddab,args:_0x232a47,tdx:_0x31cdc2}=_0x2ccc8d,_0x55a87b=_0x232a47[0x0]||'.',_0x29baac=_0x23ddab[_0x5a729c(0xf2)],_0x3b140c=_0x23ddab,_0x2f8c3c=_0x3b140c[_0x5a729c(0xf9)]===![],_0x3c5c6e=_0x3b140c['reeval'],_0x4c08fe=_0x3b140c[_0x5a729c(0xc4)],_0x1b5d41=_0x3b140c[_0x5a729c(0xc0)],_0x23cf1f=_0x23ddab['site'],_0x2c0ea5=_0x3b140c[_0x5a729c(0xee)];if(_0x3c5c6e&&_0x2f8c3c)return console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xeb)](_0x5a729c(0xd7))),0x1;let _0x57dfb8='table';if(_0x3b140c[_0x5a729c(0xd6)])_0x57dfb8=_0x5a729c(0xd6);else{if(_0x3b140c['jsonl'])_0x57dfb8=_0x5a729c(0xd1);else{if(_0x3b140c[_0x5a729c(0x139)])_0x57dfb8=_0x5a729c(0x139);else{if(_0x3b140c[_0x5a729c(0x126)])_0x57dfb8=_0x5a729c(0x126);}}}const _0x3430a9=_0x3b140c['llmProject'];let _0x1f3f2c=_0x55a87b;const _0x362132=a5_0x5a58c7[_0x5a729c(0xf1)](_0x55a87b),_0x195302=_0x55a87b==='.';if(!_0x362132||_0x195302){const _0x29bf23=resolveProjectFromContext(_0x55a87b,_0x3430a9,{'requireFile':_0x5a729c(0x138)});if(_0x29bf23[_0x5a729c(0x113)])_0x1f3f2c=_0x29bf23['projectDir'],_0x29bf23['source']===_0x5a729c(0xe2)&&console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0x133)](_0x5a729c(0xd4)+_0x1f3f2c));else switch(_0x29bf23[_0x5a729c(0x130)]){case _0x5a729c(0xca):console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xe3)](_0x29bf23[_0x5a729c(0xd9)])),console[_0x5a729c(0xbf)](),console[_0x5a729c(0xbf)]('Usage:'),console[_0x5a729c(0xbf)](_0x5a729c(0xd5)),console['log'](_0x5a729c(0xe5)),console[_0x5a729c(0xbf)](),console[_0x5a729c(0xbf)](_0x5a729c(0xdf));return 0x1;case'no_local_folder':console['log'](a5_0x259fd0[_0x5a729c(0xe3)](_0x29bf23['message'])),console['log'](),console[_0x5a729c(0xbf)](_0x5a729c(0x103)+_0x29bf23[_0x5a729c(0x104)]+_0x5a729c(0xfc));return 0x1;case'multiple_agents':{const _0x5b2b90=a5_0x4c008d['basename'](_0x29bf23['projectDir']);console['log'](a5_0x259fd0[_0x5a729c(0xe3)]('Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22'+_0x29bf23[_0x5a729c(0x104)]+'\x22:'));for(const _0x5c330f of _0x29bf23['agentDirs']){console[_0x5a729c(0xbf)](_0x5a729c(0x13e)+_0x5c330f);}return console['log'](),console[_0x5a729c(0xbf)](_0x5a729c(0xcd)+_0x5b2b90+_0x5a729c(0x105)),0x1;}case _0x5a729c(0xec):console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xe3)](_0x5a729c(0x114)+_0x29bf23[_0x5a729c(0x104)]+'\x22.')),console[_0x5a729c(0xbf)](a5_0x259fd0['dim'](_0x5a729c(0x108)+_0x29bf23[_0x5a729c(0x10c)])),console['log'](),console['log'](_0x5a729c(0x10f));return 0x1;}}const {definition:_0x3a2a77,agentInfo:_0x5e7bbc}=parseTestFile(_0x1f3f2c);let _0x54433a=_0x3a2a77[_0x5a729c(0x11a)];if(_0x4c08fe){const _0x16bb70=_0x4c08fe['split'](',')[_0x5a729c(0x102)](_0x298b85=>_0x298b85[_0x5a729c(0xd3)]());_0x54433a=_0x3a2a77[_0x5a729c(0x11a)][_0x5a729c(0xed)](_0x1bcf88=>_0x16bb70['includes'](_0x1bcf88['name']));if(_0x54433a[_0x5a729c(0x149)]===0x0)return console['log'](a5_0x259fd0[_0x5a729c(0xe3)]('No\x20tests\x20found\x20matching:\x20'+_0x4c08fe)),console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0x133)]('Available\x20tests:\x20'+_0x3a2a77['tests'][_0x5a729c(0x102)](_0x13d2cb=>_0x13d2cb[_0x5a729c(0xc4)])['join'](',\x20'))),0x1;}if(_0x1b5d41){const _0x22f23c=_0x1b5d41[_0x5a729c(0xf0)](',')[_0x5a729c(0x102)](_0x530fe4=>_0x530fe4['trim']()['toLowerCase']());_0x54433a=_0x54433a[_0x5a729c(0xed)](_0x39c4a1=>_0x39c4a1[_0x5a729c(0xc0)]?.[_0x5a729c(0x11d)](_0x2c103f=>_0x22f23c[_0x5a729c(0x137)](_0x2c103f[_0x5a729c(0xf7)]())));if(_0x54433a[_0x5a729c(0x149)]===0x0){console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xe3)](_0x5a729c(0xc8)+_0x1b5d41));const _0x132d18=new Set();return _0x3a2a77[_0x5a729c(0x11a)][_0x5a729c(0xfe)](_0x424092=>_0x424092[_0x5a729c(0xc0)]?.[_0x5a729c(0xfe)](_0x3e0d9a=>_0x132d18['add'](_0x3e0d9a))),_0x132d18[_0x5a729c(0xe6)]>0x0?console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0x133)](_0x5a729c(0x148)+[..._0x132d18][_0x5a729c(0xea)](',\x20'))):console['log'](a5_0x259fd0[_0x5a729c(0x133)](_0x5a729c(0x151))),0x1;}}if(_0x3c5c6e)return this['executeReeval'](_0x2ccc8d,{'definition':{'tests':_0x54433a},'agentInfo':_0x5e7bbc,'outputFormat':_0x57dfb8,'outputFile':_0x2c0ea5,'testNames':_0x4c08fe});if(_0x29baac){console[_0x5a729c(0xbf)](a5_0x259fd0['cyan'](_0x5a729c(0x115))),console[_0x5a729c(0xbf)](_0x5a729c(0x11b)+a5_0x259fd0[_0x5a729c(0x140)](_0x23cf1f)),console[_0x5a729c(0xbf)](_0x5a729c(0x14c)+a5_0x259fd0[_0x5a729c(0x140)](_0x5e7bbc[_0x5a729c(0x107)])),console[_0x5a729c(0xbf)](_0x5a729c(0xc9)+a5_0x259fd0[_0x5a729c(0x140)](_0x5e7bbc['agentName'])),console['log'](),console[_0x5a729c(0xbf)](_0x5a729c(0x132)+a5_0x259fd0[_0x5a729c(0x140)](_0x54433a['length']));for(let _0x246b11=0x0;_0x246b11<_0x54433a[_0x5a729c(0x149)];_0x246b11++){const _0x538e27=_0x54433a[_0x246b11],_0x1c4be2=_0x538e27['rounds']['length']===0x1?_0x5a729c(0x10e):'rounds',_0x21be65=_0x538e27[_0x5a729c(0xc0)]?.['length']?'\x20['+_0x538e27['tags']['join'](',\x20')+']':'';console[_0x5a729c(0xbf)]('\x20\x20'+(_0x246b11+0x1)+'.\x20'+a5_0x259fd0[_0x5a729c(0x140)](_0x538e27[_0x5a729c(0xc4)])+'\x20('+_0x538e27[_0x5a729c(0x146)][_0x5a729c(0x149)]+'\x20'+_0x1c4be2+')'+a5_0x259fd0['dim'](_0x21be65));}return 0x0;}let _0x44fbaf,_0x3e3554;try{_0x44fbaf=await _0x31cdc2[_0x5a729c(0x121)][_0x5a729c(0x13a)](_0x5e7bbc['projectName']);}catch(_0x29c8ca){const _0x5c8370=_0x29c8ca instanceof Error?_0x29c8ca[_0x5a729c(0xd9)]:String(_0x29c8ca);return _0x5c8370[_0x5a729c(0x137)](_0x5a729c(0xda))||_0x5c8370[_0x5a729c(0xf7)]()[_0x5a729c(0x137)](_0x5a729c(0x150))?console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xeb)](_0x5a729c(0x127)+_0x5e7bbc[_0x5a729c(0x107)])):console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xeb)](_0x5a729c(0x135)+_0x5e7bbc[_0x5a729c(0x107)]+_0x5a729c(0x134)+_0x5c8370)),0x1;}try{_0x3e3554=await _0x31cdc2['llm']['resolveAgentId'](_0x5e7bbc[_0x5a729c(0xbc)],_0x44fbaf);}catch(_0x237d47){const _0x455a76=_0x237d47 instanceof Error?_0x237d47[_0x5a729c(0xd9)]:String(_0x237d47);return _0x455a76[_0x5a729c(0x137)]('404')||_0x455a76['toLowerCase']()[_0x5a729c(0x137)](_0x5a729c(0x150))?console[_0x5a729c(0xbf)](a5_0x259fd0['red'](_0x5a729c(0x117)+_0x5e7bbc[_0x5a729c(0xbc)])):console['log'](a5_0x259fd0[_0x5a729c(0xeb)](_0x5a729c(0xd8)+_0x5e7bbc[_0x5a729c(0xbc)]+_0x5a729c(0x134)+_0x455a76)),0x1;}let _0x52e4d0;if(!_0x2f8c3c)try{_0x52e4d0=await setupEvaluatorAgent(_0x31cdc2[_0x5a729c(0x121)],_0x23ddab['verbose']);}catch(_0x4006be){const _0x18c464=_0x4006be instanceof Error?_0x4006be[_0x5a729c(0xd9)]:String(_0x4006be);return console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xeb)](_0x5a729c(0xe0)+_0x18c464)),0x1;}console['log'](a5_0x259fd0['cyan'](_0x5a729c(0x13b))),console[_0x5a729c(0xbf)]('Site:\x20'+a5_0x259fd0[_0x5a729c(0x140)](_0x23cf1f)),console[_0x5a729c(0xbf)](_0x5a729c(0xdb)+a5_0x259fd0[_0x5a729c(0x140)](_0x5e7bbc[_0x5a729c(0x107)]+'/'+_0x5e7bbc['agentName'])),console[_0x5a729c(0xbf)]();const _0x272536=[],_0x2fd993=[],_0x354449=Date[_0x5a729c(0x11e)]();for(let _0x3518a1=0x0;_0x3518a1<_0x54433a[_0x5a729c(0x149)];_0x3518a1++){const _0x5d031c=_0x54433a[_0x3518a1];_0x54433a['length']>0x1?console[_0x5a729c(0xbf)](_0x5a729c(0x14e)+(_0x3518a1+0x1)+'/'+_0x54433a[_0x5a729c(0x149)]+':\x20'+a5_0x259fd0[_0x5a729c(0x140)](_0x5d031c['name'])):console[_0x5a729c(0xbf)](_0x5a729c(0xc2)+a5_0x259fd0[_0x5a729c(0x140)](_0x5d031c[_0x5a729c(0xc4)]));const _0x59f0af=createCommandSpinner('Round\x201/'+_0x5d031c[_0x5a729c(0x146)]['length']+_0x5a729c(0xce));_0x59f0af[_0x5a729c(0x119)]();try{const {result:_0x20a0ec,conversation:_0xab7611}=await runTest(_0x31cdc2[_0x5a729c(0x121)],_0x5d031c,{'agentId':_0x3e3554,'projectId':_0x44fbaf,'site':_0x23cf1f,'noEval':_0x2f8c3c,'evaluatorId':_0x52e4d0,'onRoundStart':(_0x5e247e,_0x1c1400)=>{const _0x4828da=_0x5a729c;_0x59f0af[_0x4828da(0x116)]=_0x4828da(0x10b)+(_0x5e247e+0x1)+'/'+_0x1c1400+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x3686a5,_0x13be3b,_0x74edc5)=>{const _0xd22e2f=_0x5a729c,_0x4eff99=formatElapsed(_0x13be3b);_0x74edc5?console['log'](_0xd22e2f(0xc5)+(_0x3686a5+0x1)+'/'+_0x5d031c[_0xd22e2f(0x146)][_0xd22e2f(0x149)]+_0xd22e2f(0x111)+a5_0x259fd0[_0xd22e2f(0xd2)]('✓')+'\x20('+_0x4eff99+')'):console[_0xd22e2f(0xbf)](_0xd22e2f(0xc5)+(_0x3686a5+0x1)+'/'+_0x5d031c['rounds'][_0xd22e2f(0x149)]+'...\x20'+a5_0x259fd0['red']('✗'));},'onEvaluationStart':()=>{const _0x2dab5b=_0x5a729c;_0x59f0af[_0x2dab5b(0x116)]='Evaluating\x20response...';},'onEvaluationComplete':_0x411f28=>{const _0x1ce89d=_0x5a729c,_0xd68608=formatElapsed(_0x411f28);console[_0x1ce89d(0xbf)](_0x1ce89d(0x12e)+a5_0x259fd0['green']('✓')+'\x20('+_0xd68608+')');}});_0x59f0af['stop'](),_0x272536[_0x5a729c(0xfa)](_0x20a0ec),_0x2fd993['push'](_0xab7611);if(_0x20a0ec[_0x5a729c(0xe1)]===_0x5a729c(0x153))console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xd2)](_0x5a729c(0xc7)+_0x20a0ec[_0x5a729c(0x130)]));else _0x20a0ec[_0x5a729c(0xe1)]==='FAIL'?console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xeb)](_0x5a729c(0xff)+_0x20a0ec[_0x5a729c(0x130)])):console[_0x5a729c(0xbf)](a5_0x259fd0['red'](_0x5a729c(0x110)+_0x20a0ec[_0x5a729c(0x130)]));_0x20a0ec[_0x5a729c(0x144)]&&console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0x133)](_0x5a729c(0xde)+_0x20a0ec['conversation_url'])),console[_0x5a729c(0xbf)]();}catch(_0x488a58){_0x59f0af['stop']();const _0x4e03cb=_0x488a58 instanceof Error?_0x488a58[_0x5a729c(0xd9)]:String(_0x488a58);console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xeb)](_0x5a729c(0x110)+_0x4e03cb)),console[_0x5a729c(0xbf)](),_0x272536[_0x5a729c(0xfa)]({'name':_0x5d031c[_0x5a729c(0xc4)],'status':_0x5a729c(0xbb),'reason':_0x4e03cb,'timestamp':new Date()[_0x5a729c(0x13c)](),'duration_ms':0x0});}}const _0x510047=Date[_0x5a729c(0x11e)]()-_0x354449,_0x5195b7=_0x272536['filter'](_0x21e32e=>_0x21e32e[_0x5a729c(0xe1)]===_0x5a729c(0x153))[_0x5a729c(0x149)],_0x3cc9db=_0x272536[_0x5a729c(0xed)](_0x18f42b=>_0x18f42b['status']===_0x5a729c(0xe8))[_0x5a729c(0x149)],_0x91e326=_0x272536['filter'](_0x499c28=>_0x499c28[_0x5a729c(0xe1)]===_0x5a729c(0xbb))[_0x5a729c(0x149)];console[_0x5a729c(0xbf)]('━'['repeat'](0x3c)),console[_0x5a729c(0xbf)](_0x5a729c(0x13f)),console['log']('━'[_0x5a729c(0x147)](0x3c)),console[_0x5a729c(0xbf)](_0x5a729c(0xe9)+_0x272536[_0x5a729c(0x149)]),console[_0x5a729c(0xbf)]('Passed:\x20\x20\x20'+a5_0x259fd0['green'](_0x5195b7)),console[_0x5a729c(0xbf)](_0x5a729c(0x120)+a5_0x259fd0['red'](_0x3cc9db));_0x91e326>0x0&&console[_0x5a729c(0xbf)](_0x5a729c(0x145)+a5_0x259fd0['red'](_0x91e326));console['log'](_0x5a729c(0x109)+formatElapsed(_0x510047)),console[_0x5a729c(0xbf)]('━'[_0x5a729c(0x147)](0x3c));const _0x4bd3e8=_0x272536[_0x5a729c(0xed)](_0x91a320=>_0x91a320[_0x5a729c(0xe1)]!==_0x5a729c(0x153));if(_0x4bd3e8[_0x5a729c(0x149)]>0x0){console[_0x5a729c(0xbf)](),console['log'](_0x5a729c(0x100));for(const _0x218e43 of _0x4bd3e8){const _0x3e1541=a5_0x259fd0[_0x5a729c(0xeb)]('✗'),_0x55d681=_0x218e43[_0x5a729c(0x130)][_0x5a729c(0x149)]>0x32?_0x218e43[_0x5a729c(0x130)]['substring'](0x0,0x32)+_0x5a729c(0x106):_0x218e43[_0x5a729c(0x130)];console[_0x5a729c(0xbf)]('\x20\x20'+_0x3e1541+'\x20'+_0x218e43[_0x5a729c(0xc4)]+':\x20'+_0x55d681);}}const _0x15a5dc={'summary':{'total':_0x272536[_0x5a729c(0x149)],'passed':_0x5195b7,'failed':_0x3cc9db,'errors':_0x91e326>0x0?_0x91e326:undefined,'duration_ms':_0x510047},'tests':_0x272536,'agent':{'project':_0x5e7bbc[_0x5a729c(0x107)],'name':_0x5e7bbc[_0x5a729c(0xbc)],'site':_0x23cf1f},'timestamp':new Date(_0x354449)[_0x5a729c(0x13c)]()};try{const _0x303fb4=buildCachedTestRun(_0x2fd993,{'site':_0x23cf1f,'projectId':_0x44fbaf,'projectName':_0x5e7bbc[_0x5a729c(0x107)],'agentId':_0x3e3554,'agentName':_0x5e7bbc['agentName'],'testYmlPath':a5_0x4c008d['resolve'](_0x5e7bbc[_0x5a729c(0xcb)])});saveLastTestRun(_0x303fb4);}catch{}if(_0x57dfb8!==_0x5a729c(0x126)||_0x2c0ea5){const _0x2f21fd=formatResults(_0x15a5dc,_0x57dfb8);if(_0x2c0ea5)try{a5_0x5a58c7[_0x5a729c(0x14d)](_0x2c0ea5,_0x2f21fd,_0x5a729c(0xf8)),console[_0x5a729c(0xbf)](),console['log'](a5_0x259fd0['dim']('Output\x20written\x20to:\x20'+_0x2c0ea5));}catch(_0x3b66df){return console[_0x5a729c(0xbf)](),console[_0x5a729c(0xbf)](a5_0x259fd0[_0x5a729c(0xeb)](_0x5a729c(0x11c)+_0x3b66df)),0x1;}else console[_0x5a729c(0xbf)](),console[_0x5a729c(0xbf)](_0x2f21fd);}return _0x4bd3e8[_0x5a729c(0x149)]>0x0?0x1:0x0;}async[a5_0x4c0922(0xf4)](_0x47124e,_0x104f30){const _0x55870b=a5_0x4c0922,{options:_0x1a703f,tdx:_0x268c6f}=_0x47124e,{definition:_0x72f932,agentInfo:_0x31e09c,outputFormat:_0x17be4f,outputFile:_0x5cc679}=_0x104f30,_0x4b7f72=_0x1a703f['site'],_0x3a398b=loadLastTestRun();if(!_0x3a398b)return console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0xeb)](_0x55870b(0x128))),console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0x133)](_0x55870b(0x10a))),0x1;if(_0x3a398b[_0x55870b(0x125)][_0x55870b(0xbc)]!==_0x31e09c[_0x55870b(0xbc)])return console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0xeb)](_0x55870b(0xcf)+_0x3a398b[_0x55870b(0x125)][_0x55870b(0xbc)]+_0x55870b(0x10d)+_0x31e09c[_0x55870b(0xbc)]+'\x22.')),console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0x133)](_0x55870b(0x131))),0x1;const _0x551824=new Set(_0x3a398b['conversations'][_0x55870b(0x102)](_0xb1aefd=>_0xb1aefd['testName'])),_0x146440=_0x72f932[_0x55870b(0x11a)]['filter'](_0x4d58ce=>!_0x551824['has'](_0x4d58ce[_0x55870b(0xc4)]));if(_0x146440[_0x55870b(0x149)]>0x0&&_0x3a398b['site']!==_0x4b7f72)return console['log'](a5_0x259fd0[_0x55870b(0xeb)](_0x55870b(0xc1))),console['log'](a5_0x259fd0[_0x55870b(0x133)]('Cached\x20run\x20is\x20from\x20site\x20\x22'+_0x3a398b[_0x55870b(0xbd)]+_0x55870b(0xcc)+_0x4b7f72+'\x22.')),console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0x133)]('Either\x20switch\x20to\x20the\x20\x22'+_0x3a398b[_0x55870b(0xbd)]+_0x55870b(0xe7))),0x1;const _0x437984=_0x72f932['tests'][_0x55870b(0xed)](_0x3109d4=>_0x551824[_0x55870b(0x129)](_0x3109d4[_0x55870b(0xc4)])),_0xb50ad8=_0x146440;let _0x5b0a98;try{_0x5b0a98=await setupEvaluatorAgent(_0x268c6f['llm'],_0x1a703f[_0x55870b(0xf6)]);}catch(_0x26f874){const _0x521628=_0x26f874 instanceof Error?_0x26f874['message']:String(_0x26f874);return console['log'](a5_0x259fd0['red'](_0x55870b(0xe0)+_0x521628)),0x1;}console['log'](a5_0x259fd0['cyan'](_0x55870b(0x123))),console[_0x55870b(0xbf)](_0x55870b(0xe4)+a5_0x259fd0[_0x55870b(0x140)](_0x3a398b['timestamp'])),console[_0x55870b(0xbf)](_0x55870b(0xdb)+a5_0x259fd0[_0x55870b(0x140)](_0x3a398b[_0x55870b(0x125)]['projectName']+'/'+_0x3a398b[_0x55870b(0x125)][_0x55870b(0xbc)]));_0xb50ad8[_0x55870b(0x149)]>0x0&&console[_0x55870b(0xbf)](_0x55870b(0x152)+a5_0x259fd0[_0x55870b(0xe3)](_0xb50ad8[_0x55870b(0x149)]));console[_0x55870b(0xbf)]();const _0x1f0f95=[],_0x38d4da=Date[_0x55870b(0x11e)](),_0x6e55ff=createCommandSpinner(_0x55870b(0xd0));if(_0x437984[_0x55870b(0x149)]>0x0)try{const _0x3e17f3=await reevaluateFromCache(_0x268c6f[_0x55870b(0x121)],_0x3a398b,{'tests':_0x437984},{'evaluatorId':_0x5b0a98,'onTestStart':(_0x2fdbdd,_0x3c1600,_0x475a43)=>{const _0x59f59b=_0x55870b;_0x6e55ff[_0x59f59b(0x116)]=_0x59f59b(0xdc)+(_0x3c1600+0x1)+'/'+_0x475a43+':\x20'+_0x2fdbdd+'...';if(!_0x6e55ff['isSpinning'])_0x6e55ff['start']();},'onTestComplete':(_0x7adf72,_0x4126b8)=>{const _0x5dabfa=_0x55870b;_0x6e55ff[_0x5dabfa(0xfb)]();if(_0x4126b8['status']===_0x5dabfa(0x153))console[_0x5dabfa(0xbf)](a5_0x259fd0[_0x5dabfa(0xd2)](_0x5dabfa(0xc7)+_0x7adf72)+a5_0x259fd0[_0x5dabfa(0x133)](_0x5dabfa(0xc3)));else _0x4126b8[_0x5dabfa(0xe1)]===_0x5dabfa(0xe8)?console[_0x5dabfa(0xbf)](a5_0x259fd0['red'](_0x5dabfa(0xff)+_0x7adf72+'\x20-\x20'+_0x4126b8[_0x5dabfa(0x130)])+a5_0x259fd0['dim'](_0x5dabfa(0xc3))):console[_0x5dabfa(0xbf)](a5_0x259fd0[_0x5dabfa(0xeb)](_0x5dabfa(0x110)+_0x7adf72+_0x5dabfa(0xfd)+_0x4126b8[_0x5dabfa(0x130)]));_0x4126b8['conversation_url']&&console['log'](a5_0x259fd0['dim'](_0x5dabfa(0x12c)+_0x4126b8[_0x5dabfa(0x144)])),_0x1f0f95[_0x5dabfa(0xfa)](_0x4126b8);},'onTestSkipped':(_0x438121,_0x12121c)=>{const _0x5b28bf=_0x55870b;_0x6e55ff['stop'](),console[_0x5b28bf(0xbf)](a5_0x259fd0[_0x5b28bf(0xe3)](_0x5b28bf(0x112)+_0x438121+_0x5b28bf(0xfd)+_0x12121c));}});for(const _0x4663b7 of _0x3e17f3){!_0x1f0f95[_0x55870b(0x122)](_0x41b34f=>_0x41b34f[_0x55870b(0xc4)]===_0x4663b7[_0x55870b(0xc4)])&&_0x1f0f95[_0x55870b(0xfa)](_0x4663b7);}}catch(_0x23f99c){_0x6e55ff[_0x55870b(0xfb)]();const _0x291814=_0x23f99c instanceof Error?_0x23f99c['message']:String(_0x23f99c);return console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0xeb)](_0x55870b(0x141)+_0x291814)),0x1;}_0x6e55ff[_0x55870b(0xfb)]();if(_0xb50ad8['length']>0x0){console[_0x55870b(0xbf)](),console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0x118)](_0x55870b(0x124)));const {projectId:_0x4bae60,agentId:_0x2b975a}=_0x3a398b['agent'];for(const _0xf41f57 of _0xb50ad8){console[_0x55870b(0xbf)]('Running:\x20'+a5_0x259fd0[_0x55870b(0x140)](_0xf41f57[_0x55870b(0xc4)]));const _0x3a0e57=createCommandSpinner(_0x55870b(0x143)+_0xf41f57[_0x55870b(0x146)]['length']+_0x55870b(0xce));_0x3a0e57[_0x55870b(0x119)]();try{const {result:_0x32cb73}=await runTest(_0x268c6f[_0x55870b(0x121)],_0xf41f57,{'agentId':_0x2b975a,'projectId':_0x4bae60,'site':_0x3a398b['site'],'noEval':![],'evaluatorId':_0x5b0a98,'onRoundStart':(_0xbfb64,_0x43930a)=>{const _0x2affbc=_0x55870b;_0x3a0e57[_0x2affbc(0x116)]=_0x2affbc(0x10b)+(_0xbfb64+0x1)+'/'+_0x43930a+_0x2affbc(0xce);},'onRoundComplete':(_0x7ea447,_0x2d2f8f,_0x52c4e6)=>{const _0x1edc7d=_0x55870b,_0x25390c=formatElapsed(_0x2d2f8f);_0x52c4e6?console['log'](_0x1edc7d(0xc5)+(_0x7ea447+0x1)+'/'+_0xf41f57['rounds'][_0x1edc7d(0x149)]+_0x1edc7d(0x111)+a5_0x259fd0[_0x1edc7d(0xd2)]('✓')+'\x20('+_0x25390c+')'):console[_0x1edc7d(0xbf)](_0x1edc7d(0xc5)+(_0x7ea447+0x1)+'/'+_0xf41f57[_0x1edc7d(0x146)][_0x1edc7d(0x149)]+'...\x20'+a5_0x259fd0['red']('✗'));},'onEvaluationStart':()=>{const _0x4695fb=_0x55870b;_0x3a0e57[_0x4695fb(0x116)]='Evaluating\x20response...';},'onEvaluationComplete':_0x41e00e=>{const _0x36d274=_0x55870b,_0x24b05a=formatElapsed(_0x41e00e);console['log']('\x20\x20Evaluating...\x20'+a5_0x259fd0[_0x36d274(0xd2)]('✓')+'\x20('+_0x24b05a+')');}});_0x3a0e57[_0x55870b(0xfb)](),_0x1f0f95[_0x55870b(0xfa)](_0x32cb73);if(_0x32cb73[_0x55870b(0xe1)]===_0x55870b(0x153))console['log'](a5_0x259fd0['green'](_0x55870b(0xc7)+_0x32cb73['reason'])+a5_0x259fd0[_0x55870b(0x133)]('\x20(new)'));else _0x32cb73['status']==='FAIL'?console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0xeb)](_0x55870b(0xff)+_0x32cb73[_0x55870b(0x130)])+a5_0x259fd0[_0x55870b(0x133)](_0x55870b(0x101))):console['log'](a5_0x259fd0[_0x55870b(0xeb)](_0x55870b(0x110)+_0x32cb73[_0x55870b(0x130)]));_0x32cb73[_0x55870b(0x144)]&&console[_0x55870b(0xbf)](a5_0x259fd0['dim'](_0x55870b(0x12c)+_0x32cb73[_0x55870b(0x144)]));}catch(_0x5dab7e){_0x3a0e57['stop']();const _0x966600=_0x5dab7e instanceof Error?_0x5dab7e['message']:String(_0x5dab7e);console['log'](a5_0x259fd0['red'](_0x55870b(0x110)+_0x966600)),_0x1f0f95[_0x55870b(0xfa)]({'name':_0xf41f57[_0x55870b(0xc4)],'status':_0x55870b(0xbb),'reason':_0x966600,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}}console[_0x55870b(0xbf)]();const _0xa3c062=Date[_0x55870b(0x11e)]()-_0x38d4da,_0x5e206b=_0x1f0f95[_0x55870b(0xed)](_0x54876c=>_0x54876c[_0x55870b(0xe1)]===_0x55870b(0x153))[_0x55870b(0x149)],_0x1ff65f=_0x1f0f95[_0x55870b(0xed)](_0x30e9ba=>_0x30e9ba[_0x55870b(0xe1)]===_0x55870b(0xe8))[_0x55870b(0x149)],_0x471170=_0x1f0f95[_0x55870b(0xed)](_0x46eb12=>_0x46eb12[_0x55870b(0xe1)]===_0x55870b(0xbb))['length'];console[_0x55870b(0xbf)]('━'[_0x55870b(0x147)](0x3c)),console[_0x55870b(0xbf)](_0x55870b(0x11f)),console[_0x55870b(0xbf)]('━'[_0x55870b(0x147)](0x3c)),console[_0x55870b(0xbf)](_0x55870b(0xe9)+_0x1f0f95['length']),console[_0x55870b(0xbf)](_0x55870b(0x12f)+a5_0x259fd0[_0x55870b(0xd2)](_0x5e206b)),console[_0x55870b(0xbf)]('Failed:\x20\x20\x20'+a5_0x259fd0[_0x55870b(0xeb)](_0x1ff65f));_0x471170>0x0&&console[_0x55870b(0xbf)]('Errors:\x20\x20\x20'+a5_0x259fd0[_0x55870b(0xeb)](_0x471170));console[_0x55870b(0xbf)](_0x55870b(0x109)+formatElapsed(_0xa3c062)),console['log']('━'[_0x55870b(0x147)](0x3c));const _0x26a0b0={'summary':{'total':_0x1f0f95['length'],'passed':_0x5e206b,'failed':_0x1ff65f,'errors':_0x471170>0x0?_0x471170:undefined,'duration_ms':_0xa3c062},'tests':_0x1f0f95,'agent':{'project':_0x31e09c['projectName'],'name':_0x31e09c[_0x55870b(0xbc)],'site':_0x4b7f72},'timestamp':new Date(_0x38d4da)['toISOString']()};if(_0x17be4f!=='table'||_0x5cc679){const _0x4e21ba=formatResults(_0x26a0b0,_0x17be4f);if(_0x5cc679)try{a5_0x5a58c7[_0x55870b(0x14d)](_0x5cc679,_0x4e21ba,_0x55870b(0xf8)),console[_0x55870b(0xbf)](),console[_0x55870b(0xbf)](a5_0x259fd0['dim'](_0x55870b(0x142)+_0x5cc679));}catch(_0x381a91){return console[_0x55870b(0xbf)](),console[_0x55870b(0xbf)](a5_0x259fd0[_0x55870b(0xeb)](_0x55870b(0x11c)+_0x381a91)),0x1;}else console[_0x55870b(0xbf)](),console[_0x55870b(0xbf)](_0x4e21ba);}const _0x529427=_0x1f0f95['filter'](_0x25fbad=>_0x25fbad[_0x55870b(0xe1)]!=='PASS');return _0x529427[_0x55870b(0x149)]>0x0?0x1:0x0;}}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Base AI Usage Command
3
+ *
4
+ * Shared implementation for displaying AI Suite credit consumption statistics.
5
+ * Used by both `tdx claude usage` and `tdx opencode usage`.
6
+ */
7
+ import { BaseCommand, type CommandContext } from './command.js';
8
+ /**
9
+ * Base class for AI usage commands
10
+ */
11
+ export declare abstract class AIUsageCommandBase extends BaseCommand {
12
+ readonly name = "usage";
13
+ readonly description = "Show AI Suite credit usage by profile";
14
+ /**
15
+ * Command name for display (e.g., "tdx claude", "tdx opencode")
16
+ */
17
+ protected abstract getCommandName(): string;
18
+ /**
19
+ * Whether to show source breakdown (claude shows sources, opencode doesn't)
20
+ */
21
+ protected abstract shouldShowSources(): boolean;
22
+ execute(context: CommandContext): Promise<number>;
23
+ private outputStructured;
24
+ private outputTable;
25
+ }
26
+ //# sourceMappingURL=ai-usage-command-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-usage-command-base.d.ts","sourceRoot":"","sources":["../../src/commands/ai-usage-command-base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AA8ChE;;GAEG;AACH,8BAAsB,kBAAmB,SAAQ,WAAW;IAC1D,QAAQ,CAAC,IAAI,WAAW;IACxB,QAAQ,CAAC,WAAW,2CAA2C;IAE/D;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,cAAc,IAAI,MAAM;IAE3C;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,iBAAiB,IAAI,OAAO;IAEzC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;YA2BzC,gBAAgB;IAkC9B,OAAO,CAAC,WAAW;CAuGpB"}
@@ -0,0 +1 @@
1
+ const a6_0x411f93=a6_0x4289;(function(_0x384cf1,_0x245412){const _0x3dbb3f=a6_0x4289,_0x5eb084=_0x384cf1();while(!![]){try{const _0x4b3601=-parseInt(_0x3dbb3f(0xc8))/0x1*(-parseInt(_0x3dbb3f(0xc0))/0x2)+-parseInt(_0x3dbb3f(0xc5))/0x3+-parseInt(_0x3dbb3f(0xe9))/0x4+parseInt(_0x3dbb3f(0xe6))/0x5*(parseInt(_0x3dbb3f(0xb7))/0x6)+-parseInt(_0x3dbb3f(0xb8))/0x7+-parseInt(_0x3dbb3f(0xc1))/0x8+parseInt(_0x3dbb3f(0xbc))/0x9;if(_0x4b3601===_0x245412)break;else _0x5eb084['push'](_0x5eb084['shift']());}catch(_0x31a878){_0x5eb084['push'](_0x5eb084['shift']());}}}(a6_0x4005,0x271bd));import a6_0x50bc85 from'chalk';import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';import{getAllProfileStats,getAllSourceStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function formatCredits(_0x5a0405){const _0x67a09c=a6_0x4289;return _0x5a0405[_0x67a09c(0xdd)](0x2);}function formatLastUsed(_0xd1760e){const _0x7ec156=a6_0x4289;if(!_0xd1760e)return _0x7ec156(0xb1);const _0x267da9=new Date(_0xd1760e),_0xce2182=new Date(),_0x5716fb=_0x267da9['toLocaleDateString'](_0x7ec156(0xbe)),_0x4b2209=_0xce2182[_0x7ec156(0xdf)](_0x7ec156(0xbe));if(_0x5716fb===_0x4b2209)return'today\x20'+_0x267da9[_0x7ec156(0xcd)](_0x7ec156(0xbd),{'hour':_0x7ec156(0xdb),'minute':_0x7ec156(0xdb)});const _0x18c3ea=new Date(_0x5716fb),_0x2034bd=new Date(_0x4b2209),_0xb46e26=Math[_0x7ec156(0xad)]((_0x2034bd[_0x7ec156(0xca)]()-_0x18c3ea[_0x7ec156(0xca)]())/(0x18*0x3c*0x3c*0x3e8));if(_0xb46e26===0x1)return _0x7ec156(0xab);else return _0xb46e26>0x1&&_0xb46e26<0x7?_0xb46e26+_0x7ec156(0xae):_0x267da9[_0x7ec156(0xdf)](_0x7ec156(0xbd),{'month':_0x7ec156(0xef),'day':_0x7ec156(0xcc)});}function a6_0x4005(){const _0x4aee8f=['getCommandName','outputStructured','\x20\x20Today:\x20\x20\x20','length','sources','short','\x20\x20Run\x20\x22','monthCredits','description','yesterday','resolve','round','\x20days\x20ago','cyan','\x20\x20Month:\x20\x20\x20','never','padStart','Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile','red','message','Source','14262ecJtds','269969UElojU','credits','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','default','7940493AeHqZJ','en-US','en-CA','Total','51644dtWPrr','1855440ZkCrUQ','todayCredits','dim','map','731940zqUyfl','Profile','max','2uNRGee','Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.','getTime','Unknown\x20error','numeric','toLocaleTimeString','\x20\x20Total:\x20\x20\x20','repeat','bold','profile','source','padEnd','Usage\x20by\x20Source','(default)','shouldShowSources','lastUsedAt','Requests','log','\x20credits','2-digit','Month','toFixed','\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary','toLocaleDateString','entryCount','json','totalCredits','Usage\x20by\x20Profile','name','Last\x20Used','115vBuPvP','usage','format','1255704fOoZfd'];a6_0x4005=function(){return _0x4aee8f;};return a6_0x4005();}function a6_0x4289(_0x5cafe1,_0x4379f5){_0x5cafe1=_0x5cafe1-0xa8;const _0x400541=a6_0x4005();let _0x4289e1=_0x400541[_0x5cafe1];return _0x4289e1;}export class AIUsageCommandBase extends BaseCommand{[a6_0x411f93(0xe4)]=a6_0x411f93(0xe7);[a6_0x411f93(0xaa)]=a6_0x411f93(0xb3);async['execute'](_0x3a5fc6){const _0x5f59ab=a6_0x411f93,{options:_0x5c00d2}=_0x3a5fc6,_0x68ddab=_0x5c00d2[_0x5f59ab(0xe8)]===_0x5f59ab(0xe1)||_0x5c00d2[_0x5f59ab(0xe8)]==='jsonl'||_0x5c00d2['json'];try{const [_0x3d6ac9,_0x20809e,_0x3423f6]=await Promise['all']([getAllProfileStats(),this[_0x5f59ab(0xd6)]()?getAllSourceStats():Promise[_0x5f59ab(0xac)]([]),getUsageSummary()]);return _0x68ddab?await this[_0x5f59ab(0xeb)](_0x3d6ac9,_0x20809e,_0x3423f6,_0x5c00d2):this['outputTable'](_0x3d6ac9,_0x20809e,_0x3423f6),0x0;}catch(_0x10f052){const _0x1d7853=_0x10f052 instanceof Error?_0x10f052[_0x5f59ab(0xb5)]:_0x5f59ab(0xcb);return console['error'](a6_0x50bc85[_0x5f59ab(0xb4)]('Error:\x20'+_0x1d7853)),0x1;}}async[a6_0x411f93(0xeb)](_0x3c3d24,_0x1fe481,_0x3b7821,_0x49627e){const _0x3a2493=a6_0x411f93,_0x410dfe={'summary':{'todayCredits':_0x3b7821[_0x3a2493(0xc2)],'monthCredits':_0x3b7821[_0x3a2493(0xa9)],'totalCredits':_0x3b7821[_0x3a2493(0xe2)],'profileCount':_0x3b7821['profileCount']},'profiles':_0x3c3d24[_0x3a2493(0xc4)](_0x3eee8e=>({'profile':_0x3eee8e[_0x3a2493(0xd1)],'credits':_0x3eee8e[_0x3a2493(0xb9)],'requests':_0x3eee8e['entryCount'],'lastUsedAt':_0x3eee8e[_0x3a2493(0xd7)]}))};this[_0x3a2493(0xd6)]()&&(_0x410dfe[_0x3a2493(0xee)]=_0x1fe481[_0x3a2493(0xc4)](_0x3edc0c=>({'source':_0x3edc0c[_0x3a2493(0xd2)],'credits':_0x3edc0c['credits'],'todayCredits':_0x3edc0c['todayCredits'],'monthCredits':_0x3edc0c['monthCredits'],'requests':_0x3edc0c[_0x3a2493(0xe0)]}))),await handleSDKOutput([_0x410dfe],_0x49627e);}['outputTable'](_0x1ef693,_0x31f853,_0x326153){const _0x1c6c4c=a6_0x411f93;console['log'](a6_0x50bc85['bold'](_0x1c6c4c(0xde))),console['log'](a6_0x50bc85[_0x1c6c4c(0xc3)]('─'['repeat'](0x32))),console[_0x1c6c4c(0xd9)](_0x1c6c4c(0xec)+a6_0x50bc85['cyan'](formatCredits(_0x326153[_0x1c6c4c(0xc2)]))+_0x1c6c4c(0xda)),console[_0x1c6c4c(0xd9)](_0x1c6c4c(0xb0)+a6_0x50bc85['cyan'](formatCredits(_0x326153[_0x1c6c4c(0xa9)]))+_0x1c6c4c(0xda)),console[_0x1c6c4c(0xd9)](_0x1c6c4c(0xce)+a6_0x50bc85[_0x1c6c4c(0xaf)](formatCredits(_0x326153[_0x1c6c4c(0xe2)]))+_0x1c6c4c(0xda)),console[_0x1c6c4c(0xd9)]();if(this[_0x1c6c4c(0xd6)]()&&_0x31f853[_0x1c6c4c(0xed)]>0x0){console['log'](a6_0x50bc85[_0x1c6c4c(0xd0)](_0x1c6c4c(0xd4))),console[_0x1c6c4c(0xd9)](a6_0x50bc85['dim']('─'[_0x1c6c4c(0xcf)](0x3c)));const _0x5227b1=0xc,_0x18fca3=0xa,_0x4af1ea=0xa,_0x1a66ad=0xa;console['log']('\x20\x20'+_0x1c6c4c(0xb6)[_0x1c6c4c(0xd3)](_0x5227b1)+'\x20\x20'+_0x1c6c4c(0xbf)[_0x1c6c4c(0xb2)](_0x18fca3)+'\x20\x20'+'Today'[_0x1c6c4c(0xb2)](_0x4af1ea)+'\x20\x20'+_0x1c6c4c(0xdc)[_0x1c6c4c(0xb2)](_0x1a66ad));for(const _0x205793 of _0x31f853){console['log']('\x20\x20'+_0x205793[_0x1c6c4c(0xd2)][_0x1c6c4c(0xd3)](_0x5227b1)+'\x20\x20'+a6_0x50bc85[_0x1c6c4c(0xaf)](formatCredits(_0x205793[_0x1c6c4c(0xb9)])[_0x1c6c4c(0xb2)](_0x18fca3))+'\x20\x20'+formatCredits(_0x205793[_0x1c6c4c(0xc2)])[_0x1c6c4c(0xb2)](_0x4af1ea)+'\x20\x20'+formatCredits(_0x205793[_0x1c6c4c(0xa9)])[_0x1c6c4c(0xb2)](_0x1a66ad));}console[_0x1c6c4c(0xd9)]();}if(_0x1ef693[_0x1c6c4c(0xed)]===0x0){console[_0x1c6c4c(0xd9)](a6_0x50bc85[_0x1c6c4c(0xc3)](_0x1c6c4c(0xba))),console[_0x1c6c4c(0xd9)](a6_0x50bc85[_0x1c6c4c(0xc3)](_0x1c6c4c(0xa8)+this[_0x1c6c4c(0xea)]()+'\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a'));return;}console[_0x1c6c4c(0xd9)](a6_0x50bc85[_0x1c6c4c(0xd0)](_0x1c6c4c(0xe3))),console['log'](a6_0x50bc85[_0x1c6c4c(0xc3)]('─'[_0x1c6c4c(0xcf)](0x3c)));const _0x53c57c=Math[_0x1c6c4c(0xc7)](0xc,..._0x1ef693[_0x1c6c4c(0xc4)](_0x44ff0a=>_0x44ff0a[_0x1c6c4c(0xd1)]===_0x1c6c4c(0xbb)?'(default)'['length']:_0x44ff0a[_0x1c6c4c(0xd1)][_0x1c6c4c(0xed)])),_0x3da214=0xa,_0x328246=0xa;console[_0x1c6c4c(0xd9)]('\x20\x20'+_0x1c6c4c(0xc6)[_0x1c6c4c(0xd3)](_0x53c57c)+'\x20\x20'+'Credits'[_0x1c6c4c(0xb2)](_0x3da214)+'\x20\x20'+_0x1c6c4c(0xd8)['padStart'](_0x328246)+'\x20\x20'+_0x1c6c4c(0xe5));for(const _0x4eaed7 of _0x1ef693){const _0x54912=_0x4eaed7[_0x1c6c4c(0xd1)]===_0x1c6c4c(0xbb)?_0x1c6c4c(0xd5):_0x4eaed7[_0x1c6c4c(0xd1)],_0x213a21=_0x54912[_0x1c6c4c(0xd3)](_0x53c57c),_0x275199=_0x4eaed7['profile']===_0x1c6c4c(0xbb)?a6_0x50bc85[_0x1c6c4c(0xc3)](_0x213a21):_0x213a21;console[_0x1c6c4c(0xd9)]('\x20\x20'+_0x275199+'\x20\x20'+a6_0x50bc85[_0x1c6c4c(0xaf)](formatCredits(_0x4eaed7[_0x1c6c4c(0xb9)])[_0x1c6c4c(0xb2)](_0x3da214))+'\x20\x20'+String(_0x4eaed7[_0x1c6c4c(0xe0)])[_0x1c6c4c(0xb2)](_0x328246)+'\x20\x20'+a6_0x50bc85[_0x1c6c4c(0xc3)](formatLastUsed(_0x4eaed7[_0x1c6c4c(0xd7)])));}console[_0x1c6c4c(0xd9)](),console[_0x1c6c4c(0xd9)](a6_0x50bc85[_0x1c6c4c(0xc3)](_0x1c6c4c(0xc9))),console[_0x1c6c4c(0xd9)]();}}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-usage-command-base.js","sourceRoot":"","sources":["../../src/commands/ai-usage-command-base.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAuB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAIhB,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,SAAS,aAAa,CAAC,OAAe;IACpC,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,OAAe;IACrC,IAAI,CAAC,OAAO;QAAE,OAAO,OAAO,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAE/C,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACvB,OAAO,SAAS,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAC7F,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAE9F,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,WAAW,CAAC;IACrB,CAAC;SAAM,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QACxC,OAAO,GAAG,QAAQ,WAAW,CAAC;IAChC,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,OAAgB,kBAAmB,SAAQ,WAAW;IACjD,IAAI,GAAG,OAAO,CAAC;IACf,WAAW,GAAG,uCAAuC,CAAC;IAY/D,KAAK,CAAC,OAAO,CAAC,OAAuB;QACnC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAC5B,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,KAAK,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;QAE7F,IAAI,CAAC;YACH,mEAAmE;YACnE,kEAAkE;YAClE,MAAM,CAAC,YAAY,EAAE,WAAW,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBAC7D,kBAAkB,EAAE;gBACpB,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAqB,EAAE,CAAC;gBACxF,eAAe,EAAE;aAClB,CAAC,CAAC;YAEH,IAAI,YAAY,EAAE,CAAC;gBACjB,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3E,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;YACvD,CAAC;YAED,OAAO,CAAC,CAAC;QACX,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;YACzE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,CAAC;YAC9C,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAC5B,QAA6B,EAC7B,OAA2B,EAC3B,OAAqB,EACrB,OAAkC;QAElC,MAAM,IAAI,GAA4B;YACpC,OAAO,EAAE;gBACP,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,YAAY,EAAE,OAAO,CAAC,YAAY;aACnC;YACD,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC7B,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,QAAQ,EAAE,CAAC,CAAC,UAAU;gBACtB,UAAU,EAAE,CAAC,CAAC,UAAU;aACzB,CAAC,CAAC;SACJ,CAAC;QAEF,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACjC,MAAM,EAAE,CAAC,CAAC,MAAM;gBAChB,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,YAAY,EAAE,CAAC,CAAC,YAAY;gBAC5B,YAAY,EAAE,CAAC,CAAC,YAAY;gBAC5B,QAAQ,EAAE,CAAC,CAAC,UAAU;aACvB,CAAC,CAAC,CAAC;QACN,CAAC;QAED,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAEO,WAAW,CACjB,QAA6B,EAC7B,OAA2B,EAC3B,OAAqB;QAErB,kBAAkB;QAClB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC;QACrF,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC;QACrF,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC;QACrF,OAAO,CAAC,GAAG,EAAE,CAAC;QAEd,qCAAqC;QACrC,IAAI,IAAI,CAAC,iBAAiB,EAAE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAC3C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAEvC,MAAM,cAAc,GAAG,EAAE,CAAC;YAC1B,MAAM,eAAe,GAAG,EAAE,CAAC;YAC3B,MAAM,aAAa,GAAG,EAAE,CAAC;YACzB,MAAM,aAAa,GAAG,EAAE,CAAC;YAEzB,SAAS;YACT,OAAO,CAAC,GAAG,CACT,IAAI;gBACF,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC;gBAC/B,IAAI;gBACJ,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;gBACjC,IAAI;gBACJ,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC;gBAC/B,IAAI;gBACJ,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAClC,CAAC;YAEF,cAAc;YACd,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,OAAO,CAAC,GAAG,CACT,IAAI;oBACF,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;oBACpC,IAAI;oBACJ,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;oBACnE,IAAI;oBACJ,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC;oBAC1D,IAAI;oBACJ,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAC7D,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;QAED,oBAAoB;QACpB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC,CAAC;YACxD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,cAAc,EAAE,8BAA8B,CAAC,CAAC,CAAC;YACtF,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAEvC,0BAA0B;QAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAC9B,EAAE,EACF,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAC1F,CAAC;QACF,MAAM,eAAe,GAAG,EAAE,CAAC;QAC3B,MAAM,gBAAgB,GAAG,EAAE,CAAC;QAE5B,SAAS;QACT,OAAO,CAAC,GAAG,CACT,IAAI;YACF,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC;YACjC,IAAI;YACJ,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC;YACnC,IAAI;YACJ,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YACrC,IAAI;YACJ,WAAW,CACd,CAAC;QAEF,eAAe;QACf,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;YAClF,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YACvD,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;YAEvF,OAAO,CAAC,GAAG,CACT,IAAI;gBACF,WAAW;gBACX,IAAI;gBACJ,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;gBACpE,IAAI;gBACJ,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gBACrD,IAAI;gBACJ,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAChD,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC,CAAC;QAClF,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;CACF"}
@@ -1 +1 @@
1
- const a6_0x2acfd5=a6_0x579e;(function(_0x45c223,_0x2d3d5b){const _0x44b341=a6_0x579e,_0x24ed64=_0x45c223();while(!![]){try{const _0x250728=parseInt(_0x44b341(0x9c))/0x1+parseInt(_0x44b341(0x94))/0x2+parseInt(_0x44b341(0xca))/0x3+parseInt(_0x44b341(0x8d))/0x4+parseInt(_0x44b341(0xbf))/0x5*(parseInt(_0x44b341(0xb4))/0x6)+parseInt(_0x44b341(0xc7))/0x7+-parseInt(_0x44b341(0xaf))/0x8;if(_0x250728===_0x2d3d5b)break;else _0x24ed64['push'](_0x24ed64['shift']());}catch(_0x8f3ab0){_0x24ed64['push'](_0x24ed64['shift']());}}}(a6_0x1e60,0xcb5e6));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';function a6_0x579e(_0x4ff10b,_0x2b3620){_0x4ff10b=_0x4ff10b-0x8b;const _0x1e600d=a6_0x1e60();let _0x579eb5=_0x1e600d[_0x4ff10b];return _0x579eb5;}import{writeFileSync}from'fs';import{getEndpoint}from'../sdk/types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set([a6_0x2acfd5(0xb6),a6_0x2acfd5(0xad),a6_0x2acfd5(0xbb),'set-cookie',a6_0x2acfd5(0x92),a6_0x2acfd5(0xb2),a6_0x2acfd5(0x90),a6_0x2acfd5(0xc5)]);function isSensitiveHeader(_0x2244fc){const _0x3fa3fc=a6_0x2acfd5;return SENSITIVE_HEADERS[_0x3fa3fc(0x9e)](_0x2244fc[_0x3fa3fc(0x97)]());}function a6_0x1e60(){const _0x6eb0a=['DELETE','Invalid\x20header\x20format:\x20\x22','keys','isArray','output','api','verbose','body','header','PUT','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','proxy-authorization','Error:\x20','34424144PNbVRi','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','includes','x-xsrf-token','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','28188bJCqAO','headers','authorization','cdp','Endpoint\x20must\x20start\x20with\x20/:\x20','indexOf','name','cookie','trim','.\x20Valid\x20methods:\x20','readBodyFromFile','1005kYPwXc','method','substring','Invalid\x20HTTP\x20method:\x20','stack','execute','x-trino-user','POST','6944112rUBGpA','file','error','1898964thHbtY','<\x20HTTP/1.1\x20','color','entries','4188620iclome','startsWith','cas','x-auth-token','GET','set-cookie2','us01','292262dowfNN','join','length','toLowerCase','message','PATCH','llm','toUpperCase','1373428ACtxym','type','has','\x0aStack\x20trace:\x0a','data','site'];a6_0x1e60=function(){return _0x6eb0a;};return a6_0x1e60();}function parseHeader(_0x5b8a23){const _0x3233e4=a6_0x2acfd5,_0x5ad459=_0x5b8a23[_0x3233e4(0xb9)](':');if(_0x5ad459===-0x1)throw new Error(_0x3233e4(0xa3)+_0x5b8a23+'\x22.\x20'+_0x3233e4(0xac));const _0x29ef8e=_0x5b8a23[_0x3233e4(0xc1)](0x0,_0x5ad459)[_0x3233e4(0xbc)](),_0x17f20b=_0x5b8a23[_0x3233e4(0xc1)](_0x5ad459+0x1)[_0x3233e4(0xbc)]();if(!_0x29ef8e)throw new Error(_0x3233e4(0xb0)+_0x5b8a23+'\x22');return[_0x29ef8e,_0x17f20b];}export class ApiCommand extends BaseCommand{[a6_0x2acfd5(0xba)]='api';['description']='Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs';['validate'](_0x45c0d0){const _0x4302cf=a6_0x2acfd5,{args:_0x59600b,options:_0x372d14}=_0x45c0d0,_0x501b1e=_0x372d14;if(_0x59600b[_0x4302cf(0x96)]===0x0)return _0x4302cf(0xb3);const _0x37e536=_0x59600b[0x0];if(!_0x37e536[_0x4302cf(0x8e)]('/'))return _0x4302cf(0xb8)+_0x37e536;const _0x5d05af=_0x501b1e[_0x4302cf(0xa0)],_0x56eff2=_0x501b1e[_0x4302cf(0xc8)];if(_0x5d05af&&_0x56eff2)return'Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.';const _0x341fa8=_0x501b1e[_0x4302cf(0xc0)]||_0x4302cf(0x91),_0x477e76=[_0x4302cf(0x91),_0x4302cf(0xc6),_0x4302cf(0xab),_0x4302cf(0xa2),_0x4302cf(0x99)];if(!_0x477e76[_0x4302cf(0xb1)](_0x341fa8['toUpperCase']()))return _0x4302cf(0xc2)+_0x341fa8+_0x4302cf(0xbd)+_0x477e76['join'](',\x20');const _0x150852=_0x501b1e['type']||'td',_0xb36c21=['td',_0x4302cf(0xb7),'workflow','trino',_0x4302cf(0x9a),'llm-proxy',_0x4302cf(0x8f)];if(!_0xb36c21[_0x4302cf(0xb1)](_0x150852))return'Invalid\x20API\x20type:\x20'+_0x150852+'.\x20Valid\x20types:\x20'+_0xb36c21[_0x4302cf(0x95)](',\x20');return undefined;}async[a6_0x2acfd5(0xc4)](_0x414320){const _0x472799=a6_0x2acfd5,{options:_0xde5d45,args:_0x41dc1b,tdx:_0x117c7d}=_0x414320,_0x52663b=_0xde5d45,_0x3725f1=_0x41dc1b[0x0],_0x2c005f=(_0x52663b[_0x472799(0xc0)]||_0x472799(0x91))[_0x472799(0x9b)](),_0x141f38=_0x52663b[_0x472799(0xa0)],_0x257595=_0x52663b[_0x472799(0xc8)],_0x1ddb41=_0x52663b[_0x472799(0xaa)],_0x43f019=_0x52663b[_0x472799(0x9d)]||'td';try{const _0xea33e8={};if(_0x1ddb41){const _0x4a244f=Array[_0x472799(0xa5)](_0x1ddb41)?_0x1ddb41:[_0x1ddb41];for(const _0x267132 of _0x4a244f){const [_0x4a812c,_0x1512e4]=parseHeader(_0x267132);_0xea33e8[_0x4a812c]=_0x1512e4;}}let _0x2c317e;if(_0x141f38)_0x2c317e=_0x141f38;else{if(_0x257595)try{_0x2c317e=RawAPI[_0x472799(0xbe)](_0x257595);}catch(_0x3fb1b8){return console[_0x472799(0xc9)](_0x472799(0xae)+(_0x3fb1b8 instanceof Error?_0x3fb1b8[_0x472799(0x98)]:String(_0x3fb1b8))),0x1;}}const _0x27f192={'method':_0x2c005f,'apiType':_0x43f019,'includeHeaders':_0xde5d45[_0x472799(0xa8)]};_0x2c317e&&(_0x27f192[_0x472799(0xa9)]=_0x2c317e);Object[_0x472799(0xa4)](_0xea33e8)['length']>0x0&&(_0x27f192['headers']=_0xea33e8);if(_0xde5d45['verbose']){const _0x52fffb=resolveSite(_0xde5d45[_0x472799(0xa1)]??_0x472799(0x93)),_0x510c70=getEndpoint(_0x52fffb,_0x43f019),_0x146681=''+_0x510c70+_0x3725f1;console['error']('>\x20'+_0x2c005f+'\x20'+_0x146681);const _0x56058b=getAuthHeaders(_0x52fffb),_0x3d4247={..._0x56058b,..._0xea33e8};for(const [_0x106122,_0x1a82f2]of Object[_0x472799(0x8c)](_0x3d4247)){!isSensitiveHeader(_0x106122)&&console[_0x472799(0xc9)]('>\x20'+_0x106122+':\x20'+_0x1a82f2);}_0x2c317e&&console[_0x472799(0xc9)]('>'),console[_0x472799(0xc9)]('');}const _0x379fe5=await _0x117c7d[_0x472799(0xa7)]['request'](_0x3725f1,_0x27f192);if(_0xde5d45[_0x472799(0xa8)]&&_0x379fe5[_0x472799(0xb5)]){console['error'](_0x472799(0xcb)+_0x379fe5['status']);for(const [_0x50dfa9,_0x416a92]of Object[_0x472799(0x8c)](_0x379fe5['headers'])){!isSensitiveHeader(_0x50dfa9)&&console['error']('<\x20'+_0x50dfa9+':\x20'+_0x416a92);}console['error']('');}const _0x4ad697=Boolean(_0xde5d45['output']),_0x3ce504={'color':_0xde5d45[_0x472799(0x8b)],'noColor':_0xde5d45['noColor']||_0x4ad697&&!_0xde5d45[_0x472799(0x8b)]},_0x42962b=colorizeJSON(_0x379fe5['data'],_0x3ce504);return _0xde5d45['output']?(writeFileSync(_0xde5d45[_0x472799(0xa6)],_0x42962b),console[_0x472799(0xc9)]('Results\x20saved\x20to\x20'+_0xde5d45['output'])):console['log'](_0x42962b),0x0;}catch(_0x53827b){return _0x53827b instanceof Error?(console[_0x472799(0xc9)](_0x472799(0xae)+_0x53827b[_0x472799(0x98)]),_0xde5d45[_0x472799(0xa8)]&&_0x53827b[_0x472799(0xc3)]&&console[_0x472799(0xc9)](_0x472799(0x9f)+_0x53827b['stack'])):console['error']('Error:\x20'+String(_0x53827b)),0x1;}}}
1
+ const a7_0x222e83=a7_0x2de8;(function(_0x346c3b,_0x499c2d){const _0x27ac4a=a7_0x2de8,_0x21c103=_0x346c3b();while(!![]){try{const _0xcce6cb=-parseInt(_0x27ac4a(0x1e4))/0x1*(parseInt(_0x27ac4a(0x1d8))/0x2)+-parseInt(_0x27ac4a(0x1d7))/0x3*(parseInt(_0x27ac4a(0x1cd))/0x4)+parseInt(_0x27ac4a(0x1dd))/0x5+-parseInt(_0x27ac4a(0x209))/0x6+-parseInt(_0x27ac4a(0x1ec))/0x7*(parseInt(_0x27ac4a(0x1d6))/0x8)+-parseInt(_0x27ac4a(0x1f9))/0x9+parseInt(_0x27ac4a(0x1f1))/0xa;if(_0xcce6cb===_0x499c2d)break;else _0x21c103['push'](_0x21c103['shift']());}catch(_0x5d9e84){_0x21c103['push'](_0x21c103['shift']());}}}(a7_0x4bd0,0x3b110));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';function a7_0x2de8(_0x23d0b4,_0x45af38){_0x23d0b4=_0x23d0b4-0x1c5;const _0x4bd0eb=a7_0x4bd0();let _0x2de870=_0x4bd0eb[_0x23d0b4];return _0x2de870;}import{getEndpoint}from'../sdk/types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set([a7_0x222e83(0x207),'proxy-authorization',a7_0x222e83(0x204),a7_0x222e83(0x202),a7_0x222e83(0x208),a7_0x222e83(0x1cb),'x-auth-token',a7_0x222e83(0x1f0)]);function isSensitiveHeader(_0x1dcc1d){const _0x1405ae=a7_0x222e83;return SENSITIVE_HEADERS['has'](_0x1dcc1d[_0x1405ae(0x1db)]());}function parseHeader(_0x2a5c89){const _0x1472b0=a7_0x222e83,_0xca53ca=_0x2a5c89['indexOf'](':');if(_0xca53ca===-0x1)throw new Error(_0x1472b0(0x1ed)+_0x2a5c89+_0x1472b0(0x200)+_0x1472b0(0x20a));const _0x40f72b=_0x2a5c89[_0x1472b0(0x201)](0x0,_0xca53ca)[_0x1472b0(0x1f5)](),_0x5ad017=_0x2a5c89[_0x1472b0(0x201)](_0xca53ca+0x1)[_0x1472b0(0x1f5)]();if(!_0x40f72b)throw new Error(_0x1472b0(0x1e8)+_0x2a5c89+'\x22');return[_0x40f72b,_0x5ad017];}export class ApiCommand extends BaseCommand{[a7_0x222e83(0x1d3)]=a7_0x222e83(0x1c6);['description']=a7_0x222e83(0x1e6);[a7_0x222e83(0x1dc)](_0x130409){const _0x328f77=a7_0x222e83,{args:_0xef7a2c,options:_0x48b667}=_0x130409,_0x2518d2=_0x48b667;if(_0xef7a2c[_0x328f77(0x1ef)]===0x0)return'Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list';const _0x34a275=_0xef7a2c[0x0];if(!_0x34a275['startsWith']('/'))return _0x328f77(0x1d0)+_0x34a275;const _0x5488fb=_0x2518d2[_0x328f77(0x1ce)],_0x1722e0=_0x2518d2[_0x328f77(0x205)];if(_0x5488fb&&_0x1722e0)return _0x328f77(0x1da);const _0x133838=_0x2518d2[_0x328f77(0x1e3)]||_0x328f77(0x203),_0x13b7d8=[_0x328f77(0x203),_0x328f77(0x1c9),'PUT',_0x328f77(0x1d9),_0x328f77(0x1e0)];if(!_0x13b7d8['includes'](_0x133838['toUpperCase']()))return _0x328f77(0x1fa)+_0x133838+_0x328f77(0x1ff)+_0x13b7d8[_0x328f77(0x1fd)](',\x20');const _0x2d3949=_0x2518d2[_0x328f77(0x1d1)]||'td',_0x4c7836=['td',_0x328f77(0x1f6),_0x328f77(0x1f4),_0x328f77(0x1fe),_0x328f77(0x1e1),_0x328f77(0x1d2),_0x328f77(0x1f8)];if(!_0x4c7836['includes'](_0x2d3949))return _0x328f77(0x1f7)+_0x2d3949+_0x328f77(0x1eb)+_0x4c7836['join'](',\x20');return undefined;}async['execute'](_0x4aa965){const _0x1dbee9=a7_0x222e83,{options:_0x3547ed,args:_0x2e8c8b,tdx:_0x18e68b}=_0x4aa965,_0x75ecdf=_0x3547ed,_0x4beeba=_0x2e8c8b[0x0],_0x3707d6=(_0x75ecdf[_0x1dbee9(0x1e3)]||_0x1dbee9(0x203))[_0x1dbee9(0x1fb)](),_0x142205=_0x75ecdf['data'],_0x19857f=_0x75ecdf[_0x1dbee9(0x205)],_0x1404b0=_0x75ecdf['header'],_0x44776c=_0x75ecdf[_0x1dbee9(0x1d1)]||'td';try{const _0x167fbd={};if(_0x1404b0){const _0x12c092=Array[_0x1dbee9(0x1ea)](_0x1404b0)?_0x1404b0:[_0x1404b0];for(const _0x339601 of _0x12c092){const [_0x277839,_0x8be999]=parseHeader(_0x339601);_0x167fbd[_0x277839]=_0x8be999;}}let _0x38d073;if(_0x142205)_0x38d073=_0x142205;else{if(_0x19857f)try{_0x38d073=RawAPI[_0x1dbee9(0x1e7)](_0x19857f);}catch(_0x77d6f3){return console[_0x1dbee9(0x1c8)]('Error:\x20'+(_0x77d6f3 instanceof Error?_0x77d6f3[_0x1dbee9(0x1ca)]:String(_0x77d6f3))),0x1;}}const _0x24d38e={'method':_0x3707d6,'apiType':_0x44776c,'includeHeaders':_0x3547ed[_0x1dbee9(0x1e5)]};_0x38d073&&(_0x24d38e[_0x1dbee9(0x1e2)]=_0x38d073);Object[_0x1dbee9(0x1d4)](_0x167fbd)[_0x1dbee9(0x1ef)]>0x0&&(_0x24d38e[_0x1dbee9(0x1f3)]=_0x167fbd);if(_0x3547ed[_0x1dbee9(0x1e5)]){const _0x19933e=resolveSite(_0x3547ed['site']??_0x1dbee9(0x1cc)),_0x876465=getEndpoint(_0x19933e,_0x44776c),_0x465dde=''+_0x876465+_0x4beeba;console[_0x1dbee9(0x1c8)]('>\x20'+_0x3707d6+'\x20'+_0x465dde);const _0x260a17=getAuthHeaders(_0x19933e),_0x1d3f2c={..._0x260a17,..._0x167fbd};for(const [_0x5a6d1f,_0x452802]of Object[_0x1dbee9(0x20b)](_0x1d3f2c)){!isSensitiveHeader(_0x5a6d1f)&&console[_0x1dbee9(0x1c8)]('>\x20'+_0x5a6d1f+':\x20'+_0x452802);}_0x38d073&&console['error']('>'),console[_0x1dbee9(0x1c8)]('');}const _0x190ea8=await _0x18e68b[_0x1dbee9(0x1c6)][_0x1dbee9(0x1e9)](_0x4beeba,_0x24d38e);if(_0x3547ed[_0x1dbee9(0x1e5)]&&_0x190ea8[_0x1dbee9(0x1f3)]){console[_0x1dbee9(0x1c8)](_0x1dbee9(0x1f2)+_0x190ea8[_0x1dbee9(0x1fc)]);for(const [_0x2158a8,_0x5f2ff2]of Object[_0x1dbee9(0x20b)](_0x190ea8[_0x1dbee9(0x1f3)])){!isSensitiveHeader(_0x2158a8)&&console[_0x1dbee9(0x1c8)]('<\x20'+_0x2158a8+':\x20'+_0x5f2ff2);}console[_0x1dbee9(0x1c8)]('');}const _0x17680a=Boolean(_0x3547ed[_0x1dbee9(0x1df)]),_0x57626a={'color':_0x3547ed['color'],'noColor':_0x3547ed[_0x1dbee9(0x1c5)]||_0x17680a&&!_0x3547ed[_0x1dbee9(0x1ee)]},_0x25b6c2=colorizeJSON(_0x190ea8['data'],_0x57626a);return _0x3547ed[_0x1dbee9(0x1df)]?(writeFileSync(_0x3547ed[_0x1dbee9(0x1df)],_0x25b6c2),console['error'](_0x1dbee9(0x1d5)+_0x3547ed[_0x1dbee9(0x1df)])):console[_0x1dbee9(0x1cf)](_0x25b6c2),0x0;}catch(_0x2e22de){return _0x2e22de instanceof Error?(console[_0x1dbee9(0x1c8)](_0x1dbee9(0x1c7)+_0x2e22de[_0x1dbee9(0x1ca)]),_0x3547ed['verbose']&&_0x2e22de[_0x1dbee9(0x206)]&&console[_0x1dbee9(0x1c8)](_0x1dbee9(0x1de)+_0x2e22de[_0x1dbee9(0x206)])):console[_0x1dbee9(0x1c8)](_0x1dbee9(0x1c7)+String(_0x2e22de)),0x1;}}}function a7_0x4bd0(){const _0x45e826=['2362855nZMufO','\x0aStack\x20trace:\x0a','output','PATCH','llm','body','method','60757MYOHbc','verbose','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','readBodyFromFile','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','request','isArray','.\x20Valid\x20types:\x20','29687swVhqJ','Invalid\x20header\x20format:\x20\x22','color','length','x-trino-user','12425370rSjQNW','<\x20HTTP/1.1\x20','headers','workflow','trim','cdp','Invalid\x20API\x20type:\x20','cas','860688lZPZoQ','Invalid\x20HTTP\x20method:\x20','toUpperCase','status','join','trino','.\x20Valid\x20methods:\x20','\x22.\x20','substring','set-cookie','GET','cookie','file','stack','authorization','set-cookie2','2799828bGCZlX','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','entries','noColor','api','Error:\x20','error','POST','message','x-xsrf-token','us01','941536xkTRcW','data','log','Endpoint\x20must\x20start\x20with\x20/:\x20','type','llm-proxy','name','keys','Results\x20saved\x20to\x20','472wSaKXk','3hQmCZr','14indtJa','DELETE','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','toLowerCase','validate'];a7_0x4bd0=function(){return _0x45e826;};return a7_0x4bd0();}