@treasuredata/tdx 2026.9.2 → 2026.10.0

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 (319) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/ai-usage-command-base.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.d.ts.map +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/auth-command.js.map +1 -1
  15. package/dist/commands/cas-command.js +1 -1
  16. package/dist/commands/cas-journey-command.d.ts +34 -0
  17. package/dist/commands/cas-journey-command.d.ts.map +1 -0
  18. package/dist/commands/cas-journey-command.js +1 -0
  19. package/dist/commands/cas-journey-command.js.map +1 -0
  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 +11 -0
  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.js +1 -1
  28. package/dist/commands/codex-command.d.ts.map +1 -1
  29. package/dist/commands/codex-command.js +1 -1
  30. package/dist/commands/codex-command.js.map +1 -1
  31. package/dist/commands/command.js +1 -1
  32. package/dist/commands/connection-command.js +1 -1
  33. package/dist/commands/databases.js +1 -1
  34. package/dist/commands/delivery-command.js +1 -1
  35. package/dist/commands/describe.js +1 -1
  36. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  37. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  38. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  39. package/dist/commands/engage-campaign-pull-command.js +1 -1
  40. package/dist/commands/engage-campaign-push-command.js +1 -1
  41. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  42. package/dist/commands/engage-campaign-validate-command.js +1 -1
  43. package/dist/commands/engage-command.js +1 -1
  44. package/dist/commands/engage-in-browser-message-command.js +1 -1
  45. package/dist/commands/engage-landing-page-command.js +1 -1
  46. package/dist/commands/engage-template-pull-command.js +1 -1
  47. package/dist/commands/engage-template-push-command.js +1 -1
  48. package/dist/commands/engage-template-validate-command.js +1 -1
  49. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  50. package/dist/commands/job-command.js +1 -1
  51. package/dist/commands/journey-command.d.ts +46 -0
  52. package/dist/commands/journey-command.d.ts.map +1 -1
  53. package/dist/commands/journey-command.js +1 -1
  54. package/dist/commands/journey-command.js.map +1 -1
  55. package/dist/commands/journey-validate-command.js +1 -1
  56. package/dist/commands/llm-command.js +1 -1
  57. package/dist/commands/mcp-command.js +1 -1
  58. package/dist/commands/opencode-command.d.ts +25 -0
  59. package/dist/commands/opencode-command.d.ts.map +1 -1
  60. package/dist/commands/opencode-command.js +1 -1
  61. package/dist/commands/opencode-command.js.map +1 -1
  62. package/dist/commands/opencode-usage-command.js +1 -1
  63. package/dist/commands/p13n-command.js +1 -1
  64. package/dist/commands/parent-segment-command.js +1 -1
  65. package/dist/commands/policy-command.js +1 -1
  66. package/dist/commands/profile-command.js +1 -1
  67. package/dist/commands/profiles-command.js +1 -1
  68. package/dist/commands/query-command.js +1 -1
  69. package/dist/commands/schedule-command.js +1 -1
  70. package/dist/commands/segment-command.js +1 -1
  71. package/dist/commands/segment-create-command.js +1 -1
  72. package/dist/commands/segment-fields-command.js +1 -1
  73. package/dist/commands/segment-move-command.js +1 -1
  74. package/dist/commands/segment-pull-command.js +1 -1
  75. package/dist/commands/segment-push-command.js +1 -1
  76. package/dist/commands/segment-update-command.js +1 -1
  77. package/dist/commands/segment-use-command.js +1 -1
  78. package/dist/commands/segment-validate-command.js +1 -1
  79. package/dist/commands/segments.js +1 -1
  80. package/dist/commands/show.js +1 -1
  81. package/dist/commands/status-command.js +1 -1
  82. package/dist/commands/table-deleted.js +1 -1
  83. package/dist/commands/tables.js +1 -1
  84. package/dist/commands/unset-command.js +1 -1
  85. package/dist/commands/upgrade-command.js +1 -1
  86. package/dist/commands/use-command.js +1 -1
  87. package/dist/commands/user-command.js +1 -1
  88. package/dist/commands/work-command.js +1 -1
  89. package/dist/commands/workflow-command.js +1 -1
  90. package/dist/core/auth.d.ts +10 -1
  91. package/dist/core/auth.d.ts.map +1 -1
  92. package/dist/core/auth.js +1 -1
  93. package/dist/core/auth.js.map +1 -1
  94. package/dist/core/command-output.js +1 -1
  95. package/dist/core/config.js +1 -1
  96. package/dist/core/connection-cache.js +1 -1
  97. package/dist/core/constants.js +1 -1
  98. package/dist/core/credential-cache.js +1 -1
  99. package/dist/core/global-context.js +1 -1
  100. package/dist/core/keychain.js +1 -1
  101. package/dist/core/oauth-keychain.js +1 -1
  102. package/dist/core/oauth.js +1 -1
  103. package/dist/core/profile.js +1 -1
  104. package/dist/core/project-config.js +1 -1
  105. package/dist/core/session.js +1 -1
  106. package/dist/core/site-mismatch.js +1 -1
  107. package/dist/core/user-cache.js +1 -1
  108. package/dist/core/version.js +1 -1
  109. package/dist/index.js +1 -1
  110. package/dist/mcp/server.js +1 -1
  111. package/dist/mcp/tools/index.js +1 -1
  112. package/dist/mcp/tools/tdx-run.js +1 -1
  113. package/dist/mcp/tools/tdx-search.js +1 -1
  114. package/dist/mcp/tools/work-create-item.js +1 -1
  115. package/dist/mcp/utils.js +1 -1
  116. package/dist/proxy/claude-usage-tracker.d.ts +1 -0
  117. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  118. package/dist/proxy/claude-usage-tracker.js +1 -1
  119. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  120. package/dist/proxy/passthrough-server.d.ts +2 -0
  121. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  122. package/dist/proxy/passthrough-server.js +1 -1
  123. package/dist/proxy/passthrough-server.js.map +1 -1
  124. package/dist/proxy/sse-usage-parser.d.ts +2 -0
  125. package/dist/proxy/sse-usage-parser.d.ts.map +1 -1
  126. package/dist/proxy/sse-usage-parser.js +1 -1
  127. package/dist/proxy/sse-usage-parser.js.map +1 -1
  128. package/dist/sdk/agent/agent-config.js +1 -1
  129. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  130. package/dist/sdk/agent/agent-yaml.js +1 -1
  131. package/dist/sdk/agent/test/evaluator.js +1 -1
  132. package/dist/sdk/agent/test/executor.js +1 -1
  133. package/dist/sdk/agent/test/index.js +1 -1
  134. package/dist/sdk/agent/test/output.js +1 -1
  135. package/dist/sdk/agent/test/parser.js +1 -1
  136. package/dist/sdk/agent/tool-target-registry.js +1 -1
  137. package/dist/sdk/api.js +1 -1
  138. package/dist/sdk/auth-token.js +1 -1
  139. package/dist/sdk/cas/audience-context.d.ts +33 -0
  140. package/dist/sdk/cas/audience-context.d.ts.map +1 -0
  141. package/dist/sdk/cas/audience-context.js +1 -0
  142. package/dist/sdk/cas/audience-context.js.map +1 -0
  143. package/dist/sdk/cas/cas-api-client.js +1 -1
  144. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  145. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  146. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  147. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  148. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  149. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  150. package/dist/sdk/cas/index.d.ts +8 -0
  151. package/dist/sdk/cas/index.d.ts.map +1 -1
  152. package/dist/sdk/cas/index.js +1 -1
  153. package/dist/sdk/cas/index.js.map +1 -1
  154. package/dist/sdk/cas/pull-workflow.js +1 -1
  155. package/dist/sdk/cas/push-workflow.js +1 -1
  156. package/dist/sdk/cas/validate-files.js +1 -1
  157. package/dist/sdk/client/cdp-api-client.js +1 -1
  158. package/dist/sdk/client/delivery-api-client.js +1 -1
  159. package/dist/sdk/client/endpoints.js +1 -1
  160. package/dist/sdk/client/engage-api-client.js +1 -1
  161. package/dist/sdk/client/http-client.js +1 -1
  162. package/dist/sdk/client/llm-api-client.js +1 -1
  163. package/dist/sdk/client/oauth-refresh.js +1 -1
  164. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  165. package/dist/sdk/client/rate-limiter.js +1 -1
  166. package/dist/sdk/client/td-api-client.js +1 -1
  167. package/dist/sdk/client/trino-api-client.js +1 -1
  168. package/dist/sdk/client/workflow-client.js +1 -1
  169. package/dist/sdk/connection-validator.js +1 -1
  170. package/dist/sdk/connection.js +1 -1
  171. package/dist/sdk/delivery.js +1 -1
  172. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  173. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  174. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  175. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  176. package/dist/sdk/engage/campaign-pull.js +1 -1
  177. package/dist/sdk/engage/campaign-push.js +1 -1
  178. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  179. package/dist/sdk/engage/campaign-readiness.js +1 -1
  180. package/dist/sdk/engage/campaign-validator.js +1 -1
  181. package/dist/sdk/engage/campaign-yaml.js +1 -1
  182. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  183. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  184. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  185. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  186. package/dist/sdk/engage/landing-page-init.js +1 -1
  187. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  188. package/dist/sdk/engage/landing-page-pull.js +1 -1
  189. package/dist/sdk/engage/landing-page-push.js +1 -1
  190. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  191. package/dist/sdk/engage/landing-page-validator.js +1 -1
  192. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  193. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  194. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  195. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  196. package/dist/sdk/engage/template-pull.js +1 -1
  197. package/dist/sdk/engage/template-push.js +1 -1
  198. package/dist/sdk/engage/template-validator.js +1 -1
  199. package/dist/sdk/engage/template-yaml.js +1 -1
  200. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  201. package/dist/sdk/engage/types/campaign-def.js +1 -1
  202. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  203. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  204. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  205. package/dist/sdk/engage/types/template-schema.js +1 -1
  206. package/dist/sdk/engage/workspace-assignments.js +1 -1
  207. package/dist/sdk/engage.js +1 -1
  208. package/dist/sdk/errors.js +1 -1
  209. package/dist/sdk/index.js +1 -1
  210. package/dist/sdk/io/index.js +1 -1
  211. package/dist/sdk/io/node-filesystem.js +1 -1
  212. package/dist/sdk/job.js +1 -1
  213. package/dist/sdk/journey.d.ts +4 -1
  214. package/dist/sdk/journey.d.ts.map +1 -1
  215. package/dist/sdk/journey.js +1 -1
  216. package/dist/sdk/journey.js.map +1 -1
  217. package/dist/sdk/llm/chat-cache.js +1 -1
  218. package/dist/sdk/llm/index.js +1 -1
  219. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  220. package/dist/sdk/llm/model-factors.d.ts +5 -3
  221. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  222. package/dist/sdk/llm/model-factors.js +1 -1
  223. package/dist/sdk/llm/model-factors.js.map +1 -1
  224. package/dist/sdk/llm/user-settings.js +1 -1
  225. package/dist/sdk/p13n-studio-errors.js +1 -1
  226. package/dist/sdk/p13n-studio.js +1 -1
  227. package/dist/sdk/personalization.js +1 -1
  228. package/dist/sdk/policy.js +1 -1
  229. package/dist/sdk/query/deleted-table-validation.js +1 -1
  230. package/dist/sdk/query/index.js +1 -1
  231. package/dist/sdk/query/sql-parser.js +1 -1
  232. package/dist/sdk/realtime.js +1 -1
  233. package/dist/sdk/schedule.js +1 -1
  234. package/dist/sdk/segment/audience-context.js +1 -1
  235. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  236. package/dist/sdk/segment/fields-display.js +1 -1
  237. package/dist/sdk/segment/file-discovery.js +1 -1
  238. package/dist/sdk/segment/journey-utils.js +1 -1
  239. package/dist/sdk/segment/journey-validator.js +1 -1
  240. package/dist/sdk/segment/journey-yaml.js +1 -1
  241. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  242. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  243. package/dist/sdk/segment/pull-workflow.js +1 -1
  244. package/dist/sdk/segment/push-recovery.js +1 -1
  245. package/dist/sdk/segment/push-workflow.js +1 -1
  246. package/dist/sdk/segment/resolution-context.js +1 -1
  247. package/dist/sdk/segment/segment-path-parser.js +1 -1
  248. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  249. package/dist/sdk/segment/segment-validator.js +1 -1
  250. package/dist/sdk/segment/target-resolution.js +1 -1
  251. package/dist/sdk/segment/tdx-config.js +1 -1
  252. package/dist/sdk/segment/types/activation-schema.js +1 -1
  253. package/dist/sdk/segment/types/journey-def.js +1 -1
  254. package/dist/sdk/segment/types/journey-schema.js +1 -1
  255. package/dist/sdk/segment/types/segment-def.js +1 -1
  256. package/dist/sdk/segment/types/segment-schema.js +1 -1
  257. package/dist/sdk/segment/validate-files.js +1 -1
  258. package/dist/sdk/segment/yaml-validator.js +1 -1
  259. package/dist/sdk/segment.js +1 -1
  260. package/dist/sdk/types/index.js +1 -1
  261. package/dist/sdk/types/progress.js +1 -1
  262. package/dist/sdk/types/workspace.js +1 -1
  263. package/dist/sdk/user.js +1 -1
  264. package/dist/sdk/util/format-detector.js +1 -1
  265. package/dist/sdk/util/formatters.js +1 -1
  266. package/dist/sdk/util/index.js +1 -1
  267. package/dist/sdk/util/paginate.js +1 -1
  268. package/dist/sdk/util/tree-formatter.js +1 -1
  269. package/dist/sdk/util/tree-search.js +1 -1
  270. package/dist/sdk/workflow/archive-validation.js +1 -1
  271. package/dist/sdk/workflow/clone-workflow.js +1 -1
  272. package/dist/sdk/workflow/index.js +1 -1
  273. package/dist/sdk/workflow/pull-workflow.js +1 -1
  274. package/dist/sdk/workflow/push-workflow.js +1 -1
  275. package/dist/sdk/workflow/task-graph.js +1 -1
  276. package/dist/sdk/workflow/tdx-config.js +1 -1
  277. package/dist/sdk/workflow/workflow-utils.js +1 -1
  278. package/dist/sdk/workspace/access-tracker.js +1 -1
  279. package/dist/sdk/workspace/frontmatter.js +1 -1
  280. package/dist/sdk/workspace/git.js +1 -1
  281. package/dist/sdk/workspace/index.js +1 -1
  282. package/dist/sdk/workspace/templates.js +1 -1
  283. package/dist/sdk/workspace/weekly.js +1 -1
  284. package/dist/sdk/workspace/wikilinks.js +1 -1
  285. package/dist/test-utils/command-runner.js +1 -1
  286. package/dist/test-utils/factories.js +1 -1
  287. package/dist/test-utils/fixtures.js +1 -1
  288. package/dist/test-utils/http-mock.js +1 -1
  289. package/dist/test-utils/index.js +1 -1
  290. package/dist/utils/async.js +1 -1
  291. package/dist/utils/claude-code-state.js +1 -1
  292. package/dist/utils/colors.js +1 -1
  293. package/dist/utils/diff.js +1 -1
  294. package/dist/utils/file-permissions.js +1 -1
  295. package/dist/utils/file-reader.js +1 -1
  296. package/dist/utils/github-releases.js +1 -1
  297. package/dist/utils/global-cache.js +1 -1
  298. package/dist/utils/json-loader.js +1 -1
  299. package/dist/utils/local-cache.js +1 -1
  300. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  301. package/dist/utils/logger/formatters/index.js +1 -1
  302. package/dist/utils/logger/handlers/console-handler.js +1 -1
  303. package/dist/utils/logger/handlers/file-handler.js +1 -1
  304. package/dist/utils/logger/handlers/index.js +1 -1
  305. package/dist/utils/logger/handlers/null-handler.js +1 -1
  306. package/dist/utils/logger/index.js +1 -1
  307. package/dist/utils/logger/logger.js +1 -1
  308. package/dist/utils/logger/types.js +1 -1
  309. package/dist/utils/option-validation.js +1 -1
  310. package/dist/utils/process.js +1 -1
  311. package/dist/utils/prompt.js +1 -1
  312. package/dist/utils/proxy-fetch.js +1 -1
  313. package/dist/utils/spinner.js +1 -1
  314. package/dist/utils/sse-parser.js +1 -1
  315. package/dist/utils/string-utils.js +1 -1
  316. package/dist/utils/table-ref-parser.js +1 -1
  317. package/dist/utils/tdx-logger.js +1 -1
  318. package/dist/utils/version-check.js +1 -1
  319. package/package.json +2 -1
@@ -1 +1 @@
1
- function a3_0x4db3(){const _0x1aba01=['10aWuvpF','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','cause','✔\x20Found\x20','\x27...','Error:\x20Segment\x20name\x20is\x20required','Resolved\x20parent\x20ID:\x20','description','segment','1845XVKvJM','88PmaduO','Resolved\x20child\x20ID:\x20','verbose','site','303672FRgsNU','224ObHRtG','188359XGXIbI','717cGLqUk','Error:\x20','Parent\x20name:\x20','2WcaXqW','message','resolveSegmentId','data','error','293657BlgrZK','14GtBrae','34422pcCKgG','Resolving\x20child\x20segment\x20\x27','length','List\x20activations\x20for\x20a\x20segment','\x20\x20Cause:\x20','name','execute','2830xumwxP','3980eHRGuD','871208FqGJvk','Usage:\x20tdx\x20activations\x20<parent_name/child_name>'];a3_0x4db3=function(){return _0x1aba01;};return a3_0x4db3();}const a3_0x5dde83=a3_0x207b;(function(_0x398a3b,_0x111fef){const _0x40c08e=a3_0x207b,_0x653593=_0x398a3b();while(!![]){try{const _0x3b5d17=-parseInt(_0x40c08e(0xa8))/0x1*(-parseInt(_0x40c08e(0xac))/0x2)+parseInt(_0x40c08e(0xa9))/0x3*(parseInt(_0x40c08e(0x95))/0x4)+-parseInt(_0x40c08e(0x98))/0x5*(parseInt(_0x40c08e(0x8d))/0x6)+-parseInt(_0x40c08e(0x8c))/0x7*(-parseInt(_0x40c08e(0x96))/0x8)+-parseInt(_0x40c08e(0xa1))/0x9*(-parseInt(_0x40c08e(0x94))/0xa)+parseInt(_0x40c08e(0xa2))/0xb*(-parseInt(_0x40c08e(0xa6))/0xc)+-parseInt(_0x40c08e(0x8b))/0xd*(parseInt(_0x40c08e(0xa7))/0xe);if(_0x3b5d17===_0x111fef)break;else _0x653593['push'](_0x653593['shift']());}catch(_0x34ffc7){_0x653593['push'](_0x653593['shift']());}}}(a3_0x4db3,0x1eeab));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';function a3_0x207b(_0x34dc08,_0x1e6b87){_0x34dc08=_0x34dc08-0x8b;const _0x4db352=a3_0x4db3();let _0x207b99=_0x4db352[_0x34dc08];return _0x207b99;}export class ActivationsCommand extends BaseCommand{[a3_0x5dde83(0x92)]='activations';[a3_0x5dde83(0x9f)]=a3_0x5dde83(0x90);async[a3_0x5dde83(0x93)](_0x573d92){const _0x3a7a45=a3_0x5dde83,{options:_0x3a567b,args:_0x13ed11,tdx:_0xaa20d8}=_0x573d92;if(_0x13ed11[_0x3a7a45(0x8f)]===0x0)return console['error'](_0x3a7a45(0x9d)),console[_0x3a7a45(0xb0)](_0x3a7a45(0x97)),0x1;try{const {parentId:_0x1c6d54,childId:_0x6d7462}=parseSegmentRef(_0x13ed11[0x0]);if(!_0x6d7462)return console[_0x3a7a45(0xb0)](_0x3a7a45(0x99)),console[_0x3a7a45(0xb0)](_0x3a7a45(0x97)),0x1;_0x3a567b[_0x3a7a45(0xa4)]&&(console[_0x3a7a45(0xb0)]('Site:\x20'+_0x3a567b[_0x3a7a45(0xa5)]),console['error'](_0x3a7a45(0xab)+_0x1c6d54),console[_0x3a7a45(0xb0)]('Child\x20name:\x20'+_0x6d7462));const _0x3b38f6=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1c6d54+'\x27...',()=>_0xaa20d8[_0x3a7a45(0xa0)]['resolveParentId'](_0x1c6d54),{'verbose':_0x3a567b[_0x3a7a45(0xa4)]}),_0x13a54c=_0x3b38f6[_0x3a7a45(0xaf)];_0x3a567b['verbose']&&console['error'](_0x3a7a45(0x9e)+_0x13a54c);const _0x5f3558=await withSpinner(_0x3a7a45(0x8e)+_0x6d7462+_0x3a7a45(0x9c),()=>_0xaa20d8[_0x3a7a45(0xa0)][_0x3a7a45(0xae)](_0x13a54c,_0x6d7462),{'verbose':_0x3a567b[_0x3a7a45(0xa4)]}),_0x45d1a4=_0x5f3558[_0x3a7a45(0xaf)];_0x3a567b[_0x3a7a45(0xa4)]&&console[_0x3a7a45(0xb0)](_0x3a7a45(0xa3)+_0x45d1a4);const _0x582d1e=await withSpinner('Listing\x20activations\x20for\x20segment\x20\x27'+_0x6d7462+'\x27...',()=>_0xaa20d8[_0x3a7a45(0xa0)]['listActivations'](_0x13a54c,_0x45d1a4),{'verbose':_0x3a567b[_0x3a7a45(0xa4)]}),_0x42d260=_0x582d1e['data'];return console['error'](_0x3a7a45(0x9b)+_0x42d260[_0x3a7a45(0x8f)]+'\x20activation'+(_0x42d260[_0x3a7a45(0x8f)]!==0x1?'s':'')),await handleSDKOutput(_0x42d260,_0x3a567b),0x0;}catch(_0x53124e){if(_0x53124e instanceof SDKError)return console[_0x3a7a45(0xb0)](_0x3a7a45(0xaa)+_0x53124e[_0x3a7a45(0xad)]),_0x53124e['cause']&&console['error'](_0x3a7a45(0x91)+_0x53124e[_0x3a7a45(0x9a)]),0x1;throw _0x53124e;}}}
1
+ const a3_0x267ff3=a3_0x1d5a;(function(_0x1c69fc,_0x3b4591){const _0x3469b7=a3_0x1d5a,_0x4fa5a9=_0x1c69fc();while(!![]){try{const _0x589d8a=parseInt(_0x3469b7(0x78))/0x1+parseInt(_0x3469b7(0x89))/0x2*(parseInt(_0x3469b7(0x90))/0x3)+parseInt(_0x3469b7(0x7c))/0x4+parseInt(_0x3469b7(0x96))/0x5*(parseInt(_0x3469b7(0x91))/0x6)+parseInt(_0x3469b7(0x7f))/0x7*(parseInt(_0x3469b7(0x8b))/0x8)+parseInt(_0x3469b7(0x7e))/0x9+-parseInt(_0x3469b7(0x98))/0xa*(parseInt(_0x3469b7(0x7a))/0xb);if(_0x589d8a===_0x3b4591)break;else _0x4fa5a9['push'](_0x4fa5a9['shift']());}catch(_0x2df380){_0x4fa5a9['push'](_0x4fa5a9['shift']());}}}(a3_0x3d32,0x8e2ee));import{BaseCommand}from'./command.js';function a3_0x3d32(){const _0x398aec=['site','data','resolveSegmentId','name','Site:\x20','\x20\x20Cause:\x20','verbose','cause','1634462xsVINB','Parent\x20name:\x20','2777128tTSRFR','message','segment','length','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','3KIGkiM','60UbvGDQ','Resolved\x20parent\x20ID:\x20','error','Resolving\x20parent\x20segment\x20\x27','\x27...','53605sMvEGA','Resolved\x20child\x20ID:\x20','16400740XQZaVd','\x20activation','activations','Error:\x20','1158967zYhSmf','List\x20activations\x20for\x20a\x20segment','22LUTPbz','Resolving\x20child\x20segment\x20\x27','3334856YrOzdI','description','2260134mncXXQ','14Gobsec','listActivations'];a3_0x3d32=function(){return _0x398aec;};return a3_0x3d32();}import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a3_0x1d5a(_0x521df0,_0x3ae6b9){_0x521df0=_0x521df0-0x77;const _0x3d324c=a3_0x3d32();let _0x1d5a83=_0x3d324c[_0x521df0];return _0x1d5a83;}import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a3_0x267ff3(0x84)]=a3_0x267ff3(0x9a);[a3_0x267ff3(0x7d)]=a3_0x267ff3(0x79);async['execute'](_0x14cd48){const _0x5e4124=a3_0x267ff3,{options:_0x2737ca,args:_0x34f6ed,tdx:_0x4c7ebf}=_0x14cd48;if(_0x34f6ed[_0x5e4124(0x8e)]===0x0)return console['error']('Error:\x20Segment\x20name\x20is\x20required'),console[_0x5e4124(0x93)](_0x5e4124(0x8f)),0x1;try{const {parentId:_0x12ca25,childId:_0x2f5a47}=parseSegmentRef(_0x34f6ed[0x0]);if(!_0x2f5a47)return console[_0x5e4124(0x93)]('Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations'),console['error'](_0x5e4124(0x8f)),0x1;_0x2737ca[_0x5e4124(0x87)]&&(console[_0x5e4124(0x93)](_0x5e4124(0x85)+_0x2737ca[_0x5e4124(0x81)]),console['error'](_0x5e4124(0x8a)+_0x12ca25),console['error']('Child\x20name:\x20'+_0x2f5a47));const _0x17a002=await withSpinner(_0x5e4124(0x94)+_0x12ca25+'\x27...',()=>_0x4c7ebf['segment']['resolveParentId'](_0x12ca25),{'verbose':_0x2737ca[_0x5e4124(0x87)]}),_0x5d3c0e=_0x17a002[_0x5e4124(0x82)];_0x2737ca[_0x5e4124(0x87)]&&console['error'](_0x5e4124(0x92)+_0x5d3c0e);const _0x34865b=await withSpinner(_0x5e4124(0x7b)+_0x2f5a47+_0x5e4124(0x95),()=>_0x4c7ebf[_0x5e4124(0x8d)][_0x5e4124(0x83)](_0x5d3c0e,_0x2f5a47),{'verbose':_0x2737ca[_0x5e4124(0x87)]}),_0x26256e=_0x34865b['data'];_0x2737ca['verbose']&&console[_0x5e4124(0x93)](_0x5e4124(0x97)+_0x26256e);const _0x465bb5=await withSpinner('Listing\x20activations\x20for\x20segment\x20\x27'+_0x2f5a47+_0x5e4124(0x95),()=>_0x4c7ebf['segment'][_0x5e4124(0x80)](_0x5d3c0e,_0x26256e),{'verbose':_0x2737ca[_0x5e4124(0x87)]}),_0x3fd946=_0x465bb5[_0x5e4124(0x82)];return console['error']('✔\x20Found\x20'+_0x3fd946['length']+_0x5e4124(0x99)+(_0x3fd946[_0x5e4124(0x8e)]!==0x1?'s':'')),await handleSDKOutput(_0x3fd946,_0x2737ca),0x0;}catch(_0x4fdffc){if(_0x4fdffc instanceof SDKError)return console['error'](_0x5e4124(0x77)+_0x4fdffc[_0x5e4124(0x8c)]),_0x4fdffc[_0x5e4124(0x88)]&&console[_0x5e4124(0x93)](_0x5e4124(0x86)+_0x4fdffc[_0x5e4124(0x88)]),0x1;throw _0x4fdffc;}}}
@@ -1 +1 @@
1
- const a4_0x304b07=a4_0x23f5;(function(_0xfe490b,_0x2d83d2){const _0x58b9db=a4_0x23f5,_0x1421da=_0xfe490b();while(!![]){try{const _0x3e70b2=-parseInt(_0x58b9db(0xc5))/0x1*(-parseInt(_0x58b9db(0x12f))/0x2)+-parseInt(_0x58b9db(0x104))/0x3*(-parseInt(_0x58b9db(0xf2))/0x4)+parseInt(_0x58b9db(0x12b))/0x5*(-parseInt(_0x58b9db(0xeb))/0x6)+parseInt(_0x58b9db(0x134))/0x7+-parseInt(_0x58b9db(0x162))/0x8+parseInt(_0x58b9db(0x166))/0x9*(parseInt(_0x58b9db(0xf1))/0xa)+-parseInt(_0x58b9db(0xba))/0xb;if(_0x3e70b2===_0x2d83d2)break;else _0x1421da['push'](_0x1421da['shift']());}catch(_0x24c3c3){_0x1421da['push'](_0x1421da['shift']());}}}(a4_0x2884,0x82c40));import a4_0x570f0d from'chalk';import a4_0x5cf021 from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a4_0x2884(){const _0x5d94e6=['\x20\x20Source:\x20','\x20\x20Text\x20Knowledge\x20Bases:\x20','6843655btBvKp','\x27\x20to\x20create\x20the\x20folder\x20structure.','error','dryRun','\x20\x20Experimental\x20Artifact\x20\x22','site','\x20=\x20','\x20successfully','new','\x20resources\x20to\x20\x27','chatInterfaces','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','reason','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','Output\x20path:\x20','\x0aChanges\x20to\x20integration\x20\x27','\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<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','cyan','output','isNew','Errors:','\x0aError:','Pushing\x20agent\x20from\x20\x22','\x20|\x20','\x20updated','projectName','gray','cwd-config','-\x20no\x20files\x20written','\x0aPush\x20summary\x20for\x20\x27','New\x20project:\x20','\x20\x20Integration\x20\x22','Analyzing\x20project\x20\x22','Cannot\x20clone\x20from\x20context\x20project\x20\x22','counts','formInterfaces','Agent:\x20','Output:\x20','session','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','agent','\x20\x20Agents:\x20','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','\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','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)','866152uXlKut','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','hasChanges','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','1593gvsyBZ','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','textKnowledgeBases','Agent\x20pulled\x20successfully','\x0aWrite\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','push','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','agent:pull','\x0aChanges\x20to\x20chat\x20interface\x20\x27','\x20--name\x20','Source:\x20','tdx.json','agents','\x20errors','projectId','\x20\x20Form\x20Interfaces:\x20','context','red','\x0aChanges\x20to\x20form\x20interface\x20\x27','Using\x20current\x20project:\x20','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','\x20\x20Chat\x20Interfaces:\x20','Project\x20cloned\x20with\x20errors','8550696OybfGK','\x20\x20tdx\x20agent\x20clone\x20agents/','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','action','parse','utf-8','llm','agentId','\x20unchanged','\x22...','description','1832nlVxqO','INVALID_ARGUMENT','Would\x20clone:','\x0aChanges\x20to\x20prompt\x20\x27','Dry\x20run\x20-\x20no\x20changes\x20made','\x20\x20Prompts:\x20','experimentalArtifacts','Cancelled','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','\x20total','updated','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','newProjectId','found','unchanged','source','message','arg-dir','\x0aProject\x20pushed\x20with\x20errors','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','errors','\x0aPush\x20','newProjectName','prompts','yellow','Using\x20project\x20from\x20','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','Analyzing\x20changes\x20to\x20push...','Status:\x20','cwd','\x20--profile\x20','✔\x20Context\x20set:\x20','Would\x20push\x20agent:\x20','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','Failed\x20to\x20push\x20agent:\x20','\x20resources?','Pushing\x20to\x20project...','\x20\x20Text\x20Knowledge\x20Base\x20\x22','42eUUjmj','agent:push','pullProject','\x20changed','Using\x20project\x20from\x20context:\x20','name','13170cffsfM','200jNJiiV','agent:clone','\x20\x20Agent\x20\x22','Project:\x20','\x20new','integrations','dim','\x20\x20Experimental\x20Artifacts:\x20','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','total','log','\x20files?','projectDir','New\x20project\x20ID:\x20','no_context','\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','cloneProject','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','39681TMSOuv','no_local_folder','llmProject','\x20\x20Prompt\x20\x22','Using\x20project:\x20','created','join','Pulling\x20agent\x20\x22','repeat','yes','\x20\x20Form\x20Interface\x20\x22','experimentalKnowledgeBases','Using\x20local\x20project:\x20','\x20\x20Target:\x20','-\x20nothing\x20pushed','\x20\x20Integrations:\x20','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','knowledgeBases','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','sourceProjectName','\x22\x20to\x20new\x20project\x20\x22','\x20\x20Chat\x20Interface\x20\x22','green','agent.yml','\x22:\x20','\x20created','\x20\x20Knowledge\x20Bases:\x20','\x20\x20tdx\x20agent\x20pull\x20','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','pushAgent','force','execute','\x0a✔\x20Pulled\x20','\x22\x20from\x20project\x20\x22','diff','Chat:\x20','agentName','outputPath','Clone\x20\x22','531445IiaMqu','MISSING_ARGUMENT','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','Would\x20pull\x20agent:\x20','320VBBNGs','\x0aErrors\x20found:','llm_project'];a4_0x2884=function(){return _0x5d94e6;};return a4_0x2884();}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(_0x3f9382){const _0x8877a8=a4_0x23f5,_0x36284f=[];if(_0x3f9382[_0x8877a8(0xfb)]!==undefined)_0x36284f[_0x8877a8(0x16c)](_0x3f9382[_0x8877a8(0xfb)]+_0x8877a8(0xce));if(_0x3f9382[_0x8877a8(0x13c)]!==undefined&&_0x3f9382['new']>0x0)_0x36284f['push'](a4_0x570f0d['green'](_0x3f9382[_0x8877a8(0x13c)]+_0x8877a8(0xf6)));if(_0x3f9382[_0x8877a8(0x109)]!==undefined&&_0x3f9382['created']>0x0)_0x36284f[_0x8877a8(0x16c)](a4_0x570f0d[_0x8877a8(0x11a)](_0x3f9382[_0x8877a8(0x109)]+_0x8877a8(0x11d)));if(_0x3f9382[_0x8877a8(0xcf)]!==undefined&&_0x3f9382[_0x8877a8(0xcf)]>0x0)_0x36284f[_0x8877a8(0x16c)](a4_0x570f0d[_0x8877a8(0xdd)](_0x3f9382['updated']+_0x8877a8(0x14d)));if(_0x3f9382['unchanged']!==undefined&&_0x3f9382[_0x8877a8(0xd3)]>0x0)_0x36284f[_0x8877a8(0x16c)](a4_0x570f0d[_0x8877a8(0x14f)](_0x3f9382[_0x8877a8(0xd3)]+'\x20unchanged'));if(_0x3f9382[_0x8877a8(0xd9)]!==undefined&&_0x3f9382[_0x8877a8(0xd9)]>0x0)_0x36284f[_0x8877a8(0x16c)](a4_0x570f0d['red'](_0x3f9382[_0x8877a8(0xd9)]+_0x8877a8(0x174)));return _0x36284f[_0x8877a8(0x10a)](',\x20');}function a4_0x23f5(_0x484a43,_0x2e3b10){_0x484a43=_0x484a43-0xb3;const _0x28849f=a4_0x2884();let _0x23f5f8=_0x28849f[_0x484a43];return _0x23f5f8;}function displayDiffs(_0x27a090,_0x4e705a,_0x1a5889,_0x1edba3,_0x315d8b,_0x2d8f33,_0x314d16,_0x50c3a1,_0x4cc600){const _0x22c61c=a4_0x23f5;for(const _0x28fdeb of _0x27a090){if(_0x28fdeb[_0x22c61c(0x126)]){const _0x2bf019=_0x28fdeb[_0x22c61c(0x128)]||_0x28fdeb[_0x22c61c(0xf0)];console[_0x22c61c(0xfc)]('\x0aChanges\x20to\x20agent\x20\x27'+_0x2bf019+'\x27:'),console['log']('─'[_0x22c61c(0x10c)](0x3c)),console['log'](_0x28fdeb['diff']),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c));}}for(const _0x4f7752 of _0x4e705a){_0x4f7752[_0x22c61c(0x126)]&&(console[_0x22c61c(0xfc)](_0x22c61c(0xe6)+_0x4f7752['name']+'\x27:'),console['log']('─'[_0x22c61c(0x10c)](0x3c)),console[_0x22c61c(0xfc)](_0x4f7752[_0x22c61c(0x126)]),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)));}for(const _0x35dd15 of _0x1a5889){_0x35dd15[_0x22c61c(0x126)]&&(console[_0x22c61c(0xfc)](_0x22c61c(0x120)+_0x35dd15[_0x22c61c(0xf0)]+'\x27:'),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)),console['log'](_0x35dd15['diff']),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)));}for(const _0x4926a6 of _0x1edba3){_0x4926a6['diff']&&(console[_0x22c61c(0xfc)](_0x22c61c(0xc8)+_0x4926a6[_0x22c61c(0xf0)]+'\x27:'),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)),console[_0x22c61c(0xfc)](_0x4926a6[_0x22c61c(0x126)]),console[_0x22c61c(0xfc)]('─'['repeat'](0x3c)));}for(const _0x15c8a3 of _0x315d8b){_0x15c8a3[_0x22c61c(0x126)]&&(console[_0x22c61c(0xfc)](_0x22c61c(0x143)+_0x15c8a3[_0x22c61c(0xf0)]+'\x27:'),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)),console['log'](_0x15c8a3[_0x22c61c(0x126)]),console[_0x22c61c(0xfc)]('─'['repeat'](0x3c)));}for(const _0x2ef9b4 of _0x2d8f33){_0x2ef9b4['diff']&&(console[_0x22c61c(0xfc)](_0x22c61c(0x165)+_0x2ef9b4[_0x22c61c(0xf0)]+'\x27:'),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)),console[_0x22c61c(0xfc)](_0x2ef9b4[_0x22c61c(0x126)]),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)));}for(const _0x5c2dcd of _0x314d16){_0x5c2dcd['diff']&&(console[_0x22c61c(0xfc)](_0x22c61c(0xcd)+_0x5c2dcd[_0x22c61c(0xf0)]+'\x27:'),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)),console[_0x22c61c(0xfc)](_0x5c2dcd[_0x22c61c(0x126)]),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)));}for(const _0x5546fc of _0x50c3a1){_0x5546fc[_0x22c61c(0x126)]&&(console['log'](_0x22c61c(0xb5)+_0x5546fc[_0x22c61c(0xf0)]+'\x27:'),console['log']('─'[_0x22c61c(0x10c)](0x3c)),console[_0x22c61c(0xfc)](_0x5546fc['diff']),console[_0x22c61c(0xfc)]('─'['repeat'](0x3c)));}for(const _0x5918d1 of _0x4cc600){_0x5918d1[_0x22c61c(0x126)]&&(console['log'](_0x22c61c(0x16f)+_0x5918d1[_0x22c61c(0xf0)]+'\x27:'),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)),console[_0x22c61c(0xfc)](_0x5918d1[_0x22c61c(0x126)]),console[_0x22c61c(0xfc)]('─'[_0x22c61c(0x10c)](0x3c)));}}export class AgentPullCommand extends BaseCommand{['name']=a4_0x304b07(0x16e);[a4_0x304b07(0xc4)]=a4_0x304b07(0xd8);async[a4_0x304b07(0x123)](_0x37566e){const _0x5dec3a=a4_0x304b07,{options:_0x37d4bc,args:_0x54013d,tdx:_0x18e245}=_0x37566e,_0x230d1d=_0x54013d[0x0],_0x5cb7fe=_0x54013d[0x1],_0x4df3db=_0x37d4bc[_0x5dec3a(0x147)],_0x18aae7=_0x37d4bc[_0x5dec3a(0x137)],_0x2ca230=_0x37d4bc[_0x5dec3a(0x122)],_0x59e1de=_0x37d4bc['yes'],_0x208939=_0x37d4bc['llmProject'],_0x35a9d4=_0x37d4bc[_0x5dec3a(0x15d)];let _0x3fc70;if(_0x230d1d){const _0x58cebf=a4_0x5cf021[_0x5dec3a(0x10a)](_0x230d1d,_0x5dec3a(0x172));if(existsSync(_0x58cebf))try{const _0x54aef0=JSON[_0x5dec3a(0xbe)](readFileSync(_0x58cebf,_0x5dec3a(0xbf)));_0x54aef0[_0x5dec3a(0x131)]&&(_0x3fc70={'llm_project':_0x54aef0['llm_project']});}catch{}}const _0x1e8a01=findAgentConfigPath(process[_0x5dec3a(0xe2)]());let _0x4cc492;if(_0x1e8a01)try{const _0x197835=JSON[_0x5dec3a(0xbe)](readFileSync(_0x1e8a01,'utf-8'));_0x197835[_0x5dec3a(0x131)]&&(_0x4cc492={'llm_project':_0x197835[_0x5dec3a(0x131)]});}catch{}const _0x4646f8=resolveAgentPullArgs({'arg':_0x230d1d,'agentNameArg':_0x5cb7fe,'agentFlag':_0x35a9d4,'contextProject':_0x208939,'argDirConfig':_0x3fc70,'cwdConfigPath':_0x1e8a01||undefined,'cwdConfig':_0x4cc492}),{projectNameOrId:_0xffae89,targetAgentName:_0x5c0ed7,existingOutputDir:_0xdddd1f,source:_0x37bb25}=_0x4646f8;if(_0x37bb25===_0x5dec3a(0xd6))console['log'](a4_0x570f0d[_0x5dec3a(0xf8)](_0x5dec3a(0xde)+a4_0x5cf021[_0x5dec3a(0x10a)](_0x230d1d,_0x5dec3a(0x172))+':\x20'+_0xffae89));else{if(_0x37bb25===_0x5dec3a(0x150))console['log'](a4_0x570f0d[_0x5dec3a(0xf8)]('Using\x20project:\x20'+_0xffae89));else _0x37bb25===_0x5dec3a(0xb3)&&console[_0x5dec3a(0xfc)](a4_0x570f0d[_0x5dec3a(0xf8)](_0x5dec3a(0xef)+_0xffae89));}if(!_0xffae89)return _0x35a9d4?(console[_0x5dec3a(0xfc)](a4_0x570f0d[_0x5dec3a(0xdd)](_0x5dec3a(0x167))),console[_0x5dec3a(0xfc)](_0x5dec3a(0xfa)),console['log']('Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>')):(console[_0x5dec3a(0xfc)](a4_0x570f0d[_0x5dec3a(0xdd)](_0x5dec3a(0x15f))),console[_0x5dec3a(0xfc)](_0x5dec3a(0x161)),console[_0x5dec3a(0xfc)](_0x5dec3a(0x160)),console['log'](_0x5dec3a(0x101)),console[_0x5dec3a(0xfc)]('\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'),console[_0x5dec3a(0xfc)](_0x5dec3a(0x144))),0x1;if(_0x5c0ed7){const {data:_0x31102a}=await withSpinner(_0x5dec3a(0x10b)+_0x5c0ed7+_0x5dec3a(0x125)+_0xffae89+'\x22...',()=>_0x18e245[_0x5dec3a(0xc0)]['pullAgent'](_0xffae89,_0x5c0ed7,_0x4df3db,{'dryRun':_0x18aae7,'force':_0x2ca230}));if(_0x18aae7)return console[_0x5dec3a(0xfc)](a4_0x570f0d[_0x5dec3a(0xdd)]('Dry\x20run\x20-\x20no\x20files\x20written')),console[_0x5dec3a(0xfc)](_0x5dec3a(0x12e)+_0x31102a[_0x5dec3a(0x128)]),console[_0x5dec3a(0xfc)](_0x5dec3a(0x142)+_0x31102a['outputPath']),_0x31102a[_0x5dec3a(0x126)]&&(console[_0x5dec3a(0xfc)]('\x0aChanges:'),console[_0x5dec3a(0xfc)]('─'['repeat'](0x3c)),console[_0x5dec3a(0xfc)](_0x31102a[_0x5dec3a(0x126)]),console[_0x5dec3a(0xfc)]('─'[_0x5dec3a(0x10c)](0x3c))),0x0;return console[_0x5dec3a(0xfc)](a4_0x570f0d['green'](_0x5dec3a(0x169))),console[_0x5dec3a(0xfc)](_0x5dec3a(0x159)+_0x31102a[_0x5dec3a(0x128)]),console['log'](_0x5dec3a(0x15a)+_0x31102a[_0x5dec3a(0x129)]),console[_0x5dec3a(0xfc)](_0x5dec3a(0xe1)+(_0x31102a[_0x5dec3a(0x148)]?a4_0x570f0d[_0x5dec3a(0x11a)](_0x5dec3a(0x13c)):_0x31102a[_0x5dec3a(0x164)]?a4_0x570f0d[_0x5dec3a(0xdd)](_0x5dec3a(0xcf)):a4_0x570f0d['gray'](_0x5dec3a(0xd3)))),0x0;}const _0x26bbf4=_0xdddd1f||_0x4df3db,{data:_0xa6db32}=await withSpinner(_0x5dec3a(0x155)+_0xffae89+_0x5dec3a(0xc3),()=>_0x18e245['llm'][_0x5dec3a(0xed)](_0xffae89,_0x26bbf4,{'dryRun':!![]})),_0x5b0e2d=_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x173)][_0x5dec3a(0x13c)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x115)][_0x5dec3a(0x13c)]+_0xa6db32['counts'][_0x5dec3a(0x168)][_0x5dec3a(0x13c)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0xdc)][_0x5dec3a(0x13c)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0xf7)][_0x5dec3a(0x13c)]+_0xa6db32[_0x5dec3a(0x157)]['experimentalKnowledgeBases'][_0x5dec3a(0x13c)]+_0xa6db32['counts']['experimentalArtifacts'][_0x5dec3a(0x13c)]+_0xa6db32['counts']['formInterfaces']['new']+_0xa6db32['counts'][_0x5dec3a(0x13e)][_0x5dec3a(0x13c)],_0x5b4e24=_0xa6db32['counts'][_0x5dec3a(0x173)]['updated']+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x115)][_0x5dec3a(0xcf)]+_0xa6db32[_0x5dec3a(0x157)]['textKnowledgeBases'][_0x5dec3a(0xcf)]+_0xa6db32[_0x5dec3a(0x157)]['prompts'][_0x5dec3a(0xcf)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0xf7)][_0x5dec3a(0xcf)]+_0xa6db32['counts'][_0x5dec3a(0x10f)][_0x5dec3a(0xcf)]+_0xa6db32[_0x5dec3a(0x157)]['experimentalArtifacts']['updated']+_0xa6db32['counts'][_0x5dec3a(0x158)][_0x5dec3a(0xcf)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x13e)][_0x5dec3a(0xcf)],_0x373413=_0xa6db32['counts'][_0x5dec3a(0x173)]['unchanged']+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x115)][_0x5dec3a(0xd3)]+_0xa6db32['counts'][_0x5dec3a(0x168)][_0x5dec3a(0xd3)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0xdc)][_0x5dec3a(0xd3)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0xf7)]['unchanged']+_0xa6db32[_0x5dec3a(0x157)]['experimentalKnowledgeBases'][_0x5dec3a(0xd3)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0xcb)][_0x5dec3a(0xd3)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x158)][_0x5dec3a(0xd3)]+_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x13e)][_0x5dec3a(0xd3)];console[_0x5dec3a(0xfc)]('\x0aPull\x20summary\x20for\x20\x27'+_0xa6db32[_0x5dec3a(0x14e)]+'\x27:'),console[_0x5dec3a(0xfc)]('\x20\x20'+a4_0x570f0d[_0x5dec3a(0x11a)]('+\x20'+_0x5b0e2d+_0x5dec3a(0xf6))+_0x5dec3a(0x14c)+a4_0x570f0d[_0x5dec3a(0xdd)]('~\x20'+_0x5b4e24+_0x5dec3a(0xee))+_0x5dec3a(0x14c)+a4_0x570f0d['dim']('=\x20'+_0x373413+_0x5dec3a(0xc2))),console[_0x5dec3a(0xfc)](_0x5dec3a(0x15e)+formatCountSummary(_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x173)])),console[_0x5dec3a(0xfc)](_0x5dec3a(0x11e)+formatCountSummary(_0xa6db32[_0x5dec3a(0x157)]['knowledgeBases'])),console[_0x5dec3a(0xfc)](_0x5dec3a(0x133)+formatCountSummary(_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x168)])),console[_0x5dec3a(0xfc)]('\x20\x20Prompts:\x20'+formatCountSummary(_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0xdc)])),console[_0x5dec3a(0xfc)](_0x5dec3a(0x113)+formatCountSummary(_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0xf7)])),console[_0x5dec3a(0xfc)](_0x5dec3a(0x176)+formatCountSummary(_0xa6db32['counts'][_0x5dec3a(0x158)])),console['log']('\x20\x20Chat\x20Interfaces:\x20'+formatCountSummary(_0xa6db32[_0x5dec3a(0x157)][_0x5dec3a(0x13e)]));const _0x1e2507=_0xa6db32[_0x5dec3a(0x157)]['experimentalKnowledgeBases'][_0x5dec3a(0xfb)]>0x0||_0xa6db32[_0x5dec3a(0x157)]['experimentalArtifacts']['total']>0x0;_0x1e2507&&(console[_0x5dec3a(0xfc)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0xa6db32['counts'][_0x5dec3a(0x10f)])),console['log'](_0x5dec3a(0xf9)+formatCountSummary(_0xa6db32['counts']['experimentalArtifacts'])));console[_0x5dec3a(0xfc)](_0x5dec3a(0x111)+a4_0x570f0d[_0x5dec3a(0x146)](_0xa6db32['outputDir'])),displayDiffs(_0xa6db32[_0x5dec3a(0x173)],_0xa6db32[_0x5dec3a(0x115)],_0xa6db32[_0x5dec3a(0x168)],_0xa6db32[_0x5dec3a(0xdc)],_0xa6db32[_0x5dec3a(0xf7)],_0xa6db32['experimentalKnowledgeBases'],_0xa6db32[_0x5dec3a(0xcb)],_0xa6db32['formInterfaces'],_0xa6db32[_0x5dec3a(0x13e)]);if(_0x18aae7)return console[_0x5dec3a(0xfc)](a4_0x570f0d[_0x5dec3a(0xdd)](_0x5dec3a(0x13f))),0x0;if(_0x5b0e2d===0x0&&_0x5b4e24===0x0)return console['log'](a4_0x570f0d[_0x5dec3a(0x11a)](_0x5dec3a(0x12d))),saveSessionContext({'llm_project':_0xa6db32[_0x5dec3a(0x14e)]},_0x37d4bc[_0x5dec3a(0x15b)]),console['log'](a4_0x570f0d[_0x5dec3a(0x11a)]('✔\x20Context\x20set:\x20'+a4_0x570f0d[_0x5dec3a(0xf8)](_0x5dec3a(0x131))+_0x5dec3a(0x13a)+a4_0x570f0d[_0x5dec3a(0x146)](_0xa6db32[_0x5dec3a(0x14e)]))),0x0;if(!_0x59e1de&&!_0x2ca230){if(!isInteractive())return console['error'](a4_0x570f0d[_0x5dec3a(0xb4)](_0x5dec3a(0x14a)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x5dec3a(0x136)](a4_0x570f0d[_0x5dec3a(0xf8)](_0x5dec3a(0xbc))),0x1;const _0x13a5bc=await confirmKey(_0x5dec3a(0x16a)+(_0x5b0e2d+_0x5b4e24)+_0x5dec3a(0xfd));if(!_0x13a5bc)return console['log'](a4_0x570f0d[_0x5dec3a(0xdd)](_0x5dec3a(0xcc)),_0x5dec3a(0x151)),0x1;}const {data:_0x34b082}=await withSpinner('Writing\x20files...',()=>_0x18e245['llm']['pullProject'](_0xffae89,_0x26bbf4,{'force':_0x2ca230}));return console[_0x5dec3a(0xfc)](a4_0x570f0d[_0x5dec3a(0x11a)](_0x5dec3a(0x124)+(_0x5b0e2d+_0x5b4e24)+'\x20files\x20to\x20'+_0x34b082['outputDir'])),saveSessionContext({'llm_project':_0x34b082[_0x5dec3a(0x14e)]},_0x37d4bc[_0x5dec3a(0x15b)]),console[_0x5dec3a(0xfc)](a4_0x570f0d[_0x5dec3a(0x11a)](_0x5dec3a(0xe4)+a4_0x570f0d[_0x5dec3a(0xf8)](_0x5dec3a(0x131))+'\x20=\x20'+a4_0x570f0d[_0x5dec3a(0x146)](_0x34b082[_0x5dec3a(0x14e)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{['name']=a4_0x304b07(0xf3);[a4_0x304b07(0xc4)]=a4_0x304b07(0x103);async[a4_0x304b07(0x123)](_0x387fc8){const _0x51111a=a4_0x304b07,{options:_0x3776b7,args:_0x30df2b,tdx:_0x4d2be9}=_0x387fc8,_0x21185e=_0x30df2b[0x0],_0x324690=_0x3776b7['name'],_0x309c05=_0x3776b7['dryRun'],_0x17bf13=_0x3776b7[_0x51111a(0x10d)],_0x28ca90=_0x3776b7[_0x51111a(0x139)],_0x4eb1d0=_0x3776b7[_0x51111a(0x106)];let _0x2c2c8e;const _0x452ea6=findAgentConfigPath(process[_0x51111a(0xe2)]());if(_0x21185e){const _0x1253e2=a4_0x5cf021[_0x51111a(0x10a)](_0x21185e,_0x51111a(0x172));existsSync(_0x1253e2)?(_0x2c2c8e=_0x21185e,console[_0x51111a(0xfc)](a4_0x570f0d['dim'](_0x51111a(0x110)+_0x21185e))):_0x2c2c8e=_0x21185e;}else{if(_0x452ea6)_0x2c2c8e=a4_0x5cf021['dirname'](_0x452ea6),console['log'](a4_0x570f0d[_0x51111a(0xf8)](_0x51111a(0xb6)+_0x2c2c8e));else{if(_0x4eb1d0){const _0xc8f0e8=sanitizeForFilesystem(_0x4eb1d0);let _0x463c5a=_0xc8f0e8,_0x102022=a4_0x5cf021[_0x51111a(0x10a)](process[_0x51111a(0xe2)](),_0x51111a(0x173),_0xc8f0e8,_0x51111a(0x172));if(!existsSync(_0x102022)){const _0x2ab179=normalizeName(_0x4eb1d0),_0x1a0ec5=a4_0x5cf021['join'](process[_0x51111a(0xe2)](),'agents',_0x2ab179,'tdx.json');existsSync(_0x1a0ec5)&&(_0x463c5a=_0x2ab179,_0x102022=_0x1a0ec5);}if(existsSync(_0x102022))_0x2c2c8e=a4_0x5cf021['dirname'](_0x102022),console[_0x51111a(0xfc)](a4_0x570f0d[_0x51111a(0xf8)](_0x51111a(0x110)+_0x2c2c8e));else{const _0x24b9f3=_0x3776b7['profile'];if(_0x24b9f3)throw new SDKError(ErrorCode[_0x51111a(0xc6)],_0x51111a(0x156)+_0x4eb1d0+'\x22\x20to\x20a\x20different\x20profile',undefined,{'helpText':_0x51111a(0xdf)+'First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a'+(_0x51111a(0x11f)+_0x4eb1d0+'\x0a')+(_0x51111a(0xbb)+_0x463c5a+_0x51111a(0x170)+(_0x324690||'<new-name>')+_0x51111a(0xe3)+_0x24b9f3)});_0x2c2c8e=_0x4eb1d0,console['log'](a4_0x570f0d[_0x51111a(0xf8)]('Using\x20context\x20project:\x20'+_0x4eb1d0));}}}}if(!_0x2c2c8e)return console[_0x51111a(0xfc)](a4_0x570f0d[_0x51111a(0xdd)]('No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a')),console[_0x51111a(0xfc)](_0x51111a(0x145)),console[_0x51111a(0xfc)](_0x51111a(0x114)),console[_0x51111a(0xfc)]('\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)'),console[_0x51111a(0xfc)](_0x51111a(0x15c)),0x1;if(!_0x324690)throw new SDKError(ErrorCode[_0x51111a(0x12c)],'New\x20project\x20name\x20is\x20required',undefined,{'helpText':_0x51111a(0x16b)});if(!_0x17bf13&&!_0x309c05){if(!isInteractive())return console[_0x51111a(0x136)](a4_0x570f0d[_0x51111a(0xb4)](_0x51111a(0x14a)),_0x51111a(0xd0)),console[_0x51111a(0x136)](a4_0x570f0d[_0x51111a(0xf8)](_0x51111a(0xbc))),0x1;const _0x336e9c=await confirmKey(_0x51111a(0x12a)+_0x2c2c8e+_0x51111a(0x118)+_0x324690+'\x22?');if(!_0x336e9c)return console['log'](a4_0x570f0d[_0x51111a(0xdd)]('Cancelled')),0x1;}const {data:_0x4fc62d}=await withSpinner('Cloning\x20\x22'+_0x2c2c8e+'\x22\x20to\x20\x22'+_0x324690+_0x51111a(0xc3),()=>_0x4d2be9[_0x51111a(0xc0)][_0x51111a(0x102)](_0x2c2c8e,_0x324690,{'dryRun':_0x309c05}));if(_0x309c05){console[_0x51111a(0xfc)](a4_0x570f0d[_0x51111a(0xdd)](_0x51111a(0xc9))),console[_0x51111a(0xfc)](_0x51111a(0x171)+_0x4fc62d['sourceProjectName']),console['log'](_0x51111a(0x153)+_0x324690),console['log'](_0x51111a(0xc7)),console[_0x51111a(0xfc)](_0x51111a(0x15e)+_0x4fc62d[_0x51111a(0x157)]['agents'][_0x51111a(0x109)]),console[_0x51111a(0xfc)]('\x20\x20Knowledge\x20Bases:\x20'+_0x4fc62d['counts'][_0x51111a(0x115)][_0x51111a(0x109)]),console[_0x51111a(0xfc)](_0x51111a(0xca)+_0x4fc62d['counts'][_0x51111a(0xdc)]['created']),console[_0x51111a(0xfc)]('\x20\x20Form\x20Interfaces:\x20'+_0x4fc62d['counts'][_0x51111a(0x158)]['created']),console[_0x51111a(0xfc)](_0x51111a(0xb8)+_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x13e)]['created']);const _0x569fb0=_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x10f)][_0x51111a(0x109)]>0x0||_0x4fc62d['counts']['experimentalArtifacts'][_0x51111a(0x109)]>0x0;return _0x569fb0&&(console[_0x51111a(0xfc)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x10f)]['created']),console[_0x51111a(0xfc)](_0x51111a(0xf9)+_0x4fc62d[_0x51111a(0x157)][_0x51111a(0xcb)][_0x51111a(0x109)])),0x0;}const _0x3403bd=_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x173)][_0x51111a(0xd9)]>0x0||_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x115)]['errors']>0x0||_0x4fc62d[_0x51111a(0x157)][_0x51111a(0xdc)]['errors']>0x0||_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x158)]['errors']>0x0||_0x4fc62d['counts'][_0x51111a(0x13e)][_0x51111a(0xd9)]>0x0||_0x4fc62d[_0x51111a(0x157)]['experimentalKnowledgeBases'][_0x51111a(0xd9)]>0x0||_0x4fc62d['counts'][_0x51111a(0xcb)][_0x51111a(0xd9)]>0x0;_0x3403bd?console['log'](a4_0x570f0d[_0x51111a(0xdd)](_0x51111a(0xb9))):console[_0x51111a(0xfc)](a4_0x570f0d['green']('Project\x20cloned\x20successfully'));console[_0x51111a(0xfc)](_0x51111a(0x171)+_0x4fc62d[_0x51111a(0x117)]),console['log'](_0x51111a(0x153)+_0x4fc62d[_0x51111a(0xdb)]),console['log'](_0x51111a(0xff)+_0x4fc62d[_0x51111a(0xd1)]),console['log'](),console['log']('Summary:'),console[_0x51111a(0xfc)](_0x51111a(0x15e)+formatCountSummary(_0x4fc62d[_0x51111a(0x157)]['agents'])),console[_0x51111a(0xfc)](_0x51111a(0x11e)+formatCountSummary(_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x115)])),console[_0x51111a(0xfc)](_0x51111a(0xca)+formatCountSummary(_0x4fc62d[_0x51111a(0x157)]['prompts'])),console[_0x51111a(0xfc)](_0x51111a(0x113)+formatCountSummary(_0x4fc62d['counts']['integrations'])),console[_0x51111a(0xfc)]('\x20\x20Form\x20Interfaces:\x20'+formatCountSummary(_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x158)])),console[_0x51111a(0xfc)]('\x20\x20Chat\x20Interfaces:\x20'+formatCountSummary(_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x13e)]));const _0x1437af=_0x4fc62d[_0x51111a(0x157)][_0x51111a(0x10f)][_0x51111a(0x109)]>0x0||_0x4fc62d[_0x51111a(0x157)]['experimentalKnowledgeBases']['updated']>0x0||_0x4fc62d[_0x51111a(0x157)]['experimentalKnowledgeBases'][_0x51111a(0xd3)]>0x0||_0x4fc62d[_0x51111a(0x157)]['experimentalArtifacts']['created']>0x0||_0x4fc62d[_0x51111a(0x157)][_0x51111a(0xcb)][_0x51111a(0xcf)]>0x0||_0x4fc62d[_0x51111a(0x157)]['experimentalArtifacts'][_0x51111a(0xd3)]>0x0;_0x1437af&&(console[_0x51111a(0xfc)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x4fc62d[_0x51111a(0x157)]['experimentalKnowledgeBases'])),console['log'](_0x51111a(0xf9)+formatCountSummary(_0x4fc62d[_0x51111a(0x157)][_0x51111a(0xcb)])));if(_0x3403bd){console['log'](),console[_0x51111a(0xfc)](a4_0x570f0d[_0x51111a(0xb4)]('Errors:'));for(const _0x36d6a5 of _0x4fc62d[_0x51111a(0x173)]){_0x36d6a5['action']===_0x51111a(0x136)&&console[_0x51111a(0xfc)](a4_0x570f0d['red'](_0x51111a(0xf4)+_0x36d6a5[_0x51111a(0x128)]+_0x51111a(0x11c)+_0x36d6a5[_0x51111a(0x136)]));}for(const _0x32cf80 of _0x4fc62d['knowledgeBases']){_0x32cf80['action']==='error'&&console['log'](a4_0x570f0d[_0x51111a(0xb4)]('\x20\x20Knowledge\x20Base\x20\x22'+_0x32cf80[_0x51111a(0xf0)]+_0x51111a(0x11c)+_0x32cf80[_0x51111a(0x136)]));}for(const _0x4f0b9b of _0x4fc62d[_0x51111a(0xdc)]){_0x4f0b9b['action']===_0x51111a(0x136)&&console['log'](a4_0x570f0d[_0x51111a(0xb4)](_0x51111a(0x107)+_0x4f0b9b[_0x51111a(0xf0)]+_0x51111a(0x11c)+_0x4f0b9b[_0x51111a(0x136)]));}for(const _0x4f377a of _0x4fc62d[_0x51111a(0xf7)]){_0x4f377a[_0x51111a(0xbd)]===_0x51111a(0x136)&&console[_0x51111a(0xfc)](a4_0x570f0d[_0x51111a(0xb4)](_0x51111a(0x154)+_0x4f377a['name']+'\x22:\x20'+_0x4f377a[_0x51111a(0x136)]));}for(const _0xfb81ad of _0x4fc62d[_0x51111a(0x158)]){_0xfb81ad[_0x51111a(0xbd)]==='error'&&console[_0x51111a(0xfc)](a4_0x570f0d[_0x51111a(0xb4)](_0x51111a(0x10e)+_0xfb81ad[_0x51111a(0xf0)]+'\x22:\x20'+_0xfb81ad[_0x51111a(0x136)]));}for(const _0x39ece7 of _0x4fc62d[_0x51111a(0x13e)]){_0x39ece7[_0x51111a(0xbd)]===_0x51111a(0x136)&&console['log'](a4_0x570f0d[_0x51111a(0xb4)]('\x20\x20Chat\x20Interface\x20\x22'+_0x39ece7['name']+_0x51111a(0x11c)+_0x39ece7[_0x51111a(0x136)]));}for(const _0x36aac8 of _0x4fc62d[_0x51111a(0x10f)]){_0x36aac8[_0x51111a(0xbd)]===_0x51111a(0x136)&&console[_0x51111a(0xfc)](a4_0x570f0d['red'](_0x51111a(0x16d)+_0x36aac8[_0x51111a(0xf0)]+_0x51111a(0x11c)+_0x36aac8[_0x51111a(0x136)]));}for(const _0x2ef256 of _0x4fc62d['experimentalArtifacts']){_0x2ef256[_0x51111a(0xbd)]===_0x51111a(0x136)&&console[_0x51111a(0xfc)](a4_0x570f0d[_0x51111a(0xb4)](_0x51111a(0x138)+_0x2ef256[_0x51111a(0xf0)]+_0x51111a(0x11c)+_0x2ef256[_0x51111a(0x136)]));}return 0x1;}console[_0x51111a(0xfc)]();const _0x45193f=getLLMProjectUrl(_0x28ca90,_0x4fc62d['newProjectId']);return console['log'](_0x51111a(0xf5)+a4_0x570f0d[_0x51111a(0x146)](_0x45193f)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x304b07(0xf0)]=a4_0x304b07(0xec);[a4_0x304b07(0xc4)]=a4_0x304b07(0xb7);async[a4_0x304b07(0x123)](_0x212387){const _0x151d5b=a4_0x304b07,{options:_0x259121,args:_0x406281,tdx:_0x352582}=_0x212387;let _0x3e4ac9=_0x406281[0x0]||process[_0x151d5b(0xe2)]();const _0x1cf99b=_0x259121[_0x151d5b(0x137)],_0x5c228d=_0x259121['force'],_0x11b518=_0x259121[_0x151d5b(0x10d)],_0x1e4ecd=_0x259121[_0x151d5b(0x139)],_0x275c01=a4_0x5cf021[_0x151d5b(0x10a)](_0x3e4ac9,_0x151d5b(0x11b)),_0x5943c9=existsSync(_0x275c01);if(_0x5943c9){const {data:_0x28d142}=await withSpinner(_0x151d5b(0x14b)+_0x3e4ac9+_0x151d5b(0xc3),()=>_0x352582[_0x151d5b(0xc0)][_0x151d5b(0x121)](_0x3e4ac9,{'dryRun':_0x1cf99b,'force':_0x5c228d}));if(_0x1cf99b)return console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xdd)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x151d5b(0xfc)](_0x151d5b(0xe5)+_0x28d142['agentName']),0x0;if(_0x28d142['action']===_0x151d5b(0x136))return console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0xe7)+_0x28d142[_0x151d5b(0x136)])),0x1;console['log'](a4_0x570f0d['green']('Agent\x20'+_0x28d142[_0x151d5b(0xbd)]+_0x151d5b(0x13b))),console[_0x151d5b(0xfc)](_0x151d5b(0x159)+_0x28d142[_0x151d5b(0x128)]);if(_0x28d142['agentId']&&_0x28d142[_0x151d5b(0x175)]){const _0x14530a=getLLMAgentChatUrl(_0x1e4ecd,_0x28d142[_0x151d5b(0x175)],_0x28d142[_0x151d5b(0xc1)]);console[_0x151d5b(0xfc)](_0x151d5b(0x127)+a4_0x570f0d[_0x151d5b(0x146)](_0x14530a));}return 0x0;}const _0x21c659=_0x259121[_0x151d5b(0x106)],_0xdb50ed=resolveProjectFromContext(_0x3e4ac9,_0x21c659);if(_0xdb50ed[_0x151d5b(0xd2)])_0x3e4ac9=_0xdb50ed[_0x151d5b(0xfe)],_0xdb50ed[_0x151d5b(0xd4)]===_0x151d5b(0xb3)&&console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xf8)](_0x151d5b(0x108)+_0x3e4ac9));else{let _0x19f1b7=_0x151d5b(0x141);_0xdb50ed[_0x151d5b(0x140)]===_0x151d5b(0x105)&&(_0x19f1b7=_0xdb50ed[_0x151d5b(0xd5)]+_0x151d5b(0x163)+_0xdb50ed[_0x151d5b(0x106)]+_0x151d5b(0x135));throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0xdb50ed[_0x151d5b(0x140)]===_0x151d5b(0x100)?_0xdb50ed[_0x151d5b(0xd5)]:'No\x20tdx.json\x20found\x20in\x20'+_0x3e4ac9,undefined,{'helpText':_0x19f1b7});}const {data:_0x1e1d44}=await withSpinner(_0x151d5b(0xe0),()=>_0x352582[_0x151d5b(0xc0)]['pushProject'](_0x3e4ac9,{'dryRun':!![]})),_0x165941=_0x1e1d44['counts'][_0x151d5b(0x173)][_0x151d5b(0xd9)]>0x0;if(_0x165941){console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0x130)));for(const _0x224cf7 of _0x1e1d44['agents']){_0x224cf7['action']===_0x151d5b(0x136)&&console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)]('\x20\x20Agent\x20\x22'+_0x224cf7[_0x151d5b(0x128)]+_0x151d5b(0x11c)+_0x224cf7[_0x151d5b(0x136)]));}return 0x1;}const _0x5bdf65=_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x173)][_0x151d5b(0x109)]+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x115)]['created']+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x168)][_0x151d5b(0x109)]+_0x1e1d44[_0x151d5b(0x157)]['prompts']['created']+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xf7)][_0x151d5b(0x109)]+_0x1e1d44['counts'][_0x151d5b(0x10f)]['created']+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xcb)]['created']+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x158)][_0x151d5b(0x109)]+_0x1e1d44[_0x151d5b(0x157)]['chatInterfaces']['created'],_0x5bb1bb=_0x1e1d44['counts']['agents'][_0x151d5b(0xcf)]+_0x1e1d44['counts'][_0x151d5b(0x115)][_0x151d5b(0xcf)]+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x168)][_0x151d5b(0xcf)]+_0x1e1d44[_0x151d5b(0x157)]['prompts']['updated']+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xf7)][_0x151d5b(0xcf)]+_0x1e1d44[_0x151d5b(0x157)]['experimentalKnowledgeBases'][_0x151d5b(0xcf)]+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xcb)][_0x151d5b(0xcf)]+_0x1e1d44['counts'][_0x151d5b(0x158)][_0x151d5b(0xcf)]+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x13e)][_0x151d5b(0xcf)],_0x552f14=_0x1e1d44[_0x151d5b(0x157)]['agents'][_0x151d5b(0xd3)]+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x115)]['unchanged']+_0x1e1d44[_0x151d5b(0x157)]['textKnowledgeBases'][_0x151d5b(0xd3)]+_0x1e1d44[_0x151d5b(0x157)]['prompts'][_0x151d5b(0xd3)]+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xf7)][_0x151d5b(0xd3)]+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x10f)]['unchanged']+_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xcb)][_0x151d5b(0xd3)]+_0x1e1d44[_0x151d5b(0x157)]['formInterfaces'][_0x151d5b(0xd3)]+_0x1e1d44['counts'][_0x151d5b(0x13e)][_0x151d5b(0xd3)];console[_0x151d5b(0xfc)](_0x151d5b(0x152)+_0x1e1d44[_0x151d5b(0x14e)]+'\x27:'),console['log']('\x20\x20'+a4_0x570f0d['green']('+\x20'+_0x5bdf65+'\x20new')+_0x151d5b(0x14c)+a4_0x570f0d[_0x151d5b(0xdd)]('~\x20'+_0x5bb1bb+_0x151d5b(0xee))+'\x20|\x20'+a4_0x570f0d[_0x151d5b(0xf8)]('=\x20'+_0x552f14+'\x20unchanged')),console['log'](_0x151d5b(0x15e)+formatCountSummary(_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x173)])),console[_0x151d5b(0xfc)](_0x151d5b(0x11e)+formatCountSummary(_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x115)])),console[_0x151d5b(0xfc)](_0x151d5b(0x133)+formatCountSummary(_0x1e1d44['counts'][_0x151d5b(0x168)])),console[_0x151d5b(0xfc)](_0x151d5b(0xca)+formatCountSummary(_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xdc)])),console[_0x151d5b(0xfc)](_0x151d5b(0x113)+formatCountSummary(_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xf7)])),console[_0x151d5b(0xfc)](_0x151d5b(0x176)+formatCountSummary(_0x1e1d44['counts'][_0x151d5b(0x158)])),console['log'](_0x151d5b(0xb8)+formatCountSummary(_0x1e1d44['counts']['chatInterfaces']));const _0x2be2ae=_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x10f)]['created']>0x0||_0x1e1d44['counts'][_0x151d5b(0x10f)][_0x151d5b(0xcf)]>0x0||_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x10f)][_0x151d5b(0xd3)]>0x0||_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xcb)]['created']>0x0||_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xcb)][_0x151d5b(0xcf)]>0x0||_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0xcb)][_0x151d5b(0xd3)]>0x0;_0x2be2ae&&(console[_0x151d5b(0xfc)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x1e1d44[_0x151d5b(0x157)][_0x151d5b(0x10f)])),console[_0x151d5b(0xfc)]('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x1e1d44['counts'][_0x151d5b(0xcb)])));console['log'](_0x151d5b(0x132)+a4_0x570f0d['cyan'](_0x3e4ac9)),displayDiffs(_0x1e1d44[_0x151d5b(0x173)],_0x1e1d44[_0x151d5b(0x115)],_0x1e1d44[_0x151d5b(0x168)],_0x1e1d44[_0x151d5b(0xdc)],_0x1e1d44['integrations'],_0x1e1d44[_0x151d5b(0x10f)],_0x1e1d44[_0x151d5b(0xcb)],_0x1e1d44['formInterfaces'],_0x1e1d44[_0x151d5b(0x13e)]);if(_0x1cf99b)return console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xdd)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed')),0x0;if(_0x5bdf65===0x0&&_0x5bb1bb===0x0){console['log'](a4_0x570f0d[_0x151d5b(0x11a)](_0x151d5b(0x116)));const _0x4a6e66=getLLMProjectUrl(_0x1e4ecd,_0x1e1d44[_0x151d5b(0x175)]);return console[_0x151d5b(0xfc)](_0x151d5b(0xf5)+a4_0x570f0d[_0x151d5b(0x146)](_0x4a6e66)),0x0;}if(!_0x11b518&&!_0x5c228d){if(!isInteractive())return console['error'](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0x14a)),_0x151d5b(0xd0)),console[_0x151d5b(0x136)](a4_0x570f0d['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x56f5a4=await confirmKey(_0x151d5b(0xda)+(_0x5bdf65+_0x5bb1bb)+_0x151d5b(0xe8));if(!_0x56f5a4)return console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xdd)](_0x151d5b(0xcc)),_0x151d5b(0x112)),0x1;}const {data:_0x2b095d}=await withSpinner(_0x151d5b(0xe9),()=>_0x352582[_0x151d5b(0xc0)]['pushProject'](_0x3e4ac9,{'force':_0x5c228d})),_0x5b1b30=_0x2b095d[_0x151d5b(0x157)][_0x151d5b(0x173)][_0x151d5b(0xd9)]>0x0||_0x2b095d[_0x151d5b(0x157)][_0x151d5b(0x115)][_0x151d5b(0xd9)]>0x0||_0x2b095d[_0x151d5b(0x157)][_0x151d5b(0x168)]['errors']>0x0||_0x2b095d[_0x151d5b(0x157)][_0x151d5b(0xdc)]['errors']>0x0||_0x2b095d[_0x151d5b(0x157)][_0x151d5b(0x158)][_0x151d5b(0xd9)]>0x0||_0x2b095d[_0x151d5b(0x157)][_0x151d5b(0x13e)][_0x151d5b(0xd9)]>0x0;if(_0x5b1b30){console['log'](a4_0x570f0d[_0x151d5b(0xdd)](_0x151d5b(0xd7))),console[_0x151d5b(0xfc)](),console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0x149)));for(const _0x3823f5 of _0x2b095d[_0x151d5b(0x173)]){_0x3823f5[_0x151d5b(0xbd)]==='error'&&console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0xf4)+_0x3823f5[_0x151d5b(0x128)]+_0x151d5b(0x11c)+_0x3823f5[_0x151d5b(0x136)]));}for(const _0x592eb3 of _0x2b095d[_0x151d5b(0x115)]){_0x592eb3[_0x151d5b(0xbd)]===_0x151d5b(0x136)&&console[_0x151d5b(0xfc)](a4_0x570f0d['red']('\x20\x20Knowledge\x20Base\x20\x22'+_0x592eb3[_0x151d5b(0xf0)]+_0x151d5b(0x11c)+_0x592eb3[_0x151d5b(0x136)]));}for(const _0x15b6ac of _0x2b095d['textKnowledgeBases']){_0x15b6ac[_0x151d5b(0xbd)]==='error'&&console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0xea)+_0x15b6ac[_0x151d5b(0xf0)]+_0x151d5b(0x11c)+_0x15b6ac['error']));}for(const _0x23bdf6 of _0x2b095d['prompts']){_0x23bdf6[_0x151d5b(0xbd)]===_0x151d5b(0x136)&&console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0x107)+_0x23bdf6[_0x151d5b(0xf0)]+_0x151d5b(0x11c)+_0x23bdf6['error']));}for(const _0x1e9eec of _0x2b095d[_0x151d5b(0xf7)]){_0x1e9eec[_0x151d5b(0xbd)]==='error'&&console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)]('\x20\x20Integration\x20\x22'+_0x1e9eec['name']+_0x151d5b(0x11c)+_0x1e9eec[_0x151d5b(0x136)]));}for(const _0x1d23ed of _0x2b095d['formInterfaces']){_0x1d23ed[_0x151d5b(0xbd)]===_0x151d5b(0x136)&&console['log'](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0x10e)+_0x1d23ed['name']+'\x22:\x20'+_0x1d23ed[_0x151d5b(0x136)]));}for(const _0x3046d7 of _0x2b095d[_0x151d5b(0x13e)]){_0x3046d7[_0x151d5b(0xbd)]===_0x151d5b(0x136)&&console[_0x151d5b(0xfc)](a4_0x570f0d[_0x151d5b(0xb4)](_0x151d5b(0x119)+_0x3046d7[_0x151d5b(0xf0)]+'\x22:\x20'+_0x3046d7[_0x151d5b(0x136)]));}return 0x1;}console['log'](a4_0x570f0d['green']('\x0a✔\x20Pushed\x20'+(_0x5bdf65+_0x5bb1bb)+_0x151d5b(0x13d)+_0x2b095d[_0x151d5b(0x14e)]+'\x27'));const _0x945abd=getLLMProjectUrl(_0x1e4ecd,_0x2b095d['projectId']);return console['log'](_0x151d5b(0xf5)+a4_0x570f0d[_0x151d5b(0x146)](_0x945abd)),0x0;}}
1
+ function a4_0x16f2(_0x30832d,_0x380ce9){_0x30832d=_0x30832d-0x7b;const _0x13a8bf=a4_0x13a8();let _0x16f243=_0x13a8bf[_0x30832d];return _0x16f243;}const a4_0x3622c6=a4_0x16f2;(function(_0x49c9d6,_0x5a0e36){const _0x23db02=a4_0x16f2,_0x476db6=_0x49c9d6();while(!![]){try{const _0x58fd96=parseInt(_0x23db02(0xa7))/0x1*(-parseInt(_0x23db02(0xbe))/0x2)+-parseInt(_0x23db02(0x9c))/0x3+-parseInt(_0x23db02(0xdf))/0x4+-parseInt(_0x23db02(0xfe))/0x5*(parseInt(_0x23db02(0x7c))/0x6)+parseInt(_0x23db02(0xe7))/0x7+parseInt(_0x23db02(0xf8))/0x8+parseInt(_0x23db02(0xdd))/0x9*(parseInt(_0x23db02(0x92))/0xa);if(_0x58fd96===_0x5a0e36)break;else _0x476db6['push'](_0x476db6['shift']());}catch(_0x1c2029){_0x476db6['push'](_0x476db6['shift']());}}}(a4_0x13a8,0x7aaa8));import a4_0x2632f5 from'chalk';import a4_0x102520 from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';function a4_0x13a8(){const _0x53e74e=['\x20\x20Source:\x20','agentName','Analyzing\x20project\x20\x22','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','push','yes','\x20errors','Would\x20push\x20agent:\x20','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','green','no_context','\x20|\x20','prompts','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','<new-name>','cwd-config','Dry\x20run\x20-\x20no\x20files\x20written','Cannot\x20clone\x20from\x20context\x20project\x20\x22','\x20\x20Knowledge\x20Bases:\x20','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','\x20resources?','pushAgent','gray','Using\x20project\x20from\x20','agents','Pulling\x20agent\x20\x22','log','projectDir','counts','\x0aWrite\x20','total','\x20\x20Chat\x20Interfaces:\x20','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x20\x20Prompt\x20\x22','\x20\x20Form\x20Interfaces:\x20','formInterfaces','projectId','2342094qFTpZG','\x20--name\x20','\x20\x20Integration\x20\x22','tdx.json','\x20total','dirname','agent:pull','Pushing\x20to\x20project...','updated','Project:\x20','Using\x20local\x20project:\x20','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20files\x20to\x20','\x0aPull\x20summary\x20for\x20\x27','created','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)','sourceProjectName','llm','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','\x20updated','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','16987970HoAFZT','isNew','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','\x20\x20tdx\x20agent\x20pull\x20','knowledgeBases','Using\x20project:\x20','agent:clone','Dry\x20run\x20-\x20no\x20changes\x20made','Would\x20clone:','force','2285052lGTMUf','Agent\x20','\x20\x20Experimental\x20Artifacts:\x20','action','\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\x20Agents:\x20','New\x20project\x20ID:\x20','context','-\x20no\x20files\x20written','\x20\x20Integrations:\x20','llmProject','198LrTLmk','\x0aPush\x20summary\x20for\x20\x27','no_local_folder','newProjectId','Cancelled','cwd','Output\x20path:\x20','Cloning\x20\x22','\x20changed','\x20\x20Prompts:\x20','projectName','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','description','Source:\x20','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','\x20\x20Experimental\x20Artifact\x20\x22','yellow','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','new','unchanged','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','dim','Project\x20cloned\x20with\x20errors','5668VEpTzF','experimentalArtifacts','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','pullAgent','Using\x20context\x20project:\x20','cyan','session','Chat:\x20','\x20=\x20','\x20\x20Form\x20Interface\x20\x22','\x22...','\x22\x20from\x20project\x20\x22','chatInterfaces','\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','join','error','\x20\x20Chat\x20Interface\x20\x22','found','Writing\x20files...','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','diff','output','textKnowledgeBases','\x20\x20tdx\x20agent\x20clone\x20agents/','\x20successfully','reason','pullProject','\x20unchanged','errors','agent.yml','\x0aChanges\x20to\x20prompt\x20\x27','9pmZSFi','Using\x20project\x20from\x20context:\x20','2527644IGTeQO','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','Using\x20current\x20project:\x20','No\x20tdx.json\x20found\x20in\x20','Output:\x20','Clone\x20\x22','agentId','New\x20project:\x20','3855705tzsXtt','\x22:\x20','cloneProject','pushProject','red','-\x20nothing\x20pushed','\x22\x20to\x20a\x20different\x20profile','✔\x20Context\x20set:\x20','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','parse','llm_project','\x0aChanges\x20to\x20integration\x20\x27','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','\x20\x20Text\x20Knowledge\x20Bases:\x20','integrations','\x20\x20Agent\x20\x22','7906024XHlAiB','\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','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','Summary:','\x0aErrors\x20found:','experimentalKnowledgeBases','10WsAwHU','\x0aProject\x20pushed\x20with\x20errors','\x0aPush\x20','execute','\x20new','outputPath','utf-8','source','hasChanges','\x0aError:','\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','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','name','\x20created','dryRun','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Agent\x20pulled\x20successfully','repeat','\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','site','INVALID_ARGUMENT','\x20resources\x20to\x20\x27'];a4_0x13a8=function(){return _0x53e74e;};return a4_0x13a8();}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(_0xb421e0){const _0x46483c=a4_0x16f2,_0x23a270=[];if(_0xb421e0['total']!==undefined)_0x23a270['push'](_0xb421e0['total']+_0x46483c(0x80));if(_0xb421e0[_0x46483c(0xb9)]!==undefined&&_0xb421e0[_0x46483c(0xb9)]>0x0)_0x23a270['push'](a4_0x2632f5[_0x46483c(0x11d)](_0xb421e0[_0x46483c(0xb9)]+'\x20new'));if(_0xb421e0['created']!==undefined&&_0xb421e0['created']>0x0)_0x23a270['push'](a4_0x2632f5['green'](_0xb421e0[_0x46483c(0x8b)]+_0x46483c(0x10b)));if(_0xb421e0['updated']!==undefined&&_0xb421e0[_0x46483c(0x84)]>0x0)_0x23a270[_0x46483c(0x118)](a4_0x2632f5[_0x46483c(0xb7)](_0xb421e0[_0x46483c(0x84)]+_0x46483c(0x90)));if(_0xb421e0[_0x46483c(0xba)]!==undefined&&_0xb421e0[_0x46483c(0xba)]>0x0)_0x23a270['push'](a4_0x2632f5[_0x46483c(0x12a)](_0xb421e0[_0x46483c(0xba)]+'\x20unchanged'));if(_0xb421e0[_0x46483c(0xda)]!==undefined&&_0xb421e0[_0x46483c(0xda)]>0x0)_0x23a270['push'](a4_0x2632f5[_0x46483c(0xeb)](_0xb421e0[_0x46483c(0xda)]+_0x46483c(0x11a)));return _0x23a270[_0x46483c(0xcc)](',\x20');}function displayDiffs(_0x5167c6,_0x33a730,_0x986fb7,_0x578887,_0x195978,_0x5dbae9,_0x48fc96,_0x239f00,_0x195720){const _0x218eab=a4_0x16f2;for(const _0xa310af of _0x5167c6){if(_0xa310af[_0x218eab(0xd2)]){const _0x3601ee=_0xa310af['agentName']||_0xa310af[_0x218eab(0x10a)];console['log']('\x0aChanges\x20to\x20agent\x20\x27'+_0x3601ee+'\x27:'),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)),console[_0x218eab(0x12e)](_0xa310af[_0x218eab(0xd2)]),console[_0x218eab(0x12e)]('─'['repeat'](0x3c));}}for(const _0x55b9bc of _0x33a730){_0x55b9bc[_0x218eab(0xd2)]&&(console['log'](_0x218eab(0x109)+_0x55b9bc['name']+'\x27:'),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)),console[_0x218eab(0x12e)](_0x55b9bc['diff']),console[_0x218eab(0x12e)]('─'['repeat'](0x3c)));}for(const _0x1b9dab of _0x986fb7){_0x1b9dab[_0x218eab(0xd2)]&&(console[_0x218eab(0x12e)]('\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27'+_0x1b9dab[_0x218eab(0x10a)]+'\x27:'),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)),console['log'](_0x1b9dab[_0x218eab(0xd2)]),console['log']('─'['repeat'](0x3c)));}for(const _0xd75a7f of _0x578887){_0xd75a7f['diff']&&(console['log'](_0x218eab(0xdc)+_0xd75a7f[_0x218eab(0x10a)]+'\x27:'),console[_0x218eab(0x12e)]('─'['repeat'](0x3c)),console['log'](_0xd75a7f[_0x218eab(0xd2)]),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)));}for(const _0x2dfa36 of _0x195978){_0x2dfa36['diff']&&(console['log'](_0x218eab(0xf2)+_0x2dfa36[_0x218eab(0x10a)]+'\x27:'),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)),console[_0x218eab(0x12e)](_0x2dfa36[_0x218eab(0xd2)]),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)));}for(const _0x375694 of _0x5dbae9){_0x375694[_0x218eab(0xd2)]&&(console[_0x218eab(0x12e)](_0x218eab(0x134)+_0x375694[_0x218eab(0x10a)]+'\x27:'),console['log']('─'[_0x218eab(0x10f)](0x3c)),console[_0x218eab(0x12e)](_0x375694[_0x218eab(0xd2)]),console[_0x218eab(0x12e)]('─'['repeat'](0x3c)));}for(const _0x48d76a of _0x48fc96){_0x48d76a[_0x218eab(0xd2)]&&(console['log'](_0x218eab(0x121)+_0x48d76a[_0x218eab(0x10a)]+'\x27:'),console['log']('─'[_0x218eab(0x10f)](0x3c)),console[_0x218eab(0x12e)](_0x48d76a[_0x218eab(0xd2)]),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)));}for(const _0x35d4e8 of _0x239f00){_0x35d4e8[_0x218eab(0xd2)]&&(console[_0x218eab(0x12e)]('\x0aChanges\x20to\x20form\x20interface\x20\x27'+_0x35d4e8[_0x218eab(0x10a)]+'\x27:'),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)),console[_0x218eab(0x12e)](_0x35d4e8['diff']),console[_0x218eab(0x12e)]('─'['repeat'](0x3c)));}for(const _0x273b2a of _0x195720){_0x273b2a[_0x218eab(0xd2)]&&(console[_0x218eab(0x12e)]('\x0aChanges\x20to\x20chat\x20interface\x20\x27'+_0x273b2a[_0x218eab(0x10a)]+'\x27:'),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)),console[_0x218eab(0x12e)](_0x273b2a['diff']),console[_0x218eab(0x12e)]('─'[_0x218eab(0x10f)](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x3622c6(0x10a)]=a4_0x3622c6(0x82);[a4_0x3622c6(0xb3)]=a4_0x3622c6(0xef);async[a4_0x3622c6(0x101)](_0x250714){const _0x3c36bb=a4_0x3622c6,{options:_0x272b00,args:_0x586616,tdx:_0x38a973}=_0x250714,_0x1b33fb=_0x586616[0x0],_0x266330=_0x586616[0x1],_0xc21a4b=_0x272b00[_0x3c36bb(0xd3)],_0x5be9b4=_0x272b00['dryRun'],_0x21a47c=_0x272b00['force'],_0x323aee=_0x272b00['yes'],_0x1a0c2f=_0x272b00[_0x3c36bb(0xa6)],_0x72426b=_0x272b00['agent'];let _0xa4cf2b;if(_0x1b33fb){const _0x271415=a4_0x102520[_0x3c36bb(0xcc)](_0x1b33fb,_0x3c36bb(0x7f));if(existsSync(_0x271415))try{const _0x1a74bc=JSON[_0x3c36bb(0xf0)](readFileSync(_0x271415,_0x3c36bb(0x104)));_0x1a74bc[_0x3c36bb(0xf1)]&&(_0xa4cf2b={'llm_project':_0x1a74bc[_0x3c36bb(0xf1)]});}catch{}}const _0x459440=findAgentConfigPath(process['cwd']());let _0x2e396a;if(_0x459440)try{const _0x2ea2cf=JSON[_0x3c36bb(0xf0)](readFileSync(_0x459440,_0x3c36bb(0x104)));_0x2ea2cf[_0x3c36bb(0xf1)]&&(_0x2e396a={'llm_project':_0x2ea2cf[_0x3c36bb(0xf1)]});}catch{}const _0x1ba540=resolveAgentPullArgs({'arg':_0x1b33fb,'agentNameArg':_0x266330,'agentFlag':_0x72426b,'contextProject':_0x1a0c2f,'argDirConfig':_0xa4cf2b,'cwdConfigPath':_0x459440||undefined,'cwdConfig':_0x2e396a}),{projectNameOrId:_0x4ff38f,targetAgentName:_0x1ba9e4,existingOutputDir:_0x26b75b,source:_0x19b25b}=_0x1ba540;if(_0x19b25b==='arg-dir')console['log'](a4_0x2632f5[_0x3c36bb(0xbc)](_0x3c36bb(0x12b)+a4_0x102520['join'](_0x1b33fb,_0x3c36bb(0x7f))+':\x20'+_0x4ff38f));else{if(_0x19b25b===_0x3c36bb(0x123))console[_0x3c36bb(0x12e)](a4_0x2632f5[_0x3c36bb(0xbc)](_0x3c36bb(0x97)+_0x4ff38f));else _0x19b25b===_0x3c36bb(0xa3)&&console['log'](a4_0x2632f5[_0x3c36bb(0xbc)](_0x3c36bb(0xde)+_0x4ff38f));}if(!_0x4ff38f)return _0x72426b?(console[_0x3c36bb(0x12e)](a4_0x2632f5[_0x3c36bb(0xb7)](_0x3c36bb(0x8f))),console[_0x3c36bb(0x12e)](_0x3c36bb(0x87)),console[_0x3c36bb(0x12e)](_0x3c36bb(0xb2))):(console[_0x3c36bb(0x12e)](a4_0x2632f5['yellow'](_0x3c36bb(0xc0))),console[_0x3c36bb(0x12e)](_0x3c36bb(0x8c)),console['log'](_0x3c36bb(0xf9)),console['log'](_0x3c36bb(0xcb)),console[_0x3c36bb(0x12e)](_0x3c36bb(0x108)),console[_0x3c36bb(0x12e)](_0x3c36bb(0x110))),0x1;if(_0x1ba9e4){const {data:_0x2f5ca8}=await withSpinner(_0x3c36bb(0x12d)+_0x1ba9e4+_0x3c36bb(0xc9)+_0x4ff38f+_0x3c36bb(0xc8),()=>_0x38a973[_0x3c36bb(0x8e)][_0x3c36bb(0xc1)](_0x4ff38f,_0x1ba9e4,_0xc21a4b,{'dryRun':_0x5be9b4,'force':_0x21a47c}));if(_0x5be9b4)return console[_0x3c36bb(0x12e)](a4_0x2632f5[_0x3c36bb(0xb7)](_0x3c36bb(0x124))),console[_0x3c36bb(0x12e)]('Would\x20pull\x20agent:\x20'+_0x2f5ca8[_0x3c36bb(0x115)]),console['log'](_0x3c36bb(0xad)+_0x2f5ca8[_0x3c36bb(0x103)]),_0x2f5ca8[_0x3c36bb(0xd2)]&&(console[_0x3c36bb(0x12e)]('\x0aChanges:'),console[_0x3c36bb(0x12e)]('─'['repeat'](0x3c)),console[_0x3c36bb(0x12e)](_0x2f5ca8[_0x3c36bb(0xd2)]),console[_0x3c36bb(0x12e)]('─'[_0x3c36bb(0x10f)](0x3c))),0x0;return console[_0x3c36bb(0x12e)](a4_0x2632f5[_0x3c36bb(0x11d)](_0x3c36bb(0x10e))),console[_0x3c36bb(0x12e)]('Agent:\x20'+_0x2f5ca8['agentName']),console[_0x3c36bb(0x12e)](_0x3c36bb(0xe3)+_0x2f5ca8[_0x3c36bb(0x103)]),console['log']('Status:\x20'+(_0x2f5ca8[_0x3c36bb(0x93)]?a4_0x2632f5['green'](_0x3c36bb(0xb9)):_0x2f5ca8[_0x3c36bb(0x106)]?a4_0x2632f5[_0x3c36bb(0xb7)]('updated'):a4_0x2632f5[_0x3c36bb(0x12a)]('unchanged'))),0x0;}const _0x3736a2=_0x26b75b||_0xc21a4b,{data:_0x7b7d11}=await withSpinner(_0x3c36bb(0x116)+_0x4ff38f+'\x22...',()=>_0x38a973[_0x3c36bb(0x8e)][_0x3c36bb(0xd8)](_0x4ff38f,_0x3736a2,{'dryRun':!![]})),_0xfcbb29=_0x7b7d11['counts']['agents'][_0x3c36bb(0xb9)]+_0x7b7d11[_0x3c36bb(0x130)]['knowledgeBases'][_0x3c36bb(0xb9)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xd4)][_0x3c36bb(0xb9)]+_0x7b7d11['counts'][_0x3c36bb(0x120)][_0x3c36bb(0xb9)]+_0x7b7d11[_0x3c36bb(0x130)]['integrations'][_0x3c36bb(0xb9)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xfd)]['new']+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xbf)][_0x3c36bb(0xb9)]+_0x7b7d11['counts'][_0x3c36bb(0x138)][_0x3c36bb(0xb9)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xca)][_0x3c36bb(0xb9)],_0x2760ff=_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0x12c)]['updated']+_0x7b7d11['counts'][_0x3c36bb(0x96)][_0x3c36bb(0x84)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xd4)][_0x3c36bb(0x84)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0x120)][_0x3c36bb(0x84)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xf6)][_0x3c36bb(0x84)]+_0x7b7d11[_0x3c36bb(0x130)]['experimentalKnowledgeBases'][_0x3c36bb(0x84)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xbf)][_0x3c36bb(0x84)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0x138)][_0x3c36bb(0x84)]+_0x7b7d11['counts'][_0x3c36bb(0xca)][_0x3c36bb(0x84)],_0x44bac9=_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0x12c)][_0x3c36bb(0xba)]+_0x7b7d11[_0x3c36bb(0x130)]['knowledgeBases'][_0x3c36bb(0xba)]+_0x7b7d11[_0x3c36bb(0x130)]['textKnowledgeBases'][_0x3c36bb(0xba)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0x120)]['unchanged']+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xf6)]['unchanged']+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xfd)]['unchanged']+_0x7b7d11[_0x3c36bb(0x130)]['experimentalArtifacts']['unchanged']+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0x138)][_0x3c36bb(0xba)]+_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xca)][_0x3c36bb(0xba)];console[_0x3c36bb(0x12e)](_0x3c36bb(0x8a)+_0x7b7d11[_0x3c36bb(0xb1)]+'\x27:'),console['log']('\x20\x20'+a4_0x2632f5[_0x3c36bb(0x11d)]('+\x20'+_0xfcbb29+_0x3c36bb(0x102))+_0x3c36bb(0x11f)+a4_0x2632f5[_0x3c36bb(0xb7)]('~\x20'+_0x2760ff+_0x3c36bb(0xaf))+'\x20|\x20'+a4_0x2632f5[_0x3c36bb(0xbc)]('=\x20'+_0x44bac9+_0x3c36bb(0xd9))),console['log'](_0x3c36bb(0xa1)+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)]['agents'])),console['log']('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0x96)])),console[_0x3c36bb(0x12e)](_0x3c36bb(0xf5)+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xd4)])),console['log'](_0x3c36bb(0xb0)+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)]['prompts'])),console[_0x3c36bb(0x12e)](_0x3c36bb(0xa5)+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xf6)])),console[_0x3c36bb(0x12e)](_0x3c36bb(0x137)+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0x138)])),console['log'](_0x3c36bb(0x133)+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xca)]));const _0x4f09d9=_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xfd)][_0x3c36bb(0x132)]>0x0||_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xbf)][_0x3c36bb(0x132)]>0x0;_0x4f09d9&&(console[_0x3c36bb(0x12e)](_0x3c36bb(0x117)+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xfd)])),console[_0x3c36bb(0x12e)](_0x3c36bb(0x9e)+formatCountSummary(_0x7b7d11[_0x3c36bb(0x130)][_0x3c36bb(0xbf)])));console[_0x3c36bb(0x12e)]('\x20\x20Target:\x20'+a4_0x2632f5[_0x3c36bb(0xc3)](_0x7b7d11['outputDir'])),displayDiffs(_0x7b7d11[_0x3c36bb(0x12c)],_0x7b7d11[_0x3c36bb(0x96)],_0x7b7d11[_0x3c36bb(0xd4)],_0x7b7d11[_0x3c36bb(0x120)],_0x7b7d11[_0x3c36bb(0xf6)],_0x7b7d11['experimentalKnowledgeBases'],_0x7b7d11[_0x3c36bb(0xbf)],_0x7b7d11[_0x3c36bb(0x138)],_0x7b7d11[_0x3c36bb(0xca)]);if(_0x5be9b4)return console['log'](a4_0x2632f5['yellow']('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0xfcbb29===0x0&&_0x2760ff===0x0)return console[_0x3c36bb(0x12e)](a4_0x2632f5[_0x3c36bb(0x11d)]('\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'llm_project':_0x7b7d11['projectName']},_0x272b00['session']),console[_0x3c36bb(0x12e)](a4_0x2632f5[_0x3c36bb(0x11d)]('✔\x20Context\x20set:\x20'+a4_0x2632f5[_0x3c36bb(0xbc)](_0x3c36bb(0xf1))+_0x3c36bb(0xc6)+a4_0x2632f5[_0x3c36bb(0xc3)](_0x7b7d11[_0x3c36bb(0xb1)]))),0x0;if(!_0x323aee&&!_0x21a47c){if(!isInteractive())return console[_0x3c36bb(0xcd)](a4_0x2632f5[_0x3c36bb(0xeb)]('\x0aError:'),_0x3c36bb(0x88)),console['error'](a4_0x2632f5[_0x3c36bb(0xbc)](_0x3c36bb(0x10d))),0x1;const _0x54baef=await confirmKey(_0x3c36bb(0x131)+(_0xfcbb29+_0x2760ff)+'\x20files?');if(!_0x54baef)return console['log'](a4_0x2632f5[_0x3c36bb(0xb7)](_0x3c36bb(0xab)),_0x3c36bb(0xa4)),0x1;}const {data:_0xacd207}=await withSpinner(_0x3c36bb(0xd0),()=>_0x38a973[_0x3c36bb(0x8e)][_0x3c36bb(0xd8)](_0x4ff38f,_0x3736a2,{'force':_0x21a47c}));return console['log'](a4_0x2632f5[_0x3c36bb(0x11d)]('\x0a✔\x20Pulled\x20'+(_0xfcbb29+_0x2760ff)+_0x3c36bb(0x89)+_0xacd207['outputDir'])),saveSessionContext({'llm_project':_0xacd207[_0x3c36bb(0xb1)]},_0x272b00[_0x3c36bb(0xc4)]),console['log'](a4_0x2632f5['green'](_0x3c36bb(0xee)+a4_0x2632f5[_0x3c36bb(0xbc)](_0x3c36bb(0xf1))+_0x3c36bb(0xc6)+a4_0x2632f5[_0x3c36bb(0xc3)](_0xacd207[_0x3c36bb(0xb1)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x3622c6(0x10a)]=a4_0x3622c6(0x98);[a4_0x3622c6(0xb3)]=a4_0x3622c6(0xb5);async[a4_0x3622c6(0x101)](_0xb732d6){const _0x3d8262=a4_0x3622c6,{options:_0x491cae,args:_0x16e563,tdx:_0x793fd6}=_0xb732d6,_0x4f17e6=_0x16e563[0x0],_0x267f04=_0x491cae[_0x3d8262(0x10a)],_0x1215a1=_0x491cae['dryRun'],_0x5b159a=_0x491cae[_0x3d8262(0x119)],_0x494d4f=_0x491cae[_0x3d8262(0x111)],_0x3159b3=_0x491cae[_0x3d8262(0xa6)];let _0x3b4011;const _0x48ff68=findAgentConfigPath(process['cwd']());if(_0x4f17e6){const _0xcc3dda=a4_0x102520[_0x3d8262(0xcc)](_0x4f17e6,_0x3d8262(0x7f));existsSync(_0xcc3dda)?(_0x3b4011=_0x4f17e6,console[_0x3d8262(0x12e)](a4_0x2632f5[_0x3d8262(0xbc)](_0x3d8262(0x86)+_0x4f17e6))):_0x3b4011=_0x4f17e6;}else{if(_0x48ff68)_0x3b4011=a4_0x102520[_0x3d8262(0x81)](_0x48ff68),console[_0x3d8262(0x12e)](a4_0x2632f5[_0x3d8262(0xbc)](_0x3d8262(0xe1)+_0x3b4011));else{if(_0x3159b3){const _0x53db84=sanitizeForFilesystem(_0x3159b3);let _0x122f2f=_0x53db84,_0x2cef65=a4_0x102520[_0x3d8262(0xcc)](process[_0x3d8262(0xac)](),_0x3d8262(0x12c),_0x53db84,_0x3d8262(0x7f));if(!existsSync(_0x2cef65)){const _0x2ce745=normalizeName(_0x3159b3),_0x159399=a4_0x102520[_0x3d8262(0xcc)](process[_0x3d8262(0xac)](),_0x3d8262(0x12c),_0x2ce745,_0x3d8262(0x7f));existsSync(_0x159399)&&(_0x122f2f=_0x2ce745,_0x2cef65=_0x159399);}if(existsSync(_0x2cef65))_0x3b4011=a4_0x102520[_0x3d8262(0x81)](_0x2cef65),console[_0x3d8262(0x12e)](a4_0x2632f5['dim'](_0x3d8262(0x86)+_0x3b4011));else{const _0x59ca17=_0x491cae['profile'];if(_0x59ca17)throw new SDKError(ErrorCode[_0x3d8262(0x112)],_0x3d8262(0x125)+_0x3159b3+_0x3d8262(0xed),undefined,{'helpText':_0x3d8262(0xd1)+_0x3d8262(0x11c)+(_0x3d8262(0x95)+_0x3159b3+'\x0a')+(_0x3d8262(0xd5)+_0x122f2f+_0x3d8262(0x7d)+(_0x267f04||_0x3d8262(0x122))+'\x20--profile\x20'+_0x59ca17)});_0x3b4011=_0x3159b3,console[_0x3d8262(0x12e)](a4_0x2632f5['dim'](_0x3d8262(0xc2)+_0x3159b3));}}}}if(!_0x3b4011)return console[_0x3d8262(0x12e)](a4_0x2632f5['yellow'](_0x3d8262(0xe0))),console[_0x3d8262(0x12e)](_0x3d8262(0xfa)),console['log']('\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory'),console[_0x3d8262(0x12e)](_0x3d8262(0xa0)),console['log'](_0x3d8262(0xf4)),0x1;if(!_0x267f04)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],'New\x20project\x20name\x20is\x20required',undefined,{'helpText':_0x3d8262(0xbb)});if(!_0x5b159a&&!_0x1215a1){if(!isInteractive())return console['error'](a4_0x2632f5[_0x3d8262(0xeb)]('\x0aError:'),_0x3d8262(0x88)),console['error'](a4_0x2632f5['dim'](_0x3d8262(0x10d))),0x1;const _0x5a5ed8=await confirmKey(_0x3d8262(0xe4)+_0x3b4011+'\x22\x20to\x20new\x20project\x20\x22'+_0x267f04+'\x22?');if(!_0x5a5ed8)return console[_0x3d8262(0x12e)](a4_0x2632f5[_0x3d8262(0xb7)](_0x3d8262(0xab))),0x1;}const {data:_0x1d490b}=await withSpinner(_0x3d8262(0xae)+_0x3b4011+'\x22\x20to\x20\x22'+_0x267f04+_0x3d8262(0xc8),()=>_0x793fd6[_0x3d8262(0x8e)][_0x3d8262(0xe9)](_0x3b4011,_0x267f04,{'dryRun':_0x1215a1}));if(_0x1215a1){console[_0x3d8262(0x12e)](a4_0x2632f5[_0x3d8262(0xb7)](_0x3d8262(0x99))),console[_0x3d8262(0x12e)]('Source:\x20'+_0x1d490b['sourceProjectName']),console[_0x3d8262(0x12e)](_0x3d8262(0xe6)+_0x267f04),console[_0x3d8262(0x12e)](_0x3d8262(0x9a)),console[_0x3d8262(0x12e)](_0x3d8262(0xa1)+_0x1d490b['counts'][_0x3d8262(0x12c)][_0x3d8262(0x8b)]),console[_0x3d8262(0x12e)]('\x20\x20Knowledge\x20Bases:\x20'+_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0x96)][_0x3d8262(0x8b)]),console[_0x3d8262(0x12e)](_0x3d8262(0xb0)+_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0x120)]['created']),console[_0x3d8262(0x12e)](_0x3d8262(0x137)+_0x1d490b['counts'][_0x3d8262(0x138)][_0x3d8262(0x8b)]),console['log'](_0x3d8262(0x133)+_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xca)][_0x3d8262(0x8b)]);const _0x1a9605=_0x1d490b[_0x3d8262(0x130)]['experimentalKnowledgeBases']['created']>0x0||_0x1d490b['counts'][_0x3d8262(0xbf)][_0x3d8262(0x8b)]>0x0;return _0x1a9605&&(console['log']('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xfd)][_0x3d8262(0x8b)]),console['log'](_0x3d8262(0x9e)+_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xbf)][_0x3d8262(0x8b)])),0x0;}const _0x1b2501=_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0x12c)][_0x3d8262(0xda)]>0x0||_0x1d490b[_0x3d8262(0x130)]['knowledgeBases']['errors']>0x0||_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0x120)][_0x3d8262(0xda)]>0x0||_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0x138)][_0x3d8262(0xda)]>0x0||_0x1d490b[_0x3d8262(0x130)]['chatInterfaces']['errors']>0x0||_0x1d490b['counts'][_0x3d8262(0xfd)][_0x3d8262(0xda)]>0x0||_0x1d490b['counts'][_0x3d8262(0xbf)][_0x3d8262(0xda)]>0x0;_0x1b2501?console['log'](a4_0x2632f5['yellow'](_0x3d8262(0xbd))):console['log'](a4_0x2632f5[_0x3d8262(0x11d)]('Project\x20cloned\x20successfully'));console[_0x3d8262(0x12e)](_0x3d8262(0xb4)+_0x1d490b[_0x3d8262(0x8d)]),console[_0x3d8262(0x12e)]('New\x20project:\x20'+_0x1d490b['newProjectName']),console[_0x3d8262(0x12e)](_0x3d8262(0xa2)+_0x1d490b[_0x3d8262(0xaa)]),console[_0x3d8262(0x12e)](),console['log'](_0x3d8262(0xfb)),console[_0x3d8262(0x12e)](_0x3d8262(0xa1)+formatCountSummary(_0x1d490b[_0x3d8262(0x130)]['agents'])),console[_0x3d8262(0x12e)](_0x3d8262(0x126)+formatCountSummary(_0x1d490b['counts'][_0x3d8262(0x96)])),console[_0x3d8262(0x12e)](_0x3d8262(0xb0)+formatCountSummary(_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0x120)])),console[_0x3d8262(0x12e)](_0x3d8262(0xa5)+formatCountSummary(_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xf6)])),console[_0x3d8262(0x12e)]('\x20\x20Form\x20Interfaces:\x20'+formatCountSummary(_0x1d490b['counts'][_0x3d8262(0x138)])),console[_0x3d8262(0x12e)](_0x3d8262(0x133)+formatCountSummary(_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xca)]));const _0x5d9ccd=_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xfd)][_0x3d8262(0x8b)]>0x0||_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xfd)][_0x3d8262(0x84)]>0x0||_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xfd)]['unchanged']>0x0||_0x1d490b['counts'][_0x3d8262(0xbf)][_0x3d8262(0x8b)]>0x0||_0x1d490b[_0x3d8262(0x130)]['experimentalArtifacts'][_0x3d8262(0x84)]>0x0||_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xbf)][_0x3d8262(0xba)]>0x0;_0x5d9ccd&&(console['log'](_0x3d8262(0x117)+formatCountSummary(_0x1d490b[_0x3d8262(0x130)][_0x3d8262(0xfd)])),console[_0x3d8262(0x12e)](_0x3d8262(0x9e)+formatCountSummary(_0x1d490b['counts'][_0x3d8262(0xbf)])));if(_0x1b2501){console['log'](),console[_0x3d8262(0x12e)](a4_0x2632f5[_0x3d8262(0xeb)]('Errors:'));for(const _0x276147 of _0x1d490b[_0x3d8262(0x12c)]){_0x276147[_0x3d8262(0x9f)]===_0x3d8262(0xcd)&&console[_0x3d8262(0x12e)](a4_0x2632f5['red'](_0x3d8262(0xf7)+_0x276147[_0x3d8262(0x115)]+_0x3d8262(0xe8)+_0x276147[_0x3d8262(0xcd)]));}for(const _0x4f0e27 of _0x1d490b[_0x3d8262(0x96)]){_0x4f0e27[_0x3d8262(0x9f)]===_0x3d8262(0xcd)&&console[_0x3d8262(0x12e)](a4_0x2632f5['red']('\x20\x20Knowledge\x20Base\x20\x22'+_0x4f0e27[_0x3d8262(0x10a)]+_0x3d8262(0xe8)+_0x4f0e27['error']));}for(const _0x13ed7f of _0x1d490b[_0x3d8262(0x120)]){_0x13ed7f[_0x3d8262(0x9f)]===_0x3d8262(0xcd)&&console[_0x3d8262(0x12e)](a4_0x2632f5[_0x3d8262(0xeb)](_0x3d8262(0x136)+_0x13ed7f[_0x3d8262(0x10a)]+_0x3d8262(0xe8)+_0x13ed7f[_0x3d8262(0xcd)]));}for(const _0x51ca08 of _0x1d490b['integrations']){_0x51ca08[_0x3d8262(0x9f)]===_0x3d8262(0xcd)&&console[_0x3d8262(0x12e)](a4_0x2632f5[_0x3d8262(0xeb)]('\x20\x20Integration\x20\x22'+_0x51ca08[_0x3d8262(0x10a)]+_0x3d8262(0xe8)+_0x51ca08['error']));}for(const _0x2971e0 of _0x1d490b['formInterfaces']){_0x2971e0[_0x3d8262(0x9f)]===_0x3d8262(0xcd)&&console[_0x3d8262(0x12e)](a4_0x2632f5[_0x3d8262(0xeb)](_0x3d8262(0xc7)+_0x2971e0[_0x3d8262(0x10a)]+'\x22:\x20'+_0x2971e0['error']));}for(const _0x56089e of _0x1d490b[_0x3d8262(0xca)]){_0x56089e['action']===_0x3d8262(0xcd)&&console['log'](a4_0x2632f5[_0x3d8262(0xeb)](_0x3d8262(0xce)+_0x56089e[_0x3d8262(0x10a)]+_0x3d8262(0xe8)+_0x56089e['error']));}for(const _0x3f02ae of _0x1d490b[_0x3d8262(0xfd)]){_0x3f02ae[_0x3d8262(0x9f)]===_0x3d8262(0xcd)&&console['log'](a4_0x2632f5[_0x3d8262(0xeb)](_0x3d8262(0x94)+_0x3f02ae[_0x3d8262(0x10a)]+_0x3d8262(0xe8)+_0x3f02ae['error']));}for(const _0x36b893 of _0x1d490b[_0x3d8262(0xbf)]){_0x36b893[_0x3d8262(0x9f)]==='error'&&console['log'](a4_0x2632f5['red'](_0x3d8262(0xb6)+_0x36b893[_0x3d8262(0x10a)]+_0x3d8262(0xe8)+_0x36b893[_0x3d8262(0xcd)]));}return 0x1;}console[_0x3d8262(0x12e)]();const _0x29add2=getLLMProjectUrl(_0x494d4f,_0x1d490b['newProjectId']);return console['log']('Project:\x20'+a4_0x2632f5[_0x3d8262(0xc3)](_0x29add2)),0x0;}}export class AgentPushCommand extends BaseCommand{['name']='agent:push';[a4_0x3622c6(0xb3)]=a4_0x3622c6(0xb8);async['execute'](_0x32c95c){const _0x3f2c79=a4_0x3622c6,{options:_0x3a9c12,args:_0x28e090,tdx:_0xa2eef2}=_0x32c95c;let _0x18df78=_0x28e090[0x0]||process['cwd']();const _0x1feab5=_0x3a9c12[_0x3f2c79(0x10c)],_0x5dddd4=_0x3a9c12[_0x3f2c79(0x9b)],_0x2a47ac=_0x3a9c12['yes'],_0x4148a5=_0x3a9c12[_0x3f2c79(0x111)],_0x58682e=a4_0x102520[_0x3f2c79(0xcc)](_0x18df78,_0x3f2c79(0xdb)),_0x3501f1=existsSync(_0x58682e);if(_0x3501f1){const {data:_0x54bc1a}=await withSpinner('Pushing\x20agent\x20from\x20\x22'+_0x18df78+_0x3f2c79(0xc8),()=>_0xa2eef2[_0x3f2c79(0x8e)][_0x3f2c79(0x129)](_0x18df78,{'dryRun':_0x1feab5,'force':_0x5dddd4}));if(_0x1feab5)return console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xb7)](_0x3f2c79(0x99))),console[_0x3f2c79(0x12e)](_0x3f2c79(0x11b)+_0x54bc1a[_0x3f2c79(0x115)]),0x0;if(_0x54bc1a[_0x3f2c79(0x9f)]===_0x3f2c79(0xcd))return console['log'](a4_0x2632f5[_0x3f2c79(0xeb)]('Failed\x20to\x20push\x20agent:\x20'+_0x54bc1a[_0x3f2c79(0xcd)])),0x1;console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0x11d)](_0x3f2c79(0x9d)+_0x54bc1a[_0x3f2c79(0x9f)]+_0x3f2c79(0xd6))),console[_0x3f2c79(0x12e)]('Agent:\x20'+_0x54bc1a[_0x3f2c79(0x115)]);if(_0x54bc1a[_0x3f2c79(0xe5)]&&_0x54bc1a[_0x3f2c79(0x7b)]){const _0x1ac72a=getLLMAgentChatUrl(_0x4148a5,_0x54bc1a[_0x3f2c79(0x7b)],_0x54bc1a[_0x3f2c79(0xe5)]);console[_0x3f2c79(0x12e)](_0x3f2c79(0xc5)+a4_0x2632f5['cyan'](_0x1ac72a));}return 0x0;}const _0x19ed12=_0x3a9c12[_0x3f2c79(0xa6)],_0x1ab3c4=resolveProjectFromContext(_0x18df78,_0x19ed12);if(_0x1ab3c4[_0x3f2c79(0xcf)])_0x18df78=_0x1ab3c4[_0x3f2c79(0x12f)],_0x1ab3c4[_0x3f2c79(0x105)]==='context'&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xbc)](_0x3f2c79(0x97)+_0x18df78));else{let _0x595b09='Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.';_0x1ab3c4[_0x3f2c79(0xd7)]===_0x3f2c79(0xa9)&&(_0x595b09=_0x1ab3c4['message']+_0x3f2c79(0xf3)+_0x1ab3c4[_0x3f2c79(0xa6)]+'\x27\x20to\x20create\x20the\x20folder\x20structure.');throw new SDKError(ErrorCode[_0x3f2c79(0x112)],_0x1ab3c4[_0x3f2c79(0xd7)]===_0x3f2c79(0x11e)?_0x1ab3c4['message']:_0x3f2c79(0xe2)+_0x18df78,undefined,{'helpText':_0x595b09});}const {data:_0x1168f7}=await withSpinner('Analyzing\x20changes\x20to\x20push...',()=>_0xa2eef2['llm'][_0x3f2c79(0xea)](_0x18df78,{'dryRun':!![]})),_0x4e95f8=_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x12c)][_0x3f2c79(0xda)]>0x0;if(_0x4e95f8){console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)](_0x3f2c79(0xfc)));for(const _0x59d281 of _0x1168f7[_0x3f2c79(0x12c)]){_0x59d281[_0x3f2c79(0x9f)]===_0x3f2c79(0xcd)&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)](_0x3f2c79(0xf7)+_0x59d281['agentName']+'\x22:\x20'+_0x59d281[_0x3f2c79(0xcd)]));}return 0x1;}const _0x5d34df=_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x12c)][_0x3f2c79(0x8b)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x96)][_0x3f2c79(0x8b)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xd4)][_0x3f2c79(0x8b)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x120)][_0x3f2c79(0x8b)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xf6)][_0x3f2c79(0x8b)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xfd)][_0x3f2c79(0x8b)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xbf)][_0x3f2c79(0x8b)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x138)][_0x3f2c79(0x8b)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xca)]['created'],_0x252d52=_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x12c)]['updated']+_0x1168f7[_0x3f2c79(0x130)]['knowledgeBases'][_0x3f2c79(0x84)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xd4)][_0x3f2c79(0x84)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x120)]['updated']+_0x1168f7['counts'][_0x3f2c79(0xf6)]['updated']+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xfd)][_0x3f2c79(0x84)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xbf)][_0x3f2c79(0x84)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x138)]['updated']+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xca)][_0x3f2c79(0x84)],_0x1fff48=_0x1168f7['counts'][_0x3f2c79(0x12c)]['unchanged']+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x96)]['unchanged']+_0x1168f7['counts'][_0x3f2c79(0xd4)][_0x3f2c79(0xba)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x120)][_0x3f2c79(0xba)]+_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xf6)][_0x3f2c79(0xba)]+_0x1168f7['counts'][_0x3f2c79(0xfd)][_0x3f2c79(0xba)]+_0x1168f7['counts'][_0x3f2c79(0xbf)][_0x3f2c79(0xba)]+_0x1168f7['counts'][_0x3f2c79(0x138)][_0x3f2c79(0xba)]+_0x1168f7[_0x3f2c79(0x130)]['chatInterfaces']['unchanged'];console[_0x3f2c79(0x12e)](_0x3f2c79(0xa8)+_0x1168f7['projectName']+'\x27:'),console[_0x3f2c79(0x12e)]('\x20\x20'+a4_0x2632f5['green']('+\x20'+_0x5d34df+_0x3f2c79(0x102))+'\x20|\x20'+a4_0x2632f5[_0x3f2c79(0xb7)]('~\x20'+_0x252d52+_0x3f2c79(0xaf))+_0x3f2c79(0x11f)+a4_0x2632f5[_0x3f2c79(0xbc)]('=\x20'+_0x1fff48+'\x20unchanged')),console[_0x3f2c79(0x12e)](_0x3f2c79(0xa1)+formatCountSummary(_0x1168f7['counts']['agents'])),console[_0x3f2c79(0x12e)](_0x3f2c79(0x126)+formatCountSummary(_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x96)])),console['log'](_0x3f2c79(0xf5)+formatCountSummary(_0x1168f7['counts']['textKnowledgeBases'])),console[_0x3f2c79(0x12e)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0x120)])),console['log'](_0x3f2c79(0xa5)+formatCountSummary(_0x1168f7[_0x3f2c79(0x130)]['integrations'])),console[_0x3f2c79(0x12e)]('\x20\x20Form\x20Interfaces:\x20'+formatCountSummary(_0x1168f7['counts'][_0x3f2c79(0x138)])),console[_0x3f2c79(0x12e)]('\x20\x20Chat\x20Interfaces:\x20'+formatCountSummary(_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xca)]));const _0x17b9ed=_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xfd)][_0x3f2c79(0x8b)]>0x0||_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xfd)][_0x3f2c79(0x84)]>0x0||_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xfd)][_0x3f2c79(0xba)]>0x0||_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xbf)][_0x3f2c79(0x8b)]>0x0||_0x1168f7['counts'][_0x3f2c79(0xbf)][_0x3f2c79(0x84)]>0x0||_0x1168f7['counts'][_0x3f2c79(0xbf)][_0x3f2c79(0xba)]>0x0;_0x17b9ed&&(console[_0x3f2c79(0x12e)](_0x3f2c79(0x117)+formatCountSummary(_0x1168f7[_0x3f2c79(0x130)]['experimentalKnowledgeBases'])),console[_0x3f2c79(0x12e)](_0x3f2c79(0x9e)+formatCountSummary(_0x1168f7[_0x3f2c79(0x130)][_0x3f2c79(0xbf)])));console[_0x3f2c79(0x12e)](_0x3f2c79(0x114)+a4_0x2632f5[_0x3f2c79(0xc3)](_0x18df78)),displayDiffs(_0x1168f7['agents'],_0x1168f7[_0x3f2c79(0x96)],_0x1168f7[_0x3f2c79(0xd4)],_0x1168f7['prompts'],_0x1168f7[_0x3f2c79(0xf6)],_0x1168f7[_0x3f2c79(0xfd)],_0x1168f7[_0x3f2c79(0xbf)],_0x1168f7[_0x3f2c79(0x138)],_0x1168f7[_0x3f2c79(0xca)]);if(_0x1feab5)return console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xb7)](_0x3f2c79(0x127))),0x0;if(_0x5d34df===0x0&&_0x252d52===0x0){console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0x11d)](_0x3f2c79(0x91)));const _0x1d431b=getLLMProjectUrl(_0x4148a5,_0x1168f7['projectId']);return console[_0x3f2c79(0x12e)](_0x3f2c79(0x85)+a4_0x2632f5[_0x3f2c79(0xc3)](_0x1d431b)),0x0;}if(!_0x2a47ac&&!_0x5dddd4){if(!isInteractive())return console[_0x3f2c79(0xcd)](a4_0x2632f5[_0x3f2c79(0xeb)](_0x3f2c79(0x107)),_0x3f2c79(0x88)),console[_0x3f2c79(0xcd)](a4_0x2632f5[_0x3f2c79(0xbc)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x15dc7d=await confirmKey(_0x3f2c79(0x100)+(_0x5d34df+_0x252d52)+_0x3f2c79(0x128));if(!_0x15dc7d)return console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xb7)](_0x3f2c79(0xab)),_0x3f2c79(0xec)),0x1;}const {data:_0x36c9bb}=await withSpinner(_0x3f2c79(0x83),()=>_0xa2eef2[_0x3f2c79(0x8e)][_0x3f2c79(0xea)](_0x18df78,{'force':_0x5dddd4})),_0x4165a6=_0x36c9bb[_0x3f2c79(0x130)][_0x3f2c79(0x12c)]['errors']>0x0||_0x36c9bb[_0x3f2c79(0x130)]['knowledgeBases']['errors']>0x0||_0x36c9bb[_0x3f2c79(0x130)][_0x3f2c79(0xd4)][_0x3f2c79(0xda)]>0x0||_0x36c9bb[_0x3f2c79(0x130)]['prompts'][_0x3f2c79(0xda)]>0x0||_0x36c9bb[_0x3f2c79(0x130)][_0x3f2c79(0x138)][_0x3f2c79(0xda)]>0x0||_0x36c9bb[_0x3f2c79(0x130)][_0x3f2c79(0xca)][_0x3f2c79(0xda)]>0x0;if(_0x4165a6){console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xb7)](_0x3f2c79(0xff))),console[_0x3f2c79(0x12e)](),console['log'](a4_0x2632f5[_0x3f2c79(0xeb)]('Errors:'));for(const _0x11abe6 of _0x36c9bb[_0x3f2c79(0x12c)]){_0x11abe6[_0x3f2c79(0x9f)]===_0x3f2c79(0xcd)&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)](_0x3f2c79(0xf7)+_0x11abe6[_0x3f2c79(0x115)]+_0x3f2c79(0xe8)+_0x11abe6[_0x3f2c79(0xcd)]));}for(const _0x478f23 of _0x36c9bb['knowledgeBases']){_0x478f23[_0x3f2c79(0x9f)]===_0x3f2c79(0xcd)&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)]('\x20\x20Knowledge\x20Base\x20\x22'+_0x478f23[_0x3f2c79(0x10a)]+_0x3f2c79(0xe8)+_0x478f23[_0x3f2c79(0xcd)]));}for(const _0x55d057 of _0x36c9bb['textKnowledgeBases']){_0x55d057[_0x3f2c79(0x9f)]===_0x3f2c79(0xcd)&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)](_0x3f2c79(0x135)+_0x55d057[_0x3f2c79(0x10a)]+_0x3f2c79(0xe8)+_0x55d057[_0x3f2c79(0xcd)]));}for(const _0x13b287 of _0x36c9bb[_0x3f2c79(0x120)]){_0x13b287[_0x3f2c79(0x9f)]===_0x3f2c79(0xcd)&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)]('\x20\x20Prompt\x20\x22'+_0x13b287['name']+_0x3f2c79(0xe8)+_0x13b287['error']));}for(const _0x4def40 of _0x36c9bb['integrations']){_0x4def40[_0x3f2c79(0x9f)]===_0x3f2c79(0xcd)&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)](_0x3f2c79(0x7e)+_0x4def40[_0x3f2c79(0x10a)]+'\x22:\x20'+_0x4def40[_0x3f2c79(0xcd)]));}for(const _0x4e59d0 of _0x36c9bb[_0x3f2c79(0x138)]){_0x4e59d0[_0x3f2c79(0x9f)]===_0x3f2c79(0xcd)&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)](_0x3f2c79(0xc7)+_0x4e59d0['name']+'\x22:\x20'+_0x4e59d0['error']));}for(const _0xe8cbf9 of _0x36c9bb[_0x3f2c79(0xca)]){_0xe8cbf9['action']==='error'&&console[_0x3f2c79(0x12e)](a4_0x2632f5[_0x3f2c79(0xeb)](_0x3f2c79(0xce)+_0xe8cbf9['name']+_0x3f2c79(0xe8)+_0xe8cbf9[_0x3f2c79(0xcd)]));}return 0x1;}console['log'](a4_0x2632f5[_0x3f2c79(0x11d)]('\x0a✔\x20Pushed\x20'+(_0x5d34df+_0x252d52)+_0x3f2c79(0x113)+_0x36c9bb['projectName']+'\x27'));const _0x4d2717=getLLMProjectUrl(_0x4148a5,_0x36c9bb[_0x3f2c79(0x7b)]);return console[_0x3f2c79(0x12e)](_0x3f2c79(0x85)+a4_0x2632f5['cyan'](_0x4d2717)),0x0;}}
@@ -1 +1 @@
1
- const a5_0x1e5ecb=a5_0x1794;(function(_0xacb51d,_0x591704){const _0x3cf638=a5_0x1794,_0x25a851=_0xacb51d();while(!![]){try{const _0x57978f=parseInt(_0x3cf638(0x151))/0x1*(-parseInt(_0x3cf638(0x142))/0x2)+-parseInt(_0x3cf638(0x1af))/0x3*(parseInt(_0x3cf638(0x158))/0x4)+parseInt(_0x3cf638(0x1ab))/0x5*(-parseInt(_0x3cf638(0x15e))/0x6)+parseInt(_0x3cf638(0x17a))/0x7+parseInt(_0x3cf638(0x190))/0x8*(-parseInt(_0x3cf638(0x154))/0x9)+parseInt(_0x3cf638(0x180))/0xa+parseInt(_0x3cf638(0x16c))/0xb;if(_0x57978f===_0x591704)break;else _0x25a851['push'](_0x25a851['shift']());}catch(_0x38d97a){_0x25a851['push'](_0x25a851['shift']());}}}(a5_0x30af,0xf289a));import*as a5_0x27d879 from'node:fs';import*as a5_0x339138 from'node:path';function a5_0x1794(_0x58c4fb,_0x3c51e2){_0x58c4fb=_0x58c4fb-0x123;const _0x30af9a=a5_0x30af();let _0x1794a3=_0x30af9a[_0x58c4fb];return _0x1794a3;}function a5_0x30af(){const _0x377630=['green','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','⚠\x20SKIPPED:\x20','tsv','repeat',':\x20Sending\x20user\x20input...','Round\x20','has','Re-evaluating\x20cached\x20test\x20run...','Site:\x20','name','Test\x20Summary','Cached\x20run\x20from:\x20','test.yml','tests','log','Round\x201/','\x20\x20-\x20','Total:\x20\x20\x20\x20','Evaluating\x20response...','ERROR','reason','no_local_folder','Errors:\x20\x20\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','yellow','jsonl','not\x20found','dryRun','Agent:\x20','164918XrXvXa','\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)','map','basename','source','Run\x20\x27tdx\x20agent\x20pull\x20','\x22,\x20but\x20current\x20site\x20is\x20\x22','execute','llm','round','PASS','Failed\x20Tests:','resolve','✓\x20PASS:\x20','push','3jgXFAg','join','\x20-\x20','2653821ATlPyB','\x22:\x20','New\x20tests\x20to\x20execute:\x20','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','4sWhBmv','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','forEach','tags','Test\x20Configuration:','...','18xwPFMf','find','includes','now','resolveProjectId','text','\x20\x20Evaluating...\x20','start','Available\x20tests:\x20','table','description','no_tests','site','dim','20525076iLcVEB','Cached\x20run\x20is\x20from\x20site\x20\x22','existsSync','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','Error\x20writing\x20output\x20file:\x20','\x27\x20to\x20create\x20the\x20folder\x20structure.','message','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','Output\x20written\x20to:\x20','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','✗\x20ERROR:\x20','json','\x20(new)','agentName','10253558zAedFE','\x20\x20Round\x20','Tests\x20found:\x20','conversation_url','cyan','context','18563530vJXaFJ','length','status','stop','Running\x20test:\x20','agentDirs','\x20(cached)','\x20\x20Conversation:\x20','Project\x20path:\x20','Duration:\x20','✗\x20FAIL:\x20','\x20\x20Project:\x20','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','No\x20tests\x20have\x20tags\x20defined.','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','reeval','24KJPnWz','Re-evaluation\x20Summary','isSpinning','multiple_agents','Either\x20switch\x20to\x20the\x20\x22','FAIL','Failed:\x20\x20\x20','executeReeval','verbose','projectName','...\x20','Conversation\x20URL:\x20','llmProject','projectDir','utf-8','split','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','Error:\x20No\x20previous\x20test\x20run\x20found.','add','trim','red','resolveAgentId','✗\x20ERROR:\x20Project\x20not\x20found:\x20','no_context','writeFileSync','timestamp','No\x20tests\x20found\x20with\x20tags:\x20','1997705MLYovJ','filter','Running:\x20','toLowerCase','5589066iobRYl','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','white','substring','agent','404','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','toISOString','some','Running\x20agent\x20tests...','rounds'];a5_0x30af=function(){return _0x377630;};return a5_0x30af();}import a5_0xfc31eb 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';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{['name']='agent:test';[a5_0x1e5ecb(0x168)]='Run\x20tests\x20for\x20an\x20LLM\x20agent';async[a5_0x1e5ecb(0x149)](_0x3076fb){const _0x2e8aa1=a5_0x1e5ecb,{options:_0x219d2b,args:_0x170673,tdx:_0x910442}=_0x3076fb,_0x2244b0=_0x170673[0x0]||'.',_0x19fab6=_0x219d2b[_0x2e8aa1(0x140)],_0x1c5adb=_0x219d2b,_0x4055eb=_0x1c5adb['eval']===![],_0x3e7d91=_0x1c5adb[_0x2e8aa1(0x18f)],_0x5f0600=_0x1c5adb[_0x2e8aa1(0x12e)],_0x53d712=_0x1c5adb[_0x2e8aa1(0x15b)],_0x2bbed8=_0x219d2b[_0x2e8aa1(0x16a)],_0x4af663=_0x1c5adb['output'];if(_0x3e7d91&&_0x4055eb)return console['log'](a5_0xfc31eb[_0x2e8aa1(0x1a4)]('Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval')),0x1;let _0x1dac10='table';if(_0x1c5adb[_0x2e8aa1(0x177)])_0x1dac10='json';else{if(_0x1c5adb[_0x2e8aa1(0x13e)])_0x1dac10=_0x2e8aa1(0x13e);else{if(_0x1c5adb[_0x2e8aa1(0x127)])_0x1dac10=_0x2e8aa1(0x127);else{if(_0x1c5adb[_0x2e8aa1(0x167)])_0x1dac10='table';}}}const _0x5cbeaf=_0x1c5adb['llmProject'];let _0x2bb546=_0x2244b0;const _0x41983a=a5_0x27d879[_0x2e8aa1(0x16e)](_0x2244b0),_0xf967b9=_0x2244b0==='.';if(!_0x41983a||_0xf967b9){const _0x4325c1=resolveProjectFromContext(_0x2244b0,_0x5cbeaf,{'requireFile':_0x2e8aa1(0x131)});if(_0x4325c1['found'])_0x2bb546=_0x4325c1[_0x2e8aa1(0x19d)],_0x4325c1[_0x2e8aa1(0x146)]===_0x2e8aa1(0x17f)&&console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x16b)]('Using\x20agent:\x20'+_0x2bb546));else switch(_0x4325c1[_0x2e8aa1(0x139)]){case _0x2e8aa1(0x1a7):console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x13d)](_0x4325c1[_0x2e8aa1(0x172)])),console[_0x2e8aa1(0x133)](),console[_0x2e8aa1(0x133)]('Usage:'),console[_0x2e8aa1(0x133)]('\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'](_0x2e8aa1(0x143)),console[_0x2e8aa1(0x133)](),console[_0x2e8aa1(0x133)](_0x2e8aa1(0x18e));return 0x1;case _0x2e8aa1(0x13a):console[_0x2e8aa1(0x133)](a5_0xfc31eb['yellow'](_0x4325c1['message'])),console[_0x2e8aa1(0x133)](),console[_0x2e8aa1(0x133)](_0x2e8aa1(0x147)+_0x4325c1[_0x2e8aa1(0x19c)]+_0x2e8aa1(0x171));return 0x1;case _0x2e8aa1(0x193):{const _0x39dd2f=a5_0x339138[_0x2e8aa1(0x145)](_0x4325c1[_0x2e8aa1(0x19d)]);console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x13d)]('Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22'+_0x4325c1['llmProject']+'\x22:'));for(const _0x3dae0b of _0x4325c1[_0x2e8aa1(0x185)]){console[_0x2e8aa1(0x133)](_0x2e8aa1(0x135)+_0x3dae0b);}return console[_0x2e8aa1(0x133)](),console[_0x2e8aa1(0x133)](_0x2e8aa1(0x1b5)+_0x39dd2f+'/<agent-name>'),0x1;}case _0x2e8aa1(0x169):console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x13d)](_0x2e8aa1(0x159)+_0x4325c1[_0x2e8aa1(0x19c)]+'\x22.')),console[_0x2e8aa1(0x133)](a5_0xfc31eb['dim'](_0x2e8aa1(0x188)+_0x4325c1[_0x2e8aa1(0x19d)])),console['log'](),console['log'](_0x2e8aa1(0x18c));return 0x1;}}const {definition:_0x5df9e9,agentInfo:_0x1de020}=parseTestFile(_0x2bb546);let _0x5a2ba3=_0x5df9e9['tests'];if(_0x5f0600){const _0x20b0b0=_0x5f0600[_0x2e8aa1(0x19f)](',')[_0x2e8aa1(0x144)](_0x5021ec=>_0x5021ec['trim']());_0x5a2ba3=_0x5df9e9[_0x2e8aa1(0x132)][_0x2e8aa1(0x1ac)](_0x2fc5c6=>_0x20b0b0[_0x2e8aa1(0x160)](_0x2fc5c6[_0x2e8aa1(0x12e)]));if(_0x5a2ba3['length']===0x0)return console['log'](a5_0xfc31eb[_0x2e8aa1(0x13d)]('No\x20tests\x20found\x20matching:\x20'+_0x5f0600)),console[_0x2e8aa1(0x133)](a5_0xfc31eb['dim'](_0x2e8aa1(0x166)+_0x5df9e9[_0x2e8aa1(0x132)][_0x2e8aa1(0x144)](_0x4340b1=>_0x4340b1[_0x2e8aa1(0x12e)])[_0x2e8aa1(0x152)](',\x20'))),0x1;}if(_0x53d712){const _0x3a9d9e=_0x53d712[_0x2e8aa1(0x19f)](',')[_0x2e8aa1(0x144)](_0xd773f4=>_0xd773f4[_0x2e8aa1(0x1a3)]()[_0x2e8aa1(0x1ae)]());_0x5a2ba3=_0x5a2ba3[_0x2e8aa1(0x1ac)](_0x95adf6=>_0x95adf6[_0x2e8aa1(0x15b)]?.[_0x2e8aa1(0x1b7)](_0x455ba8=>_0x3a9d9e[_0x2e8aa1(0x160)](_0x455ba8['toLowerCase']())));if(_0x5a2ba3[_0x2e8aa1(0x181)]===0x0){console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x13d)](_0x2e8aa1(0x1aa)+_0x53d712));const _0x521d8a=new Set();return _0x5df9e9[_0x2e8aa1(0x132)][_0x2e8aa1(0x15a)](_0x53a23b=>_0x53a23b[_0x2e8aa1(0x15b)]?.[_0x2e8aa1(0x15a)](_0x6b30b7=>_0x521d8a[_0x2e8aa1(0x1a2)](_0x6b30b7))),_0x521d8a['size']>0x0?console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x16b)]('Available\x20tags:\x20'+[..._0x521d8a][_0x2e8aa1(0x152)](',\x20'))):console['log'](a5_0xfc31eb[_0x2e8aa1(0x16b)](_0x2e8aa1(0x18d))),0x1;}}if(_0x3e7d91)return this[_0x2e8aa1(0x197)](_0x3076fb,{'definition':{'tests':_0x5a2ba3},'agentInfo':_0x1de020,'outputFormat':_0x1dac10,'outputFile':_0x4af663,'testNames':_0x5f0600});if(_0x19fab6){console[_0x2e8aa1(0x133)](a5_0xfc31eb['cyan'](_0x2e8aa1(0x15c))),console[_0x2e8aa1(0x133)]('\x20\x20Site:\x20'+a5_0xfc31eb[_0x2e8aa1(0x1b1)](_0x2bbed8)),console['log'](_0x2e8aa1(0x18b)+a5_0xfc31eb[_0x2e8aa1(0x1b1)](_0x1de020[_0x2e8aa1(0x199)])),console[_0x2e8aa1(0x133)]('\x20\x20Agent:\x20'+a5_0xfc31eb['white'](_0x1de020[_0x2e8aa1(0x179)])),console['log'](),console[_0x2e8aa1(0x133)](_0x2e8aa1(0x17c)+a5_0xfc31eb['white'](_0x5a2ba3[_0x2e8aa1(0x181)]));for(let _0x548cdc=0x0;_0x548cdc<_0x5a2ba3[_0x2e8aa1(0x181)];_0x548cdc++){const _0x4e688b=_0x5a2ba3[_0x548cdc],_0x11d75a=_0x4e688b['rounds'][_0x2e8aa1(0x181)]===0x1?_0x2e8aa1(0x14b):_0x2e8aa1(0x123),_0x175165=_0x4e688b[_0x2e8aa1(0x15b)]?.[_0x2e8aa1(0x181)]?'\x20['+_0x4e688b[_0x2e8aa1(0x15b)][_0x2e8aa1(0x152)](',\x20')+']':'';console[_0x2e8aa1(0x133)]('\x20\x20'+(_0x548cdc+0x1)+'.\x20'+a5_0xfc31eb[_0x2e8aa1(0x1b1)](_0x4e688b['name'])+'\x20('+_0x4e688b[_0x2e8aa1(0x123)][_0x2e8aa1(0x181)]+'\x20'+_0x11d75a+')'+a5_0xfc31eb[_0x2e8aa1(0x16b)](_0x175165));}return 0x0;}let _0x3062ec,_0x3eae29;try{_0x3062ec=await _0x910442[_0x2e8aa1(0x14a)][_0x2e8aa1(0x162)](_0x1de020[_0x2e8aa1(0x199)]);}catch(_0x46618f){const _0x355986=_0x46618f instanceof Error?_0x46618f['message']:String(_0x46618f);return _0x355986[_0x2e8aa1(0x160)](_0x2e8aa1(0x1b4))||_0x355986[_0x2e8aa1(0x1ae)]()[_0x2e8aa1(0x160)](_0x2e8aa1(0x13f))?console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x1a4)](_0x2e8aa1(0x1a6)+_0x1de020['projectName'])):console['log'](a5_0xfc31eb[_0x2e8aa1(0x1a4)](_0x2e8aa1(0x13c)+_0x1de020[_0x2e8aa1(0x199)]+_0x2e8aa1(0x155)+_0x355986)),0x1;}try{_0x3eae29=await _0x910442[_0x2e8aa1(0x14a)][_0x2e8aa1(0x1a5)](_0x1de020[_0x2e8aa1(0x179)],_0x3062ec);}catch(_0xdbd4e5){const _0x9f8fd7=_0xdbd4e5 instanceof Error?_0xdbd4e5[_0x2e8aa1(0x172)]:String(_0xdbd4e5);return _0x9f8fd7[_0x2e8aa1(0x160)](_0x2e8aa1(0x1b4))||_0x9f8fd7[_0x2e8aa1(0x1ae)]()[_0x2e8aa1(0x160)]('not\x20found')?console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x1a4)](_0x2e8aa1(0x173)+_0x1de020['agentName'])):console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x1a4)]('✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22'+_0x1de020[_0x2e8aa1(0x179)]+_0x2e8aa1(0x155)+_0x9f8fd7)),0x1;}let _0x5717e2;if(!_0x4055eb)try{_0x5717e2=await setupEvaluatorAgent(_0x910442[_0x2e8aa1(0x14a)],_0x219d2b[_0x2e8aa1(0x198)]);}catch(_0x1e1da9){const _0x33573e=_0x1e1da9 instanceof Error?_0x1e1da9['message']:String(_0x1e1da9);return console[_0x2e8aa1(0x133)](a5_0xfc31eb['red'](_0x2e8aa1(0x175)+_0x33573e)),0x1;}console[_0x2e8aa1(0x133)](a5_0xfc31eb['cyan'](_0x2e8aa1(0x1b8))),console[_0x2e8aa1(0x133)](_0x2e8aa1(0x12d)+a5_0xfc31eb[_0x2e8aa1(0x1b1)](_0x2bbed8)),console[_0x2e8aa1(0x133)]('Agent:\x20'+a5_0xfc31eb[_0x2e8aa1(0x1b1)](_0x1de020[_0x2e8aa1(0x199)]+'/'+_0x1de020[_0x2e8aa1(0x179)])),console[_0x2e8aa1(0x133)]();const _0x277fb8=[],_0x20266a=[],_0x40bd51=Date[_0x2e8aa1(0x161)]();for(let _0x42d6b0=0x0;_0x42d6b0<_0x5a2ba3[_0x2e8aa1(0x181)];_0x42d6b0++){const _0x51c7b5=_0x5a2ba3[_0x42d6b0];_0x5a2ba3[_0x2e8aa1(0x181)]>0x1?console['log']('Test\x20'+(_0x42d6b0+0x1)+'/'+_0x5a2ba3[_0x2e8aa1(0x181)]+':\x20'+a5_0xfc31eb['white'](_0x51c7b5[_0x2e8aa1(0x12e)])):console[_0x2e8aa1(0x133)](_0x2e8aa1(0x184)+a5_0xfc31eb[_0x2e8aa1(0x1b1)](_0x51c7b5[_0x2e8aa1(0x12e)]));const _0x275d37=createCommandSpinner('Round\x201/'+_0x51c7b5[_0x2e8aa1(0x123)][_0x2e8aa1(0x181)]+_0x2e8aa1(0x129));_0x275d37[_0x2e8aa1(0x165)]();try{const {result:_0x46ef6d,conversation:_0x54bbbf}=await runTest(_0x910442[_0x2e8aa1(0x14a)],_0x51c7b5,{'agentId':_0x3eae29,'projectId':_0x3062ec,'site':_0x2bbed8,'noEval':_0x4055eb,'evaluatorId':_0x5717e2,'onRoundStart':(_0x492098,_0x107234)=>{const _0x28a648=_0x2e8aa1;_0x275d37[_0x28a648(0x163)]=_0x28a648(0x12a)+(_0x492098+0x1)+'/'+_0x107234+_0x28a648(0x129);},'onRoundComplete':(_0x9d0215,_0x2653e5,_0x355e68)=>{const _0x558d19=_0x2e8aa1,_0x3c7a77=formatElapsed(_0x2653e5);_0x355e68?console[_0x558d19(0x133)](_0x558d19(0x17b)+(_0x9d0215+0x1)+'/'+_0x51c7b5[_0x558d19(0x123)][_0x558d19(0x181)]+_0x558d19(0x19a)+a5_0xfc31eb[_0x558d19(0x124)]('✓')+'\x20('+_0x3c7a77+')'):console[_0x558d19(0x133)](_0x558d19(0x17b)+(_0x9d0215+0x1)+'/'+_0x51c7b5[_0x558d19(0x123)]['length']+_0x558d19(0x19a)+a5_0xfc31eb[_0x558d19(0x1a4)]('✗'));},'onEvaluationStart':()=>{const _0x59878b=_0x2e8aa1;_0x275d37['text']=_0x59878b(0x137);},'onEvaluationComplete':_0x37474a=>{const _0x2e02af=_0x2e8aa1,_0x39145e=formatElapsed(_0x37474a);console[_0x2e02af(0x133)]('\x20\x20Evaluating...\x20'+a5_0xfc31eb[_0x2e02af(0x124)]('✓')+'\x20('+_0x39145e+')');}});_0x275d37[_0x2e8aa1(0x183)](),_0x277fb8[_0x2e8aa1(0x150)](_0x46ef6d),_0x20266a['push'](_0x54bbbf);if(_0x46ef6d[_0x2e8aa1(0x182)]===_0x2e8aa1(0x14c))console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x124)](_0x2e8aa1(0x14f)+_0x46ef6d[_0x2e8aa1(0x139)]));else _0x46ef6d['status']===_0x2e8aa1(0x195)?console['log'](a5_0xfc31eb[_0x2e8aa1(0x1a4)](_0x2e8aa1(0x18a)+_0x46ef6d['reason'])):console['log'](a5_0xfc31eb[_0x2e8aa1(0x1a4)](_0x2e8aa1(0x176)+_0x46ef6d[_0x2e8aa1(0x139)]));_0x46ef6d[_0x2e8aa1(0x17d)]&&console['log'](a5_0xfc31eb[_0x2e8aa1(0x16b)](_0x2e8aa1(0x19b)+_0x46ef6d[_0x2e8aa1(0x17d)])),console[_0x2e8aa1(0x133)]();}catch(_0x5b378d){_0x275d37[_0x2e8aa1(0x183)]();const _0x3de5b5=_0x5b378d instanceof Error?_0x5b378d[_0x2e8aa1(0x172)]:String(_0x5b378d);console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x1a4)](_0x2e8aa1(0x176)+_0x3de5b5)),console[_0x2e8aa1(0x133)](),_0x277fb8[_0x2e8aa1(0x150)]({'name':_0x51c7b5[_0x2e8aa1(0x12e)],'status':'ERROR','reason':_0x3de5b5,'timestamp':new Date()[_0x2e8aa1(0x1b6)](),'duration_ms':0x0});}}const _0x207f13=Date[_0x2e8aa1(0x161)]()-_0x40bd51,_0x2533ad=_0x277fb8['filter'](_0x4ad79e=>_0x4ad79e[_0x2e8aa1(0x182)]===_0x2e8aa1(0x14c))[_0x2e8aa1(0x181)],_0x8df3b9=_0x277fb8['filter'](_0x16bc8b=>_0x16bc8b[_0x2e8aa1(0x182)]===_0x2e8aa1(0x195))['length'],_0x5135a0=_0x277fb8[_0x2e8aa1(0x1ac)](_0x364a1c=>_0x364a1c[_0x2e8aa1(0x182)]===_0x2e8aa1(0x138))['length'];console[_0x2e8aa1(0x133)]('━'[_0x2e8aa1(0x128)](0x3c)),console[_0x2e8aa1(0x133)](_0x2e8aa1(0x12f)),console[_0x2e8aa1(0x133)]('━'[_0x2e8aa1(0x128)](0x3c)),console[_0x2e8aa1(0x133)]('Total:\x20\x20\x20\x20'+_0x277fb8['length']),console[_0x2e8aa1(0x133)]('Passed:\x20\x20\x20'+a5_0xfc31eb[_0x2e8aa1(0x124)](_0x2533ad)),console[_0x2e8aa1(0x133)]('Failed:\x20\x20\x20'+a5_0xfc31eb[_0x2e8aa1(0x1a4)](_0x8df3b9));_0x5135a0>0x0&&console[_0x2e8aa1(0x133)](_0x2e8aa1(0x13b)+a5_0xfc31eb['red'](_0x5135a0));console[_0x2e8aa1(0x133)](_0x2e8aa1(0x189)+formatElapsed(_0x207f13)),console[_0x2e8aa1(0x133)]('━'[_0x2e8aa1(0x128)](0x3c));const _0x1e2179=_0x277fb8[_0x2e8aa1(0x1ac)](_0x3a98c3=>_0x3a98c3[_0x2e8aa1(0x182)]!=='PASS');if(_0x1e2179[_0x2e8aa1(0x181)]>0x0){console[_0x2e8aa1(0x133)](),console[_0x2e8aa1(0x133)](_0x2e8aa1(0x14d));for(const _0xb97cd5 of _0x1e2179){const _0x5f3410=a5_0xfc31eb[_0x2e8aa1(0x1a4)]('✗'),_0x59820a=_0xb97cd5[_0x2e8aa1(0x139)]['length']>0x32?_0xb97cd5[_0x2e8aa1(0x139)][_0x2e8aa1(0x1b2)](0x0,0x32)+_0x2e8aa1(0x15d):_0xb97cd5[_0x2e8aa1(0x139)];console[_0x2e8aa1(0x133)]('\x20\x20'+_0x5f3410+'\x20'+_0xb97cd5[_0x2e8aa1(0x12e)]+':\x20'+_0x59820a);}}const _0x286b8c={'summary':{'total':_0x277fb8[_0x2e8aa1(0x181)],'passed':_0x2533ad,'failed':_0x8df3b9,'errors':_0x5135a0>0x0?_0x5135a0:undefined,'duration_ms':_0x207f13},'tests':_0x277fb8,'agent':{'project':_0x1de020[_0x2e8aa1(0x199)],'name':_0x1de020[_0x2e8aa1(0x179)],'site':_0x2bbed8},'timestamp':new Date(_0x40bd51)[_0x2e8aa1(0x1b6)]()};try{const _0x1e5bc1=buildCachedTestRun(_0x20266a,{'site':_0x2bbed8,'projectId':_0x3062ec,'projectName':_0x1de020['projectName'],'agentId':_0x3eae29,'agentName':_0x1de020['agentName'],'testYmlPath':a5_0x339138[_0x2e8aa1(0x14e)](_0x1de020['testYmlPath'])});saveLastTestRun(_0x1e5bc1);}catch{}if(_0x1dac10!==_0x2e8aa1(0x167)||_0x4af663){const _0x10a08e=formatResults(_0x286b8c,_0x1dac10);if(_0x4af663)try{a5_0x27d879[_0x2e8aa1(0x1a8)](_0x4af663,_0x10a08e,'utf-8'),console[_0x2e8aa1(0x133)](),console[_0x2e8aa1(0x133)](a5_0xfc31eb[_0x2e8aa1(0x16b)](_0x2e8aa1(0x174)+_0x4af663));}catch(_0x466ab5){return console[_0x2e8aa1(0x133)](),console['log'](a5_0xfc31eb[_0x2e8aa1(0x1a4)](_0x2e8aa1(0x170)+_0x466ab5)),0x1;}else console[_0x2e8aa1(0x133)](),console[_0x2e8aa1(0x133)](_0x10a08e);}return _0x1e2179[_0x2e8aa1(0x181)]>0x0?0x1:0x0;}async[a5_0x1e5ecb(0x197)](_0x4ad707,_0x259879){const _0x33e249=a5_0x1e5ecb,{options:_0x223a9b,tdx:_0x4ba3a5}=_0x4ad707,{definition:_0x22782e,agentInfo:_0x506a76,outputFormat:_0xcd7dc1,outputFile:_0x43bd6c}=_0x259879,_0x4518c1=_0x223a9b['site'],_0x5cc914=loadLastTestRun();if(!_0x5cc914)return console[_0x33e249(0x133)](a5_0xfc31eb['red'](_0x33e249(0x1a1))),console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x16b)](_0x33e249(0x16f))),0x1;if(_0x5cc914['agent']['agentName']!==_0x506a76[_0x33e249(0x179)])return console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x1a4)](_0x33e249(0x1a0)+_0x5cc914[_0x33e249(0x1b3)][_0x33e249(0x179)]+_0x33e249(0x125)+_0x506a76['agentName']+'\x22.')),console['log'](a5_0xfc31eb[_0x33e249(0x16b)]('Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.')),0x1;const _0x461f47=new Set(_0x5cc914['conversations'][_0x33e249(0x144)](_0x5eb8cf=>_0x5eb8cf['testName'])),_0x33468b=_0x22782e[_0x33e249(0x132)][_0x33e249(0x1ac)](_0x5b4364=>!_0x461f47[_0x33e249(0x12b)](_0x5b4364[_0x33e249(0x12e)]));if(_0x33468b[_0x33e249(0x181)]>0x0&&_0x5cc914[_0x33e249(0x16a)]!==_0x4518c1)return console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x1a4)]('Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.')),console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x16b)](_0x33e249(0x16d)+_0x5cc914[_0x33e249(0x16a)]+_0x33e249(0x148)+_0x4518c1+'\x22.')),console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x16b)](_0x33e249(0x194)+_0x5cc914[_0x33e249(0x16a)]+_0x33e249(0x157))),0x1;const _0x2b0cf8=_0x22782e['tests'][_0x33e249(0x1ac)](_0x5af8c4=>_0x461f47['has'](_0x5af8c4['name'])),_0x267d9c=_0x33468b;let _0x1d64ea;try{_0x1d64ea=await setupEvaluatorAgent(_0x4ba3a5[_0x33e249(0x14a)],_0x223a9b[_0x33e249(0x198)]);}catch(_0x48b2a7){const _0x9bd94=_0x48b2a7 instanceof Error?_0x48b2a7[_0x33e249(0x172)]:String(_0x48b2a7);return console['log'](a5_0xfc31eb[_0x33e249(0x1a4)](_0x33e249(0x175)+_0x9bd94)),0x1;}console['log'](a5_0xfc31eb[_0x33e249(0x17e)](_0x33e249(0x12c))),console[_0x33e249(0x133)](_0x33e249(0x130)+a5_0xfc31eb['white'](_0x5cc914[_0x33e249(0x1a9)])),console[_0x33e249(0x133)](_0x33e249(0x141)+a5_0xfc31eb['white'](_0x5cc914[_0x33e249(0x1b3)][_0x33e249(0x199)]+'/'+_0x5cc914[_0x33e249(0x1b3)][_0x33e249(0x179)]));_0x267d9c['length']>0x0&&console['log'](_0x33e249(0x156)+a5_0xfc31eb['yellow'](_0x267d9c[_0x33e249(0x181)]));console['log']();const _0x1a8b45=[],_0x35eaee=Date[_0x33e249(0x161)](),_0x1d02a0=createCommandSpinner('Re-evaluating...');if(_0x2b0cf8[_0x33e249(0x181)]>0x0)try{const _0x25f489=await reevaluateFromCache(_0x4ba3a5[_0x33e249(0x14a)],_0x5cc914,{'tests':_0x2b0cf8},{'evaluatorId':_0x1d64ea,'onTestStart':(_0x135268,_0x735a7b,_0x565e87)=>{const _0x5f554f=_0x33e249;_0x1d02a0['text']='Re-evaluating\x20'+(_0x735a7b+0x1)+'/'+_0x565e87+':\x20'+_0x135268+'...';if(!_0x1d02a0[_0x5f554f(0x192)])_0x1d02a0[_0x5f554f(0x165)]();},'onTestComplete':(_0x32b479,_0x43ee64)=>{const _0x59cf74=_0x33e249;_0x1d02a0[_0x59cf74(0x183)]();if(_0x43ee64[_0x59cf74(0x182)]===_0x59cf74(0x14c))console[_0x59cf74(0x133)](a5_0xfc31eb['green'](_0x59cf74(0x14f)+_0x32b479)+a5_0xfc31eb[_0x59cf74(0x16b)](_0x59cf74(0x186)));else _0x43ee64['status']==='FAIL'?console[_0x59cf74(0x133)](a5_0xfc31eb['red']('✗\x20FAIL:\x20'+_0x32b479+_0x59cf74(0x153)+_0x43ee64['reason'])+a5_0xfc31eb[_0x59cf74(0x16b)](_0x59cf74(0x186))):console[_0x59cf74(0x133)](a5_0xfc31eb['red'](_0x59cf74(0x176)+_0x32b479+'\x20-\x20'+_0x43ee64['reason']));_0x43ee64[_0x59cf74(0x17d)]&&console[_0x59cf74(0x133)](a5_0xfc31eb[_0x59cf74(0x16b)](_0x59cf74(0x187)+_0x43ee64[_0x59cf74(0x17d)])),_0x1a8b45[_0x59cf74(0x150)](_0x43ee64);},'onTestSkipped':(_0xe141f9,_0x3c77da)=>{const _0xa54509=_0x33e249;_0x1d02a0[_0xa54509(0x183)](),console[_0xa54509(0x133)](a5_0xfc31eb[_0xa54509(0x13d)](_0xa54509(0x126)+_0xe141f9+'\x20-\x20'+_0x3c77da));}});for(const _0x1571cf of _0x25f489){!_0x1a8b45[_0x33e249(0x15f)](_0xab4dc5=>_0xab4dc5['name']===_0x1571cf[_0x33e249(0x12e)])&&_0x1a8b45[_0x33e249(0x150)](_0x1571cf);}}catch(_0x1158c9){_0x1d02a0[_0x33e249(0x183)]();const _0x3b2933=_0x1158c9 instanceof Error?_0x1158c9[_0x33e249(0x172)]:String(_0x1158c9);return console['log'](a5_0xfc31eb[_0x33e249(0x1a4)](_0x33e249(0x1b0)+_0x3b2933)),0x1;}_0x1d02a0[_0x33e249(0x183)]();if(_0x267d9c['length']>0x0){console[_0x33e249(0x133)](),console['log'](a5_0xfc31eb[_0x33e249(0x17e)]('Executing\x20new\x20tests...'));const {projectId:_0x5a3059,agentId:_0x5f350f}=_0x5cc914['agent'];for(const _0x2b1eac of _0x267d9c){console[_0x33e249(0x133)](_0x33e249(0x1ad)+a5_0xfc31eb[_0x33e249(0x1b1)](_0x2b1eac[_0x33e249(0x12e)]));const _0x311008=createCommandSpinner(_0x33e249(0x134)+_0x2b1eac[_0x33e249(0x123)]['length']+_0x33e249(0x129));_0x311008[_0x33e249(0x165)]();try{const {result:_0xfae631}=await runTest(_0x4ba3a5['llm'],_0x2b1eac,{'agentId':_0x5f350f,'projectId':_0x5a3059,'site':_0x5cc914['site'],'noEval':![],'evaluatorId':_0x1d64ea,'onRoundStart':(_0xc3d59d,_0x2c6a24)=>{const _0x297e0f=_0x33e249;_0x311008['text']=_0x297e0f(0x12a)+(_0xc3d59d+0x1)+'/'+_0x2c6a24+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x5ad906,_0x1f9461,_0xf3e06e)=>{const _0x562767=_0x33e249,_0x47dd7f=formatElapsed(_0x1f9461);_0xf3e06e?console['log'](_0x562767(0x17b)+(_0x5ad906+0x1)+'/'+_0x2b1eac['rounds'][_0x562767(0x181)]+'...\x20'+a5_0xfc31eb[_0x562767(0x124)]('✓')+'\x20('+_0x47dd7f+')'):console[_0x562767(0x133)](_0x562767(0x17b)+(_0x5ad906+0x1)+'/'+_0x2b1eac['rounds'][_0x562767(0x181)]+_0x562767(0x19a)+a5_0xfc31eb['red']('✗'));},'onEvaluationStart':()=>{const _0x4563b8=_0x33e249;_0x311008[_0x4563b8(0x163)]=_0x4563b8(0x137);},'onEvaluationComplete':_0x4bc5bf=>{const _0x30eb98=_0x33e249,_0x481467=formatElapsed(_0x4bc5bf);console['log'](_0x30eb98(0x164)+a5_0xfc31eb[_0x30eb98(0x124)]('✓')+'\x20('+_0x481467+')');}});_0x311008[_0x33e249(0x183)](),_0x1a8b45[_0x33e249(0x150)](_0xfae631);if(_0xfae631[_0x33e249(0x182)]==='PASS')console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x124)]('✓\x20PASS:\x20'+_0xfae631[_0x33e249(0x139)])+a5_0xfc31eb['dim'](_0x33e249(0x178)));else _0xfae631[_0x33e249(0x182)]===_0x33e249(0x195)?console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x1a4)](_0x33e249(0x18a)+_0xfae631[_0x33e249(0x139)])+a5_0xfc31eb['dim']('\x20(new)')):console['log'](a5_0xfc31eb[_0x33e249(0x1a4)]('✗\x20ERROR:\x20'+_0xfae631['reason']));_0xfae631['conversation_url']&&console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x16b)](_0x33e249(0x187)+_0xfae631[_0x33e249(0x17d)]));}catch(_0x20281f){_0x311008[_0x33e249(0x183)]();const _0xf1acb8=_0x20281f instanceof Error?_0x20281f[_0x33e249(0x172)]:String(_0x20281f);console[_0x33e249(0x133)](a5_0xfc31eb['red'](_0x33e249(0x176)+_0xf1acb8)),_0x1a8b45[_0x33e249(0x150)]({'name':_0x2b1eac[_0x33e249(0x12e)],'status':_0x33e249(0x138),'reason':_0xf1acb8,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}}console[_0x33e249(0x133)]();const _0x36afe2=Date[_0x33e249(0x161)]()-_0x35eaee,_0x1e9c7a=_0x1a8b45[_0x33e249(0x1ac)](_0x4a5682=>_0x4a5682[_0x33e249(0x182)]==='PASS')[_0x33e249(0x181)],_0x1fc2bc=_0x1a8b45[_0x33e249(0x1ac)](_0x440017=>_0x440017[_0x33e249(0x182)]==='FAIL')['length'],_0x59e255=_0x1a8b45[_0x33e249(0x1ac)](_0x16c299=>_0x16c299['status']==='ERROR')['length'];console[_0x33e249(0x133)]('━'['repeat'](0x3c)),console[_0x33e249(0x133)](_0x33e249(0x191)),console[_0x33e249(0x133)]('━'[_0x33e249(0x128)](0x3c)),console['log'](_0x33e249(0x136)+_0x1a8b45[_0x33e249(0x181)]),console[_0x33e249(0x133)]('Passed:\x20\x20\x20'+a5_0xfc31eb[_0x33e249(0x124)](_0x1e9c7a)),console['log'](_0x33e249(0x196)+a5_0xfc31eb[_0x33e249(0x1a4)](_0x1fc2bc));_0x59e255>0x0&&console[_0x33e249(0x133)](_0x33e249(0x13b)+a5_0xfc31eb[_0x33e249(0x1a4)](_0x59e255));console[_0x33e249(0x133)]('Duration:\x20'+formatElapsed(_0x36afe2)),console[_0x33e249(0x133)]('━'[_0x33e249(0x128)](0x3c));const _0x139a82={'summary':{'total':_0x1a8b45[_0x33e249(0x181)],'passed':_0x1e9c7a,'failed':_0x1fc2bc,'errors':_0x59e255>0x0?_0x59e255:undefined,'duration_ms':_0x36afe2},'tests':_0x1a8b45,'agent':{'project':_0x506a76['projectName'],'name':_0x506a76[_0x33e249(0x179)],'site':_0x4518c1},'timestamp':new Date(_0x35eaee)['toISOString']()};if(_0xcd7dc1!==_0x33e249(0x167)||_0x43bd6c){const _0x2b8fd4=formatResults(_0x139a82,_0xcd7dc1);if(_0x43bd6c)try{a5_0x27d879[_0x33e249(0x1a8)](_0x43bd6c,_0x2b8fd4,_0x33e249(0x19e)),console[_0x33e249(0x133)](),console[_0x33e249(0x133)](a5_0xfc31eb['dim'](_0x33e249(0x174)+_0x43bd6c));}catch(_0x2e91ba){return console[_0x33e249(0x133)](),console[_0x33e249(0x133)](a5_0xfc31eb[_0x33e249(0x1a4)]('Error\x20writing\x20output\x20file:\x20'+_0x2e91ba)),0x1;}else console[_0x33e249(0x133)](),console[_0x33e249(0x133)](_0x2b8fd4);}const _0x995ff2=_0x1a8b45[_0x33e249(0x1ac)](_0x5973ca=>_0x5973ca[_0x33e249(0x182)]!==_0x33e249(0x14c));return _0x995ff2[_0x33e249(0x181)]>0x0?0x1:0x0;}}
1
+ const a5_0x3af3c2=a5_0x5c7f;(function(_0x333229,_0x384949){const _0x36f947=a5_0x5c7f,_0x32a957=_0x333229();while(!![]){try{const _0x5f059b=parseInt(_0x36f947(0x1a0))/0x1*(-parseInt(_0x36f947(0x187))/0x2)+-parseInt(_0x36f947(0x1b6))/0x3+-parseInt(_0x36f947(0x1dd))/0x4+-parseInt(_0x36f947(0x17b))/0x5+parseInt(_0x36f947(0x1c5))/0x6+parseInt(_0x36f947(0x192))/0x7*(parseInt(_0x36f947(0x1c7))/0x8)+-parseInt(_0x36f947(0x1ed))/0x9*(-parseInt(_0x36f947(0x15b))/0xa);if(_0x5f059b===_0x384949)break;else _0x32a957['push'](_0x32a957['shift']());}catch(_0x21caa7){_0x32a957['push'](_0x32a957['shift']());}}}(a5_0x2a53,0x64c28));function a5_0x2a53(){const _0x53274c=['agentName','conversation_url','7joFNhu','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','projectDir','Error:\x20No\x20previous\x20test\x20run\x20found.','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','projectName','✗\x20ERROR:\x20','\x20\x20Project:\x20','PASS','FAIL','text','\x27\x20to\x20create\x20the\x20folder\x20structure.','Tests\x20found:\x20','tags','146578zbkMql','map','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','\x20(cached)','jsonl','source','not\x20found','Duration:\x20','Test\x20Configuration:','\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)','dryRun','resolve','Round\x201/','\x22:\x20','Available\x20tags:\x20','Failed\x20Tests:','Output\x20written\x20to:\x20','green','Failed:\x20\x20\x20','404','reeval','Re-evaluating...','729531AooHRK','repeat','message','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','start','site','forEach','\x22,\x20but\x20current\x20site\x20is\x20\x22',':\x20Sending\x20user\x20input...','Evaluating\x20response...','find','timestamp','Executing\x20new\x20tests...','eval','table','4163658FwsTdT','split','4623848zKRHxZ','toLowerCase','status','Either\x20switch\x20to\x20the\x20\x22','log','Running\x20test:\x20','\x20\x20-\x20','red','\x20\x20Evaluating...\x20','Conversation\x20URL:\x20','join','now','Agent:\x20','✓\x20PASS:\x20','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','cyan','context','trim','Errors:\x20\x20\x20','no_local_folder','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','Test\x20','1029540FUhdoL','Site:\x20','Running\x20agent\x20tests...','yellow','ERROR','writeFileSync','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','test.yml','rounds','Available\x20tests:\x20','multiple_agents','Passed:\x20\x20\x20','\x20-\x20','no_context','Re-evaluating\x20cached\x20test\x20run...','...\x20','444159OgEinH','dim','length','Re-evaluating\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','Run\x20tests\x20for\x20an\x20LLM\x20agent','✗\x20FAIL:\x20','tests','agent:test','reason','conversations','toISOString','70ozPPqi','filter','/<agent-name>','basename','...','⚠\x20SKIPPED:\x20','stop','includes','agent','\x20\x20Agent:\x20','New\x20tests\x20to\x20execute:\x20','has','description','llm','llmProject','white','name','Error\x20writing\x20output\x20file:\x20','resolveProjectId','Total:\x20\x20\x20\x20','testName','Run\x20\x27tdx\x20agent\x20pull\x20','add','push','Round\x20','json','verbose','size','\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','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','Cached\x20run\x20from:\x20','agentDirs','2787645TwTcdK','executeReeval','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','No\x20tests\x20found\x20matching:\x20','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','Usage:','utf-8','existsSync','\x20\x20Conversation:\x20','\x20\x20Round\x20','some','2TYrOhy','found','✗\x20ERROR:\x20Project\x20not\x20found:\x20','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','Cached\x20run\x20is\x20from\x20site\x20\x22','execute','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','no_tests','Using\x20agent:\x20'];a5_0x2a53=function(){return _0x53274c;};return a5_0x2a53();}import*as a5_0x4b70d2 from'node:fs';import*as a5_0x328980 from'node:path';import a5_0x1acfce from'chalk';import{BaseCommand}from'./command.js';function a5_0x5c7f(_0x9feecd,_0x1dab52){_0x9feecd=_0x9feecd-0x156;const _0x2a5326=a5_0x2a53();let _0x5c7fb7=_0x2a5326[_0x9feecd];return _0x5c7fb7;}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_0x3af3c2(0x16b)]=a5_0x3af3c2(0x157);[a5_0x3af3c2(0x167)]=a5_0x3af3c2(0x1f2);async[a5_0x3af3c2(0x18c)](_0x5a788e){const _0x33a6a0=a5_0x3af3c2,{options:_0x5d8784,args:_0x37764a,tdx:_0x499546}=_0x5a788e,_0x409e1e=_0x37764a[0x0]||'.',_0x5ea2cd=_0x5d8784[_0x33a6a0(0x1aa)],_0x2a3909=_0x5d8784,_0x16e749=_0x2a3909[_0x33a6a0(0x1c3)]===![],_0x2bcebc=_0x2a3909[_0x33a6a0(0x1b4)],_0x552e81=_0x2a3909[_0x33a6a0(0x16b)],_0x4fda8c=_0x2a3909['tags'],_0x5d55ae=_0x5d8784[_0x33a6a0(0x1bb)],_0x122e7f=_0x2a3909['output'];if(_0x2bcebc&&_0x16e749)return console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ce)](_0x33a6a0(0x17d))),0x1;let _0x519b32='table';if(_0x2a3909[_0x33a6a0(0x174)])_0x519b32=_0x33a6a0(0x174);else{if(_0x2a3909[_0x33a6a0(0x1a4)])_0x519b32=_0x33a6a0(0x1a4);else{if(_0x2a3909['tsv'])_0x519b32='tsv';else{if(_0x2a3909[_0x33a6a0(0x1c4)])_0x519b32=_0x33a6a0(0x1c4);}}}const _0x2addaf=_0x2a3909['llmProject'];let _0x86ce56=_0x409e1e;const _0x3ab527=a5_0x4b70d2[_0x33a6a0(0x183)](_0x409e1e),_0x499c7c=_0x409e1e==='.';if(!_0x3ab527||_0x499c7c){const _0x281420=resolveProjectFromContext(_0x409e1e,_0x2addaf,{'requireFile':_0x33a6a0(0x1e4)});if(_0x281420[_0x33a6a0(0x188)])_0x86ce56=_0x281420[_0x33a6a0(0x194)],_0x281420[_0x33a6a0(0x1a5)]===_0x33a6a0(0x1d7)&&console[_0x33a6a0(0x1cb)](a5_0x1acfce['dim'](_0x33a6a0(0x18f)+_0x86ce56));else switch(_0x281420[_0x33a6a0(0x158)]){case _0x33a6a0(0x1ea):console[_0x33a6a0(0x1cb)](a5_0x1acfce['yellow'](_0x281420[_0x33a6a0(0x1b8)])),console[_0x33a6a0(0x1cb)](),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x181)),console['log'](_0x33a6a0(0x177)),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1a9)),console['log'](),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x17e));return 0x1;case _0x33a6a0(0x1da):console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1e0)](_0x281420[_0x33a6a0(0x1b8)])),console[_0x33a6a0(0x1cb)](),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x170)+_0x281420['llmProject']+_0x33a6a0(0x19d));return 0x1;case _0x33a6a0(0x1e7):{const _0x4ac8de=a5_0x328980[_0x33a6a0(0x15e)](_0x281420['projectDir']);console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1e0)](_0x33a6a0(0x180)+_0x281420[_0x33a6a0(0x169)]+'\x22:'));for(const _0x35fe87 of _0x281420[_0x33a6a0(0x17a)]){console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1cd)+_0x35fe87);}return console['log'](),console['log'](_0x33a6a0(0x193)+_0x4ac8de+_0x33a6a0(0x15d)),0x1;}case _0x33a6a0(0x18e):console[_0x33a6a0(0x1cb)](a5_0x1acfce['yellow']('No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22'+_0x281420[_0x33a6a0(0x169)]+'\x22.')),console[_0x33a6a0(0x1cb)](a5_0x1acfce['dim']('Project\x20path:\x20'+_0x281420[_0x33a6a0(0x194)])),console[_0x33a6a0(0x1cb)](),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1d5));return 0x1;}}const {definition:_0x3d33e6,agentInfo:_0x530be9}=parseTestFile(_0x86ce56);let _0x1b23e9=_0x3d33e6[_0x33a6a0(0x156)];if(_0x552e81){const _0x283fa0=_0x552e81[_0x33a6a0(0x1c6)](',')[_0x33a6a0(0x1a1)](_0x36f28a=>_0x36f28a[_0x33a6a0(0x1d8)]());_0x1b23e9=_0x3d33e6[_0x33a6a0(0x156)][_0x33a6a0(0x15c)](_0x1c5e10=>_0x283fa0[_0x33a6a0(0x162)](_0x1c5e10['name']));if(_0x1b23e9[_0x33a6a0(0x1ef)]===0x0)return console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1e0)](_0x33a6a0(0x17f)+_0x552e81)),console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ee)](_0x33a6a0(0x1e6)+_0x3d33e6[_0x33a6a0(0x156)][_0x33a6a0(0x1a1)](_0x10c1d0=>_0x10c1d0[_0x33a6a0(0x16b)])[_0x33a6a0(0x1d1)](',\x20'))),0x1;}if(_0x4fda8c){const _0x43ed32=_0x4fda8c[_0x33a6a0(0x1c6)](',')[_0x33a6a0(0x1a1)](_0x3daf38=>_0x3daf38[_0x33a6a0(0x1d8)]()['toLowerCase']());_0x1b23e9=_0x1b23e9['filter'](_0x375e20=>_0x375e20[_0x33a6a0(0x19f)]?.[_0x33a6a0(0x186)](_0x14f749=>_0x43ed32[_0x33a6a0(0x162)](_0x14f749[_0x33a6a0(0x1c8)]())));if(_0x1b23e9[_0x33a6a0(0x1ef)]===0x0){console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1e0)]('No\x20tests\x20found\x20with\x20tags:\x20'+_0x4fda8c));const _0x140897=new Set();return _0x3d33e6[_0x33a6a0(0x156)][_0x33a6a0(0x1bc)](_0x2db13c=>_0x2db13c['tags']?.[_0x33a6a0(0x1bc)](_0x45b235=>_0x140897[_0x33a6a0(0x171)](_0x45b235))),_0x140897[_0x33a6a0(0x176)]>0x0?console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ee)](_0x33a6a0(0x1ae)+[..._0x140897][_0x33a6a0(0x1d1)](',\x20'))):console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ee)]('No\x20tests\x20have\x20tags\x20defined.')),0x1;}}if(_0x2bcebc)return this['executeReeval'](_0x5a788e,{'definition':{'tests':_0x1b23e9},'agentInfo':_0x530be9,'outputFormat':_0x519b32,'outputFile':_0x122e7f,'testNames':_0x552e81});if(_0x5ea2cd){console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1d6)](_0x33a6a0(0x1a8))),console[_0x33a6a0(0x1cb)]('\x20\x20Site:\x20'+a5_0x1acfce[_0x33a6a0(0x16a)](_0x5d55ae)),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x199)+a5_0x1acfce[_0x33a6a0(0x16a)](_0x530be9[_0x33a6a0(0x197)])),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x164)+a5_0x1acfce[_0x33a6a0(0x16a)](_0x530be9[_0x33a6a0(0x190)])),console[_0x33a6a0(0x1cb)](),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x19e)+a5_0x1acfce[_0x33a6a0(0x16a)](_0x1b23e9[_0x33a6a0(0x1ef)]));for(let _0x2ddd6a=0x0;_0x2ddd6a<_0x1b23e9['length'];_0x2ddd6a++){const _0x6c9932=_0x1b23e9[_0x2ddd6a],_0x414e67=_0x6c9932[_0x33a6a0(0x1e5)]['length']===0x1?'round':_0x33a6a0(0x1e5),_0x28f43f=_0x6c9932[_0x33a6a0(0x19f)]?.[_0x33a6a0(0x1ef)]?'\x20['+_0x6c9932[_0x33a6a0(0x19f)][_0x33a6a0(0x1d1)](',\x20')+']':'';console[_0x33a6a0(0x1cb)]('\x20\x20'+(_0x2ddd6a+0x1)+'.\x20'+a5_0x1acfce[_0x33a6a0(0x16a)](_0x6c9932[_0x33a6a0(0x16b)])+'\x20('+_0x6c9932[_0x33a6a0(0x1e5)][_0x33a6a0(0x1ef)]+'\x20'+_0x414e67+')'+a5_0x1acfce['dim'](_0x28f43f));}return 0x0;}let _0x359e79,_0x2e3851;try{_0x359e79=await _0x499546['llm'][_0x33a6a0(0x16d)](_0x530be9[_0x33a6a0(0x197)]);}catch(_0x3b2e46){const _0x1c6313=_0x3b2e46 instanceof Error?_0x3b2e46[_0x33a6a0(0x1b8)]:String(_0x3b2e46);return _0x1c6313[_0x33a6a0(0x162)](_0x33a6a0(0x1b3))||_0x1c6313['toLowerCase']()[_0x33a6a0(0x162)](_0x33a6a0(0x1a6))?console[_0x33a6a0(0x1cb)](a5_0x1acfce['red'](_0x33a6a0(0x189)+_0x530be9[_0x33a6a0(0x197)])):console['log'](a5_0x1acfce[_0x33a6a0(0x1ce)](_0x33a6a0(0x1db)+_0x530be9[_0x33a6a0(0x197)]+_0x33a6a0(0x1ad)+_0x1c6313)),0x1;}try{_0x2e3851=await _0x499546[_0x33a6a0(0x168)]['resolveAgentId'](_0x530be9[_0x33a6a0(0x190)],_0x359e79);}catch(_0xcb0d98){const _0x3c0192=_0xcb0d98 instanceof Error?_0xcb0d98[_0x33a6a0(0x1b8)]:String(_0xcb0d98);return _0x3c0192[_0x33a6a0(0x162)](_0x33a6a0(0x1b3))||_0x3c0192[_0x33a6a0(0x1c8)]()[_0x33a6a0(0x162)](_0x33a6a0(0x1a6))?console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ce)]('✗\x20ERROR:\x20Agent\x20not\x20found:\x20'+_0x530be9['agentName'])):console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ce)](_0x33a6a0(0x1f1)+_0x530be9[_0x33a6a0(0x190)]+_0x33a6a0(0x1ad)+_0x3c0192)),0x1;}let _0x5107fd;if(!_0x16e749)try{_0x5107fd=await setupEvaluatorAgent(_0x499546['llm'],_0x5d8784[_0x33a6a0(0x175)]);}catch(_0x5ba344){const _0x1445bc=_0x5ba344 instanceof Error?_0x5ba344['message']:String(_0x5ba344);return console['log'](a5_0x1acfce[_0x33a6a0(0x1ce)](_0x33a6a0(0x18d)+_0x1445bc)),0x1;}console[_0x33a6a0(0x1cb)](a5_0x1acfce['cyan'](_0x33a6a0(0x1df))),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1de)+a5_0x1acfce['white'](_0x5d55ae)),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1d3)+a5_0x1acfce[_0x33a6a0(0x16a)](_0x530be9[_0x33a6a0(0x197)]+'/'+_0x530be9[_0x33a6a0(0x190)])),console['log']();const _0x4ef3dc=[],_0x48790a=[],_0x29331e=Date[_0x33a6a0(0x1d2)]();for(let _0x2130d2=0x0;_0x2130d2<_0x1b23e9['length'];_0x2130d2++){const _0x55922d=_0x1b23e9[_0x2130d2];_0x1b23e9[_0x33a6a0(0x1ef)]>0x1?console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1dc)+(_0x2130d2+0x1)+'/'+_0x1b23e9['length']+':\x20'+a5_0x1acfce[_0x33a6a0(0x16a)](_0x55922d[_0x33a6a0(0x16b)])):console['log'](_0x33a6a0(0x1cc)+a5_0x1acfce[_0x33a6a0(0x16a)](_0x55922d[_0x33a6a0(0x16b)]));const _0x4bfd55=createCommandSpinner(_0x33a6a0(0x1ac)+_0x55922d[_0x33a6a0(0x1e5)][_0x33a6a0(0x1ef)]+':\x20Sending\x20user\x20input...');_0x4bfd55[_0x33a6a0(0x1ba)]();try{const {result:_0x54b1cc,conversation:_0x4f1e2e}=await runTest(_0x499546['llm'],_0x55922d,{'agentId':_0x2e3851,'projectId':_0x359e79,'site':_0x5d55ae,'noEval':_0x16e749,'evaluatorId':_0x5107fd,'onRoundStart':(_0x39d844,_0x27a9ba)=>{const _0x38d5e6=_0x33a6a0;_0x4bfd55['text']=_0x38d5e6(0x173)+(_0x39d844+0x1)+'/'+_0x27a9ba+_0x38d5e6(0x1be);},'onRoundComplete':(_0xa3496a,_0x381a87,_0x5f432e)=>{const _0x52f349=_0x33a6a0,_0x20a843=formatElapsed(_0x381a87);_0x5f432e?console[_0x52f349(0x1cb)]('\x20\x20Round\x20'+(_0xa3496a+0x1)+'/'+_0x55922d[_0x52f349(0x1e5)][_0x52f349(0x1ef)]+_0x52f349(0x1ec)+a5_0x1acfce['green']('✓')+'\x20('+_0x20a843+')'):console['log']('\x20\x20Round\x20'+(_0xa3496a+0x1)+'/'+_0x55922d['rounds'][_0x52f349(0x1ef)]+'...\x20'+a5_0x1acfce['red']('✗'));},'onEvaluationStart':()=>{const _0x3d52cd=_0x33a6a0;_0x4bfd55[_0x3d52cd(0x19c)]=_0x3d52cd(0x1bf);},'onEvaluationComplete':_0x4eee73=>{const _0x47aca2=_0x33a6a0,_0xe36a0b=formatElapsed(_0x4eee73);console[_0x47aca2(0x1cb)]('\x20\x20Evaluating...\x20'+a5_0x1acfce[_0x47aca2(0x1b1)]('✓')+'\x20('+_0xe36a0b+')');}});_0x4bfd55[_0x33a6a0(0x161)](),_0x4ef3dc[_0x33a6a0(0x172)](_0x54b1cc),_0x48790a[_0x33a6a0(0x172)](_0x4f1e2e);if(_0x54b1cc[_0x33a6a0(0x1c9)]===_0x33a6a0(0x19a))console[_0x33a6a0(0x1cb)](a5_0x1acfce['green'](_0x33a6a0(0x1d4)+_0x54b1cc[_0x33a6a0(0x158)]));else _0x54b1cc[_0x33a6a0(0x1c9)]===_0x33a6a0(0x19b)?console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ce)](_0x33a6a0(0x1f3)+_0x54b1cc[_0x33a6a0(0x158)])):console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ce)]('✗\x20ERROR:\x20'+_0x54b1cc[_0x33a6a0(0x158)]));_0x54b1cc[_0x33a6a0(0x191)]&&console[_0x33a6a0(0x1cb)](a5_0x1acfce['dim'](_0x33a6a0(0x1d0)+_0x54b1cc[_0x33a6a0(0x191)])),console[_0x33a6a0(0x1cb)]();}catch(_0x2f97b3){_0x4bfd55[_0x33a6a0(0x161)]();const _0x130fa6=_0x2f97b3 instanceof Error?_0x2f97b3['message']:String(_0x2f97b3);console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ce)]('✗\x20ERROR:\x20'+_0x130fa6)),console[_0x33a6a0(0x1cb)](),_0x4ef3dc['push']({'name':_0x55922d[_0x33a6a0(0x16b)],'status':_0x33a6a0(0x1e1),'reason':_0x130fa6,'timestamp':new Date()[_0x33a6a0(0x15a)](),'duration_ms':0x0});}}const _0x536cf1=Date['now']()-_0x29331e,_0x19b60e=_0x4ef3dc[_0x33a6a0(0x15c)](_0x36fe04=>_0x36fe04['status']==='PASS')[_0x33a6a0(0x1ef)],_0x9e8042=_0x4ef3dc['filter'](_0x2a29c8=>_0x2a29c8[_0x33a6a0(0x1c9)]===_0x33a6a0(0x19b))[_0x33a6a0(0x1ef)],_0x36d332=_0x4ef3dc[_0x33a6a0(0x15c)](_0x1272ef=>_0x1272ef['status']===_0x33a6a0(0x1e1))[_0x33a6a0(0x1ef)];console[_0x33a6a0(0x1cb)]('━'[_0x33a6a0(0x1b7)](0x3c)),console['log']('Test\x20Summary'),console['log']('━'[_0x33a6a0(0x1b7)](0x3c)),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x16e)+_0x4ef3dc['length']),console['log'](_0x33a6a0(0x1e8)+a5_0x1acfce[_0x33a6a0(0x1b1)](_0x19b60e)),console['log']('Failed:\x20\x20\x20'+a5_0x1acfce['red'](_0x9e8042));_0x36d332>0x0&&console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1d9)+a5_0x1acfce['red'](_0x36d332));console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1a7)+formatElapsed(_0x536cf1)),console[_0x33a6a0(0x1cb)]('━'['repeat'](0x3c));const _0x460825=_0x4ef3dc[_0x33a6a0(0x15c)](_0xdfbef7=>_0xdfbef7['status']!=='PASS');if(_0x460825[_0x33a6a0(0x1ef)]>0x0){console[_0x33a6a0(0x1cb)](),console[_0x33a6a0(0x1cb)](_0x33a6a0(0x1af));for(const _0x1ef427 of _0x460825){const _0x21e911=a5_0x1acfce[_0x33a6a0(0x1ce)]('✗'),_0x430085=_0x1ef427[_0x33a6a0(0x158)][_0x33a6a0(0x1ef)]>0x32?_0x1ef427[_0x33a6a0(0x158)]['substring'](0x0,0x32)+_0x33a6a0(0x15f):_0x1ef427[_0x33a6a0(0x158)];console[_0x33a6a0(0x1cb)]('\x20\x20'+_0x21e911+'\x20'+_0x1ef427[_0x33a6a0(0x16b)]+':\x20'+_0x430085);}}const _0x4ba06d={'summary':{'total':_0x4ef3dc[_0x33a6a0(0x1ef)],'passed':_0x19b60e,'failed':_0x9e8042,'errors':_0x36d332>0x0?_0x36d332:undefined,'duration_ms':_0x536cf1},'tests':_0x4ef3dc,'agent':{'project':_0x530be9[_0x33a6a0(0x197)],'name':_0x530be9[_0x33a6a0(0x190)],'site':_0x5d55ae},'timestamp':new Date(_0x29331e)['toISOString']()};try{const _0x297cbf=buildCachedTestRun(_0x48790a,{'site':_0x5d55ae,'projectId':_0x359e79,'projectName':_0x530be9[_0x33a6a0(0x197)],'agentId':_0x2e3851,'agentName':_0x530be9[_0x33a6a0(0x190)],'testYmlPath':a5_0x328980[_0x33a6a0(0x1ab)](_0x530be9['testYmlPath'])});saveLastTestRun(_0x297cbf);}catch{}if(_0x519b32!=='table'||_0x122e7f){const _0x58e79e=formatResults(_0x4ba06d,_0x519b32);if(_0x122e7f)try{a5_0x4b70d2['writeFileSync'](_0x122e7f,_0x58e79e,_0x33a6a0(0x182)),console[_0x33a6a0(0x1cb)](),console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ee)]('Output\x20written\x20to:\x20'+_0x122e7f));}catch(_0x294336){return console[_0x33a6a0(0x1cb)](),console[_0x33a6a0(0x1cb)](a5_0x1acfce[_0x33a6a0(0x1ce)](_0x33a6a0(0x16c)+_0x294336)),0x1;}else console['log'](),console['log'](_0x58e79e);}return _0x460825[_0x33a6a0(0x1ef)]>0x0?0x1:0x0;}async[a5_0x3af3c2(0x17c)](_0x137edc,_0x5f1503){const _0x31dbf2=a5_0x3af3c2,{options:_0x57d96b,tdx:_0x582a7d}=_0x137edc,{definition:_0x37256f,agentInfo:_0x20614b,outputFormat:_0x385354,outputFile:_0x4d33a7}=_0x5f1503,_0x1c6e97=_0x57d96b['site'],_0x475728=loadLastTestRun();if(!_0x475728)return console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1ce)](_0x31dbf2(0x195))),console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1ee)](_0x31dbf2(0x196))),0x1;if(_0x475728[_0x31dbf2(0x163)][_0x31dbf2(0x190)]!==_0x20614b[_0x31dbf2(0x190)])return console[_0x31dbf2(0x1cb)](a5_0x1acfce['red'](_0x31dbf2(0x1a2)+_0x475728[_0x31dbf2(0x163)][_0x31dbf2(0x190)]+_0x31dbf2(0x1b9)+_0x20614b[_0x31dbf2(0x190)]+'\x22.')),console[_0x31dbf2(0x1cb)](a5_0x1acfce['dim']('Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.')),0x1;const _0x45dcc7=new Set(_0x475728[_0x31dbf2(0x159)][_0x31dbf2(0x1a1)](_0x118209=>_0x118209[_0x31dbf2(0x16f)])),_0x4520d3=_0x37256f[_0x31dbf2(0x156)][_0x31dbf2(0x15c)](_0x23927b=>!_0x45dcc7[_0x31dbf2(0x166)](_0x23927b['name']));if(_0x4520d3[_0x31dbf2(0x1ef)]>0x0&&_0x475728[_0x31dbf2(0x1bb)]!==_0x1c6e97)return console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1ce)](_0x31dbf2(0x178))),console['log'](a5_0x1acfce[_0x31dbf2(0x1ee)](_0x31dbf2(0x18b)+_0x475728[_0x31dbf2(0x1bb)]+_0x31dbf2(0x1bd)+_0x1c6e97+'\x22.')),console[_0x31dbf2(0x1cb)](a5_0x1acfce['dim'](_0x31dbf2(0x1ca)+_0x475728['site']+_0x31dbf2(0x1e3))),0x1;const _0x2a5e03=_0x37256f[_0x31dbf2(0x156)][_0x31dbf2(0x15c)](_0x2c2920=>_0x45dcc7['has'](_0x2c2920[_0x31dbf2(0x16b)])),_0x81fd68=_0x4520d3;let _0x4dd153;try{_0x4dd153=await setupEvaluatorAgent(_0x582a7d['llm'],_0x57d96b['verbose']);}catch(_0x6bfd6b){const _0x4883ac=_0x6bfd6b instanceof Error?_0x6bfd6b['message']:String(_0x6bfd6b);return console[_0x31dbf2(0x1cb)](a5_0x1acfce['red'](_0x31dbf2(0x18d)+_0x4883ac)),0x1;}console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1d6)](_0x31dbf2(0x1eb))),console[_0x31dbf2(0x1cb)](_0x31dbf2(0x179)+a5_0x1acfce[_0x31dbf2(0x16a)](_0x475728[_0x31dbf2(0x1c1)])),console[_0x31dbf2(0x1cb)](_0x31dbf2(0x1d3)+a5_0x1acfce[_0x31dbf2(0x16a)](_0x475728[_0x31dbf2(0x163)]['projectName']+'/'+_0x475728[_0x31dbf2(0x163)][_0x31dbf2(0x190)]));_0x81fd68[_0x31dbf2(0x1ef)]>0x0&&console[_0x31dbf2(0x1cb)](_0x31dbf2(0x165)+a5_0x1acfce['yellow'](_0x81fd68['length']));console[_0x31dbf2(0x1cb)]();const _0x2dd544=[],_0x4902a7=Date['now'](),_0x3d58ea=createCommandSpinner(_0x31dbf2(0x1b5));if(_0x2a5e03[_0x31dbf2(0x1ef)]>0x0)try{const _0x5534fd=await reevaluateFromCache(_0x582a7d[_0x31dbf2(0x168)],_0x475728,{'tests':_0x2a5e03},{'evaluatorId':_0x4dd153,'onTestStart':(_0x31128f,_0x1d35da,_0x28bb9c)=>{const _0xae30b1=_0x31dbf2;_0x3d58ea[_0xae30b1(0x19c)]=_0xae30b1(0x1f0)+(_0x1d35da+0x1)+'/'+_0x28bb9c+':\x20'+_0x31128f+'...';if(!_0x3d58ea['isSpinning'])_0x3d58ea[_0xae30b1(0x1ba)]();},'onTestComplete':(_0x5a4953,_0x303713)=>{const _0x1654da=_0x31dbf2;_0x3d58ea[_0x1654da(0x161)]();if(_0x303713[_0x1654da(0x1c9)]===_0x1654da(0x19a))console['log'](a5_0x1acfce[_0x1654da(0x1b1)]('✓\x20PASS:\x20'+_0x5a4953)+a5_0x1acfce[_0x1654da(0x1ee)](_0x1654da(0x1a3)));else _0x303713['status']===_0x1654da(0x19b)?console[_0x1654da(0x1cb)](a5_0x1acfce[_0x1654da(0x1ce)]('✗\x20FAIL:\x20'+_0x5a4953+_0x1654da(0x1e9)+_0x303713[_0x1654da(0x158)])+a5_0x1acfce['dim'](_0x1654da(0x1a3))):console[_0x1654da(0x1cb)](a5_0x1acfce[_0x1654da(0x1ce)](_0x1654da(0x198)+_0x5a4953+_0x1654da(0x1e9)+_0x303713['reason']));_0x303713[_0x1654da(0x191)]&&console['log'](a5_0x1acfce[_0x1654da(0x1ee)](_0x1654da(0x184)+_0x303713[_0x1654da(0x191)])),_0x2dd544[_0x1654da(0x172)](_0x303713);},'onTestSkipped':(_0x204dea,_0x804663)=>{const _0x58dfb5=_0x31dbf2;_0x3d58ea[_0x58dfb5(0x161)](),console[_0x58dfb5(0x1cb)](a5_0x1acfce['yellow'](_0x58dfb5(0x160)+_0x204dea+'\x20-\x20'+_0x804663));}});for(const _0x593480 of _0x5534fd){!_0x2dd544[_0x31dbf2(0x1c0)](_0x1a6295=>_0x1a6295['name']===_0x593480[_0x31dbf2(0x16b)])&&_0x2dd544[_0x31dbf2(0x172)](_0x593480);}}catch(_0x151e26){_0x3d58ea[_0x31dbf2(0x161)]();const _0x2019c9=_0x151e26 instanceof Error?_0x151e26[_0x31dbf2(0x1b8)]:String(_0x151e26);return console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1ce)](_0x31dbf2(0x18a)+_0x2019c9)),0x1;}_0x3d58ea['stop']();if(_0x81fd68[_0x31dbf2(0x1ef)]>0x0){console[_0x31dbf2(0x1cb)](),console[_0x31dbf2(0x1cb)](a5_0x1acfce['cyan'](_0x31dbf2(0x1c2)));const {projectId:_0x5e9eb6,agentId:_0x66ed63}=_0x475728['agent'];for(const _0x45a70f of _0x81fd68){console[_0x31dbf2(0x1cb)]('Running:\x20'+a5_0x1acfce[_0x31dbf2(0x16a)](_0x45a70f[_0x31dbf2(0x16b)]));const _0x247a87=createCommandSpinner(_0x31dbf2(0x1ac)+_0x45a70f[_0x31dbf2(0x1e5)][_0x31dbf2(0x1ef)]+':\x20Sending\x20user\x20input...');_0x247a87[_0x31dbf2(0x1ba)]();try{const {result:_0x20be5d}=await runTest(_0x582a7d[_0x31dbf2(0x168)],_0x45a70f,{'agentId':_0x66ed63,'projectId':_0x5e9eb6,'site':_0x475728[_0x31dbf2(0x1bb)],'noEval':![],'evaluatorId':_0x4dd153,'onRoundStart':(_0x132d9b,_0x596f7d)=>{const _0x4a419e=_0x31dbf2;_0x247a87['text']=_0x4a419e(0x173)+(_0x132d9b+0x1)+'/'+_0x596f7d+_0x4a419e(0x1be);},'onRoundComplete':(_0x146683,_0x3f5c45,_0x3627f4)=>{const _0x45c39f=_0x31dbf2,_0x306a57=formatElapsed(_0x3f5c45);_0x3627f4?console['log']('\x20\x20Round\x20'+(_0x146683+0x1)+'/'+_0x45a70f[_0x45c39f(0x1e5)][_0x45c39f(0x1ef)]+'...\x20'+a5_0x1acfce['green']('✓')+'\x20('+_0x306a57+')'):console[_0x45c39f(0x1cb)](_0x45c39f(0x185)+(_0x146683+0x1)+'/'+_0x45a70f[_0x45c39f(0x1e5)]['length']+'...\x20'+a5_0x1acfce['red']('✗'));},'onEvaluationStart':()=>{const _0x194747=_0x31dbf2;_0x247a87['text']=_0x194747(0x1bf);},'onEvaluationComplete':_0x8e2415=>{const _0x425903=_0x31dbf2,_0x15ca74=formatElapsed(_0x8e2415);console['log'](_0x425903(0x1cf)+a5_0x1acfce['green']('✓')+'\x20('+_0x15ca74+')');}});_0x247a87[_0x31dbf2(0x161)](),_0x2dd544[_0x31dbf2(0x172)](_0x20be5d);if(_0x20be5d[_0x31dbf2(0x1c9)]===_0x31dbf2(0x19a))console['log'](a5_0x1acfce[_0x31dbf2(0x1b1)](_0x31dbf2(0x1d4)+_0x20be5d[_0x31dbf2(0x158)])+a5_0x1acfce[_0x31dbf2(0x1ee)]('\x20(new)'));else _0x20be5d[_0x31dbf2(0x1c9)]===_0x31dbf2(0x19b)?console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1ce)](_0x31dbf2(0x1f3)+_0x20be5d['reason'])+a5_0x1acfce[_0x31dbf2(0x1ee)]('\x20(new)')):console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1ce)](_0x31dbf2(0x198)+_0x20be5d['reason']));_0x20be5d[_0x31dbf2(0x191)]&&console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1ee)]('\x20\x20Conversation:\x20'+_0x20be5d['conversation_url']));}catch(_0x511872){_0x247a87[_0x31dbf2(0x161)]();const _0x584165=_0x511872 instanceof Error?_0x511872[_0x31dbf2(0x1b8)]:String(_0x511872);console[_0x31dbf2(0x1cb)](a5_0x1acfce[_0x31dbf2(0x1ce)](_0x31dbf2(0x198)+_0x584165)),_0x2dd544['push']({'name':_0x45a70f['name'],'status':_0x31dbf2(0x1e1),'reason':_0x584165,'timestamp':new Date()[_0x31dbf2(0x15a)](),'duration_ms':0x0});}}}console[_0x31dbf2(0x1cb)]();const _0x1a4cef=Date['now']()-_0x4902a7,_0x541d61=_0x2dd544['filter'](_0x1705db=>_0x1705db['status']===_0x31dbf2(0x19a))[_0x31dbf2(0x1ef)],_0x30d147=_0x2dd544[_0x31dbf2(0x15c)](_0x2526f0=>_0x2526f0[_0x31dbf2(0x1c9)]===_0x31dbf2(0x19b))['length'],_0x204728=_0x2dd544[_0x31dbf2(0x15c)](_0x4f1423=>_0x4f1423[_0x31dbf2(0x1c9)]===_0x31dbf2(0x1e1))[_0x31dbf2(0x1ef)];console[_0x31dbf2(0x1cb)]('━'[_0x31dbf2(0x1b7)](0x3c)),console[_0x31dbf2(0x1cb)]('Re-evaluation\x20Summary'),console[_0x31dbf2(0x1cb)]('━'['repeat'](0x3c)),console['log']('Total:\x20\x20\x20\x20'+_0x2dd544[_0x31dbf2(0x1ef)]),console[_0x31dbf2(0x1cb)](_0x31dbf2(0x1e8)+a5_0x1acfce[_0x31dbf2(0x1b1)](_0x541d61)),console[_0x31dbf2(0x1cb)](_0x31dbf2(0x1b2)+a5_0x1acfce[_0x31dbf2(0x1ce)](_0x30d147));_0x204728>0x0&&console[_0x31dbf2(0x1cb)](_0x31dbf2(0x1d9)+a5_0x1acfce[_0x31dbf2(0x1ce)](_0x204728));console[_0x31dbf2(0x1cb)](_0x31dbf2(0x1a7)+formatElapsed(_0x1a4cef)),console[_0x31dbf2(0x1cb)]('━'[_0x31dbf2(0x1b7)](0x3c));const _0x3594d1={'summary':{'total':_0x2dd544[_0x31dbf2(0x1ef)],'passed':_0x541d61,'failed':_0x30d147,'errors':_0x204728>0x0?_0x204728:undefined,'duration_ms':_0x1a4cef},'tests':_0x2dd544,'agent':{'project':_0x20614b[_0x31dbf2(0x197)],'name':_0x20614b[_0x31dbf2(0x190)],'site':_0x1c6e97},'timestamp':new Date(_0x4902a7)[_0x31dbf2(0x15a)]()};if(_0x385354!==_0x31dbf2(0x1c4)||_0x4d33a7){const _0xab7c70=formatResults(_0x3594d1,_0x385354);if(_0x4d33a7)try{a5_0x4b70d2[_0x31dbf2(0x1e2)](_0x4d33a7,_0xab7c70,_0x31dbf2(0x182)),console[_0x31dbf2(0x1cb)](),console['log'](a5_0x1acfce[_0x31dbf2(0x1ee)](_0x31dbf2(0x1b0)+_0x4d33a7));}catch(_0x416cd2){return console[_0x31dbf2(0x1cb)](),console[_0x31dbf2(0x1cb)](a5_0x1acfce['red'](_0x31dbf2(0x16c)+_0x416cd2)),0x1;}else console[_0x31dbf2(0x1cb)](),console[_0x31dbf2(0x1cb)](_0xab7c70);}const _0x41f550=_0x2dd544[_0x31dbf2(0x15c)](_0x169533=>_0x169533[_0x31dbf2(0x1c9)]!==_0x31dbf2(0x19a));return _0x41f550[_0x31dbf2(0x1ef)]>0x0?0x1:0x0;}}
@@ -1 +1 @@
1
- const a6_0x8d4729=a6_0x2a30;(function(_0x590d13,_0x4ddb7a){const _0x3624e4=a6_0x2a30,_0x369148=_0x590d13();while(!![]){try{const _0x11a60e=parseInt(_0x3624e4(0x124))/0x1+-parseInt(_0x3624e4(0xf3))/0x2+parseInt(_0x3624e4(0xf4))/0x3*(-parseInt(_0x3624e4(0x11d))/0x4)+-parseInt(_0x3624e4(0x110))/0x5*(-parseInt(_0x3624e4(0x10c))/0x6)+-parseInt(_0x3624e4(0x120))/0x7+-parseInt(_0x3624e4(0x10b))/0x8+parseInt(_0x3624e4(0x113))/0x9;if(_0x11a60e===_0x4ddb7a)break;else _0x369148['push'](_0x369148['shift']());}catch(_0x4643dd){_0x369148['push'](_0x369148['shift']());}}}(a6_0x3518,0x9a9a8));function a6_0x3518(){const _0x3fbf51=['cyan','padEnd','usage','15cqfptZ','Source','Profile','25383006zZFfDu','name','default','getTime','\x20\x20Month:\x20\x20\x20','Today','toLocaleDateString','monthCredits','Total','en-US','2476eLNuAU','today\x20','numeric','6036604WQLNEz','dim','Usage\x20by\x20Source','\x20days\x20ago','1050404CnFWcI','lastUsedAt','\x20\x20Total:\x20\x20\x20','Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.','(default)','todayCredits','execute','source','en-CA','map','format','Month','profileCount','entryCount','message','bold','totalCredits','Error:\x20','error','Last\x20Used','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','repeat','2232704misHUQ','4911kEpUqk','credits','length','shouldShowSources','outputTable','2-digit','outputStructured','description','json','all','padStart','resolve','log','round','max','\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary','\x20\x20Run\x20\x22','toLocaleTimeString','\x20credits','Usage\x20by\x20Profile','profile','yesterday','toFixed','3626696SvTCsQ','415764yTWhyX'];a6_0x3518=function(){return _0x3fbf51;};return a6_0x3518();}import a6_0x22fd93 from'chalk';import{BaseCommand}from'./command.js';import{handleSDKOutput}from'../core/command-output.js';function a6_0x2a30(_0x145f13,_0x2f8273){_0x145f13=_0x145f13-0xe1;const _0x351856=a6_0x3518();let _0x2a3057=_0x351856[_0x145f13];return _0x2a3057;}import{getAllProfileStats,getAllSourceStats,getUsageSummary}from'../proxy/claude-usage-tracker.js';function formatCredits(_0x2f9b96){const _0x34fbd9=a6_0x2a30;return _0x2f9b96[_0x34fbd9(0x10a)](0x2);}function formatLastUsed(_0x3c9e1c){const _0x21d628=a6_0x2a30;if(!_0x3c9e1c)return'never';const _0x449d6e=new Date(_0x3c9e1c),_0xc93297=new Date(),_0x35f495=_0x449d6e[_0x21d628(0x119)](_0x21d628(0xe5)),_0x39c164=_0xc93297[_0x21d628(0x119)]('en-CA');if(_0x35f495===_0x39c164)return _0x21d628(0x11e)+_0x449d6e[_0x21d628(0x105)](_0x21d628(0x11c),{'hour':'2-digit','minute':_0x21d628(0xf9)});const _0x54f3c5=new Date(_0x35f495),_0x50ef44=new Date(_0x39c164),_0x59993b=Math[_0x21d628(0x101)]((_0x50ef44['getTime']()-_0x54f3c5[_0x21d628(0x116)]())/(0x18*0x3c*0x3c*0x3e8));if(_0x59993b===0x1)return _0x21d628(0x109);else return _0x59993b>0x1&&_0x59993b<0x7?_0x59993b+_0x21d628(0x123):_0x449d6e[_0x21d628(0x119)](_0x21d628(0x11c),{'month':'short','day':_0x21d628(0x11f)});}export class AIUsageCommandBase extends BaseCommand{[a6_0x8d4729(0x114)]=a6_0x8d4729(0x10f);[a6_0x8d4729(0xfb)]='Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile';async[a6_0x8d4729(0xe3)](_0x4bc28a){const _0x47e92c=a6_0x8d4729,{options:_0x128e64}=_0x4bc28a,_0xbac42b=_0x128e64[_0x47e92c(0xe7)]==='json'||_0x128e64[_0x47e92c(0xe7)]==='jsonl'||_0x128e64[_0x47e92c(0xfc)];try{const [_0x3cc4fb,_0x1767b0,_0x59d47d]=await Promise[_0x47e92c(0xfd)]([getAllProfileStats(),this[_0x47e92c(0xf7)]()?getAllSourceStats():Promise[_0x47e92c(0xff)]([]),getUsageSummary()]);return _0xbac42b?await this['outputStructured'](_0x3cc4fb,_0x1767b0,_0x59d47d,_0x128e64):this[_0x47e92c(0xf8)](_0x3cc4fb,_0x1767b0,_0x59d47d),0x0;}catch(_0x2f0b00){const _0x1b6546=_0x2f0b00 instanceof Error?_0x2f0b00[_0x47e92c(0xeb)]:'Unknown\x20error';return console[_0x47e92c(0xef)](a6_0x22fd93['red'](_0x47e92c(0xee)+_0x1b6546)),0x1;}}async[a6_0x8d4729(0xfa)](_0x303670,_0x17608c,_0x57c67f,_0x83bc42){const _0x45fd7a=a6_0x8d4729,_0x41400c={'summary':{'todayCredits':_0x57c67f[_0x45fd7a(0xe2)],'monthCredits':_0x57c67f[_0x45fd7a(0x11a)],'totalCredits':_0x57c67f[_0x45fd7a(0xed)],'profileCount':_0x57c67f[_0x45fd7a(0xe9)]},'profiles':_0x303670[_0x45fd7a(0xe6)](_0x49b24a=>({'profile':_0x49b24a[_0x45fd7a(0x108)],'credits':_0x49b24a[_0x45fd7a(0xf5)],'requests':_0x49b24a[_0x45fd7a(0xea)],'lastUsedAt':_0x49b24a['lastUsedAt']}))};this[_0x45fd7a(0xf7)]()&&(_0x41400c['sources']=_0x17608c[_0x45fd7a(0xe6)](_0x591b56=>({'source':_0x591b56[_0x45fd7a(0xe4)],'credits':_0x591b56[_0x45fd7a(0xf5)],'todayCredits':_0x591b56[_0x45fd7a(0xe2)],'monthCredits':_0x591b56['monthCredits'],'requests':_0x591b56['entryCount']}))),await handleSDKOutput([_0x41400c],_0x83bc42);}[a6_0x8d4729(0xf8)](_0xe3970e,_0x11055f,_0x46bc4b){const _0x1f0cb2=a6_0x8d4729;console[_0x1f0cb2(0x100)](a6_0x22fd93['bold'](_0x1f0cb2(0x103))),console['log'](a6_0x22fd93[_0x1f0cb2(0x121)]('─'[_0x1f0cb2(0xf2)](0x32))),console[_0x1f0cb2(0x100)]('\x20\x20Today:\x20\x20\x20'+a6_0x22fd93[_0x1f0cb2(0x10d)](formatCredits(_0x46bc4b['todayCredits']))+'\x20credits'),console[_0x1f0cb2(0x100)](_0x1f0cb2(0x117)+a6_0x22fd93[_0x1f0cb2(0x10d)](formatCredits(_0x46bc4b[_0x1f0cb2(0x11a)]))+'\x20credits'),console['log'](_0x1f0cb2(0x126)+a6_0x22fd93['cyan'](formatCredits(_0x46bc4b['totalCredits']))+_0x1f0cb2(0x106)),console['log']();if(this[_0x1f0cb2(0xf7)]()&&_0x11055f[_0x1f0cb2(0xf6)]>0x0){console[_0x1f0cb2(0x100)](a6_0x22fd93[_0x1f0cb2(0xec)](_0x1f0cb2(0x122))),console[_0x1f0cb2(0x100)](a6_0x22fd93[_0x1f0cb2(0x121)]('─'['repeat'](0x3c)));const _0x9a0a65=0xc,_0x4788d0=0xa,_0x5b0400=0xa,_0x52b175=0xa;console[_0x1f0cb2(0x100)]('\x20\x20'+_0x1f0cb2(0x111)[_0x1f0cb2(0x10e)](_0x9a0a65)+'\x20\x20'+_0x1f0cb2(0x11b)[_0x1f0cb2(0xfe)](_0x4788d0)+'\x20\x20'+_0x1f0cb2(0x118)[_0x1f0cb2(0xfe)](_0x5b0400)+'\x20\x20'+_0x1f0cb2(0xe8)[_0x1f0cb2(0xfe)](_0x52b175));for(const _0x58d099 of _0x11055f){console['log']('\x20\x20'+_0x58d099[_0x1f0cb2(0xe4)]['padEnd'](_0x9a0a65)+'\x20\x20'+a6_0x22fd93[_0x1f0cb2(0x10d)](formatCredits(_0x58d099[_0x1f0cb2(0xf5)])[_0x1f0cb2(0xfe)](_0x4788d0))+'\x20\x20'+formatCredits(_0x58d099[_0x1f0cb2(0xe2)])[_0x1f0cb2(0xfe)](_0x5b0400)+'\x20\x20'+formatCredits(_0x58d099[_0x1f0cb2(0x11a)])[_0x1f0cb2(0xfe)](_0x52b175));}console[_0x1f0cb2(0x100)]();}if(_0xe3970e[_0x1f0cb2(0xf6)]===0x0){console[_0x1f0cb2(0x100)](a6_0x22fd93['dim'](_0x1f0cb2(0xf1))),console[_0x1f0cb2(0x100)](a6_0x22fd93['dim'](_0x1f0cb2(0x104)+this['getCommandName']()+'\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a'));return;}console[_0x1f0cb2(0x100)](a6_0x22fd93[_0x1f0cb2(0xec)](_0x1f0cb2(0x107))),console[_0x1f0cb2(0x100)](a6_0x22fd93[_0x1f0cb2(0x121)]('─'['repeat'](0x3c)));const _0x34b75f=Math[_0x1f0cb2(0x102)](0xc,..._0xe3970e[_0x1f0cb2(0xe6)](_0x1ac5ea=>_0x1ac5ea[_0x1f0cb2(0x108)]===_0x1f0cb2(0x115)?_0x1f0cb2(0xe1)[_0x1f0cb2(0xf6)]:_0x1ac5ea[_0x1f0cb2(0x108)]['length'])),_0x34f33b=0xa,_0x4ba4c3=0xa;console[_0x1f0cb2(0x100)]('\x20\x20'+_0x1f0cb2(0x112)[_0x1f0cb2(0x10e)](_0x34b75f)+'\x20\x20'+'Credits'['padStart'](_0x34f33b)+'\x20\x20'+'Requests'['padStart'](_0x4ba4c3)+'\x20\x20'+_0x1f0cb2(0xf0));for(const _0x3c1853 of _0xe3970e){const _0x2d48f0=_0x3c1853['profile']==='default'?_0x1f0cb2(0xe1):_0x3c1853[_0x1f0cb2(0x108)],_0x1d9930=_0x2d48f0['padEnd'](_0x34b75f),_0x57fc02=_0x3c1853[_0x1f0cb2(0x108)]===_0x1f0cb2(0x115)?a6_0x22fd93[_0x1f0cb2(0x121)](_0x1d9930):_0x1d9930;console[_0x1f0cb2(0x100)]('\x20\x20'+_0x57fc02+'\x20\x20'+a6_0x22fd93['cyan'](formatCredits(_0x3c1853[_0x1f0cb2(0xf5)])[_0x1f0cb2(0xfe)](_0x34f33b))+'\x20\x20'+String(_0x3c1853['entryCount'])[_0x1f0cb2(0xfe)](_0x4ba4c3)+'\x20\x20'+a6_0x22fd93[_0x1f0cb2(0x121)](formatLastUsed(_0x3c1853[_0x1f0cb2(0x125)])));}console['log'](),console['log'](a6_0x22fd93[_0x1f0cb2(0x121)](_0x1f0cb2(0x127))),console[_0x1f0cb2(0x100)]();}}
1
+ function a6_0x8334(){const _0x39d4a9=['en-US','outputStructured','2366236azQkXH','message','length','(default)','\x20credits','padStart','Unknown\x20error','Last\x20Used','toFixed','\x0aAI\x20Suite\x20Credit\x20Usage\x20Summary','json','shouldShowSources','credits','log','all','toLocaleTimeString','2246495hSeIqg','Requests','Credits','todayCredits','source','padEnd','bold','21364461ikFlBH','3971751nkgBbZ','round','profile','127921frNDmY','repeat','Usage\x20by\x20Source','description','\x20\x20No\x20usage\x20data\x20recorded\x20yet.','execute','jsonl','short','Today','default','\x20\x20Total:\x20\x20\x20','2nwkNBx','monthCredits','4263488xSmbdX','\x20\x20Month:\x20\x20\x20','error','name','max','entryCount','\x20days\x20ago','outputTable','3twmiMg','\x20\x20Today:\x20\x20\x20','cyan','dim','resolve','getTime','en-CA','format','Source','totalCredits','map','toLocaleDateString','552174qrOdus','red','today\x20','profileCount','usage','never','lastUsedAt','\x22\x20to\x20start\x20using\x20AI\x20Suite.\x0a','2-digit'];a6_0x8334=function(){return _0x39d4a9;};return a6_0x8334();}const a6_0x1d1502=a6_0x14c6;(function(_0x1a54bd,_0x844f1f){const _0x2ef982=a6_0x14c6,_0xbac0ac=_0x1a54bd();while(!![]){try{const _0x5c95b5=parseInt(_0x2ef982(0xc1))/0x1*(parseInt(_0x2ef982(0xcc))/0x2)+parseInt(_0x2ef982(0x8f))/0x3*(-parseInt(_0x2ef982(0xa6))/0x4)+-parseInt(_0x2ef982(0xb6))/0x5+parseInt(_0x2ef982(0x9b))/0x6+-parseInt(_0x2ef982(0xbe))/0x7+-parseInt(_0x2ef982(0xce))/0x8+parseInt(_0x2ef982(0xbd))/0x9;if(_0x5c95b5===_0x844f1f)break;else _0xbac0ac['push'](_0xbac0ac['shift']());}catch(_0x4b0227){_0xbac0ac['push'](_0xbac0ac['shift']());}}}(a6_0x8334,0x6e7f0));import a6_0x219101 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(_0x271a0b){const _0x523bc1=a6_0x14c6;return _0x271a0b[_0x523bc1(0xae)](0x2);}function formatLastUsed(_0x1cc9b0){const _0x218bf9=a6_0x14c6;if(!_0x1cc9b0)return _0x218bf9(0xa0);const _0x545803=new Date(_0x1cc9b0),_0xf04336=new Date(),_0x54bdb9=_0x545803[_0x218bf9(0x9a)](_0x218bf9(0x95)),_0x47245a=_0xf04336[_0x218bf9(0x9a)](_0x218bf9(0x95));if(_0x54bdb9===_0x47245a)return _0x218bf9(0x9d)+_0x545803[_0x218bf9(0xb5)](_0x218bf9(0xa4),{'hour':_0x218bf9(0xa3),'minute':_0x218bf9(0xa3)});const _0x5146db=new Date(_0x54bdb9),_0x2a79f8=new Date(_0x47245a),_0x3d4097=Math[_0x218bf9(0xbf)]((_0x2a79f8[_0x218bf9(0x94)]()-_0x5146db['getTime']())/(0x18*0x3c*0x3c*0x3e8));if(_0x3d4097===0x1)return'yesterday';else return _0x3d4097>0x1&&_0x3d4097<0x7?_0x3d4097+_0x218bf9(0x8d):_0x545803['toLocaleDateString']('en-US',{'month':_0x218bf9(0xc8),'day':'numeric'});}function a6_0x14c6(_0x58600f,_0x4d0877){_0x58600f=_0x58600f-0x8a;const _0x833463=a6_0x8334();let _0x14c639=_0x833463[_0x58600f];return _0x14c639;}export class AIUsageCommandBase extends BaseCommand{[a6_0x1d1502(0x8a)]=a6_0x1d1502(0x9f);[a6_0x1d1502(0xc4)]='Show\x20AI\x20Suite\x20credit\x20usage\x20by\x20profile';async[a6_0x1d1502(0xc6)](_0x4faaba){const _0x32652d=a6_0x1d1502,{options:_0x214a58}=_0x4faaba,_0x26adf8=_0x214a58[_0x32652d(0x96)]===_0x32652d(0xb0)||_0x214a58['format']===_0x32652d(0xc7)||_0x214a58['json'];try{const [_0x27a488,_0x58bf95,_0x3189a1]=await Promise[_0x32652d(0xb4)]([getAllProfileStats(),this[_0x32652d(0xb1)]()?getAllSourceStats():Promise[_0x32652d(0x93)]([]),getUsageSummary()]);return _0x26adf8?await this[_0x32652d(0xa5)](_0x27a488,_0x58bf95,_0x3189a1,_0x214a58):this['outputTable'](_0x27a488,_0x58bf95,_0x3189a1),0x0;}catch(_0x24cee3){const _0x37777d=_0x24cee3 instanceof Error?_0x24cee3[_0x32652d(0xa7)]:_0x32652d(0xac);return console[_0x32652d(0xd0)](a6_0x219101[_0x32652d(0x9c)]('Error:\x20'+_0x37777d)),0x1;}}async[a6_0x1d1502(0xa5)](_0x136325,_0x19e07c,_0x3034e5,_0x27e9d3){const _0x480450=a6_0x1d1502,_0x16d525={'summary':{'todayCredits':_0x3034e5[_0x480450(0xb9)],'monthCredits':_0x3034e5[_0x480450(0xcd)],'totalCredits':_0x3034e5['totalCredits'],'profileCount':_0x3034e5[_0x480450(0x9e)]},'profiles':_0x136325[_0x480450(0x99)](_0x5a91d8=>({'profile':_0x5a91d8[_0x480450(0xc0)],'credits':_0x5a91d8[_0x480450(0xb2)],'requests':_0x5a91d8[_0x480450(0x8c)],'lastUsedAt':_0x5a91d8['lastUsedAt']}))};this[_0x480450(0xb1)]()&&(_0x16d525['sources']=_0x19e07c[_0x480450(0x99)](_0x5bed00=>({'source':_0x5bed00[_0x480450(0xba)],'credits':_0x5bed00[_0x480450(0xb2)],'todayCredits':_0x5bed00[_0x480450(0xb9)],'monthCredits':_0x5bed00['monthCredits'],'requests':_0x5bed00[_0x480450(0x8c)]}))),await handleSDKOutput([_0x16d525],_0x27e9d3);}[a6_0x1d1502(0x8e)](_0x315dc2,_0x3565b6,_0x26c10b){const _0x5882d4=a6_0x1d1502;console[_0x5882d4(0xb3)](a6_0x219101['bold'](_0x5882d4(0xaf))),console[_0x5882d4(0xb3)](a6_0x219101['dim']('─'['repeat'](0x32))),console[_0x5882d4(0xb3)](_0x5882d4(0x90)+a6_0x219101[_0x5882d4(0x91)](formatCredits(_0x26c10b['todayCredits']))+_0x5882d4(0xaa)),console[_0x5882d4(0xb3)](_0x5882d4(0xcf)+a6_0x219101['cyan'](formatCredits(_0x26c10b[_0x5882d4(0xcd)]))+_0x5882d4(0xaa)),console[_0x5882d4(0xb3)](_0x5882d4(0xcb)+a6_0x219101[_0x5882d4(0x91)](formatCredits(_0x26c10b[_0x5882d4(0x98)]))+_0x5882d4(0xaa)),console[_0x5882d4(0xb3)]();if(this[_0x5882d4(0xb1)]()&&_0x3565b6[_0x5882d4(0xa8)]>0x0){console['log'](a6_0x219101['bold'](_0x5882d4(0xc3))),console['log'](a6_0x219101[_0x5882d4(0x92)]('─'[_0x5882d4(0xc2)](0x3c)));const _0x2fd9ce=0xc,_0x19cd63=0xa,_0x4500b1=0xa,_0x108a52=0xa;console[_0x5882d4(0xb3)]('\x20\x20'+_0x5882d4(0x97)[_0x5882d4(0xbb)](_0x2fd9ce)+'\x20\x20'+'Total'[_0x5882d4(0xab)](_0x19cd63)+'\x20\x20'+_0x5882d4(0xc9)[_0x5882d4(0xab)](_0x4500b1)+'\x20\x20'+'Month'['padStart'](_0x108a52));for(const _0x2eb41e of _0x3565b6){console[_0x5882d4(0xb3)]('\x20\x20'+_0x2eb41e[_0x5882d4(0xba)]['padEnd'](_0x2fd9ce)+'\x20\x20'+a6_0x219101[_0x5882d4(0x91)](formatCredits(_0x2eb41e[_0x5882d4(0xb2)])[_0x5882d4(0xab)](_0x19cd63))+'\x20\x20'+formatCredits(_0x2eb41e[_0x5882d4(0xb9)])['padStart'](_0x4500b1)+'\x20\x20'+formatCredits(_0x2eb41e['monthCredits'])[_0x5882d4(0xab)](_0x108a52));}console[_0x5882d4(0xb3)]();}if(_0x315dc2[_0x5882d4(0xa8)]===0x0){console[_0x5882d4(0xb3)](a6_0x219101['dim'](_0x5882d4(0xc5))),console[_0x5882d4(0xb3)](a6_0x219101[_0x5882d4(0x92)]('\x20\x20Run\x20\x22'+this['getCommandName']()+_0x5882d4(0xa2)));return;}console['log'](a6_0x219101[_0x5882d4(0xbc)]('Usage\x20by\x20Profile')),console['log'](a6_0x219101['dim']('─'[_0x5882d4(0xc2)](0x3c)));const _0x2f6225=Math[_0x5882d4(0x8b)](0xc,..._0x315dc2[_0x5882d4(0x99)](_0x2af341=>_0x2af341['profile']===_0x5882d4(0xca)?_0x5882d4(0xa9)[_0x5882d4(0xa8)]:_0x2af341[_0x5882d4(0xc0)][_0x5882d4(0xa8)])),_0x5d91c8=0xa,_0x407aec=0xa;console[_0x5882d4(0xb3)]('\x20\x20'+'Profile'[_0x5882d4(0xbb)](_0x2f6225)+'\x20\x20'+_0x5882d4(0xb8)['padStart'](_0x5d91c8)+'\x20\x20'+_0x5882d4(0xb7)['padStart'](_0x407aec)+'\x20\x20'+_0x5882d4(0xad));for(const _0x3670f6 of _0x315dc2){const _0x3204f9=_0x3670f6[_0x5882d4(0xc0)]===_0x5882d4(0xca)?_0x5882d4(0xa9):_0x3670f6['profile'],_0x316710=_0x3204f9[_0x5882d4(0xbb)](_0x2f6225),_0x5d3f8b=_0x3670f6[_0x5882d4(0xc0)]===_0x5882d4(0xca)?a6_0x219101[_0x5882d4(0x92)](_0x316710):_0x316710;console[_0x5882d4(0xb3)]('\x20\x20'+_0x5d3f8b+'\x20\x20'+a6_0x219101['cyan'](formatCredits(_0x3670f6['credits'])[_0x5882d4(0xab)](_0x5d91c8))+'\x20\x20'+String(_0x3670f6['entryCount'])[_0x5882d4(0xab)](_0x407aec)+'\x20\x20'+a6_0x219101[_0x5882d4(0x92)](formatLastUsed(_0x3670f6[_0x5882d4(0xa1)])));}console[_0x5882d4(0xb3)](),console[_0x5882d4(0xb3)](a6_0x219101['dim']('Note:\x20Credit\x20values\x20are\x20estimates\x20based\x20on\x20token\x20usage.')),console[_0x5882d4(0xb3)]();}}
@@ -1 +1 @@
1
- const a7_0x3100d0=a7_0x180f;(function(_0x55053a,_0x542f92){const _0x413f91=a7_0x180f,_0x5e5b1a=_0x55053a();while(!![]){try{const _0x41ecd6=-parseInt(_0x413f91(0x1e6))/0x1*(-parseInt(_0x413f91(0x20a))/0x2)+-parseInt(_0x413f91(0x204))/0x3*(-parseInt(_0x413f91(0x1ff))/0x4)+parseInt(_0x413f91(0x1e5))/0x5*(parseInt(_0x413f91(0x1d6))/0x6)+parseInt(_0x413f91(0x214))/0x7+parseInt(_0x413f91(0x1d9))/0x8*(parseInt(_0x413f91(0x1d4))/0x9)+parseInt(_0x413f91(0x1dd))/0xa*(-parseInt(_0x413f91(0x1f4))/0xb)+-parseInt(_0x413f91(0x1f8))/0xc;if(_0x41ecd6===_0x542f92)break;else _0x5e5b1a['push'](_0x5e5b1a['shift']());}catch(_0x5824c8){_0x5e5b1a['push'](_0x5e5b1a['shift']());}}}(a7_0x244b,0x3ab81));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';function a7_0x244b(){const _0x1e2dd4=['status','24FBmTPB','trino','keys','api','233680tDalmq','llm-proxy','log','us01','type','<\x20HTTP/1.1\x20','set-cookie','Invalid\x20API\x20type:\x20','452405oraWnZ','346707hqyRqC','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','data','toUpperCase','.\x20Valid\x20methods:\x20','set-cookie2','.\x20Valid\x20types:\x20','verbose','body','\x0aStack\x20trace:\x0a','output','file','workflow','121bjfGdj','PATCH','color','x-trino-user','4320396gjPRVg','x-auth-token','readBodyFromFile','x-xsrf-token','name','cookie','entries','233284FrYBPw','execute','Results\x20saved\x20to\x20','length','includes','3OgJBqA','join','Endpoint\x20must\x20start\x20with\x20/:\x20','headers','trim','GET','2ZNLrJz','stack','isArray','Invalid\x20HTTP\x20method:\x20','indexOf','Error:\x20','description','error','substring','POST','405139WcaQCr','Invalid\x20header\x20format:\x20\x22','startsWith','PUT','method','\x22.\x20','site','369738GEYxlq','proxy-authorization','18uqEyMZ','message'];a7_0x244b=function(){return _0x1e2dd4;};return a7_0x244b();}import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';function a7_0x180f(_0x49ea8e,_0x3ed44f){_0x49ea8e=_0x49ea8e-0x1d1;const _0x244b5d=a7_0x244b();let _0x180ff9=_0x244b5d[_0x49ea8e];return _0x180ff9;}import{getEndpoint}from'../sdk/types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set(['authorization',a7_0x3100d0(0x1d5),a7_0x3100d0(0x1fd),a7_0x3100d0(0x1e3),a7_0x3100d0(0x1ec),a7_0x3100d0(0x1fb),a7_0x3100d0(0x1f9),a7_0x3100d0(0x1f7)]);function isSensitiveHeader(_0x44d109){return SENSITIVE_HEADERS['has'](_0x44d109['toLowerCase']());}function parseHeader(_0x3a2d84){const _0x275aff=a7_0x3100d0,_0x42c1df=_0x3a2d84[_0x275aff(0x20e)](':');if(_0x42c1df===-0x1)throw new Error(_0x275aff(0x215)+_0x3a2d84+_0x275aff(0x1d2)+'Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22');const _0x82e992=_0x3a2d84['substring'](0x0,_0x42c1df)[_0x275aff(0x208)](),_0x6edcfa=_0x3a2d84[_0x275aff(0x212)](_0x42c1df+0x1)[_0x275aff(0x208)]();if(!_0x82e992)throw new Error('Header\x20key\x20cannot\x20be\x20empty:\x20\x22'+_0x3a2d84+'\x22');return[_0x82e992,_0x6edcfa];}export class ApiCommand extends BaseCommand{[a7_0x3100d0(0x1fc)]='api';[a7_0x3100d0(0x210)]=a7_0x3100d0(0x1e7);['validate'](_0x4e60cb){const _0x4e2bcc=a7_0x3100d0,{args:_0x13d1dc,options:_0x4c0636}=_0x4e60cb,_0x3d4489=_0x4c0636;if(_0x13d1dc[_0x4e2bcc(0x202)]===0x0)return'Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list';const _0xda7258=_0x13d1dc[0x0];if(!_0xda7258[_0x4e2bcc(0x216)]('/'))return _0x4e2bcc(0x206)+_0xda7258;const _0x12b0b4=_0x3d4489[_0x4e2bcc(0x1e9)],_0x3a11ac=_0x3d4489[_0x4e2bcc(0x1f2)];if(_0x12b0b4&&_0x3a11ac)return _0x4e2bcc(0x1e8);const _0xe5f298=_0x3d4489['method']||_0x4e2bcc(0x209),_0x137fa7=[_0x4e2bcc(0x209),_0x4e2bcc(0x213),_0x4e2bcc(0x217),'DELETE',_0x4e2bcc(0x1f5)];if(!_0x137fa7[_0x4e2bcc(0x203)](_0xe5f298[_0x4e2bcc(0x1ea)]()))return _0x4e2bcc(0x20d)+_0xe5f298+_0x4e2bcc(0x1eb)+_0x137fa7[_0x4e2bcc(0x205)](',\x20');const _0x4c987e=_0x3d4489[_0x4e2bcc(0x1e1)]||'td',_0x38795d=['td','cdp',_0x4e2bcc(0x1f3),_0x4e2bcc(0x1da),'llm',_0x4e2bcc(0x1de),'cas'];if(!_0x38795d[_0x4e2bcc(0x203)](_0x4c987e))return _0x4e2bcc(0x1e4)+_0x4c987e+_0x4e2bcc(0x1ed)+_0x38795d[_0x4e2bcc(0x205)](',\x20');return undefined;}async[a7_0x3100d0(0x200)](_0x3c1418){const _0x57711d=a7_0x3100d0,{options:_0x518353,args:_0x1a95ef,tdx:_0x3917c7}=_0x3c1418,_0x540f43=_0x518353,_0x55067e=_0x1a95ef[0x0],_0x47b10f=(_0x540f43[_0x57711d(0x1d1)]||'GET')[_0x57711d(0x1ea)](),_0x232dff=_0x540f43[_0x57711d(0x1e9)],_0x118695=_0x540f43[_0x57711d(0x1f2)],_0x3d9e98=_0x540f43['header'],_0x2e6713=_0x540f43[_0x57711d(0x1e1)]||'td';try{const _0x5ededd={};if(_0x3d9e98){const _0x103e4d=Array[_0x57711d(0x20c)](_0x3d9e98)?_0x3d9e98:[_0x3d9e98];for(const _0x23c3b2 of _0x103e4d){const [_0x1f5931,_0x363ee6]=parseHeader(_0x23c3b2);_0x5ededd[_0x1f5931]=_0x363ee6;}}let _0x2dee71;if(_0x232dff)_0x2dee71=_0x232dff;else{if(_0x118695)try{_0x2dee71=RawAPI[_0x57711d(0x1fa)](_0x118695);}catch(_0x2e4cf9){return console[_0x57711d(0x211)]('Error:\x20'+(_0x2e4cf9 instanceof Error?_0x2e4cf9[_0x57711d(0x1d7)]:String(_0x2e4cf9))),0x1;}}const _0xcf23cd={'method':_0x47b10f,'apiType':_0x2e6713,'includeHeaders':_0x518353['verbose']};_0x2dee71&&(_0xcf23cd[_0x57711d(0x1ef)]=_0x2dee71);Object[_0x57711d(0x1db)](_0x5ededd)[_0x57711d(0x202)]>0x0&&(_0xcf23cd[_0x57711d(0x207)]=_0x5ededd);if(_0x518353[_0x57711d(0x1ee)]){const _0x3b53f8=resolveSite(_0x518353[_0x57711d(0x1d3)]??_0x57711d(0x1e0)),_0x237e93=getEndpoint(_0x3b53f8,_0x2e6713),_0xbcf943=''+_0x237e93+_0x55067e;console[_0x57711d(0x211)]('>\x20'+_0x47b10f+'\x20'+_0xbcf943);const _0x33a349=getAuthHeaders(_0x3b53f8),_0x40f7ac={..._0x33a349,..._0x5ededd};for(const [_0x4db4c9,_0x200d20]of Object[_0x57711d(0x1fe)](_0x40f7ac)){!isSensitiveHeader(_0x4db4c9)&&console[_0x57711d(0x211)]('>\x20'+_0x4db4c9+':\x20'+_0x200d20);}_0x2dee71&&console[_0x57711d(0x211)]('>'),console[_0x57711d(0x211)]('');}const _0x2cee16=await _0x3917c7[_0x57711d(0x1dc)]['request'](_0x55067e,_0xcf23cd);if(_0x518353[_0x57711d(0x1ee)]&&_0x2cee16[_0x57711d(0x207)]){console['error'](_0x57711d(0x1e2)+_0x2cee16[_0x57711d(0x1d8)]);for(const [_0x577679,_0x460968]of Object[_0x57711d(0x1fe)](_0x2cee16[_0x57711d(0x207)])){!isSensitiveHeader(_0x577679)&&console[_0x57711d(0x211)]('<\x20'+_0x577679+':\x20'+_0x460968);}console['error']('');}const _0x52f516=Boolean(_0x518353[_0x57711d(0x1f1)]),_0x7075cb={'color':_0x518353[_0x57711d(0x1f6)],'noColor':_0x518353['noColor']||_0x52f516&&!_0x518353[_0x57711d(0x1f6)]},_0x5343e1=colorizeJSON(_0x2cee16[_0x57711d(0x1e9)],_0x7075cb);return _0x518353[_0x57711d(0x1f1)]?(writeFileSync(_0x518353[_0x57711d(0x1f1)],_0x5343e1),console['error'](_0x57711d(0x201)+_0x518353[_0x57711d(0x1f1)])):console[_0x57711d(0x1df)](_0x5343e1),0x0;}catch(_0x46f07b){return _0x46f07b instanceof Error?(console[_0x57711d(0x211)]('Error:\x20'+_0x46f07b['message']),_0x518353['verbose']&&_0x46f07b[_0x57711d(0x20b)]&&console[_0x57711d(0x211)](_0x57711d(0x1f0)+_0x46f07b['stack'])):console[_0x57711d(0x211)](_0x57711d(0x20f)+String(_0x46f07b)),0x1;}}}
1
+ const a7_0x1e1254=a7_0x1c83;function a7_0x2f26(){const _0xdecd0b=['data','trim','toUpperCase','\x0aStack\x20trace:\x0a','length','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','2427956SWTalA','execute','Invalid\x20header\x20format:\x20\x22','1296756tlqGVm','8oGRtxf','has','headers','join','llm-proxy','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','43248aqfkCo','api','file','color','80ceBwFe','stack','GET','message','cdp','PATCH','workflow','101739CZbVIL','request','verbose','log','isArray','authorization','readBodyFromFile','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','keys','cookie','.\x20Valid\x20methods:\x20','indexOf','entries','2oSXJrz','output','Invalid\x20HTTP\x20method:\x20','Results\x20saved\x20to\x20','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','DELETE','cas','PUT','noColor','name','trino','Error:\x20','substring','2520420gzwrXJ','description','includes','x-xsrf-token','941007EsalmV','\x22.\x20','6EhPUYk','Invalid\x20API\x20type:\x20','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','body','llm','startsWith','status','x-auth-token','error','set-cookie2','1587605MLDaRg','type','method'];a7_0x2f26=function(){return _0xdecd0b;};return a7_0x2f26();}(function(_0x1a3637,_0x177412){const _0x3eadb0=a7_0x1c83,_0x5a93aa=_0x1a3637();while(!![]){try{const _0x41c726=parseInt(_0x3eadb0(0xf0))/0x1+parseInt(_0x3eadb0(0x108))/0x2*(parseInt(_0x3eadb0(0xd1))/0x3)+parseInt(_0x3eadb0(0xe6))/0x4+parseInt(_0x3eadb0(0xdd))/0x5*(-parseInt(_0x3eadb0(0xd3))/0x6)+-parseInt(_0x3eadb0(0xcd))/0x7+parseInt(_0x3eadb0(0xea))/0x8*(parseInt(_0x3eadb0(0xe9))/0x9)+parseInt(_0x3eadb0(0xf4))/0xa*(-parseInt(_0x3eadb0(0xfb))/0xb);if(_0x41c726===_0x177412)break;else _0x5a93aa['push'](_0x5a93aa['shift']());}catch(_0x444600){_0x5a93aa['push'](_0x5a93aa['shift']());}}}(a7_0x2f26,0x57041));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';function a7_0x1c83(_0x37d376,_0x344889){_0x37d376=_0x37d376-0xc2;const _0x2f2601=a7_0x2f26();let _0x1c8340=_0x2f2601[_0x37d376];return _0x1c8340;}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([a7_0x1e1254(0x100),'proxy-authorization',a7_0x1e1254(0x104),'set-cookie',a7_0x1e1254(0xdc),a7_0x1e1254(0xd0),a7_0x1e1254(0xda),'x-trino-user']);function isSensitiveHeader(_0xed7f4d){const _0x709c2c=a7_0x1e1254;return SENSITIVE_HEADERS[_0x709c2c(0xeb)](_0xed7f4d['toLowerCase']());}function parseHeader(_0x260499){const _0x3f5f2d=a7_0x1e1254,_0x3d0d99=_0x260499[_0x3f5f2d(0x106)](':');if(_0x3d0d99===-0x1)throw new Error(_0x3f5f2d(0xe8)+_0x260499+_0x3f5f2d(0xd2)+_0x3f5f2d(0xc4));const _0x31f49f=_0x260499['substring'](0x0,_0x3d0d99)[_0x3f5f2d(0xe1)](),_0x19d84e=_0x260499[_0x3f5f2d(0xcc)](_0x3d0d99+0x1)['trim']();if(!_0x31f49f)throw new Error(_0x3f5f2d(0xe5)+_0x260499+'\x22');return[_0x31f49f,_0x19d84e];}export class ApiCommand extends BaseCommand{[a7_0x1e1254(0xc9)]=a7_0x1e1254(0xf1);[a7_0x1e1254(0xce)]=a7_0x1e1254(0xef);['validate'](_0x3fa4ed){const _0x498936=a7_0x1e1254,{args:_0x15a7b3,options:_0x3d17e2}=_0x3fa4ed,_0x4167f5=_0x3d17e2;if(_0x15a7b3[_0x498936(0xe4)]===0x0)return _0x498936(0xd5);const _0x21e0e9=_0x15a7b3[0x0];if(!_0x21e0e9[_0x498936(0xd8)]('/'))return'Endpoint\x20must\x20start\x20with\x20/:\x20'+_0x21e0e9;const _0x1f7825=_0x4167f5[_0x498936(0xe0)],_0x4fb389=_0x4167f5[_0x498936(0xf2)];if(_0x1f7825&&_0x4fb389)return _0x498936(0x102);const _0x1b87f0=_0x4167f5[_0x498936(0xdf)]||_0x498936(0xf6),_0x370b75=['GET','POST',_0x498936(0xc7),_0x498936(0xc5),_0x498936(0xf9)];if(!_0x370b75[_0x498936(0xcf)](_0x1b87f0[_0x498936(0xe2)]()))return _0x498936(0xc2)+_0x1b87f0+_0x498936(0x105)+_0x370b75[_0x498936(0xed)](',\x20');const _0x2220ea=_0x4167f5[_0x498936(0xde)]||'td',_0xe4671c=['td',_0x498936(0xf8),_0x498936(0xfa),_0x498936(0xca),_0x498936(0xd7),_0x498936(0xee),_0x498936(0xc6)];if(!_0xe4671c[_0x498936(0xcf)](_0x2220ea))return _0x498936(0xd4)+_0x2220ea+'.\x20Valid\x20types:\x20'+_0xe4671c[_0x498936(0xed)](',\x20');return undefined;}async[a7_0x1e1254(0xe7)](_0x3b5e75){const _0x152ee6=a7_0x1e1254,{options:_0x172a27,args:_0x4d2991,tdx:_0x28ca58}=_0x3b5e75,_0x11057d=_0x172a27,_0x2c70ba=_0x4d2991[0x0],_0x4f3140=(_0x11057d[_0x152ee6(0xdf)]||_0x152ee6(0xf6))['toUpperCase'](),_0x341721=_0x11057d['data'],_0xde367b=_0x11057d['file'],_0x307aed=_0x11057d['header'],_0x389743=_0x11057d[_0x152ee6(0xde)]||'td';try{const _0x48b952={};if(_0x307aed){const _0x4d930c=Array[_0x152ee6(0xff)](_0x307aed)?_0x307aed:[_0x307aed];for(const _0x28caf7 of _0x4d930c){const [_0x5dda42,_0x554e42]=parseHeader(_0x28caf7);_0x48b952[_0x5dda42]=_0x554e42;}}let _0x38310d;if(_0x341721)_0x38310d=_0x341721;else{if(_0xde367b)try{_0x38310d=RawAPI[_0x152ee6(0x101)](_0xde367b);}catch(_0x4b0bbc){return console['error']('Error:\x20'+(_0x4b0bbc instanceof Error?_0x4b0bbc[_0x152ee6(0xf7)]:String(_0x4b0bbc))),0x1;}}const _0x4cd184={'method':_0x4f3140,'apiType':_0x389743,'includeHeaders':_0x172a27[_0x152ee6(0xfd)]};_0x38310d&&(_0x4cd184[_0x152ee6(0xd6)]=_0x38310d);Object[_0x152ee6(0x103)](_0x48b952)[_0x152ee6(0xe4)]>0x0&&(_0x4cd184[_0x152ee6(0xec)]=_0x48b952);if(_0x172a27[_0x152ee6(0xfd)]){const _0x201577=resolveSite(_0x172a27['site']??'us01'),_0x312fb3=getEndpoint(_0x201577,_0x389743),_0xd3ced2=''+_0x312fb3+_0x2c70ba;console[_0x152ee6(0xdb)]('>\x20'+_0x4f3140+'\x20'+_0xd3ced2);const _0x2b2dba=getAuthHeaders(_0x201577),_0x1c7b87={..._0x2b2dba,..._0x48b952};for(const [_0x13b9c1,_0x223c11]of Object['entries'](_0x1c7b87)){!isSensitiveHeader(_0x13b9c1)&&console['error']('>\x20'+_0x13b9c1+':\x20'+_0x223c11);}_0x38310d&&console[_0x152ee6(0xdb)]('>'),console[_0x152ee6(0xdb)]('');}const _0x2b08be=await _0x28ca58['api'][_0x152ee6(0xfc)](_0x2c70ba,_0x4cd184);if(_0x172a27[_0x152ee6(0xfd)]&&_0x2b08be[_0x152ee6(0xec)]){console[_0x152ee6(0xdb)]('<\x20HTTP/1.1\x20'+_0x2b08be[_0x152ee6(0xd9)]);for(const [_0x1c04ee,_0x2eaacf]of Object[_0x152ee6(0x107)](_0x2b08be['headers'])){!isSensitiveHeader(_0x1c04ee)&&console[_0x152ee6(0xdb)]('<\x20'+_0x1c04ee+':\x20'+_0x2eaacf);}console[_0x152ee6(0xdb)]('');}const _0x2249a3=Boolean(_0x172a27[_0x152ee6(0x109)]),_0x4844ea={'color':_0x172a27[_0x152ee6(0xf3)],'noColor':_0x172a27[_0x152ee6(0xc8)]||_0x2249a3&&!_0x172a27[_0x152ee6(0xf3)]},_0x2a03ca=colorizeJSON(_0x2b08be[_0x152ee6(0xe0)],_0x4844ea);return _0x172a27[_0x152ee6(0x109)]?(writeFileSync(_0x172a27[_0x152ee6(0x109)],_0x2a03ca),console['error'](_0x152ee6(0xc3)+_0x172a27[_0x152ee6(0x109)])):console[_0x152ee6(0xfe)](_0x2a03ca),0x0;}catch(_0x38768a){return _0x38768a instanceof Error?(console[_0x152ee6(0xdb)](_0x152ee6(0xcb)+_0x38768a[_0x152ee6(0xf7)]),_0x172a27[_0x152ee6(0xfd)]&&_0x38768a[_0x152ee6(0xf5)]&&console['error'](_0x152ee6(0xe3)+_0x38768a[_0x152ee6(0xf5)])):console['error']('Error:\x20'+String(_0x38768a)),0x1;}}}
@@ -1 +1 @@
1
- {"version":3,"file":"auth-command.d.ts","sourceRoot":"","sources":["../../src/commands/auth-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAkB,MAAM,cAAc,CAAC;AAShF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAenE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,QAAQ,EACnB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC,OAAO,CAAC,IAAI,CAAC,CAiFf;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,CAmB3E;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,gDAAgD;IAE9D,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAuHxD;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,WAAW,qDAAqD;IAEnE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAmDxD;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,0CAA0C;IAExD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAUxD;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,yCAAyC;IAEvD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAgCxD"}
1
+ {"version":3,"file":"auth-command.d.ts","sourceRoot":"","sources":["../../src/commands/auth-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAkB,MAAM,cAAc,CAAC;AAShF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAenE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,QAAQ,EACnB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC,OAAO,CAAC,IAAI,CAAC,CAiFf;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,CAmB3E;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,gDAAgD;IAE9D,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAuHxD;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,WAAW,qDAAqD;IAEnE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAmDxD;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,0CAA0C;IAExD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAWxD;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,yCAAyC;IAEvD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAgCxD"}