mirror of
https://gitcode.com/JianFeeeee/homeagent-sdk.git
synced 2026-09-25 03:18:06 +00:00
为插件作者建一个文档站,重点是**能按描述搜到 API**,以及**明确能力边界**。
## 为什么 API 参考要生成而不是手写
公开 API 面有 115 个符号、11 个接口。手抄必然与代码漂移——这是文档站最常见的
死法(本仓 README 里已经有过几处「文档说一套、代码是另一套」)。
所以 `tools/apidoc` 直接从 `sdk/*.go` 提取签名、文档注释与代码块示例,渲染成
`docs/api/*.md`。发现文档不对时改的是**源码注释**,不是生成物。生成页首行带
「勿手改」标记,防止有人改了下次构建白改。
- `extract.go`:go/ast + go/doc 提取(只用标准库,离线可跑,不引入依赖)
- `gensite/`:渲染 Markdown + 检索索引
- `gensite/usages.go`:从 `example/` 21 个示例插件里反查**真实调用点**,
贴在每个 API 下(源码注释里几乎没有可运行示例,但示例插件都是能编译跑的真代码)
## 能力边界:写这个站时查出的三处文档错误
这是本次最有价值的部分。原以为「公开 SDK 里有的 API 外部插件都能用」,
实测对照桥接模板后发现三处不符,站内已更正:
1. **`PluginMgr()` 被写成「仅内置可用」——错的。** 桥接模板第 692 行显式
`base.SetPluginMgrAPI(procPluginMgr{})`,公开 `PluginMgrAPI` 注释也写「外部插件可调用」。
真正的区别是**方法数**:公开面 3 个(ReloadOne/ListLoadedPlugins/IsPluginDisabled),
内部面 9 个。容易混淆是因为两个包里有同名但不同的接口。
2. **`Events()` 外部插件恒为 nil。** `SetEventSubscriber` 全仓只有定义、无调用点,
故 subscriber 从未被注入。外部插件的事件订阅实际由生成的运行时走
`events.subscribe` RPC 完成——旧文档把它当成可用入口,会让人写出必然失效的代码。
3. **`UnregisterOutputChannel` 是静默无效,不是报错。** 桥接只注入 registrar、
不注入 unregistrar,于是 `regOutputUnreg == nil`,函数命中 else 分支**直接返回 nil**
(sdk/plugin.go:539-549)——不报错、通道也没注销。
每条裁定的依据写进 `tools/apidoc/tiers.json`(文件:行号 或 grep 结论),
站上以告警框呈现,读者可自行核对。判断依据三源:桥接模板的 `base.Set*` 注入点、
`internal/sdk` 完整面、`internal/plugin/proc/protocol.go` 的 RPC 表。
## 检索(用户的核心诉求)
两套互补:
- **MkDocs 内置搜索**:全文,中文走 jieba 分词。
- **自建 API 检索**(`docs/javascripts/api-search.js` + `assets/api-index.json`):
支持四类查询——按名称、**按功能描述**(「注册工具」→ RegisterTool、
「崩溃」→ SetAutoRestart)、按 `限定符.方法`(`memory.recall` → MemoryAPI.Recall)、
按签名片段(`(string) error`)。并标出「仅内置」,避免外部插件作者踩空。
自建的理由:Material 内置搜索按整页文本索引,搜 `InjectText` 会列出所有提到它的
页面,但分不清哪条是它的定义;而且它要等 mkdocs build 才更新。
## 文档结构
- `docs/guide/`:快速开始、Go/Lua 首个插件、能力边界、打包发布、多平台、受限 SDK 与安全
- `docs/api/`:10 个按「你想做什么」划分的章节(工具/阶段/记忆/通道/配置/生命周期/
事件/LLM/常量/桥接)+ 仅内置汇总页
- `docs/versions.md`:SDK 版本语义(跟随内核中版本、patch 恒为 .0)、
1.0.0 是唯一破坏性变更、RPC 协议版本
## 验证
- `mkdocs build --strict` 零告警
- 23 个页面的全部站内链接与锚点可达(自动校验)
- 1440 / 768 / 390px 三视口:无横向溢出、无控制台错误
- 四种检索模式实测有结果且跳转锚点正确
- 构建产物 `site_build/` 已 gitignore
用法:`tools/apidoc/build.sh`(生成+构建)、`tools/apidoc/build.sh serve`(预览)。
2203 lines
53 KiB
JSON
2203 lines
53 KiB
JSON
[
|
||
{
|
||
"n": "APIRegistrar",
|
||
"s": "type APIRegistrar func(name string) error",
|
||
"d": "APIRegistrar registers a plugin API for external access.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 311
|
||
},
|
||
{
|
||
"n": "Add",
|
||
"s": "Add(name, content string) error",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "KnowledgeAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "knowledge.go",
|
||
"l": 6
|
||
},
|
||
{
|
||
"n": "Append",
|
||
"s": "Append(evt TextEvent) error",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "TextMemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 44
|
||
},
|
||
{
|
||
"n": "AudioURL",
|
||
"s": "type AudioURL struct { URL string `json:\"url\"` }",
|
||
"d": "",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "misc",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 862
|
||
},
|
||
{
|
||
"n": "AutoRestart",
|
||
"s": "func (s *PluginSDK) AutoRestart() bool",
|
||
"d": "AutoRestart 返回插件是否允许自动重启。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 791
|
||
},
|
||
{
|
||
"n": "CapAudio",
|
||
"s": "const CapAudio",
|
||
"d": "Output capability flags",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 331
|
||
},
|
||
{
|
||
"n": "CapFile",
|
||
"s": "const CapFile",
|
||
"d": "Output capability flags",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 329
|
||
},
|
||
{
|
||
"n": "CapImage",
|
||
"s": "const CapImage",
|
||
"d": "Output capability flags",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 330
|
||
},
|
||
{
|
||
"n": "CapStructured",
|
||
"s": "const CapStructured",
|
||
"d": "Output capability flags",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 332
|
||
},
|
||
{
|
||
"n": "CapText",
|
||
"s": "const CapText",
|
||
"d": "Output capability flags",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 328
|
||
},
|
||
{
|
||
"n": "ChannelDef",
|
||
"s": "type ChannelDef struct { NoMemory bool `json:\"no_memory,omitempty\"` Cleaner func(string) string `json:\"-\"` ContextPolicy string `json: …",
|
||
"d": "ChannelDef 描述通道在记忆计算层的行为,与 ToolDef.NoMemory/Cleaner 语义一致。",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 139
|
||
},
|
||
{
|
||
"n": "Commit",
|
||
"s": "Commit(triples []Triple) error",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "MemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 6
|
||
},
|
||
{
|
||
"n": "ConfigDef",
|
||
"s": "type ConfigDef struct { Key string `json:\"key\"` Default interface{} `json:\"default,omitempty\"` Type string `json:\"type\"` DisplayName string …",
|
||
"d": "ConfigDef describes a configuration field for the WebUI.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 50
|
||
},
|
||
{
|
||
"n": "ContentBlock",
|
||
"s": "type ContentBlock struct { Type string `json:\"type\"` Text string `json:\"text,omitempty\"` ImageURL *ImageURL `json:\"image_url,omitempty\"` AudioURL *AudioURL `jso …",
|
||
"d": "ContentBlock 是多模态内容块(OpenAI 格式:text/image_url/audio_url)。",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "tools",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 850
|
||
},
|
||
{
|
||
"n": "ContextPolicyNone",
|
||
"s": "const ContextPolicyNone",
|
||
"d": "上下文策略:决定一次工具调用/输入/注入是否依据其内容裁剪上下文。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 44
|
||
},
|
||
{
|
||
"n": "ContextPolicyPrune",
|
||
"s": "const ContextPolicyPrune",
|
||
"d": "上下文策略:决定一次工具调用/输入/注入是否依据其内容裁剪上下文。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 45
|
||
},
|
||
{
|
||
"n": "CurrentSource",
|
||
"s": "CurrentSource() string",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "LLMAPI",
|
||
"p": "llm",
|
||
"b": false,
|
||
"f": "llm.go",
|
||
"l": 7
|
||
},
|
||
{
|
||
"n": "DataDir",
|
||
"s": "DataDir() string",
|
||
"d": "DataDir returns the plugin-specific data directory (guaranteed to exist):",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 25
|
||
},
|
||
{
|
||
"n": "Defs",
|
||
"s": "Defs(prefix string) []*ConfigDef",
|
||
"d": "Defs returns config definitions matching the prefix.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 40
|
||
},
|
||
{
|
||
"n": "Doc",
|
||
"s": "type Doc struct { ID string `json:\"id\"` Title string `json:\"title\"` Content string `json:\"content\"` Score …",
|
||
"d": "Doc represents a document in the document store.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 89
|
||
},
|
||
{
|
||
"n": "DocMemory",
|
||
"s": "func (s *PluginSDK) DocMemory() DocMemoryAPI",
|
||
"d": "DocMemory returns the document memory API (may be nil if not available).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 418
|
||
},
|
||
{
|
||
"n": "DocMemoryAPI",
|
||
"s": "type DocMemoryAPI interface",
|
||
"d": "DocMemoryAPI provides access to the document vector store.",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "DocMemoryAPI",
|
||
"s": "type DocMemoryAPI interface { Query(text string, topK int) []*Doc Insert(doc *Doc) error // InsertWithMedia 写入文档并关联媒体。attachments 里带 Data 的会落进 …",
|
||
"d": "DocMemoryAPI provides access to the document vector store.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 74
|
||
},
|
||
{
|
||
"n": "Dump",
|
||
"s": "Dump() map[string]interface{}",
|
||
"d": "Dump returns all config values.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 43
|
||
},
|
||
{
|
||
"n": "Entity",
|
||
"s": "type Entity struct { Name string `json:\"name\"` Type string `json:\"type\"` MentionCount int `json:\"mention_count\"` }",
|
||
"d": "Entity represents a named entity in the knowledge graph.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 13
|
||
},
|
||
{
|
||
"n": "Event",
|
||
"s": "type Event struct { Type EventType `json:\"type\"` Source string `json:\"source\"` Payload map[string]interface{} `json:\"payload\"` T …",
|
||
"d": "Event represents a system event published by the kernel.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "events",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 265
|
||
},
|
||
{
|
||
"n": "EventAgentLLMChain",
|
||
"s": "const EventAgentLLMChain",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 252
|
||
},
|
||
{
|
||
"n": "EventAgentOutput",
|
||
"s": "const EventAgentOutput",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 251
|
||
},
|
||
{
|
||
"n": "EventContentDelta",
|
||
"s": "const EventContentDelta",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 261
|
||
},
|
||
{
|
||
"n": "EventHandler",
|
||
"s": "type EventHandler func(evt *Event)",
|
||
"d": "EventHandler processes a system event.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "events",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 273
|
||
},
|
||
{
|
||
"n": "EventRawInput",
|
||
"s": "const EventRawInput",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 250
|
||
},
|
||
{
|
||
"n": "EventReasoning",
|
||
"s": "const EventReasoning",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 254
|
||
},
|
||
{
|
||
"n": "EventReasoningDelta",
|
||
"s": "const EventReasoningDelta",
|
||
"d": "流式增量事件(token 级):核心 process() 流式化后每收到一个增量块发布。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 260
|
||
},
|
||
{
|
||
"n": "EventStage",
|
||
"s": "const EventStage",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 255
|
||
},
|
||
{
|
||
"n": "EventSubscriber",
|
||
"s": "type EventSubscriber interface { Subscribe(eventType EventType, handler EventHandler) func() }",
|
||
"d": "EventSubscriber allows plugins to subscribe to kernel events.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "events",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 278
|
||
},
|
||
{
|
||
"n": "EventSubscriber",
|
||
"s": "type EventSubscriber interface",
|
||
"d": "EventSubscriber allows plugins to subscribe to kernel events.",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "events",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "EventSystem",
|
||
"s": "const EventSystem",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 256
|
||
},
|
||
{
|
||
"n": "EventToolCall",
|
||
"s": "const EventToolCall",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 253
|
||
},
|
||
{
|
||
"n": "EventType",
|
||
"s": "type EventType string",
|
||
"d": "EventType identifies the kind of system event.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "events",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 247
|
||
},
|
||
{
|
||
"n": "Events",
|
||
"s": "func (s *PluginSDK) Events() EventSubscriber",
|
||
"d": "Events returns the event subscriber for listening to kernel events (may be nil if not available).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "events",
|
||
"b": true,
|
||
"f": "plugin.go",
|
||
"l": 446
|
||
},
|
||
{
|
||
"n": "Get",
|
||
"s": "Get(key string) (interface{}, error)",
|
||
"d": "Get reads the plugin's own config value (config_\u003cname\u003e table).",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 5
|
||
},
|
||
{
|
||
"n": "GetCore",
|
||
"s": "GetCore(key string) (interface{}, error)",
|
||
"d": "GetCore reads the core config table.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 14
|
||
},
|
||
{
|
||
"n": "GetNetwork",
|
||
"s": "GetNetwork(name string, depth int) ([]*PersonProfile, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "SocialAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 104
|
||
},
|
||
{
|
||
"n": "GetPerson",
|
||
"s": "GetPerson(name string) (*PersonProfile, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "SocialAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 101
|
||
},
|
||
{
|
||
"n": "GetPlugin",
|
||
"s": "GetPlugin(plugin, key string) (interface{}, error)",
|
||
"d": "GetPlugin reads another plugin's config table.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 28
|
||
},
|
||
{
|
||
"n": "GetRelations",
|
||
"s": "GetRelations(name string) ([]SocialRelation, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "SocialAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 103
|
||
},
|
||
{
|
||
"n": "GetTrait",
|
||
"s": "GetTrait(name, trait string) (string, bool)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "SocialAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 102
|
||
},
|
||
{
|
||
"n": "IOInjector",
|
||
"s": "type IOInjector interface { InjectInterruptText(source, channel, text string) InjectText(source, channel, text string) InjectTextNoMemory(source, channel, text string) // I …",
|
||
"d": "IOInjector provides methods for injecting input and interrupts into the agent pipeline.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 220
|
||
},
|
||
{
|
||
"n": "IOInjector",
|
||
"s": "type IOInjector interface",
|
||
"d": "IOInjector provides methods for injecting input and interrupts into the agent pipeline.",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "ImageURL",
|
||
"s": "type ImageURL struct { URL string `json:\"url\"` Detail string `json:\"detail,omitempty\"` }",
|
||
"d": "",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "misc",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 857
|
||
},
|
||
{
|
||
"n": "InjectInputMedia",
|
||
"s": "func (s *PluginSDK) InjectInputMedia(source, channel, text string, blocks []ContentBlock)",
|
||
"d": "InjectInputMedia 注入带媒体内容块(image_url/audio_url)的输入。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 701
|
||
},
|
||
{
|
||
"n": "InjectInputMedia",
|
||
"s": "InjectInputMedia(source, channel, text string, blocks []ContentBlock)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 230
|
||
},
|
||
{
|
||
"n": "InjectInputMediaOpts",
|
||
"s": "func (s *PluginSDK) InjectInputMediaOpts(source, channel, text string, blocks []ContentBlock, opts InjectOptions)",
|
||
"d": "InjectInputMediaOpts 注入带媒体块的输入,并声明记忆/裁剪行为。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 740
|
||
},
|
||
{
|
||
"n": "InjectInputMediaOpts",
|
||
"s": "InjectInputMediaOpts(source, channel, text string, blocks []ContentBlock, opts InjectOptions)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 241
|
||
},
|
||
{
|
||
"n": "InjectInputMediaSync",
|
||
"s": "InjectInputMediaSync(source, channel, text string, blocks []ContentBlock) string",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 231
|
||
},
|
||
{
|
||
"n": "InjectInputMediaSync",
|
||
"s": "func (s *PluginSDK) InjectInputMediaSync(source, channel, text string, blocks []ContentBlock) string",
|
||
"d": "InjectInputMediaSync 注入带媒体内容块的输入并同步等待 agent 回复。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 707
|
||
},
|
||
{
|
||
"n": "InjectInputMediaSyncOpts",
|
||
"s": "InjectInputMediaSyncOpts(source, channel, text string, blocks []ContentBlock, opts InjectOptions) string",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 242
|
||
},
|
||
{
|
||
"n": "InjectInputMediaSyncOpts",
|
||
"s": "func (s *PluginSDK) InjectInputMediaSyncOpts(source, channel, text string, blocks []ContentBlock, opts InjectOptions) string",
|
||
"d": "InjectInputMediaSyncOpts 注入带媒体块的输入并同步等待回复,同时声明记忆/裁剪行为。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 747
|
||
},
|
||
{
|
||
"n": "InjectInputSync",
|
||
"s": "InjectInputSync(source, channel, text string) string",
|
||
"d": "InjectInputSync 注入输入事件并同步等待 agent 回复,返回回复文本(无回复时返回空串)。",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 226
|
||
},
|
||
{
|
||
"n": "InjectInputSync",
|
||
"s": "func (s *PluginSDK) InjectInputSync(source, channel, text string) string",
|
||
"d": "InjectInputSync injects a text message and synchronously waits for the agent reply,",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 692
|
||
},
|
||
{
|
||
"n": "InjectInputSyncOpts",
|
||
"s": "InjectInputSyncOpts(source, channel, text string, opts InjectOptions) string",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 240
|
||
},
|
||
{
|
||
"n": "InjectInputSyncOpts",
|
||
"s": "func (s *PluginSDK) InjectInputSyncOpts(source, channel, text string, opts InjectOptions) string",
|
||
"d": "InjectInputSyncOpts 注入输入并同步等待回复,同时在这次注入上声明记忆/裁剪行为。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 731
|
||
},
|
||
{
|
||
"n": "InjectInterruptMedia",
|
||
"s": "func (s *PluginSDK) InjectInterruptMedia(source, channel, text string, blocks []ContentBlock)",
|
||
"d": "InjectInterruptMedia 注入带媒体内容块的中断,可抢占当前 LLM 处理。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 764
|
||
},
|
||
{
|
||
"n": "InjectInterruptMedia",
|
||
"s": "InjectInterruptMedia(source, channel, text string, blocks []ContentBlock)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 232
|
||
},
|
||
{
|
||
"n": "InjectInterruptMediaOpts",
|
||
"s": "func (s *PluginSDK) InjectInterruptMediaOpts(source, channel, text string, blocks []ContentBlock, opts InjectOptions)",
|
||
"d": "InjectInterruptMediaOpts 注入带媒体块的中断,并声明记忆/裁剪行为。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 756
|
||
},
|
||
{
|
||
"n": "InjectInterruptMediaOpts",
|
||
"s": "InjectInterruptMediaOpts(source, channel, text string, blocks []ContentBlock, opts InjectOptions)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 243
|
||
},
|
||
{
|
||
"n": "InjectInterruptText",
|
||
"s": "InjectInterruptText(source, channel, text string)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 221
|
||
},
|
||
{
|
||
"n": "InjectInterruptText",
|
||
"s": "func (s *PluginSDK) InjectInterruptText(source, channel, text string)",
|
||
"d": "InjectInterruptText injects a text interrupt that can preempt current LLM processing.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 673
|
||
},
|
||
{
|
||
"n": "InjectInterruptTextOpts",
|
||
"s": "func (s *PluginSDK) InjectInterruptTextOpts(source, channel, text string, opts InjectOptions)",
|
||
"d": "InjectInterruptTextOpts 注入可抢占当前处理的中断文本。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 724
|
||
},
|
||
{
|
||
"n": "InjectInterruptTextOpts",
|
||
"s": "InjectInterruptTextOpts(source, channel, text string, opts InjectOptions)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 239
|
||
},
|
||
{
|
||
"n": "InjectOptions",
|
||
"s": "type InjectOptions struct { NoMemory bool ContextPolicy string // RecallPolicy 声明此次注入是否据其内容召回相关记忆。 // 空串 = 默认(输入/注<><E6B3A8> …",
|
||
"d": "InjectOptions 声明一次注入行为在记忆层与上下文层的表现。",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 98
|
||
},
|
||
{
|
||
"n": "InjectText",
|
||
"s": "func (s *PluginSDK) InjectText(source, channel, text string)",
|
||
"d": "InjectText injects a text message into the agent pipeline.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 679
|
||
},
|
||
{
|
||
"n": "InjectText",
|
||
"s": "InjectText(source, channel, text string)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 222
|
||
},
|
||
{
|
||
"n": "InjectTextNoMemory",
|
||
"s": "func (s *PluginSDK) InjectTextNoMemory(source, channel, text string)",
|
||
"d": "InjectTextNoMemory injects a text message without generating memory.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 685
|
||
},
|
||
{
|
||
"n": "InjectTextNoMemory",
|
||
"s": "InjectTextNoMemory(source, channel, text string)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 223
|
||
},
|
||
{
|
||
"n": "InjectTextOpts",
|
||
"s": "func (s *PluginSDK) InjectTextOpts(source, channel, text string, opts InjectOptions)",
|
||
"d": "InjectTextOpts 注入文本到 agent,并在这一次注入上声明记忆与裁剪行为。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 714
|
||
},
|
||
{
|
||
"n": "InjectTextOpts",
|
||
"s": "InjectTextOpts(source, channel, text string, opts InjectOptions)",
|
||
"d": "以下 Opts 变体让调用点在**这一次注入**上声明记忆与裁剪行为。",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 238
|
||
},
|
||
{
|
||
"n": "InputChannelRegistrar",
|
||
"s": "type InputChannelRegistrar func(name string, def ChannelDef) error",
|
||
"d": "InputChannelRegistrar registers an input channel with its memory behavior.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 314
|
||
},
|
||
{
|
||
"n": "Insert",
|
||
"s": "Insert(doc *Doc) error",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "DocMemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 76
|
||
},
|
||
{
|
||
"n": "InsertWithMedia",
|
||
"s": "InsertWithMedia(doc *Doc, attachments []MediaAttachment) error",
|
||
"d": "InsertWithMedia 写入文档并关联媒体。attachments 里带 Data 的会落进",
|
||
"k": "method",
|
||
"r": "DocMemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 81
|
||
},
|
||
{
|
||
"n": "Introspect",
|
||
"s": "Introspect() (map[string]interface{}, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "MemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 7
|
||
},
|
||
{
|
||
"n": "IsPluginDisabled",
|
||
"s": "IsPluginDisabled(name string) bool",
|
||
"d": "IsPluginDisabled 查询插件是否被禁用。",
|
||
"k": "method",
|
||
"r": "PluginMgrAPI",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 290
|
||
},
|
||
{
|
||
"n": "IsResponded",
|
||
"s": "func (c *StageContext) IsResponded() bool",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "StageContext",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 172
|
||
},
|
||
{
|
||
"n": "Knowledge",
|
||
"s": "type Knowledge struct { Name string `json:\"name\"` Content string `json:\"content\"` }",
|
||
"d": "Knowledge represents a knowledge entry.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "knowledge.go",
|
||
"l": 11
|
||
},
|
||
{
|
||
"n": "Knowledge",
|
||
"s": "func (s *PluginSDK) Knowledge() KnowledgeAPI",
|
||
"d": "Knowledge returns the knowledge store API (may be nil if not available).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 425
|
||
},
|
||
{
|
||
"n": "KnowledgeAPI",
|
||
"s": "type KnowledgeAPI interface",
|
||
"d": "KnowledgeAPI provides access to the knowledge store.",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "KnowledgeAPI",
|
||
"s": "type KnowledgeAPI interface { Search(query string, topK int) ([]*Knowledge, error) Add(name, content string) error List() ([]string, error) }",
|
||
"d": "KnowledgeAPI provides access to the knowledge store.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "knowledge.go",
|
||
"l": 4
|
||
},
|
||
{
|
||
"n": "LLM",
|
||
"s": "func (s *PluginSDK) LLM() LLMAPI",
|
||
"d": "LLM returns the LLM provider API (may be nil if not available).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "llm",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 432
|
||
},
|
||
{
|
||
"n": "LLMAPI",
|
||
"s": "type LLMAPI interface { ListSources() []string SetSource(name string) error CurrentSource() string }",
|
||
"d": "LLMAPI provides access to the LLM provider manager.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "llm",
|
||
"b": false,
|
||
"f": "llm.go",
|
||
"l": 4
|
||
},
|
||
{
|
||
"n": "LLMAPI",
|
||
"s": "type LLMAPI interface",
|
||
"d": "LLMAPI provides access to the LLM provider manager.",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "llm",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "List",
|
||
"s": "List() ([]string, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "KnowledgeAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "knowledge.go",
|
||
"l": 7
|
||
},
|
||
{
|
||
"n": "List",
|
||
"s": "List(prefix string) ([]string, error)",
|
||
"d": "List returns all keys matching the given prefix.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 11
|
||
},
|
||
{
|
||
"n": "ListCore",
|
||
"s": "ListCore(prefix string) ([]string, error)",
|
||
"d": "ListCore lists core config keys matching the prefix.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 20
|
||
},
|
||
{
|
||
"n": "ListLoadedPlugins",
|
||
"s": "ListLoadedPlugins() []string",
|
||
"d": "ListLoadedPlugins 列出已加载插件。",
|
||
"k": "method",
|
||
"r": "PluginMgrAPI",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 288
|
||
},
|
||
{
|
||
"n": "ListPersons",
|
||
"s": "ListPersons() ([]string, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "SocialAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 105
|
||
},
|
||
{
|
||
"n": "ListPlugin",
|
||
"s": "ListPlugin(plugin, prefix string) ([]string, error)",
|
||
"d": "ListPlugin lists another plugin's config keys matching the prefix.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 34
|
||
},
|
||
{
|
||
"n": "ListSources",
|
||
"s": "ListSources() []string",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "LLMAPI",
|
||
"p": "llm",
|
||
"b": false,
|
||
"f": "llm.go",
|
||
"l": 5
|
||
},
|
||
{
|
||
"n": "Lock",
|
||
"s": "func (c *StageContext) Lock()",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "StageContext",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 170
|
||
},
|
||
{
|
||
"n": "MediaAttachment",
|
||
"s": "type MediaAttachment struct { Digest string `json:\"digest,omitempty\"` MIME string `json:\"mime,omitempty\"` Data []byte `json:\"data,omitempty\"` Name string `json:\"name,omite …",
|
||
"d": "TextEvent represents a single text memory event.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 58
|
||
},
|
||
{
|
||
"n": "MemItem",
|
||
"s": "type MemItem struct { Role string `json:\"role\"` Content string `json:\"content\"` Score float64 `json:\"score\"` }",
|
||
"d": "MemItem represents a memory item in stage context.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "misc",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 179
|
||
},
|
||
{
|
||
"n": "Memory",
|
||
"s": "func (s *PluginSDK) Memory() MemoryAPI",
|
||
"d": "Memory returns the graph memory API (may be nil if not available).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 404
|
||
},
|
||
{
|
||
"n": "MemoryAPI",
|
||
"s": "type MemoryAPI interface",
|
||
"d": "MemoryAPI provides access to the graph memory (entity-relation store).",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "MemoryAPI",
|
||
"s": "type MemoryAPI interface { Recall(query []string, depth int) ([]Entity, []Relation, error) Commit(triples []Triple) error Introspect() (map[string]interface{}, error) Merg …",
|
||
"d": "MemoryAPI provides access to the graph memory (entity-relation store).",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 4
|
||
},
|
||
{
|
||
"n": "MergeEntities",
|
||
"s": "MergeEntities(source, target string) (int, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "MemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 8
|
||
},
|
||
{
|
||
"n": "Name",
|
||
"s": "Name() string",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "Plugin",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 14
|
||
},
|
||
{
|
||
"n": "OutputChannelRegistrar",
|
||
"s": "type OutputChannelRegistrar func(name string, caps int, desc string, def ChannelDef, handler ToolHandler) error",
|
||
"d": "OutputChannelRegistrar registers an output channel that the output_send tool can use.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 317
|
||
},
|
||
{
|
||
"n": "OutputChannelUnregistrar",
|
||
"s": "type OutputChannelUnregistrar func(name string) error",
|
||
"d": "OutputChannelUnregistrar 注销一个输出通道。",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 324
|
||
},
|
||
{
|
||
"n": "PersonProfile",
|
||
"s": "type PersonProfile struct { Name string `json:\"name\"` Traits map[string]string `json:\"traits,omitempty\"` Relations []SocialRelation `json:\"relations,omitemp …",
|
||
"d": "PersonProfile represents a person's complete profile (traits + social relations).",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 109
|
||
},
|
||
{
|
||
"n": "Plugin",
|
||
"s": "type Plugin interface { Name() string Start(sdk *PluginSDK) error Stop() error }",
|
||
"d": "Plugin is the interface every plugin must implement.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 13
|
||
},
|
||
{
|
||
"n": "Plugin",
|
||
"s": "type Plugin interface",
|
||
"d": "Plugin is the interface every plugin must implement.",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "PluginMgr",
|
||
"s": "func (s *PluginSDK) PluginMgr() PluginMgrAPI",
|
||
"d": "PluginMgr returns the plugin manager API (ReloadOne / ReloadPlugins / list).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 653
|
||
},
|
||
{
|
||
"n": "PluginMgrAPI",
|
||
"s": "type PluginMgrAPI interface { // ReloadOne 重载单个插件(停止后重新加载)。 ReloadOne(name string) error // ListLoadedPlugins 列出已加载插件。 ListLoa …",
|
||
"d": "PluginMgrAPI 提供插件管理能力(外部插件可调用)。",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 284
|
||
},
|
||
{
|
||
"n": "PluginMgrAPI",
|
||
"s": "type PluginMgrAPI interface",
|
||
"d": "PluginMgrAPI 提供插件管理能力(外部插件可调用)。",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "PluginName",
|
||
"s": "func (s *PluginSDK) PluginName() string",
|
||
"d": "PluginName returns the name of the plugin.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 397
|
||
},
|
||
{
|
||
"n": "PluginSDK",
|
||
"s": "type PluginSDK struct { name string regTool ToolRegistrar regStage StageRegistrar regAPI APIRegistrar regOutput OutputChannelRegistrar …",
|
||
"d": "PluginSDK is the main API surface provided to plugins at runtime.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "misc",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 337
|
||
},
|
||
{
|
||
"n": "Plugins",
|
||
"s": "Plugins() []string",
|
||
"d": "Plugins returns a list of all plugin config namespaces.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 46
|
||
},
|
||
{
|
||
"n": "PriorityL1",
|
||
"s": "const PriorityL1",
|
||
"d": "中断优先级取值。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 123
|
||
},
|
||
{
|
||
"n": "PriorityL2",
|
||
"s": "const PriorityL2",
|
||
"d": "中断优先级取值。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 124
|
||
},
|
||
{
|
||
"n": "PriorityL3",
|
||
"s": "const PriorityL3",
|
||
"d": "中断优先级取值。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 125
|
||
},
|
||
{
|
||
"n": "PriorityL4",
|
||
"s": "const PriorityL4",
|
||
"d": "PriorityL4 仅内核级(内置)插件可用;外部插件声明会被夹到 L3。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": true,
|
||
"f": "plugin.go",
|
||
"l": 127
|
||
},
|
||
{
|
||
"n": "Purge",
|
||
"s": "Purge(criteria map[string]string, mode string) (int, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "MemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 9
|
||
},
|
||
{
|
||
"n": "Query",
|
||
"s": "Query(text string, topK int) []*Doc",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "DocMemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 75
|
||
},
|
||
{
|
||
"n": "RLock",
|
||
"s": "func (c *StageContext) RLock()",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "StageContext",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 168
|
||
},
|
||
{
|
||
"n": "RUnlock",
|
||
"s": "func (c *StageContext) RUnlock()",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "StageContext",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 169
|
||
},
|
||
{
|
||
"n": "Recall",
|
||
"s": "Recall(query []string, depth int) ([]Entity, []Relation, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "MemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 5
|
||
},
|
||
{
|
||
"n": "RecallPolicyAuto",
|
||
"s": "const RecallPolicyAuto",
|
||
"d": "召回策略:决定一次工具调用/输入/注入是否据其内容**召回**(注入)相关记忆。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 65
|
||
},
|
||
{
|
||
"n": "RecallPolicyNone",
|
||
"s": "const RecallPolicyNone",
|
||
"d": "召回策略:决定一次工具调用/输入/注入是否据其内容**召回**(注入)相关记忆。",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 64
|
||
},
|
||
{
|
||
"n": "RegisterDef",
|
||
"s": "RegisterDef(def ConfigDef)",
|
||
"d": "RegisterDef registers a config definition for UI display.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 37
|
||
},
|
||
{
|
||
"n": "RegisterInputChannel",
|
||
"s": "func (s *PluginSDK) RegisterInputChannel(name string, def ChannelDef) error",
|
||
"d": "RegisterInputChannel registers an input channel with its memory behavior.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 561
|
||
},
|
||
{
|
||
"n": "RegisterOnRemoveHandler",
|
||
"s": "func (s *PluginSDK) RegisterOnRemoveHandler(fn func())",
|
||
"d": "RegisterOnRemoveHandler 注册插件被删除(卸载)时的清理回调。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 826
|
||
},
|
||
{
|
||
"n": "RegisterOutputChannel",
|
||
"s": "func (s *PluginSDK) RegisterOutputChannel(name string, caps int, desc string, def ChannelDef, handler ToolHandler) error",
|
||
"d": "RegisterOutputChannel registers an output channel that the output_send tool can route to.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 528
|
||
},
|
||
{
|
||
"n": "RegisterPluginAPI",
|
||
"s": "func (s *PluginSDK) RegisterPluginAPI(name string) error",
|
||
"d": "RegisterPluginAPI registers this plugin's API for access by other plugins.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 502
|
||
},
|
||
{
|
||
"n": "RegisterStage",
|
||
"s": "func (s *PluginSDK) RegisterStage(stage Stage, handler StageHandler, scope ...StageScope)",
|
||
"d": "RegisterStage registers a handler for a pipeline stage.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 467
|
||
},
|
||
{
|
||
"n": "RegisterStopHandler",
|
||
"s": "func (s *PluginSDK) RegisterStopHandler(fn func())",
|
||
"d": "RegisterStopHandler 注册插件停止阶段的清理回调。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 801
|
||
},
|
||
{
|
||
"n": "RegisterTool",
|
||
"s": "func (s *PluginSDK) RegisterTool(name string, def ToolDef, handler ToolHandler) error",
|
||
"d": "RegisterTool registers a tool that the LLM can call.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "tools",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 453
|
||
},
|
||
{
|
||
"n": "Relation",
|
||
"s": "type Relation struct { SourceName string `json:\"source_name\"` TargetName string `json:\"target_name\"` RelationType string `json:\"relation_type\"` Confidence float6 …",
|
||
"d": "Relation represents a relationship between two entities.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 20
|
||
},
|
||
{
|
||
"n": "ReloadOne",
|
||
"s": "ReloadOne(name string) error",
|
||
"d": "ReloadOne 重载单个插件(停止后重新加载)。",
|
||
"k": "method",
|
||
"r": "PluginMgrAPI",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 286
|
||
},
|
||
{
|
||
"n": "Remove",
|
||
"s": "Remove(id string)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "DocMemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 82
|
||
},
|
||
{
|
||
"n": "RunOnRemoveHandlers",
|
||
"s": "func (s *PluginSDK) RunOnRemoveHandlers()",
|
||
"d": "RunOnRemoveHandlers 执行全部已注册的 onRemove handler(后注册先执行,执行后清空,幂等)。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 837
|
||
},
|
||
{
|
||
"n": "RunStopHandlers",
|
||
"s": "func (s *PluginSDK) RunStopHandlers()",
|
||
"d": "RunStopHandlers 执行全部已注册的 stop handler(后注册先执行,执行后清空,幂等)。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 812
|
||
},
|
||
{
|
||
"n": "SDKVersion",
|
||
"s": "var SDKVersion",
|
||
"d": "SDKVersion 是对外暴露的 SDK 版本号。",
|
||
"k": "var",
|
||
"r": "",
|
||
"p": "misc",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 10
|
||
},
|
||
{
|
||
"n": "Search",
|
||
"s": "Search(query string, topK int) ([]*Knowledge, error)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "KnowledgeAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "knowledge.go",
|
||
"l": 5
|
||
},
|
||
{
|
||
"n": "Set",
|
||
"s": "Set(key string, value interface{}) error",
|
||
"d": "Set writes a config value to the plugin's own config table.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 8
|
||
},
|
||
{
|
||
"n": "SetAutoRestart",
|
||
"s": "func (s *PluginSDK) SetAutoRestart(enabled bool)",
|
||
"d": "SetAutoRestart 设置插件崩溃后内核是否自动重启它。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 784
|
||
},
|
||
{
|
||
"n": "SetCore",
|
||
"s": "SetCore(key string, value interface{}) error",
|
||
"d": "SetCore writes to the core config table.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 17
|
||
},
|
||
{
|
||
"n": "SetDocMemoryAPI",
|
||
"s": "func (s *PluginSDK) SetDocMemoryAPI(dm DocMemoryAPI)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 614
|
||
},
|
||
{
|
||
"n": "SetEventSubscriber",
|
||
"s": "func (s *PluginSDK) SetEventSubscriber(es EventSubscriber)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": true,
|
||
"f": "plugin.go",
|
||
"l": 638
|
||
},
|
||
{
|
||
"n": "SetIOInjector",
|
||
"s": "func (s *PluginSDK) SetIOInjector(io IOInjector)",
|
||
"d": "SetIOInjector sets the IO injector (called by the core at startup).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 595
|
||
},
|
||
{
|
||
"n": "SetInputChannelRegistrar",
|
||
"s": "func (s *PluginSDK) SetInputChannelRegistrar(r InputChannelRegistrar)",
|
||
"d": "SetInputChannelRegistrar sets the input channel registrar (called by the core at startup).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 588
|
||
},
|
||
{
|
||
"n": "SetKnowledgeAPI",
|
||
"s": "func (s *PluginSDK) SetKnowledgeAPI(kn KnowledgeAPI)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 620
|
||
},
|
||
{
|
||
"n": "SetLLMAPI",
|
||
"s": "func (s *PluginSDK) SetLLMAPI(llm LLMAPI)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 626
|
||
},
|
||
{
|
||
"n": "SetMemoryAPI",
|
||
"s": "func (s *PluginSDK) SetMemoryAPI(mem MemoryAPI)",
|
||
"d": "SetMemoryAPI sets the memory API (called by the core at startup).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 602
|
||
},
|
||
{
|
||
"n": "SetOutputChannelRegistrar",
|
||
"s": "func (s *PluginSDK) SetOutputChannelRegistrar(r OutputChannelRegistrar)",
|
||
"d": "SetOutputChannelRegistrar sets the output channel registrar (called by the core at startup).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 574
|
||
},
|
||
{
|
||
"n": "SetOutputChannelUnregistrar",
|
||
"s": "func (s *PluginSDK) SetOutputChannelUnregistrar(r OutputChannelUnregistrar)",
|
||
"d": "SetOutputChannelUnregistrar sets the output channel unregistrar (called by the core at startup).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": true,
|
||
"f": "plugin.go",
|
||
"l": 581
|
||
},
|
||
{
|
||
"n": "SetPlugin",
|
||
"s": "SetPlugin(plugin, key string, value interface{}) error",
|
||
"d": "SetPlugin writes to another plugin's config table.",
|
||
"k": "method",
|
||
"r": "SettingsAPI",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 31
|
||
},
|
||
{
|
||
"n": "SetPluginMgrAPI",
|
||
"s": "func (s *PluginSDK) SetPluginMgrAPI(pm PluginMgrAPI)",
|
||
"d": "SetPluginMgrAPI sets the plugin manager API (called by the bridge at startup).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 645
|
||
},
|
||
{
|
||
"n": "SetSocialAPI",
|
||
"s": "func (s *PluginSDK) SetSocialAPI(social SocialAPI)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 632
|
||
},
|
||
{
|
||
"n": "SetSource",
|
||
"s": "SetSource(name string) error",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "LLMAPI",
|
||
"p": "llm",
|
||
"b": false,
|
||
"f": "llm.go",
|
||
"l": 6
|
||
},
|
||
{
|
||
"n": "SetTextMemoryAPI",
|
||
"s": "func (s *PluginSDK) SetTextMemoryAPI(tm TextMemoryAPI)",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 608
|
||
},
|
||
{
|
||
"n": "SetToolBlocks",
|
||
"s": "SetToolBlocks(blocks []ContentBlock)",
|
||
"d": "SetToolBlocks 插件工具注入多模态内容块(image_url/audio_url),内核在下一条",
|
||
"k": "method",
|
||
"r": "IOInjector",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 229
|
||
},
|
||
{
|
||
"n": "SetToolBlocks",
|
||
"s": "func (s *PluginSDK) SetToolBlocks(blocks []ContentBlock)",
|
||
"d": "SetToolBlocks 在工具处理函数内注入多模态内容块,内核在下一条 tool message",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 772
|
||
},
|
||
{
|
||
"n": "Settings",
|
||
"s": "func (s *PluginSDK) Settings() SettingsAPI",
|
||
"d": "Settings returns the settings API for reading/writing plugin configuration.",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 401
|
||
},
|
||
{
|
||
"n": "SettingsAPI",
|
||
"s": "type SettingsAPI interface",
|
||
"d": "",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "SettingsAPI",
|
||
"s": "type SettingsAPI interface { // Get reads the plugin's own config value (config_\u003cname\u003e table). Get(key string) (interface{}, error) // Set writes a config value to the plugi …",
|
||
"d": "",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "settings",
|
||
"b": false,
|
||
"f": "settings.go",
|
||
"l": 3
|
||
},
|
||
{
|
||
"n": "Social",
|
||
"s": "func (s *PluginSDK) Social() SocialAPI",
|
||
"d": "Social returns the social graph API (may be nil if not available).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 439
|
||
},
|
||
{
|
||
"n": "SocialAPI",
|
||
"s": "type SocialAPI interface { GetPerson(name string) (*PersonProfile, error) GetTrait(name, trait string) (string, bool) GetRelations(name string) ([]SocialRelation, error) G …",
|
||
"d": "SocialAPI provides read-only access to the social graph (person profiles and relationships).",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 100
|
||
},
|
||
{
|
||
"n": "SocialAPI",
|
||
"s": "type SocialAPI interface",
|
||
"d": "SocialAPI provides read-only access to the social graph (person profiles and relationships).",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "SocialRelation",
|
||
"s": "type SocialRelation struct { Person string `json:\"person\"` Relation string `json:\"relation\"` }",
|
||
"d": "SocialRelation represents a social relationship between two persons.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 116
|
||
},
|
||
{
|
||
"n": "Stage",
|
||
"s": "type Stage string",
|
||
"d": "Stage represents a point in the message processing pipeline.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 26
|
||
},
|
||
{
|
||
"n": "StageAfterOutput",
|
||
"s": "const StageAfterOutput",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 35
|
||
},
|
||
{
|
||
"n": "StageAfterToolcall",
|
||
"s": "const StageAfterToolcall",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 33
|
||
},
|
||
{
|
||
"n": "StageBeforeOutput",
|
||
"s": "const StageBeforeOutput",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 34
|
||
},
|
||
{
|
||
"n": "StageBeforeToolcall",
|
||
"s": "const StageBeforeToolcall",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 32
|
||
},
|
||
{
|
||
"n": "StageContext",
|
||
"s": "type StageContext struct { mu sync.RWMutex RawMessage string UserID string GroupID string ContextMsgs []map[string]interface{} L …",
|
||
"d": "StageContext provides context for stage handlers.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 148
|
||
},
|
||
{
|
||
"n": "StageHandler",
|
||
"s": "type StageHandler func(ctx *StageContext) error",
|
||
"d": "StageHandler is a function that handles a pipeline stage event.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 23
|
||
},
|
||
{
|
||
"n": "StageOnInput",
|
||
"s": "const StageOnInput",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 29
|
||
},
|
||
{
|
||
"n": "StagePostAction",
|
||
"s": "const StagePostAction",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 31
|
||
},
|
||
{
|
||
"n": "StagePreAction",
|
||
"s": "const StagePreAction",
|
||
"d": "",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 30
|
||
},
|
||
{
|
||
"n": "StageRegistrar",
|
||
"s": "type StageRegistrar func(stage Stage, handler StageHandler)",
|
||
"d": "StageRegistrar registers a stage handler.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 308
|
||
},
|
||
{
|
||
"n": "StageScope",
|
||
"s": "type StageScope int",
|
||
"d": "StageScope controls which events a stage handler receives.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 294
|
||
},
|
||
{
|
||
"n": "StageScopeGlobal",
|
||
"s": "const StageScopeGlobal",
|
||
"d": "StageScopeGlobal receives all stage events (default).",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 298
|
||
},
|
||
{
|
||
"n": "StageScopeOwnTools",
|
||
"s": "const StageScopeOwnTools",
|
||
"d": "StageScopeOwnTools only receives events for this plugin's own tool calls",
|
||
"k": "const",
|
||
"r": "",
|
||
"p": "constants",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 301
|
||
},
|
||
{
|
||
"n": "Start",
|
||
"s": "Start(sdk *PluginSDK) error",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "Plugin",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 15
|
||
},
|
||
{
|
||
"n": "Stats",
|
||
"s": "Stats() map[string]interface{}",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "DocMemoryAPI",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 83
|
||
},
|
||
{
|
||
"n": "Stop",
|
||
"s": "Stop() error",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "Plugin",
|
||
"p": "lifecycle",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 16
|
||
},
|
||
{
|
||
"n": "Subscribe",
|
||
"s": "Subscribe(eventType EventType, handler EventHandler) func()",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "EventSubscriber",
|
||
"p": "events",
|
||
"b": true,
|
||
"f": "plugin.go",
|
||
"l": 279
|
||
},
|
||
{
|
||
"n": "TextEvent",
|
||
"s": "type TextEvent struct { Role string `json:\"role\"` Content string `json:\"content\"` Timestamp int64 `json:\"timestamp\"` Channel …",
|
||
"d": "",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 65
|
||
},
|
||
{
|
||
"n": "TextMemory",
|
||
"s": "func (s *PluginSDK) TextMemory() TextMemoryAPI",
|
||
"d": "TextMemory returns the text memory API (may be nil if not available).",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 411
|
||
},
|
||
{
|
||
"n": "TextMemoryAPI",
|
||
"s": "type TextMemoryAPI interface { Append(evt TextEvent) error }",
|
||
"d": "TextMemoryAPI provides access to chronological text event storage.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 43
|
||
},
|
||
{
|
||
"n": "TextMemoryAPI",
|
||
"s": "type TextMemoryAPI interface",
|
||
"d": "TextMemoryAPI provides access to chronological text event storage.",
|
||
"k": "interface",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "",
|
||
"l": 0
|
||
},
|
||
{
|
||
"n": "ToolCall",
|
||
"s": "type ToolCall struct { ID string `json:\"id\"` Name string `json:\"name\"` Plugin string `json:\"plugin,omitempty …",
|
||
"d": "ToolCall represents a model's request to call a tool.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "tools",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 186
|
||
},
|
||
{
|
||
"n": "ToolDef",
|
||
"s": "type ToolDef struct { Name string `json:\"name\"` Plugin string `json:\"plugin,omitempty\"` Description string …",
|
||
"d": "ToolDef describes a tool that the plugin exposes.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "tools",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 203
|
||
},
|
||
{
|
||
"n": "ToolHandler",
|
||
"s": "type ToolHandler func(args map[string]interface{}) (interface{}, error)",
|
||
"d": "ToolHandler is a function that handles a tool call.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "tools",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 20
|
||
},
|
||
{
|
||
"n": "ToolRegistrar",
|
||
"s": "type ToolRegistrar func(name string, def ToolDef, handler ToolHandler) error",
|
||
"d": "ToolRegistrar registers a tool dynamically.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "bridge",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 305
|
||
},
|
||
{
|
||
"n": "ToolResult",
|
||
"s": "type ToolResult struct { CallID string `json:\"call_id\"` Name string `json:\"name\"` Plugin string `json:\"plugin,omitempty\"` Success bool `json:\"suc …",
|
||
"d": "ToolResult represents the result of a tool call.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "tools",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 194
|
||
},
|
||
{
|
||
"n": "Triple",
|
||
"s": "type Triple struct { Subject string `json:\"subject\"` Relation string `json:\"relation\"` Object string `json:\"object\"` Confidence float64 `json:\"c …",
|
||
"d": "Triple represents a subject-relation-object triple for the knowledge graph.",
|
||
"k": "type",
|
||
"r": "",
|
||
"p": "memory",
|
||
"b": false,
|
||
"f": "memory.go",
|
||
"l": 31
|
||
},
|
||
{
|
||
"n": "Unlock",
|
||
"s": "func (c *StageContext) Unlock()",
|
||
"d": "",
|
||
"k": "method",
|
||
"r": "StageContext",
|
||
"p": "stages",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 171
|
||
},
|
||
{
|
||
"n": "UnregisterOutputChannel",
|
||
"s": "func (s *PluginSDK) UnregisterOutputChannel(name string) error",
|
||
"d": "UnregisterOutputChannel 注销一个输出通道(动态通道随资源生灭时必须调用)。",
|
||
"k": "method",
|
||
"r": "PluginSDK",
|
||
"p": "misc",
|
||
"b": true,
|
||
"f": "plugin.go",
|
||
"l": 539
|
||
},
|
||
{
|
||
"n": "ValidContextPolicy",
|
||
"s": "func ValidContextPolicy(policy string) bool",
|
||
"d": "ValidContextPolicy 校验策略取值;空串等价于 ContextPolicyNone。",
|
||
"k": "func",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 49
|
||
},
|
||
{
|
||
"n": "ValidRecallPolicy",
|
||
"s": "func ValidRecallPolicy(policy string) bool",
|
||
"d": "ValidRecallPolicy 校验召回策略取值;空串按调用面取默认值。",
|
||
"k": "func",
|
||
"r": "",
|
||
"p": "channels",
|
||
"b": false,
|
||
"f": "plugin.go",
|
||
"l": 69
|
||
}
|
||
]
|