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
@@ -0,0 +1,379 @@
1
+ import Info = AgentNetworkV2.Info;
2
+ import Broker = AgentNetworkV2.Broker;
3
+ import Registry = AgentNetworkV2.Registry;
4
+ import Context = AgentNetworkV2.Context;
5
+ export type AgentNetworkV2 = {
6
+ agentNetwork: string;
7
+ info?: Info;
8
+ brokers?: {
9
+ [key: string]: Broker;
10
+ };
11
+ registry?: Registry;
12
+ context?: Context;
13
+ };
14
+ export declare namespace AgentNetworkV2 {
15
+ type Contact = {
16
+ name?: string;
17
+ url?: string;
18
+ email?: string;
19
+ };
20
+ type License = {
21
+ name: string;
22
+ identifier?: string;
23
+ url?: string;
24
+ };
25
+ type Info = {
26
+ title: string;
27
+ version: string;
28
+ summary?: string;
29
+ description?: string;
30
+ tags?: string[];
31
+ termsOfService?: string;
32
+ contact?: Contact;
33
+ license?: License;
34
+ };
35
+ type Reference = {
36
+ name: string;
37
+ namespace?: string;
38
+ };
39
+ type ConnectionRef = {
40
+ name: string;
41
+ };
42
+ type BasicAuth = {
43
+ kind: 'basic';
44
+ username: string;
45
+ password: string;
46
+ headerName?: string;
47
+ };
48
+ type APIKeyAuth = {
49
+ kind: 'apiKey';
50
+ apiKey: string;
51
+ headerName?: string;
52
+ };
53
+ type ApiKeyClientCredentialsAuth = {
54
+ kind: 'apikey-client-credentials';
55
+ clientId: {
56
+ value: string;
57
+ name?: string;
58
+ };
59
+ clientSecret: {
60
+ value: string;
61
+ name?: string;
62
+ };
63
+ };
64
+ type OAuth2ClientCredentialsAuth = {
65
+ kind: 'oauth2-client-credentials';
66
+ clientId: string;
67
+ clientSecret: string;
68
+ token: {
69
+ url: string;
70
+ timeout?: number;
71
+ bodyEncoding?: 'form' | 'json';
72
+ };
73
+ scopes?: string[];
74
+ };
75
+ type OAuth2OBOCredentialsAuth = {
76
+ kind: 'oauth2-obo';
77
+ flow: 'oauth2-token-exchange' | 'microsoft-entra-obo';
78
+ clientId: string;
79
+ clientSecret: string;
80
+ tokenEndpoint: string;
81
+ targetType?: 'audience' | 'resource';
82
+ targetValue?: string;
83
+ scope?: string;
84
+ timeout?: number;
85
+ cibaEnabled?: boolean;
86
+ cibaEndpoint?: string;
87
+ cibaLoginHintClaim?: string;
88
+ cibaBindingMessage?: string;
89
+ distributed?: boolean;
90
+ subjectTokenType?: string;
91
+ requestedTokenType?: string;
92
+ };
93
+ type InTaskAuthorizationCodeAuth = {
94
+ kind: 'in-task-authorization-code';
95
+ authorizationEndpoint: string;
96
+ tokenEndpoint: string;
97
+ scopes: string;
98
+ redirectUri: string;
99
+ secondaryAuthProvider?: string;
100
+ responseType?: string;
101
+ codeChallengeMethod?: string;
102
+ tokenAudience?: string;
103
+ bodyEncoding?: string;
104
+ tokenTimeout?: number;
105
+ challengeResponseStatusCode?: number;
106
+ distributed?: boolean;
107
+ };
108
+ type Authentication = BasicAuth | APIKeyAuth | ApiKeyClientCredentialsAuth | OAuth2ClientCredentialsAuth | OAuth2OBOCredentialsAuth | InTaskAuthorizationCodeAuth;
109
+ type LLMAuthentication = Omit<APIKeyAuth, 'headerName'>;
110
+ type StreamableHttpTransport = {
111
+ kind: 'streamableHttp';
112
+ path?: string;
113
+ };
114
+ type SSETransport = {
115
+ kind: 'sse';
116
+ ssePath: string;
117
+ messagesPath?: string;
118
+ };
119
+ type StdioTransport = {
120
+ kind: 'stdio';
121
+ instructions?: string;
122
+ };
123
+ type MCPTransport = StreamableHttpTransport | SSETransport | StdioTransport;
124
+ type Icon = {
125
+ src: string;
126
+ mimeType?: string;
127
+ sizes?: string[];
128
+ theme?: 'dark' | 'light';
129
+ };
130
+ type MCPTool = {
131
+ name: string;
132
+ title?: string;
133
+ description?: string;
134
+ inputSchema: {
135
+ type: 'object';
136
+ properties?: Record<string, Record<string, any>>;
137
+ required?: string[];
138
+ };
139
+ outputSchema?: {
140
+ type: 'object';
141
+ properties?: Record<string, Record<string, any>>;
142
+ required?: string[];
143
+ };
144
+ annotations?: ToolAnnotations;
145
+ execution?: ToolExecution;
146
+ icons?: Icon[];
147
+ _meta?: Record<string, any>;
148
+ };
149
+ type ToolAnnotations = {
150
+ title?: string;
151
+ readOnlyHint?: boolean;
152
+ destructiveHint?: boolean;
153
+ idempotentHint?: boolean;
154
+ openWorldHint?: boolean;
155
+ };
156
+ type ToolExecution = {
157
+ taskSupport?: 'forbidden' | 'optional' | 'required';
158
+ };
159
+ type MCPResource = {
160
+ name: string;
161
+ uri: string;
162
+ title?: string;
163
+ description?: string;
164
+ mimeType?: string;
165
+ size?: number;
166
+ annotations?: Annotations;
167
+ icons?: Icon[];
168
+ _meta?: Record<string, any>;
169
+ };
170
+ type MCPResourceTemplate = {
171
+ name: string;
172
+ uriTemplate: string;
173
+ title?: string;
174
+ description?: string;
175
+ mimeType?: string;
176
+ annotations?: Annotations;
177
+ icons?: Icon[];
178
+ _meta?: Record<string, any>;
179
+ };
180
+ type Annotations = {
181
+ audience?: ('assistant' | 'user')[];
182
+ priority?: number;
183
+ lastModified?: string;
184
+ };
185
+ type MCPPrompt = {
186
+ name: string;
187
+ title?: string;
188
+ description?: string;
189
+ arguments?: MCPPromptArgument[];
190
+ icons?: Icon[];
191
+ _meta?: Record<string, any>;
192
+ };
193
+ type MCPPromptArgument = {
194
+ name: string;
195
+ title?: string;
196
+ description?: string;
197
+ required?: boolean;
198
+ };
199
+ type MCPProvider = {
200
+ organization: string;
201
+ url: string;
202
+ };
203
+ type MCPServerCapabilities = {
204
+ completions?: Record<string, any>;
205
+ experimental?: Record<string, Record<string, any>>;
206
+ tasks?: Record<string, any>;
207
+ logging?: Record<string, any> | boolean;
208
+ prompts?: {
209
+ listChanged?: boolean;
210
+ } | boolean;
211
+ resources?: {
212
+ listChanged?: boolean;
213
+ subscribe?: boolean;
214
+ } | boolean;
215
+ tools?: {
216
+ listChanged?: boolean;
217
+ } | boolean;
218
+ };
219
+ type MCPMetadata = {
220
+ transport: MCPTransport;
221
+ protocolVersion?: string;
222
+ provider?: MCPProvider;
223
+ capabilities?: MCPServerCapabilities;
224
+ tools?: MCPTool[];
225
+ resources?: MCPResource[];
226
+ resourceTemplates?: MCPResourceTemplate[];
227
+ prompts?: MCPPrompt[];
228
+ platform?: string;
229
+ securitySchemes?: Record<string, any>;
230
+ logging?: Record<string, any>;
231
+ };
232
+ type MCP = {
233
+ info?: InfoObject;
234
+ metadata: MCPMetadata;
235
+ urls?: Url[];
236
+ };
237
+ type SupportedInterface = {
238
+ url: string;
239
+ protocolVersion?: string;
240
+ protocolBinding?: string;
241
+ };
242
+ type Card = {
243
+ description: string;
244
+ name: string;
245
+ supportedInterfaces?: SupportedInterface[];
246
+ };
247
+ type MCPToolProvider = {
248
+ mcp: {
249
+ ref: Reference;
250
+ allowed?: string[];
251
+ };
252
+ };
253
+ type A2AToolProvider = {
254
+ a2a: {
255
+ ref: Reference;
256
+ };
257
+ };
258
+ type ToolProvider = MCPToolProvider | A2AToolProvider;
259
+ const isMCPToolProvider: (toolProvider: ToolProvider) => toolProvider is MCPToolProvider;
260
+ const isA2AToolProvider: (toolProvider: ToolProvider) => toolProvider is A2AToolProvider;
261
+ type LLM = {
262
+ info?: InfoObject;
263
+ metadata: {
264
+ platform: string;
265
+ models: string[];
266
+ transcoder: {
267
+ ref: Reference;
268
+ };
269
+ };
270
+ urls?: Url[];
271
+ };
272
+ type Registry = {
273
+ agents?: {
274
+ [key: string]: Agent;
275
+ };
276
+ mcps?: {
277
+ [key: string]: MCP;
278
+ };
279
+ llms?: {
280
+ [key: string]: LLM;
281
+ };
282
+ };
283
+ type InfoObject = {
284
+ label?: string;
285
+ description?: string;
286
+ tags?: string[];
287
+ };
288
+ type Url = {
289
+ name: string;
290
+ url: string;
291
+ };
292
+ type PolicyBindingRef = {
293
+ ref: {
294
+ name: string;
295
+ };
296
+ };
297
+ type PolicyBinding = {
298
+ ref: Reference;
299
+ configuration: Record<string, any>;
300
+ };
301
+ type PolicyItem = PolicyBindingRef | {
302
+ policy: PolicyBinding;
303
+ };
304
+ type Policies = {
305
+ inbound: PolicyItem[];
306
+ outbound: PolicyItem[];
307
+ };
308
+ const isPolicyBindingRef: (policyItem: PolicyItem) => policyItem is PolicyBindingRef;
309
+ type AgentConnection = {
310
+ kind: 'a2a';
311
+ ref: Reference;
312
+ url?: string;
313
+ authentication?: Authentication;
314
+ policies?: Policies;
315
+ };
316
+ type LLMConnection = {
317
+ kind: 'llm';
318
+ ref: Reference;
319
+ url?: string;
320
+ authentication: LLMAuthentication;
321
+ policies?: Policies;
322
+ };
323
+ type MCPServerConnection = {
324
+ kind: 'mcp';
325
+ ref: Reference;
326
+ url?: string;
327
+ authentication?: Authentication;
328
+ policies?: Policies;
329
+ };
330
+ type Connection = AgentConnection | LLMConnection | MCPServerConnection;
331
+ const ConnectionKinds: {
332
+ readonly A2A: "a2a";
333
+ readonly Mcp: "mcp";
334
+ readonly Llm: "llm";
335
+ };
336
+ type ConnectionKind = typeof ConnectionKinds[keyof typeof ConnectionKinds];
337
+ type Context = {
338
+ connections?: {
339
+ [key: string]: Connection;
340
+ };
341
+ policies?: {
342
+ [key: string]: PolicyBinding;
343
+ };
344
+ };
345
+ type Agent = {
346
+ info?: InfoObject;
347
+ metadata: {
348
+ platform: string;
349
+ interfaces: {
350
+ a2a_v03?: {
351
+ card: Card;
352
+ };
353
+ a2a?: {
354
+ card: Card;
355
+ };
356
+ other?: {
357
+ card: Card;
358
+ };
359
+ };
360
+ tools?: ToolProvider[];
361
+ llm?: {
362
+ ref: Reference;
363
+ };
364
+ };
365
+ urls?: Url[];
366
+ };
367
+ type Broker = {
368
+ kind: string;
369
+ info?: InfoObject;
370
+ implementation: string;
371
+ interfaces: {
372
+ a2a: {
373
+ card: Card;
374
+ policies?: Policies;
375
+ };
376
+ };
377
+ ast: any;
378
+ };
379
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentNetworkV2 = void 0;
4
+ // ─── Namespace ───────────────────────────────────────────────────────────────
5
+ // eslint-disable-next-line @typescript-eslint/no-namespace
6
+ var AgentNetworkV2;
7
+ (function (AgentNetworkV2) {
8
+ AgentNetworkV2.isMCPToolProvider = (toolProvider) => {
9
+ return 'mcp' in toolProvider;
10
+ };
11
+ AgentNetworkV2.isA2AToolProvider = (toolProvider) => {
12
+ return 'a2a' in toolProvider;
13
+ };
14
+ AgentNetworkV2.isPolicyBindingRef = (policyItem) => {
15
+ return 'ref' in policyItem;
16
+ };
17
+ AgentNetworkV2.ConnectionKinds = {
18
+ A2A: 'a2a',
19
+ Mcp: 'mcp',
20
+ Llm: 'llm',
21
+ };
22
+ })(AgentNetworkV2 = exports.AgentNetworkV2 || (exports.AgentNetworkV2 = {}));
23
+ //# sourceMappingURL=agent-network-v2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-network-v2.js","sourceRoot":"","sources":["../../src/types/agent-network-v2.ts"],"names":[],"mappings":";;;AAiBA,gFAAgF;AAEhF,2DAA2D;AAC3D,IAAiB,cAAc,CAyZ9B;AAzZD,WAAiB,cAAc;IAyRhB,gCAAiB,GAAG,CAAC,YAA0B,EAAmC,EAAE;QAC/F,OAAO,KAAK,IAAI,YAAY,CAAA;IAC9B,CAAC,CAAA;IAEY,gCAAiB,GAAG,CAAC,YAA0B,EAAmC,EAAE;QAC/F,OAAO,KAAK,IAAI,YAAY,CAAA;IAC9B,CAAC,CAAA;IA6CY,iCAAkB,GAAG,CAAC,UAAsB,EAAkC,EAAE;QAC3F,OAAO,KAAK,IAAI,UAAU,CAAA;IAC5B,CAAC,CAAA;IA4BY,8BAAe,GAAG;QAC7B,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,KAAK;KACF,CAAA;AA2CZ,CAAC,EAzZgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAyZ9B"}