mulesoft-anypoint-cli-agent-fabric-plugin 1.3.1 → 1.5.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.
- package/GETTING_STARTED.md +396 -0
- package/README.md +26 -1
- package/TROUBLESHOOTING.md +412 -0
- package/dist/commands/agent-network/project/create.d.ts +6 -2
- package/dist/commands/agent-network/project/create.js +44 -13
- package/dist/commands/agent-network/project/create.js.map +1 -1
- package/dist/commands/agent-network/project/deploy.js +18 -20
- package/dist/commands/agent-network/project/deploy.js.map +1 -1
- package/dist/commands/agent-network/project/publish.js +2 -1
- package/dist/commands/agent-network/project/publish.js.map +1 -1
- package/dist/commands/agent-network/project/run-local.d.ts +10 -0
- package/dist/commands/agent-network/project/run-local.js +168 -47
- package/dist/commands/agent-network/project/run-local.js.map +1 -1
- package/dist/commands/agent-network/project/undeploy.js +16 -9
- package/dist/commands/agent-network/project/undeploy.js.map +1 -1
- package/dist/commands/agent-network/project/unpublish.js +23 -16
- package/dist/commands/agent-network/project/unpublish.js.map +1 -1
- package/dist/errors/base-error.d.ts +1 -0
- package/dist/errors/base-error.js +28 -18
- package/dist/errors/base-error.js.map +1 -1
- package/dist/errors/error-factory.d.ts +36 -3
- package/dist/errors/error-factory.js +184 -8
- package/dist/errors/error-factory.js.map +1 -1
- package/dist/helpers/connection.d.ts +6 -2
- package/dist/helpers/connection.js +13 -6
- package/dist/helpers/connection.js.map +1 -1
- package/dist/helpers/project/constants.d.ts +1 -1
- package/dist/helpers/proxy-agent.d.ts +2 -0
- package/dist/helpers/proxy-agent.js +26 -0
- package/dist/helpers/proxy-agent.js.map +1 -0
- package/dist/helpers/request-logging.d.ts +4 -0
- package/dist/helpers/request-logging.js +96 -2
- package/dist/helpers/request-logging.js.map +1 -1
- package/dist/resources/schemas/broker-deployment-settings.schema.json +4 -0
- package/dist/types/agent-network-v2.d.ts +36 -9
- package/dist/types/agent-network-v2.js.map +1 -1
- package/dist/types/agent-network.d.ts +0 -4
- package/dist/types/agent-network.js.map +1 -1
- package/dist/types/types.d.ts +20 -3
- package/dist/utils/builders/builder.d.ts +2 -0
- package/dist/utils/builders/builder.js +22 -1
- package/dist/utils/builders/builder.js.map +1 -1
- package/dist/utils/builders/common/connection-facet-helpers.d.ts +2 -0
- package/dist/utils/builders/common/connection-facet-helpers.js +4 -1
- package/dist/utils/builders/common/connection-facet-helpers.js.map +1 -1
- package/dist/utils/builders/common/network-builder-helpers.d.ts +5 -0
- package/dist/utils/builders/common/network-builder-helpers.js +8 -0
- package/dist/utils/builders/common/network-builder-helpers.js.map +1 -1
- package/dist/utils/builders/common/network-metadata.js +1 -1
- package/dist/utils/builders/common/network-metadata.js.map +1 -1
- package/dist/utils/builders/common/types.d.ts +1 -1
- package/dist/utils/builders/local-space-resolver.d.ts +13 -3
- package/dist/utils/builders/local-space-resolver.js +16 -3
- package/dist/utils/builders/local-space-resolver.js.map +1 -1
- package/dist/utils/builders/policies-factory.d.ts +5 -1
- package/dist/utils/builders/policies-factory.js +74 -7
- package/dist/utils/builders/policies-factory.js.map +1 -1
- package/dist/utils/builders/project-builder-impl.d.ts +8 -1
- package/dist/utils/builders/project-builder-impl.js +17 -1
- package/dist/utils/builders/project-builder-impl.js.map +1 -1
- package/dist/utils/builders/project-builder.d.ts +8 -1
- package/dist/utils/builders/project-builder.js +2 -1
- package/dist/utils/builders/project-builder.js.map +1 -1
- package/dist/utils/builders/remote-space-resolver.d.ts +3 -3
- package/dist/utils/builders/remote-space-resolver.js +47 -32
- package/dist/utils/builders/remote-space-resolver.js.map +1 -1
- package/dist/utils/builders/v1/broker-builder.js +2 -1
- package/dist/utils/builders/v1/broker-builder.js.map +1 -1
- package/dist/utils/builders/v1/connections-builder.js +3 -0
- package/dist/utils/builders/v1/connections-builder.js.map +1 -1
- package/dist/utils/builders/v1/network-builder.js +10 -2
- package/dist/utils/builders/v1/network-builder.js.map +1 -1
- package/dist/utils/builders/v2/broker-builder.js +1 -1
- package/dist/utils/builders/v2/broker-builder.js.map +1 -1
- package/dist/utils/builders/v2/connections-builder.d.ts +5 -1
- package/dist/utils/builders/v2/connections-builder.js +93 -19
- package/dist/utils/builders/v2/connections-builder.js.map +1 -1
- package/dist/utils/builders/v2/llm-builder.js +17 -6
- package/dist/utils/builders/v2/llm-builder.js.map +1 -1
- package/dist/utils/builders/v2/network-builder.js +2 -0
- package/dist/utils/builders/v2/network-builder.js.map +1 -1
- package/dist/utils/constants.d.ts +15 -1
- package/dist/utils/constants.js +19 -4
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/deployment-settings.d.ts +1 -0
- package/dist/utils/deployment-settings.js.map +1 -1
- package/dist/utils/dry-run/dry-run-render.d.ts +1 -0
- package/dist/utils/dry-run/dry-run-render.js +23 -13
- package/dist/utils/dry-run/dry-run-render.js.map +1 -1
- package/dist/utils/exchange.d.ts +1 -0
- package/dist/utils/exchange.js +20 -0
- package/dist/utils/exchange.js.map +1 -1
- package/dist/utils/facets/agent-graph-facet.d.ts +1 -1
- package/dist/utils/facets/agent-graph-facet.js +8 -8
- package/dist/utils/facets/agent-graph-facet.js.map +1 -1
- package/dist/utils/facets/api-instance-facet.d.ts +2 -0
- package/dist/utils/facets/api-instance-facet.js +72 -14
- package/dist/utils/facets/api-instance-facet.js.map +1 -1
- package/dist/utils/facets/apim-policy-helpers.d.ts +29 -2
- package/dist/utils/facets/apim-policy-helpers.js +19 -5
- package/dist/utils/facets/apim-policy-helpers.js.map +1 -1
- package/dist/utils/facets/asset-facet.d.ts +1 -0
- package/dist/utils/facets/asset-facet.js +34 -25
- package/dist/utils/facets/asset-facet.js.map +1 -1
- package/dist/utils/facets/connection-facet.d.ts +6 -0
- package/dist/utils/facets/connection-facet.js +199 -17
- package/dist/utils/facets/connection-facet.js.map +1 -1
- package/dist/utils/facets/deployment-helpers.d.ts +1 -0
- package/dist/utils/facets/deployment-helpers.js +26 -20
- package/dist/utils/facets/deployment-helpers.js.map +1 -1
- package/dist/utils/facets/deployment-runner.js +4 -1
- package/dist/utils/facets/deployment-runner.js.map +1 -1
- package/dist/utils/facets/facets.d.ts +1 -0
- package/dist/utils/facets/facets.js +16 -7
- package/dist/utils/facets/facets.js.map +1 -1
- package/dist/utils/facets/mule-application-facet.js +2 -2
- package/dist/utils/facets/mule-application-facet.js.map +1 -1
- package/dist/utils/facets/secret-manager-client.d.ts +16 -0
- package/dist/utils/facets/secret-manager-client.js +67 -0
- package/dist/utils/facets/secret-manager-client.js.map +1 -0
- package/dist/utils/facets/secret-tls-validator.d.ts +5 -0
- package/dist/utils/facets/secret-tls-validator.js +60 -0
- package/dist/utils/facets/secret-tls-validator.js.map +1 -0
- package/dist/utils/gateway.js +1 -1
- package/dist/utils/gateway.js.map +1 -1
- package/dist/utils/run-local/build-status.js +2 -2
- package/dist/utils/run-local/build-status.js.map +1 -1
- package/dist/utils/run-local/index.d.ts +1 -1
- package/dist/utils/run-local/index.js +2 -1
- package/dist/utils/run-local/index.js.map +1 -1
- package/dist/utils/run-local/local-a2a-upstream.d.ts +1 -0
- package/dist/utils/run-local/local-a2a-upstream.js +5 -4
- package/dist/utils/run-local/local-a2a-upstream.js.map +1 -1
- package/dist/utils/run-local/local-tls-model.d.ts +18 -0
- package/dist/utils/run-local/local-tls-model.js +97 -0
- package/dist/utils/run-local/local-tls-model.js.map +1 -0
- package/dist/utils/run-local/local-tls.d.ts +37 -0
- package/dist/utils/run-local/local-tls.js +245 -0
- package/dist/utils/run-local/local-tls.js.map +1 -0
- package/dist/utils/run-local/policy-resolver.js +5 -0
- package/dist/utils/run-local/policy-resolver.js.map +1 -1
- package/dist/utils/run-local/runtime-environment-manager.d.ts +2 -2
- package/dist/utils/run-local/runtime-environment-manager.js +8 -4
- package/dist/utils/run-local/runtime-environment-manager.js.map +1 -1
- package/dist/utils/run-local/secrets-manager.d.ts +1 -0
- package/dist/utils/run-local/secrets-manager.js +2 -1
- package/dist/utils/run-local/secrets-manager.js.map +1 -1
- package/dist/utils/sanitize.d.ts +1 -0
- package/dist/utils/sanitize.js +14 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/dist/utils/variables.d.ts +7 -2
- package/dist/utils/variables.js +46 -6
- package/dist/utils/variables.js.map +1 -1
- package/package.json +6 -4
- package/scripts/extract-error-catalog.js +88 -0
- package/templates/agentic-network/agent-network.yaml.template +1 -7
- package/templates/agentic-network/brokers/broker1.agent.template +1 -1
- package/templates/agentic-network/exchange.json.template +9 -1
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
This guide helps you diagnose and resolve errors from the Anypoint CLI Agent Fabric plugin. It has two parts:
|
|
4
|
+
|
|
5
|
+
- **[Part A — CLI error-code reference](#part-a--cli-error-code-reference):** every error code the CLI can raise, what triggers it, and how to fix it.
|
|
6
|
+
- **[Part B — Dependent services: status codes and common issues](#part-b--dependent-services-status-codes-and-common-issues):** the platform services the CLI calls (Exchange, API Manager, Runtime Fabric, Gateway Manager, Access Management), the HTTP failures they return, and what to do about them.
|
|
7
|
+
|
|
8
|
+
> This reference reflects the CLI's error codes as of the latest release. If you see a code that isn't listed here, update to the latest CLI version and check again; if it's still missing, open a support case.
|
|
9
|
+
|
|
10
|
+
## How to read a CLI error
|
|
11
|
+
|
|
12
|
+
When a command fails, the CLI prints a structured JSON payload to `stderr`. For example:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"errorCode": 3001,
|
|
17
|
+
"errorMessage": "Error while trying to create 'my-agent' in API Manager. Please, check in the Platform if the API 'my-agent' already exists.",
|
|
18
|
+
"requestId": "a1b2c3d4-0000-4444-8888-abcdef123456",
|
|
19
|
+
"steps": ["✅ resolveAssets", "❌ createApiInstance"],
|
|
20
|
+
"referenceTo": { "url": "https://anypoint.mulesoft.com/..." },
|
|
21
|
+
"cause": {
|
|
22
|
+
"message": "Request failed with status code 409",
|
|
23
|
+
"request": { "url": "https://.../apimanager/api/v1/organizations/.../apis", "method": "post" },
|
|
24
|
+
"response": { "status": "409 : 'Conflict'" },
|
|
25
|
+
"data": { "..." : "..." }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use the fields as follows:
|
|
31
|
+
|
|
32
|
+
| Field | What it tells you | Where to look |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `errorCode` | The CLI error class. | [Part A](#part-a--cli-error-code-reference) — find the row for this code. |
|
|
35
|
+
| `errorMessage` | The human-readable summary, with your values interpolated. | Read it first; it usually names the resource involved. |
|
|
36
|
+
| `cause.response.status` | The HTTP status the downstream service returned (format `"<code> : '<statusText>'"`). | [Part B](#part-b--dependent-services-status-codes-and-common-issues) — match the service and status. |
|
|
37
|
+
| `cause.request.url` / `method` | Which service and endpoint failed. | Identifies the dependent service in Part B. |
|
|
38
|
+
| `requestId` | Correlation ID for the failed request. | Include it when you open a support case. |
|
|
39
|
+
| `steps` | Which stages completed (✅) and which failed (❌). | Shows how far a multi-step command got. |
|
|
40
|
+
|
|
41
|
+
Some errors are **pass-through errors**: the top-level `errorMessage` is generic, and the specific cause is nested in the `cause` field. For those (for example codes `2010`, `3030`, `9001`), read the `cause` block and then consult Part B for the underlying service failure.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Part A — CLI error-code reference
|
|
46
|
+
|
|
47
|
+
Error codes are grouped into bands by area:
|
|
48
|
+
|
|
49
|
+
| Band | Area | Jump to |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| 1000–1999 | Build (project, schema, AgentScript, MCP (Model Context Protocol) introspection) | [Build errors](#build-errors-10001999) |
|
|
52
|
+
| 2000–2999 | Publish / unpublish | [Publish errors](#publish-errors-20002999) |
|
|
53
|
+
| 3000–3999 | Deploy / undeploy | [Deploy errors](#deploy-errors-30003999) |
|
|
54
|
+
| 4000–4999 | Gateway setup | [Gateway setup errors](#gateway-setup-errors-40004999) |
|
|
55
|
+
| 5000–5999 | Entitlement / organization access | [Entitlement errors](#entitlement-and-organization-access-errors-50005999) |
|
|
56
|
+
| 6000–6999 | Dependency manager | [Dependency manager errors](#dependency-manager-errors-60006999) |
|
|
57
|
+
| 7000–7999 | Create command | [Create command errors](#create-command-errors-70007999) |
|
|
58
|
+
| 8001–8004 | Policy validation | [Policy validation errors](#policy-validation-errors-80018004) |
|
|
59
|
+
| 8500–8550 | Local run (`run-local`) | [Local run errors](#local-run-errors-85008550) |
|
|
60
|
+
| 9001 | Generic (uncategorized) | [Generic errors](#generic-errors-9001) |
|
|
61
|
+
| 10001 | Access management | [Access management errors](#access-management-errors-10001) |
|
|
62
|
+
| 11001–11005 | Gateway flags / CLI arguments | [Gateway flag errors](#gateway-flag-and-cli-argument-errors-1100111005) |
|
|
63
|
+
|
|
64
|
+
> **Note on pass-through codes.** A few codes (`2010`, `3030`, `9001`) carry a message assembled at the failure site. Their "How to fix" points you at the nested `cause` and Part B, because the specific error lives there.
|
|
65
|
+
>
|
|
66
|
+
> **Internal errors.** Codes marked *Internal* indicate a build-output or invariant problem you can't fix by changing configuration: rebuild the project with `agent-network project build`, and if it persists, open a support case with the `requestId`.
|
|
67
|
+
|
|
68
|
+
### Build errors (1000–1999)
|
|
69
|
+
|
|
70
|
+
| Code | Name | What it means | How to fix |
|
|
71
|
+
| --- | --- | --- | --- |
|
|
72
|
+
| 1001 | `projectDescriptorNotFound` | `exchange.json` is missing for the project. | Run the command from the project root, and confirm `exchange.json` exists. |
|
|
73
|
+
| 1002 | `invalidAgentNetworkProject` | The project failed validation. | Check the validation output printed above the error; fix the reported issue and rebuild. |
|
|
74
|
+
| 1003 | `buildAssetsError` | An asset failed to build. | Read the nested `cause`; usually a malformed asset file in the assets directory. |
|
|
75
|
+
| 1004 | `variableNotFound` | A `${placeholder}` has no matching variable. | Declare the variable under `metadata.variables` in `exchange.json`. |
|
|
76
|
+
| 1005 | `validatingAgentNetworkError` | Project validation exited with a non-zero status. | Review the validator output for the specific failure. |
|
|
77
|
+
| 1006 | `buildingAgentNetworkError` | The build process exited with a non-zero status. | Check the build logs printed above the error. |
|
|
78
|
+
| 1007 | `wrapperNotFoundError` | The Maven wrapper (`mvnw`/`mvnw.cmd`) is missing. | Ensure the project is a Maven project and the wrapper is present and executable. |
|
|
79
|
+
| 1008 | `buildBrokersAppError` | The Brokers App failed to build. | Check the logs; usually an AgentScript compile error. |
|
|
80
|
+
| 1009 | `variablesNotFound` | One or more `${placeholder}`s in `agent-network.yaml` are not declared; raised by `build`. | Declare each listed variable under `metadata.variables` in `exchange.json`. |
|
|
81
|
+
| 1010 | `invalidVariablePath` | A variable resolves to an invalid nested path. | Correct the variable path in `exchange.json`. |
|
|
82
|
+
| 1011 | `invalidPath` | A file or YAML path is invalid. | Verify the referenced path exists and is well-formed. |
|
|
83
|
+
| 1012 | `invalidOrNotBuiltAgentNetworkProject` | A downstream command ran before the project was built. | Run `agent-network project build` first. |
|
|
84
|
+
| 1013 | `unsupportedSchemaVersion` | The `schemaVersion` isn't supported by this CLI. | Use a supported version (listed in the message), or upgrade the CLI. |
|
|
85
|
+
| 1014 | `validationConnectionsError` | A connection references an undefined target, or has the wrong kind. | Fix the connection references in `agent-network.yaml` to match defined entities and kinds. |
|
|
86
|
+
| 1015 | `noBrokerForImplementation` | An AgentScript implementation has no matching broker entry. | Add a broker for the implementation, or remove the orphaned file. |
|
|
87
|
+
| 1016 | `unsupportedToolType` | An entity declares an unknown tool type. | Use a supported tool type (listed in the message). |
|
|
88
|
+
| 1017 | `invalidAgentScriptPath` | An AgentScript path is invalid or its content is unsafe. | Use a path inside the project; remove unsafe content. |
|
|
89
|
+
| 1018 | `errorParsingAgentFile` | An AgentScript file failed to parse. | Fix the syntax error reported in the nested `cause`. |
|
|
90
|
+
| 1019 | `policyBindingNotFound` | A referenced policy binding doesn't exist. | Define the binding, or correct the reference name. |
|
|
91
|
+
| 1020 | `brokerKindMismatch` **⚠ see note** | A broker's kind doesn't support the requested interface kind. | Align the broker's kind with the interface, or use a compatible broker. |
|
|
92
|
+
| 1021 | `brokerIdMismatch` **⚠ see note** | The broker id in AgentScript doesn't match the YAML. | Make the broker id consistent between AgentScript and `agent-network.yaml`. |
|
|
93
|
+
| 1022 | `invalidAgentNetworkProjectDescriptor` **⚠ see note** | `exchange.json` descriptor is malformed. | Fix the descriptor per the details in the message. |
|
|
94
|
+
| 1023 | `brokerSupportedInterfacesUrlMismatch` **⚠ see note** | A broker's A2A supported interfaces use different base URLs. | Make all supported interfaces share one scheme/host/port; differ only on path. |
|
|
95
|
+
| 1024 | `brokerUnsupportedProtocolBinding` **⚠ see note** | A broker's `protocolBinding` isn't supported. | Use a supported `protocolBinding` value (listed in the message). |
|
|
96
|
+
| 1020 | `mcpMainYamlNotFound` **⚠ see note** | MCP introspection can't find the main YAML. | Set the `main` field in `exchange.json` to the correct file. |
|
|
97
|
+
| 1021 | `mcpYamlParseError` **⚠ see note** | The MCP YAML failed to parse. | Fix the YAML syntax error in the reported file. |
|
|
98
|
+
| 1022 | `mcpServerJsonNotFound` **⚠ see note** | `server.json` couldn't be read. | Confirm `server.json` exists and is readable. |
|
|
99
|
+
| 1023 | `mcpServerJsonInvalidJson` **⚠ see note** | `server.json` isn't valid JSON. | Fix the JSON syntax. |
|
|
100
|
+
| 1024 | `mcpServerJsonSchemaValidation` **⚠ see note** | `server.json` failed schema validation. | Correct the fields listed in the message. |
|
|
101
|
+
| 1025 | `mcpServerJsonNoRemotes` | `server.json` defines no remotes. | Add a remote entry; only remote MCP servers are supported. |
|
|
102
|
+
| 1026 | `mcpServerJsonMultipleRemotes` | `server.json` defines multiple remotes. | Pass `--transport` to select one. |
|
|
103
|
+
| 1027 | `mcpServerJsonRemoteNotFound` | The requested transport isn't in `server.json`. | Use one of the available transports listed in the message. |
|
|
104
|
+
| 1028 | `mcpInvalidRemoteProtocol` | The remote URL uses an unsupported scheme. | Use `http:` or `https:`. |
|
|
105
|
+
| 1029 | `mcpInvalidRemoteUrl` | The remote URL failed to parse. | Correct the URL in `server.json`. |
|
|
106
|
+
| 1030 | `mcpInvalidRegistryKey` | A registry key contains invalid characters. | Use only lowercase letters, digits, and hyphens. |
|
|
107
|
+
| 1031 | `mcpCannotDeriveRegistryKey` | A registry key couldn't be derived. | Declare an explicit registry key. |
|
|
108
|
+
| 1032 | `assetIdTooLongForDeployment` | The project asset id exceeds the deployment-name length limit. | Shorten the asset id and rebuild. |
|
|
109
|
+
| 1033 | `invalidExchangeJson` | `exchange.json` isn't valid JSON. | Fix the JSON syntax. |
|
|
110
|
+
| 1034 | `invalidExchangeJsonField` | An `exchange.json` field has the wrong type. | Set the reported field to the expected type (a string). |
|
|
111
|
+
| 1035 | `pushNotificationNotSupported` | A broker sets `capabilities.pushNotifications: true` in its A2A card, but push notifications aren't supported. | Set `pushNotifications` to `false` in `interfaces.a2a.card` and rebuild. |
|
|
112
|
+
| 1036 | `variableKeyCollision` | Two `metadata.variables` entries in `exchange.json` flatten to the same dotted key (e.g. `"a.b"` and nested `a` → `b`). | Rename one entry, or use nested objects consistently. |
|
|
113
|
+
| 1037 | `variableNameContainsColon` | A `metadata.variables` key or category in `exchange.json` contains a `:`, which is a restricted character and is not allowed. | Remove the `:` from the reported key or category (the message shows its full path). |
|
|
114
|
+
| 1038 | `unsupportedAuthenticationKind` | A connection (or `card.authentication`) declares an authentication `kind` the CLI does not recognize. | Use a supported kind (`basic`, `apiKey`, `apikey-client-credentials`, `oauth2-client-credentials`, `oauth2-obo` with flow `oauth2-token-exchange` or `microsoft-entra-obo`, `in-task-authorization-code`). Fix the YAML and rebuild. |
|
|
115
|
+
|
|
116
|
+
> **⚠ Code collision (1020–1024) — known defect.** Codes 1020 through 1024 are each currently assigned to **two** different errors: a broker-interface error and an MCP-introspection error. The `errorMessage` text disambiguates which one you hit (broker interface vs. `server.json`/MCP YAML). This is a defect that will be fixed by renumbering the MCP block; until then, match on the message, not the number alone.
|
|
117
|
+
|
|
118
|
+
### Publish errors (2000–2999)
|
|
119
|
+
|
|
120
|
+
| Code | Name | What it means | How to fix |
|
|
121
|
+
| --- | --- | --- | --- |
|
|
122
|
+
| 2001 | `organizationAccessError` | You lack access to the project's `groupId`. | Switch to an organization that owns the `groupId`, or request access. |
|
|
123
|
+
| 2002 | `projectNotBuiltError` | Publish ran before build. | Run `agent-network project build` first. |
|
|
124
|
+
| 2003 | `publishError` | An asset failed to publish. | Read the nested `cause`; see [Exchange](#exchange) in Part B. |
|
|
125
|
+
| 2004 | `assetNotFoundError` | An Exchange asset lookup failed. | Verify the GAV and that the asset exists; check organization access. |
|
|
126
|
+
| 2005 | `assetTypeMismatchError` | An asset already exists in Exchange with a different type. | Use a new asset id/version, or reconcile the existing asset's type. |
|
|
127
|
+
| 2006 | `ownershipConflictsError` | The asset id is already owned by another project. | Choose a different asset id, or publish from the owning project. |
|
|
128
|
+
| 2007 | `deployedResourcesExistOnUnpublish` | Unpublish is blocked because deployed resources still reference the assets. | Run `agent-network project undeploy` first, then retry unpublish. |
|
|
129
|
+
| 2010 | `unpublishError` | Reports a failure that occurred during the unpublish stage. | Read the nested `cause` for the specific reason; see [Exchange](#exchange) — note the known 403 issue. |
|
|
130
|
+
| 2011 | `incompatibleTargetVersionPublish` | The `target/` artifact was built with an incompatible CLI version. | Rebuild with the current CLI version, then publish. |
|
|
131
|
+
| 2012 | `projectNotBuiltPublish` | No build artifact was found at publish time. | Run `agent-network project build` first. |
|
|
132
|
+
|
|
133
|
+
### Deploy errors (3000–3999)
|
|
134
|
+
|
|
135
|
+
| Code | Name | What it means | How to fix |
|
|
136
|
+
| --- | --- | --- | --- |
|
|
137
|
+
| 3001 | `createApiError` | Creating an API instance in API Manager failed. | Often a 409 — an instance with this name already exists. See [API Manager](#api-manager). |
|
|
138
|
+
| 3004 | `deployError` | Deploying an API into a gateway failed. | Read the nested `cause`; see [Runtime Fabric / AMC](#runtime-fabric--application-manager-amc). |
|
|
139
|
+
| 3005 | `connectionNotFoundError` | A connection couldn't be resolved. | Verify the connection is published and its name matches the reference. |
|
|
140
|
+
| 3006 | `gettingEgressConnectionError` | Fetching the egress connection failed. | Check the egress gateway and target; see [Gateway Manager](#gateway-manager). |
|
|
141
|
+
| 3007 | `deployAPIError` | A generic API deploy failure. | Read the nested `cause`. |
|
|
142
|
+
| 3008 | `brokerGroupDeploymentError` | Broker group (Agent Graph) deployment failed. | Check the logs; see [Runtime Fabric / AMC](#runtime-fabric--application-manager-amc). |
|
|
143
|
+
| 3009 | `unableToResolve` | A GAV couldn't be resolved at deploy time. | Build and publish the project before deploying. |
|
|
144
|
+
| 3010 | `createPatchApiError` | Updating an existing API instance failed. | Read the nested `cause`; see [API Manager](#api-manager). |
|
|
145
|
+
| 3012 | `noTranscodingFoundFor` | An expected transcoding policy is missing. | Ensure the transcoding policy is published and referenced correctly. |
|
|
146
|
+
| 3015 | `gatewayTargetSpaceError` | The ingress/egress gateways and the runtime target space don't match. | Choose gateways whose target space matches your runtime target. |
|
|
147
|
+
| 3016 | `createApiSpecNotFound` | The API spec asset isn't in Exchange. | Publish the Agent Network before deploying. |
|
|
148
|
+
| 3017 | `requestTimeout` | A single HTTP request timed out. | Retry; if it persists, raise `--request-timeout`. See [retry engine](#the-retry-and-timeout-engine). |
|
|
149
|
+
| 3018 | `commandTimeout` | The overall command exceeded its timeout budget. | Review organization resource limits; raise `--process-timeout`. Check `steps` for how far it got. |
|
|
150
|
+
| 3019 | `findingAssetsError` | Discovering assets to deploy failed. | Retry; if it persists, read the nested `cause`. |
|
|
151
|
+
| 3020 | `nonPublishedAssetsFoundError` | One or more assets aren't published in Exchange. | Publish the listed assets, then deploy. |
|
|
152
|
+
| 3021 | `noGatewayFoundForInstance` | No gateway resolvable for an API instance. | Ensure a gateway is configured for the instance's protection direction. |
|
|
153
|
+
| 3022 | `assetNotFoundForInstance` | An API instance's backing asset is missing from Exchange. | Publish the asset before deploying. |
|
|
154
|
+
| 3023 | `assetNotFoundForConnection` | A connection's backing asset is missing from Exchange. | Publish the asset before deploying. |
|
|
155
|
+
| 3024 | `missingRequiredUpstreamUrl` | A required upstream URL wasn't resolved. | Provide the upstream URL variable at deploy time (`--property`). |
|
|
156
|
+
| 3025 | `dependencyFailure` | A stage was skipped because a dependency's stage failed. | Fix the upstream failure reported elsewhere in the output. |
|
|
157
|
+
| 3026 | `apiBelongsToAnotherProject` | An instance name collides with another project's instance. | Choose a different name, or reuse the existing instance. |
|
|
158
|
+
| 3027 | `invalidSourceValue` | An invalid `source` value was supplied. | Set `source` to a supported value (listed in the message). |
|
|
159
|
+
| 3028 | `agentGraphDeploymentError` | Agent Graph provisioning failed. | Check the logs; see [Runtime Fabric / AMC](#runtime-fabric--application-manager-amc). |
|
|
160
|
+
| 3029 | `connectionRefNotFoundError` | A `connection.ref.name` didn't resolve. | Verify the connection is published and the ref name matches. |
|
|
161
|
+
| 3030 | `undeployError` | Reports a failure that occurred during the undeploy stage (fail-closed). | Read the nested `cause` for the specific reason; see Part B for the underlying service. |
|
|
162
|
+
| 3031 | `invalidPolicy` | A policy metadata response was empty or invalid. | Verify the policy GAV (`groupId:assetId:version` coordinate); retry (may be transient). See [API Manager](#api-manager). |
|
|
163
|
+
| 3032 | `missingGatewayForSharedSpace` | A shared-space deploy needs a gateway but none was given. | Provide a gateway with `--gateway`. |
|
|
164
|
+
| 3033 | `invalidGAVFormat` | A GAV argument couldn't be parsed. | Use `groupId:assetId:version`. |
|
|
165
|
+
| 3034 | `parentAssetNotFound` | A parent asset lookup failed. | Verify the parent asset exists in Exchange. |
|
|
166
|
+
| 3036 | `invalidAgentProtocol` | Agent metadata declares no protocol for a connection. | Declare a protocol for the connection in agent metadata. |
|
|
167
|
+
| 3037 | `unsupportedAgentProtocol` | An agent exposes a non-A2A protocol only. | Only A2A (Agent2Agent) agents (`a2a`/`a2a_v1`) can be connected. |
|
|
168
|
+
| 3041 *Internal* | `networkLockMissing` | The Agent Network lock file (generated at publish) is missing at deploy time. | Build and publish the Agent Network to (re)generate the lock file, then deploy. |
|
|
169
|
+
| 3042 *Internal* | `networkLockMalformed` | The Agent Network lock file exists but is malformed or has an invalid key. | Rebuild and republish the Agent Network to regenerate the lock file, then deploy. |
|
|
170
|
+
| 3044 *Internal* | `assetMissingFromNetworkLock` | An asset referenced by the project isn't present in the lock file. | Rebuild and republish the Agent Network so the lock file covers every asset, then deploy. |
|
|
171
|
+
| 3045 | `incompatibleTargetVersionDeploy` | The `target/` artifact was built with an incompatible CLI version. | Rebuild with the current CLI, republish, then deploy. |
|
|
172
|
+
| 3046 | `projectNotBuiltDeploy` | Deploy ran before build. | Run `agent-network project build` first. |
|
|
173
|
+
| 3047 | `bulkApplyPolicyError` | Applying policies in API Manager failed. | Check policy GAV resolution and organization entitlements. See [API Manager](#api-manager). |
|
|
174
|
+
| 3048 | `brokerAuthorizationPolicyConflict` | An explicit `user-context-propagation` policy conflicts with the broker's `authorization` section. | Align or remove the conflicting policy field, per the message. |
|
|
175
|
+
| 3049 | `deploymentSettingsFlagsMutuallyExclusive` | `--deployment-properties-file` and `--deployment-property` were both passed. | Use one or the other, not both. |
|
|
176
|
+
| 3050 | `deploymentFileReadError` | The deployment settings file couldn't be read. | Verify the file path and permissions. |
|
|
177
|
+
| 3051 | `deploymentSettingsMalformedEntry` | A `--deployment-property` entry is malformed. | Use `<scope>:<name>:<value>` (for example `brokers:vCores:0.1`). |
|
|
178
|
+
| 3052 | `deploymentSettingsInvalid` | Deployment settings failed semantic validation. | Fix the reported setting. |
|
|
179
|
+
| 3053 | `runtimeVersionNotFound` | The requested runtime version isn't available. | Use one of the available versions listed in the message. |
|
|
180
|
+
| 3054 | `mixedRuntimeTypesInDeploy` | The deploy set mixes Mule apps and Agent Graphs. | Split into separate deploys. |
|
|
181
|
+
| 3060 | `llmAuthenticationKindNotSupported` | An LLM connection's authentication kind isn't declared by the referenced llm-metadata. | Use one of the supported kinds listed in the message, or publish an LLM asset that declares the kind. The legacy path (no `inputFormat`) accepts only `apiKey`. |
|
|
182
|
+
| 3061 | `llmAssetRequiresV2` | A V1 Agent Network references an LLM asset that declares `inputFormat` (V2-only). | Migrate the project to schema 2.0.0, or reference an LLM asset without `inputFormat`. |
|
|
183
|
+
| 3062 | `llmInputFormatRequiresAuthentication` | An LLM asset declares `inputFormat` but no non-empty `authentication`. | Add `authentication` to the LLM metadata (use `[{kind: 'none'}]` for no auth) and republish. |
|
|
184
|
+
| 3063 | `llmModelNotDeclared` | An agent requests a `model` the referenced LLM asset doesn't declare in `models`. | Use one of the declared model ids listed in the message, or add the model to the LLM asset and republish. |
|
|
185
|
+
| 3064 | `llmAuthenticationKindUnmapped` | The referenced llm-metadata declares the connection's authentication kind, but the CLI has no policy mapping for it. | Use one of the kinds listed in the message, or upgrade the CLI. |
|
|
186
|
+
| 3065 | `llmAdapterPolicyNotFound` | The adapter policy named by the LLM asset's `policyRef` was not found in Exchange (404, or no version returned). | Republish the LLM asset with a valid `policyRef`, or publish the adapter policy. |
|
|
187
|
+
| 3066 | `llmAdapterPolicyLookupFailed` | Resolving the LLM asset's adapter policy failed (not a 404, for example a 5xx). | Retry; if it persists, check Exchange availability and your access to the policy. |
|
|
188
|
+
| 3067 | `cardAuthenticationUpstreamsError` | Configuring dual egress upstreams (`agent` / `card`) for agent-card authentication failed in API Manager (create PATCH, update PATCH, or upstreams GET). | Confirm Flex Gateway ≥ **1.5.0**, that the connection is `a2a`/`a2a_v1`, and that outbound policies are enabled for the environment (`OUTBOUND_POLICIES_GCL_ENABLED`). An older CLI cannot update a connection that already has two upstreams, because it still PATCHes `endpoint.uri`, which API Manager rejects (ADR 0005 finding 7). Read the nested `cause`; see [API Manager](#api-manager). See ADR 0005. |
|
|
189
|
+
| 3068 | `outboundPolicyUpstreamLabelNotFound` | An outbound policy was bound to a labelled upstream (`agent` or `card`) that API Manager did not return. | Redeploy so upstreams and routing match the desired set; if it persists, the PATCH response may be missing a label — open a support case with the `requestId`. |
|
|
190
|
+
|
|
191
|
+
### Gateway setup errors (4000–4999)
|
|
192
|
+
|
|
193
|
+
| Code | Name | What it means | How to fix |
|
|
194
|
+
| --- | --- | --- | --- |
|
|
195
|
+
| 4001 | `noDomainsFound` | No private-network domains for the target space. | Create a private network in the target space first. |
|
|
196
|
+
| 4002 | `setupIngressGatewayError` | Ingress gateway setup threw. | Read the nested `cause`; see [Gateway Manager](#gateway-manager). |
|
|
197
|
+
| 4003 | `setupIngressGatewayFail` | Ingress gateway setup returned a non-success status. | Check the `status` and response in the message; see [Gateway Manager](#gateway-manager). |
|
|
198
|
+
| 4004 | `setupEgressGatewayError` | Egress gateway setup threw. | Read the nested `cause`; see [Gateway Manager](#gateway-manager). |
|
|
199
|
+
| 4005 | `setupEgressGatewayFail` | Egress gateway setup returned a non-success status. | Check the `status` and response; see [Gateway Manager](#gateway-manager). |
|
|
200
|
+
| 4006 | `gatewayNotFoundError` | A named gateway isn't in the environment. | Use one of the available gateways listed in the message. |
|
|
201
|
+
| 4007 | `runtimeTargetNotFoundError` | A named runtime target space isn't in the environment. | Use an available space, or create one ([CloudHub 2 docs](https://docs.mulesoft.com/cloudhub-2/ps-create-configure)). |
|
|
202
|
+
| 4008 | `unableToRetrieveTargetSpaceMetadata` | Fetching target space metadata failed. | Retry; see [Gateway Manager](#gateway-manager). |
|
|
203
|
+
| 4009 | `unableToRetrieveGateways` | Fetching the gateway list failed. | Retry; check organization/environment access. |
|
|
204
|
+
| 4010 | `unableToRetrieveGatewayVersions` | Fetching gateway versions failed. | Retry; see [Gateway Manager](#gateway-manager). |
|
|
205
|
+
| 4011 | `gatewayChannelNotFoundError` | The requested update channel doesn't exist. | Use one of the available channels listed in the message. |
|
|
206
|
+
| 4012 | `noGatewayVersionsFoundError` | The channel has no versions. | Choose a different channel. |
|
|
207
|
+
| 4013 | `gatewayAlreadyExists` | A gateway with this name already exists in the environment. | Gateway names must be unique per environment; choose a different name. |
|
|
208
|
+
| 4014 | `setupGatewayInsufficientResourcesError` | The organization's gateway quota is exhausted. | Delete an unused gateway, or increase your organization limits. |
|
|
209
|
+
| 4015 | `missingDomainsResponse` | Domains are required for a non-shared target but none were returned. | Confirm a private network exists for the target. |
|
|
210
|
+
| 4016 | `gatewayUpdateFailedError` | Updating the gateway runtime version failed. | Check the `status` in the message; retry. |
|
|
211
|
+
| 4017 | `gatewayUpdateTimedOutError` | The gateway update didn't finish within the timeout. | Check the gateway status in Runtime Manager; retry once stable. |
|
|
212
|
+
|
|
213
|
+
### Entitlement and organization-access errors (5000–5999)
|
|
214
|
+
|
|
215
|
+
| Code | Name | What it means | How to fix |
|
|
216
|
+
| --- | --- | --- | --- |
|
|
217
|
+
| 5001 | `noEntitlementForOrganization` | Retrieving organization entitlements failed. | Check the `status` in the message; verify organization access; see [Access Management](#access-management). |
|
|
218
|
+
|
|
219
|
+
### Dependency manager errors (6000–6999)
|
|
220
|
+
|
|
221
|
+
| Code | Name | What it means | How to fix |
|
|
222
|
+
| --- | --- | --- | --- |
|
|
223
|
+
| 6001 | `downloadFileError` | A dependency download failed. | Check network access; retry. |
|
|
224
|
+
| 6002 | `couldNotFindVersion` | No resolvable version in `maven-metadata.xml`. | Confirm the dependency exists in the repository and that you have network access to it. |
|
|
225
|
+
| 6003 | `invalidStrategyVersion` | A dependency strategy/version config is invalid. | Correct the strategy/version in the descriptor. |
|
|
226
|
+
| 6004 | `invalidMetadataFile` | A dependency metadata file is invalid. | Re-run setup to refresh the cached dependency. |
|
|
227
|
+
| 6005 | `runtimeDependenciesFileNotFound` | The runtime dependency manifest is missing. | Run `agent-network setup dependencies`. |
|
|
228
|
+
| 6006 | `invalidDependencyVersion` | A dependency version isn't valid SemVer. | Use SemVer (for example `2.1.3`). |
|
|
229
|
+
|
|
230
|
+
### Create command errors (7000–7999)
|
|
231
|
+
|
|
232
|
+
| Code | Name | What it means | How to fix |
|
|
233
|
+
| --- | --- | --- | --- |
|
|
234
|
+
| 7001 | `projectAlreadyExists` | The target project/directory already exists. | Use a new name or directory. |
|
|
235
|
+
| 7002 | `invalidAssetVersion` | The asset version isn't valid SemVer. | Use SemVer (for example `0.0.0`). |
|
|
236
|
+
| 7003 | `invalidGroupId` | The `group-id` wasn't found. | Use a `group-id` for an organization you belong to (listed in the message). |
|
|
237
|
+
| 7004 | `invalidProjectName` | The project name has no alphanumeric character. | Include at least one alphanumeric character. |
|
|
238
|
+
| 7005 | `invalidAssetId` | The asset id has invalid characters. | Use only `A-Z`, `a-z`, `0-9`, `_`, `-`. |
|
|
239
|
+
| 7006 | `missingAssetIdWithInvalidProjectName` | The project name has no alphanumerics and no asset id was given. | Provide an explicit asset id. |
|
|
240
|
+
| 7007 | `brokerAlreadyExists` | A broker with this name already exists. | Choose a different broker name. |
|
|
241
|
+
| 7008 | `invalidBrokerTemplate` | The broker scaffold template is missing. | Reinstall the plugin; the installation may be corrupted. |
|
|
242
|
+
| 7009 | `unsupportedAgentNetworkVersion` | The command requires a V2 project. | Use a V2 Agent Network project. |
|
|
243
|
+
| 7010 | `invalidAgentNetworkYaml` | `agent-network.yaml` failed to parse. | Fix the YAML syntax error reported in the message. |
|
|
244
|
+
| 7011 | `invalidEmptyBrokerName` | The broker name has no alphanumeric character. | Include at least one alphanumeric character. |
|
|
245
|
+
| 7012 | `invalidBrokerName` | The broker id violates the naming pattern. | Start/end with a letter or digit; use only letters, digits, `_`, `.`, `-` in the middle. |
|
|
246
|
+
| 7013 | `invalidBrokersSection` | The `brokers` YAML section isn't a mapping. | Make `brokers:` a mapping of names to definitions. |
|
|
247
|
+
| 7014 | `brokerNameTooLong` | The broker id exceeds the deployment-name length limit. | Shorten the broker name. |
|
|
248
|
+
|
|
249
|
+
### Policy validation errors (8001–8004)
|
|
250
|
+
|
|
251
|
+
| Code | Name | What it means | How to fix |
|
|
252
|
+
| --- | --- | --- | --- |
|
|
253
|
+
| 8001 | `policyVersionError` | Looking up a policy version failed. | Verify the policy GAV; see [Exchange](#exchange). |
|
|
254
|
+
| 8002 | `policyValidationFailed` | One or more policy bindings failed validation. | Fix the validation errors listed in the nested `cause`. |
|
|
255
|
+
| 8003 | `schemaNotFoundForAsset` | A policy config schema file is missing. | Verify the policy asset includes its schema. |
|
|
256
|
+
| 8004 | `dependencyVersionNotFound` | A dependency version is absent from the descriptor. | Add the dependency version to `exchange.json`. |
|
|
257
|
+
|
|
258
|
+
### Local run errors (8500–8550)
|
|
259
|
+
|
|
260
|
+
These come from `agent-network project run-local` (local Docker Compose environment).
|
|
261
|
+
|
|
262
|
+
| Code | Name | What it means | How to fix |
|
|
263
|
+
| --- | --- | --- | --- |
|
|
264
|
+
| 8500 | `v1NotSupportedForLocalRun` | `run-local` was invoked on a V1 project. | Only V2 projects can run locally. |
|
|
265
|
+
| 8501 | `dockerNotInstalled` | Docker isn't installed. | Install [Docker Desktop](https://www.docker.com/products/docker-desktop/). |
|
|
266
|
+
| 8502 | `dockerDaemonNotRunning` | The Docker daemon isn't running. | Start Docker Desktop and retry. |
|
|
267
|
+
| 8503 | `dockerSignInRequired` | Docker requires sign-in. | Run `docker login` or sign in via Docker Desktop. |
|
|
268
|
+
| 8504 | `dockerImagePullFailed` | A required image failed to pull. | Ensure you're signed in and have network access. |
|
|
269
|
+
| 8505 | `exchangeJsonMissingMain` | `exchange.json` has no `main` field. | Set the `main` field to the network YAML file. |
|
|
270
|
+
| 8506 | `flexRegistrationFailed` | Flex Gateway registration generation failed. | Read the detail in the message; retry. |
|
|
271
|
+
| 8507 | `policyImplementationNotFound` | No Flex implementation exists for a policy. | Use a policy with a Flex Gateway implementation. |
|
|
272
|
+
| 8508 | `policyImplementationResolveFailed` | Resolving a policy's Flex implementation failed. | Read the detail; verify the policy GAV. |
|
|
273
|
+
| 8509 | `policyFetchFailed` | Fetching a policy asset failed. | Check network/Exchange access; retry. |
|
|
274
|
+
| 8510 | `policyAssetCorrupt` | A cached policy asset is missing `exchange.json`. | Clear the cache and re-fetch. |
|
|
275
|
+
| 8511 | `policyMainFileMissing` | A policy asset's declared main file is absent. | Verify the policy asset is complete. |
|
|
276
|
+
| 8512 | `policyDependencyMissing` | A policy dependency isn't cached. | Re-run to fetch dependencies. |
|
|
277
|
+
| 8513 | `noAvailablePort` | No free port in the scan range. | Free a port or pass `--port` explicitly. |
|
|
278
|
+
| 8514 | `invalidPort` | The `--port` value is invalid. | Use an integer between 1 and 65535. |
|
|
279
|
+
| 8515 | `agentGraphServiceNameCollision` | Two asset ids trim to the same Docker service name. | Rename one asset to avoid the DNS-label collision. |
|
|
280
|
+
| 8516 | `localSecretRetrievalFailed` | A stored secret couldn't be retrieved. | Re-run without a cached value to re-enter the secret. |
|
|
281
|
+
| 8517 | `unknownLlmPlatformForApiKey` | An LLM platform isn't recognized for API-key selection. | Use a supported platform (listed in the message). |
|
|
282
|
+
| 8518 | `undeclaredVariables` | A `${...}` placeholder is used but not declared. | Declare each variable under `metadata.variables` in `exchange.json`. |
|
|
283
|
+
| 8519 | `dockerAgentGraphImageMissing` | The Agent Graph image isn't published yet. | Local deploy isn't available yet; use `--build-only`, which doesn't need the image. |
|
|
284
|
+
| 8520 | `localEnvironmentNotRendered` | A local-deploy command ran before `run-local`. | Run `agent-network project run-local` first. |
|
|
285
|
+
| 8521 | `secretEnvVarNameCollision` | Two secret variables normalize to the same env var name. | Rename one to avoid the collision. |
|
|
286
|
+
| 8522 | `secretRouteSegment` | A secret variable is used in a route path segment. | Use a non-secret variable for the path. |
|
|
287
|
+
| 8523 | `secretUpstreamAddress` | A secret variable is used in an upstream URL. | Use a non-secret variable, or supply the credential via a policy. |
|
|
288
|
+
| 8524 | `flexCrdNameCollision` | Two Flex Gateway CRD (Custom Resource Definition) ids collapse to the same filename. | Rename one of the colliding ids. |
|
|
289
|
+
| 8535 | `localRunUnsupportedProjectType` | `run-local` was invoked on a project that is not an Agent Network (`exchange.json` classifier is present and is neither `agentic-network` nor `agent-network`). | Run local deploy from an Agent Network V2 project. A V1 project (`agent-network`) reports 8500 instead. |
|
|
290
|
+
| 8536 | `localTlsVariableCollision` | A declared variable has the exact name `tls.<connectionId>.<field>` that local run generates for a connection `tlsContext`. | Rename the declared variable; local run reserves the generated `tls.<connectionId>.<field>` names for egress TLS inputs. |
|
|
291
|
+
| 8537 | `localTlsUpstreamNotHttps` | A connection with a `tlsContext` has a non-`https://` upstream (checked before any TLS file is read). | Use an `https://` upstream, or remove the `tlsContext`. |
|
|
292
|
+
| 8538 | `localTlsFileUnreadable` | A TLS certificate, key or CA file couldn't be read. | Fix the `tls.<connectionId>.<field>` path (relative to the project directory; `~` is your home directory) or its permissions. |
|
|
293
|
+
| 8539 | `localTlsInvalidPem` | A TLS file isn't the expected PEM certificate or private key. | Provide PEM files; convert DER/PKCS#12 files with `openssl`. The certificate file must not embed a private key block. |
|
|
294
|
+
| 8540 | `localTlsTraditionalEncryptedKey` | The private key is a traditional encrypted PEM (`Proc-Type: 4,ENCRYPTED`). | Convert it with `openssl pkcs8 -topk8 -in <key> -out <new-key>` and use the new file. |
|
|
295
|
+
| 8541 | `localTlsKeyUnloadable` | The private key couldn't be loaded (corrupt key or wrong passphrase). | Check the key file and re-enter `tls.<connectionId>.keyPassphrase` (empty for an unencrypted key). |
|
|
296
|
+
| 8542 | `localTlsIncompleteCertificate` | Only one of `certificateFile` / `keyFile` is set. | Set both for a client certificate, or neither. |
|
|
297
|
+
| 8543 | `localTlsInvalidOption` | A TLS option (`skipValidation`, version, `ciphers`, `alpn`) has an unsupported value. | Use one of the allowed values listed in the message. |
|
|
298
|
+
| 8544 | `localTlsVersionRange` | The TLS `minVersion` is greater than `maxVersion`. | Lower `minVersion` or raise `maxVersion`. |
|
|
299
|
+
| 8545 | `localTlsSecureEnvMissing` | A resolved TLS key env var is empty at runtime start. | *Internal* — re-run local run so the TLS files are read again. |
|
|
300
|
+
| 8546 | `localTlsCertificateKeyMismatch` | No certificate in the TLS client certificate file matches the private key. | Provide the certificate that was issued for this key, or the matching key. |
|
|
301
|
+
| 8547 | `localTlsAddedWhileWatching` | A rebuild during `--watch` added a connection with a `tlsContext` that was never resolved in this session. | Restart `run-local` so the TLS inputs are prompted and resolved. |
|
|
302
|
+
| 8548 | `localTlsBindingMissing` | A connection with a `tlsContext` reached rendering without resolved TLS inputs. | *Internal* — restart `run-local`; report it if it persists. |
|
|
303
|
+
| 8549 | `localTlsNoCipherForMaxVersion` | `maxVersion` is `1.2` but every configured cipher is a TLS 1.3 suite, so no handshake could succeed. | Add a TLS 1.2 cipher to `tls.<connectionId>.ciphers` or set `maxVersion` to `1.3`. |
|
|
304
|
+
| 8550 | `localTlsLeafNotFirst` | The private key matches a certificate that is not the first one in the TLS client certificate file. | Reorder the file so the client (leaf) certificate comes first, followed by its chain. |
|
|
305
|
+
|
|
306
|
+
### Generic errors (9001)
|
|
307
|
+
|
|
308
|
+
| Code | Name | What it means | How to fix |
|
|
309
|
+
| --- | --- | --- | --- |
|
|
310
|
+
| 9001 | `genericError` | An uncategorized failure; the message carries the specific reason. | Read the `errorMessage` and nested `cause`; consult Part B for the underlying service. |
|
|
311
|
+
|
|
312
|
+
### Access management errors (10001)
|
|
313
|
+
|
|
314
|
+
| Code | Name | What it means | How to fix |
|
|
315
|
+
| --- | --- | --- | --- |
|
|
316
|
+
| 10001 | `credentialsValidationsError` | Credential validation failed. | Re-authenticate; verify your credentials. See [Access Management](#access-management). |
|
|
317
|
+
|
|
318
|
+
### Gateway flag and CLI-argument errors (11001–11005)
|
|
319
|
+
|
|
320
|
+
| Code | Name | What it means | How to fix |
|
|
321
|
+
| --- | --- | --- | --- |
|
|
322
|
+
| 11001 | `gatewayFlagsMutuallyExclusive` | `--gateway` was combined with `--ingress-gw`/`--egress-gw`. | Use `--gateway` alone, or `--ingress-gw [--egress-gw]`. |
|
|
323
|
+
| 11002 | `egressGwRequiresIngress` | `--egress-gw` was passed without `--ingress-gw`. | Pass both, or use `--gateway`. |
|
|
324
|
+
| 11003 | `gatewayFlagRequired` | No gateway flag was supplied. | Pass `--gateway` or `--ingress-gw [--egress-gw]`. |
|
|
325
|
+
| 11004 | `separateGatewayModeNotSupportedInSharedSpace` | Separate-gateway mode was used with a Shared Space. | Use `--gateway`, or pass a Private Space to `--target-space`. |
|
|
326
|
+
| 11005 | `singleGatewayTargetSpaceMismatch` | `--target-space` conflicts with the gateway's target space. | Omit `--target-space`, or make it match the gateway. |
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Part B — Dependent services: status codes and common issues
|
|
331
|
+
|
|
332
|
+
The CLI orchestrates several Anypoint Platform services. When one of them returns an HTTP error, it surfaces in the `cause.response.status` field described in [How to read a CLI error](#how-to-read-a-cli-error). This part explains the common failures per service.
|
|
333
|
+
|
|
334
|
+
### The retry and timeout engine
|
|
335
|
+
|
|
336
|
+
Before diagnosing a transient-looking failure, know that the CLI already retries automatically:
|
|
337
|
+
|
|
338
|
+
- **Retries:** every HTTP `429` and `5xx`, plus network errors (`ECONNRESET`, `ETIMEDOUT`, `ENETUNREACH`, `EAI_AGAIN`).
|
|
339
|
+
- **Attempts:** up to 2, with a 30-second backoff; the server's `Retry-After` header is honored (clamped to 30s).
|
|
340
|
+
- **Deletes:** a `404` on a retry is treated as success (the resource was already deleted).
|
|
341
|
+
- **Non-idempotent writes:** `POST`/`PUT`/`PATCH` are also retried on `5xx`/`429`; retrying these can occasionally create a duplicate resource on non-idempotent endpoints.
|
|
342
|
+
- **Timeouts:** each request defaults to 60s (`--request-timeout`); the whole command defaults to 15 minutes (`--process-timeout`).
|
|
343
|
+
|
|
344
|
+
If a command still fails after these retries, treat the failure as deterministic rather than transient, unless a table below says otherwise.
|
|
345
|
+
|
|
346
|
+
### Exchange
|
|
347
|
+
|
|
348
|
+
Backs `publish`, `unpublish`, and asset lookups during build/deploy.
|
|
349
|
+
|
|
350
|
+
| Operation | Status / symptom | Likely cause | Fix |
|
|
351
|
+
| --- | --- | --- | --- |
|
|
352
|
+
| Publish asset | `409` / asset already exists | An asset with this id exists with a different type or owner. | See codes 2005/2006; use a new id/version or reconcile ownership. |
|
|
353
|
+
| Unpublish / undeploy asset delete | **`403 Forbidden` (surfaces as code 2010)** | A known Exchange platform issue. | Retry later. If it persists, open a support case with your `requestId` — this is a known platform issue, not something you can resolve locally. |
|
|
354
|
+
| Delete asset version | `404` | The asset is already gone. | None — treated as success. |
|
|
355
|
+
| Fetch policy / asset | `5xx` / `429` | Transient platform load. | Automatically retried; if it persists, retry later. |
|
|
356
|
+
| Fetch policy Flex bundle | Missing zip classifier (`run-local` only) | Some policy versions (for example `user-context-propagation-policy-flex@1.0.0`) were published without a zip classifier. | This policy version is missing a required file in Exchange. Open a support case to request that MuleSoft republish it with a zip classifier. Production `deploy` is unaffected. |
|
|
357
|
+
|
|
358
|
+
### API Manager
|
|
359
|
+
|
|
360
|
+
Backs API-instance and connection creation/patching, policy application, and instance deletion during deploy/undeploy.
|
|
361
|
+
|
|
362
|
+
| Operation | Status / symptom | Likely cause | Fix |
|
|
363
|
+
| --- | --- | --- | --- |
|
|
364
|
+
| Create API instance / connection | **`409 Conflict` (code 3001)** | A stale/orphaned instance from a prior partial deploy, or a name collision. | Check API Manager for an existing instance with that name; delete or reuse it, then redeploy. |
|
|
365
|
+
| Patch API instance | non-2xx (code 3010) | The target instance changed or was removed. | Read the `cause`; verify the instance still exists. |
|
|
366
|
+
| Apply policies | failure (code 3047) | Policy GAV resolution or organization entitlement problem. | Verify the policy GAV and that your organization is entitled to the policy. |
|
|
367
|
+
| Fetch policy metadata | empty/invalid (code 3031) | Transient, or a bad policy GAV. | Retry; if it persists, verify the policy GAV. |
|
|
368
|
+
| Delete instance (undeploy) | `404` | The instance was already removed. | None — treated as success. |
|
|
369
|
+
|
|
370
|
+
### Runtime Fabric / Application Manager (AMC)
|
|
371
|
+
|
|
372
|
+
Backs Mule application and Agent Graph deployment and undeployment.
|
|
373
|
+
|
|
374
|
+
| Operation | Status / symptom | Likely cause | Fix |
|
|
375
|
+
| --- | --- | --- | --- |
|
|
376
|
+
| Poll deployment status | "Deployment status request returned status N" | A non-retryable HTTP error, or retries exhausted. | Read the status; check the deployment in Runtime Manager. |
|
|
377
|
+
| Deploy request | request timeout (code 3017) | The request exceeded `--request-timeout`. | Retry; raise `--request-timeout`. |
|
|
378
|
+
| Whole command | command timeout (code 3018) | The organization may be resource-constrained, or the deploy is genuinely slow. | Review organization resource allocation; raise `--process-timeout`. Check `steps` for progress. |
|
|
379
|
+
| Deploy (broker group / Agent Graph) | failure (codes 3008 / 3028) | Underlying AMC error. | Read the logs and nested `cause`. |
|
|
380
|
+
| Undeploy by name | `404` | Already removed. | None — treated as success. |
|
|
381
|
+
|
|
382
|
+
### Gateway Manager
|
|
383
|
+
|
|
384
|
+
Backs `agent-network setup gateways` (ingress/egress Flex Gateway provisioning).
|
|
385
|
+
|
|
386
|
+
| Operation | Status / symptom | Likely cause | Fix |
|
|
387
|
+
| --- | --- | --- | --- |
|
|
388
|
+
| Create gateway | name collision (code 4013) | Gateway names must be unique per environment. | Choose a different name. |
|
|
389
|
+
| Create gateway | insufficient resources (code 4014) | The organization's gateway quota is exhausted. | Delete an unused gateway or raise organization limits. |
|
|
390
|
+
| Resolve domains | no domains (codes 4001 / 4015) | No private network in the target space. | Create a private network for the target space first. |
|
|
391
|
+
| Setup ingress/egress | non-success status (codes 4003 / 4005) | Downstream gateway/API Manager error. | Read the `status` and response in the message; retry. |
|
|
392
|
+
| List gateways / versions / metadata | non-2xx (codes 4008–4010) | Transient or access issue. | Retry; verify organization/environment access. |
|
|
393
|
+
|
|
394
|
+
### Access Management
|
|
395
|
+
|
|
396
|
+
Backs organization, entitlement, and credential validation at build/publish/deploy time.
|
|
397
|
+
|
|
398
|
+
| Operation | Status / symptom | Likely cause | Fix |
|
|
399
|
+
| --- | --- | --- | --- |
|
|
400
|
+
| Retrieve entitlements | non-2xx (code 5001) | Transient, or the organization lacks the entitlement. | Retry; verify the organization is entitled to Agent Fabric. |
|
|
401
|
+
| Credential validation | failure (code 10001) | Expired or invalid credentials. | Re-authenticate. |
|
|
402
|
+
|
|
403
|
+
### Known platform issues vs. plugin issues
|
|
404
|
+
|
|
405
|
+
| Item | Status / code | Classification |
|
|
406
|
+
| --- | --- | --- |
|
|
407
|
+
| Exchange unpublish/undeploy `403` | 403 → code 2010 | **Known Exchange platform issue** — retry later; open a support case with your `requestId` if it persists. |
|
|
408
|
+
| `user-context-propagation-policy-flex@1.0.0` missing zip classifier | `run-local` fetch failure | **Missing file in Exchange** — open a support case to request republish; production `deploy` unaffected. |
|
|
409
|
+
| Agent Graph Docker image not published | code 8519 | **External blocker** — use `--build-only` until the image is published. |
|
|
410
|
+
| `409` on API instance/connection create | 409 → code 3001 | **Environment state** — usually an orphaned instance; check API Manager and delete/reuse. |
|
|
411
|
+
| API Manager / AMC `5xx` / `429` / timeouts | 429, 5xx | **Transient platform load** — already retried by the CLI. |
|
|
412
|
+
| Gateway setup non-2xx relays | codes 4003–4010 | **Downstream relay** — the CLI passes through the status returned by the gateway or API Manager service. |
|
|
@@ -12,6 +12,7 @@ export default class Create extends AuthenticationBaseCommand {
|
|
|
12
12
|
'tab-size': import("@oclif/core/lib/interfaces").OptionFlag<number>;
|
|
13
13
|
'create-dir': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
14
|
'empty-project': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
'llm-auth': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
'agent-network-version': import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
16
17
|
"skip-environment": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
collectMetrics: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -27,8 +28,9 @@ export default class Create extends AuthenticationBaseCommand {
|
|
|
27
28
|
static mainFile: string;
|
|
28
29
|
run(): Promise<void>;
|
|
29
30
|
static resolveAssetVersion(isV2: boolean, assetVersionSetByUser: boolean, assetVersion: string): string;
|
|
30
|
-
|
|
31
|
-
static
|
|
31
|
+
resolveOpenaiVersion(mulesoftOrg: string): Promise<string | undefined>;
|
|
32
|
+
static finalizeExchangeDescriptor(exchangeTemplate: string, emptyProject: boolean, localOpenai?: boolean): string;
|
|
33
|
+
static parseAgentNetworkYamlTemplate(templatesRoot: string, projectName: string, mulesoftOrg?: string, localOpenai?: boolean): unknown;
|
|
32
34
|
static buildEmptyAgentNetworkYaml(isV2: boolean, projectName: string): unknown;
|
|
33
35
|
static writeAgentNetworkYaml(options: {
|
|
34
36
|
isV2: boolean;
|
|
@@ -37,6 +39,8 @@ export default class Create extends AuthenticationBaseCommand {
|
|
|
37
39
|
projectDirectory: string;
|
|
38
40
|
tabSize: number;
|
|
39
41
|
emptyProject: boolean;
|
|
42
|
+
mulesoftOrg?: string;
|
|
43
|
+
localOpenai?: boolean;
|
|
40
44
|
}): void;
|
|
41
45
|
validateFlags(validSemver: string | null, assetVersion: string, groupId: string): void;
|
|
42
46
|
checkAndCreateProjectDirectory(projectDirectory: string, outputDir: string, normalizedName: string): Promise<void>;
|
|
@@ -13,6 +13,7 @@ const fs = tslib_1.__importStar(require("fs-extra"));
|
|
|
13
13
|
const node_path_1 = require("node:path");
|
|
14
14
|
const naming_1 = require("../../../utils/naming");
|
|
15
15
|
const utils_1 = require("../../../helpers/utils");
|
|
16
|
+
const exchange_1 = require("../../../utils/exchange");
|
|
16
17
|
const yaml_1 = tslib_1.__importDefault(require("yaml"));
|
|
17
18
|
const constants_1 = require("../../../utils/constants");
|
|
18
19
|
const error_factory_1 = require("../../../errors/error-factory");
|
|
@@ -62,6 +63,7 @@ class Create extends anypoint_cli_command_lib_1.AuthenticationBaseCommand {
|
|
|
62
63
|
const assetVersionSetByUser = !((_c = metadata.flags['asset-version']) === null || _c === void 0 ? void 0 : _c.setFromDefault);
|
|
63
64
|
const effectiveAssetVersion = Create.resolveAssetVersion(isV2, assetVersionSetByUser, assetVersion);
|
|
64
65
|
const emptyProject = flags['empty-project'];
|
|
66
|
+
const llmAuth = flags['llm-auth'];
|
|
65
67
|
// Load and process the exchange.json template
|
|
66
68
|
const exchangeTemplatePath = (0, node_path_1.join)(templatesRoot, 'exchange.json.template');
|
|
67
69
|
let exchangeTemplate = fs.readFileSync(exchangeTemplatePath, constants_1.UTF8);
|
|
@@ -73,8 +75,15 @@ class Create extends anypoint_cli_command_lib_1.AuthenticationBaseCommand {
|
|
|
73
75
|
.replace(/{{assetId}}/g, assetId)
|
|
74
76
|
.replace(/{{assetVersion}}/g, effectiveAssetVersion)
|
|
75
77
|
.replace(/{{apiVersion}}/g, apiVersion);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
const mulesoftOrg = (0, utils_1.getMulesoftOrg)(flags.host);
|
|
79
|
+
// A failed Exchange lookup also falls back to a local registry LLM. See ADR 0005.
|
|
80
|
+
const openaiVersion = isV2 && !emptyProject && llmAuth ? await this.resolveOpenaiVersion(mulesoftOrg) : constants_1.OPENAI_FALLBACK_VERSION;
|
|
81
|
+
const localOpenai = isV2 && !emptyProject && (!llmAuth || openaiVersion === undefined);
|
|
82
|
+
exchangeTemplate = exchangeTemplate
|
|
83
|
+
.replace(/{{mulesoftOrg}}/g, mulesoftOrg)
|
|
84
|
+
.replace(/{{openaiVersion}}/g, openaiVersion !== null && openaiVersion !== void 0 ? openaiVersion : constants_1.OPENAI_FALLBACK_VERSION);
|
|
85
|
+
fs.writeFileSync((0, node_path_1.join)(projectDirectory, constants_1.DESCRIPTOR_FILE), Create.finalizeExchangeDescriptor(exchangeTemplate, emptyProject, localOpenai), constants_1.UTF8);
|
|
86
|
+
Create.writeAgentNetworkYaml({ isV2, projectName, templatesRoot, projectDirectory, tabSize, emptyProject, mulesoftOrg, localOpenai });
|
|
78
87
|
logger_1.Log.info(`Agent network project '${projectName}' was created in '${projectDirectory}'`);
|
|
79
88
|
}
|
|
80
89
|
// v1 projects default to AGENT_NETWORK_V1_DEFAULT_VERSION (a hardcoded valid semver, so no
|
|
@@ -82,24 +91,44 @@ class Create extends anypoint_cli_command_lib_1.AuthenticationBaseCommand {
|
|
|
82
91
|
static resolveAssetVersion(isV2, assetVersionSetByUser, assetVersion) {
|
|
83
92
|
return !isV2 && !assetVersionSetByUser ? constants_1.AGENT_NETWORK_V1_DEFAULT_VERSION : assetVersion;
|
|
84
93
|
}
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
// Returns undefined when no version can be resolved (404 or lookup failure), so the caller scaffolds a local registry LLM instead.
|
|
95
|
+
async resolveOpenaiVersion(mulesoftOrg) {
|
|
96
|
+
try {
|
|
97
|
+
const version = await (0, exchange_1.getLatestAssetVersion)(this.req, mulesoftOrg, constants_1.OPENAI_ASSET_ID);
|
|
98
|
+
if (!version) {
|
|
99
|
+
logger_1.Log.warn(`Asset '${mulesoftOrg}/${constants_1.OPENAI_ASSET_ID}' was not found in Exchange; declaring the OpenAI LLM locally in the registry`);
|
|
100
|
+
}
|
|
101
|
+
return version;
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
logger_1.Log.warn(`Exchange lookup for '${mulesoftOrg}/${constants_1.OPENAI_ASSET_ID}' failed (${error instanceof Error ? error.message : String(error)}); declaring the OpenAI LLM locally in the registry`);
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Drop template variables and the openai dependency that would dangle without the example topology.
|
|
109
|
+
static finalizeExchangeDescriptor(exchangeTemplate, emptyProject, localOpenai = false) {
|
|
110
|
+
if (!emptyProject && !localOpenai) {
|
|
90
111
|
return exchangeTemplate;
|
|
91
112
|
}
|
|
92
113
|
const descriptor = JSON.parse(exchangeTemplate);
|
|
93
|
-
if (descriptor.metadata) {
|
|
114
|
+
if (emptyProject && descriptor.metadata) {
|
|
94
115
|
descriptor.metadata.variables = {};
|
|
95
116
|
}
|
|
117
|
+
descriptor.dependencies = emptyProject ? [] : descriptor.dependencies.filter((d) => d.assetId !== constants_1.OPENAI_ASSET_ID);
|
|
96
118
|
return `${JSON.stringify(descriptor, null, 2)}\n`;
|
|
97
119
|
}
|
|
98
|
-
static parseAgentNetworkYamlTemplate(templatesRoot, projectName) {
|
|
120
|
+
static parseAgentNetworkYamlTemplate(templatesRoot, projectName, mulesoftOrg = '', localOpenai = false) {
|
|
121
|
+
var _a, _b, _c, _d;
|
|
99
122
|
const agentNetworkYamlTemplatePath = (0, node_path_1.join)(templatesRoot, 'agent-network.yaml.template');
|
|
100
123
|
const agentNetworkYamlTemplate = fs.readFileSync(agentNetworkYamlTemplatePath, constants_1.UTF8)
|
|
101
|
-
.replace(/{{projectName}}/g, JSON.stringify(projectName))
|
|
102
|
-
|
|
124
|
+
.replace(/{{projectName}}/g, JSON.stringify(projectName)) // NOSONAR S4784: literal placeholder, not derived from user input
|
|
125
|
+
.replace(/{{mulesoftOrg}}/g, mulesoftOrg);
|
|
126
|
+
const parsed = yaml_1.default.parse(agentNetworkYamlTemplate);
|
|
127
|
+
if (localOpenai) {
|
|
128
|
+
(_d = (_c = (_b = (_a = parsed.context) === null || _a === void 0 ? void 0 : _a.connections) === null || _b === void 0 ? void 0 : _b.openaiConnection) === null || _c === void 0 ? void 0 : _c.ref) === null || _d === void 0 ? true : delete _d.namespace;
|
|
129
|
+
parsed.registry.llms = { openai: { info: { label: 'OpenAI', description: 'OpenAI LLM Provider' }, metadata: { platform: 'OpenAI' } } };
|
|
130
|
+
}
|
|
131
|
+
return parsed;
|
|
103
132
|
}
|
|
104
133
|
static buildEmptyAgentNetworkYaml(isV2, projectName) {
|
|
105
134
|
return isV2 ?
|
|
@@ -113,10 +142,10 @@ class Create extends anypoint_cli_command_lib_1.AuthenticationBaseCommand {
|
|
|
113
142
|
// Only v2 projects use an external broker implementation file; v1 declares the broker inline.
|
|
114
143
|
// Empty projects skip the brokers directory entirely, since it's example content.
|
|
115
144
|
static writeAgentNetworkYaml(options) {
|
|
116
|
-
const { isV2, projectName, templatesRoot, projectDirectory, tabSize, emptyProject } = options;
|
|
145
|
+
const { isV2, projectName, templatesRoot, projectDirectory, tabSize, emptyProject, mulesoftOrg, localOpenai } = options;
|
|
117
146
|
const parsedYaml = emptyProject ?
|
|
118
147
|
Create.buildEmptyAgentNetworkYaml(isV2, projectName) :
|
|
119
|
-
Create.parseAgentNetworkYamlTemplate(templatesRoot, projectName);
|
|
148
|
+
Create.parseAgentNetworkYamlTemplate(templatesRoot, projectName, mulesoftOrg, localOpenai);
|
|
120
149
|
fs.writeFileSync((0, node_path_1.join)(projectDirectory, Create.mainFile), yaml_1.default.stringify(parsedYaml, { indent: tabSize, lineWidth: 200 }), 'utf8');
|
|
121
150
|
if (isV2 && !emptyProject) {
|
|
122
151
|
const brokersDir = (0, node_path_1.join)(projectDirectory, constants_1.BROKERS_DIR);
|
|
@@ -164,6 +193,8 @@ Create.flags = {
|
|
|
164
193
|
'tab-size': core_1.Flags.integer({ description: 'Tab size to ident Api Specification', required: false, default: 2 }),
|
|
165
194
|
'create-dir': core_1.Flags.boolean({ description: 'Create new directory at output-dir for the new project using project\'s name', default: true, allowNo: true }),
|
|
166
195
|
'empty-project': core_1.Flags.boolean({ description: 'Scaffold a minimal project with no example content: only exchange.json and a bare agent-network.yaml, with no brokers directory', default: false }),
|
|
196
|
+
// Temporary: without this flag, create keeps the local registry.llms.openai scaffold. See ADR 0005.
|
|
197
|
+
'llm-auth': core_1.Flags.boolean({ description: 'Scaffold OpenAI via Exchange llm-metadata dependency (temporary release flag)', default: false, hidden: true }),
|
|
167
198
|
// A default must be set so oclif records setFromDefault metadata (used below to detect an
|
|
168
199
|
// explicit flag); the default value itself is never read — host detection drives the unset case.
|
|
169
200
|
'agent-network-version': core_1.Flags.string({ description: 'Override the agent network version to scaffold', options: [constants_1.AGENT_NETWORK_VERSION_V1, constants_1.AGENT_NETWORK_VERSION_V2], default: constants_1.AGENT_NETWORK_VERSION_V2, hidden: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/agent-network/project/create.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,sCAAiC;AACjC,uEAAkE;AAClE,kDAAyC;AACzC,qDAA8B;AAC9B,yCAAmD;AACnD,kDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/agent-network/project/create.ts"],"names":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