WeKnora/internal/agent/operations
lyingbug c40b33ecc3
fix(agent): admit catalog operations only from knowledge API areas (#4317)
The operation catalog refused routes under a list of forbidden prefixes,
matched as "<prefix>" or "<prefix>/". Areas whose names only extend a
listed one passed: /sandbox-configs, /storage-backends,
/web-search-providers and /im-channels. Areas nobody listed passed too,
including /agent/tool-approvals and /agent/prompts, where an annotated
operation would let the assistant answer its own approval prompts.
Nothing reachable is annotated today, so this closes the gap before an
annotation can open it.

The check is now an allow-list of first path segments (knowledge bases,
knowledge, Wiki, chunks, FAQ). Anything else, including APIs added
later, is refused until listed on purpose. Inside those areas, "shares"
is refused: who can reach a knowledge base is the user's decision.
2026-10-15 14:20:27 +08:00
..
builtin.go feat(agent): add the built-in WeKnora assistant with an operation catalog (#4302) 2026-10-15 12:18:30 +08:00
catalog.go fix(agent): admit catalog operations only from knowledge API areas (#4317) 2026-10-15 14:20:27 +08:00
catalog_test.go fix(agent): admit catalog operations only from knowledge API areas (#4317) 2026-10-15 14:20:27 +08:00
dispatch.go feat(agent): add the built-in WeKnora assistant with an operation catalog (#4302) 2026-10-15 12:18:30 +08:00
projection.go feat(agent): add the built-in WeKnora assistant with an operation catalog (#4302) 2026-10-15 12:18:30 +08:00
request.go feat(agent): add the built-in WeKnora assistant with an operation catalog (#4302) 2026-10-15 12:18:30 +08:00
spec.go fix(agent): admit catalog operations only from knowledge API areas (#4317) 2026-10-15 14:20:27 +08:00
spec_test.go fix(agent): admit catalog operations only from knowledge API areas (#4317) 2026-10-15 14:20:27 +08:00