davsclaus opened a new pull request, #29413: URL: https://github.com/apache/camel/pull/29413
[CAMEL-26731](https://issues.apache.org/jira/browse/CAMEL-26731) Two chaos operations of the CLI connector had no tool for an AI agent: loading a scenario (`camel cmd chaos-load`) and what to try (`camel cmd chaos-suggest`). Both are now in the shared `ToolRegistry`, which `camel ask` uses, and on the camel-jbang MCP server in the chaos tool group, with chaos on. | Tool | `readOnlyHint` | `destructiveHint` | What it does | |---|---|---|---| | `camel_runtime_chaos_suggest` (`chaos_suggest`) | `true` | `false` | The rules suggested per route from what the routes do, most worth trying first. Each has the route, the kind of fault, the rule, why to try it, and `tried=true` when a rule of that kind has already faulted the route. Nothing is added: the description points to check, then add. | | `camel_runtime_chaos_load` (`chaos_load`) | `false` | `true` | Loads a scenario, given as the text of a `.chaos` file, with an optional `scenarioName`. The current rules are replaced, all or none, and the report starts again. Returns the ids, each rule in plain words, and warnings. | **Safety** - `camel ask` asks before a load. `ToolConfirms.chaosLoad` shows the scenario as it is: the rules, the comments and `seed=`. - With the MCP security layer, `read-only` offers suggest, and only `admin` offers load, as for add and change. - Over the HTTP server of `camel run --mcp`, chaos still only lists and reports. Suggest is read-only, but it is an action of the CLI connector, not of the chaos console. So the HTTP filter now names the two tools it lets through (list and report), instead of "the read-only ones except check". **Docs:** the MCP page's chaos table, the chaos page's MCP section and the design doc's table of marks. **Tests** - New: `RuntimeToolsChaosTest.whatToTryAndAScenarioAgainstARunningIntegration`, against a real CamelContext with camel-chaos and the CLI connector: - a seda hand-off gets the "route after a hand-off fails" suggestion, and every suggestion passes the check tool; - a scenario replaces a rule that was added and turns the fault on; - a scenario with a line that is not valid changes nothing. - New: `ToolConfirmsTest.loadingAChaosScenarioIsAskedWithItsRules`. - Updated: the marks, groups and HTTP-filter assertions in `AskToolsTest`, `ToolGroupsTest`, `ToolRegistryTest`, `JbangDevMcpServerTest`, `RuntimeToolsTest` and `RuntimeToolsChaosSecurityTest`. - Local runs, all passing: - camel-jbang-core tool tests: 70 + 18; - camel-jbang-mcp `RuntimeTools*Test`: 43; - TUI tool and chaos tests: 41. _Claude Code on behalf of Claus Ibsen_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
