mulesoft-anypoint-cli-agent-fabric-plugin 1.0.10 → 1.1.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 (245) hide show
  1. package/README.md +49 -27
  2. package/dist/commands/agent-network/project/build.d.ts +14 -14
  3. package/dist/commands/agent-network/project/build.js +12 -11
  4. package/dist/commands/agent-network/project/build.js.map +1 -1
  5. package/dist/commands/agent-network/project/create.d.ts +20 -17
  6. package/dist/commands/agent-network/project/create.js +58 -35
  7. package/dist/commands/agent-network/project/create.js.map +1 -1
  8. package/dist/commands/agent-network/project/deploy.d.ts +22 -21
  9. package/dist/commands/agent-network/project/deploy.js +75 -63
  10. package/dist/commands/agent-network/project/deploy.js.map +1 -1
  11. package/dist/commands/agent-network/project/publish.d.ts +13 -15
  12. package/dist/commands/agent-network/project/publish.js +32 -46
  13. package/dist/commands/agent-network/project/publish.js.map +1 -1
  14. package/dist/commands/agent-network/project/undeploy.d.ts +29 -0
  15. package/dist/commands/agent-network/project/undeploy.js +137 -0
  16. package/dist/commands/agent-network/project/undeploy.js.map +1 -0
  17. package/dist/commands/agent-network/project/unpublish.d.ts +28 -0
  18. package/dist/commands/agent-network/project/unpublish.js +138 -0
  19. package/dist/commands/agent-network/project/unpublish.js.map +1 -0
  20. package/dist/commands/agent-network/setup/dependencies.d.ts +6 -6
  21. package/dist/commands/agent-network/setup/dependencies.js +5 -7
  22. package/dist/commands/agent-network/setup/dependencies.js.map +1 -1
  23. package/dist/commands/agent-network/setup/gateways.d.ts +21 -15
  24. package/dist/commands/agent-network/setup/gateways.js +150 -93
  25. package/dist/commands/agent-network/setup/gateways.js.map +1 -1
  26. package/dist/errors/base-error.js.map +1 -1
  27. package/dist/errors/error-factory.d.ts +59 -13
  28. package/dist/errors/error-factory.js +256 -61
  29. package/dist/errors/error-factory.js.map +1 -1
  30. package/dist/helpers/connection-id.d.ts +1 -0
  31. package/dist/helpers/connection-id.js +8 -0
  32. package/dist/helpers/connection-id.js.map +1 -0
  33. package/dist/helpers/connection.d.ts +20 -0
  34. package/dist/helpers/connection.js +88 -0
  35. package/dist/helpers/connection.js.map +1 -0
  36. package/dist/helpers/dependency-manager.d.ts +1 -1
  37. package/dist/helpers/dependency-manager.js +10 -9
  38. package/dist/helpers/dependency-manager.js.map +1 -1
  39. package/dist/helpers/entitlement-utils.js +3 -3
  40. package/dist/helpers/entitlement-utils.js.map +1 -1
  41. package/dist/helpers/policy-helper.d.ts +27 -29
  42. package/dist/helpers/policy-helper.js +112 -49
  43. package/dist/helpers/policy-helper.js.map +1 -1
  44. package/dist/helpers/project/api-project-dependency-fetcher.js +9 -11
  45. package/dist/helpers/project/api-project-dependency-fetcher.js.map +1 -1
  46. package/dist/helpers/project/constants.d.ts +4 -2
  47. package/dist/helpers/project/constants.js +4 -2
  48. package/dist/helpers/project/constants.js.map +1 -1
  49. package/dist/helpers/project/templates.js +1 -1
  50. package/dist/helpers/project/validation-commons.d.ts +4 -0
  51. package/dist/helpers/project/validation-commons.js +28 -5
  52. package/dist/helpers/project/validation-commons.js.map +1 -1
  53. package/dist/helpers/request-logging.d.ts +36 -0
  54. package/dist/helpers/request-logging.js +181 -0
  55. package/dist/helpers/request-logging.js.map +1 -0
  56. package/dist/helpers/request-utils.d.ts +1 -1
  57. package/dist/helpers/request-utils.js.map +1 -1
  58. package/dist/helpers/utils.d.ts +20 -25
  59. package/dist/helpers/utils.js +181 -51
  60. package/dist/helpers/utils.js.map +1 -1
  61. package/dist/index.d.ts +3 -0
  62. package/dist/index.js +7 -1
  63. package/dist/index.js.map +1 -1
  64. package/dist/types/agent-network-v2.d.ts +379 -0
  65. package/dist/types/agent-network-v2.js +23 -0
  66. package/dist/types/agent-network-v2.js.map +1 -0
  67. package/dist/types/agent-network.d.ts +226 -219
  68. package/dist/types/agent-network.js +11 -14
  69. package/dist/types/agent-network.js.map +1 -1
  70. package/dist/types/types.d.ts +57 -17
  71. package/dist/utils/builders/builder.d.ts +13 -0
  72. package/dist/utils/builders/builder.js +219 -11
  73. package/dist/utils/builders/builder.js.map +1 -1
  74. package/dist/utils/builders/common/agent-metadata.d.ts +21 -0
  75. package/dist/utils/builders/common/agent-metadata.js +69 -0
  76. package/dist/utils/builders/common/agent-metadata.js.map +1 -0
  77. package/dist/utils/builders/common/asset-file-resolver.d.ts +3 -0
  78. package/dist/utils/builders/common/asset-file-resolver.js +29 -0
  79. package/dist/utils/builders/common/asset-file-resolver.js.map +1 -0
  80. package/dist/utils/builders/common/connection-facet-helpers.d.ts +27 -0
  81. package/dist/utils/builders/common/connection-facet-helpers.js +46 -0
  82. package/dist/utils/builders/common/connection-facet-helpers.js.map +1 -0
  83. package/dist/utils/builders/common/connection-metadata.d.ts +5 -0
  84. package/dist/utils/builders/common/connection-metadata.js +21 -0
  85. package/dist/utils/builders/common/connection-metadata.js.map +1 -0
  86. package/dist/utils/builders/common/network-builder-helpers.d.ts +7 -0
  87. package/dist/utils/builders/common/network-builder-helpers.js +21 -0
  88. package/dist/utils/builders/common/network-builder-helpers.js.map +1 -0
  89. package/dist/utils/builders/common/network-metadata.d.ts +5 -0
  90. package/dist/utils/builders/common/network-metadata.js +21 -0
  91. package/dist/utils/builders/common/network-metadata.js.map +1 -0
  92. package/dist/utils/builders/common/registry-entry.d.ts +2 -0
  93. package/dist/utils/builders/common/registry-entry.js +17 -0
  94. package/dist/utils/builders/common/registry-entry.js.map +1 -0
  95. package/dist/utils/builders/common/types.d.ts +31 -0
  96. package/dist/utils/builders/common/types.js +3 -0
  97. package/dist/utils/builders/common/types.js.map +1 -0
  98. package/dist/utils/builders/policies-factory.d.ts +8 -1
  99. package/dist/utils/builders/policies-factory.js +33 -4
  100. package/dist/utils/builders/policies-factory.js.map +1 -1
  101. package/dist/utils/builders/project-builder-impl.d.ts +48 -3
  102. package/dist/utils/builders/project-builder-impl.js +122 -6
  103. package/dist/utils/builders/project-builder-impl.js.map +1 -1
  104. package/dist/utils/builders/project-builder.d.ts +52 -4
  105. package/dist/utils/builders/project-builder.js +11 -1
  106. package/dist/utils/builders/project-builder.js.map +1 -1
  107. package/dist/utils/builders/remote-space-resolver.d.ts +19 -0
  108. package/dist/utils/builders/remote-space-resolver.js +216 -0
  109. package/dist/utils/builders/remote-space-resolver.js.map +1 -0
  110. package/dist/utils/builders/space-serializer.d.ts +17 -2
  111. package/dist/utils/builders/space-serializer.js +146 -23
  112. package/dist/utils/builders/space-serializer.js.map +1 -1
  113. package/dist/utils/builders/v1/agent-builder.d.ts +15 -0
  114. package/dist/utils/builders/v1/agent-builder.js +73 -0
  115. package/dist/utils/builders/v1/agent-builder.js.map +1 -0
  116. package/dist/utils/builders/{broker-builder.d.ts → v1/broker-builder.d.ts} +8 -1
  117. package/dist/utils/builders/v1/broker-builder.js +251 -0
  118. package/dist/utils/builders/v1/broker-builder.js.map +1 -0
  119. package/dist/utils/builders/{connections-builder.d.ts → v1/connections-builder.d.ts} +4 -3
  120. package/dist/utils/builders/v1/connections-builder.js +187 -0
  121. package/dist/utils/builders/v1/connections-builder.js.map +1 -0
  122. package/dist/utils/builders/{llm-builder.d.ts → v1/llm-builder.d.ts} +5 -2
  123. package/dist/utils/builders/v1/llm-builder.js +71 -0
  124. package/dist/utils/builders/v1/llm-builder.js.map +1 -0
  125. package/dist/utils/builders/{mcp-builder.d.ts → v1/mcp-builder.d.ts} +5 -2
  126. package/dist/utils/builders/v1/mcp-builder.js +59 -0
  127. package/dist/utils/builders/v1/mcp-builder.js.map +1 -0
  128. package/dist/utils/builders/{network-builder.d.ts → v1/network-builder.d.ts} +2 -1
  129. package/dist/utils/builders/v1/network-builder.js +71 -0
  130. package/dist/utils/builders/v1/network-builder.js.map +1 -0
  131. package/dist/utils/builders/{path.d.ts → v1/path.d.ts} +1 -1
  132. package/dist/utils/builders/{path.js → v1/path.js} +1 -1
  133. package/dist/utils/builders/v1/path.js.map +1 -0
  134. package/dist/utils/builders/v2/agent-builder.d.ts +17 -0
  135. package/dist/utils/builders/v2/agent-builder.js +137 -0
  136. package/dist/utils/builders/v2/agent-builder.js.map +1 -0
  137. package/dist/utils/builders/v2/broker-builder.d.ts +21 -0
  138. package/dist/utils/builders/v2/broker-builder.js +158 -0
  139. package/dist/utils/builders/v2/broker-builder.js.map +1 -0
  140. package/dist/utils/builders/v2/connections-builder.d.ts +18 -0
  141. package/dist/utils/builders/v2/connections-builder.js +191 -0
  142. package/dist/utils/builders/v2/connections-builder.js.map +1 -0
  143. package/dist/utils/builders/v2/llm-builder.d.ts +11 -0
  144. package/dist/utils/builders/v2/llm-builder.js +63 -0
  145. package/dist/utils/builders/v2/llm-builder.js.map +1 -0
  146. package/dist/utils/builders/v2/mcp-builder.d.ts +10 -0
  147. package/dist/utils/builders/v2/mcp-builder.js +61 -0
  148. package/dist/utils/builders/v2/mcp-builder.js.map +1 -0
  149. package/dist/utils/builders/v2/network-builder.d.ts +14 -0
  150. package/dist/utils/builders/v2/network-builder.js +118 -0
  151. package/dist/utils/builders/v2/network-builder.js.map +1 -0
  152. package/dist/utils/builders/v2/path.d.ts +12 -0
  153. package/dist/utils/builders/v2/path.js +41 -0
  154. package/dist/utils/builders/v2/path.js.map +1 -0
  155. package/dist/utils/constants.d.ts +40 -2
  156. package/dist/utils/constants.js +50 -3
  157. package/dist/utils/constants.js.map +1 -1
  158. package/dist/utils/exchange.d.ts +5 -6
  159. package/dist/utils/exchange.js +74 -70
  160. package/dist/utils/exchange.js.map +1 -1
  161. package/dist/utils/facets/abstract-facet.d.ts +2 -26
  162. package/dist/utils/facets/abstract-facet.js +5 -29
  163. package/dist/utils/facets/abstract-facet.js.map +1 -1
  164. package/dist/utils/facets/agent-graph-facet.d.ts +17 -0
  165. package/dist/utils/facets/agent-graph-facet.js +271 -0
  166. package/dist/utils/facets/agent-graph-facet.js.map +1 -0
  167. package/dist/utils/facets/api-instance-facet.d.ts +2 -0
  168. package/dist/utils/facets/api-instance-facet.js +51 -14
  169. package/dist/utils/facets/api-instance-facet.js.map +1 -1
  170. package/dist/utils/facets/apim-policy-helpers.d.ts +24 -0
  171. package/dist/utils/facets/apim-policy-helpers.js +36 -0
  172. package/dist/utils/facets/apim-policy-helpers.js.map +1 -0
  173. package/dist/utils/facets/asset-facet.d.ts +6 -2
  174. package/dist/utils/facets/asset-facet.js +145 -82
  175. package/dist/utils/facets/asset-facet.js.map +1 -1
  176. package/dist/utils/facets/connection-facet.d.ts +2 -0
  177. package/dist/utils/facets/connection-facet.js +51 -14
  178. package/dist/utils/facets/connection-facet.js.map +1 -1
  179. package/dist/utils/facets/deployment-helpers.d.ts +29 -0
  180. package/dist/utils/facets/deployment-helpers.js +124 -0
  181. package/dist/utils/facets/deployment-helpers.js.map +1 -0
  182. package/dist/utils/facets/deployment-runner.d.ts +12 -0
  183. package/dist/utils/facets/deployment-runner.js +41 -0
  184. package/dist/utils/facets/deployment-runner.js.map +1 -0
  185. package/dist/utils/facets/facets.d.ts +4 -0
  186. package/dist/utils/facets/facets.js +75 -7
  187. package/dist/utils/facets/facets.js.map +1 -1
  188. package/dist/utils/facets/mule-application-facet.d.ts +1 -6
  189. package/dist/utils/facets/mule-application-facet.js +61 -97
  190. package/dist/utils/facets/mule-application-facet.js.map +1 -1
  191. package/dist/utils/facets/publication-metadata-patcher.d.ts +2 -0
  192. package/dist/utils/facets/publication-metadata-patcher.js +61 -0
  193. package/dist/utils/facets/publication-metadata-patcher.js.map +1 -0
  194. package/dist/utils/facets/publication-rank.d.ts +4 -0
  195. package/dist/utils/facets/publication-rank.js +27 -0
  196. package/dist/utils/facets/publication-rank.js.map +1 -0
  197. package/dist/utils/facets/undeploy-helpers.d.ts +6 -0
  198. package/dist/utils/facets/undeploy-helpers.js +68 -0
  199. package/dist/utils/facets/undeploy-helpers.js.map +1 -0
  200. package/dist/utils/facets/unpublish-preflight.d.ts +2 -0
  201. package/dist/utils/facets/unpublish-preflight.js +55 -0
  202. package/dist/utils/facets/unpublish-preflight.js.map +1 -0
  203. package/dist/utils/files.js +10 -2
  204. package/dist/utils/files.js.map +1 -1
  205. package/dist/utils/gateway-mode.d.ts +22 -0
  206. package/dist/utils/gateway-mode.js +38 -0
  207. package/dist/utils/gateway-mode.js.map +1 -0
  208. package/dist/utils/gateway.d.ts +24 -6
  209. package/dist/utils/gateway.js +112 -36
  210. package/dist/utils/gateway.js.map +1 -1
  211. package/dist/utils/logger.d.ts +1 -0
  212. package/dist/utils/logger.js +6 -0
  213. package/dist/utils/logger.js.map +1 -1
  214. package/dist/utils/retryable-requester.d.ts +6 -0
  215. package/dist/utils/retryable-requester.js +43 -0
  216. package/dist/utils/retryable-requester.js.map +1 -0
  217. package/dist/utils/uris.d.ts +4 -4
  218. package/dist/utils/uris.js +14 -6
  219. package/dist/utils/uris.js.map +1 -1
  220. package/dist/utils/variables.d.ts +3 -4
  221. package/dist/utils/variables.js +20 -9
  222. package/dist/utils/variables.js.map +1 -1
  223. package/dist/utils/zip-utils.d.ts +10 -0
  224. package/dist/utils/zip-utils.js +19 -0
  225. package/dist/utils/zip-utils.js.map +1 -0
  226. package/package.json +8 -2
  227. package/templates/{agent-network.yaml.template → agent-network/agent-network.yaml.template} +1 -1
  228. package/templates/{exchange.json.template → agent-network/exchange.json.template} +1 -0
  229. package/templates/agentic-network/agent-network.yaml.template +93 -0
  230. package/templates/agentic-network/brokers/broker1.agent.template +103 -0
  231. package/templates/agentic-network/exchange.json.template +37 -0
  232. package/dist/utils/builders/agent-builder.d.ts +0 -11
  233. package/dist/utils/builders/agent-builder.js +0 -79
  234. package/dist/utils/builders/agent-builder.js.map +0 -1
  235. package/dist/utils/builders/broker-builder.js +0 -292
  236. package/dist/utils/builders/broker-builder.js.map +0 -1
  237. package/dist/utils/builders/connections-builder.js +0 -232
  238. package/dist/utils/builders/connections-builder.js.map +0 -1
  239. package/dist/utils/builders/llm-builder.js +0 -64
  240. package/dist/utils/builders/llm-builder.js.map +0 -1
  241. package/dist/utils/builders/mcp-builder.js +0 -48
  242. package/dist/utils/builders/mcp-builder.js.map +0 -1
  243. package/dist/utils/builders/network-builder.js +0 -77
  244. package/dist/utils/builders/network-builder.js.map +0 -1
  245. package/dist/utils/builders/path.js.map +0 -1
@@ -1,71 +1,91 @@
1
- import { ExchangeDescriptor, GAV } from './types';
2
- export type AgentCard = {
3
- description: string;
4
- name: string;
5
- };
6
- export type Reference = {
7
- name: string;
8
- namespace?: string;
9
- };
10
- export type Properties = {
11
- properties: {
12
- [key: string]: string;
1
+ import { GAV } from './types';
2
+ import { InstanceProtectionDirection } from '../utils/builders/project-builder';
3
+ import Broker = AgentNetwork.Broker;
4
+ import Agent = AgentNetwork.Agent;
5
+ import MCP = AgentNetwork.MCP;
6
+ import LLMProvider = AgentNetwork.LLMProvider;
7
+ import Connection = AgentNetwork.Connection;
8
+ export type AgentNetwork = {
9
+ brokers?: {
10
+ [key: string]: Broker;
13
11
  };
14
- securedProperties: {
15
- [key: string]: string;
12
+ agents?: {
13
+ [key: string]: Agent;
16
14
  };
17
- };
18
- export type Policy = {
19
- ref: Reference;
20
- configuration: Record<string, any>;
21
- };
22
- export type MCPConnection = {
23
- kind: 'mcp';
24
- description?: string;
25
- ref: Reference;
26
- spec: {
27
- url: string;
28
- authentication?: Authentication;
29
- policies?: Array<Policy>;
15
+ llmProviders?: {
16
+ [key: string]: LLMProvider;
30
17
  };
18
+ mcpServers?: {
19
+ [key: string]: MCP;
20
+ };
21
+ connections?: {
22
+ [key: string]: Connection;
23
+ };
24
+ label?: string;
25
+ schemaVersion: string;
31
26
  };
32
- export type LLMConnection = {
33
- kind: 'llm';
34
- description?: string;
35
- ref: Reference;
36
- spec: {
37
- url: string;
27
+ export declare namespace AgentNetwork {
28
+ type AgentCard = {
29
+ description: string;
30
+ name: string;
31
+ };
32
+ type Reference = {
33
+ name: string;
34
+ namespace?: string;
35
+ };
36
+ type Properties = {
37
+ properties: Record<string, string>;
38
+ securedProperties: Record<string, string>;
39
+ };
40
+ type Policy = {
41
+ ref: Reference;
38
42
  configuration: Record<string, any>;
39
- policies?: Array<Policy>;
40
43
  };
41
- };
42
- export type LLMMetadata = {
43
- platform: string;
44
- policyRef?: GAV;
45
- };
46
- export type AgentConnection = {
47
- kind: 'agent';
48
- description?: string;
49
- ref: Reference;
50
- spec: {
51
- url: string;
52
- authentication?: Authentication;
53
- policies?: Array<Policy>;
44
+ const ConnectionKinds: {
45
+ readonly Agent: "agent";
46
+ readonly Mcp: "mcp";
47
+ readonly Llm: "llm";
48
+ };
49
+ type ConnectionKind = typeof ConnectionKinds[keyof typeof ConnectionKinds];
50
+ type MCPConnection = {
51
+ kind: 'mcp';
52
+ description?: string;
53
+ ref: Reference;
54
+ spec: {
55
+ url: string;
56
+ authentication?: Authentication;
57
+ policies?: Array<Policy>;
58
+ };
54
59
  };
55
- };
56
- export type Broker = {
57
- card: AgentCard;
58
- spec: {
59
- llm: {
60
- ref: Reference;
61
- connection?: {
62
- ref: {
63
- name: string;
64
- };
65
- };
60
+ type LLMConnection = {
61
+ kind: 'llm';
62
+ description?: string;
63
+ ref: Reference;
64
+ spec: {
65
+ url: string;
66
+ configuration: Record<string, any>;
67
+ policies?: Array<Policy>;
66
68
  };
67
- links?: Array<{
68
- agent: {
69
+ };
70
+ type LLMMetadata = {
71
+ platform: string;
72
+ policyRef?: GAV;
73
+ };
74
+ type AgentConnection = {
75
+ kind: 'agent';
76
+ description?: string;
77
+ ref: Reference;
78
+ spec: {
79
+ url: string;
80
+ authentication?: Authentication;
81
+ policies?: Array<Policy>;
82
+ };
83
+ };
84
+ type Connection = AgentConnection | MCPConnection | LLMConnection;
85
+ type Broker = {
86
+ card: AgentCard;
87
+ spec: {
88
+ llm: {
69
89
  ref: Reference;
70
90
  connection?: {
71
91
  ref: {
@@ -73,174 +93,161 @@ export type Broker = {
73
93
  };
74
94
  };
75
95
  };
76
- }>;
77
- tools?: Array<{
78
- mcp: {
79
- ref: Reference;
80
- allowed?: Array<string>;
81
- connection?: {
82
- ref: {
83
- name: string;
96
+ links?: Array<{
97
+ agent: {
98
+ ref: Reference;
99
+ connection?: {
100
+ ref: {
101
+ name: string;
102
+ };
84
103
  };
85
104
  };
86
- };
87
- }>;
88
- policies?: Array<Policy>;
105
+ }>;
106
+ tools?: Array<{
107
+ mcp: {
108
+ ref: Reference;
109
+ allowed?: Array<string>;
110
+ connection?: {
111
+ ref: {
112
+ name: string;
113
+ };
114
+ };
115
+ };
116
+ }>;
117
+ policies?: Array<Policy>;
118
+ };
89
119
  };
90
- };
91
- export type Agent = {
92
- card?: AgentCard;
93
- label?: string;
94
- description?: string;
95
- tags?: Array<string>;
96
- metadata?: {
97
- protocol?: string;
98
- platform?: string;
99
- links?: Array<{
100
- agent: {
101
- ref: Reference;
120
+ type Agent = {
121
+ card?: AgentCard;
122
+ label?: string;
123
+ description?: string;
124
+ tags?: Array<string>;
125
+ metadata?: {
126
+ protocol?: string;
127
+ platform?: string;
128
+ links?: Array<{
129
+ agent: {
130
+ ref: Reference;
131
+ };
132
+ }>;
133
+ tools?: Array<{
134
+ mcp: {
135
+ ref: Reference;
136
+ allowed?: Array<string>;
137
+ };
138
+ }>;
139
+ };
140
+ };
141
+ type MCP = {
142
+ description?: string;
143
+ label?: string;
144
+ tags?: Array<string>;
145
+ metadata: {
146
+ transport: {
147
+ kind: string;
102
148
  };
103
- }>;
104
- tools?: Array<{
105
- mcp: {
149
+ platform: string;
150
+ };
151
+ };
152
+ type LLMProvider = {
153
+ description?: string;
154
+ label?: string;
155
+ tags?: Array<string>;
156
+ metadata: {
157
+ platform: string;
158
+ transcoder: {
106
159
  ref: Reference;
107
- allowed?: Array<string>;
108
160
  };
109
- }>;
110
- };
111
- };
112
- export type LLMProvider = {
113
- description?: string;
114
- label?: string;
115
- tags?: Array<string>;
116
- metadata: {
117
- platform: string;
118
- transcoder: {
119
- ref: Reference;
120
161
  };
121
162
  };
122
- };
123
- export type MCP = {
124
- description?: string;
125
- label?: string;
126
- tags?: Array<string>;
127
- metadata: {
128
- transport: {
129
- kind: string;
163
+ type BasicAuth = {
164
+ kind: 'basic';
165
+ username: string;
166
+ password: string;
167
+ headerName?: string;
168
+ };
169
+ type APIKey = {
170
+ kind: 'apiKey';
171
+ apiKey: string;
172
+ headerName?: string;
173
+ };
174
+ type ApiKeyClientCredentialsAuth = {
175
+ kind: 'apikey-client-credentials';
176
+ clientId: {
177
+ value: string;
178
+ name?: string;
179
+ };
180
+ clientSecret: {
181
+ value: string;
182
+ name?: string;
130
183
  };
131
- platform: string;
132
- };
133
- };
134
- export type Connection = AgentConnection | MCPConnection | LLMConnection;
135
- export type AgentNetwork = {
136
- brokers?: {
137
- [key: string]: Broker;
138
- };
139
- agents?: {
140
- [key: string]: Agent;
141
- };
142
- llmProviders?: {
143
- [key: string]: LLMProvider;
144
- };
145
- mcpServers?: {
146
- [key: string]: MCP;
147
- };
148
- connections?: {
149
- [key: string]: Connection;
150
- };
151
- label?: string;
152
- };
153
- export type BasicAuth = {
154
- kind: 'basic';
155
- username: string;
156
- password: string;
157
- headerName?: string;
158
- };
159
- export type APIKey = {
160
- kind: 'apiKey';
161
- apiKey: string;
162
- headerName?: string;
163
- };
164
- export type ApiKeyClientCredentialsAuth = {
165
- kind: 'apikey-client-credentials';
166
- clientId: {
167
- value: string;
168
- name?: string;
169
- };
170
- clientSecret: {
171
- value: string;
172
- name?: string;
173
184
  };
174
- };
175
- export type OAuth2ClientCredentialsAuth = {
176
- kind: 'oauth2-client-credentials';
177
- clientId: string;
178
- clientSecret: string;
179
- token: {
180
- url: string;
185
+ type OAuth2ClientCredentialsAuth = {
186
+ kind: 'oauth2-client-credentials';
187
+ clientId: string;
188
+ clientSecret: string;
189
+ token: {
190
+ url: string;
191
+ timeout?: number;
192
+ bodyEncoding?: 'form' | 'json';
193
+ };
194
+ scopes?: string[];
195
+ };
196
+ type OAuth2OBOCredentialsAuth = {
197
+ kind: 'oauth2-obo';
198
+ flow: 'oauth2-token-exchange' | 'microsoft-entra-obo';
199
+ clientId: string;
200
+ clientSecret: string;
201
+ tokenEndpoint: string;
202
+ targetType?: 'audience' | 'resource';
203
+ targetValue?: string;
204
+ scope?: string;
181
205
  timeout?: number;
182
- bodyEncoding?: 'form' | 'json';
206
+ cibaEnabled?: boolean;
207
+ cibaEndpoint?: string;
208
+ cibaLoginHintClaim?: string;
209
+ cibaBindingMessage?: string;
210
+ distributed?: boolean;
211
+ subjectTokenType?: string;
212
+ requestedTokenType?: string;
213
+ };
214
+ type InTaskAuthorizationCodeAuth = {
215
+ kind: 'in-task-authorization-code';
216
+ secondaryAuthProvider?: string;
217
+ authorizationEndpoint: string;
218
+ tokenEndpoint: string;
219
+ scopes: string;
220
+ redirectUri: string;
221
+ responseType?: string;
222
+ codeChallengeMethod?: string;
223
+ tokenAudience?: string;
224
+ bodyEncoding?: string;
225
+ tokenTimeout?: number;
226
+ userIdHeader?: string;
227
+ userEmailHeader?: string;
228
+ challengeResponseStatusCode?: number;
229
+ distributed?: boolean;
230
+ };
231
+ type Authentication = BasicAuth | APIKey | ApiKeyClientCredentialsAuth | OAuth2ClientCredentialsAuth | OAuth2OBOCredentialsAuth | InTaskAuthorizationCodeAuth;
232
+ type APIDescriptor = {
233
+ id: string;
234
+ type: string;
235
+ label: string;
236
+ description?: string;
237
+ asset: GAV;
238
+ tags?: Array<string>;
239
+ endpointPath: string;
240
+ upstreamUrl: string;
241
+ metadata: {
242
+ connectionId: string;
243
+ source: string;
244
+ protectionDirection: InstanceProtectionDirection;
245
+ };
246
+ inboundPolicies: (apiId: string) => Promise<Array<PolicyBinding>>;
247
+ outboundPolicies: (apiId: string) => Promise<Array<PolicyBinding>>;
183
248
  };
184
- scopes?: string[];
185
- };
186
- export type OAuth2OBOCredentialsAuth = {
187
- kind: 'oauth2-obo';
188
- flow: 'oauth2-token-exchange' | 'microsoft-entra-obo';
189
- clientId: string;
190
- clientSecret: string;
191
- tokenEndpoint: string;
192
- targetType?: 'audience' | 'resource';
193
- targetValue?: string;
194
- scope?: string;
195
- timeout?: number;
196
- cibaEnabled?: boolean;
197
- cibaEndpoint?: string;
198
- cibaLoginHintClaim?: string;
199
- cibaBindingMessage?: string;
200
- subjectTokenType?: string;
201
- requestedTokenType?: string;
202
- distributed?: boolean;
203
- };
204
- export type InTaskAuthorizationCodeAuth = {
205
- kind: 'in-task-authorization-code';
206
- secondaryAuthProvider?: string;
207
- authorizationEndpoint: string;
208
- tokenEndpoint: string;
209
- scopes: string;
210
- redirectUri: string;
211
- responseType?: string;
212
- codeChallengeMethod?: string;
213
- tokenAudience?: string;
214
- bodyEncoding?: string;
215
- tokenTimeout?: number;
216
- challengeResponseStatusCode?: number;
217
- distributed?: boolean;
218
- };
219
- export type Authentication = BasicAuth | APIKey | ApiKeyClientCredentialsAuth | OAuth2ClientCredentialsAuth | OAuth2OBOCredentialsAuth | InTaskAuthorizationCodeAuth;
220
- export type APIDescriptor = {
221
- id: string;
222
- type: string;
223
- label: string;
224
- description?: string;
225
- asset: GAV;
226
- tags?: Array<string>;
227
- endpointPath: string;
228
- upstreamUrl: string;
229
- metadata: {
230
- connectionId: string;
231
- source: string;
232
- protectionDirection: 'ingress' | 'egress';
233
- };
234
- inboundPolicies: (apiId: string) => Promise<Array<PolicyBinding>>;
235
- outboundPolicies: (apiId: string) => Promise<Array<PolicyBinding>>;
236
- };
237
- export declare const ConnectionKinds: {
238
- readonly Agent: "agent";
239
- readonly Mcp: "mcp";
240
- readonly Llm: "llm";
241
- };
242
- export type PolicyBinding = {
243
- policyRef: GAV;
244
- configuration: Record<string, any>;
245
- };
246
- export declare function resolveReference(link: Reference, descriptor: ExchangeDescriptor): GAV;
249
+ type PolicyBinding = {
250
+ policyRef: GAV;
251
+ configuration: Record<string, any>;
252
+ };
253
+ }
@@ -1,18 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveReference = exports.ConnectionKinds = void 0;
4
- exports.ConnectionKinds = {
5
- Agent: 'agent',
6
- Mcp: 'mcp',
7
- Llm: 'llm',
8
- };
9
- function resolveReference(link, descriptor) {
10
- var _a, _b;
11
- return {
12
- groupId: link.namespace || descriptor.groupId,
13
- assetId: link.name,
14
- version: ((_b = (_a = descriptor.dependencies) === null || _a === void 0 ? void 0 : _a.find(dep => dep.assetId === link.name && dep.groupId === (link.namespace || descriptor.groupId))) === null || _b === void 0 ? void 0 : _b.version) || descriptor.version,
3
+ exports.AgentNetwork = void 0;
4
+ // ─── Namespace ───────────────────────────────────────────────────────────────
5
+ // eslint-disable-next-line @typescript-eslint/no-namespace
6
+ var AgentNetwork;
7
+ (function (AgentNetwork) {
8
+ // ─── Common ────────────────────────────────────────────────────────────────
9
+ AgentNetwork.ConnectionKinds = {
10
+ Agent: 'agent',
11
+ Mcp: 'mcp',
12
+ Llm: 'llm',
15
13
  };
16
- }
17
- exports.resolveReference = resolveReference;
14
+ })(AgentNetwork = exports.AgentNetwork || (exports.AgentNetwork = {}));
18
15
  //# sourceMappingURL=agent-network.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-network.js","sourceRoot":"","sources":["../../src/types/agent-network.ts"],"names":[],"mappings":";;;AAoPa,QAAA,eAAe,GAAG;IAC7B,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAA;AAIV,SAAgB,gBAAgB,CAAC,IAAe,EAAE,UAA8B;;IAC9E,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,SAAS,IAAI,UAAU,CAAC,OAAO;QAC7C,OAAO,EAAE,IAAI,CAAC,IAAI;QAClB,OAAO,EAAE,CAAA,MAAA,MAAA,UAAU,CAAC,YAAY,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,0CAAE,OAAO,KAAI,UAAU,CAAC,OAAO;KAClK,CAAA;AACH,CAAC;AAND,4CAMC"}
1
+ {"version":3,"file":"agent-network.js","sourceRoot":"","sources":["../../src/types/agent-network.ts"],"names":[],"mappings":";;;AAgCA,gFAAgF;AAEhF,2DAA2D;AAC3D,IAAiB,YAAY,CAsP5B;AAtPD,WAAiB,YAAY;IAE3B,8EAA8E;IAUjE,4BAAe,GAAG;QAC7B,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;KACF,CAAA;AAsOZ,CAAC,EAtPgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAsP5B"}
@@ -1,3 +1,6 @@
1
+ import { AgentNetworkV2 } from './agent-network-v2';
2
+ import { PRIVATE_SPACE_TARGET_TYPE, RUNTIME_FABRIC_TARGET_TYPE, SHARED_TARGET_TYPE } from '../utils/constants';
3
+ import Reference = AgentNetworkV2.Reference;
1
4
  export type Gateway = {
2
5
  id: string;
3
6
  name: string;
@@ -7,10 +10,10 @@ export type Gateway = {
7
10
  lastUpdated: string;
8
11
  };
9
12
  export type GatewaysResponse = {
10
- content: Gateway[];
11
- pageSize: number;
12
- pageNumber: number;
13
- totalElements: number;
13
+ content?: Gateway[];
14
+ pageSize?: number;
15
+ pageNumber?: number;
16
+ totalElements?: number;
14
17
  };
15
18
  export type GatewayDetails = {
16
19
  id: string;
@@ -27,6 +30,7 @@ export type GatewayDetails = {
27
30
  runtimeVersion: string;
28
31
  size: string;
29
32
  apiLimit: number;
33
+ clusterUrl?: string;
30
34
  configuration: {
31
35
  ingress: {
32
36
  publicUrl: string;
@@ -54,6 +58,9 @@ export type ExchangeAssetMetadataResponse = {
54
58
  data: {
55
59
  asset?: ExchangeAssetMetadata;
56
60
  };
61
+ errors?: {
62
+ message: string;
63
+ }[];
57
64
  };
58
65
  export type ExchangeAssetMetadata = {
59
66
  organizationId: string;
@@ -98,6 +105,7 @@ export type ExchangeAssetMetadata = {
98
105
  instances: ExchangeInstance[];
99
106
  otherVersions: {
100
107
  version: string;
108
+ versionGroup: string;
101
109
  }[];
102
110
  };
103
111
  export type GAV = {
@@ -105,6 +113,24 @@ export type GAV = {
105
113
  assetId: string;
106
114
  version: string;
107
115
  };
116
+ export type ExchangeSearchResult = {
117
+ groupId: string;
118
+ assetId: string;
119
+ version: string;
120
+ type: string;
121
+ attributes?: {
122
+ key: string;
123
+ value: string;
124
+ }[];
125
+ };
126
+ export type ExchangeAssetsSearchResponse = {
127
+ data: {
128
+ assets?: ExchangeSearchResult[];
129
+ };
130
+ errors?: {
131
+ message: string;
132
+ }[];
133
+ };
108
134
  export type Variable = {
109
135
  description: string;
110
136
  default?: string;
@@ -120,6 +146,7 @@ export type ExchangeDescriptor = GAV & {
120
146
  main?: string;
121
147
  name: string;
122
148
  classifier?: string;
149
+ apiVersion: string;
123
150
  description?: string;
124
151
  dependencies?: GAV[];
125
152
  tags?: string[];
@@ -226,10 +253,11 @@ export type ApplyPolicyResponse = {
226
253
  };
227
254
  apiId: number;
228
255
  };
256
+ export type RuntimeTargetSpaceType = typeof PRIVATE_SPACE_TARGET_TYPE | typeof RUNTIME_FABRIC_TARGET_TYPE | typeof SHARED_TARGET_TYPE;
229
257
  export type RuntimeTargetSpace = {
230
258
  id: string;
231
259
  name: string;
232
- type: string;
260
+ type: RuntimeTargetSpaceType;
233
261
  };
234
262
  export type RuntimeTargetSpaceResponse = {
235
263
  content: RuntimeTargetSpace[];
@@ -238,7 +266,7 @@ export type TargetSpace = {
238
266
  id: string;
239
267
  name: string;
240
268
  version: string;
241
- type: string;
269
+ type: RuntimeTargetSpaceType;
242
270
  runtimes: Runtime[];
243
271
  };
244
272
  export type Runtime = {
@@ -301,6 +329,17 @@ export type ExistingAPIResponse = {
301
329
  total: number;
302
330
  assets: ExistingAPIAsset[];
303
331
  };
332
+ export type ExchangeFile = {
333
+ classifier: string | null;
334
+ packaging: string;
335
+ downloadURL: string;
336
+ externalLink: string;
337
+ md5: string;
338
+ sha1: string;
339
+ createdDate: string;
340
+ mainFile: string | null;
341
+ isGenerated: boolean;
342
+ };
304
343
  export type ExchangeGetResult = {
305
344
  groupId: string;
306
345
  assetId: string;
@@ -325,17 +364,6 @@ export type ExchangeGetResult = {
325
364
  createdById: string;
326
365
  versions: any[];
327
366
  };
328
- export type ExchangeFile = {
329
- classifier: string | null;
330
- packaging: string;
331
- downloadURL: string;
332
- externalLink: string;
333
- md5: string;
334
- sha1: string;
335
- createdDate: string;
336
- mainFile: string | null;
337
- isGenerated: boolean;
338
- };
339
367
  export type DomainsResponse = {
340
368
  domains: string[];
341
369
  appUniqueId: string;
@@ -354,3 +382,15 @@ export interface UpstreamsResponse {
354
382
  total: number;
355
383
  upstreams: Upstream[];
356
384
  }
385
+ export type AgentNetworkConnection = {
386
+ ref: Reference;
387
+ implementation: string;
388
+ connectionId: string;
389
+ kind: string;
390
+ metadata?: Record<string, any>;
391
+ };
392
+ export type RegistryEntry = {
393
+ kind: string;
394
+ name: string;
395
+ ref: GAV;
396
+ };
@@ -2,6 +2,19 @@ import { ANProcessor, BasePath, Phase, ProjectContext, SpaceBuilder } from './pr
2
2
  export declare class ProjectBuilder {
3
3
  build(projectContext: ProjectContext): Promise<import("./project-builder").Space>;
4
4
  private validateAgentNetwork;
5
+ private validateConnections;
6
+ private validateBrokersTarget;
7
+ private static readonly SUPPORTED_PROTOCOL_BINDINGS;
8
+ private validateBrokerSupportedInterfaces;
9
+ private static toBaseUrl;
10
+ private getBrokerIdFromTarget;
11
+ private getBrokerByImplementation;
12
+ private validateAgentScript;
13
+ private validateIdentifiers;
14
+ private isAgentNetworkV2;
15
+ private getAgentFilesFromAgentNetwork;
16
+ private buildRegistryEntriesV2;
17
+ private buildRegistryEntriesV1;
5
18
  private processNetwork;
6
19
  processNode(model: any, path: BasePath, projectContext: ProjectContext, space: SpaceBuilder, phase: Phase, builders: ANProcessor[]): Promise<void>;
7
20
  private getBuildPipeline;