MCPcopy Create free account

hub / github.com/LSTM-Kirigaya/LBot / functions

Functions268 in github.com/LSTM-Kirigaya/LBot

↓ 44 callersMethodsend
(apiJSON: Lagrange.ApiJSON)
src/core/context.ts:33
↓ 16 callersMethodget
()
src/core/mapper.ts:27
↓ 8 callersMethodsendPrivateMsg
* @description 发送私聊消息 * @param user_id 对方 QQ 号 * @param message 要发送的内容 * @param auto_escape 消息内容是否作为纯文本发送(即不解析 CQ 码),只在 message 字段是字符串时
src/core/context.ts:129
↓ 7 callersMethodclose
()
src/mcp/transport.ts:103
↓ 7 callersMethodset
(v: any)
src/core/mapper.ts:28
↓ 6 callersMethodlaunch
* @description 启动 QQ 服务进程 * 连接参数(type/host/port/accessToken/path)与配置文件同时传入时,以传入参数为准
src/core/context.ts:880
↓ 5 callersMethodfinishSession
()
src/core/context.ts:114
↓ 5 callersFunctiongetGrad
()
src/util/banner.ts:5
↓ 5 callersMethodgetGroupMemberInfo
* @description 获取群成员信息 * @param group_id 群号 * @param user_id QQ 号 * @param no_cache 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
src/core/context.ts:516
↓ 5 callersMethodgetGroupMsgHistory
* @description 获取群消息历史记录 * @param group_id 群号 * @param message_seq 消息序号 * @param count 获取数量 * @param reverse_order 是否倒序
src/core/context.ts:247
↓ 4 callersMethodcreate
* 工厂函数:一行搞定实例化 + 预下载 + 预热
src/mcp/memory.ts:56
↓ 4 callersMethodembed
(text: string)
src/mcp/memory.ts:301
↓ 4 callersFunctiongetConfigurationPath
(...segments: string[])
src/util/index.ts:77
↓ 4 callersMethodgetGroupInfo
* @description 获取群信息 * @param group_id 群号 * @param no_cache 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
src/core/context.ts:493
↓ 4 callersMethodopenTable
()
src/mcp/memory.ts:314
↓ 3 callersMethodcheckAuthorization
* 检查用户是否有权限执行敏感操作
src/mcp/memory.ts:96
↓ 3 callersMethodgetRawText
* @description 获取消息的纯文本信息,如果有多段消息,默认按照回车进行分割 * @param config * @returns
src/core/context.ts:175
↓ 3 callersMethodonMounted
* @description 注册客户端初始化完成后的行为
src/core/context.ts:972
↓ 3 callersMethodonPrivateUser
* @description 私聊用户响应函数的注册函数 * @param user_id 私聊用户的 QQ 号码 * @returns
src/core/mapper.ts:264
↓ 3 callersMethodsendGroupMsg
* @description 发送群消息 * @param group_id 群号 * @param message 要发送的内容 * @param auto_escape 消息内容是否作为纯文本发送(即不解析 CQ 码),只在 message 字段是字符串时有效
src/core/context.ts:142
↓ 3 callersMethodsendMessage
* @description 根据回复者回消息,如果是群聊,则在群聊中回复;如果是私聊,直接回复 * @param message * @returns
src/core/context.ts:199
↓ 3 callersMethodstart
()
src/mcp/transport.ts:74
↓ 2 callersFunctionassert
(condition: boolean, message: string)
src/test/test-websearch.ts:14
↓ 2 callersMethodenqueue
(item: T)
src/util/index.ts:37
↓ 2 callersMethodescapeQuote
(s: string)
src/mcp/memory.ts:349
↓ 2 callersFunctionextractMessageContent
* 从消息对象中提取纯文本内容
src/util/message-search.ts:39
↓ 2 callersMethodgetAllGroupIds
* 获取所有存在记录的 groupIds
src/mcp/memory.ts:331
↓ 2 callersMethodgetFriendMsgHistory
* @description 获取好友消息历史记录 * @param user_id 用户QQ号 * @param message_seq 消息序号 * @param count 获取数量 * @param reverse_order 是否倒序
src/core/context.ts:266
↓ 2 callersMethodgetLoginInfo
* @description 获取登录号信息
src/core/context.ts:459
↓ 2 callersFunctiongetTestImageFileUrl
获取测试用图片的 file:// URL(以项目根为 cwd 时 src/test/hello.jpg)
src/test/main-forward-ws.ts:23
↓ 2 callersFunctionhandleAutoDownloadImage
(c: LagrangeContext<Lagrange.GroupMessage | Lagrange.PrivateMessage>)
src/util/index.ts:92
↓ 2 callersMethodinitMemory
(option: McpLanchOption = {})
src/mcp/index.ts:33
↓ 2 callersFunctionmatchesKeyword
* 检查文本是否匹配关键词
src/util/message-search.ts:60
↓ 2 callersMethodregister
(name?: string)
src/plugin/index.ts:24
↓ 1 callersMethodaddController
(controller: any)
src/core/context.ts:983
↓ 1 callersMethodaddMemory
* 添加记忆 * @param content 多条文本 * @param userId 用户 ID(用于权限检查) * @param groupId 群组 ID(必须提供) * @param key 唯一标识(可选;不传则每条生成 uuid) *
src/mcp/memory.ts:113
↓ 1 callersFunctionatMessagePrompt
( context: LagrangeContext<Lagrange.Message>, group_id: number, userName: string, atUserId?: s
src/mcp/prompt.ts:8
↓ 1 callersFunctionatQueryPrompt
( content: string, reference: string = '无' )
src/mcp/prompt.ts:41
↓ 1 callersMethodcanSendImage
* @description 检查是否可以发送图片
src/core/context.ts:595
↓ 1 callersMethodclientConnect
(ws: WebSocket)
src/core/context.ts:776
↓ 1 callersFunctioncommand
(cmd: string)
src/util/index.ts:13
↓ 1 callersFunctioncopy
(s, d)
scripts/copy-skills.js:7
↓ 1 callersFunctioncreateMcpServer
( context: LagrangeContext<Lagrange.Message>, option: McpLanchOption = {} )
src/mcp/index.ts:157
↓ 1 callersFunctioncreateSandbox
* 构建 vm 沙箱:仅暴露必要内置对象(context/memory/util 通过函数参数传入,不放入全局) * 使用自定义 console 捕获 log/info/warn/debug/error 输出,供 AI 查看
src/mcp/executor.ts:48
↓ 1 callersMethodcreateTableWithFirstRow
(firstRow: any)
src/mcp/memory.ts:320
↓ 1 callersFunctionescapeRegExp
* 转义正则表达式特殊字符
src/util/message-search.ts:87
↓ 1 callersMethodget
()
src/plugin/index.ts:14
↓ 1 callersFunctiongetDirname
* 获取当前模块的 __dirname(兼容 ESM 和 CJS) * 在 CJS 中直接使用 __dirname,在 ESM 中通过堆栈追踪获取路径
src/mcp/extraTool.ts:12
↓ 1 callersMethodgetEmbedder
()
src/mcp/memory.ts:294
↓ 1 callersMethodgetFriendList
* @description 获取好友列表
src/core/context.ts:481
↓ 1 callersMethodgetGroupMemberList
* @description 获取群成员列表 * @param group_id 群号
src/core/context.ts:527
↓ 1 callersFunctiongetGroupMessageImagePath
(groupId: number, subType: number, fileName: string)
src/util/index.ts:87
↓ 1 callersFunctiongetLocalIP
()
src/util/network.ts:4
↓ 1 callersMethodgetMem
()
src/mcp/index.ts:23
↓ 1 callersMethodgetMsg
* @description 获取消息 * @param message_id 消息 ID
src/core/context.ts:233
↓ 1 callersFunctiongetPrivateMessageImagePath
(userId: number, subType: number, fileName: string)
src/util/index.ts:82
↓ 1 callersMethodgetStrangerInfo
* @description 获取陌生人信息 * @param user_id QQ 号 * @param no_cache 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
src/core/context.ts:471
↓ 1 callersFunctiongetUserAvatar
(qq: number)
src/test/avatar.test.ts:4
↓ 1 callersFunctiongetUserAvatarPath
(user_id: number, no_cache: boolean = false)
src/util/index.ts:126
↓ 1 callersMethodinit
* 预下载并加载模型
src/mcp/memory.ts:66
↓ 1 callersFunctionisValidResult
(r: WebSearchResult)
src/test/test-websearch.ts:20
↓ 1 callersFunctionloadEnv
()
src/test/test-mcp.ts:18
↓ 1 callersFunctionloadEnv
()
src/test/main-forward-ws.ts:50
↓ 1 callersFunctionmain
()
src/test/test-mcp.ts:26
↓ 1 callersFunctionmain
()
src/test/main-forward-ws.ts:58
↓ 1 callersFunctionmain
()
src/test/test-websearch.ts:30
↓ 1 callersMethodmessagePipe
(message: Lagrange.MessagePostType)
src/core/event.ts:25
↓ 1 callersMethodnoticePipe
(message: Lagrange.NoticePostType)
src/core/event.ts:39
↓ 1 callersMethodonAddFriendOrGroup
* @description 有人想要入群或者加机器人好友的申请事件响应函数,注册一次,全局响应
src/core/mapper.ts:338
↓ 1 callersMethodonGroup
* @description 群聊用户响应函数的注册函数 * @param group_id 群聊的群号 * @param config 响应配置 * @returns
src/core/mapper.ts:283
↓ 1 callersMethodonGroupIncrease
* @description 新人入群的响应函数的注册 * @param group_id 发生新人入群事件的群号
src/core/mapper.ts:322
↓ 1 callersMethodonUnmounted
* @description 注册客户端退出时的行为
src/core/context.ts:979
↓ 1 callersFunctionpushOut
(...args: unknown[])
src/mcp/executor.ts:49
↓ 1 callersMethodregister
(option: McpLanchOption)
src/mcp/index.ts:144
↓ 1 callersMethodregisterExecuteTask
* 只注册一个工具:execute_task。AI 根据用户意图生成 TS/JS 代码,在此执行并拿到结果。
src/mcp/index.ts:68
↓ 1 callersMethodregisterPrompts
* 注册 prompt(不占工具 token)
src/mcp/index.ts:102
↓ 1 callersMethodregisterServer
(server: LagrangeServer)
src/core/event.ts:11
↓ 1 callersMethodrequestPipe
(message: Lagrange.RequestPostType)
src/core/event.ts:52
↓ 1 callersMethodresolveGroup
(c: LagrangeContext<Lagrange.GroupMessage>)
src/core/mapper.ts:155
↓ 1 callersMethodresolveGroupIncrease
(c: LagrangeContext<Lagrange.ApproveMessage>)
src/core/mapper.ts:237
↓ 1 callersMethodresolveOfflineFile
(c: LagrangeContext<Lagrange.FileMessage>)
src/core/mapper.ts:246
↓ 1 callersMethodresolvePrivateUser
(c: LagrangeContext<Lagrange.PrivateMessage>)
src/core/mapper.ts:125
↓ 1 callersMethodresolveRequest
(c: LagrangeContext<Lagrange.RequestPostType>)
src/core/mapper.ts:253
↓ 1 callersFunctionrun
()
src/mcp/executor.ts:179
↓ 1 callersMethodrun
(config: LaunchOption)
src/core/context.ts:788
↓ 1 callersMethodrun
(message: Lagrange.Message)
src/core/event.ts:15
↓ 1 callersFunctionrunTaskCode
( code: string, sandbox: TaskSandbox, timeoutMs: number = DEFAULT_TIMEOUT_MS )
src/mcp/executor.ts:139
↓ 1 callersFunctionsearchGroupMsgHistory
( context: LagrangeContext<Lagrange.Message>, options: SearchHistoryOptions )
src/util/message-search.ts:98
↓ 1 callersMethodsendGroupNotice
* @description 发送群公告 * @param group_id * @param notice_type * @param sub_type * @param file * @param user_id
src/core/context.ts:687
↓ 1 callersMethodserverConnect
(wsServer: WebSocket.Server)
src/core/context.ts:764
↓ 1 callersMethodset
(v: any)
src/plugin/index.ts:15
↓ 1 callersMethodsetGroupAddRequest
* @description 处理加群请求/邀请 * @param flag 加群请求的 flag(需从上报的数据中获得) * @param sub_type add 或 invite,请求类型(需要和上报消息中的 sub_type 字段相符) * @param app
src/core/context.ts:449
↓ 1 callersMethodsetupRoutes
()
src/mcp/transport.ts:27
↓ 1 callersFunctionshowBanner
(text = "L.BOT")
src/util/banner.ts:13
↓ 1 callersFunctiontranspileToJS
* 将 TypeScript 源码转成 JavaScript(若已是合法 JS 则原样通过)
src/mcp/executor.ts:28
↓ 1 callersMethoduploadGroupFile
* @description 上传群文件 * @param group_id 群号 * @param file 文件绝对路径 * @param name 文件名称
src/core/context.ts:672
↓ 1 callersMethoduse
(name: string)
src/plugin/index.ts:37
↓ 1 callersMethodwarmup
* 预热
src/mcp/memory.ts:87
↓ 1 callersFunctionwebsearch
(query: string)
src/mcp/extraTool.ts:150
FunctionAnonymous
()
src/core/factory.ts:93
next →1–100 of 268, ranked by callers