From b2dd1f29b7ce345d7dca8976994cdd6872908375 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-i18n[bot]" Date: Wed, 22 Apr 2026 20:43:09 +0000 Subject: [PATCH] chore(i18n): refresh zh-CN translations --- docs/zh-CN/plugins/sdk-overview.md | 550 ++++++++++++++--------------- 1 file changed, 275 insertions(+), 275 deletions(-) diff --git a/docs/zh-CN/plugins/sdk-overview.md b/docs/zh-CN/plugins/sdk-overview.md index 932f3cb53..4ee81f5e4 100644 --- a/docs/zh-CN/plugins/sdk-overview.md +++ b/docs/zh-CN/plugins/sdk-overview.md @@ -1,314 +1,314 @@ --- read_when: - - 你需要了解应从哪个 SDK 子路径导入 - - 你想查看 `OpenClawPluginApi` 上所有注册方法的参考说明 - - 你正在查找某个特定的 SDK 导出内容 + - 你需要知道应从哪个 SDK 子路径导入 + - 你想查看 OpenClawPluginApi 上所有注册方法的参考文档 + - 你正在查找某个特定的 SDK 导出 sidebarTitle: SDK Overview -summary: 导入映射、注册 API 参考和 SDK 架构 +summary: Import map、注册 API 参考和 SDK 架构 title: 插件 SDK 概览 x-i18n: - generated_at: "2026-04-22T18:24:54Z" + generated_at: "2026-04-22T20:41:19Z" model: gpt-5.4 provider: openai - source_hash: 8bfe442b41b41c03081e4a206ede6b8ae62b920096a69cf46d5843f2217e4a6c + source_hash: da39299358c341cffe3e7adc6026cc5dca284514421d7dc1b641d9c0d3c98151 source_path: plugins/sdk-overview.md workflow: 15 --- # 插件 SDK 概览 -插件 SDK 是插件与核心之间的类型化契约。本页是关于**导入什么**以及**可以注册什么**的参考。 +插件 SDK 是插件与核心之间的类型化契约。本页是关于**导入什么**以及**你可以注册什么**的参考文档。 **在找操作指南吗?** - - 第一个插件?从 [入门指南](/zh-CN/plugins/building-plugins) 开始 - - 渠道插件?参见 [渠道插件](/zh-CN/plugins/sdk-channel-plugins) - - 提供商插件?参见 [提供商插件](/zh-CN/plugins/sdk-provider-plugins) + - 第一个插件?从[入门指南](/zh-CN/plugins/building-plugins)开始 + - 渠道插件?参见[渠道插件](/zh-CN/plugins/sdk-channel-plugins) + - 提供商插件?参见[提供商插件](/zh-CN/plugins/sdk-provider-plugins) ## 导入约定 -始终从特定子路径导入: +始终从特定的子路径导入: ```typescript import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core"; ``` -每个子路径都是一个小型、独立的模块。这样可以保持快速启动,并防止循环依赖问题。对于特定于渠道的入口/构建辅助工具,优先使用 `openclaw/plugin-sdk/channel-core`;将 `openclaw/plugin-sdk/core` 保留给更广泛的总括性表面和共享辅助工具,例如 `buildChannelConfigSchema`。 +每个子路径都是一个小型、自包含的模块。这样可以保持快速启动,并避免循环依赖问题。对于特定于渠道的入口/构建辅助函数,优先使用 `openclaw/plugin-sdk/channel-core`;将 `openclaw/plugin-sdk/core` 保留给更广泛的总括性表面和共享辅助函数,例如 `buildChannelConfigSchema`。 -不要添加或依赖带有提供商名称的便捷接缝,例如 `openclaw/plugin-sdk/slack`、`openclaw/plugin-sdk/discord`、`openclaw/plugin-sdk/signal`、`openclaw/plugin-sdk/whatsapp`,或带有渠道品牌的辅助工具接缝。内置插件应在它们自己的 `api.ts` 或 `runtime-api.ts` barrel 中组合通用 SDK 子路径,而核心则应使用这些插件本地 barrel,或者在需求确实跨渠道时添加一个狭义的通用 SDK 契约。 +不要添加或依赖带有提供商名称的便捷接口,例如 `openclaw/plugin-sdk/slack`、`openclaw/plugin-sdk/discord`、`openclaw/plugin-sdk/signal`、`openclaw/plugin-sdk/whatsapp`,或带有渠道品牌的辅助接口。内置插件应在它们自己的 `api.ts` 或 `runtime-api.ts` barrel 文件中组合通用的 SDK 子路径,而核心则应使用这些插件本地的 barrel,或者在需求确实跨渠道时添加一个狭义的通用 SDK 契约。 -生成的导出映射仍包含一小部分内置插件辅助工具接缝,例如 `plugin-sdk/feishu`、`plugin-sdk/feishu-setup`、`plugin-sdk/zalo`、`plugin-sdk/zalo-setup` 和 `plugin-sdk/matrix*`。这些子路径仅用于内置插件维护和兼容性;它们在下面的通用表中被有意省略,并且不是新的第三方插件推荐使用的导入路径。 +生成的导出映射仍然包含一小部分内置插件辅助接口,例如 `plugin-sdk/feishu`、`plugin-sdk/feishu-setup`、`plugin-sdk/zalo`、`plugin-sdk/zalo-setup` 和 `plugin-sdk/matrix*`。这些子路径仅用于内置插件维护和兼容性;它们被有意省略在下面的通用表格之外,并且不是新第三方插件的推荐导入路径。 ## 子路径参考 -最常用的子路径,按用途分组。完整的 200 多个子路径生成列表位于 `scripts/lib/plugin-sdk-entrypoints.json`。 +最常用的子路径,按用途分组。完整的 200 多个子路径的生成列表位于 `scripts/lib/plugin-sdk-entrypoints.json`。 -保留的内置插件辅助工具子路径仍会出现在该生成列表中。除非某个文档页面明确将其宣传为公共接口,否则应将这些视为实现细节/兼容性表面。 +保留的内置插件辅助子路径仍然会出现在该生成列表中。除非某个文档页面明确将其作为公共接口推广,否则应将它们视为实现细节/兼容性表面。 -### 插件入口点 +### 插件入口 -| Subpath | 关键导出 | -| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `plugin-sdk/plugin-entry` | `definePluginEntry` | +| 子路径 | 关键导出 | +| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `plugin-sdk/plugin-entry` | `definePluginEntry` | | `plugin-sdk/core` | `defineChannelPluginEntry`, `createChatChannelPlugin`, `createChannelPluginBase`, `defineSetupPluginEntry`, `buildChannelConfigSchema` | -| `plugin-sdk/config-schema` | `OpenClawSchema` | -| `plugin-sdk/provider-entry` | `defineSingleProviderPluginEntry` | +| `plugin-sdk/config-schema` | `OpenClawSchema` | +| `plugin-sdk/provider-entry` | `defineSingleProviderPluginEntry` | - | Subpath | 关键导出 | + | 子路径 | 关键导出 | | --- | --- | | `plugin-sdk/channel-core` | `defineChannelPluginEntry`, `defineSetupPluginEntry`, `createChatChannelPlugin`, `createChannelPluginBase` | | `plugin-sdk/config-schema` | 根 `openclaw.json` Zod schema 导出(`OpenClawSchema`) | - | `plugin-sdk/channel-setup` | `createOptionalChannelSetupSurface`, `createOptionalChannelSetupAdapter`, `createOptionalChannelSetupWizard`,以及 `DEFAULT_ACCOUNT_ID`, `createTopLevelChannelDmPolicy`, `setSetupChannelEnabled`, `splitSetupEntries` | - | `plugin-sdk/setup` | 共享设置向导辅助工具、allowlist 提示、设置状态构建器 | - | `plugin-sdk/setup-runtime` | `createPatchedAccountSetupAdapter`, `createEnvPatchedAccountSetupAdapter`, `createSetupInputPresenceValidator`, `noteChannelLookupFailure`, `noteChannelLookupSummary`, `promptResolvedAllowFrom`, `splitSetupEntries`, `createAllowlistSetupWizardProxy`, `createDelegatedSetupWizardProxy` | + | `plugin-sdk/channel-setup` | `createOptionalChannelSetupSurface`、`createOptionalChannelSetupAdapter`、`createOptionalChannelSetupWizard`,以及 `DEFAULT_ACCOUNT_ID`、`createTopLevelChannelDmPolicy`、`setSetupChannelEnabled`、`splitSetupEntries` | + | `plugin-sdk/setup` | 共享设置向导辅助函数、allowlist 提示、设置状态构建器 | + | `plugin-sdk/setup-runtime` | `createPatchedAccountSetupAdapter`、`createEnvPatchedAccountSetupAdapter`、`createSetupInputPresenceValidator`、`noteChannelLookupFailure`、`noteChannelLookupSummary`、`promptResolvedAllowFrom`、`splitSetupEntries`、`createAllowlistSetupWizardProxy`、`createDelegatedSetupWizardProxy` | | `plugin-sdk/setup-adapter-runtime` | `createEnvPatchedAccountSetupAdapter` | - | `plugin-sdk/setup-tools` | `formatCliCommand`, `detectBinary`, `extractArchive`, `resolveBrewExecutable`, `formatDocsLink`, `CONFIG_DIR` | - | `plugin-sdk/account-core` | 多账户配置/动作门控辅助工具、默认账户回退辅助工具 | - | `plugin-sdk/account-id` | `DEFAULT_ACCOUNT_ID`、account-id 规范化辅助工具 | - | `plugin-sdk/account-resolution` | 账户查找 + 默认回退辅助工具 | - | `plugin-sdk/account-helpers` | 狭义的账户列表/账户动作辅助工具 | + | `plugin-sdk/setup-tools` | `formatCliCommand`、`detectBinary`、`extractArchive`、`resolveBrewExecutable`、`formatDocsLink`、`CONFIG_DIR` | + | `plugin-sdk/account-core` | 多账户配置/操作门控辅助函数、默认账户回退辅助函数 | + | `plugin-sdk/account-id` | `DEFAULT_ACCOUNT_ID`、account-id 规范化辅助函数 | + | `plugin-sdk/account-resolution` | 账户查找 + 默认回退辅助函数 | + | `plugin-sdk/account-helpers` | 狭义的账户列表/账户操作辅助函数 | | `plugin-sdk/channel-pairing` | `createChannelPairingController` | | `plugin-sdk/channel-reply-pipeline` | `createChannelReplyPipeline` | | `plugin-sdk/channel-config-helpers` | `createHybridChannelConfigAdapter` | | `plugin-sdk/channel-config-schema` | 渠道配置 schema 类型 | - | `plugin-sdk/telegram-command-config` | Telegram 自定义命令规范化/验证辅助工具,带有内置契约回退 | - | `plugin-sdk/command-gating` | 狭义的命令授权门控辅助工具 | + | `plugin-sdk/telegram-command-config` | Telegram 自定义命令规范化/校验辅助函数,带内置契约回退 | + | `plugin-sdk/command-gating` | 狭义的命令授权门控辅助函数 | | `plugin-sdk/channel-policy` | `resolveChannelGroupRequireMention` | - | `plugin-sdk/channel-lifecycle` | `createAccountStatusSink`、草稿流生命周期/终结辅助工具 | - | `plugin-sdk/inbound-envelope` | 共享入站路由 + envelope 构建器辅助工具 | - | `plugin-sdk/inbound-reply-dispatch` | 共享入站记录与分发辅助工具 | - | `plugin-sdk/messaging-targets` | 目标解析/匹配辅助工具 | - | `plugin-sdk/outbound-media` | 共享出站媒体加载辅助工具 | - | `plugin-sdk/outbound-runtime` | 出站身份、发送委托和负载规划辅助工具 | - | `plugin-sdk/poll-runtime` | 狭义的投票规范化辅助工具 | - | `plugin-sdk/thread-bindings-runtime` | 线程绑定生命周期和适配器辅助工具 | + | `plugin-sdk/channel-lifecycle` | `createAccountStatusSink`、草稿流生命周期/最终化辅助函数 | + | `plugin-sdk/inbound-envelope` | 共享入站路由 + envelope 构建辅助函数 | + | `plugin-sdk/inbound-reply-dispatch` | 共享入站记录与分发辅助函数 | + | `plugin-sdk/messaging-targets` | 目标解析/匹配辅助函数 | + | `plugin-sdk/outbound-media` | 共享出站媒体加载辅助函数 | + | `plugin-sdk/outbound-runtime` | 出站身份、发送委托和负载规划辅助函数 | + | `plugin-sdk/poll-runtime` | 狭义的投票规范化辅助函数 | + | `plugin-sdk/thread-bindings-runtime` | 线程绑定生命周期和适配器辅助函数 | | `plugin-sdk/agent-media-payload` | 旧版智能体媒体负载构建器 | - | `plugin-sdk/conversation-runtime` | 对话/线程绑定、配对和已配置绑定辅助工具 | - | `plugin-sdk/runtime-config-snapshot` | 运行时配置快照辅助工具 | - | `plugin-sdk/runtime-group-policy` | 运行时群组策略解析辅助工具 | - | `plugin-sdk/channel-status` | 共享渠道状态快照/摘要辅助工具 | + | `plugin-sdk/conversation-runtime` | 会话/线程绑定、配对和已配置绑定辅助函数 | + | `plugin-sdk/runtime-config-snapshot` | 运行时配置快照辅助函数 | + | `plugin-sdk/runtime-group-policy` | 运行时群组策略解析辅助函数 | + | `plugin-sdk/channel-status` | 共享渠道状态快照/摘要辅助函数 | | `plugin-sdk/channel-config-primitives` | 狭义的渠道配置 schema 基元 | - | `plugin-sdk/channel-config-writes` | 渠道配置写入授权辅助工具 | + | `plugin-sdk/channel-config-writes` | 渠道配置写入授权辅助函数 | | `plugin-sdk/channel-plugin-common` | 共享渠道插件前导导出 | - | `plugin-sdk/allowlist-config-edit` | allowlist 配置编辑/读取辅助工具 | - | `plugin-sdk/group-access` | 共享群组访问决策辅助工具 | - | `plugin-sdk/direct-dm` | 共享直接私信凭证/守卫辅助工具 | - | `plugin-sdk/interactive-runtime` | 语义化消息展示、投递和旧版交互式回复辅助工具。参见 [Message Presentation](/zh-CN/plugins/message-presentation) | - | `plugin-sdk/channel-inbound` | 用于入站去抖、提及匹配、提及策略辅助工具和 envelope 辅助工具的兼容性 barrel | - | `plugin-sdk/channel-mention-gating` | 不包含更广泛入站运行时表面的狭义提及策略辅助工具 | - | `plugin-sdk/channel-location` | 渠道位置上下文和格式化辅助工具 | - | `plugin-sdk/channel-logging` | 用于入站丢弃以及 typing/ack 失败的渠道日志辅助工具 | + | `plugin-sdk/allowlist-config-edit` | allowlist 配置编辑/读取辅助函数 | + | `plugin-sdk/group-access` | 共享群组访问决策辅助函数 | + | `plugin-sdk/direct-dm` | 共享直接私信认证/守卫辅助函数 | + | `plugin-sdk/interactive-runtime` | 语义消息呈现、投递和旧版交互式回复辅助函数。参见[消息呈现](/zh-CN/plugins/message-presentation) | + | `plugin-sdk/channel-inbound` | 入站去抖、提及匹配、提及策略辅助函数和 envelope 辅助函数的兼容性 barrel | + | `plugin-sdk/channel-mention-gating` | 不包含更广泛入站运行时表面的狭义提及策略辅助函数 | + | `plugin-sdk/channel-location` | 渠道位置上下文和格式化辅助函数 | + | `plugin-sdk/channel-logging` | 用于入站丢弃以及 typing/ack 失败的渠道日志辅助函数 | | `plugin-sdk/channel-send-result` | 回复结果类型 | - | `plugin-sdk/channel-actions` | 渠道消息动作辅助工具,以及为插件兼容性保留的已弃用原生 schema 辅助工具 | - | `plugin-sdk/channel-targets` | 目标解析/匹配辅助工具 | + | `plugin-sdk/channel-actions` | 渠道消息操作辅助函数,以及为插件兼容性保留的已弃用原生 schema 辅助函数 | + | `plugin-sdk/channel-targets` | 目标解析/匹配辅助函数 | | `plugin-sdk/channel-contract` | 渠道契约类型 | - | `plugin-sdk/channel-feedback` | 反馈/reaction 接线 | - | `plugin-sdk/channel-secret-runtime` | 狭义的 secret 契约辅助工具,例如 `collectSimpleChannelFieldAssignments`、`getChannelSurface`、`pushAssignment` 和 secret target 类型 | + | `plugin-sdk/channel-feedback` | 反馈/reaction 连接 | + | `plugin-sdk/channel-secret-runtime` | 狭义的 secret 契约辅助函数,例如 `collectSimpleChannelFieldAssignments`、`getChannelSurface`、`pushAssignment` 和 secret 目标类型 | - | Subpath | 关键导出 | + | 子路径 | 关键导出 | | --- | --- | | `plugin-sdk/provider-entry` | `defineSingleProviderPluginEntry` | - | `plugin-sdk/provider-setup` | 精选的本地/自托管提供商设置辅助工具 | - | `plugin-sdk/self-hosted-provider-setup` | 聚焦于 OpenAI 兼容自托管提供商设置的辅助工具 | + | `plugin-sdk/provider-setup` | 精选的本地/自托管提供商设置辅助函数 | + | `plugin-sdk/self-hosted-provider-setup` | 专注于兼容 OpenAI 的自托管提供商设置辅助函数 | | `plugin-sdk/cli-backend` | CLI 后端默认值 + watchdog 常量 | - | `plugin-sdk/provider-auth-runtime` | 用于提供商插件的运行时 API 密钥解析辅助工具 | - | `plugin-sdk/provider-auth-api-key` | API 密钥新手引导/profile 写入辅助工具,例如 `upsertApiKeyProfile` | - | `plugin-sdk/provider-auth-result` | 标准 OAuth auth-result 构建器 | - | `plugin-sdk/provider-auth-login` | 用于提供商插件的共享交互式登录辅助工具 | - | `plugin-sdk/provider-env-vars` | 提供商凭证环境变量查找辅助工具 | - | `plugin-sdk/provider-auth` | `createProviderApiKeyAuthMethod`, `ensureApiKeyFromOptionEnvOrPrompt`, `upsertAuthProfile`, `upsertApiKeyProfile`, `writeOAuthCredentials` | - | `plugin-sdk/provider-model-shared` | `ProviderReplayFamily`, `buildProviderReplayFamilyHooks`, `normalizeModelCompat`、共享 replay-policy 构建器、provider-endpoint 辅助工具,以及诸如 `normalizeNativeXaiModelId` 之类的 model-id 规范化辅助工具 | - | `plugin-sdk/provider-catalog-shared` | `findCatalogTemplate`, `buildSingleProviderApiKeyCatalog`, `supportsNativeStreamingUsageCompat`, `applyProviderNativeStreamingUsageCompat` | - | `plugin-sdk/provider-http` | 通用提供商 HTTP/端点能力辅助工具 | - | `plugin-sdk/provider-web-fetch-contract` | 狭义的 web-fetch 配置/选择契约辅助工具,例如 `enablePluginInConfig` 和 `WebFetchProviderPlugin` | - | `plugin-sdk/provider-web-fetch` | web-fetch 提供商注册/缓存辅助工具 | - | `plugin-sdk/provider-web-search-config-contract` | 为不需要插件启用接线的提供商提供狭义的 web-search 配置/凭证辅助工具 | - | `plugin-sdk/provider-web-search-contract` | 狭义的 web-search 配置/凭证契约辅助工具,例如 `createWebSearchProviderContractFields`, `enablePluginInConfig`, `resolveProviderWebSearchPluginConfig` 以及带作用域的凭证 setter/getter | - | `plugin-sdk/provider-web-search` | web-search 提供商注册/缓存/运行时辅助工具 | - | `plugin-sdk/provider-tools` | `ProviderToolCompatFamily`, `buildProviderToolCompatFamilyHooks`、Gemini schema 清理 + diagnostics,以及 xAI 兼容性辅助工具,例如 `resolveXaiModelCompatPatch` / `applyXaiModelCompat` | - | `plugin-sdk/provider-usage` | `fetchClaudeUsage` 及类似功能 | - | `plugin-sdk/provider-stream` | `ProviderStreamFamily`, `buildProviderStreamFamilyHooks`, `composeProviderStreamWrappers`、流包装器类型,以及共享的 Anthropic/Bedrock/Google/Kilocode/Moonshot/OpenAI/OpenRouter/Z.A.I/MiniMax/Copilot 包装器辅助工具 | - | `plugin-sdk/provider-transport-runtime` | 原生提供商传输辅助工具,例如受保护的 fetch、传输消息转换和可写传输事件流 | - | `plugin-sdk/provider-onboard` | 新手引导配置补丁辅助工具 | - | `plugin-sdk/global-singleton` | 进程本地 singleton/map/cache 辅助工具 | + | `plugin-sdk/provider-auth-runtime` | 提供商插件的运行时 API key 解析辅助函数 | + | `plugin-sdk/provider-auth-api-key` | API key 新手引导/profile 写入辅助函数,例如 `upsertApiKeyProfile` | + | `plugin-sdk/provider-auth-result` | 标准 OAuth 认证结果构建器 | + | `plugin-sdk/provider-auth-login` | 提供商插件共享的交互式登录辅助函数 | + | `plugin-sdk/provider-env-vars` | 提供商认证环境变量查找辅助函数 | + | `plugin-sdk/provider-auth` | `createProviderApiKeyAuthMethod`、`ensureApiKeyFromOptionEnvOrPrompt`、`upsertAuthProfile`、`upsertApiKeyProfile`、`writeOAuthCredentials` | + | `plugin-sdk/provider-model-shared` | `ProviderReplayFamily`、`buildProviderReplayFamilyHooks`、`normalizeModelCompat`、共享 replay-policy 构建器、provider-endpoint 辅助函数,以及诸如 `normalizeNativeXaiModelId` 之类的 model-id 规范化辅助函数 | + | `plugin-sdk/provider-catalog-shared` | `findCatalogTemplate`、`buildSingleProviderApiKeyCatalog`、`supportsNativeStreamingUsageCompat`、`applyProviderNativeStreamingUsageCompat` | + | `plugin-sdk/provider-http` | 通用提供商 HTTP/端点能力辅助函数 | + | `plugin-sdk/provider-web-fetch-contract` | 狭义的 web-fetch 配置/选择契约辅助函数,例如 `enablePluginInConfig` 和 `WebFetchProviderPlugin` | + | `plugin-sdk/provider-web-fetch` | web-fetch 提供商注册/缓存辅助函数 | + | `plugin-sdk/provider-web-search-config-contract` | 适用于不需要插件启用连接的提供商的狭义 web-search 配置/凭证辅助函数 | + | `plugin-sdk/provider-web-search-contract` | 狭义的 web-search 配置/凭证契约辅助函数,例如 `createWebSearchProviderContractFields`、`enablePluginInConfig`、`resolveProviderWebSearchPluginConfig` 和作用域化凭证 setter/getter | + | `plugin-sdk/provider-web-search` | web-search 提供商注册/缓存/运行时辅助函数 | + | `plugin-sdk/provider-tools` | `ProviderToolCompatFamily`、`buildProviderToolCompatFamilyHooks`、Gemini schema 清理 + 诊断,以及诸如 `resolveXaiModelCompatPatch` / `applyXaiModelCompat` 之类的 xAI 兼容辅助函数 | + | `plugin-sdk/provider-usage` | `fetchClaudeUsage` 及类似函数 | + | `plugin-sdk/provider-stream` | `ProviderStreamFamily`、`buildProviderStreamFamilyHooks`、`composeProviderStreamWrappers`、流包装器类型,以及共享的 Anthropic/Bedrock/Google/Kilocode/Moonshot/OpenAI/OpenRouter/Z.A.I/MiniMax/Copilot 包装器辅助函数 | + | `plugin-sdk/provider-transport-runtime` | 原生提供商传输辅助函数,例如受保护的 fetch、传输消息转换和可写传输事件流 | + | `plugin-sdk/provider-onboard` | 新手引导配置补丁辅助函数 | + | `plugin-sdk/global-singleton` | 进程本地 singleton/map/cache 辅助函数 | - - | Subpath | 关键导出 | + + | 子路径 | 关键导出 | | --- | --- | - | `plugin-sdk/command-auth` | `resolveControlCommandGate`、命令注册表辅助工具、发送者授权辅助工具 | + | `plugin-sdk/command-auth` | `resolveControlCommandGate`、命令注册表辅助函数、发送者授权辅助函数 | | `plugin-sdk/command-status` | 命令/帮助消息构建器,例如 `buildCommandsMessagePaginated` 和 `buildHelpMessage` | - | `plugin-sdk/approval-auth-runtime` | 审批人解析和同聊天动作凭证辅助工具 | - | `plugin-sdk/approval-client-runtime` | 原生 exec 审批 profile/filter 辅助工具 | + | `plugin-sdk/approval-auth-runtime` | 审批人解析和同聊天操作认证辅助函数 | + | `plugin-sdk/approval-client-runtime` | 原生 exec 审批 profile/filter 辅助函数 | | `plugin-sdk/approval-delivery-runtime` | 原生审批能力/投递适配器 | - | `plugin-sdk/approval-gateway-runtime` | 共享审批 Gateway 网关解析辅助工具 | - | `plugin-sdk/approval-handler-adapter-runtime` | 用于热渠道入口点的轻量级原生审批适配器加载辅助工具 | - | `plugin-sdk/approval-handler-runtime` | 更广泛的审批处理器运行时辅助工具;若更狭义的 adapter/gateway 接缝已足够,优先使用它们 | - | `plugin-sdk/approval-native-runtime` | 原生审批目标 + 账户绑定辅助工具 | - | `plugin-sdk/approval-reply-runtime` | exec/插件审批回复负载辅助工具 | - | `plugin-sdk/command-auth-native` | 原生命令凭证 + 原生会话目标辅助工具 | - | `plugin-sdk/command-detection` | 共享命令检测辅助工具 | - | `plugin-sdk/command-surface` | 命令体规范化和命令表面辅助工具 | + | `plugin-sdk/approval-gateway-runtime` | 共享审批 Gateway 网关解析辅助函数 | + | `plugin-sdk/approval-handler-adapter-runtime` | 用于热渠道入口点的轻量级原生审批适配器加载辅助函数 | + | `plugin-sdk/approval-handler-runtime` | 更广泛的审批处理器运行时辅助函数;当更狭义的 adapter/gateway 接口已足够时,优先使用它们 | + | `plugin-sdk/approval-native-runtime` | 原生审批目标 + 账户绑定辅助函数 | + | `plugin-sdk/approval-reply-runtime` | exec/插件审批回复负载辅助函数 | + | `plugin-sdk/command-auth-native` | 原生命令认证 + 原生会话目标辅助函数 | + | `plugin-sdk/command-detection` | 共享命令检测辅助函数 | + | `plugin-sdk/command-surface` | 命令正文规范化和命令表面辅助函数 | | `plugin-sdk/allow-from` | `formatAllowFromLowercase` | - | `plugin-sdk/channel-secret-runtime` | 用于渠道/插件 secret 表面的狭义 secret 契约收集辅助工具 | - | `plugin-sdk/secret-ref-runtime` | 用于 secret 契约/配置解析的狭义 `coerceSecretRef` 和 SecretRef 类型辅助工具 | - | `plugin-sdk/security-runtime` | 共享信任、私信门控、外部内容和 secret 收集辅助工具 | - | `plugin-sdk/ssrf-policy` | 主机 allowlist 和私有网络 SSRF 策略辅助工具 | - | `plugin-sdk/ssrf-dispatcher` | 不带广泛基础设施运行时表面的狭义固定 dispatcher 辅助工具 | - | `plugin-sdk/ssrf-runtime` | 固定 dispatcher、受 SSRF 保护的 fetch,以及 SSRF 策略辅助工具 | - | `plugin-sdk/secret-input` | secret 输入解析辅助工具 | - | `plugin-sdk/webhook-ingress` | webhook 请求/目标辅助工具 | - | `plugin-sdk/webhook-request-guards` | 请求体大小/超时辅助工具 | + | `plugin-sdk/channel-secret-runtime` | 用于渠道/插件 secret 表面的狭义 secret 契约收集辅助函数 | + | `plugin-sdk/secret-ref-runtime` | 用于 secret 契约/配置解析的狭义 `coerceSecretRef` 和 SecretRef 类型辅助函数 | + | `plugin-sdk/security-runtime` | 共享信任、私信门控、外部内容和 secret 收集辅助函数 | + | `plugin-sdk/ssrf-policy` | 主机 allowlist 和私有网络 SSRF 策略辅助函数 | + | `plugin-sdk/ssrf-dispatcher` | 不包含广泛基础设施运行时表面的狭义固定 dispatcher 辅助函数 | + | `plugin-sdk/ssrf-runtime` | 固定 dispatcher、受 SSRF 保护的 fetch 和 SSRF 策略辅助函数 | + | `plugin-sdk/secret-input` | secret 输入解析辅助函数 | + | `plugin-sdk/webhook-ingress` | Webhook 请求/目标辅助函数 | + | `plugin-sdk/webhook-request-guards` | 请求体大小/超时辅助函数 | - - | Subpath | 关键导出 | + + | 子路径 | 关键导出 | | --- | --- | - | `plugin-sdk/runtime` | 广泛的运行时/日志/备份/插件安装辅助工具 | - | `plugin-sdk/runtime-env` | 狭义的运行时环境、日志器、超时、重试和退避辅助工具 | - | `plugin-sdk/channel-runtime-context` | 通用渠道运行时上下文注册和查找辅助工具 | + | `plugin-sdk/runtime` | 广泛的运行时/日志/备份/插件安装辅助函数 | + | `plugin-sdk/runtime-env` | 狭义的运行时环境、logger、超时、重试和退避辅助函数 | + | `plugin-sdk/channel-runtime-context` | 通用渠道运行时上下文注册和查找辅助函数 | | `plugin-sdk/runtime-store` | `createPluginRuntimeStore` | - | `plugin-sdk/plugin-runtime` | 共享插件命令/hook/http/交互辅助工具 | - | `plugin-sdk/hook-runtime` | 共享 webhook/内部 hook 流水线辅助工具 | - | `plugin-sdk/lazy-runtime` | 延迟运行时导入/绑定辅助工具,例如 `createLazyRuntimeModule`、`createLazyRuntimeMethod` 和 `createLazyRuntimeSurface` | - | `plugin-sdk/process-runtime` | 进程 exec 辅助工具 | - | `plugin-sdk/cli-runtime` | CLI 格式化、等待和版本辅助工具 | - | `plugin-sdk/gateway-runtime` | Gateway 网关客户端和渠道状态补丁辅助工具 | - | `plugin-sdk/config-runtime` | 配置加载/写入辅助工具 | - | `plugin-sdk/telegram-command-config` | Telegram 命令名称/描述规范化以及重复/冲突检查,即使内置 Telegram 契约表面不可用也是如此 | - | `plugin-sdk/text-autolink-runtime` | 不带广泛 text-runtime barrel 的文件引用自动链接检测 | - | `plugin-sdk/approval-runtime` | exec/插件审批辅助工具、审批能力构建器、凭证/profile 辅助工具、原生路由/运行时辅助工具 | - | `plugin-sdk/reply-runtime` | 共享入站/回复运行时辅助工具、分块、分发、心跳、回复规划器 | - | `plugin-sdk/reply-dispatch-runtime` | 狭义回复分发/终结辅助工具 | - | `plugin-sdk/reply-history` | 共享短窗口回复历史辅助工具,例如 `buildHistoryContext`、`recordPendingHistoryEntry` 和 `clearHistoryEntriesIfEnabled` | + | `plugin-sdk/plugin-runtime` | 共享插件命令/hook/http/交互辅助函数 | + | `plugin-sdk/hook-runtime` | 共享 webhook/内部 hook 管道辅助函数 | + | `plugin-sdk/lazy-runtime` | 惰性运行时导入/绑定辅助函数,例如 `createLazyRuntimeModule`、`createLazyRuntimeMethod` 和 `createLazyRuntimeSurface` | + | `plugin-sdk/process-runtime` | 进程 exec 辅助函数 | + | `plugin-sdk/cli-runtime` | CLI 格式化、等待和版本辅助函数 | + | `plugin-sdk/gateway-runtime` | Gateway 网关客户端和渠道状态补丁辅助函数 | + | `plugin-sdk/config-runtime` | 配置加载/写入辅助函数和插件配置查找辅助函数 | + | `plugin-sdk/telegram-command-config` | Telegram 命令名称/描述规范化,以及重复/冲突检查,即使内置的 Telegram 契约表面不可用时也可使用 | + | `plugin-sdk/text-autolink-runtime` | 不依赖广泛 `text-runtime` barrel 的文件引用自动链接检测 | + | `plugin-sdk/approval-runtime` | exec/插件审批辅助函数、审批能力构建器、认证/profile 辅助函数、原生路由/运行时辅助函数 | + | `plugin-sdk/reply-runtime` | 共享入站/回复运行时辅助函数、分块、分发、心跳、回复规划器 | + | `plugin-sdk/reply-dispatch-runtime` | 狭义的回复分发/最终化辅助函数 | + | `plugin-sdk/reply-history` | 共享的短窗口回复历史辅助函数,例如 `buildHistoryContext`、`recordPendingHistoryEntry` 和 `clearHistoryEntriesIfEnabled` | | `plugin-sdk/reply-reference` | `createReplyReferencePlanner` | - | `plugin-sdk/reply-chunking` | 狭义文本/Markdown 分块辅助工具 | - | `plugin-sdk/session-store-runtime` | 会话存储路径 + updated-at 辅助工具 | - | `plugin-sdk/state-paths` | 状态/OAuth 目录路径辅助工具 | - | `plugin-sdk/routing` | 路由/会话键/账户绑定辅助工具,例如 `resolveAgentRoute`、`buildAgentSessionKey` 和 `resolveDefaultAgentBoundAccountId` | - | `plugin-sdk/status-helpers` | 共享渠道/账户状态摘要辅助工具、运行时状态默认值和问题元数据辅助工具 | - | `plugin-sdk/target-resolver-runtime` | 共享目标解析器辅助工具 | - | `plugin-sdk/string-normalization-runtime` | slug/字符串规范化辅助工具 | + | `plugin-sdk/reply-chunking` | 狭义的文本/Markdown 分块辅助函数 | + | `plugin-sdk/session-store-runtime` | 会话存储路径 + `updated-at` 辅助函数 | + | `plugin-sdk/state-paths` | 状态/OAuth 目录路径辅助函数 | + | `plugin-sdk/routing` | 路由/会话键/账户绑定辅助函数,例如 `resolveAgentRoute`、`buildAgentSessionKey` 和 `resolveDefaultAgentBoundAccountId` | + | `plugin-sdk/status-helpers` | 共享渠道/账户状态摘要辅助函数、运行时状态默认值和问题元数据辅助函数 | + | `plugin-sdk/target-resolver-runtime` | 共享目标解析器辅助函数 | + | `plugin-sdk/string-normalization-runtime` | slug/字符串规范化辅助函数 | | `plugin-sdk/request-url` | 从类似 fetch/request 的输入中提取字符串 URL | - | `plugin-sdk/run-command` | 带计时的命令运行器,提供规范化的 stdout/stderr 结果 | + | `plugin-sdk/run-command` | 带计时功能的命令运行器,返回规范化的 stdout/stderr 结果 | | `plugin-sdk/param-readers` | 通用工具/CLI 参数读取器 | | `plugin-sdk/tool-payload` | 从工具结果对象中提取规范化负载 | - | `plugin-sdk/tool-send` | 从工具参数中提取规范发送目标字段 | - | `plugin-sdk/temp-path` | 共享临时下载路径辅助工具 | - | `plugin-sdk/logging-core` | 子系统日志器和脱敏辅助工具 | - | `plugin-sdk/markdown-table-runtime` | Markdown 表格模式辅助工具 | - | `plugin-sdk/json-store` | 小型 JSON 状态读写辅助工具 | - | `plugin-sdk/file-lock` | 可重入文件锁辅助工具 | - | `plugin-sdk/persistent-dedupe` | 磁盘支持的去重缓存辅助工具 | - | `plugin-sdk/acp-runtime` | ACP 运行时/会话和回复分发辅助工具 | - | `plugin-sdk/acp-binding-resolve-runtime` | 不带生命周期启动导入的只读 ACP 绑定解析 | - | `plugin-sdk/agent-config-primitives` | 狭义智能体运行时配置 schema 基元 | + | `plugin-sdk/tool-send` | 从工具参数中提取规范化发送目标字段 | + | `plugin-sdk/temp-path` | 共享临时下载路径辅助函数 | + | `plugin-sdk/logging-core` | 子系统 logger 和脱敏辅助函数 | + | `plugin-sdk/markdown-table-runtime` | Markdown 表格模式辅助函数 | + | `plugin-sdk/json-store` | 小型 JSON 状态读写辅助函数 | + | `plugin-sdk/file-lock` | 可重入文件锁辅助函数 | + | `plugin-sdk/persistent-dedupe` | 磁盘支持的去重缓存辅助函数 | + | `plugin-sdk/acp-runtime` | ACP 运行时/会话和回复分发辅助函数 | + | `plugin-sdk/acp-binding-resolve-runtime` | 不包含生命周期启动导入的只读 ACP 绑定解析 | + | `plugin-sdk/agent-config-primitives` | 狭义的智能体运行时配置 schema 基元 | | `plugin-sdk/boolean-param` | 宽松布尔参数读取器 | - | `plugin-sdk/dangerous-name-runtime` | 危险名称匹配解析辅助工具 | - | `plugin-sdk/device-bootstrap` | 设备引导和配对令牌辅助工具 | - | `plugin-sdk/extension-shared` | 共享被动渠道、状态和环境代理辅助基元 | - | `plugin-sdk/models-provider-runtime` | `/models` 命令/提供商回复辅助工具 | - | `plugin-sdk/skill-commands-runtime` | Skill 命令列表辅助工具 | - | `plugin-sdk/native-command-registry` | 原生命令注册表/构建/序列化辅助工具 | - | `plugin-sdk/agent-harness` | 面向可信插件的实验性低层智能体 harness 表面:harness 类型、活动运行 steer/abort 辅助工具、OpenClaw 工具桥接辅助工具和 attempt 结果实用工具 | - | `plugin-sdk/provider-zai-endpoint` | Z.A.I 端点检测辅助工具 | - | `plugin-sdk/infra-runtime` | 系统事件/心跳辅助工具 | - | `plugin-sdk/collection-runtime` | 小型有界缓存辅助工具 | - | `plugin-sdk/diagnostic-runtime` | 诊断标志和事件辅助工具 | - | `plugin-sdk/error-runtime` | 错误图、格式化、共享错误分类辅助工具、`isApprovalNotFoundError` | - | `plugin-sdk/fetch-runtime` | 包装的 fetch、代理和固定查找辅助工具 | - | `plugin-sdk/runtime-fetch` | 带 dispatcher 感知的运行时 fetch,不包含 proxy/guarded-fetch 导入 | - | `plugin-sdk/response-limit-runtime` | 不带广泛 media-runtime 表面的有界响应体读取器 | - | `plugin-sdk/session-binding-runtime` | 当前对话绑定状态,不包含已配置绑定路由或配对存储 | - | `plugin-sdk/session-store-runtime` | 不带广泛配置写入/维护导入的会话存储读取辅助工具 | - | `plugin-sdk/context-visibility-runtime` | 上下文可见性解析和补充上下文过滤,不包含广泛配置/安全导入 | - | `plugin-sdk/string-coerce-runtime` | 不包含 Markdown/日志导入的狭义基本类型记录/字符串强制转换和规范化辅助工具 | - | `plugin-sdk/host-runtime` | 主机名和 SCP 主机规范化辅助工具 | - | `plugin-sdk/retry-runtime` | 重试配置和重试运行器辅助工具 | - | `plugin-sdk/agent-runtime` | 智能体目录/身份/工作区辅助工具 | - | `plugin-sdk/directory-runtime` | 由配置支持的目录查询/去重 | + | `plugin-sdk/dangerous-name-runtime` | 危险名称匹配解析辅助函数 | + | `plugin-sdk/device-bootstrap` | 设备引导和配对令牌辅助函数 | + | `plugin-sdk/extension-shared` | 共享的被动渠道、状态和环境代理辅助基元 | + | `plugin-sdk/models-provider-runtime` | `/models` 命令/提供商回复辅助函数 | + | `plugin-sdk/skill-commands-runtime` | Skill 命令列表辅助函数 | + | `plugin-sdk/native-command-registry` | 原生命令注册表/构建/序列化辅助函数 | + | `plugin-sdk/agent-harness` | 面向受信任插件的实验性低层智能体 harness 表面:harness 类型、活动运行 steer/abort 辅助函数、OpenClaw 工具桥接辅助函数和尝试结果工具函数 | + | `plugin-sdk/provider-zai-endpoint` | Z.A.I 端点检测辅助函数 | + | `plugin-sdk/infra-runtime` | 系统事件/心跳辅助函数 | + | `plugin-sdk/collection-runtime` | 小型有界缓存辅助函数 | + | `plugin-sdk/diagnostic-runtime` | 诊断标志和事件辅助函数 | + | `plugin-sdk/error-runtime` | 错误图、格式化、共享错误分类辅助函数、`isApprovalNotFoundError` | + | `plugin-sdk/fetch-runtime` | 包装的 fetch、代理和固定查找辅助函数 | + | `plugin-sdk/runtime-fetch` | 不包含 proxy/guarded-fetch 导入的、感知 dispatcher 的运行时 fetch | + | `plugin-sdk/response-limit-runtime` | 不依赖广泛媒体运行时表面的有界响应体读取器 | + | `plugin-sdk/session-binding-runtime` | 当前会话绑定状态,不包含已配置绑定路由或配对存储 | + | `plugin-sdk/session-store-runtime` | 不包含广泛配置写入/维护导入的会话存储读取辅助函数 | + | `plugin-sdk/context-visibility-runtime` | 不包含广泛配置/安全导入的上下文可见性解析和补充上下文过滤 | + | `plugin-sdk/string-coerce-runtime` | 不依赖 markdown/logging 导入的狭义基元记录/字符串强制转换和规范化辅助函数 | + | `plugin-sdk/host-runtime` | 主机名和 SCP 主机规范化辅助函数 | + | `plugin-sdk/retry-runtime` | 重试配置和重试运行器辅助函数 | + | `plugin-sdk/agent-runtime` | 智能体目录/身份/workspace 辅助函数 | + | `plugin-sdk/directory-runtime` | 基于配置的目录查询/去重 | | `plugin-sdk/keyed-async-queue` | `KeyedAsyncQueue` | - - | Subpath | 关键导出 | + + | 子路径 | 关键导出 | | --- | --- | - | `plugin-sdk/media-runtime` | 共享媒体获取/转换/存储辅助工具,以及媒体负载构建器 | - | `plugin-sdk/media-generation-runtime` | 共享媒体生成故障切换辅助工具、候选项选择和缺失模型消息 | - | `plugin-sdk/media-understanding` | 媒体理解提供商类型,以及面向提供商的图像/音频辅助工具导出 | - | `plugin-sdk/text-runtime` | 共享文本/Markdown/日志辅助工具,例如面向 assistant 可见文本剥离、Markdown 渲染/分块/表格辅助工具、脱敏辅助工具、directive-tag 辅助工具和安全文本实用工具 | - | `plugin-sdk/text-chunking` | 出站文本分块辅助工具 | - | `plugin-sdk/speech` | 语音提供商类型,以及面向提供商的 directive、注册表和验证辅助工具 | - | `plugin-sdk/speech-core` | 共享语音提供商类型、注册表、directive 和规范化辅助工具 | - | `plugin-sdk/realtime-transcription` | 实时转录提供商类型和注册表辅助工具 | - | `plugin-sdk/realtime-voice` | 实时语音提供商类型和注册表辅助工具 | + | `plugin-sdk/media-runtime` | 共享媒体获取/转换/存储辅助函数,以及媒体负载构建器 | + | `plugin-sdk/media-generation-runtime` | 共享媒体生成故障转移辅助函数、候选项选择和缺失模型消息 | + | `plugin-sdk/media-understanding` | 媒体理解提供商类型,以及面向提供商的图像/音频辅助导出 | + | `plugin-sdk/text-runtime` | 共享文本/Markdown/日志辅助函数,例如面向 assistant 可见文本剥离、Markdown 渲染/分块/表格辅助函数、脱敏辅助函数、directive-tag 辅助函数和安全文本工具函数 | + | `plugin-sdk/text-chunking` | 出站文本分块辅助函数 | + | `plugin-sdk/speech` | 语音提供商类型,以及面向提供商的 directive、注册表和校验辅助函数 | + | `plugin-sdk/speech-core` | 共享语音提供商类型、注册表、directive 和规范化辅助函数 | + | `plugin-sdk/realtime-transcription` | 实时转录提供商类型和注册表辅助函数 | + | `plugin-sdk/realtime-voice` | 实时语音提供商类型和注册表辅助函数 | | `plugin-sdk/image-generation` | 图像生成提供商类型 | - | `plugin-sdk/image-generation-core` | 共享图像生成类型、故障切换、凭证和注册表辅助工具 | + | `plugin-sdk/image-generation-core` | 共享图像生成类型、故障转移、认证和注册表辅助函数 | | `plugin-sdk/music-generation` | 音乐生成提供商/请求/结果类型 | - | `plugin-sdk/music-generation-core` | 共享音乐生成类型、故障切换辅助工具、提供商查找和 model-ref 解析 | + | `plugin-sdk/music-generation-core` | 共享音乐生成类型、故障转移辅助函数、提供商查找和 model-ref 解析 | | `plugin-sdk/video-generation` | 视频生成提供商/请求/结果类型 | - | `plugin-sdk/video-generation-core` | 共享视频生成类型、故障切换辅助工具、提供商查找和 model-ref 解析 | - | `plugin-sdk/webhook-targets` | webhook 目标注册表和路由安装辅助工具 | - | `plugin-sdk/webhook-path` | webhook 路径规范化辅助工具 | - | `plugin-sdk/web-media` | 共享远程/本地媒体加载辅助工具 | + | `plugin-sdk/video-generation-core` | 共享视频生成类型、故障转移辅助函数、提供商查找和 model-ref 解析 | + | `plugin-sdk/webhook-targets` | Webhook 目标注册表和路由安装辅助函数 | + | `plugin-sdk/webhook-path` | Webhook 路径规范化辅助函数 | + | `plugin-sdk/web-media` | 共享远程/本地媒体加载辅助函数 | | `plugin-sdk/zod` | 为插件 SDK 使用者重新导出的 `zod` | | `plugin-sdk/testing` | `installCommonResolveTargetErrorCases`、`shouldAckReaction` | - | Subpath | 关键导出 | + | 子路径 | 关键导出 | | --- | --- | - | `plugin-sdk/memory-core` | 用于 manager/config/file/CLI 辅助工具的内置 memory-core 辅助表面 | - | `plugin-sdk/memory-core-engine-runtime` | Memory 索引/搜索运行时门面 | - | `plugin-sdk/memory-core-host-engine-foundation` | Memory host foundation engine 导出 | - | `plugin-sdk/memory-core-host-engine-embeddings` | Memory host embedding 契约、注册表访问、本地提供商,以及通用批处理/远程辅助工具 | - | `plugin-sdk/memory-core-host-engine-qmd` | Memory host QMD engine 导出 | - | `plugin-sdk/memory-core-host-engine-storage` | Memory host storage engine 导出 | - | `plugin-sdk/memory-core-host-multimodal` | Memory host 多模态辅助工具 | - | `plugin-sdk/memory-core-host-query` | Memory host 查询辅助工具 | - | `plugin-sdk/memory-core-host-secret` | Memory host secret 辅助工具 | - | `plugin-sdk/memory-core-host-events` | Memory host 事件日志辅助工具 | - | `plugin-sdk/memory-core-host-status` | Memory host 状态辅助工具 | - | `plugin-sdk/memory-core-host-runtime-cli` | Memory host CLI 运行时辅助工具 | - | `plugin-sdk/memory-core-host-runtime-core` | Memory host 核心运行时辅助工具 | - | `plugin-sdk/memory-core-host-runtime-files` | Memory host 文件/运行时辅助工具 | - | `plugin-sdk/memory-host-core` | 面向供应商中立的 memory host 核心运行时辅助工具别名 | - | `plugin-sdk/memory-host-events` | 面向供应商中立的 memory host 事件日志辅助工具别名 | - | `plugin-sdk/memory-host-files` | 面向供应商中立的 memory host 文件/运行时辅助工具别名 | - | `plugin-sdk/memory-host-markdown` | 用于 memory 邻近插件的共享托管 Markdown 辅助工具 | - | `plugin-sdk/memory-host-search` | 用于 search-manager 访问的活跃 memory 运行时门面 | - | `plugin-sdk/memory-host-status` | 面向供应商中立的 memory host 状态辅助工具别名 | - | `plugin-sdk/memory-lancedb` | 内置 memory-lancedb 辅助表面 | + | `plugin-sdk/memory-core` | 内置 `memory-core` 辅助接口,用于 manager/config/file/CLI 辅助函数 | + | `plugin-sdk/memory-core-engine-runtime` | Memory 索引/搜索运行时外观 | + | `plugin-sdk/memory-core-host-engine-foundation` | Memory 主机基础引擎导出 | + | `plugin-sdk/memory-core-host-engine-embeddings` | Memory 主机嵌入契约、注册表访问、本地提供商,以及通用批处理/远程辅助函数 | + | `plugin-sdk/memory-core-host-engine-qmd` | Memory 主机 QMD 引擎导出 | + | `plugin-sdk/memory-core-host-engine-storage` | Memory 主机存储引擎导出 | + | `plugin-sdk/memory-core-host-multimodal` | Memory 主机多模态辅助函数 | + | `plugin-sdk/memory-core-host-query` | Memory 主机查询辅助函数 | + | `plugin-sdk/memory-core-host-secret` | Memory 主机 secret 辅助函数 | + | `plugin-sdk/memory-core-host-events` | Memory 主机事件日志辅助函数 | + | `plugin-sdk/memory-core-host-status` | Memory 主机状态辅助函数 | + | `plugin-sdk/memory-core-host-runtime-cli` | Memory 主机 CLI 运行时辅助函数 | + | `plugin-sdk/memory-core-host-runtime-core` | Memory 主机核心运行时辅助函数 | + | `plugin-sdk/memory-core-host-runtime-files` | Memory 主机文件/运行时辅助函数 | + | `plugin-sdk/memory-host-core` | 面向供应商中立的 Memory 主机核心运行时辅助函数别名 | + | `plugin-sdk/memory-host-events` | 面向供应商中立的 Memory 主机事件日志辅助函数别名 | + | `plugin-sdk/memory-host-files` | 面向供应商中立的 Memory 主机文件/运行时辅助函数别名 | + | `plugin-sdk/memory-host-markdown` | 面向 memory 邻接插件的共享托管 Markdown 辅助函数 | + | `plugin-sdk/memory-host-search` | 用于搜索管理器访问的活动 Memory 运行时外观 | + | `plugin-sdk/memory-host-status` | 面向供应商中立的 Memory 主机状态辅助函数别名 | + | `plugin-sdk/memory-lancedb` | 内置 `memory-lancedb` 辅助接口 | - | Family | 当前子路径 | 预期用途 | + | 家族 | 当前子路径 | 预期用途 | | --- | --- | --- | - | Browser | `plugin-sdk/browser-cdp`, `plugin-sdk/browser-config-runtime`, `plugin-sdk/browser-config-support`, `plugin-sdk/browser-control-auth`, `plugin-sdk/browser-node-runtime`, `plugin-sdk/browser-profiles`, `plugin-sdk/browser-security-runtime`, `plugin-sdk/browser-setup-tools`, `plugin-sdk/browser-support` | 内置浏览器插件支持辅助工具(`browser-support` 仍是兼容性 barrel) | + | Browser | `plugin-sdk/browser-cdp`, `plugin-sdk/browser-config-runtime`, `plugin-sdk/browser-config-support`, `plugin-sdk/browser-control-auth`, `plugin-sdk/browser-node-runtime`, `plugin-sdk/browser-profiles`, `plugin-sdk/browser-security-runtime`, `plugin-sdk/browser-setup-tools`, `plugin-sdk/browser-support` | 内置浏览器插件支持辅助函数(`browser-support` 仍然是兼容性 barrel) | | Matrix | `plugin-sdk/matrix`, `plugin-sdk/matrix-helper`, `plugin-sdk/matrix-runtime-heavy`, `plugin-sdk/matrix-runtime-shared`, `plugin-sdk/matrix-runtime-surface`, `plugin-sdk/matrix-surface`, `plugin-sdk/matrix-thread-bindings` | 内置 Matrix 辅助/运行时表面 | | Line | `plugin-sdk/line`, `plugin-sdk/line-core`, `plugin-sdk/line-runtime`, `plugin-sdk/line-surface` | 内置 LINE 辅助/运行时表面 | | IRC | `plugin-sdk/irc`, `plugin-sdk/irc-surface` | 内置 IRC 辅助表面 | - | 特定于渠道的辅助工具 | `plugin-sdk/googlechat`, `plugin-sdk/zalouser`, `plugin-sdk/bluebubbles`, `plugin-sdk/bluebubbles-policy`, `plugin-sdk/mattermost`, `plugin-sdk/mattermost-policy`, `plugin-sdk/feishu-conversation`, `plugin-sdk/msteams`, `plugin-sdk/nextcloud-talk`, `plugin-sdk/nostr`, `plugin-sdk/tlon`, `plugin-sdk/twitch` | 内置渠道兼容性/辅助工具接缝 | - | 凭证/特定于插件的辅助工具 | `plugin-sdk/github-copilot-login`, `plugin-sdk/github-copilot-token`, `plugin-sdk/diagnostics-otel`, `plugin-sdk/diffs`, `plugin-sdk/llm-task`, `plugin-sdk/thread-ownership`, `plugin-sdk/voice-call` | 内置功能/插件辅助工具接缝;`plugin-sdk/github-copilot-token` 当前导出 `DEFAULT_COPILOT_API_BASE_URL`、`deriveCopilotApiBaseUrlFromToken` 和 `resolveCopilotApiToken` | + | 渠道特定辅助函数 | `plugin-sdk/googlechat`, `plugin-sdk/zalouser`, `plugin-sdk/bluebubbles`, `plugin-sdk/bluebubbles-policy`, `plugin-sdk/mattermost`, `plugin-sdk/mattermost-policy`, `plugin-sdk/feishu-conversation`, `plugin-sdk/msteams`, `plugin-sdk/nextcloud-talk`, `plugin-sdk/nostr`, `plugin-sdk/tlon`, `plugin-sdk/twitch` | 内置渠道兼容性/辅助接口 | + | 认证/插件特定辅助函数 | `plugin-sdk/github-copilot-login`, `plugin-sdk/github-copilot-token`, `plugin-sdk/diagnostics-otel`, `plugin-sdk/diffs`, `plugin-sdk/llm-task`, `plugin-sdk/thread-ownership`, `plugin-sdk/voice-call` | 内置功能/插件辅助接口;`plugin-sdk/github-copilot-token` 当前导出 `DEFAULT_COPILOT_API_BASE_URL`、`deriveCopilotApiBaseUrlFromToken` 和 `resolveCopilotApiToken` | ## 注册 API -`register(api)` 回调会收到一个 `OpenClawPluginApi` 对象,它具有以下方法: +`register(api)` 回调会接收一个带有以下方法的 `OpenClawPluginApi` 对象: ### 能力注册 -| Method | 注册内容 | -| ------------------------------------------------ | -------- | +| 方法 | 注册内容 | +| ------------------------------------------------ | ------------------------------------- | | `api.registerProvider(...)` | 文本推理(LLM) | -| `api.registerAgentHarness(...)` | 实验性的低层智能体执行器 | +| `api.registerAgentHarness(...)` | 实验性的底层智能体执行器 | | `api.registerCliBackend(...)` | 本地 CLI 推理后端 | | `api.registerChannel(...)` | 消息渠道 | | `api.registerSpeechProvider(...)` | 文本转语音 / STT 合成 | @@ -321,39 +321,39 @@ import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core"; | `api.registerWebFetchProvider(...)` | Web 抓取 / scrape 提供商 | | `api.registerWebSearchProvider(...)` | Web 搜索 | -### 工具和命令 +### 工具与命令 -| Method | 注册内容 | -| ------------------------------- | -------- | +| 方法 | 注册内容 | +| ------------------------------- | --------------------------------------------- | | `api.registerTool(tool, opts?)` | 智能体工具(必需,或 `{ optional: true }`) | | `api.registerCommand(def)` | 自定义命令(绕过 LLM) | ### 基础设施 -| Method | 注册内容 | -| ----------------------------------------------- | -------- | +| 方法 | 注册内容 | +| ----------------------------------------------- | --------------------------------------- | | `api.registerHook(events, handler, opts?)` | 事件 hook | | `api.registerHttpRoute(params)` | Gateway 网关 HTTP 端点 | | `api.registerGatewayMethod(name, handler)` | Gateway 网关 RPC 方法 | | `api.registerCli(registrar, opts?)` | CLI 子命令 | | `api.registerService(service)` | 后台服务 | | `api.registerInteractiveHandler(registration)` | 交互处理器 | -| `api.registerEmbeddedExtensionFactory(factory)` | Pi 嵌入式运行器扩展工厂 | -| `api.registerMemoryPromptSupplement(builder)` | 额外的 memory 邻近提示词区段 | -| `api.registerMemoryCorpusSupplement(adapter)` | 额外的 memory 搜索/读取语料库 | +| `api.registerEmbeddedExtensionFactory(factory)` | Pi 内嵌运行器扩展工厂 | +| `api.registerMemoryPromptSupplement(builder)` | 追加式 Memory 邻接提示部分 | +| `api.registerMemoryCorpusSupplement(adapter)` | 追加式 Memory 搜索/读取语料库 | -保留的核心管理命名空间(`config.*`、`exec.approvals.*`、`wizard.*`、`update.*`)始终保持为 `operator.admin`,即使插件尝试分配更窄的 Gateway 网关方法作用域也是如此。对于插件自有方法,优先使用插件专属前缀。 +保留的核心管理命名空间(`config.*`、`exec.approvals.*`、`wizard.*`、`update.*`)始终保持为 `operator.admin`,即使插件尝试分配更窄的 Gateway 网关方法作用域也是如此。对于插件自有方法,优先使用插件特定前缀。 -当插件在 OpenClaw 嵌入式运行期间需要 Pi 原生事件时序时,请使用 `api.registerEmbeddedExtensionFactory(...)`,例如必须在最终工具结果消息发出前发生的异步 `tool_result` 重写。这目前是一个内置插件接缝:只有内置插件可以注册它,并且它们必须在 `openclaw.plugin.json` 中声明 `contracts.embeddedExtensionFactories: ["pi"]`。对于不需要该更底层接缝的所有情况,请继续使用普通的 OpenClaw 插件 hook。 +当插件在 OpenClaw 内嵌运行期间需要 Pi 原生事件时序时,请使用 `api.registerEmbeddedExtensionFactory(...)`,例如必须在最终工具结果消息发出之前完成的异步 `tool_result` 重写。这个接口当前是一个内置插件接口:只有内置插件可以注册,并且它们必须在 `openclaw.plugin.json` 中声明 `contracts.embeddedExtensionFactories: ["pi"]`。对于不需要这种更底层接口的场景,保持使用普通的 OpenClaw 插件 hooks。 ### CLI 注册元数据 `api.registerCli(registrar, opts?)` 接受两类顶层元数据: -- `commands`:由 registrar 拥有的显式命令根 -- `descriptors`:用于根 CLI 帮助、路由和延迟插件 CLI 注册的解析时命令描述符 +- `commands`:由注册器拥有的显式命令根 +- `descriptors`:用于根 CLI 帮助、路由和惰性插件 CLI 注册的解析时命令描述符 -如果你希望插件命令在常规根 CLI 路径中保持延迟加载,请提供覆盖该 registrar 暴露的每个顶层命令根的 `descriptors`。 +如果你希望插件命令在普通根 CLI 路径中保持惰性加载,请提供覆盖该注册器暴露的每个顶层命令根的 `descriptors`。 ```typescript api.registerCli( @@ -373,7 +373,7 @@ api.registerCli( ); ``` -仅在你不需要延迟根 CLI 注册时才单独使用 `commands`。这种预加载兼容路径仍受支持,但它不会安装由 descriptor 支持的占位符来进行解析时延迟加载。 +仅当你不需要惰性根 CLI 注册时,才单独使用 `commands`。这种急切兼容路径仍然受支持,但它不会安装基于 descriptor 的占位符来进行解析时惰性加载。 ### CLI 后端注册 @@ -381,107 +381,107 @@ api.registerCli( - 后端 `id` 会成为模型引用中的提供商前缀,例如 `codex-cli/gpt-5`。 - 后端 `config` 使用与 `agents.defaults.cliBackends.` 相同的结构。 -- 用户配置仍然优先。OpenClaw 会在运行 CLI 前,将 `agents.defaults.cliBackends.` 合并到插件默认值之上。 -- 当后端在合并后需要兼容性重写时,请使用 `normalizeConfig`(例如规范化旧的 flag 结构)。 +- 用户配置仍然优先。OpenClaw 会先将 `agents.defaults.cliBackends.` 合并到插件默认值之上,然后再运行 CLI。 +- 当后端在合并后需要兼容性重写时,使用 `normalizeConfig`(例如规范化旧的 flag 结构)。 ### 独占槽位 -| Method | 注册内容 | -| ------------------------------------------ | -------- | -| `api.registerContextEngine(id, factory)` | 上下文引擎(一次仅一个处于激活状态)。`assemble()` 回调会接收 `availableTools` 和 `citationsMode`,因此引擎可以按需调整提示词附加内容。 | +| 方法 | 注册内容 | +| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `api.registerContextEngine(id, factory)` | 上下文引擎(同一时间仅一个处于活动状态)。`assemble()` 回调会接收 `availableTools` 和 `citationsMode`,以便引擎能够定制提示补充内容。 | | `api.registerMemoryCapability(capability)` | 统一 Memory 能力 | -| `api.registerMemoryPromptSection(builder)` | Memory 提示词区段构建器 | +| `api.registerMemoryPromptSection(builder)` | Memory 提示部分构建器 | | `api.registerMemoryFlushPlan(resolver)` | Memory flush 计划解析器 | | `api.registerMemoryRuntime(runtime)` | Memory 运行时适配器 | -### Memory embedding 适配器 +### Memory 嵌入适配器 -| Method | 注册内容 | -| ---------------------------------------------- | -------- | -| `api.registerMemoryEmbeddingProvider(adapter)` | 当前活跃插件的 Memory embedding 适配器 | +| 方法 | 注册内容 | +| ---------------------------------------------- | ---------------------------------------------- | +| `api.registerMemoryEmbeddingProvider(adapter)` | 活动插件的 Memory 嵌入适配器 | -- `registerMemoryCapability` 是首选的独占 memory 插件 API。 -- `registerMemoryCapability` 也可以公开 `publicArtifacts.listArtifacts(...)`,这样配套插件就可以通过 `openclaw/plugin-sdk/memory-host-core` 使用导出的 memory artifacts,而不必深入某个特定 memory 插件的私有布局。 -- `registerMemoryPromptSection`、`registerMemoryFlushPlan` 和 `registerMemoryRuntime` 是兼容旧版的独占 memory 插件 API。 -- `registerMemoryEmbeddingProvider` 允许当前活跃的 memory 插件注册一个或多个 embedding 适配器 ID(例如 `openai`、`gemini` 或插件自定义的 ID)。 -- `agents.defaults.memorySearch.provider` 和 `agents.defaults.memorySearch.fallback` 等用户配置会针对这些已注册的适配器 ID 进行解析。 +- `registerMemoryCapability` 是首选的独占 Memory 插件 API。 +- `registerMemoryCapability` 也可以暴露 `publicArtifacts.listArtifacts(...)`,这样配套插件就可以通过 `openclaw/plugin-sdk/memory-host-core` 使用导出的 Memory 工件,而无需深入访问特定 Memory 插件的私有布局。 +- `registerMemoryPromptSection`、`registerMemoryFlushPlan` 和 `registerMemoryRuntime` 是兼容旧版的独占 Memory 插件 API。 +- `registerMemoryEmbeddingProvider` 允许活动 Memory 插件注册一个或多个嵌入适配器 id(例如 `openai`、`gemini` 或插件自定义 id)。 +- 用户配置(例如 `agents.defaults.memorySearch.provider` 和 `agents.defaults.memorySearch.fallback`)会针对这些已注册的适配器 id 进行解析。 -### 事件和生命周期 +### 事件与生命周期 -| Method | 作用 | -| -------------------------------------------- | ---- | +| 方法 | 作用 | +| -------------------------------------------- | ----------------------------- | | `api.on(hookName, handler, opts?)` | 类型化生命周期 hook | -| `api.onConversationBindingResolved(handler)` | 对话绑定回调 | +| `api.onConversationBindingResolved(handler)` | 会话绑定回调 | ### Hook 决策语义 -- `before_tool_call`:返回 `{ block: true }` 是终结性的。一旦任意处理器设置它,就会跳过更低优先级的处理器。 -- `before_tool_call`:返回 `{ block: false }` 会被视为未作决定(与省略 `block` 相同),而不是覆盖。 -- `before_install`:返回 `{ block: true }` 是终结性的。一旦任意处理器设置它,就会跳过更低优先级的处理器。 -- `before_install`:返回 `{ block: false }` 会被视为未作决定(与省略 `block` 相同),而不是覆盖。 -- `reply_dispatch`:返回 `{ handled: true, ... }` 是终结性的。一旦任意处理器声明已处理分发,就会跳过更低优先级的处理器以及默认模型分发路径。 -- `message_sending`:返回 `{ cancel: true }` 是终结性的。一旦任意处理器设置它,就会跳过更低优先级的处理器。 -- `message_sending`:返回 `{ cancel: false }` 会被视为未作决定(与省略 `cancel` 相同),而不是覆盖。 -- `message_received`:当你需要入站线程/主题路由时,请使用类型化的 `threadId` 字段。将 `metadata` 保留给特定于渠道的额外信息。 -- `message_sending`:在回退到特定于渠道的 `metadata` 之前,优先使用类型化的 `replyToId` / `threadId` 路由字段。 -- `gateway_start`:使用 `ctx.config`、`ctx.workspaceDir` 和 `ctx.getCron?.()` 处理 Gateway 网关自有的启动状态,而不要依赖内部的 `gateway:startup` hook。 +- `before_tool_call`:返回 `{ block: true }` 为终止性决定。一旦任一处理器设置该值,就会跳过优先级更低的处理器。 +- `before_tool_call`:返回 `{ block: false }` 会被视为未作决定(与省略 `block` 相同),而不是覆盖已有决定。 +- `before_install`:返回 `{ block: true }` 为终止性决定。一旦任一处理器设置该值,就会跳过优先级更低的处理器。 +- `before_install`:返回 `{ block: false }` 会被视为未作决定(与省略 `block` 相同),而不是覆盖已有决定。 +- `reply_dispatch`:返回 `{ handled: true, ... }` 为终止性决定。一旦任一处理器认领分发,优先级更低的处理器以及默认模型分发路径都会被跳过。 +- `message_sending`:返回 `{ cancel: true }` 为终止性决定。一旦任一处理器设置该值,就会跳过优先级更低的处理器。 +- `message_sending`:返回 `{ cancel: false }` 会被视为未作决定(与省略 `cancel` 相同),而不是覆盖已有决定。 +- `message_received`:当你需要入站线程/话题路由时,请使用类型化的 `threadId` 字段。将 `metadata` 保留给渠道特定的额外信息。 +- `message_sending`:在回退到渠道特定 `metadata` 之前,先使用类型化的 `replyToId` / `threadId` 路由字段。 +- `gateway_start`:对于 Gateway 网关拥有的启动状态,请使用 `ctx.config`、`ctx.workspaceDir` 和 `ctx.getCron?.()`,而不要依赖内部 `gateway:startup` hooks。 ### API 对象字段 -| Field | Type | 描述 | -| ------------------------ | ------------------------- | ---- | -| `api.id` | `string` | 插件 ID | +| 字段 | 类型 | 描述 | +| ------------------------ | ------------------------- | ------------------------------------------------------------------------------------------- | +| `api.id` | `string` | 插件 id | | `api.name` | `string` | 显示名称 | | `api.version` | `string?` | 插件版本(可选) | | `api.description` | `string?` | 插件描述(可选) | -| `api.source` | `string` | 插件源码路径 | +| `api.source` | `string` | 插件源路径 | | `api.rootDir` | `string?` | 插件根目录(可选) | | `api.config` | `OpenClawConfig` | 当前配置快照(可用时为活动的内存中运行时快照) | -| `api.pluginConfig` | `Record` | 来自 `plugins.entries..config` 的插件专属配置 | -| `api.runtime` | `PluginRuntime` | [运行时辅助工具](/zh-CN/plugins/sdk-runtime) | -| `api.logger` | `PluginLogger` | 带作用域的日志器(`debug`、`info`、`warn`、`error`) | -| `api.registrationMode` | `PluginRegistrationMode` | 当前加载模式;`"setup-runtime"` 是完整入口启动/设置之前的轻量级窗口 | +| `api.pluginConfig` | `Record` | 来自 `plugins.entries..config` 的插件特定配置 | +| `api.runtime` | `PluginRuntime` | [运行时辅助函数](/zh-CN/plugins/sdk-runtime) | +| `api.logger` | `PluginLogger` | 有作用域的 logger(`debug`、`info`、`warn`、`error`) | +| `api.registrationMode` | `PluginRegistrationMode` | 当前加载模式;`"setup-runtime"` 是完整入口启动/设置之前的轻量预启动/设置窗口 | | `api.resolvePath(input)` | `(string) => string` | 解析相对于插件根目录的路径 | ## 内部模块约定 -在你的插件内部,请为内部导入使用本地 barrel 文件: +在你的插件内部,请使用本地 barrel 文件进行内部导入: ``` my-plugin/ - api.ts # 供外部使用者使用的公共导出 + api.ts # 面向外部使用者的公共导出 runtime-api.ts # 仅供内部使用的运行时导出 index.ts # 插件入口点 - setup-entry.ts # 仅用于轻量设置的入口点(可选) + setup-entry.ts # 仅用于轻量设置的入口(可选) ``` - 不要在生产代码中通过 `openclaw/plugin-sdk/` + 永远不要在生产代码中通过 `openclaw/plugin-sdk/` 导入你自己的插件。请通过 `./api.ts` 或 - `./runtime-api.ts` 进行内部导入。SDK 路径仅是外部契约。 + `./runtime-api.ts` 路由内部导入。SDK 路径仅是对外契约。 -当 OpenClaw 已经在运行时,采用门面加载的内置插件公共表面(`api.ts`、`runtime-api.ts`、`index.ts`、`setup-entry.ts` 以及类似的公共入口文件)现在会优先使用当前活动的运行时配置快照。如果运行时快照尚不存在,则会回退到磁盘上已解析的配置文件。 +由 facade 加载的内置插件公共表面(`api.ts`、`runtime-api.ts`、`index.ts`、`setup-entry.ts` 以及类似的公共入口文件)现在会在 OpenClaw 已运行时优先使用活动运行时配置快照。如果运行时快照尚不存在,则回退到磁盘上已解析的配置文件。 -如果某个辅助工具有意特定于某个提供商,并且暂时还不属于通用 SDK 子路径,那么提供商插件也可以公开一个狭义的插件本地契约 barrel。当前的内置示例:Anthropic 提供商将其 Claude 流辅助工具保留在自己的公共 `api.ts` / `contract-api.ts` 接缝中,而不是将 Anthropic beta-header 和 `service_tier` 逻辑提升到通用的 `plugin-sdk/*` 契约中。 +当某个辅助函数明确是提供商特定的、且尚不适合放入通用 SDK 子路径时,提供商插件也可以暴露一个狭义的插件本地契约 barrel。当前内置示例:Anthropic 提供商将其 Claude 流辅助函数保留在自己的公共 `api.ts` / `contract-api.ts` 接口中,而不是将 Anthropic beta-header 和 `service_tier` 逻辑提升到通用 `plugin-sdk/*` 契约中。 -其他当前的内置示例: +其他当前内置示例: -- `@openclaw/openai-provider`:`api.ts` 导出提供商构建器、默认模型辅助工具和实时提供商构建器 -- `@openclaw/openrouter-provider`:`api.ts` 导出提供商构建器以及新手引导/配置辅助工具 +- `@openclaw/openai-provider`:`api.ts` 导出提供商构建器、默认模型辅助函数和实时提供商构建器 +- `@openclaw/openrouter-provider`:`api.ts` 导出提供商构建器以及新手引导/配置辅助函数 - 扩展的生产代码也应避免导入 `openclaw/plugin-sdk/`。 - 如果某个辅助工具确实需要共享,请将其提升到中立的 SDK 子路径, + 扩展生产代码同样应避免导入 `openclaw/plugin-sdk/`。 + 如果某个辅助函数确实需要共享,请将其提升到中立的 SDK 子路径, 例如 `openclaw/plugin-sdk/speech`、`.../provider-model-shared` 或其他 - 面向能力的表面,而不是让两个插件彼此耦合。 + 面向能力的表面,而不是将两个插件耦合在一起。 ## 相关内容 - [入口点](/zh-CN/plugins/sdk-entrypoints) — `definePluginEntry` 和 `defineChannelPluginEntry` 选项 -- [运行时](/zh-CN/plugins/sdk-runtime) — 完整的 `api.runtime` 命名空间参考 -- [设置和配置](/zh-CN/plugins/sdk-setup) — 打包、清单、配置 schema +- [运行时辅助函数](/zh-CN/plugins/sdk-runtime) — 完整的 `api.runtime` 命名空间参考 +- [设置与配置](/zh-CN/plugins/sdk-setup) — 打包、清单、配置 schema - [测试](/zh-CN/plugins/sdk-testing) — 测试工具和 lint 规则 - [SDK 迁移](/zh-CN/plugins/sdk-migration) — 从已弃用表面迁移 - [插件内部机制](/zh-CN/plugins/architecture) — 深入架构和能力模型