Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WecomTeam/wecom-openclaw-plugin
/ functions
Functions
367 in github.com/WecomTeam/wecom-openclaw-plugin
⨍
Functions
367
◇
Types & classes
81
↓ 2 callers
Function
requireAgentId
(agent: ResolvedAgentAccount)
src/agent/api-client.ts:68
↓ 2 callers
Function
resolveCurrentAccountId
()
src/mcp/transport.ts:222
↓ 2 callers
Function
resolveInlineFileName
(input: unknown)
src/webhook/helpers.ts:485
↓ 2 callers
Function
resolveMediaFile
( mediaUrl: string, mediaLocalRoots?: readonly string[], )
src/media-uploader.ts:101
↓ 2 callers
Function
resolveStateDir
()
src/state-dir-resolve.ts:5
↓ 2 callers
Function
resolveWecomEgressProxyUrl
(cfg: OpenClawConfig)
src/utils.ts:154
↓ 2 callers
Function
resolveWecomMediaMaxBytes
(cfg: OpenClawConfig)
src/webhook/helpers.ts:242
↓ 2 callers
Function
resolveWecomTarget
(raw: string | undefined)
src/target.ts:37
↓ 2 callers
Function
safeCleanup
()
src/monitor.ts:525
↓ 2 callers
Function
sanitizeDynamicIdPart
(value: string)
src/dynamic-agent.ts:32
↓ 2 callers
Function
saveTemplateCardToCache
(params: { accountId: string; templateCard: TemplateCard; runtime: RuntimeEnv; })
src/template-card-manager.ts:63
↓ 2 callers
Function
startAgentForStream
(params: { target: WecomWebhookTarget; accountId: string; msg: WebhookInboundMessage; streamId: string
src/webhook/monitor.ts:350
↓ 2 callers
Function
stopMessageStateCleanup
()
src/state-manager.ts:118
↓ 2 callers
Function
stopWebhookGateway
(ctx: WebhookGatewayContext)
src/webhook/gateway.ts:190
↓ 2 callers
Method
store
* **store (存储回复地址)** * * 关联 streamId 与 response_url。
src/webhook/state.ts:428
↓ 2 callers
Function
uniquePaths
* 去除重复路径
src/webhook/gateway.ts:41
↓ 2 callers
Function
uploadAndSendMedia
( options: UploadAndSendMediaOptions, )
src/media-uploader.ts:355
↓ 2 callers
Function
uploadMedia
(params: { agent: ResolvedAgentAccount; type: "image" | "voice" | "video" | "file"; buffer: Buffer
src/agent/api-client.ts:199
↓ 2 callers
Function
uploadOnce
(fileContentType: string)
src/agent/api-client.ts:215
↓ 1 callers
Method
addAckStreamForBatch
* 将“回执流”(ack stream) 关联到某个“批次流”(batch stream)。 * 用于:当用户连发多条消息被合并排队时,让后续消息的 stream 最终也能更新为可理解的提示,而不是永久停留在“已合并排队…”。
src/webhook/state.ts:123
↓ 1 callers
Function
addWildcardAllowFrom
(allowFrom: string[])
src/openclaw-compat.ts:402
↓ 1 callers
Function
addWildcardAllowFromFallback
fallback 版 addWildcardAllowFrom:确保列表中包含 "*" 通配符
src/openclaw-compat.ts:386
↓ 1 callers
Method
afterCall
* 在 sendJsonRpc 返回后处理/变换结果(可选) * * 多个拦截器的 afterCall 按注册顺序管道式执行, * 前一个的返回值作为下一个的输入。
src/mcp/interceptors/types.ts:74
↓ 1 callers
Function
agentDmText
* 通过 Agent 私信发送文本(对齐 lh 版 sendAgentDmText) * * 对齐 lh 版:使用 core.channel.text.chunkText 进行文本分块。
src/webhook/monitor.ts:1298
↓ 1 callers
Function
allowCmd
(value: string)
src/shared/command-auth.ts:85
↓ 1 callers
Function
allowCmd
(value: string)
src/webhook/command-auth.ts:123
↓ 1 callers
Function
analyzeTextHeuristic
(buffer: Buffer)
src/agent/handler.ts:66
↓ 1 callers
Function
appendDmContent
(state: StreamState, text: string)
src/webhook/helpers.ts:80
↓ 1 callers
Function
applySelectedStateToTemplateCard
(params: { templateCard: TemplateCard; selectedMap: Map<string, string[]>; templateCardEvent?: TemplateC
src/template-card-manager.ts:113
↓ 1 callers
Function
assertLocalMediaAllowed
安全的本地文件路径校验,参考 weclaw/src/web/media.ts
src/openclaw-compat.ts:209
↓ 1 callers
Method
beforeCall
* 在 sendJsonRpc 调用前修改请求选项和参数(可选) * * 如 get_msg_media 需要延长超时时间, * 如 smartpage_create 需要从本地文件读取请求体替换 args。 * 返回的选项会与其他拦截器的结果合并(timeoutMs 取最大
src/mcp/interceptors/types.ts:66
↓ 1 callers
Function
buildAccountScopedDmSecurityPolicy
(params: { cfg: Record<string, unknown>; channelKey: string; accountId?: string | null; fallbackAccoun
src/openclaw-compat.ts:474
↓ 1 callers
Function
buildAccountScopedDmSecurityPolicyFallback
* fallback 实现:构建多账号作用域的 DM 安全策略对象。 * * 逻辑与 openclaw/plugin-sdk/channel-policy 中的 * buildAccountScopedDmSecurityPolicy 完全一致。
src/openclaw-compat.ts:582
↓ 1 callers
Function
buildAuthChangeEventText
* 将权限变更事件回调格式化为可继续路由给大模型的文本。 * * 当管理员在授权页面变更权限后,系统收到 auth_change_event 回调, * 根据 auth_list 生成对应的提示文本,引导 Agent 继续操作。
src/message-parser.ts:167
↓ 1 callers
Function
buildCfgForDispatch
(config: OpenClawConfig)
src/webhook/helpers.ts:684
↓ 1 callers
Function
buildMediaErrorSummary
* 根据媒体发送结果生成纯文本错误摘要(用于替换 thinking 流式消息展示给用户)。 * * 使用纯文本而非 markdown 格式,因为 replyStream 只支持纯文本。
src/monitor.ts:167
↓ 1 callers
Function
buildMediaOversizeHintText
* 构造「附件超过 OpenClaw 大小限制」的中文提示文案。
src/monitor.ts:111
↓ 1 callers
Function
buildMessageContext
* 构建消息上下文 * @returns 消息上下文对象
src/monitor.ts:205
↓ 1 callers
Function
buildQueueKey
(accountId: string, chatId: string)
src/chat-queue.ts:11
↓ 1 callers
Function
buildSelectedOptionMap
(templateCardEvent?: TemplateCardEventPayload)
src/template-card-manager.ts:97
↓ 1 callers
Function
buildStreamTextPlaceholderReply
( streamId: string, content: string, )
src/webhook/helpers.ts:864
↓ 1 callers
Function
buildTemplateCardEventText
* 将模板卡片事件回调格式化为可继续路由给大模型的文本。 * * 这样后续 Agent 可以直接从 question_key / option_id 中理解用户的真实选择。
src/message-parser.ts:102
↓ 1 callers
Function
buildTextFilePreview
(buffer: Buffer, maxChars: number)
src/agent/handler.ts:89
↓ 1 callers
Function
buildUserAgent
* 构造 MCP 请求使用的 User-Agent * * 格式:`OpenClawPlugin/<version> <platform>/<arch>` * 例如:`OpenClawPlugin/0.1.3 linux/x86_64` * * 说明: * - version: 取自 p
src/mcp/transport.ts:93
↓ 1 callers
Function
buildWecomUnauthorizedCommandPrompt
(params: { senderUserId: string; dmPolicy: "pairing" | "allowlist" | "open" | "disabled"; scope: "bot" |
src/shared/command-auth.ts:76
↓ 1 callers
Function
buildWecomUnauthorizedCommandPrompt
(params: { senderUserId: string; dmPolicy: "pairing" | "allowlist" | "open" | "disabled"; scope: "bot" |
src/webhook/command-auth.ts:114
↓ 1 callers
Function
checkBizErrorAndClearCache
* 检查 tools/call 的返回结果中是否包含需要清理缓存的业务错误码
src/mcp/interceptors/biz-error.ts:53
↓ 1 callers
Function
checkDmPolicy
(params: { senderId: string; isGroup: boolean; account: ResolvedWeComAccount; wsClient: WSClient; fr
src/dm-policy.ts:37
↓ 1 callers
Function
checkGroupPolicy
(params: { chatId: string; senderId: string; account: ResolvedWeComAccount; config: OpenClawConfig;
src/group-policy.ts:122
↓ 1 callers
Function
cleanSchemaForGemini
(schema: unknown)
src/mcp/schema.ts:20
↓ 1 callers
Function
cleanWithDefs
( schema: unknown, defs: Record<string, unknown>, refStack: Set<string>, )
src/mcp/schema.ts:35
↓ 1 callers
Function
cleanupAccount
(accountId: string)
src/state-manager.ts:332
↓ 1 callers
Function
cleanupState
()
src/monitor.ts:844
↓ 1 callers
Function
clearAllMessageStates
()
src/state-manager.ts:183
↓ 1 callers
Function
collectUploadTasks
* 深度扫描 records 中所有含 image_path / file_path 的单元格值对象, * 返回待上传任务列表。 * * records 结构: * [{ values: { "字段A": [{ image_path: "..." }], "字段B": [{ file_p
src/mcp/interceptors/smartsheet-upload.ts:85
↓ 1 callers
Function
computeTaskKey
(target: WecomWebhookTarget, msg: WebhookInboundMessage)
src/webhook/helpers.ts:175
↓ 1 callers
Function
createJsonRpcResponse
(result: unknown)
src/mcp/transport.test.ts:33
↓ 1 callers
Function
createPersistentReqIdStore
( accountId: string, options?: ReqIdStoreOptions, )
src/reqid-store.ts:51
↓ 1 callers
Function
createSdkLogger
* 创建适配 RuntimeEnv 的 Logger
src/monitor.ts:904
↓ 1 callers
Function
createWecomAgentWebhookHandler
(runtime: PluginRuntime)
src/agent/webhook.ts:125
↓ 1 callers
Function
deduplicateByAccountId
按 accountId 去重 Target 列表(同一 account 注册多条路径时只保留第一个)
src/webhook/handler.ts:204
↓ 1 callers
Function
deleteMessageState
(messageId: string)
src/state-manager.ts:176
↓ 1 callers
Function
deregisterAgentWebhookTarget
(accountId: string)
src/agent/webhook.ts:46
↓ 1 callers
Function
detectImageContentType
* 检测 Buffer 的图片内容类型
src/media-handler.ts:65
↓ 1 callers
Function
detectMimeFromBufferSync
* 从 Buffer magic bytes 检测 MIME(对齐原版 detectMimeFromBuffer) * * 注意:这是同步版本,用于 inferInboundMediaMeta 中的快速检测。 * 与 media.ts 中的 async detectMimeFromBuffer
src/webhook/helpers.ts:556
↓ 1 callers
Function
dispatchMessage
* 根据消息类型分发到对应的处理函数
src/webhook/handler.ts:504
↓ 1 callers
Function
downloadAndSaveFiles
(params: { fileUrls: string[]; fileAesKeys?: Map<string, string>; account: ResolvedWeComAccount; confi
src/media-handler.ts:168
↓ 1 callers
Function
downloadAndSaveImages
(params: { imageUrls: string[]; imageAesKeys?: Map<string, string>; account: ResolvedWeComAccount; con
src/media-handler.ts:80
↓ 1 callers
Function
downloadMedia
(params: { agent: ResolvedAgentAccount; mediaId: string; maxBytes?: number; })
src/agent/api-client.ts:343
↓ 1 callers
Method
drainAckStreamsForBatch
* 取出并清空某个批次流关联的所有回执流。
src/webhook/state.ts:135
↓ 1 callers
Function
emptyPluginConfigSchema
()
src/openclaw-compat.ts:443
↓ 1 callers
Function
errorResult
(err: unknown)
src/mcp/tool.ts:64
↓ 1 callers
Function
executeFileUpload
* 执行单个文件上传任务 * * 读取本地文件 → base64 → 调用 upload_doc_file → 替换 cellValue
src/mcp/interceptors/smartsheet-upload.ts:213
↓ 1 callers
Function
executeImageUpload
* 执行单个图片上传任务 * * 读取本地文件 → base64 → 调用 upload_doc_image → 替换 cellValue
src/mcp/interceptors/smartsheet-upload.ts:171
↓ 1 callers
Function
extractChatId
(msg: WecomAgentInboundMessage)
src/shared/xml-parser.ts:73
↓ 1 callers
Function
extractContent
(msg: WecomAgentInboundMessage)
src/shared/xml-parser.ts:96
↓ 1 callers
Function
extractDocLocator
* 从 args 中提取文档定位参数(docid 或 url),用于 upload_doc_image
src/mcp/interceptors/smartsheet-upload.ts:286
↓ 1 callers
Function
extractEncryptFromXml
(xml: string)
src/agent/xml.ts:9
↓ 1 callers
Function
extractFileName
* 从 URL/路径中提取文件名
src/media-uploader.ts:243
↓ 1 callers
Function
extractFileName
(msg: WecomAgentInboundMessage)
src/shared/xml-parser.ts:43
↓ 1 callers
Function
extractFileNameFromUrl
从 URL 中提取文件名
src/webhook/helpers.ts:501
↓ 1 callers
Function
extractFilenameFromContentDisposition
从 Content-Disposition 提取文件名
src/webhook/media.ts:91
↓ 1 callers
Function
extractFromUser
(msg: WecomAgentInboundMessage)
src/shared/xml-parser.ts:36
↓ 1 callers
Function
extractLocalFilePathsFromText
(text: string)
src/webhook/helpers.ts:123
↓ 1 callers
Function
extractLocalImagePathsFromText
(params: { text: string; mustAlsoAppearIn: string; })
src/webhook/helpers.ts:140
↓ 1 callers
Function
extractMediaId
(msg: WecomAgentInboundMessage)
src/shared/xml-parser.ts:146
↓ 1 callers
Function
extractMsgId
(msg: WecomAgentInboundMessage)
src/shared/xml-parser.ts:176
↓ 1 callers
Function
extractTemplateCards
(text: string, log?: (...args: any[]) => void)
src/template-card-parser.ts:614
↓ 1 callers
Function
extractVideoFirstFrame
( mediaPath: string, timeoutMs = 10_000, )
src/webhook/video-frame.ts:14
↓ 1 callers
Function
fetchMcpConfig
* 通过 WSClient 拉取指定 category 的 MCP 完整配置 * * @param accountId - 账户 ID,决定使用哪个 WSClient * @param category - MCP 品类名称,如 doc、contact * @returns 完整的 resp
src/mcp/transport.ts:250
↓ 1 callers
Function
fetchRemoteMedia
从远程 URL 获取媒体
src/openclaw-compat.ts:243
↓ 1 callers
Function
findAccountConfig
* 在 accounts Record 中按 normalize 后的 accountId 查找配置。 * 避免因大小写差异导致找不到账号。
src/accounts.ts:124
↓ 1 callers
Function
findPackageJson
()
src/version.ts:10
↓ 1 callers
Function
flushPending
* **flushPending (刷新待处理消息 / 核心 Agent 触发点)** * * 当防抖计时器结束时被调用。 * 核心逻辑: * 1. 聚合所有 pending 的消息内容(用于上下文)。 * 2. 获取 PluginRuntime。 * 3. 标记 Stream 为 St
src/webhook/gateway.ts:233
↓ 1 callers
Function
formatQuote
(quote: WebhookInboundQuote)
src/webhook/helpers.ts:811
↓ 1 callers
Function
generateAgentId
(chatType: "dm" | "group", peerId: string, accountId?: string)
src/dynamic-agent.ts:45
↓ 1 callers
Function
getDefaultMediaLocalRoots
()
src/openclaw-compat.ts:422
↓ 1 callers
Function
getDynamicAgentConfig
(config: OpenClawConfig)
src/dynamic-agent.ts:22
↓ 1 callers
Function
getExtendedMediaLocalRoots
* 在 getDefaultMediaLocalRoots() 基础上,将 stateDir 本身也加入白名单, * 并合并用户在 WeComConfig 中配置的自定义 mediaLocalRoots。 * * getDefaultMediaLocalRoots() 仅包含 stateDir
src/monitor.ts:137
↓ 1 callers
Function
getMcpUrl
* 获取指定品类的 MCP Server URL * * 优先从内存缓存中读取,未命中时通过 WSClient 拉取并缓存。 * * @param accountId - 账户 ID * @param category - MCP 品类名称 * @returns MCP Server U
src/mcp/transport.ts:294
← previous
next →
101–200 of 367, ranked by callers