feat(plugin): scaffold RPCP plugin loading core

- Add JarFile-based plugin.json manifest reading and validation
- Implement reflection-based plugin class instantiation (Data or no-arg constructor)
- Wrap Tool objects into OllamaFunctionTool with basic parameter/response handling
- Implement ToolArguments storage and ToolResponse record
- Extract RPCP_SOURCE constant; add plugin name validation
- Update Data interface: getLoadedPlugins() returns LoadedPlugin[]
- Fix launcher package references (me.zacharias.chat → me.neurodock)

TODO: Extract FileSystem from JAR, populate PluginMetadata, complete
OllamaFunctionArgument↔ToolArguments wrapping, invoke plugin lifecycle hooks

Signed-off-by: zacharias <alienfromdia@proton.me>
This commit is contained in:
2026-06-15 22:09:55 +02:00
parent d016ad9a48
commit b74c5e9e97
12 changed files with 244 additions and 51 deletions
@@ -1,12 +1,14 @@
package me.neurodock.plugin.tool;
public class ToolResponse {
public record ToolResponse(String name, String response) {
public static ToolResponse empty(Tool tool) {
return new ToolResponse();
return new ToolResponse(tool.name(), "");
}
public static ToolResponse empty(String toolName)
{
return new ToolResponse();
return new ToolResponse(toolName, "");
}
}