计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
knowledge-search【效率与协作】Search the user's knowledge bases and knowledge spaces (企业知识库检索). Use this whenever the user wants to 查知识库 / 检索资料 / 搜一下有没有… / 查内部文档、规范、流程、发版说明, or asks any question their organisation's knowledge base may answer. Read-only retrieval with the user's own permissions.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Base URL: {{BASE_URL}} — the address this pack was downloaded from. It is
only a fallback: once --configure saves the address the user's browser uses,
that one wins. Full endpoint contract, response shapes, pagination and the
error-code table: references/api.md — read it before composing requests.
The user copies a ready-made setup command from the platform's AI 助手接入 / AI assistant access page. Run it exactly as given:
python3 scripts/search.py --configure --base-url <platform address> --api-key <key>
(python instead of python3 on Windows.) It checks the key against that
platform and stores both values in this skill's own credentials file —
~/.config/knowledge-search/credentials.json
(%APPDATA%\knowledge-search\credentials.json on Windows), readable only by
the current user — printing only a masked key. From then on every call in every
new session just works, without --base-url.
Where each value comes from on later calls:
--base-url if given → the address saved by
--configure → the Base URL above. The saved one is what the user's browser
uses; the baked one can be an internal or plain-http address behind some
proxies.KNOWLEDGE_API_KEY (per-process override)
→ the key saved for that platform address.Rules:
No API key for …, do exactly what the message says:
ask the user for the setup command (or their key and platform address) and
run --configure. Do not search the file system, shell profiles or
environment for it..zshenv, .bashrc, …), agent
memory, notes or any other file. --configure is the only place it lives.HTTP 401 the error names where the rejected key came from (environment
variable or credentials file) and the fix — follow it instead of retrying.Knowledge-base IDs are numbers the user usually does not know. Never ask the user for an ID before trying to find it yourself:
List what the token can see (both calls, they cover different types):
python3 scripts/search.py --list-knowledge-bases space
python3 scripts/search.py --list-knowledge-bases doc
Pick the IDs whose names match the user's topic. If more results exist
(has_more is true) pass --cursor <next_cursor> to continue. Department
knowledge spaces are retrievable but do not appear in this listing — if the
user names one, ask them for its ID (see references/api.md).
Retrieve against the chosen IDs:
python3 scripts/search.py --query "release policy" --knowledge-base-id 12
--knowledge-base-id may repeat; --top-k defaults to 10 (max 200).
Cite what you used. Each chunk carries document_name, knowledge_id,
document_id and chunk_index — cite as
「document_name」(知识库 knowledge_id · 文档 document_id · 段 chunk_index)
so the user can find the original on the platform.
The script prints the API's JSON error body to stderr; status_code there is
the business code. Look it up in references/api.md and follow its action —
in particular 26044 means the administrator restricted retrieval to the
user's own knowledge bases: tell the user to contact their administrator, do
not retry.
When no status code comes back at all and the script says the platform address could not be reached, the machine you run on has no route to it — a key cannot fix that. Tell the user this skill only works where that address opens, on a computer of their own; do not retry or look for another way in.
Do not pass a user ID in the request body or add an identity-delegation header. Personal access tokens always act as their holder.