* feat(agent): add the built-in WeKnora assistant with an operation catalog
Adds builtin-weknora-assistant, which inspects and manages WeKnora with the
signed-in user's permissions:
- find_operations / run_operation over an allow-listed API operation catalog,
dispatched in-process through the real router as the user
- builtin approval for write/destructive operations, refused when
non-interactive
- agent attribution in knowledge base activity, including async tasks
- page_context request field, narrowed to the turn's search targets and
rendered into runtime_context with model handles
* refactor(agent): compile the operation catalog from x-agent Swagger annotations
The catalog was a hand-written copy of what the swag annotations already
describe: routes, parameters, enums and response shapes. It now compiles
from the Swagger document embedded in the binary. Handlers opt in with
// @x-agent {"id":"knowledge.delete","risk":"destructive",...}
// @x-agent-hint "Cannot be undone."
// @Param id path string true "知识ID" extensions(x-agent=knowledge_id)
and response types mark the fields the model may see with an
extensions:"x-agent" struct tag. Exposure stays opt-in at every level:
unmarked operations, parameters and fields are not reachable, so a new
field on Knowledge or a new query parameter never reaches the model by
accident. NewCatalog still enforces the safety rules (forbidden areas,
risk versus method, approval targets), and a test fails when the
annotations and docs/swagger.json disagree.
The twelve operations compile to the same routes, parameters and
results as before; document results now share one field set, and the
parse_status filter accepts deleting, which the API supports.
* fix(agent): enforce resume and wiki context scopes
|
||
|---|---|---|
| .. | ||
| assets | ||
| design | ||
| images | ||
| poc/docker-sandbox | ||
| LITE.md | ||
| README.md | ||
| docs.go | ||
| release-v0.8.3-audit.md | ||
| swag.overrides | ||
| swagger.json | ||
| swagger.yaml | ||
| swagger_contract_test.go | ||
README.md
文档已迁至 website-docs
产品、部署、API 和开发文档统一维护在 website-docs。已迁移、重复和过时的旧手写文档已删除;历史内容可从 Git 历史查看。
本目录仅保留以下工程资源及本入口说明:
docs.go、swagger.json、swagger.yaml与契约测试:参与后端编译和测试,生成物仍由make docs更新。LITE.md:Lite 发布包复制为离线 README。images/、assets/:README、Helm 等仍使用的图片资源。poc/docker-sandbox/:独立 Go 实验模块,保留源码和运行说明,不作为当前产品指南。
这些资源尚有编译、发布或历史实验用途,不能直接整目录删除。新的产品说明不要再放入此处。