From 17e220534c1fd97be753169b085c8adedc220add Mon Sep 17 00:00:00 2001 From: matevip Date: Fri, 3 Jul 2026 18:50:17 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=88=B7=E6=96=B0=E5=86=85=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E9=95=9C=E5=83=8F,=E4=B8=8E=E7=AB=99?= =?UTF-8?q?=E7=82=B9=E6=96=87=E6=A1=A3=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/docs/en/architecture.md | 21 ------------------- .../main/resources/docs/zh/architecture.md | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/mateclaw-server/src/main/resources/docs/en/architecture.md b/mateclaw-server/src/main/resources/docs/en/architecture.md index 4bb206d9..319f94ec 100644 --- a/mateclaw-server/src/main/resources/docs/en/architecture.md +++ b/mateclaw-server/src/main/resources/docs/en/architecture.md @@ -248,27 +248,6 @@ Implement `vip.mate.memory.spi.MemoryProvider` to plug in a custom memory backen Connect external tool servers over stdio, streamable_http, or sse. Their tools appear in the tool registry automatically — Agent code doesn't know they're external. See [MCP](./mcp). -### Standalone-jar plugins (`mateclaw-plugin-api`) - -All of the above require your code to be compiled into `mateclaw-server` itself. If you want to extend capabilities by dropping in an independent jar — no core source changes — use the `mateclaw-plugin-api` SDK: implement `MateClawPlugin`, declare `type` and a `config` schema in `mateclaw-plugin.json`, package it, and drop it into a workspace `plugins/` directory or the user-level `~/.mateclaw/plugins/`. `PluginManager` loads it at startup in an isolated `URLClassLoader` and supports runtime enable/disable. Five `PluginType`s are currently supported: `TOOL`, `PROVIDER` (LLM), `CHANNEL`, `MEMORY`, and `SEARCH` (a search source for the `web_search` tool, `1.7.0+`). - -```java -public class MySearchPlugin implements MateClawPlugin { - @Override - public void onLoad(PluginContext context) { - context.registerSearchProvider(new MySearchProvider(context)); - } - @Override public void onEnable() {} - @Override public void onDisable() {} -} - -class MySearchProvider implements PluginSearchProvider { - // id() / label() / isAvailable() / search(PluginSearchQuery) — see the mateclaw-plugin-search-sample module -} -``` - -Reference implementations: `mateclaw-plugin-sample` (TOOL) and `mateclaw-plugin-search-sample` (SEARCH). - ### Skill packages Bundle instructions + tools + optional scripts in a `SKILL.md`. Upload via the UI or API. Agents can invoke them at runtime. See [Skills](./skills). diff --git a/mateclaw-server/src/main/resources/docs/zh/architecture.md b/mateclaw-server/src/main/resources/docs/zh/architecture.md index 80688f76..977f4fd8 100644 --- a/mateclaw-server/src/main/resources/docs/zh/architecture.md +++ b/mateclaw-server/src/main/resources/docs/zh/architecture.md @@ -248,27 +248,6 @@ public interface ChannelAdapter { 通过 stdio、streamable_http、sse 连接外部工具服务。它们的工具自动出现在工具注册表里——Agent 代码**不知道它们是外部的**。见 [MCP 协议](./mcp)。 -### 独立 jar 插件(`mateclaw-plugin-api`) - -以上都要求代码编译进 `mateclaw-server` 本体。如果你想**不碰核心源码**、丢一个独立 jar 就扩展能力,用 `mateclaw-plugin-api` SDK:实现 `MateClawPlugin`,在 `mateclaw-plugin.json` 里声明 `type` 与 `config` schema,打包后放进工作区 `plugins/` 或用户级 `~/.mateclaw/plugins/`,`PluginManager` 用隔离的 `URLClassLoader` 在启动时加载,支持运行时 enable/disable。当前支持 5 种 `PluginType`:`TOOL`、`PROVIDER`(LLM)、`CHANNEL`、`MEMORY`、`SEARCH`(`web_search` 工具的搜索源,`1.7.0+`)。 - -```java -public class MySearchPlugin implements MateClawPlugin { - @Override - public void onLoad(PluginContext context) { - context.registerSearchProvider(new MySearchProvider(context)); - } - @Override public void onEnable() {} - @Override public void onDisable() {} -} - -class MySearchProvider implements PluginSearchProvider { - // id() / label() / isAvailable() / search(PluginSearchQuery) — 详见 mateclaw-plugin-search-sample 模块 -} -``` - -参考实现见 `mateclaw-plugin-sample`(TOOL)与 `mateclaw-plugin-search-sample`(SEARCH)。 - ### 技能包 把指令 + 工具 + 可选脚本打包进一个 `SKILL.md`。通过 UI 或 API 上传。Agent 在运行时可以调用它们。见 [技能系统](./skills)。