davsclaus opened a new pull request, #27647:
URL: https://github.com/apache/camel/pull/27647

   [CAMEL-25513](https://issues.apache.org/jira/browse/CAMEL-25513)
   
   `camel_write_file` and `camel_edit_file` report what a dev-mode integration 
did with the written file (CAMEL-24859) only when the tool knows the 
integration, a selected process. Through camel-jbang-mcp an agent passes the 
project directory and no name, so no write reported a reload: in a run of the 
local-model benchmark ladder none of the 68 step traces got one, and the answer 
only said "An integration running the file in dev mode reloads it now". The 
agent wrote blind: in the transform-xslt example its stylesheet produced 
`<packingSlip orderId="" country=""/>`, it read the log before the reload had 
run, and declared the step done.
   
   **Changes**
   - With no integration selected, the write tools find the one running in dev 
mode from the directory (`IntegrationLauncher.devModeFrom`: the working 
directory, as `camel_run` finds an app already running, and started with 
`--dev`) and await its reload.
   - After a reload, the answer carries what the routes logged within 3 s 
(`reload.output`, at most 5 lines: the log steps, by their source-location or 
route-id logger, and any WARN or ERROR), and the message quotes the first: 
*"The running integration reloaded the file. After the reload it logged: …"*.
   
   Checked end to end with the built MCP server: `camel_run` on a directory, 
then `camel_edit_file` with only `directory` answered in 2.1 s with 
`"reload":{"status":"reloaded",…,"output":["Tock  at 07:46:23"]}` - the empty 
counter visible at once.
   
   Tests: `ReloadOutcomeTest` (the output after the newest reload; Camel's own 
loggers left out); camel-jbang-core (1628) and camel-jbang-mcp (435) suites 
green.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m


-- 
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]

Reply via email to