Repository navigation
Align ima knowledge mount with official Agent Interface - #41
Merged
Merged
Conversation
XYAIStudio
marked this pull request as ready for review
September 17, 2026 06:16
Replace the URL-only cloud pointer with Client ID / API Key auth from ima.qq.com/agent-interface, then let users pick knowledge bases and documents. Persist the selection and use it in chat retrieval and distill. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
Parse folder_ media_id entries as folders, hydrate bases via get_knowledge_base, and let users search/page documents with search_knowledge so the mount can select both knowledge bases and documents after the official Client ID / API Key connect. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
The JS-rendered ima.qq.com/agent-interface page now ships ima-skills-1.1.10: send skill_version=1.1.10 and treat folder ids as the returned media_id instead of inventing a folder_ prefix. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
cursor
Bot
force-pushed
the
cursor/ima-knowledge-mount-89db
branch
from
September 17, 2026 06:45
7f358d4 to
d15eb99
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ima 知识库挂接改为官方 Agent Interface。落地页 https://ima.qq.com/agent-interface 是 JS 应用(标题「ima claw配置」),静态抓取只有这几个字;真实约定在页面 JS 和它下发的 skill。
已 rebase 到最新
main(含 #39、#40)。冲突仅在CHANGELOG.md:保留 ima 1.1.10 条目与 #40 模型选择器修复。对照官方(从落地页 JS 挖到)
页面 bundle:
https://static.ima.qq.com/ima/assets/agent-interface/assets/index-D_925oRl.jsPOST /knowledge-bases/ima/connect,凭证加密进tencent-imaconnectorhttps://app-dl.ima.qq.com/skills/ima-skills-1.1.10.zip;开发者文档:https://skillhub.tencent.com/skills/ima-skillsPOST https://ima.qq.com/openapi/wiki/v1/*ima-openapi-clientid/ima-openapi-apikey/ima-openapi-ctx: skill_version=1.1.10tencent_ima._headers{code, msg, data}(skill 正文)或{retcode, errmsg, data}(api.md)unwrap_openapi_datasearch_knowledge_base(limit 1–20,空 query 列全部)再get_knowledge_base补描述GET /knowledge-bases/ima/basesget_knowledge_list;搜文档:search_knowledgeGET /knowledge-bases/ima/bases/{id}/documents(query走搜索)media_id为准,不要自造folder_前缀(1.1.10)cursor/next_cursor/is_end挂接后选择写入
selected_bases/selected_docs。只勾知识库、不勾文档 = 接入整库。检索走官方search_knowledge,并按所选media_id过滤。验证
有 Client ID / API Key 时:知识库页 → agent-interface → 连接 → 勾选知识库 → 进入文件夹或搜索文档 → 保存选择。
未对 ima.qq.com 做真机调用(无官方密钥)。