mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
docs: 刷新内置文档镜像,与站点文档对齐
This commit is contained in:
parent
80815612ce
commit
17e220534c
@ -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).
|
||||
|
||||
@ -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)。
|
||||
|
||||
Loading…
Reference in New Issue
Block a user