mateclaw/mateclaw-server/src/test/java/vip/mate/channel/webchat
倪程伟 f6156f6093 feat(webchat): expose agent-bound wiki pages to API-Key callers
Add GET /api/v1/channels/webchat/wiki/pages mirroring /skills, so
downstream integrators can build a [[slug]] picker UI that points the
LLM at specific wiki pages. The picker token format is the universal
Obsidian/Wikipedia wikilink convention; the LLM consumes [[slug]] via
the existing wiki_read_page(slug=...) tool, so no agent-runtime changes
are needed.

- AgentBindingResolver.getBoundKbIds(agentId): three-state mirror of
  getBoundSkillIds. null = no rows (fall through to workspace-wide KBs),
  Set.of() = explicitly scoped to zero KBs, non-empty = explicit scope.
- WebChatController.listWikiPages: API Key + visitorToken auth chain,
  agentId workspace anti-escalation, visibility excludes pageType=
  synthesis (LLM intermediate artifacts), 100-page cap forces keyword
  filter, response carries only display-level metadata.
- WebChatWikiPageView DTO: kbId/kbName/slug/title/summary/pageType;
  content/embedding/sourceRawIds deliberately stay admin-console-only.
- WikiTool.wiki_read_page @Tool description: document the [[slug]]
  convention so the LLM treats each token as a wiki-page reference.
- WebChatWikiPageListTest: 8 cases covering happy path, keyword filter,
  synthesis exclusion, anti-escalation, auth failures, cap behavior,
  and the no-binding → workspace-wide fallback.

Closes #381.
2026-06-20 07:21:07 +08:00
..
WebChatArchivePinTest.java feat(webchat): pin + archive endpoints (epic #355 PR 3) 2026-06-18 06:33:17 +08:00
WebChatAttachmentE2ETest.java test(webchat): HTTP e2e coverage for attachment upload/stream/download 2026-06-18 06:33:17 +08:00
WebChatAuditTrailTest.java feat(webchat): audit visitor-side writes via AuditEventService.recordAs (epic #355 PR 7) 2026-06-18 06:33:17 +08:00
WebChatCreateSessionTest.java feat(webchat): archive flag + revoked-visitor table + view fields (epic #355 PR 1) 2026-06-18 06:33:17 +08:00
WebChatFileServiceTest.java perf(webchat): scope session listing to the visitor; cap upload disk use 2026-06-17 23:21:08 +08:00
WebChatRegenerateTest.java feat(webchat): regenerate last assistant reply (epic #355 PR 4) 2026-06-18 06:33:17 +08:00
WebChatSchemaFieldsTest.java feat(webchat): archive flag + revoked-visitor table + view fields (epic #355 PR 1) 2026-06-18 06:33:17 +08:00
WebChatSessionManagementTest.java feat(webchat): archive flag + revoked-visitor table + view fields (epic #355 PR 1) 2026-06-18 06:33:17 +08:00
WebChatSkillListTest.java feat(webchat): expose agent-bound skill list to API-Key callers 2026-06-19 06:20:59 +08:00
WebChatStopStreamTest.java feat(webchat): stop an in-flight session stream (POST /sessions/stop) 2026-06-18 06:33:17 +08:00
WebChatStreamE2ETest.java feat(webchat): expose phase / tool_start / tool_end / plan as SSE events 2026-06-18 06:33:17 +08:00
WebChatTokenRevocationTest.java feat(webchat): visitorToken revocation + 7-day expiry + Caffeine cache (epic #355 PR 2) 2026-06-18 06:33:17 +08:00
WebChatVisitorTokenTest.java feat(webchat): visitorToken revocation + 7-day expiry + Caffeine cache (epic #355 PR 2) 2026-06-18 06:33:17 +08:00
WebChatWikiPageListTest.java feat(webchat): expose agent-bound wiki pages to API-Key callers 2026-06-20 07:21:07 +08:00