davsclaus opened a new pull request, #27833: URL: https://github.com/apache/camel/pull/27833
[CAMEL-25652](https://issues.apache.org/jira/browse/CAMEL-25652) The component metadata has one dimension for where a component reaches: `remote`. A component that is not remote can still run code (exec, bean, language) or read a file or a URL (the template and stylesheet components), so tooling cannot use `remote = false` to tell what stays inside the integration. This adds a second, positive flag. ## What - `@UriEndpoint(internal = true)`: the component stays inside the CamelContext. It only reaches the routes, the in-memory state (a queue, a cache, metrics) and the log. It never reads or writes a file, uses the network, runs a process, or runs code or loads a resource named in its URI. - The flag is about what the component *can* do, not what it is usually used for. A capability counts even behind an option that is off by default and seldom used, or in a feature that ships with the component. - `internal = true` implies `remote = false`; the build fails when a component sets one without the other. - The catalog JSON gets `"internal": true` and `ComponentModel` gets `isInternal()`. The key is written only on internal components, so the other ~400 component JSON files do not change. A missing key reads as not internal, which is the safe answer for older catalogs and third-party components. ## Which components Marked internal (13): direct, seda, stub, disruptor, disruptor-vm, log, mock, browse, caffeine-cache, caffeine-loadcache, metrics, event, timer. Not remote, but left out after a look at their code: | Component | Why it is not internal | |---|---| | dataset-test | polls the endpoint named in its URI (`dataset-test:file:/dir` moves the files it reads) | | dataset | ships `FileDataSet`, which reads a file | | once | can read its body and headers from `file:` or `classpath:` | | micrometer, opentelemetry-metrics | evaluate their options with simple, which loads `resource:file:` and `resource:http:` text | | scheduler, cron, quartz | can hand scheduling to Quartz, which can keep its jobs in a database | | spring-event, reactive-streams | reach the application beyond the CamelContext | | ref, kamelet, dynamic-router | pass the message on to any endpoint | | controlbus | drives the routes, and evaluates an expression in any language | | jmx | connects to an MBean server, which can be a remote one | | exec, bean, class, language, wasm, the template, stylesheet and schema components | run code, or load a resource by URI | ## First user The AI tools of Camel TUI send a message without asking when it stays inside the integration, and ask first otherwise. `ToolConfirms` now reads the flag from the TUI's own catalog instead of a list of its own. The catalog is the same version as the TUI, so it always has the flag. A component the catalog does not know (a custom one, or one newer than the TUI) asks. dataset-test, which the old list had, now asks. ## Tests - `JsonMapperTest`: the key is written only when set, and read back. - `EndpointSchemaGeneratorMojoTest`: `internal = true` without `remote = false` fails the build. - `CamelCatalogTest`: direct, log and disruptor-vm are internal; kafka is not; exec and dataset-test are neither remote nor internal. - `ToolConfirmsTest`: sends to dataset-test, micrometer and an unknown component ask; caffeine-cache goes ahead. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS -- 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]
