mulesoft-anypoint-cli-agent-fabric-plugin 1.2.11 → 1.3.1-beta

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 (313) hide show
  1. package/LICENSE.txt +89 -0
  2. package/README.md +177 -31
  3. package/bin/run +6 -0
  4. package/dist/commands/agent-network/project/agent-console.d.ts +16 -0
  5. package/dist/commands/agent-network/project/agent-console.js +175 -0
  6. package/dist/commands/agent-network/project/agent-console.js.map +1 -0
  7. package/dist/commands/agent-network/project/broker/create.d.ts +10 -0
  8. package/dist/commands/agent-network/project/broker/create.js +192 -0
  9. package/dist/commands/agent-network/project/broker/create.js.map +1 -0
  10. package/dist/commands/agent-network/project/build.d.ts +1 -1
  11. package/dist/commands/agent-network/project/build.js +8 -3
  12. package/dist/commands/agent-network/project/build.js.map +1 -1
  13. package/dist/commands/agent-network/project/create.d.ts +13 -1
  14. package/dist/commands/agent-network/project/create.js +56 -14
  15. package/dist/commands/agent-network/project/create.js.map +1 -1
  16. package/dist/commands/agent-network/project/deploy.d.ts +25 -15
  17. package/dist/commands/agent-network/project/deploy.js +238 -181
  18. package/dist/commands/agent-network/project/deploy.js.map +1 -1
  19. package/dist/commands/agent-network/project/export-logs.d.ts +11 -0
  20. package/dist/commands/agent-network/project/export-logs.js +38 -0
  21. package/dist/commands/agent-network/project/export-logs.js.map +1 -0
  22. package/dist/commands/agent-network/project/mcp/introspect.js +13 -5
  23. package/dist/commands/agent-network/project/mcp/introspect.js.map +1 -1
  24. package/dist/commands/agent-network/project/publish.d.ts +1 -1
  25. package/dist/commands/agent-network/project/publish.js +9 -4
  26. package/dist/commands/agent-network/project/publish.js.map +1 -1
  27. package/dist/commands/agent-network/project/run-local.d.ts +85 -0
  28. package/dist/commands/agent-network/project/run-local.js +825 -0
  29. package/dist/commands/agent-network/project/run-local.js.map +1 -0
  30. package/dist/commands/agent-network/project/secrets.d.ts +21 -0
  31. package/dist/commands/agent-network/project/secrets.js +163 -0
  32. package/dist/commands/agent-network/project/secrets.js.map +1 -0
  33. package/dist/commands/agent-network/project/stop-local.d.ts +11 -0
  34. package/dist/commands/agent-network/project/stop-local.js +38 -0
  35. package/dist/commands/agent-network/project/stop-local.js.map +1 -0
  36. package/dist/commands/agent-network/project/undeploy.d.ts +3 -2
  37. package/dist/commands/agent-network/project/undeploy.js +66 -40
  38. package/dist/commands/agent-network/project/undeploy.js.map +1 -1
  39. package/dist/commands/agent-network/project/unpublish.d.ts +12 -3
  40. package/dist/commands/agent-network/project/unpublish.js +212 -62
  41. package/dist/commands/agent-network/project/unpublish.js.map +1 -1
  42. package/dist/commands/agent-network/setup/dependencies.js +5 -0
  43. package/dist/commands/agent-network/setup/dependencies.js.map +1 -1
  44. package/dist/commands/agent-network/setup/gateways.d.ts +4 -1
  45. package/dist/commands/agent-network/setup/gateways.js +74 -6
  46. package/dist/commands/agent-network/setup/gateways.js.map +1 -1
  47. package/dist/errors/base-error.js +5 -0
  48. package/dist/errors/base-error.js.map +1 -1
  49. package/dist/errors/error-factory.d.ts +53 -12
  50. package/dist/errors/error-factory.js +261 -36
  51. package/dist/errors/error-factory.js.map +1 -1
  52. package/dist/helpers/connection-id.js +5 -0
  53. package/dist/helpers/connection-id.js.map +1 -1
  54. package/dist/helpers/connection.js +5 -0
  55. package/dist/helpers/connection.js.map +1 -1
  56. package/dist/helpers/dependency-manager.js +8 -3
  57. package/dist/helpers/dependency-manager.js.map +1 -1
  58. package/dist/helpers/entitlement-utils.js +5 -0
  59. package/dist/helpers/entitlement-utils.js.map +1 -1
  60. package/dist/helpers/policy-helper.js +8 -3
  61. package/dist/helpers/policy-helper.js.map +1 -1
  62. package/dist/helpers/project/api-project-dependency-fetcher.js +5 -0
  63. package/dist/helpers/project/api-project-dependency-fetcher.js.map +1 -1
  64. package/dist/helpers/project/constants.d.ts +1 -0
  65. package/dist/helpers/project/constants.js +6 -0
  66. package/dist/helpers/project/constants.js.map +1 -1
  67. package/dist/helpers/project/debug-messages.js +5 -0
  68. package/dist/helpers/project/debug-messages.js.map +1 -1
  69. package/dist/helpers/project/templates.js +5 -0
  70. package/dist/helpers/project/templates.js.map +1 -1
  71. package/dist/helpers/project/uris.js +5 -0
  72. package/dist/helpers/project/uris.js.map +1 -1
  73. package/dist/helpers/project/validation-commons.js +5 -0
  74. package/dist/helpers/project/validation-commons.js.map +1 -1
  75. package/dist/helpers/proxy-agent.d.ts +2 -0
  76. package/dist/helpers/proxy-agent.js +26 -0
  77. package/dist/helpers/proxy-agent.js.map +1 -0
  78. package/dist/helpers/request-logging.js +6 -1
  79. package/dist/helpers/request-logging.js.map +1 -1
  80. package/dist/helpers/request-utils.d.ts +2 -1
  81. package/dist/helpers/request-utils.js +7 -2
  82. package/dist/helpers/request-utils.js.map +1 -1
  83. package/dist/helpers/types.js +5 -0
  84. package/dist/helpers/types.js.map +1 -1
  85. package/dist/helpers/utils.d.ts +17 -1
  86. package/dist/helpers/utils.js +32 -1
  87. package/dist/helpers/utils.js.map +1 -1
  88. package/dist/index.js +5 -0
  89. package/dist/index.js.map +1 -1
  90. package/dist/resources/agent-console.html +478 -0
  91. package/dist/resources/schemas/broker-deployment-settings.schema.json +46 -0
  92. package/dist/types/agent-network-v2.d.ts +4 -0
  93. package/dist/types/agent-network-v2.js +5 -0
  94. package/dist/types/agent-network-v2.js.map +1 -1
  95. package/dist/types/agent-network.js +5 -0
  96. package/dist/types/agent-network.js.map +1 -1
  97. package/dist/types/types.d.ts +31 -34
  98. package/dist/types/types.js +5 -0
  99. package/dist/types/types.js.map +1 -1
  100. package/dist/utils/access-management.js +5 -0
  101. package/dist/utils/access-management.js.map +1 -1
  102. package/dist/utils/builders/builder.js +5 -0
  103. package/dist/utils/builders/builder.js.map +1 -1
  104. package/dist/utils/builders/common/agent-metadata.js +5 -0
  105. package/dist/utils/builders/common/agent-metadata.js.map +1 -1
  106. package/dist/utils/builders/common/asset-file-resolver.js +5 -0
  107. package/dist/utils/builders/common/asset-file-resolver.js.map +1 -1
  108. package/dist/utils/builders/common/connection-facet-helpers.js +5 -0
  109. package/dist/utils/builders/common/connection-facet-helpers.js.map +1 -1
  110. package/dist/utils/builders/common/connection-metadata.js +5 -0
  111. package/dist/utils/builders/common/connection-metadata.js.map +1 -1
  112. package/dist/utils/builders/common/network-builder-helpers.js +5 -0
  113. package/dist/utils/builders/common/network-builder-helpers.js.map +1 -1
  114. package/dist/utils/builders/common/network-metadata.js +5 -0
  115. package/dist/utils/builders/common/network-metadata.js.map +1 -1
  116. package/dist/utils/builders/common/registry-entry.js +5 -0
  117. package/dist/utils/builders/common/registry-entry.js.map +1 -1
  118. package/dist/utils/builders/common/types.js +5 -0
  119. package/dist/utils/builders/common/types.js.map +1 -1
  120. package/dist/utils/builders/component-factory.d.ts +2 -0
  121. package/dist/utils/builders/component-factory.js +24 -0
  122. package/dist/utils/builders/component-factory.js.map +1 -0
  123. package/dist/utils/builders/local-space-resolver.d.ts +18 -0
  124. package/dist/utils/builders/local-space-resolver.js +43 -0
  125. package/dist/utils/builders/local-space-resolver.js.map +1 -0
  126. package/dist/utils/builders/network-lock.d.ts +2 -0
  127. package/dist/utils/builders/network-lock.js +56 -6
  128. package/dist/utils/builders/network-lock.js.map +1 -1
  129. package/dist/utils/builders/policies-factory.d.ts +5 -1
  130. package/dist/utils/builders/policies-factory.js +15 -2
  131. package/dist/utils/builders/policies-factory.js.map +1 -1
  132. package/dist/utils/builders/project-builder-impl.d.ts +17 -3
  133. package/dist/utils/builders/project-builder-impl.js +34 -1
  134. package/dist/utils/builders/project-builder-impl.js.map +1 -1
  135. package/dist/utils/builders/project-builder.d.ts +31 -3
  136. package/dist/utils/builders/project-builder.js +15 -2
  137. package/dist/utils/builders/project-builder.js.map +1 -1
  138. package/dist/utils/builders/remote-space-resolver.d.ts +5 -1
  139. package/dist/utils/builders/remote-space-resolver.js +120 -45
  140. package/dist/utils/builders/remote-space-resolver.js.map +1 -1
  141. package/dist/utils/builders/space-serializer.js +8 -1
  142. package/dist/utils/builders/space-serializer.js.map +1 -1
  143. package/dist/utils/builders/stage-diagnostics.d.ts +2 -0
  144. package/dist/utils/builders/stage-diagnostics.js +27 -0
  145. package/dist/utils/builders/stage-diagnostics.js.map +1 -0
  146. package/dist/utils/builders/tooling-metadata.d.ts +4 -4
  147. package/dist/utils/builders/tooling-metadata.js +32 -15
  148. package/dist/utils/builders/tooling-metadata.js.map +1 -1
  149. package/dist/utils/builders/v1/agent-builder.js +5 -0
  150. package/dist/utils/builders/v1/agent-builder.js.map +1 -1
  151. package/dist/utils/builders/v1/broker-builder.js +5 -0
  152. package/dist/utils/builders/v1/broker-builder.js.map +1 -1
  153. package/dist/utils/builders/v1/connections-builder.js +5 -0
  154. package/dist/utils/builders/v1/connections-builder.js.map +1 -1
  155. package/dist/utils/builders/v1/llm-builder.js +5 -0
  156. package/dist/utils/builders/v1/llm-builder.js.map +1 -1
  157. package/dist/utils/builders/v1/mcp-builder.js +5 -0
  158. package/dist/utils/builders/v1/mcp-builder.js.map +1 -1
  159. package/dist/utils/builders/v1/network-builder.js +7 -1
  160. package/dist/utils/builders/v1/network-builder.js.map +1 -1
  161. package/dist/utils/builders/v1/path.js +5 -0
  162. package/dist/utils/builders/v1/path.js.map +1 -1
  163. package/dist/utils/builders/v2/agent-builder.js +5 -0
  164. package/dist/utils/builders/v2/agent-builder.js.map +1 -1
  165. package/dist/utils/builders/v2/broker-builder.d.ts +1 -0
  166. package/dist/utils/builders/v2/broker-builder.js +74 -4
  167. package/dist/utils/builders/v2/broker-builder.js.map +1 -1
  168. package/dist/utils/builders/v2/connections-builder.js +5 -0
  169. package/dist/utils/builders/v2/connections-builder.js.map +1 -1
  170. package/dist/utils/builders/v2/llm-builder.js +5 -0
  171. package/dist/utils/builders/v2/llm-builder.js.map +1 -1
  172. package/dist/utils/builders/v2/mcp-builder.js +5 -0
  173. package/dist/utils/builders/v2/mcp-builder.js.map +1 -1
  174. package/dist/utils/builders/v2/network-builder.js +8 -3
  175. package/dist/utils/builders/v2/network-builder.js.map +1 -1
  176. package/dist/utils/builders/v2/path.js +5 -0
  177. package/dist/utils/builders/v2/path.js.map +1 -1
  178. package/dist/utils/constants.d.ts +3 -2
  179. package/dist/utils/constants.js +13 -5
  180. package/dist/utils/constants.js.map +1 -1
  181. package/dist/utils/deployment-settings.d.ts +13 -0
  182. package/dist/utils/deployment-settings.js +97 -0
  183. package/dist/utils/deployment-settings.js.map +1 -0
  184. package/dist/utils/dry-run/dry-run-render.d.ts +19 -0
  185. package/dist/utils/dry-run/dry-run-render.js +137 -0
  186. package/dist/utils/dry-run/dry-run-render.js.map +1 -0
  187. package/dist/utils/exchange.js +5 -0
  188. package/dist/utils/exchange.js.map +1 -1
  189. package/dist/utils/facets/abstract-facet.d.ts +1 -0
  190. package/dist/utils/facets/abstract-facet.js +8 -0
  191. package/dist/utils/facets/abstract-facet.js.map +1 -1
  192. package/dist/utils/facets/agent-graph-facet.d.ts +14 -1
  193. package/dist/utils/facets/agent-graph-facet.js +139 -53
  194. package/dist/utils/facets/agent-graph-facet.js.map +1 -1
  195. package/dist/utils/facets/api-instance-facet.d.ts +37 -3
  196. package/dist/utils/facets/api-instance-facet.js +221 -65
  197. package/dist/utils/facets/api-instance-facet.js.map +1 -1
  198. package/dist/utils/facets/apim-policy-helpers.d.ts +13 -12
  199. package/dist/utils/facets/apim-policy-helpers.js +34 -22
  200. package/dist/utils/facets/apim-policy-helpers.js.map +1 -1
  201. package/dist/utils/facets/asset-facet.js +12 -9
  202. package/dist/utils/facets/asset-facet.js.map +1 -1
  203. package/dist/utils/facets/connection-facet.d.ts +9 -2
  204. package/dist/utils/facets/connection-facet.js +97 -68
  205. package/dist/utils/facets/connection-facet.js.map +1 -1
  206. package/dist/utils/facets/deployment-helpers.d.ts +18 -1
  207. package/dist/utils/facets/deployment-helpers.js +58 -0
  208. package/dist/utils/facets/deployment-helpers.js.map +1 -1
  209. package/dist/utils/facets/deployment-logs.d.ts +5 -0
  210. package/dist/utils/facets/deployment-logs.js +88 -0
  211. package/dist/utils/facets/deployment-logs.js.map +1 -0
  212. package/dist/utils/facets/deployment-runner.d.ts +2 -1
  213. package/dist/utils/facets/deployment-runner.js +22 -2
  214. package/dist/utils/facets/deployment-runner.js.map +1 -1
  215. package/dist/utils/facets/facets.d.ts +2 -0
  216. package/dist/utils/facets/facets.js +25 -3
  217. package/dist/utils/facets/facets.js.map +1 -1
  218. package/dist/utils/facets/mule-application-facet.d.ts +1 -1
  219. package/dist/utils/facets/mule-application-facet.js +38 -25
  220. package/dist/utils/facets/mule-application-facet.js.map +1 -1
  221. package/dist/utils/facets/publication-metadata-patcher.js +5 -0
  222. package/dist/utils/facets/publication-metadata-patcher.js.map +1 -1
  223. package/dist/utils/facets/publication-rank.js +5 -0
  224. package/dist/utils/facets/publication-rank.js.map +1 -1
  225. package/dist/utils/facets/undeploy-helpers.js +5 -0
  226. package/dist/utils/facets/undeploy-helpers.js.map +1 -1
  227. package/dist/utils/facets/unpublish-preflight.js +5 -0
  228. package/dist/utils/facets/unpublish-preflight.js.map +1 -1
  229. package/dist/utils/files.d.ts +25 -0
  230. package/dist/utils/files.js +67 -0
  231. package/dist/utils/files.js.map +1 -1
  232. package/dist/utils/gateway-mode.js +5 -0
  233. package/dist/utils/gateway-mode.js.map +1 -1
  234. package/dist/utils/gateway.d.ts +6 -2
  235. package/dist/utils/gateway.js +42 -33
  236. package/dist/utils/gateway.js.map +1 -1
  237. package/dist/utils/keychain.d.ts +56 -0
  238. package/dist/utils/keychain.js +488 -0
  239. package/dist/utils/keychain.js.map +1 -0
  240. package/dist/utils/logger.d.ts +1 -0
  241. package/dist/utils/logger.js +22 -14
  242. package/dist/utils/logger.js.map +1 -1
  243. package/dist/utils/mcp/mcp-metadata-mapper.d.ts +8 -0
  244. package/dist/utils/mcp/mcp-metadata-mapper.js +12 -1
  245. package/dist/utils/mcp/mcp-metadata-mapper.js.map +1 -1
  246. package/dist/utils/mcp/project-registrar.js +7 -26
  247. package/dist/utils/mcp/project-registrar.js.map +1 -1
  248. package/dist/utils/mcp/registry-key.js +5 -0
  249. package/dist/utils/mcp/registry-key.js.map +1 -1
  250. package/dist/utils/naming.d.ts +14 -0
  251. package/dist/utils/naming.js +41 -0
  252. package/dist/utils/naming.js.map +1 -1
  253. package/dist/utils/promise/promiseCreator.js +5 -0
  254. package/dist/utils/promise/promiseCreator.js.map +1 -1
  255. package/dist/utils/report/junit-report.js +5 -0
  256. package/dist/utils/report/junit-report.js.map +1 -1
  257. package/dist/utils/report/validation-report.js +5 -0
  258. package/dist/utils/report/validation-report.js.map +1 -1
  259. package/dist/utils/request-executor.d.ts +5 -5
  260. package/dist/utils/request-executor.js +5 -0
  261. package/dist/utils/request-executor.js.map +1 -1
  262. package/dist/utils/run-local/agent-console-proxy.d.ts +56 -0
  263. package/dist/utils/run-local/agent-console-proxy.js +182 -0
  264. package/dist/utils/run-local/agent-console-proxy.js.map +1 -0
  265. package/dist/utils/run-local/broker-recreate-selector.d.ts +31 -0
  266. package/dist/utils/run-local/broker-recreate-selector.js +82 -0
  267. package/dist/utils/run-local/broker-recreate-selector.js.map +1 -0
  268. package/dist/utils/run-local/build-status.d.ts +73 -0
  269. package/dist/utils/run-local/build-status.js +210 -0
  270. package/dist/utils/run-local/build-status.js.map +1 -0
  271. package/dist/utils/run-local/constants.d.ts +28 -0
  272. package/dist/utils/run-local/constants.js +36 -0
  273. package/dist/utils/run-local/constants.js.map +1 -0
  274. package/dist/utils/run-local/crd-files.d.ts +2 -0
  275. package/dist/utils/run-local/crd-files.js +24 -0
  276. package/dist/utils/run-local/crd-files.js.map +1 -0
  277. package/dist/utils/run-local/index.d.ts +9 -0
  278. package/dist/utils/run-local/index.js +42 -0
  279. package/dist/utils/run-local/index.js.map +1 -0
  280. package/dist/utils/run-local/local-a2a-upstream.d.ts +9 -0
  281. package/dist/utils/run-local/local-a2a-upstream.js +55 -0
  282. package/dist/utils/run-local/local-a2a-upstream.js.map +1 -0
  283. package/dist/utils/run-local/local-deploy-descriptor.d.ts +36 -0
  284. package/dist/utils/run-local/local-deploy-descriptor.js +70 -0
  285. package/dist/utils/run-local/local-deploy-descriptor.js.map +1 -0
  286. package/dist/utils/run-local/local-run-manager.d.ts +51 -0
  287. package/dist/utils/run-local/local-run-manager.js +220 -0
  288. package/dist/utils/run-local/local-run-manager.js.map +1 -0
  289. package/dist/utils/run-local/policy-resolver.d.ts +69 -0
  290. package/dist/utils/run-local/policy-resolver.js +461 -0
  291. package/dist/utils/run-local/policy-resolver.js.map +1 -0
  292. package/dist/utils/run-local/runtime-environment-manager.d.ts +89 -0
  293. package/dist/utils/run-local/runtime-environment-manager.js +313 -0
  294. package/dist/utils/run-local/runtime-environment-manager.js.map +1 -0
  295. package/dist/utils/run-local/secrets-manager.d.ts +66 -0
  296. package/dist/utils/run-local/secrets-manager.js +181 -0
  297. package/dist/utils/run-local/secrets-manager.js.map +1 -0
  298. package/dist/utils/uris.d.ts +5 -0
  299. package/dist/utils/uris.js +23 -1
  300. package/dist/utils/uris.js.map +1 -1
  301. package/dist/utils/variables.d.ts +17 -4
  302. package/dist/utils/variables.js +57 -7
  303. package/dist/utils/variables.js.map +1 -1
  304. package/dist/utils/zip-utils.js +5 -0
  305. package/dist/utils/zip-utils.js.map +1 -1
  306. package/package.json +7 -5
  307. package/scripts/check-gus-ticket-format.sh +29 -0
  308. package/scripts/resolve-version.sh +241 -0
  309. package/scripts/resolve-version.test.sh +278 -0
  310. package/scripts/test-publish-npm.sh +130 -0
  311. package/templates/agent-network/exchange.json.template +1 -0
  312. package/templates/agentic-network/brokers/broker1.agent.template +2 -2
  313. package/templates/agentic-network/exchange.json.template +1 -0
package/LICENSE.txt ADDED
@@ -0,0 +1,89 @@
1
+ Terms of Use
2
+
3
+ Copyright 2026 Salesforce, Inc. All rights reserved.
4
+
5
+ These Terms of Use govern the download, installation, and/or use of this
6
+ software provided by Salesforce, Inc. ("Salesforce") (the "Software"), were
7
+ last updated on March 24, 2026, and constitute a legally binding
8
+ agreement between you and Salesforce. If you do not agree to these Terms of
9
+ Use, do not install or use the Software. The Software may link to
10
+ third-party software components licensed under various open source licenses
11
+ ("Open Source Components"). These Terms of Use pertain solely to
12
+ Salesforce's proprietary code in the Software. It does not alter or extend
13
+ any rights or obligations regarding the Open Source Components. For clarity,
14
+ your use of the Open Source Components is governed by the terms of the
15
+ applicable open source license(s). You are solely responsible for complying
16
+ with the terms and conditions of those open source licenses.
17
+
18
+ Salesforce grants you a worldwide, non-exclusive, no-charge, royalty-free
19
+ copyright license to reproduce, prepare derivative works of, revocable,
20
+ publicly display, publicly perform, sublicense, and distribute the Software
21
+ and derivative works subject to these Terms. These Terms shall be included
22
+ in all copies or substantial portions of the Software.
23
+
24
+ Subject to the limited rights expressly granted hereunder, Salesforce
25
+ reserves all rights, title, and interest in and to all intellectual
26
+ property subsisting in the Software. No rights are granted to you hereunder
27
+ other than as expressly set forth herein. Users residing in countries on
28
+ the United States Office of Foreign Assets Control sanction list, or which
29
+ are otherwise subject to a US export embargo, may not use the Software.
30
+
31
+ Implementation of the Software may require development work, for which you
32
+ are responsible. The Software may contain bugs, errors and
33
+ incompatibilities and is made available on an AS IS basis without support,
34
+ updates, or service level commitments.
35
+
36
+ Salesforce reserves the right at any time to modify, suspend, or
37
+ discontinue, the Software (or any part thereof) with or without notice. You
38
+ agree that Salesforce shall not be liable to you or to any third party for
39
+ any modification, suspension, or discontinuance.
40
+
41
+ You agree to defend Salesforce against any claim, demand, suit or
42
+ proceeding made or brought against Salesforce by a third party arising out
43
+ of or accruing from (a) your use of the Software, and (b) any application
44
+ you develop with the Software that infringes any copyright, trademark,
45
+ trade secret, trade dress, patent, or other intellectual property right of
46
+ any person or defames any person or violates their rights of publicity or
47
+ privacy (each a "Claim Against Salesforce"), and will indemnify Salesforce
48
+ from any damages, attorney fees, and costs finally awarded against
49
+ Salesforce as a result of, or for any amounts paid by Salesforce under a
50
+ settlement approved by you in writing of, a Claim Against Salesforce,
51
+ provided Salesforce (x) promptly gives you written notice of the Claim
52
+ Against Salesforce, (y) gives you sole control of the defense and
53
+ settlement of the Claim Against Salesforce (except that you may not settle
54
+ any Claim Against Salesforce unless it unconditionally releases Salesforce
55
+ of all liability), and (z) gives you all reasonable assistance, at your
56
+ expense.
57
+
58
+ WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE SOFTWARE IS NOT
59
+ SUPPORTED AND IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60
+ IMPLIED. IN NO EVENT SHALL SALESFORCE HAVE ANY LIABILITY FOR ANY DAMAGES,
61
+ INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
62
+ PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES BASED ON LOST PROFITS, DATA,
63
+ OR USE, IN CONNECTION WITH THE SOFTWARE, HOWEVER CAUSED AND WHETHER IN
64
+ CONTRACT, TORT, OR UNDER ANY OTHER THEORY OF LIABILITY, WHETHER OR NOT YOU
65
+ HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
66
+
67
+ These Terms of Use shall be governed exclusively by the internal laws of
68
+ the State of California, without regard to its conflicts of laws
69
+ rules. Each party hereby consents to the exclusive jurisdiction of the
70
+ state and federal courts located in San Francisco County, California to
71
+ adjudicate any dispute arising out of or relating to these Terms of Use and
72
+ the download, installation, and/or use of the Software. Except as expressly
73
+ stated herein, these Terms of Use constitute the entire agreement between
74
+ the parties, and supersede all prior and contemporaneous agreements,
75
+ proposals, or representations, written or oral, concerning their subject
76
+ matter. No modification, amendment, or waiver of any provision of these
77
+ Terms of Use shall be effective unless it is by an update to these Terms of
78
+ Use that Salesforce makes available, or is in writing and signed by the
79
+ party against whom the modification, amendment, or waiver is to be
80
+ asserted.
81
+
82
+ Data Privacy: Salesforce may collect, process, and store device,
83
+ system, and other information related to your use of the Software. This
84
+ information includes, but is not limited to, IP address, user metrics, and
85
+ other data ("Usage Data"). Salesforce may use Usage Data for analytics,
86
+ product development, and marketing purposes. You acknowledge that files
87
+ generated in conjunction with the Software may contain sensitive or
88
+ confidential data, and you are solely responsible for anonymizing and
89
+ protecting such data.
package/README.md CHANGED
@@ -5,15 +5,41 @@ This plugin provides CLI commands for managing Agent Fabric projects, specifical
5
5
  ## Commands
6
6
 
7
7
  <!-- commands -->
8
+ * [`anypoint-cli-agent-fabric-plugin agent-network project broker create`](#anypoint-cli-agent-fabric-plugin-agent-network-project-broker-create)
8
9
  * [`anypoint-cli-agent-fabric-plugin agent-network project build`](#anypoint-cli-agent-fabric-plugin-agent-network-project-build)
9
10
  * [`anypoint-cli-agent-fabric-plugin agent-network project create`](#anypoint-cli-agent-fabric-plugin-agent-network-project-create)
10
11
  * [`anypoint-cli-agent-fabric-plugin agent-network project deploy`](#anypoint-cli-agent-fabric-plugin-agent-network-project-deploy)
11
12
  * [`anypoint-cli-agent-fabric-plugin agent-network project publish`](#anypoint-cli-agent-fabric-plugin-agent-network-project-publish)
13
+ * [`anypoint-cli-agent-fabric-plugin agent-network project undeploy`](#anypoint-cli-agent-fabric-plugin-agent-network-project-undeploy)
14
+ * [`anypoint-cli-agent-fabric-plugin agent-network project unpublish`](#anypoint-cli-agent-fabric-plugin-agent-network-project-unpublish)
12
15
  * [`anypoint-cli-agent-fabric-plugin agent-network setup gateways`](#anypoint-cli-agent-fabric-plugin-agent-network-setup-gateways)
13
16
  * [`anypoint-cli-agent-fabric-plugin conf [KEY] [VALUE]`](#anypoint-cli-agent-fabric-plugin-conf-key-value)
14
17
  * [`anypoint-cli-agent-fabric-plugin help [COMMAND]`](#anypoint-cli-agent-fabric-plugin-help-command)
15
18
  * [`anypoint-cli-agent-fabric-plugin version`](#anypoint-cli-agent-fabric-plugin-version)
16
19
 
20
+ ## `anypoint-cli-agent-fabric-plugin agent-network project broker create`
21
+
22
+ Create a new broker in an existing agent network project
23
+
24
+ ```
25
+ USAGE
26
+ $ anypoint-cli-agent-fabric-plugin agent-network project broker create -n <value> [--path <value>]
27
+
28
+ FLAGS
29
+ -n, --name=<value> (required) Name of the broker
30
+ --path=<value> [default: .] Path to the project directory (where exchange.json lives)
31
+
32
+ DESCRIPTION
33
+ Create a new broker in an existing agent network project
34
+
35
+ EXAMPLES
36
+ $ agent-network project broker create --name my-broker
37
+
38
+ $ agent-network project broker create --name "My New Broker"
39
+
40
+ $ agent-network project broker create --name my-broker --path ./my-project
41
+ ```
42
+
17
43
  ## `anypoint-cli-agent-fabric-plugin agent-network project build`
18
44
 
19
45
  Build the current project using the Maven wrapper (mvnw or mvnw.cmd)
@@ -55,7 +81,7 @@ USAGE
55
81
  $ anypoint-cli-agent-fabric-plugin agent-network project create -n <value> [--password <value> [--username <value> | --client_id
56
82
  <value> | ]] [--client_secret <value> ] [--bearer <value> | | ] [--organization <value>] [--environment <value>]
57
83
  [--host <value>] [--collectMetrics] [-o <value>] [--group-id <value>] [--asset-id <value>] [--asset-version <value>]
58
- [--api-version <value>] [--tab-size <value>] [--create-dir]
84
+ [--api-version <value>] [--tab-size <value>] [--create-dir] [--empty-project]
59
85
 
60
86
  FLAGS
61
87
  -n, --name=<value> (required) Name of the project
@@ -68,6 +94,8 @@ FLAGS
68
94
  --client_secret=<value> Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment variable.
69
95
  --[no-]collectMetrics collect metrics. You can define this in the COLLECT_METRICS environment variable.
70
96
  --[no-]create-dir Create new directory at output-dir for the new project using project's name
97
+ --empty-project Scaffold a minimal project with no example content: only exchange.json and a bare
98
+ agent-network.yaml, with no brokers directory
71
99
  --environment=<value> Environment Name. You can define this in the ANYPOINT_ENV environment variable.
72
100
  --group-id=<value> Group Id (GAV)
73
101
  --host=anypoint.mulesoft.com [default: anypoint.mulesoft.com] Host URL. You can define this in the ANYPOINT_HOST
@@ -93,38 +121,50 @@ USAGE
93
121
  $ anypoint-cli-agent-fabric-plugin agent-network project deploy [--password <value> [--username <value> | --client_id <value> |
94
122
  ]] [--client_secret <value> ] [--bearer <value> | | ] [--organization <value>] [--environment <value>] [--host
95
123
  <value>] [--collectMetrics] [-g <value>] [-i <value>] [-e <value>] [-t <value>] [--dont-wait-for-agent-network]
96
- [--disable-tracing] [--property <value>] [--path <value>] [--max-retries <value>] [--request-timeout <value>]
97
- [--process-timeout <value>] [--json]
124
+ [--disable-tracing] [--property <value>] [--deployment-properties-file <value>] [--deployment-property <value>]
125
+ [--path <value>] [--max-retries <value>] [--request-timeout <value>] [--process-timeout <value>]
126
+ [--disable-autopublish] [--json]
98
127
 
99
128
  FLAGS
100
- -e, --egress-gw=<value> Name of the target egress gw (separate-gateways mode; requires --ingress-gw). When no
101
- gateway flags are provided, deploy defaults to single-gateway mode using
102
- agent-network-gw.
103
- -g, --gateway=<value> Name of the gateway for single-gateway mode (recommended). Mutually exclusive with
104
- --ingress-gw and --egress-gw.
105
- -i, --ingress-gw=<value> Name of the target ingress gw. Combine with --egress-gw for separate-gateways mode; on
106
- its own it selects single-gateway mode using this gateway. When no gateway flags are
107
- provided, deploy defaults to single-gateway mode using agent-network-gw.
108
- -t, --target-space=<value> Name of the target space to deploy. In single-gateway mode, optional; when provided it
109
- must match the gateway's target space (validated, not used for lookup). In
110
- separate-gateways mode, defaults to agent-network-space.
111
- --bearer=<value> Token Bearer. You can define this in the ANYPOINT_BEARER environment variable.
112
- --client_id=<value> Client ID. You can define this in the ANYPOINT_CLIENT_ID environment variable.
113
- --client_secret=<value> Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment variable.
114
- --[no-]collectMetrics collect metrics. You can define this in the COLLECT_METRICS environment variable.
115
- --disable-tracing Disable tracing functionalities
116
- --dont-wait-for-agent-network Do not wait for the Agent Network to be ready
117
- --environment=<value> Environment Name. You can define this in the ANYPOINT_ENV environment variable.
118
- --host=anypoint.mulesoft.com [default: anypoint.mulesoft.com] Host URL. You can define this in the ANYPOINT_HOST
119
- environment variable.
120
- --max-retries=<value> [default: 3] Max retries to check the status of the deploying application.
121
- --organization=<value> Organization Name. You can define this in the ANYPOINT_ORG environment variable.
122
- --password=<value> Password. You can define this in the ANYPOINT_PASSWORD environment variable.
123
- --path=<value> [default: .] The path to the project.
124
- --process-timeout=<value> [default: 600000] Request timeout in millis.
125
- --property=<value>... [default: ] Property to override in format name:value (e.g., --property apiKey:sk-xxx)
126
- --request-timeout=<value> [default: 60000] Request timeout in millis.
127
- --username=<value> Username. You can define this in the ANYPOINT_USERNAME environment variable.
129
+ -e, --egress-gw=<value> Name of the target egress gw (separate-gateways mode; requires --ingress-gw).
130
+ When no gateway flags are provided, deploy defaults to single-gateway mode using
131
+ agent-network-gw.
132
+ -g, --gateway=<value> Name of the gateway for single-gateway mode (recommended). Mutually exclusive
133
+ with --ingress-gw and --egress-gw.
134
+ -i, --ingress-gw=<value> Name of the target ingress gw. Combine with --egress-gw for separate-gateways
135
+ mode; on its own it selects single-gateway mode using this gateway. When no
136
+ gateway flags are provided, deploy defaults to single-gateway mode using
137
+ agent-network-gw.
138
+ -t, --target-space=<value> Name of the target space to deploy. In single-gateway mode, optional; when
139
+ provided it must match the gateway's target space (validated, not used for
140
+ lookup). In separate-gateways mode, defaults to agent-network-space.
141
+ --bearer=<value> Token Bearer. You can define this in the ANYPOINT_BEARER environment variable.
142
+ --client_id=<value> Client ID. You can define this in the ANYPOINT_CLIENT_ID environment variable.
143
+ --client_secret=<value> Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment
144
+ variable.
145
+ --[no-]collectMetrics collect metrics. You can define this in the COLLECT_METRICS environment
146
+ variable.
147
+ --deployment-properties-file=<value> Path to a YAML file of typed deployment settings, keyed by scope (e.g. a
148
+ top-level "brokers:" mapping vCores, resources.*, logging.level,
149
+ runtimeVersion). Mutually exclusive with --deployment-property.
150
+ --deployment-property=<value>... [default: ] Typed deployment setting in format <scope>:<name>:<value> (e.g.,
151
+ --deployment-property brokers:vCores:0.1). Repeatable. Mutually exclusive with
152
+ --deployment-properties-file.
153
+ --disable-autopublish Disable automatic publishing when lock file is not found.
154
+ --disable-tracing Disable tracing functionalities
155
+ --dont-wait-for-agent-network Do not wait for the Agent Network to be ready
156
+ --environment=<value> Environment Name. You can define this in the ANYPOINT_ENV environment variable.
157
+ --host=anypoint.mulesoft.com [default: anypoint.mulesoft.com] Host URL. You can define this in the
158
+ ANYPOINT_HOST environment variable.
159
+ --max-retries=<value> [default: 3] Max retries to check the status of the deploying application.
160
+ --organization=<value> Organization Name. You can define this in the ANYPOINT_ORG environment variable.
161
+ --password=<value> Password. You can define this in the ANYPOINT_PASSWORD environment variable.
162
+ --path=<value> [default: .] The path to the project.
163
+ --process-timeout=<value> [default: 900000] Request timeout in millis.
164
+ --property=<value>... [default: ] Property to override in format name:value (e.g., --property
165
+ apiKey:sk-xxx)
166
+ --request-timeout=<value> [default: 60000] Request timeout in millis.
167
+ --username=<value> Username. You can define this in the ANYPOINT_USERNAME environment variable.
128
168
 
129
169
  GLOBAL FLAGS
130
170
  --json Format output as json.
@@ -176,6 +216,107 @@ EXAMPLES
176
216
  $ agent-network project publish
177
217
  ```
178
218
 
219
+ ## `anypoint-cli-agent-fabric-plugin agent-network project undeploy`
220
+
221
+ Undeploys the Agent Network application, removing all deployed resources
222
+
223
+ ```
224
+ USAGE
225
+ $ anypoint-cli-agent-fabric-plugin agent-network project undeploy [--password <value> [--username <value> | --client_id <value> |
226
+ ]] [--client_secret <value> ] [--bearer <value> | | ] [--organization <value>] [--environment <value>] [--host
227
+ <value>] [--collectMetrics] [--path <value> | --gav <value>] [--api-version <value>] [--request-timeout <value>]
228
+ [--process-timeout <value>] [--dry-run | ] [--json]
229
+
230
+ FLAGS
231
+ --api-version=<value> [default: v1] Api Version used to discover remotely deployed resources when using --gav.
232
+ --bearer=<value> Token Bearer. You can define this in the ANYPOINT_BEARER environment variable.
233
+ --client_id=<value> Client ID. You can define this in the ANYPOINT_CLIENT_ID environment variable.
234
+ --client_secret=<value> Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment variable.
235
+ --[no-]collectMetrics collect metrics. You can define this in the COLLECT_METRICS environment variable.
236
+ --dry-run Preview the deploy-plane resources that would be undeployed without deleting anything.
237
+ --environment=<value> Environment Name. You can define this in the ANYPOINT_ENV environment variable.
238
+ --gav=<value> Parent asset GAV (groupId:assetId:version). Discovers deployed resources remotely.
239
+ Requires an environment to be selected.
240
+ --host=anypoint.mulesoft.com [default: anypoint.mulesoft.com] Host URL. You can define this in the ANYPOINT_HOST
241
+ environment variable.
242
+ --organization=<value> Organization Name. You can define this in the ANYPOINT_ORG environment variable.
243
+ --password=<value> Password. You can define this in the ANYPOINT_PASSWORD environment variable.
244
+ --path=<value> The path to the project. Discovers deployed resources remotely from the project lock
245
+ file. Requires an environment to be selected.
246
+ --process-timeout=<value> [default: 900000] Process timeout in millis.
247
+ --request-timeout=<value> [default: 60000] Request timeout in millis.
248
+ --username=<value> Username. You can define this in the ANYPOINT_USERNAME environment variable.
249
+
250
+ GLOBAL FLAGS
251
+ --json Format output as json.
252
+
253
+ DESCRIPTION
254
+ Undeploys the Agent Network application, removing all deployed resources
255
+
256
+ EXAMPLES
257
+ $ agent-network project undeploy --environment Sandbox
258
+
259
+ $ agent-network project undeploy --path ./my-project --environment Sandbox
260
+
261
+ $ agent-network project undeploy --gav myOrgId:my-network:0.0.0 --environment Sandbox
262
+
263
+ $ agent-network project undeploy --dry-run --environment Sandbox
264
+ ```
265
+
266
+ ## `anypoint-cli-agent-fabric-plugin agent-network project unpublish`
267
+
268
+ Removes the Agent Network assets from Anypoint Exchange. By default performs a soft-delete: the asset version is deleted and can no longer be used, but its GAV (groupId, assetId, version) stays reserved and cannot be claimed by a new asset, and the removal cannot be restored or undeleted. To free the GAV for reuse by another asset, use --hard-delete for an irreversible permanent removal.
269
+
270
+ ```
271
+ USAGE
272
+ $ anypoint-cli-agent-fabric-plugin agent-network project unpublish [--password <value> [--username <value> | --client_id <value> |
273
+ ]] [--client_secret <value> ] [--bearer <value> | | ] [--organization <value>] [--environment <value>] [--host
274
+ <value>] [--collectMetrics] [--path <value> | --gav <value>] [--api-version <value>] [--hard-delete] [--dry-run | ]
275
+ [--json]
276
+
277
+ FLAGS
278
+ --api-version=<value> [default: v1] Api Version used to discover remotely published assets when using --gav.
279
+ --bearer=<value> Token Bearer. You can define this in the ANYPOINT_BEARER environment variable.
280
+ --client_id=<value> Client ID. You can define this in the ANYPOINT_CLIENT_ID environment variable.
281
+ --client_secret=<value> Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment variable.
282
+ --[no-]collectMetrics collect metrics. You can define this in the COLLECT_METRICS environment variable.
283
+ --dry-run Preview the Exchange assets that would be unpublished without deleting anything.
284
+ --environment=<value> Environment Name. You can define this in the ANYPOINT_ENV environment variable.
285
+ --gav=<value> Parent asset GAV (groupId:assetId:version). Discovers assets remotely. Use --environment
286
+ to enable the active API instances safety check.
287
+ --hard-delete Permanently delete assets from Exchange. Unlike the default soft-delete, this frees the
288
+ asset GAV (groupId, assetId, version) so it can be reused by another asset. This cannot
289
+ be undone. Assets with dependent versions, API instances, or policies applied to managed
290
+ APIs must have those removed first.
291
+ --host=anypoint.mulesoft.com [default: anypoint.mulesoft.com] Host URL. You can define this in the ANYPOINT_HOST
292
+ environment variable.
293
+ --organization=<value> Organization Name. You can define this in the ANYPOINT_ORG environment variable.
294
+ --password=<value> Password. You can define this in the ANYPOINT_PASSWORD environment variable.
295
+ --path=<value> The path to the project. Reads the published assets from the project lock file. Select
296
+ an environment to enable the active API instances safety check.
297
+ --username=<value> Username. You can define this in the ANYPOINT_USERNAME environment variable.
298
+
299
+ GLOBAL FLAGS
300
+ --json Format output as json.
301
+
302
+ DESCRIPTION
303
+ Removes the Agent Network assets from Anypoint Exchange. By default performs a soft-delete: the asset version is
304
+ deleted and can no longer be used, but its GAV (groupId, assetId, version) stays reserved and cannot be claimed by a
305
+ new asset, and the removal cannot be restored or undeleted. To free the GAV for reuse by another asset, use
306
+ --hard-delete for an irreversible permanent removal.
307
+
308
+ EXAMPLES
309
+ $ agent-network project unpublish --environment Sandbox
310
+
311
+ $ agent-network project unpublish --path ./my-project --environment Sandbox
312
+
313
+ $ agent-network project unpublish --hard-delete --environment Sandbox
314
+
315
+ $ agent-network project unpublish --gav myOrgId:my-network:0.0.0 --environment Sandbox
316
+
317
+ $ agent-network project unpublish --dry-run --environment Sandbox
318
+ ```
319
+
179
320
  ## `anypoint-cli-agent-fabric-plugin agent-network setup gateways`
180
321
 
181
322
  Set up the Agent Network environment with the required gateways.
@@ -185,6 +326,7 @@ USAGE
185
326
  $ anypoint-cli-agent-fabric-plugin agent-network setup gateways [--password <value> [--username <value> | --client_id <value> |
186
327
  ]] [--client_secret <value> ] [--bearer <value> | | ] [--organization <value>] [--environment <value>] [--host
187
328
  <value>] [--collectMetrics] [-t <value>] [-g <value>] [-i <value>] [-e <value>] [--dont-wait-for-gateways-running]
329
+ [--update]
188
330
 
189
331
  FLAGS
190
332
  -e, --egress-gw=<value> Name of the egress gw (separate-gateway mode; requires --ingress-gw)
@@ -204,6 +346,8 @@ FLAGS
204
346
  environment variable.
205
347
  --organization=<value> Organization Name. You can define this in the ANYPOINT_ORG environment variable.
206
348
  --password=<value> Password. You can define this in the ANYPOINT_PASSWORD environment variable.
349
+ --update If a gateway already exists, check for the latest runtime version available on its
350
+ release channel and update it.
207
351
  --username=<value> Username. You can define this in the ANYPOINT_USERNAME environment variable.
208
352
 
209
353
  DESCRIPTION
@@ -341,3 +485,5 @@ npm run lint
341
485
  ## License
342
486
 
343
487
  MIT
488
+
489
+ ## TEST SFCI VERSIONING
package/bin/run CHANGED
@@ -2,4 +2,10 @@
2
2
 
3
3
  const oclif = require('@oclif/core')
4
4
 
5
+ // bin/run is the compiled entry (oclif.commands = ./dist/commands). oclif otherwise
6
+ // rewrites that to src/*.ts whenever NODE_ENV is development/test — including the
7
+ // Extension Development Host, which exports NODE_ENV=development into the terminal.
8
+ // Node 22+ type-stripping then rejects `import X =` in those sources.
9
+ oclif.settings.tsnodeEnabled = false
10
+
5
11
  oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
@@ -0,0 +1,16 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class AgentConsole extends Command {
3
+ static description: string;
4
+ static hidden: boolean;
5
+ static examples: string[];
6
+ static flags: {
7
+ path: import("@oclif/core/lib/interfaces").OptionFlag<string>;
8
+ port: import("@oclif/core/lib/interfaces").OptionFlag<number>;
9
+ 'gateway-url': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
10
+ };
11
+ run(): Promise<void>;
12
+ private static discoverAgents;
13
+ private static fetchAgentCard;
14
+ private static proxyA2A;
15
+ private static readBody;
16
+ }
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const node_http_1 = require("node:http");
5
+ const node_fs_1 = require("node:fs");
6
+ const node_path_1 = require("node:path");
7
+ const logger_1 = require("../../../utils/logger");
8
+ const space_serializer_1 = require("../../../utils/builders/space-serializer");
9
+ const agent_console_proxy_1 = require("../../../utils/run-local/agent-console-proxy");
10
+ const TARGET_DIR = 'target';
11
+ const DEFAULT_CONSOLE_PORT = 3000;
12
+ const CONTENT_TYPE_JSON = 'application/json';
13
+ function consoleErrorStatus(error) {
14
+ if (error instanceof agent_console_proxy_1.GatewayRedirectError) {
15
+ return 502;
16
+ }
17
+ if (error instanceof agent_console_proxy_1.AgentConsoleProxyError) {
18
+ return 400;
19
+ }
20
+ return 500;
21
+ }
22
+ class AgentConsole extends core_1.Command {
23
+ async run() {
24
+ const { flags } = await this.parse(AgentConsole);
25
+ const cwd = process.cwd();
26
+ const projectPath = (0, node_path_1.isAbsolute)(flags.path) ? flags.path : (0, node_path_1.resolve)(cwd, flags.path);
27
+ const targetDir = (0, node_path_1.join)(projectPath, TARGET_DIR);
28
+ const gatewayUrl = (0, agent_console_proxy_1.resolveGatewayUrl)(flags['gateway-url'], projectPath);
29
+ const port = flags.port;
30
+ const space = new space_serializer_1.SpaceSerializer(targetDir).load();
31
+ if (!space) {
32
+ this.error('Project not built. Run `agent-network project build` first.');
33
+ }
34
+ const agents = AgentConsole.discoverAgents(space);
35
+ if (agents.length === 0) {
36
+ this.error('No agents found in the project.');
37
+ }
38
+ const allowedPaths = agents.map(agent => agent.path);
39
+ const htmlPath = (0, node_path_1.join)(__dirname, '../../../resources/agent-console.html');
40
+ let html = (0, node_fs_1.readFileSync)(htmlPath, 'utf-8');
41
+ html = html.replace('{{GATEWAY_URL}}', gatewayUrl);
42
+ const proxyCtx = { gatewayUrl, allowedPaths, port };
43
+ const server = (0, node_http_1.createServer)(async (req, res) => {
44
+ var _a;
45
+ try {
46
+ if (req.method === 'GET' && (req.url === '/' || req.url === '/index.html')) {
47
+ res.writeHead(200, { 'Content-Type': 'text/html' });
48
+ res.end(html);
49
+ }
50
+ else if (req.method === 'GET' && req.url === '/api/agents') {
51
+ res.writeHead(200, { 'Content-Type': CONTENT_TYPE_JSON });
52
+ res.end(JSON.stringify(agents));
53
+ }
54
+ else if (req.method === 'GET' && ((_a = req.url) === null || _a === void 0 ? void 0 : _a.startsWith('/api/agent-card'))) {
55
+ await AgentConsole.fetchAgentCard(req, res, proxyCtx);
56
+ }
57
+ else if (req.method === 'POST' && req.url === '/api/send') {
58
+ await AgentConsole.proxyA2A(req, res, proxyCtx);
59
+ }
60
+ else if (req.method === 'POST' && req.url === '/api/cancel') {
61
+ await AgentConsole.proxyA2A(req, res, proxyCtx);
62
+ }
63
+ else {
64
+ res.writeHead(404);
65
+ res.end('Not found');
66
+ }
67
+ }
68
+ catch (error) {
69
+ res.writeHead(consoleErrorStatus(error), { 'Content-Type': CONTENT_TYPE_JSON });
70
+ res.end(JSON.stringify({ error: { message: error.message } }));
71
+ }
72
+ });
73
+ server.listen(port, agent_console_proxy_1.CONSOLE_BIND_HOST, () => {
74
+ logger_1.Log.print('');
75
+ logger_1.Log.info(`Agent Console running at http://${agent_console_proxy_1.CONSOLE_BIND_HOST}:${port}`);
76
+ logger_1.Log.info(`Gateway: ${gatewayUrl}`);
77
+ logger_1.Log.info(`Agents: ${agents.map(a => a.name).join(', ')}`);
78
+ logger_1.Log.print('');
79
+ logger_1.Log.info('Press Ctrl+C to stop.');
80
+ });
81
+ await new Promise(resolvePromise => {
82
+ process.on('SIGINT', () => {
83
+ server.close();
84
+ resolvePromise();
85
+ });
86
+ process.on('SIGTERM', () => {
87
+ server.close();
88
+ resolvePromise();
89
+ });
90
+ });
91
+ }
92
+ static discoverAgents(space) {
93
+ const agents = [];
94
+ for (const component of Object.values(space.components)) {
95
+ for (const instance of Object.values(component.apiInstances)) {
96
+ const path = instance.path.startsWith('/') ? instance.path : `/${instance.path}`;
97
+ agents.push({
98
+ id: instance.id,
99
+ name: instance.label || instance.id,
100
+ path: path.endsWith('/') && path.length > 1 ? path.slice(0, -1) : path,
101
+ });
102
+ }
103
+ }
104
+ return agents;
105
+ }
106
+ static async fetchAgentCard(req, res, ctx) {
107
+ (0, agent_console_proxy_1.assertConsoleLoopbackRequest)(req.headers, ctx.port);
108
+ const reqUrl = req.url || '';
109
+ const url = new URL(reqUrl, 'http://127.0.0.1');
110
+ const agentPath = url.searchParams.get('path') || '/';
111
+ const cardUrl = (0, agent_console_proxy_1.joinGatewayUrl)(ctx.gatewayUrl, agentPath, agent_console_proxy_1.AGENT_CARD_SUFFIX, ctx.allowedPaths);
112
+ try {
113
+ const response = await fetch(cardUrl, agent_console_proxy_1.GATEWAY_FETCH_REDIRECT);
114
+ (0, agent_console_proxy_1.rejectGatewayRedirect)(response);
115
+ const body = await response.text();
116
+ res.writeHead(response.status, { 'Content-Type': CONTENT_TYPE_JSON });
117
+ res.end(body);
118
+ }
119
+ catch (error) {
120
+ if (error instanceof agent_console_proxy_1.GatewayRedirectError) {
121
+ throw error;
122
+ }
123
+ res.writeHead(502, { 'Content-Type': CONTENT_TYPE_JSON });
124
+ res.end(JSON.stringify({ error: error.message }));
125
+ }
126
+ }
127
+ static async proxyA2A(req, res, ctx) {
128
+ (0, agent_console_proxy_1.assertConsoleMutatingRequest)(req.headers, ctx.port);
129
+ const body = await AgentConsole.readBody(req);
130
+ const parsed = JSON.parse(body);
131
+ const agentId = parsed.agentId;
132
+ const payload = parsed.payload;
133
+ const url = (0, agent_console_proxy_1.joinGatewayUrl)(ctx.gatewayUrl, String(agentId || ''), '/', ctx.allowedPaths);
134
+ const response = await fetch(url, {
135
+ method: 'POST',
136
+ headers: { 'Content-Type': CONTENT_TYPE_JSON },
137
+ body: JSON.stringify(payload),
138
+ ...agent_console_proxy_1.GATEWAY_FETCH_REDIRECT,
139
+ });
140
+ (0, agent_console_proxy_1.rejectGatewayRedirect)(response);
141
+ const responseBody = await response.text();
142
+ res.writeHead(response.status, { 'Content-Type': CONTENT_TYPE_JSON });
143
+ res.end(responseBody);
144
+ }
145
+ static readBody(req) {
146
+ return new Promise((resolvePromise, reject) => {
147
+ const chunks = [];
148
+ req.on('data', chunk => chunks.push(chunk));
149
+ req.on('end', () => resolvePromise(Buffer.concat(chunks).toString()));
150
+ req.on('error', reject);
151
+ });
152
+ }
153
+ }
154
+ AgentConsole.description = 'Launch a local web console to interact with agents via the A2A protocol.';
155
+ AgentConsole.hidden = true;
156
+ AgentConsole.examples = [
157
+ '$ agent-network project agent-console',
158
+ '$ agent-network project agent-console --port 4000',
159
+ '$ agent-network project agent-console --gateway-url http://localhost:8081',
160
+ ];
161
+ AgentConsole.flags = {
162
+ path: core_1.Flags.file({
163
+ description: 'The path to the project.',
164
+ default: '.',
165
+ }),
166
+ port: core_1.Flags.integer({
167
+ description: 'Port for the console web server.',
168
+ default: DEFAULT_CONSOLE_PORT,
169
+ }),
170
+ 'gateway-url': core_1.Flags.string({
171
+ description: 'URL of the Flex ingress gateway. Defaults to http://localhost:<deploy-port.cfg or 8081>.',
172
+ }),
173
+ };
174
+ exports.default = AgentConsole;
175
+ //# sourceMappingURL=agent-console.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-console.js","sourceRoot":"","sources":["../../../../src/commands/agent-network/project/agent-console.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAC1C,yCAAuE;AACvE,qCAAoC;AACpC,yCAAmD;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,CAAC,YAAY,CAAC,CAAA;IACvB,CAAC;IAEO,MAAM,CAAC,QAAQ,CAAC,GAAoB;QAC1C,OAAO,IAAI,OAAO,CAAC,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE;YAC5C,MAAM,MAAM,GAAa,EAAE,CAAA;YAC3B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;YAC3C,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;YACrE,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QACzB,CAAC,CAAC,CAAA;IACJ,CAAC;;AAvKM,wBAAW,GAAG,0EAA0E,CAAA;AACxF,mBAAM,GAAG,IAAI,CAAA;AAEb,qBAAQ,GAAG;IAChB,uCAAuC;IACvC,mDAAmD;IACnD,2EAA2E;CAC5E,CAAA;AAEM,kBAAK,GAAG;IACb,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC;QACf,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,GAAG;KACb,CAAC;IACF,IAAI,EAAE,YAAK,CAAC,OAAO,CAAC;QAClB,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,oBAAoB;KAC9B,CAAC;IACF,aAAa,EAAE,YAAK,CAAC,MAAM,CAAC;QAC1B,WAAW,EAAE,0FAA0F;KACxG,CAAC;CACH,CAAA;kBAtBkB,YAAY"}
@@ -0,0 +1,10 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class Create extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ name: import("@oclif/core/lib/interfaces").OptionFlag<string>;
7
+ path: import("@oclif/core/lib/interfaces").OptionFlag<string>;
8
+ };
9
+ run(): Promise<void>;
10
+ }